aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format4
-rw-r--r--.github/workflows/cross-bootstrap-tools.yml2
-rw-r--r--CONTRIBUTING.md16
-rw-r--r--Makefile2
-rw-r--r--Makefile.inc124
-rw-r--r--ObsoleteFiles.inc37
-rw-r--r--README.md2
-rw-r--r--RELNOTES30
-rw-r--r--UPDATING10
-rw-r--r--bin/cat/cat.c16
-rw-r--r--bin/cp/utils.c3
-rw-r--r--bin/date/date.14
-rw-r--r--bin/date/date.c4
-rw-r--r--bin/ps/ps.12
-rw-r--r--bin/ps/ps.c2
-rw-r--r--bin/rmdir/rmdir.115
-rw-r--r--bin/rmdir/rmdir.c2
-rw-r--r--bin/rmdir/tests/rmdir_test.sh6
-rw-r--r--cddl/lib/libzpool/Makefile2
-rw-r--r--contrib/atf/atf-c/macros.h151
-rw-r--r--contrib/bmake/ChangeLog98
-rw-r--r--contrib/bmake/Makefile6
-rw-r--r--contrib/bmake/Makefile.config.in1
-rw-r--r--contrib/bmake/VERSION2
-rw-r--r--contrib/bmake/arch.c250
-rw-r--r--contrib/bmake/bmake.cat12585
-rw-r--r--contrib/bmake/buf.c31
-rw-r--r--contrib/bmake/buf.h3
-rw-r--r--contrib/bmake/compat.c6
-rw-r--r--contrib/bmake/cond.c19
-rwxr-xr-xcontrib/bmake/configure40
-rw-r--r--contrib/bmake/configure.in25
-rw-r--r--contrib/bmake/dir.c51
-rw-r--r--contrib/bmake/dir.h3
-rw-r--r--contrib/bmake/for.c15
-rw-r--r--contrib/bmake/getopt.c6
-rw-r--r--contrib/bmake/job.c14
-rw-r--r--contrib/bmake/lst.c8
-rw-r--r--contrib/bmake/lst.h11
-rw-r--r--contrib/bmake/main.c18
-rwxr-xr-xcontrib/bmake/make-bootstrap.sh.in1
-rw-r--r--contrib/bmake/make.h25
-rw-r--r--contrib/bmake/meta.c4
-rw-r--r--contrib/bmake/mk/ChangeLog43
-rw-r--r--contrib/bmake/mk/FILES1
-rw-r--r--contrib/bmake/mk/dirdeps.mk7
-rw-r--r--contrib/bmake/mk/init.mk4
-rw-r--r--[-rwxr-xr-x]contrib/bmake/mk/install-mk6
-rw-r--r--contrib/bmake/mk/meta.autodep.mk4
-rw-r--r--contrib/bmake/mk/meta.subdir.mk3
-rw-r--r--contrib/bmake/mk/own.mk5
-rw-r--r--contrib/bmake/mk/progs.mk22
-rw-r--r--contrib/bmake/mk/subdir.mk6
-rw-r--r--contrib/bmake/mk/sys.dirdeps.mk15
-rw-r--r--contrib/bmake/mk/sys/Cygwin.mk21
-rwxr-xr-xcontrib/bmake/os.sh6
-rw-r--r--contrib/bmake/parse.c28
-rw-r--r--contrib/bmake/str.c30
-rw-r--r--contrib/bmake/targ.c17
-rw-r--r--contrib/bmake/unit-tests/Makefile27
-rw-r--r--contrib/bmake/unit-tests/archive.exp8
-rw-r--r--contrib/bmake/unit-tests/archive.mk33
-rw-r--r--contrib/bmake/unit-tests/cmd-errors-jobs.exp6
-rw-r--r--contrib/bmake/unit-tests/cmd-errors-jobs.mk31
-rw-r--r--contrib/bmake/unit-tests/cmd-errors-lint.exp6
-rw-r--r--contrib/bmake/unit-tests/cmd-errors-lint.mk11
-rw-r--r--contrib/bmake/unit-tests/cmd-errors.exp6
-rw-r--r--contrib/bmake/unit-tests/cmd-errors.mk11
-rw-r--r--contrib/bmake/unit-tests/cmdline-undefined.mk4
-rw-r--r--contrib/bmake/unit-tests/cmdline.mk4
-rw-r--r--contrib/bmake/unit-tests/comment.mk8
-rw-r--r--contrib/bmake/unit-tests/cond-cmp-string.mk20
-rw-r--r--contrib/bmake/unit-tests/cond-func-defined.exp3
-rw-r--r--contrib/bmake/unit-tests/cond-func-defined.mk11
-rw-r--r--contrib/bmake/unit-tests/cond-token-string.exp2
-rw-r--r--contrib/bmake/unit-tests/cond-token-string.mk4
-rw-r--r--contrib/bmake/unit-tests/depsrc-end.mk4
-rw-r--r--contrib/bmake/unit-tests/depsrc-nopath.exp2
-rw-r--r--contrib/bmake/unit-tests/depsrc-nopath.mk25
-rw-r--r--contrib/bmake/unit-tests/depsrc-phony.mk3
-rw-r--r--contrib/bmake/unit-tests/deptgt.exp2
-rw-r--r--contrib/bmake/unit-tests/deptgt.mk4
-rw-r--r--contrib/bmake/unit-tests/directive-export-impl.exp2
-rw-r--r--contrib/bmake/unit-tests/directive-for-errors.exp2
-rw-r--r--contrib/bmake/unit-tests/directive-for-errors.mk4
-rw-r--r--contrib/bmake/unit-tests/directive-for-escape.exp1
-rw-r--r--contrib/bmake/unit-tests/directive-for-null.exp6
-rw-r--r--contrib/bmake/unit-tests/directive-for-null.mk14
-rwxr-xr-xcontrib/bmake/unit-tests/directive-for.exp2
-rwxr-xr-xcontrib/bmake/unit-tests/directive-for.mk4
-rwxr-xr-xcontrib/bmake/unit-tests/directive-include.exp2
-rwxr-xr-xcontrib/bmake/unit-tests/directive-include.mk4
-rw-r--r--contrib/bmake/unit-tests/directive-undef.exp2
-rw-r--r--contrib/bmake/unit-tests/directive-undef.mk4
-rwxr-xr-xcontrib/bmake/unit-tests/lint.exp2
-rw-r--r--contrib/bmake/unit-tests/moderrs.exp12
-rw-r--r--contrib/bmake/unit-tests/opt-chdir.exp2
-rw-r--r--contrib/bmake/unit-tests/opt-chdir.mk8
-rw-r--r--contrib/bmake/unit-tests/opt-debug-errors-jobs.exp6
-rw-r--r--contrib/bmake/unit-tests/opt-debug-graph1.exp2
-rw-r--r--contrib/bmake/unit-tests/opt-debug-graph2.exp2
-rw-r--r--contrib/bmake/unit-tests/opt-debug-graph3.exp2
-rw-r--r--contrib/bmake/unit-tests/opt-debug-lint.exp6
-rw-r--r--contrib/bmake/unit-tests/opt-debug-lint.mk8
-rw-r--r--contrib/bmake/unit-tests/opt-debug-parse.exp2
-rw-r--r--contrib/bmake/unit-tests/opt-file.exp4
-rw-r--r--contrib/bmake/unit-tests/opt-file.mk12
-rw-r--r--contrib/bmake/unit-tests/opt-keep-going-indirect.mk10
-rw-r--r--contrib/bmake/unit-tests/opt-m-include-dir.mk8
-rw-r--r--contrib/bmake/unit-tests/suff-main-several.exp2
-rw-r--r--contrib/bmake/unit-tests/suff-transform-debug.exp2
-rw-r--r--contrib/bmake/unit-tests/var-eval-short.exp4
-rw-r--r--contrib/bmake/unit-tests/var-eval-short.mk4
-rw-r--r--contrib/bmake/unit-tests/var-op-expand.exp4
-rw-r--r--contrib/bmake/unit-tests/var-op-expand.mk6
-rw-r--r--contrib/bmake/unit-tests/vardebug.exp2
-rw-r--r--contrib/bmake/unit-tests/vardebug.mk4
-rw-r--r--contrib/bmake/unit-tests/varmisc.exp20
-rw-r--r--contrib/bmake/unit-tests/varmod-assign.exp2
-rw-r--r--contrib/bmake/unit-tests/varmod-assign.mk4
-rw-r--r--contrib/bmake/unit-tests/varmod-edge.exp6
-rw-r--r--contrib/bmake/unit-tests/varmod-edge.mk8
-rw-r--r--contrib/bmake/unit-tests/varmod-gmtime.exp10
-rw-r--r--contrib/bmake/unit-tests/varmod-gmtime.mk12
-rw-r--r--contrib/bmake/unit-tests/varmod-hash.exp6
-rw-r--r--contrib/bmake/unit-tests/varmod-ifelse.exp2
-rw-r--r--contrib/bmake/unit-tests/varmod-ifelse.mk6
-rw-r--r--contrib/bmake/unit-tests/varmod-indirect.exp8
-rw-r--r--contrib/bmake/unit-tests/varmod-indirect.mk10
-rw-r--r--contrib/bmake/unit-tests/varmod-localtime.exp10
-rw-r--r--contrib/bmake/unit-tests/varmod-localtime.mk12
-rw-r--r--contrib/bmake/unit-tests/varmod-loop-delete.exp2
-rw-r--r--contrib/bmake/unit-tests/varmod-loop-delete.mk4
-rw-r--r--contrib/bmake/unit-tests/varmod-loop-varname.exp8
-rw-r--r--contrib/bmake/unit-tests/varmod-loop-varname.mk10
-rw-r--r--contrib/bmake/unit-tests/varmod-loop.exp2
-rwxr-xr-xcontrib/bmake/unit-tests/varmod-match-escape.exp6
-rwxr-xr-xcontrib/bmake/unit-tests/varmod-match-escape.mk8
-rw-r--r--contrib/bmake/unit-tests/varmod-match.exp22
-rw-r--r--contrib/bmake/unit-tests/varmod-match.mk54
-rw-r--r--contrib/bmake/unit-tests/varmod-mtime.exp12
-rw-r--r--contrib/bmake/unit-tests/varmod-mtime.mk14
-rw-r--r--contrib/bmake/unit-tests/varmod-range.exp10
-rw-r--r--contrib/bmake/unit-tests/varmod-range.mk12
-rw-r--r--contrib/bmake/unit-tests/varmod-subst-regex.exp2
-rw-r--r--contrib/bmake/unit-tests/varmod-subst.exp2
-rw-r--r--contrib/bmake/unit-tests/varmod-to-separator.exp6
-rw-r--r--contrib/bmake/unit-tests/varmod-to-separator.mk8
-rw-r--r--contrib/bmake/unit-tests/varmod.exp4
-rw-r--r--contrib/bmake/unit-tests/varmod.mk6
-rw-r--r--contrib/bmake/unit-tests/varname-dot-makeoverrides.exp6
-rw-r--r--contrib/bmake/unit-tests/varname-dot-makeoverrides.mk4
-rwxr-xr-xcontrib/bmake/unit-tests/varname-dot-shell.exp3
-rw-r--r--contrib/bmake/unit-tests/varparse-errors.exp4
-rw-r--r--contrib/bmake/unit-tests/varparse-errors.mk6
-rw-r--r--contrib/bmake/var.c172
-rw-r--r--contrib/bsddialog/CHANGELOG32
-rw-r--r--contrib/bsddialog/LICENSE2
-rw-r--r--contrib/bsddialog/Makefile12
-rw-r--r--contrib/bsddialog/README.md27
-rw-r--r--contrib/bsddialog/examples_library/gauge.c2
-rw-r--r--contrib/bsddialog/examples_library/mixedgauge.c2
-rw-r--r--contrib/bsddialog/lib/barbox.c86
-rw-r--r--contrib/bsddialog/lib/bsddialog.337
-rw-r--r--contrib/bsddialog/lib/bsddialog.h4
-rw-r--r--contrib/bsddialog/lib/datebox.c53
-rw-r--r--contrib/bsddialog/lib/formbox.c43
-rw-r--r--contrib/bsddialog/lib/lib_util.c111
-rw-r--r--contrib/bsddialog/lib/lib_util.h9
-rw-r--r--contrib/bsddialog/lib/libbsddialog.c9
-rw-r--r--contrib/bsddialog/lib/menubox.c25
-rw-r--r--contrib/bsddialog/lib/messagebox.c15
-rw-r--r--contrib/bsddialog/lib/textbox.c34
-rw-r--r--contrib/bsddialog/lib/timebox.c17
-rw-r--r--contrib/bsddialog/utility/bsddialog.183
-rw-r--r--contrib/bsddialog/utility/bsddialog.c6
-rw-r--r--contrib/bsddialog/utility/util_builders.c72
-rw-r--r--contrib/bsddialog/utility/util_theme.c12
-rw-r--r--contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c2
-rw-r--r--contrib/ldns/ldns/parse.h2
-rw-r--r--contrib/ldns/parse.c35
-rw-r--r--contrib/ldns/resolver.c53
-rw-r--r--contrib/libarchive/NEWS2
-rw-r--r--contrib/libarchive/README.md2
-rw-r--r--contrib/libarchive/cat/cmdline.c16
-rw-r--r--contrib/libarchive/cpio/cmdline.c16
-rw-r--r--contrib/libarchive/libarchive/archive.h6
-rw-r--r--contrib/libarchive/libarchive/archive_entry.h2
-rw-r--r--contrib/libarchive/libarchive/archive_entry_acl.32
-rw-r--r--contrib/libarchive/libarchive/archive_match.c18
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk.34
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_7zip.c2
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_all.c2
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_ar.c4
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_lha.c6
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_mtree.c8
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_rar.c30
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_warc.c10
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_xar.c9
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_zip.c15
-rw-r--r--contrib/libarchive/libarchive/archive_string.c96
-rw-r--r--contrib/libarchive/libarchive/archive_util.c3
-rw-r--r--contrib/libarchive/libarchive/archive_write_add_filter_zstd.c23
-rw-r--r--contrib/libarchive/libarchive/archive_write_disk_posix.c3
-rw-r--r--contrib/libarchive/libarchive/archive_write_private.h2
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_gnutar.c2
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_passphrase.c35
-rw-r--r--contrib/libarchive/libarchive/libarchive_internals.32
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.c55
-rw-r--r--contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.xar.uu12
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_appledouble.c84
-rw-r--r--contrib/libarchive/libarchive/test/test_write_disk_appledouble_zip.zip.uu27
-rw-r--r--contrib/libarchive/libarchive_fe/passphrase.c4
-rw-r--r--contrib/libarchive/tar/bsdtar.115
-rw-r--r--contrib/libarchive/tar/bsdtar.c63
-rw-r--r--contrib/libarchive/tar/cmdline.c16
-rw-r--r--contrib/libarchive/unzip/cmdline.c18
-rw-r--r--contrib/libarchive/unzip/test/test_I.c21
-rw-r--r--contrib/libcbor/.circleci/config.yml30
-rw-r--r--contrib/libcbor/.cirrus.yml26
-rw-r--r--contrib/libcbor/.readthedocs.yaml21
-rw-r--r--contrib/libcbor/CHANGELOG.md15
-rw-r--r--contrib/libcbor/CMakeLists.txt18
-rw-r--r--contrib/libcbor/CONTRIBUTING.md2
-rw-r--r--contrib/libcbor/Doxyfile2
-rw-r--r--contrib/libcbor/README.md7
-rw-r--r--contrib/libcbor/appveyor.yml14
-rw-r--r--contrib/libcbor/doc/source/api/item_types.rst2
-rw-r--r--contrib/libcbor/doc/source/conf.py18
-rw-r--r--contrib/libcbor/doc/source/development.rst6
-rw-r--r--contrib/libcbor/doc/source/index.rst8
-rw-r--r--contrib/libcbor/doc/source/internal.rst4
-rw-r--r--contrib/libcbor/doc/source/requirements.txt52
-rw-r--r--contrib/libcbor/doc/source/standard_conformance.rst (renamed from contrib/libcbor/doc/source/rfc_conformance.rst)6
-rw-r--r--contrib/libcbor/examples/CMakeLists.txt4
-rw-r--r--contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h4
-rw-r--r--contrib/libcbor/examples/cbor2cjson.c123
-rw-r--r--contrib/libcbor/examples/cjson2cbor.c4
-rw-r--r--contrib/libcbor/examples/data/all_types.cborbin0 -> 354 bytes
-rw-r--r--contrib/libcbor/examples/readfile.c2
-rwxr-xr-xcontrib/libcbor/oss-fuzz/build.sh2
-rw-r--r--contrib/libcbor/src/CMakeLists.txt21
-rw-r--r--contrib/libcbor/src/cbor.c82
-rw-r--r--contrib/libcbor/src/cbor/common.h2
-rw-r--r--contrib/libcbor/src/cbor/internal/builder_callbacks.c27
-rw-r--r--contrib/libcbor/src/cbor/internal/loaders.c2
-rw-r--r--contrib/libcbor/src/cbor/internal/memory_utils.h2
-rw-r--r--contrib/libcbor/src/cbor/internal/unicode.c6
-rw-r--r--contrib/libcbor/src/cbor/internal/unicode.h6
-rw-r--r--contrib/libcbor/src/cbor/maps.c1
-rw-r--r--contrib/libcbor/src/cbor/streaming.c43
-rw-r--r--contrib/libcbor/src/cbor/strings.c10
-rw-r--r--contrib/libcbor/src/cbor/strings.h19
-rw-r--r--contrib/libcbor/src/libcborConfig.cmake.in8
-rw-r--r--contrib/libcbor/test/callbacks_test.c25
-rw-r--r--contrib/libcbor/test/cbor_serialize_test.c32
-rw-r--r--contrib/libcbor/test/cbor_stream_decode_test.c8
-rw-r--r--contrib/libcbor/test/float_ctrl_test.c6
-rw-r--r--contrib/libcbor/test/pretty_printer_test.c197
-rw-r--r--contrib/libcbor/test/string_test.c67
-rw-r--r--contrib/libcbor/test/tag_test.c23
-rw-r--r--contrib/libcbor/test/test_allocator.c2
-rw-r--r--contrib/libcxxrt/libelftc_dem_gnu3.c2
-rw-r--r--contrib/libdiff/include/diff_main.h1
-rw-r--r--contrib/libdiff/lib/diff_atomize_text.c35
-rw-r--r--contrib/libdiff/lib/diff_main.c5
-rw-r--r--contrib/libdiff/lib/diff_output.c24
-rwxr-xr-xcontrib/libfido2/.actions/build-bsd97
-rwxr-xr-xcontrib/libfido2/.actions/build-linux-clang21
-rwxr-xr-xcontrib/libfido2/.actions/build-linux-gcc23
-rwxr-xr-xcontrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc58
-rwxr-xr-xcontrib/libfido2/.actions/build-linux-openssl3-clang33
-rwxr-xr-xcontrib/libfido2/.actions/build-linux-openssl3-gcc28
-rwxr-xr-xcontrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc59
-rwxr-xr-xcontrib/libfido2/.actions/build-osx-clang19
-rwxr-xr-xcontrib/libfido2/.actions/fuzz-linux93
-rw-r--r--contrib/libfido2/.actions/llvm.gpg52
-rwxr-xr-xcontrib/libfido2/.actions/setup_clang17
-rw-r--r--contrib/libfido2/.gitattributes1
-rw-r--r--contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md80
-rw-r--r--contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml8
-rw-r--r--contrib/libfido2/.github/workflows/alpine_builds.yml39
-rw-r--r--contrib/libfido2/.github/workflows/bsd_builds.yml32
-rw-r--r--contrib/libfido2/.github/workflows/cifuzz_oss.yml46
-rw-r--r--contrib/libfido2/.github/workflows/codeql-analysis.yml42
-rw-r--r--contrib/libfido2/.github/workflows/cygwin_builds.yml30
-rw-r--r--contrib/libfido2/.github/workflows/linux_builds.yml57
-rw-r--r--contrib/libfido2/.github/workflows/linux_fuzz.yml41
-rw-r--r--contrib/libfido2/.github/workflows/macos_builds.yml32
-rw-r--r--contrib/libfido2/.github/workflows/openssl3.yml51
-rw-r--r--contrib/libfido2/.github/workflows/windows_builds.yml32
-rw-r--r--contrib/libfido2/.gitignore9
-rw-r--r--contrib/libfido2/CMakeLists.txt4
-rw-r--r--contrib/libfido2/NEWS10
-rw-r--r--contrib/libfido2/README.adoc2
-rw-r--r--contrib/libfido2/examples/README.adoc5
-rw-r--r--contrib/libfido2/examples/cred.c30
-rw-r--r--contrib/libfido2/fuzz/Dockerfile2
-rw-r--r--contrib/libfido2/fuzz/Makefile2
-rw-r--r--contrib/libfido2/fuzz/export.gnu2
-rw-r--r--contrib/libfido2/fuzz/functions.txt63
-rw-r--r--contrib/libfido2/fuzz/fuzz_assert.c4
-rw-r--r--contrib/libfido2/fuzz/report.tgzbin357005 -> 361946 bytes
-rw-r--r--contrib/libfido2/fuzz/summary.txt18
-rw-r--r--contrib/libfido2/man/CMakeLists.txt3
-rw-r--r--contrib/libfido2/man/fido2-assert.113
-rw-r--r--contrib/libfido2/man/fido2-cred.113
-rw-r--r--contrib/libfido2/man/fido_assert_new.314
-rw-r--r--contrib/libfido2/man/fido_assert_set_authdata.359
-rw-r--r--contrib/libfido2/regress/assert.c50
-rw-r--r--contrib/libfido2/regress/cred.c18
-rw-r--r--contrib/libfido2/regress/eddsa.c2
-rw-r--r--contrib/libfido2/src/assert.c68
-rw-r--r--contrib/libfido2/src/export.gnu3
-rw-r--r--contrib/libfido2/src/export.llvm3
-rw-r--r--contrib/libfido2/src/export.msvc3
-rw-r--r--contrib/libfido2/src/fido.h4
-rw-r--r--contrib/libfido2/src/fido/types.h2
-rw-r--r--contrib/libfido2/src/webauthn.h177
-rw-r--r--contrib/libfido2/src/winhello.c63
-rw-r--r--contrib/libfido2/tools/assert_get.c19
-rw-r--r--contrib/libfido2/tools/cred_make.c20
-rw-r--r--contrib/libfido2/tools/extern.h19
-rw-r--r--contrib/libfido2/tools/fido2-assert.c4
-rw-r--r--contrib/libfido2/tools/fido2-cred.c4
-rw-r--r--contrib/libfido2/udev/70-u2f.rules32
-rw-r--r--contrib/libfido2/udev/fidodevs16
-rw-r--r--contrib/libfido2/windows/build.ps11
-rw-r--r--contrib/libfido2/windows/const.ps116
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp25
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp5
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp34
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp14
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h3
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CoverageMappingGen.cpp11
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp12
-rw-r--r--contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp3
-rw-r--r--contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp8
-rw-r--r--contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp10
-rw-r--r--contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp47
-rw-r--r--contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp2
-rw-r--r--contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.cpp24
-rw-r--r--contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.h5
-rw-r--r--contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp25
-rw-r--r--contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp14
-rw-r--r--contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp6
-rw-r--r--contrib/llvm-project/libcxx/modules/std.compat/cstdlib.inc2
-rw-r--r--contrib/llvm-project/libcxx/src/atomic.cpp16
-rw-r--r--contrib/llvm-project/libcxx/src/chrono.cpp4
-rw-r--r--contrib/llvm-project/lld/ELF/Relocations.cpp5
-rw-r--r--contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h20
-rw-r--r--contrib/llvm-project/llvm/include/llvm/CodeGen/MachineFrameInfo.h7
-rw-r--r--contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp4
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp4
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp4
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp48
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp9
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp16
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td10
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp6
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp1
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp5
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.h11
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp10
-rw-r--r--contrib/llvm-project/llvm/lib/Target/AMDGPU/SOPInstructions.td2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp57
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp8
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h1
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp2
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp5
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h5
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp32
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp5
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFeatures.td5
-rw-r--r--contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp11
-rw-r--r--contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp65
-rw-r--r--contrib/llvm-project/llvm/lib/Target/X86/X86.td6
-rw-r--r--contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp7
-rw-r--r--contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp35
-rw-r--r--contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td42
-rw-r--r--contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h3
-rw-r--r--contrib/llvm-project/llvm/lib/TargetParser/Host.cpp6
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/IPO/FunctionAttrs.cpp7
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp16
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp3
-rw-r--r--contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp21
-rw-r--r--contrib/llvm-project/openmp/runtime/src/kmp_settings.cpp2
-rw-r--r--contrib/llvm-project/openmp/runtime/src/z_Linux_util.cpp6
-rw-r--r--contrib/mandoc/config.h2
-rw-r--r--contrib/netbsd-tests/lib/libc/ssp/h_gets.c3
-rw-r--r--contrib/ntp/COPYRIGHT4
-rw-r--r--contrib/ntp/ChangeLog120
-rw-r--r--contrib/ntp/CommitLog3221
-rw-r--r--contrib/ntp/Makefile.am6
-rw-r--r--contrib/ntp/Makefile.in7
-rw-r--r--contrib/ntp/NEWS3902
-rw-r--r--contrib/ntp/adjtimed/Makefile.in13
-rw-r--r--contrib/ntp/check-libntp.mf10
-rw-r--r--contrib/ntp/check-libntpd.mf13
-rw-r--r--contrib/ntp/check-libunity.mf4
-rw-r--r--contrib/ntp/check-scm-rev.mf6
-rw-r--r--contrib/ntp/clockstuff/Makefile.in13
-rw-r--r--contrib/ntp/config.h.in44
-rwxr-xr-xcontrib/ntp/configure2726
-rw-r--r--contrib/ntp/configure.ac81
-rwxr-xr-xcontrib/ntp/flock-build22
-rw-r--r--contrib/ntp/html/.datecheck0
-rw-r--r--contrib/ntp/html/clockopt.html9
-rw-r--r--contrib/ntp/html/copyright.html4
-rw-r--r--contrib/ntp/html/release.html2
-rw-r--r--contrib/ntp/include/Makefile.am1
-rw-r--r--contrib/ntp/include/Makefile.in2
-rw-r--r--contrib/ntp/include/c99_snprintf.h28
-rw-r--r--contrib/ntp/include/isc/Makefile.in1
-rw-r--r--contrib/ntp/include/lib_strbuf.h30
-rw-r--r--contrib/ntp/include/ntp.h73
-rw-r--r--contrib/ntp/include/ntp_config.h13
-rw-r--r--contrib/ntp/include/ntp_control.h2
-rw-r--r--contrib/ntp/include/ntp_lists.h4
-rw-r--r--contrib/ntp/include/ntp_md5.h25
-rw-r--r--contrib/ntp/include/ntp_net.h13
-rw-r--r--contrib/ntp/include/ntp_psl.h11
-rw-r--r--contrib/ntp/include/ntp_stdlib.h20
-rw-r--r--contrib/ntp/include/ntp_tty.h5
-rw-r--r--contrib/ntp/include/ntp_types.h10
-rw-r--r--contrib/ntp/include/ntpd.h80
-rw-r--r--contrib/ntp/include/vint64ops.h2
-rw-r--r--contrib/ntp/kernel/Makefile.in1
-rw-r--r--contrib/ntp/kernel/sys/Makefile.in1
-rw-r--r--contrib/ntp/libntp/Makefile.am1
-rw-r--r--contrib/ntp/libntp/Makefile.in76
-rw-r--r--contrib/ntp/libntp/a_md5encrypt.c169
-rw-r--r--contrib/ntp/libntp/adjtime.c2
-rw-r--r--contrib/ntp/libntp/audio.c2
-rw-r--r--contrib/ntp/libntp/authkeys.c4
-rw-r--r--contrib/ntp/libntp/authreadkeys.c12
-rw-r--r--contrib/ntp/libntp/bsd_strerror.c2
-rw-r--r--contrib/ntp/libntp/clocktypes.c1
-rw-r--r--contrib/ntp/libntp/dofptoa.c2
-rw-r--r--contrib/ntp/libntp/dolfptoa.c2
-rw-r--r--contrib/ntp/libntp/humandate.c1
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/strerror.c64
-rw-r--r--contrib/ntp/libntp/lib_strbuf.c51
-rw-r--r--contrib/ntp/libntp/machines.c60
-rw-r--r--contrib/ntp/libntp/modetoa.c1
-rw-r--r--contrib/ntp/libntp/msyslog.c6
-rw-r--r--contrib/ntp/libntp/netof.c24
-rw-r--r--contrib/ntp/libntp/ntp_calendar.c1
-rw-r--r--contrib/ntp/libntp/ntp_intres.c6
-rw-r--r--contrib/ntp/libntp/ntp_realpath.c43
-rw-r--r--contrib/ntp/libntp/numtoa.c64
-rw-r--r--contrib/ntp/libntp/numtohost.c43
-rw-r--r--contrib/ntp/libntp/prettydate.c1
-rw-r--r--contrib/ntp/libntp/recvbuff.c39
-rw-r--r--contrib/ntp/libntp/refnumtoa.c1
-rw-r--r--contrib/ntp/libntp/snprintf.c2
-rw-r--r--contrib/ntp/libntp/socket.c16
-rw-r--r--contrib/ntp/libntp/socktoa.c1
-rw-r--r--contrib/ntp/libntp/socktohost.c1
-rw-r--r--contrib/ntp/libntp/ssl_init.c74
-rw-r--r--contrib/ntp/libntp/statestr.c1
-rw-r--r--contrib/ntp/libntp/systime.c1
-rw-r--r--contrib/ntp/libntp/timexsup.c22
-rw-r--r--contrib/ntp/libntp/uglydate.c1
-rw-r--r--contrib/ntp/libntp/vint64ops.c21
-rw-r--r--contrib/ntp/libntp/work_thread.c17
-rw-r--r--contrib/ntp/libparse/Makefile.am15
-rw-r--r--contrib/ntp/libparse/Makefile.in30
-rw-r--r--contrib/ntp/libparse/clk_computime.c2
-rw-r--r--contrib/ntp/libparse/clk_dcf7000.c2
-rw-r--r--contrib/ntp/libparse/clk_hopf6021.c2
-rw-r--r--contrib/ntp/libparse/clk_meinberg.c2
-rw-r--r--contrib/ntp/libparse/clk_rawdcf.c2
-rw-r--r--contrib/ntp/libparse/clk_rcc8000.c2
-rw-r--r--contrib/ntp/libparse/clk_schmid.c2
-rw-r--r--contrib/ntp/libparse/clk_sel240x.c2
-rw-r--r--contrib/ntp/libparse/clk_trimtaip.c2
-rw-r--r--contrib/ntp/libparse/clk_trimtsip.c2
-rw-r--r--contrib/ntp/libparse/clk_varitext.c2
-rw-r--r--contrib/ntp/libparse/clk_wharton.c2
-rw-r--r--contrib/ntp/libparse/ieee754io.c25
-rw-r--r--contrib/ntp/libparse/parse.c2
-rw-r--r--contrib/ntp/libparse/parse_conf.c2
-rw-r--r--contrib/ntp/ntpd/Makefile.in20
-rw-r--r--contrib/ntp/ntpd/cmd_args.c18
-rw-r--r--contrib/ntp/ntpd/complete.conf.in43
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.conf.texi99
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.keys.texi2
-rw-r--r--contrib/ntp/ntpd/invoke-ntpd.texi4
-rw-r--r--contrib/ntp/ntpd/keyword-gen-utd2
-rw-r--r--contrib/ntp/ntpd/keyword-gen.c2
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5man106
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5mdoc106
-rw-r--r--contrib/ntp/ntpd/ntp.conf.def100
-rw-r--r--contrib/ntp/ntpd/ntp.conf.html102
-rw-r--r--contrib/ntp/ntpd/ntp.conf.man.in106
-rw-r--r--contrib/ntp/ntpd/ntp.conf.mdoc.in106
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5man6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5mdoc6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.html2
-rw-r--r--contrib/ntp/ntpd/ntp.keys.man.in6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.mdoc.in6
-rw-r--r--contrib/ntp/ntpd/ntp_config.c696
-rw-r--r--contrib/ntp/ntpd/ntp_control.c68
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c134
-rw-r--r--contrib/ntp/ntpd/ntp_io.c927
-rw-r--r--contrib/ntp/ntpd/ntp_keyword.h2078
-rw-r--r--contrib/ntp/ntpd/ntp_leapsec.c78
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c16
-rw-r--r--contrib/ntp/ntpd/ntp_monitor.c21
-rw-r--r--contrib/ntp/ntpd/ntp_parser.c3279
-rw-r--r--contrib/ntp/ntpd/ntp_parser.h752
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c202
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c334
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c58
-rw-r--r--contrib/ntp/ntpd/ntp_request.c15
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c725
-rw-r--r--contrib/ntp/ntpd/ntp_scanner.c22
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c303
-rw-r--r--contrib/ntp/ntpd/ntp_util.c249
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.c20
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.h8
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdman6
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdmdoc6
-rw-r--r--contrib/ntp/ntpd/ntpd.c101
-rw-r--r--contrib/ntp/ntpd/ntpd.html4
-rw-r--r--contrib/ntp/ntpd/ntpd.man.in6
-rw-r--r--contrib/ntp/ntpd/ntpd.mdoc.in6
-rw-r--r--contrib/ntp/ntpd/refclock_acts.c2
-rw-r--r--contrib/ntp/ntpd/refclock_arbiter.c2
-rw-r--r--contrib/ntp/ntpd/refclock_arc.c13
-rw-r--r--contrib/ntp/ntpd/refclock_as2201.c2
-rw-r--r--contrib/ntp/ntpd/refclock_atom.c2
-rw-r--r--contrib/ntp/ntpd/refclock_bancomm.c2
-rw-r--r--contrib/ntp/ntpd/refclock_chronolog.c2
-rw-r--r--contrib/ntp/ntpd/refclock_conf.c2
-rw-r--r--contrib/ntp/ntpd/refclock_dumbclock.c2
-rw-r--r--contrib/ntp/ntpd/refclock_fg.c2
-rw-r--r--contrib/ntp/ntpd/refclock_gpsvme.c2
-rw-r--r--contrib/ntp/ntpd/refclock_heath.c2
-rw-r--r--contrib/ntp/ntpd/refclock_hopfpci.c2
-rw-r--r--contrib/ntp/ntpd/refclock_hopfser.c2
-rw-r--r--contrib/ntp/ntpd/refclock_hpgps.c2
-rw-r--r--contrib/ntp/ntpd/refclock_irig.c2
-rw-r--r--contrib/ntp/ntpd/refclock_jjy.c2
-rw-r--r--contrib/ntp/ntpd/refclock_jupiter.c2
-rw-r--r--contrib/ntp/ntpd/refclock_local.c2
-rw-r--r--contrib/ntp/ntpd/refclock_mx4200.c2
-rw-r--r--contrib/ntp/ntpd/refclock_neoclock4x.c2
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c2
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c2
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c2
-rw-r--r--contrib/ntp/ntpd/refclock_pcf.c2
-rw-r--r--contrib/ntp/ntpd/refclock_pst.c2
-rw-r--r--contrib/ntp/ntpd/refclock_ripencc.c2
-rw-r--r--contrib/ntp/ntpd/refclock_tpro.c2
-rw-r--r--contrib/ntp/ntpd/refclock_true.c2
-rw-r--r--contrib/ntp/ntpd/refclock_tsyncpci.c2
-rw-r--r--contrib/ntp/ntpd/refclock_tt560.c2
-rw-r--r--contrib/ntp/ntpd/refclock_ulink.c2
-rw-r--r--contrib/ntp/ntpd/refclock_wwv.c2
-rw-r--r--contrib/ntp/ntpd/refclock_wwvb.c2
-rw-r--r--contrib/ntp/ntpd/refclock_zyfer.c2
-rw-r--r--contrib/ntp/ntpdate/Makefile.in18
-rw-r--r--contrib/ntp/ntpdc/Makefile.in18
-rw-r--r--contrib/ntp/ntpdc/invoke-ntpdc.texi4
-rwxr-xr-xcontrib/ntp/ntpdc/nl.pl1
-rw-r--r--contrib/ntp/ntpdc/nl.pl.in1
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.c20
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.h8
-rw-r--r--contrib/ntp/ntpdc/ntpdc.1ntpdcman6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.html4
-rw-r--r--contrib/ntp/ntpdc/ntpdc.man.in6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.mdoc.in6
-rw-r--r--contrib/ntp/ntpq/Makefile.in18
-rw-r--r--contrib/ntp/ntpq/invoke-ntpq.texi4
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.c20
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.h8
-rw-r--r--contrib/ntp/ntpq/ntpq-subs.c41
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqman6
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqmdoc6
-rw-r--r--contrib/ntp/ntpq/ntpq.c25
-rw-r--r--contrib/ntp/ntpq/ntpq.h1
-rw-r--r--contrib/ntp/ntpq/ntpq.html4
-rw-r--r--contrib/ntp/ntpq/ntpq.man.in6
-rw-r--r--contrib/ntp/ntpq/ntpq.mdoc.in6
-rw-r--r--contrib/ntp/ntpsnmpd/Makefile.am8
-rw-r--r--contrib/ntp/ntpsnmpd/Makefile.in22
-rw-r--r--contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi4
-rw-r--r--contrib/ntp/ntpsnmpd/netsnmp_daemonize.c18
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c20
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h8
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman6
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc6
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.html2
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.man.in6
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in6
-rw-r--r--contrib/ntp/packageinfo.sh4
-rw-r--r--contrib/ntp/parseutil/Makefile.in1
-rw-r--r--contrib/ntp/scripts/Makefile.in1
-rw-r--r--contrib/ntp/scripts/build/Makefile.in1
-rwxr-xr-xcontrib/ntp/scripts/build/checkHtmlFileDates24
-rw-r--r--contrib/ntp/scripts/build/genAuthors.in1
-rw-r--r--contrib/ntp/scripts/build/mkver.in2
-rw-r--r--contrib/ntp/scripts/calc_tickadj/Makefile.in1
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.html2
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.in1
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi2
-rw-r--r--contrib/ntp/scripts/invoke-plot_summary.texi4
-rw-r--r--contrib/ntp/scripts/invoke-summary.texi4
-rw-r--r--contrib/ntp/scripts/lib/Makefile.in1
-rw-r--r--contrib/ntp/scripts/ntp-wait/Makefile.in1
-rw-r--r--contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait-opts4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.html4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.in1
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.man.in4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntpsweep/Makefile.in1
-rw-r--r--contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep-opts4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.html4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.in1
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.man.in4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntptrace/Makefile.in1
-rw-r--r--contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace-opts4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.html4
-rwxr-xr-xcontrib/ntp/scripts/ntptrace/ntptrace.in11
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.man.in4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntpver.in3
-rw-r--r--contrib/ntp/scripts/plot_summary-opts4
-rw-r--r--contrib/ntp/scripts/plot_summary.1plot_summaryman4
-rw-r--r--contrib/ntp/scripts/plot_summary.1plot_summarymdoc4
-rw-r--r--contrib/ntp/scripts/plot_summary.html4
-rw-r--r--contrib/ntp/scripts/plot_summary.in1
-rw-r--r--contrib/ntp/scripts/plot_summary.man.in4
-rw-r--r--contrib/ntp/scripts/plot_summary.mdoc.in4
-rw-r--r--contrib/ntp/scripts/summary-opts4
-rw-r--r--contrib/ntp/scripts/summary.1summaryman4
-rw-r--r--contrib/ntp/scripts/summary.1summarymdoc4
-rw-r--r--contrib/ntp/scripts/summary.html4
-rw-r--r--contrib/ntp/scripts/summary.in1
-rw-r--r--contrib/ntp/scripts/summary.man.in4
-rw-r--r--contrib/ntp/scripts/summary.mdoc.in4
-rw-r--r--contrib/ntp/scripts/update-leap/Makefile.in1
-rw-r--r--contrib/ntp/scripts/update-leap/invoke-update-leap.texi2
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap-opts4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.1update-leapman4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.html2
-rwxr-xr-xcontrib/ntp/scripts/update-leap/update-leap.in1
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.man.in4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.mdoc.in4
-rw-r--r--contrib/ntp/sntp/COPYRIGHT4
-rw-r--r--contrib/ntp/sntp/Makefile.am3
-rw-r--r--contrib/ntp/sntp/Makefile.in17
-rw-r--r--contrib/ntp/sntp/aclocal.m41
-rw-r--r--contrib/ntp/sntp/check-libntp.mf10
-rw-r--r--contrib/ntp/sntp/check-libsntp.mf8
-rw-r--r--contrib/ntp/sntp/check-libunity.mf3
-rw-r--r--contrib/ntp/sntp/config.h.in41
-rwxr-xr-xcontrib/ntp/sntp/configure2864
-rw-r--r--contrib/ntp/sntp/configure.ac8
-rw-r--r--contrib/ntp/sntp/crypto.c72
-rw-r--r--contrib/ntp/sntp/crypto.h15
-rw-r--r--contrib/ntp/sntp/include/Makefile.in2
-rw-r--r--contrib/ntp/sntp/include/copyright.def2
-rw-r--r--contrib/ntp/sntp/include/version.def2
-rw-r--r--contrib/ntp/sntp/include/version.texi6
-rw-r--r--contrib/ntp/sntp/invoke-sntp.texi4
-rw-r--r--contrib/ntp/sntp/libevent/Makefile.in3
-rwxr-xr-xcontrib/ntp/sntp/libevent/configure8
-rw-r--r--contrib/ntp/sntp/libevent/configure.ac7
-rw-r--r--contrib/ntp/sntp/libevent/kqueue.c2
-rw-r--r--contrib/ntp/sntp/libevent/m4/acx_pthread.m42
-rw-r--r--contrib/ntp/sntp/libopts/Makefile.am4
-rw-r--r--contrib/ntp/sntp/libopts/Makefile.in23
-rw-r--r--contrib/ntp/sntp/m4/ntp_compiler.m468
-rw-r--r--contrib/ntp/sntp/m4/ntp_crypto_rand.m437
-rw-r--r--contrib/ntp/sntp/m4/ntp_facilitynames.m433
-rw-r--r--contrib/ntp/sntp/m4/ntp_libevent.m410
-rw-r--r--contrib/ntp/sntp/m4/ntp_libntp.m489
-rw-r--r--contrib/ntp/sntp/m4/ntp_openssl.m4827
-rw-r--r--contrib/ntp/sntp/m4/version.m42
-rw-r--r--contrib/ntp/sntp/main.c20
-rw-r--r--contrib/ntp/sntp/scm-rev2
-rw-r--r--contrib/ntp/sntp/scripts/Makefile.in2
-rwxr-xr-xcontrib/ntp/sntp/scripts/cvo.sh8
-rw-r--r--contrib/ntp/sntp/sntp-opts.c20
-rw-r--r--contrib/ntp/sntp/sntp-opts.h8
-rw-r--r--contrib/ntp/sntp/sntp.1sntpman6
-rw-r--r--contrib/ntp/sntp/sntp.1sntpmdoc6
-rw-r--r--contrib/ntp/sntp/sntp.html4
-rw-r--r--contrib/ntp/sntp/sntp.man.in6
-rw-r--r--contrib/ntp/sntp/sntp.mdoc.in6
-rw-r--r--contrib/ntp/sntp/tests/Makefile.in23
-rw-r--r--contrib/ntp/sntp/tests/crypto.c235
-rw-r--r--contrib/ntp/sntp/tests/fileHandlingTest.h.in8
-rw-r--r--contrib/ntp/sntp/tests/packetHandling.c50
-rw-r--r--contrib/ntp/sntp/tests/packetProcessing.c168
-rw-r--r--contrib/ntp/sntp/tests/run-crypto.c20
-rw-r--r--contrib/ntp/sntp/tests/run-packetProcessing.c40
-rw-r--r--contrib/ntp/sntp/unity/Makefile.in2
-rw-r--r--contrib/ntp/sntp/unity/unity_internals.h10
-rw-r--r--contrib/ntp/sntp/utilities.h1
-rw-r--r--contrib/ntp/tests/libntp/data/ntp.keys23
-rw-r--r--contrib/ntp/tests/libntp/digests.c125
-rw-r--r--contrib/ntp/tests/libntp/run-digests.c6
-rw-r--r--contrib/ntp/util/Makefile.am4
-rw-r--r--contrib/ntp/util/Makefile.in62
-rw-r--r--contrib/ntp/util/invoke-ntp-keygen.texi4
-rw-r--r--contrib/ntp/util/lsf-times.c220
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.c20
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.h8
-rw-r--r--contrib/ntp/util/ntp-keygen.1ntp-keygenman6
-rw-r--r--contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc6
-rw-r--r--contrib/ntp/util/ntp-keygen.c55
-rw-r--r--contrib/ntp/util/ntp-keygen.html4
-rw-r--r--contrib/ntp/util/ntp-keygen.man.in6
-rw-r--r--contrib/ntp/util/ntp-keygen.mdoc.in6
-rw-r--r--contrib/ofed/libibverbs/libibverbs.map2
-rw-r--r--contrib/one-true-awk/FIXES14
-rw-r--r--contrib/one-true-awk/b.c34
-rwxr-xr-xcontrib/one-true-awk/bugs-fixed/REGRESS2
-rw-r--r--contrib/one-true-awk/bugs-fixed/system-status.ok23
-rw-r--r--contrib/one-true-awk/main.c2
-rw-r--r--contrib/one-true-awk/run.c4
-rw-r--r--contrib/pf/authpf/authpf.84
-rw-r--r--contrib/pf/authpf/authpf.c20
-rw-r--r--contrib/pf/ftp-proxy/filter.c23
-rw-r--r--contrib/pf/tftp-proxy/filter.c25
-rw-r--r--contrib/unbound/Makefile.in16
-rw-r--r--contrib/unbound/ax_pkg_swig.m4 (renamed from contrib/unbound/ac_pkg_swig.m4)110
-rw-r--r--contrib/unbound/ax_pthread.m4444
-rw-r--r--contrib/unbound/cachedb/cachedb.c133
-rw-r--r--contrib/unbound/cachedb/cachedb.h16
-rw-r--r--contrib/unbound/config.h.in105
-rwxr-xr-xcontrib/unbound/configure12450
-rw-r--r--contrib/unbound/configure.ac16
-rwxr-xr-xcontrib/unbound/configure~26616
-rwxr-xr-xcontrib/unbound/contrib/rc_d_unbound9
-rw-r--r--contrib/unbound/contrib/unbound.init1
-rw-r--r--contrib/unbound/contrib/unbound.init_fedora1
-rw-r--r--contrib/unbound/contrib/unbound.init_yocto1
-rw-r--r--contrib/unbound/daemon/cachedump.c23
-rw-r--r--contrib/unbound/daemon/daemon.c26
-rw-r--r--contrib/unbound/daemon/remote.c130
-rw-r--r--contrib/unbound/daemon/unbound.c39
-rw-r--r--contrib/unbound/daemon/worker.c35
-rw-r--r--contrib/unbound/doc/Changelog187
-rw-r--r--contrib/unbound/doc/README2
-rw-r--r--contrib/unbound/doc/example.conf.in28
-rw-r--r--contrib/unbound/doc/libunbound.3.in4
-rw-r--r--contrib/unbound/doc/unbound-anchor.8.in2
-rw-r--r--contrib/unbound/doc/unbound-checkconf.8.in6
-rw-r--r--contrib/unbound/doc/unbound-control.8.in8
-rw-r--r--contrib/unbound/doc/unbound-host.1.in2
-rw-r--r--contrib/unbound/doc/unbound.8.in4
-rw-r--r--contrib/unbound/doc/unbound.conf.5.in72
-rw-r--r--contrib/unbound/doc/unbound.doxygen2931
-rw-r--r--contrib/unbound/edns-subnet/subnetmod.c40
-rw-r--r--contrib/unbound/iterator/iter_fwd.c119
-rw-r--r--contrib/unbound/iterator/iter_fwd.h60
-rw-r--r--contrib/unbound/iterator/iter_hints.c95
-rw-r--r--contrib/unbound/iterator/iter_hints.h54
-rw-r--r--contrib/unbound/iterator/iter_utils.c62
-rw-r--r--contrib/unbound/iterator/iter_utils.h6
-rw-r--r--contrib/unbound/iterator/iterator.c295
-rw-r--r--contrib/unbound/libunbound/context.c8
-rw-r--r--contrib/unbound/libunbound/libunbound.c5
-rw-r--r--contrib/unbound/libunbound/libworker.c21
-rw-r--r--contrib/unbound/services/authzone.c10
-rw-r--r--contrib/unbound/services/cache/dns.c52
-rw-r--r--contrib/unbound/services/cache/infra.c170
-rw-r--r--contrib/unbound/services/cache/infra.h28
-rw-r--r--contrib/unbound/services/cache/rrset.c87
-rw-r--r--contrib/unbound/services/cache/rrset.h31
-rw-r--r--contrib/unbound/services/listen_dnsport.c51
-rw-r--r--contrib/unbound/services/listen_dnsport.h8
-rw-r--r--contrib/unbound/services/localzone.c6
-rw-r--r--contrib/unbound/services/mesh.c106
-rw-r--r--contrib/unbound/services/mesh.h6
-rw-r--r--contrib/unbound/services/rpz.c342
-rw-r--r--contrib/unbound/services/rpz.h8
-rw-r--r--contrib/unbound/services/view.h3
-rw-r--r--contrib/unbound/smallapp/unbound-anchor.c70
-rw-r--r--contrib/unbound/smallapp/unbound-checkconf.c13
-rw-r--r--contrib/unbound/smallapp/unbound-control.c5
-rw-r--r--contrib/unbound/testdata/cachedb_expired.crpl324
-rw-r--r--contrib/unbound/testdata/cachedb_expired_client_timeout.crpl343
-rw-r--r--contrib/unbound/testdata/cachedb_expired_reply_ttl.crpl259
-rw-r--r--contrib/unbound/testdata/cachedb_subnet_change.crpl304
-rw-r--r--contrib/unbound/testdata/cachedb_subnet_expired.crpl322
-rw-r--r--contrib/unbound/testdata/cachedb_subnet_toecs_timeout.crpl229
-rw-r--r--contrib/unbound/testdata/iter_dname_ttl.rpl39
-rw-r--r--contrib/unbound/testdata/iter_ghost_grandchild_delegation.rpl256
-rw-r--r--contrib/unbound/testdata/local_cnameother.rpl67
-rw-r--r--contrib/unbound/testdata/rpz_clientip_override.rpl269
-rw-r--r--contrib/unbound/testdata/rpz_cname_handle.rpl779
-rw-r--r--contrib/unbound/testdata/rpz_nsdname_override.rpl325
-rw-r--r--contrib/unbound/testdata/rpz_nsip_override.rpl332
-rw-r--r--contrib/unbound/testdata/rpz_passthru_clientip.rpl90
-rw-r--r--contrib/unbound/testdata/rpz_qtype_cname.rpl120
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/example.org.zone2
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/rpz.example.com.zone6
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.conf30
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.dsc16
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.post12
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.pre26
-rw-r--r--contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.test109
-rw-r--r--contrib/unbound/testdata/subnet_cached_size.crpl308
-rw-r--r--contrib/unbound/testdata/ttl_max_negative.rpl206
-rw-r--r--contrib/unbound/testdata/ttl_min_negative.rpl204
-rw-r--r--contrib/unbound/testdata/val_cnameqtype_qmin.rpl784
-rw-r--r--contrib/unbound/testdata/val_dnameqtype.rpl689
-rw-r--r--contrib/unbound/testdata/val_dnameqtype_qmin.rpl859
-rw-r--r--contrib/unbound/util/config_file.c39
-rw-r--r--contrib/unbound/util/config_file.h19
-rw-r--r--contrib/unbound/util/configlexer.c8195
-rw-r--r--contrib/unbound/util/configlexer.lex7
-rw-r--r--contrib/unbound/util/configparser.c4502
-rw-r--r--contrib/unbound/util/configparser.h508
-rw-r--r--contrib/unbound/util/configparser.y83
-rw-r--r--contrib/unbound/util/data/msgparse.h2
-rw-r--r--contrib/unbound/util/data/msgreply.c33
-rw-r--r--contrib/unbound/util/module.c11
-rw-r--r--contrib/unbound/util/module.h18
-rw-r--r--contrib/unbound/util/net_help.c36
-rw-r--r--contrib/unbound/util/netevent.c8
-rw-r--r--contrib/unbound/util/netevent.h2
-rw-r--r--contrib/unbound/util/storage/lookup3.c2
-rw-r--r--contrib/unbound/util/storage/lruhash.c34
-rw-r--r--contrib/unbound/util/storage/lruhash.h11
-rw-r--r--contrib/unbound/util/storage/slabhash.c7
-rw-r--r--contrib/unbound/util/storage/slabhash.h12
-rw-r--r--contrib/unbound/validator/val_utils.c40
-rw-r--r--contrib/unbound/validator/validator.c36
-rw-r--r--contrib/wpa/src/drivers/driver_bsd.c12
-rw-r--r--etc/mtree/BSD.include.dist4
-rw-r--r--etc/mtree/BSD.tests.dist2
-rw-r--r--etc/mtree/BSD.var.dist2
-rw-r--r--include/Makefile8
-rw-r--r--include/endian.h26
-rw-r--r--include/paths.h1
-rw-r--r--include/ssp/Makefile4
-rw-r--r--include/ssp/ssp.h91
-rw-r--r--include/ssp/stdio.h87
-rw-r--r--include/ssp/string.h129
-rw-r--r--include/ssp/strings.h67
-rw-r--r--include/ssp/unistd.h58
-rw-r--r--include/stdio.h3
-rw-r--r--include/string.h3
-rw-r--r--include/strings.h3
-rw-r--r--include/sysexits.h7
-rw-r--r--include/unistd.h4
-rw-r--r--lib/Makefile1
-rw-r--r--lib/clang/include/VCSVersion.inc6
-rw-r--r--lib/clang/include/clang/Basic/Version.inc6
-rw-r--r--lib/clang/include/lld/Common/Version.inc2
-rw-r--r--lib/clang/include/lldb/Version/Version.inc6
-rw-r--r--lib/clang/include/llvm/Config/AsmParsers.def3
-rw-r--r--lib/clang/include/llvm/Config/AsmPrinters.def3
-rw-r--r--lib/clang/include/llvm/Config/Disassemblers.def3
-rw-r--r--lib/clang/include/llvm/Config/Targets.def3
-rw-r--r--lib/clang/include/llvm/Config/config.h4
-rw-r--r--lib/clang/include/llvm/Config/llvm-config.h8
-rw-r--r--lib/clang/include/llvm/Support/VCSRevision.h2
-rw-r--r--lib/csu/aarch64/crt1_s.S4
-rw-r--r--lib/geom/eli/geli.82
-rw-r--r--lib/geom/label/glabel.830
-rw-r--r--lib/geom/shsec/gshsec.81
-rw-r--r--lib/libarchive/Makefile.inc3
-rw-r--r--lib/libarchive/tests/Makefile3
-rw-r--r--lib/libauditd/Makefile1
-rw-r--r--lib/libbsm/Makefile6
-rw-r--r--lib/libc/Makefile2
-rw-r--r--lib/libc/amd64/string/bcopy.c2
-rw-r--r--lib/libc/amd64/string/bzero.c2
-rw-r--r--lib/libc/amd64/string/strncat.c2
-rw-r--r--lib/libc/amd64/string/strncpy.c2
-rw-r--r--lib/libc/gen/dlopen.36
-rw-r--r--lib/libc/gen/exec.32
-rw-r--r--lib/libc/gen/getcwd.c3
-rw-r--r--lib/libc/net/sctp_recvmsg.36
-rw-r--r--lib/libc/posix1e/posix1e.34
-rw-r--r--lib/libc/regex/regcomp.c20
-rw-r--r--lib/libc/rpc/Symbol.map31
-rw-r--r--lib/libc/secure/Makefile.inc11
-rw-r--r--lib/libc/secure/Symbol.map17
-rw-r--r--lib/libc/secure/fgets_chk.c54
-rw-r--r--lib/libc/secure/memcpy_chk.c53
-rw-r--r--lib/libc/secure/memmove_chk.c47
-rw-r--r--lib/libc/secure/memset_chk.c46
-rw-r--r--lib/libc/secure/snprintf_chk.c56
-rw-r--r--lib/libc/secure/sprintf_chk.c61
-rw-r--r--lib/libc/secure/ssp_internal.h37
-rw-r--r--lib/libc/secure/stpcpy_chk.c55
-rw-r--r--lib/libc/secure/stpncpy_chk.c53
-rw-r--r--lib/libc/secure/strcat_chk.c60
-rw-r--r--lib/libc/secure/strcpy_chk.c54
-rw-r--r--lib/libc/secure/strncat_chk.c70
-rw-r--r--lib/libc/secure/strncpy_chk.c53
-rw-r--r--lib/libc/secure/vsnprintf_chk.c49
-rw-r--r--lib/libc/secure/vsprintf_chk.c58
-rw-r--r--lib/libc/stdio/fgets.c2
-rw-r--r--lib/libc/stdio/snprintf.c2
-rw-r--r--lib/libc/stdio/sprintf.c2
-rw-r--r--lib/libc/stdio/vsnprintf.c2
-rw-r--r--lib/libc/stdio/vsprintf.c2
-rw-r--r--lib/libc/stdlib/cxa_thread_atexit_impl.c2
-rw-r--r--lib/libc/string/bcopy.c5
-rw-r--r--lib/libc/string/memset.c4
-rw-r--r--lib/libc/string/stpcpy.c2
-rw-r--r--lib/libc/string/stpncpy.c2
-rw-r--r--lib/libc/string/strcat.c2
-rw-r--r--lib/libc/string/strncat.c2
-rw-r--r--lib/libc/yp/Symbol.map32
-rw-r--r--lib/libcapsicum/capsicum_helpers.327
-rw-r--r--lib/libcbor/Makefile1
-rw-r--r--lib/libcompiler_rt/Makefile.inc12
-rw-r--r--lib/libcxxrt/Makefile10
-rw-r--r--lib/libdiff/Makefile5
-rw-r--r--lib/libdiff/tests/Makefile8
-rw-r--r--lib/libdiff/tests/libdiff_test.c62
-rw-r--r--lib/libfido2/Makefile2
-rw-r--r--lib/libgcc_s/Symbol.map32
-rw-r--r--lib/libifconfig/libifconfig.h3
-rw-r--r--lib/libifconfig/libifconfig_carp.c6
-rw-r--r--lib/libmixer/Makefile1
-rw-r--r--lib/libmixer/Symbol.map4
-rw-r--r--lib/libmixer/mixer.371
-rw-r--r--lib/libmixer/mixer.c25
-rw-r--r--lib/libmixer/mixer.h1
-rw-r--r--lib/libnvmf/Makefile22
-rw-r--r--lib/libnvmf/internal.h116
-rw-r--r--lib/libnvmf/libnvmf.h363
-rw-r--r--lib/libnvmf/nvmf_controller.c463
-rw-r--r--lib/libnvmf/nvmf_host.c915
-rw-r--r--lib/libnvmf/nvmf_tcp.c1474
-rw-r--r--lib/libnvmf/nvmf_transport.c269
-rw-r--r--lib/libomp/Makefile3
-rw-r--r--lib/libpam/modules/pam_xdg/pam_xdg.c4
-rw-r--r--lib/libpfctl/libpfctl.c185
-rw-r--r--lib/libpfctl/libpfctl.h7
-rw-r--r--lib/libpmc/libpmc_pmu_util.c1
-rw-r--r--lib/libpmc/pmu-events/jevents.c2
-rw-r--r--lib/libssp/Makefile20
-rw-r--r--lib/libssp/Symbol.map11
-rw-r--r--lib/libssp/Versions.def5
-rw-r--r--lib/libssp/__builtin_object_size.3110
-rw-r--r--lib/libssp/fortify_stubs.c131
-rw-r--r--lib/libssp/ssp.3128
-rw-r--r--lib/libsys/Symbol.map1
-rw-r--r--lib/libsys/access.296
-rw-r--r--lib/libsys/cap_rights_limit.212
-rw-r--r--lib/libsys/clock_gettime.244
-rw-r--r--lib/libsys/execve.24
-rw-r--r--lib/libsys/gettimeofday.28
-rw-r--r--lib/libsys/i386/i386_set_watch.32
-rw-r--r--lib/libsys/intro.223
-rw-r--r--lib/libsys/mq_open.28
-rw-r--r--lib/libsys/mq_unlink.22
-rw-r--r--lib/libsys/open.22
-rw-r--r--lib/libsys/sendfile.24
-rw-r--r--lib/libsys/statfs.22
-rw-r--r--lib/libthr/Makefile3
-rw-r--r--lib/libthr/thread/thr_private.h4
-rw-r--r--lib/libthr/thread/thr_syscalls.c25
-rw-r--r--lib/libufs/libufs.32
-rw-r--r--lib/libulog/ulog_login.c6
-rw-r--r--lib/libunbound/config.h6
-rw-r--r--libexec/atrun/atrun.man2
-rw-r--r--libexec/ftpd/ftpcmd.y4
-rw-r--r--libexec/ftpd/ftpd.82
-rw-r--r--libexec/ftpd/ftpd.c2
-rwxr-xr-xlibexec/nuageinit/nuageinit7
-rw-r--r--libexec/phttpget/phttpget.811
-rw-r--r--libexec/rc/rc.conf7
-rw-r--r--libexec/rc/rc.d/Makefile9
-rwxr-xr-xlibexec/rc/rc.d/accounting4
-rwxr-xr-xlibexec/rc/rc.d/adjkerntz4
-rwxr-xr-xlibexec/rc/rc.d/apm4
-rwxr-xr-xlibexec/rc/rc.d/apmd4
-rwxr-xr-xlibexec/rc/rc.d/auditd4
-rwxr-xr-xlibexec/rc/rc.d/auditdistd2
-rwxr-xr-xlibexec/rc/rc.d/automount4
-rwxr-xr-xlibexec/rc/rc.d/automountd4
-rwxr-xr-xlibexec/rc/rc.d/autounmountd4
-rwxr-xr-xlibexec/rc/rc.d/bgfsck4
-rwxr-xr-xlibexec/rc/rc.d/blacklistd3
-rwxr-xr-xlibexec/rc/rc.d/bluetooth3
-rwxr-xr-xlibexec/rc/rc.d/bootparams2
-rwxr-xr-xlibexec/rc/rc.d/bridge4
-rwxr-xr-xlibexec/rc/rc.d/bsnmpd2
-rwxr-xr-xlibexec/rc/rc.d/bthidd3
-rwxr-xr-xlibexec/rc/rc.d/ccd4
-rwxr-xr-xlibexec/rc/rc.d/cfumass4
-rwxr-xr-xlibexec/rc/rc.d/cleanvar4
-rwxr-xr-xlibexec/rc/rc.d/cleartmp4
-rwxr-xr-xlibexec/rc/rc.d/cron5
-rwxr-xr-xlibexec/rc/rc.d/ctld4
-rwxr-xr-xlibexec/rc/rc.d/ddb3
-rwxr-xr-xlibexec/rc/rc.d/defaultroute4
-rwxr-xr-xlibexec/rc/rc.d/devd4
-rwxr-xr-xlibexec/rc/rc.d/devfs4
-rwxr-xr-xlibexec/rc/rc.d/devmatch5
-rwxr-xr-xlibexec/rc/rc.d/dhclient3
-rwxr-xr-xlibexec/rc/rc.d/dmesg4
-rw-r--r--libexec/rc/rc.d/dnctl3
-rwxr-xr-xlibexec/rc/rc.d/dumpon4
-rwxr-xr-xlibexec/rc/rc.d/fsck4
-rwxr-xr-xlibexec/rc/rc.d/ftp-proxy2
-rwxr-xr-xlibexec/rc/rc.d/ftpd10
-rwxr-xr-xlibexec/rc/rc.d/gbde119
-rwxr-xr-xlibexec/rc/rc.d/geli5
-rwxr-xr-xlibexec/rc/rc.d/geli24
-rwxr-xr-xlibexec/rc/rc.d/ggated3
-rwxr-xr-xlibexec/rc/rc.d/gptboot4
-rwxr-xr-xlibexec/rc/rc.d/growfs4
-rwxr-xr-xlibexec/rc/rc.d/growfs_fstab4
-rwxr-xr-xlibexec/rc/rc.d/gssd2
-rwxr-xr-xlibexec/rc/rc.d/hastd4
-rwxr-xr-xlibexec/rc/rc.d/hcsecd3
-rwxr-xr-xlibexec/rc/rc.d/hostapd4
-rwxr-xr-xlibexec/rc/rc.d/hostid4
-rwxr-xr-xlibexec/rc/rc.d/hostid_save4
-rwxr-xr-xlibexec/rc/rc.d/hostname4
-rwxr-xr-xlibexec/rc/rc.d/inetd2
-rwxr-xr-xlibexec/rc/rc.d/iovctl4
-rwxr-xr-xlibexec/rc/rc.d/ip6addrctl4
-rwxr-xr-xlibexec/rc/rc.d/ipfilter3
-rwxr-xr-xlibexec/rc/rc.d/ipfs4
-rwxr-xr-xlibexec/rc/rc.d/ipfw3
-rwxr-xr-xlibexec/rc/rc.d/ipfw_netflow3
-rwxr-xr-xlibexec/rc/rc.d/ipmon3
-rwxr-xr-xlibexec/rc/rc.d/ipnat3
-rwxr-xr-xlibexec/rc/rc.d/ippool4
-rwxr-xr-xlibexec/rc/rc.d/ipropd_master12
-rwxr-xr-xlibexec/rc/rc.d/ipropd_slave14
-rwxr-xr-xlibexec/rc/rc.d/ipsec4
-rwxr-xr-xlibexec/rc/rc.d/iscsictl4
-rwxr-xr-xlibexec/rc/rc.d/iscsid4
-rwxr-xr-xlibexec/rc/rc.d/jail4
-rwxr-xr-xlibexec/rc/rc.d/kadmind10
-rwxr-xr-xlibexec/rc/rc.d/kdc1
-rwxr-xr-xlibexec/rc/rc.d/keyserv2
-rwxr-xr-xlibexec/rc/rc.d/kfd8
-rwxr-xr-xlibexec/rc/rc.d/kld4
-rwxr-xr-xlibexec/rc/rc.d/kldxref4
-rwxr-xr-xlibexec/rc/rc.d/kpasswdd10
-rwxr-xr-xlibexec/rc/rc.d/ldconfig4
-rwxr-xr-xlibexec/rc/rc.d/linux4
-rwxr-xr-xlibexec/rc/rc.d/local4
-rwxr-xr-xlibexec/rc/rc.d/local_unbound1
-rwxr-xr-xlibexec/rc/rc.d/localpkg6
-rwxr-xr-xlibexec/rc/rc.d/lockd7
-rwxr-xr-xlibexec/rc/rc.d/lpd2
-rwxr-xr-xlibexec/rc/rc.d/mdconfig3
-rwxr-xr-xlibexec/rc/rc.d/mdconfig23
-rwxr-xr-xlibexec/rc/rc.d/mixer4
-rwxr-xr-xlibexec/rc/rc.d/motd4
-rwxr-xr-xlibexec/rc/rc.d/mountcritlocal4
-rwxr-xr-xlibexec/rc/rc.d/mountcritremote4
-rwxr-xr-xlibexec/rc/rc.d/mountd6
-rwxr-xr-xlibexec/rc/rc.d/mountlate4
-rwxr-xr-xlibexec/rc/rc.d/moused5
-rwxr-xr-xlibexec/rc/rc.d/msgs4
-rwxr-xr-xlibexec/rc/rc.d/natd4
-rwxr-xr-xlibexec/rc/rc.d/netif4
-rwxr-xr-xlibexec/rc/rc.d/netoptions4
-rwxr-xr-xlibexec/rc/rc.d/netwait4
-rwxr-xr-xlibexec/rc/rc.d/newsyslog4
-rwxr-xr-xlibexec/rc/rc.d/nfscbd2
-rwxr-xr-xlibexec/rc/rc.d/nfsclient4
-rwxr-xr-xlibexec/rc/rc.d/nfsd4
-rwxr-xr-xlibexec/rc/rc.d/nfsuserd4
-rwxr-xr-xlibexec/rc/rc.d/nisdomain4
-rwxr-xr-xlibexec/rc/rc.d/nscd3
-rwxr-xr-xlibexec/rc/rc.d/ntpd3
-rwxr-xr-xlibexec/rc/rc.d/ntpdate4
-rwxr-xr-xlibexec/rc/rc.d/opensm2
-rwxr-xr-xlibexec/rc/rc.d/os-release4
-rwxr-xr-xlibexec/rc/rc.d/pf3
-rwxr-xr-xlibexec/rc/rc.d/pflog6
-rwxr-xr-xlibexec/rc/rc.d/pfsync4
-rwxr-xr-xlibexec/rc/rc.d/power_profile3
-rwxr-xr-xlibexec/rc/rc.d/powerd4
-rwxr-xr-xlibexec/rc/rc.d/ppp4
-rwxr-xr-xlibexec/rc/rc.d/pppoed4
-rwxr-xr-xlibexec/rc/rc.d/pwcheck4
-rwxr-xr-xlibexec/rc/rc.d/quota3
-rwxr-xr-xlibexec/rc/rc.d/random4
-rwxr-xr-xlibexec/rc/rc.d/rarpd2
-rwxr-xr-xlibexec/rc/rc.d/rctl4
-rwxr-xr-xlibexec/rc/rc.d/resolv4
-rwxr-xr-xlibexec/rc/rc.d/rfcomm_pppd_server4
-rwxr-xr-xlibexec/rc/rc.d/root4
-rwxr-xr-xlibexec/rc/rc.d/route6d2
-rwxr-xr-xlibexec/rc/rc.d/routed2
-rwxr-xr-xlibexec/rc/rc.d/routing4
-rwxr-xr-xlibexec/rc/rc.d/rpcbind2
-rwxr-xr-xlibexec/rc/rc.d/rtadvd5
-rwxr-xr-xlibexec/rc/rc.d/rtsold2
-rwxr-xr-xlibexec/rc/rc.d/rwho2
-rwxr-xr-xlibexec/rc/rc.d/savecore4
-rwxr-xr-xlibexec/rc/rc.d/sdpd3
-rwxr-xr-xlibexec/rc/rc.d/securelevel4
-rwxr-xr-xlibexec/rc/rc.d/sendmail2
-rwxr-xr-xlibexec/rc/rc.d/sshd6
-rwxr-xr-xlibexec/rc/rc.d/statd7
-rwxr-xr-xlibexec/rc/rc.d/static_arp4
-rwxr-xr-xlibexec/rc/rc.d/static_ndp4
-rwxr-xr-xlibexec/rc/rc.d/stf4
-rwxr-xr-xlibexec/rc/rc.d/swap4
-rwxr-xr-xlibexec/rc/rc.d/swaplate4
-rwxr-xr-xlibexec/rc/rc.d/syscons4
-rwxr-xr-xlibexec/rc/rc.d/sysctl4
-rwxr-xr-xlibexec/rc/rc.d/sysctl_lastload4
-rwxr-xr-xlibexec/rc/rc.d/syslogd2
-rwxr-xr-xlibexec/rc/rc.d/sysvipc4
-rwxr-xr-xlibexec/rc/rc.d/tlsclntd2
-rwxr-xr-xlibexec/rc/rc.d/tlsservd2
-rwxr-xr-xlibexec/rc/rc.d/tmp3
-rwxr-xr-xlibexec/rc/rc.d/ubthidhci4
-rwxr-xr-xlibexec/rc/rc.d/ugidfw4
-rwxr-xr-xlibexec/rc/rc.d/utx4
-rwxr-xr-xlibexec/rc/rc.d/var3
-rwxr-xr-xlibexec/rc/rc.d/var_run3
-rwxr-xr-xlibexec/rc/rc.d/virecover4
-rwxr-xr-xlibexec/rc/rc.d/watchdogd4
-rwxr-xr-xlibexec/rc/rc.d/wpa_supplicant3
-rwxr-xr-xlibexec/rc/rc.d/ypbind2
-rwxr-xr-xlibexec/rc/rc.d/ypldap2
-rwxr-xr-xlibexec/rc/rc.d/yppasswdd2
-rwxr-xr-xlibexec/rc/rc.d/ypserv2
-rwxr-xr-xlibexec/rc/rc.d/ypset3
-rwxr-xr-xlibexec/rc/rc.d/ypupdated2
-rwxr-xr-xlibexec/rc/rc.d/ypxfrd2
-rwxr-xr-xlibexec/rc/rc.d/zfs4
-rwxr-xr-xlibexec/rc/rc.d/zfsbe4
-rwxr-xr-xlibexec/rc/rc.d/zfsd4
-rwxr-xr-xlibexec/rc/rc.d/zfskeys4
-rwxr-xr-xlibexec/rc/rc.d/zpool4
-rwxr-xr-xlibexec/rc/rc.d/zpoolreguid4
-rwxr-xr-xlibexec/rc/rc.d/zpoolupgrade4
-rwxr-xr-xlibexec/rc/rc.d/zvol4
-rw-r--r--libexec/rc/rc.subr157
-rw-r--r--libexec/rtld-elf/Makefile4
-rw-r--r--libexec/rtld-elf/aarch64/reloc.c50
-rw-r--r--libexec/rtld-elf/aarch64/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/amd64/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/arm/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/i386/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/powerpc/reloc.c11
-rw-r--r--libexec/rtld-elf/powerpc/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/powerpc64/reloc.c11
-rw-r--r--libexec/rtld-elf/powerpc64/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/riscv/rtld_machdep.h5
-rw-r--r--libexec/rtld-elf/rtld.124
-rw-r--r--libexec/rtld-elf/rtld.c50
-rw-r--r--libexec/rtld-elf/rtld.h9
-rw-r--r--libexec/rtld-elf/rtld_printf.c7
-rw-r--r--libexec/tftpd/tests/functional.c1
-rw-r--r--libexec/tftpd/tftp-file.h1
-rw-r--r--libexec/tftpd/tftp-io.c11
-rw-r--r--libexec/tftpd/tftp-io.h1
-rw-r--r--libexec/tftpd/tftp-options.h1
-rw-r--r--libexec/tftpd/tftp-transfer.h1
-rw-r--r--libexec/tftpd/tftp-utils.c2
-rw-r--r--libexec/tftpd/tftp-utils.h3
-rw-r--r--libexec/tftpd/tftpd.86
-rw-r--r--libexec/tftpd/tftpd.c65
-rw-r--r--release/Makefile.mirrors14
-rw-r--r--release/Makefile.vm13
-rw-r--r--release/packages/Makefile.package4
-rwxr-xr-xrelease/packages/generate-ucl.sh5
-rwxr-xr-xrelease/scripts/mk-vmimage.sh3
-rwxr-xr-xrelease/scripts/pkg-stage.sh15
-rw-r--r--release/tools/azure.conf2
-rw-r--r--release/tools/ec2.conf5
-rw-r--r--release/tools/gce.conf10
-rw-r--r--release/tools/oci.conf5
-rw-r--r--release/tools/openstack.conf2
-rw-r--r--release/tools/vagrant-virtualbox.conf1
-rw-r--r--release/tools/vagrant-vmware.conf1
-rw-r--r--release/tools/vmimage.subr23
-rw-r--r--rescue/rescue/Makefile3
-rw-r--r--sbin/Makefile1
-rw-r--r--sbin/camcontrol/Makefile3
-rw-r--r--sbin/camcontrol/attrib.c4
-rw-r--r--sbin/camcontrol/camcontrol.c37
-rw-r--r--sbin/camcontrol/epc.c11
-rw-r--r--sbin/camcontrol/zone.c7
-rw-r--r--sbin/devfs/devfs.88
-rw-r--r--sbin/dhclient/dhcpd.h1
-rw-r--r--sbin/fsck_ffs/fsck_ffs.82
-rw-r--r--sbin/gbde/Makefile31
-rw-r--r--sbin/gbde/Makefile.depend18
-rw-r--r--sbin/gbde/gbde.8271
-rw-r--r--sbin/gbde/gbde.c895
-rw-r--r--sbin/gbde/image.uu3304
-rw-r--r--sbin/gbde/template.txt31
-rw-r--r--sbin/gbde/test.sh66
-rw-r--r--sbin/ggate/ggatel/ggatel.818
-rw-r--r--sbin/ifconfig/carp.c72
-rw-r--r--sbin/ifconfig/ifconfig.846
-rw-r--r--sbin/ifconfig/ifconfig.c42
-rw-r--r--sbin/ifconfig/ifvlan.c31
-rw-r--r--sbin/ipf/common/lexer.c5
-rw-r--r--sbin/ipf/libipf/facpri.c4
-rw-r--r--sbin/ipfw/dummynet.c4
-rw-r--r--sbin/ipfw/ipfw2.c4
-rw-r--r--sbin/ipfw/tables.c5
-rw-r--r--sbin/mdconfig/mdconfig.84
-rw-r--r--sbin/mdconfig/mdconfig.c90
-rw-r--r--sbin/mdmfs/mdmfs.814
-rw-r--r--sbin/mknod/mknod.86
-rw-r--r--sbin/mount/mount.812
-rw-r--r--sbin/mount_cd9660/mount_cd9660.82
-rw-r--r--sbin/mount_msdosfs/mount_msdosfs.82
-rw-r--r--sbin/mount_nfs/mount_nfs.82
-rw-r--r--sbin/mount_nullfs/mount_nullfs.84
-rw-r--r--sbin/newfs/newfs.86
-rw-r--r--sbin/newfs/newfs.c3
-rw-r--r--sbin/nvmecontrol/Makefile9
-rw-r--r--sbin/nvmecontrol/connect.c286
-rw-r--r--sbin/nvmecontrol/disconnect.c82
-rw-r--r--sbin/nvmecontrol/discover.c300
-rw-r--r--sbin/nvmecontrol/fabrics.c521
-rw-r--r--sbin/nvmecontrol/fabrics.h41
-rw-r--r--sbin/nvmecontrol/nvmecontrol.8185
-rw-r--r--sbin/nvmecontrol/nvmecontrol.c7
-rw-r--r--sbin/nvmecontrol/reconnect.c170
-rw-r--r--sbin/nvmecontrol/telemetry.c182
-rw-r--r--sbin/pfctl/pfctl.c15
-rw-r--r--sbin/pfctl/pfctl_optimize.c2
-rw-r--r--sbin/pfctl/pfctl_parser.h1
-rw-r--r--sbin/reboot/reboot.82
-rw-r--r--sbin/setkey/setkey.c2
-rw-r--r--sbin/swapon/swapon.c60
-rw-r--r--sbin/tunefs/tunefs.82
-rw-r--r--share/examples/Makefile2
-rwxr-xr-xshare/examples/bhyve/vmrun.sh100
-rw-r--r--share/examples/modules/Makefile2
-rw-r--r--share/man/man3/makedev.32
-rw-r--r--share/man/man3/sysexits.343
-rw-r--r--share/man/man4/Makefile33
-rw-r--r--share/man/man4/ahc.473
-rw-r--r--share/man/man4/ahd.436
-rw-r--r--share/man/man4/autofs.4 (renamed from share/man/man5/autofs.5)2
-rw-r--r--share/man/man4/blackhole.412
-rw-r--r--share/man/man4/carp.413
-rw-r--r--share/man/man4/cd.42
-rw-r--r--share/man/man4/cd9660.4 (renamed from share/man/man5/cd9660.5)2
-rw-r--r--share/man/man4/devfs.4 (renamed from share/man/man5/devfs.5)10
-rw-r--r--share/man/man4/disk.42
-rw-r--r--share/man/man4/etherswitch.47
-rw-r--r--share/man/man4/ext2fs.4 (renamed from share/man/man5/ext2fs.5)2
-rw-r--r--share/man/man4/fd.410
-rw-r--r--share/man/man4/fdescfs.4 (renamed from share/man/man5/fdescfs.5)4
-rw-r--r--share/man/man4/ffs.4 (renamed from share/man/man7/ffs.7)2
-rw-r--r--share/man/man4/fusefs.4 (renamed from share/man/man5/fusefs.5)2
-rw-r--r--share/man/man4/gbde.4302
-rw-r--r--share/man/man4/iavf.4348
-rw-r--r--share/man/man4/ice.4250
-rw-r--r--share/man/man4/intro.48
-rw-r--r--share/man/man4/kld.44
-rw-r--r--share/man/man4/lindebugfs.4 (renamed from share/man/man5/lindebugfs.5)6
-rw-r--r--share/man/man4/linprocfs.4 (renamed from share/man/man5/linprocfs.5)2
-rw-r--r--share/man/man4/linsysfs.4 (renamed from share/man/man5/linsysfs.5)6
-rw-r--r--share/man/man4/linux.426
-rw-r--r--share/man/man4/mac_do.478
-rw-r--r--share/man/man4/mlx5io.42
-rw-r--r--share/man/man4/mqueuefs.4 (renamed from share/man/man5/mqueuefs.5)2
-rw-r--r--share/man/man4/msdosfs.4 (renamed from share/man/man5/msdosfs.5)2
-rw-r--r--share/man/man4/nfslockd.445
-rw-r--r--share/man/man4/nullfs.4 (renamed from share/man/man5/nullfs.5)2
-rw-r--r--share/man/man4/nvmf.487
-rw-r--r--share/man/man4/nvmf_tcp.457
-rw-r--r--share/man/man4/nvmft.485
-rw-r--r--share/man/man4/pcm.47
-rw-r--r--share/man/man4/procfs.4 (renamed from share/man/man5/procfs.5)2
-rw-r--r--share/man/man4/rights.421
-rw-r--r--share/man/man4/sg.463
-rw-r--r--share/man/man4/smb.45
-rw-r--r--share/man/man4/smbfs.4 (renamed from share/man/man5/smbfs.5)7
-rw-r--r--share/man/man4/smsc.412
-rw-r--r--share/man/man4/snd_hdsp.4154
-rw-r--r--share/man/man4/tarfs.4 (renamed from share/man/man5/tarfs.5)0
-rw-r--r--share/man/man4/tmpfs.4 (renamed from share/man/man5/tmpfs.5)2
-rw-r--r--share/man/man4/unionfs.4 (renamed from share/man/man5/unionfs.5)7
-rw-r--r--share/man/man4/vt.47
-rw-r--r--share/man/man5/Makefile22
-rw-r--r--share/man/man5/devfs.conf.56
-rw-r--r--share/man/man5/devfs.rules.52
-rw-r--r--share/man/man5/fstab.55
-rw-r--r--share/man/man5/mount.conf.56
-rw-r--r--share/man/man5/rc.conf.5208
-rw-r--r--share/man/man5/services.57
-rw-r--r--share/man/man5/src.conf.520
-rw-r--r--share/man/man7/Makefile1
-rw-r--r--share/man/man7/hier.74
-rw-r--r--share/man/man7/intro.73
-rw-r--r--share/man/man7/security.775
-rw-r--r--share/man/man7/tuning.72
-rw-r--r--share/man/man8/beinstall.815
-rw-r--r--share/man/man8/uefi.84
-rw-r--r--share/man/man9/DEVICE_ATTACH.94
-rw-r--r--share/man/man9/dev_clone.94
-rw-r--r--share/man/man9/dev_refthread.94
-rw-r--r--share/man/man9/devfs_set_cdevpriv.94
-rw-r--r--share/man/man9/disk.96
-rw-r--r--share/man/man9/g_provider.92
-rw-r--r--share/man/man9/ieee80211.94
-rw-r--r--share/man/man9/lock.910
-rw-r--r--share/man/man9/make_dev.96
-rw-r--r--share/man/man9/pseudofs.910
-rw-r--r--share/man/man9/rman.935
-rw-r--r--share/man/man9/vfs_getopt.96
-rw-r--r--share/misc/pci_vendors501
-rw-r--r--share/misc/usb_vendors52
-rw-r--r--share/mk/bsd.lib.mk6
-rw-r--r--share/mk/bsd.opts.mk9
-rw-r--r--share/mk/bsd.prog.mk6
-rw-r--r--share/mk/bsd.sys.mk7
-rw-r--r--share/mk/src.libnames.mk4
-rw-r--r--share/mk/src.opts.mk2
-rw-r--r--stand/Makefile.inc3
-rw-r--r--stand/common/bootstrap.h3
-rw-r--r--stand/common/interp.c1
-rw-r--r--stand/common/interp_forth.c13
-rw-r--r--stand/common/interp_lua.c23
-rw-r--r--stand/common/interp_simple.c5
-rw-r--r--stand/efi/boot1/Makefile3
-rw-r--r--stand/efi/libefi/efi_console.c16
-rw-r--r--stand/efi/libefi/eficom.c4
-rw-r--r--stand/efi/loader/arch/arm64/arm64.ldscript2
-rw-r--r--stand/i386/libi386/comconsole.c4
-rw-r--r--stand/i386/libi386/nullconsole.c21
-rw-r--r--stand/i386/libi386/spinconsole.c21
-rw-r--r--stand/i386/libi386/textvidc.c698
-rw-r--r--stand/kboot/kboot/arch/aarch64/aarch64.ldscript2
-rw-r--r--stand/kboot/kboot/hostcons.c15
-rw-r--r--stand/kboot/kboot/main.c32
-rw-r--r--stand/liblua/lutils.h2
-rw-r--r--stand/libofw/devicename.c4
-rw-r--r--stand/libofw/ofw_console.c25
-rw-r--r--stand/libofw/ofw_copy.c8
-rw-r--r--stand/libofw/ofw_module.c2
-rw-r--r--stand/libofw/ofw_net.c12
-rw-r--r--stand/libofw/ofw_time.c4
-rw-r--r--stand/uboot/uboot_console.c15
-rw-r--r--stand/userboot/test/test.c196
-rw-r--r--stand/userboot/userboot/userboot_cons.c30
-rw-r--r--sys/amd64/amd64/machdep.c9
-rw-r--r--sys/amd64/amd64/mem.c13
-rw-r--r--sys/amd64/amd64/uio_machdep.c16
-rw-r--r--sys/amd64/amd64/uma_machdep.c71
-rw-r--r--sys/amd64/conf/FIRECRACKER5
-rw-r--r--sys/amd64/conf/LINT-NOINET3
-rw-r--r--sys/amd64/conf/LINT-NOINET61
-rw-r--r--sys/amd64/conf/MINIMAL17
-rw-r--r--sys/amd64/include/vmparam.h9
-rw-r--r--sys/amd64/linux/linux_dummy_machdep.c6
-rw-r--r--sys/amd64/linux/linux_proto.h4
-rw-r--r--sys/amd64/linux/linux_systrace_args.c8
-rw-r--r--sys/amd64/linux/syscalls.master4
-rw-r--r--sys/amd64/linux32/linux32_dummy_machdep.c6
-rw-r--r--sys/amd64/linux32/linux32_proto.h4
-rw-r--r--sys/amd64/linux32/linux32_systrace_args.c8
-rw-r--r--sys/amd64/linux32/syscalls.master4
-rw-r--r--sys/amd64/vmm/vmm_dev.c15
-rw-r--r--sys/arm/allwinner/a10_codec.c1
-rw-r--r--sys/arm/arm/busdma_machdep.c66
-rw-r--r--sys/arm/arm/generic_timer.c27
-rw-r--r--sys/arm/arm/pmu.c10
-rw-r--r--sys/arm/arm/uio_machdep.c16
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_audio.c1
-rw-r--r--sys/arm/freescale/imx/imx6_ssi.c1
-rw-r--r--sys/arm/freescale/vybrid/vf_sai.c1
-rw-r--r--sys/arm/include/armreg.h2
-rw-r--r--sys/arm/include/atomic.h11
-rw-r--r--sys/arm/include/vmparam.h1
-rw-r--r--sys/arm64/arm64/busdma_bounce.c69
-rw-r--r--sys/arm64/arm64/debug_monitor.c6
-rw-r--r--sys/arm64/arm64/gic_v3.c4
-rw-r--r--sys/arm64/arm64/gic_v3_var.h2
-rw-r--r--sys/arm64/arm64/gicv3_its.c6
-rw-r--r--sys/arm64/arm64/identcpu.c46
-rw-r--r--sys/arm64/arm64/locore.S117
-rw-r--r--sys/arm64/arm64/mem.c13
-rw-r--r--sys/arm64/arm64/mp_machdep.c23
-rw-r--r--sys/arm64/arm64/pmap.c565
-rw-r--r--sys/arm64/arm64/ptrauth.c32
-rw-r--r--sys/arm64/arm64/uio_machdep.c16
-rw-r--r--sys/arm64/arm64/uma_machdep.c69
-rw-r--r--sys/arm64/conf/NOTES2
-rw-r--r--sys/arm64/include/armreg.h334
-rw-r--r--sys/arm64/include/cpu.h4
-rw-r--r--sys/arm64/include/pmap.h10
-rw-r--r--sys/arm64/include/pte.h5
-rw-r--r--sys/arm64/include/vmparam.h4
-rw-r--r--sys/arm64/iommu/iommu.c1
-rw-r--r--sys/arm64/iommu/iommu_pmap.c8
-rw-r--r--sys/arm64/linux/linux_dummy_machdep.c6
-rw-r--r--sys/arm64/linux/linux_proto.h4
-rw-r--r--sys/arm64/linux/linux_systrace_args.c8
-rw-r--r--sys/arm64/linux/syscalls.master4
-rw-r--r--sys/arm64/rockchip/rk_gpio.c2
-rw-r--r--sys/arm64/vmm/vmm.c53
-rw-r--r--sys/arm64/vmm/vmm_dev.c29
-rw-r--r--sys/arm64/vmm/vmm_hyp_el2.S2
-rw-r--r--sys/arm64/vmm/vmm_hyp_exception.S2
-rw-r--r--sys/cam/ata/ata_da.c9
-rw-r--r--sys/cam/cam_ccb.h18
-rw-r--r--sys/cam/cam_iosched.c7
-rw-r--r--sys/cam/ctl/ctl.c1243
-rw-r--r--sys/cam/ctl/ctl.h1
-rw-r--r--sys/cam/ctl/ctl_backend.h11
-rw-r--r--sys/cam/ctl/ctl_backend_block.c602
-rw-r--r--sys/cam/ctl/ctl_backend_ramdisk.c260
-rw-r--r--sys/cam/ctl/ctl_cmd_table.c2
-rw-r--r--sys/cam/ctl/ctl_error.c219
-rw-r--r--sys/cam/ctl/ctl_error.h27
-rw-r--r--sys/cam/ctl/ctl_ha.c34
-rw-r--r--sys/cam/ctl/ctl_io.h352
-rw-r--r--sys/cam/ctl/ctl_ioctl.h62
-rw-r--r--sys/cam/ctl/ctl_nvme_all.c244
-rw-r--r--sys/cam/ctl/ctl_nvme_all.h17
-rw-r--r--sys/cam/ctl/ctl_nvme_cmd_table.c35
-rw-r--r--sys/cam/ctl/ctl_private.h20
-rw-r--r--sys/cam/ctl/ctl_scsi_all.c8
-rw-r--r--sys/cam/ctl/ctl_scsi_all.h2
-rw-r--r--sys/cam/ctl/ctl_util.c61
-rw-r--r--sys/cam/ctl/scsi_ctl.c3
-rw-r--r--sys/cam/nvme/nvme_da.c10
-rw-r--r--sys/cam/nvme/nvme_xpt.c1
-rw-r--r--sys/cam/scsi/scsi_da.c17
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c4
-rw-r--r--sys/compat/lindebugfs/lindebugfs.c33
-rw-r--r--sys/compat/linprocfs/linprocfs.c244
-rw-r--r--sys/compat/linux/linux_file.c2
-rw-r--r--sys/compat/linux/linux_file.h1
-rw-r--r--sys/compat/linux/linux_misc.c151
-rw-r--r--sys/compat/linux/linux_socket.c2
-rw-r--r--sys/compat/linux/linux_sysctl.c2
-rw-r--r--sys/compat/linux/linux_time.h1
-rw-r--r--sys/compat/linux/linux_timer.c4
-rw-r--r--sys/compat/linuxkpi/common/include/asm/set_memory.h21
-rw-r--r--sys/compat/linuxkpi/common/include/linux/aperture.h58
-rw-r--r--sys/compat/linuxkpi/common/include/linux/bitfield.h6
-rw-r--r--sys/compat/linuxkpi/common/include/linux/interrupt.h2
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h9
-rw-r--r--sys/compat/linuxkpi/common/include/linux/kref.h3
-rw-r--r--sys/compat/linuxkpi/common/include/linux/module.h21
-rw-r--r--sys/compat/linuxkpi/common/include/linux/refcount.h23
-rw-r--r--sys/compat/linuxkpi/common/include/linux/rwlock.h21
-rw-r--r--sys/compat/linuxkpi/common/include/linux/spinlock.h34
-rw-r--r--sys/compat/linuxkpi/common/include/linux/string.h12
-rw-r--r--sys/compat/linuxkpi/common/include/linux/wait.h2
-rw-r--r--sys/compat/linuxkpi/common/include/net/mac80211.h2
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c176
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.h6
-rw-r--r--sys/compat/linuxkpi/common/src/linux_aperture.c365
-rw-r--r--sys/compat/linuxkpi/common/src/linux_compat.c8
-rw-r--r--sys/compat/linuxkpi/common/src/linux_hdmi.c10
-rw-r--r--sys/compat/linuxkpi/common/src/linux_idr.c2
-rw-r--r--sys/compat/linuxkpi/common/src/linuxkpi_hdmikmod.c7
-rw-r--r--sys/compat/linuxkpi/common/src/linuxkpi_videokmod.c7
-rw-r--r--sys/conf/Makefile.arm643
-rw-r--r--sys/conf/NOTES12
-rw-r--r--sys/conf/files40
-rw-r--r--sys/conf/files.amd643
-rw-r--r--sys/conf/files.arm643
-rw-r--r--sys/conf/files.riscv1
-rw-r--r--sys/conf/files.x862
-rw-r--r--sys/conf/kmod.mk6
-rw-r--r--sys/conf/options2
-rw-r--r--sys/contrib/device-tree/Bindings/.yamllint5
-rw-r--r--sys/contrib/device-tree/Bindings/Makefile7
-rw-r--r--sys/contrib/device-tree/Bindings/arm/amd,pensando.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/arm/amlogic.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,coresight-cti.yaml36
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-sink.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-source.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,embedded-trace-extension.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,integrator.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,realview.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,trace-buffer-extension.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,versatile-sysreg.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,versatile.yaml40
-rw-r--r--sys/contrib/device-tree/Bindings/arm/arm,vexpress-juno.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/aspeed/aspeed,sbc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/arm/aspeed/aspeed.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/arm/atmel-at91.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm4708.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm53573.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/arm/calxeda/l2ecc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/cpus.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/arm/firmware/tlm,trusted-foundations.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/arm/fsl.yaml118
-rw-r--r--sys/contrib/device-tree/Bindings/arm/google.yaml53
-rw-r--r--sys/contrib/device-tree/Bindings/arm/hisilicon/controller/cpuctrl.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/arm/hisilicon/controller/sysctrl.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/arm/intel,socfpga.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/arm/intel-ixp4xx.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/arm/keystone/ti,k3-sci-common.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/keystone/ti,sci.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/marvell/armada-7k-8k.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/arm/marvell/cp110-system-controller.txt8
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek.yaml41
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,audsys.yaml153
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,infracfg.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mipi0a.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mmsys.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,pericfg.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,vcodecsys.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mstar/mstar,l3bridge.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/arm/mstar/mstar,smpctrl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/arm/omap/ctrl.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/omap/omap.txt99
-rw-r--r--sys/contrib/device-tree/Bindings/arm/pmu.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/arm/psci.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/arm/qcom,coresight-remote-etm.yaml51
-rw-r--r--sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpda.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpdm.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/arm/qcom-soc.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/arm/qcom.yaml104
-rw-r--r--sys/contrib/device-tree/Bindings/arm/rockchip.yaml92
-rw-r--r--sys/contrib/device-tree/Bindings/arm/samsung/samsung-boards.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/arm/sprd/sprd.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/arm/sti.yaml23
-rw-r--r--sys/contrib/device-tree/Bindings/arm/stm32/st,mlahb.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/arm/stm32/st,stm32-syscon.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/arm/stm32/stm32.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/arm/sunxi.yaml35
-rw-r--r--sys/contrib/device-tree/Bindings/arm/ti/k3.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/arm/ti/omap.yaml178
-rw-r--r--sys/contrib/device-tree/Bindings/ata/ceva,ahci-1v84.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/ata/pata-common.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/auxdisplay/hit,hd44780.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/bus/brcm,gisb-arb.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/bus/nvidia,tegra210-aconnect.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/bus/qcom,ssbi.yaml63
-rw-r--r--sys/contrib/device-tree/Bindings/cache/andestech,ax45mp-cache.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/cache/qcom,llcc.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/cache/sifive,ccache0.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/chrome/google,cros-ec-typec.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/clock/allwinner,sun4i-a10-osc-clk.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/alphascale,acc.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-aoclkc.yaml85
-rw-r--r--sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-clkc.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/clock/amlogic,s4-peripherals-clkc.yaml96
-rw-r--r--sys/contrib/device-tree/Bindings/clock/amlogic,s4-pll-clkc.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/clock/baikal,bt1-ccu-pll.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/brcm,kona-ccu.yaml181
-rw-r--r--sys/contrib/device-tree/Bindings/clock/fsl,imx8-acm.yaml282
-rw-r--r--sys/contrib/device-tree/Bindings/clock/fsl,imx93-anatop.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/clock/google,gs101-clock.yaml106
-rw-r--r--sys/contrib/device-tree/Bindings/clock/intel,agilex5-clkmgr.yaml40
-rw-r--r--sys/contrib/device-tree/Bindings/clock/keystone-pll.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/lpc1850-ccu.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/lpc1850-creg-clk.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/maxim,max9485.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/mediatek,apmixedsys.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/clock/mediatek,ethsys.yaml55
-rw-r--r--sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-ethwarp.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-xfi-pll.yaml48
-rw-r--r--sys/contrib/device-tree/Bindings/clock/mediatek,mt8188-clock.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/mediatek,topckgen.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/nvidia,tegra124-car.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,a53pll.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,camcc-sm8250.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm6125.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm8x50.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-apq8064.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq4019.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq6018.yaml57
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq8074.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8976.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8996.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8998.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-other.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-qcs404.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7180.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7280.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8150.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8250.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8450.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gcc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,gpucc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,hfpll.txt3
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,ipq5018-gcc.yaml63
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,kpss-acc-v1.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,lcc.yaml34
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,mmcc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,msm8996-cbf.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,msm8998-gpucc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-ecpricc.yaml68
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-gcc.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,rpmhcc.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7180-camcc.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7180-dispcc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7180-lpasscorecc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7180-mss.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7280-camcc.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7280-dispcc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscorecc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sdm845-camcc.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sdm845-dispcc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm4450-gcc.yaml55
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8350-videocc.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8450-camcc.yaml32
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8450-dispcc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8450-gpucc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8450-videocc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8550-dispcc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8550-tcsr.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8650-dispcc.yaml106
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,sm8650-gcc.yaml65
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,videocc.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/clock/qcom,x1e80100-gcc.yaml72
-rw-r--r--sys/contrib/device-tree/Bindings/clock/renesas,5p35023.yaml89
-rw-r--r--sys/contrib/device-tree/Bindings/clock/renesas,9series.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/clock/renesas,rzg2l-cpg.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/clock/silabs,si5351.yaml265
-rw-r--r--sys/contrib/device-tree/Bindings/clock/sophgo,cv1800-clk.yaml46
-rw-r--r--sys/contrib/device-tree/Bindings/clock/sprd,sc9863a-clk.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/st,stm32mp25-rcc.yaml76
-rw-r--r--sys/contrib/device-tree/Bindings/clock/starfive,jh7110-ispcrg.yaml87
-rw-r--r--sys/contrib/device-tree/Bindings/clock/starfive,jh7110-pll.yaml46
-rw-r--r--sys/contrib/device-tree/Bindings/clock/starfive,jh7110-stgcrg.yaml82
-rw-r--r--sys/contrib/device-tree/Bindings/clock/starfive,jh7110-syscrg.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/clock/starfive,jh7110-voutcrg.yaml90
-rw-r--r--sys/contrib/device-tree/Bindings/clock/ti,cdce925.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/ti,sci-clk.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/ti/mux.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/vf610-clock.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/clock/xlnx,clocking-wizard.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/clock/xlnx,versal-clk.yaml110
-rw-r--r--sys/contrib/device-tree/Bindings/connector/usb-connector.yaml133
-rw-r--r--sys/contrib/device-tree/Bindings/cpu/idle-states.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/cpu/nvidia,tegra186-ccplex-cluster.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/cpufreq/cpufreq-qcom-hw.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/cpufreq/qcom-cpufreq-nvmem.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/fsl-imx-sahara.yaml43
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/inside-secure,safexcel.yaml86
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/qcom,inline-crypto-engine.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/qcom,prng.yaml29
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/qcom-qce.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/st,stm32-hash.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/crypto/ti,sa2ul.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/devfreq/event/rockchip,dfi.yaml74
-rw-r--r--sys/contrib/device-tree/Bindings/devfreq/event/samsung,exynos-ppmu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/atmel/hlcdc-dc.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/adi,adv7533.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/analogix,anx7814.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/fsl,imx93-mipi-dsi.yaml115
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/lontium,lt8912b.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/nxp,tda998x.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/snps,dw-mipi-dsi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/bridge/toshiba,tc358767.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/display/cirrus,clps711x-fb.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/display/fsl,lcdif.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/display/ilitek,ili9486.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/display/imx/fsl,imx6-hdmi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/lvds-data-mapping.yaml84
-rw-r--r--sys/contrib/device-tree/Bindings/display/lvds.yaml77
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,aal.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,color.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dp.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dsi.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ethdr.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,merge.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ovl.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,padding.yaml83
-rw-r--r--sys/contrib/device-tree/Bindings/display/mediatek/mediatek,split.yaml27
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dp-controller.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-controller-main.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-phy-10nm.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-phy-14nm.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-phy-20nm.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-phy-28nm.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-phy-7nm.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/dsi-phy-common.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/gmu.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/gpu.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/mdss-common.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,mdp5.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,mdss.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-dpu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-mdss.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-dpu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-mdss.yaml29
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-dpu.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-mdss.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-dpu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-mdss.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-dpu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-mdss.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sdm670-mdss.yaml292
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-dpu.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-mdss.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-dpu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-mdss.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm6125-mdss.yaml223
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm6350-mdss.yaml23
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm6375-mdss.yaml23
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-dpu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-mdss.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-dpu.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-mdss.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-dpu.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-mdss.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-dpu.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-mdss.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-dpu.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-mdss.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-dpu.yaml127
-rw-r--r--sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-mdss.yaml328
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/advantech,idk-2121wr.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/fascontek,fs035vg158.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/himax,hx8394.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9163.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9805.yaml62
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9881c.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/jdi,lpm102a188a.yaml94
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk035c5444t.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk050h3146w.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/mantix,mlaf057we51-x.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/newvision,nv3051d.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/olimex,lcd-olinuxino.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/orisetech,otm8009a.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-common.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-dsi-cm.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-lvds.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-mipi-dbi-spi.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-simple-dsi.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-simple-lvds-dual-ports.yaml120
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/panel-simple.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/raydium,rm68200.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/raydium,rm692e5.yaml73
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/rocktech,jh057n00900.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/sitronix,st7701.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/sitronix,st7789v.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/startek,kd070fhfid015.yaml69
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/synaptics,r63353.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/visionox,r66451.yaml59
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/visionox,rm69299.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/panel/visionox,vtdr6130.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/renesas,shmobile-lcdc.yaml130
-rw-r--r--sys/contrib/device-tree/Bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/rockchip/rockchip,inno-hdmi.yaml139
-rw-r--r--sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop2.yaml102
-rw-r--r--sys/contrib/device-tree/Bindings/display/samsung/samsung,exynos-mixer.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/display/sitronix,st7735r.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/display/solomon,ssd-common.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/display/solomon,ssd1307fb.yaml48
-rw-r--r--sys/contrib/device-tree/Bindings/display/solomon,ssd132x.yaml89
-rw-r--r--sys/contrib/device-tree/Bindings/display/tegra/nvidia,tegra124-sor.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/display/ti/ti,am65x-dss.yaml32
-rw-r--r--sys/contrib/device-tree/Bindings/dma/atmel-xdma.txt3
-rw-r--r--sys/contrib/device-tree/Bindings/dma/brcm,bcm2835-dma.yaml102
-rw-r--r--sys/contrib/device-tree/Bindings/dma/dma-controller.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/dma/dma-router.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/dma/fsl,edma.yaml106
-rw-r--r--sys/contrib/device-tree/Bindings/dma/ingenic,dma.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/dma/loongson,ls2x-apbdma.yaml62
-rw-r--r--sys/contrib/device-tree/Bindings/dma/nvidia,tegra20-apbdma.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/dma/nvidia,tegra210-adma.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/dma/qcom,bam-dma.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/dma/renesas,rz-dmac.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/dma/sifive,fu540-c000-pdma.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/dma/stericsson,dma40.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/dma/ti/k3-bcdma.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/dma/ti/k3-pktdma.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/dma/ti/k3-udma.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/dma/xilinx/xilinx_dma.txt6
-rw-r--r--sys/contrib/device-tree/Bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/dts-coding-style.rst196
-rw-r--r--sys/contrib/device-tree/Bindings/eeprom/at24.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/eeprom/at25.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/extcon/maxim,max77843.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/extcon/siliconmitus,sm5502-muic.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/firmware/arm,scmi.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/firmware/intel,ixp4xx-network-processing-engine.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/firmware/nvidia,tegra186-bpmp.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/firmware/qcom,scm.yaml27
-rw-r--r--sys/contrib/device-tree/Bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/fpga/altr,freeze-bridge-controller.yaml41
-rw-r--r--sys/contrib/device-tree/Bindings/fpga/altr,socfpga-fpga2sdram-bridge.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/fpga/fpga-bridge.yaml30
-rw-r--r--sys/contrib/device-tree/Bindings/fpga/fpga-region.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/fpga/xlnx,pr-decoupler.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/fsi/ibm,i2cr-fsi-master.yaml41
-rw-r--r--sys/contrib/device-tree/Bindings/gnss/u-blox,neo-6m.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/adi,ds4520-gpio.yaml51
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/brcm,brcmstb-gpio.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/brcm,kona-gpio.yaml100
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/fsl-imx-gpio.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/gpio-pca95xx.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/gpio-vf610.yaml40
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/gpio-xgene-sb.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/intel,ixp4xx-gpio.yaml73
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/loongson,ls-gpio.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/nuvoton,sgpio.yaml87
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/realtek,rtd-gpio.yaml69
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/rockchip,gpio-bank.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/snps,dw-apb-gpio.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/st,stmpe-gpio.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/ti,omap-gpio.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/x-powers,axp209-gpio.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/xlnx,gpio-xilinx.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/gpio/xylon,logicvc-gpio.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/arm,mali-midgard.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/arm,mali-utgard.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/brcm,bcm-v3d.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/img,powervr.yaml73
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/samsung-g2d.yaml71
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/samsung-rotator.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/gpu/samsung-scaler.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/hwinfo/samsung,exynos-chipid.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwlock/ti,omap-hwspinlock.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/adi,adm1177.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/adi,axi-fan-control.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/adi,ltc2991.yaml128
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/adi,ltc2992.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/adi,max31827.yaml66
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/aspeed-pwm-tacho.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/gpio-fan.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/iio-hwmon.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/jedec,jc42.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4151.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4286.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/lm75.yaml35
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/lm87.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ltq-cputemp.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/microchip,mcp3021.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/moortec,mr75203.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/national,lm90.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/npcm750-pwm-fan.txt8
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/nxp,mc34vr500.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/pmbus/infineon,tda38640.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/sensirion,sht15.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/sensirion,shtc1.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/starfive,jh71x0-temp.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ti,ina2xx.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ti,ina3221.yaml121
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ti,tmp102.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ti,tmp108.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ti,tmp513.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/hwmon/ti,tps23861.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/cdns,i2c-r1p10.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-arb-gpio-challenge.yaml135
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-atr.yaml34
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-demux-pinctrl.yaml172
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-exynos5.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-mux-pca954x.yaml46
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-mxs.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/i2c-sprd.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/nxp,pca9541.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/qcom,i2c-cci.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/samsung,s3c2410-i2c.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/i2c/st,stm32-i2c.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/i3c/i3c.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/i3c/mipi-i3c-hci.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/accel/fsl,mma7455.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/accel/kionix,kx022a.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/adi,ad7091r5.yaml82
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/adi,ad7292.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/adi,ad7780.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml91
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/atmel,sama9260-adc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/lltc,ltc2497.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/maxim,max34408.yaml139
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3564.yaml205
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3911.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-iadc.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-rradc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-vadc.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/samsung,exynos-adc.yaml29
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/ti,ads1015.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/ti,palmas-gpadc.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/ti,twl6030-gpadc.yaml43
-rw-r--r--sys/contrib/device-tree/Bindings/iio/adc/xlnx,zynqmp-ams.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/addac/adi,ad74115.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/iio/amplifiers/adi,hmc425a.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/iio/cdc/adi,ad7150.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/chemical/aosong,ags02ma.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/iio/common.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/dac/adi,ad5758.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/iio/dac/adi,ad5791.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4728.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4821.yaml86
-rw-r--r--sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1013.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1014.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/iio/health/ti,afe4403.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/iio/health/ti,afe4404.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc2010.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc3020.yaml55
-rw-r--r--sys/contrib/device-tree/Bindings/iio/imu/adi,adis16460.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/imu/adi,adis16475.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/imu/bosch,bmi323.yaml77
-rw-r--r--sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/iio/imu/st,lsm6dsx.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/iio/light/liteon,ltr390.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/iio/light/rohm,bu27010.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/iio/light/vishay,veml6075.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/iio/pressure/honeywell,hsc030pa.yaml142
-rw-r--r--sys/contrib/device-tree/Bindings/iio/pressure/honeywell,mprls0025pa.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/iio/pressure/rohm,bm1390.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/iio/proximity/ams,as3935.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/proximity/murata,irsd200.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9310.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9324.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/iio/resolver/adi,ad2s1210.yaml177
-rw-r--r--sys/contrib/device-tree/Bindings/iio/st,st-sensors.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iio/temperature/melexis,mlx90632.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/iio/temperature/microchip,mcp9600.yaml70
-rw-r--r--sys/contrib/device-tree/Bindings/index.rst1
-rw-r--r--sys/contrib/device-tree/Bindings/input/adafruit,seesaw-gamepad.yaml63
-rw-r--r--sys/contrib/device-tree/Bindings/input/azoteq,iqs7222.yaml248
-rw-r--r--sys/contrib/device-tree/Bindings/input/elan,ekth3000.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/input/elan,ekth6915.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/input/fsl,scu-key.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/input/goodix,gt7375p.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/input/gpio-keys.yaml41
-rw-r--r--sys/contrib/device-tree/Bindings/input/gpio-mouse.yaml68
-rw-r--r--sys/contrib/device-tree/Bindings/input/hid-over-i2c.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/input/ilitek,ili9882t.yaml67
-rw-r--r--sys/contrib/device-tree/Bindings/input/iqs269a.yaml98
-rw-r--r--sys/contrib/device-tree/Bindings/input/mediatek,pmic-keys.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/input/microchip,cap11xx.yaml80
-rw-r--r--sys/contrib/device-tree/Bindings/input/qcom,pm8921-keypad.yaml89
-rw-r--r--sys/contrib/device-tree/Bindings/input/sprd,sc27xx-vibrator.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/input/syna,rmi4.yaml273
-rw-r--r--sys/contrib/device-tree/Bindings/input/ti,drv266x.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/azoteq,iqs7211.yaml769
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/cypress,tt21000.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/edt-ft5x06.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/eeti,exc3000.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/melfas,mms114.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/neonode,zforce.yaml72
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/samsung,s6sy761.yaml54
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/touchscreen.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/input/touchscreen/tsc2007.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/input/twl4030-pwrbutton.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,msm8939.yaml74
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,msm8996.yaml126
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,msm8998-bwmon.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,osm-l3.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,qcm2290.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,rpm-common.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,rpm.yaml250
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,rpmh.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,sdm660.yaml159
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,sdx75-rpmh.yaml92
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,sm6115.yaml152
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,sm8650-rpmh.yaml136
-rw-r--r--sys/contrib/device-tree/Bindings/interconnect/qcom,x1e80100-rpmh.yaml83
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/arm,gic-v3.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/arm,versatile-fpga-irq.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm7120-l2-intc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/loongson,liointc.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/qcom,mpm.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/renesas,irqc.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/renesas,rzg2l-irqc.yaml233
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/sifive,plic-1.0.0.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/st,stih407-irq-syscfg.yaml65
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/thead,c900-aclint-mswi.yaml43
-rw-r--r--sys/contrib/device-tree/Bindings/interrupt-controller/ti,pruss-intc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/iommu/apple,dart.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/iommu/arm,smmu.yaml120
-rw-r--r--sys/contrib/device-tree/Bindings/iommu/mediatek,iommu.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/iommu/qcom,iommu.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/iommu/rockchip,iommu.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/iommu/xen,grant-dma.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/ipmi/ipmi-ipmb.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/ipmi/ipmi-smic.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/leds/allwinner,sun50i-a100-ledc.yaml137
-rw-r--r--sys/contrib/device-tree/Bindings/leds/awinic,aw200xx.yaml95
-rw-r--r--sys/contrib/device-tree/Bindings/leds/backlight/common.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/leds/backlight/led-backlight.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/leds/backlight/mediatek,mt6370-backlight.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/leds/backlight/mps,mp3309c.yaml71
-rw-r--r--sys/contrib/device-tree/Bindings/leds/backlight/pwm-backlight.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/leds/common.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/leds/irled/pwm-ir-tx.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/leds/kinetic,ktd202x.yaml171
-rw-r--r--sys/contrib/device-tree/Bindings/leds/leds-aw2013.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/leds/leds-group-multicolor.yaml64
-rw-r--r--sys/contrib/device-tree/Bindings/leds/leds-lp55xx.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/leds/leds-qcom-lpg.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/leds/nxp,pca953x.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/leds/nxp,pca995x.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/leds/panasonic,an30259a.yaml84
-rw-r--r--sys/contrib/device-tree/Bindings/leds/qcom,spmi-flash-led.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/leds/register-bit-led.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/leds/rohm,bd2606mvv.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/leds/rohm,bd71828-leds.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/loongarch/cpus.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/loongarch/loongson.yaml34
-rw-r--r--sys/contrib/device-tree/Bindings/mailbox/brcm,iproc-flexrm-mbox.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/mailbox/fsl,mu.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/mailbox/qcom,apcs-kpss-global.yaml64
-rw-r--r--sys/contrib/device-tree/Bindings/mailbox/qcom-ipcc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mailbox/ti,omap-mailbox.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml136
-rw-r--r--sys/contrib/device-tree/Bindings/media/amlogic,meson6-ir.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/media/amphion,vpu.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/media/cdns,csi2rx.yaml202
-rw-r--r--sys/contrib/device-tree/Bindings/media/cec/nvidia,tegra114-cec.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/media/cnm,wave521c.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/alliedvision,alvium-csi2.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/asahi-kasei,ak7375.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc0308.yaml108
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc2145.yaml113
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/hynix,hi846.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/onnn,mt9m114.yaml114
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ov8856.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov02a10.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov4689.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5640.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5642.yaml141
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5693.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov64a40.yaml103
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ovti,ov7251.yaml109
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/sony,imx214.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/sony,imx335.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/sony,imx415.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/st,st-mipid02.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/techwell,tw9900.yaml137
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/thine,thp7312.yaml224
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub913.yaml133
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub953.yaml134
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub960.yaml428
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/toshiba,tc358746.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/media/i2c/tvp5150.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-fg.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-hdr.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rdma.yaml104
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rsz.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-stitch.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tcc.yaml62
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tdshp.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,mdp3-wrot.yaml29
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,vcodec-decoder.yaml67
-rw-r--r--sys/contrib/device-tree/Bindings/media/mediatek,vcodec-subdev-decoder.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/media/nuvoton,npcm-ece.yaml43
-rw-r--r--sys/contrib/device-tree/Bindings/media/nuvoton,npcm-vcd.yaml72
-rw-r--r--sys/contrib/device-tree/Bindings/media/nxp,imx7-csi.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/media/nxp,imx8-isi.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/media/qcom,msm8916-venus.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/media/qcom,sdm845-venus-v2.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/media/renesas,vin.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/media/rockchip-isp1.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/media/rockchip-vpu.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/media/samsung,exynos4212-fimc-is.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/media/samsung,fimc.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/media/samsung,s5p-mfc.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/media/st,stm32-dcmipp.yaml89
-rw-r--r--sys/contrib/device-tree/Bindings/media/starfive,jh7110-camss.yaml180
-rw-r--r--sys/contrib/device-tree/Bindings/media/ti,j721e-csi2rx-shim.yaml100
-rw-r--r--sys/contrib/device-tree/Bindings/media/video-interfaces.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/ingenic,nemc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/mc-peripheral-props.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/renesas,rpc-if.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/rockchip,rk3399-dmc.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/ti,gpmc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/xlnx,versal-ddrmc-edac.yaml57
-rw-r--r--sys/contrib/device-tree/Bindings/memory-controllers/xlnx,zynq-ddrc-a05.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/allwinner,sun6i-a31-prcm.yaml43
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/allwinner,sun8i-a23-prcm.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/ams,as3711.yaml223
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/arm,dev-platforms-syscon.yaml67
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/atmel-flexcom.txt1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/atmel-gpbr.txt1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/atmel-hlcdc.txt1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/atmel-matrix.txt1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/atmel-smc.txt1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml140
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/maxim,max5970.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/maxim,max77693.yaml48
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/maxim,max8925.yaml145
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/maxim,max8998.yaml324
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/mediatek,mt6357.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/mt6397.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/qcom,pm8008.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/qcom,spmi-pmic.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/qcom,tcsr.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/qcom-pm8xxx.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rockchip,rk805.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rockchip,rk806.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rockchip,rk808.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rockchip,rk809.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rockchip,rk817.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rockchip,rk818.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rohm,bd71847-pmic.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/samsung,exynos5433-lpass.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/sprd,ums512-glbreg.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/st,stmpe.yaml297
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/st,stpmic1.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/stericsson,ab8500.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/stericsson,db8500-prcmu.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/syscon.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/ti,am3359-tscadc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/ti,lp87524-q1.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/ti,lp87561-q1.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/ti,lp87565-q1.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/ti,twl.yaml67
-rw-r--r--sys/contrib/device-tree/Bindings/mfd/x-powers,axp152.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/mips/loongson/ls2k-reset.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mips/loongson/rs780e-acpi.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/misc/fsl,dpaa2-console.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/misc/intel,ixp4xx-ahb-queue-manager.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/arasan,sdhci.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/arm,pl18x.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/brcm,sdhci-brcmstb.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/marvell,xenon-sdhci.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/npcm,sdhci.yaml45
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/pxa-mmc.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/samsung,exynos-dw-mshc.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/sdhci-atmel.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/sdhci-msm.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/sdhci-pxa.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/snps,dwcmshc-sdhci.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/starfive,jh7110-mmc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/synopsys-dw-mshc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mmc/ti-omap-hsmmc.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/amlogic,meson-nand.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/jedec,spi-nor.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/marvell,nand-controller.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/microchip,mchp48l640.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/mtd.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/nand-controller.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/partitions/fixed-partitions.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/partitions/nvmem-cells.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/partitions/seama.yaml44
-rw-r--r--sys/contrib/device-tree/Bindings/mtd/partitions/u-boot.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/allwinner,sun8i-a83t-emac.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/bluetooth/qualcomm-bluetooth.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/net/brcm,asp-v2.0.yaml155
-rw-r--r--sys/contrib/device-tree/Bindings/net/brcm,bcm7445-switch-v4.0.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/net/brcm,unimac-mdio.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/can/allwinner,sun4i-a10-can.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/net/can/bosch,m_can.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/net/can/cc770.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/net/can/tcan4x5x.txt11
-rw-r--r--sys/contrib/device-tree/Bindings/net/can/xilinx,can.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/net/davicom,dm9000.yaml59
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6060.yaml88
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6xxx.yaml337
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/marvell.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/mediatek,mt7530.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml59
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/microchip,lan937x.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/nxp,sja1105.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/qca8k.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/realtek.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/dsa/renesas,rzn1-a5psw.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/net/engleder,tsnep.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/net/ethernet-controller.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/net/ethernet-phy.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/ethernet-switch.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/net/faraday,ftgmac100.yaml102
-rw-r--r--sys/contrib/device-tree/Bindings/net/fsl,fec.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/net/lantiq,pef2256.yaml213
-rw-r--r--sys/contrib/device-tree/Bindings/net/loongson,ls1b-gmac.yaml114
-rw-r--r--sys/contrib/device-tree/Bindings/net/loongson,ls1c-emac.yaml113
-rw-r--r--sys/contrib/device-tree/Bindings/net/marvell,aquantia.yaml116
-rw-r--r--sys/contrib/device-tree/Bindings/net/marvell,mvusb.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/net/marvell,orion-mdio.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/net/marvell,prestera.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/net/mediatek,net.yaml109
-rw-r--r--sys/contrib/device-tree/Bindings/net/mediatek-dwmac.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/microchip,lan95xx.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/net/motorcomm,yt8xxx.yaml34
-rw-r--r--sys/contrib/device-tree/Bindings/net/mscc,vsc7514-switch.yaml46
-rw-r--r--sys/contrib/device-tree/Bindings/net/nfc/marvell,nci.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/net/nxp,tja11xx.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/net/pcs/mediatek,sgmiisys.yaml65
-rw-r--r--sys/contrib/device-tree/Bindings/net/qca,ar803x.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml24
-rw-r--r--sys/contrib/device-tree/Bindings/net/renesas,ether.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/net/renesas,etheravb.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/net/renesas,ethertsn.yaml135
-rw-r--r--sys/contrib/device-tree/Bindings/net/rockchip-dwmac.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/net/samsung-sxgbe.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/net/sff,sfp.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/snps,dwc-qos-ethernet.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/net/snps,dwmac.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/net/sti-dwmac.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/net/ti,cc1352p7.yaml51
-rw-r--r--sys/contrib/device-tree/Bindings/net/ti,cpsw-switch.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/net/ti,icss-iep.yaml45
-rw-r--r--sys/contrib/device-tree/Bindings/net/ti,icssg-prueth.yaml201
-rw-r--r--sys/contrib/device-tree/Bindings/net/wireless/mediatek,mt76.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/net/xlnx,axi-ethernet.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/net/xlnx,gmii-to-rgmii.yaml55
-rw-r--r--sys/contrib/device-tree/Bindings/nios2/nios2.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/allwinner,sun4i-a10-sid.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/amlogic,meson-gxbb-efuse.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/amlogic,meson6-efuse.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/apple,efuses.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/fsl,t1023-sfp.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/imx-ocotp.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-cell.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-layout.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/layouts/onie,tlv-layout.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/mediatek,efuse.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/microchip,sama7g5-otpc.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/mxs-ocotp.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/nvmem-deprecated-cells.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/qcom,qfprom.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/qcom,sec-qfprom.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/qcom,spmi-sdam.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/rockchip,otp.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/rockchip-efuse.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/socionext,uniphier-efuse.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/st,stm32-romem.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/sunplus,sp7021-ocotp.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/nvmem/u-boot,env.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/opp/operating-points-v2-ti-cpu.yaml92
-rw-r--r--sys/contrib/device-tree/Bindings/opp/opp-v2-base.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/opp/opp-v2-kryo-cpu.yaml36
-rw-r--r--sys/contrib/device-tree/Bindings/opp/ti,omap-opp-supply.yaml101
-rw-r--r--sys/contrib/device-tree/Bindings/pci/brcm,iproc-pcie.yaml163
-rw-r--r--sys/contrib/device-tree/Bindings/pci/brcm,stb-pcie.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/pci/qcom,pcie-ep.yaml27
-rw-r--r--sys/contrib/device-tree/Bindings/pci/qcom,pcie.yaml91
-rw-r--r--sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-ep.yaml115
-rw-r--r--sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-host.yaml127
-rw-r--r--sys/contrib/device-tree/Bindings/pci/rcar-pci-host.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/pci/rockchip-dw-pcie.yaml72
-rw-r--r--sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-common.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-ep.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pci/snps,dw-pcie.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-ep.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-host.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/pci/toshiba,visconti-pcie.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pci/xlnx,nwl-pcie.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pci/xlnx,xdma-host.yaml114
-rw-r--r--sys/contrib/device-tree/Bindings/peci/nuvoton,npcm-peci.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/perf/fsl-imx-ddr.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/perf/riscv,pmu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/phy/amlogic,meson-axg-mipi-pcie-analog.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/phy/marvell,pxa1928-usb-phy.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/phy/mediatek,dsi-phy.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/mediatek,mt7621-pci-phy.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/mediatek,mt7628-usbphy.yaml74
-rw-r--r--sys/contrib/device-tree/Bindings/phy/mediatek,tphy.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/phy/nvidia,tegra210-xusb-padctl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/phy-hisi-inno-usb2.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/pistachio-usb-phy.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/pxa1928-usb-phy.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,ipq5332-usb-hsphy.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml278
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml80
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,msm8998-qmp-pcie-phy.yaml97
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml54
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-phy.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-repeater.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/phy/realtek,usb2phy.yaml175
-rw-r--r--sys/contrib/device-tree/Bindings/phy/realtek,usb3phy.yaml107
-rw-r--r--sys/contrib/device-tree/Bindings/phy/rockchip,inno-usb2phy.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/phy/rockchip,pcie3-phy.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/phy/rockchip,px30-dsi-dphy.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/phy/rockchip-inno-csi-dphy.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/samsung,usb3-drd-phy.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/phy/st,stih407-usb2-phy.yaml63
-rw-r--r--sys/contrib/device-tree/Bindings/phy/starfive,jh7110-dphy-rx.yaml71
-rw-r--r--sys/contrib/device-tree/Bindings/phy/starfive,jh7110-pcie-phy.yaml58
-rw-r--r--sys/contrib/device-tree/Bindings/phy/starfive,jh7110-usb-phy.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/phy/ti-phy.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-common.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-aobus.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-periphs.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-aobus.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-cbus.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml56
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml120
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm11351-pinctrl.yaml259
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/canaan,k210-fpioa.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/cypress,cy8c95x0.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/ingenic,pinctrl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6779-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6795-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7981-pinctrl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7986-pinctrl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8183-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8365-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml217
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra114-pinmux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra124-pinmux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra194-pinmux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra20-pinmux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra210-pinmux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra30-pinmux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/pinctrl-max77620.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/pinctrl-rk805.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/pinctrl-single.yaml208
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5018-tlmm.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5332-tlmm.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq8074-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq9574-tlmm.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,lpass-lpi-common.yaml75
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9607-tlmm.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9615-pinctrl.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8226-pinctrl.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8660-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8909-tlmm.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8953-pinctrl.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8960-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8976-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8994-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8996-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8998-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-mpp.yaml62
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,qcm2290-tlmm.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,qcs404-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,qdu1000-tlmm.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sa8775p-tlmm.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7180-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml54
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-pinctrl.yaml32
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-tlmm.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-tlmm.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm630-pinctrl.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm670-tlmm.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm845-pinctrl.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx55-pinctrl.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx65-tlmm.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx75-tlmm.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm4450-tlmm.yaml151
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml95
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-tlmm.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6125-tlmm.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6350-tlmm.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6375-tlmm.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm7150-tlmm.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8150-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-pinctrl.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-lpass-lpi-pinctrl.yaml102
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-tlmm.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-tlmm.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml55
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-tlmm.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-lpass-lpi-pinctrl.yaml107
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-tlmm.yaml141
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/qcom,x1e80100-tlmm.yaml137
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml188
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml187
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml186
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/renesas,pfc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/renesas,rza1-ports.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/renesas,rza2-pinctrl.yaml59
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/renesas,rzg2l-pinctrl.yaml31
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/renesas,rzv2m-pinctrl.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/rockchip,pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml45
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/socionext,uniphier-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/sprd,pinctrl.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/st,stm32-pinctrl.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynq-pinctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/pmem/pmem-region.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/power/amlogic,meson-sec-pwrc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/power/fsl,scu-pd.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/power/mediatek,power-controller.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/power/power-domain.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/power/qcom,rpmpd.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/power/renesas,sysc-rmobile.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/gpio-poweroff.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/gpio-restart.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/restart-handler.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/syscon-poweroff.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/bq256xx.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/maxim,max17040.yaml31
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/mitsumi,mm8013.yaml38
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-bms-vm.yaml83
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-lbc.yaml128
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/richtek,rt9455.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/power/supply/sbs,sbs-manager.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/power/wakeup-source.txt18
-rw-r--r--sys/contrib/device-tree/Bindings/powerpc/fsl/cpus.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/powerpc/fsl/dcsr.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/powerpc/fsl/raideng.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/powerpc/nintendo/gamecube.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/powerpc/nintendo/wii.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/pps/pps-gpio.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/brcm,kona-pwm.yaml51
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/imx-pwm.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/mediatek,pwm-disp.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/mxs-pwm.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/pwm-rockchip.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/pwm-samsung.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/snps,dw-apb-timers-pwm2.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/pwm/ti,omap-dmtimer-pwm.yaml59
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/active-semi,act8846.yaml74
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/adi,max77503-regulator.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/adi,max77857.yaml86
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/awinic,aw37503.yaml78
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/dlg,da9121.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/dlg,da9210.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/dlg,slg51000.yaml132
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/fixed-regulator.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/maxim,max20086.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/maxim,max77826.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/mediatek,mt6358-regulator.yaml250
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/mps,mp5416.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/mps,mpq2286.yaml59
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/mps,mpq7920.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/onnn,fan53880.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/pfuze100.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/qcom,rpm-regulator.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/qcom,rpmh-regulator.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/qcom,sdm845-refgen-regulator.yaml57
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/qcom,smd-rpm-regulator.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/qcom,spmi-regulator.yaml87
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/qcom,usb-vbus-regulator.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/regulator-max77620.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/regulator.yaml21
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/richtek,rt4831-regulator.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/richtek,rt5190a-regulator.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/richtek,rt5739.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/richtek,rtmv20-regulator.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/richtek,rtq2208.yaml197
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/richtek,rtq6752-regulator.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/st,stm32mp1-pwr-reg.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/vctrl.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/regulator/wlf,arizona.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/fsl,imx-rproc.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/mtk,scp.yaml176
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,adsp.yaml44
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-edge.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-rpm-edge.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,msm8996-mss-pil.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,pas-common.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,qcs404-pas.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,rpm-proc.yaml171
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sc7180-pas.yaml105
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8180x-pas.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8280xp-pas.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sdx55-pas.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6115-pas.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6350-pas.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6375-pas.yaml145
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8150-pas.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8350-pas.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8550-pas.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/renesas,rcar-rproc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/ti,k3-dsp-rproc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/ti,k3-r5f-rproc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/ti,omap-remoteproc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/ti,pru-consumer.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/ti,pru-rproc.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/remoteproc/xlnx,zynqmp-r5fss.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/reserved-memory/nvidia,tegra264-bpmp-shmem.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/reserved-memory/qcom,rmtfs-mem.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/reserved-memory/reserved-memory.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/reset/altr,rst-mgr.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/reset/amlogic,meson-reset.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/reset/fsl,imx-src.yaml31
-rw-r--r--sys/contrib/device-tree/Bindings/reset/hisilicon,hi3660-reset.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/reset/qcom,aoss-reset.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/reset/qcom,pdc-global.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/reset/ti,sci-reset.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/reset/ti,tps380x-reset.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/reset/ti-syscon-reset.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/reset/xlnx,zynqmp-reset.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/riscv/cpus.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/riscv/extensions.yaml233
-rw-r--r--sys/contrib/device-tree/Bindings/riscv/sophgo.yaml36
-rw-r--r--sys/contrib/device-tree/Bindings/riscv/thead.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/rng/amlogic,meson-rng.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/rng/omap_rng.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/rng/st,stm32-rng.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/rng/starfive,jh7110-trng.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/adi,max31335.yaml70
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/amlogic,meson6-rtc.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/atmel,at91rm9200-rtc.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/cirrus,ep9301-rtc.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/epson,rtc7301.yaml51
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/epson,rx8900.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/intersil,isl12022.yaml64
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/microcrystal,rv3032.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/mstar,ssd202d-rtc.yaml35
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/nuvoton,ma35d1-rtc.yaml48
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/nxp,pcf2123.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/nxp,pcf2127.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/nxp,pcf8523.yaml45
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml36
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/rtc-cmos.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/s3c-rtc.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/st,m48t86.yaml38
-rw-r--r--sys/contrib/device-tree/Bindings/rtc/trivial-rtc.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/serial/amlogic,meson-uart.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/serial/arm,dcc.yaml30
-rw-r--r--sys/contrib/device-tree/Bindings/serial/esp,esp32-acm.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/serial/esp,esp32-uart.yaml51
-rw-r--r--sys/contrib/device-tree/Bindings/serial/fsl,s32-linflexuart.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/serial/fsl-imx-uart.yaml31
-rw-r--r--sys/contrib/device-tree/Bindings/serial/fsl-lpuart.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/serial/fsl-mxs-auart.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/serial/maxim,max310x.yaml74
-rw-r--r--sys/contrib/device-tree/Bindings/serial/nvidia,tegra20-hsuart.yaml125
-rw-r--r--sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.txt46
-rw-r--r--sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.yaml127
-rw-r--r--sys/contrib/device-tree/Bindings/serial/qcom,msm-uart.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/serial/qcom,msm-uartdm.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/serial/renesas,em-uart.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/serial/renesas,hscif.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/serial/renesas,sci.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/serial/renesas,scif.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/serial/renesas,scifa.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/serial/renesas,scifb.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/serial/rs485.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml36
-rw-r--r--sys/contrib/device-tree/Bindings/serial/serial.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/serial/snps-dw-apb-uart.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/serial/sprd-uart.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/serial/st-asc.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml193
-rw-r--r--sys/contrib/device-tree/Bindings/soc/aspeed/uart-routing.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/soc/intel/intel,hps-copy-engine.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/soc/litex/litex,soc-controller.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/soc/loongson/loongson,ls2k-pmc.yaml83
-rw-r--r--sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,mt7986-wo-ccif.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,pwrap.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/soc/mediatek/mtk-svs.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/soc/microchip/microchip,mpfs-sys-controller.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/soc/nuvoton/nuvoton,gfxi.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/soc/qcom/qcom,aoss-qmp.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/soc/qcom/qcom,geni-se.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/soc/qcom/qcom,pmic-glink.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd-rpm.yaml23
-rw-r--r--sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/soc/qcom/qcom-stats.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/soc/renesas/renesas,rzg2l-sysc.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/soc/renesas/renesas.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/soc/rockchip/grf.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/soc/samsung/exynos-pmu.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/soc/samsung/exynos-usi.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/soc/samsung/samsung,exynos-sysreg.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/soc/starfive/starfive,jh7110-syscon.yaml93
-rw-r--r--sys/contrib/device-tree/Bindings/soc/sti/st,sti-syscon.yaml46
-rw-r--r--sys/contrib/device-tree/Bindings/soc/tegra/nvidia,nvec.yaml84
-rw-r--r--sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-ahb.yaml40
-rw-r--r--sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-flowctrl.yaml41
-rw-r--r--sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-pmc.yaml416
-rw-r--r--sys/contrib/device-tree/Bindings/soc/ti/k3-ringacc.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/soc/ti/sci-pm-domain.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/soc/xilinx/xilinx.yaml142
-rw-r--r--sys/contrib/device-tree/Bindings/sound/adi,max98363.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/allwinner,sun4i-a10-spdif.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/sound/amlogic,axg-sound-card.yaml15
-rw-r--r--sys/contrib/device-tree/Bindings/sound/amlogic,gx-sound-card.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/sound/audio-graph-port.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/sound/audio-graph.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/sound/audio-iio-aux.yaml64
-rw-r--r--sys/contrib/device-tree/Bindings/sound/awinic,aw87390.yaml58
-rw-r--r--sys/contrib/device-tree/Bindings/sound/awinic,aw88395.yaml37
-rw-r--r--sys/contrib/device-tree/Bindings/sound/axentia,tse850-pcm5142.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/cirrus,cs42l43.yaml313
-rw-r--r--sys/contrib/device-tree/Bindings/sound/cs35l35.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/cs35l36.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/cs53l30.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/dai-params.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/sound/dialog,da7219.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/sound/everest,es8328.yaml77
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,easrc.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,esai.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,micfil.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,mqs.yaml105
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,qmc-audio.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,rpmsg.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/sound/fsl,xcvr.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/sound/google,sc7180-trogdor.yaml17
-rw-r--r--sys/contrib/device-tree/Bindings/sound/google,sc7280-herobrine.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/sound/imx-audio-card.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/sound/maxim,max98925.yaml98
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mediatek,mt2701-audio.yaml116
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-afe.yaml160
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-wm8960.yaml67
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-afe.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-mt6359.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mt2701-afe-pcm.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/sound/mt8195-afe-pcm.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/sound/nuvoton,nau8821.yaml141
-rw-r--r--sys/contrib/device-tree/Bindings/sound/nuvoton,nau8822.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-max9808x.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-rt5631.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/sound/nxp,tfa9879.yaml44
-rw-r--r--sys/contrib/device-tree/Bindings/sound/option,gtm601.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/sound/pcm512x.txt9
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,lpass-rx-macro.yaml23
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,lpass-tx-macro.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,lpass-va-macro.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,lpass-wsa-macro.yaml23
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,pm8916-wcd-analog-codec.yaml153
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,wcd934x.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,wcd938x-sdw.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,wcd938x.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,wsa883x.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/qcom,wsa8840.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/realtek,rt5616.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/sound/renesas,rsnd.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/renesas,rsnd.yaml42
-rw-r--r--sys/contrib/device-tree/Bindings/sound/renesas,rz-ssi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/richtek,rtq9128.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/sound/rockchip,rk3288-hdmi-analog.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/rockchip-spdif.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/sound/rt5663.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/samsung,aries-wm8994.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/sound/samsung,midas-audio.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/sound/samsung,odroid.yaml14
-rw-r--r--sys/contrib/device-tree/Bindings/sound/samsung,tm2.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/sound/samsung-i2s.yaml19
-rw-r--r--sys/contrib/device-tree/Bindings/sound/serial-midi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/simple-card.yaml53
-rw-r--r--sys/contrib/device-tree/Bindings/sound/snps,designware-i2s.yaml108
-rw-r--r--sys/contrib/device-tree/Bindings/sound/sound-card-common.yaml34
-rw-r--r--sys/contrib/device-tree/Bindings/sound/sprd-pcm.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/st,stm32-sai.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/starfive,jh7110-pwmdac.yaml76
-rw-r--r--sys/contrib/device-tree/Bindings/sound/tas2562.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/tas5805m.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/sound/ti,j721e-cpb-ivi-audio.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/ti,pcm3168a.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/sound/ti,tas2781.yaml80
-rw-r--r--sys/contrib/device-tree/Bindings/sound/ti,tlv320aic32x4.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/tlv320adcx140.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/sound/wlf,wm8904.yaml74
-rw-r--r--sys/contrib/device-tree/Bindings/sound/wlf,wm8960.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/sound/wm8782.txt7
-rw-r--r--sys/contrib/device-tree/Bindings/soundwire/qcom,soundwire.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/spi/adi,axi-spi-engine.yaml66
-rw-r--r--sys/contrib/device-tree/Bindings/spi/allwinner,sun4i-a10-spi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/spi/allwinner,sun6i-a31-spi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/spi/arm,pl022-peripheral-props.yaml61
-rw-r--r--sys/contrib/device-tree/Bindings/spi/brcm,bcm2835-aux-spi.txt4
-rw-r--r--sys/contrib/device-tree/Bindings/spi/brcm,bcm63xx-spi.yaml71
-rw-r--r--sys/contrib/device-tree/Bindings/spi/brcm,spi-bcm-qspi.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/spi/cdns,qspi-nor.yaml12
-rw-r--r--sys/contrib/device-tree/Bindings/spi/fsl-imx-cspi.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/spi/loongson,ls2k-spi.yaml46
-rw-r--r--sys/contrib/device-tree/Bindings/spi/nvidia,tegra114-spi.yaml100
-rw-r--r--sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-sflash.yaml81
-rw-r--r--sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-slink.yaml90
-rw-r--r--sys/contrib/device-tree/Bindings/spi/nvidia,tegra210-quad.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/spi/omap-spi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/spi/qcom,spi-qup.yaml13
-rw-r--r--sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/spi/renesas,rzv2m-csi.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/spi/rockchip-sfc.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/spi/snps,dw-apb-ssi.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/spi/spi-cadence.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/spi/spi-fsl-lpspi.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/spi/spi-nxp-fspi.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/spi/spi-peripheral-props.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/spi/spi-pl022.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml22
-rw-r--r--sys/contrib/device-tree/Bindings/sram/qcom,ocmem.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/allwinner,sun8i-a83t-ths.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/fsl,scu-thermal.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/imx-thermal.yaml7
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/loongson,ls2k-thermal.yaml52
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/mediatek,lvts-thermal.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/mediatek,thermal.yaml99
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/nvidia,tegra124-soctherm.yaml385
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/qcom-lmh.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm-hc.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm5.yaml16
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/qcom-tsens.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/thermal/thermal-zones.yaml18
-rw-r--r--sys/contrib/device-tree/Bindings/timer/cirrus,ep9301-timer.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/timer/fsl,imxgpt.yaml31
-rw-r--r--sys/contrib/device-tree/Bindings/timer/ingenic,tcu.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/timer/renesas,rz-mtu3.yaml67
-rw-r--r--sys/contrib/device-tree/Bindings/timer/sifive,clint.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/timer/snps,arc-timer.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/timer/thead,c900-aclint-mtimer.yaml50
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/google,cr50.yaml65
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/ibm,vtpm.yaml104
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/microsoft,ftpm.yaml47
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-i2c.yaml90
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-mmio.yaml49
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/tcg,tpm_tis-spi.yaml75
-rw-r--r--sys/contrib/device-tree/Bindings/tpm/tpm-common.yaml87
-rw-r--r--sys/contrib/device-tree/Bindings/trivial-devices.yaml48
-rw-r--r--sys/contrib/device-tree/Bindings/ufs/qcom,ufs.yaml48
-rw-r--r--sys/contrib/device-tree/Bindings/ufs/samsung,exynos-ufs.yaml9
-rw-r--r--sys/contrib/device-tree/Bindings/ufs/ufs-common.yaml39
-rw-r--r--sys/contrib/device-tree/Bindings/usb/ci-hdrc-usb2.yaml26
-rw-r--r--sys/contrib/device-tree/Bindings/usb/cypress,cypd4226.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/usb/cypress,hx3.yaml77
-rw-r--r--sys/contrib/device-tree/Bindings/usb/dwc3-xilinx.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/usb/fcs,fsa4480.yaml43
-rw-r--r--sys/contrib/device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/generic-ehci.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/generic-ohci.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/usb/generic-xhci.yaml25
-rw-r--r--sys/contrib/device-tree/Bindings/usb/genesys,gl850g.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/usb/gpio-sbu-mux.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/mediatek,mtk-xhci.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/usb/microchip,usb5744.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/usb/msm-hsusb.txt2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/nxp,ptn36502.yaml94
-rw-r--r--sys/contrib/device-tree/Bindings/usb/nxp,ptn5110.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/qcom,dwc3.yaml182
-rw-r--r--sys/contrib/device-tree/Bindings/usb/qcom,wcd939x-usbss.yaml102
-rw-r--r--sys/contrib/device-tree/Bindings/usb/realtek,rtd-dwc3.yaml80
-rw-r--r--sys/contrib/device-tree/Bindings/usb/realtek,rtd-type-c.yaml82
-rw-r--r--sys/contrib/device-tree/Bindings/usb/realtek,rts5411.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/renesas,usbhs.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/richtek,rt1719.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/rockchip,dwc3.yaml62
-rw-r--r--sys/contrib/device-tree/Bindings/usb/samsung,exynos-dwc3.yaml20
-rw-r--r--sys/contrib/device-tree/Bindings/usb/snps,dwc3.yaml60
-rw-r--r--sys/contrib/device-tree/Bindings/usb/ti,tps6598x.yaml90
-rw-r--r--sys/contrib/device-tree/Bindings/usb/ti,usb8041.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml2
-rw-r--r--sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/usb/vialab,vl817.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/usb/xlnx,usb2.yaml3
-rw-r--r--sys/contrib/device-tree/Bindings/vendor-prefixes.yaml58
-rw-r--r--sys/contrib/device-tree/Bindings/w1/amd,axi-1wire-host.yaml44
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/alphascale,asm9260-wdt.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/amlogic,meson-gxbb-wdt.yaml11
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/apple,wdt.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/arm-smc-wdt.yaml6
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/aspeed-wdt.txt18
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/atmel,at91rm9200-wdt.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/brcm,bcm7038-wdt.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/cnxt,cx92755-wdt.yaml45
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/dlg,da9062-watchdog.yaml54
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/fsl,scu-wdt.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/fsl-imx7ulp-wdt.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/intel,keembay-wdt.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/marvell,cn10624-wdt.yaml83
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/maxim,max63xx.yaml8
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/mediatek,mtk-wdt.yaml1
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/nxp,pnx4008-wdt.yaml34
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/qca,ar7130-wdt.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/qcom,pm8916-wdt.yaml33
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/qcom-wdt.yaml5
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/realtek,rtd1295-watchdog.yaml38
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/samsung-wdt.yaml29
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/snps,dw-wdt.yaml10
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/technologic,ts7200-wdt.yaml45
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/ti,rti-wdt.yaml28
-rw-r--r--sys/contrib/device-tree/Bindings/watchdog/toshiba,visconti-wdt.yaml4
-rw-r--r--sys/contrib/device-tree/Bindings/writing-schema.rst5
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/arm/qcom,ids.h9
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/ata/ahci.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-peripherals-clkc.h53
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-pll-clkc.h5
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h236
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-pll-clkc.h43
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/ast2600-clock.h12
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/axg-audio-clkc.h65
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/axg-clkc.h48
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos3250.h18
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos4.h5
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos5250.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos5260-clk.h25
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos5410.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos5420.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos5433.h42
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos7885.h4
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/exynos850.h10
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/g12a-aoclkc.h7
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/g12a-clkc.h138
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/google,gs101.h392
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/gxbb-clkc.h65
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/hi3559av100-clock.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/imx8-clock.h28
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/imx8mp-clock.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/imx93-clock.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/intel,agilex5-clkmgr.h100
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2-audio.h1
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2.h1
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa168.h1
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa1928.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa910.h1
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/mediatek,mt7988-clk.h280
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/meson8b-clkc.h97
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq4019.h6
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq5018.h183
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8917.h1
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8939.h6
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8998.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-sc8280xp.h10
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,ipq9574-gcc.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,mmcc-msm8974.h1
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-ecpricc.h147
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-gcc.h4
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sc8280xp-camcc.h179
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm4450-gcc.h197
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8550-camcc.h187
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-dispcc.h102
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gcc.h254
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gpucc.h43
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-tcsr.h18
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,videocc-sm8150.h4
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/qcom,x1e80100-gcc.h485
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/r8a779f0-cpg-mssr.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/r9a08g045-cpg.h242
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/rockchip,rk3588-cru.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/samsung,exynosautov9.h18
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sophgo,cv1800.h176
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/st,stm32mp25-rcc.h492
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/starfive,jh7110-crg.h80
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/stm32mp1-clks.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-r-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sun50i-a100-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h6-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h616-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/clock/sun6i-rtc.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/display/sdtv-standards.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/dma/fsl-edma.h21
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/firmware/qcom,scm.h21
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h179
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/gpio/amlogic-c3-gpio.h72
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/gpio/meson-g12a-gpio.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm7325.h69
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h88
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350b.h124
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h50
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735a.h22
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735b.h22
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h19
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-vadc.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,rpm-icc.h13
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sdx75.h102
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm6115.h111
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8250.h7
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8650-rpmh.h154
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,x1e80100-rpmh.h207
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h126
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/memory/mediatek,mt8188-memory-port.h489
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/mux/ti-serdes.h8
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/amlogic,c3-pwrc.h25
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/amlogic,t7-pwrc.h63
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/mediatek,mt8365-power.h19
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson-a1-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson-axg-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson-g12a-power.h3
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson-gxbb-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson-s4-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson-sm1-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/meson8-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/qcom,rpmhpd.h32
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/qcom-rpmpd.h21
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/r8a779f0-sysc.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/rk3588-power.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/starfive,jh7110-pmu.h6
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/power/summit,smb347-charger.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/regulator/st,stm32mp13-regulator.h42
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/altr,rst-mgr-s10.h5
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/amlogic,c3-reset.h119
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/mediatek,mt7988-resets.h13
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/mt8188-resets.h75
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/qcom,gcc-ipq5018.h122
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/qcom,sm8650-gpucc.h20
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/rockchip,rk3588-cru.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/st,stm32mp25-rcc.h167
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/starfive,jh7110-crg.h60
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/stm32mp1-resets.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-r-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-r-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-r-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h616-ccu.h2
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/soc/rockchip,vop2.h4
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/thermal/mediatek,lvts-thermal.h28
-rw-r--r--sys/contrib/device-tree/include/dt-bindings/watchdog/aspeed-wdt.h92
-rw-r--r--sys/contrib/device-tree/src/arm/allwinner/sun8i-r40.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s-mangopi-mq-r-t113.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s-anbernic-rg-nano.dts276
-rw-r--r--sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s.dtsi35
-rw-r--r--sys/contrib/device-tree/src/arm/allwinner/sunxi-d1s-t113-mangopi-mq-r.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/amazon/alpine.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtjade.dts66
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtmitchell.dts431
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-bytedance-g220a.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-bletchley.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cloudripper.dts10
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cmm.dts46
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-elbert.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-fuji.dts30
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minerva-cmc.dts265
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minipack.dts32
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-tiogapass.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge100.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge400.dts14
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yamp.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yosemite4.dts624
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-bonnell.dts372
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-everest.dts1701
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-rainier.dts691
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-fp5280g2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-nf5280m6.dts12
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-starscream.dts389
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-transformers.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr630.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr855xg2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-tacoma.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-zaius.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-q71l.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-s6q.dts10
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-n110.dts14
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-rx20.dts10
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-sx20.dts14
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-g4.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-g5.dtsi15
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-g6-pinctrl.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/aspeed-g6.dtsi38
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/ast2500-facebook-netbmc-common.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/ast2600-facebook-netbmc-common.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/ibm-power10-dual.dtsi380
-rw-r--r--sys/contrib/device-tree/src/arm/aspeed/ibm-power10-quad.dtsi1305
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm-cygnus.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm-hr2.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm-ns.dtsi52
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm-nsp.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm11351.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm21664.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm23550.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi-400.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2711.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm28155-ap.dts94
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a-plus.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-plus.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-rev2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-cm1-io1.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero-w.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2836-rpi-2-b.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-cm3-io3.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-zero-2-w.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm283x.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4708-linksys-ea6500-v2.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xap-1510.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xwc-1000.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4708-netgear-r6250.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4708-smartrg-sr400ac.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47081-buffalo-wzr-600dhp2.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xap-1410.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xwr-1200.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4709-asus-rt-ac87u.dts11
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4709-linksys-ea9200.dts38
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm4709-netgear-r8000.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dtsi163
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac88u.dts155
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-885l.dts25
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-890l.dts9
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-linksys-panamera.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-abr-4500.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xap-1610.dts45
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xbr-4500.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwc-2000.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3100.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3150-v1.dts44
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47094-phicomm-k3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-1440.dts20
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-810.dts21
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm47189-tenda-ac9.dts9
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm53015-meraki-mr26.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm53016-meraki-mr32.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm5301x.dtsi34
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm53573.dtsi53
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm63138.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm947189acdbmr.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/broadcom/bcm953012er.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/hisilicon/hi3519.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-freecom-fsg-3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-gateway-7001.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-goramo-multilink.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-iomega-nas100d.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-nslu2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-wrv54g.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts251
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10_socdk_qspi.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria5_socdk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_socdk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sockit.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sodia.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_vining_fpga.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-dlink-dns327l.dts83
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-rd.dts26
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-2bay.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-4bay.dts51
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-xbay.dtsi48
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud-2bay.dts21
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud.dtsi45
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-370-synology-ds213j.dts70
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-381-netgear-gs110emx.dts44
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-382-rd-ac3x-48g4x2xl.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-l8.dts38
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-s4.dts22
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-385-linksys.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-385-synology-ds116.dts16
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-385-turris-omnia.dts20
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-388-clearfog.dts20
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-388-gp.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-xp-linksys-mamba.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/armada-xp-synology-ds414.dts105
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/dove-cm-a510.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/dove-cubox.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/dove-d3plug.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/dove-sbc-a510.dts30
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-dnskw.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-l-50.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-6282.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-lswxl.dts9
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-lsxl.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2max.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2mini.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/kirkwood-synology.dtsi102
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/mvebu-linkstation-fan.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/pxa168.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/marvell/pxa910.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/mediatek/mt2701-evb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/mediatek/mt6323.dtsi58
-rw-r--r--sys/contrib/device-tree/src/arm/mediatek/mt7623n.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/mediatek/mt7629-rfb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-sam9x60_curiosity.dts7
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-sam9x60ek.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_som1_ek.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_wlsom1_ek.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-sama5d29_curiosity.dts600
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-sama5d3_ksz9477_evb.dts13
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91-vinco.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91rm9200.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9260.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9261.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9g20ek_2mmc.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9g45.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9m10g45ek.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9rl.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/at91sam9x5.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/lan966x-pcb8290.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/sama5d2.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/sama5d3.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/sama5d4.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/microchip/sama7g5.dtsi40
-rw-r--r--sys/contrib/device-tree/src/arm/nspire/nspire-classic.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nspire/nspire-clp.dts93
-rw-r--r--sys/contrib/device-tree/src/arm/nspire/nspire-cx.dts95
-rw-r--r--sys/contrib/device-tree/src/arm/nspire/nspire-tp.dts93
-rw-r--r--sys/contrib/device-tree/src/arm/nspire/nspire.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm/nuvoton/nuvoton-common-npcm7xx.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gbs.dts16
-rw-r--r--sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gsj.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-kudo.dts10
-rw-r--r--sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm750-runbmc-olympus.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/nuvoton/nuvoton-wpcm450.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra114-asus-tf701t.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra114-dalmore.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra114-roth.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra114-tn7.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra114.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-eval.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2-eval.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-jetson-tk1.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-nyan.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124-venice2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra124.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-acer-a500-picasso.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-asus-tf101.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-eval-v3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-iris.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-harmony.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-paz00.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-seaboard.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-tamonten.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-trimslice.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20-ventana.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra20.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-eval.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1-eval.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-lvds-display.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-nexus7-grouper-common.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-tf700t.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-transformer-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-beaver.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-cardhu.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri-eval-v3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-ouya.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30-pegatron-chagall.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nvidia/tegra30.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx1-ads.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx1-apf9328.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx1.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-cpuimx25.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts27
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25-karo-tx25.dts71
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25-pdk.dts65
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx25.dtsi48
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-apf27dev.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-cpuimx27.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts27
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-pdk.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-rdk.dts21
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-som.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-rdk.dts38
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-som.dtsi60
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx27.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx31.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx50-evk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx50-kobo-aura.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx50.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx51-babbage.dts25
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx51-eukrea-mbimxsd51-baseboard.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx51-zii-rdu1.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx51.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-ard.dts19
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-cx9020.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53.dtsi34
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53evk.dts34
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-mba53.dts33
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-qsb-common.dtsi65
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-lvds.dts97
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-rgb.dts112
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4.dtsi45
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-smd.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-tqma53.dtsi19
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53-voipac-dmm-668.dtsi36
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx53.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105pv2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105v2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125pv2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125v2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b155v2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5pv2.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5v2.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-emcon-avari.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-qmx6.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-riotboard.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-apalis-ixora-v1.2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-arm2.dts36
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b650v3.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b850v3.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bosch-acc.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bx50v3.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-cm-fx6.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dmo-edmqmx6.dts55
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dms-ba16.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-emcon-avari.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gk802.dts19
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gw5400-a.dts67
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-h100.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-pistachio.dts5
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-prti6q.dts5
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-skov-reve-mi1010ait-1cp1.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-tbs2910.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6q-var-mx6customboard.dts247
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apalis.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apf6dev.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-aristainetos2.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-colibri.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-dfi-fs700-m60.dtsi30
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon-avari.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw52xx.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw53xx.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw54xx.dtsi85
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5904.dtsi46
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5910.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5912.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6a.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6b.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nit6xlite.dtsi79
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_max.dtsi132
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_som2.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6x.dtsi121
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pbab01.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pfla02.dtsi51
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-phycore-som.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-rex.dtsi58
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-sabrelite.dtsi147
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-skov-cpu-revc.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6a.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6b.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-ts7970.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-udoo.dtsi36
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-var-som.dtsi569
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-wandboard.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6sx-nitrogen6sx.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6sx.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-14x14-evk.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcexpress.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcpro.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsom.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-geam.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-kontron-bl-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-dwarf.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-hobbit.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-pi.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul-mainboard.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ul.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-aster.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-eval-v3.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris-v2.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-eval-v3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-aster.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-eval-v3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris-v2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-emmc.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-nand.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7-colibri.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7-tqma7.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-aster.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-eval-v3.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris-v2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-flex-concentrator.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-meerkat96.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-dwarf.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-nymph.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-pi.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-sdb.dts5
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d-smegw01.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7d.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7s.dtsi65
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/imx7ulp.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/imx/mba6ulx.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/lpc/lpc18xx.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-iot.dts10
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a-mbls1021a.dts405
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a.dtsi107
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/ls/ls1021a.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx23-evk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx23-olinuxino.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx23-sansa.dts14
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx23-stmp378x_devb.dts19
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx23-xfi3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx23.dtsi35
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-apf28dev.dts36
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10037.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10049.dts25
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10055.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10057.dts25
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10058.dts25
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx283lc.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx28lc.dtsi84
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-evk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-lwe.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28.dtsi19
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28cu3.dts68
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28evk.dts47
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-sps1.dts19
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-tx28.dts7
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28-xea.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/mxs/imx28.dtsi44
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf-colibri-eval-v3.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-bk4.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-twr.dts31
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-cfu1.dts14
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-dev-rev-b.dts7
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-scu4-aib.dts70
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-spb4.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-dtu.dts20
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-spu3.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/nxp/vf/vfxxx.dtsi31
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8018.dtsi55
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8058.dtsi159
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8226.dtsi182
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8821.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8841.dtsi68
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8921.dtsi137
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pm8941.dtsi256
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pma8084.dtsi99
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pmx55.dtsi85
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/pmx65.dtsi33
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-asus-sparrow.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-huawei-sturgeon.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-lg-lenok.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-samsung-matisse-wifi.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8060-dragonboard.dts165
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-asus-nexus7-flo.dts71
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-cm-qs600.dts35
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-ifc6410.dts43
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-pins.dtsi16
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts111
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8064.dtsi256
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8074-dragonboard.dts40
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-ifc6540.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-mtp.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-apq8084.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-ipq4018-ap120c-ac.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019-ap.dk04.1.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019.dtsi47
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-rb3011.dts56
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-v1.0.dtsi123
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548-mangoh-green.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548.dtsi143
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615.dtsi216
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-common.dtsi327
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-dempsey.dts17
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-makepeace.dts17
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-moneypenny.dts23
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8226.dtsi293
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8660-surf.dts61
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8660.dtsi217
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-htc-memul.dts372
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-superman-lte.dts53
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-tesla.dts67
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-motorola-peregrine.dts291
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-cdp.dts27
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-samsung-expressatt.dts7
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8960.dtsi46
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts33
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-sony-xperia-rhine.dtsi35
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974.dtsi196
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-fairphone-fp2.dts35
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-oneplus-bacon.dts35
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-samsung-klte.dts13
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-sony-xperia-shinano-castor.dts43
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-pm8226.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-pm8941.dtsi36
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-pma8084.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-pmx55.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-mtp.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-t55.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-telit-fn980-tlb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-sdx55.dtsi95
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-sdx65-mtp.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/qcom/qcom-sdx65.dtsi58
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/iwg20d-q7-dbcm-ca.dtsi15
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r7s72100-genmai.dts82
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r7s72100-gr-peach.dts6
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r7s72100-rskrza1.dts71
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r7s72100.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r7s9210-rza2mevb.dts5
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a73a4-ape6evm.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7740-armadillo800eva.dts30
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7740.dtsi65
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm-dbhd-ca.dts15
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7778-bockw.dts34
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7779-marzen.dts80
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7779.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7790-lager.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7790-stout.dts16
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7791-koelsch.dts36
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7791-porter.dts27
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7792-blanche.dts84
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7792-wheat.dts55
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7792.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7793-gose.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7794-alt.dts10
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r8a7794-silk.dts18
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r9a06g032-rzn1d400-db.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/renesas/r9a06g032.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3036-kylin.dts21
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3036.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3066a.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3128-evb.dts5
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3128-xpi-3128.dts425
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3128.dtsi266
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk322x.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3288.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rk3xxx.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1108.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1109-sonoff-ihost.dts21
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1109.dtsi23
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2-io.dts35
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2.dtsi27
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1126-pinctrl.dtsi114
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dtsi404
-rw-r--r--sys/contrib/device-tree/src/arm/rockchip/rv1126.dtsi136
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4210-i9100.dts52
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4210-trats.dts8
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4210-universal_c210.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4210.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-3g8.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-lte8.dts44
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-wifi8.dts26
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3.dtsi1310
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4412-galaxy-s3.dtsi43
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4412-midas.dtsi60
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4412-n710x.dts39
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidu3.dts13
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidx.dts9
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos4x12.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos5250-snow-common.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu3-audio.dtsi19
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu4.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/s3c6410-mini6410.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/s5pv210-fascinate4g.dts33
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/s5pv210-galaxys.dts37
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/s5pv210-pinctrl.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/s5pv210-smdkv210.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/samsung/s5pv210.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/st/spear1310-evb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/spear1340-evb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/spear1340.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/st/spear13xx.dtsi24
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-dbx5x0.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-href-ab8500.dtsi48
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-href-ab8505.dtsi490
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-href-tvk1281618-r2.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-href.dtsi55
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-href520-tvk.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-hrefprev60-stuib.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-hrefprev60-tvk.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-hrefprev60.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-stuib.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-tvk.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-hrefv60plus.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-nomadik-stn8815.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-snowball.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina-tmo.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-gavini.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-janice.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-kyle.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stih407-family.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/st/stih418-b2264.dts16
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32429i-eval.dts1
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32746g-eval.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f469-disco.dts15
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f7-pinctrl.dtsi66
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f746-disco.dts72
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f746-pinctrl.dtsi44
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f746.dtsi118
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f769-disco.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32f769-pinctrl.dtsi44
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp131.dtsi85
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp135.dtsi11
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp135f-dk.dts68
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15-pinctrl.dtsi471
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15-scmi.dtsi23
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp151.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1c.dts32
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1l.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157a-dk1-scmi.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts24
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-edimm2.2.dts28
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157a-stinger96.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2-scmi.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-ed1-scmi.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-emsbc-argon.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-emstamp-argon.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1-scmi.dts5
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1.dts29
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen1.dts93
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen2.dts172
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-odyssey-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-osd32mp1-red.dts221
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp157c-phycore-stm32mp15-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xc-lxa-tac.dtsi603
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-drc02.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-pdk2.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-picoitx.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-avenger96.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-drc-compact.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-testbench.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-dkx.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/st/stm32mp15xx-osd32.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/davinci/da850-evm.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/davinci/da850-lcdk.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/davinci/da850-lego-ev3.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/davinci/da850.dtsi67
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2e-netcp.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-evm.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-netcp.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-evm.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-netcp.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l-netcp.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am335x-boneblack.dts3
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am335x-moxa-uc-2100-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am335x-osd335x-common.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am335x-pocketbeagle.dts57
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am33xx-l4.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am33xx.dtsi31
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am3517-evm.dts35
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am3517.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am4372.dtsi15
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am437x-idk-evm.dts14
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am437x-l4.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am571x-idk.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am5729-beagleboneai.dts9
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/am572x-idk-common.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/dra7-evm-common.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/dra7.dtsi11
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/dra71-evm.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/dra72-evm-common.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/dra76-evm.dts4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/dra76x.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/logicpd-torpedo-37xx-devkit.dts2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-common.dtsi281
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-handset.dtsi234
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-mz607-mz617.dtsi21
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-xt8xx.dtsi75
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap3-cpu-thermal.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap3-devkit8000-common.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap3-gta04.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap34xx.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap36xx.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-cpu-thermal.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-droid-bionic-xt875.dts11
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-droid4-xt894.dts19
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-epson-embt2ws.dts73
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-l4-abe.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-l4.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz609.dts46
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz617.dts17
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap443x.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap4460.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap5-board-common.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm/ti/omap/omap5-l4-abe.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100-allwinner-perf1.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1-manta.dts35
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1.dtsi138
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-pi.dts63
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero.dtsi131
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero2.dts122
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-x96-mate.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero2w.dts176
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero3.dts96
-rw-r--r--sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-transpeed-8k618-t.dts161
-rw-r--r--sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10.dtsi59
-rw-r--r--sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk_nand.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_swvp.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/amazon/alpine-v2.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/amazon/alpine-v3.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b0.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b1.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/elba-16core.dtsi197
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/elba-asic-common.dtsi70
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/elba-asic.dts28
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/elba-flash-parts.dtsi117
-rw-r--r--sys/contrib/device-tree/src/arm64/amd/elba.dtsi191
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/amlogic-c3.dtsi41
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-an400.dts39
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-khadas-vim4.dts54
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7.dtsi183
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-a1-ad402.dts147
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-a1.dtsi373
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-2.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-3.dts12
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-axg-s400.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-axg.dtsi36
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12-common.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12.dtsi40
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-radxa-zero.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-sei510.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-u200.dts341
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-x96-max.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-a311d-libretech-cc.dts121
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4-cm4io.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gsking-x.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking-pro.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking.dts12
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-go-ultra.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2l.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-ugoos-am6.dts12
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-w400.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gx-libretech-pc.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gx-p23x-q20x.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-kii-pro.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nanopi-k2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nexbox-a95x.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-odroidc2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p200.dts59
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p201.dts39
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-hub.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-play2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-p241.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc-v2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-khadas-vim2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-nexbox-a1.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-rbox-pro.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-khadas-vim3.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-libretech-cottonwood.dtsi614
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-s4-s805x2-aq222.dts66
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-s4.dtsi380
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air-gbit.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-bananapi.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-h96-max.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid-hc4.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-s905d3-libretech-cc.dts89
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-sei610.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air-gbit.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/apm/apm-shadowcat.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/apm/apm-storm.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/arm/corstone1000-fvp.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/arm/corstone1000-mps3.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/arm/corstone1000.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm64/arm/foundation-v8-gicv3.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm64/arm/juno-base.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm64/arm/juno-scmi.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm64/bitmain/bm1880.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/bcmbca/bcm4908.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-svk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-xmc.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/stingray/bcm958802a802x.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-board-base.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-pcie.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-usb.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynos5433-tm2-common.dtsi28
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynos5433.dtsi60
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynos7.dtsi27
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynos7885.dtsi45
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynos850-e850-96.dts73
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynos850.dtsi70
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynosautov9-sadk.dts57
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynosautov9.dtsi23
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynosautov920-pinctrl.dtsi1266
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynosautov920-sadk.dts88
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/exynosautov920.dtsi312
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/google/gs101-oriole.dts105
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.dtsi1249
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.h33
-rw-r--r--sys/contrib/device-tree/src/arm64/exynos/google/gs101.dtsi473
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1012a.dtsi80
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dts12
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var1.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var2.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var4.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28.dts17
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi102
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a-mbls10xxa.dts49
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a.dtsi32
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a.dtsi95
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a-mbls10xxa.dts56
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a.dtsi42
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a.dtsi74
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a-mbls10xxa.dts64
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a.dtsi42
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a.dtsi74
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa-qds.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa.dtsi119
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a.dts338
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_12_x_x.dtso29
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_14_x_x.dtso17
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_11_x.dtso49
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_7_x.dtso55
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_8_x.dtso47
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a.dtsi97
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a.dtsi11
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-clearfog.dts376
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-sr-som.dtsi73
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.1.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.2.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-v1.1.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-ss-audio.dtsi96
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-ss-conn.dtsi52
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-ss-dma.dtsi117
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-ss-img.dtsi36
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8-ss-lsio.dtsi33
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8dxl-evk.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-adma.dtsi46
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-conn.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-ddr.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8dxl.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-baseboard.dtsi81
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-kit.dts131
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-ddr4-evk.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-evk.dtsi92
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-nitrogen-r2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-overdrive.dtsi29
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-phg.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-phyboard-polis-rdk.dts51
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-phycore-som.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-phygate-tauri-l.dts489
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx-lvds-tm070jvhg33.dtso45
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-var-som.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw71xx.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx-0x-rpidsi.dtso90
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx.dtsi40
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx-0x-rpidsi.dtso90
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx.dtsi40
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7901.dts57
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7902.dts51
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7903.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7904.dts23
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905-0x.dts28
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905.dtsi303
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-mallow.dtsi173
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-nonwifi-mallow.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-wifi-mallow.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mm.dtsi23
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-baseboard.dtsi38
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-kit.dts133
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-common.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-display.dtsi121
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-ddr4-evk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-dimonoff-gateway-evk.dts160
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dtsi132
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-overdrive.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-rve-gateway.dts285
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx-lvds-tm070jvhg33.dtso45
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som-symphony.dts42
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn-venice-gw7902.dts38
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mn.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-beacon-kit.dts162
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-data-modul-edm-sbc.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-model-a.dts32
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a-bmb-08.dts528
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a.dtsi307
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk2.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk3.dts70
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-som.dtsi168
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-evk.dts88
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s-ep1.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-phyboard-pollux-rdk.dts162
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-phycore-som.dtsi168
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-reva.dtsi711
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-hdmi.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-lt6.dts101
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts100
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds-g133han01.dtso77
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl.dts37
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx-2x.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx.dtsi247
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx-2x.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx.dtsi390
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx-2x.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx.dtsi432
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-imx219.dtso80
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-rpidsi.dtso87
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx.dts291
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dahlia.dtsi56
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dev.dtsi55
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-mallow.dtsi199
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-nonwifi-mallow.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-wifi-mallow.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin.dtsi31
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mp.dtsi202
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-kontron-pitx-imx8m.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-devkit.dts32
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r2.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r3.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r4.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-nitrogen.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-phanbell.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-pico-pi.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-sr-som.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-thor96.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx-lvds-tm070jvhg33.dtso49
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq-zii-ultra.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8mq.dtsi202
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qm-apalis.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qm-mek.dts30
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-dma.dtsi71
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-img.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qm.dtsi212
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ai_ml.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qxp-mek.dts47
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ss-vpu.dtsi17
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8qxp.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8ulp-evk.dts145
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8ulp.dtsi100
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-aster.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris-v2.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx93-11x11-evk.dts102
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxca.dts709
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxla.dts642
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352.dtsi213
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/imx93.dtsi377
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/mba8mx.dtsi93
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/tqmls104xa-mbls10xxa-fman.dtsi104
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/tqmls1088a-mbls10xxa-mc.dtsi146
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa-mbls10xxa.dtsi136
-rw-r--r--sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa.dtsi58
-rw-r--r--sys/contrib/device-tree/src/arm64/hisilicon/hi3798cv200.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/hisilicon/hi6220.dtsi24
-rw-r--r--sys/contrib/device-tree/src/arm64/hisilicon/hikey970-pmic.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/hisilicon/hip06.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/hisilicon/hip07.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_agilex.dtsi55
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5.dtsi468
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5_socdk.dts39
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_n6000.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk_nand.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/intel/socfpga_n5x_socdk.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/lg/lg1312.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/lg/lg1313.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/ac5-98dx25xx.dtsi24
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier-cn9131.dts44
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier.dtsi34
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-3720-eDPU.dts47
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin-ultra.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin.dtsi22
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-3720-gl-mv1000.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-3720-turris-mox.dts99
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-3720-uDPU.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-7040-mochabin.dts26
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-8040-clearfog-gt-8k.dts22
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/armada-ap80x.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/cn9130-crb.dtsi46
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/cn9130-db-comexpress.dtsi96
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/cn9130-db.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/marvell/cn9131-db-comexpress.dtsi108
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt6358.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt6795-sony-xperia-m5.dts101
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt6795.dtsi253
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt7622-bananapi-bpi-r64.dts15
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt7622-rfb1.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt7622.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt7986a-bananapi-bpi-r3.dts15
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt7986a.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm-hana.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm.dtsi24
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8173-evb.dts7
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8173.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-evb.dts56
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-da7219.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-ts3a227e.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku0.dts24
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku1.dts24
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico.dts35
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico6.dts110
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu-sku22.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dtsi15
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku32.dts36
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku38.dts40
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kodama.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-krane.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui.dtsi138
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183-pumpkin.dts16
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8183.dtsi300
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8186.dtsi50
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8188-evb.dts387
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8188.dtsi956
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r1.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r5-sku2.dts64
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r0.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r4.dts77
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada.dtsi32
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8192.dtsi466
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8195-cherry.dtsi152
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8195-demo.dts42
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8195.dtsi500
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8365.dtsi210
-rw-r--r--sys/contrib/device-tree/src/arm64/mediatek/mt8395-genio-1200-evk.dts900
-rw-r--r--sys/contrib/device-tree/src/arm64/microchip/sparx5.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-common-npcm8xx.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-npcm845.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra132-norrin.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra132.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra186.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra194.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2180.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2371-2180.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2530.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2894.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210-p3450-0000.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210-smaug.dts71
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra210.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0000.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0008.dtsi34
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701.dtsi2044
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000+p3701-0000.dts2122
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000.dtsi41
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002+p3701-0008.dts178
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002.dtsi78
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3767.dtsi41
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0000.dts73
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0005.dts7
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234-sim-vdk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/nvidia/tegra234.dtsi439
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-d3-camera-mezzanine.dts81
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-usb-host.dtso8
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc.dts109
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/apq8039-t2.dts10
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/apq8096-db820c.dts61
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5018-rdp432-c2.dts84
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5018.dtsi400
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp-common.dtsi81
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp441.dts28
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp442.dts28
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp468.dts43
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp474.dts49
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq5332.dtsi80
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq6018.dtsi213
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq8074.dtsi203
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp-common.dtsi169
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp418.dts63
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp433.dts43
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp449.dts65
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp453.dts65
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp454.dts66
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/ipq9574.dtsi209
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-acer-a1-724.dts38
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-alcatel-idol347.dts187
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-asus-z00l.dts33
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-gplus-fl8005a.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-huawei-g7.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8150.dts92
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8910.dts117
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-modem-qdsp6.dtsi148
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-mtp.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a2015-common.dtsi83
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a3u-eur.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a5u-eur.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e2015-common.dtsi29
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e5.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-grandmax.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt5-common.dtsi105
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt510.dts112
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt58.dts110
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5-common.dtsi94
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5.dts17
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5x.dts41
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-serranove.dts95
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-uf896.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-ufi001c.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-ufi.dtsi33
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-wingtech-wt88047.dts89
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916-yiming-uz801v3.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8916.dtsi114
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8939-huawei-kiwi.dts242
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8939-longcheer-l9100.dts390
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8939-samsung-a7.dts569
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8939-sony-xperia-kanuti-tulip.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8939.dtsi265
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-daisy.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-mido.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-tissot.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-vince.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8953.dtsi246
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8976.dtsi169
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8992-xiaomi-libra.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8994-msft-lumia-octagon.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8994.dtsi103
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996-mtp.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996-oneplus-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone-dora.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-common.dtsi44
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-gemini.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996.dtsi325
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8996pro-xiaomi-natrium.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8998-fxtec-pro1.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8998-mtp.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8998-oneplus-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8998-sony-xperia-yoshino.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8998-xiaomi-sagit.dts3
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/msm8998.dtsi542
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm6125.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm6150.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm6150l.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm660.dtsi33
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm660l.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm7250b.dtsi48
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm7550ba.dtsi70
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8150b.dtsi48
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8150l.dtsi16
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8350b.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8350c.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8550.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8550ve.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8916.dtsi65
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8950.dtsi39
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8953.dtsi45
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8994.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pm8998.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmi8950.dtsi17
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmi8994.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmk8350.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmm8155au_1.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmm8155au_2.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmp8074.dtsi27
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmr735b.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmr735d_a.dtsi59
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmr735d_b.dtsi59
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pms405.dtsi21
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/pmx75.dtsi64
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qcm2290.dtsi662
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qcm6490-fairphone-fp5.dts921
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qcm6490-idp.dts468
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qcs404.dtsi171
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qcs6490-rb3gen2.dts455
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qdu1000-idp.dts26
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qdu1000.dtsi23
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qrb2210-rb1.dts440
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qrb4210-rb2.dts120
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5-vision-mezzanine.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5.dts171
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/qru1000-idp.dts16
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sa8540p-pmics.dtsi11
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sa8540p-ride.dts15
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sa8540p.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sa8775p-pmics.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sa8775p-ride.dts286
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sa8775p.dtsi1417
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-acer-aspire1.dts180
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-firmware-tfa.dtsi107
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-idp.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz-r1.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-homestar.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-kingoftown.dts13
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r10.dts29
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts7
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r10.dts45
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r4.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r9.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r1.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-kb.dts23
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-lte.dts27
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-kb.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-lte.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-parade.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-ti.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-parade.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-ti.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel360.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r1.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-quackingstick.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-r1.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682i-sku.dtsi38
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682s-sku.dtsi38
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts17
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts15
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor.dtsi31
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi407
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-chrome-common.dtsi61
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-crd-r3.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-lte-sku.dtsi7
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-wifi-sku.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dtsi21
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280-qcard.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi812
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8180x-lenovo-flex-5g.dts216
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8180x-pmics.dtsi36
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8180x-primus.dts224
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8180x.dtsi298
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8280xp-crd.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8280xp-lenovo-thinkpad-x13s.dts60
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8280xp-pmics.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sc8280xp.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sda660-inforce-ifc6560.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm630-sony-xperia-nile.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm630.dtsi281
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm632-fairphone-fp3.dts19
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm660-xiaomi-lavender.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm670.dtsi487
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-cheza.dtsi42
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-db845c.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-lg-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-mtp.dts103
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-common.dtsi25
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-enchilada.dts6
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-shift-axolotl.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akari.dts170
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akatsuki.dts168
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-apollo.dts170
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama.dtsi100
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-wcd9340.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-beryllium-common.dtsi24
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-polaris.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi262
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm850-lenovo-yoga-c630.dts65
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdm850-samsung-w737.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdx75-idp.dts259
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sdx75.dtsi249
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm4250-oneplus-billie2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm4450-qrd.dts32
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm4450.dtsi538
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6115-fxtec-pro1x.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6115.dtsi578
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6115p-lenovo-j606f.dts67
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6125-sony-xperia-seine-pdx201.dts78
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6125-xiaomi-laurel-sprout.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6125.dtsi401
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6350.dtsi514
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6375-sony-xperia-murray-pdx225.dts43
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm6375.dtsi311
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-common.dtsi423
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-joyeuse.dts16
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm7125.dtsi16
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm7225-fairphone-fp4.dts41
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8150-hdk.dts265
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8150-mtp.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8150-sony-xperia-kumano.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi346
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-hdk.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-mtp.dts22
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx203.dts366
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx206.dts243
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo.dtsi68
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-elish-common.dtsi49
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-pipa.dts623
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi1111
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8350-hdk.dts116
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8350-mtp.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi551
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8450-hdk.dts335
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8450-qrd.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8450-sony-xperia-nagara.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8450.dtsi637
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8550-mtp.dts197
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8550-qrd.dts278
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8550.dtsi614
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8650-mtp.dts727
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8650-qrd.dts811
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/sm8650.dtsi6013
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/x1e80100-crd.dts424
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/x1e80100-qcp.dts399
-rw-r--r--sys/contrib/device-tree/src/arm64/qcom/x1e80100.dtsi3527
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/beacon-renesom-baseboard.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/draak.dtsi32
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ebisu.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/gmsl-cameras.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/hihope-rev4.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a774a1.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a774b1.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a774c0.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a774e1.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77951.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77960.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77961.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77965.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77970-eagle.dts15
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77970-v3msk.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77980a.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77990-ebisu.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77990.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a77995.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider-cpu.dtsi46
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779f0.dtsi151
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779f4-s4sk.dts240
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779f4.dtsi12
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779g0-white-hawk-cpu.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m0.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m1-salvator-xs.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb-kf.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m1.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m2.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m3-salvator-xs.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb-kf.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m3.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m4.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m5-salvator-xs.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m5.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m6.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m7.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779m8.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r8a779mb.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a07g043.dtsi70
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a07g043u11-smarc.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a07g044c2-smarc.dts12
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a07g044l2-smarc.dts21
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a07g054l2-smarc.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a08g045.dtsi276
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33-smarc.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/r9a09g011.dtsi30
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rz-smarc-common.dtsi18
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-pinfunction.dtsi20
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-som.dtsi23
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc.dtsi43
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-pinfunction.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-som.dtsi27
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc.dtsi34
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-pinfunction.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-som.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc.dtsi37
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc-som.dtsi338
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc.dtsi93
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/salvator-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card-mix+split.dtsi16
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card.dtsi17
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi57
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card.dtsi27
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi108
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2.dtsi14
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi152
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card.dtsi77
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-kf.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card-mix+split.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/renesas/ulcb.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-common.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-ctouch2.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/px30-evb.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/px30-ringneck-haikou.dts13
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/px30.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3308-rock-pi-s.dts62
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3308.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3318-a95x-z2.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dts18
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dtsi478
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351v.dts44
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-a1.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-evb.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-nanopi-r2s.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus-lts.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-roc-cc.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock-pi-e.dts55
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3328.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3368-evb.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3368-geekbox.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3368-lion.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3368-orion-r68-meta.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3368-r88.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3368.dtsi5
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-eaidk-610.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-evb.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-ficus.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-firefly.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-bob.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-chromebook.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet-dumo.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-hugsun-x99.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-captain.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-v.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-kobol-helios64.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-leez-p710.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-nanopi4.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-orangepi.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma-haikou.dts42
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma.dtsi17
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-roc-pc.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4c-plus.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4se.dts65
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4a.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4b.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4c.dts11
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-rockpro64.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399-sapphire.dtsi3
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399.dtsi51
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3399pro-vmarc-som.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-lubancat-1.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rgb30.dts39
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dts38
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dtsi875
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-x55.dts926
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-quartz64-a.dts5
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-radxa-cm3-io.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-roc-pc.dts1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-blade.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-cm4.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-model-a.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3568-radxa-e25.dts24
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3568-roc-pc.dts643
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3568-rock-3a.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk356x.dtsi9
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts216
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi650
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a.dtsi1
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b-io.dts72
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b.dtsi359
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-evb1-v10.dts319
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-jaguar.dts802
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-nanopc-t6.dts916
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-orangepi-5-plus.dts847
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-quartzpro64.dts1137
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-rock-5b.dts236
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dts21
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dtsi612
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588.dtsi215
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s-coolpi-4b.dts812
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s-indiedroid-nova.dts97
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s-khadas-edge2.dts2
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s-orangepi-5.dts667
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s-pinctrl.dtsi46
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s-rock-5a.dts675
-rw-r--r--sys/contrib/device-tree/src/arm64/rockchip/rk3588s.dtsi462
-rw-r--r--sys/contrib/device-tree/src/arm64/socionext/uniphier-ld11.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/socionext/uniphier-ld20.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/socionext/uniphier-pxs3.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/sprd/ums512.dtsi39
-rw-r--r--sys/contrib/device-tree/src/arm64/sprd/ums9620-2h10.dts38
-rw-r--r--sys/contrib/device-tree/src/arm64/sprd/ums9620.dtsi245
-rw-r--r--sys/contrib/device-tree/src/arm64/st/stm32mp25-pinctrl.dtsi54
-rw-r--r--sys/contrib/device-tree/src/arm64/st/stm32mp251.dtsi35
-rw-r--r--sys/contrib/device-tree/src/arm64/st/stm32mp257f-ev1.dts27
-rw-r--r--sys/contrib/device-tree/src/arm64/tesla/fsd.dtsi57
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-main.dtsi160
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-mcu.dtsi26
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dahlia.dtsi61
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dev.dtsi53
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-mallow.dtsi188
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-wifi.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-yavia.dtsi8
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin.dtsi63
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62-wakeup.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62.dtsi11
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-ov5640.dtso77
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso77
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay.dts192
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-phyboard-lyra-rdk.dts98
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-sk.dts29
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-nonwifi-mallow.dts22
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-wifi-mallow.dts22
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62a-main.dtsi191
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62a-mcu.dtsi24
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62a7-sk.dts263
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p-main.dtsi894
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p-mcu.dtsi205
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p-thermal.dtsi47
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p-wakeup.dtsi97
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p.dtsi125
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p5-sk.dts609
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62p5.dtsi107
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-common.dtsi125
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-imx219.dtso84
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-ov5640.dtso82
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso82
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-hdmi-audio.dtso40
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am64-main.dtsi105
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am64-mcu.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am64-phycore-som.dtsi115
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-sdcard.dtso22
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-wlan.dtso22
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am642-evm.dts53
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am642-phyboard-electra-rdk.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am642-sk.dts47
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl-mbax4xxl.dts949
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl.dtsi266
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg1.dtsi10
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi6
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common.dtsi832
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am65-main.dtsi87
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am65-mcu.dtsi32
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am65-wakeup.dtsi13
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am652.dtsi74
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am6528-iot2050-basic-common.dtsi16
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am654-base-board.dts14
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am654-icssg2.dtso145
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am654-idk.dtso296
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-m2.dts16
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-base-board.dts222
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-som.dtsi208
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-am69-sk.dts644
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j7200-common-proc-board.dts22
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j7200-evm-quad-port-eth-exp.dtso2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j7200-main.dtsi32
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j7200-mcu-wakeup.dtsi49
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi154
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-beagleboneai64.dts63
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-common-proc-board.dts42
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-gesi-exp-board.dtso196
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-pcie0-ep.dtso53
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-quad-port-eth-exp.dtso2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-main.dtsi56
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-mcu-wakeup.dtsi53
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-sk.dts211
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi171
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721s2-common-proc-board.dts88
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-gesi-exp-board.dtso85
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-pcie1-ep.dtso53
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721s2-main.dtsi433
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721s2-mcu-wakeup.dtsi112
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j721s2-som-p0.dtsi416
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j784s4-evm.dts310
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j784s4-main.dtsi547
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j784s4-mcu-wakeup.dtsi80
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-j784s4.dtsi2
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-pinctrl.h12
-rw-r--r--sys/contrib/device-tree/src/arm64/ti/k3-serdes.h204
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-clk-ccf.dtsi4
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revA.dtso41
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revB.dtso43
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sm-k26-revA.dts23
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm015-dc1.dts12
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm016-dc2.dts20
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm017-dc3.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm018-dc4.dts26
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm019-dc5.dts16
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu100-revC.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu102-revA.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revA.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revC.dts4
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu106-revA.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu111-revA.dts8
-rw-r--r--sys/contrib/device-tree/src/arm64/xilinx/zynqmp.dtsi216
-rw-r--r--sys/contrib/device-tree/src/loongarch/loongson-2k0500-ref.dts88
-rw-r--r--sys/contrib/device-tree/src/loongarch/loongson-2k0500.dtsi266
-rw-r--r--sys/contrib/device-tree/src/loongarch/loongson-2k1000-ref.dts183
-rw-r--r--sys/contrib/device-tree/src/loongarch/loongson-2k1000.dtsi492
-rw-r--r--sys/contrib/device-tree/src/loongarch/loongson-2k2000-ref.dts72
-rw-r--r--sys/contrib/device-tree/src/loongarch/loongson-2k2000.dtsi300
-rw-r--r--sys/contrib/device-tree/src/mips/ingenic/jz4725b.dtsi1
-rw-r--r--sys/contrib/device-tree/src/mips/ingenic/jz4770.dtsi1
-rw-r--r--sys/contrib/device-tree/src/mips/loongson/loongson64-2k1000.dtsi3
-rw-r--r--sys/contrib/device-tree/src/mips/loongson/ls7a-pch.dtsi3
-rw-r--r--sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc1.dts2
-rw-r--r--sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc2.dts2
-rw-r--r--sys/contrib/device-tree/src/mips/ralink/mt7621.dtsi5
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/c293si-post.dtsi12
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/p1022rdk.dts10
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/p1022si-post.dtsi2
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/p3041ds.dts4
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/p5040ds.dts2
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/t1023si-post.dtsi79
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/t1040si-post.dtsi71
-rw-r--r--sys/contrib/device-tree/src/powerpc/fsl/t4240qds.dts2
-rw-r--r--sys/contrib/device-tree/src/powerpc/mpc5121.dtsi2
-rw-r--r--sys/contrib/device-tree/src/powerpc/mpc5125twr.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-common-regulators.dtsi2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-dongshan-nezha-stu.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-dock.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-mangopi-mq-pro.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-nezha.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1.dtsi2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s-mangopi-mq.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s.dtsi45
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1-t113.dtsi2
-rw-r--r--sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1s-t113.dtsi46
-rw-r--r--sys/contrib/device-tree/src/riscv/microchip/mpfs-icicle-kit.dts28
-rw-r--r--sys/contrib/device-tree/src/riscv/microchip/mpfs-m100pfsevp.dts7
-rw-r--r--sys/contrib/device-tree/src/riscv/microchip/mpfs-polarberry.dts7
-rw-r--r--sys/contrib/device-tree/src/riscv/microchip/mpfs-sev-kit.dts7
-rw-r--r--sys/contrib/device-tree/src/riscv/microchip/mpfs-tysom-m.dts7
-rw-r--r--sys/contrib/device-tree/src/riscv/microchip/mpfs.dtsi33
-rw-r--r--sys/contrib/device-tree/src/riscv/renesas/r9a07g043f.dtsi17
-rw-r--r--sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc-som.dtsi25
-rw-r--r--sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc.dtsi56
-rw-r--r--sys/contrib/device-tree/src/riscv/sifive/fu540-c000.dtsi15
-rw-r--r--sys/contrib/device-tree/src/riscv/sifive/fu740-c000.dtsi15
-rw-r--r--sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts1
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/cv1800b-milkv-duo.dts38
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/cv1800b.dtsi18
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/cv1812h-huashan-pi.dts48
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/cv1812h.dtsi24
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/cv18xx.dtsi192
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/sg2042-cpus.dtsi2000
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/sg2042-milkv-pioneer.dts19
-rw-r--r--sys/contrib/device-tree/src/riscv/sophgo/sg2042.dtsi341
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7100-common.dtsi131
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7100.dtsi99
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7110-pinfunc.h4
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dts13
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dts31
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2.dtsi396
-rw-r--r--sys/contrib/device-tree/src/riscv/starfive/jh7110.dtsi596
-rw-r--r--sys/contrib/device-tree/src/riscv/thead/th1520-beaglev-ahead.dts81
-rw-r--r--sys/contrib/device-tree/src/riscv/thead/th1520-lichee-module-4a.dtsi22
-rw-r--r--sys/contrib/device-tree/src/riscv/thead/th1520-lichee-pi-4a.dts2
-rw-r--r--sys/contrib/device-tree/src/riscv/thead/th1520.dtsi49
-rwxr-xr-xsys/contrib/openzfs/cmd/arcstat.in10
-rw-r--r--sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c2
-rw-r--r--sys/contrib/openzfs/cmd/zpool/zpool_main.c2
-rw-r--r--sys/contrib/openzfs/config/always-pyzfs.m49
-rw-r--r--sys/contrib/openzfs/config/ax_python_devel.m4341
-rw-r--r--sys/contrib/openzfs/config/find_system_library.m44
-rw-r--r--sys/contrib/openzfs/config/user-backtrace.m414
-rw-r--r--sys/contrib/openzfs/config/user-libunwind.m444
-rw-r--r--sys/contrib/openzfs/config/user.m44
-rw-r--r--sys/contrib/openzfs/contrib/debian/control2
-rw-r--r--sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h27
-rw-r--r--sys/contrib/openzfs/include/sys/dsl_scan.h1
-rw-r--r--sys/contrib/openzfs/include/sys/spa.h6
-rw-r--r--sys/contrib/openzfs/include/sys/spa_impl.h9
-rw-r--r--sys/contrib/openzfs/include/sys/uberblock_impl.h16
-rw-r--r--sys/contrib/openzfs/include/sys/vdev_impl.h2
-rw-r--r--sys/contrib/openzfs/include/sys/zfs_context.h8
-rw-r--r--sys/contrib/openzfs/include/sys/zio.h3
-rw-r--r--sys/contrib/openzfs/lib/libspl/Makefile.am4
-rw-r--r--sys/contrib/openzfs/lib/libspl/assert.c112
-rw-r--r--sys/contrib/openzfs/lib/libuutil/uu_list.c14
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c15
-rw-r--r--sys/contrib/openzfs/lib/libzpool/kernel.c5
-rw-r--r--sys/contrib/openzfs/lib/libzpool/taskq.c4
-rw-r--r--sys/contrib/openzfs/man/man4/zfs.441
-rw-r--r--sys/contrib/openzfs/man/man8/zpool-clear.87
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c2
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c7
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_objset.c8
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_scan.c6
-rw-r--r--sys/contrib/openzfs/module/zfs/mmp.c5
-rw-r--r--sys/contrib/openzfs/module/zfs/spa.c193
-rw-r--r--sys/contrib/openzfs/module/zfs/spa_misc.c22
-rw-r--r--sys/contrib/openzfs/module/zfs/txg.c9
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev.c22
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_label.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_raidz.c5
-rw-r--r--sys/contrib/openzfs/module/zfs/zap.c336
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_ioctl.c9
-rw-r--r--sys/contrib/openzfs/module/zfs/zio.c17
-rw-r--r--sys/contrib/openzfs/module/zfs/zio_inject.c6
-rw-r--r--sys/contrib/openzfs/tests/runfiles/common.run4
-rw-r--r--sys/contrib/openzfs/tests/runfiles/linux.run2
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am4
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_write_slow_disk.ksh97
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/cleanup.ksh34
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/setup.ksh35
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/zap_shrink_001_pos.ksh81
-rw-r--r--sys/dev/aic7xxx/ahc_pci.c12
-rw-r--r--sys/dev/aic7xxx/aic79xx.c19
-rw-r--r--sys/dev/aic7xxx/aic7xxx.c19
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_symbol.c7
-rw-r--r--sys/dev/axgbe/if_axgbe_pci.c98
-rw-r--r--sys/dev/axgbe/xgbe-common.h16
-rw-r--r--sys/dev/axgbe/xgbe-dev.c9
-rw-r--r--sys/dev/axgbe/xgbe-i2c.c2
-rw-r--r--sys/dev/axgbe/xgbe-phy-v2.c186
-rw-r--r--sys/dev/axgbe/xgbe-sysctl.c16
-rw-r--r--sys/dev/axgbe/xgbe-txrx.c7
-rw-r--r--sys/dev/axgbe/xgbe.h6
-rw-r--r--sys/dev/clk/starfive/jh7110_clk.c277
-rw-r--r--sys/dev/clk/starfive/jh7110_clk.h72
-rw-r--r--sys/dev/clk/starfive/jh7110_clk_aon.c168
-rw-r--r--sys/dev/clk/starfive/jh7110_clk_pll.c386
-rw-r--r--sys/dev/clk/starfive/jh7110_clk_pll.h211
-rw-r--r--sys/dev/clk/starfive/jh7110_clk_sys.c261
-rw-r--r--sys/dev/cxgbe/adapter.h7
-rw-r--r--sys/dev/cxgbe/common/common.h52
-rw-r--r--sys/dev/cxgbe/common/t4_hw.c189
-rw-r--r--sys/dev/cxgbe/crypto/t4_crypto.c2
-rw-r--r--sys/dev/cxgbe/crypto/t6_kern_tls.c4
-rw-r--r--sys/dev/cxgbe/offload.h6
-rw-r--r--sys/dev/cxgbe/t4_filter.c43
-rw-r--r--sys/dev/cxgbe/t4_main.c54
-rw-r--r--sys/dev/cxgbe/t4_sched.c2
-rw-r--r--sys/dev/cxgbe/t4_sge.c19
-rw-r--r--sys/dev/cxgbe/tom/t4_ddp.c52
-rw-r--r--sys/dev/cxgbe/tom/t4_tls.c50
-rw-r--r--sys/dev/cxgbe/tom/t4_tom.c50
-rw-r--r--sys/dev/etherswitch/ip17x/ip17x.c4
-rw-r--r--sys/dev/etherswitch/ukswitch/ukswitch.c4
-rw-r--r--sys/dev/hwpmc/pmu_dmc620.c2
-rw-r--r--sys/dev/iicbus/iic.c16
-rw-r--r--sys/dev/md/md.c50
-rw-r--r--sys/dev/mii/miidevs1
-rw-r--r--sys/dev/mii/rgephy.c6
-rw-r--r--sys/dev/mii/rgephyreg.h1
-rw-r--r--sys/dev/mlx4/mlx4_en/mlx4_en_tx.c8
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_main.c3
-rw-r--r--sys/dev/mmc/host/dwmmc_starfive.c114
-rw-r--r--sys/dev/nvme/nvme.h35
-rw-r--r--sys/dev/nvme/nvme_ctrlr.c8
-rw-r--r--sys/dev/nvme/nvme_ns.c4
-rw-r--r--sys/dev/nvme/nvme_private.h4
-rw-r--r--sys/dev/nvme/nvme_qpair.c41
-rw-r--r--sys/dev/nvme/nvme_sim.c2
-rw-r--r--sys/dev/nvme/nvme_sysctl.c5
-rw-r--r--sys/dev/nvmf/controller/ctl_frontend_nvmf.c1123
-rw-r--r--sys/dev/nvmf/controller/nvmft_controller.c1130
-rw-r--r--sys/dev/nvmf/controller/nvmft_qpair.c361
-rw-r--r--sys/dev/nvmf/controller/nvmft_subr.c259
-rw-r--r--sys/dev/nvmf/controller/nvmft_subr.h47
-rw-r--r--sys/dev/nvmf/controller/nvmft_var.h174
-rw-r--r--sys/dev/nvmf/host/nvmf.c938
-rw-r--r--sys/dev/nvmf/host/nvmf_aer.c290
-rw-r--r--sys/dev/nvmf/host/nvmf_cmd.c171
-rw-r--r--sys/dev/nvmf/host/nvmf_ctldev.c159
-rw-r--r--sys/dev/nvmf/host/nvmf_ns.c482
-rw-r--r--sys/dev/nvmf/host/nvmf_qpair.c386
-rw-r--r--sys/dev/nvmf/host/nvmf_sim.c332
-rw-r--r--sys/dev/nvmf/host/nvmf_var.h208
-rw-r--r--sys/dev/nvmf/nvmf.h79
-rw-r--r--sys/dev/nvmf/nvmf_proto.h765
-rw-r--r--sys/dev/nvmf/nvmf_tcp.c1867
-rw-r--r--sys/dev/nvmf/nvmf_tcp.h276
-rw-r--r--sys/dev/nvmf/nvmf_transport.c342
-rw-r--r--sys/dev/nvmf/nvmf_transport.h140
-rw-r--r--sys/dev/nvmf/nvmf_transport_internal.h128
-rw-r--r--sys/dev/pci/pci_host_generic_acpi.c5
-rw-r--r--sys/dev/psci/psci.c16
-rw-r--r--sys/dev/psci/smccc_arm64.S2
-rw-r--r--sys/dev/rtsx/rtsx.c4
-rw-r--r--sys/dev/sound/driver.c1
-rw-r--r--sys/dev/sound/pci/atiixp.c4
-rw-r--r--sys/dev/sound/pci/csa.c1
-rw-r--r--sys/dev/sound/pci/csamidi.c1
-rw-r--r--sys/dev/sound/pci/csapcm.c1
-rw-r--r--sys/dev/sound/pci/emu10kx-midi.c1
-rw-r--r--sys/dev/sound/pci/emu10kx-pcm.c1
-rw-r--r--sys/dev/sound/pci/emu10kx.c1
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c11
-rw-r--r--sys/dev/sound/pci/hda/hdaa_patches.c16
-rw-r--r--sys/dev/sound/pci/hda/hdac.h4
-rw-r--r--sys/dev/sound/pci/hdsp-pcm.c1134
-rw-r--r--sys/dev/sound/pci/hdsp.c793
-rw-r--r--sys/dev/sound/pci/hdsp.h257
-rw-r--r--sys/dev/sound/pci/hdspe-pcm.c1
-rw-r--r--sys/dev/sound/pci/hdspe.c1
-rw-r--r--sys/dev/sound/pci/ich.c4
-rw-r--r--sys/dev/sound/pci/maestro3.c4
-rw-r--r--sys/dev/sound/pci/solo.c1
-rw-r--r--sys/dev/sound/pcm/channel.c212
-rw-r--r--sys/dev/sound/pcm/channel.h17
-rw-r--r--sys/dev/sound/pcm/dsp.c401
-rw-r--r--sys/dev/sound/pcm/dsp.h5
-rw-r--r--sys/dev/sound/pcm/feeder.c5
-rw-r--r--sys/dev/sound/pcm/feeder_format.c15
-rw-r--r--sys/dev/sound/pcm/feeder_matrix.c4
-rw-r--r--sys/dev/sound/pcm/feeder_volume.c2
-rw-r--r--sys/dev/sound/pcm/mixer.c230
-rw-r--r--sys/dev/sound/pcm/mixer.h2
-rw-r--r--sys/dev/sound/pcm/sndstat.c117
-rw-r--r--sys/dev/sound/pcm/sound.c594
-rw-r--r--sys/dev/sound/pcm/sound.h92
-rw-r--r--sys/dev/sound/pcm/vchan.c206
-rw-r--r--sys/dev/sound/pcm/vchan.h7
-rw-r--r--sys/dev/sound/unit.c188
-rw-r--r--sys/dev/sound/usb/uaudio.c1
-rw-r--r--sys/dev/sound/usb/uaudio_pcm.c1
-rw-r--r--sys/dev/tpm/tpm20.c16
-rw-r--r--sys/dev/tpm/tpm20.h54
-rw-r--r--sys/dev/tpm/tpm_bus.c99
-rw-r--r--sys/dev/tpm/tpm_crb.c67
-rw-r--r--[-rwxr-xr-x]sys/dev/tpm/tpm_if.m (renamed from tools/test/stress2/misc/gbde.sh)69
-rw-r--r--sys/dev/tpm/tpm_spibus.c166
-rw-r--r--sys/dev/tpm/tpm_tis_acpi.c86
-rw-r--r--sys/dev/tpm/tpm_tis_core.c (renamed from sys/dev/tpm/tpm_tis.c)119
-rw-r--r--sys/dev/tpm/tpm_tis_spibus.c91
-rw-r--r--sys/dev/uart/uart_bus_fdt.c3
-rw-r--r--sys/dev/uart/uart_cpu_acpi.c83
-rw-r--r--sys/dev/usb/net/if_smsc.c4
-rw-r--r--sys/dev/usb/quirk/usb_quirk.c844
-rw-r--r--sys/dev/usb/usbdevs10
-rw-r--r--sys/dev/xen/debug/debug.c10
-rw-r--r--sys/dts/freebsd-compatible.dts2
-rw-r--r--sys/fs/devfs/devfs_vnops.c3
-rw-r--r--sys/fs/ext2fs/ext2_vfsops.c2
-rw-r--r--sys/fs/fuse/fuse_node.c2
-rw-r--r--sys/fs/fuse/fuse_vfsops.c2
-rw-r--r--sys/fs/fuse/fuse_vnops.c20
-rw-r--r--sys/fs/nfs/nfs_var.h2
-rw-r--r--sys/fs/nfsclient/nfs_clbio.c2
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c12
-rw-r--r--sys/fs/nfsserver/nfs_nfsdserv.c11
-rw-r--r--sys/fs/procfs/procfs_osrel.c7
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c19
-rw-r--r--sys/fs/unionfs/union_vnops.c152
-rw-r--r--sys/geom/bde/g_bde.c296
-rw-r--r--sys/geom/bde/g_bde.h215
-rw-r--r--sys/geom/bde/g_bde_crypt.c358
-rw-r--r--sys/geom/bde/g_bde_lock.c478
-rw-r--r--sys/geom/bde/g_bde_work.c778
-rw-r--r--sys/geom/eli/g_eli.c256
-rw-r--r--sys/geom/geom_io.c38
-rw-r--r--sys/geom/geom_slice.c1
-rw-r--r--sys/geom/geom_subr.c1
-rw-r--r--sys/geom/geom_vfs.c15
-rw-r--r--sys/geom/label/g_label.c1
-rw-r--r--sys/geom/label/g_label.h1
-rw-r--r--sys/geom/label/g_label_swaplinux.c91
-rw-r--r--sys/geom/notes6
-rw-r--r--sys/geom/stripe/g_stripe.c21
-rw-r--r--sys/geom/stripe/g_stripe.h3
-rw-r--r--sys/i386/conf/MINIMAL17
-rw-r--r--sys/i386/i386/uio_machdep.c16
-rw-r--r--sys/i386/include/vmparam.h1
-rw-r--r--sys/i386/linux/linux_machdep.c61
-rw-r--r--sys/i386/linux/linux_proto.h4
-rw-r--r--sys/i386/linux/linux_systrace_args.c8
-rw-r--r--sys/i386/linux/syscalls.master4
-rw-r--r--sys/kern/init_sysent.c4
-rw-r--r--sys/kern/kern_boottrace.c2
-rw-r--r--sys/kern/kern_cons.c32
-rw-r--r--sys/kern/kern_devctl.c6
-rw-r--r--sys/kern/kern_intr.c24
-rw-r--r--sys/kern/kern_linker.c14
-rw-r--r--sys/kern/kern_lock.c7
-rw-r--r--sys/kern/kern_mbuf.c1
-rw-r--r--sys/kern/kern_osd.c23
-rw-r--r--sys/kern/kern_physio.c14
-rw-r--r--sys/kern/kern_shutdown.c3
-rw-r--r--sys/kern/kern_sysctl.c6
-rw-r--r--sys/kern/kern_xxx.c3
-rw-r--r--sys/kern/subr_boot.c6
-rw-r--r--sys/kern/subr_busdma_bounce.c70
-rw-r--r--sys/kern/subr_fattime.c41
-rw-r--r--sys/kern/subr_intr.c10
-rw-r--r--sys/kern/subr_param.c1
-rw-r--r--sys/kern/subr_rman.c129
-rw-r--r--sys/kern/subr_uio.c16
-rw-r--r--sys/kern/subr_vmem.c6
-rw-r--r--sys/kern/sys_capability.c2
-rw-r--r--sys/kern/sys_generic.c7
-rw-r--r--sys/kern/syscalls.master4
-rw-r--r--sys/kern/sysv_msg.c34
-rw-r--r--sys/kern/sysv_sem.c33
-rw-r--r--sys/kern/sysv_shm.c40
-rw-r--r--sys/kern/uipc_mqueue.c200
-rw-r--r--sys/kern/uipc_shm.c26
-rw-r--r--sys/kern/uipc_socket.c52
-rw-r--r--sys/kern/vfs_bio.c21
-rw-r--r--sys/kern/vfs_mount.c11
-rw-r--r--sys/kern/vfs_vnops.c7
-rw-r--r--sys/modules/Makefile11
-rw-r--r--sys/modules/aic7xxx/ahc/Makefile2
-rw-r--r--sys/modules/aic7xxx/ahd/Makefile4
-rw-r--r--sys/modules/ctl/Makefile2
-rw-r--r--sys/modules/dtb/rockchip/Makefile1
-rw-r--r--sys/modules/geom/Makefile3
-rw-r--r--sys/modules/geom/geom_bde/Makefile10
-rw-r--r--sys/modules/geom/geom_label/Makefile1
-rw-r--r--sys/modules/ice_ddp/Makefile4
-rw-r--r--sys/modules/linux/Makefile2
-rw-r--r--sys/modules/linuxkpi_hdmi/Makefile1
-rw-r--r--sys/modules/linuxkpi_video/Makefile15
-rw-r--r--sys/modules/mac_do/Makefile6
-rw-r--r--sys/modules/nvmf/Makefile6
-rw-r--r--sys/modules/nvmf/nvmf/Makefile13
-rw-r--r--sys/modules/nvmf/nvmf_tcp/Makefile7
-rw-r--r--sys/modules/nvmf/nvmf_transport/Makefile9
-rw-r--r--sys/modules/nvmf/nvmft/Makefile10
-rw-r--r--sys/modules/qatfw/qat_200xx/Makefile2
-rw-r--r--sys/modules/qatfw/qat_4xxx/Makefile2
-rw-r--r--sys/modules/qatfw/qat_c3xxx/Makefile2
-rw-r--r--sys/modules/qatfw/qat_c4xxx/Makefile2
-rw-r--r--sys/modules/qatfw/qat_c62x/Makefile2
-rw-r--r--sys/modules/qatfw/qat_dh895xcc/Makefile2
-rw-r--r--sys/modules/sound/driver/Makefile2
-rw-r--r--sys/modules/sound/driver/hdsp/Makefile7
-rw-r--r--sys/modules/sound/sound/Makefile2
-rw-r--r--sys/modules/tpm/Makefile22
-rw-r--r--sys/modules/zfs/zfs_config.h13
-rw-r--r--sys/modules/zfs/zfs_gitrev.h2
-rw-r--r--sys/net/if.c3
-rw-r--r--sys/net/if_lagg.c57
-rw-r--r--sys/net/if_ovpn.c9
-rw-r--r--sys/net/if_vlan.c10
-rw-r--r--sys/net/if_vxlan.c23
-rw-r--r--sys/net80211/_ieee80211.h21
-rw-r--r--sys/net80211/ieee80211.c34
-rw-r--r--sys/net80211/ieee80211.h67
-rw-r--r--sys/net80211/ieee80211_crypto.c75
-rw-r--r--sys/net80211/ieee80211_crypto.h28
-rw-r--r--sys/net80211/ieee80211_freebsd.h7
-rw-r--r--sys/net80211/ieee80211_ioctl.c6
-rw-r--r--sys/net80211/ieee80211_ioctl.h4
-rw-r--r--sys/net80211/ieee80211_var.h12
-rw-r--r--sys/netinet/cc/cc_cdg.c8
-rw-r--r--sys/netinet/cc/cc_chd.c9
-rw-r--r--sys/netinet/cc/cc_hd.c7
-rw-r--r--sys/netinet/icmp6.h13
-rw-r--r--sys/netinet/in_fib_dxr.c131
-rw-r--r--sys/netinet/in_kdtrace.c1
-rw-r--r--sys/netinet/in_kdtrace.h1
-rw-r--r--sys/netinet/in_pcb.c4
-rw-r--r--sys/netinet/ip_carp.c926
-rw-r--r--sys/netinet/ip_carp.h55
-rw-r--r--sys/netinet/ip_carp_nl.h3
-rw-r--r--sys/netinet/ip_fw.h2
-rw-r--r--sys/netinet/sctp_header.h2
-rw-r--r--sys/netinet/sctp_indata.c20
-rw-r--r--sys/netinet/sctp_input.c6
-rw-r--r--sys/netinet/sctp_output.c37
-rw-r--r--sys/netinet/sctp_pcb.c14
-rw-r--r--sys/netinet/sctp_pcb.h6
-rw-r--r--sys/netinet/sctp_usrreq.c6
-rw-r--r--sys/netinet/sctputil.c22
-rw-r--r--sys/netinet/tcp_hostcache.c1
-rw-r--r--sys/netinet/tcp_input.c74
-rw-r--r--sys/netinet/tcp_output.c5
-rw-r--r--sys/netinet/tcp_sack.c10
-rw-r--r--sys/netinet/tcp_stacks/bbr.c31
-rw-r--r--sys/netinet/tcp_stacks/rack.c735
-rw-r--r--sys/netinet/tcp_stacks/sack_filter.c416
-rw-r--r--sys/netinet/tcp_stacks/sack_filter.h91
-rw-r--r--sys/netinet/tcp_stacks/tcp_rack.h9
-rw-r--r--sys/netinet/tcp_subr.c92
-rw-r--r--sys/netinet/tcp_timer.c10
-rw-r--r--sys/netinet/tcp_usrreq.c23
-rw-r--r--sys/netinet/tcp_var.h19
-rw-r--r--sys/netinet6/icmp6.c4
-rw-r--r--sys/netinet6/in6.h8
-rw-r--r--sys/netinet6/in6_rmx.c1
-rw-r--r--sys/netlink/netlink_message_writer.h6
-rw-r--r--sys/netlink/netlink_snl.h44
-rw-r--r--sys/netlink/netlink_snl_route.h2
-rw-r--r--sys/netlink/netlink_snl_route_parsers.h10
-rw-r--r--sys/netpfil/pf/pf.c3
-rw-r--r--sys/netpfil/pf/pf_nl.c114
-rw-r--r--sys/netpfil/pf/pf_nl.h29
-rw-r--r--sys/netpfil/pf/pflow.c4
-rw-r--r--sys/powerpc/conf/GENERIC1
-rw-r--r--sys/powerpc/conf/GENERIC641
-rw-r--r--sys/powerpc/conf/GENERIC64LE1
-rw-r--r--sys/powerpc/include/vmparam.h8
-rw-r--r--sys/powerpc/powerpc/busdma_machdep.c71
-rw-r--r--sys/powerpc/powerpc/uio_machdep.c16
-rw-r--r--sys/riscv/conf/std.starfive4
-rw-r--r--sys/riscv/include/atomic.h37
-rw-r--r--sys/riscv/include/pmap.h10
-rw-r--r--sys/riscv/include/vmparam.h4
-rw-r--r--sys/riscv/riscv/busdma_bounce.c72
-rw-r--r--sys/riscv/riscv/mem.c13
-rw-r--r--sys/riscv/riscv/pmap.c2
-rw-r--r--sys/riscv/riscv/timer.c7
-rw-r--r--sys/riscv/riscv/uio_machdep.c16
-rw-r--r--sys/riscv/riscv/uma_machdep.c68
-rw-r--r--sys/riscv/starfive/files.starfive7
-rw-r--r--sys/riscv/starfive/starfive_syscon.c87
-rw-r--r--sys/security/mac_do/mac_do.c545
-rw-r--r--sys/sys/_bitset.h4
-rw-r--r--sys/sys/_endian.h6
-rw-r--r--sys/sys/_maxphys.h10
-rw-r--r--sys/sys/buf.h7
-rw-r--r--sys/sys/bufobj.h2
-rw-r--r--sys/sys/cdefs.h12
-rw-r--r--sys/sys/cons.h3
-rw-r--r--sys/sys/disk.h2
-rw-r--r--sys/sys/interrupt.h6
-rw-r--r--sys/sys/linker.h6
-rw-r--r--sys/sys/lockmgr.h4
-rw-r--r--sys/sys/mbuf.h1
-rw-r--r--sys/sys/msg.h3
-rw-r--r--sys/sys/osd.h5
-rw-r--r--sys/sys/param.h8
-rw-r--r--sys/sys/protosw.h24
-rw-r--r--sys/sys/reboot.h1
-rw-r--r--sys/sys/rman.h29
-rw-r--r--sys/sys/sdt.h37
-rw-r--r--sys/sys/sem.h3
-rw-r--r--sys/sys/shm.h6
-rw-r--r--sys/sys/signal.h2
-rw-r--r--sys/sys/sndstat.h5
-rw-r--r--sys/sys/soundcard.h6
-rw-r--r--sys/sys/syscallsubr.h10
-rw-r--r--sys/sys/vnode.h7
-rw-r--r--sys/ufs/ffs/ffs_suspend.c7
-rw-r--r--sys/vm/device_pager.c70
-rw-r--r--sys/vm/swap_pager.c4
-rw-r--r--sys/vm/uma_core.c55
-rw-r--r--sys/vm/vm_extern.h4
-rw-r--r--sys/vm/vm_glue.c14
-rw-r--r--sys/vm/vm_map.c8
-rw-r--r--sys/vm/vm_page.c12
-rw-r--r--sys/vm/vm_pageout.c16
-rw-r--r--sys/vm/vm_pagequeue.h6
-rw-r--r--sys/vm/vm_pager.c2
-rw-r--r--sys/vm/vm_radix.c2
-rw-r--r--sys/vm/vnode_pager.c45
-rw-r--r--sys/x86/acpica/madt.c7
-rw-r--r--sys/x86/conf/NOTES5
-rw-r--r--sys/x86/include/apicvar.h7
-rw-r--r--sys/x86/include/intr_machdep.h10
-rw-r--r--sys/x86/include/iommu.h1
-rw-r--r--sys/x86/include/specialreg.h47
-rw-r--r--sys/x86/include/vmware.h8
-rw-r--r--sys/x86/include/vmware_guestrpc.h (renamed from sys/dev/sound/chip.h)30
-rw-r--r--sys/x86/include/x86_var.h1
-rw-r--r--sys/x86/include/xen/arch-intr.h4
-rw-r--r--sys/x86/iommu/intel_ctx.c25
-rw-r--r--sys/x86/iommu/intel_dmar.h9
-rw-r--r--sys/x86/iommu/intel_drv.c7
-rw-r--r--sys/x86/iommu/intel_fault.c1
-rw-r--r--sys/x86/iommu/intel_idpgtbl.c77
-rw-r--r--sys/x86/iommu/intel_intrmap.c3
-rw-r--r--sys/x86/iommu/intel_qi.c3
-rw-r--r--sys/x86/iommu/intel_quirks.c1
-rw-r--r--sys/x86/iommu/intel_reg.h15
-rw-r--r--sys/x86/iommu/intel_utils.c128
-rw-r--r--sys/x86/iommu/iommu_utils.c164
-rw-r--r--sys/x86/iommu/x86_iommu.h (renamed from sys/dev/sound/version.h)50
-rw-r--r--sys/x86/x86/busdma_bounce.c98
-rw-r--r--sys/x86/x86/identcpu.c15
-rw-r--r--sys/x86/x86/intr_machdep.c19
-rw-r--r--sys/x86/x86/nexus.c21
-rw-r--r--sys/x86/x86/tsc.c2
-rw-r--r--sys/x86/x86/vmware_guestrpc.c337
-rw-r--r--targets/pseudo/userland/Makefile.depend1
-rw-r--r--tests/ci/Makefile18
-rw-r--r--tests/sys/fs/fusefs/bmap.cc25
-rw-r--r--tests/sys/fs/fusefs/read.cc2
-rw-r--r--tests/sys/fs/fusefs/utils.cc13
-rw-r--r--tests/sys/fs/fusefs/utils.hh2
-rw-r--r--tests/sys/fs/fusefs/write.cc7
-rw-r--r--tests/sys/geom/class/eli/attach_test.sh29
-rw-r--r--tests/sys/kern/sendfile_helper.c152
-rwxr-xr-xtests/sys/kern/sendfile_test.sh24
-rwxr-xr-xtests/sys/net/if_lagg_test.sh9
-rw-r--r--tests/sys/net/if_ovpn/if_ovpn.sh8
-rwxr-xr-xtests/sys/net/if_vlan.sh47
-rw-r--r--tests/sys/netinet/carp.py14
-rwxr-xr-xtests/sys/netinet/carp.sh98
-rw-r--r--tests/sys/netpfil/pf/nat66.py2
-rw-r--r--tests/sys/vm/soxstack/soxstack.c4
-rwxr-xr-xtools/build/beinstall.sh15
-rwxr-xr-xtools/build/checkstyle9.pl2
-rw-r--r--tools/build/cross-build/include/common/sys/_types.h3
-rw-r--r--tools/build/cross-build/include/linux/string.h2
-rw-r--r--tools/build/cross-build/include/linux/sys/param.h2
-rw-r--r--tools/build/cross-build/include/linux/sys/types.h28
-rw-r--r--tools/build/cross-build/include/mac/sys/_types.h2
-rw-r--r--tools/build/cross-build/progname.c4
-rw-r--r--tools/build/fcntl.h7
-rw-r--r--tools/build/mk/Makefile.boot4
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc2
-rw-r--r--tools/build/options/WITHOUT_AUTOFS2
-rw-r--r--tools/build/options/WITHOUT_BRANCH_PROTECTION1
-rw-r--r--tools/build/options/WITHOUT_SSP3
-rw-r--r--tools/build/options/WITHOUT_UNDEFINED_VERSION2
-rw-r--r--tools/build/options/WITH_BRANCH_PROTECTION4
-rw-r--r--tools/build/options/WITH_SSP3
-rw-r--r--tools/build/options/WITH_UNDEFINED_VERSION4
-rwxr-xr-xtools/build/options/makeman6
-rw-r--r--tools/regression/iscsi/initiator-instructions.txt6
-rw-r--r--tools/tools/build_option_survey/option_survey.sh2
-rw-r--r--tools/tools/crypto/cryptocheck.c4
-rw-r--r--tools/tools/git/git-arc.119
-rw-r--r--tools/tools/git/git-arc.sh37
-rw-r--r--tools/tools/nvmf/nvmfdd/Makefile9
-rw-r--r--tools/tools/nvmf/nvmfdd/nvmfdd.c493
-rw-r--r--usr.bin/Makefile1
-rw-r--r--usr.bin/bmake/Makefile4
-rw-r--r--usr.bin/bmake/Makefile.config3
-rw-r--r--usr.bin/bmake/config.h4
-rw-r--r--usr.bin/bmake/unit-tests/Makefile27
-rw-r--r--usr.bin/diff/diff.c4
-rw-r--r--usr.bin/diff/diffdir.c2
-rw-r--r--usr.bin/diff/diffreg.c3
-rw-r--r--usr.bin/diff/diffreg_new.c14
-rwxr-xr-xusr.bin/diff/tests/diff_test.sh10
-rw-r--r--usr.bin/du/Makefile2
-rw-r--r--usr.bin/du/du.112
-rw-r--r--usr.bin/du/du.c57
-rw-r--r--usr.bin/expand/expand.18
-rw-r--r--usr.bin/fortune/datfiles/freebsd-tips11
-rw-r--r--usr.bin/grdc/grdc.619
-rw-r--r--usr.bin/grdc/grdc.c83
-rw-r--r--usr.bin/locate/locate/locate.rc2
-rw-r--r--usr.bin/locate/locate/updatedb.sh2
-rw-r--r--usr.bin/lsvfs/lsvfs.12
-rwxr-xr-xusr.bin/man/man.sh6
-rw-r--r--usr.bin/mdo/Makefile4
-rw-r--r--usr.bin/mdo/mdo.144
-rw-r--r--usr.bin/mdo/mdo.c76
-rw-r--r--usr.bin/netstat/inet.c8
-rw-r--r--usr.bin/netstat/nhops.c5
-rw-r--r--usr.bin/netstat/route.c5
-rw-r--r--usr.bin/posixmqcontrol/posixmqcontrol.14
-rw-r--r--usr.bin/split/split.c4
-rw-r--r--usr.bin/time/time.c2
-rw-r--r--usr.bin/top/display.c4
-rw-r--r--usr.sbin/Makefile1
-rw-r--r--usr.sbin/Makefile.aarch641
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c2
-rw-r--r--usr.sbin/adduser/adduser.sh53
-rw-r--r--usr.sbin/arp/arp.810
-rw-r--r--usr.sbin/arp/arp.c4
-rw-r--r--usr.sbin/arp/arp_netlink.c2
-rw-r--r--usr.sbin/audit/Makefile1
-rw-r--r--usr.sbin/auditd/Makefile11
-rw-r--r--usr.sbin/auditdistd/Makefile1
-rw-r--r--usr.sbin/auditreduce/Makefile1
-rw-r--r--usr.sbin/authpf/Makefile1
-rw-r--r--usr.sbin/autofs/auto_master.57
-rw-r--r--usr.sbin/autofs/automount.813
-rw-r--r--usr.sbin/autofs/automountd.89
-rw-r--r--usr.sbin/autofs/autounmountd.85
-rw-r--r--usr.sbin/bhyve/Makefile1
-rw-r--r--usr.sbin/bhyve/amd64/e820.c2
-rw-r--r--usr.sbin/bhyve/bhyve.8249
-rw-r--r--usr.sbin/bhyve/bhyverun.c8
-rw-r--r--usr.sbin/bhyve/bhyverun.h4
-rw-r--r--usr.sbin/bhyve/gdb.c1
-rw-r--r--usr.sbin/bhyve/tpm_ppi_qemu.c2
-rw-r--r--usr.sbin/bhyve/uart_backend.c22
-rw-r--r--usr.sbin/bhyve/uart_backend.h3
-rw-r--r--usr.sbin/bhyve/uart_emul.c15
-rw-r--r--usr.sbin/bhyve/uart_pl011.c16
-rw-r--r--usr.sbin/bhyvectl/Makefile9
-rw-r--r--usr.sbin/bhyvectl/aarch64/Makefile.inc1
-rw-r--r--usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c82
-rw-r--r--usr.sbin/bhyvectl/amd64/Makefile.inc1
-rw-r--r--usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c1888
-rw-r--r--usr.sbin/bhyvectl/bhyvectl.c1838
-rw-r--r--usr.sbin/bhyvectl/bhyvectl.h (renamed from sys/dev/sound/unit.h)45
-rw-r--r--usr.sbin/bluetooth/bthidcontrol/sdp.c6
-rw-r--r--usr.sbin/bluetooth/bthidd/kbd.c5
-rw-r--r--usr.sbin/bluetooth/hccontrol/hccontrol.c5
-rw-r--r--usr.sbin/bluetooth/hccontrol/node.c7
-rw-r--r--usr.sbin/bluetooth/sdpcontrol/search.c5
-rw-r--r--usr.sbin/bluetooth/sdpd/profile.c5
-rw-r--r--usr.sbin/bluetooth/sdpd/sar.c3
-rw-r--r--usr.sbin/bluetooth/sdpd/srr.c3
-rw-r--r--usr.sbin/bluetooth/sdpd/ssr.c3
-rwxr-xr-xusr.sbin/bsdinstall/scripts/config3
-rw-r--r--usr.sbin/bsdinstall/scripts/fetchmissingdists3
-rwxr-xr-xusr.sbin/bsdinstall/scripts/wlanconfig2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c35
-rw-r--r--usr.sbin/btxld/elfh.c6
-rw-r--r--usr.sbin/cron/crontab/crontab.524
-rw-r--r--usr.sbin/ctladm/Makefile2
-rw-r--r--usr.sbin/ctladm/ctladm.830
-rw-r--r--usr.sbin/ctladm/ctladm.c347
-rw-r--r--usr.sbin/ctld/kernel.c4
-rw-r--r--usr.sbin/daemon/daemon.819
-rw-r--r--usr.sbin/daemon/daemon.c25
-rw-r--r--usr.sbin/extattrctl/extattrctl.82
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh10
-rw-r--r--usr.sbin/fstyp/fstyp.82
-rw-r--r--usr.sbin/fwget/pci/Makefile1
-rw-r--r--usr.sbin/fwget/pci/pci2
-rw-r--r--usr.sbin/fwget/pci/pci_network_intel437
-rw-r--r--usr.sbin/fwget/pci/pci_network_mediatek53
-rw-r--r--usr.sbin/fwget/pci/pci_network_qca62
-rw-r--r--usr.sbin/fwget/pci/pci_network_realtek46
-rw-r--r--usr.sbin/jail/jail.816
-rw-r--r--usr.sbin/kbdcontrol/kbdcontrol.c2
-rw-r--r--usr.sbin/kldxref/kldxref.c2
-rw-r--r--usr.sbin/mixer/mixer.c4
-rw-r--r--usr.sbin/mlx5tool/mlx5tool.82
-rw-r--r--usr.sbin/moused/moused.c7
-rw-r--r--usr.sbin/mptutil/mptutil.82
-rw-r--r--usr.sbin/ndp/ndp.c8
-rw-r--r--usr.sbin/newsyslog/newsyslog.conf.52
-rw-r--r--usr.sbin/ntp/config.h545
-rw-r--r--usr.sbin/ntp/doc/Makefile1
-rw-r--r--usr.sbin/ntp/doc/drivers/Makefile1
-rw-r--r--usr.sbin/ntp/doc/drivers/icons/Makefile1
-rw-r--r--usr.sbin/ntp/doc/drivers/scripts/Makefile1
-rw-r--r--usr.sbin/ntp/doc/hints/Makefile1
-rw-r--r--usr.sbin/ntp/doc/icons/Makefile1
-rw-r--r--usr.sbin/ntp/doc/pic/Makefile1
-rw-r--r--usr.sbin/ntp/doc/scripts/Makefile1
-rw-r--r--usr.sbin/ntp/libntp/Makefile3
-rw-r--r--usr.sbin/ntp/libntpevent/Makefile1
-rw-r--r--usr.sbin/ntp/libopts/Makefile1
-rw-r--r--usr.sbin/ntp/libparse/Makefile1
-rw-r--r--usr.sbin/ntp/ntp-keygen/Makefile1
-rw-r--r--usr.sbin/ntp/ntpd/Makefile5
-rw-r--r--usr.sbin/ntp/ntpdate/Makefile5
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile5
-rw-r--r--usr.sbin/ntp/ntpq/Makefile5
-rw-r--r--usr.sbin/ntp/ntptime/Makefile1
-rwxr-xr-xusr.sbin/ntp/scripts/mkver2
-rw-r--r--usr.sbin/ntp/sntp/Makefile5
-rw-r--r--usr.sbin/nvmfd/Makefile14
-rw-r--r--usr.sbin/nvmfd/controller.c244
-rw-r--r--usr.sbin/nvmfd/ctl.c139
-rw-r--r--usr.sbin/nvmfd/devices.c386
-rw-r--r--usr.sbin/nvmfd/discovery.c343
-rw-r--r--usr.sbin/nvmfd/internal.h65
-rw-r--r--usr.sbin/nvmfd/io.c677
-rw-r--r--usr.sbin/nvmfd/nvmfd.8126
-rw-r--r--usr.sbin/nvmfd/nvmfd.c260
-rw-r--r--usr.sbin/periodic/etc/daily/Makefile7
-rwxr-xr-xusr.sbin/periodic/etc/security/100.chksetuid2
-rwxr-xr-xusr.sbin/periodic/etc/security/110.neggrpperm2
-rwxr-xr-xusr.sbin/periodic/etc/security/200.chkmounts4
-rwxr-xr-xusr.sbin/periodic/etc/security/300.chkuid02
-rwxr-xr-xusr.sbin/periodic/etc/security/400.passwdless2
-rwxr-xr-xusr.sbin/periodic/etc/security/410.logincheck2
-rwxr-xr-xusr.sbin/periodic/etc/security/500.ipfwdenied2
-rwxr-xr-xusr.sbin/periodic/etc/security/510.ipfdenied2
-rwxr-xr-xusr.sbin/periodic/etc/security/520.pfdenied2
-rwxr-xr-xusr.sbin/periodic/etc/security/550.ipfwlimit2
-rwxr-xr-xusr.sbin/periodic/etc/security/610.ipf6denied2
-rwxr-xr-xusr.sbin/periodic/etc/security/700.kernelmsg2
-rwxr-xr-xusr.sbin/periodic/etc/security/800.loginfail3
-rwxr-xr-xusr.sbin/periodic/etc/security/900.tcpwrap3
-rw-r--r--usr.sbin/periodic/etc/security/security.functions3
-rw-r--r--usr.sbin/periodic/periodic.conf22
-rw-r--r--usr.sbin/ppp/chat.h4
-rw-r--r--usr.sbin/praudit/Makefile1
-rw-r--r--usr.sbin/pstat/pstat.c2
-rw-r--r--usr.sbin/pw/pw.c13
-rw-r--r--usr.sbin/pw/pw.h22
-rw-r--r--usr.sbin/pw/pw_group.c35
-rw-r--r--usr.sbin/pw/pw_user.c48
-rwxr-xr-xusr.sbin/pw/tests/pw_useradd_test.sh17
-rw-r--r--usr.sbin/rpc.lockd/lockd.c3
-rw-r--r--usr.sbin/rpc.lockd/rpc.lockd.85
-rw-r--r--usr.sbin/rtadvctl/rtadvctl.c6
-rw-r--r--usr.sbin/rtadvd/config.c68
-rw-r--r--usr.sbin/rtadvd/control.c6
-rw-r--r--usr.sbin/rtadvd/control_server.c4
-rw-r--r--usr.sbin/rtadvd/if.c2
-rw-r--r--usr.sbin/rtadvd/rtadvd.c2
-rw-r--r--usr.sbin/rtadvd/rtadvd.conf.518
-rw-r--r--usr.sbin/rtadvd/rtadvd.h11
-rw-r--r--usr.sbin/rwhod/rwhod.c2
-rw-r--r--usr.sbin/snapinfo/snapinfo.82
-rw-r--r--usr.sbin/usbconfig/usbconfig.c4
-rw-r--r--usr.sbin/wlandebug/wlandebug.c4
-rw-r--r--usr.sbin/zonectl/zonectl.c4
-rw-r--r--usr.sbin/zzz/zzz.sh5
5274 files changed, 289742 insertions, 66266 deletions
diff --git a/.clang-format b/.clang-format
index 6c541a571e1d..3d436fa0b35d 100644
--- a/.clang-format
+++ b/.clang-format
@@ -2,6 +2,7 @@
---
BasedOnStyle: WebKit
AlignAfterOpenBracket: DontAlign
+AlignConsecutiveMacros: AcrossEmptyLines
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
@@ -94,6 +95,7 @@ ForEachMacros:
- TAILQ_FOREACH_SAFE
- VM_MAP_ENTRY_FOREACH
- VM_PAGE_DUMP_FOREACH
+SpaceBeforeParens: ControlStatementsExceptForEachMacros
IndentCaseLabels: false
IndentPPDirectives: None
Language: Cpp
@@ -162,7 +164,7 @@ IncludeCategories:
# http://llvm.org/docs/CodingStandards.html#include-style
IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING'
SortIncludes: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+KeepEmptyLinesAtTheStartOfBlocks: false
TypenameMacros:
- ARB_ELMTYPE
- ARB_HEAD
diff --git a/.github/workflows/cross-bootstrap-tools.yml b/.github/workflows/cross-bootstrap-tools.yml
index 327bdadc6a9b..1f4d41cce30c 100644
--- a/.github/workflows/cross-bootstrap-tools.yml
+++ b/.github/workflows/cross-bootstrap-tools.yml
@@ -31,7 +31,7 @@ jobs:
pkgs: bmake libarchive-dev clang-14 lld-14
- os: macos-latest
compiler: clang-13
- cross-bindir: /usr/local/opt/llvm@13/bin
+ cross-bindir: /opt/homebrew/opt/llvm@13/bin
pkgs: bmake libarchive llvm@13
- target_arch: amd64
target: amd64
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c26b1d335c5f..8e79652a09d2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -106,19 +106,21 @@ command can help minimize churn by only formatting the areas nearby the changes.
not perfect, using these tools will maximize your chances of not having style
comments on your pull requests.
+For [Lua](https://www.lua.org), see
+[style.lua(9)](https://man.freebsd.org/cgi/man.cgi?query=style.lua&sektion=9)
+for details. Lua is used for the boot loader and a few scripts in the base system.
+
For Makefiles changes, see
[style.Makefile(5)](https://man.freebsd.org/cgi/man.cgi?query=style.Makefile&sektion=5)
for details. FreeBSD's base system uses the in-tree make, not GNU Make, so
[make(1)](https://man.freebsd.org/cgi/man.cgi?query=make&sektion=1) is another useful
resource.
-The project uses mdoc for all its man pages. Changes should pass `mandoc -Tlint` and igor (install the latter with `pkg install igor`).
-Please be sure to observe the one-sentence-per-line rule so manual pages properly render. Any semantic changes to the manual pages should bump the date.
-[style.mdoc(5)](https://man.freebsd.org/cgi/man.cgi?query=style.mdoc&sektion=5) has the all details.
-
-For [Lua](https://www.lua.org), please see
-[style.lua(9)](https://man.freebsd.org/cgi/man.cgi?query=style.lua&sektion=9)
-for details. Lua is used for the boot loader and a few scripts in the base system.
+For manual page changes, see
+[style.mdoc(5)](https://man.freebsd.org/cgi/man.cgi?query=style.mdoc&sektion=5)
+for details. Changes should pass `mandoc -Tlint` and igor (install the latter with `pkg install igor`).
+Please be sure to observe the one-sentence-per-line rule so manual pages properly render.
+Proposed changes to manual pages should not bump the document date until merged.
For shell scripts, avoid using bash. The system shell (/bin/sh) is preferred.
Shell scripts in the base system cannot use bash or bash extensions
diff --git a/Makefile b/Makefile
index b622897b6678..b2613b68b645 100644
--- a/Makefile
+++ b/Makefile
@@ -96,7 +96,7 @@
#
# Once you have installed the necessary cross toolchain, simply pass
# CROSS_TOOLCHAIN=${TARGET_ARCH}-gccN while building with the above steps,
-# e.g., `make buildworld CROSS_TOOLCHAIN=amd64-gcc6`.
+# e.g., `make buildworld CROSS_TOOLCHAIN=amd64-gcc13`.
#
# The ${TARGET_ARCH}-gccN packages are provided as flavors of the
# devel/freebsd-gccN ports.
diff --git a/Makefile.inc1 b/Makefile.inc1
index 0728df1221a0..90439adcbc09 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -172,6 +172,30 @@ LIBCOMPAT_INCLUDE_DIRS+= i386
LIBCOMPAT_INCLUDE_DIRS+= arm
.endif
+.if ((defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == "gcc") || \
+ (!defined(X_COMPILER_TYPE) && ${COMPILER_TYPE} == "gcc"))
+.if ${TARGET} == "arm"
+_GCC_BROKEN="https://reviews.freebsd.org/D36754"
+.endif
+.if ${TARGET_ARCH} == "powerpc"
+_GCC_BROKEN=Missing atomic builtins in libc++.
+.endif
+.if ${TARGET_ARCH:Mpowerpc64*}
+_GCC_BROKEN=libsys.so.7.full has a LOAD segment with RWX permissions.
+.endif
+.if ${TARGET} == "riscv"
+_GCC_BROKEN=boot code linker script issues.
+.endif
+.if defined(_GCC_BROKEN)
+.warning Target ${TARGET} is broken with GCC: ${_GCC_BROKEN}
+.if defined(TRY_GCC_BROKEN)
+.warning Trying build anyway.
+.else
+.error Avoiding broken build. Define TRY_GCC_BROKEN to try anyway.
+.endif
+.endif
+.endif
+
.if ${.MAKE.OS} != "FreeBSD"
CROSSBUILD_HOST=${.MAKE.OS}
.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin"
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 02477bbebd0b..70e6dcec50b1 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,38 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20240511: move file system driver manuals to section four
+OLD_FILES+=usr/share/man/man5/autofs.5.gz
+OLD_FILES+=usr/share/man/man5/cd9660.5.gz
+OLD_FILES+=usr/share/man/man5/devfs.5.gz
+OLD_FILES+=usr/share/man/man5/ext2fs.5.gz
+OLD_FILES+=usr/share/man/man5/ext4fs.5.gz
+OLD_FILES+=usr/share/man/man5/fdescfs.5.gz
+OLD_FILES+=usr/share/man/man5/fusefs.5.gz
+OLD_FILES+=usr/share/man/man5/lindebugfs.5.gz
+OLD_FILES+=usr/share/man/man5/linprocfs.5.gz
+OLD_FILES+=usr/share/man/man5/linsysfs.5.gz
+OLD_FILES+=usr/share/man/man5/mqueuefs.5.gz
+OLD_FILES+=usr/share/man/man5/msdosfs.5.gz
+OLD_FILES+=usr/share/man/man5/msdos.5.gz
+OLD_FILES+=usr/share/man/man5/nullfs.5.gz
+OLD_FILES+=usr/share/man/man5/procfs.5.gz
+OLD_FILES+=usr/share/man/man5/smbfs.5.gz
+OLD_FILES+=usr/share/man/man5/tarfs.5.gz
+OLD_FILES+=usr/share/man/man5/tmpfs.5.gz
+OLD_FILES+=usr/share/man/man5/unionfs.5.gz
+OLD_FILES+=usr/share/man/man7/ffs.7.gz
+
+# 20240508: Remove remnants of portsnap(8)
+OLD_DIRS+=var/db/portsnap
+
+# 20240507: remove gbde
+OLD_FILES+=boot/kernel/geom_bde.ko
+OLD_FILES+=etc/rc.d/gbde
+OLD_FILES+=sbin/gbde
+OLD_FILES+=usr/share/man/man4/gbde.4.gz
+OLD_FILES+=usr/share/man/man8/gbde.8.gz
+
# 20240422: remove improperly installed libcxxrt.so.1
MOVED_LIBS+=usr/lib/libcxxrt.so.1
@@ -9481,11 +9513,6 @@ OLD_FILES+=usr/share/man/man4/imm.4.gz
OLD_FILES+=usr/share/man/man4/vpo.4.gz
# 20200104: gcc libssp removed
-OLD_FILES+=usr/include/ssp/ssp.h
-OLD_FILES+=usr/include/ssp/stdio.h
-OLD_FILES+=usr/include/ssp/string.h
-OLD_FILES+=usr/include/ssp/unistd.h
-OLD_DIRS+=usr/include/ssp
OLD_FILES+=usr/lib/libssp.a
# 20191229: GEOM_SCHED class and gsched tool removed
diff --git a/README.md b/README.md
index 93599c66511d..bb0c34d39ec4 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,8 @@ See build(7), config(8), [FreeBSD handbook on building userland](https://docs.fr
For information on the CPU architectures and platforms supported by FreeBSD, see the [FreeBSD
website's Platforms page](https://www.freebsd.org/platforms/).
+For official FreeBSD bootable images, see the [release page](https://download.freebsd.org/ftp/releases/ISO-IMAGES/).
+
Source Roadmap:
---------------
| Directory | Description |
diff --git a/RELNOTES b/RELNOTES
index 91d6d74a38fc..5c2eff22168e 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -10,6 +10,36 @@ newline. Entries should be separated by a newline.
Changes to this file should not be MFCed.
+8aac90f18aef:
+ new MAC/do policy and mdo(1) utility which enables a user to
+ become another user without the requirement of setuid root.
+
+7398d1ece5cf:
+ hw.snd.version is removed.
+
+a15f7c96a276,a8089ea5aee5:
+ NVMe over Fabrics controller. The nvmft(4) kernel module adds
+ a new frontend to the CAM target layer which exports ctl(4)
+ LUNs as NVMe namespaces to remote hosts. The nvmfd(8) daemon
+ is responsible for accepting incoming connection requests and
+ handing off connected queue pairs to nvmft(4).
+
+a1eda74167b5,1058c12197ab:
+ NVMe over Fabrics host. New commands added to nvmecontrol(8)
+ to establish connections to remote controllers. Once
+ connections are established they are handed off to the nvmf(4)
+ kernel module which creates nvmeX devices and exports remote
+ namespaces as nda(4) disks.
+
+25723d66369f:
+ As a side-effect of retiring the unit.* code in sound(4), the
+ hw.snd.maxunit loader(8) tunable is also retired.
+
+eeb04a736cb9:
+ date(1) now supports nanoseconds. For example:
+ `date -Ins` prints "2024-04-22T12:20:28,763742224+02:00" and
+ `date +%N` prints "415050400".
+
6d5ce2bb6344:
The default value of the nfs_reserved_port_only rc.conf(5) setting has
changed. The FreeBSD NFS server now requires the source port of
diff --git a/UPDATING b/UPDATING
index aae30936a8b5..98d8b58dcd20 100644
--- a/UPDATING
+++ b/UPDATING
@@ -27,6 +27,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20240428:
+ OpenBSM auditing runtime (auditd, etc.) has been moved into the new
+ package FreeBSD-audit. If you use OpenBSM auditing and pkgbase, you
+ should install FreeBSD-audit.
+
+20240424:
+ cron, lpr, and ntpd have been moved from FreeBSD-utilities into their
+ own packages. If you use pkgbase, you should install the relevant
+ packages: FreeBSD-cron, FreeBSD-lp, or FreeBSD-ntp.
+
20240205:
For dynamically linked programs, system calls are now made from
libsys rather than libc. No change in linkage is required as
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index 5dceb1cad94b..3e7974e5f334 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -125,7 +125,7 @@ init_casper_net(cap_channel_t *casper)
familylimit = AF_LOCAL;
cap_net_limit_name2addr_family(limit, &familylimit, 1);
- if (cap_net_limit(limit) < 0)
+ if (cap_net_limit(limit) != 0)
err(EXIT_FAILURE, "unable to apply limits");
}
#endif
@@ -198,7 +198,7 @@ main(int argc, char *argv[])
stdout_lock.l_start = 0;
stdout_lock.l_type = F_WRLCK;
stdout_lock.l_whence = SEEK_SET;
- if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) == -1)
+ if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) != 0)
err(EXIT_FAILURE, "stdout");
}
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
caph_cache_catpages();
- if (caph_enter_casper() < 0)
+ if (caph_enter_casper() != 0)
err(EXIT_FAILURE, "capsicum");
if (bflag || eflag || nflag || sflag || tflag || vflag)
@@ -266,7 +266,7 @@ scanfiles(char *argv[], int cooked __unused)
#endif
} else {
#ifndef BOOTSTRAP_CAT
- if (in_kernel_copy(fd) == -1) {
+ if (in_kernel_copy(fd) != 0) {
if (errno == EINVAL || errno == EBADF ||
errno == EISDIR)
raw_cat(fd);
@@ -471,7 +471,7 @@ udom_open(const char *path, int flags)
errno = serrno;
return (-1);
}
- if (caph_rights_limit(fd, &rights) < 0) {
+ if (caph_rights_limit(fd, &rights) != 0) {
serrno = errno;
close(fd);
freeaddrinfo(res0);
@@ -500,12 +500,12 @@ udom_open(const char *path, int flags)
switch (flags & O_ACCMODE) {
case O_RDONLY:
cap_rights_clear(&rights, CAP_WRITE);
- if (shutdown(fd, SHUT_WR) == -1)
+ if (shutdown(fd, SHUT_WR) != 0)
warn(NULL);
break;
case O_WRONLY:
cap_rights_clear(&rights, CAP_READ);
- if (shutdown(fd, SHUT_RD) == -1)
+ if (shutdown(fd, SHUT_RD) != 0)
warn(NULL);
break;
default:
@@ -513,7 +513,7 @@ udom_open(const char *path, int flags)
}
cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN);
- if (caph_rights_limit(fd, &rights) < 0) {
+ if (caph_rights_limit(fd, &rights) != 0) {
serrno = errno;
close(fd);
errno = serrno;
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index d102fb076139..cfbb2022caaf 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -112,6 +112,8 @@ copy_file(const FTSENT *entp, int dne)
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) < 0 ||
fstat(from_fd, &sb) != 0) {
warn("%s", entp->fts_path);
+ if (from_fd >= 0)
+ (void)close(from_fd);
return (1);
}
/*
@@ -124,6 +126,7 @@ copy_file(const FTSENT *entp, int dne)
*/
if ((sb.st_mode & S_IFMT) != (fs->st_mode & S_IFMT)) {
warnx("%s: File changed", entp->fts_path);
+ (void)close(from_fd);
return (1);
}
}
diff --git a/bin/date/date.1 b/bin/date/date.1
index afa6d555a503..29cde37ca904 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 26, 2024
+.Dd May 2, 2024
.Dt DATE 1
.Os
.Sh NAME
@@ -614,4 +614,4 @@ flag was added in
The
.Ql %N
conversion specification was added in
-.Fx 15.0 .
+.Fx 14.1 .
diff --git a/bin/date/date.c b/bin/date/date.c
index 718c94601dd6..3ce9ee3235fb 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -334,7 +334,9 @@ setthetime(const char *fmt, const char *p, int jflag, struct timespec *ts)
}
/* convert broken-down time to GMT clock time */
- if ((ts->tv_sec = mktime(lt)) == -1)
+ lt->tm_yday = -1;
+ ts->tv_sec = mktime(lt);
+ if (lt->tm_yday == -1)
errx(1, "nonexistent time");
ts->tv_nsec = 0;
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index 21def154ec00..bac86ad8a882 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -780,7 +780,7 @@ Display information on all system processes:
.Xr strftime 3 ,
.Xr xo_parse_args 3 ,
.Xr mac 4 ,
-.Xr procfs 5 ,
+.Xr procfs 4 ,
.Xr pstat 8 ,
.Xr sysctl 8 ,
.Xr mutex 9
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index cbee10c20d53..53ace6247b33 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -263,6 +263,8 @@ main(int argc, char *argv[])
else if (len <= 4 &&
strncasecmp(optarg, "both", len) == 0)
directions |= BOTH;
+ else
+ usage();
break;
}
case 'd':
diff --git a/bin/rmdir/rmdir.1 b/bin/rmdir/rmdir.1
index 87ca1f1547f0..eb23c605050c 100644
--- a/bin/rmdir/rmdir.1
+++ b/bin/rmdir/rmdir.1
@@ -74,14 +74,14 @@ The
.Nm
utility exits with one of the following values:
.Bl -tag -width indent
-.It Li 0
-Each directory entry specified by a
+.It Er 0
+Each
.Ar directory
-operand
-referred to an empty directory and was removed
-successfully.
-.It Li >0
-An error occurred.
+referred to an empty directory and was removed successfully.
+.It Er 1
+An error occurred while attempting to remove one or more directories.
+.It Er 2
+Invalid arguments.
.El
.Sh EXAMPLES
Remove the directory
@@ -97,6 +97,7 @@ stopping at the first non-empty directory (if any):
.Dl $ rmdir -p cow/horse/monkey
.Sh SEE ALSO
.Xr rm 1
+.Xr rmdir 2
.Sh STANDARDS
The
.Nm
diff --git a/bin/rmdir/rmdir.c b/bin/rmdir/rmdir.c
index c5d3db831309..0a495018495c 100644
--- a/bin/rmdir/rmdir.c
+++ b/bin/rmdir/rmdir.c
@@ -112,5 +112,5 @@ usage(void)
{
(void)fprintf(stderr, "usage: rmdir [-pv] directory ...\n");
- exit(1);
+ exit(2);
}
diff --git a/bin/rmdir/tests/rmdir_test.sh b/bin/rmdir/tests/rmdir_test.sh
index d443849258b6..ba80ac6204be 100644
--- a/bin/rmdir/tests/rmdir_test.sh
+++ b/bin/rmdir/tests/rmdir_test.sh
@@ -35,8 +35,8 @@ invalid_usage_head()
invalid_usage_body()
{
- atf_check -s not-exit:0 -e match:"$usage_output" rmdir -p
- atf_check -s not-exit:0 -e match:"$usage_output" rmdir -v
+ atf_check -s exit:2 -e match:"$usage_output" rmdir -p
+ atf_check -s exit:2 -e match:"$usage_output" rmdir -v
}
atf_test_case no_arguments
@@ -47,7 +47,7 @@ no_arguments_head()
no_arguments_body()
{
- atf_check -s not-exit:0 -e match:"$usage_output" rmdir
+ atf_check -s exit:2 -e match:"$usage_output" rmdir
}
atf_init_test_cases()
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index f641edaccb52..149c14919028 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -288,6 +288,8 @@ CSTD= c99
CFLAGS+= -g -DDEBUG=1
+CFLAGS.gcc+= -Wno-pointer-to-int-cast
+
# Pointer values are used as debugging "tags" to mark reference count
# ownerships and in some cases the tag reference is dropped after an
# object is freed.
diff --git a/contrib/atf/atf-c/macros.h b/contrib/atf/atf-c/macros.h
index 1784fc47435d..abcb9f697907 100644
--- a/contrib/atf/atf-c/macros.h
+++ b/contrib/atf/atf-c/macros.h
@@ -167,65 +167,104 @@
ATF_CHECK_MSG((expected) == (actual), "%s != %s: " fmt, \
#expected, #actual, ##__VA_ARGS__)
-#define ATF_REQUIRE_STREQ(expected, actual) \
- ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \
- #expected, #actual, expected, actual)
-
-#define ATF_CHECK_STREQ(expected, actual) \
- ATF_CHECK_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \
- #expected, #actual, expected, actual)
-
-#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) \
- ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, \
- "%s != %s (%s != %s): " fmt, \
- #expected, #actual, expected, actual, ##__VA_ARGS__)
-
-#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) \
- ATF_CHECK_MSG(strcmp(expected, actual) == 0, \
- "%s != %s (%s != %s): " fmt, \
- #expected, #actual, expected, actual, ##__VA_ARGS__)
-
-#define ATF_REQUIRE_INTEQ(expected, actual) \
- ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd)", \
- #expected, #actual, (intmax_t)(expected), \
- (intmax_t)(actual))
-
-#define ATF_CHECK_INTEQ(expected, actual) \
- ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd)", #expected, \
- #actual, (intmax_t)(expected), (intmax_t)(actual))
-
-#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) \
- ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \
- #expected, #actual, (intmax_t)(expected), \
- (intmax_t)(actual), ##__VA_ARGS__)
-
-#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) \
- ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \
- #expected, #actual, (intmax_t)(expected), \
- (intmax_t)(actual), ##__VA_ARGS__)
-
-#define ATF_REQUIRE_MATCH(regexp, string) \
- ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \
- "'%s' not matched in '%s'", regexp, string);
-
-#define ATF_CHECK_MATCH(regexp, string) \
- ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \
- "'%s' not matched in '%s'", regexp, string);
-
-#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) \
- ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \
- "'%s' not matched in '%s': " fmt, regexp, string, \
- ##__VA_ARGS__);
-
-#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) \
- ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \
- "'%s' not matched in '%s': " fmt, regexp, string, \
- ##__VA_ARGS__);
+#define ATF_REQUIRE_STREQ(expected, actual) do { \
+ const char *_atf_expected = (expected); \
+ const char *_atf_actual = (actual); \
+ ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \
+ "%s != %s (%s != %s)", #expected, #actual, \
+ _atf_expected, _atf_actual); \
+ } while (0)
+
+#define ATF_CHECK_STREQ(expected, actual) do { \
+ const char *_atf_expected = (expected); \
+ const char *_atf_actual = (actual); \
+ ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \
+ "%s != %s (%s != %s)", #expected, #actual, \
+ _atf_expected, _atf_actual); \
+ } while (0)
+
+#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) do { \
+ const char *_atf_expected = (expected); \
+ const char *_atf_actual = (actual); \
+ ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \
+ "%s != %s (%s != %s): " fmt, #expected, #actual, \
+ _atf_expected, _atf_actual, ##__VA_ARGS__); \
+ } while (0)
+
+#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) do { \
+ const char *_atf_expected = (expected); \
+ const char *_atf_actual = (actual); \
+ ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \
+ "%s != %s (%s != %s): " fmt, #expected, #actual, \
+ _atf_expected, _atf_actual, ##__VA_ARGS__); \
+ } while (0)
+
+#define ATF_REQUIRE_INTEQ(expected, actual) do { \
+ intmax_t _atf_expected = (expected); \
+ intmax_t _atf_actual = (actual); \
+ ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \
+ "%s != %s (%jd != %jd)", #expected, #actual, \
+ _atf_expected, _atf_actual); \
+ } while (0)
+
+#define ATF_CHECK_INTEQ(expected, actual) do { \
+ intmax_t _atf_expected = (expected); \
+ intmax_t _atf_actual = (actual); \
+ ATF_CHECK_MSG(_atf_expected == _atf_actual, \
+ "%s != %s (%jd != %jd)", #expected, #actual, \
+ _atf_expected, _atf_actual); \
+ } while (0)
+
+#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) do { \
+ intmax_t _atf_expected = (expected); \
+ intmax_t _atf_actual = (actual); \
+ ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \
+ "%s != %s (%jd != %jd): " fmt, #expected, #actual, \
+ _atf_expected, _atf_actual, ##__VA_ARGS__); \
+ } while (0)
+
+#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) do { \
+ intmax_t _atf_expected = (expected); \
+ intmax_t _atf_actual = (actual); \
+ ATF_CHECK_MSG(_atf_expected == _atf_actual, \
+ "%s != %s (%jd != %jd): " fmt, #expected, #actual, \
+ _atf_expected, _atf_actual, ##__VA_ARGS__); \
+ } while (0)
+
+#define ATF_REQUIRE_MATCH(regexp, string) do { \
+ const char *_atf_regexp = (regexp); \
+ const char *_atf_string = (string); \
+ ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \
+ "'%s' not matched in '%s'", _atf_regexp, _atf_string); \
+ } while (0)
+
+#define ATF_CHECK_MATCH(regexp, string) do { \
+ const char *_atf_regexp = (regexp); \
+ const char *_atf_string = (string); \
+ ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \
+ "'%s' not matched in '%s'", _atf_regexp, _atf_string); \
+ } while (0)
+
+#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) do { \
+ const char *_atf_regexp = (regexp); \
+ const char *_atf_string = (string); \
+ ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \
+ "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \
+ ##__VA_ARGS__); \
+ } while (0)
+
+#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) do { \
+ const char *_atf_regexp = (regexp); \
+ const char *_atf_string = (string); \
+ ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \
+ "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \
+ ##__VA_ARGS__); \
+ } while (0)
#define ATF_CHECK_ERRNO(exp_errno, bool_expr) \
- atf_tc_check_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr)
+ atf_tc_check_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr))
#define ATF_REQUIRE_ERRNO(exp_errno, bool_expr) \
- atf_tc_require_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr)
+ atf_tc_require_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr))
#endif /* !defined(ATF_C_MACROS_H) */
diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog
index fc1da62fbe54..6d8a8228969d 100644
--- a/contrib/bmake/ChangeLog
+++ b/contrib/bmake/ChangeLog
@@ -1,3 +1,97 @@
+2024-05-20 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION):
+ Merge with NetBSD make, pick up
+ o dir.c: in FindFile restore last search of .CURDIR even for
+ includes, as a number of existing makefiles are broken otherwise.
+
+2024-05-19 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240519
+ Merge with NetBSD make, pick up
+ o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR.
+ Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty.
+ o main.c: no need to set .DOTLAST in sysIncPath
+
+2024-05-07 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240508
+ Merge with NetBSD make, pick up
+ o make: ensure variables set on command line get added to
+ .MAKEOVERRIDES (even if they start with '.') so they are passed to
+ sub-makes.
+
+2024-04-30 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240430
+ Merge with NetBSD make, pick up
+ o main.c: ensure '.include <makefile>' respects MAKESYSPATH.
+ Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen.
+
+2024-04-28 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240428
+ Merge with NetBSD make, pick up
+ o simplify freeing of lists
+ o arch.c: trim pointless comments
+ o var.c: delay variable assignments until actually needed
+ don't reallocate memory after evaluating an expression, result is
+ almost always short-lived.
+
+2024-04-26 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240426
+ Merge with NetBSD make, pick up
+ o job.c: in debug output, print the directory in which a job
+ failed at same time as failed target so it is more easily found in
+ build log.
+
+2024-04-24 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240424
+ Merge with NetBSD make, pick up
+ o clean up comments, code and tests
+
+2024-04-23 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240422
+ Merge with NetBSD make, pick up
+ o var.c: avoid LazyBuf for :*time modifiers.
+ LazyBuf's are not nul terminated so not suitable for passing to
+ functions that expect that. These modifiers are used sparingly so
+ an extra allocation is not a problem.
+
+2024-04-20 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240420
+ Merge with NetBSD make, pick up
+ o provide more context information for parse/evaluate errors
+
+2024-04-14 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240414
+ Merge with NetBSD make, pick up
+ o parse.c: print -dp debug info earlier so we see which
+ .if or .for line is being parsed.
+
+2024-04-04 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240404
+ Merge with NetBSD make, pick up
+ o fix some unit tests for Cygwin
+ o parse.c: exit immediately after reading a null byte from a makefile
+
+ * fix generation of bmake.cat1
+
+2024-03-19 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20240314
+ Add/Improve support for Cygwin
+ o uname -s output isn't useful so allow configure to
+ set FORCE_MAKE_OS - to force the value of .MAKE.OS
+ and use Cygwin which matches uname -o
+ o fix some unit-tests for Cygwin
+
2024-03-10 Simon J Gerraty <sjg@beast.crufty.net>
* boot-strap: tests can take a long time; use a cookie to
@@ -2175,10 +2269,10 @@
* VERSION (_MAKE_VERSION): 20200418
- * configure.in: use_makefile=no for cygwin et al.
+ * configure.in: use_makefile=no for Cygwin et al.
case insensitive filesystems just don't work if both
makefile and Makefile exist.
- NOTE: bmake does not support cygwin and likely never will,
+ NOTE: bmake does not support Cygwin and likely never will,
but if brave souls want to try it - help them out.
2020-04-02 Simon J Gerraty <sjg@beast.crufty.net>
diff --git a/contrib/bmake/Makefile b/contrib/bmake/Makefile
index 3332dcdeaf2d..65730df7e3df 100644
--- a/contrib/bmake/Makefile
+++ b/contrib/bmake/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $
+# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $
PROG= bmake
@@ -48,7 +48,7 @@ CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
-.for x in FORCE_MACHINE FORCE_MACHINE_ARCH
+.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH
.ifdef $x
COPTS.main.c+= "-D$x=\"${$x}\""
.endif
@@ -90,7 +90,7 @@ OS := ${.MAKE.OS:U${uname -s:L:sh}}
# are we 4.4BSD ?
isBSD44:=${BSD44_LIST:M${OS}}
-.if ${isBSD44} == "" && ${OS:NCYGWIN*:NDarwin:NLinux} != ""
+.if ${isBSD44} == "" && ${OS:NCygwin:NDarwin:NLinux} != ""
MANTARGET?= cat
.if ${MACHINE} == "sun386"
# even I don't have one of these anymore :-)
diff --git a/contrib/bmake/Makefile.config.in b/contrib/bmake/Makefile.config.in
index dfc26d90a02a..43ad1b9a397a 100644
--- a/contrib/bmake/Makefile.config.in
+++ b/contrib/bmake/Makefile.config.in
@@ -5,6 +5,7 @@ _MAKE_VERSION?=@_MAKE_VERSION@
prefix?= @prefix@
srcdir= @srcdir@
CC= @CC@
+@force_make_os@MAKE_OS?= @make_os@
@force_machine@MACHINE?= @machine@
@force_machine_arch@MACHINE_ARCH?= @machine_arch@
DEFAULT_SYS_PATH?= @default_sys_path@
diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION
index 5d6ca326700a..4af36cf84624 100644
--- a/contrib/bmake/VERSION
+++ b/contrib/bmake/VERSION
@@ -1,2 +1,2 @@
# keep this compatible with sh and make
-_MAKE_VERSION=20240309
+_MAKE_VERSION=20240520
diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c
index caec2e148690..4e52532c780a 100644
--- a/contrib/bmake/arch.c
+++ b/contrib/bmake/arch.c
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.215 2024/02/07 06:43:02 rillig Exp $ */
+/* $NetBSD: arch.c,v 1.217 2024/04/27 20:41:32 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -147,7 +147,7 @@ struct ar_hdr {
#include "dir.h"
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: arch.c,v 1.215 2024/02/07 06:43:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.217 2024/04/27 20:41:32 rillig Exp $");
typedef struct List ArchList;
typedef struct ListNode ArchListNode;
@@ -155,7 +155,7 @@ typedef struct ListNode ArchListNode;
static ArchList archives; /* The archives we've already examined */
typedef struct Arch {
- char *name; /* Name of archive */
+ char *name;
HashTable members; /* All the members of the archive described
* by <name, struct ar_hdr *> key/value pairs */
char *fnametab; /* Extended name table strings */
@@ -199,12 +199,10 @@ static int ArchSVR4Entry(Arch *, char *, size_t, FILE *);
#ifdef CLEANUP
static void
-ArchFree(void *ap)
+ArchFree(Arch *a)
{
- Arch *a = ap;
HashIter hi;
- /* Free memory from hash entries */
HashIter_Init(&hi, &a->members);
while (HashIter_Next(&hi) != NULL)
free(hi.entry->value);
@@ -217,32 +215,22 @@ ArchFree(void *ap)
#endif
/* Return "archive(member)". */
-static char *
+MAKE_ATTR_NOINLINE static char *
FullName(const char *archive, const char *member)
{
- size_t len1 = strlen(archive);
- size_t len3 = strlen(member);
- char *result = bmake_malloc(len1 + 1 + len3 + 1 + 1);
- memcpy(result, archive, len1);
- memcpy(result + len1, "(", 1);
- memcpy(result + len1 + 1, member, len3);
- memcpy(result + len1 + 1 + len3, ")", 1 + 1);
- return result;
+ Buffer buf;
+ Buf_Init(&buf);
+ Buf_AddStr(&buf, archive);
+ Buf_AddStr(&buf, "(");
+ Buf_AddStr(&buf, member);
+ Buf_AddStr(&buf, ")");
+ return Buf_DoneData(&buf);
}
/*
* Parse an archive specification such as "archive.a(member1 member2.${EXT})",
- * adding nodes for the expanded members to gns. Nodes are created as
- * necessary.
- *
- * Input:
- * pp The start of the specification.
- * gns The list on which to place the nodes.
- * scope The scope in which to expand variables.
- *
- * Output:
- * return True if it was a valid specification.
- * *pp Points to the first non-space after the archive spec.
+ * adding nodes for the expanded members to gns. If successful, advance pp
+ * beyond the archive specification and any trailing whitespace.
*/
bool
Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope)
@@ -323,12 +311,6 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope)
}
}
- /*
- * If the specification ends without a closing parenthesis,
- * chances are there's something wrong (like a missing
- * backslash), so it's better to return failure than allow
- * such things to happen
- */
if (*cp == '\0') {
Parse_Error(PARSE_FATAL,
"No closing parenthesis "
@@ -336,9 +318,6 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope)
return false;
}
- /*
- * If we didn't move anywhere, we must be done
- */
if (cp == mem.str)
break;
@@ -375,8 +354,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope)
/*
* Must contain dynamic sources, so we can't
* deal with it now. Just create an ARCHV node
- * for the thing and let SuffExpandChildren
- * handle it.
+ * and let SuffExpandChildren handle it.
*/
gn = Targ_GetNode(fullName);
gn->type |= OP_ARCHV;
@@ -413,13 +391,6 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope)
gn = Targ_GetNode(fullname);
free(fullname);
- /*
- * We've found the node, but have to make sure the
- * rest of the world knows it's an archive member,
- * without having to constantly check for parentheses,
- * so we type the thing with the OP_ARCHV bit before
- * we place it on the end of the provided list.
- */
gn->type |= OP_ARCHV;
Lst_Append(gns, gn);
}
@@ -431,23 +402,13 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope)
FStr_Done(&lib);
cp++; /* skip the ')' */
- /* We promised that pp would be set up at the next non-space. */
cpp_skip_whitespace(&cp);
*pp += cp - *pp;
return true;
}
/*
- * Locate a member of an archive, given the path of the archive and the path
- * of the desired member.
- *
- * Input:
- * archive Path to the archive
- * member Name of member; only its basename is used.
- * addToCache True if archive should be cached if not already so.
- *
- * Results:
- * The ar_hdr for the member, or NULL.
+ * Locate a member in an archive.
*
* See ArchFindMember for an almost identical copy of this code.
*/
@@ -459,15 +420,11 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
size_t size; /* Size of archive member */
char magic[SARMAG];
ArchListNode *ln;
- Arch *ar; /* Archive descriptor */
- struct ar_hdr arh; /* archive-member header for reading archive */
+ Arch *ar;
+ struct ar_hdr arh;
char memName[MAXPATHLEN + 1];
/* Current member name while hashing. */
- /*
- * Because of space constraints and similar things, files are archived
- * using their basename, not the entire path.
- */
member = str_basename(member);
for (ln = archives.first; ln != NULL; ln = ln->next) {
@@ -499,11 +456,8 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
if (!addToCache) {
/*
- * Caller doesn't want the thing cached, just use
- * ArchFindMember to read the header for the member out and
- * close down the stream again. Since the archive is not to be
- * cached, we assume there's no need to allocate extra room
- * for the header we're returning, so just declare it static.
+ * Since the archive is not to be cached, assume there's no
+ * need to allocate the header, so just declare it static.
*/
static struct ar_hdr sarh;
@@ -515,18 +469,10 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
return &sarh;
}
- /*
- * We don't have this archive on the list yet, so we want to find out
- * everything that's in it and cache it so we can get at it quickly.
- */
arch = fopen(archive, "r");
if (arch == NULL)
return NULL;
- /*
- * We use the ARMAG string to make sure this is an archive we
- * can handle...
- */
if (fread(magic, SARMAG, 1, arch) != 1 ||
strncmp(magic, ARMAG, SARMAG) != 0) {
(void)fclose(arch);
@@ -543,17 +489,9 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
while (fread(&arh, sizeof arh, 1, arch) == 1) {
char *nameend;
- /* If the header is bogus, there's no way we can recover. */
if (strncmp(arh.AR_FMAG, ARFMAG, sizeof arh.AR_FMAG) != 0)
- goto badarch;
+ goto bad_archive;
- /*
- * We need to advance the stream's pointer to the start of the
- * next header. Files are padded with newlines to an even-byte
- * boundary, so we need to extract the size of the file from
- * the 'size' field of the header and round it up during the
- * seek.
- */
arh.AR_SIZE[sizeof arh.AR_SIZE - 1] = '\0';
size = (size_t)strtol(arh.AR_SIZE, NULL, 10);
@@ -572,7 +510,7 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
/* svr4 magic mode; handle it */
switch (ArchSVR4Entry(ar, memName, size, arch)) {
case -1: /* Invalid data */
- goto badarch;
+ goto bad_archive;
case 0: /* List of files entry */
continue;
default: /* Got the entry */
@@ -596,12 +534,12 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
memName + sizeof AR_EFMT1 - 1);
if (elen > MAXPATHLEN)
- goto badarch;
+ goto bad_archive;
if (fread(memName, elen, 1, arch) != 1)
- goto badarch;
+ goto bad_archive;
memName[elen] = '\0';
if (fseek(arch, -(long)elen, SEEK_CUR) != 0)
- goto badarch;
+ goto bad_archive;
if (DEBUG(ARCH) || DEBUG(MAKE))
debug_printf(
"ArchStatMember: "
@@ -617,21 +555,18 @@ ArchStatMember(const char *archive, const char *member, bool addToCache)
HashTable_Set(&ar->members, memName, cached_hdr);
}
+ /* Files are padded with newlines to an even-byte boundary. */
if (fseek(arch, ((long)size + 1) & ~1, SEEK_CUR) != 0)
- goto badarch;
+ goto bad_archive;
}
fclose(arch);
Lst_Append(&archives, ar);
- /*
- * Now that the archive has been read and cached, we can look into
- * the addToCache table to find the desired member's header.
- */
return HashTable_FindValue(&ar->members, member);
-badarch:
+bad_archive:
fclose(arch);
HashTable_Done(&ar->members);
free(ar->fnametab);
@@ -736,37 +671,27 @@ ArchiveMember_HasName(const struct ar_hdr *hdr,
* In archives created by GNU binutils 2.27, the member names end
* with a slash.
*/
- if (ar_name[namelen] == '/' &&
- (namelen == ar_name_len || ar_name[namelen + 1] == ' '))
+ if (ar_name[namelen] == '/' && ar_name[namelen + 1] == ' ')
return true;
return false;
}
/*
- * Locate a member of an archive, given the path of the archive and the path
- * of the desired member.
- *
- * Input:
- * archive Path to the archive
- * member Name of member. If it is a path, only the last
- * component is used.
- * out_arh Archive header to be filled in
- * mode "r" for read-only access, "r+" for read-write access
+ * Load the header of an archive member. The mode is "r" for read-only
+ * access, "r+" for read-write access.
*
- * Output:
- * return The archive file, positioned at the start of the
- * member's struct ar_hdr, or NULL if the member doesn't
- * exist.
- * *out_arh The current struct ar_hdr for member.
+ * Upon successful return, the archive file is positioned at the start of the
+ * member's struct ar_hdr. In case of a failure or if the member doesn't
+ * exist, return NULL.
*
* See ArchStatMember for an almost identical copy of this code.
*/
static FILE *
-ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh,
- const char *mode)
+ArchFindMember(const char *archive, const char *member,
+ struct ar_hdr *out_arh, const char *mode)
{
- FILE *arch; /* Stream to archive */
+ FILE *arch;
int size; /* Size of archive member */
char magic[SARMAG];
size_t len;
@@ -775,32 +700,20 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh,
if (arch == NULL)
return NULL;
- /*
- * We use the ARMAG string to make sure this is an archive we
- * can handle...
- */
if (fread(magic, SARMAG, 1, arch) != 1 ||
strncmp(magic, ARMAG, SARMAG) != 0) {
fclose(arch);
return NULL;
}
- /*
- * Because of space constraints and similar things, files are archived
- * using their basename, not the entire path.
- */
+ /* Files are archived using their basename, not the entire path. */
member = str_basename(member);
-
len = strlen(member);
while (fread(out_arh, sizeof *out_arh, 1, arch) == 1) {
if (strncmp(out_arh->AR_FMAG, ARFMAG,
sizeof out_arh->AR_FMAG) != 0) {
- /*
- * The header is bogus, so the archive is bad
- * and there's no way we can recover...
- */
fclose(arch);
return NULL;
}
@@ -811,14 +724,6 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh,
(int)sizeof out_arh->ar_date, out_arh->ar_date);
if (ArchiveMember_HasName(out_arh, member, len)) {
- /*
- * To make life easier for callers that want to update
- * the archive, we reposition the file at the start of
- * the header we just read before we return the
- * stream. In a more general situation, it might be
- * better to leave the file at the actual member,
- * rather than its header, but not here.
- */
if (fseek(arch, -(long)sizeof *out_arh, SEEK_CUR) !=
0) {
fclose(arch);
@@ -870,15 +775,10 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh,
}
#endif
- /*
- * This isn't the member we're after, so we need to advance the
- * stream's pointer to the start of the next header. Files are
- * padded with newlines to an even-byte boundary, so we need to
- * extract the size of the file from the 'size' field of the
- * header and round it up during the seek.
- */
+ /* Advance to the next member. */
out_arh->AR_SIZE[sizeof out_arh->AR_SIZE - 1] = '\0';
size = (int)strtol(out_arh->AR_SIZE, NULL, 10);
+ /* Files are padded with newlines to an even-byte boundary. */
if (fseek(arch, (size + 1) & ~1L, SEEK_CUR) != 0) {
fclose(arch);
return NULL;
@@ -890,17 +790,9 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh,
}
/*
- * Touch a member of an archive, on disk.
- * The GNode's modification time is left as-is.
- *
- * The st_mtime of the entire archive is also changed.
- * For a library, it may be required to run ranlib after this.
- *
- * Input:
- * gn Node of member to touch
- *
- * Results:
- * The 'time' field of the member's header is updated.
+ * Update the ar_date of the member of an archive, on disk but not in the
+ * GNode. Update the st_mtime of the entire archive as well. For a library,
+ * it may be required to run ranlib after this.
*/
void
Arch_Touch(GNode *gn)
@@ -1015,9 +907,6 @@ Arch_UpdateMemberMTime(GNode *gn)
* TARGET variable for this node to be the node's name. Otherwise,
* we set the TARGET variable to be the full path of the library,
* as returned by Dir_FindFile.
- *
- * Input:
- * gn Node of library to find
*/
void
Arch_FindLib(GNode *gn, SearchPath *path)
@@ -1059,20 +948,18 @@ RanlibOODate(const GNode *gn MAKE_ATTR_UNUSED)
}
/*
- * Decide if a node with the OP_LIB attribute is out-of-date. Called from
- * GNode_IsOODate to make its life easier.
+ * Decide if a node with the OP_LIB attribute is out-of-date.
* The library is cached if it hasn't been already.
*
- * There are several ways for a library to be out-of-date that are
- * not available to ordinary files. In addition, there are ways
- * that are open to regular files that are not available to
- * libraries.
+ * There are several ways for a library to be out-of-date that are not
+ * available to ordinary files. In addition, there are ways that are open to
+ * regular files that are not available to libraries.
*
- * A library that is only used as a source is never
- * considered out-of-date by itself. This does not preclude the
- * library's modification time from making its parent be out-of-date.
- * A library will be considered out-of-date for any of these reasons,
- * given that it is a target on a dependency line somewhere:
+ * A library that is only used as a source is never considered out-of-date by
+ * itself. This does not preclude the library's modification time from making
+ * its parent be out-of-date. A library will be considered out-of-date for
+ * any of these reasons, given that it is a target on a dependency line
+ * somewhere:
*
* Its modification time is less than that of one of its sources
* (gn->mtime < gn->youngestChild->mtime).
@@ -1092,18 +979,16 @@ bool
Arch_LibOODate(GNode *gn)
{
- if (gn->type & OP_PHONY) {
+ if (gn->type & OP_PHONY)
return true;
- } else if (!GNode_IsTarget(gn) && Lst_IsEmpty(&gn->children)) {
+ if (!GNode_IsTarget(gn) && Lst_IsEmpty(&gn->children))
return false;
- } else if ((!Lst_IsEmpty(&gn->children) && gn->youngestChild == NULL) ||
+ if ((!Lst_IsEmpty(&gn->children) && gn->youngestChild == NULL) ||
(gn->mtime > now) ||
(gn->youngestChild != NULL &&
- gn->mtime < gn->youngestChild->mtime)) {
+ gn->mtime < gn->youngestChild->mtime))
return true;
- } else {
- return RanlibOODate(gn);
- }
+ return RanlibOODate(gn);
}
/* Initialize the archives module. */
@@ -1118,26 +1003,25 @@ void
Arch_End(void)
{
#ifdef CLEANUP
- Lst_DoneCall(&archives, ArchFree);
+ ArchListNode *ln;
+
+ for (ln = archives.first; ln != NULL; ln = ln->next)
+ ArchFree(ln->datum);
+ Lst_Done(&archives);
#endif
}
bool
Arch_IsLib(GNode *gn)
{
- static const char armag[] = "!<arch>\n";
- char buf[sizeof armag - 1];
+ char buf[8];
int fd;
+ bool isLib;
if ((fd = open(gn->path, O_RDONLY)) == -1)
return false;
-
- if (read(fd, buf, sizeof buf) != sizeof buf) {
- (void)close(fd);
- return false;
- }
-
+ isLib = read(fd, buf, sizeof buf) == sizeof buf
+ && memcmp(buf, "!<arch>\n", sizeof buf) == 0;
(void)close(fd);
-
- return memcmp(buf, armag, sizeof buf) == 0;
+ return isLib;
}
diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1
index 7c50930807f4..f2b05878e7e2 100644
--- a/contrib/bmake/bmake.cat1
+++ b/contrib/bmake/bmake.cat1
@@ -1,924 +1,1783 @@
-is a program designed to simplify the maintenance of other pro-
-grams. Its input is a list of specifications as to the files
-upon which programs and other files depend. If no option is
-given, tries to open then in order to find the specifications.
-If the file exists, it is read, see This manual page is intended
-as a reference document only. For a more thorough description of
-and makefiles, please refer to (from 1993). prepends the con-
-tents of the environment variable to the command line arguments
-before parsing them. The options are as follows: Try to be back-
-wards compatible by executing a single shell per command and by
-making the sources of a dependency line in sequence. Change to
-before reading the makefiles or doing anything else. If multiple
-options are specified, each is interpreted relative to the previ-
-ous one: is equivalent to Define to be 1, in the global scope.
-Turn on debugging, and specify which portions of are to print de-
-bugging information. Unless the flags are preceded by they are
-added to the environment variable and are passed on to any child
-make processes. By default, debugging information is printed to
-standard error, but this can be changed using the debugging flag.
-The debugging output is always unbuffered; in addition, if debug-
-ging is enabled but debugging output is not directed to standard
-output, the standard output is line buffered. The available are:
-Print all possible debugging information; equivalent to specify-
-ing all of the debugging flags. Print debugging information
-about archive searching and caching. Print debugging information
-about the current working directory. Print debugging information
-about conditional evaluation. Print debugging information about
-directory searching and caching. Print debugging information
-about failed commands and targets. Specify where debugging out-
-put is written. This must be the last flag, because it consumes
-the remainder of the argument. If the character immediately af-
-ter the flag is the file is opened in append mode; otherwise the
-file is overwritten. If the file name is or debugging output is
-written to the standard output or standard error output respec-
-tively (and the option has no effect). Otherwise, the output is
-written to the named file. If the file name ends with the is re-
-placed by the pid. Print debugging information about loop evalu-
-ation. Print the input graph before making anything. Print the
-input graph after making everything, or before exiting on error.
-Print the input graph before exiting on error. Print debugging
-information about hash table operations. Print debugging infor-
-mation about running multiple shells. Turn on lint checks. This
-throws errors for variable assignments that do not parse cor-
-rectly, at the time of assignment, so the file and line number
-are available. Print commands in Makefiles regardless of whether
-or not they are prefixed by or other flags. Also known as behav-
-ior. Print debugging information about mode decisions about tar-
-gets. Print debugging information about making targets, includ-
-ing modification dates. Don't delete the temporary command
-scripts created when running commands. These temporary scripts
-are created in the directory referred to by the environment vari-
-able, or in if is unset or set to the empty string. The tempo-
-rary scripts are created by and have names of the form This can
-create many files in or so use with care. Print debugging infor-
-mation about makefile parsing. Print debugging information about
-suffix-transformation rules. Print debugging information about
-target list maintenance. Force the option to print raw values of
-variables, overriding the default behavior set via Print debug-
-ging information about variable assignment and expansion. Run
-shell commands with so the actual commands are printed as they
-are executed. Let environment variables override global vari-
-ables within makefiles. Specify a makefile to read instead of
-the default or If is standard input is read. Multiple makefiles
-may be specified, and are read in the order specified. Specify a
-directory in which to search for makefiles and included make-
-files. The system makefile directory (or directories, see the
-option) is automatically included as part of this list. Ignore
-non-zero exit of shell commands in the makefile. Equivalent to
-specifying before each command line in the makefile. This option
-should be specified by the user. When the option is in use in a
-recursive build, this option is passed by a make to child makes
-to allow all the make processes in the build to cooperate to
-avoid overloading the system. Specify the maximum number of jobs
-that may have running at any one time. If is a floating point
-number, or ends with then the value is multiplied by the number
-of CPUs reported online by The value of is saved in Turns compat-
-ibility mode off, unless the option is also specified. When com-
-patibility mode is off, all commands associated with a target are
-executed in a single shell invocation as opposed to the tradi-
-tional one shell invocation per line. This can break traditional
-scripts which change directories on each command invocation and
-then expect to start with a fresh environment on the next line.
-It is more efficient to correct the scripts rather than turn
-backwards compatibility on. A job token pool with tokens is used
-to control the total number of jobs running. Each instance of
-will wait for a token from the pool before running a new job.
-Continue processing after errors are encountered, but only on
-those targets that do not depend on the target whose creation
-caused the error. Specify a directory in which to search for and
-makefiles included via the include statement. The option can be
-used multiple times to form a search path. This path overrides
-the default system include path Furthermore, the system include
-path is appended to the search path used for include statements
-(see the option). The system include path can be referenced via
-the read-only variable If a directory name in the argument (or
-the environment variable) starts with the string searches for the
-specified file or directory named in the remaining part of the
-argument string. The search starts with the current directory
-and then works upward towards the root of the file system. If
-the search is successful, the resulting directory replaces the
-specification in the argument. This feature allows to easily
-search in the current source tree for customized files (e.g., by
-using as an argument). Display the commands that would have been
-executed, but do not actually execute them unless the target de-
-pends on the special source (see below) or the command is pre-
-fixed with Display the commands that would have been executed,
-but do not actually execute any of them; useful for debugging
-top-level makefiles without descending into subdirectories. Do
-not execute any commands, instead exit 0 if the specified targets
-are up to date, and 1 otherwise. Do not use the built-in rules
-specified in the system makefile. Stop processing if an error is
-encountered. This is the default behavior and the opposite of Do
-not echo any commands as they are executed. Equivalent to speci-
-fying before each command line in the makefile. When used with
-the flag, append a trace record to for each job started and com-
-pleted. Rather than re-building a target as specified in the
-makefile, create it or update its modification time to make it
-appear up-to-date. Print the value of Do not build any targets.
-Multiple instances of this option may be specified; the variables
-are printed one per line, with a blank line for each null or un-
-defined variable. The value printed is extracted from the global
-scope after all makefiles have been read. By default, the raw
-variable contents (which may include additional unexpanded vari-
-able references) are shown. If contains a it is not interpreted
-as a variable name but rather as an expression. Its value is ex-
-panded before printing. The value is also expanded before print-
-ing if is set to true and the option has not been used to over-
-ride it. Note that loop-local and target-local variables, as
-well as values taken temporarily by global variables during make-
-file processing, are not accessible via this option. The debug
-mode can be used to see these at the cost of generating substan-
-tial extraneous output. Like but all printed variables are al-
-ways expanded to their complete value. The last occurrence of or
-decides whether all variables are expanded or not. Treat any
-warnings during makefile parsing as errors. Print entering and
-leaving directory messages, pre and post processing. Don't ex-
-port variables passed on the command line to the environment in-
-dividually. Variables passed on the command line are still ex-
-ported via the environment variable. This option may be useful
-on systems which have a small limit on the size of command argu-
-ments. Set the value of the variable to Normally, all values
-passed on the command line are also exported to sub-makes in the
-environment. The flag disables this behavior. Variable assign-
-ments should follow options for POSIX compatibility but no order-
-ing is enforced. There are several different types of lines in a
-makefile: dependency specifications, shell commands, variable as-
-signments, include statements, conditional directives, for loops,
-other directives, and comments. Lines may be continued from one
-line to the next by ending them with a backslash The trailing
-newline character and initial whitespace on the following line
-are compressed into a single space. Dependency lines consist of
-one or more targets, an operator, and zero or more sources. This
-creates a relationship where the targets on the sources and are
-customarily created from them. A target is considered out of
-date if it does not exist, or if its modification time is less
-than that of any of its sources. An out-of-date target is re-
-created, but not until all sources have been examined and them-
-selves re-created as needed. Three operators may be used: Many
-dependency lines may name this target but only one may have at-
-tached shell commands. All sources named in all dependency lines
-are considered together, and if needed the attached shell com-
-mands are run to create or re-create the target. If is inter-
-rupted, the target is removed. The same, but the target is al-
-ways re-created whether or not it is out of date. Any dependency
-line may have attached shell commands, but each one is handled
-independently: its sources are considered and the attached shell
-commands are run if the target is out of date with respect to
-(only) those sources. Thus, different groups of the attached
-shell commands may be run depending on the circumstances. Fur-
-thermore, unlike for dependency lines with no sources, the at-
-tached shell commands are always run. Also unlike the target is
-not removed if is interrupted. All dependency lines mentioning a
-particular target must use the same operator. Targets and
-sources may contain the shell wildcard values and The values and
-may only be used as part of the final component of the target or
-source, and only match existing files. The value need not neces-
-sarily be used to describe existing files. Expansion is in di-
-rectory order, not alphabetically as done in the shell. Each
-target may have associated with it one or more lines of shell
-commands, normally used to create the target. Each of the lines
-in this script be preceded by a tab. (For historical reasons,
-spaces are not accepted.) While targets can occur in many depen-
-dency lines if desired, by default only one of these rules may be
-followed by a creation script. If the operator is used, however,
-all rules may include scripts, and the respective scripts are ex-
-ecuted in the order found. Each line is treated as a separate
-shell command, unless the end of line is escaped with a backslash
-in which case that line and the next are combined. If the first
-characters of the command are any combination of or the command
-is treated specially. causes the command not to be echoed before
-it is executed. causes the command to be executed even when is
-given. This is similar to the effect of the special source, ex-
-cept that the effect can be limited to a single line of a script.
-in compatibility mode causes any non-zero exit status of the com-
-mand line to be ignored. When is run in jobs mode with the en-
-tire script for the target is fed to a single instance of the
-shell. In compatibility (non-jobs) mode, each command is run in
-a separate process. If the command contains any shell meta char-
-acters it is passed to the shell; otherwise attempts direct exe-
-cution. If a line starts with and the shell has ErrCtl enabled,
-failure of the command line is ignored as in compatibility mode.
-Otherwise affects the entire job; the script stops at the first
-command line that fails, but the target is not deemed to have
-failed. Makefiles should be written so that the mode of opera-
-tion does not change their behavior. For example, any command
-which uses or without the intention of changing the directory for
-subsequent commands should be put in parentheses so it executes
-in a subshell. To force the use of a single shell, escape the
-line breaks so as to make the whole script one command. For ex-
-ample: avoid-chdir-side-effects: @echo "Building $@ in
-$$(pwd)" @(cd ${.CURDIR} && ${MAKE} $@) @echo
-"Back in $$(pwd)"
-
-ensure-one-shell-regardless-of-mode: @echo "Building $@
-in $$(pwd)"; \ (cd ${.CURDIR} && ${MAKE} $@); \
- echo "Back in $$(pwd)" Since changes the current working
-directory to before executing any targets, each child process
-starts with that as its current working directory. Variables in
-make behave much like macros in the C preprocessor. Variable as-
-signments have the form where: is a single-word variable name,
-consisting, by tradition, of all upper-case letters, is one of
-the variable assignment operators described below, and is inter-
-preted according to the variable assignment operator. Whitespace
-around and is discarded. The five operators that assign values
-to variables are: Assign the value to the variable. Any previous
-value is overwritten. Append the value to the current value of
-the variable, separating them by a single space. Assign the
-value to the variable if it is not already defined. Expand the
-value, then assign it to the variable. References to undefined
-variables are expanded. This can cause problems when variable
-modifiers are used. Expand the value and pass it to the shell
-for execution, then assign the output from the child's standard
-output to the variable. Any newlines in the result are replaced
-with spaces. In most contexts where variables are expanded, ex-
-pands to a single dollar sign. In other contexts (most variable
-modifiers, string literals in conditions), expands to a single
-dollar sign. References to variables have the form or If the
-variable name consists of only a single character and the expres-
-sion contains no modifiers, the surrounding curly braces or
-parentheses are not required. This shorter form is not recom-
-mended. If the variable name contains a dollar, the name itself
-is expanded first. This allows almost arbitrary variable names,
-however names containing dollar, braces, parentheses or white-
-space are really best avoided. If the result of expanding a
-nested variable expression contains a dollar sign the result is
-subject to further expansion. Variable substitution occurs at
-four distinct times, depending on where the variable is being
-used. Variables in dependency lines are expanded as the line is
-read. Variables in conditionals are expanded individually, but
-only as far as necessary to determine the result of the condi-
-tional. Variables in shell commands are expanded when the shell
-command is executed. loop index variables are expanded on each
-loop iteration. Note that other variables are not expanded when
-composing the body of a loop, so the following example code: .for
-i in 1 2 3 a+= ${i} j= ${i} b+= ${j} .endfor
-
-all: @echo ${a} @echo ${b} prints: 1 2 3 3 3 3
-After the loop is executed: contains which expands to contains
-which expands to contains which expands to and further to The
-four different classes of variables (in order of increasing
-precedence) are: Variables defined as part of environment. Vari-
-ables defined in the makefile or in included makefiles. Vari-
-ables defined as part of the command line. Variables that are
-defined specific to a certain target. Local variables can be set
-on a dependency line, unless is set to The rest of the line
-(which already has had global variables expanded) is the variable
-value. For example: COMPILER_WRAPPERS= ccache distcc icecc
-
-${OBJS}: .MAKE.META.CMP_FILTER=${COMPILER_WRAPPERS:S,^,N,} Only
-the targets are impacted by that filter (in mode) and simply en-
-abling/disabling any of the compiler wrappers does not render all
-of those targets out-of-date. target-local variable assignments
-behave differently in that; Only appends to a previous local as-
-signment for the same target and variable. Is redundant with re-
-spect to global variables, which have already been expanded. The
-seven built-in local variables are: The list of all sources for
-this target; also known as The name of the archive file; also
-known as In suffix-transformation rules, the name/path of the
-source from which the target is to be transformed (the source);
-also known as It is not defined in explicit rules. The name of
-the archive member; also known as The list of sources for this
-target that were deemed out-of-date; also known as The name of
-the target with suffix (if declared in removed; also known as The
-name of the target; also known as For compatibility with other
-makes this is an alias for in archive member rules. The shorter
-forms and are permitted for backward compatibility with histori-
-cal makefiles and legacy POSIX make and are not recommended.
-Variants of these variables with the punctuation followed immedi-
-ately by or e.g. are legacy forms equivalent to using the and
-modifiers. These forms are accepted for compatibility with make-
-files and POSIX but are not recommended. Four of the local vari-
-ables may be used in sources on dependency lines because they ex-
-pand to the proper value for each target on the line. These
-variables are and In addition, sets or knows about the following
-variables: The list of all targets encountered in the makefiles.
-If evaluated during makefile parsing, lists only those targets
-encountered thus far. A path to the directory where was exe-
-cuted. Refer to the description of for more details. Is used in
-error handling, see Is used in error handling, see Is used in er-
-ror handling, see Is used in error handling in mode, see Is used
-in error handling, see The directory of the file this makefile
-was included from. The filename of the file this makefile was
-included from. The machine hardware name, see The machine
-processor architecture name, see The name that was executed with
-The same as for compatibility. The preferred variable to use is
-the environment variable because it is more compatible with other
-make variants and cannot be confused with the special target with
-the same name. Names the makefile (default from which generated
-dependencies are read. If set to do not print error information
-at the end. A boolean that controls the default behavior of the
-option. If true, variable values printed with are fully ex-
-panded; if false, the raw variable contents (which may include
-additional unexpanded variable references) are shown. The list
-of variables exported by The top-level makefile that is currently
-read, as given in the command line. The environment variable may
-contain anything that may be specified on command line. Anything
-specified on command line is appended to the variable, which is
-then added to the environment for all programs that executes.
-The numeric group ID of the user running It is read-only. If is
-run with the output for each target is prefixed with a token the
-first part of which can be controlled via If is empty, no token
-is printed. For example, setting to would produce tokens like
-making it easier to track the degree of parallelism being
-achieved. The argument to the option. A read-only boolean that
-indicates whether the option supports use of The recursion depth
-of The top-level instance of has level 0, and each child make has
-its parent level plus 1. This allows tests like: to protect
-things which should only be evaluated in the top-level instance
-of The name of the environment variable that stores the level of
-nested calls to The ordered list of makefile names (default that
-looks for. The list of makefiles read by which is useful for
-tracking dependencies. Each makefile is recorded only once, re-
-gardless of the number of times read. In mode, provides a list
-of prefixes which match the directories controlled by If a file
-that was generated outside of but within said bailiwick is miss-
-ing, the current target is considered out-of-date. In mode, it
-can (very rarely!) be useful to filter command lines before com-
-parison. This variable can be set to a set of modifiers that are
-applied to each line of the old and new command that differ, if
-the filtered commands still differ, the target is considered out-
-of-date. In mode, this variable contains a list of all the meta
-files updated. If not empty, it can be used to trigger process-
-ing of In mode, this variable contains a list of all the meta
-files used (updated or not). This list can be used to process
-the meta files to extract dependency information. Provides a
-list of variable modifiers to apply to each pathname. Ignore if
-the expansion is an empty string. Provides a list of path pre-
-fixes that should be ignored; because the contents are expected
-to change over time. The default list includes: Provides a list
-of patterns to match against pathnames. Ignore any that match.
-Defines the message printed for each meta file updated in mode.
-The default value is: Processed after reading all makefiles. Af-
-fects the mode that runs in. It can contain these keywords: Like
-puts into mode. Puts into mode, where meta files are created for
-each target to capture the command run, the output generated, and
-if is available, the system calls which are of interest to The
-captured output can be useful when diagnosing errors. By de-
-fault, does not create files in This can be overridden by setting
-to a value which represents true. If is true, a missing file
-makes the target out-of-date. If is true, missing filemon data
-makes the target out-of-date. Do not use For debugging, it can
-be useful to include the environment in the file. If in mode,
-print a clue about the target being built. This is useful if the
-build is otherwise running silently. The message printed is the
-expanded value of Some makefiles have commands which are simply
-not stable. This keyword causes them to be ignored for determin-
-ing whether a target is out of date in mode. See also If is
-true, when a .meta file is created, mark the target In both com-
-pat and parallel mode, do not make the targets in the usual or-
-der, but instead randomize their order. This mode can be used to
-detect undeclared dependencies between files. Used to create
-files in a separate directory, see Used to force a separate di-
-rectory for the created files, even if that directory is not
-writable, see Used to create files in a separate directory, see
-The name of the operating system, see It is read-only. This
-variable is used to record the names of variables assigned to on
-the command line, so that they may be exported as part of This
-behavior can be disabled by assigning an empty value to within a
-makefile. Extra variables can be exported from a makefile by ap-
-pending their names to is re-exported whenever is modified. If
-was built with support, this is set to the path of the device
-node. This allows makefiles to test for this support. The
-process ID of It is read-only. The parent process ID of It is
-read-only. When stops due to an error, it sets to the name of
-the target that failed, to the exit status of the failed target,
-to the commands of the failed target, and in mode, it also sets
-to the and to the path of the meta file (if any) describing the
-failed target. It then prints its name and the value of as well
-as the value of any variables named in If true, are preserved
-when doing assignments. The default is false, for backwards com-
-patibility. Set to true for compatability with other makes. If
-set to false, becomes per normal evaluation rules. If set to ap-
-parent variable assignments in dependency lines are treated as
-normal sources. The numeric ID of the user running It is read-
-only. This variable is simply assigned a newline character as
-its value. It is read-only. This allows expansions using the
-modifier to put a newline between iterations of the loop rather
-than a space. For example, in case of an error, prints the vari-
-able names and their values using: A path to the directory where
-the targets are built. Its value is determined by trying to to
-the following directories in order and using the first match:
-(Only if is set in the environment or on the command line.)
-(Only if is set in the environment or on the command line.)
-Variable expansion is performed on the value before it is used,
-so expressions such as may be used. This is especially useful
-with may be modified in the makefile via the special target In
-all cases, changes to the specified directory if it exists, and
-sets and to that directory before executing any targets. Except
-in the case of an explicit target, checks that the specified di-
-rectory is writable and ignores it if not. This check can be
-skipped by setting the environment variable to The directory name
-of the current makefile being parsed. The basename of the cur-
-rent makefile being parsed. This variable and are both set only
-while the makefiles are being parsed. To retain their current
-values, assign them to a variable using assignment with expansion
-The space-separated list of directories that searches for files.
-To update this search list, use the special target rather than
-modifying the variable directly. Is set in POSIX mode, see the
-special target. Alternate path to the current directory. nor-
-mally sets to the canonical path given by However, if the envi-
-ronment variable is set and gives a path to the current direc-
-tory, sets to the value of instead. This behavior is disabled if
-is set or contains a variable transform. is set to the value of
-for all programs which executes. The pathname of the shell used
-to run target scripts. It is read-only. The list of known suf-
-fixes. It is read-only. The space-separated list of directories
-that searches for makefiles, referred to as the system include
-path. To update this search list, use the special target rather
-than modifying the variable which is read-only. The list of tar-
-gets explicitly specified on the command line, if any. The
-colon-separated list of directories that searches for files.
-This variable is supported for compatibility with old make pro-
-grams only, use instead. The general format of a variable expan-
-sion is: Each modifier begins with a colon. To escape a colon,
-precede it with a backslash A list of indirect modifiers can be
-specified via a variable, as follows:
-
-In this case, the first modifier in the does not start with a
-colon, since that colon already occurs in the referencing vari-
-able. If any of the modifiers in the contains a dollar sign
-these must be doubled to avoid early expansion. Some modifiers
-interpret the expression value as a single string, others treat
-the expression value as a whitespace-separated list of words.
-When splitting a string into words, whitespace can be escaped us-
-ing double quotes, single quotes and backslashes, like in the
-shell. The quotes and backslashes are retained in the words.
-The supported modifiers are: Replaces each word with its suffix.
-Replaces each word with its dirname. Selects only those words
-that match The standard shell wildcard characters and may be
-used. The wildcard characters may be escaped with a backslash As
-a consequence of the way values are split into words, matched,
-and then joined, the construct removes all leading and trailing
-whitespace and normalizes the inter-word spacing to a single
-space. This is the opposite of selecting all words which do
-match Orders the words lexicographically. Orders the words nu-
-merically. A number followed by one of or is multiplied by the
-appropriate factor, which is 1024 for 1048576 for or 1073741824
-for Both upper- and lower-case letters are accepted. Orders the
-words in reverse lexicographical order. Orders the words in re-
-verse numerical order. Shuffles the words. The results are dif-
-ferent each time you are referring to the modified variable; use
-the assignment with expansion to prevent such behavior. For ex-
-ample, LIST= uno due tre quattro RAN-
-DOM_LIST= ${LIST:Ox} STATIC_RAN-
-DOM_LIST:= ${LIST:Ox}
-
-all: @echo "${RANDOM_LIST}" @echo "${RAN-
-DOM_LIST}" @echo "${STATIC_RANDOM_LIST}" @echo
-"${STATIC_RANDOM_LIST}" may produce output similar to: quattro
-due tre uno tre due quattro uno due uno quattro tre due uno quat-
-tro tre Quotes every shell meta-character in the value, so that
-it can be passed safely to the shell. Quotes every shell meta-
-character in the value, and also doubles characters so that it
-can be passed safely through recursive invocations of This is
-equivalent to Replaces each word with everything but its suffix.
-The value is an integer sequence representing the words of the
-original value, or the supplied The value is interpreted as a
-format string for using producing the formatted timestamp. Note:
-the format should only be used with If a value is not provided or
-is 0, the current time is used. Computes a 32-bit hash of the
-value and encodes it as 8 hex digits. The value is interpreted
-as a format string for using producing the formatted timestamp.
-If a value is not provided or is 0, the current time is used.
-Call with each word as pathname; use as the new value. If fails;
-use or current time. If is set to then failure will cause an er-
-ror. Attempts to convert the value to an absolute path using If
-that fails, the value is unchanged. Converts the value to lower-
-case letters. When joining the words after a modifier that
-treats the value as words, the words are normally separated by a
-space. This modifier changes the separator to the character If
-is omitted, no separator is used. The common escapes (including
-octal numeric codes) work as expected. Converts the value to up-
-per-case letters. Causes subsequent modifiers to treat the value
-as a single word (possibly containing embedded whitespace). See
-also Causes the value to be treated as a list of words. See also
-Modifies the first occurrence of in each word of the value, re-
-placing it with If a is appended to the last delimiter of the
-pattern, all occurrences in each word are replaced. If a is ap-
-pended to the last delimiter of the pattern, only the first oc-
-currence is affected. If a is appended to the last delimiter of
-the pattern, the value is treated as a single word. If begins
-with a caret is anchored at the beginning of each word. If ends
-with a dollar sign it is anchored at the end of each word. In-
-side an ampersand is replaced by (without the anchoring or Any
-character may be used as the delimiter for the parts of the modi-
-fier string. The anchoring, ampersand and delimiter characters
-can be escaped with a backslash Both and may contain nested ex-
-pressions. To prevent a dollar sign from starting a nested ex-
-pression, escape it with a backslash. The modifier works like
-the modifier except that the old and new strings, instead of be-
-ing simple strings, are an extended regular expression (see and
-an Normally, the first occurrence of the pattern in each word of
-the value is substituted with The modifier causes the substitu-
-tion to apply to at most one word; the modifier causes the sub-
-stitution to apply to as many instances of the search pattern as
-occur in the word or words it is found in; the modifier causes
-the value to be treated as a single word (possibly containing em-
-bedded whitespace). As for the modifier, the and are subjected
-to variable expansion before being parsed as regular expressions.
-Replaces each word with its last path component (basename). Re-
-moves adjacent duplicate words (like If the variable name (not
-its value), when parsed as a conditional expression, evaluates to
-true, return as its value the otherwise return the Since the
-variable name is used as the expression, :? must be the first
-modifier after the variable name which, of course, usually con-
-tains variable expansions. A common error is trying to use ex-
-pressions like which actually tests defined(NUMBERS). To deter-
-mine if any words match you need to use something like: This is
-the style substitution. It can only be the last modifier speci-
-fied, as a in either or is treated as a regular character, not as
-the end of the modifier. If does not contain the pattern match-
-ing character and the word ends with or equals it, that suffix is
-replaced with Otherwise, the first in matches a possibly empty
-substring of arbitrary characters, and if the whole pattern is
-found in the word, the matching part is replaced with and the
-first occurrence of in (if any) is replaced with the substring
-matched by the Both and may contain nested expressions. To pre-
-vent a dollar sign from starting a nested expression, escape it
-with a backslash. This is the loop expansion mechanism from the
-OSF Development Environment (ODE) make. Unlike loops, expansion
-occurs at the time of reference. For each word in the value, as-
-sign the word to the variable named and evaluate The ODE conven-
-tion is that should start and end with a period, for example:
-However, a single-letter variable is often more readable: Saves
-the current variable value in or the named for later reference.
-Example usage: M_cmpv.units = 1 1000 1000000 M_cmpv = S,.,
-,g:_:range:@i@+ $${_:[-$$i]} \ \*
-$${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh
-
-
-Here is used to save the result of the modifier which is later
-referenced using the index values from If the variable is unde-
-fined, the optional (which may be empty) is the value. If the
-variable is defined, the existing value is returned. This is an-
-other ODE make feature. It is handy for setting per-target
-CFLAGS for instance: If a value is only required if the variable
-is undefined, use: If the variable is defined, (which may be
-empty) is the value. The name of the variable is the value. The
-path of the node which has the same name as the variable is the
-value. If no such node exists or its path is null, the name of
-the variable is used. In order for this modifier to work, the
-name (node) must at least have appeared on the right-hand side of
-a dependency. The output of running is the value. The value is
-run as a command, and the output becomes the new value. The
-variable is assigned the value after substitution. This modifier
-and its variations are useful in obscure situations such as want-
-ing to set a variable at a point where a target's shell commands
-are being parsed. These assignment modifiers always expand to
-nothing. The helps avoid false matches with the style modifier
-and since substitution always occurs, the form is vaguely appro-
-priate. As for but only if the variable does not already have a
-value. Append to the variable. Assign the output of to the
-variable. Selects one or more words from the value, or performs
-other operations related to the way in which the value is split
-into words. An empty value, or a value that consists entirely of
-white-space, is treated as a single word. For the purposes of
-the modifier, the words are indexed both forwards using positive
-integers (where index 1 represents the first word), and backwards
-using negative integers (where index -1 represents the last
-word). The is subjected to variable expansion, and the expanded
-result is then interpreted as follows: Selects a single word from
-the value. Selects all words from to inclusive. For example,
-selects all words from the second word to the last word. If is
-greater than the words are output in reverse order. For example,
-selects all the words from last to first. If the list is already
-ordered, this effectively reverses the list, but it is more effi-
-cient to use instead of Causes subsequent modifiers to treat the
-value as a single word (possibly containing embedded whitespace).
-Analogous to the effect of in Bourne shell. Means the same as
-Causes subsequent modifiers to treat the value as a sequence of
-words delimited by whitespace. Analogous to the effect of in
-Bourne shell. Returns the number of words in the value. offers
-directives for including makefiles, conditionals and for loops.
-All these directives are identified by a line beginning with a
-single dot character, followed by the keyword of the directive,
-such as or Files are included with either or Variables between
-the angle brackets or double quotes are expanded to form the file
-name. If angle brackets are used, the included makefile is ex-
-pected to be in the system makefile directory. If double quotes
-are used, the including makefile's directory and any directories
-specified using the option are searched before the system make-
-file directory. For compatibility with other make variants,
-(without leading dot) is also accepted. If the include statement
-is written as or as errors locating and/or opening include files
-are ignored. If the include statement is written as not only are
-errors locating and/or opening include files ignored, but stale
-dependencies within the included file are ignored just like in
-The directives for exporting and unexporting variables are: Ex-
-port the specified global variable. If no variable list is pro-
-vided, all globals are exported except for internal variables
-(those that start with This is not affected by the flag, so
-should be used with caution. For compatibility with other make
-programs, (without leading dot) is also accepted. Appending a
-variable name to is equivalent to exporting a variable. The same
-as except that the variable is not appended to This allows ex-
-porting a value to the environment which is different from that
-used by internally. The same as except that variables in the
-value are not expanded. The opposite of The specified global is
-removed from If no variable list is provided, all globals are un-
-exported, and deleted. Unexport all globals previously exported
-and clear the environment inherited from the parent. This opera-
-tion causes a memory leak of the original environment, so should
-be used sparingly. Testing for being 0 would make sense. Also
-note that any variables which originated in the parent environ-
-ment should be explicitly preserved if desired. For example:
-PATH := ${PATH} Would result in an environment containing only
-which is the minimal useful environment. Actually is also pushed
-into the new environment. The directives for printing messages
-to the output are: The message is printed along with the name of
-the makefile and line number. The message prefixed by is printed
-along with the name of the makefile and line number. The message
-is printed along with the name of the makefile and line number,
-exits immediately. The directives for conditionals are: Test the
-value of an expression. Test whether a variable is defined.
-Test whether a variable is not defined. Test the target being
-requested. Test the target being requested. Reverse the sense
-of the last conditional. A combination of followed by A combina-
-tion of followed by A combination of followed by A combination of
-followed by A combination of followed by End the body of the con-
-ditional. The may be any one of the following: Logical OR. Log-
-ical AND; of higher precedence than only evaluates a conditional
-as far as is necessary to determine its value. Parentheses can
-be used to override the operator precedence. The boolean opera-
-tor may be used to logically negate an expression, typically a
-function call. It is of higher precedence than The value of may
-be any of the following function call expressions: Evaluates to
-true if the variable has been defined. Evaluates to true if the
-target was specified as part of command line or was declared the
-default target (either implicitly or explicitly, see before the
-line containing the conditional. Evaluates to true if the expan-
-sion of the variable, after applying the modifiers, results in an
-empty string. Evaluates to true if the given pathname exists.
-If relative, the pathname is searched for on the system search
-path (see Evaluates to true if the target has been defined.
-Evaluates to true if the target has been defined and has commands
-associated with it. may also be an arithmetic or string compari-
-son. Variable expansion is performed on both sides of the com-
-parison. If both sides are numeric and neither is enclosed in
-quotes, the comparison is done numerically, otherwise lexico-
-graphically. A string is interpreted as a hexadecimal integer if
-it is preceded by otherwise it is interpreted as a decimal float-
-ing-point number; octal numbers are not supported. All compar-
-isons may use the operators and Numeric comparisons may also use
-the operators and If the comparison has neither a comparison op-
-erator nor a right side, the expression evaluates to true if it
-is nonempty and its numeric value (if any) is not zero. When is
-evaluating one of these conditional expressions, and it encoun-
-ters a (whitespace-separated) word it doesn't recognize, either
-the or function is applied to it, depending on the form of the
-conditional. If the form is or the function is applied. Simi-
-larly, if the form is or the function is applied. If the condi-
-tional evaluates to true, parsing of the makefile continues as
-before. If it evaluates to false, the following lines until the
-corresponding variant, or are skipped. For loops are typically
-used to apply a set of rules to a list of files. The syntax of a
-for loop is: The is expanded and then split into words. On each
-iteration of the loop, one word is taken and assigned to each in
-order, and these are substituted into the inside the body of the
-for loop. The number of words must come out even; that is, if
-there are three iteration variables, the number of words provided
-must be a multiple of three. If is encountered within a loop, it
-causes early termination of the loop, otherwise a parse error.
-Un-define the specified global variables. Only global variables
-can be un-defined. Comments begin with a hash character, any-
-where but in a shell command line, and continue to the end of an
-unescaped new line. Target is never out of date, but always exe-
-cute commands anyway. Ignore any errors from the commands asso-
-ciated with this target, exactly as if they all were preceded by
-a dash Mark all sources of this target as being up to date. Exe-
-cute the commands associated with this target even if the or op-
-tions were specified. Normally used to mark recursive Create a
-meta file for the target, even if it is flagged as or Usage in
-conjunction with is the most likely case. In mode, the target is
-out-of-date if the meta file is missing. Do not create a meta
-file for the target. Meta files are also not created for or tar-
-gets. Ignore differences in commands when deciding if target is
-out of date. This is useful if the command contains a value
-which always changes. If the number of commands change, though,
-the target is still considered out of date. The same effect ap-
-plies to any command line that uses the variable which can be
-used for that purpose even when not otherwise needed or desired:
-
-skip-compare-for-some: @echo this is compared
- @echo this is not ${.OODATE:M.NOMETA_CMP} @echo
-this is also compared
-
-The pattern suppresses any expansion of the unwanted variable.
-Do not search for the target in the directories specified by Nor-
-mally selects the first target it encounters as the default tar-
-get to be built if no target was specified. This source prevents
-this target from being selected. If a target is marked with this
-attribute and can't figure out how to create it, it ignores this
-fact and assumes the file isn't needed or already exists. The
-target does not correspond to an actual file; it is always con-
-sidered to be out of date, and is not created with the option.
-Suffix-transformation rules are not applied to targets. When is
-interrupted, it normally removes any partially made targets.
-This source prevents the target from being removed. Synonym for
-Do not echo any of the commands associated with this target, ex-
-actly as if they all were preceded by an at sign Turn the target
-into version of a macro. When the target is used as a source for
-another target, the other target acquires the commands, sources,
-and attributes (except for of the source. If the target already
-has commands, the target's commands are appended to them. Like
-but instead of appending, prepend the target commands to the tar-
-get. If appears in a dependency line, the sources that precede
-it are made before the sources that succeed it in the line.
-Since the dependents of files are not made until the file itself
-could be made, this also stops the dependents being built unless
-they are needed for another branch of the dependency tree. So
-given: x: a .WAIT b echo x a: echo a b: b1
- echo b b1: echo b1
-
-the output is always The ordering imposed by is only relevant for
-parallel makes. Special targets may not be included with other
-targets, i.e. they must be the only target specified. Any com-
-mand lines attached to this target are executed before anything
-else is done. This is sort of a rule for any target (that was
-used only as a source) that can't figure out any other way to
-create. Only the shell script is used. The variable of a target
-that inherits commands is set to the target's own name. If this
-target is present in the makefile, it globally causes make to
-delete targets whose commands fail. (By default, only targets
-whose commands are interrupted during execution are deleted.
-This is the historical behavior.) This setting can be used to
-help prevent half-finished or malformed targets from being left
-around and corrupting future rebuilds. Any command lines at-
-tached to this target are executed after everything else is done
-successfully. Any command lines attached to this target are exe-
-cuted when another target fails. See for the variables that will
-be set. Mark each of the sources with the attribute. If no
-sources are specified, this is the equivalent of specifying the
-option. If is interrupted, the commands for this target are exe-
-cuted. If no target is specified when is invoked, this target is
-built. This target provides a way to specify flags for at the
-time when the makefiles are read. The flags are as if typed to
-the shell, though the option has no effect. Apply the attribute
-to any specified sources. Disable parallel mode. Synonym for
-for compatibility with other pmake variants. clear the read-only
-attribute from the global variables specified as sources. The
-source is a new value for If it exists, changes the current work-
-ing directory to it and updates the value of In parallel mode,
-the named targets are made in sequence. This ordering does not
-add targets to the list of targets to be made. Since the depen-
-dents of a target do not get built until the target itself could
-be built, unless is built by another part of the dependency
-graph, the following is a dependency loop: .ORDER: b a b: a The
-sources are directories which are to be searched for files not
-found in the current directory. If no sources are specified, any
-previously specified directories are removed from the search
-path. If the source is the special target, the current working
-directory is searched last. Like but applies only to files with
-a particular suffix. The suffix must have been previously de-
-clared with Apply the attribute to any specified sources. If
-this is the first non-comment line in the main makefile, the
-variable is set to the value and the makefile is included if it
-exists, to provide POSIX-compatible default rules. If is run
-with the flag, only contributes to the default rules. Apply the
-attribute to any specified sources. If no sources are specified,
-the attribute is applied to every target in the file. set the
-read-only attribute on the global variables specified as sources.
-Sets the shell that uses to execute commands. The sources are a
-set of pairs. This is the minimal specification, used to select
-one of the built-in shell specs; and Specifies the absolute path
-to the shell. Indicates whether the shell supports exit on er-
-ror. The command to turn on error checking. The command to dis-
-able error checking. The command to turn on echoing of commands
-executed. The command to turn off echoing of commands executed.
-The output to filter after issuing the command. It is typically
-identical to The flag to pass the shell to enable error checking.
-The flag to pass the shell to enable command echoing. The string
-literal to pass the shell that results in a single newline char-
-acter when used outside of any quoting characters. Example:
-.SHELL: name=ksh path=/bin/ksh hasErrCtl=true \
- check="set -e" ignore="set +e" \ echo="set -v"
-quiet="set +v" filter="set +v" \ echoFlag=v errFlag=e
-newline="'\n'" Apply the attribute to any specified sources. If
-no sources are specified, the attribute is applied to every com-
-mand in the file. This target gets run when a dependency file
-contains stale entries, having set to the name of that dependency
-file. Each source specifies a suffix to If no sources are speci-
-fied, any previously specified suffixes are deleted. It allows
-the creation of suffix-transformation rules. Example: .SUFFIXES:
-.c .o .c.o: cc -o ${.TARGET} -c ${.IMPSRC} The sources
-are directories which are to be added to the system include path
-which searches for makefiles. If no sources are specified, any
-previously specified directories are removed from the system in-
-clude path. uses the following environment variables, if they
-exist: and and may only be set in the environment or on the com-
-mand line to and not as makefile variables; see the description
-of for more details. list of dependencies first default makefile
-if no makefile is specified on the command line second default
-makefile if no makefile is specified on the command line system
-makefile system makefile directory The basic make syntax is com-
-patible between different make variants; however the special
-variables, variable modifiers and conditionals are not. An in-
-complete list of changes in older versions of The way that .for
-loop variables are substituted changed after NetBSD 5.0 so that
-they still appear to be variable expansions. In particular this
-stops them being treated as syntax, and removes some obscure
-problems using them in .if statements. The way that parallel
-makes are scheduled changed in NetBSD 4.0 so that .ORDER and
-.WAIT apply recursively to the dependent nodes. The algorithms
-used may change again in the future. Other make dialects (GNU
-make, SVR4 make, POSIX make, etc.) do not support most of the
-features of as described in this manual. Most notably: The and
-declarations and most functionality pertaining to paralleliza-
-tion. (GNU make supports parallelization but lacks the features
-needed to control it effectively.) Directives, including for
-loops and conditionals and most of the forms of include files.
-(GNU make has its own incompatible and less powerful syntax for
-conditionals.) All built-in variables that begin with a dot.
-Most of the special sources and targets that begin with a dot,
-with the notable exception of and Variable modifiers, except for
-the string substitution, which does not portably support globbing
-with and historically only works on declared suffixes. The vari-
-able even in its short form; most makes support this functional-
-ity but its name varies. Some features are somewhat more
-portable, such as assignment with and The functionality is based
-on an older feature found in GNU make and many versions of SVR4
-make; however, historically its behavior is too ill-defined (and
-too buggy) to rely upon. The and variables are more or less uni-
-versally portable, as is the variable. Basic use of suffix rules
-(for files only in the current directory, not trying to chain
-transformations together, etc.) is also reasonably portable. is
-derived from NetBSD It uses autoconf to facilitate portability to
-other platforms. A make command appeared in This make implemen-
-tation is based on Adam de Boor's pmake program, which was writ-
-ten for Sprite at Berkeley. It was designed to be a parallel
-distributed make running jobs on different machines using a dae-
-mon called Historically the target/dependency has been used to
-FoRCe rebuilding (since the target/dependency does not exist ...
-unless someone creates an file). The make syntax is difficult to
-parse. For instance, finding the end of a variable's use should
-involve scanning each of the modifiers, using the correct termi-
-nator for each field. In many places make just counts {} and ()
-in order to find the end of a variable expansion. There is no
-way of escaping a space character in a filename. In jobs mode,
-when a target fails; make will put an error token into the job
-token pool. This will cause all other instances of make using
-that token pool to abort the build and exit with error code 6.
-Sometimes the attempt to suppress a cascade of unnecessary er-
-rors, can result in a seemingly unexplained
+BMAKE(1) FreeBSD General Commands Manual BMAKE(1)
+NNAAMMEE
+ bbmmaakkee - maintain program dependencies
+SSYYNNOOPPSSIISS
+ bbmmaakkee [--BBeeiikkNNnnqqrrSSssttWWwwXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s]
+ [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s]
+ [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [--vv _v_a_r_i_a_b_l_e]
+ [_v_a_r_i_a_b_l_e==_v_a_l_u_e] [_t_a_r_g_e_t ...]
+DDEESSCCRRIIPPTTIIOONN
+ bbmmaakkee is a program designed to simplify the maintenance of other
+ programs. Its input is a list of specifications as to the files upon
+ which programs and other files depend. If no --ff _m_a_k_e_f_i_l_e option is
+ given, bbmmaakkee tries to open `_m_a_k_e_f_i_l_e' then `_M_a_k_e_f_i_l_e' in order to find
+ the specifications. If the file `_._d_e_p_e_n_d' exists, it is read, see
+ mkdep(1).
+ This manual page is intended as a reference document only. For a more
+ thorough description of bbmmaakkee and makefiles, please refer to _P_M_a_k_e _- _A
+ _T_u_t_o_r_i_a_l (from 1993).
+ bbmmaakkee prepends the contents of the MAKEFLAGS environment variable to the
+ command line arguments before parsing them.
+ The options are as follows:
+ --BB Try to be backwards compatible by executing a single shell per
+ command and by making the sources of a dependency line in
+ sequence.
+ --CC _d_i_r_e_c_t_o_r_y
+ Change to _d_i_r_e_c_t_o_r_y before reading the makefiles or doing
+ anything else. If multiple --CC options are specified, each is
+ interpreted relative to the previous one: --CC _/ --CC _e_t_c is
+ equivalent to --CC _/_e_t_c.
+ --DD _v_a_r_i_a_b_l_e
+ Define _v_a_r_i_a_b_l_e to be 1, in the global scope.
+ --dd [--]_f_l_a_g_s
+ Turn on debugging, and specify which portions of bbmmaakkee are to
+ print debugging information. Unless the flags are preceded by
+ `-', they are added to the MAKEFLAGS environment variable and are
+ passed on to any child make processes. By default, debugging
+ information is printed to standard error, but this can be changed
+ using the FF debugging flag. The debugging output is always
+ unbuffered; in addition, if debugging is enabled but debugging
+ output is not directed to standard output, the standard output is
+ line buffered. The available _f_l_a_g_s are:
+ AA Print all possible debugging information; equivalent to
+ specifying all of the debugging flags.
+ aa Print debugging information about archive searching and
+ caching.
+ CC Print debugging information about the current working
+ directory.
+ cc Print debugging information about conditional evaluation.
+ dd Print debugging information about directory searching and
+ caching.
+ ee Print debugging information about failed commands and
+ targets.
+
+ FF[++]_f_i_l_e_n_a_m_e
+ Specify where debugging output is written. This must be
+ the last flag, because it consumes the remainder of the
+ argument. If the character immediately after the FF flag
+ is `+', the file is opened in append mode; otherwise the
+ file is overwritten. If the file name is `stdout' or
+ `stderr', debugging output is written to the standard
+ output or standard error output respectively (and the `+'
+ option has no effect). Otherwise, the output is written
+ to the named file. If the file name ends with `.%d', the
+ `%d' is replaced by the pid.
+
+ ff Print debugging information about loop evaluation.
+
+ gg11 Print the input graph before making anything.
+
+ gg22 Print the input graph after making everything, or before
+ exiting on error.
+
+ gg33 Print the input graph before exiting on error.
+
+ hh Print debugging information about hash table operations.
+
+ jj Print debugging information about running multiple
+ shells.
+
+ LL Turn on lint checks. This throws errors for variable
+ assignments that do not parse correctly, at the time of
+ assignment, so the file and line number are available.
+
+ ll Print commands in Makefiles regardless of whether or not
+ they are prefixed by `@' or other "quiet" flags. Also
+ known as "loud" behavior.
+
+ MM Print debugging information about "meta" mode decisions
+ about targets.
+
+ mm Print debugging information about making targets,
+ including modification dates.
+
+ nn Don't delete the temporary command scripts created when
+ running commands. These temporary scripts are created in
+ the directory referred to by the TMPDIR environment
+ variable, or in _/_t_m_p if TMPDIR is unset or set to the
+ empty string. The temporary scripts are created by
+ mkstemp(3), and have names of the form _m_a_k_e_X_X_X_X_X_X. _N_O_T_E:
+ This can create many files in TMPDIR or _/_t_m_p, so use with
+ care.
+
+ pp Print debugging information about makefile parsing.
+
+ ss Print debugging information about suffix-transformation
+ rules.
+
+ tt Print debugging information about target list
+ maintenance.
+
+ VV Force the --VV option to print raw values of variables,
+ overriding the default behavior set via
+ _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S.
+
+ vv Print debugging information about variable assignment and
+ expansion.
+
+ xx Run shell commands with --xx so the actual commands are
+ printed as they are executed.
+
+ --ee Let environment variables override global variables within
+ makefiles.
+
+ --ff _m_a_k_e_f_i_l_e
+ Specify a makefile to read instead of the default _m_a_k_e_f_i_l_e or
+ _M_a_k_e_f_i_l_e. If _m_a_k_e_f_i_l_e is `-', standard input is read. Multiple
+ makefiles may be specified, and are read in the order specified.
+
+ --II _d_i_r_e_c_t_o_r_y
+ Specify a directory in which to search for makefiles and included
+ makefiles. The system makefile directory (or directories, see
+ the --mm option) is automatically included as part of this list.
+
+ --ii Ignore non-zero exit of shell commands in the makefile.
+ Equivalent to specifying `-' before each command line in the
+ makefile.
+
+ --JJ _p_r_i_v_a_t_e
+ This option should _n_o_t be specified by the user.
+
+ When the --jj option is in use in a recursive build, this option is
+ passed by a make to child makes to allow all the make processes
+ in the build to cooperate to avoid overloading the system.
+
+ --jj _m_a_x___j_o_b_s
+ Specify the maximum number of jobs that bbmmaakkee may have running at
+ any one time. If _m_a_x___j_o_b_s is a floating point number, or ends
+ with `C', then the value is multiplied by the number of CPUs
+ reported online by sysconf(3). The value of _m_a_x___j_o_b_s is saved in
+ _._M_A_K_E_._J_O_B_S. Turns compatibility mode off, unless the --BB option
+ is also specified. When compatibility mode is off, all commands
+ associated with a target are executed in a single shell
+ invocation as opposed to the traditional one shell invocation per
+ line. This can break traditional scripts which change
+ directories on each command invocation and then expect to start
+ with a fresh environment on the next line. It is more efficient
+ to correct the scripts rather than turn backwards compatibility
+ on.
+
+ A job token pool with _m_a_x___j_o_b_s tokens is used to control the
+ total number of jobs running. Each instance of bbmmaakkee will wait
+ for a token from the pool before running a new job.
+
+ --kk Continue processing after errors are encountered, but only on
+ those targets that do not depend on the target whose creation
+ caused the error.
+
+ --mm _d_i_r_e_c_t_o_r_y
+ Specify a directory in which to search for _s_y_s_._m_k and makefiles
+ included via the <_f_i_l_e>-style include statement. The --mm option
+ can be used multiple times to form a search path. This path
+ overrides the default system include path _/_u_s_r_/_s_h_a_r_e_/_m_k.
+ Furthermore, the system include path is appended to the search
+ path used for "_f_i_l_e"-style include statements (see the --II
+ option). The system include path can be referenced via the read-
+ only variable _._S_Y_S_P_A_T_H.
+
+ If a directory name in the --mm argument (or the MAKESYSPATH
+ environment variable) starts with the string `.../', bbmmaakkee
+ searches for the specified file or directory named in the
+ remaining part of the argument string. The search starts with
+ the current directory and then works upward towards the root of
+ the file system. If the search is successful, the resulting
+ directory replaces the `.../' specification in the --mm argument.
+ This feature allows bbmmaakkee to easily search in the current source
+ tree for customized _s_y_s_._m_k files (e.g., by using `.../mk/sys.mk'
+ as an argument).
+
+ --nn Display the commands that would have been executed, but do not
+ actually execute them unless the target depends on the _._M_A_K_E
+ special source (see below) or the command is prefixed with `++'.
+
+ --NN Display the commands that would have been executed, but do not
+ actually execute any of them; useful for debugging top-level
+ makefiles without descending into subdirectories.
+
+ --qq Do not execute any commands, instead exit 0 if the specified
+ targets are up to date, and 1 otherwise.
+
+ --rr Do not use the built-in rules specified in the system makefile.
+
+ --SS Stop processing if an error is encountered. This is the default
+ behavior and the opposite of --kk.
+
+ --ss Do not echo any commands as they are executed. Equivalent to
+ specifying `@@' before each command line in the makefile.
+
+ --TT _t_r_a_c_e_f_i_l_e
+ When used with the --jj flag, append a trace record to _t_r_a_c_e_f_i_l_e
+ for each job started and completed.
+
+ --tt Rather than re-building a target as specified in the makefile,
+ create it or update its modification time to make it appear up-
+ to-date.
+
+ --VV _v_a_r_i_a_b_l_e
+ Print the value of _v_a_r_i_a_b_l_e. Do not build any targets. Multiple
+ instances of this option may be specified; the variables are
+ printed one per line, with a blank line for each null or
+ undefined variable. The value printed is extracted from the
+ global scope after all makefiles have been read.
+
+ By default, the raw variable contents (which may include
+ additional unexpanded variable references) are shown. If
+ _v_a_r_i_a_b_l_e contains a `$', it is not interpreted as a variable name
+ but rather as an expression. Its value is expanded before
+ printing. The value is also expanded before printing if
+ _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S is set to true and the --ddVV option has not
+ been used to override it.
+
+ Note that loop-local and target-local variables, as well as
+ values taken temporarily by global variables during makefile
+ processing, are not accessible via this option. The --ddvv debug
+ mode can be used to see these at the cost of generating
+ substantial extraneous output.
+
+ --vv _v_a_r_i_a_b_l_e
+ Like --VV, but all printed variables are always expanded to their
+ complete value. The last occurrence of --VV or --vv decides whether
+ all variables are expanded or not.
+
+ --WW Treat any warnings during makefile parsing as errors.
+
+ --ww Print entering and leaving directory messages, pre and post
+ processing.
+
+ --XX Don't export variables passed on the command line to the
+ environment individually. Variables passed on the command line
+ are still exported via the MAKEFLAGS environment variable. This
+ option may be useful on systems which have a small limit on the
+ size of command arguments.
+
+ _v_a_r_i_a_b_l_e==_v_a_l_u_e
+ Set the value of the variable _v_a_r_i_a_b_l_e to _v_a_l_u_e. Normally, all
+ values passed on the command line are also exported to sub-makes
+ in the environment. The --XX flag disables this behavior.
+ Variable assignments should follow options for POSIX
+ compatibility but no ordering is enforced.
+
+ There are several different types of lines in a makefile: dependency
+ specifications, shell commands, variable assignments, include statements,
+ conditional directives, for loops, other directives, and comments.
+
+ Lines may be continued from one line to the next by ending them with a
+ backslash (`\'). The trailing newline character and initial whitespace
+ on the following line are compressed into a single space.
+
+FFIILLEE DDEEPPEENNDDEENNCCYY SSPPEECCIIFFIICCAATTIIOONNSS
+ Dependency lines consist of one or more targets, an operator, and zero or
+ more sources. This creates a relationship where the targets "depend" on
+ the sources and are customarily created from them. A target is
+ considered out of date if it does not exist, or if its modification time
+ is less than that of any of its sources. An out-of-date target is re-
+ created, but not until all sources have been examined and themselves re-
+ created as needed. Three operators may be used:
+
+ :: Many dependency lines may name this target but only one may have
+ attached shell commands. All sources named in all dependency lines
+ are considered together, and if needed the attached shell commands
+ are run to create or re-create the target. If bbmmaakkee is
+ interrupted, the target is removed.
+
+ !! The same, but the target is always re-created whether or not it is
+ out of date.
+
+ :::: Any dependency line may have attached shell commands, but each one
+ is handled independently: its sources are considered and the
+ attached shell commands are run if the target is out of date with
+ respect to (only) those sources. Thus, different groups of the
+ attached shell commands may be run depending on the circumstances.
+ Furthermore, unlike ::, for dependency lines with no sources, the
+ attached shell commands are always run. Also unlike ::, the target
+ is not removed if bbmmaakkee is interrupted.
+
+ All dependency lines mentioning a particular target must use the same
+ operator.
+
+ Targets and sources may contain the shell wildcard values `?', `*', `[]',
+ and `{}'. The values `?', `*', and `[]' may only be used as part of the
+ final component of the target or source, and only match existing files.
+ The value `{}' need not necessarily be used to describe existing files.
+ Expansion is in directory order, not alphabetically as done in the shell.
+
+SSHHEELLLL CCOOMMMMAANNDDSS
+ Each target may have associated with it one or more lines of shell
+ commands, normally used to create the target. Each of the lines in this
+ script _m_u_s_t be preceded by a tab. (For historical reasons, spaces are
+ not accepted.) While targets can occur in many dependency lines if
+ desired, by default only one of these rules may be followed by a creation
+ script. If the `::::' operator is used, however, all rules may include
+ scripts, and the respective scripts are executed in the order found.
+
+ Each line is treated as a separate shell command, unless the end of line
+ is escaped with a backslash `\', in which case that line and the next are
+ combined. If the first characters of the command are any combination of
+ `@@', `++', or `--', the command is treated specially.
+
+ @@ causes the command not to be echoed before it is executed.
+
+ ++ causes the command to be executed even when --nn is given.
+ This is similar to the effect of the _._M_A_K_E special source,
+ except that the effect can be limited to a single line of a
+ script.
+
+ -- in compatibility mode causes any non-zero exit status of
+ the command line to be ignored.
+
+ When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for
+ the target is fed to a single instance of the shell. In compatibility
+ (non-jobs) mode, each command is run in a separate process. If the
+ command contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n'), it
+ is passed to the shell; otherwise bbmmaakkee attempts direct execution. If a
+ line starts with `--' and the shell has ErrCtl enabled, failure of the
+ command line is ignored as in compatibility mode. Otherwise `--' affects
+ the entire job; the script stops at the first command line that fails,
+ but the target is not deemed to have failed.
+
+ Makefiles should be written so that the mode of bbmmaakkee operation does not
+ change their behavior. For example, any command which uses "cd" or
+ "chdir" without the intention of changing the directory for subsequent
+ commands should be put in parentheses so it executes in a subshell. To
+ force the use of a single shell, escape the line breaks so as to make the
+ whole script one command. For example:
+
+ avoid-chdir-side-effects:
+ @echo "Building $@ in $$(pwd)"
+ @(cd ${.CURDIR} && ${MAKE} $@)
+ @echo "Back in $$(pwd)"
+
+ ensure-one-shell-regardless-of-mode:
+ @echo "Building $@ in $$(pwd)"; \
+ (cd ${.CURDIR} && ${MAKE} $@); \
+ echo "Back in $$(pwd)"
+
+ Since bbmmaakkee changes the current working directory to `_._O_B_J_D_I_R' before
+ executing any targets, each child process starts with that as its current
+ working directory.
+VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
+ Variables in make behave much like macros in the C preprocessor.
+ Variable assignments have the form `_N_A_M_E _o_p _v_a_l_u_e', where:
+ _N_A_M_E is a single-word variable name, consisting, by tradition,
+ of all upper-case letters,
+ _o_p is one of the variable assignment operators described
+ below, and
+ _v_a_l_u_e is interpreted according to the variable assignment
+ operator.
+ Whitespace around _N_A_M_E, _o_p and _v_a_l_u_e is discarded.
+ VVaarriiaabbllee aassssiiggnnmmeenntt ooppeerraattoorrss
+ The five operators that assign values to variables are:
+ == Assign the value to the variable. Any previous value is
+ overwritten.
+ ++== Append the value to the current value of the variable, separating
+ them by a single space.
+ ??== Assign the value to the variable if it is not already defined.
+ ::== Expand the value, then assign it to the variable.
+ _N_O_T_E: References to undefined variables are _n_o_t expanded. This
+ can cause problems when variable modifiers are used.
+ !!== Expand the value and pass it to the shell for execution, then
+ assign the output from the child's standard output to the
+ variable. Any newlines in the result are replaced with spaces.
+ EExxppaannssiioonn ooff vvaarriiaabblleess
+ In most contexts where variables are expanded, `$$' expands to a single
+ dollar sign. In other contexts (most variable modifiers, string literals
+ in conditions), `\$' expands to a single dollar sign.
+ References to variables have the form $${{_n_a_m_e[::_m_o_d_i_f_i_e_r_s]}} or
+ $$((_n_a_m_e[::_m_o_d_i_f_i_e_r_s])). If the variable name consists of only a single
+ character and the expression contains no modifiers, the surrounding curly
+ braces or parentheses are not required. This shorter form is not
+ recommended.
+ If the variable name contains a dollar, the name itself is expanded
+ first. This allows almost arbitrary variable names, however names
+ containing dollar, braces, parentheses or whitespace are really best
+ avoided.
+ If the result of expanding a nested variable expression contains a dollar
+ sign (`$'), the result is subject to further expansion.
+ Variable substitution occurs at four distinct times, depending on where
+ the variable is being used.
+ 1. Variables in dependency lines are expanded as the line is read.
+ 2. Variables in conditionals are expanded individually, but only as far
+ as necessary to determine the result of the conditional.
+ 3. Variables in shell commands are expanded when the shell command is
+ executed.
+ 4. ..ffoorr loop index variables are expanded on each loop iteration. Note
+ that other variables are not expanded when composing the body of a
+ loop, so the following example code:
+ .for i in 1 2 3
+ a+= ${i}
+ j= ${i}
+ b+= ${j}
+ .endfor
+ all:
+ @echo ${a}
+ @echo ${b}
+ prints:
+ 1 2 3
+ 3 3 3
+ After the loop is executed:
+ _a contains `${:U1} ${:U2} ${:U3}', which expands to `1 2
+ 3'.
+ _j contains `${:U3}', which expands to `3'.
+ _b contains `${j} ${j} ${j}', which expands to `${:U3}
+ ${:U3} ${:U3}' and further to `3 3 3'.
+ VVaarriiaabbllee ccllaasssseess
+ The four different classes of variables (in order of increasing
+ precedence) are:
+ Environment variables
+ Variables defined as part of bbmmaakkee's environment.
+ Global variables
+ Variables defined in the makefile or in included makefiles.
+ Command line variables
+ Variables defined as part of the command line.
+ Local variables
+ Variables that are defined specific to a certain target.
+ Local variables can be set on a dependency line, unless
+ _._M_A_K_E_._T_A_R_G_E_T___L_O_C_A_L___V_A_R_I_A_B_L_E_S is set to `false'. The rest of the line
+ (which already has had global variables expanded) is the variable value.
+ For example:
+ COMPILER_WRAPPERS= ccache distcc icecc
+ ${OBJS}: .MAKE.META.CMP_FILTER=${COMPILER_WRAPPERS:S,^,N,}
+ Only the targets `${OBJS}' are impacted by that filter (in "meta" mode)
+ and simply enabling/disabling any of the compiler wrappers does not
+ render all of those targets out-of-date.
+ _N_O_T_E: target-local variable assignments behave differently in that;
+ ++== Only appends to a previous local assignment for the same
+ target and variable.
+ ::== Is redundant with respect to global variables, which have
+ already been expanded.
+ The seven built-in local variables are:
+ _._A_L_L_S_R_C The list of all sources for this target; also known
+ as `_>'.
+ _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'.
+
+ _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the
+ source from which the target is to be transformed
+ (the "implied" source); also known as `_<'. It is not
+ defined in explicit rules.
+
+ _._M_E_M_B_E_R The name of the archive member; also known as `_%'.
+
+ _._O_O_D_A_T_E The list of sources for this target that were deemed
+ out-of-date; also known as `_?'.
+
+ _._P_R_E_F_I_X The name of the target with suffix (if declared in
+ ..SSUUFFFFIIXXEESS) removed; also known as `_*'.
+
+ _._T_A_R_G_E_T The name of the target; also known as `_@'. For
+ compatibility with other makes this is an alias for
+ _._A_R_C_H_I_V_E in archive member rules.
+
+ The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted
+ for backward compatibility with historical makefiles and legacy POSIX
+ make and are not recommended.
+
+ Variants of these variables with the punctuation followed immediately by
+ `D' or `F', e.g. `$(@D)', are legacy forms equivalent to using the `:H'
+ and `:T' modifiers. These forms are accepted for compatibility with AT&T
+ System V UNIX makefiles and POSIX but are not recommended.
+
+ Four of the local variables may be used in sources on dependency lines
+ because they expand to the proper value for each target on the line.
+ These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', and `_._M_E_M_B_E_R'.
+
+ AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess
+ In addition, bbmmaakkee sets or knows about the following variables:
+
+ _._A_L_L_T_A_R_G_E_T_S
+ The list of all targets encountered in the makefiles. If
+ evaluated during makefile parsing, lists only those targets
+ encountered thus far.
+
+ _._C_U_R_D_I_R
+ A path to the directory where bbmmaakkee was executed. Refer to the
+ description of `_P_W_D' for more details.
+
+ _._E_R_R_O_R___C_M_D
+ Is used in error handling, see _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R.
+
+ _._E_R_R_O_R___C_W_D
+ Is used in error handling, see _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R.
+
+ _._E_R_R_O_R___E_X_I_T
+ Is used in error handling, see _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R.
+
+ _._E_R_R_O_R___M_E_T_A___F_I_L_E
+ Is used in error handling in "meta" mode, see
+ _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R.
+
+ _._E_R_R_O_R___T_A_R_G_E_T
+ Is used in error handling, see _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R.
+
+ _._I_N_C_L_U_D_E_D_F_R_O_M_D_I_R
+ The directory of the file this makefile was included from.
+
+ _._I_N_C_L_U_D_E_D_F_R_O_M_F_I_L_E
+ The filename of the file this makefile was included from.
+
+ _M_A_C_H_I_N_E
+ The machine hardware name, see uname(1).
+
+ _M_A_C_H_I_N_E___A_R_C_H
+ The machine processor architecture name, see uname(1).
+
+ _M_A_K_E The name that bbmmaakkee was executed with (_a_r_g_v_[_0_]).
+
+ _._M_A_K_E The same as _M_A_K_E, for compatibility. The preferred variable to
+ use is the environment variable MAKE because it is more
+ compatible with other make variants and cannot be confused with
+ the special target with the same name.
+
+ _._M_A_K_E_._D_E_P_E_N_D_F_I_L_E
+ Names the makefile (default `_._d_e_p_e_n_d') from which generated
+ dependencies are read.
+
+ _._M_A_K_E_._D_I_E___Q_U_I_E_T_L_Y
+ If set to `true', do not print error information at the end.
+
+ _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S
+ A boolean that controls the default behavior of the --VV option.
+ If true, variable values printed with --VV are fully expanded; if
+ false, the raw variable contents (which may include additional
+ unexpanded variable references) are shown.
+
+ _._M_A_K_E_._E_X_P_O_R_T_E_D
+ The list of variables exported by bbmmaakkee.
+
+ _M_A_K_E_F_I_L_E
+ The top-level makefile that is currently read, as given in the
+ command line.
+
+ _._M_A_K_E_F_L_A_G_S
+ The environment variable `MAKEFLAGS' may contain anything that
+ may be specified on bbmmaakkee's command line. Anything specified on
+ bbmmaakkee's command line is appended to the _._M_A_K_E_F_L_A_G_S variable,
+ which is then added to the environment for all programs that
+ bbmmaakkee executes.
+
+ _._M_A_K_E_._G_I_D
+ The numeric group ID of the user running bbmmaakkee. It is read-only.
+
+ _._M_A_K_E_._J_O_B_._P_R_E_F_I_X
+ If bbmmaakkee is run with --jj, the output for each target is prefixed
+ with a token
+ --- _t_a_r_g_e_t ---
+ the first part of which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X.
+ If _._M_A_K_E_._J_O_B_._P_R_E_F_I_X is empty, no token is printed. For example,
+ setting _._M_A_K_E_._J_O_B_._P_R_E_F_I_X to
+ `${.newline}---${.MAKE:T}[${.MAKE.PID}]' would produce tokens
+ like
+ ---make[1234] _t_a_r_g_e_t ---
+ making it easier to track the degree of parallelism being
+ achieved.
+
+ _._M_A_K_E_._J_O_B_S
+ The argument to the --jj option.
+
+ _._M_A_K_E_._J_O_B_S_._C
+ A read-only boolean that indicates whether the --jj option supports
+ use of `C'.
+
+ _._M_A_K_E_._L_E_V_E_L
+ The recursion depth of bbmmaakkee. The top-level instance of bbmmaakkee
+ has level 0, and each child make has its parent level plus 1.
+ This allows tests like: .if ${.MAKE.LEVEL} == 0 to protect things
+ which should only be evaluated in the top-level instance of
+ bbmmaakkee.
+
+ _._M_A_K_E_._L_E_V_E_L_._E_N_V
+ The name of the environment variable that stores the level of
+ nested calls to bbmmaakkee.
+
+ _._M_A_K_E_._M_A_K_E_F_I_L_E___P_R_E_F_E_R_E_N_C_E
+ The ordered list of makefile names (default `_m_a_k_e_f_i_l_e',
+ `_M_a_k_e_f_i_l_e') that bbmmaakkee looks for.
+
+ _._M_A_K_E_._M_A_K_E_F_I_L_E_S
+ The list of makefiles read by bbmmaakkee, which is useful for tracking
+ dependencies. Each makefile is recorded only once, regardless of
+ the number of times read.
+
+ _._M_A_K_E_._M_E_T_A_._B_A_I_L_I_W_I_C_K
+ In "meta" mode, provides a list of prefixes which match the
+ directories controlled by bbmmaakkee. If a file that was generated
+ outside of _._O_B_J_D_I_R but within said bailiwick is missing, the
+ current target is considered out-of-date.
+
+ _._M_A_K_E_._M_E_T_A_._C_M_P___F_I_L_T_E_R
+ In "meta" mode, it can (very rarely!) be useful to filter command
+ lines before comparison. This variable can be set to a set of
+ modifiers that are applied to each line of the old and new
+ command that differ, if the filtered commands still differ, the
+ target is considered out-of-date.
+
+ _._M_A_K_E_._M_E_T_A_._C_R_E_A_T_E_D
+ In "meta" mode, this variable contains a list of all the meta
+ files updated. If not empty, it can be used to trigger
+ processing of _._M_A_K_E_._M_E_T_A_._F_I_L_E_S.
+
+ _._M_A_K_E_._M_E_T_A_._F_I_L_E_S
+ In "meta" mode, this variable contains a list of all the meta
+ files used (updated or not). This list can be used to process
+ the meta files to extract dependency information.
+
+ _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___F_I_L_T_E_R
+ Provides a list of variable modifiers to apply to each pathname.
+ Ignore if the expansion is an empty string.
+
+ _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_H_S
+ Provides a list of path prefixes that should be ignored; because
+ the contents are expected to change over time. The default list
+ includes: `_/_d_e_v _/_e_t_c _/_p_r_o_c _/_t_m_p _/_v_a_r_/_r_u_n _/_v_a_r_/_t_m_p'
+
+ _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_T_E_R_N_S
+ Provides a list of patterns to match against pathnames. Ignore
+ any that match.
+
+ _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X
+ Defines the message printed for each meta file updated in "meta
+ verbose" mode. The default value is:
+ Building ${.TARGET:H:tA}/${.TARGET:T}
+
+ _._M_A_K_E_._M_O_D_E
+ Processed after reading all makefiles. Affects the mode that
+ bbmmaakkee runs in. It can contain these keywords:
+
+ ccoommppaatt Like --BB, puts bbmmaakkee into "compat" mode.
+
+ mmeettaa Puts bbmmaakkee into "meta" mode, where meta files are created
+ for each target to capture the command run, the output
+ generated, and if filemon(4) is available, the system
+ calls which are of interest to bbmmaakkee. The captured
+ output can be useful when diagnosing errors.
+
+ ccuurrddiirrOOkk==_b_f
+ By default, bbmmaakkee does not create _._m_e_t_a files in
+ `_._C_U_R_D_I_R'. This can be overridden by setting _b_f to a
+ value which represents true.
+
+ mmiissssiinngg--mmeettaa==_b_f
+ If _b_f is true, a missing _._m_e_t_a file makes the target out-
+ of-date.
+
+ mmiissssiinngg--ffiilleemmoonn==_b_f
+ If _b_f is true, missing filemon data makes the target out-
+ of-date.
+
+ nnooffiilleemmoonn
+ Do not use filemon(4).
+
+ eennvv For debugging, it can be useful to include the
+ environment in the _._m_e_t_a file.
+
+ vveerrbboossee
+ If in "meta" mode, print a clue about the target being
+ built. This is useful if the build is otherwise running
+ silently. The message printed is the expanded value of
+ _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X.
+
+ iiggnnoorree--ccmmdd
+ Some makefiles have commands which are simply not stable.
+ This keyword causes them to be ignored for determining
+ whether a target is out of date in "meta" mode. See also
+ ..NNOOMMEETTAA__CCMMPP.
+
+ ssiilleenntt==_b_f
+ If _b_f is true, when a .meta file is created, mark the
+ target ..SSIILLEENNTT.
+
+ rraannddoommiizzee--ttaarrggeettss
+ In both compat and parallel mode, do not make the targets
+ in the usual order, but instead randomize their order.
+ This mode can be used to detect undeclared dependencies
+ between files.
+
+ _M_A_K_E_O_B_J_D_I_R
+ Used to create files in a separate directory, see _._O_B_J_D_I_R.
+
+ _M_A_K_E___O_B_J_D_I_R___C_H_E_C_K___W_R_I_T_A_B_L_E
+ Used to force a separate directory for the created files, even if
+ that directory is not writable, see _._O_B_J_D_I_R.
+
+ _M_A_K_E_O_B_J_D_I_R_P_R_E_F_I_X
+ Used to create files in a separate directory, see _._O_B_J_D_I_R.
+
+ _._M_A_K_E_._O_S
+ The name of the operating system, see uname(1). It is read-only.
+
+ _._M_A_K_E_O_V_E_R_R_I_D_E_S
+ This variable is used to record the names of variables assigned
+ to on the command line, so that they may be exported as part of
+ `MAKEFLAGS'. This behavior can be disabled by assigning an empty
+ value to `_._M_A_K_E_O_V_E_R_R_I_D_E_S' within a makefile. Extra variables can
+ be exported from a makefile by appending their names to
+ `_._M_A_K_E_O_V_E_R_R_I_D_E_S'. `MAKEFLAGS' is re-exported whenever
+ `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is modified.
+
+ _._M_A_K_E_._P_A_T_H___F_I_L_E_M_O_N
+ If bbmmaakkee was built with filemon(4) support, this is set to the
+ path of the device node. This allows makefiles to test for this
+ support.
+
+ _._M_A_K_E_._P_I_D
+ The process ID of bbmmaakkee. It is read-only.
+
+ _._M_A_K_E_._P_P_I_D
+ The parent process ID of bbmmaakkee. It is read-only.
+
+ _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R
+ When bbmmaakkee stops due to an error, it sets `_._E_R_R_O_R___T_A_R_G_E_T' to the
+ name of the target that failed, `_._E_R_R_O_R___E_X_I_T' to the exit status
+ of the failed target, `_._E_R_R_O_R___C_M_D' to the commands of the failed
+ target, and in "meta" mode, it also sets `_._E_R_R_O_R___C_W_D' to the
+ getcwd(3), and `_._E_R_R_O_R___M_E_T_A___F_I_L_E' to the path of the meta file
+ (if any) describing the failed target. It then prints its name
+ and the value of `_._C_U_R_D_I_R' as well as the value of any variables
+ named in `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R'.
+
+ _._M_A_K_E_._S_A_V_E___D_O_L_L_A_R_S
+ If true, `$$' are preserved when doing `:=' assignments. The
+ default is false, for backwards compatibility. Set to true for
+ compatability with other makes. If set to false, `$$' becomes
+ `$' per normal evaluation rules.
+
+ _._M_A_K_E_._T_A_R_G_E_T___L_O_C_A_L___V_A_R_I_A_B_L_E_S
+ If set to `false', apparent variable assignments in dependency
+ lines are treated as normal sources.
+
+ _._M_A_K_E_._U_I_D
+ The numeric ID of the user running bbmmaakkee. It is read-only.
+
+ _._n_e_w_l_i_n_e
+ This variable is simply assigned a newline character as its
+ value. It is read-only. This allows expansions using the ::@@
+ modifier to put a newline between iterations of the loop rather
+ than a space. For example, in case of an error, bbmmaakkee prints the
+ variable names and their values using:
+ ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}
+
+ _._O_B_J_D_I_R
+ A path to the directory where the targets are built. Its value
+ is determined by trying to chdir(2) to the following directories
+ in order and using the first match:
+
+ 1. $${{MMAAKKEEOOBBJJDDIIRRPPRREEFFIIXX}}$${{..CCUURRDDIIRR}}
+
+ (Only if `MAKEOBJDIRPREFIX' is set in the environment or on
+ the command line.)
+
+ 2. $${{MMAAKKEEOOBBJJDDIIRR}}
+
+ (Only if `MAKEOBJDIR' is set in the environment or on the
+ command line.)
+
+ 3. $${{..CCUURRDDIIRR}}_/_o_b_j_.$${{MMAACCHHIINNEE}}
+
+ 4. $${{..CCUURRDDIIRR}}_/_o_b_j
+
+ 5. _/_u_s_r_/_o_b_j_/$${{..CCUURRDDIIRR}}
+
+ 6. $${{..CCUURRDDIIRR}}
+
+ Variable expansion is performed on the value before it is used,
+ so expressions such as $${{..CCUURRDDIIRR::SS,,^^//uussrr//ssrrcc,,//vvaarr//oobbjj,,}} may be
+ used. This is especially useful with `MAKEOBJDIR'.
+
+ `_._O_B_J_D_I_R' may be modified in the makefile via the special target
+ `..OOBBJJDDIIRR'. In all cases, bbmmaakkee changes to the specified
+ directory if it exists, and sets `_._O_B_J_D_I_R' and `_P_W_D' to that
+ directory before executing any targets.
+
+ Except in the case of an explicit `..OOBBJJDDIIRR' target, bbmmaakkee checks
+ that the specified directory is writable and ignores it if not.
+ This check can be skipped by setting the environment variable
+ `MAKE_OBJDIR_CHECK_WRITABLE' to "no".
+
+ _._P_A_R_S_E_D_I_R
+ The directory name of the current makefile being parsed.
+
+ _._P_A_R_S_E_F_I_L_E
+ The basename of the current makefile being parsed. This variable
+ and `_._P_A_R_S_E_D_I_R' are both set only while the makefiles are being
+ parsed. To retain their current values, assign them to a
+ variable using assignment with expansion `::=='.
+
+ _._P_A_T_H The space-separated list of directories that bbmmaakkee searches for
+ files. To update this search list, use the special target
+ `..PPAATTHH' rather than modifying the variable directly.
+
+ _%_P_O_S_I_X Is set in POSIX mode, see the special `_._P_O_S_I_X' target.
+
+ _P_W_D Alternate path to the current directory. bbmmaakkee normally sets
+ `_._C_U_R_D_I_R' to the canonical path given by getcwd(3). However, if
+ the environment variable `PWD' is set and gives a path to the
+ current directory, bbmmaakkee sets `_._C_U_R_D_I_R' to the value of `PWD'
+ instead. This behavior is disabled if `MAKEOBJDIRPREFIX' is set
+ or `MAKEOBJDIR' contains a variable transform. `_P_W_D' is set to
+ the value of `_._O_B_J_D_I_R' for all programs which bbmmaakkee executes.
+
+ _._S_H_E_L_L The pathname of the shell used to run target scripts. It is
+ read-only.
+
+ _._S_U_F_F_I_X_E_S
+ The list of known suffixes. It is read-only.
+
+ _._S_Y_S_P_A_T_H
+ The space-separated list of directories that bbmmaakkee searches for
+ makefiles, referred to as the system include path. To update
+ this search list, use the special target `..SSYYSSPPAATTHH' rather than
+ modifying the variable which is read-only.
+
+ _._T_A_R_G_E_T_S
+ The list of targets explicitly specified on the command line, if
+ any.
+
+ _V_P_A_T_H The colon-separated (":") list of directories that bbmmaakkee searches
+ for files. This variable is supported for compatibility with old
+ make programs only, use `_._P_A_T_H' instead.
+
+ VVaarriiaabbllee mmooddiiffiieerrss
+ The general format of a variable expansion is:
+
+ $${{_v_a_r_i_a_b_l_e[::_m_o_d_i_f_i_e_r[::...]]}}
+
+ Each modifier begins with a colon. To escape a colon, precede it with a
+ backslash `\'.
+
+ A list of indirect modifiers can be specified via a variable, as follows:
+
+ _m_o_d_i_f_i_e_r___v_a_r_i_a_b_l_e = _m_o_d_i_f_i_e_r[::...]
+
+ $${{_v_a_r_i_a_b_l_e::$${{_m_o_d_i_f_i_e_r___v_a_r_i_a_b_l_e}}[::...]}}
+
+ In this case, the first modifier in the _m_o_d_i_f_i_e_r___v_a_r_i_a_b_l_e does not start
+ with a colon, since that colon already occurs in the referencing
+ variable. If any of the modifiers in the _m_o_d_i_f_i_e_r___v_a_r_i_a_b_l_e contains a
+ dollar sign (`$'), these must be doubled to avoid early expansion.
+
+ Some modifiers interpret the expression value as a single string, others
+ treat the expression value as a whitespace-separated list of words. When
+ splitting a string into words, whitespace can be escaped using double
+ quotes, single quotes and backslashes, like in the shell. The quotes and
+ backslashes are retained in the words.
+
+ The supported modifiers are:
+
+ ::EE Replaces each word with its suffix.
+
+ ::HH Replaces each word with its dirname.
+
+ ::MM_p_a_t_t_e_r_n
+ Selects only those words that match _p_a_t_t_e_r_n. The standard shell
+ wildcard characters (`*', `?', and `[]') may be used. The wildcard
+ characters may be escaped with a backslash (`\'). As a consequence
+ of the way values are split into words, matched, and then joined,
+ the construct `${VAR:M*}' removes all leading and trailing
+ whitespace and normalizes the inter-word spacing to a single space.
+
+ ::NN_p_a_t_t_e_r_n
+ This is the opposite of `::MM', selecting all words which do _n_o_t match
+ _p_a_t_t_e_r_n.
+
+ ::OO Orders the words lexicographically.
+
+ ::OOnn Orders the words numerically. A number followed by one of `k', `M'
+ or `G' is multiplied by the appropriate factor, which is 1024 for
+ `k', 1048576 for `M', or 1073741824 for `G'. Both upper- and lower-
+ case letters are accepted.
+
+ ::OOrr Orders the words in reverse lexicographical order.
+
+ ::OOrrnn
+ Orders the words in reverse numerical order.
+
+ ::OOxx Shuffles the words. The results are different each time you are
+ referring to the modified variable; use the assignment with
+ expansion `::==' to prevent such behavior. For example,
+
+ LIST= uno due tre quattro
+ RANDOM_LIST= ${LIST:Ox}
+ STATIC_RANDOM_LIST:= ${LIST:Ox}
+
+ all:
+ @echo "${RANDOM_LIST}"
+ @echo "${RANDOM_LIST}"
+ @echo "${STATIC_RANDOM_LIST}"
+ @echo "${STATIC_RANDOM_LIST}"
+ may produce output similar to:
+
+ quattro due tre uno
+ tre due quattro uno
+ due uno quattro tre
+ due uno quattro tre
+
+ ::QQ Quotes every shell meta-character in the value, so that it can be
+ passed safely to the shell.
+
+ ::qq Quotes every shell meta-character in the value, and also doubles `$'
+ characters so that it can be passed safely through recursive
+ invocations of bbmmaakkee. This is equivalent to `::SS//\\$$//&&&&//gg::QQ'.
+
+ ::RR Replaces each word with everything but its suffix.
+
+ ::rraannggee[==_c_o_u_n_t]
+ The value is an integer sequence representing the words of the
+ original value, or the supplied _c_o_u_n_t.
+
+ ::ggmmttiimmee[==_t_i_m_e_s_t_a_m_p]
+ The value is interpreted as a format string for strftime(3), using
+ gmtime(3), producing the formatted timestamp. Note: the `%s' format
+ should only be used with `::llooccaallttiimmee'. If a _t_i_m_e_s_t_a_m_p value is not
+ provided or is 0, the current time is used.
+
+ ::hhaasshh
+ Computes a 32-bit hash of the value and encodes it as 8 hex digits.
+
+ ::llooccaallttiimmee[==_t_i_m_e_s_t_a_m_p]
+ The value is interpreted as a format string for strftime(3), using
+ localtime(3), producing the formatted timestamp. If a _t_i_m_e_s_t_a_m_p
+ value is not provided or is 0, the current time is used.
+
+ ::mmttiimmee[==_t_i_m_e_s_t_a_m_p]
+ Call stat(2) with each word as pathname; use `st_mtime' as the new
+ value. If stat(2) fails; use _t_i_m_e_s_t_a_m_p or current time. If
+ _t_i_m_e_s_t_a_m_p is set to `error', then stat(2) failure will cause an
+ error.
+
+ ::ttAA Attempts to convert the value to an absolute path using realpath(3).
+ If that fails, the value is unchanged.
+
+ ::ttll Converts the value to lower-case letters.
+
+ ::ttss_c
+ When joining the words after a modifier that treats the value as
+ words, the words are normally separated by a space. This modifier
+ changes the separator to the character _c. If _c is omitted, no
+ separator is used. The common escapes (including octal numeric
+ codes) work as expected.
+
+ ::ttuu Converts the value to upper-case letters.
+
+ ::ttWW Causes subsequent modifiers to treat the value as a single word
+ (possibly containing embedded whitespace). See also `::[[**]]'.
+
+ ::ttww Causes the value to be treated as a list of words. See also `::[[@@]]'.
+
+ ::SS/_o_l_d___s_t_r_i_n_g/_n_e_w___s_t_r_i_n_g/[11ggWW]
+ Modifies the first occurrence of _o_l_d___s_t_r_i_n_g in each word of the
+ value, replacing it with _n_e_w___s_t_r_i_n_g. If a `g' is appended to the
+ last delimiter of the pattern, all occurrences in each word are
+ replaced. If a `1' is appended to the last delimiter of the
+ pattern, only the first occurrence is affected. If a `W' is
+ appended to the last delimiter of the pattern, the value is treated
+ as a single word. If _o_l_d___s_t_r_i_n_g begins with a caret (`^'),
+ _o_l_d___s_t_r_i_n_g is anchored at the beginning of each word. If _o_l_d___s_t_r_i_n_g
+ ends with a dollar sign (`$'), it is anchored at the end of each
+ word. Inside _n_e_w___s_t_r_i_n_g, an ampersand (`&') is replaced by
+ _o_l_d___s_t_r_i_n_g (without the anchoring `^' or `$'). Any character may be
+ used as the delimiter for the parts of the modifier string. The
+ anchoring, ampersand and delimiter characters can be escaped with a
+ backslash (`\').
+
+ Both _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g may contain nested expressions. To
+ prevent a dollar sign from starting a nested expression, escape it
+ with a backslash.
+
+ ::CC/_p_a_t_t_e_r_n/_r_e_p_l_a_c_e_m_e_n_t/[11ggWW]
+ The ::CC modifier works like the ::SS modifier except that the old and
+ new strings, instead of being simple strings, are an extended
+ regular expression _p_a_t_t_e_r_n (see regex(3)) and an ed(1)-style
+ _r_e_p_l_a_c_e_m_e_n_t. Normally, the first occurrence of the pattern _p_a_t_t_e_r_n
+ in each word of the value is substituted with _r_e_p_l_a_c_e_m_e_n_t. The `1'
+ modifier causes the substitution to apply to at most one word; the
+ `g' modifier causes the substitution to apply to as many instances
+ of the search pattern _p_a_t_t_e_r_n as occur in the word or words it is
+ found in; the `W' modifier causes the value to be treated as a
+ single word (possibly containing embedded whitespace).
+
+ As for the ::SS modifier, the _p_a_t_t_e_r_n and _r_e_p_l_a_c_e_m_e_n_t are subjected to
+ variable expansion before being parsed as regular expressions.
+
+ ::TT Replaces each word with its last path component (basename).
+
+ ::uu Removes adjacent duplicate words (like uniq(1)).
+
+ ::??_t_r_u_e___s_t_r_i_n_g::_f_a_l_s_e___s_t_r_i_n_g
+ If the variable name (not its value), when parsed as a ..iiff
+ conditional expression, evaluates to true, return as its value the
+ _t_r_u_e___s_t_r_i_n_g, otherwise return the _f_a_l_s_e___s_t_r_i_n_g. Since the variable
+ name is used as the expression, :? must be the first modifier after
+ the variable name itself--which, of course, usually contains
+ variable expansions. A common error is trying to use expressions
+ like
+ ${NUMBERS:M42:?match:no}
+ which actually tests defined(NUMBERS). To determine if any words
+ match "42", you need to use something like:
+ ${"${NUMBERS:M42}" != "":?match:no}.
+
+ ::_o_l_d___s_t_r_i_n_g==_n_e_w___s_t_r_i_n_g
+ This is the AT&T System V UNIX style substitution. It can only be
+ the last modifier specified, as a `:' in either _o_l_d___s_t_r_i_n_g or
+ _n_e_w___s_t_r_i_n_g is treated as a regular character, not as the end of the
+ modifier.
+
+ If _o_l_d___s_t_r_i_n_g does not contain the pattern matching character `%',
+ and the word ends with _o_l_d___s_t_r_i_n_g or equals it, that suffix is
+ replaced with _n_e_w___s_t_r_i_n_g.
+
+ Otherwise, the first `%' in _o_l_d___s_t_r_i_n_g matches a possibly empty
+ substring of arbitrary characters, and if the whole pattern is found
+ in the word, the matching part is replaced with _n_e_w___s_t_r_i_n_g, and the
+ first occurrence of `%' in _n_e_w___s_t_r_i_n_g (if any) is replaced with the
+ substring matched by the `%'.
+
+ Both _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g may contain nested expressions. To
+ prevent a dollar sign from starting a nested expression, escape it
+ with a backslash.
+
+ ::@@_v_a_r_n_a_m_e@@_s_t_r_i_n_g@@
+ This is the loop expansion mechanism from the OSF Development
+ Environment (ODE) make. Unlike ..ffoorr loops, expansion occurs at the
+ time of reference. For each word in the value, assign the word to
+ the variable named _v_a_r_n_a_m_e and evaluate _s_t_r_i_n_g. The ODE convention
+ is that _v_a_r_n_a_m_e should start and end with a period, for example:
+ ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@}
+
+ However, a single-letter variable is often more readable:
+ ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}
+
+ ::__[==_v_a_r]
+ Saves the current variable value in `$_' or the named _v_a_r for later
+ reference. Example usage:
+
+ M_cmpv.units = 1 1000 1000000
+ M_cmpv = S,., ,g:_:range:@i@+ $${_:[-$$i]} \
+ \* $${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh
+
+ .if ${VERSION:${M_cmpv}} < ${3.1.12:L:${M_cmpv}}
+
+ Here `$_' is used to save the result of the `:S' modifier which is
+ later referenced using the index values from `:range'.
+
+ ::UU_n_e_w_v_a_l
+ If the variable is undefined, the optional _n_e_w_v_a_l (which may be
+ empty) is the value. If the variable is defined, the existing value
+ is returned. This is another ODE make feature. It is handy for
+ setting per-target CFLAGS for instance:
+ ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}}
+ If a value is only required if the variable is undefined, use:
+ ${VAR:D:Unewval}
+
+ ::DD_n_e_w_v_a_l
+ If the variable is defined, _n_e_w_v_a_l (which may be empty) is the
+ value.
+
+ ::LL The name of the variable is the value.
+
+ ::PP The path of the node which has the same name as the variable is the
+ value. If no such node exists or its path is null, the name of the
+ variable is used. In order for this modifier to work, the name
+ (node) must at least have appeared on the right-hand side of a
+ dependency.
+
+ ::!!_c_m_d!!
+ The output of running _c_m_d is the value.
+
+ ::sshh The value is run as a command, and the output becomes the new value.
+
+ ::::==_s_t_r
+ The variable is assigned the value _s_t_r after substitution. This
+ modifier and its variations are useful in obscure situations such as
+ wanting to set a variable at a point where a target's shell commands
+ are being parsed. These assignment modifiers always expand to
+ nothing.
+
+ The `::::' helps avoid false matches with the AT&T System V UNIX style
+ `:=' modifier and since substitution always occurs, the `::=' form
+ is vaguely appropriate.
+
+ ::::??==_s_t_r
+ As for ::::== but only if the variable does not already have a value.
+
+ ::::++==_s_t_r
+ Append _s_t_r to the variable.
+
+ ::::!!==_c_m_d
+ Assign the output of _c_m_d to the variable.
+
+ ::[[_r_a_n_g_e]]
+ Selects one or more words from the value, or performs other
+ operations related to the way in which the value is split into
+ words.
+
+ An empty value, or a value that consists entirely of white-space, is
+ treated as a single word. For the purposes of the `::[[]]' modifier,
+ the words are indexed both forwards using positive integers (where
+ index 1 represents the first word), and backwards using negative
+ integers (where index -1 represents the last word).
+
+ The _r_a_n_g_e is subjected to variable expansion, and the expanded
+ result is then interpreted as follows:
+
+ _i_n_d_e_x Selects a single word from the value.
+
+ _s_t_a_r_t...._e_n_d
+ Selects all words from _s_t_a_r_t to _e_n_d, inclusive. For example,
+ `::[[22....--11]]' selects all words from the second word to the last
+ word. If _s_t_a_r_t is greater than _e_n_d, the words are output in
+ reverse order. For example, `::[[--11....11]]' selects all the words
+ from last to first. If the list is already ordered, this
+ effectively reverses the list, but it is more efficient to
+ use `::OOrr' instead of `::OO::[[--11....11]]'.
+
+ ** Causes subsequent modifiers to treat the value as a single
+ word (possibly containing embedded whitespace). Analogous to
+ the effect of $* in Bourne shell.
+
+ 0 Means the same as `::[[**]]'.
+
+ @@ Causes subsequent modifiers to treat the value as a sequence
+ of words delimited by whitespace. Analogous to the effect of
+ $@ in Bourne shell.
+
+ ## Returns the number of words in the value.
+
+DDIIRREECCTTIIVVEESS
+ bbmmaakkee offers directives for including makefiles, conditionals and for
+ loops. All these directives are identified by a line beginning with a
+ single dot (`.') character, followed by the keyword of the directive,
+ such as iinncclluuddee or iiff.
+
+ FFiillee iinncclluussiioonn
+ Files are included with either ..iinncclluuddee <<_f_i_l_e>> or ..iinncclluuddee ""_f_i_l_e"".
+ Variables between the angle brackets or double quotes are expanded to
+ form the file name. If angle brackets are used, the included makefile is
+ expected to be in the system makefile directory. If double quotes are
+ used, the including makefile's directory and any directories specified
+ using the --II option are searched before the system makefile directory.
+
+ For compatibility with other make variants, `iinncclluuddee _f_i_l_e ...' (without
+ leading dot) is also accepted.
+
+ If the include statement is written as ..--iinncclluuddee or as ..ssiinncclluuddee, errors
+ locating and/or opening include files are ignored.
+
+ If the include statement is written as ..ddiinncclluuddee, not only are errors
+ locating and/or opening include files ignored, but stale dependencies
+ within the included file are ignored just like in _._M_A_K_E_._D_E_P_E_N_D_F_I_L_E.
+
+ EExxppoorrttiinngg vvaarriiaabblleess
+ The directives for exporting and unexporting variables are:
+
+ ..eexxppoorrtt _v_a_r_i_a_b_l_e ...
+ Export the specified global variable. If no variable list is
+ provided, all globals are exported except for internal variables
+ (those that start with `.'). This is not affected by the --XX
+ flag, so should be used with caution. For compatibility with
+ other make programs, eexxppoorrtt _v_a_r_i_a_b_l_e==_v_a_l_u_e (without leading dot)
+ is also accepted.
+
+ Appending a variable name to _._M_A_K_E_._E_X_P_O_R_T_E_D is equivalent to
+ exporting a variable.
+
+ ..eexxppoorrtt--eennvv _v_a_r_i_a_b_l_e ...
+ The same as `.export', except that the variable is not appended
+ to _._M_A_K_E_._E_X_P_O_R_T_E_D. This allows exporting a value to the
+ environment which is different from that used by bbmmaakkee
+ internally.
+
+ ..eexxppoorrtt--lliitteerraall _v_a_r_i_a_b_l_e ...
+ The same as `.export-env', except that variables in the value are
+ not expanded.
+
+ ..uunneexxppoorrtt _v_a_r_i_a_b_l_e ...
+ The opposite of `.export'. The specified global _v_a_r_i_a_b_l_e is
+ removed from _._M_A_K_E_._E_X_P_O_R_T_E_D. If no variable list is provided,
+ all globals are unexported, and _._M_A_K_E_._E_X_P_O_R_T_E_D deleted.
+
+ ..uunneexxppoorrtt--eennvv
+ Unexport all globals previously exported and clear the
+ environment inherited from the parent. This operation causes a
+ memory leak of the original environment, so should be used
+ sparingly. Testing for _._M_A_K_E_._L_E_V_E_L being 0 would make sense.
+ Also note that any variables which originated in the parent
+ environment should be explicitly preserved if desired. For
+ example:
+
+ .if ${.MAKE.LEVEL} == 0
+ PATH := ${PATH}
+ .unexport-env
+ .export PATH
+ .endif
+
+ Would result in an environment containing only `PATH', which is
+ the minimal useful environment. Actually `_._M_A_K_E_._L_E_V_E_L' is also
+ pushed into the new environment.
+
+ MMeessssaaggeess
+ The directives for printing messages to the output are:
+
+ ..iinnffoo _m_e_s_s_a_g_e
+ The message is printed along with the name of the makefile and
+ line number.
+
+ ..wwaarrnniinngg _m_e_s_s_a_g_e
+ The message prefixed by `warning:' is printed along with the name
+ of the makefile and line number.
+
+ ..eerrrroorr _m_e_s_s_a_g_e
+ The message is printed along with the name of the makefile and
+ line number, bbmmaakkee exits immediately.
+
+ CCoonnddiittiioonnaallss
+ The directives for conditionals are:
+
+ ..iiff [!!]_e_x_p_r_e_s_s_i_o_n [_o_p_e_r_a_t_o_r _e_x_p_r_e_s_s_i_o_n ...]
+ Test the value of an expression.
+
+ ..iiffddeeff [!!]_v_a_r_i_a_b_l_e [_o_p_e_r_a_t_o_r _v_a_r_i_a_b_l_e ...]
+ Test whether a variable is defined.
+
+ ..iiffnnddeeff [!!]_v_a_r_i_a_b_l_e [_o_p_e_r_a_t_o_r _v_a_r_i_a_b_l_e ...]
+ Test whether a variable is not defined.
+
+ ..iiffmmaakkee [!!]_t_a_r_g_e_t [_o_p_e_r_a_t_o_r _t_a_r_g_e_t ...]
+ Test the target being requested.
+
+ ..iiffnnmmaakkee [!!]_t_a_r_g_e_t [_o_p_e_r_a_t_o_r _t_a_r_g_e_t ...]
+ Test the target being requested.
+
+ ..eellssee Reverse the sense of the last conditional.
+
+ ..eelliiff [!!]_e_x_p_r_e_s_s_i_o_n [_o_p_e_r_a_t_o_r _e_x_p_r_e_s_s_i_o_n ...]
+ A combination of `..eellssee' followed by `..iiff'.
+
+ ..eelliiffddeeff [!!]_v_a_r_i_a_b_l_e [_o_p_e_r_a_t_o_r _v_a_r_i_a_b_l_e ...]
+ A combination of `..eellssee' followed by `..iiffddeeff'.
+
+ ..eelliiffnnddeeff [!!]_v_a_r_i_a_b_l_e [_o_p_e_r_a_t_o_r _v_a_r_i_a_b_l_e ...]
+ A combination of `..eellssee' followed by `..iiffnnddeeff'.
+
+ ..eelliiffmmaakkee [!!]_t_a_r_g_e_t [_o_p_e_r_a_t_o_r _t_a_r_g_e_t ...]
+ A combination of `..eellssee' followed by `..iiffmmaakkee'.
+
+ ..eelliiffnnmmaakkee [!!]_t_a_r_g_e_t [_o_p_e_r_a_t_o_r _t_a_r_g_e_t ...]
+ A combination of `..eellssee' followed by `..iiffnnmmaakkee'.
+
+ ..eennddiiff End the body of the conditional.
+
+ The _o_p_e_r_a_t_o_r may be any one of the following:
+
+ |||| Logical OR.
+
+ &&&& Logical AND; of higher precedence than `||||'.
+
+ bbmmaakkee only evaluates a conditional as far as is necessary to determine
+ its value. Parentheses can be used to override the operator precedence.
+ The boolean operator `!!' may be used to logically negate an expression,
+ typically a function call. It is of higher precedence than `&&&&'.
+
+ The value of _e_x_p_r_e_s_s_i_o_n may be any of the following function call
+ expressions:
+
+ ddeeffiinneedd(_v_a_r_n_a_m_e)
+ Evaluates to true if the variable _v_a_r_n_a_m_e has been defined.
+
+ mmaakkee(_t_a_r_g_e_t)
+ Evaluates to true if the target was specified as part of bbmmaakkee's
+ command line or was declared the default target (either
+ implicitly or explicitly, see _._M_A_I_N) before the line containing
+ the conditional.
+
+ eemmppttyy(_v_a_r_n_a_m_e[:_m_o_d_i_f_i_e_r_s])
+ Evaluates to true if the expansion of the variable, after
+ applying the modifiers, results in an empty string.
+
+ eexxiissttss(_p_a_t_h_n_a_m_e)
+ Evaluates to true if the given pathname exists. If relative, the
+ pathname is searched for on the system search path (see _._P_A_T_H).
+
+ ttaarrggeett(_t_a_r_g_e_t)
+ Evaluates to true if the target has been defined.
+
+ ccoommmmaannddss(_t_a_r_g_e_t)
+ Evaluates to true if the target has been defined and has commands
+ associated with it.
+
+ _E_x_p_r_e_s_s_i_o_n may also be an arithmetic or string comparison. Variable
+ expansion is performed on both sides of the comparison. If both sides
+ are numeric and neither is enclosed in quotes, the comparison is done
+ numerically, otherwise lexicographically. A string is interpreted as a
+ hexadecimal integer if it is preceded by 0x, otherwise it is interpreted
+ as a decimal floating-point number; octal numbers are not supported.
+
+ All comparisons may use the operators `====' and `!!=='. Numeric comparisons
+ may also use the operators `<<', `<<==', `>>' and `>>=='.
+
+ If the comparison has neither a comparison operator nor a right side, the
+ expression evaluates to true if it is nonempty and its numeric value (if
+ any) is not zero.
+
+ When bbmmaakkee is evaluating one of these conditional expressions, and it
+ encounters a (whitespace-separated) word it doesn't recognize, either the
+ "make" or "defined" function is applied to it, depending on the form of
+ the conditional. If the form is `..iiffddeeff', `..iiffnnddeeff' or `..iiff', the
+ "defined" function is applied. Similarly, if the form is `..iiffmmaakkee' or
+ `..iiffnnmmaakkee', the "make" function is applied.
+
+ If the conditional evaluates to true, parsing of the makefile continues
+ as before. If it evaluates to false, the following lines until the
+ corresponding `..eelliiff' variant, `..eellssee' or `..eennddiiff' are skipped.
+
+ FFoorr llooooppss
+ For loops are typically used to apply a set of rules to a list of files.
+ The syntax of a for loop is:
+
+ ..ffoorr _v_a_r_i_a_b_l_e [_v_a_r_i_a_b_l_e ...] iinn _e_x_p_r_e_s_s_i_o_n
+ <_m_a_k_e_-_l_i_n_e_s>
+ ..eennddffoorr
+
+ The _e_x_p_r_e_s_s_i_o_n is expanded and then split into words. On each iteration
+ of the loop, one word is taken and assigned to each _v_a_r_i_a_b_l_e, in order,
+ and these _v_a_r_i_a_b_l_e_s are substituted into the _m_a_k_e_-_l_i_n_e_s inside the body
+ of the for loop. The number of words must come out even; that is, if
+ there are three iteration variables, the number of words provided must be
+ a multiple of three.
+
+ If `..bbrreeaakk' is encountered within a ..ffoorr loop, it causes early
+ termination of the loop, otherwise a parse error.
+
+ OOtthheerr ddiirreeccttiivveess
+ ..uunnddeeff _v_a_r_i_a_b_l_e ...
+ Un-define the specified global variables. Only global variables
+ can be un-defined.
+
+CCOOMMMMEENNTTSS
+ Comments begin with a hash (`#') character, anywhere but in a shell
+ command line, and continue to the end of an unescaped new line.
+
+SSPPEECCIIAALL SSOOUURRCCEESS ((AATTTTRRIIBBUUTTEESS))
+ ..EEXXEECC Target is never out of date, but always execute commands
+ anyway.
+
+ ..IIGGNNOORREE Ignore any errors from the commands associated with this
+ target, exactly as if they all were preceded by a dash (`-').
+
+ ..MMAADDEE Mark all sources of this target as being up to date.
+
+ ..MMAAKKEE Execute the commands associated with this target even if the --nn
+ or --tt options were specified. Normally used to mark recursive
+ bbmmaakkees.
+
+ ..MMEETTAA Create a meta file for the target, even if it is flagged as
+ ..PPHHOONNYY, ..MMAAKKEE, or ..SSPPEECCIIAALL. Usage in conjunction with ..MMAAKKEE is
+ the most likely case. In "meta" mode, the target is out-of-
+ date if the meta file is missing.
+
+ ..NNOOMMEETTAA Do not create a meta file for the target. Meta files are also
+ not created for ..PPHHOONNYY, ..MMAAKKEE, or ..SSPPEECCIIAALL targets.
+
+ ..NNOOMMEETTAA__CCMMPP
+ Ignore differences in commands when deciding if target is out
+ of date. This is useful if the command contains a value which
+ always changes. If the number of commands change, though, the
+ target is still considered out of date. The same effect
+ applies to any command line that uses the variable _._O_O_D_A_T_E,
+ which can be used for that purpose even when not otherwise
+ needed or desired:
+
+
+ skip-compare-for-some:
+ @echo this is compared
+ @echo this is not ${.OODATE:M.NOMETA_CMP}
+ @echo this is also compared
+
+ The ::MM pattern suppresses any expansion of the unwanted
+ variable.
+
+ ..NNOOPPAATTHH Do not search for the target in the directories specified by
+ _._P_A_T_H.
+
+ ..NNOOTTMMAAIINN Normally bbmmaakkee selects the first target it encounters as the
+ default target to be built if no target was specified. This
+ source prevents this target from being selected.
+
+ ..OOPPTTIIOONNAALL
+ If a target is marked with this attribute and bbmmaakkee can't
+ figure out how to create it, it ignores this fact and assumes
+ the file isn't needed or already exists.
+
+ ..PPHHOONNYY The target does not correspond to an actual file; it is always
+ considered to be out of date, and is not created with the --tt
+ option. Suffix-transformation rules are not applied to ..PPHHOONNYY
+ targets.
+
+ ..PPRREECCIIOOUUSS
+ When bbmmaakkee is interrupted, it normally removes any partially
+ made targets. This source prevents the target from being
+ removed.
+
+ ..RREECCUURRSSIIVVEE
+ Synonym for ..MMAAKKEE.
+
+ ..SSIILLEENNTT Do not echo any of the commands associated with this target,
+ exactly as if they all were preceded by an at sign (`@').
+
+ ..UUSSEE Turn the target into bbmmaakkee's version of a macro. When the
+ target is used as a source for another target, the other target
+ acquires the commands, sources, and attributes (except for
+ ..UUSSEE) of the source. If the target already has commands, the
+ ..UUSSEE target's commands are appended to them.
+
+ ..UUSSEEBBEEFFOORREE
+ Like ..UUSSEE, but instead of appending, prepend the ..UUSSEEBBEEFFOORREE
+ target commands to the target.
+
+ ..WWAAIITT If ..WWAAIITT appears in a dependency line, the sources that precede
+ it are made before the sources that succeed it in the line.
+ Since the dependents of files are not made until the file
+ itself could be made, this also stops the dependents being
+ built unless they are needed for another branch of the
+ dependency tree. So given:
+
+ x: a .WAIT b
+ echo x
+ a:
+ echo a
+ b: b1
+ echo b
+ b1:
+ echo b1
+
+ the output is always `a', `b1', `b', `x'.
+
+ The ordering imposed by ..WWAAIITT is only relevant for parallel
+ makes.
+
+SSPPEECCIIAALL TTAARRGGEETTSS
+ Special targets may not be included with other targets, i.e. they must be
+ the only target specified.
+
+ ..BBEEGGIINN Any command lines attached to this target are executed before
+ anything else is done.
+
+ ..DDEEFFAAUULLTT
+ This is sort of a ..UUSSEE rule for any target (that was used only
+ as a source) that bbmmaakkee can't figure out any other way to
+ create. Only the shell script is used. The _._I_M_P_S_R_C variable of
+ a target that inherits ..DDEEFFAAUULLTT's commands is set to the
+ target's own name.
+
+ ..DDEELLEETTEE__OONN__EERRRROORR
+ If this target is present in the makefile, it globally causes
+ make to delete targets whose commands fail. (By default, only
+ targets whose commands are interrupted during execution are
+ deleted. This is the historical behavior.) This setting can be
+ used to help prevent half-finished or malformed targets from
+ being left around and corrupting future rebuilds.
+
+ ..EENNDD Any command lines attached to this target are executed after
+ everything else is done successfully.
+
+ ..EERRRROORR Any command lines attached to this target are executed when
+ another target fails. See _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R for the
+ variables that will be set.
+
+ ..IIGGNNOORREE Mark each of the sources with the ..IIGGNNOORREE attribute. If no
+ sources are specified, this is the equivalent of specifying the
+ --ii option.
+
+ ..IINNTTEERRRRUUPPTT
+ If bbmmaakkee is interrupted, the commands for this target are
+ executed.
+
+ ..MMAAIINN If no target is specified when bbmmaakkee is invoked, this target is
+ built.
+
+ ..MMAAKKEEFFLLAAGGSS
+ This target provides a way to specify flags for bbmmaakkee at the
+ time when the makefiles are read. The flags are as if typed to
+ the shell, though the --ff option has no effect.
+
+ ..NNOOPPAATTHH Apply the ..NNOOPPAATTHH attribute to any specified sources.
+
+ ..NNOOTTPPAARRAALLLLEELL
+ Disable parallel mode.
+
+ ..NNOO__PPAARRAALLLLEELL
+ Synonym for ..NNOOTTPPAARRAALLLLEELL, for compatibility with other pmake
+ variants.
+
+ ..NNOORREEAADDOONNLLYY
+ clear the read-only attribute from the global variables
+ specified as sources.
+
+ ..OOBBJJDDIIRR The source is a new value for `_._O_B_J_D_I_R'. If it exists, bbmmaakkee
+ changes the current working directory to it and updates the
+ value of `_._O_B_J_D_I_R'.
+
+ ..OORRDDEERR In parallel mode, the named targets are made in sequence. This
+ ordering does not add targets to the list of targets to be made.
+
+ Since the dependents of a target do not get built until the
+ target itself could be built, unless `a' is built by another
+ part of the dependency graph, the following is a dependency
+ loop:
+
+ .ORDER: b a
+ b: a
+
+ ..PPAATTHH The sources are directories which are to be searched for files
+ not found in the current directory. If no sources are
+ specified, any previously specified directories are removed from
+ the search path. If the source is the special ..DDOOTTLLAASSTT target,
+ the current working directory is searched last.
+
+ ..PPAATTHH.._s_u_f_f_i_x
+ Like ..PPAATTHH but applies only to files with a particular suffix.
+ The suffix must have been previously declared with ..SSUUFFFFIIXXEESS.
+
+ ..PPHHOONNYY Apply the ..PPHHOONNYY attribute to any specified sources.
+
+ ..PPOOSSIIXX If this is the first non-comment line in the main makefile, the
+ variable _%_P_O_S_I_X is set to the value `1003.2' and the makefile
+ `<posix.mk>' is included if it exists, to provide POSIX-
+ compatible default rules. If bbmmaakkee is run with the --rr flag,
+ only `posix.mk' contributes to the default rules.
+
+ ..PPRREECCIIOOUUSS
+ Apply the ..PPRREECCIIOOUUSS attribute to any specified sources. If no
+ sources are specified, the ..PPRREECCIIOOUUSS attribute is applied to
+ every target in the file.
+
+ ..RREEAADDOONNLLYY
+ set the read-only attribute on the global variables specified as
+ sources.
+
+ ..SSHHEELLLL Sets the shell that bbmmaakkee uses to execute commands. The sources
+ are a set of _f_i_e_l_d==_v_a_l_u_e pairs.
+
+ name This is the minimal specification, used to
+ select one of the built-in shell specs; sh, ksh,
+ and csh.
+
+ path Specifies the absolute path to the shell.
+
+ hasErrCtl Indicates whether the shell supports exit on
+ error.
+
+ check The command to turn on error checking.
+
+ ignore The command to disable error checking.
+
+ echo The command to turn on echoing of commands
+ executed.
+
+ quiet The command to turn off echoing of commands
+ executed.
+
+ filter The output to filter after issuing the quiet
+ command. It is typically identical to quiet.
+
+ errFlag The flag to pass the shell to enable error
+ checking.
+
+ echoFlag The flag to pass the shell to enable command
+ echoing.
+
+ newline The string literal to pass the shell that
+ results in a single newline character when used
+ outside of any quoting characters.
+ Example:
+
+ .SHELL: name=ksh path=/bin/ksh hasErrCtl=true \
+ check="set -e" ignore="set +e" \
+ echo="set -v" quiet="set +v" filter="set +v" \
+ echoFlag=v errFlag=e newline="'\n'"
+
+ ..SSIILLEENNTT Apply the ..SSIILLEENNTT attribute to any specified sources. If no
+ sources are specified, the ..SSIILLEENNTT attribute is applied to every
+ command in the file.
+
+ ..SSTTAALLEE This target gets run when a dependency file contains stale
+ entries, having _._A_L_L_S_R_C set to the name of that dependency file.
+
+ ..SSUUFFFFIIXXEESS
+ Each source specifies a suffix to bbmmaakkee. If no sources are
+ specified, any previously specified suffixes are deleted. It
+ allows the creation of suffix-transformation rules.
+
+ Example:
+
+ .SUFFIXES: .c .o
+ .c.o:
+ cc -o ${.TARGET} -c ${.IMPSRC}
+
+ ..SSYYSSPPAATTHH
+ The sources are directories which are to be added to the system
+ include path which bbmmaakkee searches for makefiles. If no sources
+ are specified, any previously specified directories are removed
+ from the system include path.
+
+EENNVVIIRROONNMMEENNTT
+ bbmmaakkee uses the following environment variables, if they exist: MACHINE,
+ MACHINE_ARCH, MAKE, MAKEFLAGS, MAKEOBJDIR, MAKEOBJDIRPREFIX, MAKESYSPATH,
+ PWD, and TMPDIR.
+
+ MAKEOBJDIRPREFIX and MAKEOBJDIR may only be set in the environment or on
+ the command line to bbmmaakkee and not as makefile variables; see the
+ description of `_._O_B_J_D_I_R' for more details.
+
+FFIILLEESS
+ .depend list of dependencies
+ makefile first default makefile if no makefile is specified on the
+ command line
+ Makefile second default makefile if no makefile is specified on the
+ command line
+ sys.mk system makefile
+ /usr/share/mk system makefile directory
+
+CCOOMMPPAATTIIBBIILLIITTYY
+ The basic make syntax is compatible between different make variants;
+ however the special variables, variable modifiers and conditionals are
+ not.
+
+ OOllddeerr vveerrssiioonnss
+ An incomplete list of changes in older versions of bbmmaakkee:
+
+ The way that .for loop variables are substituted changed after NetBSD 5.0
+ so that they still appear to be variable expansions. In particular this
+ stops them being treated as syntax, and removes some obscure problems
+ using them in .if statements.
+
+ The way that parallel makes are scheduled changed in NetBSD 4.0 so that
+ .ORDER and .WAIT apply recursively to the dependent nodes. The
+ algorithms used may change again in the future.
+
+ OOtthheerr mmaakkee ddiiaalleeccttss
+ Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not
+ support most of the features of bbmmaakkee as described in this manual. Most
+ notably:
+
+ ++oo The ..WWAAIITT and ..OORRDDEERR declarations and most functionality
+ pertaining to parallelization. (GNU make supports
+ parallelization but lacks the features needed to control it
+ effectively.)
+
+ ++oo Directives, including for loops and conditionals and most of
+ the forms of include files. (GNU make has its own incompatible
+ and less powerful syntax for conditionals.)
+
+ ++oo All built-in variables that begin with a dot.
+
+ ++oo Most of the special sources and targets that begin with a dot,
+ with the notable exception of ..PPHHOONNYY, ..PPRREECCIIOOUUSS, and ..SSUUFFFFIIXXEESS.
+
+ ++oo Variable modifiers, except for the `:old=new' string
+ substitution, which does not portably support globbing with `%'
+ and historically only works on declared suffixes.
+
+ ++oo The $$>> variable even in its short form; most makes support this
+ functionality but its name varies.
+
+ Some features are somewhat more portable, such as assignment with ++==, ??==,
+ and !!==. The _._P_A_T_H functionality is based on an older feature VVPPAATTHH found
+ in GNU make and many versions of SVR4 make; however, historically its
+ behavior is too ill-defined (and too buggy) to rely upon.
+
+ The $$@@ and $$<< variables are more or less universally portable, as is the
+ $$((MMAAKKEE)) variable. Basic use of suffix rules (for files only in the
+ current directory, not trying to chain transformations together, etc.) is
+ also reasonably portable.
+
+SSEEEE AALLSSOO
+ mkdep(1)
+
+HHIISSTTOORRYY
+ bbmmaakkee is derived from NetBSD make(1). It uses autoconf to facilitate
+ portability to other platforms.
+
+ A make command appeared in Version 7 AT&T UNIX. This make implementation
+ is based on Adam de Boor's pmake program, which was written for Sprite at
+ Berkeley. It was designed to be a parallel distributed make running jobs
+ on different machines using a daemon called "customs".
+
+ Historically the target/dependency FFRRCC has been used to FoRCe rebuilding
+ (since the target/dependency does not exist ... unless someone creates an
+ _F_R_C file).
+
+BBUUGGSS
+ The make syntax is difficult to parse. For instance, finding the end of
+ a variable's use should involve scanning each of the modifiers, using the
+ correct terminator for each field. In many places make just counts {}
+ and () in order to find the end of a variable expansion.
+
+ There is no way of escaping a space character in a filename.
+
+ In jobs mode, when a target fails; make will put an error token into the
+ job token pool. This will cause all other instances of make using that
+ token pool to abort the build and exit with error code 6. Sometimes the
+ attempt to suppress a cascade of unnecessary errors, can result in a
+ seemingly unexplained `*** Error code 6'
+
+FreeBSD 13.2-RELEASE-p10 March 9, 2024 FreeBSD 13.2-RELEASE-p10
diff --git a/contrib/bmake/buf.c b/contrib/bmake/buf.c
index fdc6c8ec2b60..8f4de0c3e2bc 100644
--- a/contrib/bmake/buf.c
+++ b/contrib/bmake/buf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.c,v 1.57 2023/12/19 19:33:39 rillig Exp $ */
+/* $NetBSD: buf.c,v 1.58 2024/04/28 15:10:19 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -75,7 +75,7 @@
#include "make.h"
/* "@(#)buf.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: buf.c,v 1.57 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: buf.c,v 1.58 2024/04/28 15:10:19 rillig Exp $");
/* Make space in the buffer for adding at least 16 more bytes. */
void
@@ -187,30 +187,3 @@ Buf_DoneData(Buffer *buf)
return data;
}
-
-#ifndef BUF_COMPACT_LIMIT
-# define BUF_COMPACT_LIMIT 128 /* worthwhile saving */
-#endif
-
-/*
- * Return the data from the buffer.
- * Leave the buffer itself in an indeterminate state.
- *
- * If the buffer size is much greater than its content,
- * a new buffer will be allocated and the old one freed.
- */
-char *
-Buf_DoneDataCompact(Buffer *buf)
-{
-#if BUF_COMPACT_LIMIT > 0
- if (buf->cap - buf->len >= BUF_COMPACT_LIMIT) {
- /* We trust realloc to be smart */
- char *data = bmake_realloc(buf->data, buf->len + 1);
- buf->data = NULL;
- data[buf->len] = '\0'; /* XXX: unnecessary */
- Buf_Done(buf);
- return data;
- }
-#endif
- return Buf_DoneData(buf);
-}
diff --git a/contrib/bmake/buf.h b/contrib/bmake/buf.h
index c5e7d539de9e..fad36e932616 100644
--- a/contrib/bmake/buf.h
+++ b/contrib/bmake/buf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.49 2023/12/19 19:33:39 rillig Exp $ */
+/* $NetBSD: buf.h,v 1.50 2024/04/28 15:10:19 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -124,6 +124,5 @@ void Buf_Init(Buffer *);
void Buf_InitSize(Buffer *, size_t);
void Buf_Done(Buffer *);
char *Buf_DoneData(Buffer *) MAKE_ATTR_USE;
-char *Buf_DoneDataCompact(Buffer *) MAKE_ATTR_USE;
#endif
diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c
index 05c6ea0e7ec8..3a8b1c4b2640 100644
--- a/contrib/bmake/compat.c
+++ b/contrib/bmake/compat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.254 2024/03/10 02:53:37 sjg Exp $ */
+/* $NetBSD: compat.c,v 1.255 2024/04/20 10:18:55 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -94,7 +94,7 @@
#include "pathnames.h"
/* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.254 2024/03/10 02:53:37 sjg Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.255 2024/04/20 10:18:55 rillig Exp $");
static GNode *curTarg = NULL;
static pid_t compatChild;
@@ -237,7 +237,9 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln)
errCheck = !(gn->type & OP_IGNORE);
doIt = false;
+ EvalStack_Push(gn->name, NULL, NULL);
cmdStart = Var_Subst(cmd, gn, VARE_WANTRES);
+ EvalStack_Pop();
/* TODO: handle errors */
if (cmdStart[0] == '\0') {
diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c
index f8d31fc9c160..5001677303e2 100644
--- a/contrib/bmake/cond.c
+++ b/contrib/bmake/cond.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.362 2024/02/07 07:21:22 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.363 2024/04/23 22:51:28 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -91,7 +91,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: cond.c,v 1.362 2024/02/07 07:21:22 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.363 2024/04/23 22:51:28 rillig Exp $");
/*
* Conditional expressions conform to this grammar:
@@ -424,13 +424,12 @@ CondParser_StringExpr(CondParser *par, const char *start,
* Parse a string from an expression or an optionally quoted string,
* on the left-hand and right-hand sides of comparisons.
*
- * Results:
- * Returns the string without any enclosing quotes, or NULL on error.
- * Sets out_quoted if the leaf was a quoted string literal.
+ * Return the string without any enclosing quotes, or NULL on error.
+ * Sets out_quoted if the leaf was a quoted string literal.
*/
-static void
+static FStr
CondParser_Leaf(CondParser *par, bool doEval, bool unquotedOK,
- FStr *out_str, bool *out_quoted)
+ bool *out_quoted)
{
Buffer buf;
FStr str;
@@ -492,7 +491,7 @@ return_buf:
buf.data = NULL;
return_str:
Buf_Done(&buf);
- *out_str = str;
+ return str;
}
/*
@@ -602,7 +601,7 @@ CondParser_Comparison(CondParser *par, bool doEval)
ComparisonOp op;
bool lhsQuoted, rhsQuoted;
- CondParser_Leaf(par, doEval, par->leftUnquotedOK, &lhs, &lhsQuoted);
+ lhs = CondParser_Leaf(par, doEval, par->leftUnquotedOK, &lhsQuoted);
if (lhs.str == NULL)
goto done_lhs;
@@ -622,7 +621,7 @@ CondParser_Comparison(CondParser *par, bool doEval)
goto done_lhs;
}
- CondParser_Leaf(par, doEval, true, &rhs, &rhsQuoted);
+ rhs = CondParser_Leaf(par, doEval, true, &rhsQuoted);
t = rhs.str == NULL ? TOK_ERROR
: !doEval ? TOK_FALSE
: EvalCompare(par, lhs.str, lhsQuoted, op, rhs.str, rhsQuoted);
diff --git a/contrib/bmake/configure b/contrib/bmake/configure
index 0b4084b26ed4..08a550f3cf86 100755
--- a/contrib/bmake/configure
+++ b/contrib/bmake/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for bmake 20240212.
+# Generated by GNU Autoconf 2.71 for bmake 20240314.
#
# Report bugs to <sjg@NetBSD.org>.
#
@@ -610,8 +610,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bmake'
PACKAGE_TARNAME='bmake'
-PACKAGE_VERSION='20240212'
-PACKAGE_STRING='bmake 20240212'
+PACKAGE_VERSION='20240314'
+PACKAGE_STRING='bmake 20240314'
PACKAGE_BUGREPORT='sjg@NetBSD.org'
PACKAGE_URL=''
@@ -664,6 +664,8 @@ force_machine_arch
machine_arch
force_machine
machine
+force_make_os
+make_os
egrep
LIBOBJS
bmake_path_max
@@ -1291,7 +1293,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bmake 20240212 to adapt to many kinds of systems.
+\`configure' configures bmake 20240314 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1353,7 +1355,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bmake 20240212:";;
+ short | recursive ) echo "Configuration of bmake 20240314:";;
esac
cat <<\_ACEOF
@@ -1463,7 +1465,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bmake configure 20240212
+bmake configure 20240314
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1970,7 +1972,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bmake $as_me 20240212, which was
+It was created by bmake $as_me 20240314, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2784,10 +2786,21 @@ no) ;;
esac
fi
+FORCE_MAKE_OS=
+make_os=
case "$OS" in
-CYGWIN*|Darwin|MINGW*) use_makefile=no;;
+CYGWIN*)
+ use_makefile=no
+ OS=Cygwin
+ FORCE_MAKE_OS=$OS
+ ;;
+Darwin|MINGW*) use_makefile=no;;
*) use_makefile=yes;;
esac
+if test "x$FORCE_MAKE_OS" != x; then
+ force_make_os=FORCE_
+ make_os=${FORCE_MAKE_OS}
+fi
# Check whether --with-makefile was given.
if test ${with_makefile+y}
@@ -2871,9 +2884,12 @@ Minix) CPPFLAGS="${CPPFLAGS} -D_NETBSD_SOURCE"
;;
SCO_SV) # /bin/sh is not usable
ALT_DEF_SHELLS="/bin/lsh /usr/bin/bash /bin/ksh"
- CPPFLAGS="${CPPFLAGS} -DFORCE_USE_SHELL"
+ FORCE_USE_SHELL=1
;;
esac
+if test "x$FORCE_USE_SHELL" != x; then
+ CPPFLAGS="${CPPFLAGS} -DFORCE_USE_SHELL"
+fi
# Not everyone groks TZ=Europe/Berlin
# which is used by the localtime tests
echo $ECHO_N "checking whether system has timezone Europe/Berlin... $ECHO_C" >&6
@@ -7076,6 +7092,8 @@ esac
+
+
bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh"
if test $use_makefile = yes; then
bm_outfiles="makefile $bm_outfiles"
@@ -7594,7 +7612,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bmake $as_me 20240212, which was
+This file was extended by bmake $as_me 20240314, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7658,7 +7676,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-bmake config.status 20240212
+bmake config.status 20240314
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/contrib/bmake/configure.in b/contrib/bmake/configure.in
index 7979a0c0bb5c..0796e9afdc8d 100644
--- a/contrib/bmake/configure.in
+++ b/contrib/bmake/configure.in
@@ -1,11 +1,11 @@
dnl
dnl RCSid:
-dnl $Id: configure.in,v 1.103 2024/02/16 17:54:38 sjg Exp $
+dnl $Id: configure.in,v 1.105 2024/03/19 19:08:20 sjg Exp $
dnl
dnl Process this file with autoconf to produce a configure script
dnl
AC_PREREQ([2.71])
-AC_INIT([bmake],[20240212],[sjg@NetBSD.org])
+AC_INIT([bmake],[20240314],[sjg@NetBSD.org])
AC_CONFIG_HEADERS(config.h)
dnl make srcdir absolute
@@ -61,10 +61,22 @@ no) ;;
*) use_defshell $with_defshell;;
esac])
dnl
+dnl sometimes uname -s output is not useful
+FORCE_MAKE_OS=
+make_os=
case "$OS" in
-CYGWIN*|Darwin|MINGW*) use_makefile=no;;
+CYGWIN*)
+ use_makefile=no
+ OS=Cygwin
+ FORCE_MAKE_OS=$OS
+ ;;
+Darwin|MINGW*) use_makefile=no;;
*) use_makefile=yes;;
esac
+if test "x$FORCE_MAKE_OS" != x; then
+ force_make_os=FORCE_
+ make_os=${FORCE_MAKE_OS}
+fi
AC_ARG_WITH(makefile,
[ --without-makefile disable use of generated makefile],
[case "${withval}" in
@@ -141,9 +153,12 @@ Minix) CPPFLAGS="${CPPFLAGS} -D_NETBSD_SOURCE"
;;
SCO_SV) # /bin/sh is not usable
ALT_DEF_SHELLS="/bin/lsh /usr/bin/bash /bin/ksh"
- CPPFLAGS="${CPPFLAGS} -DFORCE_USE_SHELL"
+ FORCE_USE_SHELL=1
;;
esac
+if test "x$FORCE_USE_SHELL" != x; then
+ CPPFLAGS="${CPPFLAGS} -DFORCE_USE_SHELL"
+fi
dnl
# Not everyone groks TZ=Europe/Berlin
# which is used by the localtime tests
@@ -549,6 +564,8 @@ bmake) egrep=egrep;;
esac
dnl
AC_SUBST(egrep)
+AC_SUBST(make_os)
+AC_SUBST(force_make_os)
AC_SUBST(machine)
AC_SUBST(force_machine)
AC_SUBST(machine_arch)
diff --git a/contrib/bmake/dir.c b/contrib/bmake/dir.c
index 5c11d6c794d7..de50b2faf511 100644
--- a/contrib/bmake/dir.c
+++ b/contrib/bmake/dir.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.290 2024/05/20 19:14:12 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -132,7 +132,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.290 2024/05/20 19:14:12 sjg Exp $");
/*
* A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -566,10 +566,12 @@ void
Dir_SetSYSPATH(void)
{
CachedDirListNode *ln;
-
+ SearchPath *path = Lst_IsEmpty(&sysIncPath->dirs)
+ ? defSysIncPath : sysIncPath;
+
Var_ReadOnly(".SYSPATH", false);
Global_Delete(".SYSPATH");
- for (ln = sysIncPath->dirs.first; ln != NULL; ln = ln->next) {
+ for (ln = path->dirs.first; ln != NULL; ln = ln->next) {
CachedDir *dir = ln->datum;
Global_Append(".SYSPATH", dir->name);
}
@@ -1142,15 +1144,16 @@ found:
* Input:
* name the file to find
* path the directories to search, or NULL
+ * isinclude if true, do not search .CURDIR at all
*
* Results:
* The freshly allocated path to the file, or NULL.
*/
-char *
-Dir_FindFile(const char *name, SearchPath *path)
+static char *
+FindFile(const char *name, SearchPath *path, bool isinclude)
{
char *file; /* the current filename to check */
- bool seenDotLast = false; /* true if we should search dot last */
+ bool seenDotLast = isinclude; /* true if we should search dot last */
struct cached_stat cst;
const char *trailing_dot = ".";
const char *base = str_basename(name);
@@ -1163,7 +1166,7 @@ Dir_FindFile(const char *name, SearchPath *path)
return NULL;
}
- if (path->dirs.first != NULL) {
+ if (!seenDotLast && path->dirs.first != NULL) {
CachedDir *dir = path->dirs.first->datum;
if (dir == dotLast) {
seenDotLast = true;
@@ -1244,6 +1247,38 @@ Dir_FindFile(const char *name, SearchPath *path)
return NULL;
}
+/*
+ * Find the file with the given name along the given search path.
+ *
+ * Input:
+ * name the file to find
+ * path the directories to search, or NULL
+ *
+ * Results:
+ * The freshly allocated path to the file, or NULL.
+ */
+char *
+Dir_FindFile(const char *name, SearchPath *path)
+{
+ return FindFile(name, path, false);
+}
+
+/*
+ * Find the include file with the given name along the given search path.
+ *
+ * Input:
+ * name the file to find
+ * path the directories to search, or NULL
+ *
+ * Results:
+ * The freshly allocated path to the file, or NULL.
+ */
+char *
+Dir_FindInclude(const char *name, SearchPath *path)
+{
+ return FindFile(name, path, true);
+}
+
/*
* Search for 'needle' starting at the directory 'here' and then working our
diff --git a/contrib/bmake/dir.h b/contrib/bmake/dir.h
index 09cbca8ec4c1..58bfd8c996ef 100644
--- a/contrib/bmake/dir.h
+++ b/contrib/bmake/dir.h
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.h,v 1.47 2023/01/24 00:24:02 sjg Exp $ */
+/* $NetBSD: dir.h,v 1.48 2024/05/19 20:09:40 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -86,6 +86,7 @@ void Dir_SetSYSPATH(void);
bool Dir_HasWildcards(const char *) MAKE_ATTR_USE;
void SearchPath_Expand(SearchPath *, const char *, StringList *);
char *Dir_FindFile(const char *, SearchPath *) MAKE_ATTR_USE;
+char *Dir_FindInclude(const char *, SearchPath *) MAKE_ATTR_USE;
char *Dir_FindHereOrAbove(const char *, const char *) MAKE_ATTR_USE;
void Dir_UpdateMTime(GNode *, bool);
CachedDir *SearchPath_Add(SearchPath *, const char *);
diff --git a/contrib/bmake/for.c b/contrib/bmake/for.c
index a995caa6be70..91d9b8e13ce6 100644
--- a/contrib/bmake/for.c
+++ b/contrib/bmake/for.c
@@ -1,4 +1,4 @@
-/* $NetBSD: for.c,v 1.178 2024/01/21 15:02:17 rillig Exp $ */
+/* $NetBSD: for.c,v 1.179 2024/04/01 12:33:27 rillig Exp $ */
/*
* Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
#include "make.h"
/* "@(#)for.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: for.c,v 1.178 2024/01/21 15:02:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.179 2024/04/01 12:33:27 rillig Exp $");
typedef struct ForLoop {
@@ -196,11 +196,7 @@ ForLoop_ParseItems(ForLoop *f, const char *p)
cpp_skip_whitespace(&p);
items = Var_Subst(p, SCOPE_GLOBAL, VARE_WANTRES);
- if (items == var_Error) {
- /* TODO: Make this part of the code reachable. */
- Parse_Error(PARSE_FATAL, "Error in .for loop items");
- return false;
- }
+ /* TODO: handle errors */
f->items = Substring_Words(items, false);
free(items);
@@ -490,12 +486,11 @@ ForLoop_SubstBody(ForLoop *f, unsigned int firstItem, Buffer *body)
p += 2;
ForLoop_SubstVarLong(f, firstItem, body,
&p, endc, &mark);
- } else if (p[1] != '\0') {
+ } else {
ForLoop_SubstVarShort(f, firstItem, body,
p + 1, &mark);
p += 2;
- } else
- break;
+ }
}
Buf_AddRange(body, mark, end);
diff --git a/contrib/bmake/getopt.c b/contrib/bmake/getopt.c
index da29daed2ca8..2afe663acb00 100644
--- a/contrib/bmake/getopt.c
+++ b/contrib/bmake/getopt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getopt.c,v 1.29 2014/06/05 22:00:22 christos Exp $ */
+/* $NetBSD: getopt.c,v 1.30 2024/01/19 18:41:38 christos Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -58,8 +58,8 @@ int
getopt(int nargc, char * const nargv[], const char *ostr)
{
extern char *__progname;
- static const char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
+ static const char *place = EMSG; /* option letter processing */
+ const char *oli; /* option letter list index */
#ifndef BSD4_4
if (!__progname) {
diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c
index 4cce19e89f87..541a61294766 100644
--- a/contrib/bmake/job.c
+++ b/contrib/bmake/job.c
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.467 2024/03/10 02:53:37 sjg Exp $ */
+/* $NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -154,7 +154,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.467 2024/03/10 02:53:37 sjg Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@@ -930,7 +930,9 @@ JobWriteCommand(Job *job, ShellWriter *wr, StringListNode *ln, const char *ucmd)
run = GNode_ShouldExecute(job->node);
+ EvalStack_Push(job->node->name, NULL, NULL);
xcmd = Var_Subst(ucmd, job->node, VARE_WANTRES);
+ EvalStack_Pop();
/* TODO: handle errors */
xcmdStart = xcmd;
@@ -1057,7 +1059,9 @@ JobSaveCommands(Job *job)
* variables such as .TARGET, .IMPSRC. It is not intended to
* expand the other variables as well; see deptgt-end.mk.
*/
+ EvalStack_Push(job->node->name, NULL, NULL);
expanded_cmd = Var_Subst(cmd, job->node, VARE_WANTRES);
+ EvalStack_Pop();
/* TODO: handle errors */
Lst_Append(&Targ_GetEndNode()->commands, expanded_cmd);
}
@@ -1087,6 +1091,7 @@ DebugFailedJob(const Job *job)
debug_printf("\n");
debug_printf("*** Failed target: %s\n", job->node->name);
+ debug_printf("*** In directory: %s\n", curdir);
debug_printf("*** Failed commands:\n");
for (ln = job->node->commands.first; ln != NULL; ln = ln->next) {
const char *cmd = ln->datum;
@@ -1784,7 +1789,7 @@ JobStart(GNode *gn, bool special)
* itself.
*/
static char *
-PrintFilteredOutput(char *p, char *endp) /* XXX: should all be const */
+PrintFilteredOutput(char *p, const char *endp) /* XXX: p should be const */
{
char *ep; /* XXX: should be const */
@@ -2185,7 +2190,8 @@ Shell_Init(void)
if (shellPath == NULL)
InitShellNameAndPath();
- Var_SetWithFlags(SCOPE_CMDLINE, ".SHELL", shellPath, VAR_SET_READONLY);
+ Var_SetWithFlags(SCOPE_CMDLINE, ".SHELL", shellPath,
+ VAR_SET_INTERNAL|VAR_SET_READONLY);
if (shell->errFlag == NULL)
shell->errFlag = "";
if (shell->echoFlag == NULL)
diff --git a/contrib/bmake/lst.c b/contrib/bmake/lst.c
index 7a7c08200947..ae57ba101845 100644
--- a/contrib/bmake/lst.c
+++ b/contrib/bmake/lst.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.107 2023/12/29 20:43:58 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.108 2024/04/27 17:33:46 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
#include "make.h"
-MAKE_RCSID("$NetBSD: lst.c,v 1.107 2023/12/29 20:43:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.108 2024/04/27 17:33:46 rillig Exp $");
static ListNode *
LstNodeNew(ListNode *prev, ListNode *next, void *datum)
@@ -60,13 +60,13 @@ Lst_Done(List *list)
}
void
-Lst_DoneCall(List *list, LstFreeProc freeProc)
+Lst_DoneFree(List *list)
{
ListNode *ln, *next;
for (ln = list->first; ln != NULL; ln = next) {
next = ln->next;
- freeProc(ln->datum);
+ free(ln->datum);
free(ln);
}
}
diff --git a/contrib/bmake/lst.h b/contrib/bmake/lst.h
index 59f8f201192f..7640366d8261 100644
--- a/contrib/bmake/lst.h
+++ b/contrib/bmake/lst.h
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.h,v 1.104 2023/12/29 20:43:58 rillig Exp $ */
+/* $NetBSD: lst.h,v 1.105 2024/04/27 17:33:46 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -103,13 +103,10 @@ struct List {
ListNode *last;
};
-/* Free the datum of a node, called before freeing the node itself. */
-typedef void LstFreeProc(void *);
-
-/* Free the list nodes, but not the list itself. */
+/* Free the list nodes. */
void Lst_Done(List *);
-/* Free the list nodes, freeing the node data using the given function. */
-void Lst_DoneCall(List *, LstFreeProc);
+/* Free the list nodes, as well as each node's datum. */
+void Lst_DoneFree(List *);
#define LST_INIT { NULL, NULL }
diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c
index 25ec3630e649..6c97d648e5a2 100644
--- a/contrib/bmake/main.c
+++ b/contrib/bmake/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.612 2024/03/10 02:53:37 sjg Exp $ */
+/* $NetBSD: main.c,v 1.616 2024/05/19 17:55:54 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.612 2024/03/10 02:53:37 sjg Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.616 2024/05/19 17:55:54 sjg Exp $");
#if defined(MAKE_NATIVE)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1217,7 +1217,7 @@ ReadBuiltinRules(void)
Fatal("%s: cannot open %s.",
progname, (const char *)sysMkFiles.first->datum);
- Lst_DoneCall(&sysMkFiles, free);
+ Lst_DoneFree(&sysMkFiles);
}
static void
@@ -1359,7 +1359,11 @@ main_Init(int argc, char **argv)
/* Just in case MAKEOBJDIR wants us to do something tricky. */
Targ_Init();
Var_Init();
+#ifdef FORCE_MAKE_OS
+ Global_Set_ReadOnly(".MAKE.OS", FORCE_MAKE_OS);
+#else
Global_Set_ReadOnly(".MAKE.OS", utsname.sysname);
+#endif
Global_Set("MACHINE", machine);
Global_Set("MACHINE_ARCH", machine_arch);
#ifdef MAKE_VERSION
@@ -1405,7 +1409,7 @@ main_Init(int argc, char **argv)
Global_Set(".MAKEOVERRIDES", "");
Global_Set("MFLAGS", "");
Global_Set(".ALLTARGETS", "");
- Var_Set(SCOPE_CMDLINE, ".MAKE.LEVEL.ENV", MAKE_LEVEL_ENV);
+ Global_Set_ReadOnly(".MAKE.LEVEL.ENV", MAKE_LEVEL_ENV);
/* Set some other useful variables. */
{
@@ -1582,9 +1586,9 @@ static void
main_CleanUp(void)
{
#ifdef CLEANUP
- Lst_DoneCall(&opts.variables, free);
- Lst_DoneCall(&opts.makefiles, free);
- Lst_DoneCall(&opts.create, free);
+ Lst_DoneFree(&opts.variables);
+ Lst_DoneFree(&opts.makefiles);
+ Lst_DoneFree(&opts.create);
#endif
if (DEBUG(GRAPH2))
diff --git a/contrib/bmake/make-bootstrap.sh.in b/contrib/bmake/make-bootstrap.sh.in
index e00805cd7ef5..d4f3c0a39c89 100755
--- a/contrib/bmake/make-bootstrap.sh.in
+++ b/contrib/bmake/make-bootstrap.sh.in
@@ -19,6 +19,7 @@ MAKE_VERSION=@_MAKE_VERSION@
MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \
-D@force_machine@MACHINE=\"@machine@\" \
-D@force_machine_arch@MACHINE_ARCH=\"@machine_arch@\" \
+-D@force_make_os@MAKE_OS=\"@make_os@\" \
-D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\""
diff --git a/contrib/bmake/make.h b/contrib/bmake/make.h
index 86c198cb55f0..b7fcc77b91b3 100644
--- a/contrib/bmake/make.h
+++ b/contrib/bmake/make.h
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.329 2024/03/10 02:53:37 sjg Exp $ */
+/* $NetBSD: make.h,v 1.333 2024/05/07 18:26:22 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -141,6 +141,12 @@
#define MAKE_ATTR_USE /* delete */
#endif
+#if MAKE_GNUC_PREREQ(8, 0)
+#define MAKE_ATTR_NOINLINE __attribute__((__noinline__))
+#else
+#define MAKE_ATTR_NOINLINE /* delete */
+#endif
+
#if __STDC_VERSION__ >= 199901L || defined(lint)
#define MAKE_INLINE static inline MAKE_ATTR_UNUSED
#else
@@ -422,7 +428,7 @@ typedef struct SearchPath {
/*
* A graph node represents a target that can possibly be made, including its
- * relation to other targets and a lot of other details.
+ * relation to other targets.
*/
typedef struct GNode {
/* The target's name, such as "clean" or "make.c" */
@@ -604,8 +610,8 @@ extern GNode *SCOPE_GLOBAL;
extern GNode *SCOPE_CMDLINE;
/*
- * Value returned by Var_Parse when an error is encountered. It actually
- * points to an empty string, so naive callers needn't worry about it.
+ * Value returned by Var_Parse when an error is encountered. It points to an
+ * empty string, so naive callers needn't worry about it.
*/
extern char var_Error[];
@@ -701,11 +707,11 @@ typedef enum PrintVarsMode {
/* Command line options */
typedef struct CmdOpts {
- /* -B: whether we are make compatible */
+ /* -B: whether to be compatible to traditional make */
bool compatMake;
/*
- * -d: debug control: There is one bit per module. It is up to the
+ * -d: debug control: There is one flag per module. It is up to the
* module what debug information to print.
*/
DebugFlags debug;
@@ -1007,7 +1013,8 @@ typedef enum VarSetFlags {
* except for another call to Var_Set with the same flag. See the
* special targets '.NOREADONLY' and '.READONLY'.
*/
- VAR_SET_READONLY = 1 << 1
+ VAR_SET_READONLY = 1 << 1,
+ VAR_SET_INTERNAL = 1 << 2
} VarSetFlags;
typedef enum VarExportMode {
@@ -1046,6 +1053,10 @@ void Global_Append(const char *, const char *);
void Global_Delete(const char *);
void Global_Set_ReadOnly(const char *, const char *);
+void EvalStack_Push(const char *, const char *, const char *);
+void EvalStack_Pop(void);
+const char *EvalStack_Details(void);
+
/* util.c */
typedef void (*SignalProc)(int);
SignalProc bmake_signal(int, SignalProc);
diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c
index b9103a620e49..dea3ed12d965 100644
--- a/contrib/bmake/meta.c
+++ b/contrib/bmake/meta.c
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.207 2023/12/17 09:02:26 rillig Exp $ */
+/* $NetBSD: meta.c,v 1.208 2024/04/27 17:33:46 rillig Exp $ */
/*
* Implement 'meta' mode.
@@ -1602,7 +1602,7 @@ meta_oodate(GNode *gn, bool oodate)
}
}
- Lst_DoneCall(&missingFiles, free);
+ Lst_DoneFree(&missingFiles);
if (oodate && needOODATE) {
/*
diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog
index c37feedf4353..4c3f4f4572c9 100644
--- a/contrib/bmake/mk/ChangeLog
+++ b/contrib/bmake/mk/ChangeLog
@@ -1,3 +1,46 @@
+2024-05-04 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * install-mk (MK_VERSION): 20240504
+
+ * dirdeps.mk: allow BUILD_DIRDEPS_OVERRIDES to pass overrides to
+ sub-make building DIRDEPS_CACHE.
+
+2024-04-24 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * meta.autodep.mk: do not override start_utc
+
+2024-04-18 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * sys.dirdeps.mk: set defaults for DEP_* at level 0 too.
+ These help when first include of Makefile.depend happens in a leaf
+ dir.
+
+ * install-mk (MK_VERSION): 20240414
+
+2024-04-09 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * install-mk (MK_VERSION): 20240408
+
+ * init.mk: allow for _ as well as . to join V
+ and Q from QUALIFIED_VAR_LIST and VAR_QUALIFIER_LIST.
+
+ * progs.mk: avoid overlap between PROG_VARS and
+ init.mk's QUALIFIED_VAR_LIST since PROG would also
+ match its VAR_QUALIFIER_LIST,
+ libs.mk does not have the same issue.
+
+ * subdir.mk: _SUBDIRUSE for realinstall should run install
+ remove include of ${.CURDIR}/Makefile.inc that can be done via
+ local.subdir.mk where needed
+
+ * own.mk: do not conflict with man.mk
+
+2024-03-19 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * install-mk (MK_VERSION): 20240314
+
+ * add sys/Cygwin.mk from Christian Franke
+
2024-03-09 Simon J Gerraty <sjg@beast.crufty.net>
* install-mk (MK_VERSION): 20240309
diff --git a/contrib/bmake/mk/FILES b/contrib/bmake/mk/FILES
index efe9691ffe58..39ac101d36f4 100644
--- a/contrib/bmake/mk/FILES
+++ b/contrib/bmake/mk/FILES
@@ -54,6 +54,7 @@ sys.dependfile.mk
sys.dirdeps.mk
sys.vars.mk
sys/AIX.mk
+sys/Cygwin.mk
sys/Darwin.mk
sys/Generic.mk
sys/HP-UX.mk
diff --git a/contrib/bmake/mk/dirdeps.mk b/contrib/bmake/mk/dirdeps.mk
index b3b34145e8e9..7a9ecd881d7b 100644
--- a/contrib/bmake/mk/dirdeps.mk
+++ b/contrib/bmake/mk/dirdeps.mk
@@ -1,4 +1,4 @@
-# $Id: dirdeps.mk,v 1.166 2024/01/05 23:16:34 sjg Exp $
+# $Id: dirdeps.mk,v 1.167 2024/05/06 20:41:08 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@@ -581,6 +581,7 @@ BUILD_DIRDEPS_MAKEFILE ?= -f dirdeps.mk
# these should generally do
BUILD_DIRDEPS_MAKEFILE ?=
+BUILD_DIRDEPS_OVERRIDES ?=
BUILD_DIRDEPS_TARGETS ?= ${.TARGETS}
.if ${DIRDEPS_CACHE} != ${STATIC_DIRDEPS_CACHE:Uno} && ${DIRDEPS_CACHE:M${SRCTOP}/*} == ""
@@ -600,7 +601,9 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP
TARGET_SPEC=${TARGET_SPEC} \
MAKEFLAGS= ${DIRDEP_CACHE_MAKE:U${.MAKE}} -C ${_CURDIR} \
${BUILD_DIRDEPS_MAKEFILE} \
- ${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \
+ ${BUILD_DIRDEPS_TARGETS} \
+ ${BUILD_DIRDEPS_OVERRIDES} \
+ BUILD_DIRDEPS_CACHE=yes \
.MAKE.DEPENDFILE=.none \
${"${DEBUG_DIRDEPS:Nno}":?DEBUG_DIRDEPS='${DEBUG_DIRDEPS}':} \
${.MAKEFLAGS:tW:S,-D ,-D,g:tw:M*WITH*} \
diff --git a/contrib/bmake/mk/init.mk b/contrib/bmake/mk/init.mk
index 86dc577371cb..b6619721c943 100644
--- a/contrib/bmake/mk/init.mk
+++ b/contrib/bmake/mk/init.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: init.mk,v 1.37 2024/02/25 19:12:13 sjg Exp $
+# $Id: init.mk,v 1.38 2024/04/09 17:18:24 sjg Exp $
#
# @(#) Copyright (c) 2002-2024, Simon J. Gerraty
#
@@ -72,7 +72,7 @@ QUALIFIED_VAR_LIST += \
# a final :U avoids errors if someone uses :=
.for V in ${QUALIFIED_VAR_LIST:O:u:@q@$q $q_LAST@}
.for Q in ${VAR_QUALIFIER_LIST:u}
-$V += ${$V.$Q:U} ${$V.$Q.${COMPILER_TYPE}:U}
+$V += ${$V_$Q:U${$V.$Q:U}} ${V_$Q_${COMPILER_TYPE}:U${$V.$Q.${COMPILER_TYPE}:U}}
.endfor
.endfor
diff --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk
index c9941bb4247e..c2962ffee6dc 100755..100644
--- a/contrib/bmake/mk/install-mk
+++ b/contrib/bmake/mk/install-mk
@@ -59,9 +59,9 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: install-mk,v 1.250 2024/03/10 02:57:17 sjg Exp $
+# $Id: install-mk,v 1.254 2024/05/06 20:41:08 sjg Exp $
#
-# @(#) Copyright (c) 1994-2023 Simon J. Gerraty
+# @(#) Copyright (c) 1994-2024 Simon J. Gerraty
#
# This file is provided in the hope that it will
# be of use. There is absolutely NO WARRANTY.
@@ -74,7 +74,7 @@
# sjg@crufty.net
#
-MK_VERSION=20240309
+MK_VERSION=20240504
OWNER=
GROUP=
MODE=444
diff --git a/contrib/bmake/mk/meta.autodep.mk b/contrib/bmake/mk/meta.autodep.mk
index 9824570ecc43..55f2d66e56aa 100644
--- a/contrib/bmake/mk/meta.autodep.mk
+++ b/contrib/bmake/mk/meta.autodep.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: meta.autodep.mk,v 1.62 2024/02/17 17:26:57 sjg Exp $
+# $Id: meta.autodep.mk,v 1.63 2024/04/24 18:56:41 sjg Exp $
#
# @(#) Copyright (c) 2010, Simon J. Gerraty
@@ -308,7 +308,9 @@ CLEANFILES += *.meta filemon.* *.db
# these make it easy to gather some stats
now_utc ?= ${%s:L:localtime}
+.if !defined(start_utc)
start_utc := ${now_utc}
+.endif
meta_stats= meta=${empty(.MAKE.META.FILES):?0:${.MAKE.META.FILES:[#]}} \
created=${empty(.MAKE.META.CREATED):?0:${.MAKE.META.CREATED:[#]}}
diff --git a/contrib/bmake/mk/meta.subdir.mk b/contrib/bmake/mk/meta.subdir.mk
index e2ece24515a4..aee8a1a9a39b 100644
--- a/contrib/bmake/mk/meta.subdir.mk
+++ b/contrib/bmake/mk/meta.subdir.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: meta.subdir.mk,v 1.14 2024/02/17 17:26:57 sjg Exp $
+# $Id: meta.subdir.mk,v 1.15 2024/04/19 15:10:22 sjg Exp $
#
# @(#) Copyright (c) 2010, Simon J. Gerraty
@@ -70,7 +70,6 @@ DIRDEPS := ${DIRDEPS:S,^./,,:S,/./,/,g:${SUBDIRDEPS_FILTER:Uu}}
# dirdeps.mk will compute some interesting combinations.
.undef ALL_MACHINES
-DEP_RELDIR = ${RELDIR}
.include <dirdeps.mk>
.endif
.endif
diff --git a/contrib/bmake/mk/own.mk b/contrib/bmake/mk/own.mk
index efadd3469a8d..72b2f70d4bbe 100644
--- a/contrib/bmake/mk/own.mk
+++ b/contrib/bmake/mk/own.mk
@@ -1,4 +1,4 @@
-# $Id: own.mk,v 1.47 2024/02/19 00:06:19 sjg Exp $
+# $Id: own.mk,v 1.48 2024/04/09 21:52:52 sjg Exp $
# should be set properly in sys.mk
_this ?= ${.PARSEFILE:S,bsd.,,}
@@ -136,8 +136,7 @@ INCDIR?= ${INCLUDEDIR}
# Define MANZ to have the man pages compressed (gzip)
#MANZ= 1
-MANTARGET?= cat
-MANDIR?= ${prefix}/share/man/${MANTARGET}
+MANDIR?= ${prefix}/share/man
MANGRP?= ${BINGRP}
MANOWN?= ${BINOWN}
MANMODE?= ${NONBINMODE}
diff --git a/contrib/bmake/mk/progs.mk b/contrib/bmake/mk/progs.mk
index 815449f331b5..ada942db8621 100644
--- a/contrib/bmake/mk/progs.mk
+++ b/contrib/bmake/mk/progs.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: progs.mk,v 1.17 2024/02/17 17:26:57 sjg Exp $
+# $Id: progs.mk,v 1.18 2024/04/09 17:18:24 sjg Exp $
#
# @(#) Copyright (c) 2006, Simon J. Gerraty
#
@@ -39,16 +39,26 @@ PROG ?= $t
# just one of many
PROG_VARS += \
BINDIR \
- CFLAGS \
- COPTS \
- CPPFLAGS \
CXXFLAGS \
DPADD \
DPLIBS \
LDADD \
- LDFLAGS \
MAN \
- SRCS
+
+.ifndef SYS_OS_MK
+# assume we are not using init.mk, otherwise
+# we need to avoid overlap with its
+# QUALIFIED_VAR_LIST which includes these and its
+# VAR_QUALIFIER_LIST includes .TARGET which
+# would match PROG
+PROG_VARS += \
+ CFLAGS \
+ COPTS \
+ CPPFLAGS \
+ LDFLAGS \
+ SRCS \
+
+.endif
.for v in ${PROG_VARS:O:u}
.if defined(${v}.${PROG}) || defined(${v}_${PROG})
diff --git a/contrib/bmake/mk/subdir.mk b/contrib/bmake/mk/subdir.mk
index 4ae21065c865..0feb63af44d2 100644
--- a/contrib/bmake/mk/subdir.mk
+++ b/contrib/bmake/mk/subdir.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: subdir.mk,v 1.22 2024/02/19 00:06:19 sjg Exp $
+# $Id: subdir.mk,v 1.24 2024/04/10 01:47:23 sjg Exp $
#
# @(#) Copyright (c) 2002-2024, Simon J. Gerraty
#
@@ -37,7 +37,6 @@ __${_this}__: .NOTMAIN
_SUBDIRUSE:
.elif !commands(_SUBDIRUSE) && !defined(NO_SUBDIR) && !defined(NOSUBDIR)
.-include <local.subdir.mk>
-.-include <${.CURDIR}/Makefile.inc>
.if !target(.MAIN)
.MAIN: all
.endif
@@ -82,7 +81,7 @@ realinstall: beforeinstall _SUBDIRUSE
# the interface from others
# this may require additions to SUBDIR_TAREGTS
-_SUBDIRUSE: .USE subdir-${.TARGET}
+_SUBDIRUSE: .USE subdir-${.TARGET:C/-.*//:S/real//:S/.depend/depend/}
SUBDIR_TARGETS += \
all \
@@ -93,7 +92,6 @@ SUBDIR_TARGETS += \
depend \
lint \
obj \
- realinstall \
tags \
etags
diff --git a/contrib/bmake/mk/sys.dirdeps.mk b/contrib/bmake/mk/sys.dirdeps.mk
index 1e3363c22339..4d2dfa8416fa 100644
--- a/contrib/bmake/mk/sys.dirdeps.mk
+++ b/contrib/bmake/mk/sys.dirdeps.mk
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
#
-# $Id: sys.dirdeps.mk,v 1.14 2024/02/25 19:12:13 sjg Exp $
+# $Id: sys.dirdeps.mk,v 1.15 2024/04/18 17:18:31 sjg Exp $
#
# @(#) Copyright (c) 2012-2023, Simon J. Gerraty
#
@@ -196,11 +196,10 @@ RELSRCTOP?= ${RELTOP}
# just in case
.MAKE.DEPENDFILE ?= Makefile.depend
-.if ${.MAKE.LEVEL} > 0
-# Makefile.depend* also get read at level 1+
-# and often refer to DEP_MACHINE etc,
-# so ensure DEP_* (for TARGET_SPEC_VARS anyway) are set
-.for V in ${TARGET_SPEC_VARS}
-DEP_$V = ${$V}
+# Makefile.depend* often refer to DEP_MACHINE etc,
+# we need defaults for both first include in a leaf dir
+# and when level > 0
+# so ensure DEP_* for TARGET_SPEC_VARS and RELDIR are set
+.for V in ${TARGET_SPEC_VARS} RELDIR
+DEP_$V ?= ${$V}
.endfor
-.endif
diff --git a/contrib/bmake/mk/sys/Cygwin.mk b/contrib/bmake/mk/sys/Cygwin.mk
new file mode 100644
index 000000000000..ffc479ad9ef3
--- /dev/null
+++ b/contrib/bmake/mk/sys/Cygwin.mk
@@ -0,0 +1,21 @@
+# Minimal adjustments for Cygwin
+# SPDX-License-Identifier: BSD-2-Clause
+
+OS ?= Cygwin
+unix ?= We run ${OS}.
+
+.ifndef ROOT_GROUP
+# Cygwin maps local admin SID S-1-5-32-544 to GID 544.
+# /etc/group does no longer exist in a base installation.
+ROOT_GROUP != /usr/bin/getent group 544 2>/dev/null
+ROOT_GROUP := ${ROOT_GROUP:C,:.*$,,}
+.endif
+
+.LIBS: .a
+
+AR ?= ar
+RANLIB ?= ranlib
+TSORT ?= tsort -q
+
+# egrep is deprecated
+EGREP ?= grep -E
diff --git a/contrib/bmake/os.sh b/contrib/bmake/os.sh
index 78b2de95a679..648ea1d5993c 100755
--- a/contrib/bmake/os.sh
+++ b/contrib/bmake/os.sh
@@ -17,7 +17,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: os.sh,v 1.63 2023/05/22 20:44:47 sjg Exp $
+# $Id: os.sh,v 1.64 2024/03/19 16:03:23 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@@ -91,6 +91,10 @@ AIX) # everyone loves to be different...
PS_AXC=-e
SHARE_ARCH=$OS/$OSMAJOR.X
;;
+CYGWIN*) # uname -s not very useful
+ # uname -o produces just Cygwin which is better
+ OS=Cygwin
+ ;;
Darwin) # this is more explicit (arm64 vs arm)
HOST_ARCH=$MACHINE
;;
diff --git a/contrib/bmake/parse.c b/contrib/bmake/parse.c
index d6d1c9ba9874..70c6d6fe5157 100644
--- a/contrib/bmake/parse.c
+++ b/contrib/bmake/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.717 2024/02/07 06:43:02 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.723 2024/05/19 20:09:40 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.717 2024/02/07 06:43:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.723 2024/05/19 20:09:40 sjg Exp $");
/* Detects a multiple-inclusion guard in a makefile. */
typedef enum {
@@ -537,6 +537,7 @@ ParseVErrorInternal(FILE *f, bool useVars, const GNode *gn,
(void)fprintf(f, "%s: ", progname);
PrintLocation(f, useVars, gn);
+ fprintf(f, "%s", EvalStack_Details());
if (level == PARSE_WARNING)
(void)fprintf(f, "warning: ");
(void)vfprintf(f, fmt, ap);
@@ -1268,7 +1269,7 @@ IncludeFile(const char *file, bool isSystem, bool depinc, bool silent)
if (fullname == NULL) {
SearchPath *path = Lst_IsEmpty(&sysIncPath->dirs)
? defSysIncPath : sysIncPath;
- fullname = Dir_FindFile(file, path);
+ fullname = Dir_FindInclude(file, path);
}
if (fullname == NULL) {
@@ -1637,10 +1638,10 @@ ParseDependencySources(char *p, GNodeType targetAttr,
* Transformation rules such as '.c.o' are also handled here, see
* Suff_AddTransform.
*
- * Upon return, the value of the line is unspecified.
+ * Upon return, the value of expandedLine is unspecified.
*/
static void
-ParseDependency(char *line, const char *unexpanded_line)
+ParseDependency(char *expandedLine, const char *unexpandedLine)
{
char *p;
SearchPathList *paths; /* search paths to alter when parsing a list
@@ -1651,14 +1652,14 @@ ParseDependency(char *line, const char *unexpanded_line)
* vice versa */
GNodeType op;
- DEBUG1(PARSE, "ParseDependency(%s)\n", line);
- p = line;
+ DEBUG1(PARSE, "ParseDependency(%s)\n", expandedLine);
+ p = expandedLine;
paths = NULL;
targetAttr = OP_NONE;
special = SP_NOT;
- if (!ParseDependencyTargets(&p, line, &special, &targetAttr, &paths,
- unexpanded_line))
+ if (!ParseDependencyTargets(&p, expandedLine, &special, &targetAttr,
+ &paths, unexpandedLine))
goto out;
if (!Lst_IsEmpty(targets))
@@ -1666,7 +1667,7 @@ ParseDependency(char *line, const char *unexpanded_line)
op = ParseDependencyOp(&p);
if (op == OP_NONE) {
- InvalidLineType(line, unexpanded_line);
+ InvalidLineType(expandedLine, unexpandedLine);
goto out;
}
ApplyDependencyOperator(op);
@@ -2384,7 +2385,7 @@ ParseRawLine(IncludedFile *curFile, char **out_line, char **out_line_end,
ch = *p;
if (ch == '\0' || (ch == '\\' && p[1] == '\0')) {
Parse_Error(PARSE_FATAL, "Zero byte read from file");
- return PRLR_ERROR;
+ exit(2);
}
/* Treat next character after '\' as literal. */
@@ -2623,6 +2624,7 @@ ReadHighLevelLine(void)
if (line == NULL)
return NULL;
+ DEBUG2(PARSE, "Parsing line %u: %s\n", curFile->lineno, line);
if (curFile->guardState != GS_NO
&& ((curFile->guardState == GS_START && line[0] != '.')
|| curFile->guardState == GS_DONE))
@@ -2945,8 +2947,6 @@ Parse_File(const char *name, int fd)
do {
while ((line = ReadHighLevelLine()) != NULL) {
- DEBUG2(PARSE, "Parsing line %u: %s\n",
- CurFile()->lineno, line);
ParseLine(line);
}
} while (ParseEOF());
@@ -2982,7 +2982,7 @@ Parse_End(void)
#ifdef CLEANUP
HashIter hi;
- Lst_DoneCall(&targCmds, free);
+ Lst_DoneFree(&targCmds);
assert(targets == NULL);
SearchPath_Free(defSysIncPath);
SearchPath_Free(sysIncPath);
diff --git a/contrib/bmake/str.c b/contrib/bmake/str.c
index 1349831af2f1..1153d0f029fc 100644
--- a/contrib/bmake/str.c
+++ b/contrib/bmake/str.c
@@ -1,4 +1,4 @@
-/* $NetBSD: str.c,v 1.102 2024/01/05 23:22:06 rillig Exp $ */
+/* $NetBSD: str.c,v 1.103 2024/04/14 15:21:20 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -71,7 +71,7 @@
#include "make.h"
/* "@(#)str.c 5.8 (Berkeley) 6/1/90" */
-MAKE_RCSID("$NetBSD: str.c,v 1.102 2024/01/05 23:22:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: str.c,v 1.103 2024/04/14 15:21:20 rillig Exp $");
static HashTable interned_strings;
@@ -297,26 +297,6 @@ Str_Words(const char *str, bool expand)
}
/*
- * XXX: In the extreme edge case that one of the characters is from the basic
- * execution character set and the other isn't, the result of the comparison
- * differs depending on whether plain char is signed or unsigned.
- *
- * An example is the character range from \xE4 to 'a', where \xE4 may come
- * from U+00E4 'Latin small letter A with diaeresis'.
- *
- * If char is signed, \xE4 evaluates to -28, the first half of the condition
- * becomes -28 <= '0' && '0' <= 'a', which evaluates to true.
- *
- * If char is unsigned, \xE4 evaluates to 228, the second half of the
- * condition becomes 'a' <= '0' && '0' <= 228, which evaluates to false.
- */
-static bool
-in_range(char e1, char c, char e2)
-{
- return (e1 <= c && c <= e2) || (e2 <= c && c <= e1);
-}
-
-/*
* Test if a string matches a pattern like "*.[ch]". The pattern matching
* characters are '*', '?' and '[]', as in fnmatch(3).
*
@@ -360,7 +340,11 @@ match_fixed_length:
return res;
}
if (pat[1] == '-') {
- if (in_range(pat[0], *str, pat[2]))
+ unsigned char e1 = (unsigned char)pat[0];
+ unsigned char c = (unsigned char)*str;
+ unsigned char e2 = (unsigned char)pat[2];
+ if ((e1 <= c && c <= e2)
+ || (e2 <= c && c <= e1))
goto end_of_char_list;
pat += 2;
}
diff --git a/contrib/bmake/targ.c b/contrib/bmake/targ.c
index 14c7faba1f2b..35745cd21fe0 100644
--- a/contrib/bmake/targ.c
+++ b/contrib/bmake/targ.c
@@ -1,4 +1,4 @@
-/* $NetBSD: targ.c,v 1.180 2024/03/10 02:53:37 sjg Exp $ */
+/* $NetBSD: targ.c,v 1.181 2024/04/27 17:33:47 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
#include "dir.h"
/* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: targ.c,v 1.180 2024/03/10 02:53:37 sjg Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.181 2024/04/27 17:33:47 rillig Exp $");
/*
* All target nodes that appeared on the left-hand side of one of the
@@ -119,7 +119,7 @@ static HashTable allTargetsByName;
#ifdef CLEANUP
static GNodeList allNodes = LST_INIT;
-static void GNode_Free(void *);
+static void GNode_Free(GNode *);
#endif
void
@@ -131,11 +131,16 @@ Targ_Init(void)
void
Targ_End(void)
{
+#ifdef CLEANUP
+ GNodeListNode *ln;
+#endif
Targ_Stats();
#ifdef CLEANUP
Lst_Done(&allTargets);
HashTable_Done(&allTargetsByName);
- Lst_DoneCall(&allNodes, GNode_Free);
+ for (ln = allNodes.first; ln != NULL; ln = ln->next)
+ GNode_Free(ln->datum);
+ Lst_Done(&allNodes);
#endif
}
@@ -212,10 +217,8 @@ GNode_New(const char *name)
#ifdef CLEANUP
static void
-GNode_Free(void *gnp)
+GNode_Free(GNode *gn)
{
- GNode *gn = gnp;
-
free(gn->name);
free(gn->uname);
free(gn->path);
diff --git a/contrib/bmake/unit-tests/Makefile b/contrib/bmake/unit-tests/Makefile
index 6c41bf811dcf..5960a0621ddd 100644
--- a/contrib/bmake/unit-tests/Makefile
+++ b/contrib/bmake/unit-tests/Makefile
@@ -1,6 +1,6 @@
-# $Id: Makefile,v 1.211 2024/03/10 17:46:44 sjg Exp $
+# $Id: Makefile,v 1.216 2024/04/30 16:42:50 sjg Exp $
#
-# $NetBSD: Makefile,v 1.342 2024/01/07 02:07:44 sjg Exp $
+# $NetBSD: Makefile,v 1.344 2024/04/30 16:41:32 sjg Exp $
#
# Unit tests for make(1)
#
@@ -474,20 +474,11 @@ BROKEN_TESTS+= sh-flags
BROKEN_TESTS+= varmod-localtime
.endif
-.if ${.MAKE.OS:NCYGWIN*} == ""
-BROKEN_TESTS+= \
- export \
- opt-chdir \
- opt-keep-going-indirect \
-
-.endif
-
-
.if ${.MAKE.OS:NDarwin} == ""
BROKEN_TESTS+= shell-ksh
.endif
-.if ${.MAKE.OS:MIRIX*} != ""
+.if ${.MAKE.OS:NIRIX*} == ""
BROKEN_TESTS+= \
cmd-interrupt \
deptgt-interrupt \
@@ -573,6 +564,9 @@ SED_CMDS.directive-include-guard= \
-e '/^ParseDependency/d' \
-e '/^ParseEOF:/d'
SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d'
+.if ${.MAKE.OS:NCygwin} == ""
+SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d'
+.endif
SED_CMDS.export-all= ${SED_CMDS.export}
SED_CMDS.export-env= ${SED_CMDS.export}
SED_CMDS.cmdline= -e 's,uid${.MAKE.UID}/,,'
@@ -625,7 +619,7 @@ SED_CMDS.var-op-shell+= ${STD_SED_CMDS.shell}
SED_CMDS.var-op-shell+= -e '/command/s,No such.*,not found,'
SED_CMDS.var-op-shell+= ${STD_SED_CMDS.white-space}
SED_CMDS.vardebug+= -e 's,${.SHELL},</path/to/shell>,'
-SED_CMDS.varmod-mtime+= -e "s,': .*,': <ENOENT>,"
+SED_CMDS.varmod-mtime+= -e "s,\(.*\)': .*,\1': <ENOENT>,"
SED_CMDS.varmod-subst-regex+= ${STD_SED_CMDS.regex}
SED_CMDS.varparse-errors+= ${STD_SED_CMDS.timestamp}
SED_CMDS.varname-dot-make-meta-ignore_filter+= ${SED_CMDS.meta-ignore}
@@ -655,8 +649,9 @@ unexport-env.rawout: export.mk
# In tests that use the debugging option -dd, ignore debugging output that is
# only logged in -DCLEANUP mode.
-STD_SED_CMDS.dd= -e '/^OpenDirs_Done:/d'
-STD_SED_CMDS.dd+= -e '/^CachedDir /d'
+STD_SED_CMDS.dd= -e '/^OpenDirs_Done:/d'
+STD_SED_CMDS.dd+= -e '/^CachedDir /d'
+STD_SED_CMDS.dd+= -e 's, ${DEFSYSPATH:U/usr/share/mk} , <defsyspath> ,'
# Omit details such as process IDs from the output of the -dg1 option.
STD_SED_CMDS.dg1= -e '/\#.* \.$$/d'
@@ -762,12 +757,10 @@ TOOL_TR?= tr
TOOL_DIFF?= diff
DIFF_FLAGS?= -u
-.if defined(.PARSEDIR)
# ensure consistent results from sort(1)
LC_ALL= C
LANG= C
.export LANG LC_ALL
-.endif
.if ${.MAKE.MODE:Unormal:Mmeta} != ""
# we don't need the noise
diff --git a/contrib/bmake/unit-tests/archive.exp b/contrib/bmake/unit-tests/archive.exp
index 645add4f5899..5cf847388544 100644
--- a/contrib/bmake/unit-tests/archive.exp
+++ b/contrib/bmake/unit-tests/archive.exp
@@ -25,4 +25,12 @@ depend-on-existing-member
Making remove-archive
rm -f libprog.a
+begin library
+Examining libbad.a...up-to-date.
+Examining -lbad...up-to-date.
+Examining libgood.a...library...up-to-date.
+Examining -lgood...library...up-to-date.
+Examining library...nonexistent....PHONY node...out-of-date.
+Examining .END...nonexistent...nonexistent and no sources...out-of-date.
+end library
exit status 0
diff --git a/contrib/bmake/unit-tests/archive.mk b/contrib/bmake/unit-tests/archive.mk
index 2cd43a99e9ad..eef64396f419 100644
--- a/contrib/bmake/unit-tests/archive.mk
+++ b/contrib/bmake/unit-tests/archive.mk
@@ -1,4 +1,4 @@
-# $NetBSD: archive.mk,v 1.12 2021/04/09 14:42:00 christos Exp $
+# $NetBSD: archive.mk,v 1.13 2024/04/27 20:23:22 rillig Exp $
#
# Very basic demonstration of handling archives, based on the description
# in PSD.doc/tutorial.ms.
@@ -24,6 +24,12 @@ all:
@${MAKE} -f ${MAKEFILE} depend-on-existing-member
@${MAKE} -f ${MAKEFILE} depend-on-nonexistent-member
@${MAKE} -f ${MAKEFILE} remove-archive
+ @${MAKE} -f ${MAKEFILE} set-up-library
+ @${MAKE} -f ${MAKEFILE} -dm library 2>&1 \
+ | sed -n '/^Examining/p' \
+ | sed 's,\.\.\.modified[^.]*,,'
+ @${MAKE} -f ${MAKEFILE} tear-down-library
+
create-archive: ${ARCHIVE} pre post
@@ -58,3 +64,28 @@ pre: .USEBEFORE
@echo Making ${.TARGET} ${.OODATE:C,.+,out-of-date,W} ${.OODATE:O}
post: .USE
@echo
+
+
+set-up-library: .PHONY
+ @echo "member" > member.txt
+ @echo "not a library" > libbad.a
+ @ar cr libgood.a member.txt
+ @echo "begin library"
+
+.if make(library)
+.SUFFIXES: .a
+.LIBS: .a
+.endif
+# The two lines for libgood contain the word "library", the two lines for
+# libbad don't.
+#
+# expect: Examining libbad.a...up-to-date.
+# expect: Examining -lbad...up-to-date.
+# expect: Examining libgood.a...library...up-to-date.
+# expect: Examining -lgood...library...up-to-date.
+library: .PHONY libbad.a -lbad libgood.a -lgood
+ : Making ${.TARGET} from ${.ALLSRC}
+
+tear-down-library: .PHONY
+ @echo "end library"
+ @rm member.txt libbad.a libgood.a
diff --git a/contrib/bmake/unit-tests/cmd-errors-jobs.exp b/contrib/bmake/unit-tests/cmd-errors-jobs.exp
index d0a6e51eb84d..c8e483a9609b 100644
--- a/contrib/bmake/unit-tests/cmd-errors-jobs.exp
+++ b/contrib/bmake/unit-tests/cmd-errors-jobs.exp
@@ -1,9 +1,9 @@
: undefined--eol
-make: Unclosed variable "UNCLOSED"
-: unclosed-variable-
+make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
+: unclosed-expression-
make: Unclosed expression, expecting '}' for "UNCLOSED"
: unclosed-modifier-
-make: Unknown modifier "Z"
+make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z"
: unknown-modifier--eol
: end-eol
exit status 0
diff --git a/contrib/bmake/unit-tests/cmd-errors-jobs.mk b/contrib/bmake/unit-tests/cmd-errors-jobs.mk
index b3dc982de35f..7a82c0b416e8 100644
--- a/contrib/bmake/unit-tests/cmd-errors-jobs.mk
+++ b/contrib/bmake/unit-tests/cmd-errors-jobs.mk
@@ -1,32 +1,39 @@
-# $NetBSD: cmd-errors-jobs.mk,v 1.2 2022/09/25 12:51:37 rillig Exp $
+# $NetBSD: cmd-errors-jobs.mk,v 1.4 2024/04/23 22:51:28 rillig Exp $
#
-# Demonstrate how errors in variable expansions affect whether the commands
+# Demonstrate how errors in expressions affect whether the commands
# are actually executed in jobs mode.
.MAKEFLAGS: -j1
-all: undefined unclosed-variable unclosed-modifier unknown-modifier end
+all: undefined unclosed-expression unclosed-modifier unknown-modifier end
-# Undefined variables are not an error. They expand to empty strings.
+# Undefined variables in expressions are not an error. They expand to empty
+# strings.
+# expect: : undefined--eol
undefined:
: $@-${UNDEFINED}-eol
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
-unclosed-variable:
+# XXX: This command is executed even though it contains parse errors.
+# expect: make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
+# expect: : unclosed-expression-
+unclosed-expression:
: $@-${UNCLOSED
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
+# XXX: This command is executed even though it contains parse errors.
+# expect: make: Unclosed expression, expecting '}' for "UNCLOSED"
+# expect: : unclosed-modifier-
unclosed-modifier:
: $@-${UNCLOSED:
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
+# XXX: This command is executed even though it contains parse errors.
+# expect: make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z"
+# expect: : unknown-modifier--eol
unknown-modifier:
: $@-${UNKNOWN:Z}-eol
+# expect: : end-eol
end:
: $@-eol
-# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.
+# XXX: Despite the parse errors, the exit status is 0.
+# expect: exit status 0
diff --git a/contrib/bmake/unit-tests/cmd-errors-lint.exp b/contrib/bmake/unit-tests/cmd-errors-lint.exp
index bdf4ae1a17e8..d489c6be57c9 100644
--- a/contrib/bmake/unit-tests/cmd-errors-lint.exp
+++ b/contrib/bmake/unit-tests/cmd-errors-lint.exp
@@ -1,9 +1,9 @@
: undefined
-make: Unclosed variable "UNCLOSED"
-: unclosed-variable
+make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
+: unclosed-expression
make: Unclosed expression, expecting '}' for "UNCLOSED"
: unclosed-modifier
-make: Unknown modifier "Z"
+make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z"
: unknown-modifier
: end
exit status 2
diff --git a/contrib/bmake/unit-tests/cmd-errors-lint.mk b/contrib/bmake/unit-tests/cmd-errors-lint.mk
index 371e12af0f4f..2e7d537f5f1f 100644
--- a/contrib/bmake/unit-tests/cmd-errors-lint.mk
+++ b/contrib/bmake/unit-tests/cmd-errors-lint.mk
@@ -1,20 +1,21 @@
-# $NetBSD: cmd-errors-lint.mk,v 1.1 2020/11/02 20:43:27 rillig Exp $
+# $NetBSD: cmd-errors-lint.mk,v 1.2 2024/04/23 22:51:28 rillig Exp $
#
-# Demonstrate how errors in variable expansions affect whether the commands
+# Demonstrate how errors in expressions affect whether the commands
# are actually executed.
.MAKEFLAGS: -dL
-all: undefined unclosed-variable unclosed-modifier unknown-modifier end
+all: undefined unclosed-expression unclosed-modifier unknown-modifier end
-# Undefined variables are not an error. They expand to empty strings.
+# Undefined variables in expressions are not an error. They expand to empty
+# strings.
undefined:
: $@ ${UNDEFINED}
# XXX: As of 2020-11-01, this obvious syntax error is not detected.
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
-unclosed-variable:
+unclosed-expression:
: $@ ${UNCLOSED
# XXX: As of 2020-11-01, this obvious syntax error is not detected.
diff --git a/contrib/bmake/unit-tests/cmd-errors.exp b/contrib/bmake/unit-tests/cmd-errors.exp
index d0a6e51eb84d..c8e483a9609b 100644
--- a/contrib/bmake/unit-tests/cmd-errors.exp
+++ b/contrib/bmake/unit-tests/cmd-errors.exp
@@ -1,9 +1,9 @@
: undefined--eol
-make: Unclosed variable "UNCLOSED"
-: unclosed-variable-
+make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
+: unclosed-expression-
make: Unclosed expression, expecting '}' for "UNCLOSED"
: unclosed-modifier-
-make: Unknown modifier "Z"
+make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z"
: unknown-modifier--eol
: end-eol
exit status 0
diff --git a/contrib/bmake/unit-tests/cmd-errors.mk b/contrib/bmake/unit-tests/cmd-errors.mk
index 6d3880684bcf..d1125d444fcd 100644
--- a/contrib/bmake/unit-tests/cmd-errors.mk
+++ b/contrib/bmake/unit-tests/cmd-errors.mk
@@ -1,17 +1,18 @@
-# $NetBSD: cmd-errors.mk,v 1.5 2022/09/25 12:51:37 rillig Exp $
+# $NetBSD: cmd-errors.mk,v 1.6 2024/04/23 22:51:28 rillig Exp $
#
-# Demonstrate how errors in variable expansions affect whether the commands
+# Demonstrate how errors in expressions affect whether the commands
# are actually executed in compat mode.
-all: undefined unclosed-variable unclosed-modifier unknown-modifier end
+all: undefined unclosed-expression unclosed-modifier unknown-modifier end
-# Undefined variables are not an error. They expand to empty strings.
+# Undefined variables in expressions are not an error. They expand to empty
+# strings.
undefined:
: $@-${UNDEFINED}-eol
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
-unclosed-variable:
+unclosed-expression:
: $@-${UNCLOSED
# XXX: As of 2020-11-01, this command is executed even though it contains
diff --git a/contrib/bmake/unit-tests/cmdline-undefined.mk b/contrib/bmake/unit-tests/cmdline-undefined.mk
index 81b44518dd41..e7c0400ad1e1 100644
--- a/contrib/bmake/unit-tests/cmdline-undefined.mk
+++ b/contrib/bmake/unit-tests/cmdline-undefined.mk
@@ -1,6 +1,6 @@
-# $NetBSD: cmdline-undefined.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: cmdline-undefined.mk,v 1.5 2024/04/23 22:51:28 rillig Exp $
#
-# Tests for undefined expressions in the command line.
+# Tests for undefined variables in expressions in the command line.
all:
# When the command line is parsed, variable assignments using the
diff --git a/contrib/bmake/unit-tests/cmdline.mk b/contrib/bmake/unit-tests/cmdline.mk
index a24d46208e52..40a0d7ccddbb 100644
--- a/contrib/bmake/unit-tests/cmdline.mk
+++ b/contrib/bmake/unit-tests/cmdline.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cmdline.mk,v 1.4 2022/06/10 18:58:07 rillig Exp $
+# $NetBSD: cmdline.mk,v 1.5 2024/04/23 22:51:28 rillig Exp $
#
# Tests for command line parsing and related special variables.
@@ -24,7 +24,7 @@ makeobjdir-direct:
@${MAKE_CMD} MAKEOBJDIR=${DIR2} show-objdir
# The .OBJDIR can be set via the MAKEOBJDIR command line variable,
-# and that variable could even contain the usual modifiers.
+# and expressions based on that variable can contain the usual modifiers.
# Since the .OBJDIR=MAKEOBJDIR assignment happens very early,
# the SUB2 variable in the modifier is not defined yet and is therefore empty.
# The SUB1 in the resulting path comes from the environment variable TMPBASE,
diff --git a/contrib/bmake/unit-tests/comment.mk b/contrib/bmake/unit-tests/comment.mk
index a3bf781b9a67..fea0f0b3d817 100644
--- a/contrib/bmake/unit-tests/comment.mk
+++ b/contrib/bmake/unit-tests/comment.mk
@@ -1,4 +1,4 @@
-# $NetBSD: comment.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: comment.mk,v 1.7 2024/04/23 22:51:28 rillig Exp $
#
# Demonstrate how comments are written in makefiles.
@@ -53,9 +53,9 @@ VAR= \# # Both in the assignment.
. error
.endif
-# Since 2012-03-24 the variable modifier :[#] does not need to be escaped.
-# To keep the parsing code simple, any "[#" does not start a comment, even
-# outside of an expression.
+# Since 2012-03-24 the modifier :[#] does not need to be escaped.
+# To keep the parsing code simple, the "#" in "[#" does not start a comment,
+# regardless of the syntactical context it appears in.
WORDS= ${VAR:[#]} [#
.if ${WORDS} != "1 [#"
. error
diff --git a/contrib/bmake/unit-tests/cond-cmp-string.mk b/contrib/bmake/unit-tests/cond-cmp-string.mk
index 7b13ebf2212b..e3346e08b5a0 100644
--- a/contrib/bmake/unit-tests/cond-cmp-string.mk
+++ b/contrib/bmake/unit-tests/cond-cmp-string.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-string.mk,v 1.18 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: cond-cmp-string.mk,v 1.19 2024/04/23 22:51:28 rillig Exp $
#
# Tests for string comparisons in .if conditions.
@@ -20,12 +20,12 @@
. error
.endif
-# The left-hand side of the comparison requires that any expression
-# is defined.
+# An expression that occurs on the left-hand side of the comparison must be
+# defined.
#
# The variable named "" is never defined, nevertheless it can be used as a
-# starting point for expressions. Applying the :U modifier to such
-# an undefined expression turns it into a defined expression.
+# starting point for an expression. Applying the :U modifier to such an
+# undefined expression turns it into a defined expression.
#
# See ApplyModifier_Defined and DEF_DEFINED.
.if ${:Ustr} != "str"
@@ -69,8 +69,9 @@
.endif
# Between 2003-01-01 (maybe even earlier) and 2020-10-30, adding one of the
-# characters " \t!=><" directly after an expression resulted in a
-# "Malformed conditional", even though the string was well-formed.
+# characters " \t!=><" directly after an expression in a string literal
+# resulted in a "Malformed conditional", even though the string was
+# well-formed.
.if ${:Uword } != "${:Uword} "
. error
.endif
@@ -94,8 +95,7 @@
. error
.endif
-# Adding a space at the beginning of the quoted expression works
-# though.
+# Adding a space at the beginning of the quoted expression works though.
.if ${:U word } != " ${:Uword} "
. error
.endif
@@ -145,7 +145,7 @@
. error
.endif
-# Two variables with different values compare unequal.
+# Two expressions with different values compare unequal.
VAR1= value1
VAR2= value2
.if ${VAR1} != ${VAR2}
diff --git a/contrib/bmake/unit-tests/cond-func-defined.exp b/contrib/bmake/unit-tests/cond-func-defined.exp
index d556f3b982b3..1d4243f9eddd 100644
--- a/contrib/bmake/unit-tests/cond-func-defined.exp
+++ b/contrib/bmake/unit-tests/cond-func-defined.exp
@@ -1,8 +1,5 @@
make: "cond-func-defined.mk" line 24: Missing closing parenthesis for defined()
make: "cond-func-defined.mk" line 34: Missing closing parenthesis for defined()
-make: "cond-func-defined.mk" line 47: In .for loops, expressions for the loop variables are
-make: "cond-func-defined.mk" line 49: substituted at evaluation time. There is no actual variable
-make: "cond-func-defined.mk" line 51: involved, even if it feels like it.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff --git a/contrib/bmake/unit-tests/cond-func-defined.mk b/contrib/bmake/unit-tests/cond-func-defined.mk
index 14597398bc62..6b24182c11c1 100644
--- a/contrib/bmake/unit-tests/cond-func-defined.mk
+++ b/contrib/bmake/unit-tests/cond-func-defined.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cond-func-defined.mk,v 1.11 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: cond-func-defined.mk,v 1.12 2024/04/23 22:51:28 rillig Exp $
#
# Tests for the defined() function in .if conditions.
@@ -43,12 +43,9 @@ ${:UA B}= variable name with spaces
. if defined(var)
. error
. else
-# expect+1: In .for loops, expressions for the loop variables are
-. info In .for loops, expressions for the loop variables are
-# expect+1: substituted at evaluation time. There is no actual variable
-. info substituted at evaluation time. There is no actual variable
-# expect+1: involved, even if it feels like it.
-. info involved, even if it feels like it.
+# In .for loops, expressions based on the loop variables are substituted at
+# evaluation time. There is no actual variable involved, even if the code in
+# the makefiles looks like it.
. endif
.endfor
diff --git a/contrib/bmake/unit-tests/cond-token-string.exp b/contrib/bmake/unit-tests/cond-token-string.exp
index db07adcb2d09..4fbafc5e1986 100644
--- a/contrib/bmake/unit-tests/cond-token-string.exp
+++ b/contrib/bmake/unit-tests/cond-token-string.exp
@@ -1,4 +1,4 @@
-make: "cond-token-string.mk" line 15: Unknown modifier "Z"
+make: "cond-token-string.mk" line 15: while evaluating "${:Uvalue:Z}"": Unknown modifier "Z"
make: "cond-token-string.mk" line 15: Malformed conditional ("" != "${:Uvalue:Z}")
make: "cond-token-string.mk" line 25: xvalue is not defined.
make: "cond-token-string.mk" line 32: Malformed conditional (x${:Uvalue} == "")
diff --git a/contrib/bmake/unit-tests/cond-token-string.mk b/contrib/bmake/unit-tests/cond-token-string.mk
index d13c68da134a..edc9936b7d53 100644
--- a/contrib/bmake/unit-tests/cond-token-string.mk
+++ b/contrib/bmake/unit-tests/cond-token-string.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cond-token-string.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: cond-token-string.mk,v 1.10 2024/04/20 10:18:55 rillig Exp $
#
# Tests for quoted string literals in .if conditions.
#
@@ -11,7 +11,7 @@
# Cover the code in CondParser_String that frees the memory after parsing
# an expression based on an undefined variable.
# expect+2: Malformed conditional ("" != "${:Uvalue:Z}")
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:Uvalue:Z}"": Unknown modifier "Z"
.if "" != "${:Uvalue:Z}"
. error
.else
diff --git a/contrib/bmake/unit-tests/depsrc-end.mk b/contrib/bmake/unit-tests/depsrc-end.mk
index eb7543d5dfad..1bfe50d98620 100644
--- a/contrib/bmake/unit-tests/depsrc-end.mk
+++ b/contrib/bmake/unit-tests/depsrc-end.mk
@@ -1,6 +1,6 @@
-# $NetBSD: depsrc-end.mk,v 1.1 2020/10/23 19:23:01 rillig Exp $
+# $NetBSD: depsrc-end.mk,v 1.2 2024/04/27 20:41:32 rillig Exp $
#
-# Demonstrate the edge case that .BEGIN depends on .END, which sounds a bit
+# Demonstrate an edge case in which .BEGIN depends on .END, which sounds a bit
# paradox but works since these special nodes are not in the dependency
# hierarchy where the cycles are detected.
diff --git a/contrib/bmake/unit-tests/depsrc-nopath.exp b/contrib/bmake/unit-tests/depsrc-nopath.exp
index 39a9383953dd..01295d8df7f5 100644
--- a/contrib/bmake/unit-tests/depsrc-nopath.exp
+++ b/contrib/bmake/unit-tests/depsrc-nopath.exp
@@ -1 +1,3 @@
+: Making test-regular from depsrc-nopath.dir/regular.file
+: Making test-nopath from nopath.file
exit status 0
diff --git a/contrib/bmake/unit-tests/depsrc-nopath.mk b/contrib/bmake/unit-tests/depsrc-nopath.mk
index 052c6f10db66..8d9ce93c16b9 100644
--- a/contrib/bmake/unit-tests/depsrc-nopath.mk
+++ b/contrib/bmake/unit-tests/depsrc-nopath.mk
@@ -1,8 +1,27 @@
-# $NetBSD: depsrc-nopath.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: depsrc-nopath.mk,v 1.3 2024/04/27 20:41:32 rillig Exp $
#
# Tests for the special source .NOPATH in dependency declarations.
-# TODO: Implementation
+.if !target(test-*)
+_!= rm -rf depsrc-nopath.dir
+_!= mkdir depsrc-nopath.dir
+_!= touch depsrc-nopath.dir/regular.file
+_!= touch depsrc-nopath.dir/nopath.file
+.endif
all:
- @:;
+ @${MAKE} -f ${MAKEFILE} test-regular
+ @${MAKE} -f ${MAKEFILE} test-nopath || echo "should have failed"
+ @rm -rf depsrc-nopath.dir
+
+.PATH: depsrc-nopath.dir
+
+test-regular: regular.file
+ : Making ${.TARGET} from ${.ALLSRC}
+test-nopath: nopath.file
+ : Making ${.TARGET} from ${.ALLSRC}
+
+nopath.file: .NOPATH
+
+# expect: : Making test-regular from depsrc-nopath.dir/regular.file
+# expect: : Making test-nopath from nopath.file
diff --git a/contrib/bmake/unit-tests/depsrc-phony.mk b/contrib/bmake/unit-tests/depsrc-phony.mk
index c41efac369a8..9df1eb570ab4 100644
--- a/contrib/bmake/unit-tests/depsrc-phony.mk
+++ b/contrib/bmake/unit-tests/depsrc-phony.mk
@@ -1,9 +1,10 @@
-# $NetBSD: depsrc-phony.mk,v 1.3 2020/09/05 15:57:12 rillig Exp $
+# $NetBSD: depsrc-phony.mk,v 1.4 2024/04/27 20:41:32 rillig Exp $
#
# Tests for the special source .PHONY in dependency declarations,
# which executes the commands for the target even if a file of the same
# name exists and would be considered up to date.
# Without the .PHONY, this target would be "up to date".
+# expect: : depsrc-phony.mk is made.
${MAKEFILE}: .PHONY
: ${.TARGET:T} is made.
diff --git a/contrib/bmake/unit-tests/deptgt.exp b/contrib/bmake/unit-tests/deptgt.exp
index 00d312685de9..90213fe44fb5 100644
--- a/contrib/bmake/unit-tests/deptgt.exp
+++ b/contrib/bmake/unit-tests/deptgt.exp
@@ -8,7 +8,7 @@ ParseDependency(: empty-source)
Parsing line 39: : command for empty targets list
Parsing line 40: .MAKEFLAGS: -d0
ParseDependency(.MAKEFLAGS: -d0)
-make: "deptgt.mk" line 49: Unknown modifier "Z"
+make: "deptgt.mk" line 49: while evaluating "${:U:Z}:": Unknown modifier "Z"
make: "deptgt.mk" line 52: warning: Extra target 'ordinary' ignored
make: "deptgt.mk" line 55: warning: Extra target (ordinary) ignored
make: "deptgt.mk" line 58: warning: Special and mundane targets don't mix. Mundane ones ignored
diff --git a/contrib/bmake/unit-tests/deptgt.mk b/contrib/bmake/unit-tests/deptgt.mk
index 30b8399191bd..eb948918abb7 100644
--- a/contrib/bmake/unit-tests/deptgt.mk
+++ b/contrib/bmake/unit-tests/deptgt.mk
@@ -1,4 +1,4 @@
-# $NetBSD: deptgt.mk,v 1.16 2023/12/17 09:44:00 rillig Exp $
+# $NetBSD: deptgt.mk,v 1.17 2024/04/20 10:18:55 rillig Exp $
#
# Tests for special targets like .BEGIN or .SUFFIXES in dependency
# declarations.
@@ -45,7 +45,7 @@ ${:U}: empty-source
# expansion would be to use the variable modifier '::=' to modify the
# targets. This in turn would be such an extreme and unreliable edge case
# that nobody uses it.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:U:Z}:": Unknown modifier "Z"
$$$$$$$${:U:Z}:
# expect+1: warning: Extra target 'ordinary' ignored
diff --git a/contrib/bmake/unit-tests/directive-export-impl.exp b/contrib/bmake/unit-tests/directive-export-impl.exp
index fada441f5e92..7daf1f45b0cb 100644
--- a/contrib/bmake/unit-tests/directive-export-impl.exp
+++ b/contrib/bmake/unit-tests/directive-export-impl.exp
@@ -10,6 +10,7 @@ Pattern for ':N' is "*"
ModifyWords: split "<>" into 1 word
Result of ${UT_VAR:N*} is ""
ParseDependency(: )
+Parsing line 42: .if ${:!echo "\$UT_VAR"!} != "<>"
CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>"
Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined)
Evaluating modifier ${:!...} on value "" (eval-defined, undefined)
@@ -34,6 +35,7 @@ Result of ${UT_VAR:N*} is ""
ParseDependency(: )
Parsing line 54: REF= defined
Global: REF = defined
+Parsing line 58: .if ${:!echo "\$UT_VAR"!} != "<defined>"
CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<defined>"
Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" (eval-defined)
Evaluating modifier ${:!...} on value "" (eval-defined, undefined)
diff --git a/contrib/bmake/unit-tests/directive-for-errors.exp b/contrib/bmake/unit-tests/directive-for-errors.exp
index 115a6af5b069..9c1aa5c0b1ed 100644
--- a/contrib/bmake/unit-tests/directive-for-errors.exp
+++ b/contrib/bmake/unit-tests/directive-for-errors.exp
@@ -8,7 +8,7 @@ make: "directive-for-errors.mk" line 44: invalid character '$' in .for loop vari
make: "directive-for-errors.mk" line 52: no iteration variables in for
make: "directive-for-errors.mk" line 64: Wrong number of words (5) in .for substitution list with 3 variables
make: "directive-for-errors.mk" line 78: missing `in' in for
-make: "directive-for-errors.mk" line 89: Unknown modifier "Z"
+make: "directive-for-errors.mk" line 89: while evaluating "${:U3:Z} 4": Unknown modifier "Z"
make: "directive-for-errors.mk" line 90: warning: Should not be reached.
make: "directive-for-errors.mk" line 90: warning: Should not be reached.
make: "directive-for-errors.mk" line 90: warning: Should not be reached.
diff --git a/contrib/bmake/unit-tests/directive-for-errors.mk b/contrib/bmake/unit-tests/directive-for-errors.mk
index 94362847cdfd..1bd4f31d383a 100644
--- a/contrib/bmake/unit-tests/directive-for-errors.mk
+++ b/contrib/bmake/unit-tests/directive-for-errors.mk
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for-errors.mk,v 1.9 2023/12/19 19:33:40 rillig Exp $
+# $NetBSD: directive-for-errors.mk,v 1.10 2024/04/20 10:18:55 rillig Exp $
#
# Tests for error handling in .for loops.
@@ -85,7 +85,7 @@ ${:U\\}= backslash # see whether the "variable" '\' is local
#
# XXX: As of 2020-12-31, Var_Subst doesn't report any errors, therefore
# the loop body is expanded as if no error had happened.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:U3:Z} 4": Unknown modifier "Z"
.for i in 1 2 ${:U3:Z} 4
. warning Should not be reached.
.endfor
diff --git a/contrib/bmake/unit-tests/directive-for-escape.exp b/contrib/bmake/unit-tests/directive-for-escape.exp
index 6c84b7780e84..1f4305185d65 100644
--- a/contrib/bmake/unit-tests/directive-for-escape.exp
+++ b/contrib/bmake/unit-tests/directive-for-escape.exp
@@ -106,6 +106,7 @@ make: "directive-for-escape.mk" line 228: long: " "
For: end for 1
For: loop body with i = "
":
+Parsing line 244: .for i in "${.newline}"
For: end for 1
Parse_PushInput: .for loop in directive-for-escape.mk, line 244
make: "directive-for-escape.mk" line 244: newline in .for value
diff --git a/contrib/bmake/unit-tests/directive-for-null.exp b/contrib/bmake/unit-tests/directive-for-null.exp
index dee26de25e63..d6198c644817 100644
--- a/contrib/bmake/unit-tests/directive-for-null.exp
+++ b/contrib/bmake/unit-tests/directive-for-null.exp
@@ -1,9 +1,5 @@
make: "(stdin)" line 2: Zero byte read from file
-make: "(stdin)" line 2: Unexpected end of file in .for loop
-make: "(stdin)" line 3: Zero byte read from file
-make: Fatal errors encountered -- cannot continue
-make: stopped in unit-tests
-*** Error code 1 (continuing)
+*** Error code 2 (continuing)
Stop.
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/directive-for-null.mk b/contrib/bmake/unit-tests/directive-for-null.mk
index fb2d440ee1ba..d3de8b598bc2 100644
--- a/contrib/bmake/unit-tests/directive-for-null.mk
+++ b/contrib/bmake/unit-tests/directive-for-null.mk
@@ -1,18 +1,8 @@
-# $NetBSD: directive-for-null.mk,v 1.3 2022/06/12 15:03:27 rillig Exp $
+# $NetBSD: directive-for-null.mk,v 1.4 2024/04/01 12:26:02 rillig Exp $
#
# Test for parsing a .for loop that accidentally contains a null byte.
#
-# As of 2020-12-19, there are 3 error messages:
-#
-# make: "(stdin)" line 2: Zero byte read from file
-# make: "(stdin)" line 2: Unexpected end of file in for loop.
-# make: "(stdin)" line 3: Zero byte read from file
-#
-# The one about "end of file" might be misleading but is due to the
-# implementation. On both errors and EOF, ParseRawLine returns NULL.
-#
-# The one about the "zero byte" in line 3 is surprising since the only
-# line that contains a null byte is line 2.
+# expect: make: "(stdin)" line 2: Zero byte read from file
all: .PHONY
@printf '%s\n' \
diff --git a/contrib/bmake/unit-tests/directive-for.exp b/contrib/bmake/unit-tests/directive-for.exp
index 0d0313c4e7b0..3e346dfab4ea 100755
--- a/contrib/bmake/unit-tests/directive-for.exp
+++ b/contrib/bmake/unit-tests/directive-for.exp
@@ -17,7 +17,7 @@ make: "directive-for.mk" line 146: }{ }{ }{
make: "directive-for.mk" line 166: invalid character ':' in .for loop variable name
make: "directive-for.mk" line 173: invalid character '$' in .for loop variable name
make: "directive-for.mk" line 185: invalid character '$' in .for loop variable name
-make: "directive-for.mk" line 210: Unknown modifier "Z"
+make: "directive-for.mk" line 210: while evaluating "${:Uword2:Z}-after word3": Unknown modifier "Z"
make: "directive-for.mk" line 211: XXX: Should not reach word1
make: "directive-for.mk" line 211: XXX: Should not reach before--after
make: "directive-for.mk" line 211: XXX: Should not reach word3
diff --git a/contrib/bmake/unit-tests/directive-for.mk b/contrib/bmake/unit-tests/directive-for.mk
index becc314226dc..d777c3921556 100755
--- a/contrib/bmake/unit-tests/directive-for.mk
+++ b/contrib/bmake/unit-tests/directive-for.mk
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for.mk,v 1.24 2023/12/06 22:28:20 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.25 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the .for directive.
#
@@ -206,7 +206,7 @@ INDIRECT= ${DIRECT}
# XXX: A parse error or evaluation error in the items of the .for loop
# should skip the whole loop. As of 2023-05-09, the loop is expanded as
# usual.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:Uword2:Z}-after word3": Unknown modifier "Z"
.for var in word1 before-${:Uword2:Z}-after word3
. info XXX: Should not reach ${var}
.endfor
diff --git a/contrib/bmake/unit-tests/directive-include.exp b/contrib/bmake/unit-tests/directive-include.exp
index de94b751b33a..6454b6835edf 100755
--- a/contrib/bmake/unit-tests/directive-include.exp
+++ b/contrib/bmake/unit-tests/directive-include.exp
@@ -4,7 +4,7 @@ CondParser_Eval: ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null"
Comparing "directive-include.mk null" != "directive-include.mk null"
make: "directive-include.mk" line 26: Could not find nonexistent.mk
make: "directive-include.mk" line 49: Could not find "
-make: "directive-include.mk" line 56: Unknown modifier "Z"
+make: "directive-include.mk" line 56: while evaluating "${:U123:Z}.mk": Unknown modifier "Z"
make: "directive-include.mk" line 56: Could not find nonexistent.mk
make: "directive-include.mk" line 61: Cannot open /nonexistent
make: "directive-include.mk" line 66: Invalid line 'include'
diff --git a/contrib/bmake/unit-tests/directive-include.mk b/contrib/bmake/unit-tests/directive-include.mk
index 2517b4be6930..14d00600cb8f 100755
--- a/contrib/bmake/unit-tests/directive-include.mk
+++ b/contrib/bmake/unit-tests/directive-include.mk
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include.mk,v 1.13 2023/08/19 10:52:14 rillig Exp $
+# $NetBSD: directive-include.mk,v 1.14 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the .include directive, which includes another file.
@@ -52,7 +52,7 @@ DQUOT= "
# expression is skipped and the file is included nevertheless.
# FIXME: Add proper error handling, no file must be included here.
# expect+2: Could not find nonexistent.mk
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:U123:Z}.mk": Unknown modifier "Z"
.include "nonexistent${:U123:Z}.mk"
# The traditional include directive is seldom used.
diff --git a/contrib/bmake/unit-tests/directive-undef.exp b/contrib/bmake/unit-tests/directive-undef.exp
index f3957a990e18..329dc8d6282a 100644
--- a/contrib/bmake/unit-tests/directive-undef.exp
+++ b/contrib/bmake/unit-tests/directive-undef.exp
@@ -1,5 +1,5 @@
make: "directive-undef.mk" line 30: The .undef directive requires an argument
-make: "directive-undef.mk" line 88: Unknown modifier "Z"
+make: "directive-undef.mk" line 88: while evaluating variable "VARNAMES": Unknown modifier "Z"
make: "directive-undef.mk" line 105: warning: UT_EXPORTED is still listed in .MAKE.EXPORTED even though spaceit is not exported anymore.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/directive-undef.mk b/contrib/bmake/unit-tests/directive-undef.mk
index ef047fefe177..ac4b20d3e858 100644
--- a/contrib/bmake/unit-tests/directive-undef.mk
+++ b/contrib/bmake/unit-tests/directive-undef.mk
@@ -1,4 +1,4 @@
-# $NetBSD: directive-undef.mk,v 1.13 2023/06/01 20:56:35 rillig Exp $
+# $NetBSD: directive-undef.mk,v 1.14 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the .undef directive.
#
@@ -84,7 +84,7 @@ ${DOLLAR}= dollar
#
# As of var.c 1.762, this doesn't happen though because the error handling
# in Var_Parse and Var_Subst is not done properly.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating variable "VARNAMES": Unknown modifier "Z"
.undef ${VARNAMES:L:Z}
diff --git a/contrib/bmake/unit-tests/lint.exp b/contrib/bmake/unit-tests/lint.exp
index db2290c040cd..78761c862298 100755
--- a/contrib/bmake/unit-tests/lint.exp
+++ b/contrib/bmake/unit-tests/lint.exp
@@ -1,4 +1,4 @@
-make: In the :@ modifier of "VAR", the variable name "${:Ubar:S,b,v,}" must not contain a dollar
+make: in target "mod-loop-varname": while evaluating variable "VAR": In the :@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar
y@:Q}
xvaluey
exit status 2
diff --git a/contrib/bmake/unit-tests/moderrs.exp b/contrib/bmake/unit-tests/moderrs.exp
index 6b41241b6800..0d1bcdc5b0f9 100644
--- a/contrib/bmake/unit-tests/moderrs.exp
+++ b/contrib/bmake/unit-tests/moderrs.exp
@@ -1,11 +1,11 @@
mod-unknown-direct:
want: Unknown modifier 'Z'
-make: Unknown modifier "Z"
+make: in target "mod-unknown-direct": while evaluating variable "VAR": Unknown modifier "Z"
VAR:Z=before--after
mod-unknown-indirect:
want: Unknown modifier 'Z'
-make: Unknown modifier "Z"
+make: in target "mod-unknown-indirect": while evaluating variable "VAR": Unknown modifier "Z"
VAR:Z=before-inner}-after
unclosed-direct:
@@ -119,17 +119,17 @@ then
mod-remember-parse:
1 1 2 3 5 8 13 21 34
-make: Unknown modifier "__"
+make: in target "mod-remember-parse": while evaluating variable "FIB": Unknown modifier "__"
mod-sysv-parse:
-make: Unknown modifier "3"
+make: in target "mod-sysv-parse": while evaluating variable "FIB": Unknown modifier "3"
make: Unclosed expression, expecting '}' for modifier "3" of variable "FIB" with value ""
-make: Unknown modifier "3="
+make: in target "mod-sysv-parse": while evaluating variable "FIB": Unknown modifier "3="
make: Unclosed expression, expecting '}' for modifier "3=" of variable "FIB" with value ""
-make: Unknown modifier "3=x3"
+make: in target "mod-sysv-parse": while evaluating variable "FIB": Unknown modifier "3=x3"
make: Unclosed expression, expecting '}' for modifier "3=x3" of variable "FIB" with value ""
1 1 2 x3 5 8 1x3 21 34
diff --git a/contrib/bmake/unit-tests/opt-chdir.exp b/contrib/bmake/unit-tests/opt-chdir.exp
index d9759cf9ed8b..3d89360f9a62 100644
--- a/contrib/bmake/unit-tests/opt-chdir.exp
+++ b/contrib/bmake/unit-tests/opt-chdir.exp
@@ -1,5 +1,3 @@
-make: chdir /./././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././: File name too long
-*** Error code 2 (ignored)
cwd: /
make: chdir /nonexistent: No such file or directory
*** Error code 2 (ignored)
diff --git a/contrib/bmake/unit-tests/opt-chdir.mk b/contrib/bmake/unit-tests/opt-chdir.mk
index a8806149f31c..e94b8799af2e 100644
--- a/contrib/bmake/unit-tests/opt-chdir.mk
+++ b/contrib/bmake/unit-tests/opt-chdir.mk
@@ -1,4 +1,4 @@
-# $NetBSD: opt-chdir.mk,v 1.6 2021/05/18 17:05:45 sjg Exp $
+# $NetBSD: opt-chdir.mk,v 1.7 2024/04/02 11:11:00 rillig Exp $
#
# Tests for the -C command line option, which changes the directory at the
# beginning.
@@ -7,15 +7,9 @@
.MAKEFLAGS: -d0 # switch stdout to line-buffered
-all: chdir-filename-too-long
all: chdir-root
all: chdir-nonexistent
-# Try to overflow the internal buffer for .CURDIR, which is curdir.
-chdir-filename-too-long: .PHONY .IGNORE
- # 5000 slashes, separated by dots: /./././.../././
- @${MAKE} -C ${:U:range=5000:@@/@:ts.}
-
# Changing to another directory is possible via the command line.
# In this test, it is the root directory since almost any other directory
# is not guaranteed to exist on every platform.
diff --git a/contrib/bmake/unit-tests/opt-debug-errors-jobs.exp b/contrib/bmake/unit-tests/opt-debug-errors-jobs.exp
index c957c7736b32..614bb33b9208 100644
--- a/contrib/bmake/unit-tests/opt-debug-errors-jobs.exp
+++ b/contrib/bmake/unit-tests/opt-debug-errors-jobs.exp
@@ -2,6 +2,7 @@ echo '3 spaces'; false
3 spaces
*** Failed target: fail-spaces
+*** In directory: <curdir>
*** Failed commands:
echo '3 spaces'; false
*** [fail-spaces] Error code 1
@@ -11,6 +12,7 @@ echo \ indented; false
indented
*** Failed target: fail-escaped-space
+*** In directory: <curdir>
*** Failed commands:
echo \ indented; false
*** [fail-escaped-space] Error code 1
@@ -22,6 +24,7 @@ line1
line2
*** Failed target: fail-newline
+*** In directory: <curdir>
*** Failed commands:
echo 'line1${.newline}line2'; false
=> echo 'line1
@@ -33,6 +36,7 @@ echo 'line1 line2'; false
line1 line2
*** Failed target: fail-multiline
+*** In directory: <curdir>
*** Failed commands:
echo 'line1 line2'; false
*** [fail-multiline] Error code 1
@@ -42,6 +46,7 @@ echo 'word1' 'word2'; false
word1 word2
*** Failed target: fail-multiline-intention
+*** In directory: <curdir>
*** Failed commands:
echo 'word1' 'word2'; false
*** [fail-multiline-intention] Error code 1
@@ -49,6 +54,7 @@ word1 word2
make: stopped in unit-tests
*** Failed target: fail-vars
+*** In directory: <curdir>
*** Failed commands:
@${COMPILE_C} ${COMPILE_C_FLAGS}
=> @false c-compiler flag1 -macro="several words"
diff --git a/contrib/bmake/unit-tests/opt-debug-graph1.exp b/contrib/bmake/unit-tests/opt-debug-graph1.exp
index 26777a671119..d01a98a31fdb 100644
--- a/contrib/bmake/unit-tests/opt-debug-graph1.exp
+++ b/contrib/bmake/unit-tests/opt-debug-graph1.exp
@@ -23,6 +23,7 @@
.MAKE.GID = <details omitted>
.MAKE.JOBS.C = <details omitted>
.MAKE.LEVEL = <details omitted>
+.MAKE.LEVEL.ENV = MAKELEVEL
.MAKE.MAKEFILES = <details omitted>
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
.MAKE.OS = <details omitted>
@@ -41,7 +42,6 @@ MACHINE_ARCH = <details omitted>
MAKE = <details omitted>
MFLAGS = -r -k -d g1
#*** Command-line Variables:
-.MAKE.LEVEL.ENV = MAKELEVEL
#*** Directory Cache:
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
diff --git a/contrib/bmake/unit-tests/opt-debug-graph2.exp b/contrib/bmake/unit-tests/opt-debug-graph2.exp
index a5a51413fd38..d4182650baed 100644
--- a/contrib/bmake/unit-tests/opt-debug-graph2.exp
+++ b/contrib/bmake/unit-tests/opt-debug-graph2.exp
@@ -57,6 +57,7 @@ all : made-target error-target aborted-target
.MAKE.GID = <details omitted>
.MAKE.JOBS.C = <details omitted>
.MAKE.LEVEL = <details omitted>
+.MAKE.LEVEL.ENV = MAKELEVEL
.MAKE.MAKEFILES = <details omitted>
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
.MAKE.OS = <details omitted>
@@ -75,7 +76,6 @@ MACHINE_ARCH = <details omitted>
MAKE = <details omitted>
MFLAGS = -r -k -d g2
#*** Command-line Variables:
-.MAKE.LEVEL.ENV = MAKELEVEL
.SHELL = <details omitted>
#*** Directory Cache:
diff --git a/contrib/bmake/unit-tests/opt-debug-graph3.exp b/contrib/bmake/unit-tests/opt-debug-graph3.exp
index ff88400668fa..fea3c658cb72 100644
--- a/contrib/bmake/unit-tests/opt-debug-graph3.exp
+++ b/contrib/bmake/unit-tests/opt-debug-graph3.exp
@@ -57,6 +57,7 @@ all : made-target error-target aborted-target
.MAKE.GID = <details omitted>
.MAKE.JOBS.C = <details omitted>
.MAKE.LEVEL = <details omitted>
+.MAKE.LEVEL.ENV = MAKELEVEL
.MAKE.MAKEFILES = <details omitted>
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
.MAKE.OS = <details omitted>
@@ -75,7 +76,6 @@ MACHINE_ARCH = <details omitted>
MAKE = <details omitted>
MFLAGS = -r -k -d g3
#*** Command-line Variables:
-.MAKE.LEVEL.ENV = MAKELEVEL
.SHELL = <details omitted>
#*** Directory Cache:
diff --git a/contrib/bmake/unit-tests/opt-debug-lint.exp b/contrib/bmake/unit-tests/opt-debug-lint.exp
index 5a6510bd029a..c6cd748acd5d 100644
--- a/contrib/bmake/unit-tests/opt-debug-lint.exp
+++ b/contrib/bmake/unit-tests/opt-debug-lint.exp
@@ -2,9 +2,9 @@ make: "opt-debug-lint.mk" line 21: Variable "X" is undefined
make: "opt-debug-lint.mk" line 21: Malformed conditional ($X)
make: "opt-debug-lint.mk" line 45: Variable "UNDEF" is undefined
make: "opt-debug-lint.mk" line 45: Malformed conditional (${UNDEF})
-make: "opt-debug-lint.mk" line 67: Missing delimiter ':' after modifier "L"
-make: "opt-debug-lint.mk" line 67: Missing delimiter ':' after modifier "P"
-make: "opt-debug-lint.mk" line 76: Unknown modifier "${"
+make: "opt-debug-lint.mk" line 67: while evaluating variable "value": Missing delimiter ':' after modifier "L"
+make: "opt-debug-lint.mk" line 67: while evaluating variable "value": Missing delimiter ':' after modifier "P"
+make: "opt-debug-lint.mk" line 76: while evaluating variable "value": Unknown modifier "${"
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff --git a/contrib/bmake/unit-tests/opt-debug-lint.mk b/contrib/bmake/unit-tests/opt-debug-lint.mk
index 042bfd51d35b..3e946ac6ad61 100644
--- a/contrib/bmake/unit-tests/opt-debug-lint.mk
+++ b/contrib/bmake/unit-tests/opt-debug-lint.mk
@@ -1,4 +1,4 @@
-# $NetBSD: opt-debug-lint.mk,v 1.16 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: opt-debug-lint.mk,v 1.17 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the -dL command line option, which runs additional checks
# to catch common mistakes, such as unclosed expressions.
@@ -62,8 +62,8 @@ ${UNDEF}: ${UNDEF}
# Since 2020-10-03, in lint mode the variable modifier must be separated
# by colons. See varparse-mod.mk.
-# expect+2: Missing delimiter ':' after modifier "L"
-# expect+1: Missing delimiter ':' after modifier "P"
+# expect+2: while evaluating variable "value": Missing delimiter ':' after modifier "L"
+# expect+1: while evaluating variable "value": Missing delimiter ':' after modifier "P"
.if ${value:LPL} != "value"
. error
.endif
@@ -72,7 +72,7 @@ ${UNDEF}: ${UNDEF}
# variable modifier had to be separated by colons. This was wrong though
# since make always fell back trying to parse the indirect modifier as a
# SysV modifier.
-# expect+1: Unknown modifier "${"
+# expect+1: while evaluating variable "value": Unknown modifier "${"
.if ${value:${:UL}PL} != "LPL}" # FIXME: "LPL}" is unexpected here.
. error ${value:${:UL}PL}
.endif
diff --git a/contrib/bmake/unit-tests/opt-debug-parse.exp b/contrib/bmake/unit-tests/opt-debug-parse.exp
index 811c6b45dce5..a19a58bcc965 100644
--- a/contrib/bmake/unit-tests/opt-debug-parse.exp
+++ b/contrib/bmake/unit-tests/opt-debug-parse.exp
@@ -1,3 +1,4 @@
+Parsing line 16: .for var in value
Parse_PushInput: .for loop in opt-debug-parse.mk, line 16
SetFilenameVars: ${.PARSEDIR} = <some-dir> ${.PARSEFILE} = `opt-debug-parse.mk'
Parsing line 21: .info trace with multi-line .for loop head
@@ -11,6 +12,7 @@ SetFilenameVars: ${.PARSEDIR} = <some-dir> ${.PARSEFILE} = `null'
SetFilenameVars: ${.INCLUDEDFROMDIR} = <some-dir> ${.INCLUDEDFROMFILE} = `opt-debug-parse.mk'
ParseEOF: returning to file opt-debug-parse.mk, line 27
SetFilenameVars: ${.PARSEDIR} = <some-dir> ${.PARSEFILE} = `opt-debug-parse.mk'
+Parsing line 31: .for a b c in 1 2 3 ${:U4 5 6}
Parse_PushInput: .for loop in opt-debug-parse.mk, line 31
SetFilenameVars: ${.PARSEDIR} = <some-dir> ${.PARSEFILE} = `opt-debug-parse.mk'
Parsing line 34: .info trace
diff --git a/contrib/bmake/unit-tests/opt-file.exp b/contrib/bmake/unit-tests/opt-file.exp
index 76a832949aca..9550958fea37 100644
--- a/contrib/bmake/unit-tests/opt-file.exp
+++ b/contrib/bmake/unit-tests/opt-file.exp
@@ -2,9 +2,7 @@ value
value
line-with-trailing-whitespace
make: "(stdin)" line 1: Zero byte read from file
-make: Fatal errors encountered -- cannot continue
-make: stopped in unit-tests
-*** Error code 1 (continuing)
+*** Error code 2 (continuing)
`all' not remade because of errors.
Stop.
diff --git a/contrib/bmake/unit-tests/opt-file.mk b/contrib/bmake/unit-tests/opt-file.mk
index 5085fe126af8..0f07ede560f5 100644
--- a/contrib/bmake/unit-tests/opt-file.mk
+++ b/contrib/bmake/unit-tests/opt-file.mk
@@ -1,4 +1,4 @@
-# $NetBSD: opt-file.mk,v 1.15 2022/03/26 13:32:31 rillig Exp $
+# $NetBSD: opt-file.mk,v 1.16 2024/04/01 12:26:02 rillig Exp $
#
# Tests for the -f command line option, which adds a makefile to the list of
# files that are parsed.
@@ -79,7 +79,7 @@ line-with-trailing-whitespace: .PHONY
# exit status 0
#
# 2008 to 2010:
-# make: "zero-byte.in" line 1: Zero byte read from file
+# make: "(stdin)" line 1: Zero byte read from file
# make: Fatal errors encountered -- cannot continue
#
# make: stopped in .
@@ -92,14 +92,18 @@ line-with-trailing-whitespace: .PHONY
# exit status 2
#
# 2014 to 2020-12-06:
-# make: "zero-byte.in" line 1: warning: Zero byte read from file, skipping rest of line.
+# make: "(stdin)" line 1: warning: Zero byte read from file, skipping rest of line.
# exit status 0
#
# Since 2020-12-07:
-# make: "zero-byte.in" line 1: Zero byte read from file
+# make: "(stdin)" line 1: Zero byte read from file
# make: Fatal errors encountered -- cannot continue
# make: stopped in .
# exit status 1
+#
+# Since 2024-04-01:
+# make: "(stdin)" line 1: Zero byte read from file
+# *** Error code 2 (continuing)
file-containing-null-byte: .PHONY
@printf '%s\n' 'VAR=value' 'VAR2=VALUE2' \
| tr 'l' '\0' \
diff --git a/contrib/bmake/unit-tests/opt-keep-going-indirect.mk b/contrib/bmake/unit-tests/opt-keep-going-indirect.mk
index 22f7be945f71..5d18553fa512 100644
--- a/contrib/bmake/unit-tests/opt-keep-going-indirect.mk
+++ b/contrib/bmake/unit-tests/opt-keep-going-indirect.mk
@@ -1,4 +1,4 @@
-# $NetBSD: opt-keep-going-indirect.mk,v 1.2 2022/02/12 20:05:36 rillig Exp $
+# $NetBSD: opt-keep-going-indirect.mk,v 1.3 2024/04/02 15:05:15 rillig Exp $
#
# Tests for the -k command line option, which stops building a target as soon
# as an error is detected, but continues building the other, independent
@@ -49,19 +49,19 @@
# to the child processes.
all:
@echo 'direct compat'
- @set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k direct; echo "exited $$?"
+ @set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k direct; echo "exited $$?"
@echo
@echo 'direct jobs'
- @set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k direct -j1; echo "exited $$?"
+ @set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k direct -j1; echo "exited $$?"
@echo
@echo 'indirect compat'
- @set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k indirect; echo "exited $$?"
+ @set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k indirect; echo "exited $$?"
@echo
@echo 'indirect jobs'
- @set +e; env -i ${MAKE} -r -f ${MAKEFILE} -k indirect -j1; echo "exited $$?"
+ @set +e; env -i "PATH=$$PATH" ${MAKE} -r -f ${MAKEFILE} -k indirect -j1; echo "exited $$?"
@echo
indirect: direct
diff --git a/contrib/bmake/unit-tests/opt-m-include-dir.mk b/contrib/bmake/unit-tests/opt-m-include-dir.mk
index 6e0801390395..b677f172e85b 100644
--- a/contrib/bmake/unit-tests/opt-m-include-dir.mk
+++ b/contrib/bmake/unit-tests/opt-m-include-dir.mk
@@ -1,4 +1,4 @@
-# $NetBSD: opt-m-include-dir.mk,v 1.4 2020/09/01 20:14:34 rillig Exp $
+# $NetBSD: opt-m-include-dir.mk,v 1.5 2024/04/30 16:13:34 sjg Exp $
#
# Tests for the -m command line option, which adds a directory to the
# search path for the .include <...> directive.
@@ -22,11 +22,14 @@
TEST_DIR:= ${.PARSEFILE:R}.tmp/sub/sub/sub/workdir
CANARY_FILE:= ${.PARSEFILE:R}.tmp/sub/opt-m-canary.mk
ACTUAL_FILE:= ${.PARSEFILE:R}.tmp/sub/opt-m-step3.mk
+WANTED_FILE:= ${.PARSEFILE:R}.tmp/sub/opt-m-check.mk
_!= mkdir -p ${TEST_DIR}
_!= > ${CANARY_FILE}
_!= cp ${MAKEFILE} ${TEST_DIR}/step2.mk
_!= cp ${MAKEFILE} ${ACTUAL_FILE}
+_!= echo CHECK=ok > ${WANTED_FILE}
+_!= echo CHECK=${WANTED_FILE:T} found in .CURDIR > ${TEST_DIR}/${WANTED_FILE:T}
step1:
@${.MAKE} -C ${TEST_DIR} -f step2.mk step2
@@ -52,9 +55,10 @@ step1:
.elif ${.PARSEFILE:T} == "opt-m-step3.mk"
# This file is included by step2.mk.
+.include <opt-m-check.mk>
step2:
- @echo ok
+ @echo ${CHECK}
.else
. error
diff --git a/contrib/bmake/unit-tests/suff-main-several.exp b/contrib/bmake/unit-tests/suff-main-several.exp
index 4391610be742..d19a392f5962 100644
--- a/contrib/bmake/unit-tests/suff-main-several.exp
+++ b/contrib/bmake/unit-tests/suff-main-several.exp
@@ -88,6 +88,7 @@ ParseDependency(.MAKEFLAGS: -d0 -dg1)
.MAKE.GID = <details omitted>
.MAKE.JOBS.C = <details omitted>
.MAKE.LEVEL = <details omitted>
+.MAKE.LEVEL.ENV = MAKELEVEL
.MAKE.MAKEFILES = <details omitted>
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
.MAKE.OS = <details omitted>
@@ -106,7 +107,6 @@ MACHINE_ARCH = <details omitted>
MAKE = <details omitted>
MFLAGS = -r -k -d mps -d 0 -d g1
#*** Command-line Variables:
-.MAKE.LEVEL.ENV = MAKELEVEL
#*** Directory Cache:
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
diff --git a/contrib/bmake/unit-tests/suff-transform-debug.exp b/contrib/bmake/unit-tests/suff-transform-debug.exp
index 5d632a22f80a..2e88db58bc8c 100644
--- a/contrib/bmake/unit-tests/suff-transform-debug.exp
+++ b/contrib/bmake/unit-tests/suff-transform-debug.exp
@@ -14,6 +14,7 @@
.MAKE.GID = <details omitted>
.MAKE.JOBS.C = <details omitted>
.MAKE.LEVEL = <details omitted>
+.MAKE.LEVEL.ENV = MAKELEVEL
.MAKE.MAKEFILES = <details omitted>
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
.MAKE.OS = <details omitted>
@@ -32,7 +33,6 @@ MACHINE_ARCH = <details omitted>
MAKE = <details omitted>
MFLAGS = -r -k -d g1
#*** Command-line Variables:
-.MAKE.LEVEL.ENV = MAKELEVEL
#*** Directory Cache:
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
diff --git a/contrib/bmake/unit-tests/var-eval-short.exp b/contrib/bmake/unit-tests/var-eval-short.exp
index 14e3d372f198..6b42c27e22bc 100644
--- a/contrib/bmake/unit-tests/var-eval-short.exp
+++ b/contrib/bmake/unit-tests/var-eval-short.exp
@@ -1,5 +1,6 @@
-make: "var-eval-short.mk" line 46: In the :@ modifier of "", the variable name "${FAIL}" must not contain a dollar
+make: "var-eval-short.mk" line 46: while evaluating "${:Uword:@${FAIL}@expr@}": In the :@ modifier, the variable name "${FAIL}" must not contain a dollar
make: "var-eval-short.mk" line 46: Malformed conditional (0 && ${:Uword:@${FAIL}@expr@})
+Parsing line 159: .if 0 && ${0:?${FAIL}then:${FAIL}else}
CondParser_Eval: 0 && ${0:?${FAIL}then:${FAIL}else}
Var_Parse: ${0:?${FAIL}then:${FAIL}else} (parse-only)
Parsing modifier ${0:?...}
@@ -10,6 +11,7 @@ Modifier part: "${FAIL}else"
Result of ${0:?${FAIL}then:${FAIL}else} is "" (parse-only, defined)
Parsing line 167: DEFINED= defined
Global: DEFINED = defined
+Parsing line 168: .if 0 && ${DEFINED:L:?${FAIL}then:${FAIL}else}
CondParser_Eval: 0 && ${DEFINED:L:?${FAIL}then:${FAIL}else}
Var_Parse: ${DEFINED:L:?${FAIL}then:${FAIL}else} (parse-only)
Parsing modifier ${DEFINED:L}
diff --git a/contrib/bmake/unit-tests/var-eval-short.mk b/contrib/bmake/unit-tests/var-eval-short.mk
index 2b25d82e96b8..5a42335a4474 100644
--- a/contrib/bmake/unit-tests/var-eval-short.mk
+++ b/contrib/bmake/unit-tests/var-eval-short.mk
@@ -1,4 +1,4 @@
-# $NetBSD: var-eval-short.mk,v 1.11 2023/10/19 18:24:33 rillig Exp $
+# $NetBSD: var-eval-short.mk,v 1.12 2024/04/20 10:18:55 rillig Exp $
#
# Tests for each variable modifier to ensure that they only do the minimum
# necessary computations. If the result of the expression is irrelevant,
@@ -41,7 +41,7 @@ FAIL= ${:!echo unexpected 1>&2!}
# after the loop, when undefining the temporary global loop variable.
# Since var.c 1.907 from 2021-04-04, a '$' is no longer allowed in the
# variable name.
-# expect+2: In the :@ modifier of "", the variable name "${FAIL}" must not contain a dollar
+# expect+2: while evaluating "${:Uword:@${FAIL}@expr@}": In the :@ modifier, the variable name "${FAIL}" must not contain a dollar
# expect+1: Malformed conditional (0 && ${:Uword:@${FAIL}@expr@})
.if 0 && ${:Uword:@${FAIL}@expr@}
.endif
diff --git a/contrib/bmake/unit-tests/var-op-expand.exp b/contrib/bmake/unit-tests/var-op-expand.exp
index 5ea4e6b6954c..0eafc9ae4c39 100644
--- a/contrib/bmake/unit-tests/var-op-expand.exp
+++ b/contrib/bmake/unit-tests/var-op-expand.exp
@@ -1,6 +1,6 @@
-make: "var-op-expand.mk" line 274: Unknown modifier "s,value,replaced,"
+make: "var-op-expand.mk" line 274: while evaluating variable "indirect": while evaluating variable "later": Unknown modifier "s,value,replaced,"
make: "var-op-expand.mk" line 278: warning: XXX Neither branch should be taken.
-make: "var-op-expand.mk" line 283: Unknown modifier "s,value,replaced,"
+make: "var-op-expand.mk" line 283: while evaluating variable "indirect": while evaluating variable "later": Unknown modifier "s,value,replaced,"
make: "var-op-expand.mk" line 285: warning: XXX Neither branch should be taken.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/var-op-expand.mk b/contrib/bmake/unit-tests/var-op-expand.mk
index 76b90bf72b56..fb1e6d2c390f 100644
--- a/contrib/bmake/unit-tests/var-op-expand.mk
+++ b/contrib/bmake/unit-tests/var-op-expand.mk
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-expand.mk,v 1.19 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: var-op-expand.mk,v 1.20 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the := variable assignment operator, which expands its
# right-hand side.
@@ -270,7 +270,7 @@ later= lowercase-value
.undef later
INDIRECT:= ${LATER:S,value,replaced,} OK ${LATER:value=sysv}
indirect:= ${INDIRECT:tl}
-# expect+1: Unknown modifier "s,value,replaced,"
+# expect+1: while evaluating variable "indirect": while evaluating variable "later": Unknown modifier "s,value,replaced,"
.if ${indirect} != " ok "
. error
.else
@@ -279,7 +279,7 @@ indirect:= ${INDIRECT:tl}
.endif
LATER= uppercase-value
later= lowercase-value
-# expect+1: Unknown modifier "s,value,replaced,"
+# expect+1: while evaluating variable "indirect": while evaluating variable "later": Unknown modifier "s,value,replaced,"
.if ${indirect} != "uppercase-replaced ok uppercase-sysv"
# expect+1: warning: XXX Neither branch should be taken.
. warning XXX Neither branch should be taken.
diff --git a/contrib/bmake/unit-tests/vardebug.exp b/contrib/bmake/unit-tests/vardebug.exp
index a0aa6a301800..86f2ac0b420d 100644
--- a/contrib/bmake/unit-tests/vardebug.exp
+++ b/contrib/bmake/unit-tests/vardebug.exp
@@ -54,7 +54,7 @@ Var_Parse: ${:Uvariable:unknown} (eval-defined)
Evaluating modifier ${:U...} on value "" (eval-defined, undefined)
Result of ${:Uvariable} is "variable" (eval-defined, defined)
Evaluating modifier ${:u...} on value "variable" (eval-defined, defined)
-make: "vardebug.mk" line 63: Unknown modifier "unknown"
+make: "vardebug.mk" line 63: while evaluating "${:Uvariable:unknown}": Unknown modifier "unknown"
Result of ${:unknown} is error (eval-defined, defined)
make: "vardebug.mk" line 63: Malformed conditional (${:Uvariable:unknown})
Var_Parse: ${UNDEFINED} (eval-defined)
diff --git a/contrib/bmake/unit-tests/vardebug.mk b/contrib/bmake/unit-tests/vardebug.mk
index b9b094772b54..6c5703cb526f 100644
--- a/contrib/bmake/unit-tests/vardebug.mk
+++ b/contrib/bmake/unit-tests/vardebug.mk
@@ -1,4 +1,4 @@
-# $NetBSD: vardebug.mk,v 1.9 2023/12/20 09:46:00 rillig Exp $
+# $NetBSD: vardebug.mk,v 1.10 2024/04/20 10:18:55 rillig Exp $
#
# Demonstrates the debugging output for var.c.
@@ -59,7 +59,7 @@ VAR+= 3
# as "is error", without surrounding quotes.
# expect: Result of ${:unknown} is error (eval-defined, defined)
# expect+2: Malformed conditional (${:Uvariable:unknown})
-# expect+1: Unknown modifier "unknown"
+# expect+1: while evaluating "${:Uvariable:unknown}": Unknown modifier "unknown"
.if ${:Uvariable:unknown}
.endif
diff --git a/contrib/bmake/unit-tests/varmisc.exp b/contrib/bmake/unit-tests/varmisc.exp
index 61e6a49963a0..dd24a419fe75 100644
--- a/contrib/bmake/unit-tests/varmisc.exp
+++ b/contrib/bmake/unit-tests/varmisc.exp
@@ -44,26 +44,26 @@ parse-dynamic: parse-dynamic parse-dynamic before
parse-dynamic: parse-dynamic parse-dynamic after
parse-dynamic: parse-dynamic parse-dynamic after
varerror-unclosed:begin
-make: Unclosed variable ""
+make: in target "varerror-unclosed": Unclosed variable ""
-make: Unclosed variable "UNCLOSED"
+make: in target "varerror-unclosed": Unclosed variable "UNCLOSED"
-make: Unclosed variable "UNCLOSED"
+make: in target "varerror-unclosed": Unclosed variable "UNCLOSED"
-make: Unclosed variable "PATTERN"
+make: in target "varerror-unclosed": while evaluating variable "UNCLOSED": Unclosed variable "PATTERN"
make: Unclosed expression, expecting '}' for modifier "M${PATTERN" of variable "UNCLOSED" with value ""
-make: Unclosed variable "param"
-make: Unclosed variable "UNCLOSED."
+make: in target "varerror-unclosed": Unclosed variable "param"
+make: in target "varerror-unclosed": Unclosed variable "UNCLOSED."
-make: Unclosed variable "UNCLOSED.1"
+make: in target "varerror-unclosed": Unclosed variable "UNCLOSED.1"
-make: Unclosed variable "UNCLOSED.2"
+make: in target "varerror-unclosed": Unclosed variable "UNCLOSED.2"
-make: Unclosed variable "UNCLOSED.3"
+make: in target "varerror-unclosed": Unclosed variable "UNCLOSED.3"
-make: Unclosed variable "UNCLOSED_ORIG"
+make: in target "varerror-unclosed": while evaluating variable "UNCLOSED_INDIR_2": while evaluating variable "UNCLOSED_INDIR_1": Unclosed variable "UNCLOSED_ORIG"
varerror-unclosed:end
target1-flags: we have: one two
diff --git a/contrib/bmake/unit-tests/varmod-assign.exp b/contrib/bmake/unit-tests/varmod-assign.exp
index f258f92ea05b..db1fa64c8479 100644
--- a/contrib/bmake/unit-tests/varmod-assign.exp
+++ b/contrib/bmake/unit-tests/varmod-assign.exp
@@ -42,7 +42,7 @@ mod-assign-empty: value}
make: Bad modifier ":" for variable ""
mod-assign-empty: overwritten}
mod-assign-empty: VAR=overwritten
-make: Unknown modifier ":x"
+make: in target "mod-assign-parse": while evaluating variable "ASSIGN": Unknown modifier ":x"
sysv:y
make: Unfinished modifier for "ASSIGN" ('}' missing)
diff --git a/contrib/bmake/unit-tests/varmod-assign.mk b/contrib/bmake/unit-tests/varmod-assign.mk
index f7112c47c935..17d9df764be1 100644
--- a/contrib/bmake/unit-tests/varmod-assign.mk
+++ b/contrib/bmake/unit-tests/varmod-assign.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-assign.mk,v 1.19 2024/01/07 11:42:22 rillig Exp $
+# $NetBSD: varmod-assign.mk,v 1.20 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the obscure ::= variable modifiers, which perform variable
# assignments during evaluation, just like the = operator in C.
@@ -90,7 +90,7 @@ mod-assign-empty:
mod-assign-parse:
# The modifier for assignment operators starts with a ':'.
# An 'x' after that is an invalid modifier.
- # expect: make: Unknown modifier ":x"
+ # expect: make: in target "mod-assign-parse": while evaluating variable "ASSIGN": Unknown modifier ":x"
@echo ${ASSIGN::x}
# When parsing an assignment operator fails because the operator is
diff --git a/contrib/bmake/unit-tests/varmod-edge.exp b/contrib/bmake/unit-tests/varmod-edge.exp
index c2477f16e950..fad5cb2c3c94 100644
--- a/contrib/bmake/unit-tests/varmod-edge.exp
+++ b/contrib/bmake/unit-tests/varmod-edge.exp
@@ -15,10 +15,10 @@ make: "varmod-edge.mk" line 184: ok eq-bs
make: Unfinished modifier for "INP.eq-esc" ('=' missing)
make: "varmod-edge.mk" line 184: ok eq-esc
make: "varmod-edge.mk" line 184: ok colon
-make: "varmod-edge.mk" line 167: Unknown modifier ":"
-make: "varmod-edge.mk" line 167: Unknown modifier ":"
+make: "varmod-edge.mk" line 167: while evaluating variable "MOD.colons": while evaluating variable "INP.colons": Unknown modifier ":"
+make: "varmod-edge.mk" line 167: while evaluating variable "MOD.colons": while evaluating variable "INP.colons": Unknown modifier ":"
make: "varmod-edge.mk" line 184: ok colons
-make: "varmod-edge.mk" line 195: Unknown modifier "Z"
+make: "varmod-edge.mk" line 195: while evaluating "${:Z}": Unknown modifier "Z"
make: "varmod-edge.mk" line 195: Malformed conditional (${:Z})
make: Unfinished modifier for "" (',' missing)
make: "varmod-edge.mk" line 209: Malformed conditional (${:S,})
diff --git a/contrib/bmake/unit-tests/varmod-edge.mk b/contrib/bmake/unit-tests/varmod-edge.mk
index 91220d99e47d..2f8f8c793de1 100644
--- a/contrib/bmake/unit-tests/varmod-edge.mk
+++ b/contrib/bmake/unit-tests/varmod-edge.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-edge.mk,v 1.19 2023/11/19 22:06:15 rillig Exp $
+# $NetBSD: varmod-edge.mk,v 1.20 2024/04/20 10:18:55 rillig Exp $
#
# Tests for edge cases in variable modifiers.
#
@@ -162,8 +162,8 @@ MOD.colons= ${INP.colons::::}
EXP.colons= # empty
.for test in ${TESTS}
-# expect+2: Unknown modifier ":"
-# expect+1: Unknown modifier ":"
+# expect+2: while evaluating variable "MOD.colons": while evaluating variable "INP.colons": Unknown modifier ":"
+# expect+1: while evaluating variable "MOD.colons": while evaluating variable "INP.colons": Unknown modifier ":"
. if ${MOD.${test}} == ${EXP.${test}}
# expect+16: ok M-paren
# expect+15: ok M-mixed
@@ -191,7 +191,7 @@ EXP.colons= # empty
# XXX: The error message should mention the variable name of the expression,
# even though that name is empty in this case.
# expect+2: Malformed conditional (${:Z})
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:Z}": Unknown modifier "Z"
.if ${:Z}
. error
.else
diff --git a/contrib/bmake/unit-tests/varmod-gmtime.exp b/contrib/bmake/unit-tests/varmod-gmtime.exp
index bbb8bd547bd5..1b12ead96d85 100644
--- a/contrib/bmake/unit-tests/varmod-gmtime.exp
+++ b/contrib/bmake/unit-tests/varmod-gmtime.exp
@@ -1,12 +1,12 @@
-make: "varmod-gmtime.mk" line 61: Invalid time value "-1"
+make: "varmod-gmtime.mk" line 61: while evaluating "${:L:gmtime=-1} != """: Invalid time value "-1"
make: "varmod-gmtime.mk" line 61: Malformed conditional (${:L:gmtime=-1} != "")
-make: "varmod-gmtime.mk" line 72: Invalid time value " 1"
+make: "varmod-gmtime.mk" line 72: while evaluating "${:L:gmtime= 1} != """: Invalid time value " 1"
make: "varmod-gmtime.mk" line 72: Malformed conditional (${:L:gmtime= 1} != "")
-make: "varmod-gmtime.mk" line 120: Invalid time value "10000000000000000000000000000000"
+make: "varmod-gmtime.mk" line 120: while evaluating "${:L:gmtime=10000000000000000000000000000000} != """: Invalid time value "10000000000000000000000000000000"
make: "varmod-gmtime.mk" line 120: Malformed conditional (${:L:gmtime=10000000000000000000000000000000} != "")
-make: "varmod-gmtime.mk" line 133: Invalid time value "error"
+make: "varmod-gmtime.mk" line 133: while evaluating "${:L:gmtime=error} != """: Invalid time value "error"
make: "varmod-gmtime.mk" line 133: Malformed conditional (${:L:gmtime=error} != "")
-make: "varmod-gmtime.mk" line 144: Invalid time value "100000S,1970,bad,"
+make: "varmod-gmtime.mk" line 144: while evaluating variable "%Y": Invalid time value "100000S,1970,bad,"
make: "varmod-gmtime.mk" line 144: Malformed conditional (${%Y:L:gmtime=100000S,1970,bad,} != "bad")
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod-gmtime.mk b/contrib/bmake/unit-tests/varmod-gmtime.mk
index c30f5edbecc2..db24b1680c46 100644
--- a/contrib/bmake/unit-tests/varmod-gmtime.mk
+++ b/contrib/bmake/unit-tests/varmod-gmtime.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-gmtime.mk,v 1.21 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-gmtime.mk,v 1.22 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the :gmtime variable modifier, which formats a timestamp
# using strftime(3) in UTC.
@@ -56,7 +56,7 @@
# 1970. Going back 50 years in the past is not a practical use case for
# make. Therefore, since var.c 1.631, negative time stamps produce a
# parse error.
-# expect+2: Invalid time value "-1"
+# expect+2: while evaluating "${:L:gmtime=-1} != """: Invalid time value "-1"
# expect+1: Malformed conditional (${:L:gmtime=-1} != "")
.if ${:L:gmtime=-1} != ""
. error
@@ -67,7 +67,7 @@
# Spaces were allowed before var.c 1.631 from 2020-10-31 21:40:20, not
# because it would make sense but just as a side-effect from using strtoul.
-# expect+2: Invalid time value " 1"
+# expect+2: while evaluating "${:L:gmtime= 1} != """: Invalid time value " 1"
# expect+1: Malformed conditional (${:L:gmtime= 1} != "")
.if ${:L:gmtime= 1} != ""
. error
@@ -115,7 +115,7 @@
#
# Since var.c 1.631 from 2020-10-31, the overflow is detected and produces a
# parse error.
-# expect+2: Invalid time value "10000000000000000000000000000000"
+# expect+2: while evaluating "${:L:gmtime=10000000000000000000000000000000} != """: Invalid time value "10000000000000000000000000000000"
# expect+1: Malformed conditional (${:L:gmtime=10000000000000000000000000000000} != "")
.if ${:L:gmtime=10000000000000000000000000000000} != ""
. error
@@ -128,7 +128,7 @@
# stopped after the '=', and the remaining string was parsed for more variable
# modifiers. Because of the unknown modifier 'e' from the 'error', the whole
# variable value was discarded and thus not printed.
-# expect+2: Invalid time value "error"
+# expect+2: while evaluating "${:L:gmtime=error} != """: Invalid time value "error"
# expect+1: Malformed conditional (${:L:gmtime=error} != "")
.if ${:L:gmtime=error} != ""
. error
@@ -139,7 +139,7 @@
# Before var.c 1.1050 from 2023-05-09, the timestamp could be directly
# followed by the next modifier, without a ':' separator. This was the same
# bug as for the ':L' and ':P' modifiers.
-# expect+2: Invalid time value "100000S,1970,bad,"
+# expect+2: while evaluating variable "%Y": Invalid time value "100000S,1970,bad,"
# expect+1: Malformed conditional (${%Y:L:gmtime=100000S,1970,bad,} != "bad")
.if ${%Y:L:gmtime=100000S,1970,bad,} != "bad"
. error
diff --git a/contrib/bmake/unit-tests/varmod-hash.exp b/contrib/bmake/unit-tests/varmod-hash.exp
index 1286b456c6c2..e385c3b3ae11 100644
--- a/contrib/bmake/unit-tests/varmod-hash.exp
+++ b/contrib/bmake/unit-tests/varmod-hash.exp
@@ -1,9 +1,9 @@
-make: Unknown modifier "has"
+make: in target "all": while evaluating variable "12345": Unknown modifier "has"
26bb0f5f
12345
-make: Unknown modifier "hasX"
+make: in target "all": while evaluating variable "12345": Unknown modifier "hasX"
-make: Unknown modifier "hashed"
+make: in target "all": while evaluating variable "12345": Unknown modifier "hashed"
exit status 0
diff --git a/contrib/bmake/unit-tests/varmod-ifelse.exp b/contrib/bmake/unit-tests/varmod-ifelse.exp
index 653fe104ddaa..8b9d41bd2427 100644
--- a/contrib/bmake/unit-tests/varmod-ifelse.exp
+++ b/contrib/bmake/unit-tests/varmod-ifelse.exp
@@ -16,7 +16,7 @@ CondParser_Eval: ${VAR} == value
Comparing "value" == "value"
Comparing "ok" != "ok"
make: "varmod-ifelse.mk" line 158: no.
-make: "varmod-ifelse.mk" line 162: Comparison with '>=' requires both operands 'no' and '10' to be numeric
+make: "varmod-ifelse.mk" line 162: while evaluating variable "string == "literal" || no >= 10": Comparison with '>=' requires both operands 'no' and '10' to be numeric
make: Bad conditional expression 'string == "literal" || no >= 10' before '?yes:no'
make: "varmod-ifelse.mk" line 162: .
make: Bad conditional expression 'string == "literal" && >= 10' before '?yes:no'
diff --git a/contrib/bmake/unit-tests/varmod-ifelse.mk b/contrib/bmake/unit-tests/varmod-ifelse.mk
index 5c8b55d92717..3bf433027950 100644
--- a/contrib/bmake/unit-tests/varmod-ifelse.mk
+++ b/contrib/bmake/unit-tests/varmod-ifelse.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-ifelse.mk,v 1.26 2023/12/10 20:12:28 rillig Exp $
+# $NetBSD: varmod-ifelse.mk,v 1.28 2024/04/23 22:51:28 rillig Exp $
#
# Tests for the ${cond:?then:else} variable modifier, which evaluates either
# the then-expression or the else-expression, depending on the condition.
@@ -156,7 +156,7 @@ STRING= string
NUMBER= no # not really a number
# expect+1: no.
.info ${${STRING} == "literal" && ${NUMBER} >= 10:?yes:no}.
-# expect+3: Comparison with '>=' requires both operands 'no' and '10' to be numeric
+# expect+3: while evaluating variable "string == "literal" || no >= 10": Comparison with '>=' requires both operands 'no' and '10' to be numeric
# expect: make: Bad conditional expression 'string == "literal" || no >= 10' before '?yes:no'
# expect+1: .
.info ${${STRING} == "literal" || ${NUMBER} >= 10:?yes:no}.
@@ -294,7 +294,7 @@ INDIRECT_COND2= $${DELAYED} == "two"
# In the modifier parts for the 'then' and 'else' branches, subexpressions are
-# parsed in by inspecting the actual modifiers. In 2008, 2015, 2020, 2022 and
+# parsed by inspecting the actual modifiers. In 2008, 2015, 2020, 2022 and
# 2023, the exact parsing algorithm switched a few times, counting balanced
# braces instead of proper subexpressions, which meant that unbalanced braces
# were parsed differently, depending on whether the branch was active or not.
diff --git a/contrib/bmake/unit-tests/varmod-indirect.exp b/contrib/bmake/unit-tests/varmod-indirect.exp
index ecf52033ee4b..376beb8edef9 100644
--- a/contrib/bmake/unit-tests/varmod-indirect.exp
+++ b/contrib/bmake/unit-tests/varmod-indirect.exp
@@ -1,5 +1,5 @@
-make: "varmod-indirect.mk" line 19: Unknown modifier "${"
-make: "varmod-indirect.mk" line 52: Unknown modifier "${"
+make: "varmod-indirect.mk" line 19: while evaluating variable "value": Unknown modifier "${"
+make: "varmod-indirect.mk" line 52: while evaluating variable "value": Unknown modifier "${"
make: "varmod-indirect.mk" line 54: warning: FIXME: this expression should have resulted in a parse error rather than returning the unparsed portion of the expression.
make: "varmod-indirect.mk" line 143: before
make: "varmod-indirect.mk" line 143: after
@@ -7,7 +7,7 @@ make: "varmod-indirect.mk" line 151: before
make: "varmod-indirect.mk" line 151: after
make: "varmod-indirect.mk" line 159: before
make: "varmod-indirect.mk" line 159: after
-make: "varmod-indirect.mk" line 164: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 164: while evaluating variable "UNDEF": Unknown modifier "Z"
make: "varmod-indirect.mk" line 167: before
make: "varmod-indirect.mk" line 167: after
Parsing line 176: _:= before ${UNDEF} after
@@ -31,7 +31,7 @@ Parsing line 195: _:= before ${UNDEF:${:UZ}} after
Var_Parse: ${UNDEF:${:UZ}} after (eval-keep-dollar-and-undefined)
Indirect modifier "Z" from "${:UZ}"
Evaluating modifier ${UNDEF:Z} on value "" (eval-keep-dollar-and-undefined, undefined)
-make: "varmod-indirect.mk" line 195: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 195: while evaluating variable "UNDEF": Unknown modifier "Z"
Result of ${UNDEF:Z} is error (eval-keep-dollar-and-undefined, undefined)
Global: _ = before ${UNDEF:Z} after
Parsing line 197: .MAKEFLAGS: -d0
diff --git a/contrib/bmake/unit-tests/varmod-indirect.mk b/contrib/bmake/unit-tests/varmod-indirect.mk
index 99e7215aa639..869231d47ebc 100644
--- a/contrib/bmake/unit-tests/varmod-indirect.mk
+++ b/contrib/bmake/unit-tests/varmod-indirect.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.18 2024/02/04 10:03:10 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.19 2024/04/20 10:18:55 rillig Exp $
#
# Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}.
# These can be used for very basic purposes like converting a string to either
@@ -15,7 +15,7 @@
# The following expression generates a parse error since its indirect
# modifier contains more than a sole expression.
#
-# expect+1: Unknown modifier "${"
+# expect+1: while evaluating variable "value": Unknown modifier "${"
.if ${value:L:${:US}${:U,value,replacement,}} != "S,value,replacement,}"
. warning unexpected
.endif
@@ -47,7 +47,7 @@
# error. Because of this parse error, this feature cannot be used reasonably
# in practice.
#
-# expect+2: Unknown modifier "${"
+# expect+2: while evaluating variable "value": Unknown modifier "${"
#.MAKEFLAGS: -dvc
.if ${value:L:${:UM*}S,value,replaced,} == "M*S,value,replaced,}"
# expect+1: warning: FIXME: this expression should have resulted in a parse error rather than returning the unparsed portion of the expression.
@@ -160,7 +160,7 @@ M_NoPrimes= ${PRIMES:${M_ListToSkip}}
.endfor
# An error in an indirect modifier.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating variable "UNDEF": Unknown modifier "Z"
.for var in before ${UNDEF:${:UZ}} after
# expect+2: before
# expect+1: after
@@ -191,7 +191,7 @@ _:= before ${UNDEF:${:U}} after
# XXX: This expands to ${UNDEF:Z}, which will behave differently if the
# variable '_' is used in a context where the expression ${_} is
# parsed but not evaluated.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating variable "UNDEF": Unknown modifier "Z"
_:= before ${UNDEF:${:UZ}} after
.MAKEFLAGS: -d0
diff --git a/contrib/bmake/unit-tests/varmod-localtime.exp b/contrib/bmake/unit-tests/varmod-localtime.exp
index a7c3ff6ab932..1bb547289edd 100644
--- a/contrib/bmake/unit-tests/varmod-localtime.exp
+++ b/contrib/bmake/unit-tests/varmod-localtime.exp
@@ -1,12 +1,12 @@
-make: "varmod-localtime.mk" line 61: Invalid time value "-1"
+make: "varmod-localtime.mk" line 61: while evaluating "${:L:localtime=-1} != """: Invalid time value "-1"
make: "varmod-localtime.mk" line 61: Malformed conditional (${:L:localtime=-1} != "")
-make: "varmod-localtime.mk" line 72: Invalid time value " 1"
+make: "varmod-localtime.mk" line 72: while evaluating "${:L:localtime= 1} != """: Invalid time value " 1"
make: "varmod-localtime.mk" line 72: Malformed conditional (${:L:localtime= 1} != "")
-make: "varmod-localtime.mk" line 120: Invalid time value "10000000000000000000000000000000"
+make: "varmod-localtime.mk" line 120: while evaluating "${:L:localtime=10000000000000000000000000000000} != """: Invalid time value "10000000000000000000000000000000"
make: "varmod-localtime.mk" line 120: Malformed conditional (${:L:localtime=10000000000000000000000000000000} != "")
-make: "varmod-localtime.mk" line 133: Invalid time value "error"
+make: "varmod-localtime.mk" line 133: while evaluating "${:L:localtime=error} != """: Invalid time value "error"
make: "varmod-localtime.mk" line 133: Malformed conditional (${:L:localtime=error} != "")
-make: "varmod-localtime.mk" line 144: Invalid time value "100000S,1970,bad,"
+make: "varmod-localtime.mk" line 144: while evaluating variable "%Y": Invalid time value "100000S,1970,bad,"
make: "varmod-localtime.mk" line 144: Malformed conditional (${%Y:L:localtime=100000S,1970,bad,} != "bad")
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod-localtime.mk b/contrib/bmake/unit-tests/varmod-localtime.mk
index f6fcc61a7fa6..233e556e0c77 100644
--- a/contrib/bmake/unit-tests/varmod-localtime.mk
+++ b/contrib/bmake/unit-tests/varmod-localtime.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-localtime.mk,v 1.14 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-localtime.mk,v 1.15 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the :localtime variable modifier, which formats a timestamp
# using strftime(3) in local time.
@@ -56,7 +56,7 @@
# 1970. Going back 50 years in the past is not a practical use case for
# make. Therefore, since var.c 1.631, negative time stamps produce a
# parse error.
-# expect+2: Invalid time value "-1"
+# expect+2: while evaluating "${:L:localtime=-1} != """: Invalid time value "-1"
# expect+1: Malformed conditional (${:L:localtime=-1} != "")
.if ${:L:localtime=-1} != ""
. error
@@ -67,7 +67,7 @@
# Spaces were allowed before var.c 1.631 from 2020-10-31 21:40:20, not
# because it would make sense but just as a side-effect from using strtoul.
-# expect+2: Invalid time value " 1"
+# expect+2: while evaluating "${:L:localtime= 1} != """: Invalid time value " 1"
# expect+1: Malformed conditional (${:L:localtime= 1} != "")
.if ${:L:localtime= 1} != ""
. error
@@ -115,7 +115,7 @@
#
# Since var.c 1.631 from 2020-10-31, the overflow is detected and produces a
# parse error.
-# expect+2: Invalid time value "10000000000000000000000000000000"
+# expect+2: while evaluating "${:L:localtime=10000000000000000000000000000000} != """: Invalid time value "10000000000000000000000000000000"
# expect+1: Malformed conditional (${:L:localtime=10000000000000000000000000000000} != "")
.if ${:L:localtime=10000000000000000000000000000000} != ""
. error
@@ -128,7 +128,7 @@
# stopped after the '=', and the remaining string was parsed for more variable
# modifiers. Because of the unknown modifier 'e' from the 'error', the whole
# variable value was discarded and thus not printed.
-# expect+2: Invalid time value "error"
+# expect+2: while evaluating "${:L:localtime=error} != """: Invalid time value "error"
# expect+1: Malformed conditional (${:L:localtime=error} != "")
.if ${:L:localtime=error} != ""
. error
@@ -139,7 +139,7 @@
# Before var.c 1.1050 from 2023-05-09, the timestamp could be directly
# followed by the next modifier, without a ':' separator. This was the same
# bug as for the ':L' and ':P' modifiers.
-# expect+2: Invalid time value "100000S,1970,bad,"
+# expect+2: while evaluating variable "%Y": Invalid time value "100000S,1970,bad,"
# expect+1: Malformed conditional (${%Y:L:localtime=100000S,1970,bad,} != "bad")
.if ${%Y:L:localtime=100000S,1970,bad,} != "bad"
. error
diff --git a/contrib/bmake/unit-tests/varmod-loop-delete.exp b/contrib/bmake/unit-tests/varmod-loop-delete.exp
index 47a2f74545a3..5c508a7a6420 100644
--- a/contrib/bmake/unit-tests/varmod-loop-delete.exp
+++ b/contrib/bmake/unit-tests/varmod-loop-delete.exp
@@ -1,4 +1,4 @@
-make: "varmod-loop-delete.mk" line 20: Cannot delete variable "VAR" while it is used
+make: "varmod-loop-delete.mk" line 20: while evaluating variable "VAR": while evaluating "${:U:@VAR@@} rest of the value": Cannot delete variable "VAR" while it is used
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff --git a/contrib/bmake/unit-tests/varmod-loop-delete.mk b/contrib/bmake/unit-tests/varmod-loop-delete.mk
index 1ec6d361949d..cf0611991194 100644
--- a/contrib/bmake/unit-tests/varmod-loop-delete.mk
+++ b/contrib/bmake/unit-tests/varmod-loop-delete.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-loop-delete.mk,v 1.3 2023/06/01 20:56:35 rillig Exp $
+# $NetBSD: varmod-loop-delete.mk,v 1.4 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the variable modifier ':@', which as a side effect allows to
# delete an arbitrary variable.
@@ -16,7 +16,7 @@ VAR= ${:U:@VAR@@} rest of the value
# In an assignment, the scope is 'Global'. Since the variable 'VAR' is
# defined in the global scope, it deletes itself.
-# expect+1: Cannot delete variable "VAR" while it is used
+# expect+1: while evaluating variable "VAR": while evaluating "${:U:@VAR@@} rest of the value": Cannot delete variable "VAR" while it is used
EVAL:= ${VAR}
.if ${EVAL} != " rest of the value"
. error
diff --git a/contrib/bmake/unit-tests/varmod-loop-varname.exp b/contrib/bmake/unit-tests/varmod-loop-varname.exp
index 2060b51c31df..cefd82093e29 100644
--- a/contrib/bmake/unit-tests/varmod-loop-varname.exp
+++ b/contrib/bmake/unit-tests/varmod-loop-varname.exp
@@ -1,10 +1,10 @@
-make: "varmod-loop-varname.mk" line 18: In the :@ modifier of "", the variable name "${:Ubar:S,b,v,}" must not contain a dollar
+make: "varmod-loop-varname.mk" line 18: while evaluating "${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"": In the :@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar
make: "varmod-loop-varname.mk" line 18: Malformed conditional (${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+")
-make: "varmod-loop-varname.mk" line 89: In the :@ modifier of "1 2 3", the variable name "v$" must not contain a dollar
+make: "varmod-loop-varname.mk" line 89: while evaluating variable "1 2 3": In the :@ modifier, the variable name "v$" must not contain a dollar
make: "varmod-loop-varname.mk" line 89: Malformed conditional (${1 2 3:L:@v$@($v)@} != "(1) (2) (3)")
-make: "varmod-loop-varname.mk" line 96: In the :@ modifier of "1 2 3", the variable name "v$$" must not contain a dollar
+make: "varmod-loop-varname.mk" line 96: while evaluating variable "1 2 3": In the :@ modifier, the variable name "v$$" must not contain a dollar
make: "varmod-loop-varname.mk" line 96: Malformed conditional (${1 2 3:L:@v$$@($v)@} != "() () ()")
-make: "varmod-loop-varname.mk" line 103: In the :@ modifier of "1 2 3", the variable name "v$$$" must not contain a dollar
+make: "varmod-loop-varname.mk" line 103: while evaluating variable "1 2 3": In the :@ modifier, the variable name "v$$$" must not contain a dollar
make: "varmod-loop-varname.mk" line 103: Malformed conditional (${1 2 3:L:@v$$$@($v)@} != "() () ()")
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod-loop-varname.mk b/contrib/bmake/unit-tests/varmod-loop-varname.mk
index 6f7436f277da..7abf8610911a 100644
--- a/contrib/bmake/unit-tests/varmod-loop-varname.mk
+++ b/contrib/bmake/unit-tests/varmod-loop-varname.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-loop-varname.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-loop-varname.mk,v 1.7 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the first part of the variable modifier ':@var@...@', which
# contains the variable name to use during the loop.
@@ -13,7 +13,7 @@
# dynamically. There was no practical use-case for this.
# Since var.c 1.907 from 2021-04-04, a '$' is no longer allowed in the
# variable name.
-# expect+2: In the :@ modifier of "", the variable name "${:Ubar:S,b,v,}" must not contain a dollar
+# expect+2: while evaluating "${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"": In the :@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar
# expect+1: Malformed conditional (${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+")
.if ${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"
. error
@@ -84,21 +84,21 @@ RES3= 3
# There's no point in allowing a dollar sign in that position.
# Since var.c 1.907 from 2021-04-04, a '$' is no longer allowed in the
# variable name.
-# expect+2: In the :@ modifier of "1 2 3", the variable name "v$" must not contain a dollar
+# expect+2: while evaluating variable "1 2 3": In the :@ modifier, the variable name "v$" must not contain a dollar
# expect+1: Malformed conditional (${1 2 3:L:@v$@($v)@} != "(1) (2) (3)")
.if ${1 2 3:L:@v$@($v)@} != "(1) (2) (3)"
. error
.else
. error
.endif
-# expect+2: In the :@ modifier of "1 2 3", the variable name "v$$" must not contain a dollar
+# expect+2: while evaluating variable "1 2 3": In the :@ modifier, the variable name "v$$" must not contain a dollar
# expect+1: Malformed conditional (${1 2 3:L:@v$$@($v)@} != "() () ()")
.if ${1 2 3:L:@v$$@($v)@} != "() () ()"
. error
.else
. error
.endif
-# expect+2: In the :@ modifier of "1 2 3", the variable name "v$$$" must not contain a dollar
+# expect+2: while evaluating variable "1 2 3": In the :@ modifier, the variable name "v$$$" must not contain a dollar
# expect+1: Malformed conditional (${1 2 3:L:@v$$$@($v)@} != "() () ()")
.if ${1 2 3:L:@v$$$@($v)@} != "() () ()"
. error
diff --git a/contrib/bmake/unit-tests/varmod-loop.exp b/contrib/bmake/unit-tests/varmod-loop.exp
index 356946f63a9b..6aef3fe86857 100644
--- a/contrib/bmake/unit-tests/varmod-loop.exp
+++ b/contrib/bmake/unit-tests/varmod-loop.exp
@@ -1,7 +1,9 @@
Parsing line 91: USE_8_DOLLARS= ${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} $$$$$$$$
+Parsing line 92: .if ${USE_8_DOLLARS} != "\$\$\$\$ \$\$\$\$ \$\$\$\$"
CondParser_Eval: ${USE_8_DOLLARS} != "\$\$\$\$ \$\$\$\$ \$\$\$\$"
Comparing "$$$$ $$$$ $$$$" != "$$$$ $$$$ $$$$"
Parsing line 96: SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}
+Parsing line 118: .if ${SUBST_CONTAINING_LOOP} != "\$\$ \$\$\$\$ \$\$\$\$"
CondParser_Eval: ${SUBST_CONTAINING_LOOP} != "\$\$ \$\$\$\$ \$\$\$\$"
Comparing "$$ $$$$ $$$$" != "$$ $$$$ $$$$"
Parsing line 121: .MAKEFLAGS: -d0
diff --git a/contrib/bmake/unit-tests/varmod-match-escape.exp b/contrib/bmake/unit-tests/varmod-match-escape.exp
index 9a8f9ccf6082..d6bd804a7e89 100755
--- a/contrib/bmake/unit-tests/varmod-match-escape.exp
+++ b/contrib/bmake/unit-tests/varmod-match-escape.exp
@@ -33,9 +33,9 @@ Comparing ":" != "::"
make: "varmod-match-escape.mk" line 43: warning: XXX: Oops
Global: .MAKEFLAGS = -r -k -d cv -d
Global: .MAKEFLAGS = -r -k -d cv -d 0
-make: "varmod-match-escape.mk" line 69: Dollar followed by nothing
-make: "varmod-match-escape.mk" line 110: warning: Unfinished character list in pattern '[A-]' of modifier ':M'
-make: "varmod-match-escape.mk" line 110: warning: Unfinished character list in pattern '[^A-]' of modifier ':M'
+make: "varmod-match-escape.mk" line 69: while evaluating "${:U\$:M\$} != """: Dollar followed by nothing
+make: "varmod-match-escape.mk" line 110: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[A-]' of modifier ':M'
+make: "varmod-match-escape.mk" line 110: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^A-]' of modifier ':M'
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff --git a/contrib/bmake/unit-tests/varmod-match-escape.mk b/contrib/bmake/unit-tests/varmod-match-escape.mk
index 1da3918fe1a5..d39ece1cba2c 100755
--- a/contrib/bmake/unit-tests/varmod-match-escape.mk
+++ b/contrib/bmake/unit-tests/varmod-match-escape.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-match-escape.mk,v 1.12 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-match-escape.mk,v 1.13 2024/04/20 10:18:55 rillig Exp $
#
# As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
# depending on whether there was an expression somewhere before the
@@ -65,7 +65,7 @@ VALUES= : :: :\:
# In lint mode, the case of a lonely '$' is covered with an error message.
.MAKEFLAGS: -dL
-# expect+1: Dollar followed by nothing
+# expect+1: while evaluating "${:U\$:M\$} != """: Dollar followed by nothing
.if ${:U\$:M\$} != ""
. error
.endif
@@ -105,8 +105,8 @@ EXP.[^A-]]= a
EXP.[^A-]]]= a]
.for pattern in [A-] [A-]] [A-]]] [^A-] [^A-]] [^A-]]]
-# expect+2: warning: Unfinished character list in pattern '[A-]' of modifier ':M'
-# expect+1: warning: Unfinished character list in pattern '[^A-]' of modifier ':M'
+# expect+2: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[A-]' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^A-]' of modifier ':M'
. if ${WORDS:M${pattern}} != ${EXP.${pattern}}
. warning ${pattern}: ${WORDS:M${pattern}} != ${EXP.${pattern}}
. endif
diff --git a/contrib/bmake/unit-tests/varmod-match.exp b/contrib/bmake/unit-tests/varmod-match.exp
index e4e0783a7b15..3425eae2d421 100644
--- a/contrib/bmake/unit-tests/varmod-match.exp
+++ b/contrib/bmake/unit-tests/varmod-match.exp
@@ -1,14 +1,14 @@
-make: "varmod-match.mk" line 289: warning: Unfinished character list in pattern 'a[' of modifier ':M'
-make: "varmod-match.mk" line 297: warning: Unfinished character list in pattern 'a[^' of modifier ':M'
-make: "varmod-match.mk" line 305: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M'
-make: "varmod-match.mk" line 313: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M'
-make: "varmod-match.mk" line 322: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M'
-make: "varmod-match.mk" line 336: warning: Unfinished character list in pattern '?[\' of modifier ':M'
-make: "varmod-match.mk" line 344: warning: Unfinished character range in pattern '[x-' of modifier ':M'
-make: "varmod-match.mk" line 356: warning: Unfinished character range in pattern '[^x-' of modifier ':M'
-make: "varmod-match.mk" line 364: warning: Unfinished character list in pattern '[' of modifier ':M'
-make: "varmod-match.mk" line 364: Unknown modifier "]"
-make: "varmod-match.mk" line 364: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":")
+make: "varmod-match.mk" line 290: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M'
+make: "varmod-match.mk" line 298: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M'
+make: "varmod-match.mk" line 306: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M'
+make: "varmod-match.mk" line 314: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M'
+make: "varmod-match.mk" line 323: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M'
+make: "varmod-match.mk" line 337: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M'
+make: "varmod-match.mk" line 345: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M'
+make: "varmod-match.mk" line 357: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M'
+make: "varmod-match.mk" line 365: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M'
+make: "varmod-match.mk" line 365: while evaluating variable " : :: ": Unknown modifier "]"
+make: "varmod-match.mk" line 365: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":")
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff --git a/contrib/bmake/unit-tests/varmod-match.mk b/contrib/bmake/unit-tests/varmod-match.mk
index d93d1839192d..e91ddc7ce04b 100644
--- a/contrib/bmake/unit-tests/varmod-match.mk
+++ b/contrib/bmake/unit-tests/varmod-match.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-match.mk,v 1.20 2023/12/17 23:19:02 rillig Exp $
+# $NetBSD: varmod-match.mk,v 1.22 2024/04/23 22:51:28 rillig Exp $
#
# Tests for the ':M' modifier, which keeps only those words that match the
# given pattern.
@@ -33,22 +33,22 @@
# The pattern character '?' matches exactly 1 character, the pattern character
# '*' matches 0 or more characters. The whole pattern matches all words that
# start with 's' and have 3 or more characters.
-.if ${One Two Three Four five six seven:L:Ms??*} != "six seven"
+.if ${One Two Three Four five six seven so s:L:Ms??*} != "six seven"
. error
.endif
-# Ensure that a pattern without placeholders only matches itself.
+# A pattern without placeholders only matches itself.
.if ${a aa aaa b ba baa bab:L:Ma} != "a"
. error
.endif
-# Ensure that a pattern that ends with '*' is properly anchored at the
+# A pattern that ends with '*' is anchored at the
# beginning.
.if ${a aa aaa b ba baa bab:L:Ma*} != "a aa aaa"
. error
.endif
-# Ensure that a pattern that starts with '*' is properly anchored at the end.
+# A pattern that starts with '*' is anchored at the end.
.if ${a aa aaa b ba baa bab:L:M*a} != "a aa aaa ba baa"
. error
.endif
@@ -257,8 +257,9 @@ ${:U*}= asterisk
. error
.endif
-# Without the modifier ':tW', the string is split into words. All whitespace
-# around and between the words is normalized to a single space.
+# Without the modifier ':tW', the string is split into words. Whitespace
+# around the words is discarded, and whitespace between the words is
+# normalized to a single space.
.if ${ plain string :L:M*} != "plain string"
. error
.endif
@@ -285,7 +286,7 @@ ${:U*}= asterisk
# [ Incomplete empty character list, never matches.
WORDS= a a[
-# expect+1: warning: Unfinished character list in pattern 'a[' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M'
.if ${WORDS:Ma[} != ""
. error
.endif
@@ -293,7 +294,7 @@ WORDS= a a[
# [^ Incomplete negated empty character list, matches any single
# character.
WORDS= a a[ aX
-# expect+1: warning: Unfinished character list in pattern 'a[^' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M'
.if ${WORDS:Ma[^} != "a[ aX"
. error
.endif
@@ -301,7 +302,7 @@ WORDS= a a[ aX
# [-x1-3 Incomplete character list, matches those elements that can be
# parsed without lookahead.
WORDS= - + x xx 0 1 2 3 4 [x1-3
-# expect+1: warning: Unfinished character list in pattern '[-x1-3' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M'
.if ${WORDS:M[-x1-3} != "- x 1 2 3"
. error
.endif
@@ -309,7 +310,7 @@ WORDS= - + x xx 0 1 2 3 4 [x1-3
# *[-x1-3 Incomplete character list after a wildcard, matches those
# words that end with one of the characters from the list.
WORDS= - + x xx 0 1 2 3 4 00 01 10 11 000 001 010 011 100 101 110 111 [x1-3
-# expect+1: warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M'
.if ${WORDS:M*[-x1-3} != "- x xx 1 2 3 01 11 001 011 101 111 [x1-3"
. warning ${WORDS:M*[-x1-3}
.endif
@@ -318,7 +319,7 @@ WORDS= - + x xx 0 1 2 3 4 00 01 10 11 000 001 010 011 100 101 110 111 [x1-3
# Incomplete negated character list, matches any character
# except those elements that can be parsed without lookahead.
WORDS= - + x xx 0 1 2 3 4 [x1-3
-# expect+1: warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M'
.if ${WORDS:M[^-x1-3} != "+ 0 4"
. error
.endif
@@ -332,7 +333,7 @@ WORDS= - + x xx 0 1 2 3 4 [x1-3
# '\', as there is no following space that could be escaped.
WORDS= \\ \a ${:Ux\\}
PATTERN= ${:U?[\\}
-# expect+1: warning: Unfinished character list in pattern '?[\' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M'
.if ${WORDS:M${PATTERN}} != "\\\\ x\\"
. error
.endif
@@ -340,7 +341,7 @@ PATTERN= ${:U?[\\}
# [x- Incomplete character list containing an incomplete character
# range, matches only the 'x'.
WORDS= [x- x x- y
-# expect+1: warning: Unfinished character range in pattern '[x-' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M'
.if ${WORDS:M[x-} != "x"
. error
.endif
@@ -352,14 +353,14 @@ WORDS= [x- x x- y
# XXX: Even matches strings that are longer than a single
# character.
WORDS= [x- x x- y yyyyy
-# expect+1: warning: Unfinished character range in pattern '[^x-' of modifier ':M'
+# expect+1: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M'
.if ${WORDS:M[^x-} != "[x- y yyyyy"
. error
.endif
# [:] matches never since the ':' starts the next modifier
-# expect+3: warning: Unfinished character list in pattern '[' of modifier ':M'
-# expect+2: Unknown modifier "]"
+# expect+3: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M'
+# expect+2: while evaluating variable " : :: ": Unknown modifier "]"
# expect+1: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":")
.if ${ ${:U\:} ${:U\:\:} :L:M[:]} != ":"
. error
@@ -372,9 +373,16 @@ WORDS= [x- x x- y yyyyy
# Before var.c 1.1031 from 2022-08-24, the following expressions caused an
# out-of-bounds read beyond the indirect ':M' modifiers.
-.if ${:U:${:UM\\}} # The ':M' pattern need not be unescaped, the
-. error # resulting pattern is '\', it never matches
-.endif # anything.
-.if ${:U:${:UM\\\:\\}} # The ':M' pattern must be unescaped, the
-. error # resulting pattern is ':\', it never matches
-.endif # anything.
+#
+# The argument to the inner ':U' is unescaped to 'M\'.
+# This 'M\' becomes an # indirect modifier ':M' with the pattern '\'.
+# The pattern '\' never matches.
+.if ${:U:${:UM\\}}
+. error
+.endif
+# The argument to the inner ':U' is unescaped to 'M\:\'.
+# This 'M\:\' becomes an indirect modifier ':M' with the pattern ':\'.
+# The pattern ':\' never matches.
+.if ${:U:${:UM\\\:\\}}
+. error
+.endif
diff --git a/contrib/bmake/unit-tests/varmod-mtime.exp b/contrib/bmake/unit-tests/varmod-mtime.exp
index 039173feddc3..87f405573437 100644
--- a/contrib/bmake/unit-tests/varmod-mtime.exp
+++ b/contrib/bmake/unit-tests/varmod-mtime.exp
@@ -1,13 +1,13 @@
-make: "varmod-mtime.mk" line 47: Invalid argument '123x' for modifier ':mtime'
+make: "varmod-mtime.mk" line 47: while evaluating variable "no/such/file": Invalid argument '123x' for modifier ':mtime'
make: "varmod-mtime.mk" line 47: Malformed conditional (${no/such/file:L:mtime=123x})
-make: "varmod-mtime.mk" line 70: Cannot determine mtime for 'no/such/file1': <ENOENT>
-make: "varmod-mtime.mk" line 70: Cannot determine mtime for 'no/such/file2': <ENOENT>
+make: "varmod-mtime.mk" line 70: while evaluating variable "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file1': <ENOENT>
+make: "varmod-mtime.mk" line 70: while evaluating variable "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file2': <ENOENT>
make: "varmod-mtime.mk" line 70: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error})
-make: "varmod-mtime.mk" line 81: Invalid argument 'errorhandler-no' for modifier ':mtime'
+make: "varmod-mtime.mk" line 81: while evaluating variable "MAKEFILE": Invalid argument 'errorhandler-no' for modifier ':mtime'
make: "varmod-mtime.mk" line 81: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0)
-make: "varmod-mtime.mk" line 90: Invalid argument 'warn' for modifier ':mtime'
+make: "varmod-mtime.mk" line 90: while evaluating variable "MAKEFILE": Invalid argument 'warn' for modifier ':mtime'
make: "varmod-mtime.mk" line 90: Malformed conditional (${MAKEFILE:mtime=warn} > 0)
-make: "varmod-mtime.mk" line 115: Unknown modifier "mtim"
+make: "varmod-mtime.mk" line 115: while evaluating variable "anything": Unknown modifier "mtim"
make: "varmod-mtime.mk" line 115: Malformed conditional (${anything:L:mtim})
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod-mtime.mk b/contrib/bmake/unit-tests/varmod-mtime.mk
index 298756e152c1..189bb8cadc9a 100644
--- a/contrib/bmake/unit-tests/varmod-mtime.mk
+++ b/contrib/bmake/unit-tests/varmod-mtime.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-mtime.mk,v 1.9 2023/12/17 14:07:22 rillig Exp $
+# $NetBSD: varmod-mtime.mk,v 1.10 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the ':mtime' variable modifier, which maps each word of the
# expression to that file's modification time.
@@ -42,7 +42,7 @@ not_found_mtime:= ${no/such/file:L:mtime}
# The fallback timestamp must only be an integer, without trailing characters.
-# expect+2: Invalid argument '123x' for modifier ':mtime'
+# expect+2: while evaluating variable "no/such/file": Invalid argument '123x' for modifier ':mtime'
# expect+1: Malformed conditional (${no/such/file:L:mtime=123x})
.if ${no/such/file:L:mtime=123x}
. error
@@ -64,8 +64,8 @@ _!= rm -f ${COOKIE}
# If the optional argument of the ':mtime' modifier is the word 'error', the
# modifier fails with an error message, once for each affected file.
#
-# expect+3: Cannot determine mtime for 'no/such/file1': <ENOENT>
-# expect+2: Cannot determine mtime for 'no/such/file2': <ENOENT>
+# expect+3: while evaluating variable "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file1': <ENOENT>
+# expect+2: while evaluating variable "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file2': <ENOENT>
# expect+1: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error})
.if ${no/such/file1 no/such/file2:L:mtime=error}
. error
@@ -76,7 +76,7 @@ _!= rm -f ${COOKIE}
# Only the word 'error' is a special argument to the ':mtime' modifier, all
# other words result in a parse error.
-# expect+2: Invalid argument 'errorhandler-no' for modifier ':mtime'
+# expect+2: while evaluating variable "MAKEFILE": Invalid argument 'errorhandler-no' for modifier ':mtime'
# expect+1: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0)
.if ${MAKEFILE:mtime=errorhandler-no} > 0
.else
@@ -85,7 +85,7 @@ _!= rm -f ${COOKIE}
# Only the word 'error' can be used as a fallback argument to the modifier.
-# expect+2: Invalid argument 'warn' for modifier ':mtime'
+# expect+2: while evaluating variable "MAKEFILE": Invalid argument 'warn' for modifier ':mtime'
# expect+1: Malformed conditional (${MAKEFILE:mtime=warn} > 0)
.if ${MAKEFILE:mtime=warn} > 0
. error
@@ -110,7 +110,7 @@ end:= ${%s:L:gmtime}
# If there is a typo in the modifier name, it does not match.
-# expect+2: Unknown modifier "mtim"
+# expect+2: while evaluating variable "anything": Unknown modifier "mtim"
# expect+1: Malformed conditional (${anything:L:mtim})
.if ${anything:L:mtim}
. error
diff --git a/contrib/bmake/unit-tests/varmod-range.exp b/contrib/bmake/unit-tests/varmod-range.exp
index 9b0dad40a78e..d9848c2ef4f6 100644
--- a/contrib/bmake/unit-tests/varmod-range.exp
+++ b/contrib/bmake/unit-tests/varmod-range.exp
@@ -1,13 +1,13 @@
make: "varmod-range.mk" line 43: Malformed conditional (${:range=5} != "")
-make: "varmod-range.mk" line 67: Invalid number "x}Rest" != "Rest"" for ':range' modifier
+make: "varmod-range.mk" line 67: while evaluating "${:U:range=x}Rest" != "Rest"": Invalid number "x}Rest" != "Rest"" for ':range' modifier
make: "varmod-range.mk" line 67: Malformed conditional ("${:U:range=x}Rest" != "Rest")
-make: "varmod-range.mk" line 78: Unknown modifier "x0"
+make: "varmod-range.mk" line 78: while evaluating "${:U:range=0x0}Rest" != "Rest"": Unknown modifier "x0"
make: "varmod-range.mk" line 78: Malformed conditional ("${:U:range=0x0}Rest" != "Rest")
-make: "varmod-range.mk" line 96: Unknown modifier "rang"
+make: "varmod-range.mk" line 96: while evaluating variable "a b c": Unknown modifier "rang"
make: "varmod-range.mk" line 96: Malformed conditional ("${a b c:L:rang}Rest" != "Rest")
-make: "varmod-range.mk" line 105: Unknown modifier "rango"
+make: "varmod-range.mk" line 105: while evaluating variable "a b c": Unknown modifier "rango"
make: "varmod-range.mk" line 105: Malformed conditional ("${a b c:L:rango}Rest" != "Rest")
-make: "varmod-range.mk" line 114: Unknown modifier "ranger"
+make: "varmod-range.mk" line 114: while evaluating variable "a b c": Unknown modifier "ranger"
make: "varmod-range.mk" line 114: Malformed conditional ("${a b c:L:ranger}Rest" != "Rest")
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod-range.mk b/contrib/bmake/unit-tests/varmod-range.mk
index 920001096054..2915100bfb79 100644
--- a/contrib/bmake/unit-tests/varmod-range.mk
+++ b/contrib/bmake/unit-tests/varmod-range.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-range.mk,v 1.10 2023/12/17 14:07:22 rillig Exp $
+# $NetBSD: varmod-range.mk,v 1.11 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the :range variable modifier, which generates sequences
# of integers from the given range.
@@ -62,7 +62,7 @@
#
# Since 2020-11-01, the parser issues a more precise "Invalid number" error
# instead.
-# expect+2: Invalid number "x}Rest" != "Rest"" for ':range' modifier
+# expect+2: while evaluating "${:U:range=x}Rest" != "Rest"": Invalid number "x}Rest" != "Rest"" for ':range' modifier
# expect+1: Malformed conditional ("${:U:range=x}Rest" != "Rest")
.if "${:U:range=x}Rest" != "Rest"
. error
@@ -73,7 +73,7 @@
# The upper limit of the range must always be given in decimal.
# This parse error stops at the 'x', trying to parse it as a variable
# modifier.
-# expect+2: Unknown modifier "x0"
+# expect+2: while evaluating "${:U:range=0x0}Rest" != "Rest"": Unknown modifier "x0"
# expect+1: Malformed conditional ("${:U:range=0x0}Rest" != "Rest")
.if "${:U:range=0x0}Rest" != "Rest"
. error
@@ -91,7 +91,7 @@
#.endif
# modifier name too short
-# expect+2: Unknown modifier "rang"
+# expect+2: while evaluating variable "a b c": Unknown modifier "rang"
# expect+1: Malformed conditional ("${a b c:L:rang}Rest" != "Rest")
.if "${a b c:L:rang}Rest" != "Rest"
. error
@@ -100,7 +100,7 @@
.endif
# misspelled modifier name
-# expect+2: Unknown modifier "rango"
+# expect+2: while evaluating variable "a b c": Unknown modifier "rango"
# expect+1: Malformed conditional ("${a b c:L:rango}Rest" != "Rest")
.if "${a b c:L:rango}Rest" != "Rest"
. error
@@ -109,7 +109,7 @@
.endif
# modifier name too long
-# expect+2: Unknown modifier "ranger"
+# expect+2: while evaluating variable "a b c": Unknown modifier "ranger"
# expect+1: Malformed conditional ("${a b c:L:ranger}Rest" != "Rest")
.if "${a b c:L:ranger}Rest" != "Rest"
. error
diff --git a/contrib/bmake/unit-tests/varmod-subst-regex.exp b/contrib/bmake/unit-tests/varmod-subst-regex.exp
index a09046ef764c..25626ba18508 100644
--- a/contrib/bmake/unit-tests/varmod-subst-regex.exp
+++ b/contrib/bmake/unit-tests/varmod-subst-regex.exp
@@ -20,7 +20,7 @@ mod-regex-limits:22-ok:1 33 556
mod-regex-limits:capture:ihgfedcbaabcdefghijABCDEFGHIJa0a1a2rest
make: Regex compilation error: (details omitted)
mod-regex-errors:
-make: Unknown modifier "Z"
+make: in target "mod-regex-errors": while evaluating variable "word": while evaluating "${:U:Z}y,W}": Unknown modifier "Z"
mod-regex-errors: xy
unmatched-subexpression.ok: one one 2 3 5 8 one3 2one 34
make: No match for subexpression \2
diff --git a/contrib/bmake/unit-tests/varmod-subst.exp b/contrib/bmake/unit-tests/varmod-subst.exp
index 97fa2e4f1491..9d88b3d6fa6f 100644
--- a/contrib/bmake/unit-tests/varmod-subst.exp
+++ b/contrib/bmake/unit-tests/varmod-subst.exp
@@ -45,7 +45,7 @@ mod-subst-delimiter:
1 two 3 tilde
mod-subst-chain:
A B c.
-make: Unknown modifier "i"
+make: in target "mod-subst-chain": while evaluating "${:Uvalue:S,a,x,i}.": Unknown modifier "i"
.
mod-subst-dollar:$1:
mod-subst-dollar:$2:
diff --git a/contrib/bmake/unit-tests/varmod-to-separator.exp b/contrib/bmake/unit-tests/varmod-to-separator.exp
index a7d4ddb20147..6bdd6f0c2d43 100644
--- a/contrib/bmake/unit-tests/varmod-to-separator.exp
+++ b/contrib/bmake/unit-tests/varmod-to-separator.exp
@@ -1,6 +1,6 @@
-make: "varmod-to-separator.mk" line 155: Invalid character number at "400:tu}"
+make: "varmod-to-separator.mk" line 155: while evaluating variable "WORDS": Invalid character number at "400:tu}"
make: "varmod-to-separator.mk" line 155: Malformed conditional (${WORDS:[1..3]:ts\400:tu})
-make: "varmod-to-separator.mk" line 171: Invalid character number at "100:tu}"
+make: "varmod-to-separator.mk" line 171: while evaluating variable "WORDS": Invalid character number at "100:tu}"
make: "varmod-to-separator.mk" line 171: Malformed conditional (${WORDS:[1..3]:ts\x100:tu})
make: Bad modifier ":ts\-300" for variable "WORDS"
make: "varmod-to-separator.mk" line 179: Malformed conditional (${WORDS:[1..3]:ts\-300:tu})
@@ -18,7 +18,7 @@ make: Bad modifier ":t\X" for variable "WORDS"
make: "varmod-to-separator.mk" line 232: Malformed conditional (${WORDS:t\X} != "anything")
make: Bad modifier ":ts\69" for variable ""
make: "varmod-to-separator.mk" line 249: Malformed conditional (${:Ua b:ts\69})
-make: "varmod-to-separator.mk" line 258: Invalid character number at "1F60E}"
+make: "varmod-to-separator.mk" line 258: while evaluating "${:Ua b:ts\x1F60E}": Invalid character number at "1F60E}"
make: "varmod-to-separator.mk" line 258: Malformed conditional (${:Ua b:ts\x1F60E})
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod-to-separator.mk b/contrib/bmake/unit-tests/varmod-to-separator.mk
index 57a7bd84ec44..8b8aeb4d3c33 100644
--- a/contrib/bmake/unit-tests/varmod-to-separator.mk
+++ b/contrib/bmake/unit-tests/varmod-to-separator.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-to-separator.mk,v 1.13 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-to-separator.mk,v 1.14 2024/04/20 10:18:55 rillig Exp $
#
# Tests for the :ts variable modifier, which joins the words of the variable
# using an arbitrary character as word separator.
@@ -150,7 +150,7 @@ WORDS= one two three four five six
# for an unsigned character though.
#
# Since 2020-11-01, these out-of-bounds values are rejected.
-# expect+2: Invalid character number at "400:tu}"
+# expect+2: while evaluating variable "WORDS": Invalid character number at "400:tu}"
# expect+1: Malformed conditional (${WORDS:[1..3]:ts\400:tu})
.if ${WORDS:[1..3]:ts\400:tu}
. warning The separator \400 is accepted even though it is out of bounds.
@@ -166,7 +166,7 @@ WORDS= one two three four five six
# The hexadecimal number must be in the range of an unsigned char.
#
# Since 2020-11-01, these out-of-bounds values are rejected.
-# expect+2: Invalid character number at "100:tu}"
+# expect+2: while evaluating variable "WORDS": Invalid character number at "100:tu}"
# expect+1: Malformed conditional (${WORDS:[1..3]:ts\x100:tu})
.if ${WORDS:[1..3]:ts\x100:tu}
. warning The separator \x100 is accepted even though it is out of bounds.
@@ -253,7 +253,7 @@ WORDS= one two three four five six
.endif
# Try whether bmake is Unicode-ready.
-# expect+2: Invalid character number at "1F60E}"
+# expect+2: while evaluating "${:Ua b:ts\x1F60E}": Invalid character number at "1F60E}"
# expect+1: Malformed conditional (${:Ua b:ts\x1F60E})
.if ${:Ua b:ts\x1F60E} # U+1F60E "smiling face with sunglasses"
. error
diff --git a/contrib/bmake/unit-tests/varmod.exp b/contrib/bmake/unit-tests/varmod.exp
index 9ba0cb1d278b..22a7019dfc1a 100644
--- a/contrib/bmake/unit-tests/varmod.exp
+++ b/contrib/bmake/unit-tests/varmod.exp
@@ -1,7 +1,7 @@
make: "varmod.mk" line 101: To escape a dollar, use \$, not $$, at "$$:L} != """
make: "varmod.mk" line 101: Invalid variable name ':', at "$:L} != """
-make: "varmod.mk" line 107: Dollar followed by nothing
-make: "varmod.mk" line 117: Missing delimiter ':' after modifier "P"
+make: "varmod.mk" line 107: while evaluating "${:Uword:@word@${word}$@} != "word"": Dollar followed by nothing
+make: "varmod.mk" line 117: while evaluating variable "VAR": Missing delimiter ':' after modifier "P"
make: "varmod.mk" line 119: Missing argument for ".error"
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
diff --git a/contrib/bmake/unit-tests/varmod.mk b/contrib/bmake/unit-tests/varmod.mk
index 45707ab9b886..c749dfb9659d 100644
--- a/contrib/bmake/unit-tests/varmod.mk
+++ b/contrib/bmake/unit-tests/varmod.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod.mk,v 1.10 2024/02/03 00:20:23 sjg Exp $
+# $NetBSD: varmod.mk,v 1.11 2024/04/20 10:18:56 rillig Exp $
#
# Tests for variable modifiers, such as :Q, :S,from,to or :Ufallback.
#
@@ -103,7 +103,7 @@ DOLLAR2= ${:U\$}
.endif
# A '$' followed by nothing is an error as well.
-# expect+1: Dollar followed by nothing
+# expect+1: while evaluating "${:Uword:@word@${word}$@} != "word"": Dollar followed by nothing
.if ${:Uword:@word@${word}$@} != "word"
. error
.endif
@@ -113,7 +113,7 @@ DOLLAR2= ${:U\$}
# XXX: The .error should not be reached since the expression is
# malformed, and this error should be propagated up to Cond_EvalLine.
VAR= STOP
-# expect+1: Missing delimiter ':' after modifier "P"
+# expect+1: while evaluating variable "VAR": Missing delimiter ':' after modifier "P"
.if ${VAR:P=RE} != "STORE"
# expect+1: Missing argument for ".error"
. error
diff --git a/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp b/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp
index 78c0296f8d76..21942ffdc96d 100644
--- a/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp
+++ b/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp
@@ -1,8 +1,8 @@
all: overrides=<>
make -f varname-dot-makeoverrides.mk stage_1 VAR=value
stage_1: overrides=< VAR>
-make -f varname-dot-makeoverrides.mk stage_2
-stage_2: overrides=< VAR>
+make -f varname-dot-makeoverrides.mk stage_2 .VAR=too
+stage_2: overrides=< VAR .VAR>
make -f varname-dot-makeoverrides.mk stage_3
-stage_3: overrides=< VAR>
+stage_3: overrides=< .VAR VAR>
exit status 0
diff --git a/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk b/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk
index f3f3897f8aa4..966fcb7e0ec9 100644
--- a/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk
+++ b/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varname-dot-makeoverrides.mk,v 1.5 2023/02/25 06:54:08 rillig Exp $
+# $NetBSD: varname-dot-makeoverrides.mk,v 1.6 2024/05/07 18:26:22 sjg Exp $
#
# Tests for the special .MAKEOVERRIDES variable, which lists the names of the
# variables that are passed on to child processes via the MAKEFLAGS
@@ -13,7 +13,7 @@ all:
stage_1:
@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
- ${MAKE} -f ${MAKEFILE} stage_2
+ ${MAKE} -f ${MAKEFILE} stage_2 .VAR=too
stage_2:
@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
diff --git a/contrib/bmake/unit-tests/varname-dot-shell.exp b/contrib/bmake/unit-tests/varname-dot-shell.exp
index 22c2afe218a9..7d481fdf6ff1 100755
--- a/contrib/bmake/unit-tests/varname-dot-shell.exp
+++ b/contrib/bmake/unit-tests/varname-dot-shell.exp
@@ -6,6 +6,7 @@ Command: .SHELL = (details omitted)
Global: ORIG_SHELL = (details omitted)
Parsing line 12: .SHELL= overwritten
Global: ignoring '.SHELL = overwritten' due to a command line variable of the same name
+Parsing line 13: .if ${.SHELL} != ${ORIG_SHELL}
CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined)
Var_Parse: ${ORIG_SHELL} (eval-defined)
@@ -13,6 +14,7 @@ Comparing "(details omitted)" != "(details omitted)"
Parsing line 19: .MAKEFLAGS: .SHELL+=appended
ParseDependency(.MAKEFLAGS: .SHELL+=appended)
Command: ignoring '.SHELL += appended' as it is read-only
+Parsing line 20: .if ${.SHELL} != ${ORIG_SHELL}
CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined)
Var_Parse: ${ORIG_SHELL} (eval-defined)
@@ -21,6 +23,7 @@ Parsing line 27: .undef .SHELL
Global: ignoring delete '.SHELL' as it is not found
Parsing line 28: .SHELL= newly overwritten
Global: ignoring '.SHELL = newly overwritten' due to a command line variable of the same name
+Parsing line 29: .if ${.SHELL} != ${ORIG_SHELL}
CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined)
Var_Parse: ${ORIG_SHELL} (eval-defined)
diff --git a/contrib/bmake/unit-tests/varparse-errors.exp b/contrib/bmake/unit-tests/varparse-errors.exp
index 4193bea181c9..20fee23bddae 100644
--- a/contrib/bmake/unit-tests/varparse-errors.exp
+++ b/contrib/bmake/unit-tests/varparse-errors.exp
@@ -1,5 +1,5 @@
-make: "varparse-errors.mk" line 38: Unknown modifier "Z"
-make: "varparse-errors.mk" line 47: Unknown modifier "Z"
+make: "varparse-errors.mk" line 38: while evaluating "${:U:Z}": Unknown modifier "Z"
+make: "varparse-errors.mk" line 47: while evaluating "${:U:Z}post": Unknown modifier "Z"
make: Bad modifier ":OX" for variable ""
make: "varparse-errors.mk" line 71: Undefined variable "${:U:OX"
make: Bad modifier ":OX" for variable ""
diff --git a/contrib/bmake/unit-tests/varparse-errors.mk b/contrib/bmake/unit-tests/varparse-errors.mk
index fc94d9dd3d18..edb02ef0b957 100644
--- a/contrib/bmake/unit-tests/varparse-errors.mk
+++ b/contrib/bmake/unit-tests/varparse-errors.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varparse-errors.mk,v 1.11 2023/11/19 22:32:44 rillig Exp $
+# $NetBSD: varparse-errors.mk,v 1.12 2024/04/20 10:18:56 rillig Exp $
# Tests for parsing and evaluating all kinds of expressions.
#
@@ -34,7 +34,7 @@ ERR_EVAL= An evaluation error ${:Uvalue:C,.,\3,}.
# As of 2020-12-01, errors in the variable name are silently ignored.
# Since var.c 1.754 from 2020-12-20, unknown modifiers at parse time result
# in an error message and a non-zero exit status.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:U:Z}": Unknown modifier "Z"
VAR.${:U:Z}= unknown modifier in the variable name
.if ${VAR.} != "unknown modifier in the variable name"
. error
@@ -43,7 +43,7 @@ VAR.${:U:Z}= unknown modifier in the variable name
# As of 2020-12-01, errors in the variable name are silently ignored.
# Since var.c 1.754 from 2020-12-20, unknown modifiers at parse time result
# in an error message and a non-zero exit status.
-# expect+1: Unknown modifier "Z"
+# expect+1: while evaluating "${:U:Z}post": Unknown modifier "Z"
VAR.${:U:Z}post= unknown modifier with text in the variable name
.if ${VAR.post} != "unknown modifier with text in the variable name"
. error
diff --git a/contrib/bmake/var.c b/contrib/bmake/var.c
index 54d6ef57c497..ec0a23e05a67 100644
--- a/contrib/bmake/var.c
+++ b/contrib/bmake/var.c
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1101 2024/03/01 17:53:30 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1109 2024/05/07 18:26:22 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -81,8 +81,7 @@
* Var_End Clean up the module.
*
* Var_Set
- * Var_SetExpand
- * Set the value of the variable, creating it if
+ * Var_SetExpand Set the value of the variable, creating it if
* necessary.
*
* Var_Append
@@ -102,8 +101,7 @@
*
* Var_Parse Parse an expression such as ${VAR:Mpattern}.
*
- * Var_Delete
- * Delete a variable.
+ * Var_Delete Delete a variable.
*
* Var_ReexportVars
* Export some or even all variables to the environment
@@ -118,9 +116,6 @@
* Var_Stats Print out hashing statistics if in -dh mode.
*
* Var_Dump Print out all variables defined in the given scope.
- *
- * XXX: There's a lot of almost duplicate code in these functions that only
- * differs in subtle details that are not mentioned in the manual page.
*/
#include <sys/stat.h>
@@ -148,7 +143,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1101 2024/03/01 17:53:30 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1109 2024/05/07 18:26:22 sjg Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -158,7 +153,7 @@ MAKE_RCSID("$NetBSD: var.c,v 1.1101 2024/03/01 17:53:30 rillig Exp $");
* There are 3 kinds of variables: scope variables, environment variables,
* undefined variables.
*
- * Scope variables are stored in a GNode.scope. The only way to undefine
+ * Scope variables are stored in GNode.vars. The only way to undefine
* a scope variable is using the .undef directive. In particular, it must
* not be possible to undefine a variable during the evaluation of an
* expression, or Var.name might point nowhere. (There is another,
@@ -193,7 +188,7 @@ typedef struct Var {
/*
* The variable comes from the environment.
- * Appending to its value moves the variable to the global scope.
+ * Appending to its value depends on the scope, see var-op-append.mk.
*/
bool fromEnvironment:1;
@@ -269,6 +264,18 @@ typedef struct SepBuf {
char sep;
} SepBuf;
+typedef struct {
+ const char *target;
+ const char *varname;
+ const char *expr;
+} EvalStackElement;
+
+typedef struct {
+ EvalStackElement *elems;
+ size_t len;
+ size_t cap;
+ Buffer details;
+} EvalStack;
/* Whether we have replaced the original environ (which we cannot free). */
char **savedEnv = NULL;
@@ -337,6 +344,58 @@ static const char VarEvalMode_Name[][32] = {
"eval-keep-dollar-and-undefined",
};
+static EvalStack evalStack;
+
+
+void
+EvalStack_Push(const char *target, const char *expr, const char *varname)
+{
+ if (evalStack.len >= evalStack.cap) {
+ evalStack.cap = 16 + 2 * evalStack.cap;
+ evalStack.elems = bmake_realloc(evalStack.elems,
+ evalStack.cap * sizeof(*evalStack.elems));
+ }
+ evalStack.elems[evalStack.len].target = target;
+ evalStack.elems[evalStack.len].expr = expr;
+ evalStack.elems[evalStack.len].varname = varname;
+ evalStack.len++;
+}
+
+void
+EvalStack_Pop(void)
+{
+ assert(evalStack.len > 0);
+ evalStack.len--;
+}
+
+const char *
+EvalStack_Details(void)
+{
+ size_t i;
+ Buffer *buf = &evalStack.details;
+
+
+ buf->len = 0;
+ for (i = 0; i < evalStack.len; i++) {
+ EvalStackElement *elem = evalStack.elems + i;
+ if (elem->target != NULL) {
+ Buf_AddStr(buf, "in target \"");
+ Buf_AddStr(buf, elem->target);
+ Buf_AddStr(buf, "\": ");
+ }
+ if (elem->expr != NULL) {
+ Buf_AddStr(buf, "while evaluating \"");
+ Buf_AddStr(buf, elem->expr);
+ Buf_AddStr(buf, "\": ");
+ }
+ if (elem->varname != NULL) {
+ Buf_AddStr(buf, "while evaluating variable \"");
+ Buf_AddStr(buf, elem->varname);
+ Buf_AddStr(buf, "\": ");
+ }
+ }
+ return buf->len > 0 ? buf->data : "";
+}
static Var *
VarNew(FStr name, const char *value,
@@ -432,11 +491,8 @@ VarFindSubstring(Substring name, GNode *scope, bool elsewhere)
}
if (var == NULL) {
- FStr envName;
- const char *envValue;
-
- envName = Substring_Str(name);
- envValue = getenv(envName.str);
+ FStr envName = Substring_Str(name);
+ const char *envValue = getenv(envName.str);
if (envValue != NULL)
return VarNew(envName, envValue, true, true, false);
FStr_Done(&envName);
@@ -951,9 +1007,10 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val,
if (v == NULL) {
if (scope == SCOPE_CMDLINE && !(flags & VAR_SET_NO_EXPORT)) {
/*
- * This var would normally prevent the same name being
- * added to SCOPE_GLOBAL, so delete it from there if
- * needed. Otherwise -V name may show the wrong value.
+ * This variable would normally prevent the same name
+ * being added to SCOPE_GLOBAL, so delete it from
+ * there if needed. Otherwise -V name may show the
+ * wrong value.
*
* See ExistsInCmdline.
*/
@@ -991,7 +1048,7 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val,
* exported to the environment (as per POSIX standard), except
* for internals.
*/
- if (!(flags & VAR_SET_NO_EXPORT) && name[0] != '.') {
+ if (!(flags & VAR_SET_NO_EXPORT)) {
/*
* If requested, don't export these in the
@@ -1000,14 +1057,11 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val,
* command-line settings continue to override
* Makefile settings.
*/
- if (!opts.varNoExportEnv)
+ if (!opts.varNoExportEnv && name[0] != '.')
setenv(name, val, 1);
- /* XXX: What about .MAKE.EXPORTED? */
- /*
- * XXX: Why not just mark the variable for
- * needing export, as in ExportVarPlain?
- */
- Global_Append(".MAKEOVERRIDES", name);
+
+ if (!(flags & VAR_SET_INTERNAL))
+ Global_Append(".MAKEOVERRIDES", name);
}
}
@@ -2336,9 +2390,9 @@ ApplyModifier_Loop(const char **pp, ModChain *ch)
args.var = tvar.str;
if (strchr(args.var, '$') != NULL) {
Parse_Error(PARSE_FATAL,
- "In the :@ modifier of \"%s\", the variable name \"%s\" "
+ "In the :@ modifier, the variable name \"%s\" "
"must not contain a dollar",
- expr->name, args.var);
+ args.var);
return AMR_CLEANUP;
}
@@ -2480,22 +2534,22 @@ ApplyModifier_Time(const char **pp, ModChain *ch)
if (args[0] == '=') {
const char *p = args + 1;
LazyBuf buf;
+ FStr arg;
if (!ParseModifierPartSubst(&p, true, '\0', ch->expr->emode,
ch, &buf, NULL, NULL))
return AMR_CLEANUP;
+ arg = LazyBuf_DoneGet(&buf);
if (ModChain_ShouldEval(ch)) {
- Substring arg = LazyBuf_Get(&buf);
- const char *arg_p = arg.start;
- if (!TryParseTime(&arg_p, &t) || arg_p != arg.end) {
+ const char *arg_p = arg.str;
+ if (!TryParseTime(&arg_p, &t) || *arg_p != '\0') {
Parse_Error(PARSE_FATAL,
- "Invalid time value \"%.*s\"",
- (int)Substring_Length(arg), arg.start);
- LazyBuf_Done(&buf);
+ "Invalid time value \"%s\"", arg.str);
+ FStr_Done(&arg);
return AMR_CLEANUP;
}
} else
t = 0;
- LazyBuf_Done(&buf);
+ FStr_Done(&arg);
*pp = p;
} else {
t = 0;
@@ -3076,28 +3130,20 @@ ok:
static char *
str_toupper(const char *str)
{
- char *res;
- size_t i, len;
-
- len = strlen(str);
- res = bmake_malloc(len + 1);
- for (i = 0; i < len + 1; i++)
+ size_t i, n = strlen(str) + 1;
+ char *res = bmake_malloc(n);
+ for (i = 0; i < n; i++)
res[i] = ch_toupper(str[i]);
-
return res;
}
static char *
str_tolower(const char *str)
{
- char *res;
- size_t i, len;
-
- len = strlen(str);
- res = bmake_malloc(len + 1);
- for (i = 0; i < len + 1; i++)
+ size_t i, n = strlen(str) + 1;
+ char *res = bmake_malloc(n);
+ for (i = 0; i < n; i++)
res[i] = ch_tolower(str[i]);
-
return res;
}
@@ -4390,7 +4436,7 @@ Expr_Init(const char *name, FStr value,
* by .for loops and are boring, so evaluate them without debug logging.
*/
static bool
-Var_Parse_FastLane(const char **pp, VarEvalMode emode, FStr *out_value)
+Var_Parse_U(const char **pp, VarEvalMode emode, FStr *out_value)
{
const char *p;
@@ -4449,8 +4495,7 @@ Var_Parse_FastLane(const char **pp, VarEvalMode emode, FStr *out_value)
FStr
Var_Parse(const char **pp, GNode *scope, VarEvalMode emode)
{
- const char *p = *pp;
- const char *const start = p;
+ const char *start, *p;
bool haveModifier; /* true for ${VAR:...}, false for ${VAR} */
char startc; /* the actual '{' or '(' or '\0' */
char endc; /* the expected '}' or ')' or '\0' */
@@ -4467,9 +4512,11 @@ Var_Parse(const char **pp, GNode *scope, VarEvalMode emode)
scope, DEF_REGULAR);
FStr val;
- if (Var_Parse_FastLane(pp, emode, &val))
+ if (Var_Parse_U(pp, emode, &val))
return val;
+ p = *pp;
+ start = p;
DEBUG2(VAR, "Var_Parse: %s (%s)\n", start, VarEvalMode_Name[emode]);
val = FStr_InitRefer(NULL);
@@ -4510,7 +4557,7 @@ Var_Parse(const char **pp, GNode *scope, VarEvalMode emode)
* while its value is still being used:
*
* VAR= value
- * _:= ${VAR:${:U@VAR@loop@}:S,^,prefix,}
+ * _:= ${VAR:${:U:@VAR@@}:S,^,prefix,}
*
* The same effect might be achievable using the '::=' or the ':_'
* modifiers.
@@ -4521,6 +4568,11 @@ Var_Parse(const char **pp, GNode *scope, VarEvalMode emode)
*/
expr.value = FStr_InitRefer(v->val.data);
+ if (expr.name[0] != '\0')
+ EvalStack_Push(NULL, NULL, expr.name);
+ else
+ EvalStack_Push(NULL, start, NULL);
+
/*
* Before applying any modifiers, expand any nested expressions from
* the variable value.
@@ -4577,6 +4629,7 @@ Var_Parse(const char **pp, GNode *scope, VarEvalMode emode)
VarFreeShortLived(v);
}
+ EvalStack_Pop();
return expr.value;
}
@@ -4664,10 +4717,9 @@ VarSubstPlain(const char **pp, Buffer *res)
* given string.
*
* Input:
- * str The string in which the expressions are
- * expanded.
- * scope The scope in which to start searching for
- * variables. The other scopes are searched as well.
+ * str The string in which the expressions are expanded.
+ * scope The scope in which to start searching for variables.
+ * The other scopes are searched as well.
* emode The mode for parsing or evaluating subexpressions.
*/
char *
@@ -4694,7 +4746,7 @@ Var_Subst(const char *str, GNode *scope, VarEvalMode emode)
VarSubstPlain(&p, &res);
}
- return Buf_DoneDataCompact(&res);
+ return Buf_DoneData(&res);
}
void
diff --git a/contrib/bsddialog/CHANGELOG b/contrib/bsddialog/CHANGELOG
index e6295768d906..0e75f847347d 100644
--- a/contrib/bsddialog/CHANGELOG
+++ b/contrib/bsddialog/CHANGELOG
@@ -1,3 +1,35 @@
+2024-04-11 Version 1.0.2
+
+ Utility:
+ improvements and changes for --form and --mixedform:
+ * add: <maxletters> 0 sets <maxletters> like <fieldlen>.
+ * add: <fieldlen> 0 sets <fieldlen> like <init> width and readonly.
+ * change: <maxletters> 0 was an error (remains error in lib).
+ * change: <fieldlen> 0 was an error (remains error in lib)
+ (<fieldlen> 0 and <init> "" is still an error.).
+
+ Library and implicitly utility:
+ * add: Ctrl-l to redraw dialog.
+ Request stable@freebsd.org January 2024.
+ * add: -, +, Ctrl-p, Ctrl-n for several dialogs.
+ +, - request for menus, private feature request.
+ Ctrl-p, Ctrl-n for menu, request hackers@freebsd.org February 2024.
+ * fix: escaped text ending with an escape symbol.
+ * change: truncate mixedgauge long (over the screen/minibars)
+ minilabels adding "...". As a result, avoid check-size error.
+ https://gitlab.com/alfix/bsddialog/-/issues/6.
+ * change: invert UP/DOWN keys to set a rangebox value.
+
+
+2023-11-16 Version 1.0.1
+
+ Library Internal Refactoring:
+ * add: arrow macro handlers.
+ * change: Box-drawing characters, from utf8 to wide chars to avoid to
+ handle "env NCURSES_NO_UTF8_ACS=1".
+ Request https://bugs.freebsd.org/274472,
+ Rationale https://reviews.freebsd.org/D42380.
+
2023-08-01 Version 1.0
Utility:
diff --git a/contrib/bsddialog/LICENSE b/contrib/bsddialog/LICENSE
index d19ad87fca1f..7b36a8dce42e 100644
--- a/contrib/bsddialog/LICENSE
+++ b/contrib/bsddialog/LICENSE
@@ -1,6 +1,6 @@
BSD 2-Clause License
-Copyright (c) 2021-2023, Alfonso Sabato Siciliano
+Copyright (c) 2021-2024, Alfonso Sabato Siciliano
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bsddialog/Makefile b/contrib/bsddialog/Makefile
index 884cfa1b3e60..e6ec9988c59d 100644
--- a/contrib/bsddialog/Makefile
+++ b/contrib/bsddialog/Makefile
@@ -3,8 +3,8 @@
#
# Written in 2023 by Alfonso Sabato Siciliano
-OUTPUT = bsddialog
-export VERSION=1.0
+OUTPUT = bsddialog
+export VERSION=1.0.2
.CURDIR ?= ${CURDIR}
LIBPATH = ${.CURDIR}/lib
LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so
@@ -13,14 +13,14 @@ UTILITYPATH = ${.CURDIR}/utility
RM= rm -f
LN = ln -s -f
-### cli options ###
-# port/pkg Makefile: 'MAKE_ARGS = -DNORPATH'
+### command-line options ###
+# FreeBSD port Makefile: 'MAKE_ARGS = -DNORPATH'
NORPATH ?=
export DISABLERPATH=${NORPATH}
-# `make -DDEBUG`
-# `gmake DEBUG=1`
+# Debug: `make -DDEBUG` or `gmake DEBUG=1`
DEBUG ?=
export ENABLEDEBUG=${DEBUG}
+###################
all : ${OUTPUT}
diff --git a/contrib/bsddialog/README.md b/contrib/bsddialog/README.md
index f4846ec07745..a902f7fada7a 100644
--- a/contrib/bsddialog/README.md
+++ b/contrib/bsddialog/README.md
@@ -1,4 +1,4 @@
-# BSDDialog 1.0
+# BSDDialog 1.0.2
This project provides **bsddialog** and **libbsddialog**, an utility
and a library to build scripts and tools with TUI dialogs and widgets.
@@ -114,18 +114,27 @@ in the _Public Domain_ to build new projects:
## TODO and Ideas
- - menubar feature
- - key callback
- - Right-To-Left text
+ - menubar feature.
+ - key callback.
+ - Right-To-Left text.
- some terminal does not hide the cursor, move it bottom-right before to getch.
- - refactor backtitle: multiline, conf.backtitle, WINDOW \*dialog.backtitle.
- - refactor bottomdesc: WINDOW \*dialog.bottomdesc -> fix expandig screen.
- - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base
+ - refactor backtitle: add WINDOW \*dialog.backtitle for multiline and fix expanding screen.
+ - refactor bottomdesc: add WINDOW \*dialog.bottomdesc to fix expandig screen.
+ - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base.
- add bool conf.menu.depthlines.
- implement custom getopt\_long().
- refactor/redesign gauge().
- improve grey lines expanding terminal (maybe redrawwin() in hide\_dialog()).
- more restrictive strtol() and strtoul().
- implement global buttons handler.
- - add/move external tutorial.
- - implement menutype.min_on.
+ - doc: external tutorial, theming guide.
+ - implement menutype.min\_on.
+ - improve refresh at startup, avoid dialog refresh before drawing text.
+ - add debug API: bsddialog\_debug(y,x,refresh,"fmt",...).
+ - add mouse support.
+ - use alarm(2) for bsddialog\_pause.
+ - delete form fieldlen constraint, hide or truncate long field in little screens.
+ - improve --inputbox autosizing, consider also input length.
+ - fix --form "" 0 0 0 Label 1 0 Init 1 12 0 0 (with 0 editable field).
+ - fix --mixedform "" 0 0 0 Label 1 0 Init 1 12 0 0 2 (with 0 editable field).
+ - add *text* customization to --hmsg *help-message*
diff --git a/contrib/bsddialog/examples_library/gauge.c b/contrib/bsddialog/examples_library/gauge.c
index 3b38a80f3f2c..8ed1a8f57664 100644
--- a/contrib/bsddialog/examples_library/gauge.c
+++ b/contrib/bsddialog/examples_library/gauge.c
@@ -50,7 +50,7 @@ int main()
conf.title = "gauge";
rv = bsddialog_gauge(&conf, "Example", 7, 30, 0, fd[0], "SEP", "EOF");
bsddialog_end();
- if(rv == BSDDIALOG_ERROR)
+ if (rv == BSDDIALOG_ERROR)
printf("Error: %s\n", bsddialog_geterror());
return (0);
diff --git a/contrib/bsddialog/examples_library/mixedgauge.c b/contrib/bsddialog/examples_library/mixedgauge.c
index 7666867902fb..e74bb3512a9a 100644
--- a/contrib/bsddialog/examples_library/mixedgauge.c
+++ b/contrib/bsddialog/examples_library/mixedgauge.c
@@ -69,7 +69,7 @@ int main()
minipercs[12] = i * 10;
retval= bsddialog_mixedgauge(&conf, "Example", 20, 40,
50 + i * 5, NMINIBAR, minilabels, minipercs);
- if(retval == BSDDIALOG_ERROR)
+ if (retval == BSDDIALOG_ERROR)
exit_error();
sleep(1);
}
diff --git a/contrib/bsddialog/lib/barbox.c b/contrib/bsddialog/lib/barbox.c
index cd9fee836f8a..4feea20c6441 100644
--- a/contrib/bsddialog/lib/barbox.c
+++ b/contrib/bsddialog/lib/barbox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -36,11 +36,11 @@
#include "bsddialog_theme.h"
#include "lib_util.h"
-#define BARPADDING 2 /* widget border | BARPADDING | box bar */
+#define BARPADDING 2 /* Dialog border | BARPADDING | box bar */
#define BOXBORDERS 2
#define MIN_WBAR 15
#define MIN_WBOX (BARPADDING + BOXBORDERS + MIN_WBAR + BARPADDING)
-#define MIN_WMGBAR 18
+#define MIN_WMGBAR 18 /* Mixedgauge main bar */
#define MIN_WMGBOX (BARPADDING + BOXBORDERS + MIN_WMGBAR + BARPADDING)
#define HBOX 3
#define WBOX(d) ((d)->w - BORDERS - BARPADDING - BARPADDING)
@@ -206,12 +206,64 @@ bsddialog_gauge(struct bsddialog_conf *conf, const char *text, int rows,
}
/* Mixedgauge */
+static void
+mvwaddcstr(WINDOW *win, int y, int x, const char *mbstring, unsigned int cols)
+{
+ size_t charlen, n, w;
+ mbstate_t mbs;
+ const char *pmbstring;
+ wchar_t wch;
+
+ w = n = 0;
+ pmbstring = mbstring;
+ memset(&mbs, 0, sizeof(mbs));
+ while ((charlen = mbrlen(pmbstring, MB_CUR_MAX, &mbs)) != 0 &&
+ charlen != (size_t)-1 && charlen != (size_t)-2) {
+ mbtowc(&wch, pmbstring, charlen);
+ w += (wch == L'\t') ? TABSIZE : wcwidth(wch);
+ if (w > cols)
+ break;
+ pmbstring += charlen;
+ n += charlen;
+ }
+ mvwaddnstr(win, y, x, mbstring, n);
+ if(w > cols)
+ mvwaddstr(win, y, (x + cols) - 3, "...");
+}
+
+static int
+mixedgauge_size_position(struct dialog *d, int nminibars,
+ const char **minilabels, int *htext)
+{
+ int i, max_minibarlen;
+
+ max_minibarlen = 0;
+ for (i = 0; i < (int)nminibars; i++)
+ max_minibarlen = MAX(max_minibarlen,
+ (int)strcols(CHECK_STR(minilabels[i])));
+ max_minibarlen += 18; /* ' '<max_minibarlen>' ['13'] ' */
+ max_minibarlen = MAX(max_minibarlen, MIN_WMGBOX); /* mainbar */
+
+ if (set_widget_size(d->conf, d->rows, d->cols, &d->h, &d->w) != 0)
+ return (BSDDIALOG_ERROR);
+ if (set_widget_autosize(d->conf, d->rows, d->cols, &d->h, &d->w,
+ d->text, htext, &d->bs, nminibars + HBOX, max_minibarlen) != 0)
+ return (BSDDIALOG_ERROR);
+ if (widget_checksize(d->h, d->w, &d->bs, nminibars + HBOX,
+ MIN_WMGBOX) != 0)
+ return (BSDDIALOG_ERROR);
+ if (set_widget_position(d->conf, &d->y, &d->x, d->h, d->w) != 0)
+ return (BSDDIALOG_ERROR);
+
+ return (0);
+}
+
static int
do_mixedgauge(struct bsddialog_conf *conf, const char *text, int rows, int cols,
unsigned int mainperc, unsigned int nminibars, const char **minilabels,
int *minipercs, bool color)
{
- int i, miniperc, max_minibarlen;
+ int i, miniperc;
int ystext, htext;
int minicolor, red, green;
struct bar b;
@@ -223,17 +275,9 @@ do_mixedgauge(struct bsddialog_conf *conf, const char *text, int rows, int cols,
red = bsddialog_color(BSDDIALOG_WHITE,BSDDIALOG_RED, BSDDIALOG_BOLD);
green = bsddialog_color(BSDDIALOG_WHITE,BSDDIALOG_GREEN,BSDDIALOG_BOLD);
- max_minibarlen = 0;
- for (i = 0; i < (int)nminibars; i++)
- max_minibarlen = MAX(max_minibarlen,
- (int)strcols(CHECK_STR(minilabels[i])));
- max_minibarlen += 3 + 16; /* seps + [...] */
- max_minibarlen = MAX(max_minibarlen, MIN_WMGBOX); /* mainbar */
-
if (prepare_dialog(conf, text, rows, cols, &d) != 0)
return (BSDDIALOG_ERROR);
- if (dialog_size_position(&d, nminibars + HBOX, max_minibarlen,
- &htext) != 0)
+ if (mixedgauge_size_position(&d, nminibars, minilabels, &htext) != 0)
return (BSDDIALOG_ERROR);
if (draw_dialog(&d) != 0)
return (BSDDIALOG_ERROR);
@@ -249,7 +293,7 @@ do_mixedgauge(struct bsddialog_conf *conf, const char *text, int rows, int cols,
/* label */
if (color && miniperc >= 0)
wattron(d.widget, A_BOLD);
- mvwaddstr(d.widget, i+1, 2, CHECK_STR(minilabels[i]));
+ mvwaddcstr(d.widget, i+1, 2, CHECK_STR(minilabels[i]), d.w-20);
if (color && miniperc >= 0)
wattroff(d.widget, A_BOLD);
/* perc */
@@ -472,10 +516,12 @@ bsddialog_rangebox(struct bsddialog_conf *conf, const char *text, int rows,
}
break;
case '\t': /* TAB */
+ case KEY_CTRL('n'):
case KEY_RIGHT:
d.bs.curr = (d.bs.curr + 1) % d.bs.nbuttons;
DRAW_BUTTONS(d);
break;
+ case KEY_CTRL('p'):
case KEY_LEFT:
d.bs.curr--;
if (d.bs.curr < 0)
@@ -502,15 +548,17 @@ bsddialog_rangebox(struct bsddialog_conf *conf, const char *text, int rows,
currvalue = max;
b.toupdate = true;
break;
+ case '-':
case KEY_UP:
- if (currvalue < max) {
- currvalue++;
+ if (currvalue > min) {
+ currvalue--;
b.toupdate = true;
}
break;
+ case '+':
case KEY_DOWN:
- if (currvalue > min) {
- currvalue--;
+ if (currvalue < max) {
+ currvalue++;
b.toupdate = true;
}
break;
@@ -523,6 +571,7 @@ bsddialog_rangebox(struct bsddialog_conf *conf, const char *text, int rows,
if (rangebox_redraw(&d, &b, &bigchange) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (rangebox_redraw(&d, &b, &bigchange) != 0)
return (BSDDIALOG_ERROR);
@@ -641,6 +690,7 @@ bsddialog_pause(struct bsddialog_conf *conf, const char *text, int rows,
if (pause_redraw(&d, &b) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (pause_redraw(&d, &b) != 0)
return (BSDDIALOG_ERROR);
diff --git a/contrib/bsddialog/lib/bsddialog.3 b/contrib/bsddialog/lib/bsddialog.3
index 38885bfe3ea4..cbf1653a2aca 100644
--- a/contrib/bsddialog/lib/bsddialog.3
+++ b/contrib/bsddialog/lib/bsddialog.3
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+.\" Copyright (c) 2021-2024 Alfonso Sabato Siciliano
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 28, 2023
+.Dd March 16, 2024
.Dt BSDDIALOG 3
.Os
.Sh NAME
@@ -719,9 +719,8 @@ the loop ends reading
builds a dialog without buttons and returns instantly.
.Pp
.Fn bsddialog_menu
-builds a dialog to select an item from a list via SPACE or ENTER.
-An item is
-defined like:
+builds a dialog to select an item from a list via SPACE and ENTER.
+An item is defined like:
.Pp
.Bd -literal -offset indent -compact
struct bsddialog_menuitem {
@@ -878,14 +877,13 @@ and
.Fa max .
.Fa value
is the default value on startup and the selected value at exit.
-The current value is printed inside a bar, the keys UP, DOWN, HOME, END, PAGEUP
-and PAGEDOWN can change it.
+The current value is printed inside a bar.
.Pp
.Fn bsddialog_textbox
opens and prints
.Fa file .
-UP, DOWN, LEFT, RIGHT, HOME, END, PAGEUP and PAGEDOWN keys are available to
-navigate the file, TAB changes button.
+TAB key changes button.
+Extra keys 0, h, l, k, j are available to navigate the text.
.Dq OK
button is renamed
.Dq EXIT .
@@ -901,7 +899,24 @@ are default values on startup, selected time at exit.
.Fn bsddialog_yesno
provides a dialog for a
.Dq Yes-No Question ,
-the labels on buttons are Yes and No.
+the labels on buttons are
+.Dq Yes
+and
+.Dq No .
+.Ss Keys
+.Bl -tag -width Ds
+.It Ctrl-l
+Redraw the dialog.
+.It F1
+Refer to
+.Fa conf.key.f1_file
+and
+.Fa conf.key.f1_message .
+.It SPACE
+Select menu item.
+.It UP DOWN LEFT RIGHT - + HOME END PAGEUP PAGEDOWN Ctrl-p Ctrl-n TAB
+Navigate elements and set value, depending on the dialog.
+.El
.Ss Theme
The graphical properties are global to the library.
They are represented by
@@ -1089,7 +1104,7 @@ case BSDDIALOG_YES:
printf("Yes\\n");
break;
case BSDDIALOG_NO
- printf("NO\\n");
+ printf("No\\n");
break;
case BSDDIALOG_ERROR:
printf("Error: %s\\n", bsddialog_geterror());
diff --git a/contrib/bsddialog/lib/bsddialog.h b/contrib/bsddialog/lib/bsddialog.h
index d997036b1f9f..08fb25b8701c 100644
--- a/contrib/bsddialog/lib/bsddialog.h
+++ b/contrib/bsddialog/lib/bsddialog.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
#include <stdbool.h>
-#define LIBBSDDIALOG_VERSION "1.0"
+#define LIBBSDDIALOG_VERSION "1.0.2"
/* Return values */
#define BSDDIALOG_ERROR -1
diff --git a/contrib/bsddialog/lib/datebox.c b/contrib/bsddialog/lib/datebox.c
index 9f26b2d08093..ee955471799e 100644
--- a/contrib/bsddialog/lib/datebox.c
+++ b/contrib/bsddialog/lib/datebox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2022-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2022-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -120,7 +120,7 @@ init_date(unsigned int *year, unsigned int *month, unsigned int *day, int *yy,
if (*mm == 0)
*mm = 1;
*dd = (*day == 0) ? 1 : *day;
- if(*dd > month_days(*yy, *mm))
+ if (*dd > month_days(*yy, *mm))
*dd = month_days(*yy, *mm);
}
@@ -237,10 +237,8 @@ drawsquare(struct bsddialog_conf *conf, WINDOW *win, enum elevation elev,
if (focus) {
l = 2 + w%2;
wattron(win, t.dialog.arrowcolor);
- mvwhline(win, 0, w/2 - l/2,
- conf->ascii_lines ? '^' : ACS_UARROW, l);
- mvwhline(win, h-1, w/2 - l/2,
- conf->ascii_lines ? 'v' : ACS_DARROW, l);
+ mvwhline(win, 0, w/2 - l/2, UARROW(conf), l);
+ mvwhline(win, h-1, w/2 - l/2, DARROW(conf), l);
wattroff(win, t.dialog.arrowcolor);
}
@@ -267,10 +265,10 @@ print_calendar(struct bsddialog_conf *conf, WINDOW *win, int yy, int mm, int dd,
draw_borders(conf, win, RAISED);
if (active) {
wattron(win, t.dialog.arrowcolor);
- mvwhline(win, 0, 15, conf->ascii_lines ? '^' : ACS_UARROW, 4);
- mvwhline(win, h-1, 15, conf->ascii_lines ? 'v' : ACS_DARROW, 4);
- mvwvline(win, 3, 0, conf->ascii_lines ? '<' : ACS_LARROW, 3);
- mvwvline(win, 3, w-1, conf->ascii_lines ? '>' : ACS_RARROW, 3);
+ mvwhline(win, 0, 15, UARROW(conf), 4);
+ mvwhline(win, h-1, 15, DARROW(conf), 4);
+ mvwvline(win, 3, 0, LARROW(conf), 3);
+ mvwvline(win, 3, w-1, RARROW(conf), 3);
wattroff(win, t.dialog.arrowcolor);
}
@@ -402,6 +400,7 @@ bsddialog_calendar(struct bsddialog_conf *conf, const char *text, int rows,
}
DRAW_BUTTONS(d);
break;
+ case KEY_CTRL('n'):
case KEY_RIGHT:
if (focusbuttons) {
d.bs.curr++;
@@ -418,6 +417,7 @@ bsddialog_calendar(struct bsddialog_conf *conf, const char *text, int rows,
}
DRAW_BUTTONS(d);
break;
+ case KEY_CTRL('p'):
case KEY_LEFT:
if (focusbuttons) {
d.bs.curr--;
@@ -463,6 +463,28 @@ bsddialog_calendar(struct bsddialog_conf *conf, const char *text, int rows,
datectl(DOWN_DAY, &yy, &mm, &dd);
}
break;
+ case '-':
+ if (focusbuttons) {
+ break;
+ } else if (sel == 0) {
+ datectl(UP_MONTH, &yy, &mm, &dd);
+ } else if (sel == 1) {
+ datectl(UP_YEAR, &yy, &mm, &dd);
+ } else { /* sel = 2 */
+ datectl(LEFT_DAY, &yy, &mm, &dd);
+ }
+ break;
+ case '+':
+ if (focusbuttons) {
+ break;
+ } else if (sel == 0) {
+ datectl(DOWN_MONTH, &yy, &mm, &dd);
+ } else if (sel == 1) {
+ datectl(DOWN_YEAR, &yy, &mm, &dd);
+ } else { /* sel = 2 */
+ datectl(RIGHT_DAY, &yy, &mm, &dd);
+ }
+ break;
case KEY_HOME:
datectl(UP_MONTH, &yy, &mm, &dd);
break;
@@ -484,6 +506,7 @@ bsddialog_calendar(struct bsddialog_conf *conf, const char *text, int rows,
if (calendar_redraw(&d, yy_win, mm_win, dd_win) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (calendar_redraw(&d, yy_win, mm_win, dd_win) != 0)
return (BSDDIALOG_ERROR);
@@ -628,8 +651,9 @@ bsddialog_datebox(struct bsddialog_conf *conf, const char *text, int rows,
loop = false;
}
break;
- case KEY_RIGHT:
case '\t': /* TAB */
+ case KEY_CTRL('n'):
+ case KEY_RIGHT:
if (focusbuttons) {
d.bs.curr++;
focusbuttons = d.bs.curr < (int)d.bs.nbuttons ?
@@ -648,6 +672,7 @@ bsddialog_datebox(struct bsddialog_conf *conf, const char *text, int rows,
}
DRAW_BUTTONS(d);
break;
+ case KEY_CTRL('p'):
case KEY_LEFT:
if (focusbuttons) {
d.bs.curr--;
@@ -665,6 +690,10 @@ bsddialog_datebox(struct bsddialog_conf *conf, const char *text, int rows,
}
DRAW_BUTTONS(d);
break;
+ case '-':
+ if (focusbuttons == false)
+ datectl(di[sel].up, &yy, &mm, &dd);
+ break;
case KEY_UP:
if (focusbuttons) {
sel = 0;
@@ -675,6 +704,7 @@ bsddialog_datebox(struct bsddialog_conf *conf, const char *text, int rows,
datectl(di[sel].up, &yy, &mm, &dd);
}
break;
+ case '+':
case KEY_DOWN:
if (focusbuttons)
break;
@@ -689,6 +719,7 @@ bsddialog_datebox(struct bsddialog_conf *conf, const char *text, int rows,
if (datebox_redraw(&d, di) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (datebox_redraw(&d, di) != 0)
return (BSDDIALOG_ERROR);
diff --git a/contrib/bsddialog/lib/formbox.c b/contrib/bsddialog/lib/formbox.c
index 5e80471c6974..ca473356e350 100644
--- a/contrib/bsddialog/lib/formbox.c
+++ b/contrib/bsddialog/lib/formbox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -82,7 +82,7 @@ struct privateform {
unsigned int viewrows; /* visible rows, real formheight */
unsigned int minviewrows; /* min viewrows, ylabel != yfield */
wchar_t securewch; /* wide char of conf.form.secure[mb]ch */
- unsigned int nitems; /* like API nkitems */
+ unsigned int nitems; /* like API nitems */
struct privateitem *pritems;
int sel; /* selected item in pritem, can be -1 */
bool hasbottomdesc; /* some item has bottomdesc */
@@ -101,12 +101,12 @@ build_privateform(struct bsddialog_conf*conf, unsigned int nitems,
/* checks */
CHECK_ARRAY(nitems, items);
for (i = 0; i < nitems; i++) {
- if (items[i].maxvaluelen == 0)
- RETURN_FMTERROR("item %u [0-%u] maxvaluelen = 0",
- i, nitems);
if (items[i].fieldlen == 0)
RETURN_FMTERROR("item %u [0-%u] fieldlen = 0",
i, nitems);
+ if (items[i].maxvaluelen == 0)
+ RETURN_FMTERROR("item %u [0-%u] maxvaluelen = 0",
+ i, nitems);
}
f->nitems = nitems;
@@ -114,7 +114,7 @@ build_privateform(struct bsddialog_conf*conf, unsigned int nitems,
insecurecursor = false;
if (conf->form.securembch != NULL) {
mbchsize = mblen(conf->form.securembch, MB_LEN_MAX);
- if(mbtowc(&f->securewch, conf->form.securembch, mbchsize) < 0)
+ if (mbtowc(&f->securewch, conf->form.securembch, mbchsize) < 0)
RETURN_ERROR("Cannot convert securembch to wchar_t");
insecurecursor = true;
} else if (conf->form.securech != '\0') {
@@ -346,7 +346,7 @@ static char* alloc_wstomb(wchar_t *wstr)
wctomb(mbch, wstr[i]);
nbytes += mblen(mbch, MB_LEN_MAX);
}
- if((mbstr = malloc(nbytes)) == NULL)
+ if ((mbstr = malloc(nbytes)) == NULL)
return (NULL);
wcstombs(mbstr, wstr, nbytes);
@@ -379,7 +379,7 @@ static void set_first_with_default(struct privateform *f, int *focusitem)
unsigned int i;
f->sel = -1;
- if(focusitem != NULL && *focusitem >=0 && *focusitem < (int)f->nitems)
+ if (focusitem != NULL && *focusitem >=0 && *focusitem < (int)f->nitems)
if (f->pritems[*focusitem].readonly == false) {
f->sel = *focusitem;
return;
@@ -535,12 +535,10 @@ static void update_formbox(struct bsddialog_conf *conf, struct privateform *f)
if (f->viewrows < f->h) {
wattron(f->box, t.dialog.arrowcolor);
if (f->y > 0)
- mvwhline(f->box, 0, (w / 2) - 2,
- conf->ascii_lines ? '^' : ACS_UARROW, 5);
+ mvwhline(f->box, 0, (w / 2) - 2, UARROW(conf), 5);
if (f->y + f->viewrows < f->h)
- mvwhline(f->box, h-1, (w / 2) - 2,
- conf->ascii_lines ? 'v' : ACS_DARROW, 5);
+ mvwhline(f->box, h-1, (w / 2) - 2, DARROW(conf), 5);
wattroff(f->box, t.dialog.arrowcolor);
}
}
@@ -750,7 +748,7 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
break;
case KEY_LEFT:
if (focusinform) {
- if(fieldctl(item, MOVE_CURSOR_LEFT))
+ if (fieldctl(item, MOVE_CURSOR_LEFT))
DRAWITEM_TRICK(&form, form.sel, true);
} else if (d.bs.curr > 0) {
d.bs.curr--;
@@ -762,7 +760,7 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
break;
case KEY_RIGHT:
if (focusinform) {
- if(fieldctl(item, MOVE_CURSOR_RIGHT))
+ if (fieldctl(item, MOVE_CURSOR_RIGHT))
DRAWITEM_TRICK(&form, form.sel, true);
} else if (d.bs.curr < (int) d.bs.nbuttons - 1) {
d.bs.curr++;
@@ -772,6 +770,7 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
switchfocus = true;
}
break;
+ case KEY_CTRL('p'):
case KEY_UP:
if (focusinform) {
next = previtem(form.nitems, form.pritems,
@@ -781,6 +780,7 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
switchfocus = true;
}
break;
+ case KEY_CTRL('n'):
case KEY_DOWN:
if (focusinform == false)
break;
@@ -808,20 +808,20 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
case 127: /* Backspace */
if (focusinform == false)
break;
- if(fieldctl(item, MOVE_CURSOR_LEFT))
- if(fieldctl(item, DEL_LETTER))
+ if (fieldctl(item, MOVE_CURSOR_LEFT))
+ if (fieldctl(item, DEL_LETTER))
DRAWITEM_TRICK(&form, form.sel, true);
break;
case KEY_DC:
if (focusinform == false)
break;
- if(fieldctl(item, DEL_LETTER))
+ if (fieldctl(item, DEL_LETTER))
DRAWITEM_TRICK(&form, form.sel, true);
break;
case KEY_HOME:
if (focusinform == false)
break;
- if(fieldctl(item, MOVE_CURSOR_BEGIN))
+ if (fieldctl(item, MOVE_CURSOR_BEGIN))
DRAWITEM_TRICK(&form, form.sel, true);
break;
case KEY_END:
@@ -842,6 +842,7 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
if (form_redraw(&d, &form, focusinform) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (form_redraw(&d, &form, focusinform) != 0)
return (BSDDIALOG_ERROR);
@@ -857,10 +858,10 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
* because the cursor remains on the new letter,
* "if" and "while" update the positions.
*/
- if(insertch(item, input, form.securewch)) {
+ if (insertch(item, input, form.securewch)) {
fieldctl(item, MOVE_CURSOR_RIGHT);
/*
- * no if(fieldctl), update always
+ * no if (fieldctl), update always
* because it fails with maxletters.
*/
DRAWITEM_TRICK(&form, form.sel, true);
@@ -897,7 +898,7 @@ bsddialog_form(struct bsddialog_conf *conf, const char *text, int rows,
DRAWITEM_TRICK(&form, form.sel, true);
changeitem = false;
}
- } /* end while(loop) */
+ } /* end while (loop) */
curs_set(0);
diff --git a/contrib/bsddialog/lib/lib_util.c b/contrib/bsddialog/lib/lib_util.c
index 9cfdd6f1a075..d673a1a74d72 100644
--- a/contrib/bsddialog/lib/lib_util.c
+++ b/contrib/bsddialog/lib/lib_util.c
@@ -983,41 +983,43 @@ void draw_borders(struct bsddialog_conf *conf, WINDOW *win, enum elevation elev)
{
int h, w;
int leftcolor, rightcolor;
- int ls, rs, ts, bs, tl, tr, bl, br, ltee, rtee;
+ cchar_t *ls, *rs, *ts, *bs, *tl, *tr, *bl, *br;
+ cchar_t hline, vline, corner;
if (conf->no_lines)
return;
if (conf->ascii_lines) {
- ls = rs = '|';
- ts = bs = '-';
- tl = tr = bl = br = ltee = rtee = '+';
+ setcchar(&hline, L"|", 0, 0, NULL);
+ ls = rs = &hline;
+ setcchar(&vline, L"-", 0, 0, NULL);
+ ts = bs = &vline;
+ setcchar(&corner, L"+", 0, 0, NULL);
+ tl = tr = bl = br = &corner;
} else {
- ls = rs = ACS_VLINE;
- ts = bs = ACS_HLINE;
- tl = ACS_ULCORNER;
- tr = ACS_URCORNER;
- bl = ACS_LLCORNER;
- br = ACS_LRCORNER;
- ltee = ACS_LTEE;
- rtee = ACS_RTEE;
+ ls = rs = WACS_VLINE;
+ ts = bs = WACS_HLINE;
+ tl = WACS_ULCORNER;
+ tr = WACS_URCORNER;
+ bl = WACS_LLCORNER;
+ br = WACS_LRCORNER;
}
getmaxyx(win, h, w);
- leftcolor = elev == RAISED ?
+ leftcolor = (elev == RAISED) ?
t.dialog.lineraisecolor : t.dialog.linelowercolor;
- rightcolor = elev == RAISED ?
+ rightcolor = (elev == RAISED) ?
t.dialog.linelowercolor : t.dialog.lineraisecolor;
wattron(win, leftcolor);
- wborder(win, ls, rs, ts, bs, tl, tr, bl, br);
+ wborder_set(win, ls, rs, ts, bs, tl, tr, bl, br);
wattroff(win, leftcolor);
wattron(win, rightcolor);
- mvwaddch(win, 0, w-1, tr);
- mvwvline(win, 1, w-1, rs, h-2);
- mvwaddch(win, h-1, w-1, br);
- mvwhline(win, h-1, 1, bs, w-2);
+ mvwadd_wch(win, 0, w-1, tr);
+ mvwvline_set(win, 1, w-1, rs, h-2);
+ mvwadd_wch(win, h-1, w-1, br);
+ mvwhline_set(win, h-1, 1, bs, w-2);
wattroff(win, rightcolor);
}
@@ -1126,30 +1128,31 @@ static void
print_string(WINDOW *win, int *rows, int cols, int *y, int *x, wchar_t *str,
bool color)
{
- int i, j, len, reallen, wc;
+ int charwidth, i, j, strlen, strwidth;
wchar_t ws[2];
ws[1] = L'\0';
- len = wcslen(str);
+ strlen = wcslen(str);
if (color) {
- reallen = 0;
+ strwidth = 0;
i=0;
- while (i < len) {
+ while (i < strlen) {
if (is_wtext_attr(str+i) == false) {
- reallen += wcwidth(str[i]);
+ strwidth += wcwidth(str[i]);
i++;
} else {
- i +=3 ;
+ i += 3;
}
}
} else
- reallen = wcswidth(str, len);
+ strwidth = wcswidth(str, strlen);
i = 0;
- while (i < len) {
- if (*x + reallen > cols) {
- *y = (*x != 0 ? *y+1 : *y);
+ while (i < strlen) {
+ if (*x + strwidth > cols) {
+ if (*x != 0)
+ *y = *y + 1;
if (*y >= *rows) {
*rows = *y + 1;
wresize(win, *rows, cols);
@@ -1157,21 +1160,22 @@ print_string(WINDOW *win, int *rows, int cols, int *y, int *x, wchar_t *str,
*x = 0;
}
j = *x;
- while (j < cols && i < len) {
+ while (i < strlen) {
if (color && check_set_wtext_attr(win, str+i)) {
i += 3;
- } else if (j + wcwidth(str[i]) > cols) {
- break;
- } else {
- /* inline mvwaddwch() for efficiency */
- ws[0] = str[i];
- mvwaddwstr(win, *y, j, ws);
- wc = wcwidth(str[i]);;
- reallen -= wc;
- j += wc;
- i++;
- *x = j;
+ continue;
}
+
+ charwidth = wcwidth(str[i]);
+ if (j + wcwidth(str[i]) > cols)
+ break;
+ /* inline mvwaddwch() for efficiency */
+ ws[0] = str[i];
+ mvwaddwstr(win, *y, j, ws);
+ strwidth -= charwidth;
+ j += charwidth;
+ *x = j;
+ i++;
}
}
}
@@ -1248,11 +1252,18 @@ print_textpad(struct bsddialog_conf *conf, WINDOW *pad, const char *text)
int draw_dialog(struct dialog *d)
{
- int wtitle, wbottomtitle, ts, ltee, rtee;
+ int wtitle, wbottomtitle;
+ cchar_t ts, ltee, rtee;
- ts = d->conf->ascii_lines ? '-' : ACS_HLINE;
- ltee = d->conf->ascii_lines ? '+' : ACS_LTEE;
- rtee = d->conf->ascii_lines ? '+' : ACS_RTEE;
+ if (d->conf->ascii_lines) {
+ setcchar(&ts, L"-", 0, 0, NULL);
+ setcchar(&ltee, L"+", 0, 0,NULL);
+ setcchar(&rtee, L"+", 0, 0, NULL);
+ } else {
+ ts = *WACS_HLINE;
+ ltee = *WACS_LTEE;
+ rtee = *WACS_RTEE;
+ }
if (d->conf->shadow) {
wclear(d->shadow);
@@ -1271,7 +1282,7 @@ int draw_dialog(struct dialog *d)
return (BSDDIALOG_ERROR);
if (t.dialog.delimtitle && d->conf->no_lines == false) {
wattron(d->widget, t.dialog.lineraisecolor);
- mvwaddch(d->widget, 0, d->w/2 - wtitle/2 -1, rtee);
+ mvwadd_wch(d->widget, 0, d->w/2 - wtitle/2 -1, &rtee);
wattroff(d->widget, t.dialog.lineraisecolor);
}
wattron(d->widget, t.dialog.titlecolor);
@@ -1279,7 +1290,7 @@ int draw_dialog(struct dialog *d)
wattroff(d->widget, t.dialog.titlecolor);
if (t.dialog.delimtitle && d->conf->no_lines == false) {
wattron(d->widget, t.dialog.lineraisecolor);
- waddch(d->widget, ltee);
+ wadd_wch(d->widget, &ltee);
wattroff(d->widget, t.dialog.lineraisecolor);
}
}
@@ -1287,12 +1298,12 @@ int draw_dialog(struct dialog *d)
if (d->bs.nbuttons > 0) {
if (d->conf->no_lines == false) {
wattron(d->widget, t.dialog.lineraisecolor);
- mvwaddch(d->widget, d->h-3, 0, ltee);
- mvwhline(d->widget, d->h-3, 1, ts, d->w-2);
+ mvwadd_wch(d->widget, d->h-3, 0, &ltee);
+ mvwhline_set(d->widget, d->h-3, 1, &ts, d->w-2);
wattroff(d->widget, t.dialog.lineraisecolor);
wattron(d->widget, t.dialog.linelowercolor);
- mvwaddch(d->widget, d->h-3, d->w-1, rtee);
+ mvwadd_wch(d->widget, d->h-3, d->w-1, &rtee);
wattroff(d->widget, t.dialog.linelowercolor);
}
draw_buttons(d);
diff --git a/contrib/bsddialog/lib/lib_util.h b/contrib/bsddialog/lib/lib_util.h
index 1a502147c441..526f65b4bfaa 100644
--- a/contrib/bsddialog/lib/lib_util.h
+++ b/contrib/bsddialog/lib/lib_util.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -62,14 +62,19 @@ extern bool hastermcolors;
RETURN_ERROR("*" #p " is NULL"); \
} while (0)
#define CHECK_ARRAY(nitem, a) do { \
- if(nitem > 0 && a == NULL) \
+ if (nitem > 0 && a == NULL) \
RETURN_FMTERROR(#nitem " is %d but *" #a " is NULL", nitem); \
} while (0)
/* widget utils */
+#define KEY_CTRL(c) (c & 037)
#define TEXTPAD(d, downnotext) rtextpad(d, 0, 0, 0, downnotext)
#define SCREENLINES (getmaxy(stdscr))
#define SCREENCOLS (getmaxx(stdscr))
#define CHECK_STR(s) (s == NULL ? "" : s)
+#define UARROW(c) (c->ascii_lines ? '^' : ACS_UARROW)
+#define DARROW(c) (c->ascii_lines ? 'v' : ACS_DARROW)
+#define LARROW(c) (c->ascii_lines ? '<' : ACS_LARROW)
+#define RARROW(c) (c->ascii_lines ? '>' : ACS_RARROW)
#define DRAW_BUTTONS(d) do { \
draw_buttons(&d); \
wnoutrefresh(d.widget); \
diff --git a/contrib/bsddialog/lib/libbsddialog.c b/contrib/bsddialog/lib/libbsddialog.c
index 755a469b126c..555d060ebcbd 100644
--- a/contrib/bsddialog/lib/libbsddialog.c
+++ b/contrib/bsddialog/lib/libbsddialog.c
@@ -107,9 +107,12 @@ int bsddialog_backtitle(struct bsddialog_conf *conf, const char *backtitle)
move(0, 1);
clrtoeol();
addstr(CHECK_STR(backtitle));
- if (conf->no_lines != true)
- mvhline(1, 1, conf->ascii_lines ? '-' : ACS_HLINE,
- SCREENCOLS - 2);
+ if (conf->no_lines != true) {
+ if (conf->ascii_lines)
+ mvhline(1, 1, '-', SCREENCOLS - 2);
+ else
+ mvhline_set(1, 1, WACS_HLINE, SCREENCOLS - 2);
+ }
refresh();
diff --git a/contrib/bsddialog/lib/menubox.c b/contrib/bsddialog/lib/menubox.c
index b6213aa8f997..896306b2881d 100644
--- a/contrib/bsddialog/lib/menubox.c
+++ b/contrib/bsddialog/lib/menubox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -183,7 +183,7 @@ set_return_on(struct privatemenu *m, struct bsddialog_menugroup *groups)
int i;
struct privateitem *pritem;
- for(i = 0; i < m->nitems; i++) {
+ for (i = 0; i < m->nitems; i++) {
if (m->pritems[i].type == SEPARATORMODE)
continue;
pritem = &m->pritems[i];
@@ -298,7 +298,7 @@ getnextshortcut(int npritems, struct privateitem *pritems, int abs, wint_t key)
static void drawseparators(struct bsddialog_conf *conf, struct privatemenu *m)
{
- int i, linech, realw, labellen;
+ int i, realw, labellen;
const char *desc, *name;
for (i = 0; i < m->nitems; i++) {
@@ -306,8 +306,10 @@ static void drawseparators(struct bsddialog_conf *conf, struct privatemenu *m)
continue;
if (conf->no_lines == false) {
wattron(m->pad, t.menu.desccolor);
- linech = conf->ascii_lines ? '-' : ACS_HLINE;
- mvwhline(m->pad, i, 0, linech, m->line);
+ if (conf->ascii_lines)
+ mvwhline(m->pad, i, 0, '-', m->line);
+ else
+ mvwhline_set(m->pad, i, 0, WACS_HLINE, m->line);
wattroff(m->pad, t.menu.desccolor);
}
name = m->pritems[i].name;
@@ -404,12 +406,10 @@ static void update_menubox(struct bsddialog_conf *conf, struct privatemenu *m)
if (m->nitems > (int)m->menurows) {
wattron(m->box, t.dialog.arrowcolor);
if (m->ypad > 0)
- mvwhline(m->box, 0, 2,
- conf->ascii_lines ? '^' : ACS_UARROW, 3);
+ mvwhline(m->box, 0, 2, UARROW(conf), 3);
if ((m->ypad + (int)m->menurows) < m->nitems)
- mvwhline(m->box, h-1, 2,
- conf->ascii_lines ? 'v' : ACS_DARROW, 3);
+ mvwhline(m->box, h-1, 2, DARROW(conf), 3);
mvwprintw(m->box, h-1, w-6, "%3d%%",
100 * (m->ypad + m->menurows) / m->nitems);
@@ -578,6 +578,7 @@ do_mixedlist(struct bsddialog_conf *conf, const char *text, int rows, int cols,
if (mixedlist_redraw(&d, &m) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (mixedlist_redraw(&d, &m) != 0)
return (BSDDIALOG_ERROR);
@@ -591,6 +592,8 @@ do_mixedlist(struct bsddialog_conf *conf, const char *text, int rows, int cols,
next = getnext(m.nitems, m.pritems, -1);
changeitem = next != m.sel;
break;
+ case '-':
+ case KEY_CTRL('p'):
case KEY_UP:
next = getprev(m.pritems, m.sel);
changeitem = next != m.sel;
@@ -603,6 +606,8 @@ do_mixedlist(struct bsddialog_conf *conf, const char *text, int rows, int cols,
next = getprev(m.pritems, m.nitems);
changeitem = next != m.sel;
break;
+ case '+':
+ case KEY_CTRL('n'):
case KEY_DOWN:
next = getnext(m.nitems, m.pritems, m.sel);
changeitem = next != m.sel;
@@ -665,7 +670,7 @@ do_mixedlist(struct bsddialog_conf *conf, const char *text, int rows, int cols,
pnoutrefresh(m.pad, m.ypad, 0, m.ys, m.xs, m.ye, m.xe);
changeitem = false;
}
- } /* end while(loop) */
+ } /* end while (loop) */
set_return_on(&m, groups);
diff --git a/contrib/bsddialog/lib/messagebox.c b/contrib/bsddialog/lib/messagebox.c
index fc18ff8a61d2..5132b1b089b8 100644
--- a/contrib/bsddialog/lib/messagebox.c
+++ b/contrib/bsddialog/lib/messagebox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -87,7 +87,7 @@ static int message_draw(struct dialog *d, struct scroll *s)
s->printrows = d->h - BORDER - HBUTTONS - BORDER;
s->ypad = 0;
getmaxyx(d->textpad, s->htextpad, unused);
- unused++; /* fix unused error */
+ (void)unused; /* fix unused error */
return (0);
}
@@ -106,7 +106,7 @@ do_message(struct bsddialog_conf *conf, const char *text, int rows, int cols,
return (BSDDIALOG_ERROR);
set_buttons(&d, true, oklabel, cancellabel);
s.htext = -1;
- if(message_draw(&d, &s) != 0)
+ if (message_draw(&d, &s) != 0)
return (BSDDIALOG_ERROR);
loop = true;
@@ -138,10 +138,14 @@ do_message(struct bsddialog_conf *conf, const char *text, int rows, int cols,
d.bs.curr = d.bs.nbuttons - 1;
DRAW_BUTTONS(d);
break;
+ case '-':
+ case KEY_CTRL('p'):
case KEY_UP:
if (s.ypad > 0)
s.ypad--;
break;
+ case '+':
+ case KEY_CTRL('n'):
case KEY_DOWN:
if (s.ypad + s.printrows < s.htextpad)
s.ypad++;
@@ -166,11 +170,12 @@ do_message(struct bsddialog_conf *conf, const char *text, int rows, int cols,
break;
if (f1help_dialog(d.conf) != 0)
return (BSDDIALOG_ERROR);
- if(message_draw(&d, &s) != 0)
+ if (message_draw(&d, &s) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
- if(message_draw(&d, &s) != 0)
+ if (message_draw(&d, &s) != 0)
return (BSDDIALOG_ERROR);
break;
default:
diff --git a/contrib/bsddialog/lib/textbox.c b/contrib/bsddialog/lib/textbox.c
index edd58d0a820e..597dc6c8187b 100644
--- a/contrib/bsddialog/lib/textbox.c
+++ b/contrib/bsddialog/lib/textbox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -47,32 +47,33 @@ struct scrolltext {
static void updateborders(struct dialog *d, struct scrolltext *st)
{
- chtype arrowch, borderch;
+ chtype arrowch;
+ cchar_t borderch;
if (d->conf->no_lines)
- borderch = ' ';
+ setcchar(&borderch, L" ", 0, 0, NULL);
else if (d->conf->ascii_lines)
- borderch = '|';
+ setcchar(&borderch, L"|", 0, 0, NULL);
else
- borderch = ACS_VLINE;
+ borderch = *WACS_VLINE;
if (st->xpad > 0) {
- arrowch = d->conf->ascii_lines ? '<' : ACS_LARROW;
- arrowch |= t.dialog.arrowcolor;
+ arrowch = LARROW(d->conf) | t.dialog.arrowcolor;
+ mvwvline(d->widget, (d->h / 2) - 2, 0, arrowch, 4);
} else {
- arrowch = borderch;
- arrowch |= t.dialog.lineraisecolor;
+ wattron(d->widget, t.dialog.lineraisecolor);
+ mvwvline_set(d->widget, (d->h / 2) - 2, 0, &borderch, 4);
+ wattroff(d->widget, t.dialog.lineraisecolor);
}
- mvwvline(d->widget, (d->h / 2) - 2, 0, arrowch, 4);
if (st->xpad + d->w - 2 - st->margin < st->wpad) {
- arrowch = d->conf->ascii_lines ? '>' : ACS_RARROW;
- arrowch |= t.dialog.arrowcolor;
+ arrowch = RARROW(d->conf) | t.dialog.arrowcolor;
+ mvwvline(d->widget, (d->h / 2) - 2, d->w - 1, arrowch, 4);
} else {
- arrowch = borderch;
- arrowch |= t.dialog.linelowercolor;
+ wattron(d->widget, t.dialog.linelowercolor);
+ mvwvline_set(d->widget, (d->h / 2) - 2, d->w - 1, &borderch, 4);
+ wattroff(d->widget, t.dialog.linelowercolor);
}
- mvwvline(d->widget, (d->h / 2) - 2, d->w - 1, arrowch, 4);
if (st->hpad > d->h - 4) {
wattron(d->widget, t.dialog.arrowcolor);
@@ -181,7 +182,7 @@ bsddialog_textbox(struct bsddialog_conf *conf, const char *file, int rows,
while (loop) {
updateborders(&d, &st);
/*
- * Overflow multicolumn charchter right border:
+ * Trick, overflow multicolumn charchter right border:
* wnoutrefresh(widget);
* pnoutrefresh(pad, ypad, xpad, ys, xs, ye, xe);
* doupdate();
@@ -256,6 +257,7 @@ bsddialog_textbox(struct bsddialog_conf *conf, const char *file, int rows,
if (textbox_draw(&d, &st) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (textbox_draw(&d, &st) != 0)
return (BSDDIALOG_ERROR);
diff --git a/contrib/bsddialog/lib/timebox.c b/contrib/bsddialog/lib/timebox.c
index d683f9552b50..1421cd7d2b81 100644
--- a/contrib/bsddialog/lib/timebox.c
+++ b/contrib/bsddialog/lib/timebox.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -48,8 +48,8 @@ drawsquare(struct bsddialog_conf *conf, WINDOW *win, unsigned int value,
draw_borders(conf, win, LOWERED);
if (focus) {
wattron(win, t.dialog.arrowcolor);
- mvwhline(win, 0, 1, conf->ascii_lines ? '^' : ACS_UARROW, 2);
- mvwhline(win, 2, 1, conf->ascii_lines ? 'v' : ACS_DARROW, 2);
+ mvwhline(win, 0, 1, UARROW(conf), 2);
+ mvwhline(win, 2, 1, DARROW(conf), 2);
wattroff(win, t.dialog.arrowcolor);
}
@@ -142,8 +142,9 @@ bsddialog_timebox(struct bsddialog_conf *conf, const char* text, int rows,
loop = false;
}
break;
- case KEY_RIGHT:
case '\t': /* TAB */
+ case KEY_CTRL('n'):
+ case KEY_RIGHT:
if (focusbuttons) {
d.bs.curr++;
focusbuttons = d.bs.curr < (int)d.bs.nbuttons ?
@@ -162,6 +163,7 @@ bsddialog_timebox(struct bsddialog_conf *conf, const char* text, int rows,
}
DRAW_BUTTONS(d);
break;
+ case KEY_CTRL('p'):
case KEY_LEFT:
if (focusbuttons) {
d.bs.curr--;
@@ -179,6 +181,11 @@ bsddialog_timebox(struct bsddialog_conf *conf, const char* text, int rows,
}
DRAW_BUTTONS(d);
break;
+ case '-':
+ if (focusbuttons == false)
+ c[sel].value = c[sel].value > 0 ?
+ c[sel].value - 1 : c[sel].max;
+ break;
case KEY_UP:
if (focusbuttons) {
sel = 0;
@@ -190,6 +197,7 @@ bsddialog_timebox(struct bsddialog_conf *conf, const char* text, int rows,
c[sel].value - 1 : c[sel].max;
}
break;
+ case '+':
case KEY_DOWN:
if (focusbuttons)
break;
@@ -205,6 +213,7 @@ bsddialog_timebox(struct bsddialog_conf *conf, const char* text, int rows,
if (timebox_redraw(&d, c) != 0)
return (BSDDIALOG_ERROR);
break;
+ case KEY_CTRL('l'):
case KEY_RESIZE:
if (timebox_redraw(&d, c) != 0)
return (BSDDIALOG_ERROR);
diff --git a/contrib/bsddialog/utility/bsddialog.1 b/contrib/bsddialog/utility/bsddialog.1
index 653f91a3f122..fac17ef114b4 100644
--- a/contrib/bsddialog/utility/bsddialog.1
+++ b/contrib/bsddialog/utility/bsddialog.1
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+.\" Copyright (c) 2021-2024 Alfonso Sabato Siciliano
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 25, 2023
+.Dd April 7, 2024
.Dt BSDDIALOG 1
.Os
.Sh NAME
@@ -438,6 +438,21 @@ timeout.
.It Fl Fl title Ar title
Dialog title.
.El
+.Ss Keys
+The following keys are available at runtime:
+.Bl -tag -width Ds
+.It Ctrl-l
+Redraw the dialog.
+.It F1
+See
+.Fl Fl hfile
+and
+.Fl Fl hmsg .
+.It SPACE
+Select menu item.
+.It UP DOWN LEFT RIGHT - + HOME END PAGEUP PAGEDOWN Ctrl-p Ctrl-n TAB
+Navigate elements and set value, depending on the dialog.
+.El
.Ss Dialogs
The following dialogs are available:
.Bl -tag -width Ds
@@ -472,20 +487,21 @@ and
a field to get the input at the position
.Ar yfield
and
-.Ar xfield
-with graphical length
-.Ar fieldlen ,
-.Ar maxletters
-is the maximum input length.
-The field can be customized, if
+.Ar xfield .
.Ar fieldlen
-is negative the field is read only and its absolute value is the field length.
-If
+is the field width, if negative is readonly and the width is the absolute value,
+if
+.Dv 0
+the field becomes readonly and its value is the
+.Ar init
+width.
.Ar maxletters
-is 0 it is the absolute value of
+is the maximum input length, if is
+.Dv 0
+its value is
.Ar fieldlen .
.Ar init
-is a default value.
+is the default value in the field.
.Ar formrows
is the graphical height of the list,
.Dv 0
@@ -509,7 +525,7 @@ Dialog to get a string in input,
.Ar init
is the default value.
.It Fl Fl menu Ar text Ar rows Ar cols Ar menurows Oo Ar name desc Oc ...
-Builds a menu to select an item from a list, Space key is equivalent to Enter.
+Builds a menu to select an item from a list, SPACE key is equivalent to ENTER.
An item has a
.Ar name
and a
@@ -526,19 +542,33 @@ at the position
.Ar ylabel
and
.Ar xlabel ,
-a field to get the input with graphical length
-.Ar fieldlen
-at the position
+a field to get the input at the position
.Ar yfield
and
-.Ar xfield ,
+.Ar xfield .
+.Ar fieldlen
+is the field width, if negative is readonly and the width is the absolute value,
+if
+.Dv 0
+the field becomes readonly and its value is the
+.Ar init
+width.
.Ar maxletters
-is the maximum input length,
+is the maximum input length, if is
+.Dv 0
+its value is
+.Ar fieldlen .
.Ar init
-is a default value,
+is the default value in the field.
.Ar flag
-can be 0 for normal field, 1 to hide the typed characters and 2 to set the
-field read only.
+can customize
+.Ar field :
+.Dv 0
+normal,
+.Dv 1
+hide typed characters,
+.Dv 2
+readonly.
.Ar formrows
is the graphical height of the list,
.Dv 0
@@ -581,7 +611,6 @@ otherwise
Dialog to diplay a message without the
.Dq Cancel
button.
-UP, DOWN, HOME, END, PAGEUP and PAGEDOWN keys are availble to scroll the text.
.It Fl Fl passwordbox Ar text Ar rows Ar cols Op Ar init
Dialog to get a password,
.Ar init
@@ -617,13 +646,12 @@ Dialog to select a value between
and
.Ar max ,
.Ar init
-is the default value, the keys UP, DOWN, HOME, END, PAGEUP and PAGEDOWN can
-change it.
+is the default value.
.It Fl Fl textbox Ar file Ar rows Ar cols
Opens and prints
.Ar file .
-UP, DOWN, LEFT, RIGHT, HOME, END, PAGEUP and PAGEDOWN keys are available to
-navigate the file, TAB changes button.
+TAB changes button.
+Extra keys 0, h, l, k, j are available to navigate the text.
.Dq OK
button is renamed
.Dq EXIT .
@@ -644,7 +672,6 @@ buttons are renamed
.Dq Yes
and
.Dq \&No .
-UP, DOWN, HOME, END, PAGEUP and PAGEDOWN keys are availble to scroll the text.
.El
.Sh ENVIRONMENT
The following environment variables take effect only on startup, other options
@@ -872,6 +899,8 @@ Options:
.Fl Fl version ,
.Fl Fl yes-label .
.Pp
+Keys: Ctrl-l, F1.
+.Pp
Dialogs:
.Fl Fl calendar ,
.Fl Fl checklist ,
diff --git a/contrib/bsddialog/utility/bsddialog.c b/contrib/bsddialog/utility/bsddialog.c
index d4d1fc3e0f3a..3ba21eadf7a3 100644
--- a/contrib/bsddialog/utility/bsddialog.c
+++ b/contrib/bsddialog/utility/bsddialog.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -140,7 +140,7 @@ static void getenv_exitcodes(void)
value = (int)strtol(envvalue, NULL, 10);
exitcodes[i].value = value;
/* ITEM_HELP follows HELP without explicit setting */
- if(i == BSDDIALOG_HELP + 1)
+ if (i == BSDDIALOG_HELP + 1)
exitcodes[BSDDIALOG_ITEM_HELP + 1].value = value;
}
}
@@ -242,7 +242,7 @@ int main(int argc, char *argv[argc])
if (opt.dialogbuilder == NULL)
break;
if (opt.backtitle != NULL)
- if(bsddialog_backtitle(&conf, opt.backtitle))
+ if (bsddialog_backtitle(&conf, opt.backtitle))
exit_error(false, bsddialog_geterror());
retval = opt.dialogbuilder(&conf, text, rows, cols, argc, argv,
&opt);
diff --git a/contrib/bsddialog/utility/util_builders.c b/contrib/bsddialog/utility/util_builders.c
index 2dfa20cb0f86..8c846819f4ee 100644
--- a/contrib/bsddialog/utility/util_builders.c
+++ b/contrib/bsddialog/utility/util_builders.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2021-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2021-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,6 +30,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <wchar.h>
#include <bsddialog.h>
#include <bsddialog_theme.h>
@@ -532,6 +533,29 @@ int treeview_builder(BUILDER_ARGS)
}
/* form */
+static unsigned int strcols(const char *string)
+{
+ int w;
+ unsigned int ncol;
+ size_t charlen, mb_cur_max;
+ wchar_t wch;
+ mbstate_t mbs;
+
+ mb_cur_max = MB_CUR_MAX;
+ ncol = 0;
+ memset(&mbs, 0, sizeof(mbs));
+ while ((charlen = mbrlen(string, mb_cur_max, &mbs)) != 0 &&
+ charlen != (size_t)-1 && charlen != (size_t)-2) {
+ if (mbtowc(&wch, string, mb_cur_max) < 0)
+ return (0);
+ if ((w = wcwidth(wch)) > 0)
+ ncol += w;
+ string += charlen;
+ }
+
+ return (ncol);
+}
+
static void
print_form_items(int output, int nitems, struct bsddialog_formitem *items,
int focusitem, struct options *opt)
@@ -551,7 +575,7 @@ print_form_items(int output, int nitems, struct bsddialog_formitem *items,
helpname = items[focusitem].bottomdesc;
dprintf(opt->output_fd, " %s", helpname);
}
- if(opt->help_print_items == false)
+ if (opt->help_print_items == false)
return;
dprintf(opt->output_fd, "\n");
}
@@ -564,7 +588,7 @@ print_form_items(int output, int nitems, struct bsddialog_formitem *items,
int form_builder(BUILDER_ARGS)
{
- int output, fieldlen, valuelen, focusitem;
+ int output, fieldlen, focusitem;
unsigned int i, j, flags, formheight, nitems, sizeitem;
struct bsddialog_formitem *items;
@@ -591,12 +615,16 @@ int form_builder(BUILDER_ARGS)
items[i].xfield = (u_int)strtoul(argv[j++], NULL, 10);
fieldlen = (int)strtol(argv[j++], NULL, 10);
- items[i].fieldlen = abs(fieldlen);
+ if (fieldlen == 0)
+ items[i].fieldlen = strcols(items[i].init);
+ else
+ items[i].fieldlen = abs(fieldlen);
- valuelen = (int)strtol(argv[j++], NULL, 10);
- items[i].maxvaluelen = valuelen == 0 ? abs(fieldlen) : valuelen;
+ items[i].maxvaluelen = (u_int)strtoul(argv[j++], NULL, 10);
+ if (items[i].maxvaluelen == 0)
+ items[i].maxvaluelen = items[i].fieldlen;
- flags = (fieldlen < 0 ? BSDDIALOG_FIELDREADONLY : 0);
+ flags = (fieldlen <= 0) ? BSDDIALOG_FIELDREADONLY : 0;
items[i].flags = flags;
items[i].bottomdesc = opt->item_bottomdesc ? argv[j++] : "";
@@ -643,7 +671,7 @@ int inputbox_builder(BUILDER_ARGS)
int mixedform_builder(BUILDER_ARGS)
{
- int output, focusitem;
+ int output, fieldlen, focusitem;
unsigned int i, j, formheight, nitems, sizeitem;
struct bsddialog_formitem *items;
@@ -662,16 +690,26 @@ int mixedform_builder(BUILDER_ARGS)
exit_error(false, "cannot allocate memory for form items");
j = 0;
for (i = 0; i < nitems; i++) {
- items[i].label = argv[j++];
- items[i].ylabel = (u_int)strtoul(argv[j++], NULL, 10);
- items[i].xlabel = (u_int)strtoul(argv[j++], NULL, 10);
- items[i].init = argv[j++];
- items[i].yfield = (u_int)strtoul(argv[j++], NULL, 10);
- items[i].xfield = (u_int)strtoul(argv[j++], NULL, 10);
- items[i].fieldlen = (u_int)strtoul(argv[j++], NULL, 10);
+ items[i].label = argv[j++];
+ items[i].ylabel = (u_int)strtoul(argv[j++], NULL, 10);
+ items[i].xlabel = (u_int)strtoul(argv[j++], NULL, 10);
+ items[i].init = argv[j++];
+ items[i].yfield = (u_int)strtoul(argv[j++], NULL, 10);
+ items[i].xfield = (u_int)strtoul(argv[j++], NULL, 10);
+ fieldlen = (int)strtol(argv[j++], NULL, 10);
+ if (fieldlen == 0)
+ items[i].fieldlen = strcols(items[i].init);
+ else
+ items[i].fieldlen = abs(fieldlen);
items[i].maxvaluelen = (u_int)strtoul(argv[j++], NULL, 10);
- items[i].flags = (u_int)strtoul(argv[j++], NULL, 10);
- items[i].bottomdesc = opt->item_bottomdesc ? argv[j++] : "";
+ if (items[i].maxvaluelen == 0)
+ items[i].maxvaluelen = items[i].fieldlen;
+
+ items[i].flags = (u_int)strtoul(argv[j++], NULL, 10);
+ if (fieldlen <= 0)
+ items[i].flags |= BSDDIALOG_FIELDREADONLY;
+
+ items[i].bottomdesc = opt->item_bottomdesc ? argv[j++] : "";
}
focusitem = -1;
diff --git a/contrib/bsddialog/utility/util_theme.c b/contrib/bsddialog/utility/util_theme.c
index c313d743252b..a95cadacc1b0 100644
--- a/contrib/bsddialog/utility/util_theme.c
+++ b/contrib/bsddialog/utility/util_theme.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2022-2023 Alfonso Sabato Siciliano
+ * Copyright (c) 2022-2024 Alfonso Sabato Siciliano
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -166,7 +166,7 @@ void savetheme(const char *file)
exit_error(false,
"cannot save theme: %s", bsddialog_geterror());
- if(time(&clock) < 0)
+ if (time(&clock) < 0)
exit_error(false, "cannot save profile getting current time");
if ((fp = fopen(file, "w")) == NULL)
exit_error(false, "cannot open %s to save profile", file);
@@ -235,11 +235,11 @@ void loadtheme(const char *file, bool compatibility)
exit_error(false, "Cannot get current theme: %s",
bsddialog_geterror());
- if((fp = fopen(file, "r")) == NULL)
+ if ((fp = fopen(file, "r")) == NULL)
exit_error(false, "Cannot open theme \"%s\" file", file);
- while(fgets(line, BUFSIZ, fp) != NULL) {
- if(line[0] == '#' || line[0] == '\n')
+ while (fgets(line, BUFSIZ, fp) != NULL) {
+ if (line[0] == '#' || line[0] == '\n')
continue; /* superfluous, only for efficiency */
sscanf(line, "%s", name);
value = NULL; /* useless init, fix compiler warning */
@@ -322,7 +322,7 @@ void loadtheme(const char *file, bool compatibility)
fclose(fp);
- if(bsddialog_set_theme(&t) != BSDDIALOG_OK)
+ if (bsddialog_set_theme(&t) != BSDDIALOG_OK)
exit_error(false, bsddialog_geterror());
}
diff --git a/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c b/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
index a84ca2649497..223878aa34ea 100644
--- a/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
+++ b/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
@@ -2138,7 +2138,7 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddata)
assert(ddata->cur_output->size > 0);
if (vector_read_cmd_find(&ddata->cmd, READ_TMPL) == NULL)
ddata->last_sname =
- ddata->cur_output->container[ddata->output.size - 1];
+ ddata->cur_output->container[ddata->cur_output->size - 1];
ddata->cur += len;
diff --git a/contrib/ldns/ldns/parse.h b/contrib/ldns/ldns/parse.h
index ba7edf5679d8..6130dae32bd2 100644
--- a/contrib/ldns/ldns/parse.h
+++ b/contrib/ldns/ldns/parse.h
@@ -95,6 +95,8 @@ ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit,
*/
ldns_status ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed, const char *delim, int *line_nr);
+ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, size_t limit, int *line_nr);
+
/**
* returns a token/char from the buffer b.
* This function deals with ( and ) in the buffer,
diff --git a/contrib/ldns/parse.c b/contrib/ldns/parse.c
index 9698ba71e881..af8b2c1321b2 100644
--- a/contrib/ldns/parse.c
+++ b/contrib/ldns/parse.c
@@ -27,9 +27,14 @@ ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit)
return ldns_fget_token_l(f, token, delim, limit, NULL);
}
-ldns_status
-ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed
- , const char *delim, int *line_nr)
+enum file_type2parse {
+ zone_file_type, resolv_conf_file_type
+};
+
+static ldns_status
+ldns_fget_token_l_st_file_type(FILE *f, char **token, size_t *limit,
+ bool fixed, const char *delim, int *line_nr,
+ enum file_type2parse file_type)
{
int c, prev_c;
int p; /* 0 -> no parentheses seen, >0 nr of ( seen */
@@ -98,7 +103,9 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed
}
/* do something with comments ; */
- if (c == ';' && quoted == 0) {
+ if ((c == ';'
+ || (c == '#' && file_type == resolv_conf_file_type))
+ && quoted == 0) {
if (prev_c != '\\') {
com = 1;
}
@@ -215,6 +222,26 @@ tokenread:
return i == 0 ? LDNS_STATUS_SYNTAX_EMPTY : LDNS_STATUS_OK;
}
+ldns_status
+ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed
+ , const char *delim, int *line_nr)
+{
+ return ldns_fget_token_l_st_file_type(
+ f, token, limit, fixed, delim, line_nr, zone_file_type);
+}
+
+ssize_t
+ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim,
+ size_t limit, int *line_nr)
+{
+ if (limit == 0)
+ limit = LDNS_MAX_LINELEN;
+ if (ldns_fget_token_l_st_file_type(f, &token, &limit, true, delim,
+ line_nr, resolv_conf_file_type))
+ return -1;
+ else
+ return (ssize_t)strlen(token);
+}
ssize_t
ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr)
diff --git a/contrib/ldns/resolver.c b/contrib/ldns/resolver.c
index f9ec65a55966..a426b82c034e 100644
--- a/contrib/ldns/resolver.c
+++ b/contrib/ldns/resolver.c
@@ -775,7 +775,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
#endif
ssize_t gtr, bgtr;
ldns_buffer *b;
- int lnr = 0, oldline;
+ int lnr = 0;
FILE* myfp = fp;
if(!line_nr) line_nr = &lnr;
@@ -809,36 +809,18 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
gtr = 1;
word[0] = 0;
- oldline = *line_nr;
expect = LDNS_RESOLV_KEYWORD;
while (gtr > 0) {
- /* check comments */
- if (word[0] == '#') {
- word[0]='x';
- if(oldline == *line_nr) {
- /* skip until end of line */
- int c;
- do {
- c = fgetc(myfp);
- } while(c != EOF && c != '\n');
- if(c=='\n') (*line_nr)++;
- }
- /* and read next to prepare for further parsing */
- oldline = *line_nr;
- continue;
- }
- oldline = *line_nr;
switch(expect) {
case LDNS_RESOLV_KEYWORD:
/* keyword */
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
if (gtr != 0) {
- if(word[0] == '#') continue;
for(i = 0; i < LDNS_RESOLV_KEYWORDS; i++) {
if (strcasecmp(keyword[i], word) == 0) {
/* chosen the keyword and
* expect values carefully
- */
+ */
expect = i;
break;
}
@@ -856,16 +838,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
break;
case LDNS_RESOLV_DEFDOMAIN:
/* default domain dname */
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
if (gtr == 0) {
if(!fp) fclose(myfp);
ldns_resolver_deep_free(r);
return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR;
}
- if(word[0] == '#') {
- expect = LDNS_RESOLV_KEYWORD;
- continue;
- }
tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word);
if (!tmp) {
if(!fp) fclose(myfp);
@@ -879,16 +857,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
break;
case LDNS_RESOLV_NAMESERVER:
/* NS aaaa or a record */
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
if (gtr == 0) {
if(!fp) fclose(myfp);
ldns_resolver_deep_free(r);
return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR;
}
- if(word[0] == '#') {
- expect = LDNS_RESOLV_KEYWORD;
- continue;
- }
if(strchr(word, '%')) {
/* snip off interface labels,
* fe80::222:19ff:fe31:4222%eth0 */
@@ -911,7 +885,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
break;
case LDNS_RESOLV_SEARCH:
/* search list domain dname */
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr);
b = LDNS_MALLOC(ldns_buffer);
if(!b) {
ldns_resolver_deep_free(r);
@@ -929,10 +903,6 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
bgtr = ldns_bget_token(b, word, LDNS_PARSE_NORMAL, (size_t) gtr + 1);
while (bgtr > 0) {
gtr -= bgtr;
- if(word[0] == '#') {
- expect = LDNS_RESOLV_KEYWORD;
- break;
- }
tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word);
if (!tmp) {
ldns_resolver_deep_free(r);
@@ -954,28 +924,23 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
}
break;
case LDNS_RESOLV_SORTLIST:
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr);
/* sortlist not implemented atm */
expect = LDNS_RESOLV_KEYWORD;
break;
case LDNS_RESOLV_OPTIONS:
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr);
/* options not implemented atm */
expect = LDNS_RESOLV_KEYWORD;
break;
case LDNS_RESOLV_ANCHOR:
/* a file containing a DNSSEC trust anchor */
- gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
+ gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr);
if (gtr == 0) {
ldns_resolver_deep_free(r);
if(!fp) fclose(myfp);
return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR;
}
- if(word[0] == '#') {
- expect = LDNS_RESOLV_KEYWORD;
- continue;
- }
-
#ifdef HAVE_SSL
tmp_rr = ldns_read_anchor_file(word);
(void) ldns_resolver_push_dnssec_anchor(r, tmp_rr);
diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS
index f4395fd1c979..ebdbb2a978ec 100644
--- a/contrib/libarchive/NEWS
+++ b/contrib/libarchive/NEWS
@@ -1,3 +1,5 @@
+Apr 26, 2024: libarchive 3.7.4 released
+
Apr 08, 2024: libarchive 3.7.3 released
Sep 12, 2023: libarchive 3.7.2 released
diff --git a/contrib/libarchive/README.md b/contrib/libarchive/README.md
index 727ed49856b6..933de6986425 100644
--- a/contrib/libarchive/README.md
+++ b/contrib/libarchive/README.md
@@ -201,7 +201,7 @@ questions we are asked about libarchive:
In case other thread calls the same function in parallel, it might
get interrupted by it and cause the executable to use umask=0 for the
remaining execution.
- This will then lead to implicitely created directories to have 777
+ This will then lead to implicitly created directories to have 777
permissions without sticky bit.
* In particular, libarchive's modules to read or write a directory
diff --git a/contrib/libarchive/cat/cmdline.c b/contrib/libarchive/cat/cmdline.c
index ea1e0eed6d0a..851b63de06e5 100644
--- a/contrib/libarchive/cat/cmdline.c
+++ b/contrib/libarchive/cat/cmdline.c
@@ -114,12 +114,18 @@ bsdcat_getopt(struct bsdcat *bsdcat)
enum { state_start = 0, state_old_tar, state_next_word,
state_short, state_long };
- const struct bsdcat_option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct bsdcat_option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = '?';
- int required = 0;
+ int opt;
+ int required;
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = '?';
+ required = 0;
bsdcat->argument = NULL;
/* First time through, initialize everything. */
@@ -172,7 +178,7 @@ bsdcat_getopt(struct bsdcat *bsdcat)
if (opt == '\0') {
/* End of this group; recurse to get next option. */
bsdcat->getopt_state = state_next_word;
- return bsdcat_getopt(bsdcat);
+ goto again;
}
/* Does this option take an argument? */
diff --git a/contrib/libarchive/cpio/cmdline.c b/contrib/libarchive/cpio/cmdline.c
index 312d762c8f46..ab25492ede48 100644
--- a/contrib/libarchive/cpio/cmdline.c
+++ b/contrib/libarchive/cpio/cmdline.c
@@ -114,12 +114,18 @@ cpio_getopt(struct cpio *cpio)
static int state = state_start;
static char *opt_word;
- const struct option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = '?';
- int required = 0;
+ int opt;
+ int required;
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = '?';
+ required = 0;
cpio->argument = NULL;
/* First time through, initialize everything. */
@@ -169,7 +175,7 @@ cpio_getopt(struct cpio *cpio)
if (opt == '\0') {
/* End of this group; recurse to get next option. */
state = state_next_word;
- return cpio_getopt(cpio);
+ goto again;
}
/* Does this option take an argument? */
diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h
index 2e3a9f31cd33..fd4dd20fad13 100644
--- a/contrib/libarchive/libarchive/archive.h
+++ b/contrib/libarchive/libarchive/archive.h
@@ -34,7 +34,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
-#define ARCHIVE_VERSION_NUMBER 3007003
+#define ARCHIVE_VERSION_NUMBER 3007004
#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
@@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
-#define ARCHIVE_VERSION_ONLY_STRING "3.7.3"
+#define ARCHIVE_VERSION_ONLY_STRING "3.7.4"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);
@@ -895,7 +895,7 @@ __LA_DECL int archive_write_set_options(struct archive *_a,
const char *opts);
/*
- * Set a encryption passphrase.
+ * Set an encryption passphrase.
*/
__LA_DECL int archive_write_set_passphrase(struct archive *_a, const char *p);
__LA_DECL int archive_write_set_passphrase_callback(struct archive *,
diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h
index df9cb765f7e8..1c59ded7c911 100644
--- a/contrib/libarchive/libarchive/archive_entry.h
+++ b/contrib/libarchive/libarchive/archive_entry.h
@@ -28,7 +28,7 @@
#define ARCHIVE_ENTRY_H_INCLUDED
/* Note: Compiler will complain if this does not match archive.h! */
-#define ARCHIVE_VERSION_NUMBER 3007003
+#define ARCHIVE_VERSION_NUMBER 3007004
/*
* Note: archive_entry.h is for use outside of libarchive; the
diff --git a/contrib/libarchive/libarchive/archive_entry_acl.3 b/contrib/libarchive/libarchive/archive_entry_acl.3
index 50dd642c20c6..4d0d8b50ed07 100644
--- a/contrib/libarchive/libarchive/archive_entry_acl.3
+++ b/contrib/libarchive/libarchive/archive_entry_acl.3
@@ -383,7 +383,7 @@ Prefix each default ACL entry with the word
The mask and other ACLs don not contain a double colon.
.El
.Pp
-The following flags are effecive only on NFSv4 ACL:
+The following flags are effective only on NFSv4 ACL:
.Bl -tag -offset indent -compact -width ARCHIV
.It Dv ARCHIVE_ENTRY_ACL_STYLE_COMPACT
Do not output minus characters for unset permissions and flags in NFSv4 ACL
diff --git a/contrib/libarchive/libarchive/archive_match.c b/contrib/libarchive/libarchive/archive_match.c
index fc8a4ce8127b..3ab8eda36038 100644
--- a/contrib/libarchive/libarchive/archive_match.c
+++ b/contrib/libarchive/libarchive/archive_match.c
@@ -46,7 +46,7 @@
struct match {
struct match *next;
- int matches;
+ int matched;
struct archive_mstring pattern;
};
@@ -605,7 +605,8 @@ add_pattern_from_file(struct archive_match *a, struct match_list *mlist,
return (ARCHIVE_FATAL);
}
r = archive_read_support_format_raw(ar);
- r = archive_read_support_format_empty(ar);
+ if (r == ARCHIVE_OK)
+ r = archive_read_support_format_empty(ar);
if (r != ARCHIVE_OK) {
archive_copy_error(&(a->archive), ar);
archive_read_free(ar);
@@ -724,12 +725,12 @@ path_excluded(struct archive_match *a, int mbs, const void *pathname)
matched = NULL;
for (match = a->inclusions.first; match != NULL;
match = match->next){
- if (match->matches == 0 &&
+ if (!match->matched &&
(r = match_path_inclusion(a, match, mbs, pathname)) != 0) {
if (r < 0)
return (r);
a->inclusions.unmatched_count--;
- match->matches++;
+ match->matched = 1;
matched = match;
}
}
@@ -752,11 +753,10 @@ path_excluded(struct archive_match *a, int mbs, const void *pathname)
for (match = a->inclusions.first; match != NULL;
match = match->next){
/* We looked at previously-unmatched inclusions already. */
- if (match->matches > 0 &&
+ if (match->matched &&
(r = match_path_inclusion(a, match, mbs, pathname)) != 0) {
if (r < 0)
return (r);
- match->matches++;
return (0);
}
}
@@ -879,7 +879,7 @@ match_list_unmatched_inclusions_next(struct archive_match *a,
for (m = list->unmatched_next; m != NULL; m = m->next) {
int r;
- if (m->matches)
+ if (m->matched)
continue;
if (mbs) {
const char *p;
@@ -1793,7 +1793,7 @@ match_owner_name_mbs(struct archive_match *a, struct match_list *list,
< 0 && errno == ENOMEM)
return (error_nomem(a));
if (p != NULL && strcmp(p, name) == 0) {
- m->matches++;
+ m->matched = 1;
return (1);
}
}
@@ -1814,7 +1814,7 @@ match_owner_name_wcs(struct archive_match *a, struct match_list *list,
< 0 && errno == ENOMEM)
return (error_nomem(a));
if (p != NULL && wcscmp(p, name) == 0) {
- m->matches++;
+ m->matched = 1;
return (1);
}
}
diff --git a/contrib/libarchive/libarchive/archive_read_disk.3 b/contrib/libarchive/libarchive/archive_read_disk.3
index 7cde3c232713..990c1514c4d5 100644
--- a/contrib/libarchive/libarchive/archive_read_disk.3
+++ b/contrib/libarchive/libarchive/archive_read_disk.3
@@ -288,11 +288,11 @@ calls. If matched based on calls to
.Tn archive_match_time_excluded ,
or
.Tn archive_match_owner_excluded ,
-then the callback function specified by the _excluded_func parameter will execute. This function will recieve data provided to the fourth parameter, void *_client_data.
+then the callback function specified by the _excluded_func parameter will execute. This function will receive data provided to the fourth parameter, void *_client_data.
.It Fn archive_read_disk_set_metadata_filter_callback
Allows the caller to set a callback function during calls to
.Xr archive_read_header 3
-to filter out metadata for each entry. The callback function recieves the
+to filter out metadata for each entry. The callback function receives the
.Tn struct archive
object, void* custom filter data, and the
.Tn struct archive_entry .
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_7zip.c b/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
index 92495e628f9a..7e465935c902 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
@@ -2037,6 +2037,8 @@ read_Folder(struct archive_read *a, struct _7z_folder *f)
if (parse_7zip_uint64(
a, &(f->coders[i].propertiesSize)) < 0)
return (-1);
+ if (UMAX_ENTRY < f->coders[i].propertiesSize)
+ return (-1);
if ((p = header_bytes(
a, (size_t)f->coders[i].propertiesSize)) == NULL)
return (-1);
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_all.c b/contrib/libarchive/libarchive/archive_read_support_format_all.c
index 5a4e1ab675a5..3b53c9ad5f57 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_all.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_all.c
@@ -67,7 +67,7 @@ archive_read_support_format_all(struct archive *a)
* increase the chance that a high bid from someone else will
* make it unnecessary for these to do anything at all.
*/
- /* These three have potentially large look-ahead. */
+ /* These have potentially large look-ahead. */
archive_read_support_format_7zip(a);
archive_read_support_format_cab(a);
archive_read_support_format_rar(a);
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_ar.c b/contrib/libarchive/libarchive/archive_read_support_format_ar.c
index ca8effb0b0ee..6f1be8591fef 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_ar.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_ar.c
@@ -270,7 +270,7 @@ _ar_read_header(struct archive_read *a, struct archive_entry *entry,
}
if (ar->strtab != NULL) {
archive_set_error(&a->archive, EINVAL,
- "More than one string tables exist");
+ "More than one string table exists");
return (ARCHIVE_FATAL);
}
@@ -515,7 +515,7 @@ archive_read_format_ar_read_data(struct archive_read *a,
if (ar->entry_padding) {
if (skipped >= 0) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Truncated ar archive- failed consuming padding");
+ "Truncated ar archive - failed consuming padding");
}
return (ARCHIVE_FATAL);
}
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_lha.c b/contrib/libarchive/libarchive/archive_read_support_format_lha.c
index 1c64b2900b8e..ae5a1d7d668e 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_lha.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_lha.c
@@ -1347,6 +1347,8 @@ lha_read_file_extended_header(struct archive_read *a, struct lha *lha,
lha->compsize = archive_le64dec(extdheader);
extdheader += sizeof(uint64_t);
lha->origsize = archive_le64dec(extdheader);
+ if (lha->compsize < 0 || lha->origsize < 0)
+ goto invalid;
}
break;
case EXT_CODEPAGE:
@@ -1693,7 +1695,7 @@ archive_read_format_lha_cleanup(struct archive_read *a)
* example.
* 1. a symbolic-name is 'aaa/bb/cc'
* 2. a filename is 'xxx/bbb'
- * then a archived pathname is 'xxx/bbb|aaa/bb/cc'
+ * then an archived pathname is 'xxx/bbb|aaa/bb/cc'
*/
static int
lha_parse_linkname(struct archive_wstring *linkname,
@@ -2385,7 +2387,7 @@ lzh_decode_blocks(struct lzh_stream *strm, int last)
return (100);
}
- /* lzh_br_read_ahead() always try to fill the
+ /* lzh_br_read_ahead() always tries to fill the
* cache buffer up. In specific situation we
* are close to the end of the data, the cache
* buffer will not be full and thus we have to
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_mtree.c b/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
index 630cff6e3999..6971228eefad 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_mtree.c
@@ -416,8 +416,8 @@ next_line(struct archive_read *a,
}
/*
- * Compare characters with a mtree keyword.
- * Returns the length of a mtree keyword if matched.
+ * Compare characters with an mtree keyword.
+ * Returns the length of an mtree keyword if matched.
* Returns 0 if not matched.
*/
static int
@@ -515,7 +515,7 @@ bid_keyword(const char *p, ssize_t len)
/*
* Test whether there is a set of mtree keywords.
- * Returns the number of keyword.
+ * Returns the number of keywords.
* Returns -1 if we got incorrect sequence.
* This function expects a set of "<space characters>keyword=value".
* When "unset" is specified, expects a set of "<space characters>keyword".
@@ -760,7 +760,7 @@ detect_form(struct archive_read *a, int *is_form_d)
multiline = 1;
else {
/* We've got plenty of correct lines
- * to assume that this file is a mtree
+ * to assume that this file is an mtree
* format. */
if (++entry_cnt >= MAX_BID_ENTRY)
break;
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_rar.c b/contrib/libarchive/libarchive/archive_read_support_format_rar.c
index 99a11d170074..4fc6626cacfd 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_rar.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_rar.c
@@ -2176,6 +2176,19 @@ read_data_compressed(struct archive_read *a, const void **buff, size_t *size,
{
start = rar->offset;
end = start + rar->dictionary_size;
+
+ /* We don't want to overflow the window and overwrite data that we write
+ * at 'start'. Therefore, reduce the end length by the maximum match size,
+ * which is 260 bytes. You can compute this maximum by looking at the
+ * definition of 'expand', in particular when 'symbol >= 271'. */
+ /* NOTE: It's possible for 'dictionary_size' to be less than this 260
+ * value, however that will only be the case when 'unp_size' is small,
+ * which should only happen when the entry size is small and there's no
+ * risk of overflowing the buffer */
+ if (rar->dictionary_size > 260) {
+ end -= 260;
+ }
+
if (rar->filters.filterstart < end) {
end = rar->filters.filterstart;
}
@@ -3599,7 +3612,15 @@ execute_filter_delta(struct rar_filter *filter, struct rar_virtual_machine *vm)
{
uint8_t lastbyte = 0;
for (idx = i; idx < length; idx += numchannels)
+ {
+ /*
+ * The src block should not overlap with the dst block.
+ * If so it would be better to consider this archive is broken.
+ */
+ if (src >= dst)
+ return 0;
lastbyte = dst[idx] = lastbyte - *src++;
+ }
}
filter->filteredblockaddress = length;
@@ -3615,7 +3636,7 @@ execute_filter_e8(struct rar_filter *filter, struct rar_virtual_machine *vm, siz
uint32_t filesize = 0x1000000;
uint32_t i;
- if (length > PROGRAM_WORK_SIZE || length < 4)
+ if (length > PROGRAM_WORK_SIZE || length <= 4)
return 0;
for (i = 0; i <= length - 5; i++)
@@ -3701,6 +3722,13 @@ execute_filter_audio(struct rar_filter *filter, struct rar_virtual_machine *vm)
memset(&state, 0, sizeof(state));
for (j = i; j < length; j += numchannels)
{
+ /*
+ * The src block should not overlap with the dst block.
+ * If so it would be better to consider this archive is broken.
+ */
+ if (src >= dst)
+ return 0;
+
int8_t delta = (int8_t)*src++;
uint8_t predbyte, byte;
int prederror;
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_warc.c b/contrib/libarchive/libarchive/archive_read_support_format_warc.c
index c49d44eba5e5..fcec5bc4cbb9 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_warc.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_warc.c
@@ -215,6 +215,7 @@ _warc_rdhdr(struct archive_read *a, struct archive_entry *entry)
const char *buf;
ssize_t nrd;
const char *eoh;
+ char *tmp;
/* for the file name, saves some strndup()'ing */
warc_string_t fnam;
/* warc record type, not that we really use it a lot */
@@ -321,7 +322,14 @@ start_over:
* malloc()+free() roundtrip */
if (fnam.len + 1U > w->pool.len) {
w->pool.len = ((fnam.len + 64U) / 64U) * 64U;
- w->pool.str = realloc(w->pool.str, w->pool.len);
+ tmp = realloc(w->pool.str, w->pool.len);
+ if (tmp == NULL) {
+ archive_set_error(
+ &a->archive, ENOMEM,
+ "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+ w->pool.str = tmp;
}
memcpy(w->pool.str, fnam.str, fnam.len);
w->pool.str[fnam.len] = '\0';
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_xar.c b/contrib/libarchive/libarchive/archive_read_support_format_xar.c
index fd63594373cb..cefb36410e77 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_xar.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_xar.c
@@ -2055,6 +2055,12 @@ xml_start(struct archive_read *a, const char *name, struct xmlattr_list *list)
attr = attr->next) {
if (strcmp(attr->name, "link") != 0)
continue;
+ if (xar->file->hdnext != NULL || xar->file->link != 0 ||
+ xar->file == xar->hdlink_orgs) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "File with multiple link attributes");
+ return (ARCHIVE_FATAL);
+ }
if (strcmp(attr->value, "original") == 0) {
xar->file->hdnext = xar->hdlink_orgs;
xar->hdlink_orgs = xar->file;
@@ -3251,6 +3257,9 @@ expat_start_cb(void *userData, const XML_Char *name, const XML_Char **atts)
struct xmlattr_list list;
int r;
+ if (ud->state != ARCHIVE_OK)
+ return;
+
r = expat_xmlattr_setup(a, &list, atts);
if (r == ARCHIVE_OK)
r = xml_start(a, (const char *)name, &list);
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_zip.c b/contrib/libarchive/libarchive/archive_read_support_format_zip.c
index 212bfff9fa7b..c9759eaf9a89 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_zip.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_zip.c
@@ -1393,7 +1393,7 @@ check_authentication_code(struct archive_read *a, const void *_p)
* [CRC32] [compressed low] [compressed high] [uncompressed low] [uncompressed high] [other PK marker]
* ```
* Since the 32-bit and 64-bit compressed sizes both match, the
- * actualy size must fit in 32 bits, which implies the high-order
+ * actual size must fit in 32 bits, which implies the high-order
* word of the compressed size is zero. So we know the uncompressed
* low word is zero, which again implies that if we accept the shorter
* format, there will not be a valid PK marker following it.
@@ -4083,6 +4083,17 @@ slurp_central_directory(struct archive_read *a, struct archive_entry* entry,
} else {
/* Generate resource fork name to find its
* resource file at zip->tree_rsrc. */
+
+ /* If this is an entry ending with slash,
+ * make the resource for name slash-less
+ * as the actual resource fork doesn't end with '/'.
+ */
+ size_t tmp_length = filename_length;
+ if (tmp_length > 0 && name[tmp_length - 1] == '/') {
+ tmp_length--;
+ r = rsrc_basename(name, tmp_length);
+ }
+
archive_strcpy(&(zip_entry->rsrcname),
"__MACOSX/");
archive_strncat(&(zip_entry->rsrcname),
@@ -4090,7 +4101,7 @@ slurp_central_directory(struct archive_read *a, struct archive_entry* entry,
archive_strcat(&(zip_entry->rsrcname), "._");
archive_strncat(&(zip_entry->rsrcname),
name + (r - name),
- filename_length - (r - name));
+ tmp_length - (r - name));
/* Register an entry to RB tree to sort it by
* file offset. */
__archive_rb_tree_insert_node(&zip->tree,
diff --git a/contrib/libarchive/libarchive/archive_string.c b/contrib/libarchive/libarchive/archive_string.c
index f39677ad7a26..be6c39600d72 100644
--- a/contrib/libarchive/libarchive/archive_string.c
+++ b/contrib/libarchive/libarchive/archive_string.c
@@ -2640,81 +2640,69 @@ unicode_to_utf16le(char *p, size_t remaining, uint32_t uc)
}
/*
- * Copy UTF-8 string in checking surrogate pair.
- * If any surrogate pair are found, it would be canonicalized.
+ * Append new UTF-8 string to existing UTF-8 string.
+ * Existing string is assumed to already be in proper form;
+ * the new string will have invalid sequences replaced and
+ * surrogate pairs canonicalized.
*/
static int
-strncat_from_utf8_to_utf8(struct archive_string *as, const void *_p,
+strncat_from_utf8_to_utf8(struct archive_string *as, const void *_src,
size_t len, struct archive_string_conv *sc)
{
- const char *s;
- char *p, *endp;
- int n, ret = 0;
-
+ int ret = 0;
+ const char *src = _src;
(void)sc; /* UNUSED */
+ /* Pre-extend the destination */
if (archive_string_ensure(as, as->length + len + 1) == NULL)
return (-1);
- s = (const char *)_p;
- p = as->s + as->length;
- endp = as->s + as->buffer_length -1;
- do {
+ /* Invariant: src points to the first UTF8 byte that hasn't
+ * been copied to the destination `as`. */
+ for (;;) {
+ int n;
uint32_t uc;
- const char *ss = s;
- size_t w;
+ const char *e = src;
- /*
- * Forward byte sequence until a conversion of that is needed.
- */
- while ((n = utf8_to_unicode(&uc, s, len)) > 0) {
- s += n;
+ /* Skip UTF-8 sequences until we reach end-of-string or
+ * a code point that needs conversion. */
+ while ((n = utf8_to_unicode(&uc, e, len)) > 0) {
+ e += n;
len -= n;
}
- if (ss < s) {
- if (p + (s - ss) > endp) {
- as->length = p - as->s;
- if (archive_string_ensure(as,
- as->buffer_length + len + 1) == NULL)
- return (-1);
- p = as->s + as->length;
- endp = as->s + as->buffer_length -1;
- }
-
- memcpy(p, ss, s - ss);
- p += s - ss;
+ /* Copy the part that doesn't need conversion */
+ if (e > src) {
+ if (archive_string_append(as, src, e - src) == NULL)
+ return (-1);
+ src = e;
}
- /*
- * If n is negative, current byte sequence needs a replacement.
- */
- if (n < 0) {
+ if (n == 0) {
+ /* We reached end-of-string */
+ return (ret);
+ } else {
+ /* Next code point needs conversion */
+ char t[4];
+ size_t w;
+
+ /* Try decoding a surrogate pair */
if (n == -3 && IS_SURROGATE_PAIR_LA(uc)) {
- /* Current byte sequence may be CESU-8. */
- n = cesu8_to_unicode(&uc, s, len);
+ n = cesu8_to_unicode(&uc, src, len);
}
+ /* Not a (valid) surrogate, so use a replacement char */
if (n < 0) {
- ret = -1;
- n *= -1;/* Use a replaced unicode character. */
- }
-
- /* Rebuild UTF-8 byte sequence. */
- while ((w = unicode_to_utf8(p, endp - p, uc)) == 0) {
- as->length = p - as->s;
- if (archive_string_ensure(as,
- as->buffer_length + len + 1) == NULL)
- return (-1);
- p = as->s + as->length;
- endp = as->s + as->buffer_length -1;
+ ret = -1; /* Return -1 if we used any replacement */
+ n *= -1;
}
- p += w;
- s += n;
+ /* Consume converted code point */
+ src += n;
len -= n;
+ /* Convert and append new UTF-8 sequence. */
+ w = unicode_to_utf8(t, sizeof(t), uc);
+ if (archive_string_append(as, t, w) == NULL)
+ return (-1);
}
- } while (n > 0);
- as->length = p - as->s;
- as->s[as->length] = '\0';
- return (ret);
+ }
}
static int
diff --git a/contrib/libarchive/libarchive/archive_util.c b/contrib/libarchive/libarchive/archive_util.c
index 32d4bd40988c..7b918fef04b8 100644
--- a/contrib/libarchive/libarchive/archive_util.c
+++ b/contrib/libarchive/libarchive/archive_util.c
@@ -255,10 +255,9 @@ __archive_mktempx(const char *tmpdir, wchar_t *template)
#endif
fd = -1;
ws = NULL;
+ archive_string_init(&temp_name);
if (template == NULL) {
- archive_string_init(&temp_name);
-
/* Get a temporary directory. */
if (tmpdir == NULL) {
size_t l;
diff --git a/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c b/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c
index 94249accd08b..7ea3d18c9b76 100644
--- a/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c
+++ b/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c
@@ -29,6 +29,9 @@
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
@@ -38,6 +41,9 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#ifdef HAVE_ZSTD_H
#include <zstd.h>
#endif
@@ -190,6 +196,7 @@ string_to_number(const char *string, intmax_t *numberp)
return (ARCHIVE_OK);
}
+#if HAVE_ZSTD_H && HAVE_ZSTD_compressStream
static int
string_to_size(const char *string, size_t *numberp)
{
@@ -224,6 +231,7 @@ string_to_size(const char *string, size_t *numberp)
*numberp = (size_t)(number << shift);
return (ARCHIVE_OK);
}
+#endif
/*
* Set write options.
@@ -264,7 +272,20 @@ archive_compressor_zstd_options(struct archive_write_filter *f, const char *key,
if (string_to_number(value, &threads) != ARCHIVE_OK) {
return (ARCHIVE_WARN);
}
- if (threads < 0) {
+
+#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
+ if (threads == 0) {
+ threads = sysconf(_SC_NPROCESSORS_ONLN);
+ }
+#elif !defined(__CYGWIN__) && defined(_WIN32_WINNT) && \
+ _WIN32_WINNT >= 0x0601 /* _WIN32_WINNT_WIN7 */
+ if (threads == 0) {
+ DWORD winCores = GetActiveProcessorCount(
+ ALL_PROCESSOR_GROUPS);
+ threads = (intmax_t)winCores;
+ }
+#endif
+ if (threads < 0 || threads > INT_MAX) {
return (ARCHIVE_WARN);
}
data->threads = (int)threads;
diff --git a/contrib/libarchive/libarchive/archive_write_disk_posix.c b/contrib/libarchive/libarchive/archive_write_disk_posix.c
index f671bc6db747..d69c77ea0517 100644
--- a/contrib/libarchive/libarchive/archive_write_disk_posix.c
+++ b/contrib/libarchive/libarchive/archive_write_disk_posix.c
@@ -4427,7 +4427,8 @@ fixup_appledouble(struct archive_write_disk *a, const char *pathname)
#else
la_stat(datafork.s, &st) == -1 ||
#endif
- (st.st_mode & AE_IFMT) != AE_IFREG)
+ (((st.st_mode & AE_IFMT) != AE_IFREG) &&
+ ((st.st_mode & AE_IFMT) != AE_IFDIR)))
goto skip_appledouble;
/*
diff --git a/contrib/libarchive/libarchive/archive_write_private.h b/contrib/libarchive/libarchive/archive_write_private.h
index abd5a8ddcd85..f259ccb16546 100644
--- a/contrib/libarchive/libarchive/archive_write_private.h
+++ b/contrib/libarchive/libarchive/archive_write_private.h
@@ -158,7 +158,7 @@ int __archive_write_program_write(struct archive_write_filter *,
struct archive_write_program_data *, const void *, size_t);
/*
- * Get a encryption passphrase.
+ * Get an encryption passphrase.
*/
const char * __archive_write_get_passphrase(struct archive_write *a);
#endif
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c b/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
index 92b06c5f5fb4..a88350b87411 100644
--- a/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
@@ -387,7 +387,7 @@ archive_write_gnutar_header(struct archive_write *a,
if (r != 0) {
if (errno == ENOMEM) {
archive_set_error(&a->archive, ENOMEM,
- "Can't allocate memory for Pathame");
+ "Can't allocate memory for pathname");
ret = ARCHIVE_FATAL;
goto exit_write_header;
}
diff --git a/contrib/libarchive/libarchive/archive_write_set_passphrase.c b/contrib/libarchive/libarchive/archive_write_set_passphrase.c
index 977fc4a9ee6b..f871c8e2f810 100644
--- a/contrib/libarchive/libarchive/archive_write_set_passphrase.c
+++ b/contrib/libarchive/libarchive/archive_write_set_passphrase.c
@@ -30,14 +30,9 @@
#endif
#include "archive_write_private.h"
-int
-archive_write_set_passphrase(struct archive *_a, const char *p)
+static int
+set_passphrase(struct archive_write *a, const char *p)
{
- struct archive_write *a = (struct archive_write *)_a;
-
- archive_check_magic(_a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_NEW,
- "archive_write_set_passphrase");
-
if (p == NULL || p[0] == '\0') {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Empty passphrase is unacceptable");
@@ -55,6 +50,18 @@ archive_write_set_passphrase(struct archive *_a, const char *p)
int
+archive_write_set_passphrase(struct archive *_a, const char *p)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+
+ archive_check_magic(_a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_NEW,
+ "archive_write_set_passphrase");
+
+ return (set_passphrase(a, p));
+}
+
+
+int
archive_write_set_passphrase_callback(struct archive *_a, void *client_data,
archive_passphrase_callback *cb)
{
@@ -80,15 +87,9 @@ __archive_write_get_passphrase(struct archive_write *a)
const char *p;
p = a->passphrase_callback(&a->archive,
a->passphrase_client_data);
- if (p != NULL) {
- a->passphrase = strdup(p);
- if (a->passphrase == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate data for passphrase");
- return (NULL);
- }
- return (a->passphrase);
- }
+ set_passphrase(a, p);
+ a->passphrase_callback = NULL;
+ a->passphrase_client_data = NULL;
}
- return (NULL);
+ return (a->passphrase);
}
diff --git a/contrib/libarchive/libarchive/libarchive_internals.3 b/contrib/libarchive/libarchive/libarchive_internals.3
index d4696f648292..2978b48c3e97 100644
--- a/contrib/libarchive/libarchive/libarchive_internals.3
+++ b/contrib/libarchive/libarchive/libarchive_internals.3
@@ -124,7 +124,7 @@ to read the entire file into memory at once and return the
entire file to libarchive as a single block;
other clients may begin asynchronous I/O operations for the
next block on each request.
-.Ss Decompresssion Layer
+.Ss Decompression Layer
The decompression layer not only handles decompression,
it also buffers data so that the format handlers see a
much nicer I/O model.
diff --git a/contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.c b/contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.c
new file mode 100644
index 000000000000..78d6626a09bf
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.c
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 2024 Martin Matuska
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+
+#define __LIBARCHIVE_BUILD
+
+DEFINE_TEST(test_read_format_xar_doublelink)
+{
+ const char *refname = "test_read_format_xar_doublelink.xar";
+ struct archive *a;
+ struct archive_entry *ae;
+
+ extract_reference_file(refname);
+
+ /* Verify with seeking reader. */
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+ if(ARCHIVE_OK != archive_read_support_format_xar(a)) {
+ skipping("XAR format unsupported");
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+ return;
+ }
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname,
+ 10240));
+
+ assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae));
+ assertEqualString(archive_error_string(a),
+ "File with multiple link attributes");
+ assert(archive_errno(a) != 0);
+
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
diff --git a/contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.xar.uu b/contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.xar.uu
new file mode 100644
index 000000000000..7aa638a86e7c
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_read_format_xar_doublelink.xar.uu
@@ -0,0 +1,12 @@
+begin 664 test_read_format_xar_doublelink.xar
+M>&%R(0`<``$````````!0`````````/7`````7B<[9/!<L(@%$7W?@7#/H60
+MU'0R!'?]`KOICDF>D3&``]'1?GT!-1U;;:=[5[G<=WB0=P>^..@![<%Y94V#
+M\R>*$9C6=LKT#7Y;OF8O>"%F_""=F"$^VC9\$&\=R#'LR$:E03#*RHR6&2N6
+MM*KIO,YS3JZ1M&D-[<;O-/+C<8`&^[7,<:P@;E<K#Z.@G)Q5<KWZB,TY22*V
+M()<>:;52`R#5A6N?VQ@9CHIN.#_IY(['+:!!F4V#K5.],G+`8BU=%SU.8OF?
+MH#*V`U%5K"@9)Z=5*G2P5RT8*YY+3J9%*ND(T?D\%/3$[U0G<DK#+T9ULCPX
+MH75PHDA6/U']A>J=W6T3=E+);&^E4=0%?0^#N\00;G(;8U7`]!<F?\'D%"J)
+MX[Y.@WU/@]U)(_\SACO$8_X_YA_&$]\F)^FE?@)<4AJ<B%QTTZN3JTL:$,<5
+<`XH;(KD-Q0=XG.V3P7+"(!1%]WX%PSZ%D-1T,@``
+`
+end
diff --git a/contrib/libarchive/libarchive/test/test_write_disk_appledouble.c b/contrib/libarchive/libarchive/test/test_write_disk_appledouble.c
index 3265a94d2fed..8de6c8b50413 100644
--- a/contrib/libarchive/libarchive/test/test_write_disk_appledouble.c
+++ b/contrib/libarchive/libarchive/test/test_write_disk_appledouble.c
@@ -236,3 +236,87 @@ DEFINE_TEST(test_write_disk_appledouble)
assertEqualFile("hfscmp/file3", "nocmp/file3");
#endif
}
+
+/* Test writing apple doubles to disk from zip format */
+DEFINE_TEST(test_write_disk_appledouble_zip)
+{
+#if !defined(__APPLE__) || !defined(UF_COMPRESSED) || !defined(HAVE_SYS_XATTR_H)\
+ || !defined(HAVE_ZLIB_H)
+ skipping("MacOS-specific AppleDouble test");
+#else
+ const char *refname = "test_write_disk_appledouble_zip.zip";
+ struct archive *ad, *a;
+ struct archive_entry *ae;
+ struct stat st;
+
+ extract_reference_file(refname);
+
+ /*
+ * Extract an archive to disk.
+ */
+ assert((ad = archive_write_disk_new()) != NULL);
+ assertEqualIntA(ad, ARCHIVE_OK,
+ archive_write_disk_set_standard_lookup(ad));
+ assertEqualIntA(ad, ARCHIVE_OK,
+ archive_write_disk_set_options(ad,
+ ARCHIVE_EXTRACT_TIME |
+ ARCHIVE_EXTRACT_SECURE_SYMLINKS |
+ ARCHIVE_EXTRACT_SECURE_NODOTDOT));
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a,
+ refname, 512 * 20));
+
+ /* Skip The top level directory */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("apple_double_dir/", archive_entry_pathname(ae));
+
+ /* Extract apple_double_test */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("apple_double_dir/apple_double_dir_test/", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_extract2(a, ae, ad));
+
+ /* Extract ._apple_double_dir_test which will be merged into apple_double_dir_test as metadata. */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("apple_double_dir/._apple_double_dir_test", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_extract2(a, ae, ad));
+
+ /* Extract test_file */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("apple_double_dir/test_file", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_extract2(a, ae, ad));
+
+ /* Extract ._test_file which will be merged into test_file as metadata. */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("apple_double_dir/._test_file", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_extract2(a, ae, ad));
+
+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+ assertEqualIntA(ad, ARCHIVE_OK, archive_write_free(ad));
+
+ /* Test test_file */
+ assertEqualInt(0, stat("apple_double_dir/test_file", &st));
+ assertFileSize("apple_double_dir/test_file", 5);
+ failure("'%s' should have Resource Fork", "test_file");
+ assertEqualInt(1, has_xattr("apple_double_dir/test_file", "com.apple.ResourceFork"));
+
+ /* Test apple_double_dir_test */
+ failure("'%s' should have quarantine xattr", "apple_double_dir_test");
+ assertEqualInt(1, has_xattr("apple_double_dir/apple_double_dir_test", "com.apple.quarantine"));
+
+ /* Test ._test_file. */
+ failure("'apple_double_dir/._test_file' should be merged and removed");
+ assertFileNotExists("apple_double_dir/._test_file");
+
+ /* Test ._apple_double_dir_test */
+ failure("'apple_double_dir/._._apple_double_dir_test' should be merged and removed");
+ assertFileNotExists("apple_double_dir/._apple_double_dir_test");
+
+ assertChdir("..");
+
+#endif
+}
diff --git a/contrib/libarchive/libarchive/test/test_write_disk_appledouble_zip.zip.uu b/contrib/libarchive/libarchive/test/test_write_disk_appledouble_zip.zip.uu
new file mode 100644
index 000000000000..5ab67533d559
--- /dev/null
+++ b/contrib/libarchive/libarchive/test/test_write_disk_appledouble_zip.zip.uu
@@ -0,0 +1,27 @@
+begin 644 test_write_disk_appledouble_zip.zip
+M4$L#!`H```````MM?%@````````````````1`!``87!P;&5?9&]U8FQE7V1I
+M<B]56`P`O=4%9K75!6;U`10`4$L#!`H```````MM?%@````````````````G
+M`!``87!P;&5?9&]U8FQE7V1I<B]A<'!L95]D;W5B;&5?9&ER7W1E<W0O55@,
+M`+W5!6:UU05F]0$4`%!+`P04``@`"``+;7Q8````````````````*``0`&%P
+M<&QE7V1O=6)L95]D:7(O+E]A<'!L95]D;W5B;&5?9&ER7W1E<W156`P`O=4%
+M9K75!6;U`10`8V`58V=@8F#P34Q6\`]6B%"``I`8`R<0&P%Q!1"#^*L8B`*.
+M(2%!4"9(QPP@%D)3PH@0%TW.S]5++"C(2=4K+$TL2LPKR<Q+92C4-S"P,+8V
+M@`)K:P8`4$L'"!2N=6M7````J@```%!+`P04``@`"`!93GQ8````````````
+M````&@`0`&%P<&QE7V1O=6)L95]D:7(O=&5S=%]F:6QE55@,`+'5!6;IGP5F
+M]0$4`"M)+2[A`@!02P<(QC6Y.P<````%````4$L#!!0`"``(`%E.?%@`````
+M```````````<`!``87!P;&5?9&]U8FQE7V1I<B\N7W1E<W1?9FEL9558#`"Q
+MU05FZ9\%9O4!%`!C8!5C9V!B8/!-3%;P#U:(4(`"D!@#)Q`;`;$;$(/X%4#,
+MQT`0.(:$!$&9%5",`8I2B_-+BY)3%=+RB[*Y`%!+!P@HPLP3/@```(8```!0
+M2P$"%0,*```````+;7Q8````````````````$0`,``````````!`[4$`````
+M87!P;&5?9&]U8FQE7V1I<B]56`@`O=4%9K75!6902P$"%0,*```````+;7Q8
+M````````````````)P`,``````````!`[4$_````87!P;&5?9&]U8FQE7V1I
+M<B]A<'!L95]D;W5B;&5?9&ER7W1E<W0O55@(`+W5!6:UU05F4$L!`A4#%``(
+M``@`"VU\6!2N=6M7````J@```"@`#```````````0*2!E````&%P<&QE7V1O
+M=6)L95]D:7(O+E]A<'!L95]D;W5B;&5?9&ER7W1E<W156`@`O=4%9K75!690
+M2P$"%0,4``@`"`!93GQ8QC6Y.P<````%````&@`,``````````!`I(%1`0``
+M87!P;&5?9&]U8FQE7V1I<B]T97-T7V9I;&556`@`L=4%9NF?!6902P$"%0,4
+M``@`"`!93GQ8*,+,$SX```"&````'``,``````````!`I(&P`0``87!P;&5?
+M9&]U8FQE7V1I<B\N7W1E<W1?9FEL9558"`"QU05FZ9\%9E!+!08`````!0`%
++`+@!``!(`@``````
+`
+end
diff --git a/contrib/libarchive/libarchive_fe/passphrase.c b/contrib/libarchive/libarchive_fe/passphrase.c
index 9d95d527067b..90fef32d254c 100644
--- a/contrib/libarchive/libarchive_fe/passphrase.c
+++ b/contrib/libarchive/libarchive_fe/passphrase.c
@@ -76,6 +76,7 @@
#if defined(_WIN32) && !defined(__CYGWIN__)
+#include <string.h>
#include <windows.h>
static char *
@@ -113,8 +114,7 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
WriteFile(hStdout, "\r\n", 2, NULL, NULL);
buf[rbytes] = '\0';
/* Remove trailing carriage return(s). */
- if (rbytes > 2 && buf[rbytes - 2] == '\r' && buf[rbytes - 1] == '\n')
- buf[rbytes - 2] = '\0';
+ buf[strcspn(buf, "\r\n")] = '\0';
return (buf);
}
diff --git a/contrib/libarchive/tar/bsdtar.1 b/contrib/libarchive/tar/bsdtar.1
index e570d2a48a01..fe9ec9504674 100644
--- a/contrib/libarchive/tar/bsdtar.1
+++ b/contrib/libarchive/tar/bsdtar.1
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 1, 2024
+.Dd April 23, 2024
.Dt TAR 1
.Os
.Sh NAME
@@ -644,14 +644,13 @@ A decimal integer from 4 to 7 specifying the lz4 compression block size
.It Cm lz4:block-dependence
Use the previous block of the block being compressed for
a compression dictionary to improve compression ratio.
-.It Cm zstd:compression-level
-A decimal integer specifying the zstd compression level. Supported values depend
+.It Cm zstd:compression-level Ns = Ns Ar N
+A decimal integer specifying the zstd compression level.
+Supported values depend
on the library version, common values are from 1 to 22.
-.It Cm zstd:threads
-Specify the number of worker threads to use.
-Setting threads to a special value 0 makes
-.Xr zstd 1
-use as many threads as there are CPU cores on the system.
+.It Cm zstd:threads Ns = Ns Ar N
+Specify the number of worker threads to use, or 0 to use as many
+threads as there are CPU cores in the system.
.It Cm zstd:frame-per-file
Start a new compression frame at the beginning of each file in the
archive.
diff --git a/contrib/libarchive/tar/bsdtar.c b/contrib/libarchive/tar/bsdtar.c
index b070e0faeb66..42baab2861bd 100644
--- a/contrib/libarchive/tar/bsdtar.c
+++ b/contrib/libarchive/tar/bsdtar.c
@@ -157,6 +157,7 @@ main(int argc, char **argv)
char *tptr, *uptr;
char possible_help_request;
char buff[16];
+ long l;
/*
* Use a pointer for consistency, but stack-allocated storage
@@ -301,16 +302,15 @@ main(int argc, char **argv)
/* libarchive doesn't need this; just ignore it. */
break;
case 'b': /* SUSv2 */
- errno = 0;
tptr = NULL;
- t = (int)strtol(bsdtar->argument, &tptr, 10);
- if (errno || t <= 0 || t > 8192 ||
+ l = strtol(bsdtar->argument, &tptr, 10);
+ if (l <= 0 || l > 8192L ||
*(bsdtar->argument) == '\0' || tptr == NULL ||
*tptr != '\0') {
lafe_errc(1, 0, "Invalid or out of range "
"(1..8192) argument to -b");
}
- bsdtar->bytes_per_block = 512 * t;
+ bsdtar->bytes_per_block = 512 * (int)l;
/* Explicit -b forces last block size. */
bsdtar->bytes_in_last_block = bsdtar->bytes_per_block;
break;
@@ -369,44 +369,42 @@ main(int argc, char **argv)
bsdtar->filename = bsdtar->argument;
break;
case OPTION_GID: /* cpio */
- errno = 0;
tptr = NULL;
- t = (int)strtol(bsdtar->argument, &tptr, 10);
- if (errno || t < 0 || *(bsdtar->argument) == '\0' ||
+ l = strtol(bsdtar->argument, &tptr, 10);
+ if (l < 0 || l >= INT_MAX || *(bsdtar->argument) == '\0' ||
tptr == NULL || *tptr != '\0') {
lafe_errc(1, 0, "Invalid argument to --gid");
}
- bsdtar->gid = t;
+ bsdtar->gid = (int)l;
break;
case OPTION_GNAME: /* cpio */
bsdtar->gname = bsdtar->argument;
break;
case OPTION_GROUP: /* GNU tar */
- errno = 0;
tptr = NULL;
uptr = strchr(bsdtar->argument, ':');
- if(uptr != NULL) {
- if(uptr[1] == 0) {
+ if (uptr != NULL) {
+ if (uptr[1] == '\0') {
lafe_errc(1, 0, "Invalid argument to --group (missing id after :)");
}
uptr[0] = 0;
uptr++;
- t = (int)strtol(uptr, &tptr, 10);
- if (errno || t < 0 || *uptr == '\0' ||
+ l = strtol(uptr, &tptr, 10);
+ if (l < 0 || l >= INT_MAX || *uptr == '\0' ||
tptr == NULL || *tptr != '\0') {
lafe_errc(1, 0, "Invalid argument to --group (%s is not a number)", uptr);
} else {
- bsdtar->gid = t;
+ bsdtar->gid = (int)l;
}
bsdtar->gname = bsdtar->argument;
} else {
- t = (int)strtol(bsdtar->argument, &tptr, 10);
- if (errno || t < 0 || *(bsdtar->argument) == '\0' ||
+ l = strtol(bsdtar->argument, &tptr, 10);
+ if (l < 0 || l >= INT_MAX || *(bsdtar->argument) == '\0' ||
tptr == NULL || *tptr != '\0') {
bsdtar->gname = bsdtar->argument;
} else {
- bsdtar->gid = t;
+ bsdtar->gid = (int)l;
bsdtar->gname = "";
}
}
@@ -662,31 +660,30 @@ main(int argc, char **argv)
bsdtar->option_options = bsdtar->argument;
break;
case OPTION_OWNER: /* GNU tar */
- errno = 0;
tptr = NULL;
uptr = strchr(bsdtar->argument, ':');
- if(uptr != NULL) {
- if(uptr[1] == 0) {
+ if (uptr != NULL) {
+ if (uptr[1] == 0) {
lafe_errc(1, 0, "Invalid argument to --owner (missing id after :)");
}
uptr[0] = 0;
uptr++;
- t = (int)strtol(uptr, &tptr, 10);
- if (errno || t < 0 || *uptr == '\0' ||
+ l = strtol(uptr, &tptr, 10);
+ if (l < 0 || l >= INT_MAX || *uptr == '\0' ||
tptr == NULL || *tptr != '\0') {
lafe_errc(1, 0, "Invalid argument to --owner (%s is not a number)", uptr);
} else {
- bsdtar->uid = t;
+ bsdtar->uid = (int)l;
}
bsdtar->uname = bsdtar->argument;
} else {
- t = (int)strtol(bsdtar->argument, &tptr, 10);
- if (errno || t < 0 || *(bsdtar->argument) == '\0' ||
+ l = strtol(bsdtar->argument, &tptr, 10);
+ if (l < 0 || l >= INT_MAX || *(bsdtar->argument) == '\0' ||
tptr == NULL || *tptr != '\0') {
bsdtar->uname = bsdtar->argument;
} else {
- bsdtar->uid = t;
+ bsdtar->uid = (int)l;
bsdtar->uname = "";
}
}
@@ -748,15 +745,14 @@ main(int argc, char **argv)
bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER;
break;
case OPTION_STRIP_COMPONENTS: /* GNU tar 1.15 */
- errno = 0;
tptr = NULL;
- t = (int)strtol(bsdtar->argument, &tptr, 10);
- if (errno || t < 0 || *(bsdtar->argument) == '\0' ||
+ l = strtol(bsdtar->argument, &tptr, 10);
+ if (l < 0 || l > 100000L || *(bsdtar->argument) == '\0' ||
tptr == NULL || *tptr != '\0') {
lafe_errc(1, 0, "Invalid argument to "
"--strip-components");
}
- bsdtar->strip_components = t;
+ bsdtar->strip_components = (int)l;
break;
case 'T': /* GNU tar */
bsdtar->names_from_file = bsdtar->argument;
@@ -776,14 +772,13 @@ main(int argc, char **argv)
set_mode(bsdtar, opt);
break;
case OPTION_UID: /* cpio */
- errno = 0;
tptr = NULL;
- t = (int)strtol(bsdtar->argument, &tptr, 10);
- if (errno || t < 0 || *(bsdtar->argument) == '\0' ||
+ l = strtol(bsdtar->argument, &tptr, 10);
+ if (l < 0 || l >= INT_MAX || *(bsdtar->argument) == '\0' ||
tptr == NULL || *tptr != '\0') {
lafe_errc(1, 0, "Invalid argument to --uid");
}
- bsdtar->uid = t;
+ bsdtar->uid = (int)l;
break;
case OPTION_UNAME: /* cpio */
bsdtar->uname = bsdtar->argument;
diff --git a/contrib/libarchive/tar/cmdline.c b/contrib/libarchive/tar/cmdline.c
index 72292e8f27f3..2a89f42b0880 100644
--- a/contrib/libarchive/tar/cmdline.c
+++ b/contrib/libarchive/tar/cmdline.c
@@ -218,12 +218,18 @@ bsdtar_getopt(struct bsdtar *bsdtar)
enum { state_start = 0, state_old_tar, state_next_word,
state_short, state_long };
- const struct bsdtar_option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct bsdtar_option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = '?';
- int required = 0;
+ int opt;
+ int required;
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = '?';
+ required = 0;
bsdtar->argument = NULL;
/* First time through, initialize everything. */
@@ -310,7 +316,7 @@ bsdtar_getopt(struct bsdtar *bsdtar)
if (opt == '\0') {
/* End of this group; recurse to get next option. */
bsdtar->getopt_state = state_next_word;
- return bsdtar_getopt(bsdtar);
+ goto again;
}
/* Does this option take an argument? */
diff --git a/contrib/libarchive/unzip/cmdline.c b/contrib/libarchive/unzip/cmdline.c
index ab1aeb31fe18..4c6efc3e0694 100644
--- a/contrib/libarchive/unzip/cmdline.c
+++ b/contrib/libarchive/unzip/cmdline.c
@@ -81,12 +81,18 @@ bsdunzip_getopt(struct bsdunzip *bsdunzip)
{
enum { state_start = 0, state_next_word, state_short, state_long };
- const struct bsdunzip_option *popt, *match = NULL, *match2 = NULL;
- const char *p, *long_prefix = "--";
+ const struct bsdunzip_option *popt, *match, *match2;
+ const char *p, *long_prefix;
size_t optlength;
- int opt = OPTION_NONE;
- int required = 0;
-
+ int opt;
+ int required;
+
+again:
+ match = NULL;
+ match2 = NULL;
+ long_prefix = "--";
+ opt = OPTION_NONE;
+ required = 0;
bsdunzip->argument = NULL;
/* First time through, initialize everything. */
@@ -140,7 +146,7 @@ bsdunzip_getopt(struct bsdunzip *bsdunzip)
if (opt == '\0') {
/* End of this group; recurse to get next option. */
bsdunzip->getopt_state = state_next_word;
- return bsdunzip_getopt(bsdunzip);
+ goto again;
}
/* Does this option take an argument? */
diff --git a/contrib/libarchive/unzip/test/test_I.c b/contrib/libarchive/unzip/test/test_I.c
index a6bad85a011f..d189edca1a5c 100644
--- a/contrib/libarchive/unzip/test/test_I.c
+++ b/contrib/libarchive/unzip/test/test_I.c
@@ -25,12 +25,28 @@
*/
#include "test.h"
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
/* Test I arg - file name encoding */
DEFINE_TEST(test_I)
{
const char *reffile = "test_I.zip";
+ const char *lang;
int r;
+#if HAVE_SETLOCALE
+ if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) {
+ skipping("en_US.UTF-8 locale not available on this system.");
+ return;
+ }
+#else
+ skipping("setlocale() not available on this system.");
+#endif
+
+ lang = getenv("LANG");
+ setenv("LANG", "en_US.UTF-8", 1);
extract_reference_file(reffile);
r = systemf("%s -I UTF-8 %s >test.out 2>test.err", testprog, reffile);
assertEqualInt(0, r);
@@ -38,4 +54,9 @@ DEFINE_TEST(test_I)
assertEmptyFile("test.err");
assertTextFileContents("Hello, World!\n", "Γειά σου Κόσμε.txt");
+
+ if (lang == NULL)
+ unsetenv("LANG");
+ else
+ setenv("LANG", lang, 1);
}
diff --git a/contrib/libcbor/.circleci/config.yml b/contrib/libcbor/.circleci/config.yml
index 69371b67d624..4391ad8d1e9c 100644
--- a/contrib/libcbor/.circleci/config.yml
+++ b/contrib/libcbor/.circleci/config.yml
@@ -4,12 +4,14 @@ commands:
linux-setup:
steps:
- run: sudo apt-get update
- - run: sudo apt-get install -y cmake ${TOOLCHAIN_PACKAGES}
- - run: sudo apt install libcmocka-dev
+ # NEEDRESTART_MODE prevents automatic restarts which seem to hang.
+ - run: sudo NEEDRESTART_MODE=l apt-get install -y cmake ${TOOLCHAIN_PACKAGES}
+ - run: sudo NEEDRESTART_MODE=l apt-get install -y libcmocka-dev libcjson-dev
build:
steps:
- run: >
cmake -DWITH_TESTS=ON \
+ -DWITH_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DSANITIZE=OFF \
-DCOVERAGE="${CMAKE_COVERAGE:='OFF'}" \
@@ -31,14 +33,14 @@ orbs:
jobs:
static-test:
- machine:
- image: ubuntu-2204:2022.10.2
+ machine: &default-machine
+ image: ubuntu-2204:2023.07.2
environment:
TOOLCHAIN_PACKAGES: g++
steps:
- checkout
- linux-setup
- - run: sudo apt-get install -y clang-format doxygen cppcheck
+ - run: sudo NEEDRESTART_MODE=l apt-get install -y clang-format doxygen cppcheck
- run: cppcheck --inline-suppr --error-exitcode=1 .
- run: bash clang-format.sh --verbose
- run: >
@@ -60,14 +62,14 @@ jobs:
build-and-test:
machine:
- image: ubuntu-2204:2022.10.2
+ <<: *default-machine
environment:
TOOLCHAIN_PACKAGES: g++
CMAKE_COVERAGE: ON
steps:
- checkout
- linux-setup
- - run: sudo apt-get install -y valgrind
+ - run: sudo NEEDRESTART_MODE=l apt-get install -y valgrind
- build
- test
- run: ctest -T Coverage
@@ -81,7 +83,7 @@ jobs:
build-and-test-clang:
machine:
- image: ubuntu-2204:2022.10.2
+ <<: *default-machine
environment:
TOOLCHAIN_PACKAGES: clang
CC: clang
@@ -94,11 +96,11 @@ jobs:
build-and-test-32b:
machine:
- image: ubuntu-2204:2022.10.2
+ <<: *default-machine
steps:
- checkout
- run: sudo apt-get update
- - run: sudo apt-get install -y cmake gcc-multilib g++-multilib libc6-dev-i386
+ - run: sudo NEEDRESTART_MODE=l apt-get install -y cmake gcc-multilib g++-multilib libc6-dev-i386
# Make cmocka from source w/ 32b setup
- run: git clone https://git.cryptomilk.org/projects/cmocka.git ~/cmocka
- run: >
@@ -117,7 +119,7 @@ jobs:
build-and-test-release-clang:
machine:
- image: ubuntu-2204:2022.10.2
+ <<: *default-machine
environment:
TOOLCHAIN_PACKAGES: clang
CC: clang
@@ -130,7 +132,7 @@ jobs:
llvm-coverage:
machine:
- image: ubuntu-2204:2022.10.2
+ <<: *default-machine
environment:
TOOLCHAIN_PACKAGES: clang
CC: clang
@@ -145,7 +147,7 @@ jobs:
build-and-test-arm:
machine:
- image: ubuntu-2204:2022.10.2
+ <<: *default-machine
environment:
TOOLCHAIN_PACKAGES: g++
resource_class: arm.medium
@@ -157,7 +159,7 @@ jobs:
build-bazel:
machine:
- image: ubuntu-2204:2022.10.2
+ image: ubuntu-2204:2023.07.2
environment:
TOOLCHAIN_PACKAGES: g++
steps:
diff --git a/contrib/libcbor/.cirrus.yml b/contrib/libcbor/.cirrus.yml
new file mode 100644
index 000000000000..948ae23b4a98
--- /dev/null
+++ b/contrib/libcbor/.cirrus.yml
@@ -0,0 +1,26 @@
+freebsd_task:
+ install_script:
+ - ASSUME_ALWAYS_YES=yes pkg bootstrap -f && pkg install -y cmocka cmake ninja
+ build_script:
+ - mkdir build
+ - cd build
+ - cmake -GNinja -DWITH_TESTS=ON
+ -DCBOR_CUSTOM_ALLOC=ON
+ -DCMAKE_BUILD_TYPE=Debug
+ -DSANITIZE=OFF
+ ..
+ - ninja -j $(sysctl -n hw.ncpu)
+ test_script:
+ - cd build
+ - ctest -VV
+ matrix:
+ # From gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images
+ - name: freebsd-13-2
+ freebsd_instance:
+ image_family: freebsd-13-2
+ - name: freebsd-14-0
+ freebsd_instance:
+ image_family: freebsd-14-0
+ - name: freebsd-15-0-snap
+ freebsd_instance:
+ image_family: freebsd-15-0-snap
diff --git a/contrib/libcbor/.readthedocs.yaml b/contrib/libcbor/.readthedocs.yaml
new file mode 100644
index 000000000000..f2514ffae113
--- /dev/null
+++ b/contrib/libcbor/.readthedocs.yaml
@@ -0,0 +1,21 @@
+# .readthedocs.yaml
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the version of Python and other tools you might need
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.11"
+
+sphinx:
+ configuration: doc/source/conf.py
+
+# We recommend specifying your dependencies to enable reproducible builds:
+# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
+python:
+ install:
+ - requirements: doc/source/requirements.txt
diff --git a/contrib/libcbor/CHANGELOG.md b/contrib/libcbor/CHANGELOG.md
index f2475f308c7a..3c331f9266ab 100644
--- a/contrib/libcbor/CHANGELOG.md
+++ b/contrib/libcbor/CHANGELOG.md
@@ -4,6 +4,19 @@ Template:
Next
---------------------
+0.11.0 (2024-02-04)
+---------------------
+- [Updated documentation to refer to RFC 8949](https://github.com/PJK/libcbor/issues/269)
+- Improvements to `cbor_describe`
+ - [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth)
+ - [Formatting consistency and clarity improvements](https://github.com/PJK/libcbor/pull/285)
+- [Fix `cbor_string_set_handle` not setting the codepoint count](https://github.com/PJK/libcbor/pull/286)
+- BREAKING: [`cbor_load` will no longer fail on input strings that are well-formed but not valid UTF-8](https://github.com/PJK/libcbor/pull/286)
+ - If you were relying on the validation, please check the result using `cbor_string_codepoint_count` instead
+- BREAKING: [All decoders like `cbor_load` and `cbor_stream_decode` will accept all well-formed tag values](https://github.com/PJK/libcbor/pull/308) (bug discovered by [dskern-github](https://github.com/dskern-github))
+ - Previously, decoding of certain values would fail with `CBOR_ERR_MALFORMATED` or `CBOR_DECODER_ERROR`
+ - This also makes decoding symmetrical with serialization, which already accepts all values
+
0.10.2 (2023-01-31)
---------------------
- [Fixed minor test bug causing failures for x86 Linux](https://github.com/PJK/libcbor/pull/266) (discovered by [trofi](https://github.com/PJK/libcbor/issues/263))
@@ -117,7 +130,7 @@ Next
Breaks build & header compatibility due to:
- Improved build configuration and feature check macros
-- Endianess configuration fixes (by Erwin Kroon and David Grigsby)
+- Endianness configuration fixes (by Erwin Kroon and David Grigsby)
- pkg-config compatibility (by Vincent Bernat)
- enable use of versioned SONAME (by Vincent Bernat)
- better fuzzer (wasn't random until now, ooops)
diff --git a/contrib/libcbor/CMakeLists.txt b/contrib/libcbor/CMakeLists.txt
index 5c0a7846cfa3..16b9f0875d33 100644
--- a/contrib/libcbor/CMakeLists.txt
+++ b/contrib/libcbor/CMakeLists.txt
@@ -1,14 +1,18 @@
cmake_minimum_required(VERSION 3.0)
+
project(libcbor)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/")
include(CTest)
+include(GNUInstallDirs) # Provides CMAKE_INSTALL_ variables
SET(CBOR_VERSION_MAJOR "0")
-SET(CBOR_VERSION_MINOR "10")
-SET(CBOR_VERSION_PATCH "2")
+SET(CBOR_VERSION_MINOR "11")
+SET(CBOR_VERSION_PATCH "0")
SET(CBOR_VERSION ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.${CBOR_VERSION_PATCH})
-set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
+option(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "cmake --build --target install does not depend on cmake --build" true)
+option(BUILD_SHARED_LIBS "Build as a shared library" false)
+
include(CheckIncludeFiles)
include(TestBigEndian)
@@ -19,10 +23,10 @@ endif()
option(CBOR_CUSTOM_ALLOC "Custom, dynamically defined allocator support" OFF)
if(CBOR_CUSTOM_ALLOC)
- message(WARNING
+ message(WARNING
"CBOR_CUSTOM_ALLOC has been deprecated. Custom allocators are now enabled by default."
"The flag is a no-op and will be removed in the next version. "
- "Please remove CBOR_CUSTOM_ALLOC from your build configuation.")
+ "Please remove CBOR_CUSTOM_ALLOC from your build configuration.")
endif(CBOR_CUSTOM_ALLOC)
option(CBOR_PRETTY_PRINTER "Include a pretty-printing routine" ON)
@@ -138,12 +142,10 @@ if (COVERAGE)
endif()
endif (COVERAGE)
-
# We want to generate configuration.h from the template and make it so that it is accessible using the same
# path during both library build and installed header use, without littering the source dir.
-# Using cbor/configuration.h in the build dir works b/c headers will be installed to <prefix>/cbor
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/cbor/configuration.h.in ${PROJECT_BINARY_DIR}/cbor/configuration.h)
-install(FILES ${PROJECT_BINARY_DIR}/cbor/configuration.h DESTINATION include/cbor)
+install(FILES ${PROJECT_BINARY_DIR}/cbor/configuration.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cbor)
# Make the header visible at compile time
include_directories(${PROJECT_BINARY_DIR})
diff --git a/contrib/libcbor/CONTRIBUTING.md b/contrib/libcbor/CONTRIBUTING.md
index cc834d21a46b..9bd42a06b6dc 100644
--- a/contrib/libcbor/CONTRIBUTING.md
+++ b/contrib/libcbor/CONTRIBUTING.md
@@ -2,7 +2,7 @@
libcbor is maintained by [@PJK](https://github.com/PJK) in his spare time on a best-effort basis.
-Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described belows.
+Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described below.
## Principles
diff --git a/contrib/libcbor/Doxyfile b/contrib/libcbor/Doxyfile
index 2571057646d7..67df45cfbb94 100644
--- a/contrib/libcbor/Doxyfile
+++ b/contrib/libcbor/Doxyfile
@@ -48,7 +48,7 @@ PROJECT_NAME = libcbor
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 0.10.2
+PROJECT_NUMBER = 0.11.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/contrib/libcbor/README.md b/contrib/libcbor/README.md
index 6d34ba9d4dcb..ea54bed9437b 100644
--- a/contrib/libcbor/README.md
+++ b/contrib/libcbor/README.md
@@ -1,16 +1,15 @@
# [libcbor](https://github.com/PJK/libcbor)
[![CircleCI](https://circleci.com/gh/PJK/libcbor/tree/master.svg?style=svg)](https://circleci.com/gh/PJK/libcbor/tree/master)
-[![Build status](https://ci.appveyor.com/api/projects/status/8kkmvmefelsxp5u2?svg=true)](https://ci.appveyor.com/project/PJK/libcbor)
[![Documentation Status](https://readthedocs.org/projects/libcbor/badge/?version=latest)](https://readthedocs.org/projects/libcbor/?badge=latest)
[![latest packaged version(s)](https://repology.org/badge/latest-versions/libcbor.svg)](https://repology.org/project/libcbor/versions)
[![codecov](https://codecov.io/gh/PJK/libcbor/branch/master/graph/badge.svg)](https://codecov.io/gh/PJK/libcbor)
-**libcbor** is a C library for parsing and generating [CBOR](https://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format.
+**libcbor** is a C library for parsing and generating [CBOR](https://cbor.io/), the general-purpose schema-less binary data format.
## Main features
- - Complete RFC conformance
- - Robust C99 implementation
+ - Complete [IETF RFC 8949 (STD 94)](https://www.rfc-editor.org/info/std94) conformance
+ - Robust platform-independent C99 implementation
- Layered architecture offers both control and convenience
- Flexible memory management
- No shared global state - threading friendly
diff --git a/contrib/libcbor/appveyor.yml b/contrib/libcbor/appveyor.yml
deleted file mode 100644
index 6a0cca219b92..000000000000
--- a/contrib/libcbor/appveyor.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-image: Visual Studio 2022
-version: '{build}'
-platform: x64
-
-skip_branch_with_pr: true
-
-before_build:
-- cmake -H. -Bbuild
-
-build_script:
-- if "%APPVEYOR_REPO_TAG%"=="true" (set CONFIGURATION=RelWithDebInfo) else (set CONFIGURATION=Debug)
-- cmake --build build --config "%CONFIGURATION%"
-
-# TODO enable CMocka tests, maybe package the binaries
diff --git a/contrib/libcbor/doc/source/api/item_types.rst b/contrib/libcbor/doc/source/api/item_types.rst
index 1452b3e5f90e..1051b97ded7b 100644
--- a/contrib/libcbor/doc/source/api/item_types.rst
+++ b/contrib/libcbor/doc/source/api/item_types.rst
@@ -1,7 +1,7 @@
Types of items
===============================================
-Every :type:`cbor_item_t` has a :type:`cbor_type` associated with it - these constants correspond to the types specified by the `CBOR standard <http://tools.ietf.org/html/rfc7049>`_:
+Every :type:`cbor_item_t` has a :type:`cbor_type` associated with it - these constants correspond to the types specified by the `CBOR standard <https://www.rfc-editor.org/info/std94>`_:
.. doxygenenum:: cbor_type
diff --git a/contrib/libcbor/doc/source/conf.py b/contrib/libcbor/doc/source/conf.py
index 585efc8a436f..0eee7103bb5a 100644
--- a/contrib/libcbor/doc/source/conf.py
+++ b/contrib/libcbor/doc/source/conf.py
@@ -33,7 +33,8 @@ extensions = [
'breathe',
'sphinx.ext.mathjax',
'sphinx.ext.autodoc',
- 'sphinx.ext.ifconfig'
+ 'sphinx.ext.ifconfig',
+ 'sphinx_rtd_theme'
]
import subprocess, os
@@ -76,8 +77,8 @@ copyright = '2014 - 2020, Pavel Kalvoda'
# built documents.
#
# The short X.Y version.
-version = '0.10'
-release = '0.10.2'
+version = '0.11'
+release = '0.11.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -127,7 +128,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -285,12 +286,3 @@ texinfo_documents = [
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
-
-
-if not on_rtd: # only import and set the theme if we're building docs locally
- import sphinx_rtd_theme
- html_theme = 'sphinx_rtd_theme'
- html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
-
-# otherwise, readthedocs.org uses their theme by default, so no need to specify it
-
diff --git a/contrib/libcbor/doc/source/development.rst b/contrib/libcbor/doc/source/development.rst
index 13e91ef25762..0b0ac21007ed 100644
--- a/contrib/libcbor/doc/source/development.rst
+++ b/contrib/libcbor/doc/source/development.rst
@@ -22,15 +22,15 @@ everywhere.
Goals
~~~~~~~~~~~~~~~~~~~~~~
-RFC-conformance and full feature support
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Standard conformance and full feature support
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Anything the standard allows, libcbor can do.
**Why?** Because conformance and interoperability is the point of defining
standards. Clients expect the support to be feature-complete and
there is no significant complexity reduction that can be achieved by slightly
-cutting corners, which means that the incremental cost of full RFC support is
+cutting corners, which means that the incremental cost of full [CBOR standard](https://www.rfc-editor.org/info/std94) support is
comparatively small over "almost-conformance" seen in many alternatives.
diff --git a/contrib/libcbor/doc/source/index.rst b/contrib/libcbor/doc/source/index.rst
index 79293e798c3b..d3d62cf75c41 100644
--- a/contrib/libcbor/doc/source/index.rst
+++ b/contrib/libcbor/doc/source/index.rst
@@ -9,7 +9,7 @@ Overview
Main features
- - Complete RFC conformance [#]_
+ - Complete `IETF RFC 8949 (STD 94) <https://www.rfc-editor.org/info/std94>`_ conformance [#]_
- Robust C99 implementation
- Layered architecture offers both control and convenience
- Flexible memory management
@@ -19,7 +19,7 @@ Main features
- Extensive documentation and test suite
- No runtime dependencies, small footprint
-.. [#] See :doc:`rfc_conformance`
+.. [#] See :doc:`standard_conformance`
.. [#] With the exception of custom memory allocators (see :doc:`api/item_reference_counting`)
@@ -31,9 +31,9 @@ Contents
using
api
tests
- rfc_conformance
+ standard_conformance
internal
changelog
development
-.. _CBOR: http://tools.ietf.org/html/rfc7049
+.. _CBOR: https://www.rfc-editor.org/info/std94
diff --git a/contrib/libcbor/doc/source/internal.rst b/contrib/libcbor/doc/source/internal.rst
index 2c62a82b2329..e30cb11dffa1 100644
--- a/contrib/libcbor/doc/source/internal.rst
+++ b/contrib/libcbor/doc/source/internal.rst
@@ -6,7 +6,7 @@ Internal workings of *libcbor* are mostly derived from the specification. The pu
Terminology
---------------
=== ====================== ========================================================================================================================================
-MTB Major Type Byte http://tools.ietf.org/html/rfc7049#section-2.1
+MTB Major Type Byte https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1
--- ---------------------- ----------------------------------------------------------------------------------------------------------------------------------------
DST Dynamically Sized Type Type whose storage requirements cannot be determined
@@ -32,7 +32,7 @@ and also borrowing from
General notes on the API design
--------------------------------
-The API design has two main driving priciples:
+The API design has two main driving principles:
1. Let the client manage the memory as much as possible
2. Behave exactly as specified by the standard
diff --git a/contrib/libcbor/doc/source/requirements.txt b/contrib/libcbor/doc/source/requirements.txt
index a82e34e58ad2..502d79cc62e6 100644
--- a/contrib/libcbor/doc/source/requirements.txt
+++ b/contrib/libcbor/doc/source/requirements.txt
@@ -1,31 +1,31 @@
-alabaster==0.7.12
-Babel==2.9.1
-breathe==4.33.1
-certifi==2022.12.7
-charset-normalizer==2.0.12
-colorama==0.4.4
-docutils==0.17.1
-idna==3.3
-imagesize==1.3.0
-importlib-metadata==4.11.3
-Jinja2==3.0.3
+alabaster==0.7.13
+Babel==2.13.1
+breathe==4.35.0
+certifi==2023.11.17
+charset-normalizer==3.3.2
+colorama==0.4.6
+docutils==0.18.1
+idna==3.4
+imagesize==1.4.1
+importlib-metadata==6.8.0
+Jinja2==3.1.2
livereload==2.6.3
-MarkupSafe==2.1.1
-packaging==21.3
-Pygments==2.11.2
-pyparsing==3.0.7
+MarkupSafe==2.1.3
+packaging==23.2
+Pygments==2.16.1
+pyparsing==3.1.1
pytz==2021.3
-requests==2.27.1
+requests==2.31.0
snowballstemmer==2.2.0
-Sphinx==4.4.0
+Sphinx==7.2.6
sphinx-autobuild==2021.3.14
-sphinx-rtd-theme==1.0.0
-sphinxcontrib-applehelp==1.0.2
-sphinxcontrib-devhelp==1.0.2
-sphinxcontrib-htmlhelp==2.0.0
+sphinx-rtd-theme==1.3.0
+sphinxcontrib-applehelp==1.0.7
+sphinxcontrib-devhelp==1.0.5
+sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-jsmath==1.0.1
-sphinxcontrib-qthelp==1.0.3
-sphinxcontrib-serializinghtml==1.1.5
-tornado==6.1
-urllib3==1.26.9
-zipp==3.7.0
+sphinxcontrib-qthelp==1.0.6
+sphinxcontrib-serializinghtml==1.1.9
+tornado==6.3.3
+urllib3==2.1.0
+zipp==3.17.0
diff --git a/contrib/libcbor/doc/source/rfc_conformance.rst b/contrib/libcbor/doc/source/standard_conformance.rst
index 6848fbacd464..62965f0c4493 100644
--- a/contrib/libcbor/doc/source/rfc_conformance.rst
+++ b/contrib/libcbor/doc/source/standard_conformance.rst
@@ -1,13 +1,13 @@
-RFC conformance
+IETF standard conformance
=========================
-*libcbor* is, generally speaking, very faithful implementation of `RFC 7049 <https://tools.ietf.org/html/rfc7049>`_. There are, however, some limitations imposed by technical constraints.
+*libcbor* is, generally speaking, a very faithful implementation of `IETF RFC 8949 (STD 94) <https://www.rfc-editor.org/info/std94>`_. There are, however, some limitations related to the numerical range and precision available in portable C99.
Bytestring length
-------------------
There is no explicit limitation of indefinite length byte strings. [#]_ *libcbor* will not handle byte strings with more chunks than the maximum value of :type:`size_t`. On any sane platform, such string would not fit in the memory anyway. It is, however, possible to process arbitrarily long strings and byte strings using the streaming decoder.
-.. [#] https://tools.ietf.org/html/rfc7049#section-2.2.2
+.. [#] https://www.rfc-editor.org/rfc/rfc8949.html#section-3.2.3
"Half-precision" IEEE 754 floats
---------------------------------
diff --git a/contrib/libcbor/examples/CMakeLists.txt b/contrib/libcbor/examples/CMakeLists.txt
index eaf985ba32cd..b1f2ec290e7a 100644
--- a/contrib/libcbor/examples/CMakeLists.txt
+++ b/contrib/libcbor/examples/CMakeLists.txt
@@ -22,6 +22,10 @@ if(CJSON_FOUND)
add_executable(cjson2cbor cjson2cbor.c)
target_include_directories(cjson2cbor PUBLIC ${CJSON_INCLUDE_DIRS})
target_link_libraries(cjson2cbor cbor ${CJSON_LIBRARY})
+
+ add_executable(cbor2cjson cbor2cjson.c)
+ target_include_directories(cbor2cjson PUBLIC ${CJSON_INCLUDE_DIRS})
+ target_link_libraries(cbor2cjson cbor ${CJSON_LIBRARY})
endif()
file(COPY data DESTINATION .)
diff --git a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h
index 3472cf49d8fe..ddf6b9dc5f2b 100644
--- a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h
+++ b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h
@@ -2,8 +2,8 @@
#define LIBCBOR_CONFIGURATION_H
#define CBOR_MAJOR_VERSION 0
-#define CBOR_MINOR_VERSION 10
-#define CBOR_PATCH_VERSION 2
+#define CBOR_MINOR_VERSION 11
+#define CBOR_PATCH_VERSION 0
#define CBOR_BUFFER_GROWTH 2
#define CBOR_MAX_STACK_SIZE 2048
diff --git a/contrib/libcbor/examples/cbor2cjson.c b/contrib/libcbor/examples/cbor2cjson.c
new file mode 100644
index 000000000000..99ddc9ee09e1
--- /dev/null
+++ b/contrib/libcbor/examples/cbor2cjson.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2014-2020 Pavel Kalvoda <me@pavelkalvoda.com>
+ *
+ * libcbor is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See LICENSE for details.
+ */
+
+#include <cjson/cJSON.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "cbor.h"
+
+void usage(void) {
+ printf("Usage: cbor2cjson [input file]\n");
+ exit(1);
+}
+
+cJSON* cbor_to_cjson(cbor_item_t* item) {
+ switch (cbor_typeof(item)) {
+ case CBOR_TYPE_UINT:
+ return cJSON_CreateNumber(cbor_get_int(item));
+ case CBOR_TYPE_NEGINT:
+ return cJSON_CreateNumber(-1 - cbor_get_int(item));
+ case CBOR_TYPE_BYTESTRING:
+ // cJSON only handles null-terminated string -- binary data would have to
+ // be escaped
+ return cJSON_CreateString("Unsupported CBOR item: Bytestring");
+ case CBOR_TYPE_STRING:
+ if (cbor_string_is_definite(item)) {
+ // cJSON only handles null-terminated string
+ char* null_terminated_string = malloc(cbor_string_length(item) + 1);
+ memcpy(null_terminated_string, cbor_string_handle(item),
+ cbor_string_length(item));
+ null_terminated_string[cbor_string_length(item)] = 0;
+ cJSON* result = cJSON_CreateString(null_terminated_string);
+ free(null_terminated_string);
+ return result;
+ }
+ return cJSON_CreateString("Unsupported CBOR item: Chunked string");
+ case CBOR_TYPE_ARRAY: {
+ cJSON* result = cJSON_CreateArray();
+ for (size_t i = 0; i < cbor_array_size(item); i++) {
+ cJSON_AddItemToArray(result, cbor_to_cjson(cbor_array_get(item, i)));
+ }
+ return result;
+ }
+ case CBOR_TYPE_MAP: {
+ cJSON* result = cJSON_CreateObject();
+ for (size_t i = 0; i < cbor_map_size(item); i++) {
+ char* key = malloc(128);
+ snprintf(key, 128, "Surrogate key %zu", i);
+ // JSON only support string keys
+ if (cbor_isa_string(cbor_map_handle(item)[i].key) &&
+ cbor_string_is_definite(cbor_map_handle(item)[i].key)) {
+ size_t key_length = cbor_string_length(cbor_map_handle(item)[i].key);
+ if (key_length > 127) key_length = 127;
+ // Null-terminated madness
+ memcpy(key, cbor_string_handle(cbor_map_handle(item)[i].key),
+ key_length);
+ key[key_length] = 0;
+ }
+
+ cJSON_AddItemToObject(result, key,
+ cbor_to_cjson(cbor_map_handle(item)[i].value));
+ free(key);
+ }
+ return result;
+ }
+ case CBOR_TYPE_TAG:
+ return cJSON_CreateString("Unsupported CBOR item: Tag");
+ case CBOR_TYPE_FLOAT_CTRL:
+ if (cbor_float_ctrl_is_ctrl(item)) {
+ if (cbor_is_bool(item)) return cJSON_CreateBool(cbor_get_bool(item));
+ if (cbor_is_null(item)) return cJSON_CreateNull();
+ return cJSON_CreateString("Unsupported CBOR item: Control value");
+ }
+ return cJSON_CreateNumber(cbor_float_get_float(item));
+ }
+
+ return cJSON_CreateNull();
+}
+
+/*
+ * Reads CBOR data from a file and outputs JSON using cJSON
+ * $ ./examples/cbor2cjson examples/data/nested_array.cbor
+ */
+
+int main(int argc, char* argv[]) {
+ if (argc != 2) usage();
+ FILE* f = fopen(argv[1], "rb");
+ if (f == NULL) usage();
+ fseek(f, 0, SEEK_END);
+ size_t length = (size_t)ftell(f);
+ fseek(f, 0, SEEK_SET);
+ unsigned char* buffer = malloc(length);
+ fread(buffer, length, 1, f);
+
+ /* Assuming `buffer` contains `length` bytes of input data */
+ struct cbor_load_result result;
+ cbor_item_t* item = cbor_load(buffer, length, &result);
+ free(buffer);
+
+ if (result.error.code != CBOR_ERR_NONE) {
+ printf(
+ "There was an error while reading the input near byte %zu (read %zu "
+ "bytes in total): ",
+ result.error.position, result.read);
+ exit(1);
+ }
+
+ cJSON* cjson_item = cbor_to_cjson(item);
+ char* json_string = cJSON_Print(cjson_item);
+ printf("%s\n", json_string);
+ free(json_string);
+ fflush(stdout);
+
+ /* Deallocate the result */
+ cbor_decref(&item);
+ cJSON_Delete(cjson_item);
+
+ fclose(f);
+}
diff --git a/contrib/libcbor/examples/cjson2cbor.c b/contrib/libcbor/examples/cjson2cbor.c
index eae78e1cf7a6..b67439902442 100644
--- a/contrib/libcbor/examples/cjson2cbor.c
+++ b/contrib/libcbor/examples/cjson2cbor.c
@@ -7,7 +7,7 @@
/**
* This code demonstrates how cJSON (https://github.com/DaveGamble/cJSON)
- * callbacks can be used in conjuction with the streaming parser to translate
+ * callbacks can be used in conjunction with the streaming parser to translate
* JSON to CBOR. Please note that cbor_builder_* APIs are internal and thus
* subject to change.
*
@@ -111,7 +111,7 @@ void cjson_cbor_stream_decode(cJSON *source,
}
void usage(void) {
- printf("Usage: cjson [input JSON file]\n");
+ printf("Usage: cjson2cbor [input JSON file]\n");
exit(1);
}
diff --git a/contrib/libcbor/examples/data/all_types.cbor b/contrib/libcbor/examples/data/all_types.cbor
new file mode 100644
index 000000000000..00d66a0e667e
--- /dev/null
+++ b/contrib/libcbor/examples/data/all_types.cbor
Binary files differ
diff --git a/contrib/libcbor/examples/readfile.c b/contrib/libcbor/examples/readfile.c
index 3f8db6152800..c6f4a3342d08 100644
--- a/contrib/libcbor/examples/readfile.c
+++ b/contrib/libcbor/examples/readfile.c
@@ -58,7 +58,7 @@ int main(int argc, char* argv[]) {
case CBOR_ERR_SYNTAXERROR: {
printf(
"Syntactically malformed data -- see "
- "http://tools.ietf.org/html/rfc7049\n");
+ "https://www.rfc-editor.org/info/std94\n");
break;
}
case CBOR_ERR_NONE: {
diff --git a/contrib/libcbor/oss-fuzz/build.sh b/contrib/libcbor/oss-fuzz/build.sh
index 10853a398734..e7b1df3ada0a 100755
--- a/contrib/libcbor/oss-fuzz/build.sh
+++ b/contrib/libcbor/oss-fuzz/build.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/bin/bash -eux
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/contrib/libcbor/src/CMakeLists.txt b/contrib/libcbor/src/CMakeLists.txt
index 72a0c901556d..e9312395db25 100644
--- a/contrib/libcbor/src/CMakeLists.txt
+++ b/contrib/libcbor/src/CMakeLists.txt
@@ -1,6 +1,5 @@
set(SOURCES cbor.c allocators.c cbor/streaming.c cbor/internal/encoders.c cbor/internal/builder_callbacks.c cbor/internal/loaders.c cbor/internal/memory_utils.c cbor/internal/stack.c cbor/internal/unicode.c cbor/encoding.c cbor/serialization.c cbor/arrays.c cbor/common.c cbor/floats_ctrls.c cbor/bytestrings.c cbor/callbacks.c cbor/strings.c cbor/maps.c cbor/tags.c cbor/ints.c)
-include(GNUInstallDirs)
include(JoinPaths)
include(CheckFunctionExists)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
@@ -49,3 +48,23 @@ install(FILES cbor.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcbor.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
+include(CMakePackageConfigHelpers)
+configure_package_config_file(
+ libcborConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libcborConfig.cmake
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libcbor
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR
+)
+write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/libcborConfigVersion.cmake
+ VERSION ${CBOR_VERSION}
+ COMPATIBILITY SameMajorVersion
+)
+install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libcborConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libcborConfigVersion.cmake
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/cmake/libcbor
+ )
diff --git a/contrib/libcbor/src/cbor.c b/contrib/libcbor/src/cbor.c
index 626ddddaecfc..a8b4bcd7a080 100644
--- a/contrib/libcbor/src/cbor.c
+++ b/contrib/libcbor/src/cbor.c
@@ -9,6 +9,7 @@
#include "cbor/internal/builder_callbacks.h"
#include "cbor/internal/loaders.h"
+#pragma clang diagnostic push
cbor_item_t *cbor_load(cbor_data source, size_t source_size,
struct cbor_load_result *result) {
/* Context stack */
@@ -289,7 +290,6 @@ cbor_item_t *cbor_copy(cbor_item_t *item) {
#include <inttypes.h>
#include <locale.h>
-#include <stdlib.h>
#include <wchar.h>
#define __STDC_FORMAT_MACROS
@@ -301,89 +301,105 @@ static int _pow(int b, int ex) {
return res;
}
+static void _cbor_type_marquee(FILE *out, char *label, int indent) {
+ fprintf(out, "%*.*s[%s] ", indent, indent, " ", label);
+}
+
static void _cbor_nested_describe(cbor_item_t *item, FILE *out, int indent) {
- setlocale(LC_ALL, "");
+ const int indent_offset = 4;
switch (cbor_typeof(item)) {
case CBOR_TYPE_UINT: {
- fprintf(out, "%*s[CBOR_TYPE_UINT] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_UINT", indent);
fprintf(out, "Width: %dB, ", _pow(2, cbor_int_get_width(item)));
fprintf(out, "Value: %" PRIu64 "\n", cbor_get_int(item));
break;
}
case CBOR_TYPE_NEGINT: {
- fprintf(out, "%*s[CBOR_TYPE_NEGINT] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_NEGINT", indent);
fprintf(out, "Width: %dB, ", _pow(2, cbor_int_get_width(item)));
- fprintf(out, "Value: -%" PRIu64 " -1\n", cbor_get_int(item));
+ fprintf(out, "Value: -%" PRIu64 " - 1\n", cbor_get_int(item));
break;
}
case CBOR_TYPE_BYTESTRING: {
- fprintf(out, "%*s[CBOR_TYPE_BYTESTRING] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_BYTESTRING", indent);
if (cbor_bytestring_is_indefinite(item)) {
- fprintf(out, "Indefinite, with %zu chunks:\n",
+ fprintf(out, "Indefinite, Chunks: %zu, Chunk data:\n",
cbor_bytestring_chunk_count(item));
for (size_t i = 0; i < cbor_bytestring_chunk_count(item); i++)
_cbor_nested_describe(cbor_bytestring_chunks_handle(item)[i], out,
- indent + 4);
+ indent + indent_offset);
} else {
- fprintf(out, "Definite, length %zuB\n", cbor_bytestring_length(item));
+ const unsigned char *data = cbor_bytestring_handle(item);
+ fprintf(out, "Definite, Length: %zuB, Data:\n",
+ cbor_bytestring_length(item));
+ fprintf(out, "%*s", indent + indent_offset, " ");
+ for (size_t i = 0; i < cbor_bytestring_length(item); i++)
+ fprintf(out, "%02x", (int)(data[i] & 0xff));
+ fprintf(out, "\n");
}
break;
}
case CBOR_TYPE_STRING: {
- fprintf(out, "%*s[CBOR_TYPE_STRING] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_STRING", indent);
if (cbor_string_is_indefinite(item)) {
- fprintf(out, "Indefinite, with %zu chunks:\n",
+ fprintf(out, "Indefinite, Chunks: %zu, Chunk data:\n",
cbor_string_chunk_count(item));
for (size_t i = 0; i < cbor_string_chunk_count(item); i++)
_cbor_nested_describe(cbor_string_chunks_handle(item)[i], out,
- indent + 4);
+ indent + indent_offset);
} else {
- fprintf(out, "Definite, length %zuB, %zu codepoints\n",
+ fprintf(out, "Definite, Length: %zuB, Codepoints: %zu, Data:\n",
cbor_string_length(item), cbor_string_codepoint_count(item));
- /* Careful - this doesn't support multibyte characters! */
- /* Printing those is out of the scope of this demo :) */
- /* libICU is your friend */
- fprintf(out, "%*s", indent + 4, " ");
- /* XXX: no null at the end -> confused vprintf */
- fwrite(cbor_string_handle(item), (int)cbor_string_length(item), 1, out);
+ fprintf(out, "%*s", indent + indent_offset, " ");
+ // Note: The string is not escaped, whitespace and control character
+ // will be printed in verbatim and take effect.
+ fwrite(cbor_string_handle(item), sizeof(unsigned char),
+ cbor_string_length(item), out);
fprintf(out, "\n");
}
break;
}
case CBOR_TYPE_ARRAY: {
- fprintf(out, "%*s[CBOR_TYPE_ARRAY] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_ARRAY", indent);
if (cbor_array_is_definite(item)) {
- fprintf(out, "Definite, size: %zu\n", cbor_array_size(item));
+ fprintf(out, "Definite, Size: %zu, Contents:\n", cbor_array_size(item));
} else {
- fprintf(out, "Indefinite, size: %zu\n", cbor_array_size(item));
+ fprintf(out, "Indefinite, Size: %zu, Contents:\n",
+ cbor_array_size(item));
}
for (size_t i = 0; i < cbor_array_size(item); i++)
- _cbor_nested_describe(cbor_array_handle(item)[i], out, indent + 4);
+ _cbor_nested_describe(cbor_array_handle(item)[i], out,
+ indent + indent_offset);
break;
}
case CBOR_TYPE_MAP: {
- fprintf(out, "%*s[CBOR_TYPE_MAP] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_MAP", indent);
if (cbor_map_is_definite(item)) {
- fprintf(out, "Definite, size: %zu\n", cbor_map_size(item));
+ fprintf(out, "Definite, Size: %zu, Contents:\n", cbor_map_size(item));
} else {
- fprintf(out, "Indefinite, size: %zu\n", cbor_map_size(item));
+ fprintf(out, "Indefinite, Size: %zu, Contents:\n", cbor_map_size(item));
}
+ // TODO: Label and group keys and values
for (size_t i = 0; i < cbor_map_size(item); i++) {
- _cbor_nested_describe(cbor_map_handle(item)[i].key, out, indent + 4);
- _cbor_nested_describe(cbor_map_handle(item)[i].value, out, indent + 4);
+ fprintf(out, "%*sMap entry %zu\n", indent + indent_offset, " ", i);
+ _cbor_nested_describe(cbor_map_handle(item)[i].key, out,
+ indent + 2 * indent_offset);
+ _cbor_nested_describe(cbor_map_handle(item)[i].value, out,
+ indent + 2 * indent_offset);
}
break;
}
case CBOR_TYPE_TAG: {
- fprintf(out, "%*s[CBOR_TYPE_TAG] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_TAG", indent);
fprintf(out, "Value: %" PRIu64 "\n", cbor_tag_value(item));
- _cbor_nested_describe(cbor_move(cbor_tag_item(item)), out, indent + 4);
+ _cbor_nested_describe(cbor_move(cbor_tag_item(item)), out,
+ indent + indent_offset);
break;
}
case CBOR_TYPE_FLOAT_CTRL: {
- fprintf(out, "%*s[CBOR_TYPE_FLOAT_CTRL] ", indent, " ");
+ _cbor_type_marquee(out, "CBOR_TYPE_FLOAT_CTRL", indent);
if (cbor_float_ctrl_is_ctrl(item)) {
if (cbor_is_bool(item))
fprintf(out, "Bool: %s\n", cbor_get_bool(item) ? "true" : "false");
@@ -392,10 +408,10 @@ static void _cbor_nested_describe(cbor_item_t *item, FILE *out, int indent) {
else if (cbor_is_null(item))
fprintf(out, "Null\n");
else
- fprintf(out, "Simple value %d\n", cbor_ctrl_value(item));
+ fprintf(out, "Simple value: %d\n", cbor_ctrl_value(item));
} else {
fprintf(out, "Width: %dB, ", _pow(2, cbor_float_get_width(item)));
- fprintf(out, "value: %lf\n", cbor_float_get_float(item));
+ fprintf(out, "Value: %lf\n", cbor_float_get_float(item));
}
break;
}
diff --git a/contrib/libcbor/src/cbor/common.h b/contrib/libcbor/src/cbor/common.h
index fddaabf3b9cf..1d0b426cff4c 100644
--- a/contrib/libcbor/src/cbor/common.h
+++ b/contrib/libcbor/src/cbor/common.h
@@ -157,7 +157,7 @@ _CBOR_NODISCARD
CBOR_EXPORT cbor_type cbor_typeof(
const cbor_item_t *item); /* Will be inlined iff link-time opt is enabled */
-/* Standard item types as described by the RFC */
+/* Standard CBOR Major item types */
/** Does the item have the appropriate major type?
* @param item the item
diff --git a/contrib/libcbor/src/cbor/internal/builder_callbacks.c b/contrib/libcbor/src/cbor/internal/builder_callbacks.c
index 78277f050c2b..257cef3adbd1 100644
--- a/contrib/libcbor/src/cbor/internal/builder_callbacks.c
+++ b/contrib/libcbor/src/cbor/internal/builder_callbacks.c
@@ -67,14 +67,14 @@ void _cbor_builder_append(cbor_item_t *item,
// Note: We use 0 and 1 subitems to distinguish between keys and values in
// indefinite items
if (ctx->stack->top->subitems % 2) {
- /* Odd record, this is a value */
- if (!_cbor_map_add_value(ctx->stack->top->item, item)) {
- ctx->creation_failed = true;
- cbor_decref(&item);
- break;
- }
+ // Odd record, this is a value.
+ ctx->creation_failed =
+ !_cbor_map_add_value(ctx->stack->top->item, item);
+ // Adding a value never fails since the memory is allocated when the
+ // key is added
+ CBOR_ASSERT(!ctx->creation_failed);
} else {
- /* Even record, this is a key */
+ // Even record, this is a key.
if (!_cbor_map_add_key(ctx->stack->top->item, item)) {
ctx->creation_failed = true;
cbor_decref(&item);
@@ -256,18 +256,8 @@ void cbor_builder_string_callback(void *context, cbor_data data,
uint64_t length) {
struct _cbor_decoder_context *ctx = context;
CHECK_LENGTH(ctx, length);
- struct _cbor_unicode_status unicode_status;
- uint64_t codepoint_count =
- _cbor_unicode_codepoint_count(data, length, &unicode_status);
-
- if (unicode_status.status != _CBOR_UNICODE_OK) {
- ctx->syntax_error = true;
- return;
- }
- CBOR_ASSERT(codepoint_count <= length);
unsigned char *new_handle = _cbor_malloc(length);
-
if (new_handle == NULL) {
ctx->creation_failed = true;
return;
@@ -281,7 +271,6 @@ void cbor_builder_string_callback(void *context, cbor_data data,
return;
}
cbor_string_set_handle(new_chunk, new_handle, length);
- new_chunk->metadata.string_metadata.codepoint_count = codepoint_count;
// If an indef string is on the stack, extend it (if it were closed, it would
// have been popped). Handle any syntax errors upstream.
@@ -355,6 +344,8 @@ bool _cbor_is_indefinite(cbor_item_t *item) {
case CBOR_TYPE_MAP:
return cbor_map_is_indefinite(item);
default:
+ // Should never happen since a non-nested item cannot be on top of the
+ // stack.
return false;
}
}
diff --git a/contrib/libcbor/src/cbor/internal/loaders.c b/contrib/libcbor/src/cbor/internal/loaders.c
index c25c63358318..cfa173de7905 100644
--- a/contrib/libcbor/src/cbor/internal/loaders.c
+++ b/contrib/libcbor/src/cbor/internal/loaders.c
@@ -49,7 +49,7 @@ uint64_t _cbor_load_uint64(const unsigned char *source) {
#endif
}
-/* As per http://tools.ietf.org/html/rfc7049#appendix-D */
+/* As per https://www.rfc-editor.org/rfc/rfc8949.html#name-half-precision */
float _cbor_decode_half(unsigned char *halfp) {
int half = (halfp[0] << 8) + halfp[1];
int exp = (half >> 10) & 0x1f;
diff --git a/contrib/libcbor/src/cbor/internal/memory_utils.h b/contrib/libcbor/src/cbor/internal/memory_utils.h
index 14843c8c56f6..696f67800e29 100644
--- a/contrib/libcbor/src/cbor/internal/memory_utils.h
+++ b/contrib/libcbor/src/cbor/internal/memory_utils.h
@@ -21,7 +21,7 @@ bool _cbor_safe_to_multiply(size_t a, size_t b);
_CBOR_NODISCARD
bool _cbor_safe_to_add(size_t a, size_t b);
-/** Adds `a` and `b`, propagating zeros and returing 0 on overflow. */
+/** Adds `a` and `b`, propagating zeros and returning 0 on overflow. */
_CBOR_NODISCARD
size_t _cbor_safe_signaling_add(size_t a, size_t b);
diff --git a/contrib/libcbor/src/cbor/internal/unicode.c b/contrib/libcbor/src/cbor/internal/unicode.c
index 1831c8e62057..f87b746a3e19 100644
--- a/contrib/libcbor/src/cbor/internal/unicode.c
+++ b/contrib/libcbor/src/cbor/internal/unicode.c
@@ -66,12 +66,12 @@ uint32_t _cbor_unicode_decode(uint32_t* state, uint32_t* codep, uint32_t byte) {
return *state;
}
-uint64_t _cbor_unicode_codepoint_count(cbor_data source, uint64_t source_length,
- struct _cbor_unicode_status* status) {
+size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length,
+ struct _cbor_unicode_status* status) {
*status =
(struct _cbor_unicode_status){.location = 0, .status = _CBOR_UNICODE_OK};
uint32_t codepoint, state = UTF8_ACCEPT, res;
- uint64_t pos = 0, count = 0;
+ size_t pos = 0, count = 0;
for (; pos < source_length; pos++) {
res = _cbor_unicode_decode(&state, &codepoint, source[pos]);
diff --git a/contrib/libcbor/src/cbor/internal/unicode.h b/contrib/libcbor/src/cbor/internal/unicode.h
index af32cc7ff027..81d03d007782 100644
--- a/contrib/libcbor/src/cbor/internal/unicode.h
+++ b/contrib/libcbor/src/cbor/internal/unicode.h
@@ -19,12 +19,12 @@ enum _cbor_unicode_status_error { _CBOR_UNICODE_OK, _CBOR_UNICODE_BADCP };
/** Signals unicode validation error and possibly its location */
struct _cbor_unicode_status {
enum _cbor_unicode_status_error status;
- uint64_t location;
+ size_t location;
};
_CBOR_NODISCARD
-uint64_t _cbor_unicode_codepoint_count(cbor_data source, uint64_t source_length,
- struct _cbor_unicode_status* status);
+size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length,
+ struct _cbor_unicode_status* status);
#ifdef __cplusplus
}
diff --git a/contrib/libcbor/src/cbor/maps.c b/contrib/libcbor/src/cbor/maps.c
index 8711e57acb70..8a3bd6075681 100644
--- a/contrib/libcbor/src/cbor/maps.c
+++ b/contrib/libcbor/src/cbor/maps.c
@@ -103,6 +103,7 @@ bool _cbor_map_add_value(cbor_item_t *item, cbor_item_t *value) {
return true;
}
+// TODO: Add a more convenient API like add(item, key, val)
bool cbor_map_add(cbor_item_t *item, struct cbor_pair pair) {
CBOR_ASSERT(cbor_isa_map(item));
if (!_cbor_map_add_key(item, pair.key)) return false;
diff --git a/contrib/libcbor/src/cbor/streaming.c b/contrib/libcbor/src/cbor/streaming.c
index 922a71d8e6b0..4b37701143ab 100644
--- a/contrib/libcbor/src/cbor/streaming.c
+++ b/contrib/libcbor/src/cbor/streaming.c
@@ -437,23 +437,21 @@ struct cbor_decoder_result cbor_stream_decode(
callbacks->indef_map_start(context);
return result;
}
- case 0xC0:
- /* Text date/time - RFC 3339 tag, fallthrough */
- case 0xC1:
- /* Epoch date tag, fallthrough */
- case 0xC2:
- /* Positive bignum tag, fallthrough */
- case 0xC3:
- /* Negative bignum tag, fallthrough */
- case 0xC4:
- /* Fraction, fallthrough */
- case 0xC5:
- /* Big float */
- {
- callbacks->tag(context, (uint64_t)(_cbor_load_uint8(source) -
- 0xC0)); /* 0xC0 offset */
- return result;
- }
+ /* See https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml for tag
+ * assignment. All well-formed tags are processed regardless of validity
+ * since maintaining the known mapping would be impractical.
+ *
+ * Moreover, even tags in the reserved "standard" range are not assigned
+ * but may get assigned in the future (see e.g.
+ * https://github.com/PJK/libcbor/issues/307), so processing all tags
+ * improves forward compatibility.
+ */
+ case 0xC0: /* Fallthrough */
+ case 0xC1: /* Fallthrough */
+ case 0xC2: /* Fallthrough */
+ case 0xC3: /* Fallthrough */
+ case 0xC4: /* Fallthrough */
+ case 0xC5: /* Fallthrough */
case 0xC6: /* Fallthrough */
case 0xC7: /* Fallthrough */
case 0xC8: /* Fallthrough */
@@ -468,13 +466,10 @@ struct cbor_decoder_result cbor_stream_decode(
case 0xD1: /* Fallthrough */
case 0xD2: /* Fallthrough */
case 0xD3: /* Fallthrough */
- case 0xD4: /* Unassigned tag value */
- {
- return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR};
- }
- case 0xD5: /* Expected b64url conversion tag - fallthrough */
- case 0xD6: /* Expected b64 conversion tag - fallthrough */
- case 0xD7: /* Expected b16 conversion tag */
+ case 0xD4: /* Fallthrough */
+ case 0xD5: /* Fallthrough */
+ case 0xD6: /* Fallthrough */
+ case 0xD7: /* Fallthrough */
{
callbacks->tag(context, (uint64_t)(_cbor_load_uint8(source) -
0xC0)); /* 0xC0 offset */
diff --git a/contrib/libcbor/src/cbor/strings.c b/contrib/libcbor/src/cbor/strings.c
index de2d1024bb4c..6ae96545cfe3 100644
--- a/contrib/libcbor/src/cbor/strings.c
+++ b/contrib/libcbor/src/cbor/strings.c
@@ -8,6 +8,7 @@
#include "strings.h"
#include <string.h>
#include "internal/memory_utils.h"
+#include "internal/unicode.h"
cbor_item_t *cbor_new_definite_string(void) {
cbor_item_t *item = _cbor_malloc(sizeof(cbor_item_t));
@@ -66,6 +67,15 @@ void cbor_string_set_handle(cbor_item_t *item,
CBOR_ASSERT(cbor_string_is_definite(item));
item->data = data;
item->metadata.string_metadata.length = length;
+ struct _cbor_unicode_status unicode_status;
+ size_t codepoint_count =
+ _cbor_unicode_codepoint_count(data, length, &unicode_status);
+ CBOR_ASSERT(codepoint_count <= length);
+ if (unicode_status.status == _CBOR_UNICODE_OK) {
+ item->metadata.string_metadata.codepoint_count = codepoint_count;
+ } else {
+ item->metadata.string_metadata.codepoint_count = 0;
+ }
}
cbor_item_t **cbor_string_chunks_handle(const cbor_item_t *item) {
diff --git a/contrib/libcbor/src/cbor/strings.h b/contrib/libcbor/src/cbor/strings.h
index 7a18f95e29fa..3e03f81385f0 100644
--- a/contrib/libcbor/src/cbor/strings.h
+++ b/contrib/libcbor/src/cbor/strings.h
@@ -33,7 +33,8 @@ _CBOR_NODISCARD CBOR_EXPORT size_t cbor_string_length(const cbor_item_t *item);
/** The number of codepoints in this string
*
- * Might differ from length if there are multibyte ones
+ * Might differ from `cbor_string_length` if there are multibyte codepoints.
+ * If the string data is not valid UTF-8, returns 0.
*
* @param item A string
* @return The number of codepoints in this string
@@ -71,6 +72,8 @@ cbor_string_handle(const cbor_item_t *item);
/** Set the handle to the underlying string
*
+ * The data is assumed to be a valid UTF-8 string. If the string is non-empty
+ * and invalid, `cbor_string_codepoint_count` will return 0.
*
* \rst
* .. warning:: Using a pointer to a stack allocated constant is a common
@@ -144,7 +147,11 @@ _CBOR_NODISCARD CBOR_EXPORT cbor_item_t *cbor_new_indefinite_string(void);
/** Creates a new string and initializes it
*
- * The `val` will be copied to a newly allocated block
+ * The data from `val` will be copied to a newly allocated memory block.
+ *
+ * Note that valid UTF-8 strings do not contain null bytes, so this routine is
+ * correct for all valid inputs. If the input is not guaranteed to be valid,
+ * use `cbor_build_stringn` instead.
*
* @param val A null-terminated UTF-8 string
* @return Reference to the new string item. The item's reference count is
@@ -155,10 +162,12 @@ _CBOR_NODISCARD CBOR_EXPORT cbor_item_t *cbor_build_string(const char *val);
/** Creates a new string and initializes it
*
- * The `handle` will be copied to a newly allocated block
+ * The data from `handle` will be copied to a newly allocated memory block.
+ *
+ * All @p `length` bytes will be stored in the string, even if there are null
+ * bytes or invalid UTF-8 sequences.
*
- * @param val A UTF-8 string, at least @p `length` long (excluding the null
- * byte)
+ * @param val A UTF-8 string, at least @p `length` bytes long
* @param length Length (in bytes) of the string passed in @p `val`.
* @return Reference to the new string item. The item's reference count is
* initialized to one.
diff --git a/contrib/libcbor/src/libcborConfig.cmake.in b/contrib/libcbor/src/libcborConfig.cmake.in
new file mode 100644
index 000000000000..565bed365e24
--- /dev/null
+++ b/contrib/libcbor/src/libcborConfig.cmake.in
@@ -0,0 +1,8 @@
+set(CBOR_VERSION @CBOR_VERSION@)
+
+@PACKAGE_INIT@
+
+set_and_check(CBOR_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
+set_and_check(CBOR_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
+
+check_required_components(libcbor)
diff --git a/contrib/libcbor/test/callbacks_test.c b/contrib/libcbor/test/callbacks_test.c
index d9e90195c819..65c5d37f4399 100644
--- a/contrib/libcbor/test/callbacks_test.c
+++ b/contrib/libcbor/test/callbacks_test.c
@@ -371,6 +371,30 @@ static void test_invalid_indef_break(void** _CBOR_UNUSED(_state)) {
assert_true(res.error.code == CBOR_ERR_SYNTAXERROR);
}
+static void test_invalid_state_indef_break(void** _CBOR_UNUSED(_state)) {
+ struct _cbor_stack stack = _cbor_stack_init();
+ assert_non_null(_cbor_stack_push(&stack, cbor_new_int8(), /*subitems=*/0));
+ struct _cbor_decoder_context context = {
+ .creation_failed = false,
+ .syntax_error = false,
+ .root = NULL,
+ .stack = &stack,
+ };
+
+ cbor_builder_indef_break_callback(&context);
+
+ assert_false(context.creation_failed);
+ assert_true(context.syntax_error);
+ assert_size_equal(context.stack->size, 1);
+ // The stack remains unchanged
+ cbor_item_t* small_int = stack.top->item;
+ assert_size_equal(cbor_refcount(small_int), 1);
+ assert_true(cbor_isa_uint(small_int));
+
+ cbor_decref(&small_int);
+ _cbor_stack_pop(&stack);
+}
+
int main(void) {
const struct CMUnitTest tests[] = {
cmocka_unit_test(test_default_callbacks),
@@ -388,6 +412,7 @@ int main(void) {
cmocka_unit_test(test_append_array_failure),
cmocka_unit_test(test_append_map_failure),
cmocka_unit_test(test_invalid_indef_break),
+ cmocka_unit_test(test_invalid_state_indef_break),
};
cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/contrib/libcbor/test/cbor_serialize_test.c b/contrib/libcbor/test/cbor_serialize_test.c
index d549c37217cc..a2907b149345 100644
--- a/contrib/libcbor/test/cbor_serialize_test.c
+++ b/contrib/libcbor/test/cbor_serialize_test.c
@@ -218,6 +218,34 @@ static void test_serialize_definite_string(void **_CBOR_UNUSED(_state)) {
cbor_decref(&item);
}
+static void test_serialize_definite_string_4b_header(
+ void **_CBOR_UNUSED(_state)) {
+#if SIZE_MAX > UINT16_MAX
+ cbor_item_t *item = cbor_new_definite_string();
+ const size_t size = (size_t)UINT16_MAX + 1;
+ unsigned char *data = malloc(size);
+ memset(data, 0, size);
+ cbor_string_set_handle(item, data, size);
+ assert_size_equal(cbor_serialized_size(item), 1 + 4 + size);
+ cbor_decref(&item);
+#endif
+}
+
+static void test_serialize_definite_string_8b_header(
+ void **_CBOR_UNUSED(_state)) {
+#if SIZE_MAX > UINT32_MAX
+ cbor_item_t *item = cbor_new_definite_string();
+ const size_t size = (size_t)UINT32_MAX + 1;
+ unsigned char *data = malloc(1);
+ data[0] = '\0';
+ cbor_string_set_handle(item, data, 1);
+ // Pretend that we have a big item to avoid the huge malloc
+ item->metadata.string_metadata.length = size;
+ assert_size_equal(cbor_serialized_size(item), 1 + 8 + size);
+ cbor_decref(&item);
+#endif
+}
+
static void test_serialize_indefinite_string(void **_CBOR_UNUSED(_state)) {
cbor_item_t *item = cbor_new_indefinite_string();
cbor_item_t *chunk = cbor_new_definite_string();
@@ -242,6 +270,7 @@ static void test_serialize_indefinite_string(void **_CBOR_UNUSED(_state)) {
static void test_serialize_string_no_space(void **_CBOR_UNUSED(_state)) {
cbor_item_t *item = cbor_new_definite_string();
unsigned char *data = malloc(12);
+ memset(data, 0, 12);
cbor_string_set_handle(item, data, 12);
assert_size_equal(cbor_serialize(item, buffer, 1), 0);
@@ -254,6 +283,7 @@ static void test_serialize_indefinite_string_no_space(
cbor_item_t *item = cbor_new_indefinite_string();
cbor_item_t *chunk = cbor_new_definite_string();
unsigned char *data = malloc(256);
+ memset(data, 0, 256);
cbor_string_set_handle(chunk, data, 256);
assert_true(cbor_string_add_chunk(item, cbor_move(chunk)));
@@ -638,6 +668,8 @@ int main(void) {
cmocka_unit_test(test_serialize_bytestring_no_space),
cmocka_unit_test(test_serialize_indefinite_bytestring_no_space),
cmocka_unit_test(test_serialize_definite_string),
+ cmocka_unit_test(test_serialize_definite_string_4b_header),
+ cmocka_unit_test(test_serialize_definite_string_8b_header),
cmocka_unit_test(test_serialize_indefinite_string),
cmocka_unit_test(test_serialize_string_no_space),
cmocka_unit_test(test_serialize_indefinite_string_no_space),
diff --git a/contrib/libcbor/test/cbor_stream_decode_test.c b/contrib/libcbor/test/cbor_stream_decode_test.c
index 1b8caf47765d..5288016c2fc6 100644
--- a/contrib/libcbor/test/cbor_stream_decode_test.c
+++ b/contrib/libcbor/test/cbor_stream_decode_test.c
@@ -613,9 +613,9 @@ static void test_int64_tag_decoding(void **_CBOR_UNUSED(_state)) {
assert_minimum_input_size(9, int64_tag_data);
}
-unsigned char bad_tag_data[] = {0xC6};
-static void test_bad_tag_decoding(void **_CBOR_UNUSED(_state)) {
- assert_decoder_result(0, CBOR_DECODER_ERROR, decode(bad_tag_data, 1));
+unsigned char reserved_byte_data[] = {0xDC};
+static void test_reserved_byte_decoding(void **_CBOR_UNUSED(_state)) {
+ assert_decoder_result(0, CBOR_DECODER_ERROR, decode(reserved_byte_data, 1));
}
unsigned char float2_data[] = {0xF9, 0x7B, 0xFF};
@@ -729,7 +729,7 @@ int main(void) {
stream_test(test_int16_tag_decoding),
stream_test(test_int32_tag_decoding),
stream_test(test_int64_tag_decoding),
- stream_test(test_bad_tag_decoding),
+ stream_test(test_reserved_byte_decoding),
stream_test(test_float2_decoding),
stream_test(test_float4_decoding),
diff --git a/contrib/libcbor/test/float_ctrl_test.c b/contrib/libcbor/test/float_ctrl_test.c
index 1bf8b7b7ba1d..c939486877e7 100644
--- a/contrib/libcbor/test/float_ctrl_test.c
+++ b/contrib/libcbor/test/float_ctrl_test.c
@@ -30,7 +30,7 @@ static void test_float2(void **_CBOR_UNUSED(_state)) {
assert_true(cbor_is_float(float_ctrl));
assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_16);
assert_true(cbor_float_get_float2(float_ctrl) == 65504.0F);
- assert_true(fabs(cbor_float_get_float(float_ctrl) - 65504.0F) < eps);
+ assert_float_equal(cbor_float_get_float(float_ctrl), 65504.0F, eps);
cbor_decref(&float_ctrl);
assert_null(float_ctrl);
}
@@ -43,7 +43,7 @@ static void test_float4(void **_CBOR_UNUSED(_state)) {
assert_true(cbor_is_float(float_ctrl));
assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_32);
assert_true(cbor_float_get_float4(float_ctrl) == 100000.0F);
- assert_true(fabs(cbor_float_get_float(float_ctrl) - 100000.0F) < eps);
+ assert_float_equal(cbor_float_get_float(float_ctrl), 100000.0F, eps);
cbor_decref(&float_ctrl);
assert_null(float_ctrl);
}
@@ -58,6 +58,8 @@ static void test_float8(void **_CBOR_UNUSED(_state)) {
assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_64);
// XXX: the cast prevents promotion to 80-bit floats on 32-bit x86
assert_true(cbor_float_get_float8(float_ctrl) == (double)1.0e+300);
+ // Not using `assert_double_equal` since CI has an old version of cmocka
+ assert_true(fabs(cbor_float_get_float(float_ctrl) - (double)1.0e+300) < eps);
cbor_decref(&float_ctrl);
assert_null(float_ctrl);
}
diff --git a/contrib/libcbor/test/pretty_printer_test.c b/contrib/libcbor/test/pretty_printer_test.c
index 4a6249c412d8..6ea40c0e7ce2 100644
--- a/contrib/libcbor/test/pretty_printer_test.c
+++ b/contrib/libcbor/test/pretty_printer_test.c
@@ -6,33 +6,200 @@
*/
#include <stdio.h>
+#include <string.h>
+
#include "assertions.h"
#include "cbor.h"
-unsigned char data[] = {0x8B, 0x01, 0x20, 0x5F, 0x41, 0x01, 0x41, 0x02,
- 0xFF, 0x7F, 0x61, 0x61, 0x61, 0x62, 0xFF, 0x9F,
- 0xFF, 0xA1, 0x61, 0x61, 0x61, 0x62, 0xC0, 0xBF,
- 0xFF, 0xFB, 0x40, 0x09, 0x1E, 0xB8, 0x51, 0xEB,
- 0x85, 0x1F, 0xF6, 0xF7, 0xF5};
-
-static void test_pretty_printer(void **_CBOR_UNUSED(_state)) {
+void assert_describe_result(cbor_item_t *item, char *expected_result) {
#if CBOR_PRETTY_PRINTER
+ // We know the expected size based on `expected_result`, but read everything
+ // in order to get the full actual output in a useful error message.
+ const size_t buffer_size = 512;
FILE *outfile = tmpfile();
- struct cbor_load_result res;
- cbor_item_t *item = cbor_load(data, 37, &res);
cbor_describe(item, outfile);
+ rewind(outfile);
+ // Treat string as null-terminated since cmocka doesn't have asserts
+ // for explicit length strings.
+ char *output = malloc(buffer_size);
+ assert_non_null(output);
+ size_t output_size = fread(output, sizeof(char), buffer_size, outfile);
+ output[output_size] = '\0';
+ assert_string_equal(output, expected_result);
+ assert_true(feof(outfile));
+ free(output);
+ fclose(outfile);
+#endif
+}
+
+static void test_uint(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_build_uint8(42);
+ assert_describe_result(item, "[CBOR_TYPE_UINT] Width: 1B, Value: 42\n");
cbor_decref(&item);
+}
- item = cbor_new_ctrl();
- cbor_set_ctrl(item, 1);
- cbor_describe(item, outfile);
+static void test_negint(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_build_negint16(40);
+ assert_describe_result(item,
+ "[CBOR_TYPE_NEGINT] Width: 2B, Value: -40 - 1\n");
cbor_decref(&item);
+}
- fclose(outfile);
-#endif
+static void test_definite_bytestring(void **_CBOR_UNUSED(_state)) {
+ unsigned char data[] = {0x01, 0x02, 0x03};
+ cbor_item_t *item = cbor_build_bytestring(data, 3);
+ assert_describe_result(item,
+ "[CBOR_TYPE_BYTESTRING] Definite, Length: 3B, Data:\n"
+ " 010203\n");
+ cbor_decref(&item);
+}
+
+static void test_indefinite_bytestring(void **_CBOR_UNUSED(_state)) {
+ unsigned char data[] = {0x01, 0x02, 0x03};
+ cbor_item_t *item = cbor_new_indefinite_bytestring();
+ assert_true(cbor_bytestring_add_chunk(
+ item, cbor_move(cbor_build_bytestring(data, 3))));
+ assert_true(cbor_bytestring_add_chunk(
+ item, cbor_move(cbor_build_bytestring(data, 2))));
+ assert_describe_result(
+ item,
+ "[CBOR_TYPE_BYTESTRING] Indefinite, Chunks: 2, Chunk data:\n"
+ " [CBOR_TYPE_BYTESTRING] Definite, Length: 3B, Data:\n"
+ " 010203\n"
+ " [CBOR_TYPE_BYTESTRING] Definite, Length: 2B, Data:\n"
+ " 0102\n");
+ cbor_decref(&item);
+}
+
+static void test_definite_string(void **_CBOR_UNUSED(_state)) {
+ char *string = "Hello!";
+ cbor_item_t *item = cbor_build_string(string);
+ assert_describe_result(
+ item,
+ "[CBOR_TYPE_STRING] Definite, Length: 6B, Codepoints: 6, Data:\n"
+ " Hello!\n");
+ cbor_decref(&item);
+}
+
+static void test_indefinite_string(void **_CBOR_UNUSED(_state)) {
+ char *string = "Hello!";
+ cbor_item_t *item = cbor_new_indefinite_string();
+ assert_true(
+ cbor_string_add_chunk(item, cbor_move(cbor_build_string(string))));
+ assert_true(
+ cbor_string_add_chunk(item, cbor_move(cbor_build_string(string))));
+ assert_describe_result(
+ item,
+ "[CBOR_TYPE_STRING] Indefinite, Chunks: 2, Chunk data:\n"
+ " [CBOR_TYPE_STRING] Definite, Length: 6B, Codepoints: 6, Data:\n"
+ " Hello!\n"
+ " [CBOR_TYPE_STRING] Definite, Length: 6B, Codepoints: 6, Data:\n"
+ " Hello!\n");
+ cbor_decref(&item);
+}
+
+static void test_multibyte_string(void **_CBOR_UNUSED(_state)) {
+ // "Štěstíčko" in UTF-8
+ char *string = "\xc5\xa0t\xc4\x9bst\xc3\xad\xc4\x8dko";
+ cbor_item_t *item = cbor_build_string(string);
+ assert_describe_result(
+ item,
+ "[CBOR_TYPE_STRING] Definite, Length: 13B, Codepoints: 9, Data:\n"
+ " \xc5\xa0t\xc4\x9bst\xc3\xad\xc4\x8dko\n");
+ cbor_decref(&item);
+}
+
+static void test_definite_array(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_new_definite_array(2);
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_uint8(1))));
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_uint8(2))));
+ assert_describe_result(item,
+ "[CBOR_TYPE_ARRAY] Definite, Size: 2, Contents:\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 1\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 2\n");
+ cbor_decref(&item);
+}
+
+static void test_indefinite_array(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_new_indefinite_array();
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_uint8(1))));
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_uint8(2))));
+ assert_describe_result(item,
+ "[CBOR_TYPE_ARRAY] Indefinite, Size: 2, Contents:\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 1\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 2\n");
+ cbor_decref(&item);
+}
+
+static void test_definite_map(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_new_definite_map(1);
+ assert_true(cbor_map_add(
+ item, (struct cbor_pair){.key = cbor_move(cbor_build_uint8(1)),
+ .value = cbor_move(cbor_build_uint8(2))}));
+ assert_describe_result(item,
+ "[CBOR_TYPE_MAP] Definite, Size: 1, Contents:\n"
+ " Map entry 0\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 1\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 2\n");
+ cbor_decref(&item);
+}
+
+static void test_indefinite_map(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_new_indefinite_map();
+ assert_true(cbor_map_add(
+ item, (struct cbor_pair){.key = cbor_move(cbor_build_uint8(1)),
+ .value = cbor_move(cbor_build_uint8(2))}));
+ assert_describe_result(item,
+ "[CBOR_TYPE_MAP] Indefinite, Size: 1, Contents:\n"
+ " Map entry 0\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 1\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 2\n");
+ cbor_decref(&item);
+}
+
+static void test_tag(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_build_tag(42, cbor_move(cbor_build_uint8(1)));
+ assert_describe_result(item,
+ "[CBOR_TYPE_TAG] Value: 42\n"
+ " [CBOR_TYPE_UINT] Width: 1B, Value: 1\n");
+ cbor_decref(&item);
+}
+
+static void test_floats(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_new_indefinite_array();
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_bool(true))));
+ assert_true(
+ cbor_array_push(item, cbor_move(cbor_build_ctrl(CBOR_CTRL_UNDEF))));
+ assert_true(
+ cbor_array_push(item, cbor_move(cbor_build_ctrl(CBOR_CTRL_NULL))));
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_ctrl(24))));
+ assert_true(cbor_array_push(item, cbor_move(cbor_build_float4(3.14f))));
+ assert_describe_result(
+ item,
+ "[CBOR_TYPE_ARRAY] Indefinite, Size: 5, Contents:\n"
+ " [CBOR_TYPE_FLOAT_CTRL] Bool: true\n"
+ " [CBOR_TYPE_FLOAT_CTRL] Undefined\n"
+ " [CBOR_TYPE_FLOAT_CTRL] Null\n"
+ " [CBOR_TYPE_FLOAT_CTRL] Simple value: 24\n"
+ " [CBOR_TYPE_FLOAT_CTRL] Width: 4B, Value: 3.140000\n");
+ cbor_decref(&item);
}
int main(void) {
- const struct CMUnitTest tests[] = {cmocka_unit_test(test_pretty_printer)};
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_uint),
+ cmocka_unit_test(test_negint),
+ cmocka_unit_test(test_definite_bytestring),
+ cmocka_unit_test(test_indefinite_bytestring),
+ cmocka_unit_test(test_definite_string),
+ cmocka_unit_test(test_indefinite_string),
+ cmocka_unit_test(test_multibyte_string),
+ cmocka_unit_test(test_definite_array),
+ cmocka_unit_test(test_indefinite_array),
+ cmocka_unit_test(test_definite_map),
+ cmocka_unit_test(test_indefinite_map),
+ cmocka_unit_test(test_tag),
+ cmocka_unit_test(test_floats),
+ };
return cmocka_run_group_tests(tests, NULL, NULL);
}
diff --git a/contrib/libcbor/test/string_test.c b/contrib/libcbor/test/string_test.c
index 991aa578a26e..c3079b449838 100644
--- a/contrib/libcbor/test/string_test.c
+++ b/contrib/libcbor/test/string_test.c
@@ -217,6 +217,22 @@ static void test_short_indef_string(void **_CBOR_UNUSED(_state)) {
assert_null(string);
}
+static void test_invalid_utf(void **_CBOR_UNUSED(_state)) {
+ /* 0x60 + 1 | 0xC5 (invalid unfinished 2B codepoint) */
+ unsigned char string_data[] = {0x61, 0xC5};
+ string = cbor_load(string_data, 2, &res);
+
+ assert_non_null(string);
+ assert_true(cbor_typeof(string) == CBOR_TYPE_STRING);
+ assert_true(cbor_isa_string(string));
+ assert_size_equal(cbor_string_length(string), 1);
+ assert_size_equal(cbor_string_codepoint_count(string), 0);
+ assert_true(cbor_string_is_definite(string));
+ assert_true(res.read == 2);
+
+ cbor_decref(&string);
+}
+
static void test_inline_creation(void **_CBOR_UNUSED(_state)) {
string = cbor_build_string("Hello!");
assert_memory_equal(cbor_string_handle(string), "Hello!", strlen("Hello!"));
@@ -275,6 +291,53 @@ static void test_add_chunk_reallocation_overflow(void **_CBOR_UNUSED(_state)) {
cbor_decref(&string);
}
+static void test_set_handle(void **_CBOR_UNUSED(_state)) {
+ string = cbor_new_definite_string();
+ char *test_string = "Hello";
+ unsigned char *string_data = malloc(strlen(test_string));
+ memcpy(string_data, test_string, strlen(test_string));
+ assert_ptr_not_equal(string_data, NULL);
+ cbor_string_set_handle(string, string_data, strlen(test_string));
+
+ assert_ptr_equal(cbor_string_handle(string), string_data);
+ assert_size_equal(cbor_string_length(string), 5);
+ assert_size_equal(cbor_string_codepoint_count(string), 5);
+
+ cbor_decref(&string);
+}
+
+static void test_set_handle_multibyte_codepoint(void **_CBOR_UNUSED(_state)) {
+ string = cbor_new_definite_string();
+ // "Štěstíčko" in UTF-8
+ char *test_string = "\xc5\xa0t\xc4\x9bst\xc3\xad\xc4\x8dko";
+ unsigned char *string_data = malloc(strlen(test_string));
+ memcpy(string_data, test_string, strlen(test_string));
+ assert_ptr_not_equal(string_data, NULL);
+ cbor_string_set_handle(string, string_data, strlen(test_string));
+
+ assert_ptr_equal(cbor_string_handle(string), string_data);
+ assert_size_equal(cbor_string_length(string), 13);
+ assert_size_equal(cbor_string_codepoint_count(string), 9);
+
+ cbor_decref(&string);
+}
+
+static void test_set_handle_invalid_utf(void **_CBOR_UNUSED(_state)) {
+ string = cbor_new_definite_string();
+ // Invalid multi-byte character (missing the second byte).
+ char *test_string = "Test: \xc5";
+ unsigned char *string_data = malloc(strlen(test_string));
+ memcpy(string_data, test_string, strlen(test_string));
+ assert_ptr_not_equal(string_data, NULL);
+ cbor_string_set_handle(string, string_data, strlen(test_string));
+
+ assert_ptr_equal(cbor_string_handle(string), string_data);
+ assert_size_equal(cbor_string_length(string), 7);
+ assert_size_equal(cbor_string_codepoint_count(string), 0);
+
+ cbor_decref(&string);
+}
+
int main(void) {
const struct CMUnitTest tests[] = {
cmocka_unit_test(test_empty_string),
@@ -285,10 +348,14 @@ int main(void) {
cmocka_unit_test(test_int32_string),
cmocka_unit_test(test_int64_string),
cmocka_unit_test(test_short_indef_string),
+ cmocka_unit_test(test_invalid_utf),
cmocka_unit_test(test_inline_creation),
cmocka_unit_test(test_string_creation),
cmocka_unit_test(test_string_add_chunk),
cmocka_unit_test(test_add_chunk_reallocation_overflow),
+ cmocka_unit_test(test_set_handle),
+ cmocka_unit_test(test_set_handle_multibyte_codepoint),
+ cmocka_unit_test(test_set_handle_invalid_utf),
};
return cmocka_run_group_tests(tests, NULL, NULL);
}
diff --git a/contrib/libcbor/test/tag_test.c b/contrib/libcbor/test/tag_test.c
index 4bf6c718f0b9..4bce10589803 100644
--- a/contrib/libcbor/test/tag_test.c
+++ b/contrib/libcbor/test/tag_test.c
@@ -102,6 +102,28 @@ static void test_nested_tag(void **_CBOR_UNUSED(_state)) {
assert_null(nested_tag);
}
+static void test_all_tag_values_supported(void **_CBOR_UNUSED(_state)) {
+ /* Test all items in the protected range of
+ * https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml */
+ for (int64_t tag_value = 0; tag_value <= 32767; tag_value++) {
+ cbor_item_t *tag_item =
+ cbor_build_tag(tag_value, cbor_move(cbor_build_uint8(42)));
+ unsigned char *serialized_tag;
+ size_t serialized_tag_size =
+ cbor_serialize_alloc(tag_item, &serialized_tag, NULL);
+ assert_true(serialized_tag_size > 0);
+ tag = cbor_load(serialized_tag, serialized_tag_size, &res);
+ assert_true(res.read == serialized_tag_size);
+ assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG);
+ assert_true(cbor_tag_value(tag) == tag_value);
+ cbor_decref(&tag);
+ assert_null(tag);
+ cbor_decref(&tag_item);
+ assert_null(tag_item);
+ free(serialized_tag);
+ }
+}
+
static void test_build_tag(void **_CBOR_UNUSED(_state)) {
tag = cbor_build_tag(1, cbor_move(cbor_build_uint8(42)));
@@ -134,6 +156,7 @@ int main(void) {
cmocka_unit_test(test_int32_tag),
cmocka_unit_test(test_int64_tag),
cmocka_unit_test(test_nested_tag),
+ cmocka_unit_test(test_all_tag_values_supported),
cmocka_unit_test(test_build_tag),
cmocka_unit_test(test_build_tag_failure),
cmocka_unit_test(test_tag_creation),
diff --git a/contrib/libcbor/test/test_allocator.c b/contrib/libcbor/test/test_allocator.c
index 72ccf6591d25..a2f98efa22f7 100644
--- a/contrib/libcbor/test/test_allocator.c
+++ b/contrib/libcbor/test/test_allocator.c
@@ -29,7 +29,7 @@ void finalize_mock_malloc(void) {
free(expectations);
}
-void print_backtrace() {
+void print_backtrace(void) {
#if HAS_EXECINFO
void *buffer[128];
int frames = backtrace(buffer, 128);
diff --git a/contrib/libcxxrt/libelftc_dem_gnu3.c b/contrib/libcxxrt/libelftc_dem_gnu3.c
index e75d1694562e..dbdbd6f2414e 100644
--- a/contrib/libcxxrt/libelftc_dem_gnu3.c
+++ b/contrib/libcxxrt/libelftc_dem_gnu3.c
@@ -2472,7 +2472,7 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddata)
assert(ddata->cur_output->size > 0);
if (vector_read_cmd_find(&ddata->cmd, READ_TMPL) == NULL)
ddata->last_sname =
- ddata->cur_output->container[ddata->output.size - 1];
+ ddata->cur_output->container[ddata->cur_output->size - 1];
ddata->cur += len;
diff --git a/contrib/libdiff/include/diff_main.h b/contrib/libdiff/include/diff_main.h
index 04a6c6e748c9..11700580db4b 100644
--- a/contrib/libdiff/include/diff_main.h
+++ b/contrib/libdiff/include/diff_main.h
@@ -118,6 +118,7 @@ struct diff_data {
/* Flags set by file atomizer. */
#define DIFF_ATOMIZER_FOUND_BINARY_DATA 0x00000001
+#define DIFF_ATOMIZER_FILE_TRUNCATED 0x00000002
/* Flags set by caller of diff_main(). */
#define DIFF_FLAG_IGNORE_WHITESPACE 0x00000001
diff --git a/contrib/libdiff/lib/diff_atomize_text.c b/contrib/libdiff/lib/diff_atomize_text.c
index 32023105af94..d8a69733fc00 100644
--- a/contrib/libdiff/lib/diff_atomize_text.c
+++ b/contrib/libdiff/lib/diff_atomize_text.c
@@ -16,6 +16,8 @@
*/
#include <errno.h>
+#include <setjmp.h>
+#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
@@ -122,10 +124,18 @@ diff_data_atomize_text_lines_fd(struct diff_data *d)
return DIFF_RC_OK;
}
+static sigjmp_buf diff_data_signal_env;
+static void
+diff_data_signal_handler(int sig)
+{
+ siglongjmp(diff_data_signal_env, sig);
+}
+
static int
diff_data_atomize_text_lines_mmap(struct diff_data *d)
{
- const uint8_t *pos = d->data;
+ struct sigaction act, oact;
+ const uint8_t *volatile pos = d->data;
const uint8_t *end = pos + d->len;
bool ignore_whitespace = (d->diff_flags & DIFF_FLAG_IGNORE_WHITESPACE);
bool embedded_nul = false;
@@ -136,8 +146,22 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d)
ARRAYLIST_INIT(d->atoms, 1 << pow2);
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+ act.sa_handler = diff_data_signal_handler;
+ sigaction(SIGBUS, &act, &oact);
+ if (sigsetjmp(diff_data_signal_env, 0) > 0) {
+ /*
+ * The file was truncated while we were reading it. Set
+ * the end pointer to the beginning of the line we were
+ * trying to read, adjust the file length, and set a flag.
+ */
+ end = pos;
+ d->len = end - d->data;
+ d->atomizer_flags |= DIFF_ATOMIZER_FILE_TRUNCATED;
+ }
while (pos < end) {
- const uint8_t *line_end = pos;
+ const uint8_t *line_start = pos, *line_end = pos;
unsigned int hash = 0;
while (line_end < end && *line_end != '\r' && *line_end != '\n') {
@@ -164,15 +188,16 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d)
*atom = (struct diff_atom){
.root = d,
- .pos = (off_t)(pos - d->data),
- .at = pos,
- .len = line_end - pos,
+ .pos = (off_t)(line_start - d->data),
+ .at = line_start,
+ .len = line_end - line_start,
.hash = hash,
};
/* Starting point for next line: */
pos = line_end;
}
+ sigaction(SIGBUS, &oact, NULL);
/* File are considered binary if they contain embedded '\0' bytes. */
if (embedded_nul)
diff --git a/contrib/libdiff/lib/diff_main.c b/contrib/libdiff/lib/diff_main.c
index e64b1320e553..1cf91c0a1bdb 100644
--- a/contrib/libdiff/lib/diff_main.c
+++ b/contrib/libdiff/lib/diff_main.c
@@ -54,7 +54,8 @@ diff_chunk_type(const struct diff_chunk *chunk)
static int
read_at(FILE *f, off_t at_pos, unsigned char *buf, size_t len)
{
- int r;
+ ssize_t r;
+
if (fseeko(f, at_pos, SEEK_SET) == -1)
return errno;
r = fread(buf, sizeof(char), len, f);
@@ -153,7 +154,7 @@ diff_atom_cmp(int *cmp,
unsigned char buf_left[chunksz], buf_right[chunksz];
const uint8_t *p_left, *p_right;
off_t n_left, n_right;
- ssize_t r;
+ int r;
if (!remain_right) {
*cmp = 1;
diff --git a/contrib/libdiff/lib/diff_output.c b/contrib/libdiff/lib/diff_output.c
index 78d9b8942077..3b84608882f6 100644
--- a/contrib/libdiff/lib/diff_output.c
+++ b/contrib/libdiff/lib/diff_output.c
@@ -75,8 +75,8 @@ diff_output_lines(struct diff_output_info *outinfo, FILE *dest,
foreach_diff_atom(atom, start_atom, count) {
off_t outlen = 0;
int i, ch, nbuf = 0;
- unsigned int len = atom->len;
- unsigned char buf[DIFF_OUTPUT_BUF_SIZE + 1 /* '\n' */];
+ size_t len = atom->len, wlen;
+ char buf[DIFF_OUTPUT_BUF_SIZE + 1 /* '\n' */];
size_t n;
n = strlcpy(buf, prefix, sizeof(buf));
@@ -97,19 +97,19 @@ diff_output_lines(struct diff_output_info *outinfo, FILE *dest,
if (rc)
return rc;
if (nbuf >= DIFF_OUTPUT_BUF_SIZE) {
- rc = fwrite(buf, 1, nbuf, dest);
- if (rc != nbuf)
+ wlen = fwrite(buf, 1, nbuf, dest);
+ if (wlen != nbuf)
return errno;
- outlen += rc;
+ outlen += wlen;
nbuf = 0;
}
buf[nbuf++] = ch;
}
buf[nbuf++] = '\n';
- rc = fwrite(buf, 1, nbuf, dest);
- if (rc != nbuf)
+ wlen = fwrite(buf, 1, nbuf, dest);
+ if (wlen != nbuf)
return errno;
- outlen += rc;
+ outlen += wlen;
if (outinfo) {
ARRAYLIST_ADD(offp, outinfo->line_offsets);
if (offp == NULL)
@@ -253,7 +253,7 @@ diff_output_trailing_newline_msg(struct diff_output_info *outinfo, FILE *dest,
}
static bool
-is_function_prototype(unsigned char ch)
+is_function_prototype(char ch)
{
return (isalpha((unsigned char)ch) || ch == '_' || ch == '$' ||
ch == '-' || ch == '+');
@@ -268,7 +268,7 @@ diff_output_match_function_prototype(char *prototype, size_t prototype_size,
{
struct diff_atom *start_atom, *atom;
const struct diff_data *data;
- unsigned char buf[DIFF_FUNCTION_CONTEXT_SIZE];
+ char buf[DIFF_FUNCTION_CONTEXT_SIZE];
const char *state = NULL;
int rc, i, ch;
@@ -285,7 +285,7 @@ diff_output_match_function_prototype(char *prototype, size_t prototype_size,
rc = get_atom_byte(&ch, atom, 0);
if (rc)
return rc;
- buf[0] = (unsigned char)ch;
+ buf[0] = ch;
if (!is_function_prototype(buf[0]))
continue;
for (i = 1; i < atom->len && i < sizeof(buf) - 1; i++) {
@@ -294,7 +294,7 @@ diff_output_match_function_prototype(char *prototype, size_t prototype_size,
return rc;
if (ch == '\n')
break;
- buf[i] = (unsigned char)ch;
+ buf[i] = ch;
}
buf[i] = '\0';
if (begins_with(buf, "private:")) {
diff --git a/contrib/libfido2/.actions/build-bsd b/contrib/libfido2/.actions/build-bsd
new file mode 100755
index 000000000000..66fc4e3ba281
--- /dev/null
+++ b/contrib/libfido2/.actions/build-bsd
@@ -0,0 +1,97 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+BASE_URL="https://builds.sr.ht"
+MANIFEST="$(mktemp)"
+LOGFILE="$(mktemp)"
+trap '[ -f "${LOGFILE}" ] && cat -- "${LOGFILE}"' EXIT
+
+# construct the sourcehut build manifest
+cat > "${MANIFEST}" <<- EOF
+image: ${IMAGE}
+packages:
+ - cmake
+ - llvm
+ - pcsc-lite
+EOF
+
+case "${IMAGE}" in
+ freebsd*)
+cat >> "${MANIFEST}" <<- EOF
+ - libcbor
+ - pkgconf
+EOF
+ ;;
+esac
+
+cat >> "${MANIFEST}" <<- EOF
+sources:
+ - ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}#$(git rev-parse HEAD)
+tasks:
+ - build: |
+ if [ "\$(uname)" = "OpenBSD" ]; then
+ SUDO="doas -u root"
+ else
+ SUDO=sudo
+ fi
+ SCAN="/usr/local/bin/scan-build --use-cc=/usr/bin/cc --status-bugs"
+ cd libfido2
+ for T in Debug Release; do
+ mkdir build-\$T
+ (cd build-\$T && \${SCAN} cmake -DCMAKE_BUILD_TYPE=\$T ..)
+ \${SCAN} make -j"\$(sysctl -n hw.ncpu)" -C build-\$T
+ make -C build-\$T regress
+ \${SUDO} make -C build-\$T install
+ done
+EOF
+
+q() {
+ curl \
+ --silent \
+ --oauth2-bearer "${SOURCEHUT_TOKEN}" \
+ --header "Content-Type: application/json" \
+ --data @- -- \
+ "${BASE_URL}/query" \
+ | tee -a -- "${LOGFILE}"
+}
+
+submit_job() {
+ local manifest="$1"
+ jq \
+ --compact-output --null-input \
+ '{ query: $body, variables: { var: $var } }' \
+ --arg body 'mutation($var: String!) { submit(manifest: $var) { id } }' \
+ --rawfile var "${manifest}" \
+ | q \
+ | jq --exit-status --raw-output '.data.submit.id'
+}
+
+job_status() {
+ local id="$1"
+ jq \
+ --compact-output --null-input \
+ '{ query: $body, variables: { var: $var } }' \
+ --arg body 'query($var: Int!) { job(id: $var) { status } }' \
+ --argjson var "${id}" \
+ | q \
+ | jq --exit-status --raw-output '.data.job.status'
+}
+
+JOB_ID="$(submit_job "${MANIFEST}")" || exit 1
+[ -z "${JOB_ID}" ] && exit 1
+echo "Job '${JOB_ID}' running at ${BASE_URL}/~yubico-libfido2/job/${JOB_ID}"
+
+while true; do
+ JOB_STATUS="$(job_status "${JOB_ID}")" || exit 1
+ case "${JOB_STATUS}" in
+ SUCCESS) exit 0;;
+ FAILED) exit 1;;
+ PENDING|QUEUED|RUNNING) ;;
+ *) exit 1;;
+ esac
+ sleep 60
+done
diff --git a/contrib/libfido2/.actions/build-linux-clang b/contrib/libfido2/.actions/build-linux-clang
new file mode 100755
index 000000000000..ba20f1279ec9
--- /dev/null
+++ b/contrib/libfido2/.actions/build-linux-clang
@@ -0,0 +1,21 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+${CC} --version
+SCAN=scan-build${CC#clang}
+
+# Check exports.
+(cd src && ./diff_exports.sh)
+
+# Build, analyze, and install libfido2.
+for T in Debug Release; do
+ mkdir build-$T
+ (cd build-$T && ${SCAN} --use-cc="${CC}" cmake -DCMAKE_BUILD_TYPE=$T ..)
+ ${SCAN} --use-cc="${CC}" --status-bugs make -j"$(nproc)" -C build-$T
+ make -C build-$T regress
+ sudo make -C build-$T install
+done
diff --git a/contrib/libfido2/.actions/build-linux-gcc b/contrib/libfido2/.actions/build-linux-gcc
new file mode 100755
index 000000000000..cd42b5eb7bed
--- /dev/null
+++ b/contrib/libfido2/.actions/build-linux-gcc
@@ -0,0 +1,23 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+${CC} --version
+
+# Build and install libfido2.
+for T in Debug Release; do
+ mkdir build-$T
+ (cd build-$T && cmake -DCMAKE_BUILD_TYPE=$T ..)
+ make -j"$(nproc)" -C build-$T
+ make -C build-$T regress
+ sudo make -C build-$T install
+done
+
+# Check udev/fidodevs.
+[ -x "$(which update-alternatives)" ] && {
+ sudo update-alternatives --set awk "$(which original-awk)"
+}
+udev/check.sh udev/fidodevs
diff --git a/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc b/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc
new file mode 100755
index 000000000000..a89578da0886
--- /dev/null
+++ b/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc
@@ -0,0 +1,58 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022-2023 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# XXX defining CC and cross-compiling confuses OpenSSL's build.
+unset CC
+
+sudo mkdir /fakeroot
+sudo chmod 755 /fakeroot
+
+cat << EOF > /tmp/mingw.cmake
+SET(CMAKE_SYSTEM_NAME Windows)
+SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
+SET(CMAKE_FIND_ROOT_PATH /fakeroot)
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+EOF
+
+# Build and install libcbor.
+git clone --depth=1 https://github.com/pjk/libcbor -b v0.10.1
+cd libcbor
+mkdir build
+(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \
+ -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/fakeroot ..)
+make -j"$(nproc)" -C build
+sudo make -C build install
+cd ..
+
+# Build and install OpenSSL 1.1.1w.
+git clone --depth=1 https://github.com/openssl/openssl -b OpenSSL_1_1_1w
+cd openssl
+./Configure mingw --prefix=/fakeroot --openssldir=/fakeroot/openssl \
+ --cross-compile-prefix=i686-w64-mingw32-
+make -j"$(nproc)"
+sudo make install_sw
+cd ..
+
+# Build and install zlib.
+git clone --depth=1 https://github.com/madler/zlib -b v1.3
+cd zlib
+make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32-
+sudo make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- DESTDIR=/fakeroot \
+ INCLUDE_PATH=/include LIBRARY_PATH=/lib BINARY_PATH=/bin install
+cd ..
+
+# Build and install libfido2.
+export PKG_CONFIG_PATH=/fakeroot/lib/pkgconfig
+mkdir build
+(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \
+ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/fakeroot ..)
+make -j"$(nproc)" -C build
+sudo make -C build install
diff --git a/contrib/libfido2/.actions/build-linux-openssl3-clang b/contrib/libfido2/.actions/build-linux-openssl3-clang
new file mode 100755
index 000000000000..2383e51ad8f5
--- /dev/null
+++ b/contrib/libfido2/.actions/build-linux-openssl3-clang
@@ -0,0 +1,33 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+${CC} --version
+SCAN=scan-build${CC#clang}
+FAKEROOT="$(mktemp -d)"
+
+# Check exports.
+(cd src && ./diff_exports.sh)
+
+# Build and install OpenSSL 3.0.12.
+git clone --branch openssl-3.0.12 \
+ --depth=1 https://github.com/openssl/openssl
+cd openssl
+./Configure linux-x86_64-clang --prefix="${FAKEROOT}" \
+ --openssldir="${FAKEROOT}/openssl" --libdir=lib
+make install_sw
+cd ..
+
+# Build, analyze, and install libfido2.
+for T in Debug Release; do
+ mkdir build-$T
+ export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig"
+ (cd build-$T && ${SCAN} --use-cc="${CC}" \
+ cmake -DCMAKE_BUILD_TYPE=$T ..)
+ ${SCAN} --use-cc="${CC}" --status-bugs make -C build-$T
+ make -C build-$T regress
+ sudo make -C build-$T install
+done
diff --git a/contrib/libfido2/.actions/build-linux-openssl3-gcc b/contrib/libfido2/.actions/build-linux-openssl3-gcc
new file mode 100755
index 000000000000..344fc12bce8c
--- /dev/null
+++ b/contrib/libfido2/.actions/build-linux-openssl3-gcc
@@ -0,0 +1,28 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+${CC} --version
+FAKEROOT="$(mktemp -d)"
+
+# Build and install OpenSSL 3.0.12.
+git clone --branch openssl-3.0.12 \
+ --depth=1 https://github.com/openssl/openssl
+cd openssl
+./Configure linux-x86_64 --prefix="${FAKEROOT}" \
+ --openssldir="${FAKEROOT}/openssl" --libdir=lib
+make install_sw
+cd ..
+
+# Build and install libfido2.
+for T in Debug Release; do
+ mkdir build-$T
+ export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig"
+ (cd build-$T && cmake -DCMAKE_BUILD_TYPE=$T ..)
+ make -j"$(nproc)" -C build-$T
+ make -C build-$T regress
+ sudo make -C build-$T install
+done
diff --git a/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc b/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc
new file mode 100755
index 000000000000..3bbb141dad0d
--- /dev/null
+++ b/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc
@@ -0,0 +1,59 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022-2023 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+# XXX defining CC and cross-compiling confuses OpenSSL's build.
+unset CC
+
+sudo mkdir /fakeroot
+sudo chmod 755 /fakeroot
+
+cat << EOF > /tmp/mingw.cmake
+SET(CMAKE_SYSTEM_NAME Windows)
+SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
+SET(CMAKE_FIND_ROOT_PATH /fakeroot)
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+EOF
+
+# Build and install libcbor.
+git clone --depth=1 https://github.com/pjk/libcbor -b v0.10.1
+cd libcbor
+mkdir build
+(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \
+ -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/fakeroot ..)
+make -j"$(nproc)" -C build
+sudo make -C build install
+cd ..
+
+# Build and install OpenSSL 3.0.11.
+git clone --branch openssl-3.0.12 \
+ --depth=1 https://github.com/openssl/openssl
+cd openssl
+./Configure mingw --prefix=/fakeroot --openssldir=/fakeroot/openssl \
+ --cross-compile-prefix=i686-w64-mingw32- --libdir=lib
+make -j"$(nproc)"
+sudo make install_sw
+cd ..
+
+# Build and install zlib.
+git clone --depth=1 https://github.com/madler/zlib -b v1.3
+cd zlib
+make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32-
+sudo make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- DESTDIR=/fakeroot \
+ INCLUDE_PATH=/include LIBRARY_PATH=/lib BINARY_PATH=/bin install
+cd ..
+
+# Build and install libfido2.
+export PKG_CONFIG_PATH=/fakeroot/lib/pkgconfig
+mkdir build
+(cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \
+ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/fakeroot ..)
+make -C build 2>&1
+sudo make -C build install
diff --git a/contrib/libfido2/.actions/build-osx-clang b/contrib/libfido2/.actions/build-osx-clang
new file mode 100755
index 000000000000..b4beea221315
--- /dev/null
+++ b/contrib/libfido2/.actions/build-osx-clang
@@ -0,0 +1,19 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+export PKG_CONFIG_PATH="$(brew --prefix openssl@3.0)/lib/pkgconfig"
+SCAN="$(brew --prefix llvm)/bin/scan-build"
+
+# Build, analyze, and install libfido2.
+for T in Debug Release; do
+ mkdir build-$T
+ (cd build-$T && ${SCAN} cmake -DCMAKE_BUILD_TYPE=$T ..)
+ ${SCAN} --status-bugs make -j"$(sysctl -n hw.ncpu)" -C build-$T
+ make -C build-$T man_symlink_html
+ make -C build-$T regress
+ sudo make -C build-$T install
+done
diff --git a/contrib/libfido2/.actions/fuzz-linux b/contrib/libfido2/.actions/fuzz-linux
new file mode 100755
index 000000000000..3f57ac40ff4b
--- /dev/null
+++ b/contrib/libfido2/.actions/fuzz-linux
@@ -0,0 +1,93 @@
+#!/bin/sh -eux
+
+# Copyright (c) 2020-2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+LIBCBOR_URL="https://github.com/pjk/libcbor"
+LIBCBOR_TAG="v0.10.2"
+LIBCBOR_ASAN="address alignment bounds"
+LIBCBOR_MSAN="memory"
+OPENSSL_URL="https://github.com/openssl/openssl"
+OPENSSL_TAG="openssl-3.0.12"
+ZLIB_URL="https://github.com/madler/zlib"
+ZLIB_TAG="v1.3"
+ZLIB_ASAN="address alignment bounds undefined"
+ZLIB_MSAN="memory"
+FIDO2_ASAN="address bounds fuzzer-no-link implicit-conversion leak"
+FIDO2_ASAN="${FIDO2_ASAN} pointer-compare pointer-subtract undefined"
+FIDO2_MSAN="fuzzer-no-link memory"
+COMMON_CFLAGS="-g2 -fno-omit-frame-pointer"
+COMMON_CFLAGS="${COMMON_CFLAGS} -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
+UBSAN_OPTIONS="halt_on_error=1:print_stacktrace=1:strict_string_checks=1"
+ASAN_OPTIONS="${UBSAN_OPTIONS}:detect_invalid_pointer_pairs=2:detect_leaks=1"
+MSAN_OPTIONS="${UBSAN_OPTIONS}"
+
+case "$1" in
+asan)
+ LIBCBOR_CFLAGS="-fsanitize=$(echo "${LIBCBOR_ASAN}" | tr ' ' ',')"
+ ZLIB_CFLAGS="-fsanitize=$(echo "${ZLIB_ASAN}" | tr ' ' ',')"
+ FIDO2_CFLAGS="-fsanitize=$(echo "${FIDO2_ASAN}" | tr ' ' ',')"
+ FIDO2_CFLAGS="${FIDO2_CFLAGS} -fsanitize-address-use-after-scope"
+ ;;
+msan)
+ LIBCBOR_CFLAGS="-fsanitize=$(echo "${LIBCBOR_MSAN}" | tr ' ' ',')"
+ ZLIB_CFLAGS="-fsanitize=$(echo "${ZLIB_MSAN}" | tr ' ' ',')"
+ FIDO2_CFLAGS="-fsanitize=$(echo "${FIDO2_MSAN}" | tr ' ' ',')"
+ FIDO2_CFLAGS="${FIDO2_CFLAGS} -fsanitize-memory-track-origins"
+ ;;
+*)
+ echo "unknown sanitiser \"$1\"" 1>&2 && exit 1
+esac
+
+${CC} --version
+WORKDIR="${WORKDIR:-$(pwd)}"
+FAKEROOT="${FAKEROOT:-$(mktemp -d)}"
+cd "${FAKEROOT}"
+
+# libcbor
+git clone --depth=1 "${LIBCBOR_URL}" -b "${LIBCBOR_TAG}"
+cd libcbor
+patch -p0 -s < "${WORKDIR}/fuzz/README"
+mkdir build
+(cd build && cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_C_FLAGS_DEBUG="${LIBCBOR_CFLAGS} ${COMMON_CFLAGS}" \
+ -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX="${FAKEROOT}" \
+ -DSANITIZE=OFF ..)
+make VERBOSE=1 -j"$(nproc)" -C build all install
+cd -
+
+# openssl
+git clone --depth=1 "${OPENSSL_URL}" -b "${OPENSSL_TAG}"
+cd openssl
+./Configure linux-x86_64-clang "enable-$1" --prefix="${FAKEROOT}" \
+ --openssldir="${FAKEROOT}/openssl" --libdir=lib
+make install_sw
+cd -
+
+# zlib
+git clone --depth=1 "${ZLIB_URL}" -b "${ZLIB_TAG}"
+cd zlib
+CFLAGS="${ZLIB_CFLAGS}" LDFLAGS="${ZLIB_CFLAGS}" ./configure \
+ --prefix="${FAKEROOT}"
+make install
+cd -
+
+# libfido2
+mkdir build
+export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig"
+(cd build && cmake -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_C_FLAGS_DEBUG="${FIDO2_CFLAGS} ${COMMON_CFLAGS}" -DFUZZ=ON \
+ -DFUZZ_LDFLAGS="-fsanitize=fuzzer" "${WORKDIR}")
+make -j"$(nproc)" -C build
+
+# fuzz
+mkdir corpus
+curl -s https://storage.googleapis.com/yubico-libfido2/corpus.tgz |
+ tar -C corpus -zxf -
+export UBSAN_OPTIONS ASAN_OPTIONS MSAN_OPTIONS
+for f in assert bio cred credman hid largeblob mgmt netlink pcsc; do
+ build/fuzz/fuzz_${f} -use_value_profile=1 -reload=30 -print_pcs=1 \
+ -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_${f}
+done
diff --git a/contrib/libfido2/.actions/llvm.gpg b/contrib/libfido2/.actions/llvm.gpg
new file mode 100644
index 000000000000..aa6b105aa3d7
--- /dev/null
+++ b/contrib/libfido2/.actions/llvm.gpg
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQINBFE9lCwBEADi0WUAApM/mgHJRU8lVkkw0CHsZNpqaQDNaHefD6Rw3S4LxNmM
+EZaOTkhP200XZM8lVdbfUW9xSjA3oPldc1HG26NjbqqCmWpdo2fb+r7VmU2dq3NM
+R18ZlKixiLDE6OUfaXWKamZsXb6ITTYmgTO6orQWYrnW6ckYHSeaAkW0wkDAryl2
+B5v8aoFnQ1rFiVEMo4NGzw4UX+MelF7rxaaregmKVTPiqCOSPJ1McC1dHFN533FY
+Wh/RVLKWo6npu+owtwYFQW+zyQhKzSIMvNujFRzhIxzxR9Gn87MoLAyfgKEzrbbT
+DhqqNXTxS4UMUKCQaO93TzetX/EBrRpJj+vP640yio80h4Dr5pAd7+LnKwgpTDk1
+G88bBXJAcPZnTSKu9I2c6KY4iRNbvRz4i+ZdwwZtdW4nSdl2792L7Sl7Nc44uLL/
+ZqkKDXEBF6lsX5XpABwyK89S/SbHOytXv9o4puv+65Ac5/UShspQTMSKGZgvDauU
+cs8kE1U9dPOqVNCYq9Nfwinkf6RxV1k1+gwtclxQuY7UpKXP0hNAXjAiA5KS5Crq
+7aaJg9q2F4bub0mNU6n7UI6vXguF2n4SEtzPRk6RP+4TiT3bZUsmr+1ktogyOJCc
+Ha8G5VdL+NBIYQthOcieYCBnTeIH7D3Sp6FYQTYtVbKFzmMK+36ERreL/wARAQAB
+tD1TeWx2ZXN0cmUgTGVkcnUgLSBEZWJpYW4gTExWTSBwYWNrYWdlcyA8c3lsdmVz
+dHJlQGRlYmlhbi5vcmc+iQI4BBMBAgAiBQJRPZQsAhsDBgsJCAcDAgYVCAIJCgsE
+FgIDAQIeAQIXgAAKCRAVz00Yr090Ibx+EADArS/hvkDF8juWMXxh17CgR0WZlHCC
+9CTBWkg5a0bNN/3bb97cPQt/vIKWjQtkQpav6/5JTVCSx2riL4FHYhH0iuo4iAPR
+udC7Cvg8g7bSPrKO6tenQZNvQm+tUmBHgFiMBJi92AjZ/Qn1Shg7p9ITivFxpLyX
+wpmnF1OKyI2Kof2rm4BFwfSWuf8Fvh7kDMRLHv+MlnK/7j/BNpKdozXxLcwoFBmn
+l0WjpAH3OFF7Pvm1LJdf1DjWKH0Dc3sc6zxtmBR/KHHg6kK4BGQNnFKujcP7TVdv
+gMYv84kun14pnwjZcqOtN3UJtcx22880DOQzinoMs3Q4w4o05oIF+sSgHViFpc3W
+R0v+RllnH05vKZo+LDzc83DQVrdwliV12eHxrMQ8UYg88zCbF/cHHnlzZWAJgftg
+hB08v1BKPgYRUzwJ6VdVqXYcZWEaUJmQAPuAALyZESw94hSo28FAn0/gzEc5uOYx
+K+xG/lFwgAGYNb3uGM5m0P6LVTfdg6vDwwOeTNIExVk3KVFXeSQef2ZMkhwA7wya
+KJptkb62wBHFE+o9TUdtMCY6qONxMMdwioRE5BYNwAsS1PnRD2+jtlI0DzvKHt7B
+MWd8hnoUKhMeZ9TNmo+8CpsAtXZcBho0zPGz/R8NlJhAWpdAZ1CmcPo83EW86Yq7
+BxQUKnNHcwj2ebkCDQRRPZQsARAA4jxYmbTHwmMjqSizlMJYNuGOpIidEdx9zQ5g
+zOr431/VfWq4S+VhMDhs15j9lyml0y4ok215VRFwrAREDg6UPMr7ajLmBQGau0Fc
+bvZJ90l4NjXp5p0NEE/qOb9UEHT7EGkEhaZ1ekkWFTWCgsy7rRXfZLxB6sk7pzLC
+DshyW3zjIakWAnpQ5j5obiDy708pReAuGB94NSyb1HoW/xGsGgvvCw4r0w3xPStw
+F1PhmScE6NTBIfLliea3pl8vhKPlCh54Hk7I8QGjo1ETlRP4Qll1ZxHJ8u25f/ta
+RES2Aw8Hi7j0EVcZ6MT9JWTI83yUcnUlZPZS2HyeWcUj+8nUC8W4N8An+aNps9l/
+21inIl2TbGo3Yn1JQLnA1YCoGwC34g8QZTJhElEQBN0X29ayWW6OdFx8MDvllbBV
+ymmKq2lK1U55mQTfDli7S3vfGz9Gp/oQwZ8bQpOeUkc5hbZszYwP4RX+68xDPfn+
+M9udl+qW9wu+LyePbW6HX90LmkhNkkY2ZzUPRPDHZANU5btaPXc2H7edX4y4maQa
+xenqD0lGh9LGz/mps4HEZtCI5CY8o0uCMF3lT0XfXhuLksr7Pxv57yue8LLTItOJ
+d9Hmzp9G97SRYYeqU+8lyNXtU2PdrLLq7QHkzrsloG78lCpQcalHGACJzrlUWVP/
+fN3Ht3kAEQEAAYkCHwQYAQIACQUCUT2ULAIbDAAKCRAVz00Yr090IbhWEADbr50X
+OEXMIMGRLe+YMjeMX9NG4jxs0jZaWHc/WrGR+CCSUb9r6aPXeLo+45949uEfdSsB
+pbaEdNWxF5Vr1CSjuO5siIlgDjmT655voXo67xVpEN4HhMrxugDJfCa6z97P0+ML
+PdDxim57uNqkam9XIq9hKQaurxMAECDPmlEXI4QT3eu5qw5/knMzDMZj4Vi6hovL
+wvvAeLHO/jsyfIdNmhBGU2RWCEZ9uo/MeerPHtRPfg74g+9PPfP6nyHD2Wes6yGd
+oVQwtPNAQD6Cj7EaA2xdZYLJ7/jW6yiPu98FFWP74FN2dlyEA2uVziLsfBrgpS4l
+tVOlrO2YzkkqUGrybzbLpj6eeHx+Cd7wcjI8CalsqtL6cG8cUEjtWQUHyTbQWAgG
+5VPEgIAVhJ6RTZ26i/G+4J8neKyRs4vz+57UGwY6zI4AB1ZcWGEE3Bf+CDEDgmnP
+LSwbnHefK9IljT9XU98PelSryUO/5UPw7leE0akXKB4DtekToO226px1VnGp3Bov
+1GBGvpHvL2WizEwdk+nfk8LtrLzej+9FtIcq3uIrYnsac47Pf7p0otcFeTJTjSq3
+krCaoG4Hx0zGQG2ZFpHrSrZTVy6lxvIdfi0beMgY6h78p6M9eYZHQHc02DjFkQXN
+bXb5c6gCHESH5PXwPU4jQEE7Ib9J6sbk7ZT2Mw==
+=j+4q
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/contrib/libfido2/.actions/setup_clang b/contrib/libfido2/.actions/setup_clang
new file mode 100755
index 000000000000..be06709c88b6
--- /dev/null
+++ b/contrib/libfido2/.actions/setup_clang
@@ -0,0 +1,17 @@
+#!/bin/sh -eu
+
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+CC="$1"
+APT="http://apt.llvm.org"
+CODENAME="$(lsb_release -cs)"
+VERSION="${CC#*-}"
+apt-get install -q -y software-properties-common
+apt-key add ./.actions/llvm.gpg
+add-apt-repository \
+ "deb ${APT}/${CODENAME}/ llvm-toolchain-${CODENAME}-${VERSION} main"
+apt-get update -q
+apt-get install -q -y "${CC}" "clang-tools-${VERSION}"
diff --git a/contrib/libfido2/.gitattributes b/contrib/libfido2/.gitattributes
new file mode 100644
index 000000000000..998f601da4d0
--- /dev/null
+++ b/contrib/libfido2/.gitattributes
@@ -0,0 +1 @@
+.* export-ignore
diff --git a/contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md b/contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000000..6e88c1ff8006
--- /dev/null
+++ b/contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,80 @@
+---
+name: Bug report
+labels: 'bug report'
+about: Report a bug in libfido2
+
+---
+
+<!--
+
+Please use the questions below as a template, and review your answers
+for potentially sensitive information.
+
+Thank you!
+
+-->
+
+**What version of libfido2 are you using?**
+
+**What operating system are you running?**
+
+**What application are you using in conjunction with libfido2?**
+
+**How does the problem manifest itself?**
+
+**Is the problem reproducible?**
+
+**What are the steps that lead to the problem?**
+
+**Does the problem happen with different authenticators?**
+
+<!--
+
+fido2-token is provided by the fido2-tools package on Debian and Ubuntu,
+and shipped with libfido2 in macOS (Homebrew), Arch Linux, and Windows.
+
+-->
+
+**Please include the output of `fido2-token -L`.**
+
+<details>
+<summary><code>fido2-token -L</code></summary>
+<br>
+<pre>
+$ fido2-token -L
+
+</pre>
+</details>
+
+**Please include the output of `fido2-token -I`.**
+
+<details>
+<summary><code>fido2-token -I</code></summary>
+<br>
+<pre>
+$ fido2-token -I &lt;device&gt;
+
+</pre>
+</details>
+
+<!--
+
+You are strongly encouraged to only capture debug output using test
+credentials. Failure to do so can disclose sensitive information.
+
+-->
+
+**Please include the output of `FIDO_DEBUG=1`.**
+
+<details>
+<summary><code>FIDO_DEBUG=1</code></summary>
+<br>
+<pre>
+$ export FIDO_DEBUG=1
+$ &lt;command1&gt;
+$ &lt;command2&gt;
+(...)
+$ &lt;commandn&gt;
+
+</pre>
+</details>
diff --git a/contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml b/contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000000..3ecb227ffeb0
--- /dev/null
+++ b/contrib/libfido2/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,8 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Feature Request
+ url: https://github.com/Yubico/libfido2/discussions/new
+ about: Share ideas for new features
+ - name: Ask a question about libfido2
+ url: https://github.com/Yubico/libfido2/discussions/new
+ about: Ask the community for help
diff --git a/contrib/libfido2/.github/workflows/alpine_builds.yml b/contrib/libfido2/.github/workflows/alpine_builds.yml
new file mode 100644
index 000000000000..c6d826f39835
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/alpine_builds.yml
@@ -0,0 +1,39 @@
+# Copyright (c) 2022-2023 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: alpine
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+ container: alpine:latest
+ strategy:
+ fail-fast: false
+ matrix:
+ cc: [ gcc, clang ]
+ steps:
+ - name: dependencies
+ run: |
+ apk -q update
+ apk add build-base clang clang-analyzer cmake coreutils eudev-dev
+ apk add git linux-headers openssl-dev sudo zlib-dev pcsc-lite-dev \
+ libcbor-dev
+ - name: fix permissions on workdir
+ run: chown root:wheel "${GITHUB_WORKSPACE}"
+ - name: checkout libfido2
+ uses: actions/checkout@v4
+ - name: build libfido2
+ env:
+ CC: ${{ matrix.cc }}
+ run: ./.actions/build-linux-${CC}
diff --git a/contrib/libfido2/.github/workflows/bsd_builds.yml b/contrib/libfido2/.github/workflows/bsd_builds.yml
new file mode 100644
index 000000000000..366ea2141aca
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/bsd_builds.yml
@@ -0,0 +1,32 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: bsd
+
+on:
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ if: github.repository == 'Yubico/libfido2'
+ runs-on: ubuntu-22.04
+ strategy:
+ fail-fast: false
+ matrix:
+ image: [freebsd/13.x, openbsd/7.2]
+ steps:
+ - uses: actions/checkout@v4
+ - name: dependencies
+ run: |
+ sudo apt -q update
+ sudo apt install -q -y curl jq
+ - name: build
+ env:
+ IMAGE: ${{ matrix.image }}
+ SOURCEHUT_TOKEN: ${{ secrets.SOURCEHUT_TOKEN }}
+ run: ./.actions/build-bsd
diff --git a/contrib/libfido2/.github/workflows/cifuzz_oss.yml b/contrib/libfido2/.github/workflows/cifuzz_oss.yml
new file mode 100644
index 000000000000..556d5ad36f7c
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/cifuzz_oss.yml
@@ -0,0 +1,46 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: cifuzz
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ fuzzing:
+ if: github.repository == 'Yubico/libfido2'
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ sanitizer: [address, undefined, memory]
+ steps:
+ - name: build fuzzers (${{ matrix.sanitizer }})
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'libfido2'
+ language: c
+ sanitizer: ${{ matrix.sanitizer }}
+ dry-run: false
+ - name: run fuzzers (${{ matrix.sanitizer }})
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'libfido2'
+ language: c
+ sanitizer: ${{ matrix.sanitizer }}
+ fuzz-seconds: 600
+ dry-run: false
+ - name: upload crash
+ uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: ${{ matrix.sanitizer }}-artifacts
+ path: ./out/artifacts
diff --git a/contrib/libfido2/.github/workflows/codeql-analysis.yml b/contrib/libfido2/.github/workflows/codeql-analysis.yml
new file mode 100644
index 000000000000..a3a8d54d2daa
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,42 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: "codeql"
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+ schedule:
+ - cron: '0 0 * * 0'
+
+permissions:
+ security-events: write
+
+jobs:
+ codeql-build:
+ if: github.repository == 'Yubico/libfido2'
+ runs-on: ubuntu-22.04
+ steps:
+ - name: checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 2
+ - name: init codeql
+ uses: github/codeql-action/init@v2
+ - name: build
+ env:
+ CC: gcc
+ run: |
+ sudo apt -q update
+ sudo apt install -q -y libcbor-dev libudev-dev libz-dev original-awk \
+ libpcsclite-dev
+ ./.actions/build-linux-gcc
+ - name: perform codeql analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/contrib/libfido2/.github/workflows/cygwin_builds.yml b/contrib/libfido2/.github/workflows/cygwin_builds.yml
new file mode 100644
index 000000000000..d8146c54904e
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/cygwin_builds.yml
@@ -0,0 +1,30 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: cygwin
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ windows-2022 ]
+ arch: [ x64 ]
+ config: [ "Debug", "Release" ]
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ .\windows\cygwin.ps1 -Config ${{ matrix.config }}
diff --git a/contrib/libfido2/.github/workflows/linux_builds.yml b/contrib/libfido2/.github/workflows/linux_builds.yml
new file mode 100644
index 000000000000..ec911cb92d92
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/linux_builds.yml
@@ -0,0 +1,57 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: linux
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - { os: ubuntu-20.04, cc: gcc-8 }
+ - { os: ubuntu-22.04, cc: gcc-9 }
+ - { os: ubuntu-22.04, cc: gcc-10 }
+ - { os: ubuntu-22.04, cc: gcc-11 }
+ - { os: ubuntu-22.04, cc: gcc-12 }
+ - { os: ubuntu-22.04, cc: clang-13 }
+ - { os: ubuntu-22.04, cc: clang-14 }
+ - { os: ubuntu-22.04, cc: clang-15 }
+ - { os: ubuntu-22.04, cc: clang-16 }
+ - { os: ubuntu-20.04, cc: i686-w64-mingw32-gcc-9 }
+ - { os: ubuntu-22.04, cc: i686-w64-mingw32-gcc-10 }
+ steps:
+ - uses: actions/checkout@v4
+ - name: dependencies
+ run: |
+ sudo apt -q update
+ sudo apt install -q -y libcbor-dev libudev-dev libz-dev \
+ original-awk mandoc libpcsclite-dev
+ - name: compiler
+ env:
+ CC: ${{ matrix.cc }}
+ run: |
+ if [ "${CC%-*}" == "clang" ]; then
+ sudo ./.actions/setup_clang "${CC}"
+ elif [ "${CC%-*}" == "i686-w64-mingw32-gcc" ]; then
+ sudo apt install -q -y binutils-mingw-w64-i686 gcc-mingw-w64 \
+ g++-mingw-w64 mingw-w64-i686-dev
+ else
+ sudo apt install -q -y "${CC}"
+ fi
+ - name: build
+ env:
+ CC: ${{ matrix.cc }}
+ run: ./.actions/build-linux-${CC%-*}
diff --git a/contrib/libfido2/.github/workflows/linux_fuzz.yml b/contrib/libfido2/.github/workflows/linux_fuzz.yml
new file mode 100644
index 000000000000..296c0d9fab23
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/linux_fuzz.yml
@@ -0,0 +1,41 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: fuzzer
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ ubuntu-22.04 ]
+ cc: [ clang-16 ]
+ sanitizer: [ asan, msan ]
+ steps:
+ - uses: actions/checkout@v4
+ - name: dependencies
+ run: |
+ sudo apt -q update
+ sudo apt install -q -y libudev-dev libpcsclite-dev
+ - name: compiler
+ env:
+ CC: ${{ matrix.cc }}
+ run: |
+ sudo ./.actions/setup_clang "${CC}"
+ - name: fuzz
+ env:
+ CC: ${{ matrix.cc }}
+ SANITIZER: ${{ matrix.sanitizer }}
+ run: ./.actions/fuzz-linux "${SANITIZER}"
diff --git a/contrib/libfido2/.github/workflows/macos_builds.yml b/contrib/libfido2/.github/workflows/macos_builds.yml
new file mode 100644
index 000000000000..7d84a750ac37
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/macos_builds.yml
@@ -0,0 +1,32 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: macos
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ macos-13, macos-12 ]
+ cc: [ clang ]
+ steps:
+ - uses: actions/checkout@v4
+ - name: dependencies
+ run: brew install libcbor llvm mandoc openssl@3.0 pkg-config zlib
+ - name: build
+ env:
+ CC: ${{ matrix.cc }}
+ run: ./.actions/build-osx-clang
diff --git a/contrib/libfido2/.github/workflows/openssl3.yml b/contrib/libfido2/.github/workflows/openssl3.yml
new file mode 100644
index 000000000000..ee70c087d285
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/openssl3.yml
@@ -0,0 +1,51 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: openssl3
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu-22.04
+ cc: gcc-11
+ - os: ubuntu-22.04
+ cc: clang-16
+ - os: ubuntu-22.04
+ cc: i686-w64-mingw32-gcc-10
+ steps:
+ - uses: actions/checkout@v4
+ - name: dependencies
+ env:
+ CC: ${{ matrix.cc }}
+ run: |
+ sudo apt -q update
+ sudo apt install -q -y libcbor-dev libudev-dev libz-dev \
+ original-awk mandoc libpcsclite-dev
+ sudo apt remove -y libssl-dev
+ if [ "${CC%-*}" == "clang" ]; then
+ sudo ./.actions/setup_clang "${CC}"
+ elif [ "${CC%-*}" == "i686-w64-mingw32-gcc" ]; then
+ sudo apt install -q -y binutils-mingw-w64-i686 gcc-mingw-w64 \
+ g++-mingw-w64 mingw-w64-i686-dev
+ else
+ sudo apt install -q -y "${CC}"
+ fi
+ - name: build
+ env:
+ CC: ${{ matrix.cc }}
+ run: ./.actions/build-linux-openssl3-${CC%-*}
diff --git a/contrib/libfido2/.github/workflows/windows_builds.yml b/contrib/libfido2/.github/workflows/windows_builds.yml
new file mode 100644
index 000000000000..bfc1eb3c1deb
--- /dev/null
+++ b/contrib/libfido2/.github/workflows/windows_builds.yml
@@ -0,0 +1,32 @@
+# Copyright (c) 2022 Yubico AB. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+# SPDX-License-Identifier: BSD-2-Clause
+
+name: windows
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+ - '*-ci'
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ windows-2022 ]
+ arch: [ x64, Win32, ARM64, ARM ]
+ type: [ dynamic, static ]
+ config: [ "Release" ]
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ .\windows\build.ps1 -Fido2Flags '/analyze' -Arch ${{ matrix.arch }} `
+ -Type ${{ matrix.type }} -Config ${{ matrix.config }}
diff --git a/contrib/libfido2/.gitignore b/contrib/libfido2/.gitignore
new file mode 100644
index 000000000000..0915625a059c
--- /dev/null
+++ b/contrib/libfido2/.gitignore
@@ -0,0 +1,9 @@
+build/
+cscope.out
+fuzz/build/
+fuzz/corpus.tgz-
+fuzz/fuzz_*/
+fuzz/obj/
+fuzz/report
+fuzz/*.so
+output/
diff --git a/contrib/libfido2/CMakeLists.txt b/contrib/libfido2/CMakeLists.txt
index 6fa341a01cc6..c4f7b1b7b51e 100644
--- a/contrib/libfido2/CMakeLists.txt
+++ b/contrib/libfido2/CMakeLists.txt
@@ -2,12 +2,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# SPDX-License-Identifier: BSD-2-Clause
+cmake_minimum_required(VERSION 3.7)
# detect AppleClang; needs to come before project()
cmake_policy(SET CMP0025 NEW)
project(libfido2 C)
-cmake_minimum_required(VERSION 3.0)
# Set PIE flags for POSITION_INDEPENDENT_CODE targets, added in CMake 3.14.
if(POLICY CMP0083)
cmake_policy(SET CMP0083 NEW)
@@ -29,7 +29,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_COLOR_MAKEFILE OFF)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(FIDO_MAJOR "1")
-set(FIDO_MINOR "13")
+set(FIDO_MINOR "14")
set(FIDO_PATCH "0")
set(FIDO_VERSION ${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH})
diff --git a/contrib/libfido2/NEWS b/contrib/libfido2/NEWS
index bf648aabfd92..58387ffd72bf 100644
--- a/contrib/libfido2/NEWS
+++ b/contrib/libfido2/NEWS
@@ -1,3 +1,13 @@
+* Version 1.14.0 (2023-11-13)
+ ** fido2-cred -M, fido2-token -G: support raw client data via -w flag.
+ ** winhello: support U2F AppID extension for assertions.
+ ** winhello: fix restrictive parsing of the hmac-secret on assertions.
+ ** winhello: translate NTE_USER_CANCELLED to FIDO_ERR_OPERATION_DENIED; gh#685.
+ ** New API calls:
+ ** fido_assert_authdata_raw_len;
+ ** fido_assert_authdata_raw_ptr;
+ ** fido_assert_set_winhello_appid.
+
* Version 1.13.0 (2023-02-20)
** Support for linking against OpenSSL on Windows; gh#668.
** New API calls:
diff --git a/contrib/libfido2/README.adoc b/contrib/libfido2/README.adoc
index 44d559894dac..fb6f3d3eb004 100644
--- a/contrib/libfido2/README.adoc
+++ b/contrib/libfido2/README.adoc
@@ -38,7 +38,7 @@ is also available.
=== Releases
-The current release of *libfido2* is 1.13.0. Signed release tarballs are
+The current release of *libfido2* is 1.14.0. Signed release tarballs are
available at Yubico's
https://developers.yubico.com/libfido2/Releases[release page].
diff --git a/contrib/libfido2/examples/README.adoc b/contrib/libfido2/examples/README.adoc
index d44218c2cf87..6151b70bd91e 100644
--- a/contrib/libfido2/examples/README.adoc
+++ b/contrib/libfido2/examples/README.adoc
@@ -48,7 +48,7 @@ The following examples are provided:
the device's PIN is changed from [oldpin] to <pin>.
- cred [-t es256|es384|rs256|eddsa] [-k pubkey] [-ei cred_id] [-P pin]
- [-T seconds] [-b blobkey] [-hruv] <device>
+ [-T seconds] [-b blobkey] [-hruv] [-c cred_protect] <device>
Creates a new credential on <device> and verify that the credential
was signed by the authenticator. The device's attestation certificate
@@ -63,7 +63,8 @@ The following examples are provided:
is generated using U2F (CTAP1) instead of FIDO2 (CTAP2) commands.
The -T option may be used to enforce a timeout of <seconds>. If the
option -b is specified, the credential's "largeBlob" key is stored in
- <blobkey>.
+ <blobkey>. If the option -c is specified the the generated credential
+ will be bound by the specified protection policy.
- assert [-t es256|es384|rs256|eddsa] [-a cred_id] [-h hmac_secret] [-P pin]
[-s hmac_salt] [-T seconds] [-b blobkey] [-puv] <pubkey> <device>
diff --git a/contrib/libfido2/examples/cred.c b/contrib/libfido2/examples/cred.c
index 576900d97786..5a2a27fd7771 100644
--- a/contrib/libfido2/examples/cred.c
+++ b/contrib/libfido2/examples/cred.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -36,7 +36,7 @@ static void
usage(void)
{
fprintf(stderr, "usage: cred [-t es256|es384|rs256|eddsa] [-k pubkey] "
- "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-hruv] "
+ "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-c cred_protect] [-hruv] "
"<device>\n");
exit(EXIT_FAILURE);
}
@@ -44,7 +44,8 @@ usage(void)
static void
verify_cred(int type, const char *fmt, const unsigned char *authdata_ptr,
size_t authdata_len, const unsigned char *attstmt_ptr, size_t attstmt_len,
- bool rk, bool uv, int ext, const char *key_out, const char *id_out)
+ bool rk, bool uv, int ext, int cred_protect, const char *key_out,
+ const char *id_out)
{
fido_cred_t *cred;
int r;
@@ -85,6 +86,11 @@ verify_cred(int type, const char *fmt, const unsigned char *authdata_ptr,
if (uv && (r = fido_cred_set_uv(cred, FIDO_OPT_TRUE)) != FIDO_OK)
errx(1, "fido_cred_set_uv: %s (0x%x)", fido_strerr(r), r);
+ /* credProt */
+ if (cred_protect != 0 && (r = fido_cred_set_prot(cred,
+ cred_protect)) != FIDO_OK)
+ errx(1, "fido_cred_set_prot: %s (0x%x)", fido_strerr(r), r);
+
/* fmt */
r = fido_cred_set_fmt(cred, fmt);
if (r != FIDO_OK)
@@ -159,11 +165,12 @@ main(int argc, char **argv)
int ext = 0;
int ch;
int r;
+ long long cred_protect = 0;
if ((cred = fido_cred_new()) == NULL)
errx(1, "fido_cred_new");
- while ((ch = getopt(argc, argv, "P:T:b:e:hi:k:rt:uv")) != -1) {
+ while ((ch = getopt(argc, argv, "P:T:b:e:hi:k:rt:uvc:")) != -1) {
switch (ch) {
case 'P':
pin = optarg;
@@ -192,6 +199,13 @@ main(int argc, char **argv)
case 'h':
ext |= FIDO_EXT_HMAC_SECRET;
break;
+ case 'c':
+ if (base10(optarg, &cred_protect) < 0)
+ errx(1, "base10: %s", optarg);
+ if (cred_protect <= 0 || cred_protect > 3)
+ errx(1, "-c: %s must be in (1,3)", optarg);
+ ext |= FIDO_EXT_CRED_PROTECT;
+ break;
case 'i':
id_out = optarg;
break;
@@ -275,6 +289,11 @@ main(int argc, char **argv)
if (uv && (r = fido_cred_set_uv(cred, FIDO_OPT_TRUE)) != FIDO_OK)
errx(1, "fido_cred_set_uv: %s (0x%x)", fido_strerr(r), r);
+ /* credProt */
+ if (cred_protect != 0 && (r = fido_cred_set_prot(cred,
+ (int)cred_protect)) != FIDO_OK)
+ errx(1, "fido_cred_set_prot: %s (0x%x)", fido_strerr(r), r);
+
/* timeout */
if (ms != 0 && (r = fido_dev_set_timeout(dev, (int)ms)) != FIDO_OK)
errx(1, "fido_dev_set_timeout: %s (0x%x)", fido_strerr(r), r);
@@ -296,7 +315,8 @@ main(int argc, char **argv)
verify_cred(type, fido_cred_fmt(cred), fido_cred_authdata_ptr(cred),
fido_cred_authdata_len(cred), fido_cred_attstmt_ptr(cred),
- fido_cred_attstmt_len(cred), rk, uv, ext, key_out, id_out);
+ fido_cred_attstmt_len(cred), rk, uv, ext, fido_cred_prot(cred),
+ key_out, id_out);
if (blobkey_out != NULL) {
/* extract the "largeBlob" key */
diff --git a/contrib/libfido2/fuzz/Dockerfile b/contrib/libfido2/fuzz/Dockerfile
index 9cda37589b44..7b26e6ec3b19 100644
--- a/contrib/libfido2/fuzz/Dockerfile
+++ b/contrib/libfido2/fuzz/Dockerfile
@@ -10,7 +10,7 @@ RUN apk -q update
RUN apk add build-base clang clang-analyzer cmake compiler-rt coreutils
RUN apk add eudev-dev git linux-headers llvm openssl-dev pcsc-lite-dev
RUN apk add sudo tar zlib-dev
-RUN git clone --branch v0.10.1 --depth=1 https://github.com/PJK/libcbor
+RUN git clone --branch v0.10.2 --depth=1 https://github.com/PJK/libcbor
RUN git clone --depth=1 https://github.com/yubico/libfido2
WORKDIR /libfido2
RUN ./fuzz/build-coverage /libcbor /libfido2
diff --git a/contrib/libfido2/fuzz/Makefile b/contrib/libfido2/fuzz/Makefile
index 0e6756f0ada1..55a506bc8312 100644
--- a/contrib/libfido2/fuzz/Makefile
+++ b/contrib/libfido2/fuzz/Makefile
@@ -3,7 +3,7 @@
# license that can be found in the LICENSE file.
# SPDX-License-Identifier: BSD-2-Clause
-IMAGE := libfido2-coverage:1.13.1
+IMAGE := libfido2-coverage:1.14.0
RUNNER := libfido2-runner
PROFDATA := llvm-profdata
COV := llvm-cov
diff --git a/contrib/libfido2/fuzz/export.gnu b/contrib/libfido2/fuzz/export.gnu
index f0fb840dd686..bc25dd66cba7 100644
--- a/contrib/libfido2/fuzz/export.gnu
+++ b/contrib/libfido2/fuzz/export.gnu
@@ -20,6 +20,8 @@
fido_assert_allow_cred;
fido_assert_authdata_len;
fido_assert_authdata_ptr;
+ fido_assert_authdata_raw_len;
+ fido_assert_authdata_raw_ptr;
fido_assert_blob_len;
fido_assert_blob_ptr;
fido_assert_clientdata_hash_len;
diff --git a/contrib/libfido2/fuzz/functions.txt b/contrib/libfido2/fuzz/functions.txt
index da7f058d6c00..4ad5a0c83f5c 100644
--- a/contrib/libfido2/fuzz/functions.txt
+++ b/contrib/libfido2/fuzz/functions.txt
@@ -24,7 +24,9 @@ fido_assert_set_clientdata_hash 8 0 100.00% 6 0
fido_assert_set_hmac_salt 10 0 100.00% 6 0 100.00%
fido_assert_set_hmac_secret 12 12 0.00% 7 7 0.00%
fido_assert_set_rp 12 0 100.00% 11 0 100.00%
+fido_assert_set_winhello_appid 2 2 0.00% 5 5 0.00%
fido_assert_allow_cred 13 2 84.62% 22 3 86.36%
+fido_assert_empty_allow_list 2 0 100.00% 5 0 100.00%
fido_assert_set_extensions 14 0 100.00% 10 0 100.00%
fido_assert_set_options 8 8 0.00% 5 5 0.00%
fido_assert_set_up 2 0 100.00% 4 0 100.00%
@@ -32,8 +34,8 @@ fido_assert_set_uv 2 0 100.00% 4 0
fido_assert_clientdata_hash_ptr 1 0 100.00% 3 0 100.00%
fido_assert_clientdata_hash_len 1 0 100.00% 3 0 100.00%
fido_assert_new 1 0 100.00% 3 0 100.00%
-fido_assert_reset_tx 1 0 100.00% 12 0 100.00%
-fido_assert_reset_rx 4 0 100.00% 19 0 100.00%
+fido_assert_reset_tx 1 0 100.00% 13 0 100.00%
+fido_assert_reset_rx 4 0 100.00% 20 0 100.00%
fido_assert_free 6 0 100.00% 9 0 100.00%
fido_assert_count 1 0 100.00% 3 0 100.00%
fido_assert_rp_id 1 0 100.00% 3 0 100.00%
@@ -41,6 +43,8 @@ fido_assert_flags 4 0 100.00% 5 0
fido_assert_sigcount 4 0 100.00% 5 0 100.00%
fido_assert_authdata_ptr 4 0 100.00% 5 0 100.00%
fido_assert_authdata_len 4 0 100.00% 5 0 100.00%
+fido_assert_authdata_raw_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_authdata_raw_len 4 0 100.00% 5 0 100.00%
fido_assert_sig_ptr 4 0 100.00% 5 0 100.00%
fido_assert_sig_len 4 0 100.00% 5 0 100.00%
fido_assert_id_ptr 4 0 100.00% 5 0 100.00%
@@ -56,15 +60,15 @@ fido_assert_largeblob_key_ptr 4 0 100.00% 5 0
fido_assert_largeblob_key_len 4 0 100.00% 5 0 100.00%
fido_assert_blob_ptr 4 0 100.00% 5 0 100.00%
fido_assert_blob_len 4 0 100.00% 5 0 100.00%
-fido_assert_set_authdata 24 0 100.00% 28 0 100.00%
-fido_assert_set_authdata_raw 24 0 100.00% 27 0 100.00%
+fido_assert_set_authdata 28 0 100.00% 33 0 100.00%
+fido_assert_set_authdata_raw 28 0 100.00% 32 0 100.00%
fido_assert_set_sig 14 0 100.00% 7 0 100.00%
fido_assert_set_count 10 0 100.00% 17 0 100.00%
assert.c:fido_dev_get_assert_wait 21 0 100.00% 14 0 100.00%
assert.c:fido_dev_get_assert_tx 56 2 96.43% 62 5 91.94%
assert.c:fido_dev_get_assert_rx 27 0 100.00% 36 0 100.00%
assert.c:adjust_assert_count 24 0 100.00% 26 0 100.00%
-assert.c:parse_assert_reply 12 0 100.00% 24 0 100.00%
+assert.c:parse_assert_reply 15 0 100.00% 28 0 100.00%
assert.c:fido_get_next_assert_tx 8 0 100.00% 8 0 100.00%
assert.c:fido_get_next_assert_rx 23 2 91.30% 29 5 82.76%
assert.c:decrypt_hmac_secrets 9 0 100.00% 15 0 100.00%
@@ -73,9 +77,9 @@ assert.c:get_es384_hash 16 0 100.00% 17 0
assert.c:get_eddsa_hash 6 0 100.00% 9 0 100.00%
assert.c:check_extensions 5 0 100.00% 9 0 100.00%
assert.c:fido_assert_reset_extattr 1 0 100.00% 5 0 100.00%
-assert.c:fido_assert_clean_authdata 1 0 100.00% 5 0 100.00%
+assert.c:fido_assert_clean_authdata 1 0 100.00% 6 0 100.00%
-----------------------------------------------------------------------------------------------------------------
-TOTAL 605 43 92.89% 745 46 93.83%
+TOTAL 628 45 92.83% 782 51 93.48%
File '/libfido2/src/authkey.c':
Name Regions Miss Cover Lines Miss Cover
@@ -197,7 +201,7 @@ cbor_encode_assert_ext 33 0 100.00% 32 0
cbor_decode_fmt 13 0 100.00% 15 0 100.00%
cbor_decode_pubkey 26 1 96.15% 36 2 94.44%
cbor_decode_cred_authdata 31 1 96.77% 35 3 91.43%
-cbor_decode_assert_authdata 21 0 100.00% 32 0 100.00%
+cbor_decode_assert_authdata 21 1 95.24% 32 3 90.62%
cbor_decode_attstmt 13 0 100.00% 16 0 100.00%
cbor_decode_uint64 4 0 100.00% 8 0 100.00%
cbor_decode_cred_id 8 0 100.00% 9 0 100.00%
@@ -213,11 +217,11 @@ cbor.c:cbor_add_arg 13 0 100.00% 21 0
cbor.c:cbor_add_uint8 14 0 100.00% 21 0 100.00%
cbor.c:cbor_encode_largeblob_key_ext 6 0 100.00% 6 0 100.00%
cbor.c:cbor_encode_hmac_secret_param 59 4 93.22% 66 8 87.88%
-cbor.c:get_cose_alg 46 1 97.83% 45 3 93.33%
+cbor.c:get_cose_alg 46 0 100.00% 45 0 100.00%
cbor.c:find_cose_alg 35 0 100.00% 33 0 100.00%
cbor.c:decode_attcred 25 0 100.00% 44 0 100.00%
cbor.c:decode_cred_extensions 14 0 100.00% 24 0 100.00%
-cbor.c:decode_cred_extension 41 1 97.56% 45 3 93.33%
+cbor.c:decode_cred_extension 41 0 100.00% 45 0 100.00%
cbor.c:decode_assert_extensions 14 0 100.00% 23 0 100.00%
cbor.c:decode_assert_extension 19 0 100.00% 27 0 100.00%
cbor.c:decode_attstmt_entry 56 0 100.00% 51 0 100.00%
@@ -226,7 +230,7 @@ cbor.c:decode_cred_id_entry 10 0 100.00% 19 0
cbor.c:decode_user_entry 25 0 100.00% 35 0 100.00%
cbor.c:decode_rp_entity_entry 15 0 100.00% 25 0 100.00%
------------------------------------------------------------------------------------------------------------------
-TOTAL 1070 13 98.79% 1258 31 97.54%
+TOTAL 1070 12 98.88% 1258 28 97.77%
File '/libfido2/src/compress.c':
Name Regions Miss Cover Lines Miss Cover
@@ -248,13 +252,13 @@ fido_dev_set_pin_minlen 1 0 100.00% 4
fido_dev_force_pin_change 1 0 100.00% 4 0 100.00%
fido_dev_set_pin_minlen_rpid 6 0 100.00% 15 0 100.00%
config.c:config_enable_entattest_wait 6 0 100.00% 7 0 100.00%
-config.c:config_tx 41 0 100.00% 49 0 100.00%
-config.c:config_prepare_hmac 8 0 100.00% 19 0 100.00%
+config.c:config_tx 39 0 100.00% 49 0 100.00%
+config.c:config_prepare_hmac 10 0 100.00% 21 0 100.00%
config.c:config_toggle_always_uv_wait 6 0 100.00% 7 0 100.00%
config.c:config_pin_minlen 5 0 100.00% 7 0 100.00%
config.c:config_pin_minlen_tx 36 0 100.00% 32 0 100.00%
-------------------------------------------------------------------------------------------------------------------
-TOTAL 112 0 100.00% 152 0 100.00%
+TOTAL 112 0 100.00% 154 0 100.00%
File '/libfido2/src/cred.c':
Name Regions Miss Cover Lines Miss Cover
@@ -262,9 +266,9 @@ Name Regions Miss Cover Lines Mis
fido_dev_make_cred 12 0 100.00% 10 0 100.00%
fido_check_rp_id 4 0 100.00% 11 0 100.00%
fido_cred_verify 59 2 96.61% 75 4 94.67%
-fido_cred_verify_self 60 6 90.00% 87 11 87.36%
+fido_cred_verify_self 60 4 93.33% 87 7 91.95%
fido_cred_new 1 0 100.00% 3 0 100.00%
-fido_cred_reset_tx 1 0 100.00% 19 0 100.00%
+fido_cred_reset_tx 1 0 100.00% 18 0 100.00%
fido_cred_reset_rx 1 0 100.00% 7 0 100.00%
fido_cred_free 6 0 100.00% 9 0 100.00%
fido_cred_set_authdata 23 0 100.00% 28 0 100.00%
@@ -274,6 +278,7 @@ fido_cred_set_x509 6 0 100.00% 5
fido_cred_set_sig 6 0 100.00% 5 0 100.00%
fido_cred_set_attstmt 20 0 100.00% 23 0 100.00%
fido_cred_exclude 14 2 85.71% 19 3 84.21%
+fido_cred_empty_exclude_list 2 0 100.00% 5 0 100.00%
fido_cred_set_clientdata 12 12 0.00% 11 11 0.00%
fido_cred_set_clientdata_hash 8 0 100.00% 6 0 100.00%
fido_cred_set_rp 18 0 100.00% 22 0 100.00%
@@ -329,7 +334,7 @@ cred.c:verify_attstmt 25 2 92.00% 43
cred.c:fido_cred_clean_authdata 1 0 100.00% 8 0 100.00%
cred.c:fido_cred_clean_attstmt 1 0 100.00% 8 0 100.00%
-------------------------------------------------------------------------------------------------------------------
-TOTAL 651 38 94.16% 849 43 94.94%
+TOTAL 653 36 94.49% 853 39 95.43%
File '/libfido2/src/credman.c':
Name Regions Miss Cover Lines Miss Cover
@@ -472,7 +477,7 @@ es256_pk_set_y 1 0 100.00% 4
es256_sk_create 39 0 100.00% 40 0 100.00%
es256_pk_to_EVP_PKEY 42 0 100.00% 53 0 100.00%
es256_pk_from_EC_KEY 42 2 95.24% 47 4 91.49%
-es256_pk_from_EVP_PKEY 8 2 75.00% 7 1 85.71%
+es256_pk_from_EVP_PKEY 8 0 100.00% 7 0 100.00%
es256_sk_to_EVP_PKEY 28 0 100.00% 39 0 100.00%
es256_derive_pk 25 0 100.00% 29 0 100.00%
es256_verify_sig 12 2 83.33% 19 5 73.68%
@@ -480,7 +485,7 @@ es256_pk_verify_sig 7 1 85.71% 13
es256.c:decode_pubkey_point 9 0 100.00% 13 0 100.00%
es256.c:decode_coord 8 0 100.00% 10 0 100.00%
-------------------------------------------------------------------------------------------------------------------
-TOTAL 315 7 97.78% 372 12 96.77%
+TOTAL 315 5 98.41% 372 11 97.04%
File '/libfido2/src/es384.c':
Name Regions Miss Cover Lines Miss Cover
@@ -491,13 +496,13 @@ es384_pk_free 6 0 100.00% 7
es384_pk_from_ptr 15 0 100.00% 17 0 100.00%
es384_pk_to_EVP_PKEY 42 0 100.00% 53 0 100.00%
es384_pk_from_EC_KEY 42 2 95.24% 47 4 91.49%
-es384_pk_from_EVP_PKEY 8 2 75.00% 7 1 85.71%
+es384_pk_from_EVP_PKEY 8 0 100.00% 7 0 100.00%
es384_verify_sig 12 2 83.33% 19 5 73.68%
es384_pk_verify_sig 7 1 85.71% 13 2 84.62%
es384.c:decode_pubkey_point 9 0 100.00% 13 0 100.00%
-es384.c:decode_coord 8 1 87.50% 10 3 70.00%
+es384.c:decode_coord 8 0 100.00% 10 0 100.00%
-------------------------------------------------------------------------------------------------------------------
-TOTAL 158 8 94.94% 198 15 92.42%
+TOTAL 158 5 96.84% 198 11 94.44%
File '/libfido2/src/extern.h':
Name Regions Miss Cover Lines Miss Cover
@@ -848,11 +853,11 @@ TOTAL 24 0 100.00% 23
File '/libfido2/src/rs1.c':
Name Regions Miss Cover Lines Miss Cover
---------------------------------------------------------------------------------------------------------------------
-rs1_verify_sig 20 1 95.00% 30 3 90.00%
-rs1.c:rs1_get_EVP_MD 4 0 100.00% 6 0 100.00%
+rs1_verify_sig 20 2 90.00% 30 6 80.00%
+rs1.c:rs1_get_EVP_MD 1 0 100.00% 3 0 100.00%
rs1.c:rs1_free_EVP_MD 1 0 100.00% 3 0 100.00%
---------------------------------------------------------------------------------------------------------------------
-TOTAL 25 1 96.00% 39 3 92.31%
+TOTAL 22 2 90.91% 36 6 83.33%
File '/libfido2/src/rs256.c':
Name Regions Miss Cover Lines Miss Cover
@@ -863,15 +868,15 @@ rs256_pk_free 6 0 100.00% 7
rs256_pk_from_ptr 10 0 100.00% 12 0 100.00%
rs256_pk_to_EVP_PKEY 35 0 100.00% 43 0 100.00%
rs256_pk_from_RSA 32 6 81.25% 26 9 65.38%
-rs256_pk_from_EVP_PKEY 8 2 75.00% 7 1 85.71%
-rs256_verify_sig 20 1 95.00% 30 2 93.33%
+rs256_pk_from_EVP_PKEY 8 0 100.00% 7 0 100.00%
+rs256_verify_sig 20 2 90.00% 30 5 83.33%
rs256_pk_verify_sig 7 1 85.71% 13 2 84.62%
rs256.c:decode_rsa_pubkey 9 0 100.00% 13 0 100.00%
rs256.c:decode_bignum 8 0 100.00% 10 0 100.00%
-rs256.c:rs256_get_EVP_MD 4 0 100.00% 6 0 100.00%
+rs256.c:rs256_get_EVP_MD 1 0 100.00% 3 0 100.00%
rs256.c:rs256_free_EVP_MD 1 0 100.00% 3 0 100.00%
---------------------------------------------------------------------------------------------------------------------
-TOTAL 149 10 93.29% 182 14 92.31%
+TOTAL 146 9 93.84% 179 16 91.06%
File '/libfido2/src/time.c':
Name Regions Miss Cover Lines Miss Cover
diff --git a/contrib/libfido2/fuzz/fuzz_assert.c b/contrib/libfido2/fuzz/fuzz_assert.c
index 9f39f3d6ecb7..03cb51cb4f74 100644
--- a/contrib/libfido2/fuzz/fuzz_assert.c
+++ b/contrib/libfido2/fuzz/fuzz_assert.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022 Yubico AB. All rights reserved.
+ * Copyright (c) 2019-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -467,6 +467,8 @@ test(const struct param *p)
fido_assert_authdata_len(assert, i),
fido_assert_sig_ptr(assert, i),
fido_assert_sig_len(assert, i), p->up, p->uv, p->ext, pk);
+ consume(fido_assert_authdata_raw_ptr(assert, i),
+ fido_assert_authdata_raw_len(assert, i));
consume(fido_assert_id_ptr(assert, i),
fido_assert_id_len(assert, i));
consume(fido_assert_user_id_ptr(assert, i),
diff --git a/contrib/libfido2/fuzz/report.tgz b/contrib/libfido2/fuzz/report.tgz
index e984ee9dc765..9c01263576f1 100644
--- a/contrib/libfido2/fuzz/report.tgz
+++ b/contrib/libfido2/fuzz/report.tgz
Binary files differ
diff --git a/contrib/libfido2/fuzz/summary.txt b/contrib/libfido2/fuzz/summary.txt
index 0f79600f801d..adda3acc0761 100644
--- a/contrib/libfido2/fuzz/summary.txt
+++ b/contrib/libfido2/fuzz/summary.txt
@@ -11,22 +11,22 @@ openbsd-compat/freezero.c 4 0 100.00%
openbsd-compat/recallocarray.c 41 7 82.93% 1 0 100.00% 36 7 80.56%
openbsd-compat/timingsafe_bcmp.c 4 0 100.00% 1 0 100.00% 7 0 100.00%
src/aes256.c 118 3 97.46% 8 0 100.00% 157 11 92.99%
-src/assert.c 605 43 92.89% 59 3 94.92% 745 46 93.83%
+src/assert.c 628 45 92.83% 63 4 93.65% 782 51 93.48%
src/authkey.c 52 0 100.00% 5 0 100.00% 66 0 100.00%
src/bio.c 451 20 95.57% 49 2 95.92% 587 24 95.91%
src/blob.c 53 2 96.23% 10 0 100.00% 83 4 95.18%
src/buf.c 8 1 87.50% 2 0 100.00% 16 1 93.75%
-src/cbor.c 1070 13 98.79% 55 0 100.00% 1258 31 97.54%
+src/cbor.c 1070 12 98.88% 55 0 100.00% 1258 28 97.77%
src/compress.c 105 14 86.67% 5 0 100.00% 122 24 80.33%
-src/config.c 112 0 100.00% 11 0 100.00% 152 0 100.00%
-src/cred.c 651 38 94.16% 69 2 97.10% 849 43 94.94%
+src/config.c 112 0 100.00% 11 0 100.00% 154 0 100.00%
+src/cred.c 653 36 94.49% 70 2 97.14% 853 39 95.43%
src/credman.c 422 10 97.63% 40 0 100.00% 557 20 96.41%
src/dev.c 332 65 80.42% 41 6 85.37% 378 80 78.84%
src/ecdh.c 117 2 98.29% 4 0 100.00% 146 5 96.58%
src/eddsa.c 88 5 94.32% 10 0 100.00% 114 9 92.11%
src/err.c 122 10 91.80% 1 0 100.00% 126 10 92.06%
-src/es256.c 315 7 97.78% 19 0 100.00% 372 12 96.77%
-src/es384.c 158 8 94.94% 11 0 100.00% 198 15 92.42%
+src/es256.c 315 5 98.41% 19 0 100.00% 372 11 97.04%
+src/es384.c 158 5 96.84% 11 0 100.00% 198 11 94.44%
src/hid.c 87 2 97.70% 14 0 100.00% 145 3 97.93%
src/hid_linux.c 184 73 60.33% 14 7 50.00% 263 115 56.27%
src/hid_unix.c 29 21 27.59% 2 0 100.00% 43 26 39.53%
@@ -42,8 +42,8 @@ src/pcsc.c 204 1 99.51%
src/pin.c 426 3 99.30% 26 0 100.00% 514 4 99.22%
src/random.c 6 0 100.00% 1 0 100.00% 6 0 100.00%
src/reset.c 24 0 100.00% 3 0 100.00% 23 0 100.00%
-src/rs1.c 25 1 96.00% 3 0 100.00% 39 3 92.31%
-src/rs256.c 149 10 93.29% 13 0 100.00% 182 14 92.31%
+src/rs1.c 22 2 90.91% 3 0 100.00% 36 6 83.33%
+src/rs256.c 146 9 93.84% 13 0 100.00% 179 16 91.06%
src/time.c 43 3 93.02% 3 0 100.00% 43 2 95.35%
src/touch.c 67 0 100.00% 2 0 100.00% 79 0 100.00%
src/tpm.c 103 0 100.00% 9 0 100.00% 194 0 100.00%
@@ -61,4 +61,4 @@ src/fido.h 0 0 -
src/fido/err.h 0 0 - 0 0 - 0 0 -
src/fido/param.h 0 0 - 0 0 - 0 0 -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-TOTAL 8711 492 94.35% 737 28 96.20% 11320 771 93.19%
+TOTAL 8730 486 94.43% 742 29 96.09% 11357 769 93.23%
diff --git a/contrib/libfido2/man/CMakeLists.txt b/contrib/libfido2/man/CMakeLists.txt
index a47767fb6d4b..6616e4ea9a04 100644
--- a/contrib/libfido2/man/CMakeLists.txt
+++ b/contrib/libfido2/man/CMakeLists.txt
@@ -62,6 +62,8 @@ list(APPEND MAN_ALIAS
fido_assert_allow_cred fido_assert_empty_allow_list
fido_assert_new fido_assert_authdata_len
fido_assert_new fido_assert_authdata_ptr
+ fido_assert_new fido_assert_authdata_raw_len
+ fido_assert_new fido_assert_authdata_raw_ptr
fido_assert_new fido_assert_blob_len
fido_assert_new fido_assert_blob_ptr
fido_assert_new fido_assert_clientdata_hash_len
@@ -95,6 +97,7 @@ list(APPEND MAN_ALIAS
fido_assert_set_authdata fido_assert_set_sig
fido_assert_set_authdata fido_assert_set_up
fido_assert_set_authdata fido_assert_set_uv
+ fido_assert_set_authdata fido_assert_set_winhello_appid
fido_bio_dev_get_info fido_bio_dev_enroll_begin
fido_bio_dev_get_info fido_bio_dev_enroll_cancel
fido_bio_dev_get_info fido_bio_dev_enroll_continue
diff --git a/contrib/libfido2/man/fido2-assert.1 b/contrib/libfido2/man/fido2-assert.1
index 0ee6e0942ba2..882b7ab1feaa 100644
--- a/contrib/libfido2/man/fido2-assert.1
+++ b/contrib/libfido2/man/fido2-assert.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2018 Yubico AB. All rights reserved.
+.\" Copyright (c) 2018-2023 Yubico AB. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are
@@ -25,7 +25,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.Dd $Mdocdate: November 5 2019 $
+.Dd $Mdocdate: July 3 2023 $
.Dt FIDO2-ASSERT 1
.Os
.Sh NAME
@@ -34,7 +34,7 @@
.Sh SYNOPSIS
.Nm
.Fl G
-.Op Fl bdhpruv
+.Op Fl bdhpruvw
.Op Fl t Ar option
.Op Fl i Ar input_file
.Op Fl o Ar output_file
@@ -175,6 +175,13 @@ If obtaining an assertion, prompt the user for a PIN and request
user verification from the authenticator.
If verifying an assertion, check whether the user verification bit
was signed by the authenticator.
+.It Fl w
+Tells
+.Nm
+that the first line of input when obtaining an assertion shall be
+interpreted as unhashed client data.
+This is required by Windows Hello, which calculates the client data hash
+internally.
.El
.Pp
If a
diff --git a/contrib/libfido2/man/fido2-cred.1 b/contrib/libfido2/man/fido2-cred.1
index bd82499acac4..3f181db6d135 100644
--- a/contrib/libfido2/man/fido2-cred.1
+++ b/contrib/libfido2/man/fido2-cred.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2018 Yubico AB. All rights reserved.
+.\" Copyright (c) 2018-2023 Yubico AB. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are
@@ -25,7 +25,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.Dd $Mdocdate: November 5 2019 $
+.Dd $Mdocdate: July 3 2023 $
.Dt FIDO2-CRED 1
.Os
.Sh NAME
@@ -34,7 +34,7 @@
.Sh SYNOPSIS
.Nm
.Fl M
-.Op Fl bdhqruv
+.Op Fl bdhqruvw
.Op Fl c Ar cred_protect
.Op Fl i Ar input_file
.Op Fl o Ar output_file
@@ -177,6 +177,13 @@ U2F otherwise.
If making a credential, request user verification.
If verifying a credential, check whether the user verification bit
was signed by the authenticator.
+.It Fl w
+Tells
+.Nm
+that the first line of input when making a credential shall be
+interpreted as unhashed client data.
+This is required by Windows Hello, which calculates the client data hash
+internally.
.El
.Sh INPUT FORMAT
The input of
diff --git a/contrib/libfido2/man/fido_assert_new.3 b/contrib/libfido2/man/fido_assert_new.3
index 192625e32630..fdc74a90892c 100644
--- a/contrib/libfido2/man/fido_assert_new.3
+++ b/contrib/libfido2/man/fido_assert_new.3
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2018-2022 Yubico AB. All rights reserved.
+.\" Copyright (c) 2018-2023 Yubico AB. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are
@@ -25,7 +25,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.Dd $Mdocdate: April 27 2022 $
+.Dd $Mdocdate: June 19 2023 $
.Dt FIDO_ASSERT_NEW 3
.Os
.Sh NAME
@@ -37,6 +37,7 @@
.Nm fido_assert_user_icon ,
.Nm fido_assert_user_name ,
.Nm fido_assert_authdata_ptr ,
+.Nm fido_assert_authdata_raw_ptr ,
.Nm fido_assert_blob_ptr ,
.Nm fido_assert_clientdata_hash_ptr ,
.Nm fido_assert_hmac_secret_ptr ,
@@ -45,6 +46,7 @@
.Nm fido_assert_sig_ptr ,
.Nm fido_assert_id_ptr ,
.Nm fido_assert_authdata_len ,
+.Nm fido_assert_authdata_raw_len ,
.Nm fido_assert_blob_len ,
.Nm fido_assert_clientdata_hash_len ,
.Nm fido_assert_hmac_secret_len ,
@@ -74,6 +76,8 @@
.Ft const unsigned char *
.Fn fido_assert_authdata_ptr "const fido_assert_t *assert" "size_t idx"
.Ft const unsigned char *
+.Fn fido_assert_authdata_raw_ptr "const fido_assert_t *assert" "size_t idx"
+.Ft const unsigned char *
.Fn fido_assert_clientdata_hash_ptr "const fido_assert_t *assert"
.Ft const unsigned char *
.Fn fido_assert_blob_ptr "const fido_assert_t *assert" "size_t idx"
@@ -90,6 +94,8 @@
.Ft size_t
.Fn fido_assert_authdata_len "const fido_assert_t *assert" "size_t idx"
.Ft size_t
+.Fn fido_assert_authdata_raw_len "const fido_assert_t *assert" "size_t idx"
+.Ft size_t
.Fn fido_assert_clientdata_hash_len "const fido_assert_t *assert"
.Ft size_t
.Fn fido_assert_blob_len "const fido_assert_t *assert" "size_t idx"
@@ -184,6 +190,7 @@ credentials were involved in the assertion.
.Pp
The
.Fn fido_assert_authdata_ptr ,
+.Fn fido_assert_authdata_raw_ptr ,
.Fn fido_assert_clientdata_hash_ptr ,
.Fn fido_assert_id_ptr ,
.Fn fido_assert_user_id_ptr ,
@@ -191,7 +198,7 @@ The
.Fn fido_assert_sigcount ,
and
.Fn fido_assert_flags
-functions return pointers to the CBOR-encoded authenticator data,
+functions return pointers to the CBOR-encoded and raw authenticator data,
client data hash, credential ID, user ID, signature, signature
count, and authenticator data flags of statement
.Fa idx
@@ -231,6 +238,7 @@ are CTAP 2.1 extensions.
.Pp
The
.Fn fido_assert_authdata_len ,
+.Fn fido_assert_authdata_raw_len ,
.Fn fido_assert_clientdata_hash_len ,
.Fn fido_assert_id_len ,
.Fn fido_assert_user_id_len ,
diff --git a/contrib/libfido2/man/fido_assert_set_authdata.3 b/contrib/libfido2/man/fido_assert_set_authdata.3
index f3a307fd05b8..503e2bfbc763 100644
--- a/contrib/libfido2/man/fido_assert_set_authdata.3
+++ b/contrib/libfido2/man/fido_assert_set_authdata.3
@@ -25,7 +25,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.Dd $Mdocdate: April 27 2022 $
+.Dd $Mdocdate: April 8 2023 $
.Dt FIDO_ASSERT_SET_AUTHDATA 3
.Os
.Sh NAME
@@ -40,7 +40,8 @@
.Nm fido_assert_set_up ,
.Nm fido_assert_set_uv ,
.Nm fido_assert_set_rp ,
-.Nm fido_assert_set_sig
+.Nm fido_assert_set_sig ,
+.Nm fido_assert_set_winhello_appid
.Nd set parameters of a FIDO2 assertion
.Sh SYNOPSIS
.In fido.h
@@ -75,6 +76,8 @@ typedef enum {
.Fn fido_assert_set_rp "fido_assert_t *assert" "const char *id"
.Ft int
.Fn fido_assert_set_sig "fido_assert_t *assert" "size_t idx" "const unsigned char *ptr" "size_t len"
+.Ft int
+.Fn fido_assert_set_winhello_appid "fido_assert_t *assert" "const char *id"
.Sh DESCRIPTION
The
.Nm
@@ -226,6 +229,55 @@ Both are
.Dv FIDO_OPT_OMIT
by default, allowing the authenticator to use its default settings.
.Pp
+The
+.Fn fido_assert_set_winhello_appid
+function sets the U2F application
+.Fa id
+.Pq Dq U2F AppID
+of
+.Fa assert ,
+where
+.Fa id
+is a NUL-terminated UTF-8 string.
+The content of
+.Fa id
+is copied, and no references to the passed pointer are kept.
+The
+.Fn fido_assert_set_winhello_appid
+function is a no-op unless
+.Fa assert
+is passed to
+.Xr fido_dev_get_assert 3
+with a device
+.Fa dev
+on which
+.Xr fido_dev_is_winhello 3
+holds true.
+In this case,
+.Em libfido2
+will instruct Windows Hello to try the assertion twice,
+first with the
+.Fa id
+passed to
+.Fn fido_assert_set_rp ,
+and a second time with the
+.Fa id
+passed to
+.Fn fido_assert_set_winhello_appid .
+If the second assertion succeeds,
+.Xr fido_assert_rp_id 3
+will point to the U2F AppID once
+.Xr fido_dev_get_assert 3
+completes.
+This mechanism exists in Windows Hello to ensure U2F backwards
+compatibility without the application inadvertently prompting the
+user twice.
+Note that
+.Fn fido_assert_set_winhello_appid
+is not needed on platforms offering CTAP primitives, since the
+authenticator can be silently probed for the existence of U2F
+credentials.
+.Pp
Use of the
.Nm
set of functions may happen in two distinct situations:
@@ -258,4 +310,5 @@ set of functions are defined in
.Sh SEE ALSO
.Xr fido_assert_allow_cred 3 ,
.Xr fido_assert_verify 3 ,
-.Xr fido_dev_get_assert 3
+.Xr fido_dev_get_assert 3 ,
+.Xr fido_dev_is_winhello 3
diff --git a/contrib/libfido2/regress/assert.c b/contrib/libfido2/regress/assert.c
index 98609257b8b5..ad31903cb1e2 100644
--- a/contrib/libfido2/regress/assert.c
+++ b/contrib/libfido2/regress/assert.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -230,6 +230,8 @@ empty_assert(fido_dev_t *d, fido_assert_t *a, size_t idx)
assert(fido_assert_flags(a, idx) == 0);
assert(fido_assert_authdata_len(a, idx) == 0);
assert(fido_assert_authdata_ptr(a, idx) == NULL);
+ assert(fido_assert_authdata_raw_len(a, idx) == 0);
+ assert(fido_assert_authdata_raw_ptr(a, idx) == NULL);
assert(fido_assert_clientdata_hash_len(a) == 0);
assert(fido_assert_clientdata_hash_ptr(a) == NULL);
assert(fido_assert_id_len(a, idx) == 0);
@@ -496,6 +498,10 @@ junk_authdata(void)
assert(fido_assert_set_count(a, 1) == FIDO_OK);
assert(fido_assert_set_authdata(a, 0, junk,
sizeof(authdata)) == FIDO_ERR_INVALID_ARGUMENT);
+ assert(fido_assert_authdata_ptr(a, 0) == NULL);
+ assert(fido_assert_authdata_len(a, 0) == 0);
+ assert(fido_assert_authdata_raw_ptr(a, 0) == NULL);
+ assert(fido_assert_authdata_raw_len(a, 0) == 0);
free_assert(a);
free(junk);
}
@@ -613,6 +619,47 @@ es256_PKEY(void)
EVP_PKEY_free(pkey);
}
+static void
+raw_authdata(void)
+{
+ fido_assert_t *a;
+ cbor_item_t *item;
+ struct cbor_load_result cbor_result;
+ const unsigned char *ptr;
+ unsigned char *cbor;
+ size_t len;
+ size_t cbor_len;
+ size_t alloclen;
+
+ a = alloc_assert();
+ assert(fido_assert_set_count(a, 1) == FIDO_OK);
+ assert(fido_assert_set_authdata(a, 0, authdata,
+ sizeof(authdata)) == FIDO_OK);
+ assert((ptr = fido_assert_authdata_ptr(a, 0)) != NULL);
+ assert((len = fido_assert_authdata_len(a, 0)) != 0);
+ assert((item = cbor_load(ptr, len, &cbor_result)) != NULL);
+ assert(cbor_result.read == len);
+ assert(cbor_isa_bytestring(item));
+ assert((ptr = fido_assert_authdata_raw_ptr(a, 0)) != NULL);
+ assert((len = fido_assert_authdata_raw_len(a, 0)) != 0);
+ assert(cbor_bytestring_length(item) == len);
+ assert(memcmp(ptr, cbor_bytestring_handle(item), len) == 0);
+ assert((len = fido_assert_authdata_len(a, 0)) != 0);
+ assert((cbor_len = cbor_serialize_alloc(item, &cbor, &alloclen)) == len);
+ assert((ptr = cbor_bytestring_handle(item)) != NULL);
+ assert((len = cbor_bytestring_length(item)) != 0);
+ assert(fido_assert_set_authdata_raw(a, 0, ptr, len) == FIDO_OK);
+ assert((ptr = fido_assert_authdata_ptr(a, 0)) != NULL);
+ assert((len = fido_assert_authdata_len(a, 0)) != 0);
+ assert(len == cbor_len);
+ assert(memcmp(cbor, ptr, len) == 0);
+ assert(cbor_len == sizeof(authdata));
+ assert(memcmp(cbor, authdata, cbor_len) == 0);
+ cbor_decref(&item);
+ free(cbor);
+ free_assert(a);
+}
+
int
main(void)
{
@@ -632,6 +679,7 @@ main(void)
bad_cbor_serialize();
rs256_PKEY();
es256_PKEY();
+ raw_authdata();
exit(0);
}
diff --git a/contrib/libfido2/regress/cred.c b/contrib/libfido2/regress/cred.c
index e4dc76ac1f0d..61e603d1db1a 100644
--- a/contrib/libfido2/regress/cred.c
+++ b/contrib/libfido2/regress/cred.c
@@ -9,6 +9,8 @@
#include <assert.h>
#include <string.h>
+#include <stdlib.h>
+#include <stdbool.h>
#define _FIDO_INTERNAL
@@ -2094,7 +2096,7 @@ fmt_none(void)
}
static void
-valid_tpm_rs256_cred(void)
+valid_tpm_rs256_cred(bool xfail)
{
fido_cred_t *c;
@@ -2107,7 +2109,8 @@ valid_tpm_rs256_cred(void)
assert(fido_cred_set_uv(c, FIDO_OPT_TRUE) == FIDO_OK);
assert(fido_cred_set_fmt(c, "tpm") == FIDO_OK);
assert(fido_cred_set_attstmt(c, attstmt_tpm_rs256, sizeof(attstmt_tpm_rs256)) == FIDO_OK);
- assert(fido_cred_verify(c) == FIDO_OK);
+ // XXX: RHEL9 has deprecated SHA-1 for signing.
+ assert(fido_cred_verify(c) == (xfail ? FIDO_ERR_INVALID_SIG : FIDO_OK));
assert(fido_cred_prot(c) == 0);
assert(fido_cred_pubkey_len(c) == sizeof(pubkey_tpm_rs256));
assert(memcmp(fido_cred_pubkey_ptr(c), pubkey_tpm_rs256, sizeof(pubkey_tpm_rs256)) == 0);
@@ -2119,7 +2122,7 @@ valid_tpm_rs256_cred(void)
}
static void
-valid_tpm_es256_cred(void)
+valid_tpm_es256_cred(bool xfail)
{
fido_cred_t *c;
@@ -2132,7 +2135,8 @@ valid_tpm_es256_cred(void)
assert(fido_cred_set_uv(c, FIDO_OPT_TRUE) == FIDO_OK);
assert(fido_cred_set_fmt(c, "tpm") == FIDO_OK);
assert(fido_cred_set_attstmt(c, attstmt_tpm_es256, sizeof(attstmt_tpm_es256)) == FIDO_OK);
- assert(fido_cred_verify(c) == FIDO_OK);
+ // XXX: RHEL9 has deprecated SHA-1 for signing.
+ assert(fido_cred_verify(c) == (xfail ? FIDO_ERR_INVALID_SIG : FIDO_OK));
assert(fido_cred_prot(c) == 0);
assert(fido_cred_pubkey_len(c) == sizeof(pubkey_tpm_es256));
assert(memcmp(fido_cred_pubkey_ptr(c), pubkey_tpm_es256, sizeof(pubkey_tpm_es256)) == 0);
@@ -2146,6 +2150,8 @@ valid_tpm_es256_cred(void)
int
main(void)
{
+ bool xfail = getenv("FIDO_REGRESS_RS1_XFAIL") != NULL;
+
fido_init(0);
empty_cred();
@@ -2172,8 +2178,8 @@ main(void)
wrong_credprot();
raw_authdata();
fmt_none();
- valid_tpm_rs256_cred();
- valid_tpm_es256_cred();
+ valid_tpm_rs256_cred(xfail);
+ valid_tpm_es256_cred(xfail);
exit(0);
}
diff --git a/contrib/libfido2/regress/eddsa.c b/contrib/libfido2/regress/eddsa.c
index 06236987ed17..f97f97ce16e5 100644
--- a/contrib/libfido2/regress/eddsa.c
+++ b/contrib/libfido2/regress/eddsa.c
@@ -123,7 +123,7 @@ valid_key(void)
eddsa_pk_t *pkA = NULL;
eddsa_pk_t *pkB = NULL;
-#if defined(LIBRESSL_VERSION_NUMBER)
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3070000f
/* incomplete support; test what we can */
ASSERT_NULL(EVP_PKEY_from_PEM(eddsa, sizeof(eddsa)));
ASSERT_NOT_NULL((pkB = eddsa_pk_new()));
diff --git a/contrib/libfido2/src/assert.c b/contrib/libfido2/src/assert.c
index dabe8b9fdcf7..39d63bc9a174 100644
--- a/contrib/libfido2/src/assert.c
+++ b/contrib/libfido2/src/assert.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -63,6 +63,10 @@ parse_assert_reply(const cbor_item_t *key, const cbor_item_t *val, void *arg)
case 1: /* credential id */
return (cbor_decode_cred_id(val, &stmt->id));
case 2: /* authdata */
+ if (fido_blob_decode(val, &stmt->authdata_raw) < 0) {
+ fido_log_debug("%s: fido_blob_decode", __func__);
+ return (-1);
+ }
return (cbor_decode_assert_authdata(val, &stmt->authdata_cbor,
&stmt->authdata, &stmt->authdata_ext));
case 3: /* signature */
@@ -643,6 +647,34 @@ fido_assert_set_rp(fido_assert_t *assert, const char *id)
return (FIDO_OK);
}
+#ifdef USE_WINHELLO
+int
+fido_assert_set_winhello_appid(fido_assert_t *assert, const char *id)
+{
+ if (assert->appid != NULL) {
+ free(assert->appid);
+ assert->appid = NULL;
+ }
+
+ if (id == NULL)
+ return (FIDO_ERR_INVALID_ARGUMENT);
+
+ if ((assert->appid = strdup(id)) == NULL)
+ return (FIDO_ERR_INTERNAL);
+
+ return (FIDO_OK);
+}
+#else
+int
+fido_assert_set_winhello_appid(fido_assert_t *assert, const char *id)
+{
+ (void)assert;
+ (void)id;
+
+ return (FIDO_ERR_UNSUPPORTED_EXTENSION);
+}
+#endif /* USE_WINHELLO */
+
int
fido_assert_allow_cred(fido_assert_t *assert, const unsigned char *ptr,
size_t len)
@@ -745,12 +777,14 @@ void
fido_assert_reset_tx(fido_assert_t *assert)
{
free(assert->rp_id);
+ free(assert->appid);
fido_blob_reset(&assert->cd);
fido_blob_reset(&assert->cdh);
fido_blob_reset(&assert->ext.hmac_salt);
fido_assert_empty_allow_list(assert);
memset(&assert->ext, 0, sizeof(assert->ext));
assert->rp_id = NULL;
+ assert->appid = NULL;
assert->up = FIDO_OPT_OMIT;
assert->uv = FIDO_OPT_OMIT;
}
@@ -774,6 +808,7 @@ fido_assert_reset_rx(fido_assert_t *assert)
fido_blob_reset(&assert->stmt[i].id);
fido_blob_reset(&assert->stmt[i].hmac_secret);
fido_blob_reset(&assert->stmt[i].authdata_cbor);
+ fido_blob_reset(&assert->stmt[i].authdata_raw);
fido_blob_reset(&assert->stmt[i].largeblob_key);
fido_blob_reset(&assert->stmt[i].sig);
fido_assert_reset_extattr(&assert->stmt[i].authdata_ext);
@@ -847,6 +882,24 @@ fido_assert_authdata_len(const fido_assert_t *assert, size_t idx)
}
const unsigned char *
+fido_assert_authdata_raw_ptr(const fido_assert_t *assert, size_t idx)
+{
+ if (idx >= assert->stmt_len)
+ return (NULL);
+
+ return (assert->stmt[idx].authdata_raw.ptr);
+}
+
+size_t
+fido_assert_authdata_raw_len(const fido_assert_t *assert, size_t idx)
+{
+ if (idx >= assert->stmt_len)
+ return (0);
+
+ return (assert->stmt[idx].authdata_raw.len);
+}
+
+const unsigned char *
fido_assert_sig_ptr(const fido_assert_t *assert, size_t idx)
{
if (idx >= assert->stmt_len)
@@ -985,6 +1038,7 @@ static void
fido_assert_clean_authdata(fido_assert_stmt *stmt)
{
fido_blob_reset(&stmt->authdata_cbor);
+ fido_blob_reset(&stmt->authdata_raw);
fido_assert_reset_extattr(&stmt->authdata_ext);
memset(&stmt->authdata, 0, sizeof(stmt->authdata));
}
@@ -1010,6 +1064,12 @@ fido_assert_set_authdata(fido_assert_t *assert, size_t idx,
goto fail;
}
+ if (fido_blob_decode(item, &stmt->authdata_raw) < 0) {
+ fido_log_debug("%s: fido_blob_decode", __func__);
+ r = FIDO_ERR_INTERNAL;
+ goto fail;
+ }
+
if (cbor_decode_assert_authdata(item, &stmt->authdata_cbor,
&stmt->authdata, &stmt->authdata_ext) < 0) {
fido_log_debug("%s: cbor_decode_assert_authdata", __func__);
@@ -1042,6 +1102,12 @@ fido_assert_set_authdata_raw(fido_assert_t *assert, size_t idx,
stmt = &assert->stmt[idx];
fido_assert_clean_authdata(stmt);
+ if (fido_blob_set(&stmt->authdata_raw, ptr, len) < 0) {
+ fido_log_debug("%s: fido_blob_set", __func__);
+ r = FIDO_ERR_INTERNAL;
+ goto fail;
+ }
+
if ((item = cbor_build_bytestring(ptr, len)) == NULL) {
fido_log_debug("%s: cbor_build_bytestring", __func__);
r = FIDO_ERR_INTERNAL;
diff --git a/contrib/libfido2/src/export.gnu b/contrib/libfido2/src/export.gnu
index 604741ed7d92..ea6ca7d373ef 100644
--- a/contrib/libfido2/src/export.gnu
+++ b/contrib/libfido2/src/export.gnu
@@ -20,6 +20,8 @@
fido_assert_allow_cred;
fido_assert_authdata_len;
fido_assert_authdata_ptr;
+ fido_assert_authdata_raw_len;
+ fido_assert_authdata_raw_ptr;
fido_assert_blob_len;
fido_assert_blob_ptr;
fido_assert_clientdata_hash_len;
@@ -49,6 +51,7 @@
fido_assert_set_sig;
fido_assert_set_up;
fido_assert_set_uv;
+ fido_assert_set_winhello_appid;
fido_assert_sigcount;
fido_assert_sig_len;
fido_assert_sig_ptr;
diff --git a/contrib/libfido2/src/export.llvm b/contrib/libfido2/src/export.llvm
index 0be829538d7b..2a9238141937 100644
--- a/contrib/libfido2/src/export.llvm
+++ b/contrib/libfido2/src/export.llvm
@@ -18,6 +18,8 @@ _es384_pk_to_EVP_PKEY
_fido_assert_allow_cred
_fido_assert_authdata_len
_fido_assert_authdata_ptr
+_fido_assert_authdata_raw_len
+_fido_assert_authdata_raw_ptr
_fido_assert_blob_len
_fido_assert_blob_ptr
_fido_assert_clientdata_hash_len
@@ -47,6 +49,7 @@ _fido_assert_set_rp
_fido_assert_set_sig
_fido_assert_set_up
_fido_assert_set_uv
+_fido_assert_set_winhello_appid
_fido_assert_sigcount
_fido_assert_sig_len
_fido_assert_sig_ptr
diff --git a/contrib/libfido2/src/export.msvc b/contrib/libfido2/src/export.msvc
index 10f8bd14497d..c5b2edc0b5c8 100644
--- a/contrib/libfido2/src/export.msvc
+++ b/contrib/libfido2/src/export.msvc
@@ -19,6 +19,8 @@ es384_pk_to_EVP_PKEY
fido_assert_allow_cred
fido_assert_authdata_len
fido_assert_authdata_ptr
+fido_assert_authdata_raw_len
+fido_assert_authdata_raw_ptr
fido_assert_blob_len
fido_assert_blob_ptr
fido_assert_clientdata_hash_len
@@ -48,6 +50,7 @@ fido_assert_set_rp
fido_assert_set_sig
fido_assert_set_up
fido_assert_set_uv
+fido_assert_set_winhello_appid
fido_assert_sigcount
fido_assert_sig_len
fido_assert_sig_ptr
diff --git a/contrib/libfido2/src/fido.h b/contrib/libfido2/src/fido.h
index 607c44fcfd91..914e37762870 100644
--- a/contrib/libfido2/src/fido.h
+++ b/contrib/libfido2/src/fido.h
@@ -80,6 +80,8 @@ void fido_init(int);
void fido_set_log_handler(fido_log_handler_t *);
const unsigned char *fido_assert_authdata_ptr(const fido_assert_t *, size_t);
+const unsigned char *fido_assert_authdata_raw_ptr(const fido_assert_t *,
+ size_t);
const unsigned char *fido_assert_clientdata_hash_ptr(const fido_assert_t *);
const unsigned char *fido_assert_hmac_secret_ptr(const fido_assert_t *, size_t);
const unsigned char *fido_assert_id_ptr(const fido_assert_t *, size_t);
@@ -142,6 +144,7 @@ int fido_assert_set_rp(fido_assert_t *, const char *);
int fido_assert_set_up(fido_assert_t *, fido_opt_t);
int fido_assert_set_uv(fido_assert_t *, fido_opt_t);
int fido_assert_set_sig(fido_assert_t *, size_t, const unsigned char *, size_t);
+int fido_assert_set_winhello_appid(fido_assert_t *, const char *);
int fido_assert_verify(const fido_assert_t *, size_t, int, const void *);
int fido_cbor_info_algorithm_cose(const fido_cbor_info_t *, size_t);
int fido_cred_empty_exclude_list(fido_cred_t *);
@@ -194,6 +197,7 @@ int fido_dev_set_transport_functions(fido_dev_t *, const fido_dev_transport_t *)
int fido_dev_set_timeout(fido_dev_t *, int);
size_t fido_assert_authdata_len(const fido_assert_t *, size_t);
+size_t fido_assert_authdata_raw_len(const fido_assert_t *, size_t);
size_t fido_assert_clientdata_hash_len(const fido_assert_t *);
size_t fido_assert_count(const fido_assert_t *);
size_t fido_assert_hmac_secret_len(const fido_assert_t *, size_t);
diff --git a/contrib/libfido2/src/fido/types.h b/contrib/libfido2/src/fido/types.h
index cfb4c7a75315..01d68200c19c 100644
--- a/contrib/libfido2/src/fido/types.h
+++ b/contrib/libfido2/src/fido/types.h
@@ -199,6 +199,7 @@ typedef struct _fido_assert_stmt {
fido_blob_t hmac_secret; /* hmac secret */
fido_assert_extattr_t authdata_ext; /* decoded extensions */
fido_blob_t authdata_cbor; /* raw cbor payload */
+ fido_blob_t authdata_raw; /* raw authdata */
fido_authdata_t authdata; /* decoded authdata payload */
fido_blob_t sig; /* signature of cdh + authdata */
fido_blob_t largeblob_key; /* decoded large blob key */
@@ -211,6 +212,7 @@ typedef struct fido_assert_ext {
typedef struct fido_assert {
char *rp_id; /* relying party id */
+ char *appid; /* winhello u2f appid */
fido_blob_t cd; /* client data */
fido_blob_t cdh; /* client data hash */
fido_blob_array_t allow_list; /* list of allowed credentials */
diff --git a/contrib/libfido2/src/webauthn.h b/contrib/libfido2/src/webauthn.h
index e64236a0f6fe..153609b10d29 100644
--- a/contrib/libfido2/src/webauthn.h
+++ b/contrib/libfido2/src/webauthn.h
@@ -67,6 +67,11 @@ extern "C" {
// - WebAuthNCancelCurrentOperation
// - WebAuthNGetErrorName
// - WebAuthNGetW3CExceptionDOMError
+// Transports:
+// - WEBAUTHN_CTAP_TRANSPORT_USB
+// - WEBAUTHN_CTAP_TRANSPORT_NFC
+// - WEBAUTHN_CTAP_TRANSPORT_BLE
+// - WEBAUTHN_CTAP_TRANSPORT_INTERNAL
#define WEBAUTHN_API_VERSION_2 2
// WEBAUTHN_API_VERSION_2 : Delta From WEBAUTHN_API_VERSION_1
@@ -92,12 +97,39 @@ extern "C" {
// - WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS : 5
// - WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS : 6
// - WEBAUTHN_ASSERTION : 3
+// - WEBAUTHN_CREDENTIAL_DETAILS : 1
// APIs:
// - WebAuthNGetPlatformCredentialList
// - WebAuthNFreePlatformCredentialList
+// - WebAuthNDeletePlatformCredential
//
-#define WEBAUTHN_API_CURRENT_VERSION WEBAUTHN_API_VERSION_4
+#define WEBAUTHN_API_VERSION_5 5
+// WEBAUTHN_API_VERSION_5 : Delta From WEBAUTHN_API_VERSION_4
+// Data Structures and their sub versions:
+// - WEBAUTHN_CREDENTIAL_DETAILS : 2
+// Extension Changes:
+// - Enabled LARGE_BLOB Support
+//
+
+#define WEBAUTHN_API_VERSION_6 6
+// WEBAUTHN_API_VERSION_6 : Delta From WEBAUTHN_API_VERSION_5
+// Data Structures and their sub versions:
+// - WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS : 6
+// - WEBAUTHN_CREDENTIAL_ATTESTATION : 5
+// - WEBAUTHN_ASSERTION : 4
+// Transports:
+// - WEBAUTHN_CTAP_TRANSPORT_HYBRID
+
+#define WEBAUTHN_API_VERSION_7 7
+// WEBAUTHN_API_VERSION_7 : Delta From WEBAUTHN_API_VERSION_6
+// Data Structures and their sub versions:
+// - WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS : 7
+// - WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS : 7
+// - WEBAUTHN_CREDENTIAL_ATTESTATION : 6
+// - WEBAUTHN_ASSERTION : 5
+
+#define WEBAUTHN_API_CURRENT_VERSION WEBAUTHN_API_VERSION_7
//+------------------------------------------------------------------------------------------
// Information about an RP Entity
@@ -252,7 +284,8 @@ typedef const WEBAUTHN_CREDENTIALS *PCWEBAUTHN_CREDENTIALS;
#define WEBAUTHN_CTAP_TRANSPORT_BLE 0x00000004
#define WEBAUTHN_CTAP_TRANSPORT_TEST 0x00000008
#define WEBAUTHN_CTAP_TRANSPORT_INTERNAL 0x00000010
-#define WEBAUTHN_CTAP_TRANSPORT_FLAGS_MASK 0x0000001F
+#define WEBAUTHN_CTAP_TRANSPORT_HYBRID 0x00000020
+#define WEBAUTHN_CTAP_TRANSPORT_FLAGS_MASK 0x0000003F
#define WEBAUTHN_CREDENTIAL_EX_CURRENT_VERSION 1
@@ -286,11 +319,52 @@ typedef struct _WEBAUTHN_CREDENTIAL_LIST {
typedef const WEBAUTHN_CREDENTIAL_LIST *PCWEBAUTHN_CREDENTIAL_LIST;
//+------------------------------------------------------------------------------------------
+// Information about linked devices
+//-------------------------------------------------------------------------------------------
+
+#define CTAPCBOR_HYBRID_STORAGE_LINKED_DATA_VERSION_1 1
+#define CTAPCBOR_HYBRID_STORAGE_LINKED_DATA_CURRENT_VERSION CTAPCBOR_HYBRID_STORAGE_LINKED_DATA_VERSION_1
+
+typedef struct _CTAPCBOR_HYBRID_STORAGE_LINKED_DATA
+{
+ // Version
+ DWORD dwVersion;
+
+ // Contact Id
+ DWORD cbContactId;
+ _Field_size_bytes_(cbContactId)
+ PBYTE pbContactId;
+
+ // Link Id
+ DWORD cbLinkId;
+ _Field_size_bytes_(cbLinkId)
+ PBYTE pbLinkId;
+
+ // Link secret
+ DWORD cbLinkSecret;
+ _Field_size_bytes_(cbLinkSecret)
+ PBYTE pbLinkSecret;
+
+ // Authenticator Public Key
+ DWORD cbPublicKey;
+ _Field_size_bytes_(cbPublicKey)
+ PBYTE pbPublicKey;
+
+ // Authenticator Name
+ PCWSTR pwszAuthenticatorName;
+
+ // Tunnel server domain
+ WORD wEncodedTunnelServerDomain;
+} CTAPCBOR_HYBRID_STORAGE_LINKED_DATA, *PCTAPCBOR_HYBRID_STORAGE_LINKED_DATA;
+typedef const CTAPCBOR_HYBRID_STORAGE_LINKED_DATA *PCCTAPCBOR_HYBRID_STORAGE_LINKED_DATA;
+
+//+------------------------------------------------------------------------------------------
// Credential Information for WebAuthNGetPlatformCredentialList API
//-------------------------------------------------------------------------------------------
#define WEBAUTHN_CREDENTIAL_DETAILS_VERSION_1 1
-#define WEBAUTHN_CREDENTIAL_DETAILS_CURRENT_VERSION WEBAUTHN_CREDENTIAL_DETAILS_VERSION_1
+#define WEBAUTHN_CREDENTIAL_DETAILS_VERSION_2 2
+#define WEBAUTHN_CREDENTIAL_DETAILS_CURRENT_VERSION WEBAUTHN_CREDENTIAL_DETAILS_VERSION_2
typedef struct _WEBAUTHN_CREDENTIAL_DETAILS {
// Version of this structure, to allow for modifications in the future.
@@ -306,6 +380,16 @@ typedef struct _WEBAUTHN_CREDENTIAL_DETAILS {
// User Info
PWEBAUTHN_USER_ENTITY_INFORMATION pUserInformation;
+
+ // Removable or not.
+ BOOL bRemovable;
+
+ //
+ // The following fields have been added in WEBAUTHN_CREDENTIAL_DETAILS_VERSION_2
+ //
+
+ // Backed Up or not.
+ BOOL bBackedUp;
} WEBAUTHN_CREDENTIAL_DETAILS, *PWEBAUTHN_CREDENTIAL_DETAILS;
typedef const WEBAUTHN_CREDENTIAL_DETAILS *PCWEBAUTHN_CREDENTIAL_DETAILS;
@@ -323,7 +407,7 @@ typedef struct _WEBAUTHN_GET_CREDENTIALS_OPTIONS {
// Version of this structure, to allow for modifications in the future.
DWORD dwVersion;
- // RPID
+ // Optional.
LPCWSTR pwszRpId;
// Optional. BrowserInPrivate Mode. Defaulting to FALSE.
@@ -340,7 +424,7 @@ typedef const WEBAUTHN_GET_CREDENTIALS_OPTIONS *PCWEBAUTHN_GET_CREDENTIALS_OPTIO
// SALT values below by default are converted into RAW Hmac-Secret values as per PRF extension.
// - SHA-256(UTF8Encode("WebAuthn PRF") || 0x00 || Value)
//
-// Set WEBAUTHN_CTAP_HMAC_SECRET_VALUES_FLAG in dwFlags in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS,
+// Set WEBAUTHN_AUTHENTICATOR_HMAC_SECRET_VALUES_FLAG in dwFlags in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS,
// if caller wants to provide RAW Hmac-Secret SALT values directly. In that case,
// values if provided MUST be of WEBAUTHN_CTAP_ONE_HMAC_SECRET_LENGTH size.
@@ -516,7 +600,9 @@ typedef const WEBAUTHN_EXTENSIONS *PCWEBAUTHN_EXTENSIONS;
#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_3 3
#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_4 4
#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_5 5
-#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_CURRENT_VERSION WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_5
+#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_6 6
+#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_7 7
+#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_CURRENT_VERSION WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_7
typedef struct _WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS {
// Version of this structure, to allow for modifications in the future.
@@ -585,6 +671,24 @@ typedef struct _WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS {
// Optional. BrowserInPrivate Mode. Defaulting to FALSE.
BOOL bBrowserInPrivateMode;
+ //
+ // The following fields have been added in WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_6
+ //
+
+ // Enable PRF
+ BOOL bEnablePrf;
+
+ //
+ // The following fields have been added in WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_7
+ //
+
+ // Optional. Linked Device Connection Info.
+ PCTAPCBOR_HYBRID_STORAGE_LINKED_DATA pLinkedDevice;
+
+ // Size of pbJsonExt
+ DWORD cbJsonExt;
+ _Field_size_bytes_(cbJsonExt)
+ PBYTE pbJsonExt;
} WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS, *PWEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS;
typedef const WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS *PCWEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS;
@@ -599,7 +703,8 @@ typedef const WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS *PCWEBAUTHN_AUTHENT
#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_4 4
#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_5 5
#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_6 6
-#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_CURRENT_VERSION WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_6
+#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_7 7
+#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_CURRENT_VERSION WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_7
/*
Information about flags.
@@ -676,6 +781,20 @@ typedef struct _WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS {
// Optional. BrowserInPrivate Mode. Defaulting to FALSE.
BOOL bBrowserInPrivateMode;
+ //
+ // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_7
+ //
+
+ // Optional. Linked Device Connection Info.
+ PCTAPCBOR_HYBRID_STORAGE_LINKED_DATA pLinkedDevice;
+
+ // Optional. Allowlist MUST contain 1 credential applicable for Hybrid transport.
+ BOOL bAutoFill;
+
+ // Size of pbJsonExt
+ DWORD cbJsonExt;
+ _Field_size_bytes_(cbJsonExt)
+ PBYTE pbJsonExt;
} WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS, *PWEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS;
typedef const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS *PCWEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS;
@@ -752,7 +871,9 @@ typedef const WEBAUTHN_COMMON_ATTESTATION *PCWEBAUTHN_COMMON_ATTESTATION;
#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_2 2
#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_3 3
#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_4 4
-#define WEBAUTHN_CREDENTIAL_ATTESTATION_CURRENT_VERSION WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_4
+#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_5 5
+#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_6 6
+#define WEBAUTHN_CREDENTIAL_ATTESTATION_CURRENT_VERSION WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_6
typedef struct _WEBAUTHN_CREDENTIAL_ATTESTATION {
// Version of this structure, to allow for modifications in the future.
@@ -815,6 +936,19 @@ typedef struct _WEBAUTHN_CREDENTIAL_ATTESTATION {
BOOL bLargeBlobSupported;
BOOL bResidentKey;
+ //
+ // Following fields have been added in WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_5
+ //
+
+ BOOL bPrfEnabled;
+
+ //
+ // Following fields have been added in WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_6
+ //
+
+ DWORD cbUnsignedExtensionOutputs;
+ _Field_size_bytes_(cbUnsignedExtensionOutputs)
+ PBYTE pbUnsignedExtensionOutputs;
} WEBAUTHN_CREDENTIAL_ATTESTATION, *PWEBAUTHN_CREDENTIAL_ATTESTATION;
typedef const WEBAUTHN_CREDENTIAL_ATTESTATION *PCWEBAUTHN_CREDENTIAL_ATTESTATION;
@@ -837,7 +971,9 @@ typedef const WEBAUTHN_CREDENTIAL_ATTESTATION *PCWEBAUTHN_CREDENTIAL_ATTESTATION
#define WEBAUTHN_ASSERTION_VERSION_1 1
#define WEBAUTHN_ASSERTION_VERSION_2 2
#define WEBAUTHN_ASSERTION_VERSION_3 3
-#define WEBAUTHN_ASSERTION_CURRENT_VERSION WEBAUTHN_ASSERTION_VERSION_3
+#define WEBAUTHN_ASSERTION_VERSION_4 4
+#define WEBAUTHN_ASSERTION_VERSION_5 5
+#define WEBAUTHN_ASSERTION_CURRENT_VERSION WEBAUTHN_ASSERTION_VERSION_5
typedef struct _WEBAUTHN_ASSERTION {
// Version of this structure, to allow for modifications in the future.
@@ -883,6 +1019,21 @@ typedef struct _WEBAUTHN_ASSERTION {
PWEBAUTHN_HMAC_SECRET_SALT pHmacSecret;
+ //
+ // Following fields have been added in WEBAUTHN_ASSERTION_VERSION_4
+ //
+
+ // One of the WEBAUTHN_CTAP_TRANSPORT_* bits will be set corresponding to
+ // the transport that was used.
+ DWORD dwUsedTransport;
+
+ //
+ // Following fields have been added in WEBAUTHN_ASSERTION_VERSION_5
+ //
+
+ DWORD cbUnsignedExtensionOutputs;
+ _Field_size_bytes_(cbUnsignedExtensionOutputs)
+ PBYTE pbUnsignedExtensionOutputs;
} WEBAUTHN_ASSERTION, *PWEBAUTHN_ASSERTION;
typedef const WEBAUTHN_ASSERTION *PCWEBAUTHN_ASSERTION;
@@ -941,6 +1092,7 @@ WINAPI
WebAuthNCancelCurrentOperation(
_In_ const GUID* pCancellationId);
+// Returns NTE_NOT_FOUND when credentials are not found.
HRESULT
WINAPI
WebAuthNGetPlatformCredentialList(
@@ -952,6 +1104,13 @@ WINAPI
WebAuthNFreePlatformCredentialList(
_In_ PWEBAUTHN_CREDENTIAL_DETAILS_LIST pCredentialDetailsList);
+HRESULT
+WINAPI
+WebAuthNDeletePlatformCredential(
+ _In_ DWORD cbCredentialId,
+ _In_reads_bytes_(cbCredentialId) const BYTE *pbCredentialId
+ );
+
//
// Returns the following Error Names:
// L"Success" - S_OK
diff --git a/contrib/libfido2/src/winhello.c b/contrib/libfido2/src/winhello.c
index efc7dc22f851..ff969a4f6f73 100644
--- a/contrib/libfido2/src/winhello.c
+++ b/contrib/libfido2/src/winhello.c
@@ -22,6 +22,9 @@
#ifndef NTE_DEVICE_NOT_FOUND
#define NTE_DEVICE_NOT_FOUND _HRESULT_TYPEDEF_(0x80090035)
#endif
+#ifndef NTE_USER_CANCELLED
+#define NTE_USER_CANCELLED _HRESULT_TYPEDEF_(0x80090036L)
+#endif
#define MAXCHARS 128
#define MAXCREDS 128
@@ -34,6 +37,7 @@ struct winhello_assert {
WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS opt;
WEBAUTHN_ASSERTION *assert;
wchar_t *rp_id;
+ wchar_t *appid;
};
struct winhello_cred {
@@ -194,6 +198,9 @@ to_fido(HRESULT hr)
case NTE_DEVICE_NOT_FOUND:
case NTE_NOT_FOUND:
return FIDO_ERR_NOT_ALLOWED;
+ case __HRESULT_FROM_WIN32(ERROR_CANCELLED):
+ case NTE_USER_CANCELLED:
+ return FIDO_ERR_OPERATION_DENIED;
default:
fido_log_debug("%s: hr=0x%lx", __func__, (u_long)hr);
return FIDO_ERR_INTERNAL;
@@ -401,6 +408,10 @@ pack_cred_ext(WEBAUTHN_EXTENSIONS *out, const fido_cred_ext_t *in)
}
out->cExtensions = (DWORD)n;
if (in->mask & FIDO_EXT_HMAC_SECRET) {
+ /*
+ * NOTE: webauthn.dll ignores requests to enable hmac-secret
+ * unless a discoverable credential is also requested.
+ */
if ((b = calloc(1, sizeof(*b))) == NULL) {
fido_log_debug("%s: calloc", __func__);
return -1;
@@ -468,6 +479,43 @@ pack_assert_ext(WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS *out,
}
static int
+pack_appid(WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS *opt, const char *id,
+ wchar_t **appid)
+{
+ if (id == NULL)
+ return 0; /* nothing to do */
+ if ((opt->pbU2fAppId = calloc(1, sizeof(*opt->pbU2fAppId))) == NULL) {
+ fido_log_debug("%s: calloc", __func__);
+ return -1;
+ }
+ if ((*appid = to_utf16(id)) == NULL) {
+ fido_log_debug("%s: to_utf16", __func__);
+ return -1;
+ }
+ fido_log_debug("%s: using %s", __func__, id);
+ opt->pwszU2fAppId = *appid;
+ opt->dwVersion = WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_2;
+
+ return 0;
+}
+
+static void
+unpack_appid(fido_assert_t *assert,
+ const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS *opt)
+{
+ if (assert->appid == NULL || opt->pbU2fAppId == NULL)
+ return; /* nothing to do */
+ if (*opt->pbU2fAppId == false) {
+ fido_log_debug("%s: not used", __func__);
+ return;
+ }
+ fido_log_debug("%s: %s -> %s", __func__, assert->rp_id, assert->appid);
+ free(assert->rp_id);
+ assert->rp_id = assert->appid;
+ assert->appid = NULL;
+}
+
+static int
unpack_assert_authdata(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
{
int r;
@@ -526,7 +574,7 @@ unpack_user_id(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
static int
unpack_hmac_secret(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
{
- if (wa->dwVersion != WEBAUTHN_ASSERTION_VERSION_3) {
+ if (wa->dwVersion < WEBAUTHN_ASSERTION_VERSION_3) {
fido_log_debug("%s: dwVersion %u", __func__,
(unsigned)wa->dwVersion);
return 0; /* proceed without hmac-secret */
@@ -578,6 +626,10 @@ translate_fido_assert(struct winhello_assert *ctx, const fido_assert_t *assert,
opt = &ctx->opt;
opt->dwVersion = WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_1;
opt->dwTimeoutMilliseconds = ms < 0 ? MAXMSEC : (DWORD)ms;
+ if (pack_appid(opt, assert->appid, &ctx->appid) < 0) {
+ fido_log_debug("%s: pack_appid" , __func__);
+ return FIDO_ERR_INTERNAL;
+ }
if (pack_credlist(&opt->CredentialList, &assert->allow_list) < 0) {
fido_log_debug("%s: pack_credlist", __func__);
return FIDO_ERR_INTERNAL;
@@ -596,8 +648,11 @@ translate_fido_assert(struct winhello_assert *ctx, const fido_assert_t *assert,
}
static int
-translate_winhello_assert(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
+translate_winhello_assert(fido_assert_t *assert,
+ const struct winhello_assert *ctx)
{
+ const WEBAUTHN_ASSERTION *wa = ctx->assert;
+ const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS *opt = &ctx->opt;
int r;
if (assert->stmt_len > 0) {
@@ -609,6 +664,7 @@ translate_winhello_assert(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
fido_strerr(r));
return FIDO_ERR_INTERNAL;
}
+ unpack_appid(assert, opt);
if (unpack_assert_authdata(assert, wa) < 0) {
fido_log_debug("%s: unpack_assert_authdata", __func__);
return FIDO_ERR_INTERNAL;
@@ -800,6 +856,7 @@ winhello_assert_free(struct winhello_assert *ctx)
webauthn_free_assert(ctx->assert);
free(ctx->rp_id);
+ free(ctx->appid);
free(ctx->opt.CredentialList.pCredentials);
if (ctx->opt.pHmacSecretSaltValues != NULL)
free(ctx->opt.pHmacSecretSaltValues->pGlobalHmacSalt);
@@ -928,7 +985,7 @@ fido_winhello_get_assert(fido_dev_t *dev, fido_assert_t *assert,
fido_log_debug("%s: winhello_get_assert", __func__);
goto fail;
}
- if ((r = translate_winhello_assert(assert, ctx->assert)) != FIDO_OK) {
+ if ((r = translate_winhello_assert(assert, ctx)) != FIDO_OK) {
fido_log_debug("%s: translate_winhello_assert", __func__);
goto fail;
}
diff --git a/contrib/libfido2/tools/assert_get.c b/contrib/libfido2/tools/assert_get.c
index 8260fb8359f5..32d40b1ee88f 100644
--- a/contrib/libfido2/tools/assert_get.c
+++ b/contrib/libfido2/tools/assert_get.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -99,7 +99,8 @@ prepare_assert(FILE *in_f, int flags, const struct toggle *opt)
errx(1, "input error");
if (flags & FLAG_DEBUG) {
- fprintf(stderr, "client data hash:\n");
+ fprintf(stderr, "client data%s:\n",
+ flags & FLAG_CD ? "" : " hash");
xxd(cdh.ptr, cdh.len);
fprintf(stderr, "relying party id: %s\n", rpid);
if ((flags & FLAG_RK) == 0) {
@@ -114,9 +115,12 @@ prepare_assert(FILE *in_f, int flags, const struct toggle *opt)
if ((assert = fido_assert_new()) == NULL)
errx(1, "fido_assert_new");
- if ((r = fido_assert_set_clientdata_hash(assert, cdh.ptr,
- cdh.len)) != FIDO_OK ||
- (r = fido_assert_set_rp(assert, rpid)) != FIDO_OK)
+ if (flags & FLAG_CD)
+ r = fido_assert_set_clientdata(assert, cdh.ptr, cdh.len);
+ else
+ r = fido_assert_set_clientdata_hash(assert, cdh.ptr, cdh.len);
+
+ if (r != FIDO_OK || (r = fido_assert_set_rp(assert, rpid)) != FIDO_OK)
errx(1, "fido_assert_set: %s", fido_strerr(r));
if ((r = fido_assert_set_up(assert, opt->up)) != FIDO_OK)
errx(1, "fido_assert_set_up: %s", fido_strerr(r));
@@ -222,7 +226,7 @@ assert_get(int argc, char **argv)
opt.up = opt.uv = opt.pin = FIDO_OPT_OMIT;
- while ((ch = getopt(argc, argv, "bdhi:o:prt:uv")) != -1) {
+ while ((ch = getopt(argc, argv, "bdhi:o:prt:uvw")) != -1) {
switch (ch) {
case 'b':
flags |= FLAG_LARGEBLOB;
@@ -256,6 +260,9 @@ assert_get(int argc, char **argv)
opt.pin = FIDO_OPT_TRUE;
opt.uv = FIDO_OPT_TRUE;
break;
+ case 'w':
+ flags |= FLAG_CD;
+ break;
default:
usage();
}
diff --git a/contrib/libfido2/tools/cred_make.c b/contrib/libfido2/tools/cred_make.c
index a6239ec27aec..66c8b52d8e38 100644
--- a/contrib/libfido2/tools/cred_make.c
+++ b/contrib/libfido2/tools/cred_make.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -37,7 +37,8 @@ prepare_cred(FILE *in_f, int type, int flags)
errx(1, "input error");
if (flags & FLAG_DEBUG) {
- fprintf(stderr, "client data hash:\n");
+ fprintf(stderr, "client data%s:\n",
+ flags & FLAG_CD ? "" : " hash");
xxd(cdh.ptr, cdh.len);
fprintf(stderr, "relying party id: %s\n", rpid);
fprintf(stderr, "user name: %s\n", uname);
@@ -48,9 +49,13 @@ prepare_cred(FILE *in_f, int type, int flags)
if ((cred = fido_cred_new()) == NULL)
errx(1, "fido_cred_new");
- if ((r = fido_cred_set_type(cred, type)) != FIDO_OK ||
- (r = fido_cred_set_clientdata_hash(cred, cdh.ptr,
- cdh.len)) != FIDO_OK ||
+
+ if (flags & FLAG_CD)
+ r = fido_cred_set_clientdata(cred, cdh.ptr, cdh.len);
+ else
+ r = fido_cred_set_clientdata_hash(cred, cdh.ptr, cdh.len);
+
+ if (r != FIDO_OK || (r = fido_cred_set_type(cred, type)) != FIDO_OK ||
(r = fido_cred_set_rp(cred, rpid, NULL)) != FIDO_OK ||
(r = fido_cred_set_user(cred, uid.ptr, uid.len, uname, NULL,
NULL)) != FIDO_OK)
@@ -149,7 +154,7 @@ cred_make(int argc, char **argv)
int ch;
int r;
- while ((ch = getopt(argc, argv, "bc:dhi:o:qruv")) != -1) {
+ while ((ch = getopt(argc, argv, "bc:dhi:o:qruvw")) != -1) {
switch (ch) {
case 'b':
flags |= FLAG_LARGEBLOB;
@@ -182,6 +187,9 @@ cred_make(int argc, char **argv)
case 'v':
flags |= FLAG_UV;
break;
+ case 'w':
+ flags |= FLAG_CD;
+ break;
default:
usage();
}
diff --git a/contrib/libfido2/tools/extern.h b/contrib/libfido2/tools/extern.h
index ed4b348cfe46..b806ddd646fb 100644
--- a/contrib/libfido2/tools/extern.h
+++ b/contrib/libfido2/tools/extern.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -23,14 +23,15 @@ struct blob {
#define TOKEN_OPT "CDGILPRSVabcdefi:k:l:m:n:p:ru"
-#define FLAG_DEBUG 0x01
-#define FLAG_QUIET 0x02
-#define FLAG_RK 0x04
-#define FLAG_UV 0x08
-#define FLAG_U2F 0x10
-#define FLAG_HMAC 0x20
-#define FLAG_UP 0x40
-#define FLAG_LARGEBLOB 0x80
+#define FLAG_DEBUG 0x001
+#define FLAG_QUIET 0x002
+#define FLAG_RK 0x004
+#define FLAG_UV 0x008
+#define FLAG_U2F 0x010
+#define FLAG_HMAC 0x020
+#define FLAG_UP 0x040
+#define FLAG_LARGEBLOB 0x080
+#define FLAG_CD 0x100
#define PINBUF_LEN 256
diff --git a/contrib/libfido2/tools/fido2-assert.c b/contrib/libfido2/tools/fido2-assert.c
index d05c541651cb..351ed4fd387d 100644
--- a/contrib/libfido2/tools/fido2-assert.c
+++ b/contrib/libfido2/tools/fido2-assert.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -29,7 +29,7 @@ void
usage(void)
{
fprintf(stderr,
-"usage: fido2-assert -G [-bdhpruv] [-t option] [-i input_file] [-o output_file] device\n"
+"usage: fido2-assert -G [-bdhpruvw] [-t option] [-i input_file] [-o output_file] device\n"
" fido2-assert -V [-dhpv] [-i input_file] key_file [type]\n"
);
diff --git a/contrib/libfido2/tools/fido2-cred.c b/contrib/libfido2/tools/fido2-cred.c
index 965dbf9ef1ad..76081c6856e9 100644
--- a/contrib/libfido2/tools/fido2-cred.c
+++ b/contrib/libfido2/tools/fido2-cred.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Yubico AB. All rights reserved.
+ * Copyright (c) 2018-2023 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -27,7 +27,7 @@ void
usage(void)
{
fprintf(stderr,
-"usage: fido2-cred -M [-bdhqruv] [-c cred_protect] [-i input_file] [-o output_file] device [type]\n"
+"usage: fido2-cred -M [-bdhqruvw] [-c cred_protect] [-i input_file] [-o output_file] device [type]\n"
" fido2-cred -V [-dhv] [-c cred_protect] [-i input_file] [-o output_file] [type]\n"
);
diff --git a/contrib/libfido2/udev/70-u2f.rules b/contrib/libfido2/udev/70-u2f.rules
index c443f7524a08..6df852b9de99 100644
--- a/contrib/libfido2/udev/70-u2f.rules
+++ b/contrib/libfido2/udev/70-u2f.rules
@@ -198,18 +198,42 @@ KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct
# Ledger Blue Legacy by LEDGER
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0015", TAG+="uaccess", GROUP="plugdev", MODE="0660"
-# Ledger Nano S by LEDGER
+# Ledger Nano S HID+U2F by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="1005", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger Nano S HID+WEBUSB by LEDGER
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="1011", TAG+="uaccess", GROUP="plugdev", MODE="0660"
-# Ledger Nano S Legacy by LEDGER
+# Ledger Nano S HID+U2F+WEBUSB by LEDGER
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="1015", TAG+="uaccess", GROUP="plugdev", MODE="0660"
-# Ledger Nano X by LEDGER
+# Ledger Nano X HID+U2F by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="4005", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger Nano X HID+WEBUSB by LEDGER
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="4011", TAG+="uaccess", GROUP="plugdev", MODE="0660"
-# Ledger Nano X Legacy by LEDGER
+# Ledger Nano X HID+U2F+WEBUSB by LEDGER
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="4015", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+# Ledger Nano S+ HID+U2F by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="5005", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger Nano S+ HID+WEBUSB by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="5011", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger Nano S+ HID+U2F+WEBUSB by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="5015", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger Stax HID+U2F by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="6005", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger Stax HID+WEBUSB by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="6011", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
+# Ledger stax HID+U2F+WEBUSB by LEDGER
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="6015", TAG+="uaccess", GROUP="plugdev", MODE="0660"
+
# Hypersecu HyperFIDO by Hypersecu Information Systems, Inc.
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2ccf", ATTRS{idProduct}=="0880", TAG+="uaccess", GROUP="plugdev", MODE="0660"
diff --git a/contrib/libfido2/udev/fidodevs b/contrib/libfido2/udev/fidodevs
index 196e92f0b100..ba626965fa67 100644
--- a/contrib/libfido2/udev/fidodevs
+++ b/contrib/libfido2/udev/fidodevs
@@ -107,10 +107,18 @@ product LEDGER 0x0001 Ledger Nano S Old firmware
product LEDGER 0x0004 Ledger Nano X Old firmware
product LEDGER 0x0011 Ledger Blue
product LEDGER 0x0015 Ledger Blue Legacy
-product LEDGER 0x1011 Ledger Nano S
-product LEDGER 0x1015 Ledger Nano S Legacy
-product LEDGER 0x4011 Ledger Nano X
-product LEDGER 0x4015 Ledger Nano X Legacy
+product LEDGER 0x1005 Ledger Nano S HID+U2F
+product LEDGER 0x1011 Ledger Nano S HID+WEBUSB
+product LEDGER 0x1015 Ledger Nano S HID+U2F+WEBUSB
+product LEDGER 0x4005 Ledger Nano X HID+U2F
+product LEDGER 0x4011 Ledger Nano X HID+WEBUSB
+product LEDGER 0x4015 Ledger Nano X HID+U2F+WEBUSB
+product LEDGER 0x5005 Ledger Nano S+ HID+U2F
+product LEDGER 0x5011 Ledger Nano S+ HID+WEBUSB
+product LEDGER 0x5015 Ledger Nano S+ HID+U2F+WEBUSB
+product LEDGER 0x6005 Ledger Stax HID+U2F
+product LEDGER 0x6011 Ledger Stax HID+WEBUSB
+product LEDGER 0x6015 Ledger stax HID+U2F+WEBUSB
product HYPERSECU 0x0880 Hypersecu HyperFIDO
diff --git a/contrib/libfido2/windows/build.ps1 b/contrib/libfido2/windows/build.ps1
index 52a1d6692de4..ff43d8b8962f 100644
--- a/contrib/libfido2/windows/build.ps1
+++ b/contrib/libfido2/windows/build.ps1
@@ -183,6 +183,7 @@ try {
-DBUILD_SHARED_LIBS="${SHARED}" `
-DCMAKE_C_FLAGS_DEBUG="${CFLAGS_DEBUG}" `
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS_RELEASE}" `
+ -DCMAKE_MSVC_RUNTIME_LIBRARY="${CMAKE_MSVC_RUNTIME_LIBRARY}" `
-DCMAKE_INSTALL_PREFIX="${PREFIX}" "${CMAKE_SYSTEM_VERSION}"; `
ExitOnError
& $CMake --build . --config ${Config} --verbose; ExitOnError
diff --git a/contrib/libfido2/windows/const.ps1 b/contrib/libfido2/windows/const.ps1
index f657846def5e..7fac21e93df0 100644
--- a/contrib/libfido2/windows/const.ps1
+++ b/contrib/libfido2/windows/const.ps1
@@ -5,20 +5,20 @@
# LibreSSL coordinates.
New-Variable -Name 'LIBRESSL_URL' `
- -Value 'https://fastly.cdn.openbsd.org/pub/OpenBSD/LibreSSL' `
+ -Value 'https://cloudflare.cdn.openbsd.org/pub/OpenBSD/LibreSSL' `
-Option Constant
-New-Variable -Name 'LIBRESSL' -Value 'libressl-3.6.2' -Option Constant
+New-Variable -Name 'LIBRESSL' -Value 'libressl-3.7.3' -Option Constant
New-Variable -Name 'CRYPTO_LIBRARIES' -Value 'crypto-50' -Option Constant
# libcbor coordinates.
-New-Variable -Name 'LIBCBOR' -Value 'libcbor-0.10.1' -Option Constant
-New-Variable -Name 'LIBCBOR_BRANCH' -Value 'v0.10.1' -Option Constant
+New-Variable -Name 'LIBCBOR' -Value 'libcbor-0.10.2' -Option Constant
+New-Variable -Name 'LIBCBOR_BRANCH' -Value 'v0.10.2' -Option Constant
New-Variable -Name 'LIBCBOR_GIT' -Value 'https://github.com/pjk/libcbor' `
-Option Constant
# zlib coordinates.
-New-Variable -Name 'ZLIB' -Value 'zlib-1.2.13' -Option Constant
-New-Variable -Name 'ZLIB_BRANCH' -Value 'v1.2.13' -Option Constant
+New-Variable -Name 'ZLIB' -Value 'zlib-1.3' -Option Constant
+New-Variable -Name 'ZLIB_BRANCH' -Value 'v1.3' -Option Constant
New-Variable -Name 'ZLIB_GIT' -Value 'https://github.com/madler/zlib' `
-Option Constant
@@ -34,9 +34,13 @@ New-Variable -Name 'PREFIX' -Value "${OUTPUT}\${Arch}\${Type}" -Option Constant
if ("${Type}" -eq "dynamic") {
New-Variable -Name 'RUNTIME' -Value '/MD' -Option Constant
New-Variable -Name 'SHARED' -Value 'ON' -Option Constant
+ New-Variable -Name 'CMAKE_MSVC_RUNTIME_LIBRARY' -Option Constant `
+ -Value 'MultiThreaded$<$<CONFIG:Debug>:Debug>DLL'
} else {
New-Variable -Name 'RUNTIME' -Value '/MT' -Option Constant
New-Variable -Name 'SHARED' -Value 'OFF' -Option Constant
+ New-Variable -Name 'CMAKE_MSVC_RUNTIME_LIBRARY' -Option Constant `
+ -Value 'MultiThreaded$<$<CONFIG:Debug>:Debug>'
}
New-Variable -Name 'CFLAGS_DEBUG' -Value "${RUNTIME}d /Zi /guard:cf /sdl" `
-Option Constant
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
index a4f26a6f0eb1..44ddd2428b10 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
@@ -823,29 +823,32 @@ const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField(
ASTContext &Ctx, const RecordDecl *RD, StringRef Name, uint64_t &Offset) {
const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
getLangOpts().getStrictFlexArraysLevel();
- unsigned FieldNo = 0;
- bool IsUnion = RD->isUnion();
+ uint32_t FieldNo = 0;
- for (const Decl *D : RD->decls()) {
- if (const auto *Field = dyn_cast<FieldDecl>(D);
- Field && (Name.empty() || Field->getNameAsString() == Name) &&
+ if (RD->isImplicit())
+ return nullptr;
+
+ for (const FieldDecl *FD : RD->fields()) {
+ if ((Name.empty() || FD->getNameAsString() == Name) &&
Decl::isFlexibleArrayMemberLike(
- Ctx, Field, Field->getType(), StrictFlexArraysLevel,
+ Ctx, FD, FD->getType(), StrictFlexArraysLevel,
/*IgnoreTemplateOrMacroSubstitution=*/true)) {
const ASTRecordLayout &Layout = Ctx.getASTRecordLayout(RD);
Offset += Layout.getFieldOffset(FieldNo);
- return Field;
+ return FD;
}
- if (const auto *Record = dyn_cast<RecordDecl>(D))
- if (const FieldDecl *Field =
- FindFlexibleArrayMemberField(Ctx, Record, Name, Offset)) {
+ QualType Ty = FD->getType();
+ if (Ty->isRecordType()) {
+ if (const FieldDecl *Field = FindFlexibleArrayMemberField(
+ Ctx, Ty->getAsRecordDecl(), Name, Offset)) {
const ASTRecordLayout &Layout = Ctx.getASTRecordLayout(RD);
Offset += Layout.getFieldOffset(FieldNo);
return Field;
}
+ }
- if (!IsUnion && isa<FieldDecl>(D))
+ if (!RD->isUnion())
++FieldNo;
}
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp
index 28c211aa631e..a6a2f3595fe7 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp
@@ -1581,6 +1581,11 @@ bool CodeGenModule::ReturnTypeUsesSRet(const CGFunctionInfo &FI) {
return RI.isIndirect() || (RI.isInAlloca() && RI.getInAllocaSRet());
}
+bool CodeGenModule::ReturnTypeHasInReg(const CGFunctionInfo &FI) {
+ const auto &RI = FI.getReturnInfo();
+ return RI.getInReg();
+}
+
bool CodeGenModule::ReturnSlotInterferesWithArgs(const CGFunctionInfo &FI) {
return ReturnTypeUsesSRet(FI) &&
getTargetCodeGenInfo().doesReturnSlotInterfereWithArgs();
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
index a36b0cdddaf0..05e3f8d4bfc2 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -2903,23 +2903,29 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
break;
case CodeGenOptions::Mixed:
case CodeGenOptions::NonLegacy:
+ StringRef name = "objc_msgSend";
if (CGM.ReturnTypeUsesFPRet(ResultType)) {
- imp =
- CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true),
- "objc_msgSend_fpret")
- .getCallee();
+ name = "objc_msgSend_fpret";
} else if (CGM.ReturnTypeUsesSRet(MSI.CallInfo)) {
- // The actual types here don't matter - we're going to bitcast the
- // function anyway
- imp =
- CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true),
- "objc_msgSend_stret")
- .getCallee();
- } else {
- imp = CGM.CreateRuntimeFunction(
- llvm::FunctionType::get(IdTy, IdTy, true), "objc_msgSend")
- .getCallee();
+ name = "objc_msgSend_stret";
+
+ // The address of the memory block is be passed in x8 for POD type,
+ // or in x0 for non-POD type (marked as inreg).
+ bool shouldCheckForInReg =
+ CGM.getContext()
+ .getTargetInfo()
+ .getTriple()
+ .isWindowsMSVCEnvironment() &&
+ CGM.getContext().getTargetInfo().getTriple().isAArch64();
+ if (shouldCheckForInReg && CGM.ReturnTypeHasInReg(MSI.CallInfo)) {
+ name = "objc_msgSend_stret2";
+ }
}
+ // The actual types here don't matter - we're going to bitcast the
+ // function anyway
+ imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true),
+ name)
+ .getCallee();
}
// Reset the receiver in case the lookup modified it
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
index 1280bcd36de9..eb13cd40eb8a 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
@@ -67,6 +67,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/RISCVISAInfo.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/xxhash.h"
#include "llvm/TargetParser/Triple.h"
@@ -1059,6 +1060,19 @@ void CodeGenModule::Release() {
llvm::LLVMContext &Ctx = TheModule.getContext();
getModule().addModuleFlag(llvm::Module::Error, "target-abi",
llvm::MDString::get(Ctx, ABIStr));
+
+ // Add the canonical ISA string as metadata so the backend can set the ELF
+ // attributes correctly. We use AppendUnique so LTO will keep all of the
+ // unique ISA strings that were linked together.
+ const std::vector<std::string> &Features =
+ getTarget().getTargetOpts().Features;
+ auto ParseResult = llvm::RISCVISAInfo::parseFeatures(
+ Arch == llvm::Triple::riscv64 ? 64 : 32, Features);
+ if (!errorToBool(ParseResult.takeError()))
+ getModule().addModuleFlag(
+ llvm::Module::AppendUnique, "riscv-isa",
+ llvm::MDNode::get(
+ Ctx, llvm::MDString::get(Ctx, (*ParseResult)->toString())));
}
if (CodeGenOpts.SanitizeCfiCrossDso) {
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h
index ec34680fd3f7..d9ece4d98eec 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h
+++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.h
@@ -1239,6 +1239,9 @@ public:
/// Return true iff the given type uses 'sret' when used as a return type.
bool ReturnTypeUsesSRet(const CGFunctionInfo &FI);
+ /// Return true iff the given type has `inreg` set.
+ bool ReturnTypeHasInReg(const CGFunctionInfo &FI);
+
/// Return true iff the given type uses an argument slot when 'sret' is used
/// as a return type.
bool ReturnSlotInterferesWithArgs(const CGFunctionInfo &FI);
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CoverageMappingGen.cpp b/contrib/llvm-project/clang/lib/CodeGen/CoverageMappingGen.cpp
index 0c43317642bc..ae4e6d4c88c0 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -1207,6 +1207,12 @@ struct CounterCoverageMappingBuilder
/// Find a valid gap range between \p AfterLoc and \p BeforeLoc.
std::optional<SourceRange> findGapAreaBetween(SourceLocation AfterLoc,
SourceLocation BeforeLoc) {
+ // Some statements (like AttributedStmt and ImplicitValueInitExpr) don't
+ // have valid source locations. Do not emit a gap region if this is the case
+ // in either AfterLoc end or BeforeLoc end.
+ if (AfterLoc.isInvalid() || BeforeLoc.isInvalid())
+ return std::nullopt;
+
// If AfterLoc is in function-like macro, use the right parenthesis
// location.
if (AfterLoc.isMacroID()) {
@@ -1370,9 +1376,8 @@ struct CounterCoverageMappingBuilder
for (const Stmt *Child : S->children())
if (Child) {
// If last statement contains terminate statements, add a gap area
- // between the two statements. Skipping attributed statements, because
- // they don't have valid start location.
- if (LastStmt && HasTerminateStmt && !isa<AttributedStmt>(Child)) {
+ // between the two statements.
+ if (LastStmt && HasTerminateStmt) {
auto Gap = findGapAreaBetween(getEnd(LastStmt), getStart(Child));
if (Gap)
fillGapAreaWithCount(Gap->getBegin(), Gap->getEnd(),
diff --git a/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 172c4c937b97..4d0f4c63f843 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -1135,9 +1135,15 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty,
return false;
if (RD->hasNonTrivialCopyAssignment())
return false;
- for (const CXXConstructorDecl *Ctor : RD->ctors())
- if (Ctor->isUserProvided())
- return false;
+ for (const Decl *D : RD->decls()) {
+ if (auto *Ctor = dyn_cast<CXXConstructorDecl>(D)) {
+ if (Ctor->isUserProvided())
+ return false;
+ } else if (auto *Template = dyn_cast<FunctionTemplateDecl>(D)) {
+ if (isa<CXXConstructorDecl>(Template->getTemplatedDecl()))
+ return false;
+ }
+ }
if (RD->hasNonTrivialDestructor())
return false;
return true;
diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
index fd6aa4d7e684..00b6c520fcdd 100644
--- a/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
+++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
@@ -371,7 +371,8 @@ std::string OpenBSD::getCompilerRT(const ArgList &Args, StringRef Component,
if (Component == "builtins") {
SmallString<128> Path(getDriver().SysRoot);
llvm::sys::path::append(Path, "/usr/lib/libcompiler_rt.a");
- return std::string(Path);
+ if (getVFS().exists(Path))
+ return std::string(Path);
}
SmallString<128> P(getDriver().ResourceDir);
std::string CRTBasename =
diff --git a/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp b/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp
index a3eb9138b218..53cd169b0590 100644
--- a/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp
+++ b/contrib/llvm-project/clang/lib/Format/ContinuationIndenter.cpp
@@ -674,7 +674,13 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
// arguments to function calls. We do this by ensuring that either all
// arguments (including any lambdas) go on the same line as the function
// call, or we break before the first argument.
- auto PrevNonComment = Current.getPreviousNonComment();
+ const auto *Prev = Current.Previous;
+ if (!Prev)
+ return false;
+ // For example, `/*Newline=*/false`.
+ if (Prev->is(TT_BlockComment) && Current.SpacesRequiredBefore == 0)
+ return false;
+ const auto *PrevNonComment = Current.getPreviousNonComment();
if (!PrevNonComment || PrevNonComment->isNot(tok::l_paren))
return false;
if (Current.isOneOf(tok::comment, tok::l_paren, TT_LambdaLSquare))
diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
index 4d482e6543d6..c1f166248192 100644
--- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
+++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
@@ -3532,6 +3532,8 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const {
}
} else if (ClosingParen) {
for (auto *Tok = ClosingParen->Next; Tok; Tok = Tok->Next) {
+ if (Tok->is(TT_CtorInitializerColon))
+ break;
if (Tok->is(tok::arrow)) {
Tok->setType(TT_TrailingReturnArrow);
break;
@@ -5157,12 +5159,8 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
return true;
if (Left.IsUnterminatedLiteral)
return true;
- // FIXME: Breaking after newlines seems useful in general. Turn this into an
- // option and recognize more cases like endl etc, and break independent of
- // what comes after operator lessless.
- if (Right.is(tok::lessless) && Right.Next &&
- Right.Next->is(tok::string_literal) && Left.is(tok::string_literal) &&
- Left.TokenText.ends_with("\\n\"")) {
+ if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) &&
+ Right.Next->is(tok::string_literal)) {
return true;
}
if (Right.is(TT_RequiresClause)) {
diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
index 573919798870..f70affb732a0 100644
--- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
@@ -489,18 +489,23 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
};
SmallVector<StackEntry, 8> LBraceStack;
assert(Tok->is(tok::l_brace));
+
do {
- // Get next non-comment, non-preprocessor token.
FormatToken *NextTok;
do {
NextTok = Tokens->getNextToken();
} while (NextTok->is(tok::comment));
- while (NextTok->is(tok::hash) && !Line->InMacroBody) {
- NextTok = Tokens->getNextToken();
- do {
- NextTok = Tokens->getNextToken();
- } while (NextTok->is(tok::comment) ||
- (NextTok->NewlinesBefore == 0 && NextTok->isNot(tok::eof)));
+
+ if (!Line->InMacroBody) {
+ // Skip PPDirective lines and comments.
+ while (NextTok->is(tok::hash)) {
+ do {
+ NextTok = Tokens->getNextToken();
+ } while (NextTok->NewlinesBefore == 0 && NextTok->isNot(tok::eof));
+
+ while (NextTok->is(tok::comment))
+ NextTok = Tokens->getNextToken();
+ }
}
switch (Tok->Tok.getKind()) {
@@ -534,16 +539,6 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
if (Style.Language == FormatStyle::LK_Proto) {
ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square);
} else {
- // Skip NextTok over preprocessor lines, otherwise we may not
- // properly diagnose the block as a braced intializer
- // if the comma separator appears after the pp directive.
- while (NextTok->is(tok::hash)) {
- ScopedMacroState MacroState(*Line, Tokens, NextTok);
- do {
- NextTok = Tokens->getNextToken();
- } while (NextTok->isNot(tok::eof));
- }
-
// Using OriginalColumn to distinguish between ObjC methods and
// binary operators is a bit hacky.
bool NextIsObjCMethod = NextTok->isOneOf(tok::plus, tok::minus) &&
@@ -602,6 +597,16 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
NextTok = Tokens->getNextToken();
ProbablyBracedList = NextTok->isNot(tok::l_square);
}
+
+ // Cpp macro definition body that is a nonempty braced list or block:
+ if (Style.isCpp() && Line->InMacroBody && PrevTok != FormatTok &&
+ !FormatTok->Previous && NextTok->is(tok::eof) &&
+ // A statement can end with only `;` (simple statement), a block
+ // closing brace (compound statement), or `:` (label statement).
+ // If PrevTok is a block opening brace, Tok ends an empty block.
+ !PrevTok->isOneOf(tok::semi, BK_Block, tok::colon)) {
+ ProbablyBracedList = true;
+ }
}
if (ProbablyBracedList) {
Tok->setBlockKind(BK_BracedInit);
@@ -631,6 +636,7 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
default:
break;
}
+
PrevTok = Tok;
Tok = NextTok;
} while (Tok->isNot(tok::eof) && !LBraceStack.empty());
@@ -2504,6 +2510,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) {
assert(FormatTok->is(tok::l_paren) && "'(' expected.");
auto *LeftParen = FormatTok;
bool SeenEqual = false;
+ bool MightBeFoldExpr = false;
const bool MightBeStmtExpr = Tokens->peekNextToken()->is(tok::l_brace);
nextToken();
do {
@@ -2515,7 +2522,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) {
parseChildBlock();
break;
case tok::r_paren:
- if (!MightBeStmtExpr && !Line->InMacroBody &&
+ if (!MightBeStmtExpr && !MightBeFoldExpr && !Line->InMacroBody &&
Style.RemoveParentheses > FormatStyle::RPS_Leave) {
const auto *Prev = LeftParen->Previous;
const auto *Next = Tokens->peekNextToken();
@@ -2558,6 +2565,10 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) {
parseBracedList();
}
break;
+ case tok::ellipsis:
+ MightBeFoldExpr = true;
+ nextToken();
+ break;
case tok::equal:
SeenEqual = true;
if (Style.isCSharp() && FormatTok->is(TT_FatArrow))
diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp
index df84f97a8e8a..7525e6ee650b 100644
--- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp
+++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.cpp
@@ -1466,7 +1466,7 @@ WhitespaceManager::CellDescriptions WhitespaceManager::getCells(unsigned Start,
: Cell);
// Go to the next non-comment and ensure there is a break in front
const auto *NextNonComment = C.Tok->getNextNonComment();
- while (NextNonComment->is(tok::comma))
+ while (NextNonComment && NextNonComment->is(tok::comma))
NextNonComment = NextNonComment->getNextNonComment();
auto j = i;
while (Changes[j].Tok != NextNonComment && j < End)
diff --git a/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.cpp b/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.cpp
index 370bcbfee8b0..f5f32b9f3924 100644
--- a/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.cpp
+++ b/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.cpp
@@ -209,6 +209,10 @@ IncrementalParser::IncrementalParser(Interpreter &Interp,
if (Err)
return;
CI->ExecuteAction(*Act);
+
+ if (getCodeGen())
+ CachedInCodeGenModule = GenModule();
+
std::unique_ptr<ASTConsumer> IncrConsumer =
std::make_unique<IncrementalASTConsumer>(Interp, CI->takeASTConsumer());
CI->setASTConsumer(std::move(IncrConsumer));
@@ -224,11 +228,8 @@ IncrementalParser::IncrementalParser(Interpreter &Interp,
return; // PTU.takeError();
}
- if (CodeGenerator *CG = getCodeGen()) {
- std::unique_ptr<llvm::Module> M(CG->ReleaseModule());
- CG->StartModule("incr_module_" + std::to_string(PTUs.size()),
- M->getContext());
- PTU->TheModule = std::move(M);
+ if (getCodeGen()) {
+ PTU->TheModule = GenModule();
assert(PTU->TheModule && "Failed to create initial PTU");
}
}
@@ -364,6 +365,19 @@ IncrementalParser::Parse(llvm::StringRef input) {
std::unique_ptr<llvm::Module> IncrementalParser::GenModule() {
static unsigned ID = 0;
if (CodeGenerator *CG = getCodeGen()) {
+ // Clang's CodeGen is designed to work with a single llvm::Module. In many
+ // cases for convenience various CodeGen parts have a reference to the
+ // llvm::Module (TheModule or Module) which does not change when a new
+ // module is pushed. However, the execution engine wants to take ownership
+ // of the module which does not map well to CodeGen's design. To work this
+ // around we created an empty module to make CodeGen happy. We should make
+ // sure it always stays empty.
+ assert((!CachedInCodeGenModule ||
+ (CachedInCodeGenModule->empty() &&
+ CachedInCodeGenModule->global_empty() &&
+ CachedInCodeGenModule->alias_empty() &&
+ CachedInCodeGenModule->ifunc_empty())) &&
+ "CodeGen wrote to a readonly module");
std::unique_ptr<llvm::Module> M(CG->ReleaseModule());
CG->StartModule("incr_module_" + std::to_string(ID++), M->getContext());
return M;
diff --git a/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.h b/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.h
index e13b74c7f659..f63bce50acd3 100644
--- a/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.h
+++ b/contrib/llvm-project/clang/lib/Interpreter/IncrementalParser.h
@@ -24,6 +24,7 @@
#include <memory>
namespace llvm {
class LLVMContext;
+class Module;
} // namespace llvm
namespace clang {
@@ -57,6 +58,10 @@ protected:
/// of code.
std::list<PartialTranslationUnit> PTUs;
+ /// When CodeGen is created the first llvm::Module gets cached in many places
+ /// and we must keep it alive.
+ std::unique_ptr<llvm::Module> CachedInCodeGenModule;
+
IncrementalParser();
public:
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
index b619f5d729e8..a12a64939c46 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
@@ -2404,9 +2404,6 @@ struct ConvertConstructorToDeductionGuideTransform {
Args.addOuterRetainedLevel();
}
- if (NestedPattern)
- Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth());
-
FunctionProtoTypeLoc FPTL = CD->getTypeSourceInfo()->getTypeLoc()
.getAsAdjusted<FunctionProtoTypeLoc>();
assert(FPTL && "no prototype for constructor declaration");
@@ -2526,11 +2523,27 @@ private:
// -- The types of the function parameters are those of the constructor.
for (auto *OldParam : TL.getParams()) {
- ParmVarDecl *NewParam =
- transformFunctionTypeParam(OldParam, Args, MaterializedTypedefs);
- if (NestedPattern && NewParam)
+ ParmVarDecl *NewParam = OldParam;
+ // Given
+ // template <class T> struct C {
+ // template <class U> struct D {
+ // template <class V> D(U, V);
+ // };
+ // };
+ // First, transform all the references to template parameters that are
+ // defined outside of the surrounding class template. That is T in the
+ // above example.
+ if (NestedPattern) {
NewParam = transformFunctionTypeParam(NewParam, OuterInstantiationArgs,
MaterializedTypedefs);
+ if (!NewParam)
+ return QualType();
+ }
+ // Then, transform all the references to template parameters that are
+ // defined at the class template and the constructor. In this example,
+ // they're U and V, respectively.
+ NewParam =
+ transformFunctionTypeParam(NewParam, Args, MaterializedTypedefs);
if (!NewParam)
return QualType();
ParamTypes.push_back(NewParam->getType());
diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp
index 4edb671753bf..6362c82b009d 100644
--- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp
+++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/Taint.cpp
@@ -216,21 +216,17 @@ std::vector<SymbolRef> taint::getTaintedSymbolsImpl(ProgramStateRef State,
std::vector<SymbolRef> TaintedSymbols;
if (!Reg)
return TaintedSymbols;
- // Element region (array element) is tainted if either the base or the offset
- // are tainted.
+
+ // Element region (array element) is tainted if the offset is tainted.
if (const ElementRegion *ER = dyn_cast<ElementRegion>(Reg)) {
std::vector<SymbolRef> TaintedIndex =
getTaintedSymbolsImpl(State, ER->getIndex(), K, returnFirstOnly);
llvm::append_range(TaintedSymbols, TaintedIndex);
if (returnFirstOnly && !TaintedSymbols.empty())
return TaintedSymbols; // return early if needed
- std::vector<SymbolRef> TaintedSuperRegion =
- getTaintedSymbolsImpl(State, ER->getSuperRegion(), K, returnFirstOnly);
- llvm::append_range(TaintedSymbols, TaintedSuperRegion);
- if (returnFirstOnly && !TaintedSymbols.empty())
- return TaintedSymbols; // return early if needed
}
+ // Symbolic region is tainted if the corresponding symbol is tainted.
if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(Reg)) {
std::vector<SymbolRef> TaintedRegions =
getTaintedSymbolsImpl(State, SR->getSymbol(), K, returnFirstOnly);
@@ -239,6 +235,8 @@ std::vector<SymbolRef> taint::getTaintedSymbolsImpl(ProgramStateRef State,
return TaintedSymbols; // return early if needed
}
+ // Any subregion (including Element and Symbolic regions) is tainted if its
+ // super-region is tainted.
if (const SubRegion *ER = dyn_cast<SubRegion>(Reg)) {
std::vector<SymbolRef> TaintedSubRegions =
getTaintedSymbolsImpl(State, ER->getSuperRegion(), K, returnFirstOnly);
@@ -318,4 +316,4 @@ std::vector<SymbolRef> taint::getTaintedSymbolsImpl(ProgramStateRef State,
}
}
return TaintedSymbols;
-} \ No newline at end of file
+}
diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
index e5dd907c660d..b2947f590c4e 100644
--- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
+++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
@@ -205,8 +205,12 @@ void InvalidPtrChecker::postPreviousReturnInvalidatingCall(
CE, LCtx, CE->getType(), C.blockCount());
State = State->BindExpr(CE, LCtx, RetVal);
+ const auto *SymRegOfRetVal =
+ dyn_cast_or_null<SymbolicRegion>(RetVal.getAsRegion());
+ if (!SymRegOfRetVal)
+ return;
+
// Remember to this region.
- const auto *SymRegOfRetVal = cast<SymbolicRegion>(RetVal.getAsRegion());
const MemRegion *MR = SymRegOfRetVal->getBaseRegion();
State = State->set<PreviousCallResultMap>(FD, MR);
diff --git a/contrib/llvm-project/libcxx/modules/std.compat/cstdlib.inc b/contrib/llvm-project/libcxx/modules/std.compat/cstdlib.inc
index a45a0a1caf8b..4783cbf51623 100644
--- a/contrib/llvm-project/libcxx/modules/std.compat/cstdlib.inc
+++ b/contrib/llvm-project/libcxx/modules/std.compat/cstdlib.inc
@@ -25,7 +25,7 @@ export {
using ::system;
// [c.malloc], C library memory allocation
- using ::aligned_alloc;
+ using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
using ::calloc;
using ::free;
using ::malloc;
diff --git a/contrib/llvm-project/libcxx/src/atomic.cpp b/contrib/llvm-project/libcxx/src/atomic.cpp
index 2f0389ae6974..6b1f03c21bbc 100644
--- a/contrib/llvm-project/libcxx/src/atomic.cpp
+++ b/contrib/llvm-project/libcxx/src/atomic.cpp
@@ -25,16 +25,28 @@
# if !defined(SYS_futex) && defined(SYS_futex_time64)
# define SYS_futex SYS_futex_time64
# endif
+# define _LIBCPP_FUTEX(...) syscall(SYS_futex, __VA_ARGS__)
#elif defined(__FreeBSD__)
# include <sys/types.h>
# include <sys/umtx.h>
+# define _LIBCPP_FUTEX(...) syscall(SYS_futex, __VA_ARGS__)
+
+#elif defined(__OpenBSD__)
+
+# include <sys/futex.h>
+
+// OpenBSD has no indirect syscalls
+# define _LIBCPP_FUTEX(...) futex(__VA_ARGS__)
+
#else // <- Add other operating systems here
// Baseline needs no new headers
+# define _LIBCPP_FUTEX(...) syscall(SYS_futex, __VA_ARGS__)
+
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -44,11 +56,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
static void
__libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) {
static constexpr timespec __timeout = {2, 0};
- syscall(SYS_futex, __ptr, FUTEX_WAIT_PRIVATE, __val, &__timeout, 0, 0);
+ _LIBCPP_FUTEX(__ptr, FUTEX_WAIT_PRIVATE, __val, &__timeout, 0, 0);
}
static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr, bool __notify_one) {
- syscall(SYS_futex, __ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0);
+ _LIBCPP_FUTEX(__ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0);
}
#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK)
diff --git a/contrib/llvm-project/libcxx/src/chrono.cpp b/contrib/llvm-project/libcxx/src/chrono.cpp
index c5e827c0cb59..e7d6dfbc2292 100644
--- a/contrib/llvm-project/libcxx/src/chrono.cpp
+++ b/contrib/llvm-project/libcxx/src/chrono.cpp
@@ -31,7 +31,9 @@
# include <sys/time.h> // for gettimeofday and timeval
#endif
-#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
+// OpenBSD does not have a fully conformant suite of POSIX timers, but
+// it does have clock_gettime and CLOCK_MONOTONIC which is all we need.
+#if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
# define _LIBCPP_HAS_CLOCK_GETTIME
#endif
diff --git a/contrib/llvm-project/lld/ELF/Relocations.cpp b/contrib/llvm-project/lld/ELF/Relocations.cpp
index 619fbaf5dc54..92a1b9baaca3 100644
--- a/contrib/llvm-project/lld/ELF/Relocations.cpp
+++ b/contrib/llvm-project/lld/ELF/Relocations.cpp
@@ -1480,7 +1480,10 @@ template <class ELFT, class RelTy> void RelocationScanner::scanOne(RelTy *&i) {
// Process TLS relocations, including TLS optimizations. Note that
// R_TPREL and R_TPREL_NEG relocations are resolved in processAux.
- if (sym.isTls()) {
+ //
+ // Some RISCV TLSDESC relocations reference a local NOTYPE symbol,
+ // but we need to process them in handleTlsRelocation.
+ if (sym.isTls() || oneof<R_TLSDESC_PC, R_TLSDESC_CALL>(expr)) {
if (unsigned processed =
handleTlsRelocation(type, sym, *sec, offset, addend, expr)) {
i += processed - 1;
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
index 0f20a33f3a75..7990997835d0 100644
--- a/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
@@ -35,11 +35,23 @@ struct LegalityQuery;
class MachineRegisterInfo;
namespace GISelAddressing {
/// Helper struct to store a base, index and offset that forms an address
-struct BaseIndexOffset {
+class BaseIndexOffset {
+private:
Register BaseReg;
Register IndexReg;
- int64_t Offset = 0;
- bool IsIndexSignExt = false;
+ std::optional<int64_t> Offset;
+
+public:
+ BaseIndexOffset() = default;
+ Register getBase() { return BaseReg; }
+ Register getBase() const { return BaseReg; }
+ Register getIndex() { return IndexReg; }
+ Register getIndex() const { return IndexReg; }
+ void setBase(Register NewBase) { BaseReg = NewBase; }
+ void setIndex(Register NewIndex) { IndexReg = NewIndex; }
+ void setOffset(std::optional<int64_t> NewOff) { Offset = NewOff; }
+ bool hasValidOffset() const { return Offset.has_value(); }
+ int64_t getOffset() const { return *Offset; }
};
/// Returns a BaseIndexOffset which describes the pointer in \p Ptr.
@@ -89,7 +101,7 @@ private:
// order stores are writing to incremeneting consecutive addresses. So when
// we walk the block in reverse order, the next eligible store must write to
// an offset one store width lower than CurrentLowestOffset.
- uint64_t CurrentLowestOffset;
+ int64_t CurrentLowestOffset;
SmallVector<GStore *> Stores;
// A vector of MachineInstr/unsigned pairs to denote potential aliases that
// need to be checked before the candidate is considered safe to merge. The
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/MachineFrameInfo.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/MachineFrameInfo.h
index 7d11d63d4066..c35faac09c4d 100644
--- a/contrib/llvm-project/llvm/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/MachineFrameInfo.h
@@ -697,6 +697,13 @@ public:
return Objects[ObjectIdx+NumFixedObjects].isAliased;
}
+ /// Set "maybe pointed to by an LLVM IR value" for an object.
+ void setIsAliasedObjectIndex(int ObjectIdx, bool IsAliased) {
+ assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
+ "Invalid Object Idx!");
+ Objects[ObjectIdx+NumFixedObjects].isAliased = IsAliased;
+ }
+
/// Returns true if the specified index corresponds to an immutable object.
bool isImmutableObjectIndex(int ObjectIdx) const {
// Tail calling functions can clobber their function arguments.
diff --git a/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp b/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
index 72b6dfa181e8..8dcffe45c644 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -4322,6 +4322,10 @@ static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
if (match(I, m_Intrinsic<Intrinsic::is_constant>()))
return nullptr;
+ // Don't simplify freeze.
+ if (isa<FreezeInst>(I))
+ return nullptr;
+
// Replace Op with RepOp in instruction operands.
SmallVector<Value *, 8> NewOps;
bool AnyReplaced = false;
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 8ee1f19e083e..1cca56fc19cf 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -8154,6 +8154,7 @@ static bool optimizeBranch(BranchInst *Branch, const TargetLowering &TLI,
IRBuilder<> Builder(Branch);
if (UI->getParent() != Branch->getParent())
UI->moveBefore(Branch);
+ UI->dropPoisonGeneratingFlags();
Value *NewCmp = Builder.CreateCmp(ICmpInst::ICMP_EQ, UI,
ConstantInt::get(UI->getType(), 0));
LLVM_DEBUG(dbgs() << "Converting " << *Cmp << "\n");
@@ -8167,6 +8168,7 @@ static bool optimizeBranch(BranchInst *Branch, const TargetLowering &TLI,
IRBuilder<> Builder(Branch);
if (UI->getParent() != Branch->getParent())
UI->moveBefore(Branch);
+ UI->dropPoisonGeneratingFlags();
Value *NewCmp = Builder.CreateCmp(Cmp->getPredicate(), UI,
ConstantInt::get(UI->getType(), 0));
LLVM_DEBUG(dbgs() << "Converting " << *Cmp << "\n");
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index 772229215e79..61ddc858ba44 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
@@ -591,8 +591,8 @@ bool CombinerHelper::matchCombineExtendingLoads(MachineInstr &MI,
UseMI.getOpcode() == TargetOpcode::G_ZEXT ||
(UseMI.getOpcode() == TargetOpcode::G_ANYEXT)) {
const auto &MMO = LoadMI->getMMO();
- // For atomics, only form anyextending loads.
- if (MMO.isAtomic() && UseMI.getOpcode() != TargetOpcode::G_ANYEXT)
+ // Don't do anything for atomics.
+ if (MMO.isAtomic())
continue;
// Check for legality.
if (!isPreLegalize()) {
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index c0c22e36004f..47d045ac4817 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -4180,6 +4180,10 @@ LegalizerHelper::fewerElementsVectorPhi(GenericMachineInstr &MI,
}
}
+ // Set the insert point after the existing PHIs
+ MachineBasicBlock &MBB = *MI.getParent();
+ MIRBuilder.setInsertPt(MBB, MBB.getFirstNonPHI());
+
// Merge small outputs into MI's def.
if (NumLeftovers) {
mergeMixedSubvectors(MI.getReg(0), OutputRegs);
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp b/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
index 246aa88b09ac..ee499c41c558 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
@@ -84,21 +84,20 @@ BaseIndexOffset GISelAddressing::getPointerInfo(Register Ptr,
MachineRegisterInfo &MRI) {
BaseIndexOffset Info;
Register PtrAddRHS;
- if (!mi_match(Ptr, MRI, m_GPtrAdd(m_Reg(Info.BaseReg), m_Reg(PtrAddRHS)))) {
- Info.BaseReg = Ptr;
- Info.IndexReg = Register();
- Info.IsIndexSignExt = false;
+ Register BaseReg;
+ if (!mi_match(Ptr, MRI, m_GPtrAdd(m_Reg(BaseReg), m_Reg(PtrAddRHS)))) {
+ Info.setBase(Ptr);
+ Info.setOffset(0);
return Info;
}
-
+ Info.setBase(BaseReg);
auto RHSCst = getIConstantVRegValWithLookThrough(PtrAddRHS, MRI);
if (RHSCst)
- Info.Offset = RHSCst->Value.getSExtValue();
+ Info.setOffset(RHSCst->Value.getSExtValue());
// Just recognize a simple case for now. In future we'll need to match
// indexing patterns for base + index + constant.
- Info.IndexReg = PtrAddRHS;
- Info.IsIndexSignExt = false;
+ Info.setIndex(PtrAddRHS);
return Info;
}
@@ -114,15 +113,16 @@ bool GISelAddressing::aliasIsKnownForLoadStore(const MachineInstr &MI1,
BaseIndexOffset BasePtr0 = getPointerInfo(LdSt1->getPointerReg(), MRI);
BaseIndexOffset BasePtr1 = getPointerInfo(LdSt2->getPointerReg(), MRI);
- if (!BasePtr0.BaseReg.isValid() || !BasePtr1.BaseReg.isValid())
+ if (!BasePtr0.getBase().isValid() || !BasePtr1.getBase().isValid())
return false;
int64_t Size1 = LdSt1->getMemSize();
int64_t Size2 = LdSt2->getMemSize();
int64_t PtrDiff;
- if (BasePtr0.BaseReg == BasePtr1.BaseReg) {
- PtrDiff = BasePtr1.Offset - BasePtr0.Offset;
+ if (BasePtr0.getBase() == BasePtr1.getBase() && BasePtr0.hasValidOffset() &&
+ BasePtr1.hasValidOffset()) {
+ PtrDiff = BasePtr1.getOffset() - BasePtr0.getOffset();
// If the size of memory access is unknown, do not use it to do analysis.
// One example of unknown size memory access is to load/store scalable
// vector objects on the stack.
@@ -151,8 +151,8 @@ bool GISelAddressing::aliasIsKnownForLoadStore(const MachineInstr &MI1,
// able to calculate their relative offset if at least one arises
// from an alloca. However, these allocas cannot overlap and we
// can infer there is no alias.
- auto *Base0Def = getDefIgnoringCopies(BasePtr0.BaseReg, MRI);
- auto *Base1Def = getDefIgnoringCopies(BasePtr1.BaseReg, MRI);
+ auto *Base0Def = getDefIgnoringCopies(BasePtr0.getBase(), MRI);
+ auto *Base1Def = getDefIgnoringCopies(BasePtr1.getBase(), MRI);
if (!Base0Def || !Base1Def)
return false; // Couldn't tell anything.
@@ -520,16 +520,20 @@ bool LoadStoreOpt::addStoreToCandidate(GStore &StoreMI,
Register StoreAddr = StoreMI.getPointerReg();
auto BIO = getPointerInfo(StoreAddr, *MRI);
- Register StoreBase = BIO.BaseReg;
- uint64_t StoreOffCst = BIO.Offset;
+ Register StoreBase = BIO.getBase();
if (C.Stores.empty()) {
+ C.BasePtr = StoreBase;
+ if (!BIO.hasValidOffset()) {
+ C.CurrentLowestOffset = 0;
+ } else {
+ C.CurrentLowestOffset = BIO.getOffset();
+ }
// This is the first store of the candidate.
// If the offset can't possibly allow for a lower addressed store with the
// same base, don't bother adding it.
- if (StoreOffCst < ValueTy.getSizeInBytes())
+ if (BIO.hasValidOffset() &&
+ BIO.getOffset() < static_cast<int64_t>(ValueTy.getSizeInBytes()))
return false;
- C.BasePtr = StoreBase;
- C.CurrentLowestOffset = StoreOffCst;
C.Stores.emplace_back(&StoreMI);
LLVM_DEBUG(dbgs() << "Starting a new merge candidate group with: "
<< StoreMI);
@@ -549,8 +553,12 @@ bool LoadStoreOpt::addStoreToCandidate(GStore &StoreMI,
// writes to the next lowest adjacent address.
if (C.BasePtr != StoreBase)
return false;
- if ((C.CurrentLowestOffset - ValueTy.getSizeInBytes()) !=
- static_cast<uint64_t>(StoreOffCst))
+ // If we don't have a valid offset, we can't guarantee to be an adjacent
+ // offset.
+ if (!BIO.hasValidOffset())
+ return false;
+ if ((C.CurrentLowestOffset -
+ static_cast<int64_t>(ValueTy.getSizeInBytes())) != BIO.getOffset())
return false;
// This writes to an adjacent address. Allow it.
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/contrib/llvm-project/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
index f2d5c3c867c2..bbb0b654dc67 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
@@ -877,6 +877,9 @@ public:
if (LI->isAtomic())
return false;
+ if (!DL.typeSizeEqualsStoreSize(Result.VTy->getElementType()))
+ return false;
+
// Get the base polynomial
computePolynomialFromPointer(*LI->getPointerOperand(), Offset, BasePtr, DL);
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index e806e0f0731f..5038f8a1fc15 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -9636,8 +9636,15 @@ static SDValue combineShiftOfShiftedLogic(SDNode *Shift, SelectionDAG &DAG) {
if (ShiftAmtVal->getBitWidth() != C1Val.getBitWidth())
return false;
+ // The fold is not valid if the sum of the shift values doesn't fit in the
+ // given shift amount type.
+ bool Overflow = false;
+ APInt NewShiftAmt = C1Val.uadd_ov(*ShiftAmtVal, Overflow);
+ if (Overflow)
+ return false;
+
// The fold is not valid if the sum of the shift values exceeds bitwidth.
- if ((*ShiftAmtVal + C1Val).uge(V.getScalarValueSizeInBits()))
+ if (NewShiftAmt.uge(V.getScalarValueSizeInBits()))
return false;
return true;
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 5ce1013f30fd..7406a8ac1611 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -10888,7 +10888,7 @@ static void tryToElideArgumentCopy(
}
// Perform the elision. Delete the old stack object and replace its only use
- // in the variable info map. Mark the stack object as mutable.
+ // in the variable info map. Mark the stack object as mutable and aliased.
LLVM_DEBUG({
dbgs() << "Eliding argument copy from " << Arg << " to " << *AI << '\n'
<< " Replacing frame index " << OldIndex << " with " << FixedIndex
@@ -10896,6 +10896,7 @@ static void tryToElideArgumentCopy(
});
MFI.RemoveStackObject(OldIndex);
MFI.setIsImmutableObjectIndex(FixedIndex, false);
+ MFI.setIsAliasedObjectIndex(FixedIndex, true);
AllocaIndex = FixedIndex;
ArgCopyElisionFrameIndexMap.insert({OldIndex, FixedIndex});
for (SDValue ArgVal : ArgVals)
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
index 55c5bbc66a3f..862aefe46193 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
@@ -181,13 +181,14 @@ void AArch64Arm64ECCallLowering::getThunkArgTypes(
}
for (unsigned E = FT->getNumParams(); I != E; ++I) {
- Align ParamAlign = AttrList.getParamAlignment(I).valueOrOne();
#if 0
// FIXME: Need more information about argument size; see
// https://reviews.llvm.org/D132926
uint64_t ArgSizeBytes = AttrList.getParamArm64ECArgSizeBytes(I);
+ Align ParamAlign = AttrList.getParamAlignment(I).valueOrOne();
#else
uint64_t ArgSizeBytes = 0;
+ Align ParamAlign = Align();
#endif
Type *Arm64Ty, *X64Ty;
canonicalizeThunkType(FT->getParamType(I), ParamAlign,
@@ -297,7 +298,7 @@ void AArch64Arm64ECCallLowering::canonicalizeThunkType(
uint64_t TotalSizeBytes = ElementCnt * ElementSizePerBytes;
if (ElementTy->isFloatTy() || ElementTy->isDoubleTy()) {
Out << (ElementTy->isFloatTy() ? "F" : "D") << TotalSizeBytes;
- if (Alignment.value() >= 8 && !T->isPointerTy())
+ if (Alignment.value() >= 16 && !Ret)
Out << "a" << Alignment.value();
Arm64Ty = T;
if (TotalSizeBytes <= 8) {
@@ -328,7 +329,7 @@ void AArch64Arm64ECCallLowering::canonicalizeThunkType(
Out << "m";
if (TypeSize != 4)
Out << TypeSize;
- if (Alignment.value() >= 8 && !T->isPointerTy())
+ if (Alignment.value() >= 16 && !Ret)
Out << "a" << Alignment.value();
// FIXME: Try to canonicalize Arm64Ty more thoroughly?
Arm64Ty = T;
@@ -513,7 +514,14 @@ Function *AArch64Arm64ECCallLowering::buildEntryThunk(Function *F) {
// Call the function passed to the thunk.
Value *Callee = Thunk->getArg(0);
Callee = IRB.CreateBitCast(Callee, PtrTy);
- Value *Call = IRB.CreateCall(Arm64Ty, Callee, Args);
+ CallInst *Call = IRB.CreateCall(Arm64Ty, Callee, Args);
+
+ auto SRetAttr = F->getAttributes().getParamAttr(0, Attribute::StructRet);
+ auto InRegAttr = F->getAttributes().getParamAttr(0, Attribute::InReg);
+ if (SRetAttr.isValid() && !InRegAttr.isValid()) {
+ Thunk->addParamAttr(1, SRetAttr);
+ Call->addParamAttr(0, SRetAttr);
+ }
Value *RetVal = Call;
if (TransformDirectToSRet) {
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 95d8ab95b2c0..bcfd0253e73c 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -22122,7 +22122,8 @@ SDValue performCONDCombine(SDNode *N,
SDNode *SubsNode = N->getOperand(CmpIndex).getNode();
unsigned CondOpcode = SubsNode->getOpcode();
- if (CondOpcode != AArch64ISD::SUBS || SubsNode->hasAnyUseOfValue(0))
+ if (CondOpcode != AArch64ISD::SUBS || SubsNode->hasAnyUseOfValue(0) ||
+ !SubsNode->hasOneUse())
return SDValue();
// There is a SUBS feeding this condition. Is it fed by a mask we can
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td
index 03baa7497615..ac61dd8745d4 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td
@@ -4885,19 +4885,9 @@ defm UABDL : SIMDLongThreeVectorBHSabdl<1, 0b0111, "uabdl",
def : Pat<(abs (v8i16 (sub (zext (v8i8 V64:$opA)),
(zext (v8i8 V64:$opB))))),
(UABDLv8i8_v8i16 V64:$opA, V64:$opB)>;
-def : Pat<(xor (v8i16 (AArch64vashr v8i16:$src, (i32 15))),
- (v8i16 (add (sub (zext (v8i8 V64:$opA)),
- (zext (v8i8 V64:$opB))),
- (AArch64vashr v8i16:$src, (i32 15))))),
- (UABDLv8i8_v8i16 V64:$opA, V64:$opB)>;
def : Pat<(abs (v8i16 (sub (zext (extract_high_v16i8 (v16i8 V128:$opA))),
(zext (extract_high_v16i8 (v16i8 V128:$opB)))))),
(UABDLv16i8_v8i16 V128:$opA, V128:$opB)>;
-def : Pat<(xor (v8i16 (AArch64vashr v8i16:$src, (i32 15))),
- (v8i16 (add (sub (zext (extract_high_v16i8 (v16i8 V128:$opA))),
- (zext (extract_high_v16i8 (v16i8 V128:$opB)))),
- (AArch64vashr v8i16:$src, (i32 15))))),
- (UABDLv16i8_v8i16 V128:$opA, V128:$opB)>;
def : Pat<(abs (v4i32 (sub (zext (v4i16 V64:$opA)),
(zext (v4i16 V64:$opB))))),
(UABDLv4i16_v4i32 V64:$opA, V64:$opB)>;
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp
index 92db89cc0915..80fe4bcb8b58 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp
@@ -147,6 +147,12 @@ void AArch64GISelUtils::changeFCMPPredToAArch64CC(
case CmpInst::FCMP_UNE:
CondCode = AArch64CC::NE;
break;
+ case CmpInst::FCMP_TRUE:
+ CondCode = AArch64CC::AL;
+ break;
+ case CmpInst::FCMP_FALSE:
+ CondCode = AArch64CC::NV;
+ break;
}
}
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
index 4b9d549e7911..de3c89e925a2 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
@@ -877,6 +877,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
getActionDefinitionsBuilder(G_INSERT_VECTOR_ELT)
.legalIf(typeInSet(0, {v16s8, v8s8, v8s16, v4s16, v4s32, v2s32, v2s64}))
+ .moreElementsToNextPow2(0)
.widenVectorEltsToVectorMinSize(0, 64);
getActionDefinitionsBuilder(G_BUILD_VECTOR)
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
index b8e5e7bbdaba..06cdd7e4ef48 100644
--- a/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
@@ -623,8 +623,11 @@ bool AArch64RegisterBankInfo::isLoadFromFPType(const MachineInstr &MI) const {
EltTy = GV->getValueType();
// Look at the first element of the struct to determine the type we are
// loading
- while (StructType *StructEltTy = dyn_cast<StructType>(EltTy))
+ while (StructType *StructEltTy = dyn_cast<StructType>(EltTy)) {
+ if (StructEltTy->getNumElements() == 0)
+ break;
EltTy = StructEltTy->getTypeAtIndex(0U);
+ }
// Look at the first element of the array to determine its type
if (isa<ArrayType>(EltTy))
EltTy = EltTy->getArrayElementType();
diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 6ecb1c8bf6e1..7a3198612f86 100644
--- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1832,7 +1832,7 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(MachineInstr &MI,
// not, we need to ensure the subtarget is capable of backing off barrier
// instructions in case there are any outstanding memory operations that may
// cause an exception. Otherwise, insert an explicit S_WAITCNT 0 here.
- if (MI.getOpcode() == AMDGPU::S_BARRIER &&
+ if (TII->isBarrierStart(MI.getOpcode()) &&
!ST->hasAutoWaitcntBeforeBarrier() && !ST->supportsBackOffBarrier()) {
Wait = Wait.combined(
AMDGPU::Waitcnt::allZero(ST->hasExtendedWaitCounts(), ST->hasVscnt()));
diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.h b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.h
index 1c9dacc09f81..626d903c0c69 100644
--- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.h
+++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIInstrInfo.h
@@ -908,6 +908,17 @@ public:
return MI.getDesc().TSFlags & SIInstrFlags::IsNeverUniform;
}
+ // Check to see if opcode is for a barrier start. Pre gfx12 this is just the
+ // S_BARRIER, but after support for S_BARRIER_SIGNAL* / S_BARRIER_WAIT we want
+ // to check for the barrier start (S_BARRIER_SIGNAL*)
+ bool isBarrierStart(unsigned Opcode) const {
+ return Opcode == AMDGPU::S_BARRIER ||
+ Opcode == AMDGPU::S_BARRIER_SIGNAL_M0 ||
+ Opcode == AMDGPU::S_BARRIER_SIGNAL_ISFIRST_M0 ||
+ Opcode == AMDGPU::S_BARRIER_SIGNAL_IMM ||
+ Opcode == AMDGPU::S_BARRIER_SIGNAL_ISFIRST_IMM;
+ }
+
static bool doesNotReadTiedSource(const MachineInstr &MI) {
return MI.getDesc().TSFlags & SIInstrFlags::TiedSourceNotRead;
}
diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
index 84b9330ef963..50d8bfa87508 100644
--- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
@@ -2358,6 +2358,11 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal(
bool Changed = false;
+ if (IsNonTemporal) {
+ // Set non-temporal hint for all cache levels.
+ Changed |= setTH(MI, AMDGPU::CPol::TH_NT);
+ }
+
if (IsVolatile) {
Changed |= setScope(MI, AMDGPU::CPol::SCOPE_SYS);
@@ -2370,11 +2375,6 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal(
Position::AFTER);
}
- if (IsNonTemporal) {
- // Set non-temporal hint for all cache levels.
- Changed |= setTH(MI, AMDGPU::CPol::TH_NT);
- }
-
return Changed;
}
diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SOPInstructions.td b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SOPInstructions.td
index ae5ef0541929..5762efde73f0 100644
--- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/SOPInstructions.td
+++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/SOPInstructions.td
@@ -1786,7 +1786,7 @@ def : GCNPat<
let SubtargetPredicate = isNotGFX12Plus in
def : GCNPat <(int_amdgcn_s_wait_event_export_ready), (S_WAIT_EVENT (i16 0))>;
let SubtargetPredicate = isGFX12Plus in
- def : GCNPat <(int_amdgcn_s_wait_event_export_ready), (S_WAIT_EVENT (i16 1))>;
+ def : GCNPat <(int_amdgcn_s_wait_event_export_ready), (S_WAIT_EVENT (i16 2))>;
// The first 10 bits of the mode register are the core FP mode on all
// subtargets.
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
index d9465e86d896..ebd876d50c44 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
@@ -23,6 +23,7 @@
#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Pass.h"
@@ -116,9 +117,20 @@ private:
// sure that they can be replaced.
static bool hasReplaceableUsers(GlobalVariable &GV) {
for (User *CurrentUser : GV.users()) {
- // Instruction users are always valid.
- if (isa<Instruction>(CurrentUser))
+ if (auto *I = dyn_cast<Instruction>(CurrentUser)) {
+ // Do not merge globals in exception pads.
+ if (I->isEHPad())
+ return false;
+
+ if (auto *II = dyn_cast<IntrinsicInst>(I)) {
+ // Some intrinsics require a plain global.
+ if (II->getIntrinsicID() == Intrinsic::eh_typeid_for)
+ return false;
+ }
+
+ // Other instruction users are always valid.
continue;
+ }
// We cannot replace GlobalValue users because they are not just nodes
// in IR. To replace a user like this we would need to create a new
@@ -302,14 +314,6 @@ void PPCMergeStringPool::replaceUsesWithGEP(GlobalVariable *GlobalToReplace,
Users.push_back(CurrentUser);
for (User *CurrentUser : Users) {
- Instruction *UserInstruction = dyn_cast<Instruction>(CurrentUser);
- Constant *UserConstant = dyn_cast<Constant>(CurrentUser);
-
- // At this point we expect that the user is either an instruction or a
- // constant.
- assert((UserConstant || UserInstruction) &&
- "Expected the user to be an instruction or a constant.");
-
// The user was not found so it must have been replaced earlier.
if (!userHasOperand(CurrentUser, GlobalToReplace))
continue;
@@ -318,38 +322,13 @@ void PPCMergeStringPool::replaceUsesWithGEP(GlobalVariable *GlobalToReplace,
if (isa<GlobalValue>(CurrentUser))
continue;
- if (!UserInstruction) {
- // User is a constant type.
- Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr(
- PooledStructType, GPool, Indices);
- UserConstant->handleOperandChange(GlobalToReplace, ConstGEP);
- continue;
- }
-
- if (PHINode *UserPHI = dyn_cast<PHINode>(UserInstruction)) {
- // GEP instructions cannot be added before PHI nodes.
- // With getInBoundsGetElementPtr we create the GEP and then replace it
- // inline into the PHI.
- Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr(
- PooledStructType, GPool, Indices);
- UserPHI->replaceUsesOfWith(GlobalToReplace, ConstGEP);
- continue;
- }
- // The user is a valid instruction that is not a PHINode.
- GetElementPtrInst *GEPInst =
- GetElementPtrInst::Create(PooledStructType, GPool, Indices);
- GEPInst->insertBefore(UserInstruction);
-
- LLVM_DEBUG(dbgs() << "Inserting GEP before:\n");
- LLVM_DEBUG(UserInstruction->dump());
-
+ Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr(
+ PooledStructType, GPool, Indices);
LLVM_DEBUG(dbgs() << "Replacing this global:\n");
LLVM_DEBUG(GlobalToReplace->dump());
LLVM_DEBUG(dbgs() << "with this:\n");
- LLVM_DEBUG(GEPInst->dump());
-
- // After the GEP is inserted the GV can be replaced.
- CurrentUser->replaceUsesOfWith(GlobalToReplace, GEPInst);
+ LLVM_DEBUG(ConstGEP->dump());
+ GlobalToReplace->replaceAllUsesWith(ConstGEP);
}
}
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
index 961b8f0afe22..cdf7c048a4bf 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
@@ -31,12 +31,13 @@ using namespace llvm;
// This part is for ELF object output.
RISCVTargetELFStreamer::RISCVTargetELFStreamer(MCStreamer &S,
const MCSubtargetInfo &STI)
- : RISCVTargetStreamer(S), CurrentVendor("riscv"), STI(STI) {
+ : RISCVTargetStreamer(S), CurrentVendor("riscv") {
MCAssembler &MCA = getStreamer().getAssembler();
const FeatureBitset &Features = STI.getFeatureBits();
auto &MAB = static_cast<RISCVAsmBackend &>(MCA.getBackend());
setTargetABI(RISCVABI::computeTargetABI(STI.getTargetTriple(), Features,
MAB.getTargetOptions().getABIName()));
+ setFlagsFromFeatures(STI);
// `j label` in `.option norelax; j label; .option relax; ...; label:` needs a
// relocation to ensure the jump target is correct after linking. This is due
// to a limitation that shouldForceRelocation has to make the decision upfront
@@ -87,14 +88,13 @@ void RISCVTargetELFStreamer::finishAttributeSection() {
void RISCVTargetELFStreamer::finish() {
RISCVTargetStreamer::finish();
MCAssembler &MCA = getStreamer().getAssembler();
- const FeatureBitset &Features = STI.getFeatureBits();
RISCVABI::ABI ABI = getTargetABI();
unsigned EFlags = MCA.getELFHeaderEFlags();
- if (Features[RISCV::FeatureStdExtC])
+ if (hasRVC())
EFlags |= ELF::EF_RISCV_RVC;
- if (Features[RISCV::FeatureStdExtZtso])
+ if (hasTSO())
EFlags |= ELF::EF_RISCV_TSO;
switch (ABI) {
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
index a6f54bf67b5d..e8f29cd8449b 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
@@ -46,7 +46,6 @@ private:
StringRef CurrentVendor;
MCSection *AttributeSection = nullptr;
- const MCSubtargetInfo &STI;
void emitAttribute(unsigned Attribute, unsigned Value) override;
void emitTextAttribute(unsigned Attribute, StringRef String) override;
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
index 254a9a4bc0ef..b8e0f3a867f4 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
@@ -207,8 +207,6 @@ void RISCVMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const {
case VK_RISCV_TLS_GOT_HI:
case VK_RISCV_TLS_GD_HI:
case VK_RISCV_TLSDESC_HI:
- case VK_RISCV_TLSDESC_ADD_LO:
- case VK_RISCV_TLSDESC_LOAD_LO:
break;
}
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
index ac4861bf113e..eee78a8c161f 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
@@ -48,6 +48,11 @@ void RISCVTargetStreamer::setTargetABI(RISCVABI::ABI ABI) {
TargetABI = ABI;
}
+void RISCVTargetStreamer::setFlagsFromFeatures(const MCSubtargetInfo &STI) {
+ HasRVC = STI.hasFeature(RISCV::FeatureStdExtC);
+ HasTSO = STI.hasFeature(RISCV::FeatureStdExtZtso);
+}
+
void RISCVTargetStreamer::emitTargetAttributes(const MCSubtargetInfo &STI,
bool EmitStackAlign) {
if (EmitStackAlign) {
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
index 070e72fb157a..cb8bc21cb635 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
@@ -33,6 +33,8 @@ struct RISCVOptionArchArg {
class RISCVTargetStreamer : public MCTargetStreamer {
RISCVABI::ABI TargetABI = RISCVABI::ABI_Unknown;
+ bool HasRVC = false;
+ bool HasTSO = false;
public:
RISCVTargetStreamer(MCStreamer &S);
@@ -58,6 +60,9 @@ public:
void emitTargetAttributes(const MCSubtargetInfo &STI, bool EmitStackAlign);
void setTargetABI(RISCVABI::ABI ABI);
RISCVABI::ABI getTargetABI() const { return TargetABI; }
+ void setFlagsFromFeatures(const MCSubtargetInfo &STI);
+ bool hasRVC() const { return HasRVC; }
+ bool hasTSO() const { return HasTSO; }
};
// This part is for ascii assembly output
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
index b2e9cd87373b..87bd9b4048cd 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
@@ -100,7 +100,7 @@ public:
bool emitDirectiveOptionArch();
private:
- void emitAttributes();
+ void emitAttributes(const MCSubtargetInfo &SubtargetInfo);
void emitNTLHint(const MachineInstr *MI);
@@ -385,8 +385,32 @@ void RISCVAsmPrinter::emitStartOfAsmFile(Module &M) {
if (const MDString *ModuleTargetABI =
dyn_cast_or_null<MDString>(M.getModuleFlag("target-abi")))
RTS.setTargetABI(RISCVABI::getTargetABI(ModuleTargetABI->getString()));
+
+ MCSubtargetInfo SubtargetInfo = *TM.getMCSubtargetInfo();
+
+ // Use module flag to update feature bits.
+ if (auto *MD = dyn_cast_or_null<MDNode>(M.getModuleFlag("riscv-isa"))) {
+ for (auto &ISA : MD->operands()) {
+ if (auto *ISAString = dyn_cast_or_null<MDString>(ISA)) {
+ auto ParseResult = llvm::RISCVISAInfo::parseArchString(
+ ISAString->getString(), /*EnableExperimentalExtension=*/true,
+ /*ExperimentalExtensionVersionCheck=*/true);
+ if (!errorToBool(ParseResult.takeError())) {
+ auto &ISAInfo = *ParseResult;
+ for (const auto &Feature : RISCVFeatureKV) {
+ if (ISAInfo->hasExtension(Feature.Key) &&
+ !SubtargetInfo.hasFeature(Feature.Value))
+ SubtargetInfo.ToggleFeature(Feature.Key);
+ }
+ }
+ }
+ }
+
+ RTS.setFlagsFromFeatures(SubtargetInfo);
+ }
+
if (TM.getTargetTriple().isOSBinFormatELF())
- emitAttributes();
+ emitAttributes(SubtargetInfo);
}
void RISCVAsmPrinter::emitEndOfAsmFile(Module &M) {
@@ -398,13 +422,13 @@ void RISCVAsmPrinter::emitEndOfAsmFile(Module &M) {
EmitHwasanMemaccessSymbols(M);
}
-void RISCVAsmPrinter::emitAttributes() {
+void RISCVAsmPrinter::emitAttributes(const MCSubtargetInfo &SubtargetInfo) {
RISCVTargetStreamer &RTS =
static_cast<RISCVTargetStreamer &>(*OutStreamer->getTargetStreamer());
// Use MCSubtargetInfo from TargetMachine. Individual functions may have
// attributes that differ from other functions in the module and we have no
// way to know which function is correct.
- RTS.emitTargetAttributes(*TM.getMCSubtargetInfo(), /*EmitStackAlign*/ true);
+ RTS.emitTargetAttributes(SubtargetInfo, /*EmitStackAlign*/ true);
}
void RISCVAsmPrinter::emitFunctionEntryLabel() {
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
index 0a314fdd41cb..89207640ee54 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
@@ -317,8 +317,9 @@ bool RISCVExpandPseudo::expandRV32ZdinxStore(MachineBasicBlock &MBB,
.addReg(MBBI->getOperand(1).getReg())
.add(MBBI->getOperand(2));
if (MBBI->getOperand(2).isGlobal() || MBBI->getOperand(2).isCPI()) {
- // FIXME: Zdinx RV32 can not work on unaligned memory.
- assert(!STI->hasFastUnalignedAccess());
+ // FIXME: Zdinx RV32 can not work on unaligned scalar memory.
+ assert(!STI->hasFastUnalignedAccess() &&
+ !STI->enableUnalignedScalarMem());
assert(MBBI->getOperand(2).getOffset() % 8 == 0);
MBBI->getOperand(2).setOffset(MBBI->getOperand(2).getOffset() + 4);
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFeatures.td b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFeatures.td
index 26451c80f57b..1bb6b6a561f4 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFeatures.td
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFeatures.td
@@ -1025,6 +1025,11 @@ def FeatureFastUnalignedAccess
"true", "Has reasonably performant unaligned "
"loads and stores (both scalar and vector)">;
+def FeatureUnalignedScalarMem
+ : SubtargetFeature<"unaligned-scalar-mem", "EnableUnalignedScalarMem",
+ "true", "Has reasonably performant unaligned scalar "
+ "loads and stores">;
+
def FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler",
"UsePostRAScheduler", "true", "Schedule again after register allocation">;
diff --git a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index a0cec426002b..3fe7ddfdd427 100644
--- a/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -1883,7 +1883,8 @@ bool RISCVTargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
// replace. If we don't support unaligned scalar mem, prefer the constant
// pool.
// TODO: Can the caller pass down the alignment?
- if (!Subtarget.hasFastUnalignedAccess())
+ if (!Subtarget.hasFastUnalignedAccess() &&
+ !Subtarget.enableUnalignedScalarMem())
return true;
// Prefer to keep the load if it would require many instructions.
@@ -14559,7 +14560,7 @@ static SDValue tryFoldSelectIntoOp(SDNode *N, SelectionDAG &DAG,
EVT VT = N->getValueType(0);
SDLoc DL(N);
SDValue OtherOp = TrueVal.getOperand(1 - OpToFold);
- EVT OtherOpVT = OtherOp->getValueType(0);
+ EVT OtherOpVT = OtherOp.getValueType();
SDValue IdentityOperand =
DAG.getNeutralElement(Opc, DL, OtherOpVT, N->getFlags());
if (!Commutative)
@@ -19772,8 +19773,10 @@ bool RISCVTargetLowering::allowsMisalignedMemoryAccesses(
unsigned *Fast) const {
if (!VT.isVector()) {
if (Fast)
- *Fast = Subtarget.hasFastUnalignedAccess();
- return Subtarget.hasFastUnalignedAccess();
+ *Fast = Subtarget.hasFastUnalignedAccess() ||
+ Subtarget.enableUnalignedScalarMem();
+ return Subtarget.hasFastUnalignedAccess() ||
+ Subtarget.enableUnalignedScalarMem();
}
// All vector implementations must support element alignment
diff --git a/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index bf6547cc87ec..2f2dc6b80792 100644
--- a/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -70,49 +70,62 @@ void SystemZInstrInfo::splitMove(MachineBasicBlock::iterator MI,
MachineBasicBlock *MBB = MI->getParent();
MachineFunction &MF = *MBB->getParent();
- // Get two load or store instructions. Use the original instruction for one
- // of them (arbitrarily the second here) and create a clone for the other.
- MachineInstr *EarlierMI = MF.CloneMachineInstr(&*MI);
- MBB->insert(MI, EarlierMI);
+ // Get two load or store instructions. Use the original instruction for
+ // one of them and create a clone for the other.
+ MachineInstr *HighPartMI = MF.CloneMachineInstr(&*MI);
+ MachineInstr *LowPartMI = &*MI;
+ MBB->insert(LowPartMI, HighPartMI);
// Set up the two 64-bit registers and remember super reg and its flags.
- MachineOperand &HighRegOp = EarlierMI->getOperand(0);
- MachineOperand &LowRegOp = MI->getOperand(0);
+ MachineOperand &HighRegOp = HighPartMI->getOperand(0);
+ MachineOperand &LowRegOp = LowPartMI->getOperand(0);
Register Reg128 = LowRegOp.getReg();
unsigned Reg128Killed = getKillRegState(LowRegOp.isKill());
unsigned Reg128Undef = getUndefRegState(LowRegOp.isUndef());
HighRegOp.setReg(RI.getSubReg(HighRegOp.getReg(), SystemZ::subreg_h64));
LowRegOp.setReg(RI.getSubReg(LowRegOp.getReg(), SystemZ::subreg_l64));
- if (MI->mayStore()) {
- // Add implicit uses of the super register in case one of the subregs is
- // undefined. We could track liveness and skip storing an undefined
- // subreg, but this is hopefully rare (discovered with llvm-stress).
- // If Reg128 was killed, set kill flag on MI.
- unsigned Reg128UndefImpl = (Reg128Undef | RegState::Implicit);
- MachineInstrBuilder(MF, EarlierMI).addReg(Reg128, Reg128UndefImpl);
- MachineInstrBuilder(MF, MI).addReg(Reg128, (Reg128UndefImpl | Reg128Killed));
- }
-
// The address in the first (high) instruction is already correct.
// Adjust the offset in the second (low) instruction.
- MachineOperand &HighOffsetOp = EarlierMI->getOperand(2);
- MachineOperand &LowOffsetOp = MI->getOperand(2);
+ MachineOperand &HighOffsetOp = HighPartMI->getOperand(2);
+ MachineOperand &LowOffsetOp = LowPartMI->getOperand(2);
LowOffsetOp.setImm(LowOffsetOp.getImm() + 8);
- // Clear the kill flags on the registers in the first instruction.
- if (EarlierMI->getOperand(0).isReg() && EarlierMI->getOperand(0).isUse())
- EarlierMI->getOperand(0).setIsKill(false);
- EarlierMI->getOperand(1).setIsKill(false);
- EarlierMI->getOperand(3).setIsKill(false);
-
// Set the opcodes.
unsigned HighOpcode = getOpcodeForOffset(NewOpcode, HighOffsetOp.getImm());
unsigned LowOpcode = getOpcodeForOffset(NewOpcode, LowOffsetOp.getImm());
assert(HighOpcode && LowOpcode && "Both offsets should be in range");
+ HighPartMI->setDesc(get(HighOpcode));
+ LowPartMI->setDesc(get(LowOpcode));
+
+ MachineInstr *FirstMI = HighPartMI;
+ if (MI->mayStore()) {
+ FirstMI->getOperand(0).setIsKill(false);
+ // Add implicit uses of the super register in case one of the subregs is
+ // undefined. We could track liveness and skip storing an undefined
+ // subreg, but this is hopefully rare (discovered with llvm-stress).
+ // If Reg128 was killed, set kill flag on MI.
+ unsigned Reg128UndefImpl = (Reg128Undef | RegState::Implicit);
+ MachineInstrBuilder(MF, HighPartMI).addReg(Reg128, Reg128UndefImpl);
+ MachineInstrBuilder(MF, LowPartMI).addReg(Reg128, (Reg128UndefImpl | Reg128Killed));
+ } else {
+ // If HighPartMI clobbers any of the address registers, it needs to come
+ // after LowPartMI.
+ auto overlapsAddressReg = [&](Register Reg) -> bool {
+ return RI.regsOverlap(Reg, MI->getOperand(1).getReg()) ||
+ RI.regsOverlap(Reg, MI->getOperand(3).getReg());
+ };
+ if (overlapsAddressReg(HighRegOp.getReg())) {
+ assert(!overlapsAddressReg(LowRegOp.getReg()) &&
+ "Both loads clobber address!");
+ MBB->splice(HighPartMI, MBB, LowPartMI);
+ FirstMI = LowPartMI;
+ }
+ }
- EarlierMI->setDesc(get(HighOpcode));
- MI->setDesc(get(LowOpcode));
+ // Clear the kill flags on the address registers in the first instruction.
+ FirstMI->getOperand(1).setIsKill(false);
+ FirstMI->getOperand(3).setIsKill(false);
}
// Split ADJDYNALLOC instruction MI.
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86.td b/contrib/llvm-project/llvm/lib/Target/X86/X86.td
index e89ddcc570c9..1aff5f9fad97 100644
--- a/contrib/llvm-project/llvm/lib/Target/X86/X86.td
+++ b/contrib/llvm-project/llvm/lib/Target/X86/X86.td
@@ -867,6 +867,7 @@ def ProcessorFeatures {
// Nehalem
list<SubtargetFeature> NHMFeatures = X86_64V2Features;
list<SubtargetFeature> NHMTuning = [TuningMacroFusion,
+ TuningSlowDivide64,
TuningInsertVZEROUPPER,
TuningNoDomainDelayMov];
@@ -1336,6 +1337,7 @@ def ProcessorFeatures {
FeatureCMOV,
FeatureX86_64];
list<SubtargetFeature> BarcelonaTuning = [TuningFastScalarShiftMasks,
+ TuningSlowDivide64,
TuningSlowSHLD,
TuningSBBDepBreaking,
TuningInsertVZEROUPPER];
@@ -1358,6 +1360,7 @@ def ProcessorFeatures {
list<SubtargetFeature> BtVer1Tuning = [TuningFast15ByteNOP,
TuningFastScalarShiftMasks,
TuningFastVectorShiftMasks,
+ TuningSlowDivide64,
TuningSlowSHLD,
TuningSBBDepBreaking,
TuningInsertVZEROUPPER];
@@ -1380,6 +1383,7 @@ def ProcessorFeatures {
TuningFastVectorShiftMasks,
TuningFastMOVBE,
TuningSBBDepBreaking,
+ TuningSlowDivide64,
TuningSlowSHLD];
list<SubtargetFeature> BtVer2Features =
!listconcat(BtVer1Features, BtVer2AdditionalFeatures);
@@ -1404,6 +1408,7 @@ def ProcessorFeatures {
FeatureLWP,
FeatureLAHFSAHF64];
list<SubtargetFeature> BdVer1Tuning = [TuningSlowSHLD,
+ TuningSlowDivide64,
TuningFast11ByteNOP,
TuningFastScalarShiftMasks,
TuningBranchFusion,
@@ -1483,6 +1488,7 @@ def ProcessorFeatures {
TuningFastScalarShiftMasks,
TuningFastVariablePerLaneShuffle,
TuningFastMOVBE,
+ TuningSlowDivide64,
TuningSlowSHLD,
TuningSBBDepBreaking,
TuningInsertVZEROUPPER,
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 833f058253d8..553d338b7790 100644
--- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -2923,11 +2923,10 @@ bool X86DAGToDAGISel::selectAddr(SDNode *Parent, SDValue N, SDValue &Base,
}
bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) {
- // Cannot use 32 bit constants to reference objects in kernel code model.
- // Cannot use 32 bit constants to reference objects in large PIC mode since
- // GOTOFF is 64 bits.
+ // Cannot use 32 bit constants to reference objects in kernel/large code
+ // model.
if (TM.getCodeModel() == CodeModel::Kernel ||
- (TM.getCodeModel() == CodeModel::Large && TM.isPositionIndependent()))
+ TM.getCodeModel() == CodeModel::Large)
return false;
// In static codegen with small code model, we can get the address of a label
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
index 96bbd981ff24..911d9986a879 100644
--- a/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -7295,7 +7295,7 @@ static SDValue lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp,
// With pattern matching, the VBROADCAST node may become a VMOVDDUP.
if (ScalarSize == 32 ||
(ScalarSize == 64 && (IsGE256 || Subtarget.hasVLX())) ||
- CVT == MVT::f16 ||
+ (CVT == MVT::f16 && Subtarget.hasAVX2()) ||
(OptForSize && (ScalarSize == 64 || Subtarget.hasAVX2()))) {
const Constant *C = nullptr;
if (ConstantSDNode *CI = dyn_cast<ConstantSDNode>(Ld))
@@ -29844,7 +29844,9 @@ static SDValue LowerRotate(SDValue Op, const X86Subtarget &Subtarget,
return R;
// AVX512 implicitly uses modulo rotation amounts.
- if (Subtarget.hasAVX512() && 32 <= EltSizeInBits) {
+ if ((Subtarget.hasVLX() ||
+ (Subtarget.hasAVX512() && Subtarget.hasEVEX512())) &&
+ 32 <= EltSizeInBits) {
// Attempt to rotate by immediate.
if (IsCstSplat) {
unsigned RotOpc = IsROTL ? X86ISD::VROTLI : X86ISD::VROTRI;
@@ -47038,10 +47040,13 @@ static SDValue combineShiftRightArithmetic(SDNode *N, SelectionDAG &DAG,
if (SDValue V = combineShiftToPMULH(N, DAG, Subtarget))
return V;
- // fold (ashr (shl, a, [56,48,32,24,16]), SarConst)
- // into (shl, (sext (a), [56,48,32,24,16] - SarConst)) or
- // into (lshr, (sext (a), SarConst - [56,48,32,24,16]))
- // depending on sign of (SarConst - [56,48,32,24,16])
+ // fold (SRA (SHL X, ShlConst), SraConst)
+ // into (SHL (sext_in_reg X), ShlConst - SraConst)
+ // or (sext_in_reg X)
+ // or (SRA (sext_in_reg X), SraConst - ShlConst)
+ // depending on relation between SraConst and ShlConst.
+ // We only do this if (Size - ShlConst) is equal to 8, 16 or 32. That allows
+ // us to do the sext_in_reg from corresponding bit.
// sexts in X86 are MOVs. The MOVs have the same code size
// as above SHIFTs (only SHIFT on 1 has lower code size).
@@ -47057,29 +47062,29 @@ static SDValue combineShiftRightArithmetic(SDNode *N, SelectionDAG &DAG,
SDValue N00 = N0.getOperand(0);
SDValue N01 = N0.getOperand(1);
APInt ShlConst = N01->getAsAPIntVal();
- APInt SarConst = N1->getAsAPIntVal();
+ APInt SraConst = N1->getAsAPIntVal();
EVT CVT = N1.getValueType();
- if (SarConst.isNegative())
+ if (CVT != N01.getValueType())
+ return SDValue();
+ if (SraConst.isNegative())
return SDValue();
for (MVT SVT : { MVT::i8, MVT::i16, MVT::i32 }) {
unsigned ShiftSize = SVT.getSizeInBits();
- // skipping types without corresponding sext/zext and
- // ShlConst that is not one of [56,48,32,24,16]
+ // Only deal with (Size - ShlConst) being equal to 8, 16 or 32.
if (ShiftSize >= Size || ShlConst != Size - ShiftSize)
continue;
SDLoc DL(N);
SDValue NN =
DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, N00, DAG.getValueType(SVT));
- SarConst = SarConst - (Size - ShiftSize);
- if (SarConst == 0)
+ if (SraConst.eq(ShlConst))
return NN;
- if (SarConst.isNegative())
+ if (SraConst.ult(ShlConst))
return DAG.getNode(ISD::SHL, DL, VT, NN,
- DAG.getConstant(-SarConst, DL, CVT));
+ DAG.getConstant(ShlConst - SraConst, DL, CVT));
return DAG.getNode(ISD::SRA, DL, VT, NN,
- DAG.getConstant(SarConst, DL, CVT));
+ DAG.getConstant(SraConst - ShlConst, DL, CVT));
}
return SDValue();
}
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td b/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td
index fdca58141f0f..12d3b889c211 100644
--- a/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td
+++ b/contrib/llvm-project/llvm/lib/Target/X86/X86InstrAVX512.td
@@ -826,7 +826,7 @@ defm : vextract_for_size_lowering<"VEXTRACTF64x4Z", v32bf16_info, v16bf16x_info,
// A 128-bit extract from bits [255:128] of a 512-bit vector should use a
// smaller extract to enable EVEX->VEX.
-let Predicates = [NoVLX] in {
+let Predicates = [NoVLX, HasEVEX512] in {
def : Pat<(v2i64 (extract_subvector (v8i64 VR512:$src), (iPTR 2))),
(v2i64 (VEXTRACTI128rr
(v4i64 (EXTRACT_SUBREG (v8i64 VR512:$src), sub_ymm)),
@@ -3080,7 +3080,7 @@ def : Pat<(Narrow.KVT (and Narrow.KRC:$mask,
addr:$src2, (X86cmpm_imm_commute timm:$cc)), Narrow.KRC)>;
}
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpm, X86pcmpm_su, "VPCMPD", v8i32x_info, v16i32_info>;
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpum, X86pcmpum_su, "VPCMPUD", v8i32x_info, v16i32_info>;
@@ -3111,7 +3111,7 @@ let Predicates = [HasAVX512, NoVLX] in {
defm : axv512_cmp_packed_cc_no_vlx_lowering<"VCMPPD", v2f64x_info, v8f64_info>;
}
-let Predicates = [HasBWI, NoVLX] in {
+let Predicates = [HasBWI, NoVLX, HasEVEX512] in {
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpm, X86pcmpm_su, "VPCMPB", v32i8x_info, v64i8_info>;
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpum, X86pcmpum_su, "VPCMPUB", v32i8x_info, v64i8_info>;
@@ -3505,7 +3505,7 @@ multiclass mask_move_lowering<string InstrStr, X86VectorVTInfo Narrow,
// Patterns for handling v8i1 selects of 256-bit vectors when VLX isn't
// available. Use a 512-bit operation and extract.
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
defm : mask_move_lowering<"VMOVAPSZ", v4f32x_info, v16f32_info>;
defm : mask_move_lowering<"VMOVDQA32Z", v4i32x_info, v16i32_info>;
defm : mask_move_lowering<"VMOVAPSZ", v8f32x_info, v16f32_info>;
@@ -3517,7 +3517,7 @@ let Predicates = [HasAVX512, NoVLX] in {
defm : mask_move_lowering<"VMOVDQA64Z", v4i64x_info, v8i64_info>;
}
-let Predicates = [HasBWI, NoVLX] in {
+let Predicates = [HasBWI, NoVLX, HasEVEX512] in {
defm : mask_move_lowering<"VMOVDQU8Z", v16i8x_info, v64i8_info>;
defm : mask_move_lowering<"VMOVDQU8Z", v32i8x_info, v64i8_info>;
@@ -5010,8 +5010,8 @@ defm VPMINUD : avx512_binop_rm_vl_d<0x3B, "vpminud", umin,
defm VPMINUQ : avx512_binop_rm_vl_q<0x3B, "vpminuq", umin,
SchedWriteVecALU, HasAVX512, 1>, T8;
-// PMULLQ: Use 512bit version to implement 128/256 bit in case NoVLX.
-let Predicates = [HasDQI, NoVLX] in {
+// PMULLQ: Use 512bit version to implement 128/256 bit in case NoVLX, HasEVEX512.
+let Predicates = [HasDQI, NoVLX, HasEVEX512] in {
def : Pat<(v4i64 (mul (v4i64 VR256X:$src1), (v4i64 VR256X:$src2))),
(EXTRACT_SUBREG
(VPMULLQZrr
@@ -5067,7 +5067,7 @@ multiclass avx512_min_max_lowering<string Instr, SDNode OpNode> {
sub_xmm)>;
}
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
defm : avx512_min_max_lowering<"VPMAXUQZ", umax>;
defm : avx512_min_max_lowering<"VPMINUQZ", umin>;
defm : avx512_min_max_lowering<"VPMAXSQZ", smax>;
@@ -6044,7 +6044,7 @@ defm VPSRL : avx512_shift_types<0xD2, 0xD3, 0xD1, "vpsrl", X86vsrl,
SchedWriteVecShift>;
// Use 512bit VPSRA/VPSRAI version to implement v2i64/v4i64 in case NoVLX.
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
def : Pat<(v4i64 (X86vsra (v4i64 VR256X:$src1), (v2i64 VR128X:$src2))),
(EXTRACT_SUBREG (v8i64
(VPSRAQZrr
@@ -6173,14 +6173,14 @@ defm VPSRLV : avx512_var_shift_types<0x45, "vpsrlv", X86vsrlv, SchedWriteVarVecS
defm VPRORV : avx512_var_shift_types<0x14, "vprorv", rotr, SchedWriteVarVecShift>;
defm VPROLV : avx512_var_shift_types<0x15, "vprolv", rotl, SchedWriteVarVecShift>;
-defm : avx512_var_shift_lowering<avx512vl_i64_info, "VPSRAVQ", X86vsrav, [HasAVX512, NoVLX]>;
-defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSLLVW", X86vshlv, [HasBWI, NoVLX]>;
-defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRAVW", X86vsrav, [HasBWI, NoVLX]>;
-defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRLVW", X86vsrlv, [HasBWI, NoVLX]>;
+defm : avx512_var_shift_lowering<avx512vl_i64_info, "VPSRAVQ", X86vsrav, [HasAVX512, NoVLX, HasEVEX512]>;
+defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSLLVW", X86vshlv, [HasBWI, NoVLX, HasEVEX512]>;
+defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRAVW", X86vsrav, [HasBWI, NoVLX, HasEVEX512]>;
+defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRLVW", X86vsrlv, [HasBWI, NoVLX, HasEVEX512]>;
// Use 512bit VPROL/VPROLI version to implement v2i64/v4i64 + v4i32/v8i32 in case NoVLX.
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
def : Pat<(v2i64 (rotl (v2i64 VR128X:$src1), (v2i64 VR128X:$src2))),
(EXTRACT_SUBREG (v8i64
(VPROLVQZrr
@@ -6231,7 +6231,7 @@ let Predicates = [HasAVX512, NoVLX] in {
}
// Use 512bit VPROR/VPRORI version to implement v2i64/v4i64 + v4i32/v8i32 in case NoVLX.
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
def : Pat<(v2i64 (rotr (v2i64 VR128X:$src1), (v2i64 VR128X:$src2))),
(EXTRACT_SUBREG (v8i64
(VPRORVQZrr
@@ -9828,7 +9828,7 @@ defm VPMOVUSWB : avx512_trunc_wb<0x10, "vpmovuswb", X86vtruncus,
truncstore_us_vi8, masked_truncstore_us_vi8,
X86vtruncus, X86vmtruncus>;
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
def: Pat<(v8i16 (trunc (v8i32 VR256X:$src))),
(v8i16 (EXTRACT_SUBREG
(v16i16 (VPMOVDWZrr (v16i32 (INSERT_SUBREG (IMPLICIT_DEF),
@@ -9839,7 +9839,7 @@ def: Pat<(v4i32 (trunc (v4i64 VR256X:$src))),
VR256X:$src, sub_ymm)))), sub_xmm))>;
}
-let Predicates = [HasBWI, NoVLX] in {
+let Predicates = [HasBWI, NoVLX, HasEVEX512] in {
def: Pat<(v16i8 (trunc (v16i16 VR256X:$src))),
(v16i8 (EXTRACT_SUBREG (VPMOVWBZrr (v32i16 (INSERT_SUBREG (IMPLICIT_DEF),
VR256X:$src, sub_ymm))), sub_xmm))>;
@@ -10382,7 +10382,7 @@ multiclass avx512_convert_vector_to_mask<bits<8> opc, string OpcodeStr,
defm Z128 : convert_vector_to_mask_common<opc, VTInfo.info128, OpcodeStr>,
EVEX_V128;
}
- let Predicates = [prd, NoVLX] in {
+ let Predicates = [prd, NoVLX, HasEVEX512] in {
defm Z256_Alt : convert_vector_to_mask_lowering<VTInfo.info512, VTInfo.info256, NAME>;
defm Z128_Alt : convert_vector_to_mask_lowering<VTInfo.info512, VTInfo.info128, NAME>;
}
@@ -11169,7 +11169,7 @@ defm VPABS : avx512_unary_rm_vl_all<0x1C, 0x1D, 0x1E, 0x1F, "vpabs", abs,
SchedWriteVecALU>;
// VPABS: Use 512bit version to implement 128/256 bit in case NoVLX.
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
def : Pat<(v4i64 (abs VR256X:$src)),
(EXTRACT_SUBREG
(VPABSQZrr
@@ -11185,7 +11185,7 @@ let Predicates = [HasAVX512, NoVLX] in {
// Use 512bit version to implement 128/256 bit.
multiclass avx512_unary_lowering<string InstrStr, SDNode OpNode,
AVX512VLVectorVTInfo _, Predicate prd> {
- let Predicates = [prd, NoVLX] in {
+ let Predicates = [prd, NoVLX, HasEVEX512] in {
def : Pat<(_.info256.VT (OpNode (_.info256.VT _.info256.RC:$src1))),
(EXTRACT_SUBREG
(!cast<Instruction>(InstrStr # "Zrr")
@@ -11804,7 +11804,7 @@ let Predicates = [HasAVX512] in {
(VPTERNLOGQZrri VR512:$src, VR512:$src, VR512:$src, (i8 15))>;
}
-let Predicates = [HasAVX512, NoVLX] in {
+let Predicates = [HasAVX512, NoVLX, HasEVEX512] in {
def : Pat<(v16i8 (vnot VR128X:$src)),
(EXTRACT_SUBREG
(VPTERNLOGQZrri
diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h b/contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h
index a458b5f9ec8f..4d55a084b730 100644
--- a/contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h
+++ b/contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h
@@ -244,7 +244,8 @@ public:
// TODO: Currently we're always allowing widening on CPUs without VLX,
// because for many cases we don't have a better option.
bool canExtendTo512DQ() const {
- return hasAVX512() && (!hasVLX() || getPreferVectorWidth() >= 512);
+ return hasAVX512() && hasEVEX512() &&
+ (!hasVLX() || getPreferVectorWidth() >= 512);
}
bool canExtendTo512BW() const {
return hasBWI() && canExtendTo512DQ();
diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp
index 4466d50458e1..848b531dd8dd 100644
--- a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp
+++ b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp
@@ -1266,8 +1266,10 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
setFeature(X86::FEATURE_AVX2);
if (HasLeaf7 && ((EBX >> 8) & 1))
setFeature(X86::FEATURE_BMI2);
- if (HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save)
+ if (HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save) {
setFeature(X86::FEATURE_AVX512F);
+ setFeature(X86::FEATURE_EVEX512);
+ }
if (HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save)
setFeature(X86::FEATURE_AVX512DQ);
if (HasLeaf7 && ((EBX >> 19) & 1))
@@ -1772,6 +1774,8 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1);
// AVX512 is only supported if the OS supports the context save for it.
Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save;
+ if (Features["avx512f"])
+ Features["evex512"] = true;
Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save;
Features["rdseed"] = HasLeaf7 && ((EBX >> 18) & 1);
Features["adx"] = HasLeaf7 && ((EBX >> 19) & 1);
diff --git a/contrib/llvm-project/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/contrib/llvm-project/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 7ebf265e17ba..27c411250d53 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -1186,10 +1186,15 @@ static bool isReturnNonNull(Function *F, const SCCNodeSet &SCCNodes,
switch (RVI->getOpcode()) {
// Extend the analysis by looking upwards.
case Instruction::BitCast:
- case Instruction::GetElementPtr:
case Instruction::AddrSpaceCast:
FlowsToReturn.insert(RVI->getOperand(0));
continue;
+ case Instruction::GetElementPtr:
+ if (cast<GEPOperator>(RVI)->isInBounds()) {
+ FlowsToReturn.insert(RVI->getOperand(0));
+ continue;
+ }
+ return false;
case Instruction::Select: {
SelectInst *SI = cast<SelectInst>(RVI);
FlowsToReturn.insert(SI->getTrueValue());
diff --git a/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 951372adcfa9..619b3f612f25 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2212,6 +2212,9 @@ static bool mayHaveOtherReferences(GlobalValue &GV, const LLVMUsed &U) {
static bool hasUsesToReplace(GlobalAlias &GA, const LLVMUsed &U,
bool &RenameTarget) {
+ if (GA.isWeakForLinker())
+ return false;
+
RenameTarget = false;
bool Ret = false;
if (hasUseOtherThanLLVMUsed(GA, U))
diff --git a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index 9f220ec003ec..86a39cf2ee93 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -2606,7 +2606,7 @@ static Instruction *foldSelectWithSRem(SelectInst &SI, InstCombinerImpl &IC,
// %cnd = icmp slt i32 %rem, 0
// %add = add i32 %rem, %n
// %sel = select i1 %cnd, i32 %add, i32 %rem
- if (match(TrueVal, m_Add(m_Value(RemRes), m_Value(Remainder))) &&
+ if (match(TrueVal, m_Add(m_Specific(RemRes), m_Value(Remainder))) &&
match(RemRes, m_SRem(m_Value(Op), m_Specific(Remainder))) &&
IC.isKnownToBeAPowerOfTwo(Remainder, /*OrZero*/ true) &&
FalseVal == RemRes)
@@ -3201,7 +3201,8 @@ Instruction *InstCombinerImpl::foldSelectOfBools(SelectInst &SI) {
// pattern.
static bool isSafeToRemoveBitCeilSelect(ICmpInst::Predicate Pred, Value *Cond0,
const APInt *Cond1, Value *CtlzOp,
- unsigned BitWidth) {
+ unsigned BitWidth,
+ bool &ShouldDropNUW) {
// The challenge in recognizing std::bit_ceil(X) is that the operand is used
// for the CTLZ proper and select condition, each possibly with some
// operation like add and sub.
@@ -3224,6 +3225,8 @@ static bool isSafeToRemoveBitCeilSelect(ICmpInst::Predicate Pred, Value *Cond0,
ConstantRange CR = ConstantRange::makeExactICmpRegion(
CmpInst::getInversePredicate(Pred), *Cond1);
+ ShouldDropNUW = false;
+
// Match the operation that's used to compute CtlzOp from CommonAncestor. If
// CtlzOp == CommonAncestor, return true as no operation is needed. If a
// match is found, execute the operation on CR, update CR, and return true.
@@ -3237,6 +3240,7 @@ static bool isSafeToRemoveBitCeilSelect(ICmpInst::Predicate Pred, Value *Cond0,
return true;
}
if (match(CtlzOp, m_Sub(m_APInt(C), m_Specific(CommonAncestor)))) {
+ ShouldDropNUW = true;
CR = ConstantRange(*C).sub(CR);
return true;
}
@@ -3306,14 +3310,20 @@ static Instruction *foldBitCeil(SelectInst &SI, IRBuilderBase &Builder) {
Pred = CmpInst::getInversePredicate(Pred);
}
+ bool ShouldDropNUW;
+
if (!match(FalseVal, m_One()) ||
!match(TrueVal,
m_OneUse(m_Shl(m_One(), m_OneUse(m_Sub(m_SpecificInt(BitWidth),
m_Value(Ctlz)))))) ||
!match(Ctlz, m_Intrinsic<Intrinsic::ctlz>(m_Value(CtlzOp), m_Zero())) ||
- !isSafeToRemoveBitCeilSelect(Pred, Cond0, Cond1, CtlzOp, BitWidth))
+ !isSafeToRemoveBitCeilSelect(Pred, Cond0, Cond1, CtlzOp, BitWidth,
+ ShouldDropNUW))
return nullptr;
+ if (ShouldDropNUW)
+ cast<Instruction>(CtlzOp)->setHasNoUnsignedWrap(false);
+
// Build 1 << (-CTLZ & (BitWidth-1)). The negation likely corresponds to a
// single hardware instruction as opposed to BitWidth - CTLZ, where BitWidth
// is an integer constant. Masking with BitWidth-1 comes free on some
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/contrib/llvm-project/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
index 9df28747570c..104e8ceb7967 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -279,6 +279,9 @@ bool InductiveRangeCheck::parseRangeCheckICmp(Loop *L, ICmpInst *ICI,
Value *LHS = ICI->getOperand(0);
Value *RHS = ICI->getOperand(1);
+ if (!LHS->getType()->isIntegerTy())
+ return false;
+
// Canonicalize to the `Index Pred Invariant` comparison
if (IsLoopInvariant(LHS)) {
std::swap(LHS, RHS);
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 1fbd69e38eae..0a9e2c7f49f5 100644
--- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -11653,12 +11653,12 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
if (UseIntrinsic && isVectorIntrinsicWithOverloadTypeAtArg(ID, -1))
TysForDecl.push_back(
FixedVectorType::get(CI->getType(), E->Scalars.size()));
- auto *CEI = cast<CallInst>(VL0);
for (unsigned I : seq<unsigned>(0, CI->arg_size())) {
ValueList OpVL;
// Some intrinsics have scalar arguments. This argument should not be
// vectorized.
if (UseIntrinsic && isVectorIntrinsicWithScalarOpAtArg(ID, I)) {
+ CallInst *CEI = cast<CallInst>(VL0);
ScalarArg = CEI->getArgOperand(I);
OpVecs.push_back(CEI->getArgOperand(I));
if (isVectorIntrinsicWithOverloadTypeAtArg(ID, I))
@@ -11671,25 +11671,6 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
LLVM_DEBUG(dbgs() << "SLP: Diamond merged for " << *VL0 << ".\n");
return E->VectorizedValue;
}
- auto GetOperandSignedness = [&](unsigned Idx) {
- const TreeEntry *OpE = getOperandEntry(E, Idx);
- bool IsSigned = false;
- auto It = MinBWs.find(OpE);
- if (It != MinBWs.end())
- IsSigned = It->second.second;
- else
- IsSigned = any_of(OpE->Scalars, [&](Value *R) {
- return !isKnownNonNegative(R, SimplifyQuery(*DL));
- });
- return IsSigned;
- };
- ScalarArg = CEI->getArgOperand(I);
- if (cast<VectorType>(OpVec->getType())->getElementType() !=
- ScalarArg->getType()) {
- auto *CastTy = FixedVectorType::get(ScalarArg->getType(),
- VecTy->getNumElements());
- OpVec = Builder.CreateIntCast(OpVec, CastTy, GetOperandSignedness(I));
- }
LLVM_DEBUG(dbgs() << "SLP: OpVec[" << I << "]: " << *OpVec << "\n");
OpVecs.push_back(OpVec);
if (UseIntrinsic && isVectorIntrinsicWithOverloadTypeAtArg(ID, I))
diff --git a/contrib/llvm-project/openmp/runtime/src/kmp_settings.cpp b/contrib/llvm-project/openmp/runtime/src/kmp_settings.cpp
index ec86ee07472c..58f19ea5b8ab 100644
--- a/contrib/llvm-project/openmp/runtime/src/kmp_settings.cpp
+++ b/contrib/llvm-project/openmp/runtime/src/kmp_settings.cpp
@@ -6426,6 +6426,8 @@ void __kmp_env_initialize(char const *string) {
}
if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) &&
(__kmp_nested_proc_bind.bind_types[0] != proc_bind_default)) {
+ if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_false)
+ __kmp_affinity.type = affinity_none;
if (__kmp_affinity.type == affinity_default) {
__kmp_affinity.type = affinity_compact;
__kmp_affinity.flags.dups = FALSE;
diff --git a/contrib/llvm-project/openmp/runtime/src/z_Linux_util.cpp b/contrib/llvm-project/openmp/runtime/src/z_Linux_util.cpp
index b9ff96873702..97ddb8a608b7 100644
--- a/contrib/llvm-project/openmp/runtime/src/z_Linux_util.cpp
+++ b/contrib/llvm-project/openmp/runtime/src/z_Linux_util.cpp
@@ -2129,10 +2129,10 @@ int __kmp_is_address_mapped(void *addr) {
// We pass from number of vm entry's semantic
// to size of whole entry map list.
lstsz = lstsz * 4 / 3;
- buf = reinterpret_cast<char *>(kmpc_malloc(lstsz));
+ buf = reinterpret_cast<char *>(KMP_INTERNAL_MALLOC(lstsz));
rc = sysctl(mib, 4, buf, &lstsz, NULL, 0);
if (rc < 0) {
- kmpc_free(buf);
+ KMP_INTERNAL_FREE(buf);
return 0;
}
@@ -2156,7 +2156,7 @@ int __kmp_is_address_mapped(void *addr) {
}
lw += cursz;
}
- kmpc_free(buf);
+ KMP_INTERNAL_FREE(buf);
#elif KMP_OS_DARWIN
diff --git a/contrib/mandoc/config.h b/contrib/mandoc/config.h
index 91957717b3fc..ea6d70042670 100644
--- a/contrib/mandoc/config.h
+++ b/contrib/mandoc/config.h
@@ -13,7 +13,7 @@
#define HAVE_ENDIAN 0
#define HAVE_ERR 1
#define HAVE_FTS 1
-#if defined(__GLIBC__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
#define HAVE_FTS_COMPARE_CONST 0
#else
#define HAVE_FTS_COMPARE_CONST 1
diff --git a/contrib/netbsd-tests/lib/libc/ssp/h_gets.c b/contrib/netbsd-tests/lib/libc/ssp/h_gets.c
index f73d29a08bf3..9da01cab8eb4 100644
--- a/contrib/netbsd-tests/lib/libc/ssp/h_gets.c
+++ b/contrib/netbsd-tests/lib/libc/ssp/h_gets.c
@@ -34,6 +34,9 @@ __RCSID("$NetBSD: h_gets.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $");
#include <stdio.h>
#ifdef __FreeBSD__
+/* _FORTIFY_SOURCE, at the very least, may #define a gets() macro. */
+#undef gets
+
/*
* We want to test the gets() implementation, but cannot simply link against
* the gets symbol because it is not in the default version. (We've made it
diff --git a/contrib/ntp/COPYRIGHT b/contrib/ntp/COPYRIGHT
index 013202c0fb09..0cb57168ebfc 100644
--- a/contrib/ntp/COPYRIGHT
+++ b/contrib/ntp/COPYRIGHT
@@ -3,7 +3,7 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 2-Mar-2023 05:21 UTC
+ Last update: 7-Jan-2024 00:29 UTC
__________________________________________________________________
The following copyright notice applies to all files collectively called
@@ -32,7 +32,7 @@ This file is automatically generated from html/copyright.html
Hart, Danny Mayer, Martin Burnicki, and possibly others is:
***********************************************************************
* *
-* Copyright (c) Network Time Foundation 2011-2023 *
+* Copyright (c) Network Time Foundation 2011-2024 *
* *
* All Rights Reserved *
* *
diff --git a/contrib/ntp/ChangeLog b/contrib/ntp/ChangeLog
index 93cdab8b94eb..f4a196aa57cd 100644
--- a/contrib/ntp/ChangeLog
+++ b/contrib/ntp/ChangeLog
@@ -1,4 +1,122 @@
---
+(4.2.8p18) 2024/05/25 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 3918] Tweak openssl header/library handling. <stenn@ntp.org>
+* [Bug 3914] Spurious "Unexpected origin timestamp" logged after time
+ stepped. <hart@ntp.org>
+* [Bug 3913] Avoid duplicate IPv6 link-local manycast associations.
+ <hart@ntp.org>
+* [Bug 3912] Avoid rare math errors in ntptrace. <brian.utterback@oracle.com>
+* [Bug 3910] Memory leak using openssl-3 <hart@ntp.org>
+* [Bug 3909] Do not select multicast local address for unicast peer.
+ <hart@ntp.org>
+* [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe.
+ <hart@ntp.org>
+* [Bug 3901] LIB_GETBUF isn't thread-safe. <hart@ntp.org>
+* [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on
+ Windows. <hart@ntp.org>
+* [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates
+ duplicate associations. <hart@ntp.org>
+* [Bug 3872] Ignore restrict mask for hostname. <hart@ntp.org>
+* [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails.
+ Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT
+ declaration from ntp_types.h to config.h. <hart@ntp.org>
+* [Bug 3870] Server drops client packets with ppoll < 4. <stenn@ntp.org>
+* [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs.
+ Reported by PoolMUC@web.de. <hart@ntp.org>
+* [Bug 3868] Cannot restrict a pool peer. <hart@ntp.org> Thanks to
+ Edward McGuire for tracking down the deficiency.
+* [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian.
+ <hart@ntp.org>
+* [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. <hart@ntp.org>
+* [Bug 3856] Enable Edit & Continue debugging with Visual Studio.
+ <hart@ntp.org>
+* [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. <hart@ntp.org>
+* [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid.
+ <hart@ntp.org>
+* [Bug 3853] Clean up warnings with modern compilers. <hart@ntp.org>
+* [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as
+ intended. <hart@ntp.org>
+* [Bug 3851] Drop pool server when no local address can reach it.
+ <hart@ntp.org>
+* [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid.
+ <hart@ntp.org>
+* [Bug 3849] ntpd --wait-sync times out. <hart@ntp.org>
+* [Bug 3847] SSL detection in configure should run-test if runpath is needed.
+ <hart@ntp.org>
+* [Bug 3846] Use -Wno-format-truncation by default. <hart@ntp.org>
+* [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access.
+ <hart@ntp.org>
+* [Bug 3842] Windows ntpd PPSAPI DLL load failure crashes. <hart@ntp.org>
+* [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat
+ Need to remove --Wformat-security when removing -Wformat to
+ silence numerous libopts warnings. <hart@ntp.org>
+* [Bug 3837] NULL pointer deref crash when ntpd deletes last interface.
+ Reported by renmingshuai. Correct UNLINK_EXPR_SLIST() when the
+ list is empty. <hart@ntp.org>
+* [Bug 3835] NTP_HARD_*FLAGS not used by libevent tearoff. <hart@ntp.org>
+* [Bug 3831] pollskewlist zeroed on runtime configuration. <hart@ntp.org>
+* [Bug 3830] configure libevent check intersperses output with answer. <stenn@>
+* [Bug 3828] BK should ignore a git repo in the same directory.
+ <burnicki@ntp.org>
+* [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A
+ is disabled. <burnicki@ntp.org>
+* [Bug 3825] Don't touch HTML files unless building inside a BK repo.
+ Fix the script checkHtmlFileDates. <burnicki@ntp.org>
+* [Bug 3756] Improve OpenSSL library/header detection.
+* [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3. <hart@ntp.org>
+* [Bug 2734] TEST3 prevents initial interleave sync. Fix from <PoolMUC@web.de>
+* Log failures to allocate receive buffers. <hart@ntp.org>
+* Remove extraneous */ from libparse/ieee754io.c
+* Fix .datecheck target line in Makefile.am. <stenn@ntp.org>
+* Update the copyright year. <stenn@ntp.org>
+* Update ntp.conf documentation to add "delrestrict" and correct information
+ about KoD rate limiting. <hart@ntp.org>
+* html/clockopt.html cleanup. <stenn@ntp.org>
+* util/lsf-times - added. <stenn@ntp.org>
+* Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c. <hart@ntp.org>
+* Provide ntpd thread names to debugger on Windows. <hart@ntp.org>
+* Remove dead code libntp/numtohost.c and its unit tests. <hart@ntp.org>
+* Remove class A, B, C IPv4 distinctions in netof(). <hart@ntp.org>
+* Use @configure_input@ in various *.in files to include a comment that
+ the file is generated from another pointing to the *.in. <hart@ntp.org>
+* Correct underquoting, indents in ntp_facilitynames.m4. <hart@ntp.org>
+* Clean up a few warnings seen building with older gcc. <hart@ntp.org>
+* Fix build on older FreeBSD lacking sys/procctl.h. <hart@ntp.org>
+* Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix
+ that makes it unnecessary, re-enabling ASLR stack gap. <hart@ntp.org>
+* Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files.
+* Remove useless pointer to Windows Help from system error messages.
+* Avoid newlines within Windows error messages. <hart@ntp.org>
+* Ensure unique association IDs if wrapped. <hart@ntp.org>
+* Simplify calc_addr_distance(). <hart@ntp.org>
+* Clamp min/maxpoll in edge cases in newpeer(). <hart@ntp.org>
+* Quiet local addr change logging when unpeering. <hart@ntp.org>
+* Correct missing arg for %s printf specifier in
+ send_blocking_resp_internal(). <hart@ntp.org>
+* Suppress OpenSSL 3 deprecation warning clutter. <hart@ntp.org>
+* Correct OpenSSL usage in Autokey code to avoid warnings about
+ discarding const qualifiers with OpenSSL 3. <hart@ntp.org>
+* Display KoD refid as text in recently added message. <hart@ntp.org>
+* Avoid running checkHtmlFileDates script repeatedly when no html/*.html
+ files have changed. <hart@ntp.org>
+* Abort configure if --enable-crypto-rand given & unavailable. <hart@ntp.org>
+* Add configure --enable-verbose-ssl to trace SSL detection. <hart@ntp.org>
+* Add build test coverage for --disable-saveconfig to flock-build script.
+ <hart@ntp.org>
+* Remove deprecated configure --with-arlib option. <hart@ntp.org>
+* Remove configure support for ISC UNIX ca. 1998. <hart@ntp.org>
+* Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP. <hart@ntp.org>
+* Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. <hart@ntp.org>
+* Eliminate [v]snprintf redefinition warnings on macOS. <hart@ntp.org>
+* Fix clang 14 cast increases alignment warning on Linux. <hart@ntp.org>
+* Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests.
+ <hart@ntp.org>
+* Use NTP_HARD_CPPFLAGS in libopts tearoff. <hart@ntp.org>
+* wire in --enable-build-framework-help
+
+---
(4.2.8p17) 2023/06/06 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 3824] Spurious "ntpd: daemon failed to notify parent!" logged at
@@ -10,7 +128,7 @@
Miroslav Lichvar and Matt for rapid testing and identifying the
problem. <hart@ntp.org>
* Add tests/libntp/digests.c to catch regressions reading keys file or with
- symmetric authentication digest output.
+ symmetric authentication digest output. <hart@ntp.org>
---
(4.2.8p16) 2023/05/31 Released by Harlan Stenn <stenn@ntp.org>
diff --git a/contrib/ntp/CommitLog b/contrib/ntp/CommitLog
index adeda2c60402..49952cfaef0d 100644
--- a/contrib/ntp/CommitLog
+++ b/contrib/ntp/CommitLog
@@ -1,3 +1,3224 @@
+ChangeSet@1.4062, 2024-05-25 00:06:49-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ NTP_4_2_8P18
+ TAG: NTP_4_2_8P18
+
+ ChangeLog@1.2103 +1 -0
+ NTP_4_2_8P18
+
+ ntpd/invoke-ntp.conf.texi@1.231 +1 -1
+ NTP_4_2_8P18
+
+ ntpd/invoke-ntp.keys.texi@1.214 +1 -1
+ NTP_4_2_8P18
+
+ ntpd/invoke-ntpd.texi@1.528 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.conf.5man@1.265 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.conf.5mdoc@1.265 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.conf.html@1.213 +1 -1
+ NTP_4_2_8P18
+
+ ntpd/ntp.conf.man.in@1.265 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.conf.mdoc.in@1.265 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.keys.5man@1.248 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.keys.5mdoc@1.248 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.keys.html@1.208 +1 -1
+ NTP_4_2_8P18
+
+ ntpd/ntp.keys.man.in@1.248 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntp.keys.mdoc.in@1.248 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntpd-opts.c@1.553 +245 -245
+ NTP_4_2_8P18
+
+ ntpd/ntpd-opts.h@1.552 +3 -3
+ NTP_4_2_8P18
+
+ ntpd/ntpd.1ntpdman@1.357 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntpd.1ntpdmdoc@1.357 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntpd.html@1.202 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntpd.man.in@1.357 +2 -2
+ NTP_4_2_8P18
+
+ ntpd/ntpd.mdoc.in@1.357 +2 -2
+ NTP_4_2_8P18
+
+ ntpdc/invoke-ntpdc.texi@1.527 +2 -2
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc-opts.c@1.548 +113 -113
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc-opts.h@1.547 +3 -3
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc.1ntpdcman@1.358 +2 -2
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.358 +2 -2
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc.html@1.372 +2 -2
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc.man.in@1.358 +2 -2
+ NTP_4_2_8P18
+
+ ntpdc/ntpdc.mdoc.in@1.358 +2 -2
+ NTP_4_2_8P18
+
+ ntpq/invoke-ntpq.texi@1.537 +2 -2
+ NTP_4_2_8P18
+
+ ntpq/ntpq-opts.c@1.557 +120 -120
+ NTP_4_2_8P18
+
+ ntpq/ntpq-opts.h@1.555 +3 -3
+ NTP_4_2_8P18
+
+ ntpq/ntpq.1ntpqman@1.365 +2 -2
+ NTP_4_2_8P18
+
+ ntpq/ntpq.1ntpqmdoc@1.365 +2 -2
+ NTP_4_2_8P18
+
+ ntpq/ntpq.html@1.202 +2 -2
+ NTP_4_2_8P18
+
+ ntpq/ntpq.man.in@1.365 +2 -2
+ NTP_4_2_8P18
+
+ ntpq/ntpq.mdoc.in@1.365 +2 -2
+ NTP_4_2_8P18
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.527 +2 -2
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.548 +68 -68
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.547 +3 -3
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.356 +2 -2
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.356 +2 -2
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd.html@1.194 +1 -1
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd.man.in@1.356 +2 -2
+ NTP_4_2_8P18
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.356 +2 -2
+ NTP_4_2_8P18
+
+ packageinfo.sh@1.553 +2 -2
+ NTP_4_2_8P18
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.117 +2 -2
+ NTP_4_2_8P18
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.119 +2 -2
+ NTP_4_2_8P18
+
+ scripts/calc_tickadj/calc_tickadj.html@1.118 +1 -1
+ NTP_4_2_8P18
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.116 +2 -2
+ NTP_4_2_8P18
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.119 +2 -2
+ NTP_4_2_8P18
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.121 +1 -1
+ NTP_4_2_8P18
+
+ scripts/invoke-plot_summary.texi@1.139 +2 -2
+ NTP_4_2_8P18
+
+ scripts/invoke-summary.texi@1.138 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.350 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/ntp-wait-opts@1.86 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.345 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.347 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/ntp-wait.html@1.366 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/ntp-wait.man.in@1.345 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.347 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.136 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/ntpsweep-opts@1.89 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.124 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.124 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/ntpsweep.html@1.138 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/ntpsweep.man.in@1.124 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.125 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.139 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/ntptrace-opts@1.89 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.124 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.126 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/ntptrace.html@1.139 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/ntptrace.man.in@1.124 +2 -2
+ NTP_4_2_8P18
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.127 +2 -2
+ NTP_4_2_8P18
+
+ scripts/plot_summary-opts@1.90 +2 -2
+ NTP_4_2_8P18
+
+ scripts/plot_summary.1plot_summaryman@1.137 +2 -2
+ NTP_4_2_8P18
+
+ scripts/plot_summary.1plot_summarymdoc@1.137 +2 -2
+ NTP_4_2_8P18
+
+ scripts/plot_summary.html@1.141 +2 -2
+ NTP_4_2_8P18
+
+ scripts/plot_summary.man.in@1.137 +2 -2
+ NTP_4_2_8P18
+
+ scripts/plot_summary.mdoc.in@1.137 +2 -2
+ NTP_4_2_8P18
+
+ scripts/summary-opts@1.89 +2 -2
+ NTP_4_2_8P18
+
+ scripts/summary.1summaryman@1.136 +2 -2
+ NTP_4_2_8P18
+
+ scripts/summary.1summarymdoc@1.136 +2 -2
+ NTP_4_2_8P18
+
+ scripts/summary.html@1.140 +2 -2
+ NTP_4_2_8P18
+
+ scripts/summary.man.in@1.136 +2 -2
+ NTP_4_2_8P18
+
+ scripts/summary.mdoc.in@1.136 +2 -2
+ NTP_4_2_8P18
+
+ scripts/update-leap/invoke-update-leap.texi@1.37 +1 -1
+ NTP_4_2_8P18
+
+ scripts/update-leap/update-leap-opts@1.39 +2 -2
+ NTP_4_2_8P18
+
+ scripts/update-leap/update-leap.1update-leapman@1.37 +2 -2
+ NTP_4_2_8P18
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.38 +2 -2
+ NTP_4_2_8P18
+
+ scripts/update-leap/update-leap.html@1.37 +1 -1
+ NTP_4_2_8P18
+
+ scripts/update-leap/update-leap.man.in@1.37 +2 -2
+ NTP_4_2_8P18
+
+ scripts/update-leap/update-leap.mdoc.in@1.38 +2 -2
+ NTP_4_2_8P18
+
+ sntp/invoke-sntp.texi@1.527 +2 -2
+ NTP_4_2_8P18
+
+ sntp/sntp-opts.c@1.549 +161 -161
+ NTP_4_2_8P18
+
+ sntp/sntp-opts.h@1.547 +3 -3
+ NTP_4_2_8P18
+
+ sntp/sntp.1sntpman@1.362 +2 -2
+ NTP_4_2_8P18
+
+ sntp/sntp.1sntpmdoc@1.362 +2 -2
+ NTP_4_2_8P18
+
+ sntp/sntp.html@1.543 +2 -2
+ NTP_4_2_8P18
+
+ sntp/sntp.man.in@1.362 +2 -2
+ NTP_4_2_8P18
+
+ sntp/sntp.mdoc.in@1.362 +2 -2
+ NTP_4_2_8P18
+
+ util/invoke-ntp-keygen.texi@1.530 +2 -2
+ NTP_4_2_8P18
+
+ util/ntp-keygen-opts.c@1.551 +174 -174
+ NTP_4_2_8P18
+
+ util/ntp-keygen-opts.h@1.549 +3 -3
+ NTP_4_2_8P18
+
+ util/ntp-keygen.1ntp-keygenman@1.358 +2 -2
+ NTP_4_2_8P18
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.358 +2 -2
+ NTP_4_2_8P18
+
+ util/ntp-keygen.html@1.203 +2 -2
+ NTP_4_2_8P18
+
+ util/ntp-keygen.man.in@1.358 +2 -2
+ NTP_4_2_8P18
+
+ util/ntp-keygen.mdoc.in@1.358 +2 -2
+ NTP_4_2_8P18
+
+ChangeSet@1.4061, 2024-05-24 23:46:58-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ ntp-4.2.8p18
+
+ ChangeLog@1.2102 +0 -2
+ ntp-4.2.8p18
+
+ChangeSet@1.4060, 2024-05-24 22:53:53-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ NTP_4_2_8P18_RCGO
+ TAG: NTP_4_2_8P18_RCGO
+
+ ChangeLog@1.2101 +1 -0
+ NTP_4_2_8P18_RCGO
+
+ ntpd/invoke-ntp.conf.texi@1.230 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ ntpd/invoke-ntp.keys.texi@1.213 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ ntpd/invoke-ntpd.texi@1.527 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.conf.5man@1.264 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.conf.5mdoc@1.264 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.conf.html@1.212 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.conf.man.in@1.264 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.conf.mdoc.in@1.264 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.keys.5man@1.247 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.keys.5mdoc@1.247 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.keys.html@1.207 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.keys.man.in@1.247 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntp.keys.mdoc.in@1.247 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd-opts.c@1.552 +7 -7
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd-opts.h@1.551 +3 -3
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd.1ntpdman@1.356 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd.1ntpdmdoc@1.356 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd.html@1.201 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd.man.in@1.356 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpd/ntpd.mdoc.in@1.356 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/invoke-ntpdc.texi@1.526 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc-opts.c@1.547 +7 -7
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc-opts.h@1.546 +3 -3
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc.1ntpdcman@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc.html@1.371 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc.man.in@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpdc/ntpdc.mdoc.in@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpq/invoke-ntpq.texi@1.536 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq-opts.c@1.556 +7 -7
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq-opts.h@1.554 +3 -3
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq.1ntpqman@1.364 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq.1ntpqmdoc@1.364 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq.html@1.201 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq.man.in@1.364 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpq/ntpq.mdoc.in@1.364 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.526 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.547 +7 -7
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.546 +3 -3
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.355 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.355 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd.html@1.193 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd.man.in@1.355 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.355 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ packageinfo.sh@1.552 +3 -1
+ NTP_4_2_8P18_RCGO
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.116 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.118 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/calc_tickadj/calc_tickadj.html@1.117 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.115 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.118 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.120 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ scripts/invoke-plot_summary.texi@1.138 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/invoke-summary.texi@1.137 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.349 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/ntp-wait-opts@1.85 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.344 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.346 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/ntp-wait.html@1.365 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/ntp-wait.man.in@1.344 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.346 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.135 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/ntpsweep-opts@1.88 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.123 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.123 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/ntpsweep.html@1.137 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/ntpsweep.man.in@1.123 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.124 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.138 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/ntptrace-opts@1.88 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.123 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.125 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/ntptrace.html@1.138 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/ntptrace.man.in@1.123 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.126 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/plot_summary-opts@1.89 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/plot_summary.1plot_summaryman@1.136 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/plot_summary.1plot_summarymdoc@1.136 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/plot_summary.html@1.140 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/plot_summary.man.in@1.136 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/plot_summary.mdoc.in@1.136 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/summary-opts@1.88 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/summary.1summaryman@1.135 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/summary.1summarymdoc@1.135 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/summary.html@1.139 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/summary.man.in@1.135 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/summary.mdoc.in@1.135 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/invoke-update-leap.texi@1.36 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/update-leap-opts@1.38 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/update-leap.1update-leapman@1.36 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.37 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/update-leap.html@1.36 +1 -1
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/update-leap.man.in@1.36 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ scripts/update-leap/update-leap.mdoc.in@1.37 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ sntp/invoke-sntp.texi@1.526 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp-opts.c@1.548 +7 -7
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp-opts.h@1.546 +3 -3
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp.1sntpman@1.361 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp.1sntpmdoc@1.361 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp.html@1.542 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp.man.in@1.361 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ sntp/sntp.mdoc.in@1.361 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ util/invoke-ntp-keygen.texi@1.529 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen-opts.c@1.550 +7 -7
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen-opts.h@1.548 +3 -3
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen.1ntp-keygenman@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen.html@1.202 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen.man.in@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ util/ntp-keygen.mdoc.in@1.357 +2 -2
+ NTP_4_2_8P18_RCGO
+
+ChangeSet@1.4059, 2024-05-24 00:40:40-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ Remove duplicate ChangeLog entries
+
+ ChangeLog@1.2100 +1 -1
+ Remove duplicate ChangeLog entries
+
+ NEWS@1.221 +3898 -7
+ Remove duplicate ChangeLog entries
+
+ChangeSet@1.4058, 2024-05-24 00:30:46-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ Remove duplicate ChangeLog entries
+
+ ChangeLog@1.2099 +0 -4
+ Remove duplicate ChangeLog entries
+
+ChangeSet@1.4057, 2024-05-07 16:50:59-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ NTP_4_2_8P18_RC1
+ TAG: NTP_4_2_8P18_RC1
+
+ ChangeLog@1.2098 +1 -0
+ NTP_4_2_8P18_RC1
+
+ ntpd/invoke-ntp.conf.texi@1.229 +1 -1
+ NTP_4_2_8P18_RC1
+
+ ntpd/invoke-ntp.keys.texi@1.212 +1 -1
+ NTP_4_2_8P18_RC1
+
+ ntpd/invoke-ntpd.texi@1.526 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.conf.5man@1.263 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.conf.5mdoc@1.263 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.conf.html@1.211 +765 -817
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.conf.man.in@1.263 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.conf.mdoc.in@1.263 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.keys.5man@1.246 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.keys.5mdoc@1.246 +3 -3
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.keys.html@1.206 +105 -97
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.keys.man.in@1.246 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntp.keys.mdoc.in@1.246 +3 -3
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd-opts.c@1.551 +245 -245
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd-opts.h@1.550 +3 -3
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd.1ntpdman@1.355 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd.1ntpdmdoc@1.355 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd.html@1.200 +398 -427
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd.man.in@1.355 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpd/ntpd.mdoc.in@1.355 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpdc/invoke-ntpdc.texi@1.525 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc-opts.c@1.546 +113 -113
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc-opts.h@1.545 +3 -3
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc.1ntpdcman@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc.html@1.370 +209 -215
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc.man.in@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpdc/ntpdc.mdoc.in@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpq/invoke-ntpq.texi@1.535 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq-opts.c@1.555 +120 -120
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq-opts.h@1.553 +3 -3
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq.1ntpqman@1.363 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq.1ntpqmdoc@1.363 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq.html@1.200 +815 -813
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq.man.in@1.363 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpq/ntpq.mdoc.in@1.363 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.525 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.546 +68 -68
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.545 +3 -3
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.354 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.354 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd.html@1.192 +52 -39
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.354 +2 -2
+ NTP_4_2_8P18_RC1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.354 +2 -2
+ NTP_4_2_8P18_RC1
+
+ packageinfo.sh@1.551 +3 -3
+ NTP_4_2_8P18_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.115 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.117 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.116 +30 -51
+ NTP_4_2_8P18_RC1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.114 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.117 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.119 +1 -1
+ NTP_4_2_8P18_RC1
+
+ scripts/invoke-plot_summary.texi@1.137 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/invoke-summary.texi@1.136 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.348 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/ntp-wait-opts@1.84 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.343 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.345 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/ntp-wait.html@1.364 +109 -93
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.343 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.345 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.134 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/ntpsweep-opts@1.87 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.122 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.122 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/ntpsweep.html@1.136 +39 -65
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.122 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.123 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.137 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/ntptrace-opts@1.87 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.122 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.124 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/ntptrace.html@1.137 +96 -81
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/ntptrace.man.in@1.122 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.125 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/plot_summary-opts@1.88 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/plot_summary.1plot_summaryman@1.135 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/plot_summary.1plot_summarymdoc@1.135 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/plot_summary.html@1.139 +46 -73
+ NTP_4_2_8P18_RC1
+
+ scripts/plot_summary.man.in@1.135 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/plot_summary.mdoc.in@1.135 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/summary-opts@1.87 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/summary.1summaryman@1.134 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/summary.1summarymdoc@1.134 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/summary.html@1.138 +41 -66
+ NTP_4_2_8P18_RC1
+
+ scripts/summary.man.in@1.134 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/summary.mdoc.in@1.134 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/invoke-update-leap.texi@1.35 +1 -1
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/update-leap-opts@1.37 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/update-leap.1update-leapman@1.35 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.36 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/update-leap.html@1.35 +48 -80
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/update-leap.man.in@1.35 +2 -2
+ NTP_4_2_8P18_RC1
+
+ scripts/update-leap/update-leap.mdoc.in@1.36 +2 -2
+ NTP_4_2_8P18_RC1
+
+ sntp/invoke-sntp.texi@1.525 +2 -2
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp-opts.c@1.547 +161 -161
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp-opts.h@1.545 +3 -3
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp.1sntpman@1.360 +2 -2
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp.1sntpmdoc@1.360 +2 -2
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp.html@1.541 +258 -267
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp.man.in@1.360 +2 -2
+ NTP_4_2_8P18_RC1
+
+ sntp/sntp.mdoc.in@1.360 +2 -2
+ NTP_4_2_8P18_RC1
+
+ util/invoke-ntp-keygen.texi@1.528 +2 -2
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen-opts.c@1.549 +174 -174
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen-opts.h@1.547 +3 -3
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen.1ntp-keygenman@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen.html@1.201 +676 -652
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen.man.in@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ util/ntp-keygen.mdoc.in@1.356 +2 -2
+ NTP_4_2_8P18_RC1
+
+ChangeSet@1.4056, 2024-04-28 22:49:42-05:00, stenn@stenn.chi1.ntfo.org
+ [Bug 2734] TEST3 prevents initial interleave sync
+
+ ChangeLog@1.2097 +1 -0
+ [Bug 2734] TEST3 prevents initial interleave sync
+
+ ntpd/ntp_proto.c@1.459 +3 -1
+ [Bug 2734] TEST3 prevents initial interleave sync
+
+ChangeSet@1.4055, 2024-04-21 03:19:48-05:00, harlan@stenn.chi1.ntfo.org
+ [Bug 3910] Memory leak using openssl-3 <hart@ntp.org>
+
+ ChangeLog@1.2096 +1 -0
+ [Bug 3910] Memory leak using openssl-3 <hart@ntp.org>
+
+ChangeSet@1.4054, 2024-04-21 03:11:17-05:00, harlan@stenn.chi1.ntfo.org
+ [Bug 3918] Tweak openssl header/library handling. <stenn@ntp.org>
+
+ ChangeLog@1.2095 +3 -3
+ [Bug 3918] Tweak openssl header/library handling. <stenn@ntp.org>
+
+ChangeSet@1.4053, 2024-04-17 04:23:11-05:00, harlan@stenn.chi1.ntfo.org
+ [Bug 3870] Server drops client packets with ppoll < 4. <stenn@ntp.org>
+
+ ChangeLog@1.2094 +1 -0
+ [Bug 3870] Server drops client packets with ppoll < 4. <stenn@ntp.org>
+
+ ntpd/ntp_proto.c@1.458 +5 -0
+ [Bug 3870] Server drops client packets with ppoll < 4. <stenn@ntp.org>
+
+ChangeSet@1.4052, 2024-04-17 01:06:36-05:00, harlan@stenn.chi1.ntfo.org
+ [Bug 3912] Avoid rare math errors in ntptrace. <brian.utterback@oracle.com>
+
+ ChangeLog@1.2093 +1 -0
+ [Bug 3912] Avoid rare math errors in ntptrace. <brian.utterback@oracle.com>
+
+ scripts/ntptrace/ntptrace.in@1.14 +10 -0
+ [Bug 3912] Avoid rare math errors in ntptrace. <brian.utterback@oracle.com>
+
+ChangeSet@1.4051, 2024-04-16 21:21:02-05:00, harlan@stenn.chi1.ntfo.org
+ [Bug 3756] Improve OpenSSL-3 detection and usage.
+
+ ChangeLog@1.2092 +1 -0
+ [Bug 3756] Improve OpenSSL-3 detection and usage.
+
+ChangeSet@1.4050, 2024-04-16 18:54:42-05:00, harlan@stenn.chi1.ntfo.org
+ [Bug 3874] ntp_openssl.m4: openssl detection cleanup. <stenn@ntp.org>
+
+ ChangeLog@1.2091 +1 -1
+ [Bug 3874] ntp_openssl.m4: openssl detection cleanup. <stenn@ntp.org>
+
+ChangeSet@1.4040.3.2, 2024-04-15 18:23:02-07:00, harlan@ntp-testbuild.tal1.ntfo.org
+ openssl detection cleanup
+
+ ChangeLog@1.2085.3.2 +1 -0
+ openssl detection cleanup
+
+ sntp/m4/ntp_openssl.m4@1.36.1.1 +115 -0
+ openssl detection cleanup
+
+ChangeSet@1.4040.2.3, 2024-04-15 23:27:13+00:00, davehart@tl.ntp.md
+ revert unintended change to "case BLAH:" label indent level in ntp_proto.c
+
+ ntpd/ntp_proto.c@1.454.2.2 +10 -11
+ revert unintended change to "case BLAH:" label indent level.
+
+ChangeSet@1.4040.2.2, 2024-04-15 22:28:07+00:00, davehart@tl.ntp.md
+ Log failures to allocate receive buffers.
+
+ ChangeLog@1.2085.2.2 +1 -0
+ Log failures to allocate receive buffers.
+
+ libntp/recvbuff.c@1.46 +26 -13
+ Log failures to allocate receive buffers.
+
+ChangeSet@1.4040.3.1, 2024-04-14 23:49:56-07:00, harlan@ntp-testbuild.tal1.ntfo.org
+ Wire in --enable-build-framework
+
+ ChangeLog@1.2085.3.1 +1 -0
+ Wire in --enable-build-framework
+
+ configure.ac@1.634.2.1 +17 -0
+ Wire in --enable-build-framework
+
+ChangeSet@1.4040.2.1, 2024-04-13 18:47:27+00:00, davehart@tl.ntp.md
+ [Bug 3914] Spurious "Unexpected origin timestamp" logged after time stepped.
+
+ ChangeLog@1.2085.2.1 +2 -0
+ [Bug 3914] Spurious "Unexpected origin timestamp" logged after time stepped.
+
+ ntpd/ntp_proto.c@1.454.2.1 +34 -20
+ [Bug 3914] Spurious "Unexpected origin timestamp" logged after time stepped.
+ Log suggested poll value with KoD.
+
+ChangeSet@1.4040.1.5, 2024-04-12 12:23:49+00:00, davehart@tl.ntp.md
+ Update libtool initialization macros to recommended.
+ Quiet some more Autoconf deprecation warnings.
+
+ configure.ac@1.634.1.1 +2 -3
+ Update libtool initialization macros to recommended.
+
+ ntpsnmpd/netsnmp_daemonize.c@1.8 +4 -12
+ https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#AC_005fHEADER_005fTIME
+
+ sntp/configure.ac@1.92.1.1 +2 -3
+ Update libtool initialization macros to recommended.
+
+ sntp/libevent/configure.ac@1.21 +1 -1
+ Quiet Autoconf warning by using equivalent non-obsolete macro.
+
+ sntp/libevent/m4/acx_pthread.m4@1.2 +1 -1
+ Quiet Autoconf warning by using equivalent non-obsolete macro.
+
+ sntp/m4/ntp_compiler.m4@1.11 +1 -6
+ Quiet Autoconf warning by using equivalent non-obsolete macro.
+
+ sntp/m4/ntp_libntp.m4@1.41.1.1 +1 -1
+ https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#AC_005fHEADER_005fTIME
+
+ChangeSet@1.4040.1.4, 2024-04-11 02:51:34+00:00, davehart@tl.ntp.md
+ [Bug 3913] Avoid duplicate IPv6 link-local manycast associations.
+ Complete the switch from struct interface to endpt.
+
+ ChangeLog@1.2085.1.2 +2 -0
+ [Bug 3913] Avoid duplicate IPv6 link-local manycast associations.
+
+ include/ntp.h@1.239.1.1 +6 -5
+ Complete the switch from struct interface to endpt.
+
+ include/ntp_control.h@1.61 +1 -1
+ Complete the switch from struct interface to endpt.
+
+ include/ntp_net.h@1.15 +1 -1
+ Complete the switch from struct interface to endpt.
+
+ include/ntpd.h@1.214 +3 -3
+ Complete the switch from struct interface to endpt.
+
+ libntp/socket.c@1.11 +8 -8
+ Complete the switch from struct interface to endpt.
+
+ ntpd/ntp_config.c@1.389 +2 -2
+ Complete the switch from struct interface to endpt.
+
+ ntpd/ntp_control.c@1.242.1.1 +8 -8
+ Complete the switch from struct interface to endpt.
+
+ ntpd/ntp_crypto.c@1.193.1.3 +1 -1
+ Complete the switch from struct interface to endpt.
+
+ ntpd/ntp_io.c@1.443.1.2 +200 -262
+ [Bug 3913] Avoid duplicate IPv6 link-local manycast associations.
+
+ ntpd/ntp_proto.c@1.454.1.1 +33 -10
+ [Bug 3913] Avoid duplicate IPv6 link-local manycast associations.
+
+ ports/winnt/include/ntp_iocpltypes.h@1.7 +0 -1
+ omplete the switch from struct interface to endpt.
+
+ChangeSet@1.4040.1.3, 2024-04-11 01:49:09+00:00, davehart@tl.ntp.md
+ [Bug 3909] Do not select multicast local address for unicast peer.
+
+ ChangeLog@1.2085.1.1 +2 -0
+ [Bug 3909] Do not select multicast local address for unicast peer.
+
+ ntpd/ntp_io.c@1.443.1.1 +26 -20
+ [Bug 3909] Do not select multicast local address for unicast peer.
+
+ChangeSet@1.4047, 2024-04-08 04:35:34+00:00, davehart@tl.ntp.md
+ Fix mismatched braces breaking --enable-leap-smear builds (my mistake).
+ Test --enable-leap-smear in one of the flock-build variants.
+
+ flock-build@1.54 +3 -15
+ Build with leap smearing code active in the -noopenssl variant.
+ Remove references to Dr. Mills' backroom hosts, update udel hosts.
+
+ ntpd/ntp_timer.c@1.102 +3 -2
+ Fix mismatched braces breaking --enable-leap-smear builds (my mistake).
+
+ChangeSet@1.4045, 2024-04-04 21:49:45+00:00, davehart@fips-22-04.davehart.net
+ [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3.
+
+ ChangeLog@1.2088 +1 -0
+ [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3.
+
+ include/Makefile.am@1.59 +1 -0
+ add c99_snprintf.h to quiet [v]snprintf.h redefinition warnings.
+
+ include/ntp.h@1.240 +8 -2
+ Provide more digest size macros for unit tests.
+
+ libntp/a_md5encrypt.c@1.59 +12 -15
+ Do not terminate program on EVP_DigestInit() failure.
+
+ libntp/authkeys.c@1.48 +3 -0
+ Comment only
+
+ libntp/ssl_init.c@1.34 +0 -3
+ Move MD5_LENGTH macro to ntp.h
+
+ ntpd/ntp_io.c@1.446 +1 -1
+ Don't assume AF_UNSPEC is 0.
+
+ sntp/crypto.c@1.43 +33 -39
+ Use size_t rath4er than int/u_int.
+ Add digest buffer size arg to sntp's compute_mac().
+
+ sntp/crypto.h@1.16 +8 -7
+ Use size_t and keyid_t rather than int/u_int.
+
+ sntp/main.c@1.109 +10 -10
+ Close broadcast sockets in sntp's kill_asyncio().
+
+ sntp/tests/crypto.c@1.20 +124 -63
+ Switch unit test digest algorithm from MD5 to SHAKE128 so it works on FIPS OpenSSL.
+
+ sntp/tests/packetHandling.c@1.8 +35 -15
+ Switch unit test digest algorithm from MD5 to SHAKE128 so it works on FIPS OpenSSL.
+
+ sntp/tests/packetProcessing.c@1.21 +112 -54
+ Add SHAKE128 test, make MD5 test XFAIL to handle FIPS OpenSSL.
+
+ sntp/tests/run-crypto.c@1.10 +10 -10
+ generated
+
+ sntp/tests/run-packetProcessing.c@1.16 +19 -17
+ generated
+
+ sntp/unity/unity_internals.h@1.8 +6 -4
+ Make TEST_EXPECT_FAIL_MESSAGE() work. (Not in upstream)
+
+ tests/libntp/a_md5encrypt.c@1.20 +76 -32
+ Convert MAC unit tests to use SHA1 instead of MD5 for FIPS.
+
+ tests/libntp/digests.c@1.3 +1 -1
+ FIPS OpenSSL is expected to fail to initialize some digests.
+
+ tests/libntp/run-a_md5encrypt.c@1.19 +5 -5
+ generated
+
+ tests/libntp/run-digests.c@1.4 +2 -2
+ generated
+
+ tests/libntp/run-ssl_init.c@1.12 +7 -7
+ generated
+
+ tests/libntp/ssl_init.c@1.12 +3 -7
+ Remove redundant digest length identifiers
+
+ util/lsf-times.c@1.1 +1 -0
+ Stub needed by prior cset util/Makefile.am
+
+ util/lsf-times.c@1.0 +0 -0
+
+ChangeSet@1.4004.7.1, 2024-03-27 02:27:21-07:00, ntpreleng@ntp-bk2git.tal1.ntfo.org
+ authors.txt:
+ Add another email for Pearly
+
+ BitKeeper/etc/authors.txt@1.4 +1 -0
+ Add another email for Pearly
+
+ChangeSet@1.4044, 2024-03-04 13:16:37+00:00, davehart@tl.ntp.md
+ Build MD5 support even with OpenSSL to accomodate FIPS OpenSSL which lacks it.
+ Cache EVP_MD_CTX to avoid many alloc/frees around digest ops.
+
+ include/ntp_md5.h@1.17 +13 -11
+ Build MD5 support even with OpenSSL to accomodate FIPS OpenSSL which lacks it.
+
+ include/ntp_stdlib.h@1.95 +4 -3
+ Cache EVP_MD_CTX to avoid many alloc/frees around digest ops.
+
+ libntp/a_md5encrypt.c@1.58 +33 -64
+ Cache EVP_MD_CTX to avoid many alloc/frees around digest ops.
+
+ libntp/ssl_init.c@1.33 +13 -9
+ Cache EVP_MD_CTX to avoid many alloc/frees around digest ops.
+
+ ntpd/ntp_control.c@1.243 +20 -31
+ Use non-OpenSSL MD5 for mode 6 nonce generation.
+
+ ntpd/ntp_crypto.c@1.196 +16 -41
+ Cache EVP_MD_CTX to avoid many alloc/frees around digest ops.
+
+ ntpd/ntp_proto.c@1.455 +3 -3
+ Clean up debug output of timestamps.
+
+ ports/winnt/include/msvc_ssl_autolib.h@1.4 +1 -1
+ spelling
+
+ChangeSet@1.4043, 2024-02-23 09:09:57+00:00, hart@hart.chi1.ntfo.org
+ ntp_io.c:
+ clean up warnings about math with void *
+
+ ntpd/ntp_io.c@1.445 +3 -2
+ clean up warnings about math with void *
+
+ChangeSet@1.4042, 2024-02-23 08:49:49+00:00, davehart@fips-22-04.davehart.net
+ Remove deprecated configure --with-arlib option.
+ Remove configure support for ISC UNIX ca. 1998.
+ Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP.
+ Move ENABLE_CMAC to ntp_openssl.m4, enabling sntp/tests CMAC unit tests.
+ Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS.
+ Eliminate [v]snprintf redefinition warnings on macOS.
+ Fix clang 14 cast increases alignment warning on Linux.
+ Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests.
+ Use NTP_HARD_CPPFLAGS in libopts tearoff.
+
+ BitKeeper/etc/ignore@1.99 +2 -0
+ added sntp/libevent/build-aux/test-driver
+
+ BitKeeper/etc/ignore@1.98 +1 -0
+ added html/.datecheck
+
+ ChangeLog@1.2087 +12 -1
+ Remove deprecated configure --with-arlib option.
+ Remove configure support for ISC UNIX ca. 1998.
+ Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP.
+ Move ENABLE_CMAC to ntp_openssl.m4, enabling sntp/tests CMAC unit tests.
+ Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS.
+ Eliminate [v]snprintf redefinition warnings on macOS.
+ Fix clang 14 cast increases alignment warning on Linux.
+ Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests.
+ Use NTP_HARD_CPPFLAGS in libopts tearoff.
+
+ configure.ac@1.635 +2 -30
+ Remove deprecated configure --with-arlib option.
+ Remove support for ISC UNIX ca. 1998.
+ Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP.
+ Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests.
+
+ include/c99_snprintf.h@1.1 +28 -0
+ Eliminate [v]snprintf redefinition warnings on macOS.
+
+ include/c99_snprintf.h@1.0 +0 -0
+
+ libntp/ntp_intres.c@1.103 +0 -6
+ Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS.
+
+ ntpd/ntp_io.c@1.444 +3 -5
+ Eliminate clang 14 cast increases alignment warning re: nlmsghdr.
+
+ sntp/configure.ac@1.93 +1 -2
+ Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP.
+
+ sntp/libopts/Makefile.am@1.32 +1 -3
+ Remove unneeded libopts_la_CPPFLAGS which prevented NTP_HARD_CPPFLAGS from being used.
+ Eliminate [v]snprintf redefinition warnings on macOS.
+
+ sntp/m4/ntp_libntp.m4@1.42 +6 -66
+ Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP.
+ Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS.
+ Eliminate [v]snprintf redefinition warnings on macOS.
+
+ sntp/m4/ntp_openssl.m4@1.37 +12 -1
+ Move ENABLE_CMAC to ntp_openssl.m4, enabling sntp/tests CMAC unit tests.
+ Fix ntp_openssl.m4 manual libcrypto search by clearing _cv_ var.
+
+ sntp/tests/crypto.c@1.19 +20 -20
+ Improve test ignore messages.
+
+ sntp/tests/packetProcessing.c@1.20 +1 -1
+ Improve test ignore messages.
+
+ sntp/tests/run-packetProcessing.c@1.15 +19 -19
+ Should have been regenerated last March, oops.
+
+ChangeSet@1.4040.1.1, 2024-02-18 01:31:23-08:00, harlan@ntp-testbuild.tal1.ntfo.org
+ Makefile.am:
+ distribute lsf-times.c in util/Makefile.am
+ lsf-times.c:
+ new file
+ run-refnumtoa.c, run-bug-2803.c:
+ Check in regenerated files
+
+ tests/bug-2803/run-bug-2803.c@1.12 +1 -1
+ Check in regenerated files
+
+ tests/libntp/run-refnumtoa.c@1.12 +2 -2
+ Check in regenerated files
+
+ util/Makefile.am@1.85 +1 -0
+ distribute lsf-times.c in util/Makefile.am
+
+ util/lsf-times.c@1.1 +220 -0
+ BitKeeper file util/lsf-times.c
+
+ util/lsf-times.c@1.0 +0 -0
+
+ChangeSet@1.4040, 2024-02-01 02:22:21-06:00, stenn@stenn.chi1.ntfo.org
+ Fix another extra */
+
+ libparse/ieee754io.c@1.15 +1 -1
+ Fix another extra */
+
+ChangeSet@1.4039, 2024-01-31 21:43:41-08:00, harlan@ntp-testbuild.tal1.ntfo.org
+ Remove an extra */ from libparse/ieee754io.c
+
+ ChangeLog@1.2085 +1 -0
+ Remove an extra */ from libparse/ieee754io.c
+
+ libparse/ieee754io.c@1.14 +1 -1
+ Remove an extra */ from libparse/ieee754io.c
+
+ChangeSet@1.4038, 2024-01-31 21:00:01-08:00, harlan@ntp-testbuild.tal1.ntfo.org
+ Fix .datecheck location in Makefile.am
+
+ ChangeLog@1.2084 +1 -0
+ Fix .datecheck location in Makefile.am
+
+ Makefile.am@1.140 +1 -1
+ Fix .datecheck location in Makefile.am
+
+ChangeSet@1.4036, 2024-01-31 20:47:13+00:00, davehart@tl.ntp.md
+ #ifdef out unused put_ieee754() which triggers a warning and appears buggy.
+ Insert newlines in long error messages in ntp_openssl.m4, ntp_crypto_rand.m4.
+
+ libparse/ieee754io.c@1.13 +21 -2
+ #ifdef out unused put_ieee754() which triggers a warning and appears buggy.
+
+ sntp/m4/ntp_crypto_rand.m4@1.5 +10 -9
+ Insert newlines in long error message.
+
+ sntp/m4/ntp_openssl.m4@1.36 +20 -13
+ Insert newlines in long error messages.
+
+ChangeSet@1.4035, 2024-01-30 09:00:44+00:00, davehart@tl.ntp.md
+ Avoid running checkHtmlFileDates script repeatedly when no html/*.html
+ files have changed.
+ Correct comment, clarify configure --help text re: --with-autokey.
+ Display KoD refid as text in recently added message.
+ Correct OpenSSL usage in Autokey code to avoid warnings about
+ discarding const qualifiers with OpenSSL 3.
+ Avoid clang warning "a function declaration without a prototype is
+ deprecated in all versions of C".
+ Abort configure if --enable-crypto-rand given & unavailable.
+ improve --help output for --enable-c99-snprintf.
+ Add configure --enable-verbose-ssl to trace SSL detection.
+ Silence warnings about dropping const qualifier by making a copy
+ of OpenSSL key data before modifying it in ntp-keygen.
+ Display KoD refid as text in recently added message.
+ Add build test coverage for --disable-saveconfig to flock-build script.
+
+ ChangeLog@1.2082 +11 -2
+ Display KoD refid as text in recently added message.
+ Correct OpenSSL usage in Autokey code to avoid warnings about
+ discarding const qualifiers with OpenSSL 3.
+ Avoid running checkHtmlFileDates script repeatedly when no html/*.html
+ + files have changed.
+ Add configure --enable-verbose-ssl to trace SSL detection.
+ Add build test coverage for --disable-saveconfig to flock-build script.
+
+ Makefile.am@1.139 +1 -1
+ Avoid running checkHtmlFileDates script repeatedly when no html/*.html
+ files have changed.
+
+ configure.ac@1.634 +2 -2
+ Correct comment, clarify configure --help text re: --with-autokey.
+
+ flock-build@1.53 +2 -2
+ Add build test coverage for --disable-saveconfig to flock-build script.
+
+ libntp/numtoa.c@1.11 +37 -30
+ Display KoD refid as text in recently added message.
+
+ ntpd/ntp_crypto.c@1.193.1.2 +44 -28
+ Correct OpenSSL usage in Autokey code to avoid warnings about
+ discarding const qualifiers with OpenSSL 3.
+
+ ntpd/ntp_io.c@1.443 +1 -1
+ Avoid clang warning "a function declaration without a prototype is
+ deprecated in all versions of C"
+
+ ntpd/ntp_proto.c@1.454 +1 -1
+ Display KoD refid as text in recently added message.
+
+ ntpd/ntp_scanner.c@1.54 +3 -3
+ Avoid clang warning "a function declaration without a prototype is
+ deprecated in all versions of C"
+
+ ntpd/refclock_arc.c@1.35 +8 -5
+ Quiet unused-but-set warning when building non-debug.
+
+ scripts/build/checkHtmlFileDates@1.3 +18 -2
+ Avoid running checkHtmlFileDates script repeatedly when no html/*.html
+ files have changed.
+
+ sntp/m4/ntp_crypto_rand.m4@1.4 +29 -7
+ Abort configure if --enable-crypto-rand given & unavailable.
+
+ sntp/m4/ntp_libntp.m4@1.41 +4 -1
+ improve --help output for --enable-c99-snprintf.
+
+ sntp/m4/ntp_openssl.m4@1.35 +24 -11
+ Add configure --enable-verbose-ssl to trace SSL detection.
+
+ tests/libntp/calendar.c@1.19 +3 -3
+ Avoid clang warning "a function declaration without a prototype is
+ deprecated in all versions of C"
+
+ tests/libntp/clocktime.c@1.10 +2 -2
+ Avoid clang warning "a function declaration without a prototype is
+ deprecated in all versions of C"
+
+ tests/libntp/refnumtoa.c@1.8 +24 -26
+ Display KoD refid as text in recently added message.
+
+ util/ntp-keygen.c@1.113 +35 -20
+ Silence warnings about dropping const qualifier by making a copy
+ of OpenSSL key data before modifying it.
+
+ChangeSet@1.4034, 2024-01-27 00:22:53+00:00, davehart@tl.ntp.md
+ [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe.
+ Suppress OpenSSL 3 deprecation warning clutter.
+ Fix problem with statisics files not being generated (broken after 4.2.8p17)
+ Remove unneeded 200ms wait during NT service shutdown.
+ Do not compile unneded bsd_strerror.c on Windows.
+ Reduce HAVE_IO_COMPLETION_PORT #ifdef clutter by moving calls
+ to io_completion_port_remove_socket into
+ close_and_delete_fd_from_list().
+ Silence warnings building on macOS about incompatible types
+ for timeval.tv_usec.
+ Move massive config parser debug output from debug level 5 to 9.
+ Move yylex() debug output from level 4 to level 10.
+ Change overallocated 1k static lexeme buffer to 128 bytes.
+
+ ChangeLog@1.2081 +3 -0
+ [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe.
+ Suppress OpenSSL 3 deprecation warning clutter.
+
+ include/ntpd.h@1.213 +2 -1
+ Add eptoa() (endpoint to ascii) alternative name for latoa()
+ (local address to ascii).
+
+ libntp/lib/isc/win32/strerror.c@1.18 +21 -14
+ [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe.
+
+ libntp/work_thread.c@1.29 +1 -1
+ correct the correction
+
+ ntpd/ntp_config.c@1.388 +9 -10
+ Fix problem with statisics files not being generated (broken since 4.2.8p17)
+ Move massive config parser debug output from debug level 5 to 9.
+ Avoid "may be used uninitialized" warning re: match_type & action.
+
+ ntpd/ntp_io.c@1.442 +30 -33
+ Reduce HAVE_IO_COMPLETION_PORT #ifdef clutter by moving calls
+ to io_completion_port_remove_socket into
+ close_and_delete_fd_from_list().
+
+ ntpd/ntp_peer.c@1.170 +36 -14
+ Use eptoa() iinstead of equivalent latoa() with endpt *
+
+ ntpd/ntp_scanner.c@1.53 +10 -6
+ Move yylex() debug output from level 4 to level 10.
+ Change overallocated 1k static lexeme buffer to 128 bytes.
+
+ ports/winnt/include/ntp_iocpltypes.h@1.6 +1 -1
+ comment only
+
+ ports/winnt/ntpd/ntservice.c@1.35 +1 -3
+ Do not shut down IO thread until after peers are removed to prevent
+ assertion unpeering a serial refclock.
+ Remove unneeded 200ms wait during service shutdown.
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.12 +0 -1
+ Do not compile unneded bsd_strerror.c on Windows
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.12 +0 -3
+ Do not compile unneded bsd_strerror.c on Windows
+
+ sntp/m4/ntp_openssl.m4@1.34 +9 -1
+ Suppress OpenSSL 3 deprecation warning clutter.
+ Add missing -I in search for evp.h.
+
+ tests/bug-2803/bug-2803.c@1.11 +4 -5
+ Silence warnings building on macOS about incompatible types
+ for timeval.tv_usec.
+
+ tests/libntp/timevalops.c@1.16 +3 -3
+ Suppress OpenSSL 3 deprecation warning clutter.
+
+ChangeSet@1.4028.2.1, 2024-01-22 06:54:06+00:00, davehart@tl.ntp.md
+ [Bug 3901] LIB_GETBUF isn't thread-safe.
+ [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on
+ Windows.
+ [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates
+ duplicate associations.
+ Remove useless pointer to Windows Help from system error messages.
+ Avoid newlines within Windows error messages.
+ Ensure unique association IDs if wrapped.
+ Write frequency file to 6 digits after decimal.
+ Unpeer on shutdown as long done on POSIX systems.
+
+ Simplify calc_addr_distance().
+ Clamp min/maxpoll in edge cases in newpeer().
+ Quiet local addr change logginig when unpeering.
+ Correct missing arg for %s printf specifier in
+ send_blocking_resp_internal().
+
+ ChangeLog@1.2077.2.1 +13 -0
+ [Bug 3901] LIB_GETBUF isn't thread-safe.
+ [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on
+ Windows.
+ [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates
+ duplicate associations.
+ Remove useless pointer to Windows Help from system error messages.
+ Avoid newlines within Windows error messages.
+ Ensure unique association IDs if wrapped.
+ Simplify calc_addr_distance().
+ Clamp min/maxpoll in edge cases in newpeer().
+ Quiet local addr change logginig when unpeering.
+ Correct missing arg for %s printf specifier in
+ send_blocking_resp_internal().
+
+ include/lib_strbuf.h@1.13 +10 -15
+ Minimize chances of LIB_STRBUF threading problems (more to come).
+ ---
+ [Bug 3901] LIB_GETBUF isn't thread-safe.
+
+ include/ntp.h@1.236.1.3 +5 -0
+ Quiet local addr change logginig when unpeering.
+
+ libntp/lib/isc/win32/strerror.c@1.17 +30 -3
+ Remove useless pointer to Windows Help from system error messages.
+ Avoid newlines within Windows error messages.
+
+ libntp/lib_strbuf.c@1.13 +39 -15
+ [Bug 3901] LIB_GETBUF isn't thread-safe.
+
+ libntp/work_thread.c@1.28 +6 -2
+ Correct missing arg for %s printf specifier in send_blocking_resp_internal.
+
+ ntpd/ntp_io.c@1.438.1.3 +47 -50
+ Simplify calc_addr_distance().
+
+ ntpd/ntp_peer.c@1.169 +97 -71
+ [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient
+ creates duplicate associations.
+ Ensure unique association IDs even if we wrap 16 bits.
+ Never change interface for a link-local remote addreess.
+ Clamp min/maxpoll in edge cases in newpeer().
+ Quiet local addr change logginig when unpeering.
+
+ ntpd/ntp_proto.c@1.450.1.3 +20 -7
+ [Bug 3900] fast_xmit() selects wrong local addr responding
+ to mcast on Windows.
+ ---
+ whoops
+
+ ntpd/ntp_util.c@1.125.1.1 +5 -7
+ Write frequency file to 6 digits after decimal.
+
+ ntpq/ntpq-subs.c@1.135.1.1 +1 -1
+ Remove no-op cast.
+
+ ports/winnt/ntpd/ntservice.c@1.34 +1 -0
+ Unpeer on shutdown as long done on POSIX systems.
+
+ChangeSet@1.4028.1.1, 2024-01-07 00:46:19-08:00, harlan@ntp-testbuild.tal1.ntfo.org
+ Makefile.am:
+ Added util/lsf-times
+ Many files:
+ Update copyright year to 2024
+
+ ChangeLog@1.2077.1.1 +2 -0
+ Update copyright year to 2024
+
+ html/copyright.html@1.74 +2 -2
+ Update copyright year to 2024
+
+ ntpd/invoke-ntp.conf.texi@1.228 +1 -1
+ Update copyright year to 2024
+
+ ntpd/invoke-ntp.keys.texi@1.211 +1 -1
+ Update copyright year to 2024
+
+ ntpd/invoke-ntpd.texi@1.525 +1 -1
+ Update copyright year to 2024
+
+ ntpd/ntp.conf.5man@1.262 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntp.conf.5mdoc@1.262 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntp.conf.html@1.210 +817 -765
+ Update copyright year to 2024
+
+ ntpd/ntp.conf.man.in@1.262 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntp.conf.mdoc.in@1.262 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntp.keys.5man@1.245 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntp.keys.5mdoc@1.245 +4 -4
+ Update copyright year to 2024
+
+ ntpd/ntp.keys.html@1.205 +97 -105
+ Update copyright year to 2024
+
+ ntpd/ntp.keys.man.in@1.245 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntp.keys.mdoc.in@1.245 +4 -4
+ Update copyright year to 2024
+
+ ntpd/ntpd-opts.c@1.550 +4 -4
+ Update copyright year to 2024
+
+ ntpd/ntpd-opts.h@1.549 +2 -2
+ Update copyright year to 2024
+
+ ntpd/ntpd.1ntpdman@1.354 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntpd.1ntpdmdoc@1.354 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntpd.html@1.199 +427 -398
+ Update copyright year to 2024
+
+ ntpd/ntpd.man.in@1.354 +3 -3
+ Update copyright year to 2024
+
+ ntpd/ntpd.mdoc.in@1.354 +3 -3
+ Update copyright year to 2024
+
+ ntpdc/invoke-ntpdc.texi@1.524 +1 -1
+ Update copyright year to 2024
+
+ ntpdc/ntpdc-opts.c@1.545 +4 -4
+ Update copyright year to 2024
+
+ ntpdc/ntpdc-opts.h@1.544 +2 -2
+ Update copyright year to 2024
+
+ ntpdc/ntpdc.1ntpdcman@1.355 +3 -3
+ Update copyright year to 2024
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.355 +3 -3
+ Update copyright year to 2024
+
+ ntpdc/ntpdc.html@1.369 +215 -209
+ Update copyright year to 2024
+
+ ntpdc/ntpdc.man.in@1.355 +3 -3
+ Update copyright year to 2024
+
+ ntpdc/ntpdc.mdoc.in@1.355 +3 -3
+ Update copyright year to 2024
+
+ ntpq/invoke-ntpq.texi@1.534 +1 -1
+ Update copyright year to 2024
+
+ ntpq/ntpq-opts.c@1.554 +4 -4
+ Update copyright year to 2024
+
+ ntpq/ntpq-opts.h@1.552 +2 -2
+ Update copyright year to 2024
+
+ ntpq/ntpq.1ntpqman@1.362 +3 -3
+ Update copyright year to 2024
+
+ ntpq/ntpq.1ntpqmdoc@1.362 +3 -3
+ Update copyright year to 2024
+
+ ntpq/ntpq.html@1.199 +813 -815
+ Update copyright year to 2024
+
+ ntpq/ntpq.man.in@1.362 +3 -3
+ Update copyright year to 2024
+
+ ntpq/ntpq.mdoc.in@1.362 +3 -3
+ Update copyright year to 2024
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.524 +2 -2
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.545 +4 -4
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.544 +2 -2
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.353 +3 -3
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.353 +3 -3
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd.html@1.191 +39 -52
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd.man.in@1.353 +3 -3
+ Update copyright year to 2024
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.353 +3 -3
+ Update copyright year to 2024
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.114 +2 -2
+ Update copyright year to 2024
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.116 +2 -2
+ Update copyright year to 2024
+
+ scripts/calc_tickadj/calc_tickadj.html@1.115 +50 -29
+ Update copyright year to 2024
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.113 +2 -2
+ Update copyright year to 2024
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.116 +2 -2
+ Update copyright year to 2024
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.118 +1 -1
+ Update copyright year to 2024
+
+ scripts/invoke-plot_summary.texi@1.136 +1 -1
+ Update copyright year to 2024
+
+ scripts/invoke-summary.texi@1.135 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.347 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntp-wait/ntp-wait-opts@1.83 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.342 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.344 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntp-wait/ntp-wait.html@1.363 +93 -109
+ Update copyright year to 2024
+
+ scripts/ntp-wait/ntp-wait.man.in@1.342 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.344 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.133 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntpsweep/ntpsweep-opts@1.86 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.121 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.121 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntpsweep/ntpsweep.html@1.135 +63 -37
+ Update copyright year to 2024
+
+ scripts/ntpsweep/ntpsweep.man.in@1.121 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.122 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.136 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntptrace/ntptrace-opts@1.86 +1 -1
+ Update copyright year to 2024
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.121 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.123 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntptrace/ntptrace.html@1.136 +81 -96
+ Update copyright year to 2024
+
+ scripts/ntptrace/ntptrace.man.in@1.121 +2 -2
+ Update copyright year to 2024
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.124 +2 -2
+ Update copyright year to 2024
+
+ scripts/plot_summary-opts@1.87 +1 -1
+ Update copyright year to 2024
+
+ scripts/plot_summary.1plot_summaryman@1.134 +2 -2
+ Update copyright year to 2024
+
+ scripts/plot_summary.1plot_summarymdoc@1.134 +2 -2
+ Update copyright year to 2024
+
+ scripts/plot_summary.html@1.138 +71 -44
+ Update copyright year to 2024
+
+ scripts/plot_summary.man.in@1.134 +2 -2
+ Update copyright year to 2024
+
+ scripts/plot_summary.mdoc.in@1.134 +2 -2
+ Update copyright year to 2024
+
+ scripts/summary-opts@1.86 +1 -1
+ Update copyright year to 2024
+
+ scripts/summary.1summaryman@1.133 +2 -2
+ Update copyright year to 2024
+
+ scripts/summary.1summarymdoc@1.133 +2 -2
+ Update copyright year to 2024
+
+ scripts/summary.html@1.137 +64 -39
+ Update copyright year to 2024
+
+ scripts/summary.man.in@1.133 +2 -2
+ Update copyright year to 2024
+
+ scripts/summary.mdoc.in@1.133 +2 -2
+ Update copyright year to 2024
+
+ scripts/update-leap/invoke-update-leap.texi@1.34 +1 -1
+ Update copyright year to 2024
+
+ scripts/update-leap/update-leap-opts@1.36 +1 -1
+ Update copyright year to 2024
+
+ scripts/update-leap/update-leap.1update-leapman@1.34 +2 -2
+ Update copyright year to 2024
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.35 +2 -2
+ Update copyright year to 2024
+
+ scripts/update-leap/update-leap.html@1.34 +79 -47
+ Update copyright year to 2024
+
+ scripts/update-leap/update-leap.man.in@1.34 +2 -2
+ Update copyright year to 2024
+
+ scripts/update-leap/update-leap.mdoc.in@1.35 +2 -2
+ Update copyright year to 2024
+
+ sntp/include/copyright.def@1.32 +1 -1
+ Update copyright year to 2024
+
+ sntp/invoke-sntp.texi@1.524 +1 -1
+ Update copyright year to 2024
+
+ sntp/sntp-opts.c@1.546 +4 -4
+ Update copyright year to 2024
+
+ sntp/sntp-opts.h@1.544 +2 -2
+ Update copyright year to 2024
+
+ sntp/sntp.1sntpman@1.359 +3 -3
+ Update copyright year to 2024
+
+ sntp/sntp.1sntpmdoc@1.359 +3 -3
+ Update copyright year to 2024
+
+ sntp/sntp.html@1.540 +267 -258
+ Update copyright year to 2024
+
+ sntp/sntp.man.in@1.359 +3 -3
+ Update copyright year to 2024
+
+ sntp/sntp.mdoc.in@1.359 +3 -3
+ Update copyright year to 2024
+
+ util/Makefile.am@1.84 +2 -1
+ Added util/lsf-times
+
+ util/invoke-ntp-keygen.texi@1.527 +1 -1
+ Update copyright year to 2024
+
+ util/ntp-keygen-opts.c@1.548 +4 -4
+ Update copyright year to 2024
+
+ util/ntp-keygen-opts.h@1.546 +2 -2
+ Update copyright year to 2024
+
+ util/ntp-keygen.1ntp-keygenman@1.355 +3 -3
+ Update copyright year to 2024
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.355 +3 -3
+ Update copyright year to 2024
+
+ util/ntp-keygen.html@1.200 +652 -676
+ Update copyright year to 2024
+
+ util/ntp-keygen.man.in@1.355 +3 -3
+ Update copyright year to 2024
+
+ util/ntp-keygen.mdoc.in@1.355 +3 -3
+ Update copyright year to 2024
+
+ChangeSet@1.4032, 2024-01-05 08:09:43+00:00, davehart@tl.ntp.md
+ Fix build failure with forking worker.
+
+ ntpd/ntpd.c@1.190.1.4 +1 -1
+ Fix simulator build.
+
+ChangeSet@1.4029.1.1, 2024-01-04 10:33:34+00:00, davehart@tl.ntp.md
+ Further changes to ensure ntp_openssl.m4 does the right thing on systems
+ where no extra flags are needed to use OpenSSL.
+ Do not disable periodic network interface scans if we are abot
+ to get notifications from Windows, as some systems are observed
+ to get those notifications very late.
+ Update NEWS to note change to require --without-crypto or error out of configure.
+
+ NEWS@1.220 +11 -0
+ Note change to require --without-crypto or error out of configure.
+
+ configure.ac@1.633 +1 -1
+ Force config.cache flush
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.87 +2 -1
+ Do not disable periodic network interface scans if we are able
+ to get notifications from Windows, as some systems are observed
+ to get those notifications very late.
+
+ sntp/configure.ac@1.92 +1 -1
+ Force config.cache flush
+
+ sntp/m4/ntp_openssl.m4@1.33 +215 -137
+ Further changes to ensure ntp_openssl.m4 does the right thing on systems
+ where no extra flags are needed to use OpenSSL.
+ Avoid silent downgrade to crypto-free build, error unless --without-crypto.
+
+ChangeSet@1.4026.2.1, 2023-10-30 04:31:05+00:00, davehart@tl.ntp.md
+ [Bug 3847] SSL detection in configure should run-test if runpath is needed.
+ Use @configure_input@ in various *.in files to include a comment that
+ the file is generated from another pointing to the *.in.
+ Correct underquoting, indents in ntp_facilitynames.m4.
+ Clean up a few warnings seen building with older gcc.
+ Fix build on older FreeBSD lacking sys/procctl.h.
+ Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix
+ that makes it unnecessary, re-enabling ASLR stack gap.
+
+ ChangeLog@1.2075.2.1 +9 -0
+ [Bug 3847] SSL detection in configure should run-test if runpath is needed.
+ Use @configure_input@ in various *.in files to include a comment that
+ the file is generated from another pointing to the *.in.
+ Correct underquoting, indents in ntp_facilitynames.m4.
+ Clean up a few warnings seen building with older gcc.
+ Fix build on older FreeBSD lacking sys/procctl.h.
+ Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix
+ that makes it unnecessary, re-enabling ASLR stack gap.
+
+ check-libntp.mf@1.4 +4 -1
+ Skip libntp submakes with --disable-dependency-tracking to save time
+ for one-off builds.
+
+ configure.ac@1.630.1.1 +7 -10
+ Use AC_MSG_FAILURE for internal error, which refers user to config.log.
+ Bump configure cache version with ntp_openssl.m4 changes, s/b unneeded.
+ Remove unneded AC_SUBST of CFLAGS & LDFLAGS.
+ Fix build on older FreeBSD lacking sys/procctl.h.
+
+ libntp/ntp_realpath.c@1.3 +22 -21
+ Remove warning for shadowing 'symlink'.
+ Enforce NTP_MAXSYMLINKS correctly.
+
+ libntp/timexsup.c@1.4 +18 -4
+ Fix build on FreeBSD 7 and other ancient systems by following the
+ pattern used elsewhere in our source for including time.h and timex.h.
+
+ libparse/Makefile.am@1.36 +5 -10
+ Use silent rules, $(SED) from Autoconf.
+
+ ntpd/complete.conf.in@1.38.1.1 +11 -11
+ Use RFC 5737 IPv4 documentation prefixes, more exemplary pool hostnames,
+ remove reference to long-gone freenet6.net.
+
+ ntpd/ntp_config.c@1.385.1.1 +20 -16
+ Clean up warning for shadowing 'poll' by renaming attrtopsl() arg
+ from poll to log2_poll.
+
+ ntpd/ntp_util.c@1.124.1.1 +2 -2
+ Uninit FILE *fp, missing %s arg.
+ Add missing arg to statsdir too long msyslog().
+
+ ntpd/ntpd.c@1.190.2.1 +28 -26
+ Remove warning about shadowing "pipe" in detach_from_terminal().
+ Fix build on older FreeBSD lacking sys/procctl.h.
+ Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix
+ that makes it unnecessary, re-enabling ASLR stack gap.
+
+ ntpdc/nl.pl.in@1.10 +1 -0
+ Add @configure_input@ comment
+
+ ntpq/ntpq-subs.c@1.136 +2 -2
+ Correct comment, indent.
+
+ ntpsnmpd/Makefile.am@1.46 +1 -1
+ Be sure the OpenSSL includes we're using come before any we get
+ from SNMP configuration.
+
+ scripts/build/genAuthors.in@1.3 +1 -0
+ Add @configure_input@ comment
+
+ scripts/build/mkver.in@1.17 +2 -0
+ Add @configure_input@ comment
+
+ scripts/calc_tickadj/calc_tickadj.in@1.5 +1 -0
+ Add @configure_input@ comment
+
+ scripts/ntp-wait/ntp-wait.in@1.13 +1 -0
+ Add @configure_input@ comment
+
+ scripts/ntpsweep/ntpsweep.in@1.10 +1 -0
+ Add @configure_input@ comment
+
+ scripts/ntptrace/ntptrace.in@1.13 +1 -0
+ Add @configure_input@ comment
+
+ scripts/ntpver.in@1.4 +2 -1
+ Add @configure_input@ comment.
+ Use equivalent "version" system variable instead of "daemon_version"
+
+ scripts/plot_summary.in@1.4 +1 -0
+ Add @configure_input@ comment
+
+ scripts/summary.in@1.4 +1 -0
+ Add @configure_input@ comment
+
+ scripts/update-leap/update-leap.in@1.7 +1 -0
+ Add @configure_input@ comment
+
+ sntp/Makefile.am@1.95 +1 -2
+ Fix syntax error "; unexpected" when --enable-local-libevent
+ is needed for "make dist"
+
+ sntp/check-libntp.mf@1.7 +5 -1
+ Skip libntp submakes with --disable-dependency-tracking to save time
+ for one-off builds.
+
+ sntp/configure.ac@1.91 +1 -1
+ Bump configure cache version, s/b unneeded
+
+ sntp/libevent/kqueue.c@1.9 +1 -1
+ Fix libevent build on older FreeBSD lacking ENOTCAPABLE.
+
+ sntp/m4/ntp_facilitynames.m4@1.2 +20 -13
+ Correct underquoting, indents.
+ No need to check for cross-compiling when we're not running the result.
+
+ sntp/m4/ntp_libntp.m4@1.40 +9 -3
+ Skip libntp submakes with --disable-dependency-tracking to save time
+ for one-off builds.
+ Require AC_PROG_SED, we get it already but document use for $SED/$(SED)
+
+ sntp/m4/ntp_openssl.m4@1.32 +323 -228
+ [Bug 3847] SSL detection in configure should run-test if runpath is needed.
+
+ sntp/tests/fileHandlingTest.h.in@1.16 +7 -1
+ Add @configure_input@ comment
+
+ChangeSet@1.4026.1.1, 2023-09-30 05:35:01+00:00, davehart@tl.ntp.md
+ [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails.
+ Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT
+ declaration from ntp_types.h to config.h.
+ Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files.
+
+ ChangeLog@1.2075.1.1 +4 -0
+ [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails.
+ Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT
+ declaration from ntp_types.h to config.h.
+
+ configure.ac@1.631 +12 -0
+ Move NONEMPTY_TRANSLATION_UNIT declaration from ntp_types.h to config.h.
+
+ include/ntp_types.h@1.40 +0 -10
+ Move NONEMPTY_TRANSLATION_UNIT declaration from ntp_types.h to config.h.
+
+ libntp/adjtime.c@1.9 +1 -1
+ Lose unused global
+
+ libntp/audio.c@1.39 +1 -1
+ Lose unused global
+
+ libntp/bsd_strerror.c@1.7 +1 -1
+ Lose unused global
+
+ libntp/snprintf.c@1.14 +1 -1
+ Lose unused global
+
+ libparse/clk_computime.c@1.14 +1 -1
+ Lose unused global
+
+ libparse/clk_dcf7000.c@1.14 +1 -1
+ Lose unused global
+
+ libparse/clk_meinberg.c@1.17 +1 -1
+ Lose unused global
+
+ libparse/clk_rawdcf.c@1.25 +1 -1
+ Lose unused global
+
+ libparse/clk_rcc8000.c@1.13 +1 -1
+ Lose unused global
+
+ libparse/clk_schmid.c@1.16 +1 -1
+ Lose unused global
+
+ libparse/clk_sel240x.c@1.5 +1 -1
+ Lose unused global
+
+ libparse/clk_trimtaip.c@1.14 +1 -1
+ Lose unused global
+
+ libparse/clk_trimtsip.c@1.16 +1 -1
+ Lose unused global
+
+ libparse/clk_varitext.c@1.13 +1 -1
+ Lose unused global
+
+ libparse/parse.c@1.22 +1 -1
+ Lose unused global
+
+ libparse/parse_conf.c@1.12 +1 -1
+ Lose unused global
+
+ ntpd/ntp_crypto.c@1.193.1.1 +1 -1
+ Lose unused global
+
+ ntpd/refclock_acts.c@1.57 +1 -1
+ Lose unused global
+
+ ntpd/refclock_arbiter.c@1.23 +1 -1
+ Lose unused global
+
+ ntpd/refclock_as2201.c@1.19 +1 -1
+ Lose unused global
+
+ ntpd/refclock_atom.c@1.63 +1 -1
+ Lose unused global
+
+ ntpd/refclock_bancomm.c@1.18 +1 -1
+ Lose unused global
+
+ ntpd/refclock_chronolog.c@1.14 +1 -1
+ Lose unused global
+
+ ntpd/refclock_conf.c@1.36 +1 -1
+ Lose unused global
+
+ ntpd/refclock_dumbclock.c@1.21 +1 -1
+ Lose unused global
+
+ ntpd/refclock_fg.c@1.18 +1 -1
+ Lose unused global
+
+ ntpd/refclock_gpsvme.c@1.11 +1 -1
+ Lose unused global
+
+ ntpd/refclock_heath.c@1.22 +1 -1
+ Lose unused global
+
+ ntpd/refclock_hopfpci.c@1.15 +1 -1
+ Lose unused global
+
+ ntpd/refclock_hopfser.c@1.20 +1 -1
+ Lose unused global
+
+ ntpd/refclock_hpgps.c@1.19 +1 -1
+ Lose unused global
+
+ ntpd/refclock_irig.c@1.38 +1 -1
+ Lose unused global
+
+ ntpd/refclock_jjy.c@1.39 +1 -1
+ Lose unused global
+
+ ntpd/refclock_jupiter.c@1.36 +1 -1
+ Lose unused global
+
+ ntpd/refclock_local.c@1.23 +1 -1
+ Lose unused global
+
+ ntpd/refclock_mx4200.c@1.33 +1 -1
+ Lose unused global
+
+ ntpd/refclock_neoclock4x.c@1.25 +1 -1
+ Lose unused global
+
+ ntpd/refclock_oncore.c@1.109 +1 -1
+ Lose unused global
+
+ ntpd/refclock_palisade.c@1.52 +1 -1
+ Lose unused global
+
+ ntpd/refclock_pcf.c@1.14 +1 -1
+ Lose unused global
+
+ ntpd/refclock_pst.c@1.15 +1 -1
+ Lose unused global
+
+ ntpd/refclock_ripencc.c@1.20 +1 -1
+ Lose unused global
+
+ ntpd/refclock_tpro.c@1.15 +1 -1
+ Lose unused global
+
+ ntpd/refclock_true.c@1.29 +1 -1
+ Lose unused global
+
+ ntpd/refclock_tsyncpci.c@1.11 +1 -1
+ Lose unused global
+
+ ntpd/refclock_tt560.c@1.5 +1 -1
+ Lose unused global
+
+ ntpd/refclock_ulink.c@1.21 +1 -1
+ Lose unused global
+
+ ntpd/refclock_wwv.c@1.81 +1 -1
+ Lose unused global
+
+ ntpd/refclock_wwvb.c@1.37 +1 -1
+ Lose unused global
+
+ ntpd/refclock_zyfer.c@1.13 +1 -1
+ Lose unused global
+
+ ntpsnmpd/netsnmp_daemonize.c@1.7 +1 -1
+ Lose unused global
+
+ ports/winnt/include/config.h@1.121 +10 -0
+ Move NONEMPTY_TRANSLATION_UNIT declaration from ntp_types.h to config.h.
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.11 +1 -0
+ Add bsd_strerror.c ref
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.11 +3 -0
+ Add bsd_strerror.c ref
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.12 +2 -1
+ Add clk_sel240x.c under Parse Lib
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.9 +5 -7
+ Add clk_sel240x.c under Parse Lib
+
+ChangeSet@1.4027, 2023-09-30 03:53:06+00:00, davehart@tl.ntp.md
+ [Bug 3872] Ignore restrict mask for hostname.
+ [Bug 3868] Cannot restrict a pool peer.
+ [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict.
+ Correct handling of not-found or unreadable or corrupt driftfile
+ to match comments by starting protocol engine in FREQ mode.
+ Add missing printf-style arg in ntp_util.c.
+ Update ntp.conf documentation to add "delrestrict" and correct
+ information about KoD rate limiting.
+
+ ChangeLog@1.2076 +6 -0
+ [Bug 3872] Ignore restrict mask for hostname.
+ [Bug 3868] Cannot restrict a pool peer.
+ [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict.
+ Update ntp.conf documentation to add "delrestrict" and correct
+ information about KoD rate limiting.
+
+ include/ntp.h@1.236.1.2 +6 -7
+ Rearrange restrict_u members for better packing.
+ Change restrict_u.expire from u_long to u_int32. 136 years is plenty of range.
+ Lose RES_FLAGS as the single place it was used has gone away.
+
+ include/ntp_config.h@1.92 +9 -4
+ [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict.
+ Expand restrict_node in syntax tree to allow delrestrict in ntp.conf
+ and preserve column along with line for error reporting.
+
+ include/ntpd.h@1.212 +6 -5
+ Indicate success with hack_restrict() return value.
+
+ include/vint64ops.h@1.4 +1 -1
+ Eliminate strtouv64() const warning mess by following strtol() model.
+
+ libntp/vint64ops.c@1.4 +11 -10
+ Eliminate strtouv64() const warning mess by following strtol() model.
+
+ ntpd/complete.conf.in@1.39 +16 -11
+ Add delrestrict lines interspersed with restrict lines.
+ Remove "ippeerlimit -1" entries as that is the default and saveconfig now omits it.
+ Remove all-ones masks as saveconfig now omits them.
+ Live up to the complete.conf name by referencing all the restrict bits.
+ Use doc-reserved IP prefixes.
+
+ ntpd/invoke-ntp.conf.texi@1.227 +40 -25
+ Autogen
+
+ ntpd/keyword-gen-utd@1.37 +1 -1
+ keyword-gen.c output
+
+ ntpd/keyword-gen.c@1.45 +1 -0
+ Add "delrestrict"
+
+ ntpd/ntp.conf.5man@1.261 +42 -26
+ Autogen
+
+ ntpd/ntp.conf.5mdoc@1.261 +45 -26
+ Autogen
+
+ ntpd/ntp.conf.def@1.38 +43 -24
+ Update ntp.conf doocumentation to reflect the addition of "delrestrict",
+ change references to "dotted-quad" addresses to "numeric" to generalize
+ for IPv6 as well, and correct the information about KoD rate limiting.
+
+ ntpd/ntp.conf.html@1.209 +40 -24
+ Autogen
+
+ ntpd/ntp.conf.man.in@1.261 +42 -26
+ Autogen
+
+ ntpd/ntp.conf.mdoc.in@1.261 +45 -26
+ Autogen
+
+ ntpd/ntp_config.c@1.386 +151 -77
+ omit "ipperlimit -1" which is default from restrict saveconfig.
+ Provide column in restrict error messages.
+ Report hack_restrict() failures.
+ Ignore restriction mask when address comes from hostname.
+ normal_dtoa(): don't use strlcpy() for overlapping buffers, undefined behavior.
+
+ ntpd/ntp_io.c@1.438.1.2 +20 -5
+ Make local address deletion message match addition message.
+ Report hack_restrict() failures.
+
+ ntpd/ntp_keyword.h@1.41 +1044 -1034
+ keyword-gen.c output
+
+ ntpd/ntp_leapsec.c@1.27 +1 -1
+ Correct misleading indent
+
+ ntpd/ntp_monitor.c@1.47 +11 -10
+ Use braces consistently, correct KoD rate-limiting comment.
+
+ ntpd/ntp_parser.c@1.121 +1593 -1546
+ bison ntp_parser.y
+
+ ntpd/ntp_parser.h@1.82 +371 -369
+ bison ntp_parser.y
+
+ ntpd/ntp_parser.y@1.109 +50 -21
+ Add "delrestrict" support.
+ Reduce code duplication by factoring out restrict mask parsing.
+ Correct out of bounds ippeerlimit line/col reporting.
+
+ ntpd/ntp_peer.c@1.168 +2 -2
+ Use TRUE/FALSE for restrict_source() remove argument.
+
+ ntpd/ntp_proto.c@1.450.1.2 +6 -12
+ Always add restrict source entry before soliciting pool server.
+
+ ntpd/ntp_request.c@1.134 +12 -3
+ report hack_restrict() failures.
+
+ ntpd/ntp_restrict.c@1.50 +185 -143
+ Sort RESM_SOURCE entries after others so static entries have precedence,
+ allowing runtime-added pool IP restrictions to be effective (Bug 3868].
+ Check for failure of hack_restrict() operations.
+ #ifdef DEBUG dump_restricts() code which was dead code in release builds.
+ Do not assume the first member of struct in_addr is s_addr.
+
+ ntpd/ntp_util.c@1.125 +9 -8
+ Correct handling of not-found or unreadable or corrupt driftfile
+ to match comments by starting protocol engine in FREQ mode.
+ Add missing printf-style arg.
+
+ ntpd/ntpd.c@1.190.1.2 +2 -2
+ Typo broke Linux build.
+
+ tests/libntp/vi64ops.c@1.8 +6 -6
+ Eliminate strtouv64() const warning mess by following strtol() model.
+
+ChangeSet@1.4026, 2023-09-05 20:40:34+00:00, davehart@tl.ntp.md
+ [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs.
+ Correct ntp.conf docs burst packet count from 8 to 6.
+
+ ChangeLog@1.2075 +2 -0
+ [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs.
+
+ html/release.html@1.44 +1 -1
+ typo
+
+ ntpd/invoke-ntp.conf.texi@1.226 +6 -30
+ Autogen
+
+ ntpd/ntp.conf.5man@1.260 +7 -33
+ Autogen
+
+ ntpd/ntp.conf.5mdoc@1.260 +6 -31
+ Autogen
+
+ ntpd/ntp.conf.def@1.37 +4 -29
+ Remove long-gone "calldelay" & "crypto sign" from docs.
+ Correct burst packet count from 8 to 6.
+
+ ntpd/ntp.conf.html@1.208 +5 -31
+ Autogen
+
+ ntpd/ntp.conf.man.in@1.260 +7 -33
+ Autogen
+
+ ntpd/ntp.conf.mdoc.in@1.260 +6 -31
+ Autogen
+
+ChangeSet@1.4020.3.1, 2023-08-28 19:23:24+00:00, davehart@tl.davehart.net
+ [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd.
+ Update CommitLog build rule for bk 7.x repo format.
+ Provide ntpd thread names to debugger on Windows.
+ Remove dead code libntp/numtohost.c and its unit tests.
+ Remove class A, B, C IPv4 distinctions in netof().
+
+ BitKeeper/deleted/88/run-test-numtohost.c~5477248c1ca0a276@1.14 +0 -0
+ Rename: tests/libntp/run-numtohost.c -> BitKeeper/deleted/88/run-test-numtohost.c~5477248c1ca0a276
+
+ BitKeeper/deleted/9d/numtohost.c~3e480692@1.7 +0 -0
+ Rename: libntp/numtohost.c -> BitKeeper/deleted/9d/numtohost.c~3e480692
+
+ BitKeeper/deleted/d4/numtohost.c~11c5a6cbd0341da7@1.8 +0 -0
+ Rename: tests/libntp/numtohost.c -> BitKeeper/deleted/d4/numtohost.c~11c5a6cbd0341da7
+
+ ChangeLog@1.2069.3.1 +4 -0
+ [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd.
+ Provide ntpd thread names to debugger on Windows.
+ Remove dead code libntp/numtohost.c and its unit tests.
+ Remove class A, B, C IPv4 distinctions in netof().
+
+ Makefile.am@1.138 +1 -1
+ Update CommitLog build rule for bk 7.x repo format.
+
+ include/ntp.h@1.236.1.1 +12 -9
+ Remove unused restrict_u member.
+ Move/rename bitflag dumpers for interface and restriction flags,
+ build_iflags() -> iflags_str()
+ build_mflags() -> mflags_str()
+ build_rflags() -> rflags_str()
+
+ include/ntp_net.h@1.12.1.1 +5 -0
+ Add IS_LOOPBACK_ADDR() macro.
+
+ include/ntp_psl.h@1.2 +7 -4
+ Use u_int32 for psl entries to save a few bytes on 64-bit systems.
+
+ include/ntp_stdlib.h@1.91.1.1 +2 -2
+ Include lib_strbuf.h from ntp_stdlib.h, remove many #includes.
+
+ include/ntpd.h@1.211 +51 -12
+ Rename globals for network addr rescans while changing use a bit.
+ interface_interval -> endpt_scan_period
+ interface_timer -> endpt_scan_timer
+ disable_dynamic_updates -> scan_addrs_once & no_periodic_scan
+ Move/rename bitflag dumpers for interface and restriction flags,
+ build_iflags() -> iflags_str()
+ build_mflags() -> mflags_str()
+ build_rflags() -> rflags_str()
+ Make the bigflag dumpers #ifdef DEBUG
+
+ libntp/Makefile.am@1.87 +0 -1
+ Remove dead code libntp/numtohost.c
+
+ libntp/clocktypes.c@1.22 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/dofptoa.c@1.11 +0 -2
+ Remove #include now in ntp_stdlib.h
+
+ libntp/dolfptoa.c@1.14 +0 -2
+ Remove #include now in ntp_stdlib.h
+
+ libntp/humandate.c@1.13 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/lib_strbuf.c@1.10.1.1 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/machines.c@1.26.1.1 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/modetoa.c@1.7 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/netof.c@1.10 +11 -13
+ IPv4 class A, B, C distinctions are now meaningless.
+
+ libntp/ntp_calendar.c@1.27 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/numtoa.c@1.8.1.1 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/prettydate.c@1.22 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/refnumtoa.c@1.13 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/socktoa.c@1.20 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/socktohost.c@1.17 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/statestr.c@1.32 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/systime.c@1.79 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/uglydate.c@1.6 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ libntp/work_thread.c@1.27 +6 -3
+ Provide thread name to debugger.
+ Correct comment.
+
+ libparse/ieee754io.c@1.12 +0 -2
+ Remove #include now in ntp_stdlib.h
+
+ ntpd/cmd_args.c@1.65 +7 -9
+ interface_interval -> endpt_scan_period
+
+ ntpd/keyword-gen.c@1.44 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ ntpd/ntp_config.c@1.385 +69 -339
+ Don't trigger addr rescan from config_nic_rules() during
+ initialization or if we've dropped privileges.
+ Make some internal error checks DEBUG-only.
+ Rename bitflag to string functions:
+ build_iflags() -> iflags_str()
+ build_mflags() -> mflags_str()
+ build_rflags() -> rflags_str()
+ Move iflags_str() to ntp_io.c, the other two to ntp_restrict.c
+ Rename appendstr() -> append_flagstr() and move to ntp_util.c
+ Check for not enough space in append_flagstr().
+ Remove 3k of static string buffers in favor of LIB_GETBUF().
+
+ ntpd/ntp_control.c@1.242 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ ntpd/ntp_io.c@1.438.1.1 +117 -82
+ Rescan net addrs when notified by Windows of a change.
+ Remove redundant comment
+ Remove #ifdef around init_io_completion_port() call
+ Change default net addr scan interval 300->301 to shift the scans from minute synchrony.
+ Reduce code duplication re: link/site local address classification.
+ Move/rename bitflag dumpers for interface flags:
+ build_iflags() -> iflags_str()
+
+ ntpd/ntp_leapsec.c@1.26 +31 -49
+ Remove #includes in ntp_stdlib.h
+
+ ntpd/ntp_parser.c@1.120 +396 -420
+ generated from ntp_parser.y
+
+ ntpd/ntp_parser.h@1.81 +8 -6
+ generated from ntp_parser.y
+
+ ntpd/ntp_parser.y@1.108 +6 -1
+ Use NTP_MINPOLL/NTP_MAXPOLL instead of hard-coding.
+
+ ntpd/ntp_peer.c@1.167 +6 -4
+ Do not log endpt changes for multicast addresses, they're
+ meaningless as we send from a list of endpoints (addresses).
+
+ ntpd/ntp_proto.c@1.449.1.1 +57 -61
+ Debug output improvements.
+ Display offset, delay, jitter to 9 decimal places in debug output.
+ Use mprintf_event() in a few places rather than snprintf + report_event.
+ Move/rename bitflag dumpers for interface and restriction flags,
+ build_iflags() -> iflags_str()
+ build_mflags() -> mflags_str()
+ build_rflags() -> rflags_str()
+ Use "0x%x" instead of "%#010x" displaying l_fp seconds as the
+ latter doesnn't work with Microsoft C.
+
+ ntpd/ntp_restrict.c@1.49 +264 -157
+ inline inc_/dec_res_limited()
+ Make some unlikely assertions DEBUG-only.
+ Remove voluminous debug output from match_restrict4_addr().
+ Rename roptoa() -> resoop_str().
+ Display flag bit names in hack_restrict() debug output.
+ Move/rename bitflag dumpers for restriction rflags, mflags.
+ build_mflags() -> mflags_str()
+ build_rflags() -> rflags_str()
+ The two above were moved from ntp_config.c and modified to use LIB_STRBUF().
+
+ ntpd/ntp_timer.c@1.99.1.1 +35 -36
+ Rescan interfaces when notified by Windows of a change.
+ Remove interface_timer and interface_interval variables implementing
+ network interface periodic scans.
+ Replace those variables with endpt_scan_timer and endpt_scan_period
+ which are implemented slightly differently to enable on-change scans
+ on Windows with periodic re-scans suppressed.
+ Split disable_dynamic_updates into two variables:
+ no_periodic_scans
+ scan_addrs_once
+
+ ntpd/ntp_util.c@1.124 +127 -107
+ Remove #include now in ntp_stdlib.h
+
+ ntpd/ntpd.c@1.190.1.1 +10 -18
+ Split disable_dynamic_updates into two variables:
+ no_periodic_scans
+ scan_addrs_once
+ Remove interface_timer and interface_interval variables implementing
+ network interface periodic scans.
+ Replace those variables with endpt_scan_timer and endpt_scan_period
+ which are implemented slightly differently to enable on-change scans
+ on Windows with periodic re-scans suppressed.
+
+ ntpd/refclock_nmea.c@1.85 +2 -0
+ Eliminate unused func field_length() warning.
+
+ ntpq/ntpq.c@1.199 +0 -4
+ Remove #includes in ntpq.h
+
+ ntpq/ntpq.h@1.34 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ ports/winnt/include/clockstuff.h@1.14 +6 -0
+ Provide thread names to debugger.
+
+ ports/winnt/include/config.h@1.120 +17 -13
+ Update list of known _MSC_VER values
+
+ ports/winnt/include/ntp_iocompletionport.h@1.24 +30 -5
+ Use NotifyIpInterfaceChange on Windows Vista and newer.
+
+ ports/winnt/include/ntservice.h@1.7 +0 -1
+ Remove dead function declaration.
+
+ ports/winnt/include/win32_io.h@1.3 +2 -2
+ whitespace
+
+ ports/winnt/instsrv/instsrv.c@1.13 +1 -1
+ Correct app name
+
+ ports/winnt/libntp/getclock.c@1.6 +7 -0
+ Provide thread names to debugger.
+
+ ports/winnt/libntp/syslog.c@1.12 +0 -56
+ Remove long-dead code.
+
+ ports/winnt/libntp/win32_io.c@1.4 +13 -9
+ Bail out of InitSockets() when called more than once.
+
+ ports/winnt/ntpd/hopf_PCI_io.c@1.10 +11 -28
+ ntpd has never been able to run on Win32s (Win 3.1), remove check.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.68 +18 -44
+ Provide thread names to debugger.
+ Update my email address.
+ Remove code for unsupported pre-VS 2008 compiler.
+ Use Windows version number already discovered by libisc.
+
+ ports/winnt/ntpd/nt_ppsimpl.c@1.7 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.86 +125 -68
+ Rescan net addrs when notified by Windows of a change.
+ Provide thread names to debugger.
+ Use Windows version number already discovered by libisc.
+
+ ports/winnt/ntpd/ntservice.c@1.33 +10 -13
+ Return immediately from service control handler when asked
+ to stop rather than sleeping for 100ms after signaling
+ the main thread to exit().
+
+ ports/winnt/vs2005/libntp.vcproj@1.31 +0 -4
+ Remove dead code libntp/numtohost.c
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.62 +0 -4
+ Remove dead code libntp/numtohost.c
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.18 +0 -1
+ Remove dead code libntp/numtohost.c
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.16 +0 -3
+ Remove dead code libntp/numtohost.c
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.10 +0 -1
+ Remove dead code libntp/numtohost.c
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.10 +0 -3
+ Remove dead code libntp/numtohost.c
+
+ sntp/tests/crypto.c@1.16.1.1 +0 -6
+ Remove unused locals in test_VerifyCMAC()
+
+ sntp/utilities.h@1.12 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ tests/libntp/Makefile.am@1.105 +0 -12
+ Remove tests for dead code libntp/numtohost.c
+
+ tests/libntp/caljulian.c@1.16 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ tests/libntp/netof.c@1.11 +0 -33
+ IPv4 class A, B, C distinctions are now meaningless.
+
+ tests/libntp/run-caljulian.c@1.17 +4 -5
+ generated
+
+ tests/libntp/run-netof.c@1.11 +2 -6
+ generated
+
+ tests/ntpd/leapsec.c@1.6 +0 -1
+ Remove #include now in ntp_stdlib.h
+
+ tests/ntpd/run-leapsec.c@1.10 +33 -34
+ generated
+
+ChangeSet@1.4023.2.1, 2023-08-24 14:06:05+00:00, davehart@tl.davehart.net
+ [Bug 3753] ntpd won't start with FIPS-enabled OpenSSL 3.x.
+
+ ChangeLog@1.2072.2.1 +1 -0
+ [Bug 3753] ntpd won't start with FIPS-enabled OpenSSL 3.x.
+
+ include/ntp_md5.h@1.16 +3 -2
+ Reduce use of magic numbers
+
+ include/ntp_stdlib.h@1.93 +5 -3
+ add arg names to func declarations
+
+ libntp/a_md5encrypt.c@1.55.1.1 +79 -60
+ [Bug 3753] ntpd won't start with FIPS-enabled OpenSSL 3.x.
+
+ libntp/ssl_init.c@1.32 +21 -29
+ Reduce code duplication.
+
+ ntpd/ntp_crypto.c@1.194 +0 -1
+ move ssl_check_version from autokey-specific code to ntpdmain()
+
+ ntpd/ntpd.c@1.191 +5 -2
+ Move ssl_check_version from autokey-specific code to ntpdmain().
+ Put debug behavior msyslog on a single log line.
+
+ChangeSet@1.4023.1.1, 2023-08-23 10:58:43+00:00, davehart@tl.davehart.net
+ [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian.
+
+ ChangeLog@1.2072.1.1 +2 -0
+ [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian.
+
+ include/ntp.h@1.237 +9 -0
+ Track old-style IPv6 refid on big-endian systems
+
+ libntp/a_md5encrypt.c@1.56 +14 -2
+ [Bug 3864] Ensure refid calculation is endian-independent.
+
+ ntpd/ntp_io.c@1.439 +5 -0
+ Track old-style IPv6 refid on big-endian systems
+
+ ntpd/ntp_proto.c@1.451 +26 -4
+ Check both old- and new-style IPv6 refids on big-endian systems.
+
+ tests/libntp/a_md5encrypt.c@1.19 +9 -18
+ Enable IPv6 refid unit test that failed due to bug 3864.
+
+ChangeSet@1.4020.2.1, 2023-08-23 03:34:00+00:00, davehart@tl.davehart.net
+ [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid.
+
+ ChangeLog@1.2069.2.1 +2 -0
+ [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid.
+
+ include/ntp_net.h@1.13 +6 -0
+ LOOPBACKADR_N in network order
+
+ libntp/numtoa.c@1.9 +15 -7
+ Replace unprintable characters with ? instead of space.
+ Do not treat orphan refid 127.0.0.1 as text.
+
+ ntpd/ntp_timer.c@1.100 +133 -127
+ Change orphan mode s1 refid from LOOP to ORPH.
+ Clean up indents in leap second handling code.
+
+ChangeSet@1.4020.1.1, 2023-08-02 19:07:28+00:00, davehart@tl.davehart.net
+ [Bug 3856] Enable Edit & Continue debugging with Visual Studio.
+
+ ChangeLog@1.2069.1.1 +2 -0
+ [Bug 3856] Enable Edit & Continue debugging with Visual Studio.
+
+ ports/winnt/vs2015/debug-x64.props@1.6 +10 -0
+ Enable Edit & Continue debugging
+
+ ports/winnt/vs2015/debug.props@1.6 +11 -0
+ Enable Edit & Continue debugging
+
+ChangeSet@1.4022, 2023-07-31 12:41:01+00:00, davehart@tl.davehart.net
+ [Bug 3853] Clean up warnings with modern compilers.
+ partial, more to come.
+
+ ChangeLog@1.2071 +1 -0
+ [Bug 3853] Clean up warnings with modern compilers.
+ partial, more to come.
+
+ include/lib_strbuf.h@1.12 +16 -11
+ Keep a pointer to each LIB_GETBUF buffer to avoid -Wrestrict warnings.
+
+ include/ntp_stdlib.h@1.92 +1 -0
+ Keep a pointer to each LIB_GETBUF buffer to avoid -Wrestrict warnings.
+
+ include/ntp_tty.h@1.7 +5 -0
+ Silence unused function warning.
+ Prepare for reuse of symBaud2numBaud() in Win32 code which has similar.
+
+ libntp/lib_strbuf.c@1.11 +13 -7
+ Keep a pointer to each LIB_GETBUF buffer to avoid -Wrestrict warnings.
+
+ libntp/machines.c@1.27 +57 -3
+ Prepare for reuse of symBaud2numBaud() in Win32 code which has similar.
+
+ ntpd/ntp_proto.c@1.450 +1 -1
+ Whitespace
+
+ ntpd/ntp_refclock.c@1.131 +7 -51
+ Silence unused function warning.
+ Prepare for reuse of symBaud2numBaud() in Win32 code which has similar.
+
+ sntp/tests/crypto.c@1.17 +0 -6
+ Unused locals.
+
+ tests/libntp/a_md5encrypt.c@1.18 +3 -2
+ Initialized but unused warning.
+
+ChangeSet@1.4021, 2023-07-31 09:31:00+00:00, davehart@tl.davehart.net
+ [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as
+ intended.
+
+ ChangeLog@1.2070 +2 -0
+ [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as
+ intended.
+
+ check-libntp.mf@1.3 +2 -5
+ Check libntp for updated sources every make invocation.
+
+ check-libntpd.mf@1.3 +2 -11
+ Check libntpd.a for updated sources every make invocation.
+
+ check-libunity.mf@1.3 +2 -2
+ Ensure libunity is built before dependents, but don't check for updated sources.
+
+ check-scm-rev.mf@1.2 +2 -4
+ Use .PHONY so things work even if someone makes a FRC.scm-rev file.
+
+ sntp/check-libntp.mf@1.6 +2 -6
+ Check libntp for updated sources every make invocation.
+
+ sntp/check-libsntp.mf@1.3 +2 -6
+ Check libsntp for updated sources every make invocation.
+
+ sntp/check-libunity.mf@1.3 +1 -2
+ Ensure libunity is built before dependents, but don't check for updated sources.
+
+ChangeSet@1.4016.2.2, 2023-07-30 22:14:18+00:00, davehart@tl.davehart.net
+ [Bug 3842] Windows ntpd ppsapi DLL load failure crashes.
+
+ ChangeLog@1.2065.2.2 +1 -0
+ [Bug 3842] Windows ntpd ppsapi DLL load failure crashes.
+
+ ports/winnt/ntpd/nt_ppsimpl.c@1.6 +1 -1
+ Avoid freeing garbage pointer during PPSAPI load failure cleanup.
+
+ChangeSet@1.4016.2.1, 2023-07-30 19:49:30+00:00, davehart@tl.davehart.net
+ [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid.
+
+ ChangeLog@1.2065.2.1 +2 -0
+ [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid.
+
+ ntpq/ntpq-subs.c@1.135 +22 -13
+ Limit apeers refid column to 8 characters, fix small leak.
+
+ChangeSet@1.4016.1.2, 2023-07-29 21:54:29+00:00, davehart@tl.davehart.net
+ [Bug 3851] Drop pool server when no local address can reach it.
+
+ ChangeLog@1.2065.1.2 +3 -1
+ [Bug 3851] Drop pool server when no local address can reach it.
+
+ include/ntp.h@1.236 +3 -3
+ Get rid of unused MDF_UCLNT, introduce MDF_PCLNT
+
+ include/ntpd.h@1.210 +2 -1
+ nit
+
+ ntpd/ntp_io.c@1.438 +34 -22
+ move linklocal test to is_linklocal() helper
+
+ ntpd/ntp_proto.c@1.446.1.2 +18 -4
+ [Bug 3851] Drop pool server when no local address can reach it.
+
+ChangeSet@1.4016.1.1, 2023-07-20 16:52:18+00:00, davehart@tl.davehart.net
+ [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access.
+
+ ChangeLog@1.2065.1.1 +2 -0
+ [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access.
+
+ include/ntpd.h@1.209 +3 -1
+ Track if any non-linklocal addreses are available.
+
+ ntpd/ntp_io.c@1.437 +35 -4
+ Track if any non-linklocal addreses are available for v4 and v6.
+
+ ntpd/ntp_proto.c@1.446.1.1 +17 -1
+ [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access.
+
+ChangeSet@1.4017, 2023-07-18 19:17:19+00:00, davehart@tl.davehart.net
+ [Bug 3849] ntpd --wait-sync times out.
+
+ ChangeLog@1.2066 +3 -2
+ [Bug 3849] ntpd --wait-sync times out.
+
+ libntp/msyslog.c@1.58 +3 -3
+ Reduce code duplication
+
+ ntpd/ntp_loopfilter.c@1.198 +16 -0
+ Signal first sync from rstclock()
+
+ ntpd/ntp_proto.c@1.447 +2 -16
+ Signal first sync from rstclock().
+ Remove redundant fabs() call.
+
+ ntpd/ntpd.c@1.190 +12 -15
+ [Bug 3849] ntpd --wait-sync times out.
+ Remove some useless DPRINTF() calls as -d/-D disables forking and
+ these calls are in the forking codepath.
+
+ ntpsnmpd/Makefile.am@1.45 +3 -3
+ Rearrange library order to put $(SNMP_LIBS) last, avoiding problems
+ when they reference older OpenSSL libraries.
+ Use ntpsnmpd_LDADD rather than LDADD to leave the latter to the
+ choices of the end-user.
+
+ChangeSet@1.4016, 2023-07-15 00:45:44-07:00, harlan@ntp-testbuild.tal1.ntfo.org
+ configure libevent check intersperses output with answer.
+
+ ChangeLog@1.2065 +1 -0
+ configure libevent check intersperses output with answer.
+
+ sntp/m4/ntp_libevent.m4@1.22 +2 -1
+ configure libevent check intersperses output with answer.
+
+ChangeSet@1.4014, 2023-07-14 22:43:54-07:00, harlan@ntp-testbuild.tal1.ntfo.org
+ clean up ChangeLog listing order
+
+ ChangeLog@1.2063 +12 -11
+ clean up ChangeLog listing order
+
+ChangeSet@1.4013, 2023-07-14 22:23:53-07:00, harlan@ntp-testbuild.tal1.ntfo.org
+ html/clockopt.html cleanup
+
+ ChangeLog@1.2062 +1 -0
+ html/clockopt.html cleanup
+
+ html/clockopt.html@1.30 +6 -3
+ html/clockopt.html cleanup
+
+ChangeSet@1.4004.6.1, 2023-07-14 21:33:19+00:00, davehart@tl.davehart.net
+ [Bug 3846] Use -Wno-format-truncation by default.
+
+ ChangeLog@1.2053.6.1 +3 -0
+ [Bug 3846] Use -Wno-format-truncation by default.
+
+ sntp/m4/ntp_compiler.m4@1.8.1.1 +38 -22
+ [Bug 3846] Use -Wno-format-truncation by default.
+
+ChangeSet@1.4004.1.2, 2023-06-28 00:04:04+00:00, davehart@tl.davehart.net
+ fix release build
+
+ libntp/authreadkeys.c@1.38 +1 -1
+ fix non-DEBUG build
+
+ChangeSet@1.4004.5.1, 2023-06-25 23:18:48+00:00, davehart@tl.davehart.net
+ Remove -Wformat-security when removing -Wformat to avoid gcc 12 error.
+
+ ChangeLog@1.2053.5.1 +5 -0
+ [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat
+
+ configure.ac@1.630 +1 -1
+ bump cache version for ntp_compiler.m4 change
+
+ sntp/configure.ac@1.90 +1 -1
+ bump cache version for ntp_compiler.m4 change
+
+ sntp/m4/ntp_compiler.m4@1.9 +3 -8
+ Remove -Wformat-security when removing -Wformat to avoid gcc 12 error.
+
+ChangeSet@1.4004.4.1, 2023-06-20 18:41:45+00:00, davehart@tl.davehart.net
+ [Bug 3837] NULL pointer deref crash when ntpd deletes last interface.
+ Correct UNLINK_EXPR_SLIST() when the list is empty.
+
+ ChangeLog@1.2053.4.1 +5 -0
+ [Bug 3837] NULL pointer deref crash when ntpd deletes last interface.
+
+ include/ntp_lists.h@1.17 +3 -1
+ Correct UNLINK_EXPR_SLIST() when the list is empty.
+
+ChangeSet@1.4004.3.1, 2023-06-16 05:13:03+00:00, davehart@tl.davehart.net
+ Bug 3835 - NTP_HARD_*FLAGS not used by libevent tearoff.
+
+ cvo.sh:
+ Fix on newer Linux with /etc/os-release
+ ntp_libevent.m4:
+ Newer libevent supports LIBEVENT_*FLAGS.
+ Disable building samples for the bundled libevent.
+ configure.ac:
+ One piece missing in LIBEVENT_*FLAGS support
+
+ ChangeLog@1.2053.3.1 +3 -0
+ Bug 3835 - NTP_HARD_*FLAGS not used by libevent tearoff.
+
+ sntp/libevent/configure.ac@1.20 +5 -0
+ One piece missing in LIBEVENT_*FLAGS support
+
+ sntp/m4/ntp_libevent.m4@1.21 +4 -3
+ Newer libevent supports LIBEVENT_*FLAGS.
+ Disable building samples for the bundled libevent.
+
+ sntp/scripts/cvo.sh@1.9 +7 -1
+ Fix on newer Linux with /etc/os-release
+
+ChangeSet@1.4004.2.1, 2023-06-11 14:09:22+00:00, davehart@tl.davehart.net
+ [Bug 3831] pollskewlist zeroed on runtime configuration.
+
+ ChangeLog@1.2053.2.1 +3 -0
+ [Bug 3831] pollskewlist zeroed on runtime configuration.
+
+ ntpd/ntp_config.c@1.384 +22 -29
+ [Bug 3831] pollskewlist zeroed on runtime configuration.
+ Replace magic numbers 3 & 17 with NTP_MINPOLL and NTP_MAXPOLL.
+
+ChangeSet@1.4004.1.1, 2023-06-09 19:11:34+00:00, davehart@tl.davehart.net
+ Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c regression test.
+
+ ChangeLog@1.2053.1.1 +3 -0
+ Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c
+
+ libntp/authkeys.c@1.47 +1 -0
+ Whitespace
+
+ libntp/authreadkeys.c@1.37 +7 -5
+ Provide the keytype when unable to use one loading ntp.keys
+ #ifdef DEBUG a "never happen" bit of code checking an internal errno.
+
+ libntp/ssl_init.c@1.31 +1 -6
+ Use MAX_MDG_LEN, remove leftover debugging code.
+
+ ntpq/ntpq.c@1.198 +8 -13
+ Remove unneeded code. keytype_from_text upcases its input.
+
+ tests/libntp/data/ntp.keys@1.3 +12 -11
+ Add DSA, DSA-SHA, and SHA keys.
+
+ tests/libntp/digests.c@1.2 +120 -3
+ Add DSA, DSA-SHA, and SHA digest algorithms.
+
+ tests/libntp/run-digests.c@1.3 +6 -0
+ Add DSA, DSA-SHA, and SHA digest algorithms.
+
+ChangeSet@1.4007, 2023-06-07 18:36:14+02:00, burnicki@burnicki.chi1.ntfo.org
+ [Bug 3828] BK should ignore a git repo in the same directory.
+
+ BitKeeper/etc/ignore@1.97 +1 -0
+ [Bug 3828] BK should ignore a git repo in the same directory.
+
+ ChangeLog@1.2056 +2 -0
+ [Bug 3828] BK should ignore a git repo in the same directory.
+
+ChangeSet@1.4006, 2023-06-07 18:25:37+02:00, burnicki@burnicki.chi1.ntfo.org
+ [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A is disabled.
+
+ ChangeLog@1.2055 +2 -0
+ [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A is disabled.
+
+ libparse/clk_hopf6021.c@1.15 +2 -0
+ [Bug 3827] Fix build in case CLOCK_HOPF6021 is disabled.
+
+ libparse/clk_wharton.c@1.14 +2 -0
+ [Bug 3827] Fix build in case CLOCK_WHARTON_400A is disabled.
+
+ChangeSet@1.4005, 2023-06-07 18:21:52+02:00, burnicki@burnicki.chi1.ntfo.org
+ [Bug 3825] Don't touch HTML files unless building inside a BK repo.
+
+ ChangeLog@1.2054 +3 -0
+ [Bug 3825] Don't touch HTML files unless building inside a BK repo.
+
+ scripts/build/checkHtmlFileDates@1.2 +3 -1
+ [Bug 3825] Don't touch HTML files unless building inside a BK repo.
+
ChangeSet@1.4004, 2023-06-06 04:40:27-07:00, ntpreleng@ntp-build.tal1.ntfo.org
NTP_4_2_8P17
TAG: NTP_4_2_8P17
diff --git a/contrib/ntp/Makefile.am b/contrib/ntp/Makefile.am
index 72c35cb0e45d..2d5e6183261f 100644
--- a/contrib/ntp/Makefile.am
+++ b/contrib/ntp/Makefile.am
@@ -66,7 +66,7 @@ DISTCLEANFILES = .gcc-warning
BUILT_SOURCES = \
.gcc-warning \
libtool \
- html/.datecheck \
+ $(srcdir)/html/.datecheck \
$(srcdir)/COPYRIGHT \
$(srcdir)/.checkChangeLog \
$(NULL)
@@ -83,7 +83,7 @@ BUILT_SOURCES = \
@sleep 1
@touch $@
-html/.datecheck: FRC.html
+$(srcdir)/html/.datecheck: $(srcdir)/html/*.html
cd $(srcdir)/html && \
../scripts/build/checkHtmlFileDates
@@ -128,7 +128,7 @@ uninstall-local:
CommitLog: FRC.CommitLog
cd $(srcdir) \
&& $(PATH_TEST) -e CommitLog \
- -a SCCS/s.ChangeSet -ot CommitLog \
+ -a .bk/SCCS/ChangeSet,s -ot CommitLog \
|| scripts/build/genCommitLog
# HMS: The following seems to be a work-in-progress...
diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in
index 4307d8bebee9..fe562884111e 100644
--- a/contrib/ntp/Makefile.in
+++ b/contrib/ntp/Makefile.in
@@ -420,6 +420,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -583,7 +584,7 @@ DISTCLEANFILES = .gcc-warning
BUILT_SOURCES = \
.gcc-warning \
libtool \
- html/.datecheck \
+ $(srcdir)/html/.datecheck \
$(srcdir)/COPYRIGHT \
$(srcdir)/.checkChangeLog \
$(NULL)
@@ -1105,7 +1106,7 @@ uninstall-am: uninstall-local
@sleep 1
@touch $@
-html/.datecheck: FRC.html
+$(srcdir)/html/.datecheck: $(srcdir)/html/*.html
cd $(srcdir)/html && \
../scripts/build/checkHtmlFileDates
@@ -1150,7 +1151,7 @@ uninstall-local:
CommitLog: FRC.CommitLog
cd $(srcdir) \
&& $(PATH_TEST) -e CommitLog \
- -a SCCS/s.ChangeSet -ot CommitLog \
+ -a .bk/SCCS/ChangeSet,s -ot CommitLog \
|| scripts/build/genCommitLog
.buildcvo:
diff --git a/contrib/ntp/NEWS b/contrib/ntp/NEWS
index 432c3d324575..da174c84e0d7 100644
--- a/contrib/ntp/NEWS
+++ b/contrib/ntp/NEWS
@@ -1,4 +1,3906 @@
---
+NTP 4.2.8p18 (Harlan Stenn <stenn@ntp.org>, 2024 May 24)
+
+Focus: Bug fixes
+
+Severity: Recommended
+
+This release:
+
+- changes crypto (OpenSSL or compatible) detection and default build behavior.
+ Previously, crypto was supported if available unless the --without-crypto
+ option was given to configure. With this release, the prior behavior of
+ falling back to a crypto-free build if usable libcrypto was not found has
+ changed to instead cause configure to fail with an error.
+ The --without-crypto option must be explicitly provided if you want a build
+ that does not use libcrypto functionality.
+- Fixes 40 bugs
+- Includes 40 other improvements
+
+Details below:
+
+* [Bug 3918] Tweak openssl header/library handling. <stenn@ntp.org>
+* [Bug 3914] Spurious "Unexpected origin timestamp" logged after time
+ stepped. <hart@ntp.org>
+* [Bug 3913] Avoid duplicate IPv6 link-local manycast associations.
+ <hart@ntp.org>
+* [Bug 3912] Avoid rare math errors in ntptrace. <brian.utterback@oracle.com>
+* [Bug 3910] Memory leak using openssl-3 <hart@ntp.org>
+* [Bug 3909] Do not select multicast local address for unicast peer.
+ <hart@ntp.org>
+* [Bug 3903] lib/isc/win32/strerror.c NTstrerror() is not thread-safe.
+ <hart@ntp.org>
+* [Bug 3901] LIB_GETBUF isn't thread-safe. <hart@ntp.org>
+* [Bug 3900] fast_xmit() selects wrong local addr responding to mcast on
+ Windows. <hart@ntp.org>
+* [Bug 3888] ntpd with multiple same-subnet IPs using manycastclient creates
+ duplicate associations. <hart@ntp.org>
+* [Bug 3872] Ignore restrict mask for hostname. <hart@ntp.org>
+* [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails.
+ Reported by Hans Mayer. Moved NONEMPTY_TRANSLATION_UNIT
+ declaration from ntp_types.h to config.h. <hart@ntp.org>
+* [Bug 3870] Server drops client packets with ppoll < 4. <stenn@ntp.org>
+* [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs.
+ Reported by PoolMUC@web.de. <hart@ntp.org>
+* [Bug 3868] Cannot restrict a pool peer. <hart@ntp.org> Thanks to
+ Edward McGuire for tracking down the deficiency.
+* [Bug 3864] ntpd IPv6 refid different for big-endian and little-endian.
+ <hart@ntp.org>
+* [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. <hart@ntp.org>
+* [Bug 3856] Enable Edit & Continue debugging with Visual Studio.
+ <hart@ntp.org>
+* [Bug 3855] ntpq lacks an equivalent to ntpdc's delrestrict. <hart@ntp.org>
+* [Bug 3854] ntpd 4.2.8p17 corrupts rawstats file with space in refid.
+ <hart@ntp.org>
+* [Bug 3853] Clean up warnings with modern compilers. <hart@ntp.org>
+* [Bug 3852] check-libntp.mf and friends are not triggering rebuilds as
+ intended. <hart@ntp.org>
+* [Bug 3851] Drop pool server when no local address can reach it.
+ <hart@ntp.org>
+* [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid.
+ <hart@ntp.org>
+* [Bug 3849] ntpd --wait-sync times out. <hart@ntp.org>
+* [Bug 3847] SSL detection in configure should run-test if runpath is needed.
+ <hart@ntp.org>
+* [Bug 3846] Use -Wno-format-truncation by default. <hart@ntp.org>
+* [Bug 3845] accelerate pool clock_sync when IPv6 has only link-local access.
+ <hart@ntp.org>
+* [Bug 3842] Windows ntpd PPSAPI DLL load failure crashes. <hart@ntp.org>
+* [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat
+ Need to remove --Wformat-security when removing -Wformat to
+ silence numerous libopts warnings. <hart@ntp.org>
+* [Bug 3837] NULL pointer deref crash when ntpd deletes last interface.
+ Reported by renmingshuai. Correct UNLINK_EXPR_SLIST() when the
+ list is empty. <hart@ntp.org>
+* [Bug 3835] NTP_HARD_*FLAGS not used by libevent tearoff. <hart@ntp.org>
+* [Bug 3831] pollskewlist zeroed on runtime configuration. <hart@ntp.org>
+* [Bug 3830] configure libevent check intersperses output with answer. <stenn@>
+* [Bug 3828] BK should ignore a git repo in the same directory.
+ <burnicki@ntp.org>
+* [Bug 3827] Fix build in case CLOCK_HOPF6021 or CLOCK_WHARTON_400A
+ is disabled. <burnicki@ntp.org>
+* [Bug 3825] Don't touch HTML files unless building inside a BK repo.
+ Fix the script checkHtmlFileDates. <burnicki@ntp.org>
+* [Bug 3756] Improve OpenSSL library/header detection.
+* [Bug 3753] ntpd fails to start with FIPS-enabled OpenSSL 3. <hart@ntp.org>
+* [Bug 2734] TEST3 prevents initial interleave sync. Fix from <PoolMUC@web.de>
+* Log failures to allocate receive buffers. <hart@ntp.org>
+* Remove extraneous */ from libparse/ieee754io.c
+* Fix .datecheck target line in Makefile.am. <stenn@ntp.org>
+* Update the copyright year. <stenn@ntp.org>
+* Update ntp.conf documentation to add "delrestrict" and correct information
+ about KoD rate limiting. <hart@ntp.org>
+* html/clockopt.html cleanup. <stenn@ntp.org>
+* util/lsf-times - added. <stenn@ntp.org>
+* Add DSA, DSA-SHA, and SHA to tests/libntp/digests.c. <hart@ntp.org>
+* Provide ntpd thread names to debugger on Windows. <hart@ntp.org>
+* Remove dead code libntp/numtohost.c and its unit tests. <hart@ntp.org>
+* Remove class A, B, C IPv4 distinctions in netof(). <hart@ntp.org>
+* Use @configure_input@ in various *.in files to include a comment that
+ the file is generated from another pointing to the *.in. <hart@ntp.org>
+* Correct underquoting, indents in ntp_facilitynames.m4. <hart@ntp.org>
+* Clean up a few warnings seen building with older gcc. <hart@ntp.org>
+* Fix build on older FreeBSD lacking sys/procctl.h. <hart@ntp.org>
+* Disable [Bug 3627] workaround on newer FreeBSD which has the kernel fix
+ that makes it unnecessary, re-enabling ASLR stack gap. <hart@ntp.org>
+* Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files.
+* Remove useless pointer to Windows Help from system error messages.
+* Avoid newlines within Windows error messages. <hart@ntp.org>
+* Ensure unique association IDs if wrapped. <hart@ntp.org>
+* Simplify calc_addr_distance(). <hart@ntp.org>
+* Clamp min/maxpoll in edge cases in newpeer(). <hart@ntp.org>
+* Quiet local addr change logging when unpeering. <hart@ntp.org>
+* Correct missing arg for %s printf specifier in
+ send_blocking_resp_internal(). <hart@ntp.org>
+* Suppress OpenSSL 3 deprecation warning clutter. <hart@ntp.org>
+* Correct OpenSSL usage in Autokey code to avoid warnings about
+ discarding const qualifiers with OpenSSL 3. <hart@ntp.org>
+* Display KoD refid as text in recently added message. <hart@ntp.org>
+* Avoid running checkHtmlFileDates script repeatedly when no html/*.html
+ files have changed. <hart@ntp.org>
+* Abort configure if --enable-crypto-rand given & unavailable. <hart@ntp.org>
+* Add configure --enable-verbose-ssl to trace SSL detection. <hart@ntp.org>
+* Add build test coverage for --disable-saveconfig to flock-build script.
+ <hart@ntp.org>
+* Remove deprecated configure --with-arlib option. <hart@ntp.org>
+* Remove configure support for ISC UNIX ca. 1998. <hart@ntp.org>
+* Move NTP_OPENSSL and NTP_CRYPTO_RAND invocations from configure.ac files
+ to NTP_LIBNTP. <hart@ntp.org>
+* Remove dead code: HAVE_U_INT32_ONLY_WITH_DNS. <hart@ntp.org>
+* Eliminate [v]snprintf redefinition warnings on macOS. <hart@ntp.org>
+* Fix clang 14 cast increases alignment warning on Linux. <hart@ntp.org>
+* Move ENABLE_CMAC to ntp_openssl.m4, reviving sntp/tests CMAC unit tests.
+ <hart@ntp.org>
+* Use NTP_HARD_CPPFLAGS in libopts tearoff. <hart@ntp.org>
+* wire in --enable-build-framework-help
+
+---
+NTP 4.2.8p17 (Harlan Stenn <stenn@ntp.org>, 2023 Jun 06)
+
+Focus: Bug fixes
+
+Severity: HIGH (for people running 4.2.8p16)
+
+This release:
+
+- fixes 3 bugs, including a regression
+- adds new unit tests
+
+Details below:
+
+* [Bug 3824] Spurious "ntpd: daemon failed to notify parent!" logged at
+ event_sync. Reported by Edward McGuire. <hart@ntp.org>
+* [Bug 3822] ntpd significantly delays first poll of servers specified by name.
+ <hart@ntp.org> Miroslav Lichvar identified regression in 4.2.8p16.
+* [Bug 3821] 4.2.8p16 misreads hex authentication keys, won't interop with
+ 4.2.8p15 or earlier. Reported by Matt Nordhoff, thanks to
+ Miroslav Lichvar and Matt for rapid testing and identifying the
+ problem. <hart@ntp.org>
+* Add tests/libntp/digests.c to catch regressions reading keys file or with
+ symmetric authentication digest output.
+
+---
+NTP 4.2.8p16 (Harlan Stenn <stenn@ntp.org>, 2023 May 30)
+
+Focus: Security, Bug fixes
+
+Severity: LOW
+
+This release:
+
+- fixes 4 vulnerabilities (3 LOW and 1 None severity),
+- fixes 46 bugs
+- includes 15 general improvements
+- adds support for OpenSSL-3.0
+
+Details below:
+
+* [Sec 3808] Assertion failure in ntpq on malformed RT-11 date <perlinger@ntp.org>
+* [Sec 3807] praecis_parse() in the Palisade refclock driver has a
+ hypothetical input buffer overflow. Reported by ... stenn@
+* [Sec 3806] libntp/mstolfp.c needs bounds checking <perlinger@ntp.org>
+ - solved numerically instead of using string manipulation
+* [Sec 3767] An OOB KoD RATE value triggers an assertion when debug is enabled.
+ <stenn@ntp.org>
+* [Bug 3819] Updated libopts/Makefile.am was missing NTP_HARD_* values. <stenn@>
+* [Bug 3817] Bounds-check "tos floor" configuration. <hart@ntp.org>
+* [Bug 3814] First poll delay of new or cleared associations miscalculated.
+ <hart@ntp.org>
+* [Bug 3802] ntp-keygen -I default identity modulus bits too small for
+ OpenSSL 3. Reported by rmsh1216@163.com <hart@ntp.org>
+* [Bug 3801] gpsdjson refclock gps_open() device name mishandled. <hart@ntp.org>
+* [Bug 3800] libopts-42.1.17 does not compile with Microsoft C. <hart@ntp.org>
+* [Bug 3799] Enable libopts noreturn compiler advice for MSC. <hart@ntp.org>
+* [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when
+ disconnected, breaking ntpq and ntpdc. <hart@ntp.org>
+* [Bug 3795] pollskewlist documentation uses | when it shouldn't.
+ - ntp.conf manual page and miscopt.html corrections. <hart@ntp.org>
+* [Bug 3793] Wrong variable type passed to record_raw_stats(). <hart@ntp.org>
+ - Report and patch by Yuezhen LUAN <wei6410@sina.com>.
+* [Bug 3786] Timer starvation on high-load Windows ntpd. <hart@ntp.org>
+* [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded.
+ <hart@ntp.org>
+* [Bug 3781] log "Unable to listen for broadcasts" for IPv4 <hart@ntp.org>
+* [Bug 3774] mode 6 packets corrupted in rawstats file <hart@ntp.org>
+ - Reported by Edward McGuire, fix identified by <wei6410@sina.com>.
+* [Bug 3758] Provide a 'device' config statement for refclocks <perlinger@ntp.org>
+* [Bug 3757] Improve handling of Linux-PPS in NTPD <perlinger@ntp.org>
+* [Bug 3741] 4.2.8p15 can't build with glibc 2.34 <perlinger@ntp.org>
+* [Bug 3725] Make copyright of clk_wharton.c compatible with Debian.
+ Philippe De Muyter <phdm@macqel.be>
+* [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows <perlinger@ntp.org>
+ - openssl applink needed again for openSSL-1.1.1
+* [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing.
+ Reported by Brian Utterback, broken in 2010 by <hart@ntp.org>
+* [Bug 3699] Problems handling drift file and restoring previous drifts <perlinger@ntp.org>
+ - command line options override config statements where applicable
+ - make initial frequency settings idempotent and reversible
+ - make sure kernel PLL gets a recovered drift componsation
+* [Bug 3695] Fix memory leak with ntpq on Windows Server 2019 <perlinger@ntp.org>
+* [Bug 3694] NMEA refclock seems to unnecessarily require location in messages
+ - misleading title; essentially a request to ignore the receiver status.
+ Added a mode bit for this. <perlinger@ntp.org>
+* [Bug 3693] Improvement of error handling key lengths <perlinger@ntp.org>
+ - original patch by Richard Schmidt, with mods & unit test fixes
+* [Bug 3692] /dev/gpsN requirement prevents KPPS <perlinger@ntp.org>
+ - implement/wrap 'realpath()' to resolve symlinks in device names
+* [Bug 3691] Buffer Overflow reading GPSD output
+ - original patch by matt<ntpbr@mattcorallo.com>
+ - increased max PDU size to 4k to avoid truncation
+* [Bug 3690] newline in ntp clock variable (parse) <perlinger@ntp.org>
+ - patch by Frank Kardel
+* [Bug 3689] Extension for MD5, SHA-1 and other keys <perlinger@ntp.org>
+ - ntp{q,dc} now use the same password processing as ntpd does in the key
+ file, so having a binary secret >= 11 bytes is possible for all keys.
+ (This is a different approach to the problem than suggested)
+* [Bug 3688] GCC 10 build errors in testsuite <perlinger@ntp.org>
+* [Bug 3687] ntp_crypto_rand RNG status not known <perlinger@ntp.org>
+ - patch by Gerry Garvey
+* [Bug 3682] Fixes for warnings when compiled without OpenSSL <perlinger@ntp.org>
+ - original patch by Gerry Garvey
+* [Bug 3677] additional peer events not decoded in associations listing <perlinger@ntp.org>
+ - original patch by Gerry Garvey
+* [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+ - applied patches by Gerry Garvey
+* [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+* [Bug 3674] ntpq command 'execute only' using '~' prefix <perlinger@ntp.org>
+ - idea+patch by Gerry Garvey
+* [Bug 3672] fix biased selection in median cut <perlinger@ntp.org>
+* [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
+ - follow-up: fix inverted sense in check, reset shortfall counter
+* [Bug 3660] Revert 4.2.8p15 change to manycast. <hart@ntp.org>
+* [Bug 3640] document "discard monitor" and fix the code. <hart@ntp.org>
+ - fixed bug identified by Edward McGuire <perlinger@ntp.org>
+* [Bug 3626] (SNTP) UTC offset calculation needs dst flag <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3432] refclocks that 'write()' should check the result <perlinger@ntp.org>
+ - backport from -dev, plus some more work on warnings for unchecked results
+* [Bug 3428] ntpd spinning consuming CPU on Linux router with full table.
+ Reported by Israel G. Lugo. <hart@ntp.org>
+* [Bug 3103] libopts zsave_warn format string too few arguments <bkorb@gnu.org>
+* [Bug 2990] multicastclient incorrectly causes bind to broadcast address.
+ Integrated patch from Brian Utterback. <hart@ntp.org>
+* [Bug 2525] Turn on automake subdir-objects across the project. <hart@ntp.org>
+* [Bug 2410] syslog an error message on panic exceeded. <brian.utterback@oracle.com>
+* Use correct rounding in mstolfp(). perlinger/hart
+* M_ADDF should use u_int32. <hart@ntp.org>
+* Only define tv_fmt_libbuf() if we will use it. <stenn@ntp.org>
+* Use recv_buffer instead of the longer recv_space.X_recv_buffer. hart/stenn
+* Make sure the value returned by refid_str() prints cleanly. <stenn@ntp.org>
+* If DEBUG is enabled, the startup banner now says that debug assertions
+ are in force and that ntpd will abort if any are violated. <stenn@ntp.org>
+* syslog valid incoming KoDs. <stenn@ntp.org>
+* Rename a poorly-named variable. <stenn@ntp.org>
+* Disable "embedded NUL in string" messages in libopts, when we can. <stenn@>
+* Use https in the AC_INIT URLs in configure.ac. <stenn@ntp.org>
+* Implement NTP_FUNC_REALPATH. <stenn@ntp.org>
+* Lose a gmake construct in ntpd/Makefile.am. <stenn@ntp.org>
+* upgrade to: autogen-5.18.16
+* upgrade to: libopts-42.1.17
+* upgrade to: autoconf-2.71
+* upgrade to: automake-1.16.15
+* Upgrade to libevent-2.1.12-stable <stenn@ntp.org>
+* Support OpenSSL-3.0
+
+---
+NTP 4.2.8p15 (Harlan Stenn <stenn@ntp.org>, 2020 Jun 23)
+
+Focus: Security, Bug fixes
+
+Severity: MEDIUM
+
+This release fixes one vulnerability: Associations that use CMAC
+authentication between ntpd from versions 4.2.8p11/4.3.97 and
+4.2.8p14/4.3.100 will leak a small amount of memory for each packet.
+Eventually, ntpd will run out of memory and abort.
+
+It also fixes 13 other bugs.
+
+* [Sec 3661] memory leak with AES128CMAC keys <perlinger@ntp.org>
+* [Bug 3670] Regression from bad merger between 3592 and 3596 <perlinger@>
+ - Thanks to Sylar Tao
+* [Bug 3667] decodenetnum fails with numeric port <perlinger@ntp.org>
+ - rewrite 'decodenetnum()' in terms of inet_pton
+* [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
+ - limit number of receive buffers, with an iron reserve for refclocks
+* [Bug 3664] Enable openSSL CMAC support on Windows <burnicki@ntp.org>
+* [Bug 3662] Fix build errors on Windows with VS2008 <burnicki@ntp.org>
+* [Bug 3660] Manycast orphan mode startup discovery problem. <stenn@ntp.org>
+ - integrated patch from Charles Claggett
+* [Bug 3659] Move definition of psl[] from ntp_config.h to
+ ntp_config.h <perlinger@ntp.org>
+* [Bug 3657] Wrong "Autokey group mismatch" debug message <perlinger@ntp.org>
+* [Bug 3655] ntpdc memstats hash counts <perlinger@ntp.org>
+ - fix by Gerry garvey
+* [Bug 3653] Refclock jitter RMS calculation <perlinger@ntp.org>
+ - thanks to Gerry Garvey
+* [Bug 3646] Avoid sync with unsync orphan <perlinger@ntp.org>
+ - patch by Gerry Garvey
+* [Bug 3644] Unsynchronized server [...] selected as candidate <perlinger@ntp.org>
+* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. <abe@ntp.org>
+ - applied patch by Takao Abe
+
+---
+NTP 4.2.8p14 (Harlan Stenn <stenn@ntp.org>, 2020 Mar 03)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+This release fixes three vulnerabilities: a bug that causes causes an ntpd
+instance that is explicitly configured to override the default and allow
+ntpdc (mode 7) connections to be made to a server to read some uninitialized
+memory; fixes the case where an unmonitored ntpd using an unauthenticated
+association to its servers may be susceptible to a forged packet DoS attack;
+and fixes an attack against a client instance that uses a single
+unauthenticated time source. It also fixes 46 other bugs and addresses
+4 other issues.
+
+* [Sec 3610] process_control() should bail earlier on short packets. stenn@
+ - Reported by Philippe Antoine
+* [Sec 3596] Highly predictable timestamp attack. <stenn@ntp.org>
+ - Reported by Miroslav Lichvar
+* [Sec 3592] DoS attack on client ntpd <perlinger@ntp.org>
+ - Reported by Miroslav Lichvar
+* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@
+* [Bug 3636] NMEA: combine time/date from multiple sentences <perlinger@ntp.org>
+* [Bug 3635] Make leapsecond file hash check optional <perlinger@ntp.org>
+* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@
+* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence
+ - implement Zeller's congruence in libparse and libntp <perlinger@ntp.org>
+* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap <perlinger@ntp.org>
+ - integrated patch by Cy Schubert
+* [Bug 3620] memory leak in ntpq sysinfo <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3619] Honour drefid setting in cooked mode and sysinfo <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3617] Add support for ACE III and Copernicus II receivers <perlinger@ntp.org>
+ - integrated patch by Richard Steedman
+* [Bug 3615] accelerate refclock startup <perlinger@ntp.org>
+* [Bug 3613] Propagate noselect to mobilized pool servers <stenn@ntp.org>
+ - Reported by Martin Burnicki
+* [Bug 3612] Use-of-uninitialized-value in receive function <perlinger@ntp.org>
+ - Reported by Philippe Antoine
+* [Bug 3611] NMEA time interpreted incorrectly <perlinger@ntp.org>
+ - officially document new "trust date" mode bit for NMEA driver
+ - restore the (previously undocumented) "trust date" feature lost with [bug 3577]
+* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter <perlinger@ntp.org>
+ - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter'
+* [Bug 3608] libparse fails to compile on S11.4SRU13 and later <perlinger@ntp.org>
+ - removed ffs() and fls() prototypes as per Brian Utterback
+* [Bug 3604] Wrong param byte order passing into record_raw_stats() in
+ ntp_io.c <perlinger@ntp.org>
+ - fixed byte and paramter order as suggested by wei6410@sina.com
+* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no <perlinger@ntp.org>
+* [Bug 3599] Build fails on linux-m68k due to alignment issues <perlinger@ntp.org>
+ - added padding as suggested by John Paul Adrian Glaubitz
+* [Bug 3594] ntpd discards messages coming through nmead <perlinger@ntp.org>
+* [Bug 3593] ntpd discards silently nmea messages after the 5th string <perlinger@ntp.org>
+* [Bug 3590] Update refclock_oncore.c to the new GPS date API <perlinger@ntp.org>
+* [Bug 3585] Unity tests mix buffered and unbuffered output <perlinger@ntp.org>
+ - stdout+stderr are set to line buffered during test setup now
+* [Bug 3583] synchronization error <perlinger@ntp.org>
+ - set clock to base date if system time is before that limit
+* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled <perlinger@ntp.org>
+* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) <perlinger@ntp.org>
+ - Reported by Paulo Neves
+* [Bug 3577] Update refclock_zyfer.c to the new GPS date API <perlinger@ntp.org>
+ - also updates for refclock_nmea.c and refclock_jupiter.c
+* [Bug 3576] New GPS date function API <perlinger@ntp.org>
+* [Bug 3573] nptdate: missleading error message <perlinger@ntp.org>
+* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo <perlinger@ntp.org>
+* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' <perlinger@ntp.org>
+ - sidekick: service port resolution in 'ntpdate'
+* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH <perlinger@ntp.org>
+ - applied patch by Douglas Royds
+* [Bug 3542] ntpdc monlist parameters cannot be set <perlinger@ntp.org>
+* [Bug 3533] ntpdc peer_info ipv6 issues <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3531] make check: test-decodenetnum fails <perlinger@ntp.org>
+ - try to harden 'decodenetnum()' against 'getaddrinfo()' errors
+ - fix wrong cond-compile tests in unit tests
+* [Bug 3517] Reducing build noise <perlinger@ntp.org>
+* [Bug 3516] Require tooling from this decade <perlinger@ntp.org>
+ - patch by Philipp Prindeville
+* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code <perlinger@ntp.org>
+ - patch by Philipp Prindeville
+* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings <perlinger@ntp.org>
+ - patch by Philipp Prindeville
+* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() <perlinger@ntp.org>
+ - partial application of patch by Philipp Prindeville
+* [Bug 3491] Signed values of LFP datatypes should always display a sign
+ - applied patch by Gerry Garvey & fixed unit tests <perlinger@ntp.org>
+* [Bug 3490] Patch to support Trimble Resolution Receivers <perlinger@ntp.org>
+ - applied (modified) patch by Richard Steedman
+* [Bug 3473] RefID of refclocks should always be text format <perlinger@ntp.org>
+ - applied patch by Gerry Garvey (with minor formatting changes)
+* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails <perlinger@ntp.org>
+ - applied patch by Miroslav Lichvar
+* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+ <perlinger@ntp.org>
+* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user
+ is specified with -u <perlinger@ntp.org>
+ - monitor daemon child startup & propagate exit codes
+* [Bug 1433] runtime check whether the kernel really supports capabilities
+ - (modified) patch by Kurt Roeckx <perlinger@ntp.org>
+* Clean up sntp/networking.c:sendpkt() error message. <stenn@ntp.org>
+* Provide more detail on unrecognized config file parser tokens. <stenn@ntp.org>
+* Startup log improvements. <stenn@ntp.org>
+* Update the copyright year.
+
+---
+NTP 4.2.8p13 (Harlan Stenn <stenn@ntp.org>, 2019 Mar 07)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+This release fixes a bug that allows an attacker with access to an
+explicitly trusted source to send a crafted malicious mode 6 (ntpq)
+packet that can trigger a NULL pointer dereference, crashing ntpd.
+It also provides 17 other bugfixes and 1 other improvement:
+
+* [Sec 3565] Crafted null dereference attack in authenticated
+ mode 6 packet <perlinger@ntp.org>
+ - reported by Magnus Stubman
+* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <perlinger@ntp.org>
+ - applied patch by Ian Lepore
+* [Bug 3558] Crash and integer size bug <perlinger@ntp.org>
+ - isolate and fix linux/windows specific code issue
+* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <perlinger@ntp.org>
+ - provide better function for incremental string formatting
+* [Bug 3555] Tidy up print alignment of debug output from ntpdate <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3554] config revoke stores incorrect value <perlinger@ntp.org>
+ - original finding by Gerry Garvey, additional cleanup needed
+* [Bug 3549] Spurious initgroups() error message <perlinger@ntp.org>
+ - patch by Christous Zoulas
+* [Bug 3548] Signature not verified on windows system <perlinger@ntp.org>
+ - finding by Chen Jiabin, plus another one by me
+* [Bug 3541] patch to fix STA_NANO struct timex units <perlinger@ntp.org>
+ - applied patch by Maciej Szmigiero
+* [Bug 3540] Cannot set minsane to 0 anymore <perlinger@ntp.org>
+ - applied patch by Andre Charbonneau
+* [Bug 3539] work_fork build fails when droproot is not supported <perlinger@ntp.org>
+ - applied patch by Baruch Siach
+* [Bug 3538] Build fails for no-MMU targets <perlinger@ntp.org>
+ - applied patch by Baruch Siach
+* [Bug 3535] libparse won't handle GPS week rollover <perlinger@ntp.org>
+ - refactored handling of GPS era based on 'tos basedate' for
+ parse (TSIP) and JUPITER clocks
+* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) <perlinger@ntp.org>
+ - patch by Daniel J. Luke; this does not fix a potential linker
+ regression issue on MacOS.
+* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet
+ anomaly <perlinger@ntp.org>, reported by GGarvey.
+ - --enable-bug3527-fix support by HStenn
+* [Bug 3526] Incorrect poll interval in packet <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3471] Check for openssl/[ch]mac.h. <perlinger@ntp.org>
+ - added missing check, reported by Reinhard Max <perlinger@ntp.org>
+* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64
+ - this is a variant of [bug 3558] and should be fixed with it
+* Implement 'configure --disable-signalled-io'
+
+--
+NTP 4.2.8p12 (Harlan Stenn <stenn@ntp.org>, 2018/14/09)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+This release fixes a "hole" in the noepeer capability introduced to ntpd
+in ntp-4.2.8p11, and a buffer overflow in the openhost() function used by
+ntpq and ntpdc. It also provides 26 other bugfixes, and 4 other improvements:
+
+* [Sec 3505] Buffer overflow in the openhost() call of ntpq and ntpdc.
+
+* [Sec 3012] Fix a hole in the new "noepeer" processing.
+
+* Bug Fixes:
+ [Bug 3521] Fix a logic bug in the INVALIDNAK checks. <stenn@ntp.org>
+ [Bug 3509] Add support for running as non-root on FreeBSD, Darwin,
+ other TrustedBSD platforms
+ - applied patch by Ian Lepore <perlinger@ntp.org>
+ [Bug 3506] Service Control Manager interacts poorly with NTPD <perlinger@ntp.org>
+ - changed interaction with SCM to signal pending startup
+ [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3484] ntpq response from ntpd is incorrect when REFID is null <perlinger@ntp.org>
+ - rework of ntpq 'nextvar()' key/value parsing
+ [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) <perlinger@ntp.org>
+ - applied patch by Gerry Garvey (with mods)
+ [Bug 3480] Refclock sample filter not cleared on clock STEP <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <perlinger@ntp.org>
+ - applied patch by Gerry Garvey (with mods)
+ [Bug 3476]ctl_putstr() sends empty unquoted string [...] <perlinger@ntp.org>
+ - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though
+ [Bug 3475] modify prettydate() to suppress output of zero time <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3474] Missing pmode in mode7 peer info response <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3471] Check for openssl/[ch]mac.h. HStenn.
+ - add #define ENABLE_CMAC support in configure. HStenn.
+ [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL <perlinger@ntp.org>
+ [Bug 3469] Incomplete string compare [...] in is_refclk_addr <perlinger@ntp.org>
+ - patch by Stephen Friedl
+ [Bug 3467] Potential memory fault in ntpq [...] <perlinger@ntp.org>
+ - fixed IO redirection and CTRL-C handling in ntq and ntpdc
+ [Bug 3465] Default TTL values cannot be used <perlinger@ntp.org>
+ [Bug 3461] refclock_shm.c: clear error status on clock recovery <perlinger@ntp.org>
+ - initial patch by Hal Murray; also fixed refclock_report() trouble
+ [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph. <stenn@ntp.org>
+ [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
+ - According to Brooks Davis, there was only one location <perlinger@ntp.org>
+ [Bug 3449] ntpq - display "loop" instead of refid [...] <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3445] Symmetric peer won't sync on startup <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+ [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey,
+ with modifications
+ New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c.
+ [Bug 3434] ntpd clears STA_UNSYNC on start <perlinger@ntp.org>
+ - applied patch by Miroslav Lichvar
+ [Bug 3426] ntpdate.html -t default is 2 seconds. Leonid Evdokimov.
+ [Bug 3121] Drop root privileges for the forked DNS worker <perlinger@ntp.org>
+ - integrated patch by Reinhard Max
+ [Bug 2821] minor build issues <perlinger@ntp.org>
+ - applied patches by Christos Zoulas, including real bug fixes
+ html/authopt.html: cleanup, from <stenn@ntp.org>
+ ntpd/ntpd.c: DROPROOT cleanup. <stenn@ntp.org>
+ Symmetric key range is 1-65535. Update docs. <stenn@ntp.org>
+
+--
+NTP 4.2.8p11 (Harlan Stenn <stenn@ntp.org>, 2018/02/27)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+This release fixes 2 low-/medium-, 1 informational/medum-, and 2 low-severity
+vulnerabilities in ntpd, one medium-severity vulernability in ntpq, and
+provides 65 other non-security fixes and improvements:
+
+* NTP Bug 3454: Unauthenticated packet can reset authenticated interleaved
+ association (LOW/MED)
+ Date Resolved: Stable (4.2.8p11) 27 Feb 2018
+ References: Sec 3454 / CVE-2018-7185 / VU#961909
+ Affects: ntp-4.2.6, up to but not including ntp-4.2.8p11.
+ CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:N/I:N/A:P) This could score between
+ 2.9 and 6.8.
+ CVSS3: LOW 3.1 CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L This could
+ score between 2.6 and 3.1
+ Summary:
+ The NTP Protocol allows for both non-authenticated and
+ authenticated associations, in client/server, symmetric (peer),
+ and several broadcast modes. In addition to the basic NTP
+ operational modes, symmetric mode and broadcast servers can
+ support an interleaved mode of operation. In ntp-4.2.8p4 a bug
+ was inadvertently introduced into the protocol engine that
+ allows a non-authenticated zero-origin (reset) packet to reset
+ an authenticated interleaved peer association. If an attacker
+ can send a packet with a zero-origin timestamp and the source
+ IP address of the "other side" of an interleaved association,
+ the 'victim' ntpd will reset its association. The attacker must
+ continue sending these packets in order to maintain the
+ disruption of the association. In ntp-4.0.0 thru ntp-4.2.8p6,
+ interleave mode could be entered dynamically. As of ntp-4.2.8p7,
+ interleaved mode must be explicitly configured/enabled.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p11, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ If you are unable to upgrade to 4.2.8p11 or later and have
+ 'peer HOST xleave' lines in your ntp.conf file, remove the
+ 'xleave' option.
+ Have enough sources of time.
+ Properly monitor your ntpd instances.
+ If ntpd stops running, auto-restart it without -g .
+ Credit:
+ This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* NTP Bug 3453: Interleaved symmetric mode cannot recover from bad
+ state (LOW/MED)
+ Date Resolved: Stable (4.2.8p11) 27 Feb 2018
+ References: Sec 3453 / CVE-2018-7184 / VU#961909
+ Affects: ntpd in ntp-4.2.8p4, up to but not including ntp-4.2.8p11.
+ CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:P/I:N/A:N)
+ Could score between 2.9 and 6.8.
+ CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
+ Could score between 2.6 and 6.0.
+ Summary:
+ The fix for NtpBug2952 was incomplete, and while it fixed one
+ problem it created another. Specifically, it drops bad packets
+ before updating the "received" timestamp. This means a
+ third-party can inject a packet with a zero-origin timestamp,
+ meaning the sender wants to reset the association, and the
+ transmit timestamp in this bogus packet will be saved as the
+ most recent "received" timestamp. The real remote peer does
+ not know this value and this will disrupt the association until
+ the association resets.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Use authentication with 'peer' mode.
+ Have enough sources of time.
+ Properly monitor your ntpd instances.
+ If ntpd stops running, auto-restart it without -g .
+ Credit:
+ This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* NTP Bug 3415: Provide a way to prevent authenticated symmetric passive
+ peering (LOW)
+ Date Resolved: Stable (4.2.8p11) 27 Feb 2018
+ References: Sec 3415 / CVE-2018-7170 / VU#961909
+ Sec 3012 / CVE-2016-1549 / VU#718152
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92. Resolved in 4.2.8p11.
+ CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
+ CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
+ Summary:
+ ntpd can be vulnerable to Sybil attacks. If a system is set up to
+ use a trustedkey and if one is not using the feature introduced in
+ ntp-4.2.8p6 allowing an optional 4th field in the ntp.keys file to
+ specify which IPs can serve time, a malicious authenticated peer
+ -- i.e. one where the attacker knows the private symmetric key --
+ can create arbitrarily-many ephemeral associations in order to win
+ the clock selection of ntpd and modify a victim's clock. Three
+ additional protections are offered in ntp-4.2.8p11. One is the
+ new 'noepeer' directive, which disables symmetric passive
+ ephemeral peering. Another is the new 'ippeerlimit' directive,
+ which limits the number of peers that can be created from an IP.
+ The third extends the functionality of the 4th field in the
+ ntp.keys file to include specifying a subnet range.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Use the 'noepeer' directive to prohibit symmetric passive
+ ephemeral associations.
+ Use the 'ippeerlimit' directive to limit the number of peers
+ that can be created from an IP.
+ Use the 4th argument in the ntp.keys file to limit the IPs and
+ subnets that can be time servers.
+ Have enough sources of time.
+ Properly monitor your ntpd instances.
+ If ntpd stops running, auto-restart it without -g .
+ Credit:
+ This weakness was reported as Bug 3012 by Matthew Van Gundy of
+ Cisco ASIG, and separately by Stefan Moser as Bug 3415.
+
+* ntpq Bug 3414: decodearr() can write beyond its 'buf' limits (Medium)
+ Date Resolved: 27 Feb 2018
+ References: Sec 3414 / CVE-2018-7183 / VU#961909
+ Affects: ntpq in ntp-4.2.8p6, up to but not including ntp-4.2.8p11.
+ CVSS2: MED 6.8 (AV:N/AC:M/Au:N/C:P/I:P/A:P)
+ CVSS3: MED 5.0 CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
+ Summary:
+ ntpq is a monitoring and control program for ntpd. decodearr()
+ is an internal function of ntpq that is used to -- wait for it --
+ decode an array in a response string when formatted data is being
+ displayed. This is a problem in affected versions of ntpq if a
+ maliciously-altered ntpd returns an array result that will trip this
+ bug, or if a bad actor is able to read an ntpq request on its way to
+ a remote ntpd server and forge and send a response before the remote
+ ntpd sends its response. It's potentially possible that the
+ malicious data could become injectable/executable code.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Credit:
+ This weakness was discovered by Michael Macnair of Thales e-Security.
+
+* NTP Bug 3412: ctl_getitem(): buffer read overrun leads to undefined
+ behavior and information leak (Info/Medium)
+ Date Resolved: 27 Feb 2018
+ References: Sec 3412 / CVE-2018-7182 / VU#961909
+ Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p11.
+ CVSS2: INFO 0.0 - MED 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N) 0.0 if C:N
+ CVSS3: NONE 0.0 - MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
+ 0.0 if C:N
+ Summary:
+ ctl_getitem() is used by ntpd to process incoming mode 6 packets.
+ A malicious mode 6 packet can be sent to an ntpd instance, and
+ if the ntpd instance is from 4.2.8p6 thru 4.2.8p10, that will
+ cause ctl_getitem() to read past the end of its buffer.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Have enough sources of time.
+ Properly monitor your ntpd instances.
+ If ntpd stops running, auto-restart it without -g .
+ Credit:
+ This weakness was discovered by Yihan Lian of Qihoo 360.
+
+* NTP Bug 3012: Sybil vulnerability: ephemeral association attack
+ Also see Bug 3415, above.
+ Date Mitigated: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ Date Resolved: Stable (4.2.8p11) 27 Feb 2018
+ References: Sec 3012 / CVE-2016-1549 / VU#718152
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92. Resolved in 4.2.8p11.
+ CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
+ CVSS3: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
+ Summary:
+ ntpd can be vulnerable to Sybil attacks. If a system is set up
+ to use a trustedkey and if one is not using the feature
+ introduced in ntp-4.2.8p6 allowing an optional 4th field in the
+ ntp.keys file to specify which IPs can serve time, a malicious
+ authenticated peer -- i.e. one where the attacker knows the
+ private symmetric key -- can create arbitrarily-many ephemeral
+ associations in order to win the clock selection of ntpd and
+ modify a victim's clock. Two additional protections are
+ offered in ntp-4.2.8p11. One is the 'noepeer' directive, which
+ disables symmetric passive ephemeral peering. The other extends
+ the functionality of the 4th field in the ntp.keys file to
+ include specifying a subnet range.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p11, or later, from the NTP Project Download Page or
+ the NTP Public Services Project Download Page.
+ Use the 'noepeer' directive to prohibit symmetric passive
+ ephemeral associations.
+ Use the 'ippeerlimit' directive to limit the number of peer
+ associations from an IP.
+ Use the 4th argument in the ntp.keys file to limit the IPs
+ and subnets that can be time servers.
+ Properly monitor your ntpd instances.
+ Credit:
+ This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
+
+* Bug fixes:
+ [Bug 3457] OpenSSL FIPS mode regression <perlinger@ntp.org>
+ [Bug 3455] ntpd doesn't use scope id when binding multicast <perlinger@ntp.org>
+ - applied patch by Sean Haugh
+ [Bug 3452] PARSE driver prints uninitialized memory. <perlinger@ntp.org>
+ [Bug 3450] Dubious error messages from plausibility checks in get_systime()
+ - removed error log caused by rounding/slew, ensured postcondition <perlinger@ntp.org>
+ [Bug 3447] AES-128-CMAC (fixes) <perlinger@ntp.org>
+ - refactoring the MAC code, too
+ [Bug 3441] Validate the assumption that AF_UNSPEC is 0. stenn@ntp.org
+ [Bug 3439] When running multiple commands / hosts in ntpq... <perlinger@ntp.org>
+ - applied patch by ggarvey
+ [Bug 3438] Negative values and values > 999 days in... <perlinger@ntp.org>
+ - applied patch by ggarvey (with minor mods)
+ [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain
+ - applied patch (with mods) by Miroslav Lichvar <perlinger@ntp.org>
+ [Bug 3435] anchor NTP era alignment <perlinger@ntp.org>
+ [Bug 3433] sntp crashes when run with -a. <stenn@ntp.org>
+ [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2"
+ - fixed several issues with hash algos in ntpd, sntp, ntpq,
+ ntpdc and the test suites <perlinger@ntp.org>
+ [Bug 3424] Trimble Thunderbolt 1024 week millenium bug <perlinger@ntp.org>
+ - initial patch by Daniel Pouzzner
+ [Bug 3423] QNX adjtime() implementation error checking is
+ wrong <perlinger@ntp.org>
+ [Bug 3417] ntpq ifstats packet counters can be negative
+ made IFSTATS counter quantities unsigned <perlinger@ntp.org>
+ [Bug 3411] problem about SIGN(6) packet handling for ntp-4.2.8p10
+ - raised receive buffer size to 1200 <perlinger@ntp.org>
+ [Bug 3408] refclock_jjy.c: Avoid a wrong report of the coverity static
+ analysis tool. <abe@ntp.org>
+ [Bug 3405] update-leap.in: general cleanup, HTTPS support. Paul McMath.
+ [Bug 3404] Fix openSSL DLL usage under Windows <perlinger@ntp.org>
+ - fix/drop assumptions on OpenSSL libs directory layout
+ [Bug 3399] NTP: linker error in 4.2.8p10 during Linux cross-compilation
+ - initial patch by timeflies@mail2tor.com <perlinger@ntp.org>
+ [Bug 3398] tests fail with core dump <perlinger@ntp.org>
+ - patch contributed by Alexander Bluhm
+ [Bug 3397] ctl_putstr() asserts that data fits in its buffer
+ rework of formatting & data transfer stuff in 'ntp_control.c'
+ avoids unecessary buffers and size limitations. <perlinger@ntp.org>
+ [Bug 3394] Leap second deletion does not work on ntpd clients
+ - fixed handling of dynamic deletion w/o leap file <perlinger@ntp.org>
+ [Bug 3391] ntpd segfaults on startup due to small warmup thread stack size
+ - increased mimimum stack size to 32kB <perlinger@ntp.org>
+ [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 <perlinger@ntp.org>
+ - reverted handling of PPS kernel consumer to 4.2.6 behavior
+ [Bug 3365] Updates driver40(-ja).html and miscopt.html <abe@ntp.org>
+ [Bug 3358] Spurious KoD log messages in .INIT. phase. HStenn.
+ [Bug 3016] wrong error position reported for bad ":config pool"
+ - fixed location counter & ntpq output <perlinger@ntp.org>
+ [Bug 2900] libntp build order problem. HStenn.
+ [Bug 2878] Tests are cluttering up syslog <perlinger@ntp.org>
+ [Bug 2737] Wrong phone number listed for USNO. ntp-bugs@bodosom.net,
+ perlinger@ntp.org
+ [Bug 2557] Fix Thunderbolt init. ntp-bugs@bodosom.net, perlinger@ntp.
+ [Bug 948] Trustedkey config directive leaks memory. <perlinger@ntp.org>
+ Use strlcpy() to copy strings, not memcpy(). HStenn.
+ Typos. HStenn.
+ test_ntp_scanner_LDADD needs ntpd/ntp_io.o. HStenn.
+ refclock_jjy.c: Add missing "%s" to an msyslog() call. HStenn.
+ Build ntpq and libntpq.a with NTP_HARD_*FLAGS. perlinger@ntp.org
+ Fix trivial warnings from 'make check'. perlinger@ntp.org
+ Fix bug in the override portion of the compiler hardening macro. HStenn.
+ record_raw_stats(): Log entire packet. Log writes. HStenn.
+ AES-128-CMAC support. BInglis, HStenn, JPerlinger.
+ sntp: tweak key file logging. HStenn.
+ sntp: pkt_output(): Improve debug output. HStenn.
+ update-leap: updates from Paul McMath.
+ When using pkg-config, report --modversion. HStenn.
+ Clean up libevent configure checks. HStenn.
+ sntp: show the IP of who sent us a crypto-NAK. HStenn.
+ Allow .../N to specify subnet bits for IPs in ntp.keys. HStenn, JPerlinger.
+ authistrustedip() - use it in more places. HStenn, JPerlinger.
+ New sysstats: sys_lamport, sys_tsrounding. HStenn.
+ Update ntp.keys .../N documentation. HStenn.
+ Distribute testconf.yml. HStenn.
+ Add DPRINTF(2,...) lines to receive() for packet drops. HStenn.
+ Rename the configuration flag fifo variables. HStenn.
+ Improve saveconfig output. HStenn.
+ Decode restrict flags on receive() debug output. HStenn.
+ Decode interface flags on receive() debug output. HStenn.
+ Warn the user if deprecated "driftfile name WanderThreshold" is used. HStenn.
+ Update the documentation in ntp.conf.def . HStenn.
+ restrictions() must return restrict flags and ippeerlimit. HStenn.
+ Update ntpq peer documentation to describe the 'p' type. HStenn.
+ Rename restrict 'flags' to 'rflags. Use an enum for the values. HStenn.
+ Provide dump_restricts() for debugging. HStenn.
+ Use consistent 4th arg type for [gs]etsockopt. JPerlinger.
+
+* Other items:
+
+* update-leap needs the following perl modules:
+ Net::SSLeay
+ IO::Socket::SSL
+
+* New sysstats variables: sys_lamport, sys_tsrounding
+See them with: ntpq -c "rv 0 ss_lamport,ss_tsrounding"
+sys_lamport counts the number of observed Lamport violations, while
+sys_tsrounding counts observed timestamp rounding events.
+
+* New ntp.conf items:
+
+- restrict ... noepeer
+- restrict ... ippeerlimit N
+
+The 'noepeer' directive will disallow all ephemeral/passive peer
+requests.
+
+The 'ippeerlimit' directive limits the number of time associations
+for each IP in the designated set of addresses. This limit does not
+apply to explicitly-configured associations. A value of -1, the current
+default, means an unlimited number of associations may connect from a
+single IP. 0 means "none", etc. Ordinarily the only way multiple
+associations would come from the same IP would be if the remote side
+was using a proxy. But a trusted machine might become compromised,
+in which case an attacker might spin up multiple authenticated sessions
+from different ports. This directive should be helpful in this case.
+
+* New ntp.keys feature: Each IP in the optional list of IPs in the 4th
+field may contain a /subnetbits specification, which identifies the
+scope of IPs that may use this key. This IP/subnet restriction can be
+used to limit the IPs that may use the key in most all situations where
+a key is used.
+--
+NTP 4.2.8p10 (Harlan Stenn <stenn@ntp.org>, 2017/03/21)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+This release fixes 5 medium-, 6 low-, and 4 informational-severity
+vulnerabilities, and provides 15 other non-security fixes and improvements:
+
+* NTP-01-016 NTP: Denial of Service via Malformed Config (Medium)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3389 / CVE-2017-6464 / VU#325339
+ Affects: All versions of NTP-4, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
+ CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary:
+ A vulnerability found in the NTP server makes it possible for an
+ authenticated remote user to crash ntpd via a malformed mode
+ configuration directive.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or
+ the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-014 NTP: Buffer Overflow in DPTS Clock (Low)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3388 / CVE-2017-6462 / VU#325339
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
+ CVSS3: Low 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
+ Summary:
+ There is a potential for a buffer overflow in the legacy Datum
+ Programmable Time Server refclock driver. Here the packets are
+ processed from the /dev/datum device and handled in
+ datum_pts_receive(). Since an attacker would be required to
+ somehow control a malicious /dev/datum device, this does not
+ appear to be a practical attack and renders this issue "Low" in
+ terms of severity.
+ Mitigation:
+ If you have a Datum reference clock installed and think somebody
+ may maliciously change the device, upgrade to 4.2.8p10, or
+ later, from the NTP Project Download Page or the NTP Public
+ Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-012 NTP: Authenticated DoS via Malicious Config Option (Medium)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3387 / CVE-2017-6463 / VU#325339
+ Affects: All versions of ntp, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
+ CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary:
+ A vulnerability found in the NTP server allows an authenticated
+ remote attacker to crash the daemon by sending an invalid setting
+ via the :config directive. The unpeer option expects a number or
+ an address as an argument. In case the value is "0", a
+ segmentation fault occurs.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-011 NTP: ntpq_stripquotes() returns incorrect value (Informational)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3386
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: None 0.0 (AV:N/AC:H/Au:N/C:N/I:N/A:N)
+ CVSS3: None 0.0 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:N
+ Summary:
+ The NTP Mode 6 monitoring and control client, ntpq, uses the
+ function ntpq_stripquotes() to remove quotes and escape characters
+ from a given string. According to the documentation, the function
+ is supposed to return the number of copied bytes but due to
+ incorrect pointer usage this value is always zero. Although the
+ return value of this function is never used in the code, this
+ flaw could lead to a vulnerability in the future. Since relying
+ on wrong return values when performing memory operations is a
+ dangerous practice, it is recommended to return the correct value
+ in accordance with the documentation pertinent to the code.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-010 NTP: ereallocarray()/eallocarray() underused (Info)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3385
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ Summary:
+ NTP makes use of several wrappers around the standard heap memory
+ allocation functions that are provided by libc. This is mainly
+ done to introduce additional safety checks concentrated on
+ several goals. First, they seek to ensure that memory is not
+ accidentally freed, secondly they verify that a correct amount
+ is always allocated and, thirdly, that allocation failures are
+ correctly handled. There is an additional implementation for
+ scenarios where memory for a specific amount of items of the
+ same size needs to be allocated. The handling can be found in
+ the oreallocarray() function for which a further number-of-elements
+ parameter needs to be provided. Although no considerable threat
+ was identified as tied to a lack of use of this function, it is
+ recommended to correctly apply oreallocarray() as a preferred
+ option across all of the locations where it is possible.
+ Mitigation:
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-009 NTP: Privileged execution of User Library code (WINDOWS
+ PPSAPI ONLY) (Low)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3384 / CVE-2017-6455 / VU#325339
+ Affects: All Windows versions of ntp-4 that use the PPSAPI, up to but
+ not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not
+ including ntp-4.3.94.
+ CVSS2: MED 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C)
+ CVSS3: MED 4.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary:
+ The Windows NT port has the added capability to preload DLLs
+ defined in the inherited global local environment variable
+ PPSAPI_DLLS. The code contained within those libraries is then
+ called from the NTPD service, usually running with elevated
+ privileges. Depending on how securely the machine is setup and
+ configured, if ntpd is configured to use the PPSAPI under Windows
+ this can easily lead to a code injection.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-008 NTP: Stack Buffer Overflow from Command Line (WINDOWS
+ installer ONLY) (Low)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3383 / CVE-2017-6452 / VU#325339
+ Affects: WINDOWS installer ONLY: All versions of the ntp-4 Windows
+ installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up
+ to, but not including ntp-4.3.94.
+ CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
+ CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
+ Summary:
+ The Windows installer for NTP calls strcat(), blindly appending
+ the string passed to the stack buffer in the addSourceToRegistry()
+ function. The stack buffer is 70 bytes smaller than the buffer
+ in the calling main() function. Together with the initially
+ copied Registry path, the combination causes a stack buffer
+ overflow and effectively overwrites the stack frame. The
+ passed application path is actually limited to 256 bytes by the
+ operating system, but this is not sufficient to assure that the
+ affected stack buffer is consistently protected against
+ overflowing at all times.
+ Mitigation:
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-007 NTP: Data Structure terminated insufficiently (WINDOWS
+ installer ONLY) (Low)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3382 / CVE-2017-6459 / VU#325339
+ Affects: WINDOWS installer ONLY: All ntp-4 versions of the Windows
+ installer, up to but not including ntp-4.2.8p10, and ntp-4.3.0
+ up to, but not including ntp-4.3.94.
+ CVSS2: Low 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
+ CVSS3: Low 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
+ Summary:
+ The Windows installer for NTP calls strcpy() with an argument
+ that specifically contains multiple null bytes. strcpy() only
+ copies a single terminating null character into the target
+ buffer instead of copying the required double null bytes in the
+ addKeysToRegistry() function. As a consequence, a garbage
+ registry entry can be created. The additional arsize parameter
+ is erroneously set to contain two null bytes and the following
+ call to RegSetValueEx() claims to be passing in a multi-string
+ value, though this may not be true.
+ Mitigation:
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-006 NTP: Copious amounts of Unused Code (Informational)
+ References: Sec 3381
+ Summary:
+ The report says: Statically included external projects
+ potentially introduce several problems and the issue of having
+ extensive amounts of code that is "dead" in the resulting binary
+ must clearly be pointed out. The unnecessary unused code may or
+ may not contain bugs and, quite possibly, might be leveraged for
+ code-gadget-based branch-flow redirection exploits. Analogically,
+ having source trees statically included as well means a failure
+ in taking advantage of the free feature for periodical updates.
+ This solution is offered by the system's Package Manager. The
+ three libraries identified are libisc, libevent, and libopts.
+ Resolution:
+ For libisc, we already only use a portion of the original library.
+ We've found and fixed bugs in the original implementation (and
+ offered the patches to ISC), and plan to see what has changed
+ since we last upgraded the code. libisc is generally not
+ installed, and when it it we usually only see the static libisc.a
+ file installed. Until we know for sure that the bugs we've found
+ and fixed are fixed upstream, we're better off with the copy we
+ are using.
+
+ Version 1 of libevent was the only production version available
+ until recently, and we've been requiring version 2 for a long time.
+ But if the build system has at least version 2 of libevent
+ installed, we'll use the version that is installed on the system.
+ Otherwise, we provide a copy of libevent that we know works.
+
+ libopts is provided by GNU AutoGen, and that library and package
+ undergoes frequent API version updates. The version of autogen
+ used to generate the tables for the code must match the API
+ version in libopts. AutoGen can be ... difficult to build and
+ install, and very few developers really need it. So we have it
+ on our build and development machines, and we provide the
+ specific version of the libopts code in the distribution to make
+ sure that the proper API version of libopts is available.
+
+ As for the point about there being code in these libraries that
+ NTP doesn't use, OK. But other packages used these libraries as
+ well, and it is reasonable to assume that other people are paying
+ attention to security and code quality issues for the overall
+ libraries. It takes significant resources to analyze and
+ customize these libraries to only include what we need, and to
+ date we believe the cost of this effort does not justify the benefit.
+ Credit:
+ This issue was discovered by Cure53.
+
+* NTP-01-005 NTP: Off-by-one in Oncore GPS Receiver (Low)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3380
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: None 0.0 (AV:L/AC:H/Au:N/C:N/I:N/A:N)
+ CVSS3: None 0.0 CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:N
+ Summary:
+ There is a fencepost error in a "recovery branch" of the code for
+ the Oncore GPS receiver if the communication link to the ONCORE
+ is weak / distorted and the decoding doesn't work.
+ Mitigation:
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page or
+ the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-004 NTP: Potential Overflows in ctl_put() functions (Medium)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3379 / CVE-2017-6458 / VU#325339
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: MED 4.6 (AV:N/AC:H/Au:M/C:N/I:N/A:C)
+ CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary:
+ ntpd makes use of different wrappers around ctl_putdata() to
+ create name/value ntpq (mode 6) response strings. For example,
+ ctl_putstr() is usually used to send string data (variable names
+ or string data). The formatting code was missing a length check
+ for variable names. If somebody explicitly created any unusually
+ long variable names in ntpd (longer than 200-512 bytes, depending
+ on the type of variable), then if any of these variables are
+ added to the response list it would overflow a buffer.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you don't want to upgrade, then don't setvar variable names
+ longer than 200-512 bytes in your ntp.conf file.
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-003 NTP: Improper use of snprintf() in mx4200_send() (Low)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3378 / CVE-2017-6451 / VU#325339
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: LOW 0.8 (AV:L/AC:H/Au:M/C:N/I:N/A:P)
+ CVSS3: LOW 1.8 CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N
+ Summary:
+ The legacy MX4200 refclock is only built if is specifically
+ enabled, and furthermore additional code changes are required to
+ compile and use it. But it uses the libc functions snprintf()
+ and vsnprintf() incorrectly, which can lead to an out-of-bounds
+ memory write due to an improper handling of the return value of
+ snprintf()/vsnprintf(). Since the return value is used as an
+ iterator and it can be larger than the buffer's size, it is
+ possible for the iterator to point somewhere outside of the
+ allocated buffer space. This results in an out-of-bound memory
+ write. This behavior can be leveraged to overwrite a saved
+ instruction pointer on the stack and gain control over the
+ execution flow. During testing it was not possible to identify
+ any malicious usage for this vulnerability. Specifically, no
+ way for an attacker to exploit this vulnerability was ultimately
+ unveiled. However, it has the potential to be exploited, so the
+ code should be fixed.
+ Mitigation, if you have a Magnavox MX4200 refclock:
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-002 NTP: Buffer Overflow in ntpq when fetching reslist from a
+ malicious ntpd (Medium)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3377 / CVE-2017-6460 / VU#325339
+ Affects: All versions of ntpq, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: MED 4.9 (AV:N/AC:H/Au:S/C:N/I:N/A:C)
+ CVSS3: MED 4.2 CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary:
+ A stack buffer overflow in ntpq can be triggered by a malicious
+ ntpd server when ntpq requests the restriction list from the server.
+ This is due to a missing length check in the reslist() function.
+ It occurs whenever the function parses the server's response and
+ encounters a flagstr variable of an excessive length. The string
+ will be copied into a fixed-size buffer, leading to an overflow on
+ the function's stack-frame. Note well that this problem requires
+ a malicious server, and affects ntpq, not ntpd.
+ Mitigation:
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you can't upgrade your version of ntpq then if you want to know
+ the reslist of an instance of ntpd that you do not control,
+ know that if the target ntpd is malicious that it can send back
+ a response that intends to crash your ntpq process.
+ Credit:
+ This weakness was discovered by Cure53.
+
+* NTP-01-001 NTP: Makefile does not enforce Security Flags (Informational)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3376
+ Affects: All versions of NTP, up to but not including ntp-4.2.8p10, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: N/A
+ CVSS3: N/A
+ Summary:
+ The build process for NTP has not, by default, provided compile
+ or link flags to offer "hardened" security options. Package
+ maintainers have always been able to provide hardening security
+ flags for their builds. As of ntp-4.2.8p10, the NTP build
+ system has a way to provide OS-specific hardening flags. Please
+ note that this is still not a really great solution because it
+ is specific to NTP builds. It's inefficient to have every
+ package supply, track and maintain this information for every
+ target build. It would be much better if there was a common way
+ for OSes to provide this information in a way that arbitrary
+ packages could benefit from it.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was reported by Cure53.
+
+* 0rigin DoS (Medium)
+ Date Resolved: 21 Mar 2017
+ References: Sec 3361 / CVE-2016-9042 / VU#325339
+ Affects: ntp-4.2.8p9 (21 Nov 2016), up to but not including ntp-4.2.8p10
+ CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C) (worst case)
+ CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H (worst case)
+ Summary:
+ An exploitable denial of service vulnerability exists in the
+ origin timestamp check functionality of ntpd 4.2.8p9. A specially
+ crafted unauthenticated network packet can be used to reset the
+ expected origin timestamp for target peers. Legitimate replies
+ from targeted peers will fail the origin timestamp check (TEST2)
+ causing the reply to be dropped and creating a denial of service
+ condition. This vulnerability can only be exploited if the
+ attacker can spoof all of the servers.
+ Mitigation:
+ Implement BCP-38.
+ Configure enough servers/peers that an attacker cannot target
+ all of your time sources.
+ Upgrade to 4.2.8p10, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart
+ ntpd (without -g) if it stops running.
+ Credit:
+ This weakness was discovered by Matthew Van Gundy of Cisco.
+
+Other fixes:
+
+* [Bug 3393] clang scan-build findings <perlinger@ntp.org>
+* [Bug 3363] Support for openssl-1.1.0 without compatibility modes
+ - rework of patch set from <ntp.org@eroen.eu>. <perlinger@ntp.org>
+* [Bug 3356] Bugfix 3072 breaks multicastclient <perlinger@ntp.org>
+* [Bug 3216] libntp audio ioctl() args incorrectly cast to int
+ on 4.4BSD-Lite derived platforms <perlinger@ntp.org>
+ - original patch by Majdi S. Abbas
+* [Bug 3215] 'make distcheck' fails with new BK repo format <perlinger@ntp.org>
+* [Bug 3173] forking async worker: interrupted pipe I/O <perlinger@ntp.org>
+ - initial patch by Christos Zoulas
+* [Bug 3139] (...) time_pps_create: Exec format error <perlinger@ntp.org>
+ - move loader API from 'inline' to proper source
+ - augment pathless dlls with absolute path to NTPD
+ - use 'msyslog()' instead of 'printf() 'for reporting trouble
+* [Bug 3107] Incorrect Logic for Peer Event Limiting <perlinger@ntp.org>
+ - applied patch by Matthew Van Gundy
+* [Bug 3065] Quiet warnings on NetBSD <perlinger@ntp.org>
+ - applied some of the patches provided by Havard. Not all of them
+ still match the current code base, and I did not touch libopt.
+* [Bug 3062] Change the process name of forked DNS worker <perlinger@ntp.org>
+ - applied patch by Reinhard Max. See bugzilla for limitations.
+* [Bug 2923] Trap Configuration Fail <perlinger@ntp.org>
+ - fixed dependency inversion from [Bug 2837]
+* [Bug 2896] Nothing happens if minsane < maxclock < minclock
+ - produce ERROR log message about dysfunctional daemon. <perlinger@ntp.org>
+* [Bug 2851] allow -4/-6 on restrict line with mask <perlinger@ntp.org>
+ - applied patch by Miroslav Lichvar for ntp4.2.6 compat
+* [Bug 2645] out-of-bound pointers in ctl_putsys and decode_bitflags
+ - Fixed these and some more locations of this pattern.
+ Probably din't get them all, though. <perlinger@ntp.org>
+* Update copyright year.
+
+--
+(4.2.8p9-win) 2017/02/01 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 3144] NTP does not build without openSSL. <perlinger@ntp.org>
+ - added missed changeset for automatic openssl lib detection
+ - fixed some minor warning issues
+* [Bug 3095] More compatibility with openssl 1.1. <perlinger@ntp.org>
+* configure.ac cleanup. stenn@ntp.org
+* openssl configure cleanup. stenn@ntp.org
+
+--
+NTP 4.2.8p9 (Harlan Stenn <stenn@ntp.org>, 2016/11/21)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following 1 high- (Windows only), 2 medium-, 2 medium-/low, and
+5 low-severity vulnerabilities, and provides 28 other non-security
+fixes and improvements:
+
+* Trap crash
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3119 / CVE-2016-9311 / VU#633847
+ Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not
+ including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94.
+ CVSS2: MED 4.9 (AV:N/AC:H/Au:N/C:N/I:N/A:C)
+ CVSS3: MED 4.4 CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
+ Summary:
+ ntpd does not enable trap service by default. If trap service
+ has been explicitly enabled, an attacker can send a specially
+ crafted packet to cause a null pointer dereference that will
+ crash ntpd, resulting in a denial of service.
+ Mitigation:
+ Implement BCP-38.
+ Use "restrict default noquery ..." in your ntp.conf file. Only
+ allow mode 6 queries from trusted networks and hosts.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
+
+* Mode 6 information disclosure and DDoS vector
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3118 / CVE-2016-9310 / VU#633847
+ Affects: ntp-4.0.90 (21 July 1999), possibly earlier, up to but not
+ including 4.2.8p9, and ntp-4.3.0 up to but not including ntp-4.3.94.
+ CVSS2: MED 6.4 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
+ CVSS3: MED 6.5 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary:
+ An exploitable configuration modification vulnerability exists
+ in the control mode (mode 6) functionality of ntpd. If, against
+ long-standing BCP recommendations, "restrict default noquery ..."
+ is not specified, a specially crafted control mode packet can set
+ ntpd traps, providing information disclosure and DDoS
+ amplification, and unset ntpd traps, disabling legitimate
+ monitoring. A remote, unauthenticated, network attacker can
+ trigger this vulnerability.
+ Mitigation:
+ Implement BCP-38.
+ Use "restrict default noquery ..." in your ntp.conf file.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
+
+* Broadcast Mode Replay Prevention DoS
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3114 / CVE-2016-7427 / VU#633847
+ Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and
+ ntp-4.3.90 up to, but not including ntp-4.3.94.
+ CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
+ CVSS3: MED 4.3 CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary:
+ The broadcast mode of NTP is expected to only be used in a
+ trusted network. If the broadcast network is accessible to an
+ attacker, a potentially exploitable denial of service
+ vulnerability in ntpd's broadcast mode replay prevention
+ functionality can be abused. An attacker with access to the NTP
+ broadcast domain can periodically inject specially crafted
+ broadcast mode NTP packets into the broadcast domain which,
+ while being logged by ntpd, can cause ntpd to reject broadcast
+ mode packets from legitimate NTP broadcast servers.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
+
+* Broadcast Mode Poll Interval Enforcement DoS
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3113 / CVE-2016-7428 / VU#633847
+ Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p9, and
+ ntp-4.3.90 up to, but not including ntp-4.3.94
+ CVSS2: LOW 3.3 (AV:A/AC:L/Au:N/C:N/I:N/A:P)
+ CVSS3: MED 4.3 CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary:
+ The broadcast mode of NTP is expected to only be used in a
+ trusted network. If the broadcast network is accessible to an
+ attacker, a potentially exploitable denial of service
+ vulnerability in ntpd's broadcast mode poll interval enforcement
+ functionality can be abused. To limit abuse, ntpd restricts the
+ rate at which each broadcast association will process incoming
+ packets. ntpd will reject broadcast mode packets that arrive
+ before the poll interval specified in the preceding broadcast
+ packet expires. An attacker with access to the NTP broadcast
+ domain can send specially crafted broadcast mode NTP packets to
+ the broadcast domain which, while being logged by ntpd, will
+ cause ntpd to reject broadcast mode packets from legitimate NTP
+ broadcast servers.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Matthew Van Gundy of Cisco.
+
+* Windows: ntpd DoS by oversized UDP packet
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3110 / CVE-2016-9312 / VU#633847
+ Affects Windows only: ntp-4.?.?, up to but not including ntp-4.2.8p9,
+ and ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C)
+ CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
+ Summary:
+ If a vulnerable instance of ntpd on Windows receives a crafted
+ malicious packet that is "too big", ntpd will stop working.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Robert Pajak of ABB.
+
+* 0rigin (zero origin) issues
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3102 / CVE-2016-7431 / VU#633847
+ Affects: ntp-4.2.8p8, and ntp-4.3.93.
+ CVSS2: MED 5.0 (AV:N/AC:L/Au:N/C:N/I:P/A:N)
+ CVSS3: MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
+ Summary:
+ Zero Origin timestamp problems were fixed by Bug 2945 in
+ ntp-4.2.8p6. However, subsequent timestamp validation checks
+ introduced a regression in the handling of some Zero origin
+ timestamp checks.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Sharon Goldberg and Aanchal
+ Malhotra of Boston University.
+
+* read_mru_list() does inadequate incoming packet checks
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3082 / CVE-2016-7434 / VU#633847
+ Affects: ntp-4.2.7p22, up to but not including ntp-4.2.8p9, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94.
+ CVSS2: LOW 3.8 (AV:L/AC:H/Au:S/C:N/I:N/A:C)
+ CVSS3: LOW 3.8 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary:
+ If ntpd is configured to allow mrulist query requests from a
+ server that sends a crafted malicious packet, ntpd will crash
+ on receipt of that crafted malicious mrulist query packet.
+ Mitigation:
+ Only allow mrulist query packets from trusted hosts.
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Magnus Stubman.
+
+* Attack on interface selection
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3072 / CVE-2016-7429 / VU#633847
+ Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94
+ CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
+ CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
+ Summary:
+ When ntpd receives a server response on a socket that corresponds
+ to a different interface than was used for the request, the peer
+ structure is updated to use the interface for new requests. If
+ ntpd is running on a host with multiple interfaces in separate
+ networks and the operating system doesn't check source address in
+ received packets (e.g. rp_filter on Linux is set to 0), an
+ attacker that knows the address of the source can send a packet
+ with spoofed source address which will cause ntpd to select wrong
+ interface for the source and prevent it from sending new requests
+ until the list of interfaces is refreshed, which happens on
+ routing changes or every 5 minutes by default. If the attack is
+ repeated often enough (once per second), ntpd will not be able to
+ synchronize with the source.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you are going to configure your OS to disable source address
+ checks, also configure your firewall configuration to control
+ what interfaces can receive packets from what networks.
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* Client rate limiting and server responses
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3071 / CVE-2016-7426 / VU#633847
+ Affects: ntp-4.2.5p203, up to but not including ntp-4.2.8p9, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94
+ CVSS2: LOW 1.0 (AV:L/AC:H/Au:S/C:N/I:N/A:P)
+ CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
+ Summary:
+ When ntpd is configured with rate limiting for all associations
+ (restrict default limited in ntp.conf), the limits are applied
+ also to responses received from its configured sources. An
+ attacker who knows the sources (e.g., from an IPv4 refid in
+ server response) and knows the system is (mis)configured in this
+ way can periodically send packets with spoofed source address to
+ keep the rate limiting activated and prevent ntpd from accepting
+ valid responses from its sources.
+
+ While this blanket rate limiting can be useful to prevent
+ brute-force attacks on the origin timestamp, it allows this DoS
+ attack. Similarly, it allows the attacker to prevent mobilization
+ of ephemeral associations.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* Fix for bug 2085 broke initial sync calculations
+ Date Resolved: 21 November 2016; Dev (4.3.94) 21 November 2016
+ References: Sec 3067 / CVE-2016-7433 / VU#633847
+ Affects: ntp-4.2.7p385, up to but not including ntp-4.2.8p9, and
+ ntp-4.3.0 up to, but not including ntp-4.3.94. But the
+ root-distance calculation in general is incorrect in all versions
+ of ntp-4 until this release.
+ CVSS2: LOW 1.2 (AV:L/AC:H/Au:N/C:N/I:N/A:P)
+ CVSS3: LOW 1.6 CVSS:3.0/AV:P/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L
+ Summary:
+ Bug 2085 described a condition where the root delay was included
+ twice, causing the jitter value to be higher than expected. Due
+ to a misinterpretation of a small-print variable in The Book, the
+ fix for this problem was incorrect, resulting in a root distance
+ that did not include the peer dispersion. The calculations and
+ formulae have been reviewed and reconciled, and the code has been
+ updated accordingly.
+ Mitigation:
+ Upgrade to 4.2.8p9, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered independently by Brian Utterback of
+ Oracle, and Sharon Goldberg and Aanchal Malhotra of Boston University.
+
+Other fixes:
+
+* [Bug 3142] bug in netmask prefix length detection <perlinger@ntp.org>
+* [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org
+* [Bug 3129] Unknown hosts can put resolver thread into a hard loop
+ - moved retry decision where it belongs. <perlinger@ntp.org>
+* [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order
+ using the loopback-ppsapi-provider.dll <perlinger@ntp.org>
+* [Bug 3116] unit tests for NTP time stamp expansion. <perlinger@ntp.org>
+* [Bug 3100] ntpq can't retrieve daemon_version <perlinger@ntp.org>
+ - fixed extended sysvar lookup (bug introduced with bug 3008 fix)
+* [Bug 3095] Compatibility with openssl 1.1 <perlinger@ntp.org>
+ - applied patches by Kurt Roeckx <kurt@roeckx.be> to source
+ - added shim layer for SSL API calls with issues (both directions)
+* [Bug 3089] Serial Parser does not work anymore for hopfser like device
+ - simplified / refactored hex-decoding in driver. <perlinger@ntp.org>
+* [Bug 3084] update-leap mis-parses the leapfile name. HStenn.
+* [Bug 3068] Linker warnings when building on Solaris. perlinger@ntp.org
+ - applied patch thanks to Andrew Stormont <andyjstormont@gmail.com>
+* [Bug 3067] Root distance calculation needs improvement. HStenn
+* [Bug 3066] NMEA clock ignores pps. perlinger@ntp.org
+ - PPS-HACK works again.
+* [Bug 3059] Potential buffer overrun from oversized hash <perlinger@ntp.org>
+ - applied patch by Brian Utterback <brian.utterback@oracle.com>
+* [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White.
+* [Bug 3050] Fix for bug #2960 causes [...] spurious error message.
+ <perlinger@ntp.org>
+ - patches by Reinhard Max <max@suse.com> and Havard Eidnes <he@uninett.no>
+* [Bug 3047] Fix refclock_jjy C-DEX JST2000. abe@ntp.org
+ - Patch provided by Kuramatsu.
+* [Bug 3021] unity_fixture.c needs pragma weak <perlinger@ntp.org>
+ - removed unnecessary & harmful decls of 'setUp()' & 'tearDown()'
+* [Bug 3019] Windows: ERROR_HOST_UNREACHABLE block packet processing. DMayer
+* [Bug 2998] sntp/tests/packetProcessing.c broken without openssl. JPerlinger
+* [Bug 2961] sntp/tests/packetProcessing.c assumes AUTOKEY. HStenn.
+* [Bug 2959] refclock_jupiter: gps week correction <perlinger@ntp.org>
+ - fixed GPS week expansion to work based on build date. Special thanks
+ to Craig Leres for initial patch and testing.
+* [Bug 2951] ntpd tests fail: multiple definition of `send_via_ntp_signd'
+ - fixed Makefile.am <perlinger@ntp.org>
+* [Bug 2689] ATOM driver processes last PPS pulse at startup,
+ even if it is very old <perlinger@ntp.org>
+ - make sure PPS source is alive before processing samples
+ - improve stability close to the 500ms phase jump (phase gate)
+* Fix typos in include/ntp.h.
+* Shim X509_get_signature_nid() if needed
+* git author attribution cleanup
+* bk ignore file cleanup
+* remove locks in Windows IO, use rpc-like thread synchronisation instead
+
+---
+NTP 4.2.8p8 (Harlan Stenn <stenn@ntp.org>, 2016/06/02)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following 1 high- and 4 low-severity vulnerabilities:
+
+* CRYPTO_NAK crash
+ Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
+ References: Sec 3046 / CVE-2016-4957 / VU#321640
+ Affects: ntp-4.2.8p7, and ntp-4.3.92.
+ CVSS2: HIGH 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C)
+ CVSS3: HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
+ Summary: The fix for Sec 3007 in ntp-4.2.8p7 contained a bug that
+ could cause ntpd to crash.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you cannot upgrade from 4.2.8p7, the only other alternatives
+ are to patch your code or filter CRYPTO_NAK packets.
+ Properly monitor your ntpd instances, and auto-restart ntpd
+ (without -g) if it stops running.
+ Credit: This weakness was discovered by Nicolas Edet of Cisco.
+
+* Bad authentication demobilizes ephemeral associations
+ Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
+ References: Sec 3045 / CVE-2016-4953 / VU#321640
+ Affects: ntp-4, up to but not including ntp-4.2.8p8, and
+ ntp-4.3.0 up to, but not including ntp-4.3.93.
+ CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
+ CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary: An attacker who knows the origin timestamp and can send a
+ spoofed packet containing a CRYPTO-NAK to an ephemeral peer
+ target before any other response is sent can demobilize that
+ association.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* Processing spoofed server packets
+ Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
+ References: Sec 3044 / CVE-2016-4954 / VU#321640
+ Affects: ntp-4, up to but not including ntp-4.2.8p8, and
+ ntp-4.3.0 up to, but not including ntp-4.3.93.
+ CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
+ CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary: An attacker who is able to spoof packets with correct origin
+ timestamps from enough servers before the expected response
+ packets arrive at the target machine can affect some peer
+ variables and, for example, cause a false leap indication to be set.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Jakub Prokes of Red Hat.
+
+* Autokey association reset
+ Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
+ References: Sec 3043 / CVE-2016-4955 / VU#321640
+ Affects: ntp-4, up to but not including ntp-4.2.8p8, and
+ ntp-4.3.0 up to, but not including ntp-4.3.93.
+ CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
+ CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary: An attacker who is able to spoof a packet with a correct
+ origin timestamp before the expected response packet arrives at
+ the target machine can send a CRYPTO_NAK or a bad MAC and cause
+ the association's peer variables to be cleared. If this can be
+ done often enough, it will prevent that association from working.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* Broadcast interleave
+ Date Resolved: 02 June 2016; Dev (4.3.93) 02 June 2016
+ References: Sec 3042 / CVE-2016-4956 / VU#321640
+ Affects: ntp-4, up to but not including ntp-4.2.8p8, and
+ ntp-4.3.0 up to, but not including ntp-4.3.93.
+ CVSS2: LOW 2.6 (AV:N/AC:H/Au:N/C:N/I:N/A:P)
+ CVSS3: LOW 3.7 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary: The fix for NtpBug2978 does not cover broadcast associations,
+ so broadcast clients can be triggered to flip into interleave mode.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p8, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+Other fixes:
+* [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org
+ - provide build environment
+ - 'wint_t' and 'struct timespec' defined by VS2015
+ - fixed print()/scanf() format issues
+* [Bug 3052] Add a .gitignore file. Edmund Wong.
+* [Bug 3054] miscopt.html documents the allan intercept in seconds. SWhite.
+* [Bug 3058] fetch_timestamp() mishandles 64-bit alignment. Brian Utterback,
+ JPerlinger, HStenn.
+* Fix typo in ntp-wait and plot_summary. HStenn.
+* Make sure we have an "author" file for git imports. HStenn.
+* Update the sntp problem tests for MacOS. HStenn.
+
+---
+NTP 4.2.8p7 (Harlan Stenn <stenn@ntp.org>, 2016/04/26)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+When building NTP from source, there is a new configure option
+available, --enable-dynamic-interleave. More information on this below.
+
+Also note that ntp-4.2.8p7 logs more "unexpected events" than previous
+versions of ntp. These events have almost certainly happened in the
+past, it's just that they were silently counted and not logged. With
+the increasing awareness around security, we feel it's better to clearly
+log these events to help detect abusive behavior. This increased
+logging can also help detect other problems, too.
+
+In addition to bug fixes and enhancements, this release fixes the
+following 9 low- and medium-severity vulnerabilities:
+
+* Improve NTP security against buffer comparison timing attacks,
+ AKA: authdecrypt-timing
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 2879 / CVE-2016-1550
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSSv2: LOW 2.6 - (AV:L/AC:H/Au:N/C:P/I:P/A:N)
+ CVSSv3: MED 4.0 - CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
+ Summary: Packet authentication tests have been performed using
+ memcmp() or possibly bcmp(), and it is potentially possible
+ for a local or perhaps LAN-based attacker to send a packet with
+ an authentication payload and indirectly observe how much of
+ the digest has matched.
+ Mitigation:
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered independently by Loganaden
+ Velvindron, and Matthew Van Gundy and Stephen Gray of Cisco ASIG.
+
+* Zero origin timestamp bypass: Additional KoD checks.
+ References: Sec 2945 / Sec 2901 / CVE-2015-8138
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7,
+ Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.92.
+
+* peer associations were broken by the fix for NtpBug2899
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 2952 / CVE-2015-7704
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSSv2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P)
+ Summary: The fix for NtpBug2952 in ntp-4.2.8p5 to address broken peer
+ associations did not address all of the issues.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you can't upgrade, use "server" associations instead of
+ "peer" associations.
+ Monitor your ntpd instances.
+ Credit: This problem was discovered by Michael Tatarinov.
+
+* Validate crypto-NAKs, AKA: CRYPTO-NAK DoS
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3007 / CVE-2016-1547 / VU#718152
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSS2: MED 4.3 - (AV:N/AC:M/Au:N/C:N/I:N/A:P)
+ CVSS3: MED 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
+ Summary: For ntp-4 versions up to but not including ntp-4.2.8p7, an
+ off-path attacker can cause a preemptable client association to
+ be demobilized by sending a crypto NAK packet to a victim client
+ with a spoofed source address of an existing associated peer.
+ This is true even if authentication is enabled.
+
+ Furthermore, if the attacker keeps sending crypto NAK packets,
+ for example one every second, the victim never has a chance to
+ reestablish the association and synchronize time with that
+ legitimate server.
+
+ For ntp-4.2.8 thru ntp-4.2.8p6 there is less risk because more
+ stringent checks are performed on incoming packets, but there
+ are still ways to exploit this vulnerability in versions before
+ ntp-4.2.8p7.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances
+ Credit: This weakness was discovered by Stephen Gray and
+ Matthew Van Gundy of Cisco ASIG.
+
+* ctl_getitem() return value not always checked
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3008 / CVE-2016-2519
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSSv2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C)
+ CVSSv3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary: ntpq and ntpdc can be used to store and retrieve information
+ in ntpd. It is possible to store a data value that is larger
+ than the size of the buffer that the ctl_getitem() function of
+ ntpd uses to report the return value. If the length of the
+ requested data value returned by ctl_getitem() is too large,
+ the value NULL is returned instead. There are 2 cases where the
+ return value from ctl_getitem() was not directly checked to make
+ sure it's not NULL, but there are subsequent INSIST() checks
+ that make sure the return value is not NULL. There are no data
+ values ordinarily stored in ntpd that would exceed this buffer
+ length. But if one has permission to store values and one stores
+ a value that is "too large", then ntpd will abort if an attempt
+ is made to read that oversized value.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Yihan Lian of the Cloud
+ Security Team, Qihoo 360.
+
+* Crafted addpeer with hmode > 7 causes array wraparound with MATCH_ASSOC
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3009 / CVE-2016-2518 / VU#718152
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSS2: LOW 2.1 - (AV:N/AC:H/Au:S/C:N/I:N/A:P)
+ CVSS3: LOW 2.0 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
+ Summary: Using a crafted packet to create a peer association with
+ hmode > 7 causes the MATCH_ASSOC() lookup to make an
+ out-of-bounds reference.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances
+ Credit: This weakness was discovered by Yihan Lian of the Cloud
+ Security Team, Qihoo 360.
+
+* remote configuration trustedkey/requestkey/controlkey values are not
+ properly validated
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3010 / CVE-2016-2517 / VU#718152
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSS2: MED 4.9 - (AV:N/AC:H/Au:S/C:N/I:N/A:C)
+ CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary: If ntpd was expressly configured to allow for remote
+ configuration, a malicious user who knows the controlkey for
+ ntpq or the requestkey for ntpdc (if mode7 is expressly enabled)
+ can create a session with ntpd and then send a crafted packet to
+ ntpd that will change the value of the trustedkey, controlkey,
+ or requestkey to a value that will prevent any subsequent
+ authentication with ntpd until ntpd is restarted.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances
+ Credit: This weakness was discovered by Yihan Lian of the Cloud
+ Security Team, Qihoo 360.
+
+* Duplicate IPs on unconfig directives will cause an assertion botch in ntpd
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3011 / CVE-2016-2516 / VU#718152
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSS2: MED 6.3 - (AV:N/AC:M/Au:S/C:N/I:N/A:C)
+ CVSS3: MED 4.2 - CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
+ Summary: If ntpd was expressly configured to allow for remote
+ configuration, a malicious user who knows the controlkey for
+ ntpq or the requestkey for ntpdc (if mode7 is expressly enabled)
+ can create a session with ntpd and if an existing association is
+ unconfigured using the same IP twice on the unconfig directive
+ line, ntpd will abort.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Properly monitor your ntpd instances
+ Credit: This weakness was discovered by Yihan Lian of the Cloud
+ Security Team, Qihoo 360.
+
+* Refclock impersonation vulnerability
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3020 / CVE-2016-1551
+ Affects: On a very limited number of OSes, all NTP releases up to but
+ not including 4.2.8p7, and 4.3.0 up to but not including 4.3.92.
+ By "very limited number of OSes" we mean no general-purpose OSes
+ have yet been identified that have this vulnerability.
+ CVSSv2: LOW 2.6 - (AV:N/AC:H/Au:N/C:N/I:P/A:N)
+ CVSSv3: LOW 3.7 - CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
+ Summary: While most OSes implement martian packet filtering in their
+ network stack, at least regarding 127.0.0.0/8, some will allow
+ packets claiming to be from 127.0.0.0/8 that arrive over a
+ physical network. On these OSes, if ntpd is configured to use a
+ reference clock an attacker can inject packets over the network
+ that look like they are coming from that reference clock.
+ Mitigation:
+ Implement martian packet filtering and BCP-38.
+ Configure ntpd to use an adequate number of time sources.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you are unable to upgrade and if you are running an OS that
+ has this vulnerability, implement martian packet filters and
+ lobby your OS vendor to fix this problem, or run your
+ refclocks on computers that use OSes that are not vulnerable
+ to these attacks and have your vulnerable machines get their
+ time from protected resources.
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Matt Street and others of
+ Cisco ASIG.
+
+The following issues were fixed in earlier releases and contain
+improvements in 4.2.8p7:
+
+* Clients that receive a KoD should validate the origin timestamp field.
+ References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7,
+ Summary: Improvements to the fixes incorporated into 4.2.8p4 and 4.3.77.
+
+* Skeleton key: passive server with trusted key can serve time.
+ References: Sec 2936 / CVE-2015-7974
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7,
+ Summary: Improvements to the fixes incorporated in t 4.2.8p6 and 4.3.90.
+
+Two other vulnerabilities have been reported, and the mitigations
+for these are as follows:
+
+* Interleave-pivot
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 2978 / CVE-2016-1548
+ Affects: All ntp-4 releases.
+ CVSSv2: MED 6.4 - (AV:N/AC:L/Au:N/C:N/I:P/A:P)
+ CVSSv3: MED 7.2 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L
+ Summary: It is possible to change the time of an ntpd client or deny
+ service to an ntpd client by forcing it to change from basic
+ client/server mode to interleaved symmetric mode. An attacker
+ can spoof a packet from a legitimate ntpd server with an origin
+ timestamp that matches the peer->dst timestamp recorded for that
+ server. After making this switch, the client will reject all
+ future legitimate server responses. It is possible to force the
+ victim client to move time after the mode has been changed.
+ ntpq gives no indication that the mode has been switched.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p7, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page. These
+ versions will not dynamically "flip" into interleave mode
+ unless configured to do so.
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Miroslav Lichvar of RedHat
+ and separately by Jonathan Gardner of Cisco ASIG.
+
+* Sybil vulnerability: ephemeral association attack
+ Date Resolved: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016
+ References: Sec 3012 / CVE-2016-1549
+ Affects: All ntp-4 releases up to, but not including 4.2.8p7, and
+ 4.3.0 up to, but not including 4.3.92
+ CVSSv2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N)
+ CVSS3v: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
+ Summary: ntpd can be vulnerable to Sybil attacks. If one is not using
+ the feature introduced in ntp-4.2.8p6 allowing an optional 4th
+ field in the ntp.keys file to specify which IPs can serve time,
+ a malicious authenticated peer can create arbitrarily-many
+ ephemeral associations in order to win the clock selection of
+ ntpd and modify a victim's clock.
+ Mitigation:
+ Implement BCP-38.
+ Use the 4th field in the ntp.keys file to specify which IPs
+ can be time servers.
+ Properly monitor your ntpd instances.
+ Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
+
+Other fixes:
+
+* [Bug 2831] Segmentation Fault in DNS lookup during startup. perlinger@ntp.org
+ - fixed yet another race condition in the threaded resolver code.
+* [Bug 2858] bool support. Use stdbool.h when available. HStenn.
+* [Bug 2879] Improve NTP security against timing attacks. perlinger@ntp.org
+ - integrated patches by Loganaden Velvidron <logan@ntp.org>
+ with some modifications & unit tests
+* [Bug 2960] async name resolution fixes for chroot() environments.
+ Reinhard Max.
+* [Bug 2994] Systems with HAVE_SIGNALED_IO fail to compile. perlinger@ntp.org
+* [Bug 2995] Fixes to compile on Windows
+* [Bug 2999] out-of-bounds access in 'is_safe_filename()'. perlinger@ntp.org
+* [Bug 3013] Fix for ssl_init.c SHA1 test. perlinger@ntp.org
+ - Patch provided by Ch. Weisgerber
+* [Bug 3015] ntpq: config-from-file: "request contains an unprintable character"
+ - A change related to [Bug 2853] forbids trailing white space in
+ remote config commands. perlinger@ntp.org
+* [Bug 3019] NTPD stops processing packets after ERROR_HOST_UNREACHABLE
+ - report and patch from Aleksandr Kostikov.
+ - Overhaul of Windows IO completion port handling. perlinger@ntp.org
+* [Bug 3022] authkeys.c should be refactored. perlinger@ntp.org
+ - fixed memory leak in access list (auth[read]keys.c)
+ - refactored handling of key access lists (auth[read]keys.c)
+ - reduced number of error branches (authreadkeys.c)
+* [Bug 3023] ntpdate cannot correct dates in the future. perlinger@ntp.org
+* [Bug 3030] ntpq needs a general way to specify refid output format. HStenn.
+* [Bug 3031] ntp broadcastclient unable to synchronize to an server
+ when the time of server changed. perlinger@ntp.org
+ - Check the initial delay calculation and reject/unpeer the broadcast
+ server if the delay exceeds 50ms. Retry again after the next
+ broadcast packet.
+* [Bug 3036] autokey trips an INSIST in authistrustedip(). Harlan Stenn.
+* Document ntp.key's optional IP list in authenetic.html. Harlan Stenn.
+* Update html/xleave.html documentation. Harlan Stenn.
+* Update ntp.conf documentation. Harlan Stenn.
+* Fix some Credit: attributions in the NEWS file. Harlan Stenn.
+* Fix typo in html/monopt.html. Harlan Stenn.
+* Add README.pullrequests. Harlan Stenn.
+* Cleanup to include/ntp.h. Harlan Stenn.
+
+New option to 'configure':
+
+While looking in to the issues around Bug 2978, the "interleave pivot"
+issue, it became clear that there are some intricate and unresolved
+issues with interleave operations. We also realized that the interleave
+protocol was never added to the NTPv4 Standard, and it should have been.
+
+Interleave mode was first released in July of 2008, and can be engaged
+in two ways. Any 'peer' and 'broadcast' lines in the ntp.conf file may
+contain the 'xleave' option, which will expressly enable interlave mode
+for that association. Additionally, if a time packet arrives and is
+found inconsistent with normal protocol behavior but has certain
+characteristics that are compatible with interleave mode, NTP will
+dynamically switch to interleave mode. With sufficient knowledge, an
+attacker can send a crafted forged packet to an NTP instance that
+triggers only one side to enter interleaved mode.
+
+To prevent this attack until we can thoroughly document, describe,
+fix, and test the dynamic interleave mode, we've added a new
+'configure' option to the build process:
+
+ --enable-dynamic-interleave
+
+This option controls whether or not NTP will, if conditions are right,
+engage dynamic interleave mode. Dynamic interleave mode is disabled by
+default in ntp-4.2.8p7.
+
+---
+NTP 4.2.8p6 (Harlan Stenn <stenn@ntp.org>, 2016/01/20)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following 1 low- and 8 medium-severity vulnerabilities:
+
+* Potential Infinite Loop in 'ntpq'
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2548 / CVE-2015-8158
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS2: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
+ CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Base Score: 5.3 - MEDIUM
+ Summary: 'ntpq' processes incoming packets in a loop in 'getresponse()'.
+ The loop's only stopping conditions are receiving a complete and
+ correct response or hitting a small number of error conditions.
+ If the packet contains incorrect values that don't trigger one of
+ the error conditions, the loop continues to receive new packets.
+ Note well, this is an attack against an instance of 'ntpq', not
+ 'ntpd', and this attack requires the attacker to do one of the
+ following:
+ * Own a malicious NTP server that the client trusts
+ * Prevent a legitimate NTP server from sending packets to
+ the 'ntpq' client
+ * MITM the 'ntpq' communications between the 'ntpq' client
+ and the NTP server
+ Mitigation:
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG.
+
+* 0rigin: Zero Origin Timestamp Bypass
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2945 / CVE-2015-8138
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS2: (AV:N/AC:L/Au:N/C:N/I:P/A:N) Base Score: 5.0 - MEDIUM
+ CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Base Score: 5.3 - MEDIUM
+ (3.7 - LOW if you score AC:L)
+ Summary: To distinguish legitimate peer responses from forgeries, a
+ client attempts to verify a response packet by ensuring that the
+ origin timestamp in the packet matches the origin timestamp it
+ transmitted in its last request. A logic error exists that
+ allows packets with an origin timestamp of zero to bypass this
+ check whenever there is not an outstanding request to the server.
+ Mitigation:
+ Configure 'ntpd' to get time from multiple sources.
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Monitor your 'ntpd' instances.
+ Credit: This weakness was discovered by Matthey Van Gundy and
+ Jonathan Gardner of Cisco ASIG.
+
+* Stack exhaustion in recursive traversal of restriction list
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016
+ References: Sec 2940 / CVE-2015-7978
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
+ Summary: An unauthenticated 'ntpdc reslist' command can cause a
+ segmentation fault in ntpd by exhausting the call stack.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
+ If you must enable mode 7:
+ configure the use of a 'requestkey' to control who can
+ issue mode 7 requests.
+ configure 'restrict noquery' to further limit mode 7
+ requests to trusted sources.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Stephen Gray at Cisco ASIG.
+
+* Off-path Denial of Service (!DoS) attack on authenticated broadcast mode
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2942 / CVE-2015-7979
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:N/AC:M/Au:N/C:N/I:P/A:P) Base Score: 5.8
+ Summary: An off-path attacker can send broadcast packets with bad
+ authentication (wrong key, mismatched key, incorrect MAC, etc)
+ to broadcast clients. It is observed that the broadcast client
+ tears down the association with the broadcast server upon
+ receiving just one bad packet.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Monitor your 'ntpd' instances.
+ If this sort of attack is an active problem for you, you have
+ deeper problems to investigate. In this case also consider
+ having smaller NTP broadcast domains.
+ Credit: This weakness was discovered by Aanchal Malhotra of Boston
+ University.
+
+* reslist NULL pointer dereference
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2939 / CVE-2015-7977
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3 - MEDIUM
+ Summary: An unauthenticated 'ntpdc reslist' command can cause a
+ segmentation fault in ntpd by causing a NULL pointer dereference.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p6, or later, from NTP Project Download Page or
+ the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ mode 7 is disabled by default. Don't enable it.
+ If you must enable mode 7:
+ configure the use of a 'requestkey' to control who can
+ issue mode 7 requests.
+ configure 'restrict noquery' to further limit mode 7
+ requests to trusted sources.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Stephen Gray of Cisco ASIG.
+
+* 'ntpq saveconfig' command allows dangerous characters in filenames.
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2938 / CVE-2015-7976
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:N/AC:L/Au:S/C:N/I:P/A:N) Base Score: 4.0 - MEDIUM
+ Summary: The ntpq saveconfig command does not do adequate filtering
+ of special characters from the supplied filename.
+ Note well: The ability to use the saveconfig command is controlled
+ by the 'restrict nomodify' directive, and the recommended default
+ configuration is to disable this capability. If the ability to
+ execute a 'saveconfig' is required, it can easily (and should) be
+ limited and restricted to a known small number of IP addresses.
+ Mitigation:
+ Implement BCP-38.
+ use 'restrict default nomodify' in your 'ntp.conf' file.
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page.
+ If you are unable to upgrade:
+ build NTP with 'configure --disable-saveconfig' if you will
+ never need this capability, or
+ use 'restrict default nomodify' in your 'ntp.conf' file. Be
+ careful about what IPs have the ability to send 'modify'
+ requests to 'ntpd'.
+ Monitor your ntpd instances.
+ 'saveconfig' requests are logged to syslog - monitor your syslog files.
+ Credit: This weakness was discovered by Jonathan Gardner of Cisco ASIG.
+
+* nextvar() missing length check in ntpq
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2937 / CVE-2015-7975
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:L/AC:H/Au:N/C:N/I:N/A:P) Base Score: 1.2 - LOW
+ If you score A:C, this becomes 4.0.
+ CVSSv3: (CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L) Base Score 2.9, LOW
+ Summary: ntpq may call nextvar() which executes a memcpy() into the
+ name buffer without a proper length check against its maximum
+ length of 256 bytes. Note well that we're taking about ntpq here.
+ The usual worst-case effect of this vulnerability is that the
+ specific instance of ntpq will crash and the person or process
+ that did this will have stopped themselves.
+ Mitigation:
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ If you have scripts that feed input to ntpq make sure there are
+ some sanity checks on the input received from the "outside".
+ This is potentially more dangerous if ntpq is run as root.
+ Credit: This weakness was discovered by Jonathan Gardner at Cisco ASIG.
+
+* Skeleton Key: Any trusted key system can serve time
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2936 / CVE-2015-7974
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:N/AC:H/Au:S/C:N/I:C/A:N) Base Score: 4.9
+ Summary: Symmetric key encryption uses a shared trusted key. The
+ reported title for this issue was "Missing key check allows
+ impersonation between authenticated peers" and the report claimed
+ "A key specified only for one server should only work to
+ authenticate that server, other trusted keys should be refused."
+ Except there has never been any correlation between this trusted
+ key and server v. clients machines and there has never been any
+ way to specify a key only for one server. We have treated this as
+ an enhancement request, and ntp-4.2.8p6 includes other checks and
+ tests to strengthen clients against attacks coming from broadcast
+ servers.
+ Mitigation:
+ Implement BCP-38.
+ If this scenario represents a real or a potential issue for you,
+ upgrade to 4.2.8p6, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page, and
+ use the new field in the ntp.keys file that specifies the list
+ of IPs that are allowed to serve time. Note that this alone
+ will not protect against time packets with forged source IP
+ addresses, however other changes in ntp-4.2.8p6 provide
+ significant mitigation against broadcast attacks. MITM attacks
+ are a different story.
+ If you are unable to upgrade:
+ Don't use broadcast mode if you cannot monitor your client
+ servers.
+ If you choose to use symmetric keys to authenticate time
+ packets in a hostile environment where ephemeral time
+ servers can be created, or if it is expected that malicious
+ time servers will participate in an NTP broadcast domain,
+ limit the number of participating systems that participate
+ in the shared-key group.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Matt Street of Cisco ASIG.
+
+* Deja Vu: Replay attack on authenticated broadcast mode
+ Date Resolved: Stable (4.2.8p6) 19 Jan 2016; Dev (4.3.90) 19 Jan 2016
+ References: Sec 2935 / CVE-2015-7973
+ Affects: All ntp-4 releases up to, but not including 4.2.8p6, and
+ 4.3.0 up to, but not including 4.3.90
+ CVSS: (AV:A/AC:M/Au:N/C:N/I:P/A:P) Base Score: 4.3 - MEDIUM
+ Summary: If an NTP network is configured for broadcast operations then
+ either a man-in-the-middle attacker or a malicious participant
+ that has the same trusted keys as the victim can replay time packets.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p6, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ Don't use broadcast mode if you cannot monitor your client servers.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Aanchal Malhotra of Boston
+ University.
+
+Other fixes:
+
+* [Bug 2772] adj_systime overflows tv_usec. perlinger@ntp.org
+* [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
+ - applied patch by shenpeng11@huawei.com with minor adjustments
+* [Bug 2882] Look at ntp_request.c:list_peers_sum(). perlinger@ntp.org
+* [Bug 2891] Deadlock in deferred DNS lookup framework. perlinger@ntp.org
+* [Bug 2892] Several test cases assume IPv6 capabilities even when
+ IPv6 is disabled in the build. perlinger@ntp.org
+ - Found this already fixed, but validation led to cleanup actions.
+* [Bug 2905] DNS lookups broken. perlinger@ntp.org
+ - added limits to stack consumption, fixed some return code handling
+* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
+ - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
+ - make CTRL-C work for retrieval and printing od MRU list. perlinger@ntp.org
+* [Bug 2980] reduce number of warnings. perlinger@ntp.org
+ - integrated several patches from Havard Eidnes (he@uninett.no)
+* [Bug 2985] bogus calculation in authkeys.c perlinger@ntp.org
+ - implement 'auth_log2()' using integer bithack instead of float calculation
+* Make leapsec_query debug messages less verbose. Harlan Stenn.
+
+---
+NTP 4.2.8p5 (Harlan Stenn <stenn@ntp.org>, 2016/01/07)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following medium-severity vulnerability:
+
+* Small-step/big-step. Close the panic gate earlier.
+ References: Sec 2956, CVE-2015-5300
+ Affects: All ntp-4 releases up to, but not including 4.2.8p5, and
+ 4.3.0 up to, but not including 4.3.78
+ CVSS3: (AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:N/A:L) Base Score: 4.0, MEDIUM
+ Summary: If ntpd is always started with the -g option, which is
+ common and against long-standing recommendation, and if at the
+ moment ntpd is restarted an attacker can immediately respond to
+ enough requests from enough sources trusted by the target, which
+ is difficult and not common, there is a window of opportunity
+ where the attacker can cause ntpd to set the time to an
+ arbitrary value. Similarly, if an attacker is able to respond
+ to enough requests from enough sources trusted by the target,
+ the attacker can cause ntpd to abort and restart, at which
+ point it can tell the target to set the time to an arbitrary
+ value if and only if ntpd was re-started against long-standing
+ recommendation with the -g flag, or if ntpd was not given the
+ -g flag, the attacker can move the target system's time by at
+ most 900 seconds' time per attack.
+ Mitigation:
+ Configure ntpd to get time from multiple sources.
+ Upgrade to 4.2.8p5, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ As we've long documented, only use the -g option to ntpd in
+ cold-start situations.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Aanchal Malhotra,
+ Isaac E. Cohen, and Sharon Goldberg at Boston University.
+
+ NOTE WELL: The -g flag disables the limit check on the panic_gate
+ in ntpd, which is 900 seconds by default. The bug identified by
+ the researchers at Boston University is that the panic_gate
+ check was only re-enabled after the first change to the system
+ clock that was greater than 128 milliseconds, by default. The
+ correct behavior is that the panic_gate check should be
+ re-enabled after any initial time correction.
+
+ If an attacker is able to inject consistent but erroneous time
+ responses to your systems via the network or "over the air",
+ perhaps by spoofing radio, cellphone, or navigation satellite
+ transmissions, they are in a great position to affect your
+ system's clock. There comes a point where your very best
+ defenses include:
+
+ Configure ntpd to get time from multiple sources.
+ Monitor your ntpd instances.
+
+Other fixes:
+
+* Coverity submission process updated from Coverity 5 to Coverity 7.
+ The NTP codebase has been undergoing regular Coverity scans on an
+ ongoing basis since 2006. As part of our recent upgrade from
+ Coverity 5 to Coverity 7, Coverity identified 16 nits in some of
+ the newly-written Unity test programs. These were fixed.
+* [Bug 2829] Clean up pipe_fds in ntpd.c perlinger@ntp.org
+* [Bug 2887] stratum -1 config results as showing value 99
+ - fudge stratum should only accept values [0..16]. perlinger@ntp.org
+* [Bug 2932] Update leapsecond file info in miscopt.html. CWoodbury, HStenn.
+* [Bug 2934] tests/ntpd/t-ntp_scanner.c has a magic constant wired in. HMurray
+* [Bug 2944] errno is not preserved properly in ntpdate after sendto call.
+ - applied patch by Christos Zoulas. perlinger@ntp.org
+* [Bug 2952] Peer associations broken by fix for Bug 2901/CVE-2015-7704.
+* [Bug 2954] Version 4.2.8p4 crashes on startup on some OSes.
+ - fixed data race conditions in threaded DNS worker. perlinger@ntp.org
+ - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org
+* [Bug 2957] 'unsigned int' vs 'size_t' format clash. perlinger@ntp.org
+ - accept key file only if there are no parsing errors
+ - fixed size_t/u_int format clash
+ - fixed wrong use of 'strlcpy'
+* [Bug 2958] ntpq: fatal error messages need a final newline. Craig Leres.
+* [Bug 2962] truncation of size_t/ptrdiff_t on 64bit targets. perlinger@ntp.org
+ - fixed several other warnings (cast-alignment, missing const, missing prototypes)
+ - promote use of 'size_t' for values that express a size
+ - use ptr-to-const for read-only arguments
+ - make sure SOCKET values are not truncated (win32-specific)
+ - format string fixes
+* [Bug 2965] Local clock didn't work since 4.2.8p4. Martin Burnicki.
+* [Bug 2967] ntpdate command suffers an assertion failure
+ - fixed ntp_rfc2553.c to return proper address length. perlinger@ntp.org
+* [Bug 2969] Seg fault from ntpq/mrulist when looking at server with
+ lots of clients. perlinger@ntp.org
+* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
+ - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
+* Unity cleanup for FreeBSD-6.4. Harlan Stenn.
+* Unity test cleanup. Harlan Stenn.
+* Libevent autoconf pthread fixes for FreeBSD-10. Harlan Stenn.
+* Header cleanup in tests/sandbox/uglydate.c. Harlan Stenn.
+* Header cleanup in tests/libntp/sfptostr.c. Harlan Stenn.
+* Quiet a warning from clang. Harlan Stenn.
+
+---
+NTP 4.2.8p4 (Harlan Stenn <stenn@ntp.org>, 2015/10/21)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following 13 low- and medium-severity vulnerabilities:
+
+* Incomplete vallen (value length) checks in ntp_crypto.c, leading
+ to potential crashes or potential code injection/information leakage.
+
+ References: Sec 2899, Sec 2671, CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
+ Summary: The fix for CVE-2014-9750 was incomplete in that there were
+ certain code paths where a packet with particular autokey operations
+ that contained malicious data was not always being completely
+ validated. Receipt of these packets can cause ntpd to crash.
+ Mitigation:
+ Don't use autokey.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Tenable Network Security.
+
+* Clients that receive a KoD should validate the origin timestamp field.
+
+ References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3-5.0 at worst
+ Summary: An ntpd client that honors Kiss-of-Death responses will honor
+ KoD messages that have been forged by an attacker, causing it to
+ delay or stop querying its servers for time updates. Also, an
+ attacker can forge packets that claim to be from the target and
+ send them to servers often enough that a server that implements
+ KoD rate limiting will send the target machine a KoD response to
+ attempt to reduce the rate of incoming packets, or it may also
+ trigger a firewall block at the server for packets from the target
+ machine. For either of these attacks to succeed, the attacker must
+ know what servers the target is communicating with. An attacker
+ can be anywhere on the Internet and can frequently learn the
+ identity of the target's time source by sending the target a
+ time query.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you can't upgrade, restrict who can query ntpd to learn who
+ its servers are, and what IPs are allowed to ask your system
+ for the time. This mitigation is heavy-handed.
+ Monitor your ntpd instances.
+ Note:
+ 4.2.8p4 protects against the first attack. For the second attack,
+ all we can do is warn when it is happening, which we do in 4.2.8p4.
+ Credit: This weakness was discovered by Aanchal Malhotra,
+ Issac E. Cohen, and Sharon Goldberg of Boston University.
+
+* configuration directives to change "pidfile" and "driftfile" should
+ only be allowed locally.
+
+ References: Sec 2902 / CVE-2015-5196
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.2 worst case
+ Summary: If ntpd is configured to allow for remote configuration,
+ and if the (possibly spoofed) source IP address is allowed to
+ send remote configuration requests, and if the attacker knows
+ the remote configuration password, it's possible for an attacker
+ to use the "pidfile" or "driftfile" directives to potentially
+ overwrite other files.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ If you cannot upgrade, don't enable remote configuration.
+ If you must enable remote configuration and cannot upgrade,
+ remote configuration of NTF's ntpd requires:
+ - an explicitly configured trustedkey, and you should also
+ configure a controlkey.
+ - access from a permitted IP. You choose the IPs.
+ - authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* Slow memory leak in CRYPTO_ASSOC
+
+ References: Sec 2909 / CVE-2015-7701
+ Affects: All ntp-4 releases that use autokey up to, but not
+ including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 0.0 best/usual case,
+ 4.6 otherwise
+ Summary: If ntpd is configured to use autokey, then an attacker can
+ send packets to ntpd that will, after several days of ongoing
+ attack, cause it to run out of memory.
+ Mitigation:
+ Don't use autokey.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Tenable Network Security.
+
+* mode 7 loop counter underrun
+
+ References: Sec 2913 / CVE-2015-7848 / TALOS-CAN-0052
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
+ Summary: If ntpd is configured to enable mode 7 packets, and if the
+ use of mode 7 packets is not properly protected thru the use of
+ the available mode 7 authentication and restriction mechanisms,
+ and if the (possibly spoofed) source IP address is allowed to
+ send mode 7 queries, then an attacker can send a crafted packet
+ to ntpd that will cause it to crash.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
+ If you must enable mode 7:
+ configure the use of a requestkey to control who can issue
+ mode 7 requests.
+ configure restrict noquery to further limit mode 7 requests
+ to trusted sources.
+ Monitor your ntpd instances.
+Credit: This weakness was discovered by Aleksandar Nikolic of Cisco Talos.
+
+* memory corruption in password store
+
+ References: Sec 2916 / CVE-2015-7849 / TALOS-CAN-0054
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.8, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) source IP address is allowed to send
+ remote configuration requests, and if the attacker knows the
+ remote configuration password or if ntpd was configured to
+ disable authentication, then an attacker can send a set of
+ packets to ntpd that may cause a crash or theoretically
+ perform a code injection attack.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's
+ ntpd requires:
+ an explicitly configured "trusted" key. Only configure
+ this if you need it.
+ access from a permitted IP address. You choose the IPs.
+ authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* Infinite loop if extended logging enabled and the logfile and
+ keyfile are the same.
+
+ References: Sec 2917 / CVE-2015-7850 / TALOS-CAN-0055
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) source IP address is allowed to send
+ remote configuration requests, and if the attacker knows the
+ remote configuration password or if ntpd was configured to
+ disable authentication, then an attacker can send a set of
+ packets to ntpd that will cause it to crash and/or create a
+ potentially huge log file. Specifically, the attacker could
+ enable extended logging, point the key file at the log file,
+ and cause what amounts to an infinite loop.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's ntpd
+ requires:
+ an explicitly configured "trusted" key. Only configure this
+ if you need it.
+ access from a permitted IP address. You choose the IPs.
+ authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* Potential path traversal vulnerability in the config file saving of
+ ntpd on VMS.
+
+ References: Sec 2918 / CVE-2015-7851 / TALOS-CAN-0062
+ Affects: All ntp-4 releases running under VMS up to, but not
+ including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:P/A:C) Base Score: 5.2, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) IP address is allowed to send remote
+ configuration requests, and if the attacker knows the remote
+ configuration password or if ntpd was configured to disable
+ authentication, then an attacker can send a set of packets to
+ ntpd that may cause ntpd to overwrite files.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's ntpd
+ requires:
+ an explicitly configured "trusted" key. Only configure
+ this if you need it.
+ access from permitted IP addresses. You choose the IPs.
+ authentication. Don't disable it. Practice key security safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* ntpq atoascii() potential memory corruption
+
+ References: Sec 2919 / CVE-2015-7852 / TALOS-CAN-0063
+ Affects: All ntp-4 releases running up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:N/C:N/I:P/A:P) Base Score: 4.0, worst case
+ Summary: If an attacker can figure out the precise moment that ntpq
+ is listening for data and the port number it is listening on or
+ if the attacker can provide a malicious instance ntpd that
+ victims will connect to then an attacker can send a set of
+ crafted mode 6 response packets that, if received by ntpq,
+ can cause ntpq to crash.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade and you run ntpq against a server
+ and ntpq crashes, try again using raw mode. Build or get a
+ patched ntpq and see if that fixes the problem. Report new
+ bugs in ntpq or abusive servers appropriately.
+ If you use ntpq in scripts, make sure ntpq does what you expect
+ in your scripts.
+ Credit: This weakness was discovered by Yves Younan and
+ Aleksander Nikolich of Cisco Talos.
+
+* Invalid length data provided by a custom refclock driver could cause
+ a buffer overflow.
+
+ References: Sec 2920 / CVE-2015-7853 / TALOS-CAN-0064
+ Affects: Potentially all ntp-4 releases running up to, but not
+ including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ that have custom refclocks
+ CVSS: (AV:L/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 usual case,
+ 5.9 unusual worst case
+ Summary: A negative value for the datalen parameter will overflow a
+ data buffer. NTF's ntpd driver implementations always set this
+ value to 0 and are therefore not vulnerable to this weakness.
+ If you are running a custom refclock driver in ntpd and that
+ driver supplies a negative value for datalen (no custom driver
+ of even minimal competence would do this) then ntpd would
+ overflow a data buffer. It is even hypothetically possible
+ in this case that instead of simply crashing ntpd the attacker
+ could effect a code injection attack.
+ Mitigation:
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ If you are running custom refclock drivers, make sure
+ the signed datalen value is either zero or positive.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* Password Length Memory Corruption Vulnerability
+
+ References: Sec 2921 / CVE-2015-7854 / TALOS-CAN-0065
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
+ 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 best case,
+ 1.7 usual case, 6.8, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) source IP address is allowed to send
+ remote configuration requests, and if the attacker knows the
+ remote configuration password or if ntpd was (foolishly)
+ configured to disable authentication, then an attacker can
+ send a set of packets to ntpd that may cause it to crash,
+ with the hypothetical possibility of a small code injection.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's
+ ntpd requires:
+ an explicitly configured "trusted" key. Only configure
+ this if you need it.
+ access from a permitted IP address. You choose the IPs.
+ authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan and
+ Aleksander Nikolich of Cisco Talos.
+
+* decodenetnum() will ASSERT botch instead of returning FAIL on some
+ bogus values.
+
+ References: Sec 2922 / CVE-2015-7855
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
+ 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
+ Summary: If ntpd is fed a crafted mode 6 or mode 7 packet containing
+ an unusually long data value where a network address is expected,
+ the decodenetnum() function will abort with an assertion failure
+ instead of simply returning a failure condition.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ mode 7 is disabled by default. Don't enable it.
+ Use restrict noquery to limit who can send mode 6
+ and mode 7 requests.
+ Configure and use the controlkey and requestkey
+ authentication directives to limit who can
+ send mode 6 and mode 7 requests.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by John D "Doug" Birdwell of IDA.org.
+
+* NAK to the Future: Symmetric association authentication bypass via
+ crypto-NAK.
+
+ References: Sec 2941 / CVE-2015-7871
+ Affects: All ntp-4 releases between 4.2.5p186 up to but not including
+ 4.2.8p4, and 4.3.0 up to but not including 4.3.77
+ CVSS: (AV:N/AC:L/Au:N/C:N/I:P/A:P) Base Score: 6.4
+ Summary: Crypto-NAK packets can be used to cause ntpd to accept time
+ from unauthenticated ephemeral symmetric peers by bypassing the
+ authentication required to mobilize peer associations. This
+ vulnerability appears to have been introduced in ntp-4.2.5p186
+ when the code handling mobilization of new passive symmetric
+ associations (lines 1103-1165) was refactored.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ Apply the patch to the bottom of the "authentic" check
+ block around line 1136 of ntp_proto.c.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Matthew Van Gundy of Cisco ASIG.
+
+Backward-Incompatible changes:
+* [Bug 2817] Default on Linux is now "rlimit memlock -1".
+ While the general default of 32M is still the case, under Linux
+ the default value has been changed to -1 (do not lock ntpd into
+ memory). A value of 0 means "lock ntpd into memory with whatever
+ memory it needs." If your ntp.conf file has an explicit "rlimit memlock"
+ value in it, that value will continue to be used.
+
+* [Bug 2886] Misspelling: "outlyer" should be "outlier".
+ If you've written a script that looks for this case in, say, the
+ output of ntpq, you probably want to change your regex matches
+ from 'outlyer' to 'outl[iy]er'.
+
+New features in this release:
+* 'rlimit memlock' now has finer-grained control. A value of -1 means
+ "don't lock ntpd into memore". This is the default for Linux boxes.
+ A value of 0 means "lock ntpd into memory" with no limits. Otherwise
+ the value is the number of megabytes of memory to lock. The default
+ is 32 megabytes.
+
+* The old Google Test framework has been replaced with a new framework,
+ based on http://www.throwtheswitch.org/unity/ .
+
+Bug Fixes and Improvements:
+* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
+ privileges and limiting resources in NTPD removes the need to link
+ forcefully against 'libgcc_s' which does not always work. J.Perlinger
+* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn.
+* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn.
+* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn.
+* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org
+* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn.
+* [Bug 2849] Systems with more than one default route may never
+ synchronize. Brian Utterback. Note that this patch might need to
+ be reverted once Bug 2043 has been fixed.
+* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
+* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn.
+* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
+* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn
+* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must
+ be configured for the distribution targets. Harlan Stenn.
+* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+* [Bug 2888] streamline calendar functions. perlinger@ntp.org
+* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org
+* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov.
+* [Bug 2906] make check needs better support for pthreads. Harlan Stenn.
+* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn.
+* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn.
+* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn.
+* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn.
+* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn.
+* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn.
+* top_srcdir can change based on ntp v. sntp. Harlan Stenn.
+* sntp/tests/ function parameter list cleanup. Damir Tomić.
+* tests/libntp/ function parameter list cleanup. Damir Tomić.
+* tests/ntpd/ function parameter list cleanup. Damir Tomić.
+* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn.
+* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn.
+* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić.
+* tests/libntp/ improvements in code and fixed error printing. Damir Tomić.
+* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
+ caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed
+ formatting; first declaration, then code (C90); deleted unnecessary comments;
+ changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich
+* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments,
+ fix formatting, cleanup. Tomasz Flendrich
+* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting.
+ Tomasz Flendrich
+* tests/libntp/statestr.c remove empty functions, remove unnecessary include,
+ fix formatting. Tomasz Flendrich
+* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich
+* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich
+* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting.
+ Tomasz Flendrich
+* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich
+* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich
+* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich
+* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich
+* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich
+* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting.
+* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include,
+fixed formatting. Tomasz Flendrich
+* tests/libntp/timespecops.c fixed formatting, fixed the order of includes,
+ removed unnecessary comments, cleanup. Tomasz Flendrich
+* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary
+ comments, cleanup. Tomasz Flendrich
+* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting.
+ Tomasz Flendrich
+* tests/libntp/lfptest.h cleanup. Tomasz Flendrich
+* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich
+* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting.
+ Tomasz Flendrich
+* sntp/tests/kodDatabase.c added consts, deleted empty function,
+ fixed formatting. Tomasz Flendrich
+* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich
+* sntp/tests/packetHandling.c is now using proper Unity's assertions,
+ fixed formatting, deleted unused variable. Tomasz Flendrich
+* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting.
+ Tomasz Flendrich
+* sntp/tests/packetProcessing.c changed from sprintf to snprintf,
+ fixed formatting. Tomasz Flendrich
+* sntp/tests/utilities.c is now using proper Unity's assertions, changed
+ the order of includes, fixed formatting, removed unnecessary comments.
+ Tomasz Flendrich
+* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich
+* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem,
+ made one function do its job, deleted unnecessary prints, fixed formatting.
+ Tomasz Flendrich
+* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich
+* sntp/unity/unity_config.h: Distribute it. Harlan Stenn.
+* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn.
+* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn.
+* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn.
+* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn.
+* Don't build sntp/libevent/sample/. Harlan Stenn.
+* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn.
+* br-flock: --enable-local-libevent. Harlan Stenn.
+* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich
+* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn.
+* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+* Code cleanup. Harlan Stenn.
+* libntp/icom.c: Typo fix. Harlan Stenn.
+* util/ntptime.c: initialization nit. Harlan Stenn.
+* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn.
+* Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+* ntpd/ntp_restrict.c: added a few assertions, created tests for this file.
+ Tomasz Flendrich
+* Changed progname to be const in many files - now it's consistent. Tomasz
+ Flendrich
+* Typo fix for GCC warning suppression. Harlan Stenn.
+* Added tests/ntpd/ntp_scanner.c test. Damir Tomić.
+* Added declarations to all Unity tests, and did minor fixes to them.
+ Reduced the number of warnings by half. Damir Tomić.
+* Updated generate_test_runner.rb and updated the sntp/unity/auto directory
+ with the latest Unity updates from Mark. Damir Tomić.
+* Retire google test - phase I. Harlan Stenn.
+* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+* Update the NEWS file. Harlan Stenn.
+* Autoconf cleanup. Harlan Stenn.
+* Unit test dist cleanup. Harlan Stenn.
+* Cleanup various test Makefile.am files. Harlan Stenn.
+* Pthread autoconf macro cleanup. Harlan Stenn.
+* Fix progname definition in unity runner scripts. Harlan Stenn.
+* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn.
+* Update the patch for bug 2817. Harlan Stenn.
+* More updates for bug 2817. Harlan Stenn.
+* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn.
+* gcc on older HPUX may need +allowdups. Harlan Stenn.
+* Adding missing MCAST protection. Harlan Stenn.
+* Disable certain test programs on certain platforms. Harlan Stenn.
+* Implement --enable-problem-tests (on by default). Harlan Stenn.
+* build system tweaks. Harlan Stenn.
+
+---
+NTP 4.2.8p3 (Harlan Stenn <stenn@ntp.org>, 2015/06/29)
+
+Focus: 1 Security fix. Bug fixes and enhancements. Leap-second improvements.
+
+Severity: MEDIUM
+
+Security Fix:
+
+* [Sec 2853] Crafted remote config packet can crash some versions of
+ ntpd. Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn.
+
+Under specific circumstances an attacker can send a crafted packet to
+cause a vulnerable ntpd instance to crash. This requires each of the
+following to be true:
+
+1) ntpd set up to allow remote configuration (not allowed by default), and
+2) knowledge of the configuration password, and
+3) access to a computer entrusted to perform remote configuration.
+
+This vulnerability is considered low-risk.
+
+New features in this release:
+
+Optional (disabled by default) support to have ntpd provide smeared
+leap second time. A specially built and configured ntpd will only
+offer smeared time in response to client packets. These response
+packets will also contain a "refid" of 254.a.b.c, where the 24 bits
+of a, b, and c encode the amount of smear in a 2:22 integer:fraction
+format. See README.leapsmear and http://bugs.ntp.org/2855 for more
+information.
+
+ *IF YOU CHOOSE TO CONFIGURE NTPD TO PROVIDE LEAP SMEAR TIME*
+ *BE SURE YOU DO NOT OFFER THAT TIME ON PUBLIC TIMESERVERS.*
+
+We've imported the Unity test framework, and have begun converting
+the existing google-test items to this new framework. If you want
+to write new tests or change old ones, you'll need to have ruby
+installed. You don't need ruby to run the test suite.
+
+Bug Fixes and Improvements:
+
+* CID 739725: Fix a rare resource leak in libevent/listener.c.
+* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
+* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
+* CID 1269537: Clean up a line of dead code in getShmTime().
+* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach.
+* [Bug 2590] autogen-5.18.5.
+* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
+ of 'limited'.
+* [Bug 2650] fix includefile processing.
+* [Bug 2745] ntpd -x steps clock on leap second
+ Fixed an initial-value problem that caused misbehaviour in absence of
+ any leapsecond information.
+ Do leap second stepping only of the step adjustment is beyond the
+ proper jump distance limit and step correction is allowed at all.
+* [Bug 2750] build for Win64
+ Building for 32bit of loopback ppsapi needs def file
+* [Bug 2776] Improve ntpq's 'help keytype'.
+* [Bug 2778] Implement "apeers" ntpq command to include associd.
+* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection.
+* [Bug 2792] If the IFF_RUNNING interface flag is supported then an
+ interface is ignored as long as this flag is not set since the
+ interface is not usable (e.g., no link).
+* [Bug 2794] Clean up kernel clock status reports.
+* [Bug 2800] refclock_true.c true_debug() can't open debug log because
+ of incompatible open/fdopen parameters.
+* [Bug 2804] install-local-data assumes GNU 'find' semantics.
+* [Bug 2805] ntpd fails to join multicast group.
+* [Bug 2806] refclock_jjy.c supports the Telephone JJY.
+* [Bug 2808] GPSD_JSON driver enhancements, step 1.
+ Fix crash during cleanup if GPS device not present and char device.
+ Increase internal token buffer to parse all JSON data, even SKY.
+ Defer logging of errors during driver init until the first unit is
+ started, so the syslog is not cluttered when the driver is not used.
+ Various improvements, see http://bugs.ntp.org/2808 for details.
+ Changed libjsmn to a more recent version.
+* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX.
+* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
+* [Bug 2815] net-snmp before v5.4 has circular library dependencies.
+* [Bug 2821] Add a missing NTP_PRINTF and a missing const.
+* [Bug 2822] New leap column in sntp broke NTP::Util.pm.
+* [Bug 2824] Convert update-leap to perl. (also see 2769)
+* [Bug 2825] Quiet file installation in html/ .
+* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey
+ NTPD transfers the current TAI (instead of an announcement) now.
+ This might still needed improvement.
+ Update autokey data ASAP when 'sys_tai' changes.
+ Fix unit test that was broken by changes for autokey update.
+ Avoid potential signature length issue and use DPRINTF where possible
+ in ntp_crypto.c.
+* [Bug 2832] refclock_jjy.c supports the TDC-300.
+* [Bug 2834] Correct a broken html tag in html/refclock.html
+* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more
+ robust, and require 2 consecutive timestamps to be consistent.
+* [Bug 2837] Allow a configurable DSCP value.
+* [Bug 2837] add test for DSCP to ntpd/complete.conf.in
+* [Bug 2842] Glitch in ntp.conf.def documentation stanza.
+* [Bug 2842] Bug in mdoc2man.
+* [Bug 2843] make check fails on 4.3.36
+ Fixed compiler warnings about numeric range overflow
+ (The original topic was fixed in a byplay to bug#2830)
+* [Bug 2845] Harden memory allocation in ntpd.
+* [Bug 2852] 'make check' can't find unity.h. Hal Murray.
+* [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida.
+* [Bug 2855] Parser fix for conditional leap smear code. Harlan Stenn.
+* [Bug 2855] Report leap smear in the REFID. Harlan Stenn.
+* [Bug 2855] Implement conditional leap smear code. Martin Burnicki.
+* [Bug 2856] ntpd should wait() on terminated child processes. Paul Green.
+* [Bug 2857] Stratus VOS does not support SIGIO. Paul Green.
+* [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel.
+* [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel.
+* html/drivers/driver22.html: typo fix. Harlan Stenn.
+* refidsmear test cleanup. Tomasz Flendrich.
+* refidsmear function support and tests. Harlan Stenn.
+* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested
+ something that was only in the 4.2.6 sntp. Harlan Stenn.
+* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests.
+ Damir Tomić
+* Modified tests/libtnp/Makefile.am so it builds Unity framework tests.
+ Damir Tomić
+* Modified sntp/tests/Makefile.am so it builds Unity framework tests.
+ Damir Tomić
+* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
+* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić
+* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c,
+ atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
+ calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c,
+ numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c,
+ timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c.
+ Damir Tomić
+* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c,
+ networking.c, keyFile.c, utilities.cpp, sntptest.h,
+ fileHandlingTest.h. Damir Tomić
+* Initial support for experimental leap smear code. Harlan Stenn.
+* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn.
+* Report select() debug messages at debug level 3 now.
+* sntp/scripts/genLocInfo: treat raspbian as debian.
+* Unity test framework fixes.
+ ** Requires ruby for changes to tests.
+* Initial support for PACKAGE_VERSION tests.
+* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS.
+* tests/bug-2803/Makefile.am must distribute bug-2803.h.
+* Add an assert to the ntpq ifstats code.
+* Clean up the RLIMIT_STACK code.
+* Improve the ntpq documentation around the controlkey keyid.
+* ntpq.c cleanup.
+* Windows port build cleanup.
+
+---
+NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/07)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following medium-severity vulnerabilities involving private key
+authentication:
+
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+
+ References: Sec 2779 / CVE-2015-1798 / VU#374268
+ Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
+ including ntp-4.2.8p2 where the installation uses symmetric keys
+ to authenticate remote associations.
+ CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
+ Date Resolved: Stable (4.2.8p2) 07 Apr 2015
+ Summary: When ntpd is configured to use a symmetric key to authenticate
+ a remote NTP server/peer, it checks if the NTP message
+ authentication code (MAC) in received packets is valid, but not if
+ there actually is any MAC included. Packets without a MAC are
+ accepted as if they had a valid MAC. This allows a MITM attacker to
+ send false packets that are accepted by the client/peer without
+ having to know the symmetric key. The attacker needs to know the
+ transmit timestamp of the client to match it in the forged reply
+ and the false reply needs to reach the client before the genuine
+ reply from the server. The attacker doesn't necessarily need to be
+ relaying the packets between the client and the server.
+
+ Authentication using autokey doesn't have this problem as there is
+ a check that requires the key ID to be larger than NTP_MAXKEY,
+ which fails for packets without a MAC.
+ Mitigation:
+ Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Configure ntpd with enough time sources and monitor it properly.
+ Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
+
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+
+ References: Sec 2781 / CVE-2015-1799 / VU#374268
+ Affects: All NTP releases starting with at least xntp3.3wy up to but
+ not including ntp-4.2.8p2 where the installation uses symmetric
+ key authentication.
+ CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
+ Note: the CVSS base Score for this issue could be 4.3 or lower, and
+ it could be higher than 5.4.
+ Date Resolved: Stable (4.2.8p2) 07 Apr 2015
+ Summary: An attacker knowing that NTP hosts A and B are peering with
+ each other (symmetric association) can send a packet to host A
+ with source address of B which will set the NTP state variables
+ on A to the values sent by the attacker. Host A will then send
+ on its next poll to B a packet with originate timestamp that
+ doesn't match the transmit timestamp of B and the packet will
+ be dropped. If the attacker does this periodically for both
+ hosts, they won't be able to synchronize to each other. This is
+ a known denial-of-service attack, described at
+ https://www.eecis.udel.edu/~mills/onwire.html .
+
+ According to the document the NTP authentication is supposed to
+ protect symmetric associations against this attack, but that
+ doesn't seem to be the case. The state variables are updated even
+ when authentication fails and the peers are sending packets with
+ originate timestamps that don't match the transmit timestamps on
+ the receiving side.
+
+ This seems to be a very old problem, dating back to at least
+ xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
+ specifications, so other NTP implementations with support for
+ symmetric associations and authentication may be vulnerable too.
+ An update to the NTP RFC to correct this error is in-process.
+ Mitigation:
+ Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Note that for users of autokey, this specific style of MITM attack
+ is simply a long-known potential problem.
+ Configure ntpd with appropriate time sources and monitor ntpd.
+ Alert your staff if problems are detected.
+ Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
+
+* New script: update-leap
+The update-leap script will verify and if necessary, update the
+leap-second definition file.
+It requires the following commands in order to work:
+
+ wget logger tr sed shasum
+
+Some may choose to run this from cron. It needs more portability testing.
+
+Bug Fixes and Improvements:
+
+* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
+* [Bug 2346] "graceful termination" signals do not do peer cleanup.
+* [Bug 2728] See if C99-style structure initialization works.
+* [Bug 2747] Upgrade libevent to 2.1.5-beta.
+* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
+* [Bug 2751] jitter.h has stale copies of l_fp macros.
+* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
+* [Bug 2757] Quiet compiler warnings.
+* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
+* [Bug 2763] Allow different thresholds for forward and backward steps.
+* [Bug 2766] ntp-keygen output files should not be world-readable.
+* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
+* [Bug 2771] nonvolatile value is documented in wrong units.
+* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
+* [Bug 2774] Unreasonably verbose printout - leap pending/warning
+* [Bug 2775] ntp-keygen.c fails to compile under Windows.
+* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files.
+ Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices
+ in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling
+ if the time status shall be printed.
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
+* [Bug 2789] Quiet compiler warnings from libevent.
+* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
+ pause briefly before measuring system clock precision to yield
+ correct results.
+* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
+* Use predefined function types for parse driver functions
+ used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid
+ compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings
+ when called with pointers to different types.
+
+---
+NTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following high-severity vulnerabilities:
+
+* vallen is not validated in several places in ntp_crypto.c, leading
+ to a potential information leak or possibly a crash
+
+ References: Sec 2671 / CVE-2014-9297 / VU#852879
+ Affects: All NTP4 releases before 4.2.8p1 that are running autokey.
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Date Resolved: Stable (4.2.8p1) 04 Feb 2015
+ Summary: The vallen packet value is not validated in several code
+ paths in ntp_crypto.c which can lead to information leakage
+ or perhaps a crash of the ntpd process.
+ Mitigation - any of:
+ Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Disable Autokey Authentication by removing, or commenting out,
+ all configuration directives beginning with the "crypto"
+ keyword in your ntp.conf file.
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team, with additional cases found by Sebastian
+ Krahmer of the SUSE Security Team and Harlan Stenn of Network
+ Time Foundation.
+
+* ::1 can be spoofed on some OSes, so ACLs based on IPv6 ::1 addresses
+ can be bypassed.
+
+ References: Sec 2672 / CVE-2014-9298 / VU#852879
+ Affects: All NTP4 releases before 4.2.8p1, under at least some
+ versions of MacOS and Linux. *BSD has not been seen to be vulnerable.
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:C) Base Score: 9
+ Date Resolved: Stable (4.2.8p1) 04 Feb 2014
+ Summary: While available kernels will prevent 127.0.0.1 addresses
+ from "appearing" on non-localhost IPv4 interfaces, some kernels
+ do not offer the same protection for ::1 source addresses on
+ IPv6 interfaces. Since NTP's access control is based on source
+ address and localhost addresses generally have no restrictions,
+ an attacker can send malicious control and configuration packets
+ by spoofing ::1 addresses from the outside. Note Well: This is
+ not really a bug in NTP, it's a problem with some OSes. If you
+ have one of these OSes where ::1 can be spoofed, ALL ::1 -based
+ ACL restrictions on any application can be bypassed!
+ Mitigation:
+ Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Install firewall rules to block packets claiming to come from
+ ::1 from inappropriate network interfaces.
+ Credit: This vulnerability was discovered by Stephen Roettger of
+ the Google Security Team.
+
+Additionally, over 30 bugfixes and improvements were made to the codebase.
+See the ChangeLog for more information.
+
+---
+NTP 4.2.8 (Harlan Stenn <stenn@ntp.org>, 2014/12/18)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following high-severity vulnerabilities:
+
+************************** vv NOTE WELL vv *****************************
+
+The vulnerabilities listed below can be significantly mitigated by
+following the BCP of putting
+
+ restrict default ... noquery
+
+in the ntp.conf file. With the exception of:
+
+ receive(): missing return on error
+ References: Sec 2670 / CVE-2014-9296 / VU#852879
+
+below (which is a limited-risk vulnerability), none of the recent
+vulnerabilities listed below can be exploited if the source IP is
+restricted from sending a 'query'-class packet by your ntp.conf file.
+
+************************** ^^ NOTE WELL ^^ *****************************
+
+* Weak default key in config_auth().
+
+ References: [Sec 2665] / CVE-2014-9293 / VU#852879
+ CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
+ Vulnerable Versions: all releases prior to 4.2.7p11
+ Date Resolved: 28 Jan 2010
+
+ Summary: If no 'auth' key is set in the configuration file, ntpd
+ would generate a random key on the fly. There were two
+ problems with this: 1) the generated key was 31 bits in size,
+ and 2) it used the (now weak) ntp_random() function, which was
+ seeded with a 32-bit value and could only provide 32 bits of
+ entropy. This was sufficient back in the late 1990s when the
+ code was written. Not today.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.7p11 or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta
+ of the Google Security Team.
+
+* Non-cryptographic random number generator with weak seed used by
+ ntp-keygen to generate symmetric keys.
+
+ References: [Sec 2666] / CVE-2014-9294 / VU#852879
+ CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
+ Vulnerable Versions: All NTP4 releases before 4.2.7p230
+ Date Resolved: Dev (4.2.7p230) 01 Nov 2011
+
+ Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to
+ prepare a random number generator that was of good quality back
+ in the late 1990s. The random numbers produced was then used to
+ generate symmetric keys. In ntp-4.2.8 we use a current-technology
+ cryptographic random number generator, either RAND_bytes from
+ OpenSSL, or arc4random().
+
+ Mitigation - any of:
+ - Upgrade to 4.2.7p230 or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was discovered in ntp-4.2.6 by
+ Stephen Roettger of the Google Security Team.
+
+* Buffer overflow in crypto_recv()
+
+ References: Sec 2667 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: When Autokey Authentication is enabled (i.e. the ntp.conf
+ file contains a 'crypto pw ...' directive) a remote attacker
+ can send a carefully crafted packet that can overflow a stack
+ buffer and potentially allow malicious code to be executed
+ with the privilege level of the ntpd process.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later, or
+ - Disable Autokey Authentication by removing, or commenting out,
+ all configuration directives beginning with the crypto keyword
+ in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* Buffer overflow in ctl_putdata()
+
+ References: Sec 2668 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: A remote attacker can send a carefully crafted packet that
+ can overflow a stack buffer and potentially allow malicious
+ code to be executed with the privilege level of the ntpd process.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* Buffer overflow in configure()
+
+ References: Sec 2669 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: A remote attacker can send a carefully crafted packet that
+ can overflow a stack buffer and potentially allow malicious
+ code to be executed with the privilege level of the ntpd process.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* receive(): missing return on error
+
+ References: Sec 2670 / CVE-2014-9296 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: Code in ntp_proto.c:receive() was missing a 'return;' in
+ the code path where an error was detected, which meant
+ processing did not stop when a specific rare error occurred.
+ We haven't found a way for this bug to affect system integrity.
+ If there is no way to affect system integrity the base CVSS
+ score for this bug is 0. If there is one avenue through which
+ system integrity can be partially affected, the base score
+ becomes a 5. If system integrity can be partially affected
+ via all three integrity metrics, the CVSS base score become 7.5.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later,
+ - Remove or comment out all configuration directives
+ beginning with the crypto keyword in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+See http://support.ntp.org/security for more information.
+
+New features / changes in this release:
+
+Important Changes
+
+* Internal NTP Era counters
+
+The internal counters that track the "era" (range of years) we are in
+rolls over every 136 years'. The current "era" started at the stroke of
+midnight on 1 Jan 1900, and ends just before the stroke of midnight on
+1 Jan 2036.
+In the past, we have used the "midpoint" of the range to decide which
+era we were in. Given the longevity of some products, it became clear
+that it would be more functional to "look back" less, and "look forward"
+more. We now compile a timestamp into the ntpd executable and when we
+get a timestamp we us the "built-on" to tell us what era we are in.
+This check "looks back" 10 years, and "looks forward" 126 years.
+
+* ntpdc responses disabled by default
+
+Dave Hart writes:
+
+For a long time, ntpq and its mostly text-based mode 6 (control)
+protocol have been preferred over ntpdc and its mode 7 (private
+request) protocol for runtime queries and configuration. There has
+been a goal of deprecating ntpdc, previously held back by numerous
+capabilities exposed by ntpdc with no ntpq equivalent. I have been
+adding commands to ntpq to cover these cases, and I believe I've
+covered them all, though I've not compared command-by-command
+recently.
+
+As I've said previously, the binary mode 7 protocol involves a lot of
+hand-rolled structure layout and byte-swapping code in both ntpd and
+ntpdc which is hard to get right. As ntpd grows and changes, the
+changes are difficult to expose via ntpdc while maintaining forward
+and backward compatibility between ntpdc and ntpd. In contrast,
+ntpq's text-based, label=value approach involves more code reuse and
+allows compatible changes without extra work in most cases.
+
+Mode 7 has always been defined as vendor/implementation-specific while
+mode 6 is described in RFC 1305 and intended to be open to interoperate
+with other implementations. There is an early draft of an updated
+mode 6 description that likely will join the other NTPv4 RFCs
+eventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01)
+
+For these reasons, ntpd 4.2.7p230 by default disables processing of
+ntpdc queries, reducing ntpd's attack surface and functionally
+deprecating ntpdc. If you are in the habit of using ntpdc for certain
+operations, please try the ntpq equivalent. If there's no equivalent,
+please open a bug report at http://bugs.ntp.org./
+
+In addition to the above, over 1100 issues have been resolved between
+the 4.2.6 branch and 4.2.8. The ChangeLog file in the distribution
+lists these.
+
+---
+NTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
+
+Focus: Bug fixes
+
+Severity: Medium
+
+This is a recommended upgrade.
+
+This release updates sys_rootdisp and sys_jitter calculations to match the
+RFC specification, fixes a potential IPv6 address matching error for the
+"nic" and "interface" configuration directives, suppresses the creation of
+extraneous ephemeral associations for certain broadcastclient and
+multicastclient configurations, cleans up some ntpq display issues, and
+includes improvements to orphan mode, minor bugs fixes and code clean-ups.
+
+New features / changes in this release:
+
+ntpd
+
+ * Updated "nic" and "interface" IPv6 address handling to prevent
+ mismatches with localhost [::1] and wildcard [::] which resulted from
+ using the address/prefix format (e.g. fe80::/64)
+ * Fix orphan mode stratum incorrectly counting to infinity
+ * Orphan parent selection metric updated to includes missing ntohl()
+ * Non-printable stratum 16 refid no longer sent to ntp
+ * Duplicate ephemeral associations suppressed for broadcastclient and
+ multicastclient without broadcastdelay
+ * Exclude undetermined sys_refid from use in loopback TEST12
+ * Exclude MODE_SERVER responses from KoD rate limiting
+ * Include root delay in clock_update() sys_rootdisp calculations
+ * get_systime() updated to exclude sys_residual offset (which only
+ affected bits "below" sys_tick, the precision threshold)
+ * sys.peer jitter weighting corrected in sys_jitter calculation
+
+ntpq
+
+ * -n option extended to include the billboard "server" column
+ * IPv6 addresses in the local column truncated to prevent overruns
+
+---
+NTP 4.2.6p4 (Harlan Stenn <stenn@ntp.org>, 2011/09/22)
+
+Focus: Bug fixes and portability improvements
+
+Severity: Medium
+
+This is a recommended upgrade.
+
+This release includes build infrastructure updates, code
+clean-ups, minor bug fixes, fixes for a number of minor
+ref-clock issues, and documentation revisions.
+
+Portability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t.
+
+New features / changes in this release:
+
+Build system
+
+* Fix checking for struct rtattr
+* Update config.guess and config.sub for AIX
+* Upgrade required version of autogen and libopts for building
+ from our source code repository
+
+ntpd
+
+* Back-ported several fixes for Coverity warnings from ntp-dev
+* Fix a rare boundary condition in UNLINK_EXPR_SLIST()
+* Allow "logconfig =allall" configuration directive
+* Bind tentative IPv6 addresses on Linux
+* Correct WWVB/Spectracom driver to timestamp CR instead of LF
+* Improved tally bit handling to prevent incorrect ntpq peer status reports
+* Exclude the Undisciplined Local Clock and ACTS drivers from the initial
+ candidate list unless they are designated a "prefer peer"
+* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
+ selection during the 'tos orphanwait' period
+* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
+ drivers
+* Improved support of the Parse Refclock trusttime flag in Meinberg mode
+* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
+* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline
+ clock slew on Microsoft Windows
+* Code cleanup in libntpq
+
+ntpdc
+
+* Fix timerstats reporting
+
+ntpdate
+
+* Reduce time required to set clock
+* Allow a timeout greater than 2 seconds
+
+sntp
+
+* Backward incompatible command-line option change:
+ -l/--filelog changed -l/--logfile (to be consistent with ntpd)
+
+Documentation
+
+* Update html2man. Fix some tags in the .html files
+* Distribute ntp-wait.html
+
+---
+NTP 4.2.6p3 (Harlan Stenn <stenn@ntp.org>, 2011/01/03)
+
+Focus: Bug fixes and portability improvements
+
+Severity: Medium
+
+This is a recommended upgrade.
+
+This release includes build infrastructure updates, code
+clean-ups, minor bug fixes, fixes for a number of minor
+ref-clock issues, and documentation revisions.
+
+Portability improvements in this release affect AIX, Atari FreeMiNT,
+FreeBSD4, Linux and Microsoft Windows.
+
+New features / changes in this release:
+
+Build system
+* Use lsb_release to get information about Linux distributions.
+* 'test' is in /usr/bin (instead of /bin) on some systems.
+* Basic sanity checks for the ChangeLog file.
+* Source certain build files with ./filename for systems without . in PATH.
+* IRIX portability fix.
+* Use a single copy of the "libopts" code.
+* autogen/libopts upgrade.
+* configure.ac m4 quoting cleanup.
+
+ntpd
+* Do not bind to IN6_IFF_ANYCAST addresses.
+* Log the reason for exiting under Windows.
+* Multicast fixes for Windows.
+* Interpolation fixes for Windows.
+* IPv4 and IPv6 Multicast fixes.
+* Manycast solicitation fixes and general repairs.
+* JJY refclock cleanup.
+* NMEA refclock improvements.
+* Oncore debug message cleanup.
+* Palisade refclock now builds under Linux.
+* Give RAWDCF more baud rates.
+* Support Truetime Satellite clocks under Windows.
+* Support Arbiter 1093C Satellite clocks under Windows.
+* Make sure that the "filegen" configuration command defaults to "enable".
+* Range-check the status codes (plus other cleanup) in the RIPE-NCC driver.
+* Prohibit 'includefile' directive in remote configuration command.
+* Fix 'nic' interface bindings.
+* Fix the way we link with openssl if openssl is installed in the base
+ system.
+
+ntp-keygen
+* Fix -V coredump.
+* OpenSSL version display cleanup.
+
+ntpdc
+* Many counters should be treated as unsigned.
+
+ntpdate
+* Do not ignore replies with equal receive and transmit timestamps.
+
+ntpq
+* libntpq warning cleanup.
+
+ntpsnmpd
+* Correct SNMP type for "precision" and "resolution".
+* Update the MIB from the draft version to RFC-5907.
+
+sntp
+* Display timezone offset when showing time for sntp in the local
+ timezone.
+* Pay proper attention to RATE KoD packets.
+* Fix a miscalculation of the offset.
+* Properly parse empty lines in the key file.
+* Logging cleanup.
+* Use tv_usec correctly in set_time().
+* Documentation cleanup.
+
+---
+NTP 4.2.6p2 (Harlan Stenn <stenn@ntp.org>, 2010/07/08)
+
+Focus: Bug fixes and portability improvements
+
+Severity: Medium
+
+This is a recommended upgrade.
+
+This release includes build infrastructure updates, code
+clean-ups, minor bug fixes, fixes for a number of minor
+ref-clock issues, improved KOD handling, OpenSSL related
+updates and documentation revisions.
+
+Portability improvements in this release affect Irix, Linux,
+Mac OS, Microsoft Windows, OpenBSD and QNX6
+
+New features / changes in this release:
+
+ntpd
+* Range syntax for the trustedkey configuration directive
+* Unified IPv4 and IPv6 restrict lists
+
+ntpdate
+* Rate limiting and KOD handling
+
+ntpsnmpd
+* default connection to net-snmpd via a unix-domain socket
+* command-line 'socket name' option
+
+ntpq / ntpdc
+* support for the "passwd ..." syntax
+* key-type specific password prompts
+
+sntp
+* MD5 authentication of an ntpd
+* Broadcast and crypto
+* OpenSSL support
+
+---
+NTP 4.2.6p1 (Harlan Stenn <stenn@ntp.org>, 2010/04/09)
+
+Focus: Bug fixes, portability fixes, and documentation improvements
+
+Severity: Medium
+
+This is a recommended upgrade.
+
+---
+NTP 4.2.6 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
+
+Focus: enhancements and bug fixes.
+
+---
+NTP 4.2.4p8 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
+
+Focus: Security Fixes
+
+Severity: HIGH
+
+This release fixes the following high-severity vulnerability:
+
+* [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
+
+ See http://support.ntp.org/security for more information.
+
+ NTP mode 7 (MODE_PRIVATE) is used by the ntpdc query and control utility.
+ In contrast, ntpq uses NTP mode 6 (MODE_CONTROL), while routine NTP time
+ transfers use modes 1 through 5. Upon receipt of an incorrect mode 7
+ request or a mode 7 error response from an address which is not listed
+ in a "restrict ... noquery" or "restrict ... ignore" statement, ntpd will
+ reply with a mode 7 error response (and log a message). In this case:
+
+ * If an attacker spoofs the source address of ntpd host A in a
+ mode 7 response packet sent to ntpd host B, both A and B will
+ continuously send each other error responses, for as long as
+ those packets get through.
+
+ * If an attacker spoofs an address of ntpd host A in a mode 7
+ response packet sent to ntpd host A, A will respond to itself
+ endlessly, consuming CPU and logging excessively.
+
+ Credit for finding this vulnerability goes to Robin Park and Dmitri
+ Vinokurov of Alcatel-Lucent.
+
+THIS IS A STRONGLY RECOMMENDED UPGRADE.
+
+---
+ntpd now syncs to refclocks right away.
+
+Backward-Incompatible changes:
+
+ntpd no longer accepts '-v name' or '-V name' to define internal variables.
+Use '--var name' or '--dvar name' instead. (Bug 817)
+
+---
+NTP 4.2.4p7 (Harlan Stenn <stenn@ntp.org>, 2009/05/04)
+
+Focus: Security and Bug Fixes
+
+Severity: HIGH
+
+This release fixes the following high-severity vulnerability:
+
+* [Sec 1151] Remote exploit if autokey is enabled. CVE-2009-1252
+
+ See http://support.ntp.org/security for more information.
+
+ If autokey is enabled (if ntp.conf contains a "crypto pw whatever"
+ line) then a carefully crafted packet sent to the machine will cause
+ a buffer overflow and possible execution of injected code, running
+ with the privileges of the ntpd process (often root).
+
+ Credit for finding this vulnerability goes to Chris Ries of CMU.
+
+This release fixes the following low-severity vulnerabilities:
+
+* [Sec 1144] limited (two byte) buffer overflow in ntpq. CVE-2009-0159
+ Credit for finding this vulnerability goes to Geoff Keating of Apple.
+
+* [Sec 1149] use SO_EXCLUSIVEADDRUSE on Windows
+ Credit for finding this issue goes to Dave Hart.
+
+This release fixes a number of bugs and adds some improvements:
+
+* Improved logging
+* Fix many compiler warnings
+* Many fixes and improvements for Windows
+* Adds support for AIX 6.1
+* Resolves some issues under MacOS X and Solaris
+
+THIS IS A STRONGLY RECOMMENDED UPGRADE.
+
+---
+NTP 4.2.4p6 (Harlan Stenn <stenn@ntp.org>, 2009/01/07)
+
+Focus: Security Fix
+
+Severity: Low
+
+This release fixes oCERT.org's CVE-2009-0021, a vulnerability affecting
+the OpenSSL library relating to the incorrect checking of the return
+value of EVP_VerifyFinal function.
+
+Credit for finding this issue goes to the Google Security Team for
+finding the original issue with OpenSSL, and to ocert.org for finding
+the problem in NTP and telling us about it.
+
+This is a recommended upgrade.
+---
+NTP 4.2.4p5 (Harlan Stenn <stenn@ntp.org>, 2008/08/17)
+
+Focus: Minor Bugfixes
+
+This release fixes a number of Windows-specific ntpd bugs and
+platform-independent ntpdate bugs. A logging bugfix has been applied
+to the ONCORE driver.
+
+The "dynamic" keyword and is now obsolete and deferred binding to local
+interfaces is the new default. The minimum time restriction for the
+interface update interval has been dropped.
+
+A number of minor build system and documentation fixes are included.
+
+This is a recommended upgrade for Windows.
+
+---
+NTP 4.2.4p4 (Harlan Stenn <stenn@ntp.org>, 2007/09/10)
+
+Focus: Minor Bugfixes
+
+This release updates certain copyright information, fixes several display
+bugs in ntpdc, avoids SIGIO interrupting malloc(), cleans up file descriptor
+shutdown in the parse refclock driver, removes some lint from the code,
+stops accessing certain buffers immediately after they were freed, fixes
+a problem with non-command-line specification of -6, and allows the loopback
+interface to share addresses with other interfaces.
+
+---
+NTP 4.2.4p3 (Harlan Stenn <stenn@ntp.org>, 2007/06/29)
+
+Focus: Minor Bugfixes
+
+This release fixes a bug in Windows that made it difficult to
+terminate ntpd under windows.
+This is a recommended upgrade for Windows.
+
+---
+NTP 4.2.4p2 (Harlan Stenn <stenn@ntp.org>, 2007/06/19)
+
+Focus: Minor Bugfixes
+
+This release fixes a multicast mode authentication problem,
+an error in NTP packet handling on Windows that could lead to
+ntpd crashing, and several other minor bugs. Handling of
+multicast interfaces and logging configuration were improved.
+The required versions of autogen and libopts were incremented.
+This is a recommended upgrade for Windows and multicast users.
+
+---
+NTP 4.2.4 (Harlan Stenn <stenn@ntp.org>, 2006/12/31)
+
+Focus: enhancements and bug fixes.
+
+Dynamic interface rescanning was added to simplify the use of ntpd in
+conjunction with DHCP. GNU AutoGen is used for its command-line options
+processing. Separate PPS devices are supported for PARSE refclocks, MD5
+signatures are now provided for the release files. Drivers have been
+added for some new ref-clocks and have been removed for some older
+ref-clocks. This release also includes other improvements, documentation
+and bug fixes.
+
+K&R C is no longer supported as of NTP-4.2.4. We are now aiming for ANSI
+C support.
+
+---
+NTP 4.2.0 (Harlan Stenn <stenn@ntp.org>, 2003/10/15)
+
+Focus: enhancements and bug fixes.
+---
NTP 4.2.8p17 (Harlan Stenn <stenn@ntp.org>, 2023 Jun 06)
Focus: Bug fixes
diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in
index 7e7469c4f1b6..b97ef133137b 100644
--- a/contrib/ntp/adjtimed/Makefile.in
+++ b/contrib/ntp/adjtimed/Makefile.in
@@ -96,6 +96,7 @@ bin_PROGRAMS =
libexec_PROGRAMS =
sbin_PROGRAMS =
EXTRA_PROGRAMS = adjtimed$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -389,6 +390,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -487,8 +489,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-BUILT_SOURCES = check-libntp .deps-ver
-CLEANFILES = check-libntp .deps-ver
+BUILT_SOURCES = $(am__append_1) .deps-ver
+CLEANFILES = .deps-ver
DISTCLEANFILES = $(DEPDIR)/deps-ver
AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
@@ -967,11 +969,10 @@ install-exec-hook:
#
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/check-libntp.mf b/contrib/ntp/check-libntp.mf
index 07c855b4be78..86fcca45b0e3 100644
--- a/contrib/ntp/check-libntp.mf
+++ b/contrib/ntp/check-libntp.mf
@@ -3,12 +3,12 @@
## sntp/check-libntp.mf
## The above file has a version of this for the sntp tree.
-BUILT_SOURCES += check-libntp
-CLEANFILES += check-libntp
+.PHONY: check-libntp
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+if LIBNTP_SUBMAKES
+BUILT_SOURCES += check-libntp
-$(top_builddir)/libntp/libntp.a:
+check-libntp:
cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+endif
diff --git a/contrib/ntp/check-libntpd.mf b/contrib/ntp/check-libntpd.mf
index 46304dd5f236..45133ad52c1c 100644
--- a/contrib/ntp/check-libntpd.mf
+++ b/contrib/ntp/check-libntpd.mf
@@ -4,16 +4,7 @@
BUILT_SOURCES += check-libntpd
-# CLEANFILES addition below won't be needed after a while.
-# Leave it in for now for folks tracking the source repo
-# who have the file from a former version of the rule.
-# DLH Jan 2023
-
-CLEANFILES += check-libntpd
-
-check-libntpd: $(top_builddir)/ntpd/libntpd.a
- @: avoid default SCCS get by some make implementations
-
-$(top_builddir)/ntpd/libntpd.a:
+.PHONY: check-libntpd
+check-libntpd:
cd $(top_builddir)/ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a
diff --git a/contrib/ntp/check-libunity.mf b/contrib/ntp/check-libunity.mf
index 4e052058c0c3..830c72c1a421 100644
--- a/contrib/ntp/check-libunity.mf
+++ b/contrib/ntp/check-libunity.mf
@@ -4,10 +4,10 @@
## The above file has a version of this for the sntp tree.
BUILT_SOURCES += check-libunity
+CLEANFILES += check-libunity
check-libunity: $(top_builddir)/sntp/unity/libunity.a
- @: avoid default SCCS get by some make implementations
+ @echo stamp > $@
$(top_builddir)/sntp/unity/libunity.a:
cd $(top_builddir)/sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
-
diff --git a/contrib/ntp/check-scm-rev.mf b/contrib/ntp/check-scm-rev.mf
index e2abbf0e452c..7c0d1be2892f 100644
--- a/contrib/ntp/check-scm-rev.mf
+++ b/contrib/ntp/check-scm-rev.mf
@@ -1,8 +1,6 @@
$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
$(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+.PHONY: FRC.scm-rev
FRC.scm-rev:
- @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
- always out-of-date causing targets which depend on it to also \
- be outdated so their rules to fire each time they are built.
-
+ @: FRC.scm-rev is always out of date, triggering the check every make invocation.
diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in
index f33483eb59c8..b24cb48d113b 100644
--- a/contrib/ntp/clockstuff/Makefile.in
+++ b/contrib/ntp/clockstuff/Makefile.in
@@ -89,6 +89,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = clockstuff
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -384,6 +385,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -488,8 +490,8 @@ AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
propdelay_LDADD = $(LDADD)
-BUILT_SOURCES = check-libntp .deps-ver
-CLEANFILES = check-libntp .deps-ver
+BUILT_SOURCES = $(am__append_1) .deps-ver
+CLEANFILES = .deps-ver
DISTCLEANFILES = $(DEPDIR)/deps-ver
NTP_INCS = -I$(top_srcdir)/include \
-I$(top_srcdir)/libntp/lib/isc/include \
@@ -809,11 +811,10 @@ uninstall-am:
.PRECIOUS: Makefile
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/config.h.in b/contrib/ntp/config.h.in
index c00eba442298..bfaabf02e183 100644
--- a/contrib/ntp/config.h.in
+++ b/contrib/ntp/config.h.in
@@ -496,9 +496,6 @@
/* Define to 1 if the system has the type `int32'. */
#undef HAVE_INT32
-/* int32 type in DNS headers, not others. */
-#undef HAVE_INT32_ONLY_WITH_DNS
-
/* Define to 1 if the system has the type `int32_t'. */
#undef HAVE_INT32_T
@@ -691,9 +688,6 @@
/* Define to 1 if you have the <openssl/cmac.h> header file. */
#undef HAVE_OPENSSL_CMAC_H
-/* Define to 1 if you have the <openssl/hmac.h> header file. */
-#undef HAVE_OPENSSL_HMAC_H
-
/* Define to 1 if the system has the type `pid_t'. */
#undef HAVE_PID_T
@@ -970,7 +964,7 @@
/* Define to 1 if you have the <sysexits.h> header file. */
#undef HAVE_SYSEXITS_H
-/* */
+/* syslog.h provides facilitynames */
#undef HAVE_SYSLOG_FACILITYNAMES
/* Define to 1 if you have the <sys/audioio.h> header file. */
@@ -1035,6 +1029,9 @@
/* Define to 1 if you have the <sys/prctl.h> header file. */
#undef HAVE_SYS_PRCTL_H
+/* Define to 1 if you have the <sys/procctl.h> header file. */
+#undef HAVE_SYS_PROCCTL_H
+
/* Define to 1 if you have the <sys/procset.h> header file. */
#undef HAVE_SYS_PROCSET_H
@@ -1221,9 +1218,6 @@
/* Define to 1 if the system has the type `u_int32'. */
#undef HAVE_U_INT32
-/* u_int32 type in DNS headers, not others. */
-#undef HAVE_U_INT32_ONLY_WITH_DNS
-
/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
@@ -1477,6 +1471,9 @@
/* Use OpenSSL? */
#undef OPENSSL
+/* Suppress OpenSSL 3 deprecation warnings */
+#undef OPENSSL_SUPPRESS_DEPRECATED
+
/* Should we open the broadcast socket? */
#undef OPEN_BCAST_SOCKET
@@ -1619,10 +1616,6 @@
/* Is K_TICK_NAME in nanoseconds? */
#undef TICK_NANO
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
- macro is obsolete. */
-#undef TIME_WITH_SYS_TIME
-
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
@@ -1820,15 +1813,8 @@ typedef unsigned int uintptr_t;
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
-
- #if !defined(_KERNEL) && !defined(PARSESTREAM)
- /*
- * stdio.h must be included after _GNU_SOURCE is defined
- * but before #define snprintf rpl_snprintf
- */
- # include <stdio.h>
- #endif
-
+ #include "c99_snprintf.h"
+
/* Define to rpl_snprintf if the replacement function should be used. */
#undef snprintf
@@ -1887,3 +1873,15 @@ typedef union mpinfou {
# endif
#endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */
+
+
+ /*
+ * Macro to use in otherwise-empty source files to comply with ANSI C
+ * requirement that each translation unit (source file) contain some
+ * declaration. This has commonly been done by declaring an unused
+ * global variable of type int or char. An extern reference to abs()
+ * serves the same purpose without bloat. We once used exit() but
+ * that can produce warnings on systems that declare exit() noreturn.
+ */
+ #define NONEMPTY_TRANSLATION_UNIT extern int abs(int);
+
diff --git a/contrib/ntp/configure b/contrib/ntp/configure
index 5d09904bea03..5172c2d5521f 100755
--- a/contrib/ntp/configure
+++ b/contrib/ntp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for ntp 4.2.8p17.
+# Generated by GNU Autoconf 2.71 for ntp 4.2.8p18.
#
# Report bugs to <https://bugs.ntp.org/>.
#
@@ -183,7 +183,6 @@ test -x / || exit 1"
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1
test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
@@ -191,7 +190,8 @@ test \$(( 1 + 1 )) = 2 || exit 1
ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
- || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null
then :
as_have_required=yes
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.8p17'
-PACKAGE_STRING='ntp 4.2.8p17'
+PACKAGE_VERSION='4.2.8p18'
+PACKAGE_STRING='ntp 4.2.8p18'
PACKAGE_BUGREPORT='https://bugs.ntp.org/'
PACKAGE_URL='https://www.ntp.org/'
@@ -698,7 +698,6 @@ MAKE_PARSEKMODULE
DCFD
TESTDCF
MAKE_CHECK_LAYOUT
-VER_SUFFIX
MAKE_CHECK_Y2K
MAKE_LIBPARSE_KERNEL
MAKE_LIBPARSE
@@ -710,6 +709,10 @@ PATH_NET_SNMP_CONFIG
CONFIG_SHELL
PATH_TEST
PATH_PERL
+PATH_OPENSSL
+VER_SUFFIX
+LIBNTP_SUBMAKES_FALSE
+LIBNTP_SUBMAKES_TRUE
LIBOBJS
PTHREADS_FALSE
PTHREADS_TRUE
@@ -759,6 +762,8 @@ ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
+EGREP
+GREP
SED
LIBTOOL
ac_ct_AR
@@ -857,14 +862,12 @@ NTP_HARD_CPPFLAGS
NTP_HARD_CFLAGS
YFLAGS
YACC
+CPP
LDFLAGS_NTP
LDADD_NTP
CPPFLAGS_NTP
CFLAGS_NTP
CC_NOFORMAT
-EGREP
-GREP
-CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -968,6 +971,7 @@ plot_summary_opts'
ac_user_opts='
enable_option_checking
enable_silent_rules
+enable_build_framework_help
enable_dependency_tracking
with_hardenfile
with_locfile
@@ -995,7 +999,11 @@ enable_linuxcaps
enable_solarisprivs
enable_trustedbsd_mac
enable_signalled_io
-with_arlib
+with_crypto
+with_openssl_libdir
+with_openssl_incdir
+enable_verbose_ssl
+enable_openssl_random
with_net_snmp_config
enable_libseccomp
with_stack_limit
@@ -1057,11 +1065,6 @@ enable_TRIMTSIP
enable_WHARTON
enable_VARITEXT
enable_SEL240X
-with_crypto
-with_openssl_libdir
-with_openssl_incdir
-with_rpath
-enable_openssl_random
enable_autokey
enable_kmem
enable_accurate_adjtime
@@ -1651,7 +1654,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ntp 4.2.8p17 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1722,7 +1725,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp 4.2.8p17:";;
+ short | recursive ) echo "Configuration of ntp 4.2.8p18:";;
esac
cat <<\_ACEOF
@@ -1734,6 +1737,8 @@ Optional Features and Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-build-framework-help
+ + enable build framework help
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1765,14 +1770,20 @@ Optional Features and Packages:
--enable-thread-support s use threads (+ if available)
--with-threads with threads [auto]
--with-yielding-select with yielding select [auto]
- --enable-c99-snprintf s force replacement
+ --enable-c99-snprintf s use replacement printf family
--enable-clockctl s Use /dev/clockctl for non-root clock control
--enable-linuxcaps + Use Linux capabilities for non-root clock control
--enable-solarisprivs + Use Solaris privileges for non-root clock control
--enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
control
--enable-signalled-io s Use signalled IO if we can
- --with-arlib - deprecated, arlib not distributed
+ --with-crypto + =openssl,libcrypto
+ --with-openssl-libdir + =/something/reasonable
+
+ --with-openssl-incdir + =search likely dirs
+
+ --enable-verbose-ssl - show crypto lib detection details
+ --enable-openssl-random + Use SSL lib's secure random numbers
--with-net-snmp-config + =net-snmp-config
--enable-libseccomp EXPERIMENTAL: enable support for libseccomp
sandboxing (default is no)
@@ -1837,16 +1848,6 @@ Optional Features and Packages:
--enable-WHARTON s WHARTON 400A Series clock
--enable-VARITEXT s VARITEXT clock
--enable-SEL240X s SEL240X clock
- --with-crypto + =openssl,libcrypto
-
- --with-openssl-libdir + =/something/reasonable
-
- --with-openssl-incdir + =/something/reasonable
-
- --without-rpath s Disable auto-added -R linker paths
-
- --enable-openssl-random Use OpenSSL's crypto random number functions, if
- available (default is yes)
--enable-autokey + support NTP Autokey protocol
--enable-kmem s read /dev/kmem for tick and/or tickadj
--enable-accurate-adjtime
@@ -1967,7 +1968,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp configure 4.2.8p17
+ntp configure 4.2.8p18
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2053,44 +2054,6 @@ printf "%s\n" "$ac_res" >&6; }
} # ac_fn_c_check_header_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }
-then :
- ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2181,6 +2144,44 @@ fi
} # ac_fn_c_try_run
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2624,7 +2625,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ntp $as_me 4.2.8p17, which was
+It was created by ntp $as_me 4.2.8p18, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3218,7 +3219,6 @@ as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
as_fn_append ac_func_c_list " fork HAVE_FORK"
as_fn_append ac_func_c_list " vfork HAVE_VFORK"
-as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
# Auxiliary files required by this configure script.
@@ -3420,7 +3420,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20230326
+ntp_configure_cache_version=20240218
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -4039,7 +4039,7 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
- VERSION='4.2.8p17'
+ VERSION='4.2.8p18'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -4266,6 +4266,25 @@ printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h
ac_config_headers="$ac_config_headers config.h"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable build framework help" >&5
+printf %s "checking if we should enable build framework help... " >&6; }
+# Check whether --enable-build-framework-help was given.
+if test ${enable_build_framework_help+y}
+then :
+ enableval=$enable_build_framework_help; ntp_ok=$enableval
+else $as_nop
+ ntp_ok=yes
+
+fi
+
+case "$ntp_ok" in
+ yes)
+ ntp_cv_build_framework_help=yes ;;
+ *) ntp_cv_build_framework_help=no ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
+
ntp_atom_ok=${ntp_atom_ok=no}
ntp_oncore_ok=${ntp_oncore_ok=no}
ntp_parse_ok=${ntp_parse_ok=no}
@@ -5221,6 +5240,7 @@ fi
+
ac_header= ac_cache=
for ac_item in $ac_header_c_list
do
@@ -5392,333 +5412,7 @@ then :
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-printf %s "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test ${ac_cv_prog_CPP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- # Double quotes because $CC needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-else $as_nop
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
- # Broken: success on invalid input.
-continue
-else $as_nop
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok
-then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-printf "%s\n" "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-else $as_nop
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
- # Broken: success on invalid input.
-continue
-else $as_nop
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok
-then :
-
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-printf %s "checking for grep that handles long lines and -e... " >&6; }
-if test ${ac_cv_path_GREP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_prog in grep ggrep
- do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- printf %s 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- printf "%s\n" 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-printf "%s\n" "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-printf %s "checking for egrep... " >&6; }
-if test ${ac_cv_path_EGREP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_prog in egrep
- do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- printf %s 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- printf "%s\n" 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-printf "%s\n" "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-
-
-
-
-
-# Ralf Wildenhues: With per-target flags we need CC_C_O
-# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
-
-if test $ac_cv_c_compiler_gnu = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-printf %s "checking whether $CC needs -traditional... " >&6; }
-if test ${ac_cv_prog_gcc_traditional+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- ac_pattern="Autoconf.*'x'"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sgtty.h>
-Autoconf TIOCGETP
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1
-then :
- ac_cv_prog_gcc_traditional=yes
-else $as_nop
- ac_cv_prog_gcc_traditional=no
-fi
-rm -rf conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <termio.h>
-Autoconf TCGETA
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1
-then :
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -rf conftest*
-
- fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
@@ -5886,13 +5580,15 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
#
+ # $ntp_cv_gcc_Winit_self is tested later to add the
+ # flag to CFLAGS_NTP.
+ #
# libopts specifically builds a string with embedded NULs.
# This causes a bunch of distracting warnings due to -Wformat.
- # Let's see if we can figure out how to disable these.
#
- CFLAGS="$SAVED_CFLAGS -Wno-format"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5
-printf %s "checking if $CC can handle -Wno-format... " >&6; }
+ CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format -Wno-format-security" >&5
+printf %s "checking if $CC can handle -Wno-format -Wno-format-security... " >&6; }
if test ${ntp_cv_gcc_Wno_format+y}
then :
printf %s "(cached) " >&6
@@ -5922,21 +5618,50 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
-
case "$ntp_cv_gcc_Wno_format" in
+ no) ntp_cv_gcc_Wno_format_truncation=no
+ ;;
yes)
- CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
- ;;
- no)
- ;;
+ CC_NOFORMAT="-Wno-format -Wno-format-security"
+ CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wformat -Wno-format-truncation" >&5
+printf %s "checking if $CC can handle -Wformat -Wno-format-truncation... " >&6; }
+if test ${ntp_cv_gcc_Wno_format_truncation+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_Wno_format_truncation=yes
+else $as_nop
+ ntp_cv_gcc_Wno_format_truncation=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format_truncation" >&5
+printf "%s\n" "$ntp_cv_gcc_Wno_format_truncation" >&6; }
+ #
+ # $ntp_cv_gcc_Wno_format_truncation is tested later to add the
+ # flag to CFLAGS.
+ #
esac
CFLAGS="$SAVED_CFLAGS"
{ SAVED_CFLAGS=; unset SAVED_CFLAGS;}
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS_NTP.
- #
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
printf %s "checking if linker supports omitting unused code and data... " >&6; }
if test ${ntp_cv_gc_sections_runs+y}
@@ -5944,7 +5669,17 @@ then :
printf %s "(cached) " >&6
else $as_nop
- origCFLAGS="$CFLAGS"
+ # NetBSD will link but likely not run with --gc-sections
+ # http://bugs.ntp.org/1844
+ # http://gnats.netbsd.org/40401
+ # --gc-sections causes attempt to load as linux elf, with
+ # wrong syscalls in place. Test a little gauntlet of
+ # simple stdio read code checking for errors, expecting
+ # enough syscall differences that the NetBSD code will
+ # fail even with Linux emulation working as designed.
+ # A shorter test could be refined by someone with access
+ # to a NetBSD host with Linux emulation working.
+ origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6034,6 +5769,10 @@ printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
yes)
CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
esac
+ case "$ntp_cv_gcc_Wno_format_truncation" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation"
+ esac
# -W[no-]strict-prototypes might be added by NTP_OPENSSL
esac
@@ -7080,38 +6819,6 @@ esac
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
-# Check whether --enable-shared was given.
-if test ${enable_shared+y}
-then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for pkg in $enableval; do
- IFS=$lt_save_ifs
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else $as_nop
- enable_shared=no
-fi
-
-
-
-
-
-
-
-
-
case `pwd` in
*\ * | *\ *)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -7295,6 +7002,148 @@ Xsed="$SED -e 1s/^X//"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
printf %s "checking for fgrep... " >&6; }
if test ${ac_cv_path_FGREP+y}
@@ -10575,6 +10424,36 @@ fi
# Set options
+# Check whether --enable-shared was given.
+if test ${enable_shared+y}
+then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_shared=no
+fi
+
+
+
+
+
+
+
@@ -14874,7 +14753,7 @@ CC=$lt_save_CC
# Therefore, by default:
# - use the version of libopts we ship with
# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
+# - build a static copy (disable-shared - done earlier)
case "${enable_local_libopts+set}" in
set) ;;
*) enable_local_libopts=yes ;;
@@ -16526,8 +16405,6 @@ case "$ntp_use_local_libevent" in
*) # If we have (a good enough) pkg-config, see if it can find libevent
case "$PKG_CONFIG" in
/*)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
-printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
then
ntp_use_local_libevent=no
@@ -16536,6 +16413,8 @@ printf %s "checking if libevent $ntp_libevent_min_version or later is installed.
*.*) ;;
*) ntp_libevent_version='(unknown)' ;;
esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
@@ -16570,6 +16449,8 @@ printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
@@ -17483,11 +17364,23 @@ fi
+VER_SUFFIX=
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
+printf "%s\n" "$as_me: " >&6;}
+ esac
+
+
+
+
+
+
# HMS: Save $LIBS and empty it.
# any LIBS we add here should go in to LDADD_LIBNTP
-__LIBS=$LIBS
+SAVED_LIBS=$LIBS
LIBS=
@@ -19228,14 +19121,6 @@ printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
esac
-# Obsolete code to be removed.
-if test $ac_cv_header_sys_time_h = yes; then
-
-printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-# End of obsolete code.
-
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -25091,100 +24976,6 @@ fi
-case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
- no::yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
-printf %s "checking for int32 with DNS headers included... " >&6; }
-if test ${ntp_cv_type_int32_with_dns+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
-
-int
-main (void)
-{
-
- size_t cb = sizeof(int32);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- ntp_cv_type_int32_with_dns=yes
-else $as_nop
- ntp_cv_type_int32_with_dns=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
-printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; }
- case "$ntp_cv_type_int32_with_dns" in
- yes)
-
-printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-
- esac
-esac
-
-case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
- no::yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
-printf %s "checking for u_int32 with DNS headers included... " >&6; }
-if test ${ntp_cv_type_u_int32_with_dns+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
-
-int
-main (void)
-{
-
- size_t cb = sizeof(u_int32);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- ntp_cv_type_u_int32_with_dns=yes
-else $as_nop
- ntp_cv_type_u_int32_with_dns=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
-printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; }
- case "$ntp_cv_type_u_int32_with_dns" in
- yes)
-
-printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-
- esac
-esac
-
ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
@@ -25766,34 +25557,1192 @@ printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
;;
esac
+ if test x"$enable_dependency_tracking" = x"yes"; then
+ LIBNTP_SUBMAKES_TRUE=
+ LIBNTP_SUBMAKES_FALSE='#'
+else
+ LIBNTP_SUBMAKES_TRUE='#'
+ LIBNTP_SUBMAKES_FALSE=
+fi
+
-LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
-LIBS=$__LIBS
-{ __LIBS=; unset __LIBS;}
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
-printf %s "checking for deprecated --with-arlib... " >&6; }
+# Check whether --with-crypto was given.
+if test ${with_crypto+y}
+then :
+ withval=$with_crypto; case "$with_crypto" in
+ yes)
+ with_crypto=openssl,libcrypto
+ esac
+
+else $as_nop
+ with_crypto=openssl,libcrypto
+fi
+
+
+# Check whether --with-openssl-libdir was given.
+if test ${with_openssl_libdir+y}
+then :
+ withval=$with_openssl_libdir;
+fi
+
-# Check whether --with-arlib was given.
-if test ${with_arlib+y}
+# Check whether --with-openssl-incdir was given.
+if test ${with_openssl_incdir+y}
then :
- withval=$with_arlib; ans=$withval
+ withval=$with_openssl_incdir;
+fi
+
+# Check whether --enable-verbose-ssl was given.
+if test ${enable_verbose_ssl+y}
+then :
+ enableval=$enable_verbose_ssl;
else $as_nop
- ans=no
+ enable_verbose_ssl=no
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-printf "%s\n" "$ans" >&6; }
-case "$ans" in
+ntp_openssl=no
+ntp_openssl_from_pkg_config=no
+ntp_ssl_incdir=
+ntp_ssl_cflags=
+ntp_ssl_cppflags=
+ntp_ssl_libdir=
+ntp_ssl_libs_L=
+ntp_ssl_libs_l=
+ntp_ssl_libs=
+ntp_ssl_ldflags=
+
+NTPSSL_SAVED_CFLAGS="$CFLAGS"
+NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS"
+NTPSSL_SAVED_LIBS="$LIBS"
+NTPSSL_SAVED_LDFLAGS="$LDFLAGS"
+
+# Extract the first word of "openssl", so it can be a program name with args.
+set dummy openssl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_OPENSSL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PATH_OPENSSL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PATH_OPENSSL="$PATH_OPENSSL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_OPENSSL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PATH_OPENSSL=$ac_cv_path_PATH_OPENSSL
+if test -n "$PATH_OPENSSL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_OPENSSL" >&5
+printf "%s\n" "$PATH_OPENSSL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $str" >&5
+printf "%s\n" "$as_me: $str" >&6;}
+ esac
+
+
+{ str=; unset str;}
+
+# Make sure neither/both --with_openssl-{inc,lib}dir are given
+case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ notgiven:notgiven) ;;
+ *notgiven*)
+ as_fn_error $? "only one of --with-openssl-{inc,lib}dir=... given - provide both or neither" "$LINENO" 5
+ ;;
+esac
+
+# HMS: Today there are only 2 case options. We probably want a third
+# *:*:notgiven:notgiven
+# and in that case we would validate the path in PKG_CONFIG_PATH.
+# Unless we can do it with 2 cases, where the 2nd case is *:*:...
+# and we do a reality check on execpath and the headers/libraries.
+#
+##
+# if $with_crypto is not "no":
+# if --with-openssl-{inc,lib}dir are not given:
+# we should use pkg-config to find openssl
+# if we don't have pkg-config, if openssl is in the base OS, use that.
+##
+case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ no:*) ;;
+ *:notempty:notgiven:notgiven)
+ # If PKG_CONFIG is notempty and we haven't been given openssl paths,
+ # then let's make sure that the openssl executable's path corresponds
+ # to the path in openssl.pc, and 'openssl version' matches the Version
+ # in openssl.pc. If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH,
+ # then should we reality check them?
+ ## INCPATH
+ # harlan@ntp-testbuild.tal1> openssl version
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/*
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ## LIBPATH
+ # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.*
+ # /ntpbuild/lib/libcrypto.a /ntpbuild/lib/libcrypto.so.1.1*
+ # /ntpbuild/lib/libcrypto.so@
+ # harlan@ntp-testbuild.tal1>
+ ##
+ # Having said this, do we really care if the openssl executable that
+ # we have found is matched with the INCPATH and LIBPATH?
+ # One answer: Probably not, but we should complain on a mismatch as
+ # otherwise runtime differences could easily cause problems/drama.
+
+ ##BO
+ # ntp_cv_build_framework_help=yes
+ save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ case "$pkg" in
+ openssl)
+ if $PKG_CONFIG --exists $pkg ; then
+ # Found it - yay
+ # Do we want to check we found the right one?
+ # --modver
+ # --variable={libdir,includedir} (varname)
+ overf=`openssl version`
+ overs=`echo $overf | awk '{print }'`
+ case "$overs" in
+ 0.*) ;; # Should we squawk?
+ 1.0.*) ;; # Should we squawk?
+ 1.1.*) ;; # Should we squawk?
+ 3.*)
+ oinc=`openssl --variable=includedir`
+ olib=`openssl --variable=libdir`
+ # How should we use these?
+ ;;
+ *) ;; # Should we squawk?
+ esac
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # grep 1.1.1t /ntpbuild/lib/libcrypto.a
+ # strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1>
+ # which should match $overf
+ ##
+ # harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t 7 Feb 2023"' | cut -f 2 -d\"
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h
+ # # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ##
+
+ else
+ # This is a hack, but it's reasonable.
+ pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig"
+ test -d "$pkgpath" || pkgpath=
+ # echo "pkgpath is <$pkgpath>"
+ # echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>"
+ case "$pkgpath" in
+ '') ;; # Nothing to see here...
+ *) case ":$PKG_CONFIG_PATH:" in
+ ::)
+ PKG_CONFIG_PATH=$pkgpath
+ export PKG_CONFIG_PATH
+ ;;
+ *:$pkgpath:*)
+ # Already there...
+ ;;
+ *)
+ PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH"
+ export PKG_CONFIG_PATH
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ done
+ ##EO
+
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+printf %s "checking pkg-config for $pkg... " >&6; }
+ if $PKG_CONFIG --exists $pkg ; then
+ ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`"
+ case "$ntp_ssl_cppflags" in
+ '')
+ ntp_ssl_incdir='not needed'
+ ;;
+ *)
+ ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`"
+ esac
+ ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`"
+ ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`"
+ case "$ntp_ssl_libs_L" in
+ '')
+ ntp_ssl_libdir='not needed'
+ ;;
+ *)
+ ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`"
+ esac
+ ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`"
+ ntp_openssl=yes
+ ntp_openssl_from_pkg_config=yes
+ ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
+ case "$ntp_openssl_version" in
+ *.*) ;;
+ *) ntp_openssl_version='(unknown)' ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
+printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
+
+ break
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ done
+ { pkg=; unset pkg;}
+esac
+case "$with_crypto" in
+ no) ;;
+ *)
+ case "$with_openssl_libdir" in
+ '') ;;
+ *)
+ ntp_ssl_libdir="$with_openssl_libdir"
+ ntp_ssl_libs_L="-L$with_openssl_libdir"
+ ntp_ssl_libs_l="-lcrypto"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ esac
+ case "$with_openssl_incdir" in
+ '') ;;
+ *)
+ ntp_ssl_incdir="$with_openssl_incdir"
+ ntp_ssl_cppflags="-I$with_openssl_incdir"
+ esac
+esac
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase I checks:" >&5
+printf "%s\n" "$as_me: OpenSSL Phase I checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5
+printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&5
+printf "%s\n" "$as_me: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;}
+ esac
+
+
+
+case "$with_crypto" in
+ no)
+ ntp_openssl=no
+ ;;
+ *)
+ ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ case "$ntp_ssl_libdir" in
+ '')
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto without -L" >&5
+printf "%s\n" "$as_me: Searching for libcrypto without -L" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
+printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char EVP_MD_CTX_new ();
+int
+main (void)
+{
+return EVP_MD_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_crypto_EVP_MD_CTX_new=yes
+else $as_nop
+ ac_cv_lib_crypto_EVP_MD_CTX_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
+printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
+then :
+ ntp_ssl_libdir='not needed'
+
+fi
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ esac
+ case "$ntp_ssl_libdir" in
+ '')
+ ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64"
+ ;;
+ *)
+ ntp_ssl_libdir_search="$ntp_ssl_libdir"
+ esac
+ case $ntp_ssl_libdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_libdir_search not_found
+ do
+ case "$i" in
+ not_found) ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto in $i" >&5
+printf "%s\n" "$as_me: Searching for libcrypto in $i" >&6;}
+ LIBS="-L$i $NTPSSL_SAVED_LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
+printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char EVP_MD_CTX_new ();
+int
+main (void)
+{
+return EVP_MD_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_crypto_EVP_MD_CTX_new=yes
+else $as_nop
+ ac_cv_lib_crypto_EVP_MD_CTX_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
+printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
+then :
+ break
+
+fi
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ esac
+ done
+ ntp_ssl_libdir="$i"
+ ntp_ssl_libs_L="-L$i"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ LIBS="$NTPSSL_SAVED_LIBS"
+ case "$ntp_ssl_libdir" in
+ not_found)
+ as_fn_error $? "You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+--with-openssl-libdir=/some/path option to configure.
+libcrypto not found in any of the following directories:
+$ntp_ssl_libdir_search
+ " "$LINENO" 5
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libcrypto found in $ntp_ssl_libdir" >&5
+printf "%s\n" "$as_me: libcrypto found in $ntp_ssl_libdir" >&6;}
+ esac
+
+ case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in
+ 'yes:not needed' | no:)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h without -I" >&5
+printf "%s\n" "$as_me: Searching for openssl/evp.h without -I" >&6;}
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes
+then :
+ ntp_ssl_incdir='not needed'
+
+fi
+
+ esac
+ case "$ntp_ssl_incdir" in
+ 'not needed')
+ ntp_ssl_incdir_search="$ntp_ssl_incdir"
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl include directory" >&5
+printf "%s\n" "$as_me: Searching for openssl include directory" >&6;}
+ case "$with_openssl_incdir" in
+ '')
+ case "$ntp_ssl_incdir" in
+ '')
+ ntp_ssl_incdir_search="/usr/include /usr/sfw/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include"
+ ;;
+ *)
+ esac
+ ;;
+ *)
+ ntp_ssl_incdir_search="$with_openssl_incdir"
+ esac
+ case $ntp_ssl_incdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_incdir_search
+ do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h in $i" >&5
+printf "%s\n" "$as_me: Searching for openssl/evp.h in $i" >&6;}
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i"
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes
+then :
+ ntp_ssl_incdir="$i" ; break
+
+fi
+
+ done
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ { i=; unset i;}
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+ case "$ntp_ssl_incdir" in
+ '')
+ as_fn_error $? "You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+-with-openssl-incdir=/some/path option to configure.
+No usable openssl/evp.h found in any of the following direcotries:
+$ntp_ssl_incdir_search
+ " "$LINENO" 5
+ esac
+ ntp_ssl_cppflags="-I$ntp_ssl_incdir"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Found evp.h in $ntp_ssl_incdir/openssl" >&5
+printf "%s\n" "$as_me: Found evp.h in $ntp_ssl_incdir/openssl" >&6;}
+ esac
+ esac
+ ntp_openssl=yes
+esac
+case "$ntp_openssl:$ntp_ssl_libdir" in
+ 'yes:not needed')
+ ;;
+ yes:*)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto works without runpath" >&5
+printf %s "checking if crypto works without runpath... " >&6; }
+if test ${ntp_cv_ssl_without_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ ntp_cv_ssl_without_runpath=yes
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_without_runpath=yes
+else $as_nop
+ ntp_cv_ssl_without_runpath=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_without_runpath" >&5
+printf "%s\n" "$ntp_cv_ssl_without_runpath" >&6; }
+ case "$ntp_cv_ssl_without_runpath" in
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir" >&5
+printf %s "checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir... " >&6; }
+if test ${ntp_cv_ssl_needs_dashWl_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS"
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_needs_dashWl_rpath=yes
+else $as_nop
+ ntp_cv_ssl_needs_dashWl_rpath=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashWl_rpath" >&5
+printf "%s\n" "$ntp_cv_ssl_needs_dashWl_rpath" >&6; }
+ case "$ntp_cv_ssl_needs_dashWl_rpath" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir"
+ ;;
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -R$ntp_ssl_libdir" >&5
+printf %s "checking if crypto needs -R$ntp_ssl_libdir... " >&6; }
+if test ${ntp_cv_ssl_needs_dashR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_needs_dashR=yes
+else $as_nop
+ ntp_cv_ssl_needs_dashR=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashR" >&5
+printf "%s\n" "$ntp_cv_ssl_needs_dashR" >&6; }
+ case "$ntp_cv_ssl_needs_dashR" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ esac
+ case "$build:$ntp_cv_ssl_needs_dashR" in
+ $host:no)
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Unable to run program using crypto, check openssl.pc
+or libcrypto.pc are in PKG_CONFIG_PATH, or provide the
+ --with-openssl-libdir=/some/path option to configure.
+
+See \`config.log' for more details" "$LINENO" 5; }
+ esac
+ esac
+ esac
+esac
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase II checks:" >&5
+printf "%s\n" "$as_me: OpenSSL Phase II checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;}
+ esac
+
+
+
+case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
+ yes:no)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l alone works" >&5
+printf %s "checking if linking with $ntp_ssl_libs_l alone works... " >&6; }
+if test ${ntp_cv_bare_lcrypto+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ EVP_MD_CTX_new();
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ntp_cv_bare_lcrypto=yes
+else $as_nop
+ ntp_cv_bare_lcrypto=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
+printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
+ case "$ntp_cv_bare_lcrypto" in
+ no)
+ LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l -lz works" >&5
+printf %s "checking if linking with $ntp_ssl_libs_l -lz works... " >&6; }
+if test ${ntp_cv_lcrypto_lz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ EVP_MD_CTX_new();
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ntp_cv_lcrypto_lz=yes
+else $as_nop
+ ntp_cv_lcrypto_lz=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
+printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
+ case "$ntp_cv_lcrypto_lz" in
+ yes)
+ ntp_ssl_libs_l="$ntp_ssl_libs_l -lz"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ esac
+ esac esac
+case "$ntp_openssl:$GCC" in
+ yes:yes)
+ CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If $CC supports -Werror" >&5
+printf %s "checking If $CC supports -Werror... " >&6; }
+if test ${ntp_cv_gcc_supports_Werror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_supports_Werror=yes
+else $as_nop
+ ntp_cv_gcc_supports_Werror=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_supports_Werror" >&5
+printf "%s\n" "$ntp_cv_gcc_supports_Werror" >&6; }
+ case "ntp_cv_gcc_supports_Werror" in
+ no)
+ ntp_use_Wstrict_prototypes=yes
+ ;;
+ yes)
+ CFLAGS="$CFLAGS -Wstrict-prototypes"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OpenSSL triggers warnings" >&5
+printf %s "checking if OpenSSL triggers warnings... " >&6; }
+if test ${ntp_cv_ssl_triggers_warnings+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/asn1_mac.h"
+ #include "openssl/bn.h"
+ #include "openssl/err.h"
+ #include "openssl/evp.h"
+ #include "openssl/pem.h"
+ #include "openssl/rand.h"
+ #include "openssl/x509v3.h"
+
+int
+main (void)
+{
+
+ /* empty body */
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_ssl_triggers_warnings=no
+else $as_nop
+ ntp_cv_ssl_triggers_warnings=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_triggers_warnings" >&5
+printf "%s\n" "$ntp_cv_ssl_triggers_warnings" >&6; }
+ case "$ntp_cv_ssl_triggers_warnings" in
+ yes)
+ ntp_use_Wstrict_prototypes=no
+ ;;
+ *)
+ ntp_use_Wstrict_prototypes=yes
+ esac
+ esac
+ case "$ntp_use_Wstrict_prototypes" in
+ no)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes"
+ ;;
+ *)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+ esac
+ ;;
+ no:yes)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will link to ssl library" >&5
+printf %s "checking if we will link to ssl library... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+printf "%s\n" "$ntp_openssl" >&6; }
+
+case "$ntp_openssl" in
yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5
-printf "%s\n" "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;}
+ VER_SUFFIX=o
+ for ac_header in openssl/cmac.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_cmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
+ ntp_enable_cmac=yes
+else $as_nop
+ ntp_enable_cmac=no
+
+fi
+
+done
+ case "$ntp_enable_cmac" in
+ yes)
+
+printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
+
+ esac
+
+printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
+
+
+printf "%s\n" "#define OPENSSL_SUPPRESS_DEPRECATED 1" >>confdefs.h
+
+ CFLAGS="$NTPSSL_SAVED_CFLAGS"
+ ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
+if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
+
+fi
+
+ CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags"
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags"
+ LDADD_NTP="$ntp_ssl_libs $LDADD_NTP"
+ LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP"
+esac
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL final checks:" >&5
+printf "%s\n" "$as_me: OpenSSL final checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl: $ntp_openssl" >&5
+printf "%s\n" "$as_me: ntp_openssl: $ntp_openssl" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5
+printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;}
+ esac
+
+
+
+CFLAGS="$NTPSSL_SAVED_CFLAGS"
+CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+LIBS="$NTPSSL_SAVED_LIBS"
+LDFLAGS="$NTPSSL_SAVED_LDFLAGS"
+
+{ NTPSSL_SAVED_CFLAGS=; unset NTPSSL_SAVED_CFLAGS;}
+{ NTPSSL_SAVED_CPPFLAGS=; unset NTPSSL_SAVED_CPPFLAGS;}
+{ NTPSSL_SAVED_LIBS=; unset NTPSSL_SAVED_LIBS;}
+{ NTPSSL_SAVED_LDFLAGS=; unset NTPSSL_SAVED_LDFLAGS;}
+{ ntp_enable_cmac=; unset ntp_enable_cmac;}
+{ ntp_use_Wstrict_prototypes=; unset ntp_use_Wstrict_prototypes;}
+{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
+{ ntp_openssl_version=; unset ntp_openssl_version;}
+{ ntp_ssl_cflags=; unset ntp_ssl_cflags;}
+{ ntp_ssl_cppflags=; unset ntp_ssl_cppflags;}
+{ ntp_ssl_libdir_search=; unset ntp_ssl_libdir_search;}
+{ ntp_ssl_incdir_search=; unset ntp_ssl_incdir_search;}
+{ ntp_ssl_libdir=; unset ntp_ssl_libdir;}
+{ ntp_ssl_incdir=; unset ntp_ssl_incdir;}
+{ ntp_ssl_libs_l=; unset ntp_ssl_libs_l;}
+{ ntp_ssl_libs_L=; unset ntp_ssl_libs_L;}
+{ ntp_ssl_ldflags=; unset ntp_ssl_ldflags;}
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SSL library's secure random numbers" >&5
+printf %s "checking if we want to use SSL library's secure random numbers... " >&6; }
+# Check whether --enable-openssl-random was given.
+if test ${enable_openssl_random+y}
+then :
+ enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval
+else $as_nop
+ ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
+printf "%s\n" "$ntp_use_openssl_random" >&6; }
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
+if test "x$ac_cv_func_RAND_bytes" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
+if test "x$ac_cv_func_RAND_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
+
+fi
+
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyesyes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using SSL library's secure random number generator" >&5
+printf "%s\n" "$as_me: Using SSL library's secure random number generator" >&6;}
+
+printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
+
;;
+ *)
+ ntp_use_openssl_random=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: SSL library's secure random number generator unavailable." >&5
+printf "%s\n" "$as_me: SSL library's secure random number generator unavailable." >&6;}
+ case "$ntp_ssl_random_mandatory" in
+ yes)
+ as_fn_error $? "No suitable SSL library was found and
+--enable-openssl-random was given.. Remove --enable-openssl-random
+if you wish to build without a cryptographically secure random number
+generator.
+
+WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " "$LINENO" 5
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " >&5
+printf "%s\n" "$as_me: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " >&2;}
+ esac
esac
+{ ntp_ssl_random_mandatory=; unset ntp_ssl_random_mandatory;}
+
+
+
+LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
+LIBS=$SAVED_LIBS
+{ SAVED_LIBS=; unset SAVED_LIBS;}
+
+
+
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -25875,9 +26824,6 @@ printf "%s\n" "no" >&6; }
fi
-
-
-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
@@ -25889,65 +26835,6 @@ else
printf "%s\n" "no, using $LN_S" >&6; }
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
-printf %s "checking for library containing strerror... " >&6; }
-if test ${ac_cv_search_strerror+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char strerror ();
-int
-main (void)
-{
-return strerror ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' cposix
-do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"
-then :
- ac_cv_search_strerror=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext
- if test ${ac_cv_search_strerror+y}
-then :
- break
-fi
-done
-if test ${ac_cv_search_strerror+y}
-then :
-
-else $as_nop
- ac_cv_search_strerror=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
-printf "%s\n" "$ac_cv_search_strerror" >&6; }
-ac_res=$ac_cv_search_strerror
-if test "$ac_res" != no
-then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
# Extract the first word of "perl", so it can be a program name with args.
@@ -26352,35 +27239,39 @@ fi
esac
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
printf %s "checking for facilitynames in syslog.h... " >&6; }
if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
then :
printf %s "(cached) " >&6
else $as_nop
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define SYSLOG_NAMES
-#include <stdlib.h>
-#include <syslog.h>
+ #define SYSLOG_NAMES
+ #include <stdlib.h>
+ #include <syslog.h>
int
main (void)
{
- void *fnames; fnames = facilitynames;
+
+ void *fnames = facilitynames;
+
+
;
return 0;
}
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
-else $as_nop
ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
@@ -26393,11 +27284,6 @@ printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
no)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
- ;;
- cross)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
-printf "%s\n" "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
- ;;
esac
@@ -26409,7 +27295,10 @@ case "$host" in
*)
# HMS: Make sure we check for -lrt for clock_* before this...
case "$ac_cv_search_clock_gettime" in
- '') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;;
+ '') { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!
+See \`config.log' for more details" "$LINENO" 5; } ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
printf %s "checking for library containing sched_setscheduler... " >&6; }
@@ -26479,6 +27368,12 @@ then :
printf "%s\n" "#define HAVE_BSTRING_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/procctl.h" "ac_cv_header_sys_procctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_procctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PROCCTL_H 1" >>confdefs.h
+
+fi
ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
if test "x$ac_cv_header_dns_sd_h" = xyes
@@ -31425,530 +32320,7 @@ esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
printf "%s\n" "$ans" >&6; }
-
-
-
-VER_SUFFIX=
-
-
-
-
-# Check whether --with-crypto was given.
-if test ${with_crypto+y}
-then :
- withval=$with_crypto;
-fi
-
-
-# Check whether --with-openssl-libdir was given.
-if test ${with_openssl_libdir+y}
-then :
- withval=$with_openssl_libdir;
-fi
-
-
-# Check whether --with-openssl-incdir was given.
-if test ${with_openssl_incdir+y}
-then :
- withval=$with_openssl_incdir;
-fi
-
-
-# Check whether --with-rpath was given.
-if test ${with_rpath+y}
-then :
- withval=$with_rpath;
-fi
-
-
-ntp_openssl=no
-ntp_openssl_from_pkg_config=no
-
-with_crypto=${with_crypto:-openssl,libcrypto}
-case "$with_crypto" in
- yes)
- with_crypto=openssl,libcrypto
-esac
-
-
-case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
- no:*) ;;
- *:notempty:notgiven:notgiven)
- for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
-printf %s "checking pkg-config for $pkg... " >&6; }
- if $PKG_CONFIG --exists $pkg ; then
- CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
- CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
- LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
- VER_SUFFIX=o
- ntp_openssl=yes
- ntp_openssl_from_pkg_config=yes
- ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
- case "$ntp_openssl_version" in
- *.*) ;;
- *) ntp_openssl_version='(unknown)' ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
-printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
-
- break
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- done
-esac
-case "$with_crypto:$ntp_openssl" in
- no:*) ;;
- *:no)
- need_dash_r=
- need_dash_Wlrpath=
- case "${with_rpath-notgiven}" in
- yes)
- # Lame - what to do if we need -Wl... but not -R?
- need_dash_r=1
- ;;
- notgiven)
- case "$host" in
- *-*-linux*)
- # This may really only be true for gcc
- need_dash_Wlrpath=1
- ;;
- *-*-netbsd*)
- need_dash_r=1
- ;;
- *-*-solaris*)
- need_dash_r=1
- ;;
- esac
- ;;
- esac
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-printf %s "checking for openssl library directory... " >&6; }
- with_openssl_libdir=${with_openssl_libdir-notgiven}
- case "$with_openssl_libdir" in
- notgiven)
- case "$build" in
- $host)
- with_openssl_libdir=default
- ;;
- *)
- with_openssl_libdir=no
- ;;
- esac
- esac
- case "$with_openssl_libdir" in
- default)
- # Look in:
- with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
- esac
- case "$with_openssl_libdir" in
- no)
- ;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $with_openssl_libdir no
- do
- case "$host" in
- *-*-darwin*)
- test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
- ;;
- *)
- test -f $i/libcrypto.so -a -f $i/libssl.so && break
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
- ;;
- esac
- done
- openssl_libdir=$i
- ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
-printf "%s\n" "$openssl_libdir" >&6; }
- case "$openssl_libdir" in
- no)
- openssl_libdir=
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
-printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
- esac
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
-printf %s "checking for openssl include directory... " >&6; }
- with_openssl_incdir=${with_openssl_incdir-notgiven}
- case "$with_openssl_incdir" in
- notgiven)
- # Look in:
- with_openssl_incdir="/usr/include /usr/sfw/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
- esac
- case "$with_openssl_incdir" in
- no)
- ;;
- *) # look for openssl/evp.h:
- for i in $with_openssl_incdir no
- do
- test -f $i/openssl/evp.h && break
- done
- openssl_incdir=$i
- ;;
- esac
- { i=; unset i;}
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
-printf "%s\n" "$openssl_incdir" >&6; }
- case "$openssl_incdir" in
- no)
- openssl_incdir=
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
-printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
- esac
- if test -z "$openssl_libdir" -o -z "$openssl_incdir"
- then
- ntp_openssl=no
- else
- ntp_openssl=yes
- VER_SUFFIX=o
- fi
- case "$ntp_openssl" in
- yes)
- # We have OpenSSL inc/lib dirs - use them.
- case "$openssl_incdir" in
- /usr/include)
- ;;
- *)
- CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
- ;;
- esac
- case "$openssl_libdir" in
- /usr/lib)
- ;;
- *)
- LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
- case "$need_dash_r" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
- esac
- case "$need_dash_Wlrpath" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
- esac
- ;;
- esac
- LDADD_NTP="$LDADD_NTP -lcrypto"
- esac
-esac
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-printf %s "checking if we will use crypto... " >&6; }
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
-printf "%s\n" "$ntp_openssl" >&6; }
-
-case "$ntp_openssl" in
- yes)
- ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_cmac_h" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
-
-fi
-ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_hmac_h" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h
-
-fi
-
-
-printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
-
- case "$VER_SUFFIX" in
- *o*) ;;
- *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
- esac
- ;;
-esac
-
-NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
-NTPO_SAVED_LIBS="$LIBS"
-
-#
-# check for linking with -lcrypto failure, and try -lcrypto -lz.
-# Helps m68k-atari-mint
-#
-case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
- yes:no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
-printf %s "checking if linking with -lcrypto alone works... " >&6; }
-if test ${ntp_cv_bare_lcrypto+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/err.h"
- #include "openssl/evp.h"
-
-int
-main (void)
-{
-
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- ntp_cv_bare_lcrypto=yes
-else $as_nop
- ntp_cv_bare_lcrypto=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
-printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
- case "$ntp_cv_bare_lcrypto" in
- no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
-printf %s "checking if linking with -lcrypto -lz works... " >&6; }
-if test ${ntp_cv_lcrypto_lz+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/err.h"
- #include "openssl/evp.h"
-
-int
-main (void)
-{
-
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- ntp_cv_lcrypto_lz=yes
-else $as_nop
- ntp_cv_lcrypto_lz=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
-printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
- case "$ntp_cv_lcrypto_lz" in
- yes)
- LDADD_NTP="$LDADD_NTP -lz"
- esac
- esac
-esac
-
-#
-# Older OpenSSL headers have a number of callback prototypes inside
-# other function prototypes which trigger copious warnings with gcc's
-# -Wstrict-prototypes, which is included in -Wall.
-#
-# An example:
-#
-# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
-# int (*cb)(), int sgckey);
-# ^^^^^^^^^^^
-#
-#
-#
-openssl_triggers_warnings=unknown
-NTPO_SAVED_CFLAGS="$CFLAGS"
-
-case "$ntp_openssl:$GCC" in
- yes:yes)
- CFLAGS="$CFLAGS -Werror"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main (void)
-{
-
- /* see if -Werror breaks gcc */
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gcc_handles_Werror=yes
-else $as_nop
- gcc_handles_Werror=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- case "$gcc_handles_Werror" in
- no)
- # if this gcc doesn't do -Werror go ahead and use
- # -Wstrict-prototypes.
- openssl_triggers_warnings=yes
- ;;
- yes)
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/asn1_mac.h"
- #include "openssl/bn.h"
- #include "openssl/err.h"
- #include "openssl/evp.h"
- #include "openssl/pem.h"
- #include "openssl/rand.h"
- #include "openssl/x509v3.h"
-
-int
-main (void)
-{
-
- /* empty body */
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- openssl_triggers_warnings=no
-else $as_nop
- openssl_triggers_warnings=yes
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- esac
- case "$openssl_triggers_warnings" in
- yes)
- CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
- ;;
- *)
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
- esac
- ;;
- no:yes)
- # gcc without OpenSSL
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
-esac
-
-# Because we don't want -Werror for the EVP_MD_do_all_sorted check
-CFLAGS="$NTPO_SAVED_CFLAGS"
-
-case "$ntp_openssl" in
- yes)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
-if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
-then :
- printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
-
-fi
-
- ;;
-esac
-
-
-CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
-LIBS="$NTPO_SAVED_LIBS"
-{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
-{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
-{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
-{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
-{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5
-printf %s "checking if we want to enable CMAC support... " >&6; }
-case "$ac_cv_header_openssl_cmac_h" in
- yes)
-
-printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
-
- ans="yes"
- ;;
- *) ans="no"
- ;;
-esac
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-printf "%s\n" "$ans" >&6; }
-
-
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
-printf %s "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
-# Check whether --enable-openssl-random was given.
-if test ${enable_openssl_random+y}
-then :
- enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
-else $as_nop
- ntp_use_openssl_random=yes
-
-fi
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
-printf "%s\n" "$ntp_use_openssl_random" >&6; }
-
-# The following might need extra libraries
-NTPO_SAVED_LIBS="$LIBS"
-LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
-ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
-if test "x$ac_cv_func_RAND_bytes" = xyes
-then :
- printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
-if test "x$ac_cv_func_RAND_poll" = xyes
-then :
- printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
-
-fi
-
-LIBS="$NTPO_SAVED_LIBS"
-case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
- yesyesyesyes)
-
-printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
-
- ;;
- *) ntp_use_openssl_random=no ;;
-esac
-
-
-
-# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
-printf %s "checking if we want to include NTP Autokey protocol support... " >&6; }
+# if we have crypto, by default Autokey is enabled
# Check whether --enable-autokey was given.
if test ${enable_autokey+y}
then :
@@ -31964,8 +32336,8 @@ case "$ntp_autokey" in
*)
case "$ntp_openssl" in
no)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
-printf "%s\n" "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, crypto unavailable." >&5
+printf "%s\n" "$as_me: WARNING: Disabling Autokey, crypto unavailable." >&2;}
ntp_autokey=no
;;
*)
@@ -31977,6 +32349,8 @@ printf "%s\n" "#define AUTOKEY 1" >>confdefs.h
esac
;;
esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if NTP Autokey protocol will be supported" >&5
+printf %s "checking if NTP Autokey protocol will be supported... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
printf "%s\n" "$ntp_autokey" >&6; }
@@ -34457,6 +34831,8 @@ printf "%s\n" "#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave" >>confdefs.h
printf "%s\n" "$ntp_ok" >&6; }
+
+
# We may not need have_unity
have_unity=false
# Extract the first word of "ruby", so it can be a program name with args.
@@ -34951,6 +35327,10 @@ if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
as_fn_error $? "conditional \"PTHREADS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${LIBNTP_SUBMAKES_TRUE}" && test -z "${LIBNTP_SUBMAKES_FALSE}"; then
+ as_fn_error $? "conditional \"LIBNTP_SUBMAKES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -35365,7 +35745,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ntp $as_me 4.2.8p17, which was
+This file was extended by ntp $as_me 4.2.8p18, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -35434,7 +35814,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-ntp config.status 4.2.8p17
+ntp config.status 4.2.8p18
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
@@ -35563,9 +35943,9 @@ AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
sed_quote_subst='$sed_quote_subst'
double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
@@ -36674,13 +37054,13 @@ available_tags=''
# ### BEGIN LIBTOOL CONFIG
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
# Which release of libtool.m4 was used?
macro_version=$macro_version
macro_revision=$macro_revision
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
# Whether or not to build static libraries.
build_old_libs=$enable_static
@@ -37166,7 +37546,7 @@ ltmain=$ac_aux_dir/ltmain.sh
chmod +x "$ofile"
;;
- "ntpd/complete.conf":F) sed -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
+ "ntpd/complete.conf":F) $SED -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
"ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
"scripts/build/genAuthors":F) chmod +x scripts/build/genAuthors ;;
"scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
diff --git a/contrib/ntp/configure.ac b/contrib/ntp/configure.ac
index c2dce35e800d..aef705394309 100644
--- a/contrib/ntp/configure.ac
+++ b/contrib/ntp/configure.ac
@@ -35,7 +35,7 @@ AC_PRESERVE_HELP_ORDER
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20230326
+ntp_configure_cache_version=20240218
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -55,6 +55,23 @@ AC_DEFINE_UNQUOTED([STR_SYSTEM], ["$host"],
AC_CONFIG_HEADERS([config.h])
dnl AC_ARG_PROGRAM
+AC_MSG_CHECKING([if we should enable build framework help])
+AC_ARG_ENABLE(
+ [build-framework-help],
+ [AS_HELP_STRING(
+ [--enable-build-framework-help],
+ [+ enable build framework help]
+ )],
+ [ntp_ok=$enableval],
+ [ntp_ok=yes]
+)
+case "$ntp_ok" in
+ yes)
+ ntp_cv_build_framework_help=yes ;;
+ *) ntp_cv_build_framework_help=no ;;
+esac
+AC_MSG_RESULT([$ntp_ok])
+
ntp_atom_ok=${ntp_atom_ok=no}
ntp_oncore_ok=${ntp_oncore_ok=no}
ntp_parse_ok=${ntp_parse_ok=no}
@@ -70,7 +87,7 @@ AX_C99_STRUCT_INIT
NTP_HARDEN([sntp])
-NTP_VPATH_HACK dnl used only by ntpd/Makefile.am
+NTP_VPATH_HACK dnl used by ntpd/Makefile.am libparse/Makefile.am
NTP_LOCINFO([sntp]) dnl takes over from NTP_BINDIR, in NTP_LIBNTP
@@ -78,8 +95,7 @@ AM_PROG_AR
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
-AC_DISABLE_SHARED
-AC_PROG_LIBTOOL
+LT_INIT([disable-shared])
AC_SUBST([LIBTOOL_DEPS])
# NTP has (so far) been relying on leading-edge autogen, which
@@ -87,7 +103,7 @@ AC_SUBST([LIBTOOL_DEPS])
# Therefore, by default:
# - use the version of libopts we ship with
# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
+# - build a static copy (disable-shared - done earlier)
case "${enable_local_libopts+set}" in
set) ;;
*) enable_local_libopts=yes ;;
@@ -103,29 +119,13 @@ NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent])
NTP_LIBNTP
-AC_MSG_CHECKING([for deprecated --with-arlib])
-AC_ARG_WITH([arlib],
- AS_HELP_STRING([--with-arlib], [- deprecated, arlib not distributed]),
- [ans=$withval], [ans=no])
-AC_MSG_RESULT([$ans])
-
-case "$ans" in
- yes)
- AC_MSG_WARN([Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized.])
- ;;
-esac
-
dnl we need to check for cross compile tools for vxWorks here
AC_PROG_AWK
AS_UNSET([ac_cv_prog_AWK])
AC_SUBST([AWK]) dnl scripts/ntpver.in
AC_PROG_MAKE_SET
-AC_SUBST([CFLAGS])
-AC_SUBST([LDFLAGS])
-
AC_PROG_LN_S
-AC_ISC_POSIX
AC_PATH_PROG([PATH_PERL], [perl])
@@ -277,13 +277,13 @@ case "$host" in
*)
# HMS: Make sure we check for -lrt for clock_* before this...
case "$ac_cv_search_clock_gettime" in
- '') AC_MSG_ERROR([Internal Error: Haven't looked for clock_gettime() yet!]) ;;
+ '') AC_MSG_FAILURE([Internal Error: Haven't looked for clock_gettime() yet!]) ;;
esac
AC_SEARCH_LIBS([sched_setscheduler], [rt posix4])
;;
esac
-AC_CHECK_HEADERS([bstring.h])
+AC_CHECK_HEADERS([bstring.h sys/procctl.h])
AC_CHECK_HEADER(
[dns_sd.h],
[AC_SEARCH_LIBS(
@@ -3008,23 +3008,7 @@ case "$ntp_libparse" in
esac
AC_MSG_RESULT([$ans])
-NTP_OPENSSL
-
-AC_MSG_CHECKING([if we want to enable CMAC support])
-case "$ac_cv_header_openssl_cmac_h" in
- yes)
- AC_DEFINE([ENABLE_CMAC], [1], [Enable CMAC support?])
- ans="yes"
- ;;
- *) ans="no"
- ;;
-esac
-AC_MSG_RESULT([$ans])
-
-NTP_CRYPTO_RAND
-
-# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
-AC_MSG_CHECKING([if we want to include NTP Autokey protocol support])
+# if we have crypto, by default Autokey is enabled
AC_ARG_ENABLE(
[autokey],
AS_HELP_STRING(
@@ -3040,7 +3024,7 @@ case "$ntp_autokey" in
*)
case "$ntp_openssl" in
no)
- AC_MSG_WARN([Disabling Autokey, --enable-autokey requires --with-crypto.])
+ AC_MSG_WARN([Disabling Autokey, crypto unavailable.])
ntp_autokey=no
;;
*)
@@ -3050,6 +3034,7 @@ case "$ntp_autokey" in
esac
;;
esac
+AC_MSG_CHECKING([if NTP Autokey protocol will be supported])
AC_MSG_RESULT([$ntp_autokey])
AC_SUBST([MAKE_CHECK_LAYOUT])
@@ -4432,6 +4417,18 @@ AC_DEFINE_UNQUOTED([DYNAMIC_INTERLEAVE], [$ntp_dynamic_interleave],
[support dynamic interleave?])
AC_MSG_RESULT([$ntp_ok])
+AH_BOTTOM([
+ /*
+ * Macro to use in otherwise-empty source files to comply with ANSI C
+ * requirement that each translation unit (source file) contain some
+ * declaration. This has commonly been done by declaring an unused
+ * global variable of type int or char. An extern reference to abs()
+ * serves the same purpose without bloat. We once used exit() but
+ * that can produce warnings on systems that declare exit() noreturn.
+ */
+ #define NONEMPTY_TRANSLATION_UNIT extern int abs(int);
+])
+
NTP_UNITYBUILD
NTP_PROBLEM_TESTS
@@ -4455,7 +4452,7 @@ AC_CONFIG_FILES([kernel/sys/Makefile])
AC_CONFIG_FILES([libntp/Makefile])
AC_CONFIG_FILES([libparse/Makefile])
AC_CONFIG_FILES([ntpd/Makefile])
-AC_CONFIG_FILES([ntpd/complete.conf], [sed -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf])
+AC_CONFIG_FILES([ntpd/complete.conf], [$SED -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf])
AC_CONFIG_FILES([ntpdate/Makefile])
AC_CONFIG_FILES([ntpdc/Makefile])
AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl])
diff --git a/contrib/ntp/flock-build b/contrib/ntp/flock-build
index b537ac349175..14767b934e17 100755
--- a/contrib/ntp/flock-build
+++ b/contrib/ntp/flock-build
@@ -34,23 +34,11 @@ case "$PARALLEL_BUILDS" in
*) echo Launching $PARALLEL_BUILDS parallel builds on each machine
esac
-# Backroom:
-# barnstable freebsd-6.1
-# beauregard freebsd-6.0
-# X churchy alpha-dec-osf5.1
-# deacon sparc-sun-solaris2.10
-# grundoon freebsd-6.2
-# howland freebsd-6.1
-# o macabre freebsd-6.1-STABLE
-# o mort freebsd-6.1
-# whimsy sparc-sun-solaris2.10
-
# Campus:
# * baldwin sparc-sun-solaris2.10
# * bridgeport sparc-sun-solaris2.10
-# * malarky sparc-sun-solaris2.10
# * pogo sparc-sun-solaris2.10
-# * rackety freebsd-6.1
+# * rackety sparc-sun-solaris2.10
if [ ! -r sntp/libevent/build-aux/config.guess ] ; then
echo "Error: bootstrap required." 1>&2 && exit 1
@@ -80,8 +68,8 @@ do
case "1" in
0)
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" &
- ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" &
- ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging --disable-saveconfig $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf --enable-leap-smear $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" &
;;
1)
@@ -103,13 +91,13 @@ do
case $FB_FIRSTONLY in
'0')
- ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS &
+ ./build $SIG $PARSE $STD --disable-debugging --disable-saveconfig $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
- ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS &
+ ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf --enable-leap-smear $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
diff --git a/contrib/ntp/html/.datecheck b/contrib/ntp/html/.datecheck
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/contrib/ntp/html/.datecheck
diff --git a/contrib/ntp/html/clockopt.html b/contrib/ntp/html/clockopt.html
index 5b2de7e58d6e..5a721a8a745e 100644
--- a/contrib/ntp/html/clockopt.html
+++ b/contrib/ntp/html/clockopt.html
@@ -29,8 +29,8 @@
<dd>Marks the reference clock as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for further information.</dd>
<dt><tt>mode <i>int</i></tt></dt>
<dd>Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the <tt>parse</tt> drivers.</dd>
- <dt><tt>minpoll <i>int</i></tt><br>
- <tt>maxpoll <i>int</i></tt></dt>
+ <dt><tt>minpoll <i>int</i></tt></dt>
+ <dt><tt>maxpoll <i>int</i></tt></dt>
<dd>These options specify the minimum and maximum polling interval for reference clock messages in log<sub>2</sub> seconds. For most directly connected reference clocks, both <tt>minpoll</tt> and <tt>maxpoll</tt> default to 6 (64 s). For modem reference clocks, <tt>minpoll</tt> is ordinarily set to 10 (about 17 m) and <tt>maxpoll</tt> to 15 (about 9 h). The allowable range is 4 (16 s) to 17 (36 h) inclusive.</dd>
</dl>
</dd>
@@ -48,7 +48,10 @@
<dd>Specifies the stratum number assigned to the driver in the range 0 to 15, inclusive. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.</dd>
<dt><tt>refid <i>string</i></tt></dt>
<dd>Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.</dd>
- <dt><tt>flag1 flag2 flag3 flag4</tt></dt>
+ <dt><tt>flag1 0|1</tt></dt>
+ <dt><tt>flag2 0|1</tt></dt>
+ <dt><tt>flag3 0|1</tt></dt>
+ <dt><tt>flag4 0|1</tt></dt>
<dd>These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular driver. However, by convention <tt>flag4</tt> is used to enable recording monitoring data to the <tt>clockstats</tt> file configured with the <tt>filegen</tt> command. Additional information on the <tt>filegen</tt> command is on the <a href="monopt.html">Monitoring Options</a> page.</dd>
<dt><tt>minjitter <i>secs</i></tt></dt>
<dd>If the source has a jitter that cannot be sensibly estimated, because
diff --git a/contrib/ntp/html/copyright.html b/contrib/ntp/html/copyright.html
index d00cf9712178..7584aefc3230 100644
--- a/contrib/ntp/html/copyright.html
+++ b/contrib/ntp/html/copyright.html
@@ -9,7 +9,7 @@
<h3>Copyright Notice</h3>
<img src="pic/sheepb.jpg" alt="jpg" align="left"> "Clone me," says Dolly sheepishly.
<p>Last update:
- <!-- #BeginDate format:En2m -->2-Mar-2023 05:21<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->7-Jan-2024 00:29<!-- #EndDate -->
UTC</p>
<br clear="left">
</p>
@@ -38,7 +38,7 @@
<pre>
***********************************************************************
* *
-* Copyright (c) Network Time Foundation 2011-2023 *
+* Copyright (c) Network Time Foundation 2011-2024 *
* *
* All Rights Reserved *
* *
diff --git a/contrib/ntp/html/release.html b/contrib/ntp/html/release.html
index f940603a0947..d354ba653953 100644
--- a/contrib/ntp/html/release.html
+++ b/contrib/ntp/html/release.html
@@ -37,7 +37,7 @@
<li>There are two new burst mode features available where special conditions apply. One of these is enabled by the <tt>iburst</tt> keyword in the <tt>server</tt> configuration command. It is intended for cases where it is important to set the clock quickly when an association is first mobilized. The other is enabled by the <tt>burst</tt> keyword in the <tt>server</tt> configuration command. It is intended for cases where the network attachment requires an initial calling or training procedure. See the <a href="assoc.html">Association Management</a> page for further information.</li>
<li>The OpenSSL cryptographic library has replaced the library formerly available from RSA Laboratories. All cryptographic routines except a version of the MD5 message digest algorithm have been removed from the base distribution. All 128-bit and 160-bit message digests algorithms are now supported for both symmetric key and public key cryptosystems. See the <a href="authentic.html">Authentication Support</a> page for further information and the <a href="authopt.html">Authentication Options</a> page for a list of supported digest algorithms.</li>
<li>This release includes support for Autokey public-key cryptography for authenticating public servers to clients, as described in RFC 5906. This support requires the --enable-autokey option when building the distribution, which is the default is OpenSSL is available. The deployment of Autokey subnets is now considerably simpler than in earlier versions. A subnet naming scheme is now available to filter manycast and pool configurations. Additional information about Autokey is on the <a href="autokey.html">Autokey Public Key Authentication</a> page and links from there.</li>
- <li>The NTP descrete even simulator has been substantially upgraded, now including scenarios with multiple servers and time-sensitive scripts. This allows the NTP&nbsp;algorithms to be tested in an embedded environment with systematic and pseudo-random network delay and oscillator wander distributions. This has been used to verify correct operation under conditions of extreme error and misconfiguration. See the <a href="ntpdsim.html"><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a> page. A technical description and performance analysis is given in the white papers at the <a href="http://www.eecis.udel.edu/~mills/ntp.html">NTP Project Page</a>.</li>
+ <li>The NTP descrete event simulator has been substantially upgraded, now including scenarios with multiple servers and time-sensitive scripts. This allows the NTP&nbsp;algorithms to be tested in an embedded environment with systematic and pseudo-random network delay and oscillator wander distributions. This has been used to verify correct operation under conditions of extreme error and misconfiguration. See the <a href="ntpdsim.html"><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a> page. A technical description and performance analysis is given in the white papers at the <a href="http://www.eecis.udel.edu/~mills/ntp.html">NTP Project Page</a>.</li>
<li>NTPv4 includes three new server discovery schemes, which in most applications can avoid per-host configuration altogether. Two of these are based on IP multicast technology, while the remaining one is based on crafted DNS lookups. See the <a href="discover.html">Automatic NTP Configuration Schemes</a> page for further information.</li>
<li>The status display and event report monitoring functions have been considerably expanded, including new statistics files and event reporting to files and the system log. See the <a href="decode.html">Event Messages and Status Words</a> page for further information.</li>
<li>Several new options have been added for the <tt>ntpd</tt> command line. For the inveterate knob twiddlers several of the more important performance variables can be changed to fit actual or perceived special conditions. In particular, the <tt>tinker</tt> and <tt>tos</tt> commands can be used to adjust thresholds, throw switches and change limits.</li>
diff --git a/contrib/ntp/include/Makefile.am b/contrib/ntp/include/Makefile.am
index dd739ebbcdbd..b661ca639f29 100644
--- a/contrib/ntp/include/Makefile.am
+++ b/contrib/ntp/include/Makefile.am
@@ -8,6 +8,7 @@ noinst_HEADERS = \
ascii.h \
audio.h \
binio.h \
+ c99_snprintf.h \
declcond.h \
gps.h \
hopf6039.h \
diff --git a/contrib/ntp/include/Makefile.in b/contrib/ntp/include/Makefile.in
index 5bf244e81bd8..317111a094b1 100644
--- a/contrib/ntp/include/Makefile.in
+++ b/contrib/ntp/include/Makefile.in
@@ -386,6 +386,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -492,6 +493,7 @@ noinst_HEADERS = \
ascii.h \
audio.h \
binio.h \
+ c99_snprintf.h \
declcond.h \
gps.h \
hopf6039.h \
diff --git a/contrib/ntp/include/c99_snprintf.h b/contrib/ntp/include/c99_snprintf.h
new file mode 100644
index 000000000000..f5c1bf0e117c
--- /dev/null
+++ b/contrib/ntp/include/c99_snprintf.h
@@ -0,0 +1,28 @@
+/*
+ * ntp_c99_snprintf.h
+ *
+ * Included from config.h to deal with replacing [v]snprintf() on older
+ * systems. The #undef lines below cannot be directly in config.h as
+ * config.status modifies each #undef in config.h.in to either be a
+ * commented-out #undef or a functional #define. Here they are used
+ * to avoid redefinition warnings on systems such as macos ca. 2024
+ * where system headers define [v]snprintf as preprocessor macros.
+ *
+ * Do not include this file directly, leave it to config.h.
+ */
+
+#if !defined(_KERNEL) && !defined(PARSESTREAM)
+/*
+ * stdio.h must be included in config.h after _GNU_SOURCE is defined
+ * but before #define snprintf rpl_snprintf
+ */
+# include <stdio.h>
+#endif
+
+#ifdef HW_WANT_RPL_SNPRINTF
+# undef snprintf
+#endif
+#ifdef HW_WANT_RPL_VSNPRINTF
+# undef vsnprintf
+#endif
+
diff --git a/contrib/ntp/include/isc/Makefile.in b/contrib/ntp/include/isc/Makefile.in
index 037cfbe354bf..fadd48e1c8ee 100644
--- a/contrib/ntp/include/isc/Makefile.in
+++ b/contrib/ntp/include/isc/Makefile.in
@@ -344,6 +344,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/include/lib_strbuf.h b/contrib/ntp/include/lib_strbuf.h
index 5ee92d6f8341..89da450a5547 100644
--- a/contrib/ntp/include/lib_strbuf.h
+++ b/contrib/ntp/include/lib_strbuf.h
@@ -5,28 +5,28 @@
#define LIB_STRBUF_H
#include <ntp_types.h>
-#include <ntp_malloc.h> /* for ZERO() */
+#include <ntp_malloc.h> /* for zero_mem() */
-/*
- * Sizes of things
- */
-#define LIB_NUMBUF 16
#define LIB_BUFLENGTH 128
-typedef char libbufstr[LIB_BUFLENGTH];
-extern libbufstr lib_stringbuf[LIB_NUMBUF];
-extern int lib_nextbuf;
-extern int lib_inited;
+extern int lib_inited;
+extern int ipv4_works;
+extern int ipv6_works;
+extern void init_lib(void);
/*
- * Macro to get a pointer to the next buffer
+ * Get a pointer to the next string buffer of LIB_BUFLENGTH octets.
+ * New and modified code should use buf = lib_getbuf() directly to
+ * provide clarity for folks familiar with common C style, but there's
+ * no need to churn the history with a mechanical switch away from
+ * LIB_GETBUF(buf).
*/
-#define LIB_GETBUF(bufp) \
- do { \
- ZERO(lib_stringbuf[lib_nextbuf]); \
- (bufp) = &lib_stringbuf[lib_nextbuf++][0]; \
- lib_nextbuf %= COUNTOF(lib_stringbuf); \
+extern char* lib_getbuf(void);
+
+#define LIB_GETBUF(bufp) \
+ do { \
+ (bufp) = lib_getbuf(); \
} while (FALSE)
#endif /* LIB_STRBUF_H */
diff --git a/contrib/ntp/include/ntp.h b/contrib/ntp/include/ntp.h
index 258ddd6138f7..7406a79ea8a4 100644
--- a/contrib/ntp/include/ntp.h
+++ b/contrib/ntp/include/ntp.h
@@ -171,8 +171,8 @@ typedef char s_char;
* Eventually the struct tag will change from interface to endpt_tag.
* endpt is unrelated to the select algorithm's struct endpoint.
*/
-typedef struct interface endpt;
-struct interface {
+typedef struct endpt_tag endpt;
+struct endpt_tag {
endpt * elink; /* endpt list link */
endpt * mclink; /* per-AF_* multicast list */
void * ioreg_ctx; /* IO registration context */
@@ -185,9 +185,12 @@ struct interface {
char name[32]; /* name of interface */
u_short family; /* AF_INET/AF_INET6 */
u_short phase; /* phase in update cycle */
- u_int32 flags; /* interface flags */
+ u_int32 flags; /* INT_ flags */
int last_ttl; /* last TTL specified */
u_int32 addr_refid; /* IPv4 addr or IPv6 hash */
+# ifdef WORDS_BIGENDIAN
+ u_int32 old_refid; /* byte-swapped IPv6 refid */
+# endif
int num_mcast; /* mcast addrs enabled */
u_long starttime; /* current_time at creation */
volatile long received; /* number of incoming packets */
@@ -200,11 +203,11 @@ struct interface {
};
/*
- * Flags for interfaces
+ * Flags for network endpoints (interfaces or really addresses)
*/
#define INT_UP 0x001 /* Interface is up */
#define INT_PPP 0x002 /* Point-to-point interface */
-#define INT_LOOPBACK 0x004 /* the loopback interface */
+#define INT_LOOPBACK 0x004 /* ::1 or 127.0.0.1 */
#define INT_BROADCAST 0x008 /* can broadcast out this interface */
#define INT_MULTICAST 0x010 /* can multicast out this interface */
#define INT_BCASTOPEN 0x020 /* broadcast receive socket is open */
@@ -212,7 +215,8 @@ struct interface {
#define INT_WILDCARD 0x080 /* wildcard interface - usually skipped */
#define INT_MCASTIF 0x100 /* bound directly to MCAST address */
#define INT_PRIVACY 0x200 /* RFC 4941 IPv6 privacy address */
-#define INT_BCASTXMIT 0x400 /* socket setup to allow broadcasts */
+#define INT_BCASTXMIT 0x400 /* socket setup to allow broadcasts */
+#define INT_LL_OF_GLOB 0x800 /* IPv6 link-local duplicate of global */
/*
* Define flasher bits (tests 1 through 11 in packet procedure)
@@ -342,12 +346,12 @@ struct peer {
u_char status; /* peer status */
u_char new_status; /* under-construction status */
u_char reach; /* reachability register */
+ u_char filter_nextpt; /* index into filter shift register */
int flash; /* protocol error test tally bits */
u_long epoch; /* reference epoch */
int burst; /* packets remaining in burst */
int retry; /* retry counter */
int flip; /* interleave mode control */
- int filter_nextpt; /* index into filter shift register */
double filter_delay[NTP_SHIFT]; /* delay shift register */
double filter_offset[NTP_SHIFT]; /* offset shift register */
double filter_disp[NTP_SHIFT]; /* dispersion shift register */
@@ -463,11 +467,12 @@ struct peer {
#define FLAG_XLEAVE 0x1000 /* interleaved protocol */
#define FLAG_XB 0x2000 /* interleaved broadcast */
#define FLAG_XBOGUS 0x4000 /* interleaved bogus packet */
-#ifdef OPENSSL
+#ifdef AUTOKEY
# define FLAG_ASSOC 0x8000 /* autokey request */
-#endif /* OPENSSL */
+#endif
#define FLAG_TSTAMP_PPS 0x10000 /* PPS source provides absolute timestamp */
#define FLAG_LOOPNONCE 0x20000 /* Use a nonce for the loopback test */
+#define FLAG_DISABLED 0x40000 /* peer is being torn down */
/*
* Definitions for the clear() routine. We use memset() to clear
@@ -558,9 +563,15 @@ struct pkt {
#define MIN_V4_PKT_LEN (12 * sizeof(u_int32)) /* min header length */
#define LEN_PKT_NOMAC (12 * sizeof(u_int32)) /* min header length */
#define MIN_MAC_LEN (1 * sizeof(u_int32)) /* crypto_NAK */
-#define MAX_MD5_LEN (5 * sizeof(u_int32)) /* MD5 */
-#define MAX_MAC_LEN (6 * sizeof(u_int32)) /* SHA */
+#define MD5_LENGTH 16
+#define SHAKE128_LENGTH 16
+#define CMAC_LENGTH 16
+#define SHA1_LENGTH 20
#define KEY_MAC_LEN sizeof(u_int32) /* key ID in MAC */
+#define MAX_MD5_LEN (KEY_MAC_LEN + MD5_LENGTH)
+#define MAX_SHAKE128_LEN (KEY_MAC_LEN + SHAKE128_LENGTH)
+#define MAX_SHA1_LEN (KEY_MAC_LEN + SHA1_LENGTH)
+#define MAX_MAC_LEN (6 * sizeof(u_int32)) /* any MAC */
#define MAX_MDG_LEN (MAX_MAC_LEN-KEY_MAC_LEN) /* max. digest len */
/*
@@ -703,6 +714,10 @@ struct pkt {
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min3(a,b,c) min(min((a),(b)), (c))
+/* clamp a value within a range */
+#define CLAMP(val, minval, maxval) \
+ max((minval), min((val), (maxval)))
+
/*
* Configuration items. These are for the protocol module (proto_config())
@@ -783,7 +798,7 @@ typedef struct mon_data mon_entry;
struct mon_data {
mon_entry * hash_next; /* next structure in hash list */
DECL_DLIST_LINK(mon_entry, mru);/* MRU list link pointers */
- struct interface * lcladr; /* address on which this arrived */
+ endpt * lcladr; /* address on which this arrived */
l_fp first; /* first time seen */
l_fp last; /* last time seen */
int leak; /* leaky bucket accumulator */
@@ -804,7 +819,7 @@ struct mon_data {
#define MDF_POOL 0x08 /* pool client solicitor */
#define MDF_ACAST 0x10 /* manycast client solicitor */
#define MDF_BCLNT 0x20 /* eph. broadcast/multicast client */
-#define MDF_UCLNT 0x40 /* preemptible manycast or pool client */
+#define MDF_PCLNT 0x40 /* preemptible pool client */
/*
* In the context of struct peer in ntpd, three of the cast_flags bits
* represent configured associations which never receive packets, and
@@ -841,11 +856,10 @@ typedef struct restrict_u_tag restrict_u;
struct restrict_u_tag {
restrict_u * link; /* link to next entry */
u_int32 count; /* number of packets matched */
+ u_int32 expire; /* valid until current_time */
u_short rflags; /* restrict (accesslist) flags */
- u_short mflags; /* match flags */
- short ippeerlimit; /* IP peer limit */
- int srvfuzrftpoll; /* server response: fuzz reftime */
- u_long expire; /* valid until time */
+ u_int32 mflags; /* match flags */
+ short ippeerlimit; /* limit of associations matching */
union { /* variant starting here */
res_addr4 v4;
res_addr6 v6;
@@ -856,16 +870,13 @@ struct restrict_u_tag {
#define V6_SIZEOF_RESTRICT_U (offsetof(restrict_u, u) \
+ sizeof(res_addr6))
+/* restrictions for (4) a given address */
typedef struct r4addr_tag r4addr;
struct r4addr_tag {
u_short rflags; /* match flags */
short ippeerlimit; /* IP peer limit */
};
-char *build_iflags(u_int32 flags);
-char *build_mflags(u_short mflags);
-char *build_rflags(u_short rflags);
-
/*
* Restrict (Access) flags (rflags)
*/
@@ -876,10 +887,6 @@ char *build_rflags(u_short rflags);
#define RES_NOPEER 0x0010 /* new association denied */
#define RES_NOEPEER 0x0020 /* new ephemeral association denied */
#define RES_LIMITED 0x0040 /* packet rate exceeded */
-#define RES_FLAGS (RES_IGNORE | RES_DONTSERVE |\
- RES_DONTTRUST | RES_VERSION |\
- RES_NOPEER | RES_NOEPEER | RES_LIMITED)
-
#define RES_NOQUERY 0x0080 /* mode 6/7 packet denied */
#define RES_NOMODIFY 0x0100 /* mode 6/7 modify denied */
#define RES_NOTRAP 0x0200 /* mode 6/7 set trap denied */
@@ -894,7 +901,10 @@ char *build_rflags(u_short rflags);
#define RES_UNUSED 0x0000 /* Unused flag bits (none left) */
-#define RES_ALLFLAGS (RES_FLAGS | RES_NOQUERY | \
+#define RES_ALLFLAGS (RES_IGNORE | RES_DONTSERVE | \
+ RES_DONTTRUST | RES_VERSION | \
+ RES_NOPEER | RES_NOEPEER | \
+ RES_LIMITED | RES_NOQUERY | \
RES_NOMODIFY | RES_NOTRAP | \
RES_LPTRAP | RES_KOD | \
RES_MSSNTP | RES_FLAKE | \
@@ -948,4 +958,15 @@ struct endpoint {
#define MRU_ROW_LIMIT 256
/* similar datagrams per response limit for ntpd */
#define MRU_FRAGS_LIMIT 128
+
+/* found on POSIX systems in sysexit.h */
+#ifndef EX_SOFTWARE
+# define EX_SOFTWARE 70 /* internal software error */
+#endif
+
+#define BYTESWAP32(u32) \
+ (((u_int32)(u32) & 0xff000000) >> 24 | \
+ ((u_int32)(u32) & 0xff0000) >> 8 | \
+ ((u_int32)(u32) & 0xff00) << 8 | \
+ ((u_int32)(u32) & 0xff) << 24)
#endif /* NTP_H */
diff --git a/contrib/ntp/include/ntp_config.h b/contrib/ntp/include/ntp_config.h
index dbb64e3a2eee..2fce70945035 100644
--- a/contrib/ntp/include/ntp_config.h
+++ b/contrib/ntp/include/ntp_config.h
@@ -113,7 +113,9 @@ struct restrict_node_tag {
address_node * addr;
address_node * mask;
attr_val_fifo * flag_tok_fifo;
+ int/*BOOL*/ remove;
int line_no;
+ int column;
short ippeerlimit;
short srvfuzrft;
};
@@ -317,10 +319,13 @@ void destroy_attr_val(attr_val *node);
filegen_node *create_filegen_node(int filegen_token,
attr_val_fifo *options);
string_node *create_string_node(char *str);
-restrict_node *create_restrict_node(address_node *addr,
- address_node *mask,
- short ippeerlimit,
- attr_val_fifo *flags, int line_no);
+restrict_node *create_restrict_node(address_node * addr,
+ address_node * mask,
+ short ippeerlimit,
+ attr_val_fifo * flag_tok_fifo,
+ int/*BOOL*/ remove,
+ int nline,
+ int ncol);
int_node *create_int_node(int val);
addr_opts_node *create_addr_opts_node(address_node *addr,
attr_val_fifo *options);
diff --git a/contrib/ntp/include/ntp_control.h b/contrib/ntp/include/ntp_control.h
index 2fe0f30bbd78..91b85aa52df4 100644
--- a/contrib/ntp/include/ntp_control.h
+++ b/contrib/ntp/include/ntp_control.h
@@ -159,7 +159,7 @@ struct ntp_control {
*/
struct ctl_trap {
sockaddr_u tr_addr; /* address of trap recipient */
- struct interface *tr_localaddr; /* interface to send this through */
+ endpt *tr_localaddr; /* interface to send this through */
u_long tr_settime; /* time trap was set */
u_long tr_count; /* async messages sent to this guy */
u_long tr_origtime; /* time trap was originally set */
diff --git a/contrib/ntp/include/ntp_lists.h b/contrib/ntp/include/ntp_lists.h
index d741974943ef..bed692ff294e 100644
--- a/contrib/ntp/include/ntp_lists.h
+++ b/contrib/ntp/include/ntp_lists.h
@@ -181,7 +181,7 @@ do { \
#define UNLINK_EXPR_SLIST(punlinked, listhead, expr, nextlink, \
entrytype) \
-do { \
+if (NULL != (listhead)) { \
entrytype **ppentry; \
\
ppentry = &(listhead); \
@@ -202,6 +202,8 @@ do { \
} else { \
(punlinked) = NULL; \
} \
+} else do { \
+ (punlinked) = NULL; \
} while (FALSE)
#define UNLINK_SLIST(punlinked, listhead, ptounlink, nextlink, \
diff --git a/contrib/ntp/include/ntp_md5.h b/contrib/ntp/include/ntp_md5.h
index 8b5a7d0cbb49..22caff350cd9 100644
--- a/contrib/ntp/include/ntp_md5.h
+++ b/contrib/ntp/include/ntp_md5.h
@@ -6,6 +6,18 @@
#ifndef NTP_MD5_H
#define NTP_MD5_H
+/* Use the system MD5 or fall back on libisc's */
+# if defined HAVE_MD5_H && defined HAVE_MD5INIT
+# include <md5.h>
+# else
+# include "isc/md5.h"
+ typedef isc_md5_t MD5_CTX;
+# define MD5_DIGEST_LENGTH ISC_MD5_DIGESTLENGTH
+# define MD5Init(c) isc_md5_init(c)
+# define MD5Update(c, p, s) isc_md5_update(c, (const void *)p, s)
+# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
+# endif
+
# define KEY_TYPE_MD5 NID_md5
#ifdef OPENSSL
@@ -20,20 +32,11 @@
/*
* Provide OpenSSL-alike MD5 API if we're not using OpenSSL
*/
-# if defined HAVE_MD5_H && defined HAVE_MD5INIT
-# include <md5.h>
-# else
-# include "isc/md5.h"
- typedef isc_md5_t MD5_CTX;
-# define MD5Init(c) isc_md5_init(c)
-# define MD5Update(c, p, s) isc_md5_update(c, p, s)
-# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
-# endif
typedef MD5_CTX EVP_MD_CTX;
# define NID_md5 4 /* from openssl/objects.h */
-# define EVP_MAX_MD_SIZE 64 /* from openssl/evp.h */
+# define EVP_MAX_MD_SIZE MD5_DIGEST_LENGTH
# define EVP_MD_CTX_free(c) free(c)
# define EVP_MD_CTX_new() calloc(1, sizeof(MD5_CTX))
# define EVP_get_digestbynid(t) NULL
@@ -47,7 +50,7 @@
# define EVP_DigestFinal(c, d, pdl) \
do { \
MD5Final((d), (c)); \
- *(pdl) = 16; \
+ *(pdl) = MD5_LENGTH; \
} while (0)
# endif /* !OPENSSL */
#endif /* NTP_MD5_H */
diff --git a/contrib/ntp/include/ntp_net.h b/contrib/ntp/include/ntp_net.h
index 0577402bfb2c..09cc7f65f97b 100644
--- a/contrib/ntp/include/ntp_net.h
+++ b/contrib/ntp/include/ntp_net.h
@@ -195,7 +195,7 @@ typedef union {
#define SOCK_UNSPEC_S(psau) \
(SOCK_UNSPEC(psau) && !SCOPE(psau))
-/* choose a default net interface (struct interface) for v4 or v6 */
+/* choose a default net interface (endpt) for v4 or v6 */
#define ANY_INTERFACE_BYFAM(family) \
((AF_INET == family) \
? any_interface \
@@ -227,6 +227,12 @@ typedef union {
*/
#define LOOPBACKADR 0x7f000001
#define LOOPNETMASK 0xff000000
+#ifdef WORDS_BIGENDIAN
+# define LOOPBACKADR_N LOOPBACKADR
+#else
+# define LOOPBACKADR_N 0x0100007f
+#endif
+
#define ISBADADR(srcadr) \
(IS_IPV4(srcadr) \
@@ -234,5 +240,10 @@ typedef union {
== (LOOPBACKADR & LOOPNETMASK)) \
&& SRCADR(srcadr) != LOOPBACKADR)
+#define IS_LOOPBACK_ADDR(psau) \
+ (IS_IPV4(psau) \
+ ? LOOPBACKADR == SRCADR(psau) \
+ : IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(psau)) \
+ )
#endif /* NTP_NET_H */
diff --git a/contrib/ntp/include/ntp_psl.h b/contrib/ntp/include/ntp_psl.h
index a0c2662d44c7..c3a6846f90d0 100644
--- a/contrib/ntp/include/ntp_psl.h
+++ b/contrib/ntp/include/ntp_psl.h
@@ -4,12 +4,15 @@
/*
* Poll Skew List Item
+ * u_in32 is large enough for sub and qty so long as NTP_MAXPOLL < 31
*/
-
+#if NTP_MAXPOLL >= 31
+#include "psl_item structure needs larger type"
+#endif
typedef struct psl_item_tag {
- int sub; /* int or short? unsigned is OK, but why? */
- int qty; /* int or short? unsigned is OK, but why? */
- int msk; /* int or short? unsigned is OK */
+ u_int32 sub;
+ u_int32 qty;
+ u_int32 msk;
} psl_item;
int get_pollskew(int, psl_item *);
diff --git a/contrib/ntp/include/ntp_stdlib.h b/contrib/ntp/include/ntp_stdlib.h
index 446837e3adcb..6f667fbabed7 100644
--- a/contrib/ntp/include/ntp_stdlib.h
+++ b/contrib/ntp/include/ntp_stdlib.h
@@ -11,10 +11,12 @@
#include "declcond.h" /* ntpd uses ntpd/declcond.h, others include/ */
#include "l_stdlib.h"
+#include "lib_strbuf.h"
#include "ntp_md5.h"
#include "ntp_net.h"
#include "ntp_debug.h"
#include "ntp_malloc.h"
+#include "lib_strbuf.h"
#include "ntp_string.h"
#include "ntp_syslog.h"
#include "ntp_keyacc.h"
@@ -113,7 +115,7 @@ extern size_t MD5authencrypt (int type, const u_char *key, size_t klen,
extern int MD5authdecrypt (int type, const u_char *key, size_t klen,
u_int32 *pkt, size_t length, size_t size,
keyid_t keyno);
-extern u_int32 addr2refid(sockaddr_u *);
+extern u_int32 addr2refid (sockaddr_u *);
/* authkeys.c */
extern void MD5auth_setkey (keyid_t, int, const u_char *, size_t,
@@ -180,7 +182,6 @@ extern const char * k_st_flags (u_int32);
extern char * statustoa (int, int);
extern sockaddr_u * netof (sockaddr_u *);
extern char * numtoa (u_int32);
-extern char * numtohost (u_int32);
extern const char * socktoa (const sockaddr_u *);
extern const char * sockporttoa(const sockaddr_u *);
extern u_short sock_hash (const sockaddr_u *);
@@ -242,18 +243,21 @@ extern pset_tod_using set_tod_using;
#ifdef OPENSSL
extern void ssl_init (void);
extern void ssl_check_version (void);
-extern int ssl_init_done;
+extern EVP_MD_CTX* digest_ctx; /* also ssl_init_done */
#define INIT_SSL() \
do { \
- if (!ssl_init_done) \
+ if (NULL == digest_ctx) { \
ssl_init(); \
- } while (0)
+ } \
+ } while (FALSE)
#else /* !OPENSSL follows */
+#define ssl_check_version() do {} while (0)
#define INIT_SSL() do {} while (0)
#endif
-extern int keytype_from_text (const char *, size_t *);
-extern const char *keytype_name (int);
-extern char * getpass_keytype (int);
+extern int keytype_from_text (const char *text,
+ size_t *pdigest_len);
+extern const char *keytype_name (int type);
+extern char * getpass_keytype (int type);
/* strl-obsd.c */
#ifndef HAVE_STRLCPY /* + */
diff --git a/contrib/ntp/include/ntp_tty.h b/contrib/ntp/include/ntp_tty.h
index 6dc48b6c71f1..56f75c115907 100644
--- a/contrib/ntp/include/ntp_tty.h
+++ b/contrib/ntp/include/ntp_tty.h
@@ -100,4 +100,9 @@ extern int ntp_tty_ioctl(int, u_int);
# endif
#endif
+extern int symBaud2numBaud(int symBaud);
+# if 0
+extern int numBaud2symBaud(int numBaud);
+#endif
+
#endif /* NTP_TTY_H */
diff --git a/contrib/ntp/include/ntp_types.h b/contrib/ntp/include/ntp_types.h
index c3cf2c196521..6553f01b8a97 100644
--- a/contrib/ntp/include/ntp_types.h
+++ b/contrib/ntp/include/ntp_types.h
@@ -255,16 +255,6 @@ aligned_ptr(
}
/*
- * Macro to use in otherwise-empty source files to comply with ANSI C
- * requirement that each translation unit (source file) contain some
- * declaration. This has commonly been done by declaring an unused
- * global variable of type int or char. An extern reference to abs()
- * serves the same purpose without bloat. We once used exit() but
- * that can produce warnings on systems that declare exit() noreturn.
- */
-#define NONEMPTY_TRANSLATION_UNIT extern int abs(int);
-
-/*
* On Unix struct sock_timeval is equivalent to struct timeval.
* On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long
* as required by Windows' socket() interface timeout argument, while
diff --git a/contrib/ntp/include/ntpd.h b/contrib/ntp/include/ntpd.h
index ad3e30fbb889..7de19d72de5a 100644
--- a/contrib/ntp/include/ntpd.h
+++ b/contrib/ntp/include/ntpd.h
@@ -47,6 +47,17 @@
# define DPRINTF(lvl, arg) do {} while (0)
#endif
+/* clear bitflag only on DEBUG builds */
+#ifdef DEBUG
+# define CLEAR_BIT_IF_DEBUG(bit, flags) \
+ do { \
+ (flags) &= ~(bit); \
+ } while (FALSE)
+#else
+# define CLEAR_BIT_IF_DEBUG(bit, flags) \
+ do {} while (FALSE)
+#endif
+
/* nt_clockstuff.c */
#ifdef SYS_WINNT
@@ -60,15 +71,15 @@ extern char * saveconfigdir; /* ntpq saveconfig output directory */
extern void getconfig (int, char **);
extern void ctl_clr_stats (void);
-extern int ctlclrtrap (sockaddr_u *, struct interface *, int);
+extern int ctlclrtrap (sockaddr_u *, endpt *, int);
extern u_short ctlpeerstatus (struct peer *);
-extern int ctlsettrap (sockaddr_u *, struct interface *, int, int);
+extern int ctlsettrap (sockaddr_u *, endpt *, int, int);
extern u_short ctlsysstatus (void);
extern void init_control (void);
extern void process_control (struct recvbuf *, int);
extern void report_event (int, struct peer *, const char *);
-extern int mprintf_event (int, struct peer *, const char *, ...)
- NTP_PRINTF(3, 4);
+extern int mprintf_event (int evcode, struct peer *p,
+ const char *fmt, ...) NTP_PRINTF(3, 4);
/* ntp_control.c */
/*
@@ -118,7 +129,9 @@ extern void enable_broadcast (endpt *, sockaddr_u *);
extern void enable_multicast_if (endpt *, sockaddr_u *);
extern void interface_update (interface_receiver_t, void *);
#ifndef HAVE_IO_COMPLETION_PORT
-extern void io_handler (void);
+extern void io_handler (void);
+#else
+extern void WINAPI ip_interface_changed(ULONG_PTR ctx);
#endif
extern void init_io (void);
extern void io_open_sockets (void);
@@ -127,8 +140,10 @@ extern void io_setbclient (void);
extern void io_unsetbclient (void);
extern void io_multicast_add(sockaddr_u *);
extern void io_multicast_del(sockaddr_u *);
-extern void sendpkt (sockaddr_u *, struct interface *, int, struct pkt *, int);
-#ifdef DEBUG
+extern void sendpkt (sockaddr_u *dest, endpt * ep, int ttl,
+ struct pkt *pkt, int len);
+extern isc_boolean_t is_linklocal(sockaddr_u *psau);
+#ifdef DEBUG_TIMING
extern void collect_timing (struct recvbuf *, const char *, int, l_fp *);
#endif
#ifdef HAVE_SIGNALED_IO
@@ -141,8 +156,13 @@ extern void block_io_and_alarm (void);
# define UNBLOCK_IO_AND_ALARM() do {} while (0)
# define BLOCK_IO_AND_ALARM() do {} while (0)
#endif
-#define latoa(pif) localaddrtoa(pif)
+#define eptoa(pif) localaddrtoa(pif)
+#define latoa(pif) eptoa(pif)
extern const char * localaddrtoa(endpt *);
+#ifdef DEBUG
+extern const char * iflags_str(u_int32 iflags);
+#endif
+
/* ntp_loopfilter.c */
extern void init_loopfilter(void);
@@ -198,7 +218,7 @@ extern int crypto_xmit (struct peer *, struct pkt *,
struct exten *, keyid_t);
extern keyid_t session_key (sockaddr_u *, sockaddr_u *, keyid_t,
keyid_t, u_long);
-extern int make_keylist (struct peer *, struct interface *);
+extern int make_keylist (struct peer *, endpt *);
extern void key_expire (struct peer *);
extern void crypto_update (void);
extern void crypto_update_taichange(void);
@@ -226,7 +246,7 @@ extern void clock_select (void);
extern void set_sys_leap (u_char);
extern u_long leapsec; /* seconds to next leap (proximity class) */
-extern int leapdif; /* TAI difference step at next leap second*/
+extern int leapdif; /* TAI difference step at next leap second */
extern int sys_orphan;
extern double sys_mindisp;
extern double sys_maxdist;
@@ -258,18 +278,27 @@ extern void reset_auth_stats(void);
/* ntp_restrict.c */
extern void init_restrict (void);
extern void restrictions (sockaddr_u *, r4addr *);
-extern void hack_restrict (restrict_op, sockaddr_u *, sockaddr_u *,
- short, u_short, u_short, u_long);
-extern void restrict_source (sockaddr_u *, int, u_long);
+extern int/*BOOL*/hack_restrict(restrict_op op, sockaddr_u *resaddr,
+ sockaddr_u *resmask, short ippeerlimit,
+ u_short mflags, u_short rflags,
+ u_int32 expire);
+extern void restrict_source (sockaddr_u *addr, int/*BOOL*/ remove,
+ u_int32 lifetime);
+#ifdef DEBUG
extern void dump_restricts (void);
+extern const char *resop_str (restrict_op op);
+extern const char *rflags_str (u_short rflags);
+extern const char *mflags_str (u_short mflags);
+#endif
+
/* ntp_timer.c */
extern void init_timer (void);
extern void reinit_timer (void);
extern void timer (void);
extern void timer_clr_stats (void);
-extern void timer_interfacetimeout (u_long);
-extern volatile int interface_interval;
+extern int endpt_scan_period; /* -U option default 301s */
+extern u_long endpt_scan_timer; /* next scan current_time */
extern u_long orphwait; /* orphan wait time */
#ifdef AUTOKEY
extern char *sys_hostname; /* host name */
@@ -288,17 +317,29 @@ extern void record_proto_stats (char *);
extern void record_loop_stats (double, double, double, double, int);
extern void record_clock_stats (sockaddr_u *, const char *);
extern int mprintf_clock_stats(sockaddr_u *, const char *, ...)
- NTP_PRINTF(2, 3);
-extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, u_int32 refid, int len, u_char *extra);
+ NTP_PRINTF(2, 3);
+extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr,
+ l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4,
+ int leap, int version, int mode,
+ int stratum, int ppoll, int precision,
+ double root_delay, double root_dispersion,
+ u_int32 refid, int len, u_char *extra);
extern void check_leap_file (int is_daily_check, u_int32 ntptime, const time_t * systime);
extern void record_crypto_stats (sockaddr_u *, const char *);
#ifdef DEBUG
extern void record_timing_stats (const char *);
+extern void append_flagstr(char *flagstr, size_t sz, const char *text);
#endif
extern char * fstostr(time_t); /* NTP timescale seconds */
/* ntpd.c */
extern void parse_cmdline_opts(int *, char ***);
+
+/* ntservice.c */
+#ifndef SYS_WINNT
+# define ntservice_isup() do {} while (FALSE)
+#endif
+
/*
* Signals we catch for debugging.
*/
@@ -381,7 +422,10 @@ extern volatile u_long handler_pkts; /* number of pkts received by handler */
extern u_long io_timereset; /* time counters were reset */
/* ntp_io.c */
-extern int disable_dynamic_updates;
+extern int no_periodic_scan; /* no periodic net addr scans */
+extern int scan_addrs_once; /* no net addr rescans */
+extern int nonlocal_v4_addr_up; /* should we try IPv4 pool? */
+extern int nonlocal_v6_addr_up; /* should we try IPv6 pool? */
extern u_int sys_ifnum; /* next .ifnum to assign */
extern endpt * any_interface; /* IPv4 wildcard */
extern endpt * any6_interface; /* IPv6 wildcard */
diff --git a/contrib/ntp/include/vint64ops.h b/contrib/ntp/include/vint64ops.h
index 888d342781fb..50a8c4016264 100644
--- a/contrib/ntp/include/vint64ops.h
+++ b/contrib/ntp/include/vint64ops.h
@@ -23,6 +23,6 @@ extern vint64 subv64i32(const vint64 * lhs, int32_t rhs);
extern vint64 subv64u32(const vint64 * lhs, uint32_t rhs);
/* parsing. works like strtoul() or strtoull() */
-extern vint64 strtouv64(char const * begp, char const ** const endp, int base);
+extern vint64 strtouv64(char * begp, char ** endp, int base);
#endif /*!defined(VINT64OPS_H)*/
diff --git a/contrib/ntp/kernel/Makefile.in b/contrib/ntp/kernel/Makefile.in
index f0cf22e84381..40374fd18544 100644
--- a/contrib/ntp/kernel/Makefile.in
+++ b/contrib/ntp/kernel/Makefile.in
@@ -383,6 +383,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/kernel/sys/Makefile.in b/contrib/ntp/kernel/sys/Makefile.in
index 447e32e2cc8e..a09b0a1f39d4 100644
--- a/contrib/ntp/kernel/sys/Makefile.in
+++ b/contrib/ntp/kernel/sys/Makefile.in
@@ -344,6 +344,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/libntp/Makefile.am b/contrib/ntp/libntp/Makefile.am
index 99ce273d4cd1..85ac6e3f9b92 100644
--- a/contrib/ntp/libntp/Makefile.am
+++ b/contrib/ntp/libntp/Makefile.am
@@ -192,7 +192,6 @@ libntp_a_SRCS = \
ntp_rfc2553.c \
ntp_worker.c \
numtoa.c \
- numtohost.c \
octtoint.c \
prettydate.c \
refidsmear.c \
diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in
index 75d6b2abf8bc..69805f7ddca2 100644
--- a/contrib/ntp/libntp/Makefile.in
+++ b/contrib/ntp/libntp/Makefile.in
@@ -175,12 +175,12 @@ am__libntp_a_SOURCES_DIST = systime.c a_md5encrypt.c adjtime.c \
mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \
ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
ntp_lineedit.c ntp_random.c ntp_realpath.c ntp_rfc2553.c \
- ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
- refidsmear.c recvbuff.c refnumtoa.c snprintf.c socket.c \
- socktoa.c socktohost.c ssl_init.c statestr.c strdup.c \
- strl_obsd.c syssignal.c timespecops.c timetoa.c timevalops.c \
- timexsup.c uglydate.c vint64ops.c work_fork.c work_thread.c \
- xsbprintf.c ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \
+ ntp_worker.c numtoa.c octtoint.c prettydate.c refidsmear.c \
+ recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+ socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+ syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \
+ uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \
+ ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \
lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \
lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \
lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \
@@ -238,15 +238,15 @@ am__objects_5 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
ntp_libopts.$(OBJEXT) ntp_lineedit.$(OBJEXT) \
ntp_random.$(OBJEXT) ntp_realpath.$(OBJEXT) \
ntp_rfc2553.$(OBJEXT) ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) \
- numtohost.$(OBJEXT) octtoint.$(OBJEXT) prettydate.$(OBJEXT) \
- refidsmear.$(OBJEXT) recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) \
- snprintf.$(OBJEXT) socket.$(OBJEXT) socktoa.$(OBJEXT) \
- socktohost.$(OBJEXT) ssl_init.$(OBJEXT) statestr.$(OBJEXT) \
- strdup.$(OBJEXT) strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) \
- timespecops.$(OBJEXT) timetoa.$(OBJEXT) timevalops.$(OBJEXT) \
- timexsup.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \
- work_fork.$(OBJEXT) work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) \
- ymd2yd.$(OBJEXT) $(am__objects_4) $(am__objects_1)
+ octtoint.$(OBJEXT) prettydate.$(OBJEXT) refidsmear.$(OBJEXT) \
+ recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) snprintf.$(OBJEXT) \
+ socket.$(OBJEXT) socktoa.$(OBJEXT) socktohost.$(OBJEXT) \
+ ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \
+ strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timespecops.$(OBJEXT) \
+ timetoa.$(OBJEXT) timevalops.$(OBJEXT) timexsup.$(OBJEXT) \
+ uglydate.$(OBJEXT) vint64ops.$(OBJEXT) work_fork.$(OBJEXT) \
+ work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) ymd2yd.$(OBJEXT) \
+ $(am__objects_4) $(am__objects_1)
am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_5)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
libntpsim_a_AR = $(AR) $(ARFLAGS)
@@ -261,12 +261,12 @@ am__libntpsim_a_SOURCES_DIST = systime_s.c a_md5encrypt.c adjtime.c \
mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \
ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
ntp_lineedit.c ntp_random.c ntp_realpath.c ntp_rfc2553.c \
- ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
- refidsmear.c recvbuff.c refnumtoa.c snprintf.c socket.c \
- socktoa.c socktohost.c ssl_init.c statestr.c strdup.c \
- strl_obsd.c syssignal.c timespecops.c timetoa.c timevalops.c \
- timexsup.c uglydate.c vint64ops.c work_fork.c work_thread.c \
- xsbprintf.c ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \
+ ntp_worker.c numtoa.c octtoint.c prettydate.c refidsmear.c \
+ recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+ socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+ syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \
+ uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \
+ ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \
lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \
lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \
lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \
@@ -321,21 +321,20 @@ am__depfiles_remade = ./$(DEPDIR)/a_md5encrypt.Po \
./$(DEPDIR)/ntp_libopts.Po ./$(DEPDIR)/ntp_lineedit.Po \
./$(DEPDIR)/ntp_random.Po ./$(DEPDIR)/ntp_realpath.Po \
./$(DEPDIR)/ntp_rfc2553.Po ./$(DEPDIR)/ntp_worker.Po \
- ./$(DEPDIR)/numtoa.Po ./$(DEPDIR)/numtohost.Po \
- ./$(DEPDIR)/octtoint.Po ./$(DEPDIR)/prettydate.Po \
- ./$(DEPDIR)/recvbuff.Po ./$(DEPDIR)/refidsmear.Po \
- ./$(DEPDIR)/refnumtoa.Po ./$(DEPDIR)/snprintf.Po \
- ./$(DEPDIR)/socket.Po ./$(DEPDIR)/socktoa.Po \
- ./$(DEPDIR)/socktohost.Po ./$(DEPDIR)/ssl_init.Po \
- ./$(DEPDIR)/statestr.Po ./$(DEPDIR)/strdup.Po \
- ./$(DEPDIR)/strl_obsd.Po ./$(DEPDIR)/syssignal.Po \
- ./$(DEPDIR)/systime.Po ./$(DEPDIR)/systime_s.Po \
- ./$(DEPDIR)/timespecops.Po ./$(DEPDIR)/timetoa.Po \
- ./$(DEPDIR)/timevalops.Po ./$(DEPDIR)/timexsup.Po \
- ./$(DEPDIR)/uglydate.Po ./$(DEPDIR)/vint64ops.Po \
- ./$(DEPDIR)/work_fork.Po ./$(DEPDIR)/work_thread.Po \
- ./$(DEPDIR)/xsbprintf.Po ./$(DEPDIR)/ymd2yd.Po \
- lib/isc/$(DEPDIR)/assertions.Po \
+ ./$(DEPDIR)/numtoa.Po ./$(DEPDIR)/octtoint.Po \
+ ./$(DEPDIR)/prettydate.Po ./$(DEPDIR)/recvbuff.Po \
+ ./$(DEPDIR)/refidsmear.Po ./$(DEPDIR)/refnumtoa.Po \
+ ./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/socket.Po \
+ ./$(DEPDIR)/socktoa.Po ./$(DEPDIR)/socktohost.Po \
+ ./$(DEPDIR)/ssl_init.Po ./$(DEPDIR)/statestr.Po \
+ ./$(DEPDIR)/strdup.Po ./$(DEPDIR)/strl_obsd.Po \
+ ./$(DEPDIR)/syssignal.Po ./$(DEPDIR)/systime.Po \
+ ./$(DEPDIR)/systime_s.Po ./$(DEPDIR)/timespecops.Po \
+ ./$(DEPDIR)/timetoa.Po ./$(DEPDIR)/timevalops.Po \
+ ./$(DEPDIR)/timexsup.Po ./$(DEPDIR)/uglydate.Po \
+ ./$(DEPDIR)/vint64ops.Po ./$(DEPDIR)/work_fork.Po \
+ ./$(DEPDIR)/work_thread.Po ./$(DEPDIR)/xsbprintf.Po \
+ ./$(DEPDIR)/ymd2yd.Po lib/isc/$(DEPDIR)/assertions.Po \
lib/isc/$(DEPDIR)/backtrace-emptytbl.Po \
lib/isc/$(DEPDIR)/backtrace.Po lib/isc/$(DEPDIR)/buffer.Po \
lib/isc/$(DEPDIR)/error.Po lib/isc/$(DEPDIR)/event.Po \
@@ -581,6 +580,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -822,7 +822,6 @@ libntp_a_SRCS = \
ntp_rfc2553.c \
ntp_worker.c \
numtoa.c \
- numtohost.c \
octtoint.c \
prettydate.c \
refidsmear.c \
@@ -1093,7 +1092,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_rfc2553.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_worker.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@ # am--include-marker
@@ -1380,7 +1378,6 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/ntp_rfc2553.Po
-rm -f ./$(DEPDIR)/ntp_worker.Po
-rm -f ./$(DEPDIR)/numtoa.Po
- -rm -f ./$(DEPDIR)/numtohost.Po
-rm -f ./$(DEPDIR)/octtoint.Po
-rm -f ./$(DEPDIR)/prettydate.Po
-rm -f ./$(DEPDIR)/recvbuff.Po
@@ -1535,7 +1532,6 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/ntp_rfc2553.Po
-rm -f ./$(DEPDIR)/ntp_worker.Po
-rm -f ./$(DEPDIR)/numtoa.Po
- -rm -f ./$(DEPDIR)/numtohost.Po
-rm -f ./$(DEPDIR)/octtoint.Po
-rm -f ./$(DEPDIR)/prettydate.Po
-rm -f ./$(DEPDIR)/recvbuff.Po
diff --git a/contrib/ntp/libntp/a_md5encrypt.c b/contrib/ntp/libntp/a_md5encrypt.c
index 7a372969123f..a571405a5d87 100644
--- a/contrib/ntp/libntp/a_md5encrypt.c
+++ b/contrib/ntp/libntp/a_md5encrypt.c
@@ -21,7 +21,6 @@ typedef struct {
size_t len;
} rwbuffT;
-
#if defined(OPENSSL) && defined(ENABLE_CMAC)
static size_t
cmac_ctx_size(
@@ -40,6 +39,37 @@ cmac_ctx_size(
#endif /* OPENSSL && ENABLE_CMAC */
+/*
+ * Allocate and initialize a digest context. As a speed optimization,
+ * take an idea from ntpsec and cache the context to avoid malloc/free
+ * overhead in time-critical paths. ntpsec also caches the algorithms
+ * with each key.
+ * This is not thread-safe, but that is
+ * not a problem at present.
+ */
+static EVP_MD_CTX *
+get_md_ctx(
+ int nid
+ )
+{
+#ifndef OPENSSL
+ static MD5_CTX md5_ctx;
+
+ DEBUG_INSIST(NID_md5 == nid);
+ MD5Init(&md5_ctx);
+
+ return &md5_ctx;
+#else
+ if (!EVP_DigestInit(digest_ctx, EVP_get_digestbynid(nid))) {
+ msyslog(LOG_ERR, "%s init failed", OBJ_nid2sn(nid));
+ return NULL;
+ }
+
+ return digest_ctx;
+#endif /* OPENSSL */
+}
+
+
static size_t
make_mac(
const rwbuffT * digest,
@@ -99,26 +129,13 @@ make_mac(
CMAC_CTX_free(ctx);
}
else
-# endif /*ENABLE_CMAC*/
+# endif /* ENABLE_CMAC */
{ /* generic MAC handling */
- EVP_MD_CTX * ctx = EVP_MD_CTX_new();
+ EVP_MD_CTX * ctx;
u_int uilen = 0;
- if ( ! ctx) {
- msyslog(LOG_ERR, "MAC encrypt: MAC %s Digest CTX new failed.",
- OBJ_nid2sn(ktype));
- goto mac_fail;
- }
-
- #ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW
- /* make sure MD5 is allowd */
- EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
- #endif
- /* [Bug 3457] DON'T use plain EVP_DigestInit! It would
- * kill the flags! */
- if (!EVP_DigestInit_ex(ctx, EVP_get_digestbynid(ktype), NULL)) {
- msyslog(LOG_ERR, "MAC encrypt: MAC %s Digest Init failed.",
- OBJ_nid2sn(ktype));
+ ctx = get_md_ctx(ktype);
+ if (NULL == ctx) {
goto mac_fail;
}
if ((size_t)EVP_MD_CTX_size(ctx) > digest->len) {
@@ -143,39 +160,25 @@ make_mac(
}
mac_fail:
retlen = (size_t)uilen;
-
- if (ctx)
- EVP_MD_CTX_free(ctx);
}
#else /* !OPENSSL follows */
- if (ktype == NID_md5)
- {
- EVP_MD_CTX * ctx = EVP_MD_CTX_new();
- u_int uilen = 0;
+ if (NID_md5 == ktype) {
+ EVP_MD_CTX * ctx;
- if (digest->len < 16) {
+ ctx = get_md_ctx(ktype);
+ if (digest->len < MD5_LENGTH) {
msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 buf too small.");
+ } else {
+ MD5Init(ctx);
+ MD5Update(ctx, (const void *)key->buf, key->len);
+ MD5Update(ctx, (const void *)msg->buf, msg->len);
+ MD5Final(digest->buf, ctx);
+ retlen = MD5_LENGTH;
}
- else if ( ! ctx) {
- msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 Digest CTX new failed.");
- }
- else if (!EVP_DigestInit(ctx, EVP_get_digestbynid(ktype))) {
- msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 Digest INIT failed.");
- }
- else {
- EVP_DigestUpdate(ctx, key->buf, key->len);
- EVP_DigestUpdate(ctx, msg->buf, msg->len);
- EVP_DigestFinal(ctx, digest->buf, &uilen);
- }
- if (ctx)
- EVP_MD_CTX_free(ctx);
- retlen = (size_t)uilen;
- }
- else
- {
- msyslog(LOG_ERR, "MAC encrypt: invalid key type %d" , ktype);
+ } else {
+ msyslog(LOG_ERR, "MAC encrypt: invalid key type %d", ktype);
}
#endif /* !OPENSSL */
@@ -187,7 +190,7 @@ make_mac(
/*
* MD5authencrypt - generate message digest
*
- * Returns length of MAC including key ID and digest.
+ * Returns 0 on failure or length of MAC including key ID.
*/
size_t
MD5authencrypt(
@@ -202,13 +205,14 @@ MD5authencrypt(
rwbuffT digb = { digest, sizeof(digest) };
robuffT keyb = { key, klen };
robuffT msgb = { pkt, length };
- size_t dlen = 0;
+ size_t dlen;
dlen = make_mac(&digb, type, &keyb, &msgb);
- /* If the MAC is longer than the MAX then truncate it. */
- if (dlen > MAX_MDG_LEN)
- dlen = MAX_MDG_LEN;
- memcpy((u_char *)pkt + length + KEY_MAC_LEN, digest, dlen);
+ if (0 == dlen) {
+ return 0;
+ }
+ memcpy((u_char *)pkt + length + KEY_MAC_LEN, digest,
+ min(dlen, MAX_MDG_LEN));
return (dlen + KEY_MAC_LEN);
}
@@ -236,15 +240,11 @@ MD5authdecrypt(
size_t dlen = 0;
dlen = make_mac(&digb, type, &keyb, &msgb);
-
- /* If the MAC is longer than the MAX then truncate it. */
- if (dlen > MAX_MDG_LEN)
- dlen = MAX_MDG_LEN;
- if (size != (size_t)dlen + KEY_MAC_LEN) {
+ if (0 == dlen || size != dlen + KEY_MAC_LEN) {
msyslog(LOG_ERR,
- "MAC decrypt: MAC length error: len=%u key=%d",
- (u_int)size, keyno);
- return (0);
+ "MAC decrypt: MAC length error: %u not %u for key %u",
+ (u_int)size, (u_int)(dlen + KEY_MAC_LEN), keyno);
+ return FALSE;
}
return !isc_tsmemcmp(digest,
(u_char *)pkt + length + KEY_MAC_LEN, dlen);
@@ -254,39 +254,36 @@ MD5authdecrypt(
* Calculate the reference id from the address. If it is an IPv4
* address, use it as is. If it is an IPv6 address, do a md5 on
* it and use the bottom 4 bytes.
- * The result is in network byte order.
+ * The result is in network byte order for IPv4 addreseses. For
+ * IPv6, ntpd long differed in the hash calculated on big-endian
+ * vs. little-endian because the first four bytes of the MD5 hash
+ * were used as a u_int32 without any byte swapping. This broke
+ * the refid-based loop detection between mixed-endian systems.
+ * In order to preserve behavior on the more-common little-endian
+ * systems, the hash is now byte-swapped on big-endian systems to
+ * match the little-endian hash. This is ugly but it seems better
+ * than changing the IPv6 refid calculation on the more-common
+ * systems.
+ * This is not thread safe, not a problem so far.
*/
u_int32
addr2refid(sockaddr_u *addr)
{
- u_char digest[EVP_MAX_MD_SIZE];
- u_int32 addr_refid;
- EVP_MD_CTX *ctx;
- u_int len;
+ static MD5_CTX md5_ctx;
+ union u_tag {
+ u_char digest[MD5_DIGEST_LENGTH];
+ u_int32 addr_refid;
+ } u;
- if (IS_IPV4(addr))
+ if (IS_IPV4(addr)) {
return (NSRCADR(addr));
-
- INIT_SSL();
-
- ctx = EVP_MD_CTX_new();
-# ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW
- /* MD5 is not used as a crypto hash here. */
- EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
-# endif
- /* [Bug 3457] DON'T use plain EVP_DigestInit! It would kill the
- * flags! */
- if (!EVP_DigestInit_ex(ctx, EVP_md5(), NULL)) {
- msyslog(LOG_ERR,
- "MD5 init failed");
- EVP_MD_CTX_free(ctx); /* pedantic... but safe */
- exit(1);
}
-
- EVP_DigestUpdate(ctx, (u_char *)PSOCK_ADDR6(addr),
- sizeof(struct in6_addr));
- EVP_DigestFinal(ctx, digest, &len);
- EVP_MD_CTX_free(ctx);
- memcpy(&addr_refid, digest, sizeof(addr_refid));
- return (addr_refid);
+ /* MD5 is not used for authentication here. */
+ MD5Init(&md5_ctx);
+ MD5Update(&md5_ctx, (void *)&SOCK_ADDR6(addr), sizeof(SOCK_ADDR6(addr)));
+ MD5Final(u.digest, &md5_ctx);
+#ifdef WORDS_BIGENDIAN
+ u.addr_refid = BYTESWAP32(u.addr_refid);
+#endif
+ return u.addr_refid;
}
diff --git a/contrib/ntp/libntp/adjtime.c b/contrib/ntp/libntp/adjtime.c
index b536cc555d9a..57accd68642d 100644
--- a/contrib/ntp/libntp/adjtime.c
+++ b/contrib/ntp/libntp/adjtime.c
@@ -381,6 +381,6 @@ adjtime (struct timeval *delta, struct timeval *olddelta)
return 0;
}
# else /* no special adjtime() needed */
-int adjtime_bs;
+NONEMPTY_TRANSLATION_UNIT
# endif
#endif
diff --git a/contrib/ntp/libntp/audio.c b/contrib/ntp/libntp/audio.c
index f404cc078bdc..2cbae7a30a11 100644
--- a/contrib/ntp/libntp/audio.c
+++ b/contrib/ntp/libntp/audio.c
@@ -517,5 +517,5 @@ audio_show(void)
#endif /* not PCM_STYLE_SOUND */
}
#else
-int audio_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* HAVE_{SYS_AUDIOIO,SUN_AUDIOIO,MACHINE_SOUNDCARD,SYS_SOUNDCARD}_H */
diff --git a/contrib/ntp/libntp/authkeys.c b/contrib/ntp/libntp/authkeys.c
index d28b4b932b84..29671ac922bb 100644
--- a/contrib/ntp/libntp/authkeys.c
+++ b/contrib/ntp/libntp/authkeys.c
@@ -611,6 +611,9 @@ authhavekey(
/*
* The key is found and trusted. Initialize the key cache.
+ * The cache really should be a struct savekey to streamline
+ * this code. Using a sk pointer would be even faster but more
+ * fragile around pointing to freed memory.
*/
cache_keyid = sk->keyid;
cache_type = sk->type;
@@ -927,6 +930,7 @@ authdecrypt(
pkt, length, size, keyno);
}
+
/* password decoding helpers */
static size_t
pwdecode_plain(
diff --git a/contrib/ntp/libntp/authreadkeys.c b/contrib/ntp/libntp/authreadkeys.c
index fa2f5b540de4..e4aee723d33a 100644
--- a/contrib/ntp/libntp/authreadkeys.c
+++ b/contrib/ntp/libntp/authreadkeys.c
@@ -218,14 +218,14 @@ authreadkeys(
keytype = keytype_from_text(token, NULL);
if (keytype == 0) {
log_maybe(NULL,
- "authreadkeys: invalid type for key %d",
- keyno);
+ "authreadkeys: unsupported type %s for key %d",
+ token, keyno);
# ifdef ENABLE_CMAC
} else if (NID_cmac != keytype &&
EVP_get_digestbynid(keytype) == NULL) {
log_maybe(NULL,
- "authreadkeys: no algorithm for key %d",
- keyno);
+ "authreadkeys: no algorithm for %s key %d",
+ token, keyno);
keytype = 0;
# endif /* ENABLE_CMAC */
}
@@ -270,11 +270,13 @@ authreadkeys(
"authreadkeys: passwd has bad char for key %d",
keyno);
break;
+#ifdef DEBUG
default:
log_maybe(&nerr,
- "authreadkeys: unknown errno %d for key %d",
+ "authreadkeys: unexpected errno %d for key %d: %m",
errno, keyno);
break;
+#endif
}
continue;
}
diff --git a/contrib/ntp/libntp/bsd_strerror.c b/contrib/ntp/libntp/bsd_strerror.c
index 5ace9aa48542..23888a2d1437 100644
--- a/contrib/ntp/libntp/bsd_strerror.c
+++ b/contrib/ntp/libntp/bsd_strerror.c
@@ -45,5 +45,5 @@ strerror(
return ebuf;
}
#else
-int strerror_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif
diff --git a/contrib/ntp/libntp/clocktypes.c b/contrib/ntp/libntp/clocktypes.c
index de7f6b4f3854..1b44546ee172 100644
--- a/contrib/ntp/libntp/clocktypes.c
+++ b/contrib/ntp/libntp/clocktypes.c
@@ -6,7 +6,6 @@
#include "ntp_fp.h"
#include "ntp.h"
-#include "lib_strbuf.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
diff --git a/contrib/ntp/libntp/dofptoa.c b/contrib/ntp/libntp/dofptoa.c
index c21d1455e7f0..a3f7c9e710dd 100644
--- a/contrib/ntp/libntp/dofptoa.c
+++ b/contrib/ntp/libntp/dofptoa.c
@@ -5,8 +5,6 @@
#include <stdio.h>
#include "ntp_fp.h"
-#include "lib_strbuf.h"
-#include "ntp_string.h"
#include "ntp_stdlib.h"
char *
diff --git a/contrib/ntp/libntp/dolfptoa.c b/contrib/ntp/libntp/dolfptoa.c
index 00e1faf793bc..2fa3cc5502d6 100644
--- a/contrib/ntp/libntp/dolfptoa.c
+++ b/contrib/ntp/libntp/dolfptoa.c
@@ -5,8 +5,6 @@
#include <stdio.h>
#include "ntp_fp.h"
-#include "lib_strbuf.h"
-#include "ntp_string.h"
#include "ntp_stdlib.h"
char *
diff --git a/contrib/ntp/libntp/humandate.c b/contrib/ntp/libntp/humandate.c
index d9d5e89df017..94b3e6023e17 100644
--- a/contrib/ntp/libntp/humandate.c
+++ b/contrib/ntp/libntp/humandate.c
@@ -6,7 +6,6 @@
#include "ntp_fp.h"
#include "ntp_unixtime.h" /* includes <sys/time.h> and <time.h> */
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
diff --git a/contrib/ntp/libntp/lib/isc/win32/strerror.c b/contrib/ntp/libntp/lib/isc/win32/strerror.c
index 40c5da002f8c..21bdad97778e 100644
--- a/contrib/ntp/libntp/lib/isc/win32/strerror.c
+++ b/contrib/ntp/libntp/lib/isc/win32/strerror.c
@@ -29,6 +29,8 @@
#include <isc/strerror.h>
#include <isc/util.h>
+#include "lib_strbuf.h"
+
/*
* Forward declarations
*/
@@ -88,19 +90,47 @@ isc__strerror(int num, char *buf, size_t size) {
*/
char *
FormatError(int error) {
- LPVOID lpMsgBuf = NULL;
+ char *lpMsgBuf = NULL;
+ char *pch;
+ const char boiler[] =
+ " For information about network troubleshooting, see Windows Help.";
+ size_t last;
+
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
+ (FORMAT_MESSAGE_MAX_WIDTH_MASK - 1),
NULL,
error,
/* Default language */
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &lpMsgBuf,
+ (LPTSTR)(PVOID)&lpMsgBuf,
0,
NULL);
+ /* remove useless boilerplate */
+ pch = strstr(lpMsgBuf, boiler);
+ if (pch != NULL) {
+ *pch = '\0';
+ }
+
+ /* strip any trailing CR/LF and spaces */
+ if (lpMsgBuf != NULL) {
+ last = strlen(lpMsgBuf);
+ if (last > 0) {
+ --last;
+ }
+ while ('\n' == lpMsgBuf[last] ||
+ '\r' == lpMsgBuf[last] ||
+ ' ' == lpMsgBuf[last]) {
+
+ lpMsgBuf[last] = '\0';
+ if (last > 0) {
+ --last;
+ }
+ }
+ }
+
return (lpMsgBuf);
}
@@ -113,27 +143,31 @@ char *
NTstrerror(int err, BOOL *bfreebuf) {
char *retmsg = NULL;
- /* Copy the error value first in case of other errors */
- DWORD errval = err;
-
*bfreebuf = FALSE;
/* Get the Winsock2 error messages */
- if (errval >= WSABASEERR && errval <= (WSABASEERR + 1999)) {
- retmsg = GetWSAErrorMessage(errval);
- if (retmsg != NULL)
- return (retmsg);
+ /* DLH this may not be needed, FormatError/FormatMessage may handle Winsock error codes */
+ if (err >= WSABASEERR && err <= (WSABASEERR + 1999)) {
+ retmsg = GetWSAErrorMessage(err);
}
/*
* If it's not one of the standard Unix error codes,
* try a system error message
*/
- if (errval > (DWORD) _sys_nerr) {
- *bfreebuf = TRUE;
- return (FormatError(errval));
- } else {
- return (strerror(errval));
+ if (NULL == retmsg) {
+ if (err > _sys_nerr) {
+ *bfreebuf = TRUE;
+ retmsg = FormatError(err);
+ } else {
+ retmsg = lib_getbuf();
+ if (0 != strerror_s(retmsg, LIB_BUFLENGTH, err)) {
+ snprintf(retmsg, LIB_BUFLENGTH,
+ "Unknown error number %d/0x%x",
+ err, err);
+ }
+ }
}
+ return retmsg;
}
/*
diff --git a/contrib/ntp/libntp/lib_strbuf.c b/contrib/ntp/libntp/lib_strbuf.c
index 76f70163de98..225c430f7e02 100644
--- a/contrib/ntp/libntp/lib_strbuf.c
+++ b/contrib/ntp/libntp/lib_strbuf.c
@@ -1,10 +1,11 @@
/*
- * lib_strbuf - library string storage
+ * lib_strbuf.c - init_lib() and library string storage
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <isc/mutex.h>
#include <isc/net.h>
#include <isc/result.h>
@@ -12,17 +13,18 @@
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
+#define LIB_NUMBUF 10
/*
* Storage declarations
*/
-int debug;
-libbufstr lib_stringbuf[LIB_NUMBUF];
-int lib_nextbuf;
-int ipv4_works;
-int ipv6_works;
-int lib_inited;
-
+static char lib_stringbuf_storage[LIB_NUMBUF][LIB_BUFLENGTH];
+static char * lib_stringbuf[LIB_NUMBUF];
+int lib_inited;
+static isc_mutex_t lib_mutex;
+int ipv4_works;
+int ipv6_works;
+int debug;
/*
* initialization routine. Might be needed if the code is ROMized.
@@ -30,10 +32,41 @@ int lib_inited;
void
init_lib(void)
{
- if (lib_inited)
+ u_int u;
+
+ if (lib_inited) {
return;
+ }
ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
init_systime();
+ /*
+ * Avoid -Wrestrict warnings by keeping a pointer to each buffer
+ * so the compiler can see copying from one buffer to another is
+ * not violating restrict qualifiers on, e.g. memcpy() args.
+ */
+ for (u = 0; u < COUNTOF(lib_stringbuf); u++) {
+ lib_stringbuf[u] = lib_stringbuf_storage[u];
+ }
+ isc_mutex_init(&lib_mutex);
lib_inited = TRUE;
}
+
+
+char *
+lib_getbuf(void)
+{
+ static int lib_nextbuf;
+ int mybuf;
+
+ if (!lib_inited) {
+ init_lib();
+ }
+ isc_mutex_lock(&lib_mutex);
+ mybuf = lib_nextbuf;
+ lib_nextbuf = (1 + mybuf) % COUNTOF(lib_stringbuf);
+ isc_mutex_unlock(&lib_mutex);
+ zero_mem(lib_stringbuf[mybuf], LIB_BUFLENGTH);
+
+ return lib_stringbuf[mybuf];
+} \ No newline at end of file
diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c
index 7a29ac07ea5f..163abf15c6db 100644
--- a/contrib/ntp/libntp/machines.c
+++ b/contrib/ntp/libntp/machines.c
@@ -13,17 +13,16 @@
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
-#include "lib_strbuf.h"
#include "ntp_debug.h"
+#include "ntp_tty.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef SYS_WINNT
-int _getch(void); /* Declare the one function rather than include conio.h */
+#include <conio.h>
#else
-
#ifdef SYS_VXWORKS
#include "taskLib.h"
#include "sysLib.h"
@@ -531,3 +530,58 @@ getpass(const char * prompt)
return password;
}
#endif /* SYS_WINNT */
+
+
+static const int baudTable[][2] = {
+ {B0, 0},
+ {B50, 50},
+ {B75, 75},
+ {B110, 110},
+ {B134, 134},
+ {B150, 150},
+ {B200, 200},
+ {B300, 300},
+ {B600, 600},
+ {B1200, 1200},
+ {B1800, 1800},
+ {B2400, 2400},
+ {B4800, 4800},
+ {B9600, 9600},
+ {B19200, 19200},
+ {B38400, 38400},
+# ifdef B57600
+ {B57600, 57600 },
+# endif
+# ifdef B115200
+ {B115200, 115200},
+# endif
+ {-1, -1}
+};
+
+
+int symBaud2numBaud(int symBaud)
+{
+ int i;
+
+ for (i = 0; baudTable[i][1] >= 0; ++i) {
+ if (baudTable[i][0] == symBaud) {
+ break;
+ }
+ }
+ return baudTable[i][1];
+}
+
+
+#if 0 /* unused */
+int numBaud2symBaud(int numBaud)
+{
+ int i;
+
+ for (i = 0; baudTable[i][1] >= 0; ++i) {
+ if (baudTable[i][1] == numBaud) {
+ break;
+ }
+ }
+ return baudTable[i][0];
+}
+#endif /* unused fn */
diff --git a/contrib/ntp/libntp/modetoa.c b/contrib/ntp/libntp/modetoa.c
index 6f13d20580bf..de14c9edd34c 100644
--- a/contrib/ntp/libntp/modetoa.c
+++ b/contrib/ntp/libntp/modetoa.c
@@ -4,7 +4,6 @@
#include <config.h>
#include <stdio.h>
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
const char *
diff --git a/contrib/ntp/libntp/msyslog.c b/contrib/ntp/libntp/msyslog.c
index a1ba72792595..b72d5c8dc379 100644
--- a/contrib/ntp/libntp/msyslog.c
+++ b/contrib/ntp/libntp/msyslog.c
@@ -348,15 +348,14 @@ msyslog(
...
)
{
- char buf[1024];
va_list ap;
va_start(ap, fmt);
- mvsnprintf(buf, sizeof(buf), fmt, ap);
+ mvsyslog(level, fmt, ap);
va_end(ap);
- addto_syslog(level, buf);
}
+
void
mvsyslog(
int level,
@@ -365,6 +364,7 @@ mvsyslog(
)
{
char buf[1024];
+
mvsnprintf(buf, sizeof(buf), fmt, ap);
addto_syslog(level, buf);
}
diff --git a/contrib/ntp/libntp/netof.c b/contrib/ntp/libntp/netof.c
index c8831c3dd9cd..5f1e3662de78 100644
--- a/contrib/ntp/libntp/netof.c
+++ b/contrib/ntp/libntp/netof.c
@@ -1,5 +1,5 @@
/*
- * netof - return the net address part of an ip address in a sockaddr_storage structure
+ * netof - return the net address part of an ip address in a sockaddr_u structure
* (zero out host part)
*/
#include <config.h>
@@ -11,12 +11,19 @@
#include "ntp_stdlib.h"
#include "ntp.h"
+/*
+ * Return the network portion of a host address. Used by ntp_io.c
+ * findbcastinter() to find a multicast/broadcast interface for
+ * a given remote address. Note static storage is used, with room
+ * for only two addresses, which is all that is needed at present.
+ *
+ */
sockaddr_u *
netof(
sockaddr_u *hostaddr
)
{
- static sockaddr_u netofbuf[8];
+ static sockaddr_u netofbuf[2];
static int next_netofbuf;
u_int32 netnum;
sockaddr_u * netaddr;
@@ -27,20 +34,11 @@ netof(
memcpy(netaddr, hostaddr, sizeof(*netaddr));
if (IS_IPV4(netaddr)) {
- netnum = SRCADR(netaddr);
-
/*
- * We live in a modern CIDR world where the basement nets, which
- * used to be class A, are now probably associated with each
- * host address. So, for class-A nets, all bits are significant.
+ * We live in a modern classless IPv4 world. Assume /24.
*/
- if (IN_CLASSC(netnum))
- netnum &= IN_CLASSC_NET;
- else if (IN_CLASSB(netnum))
- netnum &= IN_CLASSB_NET;
-
+ netnum = SRCADR(netaddr) & IN_CLASSC_NET;
SET_ADDR4(netaddr, netnum);
-
} else if (IS_IPV6(netaddr))
/* assume the typical /64 subnet size */
zero_mem(&NSRCADR6(netaddr)[8], 8);
diff --git a/contrib/ntp/libntp/ntp_calendar.c b/contrib/ntp/libntp/ntp_calendar.c
index 9fc0b48229f2..b850a9db59b8 100644
--- a/contrib/ntp/libntp/ntp_calendar.c
+++ b/contrib/ntp/libntp/ntp_calendar.c
@@ -56,7 +56,6 @@
#include "ntp_unixtime.h"
#include "ntpd.h"
-#include "lib_strbuf.h"
/* For now, let's take the conservative approach: if the target property
* macros are not defined, check a few well-known compiler/architecture
diff --git a/contrib/ntp/libntp/ntp_intres.c b/contrib/ntp/libntp/ntp_intres.c
index 9fc3815ef007..29546147db8a 100644
--- a/contrib/ntp/libntp/ntp_intres.c
+++ b/contrib/ntp/libntp/ntp_intres.c
@@ -84,12 +84,6 @@
# include <netdb.h>
# endif
# include <resolv.h>
-# ifdef HAVE_INT32_ONLY_WITH_DNS
-# define HAVE_INT32
-# endif
-# ifdef HAVE_U_INT32_ONLY_WITH_DNS
-# define HAVE_U_INT32
-# endif
#endif
#include "ntp.h"
diff --git a/contrib/ntp/libntp/ntp_realpath.c b/contrib/ntp/libntp/ntp_realpath.c
index 116542945153..90e5a0d59e75 100644
--- a/contrib/ntp/libntp/ntp_realpath.c
+++ b/contrib/ntp/libntp/ntp_realpath.c
@@ -103,7 +103,7 @@ realpath1(const char *path, char *resolved)
size_t left_len, resolved_len, next_token_len;
unsigned symlinks;
ssize_t slen;
- char left[NTP_PATH_MAX], next_token[NTP_PATH_MAX], symlink[NTP_PATH_MAX];
+ char left[NTP_PATH_MAX], next_token[NTP_PATH_MAX], link_tgt[NTP_PATH_MAX];
symlinks = 0;
if (path[0] == '/') {
@@ -157,7 +157,7 @@ realpath1(const char *path, char *resolved)
resolved[resolved_len++] = '/';
resolved[resolved_len] = '\0';
}
- if (next_token[0] == '\0') {
+ if ('\0' == next_token[0]) {
/* Handle consequential slashes. */
continue;
} else if (strcmp(next_token, ".") == 0) {
@@ -187,23 +187,24 @@ realpath1(const char *path, char *resolved)
if (lstat(resolved, &sb) != 0)
return (NULL);
if (S_ISLNK(sb.st_mode)) {
- if (symlinks++ > NTP_MAXSYMLINKS) {
+ if (++symlinks > NTP_MAXSYMLINKS) {
errno = ELOOP;
return (NULL);
}
- slen = readlink(resolved, symlink, sizeof(symlink));
- if (slen <= 0 || slen >= (ssize_t)sizeof(symlink)) {
- if (slen < 0)
- ; /* keep errno from readlink(2) call */
- else if (slen == 0)
+ slen = readlink(resolved, link_tgt, sizeof(link_tgt));
+ if (slen <= 0 || slen >= (ssize_t)sizeof(link_tgt)) {
+ if (slen < 0) {
+ /* keep errno from readlink(2) call */
+ } else if (slen == 0) {
errno = ENOENT;
- else
+ } else {
errno = ENAMETOOLONG;
+ }
return (NULL);
}
- symlink[slen] = '\0';
- if (symlink[0] == '/') {
- resolved[1] = 0;
+ link_tgt[slen] = '\0';
+ if (link_tgt[0] == '/') {
+ resolved[1] = '\0';
resolved_len = 1;
} else {
/* Strip the last path component. */
@@ -214,26 +215,26 @@ realpath1(const char *path, char *resolved)
/*
* If there are any path components left, then
- * append them to symlink. The result is placed
+ * append them to link_tgt. The result is placed
* in `left'.
*/
if (p != NULL) {
- if (symlink[slen - 1] != '/') {
- if (slen + 1 >= (ssize_t)sizeof(symlink)) {
+ if (link_tgt[slen - 1] != '/') {
+ if (slen + 1 >= (ssize_t)sizeof(link_tgt)) {
errno = ENAMETOOLONG;
return (NULL);
}
- symlink[slen] = '/';
- symlink[slen + 1] = 0;
+ link_tgt[slen] = '/';
+ link_tgt[slen + 1] = 0;
}
- left_len = strlcat(symlink, left,
- sizeof(symlink));
- if (left_len >= sizeof(symlink)) {
+ left_len = strlcat(link_tgt, left,
+ sizeof(link_tgt));
+ if (left_len >= sizeof(link_tgt)) {
errno = ENAMETOOLONG;
return (NULL);
}
}
- left_len = strlcpy(left, symlink, sizeof(left));
+ left_len = strlcpy(left, link_tgt, sizeof(left));
} else if (!S_ISDIR(sb.st_mode) && p != NULL) {
errno = ENOTDIR;
return (NULL);
diff --git a/contrib/ntp/libntp/numtoa.c b/contrib/ntp/libntp/numtoa.c
index 51645de01c30..ac8978ee5e58 100644
--- a/contrib/ntp/libntp/numtoa.c
+++ b/contrib/ntp/libntp/numtoa.c
@@ -12,7 +12,6 @@
#include <ctype.h>
#include "ntp_fp.h"
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
char *
@@ -34,7 +33,11 @@ numtoa(
}
-/* Convert a refid & stratum to a string */
+/*
+ * Convert a refid & stratum to a string. If stratum is negative and the
+ * refid consists entirely of graphic chars, up to an optional
+ * terminating zero, display as text similar to stratum 0 & 1.
+ */
const char *
refid_str(
u_int32 refid,
@@ -43,33 +46,44 @@ refid_str(
{
char * text;
size_t tlen;
- char * cp;
-
- if (stratum > 1)
- return numtoa(refid);
-
- LIB_GETBUF(text);
- text[0] = '.';
- /* What if any non-NUL char is not printable? */
- memcpy(&text[1], &refid, sizeof(refid));
- text[1 + sizeof(refid)] = '\0';
- tlen = strlen(text);
- text[tlen] = '.';
- text[tlen + 1] = '\0';
+ char * cp;
+ int printable;
/*
- * Now make sure the contents are 'graphic'.
- *
- * This refid is expected to be up to 4 ascii graphics.
- * If any character is not a graphic, replace it with a space.
- * This will at least alert the viewer of a problem.
+ * ntpd can have stratum = 0 and refid 127.0.0.1 in orphan mode.
+ * https://bugs.ntp.org/3854. Mirror the refid logic in timer().
*/
- for (cp = text + 1; *cp; ++cp) {
- if (!isgraph((int)*cp)) {
- *cp = ' ';
+ if (0 == stratum && LOOPBACKADR_N == refid) {
+ return ".ORPH.";
+ }
+ printable = FALSE;
+ if (stratum < 2) {
+ text = lib_getbuf();
+ text[0] = '.';
+ memcpy(&text[1], &refid, sizeof(refid));
+ text[1 + sizeof(refid)] = '\0';
+ tlen = strlen(text);
+ text[tlen] = '.';
+ text[tlen + 1] = '\0';
+ /*
+ * Now make sure the contents are 'graphic'.
+ *
+ * This refid is expected to be up to 4 printable ASCII.
+ * isgraph() is similar to isprint() but excludes space.
+ * If any character is not graphic, replace it with a '?'.
+ * This will at least alert the viewer of a problem.
+ */
+ for (cp = text + 1; '\0' != *cp; ++cp) {
+ if (!isgraph((int)*cp)) {
+ printable = FALSE;
+ *cp = '?';
+ }
+ }
+ if ( (stratum < 0 && printable)
+ || stratum < 2) {
+ return text;
}
}
-
- return text;
+ return numtoa(refid);
}
diff --git a/contrib/ntp/libntp/numtohost.c b/contrib/ntp/libntp/numtohost.c
deleted file mode 100644
index 6b250d602de0..000000000000
--- a/contrib/ntp/libntp/numtohost.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * numtohost - convert network number to host name.
- */
-#include <config.h>
-
-#include <sys/types.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h> /* ntohl */
-#endif
-
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-#include "lib_strbuf.h"
-
-#define LOOPBACKNET 0x7f000000
-#define LOOPBACKHOST 0x7f000001
-#define LOOPBACKNETMASK 0xff000000
-
-char *
-numtohost(
- u_int32 netnum
- )
-{
- char *bp;
- struct hostent *hp;
-
- /*
- * This is really gross, but saves lots of hanging looking for
- * hostnames for the radio clocks. Don't bother looking up
- * addresses on the loopback network except for the loopback
- * host itself.
- */
- if ((((ntohl(netnum) & LOOPBACKNETMASK) == LOOPBACKNET)
- && (ntohl(netnum) != LOOPBACKHOST))
- || ((hp = gethostbyaddr((char *)&netnum, sizeof netnum, AF_INET))
- == 0))
- return numtoa(netnum);
-
- LIB_GETBUF(bp);
- strlcpy(bp, hp->h_name, LIB_BUFLENGTH);
-
- return bp;
-}
diff --git a/contrib/ntp/libntp/prettydate.c b/contrib/ntp/libntp/prettydate.c
index deacc26bbe2b..060f79e5e327 100644
--- a/contrib/ntp/libntp/prettydate.c
+++ b/contrib/ntp/libntp/prettydate.c
@@ -6,7 +6,6 @@
#include "ntp_fp.h"
#include "ntp_unixtime.h" /* includes <sys/time.h> */
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
#include "ntp_assert.h"
#include "ntp_calendar.h"
diff --git a/contrib/ntp/libntp/recvbuff.c b/contrib/ntp/libntp/recvbuff.c
index d84a87d68501..6e7cda5d373d 100644
--- a/contrib/ntp/libntp/recvbuff.c
+++ b/contrib/ntp/libntp/recvbuff.c
@@ -93,41 +93,54 @@ initialise_buffer(recvbuf_t *buff)
static void
create_buffers(
- size_t nbufs)
+ size_t nbufs
+)
{
+ static const u_int chunk =
# ifndef DEBUG
- static const u_int chunk = RECV_INC;
+ RECV_INC;
# else
/* Allocate each buffer individually so they can be free()d
* during ntpd shutdown on DEBUG builds to keep them out of heap
* leak reports.
*/
- static const u_int chunk = 1;
+ 1;
# endif
-
- register recvbuf_t *bufp;
- u_int i;
- size_t abuf;
+ static int/*BOOL*/ doneonce;
+ recvbuf_t * bufp;
+ u_int i;
+ size_t abuf;
/*[bug 3666]: followup -- reset shortfalls in all cases */
abuf = nbufs + buffer_shortfall;
buffer_shortfall = 0;
- if (limit_recvbufs <= total_recvbufs)
+ if (limit_recvbufs <= total_recvbufs) {
+ if (!doneonce) {
+ msyslog(LOG_CRIT, "Unable to allocate receive"
+ " buffer, %lu/%lu",
+ total_recvbufs, limit_recvbufs);
+ doneonce = TRUE;
+ }
return;
-
- if (abuf < nbufs || abuf > RECV_BATCH)
+ }
+
+ if (abuf < nbufs || abuf > RECV_BATCH) {
abuf = RECV_BATCH; /* clamp on overflow */
- else
+ } else {
abuf += (~abuf + 1) & (RECV_INC - 1); /* round up */
-
- if (abuf > (limit_recvbufs - total_recvbufs))
+ }
+ if (abuf > (limit_recvbufs - total_recvbufs)) {
abuf = limit_recvbufs - total_recvbufs;
+ }
abuf += (~abuf + 1) & (chunk - 1); /* round up */
while (abuf) {
bufp = calloc(chunk, sizeof(*bufp));
if (!bufp) {
+ msyslog(LOG_CRIT, "Out of memory, allocating "
+ "%u recvbufs, %lu bytes",
+ chunk, (u_long)sizeof(*bufp) * chunk);
limit_recvbufs = total_recvbufs;
break;
}
diff --git a/contrib/ntp/libntp/refnumtoa.c b/contrib/ntp/libntp/refnumtoa.c
index cfebefe1ed18..1e1aa4e06b4c 100644
--- a/contrib/ntp/libntp/refnumtoa.c
+++ b/contrib/ntp/libntp/refnumtoa.c
@@ -5,7 +5,6 @@
#include <stdio.h>
#include "ntp_net.h"
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
const char *
diff --git a/contrib/ntp/libntp/snprintf.c b/contrib/ntp/libntp/snprintf.c
index f4685e1ad4b6..52ec17a04eb2 100644
--- a/contrib/ntp/libntp/snprintf.c
+++ b/contrib/ntp/libntp/snprintf.c
@@ -1587,7 +1587,7 @@ rpl_asprintf(va_alist) va_dcl
}
#endif /* HW_WANT_RPL_ASPRINTF */
#else /* Dummy declaration to avoid empty translation unit warnings. */
-int main(void);
+NONEMPTY_TRANSLATION_UNIT
#endif /* HW_WANT_RPL_SNPRINTF || HW_WANT_RPL_VSNPRINTF || HW_WANT_RPL_ASPRINTF || [...] */
#if TEST_SNPRINTF
diff --git a/contrib/ntp/libntp/socket.c b/contrib/ntp/libntp/socket.c
index 11fb004690c4..08e6ffbebb6a 100644
--- a/contrib/ntp/libntp/socket.c
+++ b/contrib/ntp/libntp/socket.c
@@ -195,11 +195,11 @@ open_socket(
)
void
sendpkt(
- sockaddr_u * dest,
- struct interface * ep,
- int ttl,
- struct pkt * pkt,
- int len
+ sockaddr_u * dest,
+ endpt * ep,
+ int ttl,
+ struct pkt * pkt,
+ int len
)
static inline int
@@ -207,9 +207,9 @@ read_refclock_packet(SOCKET fd, struct refclockio *rp, l_fp ts)
static inline int
read_network_packet(
- SOCKET fd,
- struct interface * itf,
- l_fp ts
+ SOCKET fd,
+ endpt * itf,
+ l_fp ts
)
void
diff --git a/contrib/ntp/libntp/socktoa.c b/contrib/ntp/libntp/socktoa.c
index 4071b0a45be0..f83f78b87981 100644
--- a/contrib/ntp/libntp/socktoa.c
+++ b/contrib/ntp/libntp/socktoa.c
@@ -21,7 +21,6 @@
#include <isc/sockaddr.h>
#include "ntp_fp.h"
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
#include "ntp.h"
diff --git a/contrib/ntp/libntp/socktohost.c b/contrib/ntp/libntp/socktohost.c
index fdf9adb9e2e6..3ea5b56004d8 100644
--- a/contrib/ntp/libntp/socktohost.c
+++ b/contrib/ntp/libntp/socktohost.c
@@ -15,7 +15,6 @@
#include <stdio.h>
#include "ntp_fp.h"
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
#include "ntp.h"
#include "ntp_debug.h"
diff --git a/contrib/ntp/libntp/ssl_init.c b/contrib/ntp/libntp/ssl_init.c
index 925893257b7f..6de8a0b5fccc 100644
--- a/contrib/ntp/libntp/ssl_init.c
+++ b/contrib/ntp/libntp/ssl_init.c
@@ -23,67 +23,60 @@
# define CMAC_LENGTH 16
# define CMAC "AES128CMAC"
# endif /*HAVE_OPENSSL_CMAC_H*/
-int ssl_init_done;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+EVP_MD_CTX *digest_ctx;
+
static void
atexit_ssl_cleanup(void)
{
- if (!ssl_init_done) {
+ if (NULL == digest_ctx) {
return;
}
-
- ssl_init_done = FALSE;
+ EVP_MD_CTX_free(digest_ctx);
+ digest_ctx = NULL;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_cleanup();
ERR_free_strings();
+#endif /* OpenSSL < 1.1 */
}
+
void
ssl_init(void)
{
init_lib();
- if ( ! ssl_init_done) {
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
- atexit(&atexit_ssl_cleanup);
- ssl_init_done = TRUE;
+ if (NULL == digest_ctx) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_load_crypto_strings();
+ OpenSSL_add_all_algorithms();
+#endif /* OpenSSL < 1.1 */
+ digest_ctx = EVP_MD_CTX_new();
+ INSIST(digest_ctx != NULL);
+ atexit(&atexit_ssl_cleanup);
}
}
-#else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
-
-void
-ssl_init(void)
-{
- init_lib();
- ssl_init_done = TRUE;
-}
-
-#endif /* OPENSSL_VERSION_NUMBER */
-
void
ssl_check_version(void)
{
u_long v;
+ char * buf;
v = OpenSSL_version_num();
if ((v ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) {
- msyslog(LOG_WARNING,
- "OpenSSL version mismatch. Built against %lx, you have %lx",
- (u_long)OPENSSL_VERSION_NUMBER, v);
- fprintf(stderr,
- "OpenSSL version mismatch. Built against %lx, you have %lx\n",
- (u_long)OPENSSL_VERSION_NUMBER, v);
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH,
+ "OpenSSL version mismatch."
+ "Built against %lx, you have %lx\n",
+ (u_long)OPENSSL_VERSION_NUMBER, v);
+ msyslog(LOG_WARNING, "%s", buf);
+ fputs(buf, stderr);
}
-
INIT_SSL();
}
-
-#else /* !OPENSSL */
-# define MD5_LENGTH 16
#endif /* OPENSSL */
@@ -102,7 +95,7 @@ keytype_from_text(
int key_type;
u_int digest_len;
#ifdef OPENSSL /* --*-- OpenSSL code --*-- */
- const u_long max_digest_len = MAX_MAC_LEN - sizeof(keyid_t);
+ const u_long max_digest_len = MAX_MDG_LEN;
char * upcased;
char * pch;
EVP_MD const * md;
@@ -204,7 +197,7 @@ keytype_from_text(
*/
const char *
keytype_name(
- int nid
+ int type
)
{
static const char unknown_type[] = "(unknown key type)";
@@ -212,23 +205,18 @@ keytype_name(
#ifdef OPENSSL
INIT_SSL();
- name = OBJ_nid2sn(nid);
+ name = OBJ_nid2sn(type);
# ifdef ENABLE_CMAC
- if (NID_cmac == nid) {
+ if (NID_cmac == type) {
name = CMAC;
-
- if (debug) {
- fprintf(stderr, "%s:%d:%s():%s:nid\n",
- __FILE__, __LINE__, __func__, CMAC);
- }
} else
# endif /*ENABLE_CMAC*/
if (NULL == name) {
name = unknown_type;
}
#else /* !OPENSSL follows */
- if (NID_md5 == nid)
+ if (NID_md5 == type)
name = "MD5";
else
name = unknown_type;
@@ -251,13 +239,13 @@ keytype_name(
*/
char *
getpass_keytype(
- int keytype
+ int type
)
{
char pass_prompt[64 + 11 + 1]; /* 11 for " Password: " */
snprintf(pass_prompt, sizeof(pass_prompt),
- "%.64s Password: ", keytype_name(keytype));
+ "%.64s Password: ", keytype_name(type));
return getpass(pass_prompt);
}
diff --git a/contrib/ntp/libntp/statestr.c b/contrib/ntp/libntp/statestr.c
index e712dc87e32d..bde1f50e7e74 100644
--- a/contrib/ntp/libntp/statestr.c
+++ b/contrib/ntp/libntp/statestr.c
@@ -8,7 +8,6 @@
#include "ntp_stdlib.h"
#include "ntp_fp.h"
#include "ntp.h"
-#include "lib_strbuf.h"
#include "ntp_refclock.h"
#include "ntp_control.h"
#include "ntp_string.h"
diff --git a/contrib/ntp/libntp/systime.c b/contrib/ntp/libntp/systime.c
index 76fba7fe1608..8d10b2e43f82 100644
--- a/contrib/ntp/libntp/systime.c
+++ b/contrib/ntp/libntp/systime.c
@@ -16,7 +16,6 @@
#include "timevalops.h"
#include "timespecops.h"
#include "ntp_calendar.h"
-#include "lib_strbuf.h"
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
diff --git a/contrib/ntp/libntp/timexsup.c b/contrib/ntp/libntp/timexsup.c
index 979a7c4aea8e..21f7738d3e5f 100644
--- a/contrib/ntp/libntp/timexsup.c
+++ b/contrib/ntp/libntp/timexsup.c
@@ -6,14 +6,27 @@
*/
#include "config.h"
-#include "timexsup.h"
#include <limits.h>
#include <math.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#else
+# ifdef HAVE_TIME_H
+# include <time.h>
+# endif
+#endif
#ifdef HAVE_SYS_TIMEX_H
# include <sys/timex.h>
+#else
+# ifdef HAVE_TIMEX_H
+# include <timex.h>
+# endif
#endif
+#include "ntp_types.h"
+#include "timexsup.h"
+
#if defined(MOD_NANO) != defined(STA_NANO)
# warning inconsistent definitions of MOD_NANO vs STA_NANO
#endif
@@ -41,10 +54,11 @@ dbl_from_var_long(
)
{
#ifdef STA_NANO
- if (status & STA_NANO)
+ if (STA_NANO & status) {
return (double)lval * 1e-9;
+ }
#else
- (void)status;
+ UNUSED_ARG(status);
#endif
return (double)lval * 1e-6;
}
@@ -67,7 +81,7 @@ var_long_from_dbl(
*modes |= MOD_NANO;
dval *= 1e+9;
#else
- (void)modes;
+ UNUSED_ARG(modes);
dval *= 1e+6;
#endif
return clamp_rounded(dval);
diff --git a/contrib/ntp/libntp/uglydate.c b/contrib/ntp/libntp/uglydate.c
index 66b5139096b4..165578674185 100644
--- a/contrib/ntp/libntp/uglydate.c
+++ b/contrib/ntp/libntp/uglydate.c
@@ -7,7 +7,6 @@
#include "ntp_fp.h"
#include "ntp_unixtime.h"
-#include "lib_strbuf.h"
#include "ntp_stdlib.h"
diff --git a/contrib/ntp/libntp/vint64ops.c b/contrib/ntp/libntp/vint64ops.c
index 1d5087d95438..23c9f26dcfac 100644
--- a/contrib/ntp/libntp/vint64ops.c
+++ b/contrib/ntp/libntp/vint64ops.c
@@ -15,24 +15,25 @@
#include "ntp_types.h"
#include "ntp_fp.h"
+#include "ntp_malloc.h"
#include "vint64ops.h"
/* -------------------------------------------------------------------------*/
vint64
strtouv64(
- char const * begp,
- char const ** const endp,
- int base
+ char * begp,
+ char ** endp,
+ int base
)
{
- vint64 res;
- u_char digit;
- int sig, num;
- const u_char *src;
+ vint64 res;
+ u_char digit;
+ int sig, num;
+ u_char *src;
num = sig = 0;
- src = (const u_char*)begp;
+ src = (u_char *)begp;
while (isspace(*src))
src++;
@@ -61,7 +62,7 @@ strtouv64(
return res;
}
- memset(&res, 0, sizeof(res));
+ ZERO(res);
while (*src) {
if (isdigit(*src))
digit = *src - '0';
@@ -97,7 +98,7 @@ strtouv64(
if (!num)
errno = EINVAL;
if (endp)
- *endp = (const char *)src;
+ *endp = (char *)src;
if (sig)
M_NEG(res.D_s.hi, res.D_s.lo);
return res;
diff --git a/contrib/ntp/libntp/work_thread.c b/contrib/ntp/libntp/work_thread.c
index c1fe5c20c995..0d15c6e36e6f 100644
--- a/contrib/ntp/libntp/work_thread.c
+++ b/contrib/ntp/libntp/work_thread.c
@@ -376,8 +376,12 @@ send_blocking_resp_internal(
{
# ifdef WORK_PIPE
if (1 != write(c->resp_write_pipe, "", 1))
- msyslog(LOG_WARNING, "async resolver: %s",
- "failed to notify main thread!");
+ msyslog(LOG_WARNING, "async resolver: blocking_get%sinfo"
+ " failed to notify main thread!",
+ (BLOCKING_GETNAMEINFO == resp->rtype)
+ ? "name"
+ : "addr"
+ );
# else
tickle_sem(c->responses_pending);
# endif
@@ -489,7 +493,7 @@ start_blocking_thread(
/* --------------------------------------------------------------------
* Create a worker thread. There are several differences between POSIX
- * and Windows, of course -- most notably the Windows thread is no
+ * and Windows, of course -- most notably the Windows thread is a
* detached thread, and we keep the handle around until we want to get
* rid of the thread. The notification scheme also differs: Windows
* makes use of semaphores in both directions, POSIX uses a pipe for
@@ -520,9 +524,12 @@ start_blocking_thread_internal(
}
/* remember the thread priority is only within the process class */
if (!SetThreadPriority(c->thr_table[0].thnd,
- THREAD_PRIORITY_BELOW_NORMAL))
+ THREAD_PRIORITY_BELOW_NORMAL)) {
msyslog(LOG_ERR, "Error lowering blocking thread priority: %m");
-
+ }
+ if (NULL != pSetThreadDescription) {
+ (*pSetThreadDescription)(c->thr_table[0].thnd, L"ntp_worker");
+ }
resumed = ResumeThread(c->thr_table[0].thnd);
DEBUG_INSIST(resumed);
c->thread_ref = &c->thr_table[0];
diff --git a/contrib/ntp/libparse/Makefile.am b/contrib/ntp/libparse/Makefile.am
index a4a3ed264f2f..f88e3b2af36d 100644
--- a/contrib/ntp/libparse/Makefile.am
+++ b/contrib/ntp/libparse/Makefile.am
@@ -94,14 +94,9 @@ AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
- sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
- sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
- mv -f info_trimble.new $@
-
-#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
-# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
-# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
-# mv -f info_trimble.new $@
+ $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
+ $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
+ $(AM_V_at)mv -f info_trimble.new $@
kieee754io.o: $(srcdir)/ieee754io.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@
@@ -165,11 +160,11 @@ parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
parsesolaris.o: sys/systm.h
-# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the
+# [Bug 3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the
# ones from 'systm.h'.
sys/systm.h:
-mkdir sys
- sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+ $(SED) -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
## check-libparse is invoked by ntpd/Makefile.am
check-libparse: $(noinst_LIBRARIES)
diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in
index 70fb2d0a5fea..88a42a6f12c7 100644
--- a/contrib/ntp/libparse/Makefile.in
+++ b/contrib/ntp/libparse/Makefile.in
@@ -90,6 +90,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = libparse
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -423,6 +424,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -522,9 +524,9 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) check-libntp \
- .deps-ver
-CLEANFILES = check-libntp .deps-ver
+BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) \
+ $(am__append_1) .deps-ver
+CLEANFILES = .deps-ver
DISTCLEANFILES = $(DEPDIR)/deps-ver
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
@@ -998,14 +1000,9 @@ vphack_after:
)
info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
- sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
- sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
- mv -f info_trimble.new $@
-
-#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
-# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
-# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
-# mv -f info_trimble.new $@
+ $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
+ $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
+ $(AM_V_at)mv -f info_trimble.new $@
kieee754io.o: $(srcdir)/ieee754io.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@
@@ -1069,20 +1066,19 @@ parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
parsesolaris.o: sys/systm.h
-# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the
+# [Bug 3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the
# ones from 'systm.h'.
sys/systm.h:
-mkdir sys
- sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+ $(SED) -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
check-libparse: $(noinst_LIBRARIES)
@: do-nothing action to avoid default SCCS get
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/libparse/clk_computime.c b/contrib/ntp/libparse/clk_computime.c
index 7273ac762e37..10ec9a7c1c97 100644
--- a/contrib/ntp/libparse/clk_computime.c
+++ b/contrib/ntp/libparse/clk_computime.c
@@ -182,7 +182,7 @@ inp_computime(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */
-int clk_computime_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */
/*
diff --git a/contrib/ntp/libparse/clk_dcf7000.c b/contrib/ntp/libparse/clk_dcf7000.c
index 0621cd5649e4..4aeb4c39ba9f 100644
--- a/contrib/ntp/libparse/clk_dcf7000.c
+++ b/contrib/ntp/libparse/clk_dcf7000.c
@@ -176,7 +176,7 @@ inp_dcf7000(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */
-int clk_dcf7000_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */
/*
diff --git a/contrib/ntp/libparse/clk_hopf6021.c b/contrib/ntp/libparse/clk_hopf6021.c
index a747581b75dc..436c92cb3b88 100644
--- a/contrib/ntp/libparse/clk_hopf6021.c
+++ b/contrib/ntp/libparse/clk_hopf6021.c
@@ -20,7 +20,7 @@
# include <config.h>
#endif
-#include <ntp_types.h>
+#include "ntp_types.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_HOPF6021)
diff --git a/contrib/ntp/libparse/clk_meinberg.c b/contrib/ntp/libparse/clk_meinberg.c
index e4ebf0acc605..1aa839bfd15a 100644
--- a/contrib/ntp/libparse/clk_meinberg.c
+++ b/contrib/ntp/libparse/clk_meinberg.c
@@ -733,7 +733,7 @@ gps_input(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */
-int clk_meinberg_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */
/*
diff --git a/contrib/ntp/libparse/clk_rawdcf.c b/contrib/ntp/libparse/clk_rawdcf.c
index 3fa74997c9bf..9b6eeafb163f 100644
--- a/contrib/ntp/libparse/clk_rawdcf.c
+++ b/contrib/ntp/libparse/clk_rawdcf.c
@@ -742,7 +742,7 @@ inp_rawdcf(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */
-int clk_rawdcf_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */
/*
diff --git a/contrib/ntp/libparse/clk_rcc8000.c b/contrib/ntp/libparse/clk_rcc8000.c
index 11d52acc5a24..e9bb115da4f5 100644
--- a/contrib/ntp/libparse/clk_rcc8000.c
+++ b/contrib/ntp/libparse/clk_rcc8000.c
@@ -163,7 +163,7 @@ inp_rcc8000(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */
-int clk_rcc8000_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */
/*
diff --git a/contrib/ntp/libparse/clk_schmid.c b/contrib/ntp/libparse/clk_schmid.c
index d85b1a5da512..5dd52047aa0f 100644
--- a/contrib/ntp/libparse/clk_schmid.c
+++ b/contrib/ntp/libparse/clk_schmid.c
@@ -222,7 +222,7 @@ inp_schmid(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */
-int clk_schmid_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */
/*
diff --git a/contrib/ntp/libparse/clk_sel240x.c b/contrib/ntp/libparse/clk_sel240x.c
index b1390b4cefb1..f27b662491f1 100644
--- a/contrib/ntp/libparse/clk_sel240x.c
+++ b/contrib/ntp/libparse/clk_sel240x.c
@@ -168,5 +168,5 @@ cvt_sel240x( unsigned char *buffer,
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */
-int clk_sel240x_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */
diff --git a/contrib/ntp/libparse/clk_trimtaip.c b/contrib/ntp/libparse/clk_trimtaip.c
index a60d01ec1870..ce930952ffa2 100644
--- a/contrib/ntp/libparse/clk_trimtaip.c
+++ b/contrib/ntp/libparse/clk_trimtaip.c
@@ -181,7 +181,7 @@ inp_trimtaip(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */
-int clk_trimtaip_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */
/*
diff --git a/contrib/ntp/libparse/clk_trimtsip.c b/contrib/ntp/libparse/clk_trimtsip.c
index 8cf5660657cc..5af69d349eea 100644
--- a/contrib/ntp/libparse/clk_trimtsip.c
+++ b/contrib/ntp/libparse/clk_trimtsip.c
@@ -388,7 +388,7 @@ cvt_trimtsip(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */
-int clk_trimtsip_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */
/*
diff --git a/contrib/ntp/libparse/clk_varitext.c b/contrib/ntp/libparse/clk_varitext.c
index 0d830354d799..a4c6d31b797a 100644
--- a/contrib/ntp/libparse/clk_varitext.c
+++ b/contrib/ntp/libparse/clk_varitext.c
@@ -252,7 +252,7 @@ inp_varitext(
}
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */
-int clk_varitext_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */
/*
diff --git a/contrib/ntp/libparse/clk_wharton.c b/contrib/ntp/libparse/clk_wharton.c
index e1ef61d55bdb..2df425bc67b7 100644
--- a/contrib/ntp/libparse/clk_wharton.c
+++ b/contrib/ntp/libparse/clk_wharton.c
@@ -9,7 +9,7 @@
#include <config.h>
#endif
-#include <ntp_types.h>
+#include "ntp_types.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_WHARTON_400A)
/*
diff --git a/contrib/ntp/libparse/ieee754io.c b/contrib/ntp/libparse/ieee754io.c
index 61bc8533b0d7..b41a96c2170e 100644
--- a/contrib/ntp/libparse/ieee754io.c
+++ b/contrib/ntp/libparse/ieee754io.c
@@ -50,8 +50,6 @@ static void put_byte (unsigned char *, offsets_t, int *, unsigned char);
#ifdef LIBDEBUG
-#include "lib_strbuf.h"
-
static char *
fmt_blong(
unsigned long val,
@@ -396,7 +394,22 @@ fetch_ieee754(
}
}
}
-
+
+/*
+ * DLH: This function is currently unused in ntpd. If you think about
+ * using it, be sure it does what you intend. I notice the bufpp arg
+ * is never referenced, and the calculated mantissa_high & mantissa_low
+ * are only referenced in debug output. It seems they're supposed to
+ * be composed into an ieee754-format float and stored at *bufpp or
+ * possibly **bufpp. Brought to my attention by this:
+ *
+ * ieee754io.c:414:10: warning: variable 'mantissa_low' set but not used
+ * [-Wunused-but-set-variable]
+ *
+ * To quiet it I'm #ifdef'ing the function away for now, here and below
+ * the call to it in main().
+ */
+#ifdef PUT_IEEE754_UNUSED_FUNC
int
put_ieee754(
unsigned char **bufpp,
@@ -536,6 +549,7 @@ put_ieee754(
}
return IEEE_OK;
}
+#endif /* PUT_IEEE754_UNUSED_FUNC */
#if defined(DEBUG) && defined(LIBDEBUG)
@@ -562,8 +576,11 @@ int main(
printf("fetch from %f = %d\n", f, fetch_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off));
printf("fp [%s %s] = %s\n", fmt_blong(fp.l_ui, 32), fmt_blong(fp.l_uf, 32), mfptoa(fp.l_ui, fp.l_uf, 15));
f_p = &f;
+#ifdef PUT_IEEE754_UNUSED_FUNC
put_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off);
-
+/* there should be a check on *f_p (f) having the expected result here */
+#endif /* PUT_IEEE754_UNUSED_FUNC */
+
return 0;
}
diff --git a/contrib/ntp/libparse/parse.c b/contrib/ntp/libparse/parse.c
index 69395ac4a560..56f2c3702bd8 100644
--- a/contrib/ntp/libparse/parse.c
+++ b/contrib/ntp/libparse/parse.c
@@ -875,7 +875,7 @@ parse_setcs(
}
#else /* not (REFCLOCK && CLOCK_PARSE) */
-int parse_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE) */
/*
diff --git a/contrib/ntp/libparse/parse_conf.c b/contrib/ntp/libparse/parse_conf.c
index 37871c9de887..ad7a47aa937f 100644
--- a/contrib/ntp/libparse/parse_conf.c
+++ b/contrib/ntp/libparse/parse_conf.c
@@ -148,7 +148,7 @@ clockformat_t *clockformats[] =
unsigned short nformats = sizeof(clockformats) / sizeof(clockformats[0]) - 1;
#else /* not (REFCLOCK && CLOCK_PARSE) */
-int parse_conf_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_PARSE) */
/*
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index 5b92df6c0906..57a7d30143fa 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -97,6 +97,7 @@ build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = check_y2k$(EXEEXT) keyword-gen$(EXEEXT) ntpd$(EXEEXT) \
ntpdsim$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -551,6 +552,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -688,8 +690,8 @@ B_S_DIST = \
$(NULL)
BUILT_SOURCES = $(VPHACK) $(LIBPARSE) ntp_parser.c ntp_parser.h \
- $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts check-libntp \
- .deps-ver
+ $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts \
+ $(am__append_1) .deps-ver
man1_MANS =
man5_MANS = ntp.conf.5 ntp.keys.5
man8_MANS =
@@ -708,7 +710,7 @@ CLEANFILES = check-psl0 check-psl1 check-psl2 check-pslsaveconfig \
psl0save.conf psl0save.conf+ psl1save.conf psl1save.conf+ \
psl2save.conf psl2save.conf+ .version version.c ntpd-version.c \
sim-version.c $(EXTRA_PROGRAMS) $(NULL) check-libopts \
- check-libntp .deps-ver
+ .deps-ver
EXTRA_DIST = \
complete.conf.in \
invoke-ntp.conf.menu \
@@ -2124,18 +2126,16 @@ check-libopts: ../sntp/libopts/libopts.la
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
$(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+.PHONY: FRC.scm-rev
FRC.scm-rev:
- @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
- always out-of-date causing targets which depend on it to also \
- be outdated so their rules to fire each time they are built.
+ @: FRC.scm-rev is always out of date, triggering the check every make invocation.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/ntpd/cmd_args.c b/contrib/ntp/ntpd/cmd_args.c
index aa461cb4dbe6..a604feb00b54 100644
--- a/contrib/ntp/ntpd/cmd_args.c
+++ b/contrib/ntp/ntpd/cmd_args.c
@@ -178,16 +178,14 @@ getCmdOpts(
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
-
- if (val >= 0)
- interface_interval = val;
- else {
- fprintf(stderr,
- "command line interface update interval %ld must not be negative\n",
- val);
- msyslog(LOG_ERR,
- "command line interface update interval %ld must not be negative",
- val);
+ const char errfmt[] =
+ "-U/--updateinterval %ld must be >= 0\n";
+
+ if (val >= 0) {
+ endpt_scan_period = val;
+ } else {
+ fprintf(stderr, errfmt, val);
+ msyslog(LOG_ERR, errfmt, val);
errflg++;
}
}
diff --git a/contrib/ntp/ntpd/complete.conf.in b/contrib/ntp/ntpd/complete.conf.in
index 77b619773fbf..adda4e4fa921 100644
--- a/contrib/ntp/ntpd/complete.conf.in
+++ b/contrib/ntp/ntpd/complete.conf.in
@@ -33,40 +33,45 @@ tinker allan 1500 dispersion 15 freq 0 huffpuff 7200 panic 1000 step 0.128 stepo
broadcastclient
server 127.127.1.0 mode 4294967295 prefer true
fudge 127.127.1.0 time1 0 time2 1.1 stratum 7 refid Abcd minjitter 0.2
-pool 0.north-america.pool.ntp.org. iburst preempt
-server 1.north-america.pool.ntp.org. iburst
-server -4 2.north-america.pool.ntp.org. minpoll 6 maxpoll 10 iburst
-server -6 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst
-peer -6 davehart.broker.freenet6.net. ident "autokey-group" xleave autokey
-peer -4 192.168.192.168 key 1 noselect
+pool 2.ubuntu.pool.ntp.org. iburst preempt
+pool 2.freebsd.pool.ntp.org. iburst
+server -6 2.debian.pool.ntp.org. minpoll 6 maxpoll 10 iburst
+server -4 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst
+peer -6 ntp.md. ident "autokey-group" xleave autokey
+peer -4 198.51.100.123 key 1 noselect
server [fe80::123%1] xmtnonce
-broadcast 192.168.192.255
-manycastclient 224.0.1.1
-manycastclient ff05::101
+broadcast 192.0.2.255
+manycastclient 224.0.1.1 key 14 iburst
+manycastclient ff05::101 maxpoll 6 key 1
manycastserver 224.0.1.1 ff05::101
multicastclient 224.0.1.1 ff05::101
mru maxage 64 mindepth 600 initalloc 600 initmem 16 incalloc 99 incmem 4 maxdepth 1024 maxmem 4096
discard minimum 1 average 3 monitor 3000
pollskewlist 3 1|2 4 3|4 default 6|7
-restrict default ippeerlimit -1
-restrict default ippeerlimit 0 nomodify limited kod noserve nomrulist
+restrict default
+restrict default ippeerlimit 0 nomodify limited kod nopeer noserve nomrulist
restrict source ippeerlimit 1
restrict source ippeerlimit 2 nomodify limited kod
-restrict trusted.host.name.example.com. ippeerlimit -1 nomodify
-restrict [fe80::1] mask [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff] ippeerlimit -1
-restrict 127.0.0.1 mask 255.255.255.255 ippeerlimit -1
-restrict 127.0.0.2 ippeerlimit -1 serverresponse fuzz
-restrict ::1 ippeerlimit -1
+restrict trusted.host.name.example.com. nomodify
+delrestrict trusted.host.name.example.com.
+restrict 192.0.2.66 epeer flake lowpriotrap mssntp noepeer noquery notrap notrust ntpport version
+delrestrict source 192.0.2.123
+delrestrict source [2001:db8::123]
+restrict fe80::1
+restrict 127.0.0.1
+restrict ::1
+restrict 198.51.100.123 serverresponse fuzz
+restrict fec0:: mask [ffff::] ignore
interface drop ipv6
interface ignore ipv4
interface drop wildcard
interface listen eth0
interface listen ipv6
-interface listen 192.168.192.0/24
-interface listen 192.168.193.1
+interface listen 203.0.113.0/24
+interface listen 192.0.2.123
phone "ATDT13034944774" "ATDT12027621594"
setvar varnondef = "this variable does not have default after the value"
setvar vanity = "name plate" default
trap 127.0.0.1 interface 127.0.0.1 port 1234
-trap 127.0.0.2
+trap 192.0.2.2
reset allpeers auth ctl io mem sys timer
diff --git a/contrib/ntp/ntpd/invoke-ntp.conf.texi b/contrib/ntp/ntpd/invoke-ntp.conf.texi
index 86a039ea6f49..1f232a313f57 100644
--- a/contrib/ntp/ntpd/invoke-ntp.conf.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:37:38 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:03:56 AM by AutoGen 5.18.16
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -251,27 +251,15 @@ include authentication fields encrypted using the autokey scheme
described in
@ref{Authentication Options}.
@item @code{burst}
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-@code{calldelay}
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
@code{server}
command and s addresses.
@item @code{iburst}
When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-@code{calldelay}
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
@code{server}
@@ -833,7 +821,7 @@ The
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,535, inclusive.
-@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]}
+@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]}
This command requires the OpenSSL library.
It activates public key
cryptography, selects the message digest and signature
@@ -890,14 +878,6 @@ encrypted.
Specifies the location of the random seed file used by the OpenSSL
library.
The defaults are described in the main text above.
-@item @code{sign} @kbd{file}
-Specifies the location of the optional sign key file.
-This overrides
-the link
-@file{ntpkey_sign_}@kbd{hostname}
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
@end table
@item @code{keys} @kbd{keyfile}
Specifies the complete path and location of the MD5 key file
@@ -1477,25 +1457,26 @@ by default the probability of replacing it with an
entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
-@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]}
+@item @code{restrict} @kbd{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]}
The
@kbd{address}
argument expressed in
-dotted-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
@kbd{address}
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+@kbd{mask}
+is ignored and an individual host mask is
+used for each entry.
The
@kbd{mask}
-argument expressed in dotted-quad form defaults to
-@code{255.255.255.255},
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
@kbd{address}
is treated as the address of an individual host.
-A default entry (address
-@code{0.0.0.0},
-mask
-@code{0.0.0.0})
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
@code{default},
@@ -1532,12 +1513,12 @@ and
@code{ntpdc(1ntpdcmdoc)}
queries.
@item @code{kod}
-If this flag is set when an access violation occurs, a kiss-o'-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+If this flag is set when a rate violation occurs, a kiss-o'-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+@code{discard} @code{average}
+defaulting to 8s. Otherwise, no response is sent.
@item @code{limited}
Deny service if the packet spacing violates the lower limits specified
in the
@@ -1627,15 +1608,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
@code{ntpport}
-and
-@code{non-ntpport}
-may
-be specified.
+and the other does not.
The
@code{ntpport}
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
@item @code{serverresponse fuzz}
When reponding to server requests,
@@ -1647,12 +1626,28 @@ Deny packets that do not match the current NTP version.
Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+@code{manycastclient}
+when
+@code{manycast}
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
+@item @code{delrestrict} @code{[source]} @kbd{address}
+Remove a previously-set restriction. This is useful for
+runtime configuration via
+@code{ntpq(1ntpqmdoc)}
+. If
+@code{source}
+is specified, a dynamic restriction created from the
+@code{restrict} @code{source}
+template at the time
+an association was added is removed. Without
+@code{source}
+a static restriction is removed.
@end table
@node Automatic NTP Configuration Options
@subsection Automatic NTP Configuration Options
@@ -2357,10 +2352,6 @@ Typically (for Ethernet), a
number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
-@item @code{calldelay} @kbd{delay}
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
@item @code{driftfile} @kbd{driftfile}
This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
diff --git a/contrib/ntp/ntpd/invoke-ntp.keys.texi b/contrib/ntp/ntpd/invoke-ntp.keys.texi
index 3926518de3a2..189829f8516d 100644
--- a/contrib/ntp/ntpd/invoke-ntp.keys.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:37:41 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:03:59 AM by AutoGen 5.18.16
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/contrib/ntp/ntpd/invoke-ntpd.texi b/contrib/ntp/ntpd/invoke-ntpd.texi
index 471bca5b86c8..ae05d92be524 100644
--- a/contrib/ntp/ntpd/invoke-ntpd.texi
+++ b/contrib/ntp/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:37:42 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:04:00 AM by AutoGen 5.18.16
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8p17
+ntpd - NTP daemon program - Ver. 4.2.8p18
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/ntpd/keyword-gen-utd b/contrib/ntp/ntpd/keyword-gen-utd
index 0eb94005b839..60bc132ce064 100644
--- a/contrib/ntp/ntpd/keyword-gen-utd
+++ b/contrib/ntp/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2022-03-27 14:17:11 UTC diff_ignore_line
+ * Generated 2023-09-25 05:34:02 UTC diff_ignore_line
diff --git a/contrib/ntp/ntpd/keyword-gen.c b/contrib/ntp/ntpd/keyword-gen.c
index 104d95e8b3e1..014227a2ba08 100644
--- a/contrib/ntp/ntpd/keyword-gen.c
+++ b/contrib/ntp/ntpd/keyword-gen.c
@@ -23,7 +23,6 @@
#include <ntp_stdlib.h>
#include <ntp_config.h>
-#include <lib_strbuf.h>
#include "ntp_scanner.h"
#include "ntp_parser.h"
@@ -45,6 +44,7 @@ struct key_tok ntp_keywords[] = {
{ "broadcastdelay", T_Broadcastdelay, FOLLBY_TOKEN },
{ "checkhash", T_Checkhash, FOLLBY_TOKEN },
{ "ctl", T_Ctl, FOLLBY_TOKEN },
+{ "delrestrict", T_Delrestrict, FOLLBY_TOKEN },
{ "device", T_Device, FOLLBY_STRING },
{ "disable", T_Disable, FOLLBY_TOKEN },
{ "driftfile", T_Driftfile, FOLLBY_STRING },
diff --git a/contrib/ntp/ntpd/ntp.conf.5man b/contrib/ntp/ntpd/ntp.conf.5man
index 4e7a47ab83ef..d5a82190c0b0 100644
--- a/contrib/ntp/ntpd/ntp.conf.5man
+++ b/contrib/ntp/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "06 Jun 2023" "4.2.8p17" "File Formats"
+.TH ntp.conf 5man "25 May 2024" "4.2.8p18" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:45 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:03 AM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -291,28 +291,16 @@ described in
\fIAuthentication\f[] \fIOptions\f[].
.TP 7
.NOP \f\*[B-Font]burst\f[]
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-\f\*[B-Font]calldelay\f[]
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
\f\*[B-Font]server\f[]
command and s addresses.
.TP 7
.NOP \f\*[B-Font]iburst\f[]
When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-\f\*[B-Font]calldelay\f[]
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
\f\*[B-Font]server\f[]
@@ -938,7 +926,7 @@ argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,535, inclusive.
.TP 7
-.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
+.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
This command requires the OpenSSL library.
It activates public key
cryptography, selects the message digest and signature
@@ -1003,15 +991,6 @@ encrypted.
Specifies the location of the random seed file used by the OpenSSL
library.
The defaults are described in the main text above.
-.TP 7
-.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]
-Specifies the location of the optional sign key file.
-This overrides
-the link
-\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[]
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
.RE
.TP 7
.NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[]
@@ -1679,25 +1658,26 @@ entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
.TP 7
-.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+.NOP \f\*[B-Font]restrict\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
\f\*[I-Font]address\f[]
argument expressed in
-dotted-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
\f\*[I-Font]address\f[]
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+\f\*[I-Font]mask\f[]
+is ignored and an individual host mask is
+used for each entry.
The
\f\*[I-Font]mask\f[]
-argument expressed in dotted-quad form defaults to
-\f\*[B-Font]255.255.255.255\f[],
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
\f\*[I-Font]address\f[]
is treated as the address of an individual host.
-A default entry (address
-\f\*[B-Font]0.0.0.0\f[],
-mask
-\f\*[B-Font]0.0.0.0\f[])
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
\f\*[B-Font]default\f[],
@@ -1736,12 +1716,12 @@ and
queries.
.TP 7
.NOP \f\*[B-Font]kod\f[]
-If this flag is set when an access violation occurs, a kiss-o'-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+If this flag is set when a rate violation occurs, a kiss-o'-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+\f\*[B-Font]discard\f[] \f\*[B-Font]average\f[]
+defaulting to 8s. Otherwise, no response is sent.
.TP 7
.NOP \f\*[B-Font]limited\f[]
Deny service if the packet spacing violates the lower limits specified
@@ -1841,15 +1821,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
\f\*[B-Font]ntpport\f[]
-and
-\f\*[B-Font]non-ntpport\f[]
-may
-be specified.
+and the other does not.
The
\f\*[B-Font]ntpport\f[]
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
.TP 7
.NOP \f\*[B-Font]serverresponse fuzz\f[]
@@ -1865,12 +1843,29 @@ Deny packets that do not match the current NTP version.
Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+\f\*[B-Font]manycastclient\f[]
+when
+\f\*[B-Font]manycast\f[]
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
+.TP 7
+.NOP \f\*[B-Font]delrestrict\f[] [source] \f\*[I-Font]address\f[]
+Remove a previously-set restriction. This is useful for
+runtime configuration via
+\fCntpq\f[]\fR(1ntpqmdoc)\f[]
+. If
+\f\*[B-Font]source\f[]
+is specified, a dynamic restriction created from the
+\f\*[B-Font]restrict\f[] \f\*[B-Font]source\f[]
+template at the time
+an association was added is removed. Without
+\f\*[B-Font]source\f[]
+a static restriction is removed.
.PP
.SH Automatic NTP Configuration Options
.SS Manycasting
@@ -2635,11 +2630,6 @@ number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
.TP 7
-.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[]
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
-.TP 7
.NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[]
This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
@@ -3461,7 +3451,7 @@ RFC5905
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.conf.5mdoc b/contrib/ntp/ntpd/ntp.conf.5mdoc
index 951f33da4faa..b950e92cdeb9 100644
--- a/contrib/ntp/ntpd/ntp.conf.5mdoc
+++ b/contrib/ntp/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:32 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:03:50 AM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -294,27 +294,15 @@ include authentication fields encrypted using the autokey scheme
described in
.Sx Authentication Options .
.It Cm burst
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
.Ic server
command and s addresses.
.It Cm iburst
When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
.Ic server
@@ -889,7 +877,6 @@ range 1 to 65,535, inclusive.
.Op Cm leap Ar file
.Op Cm randfile Ar file
.Op Cm host Ar file
-.Op Cm sign Ar file
.Op Cm gq Ar file
.Op Cm gqpar Ar file
.Op Cm iffpar Ar file
@@ -952,14 +939,6 @@ encrypted.
Specifies the location of the random seed file used by the OpenSSL
library.
The defaults are described in the main text above.
-.It Cm sign Ar file
-Specifies the location of the optional sign key file.
-This overrides
-the link
-.Pa ntpkey_sign_ Ns Ar hostname
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
.El
.It Ic keys Ar keyfile
Specifies the complete path and location of the MD5 key file
@@ -1546,7 +1525,8 @@ by default the probability of replacing it with an
entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
-.It Xo Ic restrict address
+.It Xo Ic restrict
+.Ar address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
.Op Ar flag ...
@@ -1554,21 +1534,22 @@ than 3000 seconds old, the probability is 100%.
The
.Ar address
argument expressed in
-dotted\-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
.Ar address
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+.Ar mask
+is ignored and an individual host mask is
+used for each entry.
The
.Ar mask
-argument expressed in dotted\-quad form defaults to
-.Cm 255.255.255.255 ,
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
.Ar address
is treated as the address of an individual host.
-A default entry (address
-.Cm 0.0.0.0 ,
-mask
-.Cm 0.0.0.0 )
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
.Cm default ,
@@ -1605,12 +1586,12 @@ and
.Xr ntpdc 1ntpdcmdoc
queries.
.It Cm kod
-If this flag is set when an access violation occurs, a kiss\-o'\-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+If this flag is set when a rate violation occurs, a kiss\-o'\-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+.Cm discard average
+defaulting to 8s. Otherwise, no response is sent.
.It Cm limited
Deny service if the packet spacing violates the lower limits specified
in the
@@ -1700,15 +1681,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
.Cm ntpport
-and
-.Cm non\-ntpport
-may
-be specified.
+and the other does not.
The
.Cm ntpport
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
.It Ic "serverresponse fuzz"
When reponding to server requests,
@@ -1720,12 +1699,31 @@ Deny packets that do not match the current NTP version.
.Pp
Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+.Cm manycastclient
+when
+.Cm manycast
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
+.It Xo Ic delrestrict
+.Op source
+.Ar address
+.Xc
+Remove a previously\-set restriction. This is useful for
+runtime configuration via
+.Xr ntpq 1ntpqmdoc
+. If
+.Cm source
+is specified, a dynamic restriction created from the
+.Cm restrict source
+template at the time
+an association was added is removed. Without
+.Cm source
+a static restriction is removed.
.El
.Sh Automatic NTP Configuration Options
.Ss Manycasting
@@ -2462,10 +2460,6 @@ Typically (for Ethernet), a
number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
-.It Ic calldelay Ar delay
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
.It Ic driftfile Ar driftfile
This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
@@ -3302,7 +3296,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def
index 03dd8b808099..444e3b35e351 100644
--- a/contrib/ntp/ntpd/ntp.conf.def
+++ b/contrib/ntp/ntpd/ntp.conf.def
@@ -296,27 +296,15 @@ include authentication fields encrypted using the autokey scheme
described in
.Sx Authentication Options .
.It Cm burst
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
.Ic server
command and s addresses.
.It Cm iburst
When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
.Ic server
@@ -892,7 +880,6 @@ range 1 to 65,535, inclusive.
.Op Cm leap Ar file
.Op Cm randfile Ar file
.Op Cm host Ar file
-.Op Cm sign Ar file
.Op Cm gq Ar file
.Op Cm gqpar Ar file
.Op Cm iffpar Ar file
@@ -955,14 +942,6 @@ encrypted.
Specifies the location of the random seed file used by the OpenSSL
library.
The defaults are described in the main text above.
-.It Cm sign Ar file
-Specifies the location of the optional sign key file.
-This overrides
-the link
-.Pa ntpkey_sign_ Ns Ar hostname
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
.El
.It Ic keys Ar keyfile
Specifies the complete path and location of the MD5 key file
@@ -1549,7 +1528,8 @@ by default the probability of replacing it with an
entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
-.It Xo Ic restrict address
+.It Xo Ic restrict
+.Ar address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
.Op Ar flag ...
@@ -1557,21 +1537,22 @@ than 3000 seconds old, the probability is 100%.
The
.Ar address
argument expressed in
-dotted-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
.Ar address
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+.Ar mask
+is ignored and an individual host mask is
+used for each entry.
The
.Ar mask
-argument expressed in dotted-quad form defaults to
-.Cm 255.255.255.255 ,
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
.Ar address
is treated as the address of an individual host.
-A default entry (address
-.Cm 0.0.0.0 ,
-mask
-.Cm 0.0.0.0 )
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
.Cm default ,
@@ -1608,12 +1589,12 @@ and
.Xr ntpdc 1ntpdcmdoc
queries.
.It Cm kod
-If this flag is set when an access violation occurs, a kiss-o'-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+If this flag is set when a rate violation occurs, a kiss-o'-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+.Cm discard average
+defaulting to 8s. Otherwise, no response is sent.
.It Cm limited
Deny service if the packet spacing violates the lower limits specified
in the
@@ -1703,15 +1684,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
.Cm ntpport
-and
-.Cm non-ntpport
-may
-be specified.
+and the other does not.
The
.Cm ntpport
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
.It Ic "serverresponse fuzz"
When reponding to server requests,
@@ -1723,12 +1702,31 @@ Deny packets that do not match the current NTP version.
.Pp
Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+.Cm manycastclient
+when
+.Cm manycast
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
+.It Xo Ic delrestrict
+.Op source
+.Ar address
+.Xc
+Remove a previously-set restriction. This is useful for
+runtime configuration via
+.Xr ntpq 1ntpqmdoc
+. If
+.Cm source
+is specified, a dynamic restriction created from the
+.Cm restrict source
+template at the time
+an association was added is removed. Without
+.Cm source
+a static restriction is removed.
.El
.Sh Automatic NTP Configuration Options
.Ss Manycasting
@@ -2465,10 +2463,6 @@ Typically (for Ethernet), a
number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
-.It Ic calldelay Ar delay
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
.It Ic driftfile Ar driftfile
This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
diff --git a/contrib/ntp/ntpd/ntp.conf.html b/contrib/ntp/ntpd/ntp.conf.html
index f7f0b4bef931..ea82c6783a4b 100644
--- a/contrib/ntp/ntpd/ntp.conf.html
+++ b/contrib/ntp/ntpd/ntp.conf.html
@@ -50,7 +50,7 @@ Next: <a href="#ntp_002econf-Description" accesskey="n" rel="next">ntp.conf Desc
<p>This document describes the configuration file for the NTP Project&rsquo;s
<code>ntpd</code> program.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntp.conf</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntp.conf</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -362,28 +362,16 @@ described in
&lsquo;Authentication Options&rsquo;.
</p></dd>
<dt><code>burst</code></dt>
-<dd><p>when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-<code>calldelay</code>
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+<dd><p>when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
<code>server</code>
command and s addresses.
</p></dd>
<dt><code>iburst</code></dt>
<dd><p>When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-<code>calldelay</code>
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
<code>server</code>
@@ -966,7 +954,7 @@ argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,535, inclusive.
</p></dd>
-<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>sign</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt>
+<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt>
<dd><p>This command requires the OpenSSL library.
It activates public key
cryptography, selects the message digest and signature
@@ -1031,15 +1019,6 @@ encrypted.
library.
The defaults are described in the main text above.
</p></dd>
-<dt><code>sign</code> <kbd>file</kbd></dt>
-<dd><p>Specifies the location of the optional sign key file.
-This overrides
-the link
-<samp>ntpkey_sign_</samp><kbd>hostname</kbd>
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
-</p></dd>
</dl>
</dd>
<dt><code>keys</code> <kbd>keyfile</kbd></dt>
@@ -1670,25 +1649,26 @@ entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
</p></dd>
-<dt><code>restrict</code> <code>address</code> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt>
+<dt><code>restrict</code> <kbd>address</kbd> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt>
<dd><p>The
<kbd>address</kbd>
argument expressed in
-dotted-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
<kbd>address</kbd>
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+<kbd>mask</kbd>
+is ignored and an individual host mask is
+used for each entry.
The
<kbd>mask</kbd>
-argument expressed in dotted-quad form defaults to
-<code>255.255.255.255</code>,
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
<kbd>address</kbd>
is treated as the address of an individual host.
-A default entry (address
-<code>0.0.0.0</code>,
-mask
-<code>0.0.0.0</code>)
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
<code>default</code>,
@@ -1726,12 +1706,12 @@ and
queries.
</p></dd>
<dt><code>kod</code></dt>
-<dd><p>If this flag is set when an access violation occurs, a kiss-o&rsquo;-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+<dd><p>If this flag is set when a rate violation occurs, a kiss-o&rsquo;-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+<code>discard</code> <code>average</code>
+defaulting to 8s. Otherwise, no response is sent.
</p></dd>
<dt><code>limited</code></dt>
<dd><p>Deny service if the packet spacing violates the lower limits specified
@@ -1831,15 +1811,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
<code>ntpport</code>
-and
-<code>non-ntpport</code>
-may
-be specified.
+and the other does not.
The
<code>ntpport</code>
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
</p></dd>
<dt><code>serverresponse fuzz</code></dt>
@@ -1854,13 +1832,30 @@ fuzz the low order bits of the
<p>Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host&rsquo;s interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+<code>manycastclient</code>
+when
+<code>manycast</code>
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
</p></dd>
+<dt><code>delrestrict</code> <code>[source]</code> <kbd>address</kbd></dt>
+<dd><p>Remove a previously-set restriction. This is useful for
+runtime configuration via
+<code>ntpq(1ntpqmdoc)</code>
+. If
+<code>source</code>
+is specified, a dynamic restriction created from the
+<code>restrict</code> <code>source</code>
+template at the time
+an association was added is removed. Without
+<code>source</code>
+a static restriction is removed.
+</p></dd>
</dl>
<hr>
<span id="Automatic-NTP-Configuration-Options"></span><div class="header">
@@ -2597,11 +2592,6 @@ number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
</p></dd>
-<dt><code>calldelay</code> <kbd>delay</kbd></dt>
-<dd><p>This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
-</p></dd>
<dt><code>driftfile</code> <kbd>driftfile</kbd></dt>
<dd><p>This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
diff --git a/contrib/ntp/ntpd/ntp.conf.man.in b/contrib/ntp/ntpd/ntp.conf.man.in
index 0c56ee503df6..175fcb8ab314 100644
--- a/contrib/ntp/ntpd/ntp.conf.man.in
+++ b/contrib/ntp/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "06 Jun 2023" "4.2.8p17" "File Formats"
+.TH ntp.conf 5 "25 May 2024" "4.2.8p18" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:45 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:03 AM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -291,28 +291,16 @@ described in
\fIAuthentication\f[] \fIOptions\f[].
.TP 7
.NOP \f\*[B-Font]burst\f[]
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-\f\*[B-Font]calldelay\f[]
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
\f\*[B-Font]server\f[]
command and s addresses.
.TP 7
.NOP \f\*[B-Font]iburst\f[]
When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-\f\*[B-Font]calldelay\f[]
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
\f\*[B-Font]server\f[]
@@ -938,7 +926,7 @@ argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,535, inclusive.
.TP 7
-.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
+.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
This command requires the OpenSSL library.
It activates public key
cryptography, selects the message digest and signature
@@ -1003,15 +991,6 @@ encrypted.
Specifies the location of the random seed file used by the OpenSSL
library.
The defaults are described in the main text above.
-.TP 7
-.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]
-Specifies the location of the optional sign key file.
-This overrides
-the link
-\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[]
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
.RE
.TP 7
.NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[]
@@ -1679,25 +1658,26 @@ entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
.TP 7
-.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+.NOP \f\*[B-Font]restrict\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
\f\*[I-Font]address\f[]
argument expressed in
-dotted-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
\f\*[I-Font]address\f[]
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+\f\*[I-Font]mask\f[]
+is ignored and an individual host mask is
+used for each entry.
The
\f\*[I-Font]mask\f[]
-argument expressed in dotted-quad form defaults to
-\f\*[B-Font]255.255.255.255\f[],
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
\f\*[I-Font]address\f[]
is treated as the address of an individual host.
-A default entry (address
-\f\*[B-Font]0.0.0.0\f[],
-mask
-\f\*[B-Font]0.0.0.0\f[])
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
\f\*[B-Font]default\f[],
@@ -1736,12 +1716,12 @@ and
queries.
.TP 7
.NOP \f\*[B-Font]kod\f[]
-If this flag is set when an access violation occurs, a kiss-o'-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+If this flag is set when a rate violation occurs, a kiss-o'-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+\f\*[B-Font]discard\f[] \f\*[B-Font]average\f[]
+defaulting to 8s. Otherwise, no response is sent.
.TP 7
.NOP \f\*[B-Font]limited\f[]
Deny service if the packet spacing violates the lower limits specified
@@ -1841,15 +1821,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
\f\*[B-Font]ntpport\f[]
-and
-\f\*[B-Font]non-ntpport\f[]
-may
-be specified.
+and the other does not.
The
\f\*[B-Font]ntpport\f[]
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
.TP 7
.NOP \f\*[B-Font]serverresponse fuzz\f[]
@@ -1865,12 +1843,29 @@ Deny packets that do not match the current NTP version.
Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+\f\*[B-Font]manycastclient\f[]
+when
+\f\*[B-Font]manycast\f[]
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
+.TP 7
+.NOP \f\*[B-Font]delrestrict\f[] [source] \f\*[I-Font]address\f[]
+Remove a previously-set restriction. This is useful for
+runtime configuration via
+\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
+. If
+\f\*[B-Font]source\f[]
+is specified, a dynamic restriction created from the
+\f\*[B-Font]restrict\f[] \f\*[B-Font]source\f[]
+template at the time
+an association was added is removed. Without
+\f\*[B-Font]source\f[]
+a static restriction is removed.
.PP
.SH Automatic NTP Configuration Options
.SS Manycasting
@@ -2635,11 +2630,6 @@ number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
.TP 7
-.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[]
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
-.TP 7
.NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[]
This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
@@ -3461,7 +3451,7 @@ RFC5905
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.conf.mdoc.in b/contrib/ntp/ntpd/ntp.conf.mdoc.in
index 22348ee727d0..70f9080257a2 100644
--- a/contrib/ntp/ntpd/ntp.conf.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:32 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:03:50 AM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -294,27 +294,15 @@ include authentication fields encrypted using the autokey scheme
described in
.Sx Authentication Options .
.It Cm burst
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
+when the server is reachable, send a burst of six packets
+instead of the usual one. The packet spacing is 2 s.
+This is designed to improve timekeeping quality with the
.Ic server
command and s addresses.
.It Cm iburst
When the server is unreachable, send a burst of eight packets
instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
+The packet spacing is 2 s.
This is designed to speed the initial synchronization
acquisition with the
.Ic server
@@ -889,7 +877,6 @@ range 1 to 65,535, inclusive.
.Op Cm leap Ar file
.Op Cm randfile Ar file
.Op Cm host Ar file
-.Op Cm sign Ar file
.Op Cm gq Ar file
.Op Cm gqpar Ar file
.Op Cm iffpar Ar file
@@ -952,14 +939,6 @@ encrypted.
Specifies the location of the random seed file used by the OpenSSL
library.
The defaults are described in the main text above.
-.It Cm sign Ar file
-Specifies the location of the optional sign key file.
-This overrides
-the link
-.Pa ntpkey_sign_ Ns Ar hostname
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
.El
.It Ic keys Ar keyfile
Specifies the complete path and location of the MD5 key file
@@ -1546,7 +1525,8 @@ by default the probability of replacing it with an
entry representing the client request being processed
now is 10%. Conversely, if the oldest entry is more
than 3000 seconds old, the probability is 100%.
-.It Xo Ic restrict address
+.It Xo Ic restrict
+.Ar address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
.Op Ar flag ...
@@ -1554,21 +1534,22 @@ than 3000 seconds old, the probability is 100%.
The
.Ar address
argument expressed in
-dotted\-quad form is the address of a host or network.
+numeric form is the address of a host or network.
Alternatively, the
.Ar address
-argument can be a valid host DNS name.
+argument can be a valid hostname. When a hostname
+is provided, a restriction entry is created for each
+address the hostname resolves to, and any provided
+.Ar mask
+is ignored and an individual host mask is
+used for each entry.
The
.Ar mask
-argument expressed in dotted\-quad form defaults to
-.Cm 255.255.255.255 ,
-meaning that the
+argument expressed in numeric form defaults to
+all bits lit, meaning that the
.Ar address
is treated as the address of an individual host.
-A default entry (address
-.Cm 0.0.0.0 ,
-mask
-.Cm 0.0.0.0 )
+A default entry with address and mask all zeroes
is always included and is always the first entry in the list.
Note that text string
.Cm default ,
@@ -1605,12 +1586,12 @@ and
.Xr ntpdc @NTPDC_MS@
queries.
.It Cm kod
-If this flag is set when an access violation occurs, a kiss\-o'\-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
+If this flag is set when a rate violation occurs, a kiss\-o'\-death
+(KoD) packet is sometimes sent.
+KoD packets are rate limited to no more than one per minimum
+average interpacket spacing, set by
+.Cm discard average
+defaulting to 8s. Otherwise, no response is sent.
.It Cm limited
Deny service if the packet spacing violates the lower limits specified
in the
@@ -1700,15 +1681,13 @@ restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
UDP port (123).
-Both
+There can be two restriction entries with the same IP address if
+one specifies
.Cm ntpport
-and
-.Cm non\-ntpport
-may
-be specified.
+and the other does not.
The
.Cm ntpport
-is considered more specific and
+entry is considered more specific and
is sorted later in the list.
.It Ic "serverresponse fuzz"
When reponding to server requests,
@@ -1720,12 +1699,31 @@ Deny packets that do not match the current NTP version.
.Pp
Default restriction list entries with the flags ignore, interface,
ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+inserted into the table at startup to prevent ntpd
+from attempting to synchronize to itself, such as with
+.Cm manycastclient
+when
+.Cm manycast
+is also specified with the same multicast address.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
NTP server is unrestricted).
+.It Xo Ic delrestrict
+.Op source
+.Ar address
+.Xc
+Remove a previously\-set restriction. This is useful for
+runtime configuration via
+.Xr ntpq @NTPQ_MS@
+. If
+.Cm source
+is specified, a dynamic restriction created from the
+.Cm restrict source
+template at the time
+an association was added is removed. Without
+.Cm source
+a static restriction is removed.
.El
.Sh Automatic NTP Configuration Options
.Ss Manycasting
@@ -2462,10 +2460,6 @@ Typically (for Ethernet), a
number between 0.003 and 0.007 seconds is appropriate.
The default
when this command is not used is 0.004 seconds.
-.It Ic calldelay Ar delay
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
.It Ic driftfile Ar driftfile
This command specifies the complete path and name of the file used to
record the frequency of the local clock oscillator.
@@ -3302,7 +3296,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.keys.5man b/contrib/ntp/ntpd/ntp.keys.5man
index 24dbfcf034a9..0b83cc6187e5 100644
--- a/contrib/ntp/ntpd/ntp.keys.5man
+++ b/contrib/ntp/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "06 Jun 2023" "4.2.8p17" "File Formats"
+.TH ntp.keys 5man "25 May 2024" "4.2.8p18" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:47 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:05 AM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -176,7 +176,7 @@ the default name of the configuration file
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp.keys.5mdoc b/contrib/ntp/ntpd/ntp.keys.5mdoc
index 100320fd2330..e51bd72d47b2 100644
--- a/contrib/ntp/ntpd/ntp.keys.5mdoc
+++ b/contrib/ntp/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_KEYS 5mdoc File Formats
.Os FreeBSD 12.1-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:34 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:03:52 AM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -163,7 +163,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp.keys.html b/contrib/ntp/ntpd/ntp.keys.html
index 2d53d91f4d40..9aaef4afc73c 100644
--- a/contrib/ntp/ntpd/ntp.keys.html
+++ b/contrib/ntp/ntpd/ntp.keys.html
@@ -50,7 +50,7 @@ Next: <a href="#ntp_002ekeys-Description" accesskey="n" rel="next">ntp.keys Desc
<p>This document describes the symmetric key file for the NTP Project&rsquo;s
<code>ntpd</code> program.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntp.keys</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntp.keys</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
diff --git a/contrib/ntp/ntpd/ntp.keys.man.in b/contrib/ntp/ntpd/ntp.keys.man.in
index c646bb11e776..8d4a6a598fe8 100644
--- a/contrib/ntp/ntpd/ntp.keys.man.in
+++ b/contrib/ntp/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "06 Jun 2023" "4.2.8p17" "File Formats"
+.TH ntp.keys 5 "25 May 2024" "4.2.8p18" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:47 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:05 AM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -176,7 +176,7 @@ the default name of the configuration file
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp.keys.mdoc.in b/contrib/ntp/ntpd/ntp.keys.mdoc.in
index fdeaeba4c938..2506b51e422c 100644
--- a/contrib/ntp/ntpd/ntp.keys.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_KEYS 5 File Formats
.Os FreeBSD 12.1-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:34 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:03:52 AM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -163,7 +163,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index d9a753ee3a1e..701f5b52249e 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -42,7 +42,6 @@
#include "ntp_clockdev.h"
#include "ntp_filegen.h"
#include "ntp_stdlib.h"
-#include "lib_strbuf.h"
#include "ntp_assert.h"
#include "ntp_random.h"
/*
@@ -139,14 +138,11 @@ typedef struct peer_resolved_ctx_tag {
#define MAXPPS 20 /* maximum length of PPS device string */
/*
- * Poll Skew List
+ * Poll Skew List array has an entry for each supported poll
+ * interval.
*/
-
-static psl_item psl[17-3+1]; /* values for polls 3-17 */
- /* To simplify the runtime code we */
- /* don't want to have to special-case */
- /* dealing with a default */
-
+#define PSL_ENTRIES (NTP_MAXPOLL - NTP_MINPOLL + 1)
+static psl_item psl[PSL_ENTRIES];
/*
* Miscellaneous macros
@@ -338,7 +334,7 @@ static void config_ntpdsim(config_tree *);
static void config_ntpd(config_tree *, int/*BOOL*/ input_from_file);
static void config_other_modes(config_tree *);
static void config_auth(config_tree *);
-static void attrtopsl(int poll, attr_val *avp);
+static void attrtopsl(u_char log2_poll, attr_val *avp);
static void config_access(config_tree *);
static void config_mdnstries(config_tree *);
static void config_phone(config_tree *);
@@ -381,15 +377,9 @@ static u_int32 get_match(const char *, struct masks *);
static u_int32 get_logmask(const char *);
static int/*BOOL*/ is_refclk_addr(const address_node * addr);
-static void appendstr(char *, size_t, const char *);
-
-
-#ifndef SIM
static int getnetnum(const char *num, sockaddr_u *addr, int complain,
enum gnn_type a_type);
-#endif
-
#if defined(__GNUC__) /* this covers CLANG, too */
static void __attribute__((__noreturn__,format(printf,1,2))) fatal_error(const char *fmt, ...)
#elif defined(_MSC_VER)
@@ -1009,18 +999,24 @@ dump_config_tree(
for (rest_node = HEAD_PFIFO(ptree->restrict_opts);
rest_node != NULL;
rest_node = rest_node->link) {
- int is_default = 0;
+ int/*BOOL*/ is_default = FALSE;
+ int/*BOOL*/ omit_mask;
+ sockaddr_u mask;
+ sockaddr_u onesmask;
+ s = NULL;
+ atrv = HEAD_PFIFO(rest_node->flag_tok_fifo);
+ for (; atrv != NULL; atrv = atrv->link) {
+ if ( T_Integer == atrv->type
+ && T_Source == atrv->attr) {
+ s = keyword(T_Source);
+ break;
+ }
+ }
if (NULL == rest_node->addr) {
- s = "default";
- /* Don't need to set is_default=1 here */
- atrv = HEAD_PFIFO(rest_node->flag_tok_fifo);
- for ( ; atrv != NULL; atrv = atrv->link) {
- if ( T_Integer == atrv->type
- && T_Source == atrv->attr) {
- s = "source";
- break;
- }
+ if (NULL == s) {
+ s = keyword(T_Default);
+ /* Don't need to set is_default here */
}
} else {
const char *ap = rest_node->addr->address;
@@ -1030,25 +1026,51 @@ dump_config_tree(
mp = rest_node->mask->address;
if ( rest_node->addr->type == AF_INET
- && !strcmp(ap, "0.0.0.0")
- && !strcmp(mp, "0.0.0.0")) {
- is_default = 1;
+ && !strcmp(mp, "0.0.0.0")
+ && !strcmp(ap, mp)) {
+ is_default = TRUE;
s = "-4 default";
} else if ( rest_node->mask
&& rest_node->mask->type == AF_INET6
- && !strcmp(ap, "::")
- && !strcmp(mp, "::")) {
- is_default = 1;
+ && !strcmp(mp, "::")
+ && !strcmp(ap, mp)) {
+ is_default = TRUE;
s = "-6 default";
} else {
- s = ap;
+ if (NULL == s) {
+ s = ap;
+ } else {
+ LIB_GETBUF(s1);
+ snprintf(s1, LIB_BUFLENGTH,
+ "%s %s",
+ keyword(T_Source), ap);
+ s = s1;
+ }
+ }
+ }
+ fprintf(df, "%s %s",
+ keyword(rest_node->remove
+ ? T_Delrestrict
+ : T_Restrict),
+ s);
+ if (rest_node->mask != NULL && !is_default) {
+ ZERO(mask);
+ AF(&mask) = AF_UNSPEC;
+ omit_mask = (0 != getnetnum(rest_node->mask->address,
+ &mask, 0, t_UNK));
+ if (omit_mask) {
+ SET_HOSTMASK(&onesmask, AF(&mask));
+ omit_mask = SOCK_EQ(&mask, &onesmask);
+ }
+ if (!omit_mask) {
+ fprintf(df, " mask %s",
+ rest_node->mask->address);
}
}
- fprintf(df, "restrict %s", s);
- if (rest_node->mask != NULL && !is_default)
- fprintf(df, " mask %s",
- rest_node->mask->address);
- fprintf(df, " ippeerlimit %d", rest_node->ippeerlimit);
+ if (-1 != rest_node->ippeerlimit) {
+ fprintf(df, " ippeerlimit %d",
+ rest_node->ippeerlimit);
+ }
atrv = HEAD_PFIFO(rest_node->flag_tok_fifo);
for ( ; atrv != NULL; atrv = atrv->link) {
if ( T_Integer == atrv->type
@@ -1056,7 +1078,7 @@ dump_config_tree(
fprintf(df, " %s", keyword(atrv->attr));
}
}
- fprintf(df, "\n");
+ fprintf(df, "\n");
/**/
#if 0
msyslog(LOG_INFO, "Dumping flag_tok_fifo:");
@@ -1585,8 +1607,10 @@ create_restrict_node(
address_node * mask,
short ippeerlimit,
attr_val_fifo * flag_tok_fifo,
- int nline
- )
+ int/*BOOL*/ remove,
+ int nline,
+ int ncol
+)
{
restrict_node *my_node;
@@ -1595,7 +1619,9 @@ create_restrict_node(
my_node->mask = mask;
my_node->ippeerlimit = ippeerlimit;
my_node->flag_tok_fifo = flag_tok_fifo;
+ my_node->remove = remove;
my_node->line_no = nline;
+ my_node->column = ncol;
return my_node;
}
@@ -2193,6 +2219,7 @@ free_config_auth(
}
#endif /* FREE_CFG_T */
+
#ifndef SIM
/* Configure low-level clock-related parameters. Return TRUE if the
* clock might need adjustment like era-checking after the call, FALSE
@@ -2200,16 +2227,16 @@ free_config_auth(
*/
static int/*BOOL*/
config_tos_clock(
- config_tree *ptree
- )
+ config_tree* ptree
+)
{
int ret;
- attr_val * tos;
+ attr_val* tos;
ret = FALSE;
tos = HEAD_PFIFO(ptree->orphan_cmds);
for (; tos != NULL; tos = tos->link) {
- switch(tos->attr) {
+ switch (tos->attr) {
default:
break;
@@ -2221,12 +2248,13 @@ config_tos_clock(
}
}
- if (basedate_get_day() <= NTP_TO_UNIX_DAYS)
+ if (basedate_get_day() <= NTP_TO_UNIX_DAYS) {
basedate_set_day(basedate_eval_buildstamp() - 11);
-
+ }
return ret;
}
-#endif /* SIM */
+#endif /* !SIM */
+
static void
config_tos(
@@ -2427,21 +2455,22 @@ free_config_tos(
static void
config_monitor(
- config_tree *ptree
- )
+ config_tree* ptree
+)
{
- int_node *pfilegen_token;
- const char *filegen_string;
- const char *filegen_file;
- FILEGEN *filegen;
- filegen_node *my_node;
- attr_val *my_opts;
- int filegen_type;
- int filegen_flag;
+ int_node * pfilegen_token;
+ const char * filegen_string;
+ const char * filegen_file;
+ FILEGEN * filegen;
+ filegen_node * my_node;
+ attr_val* my_opts;
+ int filegen_type;
+ int filegen_flag;
/* Set the statistics directory */
- if (ptree->stats_dir)
- stats_config(STATS_STATSDIR, ptree->stats_dir, 0);
+ if (ptree->stats_dir) {
+ stats_config(STATS_STATSDIR, ptree->stats_dir, TRUE);
+ }
/* NOTE:
* Calling filegen_get is brain dead. Doing a string
@@ -2612,19 +2641,19 @@ config_access(
struct addrinfo * ai_list;
struct addrinfo * pai;
int rc;
- int restrict_default;
+ int/*BOOL*/ success;
+ int/*BOOL*/ restrict_default;
u_short rflags;
u_short mflags;
short ippeerlimit;
int range_err;
- psl_item my_psl_item;
attr_val * atrv;
attr_val * dflt_psl_atr;
const char * signd_warning =
#ifdef HAVE_NTP_SIGND
- "MS-SNTP signd operations currently block ntpd degrading service to all clients.";
+ "MS-SNTP signd operations currently block ntpd degrading service to all clients.\n";
#else
- "mssntp restrict bit ignored, this ntpd was configured without --enable-ntp-signd.";
+ "mssntp restrict bit ignored, this ntpd was configured without --enable-ntp-signd.\n";
#endif
/* Configure the mru options */
@@ -2829,28 +2858,31 @@ config_access(
}
if ((RES_MSSNTP & rflags) && !warned_signd) {
- warned_signd = 1;
- fprintf(stderr, "%s\n", signd_warning);
+ warned_signd = TRUE;
+ fprintf(stderr, "%s", signd_warning);
msyslog(LOG_WARNING, "%s", signd_warning);
}
- /* It would be swell if we could identify the line number */
if ((RES_KOD & rflags) && !(RES_LIMITED & rflags)) {
const char *kod_where = (my_node->addr)
? my_node->addr->address
: (mflags & RESM_SOURCE)
? "source"
: "default";
- const char *kod_warn = "KOD does nothing without LIMITED.";
-
- fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn);
- msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn);
+ const char *kod_warn = "'kod' does nothing without 'limited'.\n";
+
+ fprintf(stderr, "line %d col %d restrict %s: %s",
+ my_node->line_no, my_node->column,
+ kod_where, kod_warn);
+ msyslog(LOG_WARNING, "line %d col %d restrict %s: %s",
+ my_node->line_no, my_node->column,
+ kod_where, kod_warn);
}
ZERO_SOCK(&addr);
ai_list = NULL;
pai = NULL;
- restrict_default = 0;
+ restrict_default = FALSE;
if (NULL == my_node->addr) {
ZERO_SOCK(&mask);
@@ -2860,13 +2892,18 @@ config_access(
* without a -4 / -6 qualifier, add to
* both lists
*/
- restrict_default = 1;
+ restrict_default = TRUE;
} else {
/* apply "restrict source ..." */
- DPRINTF(1, ("restrict source template ippeerlimit %d mflags %x rflags %x\n",
- ippeerlimit, mflags, rflags));
- hack_restrict(RESTRICT_FLAGS, NULL, NULL,
- ippeerlimit, mflags, rflags, 0);
+ success = hack_restrict(RESTRICT_FLAGS,
+ NULL, NULL,
+ ippeerlimit,
+ mflags, rflags,
+ 0);
+ if (!success) {
+ msyslog(LOG_ERR,
+ "unable to save restrict source");
+ }
continue;
}
} else {
@@ -2898,33 +2935,37 @@ config_access(
&ai_list);
if (rc) {
msyslog(LOG_ERR,
- "restrict: ignoring line %d, address/host '%s' unusable.",
+ "restrict: line %d col %d"
+ " address/host '%s' unusable.",
my_node->line_no,
+ my_node->column,
my_node->addr->address);
continue;
}
INSIST(ai_list != NULL);
pai = ai_list;
INSIST(pai->ai_addr != NULL);
- INSIST(sizeof(addr) >=
- pai->ai_addrlen);
+ INSIST(sizeof(addr) >= pai->ai_addrlen);
memcpy(&addr, pai->ai_addr,
pai->ai_addrlen);
INSIST(AF_INET == AF(&addr) ||
AF_INET6 == AF(&addr));
}
+ /* default to all-ones mask for single address */
SET_HOSTMASK(&mask, AF(&addr));
- /* Resolve the mask */
- if (my_node->mask) {
+ /* Ignore mask if addr from hostname [Bug 3872] */
+ if (NULL == ai_list && my_node->mask) {
ZERO_SOCK(&mask);
AF(&mask) = my_node->mask->type;
if (getnetnum(my_node->mask->address,
&mask, 1, t_MSK) != 1) {
msyslog(LOG_ERR,
- "restrict: ignoring line %d, mask '%s' unusable.",
+ "restrict: line %d col %d"
+ " mask '%s' unusable.",
my_node->line_no,
+ my_node->column,
my_node->mask->address);
continue;
}
@@ -2935,15 +2976,43 @@ config_access(
if (restrict_default) {
AF(&addr) = AF_INET;
AF(&mask) = AF_INET;
- hack_restrict(RESTRICT_FLAGS, &addr, &mask,
- ippeerlimit, mflags, rflags, 0);
+ success = hack_restrict(
+ RESTRICT_FLAGS,
+ &addr,
+ &mask,
+ ippeerlimit,
+ mflags,
+ rflags,
+ 0
+ );
+ if (!success) {
+ msyslog(LOG_ERR,
+ "unable to save %s %s restriction",
+ stoa(&addr), stoa(&mask));
+ }
AF(&addr) = AF_INET6;
AF(&mask) = AF_INET6;
}
do {
- hack_restrict(RESTRICT_FLAGS, &addr, &mask,
- ippeerlimit, mflags, rflags, 0);
+ success = hack_restrict(
+ my_node->remove
+ ? RESTRICT_REMOVE
+ : RESTRICT_FLAGS,
+ &addr,
+ &mask,
+ ippeerlimit,
+ mflags,
+ rflags,
+ 0);
+ if (!success) {
+ msyslog(LOG_ERR,
+ "unable to %s %s %s restriction",
+ my_node->remove
+ ? "delete"
+ : "save",
+ stoa(&addr), stoa(&mask));
+ }
if (pai != NULL &&
NULL != (pai = pai->ai_next)) {
INSIST(pai->ai_addr != NULL);
@@ -2958,61 +3027,42 @@ config_access(
}
} while (pai != NULL);
- if (ai_list != NULL)
+ if (ai_list != NULL) {
freeaddrinfo(ai_list);
+ }
}
- /* Deal with the Poll Skew List */
-
+ /*
+ * pollskewlist
+ */
+ atrv = HEAD_PFIFO(ptree->pollskewlist);
+ if (NULL == atrv) {
+ /* don't touch the poll skew list */
+ return;
+ }
ZERO(psl);
- ZERO(my_psl_item);
-
/*
* First, find the last default pollskewlist item.
- * There should only be one of these with the current grammar,
- * but better safe than sorry.
*/
dflt_psl_atr = NULL;
- atrv = HEAD_PFIFO(ptree->pollskewlist);
for ( ; atrv != NULL; atrv = atrv->link) {
- switch (atrv->attr) {
- case -1: /* default */
+ if (-1 == atrv->attr) { /* default */
dflt_psl_atr = atrv;
- break;
-
- case 3: /* Fall through */
- case 4: /* Fall through */
- case 5: /* Fall through */
- case 6: /* Fall through */
- case 7: /* Fall through */
- case 8: /* Fall through */
- case 9: /* Fall through */
- case 10: /* Fall through */
- case 11: /* Fall through */
- case 12: /* Fall through */
- case 13: /* Fall through */
- case 14: /* Fall through */
- case 15: /* Fall through */
- case 16: /* Fall through */
- case 17:
- /* ignore */
- break;
-
- default:
+ } else if ( atrv->attr < NTP_MINPOLL
+ || atrv->attr > NTP_MAXPOLL) {
msyslog(LOG_ERR,
- "config_access: default PSL scan: ignoring unexpected poll value %d",
- atrv->attr);
- break;
+ "Poll %d out of bounds [%d-%d] for pollskewlist",
+ atrv->attr, NTP_MINPOLL, NTP_MAXPOLL);
}
}
- /* If we have a nonzero default, initialize the PSL */
+ /* If we have a nonzero default, put it in all entries */
if ( dflt_psl_atr
&& ( 0 != dflt_psl_atr->value.r.first
|| 0 != dflt_psl_atr->value.r.last)) {
int i;
- for (i = 3; i <= 17; ++i) {
+ for (i = NTP_MINPOLL; i <= NTP_MAXPOLL; ++i) {
attrtopsl(i, dflt_psl_atr);
}
}
@@ -3020,38 +3070,15 @@ config_access(
/* Finally, update the PSL with any explicit entries */
atrv = HEAD_PFIFO(ptree->pollskewlist);
for ( ; atrv != NULL; atrv = atrv->link) {
- switch (atrv->attr) {
- case -1: /* default */
- /* Ignore */
- break;
-
- case 3: /* Fall through */
- case 4: /* Fall through */
- case 5: /* Fall through */
- case 6: /* Fall through */
- case 7: /* Fall through */
- case 8: /* Fall through */
- case 9: /* Fall through */
- case 10: /* Fall through */
- case 11: /* Fall through */
- case 12: /* Fall through */
- case 13: /* Fall through */
- case 14: /* Fall through */
- case 15: /* Fall through */
- case 16: /* Fall through */
- case 17:
+ if (atrv->attr >= NTP_MINPOLL && atrv->attr <= NTP_MAXPOLL) {
attrtopsl(atrv->attr, atrv);
- break;
-
- default:
- break; /* Ignore - we reported this above */
}
}
#if 0
int p;
msyslog(LOG_INFO, "Dumping PSL:");
- for (p = 3; p <= 17; ++p) {
+ for (p = NTP_MINPOLL; p <= NTP_MAXPOLL; ++p) {
psl_item psi;
if (0 == get_pollskew(p, &psi)) {
@@ -3065,43 +3092,40 @@ config_access(
}
-void
-attrtopsl(int poll, attr_val *avp)
+static void
+attrtopsl(
+ u_char log2_poll,
+ attr_val * avp
+ )
{
+ int pao = log2_poll - NTP_MINPOLL; /* poll array offset */
+ u_int32 lower = (u_short)avp->value.r.first; /* ntp_parser.y ensures */
+ u_int32 upper = (u_short)avp->value.r.last; /* non-neg. first/last */
+ u_int psmax = 1 << (log2_poll - 1);
+ u_int32 qmsk;
- DEBUG_INSIST((poll - 3) < sizeof psl);
- if (poll < 3 || poll > 17) {
- msyslog(LOG_ERR, "attrtopsl(%d, ...): Poll value is out of range - ignoring", poll);
- } else {
- int pao = poll - 3; /* poll array offset */
- int lower = avp->value.r.first; /* a positive number */
- int upper = avp->value.r.last;
- int psmax = 1 << (poll - 1);
- int qmsk;
-
- if (lower > psmax) {
- msyslog(LOG_WARNING, "attrtopsl: default: poll %d lower bound reduced from %d to %d",
- poll, lower, psmax);
- lower = psmax;
- }
- if (upper > psmax) {
- msyslog(LOG_WARNING, "attrtopsl: default: poll %d upper bound reduced from %d to %d",
- poll, upper, psmax);
- upper = psmax;
- }
- psl[pao].sub = lower;
- psl[pao].qty = lower + upper;
+ DEBUG_INSIST(pao >= 0 && pao < COUNTOF(psl));
- qmsk = 1;
- while (qmsk < (lower + upper)) {
- qmsk <<= 1;
- qmsk |= 1;
- };
- psl[pao].msk = qmsk;
+ if (lower > psmax) {
+ msyslog(LOG_WARNING, "pollskewlist %d lower bound reduced from %d to %d",
+ log2_poll, lower, psmax);
+ lower = psmax;
+ }
+ if (upper > psmax) {
+ msyslog(LOG_WARNING, "pollskewlist %d upper bound reduced from %d to %d",
+ log2_poll, upper, psmax);
+ upper = psmax;
}
+ psl[pao].sub = lower;
+ psl[pao].qty = lower + upper;
- return;
-}
+ qmsk = 1;
+ while (qmsk < (lower + upper)) {
+ qmsk <<= 1;
+ qmsk |= 1;
+ }
+ psl[pao].msk = qmsk;
+}
#endif /* !SIM */
@@ -3111,16 +3135,14 @@ get_pollskew(
psl_item *rv
)
{
-
#ifdef DISABLE_BUG3767_FIX
- DEBUG_INSIST(3 <= p && 17 >= p);
+ DEBUG_INSIST(NTP_MINPOLL <= p && NTP_MAXPOLL >= p);
#endif
- if (3 <= p && 17 >= p) {
- *rv = psl[p - 3];
-
+ if (NTP_MINPOLL <= p && p <= NTP_MAXPOLL) {
+ *rv = psl[p - NTP_MINPOLL];
return 0;
} else {
- msyslog(LOG_ERR, "get_pollskew(%d): poll is not between 3 and 17!", p);
+ msyslog(LOG_DEBUG, "get_pollskew(%d): out of range", p);
return -1;
}
@@ -3339,9 +3361,13 @@ config_nic_rules(
if_name = estrdup(if_name);
switch (curr_node->match_class) {
-
default:
+#ifdef DEBUG
fatal_error("config_nic_rules: match-class-token=%d", curr_node->match_class);
+#endif
+ case T_All:
+ match_type = MATCH_ALL;
+ break;
case 0:
/*
@@ -3372,10 +3398,6 @@ config_nic_rules(
}
break;
- case T_All:
- match_type = MATCH_ALL;
- break;
-
case T_Ipv4:
match_type = MATCH_IPV4;
break;
@@ -3390,10 +3412,10 @@ config_nic_rules(
}
switch (curr_node->action) {
-
default:
+#ifdef DEBUG
fatal_error("config_nic_rules: action-token=%d", curr_node->action);
-
+#endif
case T_Listen:
action = ACTION_LISTEN;
break;
@@ -3409,7 +3431,9 @@ config_nic_rules(
add_nic_rule(match_type, if_name, prefixlen,
action);
- timer_interfacetimeout(current_time + 2);
+ if (!initializing && !scan_addrs_once) {
+ endpt_scan_timer = 1 + current_time;
+ }
if (if_name != NULL)
free(if_name);
}
@@ -3733,7 +3757,7 @@ config_trap(
attr_val *curr_opt;
sockaddr_u addr_sock;
sockaddr_u peeraddr;
- struct interface *localaddr;
+ endpt *localaddr;
struct addrinfo hints;
char port_text[8];
settrap_parms *pstp;
@@ -3867,7 +3891,7 @@ trap_name_resolved(
)
{
settrap_parms *pstp;
- struct interface *localaddr;
+ endpt *localaddr;
sockaddr_u peeraddr;
(void)gai_errno;
@@ -3920,7 +3944,7 @@ config_fudge(
sockaddr_u addr_sock;
address_node *addr_node;
struct refclockstat clock_stat;
- char refid_str[5];
+ char refidstr[5];
int err_flag;
curr_fudge = HEAD_PFIFO(ptree->fudge);
@@ -3951,9 +3975,6 @@ config_fudge(
clock_stat.fudgeminjitter = 0.0;
clock_stat.fudgetime1 = 0.0;
clock_stat.fudgetime2 = 0.0;
- clock_stat.p_lastcode = NULL;
- clock_stat.clockdesc = NULL;
- clock_stat.kv_list = NULL;
curr_opt = HEAD_PFIFO(curr_fudge->options);
for (; curr_opt != NULL; curr_opt = curr_opt->link) {
switch (curr_opt->attr) {
@@ -3975,10 +3996,17 @@ config_fudge(
case T_Refid:
clock_stat.haveflags |= CLK_HAVEVAL2;
- /* strncpy() does exactly what we want here: */
- strncpy(refid_str, curr_opt->value.s,
- sizeof refid_str - 1);
- memcpy(&clock_stat.fudgeval2, refid_str,
+ /*
+ * strncpy() does exactly what we want
+ * here, do not be tempted to replace
+ * it with strlcpy(), we want it to
+ * zero-fill refid's less than 4 chars
+ * because we're going to stuff it
+ * into a u_int32.
+ */
+ strncpy(refidstr, curr_opt->value.s,
+ sizeof refidstr - 1);
+ memcpy(&clock_stat.fudgeval2, refidstr,
sizeof clock_stat.fudgeval2);
break;
@@ -4140,7 +4168,7 @@ config_vars(
case T_Driftfile:
if ('\0' == curr_var->value.s[0])
msyslog(LOG_INFO, "config: driftfile disabled");
- stats_config(STATS_FREQ_FILE, curr_var->value.s, 0);
+ stats_config(STATS_FREQ_FILE, curr_var->value.s, TRUE);
break;
case T_Dscp:
@@ -4158,7 +4186,7 @@ config_vars(
break;
case T_Leapfile:
- stats_config(STATS_LEAP_FILE, curr_var->value.s, curr_var->flag);
+ stats_config(STATS_LEAP_FILE, curr_var->value.s, curr_var->flag);
break;
#ifdef LEAP_SMEAR
@@ -5165,13 +5193,13 @@ getconfig(
}
cfgt.source.value.s = estrdup(alt_config_file);
#endif /* SYS_WINNT */
- } else
+ } else {
cfgt.source.value.s = estrdup(config_file);
-
+ }
/*** BULK OF THE PARSER ***/
#ifdef DEBUG
- yydebug = !!(debug >= 5);
+ yydebug = (debug >= 9);
#endif
yyparse();
lex_drop_stack();
@@ -5311,10 +5339,9 @@ normal_dtoa(
pch_nz = pch_e;
while ('0' == *pch_nz)
pch_nz++;
- if (pch_nz == pch_e)
- return buf;
- strlcpy(pch_e, pch_nz, LIB_BUFLENGTH - (pch_e - buf));
-
+ if (pch_nz > pch_e) {
+ memmove(pch_e, pch_nz, 1 + strlen(pch_nz));
+ }
return buf;
}
@@ -5576,12 +5603,11 @@ gettokens_netinfo (
* returns 1 for success, and mysteriously, 0 for most failures, and
* -1 if the address found is IPv6 and we believe IPv6 isn't working.
*/
-#ifndef SIM
static int
getnetnum(
const char *num,
sockaddr_u *addr,
- int complain,
+ int complain, /* ignored */
enum gnn_type a_type /* ignored */
)
{
@@ -5589,22 +5615,21 @@ getnetnum(
AF_INET == AF(addr) ||
AF_INET6 == AF(addr));
- if (!is_ip_address(num, AF(addr), addr))
+ if (!is_ip_address(num, AF(addr), addr)) {
return 0;
-
- if (IS_IPV6(addr) && !ipv6_works)
- return -1;
-
+ }
# ifdef ISC_PLATFORM_HAVESALEN
addr->sa.sa_len = SIZEOF_SOCKADDR(AF(addr));
# endif
SET_PORT(addr, NTP_PORT);
- DPRINTF(2, ("getnetnum given %s, got %s\n", num, stoa(addr)));
-
- return 1;
+ if (IS_IPV6(addr) && !ipv6_works) {
+ return -1;
+ } else {
+ return 1;
+ }
}
-#endif /* !SIM */
+
#if defined(HAVE_SETRLIMIT)
void
@@ -5684,228 +5709,3 @@ ntp_rlimit(
}
}
#endif /* HAVE_SETRLIMIT */
-
-
-char *
-build_iflags(
- u_int32 iflags
- )
-{
- static char ifs[1024];
-
- ifs[0] = '\0';
-
- if (iflags & INT_UP) {
- iflags &= ~INT_UP;
- appendstr(ifs, sizeof ifs, "up");
- }
-
- if (iflags & INT_PPP) {
- iflags &= ~INT_PPP;
- appendstr(ifs, sizeof ifs, "ppp");
- }
-
- if (iflags & INT_LOOPBACK) {
- iflags &= ~INT_LOOPBACK;
- appendstr(ifs, sizeof ifs, "loopback");
- }
-
- if (iflags & INT_BROADCAST) {
- iflags &= ~INT_BROADCAST;
- appendstr(ifs, sizeof ifs, "broadcast");
- }
-
- if (iflags & INT_MULTICAST) {
- iflags &= ~INT_MULTICAST;
- appendstr(ifs, sizeof ifs, "multicast");
- }
-
- if (iflags & INT_BCASTOPEN) {
- iflags &= ~INT_BCASTOPEN;
- appendstr(ifs, sizeof ifs, "bcastopen");
- }
-
- if (iflags & INT_MCASTOPEN) {
- iflags &= ~INT_MCASTOPEN;
- appendstr(ifs, sizeof ifs, "mcastopen");
- }
-
- if (iflags & INT_WILDCARD) {
- iflags &= ~INT_WILDCARD;
- appendstr(ifs, sizeof ifs, "wildcard");
- }
-
- if (iflags & INT_MCASTIF) {
- iflags &= ~INT_MCASTIF;
- appendstr(ifs, sizeof ifs, "MCASTif");
- }
-
- if (iflags & INT_PRIVACY) {
- iflags &= ~INT_PRIVACY;
- appendstr(ifs, sizeof ifs, "IPv6privacy");
- }
-
- if (iflags & INT_BCASTXMIT) {
- iflags &= ~INT_BCASTXMIT;
- appendstr(ifs, sizeof ifs, "bcastxmit");
- }
-
- if (iflags) {
- char string[10];
-
- snprintf(string, sizeof string, "%0x", iflags);
- appendstr(ifs, sizeof ifs, string);
- }
-
- return ifs;
-}
-
-
-char *
-build_mflags(
- u_short mflags
- )
-{
- static char mfs[1024];
-
- mfs[0] = '\0';
-
- if (mflags & RESM_NTPONLY) {
- mflags &= ~RESM_NTPONLY;
- appendstr(mfs, sizeof mfs, "ntponly");
- }
-
- if (mflags & RESM_SOURCE) {
- mflags &= ~RESM_SOURCE;
- appendstr(mfs, sizeof mfs, "source");
- }
-
- if (mflags) {
- char string[10];
-
- snprintf(string, sizeof string, "%0x", mflags);
- appendstr(mfs, sizeof mfs, string);
- }
-
- return mfs;
-}
-
-
-char *
-build_rflags(
- u_short rflags
- )
-{
- static char rfs[1024];
-
- rfs[0] = '\0';
-
- if (rflags & RES_FLAKE) {
- rflags &= ~RES_FLAKE;
- appendstr(rfs, sizeof rfs, "flake");
- }
-
- if (rflags & RES_IGNORE) {
- rflags &= ~RES_IGNORE;
- appendstr(rfs, sizeof rfs, "ignore");
- }
-
- if (rflags & RES_KOD) {
- rflags &= ~RES_KOD;
- appendstr(rfs, sizeof rfs, "kod");
- }
-
- if (rflags & RES_MSSNTP) {
- rflags &= ~RES_MSSNTP;
- appendstr(rfs, sizeof rfs, "mssntp");
- }
-
- if (rflags & RES_LIMITED) {
- rflags &= ~RES_LIMITED;
- appendstr(rfs, sizeof rfs, "limited");
- }
-
- if (rflags & RES_LPTRAP) {
- rflags &= ~RES_LPTRAP;
- appendstr(rfs, sizeof rfs, "lptrap");
- }
-
- if (rflags & RES_NOMODIFY) {
- rflags &= ~RES_NOMODIFY;
- appendstr(rfs, sizeof rfs, "nomodify");
- }
-
- if (rflags & RES_NOMRULIST) {
- rflags &= ~RES_NOMRULIST;
- appendstr(rfs, sizeof rfs, "nomrulist");
- }
-
- if (rflags & RES_NOEPEER) {
- rflags &= ~RES_NOEPEER;
- appendstr(rfs, sizeof rfs, "noepeer");
- }
-
- if (rflags & RES_NOPEER) {
- rflags &= ~RES_NOPEER;
- appendstr(rfs, sizeof rfs, "nopeer");
- }
-
- if (rflags & RES_NOQUERY) {
- rflags &= ~RES_NOQUERY;
- appendstr(rfs, sizeof rfs, "noquery");
- }
-
- if (rflags & RES_DONTSERVE) {
- rflags &= ~RES_DONTSERVE;
- appendstr(rfs, sizeof rfs, "dontserve");
- }
-
- if (rflags & RES_NOTRAP) {
- rflags &= ~RES_NOTRAP;
- appendstr(rfs, sizeof rfs, "notrap");
- }
-
- if (rflags & RES_DONTTRUST) {
- rflags &= ~RES_DONTTRUST;
- appendstr(rfs, sizeof rfs, "notrust");
- }
-
- if (rflags & RES_SRVRSPFUZ) {
- rflags &= ~RES_SRVRSPFUZ;
- appendstr(rfs, sizeof rfs, "srvrspfuz");
- }
-
- if (rflags & RES_VERSION) {
- rflags &= ~RES_VERSION;
- appendstr(rfs, sizeof rfs, "version");
- }
-
- if (rflags) {
- char string[10];
-
- snprintf(string, sizeof string, "%0x", rflags);
- appendstr(rfs, sizeof rfs, string);
- }
-
- if ('\0' == rfs[0]) {
- appendstr(rfs, sizeof rfs, "(none)");
- }
-
- return rfs;
-}
-
-
-static void
-appendstr(
- char *string,
- size_t s,
- const char *new
- )
-{
- if (*string != '\0') {
- (void)strlcat(string, ",", s);
- }
- (void)strlcat(string, new, s);
-
- return;
-}
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index 0cc7fcb47ecd..6756fa0300c1 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -26,7 +26,6 @@
#include "ntp_crypto.h"
#include "ntp_assert.h"
#include "ntp_leapsec.h"
-#include "lib_strbuf.h"
#include "timexsup.h"
#include <rc_cmdlength.h>
@@ -110,7 +109,7 @@ static int validate_nonce (const char *, struct recvbuf *);
static void req_nonce (struct recvbuf *, int);
static void unset_trap (struct recvbuf *, int);
static struct ctl_trap *ctlfindtrap(sockaddr_u *,
- struct interface *);
+ endpt *);
int/*BOOL*/ is_safe_filename(const char * name);
@@ -804,7 +803,7 @@ static int datalinelen;
static int datasent; /* flag to avoid initial ", " */
static int datanotbinflag;
static sockaddr_u *rmt_addr;
-static struct interface *lcl_inter;
+static endpt *lcl_inter;
static u_char res_authenticate;
static u_char res_authokay;
@@ -3179,8 +3178,8 @@ ctl_getitem(
if (quiet_until <= current_time) {
quiet_until = current_time + 300;
msyslog(LOG_WARNING,
- "Possible 'ntpdx' exploit from %s#%u (possibly spoofed)",
- stoa(rmt_addr), SRCPORT(rmt_addr));
+ "Possible 'ntpdx' exploit from %s (possibly spoofed)",
+ sptoa(rmt_addr));
}
reqpt = reqend; /* never again for this packet! */
return NULL;
@@ -3634,8 +3633,13 @@ static void configure(
/*
- * derive_nonce - generate client-address-specific nonce value
- * associated with a given timestamp.
+ * derive_nonce - generate 32-bit nonce value derived from the client
+ * address and a request-specific timestamp.
+ *
+ * This uses MD5 for a non-authentication purpose -- the nonce is used
+ * analogous to the TCP 3-way handshake to confirm the UDP client can
+ * receive traffic from which it claims to originate, that is, to
+ * prevent spoofed requests leading to reflected amplification.
*/
static u_int32 derive_nonce(
sockaddr_u * addr,
@@ -3645,13 +3649,11 @@ static u_int32 derive_nonce(
{
static u_int32 salt[4];
static u_long last_salt_update;
+ MD5_CTX ctx;
union d_tag {
- u_char digest[EVP_MAX_MD_SIZE];
+ u_char digest[MD5_DIGEST_LENGTH];
u_int32 extract;
} d;
- EVP_MD_CTX *ctx;
- u_int len;
- int rc;
while (!salt[0] || current_time - last_salt_update >= 3600) {
salt[0] = ntp_random();
@@ -3661,32 +3663,18 @@ static u_int32 derive_nonce(
last_salt_update = current_time;
}
- ctx = EVP_MD_CTX_new();
-# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
- /* [Bug 3457] set flags and don't kill them again */
- EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
- rc = EVP_DigestInit_ex(ctx, EVP_get_digestbynid(NID_md5), NULL);
-# else
- rc = EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5));
-# endif
- if (!rc) {
- msyslog(LOG_ERR, "EVP_DigestInit failed in '%s'", __func__);
- return (0);
+ MD5Init(&ctx);
+ MD5Update(&ctx, salt, sizeof(salt));
+ MD5Update(&ctx, &ts_i, sizeof(ts_i));
+ MD5Update(&ctx, &ts_f, sizeof(ts_f));
+ if (IS_IPV4(addr)) {
+ MD5Update(&ctx, &SOCK_ADDR4(addr), sizeof(SOCK_ADDR4(addr)));
+ } else {
+ MD5Update(&ctx, &SOCK_ADDR6(addr), sizeof(SOCK_ADDR6(addr)));
}
-
- EVP_DigestUpdate(ctx, salt, sizeof(salt));
- EVP_DigestUpdate(ctx, &ts_i, sizeof(ts_i));
- EVP_DigestUpdate(ctx, &ts_f, sizeof(ts_f));
- if (IS_IPV4(addr))
- EVP_DigestUpdate(ctx, &SOCK_ADDR4(addr),
- sizeof(SOCK_ADDR4(addr)));
- else
- EVP_DigestUpdate(ctx, &SOCK_ADDR6(addr),
- sizeof(SOCK_ADDR6(addr)));
- EVP_DigestUpdate(ctx, &NSRCPORT(addr), sizeof(NSRCPORT(addr)));
- EVP_DigestUpdate(ctx, salt, sizeof(salt));
- EVP_DigestFinal(ctx, d.digest, &len);
- EVP_MD_CTX_free(ctx);
+ MD5Update(&ctx, &NSRCPORT(addr), sizeof(NSRCPORT(addr)));
+ MD5Update(&ctx, salt, sizeof(salt));
+ MD5Final(d.digest, &ctx);
return d.extract;
}
@@ -3986,7 +3974,7 @@ static void read_mru_list(
int mincount;
u_int maxlstint;
sockaddr_u laddr;
- struct interface * lcladr;
+ endpt * lcladr;
u_int count;
u_int ui;
u_int uf;
@@ -4787,7 +4775,7 @@ unset_trap(
int
ctlsettrap(
sockaddr_u *raddr,
- struct interface *linter,
+ endpt *linter,
int traptype,
int version
)
@@ -4910,7 +4898,7 @@ ctlsettrap(
int
ctlclrtrap(
sockaddr_u *raddr,
- struct interface *linter,
+ endpt *linter,
int traptype
)
{
@@ -4935,7 +4923,7 @@ ctlclrtrap(
static struct ctl_trap *
ctlfindtrap(
sockaddr_u *raddr,
- struct interface *linter
+ endpt *linter
)
{
size_t n;
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index a5d8954a06b6..94f5f3c57ce9 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -267,17 +267,10 @@ session_key(
hdlen = 10 * sizeof(u_int32);
break;
}
- ctx = EVP_MD_CTX_new();
-# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
- /* [Bug 3457] set flags and don't kill them again */
- EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
- EVP_DigestInit_ex(ctx, EVP_get_digestbynid(crypto_nid), NULL);
-# else
+ ctx = digest_ctx;
EVP_DigestInit(ctx, EVP_get_digestbynid(crypto_nid));
-# endif
EVP_DigestUpdate(ctx, (u_char *)header, hdlen);
EVP_DigestFinal(ctx, dgst, &len);
- EVP_MD_CTX_free(ctx);
memcpy(&keyid, dgst, 4);
keyid = ntohl(keyid);
if (lifetime != 0) {
@@ -308,7 +301,7 @@ session_key(
int
make_keylist(
struct peer *peer, /* peer structure pointer */
- struct interface *dstadr /* interface */
+ endpt *dstadr /* interface */
)
{
EVP_MD_CTX *ctx; /* signature context */
@@ -389,7 +382,7 @@ make_keylist(
if (tstamp != 0) {
if (vp->sig == NULL)
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)vp, 12);
EVP_SignUpdate(ctx, vp->ptr, sizeof(struct autokey));
@@ -398,7 +391,6 @@ make_keylist(
vp->siglen = htonl(len);
peer->flags |= FLAG_ASSOC;
}
- EVP_MD_CTX_free(ctx);
}
DPRINTF(1, ("make_keys: %d %08x %08x ts %u fs %u poll %d\n",
peer->keynumber, keyid, cookie, ntohl(vp->tstamp),
@@ -834,7 +826,7 @@ crypto_recv(
* errors.
*/
if (vallen == (u_int)EVP_PKEY_size(host_pkey)) {
- RSA *rsa = EVP_PKEY_get0_RSA(host_pkey);
+ RSA *rsa = EVP_PKEY_get1_RSA(host_pkey);
u_int32 *cookiebuf = malloc(RSA_size(rsa));
if (!cookiebuf) {
rval = XEVNT_CKY;
@@ -853,6 +845,7 @@ crypto_recv(
cookie = ntohl(*cookiebuf);
free(cookiebuf);
}
+ RSA_free(rsa);
} else {
rval = XEVNT_CKY;
break;
@@ -1548,16 +1541,15 @@ crypto_verify(
* signature. If the identity exchange is verified, light the
* proventic bit. What a relief.
*/
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_VerifyInit(ctx, peer->digest);
- /* XXX: the "+ 12" needs to be at least documented... */
- EVP_VerifyUpdate(ctx, (u_char *)&ep->tstamp, vallen + 12);
+ EVP_VerifyUpdate(ctx, (u_char *)&ep->tstamp, vallen +
+ sizeof(ep->tstamp) + sizeof(ep->fstamp) +
+ sizeof(ep->vallen));
if (EVP_VerifyFinal(ctx, (u_char *)&ep->pkt[i], siglen,
pkey) <= 0) {
- EVP_MD_CTX_free(ctx);
return (XEVNT_SIG);
}
- EVP_MD_CTX_free(ctx);
if (peer->crypto & CRYPTO_FLAG_VRFY)
peer->crypto |= CRYPTO_FLAG_PROV;
@@ -1583,6 +1575,7 @@ crypto_encrypt(
)
{
EVP_PKEY *pkey; /* public key */
+ RSA* rsa; /* public key */
EVP_MD_CTX *ctx; /* signature context */
tstamp_t tstamp; /* NTP timestamp */
u_int32 temp32;
@@ -1610,8 +1603,9 @@ crypto_encrypt(
vp->ptr = emalloc(vallen);
puch = vp->ptr;
temp32 = htonl(*cookie);
- if (RSA_public_encrypt(4, (u_char *)&temp32, puch,
- EVP_PKEY_get0_RSA(pkey), RSA_PKCS1_OAEP_PADDING) <= 0) {
+ rsa = EVP_PKEY_get1_RSA(pkey);
+ if (RSA_public_encrypt(4, (u_char *)&temp32, puch, rsa,
+ RSA_PKCS1_OAEP_PADDING) <= 0) {
msyslog(LOG_ERR, "crypto_encrypt: %s",
ERR_error_string(ERR_get_error(), NULL));
free(vp->ptr);
@@ -1619,11 +1613,14 @@ crypto_encrypt(
return (XEVNT_CKY);
}
EVP_PKEY_free(pkey);
+ pkey = NULL;
+ RSA_free(rsa);
+ rsa = NULL;
if (tstamp == 0)
return (XEVNT_OK);
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, vallen);
@@ -1631,7 +1628,6 @@ crypto_encrypt(
INSIST(vallen <= sign_siglen);
vp->siglen = htonl(vallen);
}
- EVP_MD_CTX_free(ctx);
return (XEVNT_OK);
}
@@ -1849,7 +1845,7 @@ crypto_update(void)
if (hostval.tstamp == 0)
return;
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
/*
* Sign public key and timestamps. The filestamp is derived from
@@ -1945,7 +1941,6 @@ crypto_update(void)
ntohl(hostval.tstamp));
record_crypto_stats(NULL, statstr);
DPRINTF(1, ("crypto_update: %s\n", statstr));
- EVP_MD_CTX_free(ctx);
}
/*
@@ -2003,7 +1998,7 @@ value_free(
* Returns NTP seconds if in synch, 0 otherwise
*/
tstamp_t
-crypto_time()
+crypto_time(void)
{
l_fp tstamp; /* NTP time */
@@ -2075,7 +2070,7 @@ asn_to_calendar (
/*
- * bigdig() - compute a BIGNUM MD5 hash of a BIGNUM number.
+ * bighash() - compute a BIGNUM MD5 hash of a BIGNUM number.
*
* Returns void (no errors)
*/
@@ -2093,17 +2088,10 @@ bighash(
len = BN_num_bytes(bn);
ptr = emalloc(len);
BN_bn2bin(bn, ptr);
- ctx = EVP_MD_CTX_new();
-# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
- /* [Bug 3457] set flags and don't kill them again */
- EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
- EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
-# else
+ ctx = digest_ctx;
EVP_DigestInit(ctx, EVP_md5());
-# endif
EVP_DigestUpdate(ctx, ptr, len);
EVP_DigestFinal(ctx, dgst, &len);
- EVP_MD_CTX_free(ctx);
BN_bin2bn(dgst, len, bk);
free(ptr);
}
@@ -2169,12 +2157,12 @@ crypto_alice(
struct value *vp /* value pointer */
)
{
- DSA *dsa; /* IFF parameters */
- BN_CTX *bctx; /* BIGNUM context */
- EVP_MD_CTX *ctx; /* signature context */
- tstamp_t tstamp;
- u_int len;
- const BIGNUM *q;
+ const DSA *dsa; /* IFF parameters */
+ BN_CTX *bctx; /* BIGNUM context */
+ EVP_MD_CTX *ctx; /* signature context */
+ tstamp_t tstamp;
+ u_int len;
+ const BIGNUM *q;
/*
* The identity parameters must have correct format and content.
@@ -2216,7 +2204,7 @@ crypto_alice(
return (XEVNT_OK);
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -2224,7 +2212,6 @@ crypto_alice(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
return (XEVNT_OK);
}
@@ -2243,7 +2230,8 @@ crypto_bob(
struct value *vp /* value pointer */
)
{
- DSA *dsa; /* IFF parameters */
+ int retv; /* return value */
+ const DSA *dsa; /* IFF parameters */
DSA_SIG *sdsa; /* DSA signature context fake */
BN_CTX *bctx; /* BIGNUM context */
EVP_MD_CTX *ctx; /* signature context */
@@ -2262,6 +2250,10 @@ crypto_bob(
msyslog(LOG_NOTICE, "crypto_bob: scheme unavailable");
return (XEVNT_ID);
}
+
+ /* Initialize pointers that may need freeing in cleanup. */
+ sdsa = NULL;
+
dsa = EVP_PKEY_get0_DSA(iffkey_info->pkey);
DSA_get0_pqg(dsa, &p, &q, &g);
DSA_get0_key(dsa, NULL, &priv_key);
@@ -2306,16 +2298,16 @@ crypto_bob(
if (len == 0) {
msyslog(LOG_ERR, "crypto_bob: %s",
ERR_error_string(ERR_get_error(), NULL));
- DSA_SIG_free(sdsa);
- return (XEVNT_ERR);
+ retv = XEVNT_ERR;
+ goto cleanup;
}
if (len > MAX_VALLEN) {
msyslog(LOG_ERR, "crypto_bob: signature is too big: %u",
len);
- DSA_SIG_free(sdsa);
- return (XEVNT_LEN);
+ retv = XEVNT_ERR;
+ goto cleanup;
}
- memset(vp, 0, sizeof(struct value));
+ ZERO(*vp);
tstamp = crypto_time();
vp->tstamp = htonl(tstamp);
vp->fstamp = htonl(iffkey_info->fstamp);
@@ -2323,13 +2315,14 @@ crypto_bob(
ptr = emalloc(len);
vp->ptr = ptr;
i2d_DSA_SIG(sdsa, &ptr);
- DSA_SIG_free(sdsa);
- if (tstamp == 0)
- return (XEVNT_OK);
+ if (0 == tstamp) {
+ retv = XEVNT_OK;
+ goto cleanup;
+ }
/* XXX: more validation to make sure the sign fits... */
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -2337,8 +2330,11 @@ crypto_bob(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
- return (XEVNT_OK);
+ retv = XEVNT_OK;
+
+ cleanup:
+ DSA_SIG_free(sdsa);
+ return retv;
}
@@ -2357,7 +2353,7 @@ crypto_iff(
struct peer *peer /* peer structure pointer */
)
{
- DSA *dsa; /* IFF parameters */
+ const DSA *dsa; /* IFF parameters */
BN_CTX *bctx; /* BIGNUM context */
DSA_SIG *sdsa; /* DSA parameters */
BIGNUM *bn, *bk;
@@ -2501,7 +2497,7 @@ crypto_alice2(
struct value *vp /* value pointer */
)
{
- RSA *rsa; /* GQ parameters */
+ const RSA *rsa; /* GQ parameters */
BN_CTX *bctx; /* BIGNUM context */
EVP_MD_CTX *ctx; /* signature context */
tstamp_t tstamp;
@@ -2546,7 +2542,7 @@ crypto_alice2(
return (XEVNT_OK);
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -2554,7 +2550,6 @@ crypto_alice2(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
return (XEVNT_OK);
}
@@ -2573,7 +2568,7 @@ crypto_bob2(
struct value *vp /* value pointer */
)
{
- RSA *rsa; /* GQ parameters */
+ const RSA *rsa; /* GQ parameters */
DSA_SIG *sdsa; /* DSA parameters */
BN_CTX *bctx; /* BIGNUM context */
EVP_MD_CTX *ctx; /* signature context */
@@ -2651,7 +2646,7 @@ crypto_bob2(
return (XEVNT_OK);
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -2659,7 +2654,6 @@ crypto_bob2(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
return (XEVNT_OK);
}
@@ -2680,7 +2674,7 @@ crypto_gq(
struct peer *peer /* peer structure pointer */
)
{
- RSA *rsa; /* GQ parameters */
+ const RSA *rsa; /* GQ parameters */
BN_CTX *bctx; /* BIGNUM context */
DSA_SIG *sdsa; /* RSA signature context fake */
BIGNUM *y, *v;
@@ -2845,7 +2839,7 @@ crypto_alice3(
struct value *vp /* value pointer */
)
{
- DSA *dsa; /* MV parameters */
+ const DSA *dsa; /* MV parameters */
BN_CTX *bctx; /* BIGNUM context */
EVP_MD_CTX *ctx; /* signature context */
tstamp_t tstamp;
@@ -2890,7 +2884,7 @@ crypto_alice3(
return (XEVNT_OK);
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -2898,7 +2892,6 @@ crypto_alice3(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
return (XEVNT_OK);
}
@@ -2916,7 +2909,7 @@ crypto_bob3(
struct value *vp /* value pointer */
)
{
- DSA *dsa; /* MV parameters */
+ const DSA *dsa; /* MV parameters */
DSA *sdsa; /* DSA signature context fake */
BN_CTX *bctx; /* BIGNUM context */
EVP_MD_CTX *ctx; /* signature context */
@@ -3003,7 +2996,7 @@ crypto_bob3(
return (XEVNT_OK);
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -3011,7 +3004,6 @@ crypto_bob3(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
return (XEVNT_OK);
}
@@ -3032,7 +3024,7 @@ crypto_mv(
struct peer *peer /* peer structure pointer */
)
{
- DSA *dsa; /* MV parameters */
+ const DSA *dsa; /* MV parameters */
DSA *sdsa; /* DSA parameters */
BN_CTX *bctx; /* BIGNUM context */
BIGNUM *k, *u, *v;
@@ -3253,7 +3245,7 @@ cert_sign(
vp->siglen = 0;
if (tstamp != 0) {
vp->sig = emalloc(sign_siglen);
- ctx = EVP_MD_CTX_new();
+ ctx = digest_ctx;
EVP_SignInit(ctx, sign_digest);
EVP_SignUpdate(ctx, (u_char *)vp, 12);
EVP_SignUpdate(ctx, vp->ptr, len);
@@ -3261,7 +3253,6 @@ cert_sign(
INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
- EVP_MD_CTX_free(ctx);
}
#ifdef DEBUG
if (debug > 1)
@@ -3909,7 +3900,6 @@ crypto_setup(void)
"crypto_setup: spurious crypto command");
return;
}
- ssl_check_version();
/*
* Load required random seed file and seed the random number
@@ -4168,5 +4158,5 @@ exten_payload_size(
return (u_int)data_size;
}
# else /* !AUTOKEY follows */
-int ntp_crypto_bs_pubkey;
+NONEMPTY_TRANSLATION_UNIT
# endif /* !AUTOKEY */
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index bb35ffd68511..9d79fe493d9b 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -177,11 +177,14 @@ endpt * any_interface; /* wildcard ipv4 interface */
endpt * any6_interface; /* wildcard ipv6 interface */
endpt * loopback_interface; /* loopback ipv4 interface */
-static isc_boolean_t broadcast_client_enabled; /* is broadcast client enabled */
+static isc_boolean_t broadcast_client_enabled;
u_int sys_ifnum; /* next .ifnum to assign */
int ninterfaces; /* Total number of interfaces */
-int disable_dynamic_updates; /* scan interfaces once only */
+int no_periodic_scan; /* network endpoint scans */
+int scan_addrs_once; /* because dropped privs */
+int nonlocal_v4_addr_up; /* should we try IPv4 pool? */
+int nonlocal_v6_addr_up; /* should we try IPv6 pool? */
#ifdef REFCLOCK
/*
@@ -210,7 +213,7 @@ static int update_interfaces(u_short, interface_receiver_t,
static void remove_interface(endpt *);
static endpt * create_interface(u_short, endpt *);
-static int is_wildcard_addr (const sockaddr_u *);
+static inline int is_wildcard_addr(const sockaddr_u *psau);
/*
* Multicast functions
@@ -229,7 +232,6 @@ static isc_boolean_t socket_multicast_disable(endpt *, sockaddr_u *);
#ifdef DEBUG
static void interface_dump (const endpt *);
-static void sockaddr_dump (const sockaddr_u *);
static void print_interface (const endpt *, const char *, const char *);
#define DPRINT_INTERFACE(level, args) do { if (debug >= (level)) { print_interface args; } } while (0)
#else
@@ -280,13 +282,13 @@ static int addr_samesubnet (const sockaddr_u *, const sockaddr_u *,
static int create_sockets (u_short);
static SOCKET open_socket (sockaddr_u *, int, int, endpt *);
static void set_reuseaddr (int);
-static isc_boolean_t socket_broadcast_enable (struct interface *, SOCKET, sockaddr_u *);
+static isc_boolean_t socket_broadcast_enable (endpt *, SOCKET, sockaddr_u *);
#if !defined(HAVE_IO_COMPLETION_PORT) && !defined(HAVE_SIGNALED_IO)
static char * fdbits (int, const fd_set *);
#endif
#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
-static isc_boolean_t socket_broadcast_disable (struct interface *, sockaddr_u *);
+static isc_boolean_t socket_broadcast_disable (endpt *, sockaddr_u *);
#endif
typedef struct remaddr remaddr_t;
@@ -305,10 +307,16 @@ endpt * mc6_list; /* IPv6 mcast-capable unicast endpts */
static endpt * wildipv4;
static endpt * wildipv6;
+#define RFC3927_ADDR 0xa9fe0000 /* 169.254. */
+#define RFC3927_MASK 0xffff0000
+#define IS_AUTOCONF(addr4) \
+ ((SRCADR(addr4) & RFC3927_MASK) == RFC3927_ADDR)
+
#ifdef SYS_WINNT
int accept_wildcard_if_for_winnt;
#else
const int accept_wildcard_if_for_winnt = FALSE;
+#define init_io_completion_port() do {} while (FALSE)
#endif
static void add_fd_to_list (SOCKET, enum desc_type);
@@ -316,7 +324,7 @@ static endpt * find_addr_in_list (sockaddr_u *);
static endpt * find_flagged_addr_in_list(sockaddr_u *, u_int32);
static void delete_addr_from_list (sockaddr_u *);
static void delete_interface_from_list(endpt *);
-static void close_and_delete_fd_from_list(SOCKET);
+static void close_and_delete_fd_from_list(SOCKET, endpt *);
static void add_addr_to_list (sockaddr_u *, endpt *);
static void create_wildcards (u_short);
static endpt * findlocalinterface (sockaddr_u *, int, int);
@@ -337,7 +345,7 @@ static int cmp_addr_distance(const sockaddr_u *,
* Routines to read the ntp packets
*/
#if !defined(HAVE_IO_COMPLETION_PORT)
-static inline int read_network_packet (SOCKET, struct interface *, l_fp);
+static inline int read_network_packet (SOCKET, endpt *, l_fp);
static void ntpd_addremove_io_fd (int, int, int);
static void input_handler_scan (const l_fp*, const fd_set*);
static int/*BOOL*/ sanitize_fdset (int errc);
@@ -454,15 +462,14 @@ init_io(void)
/* Init buffer free list and stat counters */
init_recvbuff(RECV_INIT);
/* update interface every 5 minutes as default */
- interface_interval = 300;
+ endpt_scan_period = 301;
#ifdef WORK_PIPE
addremove_io_fd = &ntpd_addremove_io_fd;
#endif
-#if defined(SYS_WINNT)
init_io_completion_port();
-#elif defined(HAVE_SIGNALED_IO)
+#if defined(HAVE_SIGNALED_IO)
(void) set_signal(input_handler);
#endif
}
@@ -528,11 +535,8 @@ interface_dump(const endpt *itf)
printf("fd = %lld\n", (long long)itf->fd);
printf("bfd = %lld\n", (long long)itf->bfd);
printf("sin = %s,\n", stoa(&itf->sin));
- sockaddr_dump(&itf->sin);
printf("bcast = %s,\n", stoa(&itf->bcast));
- sockaddr_dump(&itf->bcast);
printf("mask = %s,\n", stoa(&itf->mask));
- sockaddr_dump(&itf->mask);
printf("name = %s\n", itf->name);
printf("flags = 0x%08x\n", itf->flags);
printf("last_ttl = %d\n", itf->last_ttl);
@@ -546,27 +550,6 @@ interface_dump(const endpt *itf)
printf("phase = %u\n", itf->phase);
}
-/*
- * sockaddr_dump - hex dump the start of a sockaddr_u
- */
-static void
-sockaddr_dump(const sockaddr_u *psau)
-{
- /* Limit the size of the sockaddr_in6 hex dump */
- const int maxsize = min(32, sizeof(psau->sa6));
- const u_char * cp;
- int i;
-
- /* XXX: Should we limit maxsize based on psau->saX.sin_family? */
- cp = (const void *)&psau->sa6;
-
- for(i = 0; i < maxsize; i++) {
- printf("%02x", *cp++);
- if (!((i + 1) % 4))
- printf(" ");
- }
- printf("\n");
-}
/*
* print_interface - helper to output debug information
@@ -637,7 +620,7 @@ add_asyncio_reader(
}
/*
- * remove asynchio_reader
+ * remove asyncio_reader
*/
static void
remove_asyncio_reader(
@@ -649,9 +632,9 @@ remove_asyncio_reader(
UNLINK_SLIST(unlinked, asyncio_reader_list, reader, link,
struct asyncio_reader);
- if (reader->fd != INVALID_SOCKET)
- close_and_delete_fd_from_list(reader->fd);
-
+ if (reader->fd != INVALID_SOCKET) {
+ close_and_delete_fd_from_list(reader->fd, NULL);
+ }
reader->fd = INVALID_SOCKET;
}
#endif /* !defined(HAVE_IO_COMPLETION_PORT) && defined(HAS_ROUTING_SOCKET) */
@@ -743,7 +726,7 @@ interface_enumerate(
/*
* do standard initialization of interface structure
*/
-static void
+static inline void
init_interface(
endpt *ep
)
@@ -760,20 +743,19 @@ init_interface(
* template structure or via standard initialization
* function
*/
-static struct interface *
+static endpt *
new_interface(
- struct interface *interface
+ endpt *protot
)
{
- struct interface * iface;
+ endpt * iface;
iface = emalloc(sizeof(*iface));
-
- if (NULL == interface)
- init_interface(iface);
- else /* use the template */
- memcpy(iface, interface, sizeof(*iface));
-
+ if (NULL == protot) {
+ ZERO(*iface);
+ } else {
+ memcpy(iface, protot, sizeof(*iface));
+ }
/* count every new instance of an interface in the system */
iface->ifnum = sys_ifnum++;
iface->starttime = current_time;
@@ -814,19 +796,16 @@ add_interface(
endpt ** pmclisthead;
endpt * scan;
endpt * scan_next;
- endpt * unlinked;
- sockaddr_u * addr;
- int ep_local;
- int scan_local;
int same_subnet;
- int ep_univ_iid; /* iface ID from MAC address */
- int scan_univ_iid; /* see RFC 4291 */
- int ep_privacy; /* random local iface ID */
- int scan_privacy; /* see RFC 4941 */
int rc;
/* Calculate the refid */
ep->addr_refid = addr2refid(&ep->sin);
+# ifdef WORDS_BIGENDIAN
+ if (IS_IPV6(&ep->sin)) {
+ ep->old_refid = BYTESWAP32(ep->addr_refid);
+ }
+# endif
/* link at tail so ntpdc -c ifstats index increases each row */
LINK_TAIL_SLIST(ep_list, ep, elink, endpt);
ninterfaces++;
@@ -843,101 +822,26 @@ add_interface(
? &mc4_list
: &mc6_list;
- if (AF_INET6 == ep->family) {
- ep_local =
- IN6_IS_ADDR_LINKLOCAL(PSOCK_ADDR6(&ep->sin)) ||
- IN6_IS_ADDR_SITELOCAL(PSOCK_ADDR6(&ep->sin));
- ep_univ_iid = IS_IID_UNIV(&ep->sin);
- ep_privacy = !!(INT_PRIVACY & ep->flags);
- } else {
- ep_local = FALSE;
- ep_univ_iid = FALSE;
- ep_privacy = FALSE;
- }
- DPRINTF(4, ("add_interface mcast-capable %s%s%s%s\n",
- stoa(&ep->sin),
- (ep_local) ? " link/scope-local" : "",
- (ep_univ_iid) ? " univ-IID" : "",
- (ep_privacy) ? " privacy" : ""));
/*
- * If we have multiple local addresses on the same network
- * interface, and some are link- or site-local, do not multicast
- * out from the link-/site-local addresses by default, to avoid
- * duplicate manycastclient associations between v6 peers using
- * link-local and global addresses. link-local can still be
- * chosen using "nic ignore myv6globalprefix::/64".
- * Similarly, if we have multiple global addresses from the same
- * prefix on the same network interface, multicast from one,
- * preferring EUI-64, then static, then least RFC 4941 privacy
- * addresses.
+ * If we have multiple global addresses from the same prefix
+ * on the same network interface, multicast from one.
*/
for (scan = *pmclisthead; scan != NULL; scan = scan_next) {
scan_next = scan->mclink;
- if (ep->family != scan->family)
- continue;
- if (strcmp(ep->name, scan->name))
+ if ( ep->family != scan->family
+ || ep->ifindex != scan->ifindex) {
continue;
+ }
same_subnet = addr_samesubnet(&ep->sin, &ep->mask,
&scan->sin, &scan->mask);
- if (AF_INET6 == ep->family) {
- addr = &scan->sin;
- scan_local =
- IN6_IS_ADDR_LINKLOCAL(PSOCK_ADDR6(addr)) ||
- IN6_IS_ADDR_SITELOCAL(PSOCK_ADDR6(addr));
- scan_univ_iid = IS_IID_UNIV(addr);
- scan_privacy = !!(INT_PRIVACY & scan->flags);
- } else {
- scan_local = FALSE;
- scan_univ_iid = FALSE;
- scan_privacy = FALSE;
- }
- DPRINTF(4, ("add_interface mcast-capable scan %s%s%s%s\n",
- stoa(&scan->sin),
- (scan_local) ? " link/scope-local" : "",
- (scan_univ_iid) ? " univ-IID" : "",
- (scan_privacy) ? " privacy" : ""));
- if ((ep_local && !scan_local) || (same_subnet &&
- ((ep_privacy && !scan_privacy) ||
- (!ep_univ_iid && scan_univ_iid)))) {
- DPRINTF(4, ("did not add %s to %s of IPv6 multicast-capable list which already has %s\n",
- stoa(&ep->sin),
- (ep_local)
- ? "tail"
- : "head",
- stoa(&scan->sin)));
+ if (same_subnet) {
+ DPRINTF(4, ("did not add %s to multicast-capable list"
+ "which already has %s\n",
+ stoa(&ep->sin), stoa(&scan->sin)));
return;
}
- if ((scan_local && !ep_local) || (same_subnet &&
- ((scan_privacy && !ep_privacy) ||
- (!scan_univ_iid && ep_univ_iid)))) {
- UNLINK_SLIST(unlinked, *pmclisthead,
- scan, mclink, endpt);
- DPRINTF(4, ("%s %s from IPv6 multicast-capable list to add %s\n",
- (unlinked != scan)
- ? "Failed to remove"
- : "removed",
- stoa(&scan->sin), stoa(&ep->sin)));
- }
}
- /*
- * Add link/site local at the tail of the multicast-
- * capable unicast interfaces list, so that ntpd will
- * send from global addresses before link-/site-local
- * ones.
- */
- if (ep_local)
- LINK_TAIL_SLIST(*pmclisthead, ep, mclink, endpt);
- else
- LINK_SLIST(*pmclisthead, ep, mclink);
- DPRINTF(4, ("added %s to %s of IPv%s multicast-capable unicast local address list\n",
- stoa(&ep->sin),
- (ep_local)
- ? "tail"
- : "head",
- (AF_INET == ep->family)
- ? "4"
- : "6"));
-
+ LINK_SLIST(*pmclisthead, ep, mclink);
if (INVALID_SOCKET == ep->fd)
return;
@@ -987,6 +891,7 @@ remove_interface(
endpt * unlinked;
endpt ** pmclisthead;
sockaddr_u resmask;
+ int/*BOOL*/ success;
UNLINK_SLIST(unlinked, ep_list, ep, elink, endpt);
if (!ep->ignore_packets && INT_MULTICAST & ep->flags) {
@@ -1007,7 +912,9 @@ remove_interface(
if (ep->fd != INVALID_SOCKET) {
msyslog(LOG_INFO,
- "Deleting interface #%d %s, %s#%d, interface stats: received=%ld, sent=%ld, dropped=%ld, active_time=%ld secs",
+ "Deleting %d %s, [%s]:%hd, stats:"
+ " received=%ld, sent=%ld, dropped=%ld,"
+ " active_time=%ld secs",
ep->ifnum,
ep->name,
stoa(&ep->sin),
@@ -1016,10 +923,7 @@ remove_interface(
ep->sent,
ep->notsent,
current_time - ep->starttime);
-# ifdef HAVE_IO_COMPLETION_PORT
- io_completion_port_remove_socket(ep->fd, ep);
-# endif
- close_and_delete_fd_from_list(ep->fd);
+ close_and_delete_fd_from_list(ep->fd, ep);
ep->fd = INVALID_SOCKET;
}
@@ -1027,10 +931,7 @@ remove_interface(
msyslog(LOG_INFO,
"stop listening for broadcasts to %s on interface #%d %s",
stoa(&ep->bcast), ep->ifnum, ep->name);
-# ifdef HAVE_IO_COMPLETION_PORT
- io_completion_port_remove_socket(ep->bfd, ep);
-# endif
- close_and_delete_fd_from_list(ep->bfd);
+ close_and_delete_fd_from_list(ep->bfd, ep);
ep->bfd = INVALID_SOCKET;
}
# ifdef HAVE_IO_COMPLETION_PORT
@@ -1042,8 +943,14 @@ remove_interface(
/* remove restrict interface entry */
SET_HOSTMASK(&resmask, AF(&ep->sin));
- hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask,
- -3, RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
+ success = hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask, 0,
+ RESM_NTPONLY | RESM_INTERFACE, 0, 0);
+ if (!success) {
+ msyslog(LOG_ERR,
+ "unable to remove self-restriction for %s",
+ stoa(&ep->sin));
+ }
+
}
@@ -1073,7 +980,7 @@ create_wildcards(
#endif
sockaddr_u wildaddr;
nic_rule_action action;
- struct interface * wildif;
+ endpt * wildif;
/*
* silence "potentially uninitialized" warnings from VC9
@@ -1404,9 +1311,6 @@ convert_isc_if(
u_short port
)
{
- const u_char v6loop[16] = {0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1};
-
strlcpy(itf->name, isc_if->name, sizeof(itf->name));
itf->ifindex = isc_if->ifindex;
itf->family = (u_short)isc_if->af;
@@ -1456,15 +1360,8 @@ convert_isc_if(
* Clear the loopback flag if the address is not localhost.
* http://bugs.ntp.org/1683
*/
- if (INT_LOOPBACK & itf->flags) {
- if (AF_INET == itf->family) {
- if (127 != (SRCADR(&itf->sin) >> 24))
- itf->flags &= ~INT_LOOPBACK;
- } else {
- if (memcmp(v6loop, NSRCADR6(&itf->sin),
- sizeof(NSRCADR6(&itf->sin))))
- itf->flags &= ~INT_LOOPBACK;
- }
+ if ((INT_LOOPBACK & itf->flags) && !IS_LOOPBACK_ADDR(&itf->sin)) {
+ itf->flags &= ~INT_LOOPBACK;
}
}
@@ -1480,33 +1377,33 @@ convert_isc_if(
*/
static int
refresh_interface(
- struct interface * interface
+ endpt * iface
)
{
#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
- if (interface->fd != INVALID_SOCKET) {
- int bcast = (interface->flags & INT_BCASTXMIT) != 0;
+ if (iface->fd != INVALID_SOCKET) {
+ int bcast = (iface->flags & INT_BCASTXMIT) != 0;
/* as we forcibly close() the socket remove the
broadcast permission indication */
if (bcast)
- socket_broadcast_disable(interface, &interface->sin);
+ socket_broadcast_disable(iface, &iface->sin);
- close_and_delete_fd_from_list(interface->fd);
+ close_and_delete_fd_from_list(iface->fd);
/* create new socket picking up a new first hop binding
at connect() time */
- interface->fd = open_socket(&interface->sin,
- bcast, 0, interface);
+ iface->fd = open_socket(&iface->sin,
+ bcast, 0, iface);
/*
* reset TTL indication so TTL is is set again
* next time around
*/
- interface->last_ttl = 0;
- return (interface->fd != INVALID_SOCKET);
+ iface->last_ttl = 0;
+ return (iface->fd != INVALID_SOCKET);
} else
return 0; /* invalid sockets are not refreshable */
#else /* !OS_MISSES_SPECIFIC_ROUTE_UPDATES */
- return (interface->fd != INVALID_SOCKET);
+ return (iface->fd != INVALID_SOCKET);
#endif /* !OS_MISSES_SPECIFIC_ROUTE_UPDATES */
}
@@ -1516,20 +1413,21 @@ refresh_interface(
void
interface_update(
interface_receiver_t receiver,
- void * data)
+ void * data
+ )
{
int new_interface_found;
- if (disable_dynamic_updates)
+ if (scan_addrs_once) {
return;
-
+ }
BLOCKIO();
new_interface_found = update_interfaces(NTP_PORT, receiver, data);
UNBLOCKIO();
- if (!new_interface_found)
+ if (!new_interface_found) {
return;
-
+ }
#ifdef DEBUG
msyslog(LOG_DEBUG, "new interface(s) found: waking up resolver");
#endif
@@ -1552,13 +1450,11 @@ sau_from_netaddr(
switch (pna->family) {
case AF_INET:
- memcpy(&psau->sa4.sin_addr, &pna->type.in,
- sizeof(psau->sa4.sin_addr));
+ psau->sa4.sin_addr = pna->type.in;
break;
case AF_INET6:
- memcpy(&psau->sa6.sin6_addr, &pna->type.in6,
- sizeof(psau->sa6.sin6_addr));
+ psau->sa6.sin6_addr = pna->type.in6;
break;
}
}
@@ -1581,6 +1477,30 @@ is_wildcard_addr(
}
+isc_boolean_t
+is_linklocal(
+ sockaddr_u * psau
+)
+{
+ struct in6_addr * p6addr;
+
+ if (IS_IPV6(psau)) {
+ p6addr = &psau->sa6.sin6_addr;
+ if ( IN6_IS_ADDR_LINKLOCAL(p6addr)
+ || IN6_IS_ADDR_SITELOCAL(p6addr)) {
+
+ return TRUE;
+ }
+ } else if (IS_IPV4(psau)) {
+ /* autoconf are link-local 169.254.0.0/16 */
+ if (IS_AUTOCONF(psau)) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
#ifdef OS_NEEDS_REUSEADDR_FOR_IFADDRBIND
/*
* enable/disable re-use of wildcard address socket
@@ -1591,7 +1511,7 @@ set_wildcard_reuse(
int on
)
{
- struct interface *any;
+ endpt *any;
SOCKET fd = INVALID_SOCKET;
any = ANY_INTERFACE_BYFAM(family);
@@ -1722,13 +1642,18 @@ is_valid(
*
* toggle configuration phase
*
- * Phase 1:
+ * Phase 1a:
* forall currently existing interfaces
* if address is known:
* drop socket - rebind again
*
* if address is NOT known:
- * attempt to create a new interface entry
+ * Add address to list of new addresses
+ *
+ * Phase 1b:
+ * Scan the list of new addresses marking IPv6 link-local addresses
+ * which also have a global v6 address using the same OS ifindex.
+ * Attempt to create a new interface entry
*
* Phase 2:
* forall currently known non MCAST and WILDCARD interfaces
@@ -1759,17 +1684,22 @@ update_interfaces(
endpt enumep;
endpt * ep;
endpt * next_ep;
+ endpt * newaddrs;
+ endpt * newaddrs_tail;
+ endpt * ep2;
DPRINTF(3, ("update_interfaces(%d)\n", port));
/*
- * phase one - scan interfaces
- * - create those that are not found
- * - update those that are found
+ * phase 1a - scan OS local addresses
+ * - update those that ntpd already knows
+ * - build a list of newly-discovered addresses.
*/
new_interface_found = FALSE;
+ nonlocal_v4_addr_up = nonlocal_v6_addr_up = FALSE;
iter = NULL;
+ newaddrs = newaddrs_tail = NULL;
result = isc_interfaceiter_create(mctx, &iter);
if (result != ISC_R_SUCCESS)
@@ -1787,9 +1717,9 @@ update_interfaces(
result = isc_interfaceiter_current(iter, &isc_if);
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
break;
-
+ }
/* See if we have a valid family to use */
family = isc_if.address.family;
if (AF_INET != family && AF_INET6 != family)
@@ -1855,6 +1785,19 @@ update_interfaces(
continue;
/*
+ * Keep track of having non-linklocal connectivity
+ * for IPv4 and IPv6 so we don't solicit pool hosts
+ * when it can't work.
+ */
+ if ( !(INT_LOOPBACK & enumep.flags)
+ && !is_linklocal(&enumep.sin)) {
+ if (IS_IPV6(&enumep.sin)) {
+ nonlocal_v6_addr_up = TRUE;
+ } else {
+ nonlocal_v4_addr_up = TRUE;
+ }
+ }
+ /*
* map to local *address* in order to map all duplicate
* interfaces to an endpt structure with the appropriate
* socket. Our name space is (ip-address), NOT
@@ -1862,107 +1805,132 @@ update_interfaces(
*/
ep = getinterface(&enumep.sin, INT_WILDCARD);
- if (ep != NULL && refresh_interface(ep)) {
- /*
- * found existing and up to date interface -
- * mark present.
- */
- if (ep->phase != sys_interphase) {
- /*
- * On a new round we reset the name so
- * the interface name shows up again if
- * this address is no longer shared.
- * We reset ignore_packets from the
- * new prototype to respect any runtime
- * changes to the nic rules.
- */
- strlcpy(ep->name, enumep.name,
- sizeof(ep->name));
- ep->ignore_packets =
- enumep.ignore_packets;
+ if (NULL == ep) {
+ ep = emalloc(sizeof(*ep));
+ memcpy(ep, &enumep, sizeof(*ep));
+ if (NULL != newaddrs_tail) {
+ newaddrs_tail->elink = ep;
+ newaddrs_tail = ep;
} else {
- /* name collision - rename interface */
- strlcpy(ep->name, "*multiple*",
- sizeof(ep->name));
+ newaddrs_tail = newaddrs = ep;
}
+ continue;
+ }
- DPRINT_INTERFACE(4, (ep, "updating ",
- " present\n"));
-
- if (ep->ignore_packets !=
- enumep.ignore_packets) {
- /*
- * We have conflicting configurations
- * for the interface address. This is
- * caused by using -I <interfacename>
- * for an interface that shares its
- * address with other interfaces. We
- * can not disambiguate incoming
- * packets delivered to this socket
- * without extra syscalls/features.
- * These are not (commonly) available.
- * Note this is a more unusual
- * configuration where several
- * interfaces share an address but
- * filtering via interface name is
- * attempted. We resolve the
- * configuration conflict by disabling
- * the processing of received packets.
- * This leads to no service on the
- * interface address where the conflict
- * occurs.
- */
- msyslog(LOG_ERR,
- "WARNING: conflicting enable configuration for interfaces %s and %s for address %s - unsupported configuration - address DISABLED",
- enumep.name, ep->name,
- stoa(&enumep.sin));
-
- ep->ignore_packets = ISC_TRUE;
- }
+ if (!refresh_interface(ep)) {
+ /*
+ * Refreshing failed, we will delete the endpt
+ * in phase 2 because it was not marked current.
+ * We can bind to the address as the refresh
+ * code already closed the endpt's socket.
+ */
+ continue;
+ }
+ /*
+ * found existing and up to date interface -
+ * mark present.
+ */
+ if (ep->phase != sys_interphase) {
+ /*
+ * On a new round we reset the name so
+ * the interface name shows up again if
+ * this address is no longer shared.
+ * We reset ignore_packets from the
+ * new prototype to respect any runtime
+ * changes to the nic rules.
+ */
+ strlcpy(ep->name, enumep.name, sizeof(ep->name));
+ ep->ignore_packets = enumep.ignore_packets;
+ } else {
+ /*
+ * DLH: else branch might be dead code from
+ * when both address and name were compared.
+ */
+ msyslog(LOG_INFO, "%s on %u %s -> *multiple*",
+ stoa(&ep->sin), ep->ifnum, ep->name);
+ /* name collision - rename interface */
+ strlcpy(ep->name, "*multiple*", sizeof(ep->name));
+ }
- ep->phase = sys_interphase;
+ DPRINT_INTERFACE(4, (ep, "updating ", " present\n"));
- ifi.action = IFS_EXISTS;
- ifi.ep = ep;
- if (receiver != NULL)
- (*receiver)(data, &ifi);
- } else {
+ if (ep->ignore_packets != enumep.ignore_packets) {
/*
- * This is new or refreshing failed - add to
- * our interface list. If refreshing failed we
- * will delete the interface structure in phase
- * 2 as the interface was not marked current.
- * We can bind to the address as the refresh
- * code already closed the offending socket
+ * We have conflicting configurations for the
+ * address. This can happen with
+ * -I <interfacename> on the command line for an
+ * interface that shares its address with other
+ * interfaces. We cannot disambiguate incoming
+ * packets delivered to this socket without extra
+ * syscalls/features. Note this is an unusual
+ * configuration where several interfaces share
+ * an address but filtering via interface name is
+ * attempted. We resolve the config conflict by
+ * disabling the processing of received packets.
+ * This leads to no service on the address where
+ * the conflict occurs.
*/
- ep = create_interface(port, &enumep);
-
- if (ep != NULL) {
- ifi.action = IFS_CREATED;
- ifi.ep = ep;
- if (receiver != NULL)
- (*receiver)(data, &ifi);
-
- new_interface_found = TRUE;
- DPRINT_INTERFACE(3,
- (ep, "updating ",
- " new - created\n"));
- } else {
- DPRINT_INTERFACE(3,
- (&enumep, "updating ",
- " new - creation FAILED"));
+ msyslog(LOG_WARNING,
+ "conflicting listen configuration between"
+ " %s and %s for %s, disabled",
+ enumep.name, ep->name, stoa(&enumep.sin));
- msyslog(LOG_INFO,
- "failed to init interface for address %s",
- stoa(&enumep.sin));
- continue;
- }
+ ep->ignore_packets = TRUE;
+ }
+
+ ep->phase = sys_interphase;
+
+ ifi.action = IFS_EXISTS;
+ ifi.ep = ep;
+ if (receiver != NULL) {
+ (*receiver)(data, &ifi);
}
}
isc_interfaceiter_destroy(&iter);
/*
+ * Phase 1b
+ */
+ for (ep = newaddrs; ep != NULL; ep = ep->elink) {
+ if (IS_IPV6(&ep->sin) && is_linklocal(&ep->sin)) {
+ for (ep2 = newaddrs; ep2 != NULL; ep2 = ep2->elink) {
+ if ( IS_IPV6(&ep2->sin)
+ && ep != ep2
+ && !is_linklocal(&ep2->sin)) {
+
+ ep->flags |= INT_LL_OF_GLOB;
+ break;
+ }
+ }
+ }
+ }
+ for (ep2 = newaddrs; ep2 != NULL; ep2 = next_ep) {
+ next_ep = ep2->elink;
+ ep2->elink = NULL;
+ ep = create_interface(port, ep2);
+ if (ep != NULL) {
+ ifi.action = IFS_CREATED;
+ ifi.ep = ep;
+ if (receiver != NULL) {
+ (*receiver)(data, &ifi);
+ }
+ new_interface_found = TRUE;
+ DPRINT_INTERFACE(3,
+ (ep, "updating ", " new - created\n"));
+ }
+ else {
+ DPRINT_INTERFACE(3,
+ (ep, "updating ", " new - FAILED"));
+
+ msyslog(LOG_ERR,
+ "cannot bind address %s",
+ stoa(&ep->sin));
+ }
+ free(ep2);
+ }
+
+ /*
* phase 2 - delete gone interfaces - reassigning peers to
* other interfaces
*/
@@ -1986,20 +1954,20 @@ update_interfaces(
ifi.action = IFS_DELETED;
ifi.ep = ep;
- if (receiver != NULL)
+ if (receiver != NULL) {
(*receiver)(data, &ifi);
-
+ }
/* disconnect peers from deleted endpt. */
- while (ep->peers != NULL)
+ while (ep->peers != NULL) {
set_peerdstadr(ep->peers, NULL);
-
+ }
/*
* update globals in case we lose
* a loopback interface
*/
- if (ep == loopback_interface)
+ if (ep == loopback_interface) {
loopback_interface = NULL;
-
+ }
delete_interface(ep);
}
@@ -2011,20 +1979,20 @@ update_interfaces(
*/
refresh_all_peerinterfaces();
- if (sys_bclient)
+ if (sys_bclient) {
io_setbclient();
-
+ }
#ifdef MCAST
/*
* Check multicast interfaces and try to join multicast groups if
- * not joined yet.
- */
+ * not joined yet.
+ */
for (ep = ep_list; ep != NULL; ep = ep->elink) {
remaddr_t *entry;
- if (!(INT_MCASTIF & ep->flags) || (INT_MCASTOPEN & ep->flags))
+ if (!(INT_MCASTIF & ep->flags) || (INT_MCASTOPEN & ep->flags)) {
continue;
-
+ }
/* Find remote address that was linked to this interface */
for (entry = remoteaddr_list;
entry != NULL;
@@ -2084,20 +2052,20 @@ create_sockets(
* create_interface - create a new interface for a given prototype
* binding the socket.
*/
-static struct interface *
+static endpt *
create_interface(
- u_short port,
- struct interface * protot
+ u_short port,
+ endpt * protot
)
{
sockaddr_u resmask;
endpt * iface;
+ int/*BOOL*/ success;
#if defined(MCAST) && defined(MULTICAST_NONEWSOCKET)
remaddr_t * entry;
remaddr_t * next_entry;
#endif
- DPRINTF(2, ("create_interface(%s#%d)\n", stoa(&protot->sin),
- port));
+ DPRINTF(2, ("create_interface(%s)\n", sptoa(&protot->sin)));
/* build an interface */
iface = new_interface(protot);
@@ -2112,16 +2080,15 @@ create_interface(
if ((INT_BROADCAST & iface->flags)
&& iface->bfd != INVALID_SOCKET)
- msyslog(LOG_INFO, "Listening on broadcast address %s#%d",
- stoa((&iface->bcast)), port);
+ msyslog(LOG_INFO, "Listening on broadcast address %s",
+ sptoa(&iface->bcast));
if (INVALID_SOCKET == iface->fd
&& INVALID_SOCKET == iface->bfd) {
- msyslog(LOG_ERR, "unable to create socket on %s (%d) for %s#%d",
+ msyslog(LOG_ERR, "unable to create socket on %s (%d) for %s",
iface->name,
iface->ifnum,
- stoa((&iface->sin)),
- port);
+ sptoa(&iface->sin));
delete_interface(iface);
return NULL;
}
@@ -2130,8 +2097,13 @@ create_interface(
* Blacklist our own addresses, no use talking to ourself
*/
SET_HOSTMASK(&resmask, AF(&iface->sin));
- hack_restrict(RESTRICT_FLAGS, &iface->sin, &resmask,
- -4, RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
+ success = hack_restrict(RESTRICT_FLAGS, &iface->sin, &resmask,
+ -4, RESM_NTPONLY | RESM_INTERFACE,
+ RES_IGNORE, 0);
+ if (!success) {
+ msyslog(LOG_ERR,
+ "unable to self-restrict %s", stoa(&iface->sin));
+ }
/*
* set globals with the first found
@@ -2181,6 +2153,85 @@ create_interface(
}
+#ifdef DEBUG
+const char *
+iflags_str(
+ u_int32 iflags
+)
+{
+ const size_t sz = LIB_BUFLENGTH;
+ char * ifs;
+
+ LIB_GETBUF(ifs);
+ ifs[0] = '\0';
+
+ if (iflags & INT_UP) {
+ CLEAR_BIT_IF_DEBUG(INT_UP, iflags);
+ append_flagstr(ifs, sz, "up");
+ }
+
+ if (iflags & INT_PPP) {
+ CLEAR_BIT_IF_DEBUG(INT_PPP, iflags);
+ append_flagstr(ifs, sz, "ppp");
+ }
+
+ if (iflags & INT_LOOPBACK) {
+ CLEAR_BIT_IF_DEBUG(INT_LOOPBACK, iflags);
+ append_flagstr(ifs, sz, "loopback");
+ }
+
+ if (iflags & INT_BROADCAST) {
+ CLEAR_BIT_IF_DEBUG(INT_BROADCAST, iflags);
+ append_flagstr(ifs, sz, "broadcast");
+ }
+
+ if (iflags & INT_MULTICAST) {
+ CLEAR_BIT_IF_DEBUG(INT_MULTICAST, iflags);
+ append_flagstr(ifs, sz, "multicast");
+ }
+
+ if (iflags & INT_BCASTOPEN) {
+ CLEAR_BIT_IF_DEBUG(INT_BCASTOPEN, iflags);
+ append_flagstr(ifs, sz, "bcastopen");
+ }
+
+ if (iflags & INT_MCASTOPEN) {
+ CLEAR_BIT_IF_DEBUG(INT_MCASTOPEN, iflags);
+ append_flagstr(ifs, sz, "mcastopen");
+ }
+
+ if (iflags & INT_WILDCARD) {
+ CLEAR_BIT_IF_DEBUG(INT_WILDCARD, iflags);
+ append_flagstr(ifs, sz, "wildcard");
+ }
+
+ if (iflags & INT_MCASTIF) {
+ CLEAR_BIT_IF_DEBUG(INT_MCASTIF, iflags);
+ append_flagstr(ifs, sz, "mcastif");
+ }
+
+ if (iflags & INT_PRIVACY) {
+ CLEAR_BIT_IF_DEBUG(INT_PRIVACY, iflags);
+ append_flagstr(ifs, sz, "IPv6privacy");
+ }
+
+ if (iflags & INT_BCASTXMIT) {
+ CLEAR_BIT_IF_DEBUG(INT_BCASTXMIT, iflags);
+ append_flagstr(ifs, sz, "bcastxmit");
+ }
+
+ if (iflags & INT_LL_OF_GLOB) {
+ CLEAR_BIT_IF_DEBUG(INT_LL_OF_GLOB, iflags);
+ append_flagstr(ifs, sz, "linklocal-w-global");
+ }
+
+ DEBUG_INVARIANT(!iflags);
+
+ return ifs;
+}
+#endif /* DEBUG */
+
+
#ifdef SO_EXCLUSIVEADDRUSE
static void
set_excladdruse(
@@ -2263,8 +2314,8 @@ set_reuseaddr(
*/
void
enable_broadcast(
- struct interface * iface,
- sockaddr_u * baddr
+ endpt * iface,
+ sockaddr_u * baddr
)
{
#ifdef OPEN_BCAST_SOCKET
@@ -2280,9 +2331,9 @@ enable_broadcast(
*/
static isc_boolean_t
socket_broadcast_enable(
- struct interface * iface,
- SOCKET fd,
- sockaddr_u * baddr
+ endpt * iface,
+ SOCKET fd,
+ sockaddr_u * baddr
)
{
#ifdef SO_BROADCAST
@@ -2314,7 +2365,7 @@ socket_broadcast_enable(
*/
static isc_boolean_t
socket_broadcast_disable(
- struct interface * iface,
+ endpt * iface,
sockaddr_u * baddr
)
{
@@ -2337,15 +2388,6 @@ socket_broadcast_disable(
#endif /* OPEN_BCAST_SOCKET */
-/*
- * return the broadcast client flag value
- */
-/*isc_boolean_t
-get_broadcastclient_flag(void)
-{
- return (broadcast_client_enabled);
-}
-*/
/*
* Check to see if the address is a multicast address
@@ -2381,8 +2423,8 @@ addr_ismulticast(
*/
void
enable_multicast_if(
- struct interface * iface,
- sockaddr_u * maddr
+ endpt * iface,
+ sockaddr_u * maddr
)
{
#ifdef MCAST
@@ -2526,7 +2568,7 @@ socket_multicast_enable(
#ifdef MCAST
static isc_boolean_t
socket_multicast_disable(
- struct interface * iface,
+ endpt * iface,
sockaddr_u * maddr
)
{
@@ -2535,8 +2577,6 @@ socket_multicast_disable(
# endif
struct ip_mreq mreq;
- ZERO(mreq);
-
if (find_addr_in_list(maddr) == NULL) {
DPRINTF(4, ("socket_multicast_disable(%s): not found\n",
stoa(maddr)));
@@ -2546,6 +2586,7 @@ socket_multicast_disable(
switch (AF(maddr)) {
case AF_INET:
+ ZERO(mreq);
mreq.imr_multiaddr = SOCK_ADDR4(maddr);
mreq.imr_interface = SOCK_ADDR4(&iface->sin);
if (setsockopt(iface->fd, IPPROTO_IP,
@@ -2569,6 +2610,7 @@ socket_multicast_disable(
* for other types of multicast addresses. For now let
* the kernel figure it out.
*/
+ ZERO(mreq6);
mreq6.ipv6mr_multiaddr = SOCK_ADDR6(maddr);
mreq6.ipv6mr_interface = iface->ifindex;
@@ -2589,13 +2631,14 @@ socket_multicast_disable(
}
iface->num_mcast--;
- if (!iface->num_mcast)
+ if (iface->num_mcast <= 0) {
iface->flags &= ~INT_MCASTOPEN;
-
+ }
return ISC_TRUE;
}
#endif /* MCAST */
+
/*
* io_setbclient - open the broadcast client sockets
*/
@@ -2705,6 +2748,7 @@ io_setbclient(void)
#endif /* OPEN_BCAST_SOCKET */
}
+
/*
* io_unsetbclient - close the broadcast client sockets
*/
@@ -2724,10 +2768,7 @@ io_unsetbclient(void)
msyslog(LOG_INFO,
"stop listening for broadcasts to %s on interface #%d %s",
stoa(&ep->bcast), ep->ifnum, ep->name);
-# ifdef HAVE_IO_COMPLETION_PORT
- io_completion_port_remove_socket(ep->bfd, ep);
-# endif
- close_and_delete_fd_from_list(ep->bfd);
+ close_and_delete_fd_from_list(ep->bfd, ep);
ep->bfd = INVALID_SOCKET;
}
ep->flags &= ~INT_BCASTOPEN;
@@ -2735,6 +2776,7 @@ io_unsetbclient(void)
broadcast_client_enabled = ISC_FALSE;
}
+
/*
* io_multicast_add() - add multicast group address
*/
@@ -2755,9 +2797,6 @@ io_multicast_add(
/* If we already have it we can just return */
if (NULL != find_flagged_addr_in_list(addr, INT_MCASTOPEN)) {
- msyslog(LOG_INFO,
- "Duplicate request found for multicast address %s",
- stoa(addr));
return;
}
@@ -3041,9 +3080,9 @@ open_socket(
#endif
) {
msyslog(LOG_ERR,
- "bind(%d) AF_INET%s %s#%d%s flags 0x%x failed: %m",
+ "bind(%d) AF_INET%s %s%s flags 0x%x failed: %m",
fd, IS_IPV6(addr) ? "6" : "",
- stoa(addr), SRCPORT(addr),
+ sptoa(addr),
IS_MCAST(addr) ? " (multicast)" : "",
interf->flags);
}
@@ -3090,9 +3129,8 @@ open_socket(
}
#endif
- DPRINTF(4, ("bind(%d) AF_INET%s, addr %s%%%d#%d, flags 0x%x\n",
- fd, IS_IPV6(addr) ? "6" : "", stoa(addr),
- SCOPE(addr), SRCPORT(addr), interf->flags));
+ DPRINTF(4, ("bind(%d) addr %s, flags 0x%x\n",
+ fd, sptoa(addr), interf->flags));
make_socket_nonblocking(fd);
@@ -3123,17 +3161,16 @@ open_socket(
/* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */
/*
- * sendpkt - send a packet to the specified destination. Maintain a
- * send error cache so that only the first consecutive error for a
- * destination is logged.
+ * sendpkt - send a packet to the specified destination from the given endpt
+ * except for multicast, which may be sent from several addresses.
*/
void
sendpkt(
- sockaddr_u * dest,
- struct interface * ep,
- int ttl,
- struct pkt * pkt,
- int len
+ sockaddr_u * dest,
+ endpt * ep,
+ int ttl,
+ struct pkt * pkt,
+ int len
)
{
endpt * src;
@@ -3145,12 +3182,16 @@ sendpkt(
l_fp org, rec, xmt;
ismcast = IS_MCAST(dest);
- if (!ismcast)
+ if (!ismcast) {
src = ep;
- else
+ } else {
+#ifndef MCAST
+ return;
+#endif
src = (IS_IPV4(dest))
- ? mc4_list
- : mc6_list;
+ ? mc4_list
+ : mc6_list;
+ }
if (NULL == src) {
/*
@@ -3164,13 +3205,14 @@ sendpkt(
}
do {
+ if (INT_LL_OF_GLOB & src->flags) {
+ /* avoid duplicate multicasts on same IPv6 net */
+ goto loop;
+ }
DPRINTF(2, ("%ssendpkt(%d, dst=%s, src=%s, ttl=%d, len=%d)\n",
ismcast ? "\tMCAST\t***** " : "", src->fd,
stoa(dest), stoa(&src->sin), ttl, len));
#ifdef MCAST
- /*
- * for the moment we use the bcast option to set multicast ttl
- */
if (ismcast && ttl > 0 && ttl != src->last_ttl) {
/*
* set the multicast ttl for outgoing packets
@@ -3211,7 +3253,7 @@ sendpkt(
cc = simulate_server(dest, src, pkt);
#elif defined(HAVE_IO_COMPLETION_PORT)
cc = io_completion_port_sendto(src, src->fd, pkt,
- (size_t)len, (sockaddr_u *)&dest->sa);
+ (size_t)len, dest);
#else
cc = sendto(src->fd, (char *)pkt, (u_int)len, 0,
&dest->sa, SOCKLEN(dest));
@@ -3223,6 +3265,7 @@ sendpkt(
src->sent++;
packets_sent++;
}
+ loop:
if (ismcast)
src = src->mclink;
} while (ismcast && src != NULL);
@@ -3241,8 +3284,6 @@ sendpkt(
FPTOD(NTOHS_FP(pkt->rootdelay)),
FPTOD(NTOHS_FP(pkt->rootdisp)), pkt->refid,
len - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
-
- return;
}
@@ -3261,7 +3302,7 @@ fdbits(
static char buffer[256];
char * buf = buffer;
- count = min(count, 255);
+ count = min(count, sizeof(buffer) - 1);
while (count >= 0) {
*buf++ = FD_ISSET(count, set) ? '#' : '-';
@@ -3334,7 +3375,7 @@ read_refclock_packet(
*/
rb->recv_length = buflen;
rb->recv_peer = rp->srcclock;
- rb->dstadr = 0;
+ rb->dstadr = NULL;
rb->fd = fd;
rb->recv_time = ts;
rb->receiver = rp->clock_recv;
@@ -3476,9 +3517,9 @@ fetch_timestamp(
*/
static inline int
read_network_packet(
- SOCKET fd,
- struct interface * itf,
- l_fp ts
+ SOCKET fd,
+ endpt * itf,
+ l_fp ts
)
{
GETSOCKNAME_SOCKLEN_TYPE fromlen;
@@ -3580,23 +3621,14 @@ read_network_packet(
** Bug 2672: Some OSes (MacOSX and Linux) don't block spoofed ::1
*/
- if (AF_INET6 == itf->family) {
- DPRINTF(2, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
- stoa(&rb->recv_srcadr),
- IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)),
- stoa(&itf->sin),
- !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
- ));
-
- if ( IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr))
- && !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
- ) {
- packets_dropped++;
- DPRINTF(2, ("DROPPING that packet\n"));
- freerecvbuf(rb);
- return buflen;
- }
- DPRINTF(2, ("processing that packet\n"));
+ if ( IS_IPV6(&rb->recv_srcadr)
+ && IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr))
+ && !(INT_LOOPBACK & itf->flags)) {
+
+ packets_dropped++;
+ DPRINTF(2, ("DROPPING pkt with spoofed ::1 source on %s\n", latoa(itf)));
+ freerecvbuf(rb);
+ return -1;
}
/*
@@ -3954,8 +3986,9 @@ select_peerinterface(
stoa(srcadr)));
} else {
ep = dstadr;
- if (NULL == ep)
+ if (NULL == ep) {
ep = wild;
+ }
}
/*
* If it is a multicast address, findbcastinter() may not find
@@ -3963,16 +3996,19 @@ select_peerinterface(
* given to us as the wildcard (ANY_INTERFACE_CHOOSE). Either
* way, try a little harder.
*/
- if (wild == ep)
+ if (wild == ep) {
ep = findinterface(srcadr);
+ }
/*
* we do not bind to the wildcard interfaces for output
* as our (network) source address would be undefined and
* crypto will not work without knowing the own transmit address
*/
- if (ep != NULL && INT_WILDCARD & ep->flags)
- if (!accept_wildcard_if_for_winnt)
+ if (ep != NULL && (INT_WILDCARD & ep->flags)) {
+ if (!accept_wildcard_if_for_winnt) {
ep = NULL;
+ }
+ }
#else /* SIM follows */
ep = loopback_interface;
#endif
@@ -4007,7 +4043,7 @@ findinterface(
/*
* findlocalinterface - find local interface corresponding to addr,
- * which does not have any of flags set. If bast is nonzero, addr is
+ * which does not have any of flags set. If bcast is nonzero, addr is
* a broadcast address.
*
* This code attempts to find the local sending address for an outgoing
@@ -4037,21 +4073,21 @@ findlocalinterface(
DPRINTF(4, ("Finding interface for addr %s in list of addresses\n",
stoa(addr)));
- /* [Bug 3437] The dummy POOL peer comes in with an AF of
- * zero. This is bound to fail, but on the way to nowhere it
+ /* [Bug 3437] The prototype POOL peer can be AF_UNSPEC.
+ * This is bound to fail, but on the way to nowhere it
* triggers a security incident on SELinux.
*
- * Checking the condition and failing early is probably a good
+ * Checking the condition and failing early is probably good
* advice, and even saves us some syscalls in that case.
* Thanks to Miroslav Lichvar for finding this.
*/
- if (AF_UNSPEC == AF(addr))
+ if (AF_UNSPEC == AF(addr)) {
return NULL;
-
+ }
s = socket(AF(addr), SOCK_DGRAM, 0);
- if (INVALID_SOCKET == s)
+ if (INVALID_SOCKET == s) {
return NULL;
-
+ }
/*
* If we are looking for broadcast interface we need to set this
* socket to allow broadcast
@@ -4092,14 +4128,18 @@ findlocalinterface(
* See http://bugs.ntp.org/1184 and http://bugs.ntp.org/1683
* for more background.
*/
- if (NULL == iface || iface->ignore_packets)
+ if (NULL == iface || iface->ignore_packets) {
iface = findclosestinterface(&saddr,
flags | INT_LOOPBACK);
-
- /* Don't use an interface which will ignore replies */
- if (iface != NULL && iface->ignore_packets)
+ }
+ /*
+ * Don't select an interface which will ignore replies, or one
+ * dedicated to multicast receive.
+ */
+ if ( iface != NULL
+ && (iface->ignore_packets || (INT_MCASTIF & iface->flags))) {
iface = NULL;
-
+ }
return iface;
}
@@ -4169,47 +4209,40 @@ calc_addr_distance(
const sockaddr_u * a2
)
{
- u_int32 a1val;
- u_int32 a2val;
- u_int32 v4dist;
- int found_greater;
- int a1_greater;
- int i;
+ u_char * pdist;
+ const u_char * p1;
+ const u_char * p2;
+ size_t cb;
+ int different;
+ int a1_greater;
+ u_int u;
REQUIRE(AF(a1) == AF(a2));
ZERO_SOCK(dist);
AF(dist) = AF(a1);
- /* v4 can be done a bit simpler */
if (IS_IPV4(a1)) {
- a1val = SRCADR(a1);
- a2val = SRCADR(a2);
- v4dist = (a1val > a2val)
- ? a1val - a2val
- : a2val - a1val;
- SET_ADDR4(dist, v4dist);
-
- return;
+ pdist = ( u_char *)&NSRCADR(dist);
+ p1 = (const u_char *)&NSRCADR(a1);
+ p2 = (const u_char *)&NSRCADR(a2);
+ } else {
+ pdist = ( u_char *)&NSRCADR(dist);
+ p1 = (const u_char *)&NSRCADR(a1);
+ p2 = (const u_char *)&NSRCADR(a2);
}
-
- found_greater = FALSE;
- a1_greater = FALSE; /* suppress pot. uninit. warning */
- for (i = 0; i < (int)sizeof(NSRCADR6(a1)); i++) {
- if (!found_greater &&
- NSRCADR6(a1)[i] != NSRCADR6(a2)[i]) {
- found_greater = TRUE;
- a1_greater = (NSRCADR6(a1)[i] > NSRCADR6(a2)[i]);
+ cb = SIZEOF_INADDR(AF(dist));
+ different = FALSE;
+ a1_greater = FALSE;
+ for (u = 0; u < cb; u++) {
+ if (!different && p1[u] != p2[u]) {
+ a1_greater = (p1[u] > p2[u]);
+ different = TRUE;
}
- if (!found_greater) {
- NSRCADR6(dist)[i] = 0;
+ if (a1_greater) {
+ pdist[u] = p1[u] - p2[u];
} else {
- if (a1_greater)
- NSRCADR6(dist)[i] = NSRCADR6(a1)[i] -
- NSRCADR6(a2)[i];
- else
- NSRCADR6(dist)[i] = NSRCADR6(a2)[i] -
- NSRCADR6(a1)[i];
+ pdist[u] = p2[u] - p1[u];
}
}
}
@@ -4468,7 +4501,7 @@ io_closeclock(
# ifdef HAVE_IO_COMPLETION_PORT
io_completion_port_remove_clock_io(rio);
# endif
- close_and_delete_fd_from_list(rio->fd);
+ close_and_delete_fd_from_list(rio->fd, NULL);
purge_recv_buffers_for_fd(rio->fd);
rio->fd = -1;
}
@@ -4503,7 +4536,7 @@ kill_asyncio(
maxactivefd = 0;
while (fd_list != NULL)
- close_and_delete_fd_from_list(fd_list->fd);
+ close_and_delete_fd_from_list(fd_list->fd, NULL);
UNBLOCKIO();
}
@@ -4531,7 +4564,8 @@ add_fd_to_list(
static void
close_and_delete_fd_from_list(
- SOCKET fd
+ SOCKET fd,
+ endpt *ep /* req. if fd is in struct endpt */
)
{
vsock_t *lsock;
@@ -4545,6 +4579,11 @@ close_and_delete_fd_from_list(
switch (lsock->type) {
case FD_TYPE_SOCKET:
+ #ifdef HAVE_IO_COMPLETION_PORT
+ if (ep != NULL) {
+ io_completion_port_remove_socket(fd, ep);
+ }
+ #endif
closesocket(lsock->fd);
break;
@@ -4635,7 +4674,7 @@ delete_interface_from_list(
}
-static struct interface *
+static endpt *
find_addr_in_list(
sockaddr_u *addr
)
@@ -4707,7 +4746,7 @@ localaddrtoa(
static void
process_routing_msgs(struct asyncio_reader *reader)
{
- static char * buffer;
+ static void * buffer;
static size_t buffsz = 8192;
int cnt, new, msg_type;
socklen_t len;
@@ -4716,16 +4755,15 @@ process_routing_msgs(struct asyncio_reader *reader)
#else
struct rt_msghdr rtm;
char *p;
+ char *endp;
#endif
- if (disable_dynamic_updates) {
+ if (scan_addrs_once) {
/*
* discard ourselves if we are not needed any more
* usually happens when running unprivileged
*/
- remove_asyncio_reader(reader);
- delete_asyncio_reader(reader);
- return;
+ goto disable;
}
if (NULL == buffer) {
@@ -4758,22 +4796,20 @@ process_routing_msgs(struct asyncio_reader *reader)
disable:
remove_asyncio_reader(reader);
delete_asyncio_reader(reader);
+ return;
}
- return;
}
/*
* process routing message
*/
#ifdef HAVE_RTNETLINK
- for (nh = UA_PTR(struct nlmsghdr, buffer);
- NLMSG_OK(nh, cnt);
- nh = NLMSG_NEXT(nh, cnt))
+ for (nh = buffer; NLMSG_OK(nh, cnt); nh = NLMSG_NEXT(nh, cnt))
{
msg_type = nh->nlmsg_type;
#else
- for (p = buffer;
- (p + sizeof(struct rt_msghdr)) <= (buffer + cnt);
+ for (p = buffer, endp = p + cnt;
+ (p + sizeof(struct rt_msghdr)) <= endp;
p += rtm.rtm_msglen)
{
memcpy(&rtm, p, sizeof(rtm));
@@ -4787,7 +4823,7 @@ process_routing_msgs(struct asyncio_reader *reader)
return;
}
msg_type = rtm.rtm_type;
-#endif
+#endif /* !HAVE_RTNETLINK */
switch (msg_type) {
#ifdef RTM_NEWADDR
case RTM_NEWADDR:
@@ -4835,7 +4871,7 @@ process_routing_msgs(struct asyncio_reader *reader)
*/
DPRINTF(3, ("routing message op = %d: scheduling interface update\n",
msg_type));
- timer_interfacetimeout(current_time + UPDATE_GRACE);
+ endpt_scan_timer = UPDATE_GRACE + current_time;
break;
#ifdef HAVE_RTNETLINK
case NLMSG_DONE:
@@ -4857,14 +4893,14 @@ process_routing_msgs(struct asyncio_reader *reader)
* set up routing notifications
*/
static void
-init_async_notifications()
+init_async_notifications(void)
{
struct asyncio_reader *reader;
#ifdef HAVE_RTNETLINK
int fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
struct sockaddr_nl sa;
#else
- int fd = socket(PF_ROUTE, SOCK_RAW, 0);
+ int fd = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC);
#endif
if (fd < 0) {
msyslog(LOG_ERR,
@@ -4908,4 +4944,3 @@ init_async_notifications(void)
{
}
#endif
-
diff --git a/contrib/ntp/ntpd/ntp_keyword.h b/contrib/ntp/ntpd/ntp_keyword.h
index 7b3efc2cda30..7fa610bb39b9 100644
--- a/contrib/ntp/ntpd/ntp_keyword.h
+++ b/contrib/ntp/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2022-03-27 14:17:11 UTC diff_ignore_line
+ * Generated 2023-09-25 05:34:02 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,7 +10,7 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[212] = {
+const char * const keyword_text[213] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -39,200 +39,201 @@ const char * const keyword_text[212] = {
/* 25 283 T_Ctl */ "ctl",
/* 26 284 T_Day */ "day",
/* 27 285 T_Default */ "default",
- /* 28 286 T_Device */ "device",
- /* 29 287 T_Digest */ "digest",
- /* 30 288 T_Disable */ "disable",
- /* 31 289 T_Discard */ "discard",
- /* 32 290 T_Dispersion */ "dispersion",
- /* 33 291 T_Double */ NULL,
- /* 34 292 T_Driftfile */ "driftfile",
- /* 35 293 T_Drop */ "drop",
- /* 36 294 T_Dscp */ "dscp",
- /* 37 295 T_Ellipsis */ "...",
- /* 38 296 T_Enable */ "enable",
- /* 39 297 T_End */ "end",
- /* 40 298 T_Epeer */ "epeer",
- /* 41 299 T_False */ NULL,
- /* 42 300 T_File */ "file",
- /* 43 301 T_Filegen */ "filegen",
- /* 44 302 T_Filenum */ "filenum",
- /* 45 303 T_Flag1 */ "flag1",
- /* 46 304 T_Flag2 */ "flag2",
- /* 47 305 T_Flag3 */ "flag3",
- /* 48 306 T_Flag4 */ "flag4",
- /* 49 307 T_Flake */ "flake",
- /* 50 308 T_Floor */ "floor",
- /* 51 309 T_Freq */ "freq",
- /* 52 310 T_Fudge */ "fudge",
- /* 53 311 T_Fuzz */ "fuzz",
- /* 54 312 T_Host */ "host",
- /* 55 313 T_Huffpuff */ "huffpuff",
- /* 56 314 T_Iburst */ "iburst",
- /* 57 315 T_Ident */ "ident",
- /* 58 316 T_Ignore */ "ignore",
- /* 59 317 T_Ignorehash */ "ignorehash",
- /* 60 318 T_Incalloc */ "incalloc",
- /* 61 319 T_Incmem */ "incmem",
- /* 62 320 T_Initalloc */ "initalloc",
- /* 63 321 T_Initmem */ "initmem",
- /* 64 322 T_Includefile */ "includefile",
- /* 65 323 T_Integer */ NULL,
- /* 66 324 T_Interface */ "interface",
- /* 67 325 T_Intrange */ NULL,
- /* 68 326 T_Io */ "io",
- /* 69 327 T_Ippeerlimit */ "ippeerlimit",
- /* 70 328 T_Ipv4 */ "ipv4",
- /* 71 329 T_Ipv4_flag */ "-4",
- /* 72 330 T_Ipv6 */ "ipv6",
- /* 73 331 T_Ipv6_flag */ "-6",
- /* 74 332 T_Kernel */ "kernel",
- /* 75 333 T_Key */ "key",
- /* 76 334 T_Keys */ "keys",
- /* 77 335 T_Keysdir */ "keysdir",
- /* 78 336 T_Kod */ "kod",
- /* 79 337 T_Leapfile */ "leapfile",
- /* 80 338 T_Leapsmearinterval */ "leapsmearinterval",
- /* 81 339 T_Limited */ "limited",
- /* 82 340 T_Link */ "link",
- /* 83 341 T_Listen */ "listen",
- /* 84 342 T_Logconfig */ "logconfig",
- /* 85 343 T_Logfile */ "logfile",
- /* 86 344 T_Loopstats */ "loopstats",
- /* 87 345 T_Lowpriotrap */ "lowpriotrap",
- /* 88 346 T_Manycastclient */ "manycastclient",
- /* 89 347 T_Manycastserver */ "manycastserver",
- /* 90 348 T_Mask */ "mask",
- /* 91 349 T_Maxage */ "maxage",
- /* 92 350 T_Maxclock */ "maxclock",
- /* 93 351 T_Maxdepth */ "maxdepth",
- /* 94 352 T_Maxdist */ "maxdist",
- /* 95 353 T_Maxmem */ "maxmem",
- /* 96 354 T_Maxpoll */ "maxpoll",
- /* 97 355 T_Mdnstries */ "mdnstries",
- /* 98 356 T_Mem */ "mem",
- /* 99 357 T_Memlock */ "memlock",
- /* 100 358 T_Minclock */ "minclock",
- /* 101 359 T_Mindepth */ "mindepth",
- /* 102 360 T_Mindist */ "mindist",
- /* 103 361 T_Minimum */ "minimum",
- /* 104 362 T_Minjitter */ "minjitter",
- /* 105 363 T_Minpoll */ "minpoll",
- /* 106 364 T_Minsane */ "minsane",
- /* 107 365 T_Mode */ "mode",
- /* 108 366 T_Mode7 */ "mode7",
- /* 109 367 T_Monitor */ "monitor",
- /* 110 368 T_Month */ "month",
- /* 111 369 T_Mru */ "mru",
- /* 112 370 T_Mssntp */ "mssntp",
- /* 113 371 T_Multicastclient */ "multicastclient",
- /* 114 372 T_Nic */ "nic",
- /* 115 373 T_Nolink */ "nolink",
- /* 116 374 T_Nomodify */ "nomodify",
- /* 117 375 T_Nomrulist */ "nomrulist",
- /* 118 376 T_None */ "none",
- /* 119 377 T_Nonvolatile */ "nonvolatile",
- /* 120 378 T_Noepeer */ "noepeer",
- /* 121 379 T_Nopeer */ "nopeer",
- /* 122 380 T_Noquery */ "noquery",
- /* 123 381 T_Noselect */ "noselect",
- /* 124 382 T_Noserve */ "noserve",
- /* 125 383 T_Notrap */ "notrap",
- /* 126 384 T_Notrust */ "notrust",
- /* 127 385 T_Ntp */ "ntp",
- /* 128 386 T_Ntpport */ "ntpport",
- /* 129 387 T_NtpSignDsocket */ "ntpsigndsocket",
- /* 130 388 T_Orphan */ "orphan",
- /* 131 389 T_Orphanwait */ "orphanwait",
- /* 132 390 T_PCEdigest */ "peer_clear_digest_early",
- /* 133 391 T_Panic */ "panic",
- /* 134 392 T_Peer */ "peer",
- /* 135 393 T_Peerstats */ "peerstats",
- /* 136 394 T_Phone */ "phone",
- /* 137 395 T_Pid */ "pid",
- /* 138 396 T_Pidfile */ "pidfile",
- /* 139 397 T_Poll */ "poll",
- /* 140 398 T_PollSkewList */ "pollskewlist",
- /* 141 399 T_Pool */ "pool",
- /* 142 400 T_Port */ "port",
- /* 143 401 T_PpsData */ "ppsdata",
- /* 144 402 T_Preempt */ "preempt",
- /* 145 403 T_Prefer */ "prefer",
- /* 146 404 T_Protostats */ "protostats",
- /* 147 405 T_Pw */ "pw",
- /* 148 406 T_Randfile */ "randfile",
- /* 149 407 T_Rawstats */ "rawstats",
- /* 150 408 T_Refid */ "refid",
- /* 151 409 T_Requestkey */ "requestkey",
- /* 152 410 T_Reset */ "reset",
- /* 153 411 T_Restrict */ "restrict",
- /* 154 412 T_Revoke */ "revoke",
- /* 155 413 T_Rlimit */ "rlimit",
- /* 156 414 T_Saveconfigdir */ "saveconfigdir",
- /* 157 415 T_Server */ "server",
- /* 158 416 T_Serverresponse */ "serverresponse",
- /* 159 417 T_ServerresponseFuzz */ NULL,
- /* 160 418 T_Setvar */ "setvar",
- /* 161 419 T_Source */ "source",
- /* 162 420 T_Stacksize */ "stacksize",
- /* 163 421 T_Statistics */ "statistics",
- /* 164 422 T_Stats */ "stats",
- /* 165 423 T_Statsdir */ "statsdir",
- /* 166 424 T_Step */ "step",
- /* 167 425 T_Stepback */ "stepback",
- /* 168 426 T_Stepfwd */ "stepfwd",
- /* 169 427 T_Stepout */ "stepout",
- /* 170 428 T_Stratum */ "stratum",
- /* 171 429 T_String */ NULL,
- /* 172 430 T_Sys */ "sys",
- /* 173 431 T_Sysstats */ "sysstats",
- /* 174 432 T_Tick */ "tick",
- /* 175 433 T_Time1 */ "time1",
- /* 176 434 T_Time2 */ "time2",
- /* 177 435 T_TimeData */ "timedata",
- /* 178 436 T_Timer */ "timer",
- /* 179 437 T_Timingstats */ "timingstats",
- /* 180 438 T_Tinker */ "tinker",
- /* 181 439 T_Tos */ "tos",
- /* 182 440 T_Trap */ "trap",
- /* 183 441 T_True */ "true",
- /* 184 442 T_Trustedkey */ "trustedkey",
- /* 185 443 T_Ttl */ "ttl",
- /* 186 444 T_Type */ "type",
- /* 187 445 T_U_int */ NULL,
- /* 188 446 T_UEcrypto */ "unpeer_crypto_early",
- /* 189 447 T_UEcryptonak */ "unpeer_crypto_nak_early",
- /* 190 448 T_UEdigest */ "unpeer_digest_early",
- /* 191 449 T_Unconfig */ "unconfig",
- /* 192 450 T_Unpeer */ "unpeer",
- /* 193 451 T_Version */ "version",
- /* 194 452 T_WanderThreshold */ NULL,
- /* 195 453 T_Week */ "week",
- /* 196 454 T_Wildcard */ "wildcard",
- /* 197 455 T_Xleave */ "xleave",
- /* 198 456 T_Xmtnonce */ "xmtnonce",
- /* 199 457 T_Year */ "year",
- /* 200 458 T_Flag */ NULL,
- /* 201 459 T_EOC */ NULL,
- /* 202 460 T_Simulate */ "simulate",
- /* 203 461 T_Beep_Delay */ "beep_delay",
- /* 204 462 T_Sim_Duration */ "simulation_duration",
- /* 205 463 T_Server_Offset */ "server_offset",
- /* 206 464 T_Duration */ "duration",
- /* 207 465 T_Freq_Offset */ "freq_offset",
- /* 208 466 T_Wander */ "wander",
- /* 209 467 T_Jitter */ "jitter",
- /* 210 468 T_Prop_Delay */ "prop_delay",
- /* 211 469 T_Proc_Delay */ "proc_delay"
+ /* 28 286 T_Delrestrict */ "delrestrict",
+ /* 29 287 T_Device */ "device",
+ /* 30 288 T_Digest */ "digest",
+ /* 31 289 T_Disable */ "disable",
+ /* 32 290 T_Discard */ "discard",
+ /* 33 291 T_Dispersion */ "dispersion",
+ /* 34 292 T_Double */ NULL,
+ /* 35 293 T_Driftfile */ "driftfile",
+ /* 36 294 T_Drop */ "drop",
+ /* 37 295 T_Dscp */ "dscp",
+ /* 38 296 T_Ellipsis */ "...",
+ /* 39 297 T_Enable */ "enable",
+ /* 40 298 T_End */ "end",
+ /* 41 299 T_Epeer */ "epeer",
+ /* 42 300 T_False */ NULL,
+ /* 43 301 T_File */ "file",
+ /* 44 302 T_Filegen */ "filegen",
+ /* 45 303 T_Filenum */ "filenum",
+ /* 46 304 T_Flag1 */ "flag1",
+ /* 47 305 T_Flag2 */ "flag2",
+ /* 48 306 T_Flag3 */ "flag3",
+ /* 49 307 T_Flag4 */ "flag4",
+ /* 50 308 T_Flake */ "flake",
+ /* 51 309 T_Floor */ "floor",
+ /* 52 310 T_Freq */ "freq",
+ /* 53 311 T_Fudge */ "fudge",
+ /* 54 312 T_Fuzz */ "fuzz",
+ /* 55 313 T_Host */ "host",
+ /* 56 314 T_Huffpuff */ "huffpuff",
+ /* 57 315 T_Iburst */ "iburst",
+ /* 58 316 T_Ident */ "ident",
+ /* 59 317 T_Ignore */ "ignore",
+ /* 60 318 T_Ignorehash */ "ignorehash",
+ /* 61 319 T_Incalloc */ "incalloc",
+ /* 62 320 T_Incmem */ "incmem",
+ /* 63 321 T_Initalloc */ "initalloc",
+ /* 64 322 T_Initmem */ "initmem",
+ /* 65 323 T_Includefile */ "includefile",
+ /* 66 324 T_Integer */ NULL,
+ /* 67 325 T_Interface */ "interface",
+ /* 68 326 T_Intrange */ NULL,
+ /* 69 327 T_Io */ "io",
+ /* 70 328 T_Ippeerlimit */ "ippeerlimit",
+ /* 71 329 T_Ipv4 */ "ipv4",
+ /* 72 330 T_Ipv4_flag */ "-4",
+ /* 73 331 T_Ipv6 */ "ipv6",
+ /* 74 332 T_Ipv6_flag */ "-6",
+ /* 75 333 T_Kernel */ "kernel",
+ /* 76 334 T_Key */ "key",
+ /* 77 335 T_Keys */ "keys",
+ /* 78 336 T_Keysdir */ "keysdir",
+ /* 79 337 T_Kod */ "kod",
+ /* 80 338 T_Leapfile */ "leapfile",
+ /* 81 339 T_Leapsmearinterval */ "leapsmearinterval",
+ /* 82 340 T_Limited */ "limited",
+ /* 83 341 T_Link */ "link",
+ /* 84 342 T_Listen */ "listen",
+ /* 85 343 T_Logconfig */ "logconfig",
+ /* 86 344 T_Logfile */ "logfile",
+ /* 87 345 T_Loopstats */ "loopstats",
+ /* 88 346 T_Lowpriotrap */ "lowpriotrap",
+ /* 89 347 T_Manycastclient */ "manycastclient",
+ /* 90 348 T_Manycastserver */ "manycastserver",
+ /* 91 349 T_Mask */ "mask",
+ /* 92 350 T_Maxage */ "maxage",
+ /* 93 351 T_Maxclock */ "maxclock",
+ /* 94 352 T_Maxdepth */ "maxdepth",
+ /* 95 353 T_Maxdist */ "maxdist",
+ /* 96 354 T_Maxmem */ "maxmem",
+ /* 97 355 T_Maxpoll */ "maxpoll",
+ /* 98 356 T_Mdnstries */ "mdnstries",
+ /* 99 357 T_Mem */ "mem",
+ /* 100 358 T_Memlock */ "memlock",
+ /* 101 359 T_Minclock */ "minclock",
+ /* 102 360 T_Mindepth */ "mindepth",
+ /* 103 361 T_Mindist */ "mindist",
+ /* 104 362 T_Minimum */ "minimum",
+ /* 105 363 T_Minjitter */ "minjitter",
+ /* 106 364 T_Minpoll */ "minpoll",
+ /* 107 365 T_Minsane */ "minsane",
+ /* 108 366 T_Mode */ "mode",
+ /* 109 367 T_Mode7 */ "mode7",
+ /* 110 368 T_Monitor */ "monitor",
+ /* 111 369 T_Month */ "month",
+ /* 112 370 T_Mru */ "mru",
+ /* 113 371 T_Mssntp */ "mssntp",
+ /* 114 372 T_Multicastclient */ "multicastclient",
+ /* 115 373 T_Nic */ "nic",
+ /* 116 374 T_Nolink */ "nolink",
+ /* 117 375 T_Nomodify */ "nomodify",
+ /* 118 376 T_Nomrulist */ "nomrulist",
+ /* 119 377 T_None */ "none",
+ /* 120 378 T_Nonvolatile */ "nonvolatile",
+ /* 121 379 T_Noepeer */ "noepeer",
+ /* 122 380 T_Nopeer */ "nopeer",
+ /* 123 381 T_Noquery */ "noquery",
+ /* 124 382 T_Noselect */ "noselect",
+ /* 125 383 T_Noserve */ "noserve",
+ /* 126 384 T_Notrap */ "notrap",
+ /* 127 385 T_Notrust */ "notrust",
+ /* 128 386 T_Ntp */ "ntp",
+ /* 129 387 T_Ntpport */ "ntpport",
+ /* 130 388 T_NtpSignDsocket */ "ntpsigndsocket",
+ /* 131 389 T_Orphan */ "orphan",
+ /* 132 390 T_Orphanwait */ "orphanwait",
+ /* 133 391 T_PCEdigest */ "peer_clear_digest_early",
+ /* 134 392 T_Panic */ "panic",
+ /* 135 393 T_Peer */ "peer",
+ /* 136 394 T_Peerstats */ "peerstats",
+ /* 137 395 T_Phone */ "phone",
+ /* 138 396 T_Pid */ "pid",
+ /* 139 397 T_Pidfile */ "pidfile",
+ /* 140 398 T_Poll */ "poll",
+ /* 141 399 T_PollSkewList */ "pollskewlist",
+ /* 142 400 T_Pool */ "pool",
+ /* 143 401 T_Port */ "port",
+ /* 144 402 T_PpsData */ "ppsdata",
+ /* 145 403 T_Preempt */ "preempt",
+ /* 146 404 T_Prefer */ "prefer",
+ /* 147 405 T_Protostats */ "protostats",
+ /* 148 406 T_Pw */ "pw",
+ /* 149 407 T_Randfile */ "randfile",
+ /* 150 408 T_Rawstats */ "rawstats",
+ /* 151 409 T_Refid */ "refid",
+ /* 152 410 T_Requestkey */ "requestkey",
+ /* 153 411 T_Reset */ "reset",
+ /* 154 412 T_Restrict */ "restrict",
+ /* 155 413 T_Revoke */ "revoke",
+ /* 156 414 T_Rlimit */ "rlimit",
+ /* 157 415 T_Saveconfigdir */ "saveconfigdir",
+ /* 158 416 T_Server */ "server",
+ /* 159 417 T_Serverresponse */ "serverresponse",
+ /* 160 418 T_ServerresponseFuzz */ NULL,
+ /* 161 419 T_Setvar */ "setvar",
+ /* 162 420 T_Source */ "source",
+ /* 163 421 T_Stacksize */ "stacksize",
+ /* 164 422 T_Statistics */ "statistics",
+ /* 165 423 T_Stats */ "stats",
+ /* 166 424 T_Statsdir */ "statsdir",
+ /* 167 425 T_Step */ "step",
+ /* 168 426 T_Stepback */ "stepback",
+ /* 169 427 T_Stepfwd */ "stepfwd",
+ /* 170 428 T_Stepout */ "stepout",
+ /* 171 429 T_Stratum */ "stratum",
+ /* 172 430 T_String */ NULL,
+ /* 173 431 T_Sys */ "sys",
+ /* 174 432 T_Sysstats */ "sysstats",
+ /* 175 433 T_Tick */ "tick",
+ /* 176 434 T_Time1 */ "time1",
+ /* 177 435 T_Time2 */ "time2",
+ /* 178 436 T_TimeData */ "timedata",
+ /* 179 437 T_Timer */ "timer",
+ /* 180 438 T_Timingstats */ "timingstats",
+ /* 181 439 T_Tinker */ "tinker",
+ /* 182 440 T_Tos */ "tos",
+ /* 183 441 T_Trap */ "trap",
+ /* 184 442 T_True */ "true",
+ /* 185 443 T_Trustedkey */ "trustedkey",
+ /* 186 444 T_Ttl */ "ttl",
+ /* 187 445 T_Type */ "type",
+ /* 188 446 T_U_int */ NULL,
+ /* 189 447 T_UEcrypto */ "unpeer_crypto_early",
+ /* 190 448 T_UEcryptonak */ "unpeer_crypto_nak_early",
+ /* 191 449 T_UEdigest */ "unpeer_digest_early",
+ /* 192 450 T_Unconfig */ "unconfig",
+ /* 193 451 T_Unpeer */ "unpeer",
+ /* 194 452 T_Version */ "version",
+ /* 195 453 T_WanderThreshold */ NULL,
+ /* 196 454 T_Week */ "week",
+ /* 197 455 T_Wildcard */ "wildcard",
+ /* 198 456 T_Xleave */ "xleave",
+ /* 199 457 T_Xmtnonce */ "xmtnonce",
+ /* 200 458 T_Year */ "year",
+ /* 201 459 T_Flag */ NULL,
+ /* 202 460 T_EOC */ NULL,
+ /* 203 461 T_Simulate */ "simulate",
+ /* 204 462 T_Beep_Delay */ "beep_delay",
+ /* 205 463 T_Sim_Duration */ "simulation_duration",
+ /* 206 464 T_Server_Offset */ "server_offset",
+ /* 207 465 T_Duration */ "duration",
+ /* 208 466 T_Freq_Offset */ "freq_offset",
+ /* 209 467 T_Wander */ "wander",
+ /* 210 468 T_Jitter */ "jitter",
+ /* 211 469 T_Prop_Delay */ "prop_delay",
+ /* 212 470 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 999
+#define SCANNER_INIT_S 1008
-const scan_state sst[1002] = {
+const scan_state sst[1011] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
- S_ST( '-', 3, 331, 0 ), /* 1 */
+ S_ST( '-', 3, 332, 0 ), /* 1 */
S_ST( '.', 3, 3, 1 ), /* 2 */
- S_ST( '.', 3, 295, 0 ), /* 3 . */
+ S_ST( '.', 3, 296, 0 ), /* 3 . */
S_ST( 'a', 3, 23, 2 ), /* 4 */
S_ST( 'b', 3, 6, 0 ), /* 5 a */
S_ST( 'b', 3, 7, 0 ), /* 6 ab */
@@ -287,7 +288,7 @@ const scan_state sst[1002] = {
S_ST( 'd', 3, 56, 0 ), /* 55 beep_ */
S_ST( 'e', 3, 57, 0 ), /* 56 beep_d */
S_ST( 'l', 3, 58, 0 ), /* 57 beep_de */
- S_ST( 'a', 3, 461, 0 ), /* 58 beep_del */
+ S_ST( 'a', 3, 462, 0 ), /* 58 beep_del */
S_ST( 'r', 3, 60, 48 ), /* 59 b */
S_ST( 'o', 3, 61, 0 ), /* 60 br */
S_ST( 'a', 3, 62, 0 ), /* 61 bro */
@@ -355,138 +356,138 @@ const scan_state sst[1002] = {
S_ST( 'a', 3, 124, 0 ), /* 123 cryptost */
S_ST( 't', 3, 282, 0 ), /* 124 cryptosta */
S_ST( 't', 3, 283, 117 ), /* 125 c */
- S_ST( 'd', 3, 163, 78 ), /* 126 */
+ S_ST( 'd', 3, 171, 78 ), /* 126 */
S_ST( 'a', 3, 284, 0 ), /* 127 d */
- S_ST( 'e', 3, 133, 127 ), /* 128 d */
+ S_ST( 'e', 3, 141, 127 ), /* 128 d */
S_ST( 'f', 3, 130, 0 ), /* 129 de */
S_ST( 'a', 3, 131, 0 ), /* 130 def */
S_ST( 'u', 3, 132, 0 ), /* 131 defa */
S_ST( 'l', 3, 285, 0 ), /* 132 defau */
- S_ST( 'v', 3, 134, 129 ), /* 133 de */
- S_ST( 'i', 3, 135, 0 ), /* 134 dev */
- S_ST( 'c', 3, 286, 0 ), /* 135 devi */
- S_ST( 'i', 3, 140, 128 ), /* 136 d */
- S_ST( 'g', 3, 138, 0 ), /* 137 di */
- S_ST( 'e', 3, 139, 0 ), /* 138 dig */
- S_ST( 's', 3, 287, 0 ), /* 139 dige */
- S_ST( 's', 3, 147, 137 ), /* 140 di */
- S_ST( 'a', 3, 142, 0 ), /* 141 dis */
- S_ST( 'b', 3, 143, 0 ), /* 142 disa */
- S_ST( 'l', 3, 288, 0 ), /* 143 disab */
- S_ST( 'c', 3, 145, 141 ), /* 144 dis */
- S_ST( 'a', 3, 146, 0 ), /* 145 disc */
- S_ST( 'r', 3, 289, 0 ), /* 146 disca */
- S_ST( 'p', 3, 148, 144 ), /* 147 dis */
- S_ST( 'e', 3, 149, 0 ), /* 148 disp */
- S_ST( 'r', 3, 150, 0 ), /* 149 dispe */
- S_ST( 's', 3, 151, 0 ), /* 150 disper */
- S_ST( 'i', 3, 152, 0 ), /* 151 dispers */
- S_ST( 'o', 3, 290, 0 ), /* 152 dispersi */
- S_ST( 'r', 3, 160, 136 ), /* 153 d */
- S_ST( 'i', 3, 155, 0 ), /* 154 dr */
- S_ST( 'f', 3, 156, 0 ), /* 155 dri */
- S_ST( 't', 3, 157, 0 ), /* 156 drif */
- S_ST( 'f', 3, 158, 0 ), /* 157 drift */
- S_ST( 'i', 3, 159, 0 ), /* 158 driftf */
- S_ST( 'l', 3, 292, 0 ), /* 159 driftfi */
- S_ST( 'o', 3, 293, 154 ), /* 160 dr */
- S_ST( 's', 3, 162, 153 ), /* 161 d */
- S_ST( 'c', 3, 294, 0 ), /* 162 ds */
- S_ST( 'u', 3, 164, 161 ), /* 163 d */
- S_ST( 'r', 3, 165, 0 ), /* 164 du */
- S_ST( 'a', 3, 166, 0 ), /* 165 dur */
- S_ST( 't', 3, 167, 0 ), /* 166 dura */
- S_ST( 'i', 3, 168, 0 ), /* 167 durat */
- S_ST( 'o', 3, 464, 0 ), /* 168 durati */
- S_ST( 'e', 3, 174, 126 ), /* 169 */
- S_ST( 'n', 3, 297, 0 ), /* 170 e */
- S_ST( 'a', 3, 172, 0 ), /* 171 en */
- S_ST( 'b', 3, 173, 0 ), /* 172 ena */
- S_ST( 'l', 3, 296, 0 ), /* 173 enab */
- S_ST( 'p', 3, 175, 170 ), /* 174 e */
- S_ST( 'e', 3, 176, 0 ), /* 175 ep */
- S_ST( 'e', 3, 298, 0 ), /* 176 epe */
- S_ST( 'f', 3, 198, 169 ), /* 177 */
- S_ST( 'i', 3, 179, 0 ), /* 178 f */
- S_ST( 'l', 3, 300, 0 ), /* 179 fi */
- S_ST( 'g', 3, 181, 0 ), /* 180 file */
- S_ST( 'e', 3, 301, 0 ), /* 181 fileg */
- S_ST( 'n', 3, 183, 180 ), /* 182 file */
- S_ST( 'u', 3, 302, 0 ), /* 183 filen */
- S_ST( 'l', 3, 188, 178 ), /* 184 f */
- S_ST( 'a', 3, 187, 0 ), /* 185 fl */
- S_ST( 'g', 3, 306, 0 ), /* 186 fla */
- S_ST( 'k', 3, 307, 186 ), /* 187 fla */
- S_ST( 'o', 3, 189, 185 ), /* 188 fl */
- S_ST( 'o', 3, 308, 0 ), /* 189 flo */
- S_ST( 'r', 3, 191, 184 ), /* 190 f */
- S_ST( 'e', 3, 309, 0 ), /* 191 fr */
- S_ST( '_', 3, 193, 0 ), /* 192 freq */
- S_ST( 'o', 3, 194, 0 ), /* 193 freq_ */
- S_ST( 'f', 3, 195, 0 ), /* 194 freq_o */
- S_ST( 'f', 3, 196, 0 ), /* 195 freq_of */
- S_ST( 's', 3, 197, 0 ), /* 196 freq_off */
- S_ST( 'e', 3, 465, 0 ), /* 197 freq_offs */
- S_ST( 'u', 3, 201, 190 ), /* 198 f */
- S_ST( 'd', 3, 200, 0 ), /* 199 fu */
- S_ST( 'g', 3, 310, 0 ), /* 200 fud */
- S_ST( 'z', 3, 311, 199 ), /* 201 fu */
- S_ST( 'h', 3, 205, 177 ), /* 202 */
- S_ST( 'o', 3, 204, 0 ), /* 203 h */
- S_ST( 's', 3, 312, 0 ), /* 204 ho */
- S_ST( 'u', 3, 206, 203 ), /* 205 h */
- S_ST( 'f', 3, 207, 0 ), /* 206 hu */
- S_ST( 'f', 3, 208, 0 ), /* 207 huf */
- S_ST( 'p', 3, 209, 0 ), /* 208 huff */
- S_ST( 'u', 3, 210, 0 ), /* 209 huffp */
- S_ST( 'f', 3, 313, 0 ), /* 210 huffpu */
- S_ST( 'i', 3, 255, 202 ), /* 211 */
- S_ST( 'b', 3, 213, 0 ), /* 212 i */
- S_ST( 'u', 3, 214, 0 ), /* 213 ib */
- S_ST( 'r', 3, 215, 0 ), /* 214 ibu */
- S_ST( 's', 3, 314, 0 ), /* 215 ibur */
- S_ST( 'd', 3, 217, 212 ), /* 216 i */
- S_ST( 'e', 3, 218, 0 ), /* 217 id */
- S_ST( 'n', 3, 315, 0 ), /* 218 ide */
- S_ST( 'g', 3, 220, 216 ), /* 219 i */
- S_ST( 'n', 3, 221, 0 ), /* 220 ig */
- S_ST( 'o', 3, 222, 0 ), /* 221 ign */
- S_ST( 'r', 3, 316, 0 ), /* 222 igno */
- S_ST( 'h', 3, 224, 0 ), /* 223 ignore */
- S_ST( 'a', 3, 225, 0 ), /* 224 ignoreh */
- S_ST( 's', 3, 317, 0 ), /* 225 ignoreha */
- S_ST( 'n', 3, 249, 219 ), /* 226 i */
- S_ST( 'c', 3, 239, 0 ), /* 227 in */
- S_ST( 'a', 3, 229, 0 ), /* 228 inc */
- S_ST( 'l', 3, 230, 0 ), /* 229 inca */
- S_ST( 'l', 3, 231, 0 ), /* 230 incal */
- S_ST( 'o', 3, 318, 0 ), /* 231 incall */
- S_ST( 'l', 3, 233, 228 ), /* 232 inc */
- S_ST( 'u', 3, 234, 0 ), /* 233 incl */
- S_ST( 'd', 3, 235, 0 ), /* 234 inclu */
- S_ST( 'e', 3, 236, 0 ), /* 235 includ */
- S_ST( 'f', 3, 237, 0 ), /* 236 include */
- S_ST( 'i', 3, 238, 0 ), /* 237 includef */
- S_ST( 'l', 3, 322, 0 ), /* 238 includefi */
- S_ST( 'm', 3, 240, 232 ), /* 239 inc */
- S_ST( 'e', 3, 319, 0 ), /* 240 incm */
- S_ST( 'i', 3, 242, 227 ), /* 241 in */
- S_ST( 't', 3, 247, 0 ), /* 242 ini */
- S_ST( 'a', 3, 244, 0 ), /* 243 init */
- S_ST( 'l', 3, 245, 0 ), /* 244 inita */
- S_ST( 'l', 3, 246, 0 ), /* 245 inital */
- S_ST( 'o', 3, 320, 0 ), /* 246 initall */
- S_ST( 'm', 3, 248, 243 ), /* 247 init */
- S_ST( 'e', 3, 321, 0 ), /* 248 initm */
- S_ST( 't', 3, 250, 241 ), /* 249 in */
- S_ST( 'e', 3, 251, 0 ), /* 250 int */
- S_ST( 'r', 3, 252, 0 ), /* 251 inte */
- S_ST( 'f', 3, 253, 0 ), /* 252 inter */
- S_ST( 'a', 3, 254, 0 ), /* 253 interf */
- S_ST( 'c', 3, 324, 0 ), /* 254 interfa */
- S_ST( 'p', 3, 445, 326 ), /* 255 i */
- S_ST( 'p', 3, 257, 0 ), /* 256 ip */
- S_ST( 'e', 3, 291, 0 ), /* 257 ipp */
+ S_ST( 'l', 3, 134, 129 ), /* 133 de */
+ S_ST( 'r', 3, 135, 0 ), /* 134 del */
+ S_ST( 'e', 3, 136, 0 ), /* 135 delr */
+ S_ST( 's', 3, 137, 0 ), /* 136 delre */
+ S_ST( 't', 3, 138, 0 ), /* 137 delres */
+ S_ST( 'r', 3, 139, 0 ), /* 138 delrest */
+ S_ST( 'i', 3, 140, 0 ), /* 139 delrestr */
+ S_ST( 'c', 3, 286, 0 ), /* 140 delrestri */
+ S_ST( 'v', 3, 142, 133 ), /* 141 de */
+ S_ST( 'i', 3, 143, 0 ), /* 142 dev */
+ S_ST( 'c', 3, 287, 0 ), /* 143 devi */
+ S_ST( 'i', 3, 148, 128 ), /* 144 d */
+ S_ST( 'g', 3, 146, 0 ), /* 145 di */
+ S_ST( 'e', 3, 147, 0 ), /* 146 dig */
+ S_ST( 's', 3, 288, 0 ), /* 147 dige */
+ S_ST( 's', 3, 155, 145 ), /* 148 di */
+ S_ST( 'a', 3, 150, 0 ), /* 149 dis */
+ S_ST( 'b', 3, 151, 0 ), /* 150 disa */
+ S_ST( 'l', 3, 289, 0 ), /* 151 disab */
+ S_ST( 'c', 3, 153, 149 ), /* 152 dis */
+ S_ST( 'a', 3, 154, 0 ), /* 153 disc */
+ S_ST( 'r', 3, 290, 0 ), /* 154 disca */
+ S_ST( 'p', 3, 156, 152 ), /* 155 dis */
+ S_ST( 'e', 3, 157, 0 ), /* 156 disp */
+ S_ST( 'r', 3, 158, 0 ), /* 157 dispe */
+ S_ST( 's', 3, 159, 0 ), /* 158 disper */
+ S_ST( 'i', 3, 160, 0 ), /* 159 dispers */
+ S_ST( 'o', 3, 291, 0 ), /* 160 dispersi */
+ S_ST( 'r', 3, 168, 144 ), /* 161 d */
+ S_ST( 'i', 3, 163, 0 ), /* 162 dr */
+ S_ST( 'f', 3, 164, 0 ), /* 163 dri */
+ S_ST( 't', 3, 165, 0 ), /* 164 drif */
+ S_ST( 'f', 3, 166, 0 ), /* 165 drift */
+ S_ST( 'i', 3, 167, 0 ), /* 166 driftf */
+ S_ST( 'l', 3, 293, 0 ), /* 167 driftfi */
+ S_ST( 'o', 3, 294, 162 ), /* 168 dr */
+ S_ST( 's', 3, 170, 161 ), /* 169 d */
+ S_ST( 'c', 3, 295, 0 ), /* 170 ds */
+ S_ST( 'u', 3, 172, 169 ), /* 171 d */
+ S_ST( 'r', 3, 173, 0 ), /* 172 du */
+ S_ST( 'a', 3, 174, 0 ), /* 173 dur */
+ S_ST( 't', 3, 175, 0 ), /* 174 dura */
+ S_ST( 'i', 3, 176, 0 ), /* 175 durat */
+ S_ST( 'o', 3, 465, 0 ), /* 176 durati */
+ S_ST( 'e', 3, 182, 126 ), /* 177 */
+ S_ST( 'n', 3, 298, 0 ), /* 178 e */
+ S_ST( 'a', 3, 180, 0 ), /* 179 en */
+ S_ST( 'b', 3, 181, 0 ), /* 180 ena */
+ S_ST( 'l', 3, 297, 0 ), /* 181 enab */
+ S_ST( 'p', 3, 183, 178 ), /* 182 e */
+ S_ST( 'e', 3, 184, 0 ), /* 183 ep */
+ S_ST( 'e', 3, 299, 0 ), /* 184 epe */
+ S_ST( 'f', 3, 206, 177 ), /* 185 */
+ S_ST( 'i', 3, 187, 0 ), /* 186 f */
+ S_ST( 'l', 3, 301, 0 ), /* 187 fi */
+ S_ST( 'g', 3, 189, 0 ), /* 188 file */
+ S_ST( 'e', 3, 302, 0 ), /* 189 fileg */
+ S_ST( 'n', 3, 191, 188 ), /* 190 file */
+ S_ST( 'u', 3, 303, 0 ), /* 191 filen */
+ S_ST( 'l', 3, 196, 186 ), /* 192 f */
+ S_ST( 'a', 3, 195, 0 ), /* 193 fl */
+ S_ST( 'g', 3, 307, 0 ), /* 194 fla */
+ S_ST( 'k', 3, 308, 194 ), /* 195 fla */
+ S_ST( 'o', 3, 197, 193 ), /* 196 fl */
+ S_ST( 'o', 3, 309, 0 ), /* 197 flo */
+ S_ST( 'r', 3, 199, 192 ), /* 198 f */
+ S_ST( 'e', 3, 310, 0 ), /* 199 fr */
+ S_ST( '_', 3, 201, 0 ), /* 200 freq */
+ S_ST( 'o', 3, 202, 0 ), /* 201 freq_ */
+ S_ST( 'f', 3, 203, 0 ), /* 202 freq_o */
+ S_ST( 'f', 3, 204, 0 ), /* 203 freq_of */
+ S_ST( 's', 3, 205, 0 ), /* 204 freq_off */
+ S_ST( 'e', 3, 466, 0 ), /* 205 freq_offs */
+ S_ST( 'u', 3, 209, 198 ), /* 206 f */
+ S_ST( 'd', 3, 208, 0 ), /* 207 fu */
+ S_ST( 'g', 3, 311, 0 ), /* 208 fud */
+ S_ST( 'z', 3, 312, 207 ), /* 209 fu */
+ S_ST( 'h', 3, 213, 185 ), /* 210 */
+ S_ST( 'o', 3, 212, 0 ), /* 211 h */
+ S_ST( 's', 3, 313, 0 ), /* 212 ho */
+ S_ST( 'u', 3, 214, 211 ), /* 213 h */
+ S_ST( 'f', 3, 215, 0 ), /* 214 hu */
+ S_ST( 'f', 3, 216, 0 ), /* 215 huf */
+ S_ST( 'p', 3, 217, 0 ), /* 216 huff */
+ S_ST( 'u', 3, 218, 0 ), /* 217 huffp */
+ S_ST( 'f', 3, 314, 0 ), /* 218 huffpu */
+ S_ST( 'i', 3, 430, 210 ), /* 219 */
+ S_ST( 'b', 3, 221, 0 ), /* 220 i */
+ S_ST( 'u', 3, 222, 0 ), /* 221 ib */
+ S_ST( 'r', 3, 223, 0 ), /* 222 ibu */
+ S_ST( 's', 3, 315, 0 ), /* 223 ibur */
+ S_ST( 'd', 3, 225, 220 ), /* 224 i */
+ S_ST( 'e', 3, 226, 0 ), /* 225 id */
+ S_ST( 'n', 3, 316, 0 ), /* 226 ide */
+ S_ST( 'g', 3, 228, 224 ), /* 227 i */
+ S_ST( 'n', 3, 229, 0 ), /* 228 ig */
+ S_ST( 'o', 3, 230, 0 ), /* 229 ign */
+ S_ST( 'r', 3, 317, 0 ), /* 230 igno */
+ S_ST( 'h', 3, 232, 0 ), /* 231 ignore */
+ S_ST( 'a', 3, 233, 0 ), /* 232 ignoreh */
+ S_ST( 's', 3, 318, 0 ), /* 233 ignoreha */
+ S_ST( 'n', 3, 257, 227 ), /* 234 i */
+ S_ST( 'c', 3, 247, 0 ), /* 235 in */
+ S_ST( 'a', 3, 237, 0 ), /* 236 inc */
+ S_ST( 'l', 3, 238, 0 ), /* 237 inca */
+ S_ST( 'l', 3, 239, 0 ), /* 238 incal */
+ S_ST( 'o', 3, 319, 0 ), /* 239 incall */
+ S_ST( 'l', 3, 241, 236 ), /* 240 inc */
+ S_ST( 'u', 3, 242, 0 ), /* 241 incl */
+ S_ST( 'd', 3, 243, 0 ), /* 242 inclu */
+ S_ST( 'e', 3, 244, 0 ), /* 243 includ */
+ S_ST( 'f', 3, 245, 0 ), /* 244 include */
+ S_ST( 'i', 3, 246, 0 ), /* 245 includef */
+ S_ST( 'l', 3, 323, 0 ), /* 246 includefi */
+ S_ST( 'm', 3, 248, 240 ), /* 247 inc */
+ S_ST( 'e', 3, 320, 0 ), /* 248 incm */
+ S_ST( 'i', 3, 250, 235 ), /* 249 in */
+ S_ST( 't', 3, 255, 0 ), /* 250 ini */
+ S_ST( 'a', 3, 252, 0 ), /* 251 init */
+ S_ST( 'l', 3, 253, 0 ), /* 252 inita */
+ S_ST( 'l', 3, 254, 0 ), /* 253 inital */
+ S_ST( 'o', 3, 321, 0 ), /* 254 initall */
+ S_ST( 'm', 3, 256, 251 ), /* 255 init */
+ S_ST( 'e', 3, 322, 0 ), /* 256 initm */
+ S_ST( 't', 3, 292, 249 ), /* 257 in */
S_ST( 'v', 1, 0, 0 ), /* 258 T_Abbrev */
S_ST( 'e', 0, 0, 0 ), /* 259 T_Age */
S_ST( 'l', 0, 12, 0 ), /* 260 T_All */
@@ -515,721 +516,730 @@ const scan_state sst[1002] = {
S_ST( 'l', 0, 0, 0 ), /* 283 T_Ctl */
S_ST( 'y', 0, 0, 0 ), /* 284 T_Day */
S_ST( 't', 0, 0, 0 ), /* 285 T_Default */
- S_ST( 'e', 1, 0, 0 ), /* 286 T_Device */
- S_ST( 't', 1, 0, 0 ), /* 287 T_Digest */
- S_ST( 'e', 0, 0, 0 ), /* 288 T_Disable */
- S_ST( 'd', 0, 0, 0 ), /* 289 T_Discard */
- S_ST( 'n', 0, 0, 0 ), /* 290 T_Dispersion */
- S_ST( 'e', 3, 299, 0 ), /* 291 ippe */
- S_ST( 'e', 1, 0, 0 ), /* 292 T_Driftfile */
- S_ST( 'p', 0, 0, 0 ), /* 293 T_Drop */
- S_ST( 'p', 0, 0, 0 ), /* 294 T_Dscp */
- S_ST( '.', 0, 0, 0 ), /* 295 T_Ellipsis */
- S_ST( 'e', 0, 0, 0 ), /* 296 T_Enable */
- S_ST( 'd', 0, 0, 171 ), /* 297 T_End */
- S_ST( 'r', 0, 0, 0 ), /* 298 T_Epeer */
- S_ST( 'r', 3, 323, 0 ), /* 299 ippee */
- S_ST( 'e', 1, 182, 0 ), /* 300 T_File */
- S_ST( 'n', 0, 0, 0 ), /* 301 T_Filegen */
- S_ST( 'm', 0, 0, 0 ), /* 302 T_Filenum */
- S_ST( '1', 0, 0, 0 ), /* 303 T_Flag1 */
- S_ST( '2', 0, 0, 303 ), /* 304 T_Flag2 */
- S_ST( '3', 0, 0, 304 ), /* 305 T_Flag3 */
- S_ST( '4', 0, 0, 305 ), /* 306 T_Flag4 */
- S_ST( 'e', 0, 0, 0 ), /* 307 T_Flake */
- S_ST( 'r', 0, 0, 0 ), /* 308 T_Floor */
- S_ST( 'q', 0, 192, 0 ), /* 309 T_Freq */
- S_ST( 'e', 1, 0, 0 ), /* 310 T_Fudge */
- S_ST( 'z', 0, 0, 0 ), /* 311 T_Fuzz */
- S_ST( 't', 1, 0, 0 ), /* 312 T_Host */
- S_ST( 'f', 0, 0, 0 ), /* 313 T_Huffpuff */
- S_ST( 't', 0, 0, 0 ), /* 314 T_Iburst */
- S_ST( 't', 1, 0, 0 ), /* 315 T_Ident */
- S_ST( 'e', 0, 223, 0 ), /* 316 T_Ignore */
- S_ST( 'h', 0, 0, 0 ), /* 317 T_Ignorehash */
- S_ST( 'c', 0, 0, 0 ), /* 318 T_Incalloc */
- S_ST( 'm', 0, 0, 0 ), /* 319 T_Incmem */
- S_ST( 'c', 0, 0, 0 ), /* 320 T_Initalloc */
- S_ST( 'm', 0, 0, 0 ), /* 321 T_Initmem */
- S_ST( 'e', 1, 0, 0 ), /* 322 T_Includefile */
- S_ST( 'l', 3, 325, 0 ), /* 323 ippeer */
- S_ST( 'e', 0, 0, 0 ), /* 324 T_Interface */
- S_ST( 'i', 3, 417, 0 ), /* 325 ippeerl */
- S_ST( 'o', 0, 0, 226 ), /* 326 T_Io */
- S_ST( 't', 0, 0, 0 ), /* 327 T_Ippeerlimit */
- S_ST( '4', 0, 0, 0 ), /* 328 T_Ipv4 */
- S_ST( '4', 0, 0, 0 ), /* 329 T_Ipv4_flag */
- S_ST( '6', 0, 0, 328 ), /* 330 T_Ipv6 */
- S_ST( '6', 0, 0, 329 ), /* 331 T_Ipv6_flag */
- S_ST( 'l', 0, 0, 0 ), /* 332 T_Kernel */
- S_ST( 'y', 0, 334, 474 ), /* 333 T_Key */
- S_ST( 's', 1, 477, 0 ), /* 334 T_Keys */
- S_ST( 'r', 1, 0, 0 ), /* 335 T_Keysdir */
- S_ST( 'd', 0, 0, 0 ), /* 336 T_Kod */
- S_ST( 'e', 1, 0, 0 ), /* 337 T_Leapfile */
- S_ST( 'l', 0, 0, 0 ), /* 338 T_Leapsmearinterval */
- S_ST( 'd', 0, 0, 0 ), /* 339 T_Limited */
- S_ST( 'k', 0, 0, 0 ), /* 340 T_Link */
- S_ST( 'n', 0, 0, 0 ), /* 341 T_Listen */
- S_ST( 'g', 2, 0, 0 ), /* 342 T_Logconfig */
- S_ST( 'e', 1, 0, 0 ), /* 343 T_Logfile */
- S_ST( 's', 0, 0, 0 ), /* 344 T_Loopstats */
- S_ST( 'p', 0, 0, 0 ), /* 345 T_Lowpriotrap */
- S_ST( 't', 1, 0, 0 ), /* 346 T_Manycastclient */
- S_ST( 'r', 2, 0, 0 ), /* 347 T_Manycastserver */
- S_ST( 'k', 0, 0, 0 ), /* 348 T_Mask */
- S_ST( 'e', 0, 0, 0 ), /* 349 T_Maxage */
- S_ST( 'k', 0, 0, 0 ), /* 350 T_Maxclock */
- S_ST( 'h', 0, 0, 0 ), /* 351 T_Maxdepth */
- S_ST( 't', 0, 0, 0 ), /* 352 T_Maxdist */
- S_ST( 'm', 0, 0, 0 ), /* 353 T_Maxmem */
- S_ST( 'l', 0, 0, 0 ), /* 354 T_Maxpoll */
- S_ST( 's', 0, 0, 0 ), /* 355 T_Mdnstries */
- S_ST( 'm', 0, 577, 0 ), /* 356 T_Mem */
- S_ST( 'k', 0, 0, 0 ), /* 357 T_Memlock */
- S_ST( 'k', 0, 0, 0 ), /* 358 T_Minclock */
- S_ST( 'h', 0, 0, 0 ), /* 359 T_Mindepth */
- S_ST( 't', 0, 0, 0 ), /* 360 T_Mindist */
- S_ST( 'm', 0, 0, 0 ), /* 361 T_Minimum */
- S_ST( 'r', 0, 0, 0 ), /* 362 T_Minjitter */
- S_ST( 'l', 0, 0, 0 ), /* 363 T_Minpoll */
- S_ST( 'e', 0, 0, 0 ), /* 364 T_Minsane */
- S_ST( 'e', 0, 366, 0 ), /* 365 T_Mode */
- S_ST( '7', 0, 0, 0 ), /* 366 T_Mode7 */
- S_ST( 'r', 0, 0, 0 ), /* 367 T_Monitor */
- S_ST( 'h', 0, 0, 0 ), /* 368 T_Month */
- S_ST( 'u', 0, 0, 0 ), /* 369 T_Mru */
- S_ST( 'p', 0, 0, 0 ), /* 370 T_Mssntp */
- S_ST( 't', 2, 0, 0 ), /* 371 T_Multicastclient */
- S_ST( 'c', 0, 0, 0 ), /* 372 T_Nic */
- S_ST( 'k', 0, 0, 0 ), /* 373 T_Nolink */
- S_ST( 'y', 0, 0, 0 ), /* 374 T_Nomodify */
- S_ST( 't', 0, 0, 0 ), /* 375 T_Nomrulist */
- S_ST( 'e', 0, 0, 0 ), /* 376 T_None */
- S_ST( 'e', 0, 0, 0 ), /* 377 T_Nonvolatile */
- S_ST( 'r', 0, 0, 0 ), /* 378 T_Noepeer */
- S_ST( 'r', 0, 0, 0 ), /* 379 T_Nopeer */
- S_ST( 'y', 0, 0, 0 ), /* 380 T_Noquery */
- S_ST( 't', 0, 0, 0 ), /* 381 T_Noselect */
- S_ST( 'e', 0, 0, 0 ), /* 382 T_Noserve */
- S_ST( 'p', 0, 0, 0 ), /* 383 T_Notrap */
- S_ST( 't', 0, 0, 0 ), /* 384 T_Notrust */
- S_ST( 'p', 0, 682, 0 ), /* 385 T_Ntp */
- S_ST( 't', 0, 0, 0 ), /* 386 T_Ntpport */
- S_ST( 't', 1, 0, 0 ), /* 387 T_NtpSignDsocket */
- S_ST( 'n', 0, 697, 0 ), /* 388 T_Orphan */
- S_ST( 't', 0, 0, 0 ), /* 389 T_Orphanwait */
- S_ST( 'y', 0, 0, 0 ), /* 390 T_PCEdigest */
- S_ST( 'c', 0, 0, 0 ), /* 391 T_Panic */
- S_ST( 'r', 1, 724, 0 ), /* 392 T_Peer */
- S_ST( 's', 0, 0, 0 ), /* 393 T_Peerstats */
- S_ST( 'e', 2, 0, 0 ), /* 394 T_Phone */
- S_ST( 'd', 0, 732, 0 ), /* 395 T_Pid */
- S_ST( 'e', 1, 0, 0 ), /* 396 T_Pidfile */
- S_ST( 'l', 0, 737, 0 ), /* 397 T_Poll */
- S_ST( 't', 0, 0, 0 ), /* 398 T_PollSkewList */
- S_ST( 'l', 1, 0, 0 ), /* 399 T_Pool */
- S_ST( 't', 0, 0, 0 ), /* 400 T_Port */
- S_ST( 'a', 1, 0, 0 ), /* 401 T_PpsData */
- S_ST( 't', 0, 0, 0 ), /* 402 T_Preempt */
- S_ST( 'r', 0, 0, 0 ), /* 403 T_Prefer */
- S_ST( 's', 0, 0, 0 ), /* 404 T_Protostats */
- S_ST( 'w', 1, 0, 751 ), /* 405 T_Pw */
- S_ST( 'e', 1, 0, 0 ), /* 406 T_Randfile */
- S_ST( 's', 0, 0, 0 ), /* 407 T_Rawstats */
- S_ST( 'd', 1, 0, 0 ), /* 408 T_Refid */
- S_ST( 'y', 0, 0, 0 ), /* 409 T_Requestkey */
- S_ST( 't', 0, 0, 0 ), /* 410 T_Reset */
- S_ST( 't', 0, 0, 0 ), /* 411 T_Restrict */
- S_ST( 'e', 0, 0, 0 ), /* 412 T_Revoke */
- S_ST( 't', 0, 0, 0 ), /* 413 T_Rlimit */
- S_ST( 'r', 1, 0, 0 ), /* 414 T_Saveconfigdir */
- S_ST( 'r', 1, 834, 0 ), /* 415 T_Server */
- S_ST( 'e', 0, 0, 0 ), /* 416 T_Serverresponse */
- S_ST( 'm', 3, 429, 0 ), /* 417 ippeerli */
- S_ST( 'r', 1, 0, 0 ), /* 418 T_Setvar */
- S_ST( 'e', 0, 0, 0 ), /* 419 T_Source */
- S_ST( 'e', 0, 0, 0 ), /* 420 T_Stacksize */
- S_ST( 's', 0, 0, 0 ), /* 421 T_Statistics */
- S_ST( 's', 0, 878, 873 ), /* 422 T_Stats */
- S_ST( 'r', 1, 0, 0 ), /* 423 T_Statsdir */
- S_ST( 'p', 0, 886, 0 ), /* 424 T_Step */
- S_ST( 'k', 0, 0, 0 ), /* 425 T_Stepback */
- S_ST( 'd', 0, 0, 0 ), /* 426 T_Stepfwd */
- S_ST( 't', 0, 0, 0 ), /* 427 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 428 T_Stratum */
- S_ST( 'i', 3, 327, 0 ), /* 429 ippeerlim */
- S_ST( 's', 0, 893, 0 ), /* 430 T_Sys */
- S_ST( 's', 0, 0, 0 ), /* 431 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 432 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 433 T_Time1 */
- S_ST( '2', 0, 0, 433 ), /* 434 T_Time2 */
- S_ST( 'a', 1, 0, 0 ), /* 435 T_TimeData */
- S_ST( 'r', 0, 0, 902 ), /* 436 T_Timer */
- S_ST( 's', 0, 0, 0 ), /* 437 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 438 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 439 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 440 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 441 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 442 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 443 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 444 T_Type */
- S_ST( 'v', 3, 330, 256 ), /* 445 ip */
- S_ST( 'y', 0, 0, 0 ), /* 446 T_UEcrypto */
- S_ST( 'y', 0, 0, 0 ), /* 447 T_UEcryptonak */
- S_ST( 'y', 0, 0, 0 ), /* 448 T_UEdigest */
- S_ST( 'g', 1, 0, 0 ), /* 449 T_Unconfig */
- S_ST( 'r', 1, 938, 0 ), /* 450 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 451 T_Version */
- S_ST( 'j', 3, 458, 211 ), /* 452 */
- S_ST( 'k', 0, 0, 0 ), /* 453 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 454 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 455 T_Xleave */
- S_ST( 'e', 0, 0, 0 ), /* 456 T_Xmtnonce */
- S_ST( 'r', 0, 0, 0 ), /* 457 T_Year */
- S_ST( 'i', 3, 459, 0 ), /* 458 j */
- S_ST( 't', 3, 470, 0 ), /* 459 ji */
- S_ST( 'e', 0, 0, 0 ), /* 460 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 461 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 462 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 463 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 464 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 465 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 466 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 467 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 468 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 469 T_Proc_Delay */
- S_ST( 't', 3, 471, 0 ), /* 470 jit */
- S_ST( 'e', 3, 467, 0 ), /* 471 jitt */
- S_ST( 'k', 3, 479, 452 ), /* 472 */
- S_ST( 'e', 3, 333, 0 ), /* 473 k */
- S_ST( 'r', 3, 475, 0 ), /* 474 ke */
- S_ST( 'n', 3, 476, 0 ), /* 475 ker */
- S_ST( 'e', 3, 332, 0 ), /* 476 kern */
- S_ST( 'd', 3, 478, 0 ), /* 477 keys */
- S_ST( 'i', 3, 335, 0 ), /* 478 keysd */
- S_ST( 'o', 3, 336, 473 ), /* 479 k */
- S_ST( 'l', 3, 508, 472 ), /* 480 */
- S_ST( 'e', 3, 482, 0 ), /* 481 l */
- S_ST( 'a', 3, 483, 0 ), /* 482 le */
- S_ST( 'p', 3, 487, 0 ), /* 483 lea */
- S_ST( 'f', 3, 485, 0 ), /* 484 leap */
- S_ST( 'i', 3, 486, 0 ), /* 485 leapf */
- S_ST( 'l', 3, 337, 0 ), /* 486 leapfi */
- S_ST( 's', 3, 488, 484 ), /* 487 leap */
- S_ST( 'm', 3, 489, 0 ), /* 488 leaps */
- S_ST( 'e', 3, 490, 0 ), /* 489 leapsm */
- S_ST( 'a', 3, 491, 0 ), /* 490 leapsme */
- S_ST( 'r', 3, 492, 0 ), /* 491 leapsmea */
- S_ST( 'i', 3, 493, 0 ), /* 492 leapsmear */
- S_ST( 'n', 3, 494, 0 ), /* 493 leapsmeari */
- S_ST( 't', 3, 495, 0 ), /* 494 leapsmearin */
- S_ST( 'e', 3, 496, 0 ), /* 495 leapsmearint */
- S_ST( 'r', 3, 497, 0 ), /* 496 leapsmearinte */
- S_ST( 'v', 3, 498, 0 ), /* 497 leapsmearinter */
- S_ST( 'a', 3, 338, 0 ), /* 498 leapsmearinterv */
- S_ST( 'i', 3, 505, 481 ), /* 499 l */
- S_ST( 'm', 3, 501, 0 ), /* 500 li */
- S_ST( 'i', 3, 502, 0 ), /* 501 lim */
- S_ST( 't', 3, 503, 0 ), /* 502 limi */
- S_ST( 'e', 3, 339, 0 ), /* 503 limit */
- S_ST( 'n', 3, 340, 500 ), /* 504 li */
- S_ST( 's', 3, 506, 504 ), /* 505 li */
- S_ST( 't', 3, 507, 0 ), /* 506 lis */
- S_ST( 'e', 3, 341, 0 ), /* 507 list */
- S_ST( 'o', 3, 524, 499 ), /* 508 l */
- S_ST( 'g', 3, 515, 0 ), /* 509 lo */
- S_ST( 'c', 3, 511, 0 ), /* 510 log */
- S_ST( 'o', 3, 512, 0 ), /* 511 logc */
- S_ST( 'n', 3, 513, 0 ), /* 512 logco */
- S_ST( 'f', 3, 514, 0 ), /* 513 logcon */
- S_ST( 'i', 3, 342, 0 ), /* 514 logconf */
- S_ST( 'f', 3, 516, 510 ), /* 515 log */
- S_ST( 'i', 3, 517, 0 ), /* 516 logf */
- S_ST( 'l', 3, 343, 0 ), /* 517 logfi */
- S_ST( 'o', 3, 519, 509 ), /* 518 lo */
- S_ST( 'p', 3, 520, 0 ), /* 519 loo */
- S_ST( 's', 3, 521, 0 ), /* 520 loop */
- S_ST( 't', 3, 522, 0 ), /* 521 loops */
- S_ST( 'a', 3, 523, 0 ), /* 522 loopst */
- S_ST( 't', 3, 344, 0 ), /* 523 loopsta */
- S_ST( 'w', 3, 525, 518 ), /* 524 lo */
- S_ST( 'p', 3, 526, 0 ), /* 525 low */
- S_ST( 'r', 3, 527, 0 ), /* 526 lowp */
- S_ST( 'i', 3, 528, 0 ), /* 527 lowpr */
- S_ST( 'o', 3, 529, 0 ), /* 528 lowpri */
- S_ST( 't', 3, 530, 0 ), /* 529 lowprio */
- S_ST( 'r', 3, 531, 0 ), /* 530 lowpriot */
- S_ST( 'a', 3, 345, 0 ), /* 531 lowpriotr */
- S_ST( 'm', 3, 618, 480 ), /* 532 */
- S_ST( 'a', 3, 551, 0 ), /* 533 m */
- S_ST( 'n', 3, 535, 0 ), /* 534 ma */
- S_ST( 'y', 3, 536, 0 ), /* 535 man */
- S_ST( 'c', 3, 537, 0 ), /* 536 many */
- S_ST( 'a', 3, 538, 0 ), /* 537 manyc */
- S_ST( 's', 3, 539, 0 ), /* 538 manyca */
- S_ST( 't', 3, 545, 0 ), /* 539 manycas */
- S_ST( 'c', 3, 541, 0 ), /* 540 manycast */
- S_ST( 'l', 3, 542, 0 ), /* 541 manycastc */
- S_ST( 'i', 3, 543, 0 ), /* 542 manycastcl */
- S_ST( 'e', 3, 544, 0 ), /* 543 manycastcli */
- S_ST( 'n', 3, 346, 0 ), /* 544 manycastclie */
- S_ST( 's', 3, 546, 540 ), /* 545 manycast */
- S_ST( 'e', 3, 547, 0 ), /* 546 manycasts */
- S_ST( 'r', 3, 548, 0 ), /* 547 manycastse */
- S_ST( 'v', 3, 549, 0 ), /* 548 manycastser */
- S_ST( 'e', 3, 347, 0 ), /* 549 manycastserv */
- S_ST( 's', 3, 348, 534 ), /* 550 ma */
- S_ST( 'x', 3, 566, 550 ), /* 551 ma */
- S_ST( 'a', 3, 553, 0 ), /* 552 max */
- S_ST( 'g', 3, 349, 0 ), /* 553 maxa */
- S_ST( 'c', 3, 555, 552 ), /* 554 max */
- S_ST( 'l', 3, 556, 0 ), /* 555 maxc */
- S_ST( 'o', 3, 557, 0 ), /* 556 maxcl */
- S_ST( 'c', 3, 350, 0 ), /* 557 maxclo */
- S_ST( 'd', 3, 562, 554 ), /* 558 max */
- S_ST( 'e', 3, 560, 0 ), /* 559 maxd */
- S_ST( 'p', 3, 561, 0 ), /* 560 maxde */
- S_ST( 't', 3, 351, 0 ), /* 561 maxdep */
- S_ST( 'i', 3, 563, 559 ), /* 562 maxd */
- S_ST( 's', 3, 352, 0 ), /* 563 maxdi */
- S_ST( 'm', 3, 565, 558 ), /* 564 max */
- S_ST( 'e', 3, 353, 0 ), /* 565 maxm */
- S_ST( 'p', 3, 567, 564 ), /* 566 max */
- S_ST( 'o', 3, 568, 0 ), /* 567 maxp */
- S_ST( 'l', 3, 354, 0 ), /* 568 maxpo */
- S_ST( 'd', 3, 570, 533 ), /* 569 m */
- S_ST( 'n', 3, 571, 0 ), /* 570 md */
- S_ST( 's', 3, 572, 0 ), /* 571 mdn */
- S_ST( 't', 3, 573, 0 ), /* 572 mdns */
- S_ST( 'r', 3, 574, 0 ), /* 573 mdnst */
- S_ST( 'i', 3, 575, 0 ), /* 574 mdnstr */
- S_ST( 'e', 3, 355, 0 ), /* 575 mdnstri */
- S_ST( 'e', 3, 356, 569 ), /* 576 m */
- S_ST( 'l', 3, 578, 0 ), /* 577 mem */
- S_ST( 'o', 3, 579, 0 ), /* 578 meml */
- S_ST( 'c', 3, 357, 0 ), /* 579 memlo */
- S_ST( 'i', 3, 581, 576 ), /* 580 m */
- S_ST( 'n', 3, 603, 0 ), /* 581 mi */
- S_ST( 'c', 3, 583, 0 ), /* 582 min */
- S_ST( 'l', 3, 584, 0 ), /* 583 minc */
- S_ST( 'o', 3, 585, 0 ), /* 584 mincl */
- S_ST( 'c', 3, 358, 0 ), /* 585 minclo */
- S_ST( 'd', 3, 590, 582 ), /* 586 min */
- S_ST( 'e', 3, 588, 0 ), /* 587 mind */
- S_ST( 'p', 3, 589, 0 ), /* 588 minde */
- S_ST( 't', 3, 359, 0 ), /* 589 mindep */
- S_ST( 'i', 3, 591, 587 ), /* 590 mind */
- S_ST( 's', 3, 360, 0 ), /* 591 mindi */
- S_ST( 'i', 3, 593, 586 ), /* 592 min */
- S_ST( 'm', 3, 594, 0 ), /* 593 mini */
- S_ST( 'u', 3, 361, 0 ), /* 594 minim */
- S_ST( 'j', 3, 596, 592 ), /* 595 min */
- S_ST( 'i', 3, 597, 0 ), /* 596 minj */
- S_ST( 't', 3, 598, 0 ), /* 597 minji */
- S_ST( 't', 3, 599, 0 ), /* 598 minjit */
- S_ST( 'e', 3, 362, 0 ), /* 599 minjitt */
- S_ST( 'p', 3, 601, 595 ), /* 600 min */
- S_ST( 'o', 3, 602, 0 ), /* 601 minp */
- S_ST( 'l', 3, 363, 0 ), /* 602 minpo */
- S_ST( 's', 3, 604, 600 ), /* 603 min */
- S_ST( 'a', 3, 605, 0 ), /* 604 mins */
- S_ST( 'n', 3, 364, 0 ), /* 605 minsa */
- S_ST( 'o', 3, 608, 580 ), /* 606 m */
- S_ST( 'd', 3, 365, 0 ), /* 607 mo */
- S_ST( 'n', 3, 612, 607 ), /* 608 mo */
- S_ST( 'i', 3, 610, 0 ), /* 609 mon */
- S_ST( 't', 3, 611, 0 ), /* 610 moni */
- S_ST( 'o', 3, 367, 0 ), /* 611 monit */
- S_ST( 't', 3, 368, 609 ), /* 612 mon */
- S_ST( 'r', 3, 369, 606 ), /* 613 m */
- S_ST( 's', 3, 615, 613 ), /* 614 m */
- S_ST( 's', 3, 616, 0 ), /* 615 ms */
- S_ST( 'n', 3, 617, 0 ), /* 616 mss */
- S_ST( 't', 3, 370, 0 ), /* 617 mssn */
- S_ST( 'u', 3, 619, 614 ), /* 618 m */
- S_ST( 'l', 3, 620, 0 ), /* 619 mu */
- S_ST( 't', 3, 621, 0 ), /* 620 mul */
- S_ST( 'i', 3, 622, 0 ), /* 621 mult */
- S_ST( 'c', 3, 623, 0 ), /* 622 multi */
- S_ST( 'a', 3, 624, 0 ), /* 623 multic */
- S_ST( 's', 3, 625, 0 ), /* 624 multica */
- S_ST( 't', 3, 626, 0 ), /* 625 multicas */
- S_ST( 'c', 3, 627, 0 ), /* 626 multicast */
- S_ST( 'l', 3, 628, 0 ), /* 627 multicastc */
- S_ST( 'i', 3, 629, 0 ), /* 628 multicastcl */
- S_ST( 'e', 3, 630, 0 ), /* 629 multicastcli */
- S_ST( 'n', 3, 371, 0 ), /* 630 multicastclie */
- S_ST( 'n', 3, 678, 532 ), /* 631 */
- S_ST( 'i', 3, 372, 0 ), /* 632 n */
- S_ST( 'o', 3, 673, 632 ), /* 633 n */
- S_ST( 'e', 3, 635, 0 ), /* 634 no */
- S_ST( 'p', 3, 636, 0 ), /* 635 noe */
- S_ST( 'e', 3, 637, 0 ), /* 636 noep */
- S_ST( 'e', 3, 378, 0 ), /* 637 noepe */
- S_ST( 'l', 3, 639, 634 ), /* 638 no */
- S_ST( 'i', 3, 640, 0 ), /* 639 nol */
- S_ST( 'n', 3, 373, 0 ), /* 640 noli */
- S_ST( 'm', 3, 646, 638 ), /* 641 no */
- S_ST( 'o', 3, 643, 0 ), /* 642 nom */
- S_ST( 'd', 3, 644, 0 ), /* 643 nomo */
- S_ST( 'i', 3, 645, 0 ), /* 644 nomod */
- S_ST( 'f', 3, 374, 0 ), /* 645 nomodi */
- S_ST( 'r', 3, 647, 642 ), /* 646 nom */
- S_ST( 'u', 3, 648, 0 ), /* 647 nomr */
- S_ST( 'l', 3, 649, 0 ), /* 648 nomru */
- S_ST( 'i', 3, 650, 0 ), /* 649 nomrul */
- S_ST( 's', 3, 375, 0 ), /* 650 nomruli */
- S_ST( 'n', 3, 652, 641 ), /* 651 no */
- S_ST( 'v', 3, 653, 376 ), /* 652 non */
- S_ST( 'o', 3, 654, 0 ), /* 653 nonv */
- S_ST( 'l', 3, 655, 0 ), /* 654 nonvo */
- S_ST( 'a', 3, 656, 0 ), /* 655 nonvol */
- S_ST( 't', 3, 657, 0 ), /* 656 nonvola */
- S_ST( 'i', 3, 658, 0 ), /* 657 nonvolat */
- S_ST( 'l', 3, 377, 0 ), /* 658 nonvolati */
- S_ST( 'p', 3, 660, 651 ), /* 659 no */
- S_ST( 'e', 3, 661, 0 ), /* 660 nop */
- S_ST( 'e', 3, 379, 0 ), /* 661 nope */
- S_ST( 'q', 3, 663, 659 ), /* 662 no */
- S_ST( 'u', 3, 664, 0 ), /* 663 noq */
- S_ST( 'e', 3, 665, 0 ), /* 664 noqu */
- S_ST( 'r', 3, 380, 0 ), /* 665 noque */
- S_ST( 's', 3, 667, 662 ), /* 666 no */
- S_ST( 'e', 3, 671, 0 ), /* 667 nos */
- S_ST( 'l', 3, 669, 0 ), /* 668 nose */
- S_ST( 'e', 3, 670, 0 ), /* 669 nosel */
- S_ST( 'c', 3, 381, 0 ), /* 670 nosele */
- S_ST( 'r', 3, 672, 668 ), /* 671 nose */
- S_ST( 'v', 3, 382, 0 ), /* 672 noser */
- S_ST( 't', 3, 674, 666 ), /* 673 no */
- S_ST( 'r', 3, 676, 0 ), /* 674 not */
- S_ST( 'a', 3, 383, 0 ), /* 675 notr */
- S_ST( 'u', 3, 677, 675 ), /* 676 notr */
- S_ST( 's', 3, 384, 0 ), /* 677 notru */
- S_ST( 't', 3, 385, 633 ), /* 678 n */
- S_ST( 'p', 3, 680, 0 ), /* 679 ntp */
- S_ST( 'o', 3, 681, 0 ), /* 680 ntpp */
- S_ST( 'r', 3, 386, 0 ), /* 681 ntppo */
- S_ST( 's', 3, 683, 679 ), /* 682 ntp */
- S_ST( 'i', 3, 684, 0 ), /* 683 ntps */
- S_ST( 'g', 3, 685, 0 ), /* 684 ntpsi */
- S_ST( 'n', 3, 686, 0 ), /* 685 ntpsig */
- S_ST( 'd', 3, 687, 0 ), /* 686 ntpsign */
- S_ST( 's', 3, 688, 0 ), /* 687 ntpsignd */
- S_ST( 'o', 3, 689, 0 ), /* 688 ntpsignds */
- S_ST( 'c', 3, 690, 0 ), /* 689 ntpsigndso */
- S_ST( 'k', 3, 691, 0 ), /* 690 ntpsigndsoc */
- S_ST( 'e', 3, 387, 0 ), /* 691 ntpsigndsock */
- S_ST( 'o', 3, 693, 631 ), /* 692 */
- S_ST( 'r', 3, 694, 0 ), /* 693 o */
- S_ST( 'p', 3, 695, 0 ), /* 694 or */
- S_ST( 'h', 3, 696, 0 ), /* 695 orp */
- S_ST( 'a', 3, 388, 0 ), /* 696 orph */
- S_ST( 'w', 3, 698, 0 ), /* 697 orphan */
- S_ST( 'a', 3, 699, 0 ), /* 698 orphanw */
- S_ST( 'i', 3, 389, 0 ), /* 699 orphanwa */
- S_ST( 'p', 3, 405, 692 ), /* 700 */
- S_ST( 'a', 3, 702, 0 ), /* 701 p */
- S_ST( 'n', 3, 703, 0 ), /* 702 pa */
- S_ST( 'i', 3, 391, 0 ), /* 703 pan */
- S_ST( 'e', 3, 705, 701 ), /* 704 p */
- S_ST( 'e', 3, 392, 0 ), /* 705 pe */
- S_ST( '_', 3, 707, 0 ), /* 706 peer */
- S_ST( 'c', 3, 708, 0 ), /* 707 peer_ */
- S_ST( 'l', 3, 709, 0 ), /* 708 peer_c */
- S_ST( 'e', 3, 710, 0 ), /* 709 peer_cl */
- S_ST( 'a', 3, 711, 0 ), /* 710 peer_cle */
- S_ST( 'r', 3, 712, 0 ), /* 711 peer_clea */
- S_ST( '_', 3, 713, 0 ), /* 712 peer_clear */
- S_ST( 'd', 3, 714, 0 ), /* 713 peer_clear_ */
- S_ST( 'i', 3, 715, 0 ), /* 714 peer_clear_d */
- S_ST( 'g', 3, 716, 0 ), /* 715 peer_clear_di */
- S_ST( 'e', 3, 717, 0 ), /* 716 peer_clear_dig */
- S_ST( 's', 3, 718, 0 ), /* 717 peer_clear_dige */
- S_ST( 't', 3, 719, 0 ), /* 718 peer_clear_diges */
- S_ST( '_', 3, 720, 0 ), /* 719 peer_clear_digest */
- S_ST( 'e', 3, 721, 0 ), /* 720 peer_clear_digest_ */
- S_ST( 'a', 3, 722, 0 ), /* 721 peer_clear_digest_e */
- S_ST( 'r', 3, 723, 0 ), /* 722 peer_clear_digest_ea */
- S_ST( 'l', 3, 390, 0 ), /* 723 peer_clear_digest_ear */
- S_ST( 's', 3, 725, 706 ), /* 724 peer */
- S_ST( 't', 3, 726, 0 ), /* 725 peers */
- S_ST( 'a', 3, 727, 0 ), /* 726 peerst */
- S_ST( 't', 3, 393, 0 ), /* 727 peersta */
- S_ST( 'h', 3, 729, 704 ), /* 728 p */
- S_ST( 'o', 3, 730, 0 ), /* 729 ph */
- S_ST( 'n', 3, 394, 0 ), /* 730 pho */
- S_ST( 'i', 3, 395, 728 ), /* 731 p */
- S_ST( 'f', 3, 733, 0 ), /* 732 pid */
- S_ST( 'i', 3, 734, 0 ), /* 733 pidf */
- S_ST( 'l', 3, 396, 0 ), /* 734 pidfi */
- S_ST( 'o', 3, 745, 731 ), /* 735 p */
- S_ST( 'l', 3, 397, 0 ), /* 736 po */
- S_ST( 's', 3, 738, 0 ), /* 737 poll */
- S_ST( 'k', 3, 739, 0 ), /* 738 polls */
- S_ST( 'e', 3, 740, 0 ), /* 739 pollsk */
- S_ST( 'w', 3, 741, 0 ), /* 740 pollske */
- S_ST( 'l', 3, 742, 0 ), /* 741 pollskew */
- S_ST( 'i', 3, 743, 0 ), /* 742 pollskewl */
- S_ST( 's', 3, 398, 0 ), /* 743 pollskewli */
- S_ST( 'o', 3, 399, 736 ), /* 744 po */
- S_ST( 'r', 3, 400, 744 ), /* 745 po */
- S_ST( 'p', 3, 747, 735 ), /* 746 p */
- S_ST( 's', 3, 748, 0 ), /* 747 pp */
- S_ST( 'd', 3, 749, 0 ), /* 748 pps */
- S_ST( 'a', 3, 750, 0 ), /* 749 ppsd */
- S_ST( 't', 3, 401, 0 ), /* 750 ppsda */
- S_ST( 'r', 3, 758, 746 ), /* 751 p */
- S_ST( 'e', 3, 756, 0 ), /* 752 pr */
- S_ST( 'e', 3, 754, 0 ), /* 753 pre */
- S_ST( 'm', 3, 755, 0 ), /* 754 pree */
- S_ST( 'p', 3, 402, 0 ), /* 755 preem */
- S_ST( 'f', 3, 757, 753 ), /* 756 pre */
- S_ST( 'e', 3, 403, 0 ), /* 757 pref */
- S_ST( 'o', 3, 771, 752 ), /* 758 pr */
- S_ST( 'c', 3, 760, 0 ), /* 759 pro */
- S_ST( '_', 3, 761, 0 ), /* 760 proc */
- S_ST( 'd', 3, 762, 0 ), /* 761 proc_ */
- S_ST( 'e', 3, 763, 0 ), /* 762 proc_d */
- S_ST( 'l', 3, 764, 0 ), /* 763 proc_de */
- S_ST( 'a', 3, 469, 0 ), /* 764 proc_del */
- S_ST( 'p', 3, 766, 759 ), /* 765 pro */
- S_ST( '_', 3, 767, 0 ), /* 766 prop */
- S_ST( 'd', 3, 768, 0 ), /* 767 prop_ */
- S_ST( 'e', 3, 769, 0 ), /* 768 prop_d */
- S_ST( 'l', 3, 770, 0 ), /* 769 prop_de */
- S_ST( 'a', 3, 468, 0 ), /* 770 prop_del */
- S_ST( 't', 3, 772, 765 ), /* 771 pro */
- S_ST( 'o', 3, 773, 0 ), /* 772 prot */
- S_ST( 's', 3, 774, 0 ), /* 773 proto */
- S_ST( 't', 3, 775, 0 ), /* 774 protos */
- S_ST( 'a', 3, 776, 0 ), /* 775 protost */
- S_ST( 't', 3, 404, 0 ), /* 776 protosta */
- S_ST( 'r', 3, 808, 700 ), /* 777 */
- S_ST( 'a', 3, 784, 0 ), /* 778 r */
- S_ST( 'n', 3, 780, 0 ), /* 779 ra */
- S_ST( 'd', 3, 781, 0 ), /* 780 ran */
- S_ST( 'f', 3, 782, 0 ), /* 781 rand */
- S_ST( 'i', 3, 783, 0 ), /* 782 randf */
- S_ST( 'l', 3, 406, 0 ), /* 783 randfi */
- S_ST( 'w', 3, 785, 779 ), /* 784 ra */
- S_ST( 's', 3, 786, 0 ), /* 785 raw */
- S_ST( 't', 3, 787, 0 ), /* 786 raws */
- S_ST( 'a', 3, 788, 0 ), /* 787 rawst */
- S_ST( 't', 3, 407, 0 ), /* 788 rawsta */
- S_ST( 'e', 3, 805, 778 ), /* 789 r */
- S_ST( 'f', 3, 791, 0 ), /* 790 re */
- S_ST( 'i', 3, 408, 0 ), /* 791 ref */
- S_ST( 'q', 3, 793, 790 ), /* 792 re */
- S_ST( 'u', 3, 794, 0 ), /* 793 req */
- S_ST( 'e', 3, 795, 0 ), /* 794 requ */
- S_ST( 's', 3, 796, 0 ), /* 795 reque */
- S_ST( 't', 3, 797, 0 ), /* 796 reques */
- S_ST( 'k', 3, 798, 0 ), /* 797 request */
- S_ST( 'e', 3, 409, 0 ), /* 798 requestk */
- S_ST( 's', 3, 801, 792 ), /* 799 re */
- S_ST( 'e', 3, 410, 0 ), /* 800 res */
- S_ST( 't', 3, 802, 800 ), /* 801 res */
- S_ST( 'r', 3, 803, 0 ), /* 802 rest */
- S_ST( 'i', 3, 804, 0 ), /* 803 restr */
- S_ST( 'c', 3, 411, 0 ), /* 804 restri */
- S_ST( 'v', 3, 806, 799 ), /* 805 re */
- S_ST( 'o', 3, 807, 0 ), /* 806 rev */
- S_ST( 'k', 3, 412, 0 ), /* 807 revo */
- S_ST( 'l', 3, 809, 789 ), /* 808 r */
- S_ST( 'i', 3, 810, 0 ), /* 809 rl */
- S_ST( 'm', 3, 811, 0 ), /* 810 rli */
- S_ST( 'i', 3, 413, 0 ), /* 811 rlim */
- S_ST( 's', 3, 892, 777 ), /* 812 */
- S_ST( 'a', 3, 814, 0 ), /* 813 s */
- S_ST( 'v', 3, 815, 0 ), /* 814 sa */
- S_ST( 'e', 3, 816, 0 ), /* 815 sav */
- S_ST( 'c', 3, 817, 0 ), /* 816 save */
- S_ST( 'o', 3, 818, 0 ), /* 817 savec */
- S_ST( 'n', 3, 819, 0 ), /* 818 saveco */
- S_ST( 'f', 3, 820, 0 ), /* 819 savecon */
- S_ST( 'i', 3, 821, 0 ), /* 820 saveconf */
- S_ST( 'g', 3, 822, 0 ), /* 821 saveconfi */
- S_ST( 'd', 3, 823, 0 ), /* 822 saveconfig */
- S_ST( 'i', 3, 414, 0 ), /* 823 saveconfigd */
- S_ST( 'e', 3, 841, 813 ), /* 824 s */
- S_ST( 'r', 3, 826, 0 ), /* 825 se */
- S_ST( 'v', 3, 827, 0 ), /* 826 ser */
- S_ST( 'e', 3, 415, 0 ), /* 827 serv */
- S_ST( '_', 3, 829, 0 ), /* 828 server */
- S_ST( 'o', 3, 830, 0 ), /* 829 server_ */
- S_ST( 'f', 3, 831, 0 ), /* 830 server_o */
- S_ST( 'f', 3, 832, 0 ), /* 831 server_of */
- S_ST( 's', 3, 833, 0 ), /* 832 server_off */
- S_ST( 'e', 3, 463, 0 ), /* 833 server_offs */
- S_ST( 'r', 3, 835, 828 ), /* 834 server */
- S_ST( 'e', 3, 836, 0 ), /* 835 serverr */
- S_ST( 's', 3, 837, 0 ), /* 836 serverre */
- S_ST( 'p', 3, 838, 0 ), /* 837 serverres */
- S_ST( 'o', 3, 839, 0 ), /* 838 serverresp */
- S_ST( 'n', 3, 840, 0 ), /* 839 serverrespo */
- S_ST( 's', 3, 416, 0 ), /* 840 serverrespon */
- S_ST( 't', 3, 842, 825 ), /* 841 se */
- S_ST( 'v', 3, 843, 0 ), /* 842 set */
- S_ST( 'a', 3, 418, 0 ), /* 843 setv */
- S_ST( 'i', 3, 845, 824 ), /* 844 s */
- S_ST( 'm', 3, 846, 0 ), /* 845 si */
- S_ST( 'u', 3, 847, 0 ), /* 846 sim */
- S_ST( 'l', 3, 848, 0 ), /* 847 simu */
- S_ST( 'a', 3, 849, 0 ), /* 848 simul */
- S_ST( 't', 3, 850, 0 ), /* 849 simula */
- S_ST( 'i', 3, 851, 460 ), /* 850 simulat */
- S_ST( 'o', 3, 852, 0 ), /* 851 simulati */
- S_ST( 'n', 3, 853, 0 ), /* 852 simulatio */
- S_ST( '_', 3, 854, 0 ), /* 853 simulation */
- S_ST( 'd', 3, 855, 0 ), /* 854 simulation_ */
- S_ST( 'u', 3, 856, 0 ), /* 855 simulation_d */
- S_ST( 'r', 3, 857, 0 ), /* 856 simulation_du */
- S_ST( 'a', 3, 858, 0 ), /* 857 simulation_dur */
- S_ST( 't', 3, 859, 0 ), /* 858 simulation_dura */
- S_ST( 'i', 3, 860, 0 ), /* 859 simulation_durat */
- S_ST( 'o', 3, 462, 0 ), /* 860 simulation_durati */
- S_ST( 'o', 3, 862, 844 ), /* 861 s */
- S_ST( 'u', 3, 863, 0 ), /* 862 so */
- S_ST( 'r', 3, 864, 0 ), /* 863 sou */
- S_ST( 'c', 3, 419, 0 ), /* 864 sour */
- S_ST( 't', 3, 888, 861 ), /* 865 s */
- S_ST( 'a', 3, 872, 0 ), /* 866 st */
- S_ST( 'c', 3, 868, 0 ), /* 867 sta */
- S_ST( 'k', 3, 869, 0 ), /* 868 stac */
- S_ST( 's', 3, 870, 0 ), /* 869 stack */
- S_ST( 'i', 3, 871, 0 ), /* 870 stacks */
- S_ST( 'z', 3, 420, 0 ), /* 871 stacksi */
- S_ST( 't', 3, 422, 867 ), /* 872 sta */
- S_ST( 'i', 3, 874, 0 ), /* 873 stat */
- S_ST( 's', 3, 875, 0 ), /* 874 stati */
- S_ST( 't', 3, 876, 0 ), /* 875 statis */
- S_ST( 'i', 3, 877, 0 ), /* 876 statist */
- S_ST( 'c', 3, 421, 0 ), /* 877 statisti */
- S_ST( 'd', 3, 879, 0 ), /* 878 stats */
- S_ST( 'i', 3, 423, 0 ), /* 879 statsd */
- S_ST( 'e', 3, 424, 866 ), /* 880 st */
- S_ST( 'b', 3, 882, 0 ), /* 881 step */
- S_ST( 'a', 3, 883, 0 ), /* 882 stepb */
- S_ST( 'c', 3, 425, 0 ), /* 883 stepba */
- S_ST( 'f', 3, 885, 881 ), /* 884 step */
- S_ST( 'w', 3, 426, 0 ), /* 885 stepf */
- S_ST( 'o', 3, 887, 884 ), /* 886 step */
- S_ST( 'u', 3, 427, 0 ), /* 887 stepo */
- S_ST( 'r', 3, 889, 880 ), /* 888 st */
- S_ST( 'a', 3, 890, 0 ), /* 889 str */
- S_ST( 't', 3, 891, 0 ), /* 890 stra */
- S_ST( 'u', 3, 428, 0 ), /* 891 strat */
- S_ST( 'y', 3, 430, 865 ), /* 892 s */
- S_ST( 's', 3, 894, 0 ), /* 893 sys */
- S_ST( 't', 3, 895, 0 ), /* 894 syss */
- S_ST( 'a', 3, 896, 0 ), /* 895 sysst */
- S_ST( 't', 3, 431, 0 ), /* 896 syssta */
- S_ST( 't', 3, 926, 812 ), /* 897 */
- S_ST( 'i', 3, 912, 0 ), /* 898 t */
- S_ST( 'c', 3, 432, 0 ), /* 899 ti */
- S_ST( 'm', 3, 905, 899 ), /* 900 ti */
- S_ST( 'e', 3, 436, 0 ), /* 901 tim */
- S_ST( 'd', 3, 903, 434 ), /* 902 time */
- S_ST( 'a', 3, 904, 0 ), /* 903 timed */
- S_ST( 't', 3, 435, 0 ), /* 904 timeda */
- S_ST( 'i', 3, 906, 901 ), /* 905 tim */
- S_ST( 'n', 3, 907, 0 ), /* 906 timi */
- S_ST( 'g', 3, 908, 0 ), /* 907 timin */
- S_ST( 's', 3, 909, 0 ), /* 908 timing */
- S_ST( 't', 3, 910, 0 ), /* 909 timings */
- S_ST( 'a', 3, 911, 0 ), /* 910 timingst */
- S_ST( 't', 3, 437, 0 ), /* 911 timingsta */
- S_ST( 'n', 3, 913, 900 ), /* 912 ti */
- S_ST( 'k', 3, 914, 0 ), /* 913 tin */
- S_ST( 'e', 3, 438, 0 ), /* 914 tink */
- S_ST( 'o', 3, 439, 898 ), /* 915 t */
- S_ST( 'r', 3, 918, 915 ), /* 916 t */
- S_ST( 'a', 3, 440, 0 ), /* 917 tr */
- S_ST( 'u', 3, 919, 917 ), /* 918 tr */
- S_ST( 's', 3, 920, 441 ), /* 919 tru */
- S_ST( 't', 3, 921, 0 ), /* 920 trus */
- S_ST( 'e', 3, 922, 0 ), /* 921 trust */
- S_ST( 'd', 3, 923, 0 ), /* 922 truste */
- S_ST( 'k', 3, 924, 0 ), /* 923 trusted */
- S_ST( 'e', 3, 442, 0 ), /* 924 trustedk */
- S_ST( 't', 3, 443, 916 ), /* 925 t */
- S_ST( 'y', 3, 927, 925 ), /* 926 t */
- S_ST( 'p', 3, 444, 0 ), /* 927 ty */
- S_ST( 'u', 3, 929, 897 ), /* 928 */
- S_ST( 'n', 3, 935, 0 ), /* 929 u */
- S_ST( 'c', 3, 931, 0 ), /* 930 un */
- S_ST( 'o', 3, 932, 0 ), /* 931 unc */
- S_ST( 'n', 3, 933, 0 ), /* 932 unco */
- S_ST( 'f', 3, 934, 0 ), /* 933 uncon */
- S_ST( 'i', 3, 449, 0 ), /* 934 unconf */
- S_ST( 'p', 3, 936, 930 ), /* 935 un */
- S_ST( 'e', 3, 937, 0 ), /* 936 unp */
- S_ST( 'e', 3, 450, 0 ), /* 937 unpe */
- S_ST( '_', 3, 958, 0 ), /* 938 unpeer */
- S_ST( 'c', 3, 940, 0 ), /* 939 unpeer_ */
- S_ST( 'r', 3, 941, 0 ), /* 940 unpeer_c */
- S_ST( 'y', 3, 942, 0 ), /* 941 unpeer_cr */
- S_ST( 'p', 3, 943, 0 ), /* 942 unpeer_cry */
- S_ST( 't', 3, 944, 0 ), /* 943 unpeer_cryp */
- S_ST( 'o', 3, 945, 0 ), /* 944 unpeer_crypt */
- S_ST( '_', 3, 950, 0 ), /* 945 unpeer_crypto */
- S_ST( 'e', 3, 947, 0 ), /* 946 unpeer_crypto_ */
- S_ST( 'a', 3, 948, 0 ), /* 947 unpeer_crypto_e */
- S_ST( 'r', 3, 949, 0 ), /* 948 unpeer_crypto_ea */
- S_ST( 'l', 3, 446, 0 ), /* 949 unpeer_crypto_ear */
- S_ST( 'n', 3, 951, 946 ), /* 950 unpeer_crypto_ */
- S_ST( 'a', 3, 952, 0 ), /* 951 unpeer_crypto_n */
- S_ST( 'k', 3, 953, 0 ), /* 952 unpeer_crypto_na */
- S_ST( '_', 3, 954, 0 ), /* 953 unpeer_crypto_nak */
- S_ST( 'e', 3, 955, 0 ), /* 954 unpeer_crypto_nak_ */
- S_ST( 'a', 3, 956, 0 ), /* 955 unpeer_crypto_nak_e */
- S_ST( 'r', 3, 957, 0 ), /* 956 unpeer_crypto_nak_ea */
- S_ST( 'l', 3, 447, 0 ), /* 957 unpeer_crypto_nak_ear */
- S_ST( 'd', 3, 959, 939 ), /* 958 unpeer_ */
- S_ST( 'i', 3, 960, 0 ), /* 959 unpeer_d */
- S_ST( 'g', 3, 961, 0 ), /* 960 unpeer_di */
- S_ST( 'e', 3, 962, 0 ), /* 961 unpeer_dig */
- S_ST( 's', 3, 963, 0 ), /* 962 unpeer_dige */
- S_ST( 't', 3, 964, 0 ), /* 963 unpeer_diges */
- S_ST( '_', 3, 965, 0 ), /* 964 unpeer_digest */
- S_ST( 'e', 3, 966, 0 ), /* 965 unpeer_digest_ */
- S_ST( 'a', 3, 967, 0 ), /* 966 unpeer_digest_e */
- S_ST( 'r', 3, 968, 0 ), /* 967 unpeer_digest_ea */
- S_ST( 'l', 3, 448, 0 ), /* 968 unpeer_digest_ear */
- S_ST( 'v', 3, 970, 928 ), /* 969 */
- S_ST( 'e', 3, 971, 0 ), /* 970 v */
- S_ST( 'r', 3, 972, 0 ), /* 971 ve */
- S_ST( 's', 3, 973, 0 ), /* 972 ver */
- S_ST( 'i', 3, 974, 0 ), /* 973 vers */
- S_ST( 'o', 3, 451, 0 ), /* 974 versi */
- S_ST( 'w', 3, 982, 969 ), /* 975 */
- S_ST( 'a', 3, 977, 0 ), /* 976 w */
- S_ST( 'n', 3, 978, 0 ), /* 977 wa */
- S_ST( 'd', 3, 979, 0 ), /* 978 wan */
- S_ST( 'e', 3, 466, 0 ), /* 979 wand */
- S_ST( 'e', 3, 981, 976 ), /* 980 w */
- S_ST( 'e', 3, 453, 0 ), /* 981 we */
- S_ST( 'i', 3, 983, 980 ), /* 982 w */
- S_ST( 'l', 3, 984, 0 ), /* 983 wi */
- S_ST( 'd', 3, 985, 0 ), /* 984 wil */
- S_ST( 'c', 3, 986, 0 ), /* 985 wild */
- S_ST( 'a', 3, 987, 0 ), /* 986 wildc */
- S_ST( 'r', 3, 454, 0 ), /* 987 wildca */
- S_ST( 'x', 3, 993, 975 ), /* 988 */
- S_ST( 'l', 3, 990, 0 ), /* 989 x */
- S_ST( 'e', 3, 991, 0 ), /* 990 xl */
- S_ST( 'a', 3, 992, 0 ), /* 991 xle */
- S_ST( 'v', 3, 455, 0 ), /* 992 xlea */
- S_ST( 'm', 3, 994, 989 ), /* 993 x */
- S_ST( 't', 3, 995, 0 ), /* 994 xm */
- S_ST( 'n', 3, 996, 0 ), /* 995 xmt */
- S_ST( 'o', 3, 997, 0 ), /* 996 xmtn */
- S_ST( 'n', 3, 998, 0 ), /* 997 xmtno */
- S_ST( 'c', 3, 456, 0 ), /* 998 xmtnon */
- S_ST( 'y', 3, 1000, 988 ), /* 999 [initial state] */
- S_ST( 'e', 3, 1001, 0 ), /* 1000 y */
- S_ST( 'a', 3, 457, 0 ) /* 1001 ye */
+ S_ST( 't', 0, 0, 0 ), /* 286 T_Delrestrict */
+ S_ST( 'e', 1, 0, 0 ), /* 287 T_Device */
+ S_ST( 't', 1, 0, 0 ), /* 288 T_Digest */
+ S_ST( 'e', 0, 0, 0 ), /* 289 T_Disable */
+ S_ST( 'd', 0, 0, 0 ), /* 290 T_Discard */
+ S_ST( 'n', 0, 0, 0 ), /* 291 T_Dispersion */
+ S_ST( 'e', 3, 300, 0 ), /* 292 int */
+ S_ST( 'e', 1, 0, 0 ), /* 293 T_Driftfile */
+ S_ST( 'p', 0, 0, 0 ), /* 294 T_Drop */
+ S_ST( 'p', 0, 0, 0 ), /* 295 T_Dscp */
+ S_ST( '.', 0, 0, 0 ), /* 296 T_Ellipsis */
+ S_ST( 'e', 0, 0, 0 ), /* 297 T_Enable */
+ S_ST( 'd', 0, 0, 179 ), /* 298 T_End */
+ S_ST( 'r', 0, 0, 0 ), /* 299 T_Epeer */
+ S_ST( 'r', 3, 324, 0 ), /* 300 inte */
+ S_ST( 'e', 1, 190, 0 ), /* 301 T_File */
+ S_ST( 'n', 0, 0, 0 ), /* 302 T_Filegen */
+ S_ST( 'm', 0, 0, 0 ), /* 303 T_Filenum */
+ S_ST( '1', 0, 0, 0 ), /* 304 T_Flag1 */
+ S_ST( '2', 0, 0, 304 ), /* 305 T_Flag2 */
+ S_ST( '3', 0, 0, 305 ), /* 306 T_Flag3 */
+ S_ST( '4', 0, 0, 306 ), /* 307 T_Flag4 */
+ S_ST( 'e', 0, 0, 0 ), /* 308 T_Flake */
+ S_ST( 'r', 0, 0, 0 ), /* 309 T_Floor */
+ S_ST( 'q', 0, 200, 0 ), /* 310 T_Freq */
+ S_ST( 'e', 1, 0, 0 ), /* 311 T_Fudge */
+ S_ST( 'z', 0, 0, 0 ), /* 312 T_Fuzz */
+ S_ST( 't', 1, 0, 0 ), /* 313 T_Host */
+ S_ST( 'f', 0, 0, 0 ), /* 314 T_Huffpuff */
+ S_ST( 't', 0, 0, 0 ), /* 315 T_Iburst */
+ S_ST( 't', 1, 0, 0 ), /* 316 T_Ident */
+ S_ST( 'e', 0, 231, 0 ), /* 317 T_Ignore */
+ S_ST( 'h', 0, 0, 0 ), /* 318 T_Ignorehash */
+ S_ST( 'c', 0, 0, 0 ), /* 319 T_Incalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 320 T_Incmem */
+ S_ST( 'c', 0, 0, 0 ), /* 321 T_Initalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 322 T_Initmem */
+ S_ST( 'e', 1, 0, 0 ), /* 323 T_Includefile */
+ S_ST( 'f', 3, 326, 0 ), /* 324 inter */
+ S_ST( 'e', 0, 0, 0 ), /* 325 T_Interface */
+ S_ST( 'a', 3, 418, 0 ), /* 326 interf */
+ S_ST( 'o', 0, 0, 234 ), /* 327 T_Io */
+ S_ST( 't', 0, 0, 0 ), /* 328 T_Ippeerlimit */
+ S_ST( '4', 0, 0, 0 ), /* 329 T_Ipv4 */
+ S_ST( '4', 0, 0, 0 ), /* 330 T_Ipv4_flag */
+ S_ST( '6', 0, 0, 329 ), /* 331 T_Ipv6 */
+ S_ST( '6', 0, 0, 330 ), /* 332 T_Ipv6_flag */
+ S_ST( 'l', 0, 0, 0 ), /* 333 T_Kernel */
+ S_ST( 'y', 0, 335, 483 ), /* 334 T_Key */
+ S_ST( 's', 1, 486, 0 ), /* 335 T_Keys */
+ S_ST( 'r', 1, 0, 0 ), /* 336 T_Keysdir */
+ S_ST( 'd', 0, 0, 0 ), /* 337 T_Kod */
+ S_ST( 'e', 1, 0, 0 ), /* 338 T_Leapfile */
+ S_ST( 'l', 0, 0, 0 ), /* 339 T_Leapsmearinterval */
+ S_ST( 'd', 0, 0, 0 ), /* 340 T_Limited */
+ S_ST( 'k', 0, 0, 0 ), /* 341 T_Link */
+ S_ST( 'n', 0, 0, 0 ), /* 342 T_Listen */
+ S_ST( 'g', 2, 0, 0 ), /* 343 T_Logconfig */
+ S_ST( 'e', 1, 0, 0 ), /* 344 T_Logfile */
+ S_ST( 's', 0, 0, 0 ), /* 345 T_Loopstats */
+ S_ST( 'p', 0, 0, 0 ), /* 346 T_Lowpriotrap */
+ S_ST( 't', 1, 0, 0 ), /* 347 T_Manycastclient */
+ S_ST( 'r', 2, 0, 0 ), /* 348 T_Manycastserver */
+ S_ST( 'k', 0, 0, 0 ), /* 349 T_Mask */
+ S_ST( 'e', 0, 0, 0 ), /* 350 T_Maxage */
+ S_ST( 'k', 0, 0, 0 ), /* 351 T_Maxclock */
+ S_ST( 'h', 0, 0, 0 ), /* 352 T_Maxdepth */
+ S_ST( 't', 0, 0, 0 ), /* 353 T_Maxdist */
+ S_ST( 'm', 0, 0, 0 ), /* 354 T_Maxmem */
+ S_ST( 'l', 0, 0, 0 ), /* 355 T_Maxpoll */
+ S_ST( 's', 0, 0, 0 ), /* 356 T_Mdnstries */
+ S_ST( 'm', 0, 586, 0 ), /* 357 T_Mem */
+ S_ST( 'k', 0, 0, 0 ), /* 358 T_Memlock */
+ S_ST( 'k', 0, 0, 0 ), /* 359 T_Minclock */
+ S_ST( 'h', 0, 0, 0 ), /* 360 T_Mindepth */
+ S_ST( 't', 0, 0, 0 ), /* 361 T_Mindist */
+ S_ST( 'm', 0, 0, 0 ), /* 362 T_Minimum */
+ S_ST( 'r', 0, 0, 0 ), /* 363 T_Minjitter */
+ S_ST( 'l', 0, 0, 0 ), /* 364 T_Minpoll */
+ S_ST( 'e', 0, 0, 0 ), /* 365 T_Minsane */
+ S_ST( 'e', 0, 367, 0 ), /* 366 T_Mode */
+ S_ST( '7', 0, 0, 0 ), /* 367 T_Mode7 */
+ S_ST( 'r', 0, 0, 0 ), /* 368 T_Monitor */
+ S_ST( 'h', 0, 0, 0 ), /* 369 T_Month */
+ S_ST( 'u', 0, 0, 0 ), /* 370 T_Mru */
+ S_ST( 'p', 0, 0, 0 ), /* 371 T_Mssntp */
+ S_ST( 't', 2, 0, 0 ), /* 372 T_Multicastclient */
+ S_ST( 'c', 0, 0, 0 ), /* 373 T_Nic */
+ S_ST( 'k', 0, 0, 0 ), /* 374 T_Nolink */
+ S_ST( 'y', 0, 0, 0 ), /* 375 T_Nomodify */
+ S_ST( 't', 0, 0, 0 ), /* 376 T_Nomrulist */
+ S_ST( 'e', 0, 0, 0 ), /* 377 T_None */
+ S_ST( 'e', 0, 0, 0 ), /* 378 T_Nonvolatile */
+ S_ST( 'r', 0, 0, 0 ), /* 379 T_Noepeer */
+ S_ST( 'r', 0, 0, 0 ), /* 380 T_Nopeer */
+ S_ST( 'y', 0, 0, 0 ), /* 381 T_Noquery */
+ S_ST( 't', 0, 0, 0 ), /* 382 T_Noselect */
+ S_ST( 'e', 0, 0, 0 ), /* 383 T_Noserve */
+ S_ST( 'p', 0, 0, 0 ), /* 384 T_Notrap */
+ S_ST( 't', 0, 0, 0 ), /* 385 T_Notrust */
+ S_ST( 'p', 0, 691, 0 ), /* 386 T_Ntp */
+ S_ST( 't', 0, 0, 0 ), /* 387 T_Ntpport */
+ S_ST( 't', 1, 0, 0 ), /* 388 T_NtpSignDsocket */
+ S_ST( 'n', 0, 706, 0 ), /* 389 T_Orphan */
+ S_ST( 't', 0, 0, 0 ), /* 390 T_Orphanwait */
+ S_ST( 'y', 0, 0, 0 ), /* 391 T_PCEdigest */
+ S_ST( 'c', 0, 0, 0 ), /* 392 T_Panic */
+ S_ST( 'r', 1, 733, 0 ), /* 393 T_Peer */
+ S_ST( 's', 0, 0, 0 ), /* 394 T_Peerstats */
+ S_ST( 'e', 2, 0, 0 ), /* 395 T_Phone */
+ S_ST( 'd', 0, 741, 0 ), /* 396 T_Pid */
+ S_ST( 'e', 1, 0, 0 ), /* 397 T_Pidfile */
+ S_ST( 'l', 0, 746, 0 ), /* 398 T_Poll */
+ S_ST( 't', 0, 0, 0 ), /* 399 T_PollSkewList */
+ S_ST( 'l', 1, 0, 0 ), /* 400 T_Pool */
+ S_ST( 't', 0, 0, 0 ), /* 401 T_Port */
+ S_ST( 'a', 1, 0, 0 ), /* 402 T_PpsData */
+ S_ST( 't', 0, 0, 0 ), /* 403 T_Preempt */
+ S_ST( 'r', 0, 0, 0 ), /* 404 T_Prefer */
+ S_ST( 's', 0, 0, 0 ), /* 405 T_Protostats */
+ S_ST( 'w', 1, 0, 760 ), /* 406 T_Pw */
+ S_ST( 'e', 1, 0, 0 ), /* 407 T_Randfile */
+ S_ST( 's', 0, 0, 0 ), /* 408 T_Rawstats */
+ S_ST( 'd', 1, 0, 0 ), /* 409 T_Refid */
+ S_ST( 'y', 0, 0, 0 ), /* 410 T_Requestkey */
+ S_ST( 't', 0, 0, 0 ), /* 411 T_Reset */
+ S_ST( 't', 0, 0, 0 ), /* 412 T_Restrict */
+ S_ST( 'e', 0, 0, 0 ), /* 413 T_Revoke */
+ S_ST( 't', 0, 0, 0 ), /* 414 T_Rlimit */
+ S_ST( 'r', 1, 0, 0 ), /* 415 T_Saveconfigdir */
+ S_ST( 'r', 1, 843, 0 ), /* 416 T_Server */
+ S_ST( 'e', 0, 0, 0 ), /* 417 T_Serverresponse */
+ S_ST( 'c', 3, 325, 0 ), /* 418 interfa */
+ S_ST( 'r', 1, 0, 0 ), /* 419 T_Setvar */
+ S_ST( 'e', 0, 0, 0 ), /* 420 T_Source */
+ S_ST( 'e', 0, 0, 0 ), /* 421 T_Stacksize */
+ S_ST( 's', 0, 0, 0 ), /* 422 T_Statistics */
+ S_ST( 's', 0, 887, 882 ), /* 423 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 424 T_Statsdir */
+ S_ST( 'p', 0, 895, 0 ), /* 425 T_Step */
+ S_ST( 'k', 0, 0, 0 ), /* 426 T_Stepback */
+ S_ST( 'd', 0, 0, 0 ), /* 427 T_Stepfwd */
+ S_ST( 't', 0, 0, 0 ), /* 428 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 429 T_Stratum */
+ S_ST( 'p', 3, 475, 327 ), /* 430 i */
+ S_ST( 's', 0, 902, 0 ), /* 431 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 432 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 433 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 434 T_Time1 */
+ S_ST( '2', 0, 0, 434 ), /* 435 T_Time2 */
+ S_ST( 'a', 1, 0, 0 ), /* 436 T_TimeData */
+ S_ST( 'r', 0, 0, 911 ), /* 437 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 438 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 439 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 440 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 441 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 442 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 443 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 444 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 445 T_Type */
+ S_ST( 'p', 3, 453, 0 ), /* 446 ip */
+ S_ST( 'y', 0, 0, 0 ), /* 447 T_UEcrypto */
+ S_ST( 'y', 0, 0, 0 ), /* 448 T_UEcryptonak */
+ S_ST( 'y', 0, 0, 0 ), /* 449 T_UEdigest */
+ S_ST( 'g', 1, 0, 0 ), /* 450 T_Unconfig */
+ S_ST( 'r', 1, 947, 0 ), /* 451 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 452 T_Version */
+ S_ST( 'e', 3, 459, 0 ), /* 453 ipp */
+ S_ST( 'k', 0, 0, 0 ), /* 454 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 455 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 456 T_Xleave */
+ S_ST( 'e', 0, 0, 0 ), /* 457 T_Xmtnonce */
+ S_ST( 'r', 0, 0, 0 ), /* 458 T_Year */
+ S_ST( 'e', 3, 460, 0 ), /* 459 ippe */
+ S_ST( 'r', 3, 471, 0 ), /* 460 ippee */
+ S_ST( 'e', 0, 0, 0 ), /* 461 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 462 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 463 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 464 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 465 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 466 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 467 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 468 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 469 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 470 T_Proc_Delay */
+ S_ST( 'l', 3, 472, 0 ), /* 471 ippeer */
+ S_ST( 'i', 3, 473, 0 ), /* 472 ippeerl */
+ S_ST( 'm', 3, 474, 0 ), /* 473 ippeerli */
+ S_ST( 'i', 3, 328, 0 ), /* 474 ippeerlim */
+ S_ST( 'v', 3, 331, 446 ), /* 475 ip */
+ S_ST( 'j', 3, 477, 219 ), /* 476 */
+ S_ST( 'i', 3, 478, 0 ), /* 477 j */
+ S_ST( 't', 3, 479, 0 ), /* 478 ji */
+ S_ST( 't', 3, 480, 0 ), /* 479 jit */
+ S_ST( 'e', 3, 468, 0 ), /* 480 jitt */
+ S_ST( 'k', 3, 488, 476 ), /* 481 */
+ S_ST( 'e', 3, 334, 0 ), /* 482 k */
+ S_ST( 'r', 3, 484, 0 ), /* 483 ke */
+ S_ST( 'n', 3, 485, 0 ), /* 484 ker */
+ S_ST( 'e', 3, 333, 0 ), /* 485 kern */
+ S_ST( 'd', 3, 487, 0 ), /* 486 keys */
+ S_ST( 'i', 3, 336, 0 ), /* 487 keysd */
+ S_ST( 'o', 3, 337, 482 ), /* 488 k */
+ S_ST( 'l', 3, 517, 481 ), /* 489 */
+ S_ST( 'e', 3, 491, 0 ), /* 490 l */
+ S_ST( 'a', 3, 492, 0 ), /* 491 le */
+ S_ST( 'p', 3, 496, 0 ), /* 492 lea */
+ S_ST( 'f', 3, 494, 0 ), /* 493 leap */
+ S_ST( 'i', 3, 495, 0 ), /* 494 leapf */
+ S_ST( 'l', 3, 338, 0 ), /* 495 leapfi */
+ S_ST( 's', 3, 497, 493 ), /* 496 leap */
+ S_ST( 'm', 3, 498, 0 ), /* 497 leaps */
+ S_ST( 'e', 3, 499, 0 ), /* 498 leapsm */
+ S_ST( 'a', 3, 500, 0 ), /* 499 leapsme */
+ S_ST( 'r', 3, 501, 0 ), /* 500 leapsmea */
+ S_ST( 'i', 3, 502, 0 ), /* 501 leapsmear */
+ S_ST( 'n', 3, 503, 0 ), /* 502 leapsmeari */
+ S_ST( 't', 3, 504, 0 ), /* 503 leapsmearin */
+ S_ST( 'e', 3, 505, 0 ), /* 504 leapsmearint */
+ S_ST( 'r', 3, 506, 0 ), /* 505 leapsmearinte */
+ S_ST( 'v', 3, 507, 0 ), /* 506 leapsmearinter */
+ S_ST( 'a', 3, 339, 0 ), /* 507 leapsmearinterv */
+ S_ST( 'i', 3, 514, 490 ), /* 508 l */
+ S_ST( 'm', 3, 510, 0 ), /* 509 li */
+ S_ST( 'i', 3, 511, 0 ), /* 510 lim */
+ S_ST( 't', 3, 512, 0 ), /* 511 limi */
+ S_ST( 'e', 3, 340, 0 ), /* 512 limit */
+ S_ST( 'n', 3, 341, 509 ), /* 513 li */
+ S_ST( 's', 3, 515, 513 ), /* 514 li */
+ S_ST( 't', 3, 516, 0 ), /* 515 lis */
+ S_ST( 'e', 3, 342, 0 ), /* 516 list */
+ S_ST( 'o', 3, 533, 508 ), /* 517 l */
+ S_ST( 'g', 3, 524, 0 ), /* 518 lo */
+ S_ST( 'c', 3, 520, 0 ), /* 519 log */
+ S_ST( 'o', 3, 521, 0 ), /* 520 logc */
+ S_ST( 'n', 3, 522, 0 ), /* 521 logco */
+ S_ST( 'f', 3, 523, 0 ), /* 522 logcon */
+ S_ST( 'i', 3, 343, 0 ), /* 523 logconf */
+ S_ST( 'f', 3, 525, 519 ), /* 524 log */
+ S_ST( 'i', 3, 526, 0 ), /* 525 logf */
+ S_ST( 'l', 3, 344, 0 ), /* 526 logfi */
+ S_ST( 'o', 3, 528, 518 ), /* 527 lo */
+ S_ST( 'p', 3, 529, 0 ), /* 528 loo */
+ S_ST( 's', 3, 530, 0 ), /* 529 loop */
+ S_ST( 't', 3, 531, 0 ), /* 530 loops */
+ S_ST( 'a', 3, 532, 0 ), /* 531 loopst */
+ S_ST( 't', 3, 345, 0 ), /* 532 loopsta */
+ S_ST( 'w', 3, 534, 527 ), /* 533 lo */
+ S_ST( 'p', 3, 535, 0 ), /* 534 low */
+ S_ST( 'r', 3, 536, 0 ), /* 535 lowp */
+ S_ST( 'i', 3, 537, 0 ), /* 536 lowpr */
+ S_ST( 'o', 3, 538, 0 ), /* 537 lowpri */
+ S_ST( 't', 3, 539, 0 ), /* 538 lowprio */
+ S_ST( 'r', 3, 540, 0 ), /* 539 lowpriot */
+ S_ST( 'a', 3, 346, 0 ), /* 540 lowpriotr */
+ S_ST( 'm', 3, 627, 489 ), /* 541 */
+ S_ST( 'a', 3, 560, 0 ), /* 542 m */
+ S_ST( 'n', 3, 544, 0 ), /* 543 ma */
+ S_ST( 'y', 3, 545, 0 ), /* 544 man */
+ S_ST( 'c', 3, 546, 0 ), /* 545 many */
+ S_ST( 'a', 3, 547, 0 ), /* 546 manyc */
+ S_ST( 's', 3, 548, 0 ), /* 547 manyca */
+ S_ST( 't', 3, 554, 0 ), /* 548 manycas */
+ S_ST( 'c', 3, 550, 0 ), /* 549 manycast */
+ S_ST( 'l', 3, 551, 0 ), /* 550 manycastc */
+ S_ST( 'i', 3, 552, 0 ), /* 551 manycastcl */
+ S_ST( 'e', 3, 553, 0 ), /* 552 manycastcli */
+ S_ST( 'n', 3, 347, 0 ), /* 553 manycastclie */
+ S_ST( 's', 3, 555, 549 ), /* 554 manycast */
+ S_ST( 'e', 3, 556, 0 ), /* 555 manycasts */
+ S_ST( 'r', 3, 557, 0 ), /* 556 manycastse */
+ S_ST( 'v', 3, 558, 0 ), /* 557 manycastser */
+ S_ST( 'e', 3, 348, 0 ), /* 558 manycastserv */
+ S_ST( 's', 3, 349, 543 ), /* 559 ma */
+ S_ST( 'x', 3, 575, 559 ), /* 560 ma */
+ S_ST( 'a', 3, 562, 0 ), /* 561 max */
+ S_ST( 'g', 3, 350, 0 ), /* 562 maxa */
+ S_ST( 'c', 3, 564, 561 ), /* 563 max */
+ S_ST( 'l', 3, 565, 0 ), /* 564 maxc */
+ S_ST( 'o', 3, 566, 0 ), /* 565 maxcl */
+ S_ST( 'c', 3, 351, 0 ), /* 566 maxclo */
+ S_ST( 'd', 3, 571, 563 ), /* 567 max */
+ S_ST( 'e', 3, 569, 0 ), /* 568 maxd */
+ S_ST( 'p', 3, 570, 0 ), /* 569 maxde */
+ S_ST( 't', 3, 352, 0 ), /* 570 maxdep */
+ S_ST( 'i', 3, 572, 568 ), /* 571 maxd */
+ S_ST( 's', 3, 353, 0 ), /* 572 maxdi */
+ S_ST( 'm', 3, 574, 567 ), /* 573 max */
+ S_ST( 'e', 3, 354, 0 ), /* 574 maxm */
+ S_ST( 'p', 3, 576, 573 ), /* 575 max */
+ S_ST( 'o', 3, 577, 0 ), /* 576 maxp */
+ S_ST( 'l', 3, 355, 0 ), /* 577 maxpo */
+ S_ST( 'd', 3, 579, 542 ), /* 578 m */
+ S_ST( 'n', 3, 580, 0 ), /* 579 md */
+ S_ST( 's', 3, 581, 0 ), /* 580 mdn */
+ S_ST( 't', 3, 582, 0 ), /* 581 mdns */
+ S_ST( 'r', 3, 583, 0 ), /* 582 mdnst */
+ S_ST( 'i', 3, 584, 0 ), /* 583 mdnstr */
+ S_ST( 'e', 3, 356, 0 ), /* 584 mdnstri */
+ S_ST( 'e', 3, 357, 578 ), /* 585 m */
+ S_ST( 'l', 3, 587, 0 ), /* 586 mem */
+ S_ST( 'o', 3, 588, 0 ), /* 587 meml */
+ S_ST( 'c', 3, 358, 0 ), /* 588 memlo */
+ S_ST( 'i', 3, 590, 585 ), /* 589 m */
+ S_ST( 'n', 3, 612, 0 ), /* 590 mi */
+ S_ST( 'c', 3, 592, 0 ), /* 591 min */
+ S_ST( 'l', 3, 593, 0 ), /* 592 minc */
+ S_ST( 'o', 3, 594, 0 ), /* 593 mincl */
+ S_ST( 'c', 3, 359, 0 ), /* 594 minclo */
+ S_ST( 'd', 3, 599, 591 ), /* 595 min */
+ S_ST( 'e', 3, 597, 0 ), /* 596 mind */
+ S_ST( 'p', 3, 598, 0 ), /* 597 minde */
+ S_ST( 't', 3, 360, 0 ), /* 598 mindep */
+ S_ST( 'i', 3, 600, 596 ), /* 599 mind */
+ S_ST( 's', 3, 361, 0 ), /* 600 mindi */
+ S_ST( 'i', 3, 602, 595 ), /* 601 min */
+ S_ST( 'm', 3, 603, 0 ), /* 602 mini */
+ S_ST( 'u', 3, 362, 0 ), /* 603 minim */
+ S_ST( 'j', 3, 605, 601 ), /* 604 min */
+ S_ST( 'i', 3, 606, 0 ), /* 605 minj */
+ S_ST( 't', 3, 607, 0 ), /* 606 minji */
+ S_ST( 't', 3, 608, 0 ), /* 607 minjit */
+ S_ST( 'e', 3, 363, 0 ), /* 608 minjitt */
+ S_ST( 'p', 3, 610, 604 ), /* 609 min */
+ S_ST( 'o', 3, 611, 0 ), /* 610 minp */
+ S_ST( 'l', 3, 364, 0 ), /* 611 minpo */
+ S_ST( 's', 3, 613, 609 ), /* 612 min */
+ S_ST( 'a', 3, 614, 0 ), /* 613 mins */
+ S_ST( 'n', 3, 365, 0 ), /* 614 minsa */
+ S_ST( 'o', 3, 617, 589 ), /* 615 m */
+ S_ST( 'd', 3, 366, 0 ), /* 616 mo */
+ S_ST( 'n', 3, 621, 616 ), /* 617 mo */
+ S_ST( 'i', 3, 619, 0 ), /* 618 mon */
+ S_ST( 't', 3, 620, 0 ), /* 619 moni */
+ S_ST( 'o', 3, 368, 0 ), /* 620 monit */
+ S_ST( 't', 3, 369, 618 ), /* 621 mon */
+ S_ST( 'r', 3, 370, 615 ), /* 622 m */
+ S_ST( 's', 3, 624, 622 ), /* 623 m */
+ S_ST( 's', 3, 625, 0 ), /* 624 ms */
+ S_ST( 'n', 3, 626, 0 ), /* 625 mss */
+ S_ST( 't', 3, 371, 0 ), /* 626 mssn */
+ S_ST( 'u', 3, 628, 623 ), /* 627 m */
+ S_ST( 'l', 3, 629, 0 ), /* 628 mu */
+ S_ST( 't', 3, 630, 0 ), /* 629 mul */
+ S_ST( 'i', 3, 631, 0 ), /* 630 mult */
+ S_ST( 'c', 3, 632, 0 ), /* 631 multi */
+ S_ST( 'a', 3, 633, 0 ), /* 632 multic */
+ S_ST( 's', 3, 634, 0 ), /* 633 multica */
+ S_ST( 't', 3, 635, 0 ), /* 634 multicas */
+ S_ST( 'c', 3, 636, 0 ), /* 635 multicast */
+ S_ST( 'l', 3, 637, 0 ), /* 636 multicastc */
+ S_ST( 'i', 3, 638, 0 ), /* 637 multicastcl */
+ S_ST( 'e', 3, 639, 0 ), /* 638 multicastcli */
+ S_ST( 'n', 3, 372, 0 ), /* 639 multicastclie */
+ S_ST( 'n', 3, 687, 541 ), /* 640 */
+ S_ST( 'i', 3, 373, 0 ), /* 641 n */
+ S_ST( 'o', 3, 682, 641 ), /* 642 n */
+ S_ST( 'e', 3, 644, 0 ), /* 643 no */
+ S_ST( 'p', 3, 645, 0 ), /* 644 noe */
+ S_ST( 'e', 3, 646, 0 ), /* 645 noep */
+ S_ST( 'e', 3, 379, 0 ), /* 646 noepe */
+ S_ST( 'l', 3, 648, 643 ), /* 647 no */
+ S_ST( 'i', 3, 649, 0 ), /* 648 nol */
+ S_ST( 'n', 3, 374, 0 ), /* 649 noli */
+ S_ST( 'm', 3, 655, 647 ), /* 650 no */
+ S_ST( 'o', 3, 652, 0 ), /* 651 nom */
+ S_ST( 'd', 3, 653, 0 ), /* 652 nomo */
+ S_ST( 'i', 3, 654, 0 ), /* 653 nomod */
+ S_ST( 'f', 3, 375, 0 ), /* 654 nomodi */
+ S_ST( 'r', 3, 656, 651 ), /* 655 nom */
+ S_ST( 'u', 3, 657, 0 ), /* 656 nomr */
+ S_ST( 'l', 3, 658, 0 ), /* 657 nomru */
+ S_ST( 'i', 3, 659, 0 ), /* 658 nomrul */
+ S_ST( 's', 3, 376, 0 ), /* 659 nomruli */
+ S_ST( 'n', 3, 661, 650 ), /* 660 no */
+ S_ST( 'v', 3, 662, 377 ), /* 661 non */
+ S_ST( 'o', 3, 663, 0 ), /* 662 nonv */
+ S_ST( 'l', 3, 664, 0 ), /* 663 nonvo */
+ S_ST( 'a', 3, 665, 0 ), /* 664 nonvol */
+ S_ST( 't', 3, 666, 0 ), /* 665 nonvola */
+ S_ST( 'i', 3, 667, 0 ), /* 666 nonvolat */
+ S_ST( 'l', 3, 378, 0 ), /* 667 nonvolati */
+ S_ST( 'p', 3, 669, 660 ), /* 668 no */
+ S_ST( 'e', 3, 670, 0 ), /* 669 nop */
+ S_ST( 'e', 3, 380, 0 ), /* 670 nope */
+ S_ST( 'q', 3, 672, 668 ), /* 671 no */
+ S_ST( 'u', 3, 673, 0 ), /* 672 noq */
+ S_ST( 'e', 3, 674, 0 ), /* 673 noqu */
+ S_ST( 'r', 3, 381, 0 ), /* 674 noque */
+ S_ST( 's', 3, 676, 671 ), /* 675 no */
+ S_ST( 'e', 3, 680, 0 ), /* 676 nos */
+ S_ST( 'l', 3, 678, 0 ), /* 677 nose */
+ S_ST( 'e', 3, 679, 0 ), /* 678 nosel */
+ S_ST( 'c', 3, 382, 0 ), /* 679 nosele */
+ S_ST( 'r', 3, 681, 677 ), /* 680 nose */
+ S_ST( 'v', 3, 383, 0 ), /* 681 noser */
+ S_ST( 't', 3, 683, 675 ), /* 682 no */
+ S_ST( 'r', 3, 685, 0 ), /* 683 not */
+ S_ST( 'a', 3, 384, 0 ), /* 684 notr */
+ S_ST( 'u', 3, 686, 684 ), /* 685 notr */
+ S_ST( 's', 3, 385, 0 ), /* 686 notru */
+ S_ST( 't', 3, 386, 642 ), /* 687 n */
+ S_ST( 'p', 3, 689, 0 ), /* 688 ntp */
+ S_ST( 'o', 3, 690, 0 ), /* 689 ntpp */
+ S_ST( 'r', 3, 387, 0 ), /* 690 ntppo */
+ S_ST( 's', 3, 692, 688 ), /* 691 ntp */
+ S_ST( 'i', 3, 693, 0 ), /* 692 ntps */
+ S_ST( 'g', 3, 694, 0 ), /* 693 ntpsi */
+ S_ST( 'n', 3, 695, 0 ), /* 694 ntpsig */
+ S_ST( 'd', 3, 696, 0 ), /* 695 ntpsign */
+ S_ST( 's', 3, 697, 0 ), /* 696 ntpsignd */
+ S_ST( 'o', 3, 698, 0 ), /* 697 ntpsignds */
+ S_ST( 'c', 3, 699, 0 ), /* 698 ntpsigndso */
+ S_ST( 'k', 3, 700, 0 ), /* 699 ntpsigndsoc */
+ S_ST( 'e', 3, 388, 0 ), /* 700 ntpsigndsock */
+ S_ST( 'o', 3, 702, 640 ), /* 701 */
+ S_ST( 'r', 3, 703, 0 ), /* 702 o */
+ S_ST( 'p', 3, 704, 0 ), /* 703 or */
+ S_ST( 'h', 3, 705, 0 ), /* 704 orp */
+ S_ST( 'a', 3, 389, 0 ), /* 705 orph */
+ S_ST( 'w', 3, 707, 0 ), /* 706 orphan */
+ S_ST( 'a', 3, 708, 0 ), /* 707 orphanw */
+ S_ST( 'i', 3, 390, 0 ), /* 708 orphanwa */
+ S_ST( 'p', 3, 406, 701 ), /* 709 */
+ S_ST( 'a', 3, 711, 0 ), /* 710 p */
+ S_ST( 'n', 3, 712, 0 ), /* 711 pa */
+ S_ST( 'i', 3, 392, 0 ), /* 712 pan */
+ S_ST( 'e', 3, 714, 710 ), /* 713 p */
+ S_ST( 'e', 3, 393, 0 ), /* 714 pe */
+ S_ST( '_', 3, 716, 0 ), /* 715 peer */
+ S_ST( 'c', 3, 717, 0 ), /* 716 peer_ */
+ S_ST( 'l', 3, 718, 0 ), /* 717 peer_c */
+ S_ST( 'e', 3, 719, 0 ), /* 718 peer_cl */
+ S_ST( 'a', 3, 720, 0 ), /* 719 peer_cle */
+ S_ST( 'r', 3, 721, 0 ), /* 720 peer_clea */
+ S_ST( '_', 3, 722, 0 ), /* 721 peer_clear */
+ S_ST( 'd', 3, 723, 0 ), /* 722 peer_clear_ */
+ S_ST( 'i', 3, 724, 0 ), /* 723 peer_clear_d */
+ S_ST( 'g', 3, 725, 0 ), /* 724 peer_clear_di */
+ S_ST( 'e', 3, 726, 0 ), /* 725 peer_clear_dig */
+ S_ST( 's', 3, 727, 0 ), /* 726 peer_clear_dige */
+ S_ST( 't', 3, 728, 0 ), /* 727 peer_clear_diges */
+ S_ST( '_', 3, 729, 0 ), /* 728 peer_clear_digest */
+ S_ST( 'e', 3, 730, 0 ), /* 729 peer_clear_digest_ */
+ S_ST( 'a', 3, 731, 0 ), /* 730 peer_clear_digest_e */
+ S_ST( 'r', 3, 732, 0 ), /* 731 peer_clear_digest_ea */
+ S_ST( 'l', 3, 391, 0 ), /* 732 peer_clear_digest_ear */
+ S_ST( 's', 3, 734, 715 ), /* 733 peer */
+ S_ST( 't', 3, 735, 0 ), /* 734 peers */
+ S_ST( 'a', 3, 736, 0 ), /* 735 peerst */
+ S_ST( 't', 3, 394, 0 ), /* 736 peersta */
+ S_ST( 'h', 3, 738, 713 ), /* 737 p */
+ S_ST( 'o', 3, 739, 0 ), /* 738 ph */
+ S_ST( 'n', 3, 395, 0 ), /* 739 pho */
+ S_ST( 'i', 3, 396, 737 ), /* 740 p */
+ S_ST( 'f', 3, 742, 0 ), /* 741 pid */
+ S_ST( 'i', 3, 743, 0 ), /* 742 pidf */
+ S_ST( 'l', 3, 397, 0 ), /* 743 pidfi */
+ S_ST( 'o', 3, 754, 740 ), /* 744 p */
+ S_ST( 'l', 3, 398, 0 ), /* 745 po */
+ S_ST( 's', 3, 747, 0 ), /* 746 poll */
+ S_ST( 'k', 3, 748, 0 ), /* 747 polls */
+ S_ST( 'e', 3, 749, 0 ), /* 748 pollsk */
+ S_ST( 'w', 3, 750, 0 ), /* 749 pollske */
+ S_ST( 'l', 3, 751, 0 ), /* 750 pollskew */
+ S_ST( 'i', 3, 752, 0 ), /* 751 pollskewl */
+ S_ST( 's', 3, 399, 0 ), /* 752 pollskewli */
+ S_ST( 'o', 3, 400, 745 ), /* 753 po */
+ S_ST( 'r', 3, 401, 753 ), /* 754 po */
+ S_ST( 'p', 3, 756, 744 ), /* 755 p */
+ S_ST( 's', 3, 757, 0 ), /* 756 pp */
+ S_ST( 'd', 3, 758, 0 ), /* 757 pps */
+ S_ST( 'a', 3, 759, 0 ), /* 758 ppsd */
+ S_ST( 't', 3, 402, 0 ), /* 759 ppsda */
+ S_ST( 'r', 3, 767, 755 ), /* 760 p */
+ S_ST( 'e', 3, 765, 0 ), /* 761 pr */
+ S_ST( 'e', 3, 763, 0 ), /* 762 pre */
+ S_ST( 'm', 3, 764, 0 ), /* 763 pree */
+ S_ST( 'p', 3, 403, 0 ), /* 764 preem */
+ S_ST( 'f', 3, 766, 762 ), /* 765 pre */
+ S_ST( 'e', 3, 404, 0 ), /* 766 pref */
+ S_ST( 'o', 3, 780, 761 ), /* 767 pr */
+ S_ST( 'c', 3, 769, 0 ), /* 768 pro */
+ S_ST( '_', 3, 770, 0 ), /* 769 proc */
+ S_ST( 'd', 3, 771, 0 ), /* 770 proc_ */
+ S_ST( 'e', 3, 772, 0 ), /* 771 proc_d */
+ S_ST( 'l', 3, 773, 0 ), /* 772 proc_de */
+ S_ST( 'a', 3, 470, 0 ), /* 773 proc_del */
+ S_ST( 'p', 3, 775, 768 ), /* 774 pro */
+ S_ST( '_', 3, 776, 0 ), /* 775 prop */
+ S_ST( 'd', 3, 777, 0 ), /* 776 prop_ */
+ S_ST( 'e', 3, 778, 0 ), /* 777 prop_d */
+ S_ST( 'l', 3, 779, 0 ), /* 778 prop_de */
+ S_ST( 'a', 3, 469, 0 ), /* 779 prop_del */
+ S_ST( 't', 3, 781, 774 ), /* 780 pro */
+ S_ST( 'o', 3, 782, 0 ), /* 781 prot */
+ S_ST( 's', 3, 783, 0 ), /* 782 proto */
+ S_ST( 't', 3, 784, 0 ), /* 783 protos */
+ S_ST( 'a', 3, 785, 0 ), /* 784 protost */
+ S_ST( 't', 3, 405, 0 ), /* 785 protosta */
+ S_ST( 'r', 3, 817, 709 ), /* 786 */
+ S_ST( 'a', 3, 793, 0 ), /* 787 r */
+ S_ST( 'n', 3, 789, 0 ), /* 788 ra */
+ S_ST( 'd', 3, 790, 0 ), /* 789 ran */
+ S_ST( 'f', 3, 791, 0 ), /* 790 rand */
+ S_ST( 'i', 3, 792, 0 ), /* 791 randf */
+ S_ST( 'l', 3, 407, 0 ), /* 792 randfi */
+ S_ST( 'w', 3, 794, 788 ), /* 793 ra */
+ S_ST( 's', 3, 795, 0 ), /* 794 raw */
+ S_ST( 't', 3, 796, 0 ), /* 795 raws */
+ S_ST( 'a', 3, 797, 0 ), /* 796 rawst */
+ S_ST( 't', 3, 408, 0 ), /* 797 rawsta */
+ S_ST( 'e', 3, 814, 787 ), /* 798 r */
+ S_ST( 'f', 3, 800, 0 ), /* 799 re */
+ S_ST( 'i', 3, 409, 0 ), /* 800 ref */
+ S_ST( 'q', 3, 802, 799 ), /* 801 re */
+ S_ST( 'u', 3, 803, 0 ), /* 802 req */
+ S_ST( 'e', 3, 804, 0 ), /* 803 requ */
+ S_ST( 's', 3, 805, 0 ), /* 804 reque */
+ S_ST( 't', 3, 806, 0 ), /* 805 reques */
+ S_ST( 'k', 3, 807, 0 ), /* 806 request */
+ S_ST( 'e', 3, 410, 0 ), /* 807 requestk */
+ S_ST( 's', 3, 810, 801 ), /* 808 re */
+ S_ST( 'e', 3, 411, 0 ), /* 809 res */
+ S_ST( 't', 3, 811, 809 ), /* 810 res */
+ S_ST( 'r', 3, 812, 0 ), /* 811 rest */
+ S_ST( 'i', 3, 813, 0 ), /* 812 restr */
+ S_ST( 'c', 3, 412, 0 ), /* 813 restri */
+ S_ST( 'v', 3, 815, 808 ), /* 814 re */
+ S_ST( 'o', 3, 816, 0 ), /* 815 rev */
+ S_ST( 'k', 3, 413, 0 ), /* 816 revo */
+ S_ST( 'l', 3, 818, 798 ), /* 817 r */
+ S_ST( 'i', 3, 819, 0 ), /* 818 rl */
+ S_ST( 'm', 3, 820, 0 ), /* 819 rli */
+ S_ST( 'i', 3, 414, 0 ), /* 820 rlim */
+ S_ST( 's', 3, 901, 786 ), /* 821 */
+ S_ST( 'a', 3, 823, 0 ), /* 822 s */
+ S_ST( 'v', 3, 824, 0 ), /* 823 sa */
+ S_ST( 'e', 3, 825, 0 ), /* 824 sav */
+ S_ST( 'c', 3, 826, 0 ), /* 825 save */
+ S_ST( 'o', 3, 827, 0 ), /* 826 savec */
+ S_ST( 'n', 3, 828, 0 ), /* 827 saveco */
+ S_ST( 'f', 3, 829, 0 ), /* 828 savecon */
+ S_ST( 'i', 3, 830, 0 ), /* 829 saveconf */
+ S_ST( 'g', 3, 831, 0 ), /* 830 saveconfi */
+ S_ST( 'd', 3, 832, 0 ), /* 831 saveconfig */
+ S_ST( 'i', 3, 415, 0 ), /* 832 saveconfigd */
+ S_ST( 'e', 3, 850, 822 ), /* 833 s */
+ S_ST( 'r', 3, 835, 0 ), /* 834 se */
+ S_ST( 'v', 3, 836, 0 ), /* 835 ser */
+ S_ST( 'e', 3, 416, 0 ), /* 836 serv */
+ S_ST( '_', 3, 838, 0 ), /* 837 server */
+ S_ST( 'o', 3, 839, 0 ), /* 838 server_ */
+ S_ST( 'f', 3, 840, 0 ), /* 839 server_o */
+ S_ST( 'f', 3, 841, 0 ), /* 840 server_of */
+ S_ST( 's', 3, 842, 0 ), /* 841 server_off */
+ S_ST( 'e', 3, 464, 0 ), /* 842 server_offs */
+ S_ST( 'r', 3, 844, 837 ), /* 843 server */
+ S_ST( 'e', 3, 845, 0 ), /* 844 serverr */
+ S_ST( 's', 3, 846, 0 ), /* 845 serverre */
+ S_ST( 'p', 3, 847, 0 ), /* 846 serverres */
+ S_ST( 'o', 3, 848, 0 ), /* 847 serverresp */
+ S_ST( 'n', 3, 849, 0 ), /* 848 serverrespo */
+ S_ST( 's', 3, 417, 0 ), /* 849 serverrespon */
+ S_ST( 't', 3, 851, 834 ), /* 850 se */
+ S_ST( 'v', 3, 852, 0 ), /* 851 set */
+ S_ST( 'a', 3, 419, 0 ), /* 852 setv */
+ S_ST( 'i', 3, 854, 833 ), /* 853 s */
+ S_ST( 'm', 3, 855, 0 ), /* 854 si */
+ S_ST( 'u', 3, 856, 0 ), /* 855 sim */
+ S_ST( 'l', 3, 857, 0 ), /* 856 simu */
+ S_ST( 'a', 3, 858, 0 ), /* 857 simul */
+ S_ST( 't', 3, 859, 0 ), /* 858 simula */
+ S_ST( 'i', 3, 860, 461 ), /* 859 simulat */
+ S_ST( 'o', 3, 861, 0 ), /* 860 simulati */
+ S_ST( 'n', 3, 862, 0 ), /* 861 simulatio */
+ S_ST( '_', 3, 863, 0 ), /* 862 simulation */
+ S_ST( 'd', 3, 864, 0 ), /* 863 simulation_ */
+ S_ST( 'u', 3, 865, 0 ), /* 864 simulation_d */
+ S_ST( 'r', 3, 866, 0 ), /* 865 simulation_du */
+ S_ST( 'a', 3, 867, 0 ), /* 866 simulation_dur */
+ S_ST( 't', 3, 868, 0 ), /* 867 simulation_dura */
+ S_ST( 'i', 3, 869, 0 ), /* 868 simulation_durat */
+ S_ST( 'o', 3, 463, 0 ), /* 869 simulation_durati */
+ S_ST( 'o', 3, 871, 853 ), /* 870 s */
+ S_ST( 'u', 3, 872, 0 ), /* 871 so */
+ S_ST( 'r', 3, 873, 0 ), /* 872 sou */
+ S_ST( 'c', 3, 420, 0 ), /* 873 sour */
+ S_ST( 't', 3, 897, 870 ), /* 874 s */
+ S_ST( 'a', 3, 881, 0 ), /* 875 st */
+ S_ST( 'c', 3, 877, 0 ), /* 876 sta */
+ S_ST( 'k', 3, 878, 0 ), /* 877 stac */
+ S_ST( 's', 3, 879, 0 ), /* 878 stack */
+ S_ST( 'i', 3, 880, 0 ), /* 879 stacks */
+ S_ST( 'z', 3, 421, 0 ), /* 880 stacksi */
+ S_ST( 't', 3, 423, 876 ), /* 881 sta */
+ S_ST( 'i', 3, 883, 0 ), /* 882 stat */
+ S_ST( 's', 3, 884, 0 ), /* 883 stati */
+ S_ST( 't', 3, 885, 0 ), /* 884 statis */
+ S_ST( 'i', 3, 886, 0 ), /* 885 statist */
+ S_ST( 'c', 3, 422, 0 ), /* 886 statisti */
+ S_ST( 'd', 3, 888, 0 ), /* 887 stats */
+ S_ST( 'i', 3, 424, 0 ), /* 888 statsd */
+ S_ST( 'e', 3, 425, 875 ), /* 889 st */
+ S_ST( 'b', 3, 891, 0 ), /* 890 step */
+ S_ST( 'a', 3, 892, 0 ), /* 891 stepb */
+ S_ST( 'c', 3, 426, 0 ), /* 892 stepba */
+ S_ST( 'f', 3, 894, 890 ), /* 893 step */
+ S_ST( 'w', 3, 427, 0 ), /* 894 stepf */
+ S_ST( 'o', 3, 896, 893 ), /* 895 step */
+ S_ST( 'u', 3, 428, 0 ), /* 896 stepo */
+ S_ST( 'r', 3, 898, 889 ), /* 897 st */
+ S_ST( 'a', 3, 899, 0 ), /* 898 str */
+ S_ST( 't', 3, 900, 0 ), /* 899 stra */
+ S_ST( 'u', 3, 429, 0 ), /* 900 strat */
+ S_ST( 'y', 3, 431, 874 ), /* 901 s */
+ S_ST( 's', 3, 903, 0 ), /* 902 sys */
+ S_ST( 't', 3, 904, 0 ), /* 903 syss */
+ S_ST( 'a', 3, 905, 0 ), /* 904 sysst */
+ S_ST( 't', 3, 432, 0 ), /* 905 syssta */
+ S_ST( 't', 3, 935, 821 ), /* 906 */
+ S_ST( 'i', 3, 921, 0 ), /* 907 t */
+ S_ST( 'c', 3, 433, 0 ), /* 908 ti */
+ S_ST( 'm', 3, 914, 908 ), /* 909 ti */
+ S_ST( 'e', 3, 437, 0 ), /* 910 tim */
+ S_ST( 'd', 3, 912, 435 ), /* 911 time */
+ S_ST( 'a', 3, 913, 0 ), /* 912 timed */
+ S_ST( 't', 3, 436, 0 ), /* 913 timeda */
+ S_ST( 'i', 3, 915, 910 ), /* 914 tim */
+ S_ST( 'n', 3, 916, 0 ), /* 915 timi */
+ S_ST( 'g', 3, 917, 0 ), /* 916 timin */
+ S_ST( 's', 3, 918, 0 ), /* 917 timing */
+ S_ST( 't', 3, 919, 0 ), /* 918 timings */
+ S_ST( 'a', 3, 920, 0 ), /* 919 timingst */
+ S_ST( 't', 3, 438, 0 ), /* 920 timingsta */
+ S_ST( 'n', 3, 922, 909 ), /* 921 ti */
+ S_ST( 'k', 3, 923, 0 ), /* 922 tin */
+ S_ST( 'e', 3, 439, 0 ), /* 923 tink */
+ S_ST( 'o', 3, 440, 907 ), /* 924 t */
+ S_ST( 'r', 3, 927, 924 ), /* 925 t */
+ S_ST( 'a', 3, 441, 0 ), /* 926 tr */
+ S_ST( 'u', 3, 928, 926 ), /* 927 tr */
+ S_ST( 's', 3, 929, 442 ), /* 928 tru */
+ S_ST( 't', 3, 930, 0 ), /* 929 trus */
+ S_ST( 'e', 3, 931, 0 ), /* 930 trust */
+ S_ST( 'd', 3, 932, 0 ), /* 931 truste */
+ S_ST( 'k', 3, 933, 0 ), /* 932 trusted */
+ S_ST( 'e', 3, 443, 0 ), /* 933 trustedk */
+ S_ST( 't', 3, 444, 925 ), /* 934 t */
+ S_ST( 'y', 3, 936, 934 ), /* 935 t */
+ S_ST( 'p', 3, 445, 0 ), /* 936 ty */
+ S_ST( 'u', 3, 938, 906 ), /* 937 */
+ S_ST( 'n', 3, 944, 0 ), /* 938 u */
+ S_ST( 'c', 3, 940, 0 ), /* 939 un */
+ S_ST( 'o', 3, 941, 0 ), /* 940 unc */
+ S_ST( 'n', 3, 942, 0 ), /* 941 unco */
+ S_ST( 'f', 3, 943, 0 ), /* 942 uncon */
+ S_ST( 'i', 3, 450, 0 ), /* 943 unconf */
+ S_ST( 'p', 3, 945, 939 ), /* 944 un */
+ S_ST( 'e', 3, 946, 0 ), /* 945 unp */
+ S_ST( 'e', 3, 451, 0 ), /* 946 unpe */
+ S_ST( '_', 3, 967, 0 ), /* 947 unpeer */
+ S_ST( 'c', 3, 949, 0 ), /* 948 unpeer_ */
+ S_ST( 'r', 3, 950, 0 ), /* 949 unpeer_c */
+ S_ST( 'y', 3, 951, 0 ), /* 950 unpeer_cr */
+ S_ST( 'p', 3, 952, 0 ), /* 951 unpeer_cry */
+ S_ST( 't', 3, 953, 0 ), /* 952 unpeer_cryp */
+ S_ST( 'o', 3, 954, 0 ), /* 953 unpeer_crypt */
+ S_ST( '_', 3, 959, 0 ), /* 954 unpeer_crypto */
+ S_ST( 'e', 3, 956, 0 ), /* 955 unpeer_crypto_ */
+ S_ST( 'a', 3, 957, 0 ), /* 956 unpeer_crypto_e */
+ S_ST( 'r', 3, 958, 0 ), /* 957 unpeer_crypto_ea */
+ S_ST( 'l', 3, 447, 0 ), /* 958 unpeer_crypto_ear */
+ S_ST( 'n', 3, 960, 955 ), /* 959 unpeer_crypto_ */
+ S_ST( 'a', 3, 961, 0 ), /* 960 unpeer_crypto_n */
+ S_ST( 'k', 3, 962, 0 ), /* 961 unpeer_crypto_na */
+ S_ST( '_', 3, 963, 0 ), /* 962 unpeer_crypto_nak */
+ S_ST( 'e', 3, 964, 0 ), /* 963 unpeer_crypto_nak_ */
+ S_ST( 'a', 3, 965, 0 ), /* 964 unpeer_crypto_nak_e */
+ S_ST( 'r', 3, 966, 0 ), /* 965 unpeer_crypto_nak_ea */
+ S_ST( 'l', 3, 448, 0 ), /* 966 unpeer_crypto_nak_ear */
+ S_ST( 'd', 3, 968, 948 ), /* 967 unpeer_ */
+ S_ST( 'i', 3, 969, 0 ), /* 968 unpeer_d */
+ S_ST( 'g', 3, 970, 0 ), /* 969 unpeer_di */
+ S_ST( 'e', 3, 971, 0 ), /* 970 unpeer_dig */
+ S_ST( 's', 3, 972, 0 ), /* 971 unpeer_dige */
+ S_ST( 't', 3, 973, 0 ), /* 972 unpeer_diges */
+ S_ST( '_', 3, 974, 0 ), /* 973 unpeer_digest */
+ S_ST( 'e', 3, 975, 0 ), /* 974 unpeer_digest_ */
+ S_ST( 'a', 3, 976, 0 ), /* 975 unpeer_digest_e */
+ S_ST( 'r', 3, 977, 0 ), /* 976 unpeer_digest_ea */
+ S_ST( 'l', 3, 449, 0 ), /* 977 unpeer_digest_ear */
+ S_ST( 'v', 3, 979, 937 ), /* 978 */
+ S_ST( 'e', 3, 980, 0 ), /* 979 v */
+ S_ST( 'r', 3, 981, 0 ), /* 980 ve */
+ S_ST( 's', 3, 982, 0 ), /* 981 ver */
+ S_ST( 'i', 3, 983, 0 ), /* 982 vers */
+ S_ST( 'o', 3, 452, 0 ), /* 983 versi */
+ S_ST( 'w', 3, 991, 978 ), /* 984 */
+ S_ST( 'a', 3, 986, 0 ), /* 985 w */
+ S_ST( 'n', 3, 987, 0 ), /* 986 wa */
+ S_ST( 'd', 3, 988, 0 ), /* 987 wan */
+ S_ST( 'e', 3, 467, 0 ), /* 988 wand */
+ S_ST( 'e', 3, 990, 985 ), /* 989 w */
+ S_ST( 'e', 3, 454, 0 ), /* 990 we */
+ S_ST( 'i', 3, 992, 989 ), /* 991 w */
+ S_ST( 'l', 3, 993, 0 ), /* 992 wi */
+ S_ST( 'd', 3, 994, 0 ), /* 993 wil */
+ S_ST( 'c', 3, 995, 0 ), /* 994 wild */
+ S_ST( 'a', 3, 996, 0 ), /* 995 wildc */
+ S_ST( 'r', 3, 455, 0 ), /* 996 wildca */
+ S_ST( 'x', 3, 1002, 984 ), /* 997 */
+ S_ST( 'l', 3, 999, 0 ), /* 998 x */
+ S_ST( 'e', 3, 1000, 0 ), /* 999 xl */
+ S_ST( 'a', 3, 1001, 0 ), /* 1000 xle */
+ S_ST( 'v', 3, 456, 0 ), /* 1001 xlea */
+ S_ST( 'm', 3, 1003, 998 ), /* 1002 x */
+ S_ST( 't', 3, 1004, 0 ), /* 1003 xm */
+ S_ST( 'n', 3, 1005, 0 ), /* 1004 xmt */
+ S_ST( 'o', 3, 1006, 0 ), /* 1005 xmtn */
+ S_ST( 'n', 3, 1007, 0 ), /* 1006 xmtno */
+ S_ST( 'c', 3, 457, 0 ), /* 1007 xmtnon */
+ S_ST( 'y', 3, 1009, 997 ), /* 1008 [initial state] */
+ S_ST( 'e', 3, 1010, 0 ), /* 1009 y */
+ S_ST( 'a', 3, 458, 0 ) /* 1010 ye */
};
diff --git a/contrib/ntp/ntpd/ntp_leapsec.c b/contrib/ntp/ntpd/ntp_leapsec.c
index 88f9d4e1cc23..2618862c57ba 100644
--- a/contrib/ntp/ntpd/ntp_leapsec.c
+++ b/contrib/ntp/ntpd/ntp_leapsec.c
@@ -13,39 +13,17 @@
#include <sys/stat.h>
#include <ctype.h>
-#include "ntp_types.h"
-#include "ntp_fp.h"
+#include "ntp.h"
#include "ntp_stdlib.h"
#include "ntp_calendar.h"
#include "ntp_leapsec.h"
-#include "ntp.h"
#include "vint64ops.h"
-#include "lib_strbuf.h"
#include "isc/sha1.h"
static const char * const logPrefix = "leapsecond file";
/* ---------------------------------------------------------------------
- * GCC is rather sticky with its 'const' attribute. We have to do it more
- * explicit than with a cast if we want to get rid of a CONST qualifier.
- * Greetings from the PASCAL world, where casting was only possible via
- * untagged unions...
- */
-static inline void*
-noconst(
- const void* ptr
- )
-{
- union {
- const void * cp;
- void * vp;
- } tmp;
- tmp.cp = ptr;
- return tmp.vp;
-}
-
-/* ---------------------------------------------------------------------
* Our internal data structure
*/
#define MAX_HIST 10 /* history of leap seconds */
@@ -84,18 +62,20 @@ static leap_table_t _ltab[2], *_lptr;
static int/*BOOL*/ _electric;
/* Forward decls of local helpers */
-static int add_range(leap_table_t*, const leap_info_t*);
-static char * get_line(leapsec_reader, void*, char*, size_t);
-static char * skipws(const char*);
-static int parsefail(const char * cp, const char * ep);
-static void reload_limits(leap_table_t*, const vint64*);
-static void fetch_leap_era(leap_era_t*, const leap_table_t*,
- const vint64*);
-static int betweenu32(uint32_t, uint32_t, uint32_t);
-static void reset_times(leap_table_t*);
-static int leapsec_add(leap_table_t*, const vint64*, int);
-static int leapsec_raw(leap_table_t*, const vint64 *, int, int);
-static const char * lstostr(const vint64 * ts);
+static int add_range (leap_table_t *, const leap_info_t *);
+static char * get_line (leapsec_reader, void *, char *,
+ size_t);
+static inline char * skipws (char *ptr);
+static int parsefail (const char *cp, const char *ep);
+static void reload_limits (leap_table_t *, const vint64 *);
+static void fetch_leap_era (leap_era_t *, const leap_table_t *,
+ const vint64 *);
+static int betweenu32 (u_int32, u_int32, u_int32);
+static void reset_times (leap_table_t *);
+static int leapsec_add (leap_table_t *, const vint64 *, int);
+static int leapsec_raw (leap_table_t *, const vint64 *, int,
+ int);
+static const char * lstostr (const vint64 *ts);
/* =====================================================================
* Get & Set the current leap table
@@ -178,13 +158,13 @@ leapsec_clear(
*/
int/*BOOL*/
leapsec_load(
- leap_table_t * pt ,
- leapsec_reader func,
- void * farg,
- int use_build_limit)
+ leap_table_t * pt,
+ leapsec_reader func,
+ void * farg,
+ int use_build_limit
+ )
{
- char const *ep;
- char *cp, *endp, linebuf[50];
+ char *cp, *ep, *endp, linebuf[50];
vint64 ttime, limit;
long taiof;
struct calendar build;
@@ -415,7 +395,7 @@ leapsec_reset_frame(void)
}
/* ------------------------------------------------------------------ */
-/* load a file from a FILE pointer. Note: If hcheck is true, load
+/* load a file from a FILE pointer. Note: If vhash is true, load
* only after successful signature check. The stream must be seekable
* or this will fail.
*/
@@ -433,7 +413,7 @@ leapsec_load_stream(
fname = "<unknown>";
if (vhash) {
- rcheck = leapsec_validate((leapsec_reader)getc, ifp);
+ rcheck = leapsec_validate((leapsec_reader)&getc, ifp);
if (logall)
switch (rcheck)
{
@@ -822,13 +802,15 @@ get_line(
}
/* [internal] skips whitespace characters from a character buffer. */
-static char *
+static inline char *
skipws(
- const char *ptr)
+ char * ptr
+ )
{
- while (isspace((u_char)*ptr))
+ while (isspace((u_char)*ptr)) {
ptr++;
- return (char*)noconst(ptr);
+ }
+ return ptr;
}
/* [internal] check if a strtoXYZ ended at EOL or whitespace and
@@ -887,7 +869,7 @@ reload_limits(
if (_electric)
pt->head.dtime = pt->head.ttime;
- else
+ else
pt->head.dtime = addv64i32(
&pt->head.ttime,
pt->head.next_tai - pt->head.this_tai);
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index e76e4dce0711..6378e0d7e669 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -1027,6 +1027,22 @@ rstclock(
tc_counter));
if (trans != state && trans != EVNT_FSET)
report_event(trans, NULL, NULL);
+#ifdef HAVE_WORKING_FORK
+ if (trans != state && EVNT_SYNC == trans) {
+ /*
+ * If our parent process is waiting for the
+ * first clock sync, send them home satisfied.
+ */
+ if (daemon_pipe[1] != -1) {
+ if (2 != write(daemon_pipe[1], "S\n", 2)) {
+ msyslog(LOG_ERR, "daemon failed to notify parent ntpd (--wait-sync)");
+ }
+ close(daemon_pipe[1]);
+ daemon_pipe[1] = -1;
+ }
+ }
+#endif /* HAVE_WORKING_FORK */
+
state = trans;
last_offset = clock_offset = offset;
clock_epoch = current_time;
diff --git a/contrib/ntp/ntpd/ntp_monitor.c b/contrib/ntp/ntpd/ntp_monitor.c
index b3db452a243e..8af8dff301c4 100644
--- a/contrib/ntp/ntpd/ntp_monitor.c
+++ b/contrib/ntp/ntpd/ntp_monitor.c
@@ -329,9 +329,9 @@ ntp_monitor(
REQUIRE(rbufp != NULL);
- if (mon_enabled == MON_OFF)
+ if (mon_enabled == MON_OFF) {
return ~(RES_LIMITED | RES_KOD) & flags;
-
+ }
pkt = &rbufp->recv_pkt;
hash = MON_HASH(&rbufp->recv_srcadr);
mode = PKT_MODE(pkt->li_vn_mode);
@@ -343,10 +343,11 @@ ntp_monitor(
* otherwise cron'ed ntpdate or similar evades RES_LIMITED.
*/
- for (; mon != NULL; mon = mon->hash_next)
- if (SOCK_EQ(&mon->rmtadr, &rbufp->recv_srcadr))
+ for (; mon != NULL; mon = mon->hash_next) {
+ if (SOCK_EQ(&mon->rmtadr, &rbufp->recv_srcadr)) {
break;
-
+ }
+ }
if (mon != NULL) {
interval_fp = rbufp->recv_time;
L_SUB(&interval_fp, &mon->last);
@@ -388,17 +389,17 @@ ntp_monitor(
* the average threshold plus the increment and leave
* the RES_LIMITED and RES_KOD bits lit. Otherwise,
* leave the counter alone and douse the RES_KOD bit.
- * This rate-limits the KoDs to no less than the average
- * headway.
+ * This rate-limits the KoDs to no more often than the
+ * average headway.
*/
if (interval + 1 >= ntp_minpkt && leak < limit) {
mon->leak = leak - 2;
restrict_mask &= ~(RES_LIMITED | RES_KOD);
- } else if (mon->leak < limit)
+ } else if (mon->leak < limit) {
mon->leak = limit + head;
- else
+ } else {
restrict_mask &= ~RES_KOD;
-
+ }
mon->flags = restrict_mask;
return mon->flags;
diff --git a/contrib/ntp/ntpd/ntp_parser.c b/contrib/ntp/ntpd/ntp_parser.c
index 834b1fbd1acc..e5ee5e10a459 100644
--- a/contrib/ntp/ntpd/ntp_parser.c
+++ b/contrib/ntp/ntpd/ntp_parser.c
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 3.7.6. */
+/* A Bison parser, made by GNU Bison 3.8.2. */
/* Bison implementation for Yacc-like parsers in C
@@ -46,10 +46,10 @@
USER NAME SPACE" below. */
/* Identify Bison output, and Bison version. */
-#define YYBISON 30706
+#define YYBISON 30802
/* Bison version string. */
-#define YYBISON_VERSION "3.7.6"
+#define YYBISON_VERSION "3.8.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -67,7 +67,7 @@
/* First part of user prologue. */
-#line 11 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 11 "../../ntpd/ntp_parser.y"
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -102,7 +102,7 @@
# define ONLY_SIM(a) NULL
#endif
-#line 106 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 106 "ntp_parser.c"
# ifndef YY_CAST
# ifdef __cplusplus
@@ -127,8 +127,8 @@
/* Use api.header.include to #include this header
instead of duplicating it here. */
-#ifndef YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
-# define YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
+#ifndef YY_YY_NTP_PARSER_H_INCLUDED
+# define YY_YY_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -174,190 +174,191 @@ extern int yydebug;
T_Ctl = 283, /* T_Ctl */
T_Day = 284, /* T_Day */
T_Default = 285, /* T_Default */
- T_Device = 286, /* T_Device */
- T_Digest = 287, /* T_Digest */
- T_Disable = 288, /* T_Disable */
- T_Discard = 289, /* T_Discard */
- T_Dispersion = 290, /* T_Dispersion */
- T_Double = 291, /* T_Double */
- T_Driftfile = 292, /* T_Driftfile */
- T_Drop = 293, /* T_Drop */
- T_Dscp = 294, /* T_Dscp */
- T_Ellipsis = 295, /* T_Ellipsis */
- T_Enable = 296, /* T_Enable */
- T_End = 297, /* T_End */
- T_Epeer = 298, /* T_Epeer */
- T_False = 299, /* T_False */
- T_File = 300, /* T_File */
- T_Filegen = 301, /* T_Filegen */
- T_Filenum = 302, /* T_Filenum */
- T_Flag1 = 303, /* T_Flag1 */
- T_Flag2 = 304, /* T_Flag2 */
- T_Flag3 = 305, /* T_Flag3 */
- T_Flag4 = 306, /* T_Flag4 */
- T_Flake = 307, /* T_Flake */
- T_Floor = 308, /* T_Floor */
- T_Freq = 309, /* T_Freq */
- T_Fudge = 310, /* T_Fudge */
- T_Fuzz = 311, /* T_Fuzz */
- T_Host = 312, /* T_Host */
- T_Huffpuff = 313, /* T_Huffpuff */
- T_Iburst = 314, /* T_Iburst */
- T_Ident = 315, /* T_Ident */
- T_Ignore = 316, /* T_Ignore */
- T_Ignorehash = 317, /* T_Ignorehash */
- T_Incalloc = 318, /* T_Incalloc */
- T_Incmem = 319, /* T_Incmem */
- T_Initalloc = 320, /* T_Initalloc */
- T_Initmem = 321, /* T_Initmem */
- T_Includefile = 322, /* T_Includefile */
- T_Integer = 323, /* T_Integer */
- T_Interface = 324, /* T_Interface */
- T_Intrange = 325, /* T_Intrange */
- T_Io = 326, /* T_Io */
- T_Ippeerlimit = 327, /* T_Ippeerlimit */
- T_Ipv4 = 328, /* T_Ipv4 */
- T_Ipv4_flag = 329, /* T_Ipv4_flag */
- T_Ipv6 = 330, /* T_Ipv6 */
- T_Ipv6_flag = 331, /* T_Ipv6_flag */
- T_Kernel = 332, /* T_Kernel */
- T_Key = 333, /* T_Key */
- T_Keys = 334, /* T_Keys */
- T_Keysdir = 335, /* T_Keysdir */
- T_Kod = 336, /* T_Kod */
- T_Leapfile = 337, /* T_Leapfile */
- T_Leapsmearinterval = 338, /* T_Leapsmearinterval */
- T_Limited = 339, /* T_Limited */
- T_Link = 340, /* T_Link */
- T_Listen = 341, /* T_Listen */
- T_Logconfig = 342, /* T_Logconfig */
- T_Logfile = 343, /* T_Logfile */
- T_Loopstats = 344, /* T_Loopstats */
- T_Lowpriotrap = 345, /* T_Lowpriotrap */
- T_Manycastclient = 346, /* T_Manycastclient */
- T_Manycastserver = 347, /* T_Manycastserver */
- T_Mask = 348, /* T_Mask */
- T_Maxage = 349, /* T_Maxage */
- T_Maxclock = 350, /* T_Maxclock */
- T_Maxdepth = 351, /* T_Maxdepth */
- T_Maxdist = 352, /* T_Maxdist */
- T_Maxmem = 353, /* T_Maxmem */
- T_Maxpoll = 354, /* T_Maxpoll */
- T_Mdnstries = 355, /* T_Mdnstries */
- T_Mem = 356, /* T_Mem */
- T_Memlock = 357, /* T_Memlock */
- T_Minclock = 358, /* T_Minclock */
- T_Mindepth = 359, /* T_Mindepth */
- T_Mindist = 360, /* T_Mindist */
- T_Minimum = 361, /* T_Minimum */
- T_Minjitter = 362, /* T_Minjitter */
- T_Minpoll = 363, /* T_Minpoll */
- T_Minsane = 364, /* T_Minsane */
- T_Mode = 365, /* T_Mode */
- T_Mode7 = 366, /* T_Mode7 */
- T_Monitor = 367, /* T_Monitor */
- T_Month = 368, /* T_Month */
- T_Mru = 369, /* T_Mru */
- T_Mssntp = 370, /* T_Mssntp */
- T_Multicastclient = 371, /* T_Multicastclient */
- T_Nic = 372, /* T_Nic */
- T_Nolink = 373, /* T_Nolink */
- T_Nomodify = 374, /* T_Nomodify */
- T_Nomrulist = 375, /* T_Nomrulist */
- T_None = 376, /* T_None */
- T_Nonvolatile = 377, /* T_Nonvolatile */
- T_Noepeer = 378, /* T_Noepeer */
- T_Nopeer = 379, /* T_Nopeer */
- T_Noquery = 380, /* T_Noquery */
- T_Noselect = 381, /* T_Noselect */
- T_Noserve = 382, /* T_Noserve */
- T_Notrap = 383, /* T_Notrap */
- T_Notrust = 384, /* T_Notrust */
- T_Ntp = 385, /* T_Ntp */
- T_Ntpport = 386, /* T_Ntpport */
- T_NtpSignDsocket = 387, /* T_NtpSignDsocket */
- T_Orphan = 388, /* T_Orphan */
- T_Orphanwait = 389, /* T_Orphanwait */
- T_PCEdigest = 390, /* T_PCEdigest */
- T_Panic = 391, /* T_Panic */
- T_Peer = 392, /* T_Peer */
- T_Peerstats = 393, /* T_Peerstats */
- T_Phone = 394, /* T_Phone */
- T_Pid = 395, /* T_Pid */
- T_Pidfile = 396, /* T_Pidfile */
- T_Poll = 397, /* T_Poll */
- T_PollSkewList = 398, /* T_PollSkewList */
- T_Pool = 399, /* T_Pool */
- T_Port = 400, /* T_Port */
- T_PpsData = 401, /* T_PpsData */
- T_Preempt = 402, /* T_Preempt */
- T_Prefer = 403, /* T_Prefer */
- T_Protostats = 404, /* T_Protostats */
- T_Pw = 405, /* T_Pw */
- T_Randfile = 406, /* T_Randfile */
- T_Rawstats = 407, /* T_Rawstats */
- T_Refid = 408, /* T_Refid */
- T_Requestkey = 409, /* T_Requestkey */
- T_Reset = 410, /* T_Reset */
- T_Restrict = 411, /* T_Restrict */
- T_Revoke = 412, /* T_Revoke */
- T_Rlimit = 413, /* T_Rlimit */
- T_Saveconfigdir = 414, /* T_Saveconfigdir */
- T_Server = 415, /* T_Server */
- T_Serverresponse = 416, /* T_Serverresponse */
- T_ServerresponseFuzz = 417, /* T_ServerresponseFuzz */
- T_Setvar = 418, /* T_Setvar */
- T_Source = 419, /* T_Source */
- T_Stacksize = 420, /* T_Stacksize */
- T_Statistics = 421, /* T_Statistics */
- T_Stats = 422, /* T_Stats */
- T_Statsdir = 423, /* T_Statsdir */
- T_Step = 424, /* T_Step */
- T_Stepback = 425, /* T_Stepback */
- T_Stepfwd = 426, /* T_Stepfwd */
- T_Stepout = 427, /* T_Stepout */
- T_Stratum = 428, /* T_Stratum */
- T_String = 429, /* T_String */
- T_Sys = 430, /* T_Sys */
- T_Sysstats = 431, /* T_Sysstats */
- T_Tick = 432, /* T_Tick */
- T_Time1 = 433, /* T_Time1 */
- T_Time2 = 434, /* T_Time2 */
- T_TimeData = 435, /* T_TimeData */
- T_Timer = 436, /* T_Timer */
- T_Timingstats = 437, /* T_Timingstats */
- T_Tinker = 438, /* T_Tinker */
- T_Tos = 439, /* T_Tos */
- T_Trap = 440, /* T_Trap */
- T_True = 441, /* T_True */
- T_Trustedkey = 442, /* T_Trustedkey */
- T_Ttl = 443, /* T_Ttl */
- T_Type = 444, /* T_Type */
- T_U_int = 445, /* T_U_int */
- T_UEcrypto = 446, /* T_UEcrypto */
- T_UEcryptonak = 447, /* T_UEcryptonak */
- T_UEdigest = 448, /* T_UEdigest */
- T_Unconfig = 449, /* T_Unconfig */
- T_Unpeer = 450, /* T_Unpeer */
- T_Version = 451, /* T_Version */
- T_WanderThreshold = 452, /* T_WanderThreshold */
- T_Week = 453, /* T_Week */
- T_Wildcard = 454, /* T_Wildcard */
- T_Xleave = 455, /* T_Xleave */
- T_Xmtnonce = 456, /* T_Xmtnonce */
- T_Year = 457, /* T_Year */
- T_Flag = 458, /* T_Flag */
- T_EOC = 459, /* T_EOC */
- T_Simulate = 460, /* T_Simulate */
- T_Beep_Delay = 461, /* T_Beep_Delay */
- T_Sim_Duration = 462, /* T_Sim_Duration */
- T_Server_Offset = 463, /* T_Server_Offset */
- T_Duration = 464, /* T_Duration */
- T_Freq_Offset = 465, /* T_Freq_Offset */
- T_Wander = 466, /* T_Wander */
- T_Jitter = 467, /* T_Jitter */
- T_Prop_Delay = 468, /* T_Prop_Delay */
- T_Proc_Delay = 469 /* T_Proc_Delay */
+ T_Delrestrict = 286, /* T_Delrestrict */
+ T_Device = 287, /* T_Device */
+ T_Digest = 288, /* T_Digest */
+ T_Disable = 289, /* T_Disable */
+ T_Discard = 290, /* T_Discard */
+ T_Dispersion = 291, /* T_Dispersion */
+ T_Double = 292, /* T_Double */
+ T_Driftfile = 293, /* T_Driftfile */
+ T_Drop = 294, /* T_Drop */
+ T_Dscp = 295, /* T_Dscp */
+ T_Ellipsis = 296, /* T_Ellipsis */
+ T_Enable = 297, /* T_Enable */
+ T_End = 298, /* T_End */
+ T_Epeer = 299, /* T_Epeer */
+ T_False = 300, /* T_False */
+ T_File = 301, /* T_File */
+ T_Filegen = 302, /* T_Filegen */
+ T_Filenum = 303, /* T_Filenum */
+ T_Flag1 = 304, /* T_Flag1 */
+ T_Flag2 = 305, /* T_Flag2 */
+ T_Flag3 = 306, /* T_Flag3 */
+ T_Flag4 = 307, /* T_Flag4 */
+ T_Flake = 308, /* T_Flake */
+ T_Floor = 309, /* T_Floor */
+ T_Freq = 310, /* T_Freq */
+ T_Fudge = 311, /* T_Fudge */
+ T_Fuzz = 312, /* T_Fuzz */
+ T_Host = 313, /* T_Host */
+ T_Huffpuff = 314, /* T_Huffpuff */
+ T_Iburst = 315, /* T_Iburst */
+ T_Ident = 316, /* T_Ident */
+ T_Ignore = 317, /* T_Ignore */
+ T_Ignorehash = 318, /* T_Ignorehash */
+ T_Incalloc = 319, /* T_Incalloc */
+ T_Incmem = 320, /* T_Incmem */
+ T_Initalloc = 321, /* T_Initalloc */
+ T_Initmem = 322, /* T_Initmem */
+ T_Includefile = 323, /* T_Includefile */
+ T_Integer = 324, /* T_Integer */
+ T_Interface = 325, /* T_Interface */
+ T_Intrange = 326, /* T_Intrange */
+ T_Io = 327, /* T_Io */
+ T_Ippeerlimit = 328, /* T_Ippeerlimit */
+ T_Ipv4 = 329, /* T_Ipv4 */
+ T_Ipv4_flag = 330, /* T_Ipv4_flag */
+ T_Ipv6 = 331, /* T_Ipv6 */
+ T_Ipv6_flag = 332, /* T_Ipv6_flag */
+ T_Kernel = 333, /* T_Kernel */
+ T_Key = 334, /* T_Key */
+ T_Keys = 335, /* T_Keys */
+ T_Keysdir = 336, /* T_Keysdir */
+ T_Kod = 337, /* T_Kod */
+ T_Leapfile = 338, /* T_Leapfile */
+ T_Leapsmearinterval = 339, /* T_Leapsmearinterval */
+ T_Limited = 340, /* T_Limited */
+ T_Link = 341, /* T_Link */
+ T_Listen = 342, /* T_Listen */
+ T_Logconfig = 343, /* T_Logconfig */
+ T_Logfile = 344, /* T_Logfile */
+ T_Loopstats = 345, /* T_Loopstats */
+ T_Lowpriotrap = 346, /* T_Lowpriotrap */
+ T_Manycastclient = 347, /* T_Manycastclient */
+ T_Manycastserver = 348, /* T_Manycastserver */
+ T_Mask = 349, /* T_Mask */
+ T_Maxage = 350, /* T_Maxage */
+ T_Maxclock = 351, /* T_Maxclock */
+ T_Maxdepth = 352, /* T_Maxdepth */
+ T_Maxdist = 353, /* T_Maxdist */
+ T_Maxmem = 354, /* T_Maxmem */
+ T_Maxpoll = 355, /* T_Maxpoll */
+ T_Mdnstries = 356, /* T_Mdnstries */
+ T_Mem = 357, /* T_Mem */
+ T_Memlock = 358, /* T_Memlock */
+ T_Minclock = 359, /* T_Minclock */
+ T_Mindepth = 360, /* T_Mindepth */
+ T_Mindist = 361, /* T_Mindist */
+ T_Minimum = 362, /* T_Minimum */
+ T_Minjitter = 363, /* T_Minjitter */
+ T_Minpoll = 364, /* T_Minpoll */
+ T_Minsane = 365, /* T_Minsane */
+ T_Mode = 366, /* T_Mode */
+ T_Mode7 = 367, /* T_Mode7 */
+ T_Monitor = 368, /* T_Monitor */
+ T_Month = 369, /* T_Month */
+ T_Mru = 370, /* T_Mru */
+ T_Mssntp = 371, /* T_Mssntp */
+ T_Multicastclient = 372, /* T_Multicastclient */
+ T_Nic = 373, /* T_Nic */
+ T_Nolink = 374, /* T_Nolink */
+ T_Nomodify = 375, /* T_Nomodify */
+ T_Nomrulist = 376, /* T_Nomrulist */
+ T_None = 377, /* T_None */
+ T_Nonvolatile = 378, /* T_Nonvolatile */
+ T_Noepeer = 379, /* T_Noepeer */
+ T_Nopeer = 380, /* T_Nopeer */
+ T_Noquery = 381, /* T_Noquery */
+ T_Noselect = 382, /* T_Noselect */
+ T_Noserve = 383, /* T_Noserve */
+ T_Notrap = 384, /* T_Notrap */
+ T_Notrust = 385, /* T_Notrust */
+ T_Ntp = 386, /* T_Ntp */
+ T_Ntpport = 387, /* T_Ntpport */
+ T_NtpSignDsocket = 388, /* T_NtpSignDsocket */
+ T_Orphan = 389, /* T_Orphan */
+ T_Orphanwait = 390, /* T_Orphanwait */
+ T_PCEdigest = 391, /* T_PCEdigest */
+ T_Panic = 392, /* T_Panic */
+ T_Peer = 393, /* T_Peer */
+ T_Peerstats = 394, /* T_Peerstats */
+ T_Phone = 395, /* T_Phone */
+ T_Pid = 396, /* T_Pid */
+ T_Pidfile = 397, /* T_Pidfile */
+ T_Poll = 398, /* T_Poll */
+ T_PollSkewList = 399, /* T_PollSkewList */
+ T_Pool = 400, /* T_Pool */
+ T_Port = 401, /* T_Port */
+ T_PpsData = 402, /* T_PpsData */
+ T_Preempt = 403, /* T_Preempt */
+ T_Prefer = 404, /* T_Prefer */
+ T_Protostats = 405, /* T_Protostats */
+ T_Pw = 406, /* T_Pw */
+ T_Randfile = 407, /* T_Randfile */
+ T_Rawstats = 408, /* T_Rawstats */
+ T_Refid = 409, /* T_Refid */
+ T_Requestkey = 410, /* T_Requestkey */
+ T_Reset = 411, /* T_Reset */
+ T_Restrict = 412, /* T_Restrict */
+ T_Revoke = 413, /* T_Revoke */
+ T_Rlimit = 414, /* T_Rlimit */
+ T_Saveconfigdir = 415, /* T_Saveconfigdir */
+ T_Server = 416, /* T_Server */
+ T_Serverresponse = 417, /* T_Serverresponse */
+ T_ServerresponseFuzz = 418, /* T_ServerresponseFuzz */
+ T_Setvar = 419, /* T_Setvar */
+ T_Source = 420, /* T_Source */
+ T_Stacksize = 421, /* T_Stacksize */
+ T_Statistics = 422, /* T_Statistics */
+ T_Stats = 423, /* T_Stats */
+ T_Statsdir = 424, /* T_Statsdir */
+ T_Step = 425, /* T_Step */
+ T_Stepback = 426, /* T_Stepback */
+ T_Stepfwd = 427, /* T_Stepfwd */
+ T_Stepout = 428, /* T_Stepout */
+ T_Stratum = 429, /* T_Stratum */
+ T_String = 430, /* T_String */
+ T_Sys = 431, /* T_Sys */
+ T_Sysstats = 432, /* T_Sysstats */
+ T_Tick = 433, /* T_Tick */
+ T_Time1 = 434, /* T_Time1 */
+ T_Time2 = 435, /* T_Time2 */
+ T_TimeData = 436, /* T_TimeData */
+ T_Timer = 437, /* T_Timer */
+ T_Timingstats = 438, /* T_Timingstats */
+ T_Tinker = 439, /* T_Tinker */
+ T_Tos = 440, /* T_Tos */
+ T_Trap = 441, /* T_Trap */
+ T_True = 442, /* T_True */
+ T_Trustedkey = 443, /* T_Trustedkey */
+ T_Ttl = 444, /* T_Ttl */
+ T_Type = 445, /* T_Type */
+ T_U_int = 446, /* T_U_int */
+ T_UEcrypto = 447, /* T_UEcrypto */
+ T_UEcryptonak = 448, /* T_UEcryptonak */
+ T_UEdigest = 449, /* T_UEdigest */
+ T_Unconfig = 450, /* T_Unconfig */
+ T_Unpeer = 451, /* T_Unpeer */
+ T_Version = 452, /* T_Version */
+ T_WanderThreshold = 453, /* T_WanderThreshold */
+ T_Week = 454, /* T_Week */
+ T_Wildcard = 455, /* T_Wildcard */
+ T_Xleave = 456, /* T_Xleave */
+ T_Xmtnonce = 457, /* T_Xmtnonce */
+ T_Year = 458, /* T_Year */
+ T_Flag = 459, /* T_Flag */
+ T_EOC = 460, /* T_EOC */
+ T_Simulate = 461, /* T_Simulate */
+ T_Beep_Delay = 462, /* T_Beep_Delay */
+ T_Sim_Duration = 463, /* T_Sim_Duration */
+ T_Server_Offset = 464, /* T_Server_Offset */
+ T_Duration = 465, /* T_Duration */
+ T_Freq_Offset = 466, /* T_Freq_Offset */
+ T_Wander = 467, /* T_Wander */
+ T_Jitter = 468, /* T_Jitter */
+ T_Prop_Delay = 469, /* T_Prop_Delay */
+ T_Proc_Delay = 470 /* T_Proc_Delay */
};
typedef enum yytokentype yytoken_kind_t;
#endif
@@ -394,196 +395,197 @@ extern int yydebug;
#define T_Ctl 283
#define T_Day 284
#define T_Default 285
-#define T_Device 286
-#define T_Digest 287
-#define T_Disable 288
-#define T_Discard 289
-#define T_Dispersion 290
-#define T_Double 291
-#define T_Driftfile 292
-#define T_Drop 293
-#define T_Dscp 294
-#define T_Ellipsis 295
-#define T_Enable 296
-#define T_End 297
-#define T_Epeer 298
-#define T_False 299
-#define T_File 300
-#define T_Filegen 301
-#define T_Filenum 302
-#define T_Flag1 303
-#define T_Flag2 304
-#define T_Flag3 305
-#define T_Flag4 306
-#define T_Flake 307
-#define T_Floor 308
-#define T_Freq 309
-#define T_Fudge 310
-#define T_Fuzz 311
-#define T_Host 312
-#define T_Huffpuff 313
-#define T_Iburst 314
-#define T_Ident 315
-#define T_Ignore 316
-#define T_Ignorehash 317
-#define T_Incalloc 318
-#define T_Incmem 319
-#define T_Initalloc 320
-#define T_Initmem 321
-#define T_Includefile 322
-#define T_Integer 323
-#define T_Interface 324
-#define T_Intrange 325
-#define T_Io 326
-#define T_Ippeerlimit 327
-#define T_Ipv4 328
-#define T_Ipv4_flag 329
-#define T_Ipv6 330
-#define T_Ipv6_flag 331
-#define T_Kernel 332
-#define T_Key 333
-#define T_Keys 334
-#define T_Keysdir 335
-#define T_Kod 336
-#define T_Leapfile 337
-#define T_Leapsmearinterval 338
-#define T_Limited 339
-#define T_Link 340
-#define T_Listen 341
-#define T_Logconfig 342
-#define T_Logfile 343
-#define T_Loopstats 344
-#define T_Lowpriotrap 345
-#define T_Manycastclient 346
-#define T_Manycastserver 347
-#define T_Mask 348
-#define T_Maxage 349
-#define T_Maxclock 350
-#define T_Maxdepth 351
-#define T_Maxdist 352
-#define T_Maxmem 353
-#define T_Maxpoll 354
-#define T_Mdnstries 355
-#define T_Mem 356
-#define T_Memlock 357
-#define T_Minclock 358
-#define T_Mindepth 359
-#define T_Mindist 360
-#define T_Minimum 361
-#define T_Minjitter 362
-#define T_Minpoll 363
-#define T_Minsane 364
-#define T_Mode 365
-#define T_Mode7 366
-#define T_Monitor 367
-#define T_Month 368
-#define T_Mru 369
-#define T_Mssntp 370
-#define T_Multicastclient 371
-#define T_Nic 372
-#define T_Nolink 373
-#define T_Nomodify 374
-#define T_Nomrulist 375
-#define T_None 376
-#define T_Nonvolatile 377
-#define T_Noepeer 378
-#define T_Nopeer 379
-#define T_Noquery 380
-#define T_Noselect 381
-#define T_Noserve 382
-#define T_Notrap 383
-#define T_Notrust 384
-#define T_Ntp 385
-#define T_Ntpport 386
-#define T_NtpSignDsocket 387
-#define T_Orphan 388
-#define T_Orphanwait 389
-#define T_PCEdigest 390
-#define T_Panic 391
-#define T_Peer 392
-#define T_Peerstats 393
-#define T_Phone 394
-#define T_Pid 395
-#define T_Pidfile 396
-#define T_Poll 397
-#define T_PollSkewList 398
-#define T_Pool 399
-#define T_Port 400
-#define T_PpsData 401
-#define T_Preempt 402
-#define T_Prefer 403
-#define T_Protostats 404
-#define T_Pw 405
-#define T_Randfile 406
-#define T_Rawstats 407
-#define T_Refid 408
-#define T_Requestkey 409
-#define T_Reset 410
-#define T_Restrict 411
-#define T_Revoke 412
-#define T_Rlimit 413
-#define T_Saveconfigdir 414
-#define T_Server 415
-#define T_Serverresponse 416
-#define T_ServerresponseFuzz 417
-#define T_Setvar 418
-#define T_Source 419
-#define T_Stacksize 420
-#define T_Statistics 421
-#define T_Stats 422
-#define T_Statsdir 423
-#define T_Step 424
-#define T_Stepback 425
-#define T_Stepfwd 426
-#define T_Stepout 427
-#define T_Stratum 428
-#define T_String 429
-#define T_Sys 430
-#define T_Sysstats 431
-#define T_Tick 432
-#define T_Time1 433
-#define T_Time2 434
-#define T_TimeData 435
-#define T_Timer 436
-#define T_Timingstats 437
-#define T_Tinker 438
-#define T_Tos 439
-#define T_Trap 440
-#define T_True 441
-#define T_Trustedkey 442
-#define T_Ttl 443
-#define T_Type 444
-#define T_U_int 445
-#define T_UEcrypto 446
-#define T_UEcryptonak 447
-#define T_UEdigest 448
-#define T_Unconfig 449
-#define T_Unpeer 450
-#define T_Version 451
-#define T_WanderThreshold 452
-#define T_Week 453
-#define T_Wildcard 454
-#define T_Xleave 455
-#define T_Xmtnonce 456
-#define T_Year 457
-#define T_Flag 458
-#define T_EOC 459
-#define T_Simulate 460
-#define T_Beep_Delay 461
-#define T_Sim_Duration 462
-#define T_Server_Offset 463
-#define T_Duration 464
-#define T_Freq_Offset 465
-#define T_Wander 466
-#define T_Jitter 467
-#define T_Prop_Delay 468
-#define T_Proc_Delay 469
+#define T_Delrestrict 286
+#define T_Device 287
+#define T_Digest 288
+#define T_Disable 289
+#define T_Discard 290
+#define T_Dispersion 291
+#define T_Double 292
+#define T_Driftfile 293
+#define T_Drop 294
+#define T_Dscp 295
+#define T_Ellipsis 296
+#define T_Enable 297
+#define T_End 298
+#define T_Epeer 299
+#define T_False 300
+#define T_File 301
+#define T_Filegen 302
+#define T_Filenum 303
+#define T_Flag1 304
+#define T_Flag2 305
+#define T_Flag3 306
+#define T_Flag4 307
+#define T_Flake 308
+#define T_Floor 309
+#define T_Freq 310
+#define T_Fudge 311
+#define T_Fuzz 312
+#define T_Host 313
+#define T_Huffpuff 314
+#define T_Iburst 315
+#define T_Ident 316
+#define T_Ignore 317
+#define T_Ignorehash 318
+#define T_Incalloc 319
+#define T_Incmem 320
+#define T_Initalloc 321
+#define T_Initmem 322
+#define T_Includefile 323
+#define T_Integer 324
+#define T_Interface 325
+#define T_Intrange 326
+#define T_Io 327
+#define T_Ippeerlimit 328
+#define T_Ipv4 329
+#define T_Ipv4_flag 330
+#define T_Ipv6 331
+#define T_Ipv6_flag 332
+#define T_Kernel 333
+#define T_Key 334
+#define T_Keys 335
+#define T_Keysdir 336
+#define T_Kod 337
+#define T_Leapfile 338
+#define T_Leapsmearinterval 339
+#define T_Limited 340
+#define T_Link 341
+#define T_Listen 342
+#define T_Logconfig 343
+#define T_Logfile 344
+#define T_Loopstats 345
+#define T_Lowpriotrap 346
+#define T_Manycastclient 347
+#define T_Manycastserver 348
+#define T_Mask 349
+#define T_Maxage 350
+#define T_Maxclock 351
+#define T_Maxdepth 352
+#define T_Maxdist 353
+#define T_Maxmem 354
+#define T_Maxpoll 355
+#define T_Mdnstries 356
+#define T_Mem 357
+#define T_Memlock 358
+#define T_Minclock 359
+#define T_Mindepth 360
+#define T_Mindist 361
+#define T_Minimum 362
+#define T_Minjitter 363
+#define T_Minpoll 364
+#define T_Minsane 365
+#define T_Mode 366
+#define T_Mode7 367
+#define T_Monitor 368
+#define T_Month 369
+#define T_Mru 370
+#define T_Mssntp 371
+#define T_Multicastclient 372
+#define T_Nic 373
+#define T_Nolink 374
+#define T_Nomodify 375
+#define T_Nomrulist 376
+#define T_None 377
+#define T_Nonvolatile 378
+#define T_Noepeer 379
+#define T_Nopeer 380
+#define T_Noquery 381
+#define T_Noselect 382
+#define T_Noserve 383
+#define T_Notrap 384
+#define T_Notrust 385
+#define T_Ntp 386
+#define T_Ntpport 387
+#define T_NtpSignDsocket 388
+#define T_Orphan 389
+#define T_Orphanwait 390
+#define T_PCEdigest 391
+#define T_Panic 392
+#define T_Peer 393
+#define T_Peerstats 394
+#define T_Phone 395
+#define T_Pid 396
+#define T_Pidfile 397
+#define T_Poll 398
+#define T_PollSkewList 399
+#define T_Pool 400
+#define T_Port 401
+#define T_PpsData 402
+#define T_Preempt 403
+#define T_Prefer 404
+#define T_Protostats 405
+#define T_Pw 406
+#define T_Randfile 407
+#define T_Rawstats 408
+#define T_Refid 409
+#define T_Requestkey 410
+#define T_Reset 411
+#define T_Restrict 412
+#define T_Revoke 413
+#define T_Rlimit 414
+#define T_Saveconfigdir 415
+#define T_Server 416
+#define T_Serverresponse 417
+#define T_ServerresponseFuzz 418
+#define T_Setvar 419
+#define T_Source 420
+#define T_Stacksize 421
+#define T_Statistics 422
+#define T_Stats 423
+#define T_Statsdir 424
+#define T_Step 425
+#define T_Stepback 426
+#define T_Stepfwd 427
+#define T_Stepout 428
+#define T_Stratum 429
+#define T_String 430
+#define T_Sys 431
+#define T_Sysstats 432
+#define T_Tick 433
+#define T_Time1 434
+#define T_Time2 435
+#define T_TimeData 436
+#define T_Timer 437
+#define T_Timingstats 438
+#define T_Tinker 439
+#define T_Tos 440
+#define T_Trap 441
+#define T_True 442
+#define T_Trustedkey 443
+#define T_Ttl 444
+#define T_Type 445
+#define T_U_int 446
+#define T_UEcrypto 447
+#define T_UEcryptonak 448
+#define T_UEdigest 449
+#define T_Unconfig 450
+#define T_Unpeer 451
+#define T_Version 452
+#define T_WanderThreshold 453
+#define T_Week 454
+#define T_Wildcard 455
+#define T_Xleave 456
+#define T_Xmtnonce 457
+#define T_Year 458
+#define T_Flag 459
+#define T_EOC 460
+#define T_Simulate 461
+#define T_Beep_Delay 462
+#define T_Sim_Duration 463
+#define T_Server_Offset 464
+#define T_Duration 465
+#define T_Freq_Offset 466
+#define T_Wander 467
+#define T_Jitter 468
+#define T_Prop_Delay 469
+#define T_Proc_Delay 470
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
-#line 52 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 52 "../../ntpd/ntp_parser.y"
char * String;
double Double;
@@ -602,7 +604,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 606 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 608 "ntp_parser.c"
};
typedef union YYSTYPE YYSTYPE;
@@ -613,9 +615,11 @@ typedef union YYSTYPE YYSTYPE;
extern YYSTYPE yylval;
+
int yyparse (void);
-#endif /* !YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED */
+
+#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
/* Symbol kind. */
enum yysymbol_kind_t
{
@@ -651,311 +655,313 @@ enum yysymbol_kind_t
YYSYMBOL_T_Ctl = 28, /* T_Ctl */
YYSYMBOL_T_Day = 29, /* T_Day */
YYSYMBOL_T_Default = 30, /* T_Default */
- YYSYMBOL_T_Device = 31, /* T_Device */
- YYSYMBOL_T_Digest = 32, /* T_Digest */
- YYSYMBOL_T_Disable = 33, /* T_Disable */
- YYSYMBOL_T_Discard = 34, /* T_Discard */
- YYSYMBOL_T_Dispersion = 35, /* T_Dispersion */
- YYSYMBOL_T_Double = 36, /* T_Double */
- YYSYMBOL_T_Driftfile = 37, /* T_Driftfile */
- YYSYMBOL_T_Drop = 38, /* T_Drop */
- YYSYMBOL_T_Dscp = 39, /* T_Dscp */
- YYSYMBOL_T_Ellipsis = 40, /* T_Ellipsis */
- YYSYMBOL_T_Enable = 41, /* T_Enable */
- YYSYMBOL_T_End = 42, /* T_End */
- YYSYMBOL_T_Epeer = 43, /* T_Epeer */
- YYSYMBOL_T_False = 44, /* T_False */
- YYSYMBOL_T_File = 45, /* T_File */
- YYSYMBOL_T_Filegen = 46, /* T_Filegen */
- YYSYMBOL_T_Filenum = 47, /* T_Filenum */
- YYSYMBOL_T_Flag1 = 48, /* T_Flag1 */
- YYSYMBOL_T_Flag2 = 49, /* T_Flag2 */
- YYSYMBOL_T_Flag3 = 50, /* T_Flag3 */
- YYSYMBOL_T_Flag4 = 51, /* T_Flag4 */
- YYSYMBOL_T_Flake = 52, /* T_Flake */
- YYSYMBOL_T_Floor = 53, /* T_Floor */
- YYSYMBOL_T_Freq = 54, /* T_Freq */
- YYSYMBOL_T_Fudge = 55, /* T_Fudge */
- YYSYMBOL_T_Fuzz = 56, /* T_Fuzz */
- YYSYMBOL_T_Host = 57, /* T_Host */
- YYSYMBOL_T_Huffpuff = 58, /* T_Huffpuff */
- YYSYMBOL_T_Iburst = 59, /* T_Iburst */
- YYSYMBOL_T_Ident = 60, /* T_Ident */
- YYSYMBOL_T_Ignore = 61, /* T_Ignore */
- YYSYMBOL_T_Ignorehash = 62, /* T_Ignorehash */
- YYSYMBOL_T_Incalloc = 63, /* T_Incalloc */
- YYSYMBOL_T_Incmem = 64, /* T_Incmem */
- YYSYMBOL_T_Initalloc = 65, /* T_Initalloc */
- YYSYMBOL_T_Initmem = 66, /* T_Initmem */
- YYSYMBOL_T_Includefile = 67, /* T_Includefile */
- YYSYMBOL_T_Integer = 68, /* T_Integer */
- YYSYMBOL_T_Interface = 69, /* T_Interface */
- YYSYMBOL_T_Intrange = 70, /* T_Intrange */
- YYSYMBOL_T_Io = 71, /* T_Io */
- YYSYMBOL_T_Ippeerlimit = 72, /* T_Ippeerlimit */
- YYSYMBOL_T_Ipv4 = 73, /* T_Ipv4 */
- YYSYMBOL_T_Ipv4_flag = 74, /* T_Ipv4_flag */
- YYSYMBOL_T_Ipv6 = 75, /* T_Ipv6 */
- YYSYMBOL_T_Ipv6_flag = 76, /* T_Ipv6_flag */
- YYSYMBOL_T_Kernel = 77, /* T_Kernel */
- YYSYMBOL_T_Key = 78, /* T_Key */
- YYSYMBOL_T_Keys = 79, /* T_Keys */
- YYSYMBOL_T_Keysdir = 80, /* T_Keysdir */
- YYSYMBOL_T_Kod = 81, /* T_Kod */
- YYSYMBOL_T_Leapfile = 82, /* T_Leapfile */
- YYSYMBOL_T_Leapsmearinterval = 83, /* T_Leapsmearinterval */
- YYSYMBOL_T_Limited = 84, /* T_Limited */
- YYSYMBOL_T_Link = 85, /* T_Link */
- YYSYMBOL_T_Listen = 86, /* T_Listen */
- YYSYMBOL_T_Logconfig = 87, /* T_Logconfig */
- YYSYMBOL_T_Logfile = 88, /* T_Logfile */
- YYSYMBOL_T_Loopstats = 89, /* T_Loopstats */
- YYSYMBOL_T_Lowpriotrap = 90, /* T_Lowpriotrap */
- YYSYMBOL_T_Manycastclient = 91, /* T_Manycastclient */
- YYSYMBOL_T_Manycastserver = 92, /* T_Manycastserver */
- YYSYMBOL_T_Mask = 93, /* T_Mask */
- YYSYMBOL_T_Maxage = 94, /* T_Maxage */
- YYSYMBOL_T_Maxclock = 95, /* T_Maxclock */
- YYSYMBOL_T_Maxdepth = 96, /* T_Maxdepth */
- YYSYMBOL_T_Maxdist = 97, /* T_Maxdist */
- YYSYMBOL_T_Maxmem = 98, /* T_Maxmem */
- YYSYMBOL_T_Maxpoll = 99, /* T_Maxpoll */
- YYSYMBOL_T_Mdnstries = 100, /* T_Mdnstries */
- YYSYMBOL_T_Mem = 101, /* T_Mem */
- YYSYMBOL_T_Memlock = 102, /* T_Memlock */
- YYSYMBOL_T_Minclock = 103, /* T_Minclock */
- YYSYMBOL_T_Mindepth = 104, /* T_Mindepth */
- YYSYMBOL_T_Mindist = 105, /* T_Mindist */
- YYSYMBOL_T_Minimum = 106, /* T_Minimum */
- YYSYMBOL_T_Minjitter = 107, /* T_Minjitter */
- YYSYMBOL_T_Minpoll = 108, /* T_Minpoll */
- YYSYMBOL_T_Minsane = 109, /* T_Minsane */
- YYSYMBOL_T_Mode = 110, /* T_Mode */
- YYSYMBOL_T_Mode7 = 111, /* T_Mode7 */
- YYSYMBOL_T_Monitor = 112, /* T_Monitor */
- YYSYMBOL_T_Month = 113, /* T_Month */
- YYSYMBOL_T_Mru = 114, /* T_Mru */
- YYSYMBOL_T_Mssntp = 115, /* T_Mssntp */
- YYSYMBOL_T_Multicastclient = 116, /* T_Multicastclient */
- YYSYMBOL_T_Nic = 117, /* T_Nic */
- YYSYMBOL_T_Nolink = 118, /* T_Nolink */
- YYSYMBOL_T_Nomodify = 119, /* T_Nomodify */
- YYSYMBOL_T_Nomrulist = 120, /* T_Nomrulist */
- YYSYMBOL_T_None = 121, /* T_None */
- YYSYMBOL_T_Nonvolatile = 122, /* T_Nonvolatile */
- YYSYMBOL_T_Noepeer = 123, /* T_Noepeer */
- YYSYMBOL_T_Nopeer = 124, /* T_Nopeer */
- YYSYMBOL_T_Noquery = 125, /* T_Noquery */
- YYSYMBOL_T_Noselect = 126, /* T_Noselect */
- YYSYMBOL_T_Noserve = 127, /* T_Noserve */
- YYSYMBOL_T_Notrap = 128, /* T_Notrap */
- YYSYMBOL_T_Notrust = 129, /* T_Notrust */
- YYSYMBOL_T_Ntp = 130, /* T_Ntp */
- YYSYMBOL_T_Ntpport = 131, /* T_Ntpport */
- YYSYMBOL_T_NtpSignDsocket = 132, /* T_NtpSignDsocket */
- YYSYMBOL_T_Orphan = 133, /* T_Orphan */
- YYSYMBOL_T_Orphanwait = 134, /* T_Orphanwait */
- YYSYMBOL_T_PCEdigest = 135, /* T_PCEdigest */
- YYSYMBOL_T_Panic = 136, /* T_Panic */
- YYSYMBOL_T_Peer = 137, /* T_Peer */
- YYSYMBOL_T_Peerstats = 138, /* T_Peerstats */
- YYSYMBOL_T_Phone = 139, /* T_Phone */
- YYSYMBOL_T_Pid = 140, /* T_Pid */
- YYSYMBOL_T_Pidfile = 141, /* T_Pidfile */
- YYSYMBOL_T_Poll = 142, /* T_Poll */
- YYSYMBOL_T_PollSkewList = 143, /* T_PollSkewList */
- YYSYMBOL_T_Pool = 144, /* T_Pool */
- YYSYMBOL_T_Port = 145, /* T_Port */
- YYSYMBOL_T_PpsData = 146, /* T_PpsData */
- YYSYMBOL_T_Preempt = 147, /* T_Preempt */
- YYSYMBOL_T_Prefer = 148, /* T_Prefer */
- YYSYMBOL_T_Protostats = 149, /* T_Protostats */
- YYSYMBOL_T_Pw = 150, /* T_Pw */
- YYSYMBOL_T_Randfile = 151, /* T_Randfile */
- YYSYMBOL_T_Rawstats = 152, /* T_Rawstats */
- YYSYMBOL_T_Refid = 153, /* T_Refid */
- YYSYMBOL_T_Requestkey = 154, /* T_Requestkey */
- YYSYMBOL_T_Reset = 155, /* T_Reset */
- YYSYMBOL_T_Restrict = 156, /* T_Restrict */
- YYSYMBOL_T_Revoke = 157, /* T_Revoke */
- YYSYMBOL_T_Rlimit = 158, /* T_Rlimit */
- YYSYMBOL_T_Saveconfigdir = 159, /* T_Saveconfigdir */
- YYSYMBOL_T_Server = 160, /* T_Server */
- YYSYMBOL_T_Serverresponse = 161, /* T_Serverresponse */
- YYSYMBOL_T_ServerresponseFuzz = 162, /* T_ServerresponseFuzz */
- YYSYMBOL_T_Setvar = 163, /* T_Setvar */
- YYSYMBOL_T_Source = 164, /* T_Source */
- YYSYMBOL_T_Stacksize = 165, /* T_Stacksize */
- YYSYMBOL_T_Statistics = 166, /* T_Statistics */
- YYSYMBOL_T_Stats = 167, /* T_Stats */
- YYSYMBOL_T_Statsdir = 168, /* T_Statsdir */
- YYSYMBOL_T_Step = 169, /* T_Step */
- YYSYMBOL_T_Stepback = 170, /* T_Stepback */
- YYSYMBOL_T_Stepfwd = 171, /* T_Stepfwd */
- YYSYMBOL_T_Stepout = 172, /* T_Stepout */
- YYSYMBOL_T_Stratum = 173, /* T_Stratum */
- YYSYMBOL_T_String = 174, /* T_String */
- YYSYMBOL_T_Sys = 175, /* T_Sys */
- YYSYMBOL_T_Sysstats = 176, /* T_Sysstats */
- YYSYMBOL_T_Tick = 177, /* T_Tick */
- YYSYMBOL_T_Time1 = 178, /* T_Time1 */
- YYSYMBOL_T_Time2 = 179, /* T_Time2 */
- YYSYMBOL_T_TimeData = 180, /* T_TimeData */
- YYSYMBOL_T_Timer = 181, /* T_Timer */
- YYSYMBOL_T_Timingstats = 182, /* T_Timingstats */
- YYSYMBOL_T_Tinker = 183, /* T_Tinker */
- YYSYMBOL_T_Tos = 184, /* T_Tos */
- YYSYMBOL_T_Trap = 185, /* T_Trap */
- YYSYMBOL_T_True = 186, /* T_True */
- YYSYMBOL_T_Trustedkey = 187, /* T_Trustedkey */
- YYSYMBOL_T_Ttl = 188, /* T_Ttl */
- YYSYMBOL_T_Type = 189, /* T_Type */
- YYSYMBOL_T_U_int = 190, /* T_U_int */
- YYSYMBOL_T_UEcrypto = 191, /* T_UEcrypto */
- YYSYMBOL_T_UEcryptonak = 192, /* T_UEcryptonak */
- YYSYMBOL_T_UEdigest = 193, /* T_UEdigest */
- YYSYMBOL_T_Unconfig = 194, /* T_Unconfig */
- YYSYMBOL_T_Unpeer = 195, /* T_Unpeer */
- YYSYMBOL_T_Version = 196, /* T_Version */
- YYSYMBOL_T_WanderThreshold = 197, /* T_WanderThreshold */
- YYSYMBOL_T_Week = 198, /* T_Week */
- YYSYMBOL_T_Wildcard = 199, /* T_Wildcard */
- YYSYMBOL_T_Xleave = 200, /* T_Xleave */
- YYSYMBOL_T_Xmtnonce = 201, /* T_Xmtnonce */
- YYSYMBOL_T_Year = 202, /* T_Year */
- YYSYMBOL_T_Flag = 203, /* T_Flag */
- YYSYMBOL_T_EOC = 204, /* T_EOC */
- YYSYMBOL_T_Simulate = 205, /* T_Simulate */
- YYSYMBOL_T_Beep_Delay = 206, /* T_Beep_Delay */
- YYSYMBOL_T_Sim_Duration = 207, /* T_Sim_Duration */
- YYSYMBOL_T_Server_Offset = 208, /* T_Server_Offset */
- YYSYMBOL_T_Duration = 209, /* T_Duration */
- YYSYMBOL_T_Freq_Offset = 210, /* T_Freq_Offset */
- YYSYMBOL_T_Wander = 211, /* T_Wander */
- YYSYMBOL_T_Jitter = 212, /* T_Jitter */
- YYSYMBOL_T_Prop_Delay = 213, /* T_Prop_Delay */
- YYSYMBOL_T_Proc_Delay = 214, /* T_Proc_Delay */
- YYSYMBOL_215_ = 215, /* '|' */
- YYSYMBOL_216_ = 216, /* '=' */
- YYSYMBOL_217_ = 217, /* '(' */
- YYSYMBOL_218_ = 218, /* ')' */
- YYSYMBOL_219_ = 219, /* '{' */
- YYSYMBOL_220_ = 220, /* '}' */
- YYSYMBOL_YYACCEPT = 221, /* $accept */
- YYSYMBOL_configuration = 222, /* configuration */
- YYSYMBOL_command_list = 223, /* command_list */
- YYSYMBOL_command = 224, /* command */
- YYSYMBOL_server_command = 225, /* server_command */
- YYSYMBOL_client_type = 226, /* client_type */
- YYSYMBOL_address = 227, /* address */
- YYSYMBOL_ip_address = 228, /* ip_address */
- YYSYMBOL_address_fam = 229, /* address_fam */
- YYSYMBOL_option_list = 230, /* option_list */
- YYSYMBOL_option = 231, /* option */
- YYSYMBOL_option_flag = 232, /* option_flag */
- YYSYMBOL_option_flag_keyword = 233, /* option_flag_keyword */
- YYSYMBOL_option_int = 234, /* option_int */
- YYSYMBOL_option_int_keyword = 235, /* option_int_keyword */
- YYSYMBOL_option_str = 236, /* option_str */
- YYSYMBOL_option_str_keyword = 237, /* option_str_keyword */
- YYSYMBOL_unpeer_command = 238, /* unpeer_command */
- YYSYMBOL_unpeer_keyword = 239, /* unpeer_keyword */
- YYSYMBOL_other_mode_command = 240, /* other_mode_command */
- YYSYMBOL_authentication_command = 241, /* authentication_command */
- YYSYMBOL_crypto_command_list = 242, /* crypto_command_list */
- YYSYMBOL_crypto_command = 243, /* crypto_command */
- YYSYMBOL_crypto_str_keyword = 244, /* crypto_str_keyword */
- YYSYMBOL_orphan_mode_command = 245, /* orphan_mode_command */
- YYSYMBOL_tos_option_list = 246, /* tos_option_list */
- YYSYMBOL_tos_option = 247, /* tos_option */
- YYSYMBOL_tos_option_int_keyword = 248, /* tos_option_int_keyword */
- YYSYMBOL_tos_option_dbl_keyword = 249, /* tos_option_dbl_keyword */
- YYSYMBOL_monitoring_command = 250, /* monitoring_command */
- YYSYMBOL_stats_list = 251, /* stats_list */
- YYSYMBOL_stat = 252, /* stat */
- YYSYMBOL_filegen_option_list = 253, /* filegen_option_list */
- YYSYMBOL_filegen_option = 254, /* filegen_option */
- YYSYMBOL_link_nolink = 255, /* link_nolink */
- YYSYMBOL_enable_disable = 256, /* enable_disable */
- YYSYMBOL_filegen_type = 257, /* filegen_type */
- YYSYMBOL_access_control_command = 258, /* access_control_command */
- YYSYMBOL_res_ippeerlimit = 259, /* res_ippeerlimit */
- YYSYMBOL_ac_flag_list = 260, /* ac_flag_list */
- YYSYMBOL_access_control_flag = 261, /* access_control_flag */
- YYSYMBOL_discard_option_list = 262, /* discard_option_list */
- YYSYMBOL_discard_option = 263, /* discard_option */
- YYSYMBOL_discard_option_keyword = 264, /* discard_option_keyword */
- YYSYMBOL_mru_option_list = 265, /* mru_option_list */
- YYSYMBOL_mru_option = 266, /* mru_option */
- YYSYMBOL_mru_option_keyword = 267, /* mru_option_keyword */
- YYSYMBOL_fudge_command = 268, /* fudge_command */
- YYSYMBOL_fudge_factor_list = 269, /* fudge_factor_list */
- YYSYMBOL_fudge_factor = 270, /* fudge_factor */
- YYSYMBOL_fudge_factor_dbl_keyword = 271, /* fudge_factor_dbl_keyword */
- YYSYMBOL_fudge_factor_bool_keyword = 272, /* fudge_factor_bool_keyword */
- YYSYMBOL_device_command = 273, /* device_command */
- YYSYMBOL_device_item_list = 274, /* device_item_list */
- YYSYMBOL_device_item = 275, /* device_item */
- YYSYMBOL_device_item_path_keyword = 276, /* device_item_path_keyword */
- YYSYMBOL_rlimit_command = 277, /* rlimit_command */
- YYSYMBOL_rlimit_option_list = 278, /* rlimit_option_list */
- YYSYMBOL_rlimit_option = 279, /* rlimit_option */
- YYSYMBOL_rlimit_option_keyword = 280, /* rlimit_option_keyword */
- YYSYMBOL_system_option_command = 281, /* system_option_command */
- YYSYMBOL_system_option_list = 282, /* system_option_list */
- YYSYMBOL_system_option = 283, /* system_option */
- YYSYMBOL_system_option_flag_keyword = 284, /* system_option_flag_keyword */
- YYSYMBOL_system_option_local_flag_keyword = 285, /* system_option_local_flag_keyword */
- YYSYMBOL_tinker_command = 286, /* tinker_command */
- YYSYMBOL_tinker_option_list = 287, /* tinker_option_list */
- YYSYMBOL_tinker_option = 288, /* tinker_option */
- YYSYMBOL_tinker_option_keyword = 289, /* tinker_option_keyword */
- YYSYMBOL_miscellaneous_command = 290, /* miscellaneous_command */
- YYSYMBOL_misc_cmd_dbl_keyword = 291, /* misc_cmd_dbl_keyword */
- YYSYMBOL_misc_cmd_int_keyword = 292, /* misc_cmd_int_keyword */
- YYSYMBOL_opt_hash_check = 293, /* opt_hash_check */
- YYSYMBOL_misc_cmd_str_keyword = 294, /* misc_cmd_str_keyword */
- YYSYMBOL_misc_cmd_str_lcl_keyword = 295, /* misc_cmd_str_lcl_keyword */
- YYSYMBOL_drift_parm = 296, /* drift_parm */
- YYSYMBOL_pollskew_list = 297, /* pollskew_list */
- YYSYMBOL_pollskew_spec = 298, /* pollskew_spec */
- YYSYMBOL_pollskew_cycle = 299, /* pollskew_cycle */
- YYSYMBOL_variable_assign = 300, /* variable_assign */
- YYSYMBOL_t_default_or_zero = 301, /* t_default_or_zero */
- YYSYMBOL_trap_option_list = 302, /* trap_option_list */
- YYSYMBOL_trap_option = 303, /* trap_option */
- YYSYMBOL_log_config_list = 304, /* log_config_list */
- YYSYMBOL_log_config_command = 305, /* log_config_command */
- YYSYMBOL_interface_command = 306, /* interface_command */
- YYSYMBOL_interface_nic = 307, /* interface_nic */
- YYSYMBOL_nic_rule_class = 308, /* nic_rule_class */
- YYSYMBOL_nic_rule_action = 309, /* nic_rule_action */
- YYSYMBOL_reset_command = 310, /* reset_command */
- YYSYMBOL_counter_set_list = 311, /* counter_set_list */
- YYSYMBOL_counter_set_keyword = 312, /* counter_set_keyword */
- YYSYMBOL_integer_list = 313, /* integer_list */
- YYSYMBOL_integer_list_range = 314, /* integer_list_range */
- YYSYMBOL_integer_list_range_elt = 315, /* integer_list_range_elt */
- YYSYMBOL_integer_range = 316, /* integer_range */
- YYSYMBOL_string_list = 317, /* string_list */
- YYSYMBOL_address_list = 318, /* address_list */
- YYSYMBOL_boolean = 319, /* boolean */
- YYSYMBOL_number = 320, /* number */
- YYSYMBOL_basedate = 321, /* basedate */
- YYSYMBOL_simulate_command = 322, /* simulate_command */
- YYSYMBOL_sim_conf_start = 323, /* sim_conf_start */
- YYSYMBOL_sim_init_statement_list = 324, /* sim_init_statement_list */
- YYSYMBOL_sim_init_statement = 325, /* sim_init_statement */
- YYSYMBOL_sim_init_keyword = 326, /* sim_init_keyword */
- YYSYMBOL_sim_server_list = 327, /* sim_server_list */
- YYSYMBOL_sim_server = 328, /* sim_server */
- YYSYMBOL_sim_server_offset = 329, /* sim_server_offset */
- YYSYMBOL_sim_server_name = 330, /* sim_server_name */
- YYSYMBOL_sim_act_list = 331, /* sim_act_list */
- YYSYMBOL_sim_act = 332, /* sim_act */
- YYSYMBOL_sim_act_stmt_list = 333, /* sim_act_stmt_list */
- YYSYMBOL_sim_act_stmt = 334, /* sim_act_stmt */
- YYSYMBOL_sim_act_keyword = 335 /* sim_act_keyword */
+ YYSYMBOL_T_Delrestrict = 31, /* T_Delrestrict */
+ YYSYMBOL_T_Device = 32, /* T_Device */
+ YYSYMBOL_T_Digest = 33, /* T_Digest */
+ YYSYMBOL_T_Disable = 34, /* T_Disable */
+ YYSYMBOL_T_Discard = 35, /* T_Discard */
+ YYSYMBOL_T_Dispersion = 36, /* T_Dispersion */
+ YYSYMBOL_T_Double = 37, /* T_Double */
+ YYSYMBOL_T_Driftfile = 38, /* T_Driftfile */
+ YYSYMBOL_T_Drop = 39, /* T_Drop */
+ YYSYMBOL_T_Dscp = 40, /* T_Dscp */
+ YYSYMBOL_T_Ellipsis = 41, /* T_Ellipsis */
+ YYSYMBOL_T_Enable = 42, /* T_Enable */
+ YYSYMBOL_T_End = 43, /* T_End */
+ YYSYMBOL_T_Epeer = 44, /* T_Epeer */
+ YYSYMBOL_T_False = 45, /* T_False */
+ YYSYMBOL_T_File = 46, /* T_File */
+ YYSYMBOL_T_Filegen = 47, /* T_Filegen */
+ YYSYMBOL_T_Filenum = 48, /* T_Filenum */
+ YYSYMBOL_T_Flag1 = 49, /* T_Flag1 */
+ YYSYMBOL_T_Flag2 = 50, /* T_Flag2 */
+ YYSYMBOL_T_Flag3 = 51, /* T_Flag3 */
+ YYSYMBOL_T_Flag4 = 52, /* T_Flag4 */
+ YYSYMBOL_T_Flake = 53, /* T_Flake */
+ YYSYMBOL_T_Floor = 54, /* T_Floor */
+ YYSYMBOL_T_Freq = 55, /* T_Freq */
+ YYSYMBOL_T_Fudge = 56, /* T_Fudge */
+ YYSYMBOL_T_Fuzz = 57, /* T_Fuzz */
+ YYSYMBOL_T_Host = 58, /* T_Host */
+ YYSYMBOL_T_Huffpuff = 59, /* T_Huffpuff */
+ YYSYMBOL_T_Iburst = 60, /* T_Iburst */
+ YYSYMBOL_T_Ident = 61, /* T_Ident */
+ YYSYMBOL_T_Ignore = 62, /* T_Ignore */
+ YYSYMBOL_T_Ignorehash = 63, /* T_Ignorehash */
+ YYSYMBOL_T_Incalloc = 64, /* T_Incalloc */
+ YYSYMBOL_T_Incmem = 65, /* T_Incmem */
+ YYSYMBOL_T_Initalloc = 66, /* T_Initalloc */
+ YYSYMBOL_T_Initmem = 67, /* T_Initmem */
+ YYSYMBOL_T_Includefile = 68, /* T_Includefile */
+ YYSYMBOL_T_Integer = 69, /* T_Integer */
+ YYSYMBOL_T_Interface = 70, /* T_Interface */
+ YYSYMBOL_T_Intrange = 71, /* T_Intrange */
+ YYSYMBOL_T_Io = 72, /* T_Io */
+ YYSYMBOL_T_Ippeerlimit = 73, /* T_Ippeerlimit */
+ YYSYMBOL_T_Ipv4 = 74, /* T_Ipv4 */
+ YYSYMBOL_T_Ipv4_flag = 75, /* T_Ipv4_flag */
+ YYSYMBOL_T_Ipv6 = 76, /* T_Ipv6 */
+ YYSYMBOL_T_Ipv6_flag = 77, /* T_Ipv6_flag */
+ YYSYMBOL_T_Kernel = 78, /* T_Kernel */
+ YYSYMBOL_T_Key = 79, /* T_Key */
+ YYSYMBOL_T_Keys = 80, /* T_Keys */
+ YYSYMBOL_T_Keysdir = 81, /* T_Keysdir */
+ YYSYMBOL_T_Kod = 82, /* T_Kod */
+ YYSYMBOL_T_Leapfile = 83, /* T_Leapfile */
+ YYSYMBOL_T_Leapsmearinterval = 84, /* T_Leapsmearinterval */
+ YYSYMBOL_T_Limited = 85, /* T_Limited */
+ YYSYMBOL_T_Link = 86, /* T_Link */
+ YYSYMBOL_T_Listen = 87, /* T_Listen */
+ YYSYMBOL_T_Logconfig = 88, /* T_Logconfig */
+ YYSYMBOL_T_Logfile = 89, /* T_Logfile */
+ YYSYMBOL_T_Loopstats = 90, /* T_Loopstats */
+ YYSYMBOL_T_Lowpriotrap = 91, /* T_Lowpriotrap */
+ YYSYMBOL_T_Manycastclient = 92, /* T_Manycastclient */
+ YYSYMBOL_T_Manycastserver = 93, /* T_Manycastserver */
+ YYSYMBOL_T_Mask = 94, /* T_Mask */
+ YYSYMBOL_T_Maxage = 95, /* T_Maxage */
+ YYSYMBOL_T_Maxclock = 96, /* T_Maxclock */
+ YYSYMBOL_T_Maxdepth = 97, /* T_Maxdepth */
+ YYSYMBOL_T_Maxdist = 98, /* T_Maxdist */
+ YYSYMBOL_T_Maxmem = 99, /* T_Maxmem */
+ YYSYMBOL_T_Maxpoll = 100, /* T_Maxpoll */
+ YYSYMBOL_T_Mdnstries = 101, /* T_Mdnstries */
+ YYSYMBOL_T_Mem = 102, /* T_Mem */
+ YYSYMBOL_T_Memlock = 103, /* T_Memlock */
+ YYSYMBOL_T_Minclock = 104, /* T_Minclock */
+ YYSYMBOL_T_Mindepth = 105, /* T_Mindepth */
+ YYSYMBOL_T_Mindist = 106, /* T_Mindist */
+ YYSYMBOL_T_Minimum = 107, /* T_Minimum */
+ YYSYMBOL_T_Minjitter = 108, /* T_Minjitter */
+ YYSYMBOL_T_Minpoll = 109, /* T_Minpoll */
+ YYSYMBOL_T_Minsane = 110, /* T_Minsane */
+ YYSYMBOL_T_Mode = 111, /* T_Mode */
+ YYSYMBOL_T_Mode7 = 112, /* T_Mode7 */
+ YYSYMBOL_T_Monitor = 113, /* T_Monitor */
+ YYSYMBOL_T_Month = 114, /* T_Month */
+ YYSYMBOL_T_Mru = 115, /* T_Mru */
+ YYSYMBOL_T_Mssntp = 116, /* T_Mssntp */
+ YYSYMBOL_T_Multicastclient = 117, /* T_Multicastclient */
+ YYSYMBOL_T_Nic = 118, /* T_Nic */
+ YYSYMBOL_T_Nolink = 119, /* T_Nolink */
+ YYSYMBOL_T_Nomodify = 120, /* T_Nomodify */
+ YYSYMBOL_T_Nomrulist = 121, /* T_Nomrulist */
+ YYSYMBOL_T_None = 122, /* T_None */
+ YYSYMBOL_T_Nonvolatile = 123, /* T_Nonvolatile */
+ YYSYMBOL_T_Noepeer = 124, /* T_Noepeer */
+ YYSYMBOL_T_Nopeer = 125, /* T_Nopeer */
+ YYSYMBOL_T_Noquery = 126, /* T_Noquery */
+ YYSYMBOL_T_Noselect = 127, /* T_Noselect */
+ YYSYMBOL_T_Noserve = 128, /* T_Noserve */
+ YYSYMBOL_T_Notrap = 129, /* T_Notrap */
+ YYSYMBOL_T_Notrust = 130, /* T_Notrust */
+ YYSYMBOL_T_Ntp = 131, /* T_Ntp */
+ YYSYMBOL_T_Ntpport = 132, /* T_Ntpport */
+ YYSYMBOL_T_NtpSignDsocket = 133, /* T_NtpSignDsocket */
+ YYSYMBOL_T_Orphan = 134, /* T_Orphan */
+ YYSYMBOL_T_Orphanwait = 135, /* T_Orphanwait */
+ YYSYMBOL_T_PCEdigest = 136, /* T_PCEdigest */
+ YYSYMBOL_T_Panic = 137, /* T_Panic */
+ YYSYMBOL_T_Peer = 138, /* T_Peer */
+ YYSYMBOL_T_Peerstats = 139, /* T_Peerstats */
+ YYSYMBOL_T_Phone = 140, /* T_Phone */
+ YYSYMBOL_T_Pid = 141, /* T_Pid */
+ YYSYMBOL_T_Pidfile = 142, /* T_Pidfile */
+ YYSYMBOL_T_Poll = 143, /* T_Poll */
+ YYSYMBOL_T_PollSkewList = 144, /* T_PollSkewList */
+ YYSYMBOL_T_Pool = 145, /* T_Pool */
+ YYSYMBOL_T_Port = 146, /* T_Port */
+ YYSYMBOL_T_PpsData = 147, /* T_PpsData */
+ YYSYMBOL_T_Preempt = 148, /* T_Preempt */
+ YYSYMBOL_T_Prefer = 149, /* T_Prefer */
+ YYSYMBOL_T_Protostats = 150, /* T_Protostats */
+ YYSYMBOL_T_Pw = 151, /* T_Pw */
+ YYSYMBOL_T_Randfile = 152, /* T_Randfile */
+ YYSYMBOL_T_Rawstats = 153, /* T_Rawstats */
+ YYSYMBOL_T_Refid = 154, /* T_Refid */
+ YYSYMBOL_T_Requestkey = 155, /* T_Requestkey */
+ YYSYMBOL_T_Reset = 156, /* T_Reset */
+ YYSYMBOL_T_Restrict = 157, /* T_Restrict */
+ YYSYMBOL_T_Revoke = 158, /* T_Revoke */
+ YYSYMBOL_T_Rlimit = 159, /* T_Rlimit */
+ YYSYMBOL_T_Saveconfigdir = 160, /* T_Saveconfigdir */
+ YYSYMBOL_T_Server = 161, /* T_Server */
+ YYSYMBOL_T_Serverresponse = 162, /* T_Serverresponse */
+ YYSYMBOL_T_ServerresponseFuzz = 163, /* T_ServerresponseFuzz */
+ YYSYMBOL_T_Setvar = 164, /* T_Setvar */
+ YYSYMBOL_T_Source = 165, /* T_Source */
+ YYSYMBOL_T_Stacksize = 166, /* T_Stacksize */
+ YYSYMBOL_T_Statistics = 167, /* T_Statistics */
+ YYSYMBOL_T_Stats = 168, /* T_Stats */
+ YYSYMBOL_T_Statsdir = 169, /* T_Statsdir */
+ YYSYMBOL_T_Step = 170, /* T_Step */
+ YYSYMBOL_T_Stepback = 171, /* T_Stepback */
+ YYSYMBOL_T_Stepfwd = 172, /* T_Stepfwd */
+ YYSYMBOL_T_Stepout = 173, /* T_Stepout */
+ YYSYMBOL_T_Stratum = 174, /* T_Stratum */
+ YYSYMBOL_T_String = 175, /* T_String */
+ YYSYMBOL_T_Sys = 176, /* T_Sys */
+ YYSYMBOL_T_Sysstats = 177, /* T_Sysstats */
+ YYSYMBOL_T_Tick = 178, /* T_Tick */
+ YYSYMBOL_T_Time1 = 179, /* T_Time1 */
+ YYSYMBOL_T_Time2 = 180, /* T_Time2 */
+ YYSYMBOL_T_TimeData = 181, /* T_TimeData */
+ YYSYMBOL_T_Timer = 182, /* T_Timer */
+ YYSYMBOL_T_Timingstats = 183, /* T_Timingstats */
+ YYSYMBOL_T_Tinker = 184, /* T_Tinker */
+ YYSYMBOL_T_Tos = 185, /* T_Tos */
+ YYSYMBOL_T_Trap = 186, /* T_Trap */
+ YYSYMBOL_T_True = 187, /* T_True */
+ YYSYMBOL_T_Trustedkey = 188, /* T_Trustedkey */
+ YYSYMBOL_T_Ttl = 189, /* T_Ttl */
+ YYSYMBOL_T_Type = 190, /* T_Type */
+ YYSYMBOL_T_U_int = 191, /* T_U_int */
+ YYSYMBOL_T_UEcrypto = 192, /* T_UEcrypto */
+ YYSYMBOL_T_UEcryptonak = 193, /* T_UEcryptonak */
+ YYSYMBOL_T_UEdigest = 194, /* T_UEdigest */
+ YYSYMBOL_T_Unconfig = 195, /* T_Unconfig */
+ YYSYMBOL_T_Unpeer = 196, /* T_Unpeer */
+ YYSYMBOL_T_Version = 197, /* T_Version */
+ YYSYMBOL_T_WanderThreshold = 198, /* T_WanderThreshold */
+ YYSYMBOL_T_Week = 199, /* T_Week */
+ YYSYMBOL_T_Wildcard = 200, /* T_Wildcard */
+ YYSYMBOL_T_Xleave = 201, /* T_Xleave */
+ YYSYMBOL_T_Xmtnonce = 202, /* T_Xmtnonce */
+ YYSYMBOL_T_Year = 203, /* T_Year */
+ YYSYMBOL_T_Flag = 204, /* T_Flag */
+ YYSYMBOL_T_EOC = 205, /* T_EOC */
+ YYSYMBOL_T_Simulate = 206, /* T_Simulate */
+ YYSYMBOL_T_Beep_Delay = 207, /* T_Beep_Delay */
+ YYSYMBOL_T_Sim_Duration = 208, /* T_Sim_Duration */
+ YYSYMBOL_T_Server_Offset = 209, /* T_Server_Offset */
+ YYSYMBOL_T_Duration = 210, /* T_Duration */
+ YYSYMBOL_T_Freq_Offset = 211, /* T_Freq_Offset */
+ YYSYMBOL_T_Wander = 212, /* T_Wander */
+ YYSYMBOL_T_Jitter = 213, /* T_Jitter */
+ YYSYMBOL_T_Prop_Delay = 214, /* T_Prop_Delay */
+ YYSYMBOL_T_Proc_Delay = 215, /* T_Proc_Delay */
+ YYSYMBOL_216_ = 216, /* '|' */
+ YYSYMBOL_217_ = 217, /* '=' */
+ YYSYMBOL_218_ = 218, /* '(' */
+ YYSYMBOL_219_ = 219, /* ')' */
+ YYSYMBOL_220_ = 220, /* '{' */
+ YYSYMBOL_221_ = 221, /* '}' */
+ YYSYMBOL_YYACCEPT = 222, /* $accept */
+ YYSYMBOL_configuration = 223, /* configuration */
+ YYSYMBOL_command_list = 224, /* command_list */
+ YYSYMBOL_command = 225, /* command */
+ YYSYMBOL_server_command = 226, /* server_command */
+ YYSYMBOL_client_type = 227, /* client_type */
+ YYSYMBOL_address = 228, /* address */
+ YYSYMBOL_ip_address = 229, /* ip_address */
+ YYSYMBOL_address_fam = 230, /* address_fam */
+ YYSYMBOL_option_list = 231, /* option_list */
+ YYSYMBOL_option = 232, /* option */
+ YYSYMBOL_option_flag = 233, /* option_flag */
+ YYSYMBOL_option_flag_keyword = 234, /* option_flag_keyword */
+ YYSYMBOL_option_int = 235, /* option_int */
+ YYSYMBOL_option_int_keyword = 236, /* option_int_keyword */
+ YYSYMBOL_option_str = 237, /* option_str */
+ YYSYMBOL_option_str_keyword = 238, /* option_str_keyword */
+ YYSYMBOL_unpeer_command = 239, /* unpeer_command */
+ YYSYMBOL_unpeer_keyword = 240, /* unpeer_keyword */
+ YYSYMBOL_other_mode_command = 241, /* other_mode_command */
+ YYSYMBOL_authentication_command = 242, /* authentication_command */
+ YYSYMBOL_crypto_command_list = 243, /* crypto_command_list */
+ YYSYMBOL_crypto_command = 244, /* crypto_command */
+ YYSYMBOL_crypto_str_keyword = 245, /* crypto_str_keyword */
+ YYSYMBOL_orphan_mode_command = 246, /* orphan_mode_command */
+ YYSYMBOL_tos_option_list = 247, /* tos_option_list */
+ YYSYMBOL_tos_option = 248, /* tos_option */
+ YYSYMBOL_tos_option_int_keyword = 249, /* tos_option_int_keyword */
+ YYSYMBOL_tos_option_dbl_keyword = 250, /* tos_option_dbl_keyword */
+ YYSYMBOL_monitoring_command = 251, /* monitoring_command */
+ YYSYMBOL_stats_list = 252, /* stats_list */
+ YYSYMBOL_stat = 253, /* stat */
+ YYSYMBOL_filegen_option_list = 254, /* filegen_option_list */
+ YYSYMBOL_filegen_option = 255, /* filegen_option */
+ YYSYMBOL_link_nolink = 256, /* link_nolink */
+ YYSYMBOL_enable_disable = 257, /* enable_disable */
+ YYSYMBOL_filegen_type = 258, /* filegen_type */
+ YYSYMBOL_access_control_command = 259, /* access_control_command */
+ YYSYMBOL_restrict_mask = 260, /* restrict_mask */
+ YYSYMBOL_res_ippeerlimit = 261, /* res_ippeerlimit */
+ YYSYMBOL_ac_flag_list = 262, /* ac_flag_list */
+ YYSYMBOL_access_control_flag = 263, /* access_control_flag */
+ YYSYMBOL_discard_option_list = 264, /* discard_option_list */
+ YYSYMBOL_discard_option = 265, /* discard_option */
+ YYSYMBOL_discard_option_keyword = 266, /* discard_option_keyword */
+ YYSYMBOL_mru_option_list = 267, /* mru_option_list */
+ YYSYMBOL_mru_option = 268, /* mru_option */
+ YYSYMBOL_mru_option_keyword = 269, /* mru_option_keyword */
+ YYSYMBOL_fudge_command = 270, /* fudge_command */
+ YYSYMBOL_fudge_factor_list = 271, /* fudge_factor_list */
+ YYSYMBOL_fudge_factor = 272, /* fudge_factor */
+ YYSYMBOL_fudge_factor_dbl_keyword = 273, /* fudge_factor_dbl_keyword */
+ YYSYMBOL_fudge_factor_bool_keyword = 274, /* fudge_factor_bool_keyword */
+ YYSYMBOL_device_command = 275, /* device_command */
+ YYSYMBOL_device_item_list = 276, /* device_item_list */
+ YYSYMBOL_device_item = 277, /* device_item */
+ YYSYMBOL_device_item_path_keyword = 278, /* device_item_path_keyword */
+ YYSYMBOL_rlimit_command = 279, /* rlimit_command */
+ YYSYMBOL_rlimit_option_list = 280, /* rlimit_option_list */
+ YYSYMBOL_rlimit_option = 281, /* rlimit_option */
+ YYSYMBOL_rlimit_option_keyword = 282, /* rlimit_option_keyword */
+ YYSYMBOL_system_option_command = 283, /* system_option_command */
+ YYSYMBOL_system_option_list = 284, /* system_option_list */
+ YYSYMBOL_system_option = 285, /* system_option */
+ YYSYMBOL_system_option_flag_keyword = 286, /* system_option_flag_keyword */
+ YYSYMBOL_system_option_local_flag_keyword = 287, /* system_option_local_flag_keyword */
+ YYSYMBOL_tinker_command = 288, /* tinker_command */
+ YYSYMBOL_tinker_option_list = 289, /* tinker_option_list */
+ YYSYMBOL_tinker_option = 290, /* tinker_option */
+ YYSYMBOL_tinker_option_keyword = 291, /* tinker_option_keyword */
+ YYSYMBOL_miscellaneous_command = 292, /* miscellaneous_command */
+ YYSYMBOL_misc_cmd_dbl_keyword = 293, /* misc_cmd_dbl_keyword */
+ YYSYMBOL_misc_cmd_int_keyword = 294, /* misc_cmd_int_keyword */
+ YYSYMBOL_opt_hash_check = 295, /* opt_hash_check */
+ YYSYMBOL_misc_cmd_str_keyword = 296, /* misc_cmd_str_keyword */
+ YYSYMBOL_misc_cmd_str_lcl_keyword = 297, /* misc_cmd_str_lcl_keyword */
+ YYSYMBOL_drift_parm = 298, /* drift_parm */
+ YYSYMBOL_pollskew_list = 299, /* pollskew_list */
+ YYSYMBOL_pollskew_spec = 300, /* pollskew_spec */
+ YYSYMBOL_pollskew_cycle = 301, /* pollskew_cycle */
+ YYSYMBOL_variable_assign = 302, /* variable_assign */
+ YYSYMBOL_t_default_or_zero = 303, /* t_default_or_zero */
+ YYSYMBOL_trap_option_list = 304, /* trap_option_list */
+ YYSYMBOL_trap_option = 305, /* trap_option */
+ YYSYMBOL_log_config_list = 306, /* log_config_list */
+ YYSYMBOL_log_config_command = 307, /* log_config_command */
+ YYSYMBOL_interface_command = 308, /* interface_command */
+ YYSYMBOL_interface_nic = 309, /* interface_nic */
+ YYSYMBOL_nic_rule_class = 310, /* nic_rule_class */
+ YYSYMBOL_nic_rule_action = 311, /* nic_rule_action */
+ YYSYMBOL_reset_command = 312, /* reset_command */
+ YYSYMBOL_counter_set_list = 313, /* counter_set_list */
+ YYSYMBOL_counter_set_keyword = 314, /* counter_set_keyword */
+ YYSYMBOL_integer_list = 315, /* integer_list */
+ YYSYMBOL_integer_list_range = 316, /* integer_list_range */
+ YYSYMBOL_integer_list_range_elt = 317, /* integer_list_range_elt */
+ YYSYMBOL_integer_range = 318, /* integer_range */
+ YYSYMBOL_string_list = 319, /* string_list */
+ YYSYMBOL_address_list = 320, /* address_list */
+ YYSYMBOL_boolean = 321, /* boolean */
+ YYSYMBOL_number = 322, /* number */
+ YYSYMBOL_basedate = 323, /* basedate */
+ YYSYMBOL_simulate_command = 324, /* simulate_command */
+ YYSYMBOL_sim_conf_start = 325, /* sim_conf_start */
+ YYSYMBOL_sim_init_statement_list = 326, /* sim_init_statement_list */
+ YYSYMBOL_sim_init_statement = 327, /* sim_init_statement */
+ YYSYMBOL_sim_init_keyword = 328, /* sim_init_keyword */
+ YYSYMBOL_sim_server_list = 329, /* sim_server_list */
+ YYSYMBOL_sim_server = 330, /* sim_server */
+ YYSYMBOL_sim_server_offset = 331, /* sim_server_offset */
+ YYSYMBOL_sim_server_name = 332, /* sim_server_name */
+ YYSYMBOL_sim_act_list = 333, /* sim_act_list */
+ YYSYMBOL_sim_act = 334, /* sim_act */
+ YYSYMBOL_sim_act_stmt_list = 335, /* sim_act_stmt_list */
+ YYSYMBOL_sim_act_stmt = 336, /* sim_act_stmt */
+ YYSYMBOL_sim_act_keyword = 337 /* sim_act_keyword */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
@@ -1113,12 +1119,18 @@ typedef int yy_state_fast_t;
# define YY_USE(E) /* empty */
#endif
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
+# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
+# else
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
@@ -1275,21 +1287,21 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 222
+#define YYFINAL 225
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 688
+#define YYLAST 717
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 221
+#define YYNTOKENS 222
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 115
+#define YYNNTS 116
/* YYNRULES -- Number of rules. */
-#define YYNRULES 343
+#define YYNRULES 346
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 463
+#define YYNSTATES 467
/* YYMAXUTOK -- Last valid token kind. */
-#define YYMAXUTOK 469
+#define YYMAXUTOK 470
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -1307,15 +1319,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 217, 218, 2, 2, 2, 2, 2, 2, 2, 2,
+ 218, 219, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 216, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 217, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 219, 215, 220, 2, 2, 2, 2,
+ 2, 2, 2, 220, 216, 221, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1349,48 +1361,49 @@ static const yytype_uint8 yytranslate[] =
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 206, 207, 208, 209, 210, 211, 212, 213, 214
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215
};
#if YYDEBUG
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
- 0, 397, 397, 401, 402, 403, 418, 419, 420, 421,
- 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
- 432, 440, 450, 451, 452, 453, 454, 458, 459, 464,
- 469, 471, 477, 478, 486, 487, 488, 492, 497, 498,
- 499, 500, 501, 502, 503, 504, 505, 509, 511, 516,
- 517, 518, 519, 520, 521, 525, 530, 539, 549, 550,
- 560, 562, 564, 566, 577, 584, 586, 591, 593, 595,
- 597, 599, 609, 615, 616, 624, 626, 638, 639, 640,
- 641, 642, 651, 656, 661, 669, 671, 673, 675, 680,
- 681, 682, 683, 684, 685, 686, 687, 688, 692, 693,
- 702, 704, 713, 723, 728, 736, 737, 738, 739, 740,
- 741, 742, 743, 748, 749, 757, 767, 776, 791, 796,
- 797, 801, 802, 806, 807, 808, 809, 810, 811, 812,
- 821, 825, 829, 837, 845, 853, 868, 883, 896, 897,
- 917, 918, 926, 937, 938, 939, 940, 941, 942, 943,
- 944, 945, 946, 947, 948, 949, 950, 951, 952, 953,
- 957, 962, 970, 975, 976, 977, 981, 986, 994, 999,
- 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1014, 1024, 1029,
- 1037, 1039, 1041, 1050, 1052, 1057, 1058, 1059, 1063, 1064,
- 1065, 1066, 1074, 1084, 1089, 1097, 1102, 1103, 1111, 1116,
- 1121, 1129, 1134, 1135, 1136, 1145, 1147, 1152, 1157, 1165,
- 1167, 1184, 1185, 1186, 1187, 1188, 1189, 1193, 1194, 1195,
- 1196, 1197, 1198, 1206, 1211, 1216, 1224, 1229, 1230, 1231,
- 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1247, 1248, 1249,
- 1256, 1263, 1270, 1286, 1305, 1313, 1315, 1317, 1319, 1321,
- 1323, 1325, 1332, 1337, 1338, 1339, 1343, 1347, 1356, 1358,
- 1361, 1365, 1369, 1370, 1371, 1375, 1386, 1404, 1417, 1418,
- 1423, 1449, 1450, 1455, 1460, 1462, 1467, 1468, 1476, 1478,
- 1486, 1491, 1499, 1524, 1531, 1541, 1542, 1546, 1547, 1548,
- 1549, 1553, 1554, 1555, 1559, 1564, 1569, 1577, 1578, 1579,
- 1580, 1581, 1582, 1583, 1593, 1598, 1606, 1611, 1619, 1621,
- 1625, 1630, 1635, 1643, 1648, 1656, 1665, 1666, 1670, 1671,
- 1675, 1683, 1701, 1705, 1710, 1718, 1723, 1724, 1728, 1733,
- 1741, 1746, 1751, 1756, 1761, 1769, 1774, 1779, 1787, 1792,
- 1793, 1794, 1795, 1796
+ 0, 399, 399, 403, 404, 405, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 442, 452, 453, 454, 455, 456, 460, 461, 466,
+ 471, 473, 479, 480, 488, 489, 490, 494, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 511, 513, 518,
+ 519, 520, 521, 522, 523, 527, 532, 541, 551, 552,
+ 562, 564, 566, 568, 579, 586, 588, 593, 595, 597,
+ 599, 601, 611, 617, 618, 626, 628, 640, 641, 642,
+ 643, 644, 653, 658, 663, 671, 673, 675, 677, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 694, 695,
+ 704, 706, 715, 725, 730, 738, 739, 740, 741, 742,
+ 743, 744, 745, 750, 751, 759, 769, 778, 793, 798,
+ 799, 803, 804, 808, 809, 810, 811, 812, 813, 814,
+ 823, 827, 831, 840, 849, 865, 881, 891, 900, 916,
+ 917, 925, 926, 946, 947, 955, 966, 967, 968, 969,
+ 970, 971, 972, 973, 974, 975, 976, 977, 978, 979,
+ 980, 981, 982, 986, 991, 999, 1004, 1005, 1006, 1010,
+ 1015, 1023, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035,
+ 1043, 1053, 1058, 1066, 1068, 1070, 1079, 1081, 1086, 1087,
+ 1088, 1092, 1093, 1094, 1095, 1103, 1113, 1118, 1126, 1131,
+ 1132, 1140, 1145, 1150, 1158, 1163, 1164, 1165, 1174, 1176,
+ 1181, 1186, 1194, 1196, 1213, 1214, 1215, 1216, 1217, 1218,
+ 1222, 1223, 1224, 1225, 1226, 1227, 1235, 1240, 1245, 1253,
+ 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267,
+ 1276, 1277, 1278, 1285, 1292, 1299, 1315, 1334, 1342, 1344,
+ 1346, 1348, 1350, 1352, 1354, 1361, 1366, 1367, 1368, 1372,
+ 1376, 1385, 1387, 1390, 1394, 1398, 1399, 1400, 1404, 1415,
+ 1433, 1446, 1447, 1452, 1478, 1484, 1489, 1494, 1496, 1501,
+ 1502, 1510, 1512, 1520, 1525, 1533, 1558, 1565, 1575, 1576,
+ 1580, 1581, 1582, 1583, 1587, 1588, 1589, 1593, 1598, 1603,
+ 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1627, 1632, 1640,
+ 1645, 1653, 1655, 1659, 1664, 1669, 1677, 1682, 1690, 1699,
+ 1700, 1704, 1705, 1709, 1717, 1735, 1739, 1744, 1752, 1757,
+ 1758, 1762, 1767, 1775, 1780, 1785, 1790, 1795, 1803, 1808,
+ 1813, 1821, 1826, 1827, 1828, 1829, 1830
};
#endif
@@ -1412,11 +1425,11 @@ static const char *const yytname[] =
"T_Broadcast", "T_Broadcastclient", "T_Broadcastdelay", "T_Burst",
"T_Calibrate", "T_Ceiling", "T_Checkhash", "T_Clockstats", "T_Cohort",
"T_ControlKey", "T_Crypto", "T_Cryptostats", "T_Ctl", "T_Day",
- "T_Default", "T_Device", "T_Digest", "T_Disable", "T_Discard",
- "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Dscp",
- "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False", "T_File",
- "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4",
- "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Fuzz", "T_Host",
+ "T_Default", "T_Delrestrict", "T_Device", "T_Digest", "T_Disable",
+ "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
+ "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False",
+ "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3",
+ "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Fuzz", "T_Host",
"T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Ignorehash",
"T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile",
"T_Integer", "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit",
@@ -1458,10 +1471,10 @@ static const char *const yytname[] =
"tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
"monitoring_command", "stats_list", "stat", "filegen_option_list",
"filegen_option", "link_nolink", "enable_disable", "filegen_type",
- "access_control_command", "res_ippeerlimit", "ac_flag_list",
- "access_control_flag", "discard_option_list", "discard_option",
- "discard_option_keyword", "mru_option_list", "mru_option",
- "mru_option_keyword", "fudge_command", "fudge_factor_list",
+ "access_control_command", "restrict_mask", "res_ippeerlimit",
+ "ac_flag_list", "access_control_flag", "discard_option_list",
+ "discard_option", "discard_option_keyword", "mru_option_list",
+ "mru_option", "mru_option_keyword", "fudge_command", "fudge_factor_list",
"fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
"device_command", "device_item_list", "device_item",
"device_item_path_keyword", "rlimit_command", "rlimit_option_list",
@@ -1492,38 +1505,7 @@ yysymbol_name (yysymbol_kind_t yysymbol)
}
#endif
-#ifdef YYPRINT
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the
- (internal) symbol number NUM (which must be that of a token). */
-static const yytype_int16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
- 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
- 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
- 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
- 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
- 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
- 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
- 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
- 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
- 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
- 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
- 465, 466, 467, 468, 469, 124, 61, 40, 41, 123,
- 125
-};
-#endif
-
-#define YYPACT_NINF (-247)
+#define YYPACT_NINF (-280)
#define yypact_value_is_default(Yyn) \
((Yyn) == YYPACT_NINF)
@@ -1533,390 +1515,396 @@ static const yytype_int16 yytoknum[] =
#define yytable_value_is_error(Yyn) \
0
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 5, -178, -19, -247, -247, -247, -2, -247, -58, 294,
- 29, -94, -247, 294, -247, 109, -58, -247, -79, -247,
- -70, -68, -65, -247, -63, -247, -247, -58, 42, 205,
- -58, -247, -247, -56, -247, -50, -247, -247, -247, 45,
- 27, 41, 55, -34, -247, -247, -49, 109, -41, -247,
- 271, 554, -40, -64, 72, -247, -247, -247, 145, 196,
- -54, -247, -58, -247, -58, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, 33, 83, -22, -17,
- -247, -11, -247, -247, -52, -247, -247, -247, 26, -247,
- -247, -247, -121, -247, -5, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, -247, 294, -247, -247,
- -247, -247, -247, -247, 29, -247, 86, 119, -247, 294,
- -247, -247, -247, -247, -247, -247, -247, -247, -247, 319,
- 377, -247, -247, -10, -247, -63, -247, -247, -58, -247,
- -247, -247, -247, -247, -247, -247, -247, -247, 205, -247,
- 104, -58, -247, -247, 7, 23, -247, -247, -247, -247,
- -247, -247, -247, -247, 27, -247, 103, 154, 156, 103,
- 1, -247, -247, -247, -247, -34, -247, 126, -29, -247,
- 109, -247, -247, -247, -247, -247, -247, -247, -247, -247,
- -247, -247, -247, 271, -247, 33, 30, -247, -247, -247,
- -20, -247, -247, -247, -247, -247, -247, -247, -247, 554,
- -247, 139, 33, -247, -247, -247, 143, -64, -247, -247,
- -247, 155, -247, 20, -247, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, 4, -104, -247, -247,
- -247, -247, -247, 157, -247, 54, -247, -247, -121, -247,
- 57, -247, -247, -247, -247, -247, -4, 58, -247, -247,
- -247, -247, -247, 67, 175, -247, -247, 319, -247, 33,
- -20, -247, -247, -247, -247, -247, -247, -247, -247, -247,
- -247, -247, -247, 178, -247, 184, -247, 103, 103, -247,
- -40, -247, -247, -247, 79, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, -55, 214, -247, -247,
- -247, 48, -247, -247, -247, -247, -247, -247, -247, -247,
- -143, 51, 43, -247, -247, -247, -247, -247, -247, 88,
- -247, -247, -1, -247, -247, -247, -247, -247, -247, -247,
- -247, -247, 49, -247, 465, -247, -247, 465, 103, 465,
- 227, -40, 192, -247, 198, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -61, -247, 98, 64, 69,
- -150, -247, 62, -247, 33, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, 206, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
- -247, 226, -247, -247, 465, 465, -247, -247, -247, -247,
- -247, 68, -247, -247, -247, -58, -247, -247, -247, 81,
- -247, -247, -247, 465, -247, -247, 74, 84, 33, 76,
- -131, -247, 90, 33, -247, -247, -247, 78, 131, -247,
- -247, -247, -247, -247, 6, 91, 82, -247, 100, -247,
- 33, -247, -247
+ 10, -173, -31, -280, -280, -280, -11, -280, -89, -28,
+ 301, 3, -115, -280, 301, -280, 82, -28, -280, -98,
+ -280, -94, -83, -75, -280, -74, -280, -280, -28, 19,
+ 213, -28, -280, -280, -69, -280, -62, -280, -280, -280,
+ 35, 15, 101, 45, -42, -280, -280, -56, 82, -53,
+ -280, 53, 582, -49, -65, 49, -280, -280, -280, 129,
+ 202, -64, -280, -28, -280, -28, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, 0, 61, -29,
+ -24, -280, -22, -280, -280, -76, -280, -280, -280, 102,
+ -49, -280, 62, -280, -280, -113, -280, -18, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ 301, -280, -280, -280, -280, -280, -280, 3, -280, 89,
+ 122, -280, 301, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, 281, 384, -280, -280, -1, -280, -74, -280,
+ -280, -28, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, 213, -280, 92, -28, -280, -280, -13, -5, -280,
+ -280, -280, -280, -280, -280, -280, -280, 15, -280, 91,
+ 143, 145, 91, 62, -280, -280, -280, -280, -42, -280,
+ 111, -35, -280, 82, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, 53, -280, 0, 6,
+ -280, -280, -280, -38, -280, -280, -280, -280, -280, -280,
+ -280, -280, 582, -280, 115, 0, -280, -280, -280, 116,
+ -65, -280, -280, -280, 117, -280, -16, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, 8,
+ -112, -280, -280, -280, -280, -280, 118, -280, 17, -280,
+ -49, -280, -280, -280, -113, -280, 26, -280, -280, -280,
+ -280, -280, 21, 27, -280, -280, -280, -280, -280, 28,
+ 138, -280, -280, 281, -280, 0, -38, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, 140,
+ -280, 141, -280, 91, 91, -280, 91, -280, -280, 38,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -61, 173, -280, -280, -280, 387, -280, -280, -280,
+ -280, -280, -280, -280, -280, -87, 12, 5, -280, -280,
+ -280, -280, -280, -280, -280, 54, -280, -280, 1, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, 14, -280,
+ 513, -280, -280, 513, -280, 208, -49, 170, -280, 172,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -57, -280, 72, 31, 47, -151, -280, 30, -280, 0,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, 186,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, 199, -280, -280, 513,
+ 513, 513, -280, -280, -280, -280, 42, -280, -280, -280,
+ -28, -280, -280, -280, 48, -280, -280, -280, -280, -280,
+ 50, 52, 0, 56, -192, -280, 59, 0, -280, -280,
+ -280, 51, 139, -280, -280, -280, -280, -280, 85, 64,
+ 57, -280, 70, -280, 0, -280, -280
};
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE does not specify something else to do. Zero
- means the default is an error. */
+/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
static const yytype_int16 yydefact[] =
{
- 0, 0, 0, 25, 60, 253, 0, 73, 0, 0,
- 0, 267, 256, 0, 245, 0, 0, 261, 0, 285,
- 0, 0, 0, 257, 0, 262, 26, 0, 0, 0,
- 0, 286, 254, 0, 24, 0, 263, 268, 23, 0,
- 0, 0, 0, 0, 264, 22, 0, 0, 0, 255,
- 0, 0, 0, 0, 0, 58, 59, 322, 0, 2,
- 0, 7, 0, 8, 0, 9, 10, 13, 11, 12,
- 14, 20, 15, 16, 17, 18, 0, 0, 0, 0,
- 237, 0, 238, 19, 0, 5, 64, 65, 66, 30,
- 31, 29, 0, 27, 0, 211, 212, 213, 214, 217,
- 215, 216, 218, 219, 220, 221, 222, 206, 208, 209,
- 210, 163, 164, 165, 130, 161, 0, 265, 246, 205,
- 105, 106, 107, 108, 112, 109, 110, 111, 113, 0,
- 6, 67, 68, 260, 282, 247, 281, 314, 61, 63,
- 169, 170, 171, 172, 173, 174, 175, 176, 131, 167,
- 0, 62, 72, 312, 248, 249, 69, 297, 298, 299,
- 300, 301, 302, 303, 294, 296, 138, 30, 31, 138,
- 138, 70, 204, 202, 203, 198, 200, 0, 0, 250,
- 100, 104, 101, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 223, 225, 0, 0, 89, 90, 91,
- 0, 92, 93, 99, 94, 98, 95, 96, 97, 82,
- 84, 0, 0, 88, 276, 308, 0, 71, 307, 309,
- 305, 252, 1, 0, 4, 32, 57, 319, 318, 239,
- 240, 241, 242, 293, 292, 291, 0, 0, 81, 77,
- 78, 79, 80, 0, 74, 0, 197, 196, 192, 194,
- 0, 28, 207, 160, 162, 266, 102, 0, 188, 189,
- 190, 191, 187, 0, 0, 185, 186, 177, 179, 0,
- 0, 243, 259, 258, 244, 280, 313, 166, 168, 311,
- 272, 271, 269, 0, 295, 0, 140, 138, 138, 140,
- 0, 140, 199, 201, 0, 103, 224, 226, 320, 317,
- 315, 316, 87, 83, 85, 86, 251, 0, 306, 304,
- 3, 21, 287, 288, 289, 284, 290, 283, 326, 327,
- 0, 0, 0, 76, 75, 193, 195, 122, 121, 0,
- 119, 120, 0, 114, 117, 118, 183, 184, 182, 178,
- 180, 181, 0, 139, 134, 140, 140, 137, 138, 132,
- 275, 0, 0, 277, 0, 38, 39, 40, 56, 49,
- 51, 50, 53, 41, 42, 43, 44, 52, 54, 45,
- 46, 33, 34, 37, 35, 0, 36, 0, 0, 0,
- 0, 329, 0, 324, 0, 115, 129, 125, 127, 123,
- 124, 126, 128, 116, 0, 143, 144, 145, 146, 147,
- 148, 149, 151, 152, 150, 153, 154, 155, 156, 157,
- 158, 0, 159, 141, 135, 136, 140, 274, 273, 279,
- 278, 0, 47, 48, 55, 0, 323, 321, 328, 0,
- 325, 270, 142, 133, 310, 332, 0, 0, 0, 0,
- 0, 334, 0, 0, 330, 333, 331, 0, 0, 339,
- 340, 341, 342, 343, 0, 0, 0, 335, 0, 337,
- 0, 336, 338
+ 0, 0, 0, 25, 60, 256, 0, 73, 0, 0,
+ 0, 0, 270, 259, 0, 248, 0, 0, 264, 0,
+ 288, 0, 0, 0, 260, 0, 265, 26, 0, 0,
+ 0, 0, 289, 257, 0, 24, 0, 266, 271, 23,
+ 0, 0, 0, 0, 0, 267, 22, 0, 0, 0,
+ 258, 0, 0, 0, 0, 0, 58, 59, 325, 0,
+ 2, 0, 7, 0, 8, 0, 9, 10, 13, 11,
+ 12, 14, 20, 15, 16, 17, 18, 0, 0, 0,
+ 0, 240, 0, 241, 19, 0, 5, 64, 65, 66,
+ 0, 29, 139, 30, 31, 0, 27, 0, 214, 215,
+ 216, 217, 220, 218, 219, 221, 222, 223, 224, 225,
+ 209, 211, 212, 213, 166, 167, 168, 130, 164, 0,
+ 268, 249, 208, 105, 106, 107, 108, 112, 109, 110,
+ 111, 113, 0, 6, 67, 68, 263, 285, 250, 284,
+ 317, 61, 63, 172, 173, 174, 175, 176, 177, 178,
+ 179, 131, 170, 0, 62, 72, 315, 251, 252, 69,
+ 300, 301, 302, 303, 304, 305, 306, 297, 299, 141,
+ 30, 31, 141, 139, 70, 207, 205, 206, 201, 203,
+ 0, 0, 253, 100, 104, 101, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 226, 228, 0, 0,
+ 89, 90, 91, 0, 92, 93, 99, 94, 98, 95,
+ 96, 97, 82, 84, 0, 0, 88, 279, 311, 0,
+ 71, 310, 312, 308, 255, 1, 0, 4, 32, 57,
+ 322, 321, 242, 243, 244, 245, 296, 295, 294, 0,
+ 0, 81, 77, 78, 79, 80, 0, 74, 0, 138,
+ 0, 137, 200, 199, 195, 197, 0, 28, 210, 163,
+ 165, 269, 102, 0, 191, 192, 193, 194, 190, 0,
+ 0, 188, 189, 180, 182, 0, 0, 246, 262, 261,
+ 247, 283, 316, 169, 171, 314, 275, 274, 272, 0,
+ 298, 0, 143, 141, 141, 143, 141, 202, 204, 0,
+ 103, 227, 229, 323, 320, 318, 319, 87, 83, 85,
+ 86, 254, 0, 309, 307, 3, 21, 290, 291, 292,
+ 287, 293, 286, 329, 330, 0, 0, 0, 76, 75,
+ 140, 196, 198, 122, 121, 0, 119, 120, 0, 114,
+ 117, 118, 186, 187, 185, 181, 183, 184, 0, 142,
+ 133, 143, 143, 136, 143, 278, 0, 0, 280, 0,
+ 38, 39, 40, 56, 49, 51, 50, 53, 41, 42,
+ 43, 44, 52, 54, 45, 46, 33, 34, 37, 35,
+ 0, 36, 0, 0, 0, 0, 332, 0, 327, 0,
+ 115, 129, 125, 127, 123, 124, 126, 128, 116, 0,
+ 146, 147, 148, 149, 150, 151, 152, 154, 155, 153,
+ 156, 157, 158, 159, 160, 161, 0, 162, 144, 134,
+ 135, 132, 277, 276, 282, 281, 0, 47, 48, 55,
+ 0, 326, 324, 331, 0, 328, 273, 145, 313, 335,
+ 0, 0, 0, 0, 0, 337, 0, 0, 333, 336,
+ 334, 0, 0, 342, 343, 344, 345, 346, 0, 0,
+ 0, 338, 0, 340, 0, 339, 341
};
- /* YYPGOTO[NTERM-NUM]. */
+/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -247, -247, -247, -48, -247, -247, -8, -51, -247, -247,
- -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, -247, -247, 96, -247, -247, -247,
- -247, -42, -247, -247, -247, -247, -247, -247, -108, -246,
- -247, -247, 194, -247, -247, 163, -247, -247, -247, 50,
- -247, -247, -247, -247, 71, -247, -247, -247, 140, -247,
- -247, 303, -87, -247, -247, -247, -247, 127, -247, -247,
- -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
- -247, -247, -247, -247, 186, -247, -247, -247, -247, -247,
- -247, 159, -247, -247, 107, -247, -247, 296, 60, -193,
- -247, -247, -247, -247, 11, -247, -247, -53, -247, -247,
- -247, -106, -247, -122, -247
+ -280, -280, -280, -36, -280, -280, -9, -7, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, 69, -280, -280, -280,
+ -280, -45, -280, -280, -280, -280, -280, -280, 114, -157,
+ -279, -280, -280, 171, -280, -280, 142, -280, -280, -280,
+ 16, -280, -280, -280, -280, 68, -280, -280, -280, 123,
+ -280, -280, 278, -71, -280, -280, -280, -280, 106, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, 166, -280, -280, -280, -280,
+ -280, -280, 144, -280, -280, 87, -280, -280, 274, 37,
+ -196, -280, -280, -280, -280, -10, -280, -280, -59, -280,
+ -280, -280, -128, -280, -135, -280
};
- /* YYDEFGOTO[NTERM-NUM]. */
+/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- 0, 58, 59, 60, 61, 62, 137, 93, 94, 311,
- 371, 372, 373, 374, 375, 376, 377, 63, 64, 65,
- 66, 88, 244, 245, 67, 209, 210, 211, 212, 68,
- 180, 128, 256, 333, 334, 335, 393, 69, 286, 344,
- 413, 114, 115, 116, 148, 149, 150, 70, 267, 268,
- 269, 270, 71, 248, 249, 250, 72, 175, 176, 177,
- 73, 107, 108, 109, 110, 74, 193, 194, 195, 75,
- 76, 77, 274, 78, 79, 118, 155, 282, 283, 179,
- 418, 306, 353, 135, 136, 80, 81, 317, 236, 82,
- 164, 165, 221, 217, 218, 219, 154, 138, 302, 229,
- 213, 83, 84, 320, 321, 322, 380, 381, 437, 382,
- 440, 441, 454, 455, 456
+ 0, 59, 60, 61, 62, 63, 140, 96, 97, 316,
+ 376, 377, 378, 379, 380, 381, 382, 64, 65, 66,
+ 67, 89, 247, 248, 68, 212, 213, 214, 215, 69,
+ 183, 131, 262, 339, 340, 341, 398, 70, 251, 292,
+ 350, 418, 117, 118, 119, 151, 152, 153, 71, 273,
+ 274, 275, 276, 72, 254, 255, 256, 73, 178, 179,
+ 180, 74, 110, 111, 112, 113, 75, 196, 197, 198,
+ 76, 77, 78, 280, 79, 80, 121, 158, 288, 289,
+ 182, 423, 311, 358, 138, 139, 81, 82, 322, 239,
+ 83, 167, 168, 224, 220, 221, 222, 157, 141, 307,
+ 232, 216, 84, 85, 325, 326, 327, 385, 386, 441,
+ 387, 444, 445, 458, 459, 460
};
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule whose
- number is the opposite. If YYTABLE_NINF, syntax error. */
+/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 92, 214, 297, 386, 215, 181, 1, 422, 129, 312,
- 378, 223, 272, 172, 351, 2, 89, 378, 90, 305,
- 252, 3, 4, 5, 299, 246, 85, 233, 387, 327,
- 6, 7, 252, 170, 157, 158, 8, 328, 9, 10,
- 111, 329, 11, 347, 12, 349, 13, 14, 300, 86,
- 234, 15, 273, 280, 225, 159, 226, 355, 238, 247,
- 16, 289, 291, 318, 319, 17, 87, 356, 173, 227,
- 427, 166, 18, 285, 19, 235, 340, 313, 439, 314,
- 117, 330, 271, 239, 20, 21, 240, 22, 23, 444,
- 352, 281, 24, 25, 290, 130, 26, 27, 160, 414,
- 415, 228, 318, 319, 131, 28, 132, 357, 358, 133,
- 139, 134, 388, 156, 331, 167, 91, 168, 152, 29,
- 389, 30, 31, 171, 153, 178, 359, 32, 161, 423,
- 276, 174, 120, 182, 91, 112, 121, 33, 295, 390,
- 220, 113, 34, 276, 35, 222, 36, 360, 37, 38,
- 224, 230, 231, 216, 254, 255, 361, 232, 362, 39,
- 40, 41, 42, 43, 44, 45, 301, 237, 46, 251,
- 433, 47, 278, 48, 363, 285, 241, 242, 315, 345,
- 346, 279, 49, 243, 287, 332, 288, 294, 50, 51,
- 52, 430, 53, 54, 293, 364, 365, 391, 122, 55,
- 56, 392, 162, 316, 298, 169, 2, 304, 163, -6,
- 57, 307, 3, 4, 5, 91, 449, 450, 451, 452,
- 453, 6, 7, 309, 310, 323, 457, 8, 324, 9,
- 10, 326, 336, 11, 366, 12, 367, 13, 14, 348,
- 416, 337, 15, 338, 368, 442, 342, 123, 369, 370,
- 447, 16, 343, 350, 354, 383, 17, 417, 124, 384,
- 420, 125, 385, 18, 394, 19, 421, 462, 140, 141,
- 142, 143, 424, 426, 431, 20, 21, 183, 22, 23,
- 425, 429, 432, 24, 25, 126, 434, 26, 27, 436,
- 438, 127, 443, 439, 446, 459, 28, 448, 460, 144,
- 419, 145, 95, 146, 461, 303, 184, 96, 253, 147,
- 29, 277, 30, 31, 97, 292, 119, 339, 32, 325,
- 296, 275, 257, 284, 308, 185, 151, 428, 33, 186,
- 341, 379, 458, 34, 445, 35, 0, 36, 0, 37,
- 38, 449, 450, 451, 452, 453, 0, 0, 0, 0,
- 39, 40, 41, 42, 43, 44, 45, 0, 0, 46,
- 0, 0, 47, 0, 48, 0, 0, 258, 259, 260,
- 261, 98, 0, 49, 0, 0, 0, 0, 0, 50,
- 51, 52, 0, 53, 54, 0, 0, 2, 0, 0,
- 55, 56, 0, 3, 4, 5, 0, 0, 0, 0,
- -6, 57, 6, 7, 0, 99, 100, 187, 8, 0,
- 9, 10, 0, 0, 11, 0, 12, 435, 13, 14,
- 0, 0, 0, 15, 101, 0, 262, 0, 0, 102,
- 0, 0, 16, 0, 0, 0, 0, 17, 0, 0,
- 188, 189, 190, 191, 18, 0, 19, 0, 192, 0,
- 0, 0, 0, 0, 0, 0, 20, 21, 0, 22,
- 23, 103, 0, 0, 24, 25, 0, 0, 26, 27,
- 0, 0, 263, 0, 0, 0, 0, 28, 0, 0,
- 0, 0, 0, 0, 0, 104, 105, 106, 0, 0,
- 0, 29, 264, 30, 31, 0, 0, 265, 266, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 395, 33,
- 0, 0, 0, 0, 34, 0, 35, 396, 36, 0,
- 37, 38, 0, 0, 0, 0, 397, 0, 0, 0,
- 0, 39, 40, 41, 42, 43, 44, 45, 0, 0,
- 46, 0, 0, 47, 0, 48, 398, 0, 0, 399,
- 0, 0, 0, 0, 49, 400, 0, 0, 0, 0,
- 50, 51, 52, 0, 53, 54, 196, 0, 197, 198,
- 0, 55, 56, 0, 0, 199, 0, 0, 200, 0,
- 401, 0, 57, 0, 402, 403, 0, 0, 404, 405,
- 406, 0, 407, 408, 409, 0, 410, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 201, 0, 0,
+ 95, 92, 302, 184, 218, 391, 175, 304, 132, 356,
+ 383, 1, 427, 317, 114, 295, 353, 236, 443, 310,
+ 2, 278, 160, 161, 226, 286, 3, 4, 5, 448,
+ 392, 305, 86, 173, 252, 6, 7, 230, 87, 258,
+ 237, 8, 9, 162, 10, 11, 217, 93, 12, 94,
+ 13, 258, 14, 15, 228, 333, 229, 16, 88, 186,
+ 120, 176, 279, 334, 287, 238, 17, 335, 253, 231,
+ 432, 18, 419, 420, 383, 421, 90, 133, 19, 346,
+ 20, 134, 318, 249, 319, 357, 91, 163, 142, 187,
+ 21, 22, 135, 23, 24, 323, 324, 277, 25, 26,
+ 136, 137, 27, 28, 159, 123, 155, 336, 188, 124,
+ 115, 29, 189, 156, 174, 393, 116, 164, 223, 181,
+ 323, 324, 185, 394, 177, 30, 91, 31, 32, 225,
+ 233, 169, 282, 33, 428, 241, 351, 352, 300, 354,
+ 337, 227, 395, 34, 240, 282, 234, 91, 35, 306,
+ 36, 235, 37, 219, 38, 39, 250, 257, 260, 261,
+ 242, 284, 285, 243, 291, 40, 41, 42, 43, 44,
+ 45, 46, 125, 293, 47, 294, 170, 48, 171, 49,
+ 298, 303, 299, 320, 309, 312, 314, 328, 50, 315,
+ 190, 165, 329, 435, 51, 52, 53, 166, 54, 55,
+ 396, 332, 342, 343, 397, 56, 57, 344, 321, 348,
+ 349, 338, 2, 355, 359, -6, 58, 388, 3, 4,
+ 5, 126, 389, 191, 192, 193, 194, 6, 7, 390,
+ 399, 195, 127, 8, 9, 128, 10, 11, 422, 425,
+ 12, 426, 13, 330, 14, 15, 446, 429, 430, 16,
+ 434, 451, 431, 244, 245, 436, 437, 440, 17, 129,
+ 246, 438, 443, 18, 450, 130, 172, 442, 466, 463,
+ 19, 452, 20, 447, 464, 465, 91, 143, 144, 145,
+ 146, 308, 21, 22, 263, 23, 24, 296, 259, 345,
+ 25, 26, 122, 283, 27, 28, 453, 454, 455, 456,
+ 457, 297, 301, 29, 281, 154, 461, 313, 147, 98,
+ 148, 290, 149, 347, 99, 384, 449, 30, 150, 31,
+ 32, 100, 331, 462, 0, 33, 433, 0, 0, 0,
+ 264, 265, 266, 267, 0, 34, 0, 0, 0, 0,
+ 35, 0, 36, 0, 37, 0, 38, 39, 0, 424,
+ 453, 454, 455, 456, 457, 0, 0, 40, 41, 42,
+ 43, 44, 45, 46, 0, 0, 47, 0, 0, 48,
+ 0, 49, 0, 0, 0, 0, 0, 0, 0, 101,
+ 50, 0, 0, 0, 0, 0, 51, 52, 53, 268,
+ 54, 55, 0, 0, 2, 0, 360, 56, 57, 0,
+ 3, 4, 5, 0, 0, 0, 361, -6, 58, 6,
+ 7, 0, 0, 102, 103, 8, 9, 0, 10, 11,
+ 0, 439, 12, 0, 13, 0, 14, 15, 0, 0,
+ 0, 16, 104, 0, 0, 269, 0, 105, 0, 0,
+ 17, 0, 0, 0, 0, 18, 0, 362, 363, 0,
+ 0, 0, 19, 0, 20, 270, 0, 0, 0, 0,
+ 271, 272, 0, 0, 21, 22, 364, 23, 24, 106,
+ 0, 0, 25, 26, 0, 0, 27, 28, 0, 0,
+ 0, 0, 0, 0, 0, 29, 0, 365, 0, 0,
+ 0, 0, 0, 107, 108, 109, 366, 0, 367, 30,
+ 0, 31, 32, 0, 0, 0, 0, 33, 0, 0,
+ 0, 0, 0, 0, 368, 0, 0, 34, 0, 0,
+ 0, 0, 35, 0, 36, 0, 37, 0, 38, 39,
+ 0, 0, 0, 0, 0, 369, 370, 0, 0, 40,
+ 41, 42, 43, 44, 45, 46, 0, 0, 47, 0,
+ 0, 48, 0, 49, 0, 0, 0, 400, 0, 0,
+ 0, 0, 50, 0, 0, 0, 401, 0, 51, 52,
+ 53, 0, 54, 55, 371, 402, 372, 0, 0, 56,
+ 57, 0, 0, 0, 373, 0, 0, 0, 374, 375,
+ 58, 0, 0, 0, 199, 403, 200, 201, 404, 0,
+ 0, 0, 0, 202, 405, 0, 203, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 406,
+ 0, 0, 0, 407, 408, 0, 204, 409, 410, 411,
+ 0, 412, 413, 414, 0, 415, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 411, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
- 0, 203, 0, 0, 0, 0, 0, 204, 0, 205,
- 0, 412, 0, 206, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 416, 0, 0, 205, 0,
+ 206, 0, 0, 0, 0, 0, 207, 0, 208, 0,
+ 0, 0, 209, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 207, 208
+ 417, 0, 0, 0, 0, 0, 210, 211
};
static const yytype_int16 yycheck[] =
{
- 8, 52, 195, 4, 68, 47, 1, 68, 16, 5,
- 160, 59, 22, 47, 69, 10, 74, 160, 76, 212,
- 107, 16, 17, 18, 44, 146, 204, 38, 29, 33,
- 25, 26, 119, 41, 7, 8, 31, 41, 33, 34,
- 11, 45, 37, 289, 39, 291, 41, 42, 68, 68,
- 61, 46, 62, 30, 62, 28, 64, 9, 32, 180,
- 55, 169, 170, 206, 207, 60, 68, 19, 102, 36,
- 220, 30, 67, 72, 69, 86, 269, 73, 209, 75,
- 174, 85, 130, 57, 79, 80, 60, 82, 83, 220,
- 145, 68, 87, 88, 93, 174, 91, 92, 71, 345,
- 346, 68, 206, 207, 174, 100, 174, 59, 60, 174,
- 68, 174, 113, 68, 118, 74, 174, 76, 174, 114,
- 121, 116, 117, 68, 174, 174, 78, 122, 101, 190,
- 138, 165, 23, 174, 174, 106, 27, 132, 180, 140,
- 68, 112, 137, 151, 139, 0, 141, 99, 143, 144,
- 204, 68, 174, 217, 68, 36, 108, 174, 110, 154,
- 155, 156, 157, 158, 159, 160, 186, 219, 163, 174,
- 416, 166, 68, 168, 126, 72, 150, 151, 174, 287,
- 288, 174, 177, 157, 30, 189, 30, 216, 183, 184,
- 185, 384, 187, 188, 68, 147, 148, 198, 89, 194,
- 195, 202, 175, 199, 174, 164, 10, 68, 181, 204,
- 205, 68, 16, 17, 18, 174, 210, 211, 212, 213,
- 214, 25, 26, 68, 204, 68, 220, 31, 174, 33,
- 34, 174, 174, 37, 186, 39, 188, 41, 42, 290,
- 348, 174, 46, 68, 196, 438, 68, 138, 200, 201,
- 443, 55, 68, 174, 40, 204, 60, 30, 149, 216,
- 68, 152, 174, 67, 215, 69, 68, 460, 63, 64,
- 65, 66, 174, 204, 68, 79, 80, 6, 82, 83,
- 216, 219, 56, 87, 88, 176, 218, 91, 92, 208,
- 216, 182, 216, 209, 204, 204, 100, 219, 216, 94,
- 351, 96, 8, 98, 204, 209, 35, 13, 114, 104,
- 114, 148, 116, 117, 20, 175, 13, 267, 122, 248,
- 193, 135, 3, 164, 217, 54, 30, 380, 132, 58,
- 270, 320, 454, 137, 440, 139, -1, 141, -1, 143,
- 144, 210, 211, 212, 213, 214, -1, -1, -1, -1,
- 154, 155, 156, 157, 158, 159, 160, -1, -1, 163,
- -1, -1, 166, -1, 168, -1, -1, 48, 49, 50,
- 51, 77, -1, 177, -1, -1, -1, -1, -1, 183,
- 184, 185, -1, 187, 188, -1, -1, 10, -1, -1,
- 194, 195, -1, 16, 17, 18, -1, -1, -1, -1,
- 204, 205, 25, 26, -1, 111, 112, 136, 31, -1,
- 33, 34, -1, -1, 37, -1, 39, 425, 41, 42,
- -1, -1, -1, 46, 130, -1, 107, -1, -1, 135,
- -1, -1, 55, -1, -1, -1, -1, 60, -1, -1,
- 169, 170, 171, 172, 67, -1, 69, -1, 177, -1,
- -1, -1, -1, -1, -1, -1, 79, 80, -1, 82,
- 83, 167, -1, -1, 87, 88, -1, -1, 91, 92,
- -1, -1, 153, -1, -1, -1, -1, 100, -1, -1,
- -1, -1, -1, -1, -1, 191, 192, 193, -1, -1,
- -1, 114, 173, 116, 117, -1, -1, 178, 179, 122,
- -1, -1, -1, -1, -1, -1, -1, -1, 43, 132,
- -1, -1, -1, -1, 137, -1, 139, 52, 141, -1,
- 143, 144, -1, -1, -1, -1, 61, -1, -1, -1,
- -1, 154, 155, 156, 157, 158, 159, 160, -1, -1,
- 163, -1, -1, 166, -1, 168, 81, -1, -1, 84,
- -1, -1, -1, -1, 177, 90, -1, -1, -1, -1,
- 183, 184, 185, -1, 187, 188, 12, -1, 14, 15,
- -1, 194, 195, -1, -1, 21, -1, -1, 24, -1,
- 115, -1, 205, -1, 119, 120, -1, -1, 123, 124,
- 125, -1, 127, 128, 129, -1, 131, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 53, -1, -1,
+ 9, 8, 198, 48, 69, 4, 48, 45, 17, 70,
+ 161, 1, 69, 5, 11, 172, 295, 39, 210, 215,
+ 10, 22, 7, 8, 60, 30, 16, 17, 18, 221,
+ 29, 69, 205, 42, 147, 25, 26, 37, 69, 110,
+ 62, 31, 32, 28, 34, 35, 53, 75, 38, 77,
+ 40, 122, 42, 43, 63, 34, 65, 47, 69, 6,
+ 175, 103, 63, 42, 69, 87, 56, 46, 181, 69,
+ 221, 61, 351, 352, 161, 354, 165, 175, 68, 275,
+ 70, 175, 74, 90, 76, 146, 175, 72, 69, 36,
+ 80, 81, 175, 83, 84, 207, 208, 133, 88, 89,
+ 175, 175, 92, 93, 69, 23, 175, 86, 55, 27,
+ 107, 101, 59, 175, 69, 114, 113, 102, 69, 175,
+ 207, 208, 175, 122, 166, 115, 175, 117, 118, 0,
+ 69, 30, 141, 123, 191, 33, 293, 294, 183, 296,
+ 119, 205, 141, 133, 220, 154, 175, 175, 138, 187,
+ 140, 175, 142, 218, 144, 145, 94, 175, 69, 37,
+ 58, 69, 175, 61, 73, 155, 156, 157, 158, 159,
+ 160, 161, 90, 30, 164, 30, 75, 167, 77, 169,
+ 69, 175, 217, 175, 69, 69, 69, 69, 178, 205,
+ 137, 176, 175, 389, 184, 185, 186, 182, 188, 189,
+ 199, 175, 175, 175, 203, 195, 196, 69, 200, 69,
+ 69, 190, 10, 175, 41, 205, 206, 205, 16, 17,
+ 18, 139, 217, 170, 171, 172, 173, 25, 26, 175,
+ 216, 178, 150, 31, 32, 153, 34, 35, 30, 69,
+ 38, 69, 40, 250, 42, 43, 442, 175, 217, 47,
+ 220, 447, 205, 151, 152, 69, 57, 209, 56, 177,
+ 158, 219, 210, 61, 205, 183, 165, 217, 464, 205,
+ 68, 220, 70, 217, 217, 205, 175, 64, 65, 66,
+ 67, 212, 80, 81, 3, 83, 84, 173, 117, 273,
+ 88, 89, 14, 151, 92, 93, 211, 212, 213, 214,
+ 215, 178, 196, 101, 138, 31, 221, 220, 95, 8,
+ 97, 167, 99, 276, 13, 325, 444, 115, 105, 117,
+ 118, 20, 254, 458, -1, 123, 385, -1, -1, -1,
+ 49, 50, 51, 52, -1, 133, -1, -1, -1, -1,
+ 138, -1, 140, -1, 142, -1, 144, 145, -1, 356,
+ 211, 212, 213, 214, 215, -1, -1, 155, 156, 157,
+ 158, 159, 160, 161, -1, -1, 164, -1, -1, 167,
+ -1, 169, -1, -1, -1, -1, -1, -1, -1, 78,
+ 178, -1, -1, -1, -1, -1, 184, 185, 186, 108,
+ 188, 189, -1, -1, 10, -1, 9, 195, 196, -1,
+ 16, 17, 18, -1, -1, -1, 19, 205, 206, 25,
+ 26, -1, -1, 112, 113, 31, 32, -1, 34, 35,
+ -1, 430, 38, -1, 40, -1, 42, 43, -1, -1,
+ -1, 47, 131, -1, -1, 154, -1, 136, -1, -1,
+ 56, -1, -1, -1, -1, 61, -1, 60, 61, -1,
+ -1, -1, 68, -1, 70, 174, -1, -1, -1, -1,
+ 179, 180, -1, -1, 80, 81, 79, 83, 84, 168,
+ -1, -1, 88, 89, -1, -1, 92, 93, -1, -1,
+ -1, -1, -1, -1, -1, 101, -1, 100, -1, -1,
+ -1, -1, -1, 192, 193, 194, 109, -1, 111, 115,
+ -1, 117, 118, -1, -1, -1, -1, 123, -1, -1,
+ -1, -1, -1, -1, 127, -1, -1, 133, -1, -1,
+ -1, -1, 138, -1, 140, -1, 142, -1, 144, 145,
+ -1, -1, -1, -1, -1, 148, 149, -1, -1, 155,
+ 156, 157, 158, 159, 160, 161, -1, -1, 164, -1,
+ -1, 167, -1, 169, -1, -1, -1, 44, -1, -1,
+ -1, -1, 178, -1, -1, -1, 53, -1, 184, 185,
+ 186, -1, 188, 189, 187, 62, 189, -1, -1, 195,
+ 196, -1, -1, -1, 197, -1, -1, -1, 201, 202,
+ 206, -1, -1, -1, 12, 82, 14, 15, 85, -1,
+ -1, -1, -1, 21, 91, -1, 24, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 161, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, 120, 121, -1, 54, 124, 125, 126,
+ -1, 128, 129, 130, -1, 132, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
- -1, 97, -1, -1, -1, -1, -1, 103, -1, 105,
- -1, 196, -1, 109, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 133, 134
+ -1, -1, -1, -1, -1, 162, -1, -1, 96, -1,
+ 98, -1, -1, -1, -1, -1, 104, -1, 106, -1,
+ -1, -1, 110, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 197, -1, -1, -1, -1, -1, 134, 135
};
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
+ state STATE-NUM. */
static const yytype_int16 yystos[] =
{
- 0, 1, 10, 16, 17, 18, 25, 26, 31, 33,
- 34, 37, 39, 41, 42, 46, 55, 60, 67, 69,
- 79, 80, 82, 83, 87, 88, 91, 92, 100, 114,
- 116, 117, 122, 132, 137, 139, 141, 143, 144, 154,
- 155, 156, 157, 158, 159, 160, 163, 166, 168, 177,
- 183, 184, 185, 187, 188, 194, 195, 205, 222, 223,
- 224, 225, 226, 238, 239, 240, 241, 245, 250, 258,
- 268, 273, 277, 281, 286, 290, 291, 292, 294, 295,
- 306, 307, 310, 322, 323, 204, 68, 68, 242, 74,
- 76, 174, 227, 228, 229, 8, 13, 20, 77, 111,
- 112, 130, 135, 167, 191, 192, 193, 282, 283, 284,
- 285, 11, 106, 112, 262, 263, 264, 174, 296, 282,
- 23, 27, 89, 138, 149, 152, 176, 182, 252, 227,
- 174, 174, 174, 174, 174, 304, 305, 227, 318, 68,
- 63, 64, 65, 66, 94, 96, 98, 104, 265, 266,
- 267, 318, 174, 174, 317, 297, 68, 7, 8, 28,
- 71, 101, 175, 181, 311, 312, 30, 74, 76, 164,
- 227, 68, 47, 102, 165, 278, 279, 280, 174, 300,
- 251, 252, 174, 6, 35, 54, 58, 136, 169, 170,
- 171, 172, 177, 287, 288, 289, 12, 14, 15, 21,
- 24, 53, 95, 97, 103, 105, 109, 133, 134, 246,
- 247, 248, 249, 321, 228, 68, 217, 314, 315, 316,
- 68, 313, 0, 224, 204, 227, 227, 36, 68, 320,
- 68, 174, 174, 38, 61, 86, 309, 219, 32, 57,
- 60, 150, 151, 157, 243, 244, 146, 180, 274, 275,
- 276, 174, 283, 263, 68, 36, 253, 3, 48, 49,
- 50, 51, 107, 153, 173, 178, 179, 269, 270, 271,
- 272, 224, 22, 62, 293, 305, 227, 266, 68, 174,
- 30, 68, 298, 299, 312, 72, 259, 30, 30, 259,
- 93, 259, 279, 68, 216, 252, 288, 320, 174, 44,
- 68, 186, 319, 247, 68, 320, 302, 68, 315, 68,
- 204, 230, 5, 73, 75, 174, 199, 308, 206, 207,
- 324, 325, 326, 68, 174, 275, 174, 33, 41, 45,
- 85, 118, 189, 254, 255, 256, 174, 174, 68, 270,
- 320, 319, 68, 68, 260, 259, 259, 260, 228, 260,
- 174, 69, 145, 303, 40, 9, 19, 59, 60, 78,
- 99, 108, 110, 126, 147, 148, 186, 188, 196, 200,
- 201, 231, 232, 233, 234, 235, 236, 237, 160, 325,
- 327, 328, 330, 204, 216, 174, 4, 29, 113, 121,
- 140, 198, 202, 257, 215, 43, 52, 61, 81, 84,
- 90, 115, 119, 120, 123, 124, 125, 127, 128, 129,
- 131, 161, 196, 261, 260, 260, 259, 30, 301, 228,
- 68, 68, 68, 190, 174, 216, 204, 220, 328, 219,
- 320, 68, 56, 260, 218, 227, 208, 329, 216, 209,
- 331, 332, 320, 216, 220, 332, 204, 320, 219, 210,
- 211, 212, 213, 214, 333, 334, 335, 220, 334, 204,
- 216, 204, 320
+ 0, 1, 10, 16, 17, 18, 25, 26, 31, 32,
+ 34, 35, 38, 40, 42, 43, 47, 56, 61, 68,
+ 70, 80, 81, 83, 84, 88, 89, 92, 93, 101,
+ 115, 117, 118, 123, 133, 138, 140, 142, 144, 145,
+ 155, 156, 157, 158, 159, 160, 161, 164, 167, 169,
+ 178, 184, 185, 186, 188, 189, 195, 196, 206, 223,
+ 224, 225, 226, 227, 239, 240, 241, 242, 246, 251,
+ 259, 270, 275, 279, 283, 288, 292, 293, 294, 296,
+ 297, 308, 309, 312, 324, 325, 205, 69, 69, 243,
+ 165, 175, 229, 75, 77, 228, 229, 230, 8, 13,
+ 20, 78, 112, 113, 131, 136, 168, 192, 193, 194,
+ 284, 285, 286, 287, 11, 107, 113, 264, 265, 266,
+ 175, 298, 284, 23, 27, 90, 139, 150, 153, 177,
+ 183, 253, 228, 175, 175, 175, 175, 175, 306, 307,
+ 228, 320, 69, 64, 65, 66, 67, 95, 97, 99,
+ 105, 267, 268, 269, 320, 175, 175, 319, 299, 69,
+ 7, 8, 28, 72, 102, 176, 182, 313, 314, 30,
+ 75, 77, 165, 228, 69, 48, 103, 166, 280, 281,
+ 282, 175, 302, 252, 253, 175, 6, 36, 55, 59,
+ 137, 170, 171, 172, 173, 178, 289, 290, 291, 12,
+ 14, 15, 21, 24, 54, 96, 98, 104, 106, 110,
+ 134, 135, 247, 248, 249, 250, 323, 229, 69, 218,
+ 316, 317, 318, 69, 315, 0, 225, 205, 228, 228,
+ 37, 69, 322, 69, 175, 175, 39, 62, 87, 311,
+ 220, 33, 58, 61, 151, 152, 158, 244, 245, 229,
+ 94, 260, 147, 181, 276, 277, 278, 175, 285, 265,
+ 69, 37, 254, 3, 49, 50, 51, 52, 108, 154,
+ 174, 179, 180, 271, 272, 273, 274, 225, 22, 63,
+ 295, 307, 228, 268, 69, 175, 30, 69, 300, 301,
+ 314, 73, 261, 30, 30, 261, 260, 281, 69, 217,
+ 253, 290, 322, 175, 45, 69, 187, 321, 248, 69,
+ 322, 304, 69, 317, 69, 205, 231, 5, 74, 76,
+ 175, 200, 310, 207, 208, 326, 327, 328, 69, 175,
+ 229, 277, 175, 34, 42, 46, 86, 119, 190, 255,
+ 256, 257, 175, 175, 69, 272, 322, 321, 69, 69,
+ 262, 261, 261, 262, 261, 175, 70, 146, 305, 41,
+ 9, 19, 60, 61, 79, 100, 109, 111, 127, 148,
+ 149, 187, 189, 197, 201, 202, 232, 233, 234, 235,
+ 236, 237, 238, 161, 327, 329, 330, 332, 205, 217,
+ 175, 4, 29, 114, 122, 141, 199, 203, 258, 216,
+ 44, 53, 62, 82, 85, 91, 116, 120, 121, 124,
+ 125, 126, 128, 129, 130, 132, 162, 197, 263, 262,
+ 262, 262, 30, 303, 229, 69, 69, 69, 191, 175,
+ 217, 205, 221, 330, 220, 322, 69, 57, 219, 228,
+ 209, 331, 217, 210, 333, 334, 322, 217, 221, 334,
+ 205, 322, 220, 211, 212, 213, 214, 215, 335, 336,
+ 337, 221, 336, 205, 217, 205, 322
};
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
static const yytype_int16 yyr1[] =
{
- 0, 221, 222, 223, 223, 223, 224, 224, 224, 224,
- 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
- 224, 225, 226, 226, 226, 226, 226, 227, 227, 228,
- 229, 229, 230, 230, 231, 231, 231, 232, 233, 233,
- 233, 233, 233, 233, 233, 233, 233, 234, 234, 235,
- 235, 235, 235, 235, 235, 236, 237, 238, 239, 239,
- 240, 240, 240, 240, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 242, 242, 243, 243, 244, 244, 244,
- 244, 244, 245, 246, 246, 247, 247, 247, 247, 248,
- 248, 248, 248, 248, 248, 248, 248, 248, 249, 249,
- 250, 250, 250, 251, 251, 252, 252, 252, 252, 252,
- 252, 252, 252, 253, 253, 254, 254, 254, 254, 255,
- 255, 256, 256, 257, 257, 257, 257, 257, 257, 257,
- 258, 258, 258, 258, 258, 258, 258, 258, 259, 259,
- 260, 260, 260, 261, 261, 261, 261, 261, 261, 261,
- 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
- 262, 262, 263, 264, 264, 264, 265, 265, 266, 267,
- 267, 267, 267, 267, 267, 267, 267, 268, 269, 269,
- 270, 270, 270, 270, 270, 271, 271, 271, 272, 272,
- 272, 272, 273, 274, 274, 275, 276, 276, 277, 278,
- 278, 279, 280, 280, 280, 281, 281, 282, 282, 283,
- 283, 284, 284, 284, 284, 284, 284, 285, 285, 285,
- 285, 285, 285, 286, 287, 287, 288, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 290, 290, 290,
- 290, 290, 290, 290, 290, 290, 290, 290, 290, 290,
- 290, 290, 290, 291, 291, 291, 292, 292, 293, 293,
- 293, 294, 295, 295, 295, 296, 296, 296, 297, 297,
- 298, 299, 299, 300, 301, 301, 302, 302, 303, 303,
- 304, 304, 305, 306, 306, 307, 307, 308, 308, 308,
- 308, 309, 309, 309, 310, 311, 311, 312, 312, 312,
- 312, 312, 312, 312, 313, 313, 314, 314, 315, 315,
- 316, 317, 317, 318, 318, 319, 319, 319, 320, 320,
- 321, 322, 323, 324, 324, 325, 326, 326, 327, 327,
- 328, 329, 330, 331, 331, 332, 333, 333, 334, 335,
- 335, 335, 335, 335
+ 0, 222, 223, 224, 224, 224, 225, 225, 225, 225,
+ 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
+ 225, 226, 227, 227, 227, 227, 227, 228, 228, 229,
+ 230, 230, 231, 231, 232, 232, 232, 233, 234, 234,
+ 234, 234, 234, 234, 234, 234, 234, 235, 235, 236,
+ 236, 236, 236, 236, 236, 237, 238, 239, 240, 240,
+ 241, 241, 241, 241, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 243, 243, 244, 244, 245, 245, 245,
+ 245, 245, 246, 247, 247, 248, 248, 248, 248, 249,
+ 249, 249, 249, 249, 249, 249, 249, 249, 250, 250,
+ 251, 251, 251, 252, 252, 253, 253, 253, 253, 253,
+ 253, 253, 253, 254, 254, 255, 255, 255, 255, 256,
+ 256, 257, 257, 258, 258, 258, 258, 258, 258, 258,
+ 259, 259, 259, 259, 259, 259, 259, 259, 259, 260,
+ 260, 261, 261, 262, 262, 262, 263, 263, 263, 263,
+ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
+ 263, 263, 263, 264, 264, 265, 266, 266, 266, 267,
+ 267, 268, 269, 269, 269, 269, 269, 269, 269, 269,
+ 270, 271, 271, 272, 272, 272, 272, 272, 273, 273,
+ 273, 274, 274, 274, 274, 275, 276, 276, 277, 278,
+ 278, 279, 280, 280, 281, 282, 282, 282, 283, 283,
+ 284, 284, 285, 285, 286, 286, 286, 286, 286, 286,
+ 287, 287, 287, 287, 287, 287, 288, 289, 289, 290,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 293, 293, 293, 294,
+ 294, 295, 295, 295, 296, 297, 297, 297, 298, 298,
+ 298, 299, 299, 300, 301, 301, 302, 303, 303, 304,
+ 304, 305, 305, 306, 306, 307, 308, 308, 309, 309,
+ 310, 310, 310, 310, 311, 311, 311, 312, 313, 313,
+ 314, 314, 314, 314, 314, 314, 314, 315, 315, 316,
+ 316, 317, 317, 318, 319, 319, 320, 320, 321, 321,
+ 321, 322, 322, 323, 324, 325, 326, 326, 327, 328,
+ 328, 329, 329, 330, 331, 332, 333, 333, 334, 335,
+ 335, 336, 337, 337, 337, 337, 337
};
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
static const yytype_int8 yyr2[] =
{
0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
@@ -1932,28 +1920,28 @@ static const yytype_int8 yyr2[] =
2, 2, 3, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 2, 2, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 4, 6, 4, 5, 5, 4, 0, 2,
- 0, 2, 3, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 5, 4, 5, 5, 4, 3, 3, 0,
+ 2, 0, 2, 0, 2, 3, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 2, 1, 1, 1, 2, 1, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 2, 1,
- 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
- 1, 1, 3, 2, 1, 2, 1, 1, 2, 2,
- 1, 2, 1, 1, 1, 2, 2, 2, 1, 1,
+ 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
+ 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 2, 1, 2, 2, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 3, 2, 1, 2, 1,
+ 1, 2, 2, 1, 2, 1, 1, 1, 2, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 3, 3, 1, 2, 2, 2, 2,
- 2, 3, 2, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 2, 0, 0, 2,
- 4, 1, 1, 4, 1, 0, 0, 2, 2, 2,
- 2, 1, 1, 3, 3, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
- 5, 2, 1, 2, 1, 1, 1, 1, 1, 1,
- 2, 5, 1, 3, 2, 3, 1, 1, 2, 1,
- 5, 4, 3, 2, 1, 6, 3, 2, 3, 1,
- 1, 1, 1, 1
+ 1, 1, 2, 2, 2, 2, 3, 3, 1, 2,
+ 2, 2, 2, 2, 3, 2, 1, 1, 1, 1,
+ 1, 1, 1, 0, 1, 1, 1, 1, 1, 2,
+ 0, 0, 2, 4, 1, 1, 4, 1, 0, 0,
+ 2, 2, 2, 2, 1, 1, 3, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
+ 1, 1, 1, 5, 2, 1, 2, 1, 1, 1,
+ 1, 1, 1, 2, 5, 1, 3, 2, 3, 1,
+ 1, 2, 1, 5, 4, 3, 2, 1, 6, 3,
+ 2, 3, 1, 1, 1, 1, 1
};
@@ -1965,6 +1953,7 @@ enum { YYENOMEM = -2 };
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
+#define YYNOMEM goto yyexhaustedlab
#define YYRECOVERING() (!!yyerrstatus)
@@ -2005,10 +1994,7 @@ do { \
YYFPRINTF Args; \
} while (0)
-/* This macro is provided for backward compatibility. */
-# ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
@@ -2035,10 +2021,6 @@ yy_symbol_value_print (FILE *yyo,
YY_USE (yyoutput);
if (!yyvaluep)
return;
-# ifdef YYPRINT
- if (yykind < YYNTOKENS)
- YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
-# endif
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YY_USE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
@@ -2223,6 +2205,7 @@ yyparse (void)
YYDPRINTF ((stderr, "Starting parse\n"));
yychar = YYEMPTY; /* Cause a token to be read. */
+
goto yysetstate;
@@ -2248,7 +2231,7 @@ yysetstate:
if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- goto yyexhaustedlab;
+ YYNOMEM;
#else
{
/* Get the current used size of the three stacks, in elements. */
@@ -2276,7 +2259,7 @@ yysetstate:
# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ YYNOMEM;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
@@ -2287,7 +2270,7 @@ yysetstate:
YY_CAST (union yyalloc *,
YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
if (! yyptr)
- goto yyexhaustedlab;
+ YYNOMEM;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
@@ -2309,6 +2292,7 @@ yysetstate:
}
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
if (yystate == YYFINAL)
YYACCEPT;
@@ -2421,7 +2405,7 @@ yyreduce:
switch (yyn)
{
case 5: /* command_list: error T_EOC */
-#line 404 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 406 "../../ntpd/ntp_parser.y"
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2434,85 +2418,85 @@ yyreduce:
ip_ctx->errpos.nline,
ip_ctx->errpos.ncol);
}
-#line 2438 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2422 "ntp_parser.c"
break;
case 21: /* server_command: client_type address option_list */
-#line 441 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 443 "../../ntpd/ntp_parser.y"
{
peer_node *my_node;
my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.peers, my_node);
}
-#line 2449 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2433 "ntp_parser.c"
break;
case 28: /* address: address_fam T_String */
-#line 460 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 462 "../../ntpd/ntp_parser.y"
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2455 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2439 "ntp_parser.c"
break;
case 29: /* ip_address: T_String */
-#line 465 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 467 "../../ntpd/ntp_parser.y"
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2461 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2445 "ntp_parser.c"
break;
case 30: /* address_fam: T_Ipv4_flag */
-#line 470 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 472 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = AF_INET; }
-#line 2467 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2451 "ntp_parser.c"
break;
case 31: /* address_fam: T_Ipv6_flag */
-#line 472 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 474 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = AF_INET6; }
-#line 2473 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2457 "ntp_parser.c"
break;
case 32: /* option_list: %empty */
-#line 477 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 479 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2463 "ntp_parser.c"
break;
case 33: /* option_list: option_list option */
-#line 479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 481 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2488 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2472 "ntp_parser.c"
break;
case 37: /* option_flag: option_flag_keyword */
-#line 493 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 495 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2494 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2478 "ntp_parser.c"
break;
case 47: /* option_int: option_int_keyword T_Integer */
-#line 510 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 512 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2500 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2484 "ntp_parser.c"
break;
case 48: /* option_int: option_int_keyword T_U_int */
-#line 512 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 514 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2506 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2490 "ntp_parser.c"
break;
case 55: /* option_str: option_str_keyword T_String */
-#line 526 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 528 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2512 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2496 "ntp_parser.c"
break;
case 57: /* unpeer_command: unpeer_keyword address */
-#line 540 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 542 "../../ntpd/ntp_parser.y"
{
unpeer_node *my_node;
@@ -2520,85 +2504,85 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2524 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2508 "ntp_parser.c"
break;
case 60: /* other_mode_command: T_Broadcastclient */
-#line 561 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 563 "../../ntpd/ntp_parser.y"
{ cfgt.broadcastclient = 1; }
-#line 2530 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2514 "ntp_parser.c"
break;
case 61: /* other_mode_command: T_Manycastserver address_list */
-#line 563 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 565 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2536 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2520 "ntp_parser.c"
break;
case 62: /* other_mode_command: T_Multicastclient address_list */
-#line 565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 567 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2542 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2526 "ntp_parser.c"
break;
case 63: /* other_mode_command: T_Mdnstries T_Integer */
-#line 567 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 569 "../../ntpd/ntp_parser.y"
{ cfgt.mdnstries = (yyvsp[0].Integer); }
-#line 2548 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2532 "ntp_parser.c"
break;
case 64: /* authentication_command: T_Automax T_Integer */
-#line 578 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 580 "../../ntpd/ntp_parser.y"
{
attr_val *atrv;
atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
-#line 2559 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2543 "ntp_parser.c"
break;
case 65: /* authentication_command: T_ControlKey T_Integer */
-#line 585 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 587 "../../ntpd/ntp_parser.y"
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2549 "ntp_parser.c"
break;
case 66: /* authentication_command: T_Crypto crypto_command_list */
-#line 587 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 589 "../../ntpd/ntp_parser.y"
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2574 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2558 "ntp_parser.c"
break;
case 67: /* authentication_command: T_Keys T_String */
-#line 592 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 594 "../../ntpd/ntp_parser.y"
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2580 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2564 "ntp_parser.c"
break;
case 68: /* authentication_command: T_Keysdir T_String */
-#line 594 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 596 "../../ntpd/ntp_parser.y"
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2586 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2570 "ntp_parser.c"
break;
case 69: /* authentication_command: T_Requestkey T_Integer */
-#line 596 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 598 "../../ntpd/ntp_parser.y"
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2592 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2576 "ntp_parser.c"
break;
case 70: /* authentication_command: T_Revoke T_Integer */
-#line 598 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 600 "../../ntpd/ntp_parser.y"
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2598 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2582 "ntp_parser.c"
break;
case 71: /* authentication_command: T_Trustedkey integer_list_range */
-#line 600 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 602 "../../ntpd/ntp_parser.y"
{
/* [Bug 948] leaves it open if appending or
* replacing the trusted key list is the right
@@ -2608,38 +2592,38 @@ yyreduce:
DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2612 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2596 "ntp_parser.c"
break;
case 72: /* authentication_command: T_NtpSignDsocket T_String */
-#line 610 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 612 "../../ntpd/ntp_parser.y"
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2618 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2602 "ntp_parser.c"
break;
case 73: /* crypto_command_list: %empty */
-#line 615 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 617 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2624 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2608 "ntp_parser.c"
break;
case 74: /* crypto_command_list: crypto_command_list crypto_command */
-#line 617 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 619 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2633 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2617 "ntp_parser.c"
break;
case 75: /* crypto_command: crypto_str_keyword T_String */
-#line 625 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 627 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2639 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2623 "ntp_parser.c"
break;
case 76: /* crypto_command: T_Revoke T_Integer */
-#line 627 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 629 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2648,65 +2632,65 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2652 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2636 "ntp_parser.c"
break;
case 82: /* orphan_mode_command: T_Tos tos_option_list */
-#line 652 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 654 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2658 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2642 "ntp_parser.c"
break;
case 83: /* tos_option_list: tos_option_list tos_option */
-#line 657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 659 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2667 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2651 "ntp_parser.c"
break;
case 84: /* tos_option_list: tos_option */
-#line 662 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 664 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2660 "ntp_parser.c"
break;
case 85: /* tos_option: tos_option_int_keyword T_Integer */
-#line 670 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 672 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2682 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2666 "ntp_parser.c"
break;
case 86: /* tos_option: tos_option_dbl_keyword number */
-#line 672 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 674 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2688 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2672 "ntp_parser.c"
break;
case 87: /* tos_option: T_Cohort boolean */
-#line 674 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 676 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2694 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2678 "ntp_parser.c"
break;
case 88: /* tos_option: basedate */
-#line 676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 678 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
-#line 2700 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2684 "ntp_parser.c"
break;
case 100: /* monitoring_command: T_Statistics stats_list */
-#line 703 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 705 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2706 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2690 "ntp_parser.c"
break;
case 101: /* monitoring_command: T_Statsdir T_String */
-#line 705 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 707 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2715,55 +2699,55 @@ yyreduce:
yyerror("statsdir remote configuration ignored");
}
}
-#line 2719 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2703 "ntp_parser.c"
break;
case 102: /* monitoring_command: T_Filegen stat filegen_option_list */
-#line 714 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 716 "../../ntpd/ntp_parser.y"
{
filegen_node *fgn;
fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
-#line 2730 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2714 "ntp_parser.c"
break;
case 103: /* stats_list: stats_list stat */
-#line 724 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 726 "../../ntpd/ntp_parser.y"
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2739 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2723 "ntp_parser.c"
break;
case 104: /* stats_list: stat */
-#line 729 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 731 "../../ntpd/ntp_parser.y"
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2732 "ntp_parser.c"
break;
case 113: /* filegen_option_list: %empty */
-#line 748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 750 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2754 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2738 "ntp_parser.c"
break;
case 114: /* filegen_option_list: filegen_option_list filegen_option */
-#line 750 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 752 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2763 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2747 "ntp_parser.c"
break;
case 115: /* filegen_option: T_File T_String */
-#line 758 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 760 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2773,11 +2757,11 @@ yyreduce:
yyerror("filegen file remote config ignored");
}
}
-#line 2777 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2761 "ntp_parser.c"
break;
case 116: /* filegen_option: T_Type filegen_type */
-#line 768 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 770 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2786,11 +2770,11 @@ yyreduce:
yyerror("filegen type remote config ignored");
}
}
-#line 2790 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2774 "ntp_parser.c"
break;
case 117: /* filegen_option: link_nolink */
-#line 777 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 779 "../../ntpd/ntp_parser.y"
{
const char *err;
@@ -2805,69 +2789,59 @@ yyreduce:
yyerror(err);
}
}
-#line 2809 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2793 "ntp_parser.c"
break;
case 118: /* filegen_option: enable_disable */
-#line 792 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 794 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2815 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2799 "ntp_parser.c"
break;
case 130: /* access_control_command: T_Discard discard_option_list */
-#line 822 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 824 "../../ntpd/ntp_parser.y"
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2823 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2807 "ntp_parser.c"
break;
case 131: /* access_control_command: T_Mru mru_option_list */
-#line 826 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 828 "../../ntpd/ntp_parser.y"
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2831 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
- break;
-
- case 132: /* access_control_command: T_Restrict address res_ippeerlimit ac_flag_list */
-#line 830 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
- {
- restrict_node *rn;
-
- rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
- lex_current()->curpos.nline);
- APPEND_G_FIFO(cfgt.restrict_opts, rn);
- }
-#line 2843 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2815 "ntp_parser.c"
break;
- case 133: /* access_control_command: T_Restrict address T_Mask ip_address res_ippeerlimit ac_flag_list */
-#line 838 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 132: /* access_control_command: T_Restrict address restrict_mask res_ippeerlimit ac_flag_list */
+#line 832 "../../ntpd/ntp_parser.y"
{
restrict_node *rn;
- rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
- lex_current()->curpos.nline);
+ rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2855 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2828 "ntp_parser.c"
break;
- case 134: /* access_control_command: T_Restrict T_Default res_ippeerlimit ac_flag_list */
-#line 846 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 133: /* access_control_command: T_Restrict T_Default res_ippeerlimit ac_flag_list */
+#line 841 "../../ntpd/ntp_parser.y"
{
restrict_node *rn;
- rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
- lex_current()->curpos.nline);
+ rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2867 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2841 "ntp_parser.c"
break;
- case 135: /* access_control_command: T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list */
-#line 854 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 134: /* access_control_command: T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list */
+#line 850 "../../ntpd/ntp_parser.y"
{
restrict_node *rn;
@@ -2878,15 +2852,16 @@ yyreduce:
create_address_node(
estrdup("0.0.0.0"),
AF_INET),
- (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
- lex_current()->curpos.nline);
+ (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2886 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2861 "ntp_parser.c"
break;
- case 136: /* access_control_command: T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list */
-#line 869 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 135: /* access_control_command: T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list */
+#line 866 "../../ntpd/ntp_parser.y"
{
restrict_node *rn;
@@ -2897,34 +2872,79 @@ yyreduce:
create_address_node(
estrdup("::"),
AF_INET6),
- (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
- lex_current()->curpos.nline);
+ (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2905 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2881 "ntp_parser.c"
break;
- case 137: /* access_control_command: T_Restrict T_Source res_ippeerlimit ac_flag_list */
-#line 884 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 136: /* access_control_command: T_Restrict T_Source res_ippeerlimit ac_flag_list */
+#line 882 "../../ntpd/ntp_parser.y"
{
restrict_node * rn;
APPEND_G_FIFO((yyvsp[0].Attr_val_fifo), create_attr_ival((yyvsp[-2].Integer), 1));
- rn = create_restrict_node(
- NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), lex_current()->curpos.nline);
+ rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2918 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2895 "ntp_parser.c"
break;
- case 138: /* res_ippeerlimit: %empty */
-#line 896 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 137: /* access_control_command: T_Delrestrict ip_address restrict_mask */
+#line 892 "../../ntpd/ntp_parser.y"
+ {
+ restrict_node * rn;
+
+ rn = create_restrict_node((yyvsp[-1].Address_node), (yyvsp[0].Address_node), -1, NULL, TRUE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
+ }
+#line 2908 "ntp_parser.c"
+ break;
+
+ case 138: /* access_control_command: T_Delrestrict T_Source ip_address */
+#line 901 "../../ntpd/ntp_parser.y"
+ {
+ restrict_node * rn;
+ attr_val_fifo * avf;
+
+ avf = NULL;
+ APPEND_G_FIFO(avf, create_attr_ival((yyvsp[-1].Integer), 1));
+ rn = create_restrict_node((yyvsp[0].Address_node), NULL, -1, avf, TRUE,
+ lex_current()->curpos.nline,
+ lex_current()->curpos.ncol);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
+ }
+#line 2924 "ntp_parser.c"
+ break;
+
+ case 139: /* restrict_mask: %empty */
+#line 916 "../../ntpd/ntp_parser.y"
+ { (yyval.Address_node) = NULL; }
+#line 2930 "ntp_parser.c"
+ break;
+
+ case 140: /* restrict_mask: T_Mask ip_address */
+#line 918 "../../ntpd/ntp_parser.y"
+ {
+ (yyval.Address_node) = (yyvsp[0].Address_node);
+ }
+#line 2938 "ntp_parser.c"
+ break;
+
+ case 141: /* res_ippeerlimit: %empty */
+#line 925 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = -1; }
-#line 2924 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2944 "ntp_parser.c"
break;
- case 139: /* res_ippeerlimit: T_Ippeerlimit T_Integer */
-#line 898 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 142: /* res_ippeerlimit: T_Ippeerlimit T_Integer */
+#line 927 "../../ntpd/ntp_parser.y"
{
if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
struct FILE_INFO * ip_ctx;
@@ -2934,23 +2954,23 @@ yyreduce:
"Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.",
(yyvsp[0].Integer),
ip_ctx->fname,
- ip_ctx->errpos.nline,
- ip_ctx->errpos.ncol);
+ ip_ctx->curpos.nline,
+ ip_ctx->curpos.ncol);
(yyvsp[0].Integer) = 0;
}
(yyval.Integer) = (yyvsp[0].Integer);
}
-#line 2944 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2964 "ntp_parser.c"
break;
- case 140: /* ac_flag_list: %empty */
-#line 917 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 143: /* ac_flag_list: %empty */
+#line 946 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2950 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2970 "ntp_parser.c"
break;
- case 141: /* ac_flag_list: ac_flag_list access_control_flag */
-#line 919 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 144: /* ac_flag_list: ac_flag_list access_control_flag */
+#line 948 "../../ntpd/ntp_parser.y"
{
attr_val *av;
@@ -2958,11 +2978,11 @@ yyreduce:
av = create_attr_ival((yyvsp[0].Integer), 1);
APPEND_G_FIFO((yyval.Attr_val_fifo), av);
}
-#line 2962 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2982 "ntp_parser.c"
break;
- case 142: /* ac_flag_list: ac_flag_list T_Serverresponse T_Fuzz */
-#line 927 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 145: /* ac_flag_list: ac_flag_list T_Serverresponse T_Fuzz */
+#line 956 "../../ntpd/ntp_parser.y"
{
attr_val *av;
@@ -2970,100 +2990,100 @@ yyreduce:
av = create_attr_ival(T_ServerresponseFuzz, 1);
APPEND_G_FIFO((yyval.Attr_val_fifo), av);
}
-#line 2974 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 2994 "ntp_parser.c"
break;
- case 160: /* discard_option_list: discard_option_list discard_option */
-#line 958 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 163: /* discard_option_list: discard_option_list discard_option */
+#line 987 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2983 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3003 "ntp_parser.c"
break;
- case 161: /* discard_option_list: discard_option */
-#line 963 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 164: /* discard_option_list: discard_option */
+#line 992 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2992 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3012 "ntp_parser.c"
break;
- case 162: /* discard_option: discard_option_keyword T_Integer */
-#line 971 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 165: /* discard_option: discard_option_keyword T_Integer */
+#line 1000 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2998 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3018 "ntp_parser.c"
break;
- case 166: /* mru_option_list: mru_option_list mru_option */
-#line 982 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 169: /* mru_option_list: mru_option_list mru_option */
+#line 1011 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3007 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3027 "ntp_parser.c"
break;
- case 167: /* mru_option_list: mru_option */
-#line 987 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 170: /* mru_option_list: mru_option */
+#line 1016 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3016 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3036 "ntp_parser.c"
break;
- case 168: /* mru_option: mru_option_keyword T_Integer */
-#line 995 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 171: /* mru_option: mru_option_keyword T_Integer */
+#line 1024 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3022 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3042 "ntp_parser.c"
break;
- case 177: /* fudge_command: T_Fudge address fudge_factor_list */
-#line 1015 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 180: /* fudge_command: T_Fudge address fudge_factor_list */
+#line 1044 "../../ntpd/ntp_parser.y"
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
-#line 3033 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3053 "ntp_parser.c"
break;
- case 178: /* fudge_factor_list: fudge_factor_list fudge_factor */
-#line 1025 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 181: /* fudge_factor_list: fudge_factor_list fudge_factor */
+#line 1054 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3042 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3062 "ntp_parser.c"
break;
- case 179: /* fudge_factor_list: fudge_factor */
-#line 1030 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 182: /* fudge_factor_list: fudge_factor */
+#line 1059 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3051 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3071 "ntp_parser.c"
break;
- case 180: /* fudge_factor: fudge_factor_dbl_keyword number */
-#line 1038 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 183: /* fudge_factor: fudge_factor_dbl_keyword number */
+#line 1067 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 3057 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3077 "ntp_parser.c"
break;
- case 181: /* fudge_factor: fudge_factor_bool_keyword boolean */
-#line 1040 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 184: /* fudge_factor: fudge_factor_bool_keyword boolean */
+#line 1069 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3063 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3083 "ntp_parser.c"
break;
- case 182: /* fudge_factor: T_Stratum T_Integer */
-#line 1042 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 185: /* fudge_factor: T_Stratum T_Integer */
+#line 1071 "../../ntpd/ntp_parser.y"
{
if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -3072,124 +3092,124 @@ yyreduce:
yyerror("fudge factor: stratum value not in [0..16], ignored");
}
}
-#line 3076 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3096 "ntp_parser.c"
break;
- case 183: /* fudge_factor: T_Abbrev T_String */
-#line 1051 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 186: /* fudge_factor: T_Abbrev T_String */
+#line 1080 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 3082 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3102 "ntp_parser.c"
break;
- case 184: /* fudge_factor: T_Refid T_String */
-#line 1053 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 187: /* fudge_factor: T_Refid T_String */
+#line 1082 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 3088 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3108 "ntp_parser.c"
break;
- case 192: /* device_command: T_Device address device_item_list */
-#line 1075 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 195: /* device_command: T_Device address device_item_list */
+#line 1104 "../../ntpd/ntp_parser.y"
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.device, aon);
}
-#line 3099 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3119 "ntp_parser.c"
break;
- case 193: /* device_item_list: device_item_list device_item */
-#line 1085 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 196: /* device_item_list: device_item_list device_item */
+#line 1114 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3108 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3128 "ntp_parser.c"
break;
- case 194: /* device_item_list: device_item */
-#line 1090 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 197: /* device_item_list: device_item */
+#line 1119 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3117 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3137 "ntp_parser.c"
break;
- case 195: /* device_item: device_item_path_keyword T_String */
-#line 1098 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 198: /* device_item: device_item_path_keyword T_String */
+#line 1127 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 3123 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3143 "ntp_parser.c"
break;
- case 198: /* rlimit_command: T_Rlimit rlimit_option_list */
-#line 1112 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 201: /* rlimit_command: T_Rlimit rlimit_option_list */
+#line 1141 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 3129 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3149 "ntp_parser.c"
break;
- case 199: /* rlimit_option_list: rlimit_option_list rlimit_option */
-#line 1117 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 202: /* rlimit_option_list: rlimit_option_list rlimit_option */
+#line 1146 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3138 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3158 "ntp_parser.c"
break;
- case 200: /* rlimit_option_list: rlimit_option */
-#line 1122 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 203: /* rlimit_option_list: rlimit_option */
+#line 1151 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3147 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3167 "ntp_parser.c"
break;
- case 201: /* rlimit_option: rlimit_option_keyword T_Integer */
-#line 1130 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 204: /* rlimit_option: rlimit_option_keyword T_Integer */
+#line 1159 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3153 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3173 "ntp_parser.c"
break;
- case 205: /* system_option_command: T_Enable system_option_list */
-#line 1146 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 208: /* system_option_command: T_Enable system_option_list */
+#line 1175 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 3159 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3179 "ntp_parser.c"
break;
- case 206: /* system_option_command: T_Disable system_option_list */
-#line 1148 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 209: /* system_option_command: T_Disable system_option_list */
+#line 1177 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 3165 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3185 "ntp_parser.c"
break;
- case 207: /* system_option_list: system_option_list system_option */
-#line 1153 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 210: /* system_option_list: system_option_list system_option */
+#line 1182 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3174 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3194 "ntp_parser.c"
break;
- case 208: /* system_option_list: system_option */
-#line 1158 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 211: /* system_option_list: system_option */
+#line 1187 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3183 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3203 "ntp_parser.c"
break;
- case 209: /* system_option: system_option_flag_keyword */
-#line 1166 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 212: /* system_option: system_option_flag_keyword */
+#line 1195 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 3189 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3209 "ntp_parser.c"
break;
- case 210: /* system_option: system_option_local_flag_keyword */
-#line 1168 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 213: /* system_option: system_option_local_flag_keyword */
+#line 1197 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -3203,74 +3223,74 @@ yyreduce:
yyerror(err_str);
}
}
-#line 3207 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3227 "ntp_parser.c"
break;
- case 223: /* tinker_command: T_Tinker tinker_option_list */
-#line 1207 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 226: /* tinker_command: T_Tinker tinker_option_list */
+#line 1236 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 3213 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3233 "ntp_parser.c"
break;
- case 224: /* tinker_option_list: tinker_option_list tinker_option */
-#line 1212 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 227: /* tinker_option_list: tinker_option_list tinker_option */
+#line 1241 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3222 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3242 "ntp_parser.c"
break;
- case 225: /* tinker_option_list: tinker_option */
-#line 1217 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 228: /* tinker_option_list: tinker_option */
+#line 1246 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3231 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3251 "ntp_parser.c"
break;
- case 226: /* tinker_option: tinker_option_keyword number */
-#line 1225 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 229: /* tinker_option: tinker_option_keyword number */
+#line 1254 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 3237 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3257 "ntp_parser.c"
break;
- case 239: /* miscellaneous_command: misc_cmd_dbl_keyword number */
-#line 1250 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 242: /* miscellaneous_command: misc_cmd_dbl_keyword number */
+#line 1279 "../../ntpd/ntp_parser.y"
{
attr_val *av;
av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 3248 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3268 "ntp_parser.c"
break;
- case 240: /* miscellaneous_command: misc_cmd_int_keyword T_Integer */
-#line 1257 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 243: /* miscellaneous_command: misc_cmd_int_keyword T_Integer */
+#line 1286 "../../ntpd/ntp_parser.y"
{
attr_val *av;
av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 3259 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3279 "ntp_parser.c"
break;
- case 241: /* miscellaneous_command: misc_cmd_str_keyword T_String */
-#line 1264 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 244: /* miscellaneous_command: misc_cmd_str_keyword T_String */
+#line 1293 "../../ntpd/ntp_parser.y"
{
attr_val *av;
av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 3270 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3290 "ntp_parser.c"
break;
- case 242: /* miscellaneous_command: misc_cmd_str_lcl_keyword T_String */
-#line 1271 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 245: /* miscellaneous_command: misc_cmd_str_lcl_keyword T_String */
+#line 1300 "../../ntpd/ntp_parser.y"
{
char error_text[64];
attr_val *av;
@@ -3286,11 +3306,11 @@ yyreduce:
yyerror(error_text);
}
}
-#line 3290 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3310 "ntp_parser.c"
break;
- case 243: /* miscellaneous_command: T_Includefile T_String command */
-#line 1287 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 246: /* miscellaneous_command: T_Includefile T_String command */
+#line 1316 "../../ntpd/ntp_parser.y"
{
if (!lex_from_file()) {
YYFREE((yyvsp[-1].String)); /* avoid leak */
@@ -3309,11 +3329,11 @@ yyreduce:
}
YYFREE((yyvsp[-1].String)); /* avoid leak */
}
-#line 3313 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3333 "ntp_parser.c"
break;
- case 244: /* miscellaneous_command: T_Leapfile T_String opt_hash_check */
-#line 1306 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 247: /* miscellaneous_command: T_Leapfile T_String opt_hash_check */
+#line 1335 "../../ntpd/ntp_parser.y"
{
attr_val *av;
@@ -3321,92 +3341,92 @@ yyreduce:
av->flag = (yyvsp[0].Integer);
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 3325 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3345 "ntp_parser.c"
break;
- case 245: /* miscellaneous_command: T_End */
-#line 1314 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 248: /* miscellaneous_command: T_End */
+#line 1343 "../../ntpd/ntp_parser.y"
{ lex_flush_stack(); }
-#line 3331 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3351 "ntp_parser.c"
break;
- case 246: /* miscellaneous_command: T_Driftfile drift_parm */
-#line 1316 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 249: /* miscellaneous_command: T_Driftfile drift_parm */
+#line 1345 "../../ntpd/ntp_parser.y"
{ /* see drift_parm below for actions */ }
-#line 3337 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3357 "ntp_parser.c"
break;
- case 247: /* miscellaneous_command: T_Logconfig log_config_list */
-#line 1318 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 250: /* miscellaneous_command: T_Logconfig log_config_list */
+#line 1347 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 3343 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3363 "ntp_parser.c"
break;
- case 248: /* miscellaneous_command: T_Phone string_list */
-#line 1320 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 251: /* miscellaneous_command: T_Phone string_list */
+#line 1349 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 3349 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3369 "ntp_parser.c"
break;
- case 249: /* miscellaneous_command: T_PollSkewList pollskew_list */
-#line 1322 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 252: /* miscellaneous_command: T_PollSkewList pollskew_list */
+#line 1351 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.pollskewlist, (yyvsp[0].Attr_val_fifo)); }
-#line 3355 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3375 "ntp_parser.c"
break;
- case 250: /* miscellaneous_command: T_Setvar variable_assign */
-#line 1324 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 253: /* miscellaneous_command: T_Setvar variable_assign */
+#line 1353 "../../ntpd/ntp_parser.y"
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 3361 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3381 "ntp_parser.c"
break;
- case 251: /* miscellaneous_command: T_Trap ip_address trap_option_list */
-#line 1326 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 254: /* miscellaneous_command: T_Trap ip_address trap_option_list */
+#line 1355 "../../ntpd/ntp_parser.y"
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
-#line 3372 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3392 "ntp_parser.c"
break;
- case 252: /* miscellaneous_command: T_Ttl integer_list */
-#line 1333 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 255: /* miscellaneous_command: T_Ttl integer_list */
+#line 1362 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 3378 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3398 "ntp_parser.c"
break;
- case 257: /* misc_cmd_int_keyword: T_Leapsmearinterval */
-#line 1348 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 260: /* misc_cmd_int_keyword: T_Leapsmearinterval */
+#line 1377 "../../ntpd/ntp_parser.y"
{
#ifndef LEAP_SMEAR
yyerror("Built without LEAP_SMEAR support.");
#endif
}
-#line 3388 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3408 "ntp_parser.c"
break;
- case 258: /* opt_hash_check: T_Ignorehash */
-#line 1357 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 261: /* opt_hash_check: T_Ignorehash */
+#line 1386 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = FALSE; }
-#line 3394 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3414 "ntp_parser.c"
break;
- case 259: /* opt_hash_check: T_Checkhash */
-#line 1359 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 262: /* opt_hash_check: T_Checkhash */
+#line 1388 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = TRUE; }
-#line 3400 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3420 "ntp_parser.c"
break;
- case 260: /* opt_hash_check: %empty */
-#line 1361 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 263: /* opt_hash_check: %empty */
+#line 1390 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = TRUE; }
-#line 3406 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3426 "ntp_parser.c"
break;
- case 265: /* drift_parm: T_String */
-#line 1376 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 268: /* drift_parm: T_String */
+#line 1405 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
attr_val *av;
@@ -3417,11 +3437,11 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3421 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3441 "ntp_parser.c"
break;
- case 266: /* drift_parm: T_String T_Double */
-#line 1387 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 269: /* drift_parm: T_String T_Double */
+#line 1416 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
attr_val *av;
@@ -3438,11 +3458,11 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3442 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3462 "ntp_parser.c"
break;
- case 267: /* drift_parm: %empty */
-#line 1404 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 270: /* drift_parm: %empty */
+#line 1433 "../../ntpd/ntp_parser.y"
{
if (lex_from_file()) {
attr_val *av;
@@ -3452,23 +3472,23 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3456 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3476 "ntp_parser.c"
break;
- case 268: /* pollskew_list: %empty */
-#line 1417 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 271: /* pollskew_list: %empty */
+#line 1446 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = NULL; }
-#line 3462 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3482 "ntp_parser.c"
break;
- case 269: /* pollskew_list: pollskew_list pollskew_spec */
-#line 1419 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 272: /* pollskew_list: pollskew_list pollskew_spec */
+#line 1448 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = append_gen_fifo((yyvsp[-1].Attr_val_fifo), (yyvsp[0].Attr_val)); }
-#line 3468 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3488 "ntp_parser.c"
break;
- case 270: /* pollskew_spec: pollskew_cycle T_Integer '|' T_Integer */
-#line 1424 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 273: /* pollskew_spec: pollskew_cycle T_Integer '|' T_Integer */
+#line 1453 "../../ntpd/ntp_parser.y"
{
if ((yyvsp[-2].Integer) < 0 || (yyvsp[0].Integer) < 0) {
/* bad numbers */
@@ -3491,83 +3511,87 @@ yyreduce:
}
(yyval.Attr_val) = (yyvsp[-3].Attr_val);
}
-#line 3495 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3515 "ntp_parser.c"
break;
- case 271: /* pollskew_cycle: T_Integer */
-#line 1449 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
- { (yyval.Attr_val) = ((yyvsp[0].Integer) >= 3 && (yyvsp[0].Integer) <= 17) ? create_attr_rval((yyvsp[0].Integer), 0, 0) : NULL; }
-#line 3501 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+ case 274: /* pollskew_cycle: T_Integer */
+#line 1479 "../../ntpd/ntp_parser.y"
+ {
+ (yyval.Attr_val) = ((yyvsp[0].Integer) >= NTP_MINPOLL && (yyvsp[0].Integer) <= NTP_MAXPOLL)
+ ? create_attr_rval((yyvsp[0].Integer), 0, 0)
+ : NULL;
+ }
+#line 3525 "ntp_parser.c"
break;
- case 272: /* pollskew_cycle: T_Default */
-#line 1450 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 275: /* pollskew_cycle: T_Default */
+#line 1484 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_rval(-1, 0, 0); }
-#line 3507 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3531 "ntp_parser.c"
break;
- case 273: /* variable_assign: T_String '=' T_String t_default_or_zero */
-#line 1456 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 276: /* variable_assign: T_String '=' T_String t_default_or_zero */
+#line 1490 "../../ntpd/ntp_parser.y"
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 3513 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3537 "ntp_parser.c"
break;
- case 275: /* t_default_or_zero: %empty */
-#line 1462 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 278: /* t_default_or_zero: %empty */
+#line 1496 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = 0; }
-#line 3519 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3543 "ntp_parser.c"
break;
- case 276: /* trap_option_list: %empty */
-#line 1467 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 279: /* trap_option_list: %empty */
+#line 1501 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val_fifo) = NULL; }
-#line 3525 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3549 "ntp_parser.c"
break;
- case 277: /* trap_option_list: trap_option_list trap_option */
-#line 1469 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 280: /* trap_option_list: trap_option_list trap_option */
+#line 1503 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3534 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3558 "ntp_parser.c"
break;
- case 278: /* trap_option: T_Port T_Integer */
-#line 1477 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 281: /* trap_option: T_Port T_Integer */
+#line 1511 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3540 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3564 "ntp_parser.c"
break;
- case 279: /* trap_option: T_Interface ip_address */
-#line 1479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 282: /* trap_option: T_Interface ip_address */
+#line 1513 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
destroy_address_node((yyvsp[0].Address_node));
}
-#line 3549 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3573 "ntp_parser.c"
break;
- case 280: /* log_config_list: log_config_list log_config_command */
-#line 1487 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 283: /* log_config_list: log_config_list log_config_command */
+#line 1521 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3558 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3582 "ntp_parser.c"
break;
- case 281: /* log_config_list: log_config_command */
-#line 1492 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 284: /* log_config_list: log_config_command */
+#line 1526 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3567 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3591 "ntp_parser.c"
break;
- case 282: /* log_config_command: T_String */
-#line 1500 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 285: /* log_config_command: T_String */
+#line 1534 "../../ntpd/ntp_parser.y"
{
char prefix;
char * type;
@@ -3589,141 +3613,141 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3593 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3617 "ntp_parser.c"
break;
- case 283: /* interface_command: interface_nic nic_rule_action nic_rule_class */
-#line 1525 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 286: /* interface_command: interface_nic nic_rule_action nic_rule_class */
+#line 1559 "../../ntpd/ntp_parser.y"
{
nic_rule_node *nrn;
nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3604 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3628 "ntp_parser.c"
break;
- case 284: /* interface_command: interface_nic nic_rule_action T_String */
-#line 1532 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 287: /* interface_command: interface_nic nic_rule_action T_String */
+#line 1566 "../../ntpd/ntp_parser.y"
{
nic_rule_node *nrn;
nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3615 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3639 "ntp_parser.c"
break;
- case 294: /* reset_command: T_Reset counter_set_list */
-#line 1560 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 297: /* reset_command: T_Reset counter_set_list */
+#line 1594 "../../ntpd/ntp_parser.y"
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3621 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3645 "ntp_parser.c"
break;
- case 295: /* counter_set_list: counter_set_list counter_set_keyword */
-#line 1565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 298: /* counter_set_list: counter_set_list counter_set_keyword */
+#line 1599 "../../ntpd/ntp_parser.y"
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3630 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3654 "ntp_parser.c"
break;
- case 296: /* counter_set_list: counter_set_keyword */
-#line 1570 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 299: /* counter_set_list: counter_set_keyword */
+#line 1604 "../../ntpd/ntp_parser.y"
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3639 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3663 "ntp_parser.c"
break;
- case 304: /* integer_list: integer_list T_Integer */
-#line 1594 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 307: /* integer_list: integer_list T_Integer */
+#line 1628 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3648 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3672 "ntp_parser.c"
break;
- case 305: /* integer_list: T_Integer */
-#line 1599 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 308: /* integer_list: T_Integer */
+#line 1633 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3681 "ntp_parser.c"
break;
- case 306: /* integer_list_range: integer_list_range integer_list_range_elt */
-#line 1607 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 309: /* integer_list_range: integer_list_range integer_list_range_elt */
+#line 1641 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3666 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3690 "ntp_parser.c"
break;
- case 307: /* integer_list_range: integer_list_range_elt */
-#line 1612 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 310: /* integer_list_range: integer_list_range_elt */
+#line 1646 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3675 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3699 "ntp_parser.c"
break;
- case 308: /* integer_list_range_elt: T_Integer */
-#line 1620 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 311: /* integer_list_range_elt: T_Integer */
+#line 1654 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3681 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3705 "ntp_parser.c"
break;
- case 310: /* integer_range: '(' T_Integer T_Ellipsis T_Integer ')' */
-#line 1626 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 313: /* integer_range: '(' T_Integer T_Ellipsis T_Integer ')' */
+#line 1660 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_rval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3687 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3711 "ntp_parser.c"
break;
- case 311: /* string_list: string_list T_String */
-#line 1631 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 314: /* string_list: string_list T_String */
+#line 1665 "../../ntpd/ntp_parser.y"
{
(yyval.String_fifo) = (yyvsp[-1].String_fifo);
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3696 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3720 "ntp_parser.c"
break;
- case 312: /* string_list: T_String */
-#line 1636 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 315: /* string_list: T_String */
+#line 1670 "../../ntpd/ntp_parser.y"
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3705 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3729 "ntp_parser.c"
break;
- case 313: /* address_list: address_list address */
-#line 1644 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 316: /* address_list: address_list address */
+#line 1678 "../../ntpd/ntp_parser.y"
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3714 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3738 "ntp_parser.c"
break;
- case 314: /* address_list: address */
-#line 1649 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 317: /* address_list: address */
+#line 1683 "../../ntpd/ntp_parser.y"
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3723 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3747 "ntp_parser.c"
break;
- case 315: /* boolean: T_Integer */
-#line 1657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 318: /* boolean: T_Integer */
+#line 1691 "../../ntpd/ntp_parser.y"
{
if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror("Integer value is not boolean (0 or 1). Assuming 1");
@@ -3732,35 +3756,35 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3736 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3760 "ntp_parser.c"
break;
- case 316: /* boolean: T_True */
-#line 1665 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 319: /* boolean: T_True */
+#line 1699 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = 1; }
-#line 3742 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3766 "ntp_parser.c"
break;
- case 317: /* boolean: T_False */
-#line 1666 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 320: /* boolean: T_False */
+#line 1700 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = 0; }
-#line 3748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3772 "ntp_parser.c"
break;
- case 318: /* number: T_Integer */
-#line 1670 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 321: /* number: T_Integer */
+#line 1704 "../../ntpd/ntp_parser.y"
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3754 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3778 "ntp_parser.c"
break;
- case 320: /* basedate: T_Basedate T_String */
-#line 1676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 323: /* basedate: T_Basedate T_String */
+#line 1710 "../../ntpd/ntp_parser.y"
{ (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
-#line 3760 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3784 "ntp_parser.c"
break;
- case 321: /* simulate_command: sim_conf_start '{' sim_init_statement_list sim_server_list '}' */
-#line 1684 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 324: /* simulate_command: sim_conf_start '{' sim_init_statement_list sim_server_list '}' */
+#line 1718 "../../ntpd/ntp_parser.y"
{
sim_node *sn;
@@ -3770,125 +3794,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3774 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3798 "ntp_parser.c"
break;
- case 322: /* sim_conf_start: T_Simulate */
-#line 1701 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 325: /* sim_conf_start: T_Simulate */
+#line 1735 "../../ntpd/ntp_parser.y"
{ old_config_style = 0; }
-#line 3780 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3804 "ntp_parser.c"
break;
- case 323: /* sim_init_statement_list: sim_init_statement_list sim_init_statement T_EOC */
-#line 1706 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 326: /* sim_init_statement_list: sim_init_statement_list sim_init_statement T_EOC */
+#line 1740 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3789 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3813 "ntp_parser.c"
break;
- case 324: /* sim_init_statement_list: sim_init_statement T_EOC */
-#line 1711 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 327: /* sim_init_statement_list: sim_init_statement T_EOC */
+#line 1745 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3798 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3822 "ntp_parser.c"
break;
- case 325: /* sim_init_statement: sim_init_keyword '=' number */
-#line 1719 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 328: /* sim_init_statement: sim_init_keyword '=' number */
+#line 1753 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3804 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3828 "ntp_parser.c"
break;
- case 328: /* sim_server_list: sim_server_list sim_server */
-#line 1729 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 331: /* sim_server_list: sim_server_list sim_server */
+#line 1763 "../../ntpd/ntp_parser.y"
{
(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3813 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3837 "ntp_parser.c"
break;
- case 329: /* sim_server_list: sim_server */
-#line 1734 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 332: /* sim_server_list: sim_server */
+#line 1768 "../../ntpd/ntp_parser.y"
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3822 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3846 "ntp_parser.c"
break;
- case 330: /* sim_server: sim_server_name '{' sim_server_offset sim_act_list '}' */
-#line 1742 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 333: /* sim_server: sim_server_name '{' sim_server_offset sim_act_list '}' */
+#line 1776 "../../ntpd/ntp_parser.y"
{ (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3828 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3852 "ntp_parser.c"
break;
- case 331: /* sim_server_offset: T_Server_Offset '=' number T_EOC */
-#line 1747 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 334: /* sim_server_offset: T_Server_Offset '=' number T_EOC */
+#line 1781 "../../ntpd/ntp_parser.y"
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3834 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3858 "ntp_parser.c"
break;
- case 332: /* sim_server_name: T_Server '=' address */
-#line 1752 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 335: /* sim_server_name: T_Server '=' address */
+#line 1786 "../../ntpd/ntp_parser.y"
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3840 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3864 "ntp_parser.c"
break;
- case 333: /* sim_act_list: sim_act_list sim_act */
-#line 1757 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 336: /* sim_act_list: sim_act_list sim_act */
+#line 1791 "../../ntpd/ntp_parser.y"
{
(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3849 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3873 "ntp_parser.c"
break;
- case 334: /* sim_act_list: sim_act */
-#line 1762 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 337: /* sim_act_list: sim_act */
+#line 1796 "../../ntpd/ntp_parser.y"
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3858 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3882 "ntp_parser.c"
break;
- case 335: /* sim_act: T_Duration '=' number '{' sim_act_stmt_list '}' */
-#line 1770 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 338: /* sim_act: T_Duration '=' number '{' sim_act_stmt_list '}' */
+#line 1804 "../../ntpd/ntp_parser.y"
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3864 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3888 "ntp_parser.c"
break;
- case 336: /* sim_act_stmt_list: sim_act_stmt_list sim_act_stmt T_EOC */
-#line 1775 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 339: /* sim_act_stmt_list: sim_act_stmt_list sim_act_stmt T_EOC */
+#line 1809 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3873 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3897 "ntp_parser.c"
break;
- case 337: /* sim_act_stmt_list: sim_act_stmt T_EOC */
-#line 1780 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 340: /* sim_act_stmt_list: sim_act_stmt T_EOC */
+#line 1814 "../../ntpd/ntp_parser.y"
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3882 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3906 "ntp_parser.c"
break;
- case 338: /* sim_act_stmt: sim_act_keyword '=' number */
-#line 1788 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ case 341: /* sim_act_stmt: sim_act_keyword '=' number */
+#line 1822 "../../ntpd/ntp_parser.y"
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3888 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3912 "ntp_parser.c"
break;
-#line 3892 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+#line 3916 "ntp_parser.c"
default: break;
}
@@ -3970,6 +3994,7 @@ yyerrorlab:
label yyerrorlab therefore never appears in user code. */
if (0)
YYERROR;
+ ++yynerrs;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
@@ -4030,7 +4055,7 @@ yyerrlab1:
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
- goto yyreturn;
+ goto yyreturnlab;
/*-----------------------------------.
@@ -4038,24 +4063,22 @@ yyacceptlab:
`-----------------------------------*/
yyabortlab:
yyresult = 1;
- goto yyreturn;
+ goto yyreturnlab;
-#if !defined yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
+/*-----------------------------------------------------------.
+| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
+`-----------------------------------------------------------*/
yyexhaustedlab:
yyerror (YY_("memory exhausted"));
yyresult = 2;
- goto yyreturn;
-#endif
+ goto yyreturnlab;
-/*-------------------------------------------------------.
-| yyreturn -- parsing is finished, clean up and return. |
-`-------------------------------------------------------*/
-yyreturn:
+/*----------------------------------------------------------.
+| yyreturnlab -- parsing is finished, clean up and return. |
+`----------------------------------------------------------*/
+yyreturnlab:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
@@ -4082,7 +4105,7 @@ yyreturn:
return yyresult;
}
-#line 1799 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 1833 "../../ntpd/ntp_parser.y"
void
diff --git a/contrib/ntp/ntpd/ntp_parser.h b/contrib/ntp/ntpd/ntp_parser.h
index 426b4b9666ba..2f8501a4b1dc 100644
--- a/contrib/ntp/ntpd/ntp_parser.h
+++ b/contrib/ntp/ntpd/ntp_parser.h
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 3.7.6. */
+/* A Bison parser, made by GNU Bison 3.8.2. */
/* Bison interface for Yacc-like parsers in C
@@ -35,8 +35,8 @@
especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */
-#ifndef YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
-# define YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
+#ifndef YY_YY_NTP_PARSER_H_INCLUDED
+# define YY_YY_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -82,190 +82,191 @@ extern int yydebug;
T_Ctl = 283, /* T_Ctl */
T_Day = 284, /* T_Day */
T_Default = 285, /* T_Default */
- T_Device = 286, /* T_Device */
- T_Digest = 287, /* T_Digest */
- T_Disable = 288, /* T_Disable */
- T_Discard = 289, /* T_Discard */
- T_Dispersion = 290, /* T_Dispersion */
- T_Double = 291, /* T_Double */
- T_Driftfile = 292, /* T_Driftfile */
- T_Drop = 293, /* T_Drop */
- T_Dscp = 294, /* T_Dscp */
- T_Ellipsis = 295, /* T_Ellipsis */
- T_Enable = 296, /* T_Enable */
- T_End = 297, /* T_End */
- T_Epeer = 298, /* T_Epeer */
- T_False = 299, /* T_False */
- T_File = 300, /* T_File */
- T_Filegen = 301, /* T_Filegen */
- T_Filenum = 302, /* T_Filenum */
- T_Flag1 = 303, /* T_Flag1 */
- T_Flag2 = 304, /* T_Flag2 */
- T_Flag3 = 305, /* T_Flag3 */
- T_Flag4 = 306, /* T_Flag4 */
- T_Flake = 307, /* T_Flake */
- T_Floor = 308, /* T_Floor */
- T_Freq = 309, /* T_Freq */
- T_Fudge = 310, /* T_Fudge */
- T_Fuzz = 311, /* T_Fuzz */
- T_Host = 312, /* T_Host */
- T_Huffpuff = 313, /* T_Huffpuff */
- T_Iburst = 314, /* T_Iburst */
- T_Ident = 315, /* T_Ident */
- T_Ignore = 316, /* T_Ignore */
- T_Ignorehash = 317, /* T_Ignorehash */
- T_Incalloc = 318, /* T_Incalloc */
- T_Incmem = 319, /* T_Incmem */
- T_Initalloc = 320, /* T_Initalloc */
- T_Initmem = 321, /* T_Initmem */
- T_Includefile = 322, /* T_Includefile */
- T_Integer = 323, /* T_Integer */
- T_Interface = 324, /* T_Interface */
- T_Intrange = 325, /* T_Intrange */
- T_Io = 326, /* T_Io */
- T_Ippeerlimit = 327, /* T_Ippeerlimit */
- T_Ipv4 = 328, /* T_Ipv4 */
- T_Ipv4_flag = 329, /* T_Ipv4_flag */
- T_Ipv6 = 330, /* T_Ipv6 */
- T_Ipv6_flag = 331, /* T_Ipv6_flag */
- T_Kernel = 332, /* T_Kernel */
- T_Key = 333, /* T_Key */
- T_Keys = 334, /* T_Keys */
- T_Keysdir = 335, /* T_Keysdir */
- T_Kod = 336, /* T_Kod */
- T_Leapfile = 337, /* T_Leapfile */
- T_Leapsmearinterval = 338, /* T_Leapsmearinterval */
- T_Limited = 339, /* T_Limited */
- T_Link = 340, /* T_Link */
- T_Listen = 341, /* T_Listen */
- T_Logconfig = 342, /* T_Logconfig */
- T_Logfile = 343, /* T_Logfile */
- T_Loopstats = 344, /* T_Loopstats */
- T_Lowpriotrap = 345, /* T_Lowpriotrap */
- T_Manycastclient = 346, /* T_Manycastclient */
- T_Manycastserver = 347, /* T_Manycastserver */
- T_Mask = 348, /* T_Mask */
- T_Maxage = 349, /* T_Maxage */
- T_Maxclock = 350, /* T_Maxclock */
- T_Maxdepth = 351, /* T_Maxdepth */
- T_Maxdist = 352, /* T_Maxdist */
- T_Maxmem = 353, /* T_Maxmem */
- T_Maxpoll = 354, /* T_Maxpoll */
- T_Mdnstries = 355, /* T_Mdnstries */
- T_Mem = 356, /* T_Mem */
- T_Memlock = 357, /* T_Memlock */
- T_Minclock = 358, /* T_Minclock */
- T_Mindepth = 359, /* T_Mindepth */
- T_Mindist = 360, /* T_Mindist */
- T_Minimum = 361, /* T_Minimum */
- T_Minjitter = 362, /* T_Minjitter */
- T_Minpoll = 363, /* T_Minpoll */
- T_Minsane = 364, /* T_Minsane */
- T_Mode = 365, /* T_Mode */
- T_Mode7 = 366, /* T_Mode7 */
- T_Monitor = 367, /* T_Monitor */
- T_Month = 368, /* T_Month */
- T_Mru = 369, /* T_Mru */
- T_Mssntp = 370, /* T_Mssntp */
- T_Multicastclient = 371, /* T_Multicastclient */
- T_Nic = 372, /* T_Nic */
- T_Nolink = 373, /* T_Nolink */
- T_Nomodify = 374, /* T_Nomodify */
- T_Nomrulist = 375, /* T_Nomrulist */
- T_None = 376, /* T_None */
- T_Nonvolatile = 377, /* T_Nonvolatile */
- T_Noepeer = 378, /* T_Noepeer */
- T_Nopeer = 379, /* T_Nopeer */
- T_Noquery = 380, /* T_Noquery */
- T_Noselect = 381, /* T_Noselect */
- T_Noserve = 382, /* T_Noserve */
- T_Notrap = 383, /* T_Notrap */
- T_Notrust = 384, /* T_Notrust */
- T_Ntp = 385, /* T_Ntp */
- T_Ntpport = 386, /* T_Ntpport */
- T_NtpSignDsocket = 387, /* T_NtpSignDsocket */
- T_Orphan = 388, /* T_Orphan */
- T_Orphanwait = 389, /* T_Orphanwait */
- T_PCEdigest = 390, /* T_PCEdigest */
- T_Panic = 391, /* T_Panic */
- T_Peer = 392, /* T_Peer */
- T_Peerstats = 393, /* T_Peerstats */
- T_Phone = 394, /* T_Phone */
- T_Pid = 395, /* T_Pid */
- T_Pidfile = 396, /* T_Pidfile */
- T_Poll = 397, /* T_Poll */
- T_PollSkewList = 398, /* T_PollSkewList */
- T_Pool = 399, /* T_Pool */
- T_Port = 400, /* T_Port */
- T_PpsData = 401, /* T_PpsData */
- T_Preempt = 402, /* T_Preempt */
- T_Prefer = 403, /* T_Prefer */
- T_Protostats = 404, /* T_Protostats */
- T_Pw = 405, /* T_Pw */
- T_Randfile = 406, /* T_Randfile */
- T_Rawstats = 407, /* T_Rawstats */
- T_Refid = 408, /* T_Refid */
- T_Requestkey = 409, /* T_Requestkey */
- T_Reset = 410, /* T_Reset */
- T_Restrict = 411, /* T_Restrict */
- T_Revoke = 412, /* T_Revoke */
- T_Rlimit = 413, /* T_Rlimit */
- T_Saveconfigdir = 414, /* T_Saveconfigdir */
- T_Server = 415, /* T_Server */
- T_Serverresponse = 416, /* T_Serverresponse */
- T_ServerresponseFuzz = 417, /* T_ServerresponseFuzz */
- T_Setvar = 418, /* T_Setvar */
- T_Source = 419, /* T_Source */
- T_Stacksize = 420, /* T_Stacksize */
- T_Statistics = 421, /* T_Statistics */
- T_Stats = 422, /* T_Stats */
- T_Statsdir = 423, /* T_Statsdir */
- T_Step = 424, /* T_Step */
- T_Stepback = 425, /* T_Stepback */
- T_Stepfwd = 426, /* T_Stepfwd */
- T_Stepout = 427, /* T_Stepout */
- T_Stratum = 428, /* T_Stratum */
- T_String = 429, /* T_String */
- T_Sys = 430, /* T_Sys */
- T_Sysstats = 431, /* T_Sysstats */
- T_Tick = 432, /* T_Tick */
- T_Time1 = 433, /* T_Time1 */
- T_Time2 = 434, /* T_Time2 */
- T_TimeData = 435, /* T_TimeData */
- T_Timer = 436, /* T_Timer */
- T_Timingstats = 437, /* T_Timingstats */
- T_Tinker = 438, /* T_Tinker */
- T_Tos = 439, /* T_Tos */
- T_Trap = 440, /* T_Trap */
- T_True = 441, /* T_True */
- T_Trustedkey = 442, /* T_Trustedkey */
- T_Ttl = 443, /* T_Ttl */
- T_Type = 444, /* T_Type */
- T_U_int = 445, /* T_U_int */
- T_UEcrypto = 446, /* T_UEcrypto */
- T_UEcryptonak = 447, /* T_UEcryptonak */
- T_UEdigest = 448, /* T_UEdigest */
- T_Unconfig = 449, /* T_Unconfig */
- T_Unpeer = 450, /* T_Unpeer */
- T_Version = 451, /* T_Version */
- T_WanderThreshold = 452, /* T_WanderThreshold */
- T_Week = 453, /* T_Week */
- T_Wildcard = 454, /* T_Wildcard */
- T_Xleave = 455, /* T_Xleave */
- T_Xmtnonce = 456, /* T_Xmtnonce */
- T_Year = 457, /* T_Year */
- T_Flag = 458, /* T_Flag */
- T_EOC = 459, /* T_EOC */
- T_Simulate = 460, /* T_Simulate */
- T_Beep_Delay = 461, /* T_Beep_Delay */
- T_Sim_Duration = 462, /* T_Sim_Duration */
- T_Server_Offset = 463, /* T_Server_Offset */
- T_Duration = 464, /* T_Duration */
- T_Freq_Offset = 465, /* T_Freq_Offset */
- T_Wander = 466, /* T_Wander */
- T_Jitter = 467, /* T_Jitter */
- T_Prop_Delay = 468, /* T_Prop_Delay */
- T_Proc_Delay = 469 /* T_Proc_Delay */
+ T_Delrestrict = 286, /* T_Delrestrict */
+ T_Device = 287, /* T_Device */
+ T_Digest = 288, /* T_Digest */
+ T_Disable = 289, /* T_Disable */
+ T_Discard = 290, /* T_Discard */
+ T_Dispersion = 291, /* T_Dispersion */
+ T_Double = 292, /* T_Double */
+ T_Driftfile = 293, /* T_Driftfile */
+ T_Drop = 294, /* T_Drop */
+ T_Dscp = 295, /* T_Dscp */
+ T_Ellipsis = 296, /* T_Ellipsis */
+ T_Enable = 297, /* T_Enable */
+ T_End = 298, /* T_End */
+ T_Epeer = 299, /* T_Epeer */
+ T_False = 300, /* T_False */
+ T_File = 301, /* T_File */
+ T_Filegen = 302, /* T_Filegen */
+ T_Filenum = 303, /* T_Filenum */
+ T_Flag1 = 304, /* T_Flag1 */
+ T_Flag2 = 305, /* T_Flag2 */
+ T_Flag3 = 306, /* T_Flag3 */
+ T_Flag4 = 307, /* T_Flag4 */
+ T_Flake = 308, /* T_Flake */
+ T_Floor = 309, /* T_Floor */
+ T_Freq = 310, /* T_Freq */
+ T_Fudge = 311, /* T_Fudge */
+ T_Fuzz = 312, /* T_Fuzz */
+ T_Host = 313, /* T_Host */
+ T_Huffpuff = 314, /* T_Huffpuff */
+ T_Iburst = 315, /* T_Iburst */
+ T_Ident = 316, /* T_Ident */
+ T_Ignore = 317, /* T_Ignore */
+ T_Ignorehash = 318, /* T_Ignorehash */
+ T_Incalloc = 319, /* T_Incalloc */
+ T_Incmem = 320, /* T_Incmem */
+ T_Initalloc = 321, /* T_Initalloc */
+ T_Initmem = 322, /* T_Initmem */
+ T_Includefile = 323, /* T_Includefile */
+ T_Integer = 324, /* T_Integer */
+ T_Interface = 325, /* T_Interface */
+ T_Intrange = 326, /* T_Intrange */
+ T_Io = 327, /* T_Io */
+ T_Ippeerlimit = 328, /* T_Ippeerlimit */
+ T_Ipv4 = 329, /* T_Ipv4 */
+ T_Ipv4_flag = 330, /* T_Ipv4_flag */
+ T_Ipv6 = 331, /* T_Ipv6 */
+ T_Ipv6_flag = 332, /* T_Ipv6_flag */
+ T_Kernel = 333, /* T_Kernel */
+ T_Key = 334, /* T_Key */
+ T_Keys = 335, /* T_Keys */
+ T_Keysdir = 336, /* T_Keysdir */
+ T_Kod = 337, /* T_Kod */
+ T_Leapfile = 338, /* T_Leapfile */
+ T_Leapsmearinterval = 339, /* T_Leapsmearinterval */
+ T_Limited = 340, /* T_Limited */
+ T_Link = 341, /* T_Link */
+ T_Listen = 342, /* T_Listen */
+ T_Logconfig = 343, /* T_Logconfig */
+ T_Logfile = 344, /* T_Logfile */
+ T_Loopstats = 345, /* T_Loopstats */
+ T_Lowpriotrap = 346, /* T_Lowpriotrap */
+ T_Manycastclient = 347, /* T_Manycastclient */
+ T_Manycastserver = 348, /* T_Manycastserver */
+ T_Mask = 349, /* T_Mask */
+ T_Maxage = 350, /* T_Maxage */
+ T_Maxclock = 351, /* T_Maxclock */
+ T_Maxdepth = 352, /* T_Maxdepth */
+ T_Maxdist = 353, /* T_Maxdist */
+ T_Maxmem = 354, /* T_Maxmem */
+ T_Maxpoll = 355, /* T_Maxpoll */
+ T_Mdnstries = 356, /* T_Mdnstries */
+ T_Mem = 357, /* T_Mem */
+ T_Memlock = 358, /* T_Memlock */
+ T_Minclock = 359, /* T_Minclock */
+ T_Mindepth = 360, /* T_Mindepth */
+ T_Mindist = 361, /* T_Mindist */
+ T_Minimum = 362, /* T_Minimum */
+ T_Minjitter = 363, /* T_Minjitter */
+ T_Minpoll = 364, /* T_Minpoll */
+ T_Minsane = 365, /* T_Minsane */
+ T_Mode = 366, /* T_Mode */
+ T_Mode7 = 367, /* T_Mode7 */
+ T_Monitor = 368, /* T_Monitor */
+ T_Month = 369, /* T_Month */
+ T_Mru = 370, /* T_Mru */
+ T_Mssntp = 371, /* T_Mssntp */
+ T_Multicastclient = 372, /* T_Multicastclient */
+ T_Nic = 373, /* T_Nic */
+ T_Nolink = 374, /* T_Nolink */
+ T_Nomodify = 375, /* T_Nomodify */
+ T_Nomrulist = 376, /* T_Nomrulist */
+ T_None = 377, /* T_None */
+ T_Nonvolatile = 378, /* T_Nonvolatile */
+ T_Noepeer = 379, /* T_Noepeer */
+ T_Nopeer = 380, /* T_Nopeer */
+ T_Noquery = 381, /* T_Noquery */
+ T_Noselect = 382, /* T_Noselect */
+ T_Noserve = 383, /* T_Noserve */
+ T_Notrap = 384, /* T_Notrap */
+ T_Notrust = 385, /* T_Notrust */
+ T_Ntp = 386, /* T_Ntp */
+ T_Ntpport = 387, /* T_Ntpport */
+ T_NtpSignDsocket = 388, /* T_NtpSignDsocket */
+ T_Orphan = 389, /* T_Orphan */
+ T_Orphanwait = 390, /* T_Orphanwait */
+ T_PCEdigest = 391, /* T_PCEdigest */
+ T_Panic = 392, /* T_Panic */
+ T_Peer = 393, /* T_Peer */
+ T_Peerstats = 394, /* T_Peerstats */
+ T_Phone = 395, /* T_Phone */
+ T_Pid = 396, /* T_Pid */
+ T_Pidfile = 397, /* T_Pidfile */
+ T_Poll = 398, /* T_Poll */
+ T_PollSkewList = 399, /* T_PollSkewList */
+ T_Pool = 400, /* T_Pool */
+ T_Port = 401, /* T_Port */
+ T_PpsData = 402, /* T_PpsData */
+ T_Preempt = 403, /* T_Preempt */
+ T_Prefer = 404, /* T_Prefer */
+ T_Protostats = 405, /* T_Protostats */
+ T_Pw = 406, /* T_Pw */
+ T_Randfile = 407, /* T_Randfile */
+ T_Rawstats = 408, /* T_Rawstats */
+ T_Refid = 409, /* T_Refid */
+ T_Requestkey = 410, /* T_Requestkey */
+ T_Reset = 411, /* T_Reset */
+ T_Restrict = 412, /* T_Restrict */
+ T_Revoke = 413, /* T_Revoke */
+ T_Rlimit = 414, /* T_Rlimit */
+ T_Saveconfigdir = 415, /* T_Saveconfigdir */
+ T_Server = 416, /* T_Server */
+ T_Serverresponse = 417, /* T_Serverresponse */
+ T_ServerresponseFuzz = 418, /* T_ServerresponseFuzz */
+ T_Setvar = 419, /* T_Setvar */
+ T_Source = 420, /* T_Source */
+ T_Stacksize = 421, /* T_Stacksize */
+ T_Statistics = 422, /* T_Statistics */
+ T_Stats = 423, /* T_Stats */
+ T_Statsdir = 424, /* T_Statsdir */
+ T_Step = 425, /* T_Step */
+ T_Stepback = 426, /* T_Stepback */
+ T_Stepfwd = 427, /* T_Stepfwd */
+ T_Stepout = 428, /* T_Stepout */
+ T_Stratum = 429, /* T_Stratum */
+ T_String = 430, /* T_String */
+ T_Sys = 431, /* T_Sys */
+ T_Sysstats = 432, /* T_Sysstats */
+ T_Tick = 433, /* T_Tick */
+ T_Time1 = 434, /* T_Time1 */
+ T_Time2 = 435, /* T_Time2 */
+ T_TimeData = 436, /* T_TimeData */
+ T_Timer = 437, /* T_Timer */
+ T_Timingstats = 438, /* T_Timingstats */
+ T_Tinker = 439, /* T_Tinker */
+ T_Tos = 440, /* T_Tos */
+ T_Trap = 441, /* T_Trap */
+ T_True = 442, /* T_True */
+ T_Trustedkey = 443, /* T_Trustedkey */
+ T_Ttl = 444, /* T_Ttl */
+ T_Type = 445, /* T_Type */
+ T_U_int = 446, /* T_U_int */
+ T_UEcrypto = 447, /* T_UEcrypto */
+ T_UEcryptonak = 448, /* T_UEcryptonak */
+ T_UEdigest = 449, /* T_UEdigest */
+ T_Unconfig = 450, /* T_Unconfig */
+ T_Unpeer = 451, /* T_Unpeer */
+ T_Version = 452, /* T_Version */
+ T_WanderThreshold = 453, /* T_WanderThreshold */
+ T_Week = 454, /* T_Week */
+ T_Wildcard = 455, /* T_Wildcard */
+ T_Xleave = 456, /* T_Xleave */
+ T_Xmtnonce = 457, /* T_Xmtnonce */
+ T_Year = 458, /* T_Year */
+ T_Flag = 459, /* T_Flag */
+ T_EOC = 460, /* T_EOC */
+ T_Simulate = 461, /* T_Simulate */
+ T_Beep_Delay = 462, /* T_Beep_Delay */
+ T_Sim_Duration = 463, /* T_Sim_Duration */
+ T_Server_Offset = 464, /* T_Server_Offset */
+ T_Duration = 465, /* T_Duration */
+ T_Freq_Offset = 466, /* T_Freq_Offset */
+ T_Wander = 467, /* T_Wander */
+ T_Jitter = 468, /* T_Jitter */
+ T_Prop_Delay = 469, /* T_Prop_Delay */
+ T_Proc_Delay = 470 /* T_Proc_Delay */
};
typedef enum yytokentype yytoken_kind_t;
#endif
@@ -302,196 +303,197 @@ extern int yydebug;
#define T_Ctl 283
#define T_Day 284
#define T_Default 285
-#define T_Device 286
-#define T_Digest 287
-#define T_Disable 288
-#define T_Discard 289
-#define T_Dispersion 290
-#define T_Double 291
-#define T_Driftfile 292
-#define T_Drop 293
-#define T_Dscp 294
-#define T_Ellipsis 295
-#define T_Enable 296
-#define T_End 297
-#define T_Epeer 298
-#define T_False 299
-#define T_File 300
-#define T_Filegen 301
-#define T_Filenum 302
-#define T_Flag1 303
-#define T_Flag2 304
-#define T_Flag3 305
-#define T_Flag4 306
-#define T_Flake 307
-#define T_Floor 308
-#define T_Freq 309
-#define T_Fudge 310
-#define T_Fuzz 311
-#define T_Host 312
-#define T_Huffpuff 313
-#define T_Iburst 314
-#define T_Ident 315
-#define T_Ignore 316
-#define T_Ignorehash 317
-#define T_Incalloc 318
-#define T_Incmem 319
-#define T_Initalloc 320
-#define T_Initmem 321
-#define T_Includefile 322
-#define T_Integer 323
-#define T_Interface 324
-#define T_Intrange 325
-#define T_Io 326
-#define T_Ippeerlimit 327
-#define T_Ipv4 328
-#define T_Ipv4_flag 329
-#define T_Ipv6 330
-#define T_Ipv6_flag 331
-#define T_Kernel 332
-#define T_Key 333
-#define T_Keys 334
-#define T_Keysdir 335
-#define T_Kod 336
-#define T_Leapfile 337
-#define T_Leapsmearinterval 338
-#define T_Limited 339
-#define T_Link 340
-#define T_Listen 341
-#define T_Logconfig 342
-#define T_Logfile 343
-#define T_Loopstats 344
-#define T_Lowpriotrap 345
-#define T_Manycastclient 346
-#define T_Manycastserver 347
-#define T_Mask 348
-#define T_Maxage 349
-#define T_Maxclock 350
-#define T_Maxdepth 351
-#define T_Maxdist 352
-#define T_Maxmem 353
-#define T_Maxpoll 354
-#define T_Mdnstries 355
-#define T_Mem 356
-#define T_Memlock 357
-#define T_Minclock 358
-#define T_Mindepth 359
-#define T_Mindist 360
-#define T_Minimum 361
-#define T_Minjitter 362
-#define T_Minpoll 363
-#define T_Minsane 364
-#define T_Mode 365
-#define T_Mode7 366
-#define T_Monitor 367
-#define T_Month 368
-#define T_Mru 369
-#define T_Mssntp 370
-#define T_Multicastclient 371
-#define T_Nic 372
-#define T_Nolink 373
-#define T_Nomodify 374
-#define T_Nomrulist 375
-#define T_None 376
-#define T_Nonvolatile 377
-#define T_Noepeer 378
-#define T_Nopeer 379
-#define T_Noquery 380
-#define T_Noselect 381
-#define T_Noserve 382
-#define T_Notrap 383
-#define T_Notrust 384
-#define T_Ntp 385
-#define T_Ntpport 386
-#define T_NtpSignDsocket 387
-#define T_Orphan 388
-#define T_Orphanwait 389
-#define T_PCEdigest 390
-#define T_Panic 391
-#define T_Peer 392
-#define T_Peerstats 393
-#define T_Phone 394
-#define T_Pid 395
-#define T_Pidfile 396
-#define T_Poll 397
-#define T_PollSkewList 398
-#define T_Pool 399
-#define T_Port 400
-#define T_PpsData 401
-#define T_Preempt 402
-#define T_Prefer 403
-#define T_Protostats 404
-#define T_Pw 405
-#define T_Randfile 406
-#define T_Rawstats 407
-#define T_Refid 408
-#define T_Requestkey 409
-#define T_Reset 410
-#define T_Restrict 411
-#define T_Revoke 412
-#define T_Rlimit 413
-#define T_Saveconfigdir 414
-#define T_Server 415
-#define T_Serverresponse 416
-#define T_ServerresponseFuzz 417
-#define T_Setvar 418
-#define T_Source 419
-#define T_Stacksize 420
-#define T_Statistics 421
-#define T_Stats 422
-#define T_Statsdir 423
-#define T_Step 424
-#define T_Stepback 425
-#define T_Stepfwd 426
-#define T_Stepout 427
-#define T_Stratum 428
-#define T_String 429
-#define T_Sys 430
-#define T_Sysstats 431
-#define T_Tick 432
-#define T_Time1 433
-#define T_Time2 434
-#define T_TimeData 435
-#define T_Timer 436
-#define T_Timingstats 437
-#define T_Tinker 438
-#define T_Tos 439
-#define T_Trap 440
-#define T_True 441
-#define T_Trustedkey 442
-#define T_Ttl 443
-#define T_Type 444
-#define T_U_int 445
-#define T_UEcrypto 446
-#define T_UEcryptonak 447
-#define T_UEdigest 448
-#define T_Unconfig 449
-#define T_Unpeer 450
-#define T_Version 451
-#define T_WanderThreshold 452
-#define T_Week 453
-#define T_Wildcard 454
-#define T_Xleave 455
-#define T_Xmtnonce 456
-#define T_Year 457
-#define T_Flag 458
-#define T_EOC 459
-#define T_Simulate 460
-#define T_Beep_Delay 461
-#define T_Sim_Duration 462
-#define T_Server_Offset 463
-#define T_Duration 464
-#define T_Freq_Offset 465
-#define T_Wander 466
-#define T_Jitter 467
-#define T_Prop_Delay 468
-#define T_Proc_Delay 469
+#define T_Delrestrict 286
+#define T_Device 287
+#define T_Digest 288
+#define T_Disable 289
+#define T_Discard 290
+#define T_Dispersion 291
+#define T_Double 292
+#define T_Driftfile 293
+#define T_Drop 294
+#define T_Dscp 295
+#define T_Ellipsis 296
+#define T_Enable 297
+#define T_End 298
+#define T_Epeer 299
+#define T_False 300
+#define T_File 301
+#define T_Filegen 302
+#define T_Filenum 303
+#define T_Flag1 304
+#define T_Flag2 305
+#define T_Flag3 306
+#define T_Flag4 307
+#define T_Flake 308
+#define T_Floor 309
+#define T_Freq 310
+#define T_Fudge 311
+#define T_Fuzz 312
+#define T_Host 313
+#define T_Huffpuff 314
+#define T_Iburst 315
+#define T_Ident 316
+#define T_Ignore 317
+#define T_Ignorehash 318
+#define T_Incalloc 319
+#define T_Incmem 320
+#define T_Initalloc 321
+#define T_Initmem 322
+#define T_Includefile 323
+#define T_Integer 324
+#define T_Interface 325
+#define T_Intrange 326
+#define T_Io 327
+#define T_Ippeerlimit 328
+#define T_Ipv4 329
+#define T_Ipv4_flag 330
+#define T_Ipv6 331
+#define T_Ipv6_flag 332
+#define T_Kernel 333
+#define T_Key 334
+#define T_Keys 335
+#define T_Keysdir 336
+#define T_Kod 337
+#define T_Leapfile 338
+#define T_Leapsmearinterval 339
+#define T_Limited 340
+#define T_Link 341
+#define T_Listen 342
+#define T_Logconfig 343
+#define T_Logfile 344
+#define T_Loopstats 345
+#define T_Lowpriotrap 346
+#define T_Manycastclient 347
+#define T_Manycastserver 348
+#define T_Mask 349
+#define T_Maxage 350
+#define T_Maxclock 351
+#define T_Maxdepth 352
+#define T_Maxdist 353
+#define T_Maxmem 354
+#define T_Maxpoll 355
+#define T_Mdnstries 356
+#define T_Mem 357
+#define T_Memlock 358
+#define T_Minclock 359
+#define T_Mindepth 360
+#define T_Mindist 361
+#define T_Minimum 362
+#define T_Minjitter 363
+#define T_Minpoll 364
+#define T_Minsane 365
+#define T_Mode 366
+#define T_Mode7 367
+#define T_Monitor 368
+#define T_Month 369
+#define T_Mru 370
+#define T_Mssntp 371
+#define T_Multicastclient 372
+#define T_Nic 373
+#define T_Nolink 374
+#define T_Nomodify 375
+#define T_Nomrulist 376
+#define T_None 377
+#define T_Nonvolatile 378
+#define T_Noepeer 379
+#define T_Nopeer 380
+#define T_Noquery 381
+#define T_Noselect 382
+#define T_Noserve 383
+#define T_Notrap 384
+#define T_Notrust 385
+#define T_Ntp 386
+#define T_Ntpport 387
+#define T_NtpSignDsocket 388
+#define T_Orphan 389
+#define T_Orphanwait 390
+#define T_PCEdigest 391
+#define T_Panic 392
+#define T_Peer 393
+#define T_Peerstats 394
+#define T_Phone 395
+#define T_Pid 396
+#define T_Pidfile 397
+#define T_Poll 398
+#define T_PollSkewList 399
+#define T_Pool 400
+#define T_Port 401
+#define T_PpsData 402
+#define T_Preempt 403
+#define T_Prefer 404
+#define T_Protostats 405
+#define T_Pw 406
+#define T_Randfile 407
+#define T_Rawstats 408
+#define T_Refid 409
+#define T_Requestkey 410
+#define T_Reset 411
+#define T_Restrict 412
+#define T_Revoke 413
+#define T_Rlimit 414
+#define T_Saveconfigdir 415
+#define T_Server 416
+#define T_Serverresponse 417
+#define T_ServerresponseFuzz 418
+#define T_Setvar 419
+#define T_Source 420
+#define T_Stacksize 421
+#define T_Statistics 422
+#define T_Stats 423
+#define T_Statsdir 424
+#define T_Step 425
+#define T_Stepback 426
+#define T_Stepfwd 427
+#define T_Stepout 428
+#define T_Stratum 429
+#define T_String 430
+#define T_Sys 431
+#define T_Sysstats 432
+#define T_Tick 433
+#define T_Time1 434
+#define T_Time2 435
+#define T_TimeData 436
+#define T_Timer 437
+#define T_Timingstats 438
+#define T_Tinker 439
+#define T_Tos 440
+#define T_Trap 441
+#define T_True 442
+#define T_Trustedkey 443
+#define T_Ttl 444
+#define T_Type 445
+#define T_U_int 446
+#define T_UEcrypto 447
+#define T_UEcryptonak 448
+#define T_UEdigest 449
+#define T_Unconfig 450
+#define T_Unpeer 451
+#define T_Version 452
+#define T_WanderThreshold 453
+#define T_Week 454
+#define T_Wildcard 455
+#define T_Xleave 456
+#define T_Xmtnonce 457
+#define T_Year 458
+#define T_Flag 459
+#define T_EOC 460
+#define T_Simulate 461
+#define T_Beep_Delay 462
+#define T_Sim_Duration 463
+#define T_Server_Offset 464
+#define T_Duration 465
+#define T_Freq_Offset 466
+#define T_Wander 467
+#define T_Jitter 468
+#define T_Prop_Delay 469
+#define T_Proc_Delay 470
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
-#line 52 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+#line 52 "../../ntpd/ntp_parser.y"
char * String;
double Double;
@@ -510,7 +512,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 514 "../../../src/ntp-stable-3758/ntpd/ntp_parser.h"
+#line 516 "ntp_parser.h"
};
typedef union YYSTYPE YYSTYPE;
@@ -521,6 +523,8 @@ typedef union YYSTYPE YYSTYPE;
extern YYSTYPE yylval;
+
int yyparse (void);
-#endif /* !YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED */
+
+#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
diff --git a/contrib/ntp/ntpd/ntp_peer.c b/contrib/ntp/ntpd/ntp_peer.c
index c1716ffe0d83..69c1eff45822 100644
--- a/contrib/ntp/ntpd/ntp_peer.c
+++ b/contrib/ntp/ntpd/ntp_peer.c
@@ -39,7 +39,7 @@
#define AM_MODES 7 /* number of rows and columns */
#define NO_PEER 0 /* action when no peer is found */
-int AM[AM_MODES][AM_MODES] = {
+const s_char AM[AM_MODES][AM_MODES] = {
/* packet->mode */
/* peer { UNSPEC, ACTIVE, PASSIVE, CLIENT, SERVER, BCAST } */
/* mode */
@@ -58,7 +58,7 @@ int AM[AM_MODES][AM_MODES] = {
/*BCL*/ { AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_PROCPKT},
};
-#define MATCH_ASSOC(x, y) AM[(x)][(y)]
+#define MATCH_ASSOC(x, y) (AM[CLAMP((x), 0, AM_MODES)][CLAMP((y), 0, AM_MODES)])
/*
* These routines manage the allocation of memory to peer structures
@@ -91,8 +91,8 @@ int peer_free_count; /* count of free structures */
* Association ID. We initialize this value randomly, then assign a new
* value every time an association is mobilized.
*/
-static associd_t current_association_ID; /* association ID */
-static associd_t initial_association_ID; /* association ID */
+static associd_t current_association_ID; /* actually next poss. ID */
+static associd_t initial_association_ID;
/*
* Memory allocation watermarks.
@@ -256,7 +256,7 @@ findexistingpeer_addr(
/*
- * findexistingpeer - search by address and return a pointer to a peer.
+ * findexistingpeer - search by name+family or address.
*/
struct peer *
findexistingpeer(
@@ -294,7 +294,7 @@ findexistingpeer(
* enough. Authentication alone does not help here, since it does not
* protect the UDP layer and leaves us open for a replay attack.
*
- * So we do not update the adresses and wait until the next interface
+ * So we do not update the addresses and wait until the next interface
* list update does the right thing for us.
*/
struct peer *
@@ -347,18 +347,20 @@ findpeer(
}
/* if an error was returned, exit back right here. */
- if (*action == AM_ERR)
+ if (*action == AM_ERR) {
return NULL;
+ }
/* if a match is found, we stop our search. */
- if (*action != AM_NOMATCH)
+ if (*action != AM_NOMATCH) {
break;
+ }
}
/* If no matching association is found... */
- if (NULL == p)
+ if (NULL == p) {
*action = MATCH_ASSOC(NO_PEER, pkt_mode);
-
+ }
return p;
}
@@ -542,7 +544,8 @@ unpeer(
)
{
mprintf_event(PEVNT_DEMOBIL, peer, "assoc %u", peer->associd);
- restrict_source(&peer->srcadr, 1, 0);
+ restrict_source(&peer->srcadr, TRUE, 0);
+ peer->flags |= FLAG_DISABLED;
set_peerdstadr(peer, NULL);
peer_demobilizations++;
peer_associations--;
@@ -645,6 +648,24 @@ set_peerdstadr(
return;
/*
+ * Do not change the local address of a link-local
+ * peer address.
+ */
+ if ( p->dstadr != NULL && is_linklocal(&p->dstadr->sin)
+ && dstadr != NULL) {
+ return;
+ }
+
+ /*
+ * Do not set the local address for a link-local IPv6 peer
+ * to one with a different scope ID.
+ */
+ if ( dstadr != NULL && IS_IPV6(&p->srcadr)
+ && SCOPE(&dstadr->sin) != SCOPE(&p->srcadr)) {
+ return;
+ }
+
+ /*
* Don't accept updates to a separate multicast receive-only
* endpt while a BCLNT peer is running its unicast protocol.
*/
@@ -658,11 +679,14 @@ set_peerdstadr(
p->dstadr->peercnt--;
UNLINK_SLIST(unlinked, p->dstadr->peers, p, ilink,
struct peer);
+ }
+ if ( !IS_MCAST(&p->srcadr) && !(FLAG_DISABLED & p->flags)
+ && !initializing) {
msyslog(LOG_INFO, "%s local addr %s -> %s",
- stoa(&p->srcadr), latoa(p->dstadr),
- latoa(dstadr));
+ stoa(&p->srcadr), eptoa(p->dstadr),
+ eptoa(dstadr));
}
-
+
p->dstadr = dstadr;
/* link to list if we have an address after assignment */
@@ -741,14 +765,20 @@ refresh_all_peerinterfaces(void)
struct peer *p;
/*
- * this is called when the interface list has changed
- * give all peers a chance to find a better interface
- * but only if either they don't have an address already
- * or if the one they have hasn't worked for a while.
+ * This is called when the interface list has changed.
+ * Give peers a chance to find a better interface.
*/
for (p = peer_list; p != NULL; p = p->p_link) {
- if (!(p->dstadr && (p->reach & 0x3))) // Bug 2849 XOR 2043
- peer_refresh_interface(p);
+ /*
+ * Bug 2849 XOR 2043
+ * Change local address only if the peer doesn't
+ * have a local address already or if the one
+ * they have hasn't worked for a while.
+ */
+ if (p->dstadr != NULL && (p->reach & 0x3)) {
+ continue;
+ }
+ peer_refresh_interface(p);
}
}
@@ -777,7 +807,6 @@ newpeer(
u_int hash;
int ip_count = 0;
-
DEBUG_REQUIRE(srcadr);
#ifdef AUTOKEY
@@ -789,7 +818,9 @@ newpeer(
return (NULL);
} else if (flags & FLAG_SKEY) {
- msyslog(LOG_ERR, "Autokey not configured");
+ msyslog(LOG_ERR, "Rejecting Autokey with %s,"
+ " built without support.",
+ stoa(srcadr));
return (NULL);
}
}
@@ -831,13 +862,34 @@ newpeer(
}
/*
+ * In any case, do not create an association with a duplicate
+ * remote address (srcadr) except for undefined (zero) address.
+ * Arguably this should be part of the logic above but
+ * [Bug 3888] exposed a situation with manycastclient where
+ * duplicate associations happened.
+ */
+ if (NULL == peer) {
+ for (peer = peer_list;
+ peer != NULL;
+ peer = peer->p_link) {
+ if ( SOCK_EQ(srcadr, &peer->srcadr)
+ && !SOCK_UNSPEC(srcadr)
+ && !SOCK_UNSPEC(&peer->srcadr)) {
+ /* leave peer non-NULL */
+ break;
+ }
+ }
+ }
+
+ /*
* If a peer is found, this would be a duplicate and we don't
* allow that. This avoids duplicate ephemeral (broadcast/
* multicast) and preemptible (manycast and pool) client
* associations.
*/
if (peer != NULL) {
- DPRINTF(2, ("newpeer(%s) found existing association\n",
+ DPRINTF(2, ("%s(%s) found existing association\n",
+ __func__,
(hostname)
? hostname
: stoa(srcadr)));
@@ -845,7 +897,7 @@ newpeer(
}
#if 0
-DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
+ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
(hostname)
? hostname
: stoa(srcadr),
@@ -884,15 +936,19 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
peer_preempt++;
/*
- * Assign an association ID and increment the system variable.
+ * Assign an available association ID. Zero is reserved.
*/
+ do {
+ while (0 == ++current_association_ID) {
+ /* EMPTY */
+ }
+ } while (NULL != findpeerbyassoc(current_association_ID));
peer->associd = current_association_ID;
- if (++current_association_ID == 0)
- ++current_association_ID;
peer->srcadr = *srcadr;
- if (hostname != NULL)
+ if (hostname != NULL) {
peer->hostname = estrdup(hostname);
+ }
peer->hmode = hmode;
peer->version = version;
peer->flags = flags;
@@ -901,66 +957,67 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
select_peerinterface(peer, srcadr, dstadr));
/*
- * It is an error to set minpoll less than NTP_MINPOLL or to
- * set maxpoll greater than NTP_MAXPOLL. However, minpoll is
- * clamped not greater than NTP_MAXPOLL and maxpoll is clamped
- * not less than NTP_MINPOLL without complaint. Finally,
- * minpoll is clamped not greater than maxpoll.
+ * Zero for minpoll or maxpoll means use defaults.
*/
- if (minpoll == 0)
- peer->minpoll = NTP_MINDPOLL;
- else
- peer->minpoll = min(minpoll, NTP_MAXPOLL);
- if (maxpoll == 0)
- peer->maxpoll = NTP_MAXDPOLL;
- else
- peer->maxpoll = max(maxpoll, NTP_MINPOLL);
- if (peer->minpoll > peer->maxpoll)
- peer->minpoll = peer->maxpoll;
+ peer->maxpoll = (0 == maxpoll)
+ ? NTP_MAXDPOLL
+ : maxpoll;
+ peer->minpoll = (0 == minpoll)
+ ? NTP_MINDPOLL
+ : minpoll;
+
+ /*
+ * Clamp maxpoll and minpoll within NTP_MINPOLL and NTP_MAXPOLL,
+ * and further clamp minpoll less than or equal maxpoll.
+ */
+ peer->maxpoll = CLAMP(peer->maxpoll, NTP_MINPOLL, NTP_MAXPOLL);
+ peer->minpoll = CLAMP(peer->minpoll, NTP_MINPOLL, peer->maxpoll);
- if (peer->dstadr != NULL)
+ if (peer->dstadr != NULL) {
DPRINTF(3, ("newpeer(%s): using fd %d and our addr %s\n",
stoa(srcadr), peer->dstadr->fd,
stoa(&peer->dstadr->sin)));
- else
- DPRINTF(3, ("newpeer(%s): local interface currently not bound\n",
+ } else {
+ DPRINTF(3, ("newpeer(%s): local addr unavailable\n",
stoa(srcadr)));
-
+ }
/*
* Broadcast needs the socket enabled for broadcast
*/
- if ((MDF_BCAST & cast_flags) && peer->dstadr != NULL)
+ if ((MDF_BCAST & cast_flags) && peer->dstadr != NULL) {
enable_broadcast(peer->dstadr, srcadr);
-
+ }
/*
* Multicast needs the socket interface enabled for multicast
*/
- if ((MDF_MCAST & cast_flags) && peer->dstadr != NULL)
+ if ((MDF_MCAST & cast_flags) && peer->dstadr != NULL) {
enable_multicast_if(peer->dstadr, srcadr);
-
+ }
#ifdef AUTOKEY
if (key > NTP_MAXKEY)
peer->flags |= FLAG_SKEY;
#endif /* AUTOKEY */
peer->ttl = ttl;
peer->keyid = key;
- if (ident != NULL)
+ if (ident != NULL) {
peer->ident = estrdup(ident);
+ }
peer->precision = sys_precision;
peer->hpoll = peer->minpoll;
- if (cast_flags & MDF_ACAST)
+ if (cast_flags & MDF_ACAST) {
peer_clear(peer, "ACST");
- else if (cast_flags & MDF_POOL)
+ } else if (cast_flags & MDF_POOL) {
peer_clear(peer, "POOL");
- else if (cast_flags & MDF_MCAST)
+ } else if (cast_flags & MDF_MCAST) {
peer_clear(peer, "MCST");
- else if (cast_flags & MDF_BCAST)
+ } else if (cast_flags & MDF_BCAST) {
peer_clear(peer, "BCST");
- else
+ } else {
peer_clear(peer, "INIT");
- if (mode_ntpdate)
+ }
+ if (mode_ntpdate) {
peer_ntpdate++;
-
+ }
/*
* Note time on statistics timers.
*/
@@ -976,8 +1033,6 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
* the peer timer, since the clock may have requirements
* for this.
*/
- if (maxpoll == 0)
- peer->maxpoll = peer->minpoll;
if (!refclock_newpeer(peer)) {
/*
* Dump it, something screwed up
@@ -1006,7 +1061,7 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
assoc_hash_count[hash]++;
LINK_SLIST(peer_list, peer, p_link);
- restrict_source(&peer->srcadr, 0, 0);
+ restrict_source(&peer->srcadr, FALSE, 0);
mprintf_event(PEVNT_MOBIL, peer, "assoc %d", peer->associd);
DPRINTF(1, ("newpeer: %s->%s mode %u vers %u poll %u %u flags 0x%x 0x%x ttl %u key %08x\n",
latoa(peer->dstadr), stoa(&peer->srcadr), peer->hmode,
@@ -1093,8 +1148,9 @@ findmanycastpeer(
for (peer = peer_list; peer != NULL; peer = peer->p_link)
if (MDF_SOLICIT_MASK & peer->cast_flags) {
NTOHL_FP(&pkt->org, &p_org);
- if (L_ISEQU(&p_org, &peer->aorg))
+ if (L_ISEQU(&p_org, &peer->aorg)) {
break;
+ }
}
return peer;
@@ -1103,17 +1159,11 @@ findmanycastpeer(
/* peer_cleanup - clean peer list prior to shutdown */
void peer_cleanup(void)
{
- struct peer *peer;
- associd_t assoc;
-
- for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) {
- if (assoc != 0U) {
- peer = findpeerbyassoc(assoc);
- if (peer != NULL)
- unpeer(peer);
- }
- }
- peer = findpeerbyassoc(current_association_ID);
- if (peer != NULL)
- unpeer(peer);
+ struct peer *peer;
+ struct peer *nextpeer;
+
+ for (peer = peer_list; peer != NULL; peer = nextpeer) {
+ nextpeer = peer->p_link;
+ unpeer(peer);
+ }
}
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index f2c59238432a..170294c68bb6 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -17,7 +17,6 @@
#include "ntp_leapsec.h"
#include "ntp_psl.h"
#include "refidsmear.h"
-#include "lib_strbuf.h"
#include <stdio.h>
#ifdef HAVE_LIBSCF_H
@@ -35,9 +34,9 @@
#define SRVFUZ_SHIFT 6 /* 64 seconds */
#define SRVRSP_FUZZ(x) \
do { \
- x.l_uf &= 0; \
+ x.l_uf = 0; \
x.l_ui &= ~((1 << SRVFUZ_SHIFT) - 1U); \
- } while(0)
+ } while (FALSE)
/*
* This macro defines the authentication state. If x is 1 authentication
@@ -472,7 +471,16 @@ transmit(
return;
}
- /*
+ /* [Bug 3851] drop pool servers which can no longer be reached. */
+ if (MDF_PCLNT & peer->cast_flags) {
+ if ( (IS_IPV6(&peer->srcadr) && !nonlocal_v6_addr_up)
+ || !nonlocal_v4_addr_up) {
+ unpeer(peer);
+ return;
+ }
+ }
+
+ /*
* In unicast modes the dance is much more intricate. It is
* designed to back off whenever possible to minimize network
* traffic.
@@ -584,6 +592,7 @@ transmit(
}
+#ifdef DEBUG
const char *
amtoa(
int am
@@ -607,6 +616,7 @@ amtoa(
return bp;
}
}
+#endif /* DEBUG */
/*
@@ -626,7 +636,6 @@ receive(
r4addr r4a; /* address restrictions */
u_short restrict_mask; /* restrict bits */
const char *hm_str; /* hismode string */
- const char *am_str; /* association match string */
int kissCode = NOKISS; /* Kiss Code */
int has_mac; /* length of MAC field */
int authlen; /* offset of MAC field */
@@ -636,11 +645,15 @@ receive(
keyid_t skeyid = 0; /* key IDs */
u_int32 opcode = 0; /* extension field opcode */
sockaddr_u *dstadr_sin; /* active runway */
+ u_char cast_flags; /* MDF_* flags for newpeer() */
struct peer *peer2; /* aux peer structure pointer */
endpt *match_ep; /* newpeer() local address */
l_fp p_org; /* origin timestamp */
l_fp p_rec; /* receive timestamp */
l_fp p_xmt; /* transmit timestamp */
+#ifdef DEBUG
+ const char *am_str; /* association match string */
+#endif
#ifdef AUTOKEY
char hostname[NTP_MAXSTRLEN + 1];
char *groupname = NULL;
@@ -689,12 +702,11 @@ receive(
}
if (hismode == MODE_PRIVATE) {
if (!ntp_mode7 || (restrict_mask & RES_NOQUERY)) {
- DPRINTF(2, ("receive: drop: RES_NOQUERY\n"));
+ DPRINTF(2, ("receive: drop: !mode7 or RES_NOQUERY\n"));
sys_restricted++;
return; /* no query private */
}
- process_private(rbufp, ((restrict_mask &
- RES_NOMODIFY) == 0));
+ process_private(rbufp, !(RES_NOMODIFY & restrict_mask));
return;
}
if (hismode == MODE_CONTROL) {
@@ -725,14 +737,14 @@ receive(
hisleap = PKT_LEAP(pkt->li_vn_mode);
hisstratum = PKT_TO_STRATUM(pkt->stratum);
- INSIST(0 != hisstratum); /* paranoia check PKT_TO_STRATUM result */
-
+ DEBUG_INSIST(0 != hisstratum); /* paranoia check PKT_TO_STRATUM result */
+ /* TODO: this should be in a unit test */
DPRINTF(1, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s "
- "restrict %s org %#010x.%08x xmt %#010x.%08x\n",
+ "restrict %s org 0x%x.%08x xmt 0x%x.%08x\n",
current_time, stoa(&rbufp->dstadr->sin),
stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode,
- build_iflags(rbufp->dstadr->flags),
- build_rflags(restrict_mask),
+ iflags_str(rbufp->dstadr->flags),
+ rflags_str(restrict_mask),
ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
@@ -807,10 +819,15 @@ receive(
|| (NTP_MAXPOLL < pkt->ppoll)
)
) {
+#ifdef BUG3870
DPRINTF(2, ("receive: drop: Invalid ppoll (%d) from %s\n",
pkt->ppoll, stoa(&rbufp->recv_srcadr)));
sys_badlength++;
return; /* invalid packet poll */
+#else
+ DPRINTF(2, ("receive: info: Invalid ppoll (%d) from %s\n",
+ pkt->ppoll, stoa(&rbufp->recv_srcadr)));
+#endif
}
/*
@@ -987,7 +1004,9 @@ receive(
NTOHL_FP(&pkt->rec, &p_rec);
NTOHL_FP(&pkt->xmt, &p_xmt);
hm_str = modetoa(hismode);
+#ifdef DEBUG
am_str = amtoa(retcode);
+#endif
/*
* Authentication is conditioned by three switches:
@@ -1030,7 +1049,7 @@ receive(
if (has_mac == 0) {
restrict_mask &= ~RES_MSSNTP;
is_authentic = AUTH_NONE; /* not required */
- DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x NOMAC\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org 0x%x.%08x xmt 0x%x.%08x NOMAC\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
authlen,
@@ -1039,7 +1058,7 @@ receive(
} else if (crypto_nak_test == VALIDNAK) {
restrict_mask &= ~RES_MSSNTP;
is_authentic = AUTH_CRYPTO; /* crypto-NAK */
- DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x CRYPTONAK\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org 0x%x.%08x xmt 0x%x.%08x CRYPTONAK\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
skeyid, authlen + has_mac, is_authentic,
@@ -1062,7 +1081,7 @@ receive(
&& (memcmp(zero_key, (char *)pkt + authlen + 4,
MAX_MD5_LEN - 4) == 0)) {
is_authentic = AUTH_NONE;
- DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x SIGND\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %x.%08x xmt %x.%08x SIGND\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
authlen,
@@ -1185,7 +1204,7 @@ receive(
if (crypto_flags && skeyid > NTP_MAXKEY)
authtrust(skeyid, 0);
#endif /* AUTOKEY */
- DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x MAC\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org 0x%x.%08x xmt 0x%x.%08x MAC\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
skeyid, authlen + has_mac, is_authentic,
@@ -1358,7 +1377,12 @@ receive(
if ( sys_leap == LEAP_NOTINSYNC
|| sys_stratum >= hisstratum
|| (!sys_cohort && sys_stratum == hisstratum + 1)
- || rbufp->dstadr->addr_refid == pkt->refid) {
+ || rbufp->dstadr->addr_refid == pkt->refid
+# ifdef WORDS_BIGENDIAN /* see local_refid() comment */
+ || ( IS_IPV6(&rbufp->dstadr->sin)
+ &&rbufp->dstadr->old_refid == pkt->refid)
+# endif
+ ) {
DPRINTF(2, ("receive: sys leap: %0x, sys_stratum %d > hisstratum+1 %d, !sys_cohort %d && sys_stratum == hisstratum+1, loop refid %#x == pkt refid %#x\n", sys_leap, sys_stratum, hisstratum + 1, !sys_cohort, rbufp->dstadr->addr_refid, pkt->refid));
DPRINTF(2, ("receive: AM_FXMIT drop: LEAP_NOTINSYNC || stratum || loop\n"));
sys_declined++;
@@ -1366,6 +1390,17 @@ receive(
}
/*
+ * Do not respond if the packet came into an IPv6 link-local
+ * address on an interface where we also have a usable
+ * global address, to avoid duplicate associations.
+ */
+ if (INT_LL_OF_GLOB & rbufp->dstadr->flags) {
+ DPRINTF(2, ("receive: declining manycast solicitation on link-local IPv6\n"));
+ sys_declined++;
+ return;
+ }
+
+ /*
* Respond only if authentication succeeds. Don't do a
* crypto-NAK, as that would not be useful.
*/
@@ -1423,6 +1458,12 @@ receive(
return;
}
#endif /* AUTOKEY */
+ /* Do not spin up duplicate manycast associations */
+ if (INT_LL_OF_GLOB & rbufp->dstadr->flags) {
+ DPRINTF(2, ("receive: AM_MANYCAST drop: link-local server\n"));
+ sys_declined++;
+ return;
+ }
if ((peer2 = findmanycastpeer(rbufp)) == NULL) {
DPRINTF(2, ("receive: AM_MANYCAST drop: No manycast peer\n"));
sys_restricted++;
@@ -1450,11 +1491,15 @@ receive(
sys_declined++;
return; /* no help */
}
+ cast_flags = MDF_UCAST;
+ if (MDF_POOL & peer2->cast_flags) {
+ cast_flags |= MDF_PCLNT;
+ }
peer = newpeer(&rbufp->recv_srcadr, NULL, rbufp->dstadr,
r4a.ippeerlimit, MODE_CLIENT, hisversion,
peer2->minpoll, peer2->maxpoll,
(FLAG_PREEMPT | (POOL_FLAG_PMASK & peer2->flags)),
- (MDF_UCAST | MDF_UCLNT), 0, skeyid, sys_ident);
+ cast_flags, 0, skeyid, sys_ident);
if (NULL == peer) {
DPRINTF(2, ("receive: AM_MANYCAST drop: duplicate\n"));
sys_declined++;
@@ -1840,7 +1885,7 @@ receive(
if ( tdiff.l_i < 0
&& (current_time - peer->timereceived) < deadband)
{
- msyslog(LOG_INFO, "receive: broadcast packet from %s contains non-monotonic timestamp: %#010x.%08x -> %#010x.%08x",
+ msyslog(LOG_INFO, "receive: broadcast packet from %s contains non-monotonic timestamp: 0x%x.%08x -> 0x%x.%08x",
stoa(&rbufp->recv_srcadr),
peer->bxmt.l_ui, peer->bxmt.l_uf,
p_xmt.l_ui, p_xmt.l_uf
@@ -1991,7 +2036,7 @@ receive(
if (peer->flip == 0 && !L_ISEQU(&p_org, &peer->aorg)) {
peer->bogusorg++;
msyslog(LOG_INFO,
- "receive: flip 0 KoD origin timestamp %#010x.%08x from %s does not match %#010x.%08x - ignoring.",
+ "receive: flip 0 KoD origin timestamp 0x%x.%08x from %s does not match 0x%x.%08x - ignoring.",
p_org.l_ui, p_org.l_uf,
ntoa(&peer->srcadr),
peer->aorg.l_ui, peer->aorg.l_uf);
@@ -1999,7 +2044,7 @@ receive(
} else if (peer->flip == 1 && !L_ISEQU(&p_org, &peer->borg)) {
peer->bogusorg++;
msyslog(LOG_INFO,
- "receive: flip 1 KoD origin timestamp %#010x.%08x from %s does not match interleave %#010x.%08x - ignoring.",
+ "receive: flip 1 KoD origin timestamp 0x%x.%08x from %s does not match interleave 0x%x.%08x - ignoring.",
p_org.l_ui, p_org.l_uf,
ntoa(&peer->srcadr),
peer->borg.l_ui, peer->borg.l_uf);
@@ -2033,9 +2078,14 @@ receive(
/* XXX: FLAG_LOOPNONCE */
DEBUG_INSIST(0 == (FLAG_LOOPNONCE & peer->flags));
- msyslog(LOG_INFO,
- "receive: Got KoD %s from %s",
- refid_str(pkt->refid, hisstratum), ntoa(&peer->srcadr));
+ if (RATEKISS == kissCode) {
+ msyslog(LOG_INFO, "RATE KoD from %s poll %u",
+ ntoa(&peer->srcadr), 1u << pkt->ppoll);
+ } else {
+ msyslog(LOG_INFO, "KoD %s from %s",
+ refid_str(pkt->refid, -1),
+ ntoa(&peer->srcadr));
+ }
} else if (peer->flip == 0) {
if (0) {
} else if (L_ISZERO(&p_org)) {
@@ -2049,11 +2099,11 @@ receive(
#endif
/**/
switch (hismode) {
- /* We allow 0org for: */
+ /* We allow 0org for: */
case UCHAR_MAX:
action = "Allow";
break;
- /* We disallow 0org for: */
+ /* We disallow 0org for: */
case MODE_UNSPEC:
case MODE_ACTIVE:
case MODE_PASSIVE:
@@ -2071,20 +2121,22 @@ receive(
}
/**/
msyslog(LOG_INFO,
- "receive: %s 0 origin timestamp from %s@%s xmt %#010x.%08x",
+ "receive: %s 0 origin timestamp from %s@%s xmt 0x%x.%08x",
action, hm_str, ntoa(&peer->srcadr),
ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf));
+ } else if ( L_ISZERO(&peer->aorg) && MODE_CLIENT != hismode
+ && !memcmp("STEP", &peer->refid, 4)) {
+ /* response came in just after we stepped clock, normal */
} else if (!L_ISEQU(&p_org, &peer->aorg)) {
/* are there cases here where we should bail? */
/* Should we set TEST2 if we decide to try xleave? */
peer->bogusorg++;
peer->flash |= TEST2; /* bogus */
- msyslog(LOG_INFO,
- "receive: Unexpected origin timestamp %#010x.%08x does not match aorg %#010x.%08x from %s@%s xmt %#010x.%08x",
+ msyslog(LOG_INFO,
+ "duplicate or replay: org 0x%x.%08x does not match 0x%x.%08x from %s@%s",
ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
peer->aorg.l_ui, peer->aorg.l_uf,
- hm_str, ntoa(&peer->srcadr),
- ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf));
+ hm_str, ntoa(&peer->srcadr));
if ( !L_ISZERO(&peer->dst)
&& L_ISEQU(&p_org, &peer->dst)) {
/* Might be the start of an interleave */
@@ -2474,8 +2526,10 @@ receive(
* more flashers. Leave if the packet is not good.
*/
process_packet(peer, pkt, rbufp->recv_length);
- if (peer->flash & PKT_TEST_MASK)
+ /* Bug 2734: TEST3 prevents initial interleave sync */
+ if ((~TEST3 & peer->flash) & PKT_TEST_MASK) {
return;
+ }
/* [bug 3592] Update poll. Ideally this should not happen in a
* receive branch, but too much is going on here... at least we
@@ -2516,7 +2570,6 @@ process_packet(
double p_offset, p_del, p_disp;
l_fp p_rec, p_xmt, p_org, p_reftime, ci;
u_char pmode, pleap, pversion, pstratum;
- char statstr[NTP_MAXSTRLEN];
#ifdef ASSYM
int itemp;
double etemp, ftemp, td;
@@ -2652,9 +2705,8 @@ process_packet(
p_del = t21 - t34;
p_offset = (t21 + t34) / 2.;
if (p_del < 0 || p_del > 1.) {
- snprintf(statstr, sizeof(statstr),
- "t21 %.6f t34 %.6f", t21, t34);
- report_event(PEVNT_XERR, peer, statstr);
+ mprintf_event(PEVNT_XERR, peer,
+ "t21 %.9f t34 %.9f", t21, t34);
return;
}
@@ -2680,9 +2732,9 @@ process_packet(
/* drop all if in the initial volley */
if (FLAG_BC_VOL & peer->flags)
goto bcc_init_volley_fail;
- snprintf(statstr, sizeof(statstr),
- "offset %.6f delay %.6f", t21, t34);
- report_event(PEVNT_XERR, peer, statstr);
+ mprintf_event(PEVNT_XERR, peer,
+ "offset %.9f delay %.9f",
+ t21, t34);
return;
}
p_offset = t21;
@@ -2981,20 +3033,6 @@ clock_update(
if (crypto_flags)
crypto_update();
#endif /* AUTOKEY */
- /*
- * If our parent process is waiting for the
- * first clock sync, send them home satisfied.
- */
-#ifdef HAVE_WORKING_FORK
- if (daemon_pipe[1] != -1) {
- if (2 != write(daemon_pipe[1], "S\n", 2)) {
- msyslog(LOG_ERR, "daemon failed to notify parent ntpd (--wait-sync)");
- }
- close(daemon_pipe[1]);
- daemon_pipe[1] = -1;
- DPRINTF(1, ("notified parent --wait-sync is done\n"));
- }
-#endif /* HAVE_WORKING_FORK */
}
@@ -3150,7 +3188,7 @@ poll_update(
if ( 0 != sub
|| 0 != qty) {
- do {
+ do {
val = ntp_random() & msk;
} while (val > qty);
@@ -3193,8 +3231,9 @@ peer_clear(
const char *ident /* tally lights */
)
{
- u_char u;
- l_fp bxmt = peer->bxmt; /* bcast clients retain this! */
+ static u_long earliest;
+ u_char u;
+ l_fp bxmt = peer->bxmt; /* bcast clients retain this! */
#ifdef AUTOKEY
/*
@@ -3271,6 +3310,11 @@ peer_clear(
peer->nextdate += peer_associations;
} else if (!(FLAG_CONFIG & peer->flags)) {
peer->nextdate += ntp_minpkt + 1;
+ /* space out manycastclient first polls */
+ if (peer->nextdate < earliest) {
+ peer->nextdate = earliest;
+ }
+ earliest = peer->nextdate + 1;
} else {
peer->nextdate += ntp_random() % (1 << peer->minpoll);
}
@@ -3296,10 +3340,10 @@ clock_filter(
)
{
double dst[NTP_SHIFT]; /* distance vector */
- int ord[NTP_SHIFT]; /* index vector */
- int i, j, k, m;
+ u_char ord[NTP_SHIFT]; /* index vector */
+ short i, j;
+ u_char k, m;
double dtemp, etemp;
- char tbuf[80];
/*
* A sample consists of the offset, delay, dispersion and epoch
@@ -3316,7 +3360,7 @@ clock_filter(
peer->filter_disp[j] = sample_disp;
peer->filter_epoch[j] = current_time;
j = (j + 1) % NTP_SHIFT;
- peer->filter_nextpt = j;
+ peer->filter_nextpt = (u_char)j;
/*
* Update dispersions since the last update and at the same
@@ -3344,7 +3388,7 @@ clock_filter(
} else {
dst[i] = peer->filter_delay[j];
}
- ord[i] = j;
+ ord[i] = (u_char)j;
j = (j + 1) % NTP_SHIFT;
}
@@ -3377,7 +3421,7 @@ clock_filter(
*/
m = 0;
for (i = 0; i < NTP_SHIFT; i++) {
- peer->filter_order[i] = (u_char) ord[i];
+ peer->filter_order[i] = ord[i];
if ( dst[i] >= MAXDISPERSE
|| (m >= 2 && dst[i] >= sys_maxdist))
continue;
@@ -3394,11 +3438,12 @@ clock_filter(
k = ord[0];
for (i = NTP_SHIFT - 1; i >= 0; i--) {
j = ord[i];
- peer->disp = NTP_FWEIGHT * (peer->disp +
- peer->filter_disp[j]);
- if (i < m)
+ peer->disp = NTP_FWEIGHT * ( peer->disp
+ + peer->filter_disp[j]);
+ if (i < m) {
peer->jitter += DIFF(peer->filter_offset[j],
- peer->filter_offset[k]);
+ peer->filter_offset[k]);
+ }
}
/*
@@ -3407,15 +3452,16 @@ clock_filter(
* save the offset, delay and jitter. Note the jitter must not
* be less than the precision.
*/
- if (m == 0) {
+ if (0 == m) {
clock_select();
return;
}
etemp = fabs(peer->offset - peer->filter_offset[k]);
peer->offset = peer->filter_offset[k];
peer->delay = peer->filter_delay[k];
- if (m > 1)
+ if (m > 1) {
peer->jitter /= m - 1;
+ }
peer->jitter = max(SQRT(peer->jitter), LOGTOD(sys_precision));
/*
@@ -3428,23 +3474,22 @@ clock_filter(
if ( peer->disp < sys_maxdist
&& peer->filter_disp[k] < sys_maxdist
&& etemp > CLOCK_SGATE * peer->jitter
- && peer->filter_epoch[k] - peer->epoch
+ && peer->filter_epoch[k] - peer->epoch
< 2. * ULOGTOD(peer->hpoll)) {
- snprintf(tbuf, sizeof(tbuf), "%.6f s", etemp);
- report_event(PEVNT_POPCORN, peer, tbuf);
+ mprintf_event(PEVNT_POPCORN, peer, "%.9f s", etemp);
return;
}
/*
* A new minimum sample is useful only if it is later than the
* last one used. In this design the maximum lifetime of any
- * sample is not greater than eight times the poll interval, so
- * the maximum interval between minimum samples is eight
- * packets.
+ * sample is not greater than NTP_SHIFT (8) times the poll
+ * interval, so the maximum interval between minimum samples is
+ * NTP_SHIFT packets.
*/
if (peer->filter_epoch[k] <= peer->epoch) {
- DPRINTF(2, ("clock_filter: old sample %lu\n", current_time -
- peer->filter_epoch[k]));
+ DPRINTF(2, ("clock_filter: old sample %lu s\n",
+ current_time - peer->filter_epoch[k]));
return;
}
peer->epoch = peer->filter_epoch[k];
@@ -3454,13 +3499,14 @@ clock_filter(
* processing. If not synchronized or not in a burst, tickle the
* clock select algorithm.
*/
- record_peer_stats(&peer->srcadr, ctlpeerstatus(peer),
- peer->offset, peer->delay, peer->disp, peer->jitter);
- DPRINTF(1, ("clock_filter: n %d off %.6f del %.6f dsp %.6f jit %.6f\n",
- m, peer->offset, peer->delay, peer->disp,
+ record_peer_stats(&peer->srcadr, ctlpeerstatus(peer), peer->offset,
+ peer->delay, peer->disp, peer->jitter);
+ DPRINTF(1, ("clock_filter: n %hu off %.9f del %.9f dsp %.9f jit %.9f\n",
+ (u_short)m, peer->offset, peer->delay, peer->disp,
peer->jitter));
- if (peer->burst == 0 || sys_leap == LEAP_NOTINSYNC)
+ if (0 == peer->burst || LEAP_NOTINSYNC == sys_leap) {
clock_select();
+ }
}
@@ -3854,7 +3900,7 @@ clock_select(void)
|| ((FLAG_TRUE | FLAG_PREFER) & peers[k].peer->flags))
break;
- DPRINTF(3, ("select: drop %s seljit %.6f jit %.6f\n",
+ DPRINTF(3, ("select: drop %s seljit %.9f jit %.9f\n",
ntoa(&peers[k].peer->srcadr), g, d));
if (nlist > sys_maxclock)
peers[k].peer->new_status = CTL_PST_SEL_EXCESS;
@@ -3933,13 +3979,13 @@ clock_select(void)
sys_clockhop = 0;
} else if ((x = fabs(typesystem->offset -
osys_peer->offset)) < sys_mindisp) {
- if (sys_clockhop == 0)
+ if (0 == sys_clockhop)
sys_clockhop = sys_mindisp;
else
sys_clockhop *= .5;
- DPRINTF(1, ("select: clockhop %d %.6f %.6f\n",
+ DPRINTF(1, ("select: clockhop %d %.9f %.9f\n",
j, x, sys_clockhop));
- if (fabs(x) < sys_clockhop)
+ if (x < sys_clockhop)
typesystem = osys_peer;
else
sys_clockhop = 0;
@@ -4108,9 +4154,9 @@ peer_xmit(
keyid_t xkeyid = 0; /* transmit key ID */
l_fp xmt_tx, xmt_ty;
- if (!peer->dstadr) /* drop peers without interface */
+ if (!peer->dstadr) { /* can't send */
return;
-
+ }
xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, peer->version,
peer->hmode);
xpkt.stratum = STRATUM_TO_PKT(sys_stratum);
@@ -4188,9 +4234,8 @@ peer_xmit(
}
L_SUB(&xmt_ty, &xmt_tx);
LFPTOD(&xmt_ty, peer->xleave);
- DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d len %zu xmt %#010x.%08x\n",
- current_time,
- peer->dstadr ? stoa(&peer->dstadr->sin) : "-",
+ DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d len %zu xmt 0x%x.%08x\n",
+ current_time, latoa(peer->dstadr),
stoa(&peer->srcadr), peer->hmode, sendlen,
xmt_tx.l_ui, xmt_tx.l_uf));
return;
@@ -4477,8 +4522,8 @@ peer_xmit(
authtrust(xkeyid, 0);
#endif /* AUTOKEY */
if (sendlen > sizeof(xpkt)) {
- msyslog(LOG_ERR, "peer_xmit: buffer overflow %zu", sendlen);
- exit (-1);
+ msyslog(LOG_ERR, "peer_xmit: buffer overflow %u", (u_int)sendlen);
+ exit(EX_SOFTWARE);
}
peer->t21_bytes = sendlen;
sendpkt(&peer->srcadr, peer->dstadr,
@@ -4502,9 +4547,8 @@ peer_xmit(
LFPTOD(&xmt_ty, peer->xleave);
#ifdef AUTOKEY
DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu index %d\n",
- current_time, latoa(peer->dstadr),
- ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
- peer->keynumber));
+ current_time, latoa(peer->dstadr), stoa(&peer->srcadr),
+ peer->hmode, xkeyid, sendlen, peer->keynumber));
#else /* !AUTOKEY follows */
DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu\n",
current_time, peer->dstadr ?
@@ -4543,14 +4587,14 @@ leap_smear_add_offs(
*/
static void
fast_xmit(
- struct recvbuf *rbufp, /* receive packet pointer */
+ struct recvbuf* rbufp, /* receive packet pointer */
int xmode, /* receive mode */ /* XXX: HMS: really? */
keyid_t xkeyid, /* transmit key ID */
int flags /* restrict mask */
- )
+)
{
struct pkt xpkt; /* transmit packet structure */
- struct pkt *rpkt; /* receive packet structure */
+ struct pkt* rpkt; /* receive packet structure */
l_fp xmt_tx, xmt_ty;
size_t sendlen;
#ifdef AUTOKEY
@@ -4564,13 +4608,26 @@ fast_xmit(
* the system minimum poll (ntp_minpoll). This is for KoD rate
* control and not strictly specification compliant, but doesn't
* break anything.
- *
- * If the gazinta was from a multicast address, the gazoutta
- * must go out another way.
*/
rpkt = &rbufp->recv_pkt;
- if (rbufp->dstadr->flags & INT_MCASTOPEN)
+ /*
+ * If the packet was received on an endpoint open only on
+ * a multicast address, the response needs to go out from
+ * a unicast endpoint.
+ */
+#ifndef MULTICAST_NONEWSOCKET
+ if (rbufp->dstadr->flags & INT_MCASTOPEN) {
rbufp->dstadr = findinterface(&rbufp->recv_srcadr);
+ if (NULL == rbufp->dstadr ||
+ ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr) /* wildcard */
+ == rbufp->dstadr) {
+ DPRINTF(2, ("No unicast local address found for"
+ " reply to %s mcast.",
+ stoa(&rbufp->recv_srcadr)));
+ return;
+ }
+ }
+#endif
/*
* If this is a kiss-o'-death (KoD) packet, show leap
@@ -4802,15 +4859,14 @@ pool_xmit(
)
{
#ifdef WORKER
- struct pkt xpkt; /* transmit packet structure */
- struct addrinfo hints;
- int rc;
- struct interface * lcladr;
- sockaddr_u * rmtadr;
- r4addr r4a;
- u_short restrict_mask;
- struct peer * p;
- l_fp xmt_tx;
+ struct pkt xpkt; /* transmit packet structure */
+ struct addrinfo hints;
+ int rc;
+ endpt * lcladr;
+ sockaddr_u * rmtadr;
+ u_short af;
+ struct peer * p;
+ l_fp xmt_tx;
DEBUG_REQUIRE(pool);
if (NULL == pool->ai) {
@@ -4819,6 +4875,16 @@ pool_xmit(
free(pool->addrs);
pool->addrs = NULL;
}
+ af = AF(&pool->srcadr);
+ if ( (AF_INET == af && !nonlocal_v4_addr_up)
+ || (AF_INET6 == af && !nonlocal_v6_addr_up)
+ || ( AF_UNSPEC == af
+ && !nonlocal_v4_addr_up
+ && !nonlocal_v6_addr_up)) {
+
+ /* POOL DNS query would be useless [Bug 3845] */
+ return;
+ }
ZERO(hints);
hints.ai_family = AF(&pool->srcadr);
hints.ai_socktype = SOCK_DGRAM;
@@ -4845,15 +4911,17 @@ pool_xmit(
/* copy_addrinfo_list ai_addr points to a sockaddr_u */
rmtadr = (sockaddr_u *)(void *)pool->ai->ai_addr;
pool->ai = pool->ai->ai_next;
+ /* do not solicit when hopeless [Bug 3845] */
+ if ( (IS_IPV4(rmtadr) && !nonlocal_v4_addr_up)
+ || (IS_IPV6(rmtadr) && !nonlocal_v6_addr_up)) {
+ continue;
+ }
p = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT, 0, NULL);
} while (p != NULL && pool->ai != NULL);
- if (p != NULL)
+ if (p != NULL) {
return; /* out of addresses, re-query DNS next poll */
- restrictions(rmtadr, &r4a);
- restrict_mask = r4a.rflags;
- if (RES_FLAGS & restrict_mask)
- restrict_source(rmtadr, 0,
- current_time + POOL_SOLICIT_WINDOW + 1);
+ }
+ restrict_source(rmtadr, FALSE, 1 + POOL_SOLICIT_WINDOW);
lcladr = findinterface(rmtadr);
memset(&xpkt, 0, sizeof(xpkt));
xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, pool->version,
@@ -4867,7 +4935,6 @@ pool_xmit(
/* Bug 3596: What are the pros/cons of using sys_reftime here? */
HTONL_FP(&sys_reftime, &xpkt.reftime);
- /* HMS: the following is better done after the ntp_random() calls */
get_systime(&xmt_tx);
pool->aorg = xmt_tx;
@@ -4886,14 +4953,14 @@ pool_xmit(
L_CLR(&pool->nonce);
HTONL_FP(&xmt_tx, &xpkt.xmt);
}
- sendpkt(rmtadr, lcladr,
- sys_ttl[(pool->ttl >= sys_ttlmax) ? sys_ttlmax : pool->ttl],
- &xpkt, LEN_PKT_NOMAC);
pool->sent++;
pool->throttle += (1 << pool->minpoll) - 2;
DPRINTF(1, ("pool_xmit: at %ld %s->%s pool\n",
current_time, latoa(lcladr), stoa(rmtadr)));
msyslog(LOG_INFO, "Soliciting pool server %s", stoa(rmtadr));
+ sendpkt(rmtadr, lcladr,
+ sys_ttl[(pool->ttl >= sys_ttlmax) ? sys_ttlmax : pool->ttl],
+ &xpkt, LEN_PKT_NOMAC);
#endif /* WORKER */
}
@@ -4999,8 +5066,18 @@ key_expire(
/*
- * local_refid(peer) - check peer refid to avoid selecting peers
+ * local_refid(peer) - Check peer refid to avoid selecting peers
* currently synced to this ntpd.
+ * Note that until 4.2.8p18 and 4.3.1XX ntpd calculated the IPv6
+ * refid differently on different-endian systems. It now calculates
+ * the refid the same on both, the same way it did on little-endian
+ * in the past. On big-endian systems, ntpd also calculates a
+ * byte-swapped version of each of its IPv6 local addresses' refids,
+ * as endpt.old_refid and also detects a loop when seeing it. This
+ * ensures new BE ntpd will detect loops interoperating with older
+ * BE ntpd, and keeps the more-common LE old ntpd code detecting
+ * loops with IPv6 refids correctly. Thanks to Hal Murray for
+ * the byte-swapping idea.
*/
static int
local_refid(
@@ -5014,10 +5091,17 @@ local_refid(
else
unicast_ep = findinterface(&p->srcadr);
- if (unicast_ep != NULL && p->refid == unicast_ep->addr_refid)
+ if (unicast_ep != NULL
+ && ( p->refid == unicast_ep->addr_refid
+#ifdef WORDS_BIGENDIAN
+ || ( IS_IPV6(&unicast_ep->sin)
+ && p->refid == unicast_ep->old_refid)
+#endif
+ )) {
return TRUE;
- else
+ } else {
return FALSE;
+ }
}
diff --git a/contrib/ntp/ntpd/ntp_refclock.c b/contrib/ntp/ntpd/ntp_refclock.c
index a16c980e5b09..d96a524c8841 100644
--- a/contrib/ntp/ntpd/ntp_refclock.c
+++ b/contrib/ntp/ntpd/ntp_refclock.c
@@ -72,8 +72,6 @@ static int refclock_cmpl_fp (const void *, const void *);
static int refclock_sample (struct refclockproc *);
static int refclock_ioctl(int, u_int);
static void refclock_checkburst(struct peer *, struct refclockproc *);
-static int symBaud2numBaud(int symBaud);
-static int numBaud2symBaud(int numBaud);
/* circular buffer functions
*
@@ -841,9 +839,9 @@ refclock_fdwrite(
} else if (nret != len) {
nerr = errno;
msyslog(LOG_NOTICE,
- "%s: %s shortened, fd=%d, wrote %zu of %zu bytes",
+ "%s: %s shortened, fd=%d, wrote %u of %u bytes",
refnumtoa(&peer->srcadr), what,
- fd, nret, len);
+ fd, (u_int)nret, (u_int)len);
errno = nerr;
}
}
@@ -1651,7 +1649,7 @@ refclock_pps(
* -------------------------------------------------------------------
*/
-int/*BOOL*/
+int
refclock_ppsaugment(
const struct refclock_atom * ap , /* for PPS io */
l_fp * rcvtime ,
@@ -1826,10 +1824,11 @@ refclock_vformat_lcode(
long len;
len = vsnprintf(pp->a_lastcode, sizeof(pp->a_lastcode), fmt, va);
- if (len <= 0)
+ if (len <= 0) {
len = 0;
- else if (len >= sizeof(pp->a_lastcode))
+ } else if (len >= sizeof(pp->a_lastcode)) {
len = sizeof(pp->a_lastcode) - 1;
+ }
pp->lencode = (u_short)len;
pp->a_lastcode[len] = '\0';
@@ -1850,47 +1849,4 @@ refclock_format_lcode(
va_end(va);
}
-static const int baudTable[][2] = {
- {B0, 0},
- {B50, 50},
- {B75, 75},
- {B110, 110},
- {B134, 134},
- {B150, 150},
- {B200, 200},
- {B300, 300},
- {B600, 600},
- {B1200, 1200},
- {B1800, 1800},
- {B2400, 2400},
- {B4800, 4800},
- {B9600, 9600},
- {B19200, 19200},
- {B38400, 38400},
-# ifdef B57600
- {B57600, 57600 },
-# endif
-# ifdef B115200
- {B115200, 115200},
-# endif
- {-1, -1}
-};
-
-
-static int symBaud2numBaud(int symBaud)
-{
- int i;
- for (i = 0; baudTable[i][1] >= 0; ++i)
- if (baudTable[i][0] == symBaud)
- break;
- return baudTable[i][1];
-}
-static int numBaud2symBaud(int numBaud)
-{
- int i;
- for (i = 0; baudTable[i][1] >= 0; ++i)
- if (baudTable[i][1] == numBaud)
- break;
- return baudTable[i][0];
-}
-#endif /* REFCLOCK */
+#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
index e61d014808de..89c051b64f0b 100644
--- a/contrib/ntp/ntpd/ntp_request.c
+++ b/contrib/ntp/ntpd/ntp_request.c
@@ -1790,6 +1790,7 @@ do_restrict(
sockaddr_u matchaddr;
sockaddr_u matchmask;
int bad;
+ int/*BOOL*/ success;
switch(op) {
case RESTRICT_FLAGS:
@@ -1838,7 +1839,7 @@ do_restrict(
}
if (bad) {
- msyslog(LOG_ERR, "do_restrict: bad = %#x", bad);
+ msyslog(LOG_ERR, "%s: bad = 0x%x", __func__, bad);
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
@@ -1868,8 +1869,16 @@ do_restrict(
NSRCADR(&matchaddr) = cr.addr;
NSRCADR(&matchmask) = cr.mask;
}
- hack_restrict(op, &matchaddr, &matchmask, cr.mflags,
- cr.ippeerlimit, cr.flags, 0);
+ success = hack_restrict(op, &matchaddr, &matchmask,
+ cr.ippeerlimit, cr.mflags,
+ cr.flags, 0);
+ if (!success) {
+ DPRINTF(1, ("%s: %s %s mask %s ippeerlimit %hd %s %s failed",
+ __func__, resop_str(op),
+ stoa(&matchaddr), stoa(&matchmask),
+ cr.ippeerlimit, mflags_str(cr.mflags),
+ rflags_str(cr.flags)));
+ }
datap += item_sz;
}
diff --git a/contrib/ntp/ntpd/ntp_restrict.c b/contrib/ntp/ntpd/ntp_restrict.c
index fe2935d9e071..f1df8ccf3079 100644
--- a/contrib/ntp/ntpd/ntp_restrict.c
+++ b/contrib/ntp/ntpd/ntp_restrict.c
@@ -15,21 +15,11 @@
#include "ntp_assert.h"
/*
- * This code keeps a simple address-and-mask list of hosts we want
- * to place restrictions on (or remove them from). The restrictions
- * are implemented as a set of flags which tell you what the host
- * can't do. There is a subroutine entry to return the flags. The
- * list is kept sorted to reduce the average number of comparisons
- * and make sure you get the set of restrictions most specific to
- * the address.
- *
- * The algorithm is that, when looking up a host, it is first assumed
- * that the default set of restrictions will apply. It then searches
- * down through the list. Whenever it finds a match it adopts the
- * match's flags instead. When you hit the point where the sorted
- * address is greater than the target, you return with the last set of
- * flags you found. Because of the ordering of the list, the most
- * specific match will provide the final set of flags.
+ * This code keeps a simple address-and-mask list of addressses we want
+ * to place restrictions on (or remove them from). The restrictions are
+ * implemented as a set of flags which tell you what matching addresses
+ * can't do. The list is sorted retrieve the restrictions most specific
+* to the address.
*
* This was originally intended to restrict you from sync'ing to your
* own broadcasts when you are doing that, by restricting yourself from
@@ -38,27 +28,23 @@
* has been expanded, however, to suit the needs of those with more
* restrictive access policies.
*/
-/*
- * We will use two lists, one for IPv4 addresses and one for IPv6
- * addresses. This is not protocol-independant but for now I can't
- * find a way to respect this. We'll check this later... JFB 07/2001
- */
#define MASK_IPV6_ADDR(dst, src, msk) \
do { \
- int idx; \
- for (idx = 0; idx < (int)COUNTOF((dst)->s6_addr); idx++) { \
- (dst)->s6_addr[idx] = (src)->s6_addr[idx] \
- & (msk)->s6_addr[idx]; \
+ int x; \
+ \
+ for (x = 0; x < (int)COUNTOF((dst)->s6_addr); x++) { \
+ (dst)->s6_addr[x] = (src)->s6_addr[x] \
+ & (msk)->s6_addr[x]; \
} \
- } while (0)
+ } while (FALSE)
/*
* We allocate INC_RESLIST{4|6} entries to the free list whenever empty.
- * Auto-tune these to be just less than 1KB (leaving at least 16 bytes
+ * Auto-tune these to be just less than 1KB (leaving at least 32 bytes
* for allocator overhead).
*/
-#define INC_RESLIST4 ((1024 - 16) / V4_SIZEOF_RESTRICT_U)
-#define INC_RESLIST6 ((1024 - 16) / V6_SIZEOF_RESTRICT_U)
+#define INC_RESLIST4 ((1024 - 32) / V4_SIZEOF_RESTRICT_U)
+#define INC_RESLIST6 ((1024 - 32) / V6_SIZEOF_RESTRICT_U)
/*
* The restriction list
@@ -103,30 +89,35 @@ static short restrict_source_ippeerlimit;
/*
* private functions
*/
-static restrict_u * alloc_res4(void);
-static restrict_u * alloc_res6(void);
-static void free_res(restrict_u *, int);
-static void inc_res_limited(void);
-static void dec_res_limited(void);
-static restrict_u * match_restrict4_addr(u_int32, u_short);
-static restrict_u * match_restrict6_addr(const struct in6_addr *,
+static restrict_u * alloc_res4(void);
+static restrict_u * alloc_res6(void);
+static void free_res(restrict_u *, int);
+static inline void inc_res_limited(void);
+static inline void dec_res_limited(void);
+static restrict_u * match_restrict4_addr(u_int32, u_short);
+static restrict_u * match_restrict6_addr(const struct in6_addr *,
u_short);
-static restrict_u * match_restrict_entry(const restrict_u *, int);
-static int res_sorts_before4(restrict_u *, restrict_u *);
-static int res_sorts_before6(restrict_u *, restrict_u *);
-static char * roptoa(restrict_op op);
+static restrict_u * match_restrict_entry(const restrict_u *, int);
+static inline int/*BOOL*/ mflags_sorts_before(u_short, u_short);
+static int/*BOOL*/ res_sorts_before4(restrict_u *, restrict_u *);
+static int/*BOOL*/ res_sorts_before6(restrict_u *, restrict_u *);
+typedef int (*res_sort_fn)(restrict_u *, restrict_u *);
+
+
+/* dump_restrict() & dump_restricts() are DEBUG-only */
+#ifdef DEBUG
+static void dump_restrict(restrict_u *, int);
-void dump_restricts(void);
/*
- * dump_restrict - spit out a restrict_u
+ * dump_restrict - spit out a single restriction entry
*/
static void
dump_restrict(
restrict_u * res,
int is_ipv6
- )
+)
{
char as[INET6_ADDRSTRLEN];
char ms[INET6_ADDRSTRLEN];
@@ -135,57 +126,47 @@ dump_restrict(
inet_ntop(AF_INET6, &res->u.v6.addr, as, sizeof as);
inet_ntop(AF_INET6, &res->u.v6.mask, ms, sizeof ms);
} else {
- struct in_addr sia = { htonl(res->u.v4.addr) };
- struct in_addr sim = { htonl(res->u.v4.mask) };
+ struct in_addr sia, sim;
+ sia.s_addr = htonl(res->u.v4.addr);
+ sim.s_addr = htonl(res->u.v4.addr);
inet_ntop(AF_INET, &sia, as, sizeof as);
inet_ntop(AF_INET, &sim, ms, sizeof ms);
}
- mprintf("restrict node at %p: %s/%s count %d, rflags %08x, mflags %04x, ippeerlimit %d, expire %lu, next %p\n",
- res, as, ms, res->count, res->rflags, res->mflags,
- res->ippeerlimit, res->expire, res->link);
- return;
+ printf("%s/%s: hits %u ippeerlimit %hd mflags %s rflags %s",
+ as, ms, res->count, res->ippeerlimit,
+ mflags_str(res->mflags),
+ rflags_str(res->rflags));
+ if (res->expire > 0) {
+ printf(" expire %u\n", res->expire);
+ } else {
+ printf("\n");
+ }
}
/*
- * dump_restricts - spit out the 'restrict' lines
+ * dump_restricts - spit out the 'restrict' entries
*/
void
dump_restricts(void)
{
restrict_u * res;
- restrict_u * next;
-
- mprintf("dump_restrict: restrict_def4: %p\n", &restrict_def4);
- /* Spit out 'restrict {,-4,-6} default ...' lines, if needed */
- for (res = &restrict_def4; res != NULL; res = next) {
- dump_restrict(res, 0);
- next = res->link;
- }
-
- mprintf("dump_restrict: restrict_def6: %p\n", &restrict_def6);
- for (res = &restrict_def6; res != NULL; res = next) {
- dump_restrict(res, 1);
- next = res->link;
- }
/* Spit out the IPv4 list */
- mprintf("dump_restrict: restrictlist4: %p\n", &restrictlist4);
- for (res = restrictlist4; res != NULL; res = next) {
+ printf("dump_restricts: restrictlist4: %p\n", restrictlist4);
+ for (res = restrictlist4; res != NULL; res = res->link) {
dump_restrict(res, 0);
- next = res->link;
}
/* Spit out the IPv6 list */
- mprintf("dump_restrict: restrictlist6: %p\n", &restrictlist6);
- for (res = restrictlist6; res != NULL; res = next) {
+ printf("dump_restricts: restrictlist6: %p\n", restrictlist6);
+ for (res = restrictlist6; res != NULL; res = res->link) {
dump_restrict(res, 1);
- next = res->link;
}
-
- return;
}
+#endif /* DEBUG - dump_restrict() / dump_restricts() */
+
/*
* init_restrict - initialize the restriction data structures
@@ -194,7 +175,7 @@ void
init_restrict(void)
{
/*
- * The restriction lists begin with a default entry with address
+ * The restriction lists end with a default entry with address
* and mask 0, which will match any entry. The lists are kept
* sorted by descending address followed by descending mask:
*
@@ -215,11 +196,20 @@ init_restrict(void)
*
* An additional wrinkle is we may have multiple entries with
* the same address and mask but differing match flags (mflags).
- * At present there is only one, RESM_NTPONLY. Entries with
- * RESM_NTPONLY are sorted earlier so they take precedence over
- * any otherwise similar entry without. Again, this is the same
- * behavior as but reversed implementation compared to the docs.
- *
+ * We want to never talk to ourself, so RES_IGNORE entries for
+ * each local address are added by ntp_io.c with a host mask and
+ * both RESM_INTERFACE and RESM_NTPONLY set. We sort those
+ * entries before entries without those flags to achieve this.
+ * The remaining match flag is RESM_SOURCE, used to dynamically
+ * set restrictions for each peer based on the prototype set by
+ * "restrict source" in the configuration. We want those entries
+ * to be considered only when there is not a static host
+ * restriction for the address in the configuration, to allow
+ * operators to blacklist pool and manycast servers at runtime as
+ * desired using ntpq runtime configuration. Such static entries
+ * have no RESM_ bits set, so the sort order for mflags is first
+ * RESM_INTERFACE, then entries without RESM_SOURCE, finally the
+ * remaining.
*/
restrict_def4.ippeerlimit = -1; /* Cleaner if we have C99 */
@@ -236,14 +226,14 @@ alloc_res4(void)
{
const size_t cb = V4_SIZEOF_RESTRICT_U;
const size_t count = INC_RESLIST4;
- restrict_u * rl;
- restrict_u * res;
+ restrict_u* rl;
+ restrict_u* res;
size_t i;
UNLINK_HEAD_SLIST(res, resfree4, link);
- if (res != NULL)
+ if (res != NULL) {
return res;
-
+ }
rl = eallocarray(count, cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
@@ -251,7 +241,7 @@ alloc_res4(void)
LINK_SLIST(resfree4, res, link);
res = (void *)((char *)res - cb);
}
- INSIST(rl == res);
+ DEBUG_INSIST(rl == res);
/* allocate the first */
return res;
}
@@ -267,9 +257,9 @@ alloc_res6(void)
size_t i;
UNLINK_HEAD_SLIST(res, resfree6, link);
- if (res != NULL)
+ if (res != NULL) {
return res;
-
+ }
rl = eallocarray(count, cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
@@ -277,7 +267,7 @@ alloc_res6(void)
LINK_SLIST(resfree6, res, link);
res = (void *)((char *)res - cb);
}
- INSIST(rl == res);
+ DEBUG_INSIST(rl == res);
/* allocate the first */
return res;
}
@@ -289,46 +279,48 @@ free_res(
int v6
)
{
- restrict_u ** plisthead;
+ restrict_u ** rlisthead_ptr;
+ restrict_u ** flisthead_ptr;
restrict_u * unlinked;
+ size_t sz;
restrictcount--;
- if (RES_LIMITED & res->rflags)
+ if (RES_LIMITED & res->rflags) {
dec_res_limited();
-
- if (v6)
- plisthead = &restrictlist6;
- else
- plisthead = &restrictlist4;
- UNLINK_SLIST(unlinked, *plisthead, res, link, restrict_u);
- INSIST(unlinked == res);
-
+ }
if (v6) {
- zero_mem(res, V6_SIZEOF_RESTRICT_U);
- plisthead = &resfree6;
+ rlisthead_ptr = &restrictlist6;
+ flisthead_ptr = &resfree6;
+ sz = V6_SIZEOF_RESTRICT_U;
} else {
- zero_mem(res, V4_SIZEOF_RESTRICT_U);
- plisthead = &resfree4;
+ rlisthead_ptr = &restrictlist4;
+ flisthead_ptr = &resfree4;
+ sz = V4_SIZEOF_RESTRICT_U;
}
- LINK_SLIST(*plisthead, res, link);
+ UNLINK_SLIST(unlinked, *rlisthead_ptr, res, link, restrict_u);
+ INSIST(unlinked == res);
+ zero_mem(res, sz);
+ LINK_SLIST(*flisthead_ptr, res, link);
}
-static void
+static inline void
inc_res_limited(void)
{
- if (!res_limited_refcnt)
+ if (0 == res_limited_refcnt) {
mon_start(MON_RES);
+ }
res_limited_refcnt++;
}
-static void
+static inline void
dec_res_limited(void)
{
res_limited_refcnt--;
- if (!res_limited_refcnt)
+ if (0 == res_limited_refcnt) {
mon_stop(MON_RES);
+ }
}
@@ -338,26 +330,21 @@ match_restrict4_addr(
u_short port
)
{
- const int v6 = 0;
+ const int v6 = FALSE;
restrict_u * res;
restrict_u * next;
for (res = restrictlist4; res != NULL; res = next) {
- struct in_addr sia = { htonl(res->u.v4.addr) };
-
next = res->link;
- DPRINTF(2, ("match_restrict4_addr: Checking %s, port %d ... ",
- inet_ntoa(sia), port));
- if ( res->expire
- && res->expire <= current_time)
+ if (res->expire && res->expire <= current_time) {
free_res(res, v6); /* zeroes the contents */
+ }
if ( res->u.v4.addr == (addr & res->u.v4.mask)
&& ( !(RESM_NTPONLY & res->mflags)
|| NTP_PORT == port)) {
- DPRINTF(2, ("MATCH: ippeerlimit %d\n", res->ippeerlimit));
+
break;
}
- DPRINTF(2, ("doesn't match: ippeerlimit %d\n", res->ippeerlimit));
}
return res;
}
@@ -369,22 +356,23 @@ match_restrict6_addr(
u_short port
)
{
- const int v6 = 1;
+ const int v6 = TRUE;
restrict_u * res;
restrict_u * next;
struct in6_addr masked;
for (res = restrictlist6; res != NULL; res = next) {
next = res->link;
- INSIST(next != res);
- if (res->expire &&
- res->expire <= current_time)
+ if (res->expire && res->expire <= current_time) {
free_res(res, v6);
+ }
MASK_IPV6_ADDR(&masked, addr, &res->u.v6.mask);
if (ADDR6_EQ(&masked, &res->u.v6.addr)
- && (!(RESM_NTPONLY & res->mflags)
- || NTP_PORT == (int)port))
+ && ( !(RESM_NTPONLY & res->mflags)
+ || NTP_PORT == (int)port)) {
+
break;
+ }
}
return res;
}
@@ -417,22 +405,47 @@ match_restrict_entry(
cb = sizeof(pmatch->u.v4);
}
- for (res = rlist; res != NULL; res = res->link)
+ for (res = rlist; res != NULL; res = res->link) {
if (res->mflags == pmatch->mflags &&
- !memcmp(&res->u, &pmatch->u, cb))
+ !memcmp(&res->u, &pmatch->u, cb)) {
break;
+ }
+ }
return res;
}
/*
- * res_sorts_before4 - compare two restrict4 entries
+ * mflags_sorts_before - common mflags sorting code
+ *
+ * See block comment in init_restrict() above for rationale.
+ */
+static inline int/*BOOL*/
+mflags_sorts_before(
+ u_short m1,
+ u_short m2
+ )
+{
+ if ( (RESM_INTERFACE & m1)
+ && !(RESM_INTERFACE & m2)) {
+ return TRUE;
+ } else if ( !(RESM_SOURCE & m1)
+ && (RESM_SOURCE & m2)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+/*
+ * res_sorts_before4 - compare IPv4 restriction entries
*
* Returns nonzero if r1 sorts before r2. We sort by descending
- * address, then descending mask, then descending mflags, so sorting
- * before means having a higher value.
+ * address, then descending mask, then an intricate mflags sort
+ * order explained in a block comment near the top of this file.
*/
-static int
+static int/*BOOL*/
res_sorts_before4(
restrict_u *r1,
restrict_u *r2
@@ -440,54 +453,53 @@ res_sorts_before4(
{
int r1_before_r2;
- if (r1->u.v4.addr > r2->u.v4.addr)
- r1_before_r2 = 1;
- else if (r1->u.v4.addr < r2->u.v4.addr)
- r1_before_r2 = 0;
- else if (r1->u.v4.mask > r2->u.v4.mask)
- r1_before_r2 = 1;
- else if (r1->u.v4.mask < r2->u.v4.mask)
- r1_before_r2 = 0;
- else if (r1->mflags > r2->mflags)
- r1_before_r2 = 1;
- else
- r1_before_r2 = 0;
+ if (r1->u.v4.addr > r2->u.v4.addr) {
+ r1_before_r2 = TRUE;
+ } else if (r1->u.v4.addr < r2->u.v4.addr) {
+ r1_before_r2 = FALSE;
+ } else if (r1->u.v4.mask > r2->u.v4.mask) {
+ r1_before_r2 = TRUE;
+ } else if (r1->u.v4.mask < r2->u.v4.mask) {
+ r1_before_r2 = FALSE;
+ } else {
+ r1_before_r2 = mflags_sorts_before(r1->mflags, r2->mflags);
+ }
return r1_before_r2;
}
/*
- * res_sorts_before6 - compare two restrict6 entries
+ * res_sorts_before6 - compare IPv6 restriction entries
*
* Returns nonzero if r1 sorts before r2. We sort by descending
- * address, then descending mask, then descending mflags, so sorting
- * before means having a higher value.
+ * address, then descending mask, then an intricate mflags sort
+ * order explained in a block comment near the top of this file.
*/
-static int
+static int/*BOOL*/
res_sorts_before6(
- restrict_u *r1,
- restrict_u *r2
- )
+ restrict_u* r1,
+ restrict_u* r2
+)
{
int r1_before_r2;
int cmp;
cmp = ADDR6_CMP(&r1->u.v6.addr, &r2->u.v6.addr);
- if (cmp > 0) /* r1->addr > r2->addr */
- r1_before_r2 = 1;
- else if (cmp < 0) /* r2->addr > r1->addr */
- r1_before_r2 = 0;
- else {
+ if (cmp > 0) { /* r1->addr > r2->addr */
+ r1_before_r2 = TRUE;
+ } else if (cmp < 0) { /* r2->addr > r1->addr */
+ r1_before_r2 = FALSE;
+ } else {
cmp = ADDR6_CMP(&r1->u.v6.mask, &r2->u.v6.mask);
- if (cmp > 0) /* r1->mask > r2->mask*/
- r1_before_r2 = 1;
- else if (cmp < 0) /* r2->mask > r1->mask */
- r1_before_r2 = 0;
- else if (r1->mflags > r2->mflags)
- r1_before_r2 = 1;
- else
- r1_before_r2 = 0;
+ if (cmp > 0) { /* r1->mask > r2->mask*/
+ r1_before_r2 = TRUE;
+ } else if (cmp < 0) { /* r2->mask > r1->mask */
+ r1_before_r2 = FALSE;
+ } else {
+ r1_before_r2 = mflags_sorts_before(r1->mflags,
+ r2->mflags);
+ }
}
return r1_before_r2;
@@ -506,15 +518,10 @@ restrictions(
restrict_u *match;
struct in6_addr *pin6;
- REQUIRE(NULL != r4a);
+ DEBUG_REQUIRE(NULL != r4a);
res_calls++;
- r4a->rflags = RES_IGNORE;
- r4a->ippeerlimit = 0;
- DPRINTF(1, ("restrictions: looking up %s\n", stoa(srcadr)));
-
- /* IPv4 source address */
if (IS_IPV4(srcadr)) {
/*
* Ignore any packets with a multicast source address
@@ -522,16 +529,12 @@ restrictions(
* not later!)
*/
if (IN_CLASSD(SRCADR(srcadr))) {
- DPRINTF(1, ("restrictions: srcadr %s is multicast\n", stoa(srcadr)));
- r4a->ippeerlimit = 2; /* XXX: we should use a better value */
- return;
+ goto multicast;
}
match = match_restrict4_addr(SRCADR(srcadr),
SRCPORT(srcadr));
-
- INSIST(match != NULL);
-
+ DEBUG_INSIST(match != NULL);
match->count++;
/*
* res_not_found counts only use of the final default
@@ -544,10 +547,9 @@ restrictions(
res_found++;
r4a->rflags = match->rflags;
r4a->ippeerlimit = match->ippeerlimit;
- }
+ } else {
+ DEBUG_REQUIRE(IS_IPV6(srcadr));
- /* IPv6 source address */
- if (IS_IPV6(srcadr)) {
pin6 = PSOCK_ADDR6(srcadr);
/*
@@ -555,11 +557,11 @@ restrictions(
* (this should be done early in the receive process,
* not later!)
*/
- if (IN6_IS_ADDR_MULTICAST(pin6))
- return;
-
+ if (IN6_IS_ADDR_MULTICAST(pin6)) {
+ goto multicast;
+ }
match = match_restrict6_addr(pin6, SRCPORT(srcadr));
- INSIST(match != NULL);
+ DEBUG_INSIST(match != NULL);
match->count++;
if (&restrict_def6 == match)
res_not_found++;
@@ -570,32 +572,34 @@ restrictions(
}
return;
-}
+ multicast:
+ r4a->rflags = RES_IGNORE;
+ r4a->ippeerlimit = 0;
+}
-/*
- * roptoa - convert a restrict_op to a string
- */
-char *
-roptoa(restrict_op op) {
- static char sb[30];
- switch(op) {
+#ifdef DEBUG
+/* display string for restrict_op */
+const char *
+resop_str(restrict_op op)
+{
+ switch (op) {
case RESTRICT_FLAGS: return "RESTRICT_FLAGS";
- case RESTRICT_UNFLAG: return "RESTRICT_UNFLAGS";
+ case RESTRICT_UNFLAG: return "RESTRICT_UNFLAG";
case RESTRICT_REMOVE: return "RESTRICT_REMOVE";
case RESTRICT_REMOVEIF: return "RESTRICT_REMOVEIF";
- default:
- snprintf(sb, sizeof sb, "**RESTRICT_#%d**", op);
- return sb;
}
+ DEBUG_INVARIANT(!"bad restrict_op in resop_str");
+ return ""; /* silence not all paths return value warning */
}
+#endif /* DEBUG */
/*
* hack_restrict - add/subtract/manipulate entries on the restrict list
*/
-void
+int/*BOOL*/
hack_restrict(
restrict_op op,
sockaddr_u * resaddr,
@@ -603,38 +607,51 @@ hack_restrict(
short ippeerlimit,
u_short mflags,
u_short rflags,
- u_long expire
+ u_int32 expire
)
{
int v6;
+ int bump_res_limited = FALSE;
restrict_u match;
restrict_u * res;
restrict_u ** plisthead;
-
- DPRINTF(1, ("hack_restrict: op %s addr %s mask %s ippeerlimit %d mflags %08x rflags %08x\n",
- roptoa(op), stoa(resaddr), stoa(resmask), ippeerlimit, mflags, rflags));
+ res_sort_fn pfn_sort;
+
+#ifdef DEBUG
+ if (debug > 0) {
+ printf("hack_restrict: op %s addr %s mask %s",
+ resop_str(op), stoa(resaddr), stoa(resmask));
+ if (ippeerlimit >= 0) {
+ printf(" ippeerlimit %d", ippeerlimit);
+ }
+ printf(" mflags %s rflags %s", mflags_str(mflags),
+ rflags_str(rflags));
+ if (expire) {
+ printf("lifetime %u\n",
+ expire - (u_int32)current_time);
+ } else {
+ printf("\n");
+ }
+ }
+#endif
if (NULL == resaddr) {
- REQUIRE(NULL == resmask);
- REQUIRE(RESTRICT_FLAGS == op);
+ DEBUG_REQUIRE(NULL == resmask);
+ DEBUG_REQUIRE(RESTRICT_FLAGS == op);
+ DEBUG_REQUIRE(RESM_SOURCE & mflags);
restrict_source_rflags = rflags;
restrict_source_mflags = mflags;
restrict_source_ippeerlimit = ippeerlimit;
- restrict_source_enabled = 1;
- return;
+ restrict_source_enabled = TRUE;
+ DPRINTF(1, ("restrict source template saved\n"));
+ return TRUE;
}
ZERO(match);
-#if 0
- /* silence VC9 potentially uninit warnings */
- // HMS: let's use a compiler-specific "enable" for this.
- res = NULL;
- v6 = 0;
-#endif
-
if (IS_IPV4(resaddr)) {
- v6 = 0;
+ DEBUG_INVARIANT(IS_IPV4(resmask));
+ v6 = FALSE;
/*
* Get address and mask in host byte order for easy
* comparison as u_int32
@@ -642,9 +659,10 @@ hack_restrict(
match.u.v4.addr = SRCADR(resaddr);
match.u.v4.mask = SRCADR(resmask);
match.u.v4.addr &= match.u.v4.mask;
-
- } else if (IS_IPV6(resaddr)) {
- v6 = 1;
+ } else {
+ DEBUG_INVARIANT(IS_IPV6(resaddr));
+ DEBUG_INVARIANT(IS_IPV6(resmask));
+ v6 = TRUE;
/*
* Get address and mask in network byte order for easy
* comparison as byte sequences (e.g. memcmp())
@@ -652,88 +670,95 @@ hack_restrict(
match.u.v6.mask = SOCK_ADDR6(resmask);
MASK_IPV6_ADDR(&match.u.v6.addr, PSOCK_ADDR6(resaddr),
&match.u.v6.mask);
+ }
- } else /* not IPv4 nor IPv6 */
- REQUIRE(0);
-
- match.rflags = rflags;
match.mflags = mflags;
- match.ippeerlimit = ippeerlimit;
- match.expire = expire;
res = match_restrict_entry(&match, v6);
switch (op) {
case RESTRICT_FLAGS:
/*
- * Here we add bits to the rflags. If this is a
- * new restriction add it.
+ * Here we add bits to the rflags. If we already have
+ * this restriction modify it.
*/
- if (NULL == res) {
+ if (NULL != res) {
+ if ( (RES_LIMITED & rflags)
+ && !(RES_LIMITED & res->rflags)) {
+
+ bump_res_limited = TRUE;
+ }
+ res->rflags |= rflags;
+ res->expire = expire;
+ } else {
+ match.rflags = rflags;
+ match.expire = expire;
+ match.ippeerlimit = ippeerlimit;
if (v6) {
res = alloc_res6();
- memcpy(res, &match,
- V6_SIZEOF_RESTRICT_U);
+ memcpy(res, &match, V6_SIZEOF_RESTRICT_U);
plisthead = &restrictlist6;
+ pfn_sort = &res_sorts_before6;
} else {
res = alloc_res4();
- memcpy(res, &match,
- V4_SIZEOF_RESTRICT_U);
+ memcpy(res, &match, V4_SIZEOF_RESTRICT_U);
plisthead = &restrictlist4;
+ pfn_sort = &res_sorts_before4;
}
LINK_SORT_SLIST(
*plisthead, res,
- (v6)
- ? res_sorts_before6(res, L_S_S_CUR())
- : res_sorts_before4(res, L_S_S_CUR()),
+ (*pfn_sort)(res, L_S_S_CUR()),
link, restrict_u);
restrictcount++;
- if (RES_LIMITED & rflags)
- inc_res_limited();
- } else {
- if ( (RES_LIMITED & rflags)
- && !(RES_LIMITED & res->rflags))
- inc_res_limited();
- res->rflags |= rflags;
+ if (RES_LIMITED & rflags) {
+ bump_res_limited = TRUE;
+ }
}
-
- res->ippeerlimit = match.ippeerlimit;
-
- break;
+ if (bump_res_limited) {
+ inc_res_limited();
+ }
+ return TRUE;
case RESTRICT_UNFLAG:
/*
* Remove some bits from the rflags. If we didn't
* find this one, just return.
*/
- if (res != NULL) {
- if ( (RES_LIMITED & res->rflags)
- && (RES_LIMITED & rflags))
- dec_res_limited();
- res->rflags &= ~rflags;
+ if (NULL == res) {
+ DPRINTF(1, ("No match for %s %s removing rflags %s\n",
+ stoa(resaddr), stoa(resmask),
+ rflags_str(rflags)));
+ return FALSE;
}
- break;
+ if ( (RES_LIMITED & res->rflags)
+ && (RES_LIMITED & rflags)) {
+ dec_res_limited();
+ }
+ res->rflags &= ~rflags;
+ return TRUE;
case RESTRICT_REMOVE:
case RESTRICT_REMOVEIF:
/*
* Remove an entry from the table entirely if we
* found one. Don't remove the default entry and
- * don't remove an interface entry.
+ * don't remove an interface entry unless asked.
*/
- if (res != NULL
- && (RESTRICT_REMOVEIF == op
+ if ( res != NULL
+ && ( RESTRICT_REMOVEIF == op
|| !(RESM_INTERFACE & res->mflags))
&& res != &restrict_def4
- && res != &restrict_def6)
- free_res(res, v6);
- break;
+ && res != &restrict_def6) {
- default: /* unknown op */
- INSIST(0);
- break;
+ free_res(res, v6);
+ return TRUE;
+ }
+ DPRINTF(1, ("No match removing %s %s restriction\n",
+ stoa(resaddr), stoa(resmask)));
+ return FALSE;
}
-
+ /* notreached */
+ return FALSE;
}
@@ -744,58 +769,182 @@ hack_restrict(
void
restrict_source(
sockaddr_u * addr,
- int farewell, /* 0 to add, 1 to remove */
- u_long expire /* 0 is infinite, valid until */
+ int farewell, /* TRUE to remove */
+ u_int32 lifetime /* seconds, 0 forever */
)
{
sockaddr_u onesmask;
- restrict_u * res;
- int found_specific;
+ int/*BOOL*/ success;
- if (!restrict_source_enabled || SOCK_UNSPEC(addr) ||
- IS_MCAST(addr) || ISREFCLOCKADR(addr))
+ if ( !restrict_source_enabled || SOCK_UNSPEC(addr)
+ || IS_MCAST(addr) || ISREFCLOCKADR(addr)) {
return;
+ }
REQUIRE(AF_INET == AF(addr) || AF_INET6 == AF(addr));
SET_HOSTMASK(&onesmask, AF(addr));
if (farewell) {
- hack_restrict(RESTRICT_REMOVE, addr, &onesmask,
- -2, 0, 0, 0);
- DPRINTF(1, ("restrict_source: %s removed", stoa(addr)));
+ success = hack_restrict(RESTRICT_REMOVE, addr, &onesmask,
+ 0, RESM_SOURCE, 0, 0);
+ if (success) {
+ DPRINTF(1, ("%s %s removed", __func__,
+ stoa(addr)));
+ } else {
+ msyslog(LOG_ERR, "%s remove %s failed",
+ __func__, stoa(addr));
+ }
return;
}
- /*
- * If there is a specific entry for this address, hands
- * off, as it is condidered more specific than "restrict
- * server ...".
- * However, if the specific entry found is a fleeting one
- * added by pool_xmit() before soliciting, replace it
- * immediately regardless of the expire value to make way
- * for the more persistent entry.
- */
- if (IS_IPV4(addr)) {
- res = match_restrict4_addr(SRCADR(addr), SRCPORT(addr));
- INSIST(res != NULL);
- found_specific = (SRCADR(&onesmask) == res->u.v4.mask);
+ success = hack_restrict(RESTRICT_FLAGS, addr, &onesmask,
+ restrict_source_ippeerlimit,
+ restrict_source_mflags,
+ restrict_source_rflags,
+ lifetime > 0
+ ? lifetime + current_time
+ : 0);
+ if (success) {
+ DPRINTF(1, ("%s %s add/upd\n", __func__,
+ stoa(addr)));
} else {
- res = match_restrict6_addr(&SOCK_ADDR6(addr),
- SRCPORT(addr));
- INSIST(res != NULL);
- found_specific = ADDR6_EQ(&res->u.v6.mask,
- &SOCK_ADDR6(&onesmask));
+ msyslog(LOG_ERR, "%s %s failed", __func__, stoa(addr));
}
- if (!expire && found_specific && res->expire) {
- found_specific = 0;
- free_res(res, IS_IPV6(addr));
+}
+
+
+#ifdef DEBUG
+/* Convert restriction RES_ flag bits into a display string */
+const char *
+rflags_str(
+ u_short rflags
+ )
+{
+ const size_t sz = LIB_BUFLENGTH;
+ char * rfs;
+
+ LIB_GETBUF(rfs);
+ rfs[0] = '\0';
+
+ if (rflags & RES_FLAKE) {
+ CLEAR_BIT_IF_DEBUG(RES_FLAKE, rflags);
+ append_flagstr(rfs, sz, "flake");
}
- if (found_specific)
- return;
- hack_restrict(RESTRICT_FLAGS, addr, &onesmask,
- restrict_source_ippeerlimit,
- restrict_source_mflags, restrict_source_rflags, expire);
- DPRINTF(1, ("restrict_source: %s host restriction added\n",
- stoa(addr)));
+ if (rflags & RES_IGNORE) {
+ CLEAR_BIT_IF_DEBUG(RES_IGNORE, rflags);
+ append_flagstr(rfs, sz, "ignore");
+ }
+
+ if (rflags & RES_KOD) {
+ CLEAR_BIT_IF_DEBUG(RES_KOD, rflags);
+ append_flagstr(rfs, sz, "kod");
+ }
+
+ if (rflags & RES_MSSNTP) {
+ CLEAR_BIT_IF_DEBUG(RES_MSSNTP, rflags);
+ append_flagstr(rfs, sz, "mssntp");
+ }
+
+ if (rflags & RES_LIMITED) {
+ CLEAR_BIT_IF_DEBUG(RES_LIMITED, rflags);
+ append_flagstr(rfs, sz, "limited");
+ }
+
+ if (rflags & RES_LPTRAP) {
+ CLEAR_BIT_IF_DEBUG(RES_LPTRAP, rflags);
+ append_flagstr(rfs, sz, "lptrap");
+ }
+
+ if (rflags & RES_NOMODIFY) {
+ CLEAR_BIT_IF_DEBUG(RES_NOMODIFY, rflags);
+ append_flagstr(rfs, sz, "nomodify");
+ }
+
+ if (rflags & RES_NOMRULIST) {
+ CLEAR_BIT_IF_DEBUG(RES_NOMRULIST, rflags);
+ append_flagstr(rfs, sz, "nomrulist");
+ }
+
+ if (rflags & RES_NOEPEER) {
+ CLEAR_BIT_IF_DEBUG(RES_NOEPEER, rflags);
+ append_flagstr(rfs, sz, "noepeer");
+ }
+
+ if (rflags & RES_NOPEER) {
+ CLEAR_BIT_IF_DEBUG(RES_NOPEER, rflags);
+ append_flagstr(rfs, sz, "nopeer");
+ }
+
+ if (rflags & RES_NOQUERY) {
+ CLEAR_BIT_IF_DEBUG(RES_NOQUERY, rflags);
+ append_flagstr(rfs, sz, "noquery");
+ }
+
+ if (rflags & RES_DONTSERVE) {
+ CLEAR_BIT_IF_DEBUG(RES_DONTSERVE, rflags);
+ append_flagstr(rfs, sz, "dontserve");
+ }
+
+ if (rflags & RES_NOTRAP) {
+ CLEAR_BIT_IF_DEBUG(RES_NOTRAP, rflags);
+ append_flagstr(rfs, sz, "notrap");
+ }
+
+ if (rflags & RES_DONTTRUST) {
+ CLEAR_BIT_IF_DEBUG(RES_DONTTRUST, rflags);
+ append_flagstr(rfs, sz, "notrust");
+ }
+
+ if (rflags & RES_SRVRSPFUZ) {
+ CLEAR_BIT_IF_DEBUG(RES_SRVRSPFUZ, rflags);
+ append_flagstr(rfs, sz, "srvrspfuz");
+ }
+
+ if (rflags & RES_VERSION) {
+ CLEAR_BIT_IF_DEBUG(RES_VERSION, rflags);
+ append_flagstr(rfs, sz, "version");
+ }
+
+ DEBUG_INVARIANT(!rflags);
+
+ if ('\0' == rfs[0]) {
+ append_flagstr(rfs, sz, "(none)");
+ }
+
+ return rfs;
+}
+
+
+/* Convert restriction match RESM_ flag bits into a display string */
+const char *
+mflags_str(
+ u_short mflags
+ )
+{
+ const size_t sz = LIB_BUFLENGTH;
+ char * mfs;
+
+ LIB_GETBUF(mfs);
+ mfs[0] = '\0';
+
+ if (mflags & RESM_NTPONLY) {
+ CLEAR_BIT_IF_DEBUG(RESM_NTPONLY, mflags);
+ append_flagstr(mfs, sz, "ntponly");
+ }
+
+ if (mflags & RESM_SOURCE) {
+ CLEAR_BIT_IF_DEBUG(RESM_SOURCE, mflags);
+ append_flagstr(mfs, sz, "source");
+ }
+
+ if (mflags & RESM_INTERFACE) {
+ CLEAR_BIT_IF_DEBUG(RESM_INTERFACE, mflags);
+ append_flagstr(mfs, sz, "interface");
+ }
+
+ DEBUG_INVARIANT(!mflags);
+
+ return mfs;
}
+#endif /* DEBUG */
diff --git a/contrib/ntp/ntpd/ntp_scanner.c b/contrib/ntp/ntpd/ntp_scanner.c
index 08c203c63e8a..531d66024982 100644
--- a/contrib/ntp/ntpd/ntp_scanner.c
+++ b/contrib/ntp/ntpd/ntp_scanner.c
@@ -34,7 +34,7 @@
* ------------------------
*/
-#define MAX_LEXEME (1024 + 1) /* The maximum size of a lexeme */
+#define MAX_LEXEME 128 /* The maximum size of a lexeme */
char yytext[MAX_LEXEME]; /* Buffer for storing the input text/lexeme */
u_int32 conf_file_sum; /* Simple sum of characters read */
@@ -278,7 +278,7 @@ lex_close(
*/
static struct FILE_INFO *
-_drop_stack_do(
+drop_stack_do(
struct FILE_INFO * head
)
{
@@ -320,9 +320,9 @@ lex_init_stack(
* anything until the next 'lex_init_stack()' succeeded.
*/
void
-lex_drop_stack()
+lex_drop_stack(void)
{
- lex_stack = _drop_stack_do(lex_stack);
+ lex_stack = drop_stack_do(lex_stack);
}
/* Flush the lexer input stack: This will nip all input objects on the
@@ -334,14 +334,14 @@ lex_drop_stack()
* in the force-eof mode before this call.
*/
int/*BOOL*/
-lex_flush_stack()
+lex_flush_stack(void)
{
int retv = FALSE;
if (NULL != lex_stack) {
retv = !lex_stack->force_eof;
lex_stack->force_eof = TRUE;
- lex_stack->st_next = _drop_stack_do(
+ lex_stack->st_next = drop_stack_do(
lex_stack->st_next);
}
return retv;
@@ -425,7 +425,7 @@ lex_from_file(void)
}
struct FILE_INFO *
-lex_current()
+lex_current(void)
{
/* this became so simple, it could be a macro. But then,
* lex_stack needed to be global...
@@ -910,9 +910,9 @@ yylex(void)
normal_return:
if (T_EOC == token)
- DPRINTF(4,("\t<end of command>\n"));
+ DPRINTF(10, ("\t<end of command>\n"));
else
- DPRINTF(4, ("yylex: lexeme '%s' -> %s\n", yytext,
+ DPRINTF(10, ("yylex: lexeme '%s' -> %s\n", yytext,
token_name(token)));
if (!yylval_was_set)
@@ -921,6 +921,10 @@ normal_return:
return token;
lex_too_long:
+ /*
+ * DLH: What is the purpose of the limit of 50?
+ * Is there any reason for yytext[] to be bigger?
+ */
yytext[min(sizeof(yytext) - 1, 50)] = 0;
msyslog(LOG_ERR,
"configuration item on line %d longer than limit of %lu, began with '%s'",
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
index 4f669f0699fa..c8164d798b04 100644
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ b/contrib/ntp/ntpd/ntp_timer.c
@@ -46,7 +46,7 @@ static void check_leapsec(u_int32, const time_t*, int/*BOOL*/);
/*
* These routines provide support for the event timer. The timer is
- * implemented by an interrupt routine which sets a flag once every
+ * implemented by a signal routine which sets a flag once every
* second, and a timer routine which is called when the mainline code
* gets around to seeing the flag. The timer routine dispatches the
* clock adjustment code if its time has come, then searches the timer
@@ -54,7 +54,6 @@ static void check_leapsec(u_int32, const time_t*, int/*BOOL*/);
* Finally, we call the hourly procedure to do cleanup and print a
* message.
*/
-volatile int interface_interval; /* init_io() sets def. 300s */
/*
* Initializing flag. All async routines watch this and only do their
@@ -70,14 +69,15 @@ volatile int alarm_flag;
/*
* The counters and timeouts
*/
-static u_long interface_timer; /* interface update timer */
+ u_long endpt_scan_timer; /* interface update timer */
static u_long adjust_timer; /* second timer */
static u_long stats_timer; /* stats timer */
static u_long leapf_timer; /* Report leapfile problems once/day */
static u_long huffpuff_timer; /* huff-n'-puff timer */
static u_long worker_idle_timer;/* next check for idle intres */
-u_long leapsec; /* seconds to next leap (proximity class) */
-int leapdif; /* TAI difference step at next leap second*/
+int endpt_scan_period; /* init_io() sets def. 301s */
+u_long leapsec; /* seconds to next leap (proximity class) */
+int leapdif; /* TAI difference step at next leap second*/
u_long orphwait; /* orphan wait time */
#ifdef AUTOKEY
static u_long revoke_timer; /* keys revoke timer */
@@ -198,7 +198,7 @@ init_timer(void)
stats_timer = SECSPERHR;
leapf_timer = SECSPERDAY;
huffpuff_timer = 0;
- interface_timer = 0;
+ endpt_scan_timer = 0;
current_time = 0;
timer_overflows = 0;
timer_xmtcalls = 0;
@@ -249,7 +249,7 @@ init_timer(void)
BOOL rc;
Period = (1 << EVENT_TIMEOUT) * 1000;
- DueTime.QuadPart = Period * 10000i64;
+ DueTime.QuadPart = Period * 10000ll;
rc = SetWaitableTimer(WaitableTimerHandle, &DueTime,
Period, NULL, NULL, FALSE);
if (!rc) {
@@ -296,10 +296,10 @@ intres_timeout_req(
void
timer(void)
{
- struct peer * p;
- struct peer * next_peer;
+ struct peer* p;
+ struct peer* next_peer;
l_fp now;
- time_t tnow;
+ time_t tnow;
/*
* The basic timerevent is one second. This is used to adjust the
@@ -333,15 +333,18 @@ timer(void)
* usually tripped using iburst and minpoll of
* 128 s or less.
*/
- if (p->throttle > 0)
+ if (p->throttle > 0) {
p->throttle--;
+ }
if (p->nextdate <= current_time) {
#ifdef REFCLOCK
- if (FLAG_REFCLOCK & p->flags)
+ if (FLAG_REFCLOCK & p->flags) {
refclock_transmit(p);
- else
+ } else
#endif /* REFCLOCK */
+ {
transmit(p);
+ }
}
}
@@ -370,7 +373,8 @@ timer(void)
#endif /* AUTOKEY */
}
sys_stratum = (u_char)sys_orphan;
- } else {
+ }
+ else {
if (sys_leap != LEAP_NOTINSYNC) {
set_sys_leap(LEAP_NOTINSYNC);
msyslog(LOG_WARNING, "%s",
@@ -379,9 +383,9 @@ timer(void)
sys_stratum = STRATUM_UNSPEC;
}
if (sys_stratum > 1)
- sys_refid = htonl(LOOPBACKADR);
+ sys_refid = htonl(LOOPBACKADR);
else
- memcpy(&sys_refid, "LOOP", 4);
+ memcpy(&sys_refid, "ORPH", 4);
sys_offset = 0;
sys_rootdelay = 0;
sys_rootdisp = 0;
@@ -395,17 +399,19 @@ timer(void)
* is imminent or every 8th second.
*/
if (leapsec > LSPROX_NOWARN || 0 == (current_time & 7))
- check_leapsec(now.l_ui, &tnow,
- (sys_leap == LEAP_NOTINSYNC));
- if (sys_leap != LEAP_NOTINSYNC) {
- if (leapsec >= LSPROX_ANNOUNCE && leapdif) {
- if (leapdif > 0)
- set_sys_leap(LEAP_ADDSECOND);
- else
- set_sys_leap(LEAP_DELSECOND);
- } else {
- set_sys_leap(LEAP_NOWARNING);
- }
+ check_leapsec( now.l_ui
+ , &tnow
+ , (sys_leap == LEAP_NOTINSYNC));
+ if (sys_leap != LEAP_NOTINSYNC) {
+ if (leapsec >= LSPROX_ANNOUNCE && leapdif) {
+ if (leapdif > 0) {
+ set_sys_leap(LEAP_ADDSECOND);
+ } else {
+ set_sys_leap(LEAP_DELSECOND);
+ }
+ } else {
+ set_sys_leap(LEAP_NOWARNING);
+ }
}
/*
@@ -431,23 +437,28 @@ timer(void)
*/
if (revoke_timer && revoke_timer <= current_time) {
revoke_timer += (1UL << sys_revoke);
- RAND_bytes((u_char *)&sys_private, 4);
+ RAND_bytes((u_char *)&sys_private, sizeof(sys_private));
}
#endif /* AUTOKEY */
/*
- * Interface update timer
+ * Network interface rescan timer
*/
- if (interface_interval && interface_timer <= current_time) {
- timer_interfacetimeout(current_time +
- interface_interval);
- DPRINTF(2, ("timer: interface update\n"));
+ if (endpt_scan_timer && endpt_scan_timer <= current_time) {
+ if (no_periodic_scan) {
+ endpt_scan_timer = 0;
+ DPRINTF(2, ("timer: network interface rescan disabled\n"));
+ } else {
+ endpt_scan_timer = current_time
+ + endpt_scan_period;
+ DPRINTF(2, ("timer: network interface rescan in %d seconds\n", endpt_scan_period));
+ }
interface_update(NULL, NULL);
}
- if (worker_idle_timer && worker_idle_timer <= current_time)
+ if (worker_idle_timer && worker_idle_timer <= current_time) {
worker_idle_timer_fired();
-
+ }
/*
* Finally, write hourly stats and do the hourly
* and daily leapfile checks.
@@ -508,13 +519,6 @@ alarming(
#endif /* SYS_WINNT */
-void
-timer_interfacetimeout(u_long timeout)
-{
- interface_timer = timeout;
-}
-
-
/*
* timer_clr_stats - clear timer module stat counters
*/
@@ -528,21 +532,27 @@ timer_clr_stats(void)
static void
-check_leap_sec_in_progress( const leap_result_t *lsdata ) {
+check_leap_sec_in_progress(
+ const leap_result_t *lsdata
+ )
+{
int prv_leap_sec_in_progress = leap_sec_in_progress;
+
leap_sec_in_progress = lsdata->tai_diff && (lsdata->ddist < 3);
- /* if changed we may have to update the leap status sent to clients */
- if (leap_sec_in_progress != prv_leap_sec_in_progress)
+ /* if changed we have to update the leap bits sent to clients */
+ if (leap_sec_in_progress != prv_leap_sec_in_progress) {
set_sys_leap(sys_leap);
+ }
}
static void
check_leapsec(
- u_int32 now ,
- const time_t * tpiv ,
- int/*BOOL*/ reset)
+ u_int32 now,
+ const time_t * tpiv,
+ int/*BOOL*/ reset
+ )
{
static const char leapmsg_p_step[] =
"Positive leap second, stepped backward.";
@@ -556,10 +566,10 @@ check_leapsec(
"Negative leap second, no step correction. "
"System clock will be inaccurate for a long time.";
- leap_result_t lsdata;
- u_int32 lsprox;
+ leap_result_t lsdata;
+ u_int32 lsprox;
#ifdef AUTOKEY
- int/*BOOL*/ update_autokey = FALSE;
+ int/*BOOL*/ update_autokey = FALSE;
#endif
#ifndef SYS_WINNT /* WinNT port has its own leap second handling */
@@ -568,122 +578,116 @@ check_leapsec(
# else
leapsec_electric(0);
# endif
-#endif
+#endif /* !SYS_WINNT */
+
#ifdef LEAP_SMEAR
leap_smear.enabled = leap_smear_intv != 0;
#endif
if (reset) {
lsprox = LSPROX_NOWARN;
leapsec_reset_frame();
- memset(&lsdata, 0, sizeof(lsdata));
+ ZERO(lsdata);
} else {
- int fired;
+ int fired;
- fired = leapsec_query(&lsdata, now, tpiv);
+ fired = leapsec_query(&lsdata, now, tpiv);
- DPRINTF(3, ("*** leapsec_query: fired %i, now %u (0x%08X), tai_diff %i, ddist %u\n",
- fired, now, now, lsdata.tai_diff, lsdata.ddist));
+ DPRINTF(3, ("*** leapsec_query: fired %i, now %u (0x%08X),"
+ " tai_diff %i, ddist %u\n",
+ fired, now, now, lsdata.tai_diff, lsdata.ddist));
#ifdef LEAP_SMEAR
- leap_smear.in_progress = 0;
- leap_smear.doffset = 0.0;
-
- if (leap_smear.enabled) {
- if (lsdata.tai_diff) {
- if (leap_smear.interval == 0) {
- leap_smear.interval = leap_smear_intv;
- leap_smear.intv_end = lsdata.ttime.Q_s;
- leap_smear.intv_start = leap_smear.intv_end - leap_smear.interval;
- DPRINTF(1, ("*** leapsec_query: setting leap_smear interval %li, begin %.0f, end %.0f\n",
+ leap_smear.in_progress = FALSE;
+ leap_smear.doffset = 0.0;
+
+ if (leap_smear.enabled) {
+ if (lsdata.tai_diff) {
+ if (0 == leap_smear.interval) {
+ leap_smear.interval = leap_smear_intv;
+ leap_smear.intv_end = lsdata.ttime.Q_s;
+ leap_smear.intv_start = leap_smear.intv_end - leap_smear.interval;
+ DPRINTF(1, ("*** leapsec_query: setting leap_smear interval %li, begin %.0f, end %.0f\n",
leap_smear.interval, leap_smear.intv_start, leap_smear.intv_end));
+ }
+ } else {
+ if (leap_smear.interval) {
+ DPRINTF(1, ("*** leapsec_query: clearing leap_smear interval\n"));
+ leap_smear.interval = 0;
+ }
}
- } else {
- if (leap_smear.interval)
- DPRINTF(1, ("*** leapsec_query: clearing leap_smear interval\n"));
- leap_smear.interval = 0;
- }
- if (leap_smear.interval) {
- double dtemp = now;
- if (dtemp >= leap_smear.intv_start && dtemp <= leap_smear.intv_end) {
- double leap_smear_time = dtemp - leap_smear.intv_start;
- /*
- * For now we just do a linear interpolation over the smear interval
- */
+ if (leap_smear.interval) {
+ double dtemp = now;
+
+ if (dtemp >= leap_smear.intv_start && dtemp <= leap_smear.intv_end) {
+ double leap_smear_time = dtemp - leap_smear.intv_start;
#if 0
- // linear interpolation
- leap_smear.doffset = -(leap_smear_time * lsdata.tai_diff / leap_smear.interval);
+ /* linear interpolation */
+ leap_smear.doffset = -(leap_smear_time * lsdata.tai_diff / leap_smear.interval);
#else
- // Google approach: lie(t) = (1.0 - cos(pi * t / w)) / 2.0
- leap_smear.doffset = -((double) lsdata.tai_diff - cos( M_PI * leap_smear_time / leap_smear.interval)) / 2.0;
+ /* Google approach : lie(t) = (1.0 - cos(pi * t / w)) / 2.0 */
+ leap_smear.doffset = -((double) lsdata.tai_diff - cos( M_PI * leap_smear_time / leap_smear.interval)) / 2.0;
#endif
- /*
- * TODO see if we're inside an inserted leap second, so we need to compute
- * leap_smear.doffset = 1.0 - leap_smear.doffset
- */
- leap_smear.in_progress = 1;
-#if 0 && defined( DEBUG )
- msyslog(LOG_NOTICE, "*** leapsec_query: [%.0f:%.0f] (%li), now %u (%.0f), smear offset %.6f ms\n",
- leap_smear.intv_start, leap_smear.intv_end, leap_smear.interval,
- now, leap_smear_time, leap_smear.doffset);
-#else
- DPRINTF(1, ("*** leapsec_query: [%.0f:%.0f] (%li), now %u (%.0f), smear offset %.6f ms\n",
+ /*
+ * TODO see if we're inside an inserted leap second, so we need to compute
+ * leap_smear.doffset = 1.0 - leap_smear.doffset
+ */
+ leap_smear.in_progress = TRUE;
+ DPRINTF(1, ("*** leapsec_query: [%.0f:%.0f] (%li), now %u (%.0f), smear offset %.6f ms\n",
leap_smear.intv_start, leap_smear.intv_end, leap_smear.interval,
now, leap_smear_time, leap_smear.doffset));
-#endif
+ }
}
+ } else {
+ leap_smear.interval = 0;
}
- }
- else
- leap_smear.interval = 0;
-
- /*
- * Update the current leap smear offset, eventually 0.0 if outside smear interval.
- */
- DTOLFP(leap_smear.doffset, &leap_smear.offset);
-
+ /*
+ * Update the current leap smear offset, eventually 0.0 if outside smear interval.
+ */
+ DTOLFP(leap_smear.doffset, &leap_smear.offset);
#endif /* LEAP_SMEAR */
- if (fired) {
- /* Full hit. Eventually step the clock, but always
- * announce the leap event has happened.
- */
- const char *leapmsg = NULL;
- double lswarp = lsdata.warped;
- if (lswarp < 0.0) {
- if (clock_max_back > 0.0 &&
- clock_max_back < -lswarp) {
- step_systime(lswarp);
- leapmsg = leapmsg_p_step;
- } else {
- leapmsg = leapmsg_p_slew;
+ if (fired) {
+ /* Full hit. Eventually step the clock, but always
+ * announce the leap event has happened.
+ */
+ const char *leapmsg = NULL;
+ double lswarp = lsdata.warped;
+ if (lswarp < 0.0) {
+ if (clock_max_back > 0.0 &&
+ clock_max_back < -lswarp) {
+ step_systime(lswarp);
+ leapmsg = leapmsg_p_step;
+ } else {
+ leapmsg = leapmsg_p_slew;
+ }
+ } else if (lswarp > 0.0) {
+ if (clock_max_fwd > 0.0 &&
+ clock_max_fwd < lswarp) {
+ step_systime(lswarp);
+ leapmsg = leapmsg_n_step;
+ } else {
+ leapmsg = leapmsg_n_slew;
+ }
}
- } else if (lswarp > 0.0) {
- if (clock_max_fwd > 0.0 &&
- clock_max_fwd < lswarp) {
- step_systime(lswarp);
- leapmsg = leapmsg_n_step;
- } else {
- leapmsg = leapmsg_n_slew;
+ if (leapmsg) {
+ msyslog(LOG_NOTICE, "%s", leapmsg);
}
- }
- if (leapmsg)
- msyslog(LOG_NOTICE, "%s", leapmsg);
- report_event(EVNT_LEAP, NULL, NULL);
+ report_event(EVNT_LEAP, NULL, NULL);
#ifdef AUTOKEY
- update_autokey = TRUE;
+ update_autokey = TRUE;
#endif
- lsprox = LSPROX_NOWARN;
- leapsec = LSPROX_NOWARN;
- sys_tai = lsdata.tai_offs;
- } else {
+ lsprox = LSPROX_NOWARN;
+ leapsec = LSPROX_NOWARN;
+ sys_tai = lsdata.tai_offs;
+ } else {
#ifdef AUTOKEY
- update_autokey = (sys_tai != (u_int)lsdata.tai_offs);
+ update_autokey = (sys_tai != (u_int)lsdata.tai_offs);
#endif
- lsprox = lsdata.proximity;
- sys_tai = lsdata.tai_offs;
- }
+ lsprox = lsdata.proximity;
+ sys_tai = lsdata.tai_offs;
+ }
}
/* We guard against panic alarming during the red alert phase.
@@ -691,13 +695,13 @@ check_leapsec(
* to piping hot in one step. If things are already that wobbly,
* we let the normal clock correction take over, even if a jump
* is involved.
- * Also make sure the alarming events are edge-triggered, that is,
- * ceated only when the threshold is crossed.
- */
- if ( (leapsec > 0 || lsprox < LSPROX_ALERT)
- && leapsec < lsprox ) {
+ * Also make sure the alarming events are edge-triggered, that is,
+ * created only when the threshold is crossed.
+ */
+ if ( (leapsec > 0 || lsprox < LSPROX_ALERT)
+ && leapsec < lsprox) {
if ( leapsec < LSPROX_SCHEDULE
- && lsprox >= LSPROX_SCHEDULE) {
+ && lsprox >= LSPROX_SCHEDULE) {
if (lsdata.dynamic)
report_event(PEVNT_ARMED, sys_peer, NULL);
else
@@ -706,22 +710,23 @@ check_leapsec(
leapsec = lsprox;
}
if (leapsec > lsprox) {
- if ( leapsec >= LSPROX_SCHEDULE
- && lsprox < LSPROX_SCHEDULE) {
+ if ( leapsec >= LSPROX_SCHEDULE
+ && lsprox < LSPROX_SCHEDULE) {
report_event(EVNT_DISARMED, NULL, NULL);
}
leapsec = lsprox;
}
- if (leapsec >= LSPROX_SCHEDULE)
+ if (leapsec >= LSPROX_SCHEDULE) {
leapdif = lsdata.tai_diff;
- else
+ } else {
leapdif = 0;
-
+ }
check_leap_sec_in_progress(&lsdata);
#ifdef AUTOKEY
- if (update_autokey)
+ if (update_autokey) {
crypto_update_taichange();
+ }
#endif
}
diff --git a/contrib/ntp/ntpd/ntp_util.c b/contrib/ntp/ntpd/ntp_util.c
index 62a997e43aad..e7b374fc346f 100644
--- a/contrib/ntp/ntpd/ntp_util.c
+++ b/contrib/ntp/ntpd/ntp_util.c
@@ -13,7 +13,6 @@
#include "ntp_assert.h"
#include "ntp_calendar.h"
#include "ntp_leapsec.h"
-#include "lib_strbuf.h"
#include <stdio.h>
#include <ctype.h>
@@ -63,7 +62,6 @@ char *stats_drift_file; /* frequency file name */
static char *stats_temp_file; /* temp frequency file name */
static double wander_resid; /* last frequency update */
double wander_threshold = 1e-7; /* initial frequency threshold */
-static unsigned int cmdargs_seen = 0; /* stat options seen from command line */
/*
* Statistics file stuff
@@ -183,7 +181,7 @@ init_util(void)
void
write_stats(void)
{
- FILE *fp;
+ FILE *fp = NULL;
#ifdef DOSYNCTODR
struct timeval tv;
#if !defined(VMS)
@@ -267,12 +265,10 @@ write_stats(void)
* the frequncy file. This minimizes the file writes to
* nonvolaile storage.
*/
-#ifdef DEBUG
- if (debug)
- printf("write_stats: frequency %.6lf thresh %.6lf, freq %.6lf\n",
+ DPRINTF(1, ("write_stats: frequency %.6f thresh %.6f, freq %.6f\n",
(prev_drift_comp - drift_comp) * 1e6, wander_resid *
- 1e6, drift_comp * 1e6);
-#endif
+ 1e6, drift_comp * 1e6));
+
if (fabs(prev_drift_comp - drift_comp) < wander_resid) {
wander_resid *= 0.5;
return;
@@ -284,7 +280,7 @@ write_stats(void)
stats_temp_file);
return;
}
- fprintf(fp, "%.3f\n", drift_comp * 1e6);
+ fprintf(fp, "%.6f\n", drift_comp * 1e6);
(void)fclose(fp);
/* atomic */
#ifdef SYS_WINNT
@@ -326,29 +322,38 @@ write_stats(void)
/*
- * stats_config - configure the stats operation
+ * If an option was given on the command line make sure it takes
+ * precedence over the configuration file, as command-line options
+ * are processed first. Similarly, if an option is given in the
+ * configuration file, do not allow it to be overridden with runtime
+ * configuration. Done by simply remembering an option was already
+ * seen.
*/
static int
allow_config(
- unsigned int option,
- int/*BOOL*/ cmdopt)
+ u_int option,
+ int/*BOOL*/ cmdopt
+ )
{
- /* If an option was given on the command line, make sure it
- * persists and is not later changed by a corresponding option
- * from the config file. Done by simply remembering an option was
- * already seen from the command line.
- *
- * BTW, if we ever define stats options beyond 31, this needs a
- * fix. Until then, simply assume the shift will not overflow.
- */
- unsigned int mask = 1u << option;
- int retv = cmdopt || !(cmdargs_seen & mask);
- if (cmdopt)
- cmdargs_seen |= mask;
+ static u_int seen = 0; /* stat options previously set */
+ u_int mask;
+ int retv;
+
+ if (cmdopt) {
+ DEBUG_REQUIRE(option < sizeof(mask) * 8);
+ mask = 1u << option;
+ retv = !(seen & mask);
+ seen |= mask;
+ } else {
+ retv = FALSE;
+ }
return retv;
}
+/*
+ * stats_config - configure the stats operation
+ */
void
stats_config(
int item,
@@ -356,12 +361,13 @@ stats_config(
int optflag
)
{
- FILE *fp;
+ FILE *fp = NULL;
const char *value;
size_t len;
double old_drift;
l_fp now;
time_t ttnow;
+ char dirsep_or_nul;
#ifndef VMS
static const char temp_ext[] = ".TEMP";
#else
@@ -415,137 +421,131 @@ stats_config(
switch (item) {
- /*
- * Open and read frequency file.
- */
+ /*
+ * Open and read frequency file.
+ */
case STATS_FREQ_FILE:
- if (!allow_config(STATS_FREQ_FILE, optflag))
+ if (!allow_config(STATS_FREQ_FILE, optflag)) {
break;
-
- if (!value || (len = strlen(value)) == 0)
- {
+ }
+ if (!value || 0 == (len = strlen(value))) {
free(stats_drift_file);
free(stats_temp_file);
- stats_drift_file = stats_temp_file = NULL;
- }
- else
- {
- stats_drift_file = erealloc(stats_drift_file, len + 1);
+ stats_drift_file = stats_temp_file = NULL;
+ } else {
+ stats_drift_file = erealloc(stats_drift_file,
+ 1 + len);
stats_temp_file = erealloc(stats_temp_file,
- len + sizeof(".TEMP"));
- memcpy(stats_drift_file, value, (size_t)(len+1));
- memcpy(stats_temp_file, value, (size_t)len);
- memcpy(stats_temp_file + len, temp_ext, sizeof(temp_ext));
+ len + sizeof(temp_ext));
+ memcpy(stats_drift_file, value, 1 + len);
+ memcpy(stats_temp_file, value, len);
+ memcpy(stats_temp_file + len, temp_ext,
+ sizeof(temp_ext));
}
-
+
/*
* Open drift file and read frequency. If the file is
* missing or contains errors, tell the loop to reset.
*/
if (NULL == stats_drift_file) {
- loop_config(LOOP_NOFREQ, 0.0);
- prev_drift_comp = 0.0;
+ goto nofreq;
} else if ((fp = fopen(stats_drift_file, "r")) == NULL) {
- if (errno != ENOENT)
+ if (errno != ENOENT) {
msyslog(LOG_WARNING,
- "cannot read frequency file %s: %s",
- stats_drift_file, strerror(errno));
+ "cannot read frequency file %s: %m",
+ stats_drift_file);
+ }
+ goto nofreq;
} else if (fscanf(fp, "%lf", &old_drift) != 1) {
msyslog(LOG_ERR,
"format error frequency file %s",
stats_drift_file);
- fclose(fp);
+ nofreq:
+ prev_drift_comp = 0.0;
+ loop_config(LOOP_NOFREQ, prev_drift_comp);
} else {
loop_config(LOOP_FREQ, old_drift);
prev_drift_comp = drift_comp;
msyslog(LOG_INFO,
- "initial drift restored to %f",
+ "initial drift restored to %.6f",
old_drift);
+ }
+ if (NULL != fp) {
fclose(fp);
}
break;
- /*
- * Specify statistics directory.
- */
+ /*
+ * Specify statistics directory.
+ */
case STATS_STATSDIR:
- if (!allow_config(STATS_STATSDIR, optflag))
+ if (!allow_config(STATS_STATSDIR, optflag)) {
break;
-
- /* - 1 since value may be missing the DIR_SEP. */
- if (strlen(value) >= sizeof(statsdir) - 1) {
+ }
+ /* - 2 since value may be missing the DIR_SEP. */
+ len = strlen(value);
+ if (len > sizeof(statsdir) - 2) {
msyslog(LOG_ERR,
- "statsdir too long (>%d, sigh)",
- (int)sizeof(statsdir) - 2);
+ "statsdir %s too long (>%u)", value,
+ (u_int)sizeof(statsdir) - 2);
+ break;
+ }
+ /* Add a DIR_SEP unless we already have one. */
+ if (0 == len || DIR_SEP == value[len - 1]) {
+ dirsep_or_nul = '\0';
} else {
- int add_dir_sep;
- size_t value_l;
-
- /* Add a DIR_SEP unless we already have one. */
- value_l = strlen(value);
- if (0 == value_l)
- add_dir_sep = FALSE;
- else
- add_dir_sep = (DIR_SEP !=
- value[value_l - 1]);
-
- if (add_dir_sep)
- snprintf(statsdir, sizeof(statsdir),
- "%s%c", value, DIR_SEP);
- else
- snprintf(statsdir, sizeof(statsdir),
- "%s", value);
- filegen_statsdir();
+ dirsep_or_nul = DIR_SEP;
}
+ snprintf(statsdir, sizeof(statsdir), "%s%c",
+ value, dirsep_or_nul);
+ filegen_statsdir();
break;
- /*
- * Open pid file.
- */
+ /*
+ * Write pid file.
+ */
case STATS_PID_FILE:
- if (!allow_config(STATS_PID_FILE, optflag))
+ if (!allow_config(STATS_PID_FILE, optflag)) {
break;
-
+ }
if ((fp = fopen(value, "w")) == NULL) {
- msyslog(LOG_ERR, "pid file %s: %m",
- value);
+ msyslog(LOG_ERR, "pid file %s: %m", value);
break;
}
- fprintf(fp, "%d", (int)getpid());
+ fprintf(fp, "%ld", (long)getpid());
fclose(fp);
break;
/*
* Read leapseconds file.
*
- * Note: Currently a leap file without SHA1 signature is
- * accepted, but if there is a signature line, the signature
- * must be valid or the file is rejected.
+ * By default a leap file without SHA1 signature is accepted,
+ * but if there is a signature line, the signature must be
+ * valid or the leapfile line in ntp.conf must have ignorehash.
*/
case STATS_LEAP_FILE:
- if (!value || (len = strlen(value)) == 0)
+ if (NULL == value || 0 == (len = strlen(value))) {
break;
-
+ }
leapfile_name = erealloc(leapfile_name, len + 1);
memcpy(leapfile_name, value, len + 1);
chck_leaphash = optflag;
if (leapsec_load_file(
leapfile_name, &leapfile_stat,
- TRUE, TRUE, chck_leaphash))
- {
+ TRUE, TRUE, chck_leaphash)) {
leap_signature_t lsig;
get_systime(&now);
time(&ttnow);
leapsec_getsig(&lsig);
mprintf_event(EVNT_TAI, NULL,
- "%d leap %s %s %s",
+ "%d leap %s expire%s %s",
lsig.taiof,
fstostr(lsig.ttime),
leapsec_expired(now.l_ui, NULL)
- ? "expired"
- : "expires",
+ ? "d"
+ : "s",
fstostr(lsig.etime));
have_leapfile = TRUE;
@@ -579,31 +579,32 @@ stats_config(
*/
void
record_peer_stats(
- sockaddr_u *addr,
- int status,
- double offset, /* offset */
- double delay, /* delay */
- double dispersion, /* dispersion */
- double jitter /* jitter */
+ sockaddr_u * addr,
+ int status,
+ double offset,
+ double delay,
+ double dispersion,
+ double jitter
)
{
- l_fp now;
- u_long day;
+ l_fp now;
+ u_long day;
- if (!stats_control)
+ if (!stats_control) {
return;
-
+ }
get_systime(&now);
filegen_setup(&peerstats, now.l_ui);
+ if (NULL == peerstats.fp) {
+ return;
+ }
day = now.l_ui / 86400 + MJD_1900;
now.l_ui %= 86400;
- if (peerstats.fp != NULL) {
- fprintf(peerstats.fp,
- "%lu %s %s %x %.9f %.9f %.9f %.9f\n", day,
- ulfptoa(&now, 3), stoa(addr), status, offset,
- delay, dispersion, jitter);
- fflush(peerstats.fp);
- }
+ fprintf(peerstats.fp,
+ "%lu %s %s %x %.9f %.9f %.9f %.9f\n", day,
+ ulfptoa(&now, 3), stoa(addr), status, offset,
+ delay, dispersion, jitter);
+ fflush(peerstats.fp);
}
@@ -934,13 +935,14 @@ record_timing_stats(
*
* Note: This loads a new leapfile on the fly. Currently a leap file
* without SHA1 signature is accepted, but if there is a signature line,
- * the signature must be valid or the file is rejected.
+ * the signature must be valid unless the ntp.conf leapfile line specified
+ * ignorehash.
*/
void
check_leap_file(
- int is_daily_check,
- uint32_t ntptime ,
- const time_t *systime
+ int is_daily_check,
+ uint32_t ntptime,
+ const time_t * systime
)
{
/* just do nothing if there is no leap file */
@@ -1097,3 +1099,20 @@ ntpd_time_stepped(void)
win_time_stepped();
#endif
}
+
+
+#ifdef DEBUG
+void
+append_flagstr(
+ char * flagstr,
+ size_t sz,
+ const char * text
+)
+{
+ if ('\0' != flagstr[0]) {
+ strlcat(flagstr, ",", sz);
+ }
+ /* bail if we ran out of room */
+ INSIST(strlcat(flagstr, text, sz) < sz);
+}
+#endif /* DEBUG */
diff --git a/contrib/ntp/ntpd/ntpd-opts.c b/contrib/ntp/ntpd/ntpd-opts.c
index 14774d684f2d..5d8b0bb33659 100644
--- a/contrib/ntp/ntpd/ntpd-opts.c
+++ b/contrib/ntp/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed June 6, 2023 at 04:36:50 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:03:09 AM by AutoGen 5.18.16
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -80,8 +80,8 @@ extern FILE * option_usage_fp;
* static const strings for ntpd options
*/
static char const ntpd_opt_strs[3133] =
-/* 0 */ "ntpd 4.2.8p17\n"
- "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/* 0 */ "ntpd 4.2.8p18\n"
+ "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -210,12 +210,12 @@ static char const ntpd_opt_strs[3133] =
/* 2901 */ "output version information and exit\0"
/* 2937 */ "version\0"
/* 2945 */ "NTPD\0"
-/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p17\n"
+/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p18\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
/* 3082 */ "https://bugs.ntp.org, bugs@ntp.org\0"
/* 3117 */ "\n\0"
-/* 3119 */ "ntpd 4.2.8p17";
+/* 3119 */ "ntpd 4.2.8p18";
/**
* ipv4 option description with
@@ -1534,8 +1534,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p17\n\
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpd 4.2.8p18\n\
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1675,7 +1675,7 @@ implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.8p17\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p18\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1683,7 +1683,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.8p17"));
+ puts(_("ntpd 4.2.8p18"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpd/ntpd-opts.h b/contrib/ntp/ntpd/ntpd-opts.h
index 3541255bb6fb..99fb3dcd230f 100644
--- a/contrib/ntp/ntpd/ntpd-opts.h
+++ b/contrib/ntp/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed June 6, 2023 at 04:36:50 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:03:08 AM by AutoGen 5.18.16
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -114,9 +114,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p17"
+#define NTPD_VERSION "4.2.8p18"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p17"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p18"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdman b/contrib/ntp/ntpd/ntpd.1ntpdman
index 237a9179f62e..6d91d5725284 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdman
+++ b/contrib/ntp/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpd 1ntpdman "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:49 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:07 AM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -979,7 +979,7 @@ RFC5908
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdmdoc b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
index 536e7f672840..90e08b7aa825 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdmdoc
+++ b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:36 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:03:54 AM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index e58a0613bdcc..b64caae06da1 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -101,16 +101,6 @@
#include "recvbuff.h"
#include "ntp_cmdargs.h"
-#if 0 /* HMS: I don't think we need this. 961223 */
-#ifdef LOCK_PROCESS
-# ifdef SYS_SOLARIS
-# include <sys/mman.h>
-# else
-# include <sys/lock.h>
-# endif
-#endif
-#endif
-
#ifdef SYS_WINNT
# include "ntservice.h"
#endif
@@ -145,6 +135,13 @@
# include <seccomp.h>
#endif /* LIBSECCOMP and KERN_SECCOMP */
+#if defined(__FreeBSD__) && __FreeBSD_version < 1400037 && defined(HAVE_SYS_PROCCTL_H)
+# include <sys/procctl.h>
+# ifdef PROC_STACKGAP_DISABLE
+# define DISABLE_FREEBSD_STACKGAP
+# endif
+#endif
+
#ifdef HAVE_DNSREGISTRATION
# include <dns_sd.h>
DNSServiceRef mdns;
@@ -427,6 +424,24 @@ main(
char *argv[]
)
{
+# ifdef DISABLE_FREEBSD_STACKGAP
+ /*
+ * We must disable ASLR stack gap on FreeBSD that has
+ * PROC_STACKGAP_DISABLE up through early FreeBSD 14
+ * versions to avoid a segfault. See:
+ *
+ * https://bugs.ntp.org/3627
+ * https://cgit.freebsd.org/src/commit/?id=889b56c8cd84c9a9f2d9e3b019c154d6f14d9021
+ * https://cgit.freebsd.org/src/commit/?id=fc393054398ea50fb0cee52704e9385afe888b48
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253208
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241421
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241960
+ */
+ int aslr_var = PROC_STACKGAP_DISABLE;
+
+ procctl(P_PID, getpid(), PROC_STACKGAP_CTL, &aslr_var);
+# endif /* DISABLE_FREEBSD_STACKGAP */
+
return ntpdmain(argc, argv);
}
#endif /* !SYS_WINNT */
@@ -560,7 +575,7 @@ set_process_priority(void)
# ifdef HAVE_WORKING_FORK
static void
detach_from_terminal(
- int pipe[2],
+ int pipes[2],
long wait_sync,
const char *logfilename
)
@@ -581,11 +596,10 @@ detach_from_terminal(
msyslog(LOG_ERR, "fork: %m");
exit_code = EX_OSERR;
} else {
- close(pipe[1]);
- pipe[1] = -1;
+ close(pipes[1]);
+ pipes[1] = -1;
exit_code = wait_child_sync_if(
- pipe[0], wait_sync);
- DPRINTF(1, ("sync_if: rc=%d\n", exit_code));
+ pipes[0], wait_sync);
if (exit_code <= 0) {
/* probe daemon exit code -- wait for
* child process if we have an unexpected
@@ -593,7 +607,6 @@ detach_from_terminal(
*/
exit_code = wait_child_exit_if(
cpid, (exit_code < 0));
- DPRINTF(1, ("exit_if: rc=%d\n", exit_code));
}
}
exit(exit_code);
@@ -610,8 +623,8 @@ detach_from_terminal(
syslog_file = NULL;
syslogit = TRUE;
}
- close_all_except(pipe[1]);
- pipe[0] = -1;
+ close_all_except(pipes[1]);
+ pipes[0] = -1;
INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
&& 2 == dup2(0, 2));
@@ -655,6 +668,7 @@ detach_from_terminal(
return;
}
# endif /* HAVE_WORKING_FORK */
+#endif /* !SIM && !SYS_WINNT */
#ifdef HAVE_DROPROOT
/*
@@ -793,7 +807,6 @@ set_user_group_ids(void)
return 1;
}
#endif /* HAVE_DROPROOT */
-#endif /* !SIM */
/*
* Main program. Initialize us, disconnect us from the tty if necessary,
@@ -892,10 +905,13 @@ ntpdmain(
msyslog(LOG_NOTICE, "available at https://www.nwtime.org/support");
msyslog(LOG_NOTICE, "----------------------------------------------------");
#ifdef DEBUG
- msyslog(LOG_NOTICE, "DEBUG behavior is enabled - a violation of any");
- msyslog(LOG_NOTICE, "diagnostic assertion will cause %s to abort", progname);
+ msyslog(LOG_NOTICE, "DEBUG behavior is enabled - a violation of any"
+ " diagnostic assertion will cause %s to abort",
+ progname);
#endif
+ ssl_check_version();
+
/*
* Install trap handlers to log errors and assertion failures.
* Default handlers print to stderr which doesn't work if detached.
@@ -1267,11 +1283,10 @@ ntpdmain(
* is associated with running with uid 0 - should be refined on
* ports that allow binding to NTP_PORT with uid != 0
*/
- disable_dynamic_updates |= (sw_uid != 0); /* also notifies routing message listener */
+ scan_addrs_once |= (sw_uid != 0); /* used by routing socket code */
# endif /* !HAVE_LINUX_CAPABILITIES && !HAVE_SOLARIS_PRIVS */
- if (disable_dynamic_updates && interface_interval) {
- interface_interval = 0;
+ if (scan_addrs_once) {
msyslog(LOG_INFO, "running as non-root disables dynamic interface tracking");
}
@@ -1285,9 +1300,9 @@ ntpdmain(
cap_t caps;
char *captext;
- captext = (0 != interface_interval)
- ? "cap_sys_time,cap_net_bind_service=pe"
- : "cap_sys_time=pe";
+ captext = (scan_addrs_once)
+ ? "cap_sys_time=pe"
+ : "cap_sys_time,cap_net_bind_service=pe";
caps = cap_from_text(captext);
if (!caps) {
msyslog(LOG_ERR,
@@ -1424,10 +1439,9 @@ int scmp_sc[] = {
}
#endif /* LIBSECCOMP and KERN_SECCOMP */
-#if defined(SYS_WINNT)
ntservice_isup();
-#elif defined(HAVE_WORKING_FORK)
- if (daemon_pipe[1] != -1) {
+#if defined(HAVE_WORKING_FORK)
+ if (daemon_pipe[1] != -1 && 0 == wait_sync) {
if (2 != write(daemon_pipe[1], "R\n", 2)) {
msyslog(LOG_ERR, "daemon failed to notify parent ntpd after init");
}
@@ -1436,6 +1450,10 @@ int scmp_sc[] = {
}
#endif /* HAVE_WORKING_FORK */
+ if (scan_addrs_once || no_periodic_scan) {
+ endpt_scan_timer = 0;
+ }
+
# ifndef HAVE_IO_COMPLETION_PORT
BLOCK_IO_AND_ALARM();
was_alarmed = FALSE;
@@ -1674,29 +1692,31 @@ wait_child_sync_if(
}
rc = read(pipe_read_fd, &ch, 1);
if (rc == 0) {
- DPRINTF(2, ("daemon control: got EOF\n"));
+ /* DPRINTF is useless here as -d/-D disable forking */
+ fprintf(stderr, "daemon control: got EOF\n");
return -1; /* unexpected EOF, check daemon */
} else if (rc == 1) {
- DPRINTF(2, ("daemon control: got '%c'\n",
- (ch >= ' ' ? ch : '.')));
- if (ch == 'R' && !wait_sync)
- return 0;
- if (ch == 'S' && wait_sync)
+ if ( ('S' == ch && wait_sync > 0)
+ || ('R' == ch && 0 == wait_sync)) {
return 0;
+ }
} else {
- DPRINTF(2, ("daemon control: read 1 char failed: %s\n",
- strerror(errno)));
+ mfprintf(stderr, "%s: daemon control: read 1 char failed: %m\n",
+ progname);
+ msyslog(LOG_ERR, "daemon control: read 1 char failed: %m");
return EX_IOERR;
}
} while (wait_rem > 0);
- if (wait_sync) {
+ if (wait_sync > 0) {
fprintf(stderr, "%s: -w/--wait-sync %ld timed out.\n",
progname, wait_sync);
+ msyslog(LOG_ERR, "-w/--wait-sync %ld timed out.", wait_sync);
return EX_PROTOCOL;
} else {
fprintf(stderr, "%s: daemon startup monitoring timed out.\n",
progname);
+ msyslog(LOG_ERR, "daemon startup monitoring timed out.");
return 0;
}
}
@@ -1712,7 +1732,6 @@ wait_child_exit_if(
int rc = 0;
int wstatus;
if (cpid == waitpid(cpid, &wstatus, (blocking ? 0 : WNOHANG))) {
- DPRINTF(1, ("child (pid=%d) dead now\n", cpid));
if (WIFEXITED(wstatus)) {
rc = WEXITSTATUS(wstatus);
msyslog(LOG_ERR, "daemon child exited with code %d",
@@ -1725,8 +1744,6 @@ wait_child_exit_if(
rc = EX_SOFTWARE;
msyslog(LOG_ERR, "daemon child died with unknown cause");
}
- } else {
- DPRINTF(1, ("child (pid=%d) still alive\n", cpid));
}
return rc;
# else
diff --git a/contrib/ntp/ntpd/ntpd.html b/contrib/ntp/ntpd/ntpd.html
index 3947f57f1a9b..a95695ef88b9 100644
--- a/contrib/ntp/ntpd/ntpd.html
+++ b/contrib/ntp/ntpd/ntpd.html
@@ -56,7 +56,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntpd</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntpd</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -292,7 +292,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p17
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p18
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/ntpd/ntpd.man.in b/contrib/ntp/ntpd/ntpd.man.in
index addee5d56e77..2474c8d18d9b 100644
--- a/contrib/ntp/ntpd/ntpd.man.in
+++ b/contrib/ntp/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpd @NTPD_MS@ "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:49 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:07 AM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -979,7 +979,7 @@ RFC5908
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/contrib/ntp/ntpd/ntpd.mdoc.in b/contrib/ntp/ntpd/ntpd.mdoc.in
index 6d99fbcf5e7a..874a6c778ed7 100644
--- a/contrib/ntp/ntpd/ntpd.mdoc.in
+++ b/contrib/ntp/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:36 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:03:54 AM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/contrib/ntp/ntpd/refclock_acts.c b/contrib/ntp/ntpd/refclock_acts.c
index 944ac764ccff..709427d34e9e 100644
--- a/contrib/ntp/ntpd/refclock_acts.c
+++ b/contrib/ntp/ntpd/refclock_acts.c
@@ -897,5 +897,5 @@ acts_timecode(
pp->lastref = pp->lastrec;
}
#else
-int refclock_acts_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_arbiter.c b/contrib/ntp/ntpd/refclock_arbiter.c
index 7de613fa751e..b92e72361bb1 100644
--- a/contrib/ntp/ntpd/refclock_arbiter.c
+++ b/contrib/ntp/ntpd/refclock_arbiter.c
@@ -473,5 +473,5 @@ arb_poll(
}
#else
-int refclock_arbiter_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_arc.c b/contrib/ntp/ntpd/refclock_arc.c
index d2dba54cb462..73bb63bc408a 100644
--- a/contrib/ntp/ntpd/refclock_arc.c
+++ b/contrib/ntp/ntpd/refclock_arc.c
@@ -870,15 +870,18 @@ arc_receive(
struct recvbuf *rbufp
)
{
+ static int quality_average = 0;
+ static int quality_sum = 0;
+ static int quality_polls = 0;
register struct arcunit *up;
struct refclockproc *pp;
struct peer *peer;
char c;
- int i, n, wday, month, flags, status;
+ int i, wday, month, flags, status;
int arc_last_offset;
- static int quality_average = 0;
- static int quality_sum = 0;
- static int quality_polls = 0;
+ #ifdef DEBUG
+ int n;
+ #endif
/*
* Initialize pointers and read the timecode and timestamp
@@ -1182,8 +1185,8 @@ arc_receive(
status = pp->a_lastcode[15];
#ifdef DEBUG
if(debug) { printf("arc: status 0x%.2x flags 0x%.2x\n", flags, status); }
-#endif
n = 9;
+#endif
/*
Validate received values at least enough to prevent internal
diff --git a/contrib/ntp/ntpd/refclock_as2201.c b/contrib/ntp/ntpd/refclock_as2201.c
index d71284173cbb..bb485551bb6c 100644
--- a/contrib/ntp/ntpd/refclock_as2201.c
+++ b/contrib/ntp/ntpd/refclock_as2201.c
@@ -385,5 +385,5 @@ as2201_poll(
}
#else
-int refclock_as2201_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_atom.c b/contrib/ntp/ntpd/refclock_atom.c
index b3c0d6b46ab0..6e01352db982 100644
--- a/contrib/ntp/ntpd/refclock_atom.c
+++ b/contrib/ntp/ntpd/refclock_atom.c
@@ -235,5 +235,5 @@ atom_poll(
refclock_receive(peer);
}
#else
-int refclock_atom_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_bancomm.c b/contrib/ntp/ntpd/refclock_bancomm.c
index 577ad277213c..d0d855d57b22 100644
--- a/contrib/ntp/ntpd/refclock_bancomm.c
+++ b/contrib/ntp/ntpd/refclock_bancomm.c
@@ -617,5 +617,5 @@ stfp_time2tvme(struct vmedate *time_vme, struct stfp_time *stfp)
return;
}
#else
-int refclock_bancomm_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_chronolog.c b/contrib/ntp/ntpd/refclock_chronolog.c
index 1499ee4c81ed..4a8a4aa86efb 100644
--- a/contrib/ntp/ntpd/refclock_chronolog.c
+++ b/contrib/ntp/ntpd/refclock_chronolog.c
@@ -339,5 +339,5 @@ chronolog_poll(
}
#else
-int refclock_chronolog_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_conf.c b/contrib/ntp/ntpd/refclock_conf.c
index 30cc632065c8..ddabf932ea98 100644
--- a/contrib/ntp/ntpd/refclock_conf.c
+++ b/contrib/ntp/ntpd/refclock_conf.c
@@ -322,5 +322,5 @@ struct refclock * const refclock_conf[] = {
u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *);
#else
-int refclock_conf_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif
diff --git a/contrib/ntp/ntpd/refclock_dumbclock.c b/contrib/ntp/ntpd/refclock_dumbclock.c
index 3563847dac05..37aaf28fa02a 100644
--- a/contrib/ntp/ntpd/refclock_dumbclock.c
+++ b/contrib/ntp/ntpd/refclock_dumbclock.c
@@ -373,5 +373,5 @@ dumbclock_poll(
#endif
#else
-int refclock_dumbclock_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK) */
diff --git a/contrib/ntp/ntpd/refclock_fg.c b/contrib/ntp/ntpd/refclock_fg.c
index abcf43f9cb9e..9ded8c7e79e0 100644
--- a/contrib/ntp/ntpd/refclock_fg.c
+++ b/contrib/ntp/ntpd/refclock_fg.c
@@ -331,5 +331,5 @@ fg_receive(
#else
-int refclock_fg_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_gpsvme.c b/contrib/ntp/ntpd/refclock_gpsvme.c
index 66ccc9a3ec90..3920b7a3cccc 100644
--- a/contrib/ntp/ntpd/refclock_gpsvme.c
+++ b/contrib/ntp/ntpd/refclock_gpsvme.c
@@ -249,5 +249,5 @@ check_leap_sec(struct refclockproc *pp, int unit)
}
#else
-int refclock_gpsvme_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_heath.c b/contrib/ntp/ntpd/refclock_heath.c
index e34fa6b93628..2d9aa45a5b6d 100644
--- a/contrib/ntp/ntpd/refclock_heath.c
+++ b/contrib/ntp/ntpd/refclock_heath.c
@@ -446,5 +446,5 @@ heath_poll(
}
#else
-int refclock_heath_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_hopfpci.c b/contrib/ntp/ntpd/refclock_hopfpci.c
index 95bcab983c4d..5b63e593fa2b 100644
--- a/contrib/ntp/ntpd/refclock_hopfpci.c
+++ b/contrib/ntp/ntpd/refclock_hopfpci.c
@@ -254,5 +254,5 @@ hopfpci_poll(
}
#else
-int refclock_hopfpci_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_hopfser.c b/contrib/ntp/ntpd/refclock_hopfser.c
index e8e5ecefdc40..6cc39c90b774 100644
--- a/contrib/ntp/ntpd/refclock_hopfser.c
+++ b/contrib/ntp/ntpd/refclock_hopfser.c
@@ -362,5 +362,5 @@ hopfserial_poll (
}
#else
-int refclock_hopfser_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_hpgps.c b/contrib/ntp/ntpd/refclock_hpgps.c
index fb7085a799e5..e9a87172136d 100644
--- a/contrib/ntp/ntpd/refclock_hpgps.c
+++ b/contrib/ntp/ntpd/refclock_hpgps.c
@@ -622,5 +622,5 @@ hpgps_poll(
}
#else
-int refclock_hpgps_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_irig.c b/contrib/ntp/ntpd/refclock_irig.c
index abc94f62e8fb..29cf5d6a748e 100644
--- a/contrib/ntp/ntpd/refclock_irig.c
+++ b/contrib/ntp/ntpd/refclock_irig.c
@@ -1039,5 +1039,5 @@ irig_gain(
#else
-int refclock_irig_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_jjy.c b/contrib/ntp/ntpd/refclock_jjy.c
index c4e1697bfdf7..84956eb1da2a 100644
--- a/contrib/ntp/ntpd/refclock_jjy.c
+++ b/contrib/ntp/ntpd/refclock_jjy.c
@@ -4525,5 +4525,5 @@ printableString ( char *sOutput, int iOutputLen, const char *sInput, int iInputL
/**************************************************************************************************/
#else
-int refclock_jjy_bs ;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_jupiter.c b/contrib/ntp/ntpd/refclock_jupiter.c
index 7db0198ec692..4deac7401dc4 100644
--- a/contrib/ntp/ntpd/refclock_jupiter.c
+++ b/contrib/ntp/ntpd/refclock_jupiter.c
@@ -1028,5 +1028,5 @@ jupiter_recv(
}
#else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
-int refclock_jupiter_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
diff --git a/contrib/ntp/ntpd/refclock_local.c b/contrib/ntp/ntpd/refclock_local.c
index 8c0f74f62c24..62de1a98e84e 100644
--- a/contrib/ntp/ntpd/refclock_local.c
+++ b/contrib/ntp/ntpd/refclock_local.c
@@ -213,5 +213,5 @@ local_poll(
refclock_receive(peer);
}
#else
-int refclock_local_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_mx4200.c b/contrib/ntp/ntpd/refclock_mx4200.c
index 11c17d069dd4..0de856ee1edb 100644
--- a/contrib/ntp/ntpd/refclock_mx4200.c
+++ b/contrib/ntp/ntpd/refclock_mx4200.c
@@ -1635,5 +1635,5 @@ mx4200_send(peer, fmt, va_alist)
}
#else
-int refclock_mx4200_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_neoclock4x.c b/contrib/ntp/ntpd/refclock_neoclock4x.c
index a54381678310..a8c0a336307f 100644
--- a/contrib/ntp/ntpd/refclock_neoclock4x.c
+++ b/contrib/ntp/ntpd/refclock_neoclock4x.c
@@ -1057,7 +1057,7 @@ neol_check_firmware(int unit,
#endif
#else
-int refclock_neoclock4x_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
/*
diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c
index 131ccf641a56..a2d8d499156f 100644
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ b/contrib/ntp/ntpd/refclock_nmea.c
@@ -1408,6 +1408,7 @@ typedef unsigned char const UCC;
static char const * const s_eof_chars = ",*\r\n";
+#ifdef DEBUG
static int field_length(UCC *cp, unsigned int nfields)
{
char const * ep = (char const*)cp;
@@ -1419,6 +1420,7 @@ static int field_length(UCC *cp, unsigned int nfields)
? (int)((UCC*)ep - cp)
: (int)strlen((char const*)cp);
}
+#endif /* DEBUG */
/* /[,*\r\n]/ --> skip */
static int _parse_eof(UCC *cp, UCC ** ep)
diff --git a/contrib/ntp/ntpd/refclock_oncore.c b/contrib/ntp/ntpd/refclock_oncore.c
index d41d54023348..512e64b644da 100644
--- a/contrib/ntp/ntpd/refclock_oncore.c
+++ b/contrib/ntp/ntpd/refclock_oncore.c
@@ -4136,5 +4136,5 @@ oncore_log_f(
}
#else
-int refclock_oncore_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK && CLOCK_ONCORE */
diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c
index a9fe2689575b..3a61d6012213 100644
--- a/contrib/ntp/ntpd/refclock_palisade.c
+++ b/contrib/ntp/ntpd/refclock_palisade.c
@@ -1567,5 +1567,5 @@ getsingle(
}
#else /* REFCLOCK && CLOCK_PALISADE*/
-int refclock_palisade_c_notempty;
+NONEMPTY_TRANSLATION_UNIT
#endif
diff --git a/contrib/ntp/ntpd/refclock_pcf.c b/contrib/ntp/ntpd/refclock_pcf.c
index 45b3475c0d68..4e92370ece10 100644
--- a/contrib/ntp/ntpd/refclock_pcf.c
+++ b/contrib/ntp/ntpd/refclock_pcf.c
@@ -223,5 +223,5 @@ pcf_poll(
refclock_receive(peer);
}
#else
-int refclock_pcf_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_pst.c b/contrib/ntp/ntpd/refclock_pst.c
index 1d3e1ffcfd6a..bd0f15938101 100644
--- a/contrib/ntp/ntpd/refclock_pst.c
+++ b/contrib/ntp/ntpd/refclock_pst.c
@@ -314,5 +314,5 @@ pst_poll(
}
#else
-int refclock_pst_int;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_ripencc.c b/contrib/ntp/ntpd/refclock_ripencc.c
index 789029f8aad5..a7339e3d4936 100644
--- a/contrib/ntp/ntpd/refclock_ripencc.c
+++ b/contrib/ntp/ntpd/refclock_ripencc.c
@@ -5250,6 +5250,6 @@ TranslateTSIPReportToText(
#endif /* TRIMBLE_OUTPUT_FUNC */
#else /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */
-int refclock_ripencc_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */
diff --git a/contrib/ntp/ntpd/refclock_tpro.c b/contrib/ntp/ntpd/refclock_tpro.c
index ac511bb4b392..9adcb5c6c7b3 100644
--- a/contrib/ntp/ntpd/refclock_tpro.c
+++ b/contrib/ntp/ntpd/refclock_tpro.c
@@ -204,5 +204,5 @@ tpro_poll(
}
#else
-int refclock_tpro_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_true.c b/contrib/ntp/ntpd/refclock_true.c
index 78e6adb9acaa..e41cd1351840 100644
--- a/contrib/ntp/ntpd/refclock_true.c
+++ b/contrib/ntp/ntpd/refclock_true.c
@@ -977,5 +977,5 @@ true_sample720(void)
#endif
#else
-int refclock_true_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_tsyncpci.c b/contrib/ntp/ntpd/refclock_tsyncpci.c
index e14a3fd122c5..49097ea72420 100644
--- a/contrib/ntp/ntpd/refclock_tsyncpci.c
+++ b/contrib/ntp/ntpd/refclock_tsyncpci.c
@@ -908,5 +908,5 @@ void DoyTimeFromSecTime(DoyTimeObj* pDt, SecTimeObj* pSt)
} // End DoyTimeFromSecTime
#else
-int refclock_tsyncpci_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_tt560.c b/contrib/ntp/ntpd/refclock_tt560.c
index 171ba5c8cc44..89bca13617f3 100644
--- a/contrib/ntp/ntpd/refclock_tt560.c
+++ b/contrib/ntp/ntpd/refclock_tt560.c
@@ -266,5 +266,5 @@ byte_swap(unsigned int input_num)
}
#else
-int refclock_tt560_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_ulink.c b/contrib/ntp/ntpd/refclock_ulink.c
index 60147adba219..c09638c21ca0 100644
--- a/contrib/ntp/ntpd/refclock_ulink.c
+++ b/contrib/ntp/ntpd/refclock_ulink.c
@@ -564,5 +564,5 @@ ulink_poll(
}
#else
-int refclock_ulink_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_wwv.c b/contrib/ntp/ntpd/refclock_wwv.c
index 2736cfa32fd7..f4098ae81cd7 100644
--- a/contrib/ntp/ntpd/refclock_wwv.c
+++ b/contrib/ntp/ntpd/refclock_wwv.c
@@ -2707,5 +2707,5 @@ wwv_gain(
#else
-int refclock_wwv_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_wwvb.c b/contrib/ntp/ntpd/refclock_wwvb.c
index 6aafc26f1408..3720cdf80a1c 100644
--- a/contrib/ntp/ntpd/refclock_wwvb.c
+++ b/contrib/ntp/ntpd/refclock_wwvb.c
@@ -599,5 +599,5 @@ wwvb_control(
#endif /* HAVE_PPSAPI */
#else
-int refclock_wwvb_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_zyfer.c b/contrib/ntp/ntpd/refclock_zyfer.c
index f77604868617..0ec566d5aec7 100644
--- a/contrib/ntp/ntpd/refclock_zyfer.c
+++ b/contrib/ntp/ntpd/refclock_zyfer.c
@@ -344,5 +344,5 @@ zyfer_poll(
}
#else
-int refclock_zyfer_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpdate/Makefile.in b/contrib/ntp/ntpdate/Makefile.in
index b46352555475..66d3c93ceb63 100644
--- a/contrib/ntp/ntpdate/Makefile.in
+++ b/contrib/ntp/ntpdate/Makefile.in
@@ -94,6 +94,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = ntpdate$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = ntpdate
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -390,6 +391,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -489,7 +491,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-BUILT_SOURCES = check-libntp .deps-ver
+BUILT_SOURCES = $(am__append_1) .deps-ver
DISTCLEANFILES = $(DEPDIR)/deps-ver
bin_PROGRAMS = $(NTPDATE_DB)
libexec_PROGRAMS = $(NTPDATE_DL)
@@ -502,7 +504,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
LDADD = ../libntp/libntp.a
ntpdate_LDADD = $(LDADD) $(LDADD_LIBNTP) $(PTHREAD_LIBS) \
$(LIBOPTS_LDADD) $(LIBM) $(LDADD_NTP)
-CLEANFILES = .version version.c check-libntp .deps-ver
+CLEANFILES = .version version.c .deps-ver
noinst_HEADERS = ntpdate.h
ntpdate_SOURCES = ntpdate.c
nodist_ntpdate_SOURCES = version.c
@@ -985,18 +987,16 @@ install-exec-hook:
#
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
$(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+.PHONY: FRC.scm-rev
FRC.scm-rev:
- @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
- always out-of-date causing targets which depend on it to also \
- be outdated so their rules to fire each time they are built.
+ @: FRC.scm-rev is always out of date, triggering the check every make invocation.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/ntpdc/Makefile.in b/contrib/ntp/ntpdc/Makefile.in
index 3864e523a4ea..bb9c0986065e 100644
--- a/contrib/ntp/ntpdc/Makefile.in
+++ b/contrib/ntp/ntpdc/Makefile.in
@@ -95,6 +95,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = ntpdc$(EXEEXT) ntpdc-layout$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = ntpdc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -432,6 +433,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -536,7 +538,7 @@ libexec_PROGRAMS = $(NTPDC_DL)
sbin_PROGRAMS = $(NTPDC_DS)
EXTRA_DATA = check-layout
BUILT_SOURCES = @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h \
- check-libopts check-libntp .deps-ver
+ check-libopts $(am__append_1) .deps-ver
AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP) \
$(NTP_HARD_CPPFLAGS)
@@ -549,7 +551,7 @@ ntpdc_LDADD = $(LIBOPTS_LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) \
ntpdc_layout_LDADD =
DISTCLEANFILES = $(man_MANS) config.log $(NULL) $(DEPDIR)/deps-ver
CLEANFILES = check-layout layout.here nl.c ntpdc-layout .version \
- version.c $(NULL) check-libopts check-libntp .deps-ver
+ version.c $(NULL) check-libopts .deps-ver
noinst_HEADERS = ntpdc.h
ETAGS_ARGS = Makefile.am
EXTRA_DIST = \
@@ -1264,18 +1266,16 @@ check-libopts: ../sntp/libopts/libopts.la
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
$(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+.PHONY: FRC.scm-rev
FRC.scm-rev:
- @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
- always out-of-date causing targets which depend on it to also \
- be outdated so their rules to fire each time they are built.
+ @: FRC.scm-rev is always out of date, triggering the check every make invocation.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/ntpdc/invoke-ntpdc.texi b/contrib/ntp/ntpdc/invoke-ntpdc.texi
index 30b4a66d6a87..07bcce67051f 100644
--- a/contrib/ntp/ntpdc/invoke-ntpdc.texi
+++ b/contrib/ntp/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:37:59 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:04:17 AM by AutoGen 5.18.16
# From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -77,7 +77,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p17
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p18
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/contrib/ntp/ntpdc/nl.pl b/contrib/ntp/ntpdc/nl.pl
index 9e79bf06a741..e65862f2f181 100755
--- a/contrib/ntp/ntpdc/nl.pl
+++ b/contrib/ntp/ntpdc/nl.pl
@@ -1,4 +1,5 @@
#! /ntpbuild/bin/perl -w
+# ntpdc/nl.pl. Generated from nl.pl.in by configure.
$found = 0;
$last = 0;
diff --git a/contrib/ntp/ntpdc/nl.pl.in b/contrib/ntp/ntpdc/nl.pl.in
index 8007538dc056..acf98d13a916 100644
--- a/contrib/ntp/ntpdc/nl.pl.in
+++ b/contrib/ntp/ntpdc/nl.pl.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input@
$found = 0;
$last = 0;
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.c b/contrib/ntp/ntpdc/ntpdc-opts.c
index 536d1b970f98..f1c637659bf6 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.c
+++ b/contrib/ntp/ntpdc/ntpdc-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed June 6, 2023 at 04:37:53 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:11 AM by AutoGen 5.18.16
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -74,8 +74,8 @@ extern FILE * option_usage_fp;
* static const strings for ntpdc options
*/
static char const ntpdc_opt_strs[2005] =
-/* 0 */ "ntpdc 4.2.8p17\n"
- "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/* 0 */ "ntpdc 4.2.8p18\n"
+ "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -136,14 +136,14 @@ static char const ntpdc_opt_strs[2005] =
/* 1785 */ "no-load-opts\0"
/* 1798 */ "no\0"
/* 1801 */ "NTPDC\0"
-/* 1807 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p17\n"
+/* 1807 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p18\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1938 */ "$HOME\0"
/* 1944 */ ".\0"
/* 1946 */ ".ntprc\0"
/* 1953 */ "https://bugs.ntp.org, bugs@ntp.org\0"
/* 1988 */ "\n\0"
-/* 1990 */ "ntpdc 4.2.8p17";
+/* 1990 */ "ntpdc 4.2.8p18";
/**
* ipv4 option description with
@@ -828,8 +828,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.2.8p17\n\
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpdc 4.2.8p18\n\
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -897,14 +897,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */
- puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p17\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p18\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.2.8p17"));
+ puts(_("ntpdc 4.2.8p18"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.h b/contrib/ntp/ntpdc/ntpdc-opts.h
index 47d3f481a54e..8f2638e55556 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.h
+++ b/contrib/ntp/ntpdc/ntpdc-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed June 6, 2023 at 04:37:52 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:11 AM by AutoGen 5.18.16
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -92,9 +92,9 @@ typedef enum {
/** count of all options for ntpdc */
#define OPTION_CT 16
/** ntpdc version */
-#define NTPDC_VERSION "4.2.8p17"
+#define NTPDC_VERSION "4.2.8p18"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.2.8p17"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8p18"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpdc/ntpdc.1ntpdcman b/contrib/ntp/ntpdc/ntpdc.1ntpdcman
index f101aadac589..3f95f941a058 100644
--- a/contrib/ntp/ntpdc/ntpdc.1ntpdcman
+++ b/contrib/ntp/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpdc 1ntpdcman "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:01 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:19 AM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -854,7 +854,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc b/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
index 376443dae434..68d6f1c1c1c0 100644
--- a/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
+++ b/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPDC 1ntpdcmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:57 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:15 AM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -792,7 +792,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/contrib/ntp/ntpdc/ntpdc.html b/contrib/ntp/ntpdc/ntpdc.html
index 1a566baca91b..c9be00b30975 100644
--- a/contrib/ntp/ntpdc/ntpdc.html
+++ b/contrib/ntp/ntpdc/ntpdc.html
@@ -53,7 +53,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntpdc</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntpdc</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -199,7 +199,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p17
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p18
Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/contrib/ntp/ntpdc/ntpdc.man.in b/contrib/ntp/ntpdc/ntpdc.man.in
index 151c23b0c5c1..4bf6a788dfdd 100644
--- a/contrib/ntp/ntpdc/ntpdc.man.in
+++ b/contrib/ntp/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpdc @NTPDC_MS@ "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:01 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:19 AM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -854,7 +854,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/contrib/ntp/ntpdc/ntpdc.mdoc.in b/contrib/ntp/ntpdc/ntpdc.mdoc.in
index 1a7859c448e6..b1c0cf42e917 100644
--- a/contrib/ntp/ntpdc/ntpdc.mdoc.in
+++ b/contrib/ntp/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPDC @NTPDC_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:37:57 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:15 AM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -792,7 +792,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/contrib/ntp/ntpq/Makefile.in b/contrib/ntp/ntpq/Makefile.in
index dd77e591e3d8..ecfefb4ef5f1 100644
--- a/contrib/ntp/ntpq/Makefile.in
+++ b/contrib/ntp/ntpq/Makefile.in
@@ -96,6 +96,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = ntpq$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = ntpq
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -442,6 +443,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -557,7 +559,7 @@ noinst_HEADERS = ntpq.h
noinst_LIBRARIES = libntpq.a
libntpq_a_CFLAGS = $(AM_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
-CLEANFILES = .version version.c check-libopts check-libntp .deps-ver
+CLEANFILES = .version version.c check-libopts .deps-ver
DISTCLEANFILES = config.log $(man_MANS) $(DEPDIR)/deps-ver
ETAGS_ARGS = Makefile.am
EXTRA_DIST = \
@@ -572,7 +574,7 @@ EXTRA_DIST = \
ntpq.texi \
$(NULL)
-BUILT_SOURCES = ntpq-opts.c ntpq-opts.h check-libopts check-libntp \
+BUILT_SOURCES = ntpq-opts.c ntpq-opts.h check-libopts $(am__append_1) \
.deps-ver
html_DATA = \
$(srcdir)/ntpq.html \
@@ -1295,18 +1297,16 @@ check-libopts: ../sntp/libopts/libopts.la
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
$(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+.PHONY: FRC.scm-rev
FRC.scm-rev:
- @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
- always out-of-date causing targets which depend on it to also \
- be outdated so their rules to fire each time they are built.
+ @: FRC.scm-rev is always out of date, triggering the check every make invocation.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/ntpq/invoke-ntpq.texi b/contrib/ntp/ntpq/invoke-ntpq.texi
index 715dbcba764e..cdb1453d5a24 100644
--- a/contrib/ntp/ntpq/invoke-ntpq.texi
+++ b/contrib/ntp/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:38:12 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:04:30 AM by AutoGen 5.18.16
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -945,7 +945,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p17
+ntpq - standard NTP query program - Ver. 4.2.8p18
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 name resolution
diff --git a/contrib/ntp/ntpq/ntpq-opts.c b/contrib/ntp/ntpq/ntpq-opts.c
index 3e176c057652..12042e4a1431 100644
--- a/contrib/ntp/ntpq/ntpq-opts.c
+++ b/contrib/ntp/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed June 6, 2023 at 04:38:03 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:21 AM by AutoGen 5.18.16
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpq program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -74,8 +74,8 @@ extern FILE * option_usage_fp;
* static const strings for ntpq options
*/
static char const ntpq_opt_strs[2068] =
-/* 0 */ "ntpq 4.2.8p17\n"
- "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/* 0 */ "ntpq 4.2.8p18\n"
+ "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -140,13 +140,13 @@ static char const ntpq_opt_strs[2068] =
/* 1858 */ "no-load-opts\0"
/* 1871 */ "no\0"
/* 1874 */ "NTPQ\0"
-/* 1879 */ "ntpq - standard NTP query program - Ver. 4.2.8p17\n"
+/* 1879 */ "ntpq - standard NTP query program - Ver. 4.2.8p18\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1999 */ "$HOME\0"
/* 2005 */ ".\0"
/* 2007 */ ".ntprc\0"
/* 2014 */ "https://bugs.ntp.org, bugs@ntp.org\0"
-/* 2049 */ "ntpq 4.2.8p17\0"
+/* 2049 */ "ntpq 4.2.8p18\0"
/* 2063 */ "hash";
/**
@@ -873,8 +873,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.8p17\n\
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpq 4.2.8p18\n\
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -945,11 +945,11 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.8p17\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p18\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.8p17"));
+ puts(_("ntpq 4.2.8p18"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpq/ntpq-opts.h b/contrib/ntp/ntpq/ntpq-opts.h
index 60d2ba1278c6..f1413deefcd1 100644
--- a/contrib/ntp/ntpq/ntpq-opts.h
+++ b/contrib/ntp/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed June 6, 2023 at 04:38:02 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:21 AM by AutoGen 5.18.16
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpq program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -93,9 +93,9 @@ typedef enum {
/** count of all options for ntpq */
#define OPTION_CT 17
/** ntpq version */
-#define NTPQ_VERSION "4.2.8p17"
+#define NTPQ_VERSION "4.2.8p18"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.8p17"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p18"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpq/ntpq-subs.c b/contrib/ntp/ntpq/ntpq-subs.c
index 527be098b561..6aded4050c15 100644
--- a/contrib/ntp/ntpq/ntpq-subs.c
+++ b/contrib/ntp/ntpq/ntpq-subs.c
@@ -1495,7 +1495,7 @@ radiostatus(
#endif /* UNUSED */
/*
- * when - print how long its been since his last packet arrived
+ * when - return how long its been since his last packet arrived
*/
static long
when(
@@ -1691,6 +1691,7 @@ doprintpeers(
u_int32 u32;
const char *dstadr_refid = "0.0.0.0";
const char *serverlocal;
+ char *drbuf = NULL;
size_t drlen;
u_long stratum = 0;
long ppoll = 0;
@@ -1772,12 +1773,13 @@ doprintpeers(
} else if (decodenetnum(value, &refidadr)) {
if (SOCK_UNSPEC(&refidadr))
dstadr_refid = "0.0.0.0";
- else if (ISREFCLOCKADR(&refidadr))
+ else if (ISREFCLOCKADR(&refidadr)) {
dstadr_refid =
refnumtoa(&refidadr);
- else
+ } else {
dstadr_refid =
stoa(&refidadr);
+ }
} else {
have_da_rid = FALSE;
}
@@ -1796,19 +1798,25 @@ doprintpeers(
} else if (decodenetnum(value, &refidadr)) {
if (SOCK_UNSPEC(&refidadr))
dstadr_refid = "0.0.0.0";
- else if (ISREFCLOCKADR(&refidadr))
+ else if (ISREFCLOCKADR(&refidadr)) {
dstadr_refid =
- refnumtoa(&refidadr);
- else {
- char *buf = emalloc(10);
- int i = ntohl(refidadr.sa4.sin_addr.s_addr);
-
- snprintf(buf, 10,
- "%0x", i);
- dstadr_refid = buf;
- //xprintf(stderr, "apeervarlist refid: value=<%x>\n", i);
+ refnumtoa(&refidadr);
+ if (pvl == apeervarlist) {
+ /*
+ * restrict refid to
+ * 8 chars [Bug 3850]
+ */
+ dstadr_refid =
+ trunc_right(
+ dstadr_refid,
+ 8);
+ }
+ } else {
+ drbuf = emalloc(10);
+ snprintf(drbuf, 10, "%0x",
+ SRCADR(&refidadr));
+ dstadr_refid = drbuf;
}
- //xprintf(stderr, "apeervarlist refid: value=<%s>\n", value);
} else {
have_da_rid = FALSE;
}
@@ -1843,7 +1851,7 @@ doprintpeers(
if (!decodets(value, &reftime))
L_CLR(&reftime);
} else if (!strcmp("flash", name)) {
- decodeuint(value, &flash);
+ decodeuint(value, &flash);
} else {
// xprintf(stderr, "UNRECOGNIZED name=%s ", name);
}
@@ -1931,6 +1939,7 @@ doprintpeers(
drlen = strlen(dstadr_refid);
makeascii(drlen, dstadr_refid, fp);
}
+ free(drbuf);
if (pvl == apeervarlist) {
while (drlen++ < 9)
xputc(' ', fp);
@@ -2452,7 +2461,7 @@ fetch_nonce(
return FALSE;
}
- if ((size_t)rsize <= sizeof(nonce_eq) - 1 ||
+ if (rsize <= sizeof(nonce_eq) - 1 ||
strncmp(rdata, nonce_eq, sizeof(nonce_eq) - 1)) {
xprintf(stderr, "unexpected nonce response format: %.*s\n",
(int)rsize, rdata); /* cast is wobbly */
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqman b/contrib/ntp/ntpq/ntpq.1ntpqman
index e4f93b336110..5578f8ef3acb 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqman
+++ b/contrib/ntp/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpq 1ntpqman "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:15 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:33 AM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1585,7 +1585,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqmdoc b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
index 9ce7db9484d3..bbb061bebf98 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqmdoc
+++ b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:10 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:29 AM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1051,7 +1051,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
index 1a0e9b1a6867..56ff4e50e9eb 100644
--- a/contrib/ntp/ntpq/ntpq.c
+++ b/contrib/ntp/ntpq/ntpq.c
@@ -25,13 +25,9 @@
#include <isc/result.h>
#include "ntpq.h"
-#include "ntp_assert.h"
-#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#include "ntp_select.h"
-#include "ntp_assert.h"
-#include "lib_strbuf.h"
#include "ntp_lineedit.h"
#include "ntp_debug.h"
#ifdef OPENSSL
@@ -3941,31 +3937,25 @@ list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg)
size_t len, n;
const char *name, **seen;
struct hstate *hstate = arg;
- const char *cp;
/* m is MD obj, from is name or alias, to is base name for alias */
- if (!m || !from || to)
+ if (!m || !from || to) {
return; /* Ignore aliases */
+ }
/* Discard MACs that NTP won't accept. */
/* Keep this consistent with keytype_from_text() in ssl_init.c. */
- if (EVP_MD_size(m) > (MAX_MAC_LEN - sizeof(keyid_t)))
+ if (EVP_MD_size(m) > MAX_MDG_LEN) {
return;
+ }
name = EVP_MD_name(m);
-
- /* Lowercase names aren't accepted by keytype_from_text in ssl_init.c */
-
- for (cp = name; *cp; cp++)
- if (islower((unsigned char)*cp))
- return;
-
- len = (cp - name) + 1;
+ len = strlen(name) + 1;
/* There are duplicates. Discard if name has been seen. */
for (seen = hstate->seen; *seen; seen++)
- if (!strcmp(*seen, name))
+ if (!strcasecmp(*seen, name))
return;
n = (seen - hstate->seen) + 2;
@@ -4057,11 +4047,12 @@ insert_cmac(char *list)
/* No - end of list */
if (!delim && !last_nl) {
delim = list + len;
- } else
+ } else {
/* New line and no delim or before delim? */
if (last_nl && (!delim || last_nl < delim)) {
delim = last_nl;
}
+ }
/* Found insertion point where CMAC before entry? */
if (strncmp(CMAC, point, delim - point) < 0) {
diff --git a/contrib/ntp/ntpq/ntpq.h b/contrib/ntp/ntpq/ntpq.h
index 53f76387ace0..ed200951d303 100644
--- a/contrib/ntp/ntpq/ntpq.h
+++ b/contrib/ntp/ntpq/ntpq.h
@@ -11,7 +11,6 @@
#include "ntp_malloc.h"
#include "ntp_assert.h"
#include "ntp_control.h"
-#include "lib_strbuf.h"
#include "ntpq-opts.h"
diff --git a/contrib/ntp/ntpq/ntpq.html b/contrib/ntp/ntpq/ntpq.html
index 1ca91e4f3cd4..03b654a33486 100644
--- a/contrib/ntp/ntpq/ntpq.html
+++ b/contrib/ntp/ntpq/ntpq.html
@@ -62,7 +62,7 @@ monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntpq</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntpq</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpq-Description" accesskey="1">ntpq Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
@@ -1274,7 +1274,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p17
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p18
Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 name resolution
diff --git a/contrib/ntp/ntpq/ntpq.man.in b/contrib/ntp/ntpq/ntpq.man.in
index 12c085baf761..66ef65cad235 100644
--- a/contrib/ntp/ntpq/ntpq.man.in
+++ b/contrib/ntp/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpq @NTPQ_MS@ "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:15 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:33 AM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1585,7 +1585,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpq/ntpq.mdoc.in b/contrib/ntp/ntpq/ntpq.mdoc.in
index d5ace4c4fd43..3bb46622c6d0 100644
--- a/contrib/ntp/ntpq/ntpq.mdoc.in
+++ b/contrib/ntp/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:10 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:29 AM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1051,7 +1051,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpsnmpd/Makefile.am b/contrib/ntp/ntpsnmpd/Makefile.am
index 5729bb85cd46..d3cd0be85607 100644
--- a/contrib/ntp/ntpsnmpd/Makefile.am
+++ b/contrib/ntp/ntpsnmpd/Makefile.am
@@ -9,9 +9,9 @@ ntpsnmpd_SOURCES= netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \
ntpsnmpd-opts.c ntpsnmpd-opts.h ntpSnmpSubagentObject.h \
ntp_snmp.h
# HMS: we probably want a version.o file here, too.
-LDADD = ../ntpq/libntpq.a ../libntp/libntp.a
-LDADD += $(SNMP_LIBS) $(LDADD_LIBNTP) $(LIBM)
-LDADD += $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBOPTS_LDADD)
+ntpsnmpd_LDADD = ../ntpq/libntpq.a ../libntp/libntp.a
+ntpsnmpd_LDADD += $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+ntpsnmpd_LDADD += $(LDADD_NTP) $(LIBOPTS_LDADD) $(SNMP_LIBS)
AM_CFLAGS = $(SNMP_CFLAGS) $(CFLAGS_NTP)
AM_CFLAGS += $(NTP_HARD_CFLAGS)
@@ -19,8 +19,8 @@ AM_CFLAGS += $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/ntpq
AM_CPPFLAGS += $(NTP_INCS)
AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
-AM_CPPFLAGS += $(SNMP_CPPFLAGS)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += $(SNMP_CPPFLAGS)
AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(LDFLAGS_NTP)
diff --git a/contrib/ntp/ntpsnmpd/Makefile.in b/contrib/ntp/ntpsnmpd/Makefile.in
index 329d255cd277..77df2343799d 100644
--- a/contrib/ntp/ntpsnmpd/Makefile.in
+++ b/contrib/ntp/ntpsnmpd/Makefile.in
@@ -94,6 +94,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = ntpsnmpd$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = ntpsnmpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -150,7 +151,6 @@ PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_ntpsnmpd_OBJECTS = netsnmp_daemonize.$(OBJEXT) ntpsnmpd.$(OBJEXT) \
ntpSnmpSubagentObject.$(OBJEXT) ntpsnmpd-opts.$(OBJEXT)
ntpsnmpd_OBJECTS = $(am_ntpsnmpd_OBJECTS)
-ntpsnmpd_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
ntpsnmpd_DEPENDENCIES = ../ntpq/libntpq.a ../libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -425,6 +425,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -532,12 +533,12 @@ ntpsnmpd_SOURCES = netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \
ntp_snmp.h
# HMS: we probably want a version.o file here, too.
-LDADD = ../ntpq/libntpq.a ../libntp/libntp.a $(SNMP_LIBS) \
- $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NTP) \
- $(LIBOPTS_LDADD)
+ntpsnmpd_LDADD = ../ntpq/libntpq.a ../libntp/libntp.a $(LDADD_LIBNTP) \
+ $(LIBM) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBOPTS_LDADD) \
+ $(SNMP_LIBS)
AM_CFLAGS = $(SNMP_CFLAGS) $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/ntpq $(NTP_INCS) $(LIBOPTS_CFLAGS) \
- $(SNMP_CPPFLAGS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
+ $(CPPFLAGS_NTP) $(SNMP_CPPFLAGS) $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
EXTRA_DIST = \
invoke-ntpsnmpd.menu \
@@ -552,9 +553,9 @@ EXTRA_DIST = \
ntpv4-mib.mib \
$(NULL)
-BUILT_SOURCES = ntpsnmpd-opts.c ntpsnmpd-opts.h check-libntp \
+BUILT_SOURCES = ntpsnmpd-opts.c ntpsnmpd-opts.h $(am__append_1) \
check-libopts .deps-ver
-CLEANFILES = check-libntp check-libopts .deps-ver
+CLEANFILES = check-libopts .deps-ver
DISTCLEANFILES = config.log $(man_MANS) $(DEPDIR)/deps-ver
html_DATA = \
$(srcdir)/ntpsnmpd.html \
@@ -1219,11 +1220,10 @@ install-exec-hook:
#
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
check-libopts: ../sntp/libopts/libopts.la
@echo stamp > $@
diff --git a/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi b/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
index 3f99a3f35f6f..326dace34e63 100644
--- a/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
+++ b/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:38:20 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:04:39 AM by AutoGen 5.18.16
# From the definitions ntpsnmpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -47,7 +47,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p16
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p18
Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
diff --git a/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c b/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c
index 44fad1ad3965..55f8c3596492 100644
--- a/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c
+++ b/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c
@@ -57,20 +57,12 @@ SOFTWARE.
#include <stdlib.h>
#endif
-#if TIME_WITH_SYS_TIME
-# ifdef WIN32
-# include <sys/timeb.h>
-# else
-# include <sys/time.h>
-# endif
-# include <time.h>
+#ifdef WIN32
+# include <sys/timeb.h>
#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
+# include <sys/time.h>
#endif
+#include <time.h>
#include <sys/types.h>
@@ -267,5 +259,5 @@ netsnmp_daemonize(int quit_immediately, int stderr_log)
}
#else /* !NEED_NETSNMP_DAEMONIZE */
-int netsnp_daemonize_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
index f13108da18d2..a05c8acdd05d 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed June 6, 2023 at 04:38:17 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:35 AM by AutoGen 5.18.16
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpsnmpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -66,8 +66,8 @@ extern FILE * option_usage_fp;
* static const strings for ntpsnmpd options
*/
static char const ntpsnmpd_opt_strs[1614] =
-/* 0 */ "ntpsnmpd 4.2.8p17\n"
- "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/* 0 */ "ntpsnmpd 4.2.8p18\n"
+ "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -106,14 +106,14 @@ static char const ntpsnmpd_opt_strs[1614] =
/* 1415 */ "no-load-opts\0"
/* 1428 */ "no\0"
/* 1431 */ "NTPSNMPD\0"
-/* 1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p17\n"
+/* 1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p18\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 1544 */ "$HOME\0"
/* 1550 */ ".\0"
/* 1552 */ ".ntprc\0"
/* 1559 */ "https://bugs.ntp.org, bugs@ntp.org\0"
/* 1594 */ "\n\0"
-/* 1596 */ "ntpsnmpd 4.2.8p17";
+/* 1596 */ "ntpsnmpd 4.2.8p18";
/**
* nofork option description:
@@ -559,8 +559,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpsnmpdOptions.pzCopyright */
- puts(_("ntpsnmpd 4.2.8p17\n\
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpsnmpd 4.2.8p18\n\
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -604,14 +604,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpsnmpdOptions.pzUsageTitle */
- puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p17\n\
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p18\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */
- puts(_("ntpsnmpd 4.2.8p17"));
+ puts(_("ntpsnmpd 4.2.8p18"));
/* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
index d5239d2e3050..5eab9a6cbf19 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed June 6, 2023 at 04:38:16 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:34 AM by AutoGen 5.18.16
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpsnmpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -84,9 +84,9 @@ typedef enum {
/** count of all options for ntpsnmpd */
#define OPTION_CT 8
/** ntpsnmpd version */
-#define NTPSNMPD_VERSION "4.2.8p17"
+#define NTPSNMPD_VERSION "4.2.8p18"
/** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p17"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p18"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
index 29f12c6c913d..469f652aef46 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:21 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:40 AM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -138,7 +138,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Heiko Gerstung"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
index be353c7468ce..273e7f7479f7 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:18 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:37 AM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -110,7 +110,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
.An "Heiko Gerstung"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.html b/contrib/ntp/ntpsnmpd/ntpsnmpd.html
index e31de98c7b90..1bb8f560f220 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.html
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.html
@@ -60,7 +60,7 @@ Next: <a href="#ntpsnmpd-Description" accesskey="n" rel="next">ntpsnmpd Descript
<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
operations and determine performance. It uses the standard NTP mode 6 control
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntpsnmpd</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntpsnmpd</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpsnmpd-Description" accesskey="1">ntpsnmpd Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in b/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
index 7080d07b3310..9990ae66a0ef 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:21 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:40 AM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -138,7 +138,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Heiko Gerstung"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in b/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
index b0f89d34b309..144a1d192f9d 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:18 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:37 AM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -110,7 +110,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
.An "Heiko Gerstung"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/packageinfo.sh b/contrib/ntp/packageinfo.sh
index 0ee08b67086d..bb31a6277a9d 100644
--- a/contrib/ntp/packageinfo.sh
+++ b/contrib/ntp/packageinfo.sh
@@ -33,6 +33,8 @@
#
# To skip over -stable beta1 directly to -RC1, set prerelease=rc.
#
+# To proceed from a -stable RC to the release set rcpoint=GO
+#
# To skip all -stable prereleases and move from one primary or point
# release directly to the next point release, set rcpoint=GO.
#
@@ -83,7 +85,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=17
+point=18
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
diff --git a/contrib/ntp/parseutil/Makefile.in b/contrib/ntp/parseutil/Makefile.in
index 66d6f695d8dc..7deca0773120 100644
--- a/contrib/ntp/parseutil/Makefile.in
+++ b/contrib/ntp/parseutil/Makefile.in
@@ -384,6 +384,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/Makefile.in b/contrib/ntp/scripts/Makefile.in
index 026185093d03..a2156011a514 100644
--- a/contrib/ntp/scripts/Makefile.in
+++ b/contrib/ntp/scripts/Makefile.in
@@ -420,6 +420,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/build/Makefile.in b/contrib/ntp/scripts/build/Makefile.in
index 51446d9bf3cc..cd023719137b 100644
--- a/contrib/ntp/scripts/build/Makefile.in
+++ b/contrib/ntp/scripts/build/Makefile.in
@@ -328,6 +328,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/build/checkHtmlFileDates b/contrib/ntp/scripts/build/checkHtmlFileDates
index 9d9a2f2625d0..5eae87f7af41 100755
--- a/contrib/ntp/scripts/build/checkHtmlFileDates
+++ b/contrib/ntp/scripts/build/checkHtmlFileDates
@@ -1,11 +1,29 @@
#! /bin/sh
-bk version > /dev/null 2>&1 || exit 0
+#
+# checkHtmlFileDates
+#
+# This script is invoked in html directory when any html/*.html file
+# is newer than html/.datecheck to update the last modified time
+# within the HTML. Each file is compared against the checked-in
+# version is compared to any uncommitted edits and if there are
+# any, scripts/build/updateBEDate is used to update the embedded
+# timestamp. html/.datecheck is not distributed in releases so
+# this will be invoked once building a newly-extracted tarball.
+# 'bk diff' is used to check for modifications so if bk is not
+# on the path there's no need to invoke this repeatedly.
+# Therefore touch .datecheck unconditionally right away.
+#
+touch .datecheck
-for i in `find * -type f -name '*.html' -print | grep -v SCCS/`
+# Do nothing if the directory is not a BK repo,
+# or if BK is not even installed.
+bk status > /dev/null 2>&1 || exit 0
+
+for i in `echo *.html`
do
# echo $i
- set `bk diffs $i | wc -l`
+ set `bk diff --normal $i | wc -l`
lines=$1
case "$lines" in
0) ;;
diff --git a/contrib/ntp/scripts/build/genAuthors.in b/contrib/ntp/scripts/build/genAuthors.in
index a5a15e1270b0..a1b5a4023acd 100644
--- a/contrib/ntp/scripts/build/genAuthors.in
+++ b/contrib/ntp/scripts/build/genAuthors.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@
+# @configure_input@
# DESCRIPTION
#
diff --git a/contrib/ntp/scripts/build/mkver.in b/contrib/ntp/scripts/build/mkver.in
index c58d8040f1d9..89ea50bc5e51 100644
--- a/contrib/ntp/scripts/build/mkver.in
+++ b/contrib/ntp/scripts/build/mkver.in
@@ -1,4 +1,6 @@
#!@CONFIG_SHELL@
+# @configure_input@
+
PROG=${1-UNKNOWN}
ConfStr="$PROG"
diff --git a/contrib/ntp/scripts/calc_tickadj/Makefile.in b/contrib/ntp/scripts/calc_tickadj/Makefile.in
index f4dc33b2209c..050ab5af6000 100644
--- a/contrib/ntp/scripts/calc_tickadj/Makefile.in
+++ b/contrib/ntp/scripts/calc_tickadj/Makefile.in
@@ -364,6 +364,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
index e1d2216c31d8..3d42eca9f834 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:10 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:32 AM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
index 71507c329099..6098e246b70d 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:12 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:33 AM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
index fb583099b5d8..77c9f29bf9f6 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
@@ -47,7 +47,7 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<span id="calc_005ftickadj-User_0027s-Manual"></span><h1 class="top">calc_tickadj User&rsquo;s Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>calc_tickadj</code> program.
-This document applies to version 4.2.8p17 of <code>calc_tickadj</code>.
+This document applies to version 4.2.8p18 of <code>calc_tickadj</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.in
index 38b826eb2fff..56c549adc82a 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.in
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input@
#
# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
#
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
index e1d2216c31d8..3d42eca9f834 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:10 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:32 AM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
index 71507c329099..6098e246b70d 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:12 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:33 AM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi b/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
index 6d0ce24f0096..c0ca429e83f2 100644
--- a/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
+++ b/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:13 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:34 AM by AutoGen 5.18.16
# From the definitions calc_tickadj-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/contrib/ntp/scripts/invoke-plot_summary.texi b/contrib/ntp/scripts/invoke-plot_summary.texi
index 65faebaa7d97..39fe8082ef80 100644
--- a/contrib/ntp/scripts/invoke-plot_summary.texi
+++ b/contrib/ntp/scripts/invoke-plot_summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:36 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:57 AM by AutoGen 5.18.16
# From the definitions plot_summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -41,7 +41,7 @@ with a status code of 0.
@exampleindent 0
@example
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p17
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p18
USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/invoke-summary.texi b/contrib/ntp/scripts/invoke-summary.texi
index 1b82c93397b7..4a4bf7c44f13 100644
--- a/contrib/ntp/scripts/invoke-summary.texi
+++ b/contrib/ntp/scripts/invoke-summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:40 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:06:02 AM by AutoGen 5.18.16
# From the definitions summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -42,7 +42,7 @@ with a status code of 0.
@exampleindent 0
@example
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p17
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p18
USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/lib/Makefile.in b/contrib/ntp/scripts/lib/Makefile.in
index 90d82539d476..e370bf134e31 100644
--- a/contrib/ntp/scripts/lib/Makefile.in
+++ b/contrib/ntp/scripts/lib/Makefile.in
@@ -355,6 +355,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/ntp-wait/Makefile.in b/contrib/ntp/scripts/ntp-wait/Makefile.in
index 9aa6ee7afb34..854c10ff9716 100644
--- a/contrib/ntp/scripts/ntp-wait/Makefile.in
+++ b/contrib/ntp/scripts/ntp-wait/Makefile.in
@@ -363,6 +363,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi b/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
index 138a43d9b2fc..aff658518c97 100644
--- a/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
+++ b/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:17 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:38 AM by AutoGen 5.18.16
# From the definitions ntp-wait-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -61,7 +61,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p17
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p18
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait-opts b/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
index 944d4c1404ab..8358c3bbcada 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:15 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:36 AM by AutoGen 5.18.16
# From the definitions ntp-wait-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p17
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p18
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
index 1a01d97b5729..d5a54e07880e 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait 1ntp-waitman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntp-wait 1ntp-waitman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:18 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:40 AM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
index cb5ad0252df6..3da960f0409c 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_WAIT 1ntp-waitmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:15 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:37 AM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.html b/contrib/ntp/scripts/ntp-wait/ntp-wait.html
index 282f5db6e517..d21222c12fc5 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.html
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.html
@@ -58,7 +58,7 @@ until the system&rsquo;s time has stabilized and synchronized,
and only then start any applicaitons (like database servers) that require
accurate and stable time.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntp-wait</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntp-wait</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -145,7 +145,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p17
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p18
USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.in
index cfccbe0ac2ad..3b7a3ce4c647 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.in
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@
+# @configure_input@
package ntp_wait;
use 5.006_000;
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
index 4e9b184b847f..a2c54e4f2ed1 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait @NTP_WAIT_MS@ "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:18 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:40 AM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
index 35e7a2ab06fd..1b7d34ba3888 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:15 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:37 AM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpsweep/Makefile.in b/contrib/ntp/scripts/ntpsweep/Makefile.in
index 027f0847ecdf..01b0143e4439 100644
--- a/contrib/ntp/scripts/ntpsweep/Makefile.in
+++ b/contrib/ntp/scripts/ntpsweep/Makefile.in
@@ -364,6 +364,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi b/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
index d81aa76d21d2..f0d8720ae66b 100644
--- a/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
+++ b/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:20 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:42 AM by AutoGen 5.18.16
# From the definitions ntpsweep-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -45,7 +45,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p17
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p18
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep-opts b/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
index 61bfb34159f0..9fad3f4be01c 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:20 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:41 AM by AutoGen 5.18.16
# From the definitions ntpsweep-opts.def
# and the template file perlopt
@@ -43,7 +43,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p17
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p18
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
index e609f54128ee..6fe4d206711f 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntpsweep 1ntpsweepman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:23 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:45 AM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
index 37b9e81f20f7..07e1db269a2a 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:22 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:44 AM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.html b/contrib/ntp/scripts/ntpsweep/ntpsweep.html
index bca4b02986cf..a030c541a323 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.html
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.html
@@ -49,7 +49,7 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<p>This document describes the use of the NTP Project&rsquo;s <code>ntpsweep</code> program.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntpsweep</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntpsweep</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -120,7 +120,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p17
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p18
USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.in
index 75ac0c8b06d9..b9b329e5dbda 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input@
#
# $Id$
#
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
index e609f54128ee..6fe4d206711f 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntpsweep 1ntpsweepman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:23 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:45 AM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
index 37b9e81f20f7..07e1db269a2a 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:22 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:44 AM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntptrace/Makefile.in b/contrib/ntp/scripts/ntptrace/Makefile.in
index df8e287aa48d..4a9bc393b3d0 100644
--- a/contrib/ntp/scripts/ntptrace/Makefile.in
+++ b/contrib/ntp/scripts/ntptrace/Makefile.in
@@ -363,6 +363,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi b/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
index 0169c0eb6a97..e813a78f7543 100644
--- a/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
+++ b/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:27 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:48 AM by AutoGen 5.18.16
# From the definitions ntptrace-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -62,7 +62,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p17
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p18
USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace-opts b/contrib/ntp/scripts/ntptrace/ntptrace-opts
index ea17cb0f66c9..8857e8939c17 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace-opts
+++ b/contrib/ntp/scripts/ntptrace/ntptrace-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:25 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:47 AM by AutoGen 5.18.16
# From the definitions ntptrace-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p17
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p18
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
index c1833697961a..4da059ad556a 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace 1ntptraceman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntptrace 1ntptraceman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:28 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:50 AM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
index d42f63a644fc..0f26eb3d090f 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPTRACE 1ntptracemdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:25 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:47 AM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.html b/contrib/ntp/scripts/ntptrace/ntptrace.html
index 594c9ef59cd7..f445a25c63b0 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.html
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.html
@@ -48,7 +48,7 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<span id="Simple-Network-Time-Protocol-User-Manual"></span><h1 class="top">Simple Network Time Protocol User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>ntptrace</code> program.
-This document applies to version 4.2.8p17 of <code>ntptrace</code>.
+This document applies to version 4.2.8p18 of <code>ntptrace</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -135,7 +135,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p17
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p18
USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.in b/contrib/ntp/scripts/ntptrace/ntptrace.in
index 7cc5ce7f7224..d92e0796391d 100755
--- a/contrib/ntp/scripts/ntptrace/ntptrace.in
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input@
# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
package ntptrace;
@@ -6,6 +7,7 @@ use 5.006_000;
use strict;
use lib "@PERLLIBDIR@";
use NTP::Util qw(ntp_read_vars do_dns);
+use Scalar::Util qw(looks_like_number);
exit run(@ARGV) unless caller;
@@ -59,7 +61,16 @@ sub get_info {
return if not defined $info;
return if not exists $info->{stratum};
+ if (not (exists $info->{offset} && looks_like_number($info->{offset}))) {
+ $info->{offset} = "NaN";
+ }
$info->{offset} /= 1000;
+ if (not (exists $info->{rootdisp} && looks_like_number($info->{rootdisp}))) {
+ $info->{rootdisp} = "NaN";
+ }
+ if (not (exists $info->{rootdelay} && looks_like_number($info->{rootdelay}))) {
+ $info->{rootdelay} = "NaN";
+ }
$info->{syncdistance} = ($info->{rootdisp} + ($info->{rootdelay} / 2)) / 1000;
return %$info;
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.man.in b/contrib/ntp/scripts/ntptrace/ntptrace.man.in
index db4e5ab6c3aa..fe9275e63607 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.man.in
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace @NTPTRACE_MS@ "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:28 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:50 AM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in b/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
index 1d64345f1689..53f2bb990dee 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTPTRACE @NTPTRACE_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:25 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:47 AM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpver.in b/contrib/ntp/scripts/ntpver.in
index 9615e66d61c6..4037e4403065 100644
--- a/contrib/ntp/scripts/ntpver.in
+++ b/contrib/ntp/scripts/ntpver.in
@@ -1,7 +1,8 @@
#!@CONFIG_SHELL@
+# @configure_input@
# print version string of NTP daemon
# Copyright (c) 1997 by Ulrich Windl
# Modified 970318: Harlan Stenn: rewritten...
# usage: ntpver hostname
-ntpq -c "rv 0 daemon_version" $* | @AWK@ '/daemon_version/ { print $2 }'
+ntpq -c "rv 0 version" $* | @AWK@ '/version/ { print $2 }'
diff --git a/contrib/ntp/scripts/plot_summary-opts b/contrib/ntp/scripts/plot_summary-opts
index 10e2fdfaec7f..acf9ba865d64 100644
--- a/contrib/ntp/scripts/plot_summary-opts
+++ b/contrib/ntp/scripts/plot_summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:35 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:57 AM by AutoGen 5.18.16
# From the definitions plot_summary-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p17
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p18
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/plot_summary.1plot_summaryman b/contrib/ntp/scripts/plot_summary.1plot_summaryman
index 14bc3202139b..952316138950 100644
--- a/contrib/ntp/scripts/plot_summary.1plot_summaryman
+++ b/contrib/ntp/scripts/plot_summary.1plot_summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH plot_summary 1plot_summaryman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:37 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:59 AM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/plot_summary.1plot_summarymdoc b/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
index 338e8e5debac..a948db4e8c67 100644
--- a/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
+++ b/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:38 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:06:00 AM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/plot_summary.html b/contrib/ntp/scripts/plot_summary.html
index fc944c708e11..fa0b4e10e24b 100644
--- a/contrib/ntp/scripts/plot_summary.html
+++ b/contrib/ntp/scripts/plot_summary.html
@@ -48,7 +48,7 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<span id="Plot_005fsummary-User-Manual"></span><h1 class="top">Plot_summary User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>plot_summary</code> program.
-This document applies to version 4.2.8p17 of <code>plot_summary</code>.
+This document applies to version 4.2.8p18 of <code>plot_summary</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -116,7 +116,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p17
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p18
USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/plot_summary.in b/contrib/ntp/scripts/plot_summary.in
index 3401b0d0b8b8..f081fd1aa06d 100644
--- a/contrib/ntp/scripts/plot_summary.in
+++ b/contrib/ntp/scripts/plot_summary.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input@
# $Id$
#
# Use Gnuplot to display data in summary files produced by summary.pl.
diff --git a/contrib/ntp/scripts/plot_summary.man.in b/contrib/ntp/scripts/plot_summary.man.in
index 14bc3202139b..952316138950 100644
--- a/contrib/ntp/scripts/plot_summary.man.in
+++ b/contrib/ntp/scripts/plot_summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH plot_summary 1plot_summaryman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:37 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:59 AM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/plot_summary.mdoc.in b/contrib/ntp/scripts/plot_summary.mdoc.in
index 338e8e5debac..a948db4e8c67 100644
--- a/contrib/ntp/scripts/plot_summary.mdoc.in
+++ b/contrib/ntp/scripts/plot_summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:38 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:06:00 AM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/summary-opts b/contrib/ntp/scripts/summary-opts
index 4cb1515193d6..a7dfd969037a 100644
--- a/contrib/ntp/scripts/summary-opts
+++ b/contrib/ntp/scripts/summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (summary-opts)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:35 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:57 AM by AutoGen 5.18.16
# From the definitions summary-opts.def
# and the template file perlopt
@@ -44,7 +44,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p17
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p18
USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/summary.1summaryman b/contrib/ntp/scripts/summary.1summaryman
index 282e7640fa3b..9e68fa41ef73 100644
--- a/contrib/ntp/scripts/summary.1summaryman
+++ b/contrib/ntp/scripts/summary.1summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH summary 1summaryman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:41 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:06:03 AM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/summary.1summarymdoc b/contrib/ntp/scripts/summary.1summarymdoc
index 0c83fddc9219..ea74e1728906 100644
--- a/contrib/ntp/scripts/summary.1summarymdoc
+++ b/contrib/ntp/scripts/summary.1summarymdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:43 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:06:04 AM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/summary.html b/contrib/ntp/scripts/summary.html
index 6ce82201c38e..7fb8b6fb1d85 100644
--- a/contrib/ntp/scripts/summary.html
+++ b/contrib/ntp/scripts/summary.html
@@ -48,7 +48,7 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<span id="Summary-User-Manual"></span><h1 class="top">Summary User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>summary</code> program.
-This document applies to version 4.2.8p17 of <code>summary</code>.
+This document applies to version 4.2.8p18 of <code>summary</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -116,7 +116,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p17
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p18
USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/summary.in b/contrib/ntp/scripts/summary.in
index a99f8df0e73e..7e346d80fbfa 100644
--- a/contrib/ntp/scripts/summary.in
+++ b/contrib/ntp/scripts/summary.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input@
# $Id$
# Perl version of (summary.sh, loop.awk, peer.awk):
# Create summaries from xntpd's loop and peer statistics.
diff --git a/contrib/ntp/scripts/summary.man.in b/contrib/ntp/scripts/summary.man.in
index 282e7640fa3b..9e68fa41ef73 100644
--- a/contrib/ntp/scripts/summary.man.in
+++ b/contrib/ntp/scripts/summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH summary 1summaryman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:41 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:06:03 AM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/summary.mdoc.in b/contrib/ntp/scripts/summary.mdoc.in
index 0c83fddc9219..ea74e1728906 100644
--- a/contrib/ntp/scripts/summary.mdoc.in
+++ b/contrib/ntp/scripts/summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:43 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:06:04 AM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/Makefile.in b/contrib/ntp/scripts/update-leap/Makefile.in
index 19f20fe16902..3d5400bcca32 100644
--- a/contrib/ntp/scripts/update-leap/Makefile.in
+++ b/contrib/ntp/scripts/update-leap/Makefile.in
@@ -364,6 +364,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
diff --git a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
index bc80b5a40936..9e1bdcbd7abb 100644
--- a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
+++ b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:31 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:53 AM by AutoGen 5.18.16
# From the definitions update-leap-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/contrib/ntp/scripts/update-leap/update-leap-opts b/contrib/ntp/scripts/update-leap/update-leap-opts
index 2aab11deb6a1..1b99167b6e8f 100644
--- a/contrib/ntp/scripts/update-leap/update-leap-opts
+++ b/contrib/ntp/scripts/update-leap/update-leap-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (update-leap-opts)
#
-# It has been AutoGen-ed June 6, 2023 at 04:39:35 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:05:57 AM by AutoGen 5.18.16
# From the definitions update-leap-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-update-leap - leap-seconds file manager/updater - Ver. 4.2.8p17
+update-leap - leap-seconds file manager/updater - Ver. 4.2.8p18
USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-s, --source-url=str The URL of the master copy of the leapseconds file
diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
index 83871441e444..12e3c23d5208 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
+++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH update-leap 1update-leapman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:33 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:55 AM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
index 449a0840a946..6acbe102bc51 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
+++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:30 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:51 AM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.html b/contrib/ntp/scripts/update-leap/update-leap.html
index afdc9977d604..6040b23001f9 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.html
+++ b/contrib/ntp/scripts/update-leap/update-leap.html
@@ -49,7 +49,7 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<p>This document describes the use of the NTP Project&rsquo;s <code>update-leap</code> program.
</p>
-<p>This document applies to version 4.2.8p17 of <code>update-leap</code>.
+<p>This document applies to version 4.2.8p18 of <code>update-leap</code>.
</p>
<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
diff --git a/contrib/ntp/scripts/update-leap/update-leap.in b/contrib/ntp/scripts/update-leap/update-leap.in
index abf1134c1ff5..defc6176b80a 100755
--- a/contrib/ntp/scripts/update-leap/update-leap.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.in
@@ -1,4 +1,5 @@
#! @PATH_PERL@ -w
+# @configure_input
# Copyright (C) 2015, 2017 Network Time Foundation
# Author: Harlan Stenn
diff --git a/contrib/ntp/scripts/update-leap/update-leap.man.in b/contrib/ntp/scripts/update-leap/update-leap.man.in
index 83871441e444..12e3c23d5208 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.man.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH update-leap 1update-leapman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:33 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:55 AM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
index 449a0840a946..6acbe102bc51 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:39:30 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:05:51 AM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/sntp/COPYRIGHT b/contrib/ntp/sntp/COPYRIGHT
index 013202c0fb09..0cb57168ebfc 100644
--- a/contrib/ntp/sntp/COPYRIGHT
+++ b/contrib/ntp/sntp/COPYRIGHT
@@ -3,7 +3,7 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 2-Mar-2023 05:21 UTC
+ Last update: 7-Jan-2024 00:29 UTC
__________________________________________________________________
The following copyright notice applies to all files collectively called
@@ -32,7 +32,7 @@ This file is automatically generated from html/copyright.html
Hart, Danny Mayer, Martin Burnicki, and possibly others is:
***********************************************************************
* *
-* Copyright (c) Network Time Foundation 2011-2023 *
+* Copyright (c) Network Time Foundation 2011-2024 *
* *
* All Rights Reserved *
* *
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am
index 8f9d1f612534..4c4e19ed81d8 100644
--- a/contrib/ntp/sntp/Makefile.am
+++ b/contrib/ntp/sntp/Makefile.am
@@ -274,8 +274,7 @@ libevent: distdir-pre-check
distdir-pre-check:
case "$(DIST_FAIL)" in \
'') ;; \
- *) $(error re-run configure adding $(DIST_FAIL) if you want to make a distribution.); \
- echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution."; \
+ *) echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution."; \
exit 1 ;; \
esac
diff --git a/contrib/ntp/sntp/Makefile.in b/contrib/ntp/sntp/Makefile.in
index 02af2211d10a..b7e7858a27f4 100644
--- a/contrib/ntp/sntp/Makefile.in
+++ b/contrib/ntp/sntp/Makefile.in
@@ -100,6 +100,7 @@ EXTRA_PROGRAMS = sntp$(EXEEXT)
@BUILD_LIBEVENT_FALSE@am__append_2 = "--enable-local-libevent"
@NEED_LIBOPTS_TRUE@am__append_3 = libopts
@BUILD_SNTP_TRUE@am__append_4 = tests
+@LIBNTP_SUBMAKES_TRUE@am__append_5 = check-libntp
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
@@ -110,6 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_cacheversion.m4 \
$(top_srcdir)/m4/ntp_compiler.m4 \
$(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
$(top_srcdir)/m4/ntp_facilitynames.m4 \
$(top_srcdir)/m4/ntp_harden.m4 $(top_srcdir)/m4/ntp_ipv6.m4 \
@@ -489,6 +491,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
@@ -660,9 +663,9 @@ EXTRA_DIST = \
BUILT_SOURCES = $(srcdir)/COPYRIGHT libtool $(srcdir)/sntp-opts.c \
$(srcdir)/sntp-opts.h $(srcdir)/include/version.def \
$(srcdir)/m4/version.m4 $(srcdir)/include/version.texi $(NULL) \
- check-libntp check-libopts .deps-ver
+ $(am__append_5) check-libopts .deps-ver
CLEANFILES = check-COPYRIGHT-submake .version version.c $(NULL) \
- check-libntp check-libopts .deps-ver
+ check-libopts .deps-ver
man1_MANS =
man8_MANS =
man_MANS = sntp.$(SNTP_MS)
@@ -1648,8 +1651,7 @@ libevent: distdir-pre-check
distdir-pre-check:
case "$(DIST_FAIL)" in \
'') ;; \
- *) $(error re-run configure adding $(DIST_FAIL) if you want to make a distribution.); \
- echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution."; \
+ *) echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution."; \
exit 1 ;; \
esac
@@ -1667,11 +1669,10 @@ install-exec-hook:
#
-check-libntp: $(top_builddir)/../libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/../libntp/libntp.a:
- cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
check-libopts: libopts/libopts.la
@echo stamp > $@
diff --git a/contrib/ntp/sntp/aclocal.m4 b/contrib/ntp/sntp/aclocal.m4
index 3bc30c477a33..e1177cd472bb 100644
--- a/contrib/ntp/sntp/aclocal.m4
+++ b/contrib/ntp/sntp/aclocal.m4
@@ -1219,6 +1219,7 @@ m4_include([m4/lt~obsolete.m4])
m4_include([m4/ntp_cacheversion.m4])
m4_include([m4/ntp_compiler.m4])
m4_include([m4/ntp_crosscompile.m4])
+m4_include([m4/ntp_crypto_rand.m4])
m4_include([m4/ntp_debug.m4])
m4_include([m4/ntp_dir_sep.m4])
m4_include([m4/ntp_facilitynames.m4])
diff --git a/contrib/ntp/sntp/check-libntp.mf b/contrib/ntp/sntp/check-libntp.mf
index 649f605a8d07..f27aeb66e4f7 100644
--- a/contrib/ntp/sntp/check-libntp.mf
+++ b/contrib/ntp/sntp/check-libntp.mf
@@ -4,12 +4,12 @@
## The above file has a version of this for the non-sntp portion
## of the NTP package.
-BUILT_SOURCES += check-libntp
-CLEANFILES += check-libntp
+.PHONY: check-libntp
-check-libntp: $(top_builddir)/../libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+if LIBNTP_SUBMAKES
+BUILT_SOURCES += check-libntp
-$(top_builddir)/../libntp/libntp.a:
+check-libntp:
cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+endif
diff --git a/contrib/ntp/sntp/check-libsntp.mf b/contrib/ntp/sntp/check-libsntp.mf
index d05a3d02fd07..297a8947a57e 100644
--- a/contrib/ntp/sntp/check-libsntp.mf
+++ b/contrib/ntp/sntp/check-libsntp.mf
@@ -3,11 +3,7 @@
##
BUILT_SOURCES += check-libsntp
-CLEANFILES += check-libsntp
-check-libsntp: $(top_builddir)/sntp/libsntp.a
- @: avoid default SCCS get by some make implementations
-
-$(top_builddir)/sntp/libsntp.a:
+.PHONY: check-libsntp
+check-libsntp:
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
-
diff --git a/contrib/ntp/sntp/check-libunity.mf b/contrib/ntp/sntp/check-libunity.mf
index bf5ec3bde1ed..af394da6e504 100644
--- a/contrib/ntp/sntp/check-libunity.mf
+++ b/contrib/ntp/sntp/check-libunity.mf
@@ -8,8 +8,7 @@ BUILT_SOURCES += check-libunity
CLEANFILES += check-libunity
check-libunity: $(top_builddir)/unity/libunity.a
- @: avoid default SCCS get by some make implementations
+ @echo stamp > $@
$(top_builddir)/unity/libunity.a:
cd $(top_builddir)/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
-
diff --git a/contrib/ntp/sntp/config.h.in b/contrib/ntp/sntp/config.h.in
index a4a15b82fcf1..d1cd7070a106 100644
--- a/contrib/ntp/sntp/config.h.in
+++ b/contrib/ntp/sntp/config.h.in
@@ -18,6 +18,9 @@
/* number of args to el_init() */
#undef EL_INIT_ARGS
+/* Enable CMAC support? */
+#undef ENABLE_CMAC
+
/* nls support in libopts */
#undef ENABLE_NLS
@@ -131,9 +134,6 @@
/* Define to 1 if the system has the type `int32'. */
#undef HAVE_INT32
-/* int32 type in DNS headers, not others. */
-#undef HAVE_INT32_ONLY_WITH_DNS
-
/* Define to 1 if the system has the type `int32_t'. */
#undef HAVE_INT32_T
@@ -260,9 +260,6 @@
/* Define to 1 if you have the <openssl/cmac.h> header file. */
#undef HAVE_OPENSSL_CMAC_H
-/* Define to 1 if you have the <openssl/hmac.h> header file. */
-#undef HAVE_OPENSSL_HMAC_H
-
/* Define this if pathfind(3) works */
#undef HAVE_PATHFIND
@@ -314,6 +311,12 @@
/* Define to 1 if the system has the type `ptrdiff_t'. */
#undef HAVE_PTRDIFF_T
+/* Define to 1 if you have the `RAND_bytes' function. */
+#undef HAVE_RAND_BYTES
+
+/* Define to 1 if you have the `RAND_poll' function. */
+#undef HAVE_RAND_POLL
+
/* Define to 1 if you have the <readline.h> header file. */
#undef HAVE_READLINE_H
@@ -464,7 +467,7 @@
/* Define to 1 if you have the <sysexits.h> header file. */
#undef HAVE_SYSEXITS_H
-/* */
+/* syslog.h provides facilitynames */
#undef HAVE_SYSLOG_FACILITYNAMES
/* Define to 1 if you have the <syslog.h> header file. */
@@ -601,9 +604,6 @@
/* Define to 1 if the system has the type `u_int32'. */
#undef HAVE_U_INT32
-/* u_int32 type in DNS headers, not others. */
-#undef HAVE_U_INT32_ONLY_WITH_DNS
-
/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
@@ -754,6 +754,9 @@
/* Use OpenSSL? */
#undef OPENSSL
+/* Suppress OpenSSL 3 deprecation warnings */
+#undef OPENSSL_SUPPRESS_DEPRECATED
+
/* Name of package */
#undef PACKAGE
@@ -839,10 +842,6 @@
/* enable thread safety */
#undef THREAD_SAFE
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
- macro is obsolete. */
-#undef TIME_WITH_SYS_TIME
-
/* Provide a typedef for uintptr_t? */
#ifndef HAVE_UINTPTR_T
typedef unsigned int uintptr_t;
@@ -852,6 +851,9 @@ typedef unsigned int uintptr_t;
/* What type to use for setsockopt */
#undef TYPEOF_IP_MULTICAST_LOOP
+/* Use OpenSSL's crypto random functions */
+#undef USE_OPENSSL_CRYPTO_RAND
+
/* OK to use snprintb()? */
#undef USE_SNPRINTB
@@ -1016,15 +1018,8 @@ typedef unsigned int uintptr_t;
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
-
- #if !defined(_KERNEL) && !defined(PARSESTREAM)
- /*
- * stdio.h must be included after _GNU_SOURCE is defined
- * but before #define snprintf rpl_snprintf
- */
- # include <stdio.h>
- #endif
-
+ #include "c99_snprintf.h"
+
/* Define to rpl_snprintf if the replacement function should be used. */
#undef snprintf
diff --git a/contrib/ntp/sntp/configure b/contrib/ntp/sntp/configure
index b435871daf0e..c39a17dcad27 100755
--- a/contrib/ntp/sntp/configure
+++ b/contrib/ntp/sntp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for sntp 4.2.8p17.
+# Generated by GNU Autoconf 2.71 for sntp 4.2.8p18.
#
# Report bugs to <https://bugs.ntp.org/>.
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sntp'
PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.8p17'
-PACKAGE_STRING='sntp 4.2.8p17'
+PACKAGE_VERSION='4.2.8p18'
+PACKAGE_STRING='sntp 4.2.8p18'
PACKAGE_BUGREPORT='https://bugs.ntp.org/'
PACKAGE_URL='https://www.ntp.org/'
@@ -670,7 +670,6 @@ BUILD_TEST_KODDATABASE_TRUE
UNITYBUILD_AVAILABLE_FALSE
UNITYBUILD_AVAILABLE_TRUE
PATH_RUBY
-VER_SUFFIX
LIB_SYSLOG
subdirs
BUILD_LIBEVENT_FALSE
@@ -678,7 +677,6 @@ BUILD_LIBEVENT_TRUE
LDADD_LIBEVENT
CPPFLAGS_LIBEVENT
CFLAGS_LIBEVENT
-PKG_CONFIG
NTP_FORCE_LIBEVENT_DIST
LIBOPTS_DIR
LIBOPTS_CFLAGS
@@ -710,6 +708,11 @@ NM
ac_ct_DUMPBIN
DUMPBIN
LIBTOOL
+PATH_OPENSSL
+VER_SUFFIX
+PKG_CONFIG
+LIBNTP_SUBMAKES_FALSE
+LIBNTP_SUBMAKES_TRUE
LIBOBJS
PTHREADS_FALSE
PTHREADS_TRUE
@@ -724,10 +727,12 @@ LIBM
EDITLINE_LIBS
LD
FGREP
-SED
+EGREP
+GREP
LDADD_LIBNTP
NTP_CROSSCOMPILE_FALSE
NTP_CROSSCOMPILE_TRUE
+SED
ac_ct_AR
AR
INSTALL_UPDATE_LEAP_FALSE
@@ -820,14 +825,12 @@ WANT_CALC_TICKADJ_MS_TRUE
NTP_HARD_LDFLAGS
NTP_HARD_CPPFLAGS
NTP_HARD_CFLAGS
+CPP
LDFLAGS_NTP
LDADD_NTP
CPPFLAGS_NTP
CFLAGS_NTP
CC_NOFORMAT
-EGREP
-GREP
-CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -941,6 +944,11 @@ enable_linuxcaps
enable_solarisprivs
enable_trustedbsd_mac
enable_signalled_io
+with_crypto
+with_openssl_libdir
+with_openssl_incdir
+enable_verbose_ssl
+enable_openssl_random
enable_shared
enable_static
with_pic
@@ -959,10 +967,6 @@ with_libregex_cflags
with_libregex_libs
enable_optional_args
enable_local_libevent
-with_crypto
-with_openssl_libdir
-with_openssl_incdir
-with_rpath
enable_ipv6
with_kame
enable_getifaddrs
@@ -1526,7 +1530,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sntp 4.2.8p17 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8p18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1597,7 +1601,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sntp 4.2.8p17:";;
+ short | recursive ) echo "Configuration of sntp 4.2.8p18:";;
esac
cat <<\_ACEOF
@@ -1614,13 +1618,15 @@ Optional Features:
defaults: + yes, - no, s system-specific
--enable-debugging + include ntpd debugging code
--enable-thread-support s use threads (+ if available)
- --enable-c99-snprintf s force replacement
+ --enable-c99-snprintf s use replacement printf family
--enable-clockctl s Use /dev/clockctl for non-root clock control
--enable-linuxcaps + Use Linux capabilities for non-root clock control
--enable-solarisprivs + Use Solaris privileges for non-root clock control
--enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
control
--enable-signalled-io s Use signalled IO if we can
+ --enable-verbose-ssl - show crypto lib detection details
+ --enable-openssl-random + Use SSL lib's secure random numbers
--enable-shared[=PKGS] build shared libraries [default=no]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -1646,6 +1652,11 @@ Optional Packages:
--with-lineeditlibs edit,editline (readline may be specified if desired)
--with-threads with threads [auto]
--with-yielding-select with yielding select [auto]
+ --with-crypto + =openssl,libcrypto
+ --with-openssl-libdir + =/something/reasonable
+
+ --with-openssl-incdir + =search likely dirs
+
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
@@ -1659,14 +1670,6 @@ Optional Packages:
--with-libregex libregex installation prefix
--with-libregex-cflags libregex compile flags
--with-libregex-libs libregex link command arguments
- --with-crypto + =openssl,libcrypto
-
- --with-openssl-libdir + =/something/reasonable
-
- --with-openssl-incdir + =/something/reasonable
-
- --without-rpath s Disable auto-added -R linker paths
-
--with-kame - =/usr/local/v6
Some influential environment variables:
@@ -1749,7 +1752,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sntp configure 4.2.8p17
+sntp configure 4.2.8p18
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1835,44 +1838,6 @@ printf "%s\n" "$ac_res" >&6; }
} # ac_fn_c_check_header_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }
-then :
- ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1963,6 +1928,44 @@ fi
} # ac_fn_c_try_run
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -2406,7 +2409,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sntp $as_me 4.2.8p17, which was
+It was created by sntp $as_me 4.2.8p18, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2999,7 +3002,6 @@ as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_
as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
as_fn_append ac_func_c_list " fork HAVE_FORK"
as_fn_append ac_func_c_list " vfork HAVE_VFORK"
-as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
@@ -3198,7 +3200,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-sntp_configure_cache_version=20120806
+sntp_configure_cache_version=20240218
# When the version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -3817,7 +3819,7 @@ fi
# Define the identity of the package.
PACKAGE='sntp'
- VERSION='4.2.8p17'
+ VERSION='4.2.8p18'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -4993,6 +4995,7 @@ fi
+
ac_header= ac_cache=
for ac_item in $ac_header_c_list
do
@@ -5164,333 +5167,7 @@ then :
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-printf %s "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test ${ac_cv_prog_CPP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- # Double quotes because $CC needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-
-else $as_nop
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
- # Broken: success on invalid input.
-continue
-else $as_nop
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok
-then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-printf "%s\n" "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
-else $as_nop
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"
-then :
- # Broken: success on invalid input.
-continue
-else $as_nop
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok
-then :
-
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-printf %s "checking for grep that handles long lines and -e... " >&6; }
-if test ${ac_cv_path_GREP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_prog in grep ggrep
- do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- printf %s 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- printf "%s\n" 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-printf "%s\n" "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-printf %s "checking for egrep... " >&6; }
-if test ${ac_cv_path_EGREP+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_prog in egrep
- do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- printf %s 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- printf "%s\n" 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-printf "%s\n" "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-
-
-
-
-
-# Ralf Wildenhues: With per-target flags we need CC_C_O
-# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
-
-if test $ac_cv_c_compiler_gnu = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-printf %s "checking whether $CC needs -traditional... " >&6; }
-if test ${ac_cv_prog_gcc_traditional+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- ac_pattern="Autoconf.*'x'"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sgtty.h>
-Autoconf TIOCGETP
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1
-then :
- ac_cv_prog_gcc_traditional=yes
-else $as_nop
- ac_cv_prog_gcc_traditional=no
-fi
-rm -rf conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <termio.h>
-Autoconf TCGETA
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1
-then :
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -rf conftest*
-
- fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
@@ -5658,13 +5335,15 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
#
+ # $ntp_cv_gcc_Winit_self is tested later to add the
+ # flag to CFLAGS_NTP.
+ #
# libopts specifically builds a string with embedded NULs.
# This causes a bunch of distracting warnings due to -Wformat.
- # Let's see if we can figure out how to disable these.
#
- CFLAGS="$SAVED_CFLAGS -Wno-format"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5
-printf %s "checking if $CC can handle -Wno-format... " >&6; }
+ CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format -Wno-format-security" >&5
+printf %s "checking if $CC can handle -Wno-format -Wno-format-security... " >&6; }
if test ${ntp_cv_gcc_Wno_format+y}
then :
printf %s "(cached) " >&6
@@ -5694,21 +5373,50 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
-
case "$ntp_cv_gcc_Wno_format" in
+ no) ntp_cv_gcc_Wno_format_truncation=no
+ ;;
yes)
- CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
- ;;
- no)
- ;;
+ CC_NOFORMAT="-Wno-format -Wno-format-security"
+ CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wformat -Wno-format-truncation" >&5
+printf %s "checking if $CC can handle -Wformat -Wno-format-truncation... " >&6; }
+if test ${ntp_cv_gcc_Wno_format_truncation+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_Wno_format_truncation=yes
+else $as_nop
+ ntp_cv_gcc_Wno_format_truncation=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format_truncation" >&5
+printf "%s\n" "$ntp_cv_gcc_Wno_format_truncation" >&6; }
+ #
+ # $ntp_cv_gcc_Wno_format_truncation is tested later to add the
+ # flag to CFLAGS.
+ #
esac
CFLAGS="$SAVED_CFLAGS"
{ SAVED_CFLAGS=; unset SAVED_CFLAGS;}
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS_NTP.
- #
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
printf %s "checking if linker supports omitting unused code and data... " >&6; }
if test ${ntp_cv_gc_sections_runs+y}
@@ -5716,7 +5424,17 @@ then :
printf %s "(cached) " >&6
else $as_nop
- origCFLAGS="$CFLAGS"
+ # NetBSD will link but likely not run with --gc-sections
+ # http://bugs.ntp.org/1844
+ # http://gnats.netbsd.org/40401
+ # --gc-sections causes attempt to load as linux elf, with
+ # wrong syscalls in place. Test a little gauntlet of
+ # simple stdio read code checking for errors, expecting
+ # enough syscall differences that the NetBSD code will
+ # fail even with Linux emulation working as designed.
+ # A shorter test could be refined by someone with access
+ # to a NetBSD host with Linux emulation working.
+ origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5806,6 +5524,10 @@ printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
yes)
CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
esac
+ case "$ntp_cv_gcc_Wno_format_truncation" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation"
+ esac
# -W[no-]strict-prototypes might be added by NTP_OPENSSL
esac
@@ -6734,6 +6456,81 @@ unknown)
esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
# Expose a cross-compilation indicator to makefiles
@@ -6835,6 +6632,148 @@ Xsed="$SED -e 1s/^X//"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
printf %s "checking for fgrep... " >&6; }
if test ${ac_cv_path_FGREP+y}
@@ -7892,12 +7831,154 @@ fi
+ntp_pkgconfig_min_version='0.15.0'
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
+{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
+
+case "$PKG_CONFIG" in
+ /*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
+
+
+
+
+
+VER_SUFFIX=
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
+printf "%s\n" "$as_me: " >&6;}
+ esac
+
+
+
+
+
# HMS: Save $LIBS and empty it.
# any LIBS we add here should go in to LDADD_LIBNTP
-__LIBS=$LIBS
+SAVED_LIBS=$LIBS
LIBS=
@@ -9641,14 +9722,6 @@ printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
esac
-# Obsolete code to be removed.
-if test $ac_cv_header_sys_time_h = yes; then
-
-printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-# End of obsolete code.
-
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -15504,100 +15577,6 @@ fi
-case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
- no::yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
-printf %s "checking for int32 with DNS headers included... " >&6; }
-if test ${ntp_cv_type_int32_with_dns+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
-
-int
-main (void)
-{
-
- size_t cb = sizeof(int32);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- ntp_cv_type_int32_with_dns=yes
-else $as_nop
- ntp_cv_type_int32_with_dns=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
-printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; }
- case "$ntp_cv_type_int32_with_dns" in
- yes)
-
-printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-
- esac
-esac
-
-case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
- no::yes)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
-printf %s "checking for u_int32 with DNS headers included... " >&6; }
-if test ${ntp_cv_type_u_int32_with_dns+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
-
-int
-main (void)
-{
-
- size_t cb = sizeof(u_int32);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- ntp_cv_type_u_int32_with_dns=yes
-else $as_nop
- ntp_cv_type_u_int32_with_dns=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
-printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; }
- case "$ntp_cv_type_u_int32_with_dns" in
- yes)
-
-printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-
- esac
-esac
-
ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
@@ -16179,42 +16158,1189 @@ printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
;;
esac
+ if test x"$enable_dependency_tracking" = x"yes"; then
+ LIBNTP_SUBMAKES_TRUE=
+ LIBNTP_SUBMAKES_FALSE='#'
+else
+ LIBNTP_SUBMAKES_TRUE='#'
+ LIBNTP_SUBMAKES_FALSE=
+fi
-LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
-LIBS=$__LIBS
-{ __LIBS=; unset __LIBS;}
-# Check whether --enable-shared was given.
-if test ${enable_shared+y}
+
+# Check whether --with-crypto was given.
+if test ${with_crypto+y}
then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for pkg in $enableval; do
- IFS=$lt_save_ifs
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
+ withval=$with_crypto; case "$with_crypto" in
+ yes)
+ with_crypto=openssl,libcrypto
+ esac
+
+else $as_nop
+ with_crypto=openssl,libcrypto
+fi
+
+
+# Check whether --with-openssl-libdir was given.
+if test ${with_openssl_libdir+y}
+then :
+ withval=$with_openssl_libdir;
+fi
+
+
+# Check whether --with-openssl-incdir was given.
+if test ${with_openssl_incdir+y}
+then :
+ withval=$with_openssl_incdir;
+fi
+
+# Check whether --enable-verbose-ssl was given.
+if test ${enable_verbose_ssl+y}
+then :
+ enableval=$enable_verbose_ssl;
+else $as_nop
+ enable_verbose_ssl=no
+fi
+
+
+ntp_openssl=no
+ntp_openssl_from_pkg_config=no
+ntp_ssl_incdir=
+ntp_ssl_cflags=
+ntp_ssl_cppflags=
+ntp_ssl_libdir=
+ntp_ssl_libs_L=
+ntp_ssl_libs_l=
+ntp_ssl_libs=
+ntp_ssl_ldflags=
+
+NTPSSL_SAVED_CFLAGS="$CFLAGS"
+NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS"
+NTPSSL_SAVED_LIBS="$LIBS"
+NTPSSL_SAVED_LDFLAGS="$LDFLAGS"
+
+# Extract the first word of "openssl", so it can be a program name with args.
+set dummy openssl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_OPENSSL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PATH_OPENSSL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PATH_OPENSSL="$PATH_OPENSSL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_OPENSSL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PATH_OPENSSL=$ac_cv_path_PATH_OPENSSL
+if test -n "$PATH_OPENSSL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_OPENSSL" >&5
+printf "%s\n" "$PATH_OPENSSL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $str" >&5
+printf "%s\n" "$as_me: $str" >&6;}
+ esac
+
+
+{ str=; unset str;}
+
+# Make sure neither/both --with_openssl-{inc,lib}dir are given
+case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ notgiven:notgiven) ;;
+ *notgiven*)
+ as_fn_error $? "only one of --with-openssl-{inc,lib}dir=... given - provide both or neither" "$LINENO" 5
+ ;;
+esac
+
+# HMS: Today there are only 2 case options. We probably want a third
+# *:*:notgiven:notgiven
+# and in that case we would validate the path in PKG_CONFIG_PATH.
+# Unless we can do it with 2 cases, where the 2nd case is *:*:...
+# and we do a reality check on execpath and the headers/libraries.
+#
+##
+# if $with_crypto is not "no":
+# if --with-openssl-{inc,lib}dir are not given:
+# we should use pkg-config to find openssl
+# if we don't have pkg-config, if openssl is in the base OS, use that.
+##
+case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ no:*) ;;
+ *:notempty:notgiven:notgiven)
+ # If PKG_CONFIG is notempty and we haven't been given openssl paths,
+ # then let's make sure that the openssl executable's path corresponds
+ # to the path in openssl.pc, and 'openssl version' matches the Version
+ # in openssl.pc. If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH,
+ # then should we reality check them?
+ ## INCPATH
+ # harlan@ntp-testbuild.tal1> openssl version
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/*
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ## LIBPATH
+ # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.*
+ # /ntpbuild/lib/libcrypto.a /ntpbuild/lib/libcrypto.so.1.1*
+ # /ntpbuild/lib/libcrypto.so@
+ # harlan@ntp-testbuild.tal1>
+ ##
+ # Having said this, do we really care if the openssl executable that
+ # we have found is matched with the INCPATH and LIBPATH?
+ # One answer: Probably not, but we should complain on a mismatch as
+ # otherwise runtime differences could easily cause problems/drama.
+
+ ##BO
+ # ntp_cv_build_framework_help=yes
+ save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ case "$pkg" in
+ openssl)
+ if $PKG_CONFIG --exists $pkg ; then
+ # Found it - yay
+ # Do we want to check we found the right one?
+ # --modver
+ # --variable={libdir,includedir} (varname)
+ overf=`openssl version`
+ overs=`echo $overf | awk '{print }'`
+ case "$overs" in
+ 0.*) ;; # Should we squawk?
+ 1.0.*) ;; # Should we squawk?
+ 1.1.*) ;; # Should we squawk?
+ 3.*)
+ oinc=`openssl --variable=includedir`
+ olib=`openssl --variable=libdir`
+ # How should we use these?
+ ;;
+ *) ;; # Should we squawk?
+ esac
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # grep 1.1.1t /ntpbuild/lib/libcrypto.a
+ # strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1>
+ # which should match $overf
+ ##
+ # harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t 7 Feb 2023"' | cut -f 2 -d\"
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h
+ # # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ##
+
+ else
+ # This is a hack, but it's reasonable.
+ pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig"
+ test -d "$pkgpath" || pkgpath=
+ # echo "pkgpath is <$pkgpath>"
+ # echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>"
+ case "$pkgpath" in
+ '') ;; # Nothing to see here...
+ *) case ":$PKG_CONFIG_PATH:" in
+ ::)
+ PKG_CONFIG_PATH=$pkgpath
+ export PKG_CONFIG_PATH
+ ;;
+ *:$pkgpath:*)
+ # Already there...
+ ;;
+ *)
+ PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH"
+ export PKG_CONFIG_PATH
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ done
+ ##EO
+
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+printf %s "checking pkg-config for $pkg... " >&6; }
+ if $PKG_CONFIG --exists $pkg ; then
+ ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`"
+ case "$ntp_ssl_cppflags" in
+ '')
+ ntp_ssl_incdir='not needed'
+ ;;
+ *)
+ ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`"
+ esac
+ ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`"
+ ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`"
+ case "$ntp_ssl_libs_L" in
+ '')
+ ntp_ssl_libdir='not needed'
+ ;;
+ *)
+ ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`"
+ esac
+ ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`"
+ ntp_openssl=yes
+ ntp_openssl_from_pkg_config=yes
+ ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
+ case "$ntp_openssl_version" in
+ *.*) ;;
+ *) ntp_openssl_version='(unknown)' ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
+printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
+
+ break
fi
- done
- IFS=$lt_save_ifs
- ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ done
+ { pkg=; unset pkg;}
+esac
+case "$with_crypto" in
+ no) ;;
+ *)
+ case "$with_openssl_libdir" in
+ '') ;;
+ *)
+ ntp_ssl_libdir="$with_openssl_libdir"
+ ntp_ssl_libs_L="-L$with_openssl_libdir"
+ ntp_ssl_libs_l="-lcrypto"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
esac
+ case "$with_openssl_incdir" in
+ '') ;;
+ *)
+ ntp_ssl_incdir="$with_openssl_incdir"
+ ntp_ssl_cppflags="-I$with_openssl_incdir"
+ esac
+esac
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase I checks:" >&5
+printf "%s\n" "$as_me: OpenSSL Phase I checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5
+printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&5
+printf "%s\n" "$as_me: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;}
+ esac
+
+
+
+case "$with_crypto" in
+ no)
+ ntp_openssl=no
+ ;;
+ *)
+ ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ case "$ntp_ssl_libdir" in
+ '')
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto without -L" >&5
+printf "%s\n" "$as_me: Searching for libcrypto without -L" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
+printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
+then :
+ printf %s "(cached) " >&6
else $as_nop
- enable_shared=no
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char EVP_MD_CTX_new ();
+int
+main (void)
+{
+return EVP_MD_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_crypto_EVP_MD_CTX_new=yes
+else $as_nop
+ ac_cv_lib_crypto_EVP_MD_CTX_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
+printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
+then :
+ ntp_ssl_libdir='not needed'
+
+fi
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ esac
+ case "$ntp_ssl_libdir" in
+ '')
+ ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64"
+ ;;
+ *)
+ ntp_ssl_libdir_search="$ntp_ssl_libdir"
+ esac
+ case $ntp_ssl_libdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_libdir_search not_found
+ do
+ case "$i" in
+ not_found) ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto in $i" >&5
+printf "%s\n" "$as_me: Searching for libcrypto in $i" >&6;}
+ LIBS="-L$i $NTPSSL_SAVED_LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
+printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char EVP_MD_CTX_new ();
+int
+main (void)
+{
+return EVP_MD_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_crypto_EVP_MD_CTX_new=yes
+else $as_nop
+ ac_cv_lib_crypto_EVP_MD_CTX_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
+printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
+then :
+ break
+
+fi
+
+ { ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
+ esac
+ done
+ ntp_ssl_libdir="$i"
+ ntp_ssl_libs_L="-L$i"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ LIBS="$NTPSSL_SAVED_LIBS"
+ case "$ntp_ssl_libdir" in
+ not_found)
+ as_fn_error $? "You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+--with-openssl-libdir=/some/path option to configure.
+libcrypto not found in any of the following directories:
+$ntp_ssl_libdir_search
+ " "$LINENO" 5
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libcrypto found in $ntp_ssl_libdir" >&5
+printf "%s\n" "$as_me: libcrypto found in $ntp_ssl_libdir" >&6;}
+ esac
+
+ case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in
+ 'yes:not needed' | no:)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h without -I" >&5
+printf "%s\n" "$as_me: Searching for openssl/evp.h without -I" >&6;}
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes
+then :
+ ntp_ssl_incdir='not needed'
+
+fi
+
+ esac
+ case "$ntp_ssl_incdir" in
+ 'not needed')
+ ntp_ssl_incdir_search="$ntp_ssl_incdir"
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl include directory" >&5
+printf "%s\n" "$as_me: Searching for openssl include directory" >&6;}
+ case "$with_openssl_incdir" in
+ '')
+ case "$ntp_ssl_incdir" in
+ '')
+ ntp_ssl_incdir_search="/usr/include /usr/sfw/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include"
+ ;;
+ *)
+ esac
+ ;;
+ *)
+ ntp_ssl_incdir_search="$with_openssl_incdir"
+ esac
+ case $ntp_ssl_incdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_incdir_search
+ do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h in $i" >&5
+printf "%s\n" "$as_me: Searching for openssl/evp.h in $i" >&6;}
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i"
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes
+then :
+ ntp_ssl_incdir="$i" ; break
+
+fi
+
+ done
+ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
+ { i=; unset i;}
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+ case "$ntp_ssl_incdir" in
+ '')
+ as_fn_error $? "You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+-with-openssl-incdir=/some/path option to configure.
+No usable openssl/evp.h found in any of the following direcotries:
+$ntp_ssl_incdir_search
+ " "$LINENO" 5
+ esac
+ ntp_ssl_cppflags="-I$ntp_ssl_incdir"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Found evp.h in $ntp_ssl_incdir/openssl" >&5
+printf "%s\n" "$as_me: Found evp.h in $ntp_ssl_incdir/openssl" >&6;}
+ esac
+ esac
+ ntp_openssl=yes
+esac
+case "$ntp_openssl:$ntp_ssl_libdir" in
+ 'yes:not needed')
+ ;;
+ yes:*)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto works without runpath" >&5
+printf %s "checking if crypto works without runpath... " >&6; }
+if test ${ntp_cv_ssl_without_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ ntp_cv_ssl_without_runpath=yes
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_without_runpath=yes
+else $as_nop
+ ntp_cv_ssl_without_runpath=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_without_runpath" >&5
+printf "%s\n" "$ntp_cv_ssl_without_runpath" >&6; }
+ case "$ntp_cv_ssl_without_runpath" in
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir" >&5
+printf %s "checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir... " >&6; }
+if test ${ntp_cv_ssl_needs_dashWl_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS"
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_needs_dashWl_rpath=yes
+else $as_nop
+ ntp_cv_ssl_needs_dashWl_rpath=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashWl_rpath" >&5
+printf "%s\n" "$ntp_cv_ssl_needs_dashWl_rpath" >&6; }
+ case "$ntp_cv_ssl_needs_dashWl_rpath" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir"
+ ;;
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -R$ntp_ssl_libdir" >&5
+printf %s "checking if crypto needs -R$ntp_ssl_libdir... " >&6; }
+if test ${ntp_cv_ssl_needs_dashR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ntp_cv_ssl_needs_dashR=yes
+else $as_nop
+ ntp_cv_ssl_needs_dashR=no
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashR" >&5
+printf "%s\n" "$ntp_cv_ssl_needs_dashR" >&6; }
+ case "$ntp_cv_ssl_needs_dashR" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ esac
+ case "$build:$ntp_cv_ssl_needs_dashR" in
+ $host:no)
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Unable to run program using crypto, check openssl.pc
+or libcrypto.pc are in PKG_CONFIG_PATH, or provide the
+ --with-openssl-libdir=/some/path option to configure.
+
+See \`config.log' for more details" "$LINENO" 5; }
+ esac
+ esac
+ esac
+esac
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase II checks:" >&5
+printf "%s\n" "$as_me: OpenSSL Phase II checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_incdir: ($ntp_ssl_incdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libdir: ($ntp_ssl_libdir)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cflags: ($ntp_ssl_cflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_L: ($ntp_ssl_libs_L)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs_l: ($ntp_ssl_libs_l)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs: ($ntp_ssl_libs)" >&5
+printf "%s\n" "$as_me: ntp_ssl_libs: ($ntp_ssl_libs)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&5
+printf "%s\n" "$as_me: ntp_ssl_ldflags: ($ntp_ssl_ldflags)" >&6;}
+ esac
+
+
+
+case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
+ yes:no)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l alone works" >&5
+printf %s "checking if linking with $ntp_ssl_libs_l alone works... " >&6; }
+if test ${ntp_cv_bare_lcrypto+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ EVP_MD_CTX_new();
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ntp_cv_bare_lcrypto=yes
+else $as_nop
+ ntp_cv_bare_lcrypto=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
+printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
+ case "$ntp_cv_bare_lcrypto" in
+ no)
+ LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l -lz works" >&5
+printf %s "checking if linking with $ntp_ssl_libs_l -lz works... " >&6; }
+if test ${ntp_cv_lcrypto_lz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/evp.h"
+
+int
+main (void)
+{
+
+ EVP_MD_CTX_new();
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ntp_cv_lcrypto_lz=yes
+else $as_nop
+ ntp_cv_lcrypto_lz=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
+printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
+ case "$ntp_cv_lcrypto_lz" in
+ yes)
+ ntp_ssl_libs_l="$ntp_ssl_libs_l -lz"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ esac
+ esac esac
+case "$ntp_openssl:$GCC" in
+ yes:yes)
+ CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If $CC supports -Werror" >&5
+printf %s "checking If $CC supports -Werror... " >&6; }
+if test ${ntp_cv_gcc_supports_Werror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_supports_Werror=yes
+else $as_nop
+ ntp_cv_gcc_supports_Werror=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_supports_Werror" >&5
+printf "%s\n" "$ntp_cv_gcc_supports_Werror" >&6; }
+ case "ntp_cv_gcc_supports_Werror" in
+ no)
+ ntp_use_Wstrict_prototypes=yes
+ ;;
+ yes)
+ CFLAGS="$CFLAGS -Wstrict-prototypes"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OpenSSL triggers warnings" >&5
+printf %s "checking if OpenSSL triggers warnings... " >&6; }
+if test ${ntp_cv_ssl_triggers_warnings+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include "openssl/asn1_mac.h"
+ #include "openssl/bn.h"
+ #include "openssl/err.h"
+ #include "openssl/evp.h"
+ #include "openssl/pem.h"
+ #include "openssl/rand.h"
+ #include "openssl/x509v3.h"
+
+int
+main (void)
+{
+
+ /* empty body */
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_ssl_triggers_warnings=no
+else $as_nop
+ ntp_cv_ssl_triggers_warnings=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_triggers_warnings" >&5
+printf "%s\n" "$ntp_cv_ssl_triggers_warnings" >&6; }
+ case "$ntp_cv_ssl_triggers_warnings" in
+ yes)
+ ntp_use_Wstrict_prototypes=no
+ ;;
+ *)
+ ntp_use_Wstrict_prototypes=yes
+ esac
+ esac
+ case "$ntp_use_Wstrict_prototypes" in
+ no)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes"
+ ;;
+ *)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+ esac
+ ;;
+ no:yes)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will link to ssl library" >&5
+printf %s "checking if we will link to ssl library... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+printf "%s\n" "$ntp_openssl" >&6; }
+
+case "$ntp_openssl" in
+ yes)
+ VER_SUFFIX=o
+ for ac_header in openssl/cmac.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_cmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
+ ntp_enable_cmac=yes
+else $as_nop
+ ntp_enable_cmac=no
+
+fi
+
+done
+ case "$ntp_enable_cmac" in
+ yes)
+
+printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
+
+ esac
+
+printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
+
+
+printf "%s\n" "#define OPENSSL_SUPPRESS_DEPRECATED 1" >>confdefs.h
+
+ CFLAGS="$NTPSSL_SAVED_CFLAGS"
+ ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
+if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
+
+fi
+
+ CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags"
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags"
+ LDADD_NTP="$ntp_ssl_libs $LDADD_NTP"
+ LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP"
+esac
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL final checks:" >&5
+printf "%s\n" "$as_me: OpenSSL final checks:" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl: $ntp_openssl" >&5
+printf "%s\n" "$as_me: ntp_openssl: $ntp_openssl" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP: ($CFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: CFLAGS_NTP: ($CFLAGS_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP: ($LDADD_NTP)" >&5
+printf "%s\n" "$as_me: LDADD_NTP: ($LDADD_NTP)" >&6;}
+ esac
+
+
+ case "$enable_verbose_ssl" in
+ yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&5
+printf "%s\n" "$as_me: LDFLAGS_NTP: ($LDFLAGS_NTP)" >&6;}
+ esac
+
+
+
+CFLAGS="$NTPSSL_SAVED_CFLAGS"
+CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+LIBS="$NTPSSL_SAVED_LIBS"
+LDFLAGS="$NTPSSL_SAVED_LDFLAGS"
+
+{ NTPSSL_SAVED_CFLAGS=; unset NTPSSL_SAVED_CFLAGS;}
+{ NTPSSL_SAVED_CPPFLAGS=; unset NTPSSL_SAVED_CPPFLAGS;}
+{ NTPSSL_SAVED_LIBS=; unset NTPSSL_SAVED_LIBS;}
+{ NTPSSL_SAVED_LDFLAGS=; unset NTPSSL_SAVED_LDFLAGS;}
+{ ntp_enable_cmac=; unset ntp_enable_cmac;}
+{ ntp_use_Wstrict_prototypes=; unset ntp_use_Wstrict_prototypes;}
+{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
+{ ntp_openssl_version=; unset ntp_openssl_version;}
+{ ntp_ssl_cflags=; unset ntp_ssl_cflags;}
+{ ntp_ssl_cppflags=; unset ntp_ssl_cppflags;}
+{ ntp_ssl_libdir_search=; unset ntp_ssl_libdir_search;}
+{ ntp_ssl_incdir_search=; unset ntp_ssl_incdir_search;}
+{ ntp_ssl_libdir=; unset ntp_ssl_libdir;}
+{ ntp_ssl_incdir=; unset ntp_ssl_incdir;}
+{ ntp_ssl_libs_l=; unset ntp_ssl_libs_l;}
+{ ntp_ssl_libs_L=; unset ntp_ssl_libs_L;}
+{ ntp_ssl_ldflags=; unset ntp_ssl_ldflags;}
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SSL library's secure random numbers" >&5
+printf %s "checking if we want to use SSL library's secure random numbers... " >&6; }
+# Check whether --enable-openssl-random was given.
+if test ${enable_openssl_random+y}
+then :
+ enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval
+else $as_nop
+ ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
+printf "%s\n" "$ntp_use_openssl_random" >&6; }
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
+if test "x$ac_cv_func_RAND_bytes" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
+if test "x$ac_cv_func_RAND_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
+
fi
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyesyes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using SSL library's secure random number generator" >&5
+printf "%s\n" "$as_me: Using SSL library's secure random number generator" >&6;}
+
+printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
+ ;;
+ *)
+ ntp_use_openssl_random=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: SSL library's secure random number generator unavailable." >&5
+printf "%s\n" "$as_me: SSL library's secure random number generator unavailable." >&6;}
+ case "$ntp_ssl_random_mandatory" in
+ yes)
+ as_fn_error $? "No suitable SSL library was found and
+--enable-openssl-random was given.. Remove --enable-openssl-random
+if you wish to build without a cryptographically secure random number
+generator.
+
+WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " "$LINENO" 5
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " >&5
+printf "%s\n" "$as_me: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.
+ " >&2;}
+ esac
+esac
+{ ntp_ssl_random_mandatory=; unset ntp_ssl_random_mandatory;}
+LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
+LIBS=$SAVED_LIBS
+{ SAVED_LIBS=; unset SAVED_LIBS;}
@@ -19334,6 +20460,36 @@ fi
# Set options
+# Check whether --enable-shared was given.
+if test ${enable_shared+y}
+then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_shared=no
+fi
+
+
+
+
+
+
+
@@ -23678,7 +24834,7 @@ esac
# Therefore, by default:
# - use the version we ship with
# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
+# - build a static copy (disable-shared - done earlier)
case "${enable_local_libopts+set}" in
set) ;;
*) enable_local_libopts=yes ;;
@@ -25651,136 +26807,6 @@ printf "%s\n" "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
-ntp_pkgconfig_min_version='0.15.0'
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_PKG_CONFIG+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-printf "%s\n" "$PKG_CONFIG" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
- if test "x$ac_pt_PKG_CONFIG" = x; then
- PKG_CONFIG=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_pt_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
-{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
-
-case "$PKG_CONFIG" in
- /*)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
-printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
- if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
- else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- PKG_CONFIG=""
- fi
- ;;
-esac
-
-
-
-
# Check whether --enable-local-libevent was given.
if test ${enable_local_libevent+y}
then :
@@ -25812,8 +26838,6 @@ case "$ntp_use_local_libevent" in
*) # If we have (a good enough) pkg-config, see if it can find libevent
case "$PKG_CONFIG" in
/*)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
-printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
then
ntp_use_local_libevent=no
@@ -25822,6 +26846,8 @@ printf %s "checking if libevent $ntp_libevent_min_version or later is installed.
*.*) ;;
*) ntp_libevent_version='(unknown)' ;;
esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
@@ -25856,6 +26882,8 @@ printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
@@ -25904,14 +26932,15 @@ esac
case "$ntp_use_local_libevent" in
yes)
ac_configure_args=" --disable-openssl${ac_configure_args}"
+ ac_configure_args=" --disable-samples${ac_configure_args}"
ac_configure_args=" --disable-shared${ac_configure_args}"
ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
ac_configure_args=" --disable-libevent-install${ac_configure_args}"
ac_configure_args=" --enable-silent-rules${ac_configure_args}"
ac_configure_args=" --enable-function-sections${ac_configure_args}"
- ac_configure_args=" LEP_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
- ac_configure_args=" LEP_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
- ac_configure_args=" LEP_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
+ ac_configure_args=" LIBEVENT_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
+ ac_configure_args=" LIBEVENT_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
+ ac_configure_args=" LIBEVENT_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
subdirs="$subdirs libevent"
;;
@@ -26041,35 +27070,39 @@ fi
done
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
printf %s "checking for facilitynames in syslog.h... " >&6; }
if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
then :
printf %s "(cached) " >&6
else $as_nop
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define SYSLOG_NAMES
-#include <stdlib.h>
-#include <syslog.h>
+ #define SYSLOG_NAMES
+ #include <stdlib.h>
+ #include <syslog.h>
int
main (void)
{
- void *fnames; fnames = facilitynames;
+
+ void *fnames = facilitynames;
+
+
;
return 0;
}
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
-else $as_nop
ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
@@ -26082,11 +27115,6 @@ printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
no)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
- ;;
- cross)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
-printf "%s\n" "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
- ;;
esac
@@ -26236,466 +27264,6 @@ fi
-
-VER_SUFFIX=
-
-
-
-
-# Check whether --with-crypto was given.
-if test ${with_crypto+y}
-then :
- withval=$with_crypto;
-fi
-
-
-# Check whether --with-openssl-libdir was given.
-if test ${with_openssl_libdir+y}
-then :
- withval=$with_openssl_libdir;
-fi
-
-
-# Check whether --with-openssl-incdir was given.
-if test ${with_openssl_incdir+y}
-then :
- withval=$with_openssl_incdir;
-fi
-
-
-# Check whether --with-rpath was given.
-if test ${with_rpath+y}
-then :
- withval=$with_rpath;
-fi
-
-
-ntp_openssl=no
-ntp_openssl_from_pkg_config=no
-
-with_crypto=${with_crypto:-openssl,libcrypto}
-case "$with_crypto" in
- yes)
- with_crypto=openssl,libcrypto
-esac
-
-
-case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
- no:*) ;;
- *:notempty:notgiven:notgiven)
- for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
-printf %s "checking pkg-config for $pkg... " >&6; }
- if $PKG_CONFIG --exists $pkg ; then
- CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
- CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
- LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
- VER_SUFFIX=o
- ntp_openssl=yes
- ntp_openssl_from_pkg_config=yes
- ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
- case "$ntp_openssl_version" in
- *.*) ;;
- *) ntp_openssl_version='(unknown)' ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
-printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
-
- break
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- done
-esac
-case "$with_crypto:$ntp_openssl" in
- no:*) ;;
- *:no)
- need_dash_r=
- need_dash_Wlrpath=
- case "${with_rpath-notgiven}" in
- yes)
- # Lame - what to do if we need -Wl... but not -R?
- need_dash_r=1
- ;;
- notgiven)
- case "$host" in
- *-*-linux*)
- # This may really only be true for gcc
- need_dash_Wlrpath=1
- ;;
- *-*-netbsd*)
- need_dash_r=1
- ;;
- *-*-solaris*)
- need_dash_r=1
- ;;
- esac
- ;;
- esac
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-printf %s "checking for openssl library directory... " >&6; }
- with_openssl_libdir=${with_openssl_libdir-notgiven}
- case "$with_openssl_libdir" in
- notgiven)
- case "$build" in
- $host)
- with_openssl_libdir=default
- ;;
- *)
- with_openssl_libdir=no
- ;;
- esac
- esac
- case "$with_openssl_libdir" in
- default)
- # Look in:
- with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
- esac
- case "$with_openssl_libdir" in
- no)
- ;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $with_openssl_libdir no
- do
- case "$host" in
- *-*-darwin*)
- test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
- ;;
- *)
- test -f $i/libcrypto.so -a -f $i/libssl.so && break
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
- ;;
- esac
- done
- openssl_libdir=$i
- ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
-printf "%s\n" "$openssl_libdir" >&6; }
- case "$openssl_libdir" in
- no)
- openssl_libdir=
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
-printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
- esac
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
-printf %s "checking for openssl include directory... " >&6; }
- with_openssl_incdir=${with_openssl_incdir-notgiven}
- case "$with_openssl_incdir" in
- notgiven)
- # Look in:
- with_openssl_incdir="/usr/include /usr/sfw/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
- esac
- case "$with_openssl_incdir" in
- no)
- ;;
- *) # look for openssl/evp.h:
- for i in $with_openssl_incdir no
- do
- test -f $i/openssl/evp.h && break
- done
- openssl_incdir=$i
- ;;
- esac
- { i=; unset i;}
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
-printf "%s\n" "$openssl_incdir" >&6; }
- case "$openssl_incdir" in
- no)
- openssl_incdir=
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
-printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
- esac
- if test -z "$openssl_libdir" -o -z "$openssl_incdir"
- then
- ntp_openssl=no
- else
- ntp_openssl=yes
- VER_SUFFIX=o
- fi
- case "$ntp_openssl" in
- yes)
- # We have OpenSSL inc/lib dirs - use them.
- case "$openssl_incdir" in
- /usr/include)
- ;;
- *)
- CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
- ;;
- esac
- case "$openssl_libdir" in
- /usr/lib)
- ;;
- *)
- LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
- case "$need_dash_r" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
- esac
- case "$need_dash_Wlrpath" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
- esac
- ;;
- esac
- LDADD_NTP="$LDADD_NTP -lcrypto"
- esac
-esac
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-printf %s "checking if we will use crypto... " >&6; }
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
-printf "%s\n" "$ntp_openssl" >&6; }
-
-case "$ntp_openssl" in
- yes)
- ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_cmac_h" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
-
-fi
-ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_hmac_h" = xyes
-then :
- printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h
-
-fi
-
-
-printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
-
- case "$VER_SUFFIX" in
- *o*) ;;
- *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
- esac
- ;;
-esac
-
-NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
-NTPO_SAVED_LIBS="$LIBS"
-
-#
-# check for linking with -lcrypto failure, and try -lcrypto -lz.
-# Helps m68k-atari-mint
-#
-case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
- yes:no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
-printf %s "checking if linking with -lcrypto alone works... " >&6; }
-if test ${ntp_cv_bare_lcrypto+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/err.h"
- #include "openssl/evp.h"
-
-int
-main (void)
-{
-
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- ntp_cv_bare_lcrypto=yes
-else $as_nop
- ntp_cv_bare_lcrypto=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
-printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
- case "$ntp_cv_bare_lcrypto" in
- no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
-printf %s "checking if linking with -lcrypto -lz works... " >&6; }
-if test ${ntp_cv_lcrypto_lz+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/err.h"
- #include "openssl/evp.h"
-
-int
-main (void)
-{
-
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- ntp_cv_lcrypto_lz=yes
-else $as_nop
- ntp_cv_lcrypto_lz=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
-printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
- case "$ntp_cv_lcrypto_lz" in
- yes)
- LDADD_NTP="$LDADD_NTP -lz"
- esac
- esac
-esac
-
-#
-# Older OpenSSL headers have a number of callback prototypes inside
-# other function prototypes which trigger copious warnings with gcc's
-# -Wstrict-prototypes, which is included in -Wall.
-#
-# An example:
-#
-# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
-# int (*cb)(), int sgckey);
-# ^^^^^^^^^^^
-#
-#
-#
-openssl_triggers_warnings=unknown
-NTPO_SAVED_CFLAGS="$CFLAGS"
-
-case "$ntp_openssl:$GCC" in
- yes:yes)
- CFLAGS="$CFLAGS -Werror"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main (void)
-{
-
- /* see if -Werror breaks gcc */
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gcc_handles_Werror=yes
-else $as_nop
- gcc_handles_Werror=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- case "$gcc_handles_Werror" in
- no)
- # if this gcc doesn't do -Werror go ahead and use
- # -Wstrict-prototypes.
- openssl_triggers_warnings=yes
- ;;
- yes)
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include "openssl/asn1_mac.h"
- #include "openssl/bn.h"
- #include "openssl/err.h"
- #include "openssl/evp.h"
- #include "openssl/pem.h"
- #include "openssl/rand.h"
- #include "openssl/x509v3.h"
-
-int
-main (void)
-{
-
- /* empty body */
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- openssl_triggers_warnings=no
-else $as_nop
- openssl_triggers_warnings=yes
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- esac
- case "$openssl_triggers_warnings" in
- yes)
- CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
- ;;
- *)
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
- esac
- ;;
- no:yes)
- # gcc without OpenSSL
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
-esac
-
-# Because we don't want -Werror for the EVP_MD_do_all_sorted check
-CFLAGS="$NTPO_SAVED_CFLAGS"
-
-case "$ntp_openssl" in
- yes)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
-if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
-then :
- printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
-
-fi
-
- ;;
-esac
-
-
-CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
-LIBS="$NTPO_SAVED_LIBS"
-{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
-{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
-{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
-{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
-{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
-
-
-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
printf %s "checking for struct sockaddr_storage... " >&6; }
if test ${ntp_cv_sockaddr_storage+y}
@@ -27842,6 +28410,10 @@ if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
as_fn_error $? "conditional \"PTHREADS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${LIBNTP_SUBMAKES_TRUE}" && test -z "${LIBNTP_SUBMAKES_FALSE}"; then
+ as_fn_error $? "conditional \"LIBNTP_SUBMAKES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -28264,7 +28836,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sntp $as_me 4.2.8p17, which was
+This file was extended by sntp $as_me 4.2.8p18, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -28333,7 +28905,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-sntp config.status 4.2.8p17
+sntp config.status 4.2.8p18
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
@@ -28470,9 +29042,9 @@ FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
@@ -29519,13 +30091,13 @@ SHELL=$lt_SHELL
# An echo program that protects backslashes.
ECHO=$lt_ECHO
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
# Which release of libtool.m4 was used?
macro_version=$macro_version
macro_revision=$macro_revision
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
# Whether or not to build static libraries.
build_old_libs=$enable_static
diff --git a/contrib/ntp/sntp/configure.ac b/contrib/ntp/sntp/configure.ac
index 43c2ad6c5828..4fb182bc0ef5 100644
--- a/contrib/ntp/sntp/configure.ac
+++ b/contrib/ntp/sntp/configure.ac
@@ -33,7 +33,7 @@ AC_LANG([C])
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-sntp_configure_cache_version=20120806
+sntp_configure_cache_version=20240218
# When the version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -62,8 +62,7 @@ AM_PROG_AR
NTP_LIBNTP
-AC_DISABLE_SHARED
-AC_PROG_LIBTOOL
+LT_INIT([disable-shared])
AC_SUBST([LIBTOOL_DEPS])
NTP_WITHSNTP
@@ -82,7 +81,7 @@ esac
# Therefore, by default:
# - use the version we ship with
# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
+# - build a static copy (disable-shared - done earlier)
case "${enable_local_libopts+set}" in
set) ;;
*) enable_local_libopts=yes ;;
@@ -121,7 +120,6 @@ NTP_FACILITYNAMES
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
-NTP_OPENSSL
NTP_IPV6
###
diff --git a/contrib/ntp/sntp/crypto.c b/contrib/ntp/sntp/crypto.c
index 7807ccc00b03..1be2ea3f0c39 100644
--- a/contrib/ntp/sntp/crypto.c
+++ b/contrib/ntp/sntp/crypto.c
@@ -16,14 +16,15 @@ size_t key_cnt = 0;
typedef struct key Key_T;
-static u_int
+static size_t
compute_mac(
- u_char digest[EVP_MAX_MD_SIZE],
+ u_char * digest,
+ size_t dig_sz,
char const * macname,
void const * pkt_data,
- u_int pkt_size,
+ size_t pkt_len,
void const * key_data,
- u_int key_size
+ size_t key_size
)
{
u_int len = 0;
@@ -56,7 +57,7 @@ compute_mac(
EVP_aes_128_cbc(), NULL)) {
msyslog(LOG_ERR, "make_mac: CMAC %s Init failed.", CMAC);
}
- else if (!CMAC_Update(ctx, pkt_data, (size_t)pkt_size)) {
+ else if (!CMAC_Update(ctx, pkt_data, pkt_len)) {
msyslog(LOG_ERR, "make_mac: CMAC %s Update failed.", CMAC);
}
else if (!CMAC_Final(ctx, digest, &slen)) {
@@ -95,7 +96,7 @@ compute_mac(
macname);
goto mac_fail;
}
- if (!EVP_DigestUpdate(ctx, pkt_data, pkt_size)) {
+ if (!EVP_DigestUpdate(ctx, pkt_data, pkt_len)) {
msyslog(LOG_ERR, "make_mac: MAC %s Digest Update data failed.",
macname);
goto mac_fail;
@@ -112,7 +113,7 @@ compute_mac(
goto mac_fail;
}
EVP_DigestUpdate(ctx, key_data, key_size);
- EVP_DigestUpdate(ctx, pkt_data, pkt_size);
+ EVP_DigestUpdate(ctx, pkt_data, pkt_len);
EVP_DigestFinal(ctx, digest, &len);
#endif
mac_fail:
@@ -122,34 +123,28 @@ compute_mac(
return len;
}
-int
+
+size_t
make_mac(
const void * pkt_data,
- int pkt_size,
- int mac_size,
+ size_t pkt_len,
Key_T const * cmp_key,
- void * digest
+ void * digest,
+ size_t dig_sz
)
{
u_int len;
u_char dbuf[EVP_MAX_MD_SIZE];
- if (cmp_key->key_len > 64 || mac_size <= 0)
- return 0;
- if (pkt_size % 4 != 0)
+ if (cmp_key->key_len > 64 || pkt_len % 4 != 0) {
return 0;
-
- len = compute_mac(dbuf, cmp_key->typen,
- pkt_data, (u_int)pkt_size,
- cmp_key->key_seq, (u_int)cmp_key->key_len);
-
-
- if (len) {
- if (len > (u_int)mac_size)
- len = (u_int)mac_size;
- memcpy(digest, dbuf, len);
}
- return (int)len;
+ len = compute_mac(dbuf, sizeof(dbuf), cmp_key->typen, pkt_data,
+ pkt_len, cmp_key->key_seq, cmp_key->key_len);
+ INSIST(len <= dig_sz);
+ memcpy(digest, dbuf, len);
+
+ return len;
}
@@ -161,8 +156,8 @@ make_mac(
int
auth_md5(
void const * pkt_data,
- int pkt_size,
- int mac_size,
+ size_t pkt_len,
+ size_t mac_len,
Key_T const * cmp_key
)
{
@@ -170,22 +165,20 @@ auth_md5(
u_char const * pkt_ptr = pkt_data;
u_char dbuf[EVP_MAX_MD_SIZE];
- if (mac_size <= 0 || (size_t)mac_size > sizeof(dbuf))
+ if (0 == mac_len || mac_len > sizeof(dbuf)) {
return FALSE;
+ }
+ len = compute_mac(dbuf, sizeof(dbuf), cmp_key->typen,
+ pkt_ptr, pkt_len, cmp_key->key_seq,
+ cmp_key->key_len);
- len = compute_mac(dbuf, cmp_key->typen,
- pkt_ptr, (u_int)pkt_size,
- cmp_key->key_seq, (u_int)cmp_key->key_len);
-
- pkt_ptr += pkt_size + 4;
- if (len > (u_int)mac_size)
- len = (u_int)mac_size;
+ pkt_ptr += pkt_len + sizeof(keyid_t);
/* isc_tsmemcmp will be better when its easy to link with. sntp
* is a 1-shot program, so snooping for timing attacks is
* Harder.
*/
- return ((u_int)mac_size == len) && !memcmp(dbuf, pkt_ptr, len);
+ return mac_len == len && !memcmp(dbuf, pkt_ptr, mac_len);
}
static int
@@ -312,14 +305,15 @@ auth_init(
*/
void
get_key(
- int key_id,
- struct key **d_key
+ keyid_t key_id,
+ struct key ** d_key
)
{
struct key *itr_key;
- if (key_cnt == 0)
+ if (key_cnt == 0) {
return;
+ }
for (itr_key = key_ptr; itr_key; itr_key = itr_key->next) {
if (itr_key->key_id == key_id) {
*d_key = itr_key;
diff --git a/contrib/ntp/sntp/crypto.h b/contrib/ntp/sntp/crypto.h
index 4e75df20a9a3..4afe865e53e5 100644
--- a/contrib/ntp/sntp/crypto.h
+++ b/contrib/ntp/sntp/crypto.h
@@ -17,18 +17,19 @@
struct key {
struct key * next;
- int key_id;
- int key_len;
+ keyid_t key_id;
+ size_t key_len;
int typei;
char typen[20];
char key_seq[64];
};
extern int auth_init(const char *keyfile, struct key **keys);
-extern void get_key(int key_id, struct key **d_key);
-extern int make_mac(const void *pkt_data, int pkt_size, int mac_size,
- const struct key *cmp_key, void *digest);
-extern int auth_md5(const void *pkt_data, int pkt_size, int mac_size,
- const struct key *cmp_key);
+extern void get_key(keyid_t key_id, struct key **d_key);
+extern size_t make_mac(const void *pkt_data, size_t pkt_len,
+ const struct key *cmp_key, void *digest,
+ size_t dig_sz);
+extern int auth_md5(const void *pkt_data, size_t pkt_len,
+ size_t dig_len, const struct key *cmp_key);
#endif
diff --git a/contrib/ntp/sntp/include/Makefile.in b/contrib/ntp/sntp/include/Makefile.in
index c3db03921ec4..4cfad3135b91 100644
--- a/contrib/ntp/sntp/include/Makefile.in
+++ b/contrib/ntp/sntp/include/Makefile.in
@@ -98,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_cacheversion.m4 \
$(top_srcdir)/m4/ntp_compiler.m4 \
$(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
$(top_srcdir)/m4/ntp_facilitynames.m4 \
$(top_srcdir)/m4/ntp_harden.m4 $(top_srcdir)/m4/ntp_ipv6.m4 \
@@ -293,6 +294,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
diff --git a/contrib/ntp/sntp/include/copyright.def b/contrib/ntp/sntp/include/copyright.def
index c93887e2cdae..137ff6df4664 100644
--- a/contrib/ntp/sntp/include/copyright.def
+++ b/contrib/ntp/sntp/include/copyright.def
@@ -1,7 +1,7 @@
/* -*- Mode: Text -*- */
copyright = {
- date = "1992-2023";
+ date = "1992-2024";
owner = "The University of Delaware and Network Time Foundation";
eaddr = "https://bugs.ntp.org, bugs@ntp.org";
type = ntp;
diff --git a/contrib/ntp/sntp/include/version.def b/contrib/ntp/sntp/include/version.def
index bba075cfff5f..64683799012a 100644
--- a/contrib/ntp/sntp/include/version.def
+++ b/contrib/ntp/sntp/include/version.def
@@ -1 +1 @@
-version = '4.2.8p17';
+version = '4.2.8p18';
diff --git a/contrib/ntp/sntp/include/version.texi b/contrib/ntp/sntp/include/version.texi
index eaead228a2d3..be3254dadc0b 100644
--- a/contrib/ntp/sntp/include/version.texi
+++ b/contrib/ntp/sntp/include/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 06 June 2023
-@set EDITION 4.2.8p17
-@set VERSION 4.2.8p17
+@set UPDATED 25 May 2024
+@set EDITION 4.2.8p18
+@set VERSION 4.2.8p18
diff --git a/contrib/ntp/sntp/invoke-sntp.texi b/contrib/ntp/sntp/invoke-sntp.texi
index 4c03b3a498f3..4abdd3b00ff2 100644
--- a/contrib/ntp/sntp/invoke-sntp.texi
+++ b/contrib/ntp/sntp/invoke-sntp.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:36:12 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:02:28 AM by AutoGen 5.18.16
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -101,7 +101,7 @@ with a status code of 0.
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p17
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p18
Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/sntp/libevent/Makefile.in b/contrib/ntp/sntp/libevent/Makefile.in
index 6a285613eace..2429f95d355d 100644
--- a/contrib/ntp/sntp/libevent/Makefile.in
+++ b/contrib/ntp/sntp/libevent/Makefile.in
@@ -935,7 +935,10 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
+LIBEVENT_CPPFLAGS = @LIBEVENT_CPPFLAGS@
LIBEVENT_GC_SECTIONS = @LIBEVENT_GC_SECTIONS@
+LIBEVENT_LDFLAGS = @LIBEVENT_LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff --git a/contrib/ntp/sntp/libevent/configure b/contrib/ntp/sntp/libevent/configure
index c497e6dfd28c..c212b0001057 100755
--- a/contrib/ntp/sntp/libevent/configure
+++ b/contrib/ntp/sntp/libevent/configure
@@ -703,6 +703,9 @@ DX_ENV
DX_DOCDIR
DX_CONFIG
DX_PROJECT
+LIBEVENT_LDFLAGS
+LIBEVENT_CPPFLAGS
+LIBEVENT_CFLAGS
INSTALL_LIBEVENT_FALSE
INSTALL_LIBEVENT_TRUE
LIBEVENT_GC_SECTIONS
@@ -15135,7 +15138,6 @@ then :
LIBS="-lws2_32 $LIBS"
fi
-ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main
fi
@@ -17811,6 +17813,10 @@ else
fi
+
+
+
+
# Doxygen support
diff --git a/contrib/ntp/sntp/libevent/configure.ac b/contrib/ntp/sntp/libevent/configure.ac
index d00e063a1474..6c2646c219de 100644
--- a/contrib/ntp/sntp/libevent/configure.ac
+++ b/contrib/ntp/sntp/libevent/configure.ac
@@ -348,7 +348,7 @@ AM_CONDITIONAL(BUILD_MIDIPIX, test x$midipix = xtrue)
AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue || test x$midipix = xtrue)
if test x$bwin32 = xtrue; then
- AC_HAVE_LIBRARY([ws2_32])
+ AC_CHECK_LIB([ws2_32], [main])
fi
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -989,6 +989,11 @@ AC_SUBST([LIBEVENT_GC_SECTIONS])
AM_CONDITIONAL([INSTALL_LIBEVENT], [test "$enable_libevent_install" = "yes"])
+dnl Aloow addtional flags from a containing package such as NTP
+AC_SUBST([LIBEVENT_CFLAGS])
+AC_SUBST([LIBEVENT_CPPFLAGS])
+AC_SUBST([LIBEVENT_LDFLAGS])
+
# Doxygen support
DX_HTML_FEATURE(ON)
DX_MAN_FEATURE(OFF)
diff --git a/contrib/ntp/sntp/libevent/kqueue.c b/contrib/ntp/sntp/libevent/kqueue.c
index dfd7751d6497..14a8946fe99d 100644
--- a/contrib/ntp/sntp/libevent/kqueue.c
+++ b/contrib/ntp/sntp/libevent/kqueue.c
@@ -346,7 +346,7 @@ kq_dispatch(struct event_base *base, struct timeval *tv)
* on FreeBSD. */
case EINVAL:
continue;
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && defined(ENOTCAPABLE)
/*
* This currently occurs if an FD is closed
* before the EV_DELETE makes it out via kevent().
diff --git a/contrib/ntp/sntp/libevent/m4/acx_pthread.m4 b/contrib/ntp/sntp/libevent/m4/acx_pthread.m4
index d2b116945f9f..92ac1089b4ee 100644
--- a/contrib/ntp/sntp/libevent/m4/acx_pthread.m4
+++ b/contrib/ntp/sntp/libevent/m4/acx_pthread.m4
@@ -86,7 +86,7 @@
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
-AC_LANG_C
+AC_LANG([C])
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
diff --git a/contrib/ntp/sntp/libopts/Makefile.am b/contrib/ntp/sntp/libopts/Makefile.am
index 7490a75e6ca5..72e9dc44760e 100644
--- a/contrib/ntp/sntp/libopts/Makefile.am
+++ b/contrib/ntp/sntp/libopts/Makefile.am
@@ -6,7 +6,6 @@ else
noinst_LTLIBRARIES = libopts.la
endif
libopts_la_SOURCES = libopts.c
-libopts_la_CPPFLAGS = -I$(srcdir)
libopts_la_LDFLAGS = -version-info 42:1:17
EXTRA_DIST =
@@ -14,8 +13,7 @@ BUILT_SOURCES =
MOSTLYCLEANFILES =
AM_CFLAGS = $(NTP_HARD_CFLAGS) $(CC_NOFORMAT)
-AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS)
-AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
+AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS) -I$(top_srcdir)/../include
libopts.c: $(BUILT_SOURCES)
@: do-nothing rule to avoid default SCCS get
diff --git a/contrib/ntp/sntp/libopts/Makefile.in b/contrib/ntp/sntp/libopts/Makefile.in
index 448142558e46..1bb5ff038b76 100644
--- a/contrib/ntp/sntp/libopts/Makefile.in
+++ b/contrib/ntp/sntp/libopts/Makefile.in
@@ -98,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_cacheversion.m4 \
$(top_srcdir)/m4/ntp_compiler.m4 \
$(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
$(top_srcdir)/m4/ntp_facilitynames.m4 \
$(top_srcdir)/m4/ntp_harden.m4 $(top_srcdir)/m4/ntp_ipv6.m4 \
@@ -153,7 +154,7 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libopts_la_LIBADD =
-am_libopts_la_OBJECTS = libopts_la-libopts.lo
+am_libopts_la_OBJECTS = libopts.lo
libopts_la_OBJECTS = $(am_libopts_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -179,7 +180,7 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/libopts_la-libopts.Plo
+am__depfiles_remade = ./$(DEPDIR)/libopts.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -372,6 +373,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
@@ -464,7 +466,6 @@ MAINTAINERCLEANFILES = Makefile.in
@INSTALL_LIBOPTS_TRUE@lib_LTLIBRARIES = libopts.la
@INSTALL_LIBOPTS_FALSE@noinst_LTLIBRARIES = libopts.la
libopts_la_SOURCES = libopts.c
-libopts_la_CPPFLAGS = -I$(srcdir)
libopts_la_LDFLAGS = -version-info 42:1:17
EXTRA_DIST = _Noreturn.h stdnoreturn.in.h COPYING.gplv3 COPYING.lgplv3 \
COPYING.mbsd MakeDefs.inc README _Noreturn.h ag-char-map.h \
@@ -484,8 +485,7 @@ EXTRA_DIST = _Noreturn.h stdnoreturn.in.h COPYING.gplv3 COPYING.lgplv3 \
BUILT_SOURCES = $(STDNORETURN_H)
MOSTLYCLEANFILES = stdnoreturn.h stdnoreturn.h-t
AM_CFLAGS = $(NTP_HARD_CFLAGS) $(CC_NOFORMAT)
-AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS)
-AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
+AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS) -I$(top_srcdir)/../include
# Makefile fragment from gnulib-s stdnoreturn module:
#
@@ -580,7 +580,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts_la-libopts.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts.Plo@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@@ -612,13 +612,6 @@ am--depfiles: $(am__depfiles_remade)
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-libopts_la-libopts.lo: libopts.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopts_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libopts_la-libopts.lo -MD -MP -MF $(DEPDIR)/libopts_la-libopts.Tpo -c -o libopts_la-libopts.lo `test -f 'libopts.c' || echo '$(srcdir)/'`libopts.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libopts_la-libopts.Tpo $(DEPDIR)/libopts_la-libopts.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libopts.c' object='libopts_la-libopts.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopts_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libopts_la-libopts.lo `test -f 'libopts.c' || echo '$(srcdir)/'`libopts.c
-
mostlyclean-libtool:
-rm -f *.lo
@@ -758,7 +751,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-am
- -rm -f ./$(DEPDIR)/libopts_la-libopts.Plo
+ -rm -f ./$(DEPDIR)/libopts.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -804,7 +797,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -f ./$(DEPDIR)/libopts_la-libopts.Plo
+ -rm -f ./$(DEPDIR)/libopts.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/contrib/ntp/sntp/m4/ntp_compiler.m4 b/contrib/ntp/sntp/m4/ntp_compiler.m4
index ddce106fe522..7a00e64c8439 100644
--- a/contrib/ntp/sntp/m4/ntp_compiler.m4
+++ b/contrib/ntp/sntp/m4/ntp_compiler.m4
@@ -1,17 +1,10 @@
dnl ######################################################################
dnl Common m4sh code for compiler stuff
AC_DEFUN([NTP_COMPILER], [
+AC_REQUIRE([AC_PROG_CC_STDC])
AC_USE_SYSTEM_EXTENSIONS
-# Ralf Wildenhues: With per-target flags we need CC_C_O
-# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
-AM_PROG_CC_C_O
-AC_PROG_GCC_TRADITIONAL
-AC_REQUIRE([AC_PROG_CC_STDC])
-dnl AC_REQUIRE([AC_PROG_CC_C89])
-dnl AC_REQUIRE([AC_PROG_CC_C99])
-
CC_NOFORMAT=
CFLAGS_NTP=
CPPFLAGS_NTP=
@@ -104,13 +97,15 @@ case "$GCC" in
]
)
#
+ # $ntp_cv_gcc_Winit_self is tested later to add the
+ # flag to CFLAGS_NTP.
+ #
# libopts specifically builds a string with embedded NULs.
# This causes a bunch of distracting warnings due to -Wformat.
- # Let's see if we can figure out how to disable these.
#
- CFLAGS="$SAVED_CFLAGS -Wno-format"
+ CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
AC_CACHE_CHECK(
- [if $CC can handle -Wno-format],
+ [if $CC can handle -Wno-format -Wno-format-security],
[ntp_cv_gcc_Wno_format],
[
AC_COMPILE_IFELSE(
@@ -120,35 +115,44 @@ case "$GCC" in
)
]
)
-
case "$ntp_cv_gcc_Wno_format" in
+ no) ntp_cv_gcc_Wno_format_truncation=no
+ ;;
yes)
- CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
- ;;
- no)
- ;;
+ CC_NOFORMAT="-Wno-format -Wno-format-security"
+ CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror"
+ AC_CACHE_CHECK(
+ [if $CC can handle -Wformat -Wno-format-truncation],
+ [ntp_cv_gcc_Wno_format_truncation],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [ntp_cv_gcc_Wno_format_truncation=yes],
+ [ntp_cv_gcc_Wno_format_truncation=no]
+ ) ]
+ )
+ #
+ # $ntp_cv_gcc_Wno_format_truncation is tested later to add the
+ # flag to CFLAGS.
+ #
esac
CFLAGS="$SAVED_CFLAGS"
AS_UNSET([SAVED_CFLAGS])
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS_NTP.
- #
+
AC_CACHE_CHECK(
[if linker supports omitting unused code and data],
[ntp_cv_gc_sections_runs],
[
- dnl NetBSD will link but likely not run with --gc-sections
- dnl http://bugs.ntp.org/1844
- dnl http://gnats.netbsd.org/40401
- dnl --gc-sections causes attempt to load as linux elf, with
- dnl wrong syscalls in place. Test a little gauntlet of
- dnl simple stdio read code checking for errors, expecting
- dnl enough syscall differences that the NetBSD code will
- dnl fail even with Linux emulation working as designed.
- dnl A shorter test could be refined by someone with access
- dnl to a NetBSD host with Linux emulation working.
+ # NetBSD will link but likely not run with --gc-sections
+ # http://bugs.ntp.org/1844
+ # http://gnats.netbsd.org/40401
+ # --gc-sections causes attempt to load as linux elf, with
+ # wrong syscalls in place. Test a little gauntlet of
+ # simple stdio read code checking for errors, expecting
+ # enough syscall differences that the NetBSD code will
+ # fail even with Linux emulation working as designed.
+ # A shorter test could be refined by someone with access
+ # to a NetBSD host with Linux emulation working.
origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
AC_LINK_IFELSE(
@@ -223,6 +227,10 @@ case "$GCC" in
yes)
CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
esac
+ case "$ntp_cv_gcc_Wno_format_truncation" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation"
+ esac
# -W[no-]strict-prototypes might be added by NTP_OPENSSL
esac
diff --git a/contrib/ntp/sntp/m4/ntp_crypto_rand.m4 b/contrib/ntp/sntp/m4/ntp_crypto_rand.m4
index 9d554226f44c..391f1cbd5992 100644
--- a/contrib/ntp/sntp/m4/ntp_crypto_rand.m4
+++ b/contrib/ntp/sntp/m4/ntp_crypto_rand.m4
@@ -25,15 +25,15 @@ dnl if that's not specified:
dnl - Look for RAND_poll and RAND_bytes
dnl - if they exist, define USE_OPENSSL_CRYPTO_RAND
-AC_MSG_CHECKING([if we want to use OpenSSL's crypto random (if available)])
+AC_MSG_CHECKING([if we want to use SSL library's secure random numbers])
AC_ARG_ENABLE(
[openssl-random],
[AS_HELP_STRING(
[--enable-openssl-random],
- [Use OpenSSL's crypto random number functions, if available (default is yes)]
+ [+ Use SSL lib's secure random numbers]
)],
- [ntp_use_openssl_random=$enableval],
- [ntp_use_openssl_random=yes]
+ [ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval],
+ [ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no]
)
AC_MSG_RESULT([$ntp_use_openssl_random])
@@ -45,10 +45,33 @@ AC_CHECK_FUNCS([RAND_bytes RAND_poll])
LIBS="$NTPO_SAVED_LIBS"
case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
yesyesyesyes)
- AC_DEFINE([USE_OPENSSL_CRYPTO_RAND], [1], [Use OpenSSL's crypto random functions])
- ;;
- *) ntp_use_openssl_random=no ;;
+ AC_MSG_NOTICE([Using SSL library's secure random number generator])
+ AC_DEFINE([USE_OPENSSL_CRYPTO_RAND], [1], [Use OpenSSL's crypto random functions])
+ ;;
+ *)
+ ntp_use_openssl_random=no
+ AC_MSG_NOTICE([SSL library's secure random number generator unavailable.])
+ case "$ntp_ssl_random_mandatory" in
+ yes)
+ AC_MSG_ERROR(
+[No suitable SSL library was found and
+--enable-openssl-random was given.. Remove --enable-openssl-random
+if you wish to build without a cryptographically secure random number
+generator.
+
+WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.]
+ )
+ ;;
+ *)
+ AC_MSG_WARN(
+[WARNING: Use of ntp-keygen without a secure RNG may generate
+------- keys that are predictable.]
+ )
+ esac
esac
+AS_UNSET([ntp_ssl_random_mandatory])
+
]) dnl NTP_CRYPTO_RAND
diff --git a/contrib/ntp/sntp/m4/ntp_facilitynames.m4 b/contrib/ntp/sntp/m4/ntp_facilitynames.m4
index f58f8943890d..5b79fafe363e 100644
--- a/contrib/ntp/sntp/m4/ntp_facilitynames.m4
+++ b/contrib/ntp/sntp/m4/ntp_facilitynames.m4
@@ -1,24 +1,31 @@
dnl ######################################################################
dnl Check syslog.h for 'facilitynames' table
AC_DEFUN([NTP_FACILITYNAMES], [
-AC_CACHE_CHECK([for facilitynames in syslog.h],ac_cv_HAVE_SYSLOG_FACILITYNAMES,[
-AC_TRY_COMPILE([
-#define SYSLOG_NAMES
-#include <stdlib.h>
-#include <syslog.h>
-],
-[ void *fnames; fnames = facilitynames; ],
-ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes,ac_cv_HAVE_SYSLOG_FACILITYNAMES=no,ac_cv_HAVE_SYSLOG_FACILITYNAMES=cross)])
+
+AC_CACHE_CHECK(
+ [for facilitynames in syslog.h],
+ [ac_cv_HAVE_SYSLOG_FACILITYNAMES],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #define SYSLOG_NAMES
+ #include <stdlib.h>
+ #include <syslog.h>
+ ]],
+ [[
+ void *fnames = facilitynames;
+ ]]
+ )]
+ [ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes],
+ [ac_cv_HAVE_SYSLOG_FACILITYNAMES=no]
+ )]
+)
case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
yes)
- AC_DEFINE(HAVE_SYSLOG_FACILITYNAMES,1,[ ])
+ AC_DEFINE([HAVE_SYSLOG_FACILITYNAMES], [1], [syslog.h provides facilitynames])
;;
no)
AC_MSG_WARN([No facilitynames in <syslog.h>])
- ;;
- cross)
- AC_MSG_WARN([facilitynames in <syslog.h> - cross-compiling])
- ;;
esac
])
dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/ntp_libevent.m4 b/contrib/ntp/sntp/m4/ntp_libevent.m4
index 14b614b465a3..451eac58fb06 100644
--- a/contrib/ntp/sntp/m4/ntp_libevent.m4
+++ b/contrib/ntp/sntp/m4/ntp_libevent.m4
@@ -74,7 +74,6 @@ case "$ntp_use_local_libevent" in
*) # If we have (a good enough) pkg-config, see if it can find libevent
case "$PKG_CONFIG" in
/*)
- AC_MSG_CHECKING([if libevent $ntp_libevent_min_version or later is installed])
if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
then
ntp_use_local_libevent=no
@@ -83,6 +82,7 @@ case "$ntp_use_local_libevent" in
*.*) ;;
*) ntp_libevent_version='(unknown)' ;;
esac
+ AC_MSG_CHECKING([if libevent $ntp_libevent_min_version or later is installed])
AC_MSG_RESULT([yes, version $ntp_libevent_version])
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
@@ -116,6 +116,7 @@ case "$ntp_use_local_libevent" in
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
+ AC_MSG_CHECKING([if libevent $ntp_libevent_min_version or later is installed])
AC_MSG_RESULT([no])
fi
;;
@@ -181,14 +182,15 @@ case "$ntp_use_local_libevent" in
dnl User-supplied contradictory choices should prevail thanks to
dnl "last wins".
ac_configure_args=" --disable-openssl${ac_configure_args}"
+ ac_configure_args=" --disable-samples${ac_configure_args}"
ac_configure_args=" --disable-shared${ac_configure_args}"
ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
ac_configure_args=" --disable-libevent-install${ac_configure_args}"
ac_configure_args=" --enable-silent-rules${ac_configure_args}"
ac_configure_args=" --enable-function-sections${ac_configure_args}"
- ac_configure_args=" LEP_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
- ac_configure_args=" LEP_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
- ac_configure_args=" LEP_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
+ ac_configure_args=" LIBEVENT_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
+ ac_configure_args=" LIBEVENT_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
+ ac_configure_args=" LIBEVENT_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
AC_CONFIG_SUBDIRS([libevent])
;;
*)
diff --git a/contrib/ntp/sntp/m4/ntp_libntp.m4 b/contrib/ntp/sntp/m4/ntp_libntp.m4
index 21d0cff82c07..e0cc2169aa59 100644
--- a/contrib/ntp/sntp/m4/ntp_libntp.m4
+++ b/contrib/ntp/sntp/m4/ntp_libntp.m4
@@ -8,12 +8,13 @@ dnl subpackage while retaining access to such test results.
dnl
AC_DEFUN([NTP_LIBNTP], [
+AC_REQUIRE([AC_PROG_SED])
AC_REQUIRE([NTP_CROSSCOMPILE])
# HMS: Save $LIBS and empty it.
# any LIBS we add here should go in to LDADD_LIBNTP
AC_SUBST([LDADD_LIBNTP])
-__LIBS=$LIBS
+SAVED_LIBS=$LIBS
LIBS=
dnl The contents of NTP_PROG_CC used to be here...
@@ -267,7 +268,7 @@ case "$ac_cv_c_inline" in
AC_SUBST([HAVE_INLINE])
esac
-AC_HEADER_TIME
+
AC_CHECK_SIZEOF([time_t])
AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
AC_CHECK_SIZEOF([signed char])
@@ -490,7 +491,10 @@ AC_DEFUN([NTP_BEFORE_HW_FUNC_VSNPRINTF], [
AC_BEFORE([$0], [HW_FUNC_SNPRINTF])dnl
AC_ARG_ENABLE(
[c99-snprintf],
- [AS_HELP_STRING([--enable-c99-snprintf], [s force replacement])],
+ [AS_HELP_STRING(
+ [--enable-c99-snprintf],
+ [s use replacement printf family]
+ )],
[force_c99_snprintf=$enableval],
[force_c99_snprintf=no]
)
@@ -501,15 +505,8 @@ AC_DEFUN([NTP_BEFORE_HW_FUNC_VSNPRINTF], [
esac
AH_VERBATIM(
[snprinte],dnl sorted in config.h just before #define snprintf
- [
- #if !defined(_KERNEL) && !defined(PARSESTREAM)
- /*
- * stdio.h must be included after _GNU_SOURCE is defined
- * but before #define snprintf rpl_snprintf
- */
- # include <stdio.h>
- #endif
- ])
+ [#include "c99_snprintf.h"]
+ )
AH_BOTTOM([
#if !defined(_KERNEL) && !defined(PARSESTREAM)
# if defined(HW_WANT_RPL_VSNPRINTF)
@@ -752,62 +749,6 @@ typedef unsigned int uintptr_t;
#define HAVE_UINTPTR_T 1
#endif])
-case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
- no::yes)
- AC_CACHE_CHECK(
- [for int32 with DNS headers included],
- [ntp_cv_type_int32_with_dns],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
- ]],
- [[
- size_t cb = sizeof(int32);
- ]]
- )],
- [ntp_cv_type_int32_with_dns=yes],
- [ntp_cv_type_int32_with_dns=no]
- )]
- )
- case "$ntp_cv_type_int32_with_dns" in
- yes)
- AC_DEFINE([HAVE_INT32_ONLY_WITH_DNS], [1],
- [int32 type in DNS headers, not others.])
- esac
-esac
-
-case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
- no::yes)
- AC_CACHE_CHECK(
- [for u_int32 with DNS headers included],
- [ntp_cv_type_u_int32_with_dns],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- #include <resolv.h>
- ]],
- [[
- size_t cb = sizeof(u_int32);
- ]]
- )],
- [ntp_cv_type_u_int32_with_dns=yes],
- [ntp_cv_type_u_int32_with_dns=no]
- )]
- )
- case "$ntp_cv_type_u_int32_with_dns" in
- yes)
- AC_DEFINE([HAVE_U_INT32_ONLY_WITH_DNS], [1],
- [u_int32 type in DNS headers, not others.])
- esac
-esac
-
AC_CHECK_HEADERS(
[sys/timepps.h],
[],
@@ -1176,11 +1117,19 @@ case "$ntp_warning" in
;;
esac
+dnl Do not ensure libntp.a is up to date when building client directories
+dnl if --disable-dependency-tracking is used to save build time for one-off
+dnl build from tarball. It's only useful when modifying libntp source code
+dnl and rebuilding in a client subdir rather than the whole package.
+AM_CONDITIONAL([LIBNTP_SUBMAKES], [test x"$enable_dependency_tracking" = x"yes"])
+
+NTP_OPENSSL
+NTP_CRYPTO_RAND
dnl add to LDADD_LIBNTP set by ntp_compiler.m4
LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
-LIBS=$__LIBS
-AS_UNSET([__LIBS])
+LIBS=$SAVED_LIBS
+AS_UNSET([SAVED_LIBS])
])dnl
dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/ntp_openssl.m4 b/contrib/ntp/sntp/m4/ntp_openssl.m4
index 2f9d6c4318ad..74cfdf08b749 100644
--- a/contrib/ntp/sntp/m4/ntp_openssl.m4
+++ b/contrib/ntp/sntp/m4/ntp_openssl.m4
@@ -2,18 +2,22 @@ dnl ####################################################################
dnl OpenSSL support shared by top-level and sntp/configure.ac
dnl
dnl Provides command-line option --with-crypto, as well as deprecated
-dnl options --with-openssl-incdir, --with-openssl-libdir, and the
-dnl latter's suboption --with-rpath.
+dnl options --with-openssl-incdir, --with-openssl-libdir..
dnl
-dnl Specifying --with-openssl-libdir or --with-openssl-incdir causes any
-dnl pkg-config openssl information to be ignored in favor of the legacy
-dnl manual search for directories and specified library names.
+dnl Specifying --with-openssl-libdir or --with-openssl-incdir skips
+dnl pkg-config search.
+dnl
+dnl In the past, use of crypto would be silently disabled if the needed
+dnl headers and library were not found. Now --without-crypto must be
+dnl used or configure will fail with an error. It is now uncommon
+dnl to want to build ntpd without crypto, so don't be quiet about it.
dnl
dnl Output AC_DEFINEs (for config.h)
dnl OPENSSL defined only if using OpenSSL
dnl
dnl Output variables:
dnl ntp_openssl yes if using OpenSSL, no otherwise
+dnl VER_SUFFIX "o" if using OpenSSL
dnl
dnl Output substitutions:
dnl CFLAGS_NTP OpenSSL-specific flags added as needed, and
@@ -22,19 +26,29 @@ dnl trigger a flood of warnings for each file
dnl including OpenSSL headers.
dnl CPPFLAGS_NTP OpenSSL -Iincludedir flags added as needed.
dnl LDADD_NTP OpenSSL -L and -l flags added as needed.
-dnl LDFLAGS_NTP Other OpenSSL link flags added as needed.
+dnl LDFLAGS_NTP OpenSSL runpath flags as needed.
dnl
dnl ####################################################################
+dnl
AC_DEFUN([NTP_OPENSSL], [
+AC_REQUIRE([AC_PROG_SED])dnl
AC_REQUIRE([NTP_PKG_CONFIG])dnl
AC_REQUIRE([NTP_VER_SUFFIX])dnl
+AC_REQUIRE([NTP_OPENSSL_VERBOSE_MSG])dnl
AC_ARG_WITH(
[crypto],
[AS_HELP_STRING(
[--with-crypto],
[+ =openssl,libcrypto]
- )]
+ )],
+ [ dnl if given
+ case "$with_crypto" in
+ yes)
+ with_crypto=openssl,libcrypto
+ esac
+ ],
+ [with_crypto=openssl,libcrypto] dnl if not given
)
AC_ARG_WITH(
[openssl-libdir],
@@ -47,42 +61,180 @@ AC_ARG_WITH(
[openssl-incdir],
[AS_HELP_STRING(
[--with-openssl-incdir],
- [+ =/something/reasonable]
+ [+ =search likely dirs]
)]
)
-AC_ARG_WITH(
- [rpath],
+AC_ARG_ENABLE(
+ [verbose-ssl],
[AS_HELP_STRING(
- [--without-rpath],
- [s Disable auto-added -R linker paths]
- )]
+ [--enable-verbose-ssl],
+ [- show crypto lib detection details]
+ )],
+ [],
+ [enable_verbose_ssl=no] dnl default to quiet
)
ntp_openssl=no
ntp_openssl_from_pkg_config=no
+ntp_ssl_incdir=
+ntp_ssl_cflags=
+ntp_ssl_cppflags=
+ntp_ssl_libdir=
+ntp_ssl_libs_L=
+ntp_ssl_libs_l=
+ntp_ssl_libs=
+ntp_ssl_ldflags=
-with_crypto=${with_crypto:-openssl,libcrypto}
-case "$with_crypto" in
- yes)
- with_crypto=openssl,libcrypto
-esac
+NTPSSL_SAVED_CFLAGS="$CFLAGS"
+NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS"
+NTPSSL_SAVED_LIBS="$LIBS"
+NTPSSL_SAVED_LDFLAGS="$LDFLAGS"
-dnl AC_MSG_NOTICE(['%with_crypto:%{PKG_CONFIG:+notempty}:%{with_openssl_libdir-notgiven}:%{with_openssl_incdir-notgiven}'])
-dnl str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
-dnl AC_MSG_NOTICE([$str])
+AC_PATH_PROG([PATH_OPENSSL], [openssl])
+str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
+NTP_OPENSSL_VERBOSE_MSG([$str])
+AS_UNSET([str])
+
+# Make sure neither/both --with_openssl-{inc,lib}dir are given
+case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ notgiven:notgiven) ;;
+ *notgiven*)
+ AC_MSG_ERROR([only one of --with-openssl-{inc,lib}dir=... given - provide both or neither])
+ ;;
+esac
+
+# HMS: Today there are only 2 case options. We probably want a third
+# *:*:notgiven:notgiven
+# and in that case we would validate the path in PKG_CONFIG_PATH.
+# Unless we can do it with 2 cases, where the 2nd case is *:*:...
+# and we do a reality check on execpath and the headers/libraries.
+#
+##
+# if $with_crypto is not "no":
+# if --with-openssl-{inc,lib}dir are not given:
+# we should use pkg-config to find openssl
+# if we don't have pkg-config, if openssl is in the base OS, use that.
+##
case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
no:*) ;;
*:notempty:notgiven:notgiven)
- for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
+ # If PKG_CONFIG is notempty and we haven't been given openssl paths,
+ # then let's make sure that the openssl executable's path corresponds
+ # to the path in openssl.pc, and 'openssl version' matches the Version
+ # in openssl.pc. If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH,
+ # then should we reality check them?
+ ## INCPATH
+ # harlan@ntp-testbuild.tal1> openssl version
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/*
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ## LIBPATH
+ # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.*
+ # /ntpbuild/lib/libcrypto.a /ntpbuild/lib/libcrypto.so.1.1*
+ # /ntpbuild/lib/libcrypto.so@
+ # harlan@ntp-testbuild.tal1>
+ ##
+ # Having said this, do we really care if the openssl executable that
+ # we have found is matched with the INCPATH and LIBPATH?
+ # One answer: Probably not, but we should complain on a mismatch as
+ # otherwise runtime differences could easily cause problems/drama.
+
+ ##BO
+ # ntp_cv_build_framework_help=yes
+ save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
+ case "$pkg" in
+ openssl)
+ if $PKG_CONFIG --exists $pkg ; then
+ # Found it - yay
+ # Do we want to check we found the right one?
+ # --modver
+ # --variable={libdir,includedir} (varname)
+ overf=`openssl version`
+ overs=`echo $overf | awk '{print $2}'`
+ case "$overs" in
+ 0.*) ;; # Should we squawk?
+ 1.0.*) ;; # Should we squawk?
+ 1.1.*) ;; # Should we squawk?
+ 3.*)
+ oinc=`openssl --variable=includedir`
+ olib=`openssl --variable=libdir`
+ # How should we use these?
+ ;;
+ *) ;; # Should we squawk?
+ esac
+ # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # grep 1.1.1t /ntpbuild/lib/libcrypto.a
+ # strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1>
+ # which should match $overf
+ ##
+ # harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t 7 Feb 2023"' | cut -f 2 -d\"
+ # OpenSSL 1.1.1t 7 Feb 2023
+ # harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h
+ # # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023"
+ # harlan@ntp-testbuild.tal1>
+ ##
+
+ else
+ # This is a hack, but it's reasonable.
+ pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig"
+ test -d "$pkgpath" || pkgpath=
+ # echo "pkgpath is <$pkgpath>"
+ # echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>"
+ case "$pkgpath" in
+ '') ;; # Nothing to see here...
+ *) case ":$PKG_CONFIG_PATH:" in
+ ::)
+ PKG_CONFIG_PATH=$pkgpath
+ export PKG_CONFIG_PATH
+ ;;
+ *:$pkgpath:*)
+ # Already there...
+ ;;
+ *)
+ PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH"
+ export PKG_CONFIG_PATH
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ done
+ ##EO
+
+ for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
AC_MSG_CHECKING([pkg-config for $pkg])
if $PKG_CONFIG --exists $pkg ; then
- CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
- CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
- LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
- LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
- VER_SUFFIX=o
+ ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`"
+ case "$ntp_ssl_cppflags" in
+ '')
+ ntp_ssl_incdir='not needed'
+ ;;
+ *)
+ ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`"
+ esac
+ ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`"
+ ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`"
+ case "$ntp_ssl_libs_L" in
+ '')
+ ntp_ssl_libdir='not needed'
+ ;;
+ *)
+ ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`"
+ esac
+ ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`"
ntp_openssl=yes
ntp_openssl_from_pkg_config=yes
ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
@@ -96,184 +248,304 @@ case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${wit
fi
AC_MSG_RESULT([no])
done
+ AS_UNSET([pkg])
esac
-dnl AC_MSG_NOTICE([OpenSSL Phase I checks:])
-dnl AC_MSG_NOTICE([CPPFLAGS_NTP: $CPPFLAGS_NTP])
-dnl AC_MSG_NOTICE([CFLAGS_NTP: $CFLAGS_NTP])
-dnl AC_MSG_NOTICE([LDADD_NTP: $LDADD_NTP])
-dnl AC_MSG_NOTICE([LDFLAGS_NTP: $LDFLAGS_NTP])
-case "$with_crypto:$ntp_openssl" in
- no:*) ;;
- *:no)
- need_dash_r=
- need_dash_Wlrpath=
- case "${with_rpath-notgiven}" in
- yes)
- # Lame - what to do if we need -Wl... but not -R?
- need_dash_r=1
- ;;
- notgiven)
- case "$host" in
- *-*-linux*)
- # This may really only be true for gcc
- need_dash_Wlrpath=1
- ;;
- *-*-netbsd*)
- need_dash_r=1
- ;;
- *-*-solaris*)
- need_dash_r=1
- ;;
- esac
- ;;
- esac
-
- AC_MSG_CHECKING([for openssl library directory])
- with_openssl_libdir=${with_openssl_libdir-notgiven}
+case "$with_crypto" in
+ no) ;;
+ *)
case "$with_openssl_libdir" in
- notgiven)
- case "$build" in
- $host)
- with_openssl_libdir=default
- ;;
- *)
- with_openssl_libdir=no
- ;;
- esac
+ '') ;;
+ *)
+ ntp_ssl_libdir="$with_openssl_libdir"
+ ntp_ssl_libs_L="-L$with_openssl_libdir"
+ ntp_ssl_libs_l="-lcrypto"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
esac
- case "$with_openssl_libdir" in
- default)
- # Look in:
- with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
- with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
+ case "$with_openssl_incdir" in
+ '') ;;
+ *)
+ ntp_ssl_incdir="$with_openssl_incdir"
+ ntp_ssl_cppflags="-I$with_openssl_incdir"
esac
- case "$with_openssl_libdir" in
- no)
+esac
+
+NTP_OPENSSL_VERBOSE_MSG([OpenSSL Phase I checks:])
+NTP_OPENSSL_VERBOSE_MSG([CPPFLAGS_NTP: ($CPPFLAGS_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([CFLAGS_NTP: ($CFLAGS_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([LDADD_NTP: ($LDADD_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([LDFLAGS_NTP: ($LDFLAGS_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_incdir: ($ntp_ssl_incdir)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libdir: ($ntp_ssl_libdir)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_cflags: ($ntp_ssl_cflags)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_cppflags: ($ntp_ssl_cppflags)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libs_L: ($ntp_ssl_libs_L)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libs_l: ($ntp_ssl_libs_l)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libs: ($ntp_ssl_libs)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_ldflags: ($ntp_ssl_ldflags)])
+
+case "$with_crypto" in
+ no)
+ ntp_openssl=no
+ ;;
+ *)
+ ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ case "$ntp_ssl_libdir" in
+ '')
+ dnl ### set ntp_ssl_libdir ###
+
+ dnl unconventional, using AC_CHECK_LIB repeatedly, clear cached result.
+ AS_UNSET([ac_cv_lib_crypto_EVP_MD_CTX_new])
+ AC_MSG_NOTICE([Searching for libcrypto without -L])
+ AC_CHECK_LIB(
+ [crypto],
+ [EVP_MD_CTX_new],
+ [ntp_ssl_libdir='not needed']
+ )
+ dnl unconventional, using AC_CHECK_LIB repeatedly, clear cached result.
+ AS_UNSET([ac_cv_lib_crypto_EVP_MD_CTX_new])
+ esac
+ case "$ntp_ssl_libdir" in
+ '')
+ ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib"
+ ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64"
;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $with_openssl_libdir no
+ *)
+ ntp_ssl_libdir_search="$ntp_ssl_libdir"
+ esac
+ case $ntp_ssl_libdir_search in
+ 'not needed') ;;
+ *)
+ for i in $ntp_ssl_libdir_search not_found
do
- case "$host" in
- *-*-darwin*)
- test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
- ;;
+ case "$i" in
+ not_found) ;;
*)
- test -f $i/libcrypto.so -a -f $i/libssl.so && break
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
- ;;
+ AC_MSG_NOTICE([Searching for libcrypto in $i])
+ LIBS="-L$i $NTPSSL_SAVED_LIBS"
+ AC_CHECK_LIB(
+ [crypto],
+ [EVP_MD_CTX_new],
+ [break]
+ )
+ dnl unconventional, using AC_CHECK_LIB repeatedly, clear cached result.
+ AS_UNSET([ac_cv_lib_crypto_EVP_MD_CTX_new])
esac
done
- openssl_libdir=$i
- ;;
- esac
- AC_MSG_RESULT([$openssl_libdir])
- case "$openssl_libdir" in
- no)
- openssl_libdir=
- AC_MSG_WARN([libcrypto and libssl not found in any of $with_openssl_libdir])
+ ntp_ssl_libdir="$i"
+ ntp_ssl_libs_L="-L$i"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
+ LIBS="$NTPSSL_SAVED_LIBS"
+ case "$ntp_ssl_libdir" in
+ not_found)
+ AC_MSG_ERROR(
+[You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+--with-openssl-libdir=/some/path option to configure.
+libcrypto not found in any of the following directories:
+$ntp_ssl_libdir_search]
+ )
+ esac
+ AC_MSG_NOTICE([libcrypto found in $ntp_ssl_libdir])
esac
- AC_MSG_CHECKING([for openssl include directory])
- with_openssl_incdir=${with_openssl_incdir-notgiven}
- case "$with_openssl_incdir" in
- notgiven)
- # Look in:
- with_openssl_incdir="/usr/include /usr/sfw/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/include"
- with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
+ case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in
+ 'yes:not needed' | no:)
+ AC_MSG_NOTICE([Searching for openssl/evp.h without -I])
+ dnl force uncached AC_CHECK_HEADER
+ AS_UNSET([ac_cv_header_openssl_evp_h])
+ AC_CHECK_HEADER(
+ [openssl/evp.h],
+ [ntp_ssl_incdir='not needed']
+ )
esac
- case "$with_openssl_incdir" in
- no)
+ case "$ntp_ssl_incdir" in
+ 'not needed')
+ ntp_ssl_incdir_search="$ntp_ssl_incdir"
;;
- *) # look for openssl/evp.h:
- for i in $with_openssl_incdir no
- do
- test -f $i/openssl/evp.h && break
- done
- openssl_incdir=$i
- ;;
- esac
- AS_UNSET([i])
- AC_MSG_RESULT([$openssl_incdir])
- case "$openssl_incdir" in
- no)
- openssl_incdir=
- AC_MSG_WARN([did not find openssl/evp.h in any of $with_openssl_incdir])
- esac
- if test -z "$openssl_libdir" -o -z "$openssl_incdir"
- then
- ntp_openssl=no
- else
- ntp_openssl=yes
- VER_SUFFIX=o
- fi
- case "$ntp_openssl" in
- yes)
- # We have OpenSSL inc/lib dirs - use them.
- case "$openssl_incdir" in
- /usr/include)
+ *)
+ AC_MSG_NOTICE([Searching for openssl include directory])
+ case "$with_openssl_incdir" in
+ '')
+ case "$ntp_ssl_incdir" in
+ '')
+ ntp_ssl_incdir_search="/usr/include /usr/sfw/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include"
+ ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include"
+ ;;
+ *)
+ esac
;;
*)
- CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
- ;;
+ ntp_ssl_incdir_search="$with_openssl_incdir"
esac
- case "$openssl_libdir" in
- /usr/lib)
- ;;
+ case $ntp_ssl_incdir_search in
+ 'not needed') ;;
*)
- LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
- case "$need_dash_r" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
+ for i in $ntp_ssl_incdir_search
+ do
+ AC_MSG_NOTICE([Searching for openssl/evp.h in $i])
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i"
+ dnl force uncached AC_CHECK_HEADER
+ AS_UNSET([ac_cv_header_openssl_evp_h])
+ AC_CHECK_HEADER(
+ [openssl/evp.h],
+ [ntp_ssl_incdir="$i" ; break]
+ )
+ done
+ AS_UNSET([ac_cv_header_openssl_evp_h])
+ AS_UNSET([i])
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+ case "$ntp_ssl_incdir" in
+ '')
+ AC_MSG_ERROR(
+[You may want to use --without-crypto, or add
+openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
+-with-openssl-incdir=/some/path option to configure.
+No usable openssl/evp.h found in any of the following direcotries:
+$ntp_ssl_incdir_search]
+ )
esac
- case "$need_dash_Wlrpath" in
- 1)
- LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
- esac
- ;;
+ ntp_ssl_cppflags="-I$ntp_ssl_incdir"
+ AC_MSG_NOTICE([Found evp.h in $ntp_ssl_incdir/openssl])
esac
- LDADD_NTP="$LDADD_NTP -lcrypto"
esac
-esac
-
-AC_MSG_CHECKING([if we will use crypto])
-AC_MSG_RESULT([$ntp_openssl])
+ ntp_openssl=yes
+esac dnl building with SSL ($with_crypto not "no")
-case "$ntp_openssl" in
- yes)
- AC_CHECK_HEADERS([openssl/cmac.h openssl/hmac.h])
- AC_DEFINE([OPENSSL], [], [Use OpenSSL?])
- case "$VER_SUFFIX" in
- *o*) ;;
- *) AC_MSG_ERROR([OPENSSL set but no 'o' in VER_SUFFIX!]) ;;
- esac
+case "$ntp_openssl:$ntp_ssl_libdir" in
+ 'yes:not needed')
;;
-esac
+ yes:*)
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ dnl ### test if runpath is needed for crypto ###
+ AC_CACHE_CHECK(
+ [if crypto works without runpath],
+ [ntp_cv_ssl_without_runpath],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include "openssl/evp.h"
+ ]],
+ [[
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+ ]]
+ )],
+ [ntp_cv_ssl_without_runpath=yes],
+ [ntp_cv_ssl_without_runpath=no],
+ [ntp_cv_ssl_without_runpath=yes] dnl cross-compile
+ )]
+ )
+ case "$ntp_cv_ssl_without_runpath" in
+ no)
+ AC_CACHE_CHECK(
+ [if crypto needs -Wl,-rpath,$ntp_ssl_libdir],
+ [ntp_cv_ssl_needs_dashWl_rpath],
+ [
+ LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS"
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include "openssl/evp.h"
+ ]],
+ [[
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+ ]]
+ )],
+ [ntp_cv_ssl_needs_dashWl_rpath=yes],
+ [ntp_cv_ssl_needs_dashWl_rpath=no]
+ )
+ ]
+ )
+ case "$ntp_cv_ssl_needs_dashWl_rpath" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir"
+ ;;
+ no)
+ AC_CACHE_CHECK(
+ [if crypto needs -R$ntp_ssl_libdir],
+ [ntp_cv_ssl_needs_dashR],
+ [
+ LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include "openssl/evp.h"
+ ]],
+ [[
+ if (!EVP_MD_CTX_new()) {
+ return 1;
+ }
+ ]]
+ )],
+ [ntp_cv_ssl_needs_dashR=yes],
+ [ntp_cv_ssl_needs_dashR=no]
+ )
+ ]
+ )
+ case "$ntp_cv_ssl_needs_dashR" in
+ yes)
+ ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir"
+ esac
+ case "$build:$ntp_cv_ssl_needs_dashR" in
+ $host:no)
+ AC_MSG_FAILURE(
+[Unable to run program using crypto, check openssl.pc
+or libcrypto.pc are in PKG_CONFIG_PATH, or provide the
+ --with-openssl-libdir=/some/path option to configure.]
+ )
+ esac
+ esac
+ esac
+esac dnl ntp_openssl was yes
-NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
-NTPO_SAVED_LIBS="$LIBS"
+NTP_OPENSSL_VERBOSE_MSG([OpenSSL Phase II checks:])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_incdir: ($ntp_ssl_incdir)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libdir: ($ntp_ssl_libdir)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_cflags: ($ntp_ssl_cflags)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_cppflags: ($ntp_ssl_cppflags)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libs_L: ($ntp_ssl_libs_L)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libs_l: ($ntp_ssl_libs_l)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_libs: ($ntp_ssl_libs)])
+NTP_OPENSSL_VERBOSE_MSG([ntp_ssl_ldflags: ($ntp_ssl_ldflags)])
-#
-# check for linking with -lcrypto failure, and try -lcrypto -lz.
-# Helps m68k-atari-mint
-#
+dnl check for linking with -lcrypto failure, and try -lcrypto -lz.
+dnl Helps m68k-atari-mint
+dnl
+dnl Needs work with the changes to run-test whether runpath is needed.
+dnl Probably needs to be moved ahead of runpath testing.
+dnl hart@ is reaching out to MiNT users to try to find a tester.
+dnl Meanwhile can be forced by passing both ntp_cv_bare_lcrypto=no
+dnl and ntp_cv_lcrypto_lz=yes on the configure command line.
+dnl
case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
yes:no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
AC_CACHE_CHECK(
- [if linking with -lcrypto alone works],
+ [if linking with $ntp_ssl_libs_l alone works],
[ntp_cv_bare_lcrypto],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
- #include "openssl/err.h"
#include "openssl/evp.h"
]],
[[
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
+ EVP_MD_CTX_new();
]]
)],
[ntp_cv_bare_lcrypto=yes],
@@ -282,19 +554,17 @@ case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
)
case "$ntp_cv_bare_lcrypto" in
no)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
+ LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS"
AC_CACHE_CHECK(
- [if linking with -lcrypto -lz works],
+ [if linking with $ntp_ssl_libs_l -lz works],
[ntp_cv_lcrypto_lz],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
- #include "openssl/err.h"
#include "openssl/evp.h"
]],
[[
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
+ EVP_MD_CTX_new();
]]
)],
[ntp_cv_lcrypto_lz=yes],
@@ -303,103 +573,160 @@ case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
)
case "$ntp_cv_lcrypto_lz" in
yes)
- LDADD_NTP="$LDADD_NTP -lz"
+ ntp_ssl_libs_l="$ntp_ssl_libs_l -lz"
+ ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
esac
- esac
-esac
-
-#
-# Older OpenSSL headers have a number of callback prototypes inside
-# other function prototypes which trigger copious warnings with gcc's
-# -Wstrict-prototypes, which is included in -Wall.
-#
-# An example:
-#
-# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
-# int (*cb)(), int sgckey);
-# ^^^^^^^^^^^
-#
-#
-#
-openssl_triggers_warnings=unknown
-NTPO_SAVED_CFLAGS="$CFLAGS"
+ esac dnl linking with -lcrypto alone fails
+esac dnl using SSL and not from pkg-config
+dnl
+dnl Older OpenSSL headers have a number of callback prototypes inside
+dnl other function prototypes which trigger copious warnings with gcc's
+dnl -Wstrict-prototypes, which is included in -Wall.
+dnl
+dnl An example:
+dnl
+dnl int i2d_RSA_NET(const RSA *a, unsigned char **pp,
+dnl int (*cb)(), int sgckey);
+dnl ^^^^^^^^^^^
+dnl
case "$ntp_openssl:$GCC" in
yes:yes)
- CFLAGS="$CFLAGS -Werror"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- ]],
- [[
- /* see if -Werror breaks gcc */
- ]]
- )],
- [gcc_handles_Werror=yes],
- [gcc_handles_Werror=no]
+ CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror"
+ CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
+ LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
+ LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
+ AC_CACHE_CHECK(
+ [If $CC supports -Werror],
+ [ntp_cv_gcc_supports_Werror],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([], [])],
+ [ntp_cv_gcc_supports_Werror=yes],
+ [ntp_cv_gcc_supports_Werror=no]
+ )]
)
- case "$gcc_handles_Werror" in
+ case "ntp_cv_gcc_supports_Werror" in
no)
- # if this gcc doesn't do -Werror go ahead and use
- # -Wstrict-prototypes.
- openssl_triggers_warnings=yes
+ ntp_use_Wstrict_prototypes=yes
;;
yes)
CFLAGS="$CFLAGS -Wstrict-prototypes"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include "openssl/asn1_mac.h"
- #include "openssl/bn.h"
- #include "openssl/err.h"
- #include "openssl/evp.h"
- #include "openssl/pem.h"
- #include "openssl/rand.h"
- #include "openssl/x509v3.h"
- ]],
- [[
- /* empty body */
- ]]
- )],
- [openssl_triggers_warnings=no],
- [openssl_triggers_warnings=yes]
+ AC_CACHE_CHECK(
+ [if OpenSSL triggers warnings],
+ [ntp_cv_ssl_triggers_warnings],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include "openssl/asn1_mac.h"
+ #include "openssl/bn.h"
+ #include "openssl/err.h"
+ #include "openssl/evp.h"
+ #include "openssl/pem.h"
+ #include "openssl/rand.h"
+ #include "openssl/x509v3.h"
+ ]],
+ [[
+ /* empty body */
+ ]]
+ )],
+ [ntp_cv_ssl_triggers_warnings=no],
+ [ntp_cv_ssl_triggers_warnings=yes]
+ )]
)
+ case "$ntp_cv_ssl_triggers_warnings" in
+ yes)
+ ntp_use_Wstrict_prototypes=no
+ ;;
+ *)
+ ntp_use_Wstrict_prototypes=yes
+ esac
esac
- case "$openssl_triggers_warnings" in
- yes)
- CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
+ case "$ntp_use_Wstrict_prototypes" in
+ no)
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes"
;;
*)
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
esac
;;
no:yes)
- # gcc without OpenSSL
- CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
-esac
+ dnl gcc without OpenSSL
+ ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
+esac dnl checking for gcc problems with -Werror and -Wstrict-prototypes
-# Because we don't want -Werror for the EVP_MD_do_all_sorted check
-CFLAGS="$NTPO_SAVED_CFLAGS"
+AC_MSG_CHECKING([if we will link to ssl library])
+AC_MSG_RESULT([$ntp_openssl])
case "$ntp_openssl" in
yes)
- LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ VER_SUFFIX=o
+ AC_CHECK_HEADERS(
+ [openssl/cmac.h],
+ [ntp_enable_cmac=yes],
+ [ntp_enable_cmac=no]
+ )
+ case "$ntp_enable_cmac" in
+ yes)
+ AC_DEFINE([ENABLE_CMAC], [1], [Enable CMAC support?])
+ esac
+ AC_DEFINE([OPENSSL], [], [Use OpenSSL?])
+ dnl OpenSSL 3 deprecates a bunch of functions used by Autokey.
+ dnl Adapting our code to the bold new way is not a priority
+ dnl for us because we do not want to require OpenSSL 3 yet.
+ dnl The deprecation warnings clutter up the build output
+ dnl encouraging the habit of ignoring warnings.
+ dnl So, tell it to the hand, OpenSSL deprecation warnings...
+ AC_DEFINE([OPENSSL_SUPPRESS_DEPRECATED], [1],
+ [Suppress OpenSSL 3 deprecation warnings])
+ dnl We don't want -Werror for the EVP_MD_do_all_sorted check
+ CFLAGS="$NTPSSL_SAVED_CFLAGS"
AC_CHECK_FUNCS([EVP_MD_do_all_sorted])
- ;;
+ CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags"
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags"
+ LDADD_NTP="$ntp_ssl_libs $LDADD_NTP"
+ LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP"
esac
-dnl AC_MSG_NOTICE([OpenSSL final checks:])
-dnl AC_MSG_NOTICE([CPPFLAGS_NTP: $CPPFLAGS_NTP])
-dnl AC_MSG_NOTICE([CFLAGS_NTP: $CFLAGS_NTP])
-dnl AC_MSG_NOTICE([LDADD_NTP: $LDADD_NTP])
-dnl AC_MSG_NOTICE([LDFLAGS_NTP: $LDFLAGS_NTP])
+NTP_OPENSSL_VERBOSE_MSG([OpenSSL final checks:])
+NTP_OPENSSL_VERBOSE_MSG([ntp_openssl: $ntp_openssl])
+NTP_OPENSSL_VERBOSE_MSG([CPPFLAGS_NTP: ($CPPFLAGS_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([CFLAGS_NTP: ($CFLAGS_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([LDADD_NTP: ($LDADD_NTP)])
+NTP_OPENSSL_VERBOSE_MSG([LDFLAGS_NTP: ($LDFLAGS_NTP)])
+
+CFLAGS="$NTPSSL_SAVED_CFLAGS"
+CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
+LIBS="$NTPSSL_SAVED_LIBS"
+LDFLAGS="$NTPSSL_SAVED_LDFLAGS"
-CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
-LIBS="$NTPO_SAVED_LIBS"
-AS_UNSET([NTPO_SAVED_CFLAGS])
-AS_UNSET([NTPO_SAVED_CPPFLAGS])
-AS_UNSET([NTPO_SAVED_LIBS])
-AS_UNSET([openssl_triggers_warnings])
+AS_UNSET([NTPSSL_SAVED_CFLAGS])
+AS_UNSET([NTPSSL_SAVED_CPPFLAGS])
+AS_UNSET([NTPSSL_SAVED_LIBS])
+AS_UNSET([NTPSSL_SAVED_LDFLAGS])
+AS_UNSET([ntp_enable_cmac])
+AS_UNSET([ntp_use_Wstrict_prototypes])
AS_UNSET([ntp_openssl_from_pkg_config])
+AS_UNSET([ntp_openssl_version])
+AS_UNSET([ntp_ssl_cflags])
+AS_UNSET([ntp_ssl_cppflags])
+AS_UNSET([ntp_ssl_libdir_search])
+AS_UNSET([ntp_ssl_incdir_search])
+AS_UNSET([ntp_ssl_libdir])
+AS_UNSET([ntp_ssl_incdir])
+AS_UNSET([ntp_ssl_libs_l])
+AS_UNSET([ntp_ssl_libs_L])
+AS_UNSET([ntp_ssl_ldflags])
+
])
+dnl end of AC_DEFUN([NTP_OPENSSL])
+dnl
+AC_DEFUN(
+ [NTP_OPENSSL_VERBOSE_MSG],
+ [dnl
+ case "$enable_verbose_ssl" in
+ yes) AC_MSG_NOTICE([$1])
+ esac
+ ]
+)
+dnl
dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/version.m4 b/contrib/ntp/sntp/m4/version.m4
index 95deaa41c695..add8fc6018cb 100644
--- a/contrib/ntp/sntp/m4/version.m4
+++ b/contrib/ntp/sntp/m4/version.m4
@@ -1 +1 @@
-m4_define([VERSION_NUMBER],[4.2.8p17])
+m4_define([VERSION_NUMBER],[4.2.8p18])
diff --git a/contrib/ntp/sntp/main.c b/contrib/ntp/sntp/main.c
index 08064a6c0eaa..b1a35b42a431 100644
--- a/contrib/ntp/sntp/main.c
+++ b/contrib/ntp/sntp/main.c
@@ -1010,12 +1010,12 @@ kill_asyncio(
sock6 = INVALID_SOCKET;
}
if (INVALID_SOCKET != bsock4) {
- closesocket(sock4);
- sock4 = INVALID_SOCKET;
+ closesocket(bsock4);
+ bsock4 = INVALID_SOCKET;
}
if (INVALID_SOCKET != bsock6) {
- closesocket(sock6);
- sock6 = INVALID_SOCKET;
+ closesocket(bsock6);
+ bsock6 = INVALID_SOCKET;
}
}
#endif
@@ -1033,9 +1033,9 @@ worker_resp_cb(
{
blocking_child * c;
- DEBUG_INSIST(EV_READ & what);
+ REQUIRE(EV_READ & what);
c = ctx;
- DEBUG_INSIST(fd == c->resp_read_pipe);
+ INSIST(fd == c->resp_read_pipe);
process_blocking_resp(c);
}
@@ -1060,7 +1060,7 @@ intres_timeout_req(
ev_worker_timeout = event_new(base, -1,
EV_TIMEOUT | EV_PERSIST,
&worker_timeout, NULL);
- DEBUG_INSIST(NULL != ev_worker_timeout);
+ INSIST(NULL != ev_worker_timeout);
} else {
event_del(ev_worker_timeout);
}
@@ -1082,7 +1082,7 @@ worker_timeout(
UNUSED_ARG(fd);
UNUSED_ARG(ctx);
- DEBUG_REQUIRE(EV_TIMEOUT & what);
+ REQUIRE(EV_TIMEOUT & what);
worker_idle_timer_fired();
}
@@ -1144,8 +1144,8 @@ generate_pkt (
}
if (pkt_key != NULL) {
x_pkt->exten[0] = htonl(key_id);
- mac_size = make_mac(x_pkt, pkt_len, MAX_MDG_LEN,
- pkt_key, (char *)&x_pkt->exten[1]);
+ mac_size = make_mac(x_pkt, pkt_len, pkt_key,
+ (char *)&x_pkt->exten[1], MAX_MDG_LEN);
if (mac_size > 0)
pkt_len += mac_size + KEY_MAC_LEN;
#ifdef DEBUG
diff --git a/contrib/ntp/sntp/scm-rev b/contrib/ntp/sntp/scm-rev
index 5e3d42f5e853..3e354b6addff 100644
--- a/contrib/ntp/sntp/scm-rev
+++ b/contrib/ntp/sntp/scm-rev
@@ -1 +1 @@
-1.4004
+1.4062
diff --git a/contrib/ntp/sntp/scripts/Makefile.in b/contrib/ntp/sntp/scripts/Makefile.in
index 42d86ecb59d3..4ad3e371b4e1 100644
--- a/contrib/ntp/sntp/scripts/Makefile.in
+++ b/contrib/ntp/sntp/scripts/Makefile.in
@@ -97,6 +97,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_cacheversion.m4 \
$(top_srcdir)/m4/ntp_compiler.m4 \
$(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
$(top_srcdir)/m4/ntp_facilitynames.m4 \
$(top_srcdir)/m4/ntp_harden.m4 $(top_srcdir)/m4/ntp_ipv6.m4 \
@@ -290,6 +291,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
diff --git a/contrib/ntp/sntp/scripts/cvo.sh b/contrib/ntp/sntp/scripts/cvo.sh
index ecd80922301f..77a161172499 100755
--- a/contrib/ntp/sntp/scripts/cvo.sh
+++ b/contrib/ntp/sntp/scripts/cvo.sh
@@ -26,7 +26,13 @@ case "$#" in
CVO_OS=$4
case "$cvo_KERN" in
linux) # Braindamage. We want OS, not kernel info
- if lsb_release > /dev/null 2>&1
+ if test -f /etc/os-release
+ then
+ . /etc/os-release
+ ID=`echo $ID | tr '-' '_'`
+ CVO_OS="${ID}${VERSION_ID}"
+ CVO_KOSVER=`uname -r`
+ elif lsb_release > /dev/null 2>&1
then
CVO_OS=`lsb_release --id --short | tr '[:upper:]' '[:lower:]'`
CVO_OS="$CVO_OS`lsb_release --release --short`"
diff --git a/contrib/ntp/sntp/sntp-opts.c b/contrib/ntp/sntp/sntp-opts.c
index 29c726cb5973..d4634aa8d710 100644
--- a/contrib/ntp/sntp/sntp-opts.c
+++ b/contrib/ntp/sntp/sntp-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed June 6, 2023 at 04:35:52 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:02:07 AM by AutoGen 5.18.16
* From the definitions sntp-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The sntp program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -74,8 +74,8 @@ extern FILE * option_usage_fp;
* static const strings for sntp options
*/
static char const sntp_opt_strs[2567] =
-/* 0 */ "sntp 4.2.8p17\n"
- "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/* 0 */ "sntp 4.2.8p18\n"
+ "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -160,7 +160,7 @@ static char const sntp_opt_strs[2567] =
/* 2313 */ "LOAD_OPTS\0"
/* 2323 */ "no-load-opts\0"
/* 2336 */ "SNTP\0"
-/* 2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p17\n"
+/* 2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p18\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
/* 2501 */ "$HOME\0"
@@ -168,7 +168,7 @@ static char const sntp_opt_strs[2567] =
/* 2509 */ ".ntprc\0"
/* 2516 */ "https://bugs.ntp.org, bugs@ntp.org\0"
/* 2551 */ "\n\0"
-/* 2553 */ "sntp 4.2.8p17";
+/* 2553 */ "sntp 4.2.8p18";
/**
* ipv4 option description with
@@ -1180,8 +1180,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via sntpOptions.pzCopyright */
- puts(_("sntp 4.2.8p17\n\
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("sntp 4.2.8p18\n\
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1270,7 +1270,7 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via sntpOptions.pzUsageTitle */
- puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p17\n\
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p18\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ hostname-or-IP ...]\n"));
@@ -1278,7 +1278,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via sntpOptions.pzFullVersion */
- puts(_("sntp 4.2.8p17"));
+ puts(_("sntp 4.2.8p18"));
/* referenced via sntpOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/sntp/sntp-opts.h b/contrib/ntp/sntp/sntp-opts.h
index a7cff4d550b0..e9efb0c4da62 100644
--- a/contrib/ntp/sntp/sntp-opts.h
+++ b/contrib/ntp/sntp/sntp-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed June 6, 2023 at 04:35:52 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:02:07 AM by AutoGen 5.18.16
* From the definitions sntp-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The sntp program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -99,9 +99,9 @@ typedef enum {
/** count of all options for sntp */
#define OPTION_CT 23
/** sntp version */
-#define SNTP_VERSION "4.2.8p17"
+#define SNTP_VERSION "4.2.8p18"
/** Full sntp version text */
-#define SNTP_FULL_VERSION "sntp 4.2.8p17"
+#define SNTP_FULL_VERSION "sntp 4.2.8p18"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/sntp/sntp.1sntpman b/contrib/ntp/sntp/sntp.1sntpman
index 7d532020c280..d10d13cddbbc 100644
--- a/contrib/ntp/sntp/sntp.1sntpman
+++ b/contrib/ntp/sntp/sntp.1sntpman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH sntp 1sntpman "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:36:14 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:02:30 AM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -353,7 +353,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Dave Hart"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/sntp/sntp.1sntpmdoc b/contrib/ntp/sntp/sntp.1sntpmdoc
index 0f58ff4090af..f0b3f4641ea1 100644
--- a/contrib/ntp/sntp/sntp.1sntpmdoc
+++ b/contrib/ntp/sntp/sntp.1sntpmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt SNTP 1sntpmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:36:10 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:02:26 AM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -308,7 +308,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.An "Harlan Stenn"
.An "Dave Hart"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/sntp/sntp.html b/contrib/ntp/sntp/sntp.html
index 71d3c35d439c..b5154d115d87 100644
--- a/contrib/ntp/sntp/sntp.html
+++ b/contrib/ntp/sntp/sntp.html
@@ -53,7 +53,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
</p>
-<p>This document applies to version 4.2.8p17 of <code>sntp</code>.
+<p>This document applies to version 4.2.8p18 of <code>sntp</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -226,7 +226,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p17
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p18
Usage: sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/sntp/sntp.man.in b/contrib/ntp/sntp/sntp.man.in
index ca4ddea8e35c..050d1e9cd3f0 100644
--- a/contrib/ntp/sntp/sntp.man.in
+++ b/contrib/ntp/sntp/sntp.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "06 Jun 2023" "4.2.8p17" "User Commands"
+.TH sntp @SNTP_MS@ "25 May 2024" "4.2.8p18" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:36:14 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:02:30 AM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -353,7 +353,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Dave Hart"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/sntp/sntp.mdoc.in b/contrib/ntp/sntp/sntp.mdoc.in
index 3e5fa337725f..2a3f8cfaa9c9 100644
--- a/contrib/ntp/sntp/sntp.mdoc.in
+++ b/contrib/ntp/sntp/sntp.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt SNTP @SNTP_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:36:10 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:02:26 AM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -308,7 +308,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.An "Harlan Stenn"
.An "Dave Hart"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/sntp/tests/Makefile.in b/contrib/ntp/sntp/tests/Makefile.in
index 2e52ab0b27ca..4363ed10d34e 100644
--- a/contrib/ntp/sntp/tests/Makefile.in
+++ b/contrib/ntp/sntp/tests/Makefile.in
@@ -97,6 +97,7 @@ check_PROGRAMS = test-crypto$(EXEEXT) test-keyFile$(EXEEXT) \
@BUILD_TEST_KODDATABASE_TRUE@am__append_1 = test-kodDatabase
@BUILD_TEST_KODFILE_TRUE@am__append_2 = test-kodFile
@NTP_CROSSCOMPILE_FALSE@am__append_3 = $(check_PROGRAMS)
+@LIBNTP_SUBMAKES_TRUE@am__append_4 = check-libntp
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
@@ -107,6 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_cacheversion.m4 \
$(top_srcdir)/m4/ntp_compiler.m4 \
$(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
$(top_srcdir)/m4/ntp_facilitynames.m4 \
$(top_srcdir)/m4/ntp_harden.m4 $(top_srcdir)/m4/ntp_ipv6.m4 \
@@ -675,6 +677,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
@@ -768,7 +771,7 @@ BUILT_SOURCES = $(srcdir)/run-crypto.c $(srcdir)/run-keyFile.c \
$(srcdir)/run-kodDatabase.c $(srcdir)/run-kodFile.c \
$(srcdir)/run-networking.c $(srcdir)/run-packetHandling.c \
$(srcdir)/run-packetProcessing.c $(srcdir)/run-utilities.c \
- $(NULL) check-libntp check-libsntp check-libunity .deps-ver
+ $(NULL) $(am__append_4) check-libsntp check-libunity .deps-ver
# data CLEANFILES down below
CLEANFILES = debug-output-lfp-bin debug-output-lfp-dec \
@@ -777,8 +780,7 @@ CLEANFILES = debug-output-lfp-bin debug-output-lfp-dec \
version.c $(NULL) data/kod-output-multiple \
data/kod-output-single data/debug-output-pkt \
data/debug-output-lfp-dec data/kod-output-blank \
- data/debug-output-lfp-bin $(NULL) check-libntp check-libsntp \
- check-libunity .deps-ver
+ data/debug-output-lfp-bin $(NULL) check-libunity .deps-ver
DISTCLEANFILES = kod-output-blank kod-output-single \
kod-output-multiple testLogfile.log testLogfile2.log $(NULL) \
$(DEPDIR)/deps-ver
@@ -1614,20 +1616,17 @@ FRC.scm-rev:
always out-of-date causing targets which depend on it to also \
be outdated so their rules to fire each time they are built.
-check-libntp: $(top_builddir)/../libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/../libntp/libntp.a:
- cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
-check-libsntp: $(top_builddir)/sntp/libsntp.a
- @: avoid default SCCS get by some make implementations
-
-$(top_builddir)/sntp/libsntp.a:
+.PHONY: check-libsntp
+check-libsntp:
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
check-libunity: $(top_builddir)/unity/libunity.a
- @: avoid default SCCS get by some make implementations
+ @echo stamp > $@
$(top_builddir)/unity/libunity.a:
cd $(top_builddir)/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
diff --git a/contrib/ntp/sntp/tests/crypto.c b/contrib/ntp/sntp/tests/crypto.c
index 8ecd74368011..509efe79c3a2 100644
--- a/contrib/ntp/sntp/tests/crypto.c
+++ b/contrib/ntp/sntp/tests/crypto.c
@@ -7,15 +7,14 @@
#define CMAC "AES128CMAC"
-#define MD5_LENGTH 16
#define SHA1_LENGTH 20
#define CMAC_LENGTH 16
-void test_MakeMd5Mac(void);
+void test_MakeSHAKE128Mac(void);
void test_MakeSHA1Mac(void);
void test_MakeCMac(void);
-void test_VerifyCorrectMD5(void);
+void test_VerifySHAKE128(void);
void test_VerifySHA1(void);
void test_VerifyCMAC(void);
void test_VerifyFailure(void);
@@ -26,26 +25,36 @@ void VerifyOpenSSLCMAC(struct key *cmac);
void
-test_MakeMd5Mac(void)
+test_MakeSHAKE128Mac(void)
{
- const char* PKT_DATA = "abcdefgh0123";
- const int PKT_LEN = strlen(PKT_DATA);
- const char* EXPECTED_DIGEST =
- "\x52\x6c\xb8\x38\xaf\x06\x5a\xfb\x6c\x98\xbb\xc0\x9b\x0a\x7a\x1b";
- char actual[MD5_LENGTH];
-
- struct key md5;
- md5.next = NULL;
- md5.key_id = 10;
- md5.key_len = 6;
- memcpy(&md5.key_seq, "md5seq", md5.key_len);
- strlcpy(md5.typen, "MD5", sizeof(md5.typen));
- md5.typei = keytype_from_text(md5.typen, NULL);
-
- TEST_ASSERT_EQUAL(MD5_LENGTH,
- make_mac(PKT_DATA, PKT_LEN, MD5_LENGTH, &md5, actual));
-
- TEST_ASSERT_TRUE(memcmp(EXPECTED_DIGEST, actual, MD5_LENGTH) == 0);
+#ifdef OPENSSL
+
+ const char KEY[] = "SHAKE128 unit test key";
+ const u_char PAYLOAD[] = "packettestdata16";
+ const size_t PAYLOAD_LEN = sizeof(PAYLOAD) - 1;
+ const u_char EXPECTED_DIGEST[] =
+ "\x62\x5A\x8F\xE4\x66\xCB\xF3\xA6"
+ "\x73\x62\x68\x8D\x11\xB8\x42\xBB";
+ u_char actual[sizeof(EXPECTED_DIGEST) - 1];
+ struct key sk;
+
+ sk.next = NULL;
+ sk.key_id = 10;
+ sk.key_len = sizeof(KEY) - 1;
+ memcpy(&sk.key_seq, KEY, min(sizeof(sk.key_seq), sk.key_len));
+ strlcpy(sk.typen, "SHAKE128", sizeof(sk.typen));
+ sk.typei = keytype_from_text(sk.typen, NULL);
+
+ TEST_ASSERT_EQUAL(sizeof(actual),
+ make_mac(PAYLOAD, PAYLOAD_LEN, &sk, actual,
+ sizeof(actual)));
+
+ TEST_ASSERT_EQUAL_HEX8_ARRAY(EXPECTED_DIGEST, actual, sizeof(actual));
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
+
+#endif /* OPENSSL */
}
@@ -70,14 +79,15 @@ test_MakeSHA1Mac(void)
sha1.typei = keytype_from_text(sha1.typen, NULL);
TEST_ASSERT_EQUAL(SHA1_LENGTH,
- make_mac(PKT_DATA, PKT_LEN, SHA1_LENGTH, &sha1, actual));
+ make_mac(PKT_DATA, PKT_LEN, &sha1, actual,
+ SHA1_LENGTH));
TEST_ASSERT_EQUAL_MEMORY(EXPECTED_DIGEST, actual, SHA1_LENGTH);
-
+
#else
-
+
TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
-
+
#endif /* OPENSSL */
}
@@ -93,8 +103,8 @@ test_MakeCMac(void)
"\xdd\x35\xd5\xf5\x14\x23\xd9\xd6"
"\x38\x5d\x29\x80\xfe\x51\xb9\x6b";
char actual[CMAC_LENGTH];
-
struct key cmac;
+
cmac.next = NULL;
cmac.key_id = 30;
cmac.key_len = CMAC_LENGTH;
@@ -102,37 +112,53 @@ test_MakeCMac(void)
memcpy(&cmac.typen, CMAC, strlen(CMAC) + 1);
TEST_ASSERT_EQUAL(CMAC_LENGTH,
- make_mac(PKT_DATA, PKT_LEN, CMAC_LENGTH, &cmac, actual));
+ make_mac(PKT_DATA, PKT_LEN, &cmac, actual, CMAC_LENGTH));
TEST_ASSERT_EQUAL_MEMORY(EXPECTED_DIGEST, actual, CMAC_LENGTH);
-
+
#else
-
- TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
-
+
+ TEST_IGNORE_MESSAGE("CMAC not enabled, skipping...");
+
#endif /* OPENSSL */
}
void
-test_VerifyCorrectMD5(void)
+test_VerifySHAKE128(void)
{
- const char* PKT_DATA =
- "sometestdata" /* Data */
- "\0\0\0\0" /* Key-ID (unused) */
- "\xc7\x58\x99\xdd\x99\x32\x0f\x71" /* MAC */
- "\x2b\x7b\xfe\x4f\xa2\x32\xcf\xac";
- const int PKT_LEN = 12;
+#ifdef OPENSSL
+ const char KEY[] = "SHAKE128 unit test key";
+ const u_char PAYLOAD[] = "packettestdata16";
+ const size_t PAYLOAD_LEN = sizeof(PAYLOAD) - 1;
+ const u_char EXPECTED_DIGEST[] =
+ "\x62\x5A\x8F\xE4\x66\xCB\xF3\xA6"
+ "\x73\x62\x68\x8D\x11\xB8\x42\xBB";
+ const size_t DIGEST_LEN = sizeof(EXPECTED_DIGEST) - 1;
+ struct key sk;
+ u_char PKT_DATA[ PAYLOAD_LEN + sizeof(sk.key_id)
+ + DIGEST_LEN];
+ u_char *p;
+
+ sk.next = NULL;
+ sk.key_id = 0;
+ sk.key_len = sizeof(KEY) - 1;
+ memcpy(&sk.key_seq, KEY, min(sizeof(sk.key_seq), sk.key_len));
+ strlcpy(sk.typen, "SHAKE128", sizeof(sk.typen));
+ sk.typei = keytype_from_text(sk.typen, NULL);
+
+ p = PKT_DATA;
+ memcpy(p, PAYLOAD, PAYLOAD_LEN); p += PAYLOAD_LEN;
+ memcpy(p, &sk.key_id, sizeof(sk.key_id)); p += sizeof(sk.key_id);
+ memcpy(p, EXPECTED_DIGEST, DIGEST_LEN); p += DIGEST_LEN;
+ TEST_ASSERT_TRUE(sizeof(PKT_DATA) == p - PKT_DATA);
+
+ TEST_ASSERT_TRUE(auth_md5(PKT_DATA, PAYLOAD_LEN, DIGEST_LEN, &sk));
+#else
- struct key md5;
- md5.next = NULL;
- md5.key_id = 0;
- md5.key_len = 6;
- memcpy(&md5.key_seq, "md5key", md5.key_len);
- strlcpy(md5.typen, "MD5", sizeof(md5.typen));
- md5.typei = keytype_from_text(md5.typen, NULL);
+ TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
- TEST_ASSERT_TRUE(auth_md5(PKT_DATA, PKT_LEN, MD5_LENGTH, &md5));
+#endif /* OPENSSL */
}
@@ -147,21 +173,21 @@ test_VerifySHA1(void)
"\xad\x07\xde\x36\x39\xa6\x77\xfa\x5b\xce" /* MAC */
"\x2d\x8a\x7d\x06\x96\xe6\x0c\xbc\xed\xe1";
const int PKT_LEN = 12;
-
struct key sha1;
+
sha1.next = NULL;
sha1.key_id = 0;
sha1.key_len = 7;
memcpy(&sha1.key_seq, "sha1key", sha1.key_len);
- strlcpy(sha1.typen, "SHA1", sizeof(sha1.typen));
+ strlcpy(sha1.typen, "SHA1", sizeof(sha1.typen));
sha1.typei = keytype_from_text(sha1.typen, NULL);
TEST_ASSERT_TRUE(auth_md5(PKT_DATA, PKT_LEN, SHA1_LENGTH, &sha1));
-
+
#else
-
+
TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
-
+
#endif /* OPENSSL */
}
@@ -169,12 +195,6 @@ test_VerifySHA1(void)
void
test_VerifyCMAC(void)
{
- const char* PKT_DATA =
- "sometestdata" /* Data */
- "\0\0\0\0" /* Key-ID (unused) */
- "\x4e\x0c\xf0\xe2\xc7\x8e\xbb\xbf" /* MAC */
- "\x79\xfc\x87\xc7\x8b\xb7\x4a\x0b";
- const int PKT_LEN = 12;
struct key cmac;
cmac.next = NULL;
@@ -198,9 +218,9 @@ VerifyOpenSSLCMAC(struct key *cmac)
TEST_IGNORE_MESSAGE("VerifyOpenSSLCMAC needs to be implemented, skipping...");
#else
-
- TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
-
+
+ TEST_IGNORE_MESSAGE("CMAC not enabled, skipping...");
+
#endif /* OPENSSL */
return;
}
@@ -222,42 +242,77 @@ VerifyLocalCMAC(struct key *cmac)
void
test_VerifyFailure(void)
{
- /* We use a copy of the MD5 verification code, but modify the
- * last bit to make sure verification fails.
+ /*
+ * We use a copy of test_VerifySHAKE128(), but modify the
+ * last packet octet to make sure verification fails.
*/
- const char* PKT_DATA =
- "sometestdata" /* Data */
- "\0\0\0\0" /* Key-ID (unused) */
- "\xc7\x58\x99\xdd\x99\x32\x0f\x71" /* MAC */
- "\x2b\x7b\xfe\x4f\xa2\x32\xcf\x00"; /* Last byte is wrong! */
- const int PKT_LEN = 12;
+#ifdef OPENSSL
+ const char KEY[] = "SHAKE128 unit test key";
+ const u_char PAYLOAD[] = "packettestdata1_";
+ /* last packet byte different */
+ const size_t PAYLOAD_LEN = sizeof(PAYLOAD) - 1;
+ const u_char EXPECTED_DIGEST[] =
+ "\x62\x5A\x8F\xE4\x66\xCB\xF3\xA6"
+ "\x73\x62\x68\x8D\x11\xB8\x42\xBB";
+ const size_t DIGEST_LEN = sizeof(EXPECTED_DIGEST) - 1;
+ struct key sk;
+ u_char PKT_DATA[ PAYLOAD_LEN + sizeof(sk.key_id)
+ + DIGEST_LEN];
+ u_char *p;
+
+ sk.next = NULL;
+ sk.key_id = 0;
+ sk.key_len = sizeof(KEY) - 1;
+ memcpy(&sk.key_seq, KEY, min(sizeof(sk.key_seq), sk.key_len));
+ strlcpy(sk.typen, "SHAKE128", sizeof(sk.typen));
+ sk.typei = keytype_from_text(sk.typen, NULL);
+
+ p = PKT_DATA;
+ memcpy(p, PAYLOAD, PAYLOAD_LEN); p += PAYLOAD_LEN;
+ memcpy(p, &sk.key_id, sizeof(sk.key_id)); p += sizeof(sk.key_id);
+ memcpy(p, EXPECTED_DIGEST, DIGEST_LEN); p += DIGEST_LEN;
+ TEST_ASSERT_TRUE(sizeof(PKT_DATA) == p - PKT_DATA);
+
+ TEST_ASSERT_FALSE(auth_md5(PKT_DATA, PAYLOAD_LEN, DIGEST_LEN, &sk));
+#else
- struct key md5;
- md5.next = NULL;
- md5.key_id = 0;
- md5.key_len = 6;
- memcpy(&md5.key_seq, "md5key", md5.key_len);
- strlcpy(md5.typen, "MD5", sizeof(md5.typen));
- md5.typei = keytype_from_text(md5.typen, NULL);
+ TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
- TEST_ASSERT_FALSE(auth_md5(PKT_DATA, PKT_LEN, MD5_LENGTH, &md5));
+#endif /* OPENSSL */
}
void
test_PacketSizeNotMultipleOfFourBytes(void)
{
- const char* PKT_DATA = "123456";
- const int PKT_LEN = 6;
- char actual[MD5_LENGTH];
-
- struct key md5;
- md5.next = NULL;
- md5.key_id = 10;
- md5.key_len = 6;
- memcpy(&md5.key_seq, "md5seq", md5.key_len);
- strlcpy(md5.typen, "MD5", sizeof(md5.typen));
- md5.typei = keytype_from_text(md5.typen, NULL);
-
- TEST_ASSERT_EQUAL(0, make_mac(PKT_DATA, PKT_LEN, MD5_LENGTH, &md5, actual));
+ /*
+ * We use a copy of test_MakeSHAKE128Mac(), but modify
+ * the packet length to 17.
+ */
+#ifdef OPENSSL
+
+ const char KEY[] = "SHAKE128 unit test key";
+ const u_char PAYLOAD[] = "packettestdata_17";
+ const size_t PAYLOAD_LEN = sizeof(PAYLOAD) - 1;
+ const u_char EXPECTED_DIGEST[] =
+ "\x62\x5A\x8F\xE4\x66\xCB\xF3\xA6"
+ "\x73\x62\x68\x8D\x11\xB8\x42\xBB";
+ u_char actual[sizeof(EXPECTED_DIGEST) - 1];
+ struct key sk;
+
+ sk.next = NULL;
+ sk.key_id = 10;
+ sk.key_len = sizeof(KEY) - 1;
+ memcpy(&sk.key_seq, KEY, min(sizeof(sk.key_seq), sk.key_len));
+ strlcpy(sk.typen, "SHAKE128", sizeof(sk.typen));
+ sk.typei = keytype_from_text(sk.typen, NULL);
+
+ TEST_ASSERT_EQUAL(0,
+ make_mac(PAYLOAD, PAYLOAD_LEN, &sk, actual,
+ sizeof(actual)));
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
+
+#endif /* OPENSSL */
}
diff --git a/contrib/ntp/sntp/tests/fileHandlingTest.h.in b/contrib/ntp/sntp/tests/fileHandlingTest.h.in
index b93ed9e90293..86c9f2c7cd0e 100644
--- a/contrib/ntp/sntp/tests/fileHandlingTest.h.in
+++ b/contrib/ntp/sntp/tests/fileHandlingTest.h.in
@@ -1,3 +1,9 @@
+/*
+ * fileHandlingTest.h[.in]
+ *
+ * @configure_input@
+ */
+
#ifndef FILE_HANDLING_TEST_H
#define FILE_HANDLING_TEST_H
@@ -23,4 +29,4 @@ extern int GetFileSize(FILE *file);
extern bool CompareFileContent(FILE* expected, FILE* actual);
extern void ClearFile(const char * filename) ;
-#endif // FILE_HANDLING_TEST_H
+#endif /* FILE_HANDLING_TEST_H */
diff --git a/contrib/ntp/sntp/tests/packetHandling.c b/contrib/ntp/sntp/tests/packetHandling.c
index 6787eeaa2fe9..cf52ccd60faa 100644
--- a/contrib/ntp/sntp/tests/packetHandling.c
+++ b/contrib/ntp/sntp/tests/packetHandling.c
@@ -72,26 +72,36 @@ test_GenerateUnauthenticatedPacket(void)
void
test_GenerateAuthenticatedPacket(void)
{
- static const int EXPECTED_PKTLEN = LEN_PKT_NOMAC + MAX_MD5_LEN;
-
+#ifdef OPENSSL
+
+ const int EXPECTED_PKTLEN = LEN_PKT_NOMAC + MAX_SHAKE128_LEN;
+
struct key testkey;
struct pkt testpkt;
struct timeval xmt;
l_fp expected_xmt, actual_xmt;
- char expected_mac[MAX_MD5_LEN];
-
+ const char key[] = "123456789";
+ size_t mac_sz;
+ const u_char expected_mac[] = {
+ 0x46, 0x79, 0x81, 0x6b,
+ 0x22, 0xe3, 0xa7, 0xaf,
+ 0x1d, 0x63, 0x20, 0xfb,
+ 0xc7, 0xd6, 0x87, 0x2c
+ };
+
testkey.next = NULL;
testkey.key_id = 30;
- testkey.key_len = 9;
- memcpy(testkey.key_seq, "123456789", testkey.key_len);
- strlcpy(testkey.typen, "MD5", sizeof(testkey.typen));
+ strlcpy(testkey.key_seq, key, sizeof(testkey.key_seq));
+ testkey.key_len = strlen(testkey.key_seq);
+ strlcpy(testkey.typen, "SHAKE128", sizeof(testkey.typen));
testkey.typei = keytype_from_text(testkey.typen, NULL);
- GETTIMEOFDAY(&xmt, NULL);
- xmt.tv_sec += JAN_1970;
+ xmt.tv_sec = JAN_1970;
+ xmt.tv_usec = 0;
TEST_ASSERT_EQUAL(EXPECTED_PKTLEN,
- generate_pkt(&testpkt, &xmt, testkey.key_id, &testkey));
+ generate_pkt(&testpkt, &xmt, testkey.key_id,
+ &testkey));
TEST_ASSERT_EQUAL(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode));
TEST_ASSERT_EQUAL(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode));
@@ -105,10 +115,20 @@ test_GenerateAuthenticatedPacket(void)
TEST_ASSERT_TRUE(LfpEquality(expected_xmt, actual_xmt));
TEST_ASSERT_EQUAL(testkey.key_id, ntohl(testpkt.exten[0]));
-
- TEST_ASSERT_EQUAL(MAX_MD5_LEN - 4, /* Remove the key_id, only keep the mac. */
- make_mac(&testpkt, LEN_PKT_NOMAC, MAX_MD5_LEN-4, &testkey, expected_mac));
- TEST_ASSERT_EQUAL_MEMORY(expected_mac, (char*)&testpkt.exten[1], MAX_MD5_LEN -4);
+
+ TEST_ASSERT_EQUAL(sizeof(expected_mac), SHAKE128_LENGTH);
+ mac_sz = make_mac(&testpkt, LEN_PKT_NOMAC, &testkey,
+ &testpkt.exten[1], MAX_MDG_LEN);
+ TEST_ASSERT_EQUAL(mac_sz, SHAKE128_LENGTH);
+
+ TEST_ASSERT_EQUAL_MEMORY(expected_mac, (void *)&testpkt.exten[1],
+ SHAKE128_LENGTH);
+
+#else /* !OPENSSL follows */
+
+ TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
+
+#endif
}
@@ -169,7 +189,7 @@ test_OffsetCalculationNegativeOffset(void)
rpkt.precision = -1;
rpkt.rootdelay = HTONS_FP(DTOUFP(0.5));
rpkt.rootdisp = HTONS_FP(DTOUFP(0.5));
-
+
/* Synch Distance is (0.5+0.5)/2.0, or 0.5 */
get_systime(&reftime);
HTONL_FP(&reftime, &rpkt.reftime);
diff --git a/contrib/ntp/sntp/tests/packetProcessing.c b/contrib/ntp/sntp/tests/packetProcessing.c
index 53c454a9f064..0e7fedee271c 100644
--- a/contrib/ntp/sntp/tests/packetProcessing.c
+++ b/contrib/ntp/sntp/tests/packetProcessing.c
@@ -15,7 +15,6 @@ extern int key_cnt;
void PrepareAuthenticationTest(int key_id,int key_len,const char* type,const void* key_seq);
-void PrepareAuthenticationTestMD5(int key_id,int key_len,const void* key_seq);
void setUp(void);
void tearDown(void);
void test_TooShortLength(void);
@@ -35,14 +34,15 @@ void test_RejectWrongResponseServerMode(void);
void test_AcceptNoSentPacketBroadcastMode(void);
void test_CorrectUnauthenticatedPacket(void);
void test_CorrectAuthenticatedPacketMD5(void);
+void test_CorrectAuthenticatedPacketSHAKE128(void);
void test_CorrectAuthenticatedPacketSHA1(void);
void test_CorrectAuthenticatedPacketCMAC(void);
/* [Bug 2998] There are some issues whith the definition of 'struct pkt'
* when AUTOKEY is undefined -- the formal struct is too small to hold
* all the extension fields that are going to be tested. We have to make
- * sure we have the extra bytes, or the test yield undefined results due
- * to buffer overrun.
+ * sure we have the extra bytes, or the test yields undefined results due
+ * to buffer overrun.
*/
#ifndef AUTOKEY
# define EXTRA_BUFSIZE 256
@@ -53,7 +53,7 @@ void test_CorrectAuthenticatedPacketCMAC(void);
union tpkt {
struct pkt p;
u_char b[sizeof(struct pkt) + EXTRA_BUFSIZE];
-};
+};
static union tpkt testpkt;
static union tpkt testspkt;
@@ -70,35 +70,28 @@ PrepareAuthenticationTest(
)
{
char str[25];
- snprintf(str, 25, "%d", key_id);
+
+ snprintf(str, sizeof(str), "%d", key_id);
ActivateOption("-a", str);
key_cnt = 1;
- key_ptr = emalloc(sizeof(struct key));
+ if (NULL == key_ptr) {
+ key_ptr = emalloc(sizeof(*key_ptr));
+ }
key_ptr->next = NULL;
key_ptr->key_id = key_id;
key_ptr->key_len = key_len;
- memcpy(key_ptr->typen, type, strlen(type) + 1);
+ strncpy(key_ptr->typen, type, sizeof(key_ptr->typen));
TEST_ASSERT_TRUE(key_len < sizeof(key_ptr->key_seq));
- memcpy(key_ptr->key_seq, key_seq, key_ptr->key_len);
+ memcpy(key_ptr->key_seq, key_seq,
+ min(key_len, sizeof(key_ptr->key_seq)));
restoreKeyDb = true;
}
void
-PrepareAuthenticationTestMD5(
- int key_id,
- int key_len,
- const void * key_seq
- )
-{
- PrepareAuthenticationTest(key_id, key_len, "MD5", key_seq);
-}
-
-
-void
setUp(void)
{
@@ -109,7 +102,7 @@ setUp(void)
* so they contain at least some valid data.
*/
testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION,
- MODE_SERVER);
+ MODE_SERVER);
testpkt.p.stratum = STRATUM_REFCLOCK;
memcpy(&testpkt.p.refid, "GPS\0", 4);
@@ -127,7 +120,7 @@ setUp(void)
void
tearDown(void)
-{
+{
if (restoreKeyDb) {
key_cnt = 0;
free(key_ptr);
@@ -171,7 +164,7 @@ test_TooShortExtensionFieldLength(void)
* still...
*/
uint32_t * pe = testpkt.p.exten + 7;
-
+
/* The lower 16-bits are the length of the extension field.
* This lengths must be multiples of 4 bytes, which gives
* a minimum of 4 byte extension field length.
@@ -224,19 +217,20 @@ test_CryptoNAKPacketReject(void)
void
test_AuthenticatedPacketInvalid(void)
{
+#ifdef OPENSSL
+ size_t pkt_len = LEN_PKT_NOMAC;
+ size_t mac_len;
+
/* Activate authentication option */
- PrepareAuthenticationTestMD5(50, 9, "123456789");
+ PrepareAuthenticationTest(50, 9, "SHAKE128", "123456789");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- /* Prepare the packet. */
- int pkt_len = LEN_PKT_NOMAC;
+ /* Prepare the packet. */
testpkt.p.exten[0] = htonl(50);
- int mac_len = make_mac(&testpkt.p, pkt_len,
- MAX_MD5_LEN - KEY_MAC_LEN, key_ptr,
- &testpkt.p.exten[1]);
+ mac_len = make_mac(&testpkt.p, pkt_len, key_ptr,
+ &testpkt.p.exten[1], MAX_MDG_LEN);
- pkt_len += 4 + mac_len;
+ pkt_len += KEY_MAC_LEN + mac_len;
/* Now, alter the MAC so it becomes invalid. */
testpkt.p.exten[1] += 1;
@@ -244,30 +238,43 @@ test_AuthenticatedPacketInvalid(void)
TEST_ASSERT_EQUAL(SERVER_AUTH_FAIL,
process_pkt(&testpkt.p, &testsock, pkt_len,
MODE_SERVER, &testspkt.p, "UnitTest"));
+
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not enabled, skipping...");
+
+#endif
}
void
test_AuthenticatedPacketUnknownKey(void)
{
+#ifdef OPENSSL
+ size_t pkt_len = LEN_PKT_NOMAC;
+ size_t mac_len;
+
/* Activate authentication option */
- PrepareAuthenticationTestMD5(30, 9, "123456789");
+ PrepareAuthenticationTest(30, 9, "SHAKE128", "123456789");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
+
/* Prepare the packet. Note that the Key-ID expected is 30, but
* the packet has a key id of 50.
*/
- int pkt_len = LEN_PKT_NOMAC;
-
testpkt.p.exten[0] = htonl(50);
- int mac_len = make_mac(&testpkt.p, pkt_len,
- MAX_MD5_LEN - KEY_MAC_LEN, key_ptr,
- &testpkt.p.exten[1]);
+ mac_len = make_mac(&testpkt.p, pkt_len, key_ptr,
+ &testpkt.p.exten[1], MAX_MDG_LEN);
pkt_len += KEY_MAC_LEN + mac_len;
TEST_ASSERT_EQUAL(SERVER_AUTH_FAIL,
process_pkt(&testpkt.p, &testsock, pkt_len,
MODE_SERVER, &testspkt.p, "UnitTest"));
+
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not enabled, skipping...");
+
+#endif
}
@@ -282,7 +289,7 @@ test_ServerVersionTooOld(void)
TEST_ASSERT_TRUE(PKT_VERSION(testpkt.p.li_vn_mode) < NTP_OLDVERSION);
int pkt_len = LEN_PKT_NOMAC;
-
+
TEST_ASSERT_EQUAL(SERVER_UNUSEABLE,
process_pkt(&testpkt.p, &testsock, pkt_len,
MODE_SERVER, &testspkt.p, "UnitTest"));
@@ -418,44 +425,96 @@ test_CorrectUnauthenticatedPacket(void)
void
test_CorrectAuthenticatedPacketMD5(void)
{
- PrepareAuthenticationTestMD5(10, 15, "123456789abcdef");
+#ifdef OPENSSL
+
+ keyid_t k_id = 10;
+ int pkt_len = LEN_PKT_NOMAC;
+ int mac_len;
+
+ PrepareAuthenticationTest(k_id, 15, "MD5", "123456789abcdef");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+ /* Prepare the packet. */
+ testpkt.p.exten[0] = htonl(k_id);
+ mac_len = make_mac(&testpkt.p, pkt_len, key_ptr,
+ &testpkt.p.exten[1], MAX_MDG_LEN);
+
+ /* TODO: Should not expect failure if non-FIPS OpenSSL */
+ TEST_EXPECT_FAIL_MESSAGE("FIPS OpenSSL bars MD5");
+
+ pkt_len += KEY_MAC_LEN + mac_len;
+
+ TEST_ASSERT_EQUAL(pkt_len,
+ process_pkt(&testpkt.p, &testsock, pkt_len,
+ MODE_SERVER, &testspkt.p, "UnitTest"));
+
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not enabled, skipping...");
+
+#endif
+}
+
+
+void
+test_CorrectAuthenticatedPacketSHAKE128(void)
+{
+#ifdef OPENSSL
+
+ keyid_t k_id = 10;
int pkt_len = LEN_PKT_NOMAC;
+ int mac_len;
+
+ PrepareAuthenticationTest(k_id, 15, "SHAKE128", "123456789abcdef");
+ TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
/* Prepare the packet. */
- testpkt.p.exten[0] = htonl(10);
- int mac_len = make_mac(&testpkt.p, pkt_len,
- MAX_MD5_LEN - KEY_MAC_LEN, key_ptr,
- &testpkt.p.exten[1]);
+ testpkt.p.exten[0] = htonl(k_id);
+ mac_len = make_mac(&testpkt.p, pkt_len, key_ptr, &testpkt.p.exten[1],
+ SHAKE128_LENGTH);
pkt_len += KEY_MAC_LEN + mac_len;
TEST_ASSERT_EQUAL(pkt_len,
process_pkt(&testpkt.p, &testsock, pkt_len,
MODE_SERVER, &testspkt.p, "UnitTest"));
+
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not enabled, skipping...");
+
+#endif
}
void
test_CorrectAuthenticatedPacketSHA1(void)
{
- PrepareAuthenticationTest(20, 15, "SHA1", "abcdefghijklmno");
- TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+#ifdef OPENSSL
+ keyid_t k_id = 20;
int pkt_len = LEN_PKT_NOMAC;
+ int mac_len;
+
+ PrepareAuthenticationTest(k_id, 15, "SHA1", "abcdefghijklmno");
+ TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
/* Prepare the packet. */
- testpkt.p.exten[0] = htonl(20);
- int mac_len = make_mac(&testpkt.p, pkt_len,
- MAX_MDG_LEN, key_ptr,
- &testpkt.p.exten[1]);
+ testpkt.p.exten[0] = htonl(k_id);
+ mac_len = make_mac(&testpkt.p, pkt_len, key_ptr, &testpkt.p.exten[1],
+ SHA1_LENGTH);
pkt_len += KEY_MAC_LEN + mac_len;
TEST_ASSERT_EQUAL(pkt_len,
process_pkt(&testpkt.p, &testsock, pkt_len,
MODE_SERVER, &testspkt.p, "UnitTest"));
+
+#else
+
+ TEST_IGNORE_MESSAGE("OpenSSL not enabled, skipping...");
+
+#endif
}
@@ -471,9 +530,8 @@ test_CorrectAuthenticatedPacketCMAC(void)
/* Prepare the packet. */
testpkt.p.exten[0] = htonl(30);
- int mac_len = make_mac(&testpkt.p, pkt_len,
- MAX_MAC_LEN, key_ptr,
- &testpkt.p.exten[1]);
+ int mac_len = make_mac(&testpkt.p, pkt_len, key_ptr,
+ &testpkt.p.exten[1], MAX_MAC_LEN);
pkt_len += 4 + mac_len;
@@ -482,9 +540,9 @@ test_CorrectAuthenticatedPacketCMAC(void)
MODE_SERVER, &testspkt.p, "UnitTest"));
#else
-
- TEST_IGNORE_MESSAGE("OpenSSL CMAC not used, skipping...");
-
+
+ TEST_IGNORE_MESSAGE("CMAC not enabled, skipping...");
+
#endif /* OPENSSL */
}
diff --git a/contrib/ntp/sntp/tests/run-crypto.c b/contrib/ntp/sntp/tests/run-crypto.c
index a486f86c4035..83e8d19434aa 100644
--- a/contrib/ntp/sntp/tests/run-crypto.c
+++ b/contrib/ntp/sntp/tests/run-crypto.c
@@ -30,10 +30,10 @@
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_MakeMd5Mac(void);
+extern void test_MakeSHAKE128Mac(void);
extern void test_MakeSHA1Mac(void);
extern void test_MakeCMac(void);
-extern void test_VerifyCorrectMD5(void);
+extern void test_VerifySHAKE128(void);
extern void test_VerifySHA1(void);
extern void test_VerifyCMAC(void);
extern void test_VerifyFailure(void);
@@ -66,14 +66,14 @@ int main(int argc, char *argv[])
progname = argv[0];
suite_setup();
UnityBegin("crypto.c");
- RUN_TEST(test_MakeMd5Mac, 15);
- RUN_TEST(test_MakeSHA1Mac, 16);
- RUN_TEST(test_MakeCMac, 17);
- RUN_TEST(test_VerifyCorrectMD5, 18);
- RUN_TEST(test_VerifySHA1, 19);
- RUN_TEST(test_VerifyCMAC, 20);
- RUN_TEST(test_VerifyFailure, 21);
- RUN_TEST(test_PacketSizeNotMultipleOfFourBytes, 22);
+ RUN_TEST(test_MakeSHAKE128Mac, 14);
+ RUN_TEST(test_MakeSHA1Mac, 15);
+ RUN_TEST(test_MakeCMac, 16);
+ RUN_TEST(test_VerifySHAKE128, 17);
+ RUN_TEST(test_VerifySHA1, 18);
+ RUN_TEST(test_VerifyCMAC, 19);
+ RUN_TEST(test_VerifyFailure, 20);
+ RUN_TEST(test_PacketSizeNotMultipleOfFourBytes, 21);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-packetProcessing.c b/contrib/ntp/sntp/tests/run-packetProcessing.c
index c91a6d340a39..eeeb6f1bf2f6 100644
--- a/contrib/ntp/sntp/tests/run-packetProcessing.c
+++ b/contrib/ntp/sntp/tests/run-packetProcessing.c
@@ -47,6 +47,7 @@ extern void test_RejectWrongResponseServerMode(void);
extern void test_AcceptNoSentPacketBroadcastMode(void);
extern void test_CorrectUnauthenticatedPacket(void);
extern void test_CorrectAuthenticatedPacketMD5(void);
+extern void test_CorrectAuthenticatedPacketSHAKE128(void);
extern void test_CorrectAuthenticatedPacketSHA1(void);
extern void test_CorrectAuthenticatedPacketCMAC(void);
@@ -77,25 +78,26 @@ int main(int argc, char *argv[])
progname = argv[0];
suite_setup();
UnityBegin("packetProcessing.c");
- RUN_TEST(test_TooShortLength, 23);
- RUN_TEST(test_LengthNotMultipleOfFour, 24);
- RUN_TEST(test_TooShortExtensionFieldLength, 25);
- RUN_TEST(test_UnauthenticatedPacketReject, 26);
- RUN_TEST(test_CryptoNAKPacketReject, 27);
- RUN_TEST(test_AuthenticatedPacketInvalid, 28);
- RUN_TEST(test_AuthenticatedPacketUnknownKey, 29);
- RUN_TEST(test_ServerVersionTooOld, 30);
- RUN_TEST(test_ServerVersionTooNew, 31);
- RUN_TEST(test_NonWantedMode, 32);
- RUN_TEST(test_KoDRate, 33);
- RUN_TEST(test_KoDDeny, 34);
- RUN_TEST(test_RejectUnsyncedServer, 35);
- RUN_TEST(test_RejectWrongResponseServerMode, 36);
- RUN_TEST(test_AcceptNoSentPacketBroadcastMode, 37);
- RUN_TEST(test_CorrectUnauthenticatedPacket, 38);
- RUN_TEST(test_CorrectAuthenticatedPacketMD5, 39);
- RUN_TEST(test_CorrectAuthenticatedPacketSHA1, 40);
- RUN_TEST(test_CorrectAuthenticatedPacketCMAC, 41);
+ RUN_TEST(test_TooShortLength, 20);
+ RUN_TEST(test_LengthNotMultipleOfFour, 21);
+ RUN_TEST(test_TooShortExtensionFieldLength, 22);
+ RUN_TEST(test_UnauthenticatedPacketReject, 23);
+ RUN_TEST(test_CryptoNAKPacketReject, 24);
+ RUN_TEST(test_AuthenticatedPacketInvalid, 25);
+ RUN_TEST(test_AuthenticatedPacketUnknownKey, 26);
+ RUN_TEST(test_ServerVersionTooOld, 27);
+ RUN_TEST(test_ServerVersionTooNew, 28);
+ RUN_TEST(test_NonWantedMode, 29);
+ RUN_TEST(test_KoDRate, 30);
+ RUN_TEST(test_KoDDeny, 31);
+ RUN_TEST(test_RejectUnsyncedServer, 32);
+ RUN_TEST(test_RejectWrongResponseServerMode, 33);
+ RUN_TEST(test_AcceptNoSentPacketBroadcastMode, 34);
+ RUN_TEST(test_CorrectUnauthenticatedPacket, 35);
+ RUN_TEST(test_CorrectAuthenticatedPacketMD5, 36);
+ RUN_TEST(test_CorrectAuthenticatedPacketSHAKE128, 37);
+ RUN_TEST(test_CorrectAuthenticatedPacketSHA1, 38);
+ RUN_TEST(test_CorrectAuthenticatedPacketCMAC, 39);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/unity/Makefile.in b/contrib/ntp/sntp/unity/Makefile.in
index 927f648ffea8..424d7ca4497f 100644
--- a/contrib/ntp/sntp/unity/Makefile.in
+++ b/contrib/ntp/sntp/unity/Makefile.in
@@ -98,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_cacheversion.m4 \
$(top_srcdir)/m4/ntp_compiler.m4 \
$(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
$(top_srcdir)/m4/ntp_facilitynames.m4 \
$(top_srcdir)/m4/ntp_harden.m4 $(top_srcdir)/m4/ntp_ipv6.m4 \
@@ -354,6 +355,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
diff --git a/contrib/ntp/sntp/unity/unity_internals.h b/contrib/ntp/sntp/unity/unity_internals.h
index a04f52b478bb..3d22e7aa20e8 100644
--- a/contrib/ntp/sntp/unity/unity_internals.h
+++ b/contrib/ntp/sntp/unity/unity_internals.h
@@ -519,6 +519,9 @@ void UnityAssertDoubleSpecial(const _UD actual,
const UNITY_FLOAT_TRAIT_T style);
#endif
+void UnityExpectFailMessage(const char* msg,
+ const UNITY_LINE_TYPE line);
+
//-------------------------------------------------------
// Error Strings We Might Need
//-------------------------------------------------------
@@ -708,8 +711,7 @@ extern const char UnityStrErr64[];
//End of UNITY_INTERNALS_H
#endif
-//#define TEST_EXPECT_FAIL() Unity.isExpectingFail = 1;
-//#define TEST_EXPECT_FAIL_MESSAGE(message) Unity.isExpectingFail = 1; Unity.XFAILMessage = message; //PROBLEM : does this work on all compilers?
+// Not part of standard distribution
-#define TEST_EXPECT_FAIL() UnityExpectFail();
-#define TEST_EXPECT_FAIL_MESSAGE(message) UnityExpectFailMessage( (message) );
+#define TEST_EXPECT_FAIL() UnityExpectFail();
+#define TEST_EXPECT_FAIL_MESSAGE(message) UnityExpectFailMessage((message), __LINE__);
diff --git a/contrib/ntp/sntp/utilities.h b/contrib/ntp/sntp/utilities.h
index a022c7d49769..4503877bc256 100644
--- a/contrib/ntp/sntp/utilities.h
+++ b/contrib/ntp/sntp/utilities.h
@@ -7,7 +7,6 @@
#include "ntp.h"
#include "ntp_stdlib.h"
-#include "lib_strbuf.h"
#define HLINE "--------------------------------------------------------------------------------\n"
#define PHLINE fprintf(output, HLINE);
diff --git a/contrib/ntp/tests/libntp/data/ntp.keys b/contrib/ntp/tests/libntp/data/ntp.keys
index 6c8c743fd7d2..ef634dd00ebd 100644
--- a/contrib/ntp/tests/libntp/data/ntp.keys
+++ b/contrib/ntp/tests/libntp/data/ntp.keys
@@ -1,15 +1,16 @@
-# This unit test ntp.keys file has hard-coded the current set
-# of OpenSSL-supported digest algorithms. It needs to be updated
-# after newer algorithms are available. The current list can be
+# This unit test ntp.keys file has hard-coded the union of sets
+# of OpenSSL-supported digest algorithms we've come across. It
+# needs to be updated as algorithms are observed. A list can be
# obtained with:
#
# ntpq -c "help keytype"
#
-# tests/libntp/digest.c similarly hardcodes the list of digests
-# to test.
+# tests/libntp/digests.c similarly hardcodes the list of digests
+# to test. This file must be kept in sync with it.
#
# Each digest is tested twice with keyids separated by 50 for
# plaintext and hex-encoded keys.
+#
1 AES128CMAC X~A=%NWlo]p$dGq,S3M9
2 MD4 oV'8?f+J5`_EOvW!B,R`
@@ -18,9 +19,9 @@
5 RIPEMD160 I89p}f6QopwC\LwHBm;e
6 SHA1 A;H=E;.m4N%t%EeJ90[d
7 SHAKE128 |HxLoa,mzG<"y>^TI_(1
- 8 MD5 306+^SHLV5{"v7W`U3aY # unused so far
- 9 MD5 lGyKZgsI_Pi"y"8JAT98 # unused
-10 MD5 2:VO]Q5u%/b&}.<P?T~9 # unused
+ 8 DSA 306+^SHLV5{"v7W`U3aY
+ 9 DSA-SHA lGyKZgsI_Pi"y"8JAT98
+10 SHA 2:VO]Q5u%/b&}.<P?T~9
51 AES128CMAC d0cd9f3ee181769ca7cccaada09f093c5fe8e628
52 MD4 7080bc47eea6b379b2ff841805a144fb4a241a16
@@ -29,6 +30,6 @@
55 RIPEMD160 6028ec169bfbe55ab61ffa7baa34b482020f0619
56 SHA1 17d96a86eb9b9075f33e1c0a08bb2bb61e916e33
57 SHAKE128 70da1a91030eb91836c1cf76cf67ddfd6b96fa91
-58 SHA1 7ce5deea7569d7423d5e1b497c8eb3bfeff852d5 # unused so far
-59 SHA1 9fd568e8f371deae54a65bc50b52bbe1f6529589 # unused
-60 SHA1 ce85046978a4df8366e102c4f1267399bbc25737 # unused
+58 DSA 7ce5deea7569d7423d5e1b497c8eb3bfeff852d5
+59 DSA-SHA 9fd568e8f371deae54a65bc50b52bbe1f6529589
+60 SHA ce85046978a4df8366e102c4f1267399bbc25737
diff --git a/contrib/ntp/tests/libntp/digests.c b/contrib/ntp/tests/libntp/digests.c
index 03e9ef1b838e..10b9d2c12ac0 100644
--- a/contrib/ntp/tests/libntp/digests.c
+++ b/contrib/ntp/tests/libntp/digests.c
@@ -110,7 +110,7 @@ do { \
authtrust((key), 1); \
\
res_sz = authencrypt((key), pkt, pkt_sz); \
- if (KEY_MAC_LEN == res_sz) { \
+ if (0 == res_sz) { \
TEST_IGNORE_MESSAGE("Likely OpenSSL 3 failed digest " \
"init."); \
return; \
@@ -363,7 +363,7 @@ void test_Digest_SHAKE128(void)
0xaa, 0xa6, 0xcd, 0x76
};
u_char expectedB[MAX_MAC_LEN] =
- {
+ {
0, 0, 0, KEYID_B,
0x07, 0x04, 0x63, 0xcc,
0x46, 0xaf, 0xca, 0x00,
@@ -380,6 +380,123 @@ void test_Digest_SHAKE128(void)
}
+#define DSA_KEYID 8
+#undef KEYID_A
+#define KEYID_A DSA_KEYID
+#undef DG_SZ
+#define DG_SZ 20
+#undef KEYID_B
+#define KEYID_B (KEYID_A + HEX_KEYID_OFFSET)
+void test_Digest_DSA(void);
+void test_Digest_DSA(void)
+{
+#ifdef OPENSSL
+ u_char expectedA[MAX_MAC_LEN] =
+ {
+ 0, 0, 0, KEYID_A,
+ 0xaf, 0xa0, 0x1d, 0x0c,
+ 0x92, 0xcb, 0xca, 0x95,
+ 0x0d, 0x57, 0x60, 0x49,
+ 0xe5, 0x28, 0x03, 0xf2,
+ 0x7b, 0x5b, 0xb1, 0x4a
+ };
+ u_char expectedB[MAX_MAC_LEN] =
+ {
+ 0, 0, 0, KEYID_B,
+ 0x77, 0xcd, 0x88, 0xc2,
+ 0xed, 0x5d, 0x57, 0xc5,
+ 0x28, 0x92, 0xf0, 0x21,
+ 0x2b, 0xb9, 0x48, 0xac,
+ 0xfe, 0x9f, 0xf5, 0x1c
+ };
+
+ TEST_ASSERT(setup);
+ TEST_ONE_DIGEST(KEYID_A, DG_SZ, expectedA);
+ TEST_ONE_DIGEST(KEYID_B, DG_SZ, expectedB);
+#else /* ! OPENSSL follows */
+ TEST_IGNORE_MESSAGE("Skipping, no OPENSSL");
+#endif
+}
+
+
+#define DSA_SHA_KEYID 9
+#undef KEYID_A
+#define KEYID_A DSA_SHA_KEYID
+#undef DG_SZ
+#define DG_SZ 20
+#undef KEYID_B
+#define KEYID_B (KEYID_A + HEX_KEYID_OFFSET)
+void test_Digest_DSA_SHA(void);
+void test_Digest_DSA_SHA(void)
+{
+#ifdef OPENSSL
+ u_char expectedA[MAX_MAC_LEN] =
+ {
+ 0, 0, 0, KEYID_A,
+ 0x7c, 0xb5, 0x79, 0xd0,
+ 0xf2, 0xcd, 0x47, 0xc0,
+ 0x21, 0xf3, 0xf5, 0x04,
+ 0x10, 0xc4, 0x59, 0x5c,
+ 0xd9, 0xa4, 0x4f, 0x3b
+ };
+ u_char expectedB[MAX_MAC_LEN] =
+ {
+ 0, 0, 0, KEYID_B,
+ 0xb9, 0xca, 0xa6, 0x8e,
+ 0xd3, 0xcb, 0x94, 0x6a,
+ 0x6d, 0xae, 0xb4, 0xc8,
+ 0x0e, 0xc9, 0xf6, 0xed,
+ 0x58, 0x1a, 0xed, 0x22
+ };
+
+ TEST_ASSERT(setup);
+ TEST_ONE_DIGEST(KEYID_A, DG_SZ, expectedA);
+ TEST_ONE_DIGEST(KEYID_B, DG_SZ, expectedB);
+#else /* ! OPENSSL follows */
+ TEST_IGNORE_MESSAGE("Skipping, no OPENSSL");
+#endif
+}
+
+
+#define SHA_KEYID 10
+#undef KEYID_A
+#define KEYID_A SHA_KEYID
+#undef DG_SZ
+#define DG_SZ 20
+#undef KEYID_B
+#define KEYID_B (KEYID_A + HEX_KEYID_OFFSET)
+void test_Digest_SHA(void);
+void test_Digest_SHA(void)
+{
+#ifdef OPENSSL
+ u_char expectedA[MAX_MAC_LEN] =
+ {
+ 0, 0, 0, KEYID_A,
+ 0xd5, 0xbd, 0xb8, 0x55,
+ 0x9b, 0x9e, 0x5e, 0x8f,
+ 0x1a, 0x3d, 0x99, 0x60,
+ 0xbd, 0x70, 0x0c, 0x5c,
+ 0x68, 0xae, 0xb0, 0xbd
+ };
+ u_char expectedB[MAX_MAC_LEN] =
+ {
+ 0, 0, 0, KEYID_B,
+ 0x63, 0x05, 0x41, 0x45,
+ 0xe9, 0x61, 0x84, 0xe7,
+ 0xc6, 0x94, 0x24, 0xa4,
+ 0x84, 0x76, 0xc7, 0xc9,
+ 0xdd, 0x80, 0x80, 0x89
+ };
+
+ TEST_ASSERT(setup);
+ TEST_ONE_DIGEST(KEYID_A, DG_SZ, expectedA);
+ TEST_ONE_DIGEST(KEYID_B, DG_SZ, expectedB);
+#else /* ! OPENSSL follows */
+ TEST_IGNORE_MESSAGE("Skipping, no OPENSSL");
+#endif
+}
+
+
/*
* Dump a MAC in a form easy to cut and paste into the expected declaration.
*/
@@ -395,8 +512,8 @@ void dump_mac(
dc += snprintf(dump + dc, sizeof(dump) - dc, "digest with key %u { ", keyid);
- for (idx = 0; idx < octets; idx++) {
- if (10 == idx) {
+ for (idx = 4; idx < octets; idx++) {
+ if (14 == idx) {
msyslog(LOG_DEBUG, "%s", dump);
dc = 0;
}
diff --git a/contrib/ntp/tests/libntp/run-digests.c b/contrib/ntp/tests/libntp/run-digests.c
index ae574d0e239e..bc56f1cb92e6 100644
--- a/contrib/ntp/tests/libntp/run-digests.c
+++ b/contrib/ntp/tests/libntp/run-digests.c
@@ -40,6 +40,9 @@ extern void test_Digest_MDC2(void);
extern void test_Digest_RIPEMD160(void);
extern void test_Digest_SHA1(void);
extern void test_Digest_SHAKE128(void);
+extern void test_Digest_DSA(void);
+extern void test_Digest_DSA_SHA(void);
+extern void test_Digest_SHA(void);
//=======Suite Setup=====
@@ -75,6 +78,9 @@ int main(int argc, char *argv[])
RUN_TEST(test_Digest_RIPEMD160, 275);
RUN_TEST(test_Digest_SHA1, 314);
RUN_TEST(test_Digest_SHAKE128, 353);
+ RUN_TEST(test_Digest_DSA, 390);
+ RUN_TEST(test_Digest_DSA_SHA, 429);
+ RUN_TEST(test_Digest_SHA, 468);
return (UnityEnd());
}
diff --git a/contrib/ntp/util/Makefile.am b/contrib/ntp/util/Makefile.am
index cef623c592d0..db0e8e65d747 100644
--- a/contrib/ntp/util/Makefile.am
+++ b/contrib/ntp/util/Makefile.am
@@ -4,7 +4,8 @@ bin_PROGRAMS= $(NTP_KEYGEN_DB) $(NTPTIME_DB) $(TICKADJ_DB) $(TIMETRIM_DB)
libexec_PROGRAMS= $(NTP_KEYGEN_DL) $(NTPTIME_DL) $(TICKADJ_DL) $(TIMETRIM_DL)
sbin_PROGRAMS= $(NTP_KEYGEN_DS) $(NTPTIME_DS) $(TICKADJ_DS) $(TIMETRIM_DS)
-EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize ntp-keygen \
+EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize lsf-times \
+ ntp-keygen \
ntptime pps-api precision sht testrs6000 tg tg2 tickadj timetrim
AM_CFLAGS = $(CFLAGS_NTP)
@@ -32,6 +33,7 @@ tickadj_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDAD
EXTRA_DIST= \
invoke-ntp-keygen.menu \
invoke-ntp-keygen.texi \
+ lsf-times.c \
ntp-keygen-opts.def \
ntp-keygen.1ntp-keygenman \
ntp-keygen.1ntp-keygenmdoc \
diff --git a/contrib/ntp/util/Makefile.in b/contrib/ntp/util/Makefile.in
index bfc308c6cc5f..f98e15193aa4 100644
--- a/contrib/ntp/util/Makefile.in
+++ b/contrib/ntp/util/Makefile.in
@@ -95,9 +95,11 @@ build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = audio-pcm$(EXEEXT) byteorder$(EXEEXT) hist$(EXEEXT) \
jitter$(EXEEXT) kern$(EXEEXT) longsize$(EXEEXT) \
- ntp-keygen$(EXEEXT) ntptime$(EXEEXT) pps-api$(EXEEXT) \
- precision$(EXEEXT) sht$(EXEEXT) testrs6000$(EXEEXT) \
- tg$(EXEEXT) tg2$(EXEEXT) tickadj$(EXEEXT) timetrim$(EXEEXT)
+ lsf-times$(EXEEXT) ntp-keygen$(EXEEXT) ntptime$(EXEEXT) \
+ pps-api$(EXEEXT) precision$(EXEEXT) sht$(EXEEXT) \
+ testrs6000$(EXEEXT) tg$(EXEEXT) tg2$(EXEEXT) tickadj$(EXEEXT) \
+ timetrim$(EXEEXT)
+@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp
subdir = util
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -184,6 +186,11 @@ longsize_OBJECTS = longsize.$(OBJEXT)
longsize_LDADD = $(LDADD)
longsize_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+lsf_times_SOURCES = lsf-times.c
+lsf_times_OBJECTS = lsf-times.$(OBJEXT)
+lsf_times_LDADD = $(LDADD)
+lsf_times_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_ntp_keygen_OBJECTS = ntp-keygen.$(OBJEXT) ntp-keygen-opts.$(OBJEXT)
nodist_ntp_keygen_OBJECTS = version.$(OBJEXT)
ntp_keygen_OBJECTS = $(am_ntp_keygen_OBJECTS) \
@@ -254,12 +261,13 @@ am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/audio-pcm.Po \
./$(DEPDIR)/byteorder.Po ./$(DEPDIR)/hist.Po \
./$(DEPDIR)/jitter.Po ./$(DEPDIR)/kern.Po \
- ./$(DEPDIR)/longsize.Po ./$(DEPDIR)/ntp-keygen-opts.Po \
- ./$(DEPDIR)/ntp-keygen.Po ./$(DEPDIR)/ntptime.Po \
- ./$(DEPDIR)/pps-api.Po ./$(DEPDIR)/precision.Po \
- ./$(DEPDIR)/sht.Po ./$(DEPDIR)/testrs6000.Po ./$(DEPDIR)/tg.Po \
- ./$(DEPDIR)/tg2.Po ./$(DEPDIR)/tickadj.Po \
- ./$(DEPDIR)/timetrim.Po ./$(DEPDIR)/version.Po
+ ./$(DEPDIR)/longsize.Po ./$(DEPDIR)/lsf-times.Po \
+ ./$(DEPDIR)/ntp-keygen-opts.Po ./$(DEPDIR)/ntp-keygen.Po \
+ ./$(DEPDIR)/ntptime.Po ./$(DEPDIR)/pps-api.Po \
+ ./$(DEPDIR)/precision.Po ./$(DEPDIR)/sht.Po \
+ ./$(DEPDIR)/testrs6000.Po ./$(DEPDIR)/tg.Po ./$(DEPDIR)/tg2.Po \
+ ./$(DEPDIR)/tickadj.Po ./$(DEPDIR)/timetrim.Po \
+ ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -280,12 +288,13 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = audio-pcm.c byteorder.c hist.c $(jitter_SOURCES) kern.c \
- longsize.c $(ntp_keygen_SOURCES) $(nodist_ntp_keygen_SOURCES) \
- ntptime.c pps-api.c precision.c sht.c testrs6000.c tg.c tg2.c \
- tickadj.c timetrim.c
+ longsize.c lsf-times.c $(ntp_keygen_SOURCES) \
+ $(nodist_ntp_keygen_SOURCES) ntptime.c pps-api.c precision.c \
+ sht.c testrs6000.c tg.c tg2.c tickadj.c timetrim.c
DIST_SOURCES = audio-pcm.c byteorder.c hist.c $(jitter_SOURCES) kern.c \
- longsize.c $(ntp_keygen_SOURCES) ntptime.c pps-api.c \
- precision.c sht.c testrs6000.c tg.c tg2.c tickadj.c timetrim.c
+ longsize.c lsf-times.c $(ntp_keygen_SOURCES) ntptime.c \
+ pps-api.c precision.c sht.c testrs6000.c tg.c tg2.c tickadj.c \
+ timetrim.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -513,6 +522,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_OPENSSL = @PATH_OPENSSL@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -632,6 +642,7 @@ tickadj_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDA
EXTRA_DIST = \
invoke-ntp-keygen.menu \
invoke-ntp-keygen.texi \
+ lsf-times.c \
ntp-keygen-opts.def \
ntp-keygen.1ntp-keygenman \
ntp-keygen.1ntp-keygenmdoc \
@@ -642,9 +653,9 @@ EXTRA_DIST = \
ntp-keygen.texi \
$(NULL)
-BUILT_SOURCES = ntp-keygen-opts.c ntp-keygen-opts.h check-libntp \
+BUILT_SOURCES = ntp-keygen-opts.c ntp-keygen-opts.h $(am__append_1) \
check-libopts .deps-ver
-CLEANFILES = .version version.c check-libntp check-libopts .deps-ver
+CLEANFILES = .version version.c check-libopts .deps-ver
DISTCLEANFILES = config.log $(man_MANS) $(DEPDIR)/deps-ver
html_DATA = \
$(srcdir)/ntp-keygen.html \
@@ -886,6 +897,10 @@ longsize$(EXEEXT): $(longsize_OBJECTS) $(longsize_DEPENDENCIES) $(EXTRA_longsize
@rm -f longsize$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(longsize_OBJECTS) $(longsize_LDADD) $(LIBS)
+lsf-times$(EXEEXT): $(lsf_times_OBJECTS) $(lsf_times_DEPENDENCIES) $(EXTRA_lsf_times_DEPENDENCIES)
+ @rm -f lsf-times$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lsf_times_OBJECTS) $(lsf_times_LDADD) $(LIBS)
+
ntp-keygen$(EXEEXT): $(ntp_keygen_OBJECTS) $(ntp_keygen_DEPENDENCIES) $(EXTRA_ntp_keygen_DEPENDENCIES)
@rm -f ntp-keygen$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ntp_keygen_OBJECTS) $(ntp_keygen_LDADD) $(LIBS)
@@ -938,6 +953,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kern.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/longsize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsf-times.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen-opts.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptime.Po@am__quote@ # am--include-marker
@@ -1233,6 +1249,7 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/jitter.Po
-rm -f ./$(DEPDIR)/kern.Po
-rm -f ./$(DEPDIR)/longsize.Po
+ -rm -f ./$(DEPDIR)/lsf-times.Po
-rm -f ./$(DEPDIR)/ntp-keygen-opts.Po
-rm -f ./$(DEPDIR)/ntp-keygen.Po
-rm -f ./$(DEPDIR)/ntptime.Po
@@ -1298,6 +1315,7 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/jitter.Po
-rm -f ./$(DEPDIR)/kern.Po
-rm -f ./$(DEPDIR)/longsize.Po
+ -rm -f ./$(DEPDIR)/lsf-times.Po
-rm -f ./$(DEPDIR)/ntp-keygen-opts.Po
-rm -f ./$(DEPDIR)/ntp-keygen.Po
-rm -f ./$(DEPDIR)/ntptime.Po
@@ -1418,11 +1436,10 @@ install-exec-hook:
#
-check-libntp: $(top_builddir)/libntp/libntp.a
- @: avoid default SCCS get by some make implementations
+.PHONY: check-libntp
-$(top_builddir)/libntp/libntp.a:
- cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+@LIBNTP_SUBMAKES_TRUE@check-libntp:
+@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
check-libopts: ../sntp/libopts/libopts.la
@echo stamp > $@
@@ -1432,10 +1449,9 @@ check-libopts: ../sntp/libopts/libopts.la
$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
$(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+.PHONY: FRC.scm-rev
FRC.scm-rev:
- @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
- always out-of-date causing targets which depend on it to also \
- be outdated so their rules to fire each time they are built.
+ @: FRC.scm-rev is always out of date, triggering the check every make invocation.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/util/invoke-ntp-keygen.texi b/contrib/ntp/util/invoke-ntp-keygen.texi
index 2ee45b30970c..a4571231a4f6 100644
--- a/contrib/ntp/util/invoke-ntp-keygen.texi
+++ b/contrib/ntp/util/invoke-ntp-keygen.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
#
-# It has been AutoGen-ed June 6, 2023 at 04:38:29 AM by AutoGen 5.18.16
+# It has been AutoGen-ed May 25, 2024 at 12:04:48 AM by AutoGen 5.18.16
# From the definitions ntp-keygen-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -1056,7 +1056,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p17
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p18
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/contrib/ntp/util/lsf-times.c b/contrib/ntp/util/lsf-times.c
new file mode 100644
index 000000000000..5b719e13360f
--- /dev/null
+++ b/contrib/ntp/util/lsf-times.c
@@ -0,0 +1,220 @@
+#include "config.h"
+#include "ntp_calendar.h"
+
+#include <stdlib.h>
+#include <errno.h>
+
+#include "ntp_types.h"
+#include "ntp_fp.h"
+#include "vint64ops.h"
+
+/*
+ * If we're called with 1 arg, it's a u_long timestamp.
+ * If we're called with 3 args, we're expecting YYYY MM DD,
+ * and MM must be 6 or 12, and DD must be 28,
+ * If we're called with 2 args, we're expecting YYYY MM, and
+ * MM mst be 6 or 12, and we assume DD is 28.
+ */
+
+char *progname;
+static const char *MONTHS[] =
+ { "January", "February", "March", "April", "May", "June",
+ "July", "August", "September", "October", "November",
+ "December" };
+
+void usage(void);
+
+void
+usage(void)
+{
+ printf("Usage:\n");
+ printf(" %s nnnnnn\n", progname);
+ printf(" %s YYYY [6|12]\n", progname);
+ printf(" %s YYYY [6|12] 28\n", progname);
+
+ return;
+}
+
+
+int
+main(
+ int argc, /* command line options */
+ char **argv /* poiniter to list of tokens */
+ )
+{
+ int err = 0;
+ vint64 expires;
+ unsigned int year = 0;
+ unsigned int mon = 0;
+ unsigned int dom = 0;
+ int scount;
+ char *ep;
+ struct calendar cal = {0};
+
+ progname = argv[0];
+
+ switch(argc) {
+ case 2: /* 1 arg, must be a string of digits */
+ expires = strtouv64(argv[1], &ep, 10);
+
+ if (0 == *ep) {
+ ntpcal_ntp64_to_date(&cal, &expires);
+
+ printf("%02u %s %04u %02u:%02u:%02u\n"
+ , cal.monthday
+ , MONTHS[cal.month - 1]
+ , cal.year
+ , cal.hour
+ , cal.minute
+ , cal.second
+ );
+
+ exit(0);
+ } else {
+ printf("1 arg, but not a string of digits: <%s>\n",
+ argv[1]);
+ err = 1;
+ }
+ break;
+ ;;
+ case 3: /* 2 args, must be YY MM, where MM is 6 or 12 */
+ dom = 28;
+ scount = sscanf(argv[1], "%u", &year);
+ if (1 == scount) {
+ // printf("2 args: year %u\n", year);
+ } else {
+ printf("2 args, but #1 is not a string of digits: <%s>\n", argv[1]);
+ err = 1;
+ }
+
+ scount = sscanf(argv[2], "%u", &mon);
+ if (1 == scount) {
+ if (6 == mon || 12 == mon) {
+ // printf("2 args: month %u\n", mon);
+ } else {
+ printf("2 arg, but #2 is not 6 or 12: <%d>\n", mon);
+ err = 1;
+ }
+ } else {
+ printf("2 arg, but #2 is not a string of digits: <%s>\n", argv[2]);
+ err = 1;
+ }
+
+ break;
+ ;;
+ case 4: /* 3 args, YY MM DD, where MM is 6 or 12, DD is 28 */
+ scount = sscanf(argv[1], "%u", &year);
+ if (1 == scount) {
+ // printf("3 args: year %u\n", year);
+ } else {
+ printf("3 args, but #1 is not a string of digits: <%s>\n", argv[1]);
+ err = 1;
+ }
+
+ scount = sscanf(argv[2], "%u", &mon);
+ if (1 == scount) {
+ if (6 == mon || 12 == mon) {
+ // printf("3 args: month %u\n", mon);
+ } else {
+ printf("3 arg, but #2 is not 6 or 12: <%d>\n", mon);
+ err = 1;
+ }
+ } else {
+ printf("3 arg, but #2 is not a string of digits: <%s>\n", argv[2]);
+ err = 1;
+ }
+
+ scount = sscanf(argv[3], "%u", &dom);
+ if (1 == scount) {
+ if (28 == dom) {
+ // printf("3 args: dom %u\n", dom);
+ } else {
+ printf("3 arg, but #3 is not 28: <%d>\n", dom);
+ err = 1;
+ }
+ } else {
+ printf("3 arg, but #3 is not a string of digits: <%s>\n", argv[2]);
+ err = 1;
+ }
+
+ break;
+ ;;
+ default:
+ err = 1;
+ break;
+ ;;
+ }
+
+ if (err) {
+ usage();
+ exit(err);
+ }
+
+ cal.year = year;
+ cal.month = mon;
+ cal.monthday = dom;
+ cal.hour = 0;
+ cal.minute = 0;
+ cal.second = 0;
+
+ printf("%u ", ntpcal_date_to_ntp(&cal));
+
+ printf("%02d %s %04d "
+ , cal.monthday
+ , MONTHS[cal.month - 1]
+ , cal.year
+ );
+ printf("\n");
+
+ exit(err);
+}
+
+#if 0
+
+
+void
+test_DateGivenMonthDay(void) {
+ // 2010-06-24 12:50:00
+ struct calendar input = {2010, 0, 6, 24, 12, 50, 0};
+
+ u_long expected = 3486372600UL; // This is the timestamp above.
+
+ TEST_ASSERT_EQUAL_UINT(expected, caltontp(&input));
+}
+
+void
+test_DateGivenYearDay(void) {
+ // 2010-06-24 12:50:00
+ // This is the 175th day of 2010.
+ struct calendar input = {2010, 175, 0, 0, 12, 50, 0};
+
+ u_long expected = 3486372600UL; // This is the timestamp above.
+
+ TEST_ASSERT_EQUAL_UINT(expected, caltontp(&input));
+}
+
+void
+test_DateLeapYear(void) {
+ // 2012-06-24 12:00:00
+ // This is the 176th day of 2012 (since 2012 is a leap year).
+ struct calendar inputYd = {2012, 176, 0, 0, 12, 00, 00};
+ struct calendar inputMd = {2012, 0, 6, 24, 12, 00, 00};
+
+ u_long expected = 3549528000UL;
+
+ TEST_ASSERT_EQUAL_UINT(expected, caltontp(&inputYd));
+ TEST_ASSERT_EQUAL_UINT(expected, caltontp(&inputMd));
+}
+
+void
+test_WraparoundDateIn2036(void) {
+ // 2036-02-07 06:28:16
+ // This is (one) wrapping boundary where we go from ULONG_MAX to 0.
+ struct calendar input = {2036, 0, 2, 7, 6, 28, 16};
+
+ u_long expected = 0UL;
+
+ TEST_ASSERT_EQUAL_UINT(expected, caltontp(&input));
+}
+
+#endif
diff --git a/contrib/ntp/util/ntp-keygen-opts.c b/contrib/ntp/util/ntp-keygen-opts.c
index fb3c78fdff51..6d532651e3b2 100644
--- a/contrib/ntp/util/ntp-keygen-opts.c
+++ b/contrib/ntp/util/ntp-keygen-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed June 6, 2023 at 04:38:24 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:43 AM by AutoGen 5.18.16
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntp-keygen program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -76,8 +76,8 @@ extern FILE * option_usage_fp;
* static const strings for ntp-keygen options
*/
static char const ntp_keygen_opt_strs[2443] =
-/* 0 */ "ntp-keygen (ntp) 4.2.8p17\n"
- "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/* 0 */ "ntp-keygen (ntp) 4.2.8p18\n"
+ "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -169,14 +169,14 @@ static char const ntp_keygen_opt_strs[2443] =
/* 2223 */ "no-load-opts\0"
/* 2236 */ "no\0"
/* 2239 */ "NTP_KEYGEN\0"
-/* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p17\n"
+/* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p18\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 2365 */ "$HOME\0"
/* 2371 */ ".\0"
/* 2373 */ ".ntprc\0"
/* 2380 */ "https://bugs.ntp.org, bugs@ntp.org\0"
/* 2415 */ "\n\0"
-/* 2417 */ "ntp-keygen (ntp) 4.2.8p17";
+/* 2417 */ "ntp-keygen (ntp) 4.2.8p18";
/**
* imbits option description:
@@ -1314,8 +1314,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntp_keygenOptions.pzCopyright */
- puts(_("ntp-keygen (ntp) 4.2.8p17\n\
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntp-keygen (ntp) 4.2.8p18\n\
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1413,14 +1413,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntp_keygenOptions.pzUsageTitle */
- puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p17\n\
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p18\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntp_keygenOptions.pzExplain */
puts(_("\n"));
/* referenced via ntp_keygenOptions.pzFullVersion */
- puts(_("ntp-keygen (ntp) 4.2.8p17"));
+ puts(_("ntp-keygen (ntp) 4.2.8p18"));
/* referenced via ntp_keygenOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/util/ntp-keygen-opts.h b/contrib/ntp/util/ntp-keygen-opts.h
index 9e266d2b164f..a2cb606e0af2 100644
--- a/contrib/ntp/util/ntp-keygen-opts.h
+++ b/contrib/ntp/util/ntp-keygen-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed June 6, 2023 at 04:38:23 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed May 25, 2024 at 12:04:42 AM by AutoGen 5.18.16
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntp-keygen program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -102,9 +102,9 @@ typedef enum {
/** count of all options for ntp-keygen */
#define OPTION_CT 26
/** ntp-keygen version */
-#define NTP_KEYGEN_VERSION "4.2.8p17"
+#define NTP_KEYGEN_VERSION "4.2.8p18"
/** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p17"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p18"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/util/ntp-keygen.1ntp-keygenman b/contrib/ntp/util/ntp-keygen.1ntp-keygenman
index f96a7689b17c..23fb3e1dc5cd 100644
--- a/contrib/ntp/util/ntp-keygen.1ntp-keygenman
+++ b/contrib/ntp/util/ntp-keygen.1ntp-keygenman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen 1ntp-keygenman "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:32 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:51 AM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1351,7 +1351,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
It can take quite a while to generate some cryptographic values.
diff --git a/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc b/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
index ce6b988d7670..9ac815e24657 100644
--- a/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
+++ b/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:27 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:46 AM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1208,7 +1208,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
It can take quite a while to generate some cryptographic values.
diff --git a/contrib/ntp/util/ntp-keygen.c b/contrib/ntp/util/ntp-keygen.c
index ff9d6cad8980..c9c0ff9ef75f 100644
--- a/contrib/ntp/util/ntp-keygen.c
+++ b/contrib/ntp/util/ntp-keygen.c
@@ -409,11 +409,11 @@ main(
iffkey++;
if (HAVE_OPT( MV_PARAMS )) {
- mvkey++;
+ mvkey++; /* DLH are these two swapped? */
nkeys = OPT_VALUE_MV_PARAMS;
}
if (HAVE_OPT( MV_KEYS )) {
- mvpar++;
+ mvpar++; /* not used! */ /* DLH are these two swapped? */
nkeys = OPT_VALUE_MV_KEYS;
}
@@ -642,12 +642,13 @@ main(
}
}
if (pkey_gqkey != NULL) {
- RSA *rsa;
- const BIGNUM *q;
+ RSA *rsa;
+ const BIGNUM *q;
- rsa = EVP_PKEY_get0_RSA(pkey_gqkey);
+ rsa = EVP_PKEY_get1_RSA(pkey_gqkey);
RSA_get0_factors(rsa, NULL, &q);
grpkey = BN_bn2hex(q);
+ RSA_free(rsa);
}
/*
@@ -664,17 +665,19 @@ main(
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
ctime(&epoch));
- /* XXX: This modifies the private key and should probably use a
- * copy of it instead. */
- rsa = EVP_PKEY_get0_RSA(pkey_gqkey);
+ rsa = EVP_PKEY_get1_RSA(pkey_gqkey);
RSA_set0_factors(rsa, BN_dup(BN_value_one()), BN_dup(BN_value_one()));
pkey = EVP_PKEY_new();
EVP_PKEY_assign_RSA(pkey, rsa);
PEM_write_PKCS8PrivateKey(stdout, pkey, NULL, NULL, 0,
NULL, NULL);
fflush(stdout);
- if (debug)
+ if (debug) {
RSA_print_fp(stderr, rsa, 0);
+ }
+ EVP_PKEY_free(pkey);
+ pkey = NULL;
+ RSA_free(rsa);
}
/*
@@ -689,14 +692,18 @@ main(
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
ctime(&epoch));
- rsa = EVP_PKEY_get0_RSA(pkey_gqkey);
+ rsa = EVP_PKEY_get1_RSA(pkey_gqkey);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_RSA(pkey, rsa);
PEM_write_PKCS8PrivateKey(stdout, pkey, cipher, NULL, 0,
NULL, passwd2);
fflush(stdout);
- if (debug)
+ if (debug) {
RSA_print_fp(stderr, rsa, 0);
+ }
+ EVP_PKEY_free(pkey);
+ pkey = NULL;
+ RSA_free(rsa);
}
/*
@@ -730,17 +737,19 @@ main(
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
ctime(&epoch));
- /* XXX: This modifies the private key and should probably use a
- * copy of it instead. */
- dsa = EVP_PKEY_get0_DSA(pkey_iffkey);
+ dsa = EVP_PKEY_get1_DSA(pkey_iffkey);
DSA_set0_key(dsa, NULL, BN_dup(BN_value_one()));
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
PEM_write_PKCS8PrivateKey(stdout, pkey, NULL, NULL, 0,
NULL, NULL);
fflush(stdout);
- if (debug)
+ if (debug) {
DSA_print_fp(stderr, dsa, 0);
+ }
+ EVP_PKEY_free(pkey);
+ pkey = NULL;
+ DSA_free(dsa);
}
/*
@@ -755,14 +764,18 @@ main(
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
ctime(&epoch));
- dsa = EVP_PKEY_get0_DSA(pkey_iffkey);
+ dsa = EVP_PKEY_get1_DSA(pkey_iffkey);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
PEM_write_PKCS8PrivateKey(stdout, pkey, cipher, NULL, 0,
NULL, passwd2);
fflush(stdout);
- if (debug)
+ if (debug) {
DSA_print_fp(stderr, dsa, 0);
+ }
+ EVP_PKEY_free(pkey);
+ pkey = NULL;
+ DSA_free(dsa);
}
/*
@@ -799,8 +812,9 @@ main(
PEM_write_PKCS8PrivateKey(stdout, pkey, NULL, NULL, 0,
NULL, NULL);
fflush(stdout);
- if (debug)
+ if (debug) {
DSA_print_fp(stderr, EVP_PKEY_get0_DSA(pkey), 0);
+ }
}
/*
@@ -817,8 +831,9 @@ main(
PEM_write_PKCS8PrivateKey(stdout, pkey, cipher, NULL, 0,
NULL, passwd2);
fflush(stdout);
- if (debug)
+ if (debug) {
DSA_print_fp(stderr, EVP_PKEY_get0_DSA(pkey), 0);
+ }
}
/*
@@ -830,7 +845,7 @@ main(
fprintf(stderr,
"Invalid digest/signature combination %s\n",
scheme);
- exit (-1);
+ exit (-1);
}
x509(pkey_sign, ectx, grpkey, exten, certname);
#endif /* AUTOKEY */
diff --git a/contrib/ntp/util/ntp-keygen.html b/contrib/ntp/util/ntp-keygen.html
index 0d16b09b5b46..4027f108af31 100644
--- a/contrib/ntp/util/ntp-keygen.html
+++ b/contrib/ntp/util/ntp-keygen.html
@@ -84,7 +84,7 @@ All other files are in PEM-encoded
printable ASCII format so they can be embedded as MIME attachments in
mail to other sites.
</p>
-<p>This document applies to version 4.2.8p17 of <code>ntp-keygen</code>.
+<p>This document applies to version 4.2.8p18 of <code>ntp-keygen</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Description" accesskey="1">Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
@@ -1380,7 +1380,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p17
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p18
Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/contrib/ntp/util/ntp-keygen.man.in b/contrib/ntp/util/ntp-keygen.man.in
index 1495530155b6..284d52409bcb 100644
--- a/contrib/ntp/util/ntp-keygen.man.in
+++ b/contrib/ntp/util/ntp-keygen.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen @NTP_KEYGEN_MS@ "06 Jun 2023" "ntp (4.2.8p17)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "25 May 2024" "ntp (4.2.8p18)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:32 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:51 AM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1351,7 +1351,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
It can take quite a while to generate some cryptographic values.
diff --git a/contrib/ntp/util/ntp-keygen.mdoc.in b/contrib/ntp/util/ntp-keygen.mdoc.in
index 44b1954cc648..c0feb670e118 100644
--- a/contrib/ntp/util/ntp-keygen.mdoc.in
+++ b/contrib/ntp/util/ntp-keygen.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 6 2023
+.Dd May 25 2024
.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2023 at 04:38:27 AM by AutoGen 5.18.16
+.\" It has been AutoGen-ed May 25, 2024 at 12:04:46 AM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1208,7 +1208,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
It can take quite a while to generate some cryptographic values.
diff --git a/contrib/ofed/libibverbs/libibverbs.map b/contrib/ofed/libibverbs/libibverbs.map
index d94743389f47..52b7f2efd495 100644
--- a/contrib/ofed/libibverbs/libibverbs.map
+++ b/contrib/ofed/libibverbs/libibverbs.map
@@ -137,6 +137,4 @@ IBVERBS_PRIVATE_14 {
verbs_register_driver;
verbs_init_cq;
verbs_cleanup_cq;
- ibv_init_wq;
- ibv_cleanup_wq;
};
diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES
index a043b356fafa..c4eef3bd8ea0 100644
--- a/contrib/one-true-awk/FIXES
+++ b/contrib/one-true-awk/FIXES
@@ -25,6 +25,20 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the
second edition of the AWK book was published in September 2023.
+Apr 22, 2024:
+ fixed regex engine gototab reallocation issue that was
+ introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
+ Fixed a scan bug in split in the case the separator is a single
+ character. thanks to Oguz Ismail for spotting the issue.
+
+Mar 10, 2024:
+ fixed use-after-free bug in fnematch due to adjbuf invalidating
+ the pointers to buf. thanks to github user caffe3 for spotting
+ the issue and providing a fix, and to Miguel Pineiro Jr.
+ for the alternative fix.
+ MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
+ thanks to Miguel Pineiro Jr.
+
Jan 22, 2024:
Restore the ability to compile with g++. Thanks to
Arnold Robbins.
diff --git a/contrib/one-true-awk/b.c b/contrib/one-true-awk/b.c
index 4c438fab4cd4..f650269753c7 100644
--- a/contrib/one-true-awk/b.c
+++ b/contrib/one-true-awk/b.c
@@ -651,8 +651,8 @@ static int set_gototab(fa *f, int state, int ch, int val) /* hide gototab implem
if (tab->inuse + 1 >= tab->allocated)
resize_gototab(f, state);
- f->gototab[state].entries[f->gototab[state].inuse-1].ch = ch;
- f->gototab[state].entries[f->gototab[state].inuse-1].state = val;
+ f->gototab[state].entries[f->gototab[state].inuse].ch = ch;
+ f->gototab[state].entries[f->gototab[state].inuse].state = val;
f->gototab[state].inuse++;
return val;
} else {
@@ -677,9 +677,9 @@ static int set_gototab(fa *f, int state, int ch, int val) /* hide gototab implem
gtt *tab = & f->gototab[state];
if (tab->inuse + 1 >= tab->allocated)
resize_gototab(f, state);
- ++tab->inuse;
f->gototab[state].entries[tab->inuse].ch = ch;
f->gototab[state].entries[tab->inuse].state = val;
+ ++tab->inuse;
qsort(f->gototab[state].entries,
f->gototab[state].inuse, sizeof(gtte), entry_cmp);
@@ -830,8 +830,6 @@ int nematch(fa *f, const char *p0) /* non-empty match, for sub */
}
-#define MAX_UTF_BYTES 4 // UTF-8 is up to 4 bytes long
-
/*
* NAME
* fnematch
@@ -868,16 +866,28 @@ bool fnematch(fa *pfa, FILE *f, char **pbuf, int *pbufsize, int quantum)
do {
/*
- * Call u8_rune with at least MAX_UTF_BYTES ahead in
+ * Call u8_rune with at least awk_mb_cur_max ahead in
* the buffer until EOF interferes.
*/
- if (k - j < MAX_UTF_BYTES) {
- if (k + MAX_UTF_BYTES > buf + bufsize) {
+ if (k - j < awk_mb_cur_max) {
+ if (k + awk_mb_cur_max > buf + bufsize) {
+ char *obuf = buf;
adjbuf((char **) &buf, &bufsize,
- bufsize + MAX_UTF_BYTES,
+ bufsize + awk_mb_cur_max,
quantum, 0, "fnematch");
+
+ /* buf resized, maybe moved. update pointers */
+ *pbufsize = bufsize;
+ if (obuf != buf) {
+ i = buf + (i - obuf);
+ j = buf + (j - obuf);
+ k = buf + (k - obuf);
+ *pbuf = buf;
+ if (patlen)
+ patbeg = buf + (patbeg - obuf);
+ }
}
- for (n = MAX_UTF_BYTES ; n > 0; n--) {
+ for (n = awk_mb_cur_max ; n > 0; n--) {
*k++ = (c = getc(f)) != EOF ? c : 0;
if (c == EOF) {
if (ferror(f))
@@ -914,10 +924,6 @@ bool fnematch(fa *pfa, FILE *f, char **pbuf, int *pbufsize, int quantum)
s = 2;
} while (1);
- /* adjbuf() may have relocated a resized buffer. Inform the world. */
- *pbuf = buf;
- *pbufsize = bufsize;
-
if (patlen) {
/*
* Under no circumstances is the last character fed to
diff --git a/contrib/one-true-awk/bugs-fixed/REGRESS b/contrib/one-true-awk/bugs-fixed/REGRESS
index acdbeebb6271..30bdc7cd5c0f 100755
--- a/contrib/one-true-awk/bugs-fixed/REGRESS
+++ b/contrib/one-true-awk/bugs-fixed/REGRESS
@@ -27,6 +27,6 @@ do
then
rm -f $OUT
else
- echo '++++ $i failed!'
+ echo "+++ $i failed!"
fi
done
diff --git a/contrib/one-true-awk/bugs-fixed/system-status.ok2 b/contrib/one-true-awk/bugs-fixed/system-status.ok2
new file mode 100644
index 000000000000..f1f631e1cb33
--- /dev/null
+++ b/contrib/one-true-awk/bugs-fixed/system-status.ok2
@@ -0,0 +1,3 @@
+normal status 42
+death by signal status 257
+death by signal with core dump status 262
diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c
index 73af89ec1058..0e70288a92f3 100644
--- a/contrib/one-true-awk/main.c
+++ b/contrib/one-true-awk/main.c
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
-const char *version = "version 20240122";
+const char *version = "version 20240422";
#define DEBUG
#include <stdio.h>
diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c
index ede3ba7d9827..9c61b1a1c558 100644
--- a/contrib/one-true-awk/run.c
+++ b/contrib/one-true-awk/run.c
@@ -1827,7 +1827,7 @@ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */
for (;;) {
n++;
t = s;
- while (*s != sep && *s != '\n' && *s != '\0')
+ while (*s != sep && *s != '\0')
s++;
temp = *s;
setptr(s, '\0');
@@ -2501,7 +2501,7 @@ void backsub(char **pb_ptr, const char **sptr_ptr);
Cell *dosub(Node **a, int subop) /* sub and gsub */
{
fa *pfa;
- int tempstat;
+ int tempstat = 0;
char *repl;
Cell *x;
diff --git a/contrib/pf/authpf/authpf.8 b/contrib/pf/authpf/authpf.8
index ada4c6a5a11a..70b59ce212c8 100644
--- a/contrib/pf/authpf/authpf.8
+++ b/contrib/pf/authpf/authpf.8
@@ -44,7 +44,7 @@ It is meant to be used with users who can connect via
only, and requires the
.Xr pf 4
subsystem and an
-.Xr fdescfs 5
+.Xr fdescfs 4
file system mounted at
.Pa /dev/fd
to be enabled.
@@ -561,8 +561,8 @@ pass out on $internal_if from (self) to $workstation_ip port 3389 \e
.It Pa /etc/authpf/authpf.problem
.El
.Sh SEE ALSO
+.Xr fdescfs 4 ,
.Xr pf 4 ,
-.Xr fdescfs 5 ,
.Xr pf.conf 5 ,
.Xr securelevel 7 ,
.Xr ftp-proxy 8
diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c
index 81dbcb747f5f..fcf9812cdcca 100644
--- a/contrib/pf/authpf/authpf.c
+++ b/contrib/pf/authpf/authpf.c
@@ -56,7 +56,6 @@ static int change_filter(int, const char *, const char *);
static int change_table(int, const char *);
static void authpf_kill_states(void);
-int dev; /* pf device */
struct pfctl_handle *pfh;
char anchorname[PF_ANCHOR_NAME_SIZE] = "authpf";
char rulesetname[MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 2];
@@ -135,9 +134,8 @@ main(void)
exit(1);
}
/* open the pf device */
- dev = open(PATH_DEVFILE, O_RDWR);
pfh = pfctl_open(PATH_DEVFILE);
- if (dev == -1 || pfh == NULL) {
+ if (pfh == NULL) {
syslog(LOG_ERR, "cannot open packet filter device (%m)");
goto die;
}
@@ -648,7 +646,7 @@ remove_stale_rulesets(void)
memset(&prs, 0, sizeof(prs));
strlcpy(prs.path, anchorname, sizeof(prs.path));
- if (ioctl(dev, DIOCGETRULESETS, &prs)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, &prs)) {
if (errno == EINVAL)
return (0);
else
@@ -661,7 +659,7 @@ remove_stale_rulesets(void)
pid_t pid;
prs.nr = nr - 1;
- if (ioctl(dev, DIOCGETRULESET, &prs))
+ if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, &prs))
return (1);
errno = 0;
if ((t = strchr(prs.name, '(')) == NULL)
@@ -705,8 +703,8 @@ recursive_ruleset_purge(char *an, char *rs)
snprintf(t_e[i].anchor, sizeof(t_e[i].anchor), "%s/%s", an, rs);
}
t_e[PF_RULESET_MAX].rs_num = PF_RULESET_TABLE;
- if ((ioctl(dev, DIOCXBEGIN, t) ||
- ioctl(dev, DIOCXCOMMIT, t)) &&
+ if ((ioctl(pfctl_fd(pfh), DIOCXBEGIN, t) ||
+ ioctl(pfctl_fd(pfh), DIOCXCOMMIT, t)) &&
errno != EINVAL)
goto cleanup;
@@ -714,7 +712,7 @@ recursive_ruleset_purge(char *an, char *rs)
if ((prs = calloc(1, sizeof(struct pfioc_ruleset))) == NULL)
goto no_mem;
snprintf(prs->path, sizeof(prs->path), "%s/%s", an, rs);
- if (ioctl(dev, DIOCGETRULESETS, prs)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, prs)) {
if (errno != EINVAL)
goto cleanup;
errno = 0;
@@ -723,7 +721,7 @@ recursive_ruleset_purge(char *an, char *rs)
while (nr) {
prs->nr = 0;
- if (ioctl(dev, DIOCGETRULESET, prs))
+ if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, prs))
goto cleanup;
if (recursive_ruleset_purge(prs->path, prs->name))
@@ -769,7 +767,7 @@ change_filter(int add, const char *l_user, const char *ip_src)
if (asprintf(&rsn, "%s/%s", anchorname, rulesetname) == -1)
goto no_mem;
- if (asprintf(&fdpath, "/dev/fd/%d", dev) == -1)
+ if (asprintf(&fdpath, "/dev/fd/%d", pfctl_fd(pfh)) == -1)
goto no_mem;
if (asprintf(&ipstr, "user_ip=%s", ip_src) == -1)
goto no_mem;
@@ -868,7 +866,7 @@ change_table(int add, const char *ip_src)
return (-1);
}
- if (ioctl(dev, add ? DIOCRADDADDRS : DIOCRDELADDRS, &io) &&
+ if (ioctl(pfctl_fd(pfh), add ? DIOCRADDADDRS : DIOCRDELADDRS, &io) &&
errno != ESRCH) {
syslog(LOG_ERR, "cannot %s %s from table %s: %s",
add ? "add" : "remove", ip_src, tablename,
diff --git a/contrib/pf/ftp-proxy/filter.c b/contrib/pf/ftp-proxy/filter.c
index 612e35c4ac6e..7893be97f9b2 100644
--- a/contrib/pf/ftp-proxy/filter.c
+++ b/contrib/pf/ftp-proxy/filter.c
@@ -57,7 +57,7 @@ static uint32_t pfticket;
static uint32_t pfpool_ticket;
static struct pfioc_trans pft;
static struct pfioc_trans_e pfte[TRANS_SIZE];
-static int dev, rule_log;
+static int rule_log;
static struct pfctl_handle *pfh = NULL;
static const char *qname, *tagname;
@@ -104,7 +104,7 @@ add_nat(u_int32_t id, struct sockaddr *src, struct sockaddr *dst,
&satosin6(nat)->sin6_addr.s6_addr, 16);
memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16);
}
- if (ioctl(dev, DIOCADDADDR, &pfp) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1)
return (-1);
pfrule.rpool.proxy_port[0] = nat_range_low;
@@ -138,7 +138,7 @@ add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst,
&satosin6(rdr)->sin6_addr.s6_addr, 16);
memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16);
}
- if (ioctl(dev, DIOCADDADDR, &pfp) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1)
return (-1);
pfrule.rpool.proxy_port[0] = rdr_port;
@@ -152,7 +152,7 @@ add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst,
int
do_commit(void)
{
- if (ioctl(dev, DIOCXCOMMIT, &pft) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCXCOMMIT, &pft) == -1)
return (-1);
return (0);
@@ -161,7 +161,7 @@ do_commit(void)
int
do_rollback(void)
{
- if (ioctl(dev, DIOCXROLLBACK, &pft) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCXROLLBACK, &pft) == -1)
return (-1);
return (0);
@@ -180,13 +180,10 @@ init_filter(const char *opt_qname, const char *opt_tagname, int opt_verbose)
else if (opt_verbose == 2)
rule_log = PF_LOG_ALL;
- dev = open("/dev/pf", O_RDWR);
- if (dev == -1)
- err(1, "open /dev/pf");
pfh = pfctl_open(PF_DEVICE);
if (pfh == NULL)
err(1, "pfctl_open");
- status = pfctl_get_status(dev);
+ status = pfctl_get_status_h(pfh);
if (status == NULL)
err(1, "DIOCGETSTATUS");
if (!status->running)
@@ -227,7 +224,7 @@ prepare_commit(u_int32_t id)
}
}
- if (ioctl(dev, DIOCXBEGIN, &pft) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCXBEGIN, &pft) == -1)
return (-1);
return (0);
@@ -266,7 +263,7 @@ prepare_rule(u_int32_t id, int rs_num, struct sockaddr *src,
errno = EINVAL;
return (-1);
}
- if (ioctl(dev, DIOCBEGINADDRS, &pfp) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCBEGINADDRS, &pfp) == -1)
return (-1);
pfpool_ticket = pfp.ticket;
@@ -366,7 +363,7 @@ server_lookup4(struct sockaddr_in *client, struct sockaddr_in *proxy,
pnl.sport = client->sin_port;
pnl.dport = proxy->sin_port;
- if (ioctl(dev, DIOCNATLOOK, &pnl) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCNATLOOK, &pnl) == -1)
return (-1);
memset(server, 0, sizeof(struct sockaddr_in));
@@ -394,7 +391,7 @@ server_lookup6(struct sockaddr_in6 *client, struct sockaddr_in6 *proxy,
pnl.sport = client->sin6_port;
pnl.dport = proxy->sin6_port;
- if (ioctl(dev, DIOCNATLOOK, &pnl) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCNATLOOK, &pnl) == -1)
return (-1);
memset(server, 0, sizeof(struct sockaddr_in6));
diff --git a/contrib/pf/tftp-proxy/filter.c b/contrib/pf/tftp-proxy/filter.c
index f372ddd0aeae..1e6d54303996 100644
--- a/contrib/pf/tftp-proxy/filter.c
+++ b/contrib/pf/tftp-proxy/filter.c
@@ -61,7 +61,7 @@ static char pfanchor[PF_ANCHOR_NAME_SIZE];
static char pfanchor_call[PF_ANCHOR_NAME_SIZE];
static struct pfioc_trans pft;
static struct pfioc_trans_e pfte[TRANS_SIZE];
-static int dev, rule_log;
+static int rule_log;
static struct pfctl_handle *pfh = NULL;
static char *qname;
@@ -108,7 +108,7 @@ add_nat(u_int32_t id, struct sockaddr *src, struct sockaddr *dst,
&satosin6(nat)->sin6_addr.s6_addr, 16);
memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16);
}
- if (ioctl(dev, DIOCADDADDR, &pfp) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1)
return (-1);
pfrule.rpool.proxy_port[0] = nat_range_low;
@@ -142,7 +142,7 @@ add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst,
&satosin6(rdr)->sin6_addr.s6_addr, 16);
memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16);
}
- if (ioctl(dev, DIOCADDADDR, &pfp) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCADDADDR, &pfp) == -1)
return (-1);
pfrule.rpool.proxy_port[0] = rdr_port;
@@ -156,7 +156,7 @@ add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst,
int
do_commit(void)
{
- if (ioctl(dev, DIOCXCOMMIT, &pft) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCXCOMMIT, &pft) == -1)
return (-1);
return (0);
@@ -165,7 +165,7 @@ do_commit(void)
int
do_rollback(void)
{
- if (ioctl(dev, DIOCXROLLBACK, &pft) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCXROLLBACK, &pft) == -1)
return (-1);
return (0);
@@ -183,17 +183,12 @@ init_filter(char *opt_qname, int opt_verbose)
else if (opt_verbose == 2)
rule_log = PF_LOG_ALL;
- dev = open("/dev/pf", O_RDWR);
- if (dev == -1) {
- syslog(LOG_ERR, "can't open /dev/pf");
- exit(1);
- }
pfh = pfctl_open(PF_DEVICE);
if (pfh == NULL) {
syslog(LOG_ERR, "can't pfctl_open()");
exit(1);
}
- status = pfctl_get_status(dev);
+ status = pfctl_get_status_h(pfh);
if (status == NULL) {
syslog(LOG_ERR, "DIOCGETSTATUS");
exit(1);
@@ -238,7 +233,7 @@ prepare_commit(u_int32_t id)
}
}
- if (ioctl(dev, DIOCXBEGIN, &pft) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCXBEGIN, &pft) == -1)
return (-1);
return (0);
@@ -277,7 +272,7 @@ prepare_rule(u_int32_t id, int rs_num, struct sockaddr *src,
errno = EINVAL;
return (-1);
}
- if (ioctl(dev, DIOCBEGINADDRS, &pfp) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCBEGINADDRS, &pfp) == -1)
return (-1);
pfpool_ticket = pfp.ticket;
@@ -379,7 +374,7 @@ server_lookup4(struct sockaddr_in *client, struct sockaddr_in *proxy,
pnl.sport = client->sin_port;
pnl.dport = proxy->sin_port;
- if (ioctl(dev, DIOCNATLOOK, &pnl) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCNATLOOK, &pnl) == -1)
return (-1);
memset(server, 0, sizeof(struct sockaddr_in));
@@ -407,7 +402,7 @@ server_lookup6(struct sockaddr_in6 *client, struct sockaddr_in6 *proxy,
pnl.sport = client->sin6_port;
pnl.dport = proxy->sin6_port;
- if (ioctl(dev, DIOCNATLOOK, &pnl) == -1)
+ if (ioctl(pfctl_fd(pfh), DIOCNATLOOK, &pnl) == -1)
return (-1);
memset(server, 0, sizeof(struct sockaddr_in6));
diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in
index 22fb75c123bd..f30ca81a84f8 100644
--- a/contrib/unbound/Makefile.in
+++ b/contrib/unbound/Makefile.in
@@ -1278,7 +1278,8 @@ daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h
$(srcdir)/util/edns.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \
$(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h \
$(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/respip/respip.h \
- $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h
+ $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h \
+ $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h
remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \
$(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \
$(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \
@@ -1355,7 +1356,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test
$(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \
$(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \
$(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \
- $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h
+ $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h $(srcdir)/daemon/worker.h
testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \
$(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \
$(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h
@@ -1428,7 +1429,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t
$(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \
$(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/authzone.h \
$(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h \
- $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h
+ $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h $(srcdir)/util/storage/slabhash.h $(srcdir)/daemon/daemon.h
lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \
$(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \
$(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \
@@ -1484,7 +1485,8 @@ context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbou
$(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \
$(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \
$(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h \
- $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h
+ $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h \
+ $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h
libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \
$(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \
$(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \
@@ -1496,7 +1498,8 @@ libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbou
$(srcdir)/sldns/sbuffer.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \
$(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/services/cache/rrset.h \
$(srcdir)/util/storage/slabhash.h $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \
- $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h
+ $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h \
+ $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h
libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
$(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \
@@ -1510,8 +1513,7 @@ libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/li
$(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \
$(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \
$(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \
- $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \
- $(srcdir)/sldns/str2wire.h
+ $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/str2wire.h
unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \
$(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h
asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \
diff --git a/contrib/unbound/ac_pkg_swig.m4 b/contrib/unbound/ax_pkg_swig.m4
index 87f99fb2fe98..7a4196ff5dff 100644
--- a/contrib/unbound/ac_pkg_swig.m4
+++ b/contrib/unbound/ax_pkg_swig.m4
@@ -1,39 +1,43 @@
# ===========================================================================
-# http://autoconf-archive.cryp.to/ac_pkg_swig.html
+# https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html
# ===========================================================================
#
# SYNOPSIS
#
-# AC_PROG_SWIG([major.minor.micro])
+# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found])
#
# DESCRIPTION
#
-# This macro searches for a SWIG installation on your system. If found you
-# should call SWIG via $(SWIG). You can use the optional first argument to
-# check if the version of the available SWIG is greater than or equal to
-# the value of the argument. It should have the format: N[.N[.N]] (N is a
-# number between 0 and 999. Only the first N is mandatory.)
+# This macro searches for a SWIG installation on your system. If found,
+# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is
+# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd.
#
-# If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that
-# the swig package is this version number or higher.
+# You can use the optional first argument to check if the version of the
+# available SWIG is greater than or equal to the value of the argument. It
+# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only
+# the first N is mandatory.) If the version argument is given (e.g.
+# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number
+# or higher.
#
-# In configure.in, use as:
-#
-# AC_PROG_SWIG(1.3.17)
-# SWIG_ENABLE_CXX
-# SWIG_MULTI_MODULE_SUPPORT
-# SWIG_PYTHON
+# As usual, action-if-found is executed if SWIG is found, otherwise
+# action-if-not-found is executed.
#
-# LAST MODIFICATION
+# In configure.in, use as:
#
-# 2008-04-12
+# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ])
+# AX_SWIG_ENABLE_CXX
+# AX_SWIG_MULTI_MODULE_SUPPORT
+# AX_SWIG_PYTHON
#
-# COPYLEFT
+# LICENSE
#
# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
-# Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+# Copyright (c) 2008 Alan W. Irwin
# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
-# Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
+# Copyright (c) 2008 Andrew Collier
+# Copyright (c) 2011 Murray Cumming <murrayc@openismus.com>
+# Copyright (c) 2018 Reini Urban <rurban@cpan.org>
+# Copyright (c) 2021 Vincent Danjean <Vincent.Danjean@ens-lyon.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -46,7 +50,7 @@
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
+# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
@@ -57,17 +61,21 @@
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
-AC_DEFUN([AC_PROG_SWIG],[
- AC_PATH_PROG([SWIG],[swig])
+#serial 15
+
+AC_DEFUN([AX_PKG_SWIG],[
+ # Find path to the "swig" executable.
+ AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0])
if test -z "$SWIG" ; then
- AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
- SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
- elif test -n "$1" ; then
- AC_MSG_CHECKING([for SWIG version])
+ m4_ifval([$3],[$3],[:])
+ elif test -z "$1" ; then
+ m4_ifval([$2],[$2],[:])
+ else
+ AC_MSG_CHECKING([SWIG version])
[swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
AC_MSG_RESULT([$swig_version])
if test -n "$swig_version" ; then
@@ -77,12 +85,12 @@ AC_DEFUN([AC_PROG_SWIG],[
if test -z "$required_major" ; then
[required_major=0]
fi
- [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+ [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`]
[required_minor=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_minor" ; then
[required_minor=0]
fi
- [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+ [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`]
[required_patch=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_patch" ; then
[required_patch=0]
@@ -103,30 +111,28 @@ AC_DEFUN([AC_PROG_SWIG],[
if test -z "$available_patch" ; then
[available_patch=0]
fi
- [badversion=0]
- if test $available_major -lt $required_major ; then
- [badversion=1]
- fi
- if test $available_major -eq $required_major \
- -a $available_minor -lt $required_minor ; then
- [badversion=1]
- fi
- if test $available_major -eq $required_major \
- -a $available_minor -eq $required_minor \
- -a $available_patch -lt $required_patch ; then
- [badversion=1]
- fi
- if test $badversion -eq 1 ; then
- AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
- SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ # Convert the version tuple into a single number for easier comparison.
+ # Using base 100 should be safe since SWIG internally uses BCD values
+ # to encode its version number.
+ required_swig_vernum=`expr $required_major \* 10000 \
+ \+ $required_minor \* 100 \+ $required_patch`
+ available_swig_vernum=`expr $available_major \* 10000 \
+ \+ $available_minor \* 100 \+ $available_patch`
+
+ if test $available_swig_vernum -lt $required_swig_vernum; then
+ AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.])
+ SWIG=''
+ m4_ifval([$3],[$3],[])
else
- AC_MSG_NOTICE([SWIG executable is '$SWIG'])
- SWIG_LIB=`$SWIG -swiglib`
- AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
+ AC_MSG_CHECKING([for SWIG library])
+ SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '`
+ AC_MSG_RESULT([$SWIG_LIB])
+ m4_ifval([$2],[$2],[])
fi
else
AC_MSG_WARN([cannot determine SWIG version])
- SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
+ SWIG=''
+ m4_ifval([$3],[$3],[])
fi
fi
AC_SUBST([SWIG_LIB])
diff --git a/contrib/unbound/ax_pthread.m4 b/contrib/unbound/ax_pthread.m4
index ff7d2a67e11f..9f35d139149f 100644
--- a/contrib/unbound/ax_pthread.m4
+++ b/contrib/unbound/ax_pthread.m4
@@ -1,5 +1,5 @@
# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
@@ -14,24 +14,28 @@
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise). (This
-# is necessary on AIX to use the special cc_r compiler alias.)
+# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
+# needed for multi-threaded programs (defaults to the value of CC
+# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
+# special cc_r/CC_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
-# but also link it with them as well. e.g. you should link with
+# but also to link with them as well. For example, you might link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
-# If you are only building threads programs, you may wish to use these
+# If you are only building threaded programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
+# CXX="$PTHREAD_CXX"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
@@ -55,6 +59,7 @@
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -67,7 +72,7 @@
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
+# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
@@ -82,35 +87,41 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 21
+#serial 31
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
+# requires special compiler flags (e.g. on Tru64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+ ax_pthread_save_CC="$CC"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
+ AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
+ AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
+ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
AC_MSG_RESULT([$ax_pthread_ok])
- if test x"$ax_pthread_ok" = xno; then
+ if test "x$ax_pthread_ok" = "xno"; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ CC="$ax_pthread_save_CC"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
fi
# We must check for the threads library under a number of different
@@ -118,12 +129,14 @@ fi
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
@@ -132,82 +145,163 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+# (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
+# doesn't hurt to check since this sometimes defines pthreads and
+# -D_REENTRANT too), HP C (must be checked before -lpthread, which
+# is present but should not be used directly; and before -mthreads,
+# because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
-case ${host_os} in
+case $host_os in
+
+ freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+ ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+ ;;
+
+ hpux*)
+
+ # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+ # multi-threading and also sets -lpthread."
+
+ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+ ;;
+
+ openedition*)
+
+ # IBM z/OS requires a feature-test macro to be defined in order to
+ # enable POSIX threads at all, so give the user a hint if this is
+ # not set. (We don't define these ourselves, as they can affect
+ # other portions of the system API in unpredictable ways.)
+
+ AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
+ [
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+ ],
+ [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
+ ;;
+
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
+ # tests will erroneously succeed. (N.B.: The stubs are missing
+ # pthread_cleanup_push, or rather a function called by this macro,
+ # so we could check for that, but who knows whether they'll stub
+ # that too in a future libc.) So we'll check first for the
+ # standard Solaris way of linking pthreads (-mt -lpthread).
+
+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
+ ;;
+esac
+
+# Are we compiling with Clang?
+
+AC_CACHE_CHECK([whether $CC is Clang],
+ [ax_cv_PTHREAD_CLANG],
+ [ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
+ [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+ ],
+ [ax_cv_PTHREAD_CLANG=yes])
+ fi
+ ])
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
+AS_IF([test "x$GCC" = "xyes"],
+ [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+AS_IF([test "x$ax_pthread_clang" = "xyes"],
+ [ax_pthread_flags="-pthread,-lpthread -pthread"])
- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+ darwin* | hpux* | linux* | osf* | solaris*)
+ ax_pthread_check_macro="_REENTRANT"
;;
- darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
+ aix*)
+ ax_pthread_check_macro="_THREAD_SAFE"
;;
-esac
-# Clang doesn't consider unrecognized options an error unless we specify
-# -Werror. We throw in some extra Clang-specific options to ensure that
-# this doesn't happen for GCC, which also accepts -Werror.
+ *)
+ ax_pthread_check_macro="--"
+ ;;
+esac
+AS_IF([test "x$ax_pthread_check_macro" = "x--"],
+ [ax_pthread_check_cond=0],
+ [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
-AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
-save_CFLAGS="$CFLAGS"
-ax_pthread_extra_flags="-Werror"
-CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
- [AC_MSG_RESULT([yes])],
- [ax_pthread_extra_flags=
- AC_MSG_RESULT([no])])
-CFLAGS="$save_CFLAGS"
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
- case $flag in
+ case $ax_pthread_try_flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
+ ;;
+
-*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
+ AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
;;
pthread-config)
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
- if test x"$ax_pthread_config" = xno; then continue; fi
+ AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
+ AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
+ PTHREAD_LIBS="-l$ax_pthread_try_flag"
;;
esac
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
@@ -218,8 +312,18 @@ for flag in $ax_pthread_flags; do
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
+
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
- static void routine(void *a) { *((int*)a) = 0; }
+# if $ax_pthread_check_cond
+# error "$ax_pthread_check_macro must be defined"
+# endif
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
@@ -227,101 +331,187 @@ for flag in $ax_pthread_flags; do
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
- [ax_pthread_ok=yes],
- [])
+ [ax_pthread_ok=yes],
+ [])
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
AC_MSG_RESULT([$ax_pthread_ok])
- if test "x$ax_pthread_ok" = xyes; then
- break;
- fi
+ AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+ # Clang takes -pthread; it has never supported any other flag
+
+ # (Note 1: This will need to be revisited if a system that Clang
+ # supports has POSIX threads in a separate library. This tends not
+ # to be the way of modern systems, but it's conceivable.)
+
+ # (Note 2: On some systems, notably Darwin, -pthread is not needed
+ # to get POSIX threads support; the API is always present and
+ # active. We could reasonably leave PTHREAD_CFLAGS empty. But
+ # -pthread does define _REENTRANT, and while the Darwin headers
+ # ignore this macro, third-party headers might not.)
+
+ # However, older versions of Clang make a point of warning the user
+ # that, in an invocation where only linking and no compilation is
+ # taking place, the -pthread option has no effect ("argument unused
+ # during compilation"). They expect -pthread to be passed in only
+ # when source code is being compiled.
+ #
+ # Problem is, this is at odds with the way Automake and most other
+ # C build frameworks function, which is that the same flags used in
+ # compilation (CFLAGS) are also used in linking. Many systems
+ # supported by AX_PTHREAD require exactly this for POSIX threads
+ # support, and in fact it is often not straightforward to specify a
+ # flag that is used only in the compilation phase and not in
+ # linking. Such a scenario is extremely rare in practice.
+ #
+ # Even though use of the -pthread flag in linking would only print
+ # a warning, this can be a nuisance for well-run software projects
+ # that build with -Werror. So if the active version of Clang has
+ # this misfeature, we search for an option to squash it.
+
+ AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
+ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
+ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+ # Create an alternate version of $ac_link that compiles and
+ # links in two steps (.c -> .o, .o -> exe) instead of one
+ # (.c -> exe), because the warning occurs only in the second
+ # step
+ ax_pthread_save_ac_link="$ac_link"
+ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+ ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
+ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+ AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+ [ac_link="$ax_pthread_2step_ac_link"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+ [break])
+ ])
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+ ])
+
+ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+ no | unknown) ;;
+ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+ esac
+
+fi # $ax_pthread_clang = yes
+
+
+
# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
+if test "x$ax_pthread_ok" = "xyes"; then
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
- [int attr = $attr; return attr /* ; */])],
- [attr_name=$attr; break],
- [])
- done
- AC_MSG_RESULT([$attr_name])
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case ${host_os} in
- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
- osf* | hpux*) flag="-D_REENTRANT";;
- solaris*)
- if test "$GCC" = "yes"; then
- flag="-D_REENTRANT"
- else
- # TODO: What about Clang on Solaris?
- flag="-mt -D_REENTRANT"
- fi
- ;;
- esac
- AC_MSG_RESULT([$flag])
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
+ AC_CACHE_CHECK([for joinable pthread attribute],
+ [ax_cv_PTHREAD_JOINABLE_ATTR],
+ [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $ax_pthread_attr; return attr /* ; */])],
+ [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
+ [])
+ done
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+ test "x$ax_pthread_joinable_attr_defined" != "xyes"],
+ [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
+ [$ax_cv_PTHREAD_JOINABLE_ATTR],
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ ax_pthread_joinable_attr_defined=yes
+ ])
+
+ AC_CACHE_CHECK([whether more special flags are required for pthreads],
+ [ax_cv_PTHREAD_SPECIAL_FLAGS],
+ [ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"],
+ [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes])
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
- [ax_cv_PTHREAD_PRIO_INHERIT], [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
- [[int i = PTHREAD_PRIO_INHERIT;]])],
- [ax_cv_PTHREAD_PRIO_INHERIT=yes],
- [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ [ax_cv_PTHREAD_PRIO_INHERIT],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+ [[int i = PTHREAD_PRIO_INHERIT;
+ return i;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
])
- AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
- [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"],
+ [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
+ ax_pthread_prio_inherit_defined=yes
+ ])
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
# More AIX lossage: compile with *_r variant
- if test "x$GCC" != xyes; then
+ if test "x$GCC" != "xyes"; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
- [#handle absolute path differently from PATH based program lookup
- AS_CASE(["x$CC"],
- [x/*],
- [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
- [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+ [#handle absolute path differently from PATH based program lookup
+ AS_CASE(["x$CC"],
+ [x/*],
+ [
+ AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
+ AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
+ ],
+ [
+ AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
+ AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
+ ]
+ )
+ ])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC])
+AC_SUBST([PTHREAD_CXX])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
+if test "x$ax_pthread_ok" = "xyes"; then
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
:
else
diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c
index b912be8ed54f..95ac28904693 100644
--- a/contrib/unbound/cachedb/cachedb.c
+++ b/contrib/unbound/cachedb/cachedb.c
@@ -50,6 +50,8 @@
#include "util/data/msgreply.h"
#include "util/data/msgencode.h"
#include "services/cache/dns.h"
+#include "services/mesh.h"
+#include "services/modstack.h"
#include "validator/val_neg.h"
#include "validator/val_secalgo.h"
#include "iterator/iter_utils.h"
@@ -265,15 +267,6 @@ cachedb_init(struct module_env* env, int id)
return 0;
}
cachedb_env->enabled = 1;
- if(env->cfg->serve_expired && env->cfg->serve_expired_reply_ttl)
- log_warn(
- "cachedb: serve-expired-reply-ttl is set but not working for data "
- "originating from the external cache; 0 TTL is used for those.");
- if(env->cfg->serve_expired && env->cfg->serve_expired_client_timeout)
- log_warn(
- "cachedb: serve-expired-client-timeout is set but not working for "
- "data originating from the external cache; expired data are used "
- "in the reply without first trying to refresh the data.");
return 1;
}
@@ -511,9 +504,38 @@ adjust_msg_ttl(struct dns_msg* msg, time_t adjust)
}
}
+/* Set the TTL of the given RRset to fixed value. */
+static void
+packed_rrset_ttl_set(struct packed_rrset_data* data, time_t ttl)
+{
+ size_t i;
+ size_t total = data->count + data->rrsig_count;
+ data->ttl = ttl;
+ for(i=0; i<total; i++) {
+ data->rr_ttl[i] = ttl;
+ }
+ data->ttl_add = 0;
+}
+
+/* Set the TTL of a DNS message and its RRs by to a fixed value. */
+static void
+set_msg_ttl(struct dns_msg* msg, time_t ttl)
+{
+ size_t i;
+ msg->rep->ttl = ttl;
+ msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl);
+ msg->rep->serve_expired_ttl = msg->rep->ttl + SERVE_EXPIRED_TTL;
+
+ for(i=0; i<msg->rep->rrset_count; i++) {
+ packed_rrset_ttl_set((struct packed_rrset_data*)msg->
+ rep->rrsets[i]->entry.data, ttl);
+ }
+}
+
/** convert dns message in buffer to return_msg */
static int
-parse_data(struct module_qstate* qstate, struct sldns_buffer* buf)
+parse_data(struct module_qstate* qstate, struct sldns_buffer* buf,
+ int* msg_expired)
{
struct msg_parse* prs;
struct edns_data edns;
@@ -583,6 +605,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf)
adjust = *qstate->env->now - (time_t)timestamp;
if(qstate->return_msg->rep->ttl < adjust) {
verbose(VERB_ALGO, "cachedb msg expired");
+ *msg_expired = 1;
/* If serve-expired is enabled, we still use an expired message
* setting the TTL to 0. */
if(!qstate->env->cfg->serve_expired ||
@@ -605,6 +628,7 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf)
* 'now' should be redundant given how these values were calculated,
* but we check it just in case as does good_expiry_and_qinfo(). */
if(qstate->env->cfg->serve_expired &&
+ !qstate->env->cfg->serve_expired_client_timeout &&
(adjust == -1 || (time_t)expiry < *qstate->env->now)) {
qstate->need_refetch = 1;
}
@@ -617,7 +641,8 @@ parse_data(struct module_qstate* qstate, struct sldns_buffer* buf)
* return true if lookup was successful.
*/
static int
-cachedb_extcache_lookup(struct module_qstate* qstate, struct cachedb_env* ie)
+cachedb_extcache_lookup(struct module_qstate* qstate, struct cachedb_env* ie,
+ int* msg_expired)
{
char key[(CACHEDB_HASHSIZE/8)*2+1];
calc_hash(qstate, key, sizeof(key));
@@ -634,7 +659,7 @@ cachedb_extcache_lookup(struct module_qstate* qstate, struct cachedb_env* ie)
}
/* parse dns message into return_msg */
- if( !parse_data(qstate, qstate->env->scratch_buffer) ) {
+ if( !parse_data(qstate, qstate->env->scratch_buffer, msg_expired) ) {
return 0;
}
return 1;
@@ -666,6 +691,7 @@ cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie)
static int
cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde)
{
+ uint8_t dpname_storage[LDNS_MAX_DOMAINLEN+1];
uint8_t* dpname=NULL;
size_t dpnamelen=0;
struct dns_msg* msg;
@@ -674,7 +700,7 @@ cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde)
return 0;
}
if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo,
- &dpname, &dpnamelen))
+ &dpname, &dpnamelen, dpname_storage, sizeof(dpname_storage)))
return 0; /* no cache for these queries */
msg = dns_cache_lookup(qstate->env, qstate->qinfo.qname,
qstate->qinfo.qname_len, qstate->qinfo.qtype,
@@ -705,17 +731,39 @@ cachedb_intcache_lookup(struct module_qstate* qstate, struct cachedb_env* cde)
* Store query into the internal cache of unbound.
*/
static void
-cachedb_intcache_store(struct module_qstate* qstate)
+cachedb_intcache_store(struct module_qstate* qstate, int msg_expired)
{
uint32_t store_flags = qstate->query_flags;
+ int serve_expired = qstate->env->cfg->serve_expired;
if(qstate->env->cfg->serve_expired)
store_flags |= DNSCACHE_STORE_ZEROTTL;
if(!qstate->return_msg)
return;
+ if(serve_expired && msg_expired) {
+ /* Set TTLs to a value such that value + *env->now is
+ * going to be now-3 seconds. Making it expired
+ * in the cache. */
+ set_msg_ttl(qstate->return_msg, (time_t)-3);
+ }
(void)dns_cache_store(qstate->env, &qstate->qinfo,
qstate->return_msg->rep, 0, qstate->prefetch_leeway, 0,
qstate->region, store_flags, qstate->qstarttime);
+ if(serve_expired && msg_expired) {
+ if(qstate->env->cfg->serve_expired_client_timeout) {
+ /* No expired response from the query state, the
+ * query resolution needs to continue and it can
+ * pick up the expired result after the timer out
+ * of cache. */
+ return;
+ }
+ /* set TTLs to zero again */
+ adjust_msg_ttl(qstate->return_msg, -1);
+ /* Send serve expired responses based on the cachedb
+ * returned message, that was just stored in the cache.
+ * It can then continue to work on this query. */
+ mesh_respond_serve_expired(qstate->mesh_info);
+ }
}
/**
@@ -731,6 +779,7 @@ cachedb_handle_query(struct module_qstate* qstate,
struct cachedb_qstate* ATTR_UNUSED(iq),
struct cachedb_env* ie, int id)
{
+ int msg_expired = 0;
qstate->is_cachedb_answer = 0;
/* check if we are enabled, and skip if so */
if(!ie->enabled) {
@@ -765,20 +814,28 @@ cachedb_handle_query(struct module_qstate* qstate,
}
/* ask backend cache to see if we have data */
- if(cachedb_extcache_lookup(qstate, ie)) {
+ if(cachedb_extcache_lookup(qstate, ie, &msg_expired)) {
if(verbosity >= VERB_ALGO)
log_dns_msg(ie->backend->name,
&qstate->return_msg->qinfo,
qstate->return_msg->rep);
/* store this result in internal cache */
- cachedb_intcache_store(qstate);
+ cachedb_intcache_store(qstate, msg_expired);
/* In case we have expired data but there is a client timer for expired
* answers, pass execution to next module in order to try updating the
* data first.
* TODO: this needs revisit. The expired data stored from cachedb has
* 0 TTL which is picked up by iterator later when looking in the cache.
- * Document that ext cachedb does not work properly with
- * serve_stale_reply_ttl yet. */
+ */
+ if(qstate->env->cfg->serve_expired && msg_expired) {
+ qstate->return_msg = NULL;
+ qstate->ext_state[id] = module_wait_module;
+ /* The expired reply is sent with
+ * mesh_respond_serve_expired, and so
+ * the need_refetch is not used. */
+ qstate->need_refetch = 0;
+ return;
+ }
if(qstate->need_refetch && qstate->serve_expired_data &&
qstate->serve_expired_data->timer) {
qstate->return_msg = NULL;
@@ -791,6 +848,14 @@ cachedb_handle_query(struct module_qstate* qstate,
return;
}
+ if(qstate->serve_expired_data &&
+ qstate->env->cfg->cachedb_check_when_serve_expired &&
+ !qstate->env->cfg->serve_expired_client_timeout) {
+ /* Reply with expired data if any to client, because cachedb
+ * also has no useful, current data */
+ mesh_respond_serve_expired(qstate->mesh_info);
+ }
+
/* no cache fetches */
/* pass request to next module */
qstate->ext_state[id] = module_wait_module;
@@ -923,4 +988,36 @@ cachedb_get_funcblock(void)
{
return &cachedb_block;
}
+
+int
+cachedb_is_enabled(struct module_stack* mods, struct module_env* env)
+{
+ struct cachedb_env* ie;
+ int id = modstack_find(mods, "cachedb");
+ if(id == -1)
+ return 0;
+ ie = (struct cachedb_env*)env->modinfo[id];
+ if(ie && ie->enabled)
+ return 1;
+ return 0;
+}
+
+void cachedb_msg_remove(struct module_qstate* qstate)
+{
+ char key[(CACHEDB_HASHSIZE/8)*2+1];
+ int id = modstack_find(qstate->env->modstack, "cachedb");
+ struct cachedb_env* ie = (struct cachedb_env*)qstate->env->modinfo[id];
+
+ log_query_info(VERB_ALGO, "cachedb msg remove", &qstate->qinfo);
+ calc_hash(qstate, key, sizeof(key));
+ sldns_buffer_clear(qstate->env->scratch_buffer);
+ sldns_buffer_write_u32(qstate->env->scratch_buffer, 0);
+ sldns_buffer_flip(qstate->env->scratch_buffer);
+
+ /* call backend */
+ (*ie->backend->store)(qstate->env, ie, key,
+ sldns_buffer_begin(qstate->env->scratch_buffer),
+ sldns_buffer_limit(qstate->env->scratch_buffer),
+ 0);
+}
#endif /* USE_CACHEDB */
diff --git a/contrib/unbound/cachedb/cachedb.h b/contrib/unbound/cachedb/cachedb.h
index 05c4368e60b4..2da8b5c71feb 100644
--- a/contrib/unbound/cachedb/cachedb.h
+++ b/contrib/unbound/cachedb/cachedb.h
@@ -41,6 +41,7 @@
*/
#include "util/module.h"
struct cachedb_backend;
+struct module_stack;
/**
* The global variable environment contents for the cachedb
@@ -110,3 +111,18 @@ size_t cachedb_get_mem(struct module_env* env, int id);
*/
struct module_func_block* cachedb_get_funcblock(void);
+/**
+ * See if the cachedb is enabled.
+ * @param mods: module stack. It finds the cachedb module environment.
+ * @param env: module environment.
+ * @return true if exists and enabled.
+ */
+int cachedb_is_enabled(struct module_stack* mods, struct module_env* env);
+
+/**
+ * Remove a message from the global cache. Because edns subnet has a more
+ * specific entry, and if not removed when everything expires, the global
+ * entry is used, instead of a fresh lookup of the edns subnet entry.
+ * @param qstate: query state.
+ */
+void cachedb_msg_remove(struct module_qstate* qstate);
diff --git a/contrib/unbound/config.h.in b/contrib/unbound/config.h.in
index f31354d01408..bc39544c4056 100644
--- a/contrib/unbound/config.h.in
+++ b/contrib/unbound/config.h.in
@@ -379,8 +379,8 @@
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
@@ -587,6 +587,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -689,6 +692,9 @@
/* Define to 1 if you have the <vfork.h> header file. */
#undef HAVE_VFORK_H
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
@@ -830,7 +836,9 @@
/* Define to 1 if libsodium supports sodium_set_misuse_handler */
#undef SODIUM_MISUSE_HANDLER
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* use default strptime. */
@@ -926,21 +934,87 @@
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
-/* Enable threading extensions on Solaris. */
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
#endif
@@ -966,11 +1040,6 @@
`char[]'. */
#undef YYTEXT_POINTER
-/* Enable large inode numbers on Mac OS X 10.5. */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@@ -980,19 +1049,9 @@
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
/* Enable for compile on Minix */
#undef _NETBSD_SOURCE
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
/* defined to use gcc ansi snprintf and sscanf that understands %lld when
compiled for windows. */
#undef __USE_MINGW_ANSI_STDIO
@@ -1033,7 +1092,7 @@
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t
/* Define to 'int' if not defined */
diff --git a/contrib/unbound/configure b/contrib/unbound/configure
index 6aa1aeb80676..d4a394eb9540 100755
--- a/contrib/unbound/configure
+++ b/contrib/unbound/configure
@@ -1,11 +1,12 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for unbound 1.19.3.
+# Generated by GNU Autoconf 2.71 for unbound 1.20.0.
#
# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -16,14 +17,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -33,46 +36,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -96,8 +92,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -109,30 +109,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -154,20 +134,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -187,12 +169,15 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
@@ -207,30 +192,38 @@ test \$(( 1 + 1 )) = 2 || exit 1
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
|| test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -238,14 +231,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -263,18 +263,19 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
$0: unbound-bugs@nlnetlabs.nl or
$0: https://github.com/NLnetLabs/unbound/issues about your
$0: system, including any error possibly output before this
@@ -303,6 +304,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -320,6 +322,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -334,7 +344,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -343,7 +353,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -382,12 +392,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -399,18 +410,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -422,9 +442,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -451,7 +471,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -495,7 +515,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -509,6 +529,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -522,6 +546,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -591,47 +622,44 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='unbound'
PACKAGE_TARNAME='unbound'
-PACKAGE_VERSION='1.19.3'
-PACKAGE_STRING='unbound 1.19.3'
+PACKAGE_VERSION='1.20.0'
+PACKAGE_STRING='unbound 1.20.0'
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
PACKAGE_URL=''
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
+ac_header_c_list=
+ac_func_c_list=
ac_subst_vars='LTLIBOBJS
date
version
@@ -714,6 +742,7 @@ WITH_DYNLIBMODULE
PTHREAD_CFLAGS_ONLY
PTHREAD_CFLAGS
PTHREAD_LIBS
+PTHREAD_CXX
PTHREAD_CC
ax_pthread_config
ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
@@ -726,6 +755,7 @@ SYSTEMD_LIBS
SYSTEMD_CFLAGS
RUNTIME_PATH
LIBOBJS
+CPP
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
@@ -747,6 +777,7 @@ ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
+EGREP
SED
LIBTOOL
AR
@@ -768,6 +799,7 @@ LEX_OUTPUT_ROOT
LEX
debug_enabled
DEPFLAG
+GREP
UNBOUND_USERNAME
UNBOUND_ROOTCERT_FILE
UNBOUND_ROOTKEY_FILE
@@ -780,9 +812,6 @@ ub_conf_file
UNBOUND_LOCALSTATE_DIR
UNBOUND_SYSCONF_DIR
UNBOUND_SBIN_DIR
-EGREP
-GREP
-CPP
OBJEXT
EXEEXT
ac_ct_CC
@@ -917,13 +946,13 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
YACC
YFLAGS
LT_SYS_LIBRARY_PATH
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
+CPP
SYSTEMD_CFLAGS
SYSTEMD_LIBS
SYSTEMD_DAEMON_CFLAGS
@@ -999,8 +1028,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -1041,9 +1068,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1067,9 +1094,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1280,9 +1307,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1296,9 +1323,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1342,9 +1369,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1360,7 +1387,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1424,7 +1451,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1481,7 +1508,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures unbound 1.19.3 to adapt to many kinds of systems.
+\`configure' configures unbound 1.20.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1547,7 +1574,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of unbound 1.19.3:";;
+ short | recursive ) echo "Configuration of unbound 1.20.0:";;
esac
cat <<\_ACEOF
@@ -1696,7 +1723,6 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
- CPP C preprocessor
YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc',
`yacc'.
@@ -1710,6 +1736,7 @@ Some influential environment variables:
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
+ CPP C preprocessor
SYSTEMD_CFLAGS
C compiler flags for SYSTEMD, overriding pkg-config
SYSTEMD_LIBS
@@ -1746,9 +1773,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1776,7 +1803,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1784,7 +1812,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1793,10 +1821,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-unbound configure 1.19.3
-generated by GNU Autoconf 2.69
+unbound configure 1.20.0
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1813,14 +1841,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1828,14 +1856,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1845,176 +1874,6 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## --------------------------------------------------------------------------------------- ##
-## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ##
-## --------------------------------------------------------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -2022,26 +1881,28 @@ fi
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -2052,14 +1913,14 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2067,17 +1928,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -2098,11 +1960,12 @@ fi
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -2110,16 +1973,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -2137,24 +1993,25 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -2166,17 +2023,18 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -2184,12 +2042,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -2197,22 +2056,104 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -2227,7 +2168,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -2237,14 +2178,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2254,9 +2196,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid; break
-else
+else $as_nop
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -2264,14 +2207,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -2281,14 +2224,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -2298,9 +2242,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=$ac_mid; break
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -2308,14 +2253,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
ac_lo= ac_hi=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -2323,7 +2268,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2333,12 +2278,13 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -2348,12 +2294,12 @@ esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.val", "w");
@@ -2381,9 +2327,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -2396,25 +2343,28 @@ rm -f conftest.val
} # ac_fn_c_compute_int
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -2428,19 +2378,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_decl
+} # ac_fn_check_decl
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
@@ -2449,16 +2402,17 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
@@ -2467,14 +2421,15 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
@@ -2483,29 +2438,50 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
eval "$4=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by unbound $as_me 1.19.3, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by unbound $as_me 1.20.0, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -2538,8 +2514,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2574,7 +2554,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2609,11 +2589,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2624,8 +2606,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2649,7 +2631,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2657,14 +2639,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2672,15 +2654,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2688,8 +2670,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2703,63 +2685,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2769,19 +2736,439 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
+as_fn_append ac_func_c_list " fork HAVE_FORK"
+as_fn_append ac_func_c_list " vfork HAVE_VFORK"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="ltmain.sh config.guess config.sub"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2792,12 +3179,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2806,24 +3193,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2833,11 +3220,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2852,13 +3240,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
UNBOUND_VERSION_MAJOR=1
-UNBOUND_VERSION_MINOR=19
+UNBOUND_VERSION_MINOR=20
-UNBOUND_VERSION_MICRO=3
+UNBOUND_VERSION_MICRO=0
LIBUNBOUND_CURRENT=9
-LIBUNBOUND_REVISION=26
+LIBUNBOUND_REVISION=27
LIBUNBOUND_AGE=1
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
@@ -2952,6 +3340,7 @@ LIBUNBOUND_AGE=1
# 1.19.1 had 9:24:1
# 1.19.2 had 9:25:1
# 1.19.3 had 9:26:1
+# 1.20.0 had 9:27:1
# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
@@ -2978,12 +3367,19 @@ LIBUNBOUND_AGE=1
cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
-cat >>confdefs.h <<_ACEOF
-#define CONFCMDLINE "$cmdln"
-_ACEOF
+printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
CFLAGS="$CFLAGS"
+
+
+
+
+
+
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2992,11 +3388,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3004,11 +3401,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3019,11 +3420,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3032,11 +3433,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3044,11 +3446,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3059,11 +3465,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -3071,8 +3477,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3085,11 +3491,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3097,11 +3504,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3112,11 +3523,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3125,11 +3536,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3138,15 +3550,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3162,18 +3578,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3184,11 +3600,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3196,11 +3613,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3211,11 +3632,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3228,11 +3649,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3240,11 +3662,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3255,11 +3681,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3271,8 +3697,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3280,25 +3706,129 @@ esac
fi
fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -3308,7 +3838,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -3316,7 +3846,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3328,9 +3858,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -3351,11 +3881,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -3372,7 +3903,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -3388,44 +3919,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -3439,15 +3972,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -3456,7 +3989,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -3468,8 +4001,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -3477,10 +4010,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -3488,39 +4021,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3534,11 +4068,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -3547,31 +4082,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -3581,29 +4117,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -3612,57 +4152,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -3677,232 +4220,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+$ac_c_conftest_c11_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -std=gnu11
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ac_nonexistent.h>
+$ac_c_conftest_c99_program
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
fi
- done
- ac_cv_prog_CPP=$CPP
-
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ac_nonexistent.h>
+$ac_c_conftest_c89_program
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -3912,329 +4367,179 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
fi
-else
- ac_cv_path_GREP=$GREP
-fi
+done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
- fi
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+# define __EXTENSIONS__ 1
+ $ac_includes_default
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
fi
-rm -f conftest*
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
-fi
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
int
-main ()
+main (void)
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
+
+ ;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
-fi
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
-done
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
- MINIX=yes
-else
- MINIX=
-fi
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
- if test "$MINIX" = yes; then
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
-$as_echo "#define _MINIX 1" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
- fi
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
-# define __EXTENSIONS__ 1
- $ac_includes_default
-int
-main ()
-{
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_safe_to_define___extensions__=yes
-else
- ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else $as_nop
+ MINIX=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
- test $ac_cv_safe_to_define___extensions__ = yes &&
- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+fi
if test "$ac_cv_header_minix_config_h" = "yes"; then
-$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
fi
@@ -4272,7 +4577,8 @@ else
fi
# Check whether --with-conf_file was given.
-if test "${with_conf_file+set}" = set; then :
+if test ${with_conf_file+y}
+then :
withval=$with_conf_file; ub_conf_file="$withval"
fi
@@ -4280,16 +4586,14 @@ fi
hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define CONFIGFILE "$hdr_config"
-_ACEOF
+printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ub_conf_file" : 'X\(//\)[^/]' \| \
X"$ub_conf_file" : 'X\(//\)$' \| \
X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ub_conf_file" |
+printf "%s\n" X"$ub_conf_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -4312,9 +4616,10 @@ $as_echo X"$ub_conf_file" |
# Determine run, chroot directory and pidfile locations
# Check whether --with-run-dir was given.
-if test "${with_run_dir+set}" = set; then :
+if test ${with_run_dir+y}
+then :
withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
-else
+else $as_nop
if test $on_mingw = no; then
UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
else
@@ -4327,16 +4632,15 @@ fi
hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define RUN_DIR "$hdr_run"
-_ACEOF
+printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
# Check whether --with-chroot-dir was given.
-if test "${with_chroot_dir+set}" = set; then :
+if test ${with_chroot_dir+y}
+then :
withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
-else
+else $as_nop
if test $on_mingw = no; then
UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
else
@@ -4349,31 +4653,29 @@ fi
hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define CHROOT_DIR "$hdr_chroot"
-_ACEOF
+printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
# Check whether --with-share-dir was given.
-if test "${with_share_dir+set}" = set; then :
+if test ${with_share_dir+y}
+then :
withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
-else
+else $as_nop
UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
fi
-cat >>confdefs.h <<_ACEOF
-#define SHARE_DIR "$UNBOUND_SHARE_DIR"
-_ACEOF
+printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
# Check whether --with-pidfile was given.
-if test "${with_pidfile+set}" = set; then :
+if test ${with_pidfile+y}
+then :
withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
-else
+else $as_nop
if test $on_mingw = no; then
UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
else
@@ -4386,16 +4688,15 @@ fi
hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define PIDFILE "$hdr_pid"
-_ACEOF
+printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
# Check whether --with-rootkey-file was given.
-if test "${with_rootkey_file+set}" = set; then :
+if test ${with_rootkey_file+y}
+then :
withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
-else
+else $as_nop
if test $on_mingw = no; then
UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
else
@@ -4408,16 +4709,15 @@ fi
hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define ROOT_ANCHOR_FILE "$hdr_rkey"
-_ACEOF
+printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
# Check whether --with-rootcert-file was given.
-if test "${with_rootcert_file+set}" = set; then :
+if test ${with_rootcert_file+y}
+then :
withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
-else
+else $as_nop
if test $on_mingw = no; then
UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
else
@@ -4430,48 +4730,115 @@ fi
hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define ROOT_CERT_FILE "$hdr_rpem"
-_ACEOF
+printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
# Check whether --with-username was given.
-if test "${with_username+set}" = set; then :
+if test ${with_username+y}
+then :
withval=$with_username; UNBOUND_USERNAME="$withval"
-else
+else $as_nop
UNBOUND_USERNAME="unbound"
fi
-cat >>confdefs.h <<_ACEOF
-#define UB_USERNAME "$UNBOUND_USERNAME"
-_ACEOF
+printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
-$as_echo "#define WINVER 0x0502" >>confdefs.h
+printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `
-cat >>confdefs.h <<_ACEOF
-#define RSRC_PACKAGE_VERSION $wnvs
-_ACEOF
+printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
+# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -4484,7 +4851,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -4512,7 +4879,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -4528,18 +4895,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
@@ -4554,12 +4922,13 @@ default_cflags=no
if test "x$CFLAGS" = "x" ; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
-$as_echo_n "checking whether $CC supports -g... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
+printf %s "checking whether $CC supports -g... " >&6; }
cache=`echo g | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
@@ -4572,25 +4941,26 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -g"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
-$as_echo_n "checking whether $CC supports -O2... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
+printf %s "checking whether $CC supports -O2... " >&6; }
cache=`echo O2 | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
@@ -4603,314 +4973,753 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -O2"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
default_cflags=yes
fi
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
- $as_echo_n "(cached) " >&6
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
-typedef const char *ccp;
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
- const char *str;
- int number;
- float fnumber;
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
int
-main ()
+main (void)
{
+#ifndef __GNUC__
+ choke me
+#endif
- // Check bool.
- _Bool success = false;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
+int
+main (void)
+{
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- ni.number = 58;
+int
+main (void)
+{
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
;
return 0;
}
_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c99=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
+fi
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
+fi
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-else
- ac_cv_prog_cc_stdc=no
+ ac_prog_cc_stdc=c89
fi
-
fi
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if ${ac_cv_prog_cc_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
-$as_echo_n "checking $CC dependency flag... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
+printf %s "checking $CC dependency flag... " >&6; }
echo 'void f(void){}' >conftest.c
if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
DEPFLAG="-MM"
@@ -4921,20 +5730,21 @@ else
DEPFLAG="-MM" # dunno do something
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
-$as_echo "$DEPFLAG" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
+printf "%s\n" "$DEPFLAG" >&6; }
rm -f conftest.c
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
-$as_echo_n "checking whether $CC supports -Werror... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
+printf %s "checking whether $CC supports -Werror... " >&6; }
cache=`echo Werror | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
@@ -4947,25 +5757,26 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
ERRFLAG="-Werror"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
ERRFLAG="-errwarn"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
-$as_echo_n "checking whether $CC supports -Wall... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
+printf %s "checking whether $CC supports -Wall... " >&6; }
cache=`echo Wall | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
@@ -4978,13 +5789,13 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
ERRFLAG="$ERRFLAG -Wall"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
ERRFLAG="$ERRFLAG -errfmt"
fi
@@ -4993,12 +5804,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
-$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
+printf %s "checking whether $CC supports -std=c99... " >&6; }
cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
@@ -5011,25 +5823,26 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
C99FLAG="-std=c99"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
-$as_echo_n "checking whether $CC supports -xc99... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
+printf %s "checking whether $CC supports -xc99... " >&6; }
cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
@@ -5042,42 +5855,44 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
C99FLAG="-xc99"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-for ac_header in getopt.h time.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_getopt_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
-done
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
-$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
-cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
+cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include "confdefs.h"
@@ -5136,14 +5951,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
@@ -5152,8 +5967,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5163,12 +5978,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
-$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
-cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
+cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include "confdefs.h"
@@ -5227,14 +6043,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
@@ -5243,8 +6059,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5254,12 +6070,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
-$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
-cache=`$as_echo "$C99FLAG" | $as_tr_sh`
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
+printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
+cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include <stdbool.h>
@@ -5291,14 +6108,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS $C99FLAG"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
@@ -5307,8 +6124,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5318,12 +6135,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
-$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include <ctype.h>
@@ -5356,14 +6174,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
@@ -5372,8 +6190,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5383,12 +6201,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
-$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
cache=_D_GNU_SOURCE
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include <netinet/in.h>
@@ -5421,14 +6240,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -D_GNU_SOURCE"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
@@ -5437,8 +6256,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5451,12 +6270,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
-$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
+printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
cache=_D_GNU_SOURCE__D_FRSRESGID
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include <unistd.h>
@@ -5489,14 +6309,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -D_GNU_SOURCE"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
@@ -5505,8 +6325,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5516,12 +6336,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
-$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
+printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
cache=_D_POSIX_C_SOURCE_200112
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include "confdefs.h"
@@ -5565,14 +6386,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
@@ -5581,8 +6402,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5592,12 +6413,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
-$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
+printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
cache=_D__EXTENSIONS__
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include "confdefs.h"
@@ -5647,14 +6469,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -D__EXTENSIONS__"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
@@ -5663,8 +6485,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -5675,12 +6497,14 @@ fi
# debug mode flags warnings
# Check whether --enable-checking was given.
-if test "${enable_checking+set}" = set; then :
+if test ${enable_checking+y}
+then :
enableval=$enable_checking;
fi
# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
+if test ${enable_debug+y}
+then :
enableval=$enable_debug;
fi
@@ -5691,12 +6515,13 @@ case "$debug_enabled" in
yes)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
-$as_echo_n "checking whether $CC supports -W... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
+printf %s "checking whether $CC supports -W... " >&6; }
cache=`echo W | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
@@ -5709,25 +6534,26 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -W"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
-$as_echo_n "checking whether $CC supports -Wall... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
+printf %s "checking whether $CC supports -Wall... " >&6; }
cache=`echo Wall | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
@@ -5740,25 +6566,26 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -Wall"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
-$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
+printf %s "checking whether $CC supports -Wextra... " >&6; }
cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
@@ -5771,25 +6598,26 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -Wextra"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
-$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
+printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
@@ -5802,19 +6630,19 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
-$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
+printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
;;
no|*)
@@ -5827,58 +6655,63 @@ if test "$default_cflags" = "yes"; then
# be able to turn off these options and set the CFLAGS wanted.
# Check whether --enable-flto was given.
-if test "${enable_flto+set}" = set; then :
+if test ${enable_flto+y}
+then :
enableval=$enable_flto;
fi
- if test "x$enable_flto" != "xno"; then :
+ if test "x$enable_flto" != "xno"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
-$as_echo_n "checking if $CC supports -flto... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
+printf %s "checking if $CC supports -flto... " >&6; }
BAKCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -flto"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
CFLAGS="$BAKCFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
rm -f conftest conftest.c conftest.o
-else
- CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
# Check whether --enable-pie was given.
-if test "${enable_pie+set}" = set; then :
+if test ${enable_pie+y}
+then :
enableval=$enable_pie;
fi
- if test "x$enable_pie" = "xyes"; then :
+ if test "x$enable_pie" = "xyes"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
-$as_echo_n "checking if $CC supports PIE... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
+printf %s "checking if $CC supports PIE... " >&6; }
BAKLDFLAGS="$LDFLAGS"
BAKCFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS -pie"
@@ -5887,106 +6720,112 @@ $as_echo_n "checking if $CC supports PIE... " >&6; }
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
LDFLAGS="$BAKLDFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
rm -f conftest conftest.c conftest.o
-else
- LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
# Check whether --enable-relro_now was given.
-if test "${enable_relro_now+set}" = set; then :
+if test ${enable_relro_now+y}
+then :
enableval=$enable_relro_now;
fi
- if test "x$enable_relro_now" = "xyes"; then :
+ if test "x$enable_relro_now" = "xyes"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
-$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
+printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
BAKLDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
LDFLAGS="$BAKLDFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
rm -f conftest conftest.c conftest.o
-else
- LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_inline=$ac_kw
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test "$ac_cv_c_inline" != no && break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -6004,11 +6843,12 @@ _ACEOF
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
-$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
-if ${ac_cv_c_format_attribute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
+if test ${ac_cv_c_format_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_format_attribute=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6017,7 +6857,7 @@ void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
int
-main ()
+main (void)
{
f ("%s", "str");
@@ -6026,30 +6866,32 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_format_attribute="yes"
-else
+else $as_nop
ac_cv_c_format_attribute="no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
-$as_echo "$ac_cv_c_format_attribute" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
+printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
if test $ac_cv_c_format_attribute = yes; then
-$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
-$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
-if ${ac_cv_c_unused_attribute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
+if test ${ac_cv_c_unused_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_unused_attribute=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6057,7 +6899,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
void f (char *u __attribute__((unused)));
int
-main ()
+main (void)
{
f ("x");
@@ -6066,34 +6908,36 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_unused_attribute="yes"
-else
+else $as_nop
ac_cv_c_unused_attribute="no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
-$as_echo "$ac_cv_c_unused_attribute" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
+printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
if test $ac_cv_c_unused_attribute = yes; then
-$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
-$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
-if ${ac_cv_c_weak_attribute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
+if test ${ac_cv_c_weak_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_weak_attribute=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6101,7 +6945,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__attribute__((weak)) void f(int x) { printf("%d", x); }
int
-main ()
+main (void)
{
f(1);
@@ -6110,35 +6954,37 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_weak_attribute="yes"
-else
+else $as_nop
ac_cv_c_weak_attribute="no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
-$as_echo "$ac_cv_c_weak_attribute" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
+printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
if test $ac_cv_c_weak_attribute = yes; then
-$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
-$as_echo "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
+printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
-$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
-if ${ac_cv_c_noreturn_attribute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
+if test ${ac_cv_c_noreturn_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_noreturn_attribute=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6146,7 +6992,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__attribute__((noreturn)) void f(int x) { printf("%d", x); }
int
-main ()
+main (void)
{
f(1);
@@ -6155,24 +7001,25 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_noreturn_attribute="yes"
-else
+else $as_nop
ac_cv_c_noreturn_attribute="no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
-$as_echo "$ac_cv_c_noreturn_attribute" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
+printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
if test $ac_cv_c_noreturn_attribute = yes; then
-$as_echo "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
-$as_echo "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
+printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
fi
@@ -6189,11 +7036,12 @@ for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LEX+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
@@ -6201,11 +7049,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_LEX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6216,11 +7068,11 @@ fi
fi
LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
-$as_echo "$LEX" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
+printf "%s\n" "$LEX" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6228,15 +7080,26 @@ fi
done
test -n "$LEX" || LEX=":"
-if test "x$LEX" != "x:"; then
- cat >conftest.l <<_ACEOF
+ if test "x$LEX" != "x:"; then
+ cat >conftest.l <<_ACEOF
+%{
+#ifdef __cplusplus
+extern "C"
+#endif
+int yywrap(void);
+%}
%%
a { ECHO; }
b { REJECT; }
c { yymore (); }
d { yyless (1); }
e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
- yyless ((input () != 0)); }
+#ifdef __cplusplus
+ yyless ((yyinput () != 0));
+#else
+ yyless ((input () != 0));
+#endif
+ }
f { unput (yytext[0]); }
. { BEGIN INITIAL; }
%%
@@ -6244,101 +7107,144 @@ f { unput (yytext[0]); }
extern char *yytext;
#endif
int
+yywrap (void)
+{
+ return 1;
+}
+int
main (void)
{
- return ! yylex () + ! yywrap ();
+ return ! yylex ();
}
_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
+printf %s "checking for lex output file root... " >&6; }
+if test ${ac_cv_prog_lex_root+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ac_cv_prog_lex_root=unknown
{ { ac_try="$LEX conftest.l"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$LEX conftest.l") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
-$as_echo_n "checking lex output file root... " >&6; }
-if ${ac_cv_prog_lex_root+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
if test -f lex.yy.c; then
ac_cv_prog_lex_root=lex.yy
elif test -f lexyy.c; then
ac_cv_prog_lex_root=lexyy
-else
- as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
-$as_echo "$ac_cv_prog_lex_root" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
+printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
+if test "$ac_cv_prog_lex_root" = unknown
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
+printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
+ LEX=: LEXLIB=
+fi
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-if test -z "${LEXLIB+set}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
-$as_echo_n "checking lex library... " >&6; }
-if ${ac_cv_lib_lex+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${LEXLIB+y}
+then :
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
+printf %s "checking for lex library... " >&6; }
+if test ${ac_cv_lib_lex+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ ac_save_LIBS="$LIBS"
+ ac_found=false
+ for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
+ case $ac_cv_lib_lex in #(
+ 'none needed') :
+ ;; #(
+ 'not found') :
+ break ;; #(
+ *) :
+ LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
+ *) :
+ ;;
+esac
- ac_save_LIBS=$LIBS
- ac_cv_lib_lex='none needed'
- for ac_lib in '' -lfl -ll; do
- LIBS="$ac_lib $ac_save_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_lex=$ac_lib
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_found=:
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- test "$ac_cv_lib_lex" != 'none needed' && break
+ if $ac_found; then
+ break
+ fi
done
- LIBS=$ac_save_LIBS
+ LIBS="$ac_save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
-$as_echo "$ac_cv_lib_lex" >&6; }
- test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
+printf "%s\n" "$ac_cv_lib_lex" >&6; }
+ if test "$ac_cv_lib_lex" = 'not found'
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
+printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
+ LEX=: LEXLIB=
+elif test "$ac_cv_lib_lex" = 'none needed'
+then :
+ LEXLIB=''
+else $as_nop
+ LEXLIB=$ac_cv_lib_lex
fi
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
-$as_echo_n "checking whether yytext is a pointer... " >&6; }
-if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+if test "$LEX" != :
+then :
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
+printf %s "checking whether yytext is a pointer... " >&6; }
+if test ${ac_cv_prog_lex_yytext_pointer+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# POSIX says lex can declare yytext either as a pointer or an array; the
# default is implementation-dependent. Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
ac_cv_prog_lex_yytext_pointer=no
-ac_save_LIBS=$LIBS
-LIBS="$LEXLIB $ac_save_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define YYTEXT_POINTER 1
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_lex_yytext_pointer=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
-$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
+printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
if test $ac_cv_prog_lex_yytext_pointer = yes; then
-$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
+printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
+
+fi
fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c
@@ -6346,32 +7252,32 @@ rm -f conftest.l $LEX_OUTPUT_ROOT.c
fi
if test "$LEX" != "" -a "$LEX" != ":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
-$as_echo_n "checking for yylex_destroy... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
+printf %s "checking for yylex_destroy... " >&6; }
if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
-$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
+printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; };
LEX=":"
fi
fi
if test "$LEX" != "" -a "$LEX" != ":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
-$as_echo_n "checking for lex %option... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
+printf %s "checking for lex %option... " >&6; }
if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
%option nounput
%%
EOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; };
LEX=":"
fi
@@ -6385,11 +7291,12 @@ for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_YACC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
@@ -6397,11 +7304,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6412,11 +7323,11 @@ fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+printf "%s\n" "$YACC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6431,11 +7342,12 @@ if test "$YACC" = "" -o "$YACC" = ":"; then
fi
# Extract the first word of "doxygen", so it can be a program name with args.
set dummy doxygen; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_doxygen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_doxygen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$doxygen"; then
ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
else
@@ -6443,11 +7355,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_doxygen="doxygen"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6458,22 +7374,23 @@ fi
fi
doxygen=$ac_cv_prog_doxygen
if test -n "$doxygen"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
-$as_echo "$doxygen" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
+printf "%s\n" "$doxygen" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -6481,11 +7398,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6496,11 +7417,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6509,11 +7430,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -6521,11 +7443,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6536,11 +7462,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -6548,8 +7474,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -6558,55 +7484,30 @@ else
STRIP="$ac_cv_prog_STRIP"
fi
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -6625,21 +7526,22 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -6681,11 +7583,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $AR in
[\\/]* | ?:[\\/]*)
ac_cv_path_AR="$AR" # Let the user override the test with a path.
@@ -6695,11 +7598,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6711,11 +7618,11 @@ esac
fi
AR=$ac_cv_path_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6724,11 +7631,12 @@ if test -z "$ac_cv_path_AR"; then
ac_pt_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $ac_pt_AR in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
@@ -6738,11 +7646,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6754,11 +7666,11 @@ esac
fi
ac_pt_AR=$ac_cv_path_ac_pt_AR
if test -n "$ac_pt_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
-$as_echo "$ac_pt_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
+printf "%s\n" "$ac_pt_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_pt_AR" = x; then
@@ -6766,8 +7678,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_pt_AR
@@ -6780,10 +7692,11 @@ if test $AR = false; then
as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
fi
+
case `pwd` in
*\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
esac
@@ -6803,6 +7716,7 @@ macro_revision='2.4.6'
+
ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
@@ -6826,8 +7740,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -6853,12 +7767,12 @@ func_echo_all ()
}
case $ECHO in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+ printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
esac
@@ -6874,11 +7788,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
@@ -6892,10 +7807,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
@@ -6904,13 +7824,13 @@ case `"$ac_path_SED" --version 2>&1` in
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -6938,8 +7858,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
SED="$ac_cv_path_SED"
rm -f conftest.sed
@@ -6956,11 +7876,85 @@ Xsed="$SED -e 1s/^X//"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
then ac_cv_path_FGREP="$GREP -F"
else
@@ -6971,10 +7965,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
@@ -6983,13 +7982,13 @@ case `"$ac_path_FGREP" --version 2>&1` in
ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
"$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -7018,8 +8017,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
FGREP="$ac_cv_path_FGREP"
@@ -7044,17 +8043,18 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
with_gnu_ld=no
fi
ac_prog=ld
if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return, which upsets mingw
@@ -7083,15 +8083,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
;;
esac
elif test yes = "$with_gnu_ld"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
fi
-if ${lt_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
@@ -7120,18 +8121,19 @@ fi
LD=$lt_cv_path_LD
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
@@ -7142,8 +8144,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -7154,11 +8156,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM=$NM
@@ -7208,8 +8211,8 @@ else
: ${lt_cv_path_NM=no}
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
if test no != "$lt_cv_path_NM"; then
NM=$lt_cv_path_NM
else
@@ -7222,11 +8225,12 @@ else
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DUMPBIN"; then
ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
@@ -7234,11 +8238,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7249,11 +8257,11 @@ fi
fi
DUMPBIN=$ac_cv_prog_DUMPBIN
if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7266,11 +8274,12 @@ if test -z "$DUMPBIN"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DUMPBIN"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
@@ -7278,11 +8287,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7293,11 +8306,11 @@ fi
fi
ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7309,8 +8322,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DUMPBIN=$ac_ct_DUMPBIN
@@ -7338,11 +8351,12 @@ test -z "$NM" && NM=nm
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
@@ -7358,26 +8372,27 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
fi
# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
i=0
teststring=ABCD
@@ -7504,11 +8519,11 @@ else
fi
if test -n "$lt_cv_sys_max_cmd_len"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
fi
max_cmd_len=$lt_cv_sys_max_cmd_len
@@ -7552,11 +8567,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $host in
*-*-mingw* )
case $build in
@@ -7592,18 +8608,19 @@ esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
@@ -7619,22 +8636,23 @@ esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_reload_flag='-r'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
@@ -7667,11 +8685,12 @@ esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
@@ -7679,11 +8698,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7694,11 +8717,11 @@ fi
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7707,11 +8730,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
ac_ct_OBJDUMP=$OBJDUMP
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
@@ -7719,11 +8743,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7734,11 +8762,11 @@ fi
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OBJDUMP" = x; then
@@ -7746,8 +8774,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OBJDUMP=$ac_ct_OBJDUMP
@@ -7766,11 +8794,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
@@ -7966,8 +8995,8 @@ os2*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
file_magic_glob=
want_nocaseglob=no
@@ -8011,11 +9040,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
@@ -8023,11 +9053,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8038,11 +9072,11 @@ fi
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8051,11 +9085,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
ac_ct_DLLTOOL=$DLLTOOL
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
@@ -8063,11 +9098,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8078,11 +9117,11 @@ fi
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DLLTOOL" = x; then
@@ -8090,8 +9129,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DLLTOOL=$ac_ct_DLLTOOL
@@ -8111,11 +9150,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
@@ -8138,8 +9178,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
@@ -8154,11 +9194,12 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -8166,11 +9207,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8181,11 +9226,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8198,11 +9243,12 @@ if test -z "$AR"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
@@ -8210,11 +9256,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8225,11 +9275,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8241,8 +9291,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -8262,30 +9312,32 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
@@ -8293,7 +9345,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
@@ -8302,11 +9354,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
rm -f conftest.* libconftest.a
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
@@ -8323,11 +9375,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -8335,11 +9388,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8350,11 +9407,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8363,11 +9420,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -8375,11 +9433,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8390,11 +9452,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -8402,8 +9464,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -8422,11 +9484,12 @@ test -z "$STRIP" && STRIP=:
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
@@ -8434,11 +9497,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8449,11 +9516,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8462,11 +9529,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
@@ -8474,11 +9542,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8489,11 +9561,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -8501,8 +9573,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -8566,11 +9638,12 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
@@ -8578,11 +9651,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8593,11 +9670,11 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8633,11 +9710,12 @@ compiler=$CC
# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
@@ -8789,14 +9867,14 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
(eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -8865,7 +9943,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
@@ -8900,11 +9978,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
fi
# Response file support.
@@ -8950,13 +10028,14 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
# Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
+if test ${with_sysroot+y}
+then :
withval=$with_sysroot;
-else
+else $as_nop
with_sysroot=no
fi
@@ -8974,24 +10053,25 @@ case $with_sysroot in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
: ${lt_DD:=$DD}
@@ -9002,10 +10082,15 @@ if test -z "$lt_DD"; then
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in dd; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_lt_DD" || continue
if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cmp -s conftest.i conftest.out \
@@ -9025,15 +10110,16 @@ fi
rm -f conftest.i conftest2.i conftest.out
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
lt_cv_truncate_bin=
@@ -9044,8 +10130,8 @@ fi
rm -f conftest.i conftest2.i conftest.out
test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
@@ -9068,7 +10154,8 @@ func_cc_basename ()
}
# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
+if test ${enable_libtool_lock+y}
+then :
enableval=$enable_libtool_lock;
fi
@@ -9084,7 +10171,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
@@ -9104,7 +10191,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
@@ -9142,7 +10229,7 @@ mips64*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
emul=elf
case `/usr/bin/file conftest.$ac_objext` in
@@ -9183,7 +10270,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
@@ -9246,11 +10333,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9261,19 +10349,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_cc_needs_belf=yes
-else
+else $as_nop
lt_cv_cc_needs_belf=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -9282,8 +10371,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS=$SAVE_CFLAGS
@@ -9296,7 +10385,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
@@ -9333,11 +10422,12 @@ need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
@@ -9345,11 +10435,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9360,11 +10454,11 @@ fi
fi
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9373,11 +10467,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
# Extract the first word of "mt", so it can be a program name with args.
set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
@@ -9385,11 +10480,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9400,11 +10499,11 @@ fi
fi
ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_MANIFEST_TOOL" = x; then
@@ -9412,8 +10511,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
@@ -9423,11 +10522,12 @@ else
fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_path_mainfest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
@@ -9437,8 +10537,8 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -9453,11 +10553,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
@@ -9465,11 +10566,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9480,11 +10585,11 @@ fi
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9493,11 +10598,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
ac_ct_DSYMUTIL=$DSYMUTIL
# Extract the first word of "dsymutil", so it can be a program name with args.
set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
@@ -9505,11 +10611,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9520,11 +10630,11 @@ fi
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DSYMUTIL" = x; then
@@ -9532,8 +10642,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DSYMUTIL=$ac_ct_DSYMUTIL
@@ -9545,11 +10655,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
@@ -9557,11 +10668,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9572,11 +10687,11 @@ fi
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9585,11 +10700,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then
ac_ct_NMEDIT=$NMEDIT
# Extract the first word of "nmedit", so it can be a program name with args.
set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
@@ -9597,11 +10713,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9612,11 +10732,11 @@ fi
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_NMEDIT" = x; then
@@ -9624,8 +10744,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
NMEDIT=$ac_ct_NMEDIT
@@ -9637,11 +10757,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
@@ -9649,11 +10770,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9664,11 +10789,11 @@ fi
fi
LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9677,11 +10802,12 @@ if test -z "$ac_cv_prog_LIPO"; then
ac_ct_LIPO=$LIPO
# Extract the first word of "lipo", so it can be a program name with args.
set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_LIPO"; then
ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
else
@@ -9689,11 +10815,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9704,11 +10834,11 @@ fi
fi
ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_LIPO" = x; then
@@ -9716,8 +10846,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
LIPO=$ac_ct_LIPO
@@ -9729,11 +10859,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
@@ -9741,11 +10872,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9756,11 +10891,11 @@ fi
fi
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9769,11 +10904,12 @@ if test -z "$ac_cv_prog_OTOOL"; then
ac_ct_OTOOL=$OTOOL
# Extract the first word of "otool", so it can be a program name with args.
set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL"; then
ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
@@ -9781,11 +10917,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9796,11 +10936,11 @@ fi
fi
ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL" = x; then
@@ -9808,8 +10948,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL=$ac_ct_OTOOL
@@ -9821,11 +10961,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL64"; then
ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
else
@@ -9833,11 +10974,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9848,11 +10993,11 @@ fi
fi
OTOOL64=$ac_cv_prog_OTOOL64
if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9861,11 +11006,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then
ac_ct_OTOOL64=$OTOOL64
# Extract the first word of "otool64", so it can be a program name with args.
set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL64"; then
ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
else
@@ -9873,11 +11019,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9888,11 +11038,11 @@ fi
fi
ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL64" = x; then
@@ -9900,8 +11050,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL64=$ac_ct_OTOOL64
@@ -9936,11 +11086,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_apple_cc_single_mod=no
if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
@@ -9969,14 +11120,15 @@ else
rm -f conftest.*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
echo "_main" > conftest.sym
@@ -9985,31 +11137,33 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_ld_exported_symbols_list=yes
-else
+else $as_nop
lt_cv_ld_exported_symbols_list=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
@@ -10037,8 +11191,8 @@ _LT_EOF
rm -rf conftest.dSYM
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
@@ -10109,19 +11263,14 @@ func_munge_path_list ()
esac
}
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
fi
-done
-
@@ -10139,7 +11288,8 @@ done
# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
+if test ${enable_shared+y}
+then :
enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
@@ -10157,7 +11307,7 @@ if test "${enable_shared+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_shared=yes
fi
@@ -10170,7 +11320,8 @@ fi
# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
+if test ${enable_static+y}
+then :
enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
@@ -10188,7 +11339,7 @@ if test "${enable_static+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_static=yes
fi
@@ -10202,7 +11353,8 @@ fi
# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
+if test ${with_pic+y}
+then :
withval=$with_pic; lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
@@ -10219,7 +11371,7 @@ if test "${with_pic+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
pic_mode=default
fi
@@ -10231,7 +11383,8 @@ fi
# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
+if test ${enable_fast_install+y}
+then :
enableval=$enable_fast_install; p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
@@ -10249,7 +11402,7 @@ if test "${enable_fast_install+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_fast_install=yes
fi
@@ -10263,11 +11416,12 @@ fi
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[5-9]*,yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
+if test ${with_aix_soname+y}
+then :
withval=$with_aix_soname; case $withval in
aix|svr4|both)
;;
@@ -10276,18 +11430,19 @@ if test "${with_aix_soname+set}" = set; then :
;;
esac
lt_cv_with_aix_soname=$with_aix_soname
-else
- if ${lt_cv_with_aix_soname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_with_aix_soname=aix
fi
with_aix_soname=$lt_cv_with_aix_soname
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
@@ -10369,11 +11524,12 @@ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
@@ -10384,17 +11540,15 @@ else
fi
rmdir .libs 2>/dev/null
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
@@ -10440,11 +11594,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -10493,11 +11648,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -10506,11 +11661,12 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -10559,11 +11715,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -10644,11 +11800,12 @@ if test yes = "$GCC"; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -10679,8 +11836,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -11037,26 +12194,28 @@ case $host_os in
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -11087,8 +12246,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
@@ -11116,11 +12275,12 @@ fi
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_static_works=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
@@ -11144,8 +12304,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
if test yes = "$lt_cv_prog_compiler_static_works"; then
:
@@ -11159,11 +12319,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -11206,19 +12367,20 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -11261,8 +12423,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -11270,19 +12432,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
hard_links=nottested
if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
hard_links=yes
$RM conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -11294,8 +12456,8 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
@@ -11850,21 +13012,23 @@ _LT_EOF
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -11879,7 +13043,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -11903,21 +13067,23 @@ fi
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -11932,7 +13098,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -12183,11 +13349,12 @@ fi
# Older versions of the 11.00 compiler do not understand -b yet
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler__b=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
@@ -12211,8 +13378,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
if test yes = "$lt_cv_prog_compiler__b"; then
archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -12252,28 +13419,30 @@ fi
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
# This should be the same for all languages, so no per-tag cache variable.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_irix_exported_symbol=yes
-else
+else $as_nop
lt_cv_irix_exported_symbol=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
if test yes = "$lt_cv_irix_exported_symbol"; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
@@ -12553,8 +13722,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -12590,18 +13759,19 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
$RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -12619,7 +13789,7 @@ else
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
(eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then
lt_cv_archive_cmds_need_lc=no
@@ -12633,8 +13803,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
;;
esac
@@ -12793,8 +13963,8 @@ esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
if test yes = "$GCC"; then
case $host_os in
@@ -13355,9 +14525,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
shlibpath_overrides_runpath=no
# Some binutils ld are patched to set DT_RUNPATH
- if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
@@ -13367,19 +14538,21 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
lt_cv_shlibpath_overrides_runpath=yes
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
@@ -13614,8 +14787,8 @@ uts4*)
dynamic_linker=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -13736,8 +14909,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
@@ -13761,8 +14934,8 @@ else
# directories.
hardcode_action=unsupported
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
if test relink = "$hardcode_action" ||
test yes = "$inherit_rpath"; then
@@ -13806,11 +14979,12 @@ else
darwin*)
# if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13819,32 +14993,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
+else $as_nop
lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
@@ -13864,14 +15037,16 @@ fi
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
+if test "x$ac_cv_func_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13880,41 +15055,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char shl_load ();
int
-main ()
+main (void)
{
return shl_load ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_shl_load=yes
-else
+else $as_nop
ac_cv_lib_dld_shl_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
+else $as_nop
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
+if test "x$ac_cv_func_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13923,37 +15099,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13962,37 +15138,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_svld_dlopen=yes
-else
+else $as_nop
ac_cv_lib_svld_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14001,30 +15177,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dld_link ();
int
-main ()
+main (void)
{
return dld_link ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_dld_link=yes
-else
+else $as_nop
ac_cv_lib_dld_dld_link=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -14063,11 +15238,12 @@ fi
save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
@@ -14146,7 +15322,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -14164,16 +15340,17 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
@@ -14252,7 +15429,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -14270,8 +15447,8 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS=$save_CPPFLAGS
@@ -14309,13 +15486,13 @@ fi
striplib=
old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
@@ -14323,16 +15500,16 @@ else
if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
esac
fi
@@ -14349,13 +15526,13 @@ fi
# Report what library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -14379,15 +15556,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
fi
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test yes = "$enable_shared" || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
@@ -14438,11 +15615,12 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
@@ -14452,11 +15630,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -14468,11 +15650,11 @@ esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -14481,11 +15663,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
@@ -14495,11 +15678,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -14511,11 +15698,11 @@ esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -14523,8 +15710,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -14536,39 +15723,213 @@ fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
PKG_CONFIG=""
fi
fi
fi
# Checks for header files.
-for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h poll.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_stdarg_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_stdbool_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_netinet_tcp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_un_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_uio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_resource_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_arpa_inet_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_syslog_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_pwd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_glob_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_grp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_login_cap_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_ws2tcpip_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_endian_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_endian_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_ipc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_shm_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_ifaddrs_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_poll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
+
+fi
# net/if.h portability for Darwin see:
# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
-for ac_header in net/if.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
#include <stdio.h>
#ifdef STDC_HEADERS
# include <stdlib.h>
@@ -14583,33 +15944,23 @@ do :
#endif
"
-if test "x$ac_cv_header_net_if_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_H 1
-_ACEOF
+if test "x$ac_cv_header_net_if_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
fi
-done
-
# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
-for ac_header in TargetConditionals.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
"
-if test "x$ac_cv_header_TargetConditionals_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_TARGETCONDITIONALS_H 1
-_ACEOF
+if test "x$ac_cv_header_TargetConditionals_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
fi
-done
-
-for ac_header in netioapi.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@@ -14643,192 +15994,334 @@ do :
#endif
"
-if test "x$ac_cv_header_netioapi_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETIOAPI_H 1
-_ACEOF
+if test "x$ac_cv_header_netioapi_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
fi
-done
-
# Check for Linux timestamping headers
-for ac_header in linux/net_tstamp.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
"
-if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_NET_TSTAMP_H 1
-_ACEOF
+if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
fi
-done
-
# check for types.
# Using own tests for int64* because autoconf builtin only give 32bit.
ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
-if test "x$ac_cv_type_int8_t" = xyes; then :
+if test "x$ac_cv_type_int8_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define int8_t signed char
-_ACEOF
+printf "%s\n" "#define int8_t signed char" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-if test "x$ac_cv_type_int16_t" = xyes; then :
+if test "x$ac_cv_type_int16_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define int16_t short
-_ACEOF
+printf "%s\n" "#define int16_t short" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
-if test "x$ac_cv_type_int32_t" = xyes; then :
+if test "x$ac_cv_type_int32_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define int32_t int
-_ACEOF
+printf "%s\n" "#define int32_t int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
-if test "x$ac_cv_type_int64_t" = xyes; then :
+if test "x$ac_cv_type_int64_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define int64_t long long
-_ACEOF
+printf "%s\n" "#define int64_t long long" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint8_t" = xyes; then :
+if test "x$ac_cv_type_uint8_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define uint8_t unsigned char
-_ACEOF
+printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint16_t" = xyes; then :
+if test "x$ac_cv_type_uint16_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define uint16_t unsigned short
-_ACEOF
+printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
+if test "x$ac_cv_type_uint32_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define uint32_t unsigned int
-_ACEOF
+printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint64_t" = xyes; then :
+if test "x$ac_cv_type_uint64_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define uint64_t unsigned long long
-_ACEOF
+printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-if test "x$ac_cv_type_ssize_t" = xyes; then :
+if test "x$ac_cv_type_ssize_t" = xyes
+then :
-else
+else $as_nop
+
+printf "%s\n" "#define ssize_t int" >>confdefs.h
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
-cat >>confdefs.h <<_ACEOF
-#define ssize_t int
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
else
+ ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then :
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
ac_cv_type_uid_t=yes
-else
+else $as_nop
ac_cv_type_uid_t=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
-$as_echo "#define uid_t int" >>confdefs.h
+printf "%s\n" "#define uid_t int" >>confdefs.h
-$as_echo "#define gid_t int" >>confdefs.h
+printf "%s\n" "#define gid_t int" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-else
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if defined _WIN64 && !defined __CYGWIN__
+ LLP64
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_pid_type='int'
+else $as_nop
+ ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
+
fi
+
ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = xyes; then :
+if test "x$ac_cv_type_off_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define off_t long int
-_ACEOF
+printf "%s\n" "#define off_t long int" >>confdefs.h
fi
@@ -14839,11 +16332,12 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_type_u_char" = xyes; then :
+if test "x$ac_cv_type_u_char" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define u_char unsigned char" >>confdefs.h
+printf "%s\n" "#define u_char unsigned char" >>confdefs.h
fi
@@ -14854,11 +16348,12 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_type_rlim_t" = xyes; then :
+if test "x$ac_cv_type_rlim_t" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define rlim_t unsigned long" >>confdefs.h
+printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
fi
@@ -14873,11 +16368,12 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_type_socklen_t" = xyes; then :
+if test "x$ac_cv_type_socklen_t" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define socklen_t int" >>confdefs.h
+printf "%s\n" "#define socklen_t int" >>confdefs.h
fi
@@ -14891,11 +16387,12 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_type_in_addr_t" = xyes; then :
+if test "x$ac_cv_type_in_addr_t" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define in_addr_t uint32_t" >>confdefs.h
+printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
fi
@@ -14909,21 +16406,23 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_type_in_port_t" = xyes; then :
+if test "x$ac_cv_type_in_port_t" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define in_port_t uint16_t" >>confdefs.h
+printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
-$as_echo_n "checking if memcmp compares unsigned... " >&6; }
-if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
-$as_echo "cross-compile no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
+printf %s "checking if memcmp compares unsigned... " >&6; }
+if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
+printf "%s\n" "cross-compile no" >&6; }
-$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
+printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
case " $LIBOBJS " in
*" memcmp.$ac_objext "* ) ;;
@@ -14932,7 +16431,7 @@ $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
esac
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14948,14 +16447,15 @@ int main(void)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
-$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
+printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
case " $LIBOBJS " in
*" memcmp.$ac_objext "* ) ;;
@@ -14974,11 +16474,12 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+if test ${ac_cv_sizeof_time_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
$ac_includes_default
#ifdef TIME_WITH_SYS_TIME
@@ -14992,12 +16493,13 @@ $ac_includes_default
# endif
#endif
-"; then :
+"
+then :
-else
+else $as_nop
if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (time_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15006,31 +16508,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if ${ac_cv_sizeof_size_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+printf %s "checking size of size_t... " >&6; }
+if test ${ac_cv_sizeof_size_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_size_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (size_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15039,23 +16541,22 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
# add option to disable the evil rpath
# Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
+if test ${enable_rpath+y}
+then :
enableval=$enable_rpath; enable_rpath=$enableval
-else
+else $as_nop
enable_rpath=yes
fi
@@ -15067,11 +16568,12 @@ fi
# check to see if libraries are needed for these functions.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
-$as_echo_n "checking for library containing inet_pton... " >&6; }
-if ${ac_cv_search_inet_pton+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+printf %s "checking for library containing inet_pton... " >&6; }
+if test ${ac_cv_search_inet_pton+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15079,55 +16581,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_pton ();
int
-main ()
+main (void)
{
return inet_pton ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' nsl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_pton=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_pton+:} false; then :
+ if test ${ac_cv_search_inet_pton+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_pton+:} false; then :
+if test ${ac_cv_search_inet_pton+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_pton=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
-$as_echo "$ac_cv_search_inet_pton" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
ac_res=$ac_cv_search_inet_pton
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+printf %s "checking for library containing socket... " >&6; }
+if test ${ac_cv_search_socket+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15135,46 +16640,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char socket ();
int
-main ()
+main (void)
{
return socket ();
;
return 0;
}
_ACEOF
-for ac_lib in '' socket; do
+for ac_lib in '' socket
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_socket=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_socket+:} false; then :
+ if test ${ac_cv_search_socket+y}
+then :
break
fi
done
-if ${ac_cv_search_socket+:} false; then :
+if test ${ac_cv_search_socket+y}
+then :
-else
+else $as_nop
ac_cv_search_socket=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+printf "%s\n" "$ac_cv_search_socket" >&6; }
ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -15183,33 +16690,28 @@ fi
# check whether strptime also works
# check some functions of the OS before linking libs (while still runnable).
-for ac_header in unistd.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
-if test "x$ac_cv_header_unistd_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UNISTD_H 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
-$as_echo_n "checking for working chown... " >&6; }
-if ${ac_cv_func_chown_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_chown_works=no
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
+printf %s "checking for working chown... " >&6; }
+if test ${ac_cv_func_chown_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in # ((
+ # Guess yes on glibc systems.
+ *-gnu*) ac_cv_func_chown_works=yes ;;
+ # If we don't know, assume the worst.
+ *) ac_cv_func_chown_works=no ;;
+ esac
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
#include <fcntl.h>
int
-main ()
+main (void)
{
char *f = "conftest.chown";
struct stat before, after;
@@ -15228,9 +16730,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_chown_works=yes
-else
+else $as_nop
ac_cv_func_chown_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -15240,52 +16743,47 @@ fi
rm -f conftest.chown
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
-$as_echo "$ac_cv_func_chown_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
+printf "%s\n" "$ac_cv_func_chown_works" >&6; }
if test $ac_cv_func_chown_works = yes; then
-$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
+printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
fi
-for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-
-fi
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
done
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-fi
-done
if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+printf %s "checking for working fork... " >&6; }
+if test ${ac_cv_func_fork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_fork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* By Ruediger Kuhlmann. */
@@ -15295,9 +16793,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_fork_works=yes
-else
+else $as_nop
ac_cv_func_fork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -15305,8 +16804,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+printf "%s\n" "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
@@ -15321,27 +16820,37 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+printf %s "checking for working vfork... " >&6; }
+if test ${ac_cv_func_vfork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_vfork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
+#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include <vfork.h>, but some compilers
@@ -15349,11 +16858,7 @@ $ac_includes_default
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
-#ifdef __cplusplus
sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
{
static pid_t child;
if (!child) {
@@ -15371,13 +16876,18 @@ sparc_address_test (arg) int arg;
}
int
-main ()
+main (void)
{
pid_t parent = getpid ();
pid_t child;
sparc_address_test (0);
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
child = vfork ();
if (child == 0) {
@@ -15399,6 +16909,10 @@ main ()
|| p != p5 || p != p6 || p != p7)
_exit(1);
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
@@ -15414,6 +16928,9 @@ main ()
/* Was there some problem with vforking? */
child < 0
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
/* Did the child fail? (This shouldn't happen.) */
|| status
@@ -15426,9 +16943,10 @@ main ()
}
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_vfork_works=yes
-else
+else $as_nop
ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -15436,46 +16954,47 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
-$as_echo "#define vfork fork" >>confdefs.h
+printf "%s\n" "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
-$as_echo "#define RETSIGTYPE void" >>confdefs.h
+printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
-$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_source+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
-main ()
+main (void)
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
@@ -15483,10 +17002,11 @@ int (*fp) (FILE *, off_t, int) = fseeko;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_sys_largefile_source=no; break
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15494,7 +17014,7 @@ rm -f core conftest.err conftest.$ac_objext \
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
-main ()
+main (void)
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
@@ -15502,23 +17022,22 @@ int (*fp) (FILE *, off_t, int) = fseeko;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_sys_largefile_source=1; break
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
ac_cv_sys_largefile_source=unknown
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
-$as_echo "$ac_cv_sys_largefile_source" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
case $ac_cv_sys_largefile_source in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
-_ACEOF
+printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
;;
esac
rm -rf conftest*
@@ -15528,23 +17047,25 @@ rm -rf conftest*
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
if test $ac_cv_sys_largefile_source != unknown; then
-$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
fi
# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
+if test ${enable_largefile+y}
+then :
enableval=$enable_largefile;
fi
if test "$enable_largefile" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
ac_save_CC=$CC
@@ -15558,44 +17079,47 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
break
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
CC="$CC -n32"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_largefile_CC=' -n32'; break
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if ${ac_cv_sys_file_offset_bits+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15604,22 +17128,23 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_file_offset_bits=no; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _FILE_OFFSET_BITS 64
@@ -15628,43 +17153,43 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_file_offset_bits=64; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_sys_file_offset_bits=unknown
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if ${ac_cv_sys_large_files+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15673,22 +17198,23 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_large_files=no; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGE_FILES 1
@@ -15697,51 +17223,49 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_large_files=1; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
;;
esac
rm -rf conftest*
fi
-
-
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
-$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
+printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
cache=_D_LARGEFILE_SOURCE_1
-if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include <stdio.h>
@@ -15772,14 +17296,14 @@ rm -f conftest conftest.c conftest.o
fi
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
else
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
#echo 'Test with flag is no!'
#cat conftest.c
#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
@@ -15788,8 +17312,8 @@ $as_echo "no" >&6; }
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
:
fi
@@ -15797,21 +17321,22 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
-$as_echo_n "checking if nonblocking sockets work... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
+printf %s "checking if nonblocking sockets work... " >&6; }
if echo $host | grep mingw >/dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
-$as_echo "no (windows)" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
+printf "%s\n" "no (windows)" >&6; }
-$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
+printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
else
-if test "$cross_compiling" = yes; then :
+if test "$cross_compiling" = yes
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
-$as_echo "crosscompile(yes)" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
+printf "%s\n" "crosscompile(yes)" >&6; }
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15941,17 +17466,18 @@ int main(void)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
-$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
+printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
fi
@@ -15962,8 +17488,8 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
-$as_echo_n "checking whether mkdir has one arg... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
+printf %s "checking whether mkdir has one arg... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15977,7 +17503,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#endif
int
-main ()
+main (void)
{
(void)mkdir("directory");
@@ -15986,34 +17512,36 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
+printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
-for ac_func in strptime
+ for ac_func in strptime
do :
ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
-if test "x$ac_cv_func_strptime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRPTIME 1
-_ACEOF
+if test "x$ac_cv_func_strptime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
-$as_echo_n "checking whether strptime works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
+printf %s "checking whether strptime works... " >&6; }
if test c${cross_compiling} = cno; then
-if test "$cross_compiling" = yes; then :
+if test "$cross_compiling" = yes
+then :
eval "ac_cv_c_strptime_works=maybe"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16026,9 +17554,10 @@ res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
if (!res) return 1; return 0; }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
eval "ac_cv_c_strptime_works=yes"
-else
+else $as_nop
eval "ac_cv_c_strptime_works=no"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -16038,8 +17567,8 @@ fi
else
eval "ac_cv_c_strptime_works=maybe"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
-$as_echo "$ac_cv_c_strptime_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
+printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
if test $ac_cv_c_strptime_works = no; then
case " $LIBOBJS " in
*" strptime.$ac_objext "* ) ;;
@@ -16049,13 +17578,11 @@ esac
else
-cat >>confdefs.h <<_ACEOF
-#define STRPTIME_WORKS 1
-_ACEOF
+printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
fi
-else
+else $as_nop
case " $LIBOBJS " in
*" strptime.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strptime.$ac_objext"
@@ -16063,8 +17590,8 @@ else
esac
fi
-done
+done
# check if we can use SO_REUSEPORT
reuseport_default=0
@@ -16072,11 +17599,11 @@ if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
if test "$reuseport_default" = 1; then
-$as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h
+printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
else
-$as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h
+printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
fi
@@ -16085,29 +17612,31 @@ fi
# Copyright 2015, Sami Kerola, CloudFlare.
# BSD licensed.
# Check whether --enable-systemd was given.
-if test "${enable_systemd+set}" = set; then :
+if test ${enable_systemd+y}
+then :
enableval=$enable_systemd;
-else
+else $as_nop
enable_systemd=no
fi
have_systemd=no
-if test "x$enable_systemd" != xno; then :
+if test "x$enable_systemd" != xno
+then :
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
-$as_echo_n "checking for SYSTEMD... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
+printf %s "checking for SYSTEMD... " >&6; }
if test -n "$SYSTEMD_CFLAGS"; then
pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
@@ -16121,10 +17650,10 @@ if test -n "$SYSTEMD_LIBS"; then
pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
@@ -16138,8 +17667,8 @@ fi
if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
@@ -16156,31 +17685,32 @@ fi
have_systemd=no
elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
have_systemd=no
else
SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
have_systemd=yes
fi
- if test "x$have_systemd" != "xyes"; then :
+ if test "x$have_systemd" != "xyes"
+then :
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
-$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+printf %s "checking for SYSTEMD_DAEMON... " >&6; }
if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
@@ -16194,10 +17724,10 @@ if test -n "$SYSTEMD_DAEMON_LIBS"; then
pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
@@ -16211,8 +17741,8 @@ fi
if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
@@ -16229,17 +17759,18 @@ fi
have_systemd_daemon=no
elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
have_systemd_daemon=no
else
SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
have_systemd_daemon=yes
fi
- if test "x$have_systemd_daemon" = "xyes"; then :
+ if test "x$have_systemd_daemon" = "xyes"
+then :
have_systemd=yes
fi
@@ -16249,7 +17780,7 @@ fi
as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
*:yes) :
-$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
LIBS="$LIBS $SYSTEMD_LIBS"
@@ -16273,28 +17804,31 @@ fi
# set memory allocation checking if requested
# Check whether --enable-alloc-checks was given.
-if test "${enable_alloc_checks+set}" = set; then :
+if test ${enable_alloc_checks+y}
+then :
enableval=$enable_alloc_checks;
fi
# Check whether --enable-alloc-lite was given.
-if test "${enable_alloc_lite+set}" = set; then :
+if test ${enable_alloc_lite+y}
+then :
enableval=$enable_alloc_lite;
fi
# Check whether --enable-alloc-nonregional was given.
-if test "${enable_alloc_nonregional+set}" = set; then :
+if test ${enable_alloc_nonregional+y}
+then :
enableval=$enable_alloc_nonregional;
fi
if test x_$enable_alloc_nonregional = x_yes; then
-$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
+printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
fi
if test x_$enable_alloc_checks = x_yes; then
-$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
+printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
@@ -16303,15 +17837,16 @@ $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
else
if test x_$enable_alloc_lite = x_yes; then
-$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
+printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
-$as_echo "no (crosscompile)" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+printf %s "checking for GNU libc compatible malloc... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
+printf "%s\n" "no (crosscompile)" >&6; }
case " $LIBOBJS " in
*" malloc.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS malloc.$ac_objext"
@@ -16319,11 +17854,9 @@ $as_echo "no (crosscompile)" >&6; }
esac
-cat >>confdefs.h <<_ACEOF
-#define malloc rpl_malloc_unbound
-_ACEOF
+printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
@@ -16333,7 +17866,7 @@ char *malloc ();
#endif
int
-main ()
+main (void)
{
if(malloc(0) != 0) return 1;
;
@@ -16341,9 +17874,10 @@ main ()
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
case " $LIBOBJS " in
*" malloc.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS malloc.$ac_objext"
@@ -16351,15 +17885,13 @@ $as_echo "no" >&6; }
esac
-cat >>confdefs.h <<_ACEOF
-#define malloc rpl_malloc_unbound
-_ACEOF
+printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -16373,21 +17905,16 @@ fi
# check windows threads (we use them, not pthreads, on windows).
if test "$on_mingw" = "yes"; then
# check windows threads
- for ac_header in windows.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
"
-if test "x$ac_cv_header_windows_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WINDOWS_H 1
-_ACEOF
+if test "x$ac_cv_header_windows_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
fi
-done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
-$as_echo_n "checking for CreateThread... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
+printf %s "checking for CreateThread... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16396,7 +17923,7 @@ $as_echo_n "checking for CreateThread... " >&6; }
#endif
int
-main ()
+main (void)
{
HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
@@ -16405,19 +17932,20 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
else
# not on mingw, check thread libraries.
@@ -16428,9 +17956,10 @@ else
# the non-threadsafe C libraries.
# Check whether --with-pthreads was given.
-if test "${with_pthreads+set}" = set; then :
+if test ${with_pthreads+y}
+then :
withval=$with_pthreads;
-else
+else $as_nop
withval="yes"
fi
@@ -16438,6 +17967,8 @@ ub_have_pthreads=no
if test x_$withval != x_no; then
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -16447,50 +17978,58 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
+# requires special compiler flags (e.g. on Tru64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+ ax_pthread_save_CC="$CC"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ if test "x$PTHREAD_CC" != "x"
+then :
+ CC="$PTHREAD_CC"
+fi
+ if test "x$PTHREAD_CXX" != "x"
+then :
+ CXX="$PTHREAD_CXX"
+fi
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
+printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char pthread_join ();
int
-main ()
+main (void)
{
return pthread_join ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ax_pthread_ok=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test x"$ax_pthread_ok" = xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xno"; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ CC="$ax_pthread_save_CC"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
fi
# We must check for the threads library under a number of different
@@ -16498,12 +18037,14 @@ fi
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
@@ -16512,92 +18053,189 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+# (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
+# doesn't hurt to check since this sometimes defines pthreads and
+# -D_REENTRANT too), HP C (must be checked before -lpthread, which
+# is present but should not be used directly; and before -mthreads,
+# because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
-case ${host_os} in
+case $host_os in
+
+ freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+ ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+ ;;
+
+ hpux*)
+
+ # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+ # multi-threading and also sets -lpthread."
+
+ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+ ;;
+
+ openedition*)
+
+ # IBM z/OS requires a feature-test macro to be defined in order to
+ # enable POSIX threads at all, so give the user a hint if this is
+ # not set. (We don't define these ourselves, as they can affect
+ # other portions of the system API in unpredictable ways.)
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
+printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
+fi
+rm -rf conftest*
+
+ ;;
+
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
- ;;
+ # tests will erroneously succeed. (N.B.: The stubs are missing
+ # pthread_cleanup_push, or rather a function called by this macro,
+ # so we could check for that, but who knows whether they'll stub
+ # that too in a future libc.) So we'll check first for the
+ # standard Solaris way of linking pthreads (-mt -lpthread).
- darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
;;
esac
-# Clang doesn't consider unrecognized options an error unless we specify
-# -Werror. We throw in some extra Clang-specific options to ensure that
-# this doesn't happen for GCC, which also accepts -Werror.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
-$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
-save_CFLAGS="$CFLAGS"
-ax_pthread_extra_flags="-Werror"
-CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+# Are we compiling with Clang?
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
+printf %s "checking whether $CC is Clang... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-int foo(void);
-int
-main ()
-{
-foo()
- ;
- return 0;
-}
+/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- ax_pthread_extra_flags=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
+then :
+ ax_cv_PTHREAD_CLANG=yes
+fi
+rm -rf conftest*
+
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
+if test "x$GCC" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
+fi
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+if test "x$ax_pthread_clang" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS="$save_CFLAGS"
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
- case $flag in
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+ darwin* | hpux* | linux* | osf* | solaris*)
+ ax_pthread_check_macro="_REENTRANT"
+ ;;
+
+ aix*)
+ ax_pthread_check_macro="_THREAD_SAFE"
+ ;;
+
+ *)
+ ax_pthread_check_macro="--"
+ ;;
+esac
+if test "x$ax_pthread_check_macro" = "x--"
+then :
+ ax_pthread_check_cond=0
+else $as_nop
+ ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
+fi
+
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+ case $ax_pthread_try_flag in
none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+printf %s "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
+printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
;;
-*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
- PTHREAD_CFLAGS="$flag"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
+printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
;;
pthread-config)
# Extract the first word of "pthread-config", so it can be a program name with args.
set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ax_pthread_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ax_pthread_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ax_pthread_config"; then
ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
else
@@ -16605,11 +18243,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ax_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16621,30 +18263,33 @@ fi
fi
ax_pthread_config=$ac_cv_prog_ax_pthread_config
if test -n "$ax_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
-$as_echo "$ax_pthread_config" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+printf "%s\n" "$ax_pthread_config" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
- if test x"$ax_pthread_config" = xno; then continue; fi
+ if test "x$ax_pthread_config" = "xno"
+then :
+ continue
+fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
- PTHREAD_LIBS="-l$flag"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
+printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
+ PTHREAD_LIBS="-l$ax_pthread_try_flag"
;;
esac
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
@@ -16655,13 +18300,23 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
- static void routine(void *a) { *((int*)a) = 0; }
+# if $ax_pthread_check_cond
+# error "$ax_pthread_check_macro must be defined"
+# endif
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
static void *start_routine(void *a) { return a; }
int
-main ()
+main (void)
{
pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
@@ -16673,145 +18328,280 @@ pthread_t th; pthread_attr_t attr;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ax_pthread_ok=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test "x$ax_pthread_ok" = xyes; then
- break;
- fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xyes"
+then :
+ break
+fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+ # Clang takes -pthread; it has never supported any other flag
+
+ # (Note 1: This will need to be revisited if a system that Clang
+ # supports has POSIX threads in a separate library. This tends not
+ # to be the way of modern systems, but it's conceivable.)
+
+ # (Note 2: On some systems, notably Darwin, -pthread is not needed
+ # to get POSIX threads support; the API is always present and
+ # active. We could reasonably leave PTHREAD_CFLAGS empty. But
+ # -pthread does define _REENTRANT, and while the Darwin headers
+ # ignore this macro, third-party headers might not.)
+
+ # However, older versions of Clang make a point of warning the user
+ # that, in an invocation where only linking and no compilation is
+ # taking place, the -pthread option has no effect ("argument unused
+ # during compilation"). They expect -pthread to be passed in only
+ # when source code is being compiled.
+ #
+ # Problem is, this is at odds with the way Automake and most other
+ # C build frameworks function, which is that the same flags used in
+ # compilation (CFLAGS) are also used in linking. Many systems
+ # supported by AX_PTHREAD require exactly this for POSIX threads
+ # support, and in fact it is often not straightforward to specify a
+ # flag that is used only in the compilation phase and not in
+ # linking. Such a scenario is extremely rare in practice.
+ #
+ # Even though use of the -pthread flag in linking would only print
+ # a warning, this can be a nuisance for well-run software projects
+ # that build with -Werror. So if the active version of Clang has
+ # this misfeature, we search for an option to squash it.
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+ # Create an alternate version of $ac_link that compiles and
+ # links in two steps (.c -> .o, .o -> exe) instead of one
+ # (.c -> exe), because the warning occurs only in the second
+ # step
+ ax_pthread_save_ac_link="$ac_link"
+ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+ ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
+ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+ if test "x$ax_pthread_try" = "xunknown"
+then :
+ break
+fi
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_link="$ax_pthread_2step_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ if test "x$ax_pthread_try" = "x"
+then :
+ ax_pthread_try=no
+fi
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+ no | unknown) ;;
+ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+ esac
+
+fi # $ax_pthread_clang = yes
+
+
+
# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
+if test "x$ax_pthread_ok" = "xyes"; then
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+printf %s "checking for joinable pthread attribute... " >&6; }
+if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
-int attr = $attr; return attr /* ; */
+int attr = $ax_pthread_attr; return attr /* ; */
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- attr_name=$attr; break
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ done
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
+printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
+ if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+ test "x$ax_pthread_joinable_attr_defined" != "xyes"
+then :
- fi
+printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
- flag=no
- case ${host_os} in
- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
- osf* | hpux*) flag="-D_REENTRANT";;
- solaris*)
- if test "$GCC" = "yes"; then
- flag="-D_REENTRANT"
- else
- # TODO: What about Clang on Solaris?
- flag="-mt -D_REENTRANT"
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
-$as_echo "$flag" >&6; }
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
+ ax_pthread_joinable_attr_defined=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
-$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
-if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
+printf %s "checking whether more special flags are required for pthreads... " >&6; }
+if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
+printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
+ if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"
+then :
+ PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
int i = PTHREAD_PRIO_INHERIT;
+ return i;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ax_cv_PTHREAD_PRIO_INHERIT=yes
-else
+else $as_nop
ax_cv_PTHREAD_PRIO_INHERIT=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
-$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
- if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
-$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+ ax_pthread_prio_inherit_defined=yes
fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
# More AIX lossage: compile with *_r variant
- if test "x$GCC" != xyes; then
+ if test "x$GCC" != "xyes"; then
case $host_os in
aix*)
case "x/$CC" in #(
x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
#handle absolute path differently from PATH based program lookup
- case "x$CC" in #(
+ case "x$CC" in #(
x/*) :
- if as_fn_executable_p ${CC}_r; then :
+
+ if as_fn_executable_p ${CC}_r
+then :
PTHREAD_CC="${CC}_r"
-fi ;; #(
+fi
+ if test "x${CXX}" != "x"
+then :
+ if as_fn_executable_p ${CXX}_r
+then :
+ PTHREAD_CXX="${CXX}_r"
+fi
+fi
+ ;; #(
*) :
- for ac_prog in ${CC}_r
+
+ for ac_prog in ${CC}_r
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$PTHREAD_CC"; then
ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
else
@@ -16819,11 +18609,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16834,19 +18628,73 @@ fi
fi
PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+printf "%s\n" "$PTHREAD_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -n "$PTHREAD_CC" && break
done
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
- ;;
-esac ;; #(
+
+ if test "x${CXX}" != "x"
+then :
+ for ac_prog in ${CXX}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CXX"; then
+ ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
+if test -n "$PTHREAD_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
+printf "%s\n" "$PTHREAD_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CXX" && break
+done
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+fi
+
+ ;;
+esac
+ ;; #(
*) :
;;
esac
@@ -16856,16 +18704,18 @@ esac
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
+if test "x$ax_pthread_ok" = "xyes"; then
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
if test -n "$PTHREAD_LIBS"; then
LIBS="$PTHREAD_LIBS $LIBS"
@@ -16875,21 +18725,19 @@ $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
ub_have_pthreads=yes
ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
"
-if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
+if test "x$ac_cv_type_pthread_spinlock_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_SPINLOCK_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
"
-if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
+if test "x$ac_cv_type_pthread_rwlock_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_RWLOCK_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
fi
@@ -16898,17 +18746,19 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
-$as_echo_n "checking size of unsigned long... " >&6; }
-if ${ac_cv_sizeof_unsigned_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
+printf %s "checking size of unsigned long... " >&6; }
+if test ${ac_cv_sizeof_unsigned_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_unsigned_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (unsigned long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -16917,31 +18767,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
-$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
+printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
-$as_echo_n "checking size of pthread_t... " >&6; }
-if ${ac_cv_sizeof_pthread_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+printf %s "checking size of pthread_t... " >&6; }
+if test ${ac_cv_sizeof_pthread_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_pthread_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pthread_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -16950,20 +18800,18 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
-$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
-$as_echo_n "checking if -pthread unused during linking... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
+printf %s "checking if -pthread unused during linking... " >&6; }
# catch clang warning 'argument unused during compilation'
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16981,18 +18829,18 @@ _ACEOF
echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
if test $? -ne 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
PTHREAD_CFLAGS_ONLY="-pthread"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi # endif cc successful
rm -f conftest conftest.c conftest.o
fi # endif -pthread in CFLAGS
@@ -17015,23 +18863,25 @@ fi
# check solaris thread library
# Check whether --with-solaris-threads was given.
-if test "${with_solaris_threads+set}" = set; then :
+if test ${with_solaris_threads+y}
+then :
withval=$with_solaris_threads;
-else
+else $as_nop
withval="no"
fi
ub_have_sol_threads=no
if test x_$withval != x_no; then
if test x_$ub_have_pthreads != x_no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
-$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
+printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
-$as_echo_n "checking for library containing thr_create... " >&6; }
-if ${ac_cv_search_thr_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
+printf %s "checking for library containing thr_create... " >&6; }
+if test ${ac_cv_search_thr_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17039,60 +18889,63 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char thr_create ();
int
-main ()
+main (void)
{
return thr_create ();
;
return 0;
}
_ACEOF
-for ac_lib in '' thread; do
+for ac_lib in '' thread
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_thr_create=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_thr_create+:} false; then :
+ if test ${ac_cv_search_thr_create+y}
+then :
break
fi
done
-if ${ac_cv_search_thr_create+:} false; then :
+if test ${ac_cv_search_thr_create+y}
+then :
-else
+else $as_nop
ac_cv_search_thr_create=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
-$as_echo "$ac_cv_search_thr_create" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
+printf "%s\n" "$ac_cv_search_thr_create" >&6; }
ac_res=$ac_cv_search_thr_create
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
-$as_echo_n "checking whether $CC supports -mt... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
+printf %s "checking whether $CC supports -mt... " >&6; }
cache=`echo mt | sed 'y%.=/+-%___p_%'`
-if eval \${cv_prog_cc_flag_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
@@ -17105,20 +18958,20 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
:
CFLAGS="$CFLAGS -mt"
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
CFLAGS="$CFLAGS -D_REENTRANT"
fi
ub_have_sol_threads=yes
-else
+else $as_nop
as_fn_error $? "no solaris threads found." "$LINENO" 5
@@ -17132,7 +18985,8 @@ fi # end of non-mingw check of thread libraries
# Check for SYSLOG_FACILITY
# Check whether --with-syslog-facility was given.
-if test "${with_syslog_facility+set}" = set; then :
+if test ${with_syslog_facility+y}
+then :
withval=$with_syslog_facility; UNBOUND_SYSLOG_FACILITY="$withval"
fi
@@ -17144,24 +18998,23 @@ case "${UNBOUND_SYSLOG_FACILITY}" in
esac
-cat >>confdefs.h <<_ACEOF
-#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}
-_ACEOF
+printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
# Check for dynamic library module
# Check whether --with-dynlibmodule was given.
-if test "${with_dynlibmodule+set}" = set; then :
+if test ${with_dynlibmodule+y}
+then :
withval=$with_dynlibmodule;
-else
+else $as_nop
withval="no"
fi
if test x_$withval != x_no; then
-$as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
+printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
WITH_DYNLIBMODULE=yes
@@ -17173,11 +19026,12 @@ $as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
# link with -ldl if not already there, for all executables because
# dlopen call is in the dynlib module. For unbound executable, also
# export symbols.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-$as_echo_n "checking for library containing dlopen... " >&6; }
-if ${ac_cv_search_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+printf %s "checking for library containing dlopen... " >&6; }
+if test ${ac_cv_search_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17185,46 +19039,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dl; do
+for ac_lib in '' dl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_dlopen=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_dlopen+:} false; then :
+ if test ${ac_cv_search_dlopen+y}
+then :
break
fi
done
-if ${ac_cv_search_dlopen+:} false; then :
+if test ${ac_cv_search_dlopen+y}
+then :
-else
+else $as_nop
ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-$as_echo "$ac_cv_search_dlopen" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+printf "%s\n" "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -17239,9 +19095,10 @@ fi
# Check for PyUnbound
# Check whether --with-pyunbound was given.
-if test "${with_pyunbound+set}" = set; then :
+if test ${with_pyunbound+y}
+then :
withval=$with_pyunbound;
-else
+else $as_nop
withval="no"
fi
@@ -17256,9 +19113,10 @@ fi
# Check for Python module
# Check whether --with-pythonmodule was given.
-if test "${with_pythonmodule+set}" = set; then :
+if test ${with_pythonmodule+y}
+then :
withval=$with_pythonmodule;
-else
+else $as_nop
withval="no"
fi
@@ -17282,11 +19140,12 @@ if test x_$ub_test_python != x_no; then
# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
set dummy python$PYTHON_VERSION; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PYTHON+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PYTHON+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PYTHON in
[\\/]* | ?:[\\/]*)
ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
@@ -17296,11 +19155,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17312,11 +19175,11 @@ esac
fi
PYTHON=$ac_cv_path_PYTHON
if test -n "$PYTHON"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
-$as_echo "$PYTHON" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+printf "%s\n" "$PYTHON" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -17358,29 +19221,29 @@ fi
# Check if you have the first module
if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
sysconfig_module=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
-$as_echo_n "checking for the $m Python module... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
+printf %s "checking for the $m Python module... " >&6; }
if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
sysconfig_module="$m"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
# if not found, try the other one.
if test -z "$sysconfig_module"; then
if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
-$as_echo_n "checking for the $m2 Python module... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
+printf %s "checking for the $m2 Python module... " >&6; }
if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
sysconfig_module="$m2"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
Please check your Python installation. The errors are:
$m
@@ -17395,8 +19258,8 @@ $as_echo "no" >&6; }
#
# Check for Python include path
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
-$as_echo_n "checking for Python include path... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
+printf %s "checking for Python include path... " >&6; }
if test -z "$PYTHON_CPPFLAGS"; then
if test "$sysconfig_module" = "sysconfig"; then
python_path=`$PYTHON -c 'import sysconfig; \
@@ -17410,21 +19273,21 @@ $as_echo_n "checking for Python include path... " >&6; }
fi
PYTHON_CPPFLAGS=$python_path
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
-$as_echo "$PYTHON_CPPFLAGS" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
+printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
#
# Check for Python library path
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
-$as_echo_n "checking for Python library path... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
+printf %s "checking for Python library path... " >&6; }
if test -z "$PYTHON_LDFLAGS"; then
PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
-$as_echo "$PYTHON_LDFLAGS" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
+printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
if test -z "$PYTHON_LIBDIR"; then
@@ -17435,8 +19298,8 @@ $as_echo "$PYTHON_LDFLAGS" >&6; }
#
# Check for site packages
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
-$as_echo_n "checking for Python site-packages path... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
+printf %s "checking for Python site-packages path... " >&6; }
if test -z "$PYTHON_SITE_PKG"; then
if test "$sysconfig_module" = "sysconfig"; then
PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
@@ -17446,15 +19309,15 @@ $as_echo_n "checking for Python site-packages path... " >&6; }
print(distutils.sysconfig.get_python_lib(1,0));"`
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
-$as_echo "$PYTHON_SITE_PKG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
+printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
#
# final check to see if everything compiles alright
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
-$as_echo_n "checking consistency of all components of python development environment... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
+printf %s "checking consistency of all components of python development environment... " >&6; }
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -17473,7 +19336,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#include <Python.h>
int
-main ()
+main (void)
{
Py_Initialize();
@@ -17482,16 +19345,17 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
pythonexists=yes
-else
+else $as_nop
pythonexists=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
-$as_echo "$pythonexists" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
+printf "%s\n" "$pythonexists" >&6; }
if test ! "$pythonexists" = "yes"; then
as_fn_error $? "
@@ -17537,7 +19401,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Have Python
-$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
if test x_$ub_with_pythonmod != x_no; then
if test -n "$LIBS"; then
@@ -17564,10 +19428,10 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
fi
ub_have_python=yes
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
else
@@ -17578,19 +19442,24 @@ fi
# Check for SWIG
ub_have_swig=no
# Check whether --enable-swig-version-check was given.
-if test "${enable_swig_version_check+set}" = set; then :
+if test ${enable_swig_version_check+y}
+then :
enableval=$enable_swig_version_check;
fi
if test "$enable_swig_version_check" = "yes"; then
- # Extract the first word of "swig", so it can be a program name with args.
-set dummy swig; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_SWIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ # Find path to the "swig" executable.
+ for ac_prog in swig swig3.0 swig2.0
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_SWIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $SWIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
@@ -17600,11 +19469,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17616,24 +19489,27 @@ esac
fi
SWIG=$ac_cv_path_SWIG
if test -n "$SWIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
-$as_echo "$SWIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
+printf "%s\n" "$SWIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
+ test -n "$SWIG" && break
+done
+
if test -z "$SWIG" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
-$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
- SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
- elif test -n "2.0.1" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
-$as_echo_n "checking for SWIG version... " >&6; }
+ :
+ elif test -z "2.0.1" ; then
+ :
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
+printf %s "checking SWIG version... " >&6; }
swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
-$as_echo "$swig_version" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
+printf "%s\n" "$swig_version" >&6; }
if test -n "$swig_version" ; then
# Calculate the required version number components
required=2.0.1
@@ -17641,12 +19517,12 @@ $as_echo "$swig_version" >&6; }
if test -z "$required_major" ; then
required_major=0
fi
- required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
required_minor=`echo $required | sed 's/[^0-9].*//'`
if test -z "$required_minor" ; then
required_minor=0
fi
- required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
required_patch=`echo $required | sed 's/[^0-9].*//'`
if test -z "$required_patch" ; then
required_patch=0
@@ -17667,47 +19543,49 @@ $as_echo "$swig_version" >&6; }
if test -z "$available_patch" ; then
available_patch=0
fi
- badversion=0
- if test $available_major -lt $required_major ; then
- badversion=1
- fi
- if test $available_major -eq $required_major \
- -a $available_minor -lt $required_minor ; then
- badversion=1
- fi
- if test $available_major -eq $required_major \
- -a $available_minor -eq $required_minor \
- -a $available_patch -lt $required_patch ; then
- badversion=1
- fi
- if test $badversion -eq 1 ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version. You should look at http://www.swig.org" >&5
-$as_echo "$as_me: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version. You should look at http://www.swig.org" >&2;}
- SWIG='echo "Error: SWIG version >= 2.0.1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ # Convert the version tuple into a single number for easier comparison.
+ # Using base 100 should be safe since SWIG internally uses BCD values
+ # to encode its version number.
+ required_swig_vernum=`expr $required_major \* 10000 \
+ \+ $required_minor \* 100 \+ $required_patch`
+ available_swig_vernum=`expr $available_major \* 10000 \
+ \+ $available_minor \* 100 \+ $available_patch`
+
+ if test $available_swig_vernum -lt $required_swig_vernum; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version." >&5
+printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version." >&2;}
+ SWIG=''
+
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
-$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
- SWIG_LIB=`$SWIG -swiglib`
- { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
-$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
+printf %s "checking for SWIG library... " >&6; }
+ SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
+printf "%s\n" "$SWIG_LIB" >&6; }
+
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
-$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
- SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
+printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
+ SWIG=''
+
fi
fi
else
- # Extract the first word of "swig", so it can be a program name with args.
-set dummy swig; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_SWIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ # Find path to the "swig" executable.
+ for ac_prog in swig swig3.0 swig2.0
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_SWIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $SWIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
@@ -17717,11 +19595,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17733,24 +19615,27 @@ esac
fi
SWIG=$ac_cv_path_SWIG
if test -n "$SWIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
-$as_echo "$SWIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
+printf "%s\n" "$SWIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
+ test -n "$SWIG" && break
+done
+
if test -z "$SWIG" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
-$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
- SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
- elif test -n "" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
-$as_echo_n "checking for SWIG version... " >&6; }
+ :
+ elif test -z "" ; then
+ :
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
+printf %s "checking SWIG version... " >&6; }
swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
-$as_echo "$swig_version" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
+printf "%s\n" "$swig_version" >&6; }
if test -n "$swig_version" ; then
# Calculate the required version number components
required=
@@ -17758,12 +19643,12 @@ $as_echo "$swig_version" >&6; }
if test -z "$required_major" ; then
required_major=0
fi
- required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
required_minor=`echo $required | sed 's/[^0-9].*//'`
if test -z "$required_minor" ; then
required_minor=0
fi
- required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
required_patch=`echo $required | sed 's/[^0-9].*//'`
if test -z "$required_patch" ; then
required_patch=0
@@ -17784,57 +19669,55 @@ $as_echo "$swig_version" >&6; }
if test -z "$available_patch" ; then
available_patch=0
fi
- badversion=0
- if test $available_major -lt $required_major ; then
- badversion=1
- fi
- if test $available_major -eq $required_major \
- -a $available_minor -lt $required_minor ; then
- badversion=1
- fi
- if test $available_major -eq $required_major \
- -a $available_minor -eq $required_minor \
- -a $available_patch -lt $required_patch ; then
- badversion=1
- fi
- if test $badversion -eq 1 ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= is required. You have $swig_version. You should look at http://www.swig.org" >&5
-$as_echo "$as_me: WARNING: SWIG version >= is required. You have $swig_version. You should look at http://www.swig.org" >&2;}
- SWIG='echo "Error: SWIG version >= is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ # Convert the version tuple into a single number for easier comparison.
+ # Using base 100 should be safe since SWIG internally uses BCD values
+ # to encode its version number.
+ required_swig_vernum=`expr $required_major \* 10000 \
+ \+ $required_minor \* 100 \+ $required_patch`
+ available_swig_vernum=`expr $available_major \* 10000 \
+ \+ $available_minor \* 100 \+ $available_patch`
+
+ if test $available_swig_vernum -lt $required_swig_vernum; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= is required. You have $swig_version." >&5
+printf "%s\n" "$as_me: WARNING: SWIG version >= is required. You have $swig_version." >&2;}
+ SWIG=''
+
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
-$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
- SWIG_LIB=`$SWIG -swiglib`
- { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
-$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
+printf %s "checking for SWIG library... " >&6; }
+ SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
+printf "%s\n" "$SWIG_LIB" >&6; }
+
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
-$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
- SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
+printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
+ SWIG=''
+
fi
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
-$as_echo_n "checking SWIG... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
+printf %s "checking SWIG... " >&6; }
if test ! -x "$SWIG"; then
as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
else
-$as_echo "#define HAVE_SWIG 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
swig="$SWIG"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
-$as_echo "present" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
+printf "%s\n" "present" >&6; }
# If have Python & SWIG
# Declare PythonMod
if test x_$ub_with_pythonmod != x_no; then
-$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
+printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
WITH_PYTHONMODULE=yes
@@ -17851,7 +19734,7 @@ $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
# Declare PyUnbound
if test x_$ub_with_pyunbound != x_no; then
-$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
+printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
WITH_PYUNBOUND=yes
@@ -17866,8 +19749,8 @@ $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
-$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
+printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
ub_with_pyunbound=no
ub_with_pythonmod=no
fi
@@ -17892,11 +19775,12 @@ CONFIG_DATE=`date +%Y%m%d`
USE_NSS="no"
# Check whether --with-nss was given.
-if test "${with_nss+set}" = set; then :
+if test ${with_nss+y}
+then :
withval=$with_nss;
USE_NSS="yes"
-$as_echo "#define HAVE_NSS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
if test "$withval" != "" -a "$withval" != "yes"; then
CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
@@ -17926,25 +19810,21 @@ fi
USE_NETTLE="no"
# Check whether --with-nettle was given.
-if test "${with_nettle+set}" = set; then :
+if test ${with_nettle+y}
+then :
withval=$with_nettle;
USE_NETTLE="yes"
-$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
- for ac_header in nettle/dsa-compat.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
"
-if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETTLE_DSA_COMPAT_H 1
-_ACEOF
+if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
fi
-done
-
if test "$withval" != "" -a "$withval" != "yes"; then
CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
LDFLAGS="$LDFLAGS -L$withval/lib"
@@ -17972,10 +19852,11 @@ if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
# Check whether --with-ssl was given.
-if test "${with_ssl+set}" = set; then :
+if test ${with_ssl+y}
+then :
withval=$with_ssl;
-else
+else $as_nop
withval="yes"
@@ -17987,8 +19868,8 @@ fi
withval=$withval
if test x_$withval != x_no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
-$as_echo_n "checking for SSL... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
+printf %s "checking for SSL... " >&6; }
if test -n "$withval"; then
if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
ssldir="$withval"
@@ -18027,12 +19908,10 @@ $as_echo_n "checking for SSL... " >&6; }
if test x_$found_ssl != x_yes; then
as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
-$as_echo "found in $ssldir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
+printf "%s\n" "found in $ssldir" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SSL /**/
-_ACEOF
+printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
HAVE_SSL=yes
if test "$ssldir" != "/usr"; then
@@ -18049,15 +19928,15 @@ _ACEOF
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
-$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
+printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
LIBS="$LIBS -lcrypto"
LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18067,30 +19946,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
# check if -lwsock32 or -lgdi32 are needed.
BAKLIBS="$LIBS"
BAKSSLLIBS="$LIBSSL_LIBS"
LIBS="$LIBS -lgdi32 -lws2_32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
-$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
+printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18100,30 +19980,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
LIBS="$BAKLIBS"
LIBSSL_LIBS="$BAKSSLLIBS"
LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
-$as_echo_n "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
+printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18133,30 +20014,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
LIBS="$BAKLIBS"
LIBSSL_LIBS="$BAKSSLLIBS"
LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
-$as_echo_n "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
+printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18166,30 +20048,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
LIBS="$BAKLIBS"
LIBSSL_LIBS="$BAKSSLLIBS"
LIBS="$LIBS -ldl"
LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
-$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
+printf %s "checking if -lcrypto needs -ldl... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18199,29 +20082,30 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
LIBS="$BAKLIBS"
LIBSSL_LIBS="$BAKSSLLIBS"
LIBS="$LIBS -ldl -pthread"
LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
-$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
+printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18231,128 +20115,113 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
fi
-for ac_header in openssl/ssl.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
"
-if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_SSL_H 1
-_ACEOF
+if test "x$ac_cv_header_openssl_ssl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
fi
-done
-
-for ac_header in openssl/err.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
"
-if test "x$ac_cv_header_openssl_err_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_ERR_H 1
-_ACEOF
+if test "x$ac_cv_header_openssl_err_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
fi
-done
-
-for ac_header in openssl/rand.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
"
-if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_OPENSSL_RAND_H 1
-_ACEOF
+if test "x$ac_cv_header_openssl_rand_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
fi
-done
-
# check if libssl needs libdl
BAKLIBS="$LIBS"
LIBS="-lssl $LIBS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
-$as_echo_n "checking if libssl needs libdl... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
+printf %s "checking if libssl needs libdl... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char SSL_CTX_new ();
int
-main ()
+main (void)
{
return SSL_CTX_new ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
LIBS="$BAKLIBS"
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
LIBS="$BAKLIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-$as_echo_n "checking for library containing dlopen... " >&6; }
-if ${ac_cv_search_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+printf %s "checking for library containing dlopen... " >&6; }
+if test ${ac_cv_search_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18360,53 +20229,55 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dl; do
+for ac_lib in '' dl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_dlopen=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_dlopen+:} false; then :
+ if test ${ac_cv_search_dlopen+y}
+then :
break
fi
done
-if ${ac_cv_search_dlopen+:} false; then :
+if test ${ac_cv_search_dlopen+y}
+then :
-else
+else $as_nop
ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-$as_echo "$ac_cv_search_dlopen" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+printf "%s\n" "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
SSLLIB="-lssl"
@@ -18416,13 +20287,13 @@ PC_CRYPTO_DEPENDENCY=""
# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
BAKLIBS="$LIBS"
LIBS="-lssl $LIBS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
-$as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
+printf %s "checking if libssl needs -lcrypt32... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
int EVP_sha256(void);
@@ -18432,123 +20303,433 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
LIBS="$BAKLIBS"
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
LIBS="$BAKLIBS"
LIBS="$LIBS -lcrypt32"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
-$as_echo_n "checking for LibreSSL... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
+printf %s "checking for LibreSSL... " >&6; }
if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
# libressl provides these compat functions, but they may also be
# declared by the OS in libc. See if they have been declared.
- ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strlcpy" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRLCPY $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strlcat" = xyes; then :
+printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strlcat" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRLCAT $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
-if test "x$ac_cv_have_decl_arc4random" = xyes; then :
+printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_arc4random" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ARC4RANDOM $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
-if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
+printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h openssl/core_names.h openssl/param_build.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_openssl_conf_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_engine_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_bn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
-for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_default_properties_is_fips_enabled EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params OSSL_PARAM_BLD_new BIO_set_callback_ex
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_dh_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_dsa_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_rsa_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_core_names_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_param_build_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
+if test "x$ac_cv_func_OPENSSL_config" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
+if test "x$ac_cv_func_EVP_sha1" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
+if test "x$ac_cv_func_EVP_sha256" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
+if test "x$ac_cv_func_EVP_sha512" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
+if test "x$ac_cv_func_FIPS_mode" = xyes
+then :
+ printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
+if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
+if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
+if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
+if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
+if test "x$ac_cv_func_EVP_cleanup" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
+if test "x$ac_cv_func_ENGINE_cleanup" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
+if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
+if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
+then :
+ printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
+if test "x$ac_cv_func_ERR_free_strings" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
+if test "x$ac_cv_func_RAND_cleanup" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
+if test "x$ac_cv_func_DSA_SIG_set0" = xyes
+then :
+ printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
+if test "x$ac_cv_func_EVP_dss1" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
+if test "x$ac_cv_func_EVP_DigestVerify" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
+if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
+if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
+if test "x$ac_cv_func_HMAC_Init_ex" = xyes
+then :
+ printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
+if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
+then :
+ printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
+if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
+if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
+then :
+ printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
+if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
+then :
+ printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
fi
-done
# these check_funcs need -lssl
BAKLIBS="$LIBS"
LIBS="-lssl $LIBS"
-for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb SSL_CTX_set_alpn_select_cb SSL_get0_alpn_selected SSL_CTX_set_alpn_protos SSL_get1_peer_certificate
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
+if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
+if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
+if test "x$ac_cv_func_SSL_set1_host" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
+if test "x$ac_cv_func_SSL_get0_peername" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
+if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
+then :
+ printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
+if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
+if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
+if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
+if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
+if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
+if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
fi
-done
LIBS="$BAKLIBS"
-ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
+ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
$ac_includes_default
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
@@ -18568,17 +20749,15 @@ $ac_includes_default
#include <openssl/ssl.h>
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
+printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
$ac_includes_default
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
@@ -18598,17 +20777,15 @@ $ac_includes_default
#include <openssl/ssl.h>
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
+printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
$ac_includes_default
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
@@ -18628,22 +20805,20 @@ $ac_includes_default
#include <openssl/ssl.h>
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
# check function return type.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
-$as_echo_n "checking the return type of HMAC_Init_ex... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
+printf %s "checking the return type of HMAC_Init_ex... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18666,7 +20841,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <openssl/evp.h>
int
-main ()
+main (void)
{
HMAC_CTX* hmac_ctx = NULL;
@@ -18679,21 +20854,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
-$as_echo "int" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
+printf "%s\n" "int" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
-$as_echo "void" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
+printf "%s\n" "void" >&6; }
-$as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
+printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
@@ -18702,30 +20878,33 @@ fi
# libbsd
# Check whether --with-libbsd was given.
-if test "${with_libbsd+set}" = set; then :
+if test ${with_libbsd+y}
+then :
withval=$with_libbsd;
- for ac_header in bsd/string.h bsd/stdlib.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_bsd_string_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_bsd_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
-done
+fi
if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
- as_ac_Search=`$as_echo "ac_cv_search_$func" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
-$as_echo_n "checking for library containing $func... " >&6; }
-if eval \${$as_ac_Search+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
+printf %s "checking for library containing $func... " >&6; }
+if eval test \${$as_ac_Search+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18733,51 +20912,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char $func ();
int
-main ()
+main (void)
{
return $func ();
;
return 0;
}
_ACEOF
-for ac_lib in '' bsd; do
+for ac_lib in '' bsd
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
eval "$as_ac_Search=\$ac_res"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if eval \${$as_ac_Search+:} false; then :
+ if eval test \${$as_ac_Search+y}
+then :
break
fi
done
-if eval \${$as_ac_Search+:} false; then :
+if eval test \${$as_ac_Search+y}
+then :
-else
+else $as_nop
eval "$as_ac_Search=no"
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
eval ac_res=\$$as_ac_Search
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval ac_res=\$$as_ac_Search
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-$as_echo "#define HAVE_LIBBSD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
PC_LIBBSD_DEPENDENCY=libbsd
@@ -18791,7 +20972,8 @@ fi
# Check whether --enable-sha1 was given.
-if test "${enable_sha1+set}" = set; then :
+if test ${enable_sha1+y}
+then :
enableval=$enable_sha1;
fi
@@ -18800,14 +20982,15 @@ case "$enable_sha1" in
;;
yes|*)
-$as_echo "#define USE_SHA1 1" >>confdefs.h
+printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
;;
esac
# Check whether --enable-sha2 was given.
-if test "${enable_sha2+set}" = set; then :
+if test ${enable_sha2+y}
+then :
enableval=$enable_sha2;
fi
@@ -18816,20 +20999,21 @@ case "$enable_sha2" in
;;
yes|*)
-$as_echo "#define USE_SHA2 1" >>confdefs.h
+printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
;;
esac
# Check whether --enable-subnet was given.
-if test "${enable_subnet+set}" = set; then :
+if test ${enable_subnet+y}
+then :
enableval=$enable_subnet;
fi
case "$enable_subnet" in
yes)
-$as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
+printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
@@ -18843,7 +21027,8 @@ esac
# check whether gost also works
# Check whether --enable-gost was given.
-if test "${enable_gost+set}" = set; then :
+if test ${enable_gost+y}
+then :
enableval=$enable_gost;
fi
@@ -18854,30 +21039,33 @@ case "$enable_gost" in
;;
*)
ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
-if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
+if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
+then :
:
-else
+else $as_nop
as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
fi
ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
-if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
+if test "x$ac_cv_func_EC_KEY_new" = xyes
+then :
-else
+else $as_nop
as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
-$as_echo_n "checking if GOST works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
+printf %s "checking if GOST works... " >&6; }
if test c${cross_compiling} = cno; then
BAKCFLAGS="$CFLAGS"
if test -n "$ssldir"; then
CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
fi
-if test "$cross_compiling" = yes; then :
+if test "$cross_compiling" = yes
+then :
eval "ac_cv_c_gost_works=maybe"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18963,9 +21151,10 @@ int main(void) {
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
eval "ac_cv_c_gost_works=yes"
-else
+else $as_nop
eval "ac_cv_c_gost_works=no"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -18976,20 +21165,21 @@ CFLAGS="$BAKCFLAGS"
else
eval "ac_cv_c_gost_works=maybe"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
-$as_echo "$ac_cv_c_gost_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
+printf "%s\n" "$ac_cv_c_gost_works" >&6; }
if test "$ac_cv_c_gost_works" != no; then
use_gost="yes"
-$as_echo "#define USE_GOST 1" >>confdefs.h
+printf "%s\n" "#define USE_GOST 1" >>confdefs.h
fi
;;
esac
fi
# Check whether --enable-ecdsa was given.
-if test "${enable_ecdsa+set}" = set; then :
+if test ${enable_ecdsa+y}
+then :
enableval=$enable_ecdsa;
fi
@@ -19000,90 +21190,87 @@ case "$enable_ecdsa" in
*)
if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
-if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
+if test "x$ac_cv_func_ECDSA_sign" = xyes
+then :
-else
+else $as_nop
as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
fi
ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
-if test "x$ac_cv_func_SHA384_Init" = xyes; then :
+if test "x$ac_cv_func_SHA384_Init" = xyes
+then :
-else
+else $as_nop
as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
fi
- ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
+printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
-_ACEOF
-if test $ac_have_decl = 1; then :
-
-else
+else $as_nop
as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
fi
-ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
+ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
+printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
-_ACEOF
-if test $ac_have_decl = 1; then :
-
-else
+else $as_nop
as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
fi
# see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
-$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
+printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define USE_ECDSA_EVP_WORKAROUND 1
-_ACEOF
+printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
else
# not OpenSSL, thus likely LibreSSL, which supports it
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
fi
# we now know we have ECDSA and the required curves.
-cat >>confdefs.h <<_ACEOF
-#define USE_ECDSA 1
-_ACEOF
+printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
use_ecdsa="yes"
;;
esac
# Check whether --enable-dsa was given.
-if test "${enable_dsa+set}" = set; then :
+if test ${enable_dsa+y}
+then :
enableval=$enable_dsa;
fi
@@ -19093,9 +21280,10 @@ case "$enable_dsa" in
# detect if DSA is supported, and turn it off if not.
if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
-if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
+if test "x$ac_cv_func_DSA_SIG_new" = xyes
+then :
- as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
+ as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
$ac_includes_default
#ifdef HAVE_OPENSSL_ERR_H
@@ -19115,30 +21303,27 @@ $ac_includes_default
#endif
"
-if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
+if eval test \"x\$"$as_ac_Type"\" = x"yes"
+then :
-cat >>confdefs.h <<_ACEOF
-#define USE_DSA 1
-_ACEOF
+printf "%s\n" "#define USE_DSA 1" >>confdefs.h
-else
+else $as_nop
if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
fi
fi
-else
+else $as_nop
if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
fi
fi
else
-cat >>confdefs.h <<_ACEOF
-#define USE_DSA 1
-_ACEOF
+printf "%s\n" "#define USE_DSA 1" >>confdefs.h
fi
;;
@@ -19150,18 +21335,20 @@ esac
# Check whether --with-deprecate-rsa-1024 was given.
-if test "${with_deprecate_rsa_1024+set}" = set; then :
+if test ${with_deprecate_rsa_1024+y}
+then :
withval=$with_deprecate_rsa_1024;
fi
if test "$with_deprecate_rsa_1024" = "yes"; then
-$as_echo "#define DEPRECATE_RSA_1024 1" >>confdefs.h
+printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
fi
# Check whether --enable-ed25519 was given.
-if test "${enable_ed25519+set}" = set; then :
+if test ${enable_ed25519+y}
+then :
enableval=$enable_ed25519;
fi
@@ -19171,56 +21358,52 @@ case "$enable_ed25519" in
;;
*)
if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
- ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_ED25519" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NID_ED25519 $ac_have_decl
-_ACEOF
-if test $ac_have_decl = 1; then :
+printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
use_ed25519="yes"
-else
+else $as_nop
if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
fi
fi
fi
if test $USE_NETTLE = "yes"; then
- for ac_header in nettle/eddsa.h
+ for ac_header in nettle/eddsa.h
do :
ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
"
-if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETTLE_EDDSA_H 1
-_ACEOF
+if test "x$ac_cv_header_nettle_eddsa_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
use_ed25519="yes"
fi
done
-
fi
if test $use_ed25519 = "yes"; then
-cat >>confdefs.h <<_ACEOF
-#define USE_ED25519 1
-_ACEOF
+printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
fi
;;
esac
# Check whether --enable-ed448 was given.
-if test "${enable_ed448+set}" = set; then :
+if test ${enable_ed448+y}
+then :
enableval=$enable_ed448;
fi
@@ -19230,24 +21413,23 @@ case "$enable_ed448" in
;;
*)
if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
- ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
#include <openssl/evp.h>
-"
-if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_ED448" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NID_ED448 $ac_have_decl
-_ACEOF
-if test $ac_have_decl = 1; then :
+printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
use_ed448="yes"
-else
+else $as_nop
if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
fi
fi
@@ -19255,16 +21437,15 @@ fi
fi
if test $use_ed448 = "yes"; then
-cat >>confdefs.h <<_ACEOF
-#define USE_ED448 1
-_ACEOF
+printf "%s\n" "#define USE_ED448 1" >>confdefs.h
fi
;;
esac
# Check whether --enable-event-api was given.
-if test "${enable_event_api+set}" = set; then :
+if test ${enable_event_api+y}
+then :
enableval=$enable_event_api;
fi
@@ -19280,45 +21461,42 @@ case "$enable_event_api" in
esac
# Check whether --enable-tfo-client was given.
-if test "${enable_tfo_client+set}" = set; then :
+if test ${enable_tfo_client+y}
+then :
enableval=$enable_tfo_client;
fi
case "$enable_tfo_client" in
yes)
case "$host_os" in
- linux*) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
+ linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
#include <netinet/tcp.h>
-"
-if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
-$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
-else
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
+printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
+else $as_nop
as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
fi
-
-cat >>confdefs.h <<_ACEOF
-#define USE_MSG_FASTOPEN 1
-_ACEOF
+printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
;;
- darwin*) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
+ darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
#include <sys/socket.h>
-"
-if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
-$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
-else
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
+printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
+else $as_nop
as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
fi
-
-cat >>confdefs.h <<_ACEOF
-#define USE_OSX_MSG_FASTOPEN 1
-_ACEOF
+printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
;;
esac
@@ -19328,27 +21506,26 @@ _ACEOF
esac
# Check whether --enable-tfo-server was given.
-if test "${enable_tfo_server+set}" = set; then :
+if test ${enable_tfo_server+y}
+then :
enableval=$enable_tfo_server;
fi
case "$enable_tfo_server" in
yes)
- ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
#include <netinet/tcp.h>
-"
-if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
-$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
-else
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
+printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
+else $as_nop
as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
fi
-
-cat >>confdefs.h <<_ACEOF
-#define USE_TCP_FASTOPEN 1
-_ACEOF
+printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
;;
no|*)
@@ -19358,18 +21535,19 @@ esac
# check for libevent
# Check whether --with-libevent was given.
-if test "${with_libevent+set}" = set; then :
+if test ${with_libevent+y}
+then :
withval=$with_libevent;
-else
+else $as_nop
with_libevent="no"
fi
if test "x_$with_libevent" != x_no; then
-$as_echo "#define USE_LIBEVENT 1" >>confdefs.h
+printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
-$as_echo_n "checking for libevent... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
+printf %s "checking for libevent... " >&6; }
if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
fi
@@ -19386,8 +21564,8 @@ $as_echo_n "checking for libevent... " >&6; }
if test x_$found_libevent != x_yes; then
if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
# libevent source directory
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
-$as_echo "found in $thedir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
+printf "%s\n" "found in $thedir" >&6; }
CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
BAK_LDFLAGS_SET="1"
BAK_LDFLAGS="$LDFLAGS"
@@ -19410,8 +21588,8 @@ Please note that this alternative is not as capable as libevent when using
large outgoing port ranges. " "$LINENO" 5
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
-$as_echo "found in $thedir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
+printf "%s\n" "found in $thedir" >&6; }
if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
@@ -19435,11 +21613,12 @@ $as_echo "found in $thedir" >&6; }
fi
fi
# check for library used by libevent after 1.3c
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19447,76 +21626,75 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char clock_gettime ();
int
-main ()
+main (void)
{
return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' rt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_clock_gettime=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if test ${ac_cv_search_clock_gettime+y}
+then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if test ${ac_cv_search_clock_gettime+y}
+then :
-else
+else $as_nop
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
# is the event.h header libev or libevent?
- for ac_header in event.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
"
-if test "x$ac_cv_header_event_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_H 1
-_ACEOF
+if test "x$ac_cv_header_event_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
fi
-done
-
- ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
#include <event.h>
-"
-if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
-$as_echo_n "checking for library containing event_set... " >&6; }
-if ${ac_cv_search_event_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
+printf %s "checking for library containing event_set... " >&6; }
+if test ${ac_cv_search_event_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19524,58 +21702,61 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char event_set ();
int
-main ()
+main (void)
{
return event_set ();
;
return 0;
}
_ACEOF
-for ac_lib in '' ev; do
+for ac_lib in '' ev
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_event_set=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_event_set+:} false; then :
+ if test ${ac_cv_search_event_set+y}
+then :
break
fi
done
-if ${ac_cv_search_event_set+:} false; then :
+if test ${ac_cv_search_event_set+y}
+then :
-else
+else $as_nop
ac_cv_search_event_set=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
-$as_echo "$ac_cv_search_event_set" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
+printf "%s\n" "$ac_cv_search_event_set" >&6; }
ac_res=$ac_cv_search_event_set
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
-$as_echo_n "checking for library containing event_set... " >&6; }
-if ${ac_cv_search_event_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
+printf %s "checking for library containing event_set... " >&6; }
+if test ${ac_cv_search_event_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19583,147 +21764,118 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char event_set ();
int
-main ()
+main (void)
{
return event_set ();
;
return 0;
}
_ACEOF
-for ac_lib in '' event; do
+for ac_lib in '' event
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_event_set=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_event_set+:} false; then :
+ if test ${ac_cv_search_event_set+y}
+then :
break
fi
done
-if ${ac_cv_search_event_set+:} false; then :
+if test ${ac_cv_search_event_set+y}
+then :
-else
+else $as_nop
ac_cv_search_event_set=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
-$as_echo "$ac_cv_search_event_set" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
+printf "%s\n" "$ac_cv_search_event_set" >&6; }
ac_res=$ac_cv_search_event_set
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
fi
-
- for ac_func in event_base_free
-do :
- ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
-if test "x$ac_cv_func_event_base_free" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_FREE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
+if test "x$ac_cv_func_event_base_free" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
fi
-done
# only in libevent 1.2 and later
- for ac_func in event_base_once
-do :
- ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
-if test "x$ac_cv_func_event_base_once" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_ONCE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
+if test "x$ac_cv_func_event_base_once" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
fi
-done
# only in libevent 1.4.1 and later
- for ac_func in event_base_new
-do :
- ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
-if test "x$ac_cv_func_event_base_new" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_NEW 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
+if test "x$ac_cv_func_event_base_new" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
fi
-done
# only in libevent 1.4.1 and later
- for ac_func in event_base_get_method
-do :
- ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
-if test "x$ac_cv_func_event_base_get_method" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_GET_METHOD 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
+if test "x$ac_cv_func_event_base_get_method" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
fi
-done
# only in libevent 1.4.3 and later
- for ac_func in ev_loop
-do :
- ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
-if test "x$ac_cv_func_ev_loop" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EV_LOOP 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
+if test "x$ac_cv_func_ev_loop" = xyes
+then :
+ printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
fi
-done
# only in libev. (tested on 3.51)
- for ac_func in ev_default_loop
-do :
- ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
-if test "x$ac_cv_func_ev_default_loop" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EV_DEFAULT_LOOP 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
+if test "x$ac_cv_func_ev_default_loop" = xyes
+then :
+ printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
fi
-done
# only in libev. (tested on 4.00)
- for ac_func in event_assign
-do :
- ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
-if test "x$ac_cv_func_event_assign" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_ASSIGN 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
+if test "x$ac_cv_func_event_assign" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
fi
-done
# in libevent, for thread-safety
- ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
#ifdef HAVE_EVENT_H
# include <event.h>
#else
# include \"event2/event.h\"
#endif
-"
-if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_evsignal_assign" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
PC_LIBEVENT_DEPENDENCY="libevent"
@@ -19732,21 +21884,22 @@ _ACEOF
fi
else
-$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
+printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
fi
# check for libexpat
# Check whether --with-libexpat was given.
-if test "${with_libexpat+set}" = set; then :
+if test ${with_libexpat+y}
+then :
withval=$with_libexpat;
-else
+else $as_nop
withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
-$as_echo_n "checking for libexpat... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
+printf %s "checking for libexpat... " >&6; }
found_libexpat="no"
for dir in $withval ; do
if test -f "$dir/include/expat.h"; then
@@ -19755,55 +21908,49 @@ for dir in $withval ; do
CPPFLAGS="$CPPFLAGS -I$dir/include"
LDFLAGS="$LDFLAGS -L$dir/lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
-$as_echo "found in $dir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
break;
fi
done
if test x_$found_libexpat != x_yes; then
as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
fi
-for ac_header in expat.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
"
-if test "x$ac_cv_header_expat_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EXPAT_H 1
-_ACEOF
+if test "x$ac_cv_header_expat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
fi
-done
-
-ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
+ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
#include <expat.h>
-"
-if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_XML_StopParser" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
# hiredis (redis C client for cachedb)
# Check whether --with-libhiredis was given.
-if test "${with_libhiredis+set}" = set; then :
+if test ${with_libhiredis+y}
+then :
withval=$with_libhiredis;
-else
+else $as_nop
withval="no"
fi
found_libhiredis="no"
if test x_$withval = x_yes -o x_$withval != x_no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
-$as_echo_n "checking for libhiredis... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
+printf %s "checking for libhiredis... " >&6; }
if test x_$withval = x_ -o x_$withval = x_yes; then
withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
fi
@@ -19814,10 +21961,10 @@ $as_echo_n "checking for libhiredis... " >&6; }
CPPFLAGS="$CPPFLAGS -I$dir/include"
LDFLAGS="$LDFLAGS -L$dir/lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
-$as_echo "found in $dir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
-$as_echo "#define USE_REDIS 1" >>confdefs.h
+printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
LIBS="$LIBS -lhiredis"
break;
@@ -19826,48 +21973,42 @@ $as_echo "#define USE_REDIS 1" >>confdefs.h
if test x_$found_libhiredis != x_yes; then
as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
fi
- for ac_header in hiredis/hiredis.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
"
-if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_HIREDIS_HIREDIS_H 1
-_ACEOF
+if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
fi
-done
-
- ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
#include <hiredis/hiredis.h>
-"
-if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_redisConnect" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_REDISCONNECT $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
fi
# nghttp2
# Check whether --with-libnghttp2 was given.
-if test "${with_libnghttp2+set}" = set; then :
+if test ${with_libnghttp2+y}
+then :
withval=$with_libnghttp2;
-else
+else $as_nop
withval="no"
fi
found_libnghttp2="no"
if test x_$withval = x_yes -o x_$withval != x_no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
-$as_echo_n "checking for libnghttp2... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
+printf %s "checking for libnghttp2... " >&6; }
if test x_$withval = x_ -o x_$withval = x_yes; then
withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
fi
@@ -19878,10 +22019,10 @@ $as_echo_n "checking for libnghttp2... " >&6; }
CPPFLAGS="$CPPFLAGS -I$dir/include"
LDFLAGS="$LDFLAGS -L$dir/lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
-$as_echo "found in $dir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
-$as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
LIBS="$LIBS -lnghttp2"
break;
@@ -19890,32 +22031,25 @@ $as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h
if test x_$found_libnghttp2 != x_yes; then
as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
fi
- for ac_header in nghttp2/nghttp2.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
"
-if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NGHTTP2_NGHTTP2_H 1
-_ACEOF
+if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
fi
-done
-
- ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
+ ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
#include <nghttp2/nghttp2.h>
-"
-if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
fi
@@ -19923,7 +22057,8 @@ fi
staticexe=""
# Check whether --enable-static-exe was given.
-if test "${enable_static_exe+set}" = set; then :
+if test ${enable_static_exe+y}
+then :
enableval=$enable_static_exe;
fi
@@ -19937,11 +22072,12 @@ if test x_$enable_static_exe = x_yes; then
else
LIBS="$LIBS -lgdi32"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
-$as_echo_n "checking for compress in -lz... " >&6; }
-if ${ac_cv_lib_z_compress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+printf %s "checking for compress in -lz... " >&6; }
+if test ${ac_cv_lib_z_compress+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19950,30 +22086,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char compress ();
int
-main ()
+main (void)
{
return compress ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_z_compress=yes
-else
+else $as_nop
ac_cv_lib_z_compress=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
-$as_echo "$ac_cv_lib_z_compress" >&6; }
-if test "x$ac_cv_lib_z_compress" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = xyes
+then :
LIBS="$LIBS -lz"
fi
@@ -19987,7 +22122,8 @@ fi
# set full static linking if requested
# Check whether --enable-fully-static was given.
-if test "${enable_fully_static+set}" = set; then :
+if test ${enable_fully_static+y}
+then :
enableval=$enable_fully_static;
fi
@@ -20000,11 +22136,12 @@ if test x_$enable_fully_static = x_yes; then
else
LIBS="$LIBS -lgdi32"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
-$as_echo_n "checking for compress in -lz... " >&6; }
-if ${ac_cv_lib_z_compress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+printf %s "checking for compress in -lz... " >&6; }
+if test ${ac_cv_lib_z_compress+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20013,30 +22150,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char compress ();
int
-main ()
+main (void)
{
return compress ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_z_compress=yes
-else
+else $as_nop
ac_cv_lib_z_compress=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
-$as_echo "$ac_cv_lib_z_compress" >&6; }
-if test "x$ac_cv_lib_z_compress" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = xyes
+then :
LIBS="$LIBS -lz"
fi
@@ -20050,21 +22186,22 @@ fi
# set lock checking if requested
# Check whether --enable-lock_checks was given.
-if test "${enable_lock_checks+set}" = set; then :
+if test ${enable_lock_checks+y}
+then :
enableval=$enable_lock_checks;
fi
if test x_$enable_lock_checks = x_yes; then
-$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
+printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
CHECKLOCK_OBJ="checklocks.lo"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
-$as_echo_n "checking for getaddrinfo... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
+printf %s "checking for getaddrinfo... " >&6; }
ac_cv_func_getaddrinfo=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20084,11 +22221,12 @@ int main(void) {
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_getaddrinfo="yes"
if test "$ac_cv_header_windows_h" = "yes"; then
-$as_echo "#define USE_WINSOCK 1" >>confdefs.h
+printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
USE_WINSOCK="1"
if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
@@ -20098,7 +22236,7 @@ $as_echo "#define USE_WINSOCK 1" >>confdefs.h
fi
fi
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20107,7 +22245,7 @@ else
#endif
int
-main ()
+main (void)
{
(void)getaddrinfo(NULL, NULL, NULL, NULL);
@@ -20117,15 +22255,16 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_getaddrinfo="yes"
-$as_echo "#define USE_WINSOCK 1" >>confdefs.h
+printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
USE_WINSOCK="1"
-else
+else $as_nop
ORIGLIBS="$LIBS"
LIBS="$LIBS -lws2_32"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20136,7 +22275,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#endif
int
-main ()
+main (void)
{
(void)getaddrinfo(NULL, NULL, NULL, NULL);
@@ -20146,66 +22285,63 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_getaddrinfo="yes"
-$as_echo "#define USE_WINSOCK 1" >>confdefs.h
+printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
USE_WINSOCK="1"
-else
+else $as_nop
ac_cv_func_getaddrinfo="no"
LIBS="$ORIGLIBS"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
-$as_echo "$ac_cv_func_getaddrinfo" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
+printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
if test $ac_cv_func_getaddrinfo = yes; then
-$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
fi
if test "$USE_WINSOCK" = 1; then
-$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
+printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
- for ac_header in iphlpapi.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
+ ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
#include <windows.h>
"
-if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_IPHLPAPI_H 1
-_ACEOF
+if test "x$ac_cv_header_iphlpapi_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
fi
-done
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_WINDRES+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_WINDRES+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$WINDRES"; then
ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
@@ -20213,11 +22349,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -20228,11 +22368,11 @@ fi
fi
WINDRES=$ac_cv_prog_WINDRES
if test -n "$WINDRES"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
-$as_echo "$WINDRES" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+printf "%s\n" "$WINDRES" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -20241,11 +22381,12 @@ if test -z "$ac_cv_prog_WINDRES"; then
ac_ct_WINDRES=$WINDRES
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_WINDRES+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_WINDRES"; then
ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
else
@@ -20253,11 +22394,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_WINDRES="windres"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -20268,11 +22413,11 @@ fi
fi
ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
if test -n "$ac_ct_WINDRES"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
-$as_echo "$ac_ct_WINDRES" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
+printf "%s\n" "$ac_ct_WINDRES" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_WINDRES" = x; then
@@ -20280,8 +22425,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
WINDRES=$ac_ct_WINDRES
@@ -20312,7 +22457,7 @@ fi
WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
-$as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
fi
if test $ac_cv_func_getaddrinfo = no; then
@@ -20326,8 +22471,8 @@ fi
# check after getaddrinfo for its libraries
# check ioctlsocket
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
-$as_echo_n "checking for ioctlsocket... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
+printf %s "checking for ioctlsocket... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20336,7 +22481,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#endif
int
-main ()
+main (void)
{
(void)ioctlsocket(0, 0, NULL);
@@ -20345,43 +22490,41 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
+printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
# see if daemon(3) exists, and if it is deprecated.
-for ac_func in daemon
-do :
- ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
-if test "x$ac_cv_func_daemon" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DAEMON 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
+if test "x$ac_cv_func_daemon" = xyes
+then :
+ printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
fi
-done
if test $ac_cv_func_daemon = yes; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
-$as_echo_n "checking if daemon is deprecated... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
+printf %s "checking if daemon is deprecated... " >&6; }
cache=`echo daemon | sed 'y%.=/+-%___p_%'`
-if eval \${cv_cc_deprecated_$cache+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if eval test \${cv_cc_deprecated_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
echo '
#include <stdlib.h>
@@ -20398,18 +22541,16 @@ rm -f conftest conftest.o conftest.c
fi
if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DEPRECATED_DAEMON 1
-_ACEOF
+printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
:
else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
:
fi
@@ -20423,11 +22564,10 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
fi
@@ -20467,18 +22607,17 @@ $ac_includes_default
#endif
"
-if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
+if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
-$as_echo_n "checking for htobe64... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
+printf %s "checking for htobe64... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20491,28 +22630,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#endif
int
-main ()
+main (void)
{
unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_HTOBE64 1" >>confdefs.h
+printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
-$as_echo_n "checking for be64toh... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
+printf %s "checking for be64toh... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20525,31 +22665,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#endif
int
-main ()
+main (void)
{
unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_BE64TOH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
-$as_echo_n "checking for library containing setusercontext... " >&6; }
-if ${ac_cv_search_setusercontext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
+printf %s "checking for library containing setusercontext... " >&6; }
+if test ${ac_cv_search_setusercontext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20557,116 +22699,303 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char setusercontext ();
int
-main ()
+main (void)
{
return setusercontext ();
;
return 0;
}
_ACEOF
-for ac_lib in '' util; do
+for ac_lib in '' util
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_setusercontext=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_setusercontext+:} false; then :
+ if test ${ac_cv_search_setusercontext+y}
+then :
break
fi
done
-if ${ac_cv_search_setusercontext+:} false; then :
+if test ${ac_cv_search_setusercontext+y}
+then :
-else
+else $as_nop
ac_cv_search_setusercontext=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
-$as_echo "$ac_cv_search_setusercontext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
+printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
ac_res=$ac_cv_search_setusercontext
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4 getifaddrs if_nametoindex poll gettid
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
+if test "x$ac_cv_func_tzset" = xyes
+then :
+ printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
+if test "x$ac_cv_func_fcntl" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
+if test "x$ac_cv_func_getpwnam" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
+if test "x$ac_cv_func_endpwent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
+if test "x$ac_cv_func_getrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
+if test "x$ac_cv_func_setrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
+if test "x$ac_cv_func_setsid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
+if test "x$ac_cv_func_chroot" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
+if test "x$ac_cv_func_kill" = xyes
+then :
+ printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
+if test "x$ac_cv_func_chown" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
+if test "x$ac_cv_func_sleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
+if test "x$ac_cv_func_usleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
+if test "x$ac_cv_func_random" = xyes
+then :
+ printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
+if test "x$ac_cv_func_srandom" = xyes
+then :
+ printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
+if test "x$ac_cv_func_recvmsg" = xyes
+then :
+ printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
+if test "x$ac_cv_func_sendmsg" = xyes
+then :
+ printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
+if test "x$ac_cv_func_writev" = xyes
+then :
+ printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
+if test "x$ac_cv_func_socketpair" = xyes
+then :
+ printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
+if test "x$ac_cv_func_glob" = xyes
+then :
+ printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
+if test "x$ac_cv_func_initgroups" = xyes
+then :
+ printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
+if test "x$ac_cv_func_localtime_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
+if test "x$ac_cv_func_setusercontext" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
+if test "x$ac_cv_func__beginthreadex" = xyes
+then :
+ printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
+if test "x$ac_cv_func_endservent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
-for ac_func in setresuid
+fi
+ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
+if test "x$ac_cv_func_endprotoent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
+if test "x$ac_cv_func_fsync" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
+if test "x$ac_cv_func_shmget" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
+if test "x$ac_cv_func_accept4" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
+if test "x$ac_cv_func_if_nametoindex" = xyes
+then :
+ printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
+if test "x$ac_cv_func_gettid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
+
+fi
+
+
+ for ac_func in setresuid
do :
ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
-if test "x$ac_cv_func_setresuid" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETRESUID 1
-_ACEOF
+if test "x$ac_cv_func_setresuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
-else
- for ac_func in setreuid
-do :
+else $as_nop
ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
-if test "x$ac_cv_func_setreuid" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETREUID 1
-_ACEOF
+if test "x$ac_cv_func_setreuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
fi
-done
fi
+
done
-for ac_func in setresgid
+ for ac_func in setresgid
do :
ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
-if test "x$ac_cv_func_setresgid" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETRESGID 1
-_ACEOF
+if test "x$ac_cv_func_setresgid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
-else
- for ac_func in setregid
-do :
+else $as_nop
ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
-if test "x$ac_cv_func_setregid" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETREGID 1
-_ACEOF
+if test "x$ac_cv_func_setregid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
fi
-done
fi
-done
+done
# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
if echo $host_os | grep darwin8 > /dev/null; then
-$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
+printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
fi
-ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
+ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
$ac_includes_default
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -20688,17 +23017,15 @@ $ac_includes_default
#include <ws2tcpip.h>
#endif
-"
-if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_inet_pton" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_INET_PTON $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
+printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
$ac_includes_default
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -20720,22 +23047,21 @@ $ac_includes_default
#include <ws2tcpip.h>
#endif
-"
-if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_inet_ntop" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_INET_NTOP $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
-if test "x$ac_cv_func_inet_aton" = xyes; then :
- $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
+if test "x$ac_cv_func_inet_aton" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" inet_aton.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
@@ -20744,12 +23070,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-if test "x$ac_cv_func_inet_pton" = xyes; then :
- $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" inet_pton.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
@@ -20758,12 +23084,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
-if test "x$ac_cv_func_inet_ntop" = xyes; then :
- $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
+if test "x$ac_cv_func_inet_ntop" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" inet_ntop.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
@@ -20772,12 +23098,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
-if test "x$ac_cv_func_snprintf" = xyes; then :
- $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" snprintf.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
@@ -20786,16 +23112,16 @@ esac
fi
-
# test if snprintf return the proper length
if test "x$ac_cv_func_snprintf" = xyes; then
if test c${cross_compiling} = cno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
-$as_echo_n "checking for correct snprintf return value... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
-$as_echo "maybe" >&6; }
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
+printf %s "checking for correct snprintf return value... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
+printf "%s\n" "maybe" >&6; }
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
@@ -20803,15 +23129,16 @@ $ac_includes_default
int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
-$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
+printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
case " $LIBOBJS " in
*" snprintf.$ac_objext "* ) ;;
@@ -20828,10 +23155,11 @@ fi
fi
fi
ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
-if test "x$ac_cv_func_strlcat" = xyes; then :
- $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
+if test "x$ac_cv_func_strlcat" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" strlcat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
@@ -20840,12 +23168,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
-if test "x$ac_cv_func_strlcpy" = xyes; then :
- $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" strlcpy.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
@@ -20854,12 +23182,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
-if test "x$ac_cv_func_memmove" = xyes; then :
- $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
+if test "x$ac_cv_func_memmove" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" memmove.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS memmove.$ac_objext"
@@ -20868,12 +23196,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
-if test "x$ac_cv_func_gmtime_r" = xyes; then :
- $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
+if test "x$ac_cv_func_gmtime_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" gmtime_r.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
@@ -20882,12 +23210,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
-if test "x$ac_cv_func_isblank" = xyes; then :
- $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
+if test "x$ac_cv_func_isblank" = xyes
+then :
+ printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" isblank.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS isblank.$ac_objext"
@@ -20896,12 +23224,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
-if test "x$ac_cv_func_explicit_bzero" = xyes; then :
- $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
+if test "x$ac_cv_func_explicit_bzero" = xyes
+then :
+ printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" explicit_bzero.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
@@ -20910,11 +23238,10 @@ esac
fi
-
LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
-$as_echo_n "checking for reallocarray... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
+printf %s "checking for reallocarray... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
@@ -20930,17 +23257,18 @@ int main(void) {
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
+printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
case " $LIBOBJS " in
*" reallocarray.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
@@ -20949,25 +23277,24 @@ esac
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
-if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
+ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_reallocarray" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_REALLOCARRAY $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
if test "$USE_NSS" = "no"; then
ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
-if test "x$ac_cv_func_arc4random" = xyes; then :
- $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
+if test "x$ac_cv_func_arc4random" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" arc4random.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
@@ -20976,12 +23303,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
-if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
- $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
+if test "x$ac_cv_func_arc4random_uniform" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" arc4random_uniform.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
@@ -20990,7 +23317,6 @@ esac
fi
-
if test "$ac_cv_func_arc4random" = "no"; then
case " $LIBOBJS " in
*" arc4_lock.$ac_objext "* ) ;;
@@ -20998,15 +23324,15 @@ fi
;;
esac
- for ac_func in getentropy
+
+ for ac_func in getentropy
do :
ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
-if test "x$ac_cv_func_getentropy" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETENTROPY 1
-_ACEOF
+if test "x$ac_cv_func_getentropy" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
-else
+else $as_nop
if test "$USE_WINSOCK" = 1; then
case " $LIBOBJS " in
@@ -21032,26 +23358,25 @@ esac
;;
esac
- for ac_header in sys/sha2.h
+ for ac_header in sys/sha2.h
do :
ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
"
-if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SHA2_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_sha2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
+
+else $as_nop
-else
- for ac_func in SHA512_Update
+ for ac_func in SHA512_Update
do :
ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
-if test "x$ac_cv_func_SHA512_Update" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SHA512_UPDATE 1
-_ACEOF
+if test "x$ac_cv_func_SHA512_Update" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" sha512.$ac_objext "* ) ;;
@@ -21061,22 +23386,22 @@ esac
fi
-done
+done
fi
done
-
if test "$ac_cv_header_sys_sha2_h" = "yes"; then
# this lib needed for sha2 on solaris
LIBS="$LIBS -lmd"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21084,46 +23409,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char clock_gettime ();
int
-main ()
+main (void)
{
return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' rt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_clock_gettime=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if test ${ac_cv_search_clock_gettime+y}
+then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if test ${ac_cv_search_clock_gettime+y}
+then :
-else
+else $as_nop
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -21144,18 +23471,18 @@ esac
;;
esac
- for ac_func in SHA512_Update
+
+ for ac_func in SHA512_Update
do :
ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
-if test "x$ac_cv_func_SHA512_Update" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SHA512_UPDATE 1
-_ACEOF
+if test "x$ac_cv_func_SHA512_Update" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
-else
+else $as_nop
-$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
+printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
case " $LIBOBJS " in
*" sha512.$ac_objext "* ) ;;
@@ -21165,37 +23492,29 @@ esac
fi
-done
- for ac_header in sys/sysctl.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
+done
+ ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
"
-if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SYSCTL_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_sysctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
fi
-done
-
- for ac_func in getauxval
-do :
- ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
-if test "x$ac_cv_func_getauxval" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETAUXVAL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
+if test "x$ac_cv_func_getauxval" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21203,46 +23522,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char clock_gettime ();
int
-main ()
+main (void)
{
return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' rt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_clock_gettime=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if test ${ac_cv_search_clock_gettime+y}
+then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if test ${ac_cv_search_clock_gettime+y}
+then :
-else
+else $as_nop
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -21252,17 +23573,18 @@ fi
fi
fi
-done
+done
fi
fi
LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
-if test "x$ac_cv_func_ctime_r" = xyes; then :
- $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
+if test "x$ac_cv_func_ctime_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" ctime_r.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
@@ -21271,12 +23593,12 @@ esac
fi
-
ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
-if test "x$ac_cv_func_strsep" = xyes; then :
- $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
+if test "x$ac_cv_func_strsep" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
-else
+else $as_nop
case " $LIBOBJS " in
*" strsep.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strsep.$ac_objext"
@@ -21286,9 +23608,9 @@ esac
fi
-
# Check whether --enable-allsymbols was given.
-if test "${enable_allsymbols+set}" = set; then :
+if test ${enable_allsymbols+y}
+then :
enableval=$enable_allsymbols;
fi
@@ -21298,7 +23620,7 @@ case "$enable_allsymbols" in
UBSYMS=""
EXTRALINK="libunbound.la"
-$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
+printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
;;
no|*)
@@ -21328,18 +23650,20 @@ fi
# check for dnstap if requested
# Check whether --enable-dnstap was given.
-if test "${enable_dnstap+set}" = set; then :
+if test ${enable_dnstap+y}
+then :
enableval=$enable_dnstap; opt_dnstap=$enableval
-else
+else $as_nop
opt_dnstap=no
fi
# Check whether --with-dnstap-socket-path was given.
-if test "${with_dnstap_socket_path+set}" = set; then :
+if test ${with_dnstap_socket_path+y}
+then :
withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
-else
+else $as_nop
opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
fi
@@ -21347,11 +23671,12 @@ fi
if test "x$opt_dnstap" != "xno"; then
# Extract the first word of "protoc-c", so it can be a program name with args.
set dummy protoc-c; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PROTOC_C+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PROTOC_C+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PROTOC_C in
[\\/]* | ?:[\\/]*)
ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
@@ -21361,11 +23686,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -21377,11 +23706,11 @@ esac
fi
PROTOC_C=$ac_cv_path_PROTOC_C
if test -n "$PROTOC_C"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
-$as_echo "$PROTOC_C" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
+printf "%s\n" "$PROTOC_C" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -21390,7 +23719,8 @@ fi
fi
# Check whether --with-protobuf-c was given.
-if test "${with_protobuf_c+set}" = set; then :
+if test ${with_protobuf_c+y}
+then :
withval=$with_protobuf_c;
# workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
@@ -21400,22 +23730,22 @@ if test "${with_protobuf_c+set}" = set; then :
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
-else
+else $as_nop
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
-$as_echo_n "checking for PROTOBUFC... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
+printf %s "checking for PROTOBUFC... " >&6; }
if test -n "$PROTOBUFC_CFLAGS"; then
pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
@@ -21429,10 +23759,10 @@ if test -n "$PROTOBUFC_LIBS"; then
pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
@@ -21446,8 +23776,8 @@ fi
if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
@@ -21478,8 +23808,8 @@ fi
elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
# pkg-config failed; try falling back to known values
# workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
@@ -21498,8 +23828,8 @@ $as_echo "no" >&6; }
else
PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
LIBS="$LIBS $PROTOBUFC_LIBS"
@@ -21510,11 +23840,12 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
-$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
-if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
+printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
+if test ${ac_cv_search_protobuf_c_message_pack+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21522,55 +23853,57 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char protobuf_c_message_pack ();
int
-main ()
+main (void)
{
return protobuf_c_message_pack ();
;
return 0;
}
_ACEOF
-for ac_lib in '' protobuf-c; do
+for ac_lib in '' protobuf-c
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_protobuf_c_message_pack=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
+ if test ${ac_cv_search_protobuf_c_message_pack+y}
+then :
break
fi
done
-if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
+if test ${ac_cv_search_protobuf_c_message_pack+y}
+then :
-else
+else $as_nop
ac_cv_search_protobuf_c_message_pack=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
-$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
+printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
ac_res=$ac_cv_search_protobuf_c_message_pack
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-else
+else $as_nop
as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
fi
-$as_echo "#define USE_DNSTAP 1" >>confdefs.h
+printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
ENABLE_DNSTAP=1
@@ -21579,9 +23912,7 @@ $as_echo "#define USE_DNSTAP 1" >>confdefs.h
hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
-cat >>confdefs.h <<_ACEOF
-#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
-_ACEOF
+printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
@@ -21604,9 +23935,10 @@ _ACEOF
# check for dnscrypt if requested
# Check whether --enable-dnscrypt was given.
-if test "${enable_dnscrypt+set}" = set; then :
+if test ${enable_dnscrypt+y}
+then :
enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
-else
+else $as_nop
opt_dnscrypt=no
fi
@@ -21614,18 +23946,20 @@ fi
if test "x$opt_dnscrypt" != "xno"; then
# Check whether --with-libsodium was given.
-if test "${with_libsodium+set}" = set; then :
+if test ${with_libsodium+y}
+then :
withval=$with_libsodium;
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
-$as_echo_n "checking for library containing sodium_init... " >&6; }
-if ${ac_cv_search_sodium_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
+printf %s "checking for library containing sodium_init... " >&6; }
+if test ${ac_cv_search_sodium_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21633,57 +23967,60 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sodium_init ();
int
-main ()
+main (void)
{
return sodium_init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' sodium; do
+for ac_lib in '' sodium
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_sodium_init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_sodium_init+:} false; then :
+ if test ${ac_cv_search_sodium_init+y}
+then :
break
fi
done
-if ${ac_cv_search_sodium_init+:} false; then :
+if test ${ac_cv_search_sodium_init+y}
+then :
-else
+else $as_nop
ac_cv_search_sodium_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
-$as_echo "$ac_cv_search_sodium_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
+printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
ac_res=$ac_cv_search_sodium_init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-else
+else $as_nop
as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
-$as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
-if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
+printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
+if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21691,66 +24028,69 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char crypto_box_curve25519xchacha20poly1305_beforenm ();
int
-main ()
+main (void)
{
return crypto_box_curve25519xchacha20poly1305_beforenm ();
;
return 0;
}
_ACEOF
-for ac_lib in '' sodium; do
+for ac_lib in '' sodium
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
+ if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
+then :
break
fi
done
-if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
+if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
+then :
-else
+else $as_nop
ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
-$as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
+printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
ENABLE_DNSCRYPT_XCHACHA20=1
-$as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
+printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
-else
+else $as_nop
ENABLE_DNSCRYPT_XCHACHA20=0
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
-$as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
-if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
+printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
+if test ${ac_cv_search_sodium_set_misuse_handler+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21758,57 +24098,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sodium_set_misuse_handler ();
int
-main ()
+main (void)
{
return sodium_set_misuse_handler ();
;
return 0;
}
_ACEOF
-for ac_lib in '' sodium; do
+for ac_lib in '' sodium
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_sodium_set_misuse_handler=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
+ if test ${ac_cv_search_sodium_set_misuse_handler+y}
+then :
break
fi
done
-if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
+if test ${ac_cv_search_sodium_set_misuse_handler+y}
+then :
-else
+else $as_nop
ac_cv_search_sodium_set_misuse_handler=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
-$as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
+printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
ac_res=$ac_cv_search_sodium_set_misuse_handler
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-$as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
+printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
fi
-$as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
+printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
ENABLE_DNSCRYPT=1
@@ -21831,7 +24173,8 @@ $as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
# check for cachedb if requested
# Check whether --enable-cachedb was given.
-if test "${enable_cachedb+set}" = set; then :
+if test ${enable_cachedb+y}
+then :
enableval=$enable_cachedb;
fi
@@ -21840,7 +24183,7 @@ if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
case "$enable_cachedb" in
yes)
-$as_echo "#define USE_CACHEDB 1" >>confdefs.h
+printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
@@ -21854,14 +24197,15 @@ esac
# check for ipsecmod if requested
# Check whether --enable-ipsecmod was given.
-if test "${enable_ipsecmod+set}" = set; then :
+if test ${enable_ipsecmod+y}
+then :
enableval=$enable_ipsecmod;
fi
case "$enable_ipsecmod" in
yes)
-$as_echo "#define USE_IPSECMOD 1" >>confdefs.h
+printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
@@ -21875,14 +24219,15 @@ esac
# check for ipset if requested
# Check whether --enable-ipset was given.
-if test "${enable_ipset+set}" = set; then :
+if test ${enable_ipset+y}
+then :
enableval=$enable_ipset;
fi
case "$enable_ipset" in
yes)
-$as_echo "#define USE_IPSET 1" >>confdefs.h
+printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
IPSET_SRC="ipset/ipset.c"
@@ -21892,15 +24237,16 @@ $as_echo "#define USE_IPSET 1" >>confdefs.h
# mnl
# Check whether --with-libmnl was given.
-if test "${with_libmnl+set}" = set; then :
+if test ${with_libmnl+y}
+then :
withval=$with_libmnl;
-else
+else $as_nop
withval="yes"
fi
found_libmnl="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
-$as_echo_n "checking for libmnl... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
+printf %s "checking for libmnl... " >&6; }
if test x_$withval = x_ -o x_$withval = x_yes; then
withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
fi
@@ -21917,8 +24263,8 @@ $as_echo_n "checking for libmnl... " >&6; }
if test "$dir" != "/usr"; then
LDFLAGS="$LDFLAGS -L$dir/lib"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
-$as_echo "found in $dir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
LIBS="$LIBS -lmnl"
break;
fi
@@ -21932,14 +24278,15 @@ $as_echo "found in $dir" >&6; }
;;
esac
# Check whether --enable-explicit-port-randomisation was given.
-if test "${enable_explicit_port_randomisation+set}" = set; then :
+if test ${enable_explicit_port_randomisation+y}
+then :
enableval=$enable_explicit_port_randomisation;
fi
case "$enable_explicit_port_randomisation" in
no)
-$as_echo "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
+printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
;;
yes|*)
@@ -21948,14 +24295,15 @@ esac
if echo "$host" | $GREP -i -e linux >/dev/null; then
# Check whether --enable-linux-ip-local-port-range was given.
-if test "${enable_linux_ip_local_port_range+set}" = set; then :
+if test ${enable_linux_ip_local_port_range+y}
+then :
enableval=$enable_linux_ip_local_port_range;
fi
case "$enable_linux_ip_local_port_range" in
yes)
-$as_echo "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
+printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
;;
no|*)
@@ -21964,8 +24312,8 @@ $as_echo "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
-$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
+printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
# on openBSD, the implicit rule make $< work.
# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
# gmake works.
@@ -21988,13 +24336,13 @@ ${MAKE:-make} -f conftest.make >/dev/null
rm -f conftest.make conftest.c conftest.dir/conftest.c
rm -rf conftest.dir
if test ! -f conftest.lo; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
SOURCEFILE='`cat .source`'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SOURCEDETERMINE=':'
SOURCEFILE='$<'
fi
@@ -22007,7 +24355,8 @@ ALLTARGET="alltargets"
INSTALLTARGET="install-all"
# Check whether --with-libunbound-only was given.
-if test "${with_libunbound_only+set}" = set; then :
+if test ${with_libunbound_only+y}
+then :
withval=$with_libunbound_only;
if test "$withval" = "yes"; then
ALLTARGET="lib"
@@ -22029,13 +24378,13 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
-$as_echo "$as_me: Stripping extension flags..." >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
+printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
-$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
fi
@@ -22043,7 +24392,7 @@ $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
-$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
fi
@@ -22051,7 +24400,7 @@ $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
-$as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
fi
@@ -22059,7 +24408,7 @@ $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
-$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
fi
@@ -22067,7 +24416,7 @@ $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
-$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
fi
@@ -22075,7 +24424,7 @@ $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
-$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
fi
@@ -22083,7 +24432,7 @@ $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
-$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
fi
@@ -22091,7 +24440,7 @@ $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
-$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
fi
@@ -22099,7 +24448,7 @@ $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
-$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
+printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
fi
@@ -22112,14 +24461,12 @@ LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
-cat >>confdefs.h <<_ACEOF
-#define MAXSYSLOGMSGLEN 10240
-_ACEOF
+printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
-version=1.19.3
+version=1.20.0
date=`date +'%b %e, %Y'`
@@ -22155,8 +24502,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -22186,15 +24533,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -22208,8 +24555,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -22226,7 +24573,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -22246,8 +24593,8 @@ fi
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -22270,14 +24617,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -22287,46 +24636,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -22335,13 +24684,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -22350,8 +24692,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -22363,30 +24709,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -22399,13 +24725,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -22432,18 +24759,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -22455,12 +24784,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -22491,7 +24821,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -22513,6 +24843,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -22526,6 +24860,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -22567,7 +24907,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -22576,7 +24916,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -22638,8 +24978,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by unbound $as_me 1.19.3, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by unbound $as_me 1.20.0, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -22701,14 +25041,16 @@ $config_commands
Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-unbound config.status 1.19.3
-configured by $0, generated by GNU Autoconf 2.69,
+unbound config.status 1.20.0
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -22746,15 +25088,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -22762,7 +25104,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -22771,7 +25113,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -22799,7 +25141,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -22813,7 +25155,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -23143,9 +25485,9 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -23481,7 +25823,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -23489,17 +25831,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -23516,7 +25858,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -23540,9 +25882,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -23595,8 +25937,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -23638,9 +25980,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -23656,27 +25998,27 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -24210,6 +26552,7 @@ _LT_EOF
esac
+
ltmain=$ac_aux_dir/ltmain.sh
@@ -24266,7 +26609,8 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/contrib/unbound/configure.ac b/contrib/unbound/configure.ac
index e0dedbef9add..83c013ac4ee9 100644
--- a/contrib/unbound/configure.ac
+++ b/contrib/unbound/configure.ac
@@ -4,21 +4,21 @@ AC_PREREQ([2.56])
sinclude(acx_nlnetlabs.m4)
sinclude(ax_pthread.m4)
sinclude(acx_python.m4)
-sinclude(ac_pkg_swig.m4)
+sinclude(ax_pkg_swig.m4)
sinclude(dnstap/dnstap.m4)
sinclude(dnscrypt/dnscrypt.m4)
# must be numbers. ac_defun because of later processing
m4_define([VERSION_MAJOR],[1])
-m4_define([VERSION_MINOR],[19])
-m4_define([VERSION_MICRO],[3])
+m4_define([VERSION_MINOR],[20])
+m4_define([VERSION_MICRO],[0])
AC_INIT([unbound],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues],[unbound])
AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
LIBUNBOUND_CURRENT=9
-LIBUNBOUND_REVISION=26
+LIBUNBOUND_REVISION=27
LIBUNBOUND_AGE=1
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
@@ -112,6 +112,7 @@ LIBUNBOUND_AGE=1
# 1.19.1 had 9:24:1
# 1.19.2 had 9:25:1
# 1.19.3 had 9:26:1
+# 1.20.0 had 9:27:1
# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
@@ -273,6 +274,9 @@ AC_DEFINE(WINVER, 0x0502, [the version of the windows API enabled])
ACX_RSRC_VERSION(wnvs)
AC_DEFINE_UNQUOTED(RSRC_PACKAGE_VERSION, [$wnvs], [version number for resource files])
+# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
+AC_PROG_GREP
+
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_LANG([C])
@@ -795,9 +799,9 @@ if test x_$ub_test_python != x_no; then
ub_have_swig=no
AC_ARG_ENABLE(swig-version-check, AS_HELP_STRING([--disable-swig-version-check],[Disable swig version check to build python modules with older swig even though that is unreliable]))
if test "$enable_swig_version_check" = "yes"; then
- AC_PROG_SWIG(2.0.1)
+ AX_PKG_SWIG(2.0.1)
else
- AC_PROG_SWIG
+ AX_PKG_SWIG
fi
AC_MSG_CHECKING(SWIG)
if test ! -x "$SWIG"; then
diff --git a/contrib/unbound/configure~ b/contrib/unbound/configure~
new file mode 100755
index 000000000000..d4a394eb9540
--- /dev/null
+++ b/contrib/unbound/configure~
@@ -0,0 +1,26616 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.71 for unbound 1.20.0.
+#
+# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else \$as_nop
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
+
+else \$as_nop
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
+ as_have_required=yes
+else $as_nop
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
+
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
+
+
+ if test "x$CONFIG_SHELL" != x
+then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
+$0: unbound-bugs@nlnetlabs.nl or
+$0: https://github.com/NLnetLabs/unbound/issues about your
+$0: system, including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='unbound'
+PACKAGE_TARNAME='unbound'
+PACKAGE_VERSION='1.20.0'
+PACKAGE_STRING='unbound 1.20.0'
+PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_c_list=
+ac_func_c_list=
+ac_subst_vars='LTLIBOBJS
+date
+version
+INSTALLTARGET
+ALLTARGET
+SOURCEFILE
+SOURCEDETERMINE
+IPSET_OBJ
+IPSET_SRC
+IPSECMOD_HEADER
+IPSECMOD_OBJ
+CACHEDB_OBJ
+CACHEDB_SRC
+DNSCRYPT_OBJ
+DNSCRYPT_SRC
+ENABLE_DNSCRYPT
+ENABLE_DNSCRYPT_XCHACHA20
+DNSTAP_OBJ
+DNSTAP_SRC
+DNSTAP_SOCKET_TESTBIN
+DNSTAP_SOCKET_PATH
+opt_dnstap_socket_path
+ENABLE_DNSTAP
+PROTOBUFC_LIBS
+PROTOBUFC_CFLAGS
+PROTOC_C
+UBSYMS
+EXTRALINK
+COMMON_OBJ_ALL_SYMBOLS
+LIBOBJ_WITHOUT_CTIME
+LIBOBJ_WITHOUT_CTIMEARC4
+WIN_CHECKCONF_OBJ_LINK
+WIN_CONTROL_OBJ_LINK
+WIN_UBANCHOR_OBJ_LINK
+WIN_HOST_OBJ_LINK
+WIN_DAEMON_OBJ_LINK
+WIN_DAEMON_OBJ
+WIN_DAEMON_SRC
+WINAPPS
+WINDRES
+CHECKLOCK_OBJ
+staticexe
+PC_LIBEVENT_DEPENDENCY
+UNBOUND_EVENT_UNINSTALL
+UNBOUND_EVENT_INSTALL
+SUBNET_HEADER
+SUBNET_OBJ
+PC_LIBBSD_DEPENDENCY
+SSLLIB
+HAVE_SSL
+PC_CRYPTO_DEPENDENCY
+CONFIG_DATE
+GCC_DOCKER_LINTFLAGS
+NETBSD_LINTFLAGS
+PYUNBOUND_UNINSTALL
+PYUNBOUND_INSTALL
+PYUNBOUND_TARGET
+PYUNBOUND_OBJ
+WITH_PYUNBOUND
+PYTHONMOD_UNINSTALL
+PYTHONMOD_INSTALL
+PYTHONMOD_HEADER
+PYTHONMOD_OBJ
+WITH_PYTHONMODULE
+swig
+SWIG_LIB
+SWIG
+PC_PY_DEPENDENCY
+PYTHON_LIBS
+PY_MAJOR_VERSION
+PYTHON_SITE_PKG
+PYTHON_LDFLAGS
+PYTHON_CPPFLAGS
+PYTHON
+PYTHON_VERSION
+DYNLIBMOD_EXTRALIBS
+DYNLIBMOD_HEADER
+DYNLIBMOD_OBJ
+WITH_DYNLIBMODULE
+PTHREAD_CFLAGS_ONLY
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CXX
+PTHREAD_CC
+ax_pthread_config
+ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ
+SLDNS_ALLOCCHECK_EXTRA_OBJ
+USE_SYSTEMD_FALSE
+USE_SYSTEMD_TRUE
+SYSTEMD_DAEMON_LIBS
+SYSTEMD_DAEMON_CFLAGS
+SYSTEMD_LIBS
+SYSTEMD_CFLAGS
+RUNTIME_PATH
+LIBOBJS
+CPP
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+LT_SYS_LIBRARY_PATH
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+AWK
+RANLIB
+ac_ct_AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+SED
+LIBTOOL
+AR
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+libtool
+STRIP
+doxygen
+YFLAGS
+YACC
+LEXLIB
+LEX_OUTPUT_ROOT
+LEX
+debug_enabled
+DEPFLAG
+GREP
+UNBOUND_USERNAME
+UNBOUND_ROOTCERT_FILE
+UNBOUND_ROOTKEY_FILE
+UNBOUND_PIDFILE
+UNBOUND_SHARE_DIR
+UNBOUND_CHROOT_DIR
+UNBOUND_RUN_DIR
+ub_conf_dir
+ub_conf_file
+UNBOUND_LOCALSTATE_DIR
+UNBOUND_SYSCONF_DIR
+UNBOUND_SBIN_DIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+LIBUNBOUND_AGE
+LIBUNBOUND_REVISION
+LIBUNBOUND_CURRENT
+UNBOUND_VERSION_MICRO
+UNBOUND_VERSION_MINOR
+UNBOUND_VERSION_MAJOR
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_conf_file
+with_run_dir
+with_chroot_dir
+with_share_dir
+with_pidfile
+with_rootkey_file
+with_rootcert_file
+with_username
+enable_checking
+enable_debug
+enable_flto
+enable_pie
+enable_relro_now
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_aix_soname
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_rpath
+enable_largefile
+enable_systemd
+enable_alloc_checks
+enable_alloc_lite
+enable_alloc_nonregional
+with_pthreads
+with_solaris_threads
+with_syslog_facility
+with_dynlibmodule
+with_pyunbound
+with_pythonmodule
+enable_swig_version_check
+with_nss
+with_nettle
+with_ssl
+with_libbsd
+enable_sha1
+enable_sha2
+enable_subnet
+enable_gost
+enable_ecdsa
+enable_dsa
+with_deprecate_rsa_1024
+enable_ed25519
+enable_ed448
+enable_event_api
+enable_tfo_client
+enable_tfo_server
+with_libevent
+with_libexpat
+with_libhiredis
+with_libnghttp2
+enable_static_exe
+enable_fully_static
+enable_lock_checks
+enable_allsymbols
+enable_dnstap
+with_dnstap_socket_path
+with_protobuf_c
+enable_dnscrypt
+with_libsodium
+enable_cachedb
+enable_ipsecmod
+enable_ipset
+with_libmnl
+enable_explicit_port_randomisation
+enable_linux_ip_local_port_range
+with_libunbound_only
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+YACC
+YFLAGS
+LT_SYS_LIBRARY_PATH
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+CPP
+SYSTEMD_CFLAGS
+SYSTEMD_LIBS
+SYSTEMD_DAEMON_CFLAGS
+SYSTEMD_DAEMON_LIBS
+PYTHON_VERSION
+PROTOBUFC_CFLAGS
+PROTOBUFC_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures unbound 1.20.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/unbound]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of unbound 1.20.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-checking Enable warnings, asserts, makefile-dependencies
+ --enable-debug same as enable-checking
+ --disable-flto Disable link-time optimization (gcc specific option)
+ --enable-pie Enable Position-Independent Executable (eg. to fully
+ benefit from ASLR, small performance penalty)
+ --enable-relro-now Enable full relocation binding at load-time (RELRO
+ NOW, to protect GOT and .dtor areas)
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-rpath disable hardcoded rpath (default=enabled)
+ --disable-largefile omit support for large files
+ --enable-systemd compile with systemd support
+ --enable-alloc-checks enable to memory allocation statistics, for debug
+ purposes
+ --enable-alloc-lite enable for lightweight alloc assertions, for debug
+ purposes
+ --enable-alloc-nonregional
+ enable nonregional allocs, slow but exposes regional
+ allocations to other memory purifiers, for debug
+ purposes
+ --disable-swig-version-check
+ Disable swig version check to build python modules
+ with older swig even though that is unreliable
+ --disable-sha1 Disable SHA1 RRSIG support, does not disable nsec3
+ support
+ --disable-sha2 Disable SHA256 and SHA512 RRSIG support
+ --enable-subnet Enable client subnet
+ --disable-gost Disable GOST support
+ --disable-ecdsa Disable ECDSA support
+ --disable-dsa Disable DSA support
+ --disable-ed25519 Disable ED25519 support
+ --disable-ed448 Disable ED448 support
+ --enable-event-api Enable (experimental) pluggable event base
+ libunbound API installed to unbound-event.h
+ --enable-tfo-client Enable TCP Fast Open for client mode
+ --enable-tfo-server Enable TCP Fast Open for server mode
+ --enable-static-exe enable to compile executables statically against
+ (event) uninstalled libs, for debug purposes
+ --enable-fully-static enable to compile fully static
+ --enable-lock-checks enable to check lock and unlock calls, for debug
+ purposes
+ --enable-allsymbols export all symbols from libunbound and link binaries
+ to it, smaller install size but libunbound export
+ table is polluted by internal symbols
+ --enable-dnstap Enable dnstap support (requires protobuf-c)
+ --enable-dnscrypt Enable dnscrypt support (requires libsodium)
+ --enable-cachedb enable cachedb module that can use external cache
+ storage
+ --enable-ipsecmod Enable ipsecmod module that facilitates
+ opportunistic IPsec
+ --enable-ipset enable ipset module
+ --disable-explicit-port-randomisation
+ disable explicit source port randomisation and rely
+ on the kernel to provide random source ports
+ --enable-linux-ip-local-port-range
+ Define this to enable use of
+ /proc/sys/net/ipv4/ip_local_port_range as a default
+ outgoing port range. This is only for the libunbound
+ on Linux and does not affect unbound resolving
+ daemon itself. This may severely limit the number of
+ available outgoing ports and thus decrease
+ randomness. Define this only when the target system
+ restricts (e.g. some of SELinux enabled
+ distributions) the use of non-ephemeral ports.
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-conf-file=path Pathname to the Unbound configuration file
+ --with-run-dir=path set default directory to chdir to (by default dir
+ part of cfg file)
+ --with-chroot-dir=path set default directory to chroot to (by default same
+ as run-dir)
+ --with-share-dir=path set default directory with shared data (by default
+ same as share/unbound)
+ --with-pidfile=filename set default pathname to unbound pidfile (default
+ run-dir/unbound.pid)
+ --with-rootkey-file=filename
+ set default pathname to root key file (default
+ run-dir/root.key). This file is read and written.
+ --with-rootcert-file=filename
+ set default pathname to root update certificate file
+ (default run-dir/icannbundle.pem). This file need
+ not exist if you are content with the builtin.
+ --with-username=user set default user that unbound changes to (default
+ user is unbound)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-pthreads use pthreads library, or --without-pthreads to
+ disable threading support.
+ --with-solaris-threads use solaris native thread library.
+ --with-syslog-facility=LOCAL0 - LOCAL7
+ set SYSLOG_FACILITY, default DAEMON
+ --with-dynlibmodule build dynamic library module, or
+ --without-dynlibmodule to disable it. (default=no)
+ --with-pyunbound build PyUnbound, or --without-pyunbound to skip it.
+ (default=no)
+ --with-pythonmodule build Python module, or --without-pythonmodule to
+ disable script engine. (default=no)
+ --with-nss=path use libnss instead of openssl, installed at path.
+ --with-nettle=path use libnettle as crypto library, installed at path.
+ --with-ssl=pathname enable SSL (will check /usr/local/ssl /usr/lib/ssl
+ /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
+ /usr or specify like /usr/include/openssl11)
+ --with-libbsd Use portable libbsd functions
+ --with-deprecate-rsa-1024
+ Deprecate RSA 1024 bit length, makes that an
+ unsupported key, for use when OpenSSL FIPS refuses
+ 1024 bit verification
+ --with-libevent=pathname
+ use libevent (will check /usr/local /opt/local
+ /usr/lib /usr/pkg /usr/sfw /usr or you can specify
+ an explicit path). Slower, but allows use of large
+ outgoing port ranges.
+ --with-libexpat=path specify explicit path for libexpat.
+ --with-libhiredis=path specify explicit path for libhiredis.
+ --with-libnghttp2=path specify explicit path for libnghttp2.
+ --with-dnstap-socket-path=pathname
+ set default dnstap socket path
+ --with-protobuf-c=path Path where protobuf-c is installed, for dnstap
+ --with-libsodium=path Path where libsodium is installed, for dnscrypt
+ --with-libmnl=path specify explicit path for libmnl.
+ --with-libunbound-only do not build daemon and tool programs
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ YACC The `Yet Another Compiler Compiler' implementation to use.
+ Defaults to the first program found out of: `bison -y', `byacc',
+ `yacc'.
+ YFLAGS The list of arguments that will be passed by default to $YACC.
+ This script will default YFLAGS to the empty string to avoid a
+ default value of `-d' given by some make applications.
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ CPP C preprocessor
+ SYSTEMD_CFLAGS
+ C compiler flags for SYSTEMD, overriding pkg-config
+ SYSTEMD_LIBS
+ linker flags for SYSTEMD, overriding pkg-config
+ SYSTEMD_DAEMON_CFLAGS
+ C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
+ SYSTEMD_DAEMON_LIBS
+ linker flags for SYSTEMD_DAEMON, overriding pkg-config
+ PYTHON_VERSION
+ The installed Python version to use, for example '2.3'. This
+ string will be appended to the Python interpreter canonical
+ name.
+ PROTOBUFC_CFLAGS
+ C compiler flags for PROTOBUFC, overriding pkg-config
+ PROTOBUFC_LIBS
+ linker flags for PROTOBUFC, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+unbound configure 1.20.0
+generated by GNU Autoconf 2.71
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below. */
+
+#include <limits.h>
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main (void)
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid; break
+else $as_nop
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=$ac_mid; break
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main (void)
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else $as_nop
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_check_decl
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main (void)
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$4=yes"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main (void)
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$4=yes"
+else $as_nop
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by unbound $as_me 1.20.0, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ $ $0$ac_configure_args_raw
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ printf "%s\n" "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ printf "%s\n" "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ printf "%s\n" "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ printf "%s\n" "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+printf "%s\n" "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ ac_site_files="$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
+else
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+fi
+
+for ac_site_file in $ac_site_files
+do
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
+as_fn_append ac_func_c_list " fork HAVE_FORK"
+as_fn_append ac_func_c_list " vfork HAVE_VFORK"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="ltmain.sh config.guess config.sub"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+UNBOUND_VERSION_MAJOR=1
+
+UNBOUND_VERSION_MINOR=20
+
+UNBOUND_VERSION_MICRO=0
+
+
+LIBUNBOUND_CURRENT=9
+LIBUNBOUND_REVISION=27
+LIBUNBOUND_AGE=1
+# 1.0.0 had 0:12:0
+# 1.0.1 had 0:13:0
+# 1.0.2 had 0:14:0
+# 1.1.0 had 0:15:0
+# 1.1.1 had 0:16:0
+# 1.2.0 had 0:17:0
+# 1.2.1 had 0:18:0
+# 1.3.0 had 1:0:0 # ub_cancel and -export-symbols.
+# 1.3.1 had 1:1:0
+# 1.3.2 had 1:2:0
+# 1.3.3 had 1:3:0
+# 1.3.4 had 1:4:0
+# 1.4.0-snapshots had 1:5:0
+# 1.4.0 had 1:5:0 (not 2:0:0) # ub_result.why_bogus
+# 1.4.1 had 2:1:0
+# 1.4.2 had 2:2:0
+# 1.4.3 had 2:3:0
+# 1.4.4 had 2:4:0
+# 1.4.5 had 2:5:0
+# 1.4.6 had 2:6:0
+# 1.4.7 had 2:7:0
+# 1.4.8 had 2:8:0
+# 1.4.9 had 2:9:0
+# 1.4.10 had 2:10:0
+# 1.4.11 had 2:11:0
+# 1.4.12 had 2:12:0
+# 1.4.13 had 2:13:0
+# and 1.4.13p1 and 1.4.13.p2
+# 1.4.14 had 2:14:0
+# 1.4.15 had 3:0:1 # adds ub_version()
+# 1.4.16 had 3:1:1
+# 1.4.17 had 3:2:1
+# 1.4.18 had 3:3:1
+# 1.4.19 had 3:4:1
+# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
+# 1.4.21 had 4:1:2
+# 1.4.22 had 4:1:2
+# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
+# 1.5.1 had 5:3:3
+# 1.5.2 had 5:5:3
+# 1.5.3 had 5:6:3
+# 1.5.4 had 5:7:3
+# 1.5.5 had 5:8:3
+# 1.5.6 had 5:9:3
+# 1.5.7 had 5:10:3
+# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
+# 1.5.9 had 6:1:4
+# 1.5.10 had 6:2:4
+# 1.6.0 had 6:3:4
+# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
+# 1.6.2 had 7:1:5
+# 1.6.3 had 7:2:5
+# 1.6.4 had 7:3:5
+# 1.6.5 had 7:4:5
+# 1.6.6 had 7:5:5
+# 1.6.7 had 7:6:5
+# 1.6.8 had 7:7:5
+# 1.7.0 had 7:8:5
+# 1.7.1 had 7:9:5
+# 1.7.2 had 7:10:5
+# 1.7.3 had 7:11:5
+# 1.8.0 had 8:0:0 # changes the event callback function signature
+# 1.8.1 had 8:1:0
+# 1.8.2 had 8:2:0
+# 1.8.3 had 8:3:0
+# 1.9.0 had 9:0:1 # add ub_ctx_set_tls
+# 1.9.1 had 9:1:1
+# 1.9.2 had 9:2:1
+# 1.9.3 had 9:3:1
+# 1.9.4 had 9:4:1
+# 1.9.5 had 9:5:1
+# 1.9.6 had 9:6:1
+# 1.10.0 had 9:7:1
+# 1.10.1 had 9:8:1
+# 1.11.0 had 9:9:1
+# 1.12.0 had 9:10:1
+# 1.13.0 had 9:11:1
+# 1.13.1 had 9:12:1
+# 1.13.2 had 9:13:1
+# 1.14.0 had 9:14:1
+# 1.15.0 had 9:15:1
+# 1.16.0 had 9:16:1
+# 1.16.1 had 9:17:1
+# 1.16.2 had 9:18:1
+# 1.16.3 had 9:19:1
+# 1.17.0 had 9:20:1
+# 1.17.1 had 9:21:1
+# 1.18.0 had 9:22:1
+# 1.19.0 had 9:23:1
+# 1.19.1 had 9:24:1
+# 1.19.2 had 9:25:1
+# 1.19.3 had 9:26:1
+# 1.20.0 had 9:27:1
+
+# Current -- the number of the binary API that we're implementing
+# Revision -- which iteration of the implementation of the binary
+# API are we supplying?
+# Age -- How many previous binary API versions do we also
+# support?
+#
+# If we release a new version that does not change the binary API,
+# increment Revision.
+#
+# If we release a new version that changes the binary API, but does
+# not break programs compiled against the old binary API, increment
+# Current and Age. Set Revision to 0, since this is the first
+# implementation of the new API.
+#
+# Otherwise, we're changing the binary API and breaking backward
+# compatibility with old binaries. Increment Current. Set Age to 0,
+# since we're backward compatible with no previous APIs. Set Revision
+# to 0 too.
+
+
+
+
+
+cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
+
+printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h
+
+
+CFLAGS="$CFLAGS"
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else $as_nop
+ ac_file=''
+fi
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+ MINIX=
+fi
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
+
+if test "$ac_cv_header_minix_config_h" = "yes"; then
+
+printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+fi
+
+case "$prefix" in
+ NONE)
+ prefix="/usr/local"
+ ;;
+esac
+case "$exec_prefix" in
+ NONE)
+ exec_prefix="$prefix"
+ ;;
+esac
+
+# are we on MinGW?
+if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
+else
+ if echo $host | grep mingw >/dev/null; then on_mingw="yes"
+ else on_mingw="no"; fi
+fi
+
+#
+# Determine configuration file
+# the eval is to evaluate shell expansion twice
+UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
+
+UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
+
+UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
+
+if test $on_mingw = "no"; then
+ ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
+else
+ ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
+fi
+
+# Check whether --with-conf_file was given.
+if test ${with_conf_file+y}
+then :
+ withval=$with_conf_file; ub_conf_file="$withval"
+fi
+
+
+hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h
+
+ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
+$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ub_conf_file" : 'X\(//\)[^/]' \| \
+ X"$ub_conf_file" : 'X\(//\)$' \| \
+ X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ub_conf_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+# Determine run, chroot directory and pidfile locations
+
+# Check whether --with-run-dir was given.
+if test ${with_run_dir+y}
+then :
+ withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
+else $as_nop
+ if test $on_mingw = no; then
+ UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
+else
+ UNBOUND_RUN_DIR=""
+fi
+
+fi
+
+
+hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h
+
+
+
+# Check whether --with-chroot-dir was given.
+if test ${with_chroot_dir+y}
+then :
+ withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
+else $as_nop
+ if test $on_mingw = no; then
+ UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
+else
+ UNBOUND_CHROOT_DIR=""
+fi
+
+fi
+
+
+hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h
+
+
+
+# Check whether --with-share-dir was given.
+if test ${with_share_dir+y}
+then :
+ withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
+else $as_nop
+ UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
+fi
+
+
+
+printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h
+
+
+
+# Check whether --with-pidfile was given.
+if test ${with_pidfile+y}
+then :
+ withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
+else $as_nop
+ if test $on_mingw = no; then
+ UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
+else
+ UNBOUND_PIDFILE=""
+fi
+
+fi
+
+
+hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h
+
+
+
+# Check whether --with-rootkey-file was given.
+if test ${with_rootkey_file+y}
+then :
+ withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
+else $as_nop
+ if test $on_mingw = no; then
+ UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
+else
+ UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
+fi
+
+fi
+
+
+hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h
+
+
+
+# Check whether --with-rootcert-file was given.
+if test ${with_rootcert_file+y}
+then :
+ withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
+else $as_nop
+ if test $on_mingw = no; then
+ UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
+else
+ UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
+fi
+
+fi
+
+
+hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h
+
+
+
+# Check whether --with-username was given.
+if test ${with_username+y}
+then :
+ withval=$with_username; UNBOUND_USERNAME="$withval"
+else $as_nop
+ UNBOUND_USERNAME="unbound"
+fi
+
+
+
+printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h
+
+
+
+printf "%s\n" "#define WINVER 0x0502" >>confdefs.h
+
+wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `
+
+
+printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h
+
+
+# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+ const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* IBM XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_const=yes
+else $as_nop
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+printf "%s\n" "#define const /**/" >>confdefs.h
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# allow user to override the -g -O2 flags.
+default_cflags=no
+if test "x$CFLAGS" = "x" ; then
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
+printf %s "checking whether $CC supports -g... " >&6; }
+cache=`echo g | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -g"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
+printf %s "checking whether $CC supports -O2... " >&6; }
+cache=`echo O2 | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -O2"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+default_cflags=yes
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
+printf %s "checking $CC dependency flag... " >&6; }
+echo 'void f(void){}' >conftest.c
+if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
+ DEPFLAG="-MM"
+else
+ if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
+ DEPFLAG="-xM1"
+ else
+ DEPFLAG="-MM" # dunno do something
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
+printf "%s\n" "$DEPFLAG" >&6; }
+rm -f conftest.c
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
+printf %s "checking whether $CC supports -Werror... " >&6; }
+cache=`echo Werror | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+ERRFLAG="-Werror"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+ERRFLAG="-errwarn"
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
+printf %s "checking whether $CC supports -Wall... " >&6; }
+cache=`echo Wall | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+ERRFLAG="$ERRFLAG -Wall"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+ERRFLAG="$ERRFLAG -errfmt"
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
+printf %s "checking whether $CC supports -std=c99... " >&6; }
+cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+C99FLAG="-std=c99"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
+printf %s "checking whether $CC supports -xc99... " >&6; }
+cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+C99FLAG="-xc99"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_getopt_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
+
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
+cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include "confdefs.h"
+#include <stdlib.h>
+#include <ctype.h>
+#include <sys/time.h>
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#include <unistd.h>
+#include <netdb.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
+int test(void) {
+ int a;
+ char **opts = NULL;
+ struct timeval tv;
+ char *t;
+ time_t time = 0;
+ char *buf = NULL;
+ const char* str = NULL;
+ struct msghdr msg;
+ msg.msg_control = 0;
+ t = ctime_r(&time, buf);
+ tv.tv_usec = 10;
+ srandom(32);
+ a = getopt(2, opts, "a");
+ a = isascii(32);
+ str = gai_strerror(0);
+ if(str && t && tv.tv_usec && msg.msg_control)
+ a = 0;
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
+cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include "confdefs.h"
+#include <stdlib.h>
+#include <ctype.h>
+#include <sys/time.h>
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#include <unistd.h>
+#include <netdb.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
+int test(void) {
+ int a;
+ char **opts = NULL;
+ struct timeval tv;
+ char *t;
+ time_t time = 0;
+ char *buf = NULL;
+ const char* str = NULL;
+ struct msghdr msg;
+ msg.msg_control = 0;
+ t = ctime_r(&time, buf);
+ tv.tv_usec = 10;
+ srandom(32);
+ a = getopt(2, opts, "a");
+ a = isascii(32);
+ str = gai_strerror(0);
+ if(str && t && tv.tv_usec && msg.msg_control)
+ a = 0;
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
+printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
+cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh`
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include <stdbool.h>
+#include <ctype.h>
+int test(void) {
+ int a = 0;
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS $C99FLAG"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
+cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include <ctype.h>
+
+int test(void) {
+ int a;
+ a = isascii(32);
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
+printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
+cache=_D_GNU_SOURCE
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include <netinet/in.h>
+
+int test(void) {
+ struct in6_pktinfo inf;
+ int a = (int)sizeof(inf);
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+# check again for GNU_SOURCE for setresgid. May fail if setresgid
+# is not available at all. -D_FRSRESGID is to make this check unique.
+# otherwise we would get the previous cached result.
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
+printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
+cache=_D_GNU_SOURCE__D_FRSRESGID
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include <unistd.h>
+
+int test(void) {
+ int a = setresgid(0,0,0);
+ a = setresuid(0,0,0);
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
+printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
+cache=_D_POSIX_C_SOURCE_200112
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include "confdefs.h"
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#include <netdb.h>
+
+int test(void) {
+ int a = 0;
+ char *t;
+ time_t time = 0;
+ char *buf = NULL;
+ const char* str = NULL;
+ t = ctime_r(&time, buf);
+ str = gai_strerror(0);
+ if(t && str)
+ a = 0;
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
+printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
+cache=_D__EXTENSIONS__
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include "confdefs.h"
+#include <stdlib.h>
+#include <ctype.h>
+#include <sys/time.h>
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
+int test(void) {
+ int a;
+ char **opts = NULL;
+ struct timeval tv;
+ tv.tv_usec = 10;
+ srandom(32);
+ a = getopt(2, opts, "a");
+ a = isascii(32);
+ if(tv.tv_usec)
+ a = 0;
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -D__EXTENSIONS__"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+
+# debug mode flags warnings
+# Check whether --enable-checking was given.
+if test ${enable_checking+y}
+then :
+ enableval=$enable_checking;
+fi
+
+# Check whether --enable-debug was given.
+if test ${enable_debug+y}
+then :
+ enableval=$enable_debug;
+fi
+
+if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
+else debug_enabled="$enable_checking"; fi
+
+case "$debug_enabled" in
+ yes)
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
+printf %s "checking whether $CC supports -W... " >&6; }
+cache=`echo W | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -W"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
+printf %s "checking whether $CC supports -Wall... " >&6; }
+cache=`echo Wall | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -Wall"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
+printf %s "checking whether $CC supports -Wextra... " >&6; }
+cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -Wextra"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
+printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
+cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+
+printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h
+
+ ;;
+ no|*)
+ # nothing to do.
+ ;;
+esac
+if test "$default_cflags" = "yes"; then
+ # only when CFLAGS was "" at the start, if the users wants to
+ # override we shouldn't add default cflags, because they wouldn't
+ # be able to turn off these options and set the CFLAGS wanted.
+
+ # Check whether --enable-flto was given.
+if test ${enable_flto+y}
+then :
+ enableval=$enable_flto;
+fi
+
+ if test "x$enable_flto" != "xno"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
+printf %s "checking if $CC supports -flto... " >&6; }
+ BAKCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -flto"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
+ CFLAGS="$BAKCFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+ rm -f conftest conftest.c conftest.o
+
+else $as_nop
+ CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+
+ # Check whether --enable-pie was given.
+if test ${enable_pie+y}
+then :
+ enableval=$enable_pie;
+fi
+
+ if test "x$enable_pie" = "xyes"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
+printf %s "checking if $CC supports PIE... " >&6; }
+ BAKLDFLAGS="$LDFLAGS"
+ BAKCFLAGS="$CFLAGS"
+ LDFLAGS="$LDFLAGS -pie"
+ CFLAGS="$CFLAGS -fPIE"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
+ LDFLAGS="$BAKLDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+ rm -f conftest conftest.c conftest.o
+
+else $as_nop
+ LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+
+ # Check whether --enable-relro_now was given.
+if test ${enable_relro_now+y}
+then :
+ enableval=$enable_relro_now;
+fi
+
+ if test "x$enable_relro_now" = "xyes"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
+printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
+ BAKLDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
+ LDFLAGS="$BAKLDFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+ rm -f conftest conftest.c conftest.o
+
+else $as_nop
+ LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
+if test ${ac_cv_c_format_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_format_attribute=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
+void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
+
+int
+main (void)
+{
+
+ f ("%s", "str");
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_format_attribute="yes"
+else $as_nop
+ ac_cv_c_format_attribute="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
+printf "%s\n" "$ac_cv_c_format_attribute" >&6; }
+if test $ac_cv_c_format_attribute = yes; then
+
+printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
+if test ${ac_cv_c_unused_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_unused_attribute=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+void f (char *u __attribute__((unused)));
+
+int
+main (void)
+{
+
+ f ("x");
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_unused_attribute="yes"
+else $as_nop
+ ac_cv_c_unused_attribute="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
+printf "%s\n" "$ac_cv_c_unused_attribute" >&6; }
+if test $ac_cv_c_unused_attribute = yes; then
+
+printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
+
+fi
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
+if test ${ac_cv_c_weak_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_weak_attribute=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #include <stdio.h>
+__attribute__((weak)) void f(int x) { printf("%d", x); }
+
+int
+main (void)
+{
+
+ f(1);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_weak_attribute="yes"
+else $as_nop
+ ac_cv_c_weak_attribute="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
+printf "%s\n" "$ac_cv_c_weak_attribute" >&6; }
+if test $ac_cv_c_weak_attribute = yes; then
+
+printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
+
+
+printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
+
+fi
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; }
+if test ${ac_cv_c_noreturn_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_noreturn_attribute=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #include <stdio.h>
+__attribute__((noreturn)) void f(int x) { printf("%d", x); }
+
+int
+main (void)
+{
+
+ f(1);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_noreturn_attribute="yes"
+else $as_nop
+ ac_cv_c_noreturn_attribute="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5
+printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; }
+if test $ac_cv_c_noreturn_attribute = yes; then
+
+printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
+
+
+printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
+
+fi
+
+
+if test "$srcdir" != "."; then
+ CPPFLAGS="$CPPFLAGS -I$srcdir"
+fi
+
+
+
+
+
+for ac_prog in flex lex
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
+printf "%s\n" "$LEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+ if test "x$LEX" != "x:"; then
+ cat >conftest.l <<_ACEOF
+%{
+#ifdef __cplusplus
+extern "C"
+#endif
+int yywrap(void);
+%}
+%%
+a { ECHO; }
+b { REJECT; }
+c { yymore (); }
+d { yyless (1); }
+e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
+#ifdef __cplusplus
+ yyless ((yyinput () != 0));
+#else
+ yyless ((input () != 0));
+#endif
+ }
+f { unput (yytext[0]); }
+. { BEGIN INITIAL; }
+%%
+#ifdef YYTEXT_POINTER
+extern char *yytext;
+#endif
+int
+yywrap (void)
+{
+ return 1;
+}
+int
+main (void)
+{
+ return ! yylex ();
+}
+_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
+printf %s "checking for lex output file root... " >&6; }
+if test ${ac_cv_prog_lex_root+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ac_cv_prog_lex_root=unknown
+{ { ac_try="$LEX conftest.l"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$LEX conftest.l") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
+printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
+if test "$ac_cv_prog_lex_root" = unknown
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
+printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
+ LEX=: LEXLIB=
+fi
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+if test ${LEXLIB+y}
+then :
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
+printf %s "checking for lex library... " >&6; }
+if test ${ac_cv_lib_lex+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ ac_save_LIBS="$LIBS"
+ ac_found=false
+ for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
+ case $ac_cv_lib_lex in #(
+ 'none needed') :
+ ;; #(
+ 'not found') :
+ break ;; #(
+ *) :
+ LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
+ *) :
+ ;;
+esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_found=:
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if $ac_found; then
+ break
+ fi
+ done
+ LIBS="$ac_save_LIBS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
+printf "%s\n" "$ac_cv_lib_lex" >&6; }
+ if test "$ac_cv_lib_lex" = 'not found'
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
+printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
+ LEX=: LEXLIB=
+elif test "$ac_cv_lib_lex" = 'none needed'
+then :
+ LEXLIB=''
+else $as_nop
+ LEXLIB=$ac_cv_lib_lex
+fi
+
+fi
+
+
+if test "$LEX" != :
+then :
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
+printf %s "checking whether yytext is a pointer... " >&6; }
+if test ${ac_cv_prog_lex_yytext_pointer+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define YYTEXT_POINTER 1
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_lex_yytext_pointer=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
+printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
+
+fi
+
+fi
+rm -f conftest.l $LEX_OUTPUT_ROOT.c
+
+fi
+if test "$LEX" != "" -a "$LEX" != ":"; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
+printf %s "checking for yylex_destroy... " >&6; }
+ if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
+
+printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; };
+ LEX=":"
+ fi
+
+fi
+if test "$LEX" != "" -a "$LEX" != ":"; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5
+printf %s "checking for lex %option... " >&6; }
+ if cat <<EOF | $LEX -t 2>&1 | grep yy_delete_buffer >/dev/null 2>&1; then
+%option nounput
+%%
+EOF
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; };
+ LEX=":"
+ fi
+
+fi
+if test "$LEX" = "" -o "$LEX" = ":"; then
+ if test ! -f util/configlexer.c; then
+ as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
+ fi
+fi
+for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_YACC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+printf "%s\n" "$YACC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+if test "$YACC" = "" -o "$YACC" = ":"; then
+ if test ! -f util/configparser.c; then
+ as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
+ fi
+fi
+# Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_doxygen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$doxygen"; then
+ ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_doxygen="doxygen"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+doxygen=$ac_cv_prog_doxygen
+if test -n "$doxygen"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
+printf "%s\n" "$doxygen" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+# skip these tests, we do not need them.
+
+
+
+
+
+
+
+
+# always use ./libtool unless override from commandline (libtool=mylibtool)
+if test -z "$libtool"; then
+ libtool="./libtool"
+fi
+
+# avoid libtool max commandline length test on systems that fork slowly.
+
+if echo "$host_os" | grep "sunos4" >/dev/null; then
+ lt_cv_sys_max_cmd_len=32750;
+fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $AR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_AR="$AR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+AR=$ac_cv_path_AR
+if test -n "$AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_AR"; then
+ ac_pt_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_AR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_AR=$ac_cv_path_ac_pt_AR
+if test -n "$ac_pt_AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
+printf "%s\n" "$ac_pt_AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_pt_AR
+ fi
+else
+ AR="$ac_cv_path_AR"
+fi
+
+if test $AR = false; then
+ as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
+fi
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.6'
+macro_revision='2.4.6'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case $ECHO in
+ printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else $as_nop
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi
+fi
+
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_reload_flag='-r'
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test ${with_sysroot+y}
+then :
+ withval=$with_sysroot;
+else $as_nop
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test ${enable_libtool_lock+y}
+then :
+ enableval=$enable_libtool_lock;
+fi
+
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_cc_needs_belf=yes
+else $as_nop
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_ld_exported_symbols_list=yes
+else $as_nop
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test ${enable_shared+y}
+then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test ${enable_static+y}
+then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test ${with_pic+y}
+then :
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ pic_mode=default
+fi
+
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test ${enable_fast_install+y}
+then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else $as_nop
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test ${with_aix_soname+y}
+then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC=$CC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test no = "$ld_shlibs"; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ export_dynamic_flag_spec='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_irix_exported_symbol=yes
+else $as_nop
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ else
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='$wl-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
+test no = "$ld_shlibs" && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
+
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test yes = "$hardcode_automatic"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
+
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes
+then :
+ lt_cv_dlopen=shl_load
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main (void)
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dld_shl_load=yes
+else $as_nop
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_svld_dlopen=yes
+else $as_nop
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main (void)
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dld_dld_link=yes
+else $as_nop
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report what library types will actually be built
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+# pkg-config is only needed for these options, do not require it otherwise
+if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+fi
+
+# Checks for header files.
+ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_stdarg_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_stdbool_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_netinet_tcp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_un_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_uio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_resource_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_arpa_inet_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_syslog_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_pwd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_glob_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_grp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_login_cap_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_winsock2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_ws2tcpip_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_endian_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_endian_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_ipc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_shm_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_ifaddrs_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_poll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
+
+fi
+
+# net/if.h portability for Darwin see:
+# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html
+ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+"
+if test "x$ac_cv_header_net_if_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
+
+fi
+
+
+# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
+ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_TargetConditionals_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_header_netioapi_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h
+
+fi
+
+
+# Check for Linux timestamping headers
+ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_linux_net_tstamp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h
+
+fi
+
+
+# check for types.
+# Using own tests for int64* because autoconf builtin only give 32bit.
+ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
+if test "x$ac_cv_type_int8_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define int8_t signed char" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
+if test "x$ac_cv_type_int16_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define int16_t short" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
+if test "x$ac_cv_type_int32_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define int32_t int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
+if test "x$ac_cv_type_int64_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define int64_t long long" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint8_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint16_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint32_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint64_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define ssize_t int" >>confdefs.h
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
+ ac_cv_type_uid_t=yes
+else $as_nop
+ ac_cv_type_uid_t=no
+fi
+rm -rf conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+printf "%s\n" "#define uid_t int" >>confdefs.h
+
+
+printf "%s\n" "#define gid_t int" >>confdefs.h
+
+fi
+
+
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if defined _WIN64 && !defined __CYGWIN__
+ LLP64
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_pid_type='int'
+else $as_nop
+ ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
+
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define off_t long int" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
+$ac_includes_default
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+
+"
+if test "x$ac_cv_type_u_char" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define u_char unsigned char" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
+$ac_includes_default
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+"
+if test "x$ac_cv_type_rlim_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
+$ac_includes_default
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_type_socklen_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define socklen_t int" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
+$ac_includes_default
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
+"
+if test "x$ac_cv_type_in_addr_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
+$ac_includes_default
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
+"
+if test "x$ac_cv_type_in_port_t" = xyes
+then :
+
+else $as_nop
+
+printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
+printf %s "checking if memcmp compares unsigned... " >&6; }
+if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
+printf "%s\n" "cross-compile no" >&6; }
+
+printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
+
+ case " $LIBOBJS " in
+ *" memcmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+int main(void)
+{
+ char a = 255, b = 0;
+ if(memcmp(&a, &b, 1) < 0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
+
+ case " $LIBOBJS " in
+ *" memcmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+if test ${ac_cv_sizeof_time_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
+$ac_includes_default
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_time_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+printf %s "checking size of size_t... " >&6; }
+if test ${ac_cv_sizeof_size_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_size_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
+
+
+
+# add option to disable the evil rpath
+
+# Check whether --enable-rpath was given.
+if test ${enable_rpath+y}
+then :
+ enableval=$enable_rpath; enable_rpath=$enableval
+else $as_nop
+ enable_rpath=yes
+fi
+
+if test "x$enable_rpath" = xno; then
+ ac_config_commands="$ac_config_commands disable-rpath"
+
+fi
+
+
+
+# check to see if libraries are needed for these functions.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+printf %s "checking for library containing inet_pton... " >&6; }
+if test ${ac_cv_search_inet_pton+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char inet_pton ();
+int
+main (void)
+{
+return inet_pton ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' nsl
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_inet_pton=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_inet_pton+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_inet_pton+y}
+then :
+
+else $as_nop
+ ac_cv_search_inet_pton=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
+ac_res=$ac_cv_search_inet_pton
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+printf %s "checking for library containing socket... " >&6; }
+if test ${ac_cv_search_socket+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main (void)
+{
+return socket ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' socket
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_socket=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_socket+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_socket+y}
+then :
+
+else $as_nop
+ ac_cv_search_socket=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+printf "%s\n" "$ac_cv_search_socket" >&6; }
+ac_res=$ac_cv_search_socket
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+# check whether strptime also works
+
+# check some functions of the OS before linking libs (while still runnable).
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
+printf %s "checking for working chown... " >&6; }
+if test ${ac_cv_func_chown_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in # ((
+ # Guess yes on glibc systems.
+ *-gnu*) ac_cv_func_chown_works=yes ;;
+ # If we don't know, assume the worst.
+ *) ac_cv_func_chown_works=no ;;
+ esac
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+#include <fcntl.h>
+
+int
+main (void)
+{
+ char *f = "conftest.chown";
+ struct stat before, after;
+
+ if (creat (f, 0600) < 0)
+ return 1;
+ if (stat (f, &before) < 0)
+ return 1;
+ if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
+ return 1;
+ if (stat (f, &after) < 0)
+ return 1;
+ return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_func_chown_works=yes
+else $as_nop
+ ac_cv_func_chown_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+rm -f conftest.chown
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
+printf "%s\n" "$ac_cv_func_chown_works" >&6; }
+if test $ac_cv_func_chown_works = yes; then
+
+printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
+
+fi
+
+
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
+done
+
+
+
+if test "x$ac_cv_func_fork" = xyes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+printf %s "checking for working fork... " >&6; }
+if test ${ac_cv_func_fork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ ac_cv_func_fork_works=cross
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_func_fork_works=yes
+else $as_nop
+ ac_cv_func_fork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+printf "%s\n" "$ac_cv_func_fork_works" >&6; }
+
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+printf %s "checking for working vfork... " >&6; }
+if test ${ac_cv_func_vfork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ ac_cv_func_vfork_works=cross
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Thanks to Paul Eggert for this test. */
+$ac_includes_default
+#include <signal.h>
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
+sparc_address_test (int arg)
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+
+int
+main (void)
+{
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test (0);
+
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ return (
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_func_vfork_works=yes
+else $as_nop
+ ac_cv_func_vfork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+printf "%s\n" "#define vfork fork" >>confdefs.h
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
+
+
+printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main (void)
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main (void)
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+# Check whether --enable-largefile was given.
+if test ${enable_largefile+y}
+then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
+printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
+cache=_D_LARGEFILE_SOURCE_1
+if eval test \${cv_prog_cc_flag_needed_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include <stdio.h>
+int test(void) {
+ int a = fseeko(stdin, 0, 0);
+ return a;
+}
+' > conftest.c
+echo 'void f(void){}' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=no"
+else
+
+if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_needed_$cache=yes"
+else
+eval "cv_prog_cc_flag_needed_$cache=fail"
+#echo 'Test with flag fails too!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+fi
+
+fi
+rm -f conftest conftest.c conftest.o
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
+else
+if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+#echo 'Test with flag is no!'
+#cat conftest.c
+#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
+#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
+#exit 1
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+:
+
+fi
+fi
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
+printf %s "checking if nonblocking sockets work... " >&6; }
+if echo $host | grep mingw >/dev/null; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
+printf "%s\n" "no (windows)" >&6; }
+
+printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
+
+else
+if test "$cross_compiling" = yes
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
+printf "%s\n" "crosscompile(yes)" >&6; }
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <errno.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+int main(void)
+{
+ int port;
+ int sfd, cfd;
+ int num = 10;
+ int i, p;
+ struct sockaddr_in a;
+ /* test if select and nonblocking reads work well together */
+ /* open port.
+ fork child to send 10 messages.
+ select to read.
+ then try to nonblocking read the 10 messages
+ then, nonblocking read must give EAGAIN
+ */
+
+ port = 12345 + (time(0)%32);
+ sfd = socket(PF_INET, SOCK_DGRAM, 0);
+ if(sfd == -1) {
+ perror("socket");
+ return 1;
+ }
+ memset(&a, 0, sizeof(a));
+ a.sin_family = AF_INET;
+ a.sin_port = htons(port);
+ a.sin_addr.s_addr = inet_addr("127.0.0.1");
+ if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
+ perror("bind");
+ return 1;
+ }
+ if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
+ perror("fcntl");
+ return 1;
+ }
+
+ cfd = socket(PF_INET, SOCK_DGRAM, 0);
+ if(cfd == -1) {
+ perror("client socket");
+ return 1;
+ }
+ a.sin_port = 0;
+ if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
+ perror("client bind");
+ return 1;
+ }
+ a.sin_port = htons(port);
+
+ /* no handler, causes exit in 10 seconds */
+ alarm(10);
+
+ /* send and receive on the socket */
+ if((p=fork()) == 0) {
+ for(i=0; i<num; i++) {
+ if(sendto(cfd, &i, sizeof(i), 0,
+ (struct sockaddr*)&a, sizeof(a)) < 0) {
+ perror("sendto");
+ return 1;
+ }
+ }
+ } else {
+ /* parent */
+ fd_set rset;
+ int x;
+ if(p == -1) {
+ perror("fork");
+ return 1;
+ }
+ FD_ZERO(&rset);
+ FD_SET(sfd, &rset);
+ if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
+ perror("select");
+ return 1;
+ }
+ i = 0;
+ while(i < num) {
+ if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
+ if(errno == EAGAIN)
+ continue;
+ perror("recv");
+ return 1;
+ }
+ i++;
+ }
+ /* now we want to get EAGAIN: nonblocking goodness */
+ errno = 0;
+ recv(sfd, &x, sizeof(x), 0);
+ if(errno != EAGAIN) {
+ perror("trying to recv again");
+ return 1;
+ }
+ /* EAGAIN encountered */
+ }
+
+ close(sfd);
+ close(cfd);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
+printf %s "checking whether mkdir has one arg... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <unistd.h>
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+int
+main (void)
+{
+
+ (void)mkdir("directory");
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
+
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+ for ac_func in strptime
+do :
+ ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
+if test "x$ac_cv_func_strptime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
+printf %s "checking whether strptime works... " >&6; }
+if test c${cross_compiling} = cno; then
+if test "$cross_compiling" = yes
+then :
+ eval "ac_cv_c_strptime_works=maybe"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE 600
+#include <time.h>
+int main(void) { struct tm tm; char *res;
+res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm);
+if (!res) return 2;
+res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
+if (!res) return 1; return 0; }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ eval "ac_cv_c_strptime_works=yes"
+else $as_nop
+ eval "ac_cv_c_strptime_works=no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+eval "ac_cv_c_strptime_works=maybe"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
+printf "%s\n" "$ac_cv_c_strptime_works" >&6; }
+if test $ac_cv_c_strptime_works = no; then
+case " $LIBOBJS " in
+ *" strptime.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
+ ;;
+esac
+
+else
+
+printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h
+
+fi
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" strptime.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
+ ;;
+esac
+
+fi
+
+done
+
+# check if we can use SO_REUSEPORT
+reuseport_default=0
+if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi
+if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi
+if test "$reuseport_default" = 1; then
+
+printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h
+
+else
+
+printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h
+
+fi
+
+# Include systemd.m4 - begin
+# macros for configuring systemd
+# Copyright 2015, Sami Kerola, CloudFlare.
+# BSD licensed.
+# Check whether --enable-systemd was given.
+if test ${enable_systemd+y}
+then :
+ enableval=$enable_systemd;
+else $as_nop
+ enable_systemd=no
+fi
+
+have_systemd=no
+if test "x$enable_systemd" != xno
+then :
+
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
+printf %s "checking for SYSTEMD... " >&6; }
+
+if test -n "$SYSTEMD_CFLAGS"; then
+ pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$SYSTEMD_LIBS"; then
+ pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
+ else
+ SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$SYSTEMD_PKG_ERRORS" >&5
+
+ have_systemd=no
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ have_systemd=no
+else
+ SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
+ SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ have_systemd=yes
+fi
+ if test "x$have_systemd" != "xyes"
+then :
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+printf %s "checking for SYSTEMD_DAEMON... " >&6; }
+
+if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
+ pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$SYSTEMD_DAEMON_LIBS"; then
+ pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
+ else
+ SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
+
+ have_systemd_daemon=no
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ have_systemd_daemon=no
+else
+ SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
+ SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ have_systemd_daemon=yes
+fi
+ if test "x$have_systemd_daemon" = "xyes"
+then :
+ have_systemd=yes
+fi
+
+fi
+ case $enable_systemd:$have_systemd in #(
+ yes:no) :
+ as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
+ *:yes) :
+
+printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h
+
+ LIBS="$LIBS $SYSTEMD_LIBS"
+
+ ;; #(
+ *) :
+ ;;
+esac
+
+
+fi
+ if test "x$have_systemd" = xyes; then
+ USE_SYSTEMD_TRUE=
+ USE_SYSTEMD_FALSE='#'
+else
+ USE_SYSTEMD_TRUE='#'
+ USE_SYSTEMD_FALSE=
+fi
+
+
+# Include systemd.m4 - end
+
+# set memory allocation checking if requested
+# Check whether --enable-alloc-checks was given.
+if test ${enable_alloc_checks+y}
+then :
+ enableval=$enable_alloc_checks;
+fi
+
+# Check whether --enable-alloc-lite was given.
+if test ${enable_alloc_lite+y}
+then :
+ enableval=$enable_alloc_lite;
+fi
+
+# Check whether --enable-alloc-nonregional was given.
+if test ${enable_alloc_nonregional+y}
+then :
+ enableval=$enable_alloc_nonregional;
+fi
+
+if test x_$enable_alloc_nonregional = x_yes; then
+
+printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
+
+fi
+if test x_$enable_alloc_checks = x_yes; then
+
+printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
+
+ SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo"
+
+ ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo"
+
+else
+ if test x_$enable_alloc_lite = x_yes; then
+
+printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
+
+ else
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+printf %s "checking for GNU libc compatible malloc... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
+printf "%s\n" "no (crosscompile)" >&6; }
+ case " $LIBOBJS " in
+ *" malloc.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
+esac
+
+
+printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+#include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main (void)
+{
+ if(malloc(0) != 0) return 1;
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ case " $LIBOBJS " in
+ *" malloc.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
+esac
+
+
+printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ fi
+fi
+
+# check windows threads (we use them, not pthreads, on windows).
+if test "$on_mingw" = "yes"; then
+# check windows threads
+ ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_windows_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
+printf %s "checking for CreateThread... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+int
+main (void)
+{
+
+ HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
+
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+else
+# not on mingw, check thread libraries.
+
+# check for thread library.
+# check this first, so that the pthread lib does not get linked in via
+# libssl or libpython, and thus distorts the tests, and we end up using
+# the non-threadsafe C libraries.
+
+# Check whether --with-pthreads was given.
+if test ${with_pthreads+y}
+then :
+ withval=$with_pthreads;
+else $as_nop
+ withval="yes"
+fi
+
+ub_have_pthreads=no
+if test x_$withval != x_no; then
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on Tru64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+ ax_pthread_save_CC="$CC"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ if test "x$PTHREAD_CC" != "x"
+then :
+ CC="$PTHREAD_CC"
+fi
+ if test "x$PTHREAD_CXX" != "x"
+then :
+ CXX="$PTHREAD_CXX"
+fi
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
+printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char pthread_join ();
+int
+main (void)
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xno"; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ CC="$ax_pthread_save_CC"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+# (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads and
+# -D_REENTRANT too), HP C (must be checked before -lpthread, which
+# is present but should not be used directly; and before -mthreads,
+# because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case $host_os in
+
+ freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+ ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+ ;;
+
+ hpux*)
+
+ # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+ # multi-threading and also sets -lpthread."
+
+ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+ ;;
+
+ openedition*)
+
+ # IBM z/OS requires a feature-test macro to be defined in order to
+ # enable POSIX threads at all, so give the user a hint if this is
+ # not set. (We don't define these ourselves, as they can affect
+ # other portions of the system API in unpredictable ways.)
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
+printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
+fi
+rm -rf conftest*
+
+ ;;
+
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (N.B.: The stubs are missing
+ # pthread_cleanup_push, or rather a function called by this macro,
+ # so we could check for that, but who knows whether they'll stub
+ # that too in a future libc.) So we'll check first for the
+ # standard Solaris way of linking pthreads (-mt -lpthread).
+
+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
+ ;;
+esac
+
+# Are we compiling with Clang?
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
+printf %s "checking whether $CC is Clang... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
+then :
+ ax_cv_PTHREAD_CLANG=yes
+fi
+rm -rf conftest*
+
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
+if test "x$GCC" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
+fi
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+if test "x$ax_pthread_clang" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread"
+fi
+
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+ darwin* | hpux* | linux* | osf* | solaris*)
+ ax_pthread_check_macro="_REENTRANT"
+ ;;
+
+ aix*)
+ ax_pthread_check_macro="_THREAD_SAFE"
+ ;;
+
+ *)
+ ax_pthread_check_macro="--"
+ ;;
+esac
+if test "x$ax_pthread_check_macro" = "x--"
+then :
+ ax_pthread_check_cond=0
+else $as_nop
+ ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
+fi
+
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+ case $ax_pthread_try_flag in
+ none)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+printf %s "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
+printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
+ ;;
+
+ -*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
+printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ax_pthread_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ax_pthread_config"; then
+ ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ax_pthread_config="yes"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+fi
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+printf "%s\n" "$ax_pthread_config" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if test "x$ax_pthread_config" = "xno"
+then :
+ continue
+fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
+printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
+ PTHREAD_LIBS="-l$ax_pthread_try_flag"
+ ;;
+ esac
+
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+# if $ax_pthread_check_cond
+# error "$ax_pthread_check_macro must be defined"
+# endif
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
+ static void *start_routine(void *a) { return a; }
+int
+main (void)
+{
+pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xyes"
+then :
+ break
+fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+ # Clang takes -pthread; it has never supported any other flag
+
+ # (Note 1: This will need to be revisited if a system that Clang
+ # supports has POSIX threads in a separate library. This tends not
+ # to be the way of modern systems, but it's conceivable.)
+
+ # (Note 2: On some systems, notably Darwin, -pthread is not needed
+ # to get POSIX threads support; the API is always present and
+ # active. We could reasonably leave PTHREAD_CFLAGS empty. But
+ # -pthread does define _REENTRANT, and while the Darwin headers
+ # ignore this macro, third-party headers might not.)
+
+ # However, older versions of Clang make a point of warning the user
+ # that, in an invocation where only linking and no compilation is
+ # taking place, the -pthread option has no effect ("argument unused
+ # during compilation"). They expect -pthread to be passed in only
+ # when source code is being compiled.
+ #
+ # Problem is, this is at odds with the way Automake and most other
+ # C build frameworks function, which is that the same flags used in
+ # compilation (CFLAGS) are also used in linking. Many systems
+ # supported by AX_PTHREAD require exactly this for POSIX threads
+ # support, and in fact it is often not straightforward to specify a
+ # flag that is used only in the compilation phase and not in
+ # linking. Such a scenario is extremely rare in practice.
+ #
+ # Even though use of the -pthread flag in linking would only print
+ # a warning, this can be a nuisance for well-run software projects
+ # that build with -Werror. So if the active version of Clang has
+ # this misfeature, we search for an option to squash it.
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+ # Create an alternate version of $ac_link that compiles and
+ # links in two steps (.c -> .o, .o -> exe) instead of one
+ # (.c -> exe), because the warning occurs only in the second
+ # step
+ ax_pthread_save_ac_link="$ac_link"
+ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+ ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
+ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+ if test "x$ax_pthread_try" = "xunknown"
+then :
+ break
+fi
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_link="$ax_pthread_2step_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ if test "x$ax_pthread_try" = "x"
+then :
+ ax_pthread_try=no
+fi
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+ no | unknown) ;;
+ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+ esac
+
+fi # $ax_pthread_clang = yes
+
+
+
+# Various other checks:
+if test "x$ax_pthread_ok" = "xyes"; then
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+printf %s "checking for joinable pthread attribute... " >&6; }
+if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main (void)
+{
+int attr = $ax_pthread_attr; return attr /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
+printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
+ if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+ test "x$ax_pthread_joinable_attr_defined" != "xyes"
+then :
+
+printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
+
+ ax_pthread_joinable_attr_defined=yes
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
+printf %s "checking whether more special flags are required for pthreads... " >&6; }
+if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
+printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
+ if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"
+then :
+ PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main (void)
+{
+int i = PTHREAD_PRIO_INHERIT;
+ return i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
+else $as_nop
+ ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+ ax_pthread_prio_inherit_defined=yes
+
+fi
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != "xyes"; then
+ case $host_os in
+ aix*)
+ case "x/$CC" in #(
+ x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+ #handle absolute path differently from PATH based program lookup
+ case "x$CC" in #(
+ x/*) :
+
+ if as_fn_executable_p ${CC}_r
+then :
+ PTHREAD_CC="${CC}_r"
+fi
+ if test "x${CXX}" != "x"
+then :
+ if as_fn_executable_p ${CXX}_r
+then :
+ PTHREAD_CXX="${CXX}_r"
+fi
+fi
+ ;; #(
+ *) :
+
+ for ac_prog in ${CC}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+printf "%s\n" "$PTHREAD_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+ if test "x${CXX}" != "x"
+then :
+ for ac_prog in ${CXX}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CXX"; then
+ ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
+if test -n "$PTHREAD_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
+printf "%s\n" "$PTHREAD_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CXX" && break
+done
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+fi
+
+ ;;
+esac
+ ;; #(
+ *) :
+ ;;
+esac
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test "x$ax_pthread_ok" = "xyes"; then
+
+
+printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
+
+ if test -n "$PTHREAD_LIBS"; then
+ LIBS="$PTHREAD_LIBS $LIBS"
+ fi
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ CC="$PTHREAD_CC"
+ ub_have_pthreads=yes
+ ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
+"
+if test "x$ac_cv_type_pthread_spinlock_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
+"
+if test "x$ac_cv_type_pthread_rwlock_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h
+
+
+fi
+
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
+printf %s "checking size of unsigned long... " >&6; }
+if test ${ac_cv_sizeof_unsigned_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_unsigned_long" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (unsigned long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_unsigned_long=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
+printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
+
+
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+printf %s "checking size of pthread_t... " >&6; }
+if test ${ac_cv_sizeof_pthread_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_pthread_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (pthread_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_pthread_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
+
+
+
+ if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
+printf %s "checking if -pthread unused during linking... " >&6; }
+ # catch clang warning 'argument unused during compilation'
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+
+int main(void) {return 0;}
+
+_ACEOF
+ pthread_unused="yes"
+ # first compile
+ echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
+ $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
+ if test $? = 0; then
+ # then link
+ echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
+ $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
+ if test $? -ne 0; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
+ PTHREAD_CFLAGS_ONLY="-pthread"
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi # endif cc successful
+ rm -f conftest conftest.c conftest.o
+ fi # endif -pthread in CFLAGS
+
+
+ :
+else
+ ax_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+# check solaris thread library
+
+# Check whether --with-solaris-threads was given.
+if test ${with_solaris_threads+y}
+then :
+ withval=$with_solaris_threads;
+else $as_nop
+ withval="no"
+fi
+
+ub_have_sol_threads=no
+if test x_$withval != x_no; then
+ if test x_$ub_have_pthreads != x_no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
+printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
+printf %s "checking for library containing thr_create... " >&6; }
+if test ${ac_cv_search_thr_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char thr_create ();
+int
+main (void)
+{
+return thr_create ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' thread
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_thr_create=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_thr_create+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_thr_create+y}
+then :
+
+else $as_nop
+ ac_cv_search_thr_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
+printf "%s\n" "$ac_cv_search_thr_create" >&6; }
+ac_res=$ac_cv_search_thr_create
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
+printf %s "checking whether $CC supports -mt... " >&6; }
+cache=`echo mt | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_prog_cc_flag_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo 'void f(void){}' >conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
+eval "cv_prog_cc_flag_$cache=yes"
+else
+eval "cv_prog_cc_flag_$cache=no"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+:
+CFLAGS="$CFLAGS -mt"
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+CFLAGS="$CFLAGS -D_REENTRANT"
+fi
+
+ ub_have_sol_threads=yes
+
+else $as_nop
+
+ as_fn_error $? "no solaris threads found." "$LINENO" 5
+
+fi
+
+ fi
+fi
+
+fi # end of non-mingw check of thread libraries
+
+# Check for SYSLOG_FACILITY
+
+# Check whether --with-syslog-facility was given.
+if test ${with_syslog_facility+y}
+then :
+ withval=$with_syslog_facility; UNBOUND_SYSLOG_FACILITY="$withval"
+fi
+
+case "${UNBOUND_SYSLOG_FACILITY}" in
+
+ LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;;
+
+ *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;;
+
+esac
+
+printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h
+
+
+# Check for dynamic library module
+
+# Check whether --with-dynlibmodule was given.
+if test ${with_dynlibmodule+y}
+then :
+ withval=$with_dynlibmodule;
+else $as_nop
+ withval="no"
+fi
+
+
+if test x_$withval != x_no; then
+
+printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h
+
+ WITH_DYNLIBMODULE=yes
+
+ DYNLIBMOD_OBJ="dynlibmod.lo"
+
+ DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
+
+ if test $on_mingw = "no"; then
+ # link with -ldl if not already there, for all executables because
+ # dlopen call is in the dynlib module. For unbound executable, also
+ # export symbols.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+printf %s "checking for library containing dlopen... " >&6; }
+if test ${ac_cv_search_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_dlopen+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_dlopen+y}
+then :
+
+else $as_nop
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+printf "%s\n" "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ DYNLIBMOD_EXTRALIBS="-export-dynamic"
+ else
+ DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
+ fi
+
+fi
+
+# Check for PyUnbound
+
+# Check whether --with-pyunbound was given.
+if test ${with_pyunbound+y}
+then :
+ withval=$with_pyunbound;
+else $as_nop
+ withval="no"
+fi
+
+
+ub_test_python=no
+ub_with_pyunbound=no
+if test x_$withval != x_no; then
+ ub_with_pyunbound=yes
+ ub_test_python=yes
+fi
+
+# Check for Python module
+
+# Check whether --with-pythonmodule was given.
+if test ${with_pythonmodule+y}
+then :
+ withval=$with_pythonmodule;
+else $as_nop
+ withval="no"
+fi
+
+
+ub_with_pythonmod=no
+if test x_$withval != x_no; then
+ ub_with_pythonmod=yes
+ ub_test_python=yes
+fi
+
+# Check for Python & SWIG only on PyUnbound or PyModule
+if test x_$ub_test_python != x_no; then
+
+ # Check for Python
+ ub_have_python=no
+ ac_save_LIBS="$LIBS"
+ #
+ # Allow the use of a (user set) custom python version
+ #
+
+
+ # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
+set dummy python$PYTHON_VERSION; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PYTHON+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PYTHON in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+printf "%s\n" "$PYTHON" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if test -z "$PYTHON"; then
+ as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
+ PYTHON_VERSION=""
+ fi
+
+ if test -z "$PYTHON_VERSION"; then
+ PYTHON_VERSION=`$PYTHON -c "import sys; \
+ print(sys.version.split()[0])"`
+ fi
+ # calculate the version number components.
+
+ v="$PYTHON_VERSION"
+ PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'`
+ if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi
+ v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
+ PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'`
+ if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi
+ v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'`
+ PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'`
+ if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi
+
+
+ # For some systems, sysconfig exists, but has the wrong paths,
+ # on Debian 10, for python 2.7 and 3.7. So, we check the version,
+ # and for older versions try distutils.sysconfig first. For newer
+ # versions>=3.10, where distutils.sysconfig is deprecated, use
+ # sysconfig first and then attempt the other one.
+ py_distutils_first="no"
+ if test $PYTHON_VERSION_MAJOR -lt 3; then
+ py_distutils_first="yes"
+ fi
+ if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then
+ py_distutils_first="yes"
+ fi
+
+ # Check if you have the first module
+ if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi
+ sysconfig_module=""
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5
+printf %s "checking for the $m Python module... " >&6; }
+ if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ sysconfig_module="$m"
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
+
+ # if not found, try the other one.
+ if test -z "$sysconfig_module"; then
+ if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5
+printf %s "checking for the $m2 Python module... " >&6; }
+ if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ sysconfig_module="$m2"
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "cannot import Python module \"$m\", or \"$m2\".
+ Please check your Python installation. The errors are:
+ $m
+ $ac_modulecheck_result1
+ $m2
+ $ac_modulecheck_result2" "$LINENO" 5
+ PYTHON_VERSION=""
+ fi
+ fi
+ if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi
+
+ #
+ # Check for Python include path
+ #
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
+printf %s "checking for Python include path... " >&6; }
+ if test -z "$PYTHON_CPPFLAGS"; then
+ if test "$sysconfig_module" = "sysconfig"; then
+ python_path=`$PYTHON -c 'import sysconfig; \
+ print(sysconfig.get_path("include"));'`
+ else
+ python_path=`$PYTHON -c "import distutils.sysconfig; \
+ print(distutils.sysconfig.get_python_inc());"`
+ fi
+ if test -n "${python_path}"; then
+ python_path="-I$python_path"
+ fi
+ PYTHON_CPPFLAGS=$python_path
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
+printf "%s\n" "$PYTHON_CPPFLAGS" >&6; }
+
+
+ #
+ # Check for Python library path
+ #
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
+printf %s "checking for Python library path... " >&6; }
+ if test -z "$PYTHON_LDFLAGS"; then
+ PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \
+ print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
+printf "%s\n" "$PYTHON_LDFLAGS" >&6; }
+
+
+ if test -z "$PYTHON_LIBDIR"; then
+ PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
+ print(get_config_var('LIBDIR'));"`
+ fi
+
+ #
+ # Check for site packages
+ #
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
+printf %s "checking for Python site-packages path... " >&6; }
+ if test -z "$PYTHON_SITE_PKG"; then
+ if test "$sysconfig_module" = "sysconfig"; then
+ PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
+ print(sysconfig.get_path("platlib"));'`
+ else
+ PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
+ print(distutils.sysconfig.get_python_lib(1,0));"`
+ fi
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
+printf "%s\n" "$PYTHON_SITE_PKG" >&6; }
+
+
+ #
+ # final check to see if everything compiles alright
+ #
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
+printf %s "checking consistency of all components of python development environment... " >&6; }
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ # save current global flags
+ ac_save_LIBS="$LIBS"
+ ac_save_CPPFLAGS="$CPPFLAGS"
+
+ LIBS="$LIBS $PYTHON_LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <Python.h>
+
+int
+main (void)
+{
+
+ Py_Initialize();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ pythonexists=yes
+else $as_nop
+ pythonexists=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
+printf "%s\n" "$pythonexists" >&6; }
+
+ if test ! "$pythonexists" = "yes"; then
+ as_fn_error $? "
+ Could not link test program to Python. Maybe the main Python library has been
+ installed in some non-standard library path. If so, pass it to configure,
+ via the LDFLAGS environment variable.
+ Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
+ ============================================================================
+ ERROR!
+ You probably have to install the development version of the Python package
+ for your distribution. The exact name of this package varies among them.
+ ============================================================================
+ " "$LINENO" 5
+ PYTHON_VERSION=""
+ fi
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ # turn back to default flags
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ #
+ # all done!
+ #
+
+ if test ! -z "$PYTHON_VERSION"; then
+ badversion="no"
+ if test "$PYTHON_VERSION_MAJOR" -lt 2; then
+ badversion="yes"
+ fi
+ if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
+ badversion="yes"
+ fi
+ if test "$badversion" = "yes"; then
+ as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
+ fi
+
+ PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
+
+ # Have Python
+
+printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h
+
+ if test x_$ub_with_pythonmod != x_no; then
+ if test -n "$LIBS"; then
+ LIBS="$PYTHON_LDFLAGS $LIBS"
+ else
+ LIBS="$PYTHON_LDFLAGS"
+ fi
+ fi
+ PYTHON_LIBS="$PYTHON_LDFLAGS"
+
+ if test -n "$CPPFLAGS"; then
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ else
+ CPPFLAGS="$PYTHON_CPPFLAGS"
+ fi
+ if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then
+
+ if test "x$enable_rpath" = xyes; then
+ if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then
+ RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR"
+ fi
+ fi
+
+ fi
+ ub_have_python=yes
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
+else
+ PC_PY_DEPENDENCY="python"
+fi
+
+
+ # Check for SWIG
+ ub_have_swig=no
+ # Check whether --enable-swig-version-check was given.
+if test ${enable_swig_version_check+y}
+then :
+ enableval=$enable_swig_version_check;
+fi
+
+ if test "$enable_swig_version_check" = "yes"; then
+
+ # Find path to the "swig" executable.
+ for ac_prog in swig swig3.0 swig2.0
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_SWIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $SWIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SWIG=$ac_cv_path_SWIG
+if test -n "$SWIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
+printf "%s\n" "$SWIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$SWIG" && break
+done
+
+ if test -z "$SWIG" ; then
+ :
+ elif test -z "2.0.1" ; then
+ :
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
+printf %s "checking SWIG version... " >&6; }
+ swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
+printf "%s\n" "$swig_version" >&6; }
+ if test -n "$swig_version" ; then
+ # Calculate the required version number components
+ required=2.0.1
+ required_major=`echo $required | sed 's/[^0-9].*//'`
+ if test -z "$required_major" ; then
+ required_major=0
+ fi
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
+ required_minor=`echo $required | sed 's/[^0-9].*//'`
+ if test -z "$required_minor" ; then
+ required_minor=0
+ fi
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
+ required_patch=`echo $required | sed 's/[^0-9].*//'`
+ if test -z "$required_patch" ; then
+ required_patch=0
+ fi
+ # Calculate the available version number components
+ available=$swig_version
+ available_major=`echo $available | sed 's/[^0-9].*//'`
+ if test -z "$available_major" ; then
+ available_major=0
+ fi
+ available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+ available_minor=`echo $available | sed 's/[^0-9].*//'`
+ if test -z "$available_minor" ; then
+ available_minor=0
+ fi
+ available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+ available_patch=`echo $available | sed 's/[^0-9].*//'`
+ if test -z "$available_patch" ; then
+ available_patch=0
+ fi
+ # Convert the version tuple into a single number for easier comparison.
+ # Using base 100 should be safe since SWIG internally uses BCD values
+ # to encode its version number.
+ required_swig_vernum=`expr $required_major \* 10000 \
+ \+ $required_minor \* 100 \+ $required_patch`
+ available_swig_vernum=`expr $available_major \* 10000 \
+ \+ $available_minor \* 100 \+ $available_patch`
+
+ if test $available_swig_vernum -lt $required_swig_vernum; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version." >&5
+printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version." >&2;}
+ SWIG=''
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
+printf %s "checking for SWIG library... " >&6; }
+ SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
+printf "%s\n" "$SWIG_LIB" >&6; }
+
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
+printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
+ SWIG=''
+
+ fi
+ fi
+
+
+ else
+
+ # Find path to the "swig" executable.
+ for ac_prog in swig swig3.0 swig2.0
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_SWIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $SWIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SWIG=$ac_cv_path_SWIG
+if test -n "$SWIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
+printf "%s\n" "$SWIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$SWIG" && break
+done
+
+ if test -z "$SWIG" ; then
+ :
+ elif test -z "" ; then
+ :
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
+printf %s "checking SWIG version... " >&6; }
+ swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
+printf "%s\n" "$swig_version" >&6; }
+ if test -n "$swig_version" ; then
+ # Calculate the required version number components
+ required=
+ required_major=`echo $required | sed 's/[^0-9].*//'`
+ if test -z "$required_major" ; then
+ required_major=0
+ fi
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
+ required_minor=`echo $required | sed 's/[^0-9].*//'`
+ if test -z "$required_minor" ; then
+ required_minor=0
+ fi
+ required=`echo $required. | sed 's/[0-9]*[^0-9]//'`
+ required_patch=`echo $required | sed 's/[^0-9].*//'`
+ if test -z "$required_patch" ; then
+ required_patch=0
+ fi
+ # Calculate the available version number components
+ available=$swig_version
+ available_major=`echo $available | sed 's/[^0-9].*//'`
+ if test -z "$available_major" ; then
+ available_major=0
+ fi
+ available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+ available_minor=`echo $available | sed 's/[^0-9].*//'`
+ if test -z "$available_minor" ; then
+ available_minor=0
+ fi
+ available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+ available_patch=`echo $available | sed 's/[^0-9].*//'`
+ if test -z "$available_patch" ; then
+ available_patch=0
+ fi
+ # Convert the version tuple into a single number for easier comparison.
+ # Using base 100 should be safe since SWIG internally uses BCD values
+ # to encode its version number.
+ required_swig_vernum=`expr $required_major \* 10000 \
+ \+ $required_minor \* 100 \+ $required_patch`
+ available_swig_vernum=`expr $available_major \* 10000 \
+ \+ $available_minor \* 100 \+ $available_patch`
+
+ if test $available_swig_vernum -lt $required_swig_vernum; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= is required. You have $swig_version." >&5
+printf "%s\n" "$as_me: WARNING: SWIG version >= is required. You have $swig_version." >&2;}
+ SWIG=''
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
+printf %s "checking for SWIG library... " >&6; }
+ SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
+printf "%s\n" "$SWIG_LIB" >&6; }
+
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
+printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;}
+ SWIG=''
+
+ fi
+ fi
+
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
+printf %s "checking SWIG... " >&6; }
+ if test ! -x "$SWIG"; then
+ as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
+ else
+
+printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h
+
+ swig="$SWIG"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5
+printf "%s\n" "present" >&6; }
+
+ # If have Python & SWIG
+ # Declare PythonMod
+ if test x_$ub_with_pythonmod != x_no; then
+
+printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h
+
+ WITH_PYTHONMODULE=yes
+
+ PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
+
+ PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
+
+ PYTHONMOD_INSTALL=pythonmod-install
+
+ PYTHONMOD_UNINSTALL=pythonmod-uninstall
+
+ fi
+
+ # Declare PyUnbound
+ if test x_$ub_with_pyunbound != x_no; then
+
+printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h
+
+ WITH_PYUNBOUND=yes
+
+ PYUNBOUND_OBJ="libunbound_wrap.lo"
+
+ PYUNBOUND_TARGET="_unbound.la"
+
+ PYUNBOUND_INSTALL=pyunbound-install
+
+ PYUNBOUND_UNINSTALL=pyunbound-uninstall
+
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
+printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
+ ub_with_pyunbound=no
+ ub_with_pythonmod=no
+ fi
+fi
+
+if test "`uname`" = "NetBSD"; then
+ NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
+
+fi
+
+if test "`uname`" = "Linux"; then
+ # splint cannot parse modern c99 header files
+ GCC_DOCKER_LINTFLAGS='-syntax'
+
+fi
+CONFIG_DATE=`date +%Y%m%d`
+
+
+# Checks for libraries.
+
+# libnss
+USE_NSS="no"
+
+# Check whether --with-nss was given.
+if test ${with_nss+y}
+then :
+ withval=$with_nss;
+ USE_NSS="yes"
+
+printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h
+
+ if test "$withval" != "" -a "$withval" != "yes"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+
+ if test "x$enable_rpath" = xyes; then
+ if echo "$withval/lib" | grep "^/" >/dev/null; then
+ RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
+ fi
+ fi
+
+ CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
+ else
+ CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
+ CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
+ fi
+ LIBS="$LIBS -lnss3 -lnspr4"
+ SSLLIB=""
+ PC_CRYPTO_DEPENDENCY="nss nspr"
+
+
+
+fi
+
+
+# libnettle
+USE_NETTLE="no"
+
+# Check whether --with-nettle was given.
+if test ${with_nettle+y}
+then :
+ withval=$with_nettle;
+ USE_NETTLE="yes"
+
+printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h
+
+ ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h
+
+fi
+
+ if test "$withval" != "" -a "$withval" != "yes"; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+
+ if test "x$enable_rpath" = xyes; then
+ if echo "$withval/lib" | grep "^/" >/dev/null; then
+ RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
+ fi
+ fi
+
+ else
+ CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
+ fi
+ LIBS="$LIBS -lhogweed -lnettle -lgmp"
+ SSLLIB=""
+ PC_CRYPTO_DEPENDENCY="hogweed nettle"
+
+
+
+fi
+
+
+# openssl
+if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
+
+
+# Check whether --with-ssl was given.
+if test ${with_ssl+y}
+then :
+ withval=$with_ssl;
+
+else $as_nop
+
+ withval="yes"
+
+fi
+
+ if test x_$withval = x_no; then
+ as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
+ fi
+
+ withval=$withval
+ if test x_$withval != x_no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
+printf %s "checking for SSL... " >&6; }
+ if test -n "$withval"; then
+ if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
+ ssldir="$withval"
+ found_ssl="yes"
+ withval=""
+ ssldir_include="$ssldir"
+ ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
+ if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
+ : # found here
+ else
+ ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
+ if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
+ : # found here
+ else
+ as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5
+ fi
+ fi
+ fi
+ fi
+ if test x_$withval = x_ -o x_$withval = x_yes; then
+ withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
+ fi
+ for dir in $withval; do
+ ssldir="$dir"
+ if test -f "$dir/include/openssl/ssl.h"; then
+ found_ssl="yes"
+ ssldir_include="$ssldir/include"
+ if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
+ ssldir_lib="$ssldir/lib64"
+ else
+ ssldir_lib="$ssldir/lib"
+ fi
+ break;
+ fi
+ done
+ if test x_$found_ssl != x_yes; then
+ as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
+printf "%s\n" "found in $ssldir" >&6; }
+
+printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h
+
+ HAVE_SSL=yes
+ if test "$ssldir" != "/usr"; then
+ CPPFLAGS="$CPPFLAGS -I$ssldir_include"
+ LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
+ LDFLAGS="$LDFLAGS -L$ssldir_lib"
+ LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
+
+ if test "x$enable_rpath" = xyes; then
+ if echo "$ssldir_lib" | grep "^/" >/dev/null; then
+ RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib"
+ fi
+ fi
+
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5
+printf %s "checking for EVP_sha256 in -lcrypto... " >&6; }
+ LIBS="$LIBS -lcrypto"
+ LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ # check if -lwsock32 or -lgdi32 are needed.
+ BAKLIBS="$LIBS"
+ BAKSSLLIBS="$LIBSSL_LIBS"
+ LIBS="$LIBS -lgdi32 -lws2_32"
+ LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
+printf %s "checking if -lcrypto needs -lgdi32... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ LIBS="$BAKLIBS"
+ LIBSSL_LIBS="$BAKSSLLIBS"
+
+ LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32"
+ LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5
+printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ LIBS="$BAKLIBS"
+ LIBSSL_LIBS="$BAKSSLLIBS"
+
+ LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
+ LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5
+printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ LIBS="$BAKLIBS"
+ LIBSSL_LIBS="$BAKSSLLIBS"
+
+ LIBS="$LIBS -ldl"
+ LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
+printf %s "checking if -lcrypto needs -ldl... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ LIBS="$BAKLIBS"
+ LIBSSL_LIBS="$BAKSSLLIBS"
+ LIBS="$LIBS -ldl -pthread"
+ LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
+printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+
+
+ fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_err_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_rand_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h
+
+fi
+
+
+
+
+# check if libssl needs libdl
+BAKLIBS="$LIBS"
+LIBS="-lssl $LIBS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
+printf %s "checking if libssl needs libdl... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char SSL_CTX_new ();
+int
+main (void)
+{
+return SSL_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ LIBS="$BAKLIBS"
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ LIBS="$BAKLIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+printf %s "checking for library containing dlopen... " >&6; }
+if test ${ac_cv_search_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_dlopen+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_dlopen+y}
+then :
+
+else $as_nop
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+printf "%s\n" "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+SSLLIB="-lssl"
+
+PC_CRYPTO_DEPENDENCY=""
+
+
+# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
+BAKLIBS="$LIBS"
+LIBS="-lssl $LIBS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
+printf %s "checking if libssl needs -lcrypt32... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ int EVP_sha256(void);
+ (void)EVP_sha256();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ LIBS="$BAKLIBS"
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ LIBS="$BAKLIBS"
+ LIBS="$LIBS -lcrypt32"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
+printf %s "checking for LibreSSL... " >&6; }
+if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h
+
+ # libressl provides these compat functions, but they may also be
+ # declared by the OS in libc. See if they have been declared.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strlcpy" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strlcat" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_arc4random" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_arc4random_uniform" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h
+
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_conf_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_engine_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_bn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_dh_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_dsa_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_rsa_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_core_names_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_openssl_param_build_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config"
+if test "x$ac_cv_func_OPENSSL_config" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1"
+if test "x$ac_cv_func_EVP_sha1" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256"
+if test "x$ac_cv_func_EVP_sha256" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512"
+if test "x$ac_cv_func_EVP_sha512" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode"
+if test "x$ac_cv_func_FIPS_mode" = xyes
+then :
+ printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled"
+if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new"
+if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests"
+if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto"
+if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup"
+if test "x$ac_cv_func_EVP_cleanup" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup"
+if test "x$ac_cv_func_ENGINE_cleanup" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings"
+if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data"
+if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes
+then :
+ printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings"
+if test "x$ac_cv_func_ERR_free_strings" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup"
+if test "x$ac_cv_func_RAND_cleanup" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0"
+if test "x$ac_cv_func_DSA_SIG_set0" = xyes
+then :
+ printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
+if test "x$ac_cv_func_EVP_dss1" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify"
+if test "x$ac_cv_func_EVP_DigestVerify" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc"
+if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex"
+if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex"
+if test "x$ac_cv_func_HMAC_Init_ex" = xyes
+then :
+ printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback"
+if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes
+then :
+ printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params"
+if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new"
+if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes
+then :
+ printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex"
+if test "x$ac_cv_func_BIO_set_callback_ex" = xyes
+then :
+ printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h
+
+fi
+
+
+# these check_funcs need -lssl
+BAKLIBS="$LIBS"
+LIBS="-lssl $LIBS"
+ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
+if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level"
+if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host"
+if test "x$ac_cv_func_SSL_set1_host" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername"
+if test "x$ac_cv_func_SSL_get0_peername" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host"
+if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes
+then :
+ printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
+if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb"
+if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb"
+if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected"
+if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos"
+if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate"
+if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes
+then :
+ printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h
+
+fi
+
+LIBS="$BAKLIBS"
+
+ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
+$ac_includes_default
+#ifdef HAVE_OPENSSL_ERR_H
+#include <openssl/err.h>
+#endif
+
+#ifdef HAVE_OPENSSL_RAND_H
+#include <openssl/rand.h>
+#endif
+
+#ifdef HAVE_OPENSSL_CONF_H
+#include <openssl/conf.h>
+#endif
+
+#ifdef HAVE_OPENSSL_ENGINE_H
+#include <openssl/engine.h>
+#endif
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
+$ac_includes_default
+#ifdef HAVE_OPENSSL_ERR_H
+#include <openssl/err.h>
+#endif
+
+#ifdef HAVE_OPENSSL_RAND_H
+#include <openssl/rand.h>
+#endif
+
+#ifdef HAVE_OPENSSL_CONF_H
+#include <openssl/conf.h>
+#endif
+
+#ifdef HAVE_OPENSSL_ENGINE_H
+#include <openssl/engine.h>
+#endif
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
+$ac_includes_default
+#ifdef HAVE_OPENSSL_ERR_H
+#include <openssl/err.h>
+#endif
+
+#ifdef HAVE_OPENSSL_RAND_H
+#include <openssl/rand.h>
+#endif
+
+#ifdef HAVE_OPENSSL_CONF_H
+#include <openssl/conf.h>
+#endif
+
+#ifdef HAVE_OPENSSL_ENGINE_H
+#include <openssl/engine.h>
+#endif
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h
+
+
+if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then
+# check function return type.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5
+printf %s "checking the return type of HMAC_Init_ex... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_OPENSSL_ERR_H
+#include <openssl/err.h>
+#endif
+
+#ifdef HAVE_OPENSSL_RAND_H
+#include <openssl/rand.h>
+#endif
+
+#ifdef HAVE_OPENSSL_CONF_H
+#include <openssl/conf.h>
+#endif
+
+#ifdef HAVE_OPENSSL_ENGINE_H
+#include <openssl/engine.h>
+#endif
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+
+int
+main (void)
+{
+
+ HMAC_CTX* hmac_ctx = NULL;
+ void* hmac_key = NULL;
+ const EVP_MD* digest = NULL;
+ int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
+ (void)x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5
+printf "%s\n" "int" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5
+printf "%s\n" "void" >&6; }
+
+printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
+
+# libbsd
+
+# Check whether --with-libbsd was given.
+if test ${with_libbsd+y}
+then :
+ withval=$with_libbsd;
+ ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_bsd_string_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_bsd_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h
+
+fi
+
+ if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then
+ for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do
+ as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5
+printf %s "checking for library containing $func... " >&6; }
+if eval test \${$as_ac_Search+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char $func ();
+int
+main (void)
+{
+return $func ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' bsd
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$as_ac_Search=\$ac_res"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if eval test \${$as_ac_Search+y}
+then :
+ break
+fi
+done
+if eval test \${$as_ac_Search+y}
+then :
+
+else $as_nop
+ eval "$as_ac_Search=no"
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+eval ac_res=\$$as_ac_Search
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+eval ac_res=\$$as_ac_Search
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
+
+ PC_LIBBSD_DEPENDENCY=libbsd
+
+
+fi
+
+ done
+ fi
+
+fi
+
+
+# Check whether --enable-sha1 was given.
+if test ${enable_sha1+y}
+then :
+ enableval=$enable_sha1;
+fi
+
+case "$enable_sha1" in
+ no)
+ ;;
+ yes|*)
+
+printf "%s\n" "#define USE_SHA1 1" >>confdefs.h
+
+ ;;
+esac
+
+
+# Check whether --enable-sha2 was given.
+if test ${enable_sha2+y}
+then :
+ enableval=$enable_sha2;
+fi
+
+case "$enable_sha2" in
+ no)
+ ;;
+ yes|*)
+
+printf "%s\n" "#define USE_SHA2 1" >>confdefs.h
+
+ ;;
+esac
+
+# Check whether --enable-subnet was given.
+if test ${enable_subnet+y}
+then :
+ enableval=$enable_subnet;
+fi
+
+case "$enable_subnet" in
+ yes)
+
+printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h
+
+ SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
+
+ SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
+
+ ;;
+ no|*)
+ ;;
+esac
+
+# check whether gost also works
+
+# Check whether --enable-gost was given.
+if test ${enable_gost+y}
+then :
+ enableval=$enable_gost;
+fi
+
+use_gost="no"
+if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
+case "$enable_gost" in
+ no)
+ ;;
+ *)
+ ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
+if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes
+then :
+ :
+else $as_nop
+ as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
+fi
+
+ ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
+if test "x$ac_cv_func_EC_KEY_new" = xyes
+then :
+
+else $as_nop
+ as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
+printf %s "checking if GOST works... " >&6; }
+if test c${cross_compiling} = cno; then
+BAKCFLAGS="$CFLAGS"
+if test -n "$ssldir"; then
+ CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib"
+fi
+if test "$cross_compiling" = yes
+then :
+ eval "ac_cv_c_gost_works=maybe"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <string.h>
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+#include <openssl/engine.h>
+#include <openssl/conf.h>
+/* routine to load gost (from sldns) */
+int load_gost_id(void)
+{
+ static int gost_id = 0;
+ const EVP_PKEY_ASN1_METHOD* meth;
+ ENGINE* e;
+
+ if(gost_id) return gost_id;
+
+ /* see if configuration loaded gost implementation from other engine*/
+ meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
+ if(meth) {
+ EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
+ return gost_id;
+ }
+
+ /* see if engine can be loaded already */
+ e = ENGINE_by_id("gost");
+ if(!e) {
+ /* load it ourself, in case statically linked */
+ ENGINE_load_builtin_engines();
+ ENGINE_load_dynamic();
+ e = ENGINE_by_id("gost");
+ }
+ if(!e) {
+ /* no gost engine in openssl */
+ return 0;
+ }
+ if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
+ ENGINE_finish(e);
+ ENGINE_free(e);
+ return 0;
+ }
+
+ meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
+ if(!meth) {
+ /* algo not found */
+ ENGINE_finish(e);
+ ENGINE_free(e);
+ return 0;
+ }
+ EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
+ return gost_id;
+}
+int main(void) {
+ EVP_MD_CTX* ctx;
+ const EVP_MD* md;
+ unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
+ const char* str = "Hello world";
+ const unsigned char check[] = {
+ 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
+ 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
+ 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
+ 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
+ };
+ OPENSSL_config(NULL);
+ (void)load_gost_id();
+ md = EVP_get_digestbyname("md_gost94");
+ if(!md) return 1;
+ memset(digest, 0, sizeof(digest));
+ ctx = EVP_MD_CTX_create();
+ if(!ctx) return 2;
+ if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
+ if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
+ if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
+ /* uncomment to see the hash calculated.
+ {int i;
+ for(i=0; i<32; i++)
+ printf(" %2.2x", (int)digest[i]);
+ printf("\n");}
+ */
+ if(memcmp(digest, check, sizeof(check)) != 0)
+ return 6;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ eval "ac_cv_c_gost_works=yes"
+else $as_nop
+ eval "ac_cv_c_gost_works=no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+CFLAGS="$BAKCFLAGS"
+else
+eval "ac_cv_c_gost_works=maybe"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
+printf "%s\n" "$ac_cv_c_gost_works" >&6; }
+
+ if test "$ac_cv_c_gost_works" != no; then
+ use_gost="yes"
+
+printf "%s\n" "#define USE_GOST 1" >>confdefs.h
+
+ fi
+ ;;
+esac
+fi
+# Check whether --enable-ecdsa was given.
+if test ${enable_ecdsa+y}
+then :
+ enableval=$enable_ecdsa;
+fi
+
+use_ecdsa="no"
+case "$enable_ecdsa" in
+ no)
+ ;;
+ *)
+ if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
+ ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
+if test "x$ac_cv_func_ECDSA_sign" = xyes
+then :
+
+else $as_nop
+ as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
+fi
+
+ ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
+if test "x$ac_cv_func_SHA384_Init" = xyes
+then :
+
+else $as_nop
+ as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+
+else $as_nop
+ as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
+fi
+ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_secp384r1" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+
+else $as_nop
+ as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
+fi
+
+ # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
+printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
+ if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
+ if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h
+
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+ else
+ # not OpenSSL, thus likely LibreSSL, which supports it
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+ fi
+ # we now know we have ECDSA and the required curves.
+
+printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h
+
+ use_ecdsa="yes"
+ ;;
+esac
+
+# Check whether --enable-dsa was given.
+if test ${enable_dsa+y}
+then :
+ enableval=$enable_dsa;
+fi
+
+use_dsa="no"
+case "$enable_dsa" in
+ yes)
+ # detect if DSA is supported, and turn it off if not.
+ if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
+ ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
+if test "x$ac_cv_func_DSA_SIG_new" = xyes
+then :
+
+ as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh`
+ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
+$ac_includes_default
+#ifdef HAVE_OPENSSL_ERR_H
+#include <openssl/err.h>
+#endif
+
+#ifdef HAVE_OPENSSL_RAND_H
+#include <openssl/rand.h>
+#endif
+
+#ifdef HAVE_OPENSSL_CONF_H
+#include <openssl/conf.h>
+#endif
+
+#ifdef HAVE_OPENSSL_ENGINE_H
+#include <openssl/engine.h>
+#endif
+
+"
+if eval test \"x\$"$as_ac_Type"\" = x"yes"
+then :
+
+
+printf "%s\n" "#define USE_DSA 1" >>confdefs.h
+
+
+else $as_nop
+ if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
+ fi
+fi
+
+
+else $as_nop
+ if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
+ fi
+fi
+
+ else
+
+printf "%s\n" "#define USE_DSA 1" >>confdefs.h
+
+ fi
+ ;;
+ *)
+ # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT
+ # support DSA for DNSSEC Validation.
+ ;;
+esac
+
+
+# Check whether --with-deprecate-rsa-1024 was given.
+if test ${with_deprecate_rsa_1024+y}
+then :
+ withval=$with_deprecate_rsa_1024;
+fi
+
+if test "$with_deprecate_rsa_1024" = "yes"; then
+
+printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-ed25519 was given.
+if test ${enable_ed25519+y}
+then :
+ enableval=$enable_ed25519;
+fi
+
+use_ed25519="no"
+case "$enable_ed25519" in
+ no)
+ ;;
+ *)
+ if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
+ ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_ED25519" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+
+ use_ed25519="yes"
+
+else $as_nop
+ if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
+ fi
+fi
+
+ fi
+ if test $USE_NETTLE = "yes"; then
+ for ac_header in nettle/eddsa.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_nettle_eddsa_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h
+ use_ed25519="yes"
+fi
+
+done
+ fi
+ if test $use_ed25519 = "yes"; then
+
+printf "%s\n" "#define USE_ED25519 1" >>confdefs.h
+
+ fi
+ ;;
+esac
+
+# Check whether --enable-ed448 was given.
+if test ${enable_ed448+y}
+then :
+ enableval=$enable_ed448;
+fi
+
+use_ed448="no"
+case "$enable_ed448" in
+ no)
+ ;;
+ *)
+ if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
+ ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
+#include <openssl/evp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_NID_ED448" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+
+ use_ed448="yes"
+
+else $as_nop
+ if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
+ fi
+fi
+
+ fi
+ if test $use_ed448 = "yes"; then
+
+printf "%s\n" "#define USE_ED448 1" >>confdefs.h
+
+ fi
+ ;;
+esac
+
+# Check whether --enable-event-api was given.
+if test ${enable_event_api+y}
+then :
+ enableval=$enable_event_api;
+fi
+
+case "$enable_event_api" in
+ yes)
+ UNBOUND_EVENT_INSTALL=unbound-event-install
+
+ UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
+
+ ;;
+ *)
+ ;;
+esac
+
+# Check whether --enable-tfo-client was given.
+if test ${enable_tfo_client+y}
+then :
+ enableval=$enable_tfo_client;
+fi
+
+case "$enable_tfo_client" in
+ yes)
+ case "$host_os" in
+ linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
+#include <netinet/tcp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
+printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
+else $as_nop
+ as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
+fi
+
+printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h
+
+ ;;
+ darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
+#include <sys/socket.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
+printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
+else $as_nop
+ as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
+fi
+
+printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ no|*)
+ ;;
+esac
+
+# Check whether --enable-tfo-server was given.
+if test ${enable_tfo_server+y}
+then :
+ enableval=$enable_tfo_server;
+fi
+
+case "$enable_tfo_server" in
+ yes)
+ ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
+#include <netinet/tcp.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
+printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
+else $as_nop
+ as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
+fi
+
+printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h
+
+ ;;
+ no|*)
+ ;;
+esac
+
+# check for libevent
+
+# Check whether --with-libevent was given.
+if test ${with_libevent+y}
+then :
+ withval=$with_libevent;
+else $as_nop
+ with_libevent="no"
+fi
+
+if test "x_$with_libevent" != x_no; then
+
+printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
+printf %s "checking for libevent... " >&6; }
+ if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
+ with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
+ fi
+ for dir in $with_libevent; do
+ thedir="$dir"
+ if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
+ found_libevent="yes"
+ if test "$thedir" != "/usr"; then
+ CPPFLAGS="$CPPFLAGS -I$thedir/include"
+ fi
+ break;
+ fi
+ done
+ if test x_$found_libevent != x_yes; then
+ if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
+ # libevent source directory
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
+printf "%s\n" "found in $thedir" >&6; }
+ CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
+ BAK_LDFLAGS_SET="1"
+ BAK_LDFLAGS="$LDFLAGS"
+ # remove evdns from linking
+ mkdir build >/dev/null 2>&1
+ mkdir build/libevent >/dev/null 2>&1
+ mkdir build/libevent/.libs >/dev/null 2>&1
+ ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
+ ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
+ ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
+ cp $ev_files_o build/libevent
+ cp $ev_files_lo build/libevent
+ cp $ev_files_libso build/libevent/.libs
+ LATE_LDFLAGS="build/libevent/*.lo -lm"
+ LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
+ else
+ as_fn_error $? "Cannot find the libevent library in $with_libevent
+You can restart ./configure --with-libevent=no to use a builtin alternative.
+Please note that this alternative is not as capable as libevent when using
+large outgoing port ranges. " "$LINENO" 5
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
+printf "%s\n" "found in $thedir" >&6; }
+ if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
+ LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
+
+ if test "x$enable_rpath" = xyes; then
+ if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
+ RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
+ fi
+ fi
+
+ else
+ if test "$thedir" != "/usr" -a "$thedir" != ""; then
+ LDFLAGS="$LDFLAGS -L$thedir/lib"
+
+ if test "x$enable_rpath" = xyes; then
+ if echo "$thedir/lib" | grep "^/" >/dev/null; then
+ RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
+ fi
+ fi
+
+ fi
+ fi
+ fi
+ # check for library used by libevent after 1.3c
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char clock_gettime ();
+int
+main (void)
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_clock_gettime+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_clock_gettime+y}
+then :
+
+else $as_nop
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+ # is the event.h header libev or libevent?
+ ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_event_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h
+
+fi
+
+ ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
+#include <event.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
+printf %s "checking for library containing event_set... " >&6; }
+if test ${ac_cv_search_event_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char event_set ();
+int
+main (void)
+{
+return event_set ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ev
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_event_set=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_event_set+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_event_set+y}
+then :
+
+else $as_nop
+ ac_cv_search_event_set=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
+printf "%s\n" "$ac_cv_search_event_set" >&6; }
+ac_res=$ac_cv_search_event_set
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
+printf %s "checking for library containing event_set... " >&6; }
+if test ${ac_cv_search_event_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char event_set ();
+int
+main (void)
+{
+return event_set ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' event
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_event_set=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_event_set+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_event_set+y}
+then :
+
+else $as_nop
+ ac_cv_search_event_set=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
+printf "%s\n" "$ac_cv_search_event_set" >&6; }
+ac_res=$ac_cv_search_event_set
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+fi
+ ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
+if test "x$ac_cv_func_event_base_free" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h
+
+fi
+ # only in libevent 1.2 and later
+ ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
+if test "x$ac_cv_func_event_base_once" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h
+
+fi
+ # only in libevent 1.4.1 and later
+ ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
+if test "x$ac_cv_func_event_base_new" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h
+
+fi
+ # only in libevent 1.4.1 and later
+ ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
+if test "x$ac_cv_func_event_base_get_method" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h
+
+fi
+ # only in libevent 1.4.3 and later
+ ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
+if test "x$ac_cv_func_ev_loop" = xyes
+then :
+ printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h
+
+fi
+ # only in libev. (tested on 3.51)
+ ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
+if test "x$ac_cv_func_ev_default_loop" = xyes
+then :
+ printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h
+
+fi
+ # only in libev. (tested on 4.00)
+ ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign"
+if test "x$ac_cv_func_event_assign" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h
+
+fi
+ # in libevent, for thread-safety
+ ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default
+#ifdef HAVE_EVENT_H
+# include <event.h>
+#else
+# include \"event2/event.h\"
+#endif
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_evsignal_assign" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h
+
+ PC_LIBEVENT_DEPENDENCY="libevent"
+
+ if test -n "$BAK_LDFLAGS_SET"; then
+ LDFLAGS="$BAK_LDFLAGS"
+ fi
+else
+
+printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h
+
+fi
+
+# check for libexpat
+
+# Check whether --with-libexpat was given.
+if test ${with_libexpat+y}
+then :
+ withval=$with_libexpat;
+else $as_nop
+ withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
+printf %s "checking for libexpat... " >&6; }
+found_libexpat="no"
+for dir in $withval ; do
+ if test -f "$dir/include/expat.h"; then
+ found_libexpat="yes"
+ if test "$dir" != "/usr"; then
+ CPPFLAGS="$CPPFLAGS -I$dir/include"
+ LDFLAGS="$LDFLAGS -L$dir/lib"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
+ break;
+ fi
+done
+if test x_$found_libexpat != x_yes; then
+ as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
+fi
+ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_expat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
+
+fi
+
+ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
+#include <expat.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_XML_StopParser" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
+
+
+# hiredis (redis C client for cachedb)
+
+# Check whether --with-libhiredis was given.
+if test ${with_libhiredis+y}
+then :
+ withval=$with_libhiredis;
+else $as_nop
+ withval="no"
+fi
+
+found_libhiredis="no"
+if test x_$withval = x_yes -o x_$withval != x_no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
+printf %s "checking for libhiredis... " >&6; }
+ if test x_$withval = x_ -o x_$withval = x_yes; then
+ withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
+ fi
+ for dir in $withval ; do
+ if test -f "$dir/include/hiredis/hiredis.h"; then
+ found_libhiredis="yes"
+ if test "$dir" != "/usr"; then
+ CPPFLAGS="$CPPFLAGS -I$dir/include"
+ LDFLAGS="$LDFLAGS -L$dir/lib"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
+
+printf "%s\n" "#define USE_REDIS 1" >>confdefs.h
+
+ LIBS="$LIBS -lhiredis"
+ break;
+ fi
+ done
+ if test x_$found_libhiredis != x_yes; then
+ as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
+ fi
+ ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_hiredis_hiredis_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h
+
+fi
+
+ ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
+ #include <hiredis/hiredis.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_redisConnect" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h
+
+fi
+
+# nghttp2
+
+# Check whether --with-libnghttp2 was given.
+if test ${with_libnghttp2+y}
+then :
+ withval=$with_libnghttp2;
+else $as_nop
+ withval="no"
+fi
+
+found_libnghttp2="no"
+if test x_$withval = x_yes -o x_$withval != x_no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
+printf %s "checking for libnghttp2... " >&6; }
+ if test x_$withval = x_ -o x_$withval = x_yes; then
+ withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
+ fi
+ for dir in $withval ; do
+ if test -f "$dir/include/nghttp2/nghttp2.h"; then
+ found_libnghttp2="yes"
+ if test "$dir" != "/usr"; then
+ CPPFLAGS="$CPPFLAGS -I$dir/include"
+ LDFLAGS="$LDFLAGS -L$dir/lib"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
+
+printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h
+
+ LIBS="$LIBS -lnghttp2"
+ break;
+ fi
+ done
+ if test x_$found_libnghttp2 != x_yes; then
+ as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5
+ fi
+ ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h
+
+fi
+
+ ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default
+ #include <nghttp2/nghttp2.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h
+
+fi
+
+# set static linking for uninstalled libraries if requested
+
+staticexe=""
+# Check whether --enable-static-exe was given.
+if test ${enable_static_exe+y}
+then :
+ enableval=$enable_static_exe;
+fi
+
+if test x_$enable_static_exe = x_yes; then
+ staticexe="-static"
+ if test "$on_mingw" = yes; then
+ staticexe="-all-static"
+ # for static compile, include gdi32 and zlib here.
+ if echo "$LIBS" | grep 'lgdi32' >/dev/null; then
+ :
+ else
+ LIBS="$LIBS -lgdi32"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+printf %s "checking for compress in -lz... " >&6; }
+if test ${ac_cv_lib_z_compress+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char compress ();
+int
+main (void)
+{
+return compress ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_z_compress=yes
+else $as_nop
+ ac_cv_lib_z_compress=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = xyes
+then :
+ LIBS="$LIBS -lz"
+fi
+
+ if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
+ :
+ else
+ LIBS="$LIBS -l:libssp.a"
+ fi
+ fi
+fi
+
+# set full static linking if requested
+# Check whether --enable-fully-static was given.
+if test ${enable_fully_static+y}
+then :
+ enableval=$enable_fully_static;
+fi
+
+if test x_$enable_fully_static = x_yes; then
+ staticexe="-all-static"
+ if test "$on_mingw" = yes; then
+ # for static compile, include gdi32 and zlib here.
+ if echo $LIBS | grep 'lgdi32' >/dev/null; then
+ :
+ else
+ LIBS="$LIBS -lgdi32"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+printf %s "checking for compress in -lz... " >&6; }
+if test ${ac_cv_lib_z_compress+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char compress ();
+int
+main (void)
+{
+return compress ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_z_compress=yes
+else $as_nop
+ ac_cv_lib_z_compress=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+printf "%s\n" "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = xyes
+then :
+ LIBS="$LIBS -lz"
+fi
+
+ if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then
+ :
+ else
+ LIBS="$LIBS -l:libssp.a"
+ fi
+ fi
+fi
+
+# set lock checking if requested
+# Check whether --enable-lock_checks was given.
+if test ${enable_lock_checks+y}
+then :
+ enableval=$enable_lock_checks;
+fi
+
+if test x_$enable_lock_checks = x_yes; then
+
+printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
+
+ CHECKLOCK_OBJ="checklocks.lo"
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
+printf %s "checking for getaddrinfo... " >&6; }
+ac_cv_func_getaddrinfo=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+char* getaddrinfo();
+char* (*f) () = getaddrinfo;
+#ifdef __cplusplus
+}
+#endif
+int main(void) {
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_func_getaddrinfo="yes"
+if test "$ac_cv_header_windows_h" = "yes"; then
+
+printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
+
+ USE_WINSOCK="1"
+ if echo "$LIBS" | grep 'lws2_32' >/dev/null; then
+ :
+ else
+ LIBS="$LIBS -lws2_32"
+ fi
+fi
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+int
+main (void)
+{
+
+ (void)getaddrinfo(NULL, NULL, NULL, NULL);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ac_cv_func_getaddrinfo="yes"
+
+printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
+
+USE_WINSOCK="1"
+
+else $as_nop
+ ORIGLIBS="$LIBS"
+LIBS="$LIBS -lws2_32"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+int
+main (void)
+{
+
+ (void)getaddrinfo(NULL, NULL, NULL, NULL);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ac_cv_func_getaddrinfo="yes"
+
+printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h
+
+USE_WINSOCK="1"
+
+else $as_nop
+
+ac_cv_func_getaddrinfo="no"
+LIBS="$ORIGLIBS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
+printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
+if test $ac_cv_func_getaddrinfo = yes; then
+
+printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
+
+fi
+
+if test "$USE_WINSOCK" = 1; then
+
+printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h
+
+ ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
+#include <windows.h>
+
+"
+if test "x$ac_cv_header_iphlpapi_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h
+
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_WINDRES+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$WINDRES"; then
+ ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+printf "%s\n" "$WINDRES" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_WINDRES"; then
+ ac_ct_WINDRES=$WINDRES
+ # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_WINDRES+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_WINDRES"; then
+ ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_WINDRES="windres"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
+if test -n "$ac_ct_WINDRES"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
+printf "%s\n" "$ac_ct_WINDRES" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_WINDRES" = x; then
+ WINDRES=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ WINDRES=$ac_ct_WINDRES
+ fi
+else
+ WINDRES="$ac_cv_prog_WINDRES"
+fi
+
+ if echo "$LIBS" | grep crypt32 >/dev/null; then
+ LIBS="$LIBS -liphlpapi"
+ else
+ LIBS="$LIBS -liphlpapi -lcrypt32"
+ fi
+ WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
+
+ WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
+
+ WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
+
+ WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
+
+ WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
+
+ WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
+
+ WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
+
+ WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
+
+
+printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+
+fi
+if test $ac_cv_func_getaddrinfo = no; then
+ case " $LIBOBJS " in
+ *" fake-rfc2553.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
+ ;;
+esac
+
+fi
+# check after getaddrinfo for its libraries
+
+# check ioctlsocket
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
+printf %s "checking for ioctlsocket... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+int
+main (void)
+{
+
+ (void)ioctlsocket(0, 0, NULL);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
+
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+# see if daemon(3) exists, and if it is deprecated.
+ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
+if test "x$ac_cv_func_daemon" = xyes
+then :
+ printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
+
+fi
+
+if test $ac_cv_func_daemon = yes; then
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
+printf %s "checking if daemon is deprecated... " >&6; }
+cache=`echo daemon | sed 'y%.=/+-%___p_%'`
+if eval test \${cv_cc_deprecated_$cache+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+echo '
+#include <stdlib.h>
+#include <unistd.h>
+' >conftest.c
+echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c
+if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
+eval "cv_cc_deprecated_$cache=no"
+else
+eval "cv_cc_deprecated_$cache=yes"
+fi
+rm -f conftest conftest.o conftest.c
+
+fi
+
+if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h
+
+:
+
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+:
+
+fi
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
+$ac_includes_default
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
+"
+if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h
+
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
+$ac_includes_default
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h
+
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5
+printf %s "checking for htobe64... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h>
+#endif
+#ifdef HAVE_SYS_ENDIAN_H
+# include <sys/endian.h>
+#endif
+
+int
+main (void)
+{
+unsigned long long x = htobe64(0); printf("%u", (unsigned)x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5
+printf %s "checking for be64toh... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h>
+#endif
+#ifdef HAVE_SYS_ENDIAN_H
+# include <sys/endian.h>
+#endif
+
+int
+main (void)
+{
+unsigned long long x = be64toh(0); printf("%u", (unsigned)x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
+printf %s "checking for library containing setusercontext... " >&6; }
+if test ${ac_cv_search_setusercontext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char setusercontext ();
+int
+main (void)
+{
+return setusercontext ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' util
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_setusercontext=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_setusercontext+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_setusercontext+y}
+then :
+
+else $as_nop
+ ac_cv_search_setusercontext=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
+printf "%s\n" "$ac_cv_search_setusercontext" >&6; }
+ac_res=$ac_cv_search_setusercontext
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
+if test "x$ac_cv_func_tzset" = xyes
+then :
+ printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
+if test "x$ac_cv_func_fcntl" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
+if test "x$ac_cv_func_getpwnam" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent"
+if test "x$ac_cv_func_endpwent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
+if test "x$ac_cv_func_getrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
+if test "x$ac_cv_func_setrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
+if test "x$ac_cv_func_setsid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
+if test "x$ac_cv_func_chroot" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
+if test "x$ac_cv_func_kill" = xyes
+then :
+ printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
+if test "x$ac_cv_func_chown" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep"
+if test "x$ac_cv_func_sleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
+if test "x$ac_cv_func_usleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
+if test "x$ac_cv_func_random" = xyes
+then :
+ printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
+if test "x$ac_cv_func_srandom" = xyes
+then :
+ printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
+if test "x$ac_cv_func_recvmsg" = xyes
+then :
+ printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg"
+if test "x$ac_cv_func_sendmsg" = xyes
+then :
+ printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
+if test "x$ac_cv_func_writev" = xyes
+then :
+ printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
+if test "x$ac_cv_func_socketpair" = xyes
+then :
+ printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob"
+if test "x$ac_cv_func_glob" = xyes
+then :
+ printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
+if test "x$ac_cv_func_initgroups" = xyes
+then :
+ printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
+if test "x$ac_cv_func_localtime_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext"
+if test "x$ac_cv_func_setusercontext" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex"
+if test "x$ac_cv_func__beginthreadex" = xyes
+then :
+ printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent"
+if test "x$ac_cv_func_endservent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent"
+if test "x$ac_cv_func_endprotoent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
+if test "x$ac_cv_func_fsync" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget"
+if test "x$ac_cv_func_shmget" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
+if test "x$ac_cv_func_accept4" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
+if test "x$ac_cv_func_if_nametoindex" = xyes
+then :
+ printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid"
+if test "x$ac_cv_func_gettid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h
+
+fi
+
+
+ for ac_func in setresuid
+do :
+ ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
+if test "x$ac_cv_func_setresuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
+
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
+if test "x$ac_cv_func_setreuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
+
+fi
+
+fi
+
+done
+
+ for ac_func in setresgid
+do :
+ ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
+if test "x$ac_cv_func_setresgid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
+
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
+if test "x$ac_cv_func_setregid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
+
+fi
+
+fi
+
+done
+
+# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
+if echo $host_os | grep darwin8 > /dev/null; then
+
+printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
+
+fi
+ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
+$ac_includes_default
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_inet_pton" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
+$ac_includes_default
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_inet_ntop" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
+
+ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
+if test "x$ac_cv_func_inet_aton" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" inet_aton.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" inet_pton.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
+if test "x$ac_cv_func_inet_ntop" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" inet_ntop.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+fi
+
+# test if snprintf return the proper length
+if test "x$ac_cv_func_snprintf" = xyes; then
+ if test c${cross_compiling} = cno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
+printf %s "checking for correct snprintf return value... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
+printf "%s\n" "maybe" >&6; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+
+int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
+
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+if test "x$ac_cv_func_strlcat" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" strlcat.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" strlcpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
+if test "x$ac_cv_func_memmove" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" memmove.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
+if test "x$ac_cv_func_gmtime_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" gmtime_r.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
+if test "x$ac_cv_func_isblank" = xyes
+then :
+ printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" isblank.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
+if test "x$ac_cv_func_explicit_bzero" = xyes
+then :
+ printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" explicit_bzero.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
+ ;;
+esac
+
+fi
+
+LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5
+printf %s "checking for reallocarray... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+
+#ifndef _OPENBSD_SOURCE
+#define _OPENBSD_SOURCE 1
+#endif
+#include <stdlib.h>
+int main(void) {
+ void* p = reallocarray(NULL, 10, 100);
+ free(p);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
+
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ case " $LIBOBJS " in
+ *" reallocarray.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
+ ;;
+esac
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_reallocarray" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h
+
+if test "$USE_NSS" = "no"; then
+ ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
+if test "x$ac_cv_func_arc4random" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" arc4random.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
+ ;;
+esac
+
+fi
+
+ ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
+if test "x$ac_cv_func_arc4random_uniform" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" arc4random_uniform.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
+ ;;
+esac
+
+fi
+
+ if test "$ac_cv_func_arc4random" = "no"; then
+ case " $LIBOBJS " in
+ *" arc4_lock.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
+ ;;
+esac
+
+
+ for ac_func in getentropy
+do :
+ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
+if test "x$ac_cv_func_getentropy" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
+
+else $as_nop
+
+ if test "$USE_WINSOCK" = 1; then
+ case " $LIBOBJS " in
+ *" getentropy_win.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
+ ;;
+esac
+
+ else
+ case "$host" in
+ Darwin|*darwin*)
+ case " $LIBOBJS " in
+ *" getentropy_osx.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
+ ;;
+esac
+
+ ;;
+ *solaris*|*sunos*|SunOS)
+ case " $LIBOBJS " in
+ *" getentropy_solaris.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
+ ;;
+esac
+
+ for ac_header in sys/sha2.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_sha2_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h
+
+else $as_nop
+
+
+ for ac_func in SHA512_Update
+do :
+ ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
+if test "x$ac_cv_func_SHA512_Update" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
+
+else $as_nop
+
+ case " $LIBOBJS " in
+ *" sha512.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
+ ;;
+esac
+
+
+fi
+
+done
+
+fi
+
+done
+ if test "$ac_cv_header_sys_sha2_h" = "yes"; then
+ # this lib needed for sha2 on solaris
+ LIBS="$LIBS -lmd"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char clock_gettime ();
+int
+main (void)
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_clock_gettime+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_clock_gettime+y}
+then :
+
+else $as_nop
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ ;;
+ *freebsd*|*FreeBSD)
+ case " $LIBOBJS " in
+ *" getentropy_freebsd.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext"
+ ;;
+esac
+
+ ;;
+ *linux*|Linux|*)
+ case " $LIBOBJS " in
+ *" getentropy_linux.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
+ ;;
+esac
+
+
+ for ac_func in SHA512_Update
+do :
+ ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
+if test "x$ac_cv_func_SHA512_Update" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h
+
+else $as_nop
+
+
+printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h
+
+ case " $LIBOBJS " in
+ *" sha512.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
+ ;;
+esac
+
+
+fi
+
+done
+ ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_sys_sysctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
+if test "x$ac_cv_func_getauxval" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char clock_gettime ();
+int
+main (void)
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_clock_gettime+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_clock_gettime+y}
+then :
+
+else $as_nop
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ ;;
+ esac
+ fi
+
+fi
+
+done
+ fi
+fi
+LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
+
+ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
+if test "x$ac_cv_func_ctime_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" ctime_r.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
+if test "x$ac_cv_func_strsep" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
+
+else $as_nop
+ case " $LIBOBJS " in
+ *" strsep.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+# Check whether --enable-allsymbols was given.
+if test ${enable_allsymbols+y}
+then :
+ enableval=$enable_allsymbols;
+fi
+
+case "$enable_allsymbols" in
+ yes)
+ COMMON_OBJ_ALL_SYMBOLS=""
+ UBSYMS=""
+ EXTRALINK="libunbound.la"
+
+printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
+
+ ;;
+ no|*)
+ COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
+ UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
+ EXTRALINK=""
+ ;;
+esac
+
+
+
+if test x_$enable_lock_checks = x_yes; then
+ UBSYMS="-export-symbols clubsyms.def"
+ cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
+ echo lock_protect >> clubsyms.def
+ echo lock_unprotect >> clubsyms.def
+ echo lock_get_mem >> clubsyms.def
+ echo checklock_start >> clubsyms.def
+ echo checklock_stop >> clubsyms.def
+ echo checklock_lock >> clubsyms.def
+ echo checklock_unlock >> clubsyms.def
+ echo checklock_init >> clubsyms.def
+ echo checklock_thrcreate >> clubsyms.def
+ echo checklock_thrjoin >> clubsyms.def
+fi
+
+# check for dnstap if requested
+
+ # Check whether --enable-dnstap was given.
+if test ${enable_dnstap+y}
+then :
+ enableval=$enable_dnstap; opt_dnstap=$enableval
+else $as_nop
+ opt_dnstap=no
+fi
+
+
+
+# Check whether --with-dnstap-socket-path was given.
+if test ${with_dnstap_socket_path+y}
+then :
+ withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
+else $as_nop
+ opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
+fi
+
+
+ if test "x$opt_dnstap" != "xno"; then
+ # Extract the first word of "protoc-c", so it can be a program name with args.
+set dummy protoc-c; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PROTOC_C+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PROTOC_C in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PROTOC_C=$ac_cv_path_PROTOC_C
+if test -n "$PROTOC_C"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
+printf "%s\n" "$PROTOC_C" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if test -z "$PROTOC_C"; then
+ as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
+ fi
+
+# Check whether --with-protobuf-c was given.
+if test ${with_protobuf_c+y}
+then :
+ withval=$with_protobuf_c;
+ # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
+ if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I$withval/include/google"
+ else
+ CFLAGS="$CFLAGS -I$withval/include"
+ fi
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+
+else $as_nop
+
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
+printf %s "checking for PROTOBUFC... " >&6; }
+
+if test -n "$PROTOBUFC_CFLAGS"; then
+ pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$PROTOBUFC_LIBS"; then
+ pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
+ else
+ PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$PROTOBUFC_PKG_ERRORS" >&5
+
+
+ # pkg-config failed; try falling back to known values
+ # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
+ if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I/usr/include/google"
+ else
+ if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I/usr/local/include/google"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ else
+ as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
+ fi
+ fi
+
+
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+ # pkg-config failed; try falling back to known values
+ # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
+ if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I/usr/include/google"
+ else
+ if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I/usr/local/include/google"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ else
+ as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
+ fi
+ fi
+
+
+else
+ PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
+ PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+ CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
+ LIBS="$LIBS $PROTOBUFC_LIBS"
+
+fi
+
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
+printf %s "checking for library containing protobuf_c_message_pack... " >&6; }
+if test ${ac_cv_search_protobuf_c_message_pack+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char protobuf_c_message_pack ();
+int
+main (void)
+{
+return protobuf_c_message_pack ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' protobuf-c
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_protobuf_c_message_pack=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_protobuf_c_message_pack+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_protobuf_c_message_pack+y}
+then :
+
+else $as_nop
+ ac_cv_search_protobuf_c_message_pack=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
+printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; }
+ac_res=$ac_cv_search_protobuf_c_message_pack
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else $as_nop
+ as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5
+fi
+
+
+
+printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h
+
+ ENABLE_DNSTAP=1
+
+
+
+ hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
+
+
+printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h
+
+ DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
+
+ DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
+
+ DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
+
+ DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"
+
+
+ else
+
+ ENABLE_DNSTAP=0
+
+
+
+ fi
+
+
+# check for dnscrypt if requested
+
+ # Check whether --enable-dnscrypt was given.
+if test ${enable_dnscrypt+y}
+then :
+ enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
+else $as_nop
+ opt_dnscrypt=no
+fi
+
+
+ if test "x$opt_dnscrypt" != "xno"; then
+
+# Check whether --with-libsodium was given.
+if test ${with_libsodium+y}
+then :
+ withval=$with_libsodium;
+ CFLAGS="$CFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
+printf %s "checking for library containing sodium_init... " >&6; }
+if test ${ac_cv_search_sodium_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char sodium_init ();
+int
+main (void)
+{
+return sodium_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' sodium
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_sodium_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_sodium_init+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_sodium_init+y}
+then :
+
+else $as_nop
+ ac_cv_search_sodium_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
+printf "%s\n" "$ac_cv_search_sodium_init" >&6; }
+ac_res=$ac_cv_search_sodium_init
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else $as_nop
+ as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
+printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
+if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char crypto_box_curve25519xchacha20poly1305_beforenm ();
+int
+main (void)
+{
+return crypto_box_curve25519xchacha20poly1305_beforenm ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' sodium
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y}
+then :
+
+else $as_nop
+ ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
+printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
+ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ ENABLE_DNSCRYPT_XCHACHA20=1
+
+
+printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
+
+
+else $as_nop
+
+ ENABLE_DNSCRYPT_XCHACHA20=0
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
+printf %s "checking for library containing sodium_set_misuse_handler... " >&6; }
+if test ${ac_cv_search_sodium_set_misuse_handler+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char sodium_set_misuse_handler ();
+int
+main (void)
+{
+return sodium_set_misuse_handler ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' sodium
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_sodium_set_misuse_handler=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_sodium_set_misuse_handler+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_sodium_set_misuse_handler+y}
+then :
+
+else $as_nop
+ ac_cv_search_sodium_set_misuse_handler=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
+printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; }
+ac_res=$ac_cv_search_sodium_set_misuse_handler
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
+
+
+fi
+
+
+
+printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h
+
+ ENABLE_DNSCRYPT=1
+
+
+ DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
+
+ DNSCRYPT_OBJ="dnscrypt.lo"
+
+
+ else
+ ENABLE_DNSCRYPT_XCHACHA20=0
+
+
+ ENABLE_DNSCRYPT=0
+
+
+
+ fi
+
+
+# check for cachedb if requested
+# Check whether --enable-cachedb was given.
+if test ${enable_cachedb+y}
+then :
+ enableval=$enable_cachedb;
+fi
+
+# turn on cachedb when hiredis support is enabled.
+if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
+case "$enable_cachedb" in
+ yes)
+
+printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h
+
+ CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c"
+
+ CACHEDB_OBJ="cachedb.lo redis.lo"
+
+ ;;
+ no|*)
+ # nothing
+ ;;
+esac
+
+# check for ipsecmod if requested
+# Check whether --enable-ipsecmod was given.
+if test ${enable_ipsecmod+y}
+then :
+ enableval=$enable_ipsecmod;
+fi
+
+case "$enable_ipsecmod" in
+ yes)
+
+printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h
+
+ IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
+
+ IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
+
+ ;;
+ no|*)
+ # nothing
+ ;;
+esac
+
+# check for ipset if requested
+# Check whether --enable-ipset was given.
+if test ${enable_ipset+y}
+then :
+ enableval=$enable_ipset;
+fi
+
+case "$enable_ipset" in
+ yes)
+
+printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
+
+ IPSET_SRC="ipset/ipset.c"
+
+ IPSET_OBJ="ipset.lo"
+
+
+ # mnl
+
+# Check whether --with-libmnl was given.
+if test ${with_libmnl+y}
+then :
+ withval=$with_libmnl;
+else $as_nop
+ withval="yes"
+fi
+
+ found_libmnl="no"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
+printf %s "checking for libmnl... " >&6; }
+ if test x_$withval = x_ -o x_$withval = x_yes; then
+ withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
+ fi
+ for dir in $withval ; do
+ if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
+ found_libmnl="yes"
+ extralibmnl=""
+ if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then
+ extralibmnl="/libmnl"
+ fi
+ if test "$dir" != "/usr" -o -n "$extralibmnl"; then
+ CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl"
+ fi
+ if test "$dir" != "/usr"; then
+ LDFLAGS="$LDFLAGS -L$dir/lib"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
+printf "%s\n" "found in $dir" >&6; }
+ LIBS="$LIBS -lmnl"
+ break;
+ fi
+ done
+ if test x_$found_libmnl != x_yes; then
+ as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
+ fi
+ ;;
+ no|*)
+ # nothing
+ ;;
+esac
+# Check whether --enable-explicit-port-randomisation was given.
+if test ${enable_explicit_port_randomisation+y}
+then :
+ enableval=$enable_explicit_port_randomisation;
+fi
+
+case "$enable_explicit_port_randomisation" in
+ no)
+
+printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h
+
+ ;;
+ yes|*)
+ ;;
+esac
+
+if echo "$host" | $GREP -i -e linux >/dev/null; then
+ # Check whether --enable-linux-ip-local-port-range was given.
+if test ${enable_linux_ip_local_port_range+y}
+then :
+ enableval=$enable_linux_ip_local_port_range;
+fi
+
+ case "$enable_linux_ip_local_port_range" in
+ yes)
+
+printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h
+
+ ;;
+ no|*)
+ ;;
+ esac
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
+printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
+# on openBSD, the implicit rule make $< work.
+# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
+# gmake works.
+cat >conftest.make <<EOF
+all: conftest.lo
+
+conftest.lo foo.lo bla.lo:
+ if test -f "\$<"; then touch \$@; fi
+
+.SUFFIXES: .lo
+.c.lo:
+ if test -f "\$<"; then touch \$@; fi
+
+conftest.lo: conftest.dir/conftest.c
+EOF
+mkdir conftest.dir
+touch conftest.dir/conftest.c
+rm -f conftest.lo conftest.c
+${MAKE:-make} -f conftest.make >/dev/null
+rm -f conftest.make conftest.c conftest.dir/conftest.c
+rm -rf conftest.dir
+if test ! -f conftest.lo; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
+ SOURCEFILE='`cat .source`'
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SOURCEDETERMINE=':'
+ SOURCEFILE='$<'
+fi
+rm -f conftest.lo
+
+
+
+# see if we want to build the library or everything
+ALLTARGET="alltargets"
+INSTALLTARGET="install-all"
+
+# Check whether --with-libunbound-only was given.
+if test ${with_libunbound_only+y}
+then :
+ withval=$with_libunbound_only;
+ if test "$withval" = "yes"; then
+ ALLTARGET="lib"
+ INSTALLTARGET="install-lib"
+ fi
+
+fi
+
+if test $ALLTARGET = "alltargets"; then
+ if test $USE_NSS = "yes"; then
+ as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
+ fi
+ if test $USE_NETTLE = "yes"; then
+ as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
+ fi
+fi
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
+printf "%s\n" "$as_me: Stripping extension flags..." >&6;}
+
+ if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
+
+printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
+
+printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
+
+printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
+
+printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
+
+printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
+
+printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
+
+printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
+
+printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
+
+ fi
+
+
+ if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
+ CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
+
+printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
+
+ fi
+
+
+if test -n "$LATE_LDFLAGS"; then
+ LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
+fi
+# remove start spaces
+LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
+LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
+
+
+printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
+
+
+
+
+version=1.20.0
+
+date=`date +'%b %e, %Y'`
+
+
+ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service"
+
+ac_config_headers="$ac_config_headers config.h"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
+ as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by unbound $as_me 1.20.0, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>."
+
+_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config='$ac_cs_config_escaped'
+ac_cs_version="\\
+unbound config.status 1.20.0
+configured by $0, generated by GNU Autoconf 2.71,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ printf "%s\n" "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ printf "%s\n" "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ printf "%s\n" "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ printf "%s\n" "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
+ "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
+ "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
+ "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
+ "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
+ "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
+ "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
+ "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
+ "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
+ "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
+ "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
+ "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
+ "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
+ "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
+ "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;;
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+ ;;
+
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=''
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "disable-rpath":C)
+ sed < libtool > libtool-2 \
+ 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
+ mv libtool-2 libtool
+ chmod 755 libtool
+ libtool="./libtool"
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
diff --git a/contrib/unbound/contrib/rc_d_unbound b/contrib/unbound/contrib/rc_d_unbound
index 56516147f230..9d98c5e059ae 100755
--- a/contrib/unbound/contrib/rc_d_unbound
+++ b/contrib/unbound/contrib/rc_d_unbound
@@ -22,4 +22,13 @@ pidfile=${unbound_pidfile:-"/usr/local/etc/unbound/unbound.pid"}
command_args=${unbound_flags:-"-c /usr/local/etc/unbound/unbound.conf"}
extra_commands="reload"
+if test "$1" = "stop" ; then
+ run_rc_command "$1"
+ ret=$?
+ if test $ret -eq 0; then
+ rm -f "$pidfile"
+ fi
+ exit $ret
+fi
+
run_rc_command "$1"
diff --git a/contrib/unbound/contrib/unbound.init b/contrib/unbound/contrib/unbound.init
index c5bb52bb4d69..70ab0134e827 100644
--- a/contrib/unbound/contrib/unbound.init
+++ b/contrib/unbound/contrib/unbound.init
@@ -75,6 +75,7 @@ stop() {
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
+ [ $retval -eq 0 ] && rm -f $pidfile
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; then
umount ${rootdir}/dev/log >/dev/null 2>&1
fi;
diff --git a/contrib/unbound/contrib/unbound.init_fedora b/contrib/unbound/contrib/unbound.init_fedora
index 989440341989..75856777fb8f 100644
--- a/contrib/unbound/contrib/unbound.init_fedora
+++ b/contrib/unbound/contrib/unbound.init_fedora
@@ -58,6 +58,7 @@ stop() {
killproc -p $pidfile unbound
retval=$?
[ $retval -eq 0 ] && rm -f $lockfile
+ [ $retval -eq 0 ] && rm -f $pidfile
for mountfile in /dev/log /dev/urandom /etc/localtime /etc/resolv.conf /var/run/unbound
do
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}''${mountfile}'' /proc/mounts; then
diff --git a/contrib/unbound/contrib/unbound.init_yocto b/contrib/unbound/contrib/unbound.init_yocto
index 4eba752bc55c..e1a812448274 100644
--- a/contrib/unbound/contrib/unbound.init_yocto
+++ b/contrib/unbound/contrib/unbound.init_yocto
@@ -75,6 +75,7 @@ stop() {
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
+ [ $retval -eq 0 ] && rm -f $pidfile
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; then
umount ${rootdir}/dev/log >/dev/null 2>&1
fi;
diff --git a/contrib/unbound/daemon/cachedump.c b/contrib/unbound/daemon/cachedump.c
index 61ee1d29133f..c4f55d8c9cbb 100644
--- a/contrib/unbound/daemon/cachedump.c
+++ b/contrib/unbound/daemon/cachedump.c
@@ -839,6 +839,7 @@ int print_deleg_lookup(RES* ssl, struct worker* worker, uint8_t* nm,
char b[260];
struct query_info qinfo;
struct iter_hints_stub* stub;
+ int nolock = 0;
regional_free_all(region);
qinfo.qname = nm;
qinfo.qname_len = nmlen;
@@ -850,13 +851,16 @@ int print_deleg_lookup(RES* ssl, struct worker* worker, uint8_t* nm,
if(!ssl_printf(ssl, "The following name servers are used for lookup "
"of %s\n", b))
return 0;
-
- dp = forwards_lookup(worker->env.fwds, nm, qinfo.qclass);
+
+ dp = forwards_lookup(worker->env.fwds, nm, qinfo.qclass, nolock);
if(dp) {
- if(!ssl_printf(ssl, "forwarding request:\n"))
+ if(!ssl_printf(ssl, "forwarding request:\n")) {
+ lock_rw_unlock(&worker->env.fwds->lock);
return 0;
+ }
print_dp_main(ssl, dp, NULL);
print_dp_details(ssl, worker, dp);
+ lock_rw_unlock(&worker->env.fwds->lock);
return 1;
}
@@ -892,21 +896,26 @@ int print_deleg_lookup(RES* ssl, struct worker* worker, uint8_t* nm,
return 0;
continue;
}
- }
+ }
stub = hints_lookup_stub(worker->env.hints, nm, qinfo.qclass,
- dp);
+ dp, nolock);
if(stub) {
if(stub->noprime) {
if(!ssl_printf(ssl, "The noprime stub servers "
- "are used:\n"))
+ "are used:\n")) {
+ lock_rw_unlock(&worker->env.hints->lock);
return 0;
+ }
} else {
if(!ssl_printf(ssl, "The stub is primed "
- "with servers:\n"))
+ "with servers:\n")) {
+ lock_rw_unlock(&worker->env.hints->lock);
return 0;
+ }
}
print_dp_main(ssl, stub->dp, NULL);
print_dp_details(ssl, worker, stub->dp);
+ lock_rw_unlock(&worker->env.hints->lock);
} else {
print_dp_main(ssl, dp, msg);
print_dp_details(ssl, worker, dp);
diff --git a/contrib/unbound/daemon/daemon.c b/contrib/unbound/daemon/daemon.c
index 193608d40e05..f0ee329db903 100644
--- a/contrib/unbound/daemon/daemon.c
+++ b/contrib/unbound/daemon/daemon.c
@@ -91,6 +91,8 @@
#include "util/net_help.h"
#include "sldns/keyraw.h"
#include "respip/respip.h"
+#include "iterator/iter_fwd.h"
+#include "iterator/iter_hints.h"
#include <signal.h>
#ifdef HAVE_SYSTEMD
@@ -99,6 +101,9 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
+#ifdef USE_CACHEDB
+#include "cachedb/cachedb.h"
+#endif
/** How many quit requests happened. */
static int sig_record_quit = 0;
@@ -260,6 +265,7 @@ daemon_init(void)
free(daemon);
return NULL;
}
+ daemon->env->modstack = &daemon->mods;
/* init edns_known_options */
if(!edns_known_options_init(daemon->env)) {
free(daemon->env);
@@ -321,17 +327,15 @@ static int setup_acl_for_ports(struct acl_list* list,
struct listen_port* port_list)
{
struct acl_addr* acl_node;
- struct addrinfo* addr;
for(; port_list; port_list=port_list->next) {
if(!port_list->socket) {
/* This is mainly for testbound where port_list is
* empty. */
continue;
}
- addr = port_list->socket->addr;
if(!(acl_node = acl_interface_insert(list,
- (struct sockaddr_storage*)addr->ai_addr,
- (socklen_t)addr->ai_addrlen,
+ (struct sockaddr_storage*)port_list->socket->addr,
+ port_list->socket->addrlen,
acl_refuse))) {
return 0;
}
@@ -716,6 +720,12 @@ daemon_fork(struct daemon* daemon)
fatal_exit("Could not create local zones: out of memory");
if(!local_zones_apply_cfg(daemon->local_zones, daemon->cfg))
fatal_exit("Could not set up local zones");
+ if(!(daemon->env->fwds = forwards_create()) ||
+ !forwards_apply_cfg(daemon->env->fwds, daemon->cfg))
+ fatal_exit("Could not set forward zones");
+ if(!(daemon->env->hints = hints_create()) ||
+ !hints_apply_cfg(daemon->env->hints, daemon->cfg))
+ fatal_exit("Could not set root or stub hints");
/* process raw response-ip configuration data */
if(!(daemon->respip_set = respip_set_create()))
@@ -740,6 +750,10 @@ daemon_fork(struct daemon* daemon)
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
fatal_exit("Could not set up EDNS strings");
+#ifdef USE_CACHEDB
+ daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
+ daemon->env);
+#endif
/* response-ip-xxx options don't work as expected without the respip
* module. To avoid run-time operational surprise we reject such
* configuration. */
@@ -832,6 +846,10 @@ daemon_cleanup(struct daemon* daemon)
slabhash_clear(daemon->env->msg_cache);
}
daemon->old_num = daemon->num; /* save the current num */
+ forwards_delete(daemon->env->fwds);
+ daemon->env->fwds = NULL;
+ hints_delete(daemon->env->hints);
+ daemon->env->hints = NULL;
local_zones_delete(daemon->local_zones);
daemon->local_zones = NULL;
respip_set_delete(daemon->respip_set);
diff --git a/contrib/unbound/daemon/remote.c b/contrib/unbound/daemon/remote.c
index 5d79eafd23be..764ae8ffda3c 100644
--- a/contrib/unbound/daemon/remote.c
+++ b/contrib/unbound/daemon/remote.c
@@ -1992,12 +1992,19 @@ static int
print_root_fwds(RES* ssl, struct iter_forwards* fwds, uint8_t* root)
{
struct delegpt* dp;
- dp = forwards_lookup(fwds, root, LDNS_RR_CLASS_IN);
- if(!dp)
+ int nolock = 0;
+ dp = forwards_lookup(fwds, root, LDNS_RR_CLASS_IN, nolock);
+ if(!dp) {
return ssl_printf(ssl, "off (using root hints)\n");
+ }
/* if dp is returned it must be the root */
log_assert(query_dname_compare(dp->name, root)==0);
- return ssl_print_name_dp(ssl, NULL, root, LDNS_RR_CLASS_IN, dp);
+ if(!ssl_print_name_dp(ssl, NULL, root, LDNS_RR_CLASS_IN, dp)) {
+ lock_rw_unlock(&fwds->lock);
+ return 0;
+ }
+ lock_rw_unlock(&fwds->lock);
+ return 1;
}
/** parse args into delegpt */
@@ -2069,6 +2076,7 @@ do_forward(RES* ssl, struct worker* worker, char* args)
{
struct iter_forwards* fwd = worker->env.fwds;
uint8_t* root = (uint8_t*)"\000";
+ int nolock = 0;
if(!fwd) {
(void)ssl_printf(ssl, "error: structure not allocated\n");
return;
@@ -2082,12 +2090,12 @@ do_forward(RES* ssl, struct worker* worker, char* args)
/* delete all the existing queries first */
mesh_delete_all(worker->env.mesh);
if(strcmp(args, "off") == 0) {
- forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, root);
+ forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, root, nolock);
} else {
struct delegpt* dp;
if(!(dp = parse_delegpt(ssl, args, root)))
return;
- if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp)) {
+ if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp, nolock)) {
(void)ssl_printf(ssl, "error out of memory\n");
return;
}
@@ -2097,7 +2105,7 @@ do_forward(RES* ssl, struct worker* worker, char* args)
static int
parse_fs_args(RES* ssl, char* args, uint8_t** nm, struct delegpt** dp,
- int* insecure, int* prime)
+ int* insecure, int* prime, int* tls)
{
char* zonename;
char* rest;
@@ -2112,6 +2120,8 @@ parse_fs_args(RES* ssl, char* args, uint8_t** nm, struct delegpt** dp,
*insecure = 1;
else if(*args == 'p' && prime)
*prime = 1;
+ else if(*args == 't' && tls)
+ *tls = 1;
else {
(void)ssl_printf(ssl, "error: unknown option %s\n", args);
return 0;
@@ -2144,25 +2154,33 @@ static void
do_forward_add(RES* ssl, struct worker* worker, char* args)
{
struct iter_forwards* fwd = worker->env.fwds;
- int insecure = 0;
+ int insecure = 0, tls = 0;
uint8_t* nm = NULL;
struct delegpt* dp = NULL;
- if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, NULL))
+ int nolock = 1;
+ if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, NULL, &tls))
return;
+ if(tls)
+ dp->ssl_upstream = 1;
+ /* prelock forwarders for atomic operation with anchors */
+ lock_rw_wrlock(&fwd->lock);
if(insecure && worker->env.anchors) {
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
nm)) {
+ lock_rw_unlock(&fwd->lock);
(void)ssl_printf(ssl, "error out of memory\n");
delegpt_free_mlc(dp);
free(nm);
return;
}
}
- if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp)) {
+ if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp, nolock)) {
+ lock_rw_unlock(&fwd->lock);
(void)ssl_printf(ssl, "error out of memory\n");
free(nm);
return;
}
+ lock_rw_unlock(&fwd->lock);
free(nm);
send_ok(ssl);
}
@@ -2174,12 +2192,16 @@ do_forward_remove(RES* ssl, struct worker* worker, char* args)
struct iter_forwards* fwd = worker->env.fwds;
int insecure = 0;
uint8_t* nm = NULL;
- if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL))
+ int nolock = 1;
+ if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL, NULL))
return;
+ /* prelock forwarders for atomic operation with anchors */
+ lock_rw_wrlock(&fwd->lock);
if(insecure && worker->env.anchors)
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
nm);
- forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, nm);
+ forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, nm, nolock);
+ lock_rw_unlock(&fwd->lock);
free(nm);
send_ok(ssl);
}
@@ -2189,38 +2211,53 @@ static void
do_stub_add(RES* ssl, struct worker* worker, char* args)
{
struct iter_forwards* fwd = worker->env.fwds;
- int insecure = 0, prime = 0;
+ int insecure = 0, prime = 0, tls = 0;
uint8_t* nm = NULL;
struct delegpt* dp = NULL;
- if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, &prime))
- return;
+ int nolock = 1;
+ if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, &prime, &tls))
+ return;
+ if(tls)
+ dp->ssl_upstream = 1;
+ /* prelock forwarders and hints for atomic operation with anchors */
+ lock_rw_wrlock(&fwd->lock);
+ lock_rw_wrlock(&worker->env.hints->lock);
if(insecure && worker->env.anchors) {
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
nm)) {
+ lock_rw_unlock(&fwd->lock);
+ lock_rw_unlock(&worker->env.hints->lock);
(void)ssl_printf(ssl, "error out of memory\n");
delegpt_free_mlc(dp);
free(nm);
return;
}
}
- if(!forwards_add_stub_hole(fwd, LDNS_RR_CLASS_IN, nm)) {
+ if(!forwards_add_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock)) {
if(insecure && worker->env.anchors)
anchors_delete_insecure(worker->env.anchors,
LDNS_RR_CLASS_IN, nm);
+ lock_rw_unlock(&fwd->lock);
+ lock_rw_unlock(&worker->env.hints->lock);
(void)ssl_printf(ssl, "error out of memory\n");
delegpt_free_mlc(dp);
free(nm);
return;
}
- if(!hints_add_stub(worker->env.hints, LDNS_RR_CLASS_IN, dp, !prime)) {
+ if(!hints_add_stub(worker->env.hints, LDNS_RR_CLASS_IN, dp, !prime,
+ nolock)) {
(void)ssl_printf(ssl, "error out of memory\n");
- forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm);
+ forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock);
if(insecure && worker->env.anchors)
anchors_delete_insecure(worker->env.anchors,
LDNS_RR_CLASS_IN, nm);
+ lock_rw_unlock(&fwd->lock);
+ lock_rw_unlock(&worker->env.hints->lock);
free(nm);
return;
}
+ lock_rw_unlock(&fwd->lock);
+ lock_rw_unlock(&worker->env.hints->lock);
free(nm);
send_ok(ssl);
}
@@ -2232,13 +2269,19 @@ do_stub_remove(RES* ssl, struct worker* worker, char* args)
struct iter_forwards* fwd = worker->env.fwds;
int insecure = 0;
uint8_t* nm = NULL;
- if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL))
+ int nolock = 1;
+ if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL, NULL))
return;
+ /* prelock forwarders and hints for atomic operation with anchors */
+ lock_rw_wrlock(&fwd->lock);
+ lock_rw_wrlock(&worker->env.hints->lock);
if(insecure && worker->env.anchors)
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
nm);
- forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm);
- hints_delete_stub(worker->env.hints, LDNS_RR_CLASS_IN, nm);
+ forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock);
+ hints_delete_stub(worker->env.hints, LDNS_RR_CLASS_IN, nm, nolock);
+ lock_rw_unlock(&fwd->lock);
+ lock_rw_unlock(&worker->env.hints->lock);
free(nm);
send_ok(ssl);
}
@@ -2667,6 +2710,7 @@ do_list_forwards(RES* ssl, struct worker* worker)
struct iter_forward_zone* z;
struct trust_anchor* a;
int insecure;
+ lock_rw_rdlock(&fwds->lock);
RBTREE_FOR(z, struct iter_forward_zone*, fwds->tree) {
if(!z->dp) continue; /* skip empty marker for stub */
@@ -2681,9 +2725,12 @@ do_list_forwards(RES* ssl, struct worker* worker)
}
if(!ssl_print_name_dp(ssl, (insecure?"forward +i":"forward"),
- z->name, z->dclass, z->dp))
+ z->name, z->dclass, z->dp)) {
+ lock_rw_unlock(&fwds->lock);
return;
+ }
}
+ lock_rw_unlock(&fwds->lock);
}
/** do the list_stubs command */
@@ -2694,6 +2741,7 @@ do_list_stubs(RES* ssl, struct worker* worker)
struct trust_anchor* a;
int insecure;
char str[32];
+ lock_rw_rdlock(&worker->env.hints->lock);
RBTREE_FOR(z, struct iter_hints_stub*, &worker->env.hints->tree) {
/* see if it is insecure */
@@ -2709,9 +2757,12 @@ do_list_stubs(RES* ssl, struct worker* worker)
snprintf(str, sizeof(str), "stub %sprime%s",
(z->noprime?"no":""), (insecure?" +i":""));
if(!ssl_print_name_dp(ssl, str, z->node.name,
- z->node.dclass, z->dp))
+ z->node.dclass, z->dp)) {
+ lock_rw_unlock(&worker->env.hints->lock);
return;
+ }
}
+ lock_rw_unlock(&worker->env.hints->lock);
}
/** do the list_auth_zones command */
@@ -3071,26 +3122,6 @@ execute_cmd(struct daemon_remote* rc, RES* ssl, char* cmd,
} else if(cmdcmp(p, "auth_zone_transfer", 18)) {
do_auth_zone_transfer(ssl, worker, skipwhite(p+18));
return;
- } else if(cmdcmp(p, "stub_add", 8)) {
- /* must always distribute this cmd */
- if(rc) distribute_cmd(rc, ssl, cmd);
- do_stub_add(ssl, worker, skipwhite(p+8));
- return;
- } else if(cmdcmp(p, "stub_remove", 11)) {
- /* must always distribute this cmd */
- if(rc) distribute_cmd(rc, ssl, cmd);
- do_stub_remove(ssl, worker, skipwhite(p+11));
- return;
- } else if(cmdcmp(p, "forward_add", 11)) {
- /* must always distribute this cmd */
- if(rc) distribute_cmd(rc, ssl, cmd);
- do_forward_add(ssl, worker, skipwhite(p+11));
- return;
- } else if(cmdcmp(p, "forward_remove", 14)) {
- /* must always distribute this cmd */
- if(rc) distribute_cmd(rc, ssl, cmd);
- do_forward_remove(ssl, worker, skipwhite(p+14));
- return;
} else if(cmdcmp(p, "insecure_add", 12)) {
/* must always distribute this cmd */
if(rc) distribute_cmd(rc, ssl, cmd);
@@ -3101,11 +3132,6 @@ execute_cmd(struct daemon_remote* rc, RES* ssl, char* cmd,
if(rc) distribute_cmd(rc, ssl, cmd);
do_insecure_remove(ssl, worker, skipwhite(p+15));
return;
- } else if(cmdcmp(p, "forward", 7)) {
- /* must always distribute this cmd */
- if(rc) distribute_cmd(rc, ssl, cmd);
- do_forward(ssl, worker, skipwhite(p+7));
- return;
} else if(cmdcmp(p, "flush_stats", 11)) {
/* must always distribute this cmd */
if(rc) distribute_cmd(rc, ssl, cmd);
@@ -3147,6 +3173,16 @@ execute_cmd(struct daemon_remote* rc, RES* ssl, char* cmd,
do_data_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
} else if(cmdcmp(p, "local_datas", 11)) {
do_datas_add(ssl, worker->daemon->local_zones);
+ } else if(cmdcmp(p, "forward_add", 11)) {
+ do_forward_add(ssl, worker, skipwhite(p+11));
+ } else if(cmdcmp(p, "forward_remove", 14)) {
+ do_forward_remove(ssl, worker, skipwhite(p+14));
+ } else if(cmdcmp(p, "forward", 7)) {
+ do_forward(ssl, worker, skipwhite(p+7));
+ } else if(cmdcmp(p, "stub_add", 8)) {
+ do_stub_add(ssl, worker, skipwhite(p+8));
+ } else if(cmdcmp(p, "stub_remove", 11)) {
+ do_stub_remove(ssl, worker, skipwhite(p+11));
} else if(cmdcmp(p, "view_local_zone_remove", 22)) {
do_view_zone_remove(ssl, worker, skipwhite(p+22));
} else if(cmdcmp(p, "view_local_zone", 15)) {
diff --git a/contrib/unbound/daemon/unbound.c b/contrib/unbound/daemon/unbound.c
index 457a08032857..d6c371571d75 100644
--- a/contrib/unbound/daemon/unbound.c
+++ b/contrib/unbound/daemon/unbound.c
@@ -366,9 +366,8 @@ readpid (const char* file)
/** write pid to file.
* @param pidfile: file name of pid file.
* @param pid: pid to write to file.
- * @return false on failure
*/
-static int
+static void
writepid (const char* pidfile, pid_t pid)
{
int fd;
@@ -383,7 +382,7 @@ writepid (const char* pidfile, pid_t pid)
, 0644)) == -1) {
log_err("cannot open pidfile %s: %s",
pidfile, strerror(errno));
- return 0;
+ return;
}
while(count < strlen(pidbuf)) {
ssize_t r = write(fd, pidbuf+count, strlen(pidbuf)-count);
@@ -393,17 +392,16 @@ writepid (const char* pidfile, pid_t pid)
log_err("cannot write to pidfile %s: %s",
pidfile, strerror(errno));
close(fd);
- return 0;
+ return;
} else if(r == 0) {
log_err("cannot write any bytes to pidfile %s: "
"write returns 0 bytes written", pidfile);
close(fd);
- return 0;
+ return;
}
count += r;
}
close(fd);
- return 1;
}
/**
@@ -545,7 +543,15 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
cfg, 1);
if(!daemon->pidfile)
fatal_exit("pidfile alloc: out of memory");
- checkoldpid(daemon->pidfile, pidinchroot);
+ /* Check old pid if there is no username configured.
+ * With a username, the assumption is that the privilege
+ * drop makes a pidfile not removed when the server stopped
+ * last time. The server does not chown the pidfile for it,
+ * because that creates privilege escape problems, with the
+ * pidfile writable by unprivileged users, but used by
+ * privileged users. */
+ if(cfg->username && cfg->username[0])
+ checkoldpid(daemon->pidfile, pidinchroot);
}
#endif
@@ -557,18 +563,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
/* write new pidfile (while still root, so can be outside chroot) */
#ifdef HAVE_KILL
if(cfg->pidfile && cfg->pidfile[0] && need_pidfile) {
- if(writepid(daemon->pidfile, getpid())) {
- if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1 &&
- pidinchroot) {
-# ifdef HAVE_CHOWN
- if(chown(daemon->pidfile, cfg_uid, cfg_gid) == -1) {
- verbose(VERB_QUERY, "cannot chown %u.%u %s: %s",
- (unsigned)cfg_uid, (unsigned)cfg_gid,
- daemon->pidfile, strerror(errno));
- }
-# endif /* HAVE_CHOWN */
- }
- }
+ writepid(daemon->pidfile, getpid());
}
#else
(void)daemon;
@@ -746,7 +741,11 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode, int need_pi
if(daemon->pidfile) {
int fd;
/* truncate pidfile */
- fd = open(daemon->pidfile, O_WRONLY | O_TRUNC, 0644);
+ fd = open(daemon->pidfile, O_WRONLY | O_TRUNC
+#ifdef O_NOFOLLOW
+ | O_NOFOLLOW
+#endif
+ , 0644);
if(fd != -1)
close(fd);
/* delete pidfile */
diff --git a/contrib/unbound/daemon/worker.c b/contrib/unbound/daemon/worker.c
index 176abf57d56e..b35fe65a3a64 100644
--- a/contrib/unbound/daemon/worker.c
+++ b/contrib/unbound/daemon/worker.c
@@ -659,7 +659,12 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
if(rep->ttl < timenow) {
/* Check if we need to serve expired now */
if(worker->env.cfg->serve_expired &&
- !worker->env.cfg->serve_expired_client_timeout) {
+ !worker->env.cfg->serve_expired_client_timeout
+#ifdef USE_CACHEDB
+ && !(worker->env.cachedb_enabled &&
+ worker->env.cfg->cachedb_check_when_serve_expired)
+#endif
+ ) {
if(worker->env.cfg->serve_expired_ttl &&
rep->serve_expired_ttl < timenow)
return 0;
@@ -1454,8 +1459,8 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
*/
if(worker->dtenv.log_client_query_messages) {
log_addr(VERB_ALGO, "request from client", &repinfo->client_addr, repinfo->client_addrlen);
- log_addr(VERB_ALGO, "to local addr", (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->socket->addr->ai_addrlen);
- dt_msg_send_client_query(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr->ai_addr, c->type, c->ssl, c->buffer,
+ log_addr(VERB_ALGO, "to local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
+ dt_msg_send_client_query(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, c->type, c->ssl, c->buffer,
((worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv))?&c->recv_tv:NULL));
}
#endif
@@ -1943,10 +1948,10 @@ send_reply_rc:
/*
* sending src (client)/dst (local service) addresses over DNSTAP from send_reply code label (when we serviced local zone for ex.)
*/
- if(worker->dtenv.log_client_response_messages) {
- log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->socket->addr->ai_addrlen);
+ if(worker->dtenv.log_client_response_messages && rc !=0) {
+ log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
log_addr(VERB_ALGO, "response to client", &repinfo->client_addr, repinfo->client_addrlen);
- dt_msg_send_client_response(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr->ai_addr, c->type, c->ssl, c->buffer);
+ dt_msg_send_client_response(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, c->type, c->ssl, c->buffer);
}
#endif
if(worker->env.cfg->log_replies)
@@ -1961,13 +1966,13 @@ send_reply_rc:
log_reply_info(NO_VERBOSE, &qinfo,
&repinfo->client_addr, repinfo->client_addrlen,
tv, 1, c->buffer,
- (worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr->ai_addr:NULL),
+ (worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
c->type);
} else {
log_reply_info(NO_VERBOSE, &qinfo,
&repinfo->client_addr, repinfo->client_addrlen,
tv, 1, c->buffer,
- (worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr->ai_addr:NULL),
+ (worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
c->type);
}
}
@@ -2261,18 +2266,6 @@ worker_init(struct worker* worker, struct config_file *cfg,
worker_delete(worker);
return 0;
}
- if(!(worker->env.fwds = forwards_create()) ||
- !forwards_apply_cfg(worker->env.fwds, cfg)) {
- log_err("Could not set forward zones");
- worker_delete(worker);
- return 0;
- }
- if(!(worker->env.hints = hints_create()) ||
- !hints_apply_cfg(worker->env.hints, cfg)) {
- log_err("Could not set root or stub hints");
- worker_delete(worker);
- return 0;
- }
/* one probe timer per process -- if we have 5011 anchors */
if(autr_get_num_anchors(worker->env.anchors) > 0
#ifndef THREADS_DISABLED
@@ -2345,8 +2338,6 @@ worker_delete(struct worker* worker)
outside_network_quit_prepare(worker->back);
mesh_delete(worker->env.mesh);
sldns_buffer_free(worker->env.scratch_buffer);
- forwards_delete(worker->env.fwds);
- hints_delete(worker->env.hints);
listen_delete(worker->front);
outside_network_delete(worker->back);
comm_signal_delete(worker->comsig);
diff --git a/contrib/unbound/doc/Changelog b/contrib/unbound/doc/Changelog
index 328e83289102..8d2ce0cde663 100644
--- a/contrib/unbound/doc/Changelog
+++ b/contrib/unbound/doc/Changelog
@@ -1,15 +1,194 @@
+1 May 2024: Wouter
+ - Fix for the DNSBomb vulnerability CVE-2024-33655. Thanks to Xiang Li
+ from the Network and Information Security Lab of Tsinghua University
+ for reporting it.
+ - Set version number to 1.20.0 for release.
+
+29 April 2024: Yorgos
+ - Cleanup unnecessary strdup calls for EDE strings.
+
+29 April 2024: Wouter
+ - Fix doxygen comment for errinf_to_str_bogus.
+
+26 April 2024: Wouter
+ - Fix cachedb with serve-expired-client-timeout disabled. The edns
+ subnet module deletes global cache and cachedb cache when it
+ stores a result, and serve-expired is enabled, so that the global
+ reply, that is older than the ecs reply, does not return after
+ the ecs reply expires.
+ - Add unit tests for cachedb and subnet cache expired data.
+ - Man page entry for unbound-checkconf -q.
+
+26 April 2024: Yorgos
+ - Fix #876: [FR] can unbound-checkconf be silenced when configuration
+ is valid?
+
+25 April 2024: Wouter
+ - Fix configure flto check error, by finding grep for it.
+ - Merge #1041: Stub and Forward unshare. This has one structure
+ for them and fixes #1038: fatal error: Could not initialize
+ thread / error: reading root hints.
+ - Fix to disable fragmentation on systems with IP_DONTFRAG,
+ with a nonzero value for the socket option argument.
+ - Fix doc unit test for out of directory build.
+
+24 April 2024: Wouter
+ - Fix ci workflow for macos for moved install locations.
+
+23 April 2024: Yorgos
+ - Merge #1053: Remove child delegations from cache when grandchild
+ delegations are returned from parent.
+
+22 April 2024: Wouter
+ - Add checklock feature verbose_locking to trace locks and unlocks.
+ - Fix edns subnet to sort rrset references when storing messages
+ in the cache. This fixes a race condition in the rrset locks.
+
+15 April 2024: Wouter
+ - Fix #1048: Update ax_pkg_swig.m4 and ax_pthread.m4.
+ - Fix configure, autoconf for #1048.
+
+15 April 2024: Yorgos
+ - Merge #1049 from Petr Menšík: Py_NoSiteFlag is not needed since
+ Python 3.8
+
+12 April 2024: Wouter
+ - Fix cachedb for serve-expired with serve-expired-client-timeout.
+ - Fixup unit test for cachedb server expired client timeout with
+ a check if response if from upstream or from cachedb.
+ - Fixup cachedb to not refetch when serve-expired-client-timeout is
+ used.
+
+10 April 2024: Wouter
+ - Implement cachedb-check-when-serve-expired: yes option, default
+ is enabled. When serve expired is enabled with cachedb, it first
+ checks cachedb before serving the expired response.
+ - Fixup compile without cachedb.
+ - Add test for cachedb serve expired.
+ - Extended test for cachedb serve expired.
+ - Fix makefile dependencies for fake_event.c.
+ - Fix cachedb for serve-expired with serve-expired-reply-ttl.
+ - Fix to not reply serve expired unless enabled for cachedb.
+
+9 April 2024: Yorgos
+ - Merge #1043 from xiaoxiaoafeifei: Add loongarch support; updates
+ config.guess(2024-01-01) and config.sub(2024-01-01), verified
+ with upstream.
+
+8 April 2024: Yorgos
+ - Fix #595: unbound-anchor cannot deal with full disk; it will now
+ first write out to a temp file before replacing the original one,
+ like Unbound already does for auto-trust-anchor-file.
+
+5 April 2024: Wouter
+ - Fix comment syntax for view function views_find_view.
+
+5 April 2024: Yorgos
+ - Merge #1027: Introduce 'cache-min-negative-ttl' option.
+
+3 April 2024: Wouter
+ - Fix #1040: fix heap-buffer-overflow issue in function cfg_mark_ports
+ of file util/config_file.c.
+ - For #1040: adjust error text and disallow negative ports in other
+ parts of cfg_mark_ports.
+
+3 April 2024: Yorgos
+ - Fix #1035: Potential Bug while parsing port from the "stub-host"
+ string; also affected forward-zones and remote-control host
+ directives.
+ - Fix #369: dnstap showing extra responses; for client responses
+ right from the cache when replying with expired data or
+ prefetching.
+
+28 March 2024: Wouter
+ - Fix #1034: DoT forward-zone via unbound-control.
+ - Fix for crypto related failures to have a better error string.
+
+27 March 2024: Wouter
+ - Fix name of unit test for subnet cache response.
+ - Fix #1032: The size of subnet_msg_cache calculation mistake cause
+ memory usage increased beyond expectations.
+ - Fix for #1032, add safeguard to make table space positive.
+ - Fix comment in lruhash space function.
+ - Fix to add unit test for lruhash space that exercises the routines.
+ - Fix that when the server truncates the pidfile, it does not follow
+ symbolic links.
+ - Fix that the server does not chown the pidfile.
+
+25 March 2024: Yorgos
+ - Merge #831 from Pierre4012: Improve Windows NSIS installer
+ script (setup.nsi).
+ - For #831: Format text, use exclamation icon and explicit label
+ names.
+
+19 March 2024: Wouter
+ - Fix rpz so that rpz CNAME can apply after rpz CNAME. And fix that
+ clientip and nsip can give a CNAME.
+ - Fix localdata and rpz localdata to match CNAME only if no direct
+ type match is available.
+
+18 March 2024: Wouter
+ - Fix that rpz CNAME content is limited to the max number of cnames.
+ - Fix rpz, it follows iterator CNAMEs for nsip and nsdname and sets
+ the reply query_info values, that is better for debug logging.
+ - Fix rpz that copies the cname override completely to the temp
+ region, so there are no references to the rpz region.
+ - Add rpz unit test for nsip action override.
+ - Fix rpz for qtype CNAME after nameserver trigger.
+
+15 March 2024: Yorgos
+ - Merge #1030: Persist the openssl and expat directories for repeated
+ Windows builds.
+
+15 March 2024: Wouter
+ - Fix that addrinfo is not kept around but copied and freed, so that
+ log-destaddr uses a copy of the information, much like NSD does.
+
+13 March 2024: Wouter
+ - Fix #1029: rpz trigger clientip and action rpz-passthru not working
+ as expected.
+ - Fix rpz that the rpz override is taken in case of clientip triggers.
+ Fix that the clientip passthru action is logged. Fix that the
+ clientip localdata action is logged. Fix rpz override action cname
+ for the clientip trigger.
+ - Fix to unify codepath for local alias for rpz cname action override.
+ - Fix rpz for cname override action after nsdname and nsip triggers.
+
+12 March 2024: Yorgos
+ - Merge #1028: Clearer documentation for tcp-idle-timeout and
+ edns-tcp-keepalive-timeout.
+
+11 March 2024: Wouter
+ - Fix #1021 Inconsistent Behavior with Changing rpz-cname-override
+ and doing a unbound-control reload.
+
8 March 2024: Wouter
- Fix unbound-control-setup.cmd to use 3072 bits so that certificates
- are long enough for newer OpenSSL versions.
- - Fix TTL of synthesized CNAME when a DNAME is used from cache.
+ are long enough for newer OpenSSL versions. This fix is included
+ in 1.19.3rc2.
+ - Fix TTL of synthesized CNAME when a DNAME is used from cache. This
+ fix is included in 1.19.3rc2.
+ - Remove unused portion from iter_dname_ttl unit test.
+ - Fix validator classification of qtype DNAME for positive and
+ redirection answers, and fix validator signature routine for dealing
+ with the synthesized CNAME for a DNAME without previously
+ encountering it and also for when the qtype is DNAME.
+ - Fix qname minimisation for reply with a DNAME for qtype CNAME that
+ answers it.
+ - Fix doc test so it ignores but outputs unsupported doxygen options.
- Fix unbound-control-setup.cmd to have CA v3 basicConstraints,
- like unbound-control-setup.sh has.
+ like unbound-control-setup.sh has. This fix is included in 1.19.3rc2.
+
+8 March 2024: Yorgos
+ - Update doc/unbound.doxygen with 'doxygen -u'. Fixes option
+ deprecation warnings and updates with newer defaults.
7 March 2024: Wouter
- Version set to 1.19.3 for release. After 1.19.2 point release with
security fix for CVE-2024-1931, Denial of service when trimming
EDE text on positive replies. The code repo includes the fix and
- is for version 1.19.3.
+ is for version 1.19.3. The code repo continues for version 1.19.4,
+ but 1.19.3 includes the fixes in 1.19.3rc2 as well.
5 March 2024: Wouter
- Fix for #1022: Fix ede prohibited in access control refused answers.
diff --git a/contrib/unbound/doc/README b/contrib/unbound/doc/README
index b92f649ef30f..5f81ad258835 100644
--- a/contrib/unbound/doc/README
+++ b/contrib/unbound/doc/README
@@ -1,4 +1,4 @@
-README for Unbound 1.19.3
+README for Unbound 1.20.0
Copyright 2007 NLnet Labs
http://unbound.net
diff --git a/contrib/unbound/doc/example.conf.in b/contrib/unbound/doc/example.conf.in
index d791cf8d4761..0368c8d87618 100644
--- a/contrib/unbound/doc/example.conf.in
+++ b/contrib/unbound/doc/example.conf.in
@@ -1,7 +1,7 @@
#
# Example configuration file.
#
-# See unbound.conf(5) man page, version 1.19.3.
+# See unbound.conf(5) man page, version 1.20.0.
#
# this is a comment.
@@ -191,6 +191,21 @@ server:
# are behind a slow satellite link, to eg. 1128.
# unknown-server-time-limit: 376
+ # msec before recursion replies are dropped. The work item continues.
+ # discard-timeout: 1900
+
+ # Max number of replies waiting for recursion per IP address.
+ # wait-limit: 1000
+
+ # Max replies waiting for recursion for IP address with cookie.
+ # wait-limit-cookie: 10000
+
+ # Apart from the default, the wait limit can be set for a netblock.
+ # wait-limit-netblock: 192.0.2.0/24 50000
+
+ # Apart from the default, the wait limit with cookie can be adjusted.
+ # wait-limit-cookie-netblock: 192.0.2.0/24 50000
+
# the amount of memory to use for the RRset cache.
# plain value in bytes or you can append k, m or G. default is "4Mb".
# rrset-cache-size: 4m
@@ -211,6 +226,11 @@ server:
# the time to live (TTL) value cap for negative responses in the cache
# cache-max-negative-ttl: 3600
+ # the time to live (TTL) value lower bound, in seconds. Default 0.
+ # For negative responses in the cache. If disabled, default,
+ # cache-min-tll applies if configured.
+ # cache-min-negative-ttl: 0
+
# the time to live (TTL) value for cached roundtrip times, lameness and
# EDNS version information for hosts. In seconds.
# infra-host-ttl: 900
@@ -283,7 +303,8 @@ server:
# Enable EDNS TCP keepalive option.
# edns-tcp-keepalive: no
- # Timeout for EDNS TCP keepalive, in msec.
+ # Timeout for EDNS TCP keepalive, in msec. Overrides tcp-idle-timeout
+ # if edns-tcp-keepalive is set.
# edns-tcp-keepalive-timeout: 120000
# UDP queries that have waited in the socket buffer for a long time
@@ -1247,6 +1268,9 @@ remote-control:
# secret-seed: "default"
# # if the backend should be read from, but not written to.
# cachedb-no-store: no
+# # if the cachedb should be checked before a serve-expired response is
+# # given, when serve-expired is enabled.
+# cachedb-check-when-serve-expired: yes
#
# # For "redis" backend:
# # (to enable, use --with-libhiredis to configure before compiling)
diff --git a/contrib/unbound/doc/libunbound.3.in b/contrib/unbound/doc/libunbound.3.in
index aeffa9516514..f1e62c81ab7a 100644
--- a/contrib/unbound/doc/libunbound.3.in
+++ b/contrib/unbound/doc/libunbound.3.in
@@ -1,4 +1,4 @@
-.TH "libunbound" "3" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "libunbound" "3" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" libunbound.3 -- unbound library functions manual
.\"
@@ -44,7 +44,7 @@
.B ub_ctx_zone_remove,
.B ub_ctx_data_add,
.B ub_ctx_data_remove
-\- Unbound DNS validating resolver 1.19.3 functions.
+\- Unbound DNS validating resolver 1.20.0 functions.
.SH "SYNOPSIS"
.B #include <unbound.h>
.LP
diff --git a/contrib/unbound/doc/unbound-anchor.8.in b/contrib/unbound/doc/unbound-anchor.8.in
index f372d58e278a..edab220a9598 100644
--- a/contrib/unbound/doc/unbound-anchor.8.in
+++ b/contrib/unbound/doc/unbound-anchor.8.in
@@ -1,4 +1,4 @@
-.TH "unbound-anchor" "8" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "unbound-anchor" "8" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" unbound-anchor.8 -- unbound anchor maintenance utility manual
.\"
diff --git a/contrib/unbound/doc/unbound-checkconf.8.in b/contrib/unbound/doc/unbound-checkconf.8.in
index cde6d5c7aef2..75a26e411b74 100644
--- a/contrib/unbound/doc/unbound-checkconf.8.in
+++ b/contrib/unbound/doc/unbound-checkconf.8.in
@@ -1,4 +1,4 @@
-.TH "unbound-checkconf" "8" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "unbound-checkconf" "8" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" unbound-checkconf.8 -- unbound configuration checker manual
.\"
@@ -14,6 +14,7 @@ unbound\-checkconf
.B unbound\-checkconf
.RB [ \-h ]
.RB [ \-f ]
+.RB [ \-q ]
.RB [ \-o
.IR option ]
.RI [ cfgfile ]
@@ -37,6 +38,9 @@ Print full pathname, with chroot applied to it. Use with the \-o option.
If given, after checking the config file the value of this option is
printed to stdout. For "" (disabled) options an empty line is printed.
.TP
+.B \-q
+Make the operation quiet, suppress output on success.
+.TP
.I cfgfile
The config file to read with settings for Unbound. It is checked.
If omitted, the config file at the default location is checked.
diff --git a/contrib/unbound/doc/unbound-control.8.in b/contrib/unbound/doc/unbound-control.8.in
index 4de6988ba0c0..251dde7642c0 100644
--- a/contrib/unbound/doc/unbound-control.8.in
+++ b/contrib/unbound/doc/unbound-control.8.in
@@ -1,4 +1,4 @@
-.TH "unbound-control" "8" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "unbound-control" "8" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" unbound-control.8 -- unbound remote control manual
.\"
@@ -239,22 +239,24 @@ still be bogus, use \fBflush_zone\fR to remove it), does not affect the config f
.B insecure_remove \fIzone
Removes domain\-insecure for the given zone.
.TP
-.B forward_add \fR[\fI+i\fR] \fIzone addr ...
+.B forward_add \fR[\fI+it\fR] \fIzone addr ...
Add a new forward zone to running Unbound. With +i option also adds a
\fIdomain\-insecure\fR for the zone (so it can resolve insecurely if you have
a DNSSEC root trust anchor configured for other names).
The addr can be IP4, IP6 or nameserver names, like \fIforward-zone\fR config
in unbound.conf.
+The +t option sets it to use tls upstream, like \fIforward\-tls\-upstream\fR: yes.
.TP
.B forward_remove \fR[\fI+i\fR] \fIzone
Remove a forward zone from running Unbound. The +i also removes a
\fIdomain\-insecure\fR for the zone.
.TP
-.B stub_add \fR[\fI+ip\fR] \fIzone addr ...
+.B stub_add \fR[\fI+ipt\fR] \fIzone addr ...
Add a new stub zone to running Unbound. With +i option also adds a
\fIdomain\-insecure\fR for the zone. With +p the stub zone is set to prime,
without it it is set to notprime. The addr can be IP4, IP6 or nameserver
names, like the \fIstub-zone\fR config in unbound.conf.
+The +t option sets it to use tls upstream, like \fIstub\-tls\-upstream\fR: yes.
.TP
.B stub_remove \fR[\fI+i\fR] \fIzone
Remove a stub zone from running Unbound. The +i also removes a
diff --git a/contrib/unbound/doc/unbound-host.1.in b/contrib/unbound/doc/unbound-host.1.in
index aacaa0e2eb31..6192480cd5ea 100644
--- a/contrib/unbound/doc/unbound-host.1.in
+++ b/contrib/unbound/doc/unbound-host.1.in
@@ -1,4 +1,4 @@
-.TH "unbound\-host" "1" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "unbound\-host" "1" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" unbound-host.1 -- unbound DNS lookup utility
.\"
diff --git a/contrib/unbound/doc/unbound.8.in b/contrib/unbound/doc/unbound.8.in
index 542c71e52486..749f5c99cc22 100644
--- a/contrib/unbound/doc/unbound.8.in
+++ b/contrib/unbound/doc/unbound.8.in
@@ -1,4 +1,4 @@
-.TH "unbound" "8" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "unbound" "8" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" unbound.8 -- unbound manual
.\"
@@ -9,7 +9,7 @@
.\"
.SH "NAME"
.B unbound
-\- Unbound DNS validating resolver 1.19.3.
+\- Unbound DNS validating resolver 1.20.0.
.SH "SYNOPSIS"
.B unbound
.RB [ \-h ]
diff --git a/contrib/unbound/doc/unbound.conf.5.in b/contrib/unbound/doc/unbound.conf.5.in
index d37451aa4539..764e2d78b5fe 100644
--- a/contrib/unbound/doc/unbound.conf.5.in
+++ b/contrib/unbound/doc/unbound.conf.5.in
@@ -1,4 +1,4 @@
-.TH "unbound.conf" "5" "Mar 14, 2024" "NLnet Labs" "unbound 1.19.3"
+.TH "unbound.conf" "5" "May 8, 2024" "NLnet Labs" "unbound 1.20.0"
.\"
.\" unbound.conf.5 -- unbound.conf manual
.\"
@@ -302,6 +302,36 @@ Increase this if you are behind a slow satellite link, to eg. 1128.
That would then avoid re\-querying every initial query because it times out.
Default is 376 msec.
.TP
+.B discard\-timeout: \fI<msec>
+The wait time in msec where recursion requests are dropped. This is
+to stop a large number of replies from accumulating. They receive
+no reply, the work item continues to recurse. It is nice to be a bit
+larger than serve\-expired\-client\-timeout if that is enabled.
+A value of 1900 msec is suggested. The value 0 disables it.
+Default 1900 msec.
+.TP
+.B wait\-limit: \fI<number>
+The number of replies that can wait for recursion, for an IP address.
+This makes a ratelimit per IP address of waiting replies for recursion.
+It stops very large amounts of queries waiting to be returned to one
+destination. The value 0 disables wait limits. Default is 1000.
+.TP
+.B wait\-limit\-cookie: \fI<number>
+The number of replies that can wait for recursion, for an IP address
+that sent the query with a valid DNS cookie. Since the cookie validates
+the client address, the limit can be higher. Default is 10000.
+.TP
+.B wait\-limit\-netblock: \fI<netblock> <number>
+The wait limit for the netblock. If not given the wait\-limit value is
+used. The most specific netblock is used to determine the limit. Useful for
+overriding the default for a specific, group or individual, server.
+The value -1 disables wait limits for the netblock.
+.TP
+.B wait\-limit\-cookie\-netblock: \fI<netblock> <number>
+The wait limit for the netblock, when the query has a DNS cookie.
+If not given, the wait\-limit\-cookie value is used.
+The value -1 disables wait limits for the netblock.
+.TP
.B so\-rcvbuf: \fI<number>
If not 0, then set the SO_RCVBUF socket option to get more buffer
space on UDP port 53 incoming queries. So that short spikes on busy
@@ -388,6 +418,15 @@ Time to live maximum for negative responses, these have a SOA in the
authority section that is limited in time. Default is 3600.
This applies to nxdomain and nodata answers.
.TP
+.B cache\-min\-negative\-ttl: \fI<seconds>
+Time to live minimum for negative responses, these have a SOA in the
+authority section that is limited in time.
+Default is 0 (disabled).
+If this is disabled and \fBcache-min-ttl\fR is configured, it will take effect
+instead.
+In that case you can set this to 1 to honor the upstream TTL.
+This applies to nxdomain and nodata answers.
+.TP
.B infra\-host\-ttl: \fI<seconds>
Time to live for entries in the host cache. The host cache contains
roundtrip timing, lameness and EDNS support information. Default is 900.
@@ -472,6 +511,8 @@ configured value if the number of free buffers falls below 35% of the
total number configured, and finally to 0 if the number of free buffers
falls below 20% of the total number configured. A minimum timeout of
200 milliseconds is observed regardless of the option value used.
+It will be overriden by \fBedns\-tcp\-keepalive\-timeout\fR if
+\fBedns\-tcp\-keepalive\fR is enabled.
.TP
.B tcp-reuse-timeout: \fI<msec>\fR
The period Unbound will keep TCP persistent connections open to
@@ -490,20 +531,11 @@ This option defaults to 3000 milliseconds.
Enable or disable EDNS TCP Keepalive. Default is no.
.TP
.B edns-tcp-keepalive-timeout: \fI<msec>\fR
-The period Unbound will wait for a query on a TCP connection when
-EDNS TCP Keepalive is active. If this timeout expires Unbound closes
-the connection. If the client supports the EDNS TCP Keepalive option,
+Overrides \fBtcp\-idle\-timeout\fR when \fBedns\-tcp\-keepalive\fR is enabled.
+If the client supports the EDNS TCP Keepalive option,
Unbound sends the timeout value to the client to encourage it to
close the connection before the server times out.
This option defaults to 120000 milliseconds.
-When the number of free incoming TCP buffers falls below 50% of
-the total number configured, the advertised timeout is progressively
-reduced to 1% of the configured value, then to 0.2% of the configured
-value if the number of free buffers falls below 35% of the total number
-configured, and finally to 0 if the number of free buffers falls below
-20% of the total number configured.
-A minimum actual timeout of 200 milliseconds is observed regardless of the
-advertised timeout.
.TP
.B sock\-queue\-timeout: \fI<sec>\fR
UDP queries that have waited in the socket buffer for a long time can be
@@ -2638,11 +2670,7 @@ If Unbound cannot even find an answer in the backend, it resolves the
query as usual, and stores the answer in the backend.
.P
This module interacts with the \fBserve\-expired\-*\fR options and will reply
-with expired data if Unbound is configured for that. Currently the use
-of \fBserve\-expired\-client\-timeout:\fR and
-\fBserve\-expired\-reply\-ttl:\fR is not consistent for data originating from
-the external cache as these will result in a reply with 0 TTL without trying to
-update the data first, ignoring the configured values.
+with expired data if Unbound is configured for that.
.P
If Unbound was built with
\fB\-\-with\-libhiredis\fR
@@ -2698,6 +2726,16 @@ This option defaults to "default".
If the backend should be read from, but not written to. This makes this
instance not store dns messages in the backend. But if data is available it
is retrieved. The default is no.
+.TP
+.B cachedb-check-when-serve-expired: \fI<yes or no>\fR
+If enabled, the cachedb is checked before an expired response is returned.
+When \fBserve\-expired\fR is enabled, without \fBserve\-expired\-client\-timeout\fR, it then
+does not immediately respond with an expired response from cache, but instead
+first checks the cachedb for valid contents, and if so returns it. If the
+cachedb also has no valid contents, the serve expired response is sent.
+If also \fBserve\-expired\-client\-timeout\fR is enabled, the expired response
+is delayed until the timeout expires. Unless the lookup succeeds within the
+timeout. The default is yes.
.P
The following
.B cachedb
diff --git a/contrib/unbound/doc/unbound.doxygen b/contrib/unbound/doc/unbound.doxygen
index 7222dbc274e9..996229118d73 100644
--- a/contrib/unbound/doc/unbound.doxygen
+++ b/contrib/unbound/doc/unbound.doxygen
@@ -1,96 +1,151 @@
-# Doxyfile 1.7.1
+# Doxyfile 1.9.7
# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
+# doxygen (www.doxygen.org) for a project.
#
-# All text after a hash (#) is considered a comment and will be ignored
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+#
+# Note:
+#
+# Use doxygen to compare the used configuration file with the template
+# configuration file:
+# doxygen -x [configFile]
+# Use doxygen to compare the used configuration file with the template
+# configuration file without replacing the environment variables or CMake type
+# replacement variables:
+# doxygen -x_noenv [configFile]
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
PROJECT_NAME = unbound
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
PROJECT_NUMBER = 0.1
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
+# sub-directories (in 2 levels) under the output directory of each output format
+# and will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to
+# control the number of sub-directories.
+# The default value is: NO.
CREATE_SUBDIRS = NO
+# Controls the number of sub-directories that will be created when
+# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
+# level increment doubles the number of directories, resulting in 4096
+# directories at level 8 which is the default and also the maximum value. The
+# sub-directories are organized in 2 levels, the first level always has a fixed
+# number of 16 directories.
+# Minimum value: 0, maximum value: 8, default value: 8.
+# This tag requires that the tag CREATE_SUBDIRS is set to YES.
+
+CREATE_SUBDIRS_LEVEL = 8
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,
+# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
+# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
+# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with
+# English messages), Korean, Korean-en (Korean with English messages), Latvian,
+# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,
+# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,
+# Swedish, Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
OUTPUT_LANGUAGE = English
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
+# The default value is: YES.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
ABBREVIATE_BRIEF =
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
+# doxygen will generate a detailed section even if there is only a brief
# description.
+# The default value is: NO.
ALWAYS_DETAILED_SEC = NO
@@ -98,521 +153,844 @@ ALWAYS_DETAILED_SEC = NO
# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
+# The default value is: NO.
INLINE_INHERITED_MEMB = NO
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
FULL_PATH_NAMES = YES
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
SHORT_NAMES = NO
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
JAVADOC_AUTOBRIEF = YES
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
QT_AUTOBRIEF = NO
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
MULTILINE_CPP_IS_BRIEF = NO
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+PYTHON_DOCSTRING = YES
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
INHERIT_DOCS = YES
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
SEPARATE_MEMBER_PAGES = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
TAB_SIZE = 8
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:^^"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". Note that you cannot put \n's in the value part of an alias
+# to insert newlines (in the resulting output). You can put ^^ in the value part
+# of an alias to insert a newline as if a physical newline was in the original
+# file. When you need a literal { or } or , in the value part of an alias you
+# have to escape them by means of a backslash (\), this can lead to conflicts
+# with the commands \{ and \} for these it is advised to use the version @{ and
+# @} or use a double escape (\\{ and \\})
ALIASES =
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
OPTIMIZE_OUTPUT_FOR_C = YES
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
OPTIMIZE_FOR_FORTRAN = NO
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
OPTIMIZE_OUTPUT_VHDL = NO
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
EXTENSION_MAPPING =
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 5
+
+# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to
+# generate identifiers for the Markdown headings. Note: Every identifier is
+# unique.
+# Possible values are: DOXYGEN Use a fixed 'autotoc_md' string followed by a
+# sequence number starting at 0. and GITHUB Use the lower case version of title
+# with any whitespace replaced by '-' and punctations characters removed..
+# The default value is: DOXYGEN.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+MARKDOWN_ID_STYLE = DOXYGEN
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
BUILTIN_STL_SUPPORT = NO
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
+# The default value is: NO.
CPP_CLI_SUPPORT = NO
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
SIP_SUPPORT = NO
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
+# The default value is: NO.
DISTRIBUTE_GROUP_DOC = NO
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
SUBGROUPING = YES
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-#SYMBOL_CACHE_SIZE = 0
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which effectively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+NUM_PROC_THREADS = 1
+
+# If the TIMESTAMP tag is set different from NO then each generated page will
+# contain the date or date and time when the page was generated. Setting this to
+# NO can help when comparing the output of multiple runs.
+# Possible values are: YES, NO, DATETIME and DATE.
+# The default value is: NO.
+
+TIMESTAMP = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
EXTRACT_ALL = NO
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
EXTRACT_PRIVATE = YES
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
EXTRACT_STATIC = YES
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
EXTRACT_LOCAL_METHODS = YES
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+RESOLVE_UNNAMED_PARAMS = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
HIDE_UNDOC_MEMBERS = NO
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# will also hide undocumented C++ concepts if enabled. This option has no effect
+# if EXTRACT_ALL is enabled.
+# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# declarations. If set to NO, these declarations will be included in the
# documentation.
+# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
+# Possible values are: SYSTEM, NO and YES.
+# The default value is: SYSTEM.
CASE_SENSE_NAMES = YES
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
+# will show which file needs to be included to use the class.
+# The default value is: YES.
+
+SHOW_HEADERFILE = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
SHOW_INCLUDE_FILES = YES
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
FORCE_LOCAL_INCLUDES = NO
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
SORT_MEMBER_DOCS = NO
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
SORT_BRIEF_DOCS = NO
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
SORT_MEMBERS_CTORS_1ST = NO
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
SORT_GROUP_NAMES = NO
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
SORT_BY_SCOPE_NAME = NO
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
GENERATE_DEPRECATEDLIST= YES
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
ENABLED_SECTIONS =
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
MAX_INITIALIZER_LINES = 30
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
SHOW_USED_FILES = YES
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-#SHOW_DIRECTORIES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
SHOW_FILES = YES
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
SHOW_NAMESPACES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file. See also section "Changing the
+# layout of pages" for information.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
LAYOUT_FILE =
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
WARN_IF_UNDOCUMENTED = NO
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as documenting some parameters in
+# a documented function twice, or documenting parameters that don't exist or
+# using markup commands wrongly.
+# The default value is: YES.
WARN_IF_DOC_ERROR = YES
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
+# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
+# function parameter documentation. If set to NO, doxygen will accept that some
+# parameters have no documentation without warning.
+# The default value is: YES.
+
+WARN_IF_INCOMPLETE_DOC = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong parameter
+# documentation, but not about the absence of documentation. If EXTRACT_ALL is
+# set to YES then this flag will automatically be disabled. See also
+# WARN_IF_INCOMPLETE_DOC
+# The default value is: NO.
WARN_NO_PARAMDOC = YES
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
+# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
+# undocumented enumeration values. If set to NO, doxygen will accept
+# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: NO.
+
+WARN_IF_UNDOC_ENUM_VAL = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves
+# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not
+# write the warning messages in between other messages but write them at the end
+# of a run, in case a WARN_LOGFILE is defined the warning messages will be
+# besides being in the defined file also be shown at the end of a run, unless
+# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case
+# the behavior will remain as with the setting FAIL_ON_WARNINGS.
+# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# See also: WARN_LINE_FORMAT
+# The default value is: $file:$line: $text.
WARN_FORMAT = "$file:$line: $text"
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
+# In the $text part of the WARN_FORMAT command it is possible that a reference
+# to a more specific place is given. To make it easier to jump to this place
+# (outside of doxygen) the user can define a custom "cut" / "paste" string.
+# Example:
+# WARN_LINE_FORMAT = "'vi $file +$line'"
+# See also: WARN_FORMAT
+# The default value is: at line $line of file $file.
+
+WARN_LINE_FORMAT = "at line $line of file $file"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr). In case the file specified cannot be opened for writing the
+# warning and error messages are written to standard error. When as file - is
+# specified the warning and error messages are written to standard output
+# (stdout).
WARN_LOGFILE =
#---------------------------------------------------------------------------
-# configuration options related to the input files
+# Configuration options related to the input files
#---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
INPUT = .
# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# See also: INPUT_FILE_ENCODING
+# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
+# character encoding on a per file pattern basis. Doxygen will compare the file
+# name with each pattern and apply the encoding instead of the default
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
+# "INPUT_ENCODING" for further information on supported encodings.
+
+INPUT_FILE_ENCODING =
+
# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
+# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
+# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
+# *.vhdl, *.ucf, *.qsf and *.ice.
FILE_PATTERNS =
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
RECURSIVE = YES
-# The EXCLUDE tag can be used to specify files and/or directories that should
+# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
EXCLUDE = ./build \
./compat \
- ./contrib \
+ ./contrib \
util/configparser.c \
util/configparser.h \
util/configlexer.c \
@@ -623,27 +1001,29 @@ EXCLUDE = ./build \
pythonmod/interface.h \
pythonmod/ubmodule-msg.py \
pythonmod/ubmodule-tst.py \
- unboundmodule.py \
+ unboundmodule.py \
libunbound/python/unbound.py \
libunbound/python/libunbound_wrap.c \
libunbound/python/doc \
libunbound/python/examples \
./ldns-src \
- README.md \
- doc/control_proto_spec.txt \
- doc/requirements.txt
+ README.md \
+ doc/control_proto_spec.txt \
+ doc/requirements.txt
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
+# The default value is: NO.
EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS =
@@ -651,694 +1031,1273 @@ EXCLUDE_PATTERNS =
# (namespaces, classes, functions, etc.) that should be excluded from the
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
+# ANamespace::AClass, ANamespace::*Test
EXCLUDE_SYMBOLS =
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
EXAMPLE_PATTERNS =
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that doxygen will use the data processed and written to standard output
+# for further processing, therefore nothing else, like debug statements or used
+# commands (so in case of a Windows batch file always use @echo OFF), should be
+# written to standard output.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
FILTER_SOURCE_FILES = NO
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+# The Fortran standard specifies that for fixed formatted Fortran code all
+# characters from position 72 are to be considered as comment. A common
+# extension is to allow longer lines before the automatic comment starts. The
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
+# be processed before the automatic comment starts.
+# Minimum value: 7, maximum value: 10000, default value: 72.
+
+FORTRAN_COMMENT_AFTER = 72
+
#---------------------------------------------------------------------------
-# configuration options related to source browsing
+# Configuration options related to source browsing
#---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
SOURCE_BROWSER = NO
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
INLINE_SOURCES = NO
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
STRIP_CODE_COMMENTS = YES
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
REFERENCED_BY_RELATION = YES
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
REFERENCES_RELATION = YES
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
REFERENCES_LINK_SOURCE = YES
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
USE_HTAGS = NO
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
VERBATIM_HEADERS = NO
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see:
+# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
+# performance. This can be particularly helpful with template rich C++ code for
+# which doxygen's built-in parser lacks the necessary type information.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS
+# tag is set to YES then doxygen will add the directory of each input to the
+# include path.
+# The default value is: YES.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_ADD_INC_PATHS = YES
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS =
+
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the directory containing a file called compile_commands.json. This
+# file is the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
+# options used when the source files were built. This is equivalent to
+# specifying the -p option to a clang tool, such as clang-check. These options
+# will then be passed to the parser. Any options specified with CLANG_OPTIONS
+# will be added as well.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH =
+
#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
ALPHABETICAL_INDEX = YES
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-#COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
+# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)
+# that should be ignored while generating the index headers. The IGNORE_PREFIX
+# tag works for classes, function and member names. The entity will be placed in
+# the alphabetical list under the first letter of the entity name that remains
+# after removing the prefix.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX =
#---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# Configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
GENERATE_HTML = YES
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = html
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FILE_EXTENSION = .html
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
-# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
-# documentation will contain the timesstamp.
-
-HTML_TIMESTAMP = NO
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET =
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-#HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-#HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-#HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-#HTML_ALIGN_MEMBERS = YES
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# Note: Since the styling of scrollbars can currently not be overruled in
+# Webkit/Chromium, the styling will be left out of the default doxygen.css if
+# one or more extra stylesheets have been specified. So if scrollbar
+# customization is desired it has to be added explicitly. For an example see the
+# documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
+# should be rendered with a dark or light theme.
+# Possible values are: LIGHT always generate light mode output, DARK always
+# generate dark mode output, AUTO_LIGHT automatically set the mode according to
+# the user preference, use light mode if no preference is set (the default),
+# AUTO_DARK automatically set the mode according to the user preference, use
+# dark mode if no preference is set and TOGGLE allow to user to switch between
+# light and dark mode via a button.
+# The default value is: AUTO_LIGHT.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE = AUTO_LIGHT
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a color-wheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use gray-scales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = YES
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_SECTIONS = NO
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_DOCSET = NO
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_FEEDNAME = "Doxygen generated docs"
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
+# This tag determines the URL of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDURL =
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
DOCSET_BUNDLE_ID = org.doxygen.Project
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
# the documentation publisher. This should be a reverse domain-name style
# string, e.g. com.mycompany.MyDocSet.documentation.
-
-#DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-#DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# on Windows. In the beginning of 2021 Microsoft took the original page, with
+# a.o. the download links, offline the HTML help workshop was already many years
+# in maintenance mode). You can download the HTML help workshop from the web
+# archives at Installation executable (see:
+# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
+# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the main .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
GENERATE_CHI = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING =
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
TOC_EXPAND = NO
+# The SITEMAP_URL tag is used to specify the full URL of the place where the
+# generated documentation will be placed on the server by the user during the
+# deployment of the documentation. The generated sitemap is called sitemap.xml
+# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL
+# is specified no sitemap is generated. For information about the sitemap
+# protocol see https://www.sitemaps.org
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SITEMAP_URL =
+
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_QHP = NO
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE =
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_NAMESPACE = org.doxygen.Project
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_VIRTUAL_FOLDER = doc
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME =
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION =
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_ECLIPSEHELP = NO
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
ECLIPSE_DOC_ID = org.doxygen.Project
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
DISABLE_INDEX = NO
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine tune the look of the index (see "Fine-tuning the output"). As an
+# example, the default style sheet generated by doxygen has an example that
+# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
+# Since the tree basically has the same information as the tab index, you could
+# consider setting DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_TREEVIEW = NO
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
+# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
+# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
+# area (value NO) or if it should extend to the full height of the window (value
+# YES). Setting this to YES gives a layout similar to
+# https://docs.readthedocs.io with more room for contents, but less room for the
+# project logo, title, and description. If either GENERATE_TREEVIEW or
+# DISABLE_INDEX is set to NO, this option has no effect.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FULL_SIDEBAR = NO
-#USE_INLINE_TREES = NO
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
TREEVIEW_WIDTH = 250
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
-#EXT_LINKS_IN_WINDOW = NO
+EXT_LINKS_IN_WINDOW = NO
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
+# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
+# addresses.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
-FORMULA_FONTSIZE = 10
+OBFUSCATE_EMAILS = YES
+
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FORMULA_FORMAT = png
-# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
-#FORMULA_TRANSPARENT = YES
+FORMULA_FONTSIZE = 10
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE =
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
+# Note that the different versions of MathJax have different requirements with
+# regards to the different settings, so it is possible that also other MathJax
+# settings have to be changed when switching between the different MathJax
+# versions.
+# Possible values are: MathJax_2 and MathJax_3.
+# The default value is: MathJax_2.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_VERSION = MathJax_2
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. For more details about the output format see MathJax
+# version 2 (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
+# (see:
+# http://docs.mathjax.org/en/latest/web/components/output.html).
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility. This is the name for Mathjax version 2, for MathJax version 3
+# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
+# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
+# is the name for Mathjax version 3, for MathJax version 2 this will be
+# translated into HTML-CSS) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment. The default value is:
+# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
+# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH =
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# for MathJax version 2 (see
+# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# For example for MathJax version 3 (see
+# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
+# MATHJAX_EXTENSIONS = ams
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
+# implemented using a web server instead of a web client using JavaScript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
SERVER_BASED_SEARCH = NO
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
+# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
GENERATE_LATEX = NO
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_CMD_NAME = latex
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
-COMPACT_LATEX = NO
+LATEX_MAKEINDEX_CMD = makeindex
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
-#PAPER_TYPE = a4wide
+COMPACT_LATEX = NO
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
EXTRA_PACKAGES =
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
+# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
+# the generated LaTeX document. The header should contain everything until the
+# first chapter. If it is left blank doxygen will generate a standard header. It
+# is highly recommended to start with a default header using
+# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
+# and then modify the file new_header.tex. See also section "Doxygen usage" for
+# information on how to generate the default header that doxygen normally uses.
+#
+# Note: Only use a user-defined header if you know what you are doing!
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. The following
+# commands have a special meaning inside the header (and footer): For a
+# description of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HEADER =
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
+# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
+# the generated LaTeX document. The footer should contain everything after the
+# last chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer. See also section "Doxygen
+# usage" for information on how to generate the default footer that doxygen
+# normally uses. Note: Only use a user-defined footer if you know what you are
+# doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
PDF_HYPERLINKS = NO
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
USE_PDFLATEX = NO
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
+# The LATEX_BATCHMODE tag ignals the behavior of LaTeX in case of an error.
+# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch
+# mode nothing is printed on the terminal, errors are scrolled as if <return> is
+# hit at every error; missing files that TeX tries to input or request from
+# keyboard input (\read on a not open input stream) cause the job to abort,
+# NON_STOP In nonstop mode the diagnostic message will appear on the terminal,
+# but there is no possibility of user interaction just like in batch mode,
+# SCROLL In scroll mode, TeX will stop only for missing files to input or if
+# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at
+# each error, asking for user intervention.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_BATCHMODE = NO
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HIDE_INDICES = NO
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_SOURCE_CODE = NO
+LATEX_BIB_STYLE = plain
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
-# configuration options related to the RTF output
+# Configuration options related to the RTF output
#---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
GENERATE_RTF = NO
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_OUTPUT = rtf
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
COMPACT_RTF = NO
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
+# configuration file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_STYLESHEET_FILE =
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
-# configuration options related to the man page output
+# Configuration options related to the man page output
#---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
GENERATE_MAN = NO
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_OUTPUT = man
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_EXTENSION = .3
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_LINKS = NO
#---------------------------------------------------------------------------
-# configuration options related to the XML output
+# Configuration options related to the XML output
#---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
GENERATE_XML = YES
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
-#XML_SCHEMA =
+XML_PROGRAMLISTING = YES
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
-#XML_DTD =
+XML_NS_MEMB_FILE_SCOPE = NO
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
-XML_PROGRAMLISTING = YES
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
+# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
+# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_PRETTY = YES
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_MAKEVAR_PREFIX =
@@ -1346,311 +2305,473 @@ PERLMOD_MAKEVAR_PREFIX =
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = YES
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = YES
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SEARCH_INCLUDES = YES
# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
+# contain include files that are not input files but should be processed by the
+# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of
+# RECURSIVE has no effect here.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
INCLUDE_FILE_PATTERNS = *.h
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = DOXYGEN
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_AS_DEFINED = ATTR_UNUSED
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration options related to external references
#---------------------------------------------------------------------------
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
-#
# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
TAGFILES =
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
ALLEXTERNALS = NO
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
EXTERNAL_GROUPS = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
-#PERL_PATH = /usr/bin/perl
+EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to diagram generator tools
#---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-#MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
+# available from the path. This tool is part of Graphviz (see:
+# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
HAVE_DOT = NO
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-#DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-#DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
+# subgraphs. When you want a differently looking font in the dot files that
+# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
+# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
+# Edge and Graph Attributes specification</a> You need to make sure dot is able
+# to find the font, which can be done by putting it in a standard location or by
+# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font. Default graphviz fontsize is 14.
+# The default value is: fontname=Helvetica,fontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
+
+# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
+# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
+# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
+# arrows shapes.</a>
+# The default value is: labelfontname=Helvetica,labelfontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
+
+# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
+# around nodes set 'shape=plain' or 'shape=plaintext' <a
+# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
+# The default value is: shape=box,height=0.2,width=0.4.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
+
+# You can set the path where dot can find font specified with fontname in
+# DOT_COMMON_ATTR and others dot attributes.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTPATH =
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
+# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then doxygen will
+# generate a graph for each documented class showing the direct and indirect
+# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and
+# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case
+# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the
+# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used.
+# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance
+# relations will be shown as texts / links.
+# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN.
+# The default value is: YES.
CLASS_GRAPH = YES
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
COLLABORATION_GRAPH = YES
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies. See also the chapter Grouping
+# in the manual.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
GROUP_GRAPHS = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
UML_LOOK = NO
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
+# tag is set to YES, doxygen will add type and arguments for attributes and
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
+# will not generate fields with class member information in the UML graphs. The
+# class diagrams will look similar to the default class diagrams but using UML
+# notation for the relationships.
+# Possible values are: NO, YES and NONE.
+# The default value is: NO.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+DOT_UML_DETAILS = NO
+
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
+# to display on a single line. If the actual line length exceeds this threshold
+# significantly it will wrapped across multiple lines. Some heuristics are apply
+# to avoid ugly line breaks.
+# Minimum value: 0, maximum value: 1000, default value: 17.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_WRAP_THRESHOLD = 17
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
TEMPLATE_RELATIONS = NO
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
INCLUDE_GRAPH = YES
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
INCLUDED_BY_GRAPH = YES
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
CALL_GRAPH = NO
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
CALLER_GRAPH = NO
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
GRAPHICAL_HIERARCHY = YES
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
DIRECTORY_GRAPH = YES
+# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
+# of child directories generated in directory dependency graphs by dot.
+# Minimum value: 1, maximum value: 25, default value: 1.
+# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
+
+DIR_GRAPH_MAX_DEPTH = 1
+
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# https://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = png
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_PATH =
# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
DOTFILE_DIRS =
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file or to the filename of jar file
+# to be used. If left blank, it is assumed PlantUML is not used or called during
+# a preprocessing step. Doxygen will generate a warning when it encounters a
+# \startuml command in this case and will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_GRAPH_MAX_NODES = 50
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
MAX_DOT_GRAPH_DEPTH = 0
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
DOT_MULTI_TARGETS = NO
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal
+# graphical representation for inheritance and collaboration diagrams is used.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
+# files that are used to generate the various graphs.
+#
+# Note: This setting is not only used for dot files but also for msc temporary
+# files.
+# The default value is: YES.
DOT_CLEANUP = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. If the MSCGEN_TOOL tag is left empty (the default), then doxygen will
+# use a built-in version of mscgen tool to produce the charts. Alternatively,
+# the MSCGEN_TOOL tag can also specify the name an external tool. For instance,
+# specifying prog as the value, doxygen will call the tool as prog -T
+# <outfile_format> -o <outputfile> <inputfile>. The external tool should support
+# output file formats "png", "eps", "svg", and "ismap".
+
+MSCGEN_TOOL =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
diff --git a/contrib/unbound/edns-subnet/subnetmod.c b/contrib/unbound/edns-subnet/subnetmod.c
index cefde84e5f4c..1dff429ac8ae 100644
--- a/contrib/unbound/edns-subnet/subnetmod.c
+++ b/contrib/unbound/edns-subnet/subnetmod.c
@@ -57,6 +57,9 @@
#include "sldns/sbuffer.h"
#include "sldns/wire2str.h"
#include "iterator/iter_utils.h"
+#ifdef USE_CACHEDB
+#include "cachedb/cachedb.h"
+#endif
/** externally called */
void
@@ -152,7 +155,7 @@ int ecs_whitelist_check(struct query_info* qinfo,
/* Cache by default, might be disabled after parsing EDNS option
* received from nameserver. */
- if(!iter_stub_fwd_no_cache(qstate, &qstate->qinfo, NULL, NULL)) {
+ if(!iter_stub_fwd_no_cache(qstate, &qstate->qinfo, NULL, NULL, NULL, 0)) {
qstate->no_cache_store = 0;
}
@@ -310,9 +313,18 @@ delfunc(void *envptr, void *elemptr) {
static size_t
sizefunc(void *elemptr) {
struct reply_info *elem = (struct reply_info *)elemptr;
- return sizeof (struct reply_info) - sizeof (struct rrset_ref)
+ size_t s = sizeof (struct reply_info) - sizeof (struct rrset_ref)
+ elem->rrset_count * sizeof (struct rrset_ref)
+ elem->rrset_count * sizeof (struct ub_packed_rrset_key *);
+ size_t i;
+ for (i = 0; i < elem->rrset_count; i++) {
+ struct ub_packed_rrset_key *key = elem->rrsets[i];
+ struct packed_rrset_data *data = key->entry.data;
+ s += ub_rrset_sizefunc(key, data);
+ }
+ if(elem->reason_bogus_str)
+ s += strlen(elem->reason_bogus_str)+1;
+ return s;
}
/**
@@ -352,7 +364,7 @@ update_cache(struct module_qstate *qstate, int id)
struct slabhash *subnet_msg_cache = sne->subnet_msg_cache;
struct ecs_data *edns = &sq->ecs_client_in;
size_t i;
- int only_match_scope_zero;
+ int only_match_scope_zero, diff_size;
/* We already calculated hash upon lookup (lookup_and_reply) if we were
* allowed to look in the ECS cache */
@@ -412,19 +424,25 @@ update_cache(struct module_qstate *qstate, int id)
rep->ref[i].id = rep->rrsets[i]->id;
}
reply_info_set_ttls(rep, *qstate->env->now);
+ reply_info_sortref(rep);
rep->flags |= (BIT_RA | BIT_QR); /* fix flags to be sensible for */
rep->flags &= ~(BIT_AA | BIT_CD);/* a reply based on the cache */
if(edns->subnet_source_mask == 0 && edns->subnet_scope_mask == 0)
only_match_scope_zero = 1;
else only_match_scope_zero = 0;
+ diff_size = (int)tree->size_bytes;
addrtree_insert(tree, (addrkey_t*)edns->subnet_addr,
edns->subnet_source_mask, sq->max_scope, rep,
rep->ttl, *qstate->env->now, only_match_scope_zero);
+ diff_size = (int)tree->size_bytes - diff_size;
lock_rw_unlock(&lru_entry->lock);
if (need_to_insert) {
slabhash_insert(subnet_msg_cache, h, lru_entry, lru_entry->data,
NULL);
+ } else {
+ slabhash_update_space_used(subnet_msg_cache, h, NULL,
+ diff_size);
}
}
@@ -587,7 +605,21 @@ eval_response(struct module_qstate *qstate, int id, struct subnet_qstate *sq)
}
sne->num_msg_nocache++;
lock_rw_unlock(&sne->biglock);
-
+
+ /* If there is an expired answer in the global cache, remove that,
+ * because expired answers would otherwise resurface once the ecs data
+ * expires, giving once in a while global data responses for ecs
+ * domains, with serve expired enabled. */
+ if(qstate->env->cfg->serve_expired) {
+ msg_cache_remove(qstate->env, qstate->qinfo.qname,
+ qstate->qinfo.qname_len, qstate->qinfo.qtype,
+ qstate->qinfo.qclass, 0);
+#ifdef USE_CACHEDB
+ if(qstate->env->cachedb_enabled)
+ cachedb_msg_remove(qstate);
+#endif
+ }
+
if (sq->subnet_downstream) {
/* Client wants to see the answer, echo option back
* and adjust the scope. */
diff --git a/contrib/unbound/iterator/iter_fwd.c b/contrib/unbound/iterator/iter_fwd.c
index c4b2411297e3..b9d42553a8b2 100644
--- a/contrib/unbound/iterator/iter_fwd.c
+++ b/contrib/unbound/iterator/iter_fwd.c
@@ -71,6 +71,7 @@ forwards_create(void)
sizeof(struct iter_forwards));
if(!fwd)
return NULL;
+ lock_rw_init(&fwd->lock);
return fwd;
}
@@ -100,6 +101,7 @@ forwards_delete(struct iter_forwards* fwd)
{
if(!fwd)
return;
+ lock_rw_destroy(&fwd->lock);
fwd_del_tree(fwd);
free(fwd);
}
@@ -332,45 +334,64 @@ make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
int
forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
{
+ if(fwd->tree) {
+ lock_unprotect(&fwd->lock, fwd->tree);
+ }
fwd_del_tree(fwd);
fwd->tree = rbtree_create(fwd_cmp);
if(!fwd->tree)
return 0;
+ lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
+ lock_rw_wrlock(&fwd->lock);
/* read forward zones */
- if(!read_forwards(fwd, cfg))
+ if(!read_forwards(fwd, cfg)) {
+ lock_rw_unlock(&fwd->lock);
return 0;
- if(!make_stub_holes(fwd, cfg))
+ }
+ if(!make_stub_holes(fwd, cfg)) {
+ lock_rw_unlock(&fwd->lock);
return 0;
+ }
fwd_init_parents(fwd);
+ lock_rw_unlock(&fwd->lock);
return 1;
}
struct delegpt*
-forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
+forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
+ int nolock)
{
- rbnode_type* res = NULL;
+ struct iter_forward_zone* res;
struct iter_forward_zone key;
+ int has_dp;
key.node.key = &key;
key.dclass = qclass;
key.name = qname;
key.namelabs = dname_count_size_labels(qname, &key.namelen);
- res = rbtree_search(fwd->tree, &key);
- if(res) return ((struct iter_forward_zone*)res)->dp;
- return NULL;
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_rdlock(&fwd->lock); }
+ res = (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
+ has_dp = res && res->dp;
+ if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
+ return has_dp?res->dp:NULL;
}
struct delegpt*
-forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
+forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
+ int nolock)
{
/* lookup the forward zone in the tree */
rbnode_type* res = NULL;
struct iter_forward_zone *result;
struct iter_forward_zone key;
+ int has_dp;
key.node.key = &key;
key.dclass = qclass;
key.name = qname;
key.namelabs = dname_count_size_labels(qname, &key.namelen);
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_rdlock(&fwd->lock); }
if(rbtree_find_less_equal(fwd->tree, &key, &res)) {
/* exact */
result = (struct iter_forward_zone*)res;
@@ -378,8 +399,10 @@ forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
/* smaller element (or no element) */
int m;
result = (struct iter_forward_zone*)res;
- if(!result || result->dclass != qclass)
+ if(!result || result->dclass != qclass) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return NULL;
+ }
/* count number of labels matched */
(void)dname_lab_cmp(result->name, result->namelabs, key.name,
key.namelabs, &m);
@@ -389,20 +412,22 @@ forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
result = result->parent;
}
}
- if(result)
- return result->dp;
- return NULL;
+ has_dp = result && result->dp;
+ if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
+ return has_dp?result->dp:NULL;
}
struct delegpt*
-forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass)
+forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass, int nolock)
{
uint8_t root = 0;
- return forwards_lookup(fwd, &root, qclass);
+ return forwards_lookup(fwd, &root, qclass, nolock);
}
-int
-forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass)
+/* Finds next root item in forwards lookup tree.
+ * Caller needs to handle locking of the forwards structure. */
+static int
+next_root_locked(struct iter_forwards* fwd, uint16_t* dclass)
{
struct iter_forward_zone key;
rbnode_type* n;
@@ -419,7 +444,7 @@ forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass)
}
/* root not first item? search for higher items */
*dclass = p->dclass + 1;
- return forwards_next_root(fwd, dclass);
+ return next_root_locked(fwd, dclass);
}
/* find class n in tree, we may get a direct hit, or if we don't
* this is the last item of the previous class so rbtree_next() takes
@@ -447,10 +472,21 @@ forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass)
}
/* not a root node, return next higher item */
*dclass = p->dclass+1;
- return forwards_next_root(fwd, dclass);
+ return next_root_locked(fwd, dclass);
}
}
+int
+forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass, int nolock)
+{
+ int ret;
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_rdlock(&fwd->lock); }
+ ret = next_root_locked(fwd, dclass);
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
+ return ret;
+}
+
size_t
forwards_get_mem(struct iter_forwards* fwd)
{
@@ -458,10 +494,12 @@ forwards_get_mem(struct iter_forwards* fwd)
size_t s;
if(!fwd)
return 0;
+ lock_rw_rdlock(&fwd->lock);
s = sizeof(*fwd) + sizeof(*fwd->tree);
RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
s += sizeof(*p) + p->namelen + delegpt_get_mem(p->dp);
}
+ lock_rw_unlock(&fwd->lock);
return s;
}
@@ -477,49 +515,78 @@ fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
}
int
-forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
+forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
+ int nolock)
{
struct iter_forward_zone *z;
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_wrlock(&fwd->lock); }
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
(void)rbtree_delete(fwd->tree, &z->node);
fwd_zone_free(z);
}
- if(!forwards_insert(fwd, c, dp))
+ if(!forwards_insert(fwd, c, dp)) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return 0;
+ }
fwd_init_parents(fwd);
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return 1;
}
void
-forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
+forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
+ int nolock)
{
struct iter_forward_zone *z;
- if(!(z=fwd_zone_find(fwd, c, nm)))
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_wrlock(&fwd->lock); }
+ if(!(z=fwd_zone_find(fwd, c, nm))) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return; /* nothing to do */
+ }
(void)rbtree_delete(fwd->tree, &z->node);
fwd_zone_free(z);
fwd_init_parents(fwd);
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
}
int
-forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
+forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
+ int nolock)
{
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_wrlock(&fwd->lock); }
+ if(fwd_zone_find(fwd, c, nm) != NULL) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
+ return 1; /* already a stub zone there */
+ }
if(!fwd_add_stub_hole(fwd, c, nm)) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return 0;
}
fwd_init_parents(fwd);
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return 1;
}
void
-forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
+forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
+ uint8_t* nm, int nolock)
{
struct iter_forward_zone *z;
- if(!(z=fwd_zone_find(fwd, c, nm)))
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_wrlock(&fwd->lock); }
+ if(!(z=fwd_zone_find(fwd, c, nm))) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return; /* nothing to do */
- if(z->dp != NULL)
+ }
+ if(z->dp != NULL) {
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
return; /* not a stub hole */
+ }
(void)rbtree_delete(fwd->tree, &z->node);
fwd_zone_free(z);
fwd_init_parents(fwd);
+ if(!nolock) { lock_rw_unlock(&fwd->lock); }
}
diff --git a/contrib/unbound/iterator/iter_fwd.h b/contrib/unbound/iterator/iter_fwd.h
index e90b74c16a5d..4527d899c793 100644
--- a/contrib/unbound/iterator/iter_fwd.h
+++ b/contrib/unbound/iterator/iter_fwd.h
@@ -43,6 +43,7 @@
#ifndef ITERATOR_ITER_FWD_H
#define ITERATOR_ITER_FWD_H
#include "util/rbtree.h"
+#include "util/locks.h"
struct config_file;
struct delegpt;
@@ -50,6 +51,11 @@ struct delegpt;
* Iterator forward zones structure
*/
struct iter_forwards {
+ /** lock on the forwards tree.
+ * When grabbing both this lock and the anchors.lock, this lock
+ * is grabbed first. When grabbing both this lock and the hints.lock
+ * this lock is grabbed first. */
+ lock_rw_type lock;
/**
* Zones are stored in this tree. Sort order is specially chosen.
* first sorted on qclass. Then on dname in nsec-like order, so that
@@ -106,47 +112,65 @@ int forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg);
/**
* Find forward zone exactly by name
+ * The return value is contents of the forwards structure.
+ * Caller should lock and unlock a readlock on the forwards structure if nolock
+ * is set.
+ * Otherwise caller should unlock the readlock on the forwards structure if a
+ * value was returned.
* @param fwd: forward storage.
* @param qname: The qname of the query.
* @param qclass: The qclass of the query.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return: A delegation point or null.
*/
struct delegpt* forwards_find(struct iter_forwards* fwd, uint8_t* qname,
- uint16_t qclass);
+ uint16_t qclass, int nolock);
/**
* Find forward zone information
* For this qname/qclass find forward zone information, returns delegation
* point with server names and addresses, or NULL if no forwarding is needed.
+ * The return value is contents of the forwards structure.
+ * Caller should lock and unlock a readlock on the forwards structure if nolock
+ * is set.
+ * Otherwise caller should unlock the readlock on the forwards structure if a
+ * value was returned.
*
* @param fwd: forward storage.
* @param qname: The qname of the query.
* @param qclass: The qclass of the query.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return: A delegation point if the query has to be forwarded to that list,
* otherwise null.
*/
-struct delegpt* forwards_lookup(struct iter_forwards* fwd,
- uint8_t* qname, uint16_t qclass);
+struct delegpt* forwards_lookup(struct iter_forwards* fwd,
+ uint8_t* qname, uint16_t qclass, int nolock);
/**
* Same as forwards_lookup, but for the root only
* @param fwd: forward storage.
* @param qclass: The qclass of the query.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return: A delegation point if root forward exists, otherwise null.
*/
-struct delegpt* forwards_lookup_root(struct iter_forwards* fwd,
- uint16_t qclass);
+struct delegpt* forwards_lookup_root(struct iter_forwards* fwd,
+ uint16_t qclass, int nolock);
/**
* Find next root item in forwards lookup tree.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a readlock on the forwards structure.
* @param fwd: the forward storage
* @param qclass: class to look at next, or higher.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return false if none found, or if true stored in qclass.
*/
-int forwards_next_root(struct iter_forwards* fwd, uint16_t* qclass);
+int forwards_next_root(struct iter_forwards* fwd, uint16_t* qclass,
+ int nolock);
/**
* Get memory in use by forward storage
+ * Locks and unlocks the structure.
* @param fwd: forward storage.
* @return bytes in use
*/
@@ -158,42 +182,56 @@ int fwd_cmp(const void* k1, const void* k2);
/**
* Add zone to forward structure. For external use since it recalcs
* the tree parents.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a writelock on the forwards structure.
* @param fwd: the forward data structure
* @param c: class of zone
* @param dp: delegation point with name and target nameservers for new
* forward zone. malloced.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return false on failure (out of memory);
*/
-int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
- struct delegpt* dp);
+int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
+ struct delegpt* dp, int nolock);
/**
* Remove zone from forward structure. For external use since it
* recalcs the tree parents.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a writelock on the forwards structure.
* @param fwd: the forward data structure
* @param c: class of zone
* @param nm: name of zone (in uncompressed wireformat).
+ * @param nolock: Skip locking, locking is handled by the caller.
*/
-void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm);
+void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c,
+ uint8_t* nm, int nolock);
/**
* Add stub hole (empty entry in forward table, that makes resolution skip
* a forward-zone because the stub zone should override the forward zone).
* Does not add one if not necessary.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a writelock on the forwards structure.
* @param fwd: the forward data structure
* @param c: class of zone
* @param nm: name of zone (in uncompressed wireformat).
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return false on failure (out of memory);
*/
-int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm);
+int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c,
+ uint8_t* nm, int nolock);
/**
* Remove stub hole, if one exists.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a writelock on the forwards structure.
* @param fwd: the forward data structure
* @param c: class of zone
* @param nm: name of zone (in uncompressed wireformat).
+ * @param nolock: Skip locking, locking is handled by the caller.
*/
void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
- uint8_t* nm);
+ uint8_t* nm, int nolock);
#endif /* ITERATOR_ITER_FWD_H */
diff --git a/contrib/unbound/iterator/iter_hints.c b/contrib/unbound/iterator/iter_hints.c
index 4f86f3676a29..8b168271c7f0 100644
--- a/contrib/unbound/iterator/iter_hints.c
+++ b/contrib/unbound/iterator/iter_hints.c
@@ -57,6 +57,8 @@ hints_create(void)
sizeof(struct iter_hints));
if(!hints)
return NULL;
+ lock_rw_init(&hints->lock);
+ lock_protect(&hints->lock, &hints->tree, sizeof(hints->tree));
return hints;
}
@@ -83,6 +85,7 @@ hints_delete(struct iter_hints* hints)
{
if(!hints)
return;
+ lock_rw_destroy(&hints->lock);
hints_del_tree(hints);
free(hints);
}
@@ -438,47 +441,70 @@ read_root_hints_list(struct iter_hints* hints, struct config_file* cfg)
int
hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg)
{
+ int nolock = 1;
+ lock_rw_wrlock(&hints->lock);
hints_del_tree(hints);
name_tree_init(&hints->tree);
-
+
/* read root hints */
- if(!read_root_hints_list(hints, cfg))
+ if(!read_root_hints_list(hints, cfg)) {
+ lock_rw_unlock(&hints->lock);
return 0;
+ }
/* read stub hints */
- if(!read_stubs(hints, cfg))
+ if(!read_stubs(hints, cfg)) {
+ lock_rw_unlock(&hints->lock);
return 0;
+ }
/* use fallback compiletime root hints */
- if(!hints_lookup_root(hints, LDNS_RR_CLASS_IN)) {
+ if(!hints_find_root(hints, LDNS_RR_CLASS_IN, nolock)) {
struct delegpt* dp = compile_time_root_prime(cfg->do_ip4,
cfg->do_ip6);
verbose(VERB_ALGO, "no config, using builtin root hints.");
- if(!dp)
+ if(!dp) {
+ lock_rw_unlock(&hints->lock);
return 0;
- if(!hints_insert(hints, LDNS_RR_CLASS_IN, dp, 0))
+ }
+ if(!hints_insert(hints, LDNS_RR_CLASS_IN, dp, 0)) {
+ lock_rw_unlock(&hints->lock);
return 0;
+ }
}
name_tree_init_parents(&hints->tree);
+ lock_rw_unlock(&hints->lock);
return 1;
}
-struct delegpt*
-hints_lookup_root(struct iter_hints* hints, uint16_t qclass)
+struct delegpt*
+hints_find(struct iter_hints* hints, uint8_t* qname, uint16_t qclass,
+ int nolock)
{
- uint8_t rootlab = 0;
struct iter_hints_stub *stub;
+ size_t len;
+ int has_dp;
+ int labs = dname_count_size_labels(qname, &len);
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_rdlock(&hints->lock); }
stub = (struct iter_hints_stub*)name_tree_find(&hints->tree,
- &rootlab, 1, 1, qclass);
- if(!stub)
- return NULL;
- return stub->dp;
+ qname, len, labs, qclass);
+ has_dp = stub && stub->dp;
+ if(!has_dp && !nolock) { lock_rw_unlock(&hints->lock); }
+ return has_dp?stub->dp:NULL;
+}
+
+struct delegpt*
+hints_find_root(struct iter_hints* hints, uint16_t qclass, int nolock)
+{
+ uint8_t rootlab = 0;
+ return hints_find(hints, &rootlab, qclass, nolock);
}
struct iter_hints_stub*
-hints_lookup_stub(struct iter_hints* hints, uint8_t* qname,
- uint16_t qclass, struct delegpt* cache_dp)
+hints_lookup_stub(struct iter_hints* hints, uint8_t* qname,
+ uint16_t qclass, struct delegpt* cache_dp, int nolock)
{
size_t len;
int labs;
@@ -486,14 +512,20 @@ hints_lookup_stub(struct iter_hints* hints, uint8_t* qname,
/* first lookup the stub */
labs = dname_count_size_labels(qname, &len);
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_rdlock(&hints->lock); }
r = (struct iter_hints_stub*)name_tree_lookup(&hints->tree, qname,
len, labs, qclass);
- if(!r) return NULL;
+ if(!r) {
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
+ return NULL;
+ }
/* If there is no cache (root prime situation) */
if(cache_dp == NULL) {
if(r->dp->namelabs != 1)
return r; /* no cache dp, use any non-root stub */
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
return NULL;
}
@@ -510,12 +542,18 @@ hints_lookup_stub(struct iter_hints* hints, uint8_t* qname,
if(dname_strict_subdomain(r->dp->name, r->dp->namelabs,
cache_dp->name, cache_dp->namelabs))
return r; /* need to prime this stub */
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
return NULL;
}
-int hints_next_root(struct iter_hints* hints, uint16_t* qclass)
+int hints_next_root(struct iter_hints* hints, uint16_t* qclass, int nolock)
{
- return name_tree_next_root(&hints->tree, qclass);
+ int ret;
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_rdlock(&hints->lock); }
+ ret = name_tree_next_root(&hints->tree, qclass);
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
+ return ret;
}
size_t
@@ -524,39 +562,52 @@ hints_get_mem(struct iter_hints* hints)
size_t s;
struct iter_hints_stub* p;
if(!hints) return 0;
+ lock_rw_rdlock(&hints->lock);
s = sizeof(*hints);
RBTREE_FOR(p, struct iter_hints_stub*, &hints->tree) {
s += sizeof(*p) + delegpt_get_mem(p->dp);
}
+ lock_rw_unlock(&hints->lock);
return s;
}
int
hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
- int noprime)
+ int noprime, int nolock)
{
struct iter_hints_stub *z;
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_wrlock(&hints->lock); }
if((z=(struct iter_hints_stub*)name_tree_find(&hints->tree,
dp->name, dp->namelen, dp->namelabs, c)) != NULL) {
(void)rbtree_delete(&hints->tree, &z->node);
hints_stub_free(z);
}
- if(!hints_insert(hints, c, dp, noprime))
+ if(!hints_insert(hints, c, dp, noprime)) {
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
return 0;
+ }
name_tree_init_parents(&hints->tree);
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
return 1;
}
void
-hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm)
+hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm,
+ int nolock)
{
struct iter_hints_stub *z;
size_t len;
int labs = dname_count_size_labels(nm, &len);
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(!nolock) { lock_rw_wrlock(&hints->lock); }
if(!(z=(struct iter_hints_stub*)name_tree_find(&hints->tree,
- nm, len, labs, c)))
+ nm, len, labs, c))) {
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
return; /* nothing to do */
+ }
(void)rbtree_delete(&hints->tree, &z->node);
hints_stub_free(z);
name_tree_init_parents(&hints->tree);
+ if(!nolock) { lock_rw_unlock(&hints->lock); }
}
diff --git a/contrib/unbound/iterator/iter_hints.h b/contrib/unbound/iterator/iter_hints.h
index 06b4b9667d13..26de323c9e98 100644
--- a/contrib/unbound/iterator/iter_hints.h
+++ b/contrib/unbound/iterator/iter_hints.h
@@ -43,6 +43,7 @@
#ifndef ITERATOR_ITER_HINTS_H
#define ITERATOR_ITER_HINTS_H
#include "util/storage/dnstree.h"
+#include "util/locks.h"
struct iter_env;
struct config_file;
struct delegpt;
@@ -51,6 +52,10 @@ struct delegpt;
* Iterator hints structure
*/
struct iter_hints {
+ /** lock on the forwards tree.
+ * When grabbing both this lock and the anchors.lock, this lock
+ * is grabbed first. */
+ lock_rw_type lock;
/**
* Hints are stored in this tree. Sort order is specially chosen.
* first sorted on qclass. Then on dname in nsec-like order, so that
@@ -95,42 +100,70 @@ void hints_delete(struct iter_hints* hints);
int hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg);
/**
- * Find root hints for the given class.
+ * Find hints for the given class.
+ * The return value is contents of the hints structure.
+ * Caller should lock and unlock a readlock on the hints structure if nolock
+ * is set.
+ * Otherwise caller should unlock the readlock on the hints structure if a
+ * value was returned.
* @param hints: hint storage.
+ * @param qname: the qname that generated the delegation point.
* @param qclass: class for which root hints are requested. host order.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return: NULL if no hints, or a ptr to stored hints.
*/
-struct delegpt* hints_lookup_root(struct iter_hints* hints, uint16_t qclass);
+struct delegpt* hints_find(struct iter_hints* hints, uint8_t* qname,
+ uint16_t qclass, int nolock);
+
+/**
+ * Same as hints_lookup, but for the root only.
+ * @param hints: hint storage.
+ * @param qclass: class for which root hints are requested. host order.
+ * @param nolock: Skip locking, locking is handled by the caller.
+ * @return: NULL if no hints, or a ptr to stored hints.
+ */
+struct delegpt* hints_find_root(struct iter_hints* hints,
+ uint16_t qclass, int nolock);
/**
* Find next root hints (to cycle through all root hints).
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a readlock on the hints structure.
* @param hints: hint storage
* @param qclass: class for which root hints are sought.
* 0 means give the first available root hints class.
* x means, give class x or a higher class if any.
* returns the found class in this variable.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return true if a root hint class is found.
* false if not root hint class is found (qclass may have been changed).
*/
-int hints_next_root(struct iter_hints* hints, uint16_t* qclass);
+int hints_next_root(struct iter_hints* hints, uint16_t* qclass, int nolock);
/**
* Given a qname/qclass combination, and the delegation point from the cache
* for this qname/qclass, determine if this combination indicates that a
* stub hint exists and must be primed.
+ * The return value is contents of the hints structure.
+ * Caller should lock and unlock a readlock on the hints structure if nolock
+ * is set.
+ * Otherwise caller should unlock the readlock on the hints structure if a
+ * value was returned.
*
* @param hints: hint storage.
* @param qname: The qname that generated the delegation point.
* @param qclass: The qclass that generated the delegation point.
* @param dp: The cache generated delegation point.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return: A priming delegation point if there is a stub hint that must
* be primed, otherwise null.
*/
-struct iter_hints_stub* hints_lookup_stub(struct iter_hints* hints,
- uint8_t* qname, uint16_t qclass, struct delegpt* dp);
+struct iter_hints_stub* hints_lookup_stub(struct iter_hints* hints,
+ uint8_t* qname, uint16_t qclass, struct delegpt* dp, int nolock);
/**
* Get memory in use by hints
+ * Locks and unlocks the structure.
* @param hints: hint storage.
* @return bytes in use
*/
@@ -139,23 +172,30 @@ size_t hints_get_mem(struct iter_hints* hints);
/**
* Add stub to hints structure. For external use since it recalcs
* the tree parents.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a writelock on the hints structure.
* @param hints: the hints data structure
* @param c: class of zone
* @param dp: delegation point with name and target nameservers for new
* hints stub. malloced.
* @param noprime: set noprime option to true or false on new hint stub.
+ * @param nolock: Skip locking, locking is handled by the caller.
* @return false on failure (out of memory);
*/
int hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
- int noprime);
+ int noprime, int nolock);
/**
* Remove stub from hints structure. For external use since it
* recalcs the tree parents.
+ * Handles its own locking unless nolock is set. In that case the caller
+ * should lock and unlock a writelock on the hints structure.
* @param hints: the hints data structure
* @param c: class of stub zone
* @param nm: name of stub zone (in uncompressed wireformat).
+ * @param nolock: Skip locking, locking is handled by the caller.
*/
-void hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm);
+void hints_delete_stub(struct iter_hints* hints, uint16_t c,
+ uint8_t* nm, int nolock);
#endif /* ITERATOR_ITER_HINTS_H */
diff --git a/contrib/unbound/iterator/iter_utils.c b/contrib/unbound/iterator/iter_utils.c
index 10a8ec3eb08f..f291178d2319 100644
--- a/contrib/unbound/iterator/iter_utils.c
+++ b/contrib/unbound/iterator/iter_utils.c
@@ -1284,8 +1284,17 @@ iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
uint16_t* c)
{
uint16_t c1 = *c, c2 = *c;
- int r1 = hints_next_root(hints, &c1);
- int r2 = forwards_next_root(fwd, &c2);
+ int r1, r2;
+ int nolock = 1;
+
+ /* prelock both forwards and hints for atomic read. */
+ lock_rw_rdlock(&fwd->lock);
+ lock_rw_rdlock(&hints->lock);
+ r1 = hints_next_root(hints, &c1, nolock);
+ r2 = forwards_next_root(fwd, &c2, nolock);
+ lock_rw_unlock(&fwd->lock);
+ lock_rw_unlock(&hints->lock);
+
if(!r1 && !r2) /* got none, end of list */
return 0;
else if(!r1) /* got one, return that */
@@ -1450,15 +1459,21 @@ int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp)
int
iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf,
- uint8_t** retdpname, size_t* retdpnamelen)
+ uint8_t** retdpname, size_t* retdpnamelen, uint8_t* dpname_storage,
+ size_t dpname_storage_len)
{
struct iter_hints_stub *stub;
struct delegpt *dp;
+ int nolock = 1;
/* Check for stub. */
+ /* Lock both forwards and hints for atomic read. */
+ lock_rw_rdlock(&qstate->env->fwds->lock);
+ lock_rw_rdlock(&qstate->env->hints->lock);
stub = hints_lookup_stub(qstate->env->hints, qinf->qname,
- qinf->qclass, NULL);
- dp = forwards_lookup(qstate->env->fwds, qinf->qname, qinf->qclass);
+ qinf->qclass, NULL, nolock);
+ dp = forwards_lookup(qstate->env->fwds, qinf->qname, qinf->qclass,
+ nolock);
/* see if forward or stub is more pertinent */
if(stub && stub->dp && dp) {
@@ -1472,7 +1487,9 @@ iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf,
/* check stub */
if (stub != NULL && stub->dp != NULL) {
- if(stub->dp->no_cache) {
+ int stub_no_cache = stub->dp->no_cache;
+ lock_rw_unlock(&qstate->env->fwds->lock);
+ if(stub_no_cache) {
char qname[255+1];
char dpname[255+1];
dname_str(qinf->qname, qname);
@@ -1480,15 +1497,27 @@ iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf,
verbose(VERB_ALGO, "stub for %s %s has no_cache", qname, dpname);
}
if(retdpname) {
- *retdpname = stub->dp->name;
+ if(stub->dp->namelen > dpname_storage_len) {
+ verbose(VERB_ALGO, "no cache stub dpname too long");
+ lock_rw_unlock(&qstate->env->hints->lock);
+ *retdpname = NULL;
+ *retdpnamelen = 0;
+ return stub_no_cache;
+ }
+ memmove(dpname_storage, stub->dp->name,
+ stub->dp->namelen);
+ *retdpname = dpname_storage;
*retdpnamelen = stub->dp->namelen;
}
- return (stub->dp->no_cache);
+ lock_rw_unlock(&qstate->env->hints->lock);
+ return stub_no_cache;
}
/* Check for forward. */
if (dp) {
- if(dp->no_cache) {
+ int dp_no_cache = dp->no_cache;
+ lock_rw_unlock(&qstate->env->hints->lock);
+ if(dp_no_cache) {
char qname[255+1];
char dpname[255+1];
dname_str(qinf->qname, qname);
@@ -1496,11 +1525,22 @@ iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf,
verbose(VERB_ALGO, "forward for %s %s has no_cache", qname, dpname);
}
if(retdpname) {
- *retdpname = dp->name;
+ if(dp->namelen > dpname_storage_len) {
+ verbose(VERB_ALGO, "no cache dpname too long");
+ lock_rw_unlock(&qstate->env->fwds->lock);
+ *retdpname = NULL;
+ *retdpnamelen = 0;
+ return dp_no_cache;
+ }
+ memmove(dpname_storage, dp->name, dp->namelen);
+ *retdpname = dpname_storage;
*retdpnamelen = dp->namelen;
}
- return (dp->no_cache);
+ lock_rw_unlock(&qstate->env->fwds->lock);
+ return dp_no_cache;
}
+ lock_rw_unlock(&qstate->env->fwds->lock);
+ lock_rw_unlock(&qstate->env->hints->lock);
if(retdpname) {
*retdpname = NULL;
*retdpnamelen = 0;
diff --git a/contrib/unbound/iterator/iter_utils.h b/contrib/unbound/iterator/iter_utils.h
index fa860fa682fc..4024629e686c 100644
--- a/contrib/unbound/iterator/iter_utils.h
+++ b/contrib/unbound/iterator/iter_utils.h
@@ -407,10 +407,14 @@ int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp);
* Used for NXDOMAIN checks, above that it is an nxdomain from a
* different server and zone. You can pass NULL to not get it.
* @param retdpnamelen: returns the length of the dpname.
+ * @param dpname_storage: this is where the dpname buf is stored, if any.
+ * So that caller can manage the buffer.
+ * @param dpname_storage_len: size of dpname_storage buffer.
* @return true if no_cache is set in stub or fwd.
*/
int iter_stub_fwd_no_cache(struct module_qstate *qstate,
- struct query_info *qinf, uint8_t** retdpname, size_t* retdpnamelen);
+ struct query_info *qinf, uint8_t** retdpname, size_t* retdpnamelen,
+ uint8_t* dpname_storage, size_t dpname_storage_len);
/**
* Set support for IP4 and IP6 depending on outgoing interfaces
diff --git a/contrib/unbound/iterator/iterator.c b/contrib/unbound/iterator/iterator.c
index e9fea544aa69..5732a414857e 100644
--- a/contrib/unbound/iterator/iterator.c
+++ b/contrib/unbound/iterator/iterator.c
@@ -52,6 +52,7 @@
#include "iterator/iter_priv.h"
#include "validator/val_neg.h"
#include "services/cache/dns.h"
+#include "services/cache/rrset.h"
#include "services/cache/infra.h"
#include "services/authzone.h"
#include "util/module.h"
@@ -678,30 +679,40 @@ errinf_reply(struct module_qstate* qstate, struct iter_qstate* iq)
/** see if last resort is possible - does config allow queries to parent */
static int
-can_have_last_resort(struct module_env* env, uint8_t* nm, size_t nmlen,
- uint16_t qclass, struct delegpt** retdp)
+can_have_last_resort(struct module_env* env, uint8_t* nm, size_t ATTR_UNUSED(nmlen),
+ uint16_t qclass, int* have_dp, struct delegpt** retdp,
+ struct regional* region)
{
- struct delegpt* fwddp;
- struct iter_hints_stub* stub;
- int labs = dname_count_labels(nm);
+ struct delegpt* dp = NULL;
+ int nolock = 0;
/* do not process a last resort (the parent side) if a stub
* or forward is configured, because we do not want to go 'above'
* the configured servers */
- if(!dname_is_root(nm) && (stub = (struct iter_hints_stub*)
- name_tree_find(&env->hints->tree, nm, nmlen, labs, qclass)) &&
+ if(!dname_is_root(nm) &&
+ (dp = hints_find(env->hints, nm, qclass, nolock)) &&
/* has_parent side is turned off for stub_first, where we
* are allowed to go to the parent */
- stub->dp->has_parent_side_NS) {
- if(retdp) *retdp = stub->dp;
+ dp->has_parent_side_NS) {
+ if(retdp) *retdp = delegpt_copy(dp, region);
+ lock_rw_unlock(&env->hints->lock);
+ if(have_dp) *have_dp = 1;
return 0;
}
- if((fwddp = forwards_find(env->fwds, nm, qclass)) &&
+ if(dp) {
+ lock_rw_unlock(&env->hints->lock);
+ dp = NULL;
+ }
+ if((dp = forwards_find(env->fwds, nm, qclass, nolock)) &&
/* has_parent_side is turned off for forward_first, where
* we are allowed to go to the parent */
- fwddp->has_parent_side_NS) {
- if(retdp) *retdp = fwddp;
+ dp->has_parent_side_NS) {
+ if(retdp) *retdp = delegpt_copy(dp, region);
+ lock_rw_unlock(&env->fwds->lock);
+ if(have_dp) *have_dp = 1;
return 0;
}
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(dp) { lock_rw_unlock(&env->fwds->lock); }
return 1;
}
@@ -877,10 +888,11 @@ prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id,
{
struct delegpt* dp;
struct module_qstate* subq;
+ int nolock = 0;
verbose(VERB_DETAIL, "priming . %s NS",
sldns_lookup_by_id(sldns_rr_classes, (int)qclass)?
sldns_lookup_by_id(sldns_rr_classes, (int)qclass)->name:"??");
- dp = hints_lookup_root(qstate->env->hints, qclass);
+ dp = hints_find_root(qstate->env->hints, qclass, nolock);
if(!dp) {
verbose(VERB_ALGO, "Cannot prime due to lack of hints");
return 0;
@@ -890,6 +902,7 @@ prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id,
if(!generate_sub_request((uint8_t*)"\000", 1, LDNS_RR_TYPE_NS,
qclass, qstate, id, iq, QUERYTARGETS_STATE, PRIME_RESP_STATE,
&subq, 0, 0)) {
+ lock_rw_unlock(&qstate->env->hints->lock);
verbose(VERB_ALGO, "could not prime root");
return 0;
}
@@ -900,6 +913,7 @@ prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id,
* copy dp, it is now part of the root prime query.
* dp was part of in the fixed hints structure. */
subiq->dp = delegpt_copy(dp, subq->region);
+ lock_rw_unlock(&qstate->env->hints->lock);
if(!subiq->dp) {
log_err("out of memory priming root, copydp");
fptr_ok(fptr_whitelist_modenv_kill_sub(
@@ -911,6 +925,8 @@ prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id,
subiq->num_target_queries = 0;
subiq->dnssec_expected = iter_indicates_dnssec(
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
+ } else {
+ lock_rw_unlock(&qstate->env->hints->lock);
}
/* this module stops, our submodule starts, and does the query. */
@@ -941,18 +957,21 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id,
struct iter_hints_stub* stub;
struct delegpt* stub_dp;
struct module_qstate* subq;
+ int nolock = 0;
if(!qname) return 0;
- stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp);
+ stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp,
+ nolock);
/* The stub (if there is one) does not need priming. */
- if(!stub)
- return 0;
+ if(!stub) return 0;
stub_dp = stub->dp;
/* if we have an auth_zone dp, and stub is equal, don't prime stub
* yet, unless we want to fallback and avoid the auth_zone */
if(!iq->auth_zone_avoid && iq->dp && iq->dp->auth_dp &&
- query_dname_compare(iq->dp->name, stub_dp->name) == 0)
+ query_dname_compare(iq->dp->name, stub_dp->name) == 0) {
+ lock_rw_unlock(&qstate->env->hints->lock);
return 0;
+ }
/* is it a noprime stub (always use) */
if(stub->noprime) {
@@ -961,13 +980,14 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id,
/* copy the dp out of the fixed hints structure, so that
* it can be changed when servicing this query */
iq->dp = delegpt_copy(stub_dp, qstate->region);
+ lock_rw_unlock(&qstate->env->hints->lock);
if(!iq->dp) {
log_err("out of memory priming stub");
errinf(qstate, "malloc failure, priming stub");
(void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
return 1; /* return 1 to make module stop, with error */
}
- log_nametypeclass(VERB_DETAIL, "use stub", stub_dp->name,
+ log_nametypeclass(VERB_DETAIL, "use stub", iq->dp->name,
LDNS_RR_TYPE_NS, qclass);
return r;
}
@@ -981,6 +1001,7 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id,
if(!generate_sub_request(stub_dp->name, stub_dp->namelen,
LDNS_RR_TYPE_NS, qclass, qstate, id, iq,
QUERYTARGETS_STATE, PRIME_RESP_STATE, &subq, 0, 0)) {
+ lock_rw_unlock(&qstate->env->hints->lock);
verbose(VERB_ALGO, "could not prime stub");
errinf(qstate, "could not generate lookup for stub prime");
(void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
@@ -993,6 +1014,7 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id,
/* Set the initial delegation point to the hint. */
/* make copy to avoid use of stub dp by different qs/threads */
subiq->dp = delegpt_copy(stub_dp, subq->region);
+ lock_rw_unlock(&qstate->env->hints->lock);
if(!subiq->dp) {
log_err("out of memory priming stub, copydp");
fptr_ok(fptr_whitelist_modenv_kill_sub(
@@ -1009,6 +1031,8 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id,
subiq->wait_priming_stub = 1;
subiq->dnssec_expected = iter_indicates_dnssec(
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
+ } else {
+ lock_rw_unlock(&qstate->env->hints->lock);
}
/* this module stops, our submodule starts, and does the query. */
@@ -1181,7 +1205,7 @@ generate_ns_check(struct module_qstate* qstate, struct iter_qstate* iq, int id)
if(iq->depth == ie->max_dependency_depth)
return;
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
- iq->qchase.qclass, NULL))
+ iq->qchase.qclass, NULL, NULL, NULL))
return;
/* is this query the same as the nscheck? */
if(qstate->qinfo.qtype == LDNS_RR_TYPE_NS &&
@@ -1294,6 +1318,7 @@ forward_request(struct module_qstate* qstate, struct iter_qstate* iq)
struct delegpt* dp;
uint8_t* delname = iq->qchase.qname;
size_t delnamelen = iq->qchase.qname_len;
+ int nolock = 0;
if(iq->refetch_glue && iq->dp) {
delname = iq->dp->name;
delnamelen = iq->dp->namelen;
@@ -1302,12 +1327,13 @@ forward_request(struct module_qstate* qstate, struct iter_qstate* iq)
if( (iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue)
&& !dname_is_root(iq->qchase.qname))
dname_remove_label(&delname, &delnamelen);
- dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass);
- if(!dp)
- return 0;
+ dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass,
+ nolock);
+ if(!dp) return 0;
/* send recursion desired to forward addr */
iq->chase_flags |= BIT_RD;
iq->dp = delegpt_copy(dp, qstate->region);
+ lock_rw_unlock(&qstate->env->fwds->lock);
/* iq->dp checked by caller */
verbose(VERB_ALGO, "forwarding request");
return 1;
@@ -1335,6 +1361,7 @@ static int
processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
struct iter_env* ie, int id)
{
+ uint8_t dpname_storage[LDNS_MAX_DOMAINLEN+1];
uint8_t* delname, *dpname=NULL;
size_t delnamelen, dpnamelen=0;
struct dns_msg* msg = NULL;
@@ -1381,7 +1408,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
if (iq->refetch_glue &&
iq->dp &&
!can_have_last_resort(qstate->env, iq->dp->name,
- iq->dp->namelen, iq->qchase.qclass, NULL)) {
+ iq->dp->namelen, iq->qchase.qclass, NULL, NULL, NULL)) {
iq->refetch_glue = 0;
}
@@ -1389,8 +1416,61 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
/* This either results in a query restart (CNAME cache response), a
* terminating response (ANSWER), or a cache miss (null). */
-
- if (iter_stub_fwd_no_cache(qstate, &iq->qchase, &dpname, &dpnamelen)) {
+
+ /* Check RPZ for override */
+ if(qstate->env->auth_zones) {
+ /* apply rpz qname triggers, like after cname */
+ struct dns_msg* forged_response =
+ rpz_callback_from_iterator_cname(qstate, iq);
+ if(forged_response) {
+ uint8_t* sname = 0;
+ size_t slen = 0;
+ int count = 0;
+ while(forged_response && reply_find_rrset_section_an(
+ forged_response->rep, iq->qchase.qname,
+ iq->qchase.qname_len, LDNS_RR_TYPE_CNAME,
+ iq->qchase.qclass) &&
+ iq->qchase.qtype != LDNS_RR_TYPE_CNAME &&
+ count++ < ie->max_query_restarts) {
+ /* another cname to follow */
+ if(!handle_cname_response(qstate, iq, forged_response,
+ &sname, &slen)) {
+ errinf(qstate, "malloc failure, CNAME info");
+ return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
+ }
+ iq->qchase.qname = sname;
+ iq->qchase.qname_len = slen;
+ forged_response =
+ rpz_callback_from_iterator_cname(qstate, iq);
+ }
+ if(forged_response != NULL) {
+ qstate->ext_state[id] = module_finished;
+ qstate->return_rcode = LDNS_RCODE_NOERROR;
+ qstate->return_msg = forged_response;
+ iq->response = forged_response;
+ next_state(iq, FINISHED_STATE);
+ if(!iter_prepend(iq, qstate->return_msg, qstate->region)) {
+ log_err("rpz: after cached cname, prepend rrsets: out of memory");
+ return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
+ }
+ qstate->return_msg->qinfo = qstate->qinfo;
+ return 0;
+ }
+ /* Follow the CNAME response */
+ iq->dp = NULL;
+ iq->refetch_glue = 0;
+ iq->query_restart_count++;
+ iq->sent_count = 0;
+ iq->dp_target_count = 0;
+ sock_list_insert(&qstate->reply_origin, NULL, 0, qstate->region);
+ if(qstate->env->cfg->qname_minimisation)
+ iq->minimisation_state = INIT_MINIMISE_STATE;
+ return next_state(iq, INIT_REQUEST_STATE);
+ }
+ }
+
+ if (iter_stub_fwd_no_cache(qstate, &iq->qchase, &dpname, &dpnamelen,
+ dpname_storage, sizeof(dpname_storage))) {
/* Asked to not query cache. */
verbose(VERB_ALGO, "no-cache set, going to the network");
qstate->no_cache_lookup = 1;
@@ -1449,39 +1529,6 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
}
iq->qchase.qname = sname;
iq->qchase.qname_len = slen;
- if(qstate->env->auth_zones) {
- /* apply rpz qname triggers after cname */
- struct dns_msg* forged_response =
- rpz_callback_from_iterator_cname(qstate, iq);
- while(forged_response && reply_find_rrset_section_an(
- forged_response->rep, iq->qchase.qname,
- iq->qchase.qname_len, LDNS_RR_TYPE_CNAME,
- iq->qchase.qclass)) {
- /* another cname to follow */
- if(!handle_cname_response(qstate, iq, forged_response,
- &sname, &slen)) {
- errinf(qstate, "malloc failure, CNAME info");
- return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
- }
- iq->qchase.qname = sname;
- iq->qchase.qname_len = slen;
- forged_response =
- rpz_callback_from_iterator_cname(qstate, iq);
- }
- if(forged_response != NULL) {
- qstate->ext_state[id] = module_finished;
- qstate->return_rcode = LDNS_RCODE_NOERROR;
- qstate->return_msg = forged_response;
- iq->response = forged_response;
- next_state(iq, FINISHED_STATE);
- if(!iter_prepend(iq, qstate->return_msg, qstate->region)) {
- log_err("rpz: after cached cname, prepend rrsets: out of memory");
- return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
- }
- qstate->return_msg->qinfo = qstate->qinfo;
- return 0;
- }
- }
/* This *is* a query restart, even if it is a cheap
* one. */
iq->dp = NULL;
@@ -1494,7 +1541,6 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
iq->minimisation_state = INIT_MINIMISE_STATE;
return next_state(iq, INIT_REQUEST_STATE);
}
-
/* if from cache, NULL, else insert 'cache IP' len=0 */
if(qstate->reply_origin)
sock_list_insert(&qstate->reply_origin, NULL, 0, qstate->region);
@@ -1555,7 +1601,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
}
if(iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue ||
(iq->qchase.qtype == LDNS_RR_TYPE_NS && qstate->prefetch_leeway
- && can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass, NULL))) {
+ && can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass, NULL, NULL, NULL))) {
/* remove first label from delname, root goes to hints,
* but only to fetch glue, not for qtype=DS. */
/* also when prefetching an NS record, fetch it again from
@@ -1584,6 +1630,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
* root priming situation. */
if(iq->dp == NULL) {
int r;
+ int nolock = 0;
/* if under auth zone, no prime needed */
if(!auth_zone_delegpt(qstate, iq, delname, delnamelen))
return error_response(qstate, id,
@@ -1597,12 +1644,13 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
break; /* got noprime-stub-zone, continue */
else if(r)
return 0; /* stub prime request made */
- if(forwards_lookup_root(qstate->env->fwds,
- iq->qchase.qclass)) {
+ if(forwards_lookup_root(qstate->env->fwds,
+ iq->qchase.qclass, nolock)) {
+ lock_rw_unlock(&qstate->env->fwds->lock);
/* forward zone root, no root prime needed */
/* fill in some dp - safety belt */
- iq->dp = hints_lookup_root(qstate->env->hints,
- iq->qchase.qclass);
+ iq->dp = hints_find_root(qstate->env->hints,
+ iq->qchase.qclass, nolock);
if(!iq->dp) {
log_err("internal error: no hints dp");
errinf(qstate, "no hints for this class");
@@ -1610,6 +1658,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
LDNS_RCODE_SERVFAIL);
}
iq->dp = delegpt_copy(iq->dp, qstate->region);
+ lock_rw_unlock(&qstate->env->hints->lock);
if(!iq->dp) {
log_err("out of memory in safety belt");
errinf(qstate, "malloc failure, in safety belt");
@@ -1649,15 +1698,13 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
if(iter_dp_is_useless(&qstate->qinfo, qstate->query_flags,
iq->dp, ie->supports_ipv4, ie->supports_ipv6,
ie->use_nat64)) {
- struct delegpt* retdp = NULL;
- if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen, iq->qchase.qclass, &retdp)) {
- if(retdp) {
+ int have_dp = 0;
+ if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen, iq->qchase.qclass, &have_dp, &iq->dp, qstate->region)) {
+ if(have_dp) {
verbose(VERB_QUERY, "cache has stub "
"or fwd but no addresses, "
"fallback to config");
- iq->dp = delegpt_copy(retdp,
- qstate->region);
- if(!iq->dp) {
+ if(have_dp && !iq->dp) {
log_err("out of memory in "
"stub/fwd fallback");
errinf(qstate, "malloc failure, for fallback to config");
@@ -1677,10 +1724,11 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
}
if(dname_is_root(iq->dp->name)) {
/* use safety belt */
+ int nolock = 0;
verbose(VERB_QUERY, "Cache has root NS but "
"no addresses. Fallback to the safety belt.");
- iq->dp = hints_lookup_root(qstate->env->hints,
- iq->qchase.qclass);
+ iq->dp = hints_find_root(qstate->env->hints,
+ iq->qchase.qclass, nolock);
/* note deleg_msg is from previous lookup,
* but RD is on, so it is not used */
if(!iq->dp) {
@@ -1689,6 +1737,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
LDNS_RCODE_REFUSED);
}
iq->dp = delegpt_copy(iq->dp, qstate->region);
+ lock_rw_unlock(&qstate->env->hints->lock);
if(!iq->dp) {
log_err("out of memory in safety belt");
errinf(qstate, "malloc failure, in safety belt, for root");
@@ -1744,6 +1793,7 @@ processInitRequest2(struct module_qstate* qstate, struct iter_qstate* iq,
delnamelen = iq->qchase.qname_len;
if(iq->refetch_glue) {
struct iter_hints_stub* stub;
+ int nolock = 0;
if(!iq->dp) {
log_err("internal or malloc fail: no dp for refetch");
errinf(qstate, "malloc failure, no delegation info");
@@ -1753,12 +1803,14 @@ processInitRequest2(struct module_qstate* qstate, struct iter_qstate* iq,
* this is above stub without stub-first. */
stub = hints_lookup_stub(
qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
- iq->dp);
+ iq->dp, nolock);
if(!stub || !stub->dp->has_parent_side_NS ||
dname_subdomain_c(iq->dp->name, stub->dp->name)) {
delname = iq->dp->name;
delnamelen = iq->dp->namelen;
}
+ /* lock_() calls are macros that could be nothing, surround in {} */
+ if(stub) { lock_rw_unlock(&qstate->env->hints->lock); }
}
if(iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue) {
if(!dname_is_root(delname))
@@ -2062,7 +2114,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
log_assert(iq->dp);
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
- iq->qchase.qclass, NULL)) {
+ iq->qchase.qclass, NULL, NULL, NULL)) {
/* fail -- no more targets, no more hope of targets, no hope
* of a response. */
errinf(qstate, "all the configured stub or forward servers failed,");
@@ -2072,21 +2124,24 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
}
if(!iq->dp->has_parent_side_NS && dname_is_root(iq->dp->name)) {
- struct delegpt* p = hints_lookup_root(qstate->env->hints,
- iq->qchase.qclass);
- if(p) {
+ struct delegpt* dp;
+ int nolock = 0;
+ dp = hints_find_root(qstate->env->hints,
+ iq->qchase.qclass, nolock);
+ if(dp) {
struct delegpt_addr* a;
iq->chase_flags &= ~BIT_RD; /* go to authorities */
- for(ns = p->nslist; ns; ns=ns->next) {
+ for(ns = dp->nslist; ns; ns=ns->next) {
(void)delegpt_add_ns(iq->dp, qstate->region,
ns->name, ns->lame, ns->tls_auth_name,
ns->port);
}
- for(a = p->target_list; a; a=a->next_target) {
+ for(a = dp->target_list; a; a=a->next_target) {
(void)delegpt_add_addr(iq->dp, qstate->region,
&a->addr, a->addrlen, a->bogus,
a->lame, a->tls_auth_name, -1, NULL);
}
+ lock_rw_unlock(&qstate->env->hints->lock);
}
iq->dp->has_parent_side_NS = 1;
} else if(!iq->dp->has_parent_side_NS) {
@@ -2164,7 +2219,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
if( ((ie->supports_ipv6 && !ns->done_pside6) ||
((ie->supports_ipv4 || ie->use_nat64) && !ns->done_pside4)) &&
!can_have_last_resort(qstate->env, ns->name, ns->namelen,
- iq->qchase.qclass, NULL)) {
+ iq->qchase.qclass, NULL, NULL, NULL)) {
log_nametypeclass(VERB_ALGO, "cannot pside lookup ns "
"because it is also a stub/forward,",
ns->name, LDNS_RR_TYPE_NS, iq->qchase.qclass);
@@ -2746,8 +2801,51 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
delegpt_add_unused_targets(iq->dp);
if(qstate->env->auth_zones) {
- /* apply rpz triggers at query time */
+ uint8_t* sname = NULL;
+ size_t snamelen = 0;
+ /* apply rpz triggers at query time; nameserver IP and dname */
+ struct dns_msg* forged_response_after_cname;
struct dns_msg* forged_response = rpz_callback_from_iterator_module(qstate, iq);
+ int count = 0;
+ while(forged_response && reply_find_rrset_section_an(
+ forged_response->rep, iq->qchase.qname,
+ iq->qchase.qname_len, LDNS_RR_TYPE_CNAME,
+ iq->qchase.qclass) &&
+ iq->qchase.qtype != LDNS_RR_TYPE_CNAME &&
+ count++ < ie->max_query_restarts) {
+ /* another cname to follow */
+ if(!handle_cname_response(qstate, iq, forged_response,
+ &sname, &snamelen)) {
+ errinf(qstate, "malloc failure, CNAME info");
+ return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
+ }
+ iq->qchase.qname = sname;
+ iq->qchase.qname_len = snamelen;
+ forged_response_after_cname =
+ rpz_callback_from_iterator_cname(qstate, iq);
+ if(forged_response_after_cname) {
+ forged_response = forged_response_after_cname;
+ } else {
+ /* Follow the CNAME with a query restart */
+ iq->deleg_msg = NULL;
+ iq->dp = NULL;
+ iq->dsns_point = NULL;
+ iq->auth_zone_response = 0;
+ iq->refetch_glue = 0;
+ iq->query_restart_count++;
+ iq->sent_count = 0;
+ iq->dp_target_count = 0;
+ if(qstate->env->cfg->qname_minimisation)
+ iq->minimisation_state = INIT_MINIMISE_STATE;
+ outbound_list_clear(&iq->outlist);
+ iq->num_current_queries = 0;
+ fptr_ok(fptr_whitelist_modenv_detach_subs(
+ qstate->env->detach_subs));
+ (*qstate->env->detach_subs)(qstate);
+ iq->num_target_queries = 0;
+ return next_state(iq, INIT_REQUEST_STATE);
+ }
+ }
if(forged_response != NULL) {
qstate->ext_state[id] = module_finished;
qstate->return_rcode = LDNS_RCODE_NOERROR;
@@ -3082,7 +3180,8 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
/* DNAME to a subdomain loop; do not recurse */
type = RESPONSE_TYPE_ANSWER;
}
- } else if(type == RESPONSE_TYPE_CNAME &&
+ }
+ if(type == RESPONSE_TYPE_CNAME &&
iq->qchase.qtype == LDNS_RR_TYPE_CNAME &&
iq->minimisation_state == MINIMISE_STATE &&
query_dname_compare(iq->qchase.qname, iq->qinfo_out.qname) == 0) {
@@ -3193,6 +3292,7 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
}
return final_state(iq);
} else if(type == RESPONSE_TYPE_REFERRAL) {
+ struct delegpt* old_dp = NULL;
/* REFERRAL type responses get a reset of the
* delegation point, and back to the QUERYTARGETS_STATE. */
verbose(VERB_DETAIL, "query response was REFERRAL");
@@ -3244,6 +3344,8 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
/* Reset the event state, setting the current delegation
* point to the referral. */
iq->deleg_msg = iq->response;
+ /* Keep current delegation point for label comparison */
+ old_dp = iq->dp;
iq->dp = delegpt_from_message(iq->response, qstate->region);
if (qstate->env->cfg->qname_minimisation)
iq->minimisation_state = INIT_MINIMISE_STATE;
@@ -3251,6 +3353,20 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
errinf(qstate, "malloc failure, for delegation point");
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
}
+ if(old_dp->namelabs + 1 < iq->dp->namelabs) {
+ /* We got a grandchild delegation (more than one label
+ * difference) than expected. Check for in-between
+ * delegations in the cache and remove them.
+ * They could prove problematic when they expire
+ * and rrset_expired_above() encounters them during
+ * delegation cache lookups. */
+ uint8_t* qname = iq->dp->name;
+ size_t qnamelen = iq->dp->namelen;
+ rrset_cache_remove_above(qstate->env->rrset_cache,
+ &qname, &qnamelen, LDNS_RR_TYPE_NS,
+ iq->qchase.qclass, *qstate->env->now,
+ old_dp->name, old_dp->namelen);
+ }
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
qstate->region, iq->dp)) {
errinf(qstate, "malloc failure, copy extra info into delegation point");
@@ -3341,10 +3457,13 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
/* apply rpz qname triggers after cname */
struct dns_msg* forged_response =
rpz_callback_from_iterator_cname(qstate, iq);
+ int count = 0;
while(forged_response && reply_find_rrset_section_an(
forged_response->rep, iq->qchase.qname,
iq->qchase.qname_len, LDNS_RR_TYPE_CNAME,
- iq->qchase.qclass)) {
+ iq->qchase.qclass) &&
+ iq->qchase.qtype != LDNS_RR_TYPE_CNAME &&
+ count++ < ie->max_query_restarts) {
/* another cname to follow */
if(!handle_cname_response(qstate, iq, forged_response,
&sname, &snamelen)) {
@@ -3926,17 +4045,9 @@ processFinished(struct module_qstate* qstate, struct iter_qstate* iq,
!qstate->env->cfg->val_log_squelch) {
char* err_str = errinf_to_str_misc(qstate);
if(err_str) {
- size_t err_str_len = strlen(err_str);
verbose(VERB_ALGO, "iterator EDE: %s", err_str);
- /* allocate space and store the error
- * string */
- iq->response->rep->reason_bogus_str = regional_alloc(
- qstate->region,
- sizeof(char) * (err_str_len+1));
- memcpy(iq->response->rep->reason_bogus_str,
- err_str, err_str_len+1);
+ iq->response->rep->reason_bogus_str = err_str;
}
- free(err_str);
}
/* we have finished processing this query */
diff --git a/contrib/unbound/libunbound/context.c b/contrib/unbound/libunbound/context.c
index f7c0a2cd5fae..a319f59cdea8 100644
--- a/contrib/unbound/libunbound/context.c
+++ b/contrib/unbound/libunbound/context.c
@@ -53,6 +53,8 @@
#include "util/storage/slabhash.h"
#include "util/edns.h"
#include "sldns/sbuffer.h"
+#include "iterator/iter_fwd.h"
+#include "iterator/iter_hints.h"
int
context_finalize(struct ub_ctx* ctx)
@@ -85,6 +87,12 @@ context_finalize(struct ub_ctx* ctx)
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
ctx->env, &ctx->mods))
return UB_INITFAIL;
+ if(!(ctx->env->fwds = forwards_create()) ||
+ !forwards_apply_cfg(ctx->env->fwds, cfg))
+ return UB_INITFAIL;
+ if(!(ctx->env->hints = hints_create()) ||
+ !hints_apply_cfg(ctx->env->hints, cfg))
+ return UB_INITFAIL;
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
return UB_INITFAIL;
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
diff --git a/contrib/unbound/libunbound/libunbound.c b/contrib/unbound/libunbound/libunbound.c
index 80a82bb47ddf..17057ec6c014 100644
--- a/contrib/unbound/libunbound/libunbound.c
+++ b/contrib/unbound/libunbound/libunbound.c
@@ -66,6 +66,8 @@
#include "services/authzone.h"
#include "services/listen_dnsport.h"
#include "sldns/sbuffer.h"
+#include "iterator/iter_fwd.h"
+#include "iterator/iter_hints.h"
#ifdef HAVE_PTHREAD
#include <signal.h>
#endif
@@ -171,6 +173,7 @@ static struct ub_ctx* ub_ctx_create_nopipe(void)
ctx->env->worker = NULL;
ctx->env->need_to_validate = 0;
modstack_init(&ctx->mods);
+ ctx->env->modstack = &ctx->mods;
rbtree_init(&ctx->queries, &context_query_cmp);
return ctx;
}
@@ -379,6 +382,8 @@ ub_ctx_delete(struct ub_ctx* ctx)
config_delete(ctx->env->cfg);
edns_known_options_delete(ctx->env);
edns_strings_delete(ctx->env->edns_strings);
+ forwards_delete(ctx->env->fwds);
+ hints_delete(ctx->env->hints);
auth_zones_delete(ctx->env->auth_zones);
free(ctx->env);
}
diff --git a/contrib/unbound/libunbound/libworker.c b/contrib/unbound/libunbound/libworker.c
index 0e1c40393763..5c75f61d8dcb 100644
--- a/contrib/unbound/libunbound/libworker.c
+++ b/contrib/unbound/libunbound/libworker.c
@@ -70,8 +70,6 @@
#include "util/data/msgreply.h"
#include "util/data/msgencode.h"
#include "util/tube.h"
-#include "iterator/iter_fwd.h"
-#include "iterator/iter_hints.h"
#include "sldns/sbuffer.h"
#include "sldns/str2wire.h"
#ifdef USE_DNSTAP
@@ -100,8 +98,6 @@ libworker_delete_env(struct libworker* w)
!w->is_bg || w->is_bg_thread);
sldns_buffer_free(w->env->scratch_buffer);
regional_destroy(w->env->scratch);
- forwards_delete(w->env->fwds);
- hints_delete(w->env->hints);
ub_randfree(w->env->rnd);
free(w->env);
}
@@ -159,30 +155,19 @@ libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb)
}
w->env->scratch = regional_create_custom(cfg->msg_buffer_size);
w->env->scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
- w->env->fwds = forwards_create();
- if(w->env->fwds && !forwards_apply_cfg(w->env->fwds, cfg)) {
- forwards_delete(w->env->fwds);
- w->env->fwds = NULL;
- }
- w->env->hints = hints_create();
- if(w->env->hints && !hints_apply_cfg(w->env->hints, cfg)) {
- hints_delete(w->env->hints);
- w->env->hints = NULL;
- }
#ifdef HAVE_SSL
w->sslctx = connect_sslctx_create(NULL, NULL,
cfg->tls_cert_bundle, cfg->tls_win_cert);
if(!w->sslctx) {
/* to make the setup fail after unlock */
- hints_delete(w->env->hints);
- w->env->hints = NULL;
+ sldns_buffer_free(w->env->scratch_buffer);
+ w->env->scratch_buffer = NULL;
}
#endif
if(!w->is_bg || w->is_bg_thread) {
lock_basic_unlock(&ctx->cfglock);
}
- if(!w->env->scratch || !w->env->scratch_buffer || !w->env->fwds ||
- !w->env->hints) {
+ if(!w->env->scratch || !w->env->scratch_buffer) {
libworker_delete(w);
return NULL;
}
diff --git a/contrib/unbound/services/authzone.c b/contrib/unbound/services/authzone.c
index dae89ffb63a5..c518883419c4 100644
--- a/contrib/unbound/services/authzone.c
+++ b/contrib/unbound/services/authzone.c
@@ -2152,6 +2152,16 @@ auth_zones_cfg(struct auth_zones* az, struct config_auth* c)
if(az->rpz_first)
az->rpz_first->rpz_az_prev = z;
az->rpz_first = z;
+ } else if(c->isrpz && z->rpz) {
+ if(!rpz_config(z->rpz, c)) {
+ log_err("Could not change rpz config");
+ if(x) {
+ lock_basic_unlock(&x->lock);
+ }
+ lock_rw_unlock(&z->lock);
+ lock_rw_unlock(&az->rpz_lock);
+ return 0;
+ }
}
if(c->isrpz) {
lock_rw_unlock(&az->rpz_lock);
diff --git a/contrib/unbound/services/cache/dns.c b/contrib/unbound/services/cache/dns.c
index 6a980548d72f..632ed79ace49 100644
--- a/contrib/unbound/services/cache/dns.c
+++ b/contrib/unbound/services/cache/dns.c
@@ -193,46 +193,6 @@ dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
slabhash_insert(env->msg_cache, hash, &e->entry, rep, env->alloc);
}
-/** see if an rrset is expired above the qname, return upper qname. */
-static int
-rrset_expired_above(struct module_env* env, uint8_t** qname, size_t* qnamelen,
- uint16_t searchtype, uint16_t qclass, time_t now, uint8_t* expiretop,
- size_t expiretoplen)
-{
- struct ub_packed_rrset_key *rrset;
- uint8_t lablen;
-
- while(*qnamelen > 0) {
- /* look one label higher */
- lablen = **qname;
- *qname += lablen + 1;
- *qnamelen -= lablen + 1;
- if(*qnamelen <= 0)
- break;
-
- /* looks up with a time of 0, to see expired entries */
- if((rrset = rrset_cache_lookup(env->rrset_cache, *qname,
- *qnamelen, searchtype, qclass, 0, 0, 0))) {
- struct packed_rrset_data* data =
- (struct packed_rrset_data*)rrset->entry.data;
- if(now > data->ttl) {
- /* it is expired, this is not wanted */
- lock_rw_unlock(&rrset->entry.lock);
- log_nametypeclass(VERB_ALGO, "this rrset is expired", *qname, searchtype, qclass);
- return 1;
- }
- /* it is not expired, continue looking */
- lock_rw_unlock(&rrset->entry.lock);
- }
-
- /* do not look above the expiretop. */
- if(expiretop && *qnamelen == expiretoplen &&
- query_dname_compare(*qname, expiretop)==0)
- break;
- }
- return 0;
-}
-
/** find closest NS or DNAME and returns the rrset (locked) */
static struct ub_packed_rrset_key*
find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
@@ -266,12 +226,12 @@ find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
/* check for expiry, but we have to let go of the rrset
* for the lock ordering */
lock_rw_unlock(&rrset->entry.lock);
- /* the expired_above function always takes off one
- * label (if qnamelen>0) and returns the final qname
- * where it searched, so we can continue from there
- * turning the O N*N search into O N. */
- if(!rrset_expired_above(env, &qname, &qnamelen,
- searchtype, qclass, now, expiretop,
+ /* the rrset_cache_expired_above function always takes
+ * off one label (if qnamelen>0) and returns the final
+ * qname where it searched, so we can continue from
+ * there turning the O N*N search into O N. */
+ if(!rrset_cache_expired_above(env->rrset_cache, &qname,
+ &qnamelen, searchtype, qclass, now, expiretop,
expiretoplen)) {
/* we want to return rrset, but it may be
* gone from cache, if so, just loop like
diff --git a/contrib/unbound/services/cache/infra.c b/contrib/unbound/services/cache/infra.c
index 31462d13ae0a..457685ab5985 100644
--- a/contrib/unbound/services/cache/infra.c
+++ b/contrib/unbound/services/cache/infra.c
@@ -234,6 +234,81 @@ setup_domain_limits(struct infra_cache* infra, struct config_file* cfg)
return 1;
}
+/** find or create element in wait limit netblock tree */
+static struct wait_limit_netblock_info*
+wait_limit_netblock_findcreate(struct infra_cache* infra, char* str,
+ int cookie)
+{
+ rbtree_type* tree;
+ struct sockaddr_storage addr;
+ int net;
+ socklen_t addrlen;
+ struct wait_limit_netblock_info* d;
+
+ if(!netblockstrtoaddr(str, 0, &addr, &addrlen, &net)) {
+ log_err("cannot parse wait limit netblock '%s'", str);
+ return 0;
+ }
+
+ /* can we find it? */
+ if(cookie)
+ tree = &infra->wait_limits_cookie_netblock;
+ else
+ tree = &infra->wait_limits_netblock;
+ d = (struct wait_limit_netblock_info*)addr_tree_find(tree, &addr,
+ addrlen, net);
+ if(d)
+ return d;
+
+ /* create it */
+ d = (struct wait_limit_netblock_info*)calloc(1, sizeof(*d));
+ if(!d)
+ return NULL;
+ d->limit = -1;
+ if(!addr_tree_insert(tree, &d->node, &addr, addrlen, net)) {
+ log_err("duplicate element in domainlimit tree");
+ free(d);
+ return NULL;
+ }
+ return d;
+}
+
+
+/** insert wait limit information into lookup tree */
+static int
+infra_wait_limit_netblock_insert(struct infra_cache* infra,
+ struct config_file* cfg)
+{
+ struct config_str2list* p;
+ struct wait_limit_netblock_info* d;
+ for(p = cfg->wait_limit_netblock; p; p = p->next) {
+ d = wait_limit_netblock_findcreate(infra, p->str, 0);
+ if(!d)
+ return 0;
+ d->limit = atoi(p->str2);
+ }
+ for(p = cfg->wait_limit_cookie_netblock; p; p = p->next) {
+ d = wait_limit_netblock_findcreate(infra, p->str, 1);
+ if(!d)
+ return 0;
+ d->limit = atoi(p->str2);
+ }
+ return 1;
+}
+
+/** setup wait limits tree (0 on failure) */
+static int
+setup_wait_limits(struct infra_cache* infra, struct config_file* cfg)
+{
+ addr_tree_init(&infra->wait_limits_netblock);
+ addr_tree_init(&infra->wait_limits_cookie_netblock);
+ if(!infra_wait_limit_netblock_insert(infra, cfg))
+ return 0;
+ addr_tree_init_parents(&infra->wait_limits_netblock);
+ addr_tree_init_parents(&infra->wait_limits_cookie_netblock);
+ return 1;
+}
+
struct infra_cache*
infra_create(struct config_file* cfg)
{
@@ -267,6 +342,10 @@ infra_create(struct config_file* cfg)
infra_delete(infra);
return NULL;
}
+ if(!setup_wait_limits(infra, cfg)) {
+ infra_delete(infra);
+ return NULL;
+ }
infra_ip_ratelimit = cfg->ip_ratelimit;
infra->client_ip_rates = slabhash_create(cfg->ip_ratelimit_slabs,
INFRA_HOST_STARTSIZE, cfg->ip_ratelimit_size, &ip_rate_sizefunc,
@@ -287,6 +366,12 @@ static void domain_limit_free(rbnode_type* n, void* ATTR_UNUSED(arg))
}
}
+/** delete wait_limit_netblock_info entries */
+static void wait_limit_netblock_del(rbnode_type* n, void* ATTR_UNUSED(arg))
+{
+ free(n);
+}
+
void
infra_delete(struct infra_cache* infra)
{
@@ -296,6 +381,10 @@ infra_delete(struct infra_cache* infra)
slabhash_delete(infra->domain_rates);
traverse_postorder(&infra->domain_limits, domain_limit_free, NULL);
slabhash_delete(infra->client_ip_rates);
+ traverse_postorder(&infra->wait_limits_netblock,
+ wait_limit_netblock_del, NULL);
+ traverse_postorder(&infra->wait_limits_cookie_netblock,
+ wait_limit_netblock_del, NULL);
free(infra);
}
@@ -880,7 +969,8 @@ static void infra_create_ratedata(struct infra_cache* infra,
/** create rate data item for ip address */
static void infra_ip_create_ratedata(struct infra_cache* infra,
- struct sockaddr_storage* addr, socklen_t addrlen, time_t timenow)
+ struct sockaddr_storage* addr, socklen_t addrlen, time_t timenow,
+ int mesh_wait)
{
hashvalue_type h = hash_addr(addr, addrlen, 0);
struct ip_rate_key* k = (struct ip_rate_key*)calloc(1, sizeof(*k));
@@ -898,6 +988,7 @@ static void infra_ip_create_ratedata(struct infra_cache* infra,
k->entry.data = d;
d->qps[0] = 1;
d->timestamp[0] = timenow;
+ d->mesh_wait = mesh_wait;
slabhash_insert(infra->client_ip_rates, h, &k->entry, d, NULL);
}
@@ -1121,6 +1212,81 @@ int infra_ip_ratelimit_inc(struct infra_cache* infra,
}
/* create */
- infra_ip_create_ratedata(infra, addr, addrlen, timenow);
+ infra_ip_create_ratedata(infra, addr, addrlen, timenow, 0);
return 1;
}
+
+int infra_wait_limit_allowed(struct infra_cache* infra, struct comm_reply* rep,
+ int cookie_valid, struct config_file* cfg)
+{
+ struct lruhash_entry* entry;
+ if(cfg->wait_limit == 0)
+ return 1;
+
+ entry = infra_find_ip_ratedata(infra, &rep->client_addr,
+ rep->client_addrlen, 0);
+ if(entry) {
+ rbtree_type* tree;
+ struct wait_limit_netblock_info* w;
+ struct rate_data* d = (struct rate_data*)entry->data;
+ int mesh_wait = d->mesh_wait;
+ lock_rw_unlock(&entry->lock);
+
+ /* have the wait amount, check how much is allowed */
+ if(cookie_valid)
+ tree = &infra->wait_limits_cookie_netblock;
+ else tree = &infra->wait_limits_netblock;
+ w = (struct wait_limit_netblock_info*)addr_tree_lookup(tree,
+ &rep->client_addr, rep->client_addrlen);
+ if(w) {
+ if(w->limit != -1 && mesh_wait > w->limit)
+ return 0;
+ } else {
+ /* if there is no IP netblock specific information,
+ * use the configured value. */
+ if(mesh_wait > (cookie_valid?cfg->wait_limit_cookie:
+ cfg->wait_limit))
+ return 0;
+ }
+ }
+ return 1;
+}
+
+void infra_wait_limit_inc(struct infra_cache* infra, struct comm_reply* rep,
+ time_t timenow, struct config_file* cfg)
+{
+ struct lruhash_entry* entry;
+ if(cfg->wait_limit == 0)
+ return;
+
+ /* Find it */
+ entry = infra_find_ip_ratedata(infra, &rep->client_addr,
+ rep->client_addrlen, 1);
+ if(entry) {
+ struct rate_data* d = (struct rate_data*)entry->data;
+ d->mesh_wait++;
+ lock_rw_unlock(&entry->lock);
+ return;
+ }
+
+ /* Create it */
+ infra_ip_create_ratedata(infra, &rep->client_addr,
+ rep->client_addrlen, timenow, 1);
+}
+
+void infra_wait_limit_dec(struct infra_cache* infra, struct comm_reply* rep,
+ struct config_file* cfg)
+{
+ struct lruhash_entry* entry;
+ if(cfg->wait_limit == 0)
+ return;
+
+ entry = infra_find_ip_ratedata(infra, &rep->client_addr,
+ rep->client_addrlen, 1);
+ if(entry) {
+ struct rate_data* d = (struct rate_data*)entry->data;
+ if(d->mesh_wait > 0)
+ d->mesh_wait--;
+ lock_rw_unlock(&entry->lock);
+ }
+}
diff --git a/contrib/unbound/services/cache/infra.h b/contrib/unbound/services/cache/infra.h
index 525073bf35bb..ee6f384de345 100644
--- a/contrib/unbound/services/cache/infra.h
+++ b/contrib/unbound/services/cache/infra.h
@@ -122,6 +122,10 @@ struct infra_cache {
rbtree_type domain_limits;
/** hash table with query rates per client ip: ip_rate_key, ip_rate_data */
struct slabhash* client_ip_rates;
+ /** tree of addr_tree_node, with wait_limit_netblock_info information */
+ rbtree_type wait_limits_netblock;
+ /** tree of addr_tree_node, with wait_limit_netblock_info information */
+ rbtree_type wait_limits_cookie_netblock;
};
/** ratelimit, unless overridden by domain_limits, 0 is off */
@@ -184,10 +188,22 @@ struct rate_data {
/** what the timestamp is of the qps array members, counter is
* valid for that timestamp. Usually now and now-1. */
time_t timestamp[RATE_WINDOW];
+ /** the number of queries waiting in the mesh */
+ int mesh_wait;
};
#define ip_rate_data rate_data
+/**
+ * Data to store the configuration per netblock for the wait limit
+ */
+struct wait_limit_netblock_info {
+ /** The addr tree node, this must be first. */
+ struct addr_tree_node node;
+ /** the limit on the amount */
+ int limit;
+};
+
/** infra host cache default hash lookup size */
#define INFRA_HOST_STARTSIZE 32
/** bytes per zonename reserved in the hostcache, dnamelen(zonename.com.) */
@@ -474,4 +490,16 @@ void ip_rate_delkeyfunc(void* d, void* arg);
/* delete data */
#define ip_rate_deldatafunc rate_deldatafunc
+/** See if the IP address can have another reply in the wait limit */
+int infra_wait_limit_allowed(struct infra_cache* infra, struct comm_reply* rep,
+ int cookie_valid, struct config_file* cfg);
+
+/** Increment number of waiting replies for IP */
+void infra_wait_limit_inc(struct infra_cache* infra, struct comm_reply* rep,
+ time_t timenow, struct config_file* cfg);
+
+/** Decrement number of waiting replies for IP */
+void infra_wait_limit_dec(struct infra_cache* infra, struct comm_reply* rep,
+ struct config_file* cfg);
+
#endif /* SERVICES_CACHE_INFRA_H */
diff --git a/contrib/unbound/services/cache/rrset.c b/contrib/unbound/services/cache/rrset.c
index 4e3d08bdaaf5..2c03214c8fe2 100644
--- a/contrib/unbound/services/cache/rrset.c
+++ b/contrib/unbound/services/cache/rrset.c
@@ -46,6 +46,7 @@
#include "util/data/packed_rrset.h"
#include "util/data/msgreply.h"
#include "util/data/msgparse.h"
+#include "util/data/dname.h"
#include "util/regional.h"
#include "util/alloc.h"
#include "util/net_help.h"
@@ -127,6 +128,9 @@ need_to_update_rrset(void* nd, void* cd, time_t timenow, int equal, int ns)
{
struct packed_rrset_data* newd = (struct packed_rrset_data*)nd;
struct packed_rrset_data* cached = (struct packed_rrset_data*)cd;
+ /* o if new data is expired, current data is better */
+ if( newd->ttl < timenow && cached->ttl >= timenow)
+ return 0;
/* o store if rrset has been validated
* everything better than bogus data
* secure is preferred */
@@ -440,6 +444,89 @@ rrset_check_sec_status(struct rrset_cache* r,
lock_rw_unlock(&e->lock);
}
+void
+rrset_cache_remove_above(struct rrset_cache* r, uint8_t** qname, size_t*
+ qnamelen, uint16_t searchtype, uint16_t qclass, time_t now, uint8_t*
+ qnametop, size_t qnametoplen)
+{
+ struct ub_packed_rrset_key *rrset;
+ uint8_t lablen;
+
+ while(*qnamelen > 0) {
+ /* look one label higher */
+ lablen = **qname;
+ *qname += lablen + 1;
+ *qnamelen -= lablen + 1;
+ if(*qnamelen <= 0)
+ return;
+
+ /* stop at qnametop */
+ if(qnametop && *qnamelen == qnametoplen &&
+ query_dname_compare(*qname, qnametop)==0)
+ return;
+
+ if(verbosity >= VERB_ALGO) {
+ /* looks up with a time of 0, to see expired entries */
+ if((rrset = rrset_cache_lookup(r, *qname,
+ *qnamelen, searchtype, qclass, 0, 0, 0))) {
+ struct packed_rrset_data* data =
+ (struct packed_rrset_data*)rrset->entry.data;
+ int expired = (now > data->ttl);
+ lock_rw_unlock(&rrset->entry.lock);
+ if(expired)
+ log_nametypeclass(verbosity, "this "
+ "(grand)parent rrset will be "
+ "removed (expired)",
+ *qname, searchtype, qclass);
+ else log_nametypeclass(verbosity, "this "
+ "(grand)parent rrset will be "
+ "removed",
+ *qname, searchtype, qclass);
+ }
+ }
+ rrset_cache_remove(r, *qname, *qnamelen, searchtype, qclass, 0);
+ }
+}
+
+int
+rrset_cache_expired_above(struct rrset_cache* r, uint8_t** qname, size_t*
+ qnamelen, uint16_t searchtype, uint16_t qclass, time_t now, uint8_t*
+ qnametop, size_t qnametoplen)
+{
+ struct ub_packed_rrset_key *rrset;
+ uint8_t lablen;
+
+ while(*qnamelen > 0) {
+ /* look one label higher */
+ lablen = **qname;
+ *qname += lablen + 1;
+ *qnamelen -= lablen + 1;
+ if(*qnamelen <= 0)
+ break;
+
+ /* looks up with a time of 0, to see expired entries */
+ if((rrset = rrset_cache_lookup(r, *qname,
+ *qnamelen, searchtype, qclass, 0, 0, 0))) {
+ struct packed_rrset_data* data =
+ (struct packed_rrset_data*)rrset->entry.data;
+ if(now > data->ttl) {
+ /* it is expired, this is not wanted */
+ lock_rw_unlock(&rrset->entry.lock);
+ log_nametypeclass(VERB_ALGO, "this rrset is expired", *qname, searchtype, qclass);
+ return 1;
+ }
+ /* it is not expired, continue looking */
+ lock_rw_unlock(&rrset->entry.lock);
+ }
+
+ /* do not look above the qnametop. */
+ if(qnametop && *qnamelen == qnametoplen &&
+ query_dname_compare(*qname, qnametop)==0)
+ break;
+ }
+ return 0;
+}
+
void rrset_cache_remove(struct rrset_cache* r, uint8_t* nm, size_t nmlen,
uint16_t type, uint16_t dclass, uint32_t flags)
{
diff --git a/contrib/unbound/services/cache/rrset.h b/contrib/unbound/services/cache/rrset.h
index 7c36d4032ebc..6db79d90f532 100644
--- a/contrib/unbound/services/cache/rrset.h
+++ b/contrib/unbound/services/cache/rrset.h
@@ -232,6 +232,37 @@ void rrset_check_sec_status(struct rrset_cache* r,
struct ub_packed_rrset_key* rrset, time_t now);
/**
+ * Removes rrsets above the qname, returns upper qname.
+ * @param r: the rrset cache.
+ * @param qname: the start qname, also used as the output.
+ * @param qnamelen: length of qname, updated when it returns.
+ * @param searchtype: qtype to search for.
+ * @param qclass: qclass to search for.
+ * @param now: current time.
+ * @param qnametop: the top qname to stop removal (it is not removed).
+ * @param qnametoplen: length of qnametop.
+ */
+void rrset_cache_remove_above(struct rrset_cache* r, uint8_t** qname,
+ size_t* qnamelen, uint16_t searchtype, uint16_t qclass, time_t now,
+ uint8_t* qnametop, size_t qnametoplen);
+
+/**
+ * Sees if an rrset is expired above the qname, returns upper qname.
+ * @param r: the rrset cache.
+ * @param qname: the start qname, also used as the output.
+ * @param qnamelen: length of qname, updated when it returns.
+ * @param searchtype: qtype to search for.
+ * @param qclass: qclass to search for.
+ * @param now: current time.
+ * @param qnametop: the top qname, don't look farther than that.
+ * @param qnametoplen: length of qnametop.
+ * @return true if there is an expired rrset above, false otherwise.
+ */
+int rrset_cache_expired_above(struct rrset_cache* r, uint8_t** qname,
+ size_t* qnamelen, uint16_t searchtype, uint16_t qclass, time_t now,
+ uint8_t* qnametop, size_t qnametoplen);
+
+/**
* Remove an rrset from the cache, by name and type and flags
* @param r: rrset cache
* @param nm: name of rrset
diff --git a/contrib/unbound/services/listen_dnsport.c b/contrib/unbound/services/listen_dnsport.c
index 753550978a07..7eb59a1618a1 100644
--- a/contrib/unbound/services/listen_dnsport.c
+++ b/contrib/unbound/services/listen_dnsport.c
@@ -140,9 +140,11 @@ void
verbose_print_unbound_socket(struct unbound_socket* ub_sock)
{
if(verbosity >= VERB_ALGO) {
+ char buf[256];
log_info("listing of unbound_socket structure:");
- verbose_print_addr(ub_sock->addr);
- log_info("s is: %d, fam is: %s, acl: %s", ub_sock->s,
+ addr_to_str((void*)ub_sock->addr, ub_sock->addrlen, buf,
+ sizeof(buf));
+ log_info("%s s is: %d, fam is: %s, acl: %s", buf, ub_sock->s,
ub_sock->fam == AF_INET?"AF_INET":"AF_INET6",
ub_sock->acl?"yes":"no");
}
@@ -610,7 +612,9 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
# elif defined(IP_DONTFRAG) && !defined(__APPLE__)
/* the IP_DONTFRAG option if defined in the 11.0 OSX headers,
* but does not work on that version, so we exclude it */
- int off = 0;
+ /* a nonzero value disables fragmentation, according to
+ * docs.oracle.com for ip(4). */
+ int off = 1;
if (setsockopt(s, IPPROTO_IP, IP_DONTFRAG,
&off, (socklen_t)sizeof(off)) < 0) {
log_err("setsockopt(..., IP_DONTFRAG, ...) failed: %s",
@@ -1047,7 +1051,22 @@ make_sock(int stype, const char* ifname, const char* port,
}
}
- ub_sock->addr = res;
+ if(!res->ai_addr) {
+ log_err("getaddrinfo returned no address");
+ freeaddrinfo(res);
+ sock_close(s);
+ return -1;
+ }
+ ub_sock->addr = memdup(res->ai_addr, res->ai_addrlen);
+ ub_sock->addrlen = res->ai_addrlen;
+ if(!ub_sock->addr) {
+ log_err("out of memory: allocate listening address");
+ freeaddrinfo(res);
+ sock_close(s);
+ return -1;
+ }
+ freeaddrinfo(res);
+
ub_sock->s = s;
ub_sock->fam = hints->ai_family;
ub_sock->acl = NULL;
@@ -1277,8 +1296,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
&noip6, rcv, snd, reuseport, transparent,
tcp_mss, nodelay, freebind, use_systemd, dscp, ub_sock)) == -1) {
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
if(noip6) {
log_warn("IPv6 protocol not available");
@@ -1289,8 +1307,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
/* getting source addr packet info is highly non-portable */
if(!set_recvpktinfo(s, hints->ai_family)) {
sock_close(s);
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
return 0;
}
@@ -1301,8 +1318,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
?listen_type_udpancil_dnscrypt:listen_type_udpancil,
is_pp2, ub_sock)) {
sock_close(s);
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
return 0;
}
@@ -1314,8 +1330,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
&noip6, rcv, snd, reuseport, transparent,
tcp_mss, nodelay, freebind, use_systemd, dscp, ub_sock)) == -1) {
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
if(noip6) {
log_warn("IPv6 protocol not available");
@@ -1332,8 +1347,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
listen_type_udpancil:listen_type_udp),
is_pp2, ub_sock)) {
sock_close(s);
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
return 0;
}
@@ -1356,8 +1370,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
if((s = make_sock_port(SOCK_STREAM, ifname, port, hints, 1,
&noip6, 0, 0, reuseport, transparent, tcp_mss, nodelay,
freebind, use_systemd, dscp, ub_sock)) == -1) {
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
if(noip6) {
/*log_warn("IPv6 protocol not available");*/
@@ -1369,8 +1382,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
verbose(VERB_ALGO, "setup TCP for SSL service");
if(!port_insert(list, s, port_type, is_pp2, ub_sock)) {
sock_close(s);
- if(ub_sock->addr)
- freeaddrinfo(ub_sock->addr);
+ free(ub_sock->addr);
free(ub_sock);
return 0;
}
@@ -1952,8 +1964,7 @@ void listening_ports_free(struct listen_port* list)
}
/* rc_ports don't have ub_socket */
if(list->socket) {
- if(list->socket->addr)
- freeaddrinfo(list->socket->addr);
+ free(list->socket->addr);
free(list->socket);
}
free(list);
diff --git a/contrib/unbound/services/listen_dnsport.h b/contrib/unbound/services/listen_dnsport.h
index 816d79aea61b..84ac4b068b1b 100644
--- a/contrib/unbound/services/listen_dnsport.h
+++ b/contrib/unbound/services/listen_dnsport.h
@@ -107,11 +107,13 @@ enum listen_type {
* socket properties (just like NSD nsd_socket structure definition)
*/
struct unbound_socket {
- /** socket-address structure */
- struct addrinfo* addr;
+ /** the address of the socket */
+ struct sockaddr* addr;
+ /** length of the address */
+ socklen_t addrlen;
/** socket descriptor returned by socket() syscall */
int s;
- /** address family (AF_INET/IF_INET6) */
+ /** address family (AF_INET/AF_INET6) */
int fam;
/** ACL on the socket (listening interface) */
struct acl_addr* acl;
diff --git a/contrib/unbound/services/localzone.c b/contrib/unbound/services/localzone.c
index 9c8e3c7acb16..51056c8ffef4 100644
--- a/contrib/unbound/services/localzone.c
+++ b/contrib/unbound/services/localzone.c
@@ -330,14 +330,16 @@ get_rr_nameclass(const char* str, uint8_t** nm, uint16_t* dclass,
static struct local_rrset*
local_data_find_type(struct local_data* data, uint16_t type, int alias_ok)
{
- struct local_rrset* p;
+ struct local_rrset* p, *cname = NULL;
type = htons(type);
for(p = data->rrsets; p; p = p->next) {
if(p->rrset->rk.type == type)
return p;
if(alias_ok && p->rrset->rk.type == htons(LDNS_RR_TYPE_CNAME))
- return p;
+ cname = p;
}
+ if(alias_ok)
+ return cname;
return NULL;
}
diff --git a/contrib/unbound/services/mesh.c b/contrib/unbound/services/mesh.c
index 47cfb04249b5..e886c4b92c84 100644
--- a/contrib/unbound/services/mesh.c
+++ b/contrib/unbound/services/mesh.c
@@ -47,6 +47,7 @@
#include "services/outbound_list.h"
#include "services/cache/dns.h"
#include "services/cache/rrset.h"
+#include "services/cache/infra.h"
#include "util/log.h"
#include "util/net_help.h"
#include "util/module.h"
@@ -385,7 +386,7 @@ mesh_serve_expired_init(struct mesh_state* mstate, int timeout)
&mesh_serve_expired_lookup;
/* In case this timer already popped, start it again */
- if(!mstate->s.serve_expired_data->timer) {
+ if(!mstate->s.serve_expired_data->timer && timeout != -1) {
mstate->s.serve_expired_data->timer = comm_timer_create(
mstate->s.env->worker_base, mesh_serve_expired_callback, mstate);
if(!mstate->s.serve_expired_data->timer)
@@ -415,6 +416,14 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
if(rep->c->tcp_req_info) {
r_buffer = rep->c->tcp_req_info->spool_buffer;
}
+ if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
+ edns->cookie_valid, mesh->env->cfg)) {
+ verbose(VERB_ALGO, "Too many queries waiting from the IP. "
+ "dropping incoming query.");
+ comm_point_drop_reply(rep);
+ mesh->stats_dropped++;
+ return;
+ }
if(!unique)
s = mesh_area_find(mesh, cinfo, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
/* does this create a new reply state? */
@@ -511,6 +520,19 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
log_err("mesh_new_client: out of memory initializing serve expired");
goto servfail_mem;
}
+#ifdef USE_CACHEDB
+ if(!timeout && mesh->env->cfg->serve_expired &&
+ !mesh->env->cfg->serve_expired_client_timeout &&
+ (mesh->env->cachedb_enabled &&
+ mesh->env->cfg->cachedb_check_when_serve_expired)) {
+ if(!mesh_serve_expired_init(s, -1)) {
+ log_err("mesh_new_client: out of memory initializing serve expired");
+ goto servfail_mem;
+ }
+ }
+#endif
+ infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
+ mesh->env->cfg);
/* update statistics */
if(was_detached) {
log_assert(mesh->num_detached_states > 0);
@@ -616,6 +638,18 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
mesh_state_delete(&s->s);
return 0;
}
+#ifdef USE_CACHEDB
+ if(!timeout && mesh->env->cfg->serve_expired &&
+ !mesh->env->cfg->serve_expired_client_timeout &&
+ (mesh->env->cachedb_enabled &&
+ mesh->env->cfg->cachedb_check_when_serve_expired)) {
+ if(!mesh_serve_expired_init(s, -1)) {
+ if(added)
+ mesh_state_delete(&s->s);
+ return 0;
+ }
+ }
+#endif
/* update statistics */
if(was_detached) {
log_assert(mesh->num_detached_states > 0);
@@ -930,6 +964,8 @@ mesh_state_cleanup(struct mesh_state* mstate)
* takes no time and also it does not do the mesh accounting */
mstate->reply_list = NULL;
for(; rep; rep=rep->next) {
+ infra_wait_limit_dec(mesh->env->infra_cache,
+ &rep->query_reply, mesh->env->cfg);
comm_point_drop_reply(&rep->query_reply);
log_assert(mesh->num_reply_addrs > 0);
mesh->num_reply_addrs--;
@@ -1179,7 +1215,7 @@ mesh_do_callback(struct mesh_state* m, int rcode, struct reply_info* rep,
rcode = LDNS_RCODE_SERVFAIL;
if(!rcode && rep && (rep->security == sec_status_bogus ||
rep->security == sec_status_secure_sentinel_fail)) {
- if(!(reason = errinf_to_str_bogus(&m->s)))
+ if(!(reason = errinf_to_str_bogus(&m->s, NULL)))
rcode = LDNS_RCODE_SERVFAIL;
}
/* send the reply */
@@ -1413,6 +1449,8 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
comm_point_send_reply(&r->query_reply);
m->reply_list = rlist;
}
+ infra_wait_limit_dec(m->s.env->infra_cache, &r->query_reply,
+ m->s.env->cfg);
/* account */
log_assert(m->s.env->mesh->num_reply_addrs > 0);
m->s.env->mesh->num_reply_addrs--;
@@ -1436,7 +1474,7 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
log_reply_info(NO_VERBOSE, &m->s.qinfo,
&r->query_reply.client_addr,
r->query_reply.client_addrlen, duration, 0, r_buffer,
- (m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr->ai_addr:NULL),
+ (m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
r->query_reply.c->type);
}
}
@@ -1464,12 +1502,32 @@ void mesh_query_done(struct mesh_state* mstate)
&& mstate->s.env->cfg->log_servfail
&& !mstate->s.env->cfg->val_log_squelch) {
char* err = errinf_to_str_servfail(&mstate->s);
- if(err)
- log_err("%s", err);
- free(err);
+ if(err) { log_err("%s", err); }
}
}
for(r = mstate->reply_list; r; r = r->next) {
+ struct timeval old;
+ timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
+ if(mstate->s.env->cfg->discard_timeout != 0 &&
+ ((int)old.tv_sec)*1000+((int)old.tv_usec)/1000 >
+ mstate->s.env->cfg->discard_timeout) {
+ /* Drop the reply, it is too old */
+ /* briefly set the reply_list to NULL, so that the
+ * tcp req info cleanup routine that calls the mesh
+ * to deregister the meshstate for it is not done
+ * because the list is NULL and also accounting is not
+ * done there, but instead we do that here. */
+ struct mesh_reply* reply_list = mstate->reply_list;
+ verbose(VERB_ALGO, "drop reply, it is older than discard-timeout");
+ infra_wait_limit_dec(mstate->s.env->infra_cache,
+ &r->query_reply, mstate->s.env->cfg);
+ mstate->reply_list = NULL;
+ comm_point_drop_reply(&r->query_reply);
+ mstate->reply_list = reply_list;
+ mstate->s.env->mesh->stats_dropped++;
+ continue;
+ }
+
i++;
tv = r->start_time;
@@ -1493,6 +1551,8 @@ void mesh_query_done(struct mesh_state* mstate)
* because the list is NULL and also accounting is not
* done there, but instead we do that here. */
struct mesh_reply* reply_list = mstate->reply_list;
+ infra_wait_limit_dec(mstate->s.env->infra_cache,
+ &r->query_reply, mstate->s.env->cfg);
mstate->reply_list = NULL;
comm_point_drop_reply(&r->query_reply);
mstate->reply_list = reply_list;
@@ -2025,6 +2085,8 @@ void mesh_state_remove_reply(struct mesh_area* mesh, struct mesh_state* m,
/* delete it, but allocated in m region */
log_assert(mesh->num_reply_addrs > 0);
mesh->num_reply_addrs--;
+ infra_wait_limit_dec(mesh->env->infra_cache,
+ &n->query_reply, mesh->env->cfg);
/* prev = prev; */
n = n->next;
@@ -2165,6 +2227,28 @@ mesh_serve_expired_callback(void* arg)
log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
for(r = mstate->reply_list; r; r = r->next) {
+ struct timeval old;
+ timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
+ if(mstate->s.env->cfg->discard_timeout != 0 &&
+ ((int)old.tv_sec)*1000+((int)old.tv_usec)/1000 >
+ mstate->s.env->cfg->discard_timeout) {
+ /* Drop the reply, it is too old */
+ /* briefly set the reply_list to NULL, so that the
+ * tcp req info cleanup routine that calls the mesh
+ * to deregister the meshstate for it is not done
+ * because the list is NULL and also accounting is not
+ * done there, but instead we do that here. */
+ struct mesh_reply* reply_list = mstate->reply_list;
+ verbose(VERB_ALGO, "drop reply, it is older than discard-timeout");
+ infra_wait_limit_dec(mstate->s.env->infra_cache,
+ &r->query_reply, mstate->s.env->cfg);
+ mstate->reply_list = NULL;
+ comm_point_drop_reply(&r->query_reply);
+ mstate->reply_list = reply_list;
+ mstate->s.env->mesh->stats_dropped++;
+ continue;
+ }
+
i++;
tv = r->start_time;
@@ -2192,6 +2276,8 @@ mesh_serve_expired_callback(void* arg)
r, r_buffer, prev, prev_buffer);
if(r->query_reply.c->tcp_req_info)
tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate);
+ infra_wait_limit_dec(mstate->s.env->infra_cache,
+ &r->query_reply, mstate->s.env->cfg);
prev = r;
prev_buffer = r_buffer;
}
@@ -2238,6 +2324,14 @@ mesh_serve_expired_callback(void* arg)
}
}
+void
+mesh_respond_serve_expired(struct mesh_state* mstate)
+{
+ if(!mstate->s.serve_expired_data)
+ mesh_serve_expired_init(mstate, -1);
+ mesh_serve_expired_callback(mstate);
+}
+
int mesh_jostle_exceeded(struct mesh_area* mesh)
{
if(mesh->all.count < mesh->max_reply_states)
diff --git a/contrib/unbound/services/mesh.h b/contrib/unbound/services/mesh.h
index d926cfc9dec3..5bd53e065e8f 100644
--- a/contrib/unbound/services/mesh.h
+++ b/contrib/unbound/services/mesh.h
@@ -690,4 +690,10 @@ mesh_serve_expired_lookup(struct module_qstate* qstate,
*/
int mesh_jostle_exceeded(struct mesh_area* mesh);
+/**
+ * Give the serve expired responses.
+ * @param mstate: mesh state for query that has serve_expired_data.
+ */
+void mesh_respond_serve_expired(struct mesh_state* mstate);
+
#endif /* SERVICES_MESH_H */
diff --git a/contrib/unbound/services/rpz.c b/contrib/unbound/services/rpz.c
index 18d76c07bff3..f036cc5fd649 100644
--- a/contrib/unbound/services/rpz.c
+++ b/contrib/unbound/services/rpz.c
@@ -478,43 +478,30 @@ new_cname_override(struct regional* region, uint8_t* ct, size_t ctlen)
return rrset;
}
-struct rpz*
-rpz_create(struct config_auth* p)
+/** delete the cname override */
+static void
+delete_cname_override(struct rpz* r)
{
- struct rpz* r = calloc(1, sizeof(*r));
- if(!r)
- goto err;
-
- r->region = regional_create_custom(sizeof(struct regional));
- if(!r->region) {
- goto err;
- }
-
- if(!(r->local_zones = local_zones_create())){
- goto err;
- }
-
- r->nsdname_zones = local_zones_create();
- if(r->local_zones == NULL){
- goto err;
- }
-
- if(!(r->respip_set = respip_set_create())) {
- goto err;
- }
-
- r->client_set = rpz_clientip_synthesized_set_create();
- if(r->client_set == NULL) {
- goto err;
+ if(r->cname_override) {
+ /* The cname override is what is allocated in the region. */
+ regional_free_all(r->region);
+ r->cname_override = NULL;
}
+}
- r->ns_set = rpz_clientip_synthesized_set_create();
- if(r->ns_set == NULL) {
- goto err;
+/** Apply rpz config elements to the rpz structure, false on failure. */
+static int
+rpz_apply_cfg_elements(struct rpz* r, struct config_auth* p)
+{
+ if(p->rpz_taglist && p->rpz_taglistlen) {
+ r->taglistlen = p->rpz_taglistlen;
+ r->taglist = memdup(p->rpz_taglist, r->taglistlen);
+ if(!r->taglist) {
+ log_err("malloc failure on RPZ taglist alloc");
+ return 0;
+ }
}
- r->taglistlen = p->rpz_taglistlen;
- r->taglist = memdup(p->rpz_taglist, r->taglistlen);
if(p->rpz_action_override) {
r->action_override = rpz_config_to_action(p->rpz_action_override);
}
@@ -528,17 +515,17 @@ rpz_create(struct config_auth* p)
if(!p->rpz_cname) {
log_err("rpz: override with cname action found, but no "
"rpz-cname-override configured");
- goto err;
+ return 0;
}
if(sldns_str2wire_dname_buf(p->rpz_cname, nm, &nmlen) != 0) {
log_err("rpz: cannot parse cname override: %s",
p->rpz_cname);
- goto err;
+ return 0;
}
r->cname_override = new_cname_override(r->region, nm, nmlen);
if(!r->cname_override) {
- goto err;
+ return 0;
}
}
r->log = p->rpz_log;
@@ -546,9 +533,49 @@ rpz_create(struct config_auth* p)
if(p->rpz_log_name) {
if(!(r->log_name = strdup(p->rpz_log_name))) {
log_err("malloc failure on RPZ log_name strdup");
- goto err;
+ return 0;
}
}
+ return 1;
+}
+
+struct rpz*
+rpz_create(struct config_auth* p)
+{
+ struct rpz* r = calloc(1, sizeof(*r));
+ if(!r)
+ goto err;
+
+ r->region = regional_create_custom(sizeof(struct regional));
+ if(!r->region) {
+ goto err;
+ }
+
+ if(!(r->local_zones = local_zones_create())){
+ goto err;
+ }
+
+ r->nsdname_zones = local_zones_create();
+ if(r->local_zones == NULL){
+ goto err;
+ }
+
+ if(!(r->respip_set = respip_set_create())) {
+ goto err;
+ }
+
+ r->client_set = rpz_clientip_synthesized_set_create();
+ if(r->client_set == NULL) {
+ goto err;
+ }
+
+ r->ns_set = rpz_clientip_synthesized_set_create();
+ if(r->ns_set == NULL) {
+ goto err;
+ }
+
+ if(!rpz_apply_cfg_elements(r, p))
+ goto err;
return r;
err:
if(r) {
@@ -571,6 +598,32 @@ err:
return NULL;
}
+int
+rpz_config(struct rpz* r, struct config_auth* p)
+{
+ /* If the zonefile changes, it is read later, after which
+ * rpz_clear and rpz_finish_config is called. */
+
+ /* free taglist, if any */
+ if(r->taglist) {
+ free(r->taglist);
+ r->taglist = NULL;
+ r->taglistlen = 0;
+ }
+
+ /* free logname, if any */
+ if(r->log_name) {
+ free(r->log_name);
+ r->log_name = NULL;
+ }
+
+ delete_cname_override(r);
+
+ if(!rpz_apply_cfg_elements(r, p))
+ return 0;
+ return 1;
+}
+
/**
* Remove RPZ zone name from dname
* Copy dname to newdname, without the originlen number of trailing bytes
@@ -1191,16 +1244,20 @@ rpz_find_zone(struct local_zones* zones, uint8_t* qname, size_t qname_len, uint1
/** Find entry for RR type in the list of rrsets for the clientip. */
static struct local_rrset*
rpz_find_synthesized_rrset(uint16_t qtype,
- struct clientip_synthesized_rr* data)
+ struct clientip_synthesized_rr* data, int alias_ok)
{
- struct local_rrset* cursor = data->data;
+ struct local_rrset* cursor = data->data, *cname = NULL;
while( cursor != NULL) {
struct packed_rrset_key* packed_rrset = &cursor->rrset->rk;
if(htons(qtype) == packed_rrset->type) {
return cursor;
}
+ if(ntohs(packed_rrset->type) == LDNS_RR_TYPE_CNAME && alias_ok)
+ cname = cursor;
cursor = cursor->next;
}
+ if(alias_ok)
+ return cname;
return NULL;
}
@@ -1386,7 +1443,7 @@ static int rpz_remove_clientip_rr(struct clientip_synthesized_rr* node,
struct local_rrset* rrset;
struct packed_rrset_data* d;
size_t index;
- rrset = rpz_find_synthesized_rrset(rr_type, node);
+ rrset = rpz_find_synthesized_rrset(rr_type, node, 0);
if(rrset == NULL)
return 0; /* type not found, ignore */
d = (struct packed_rrset_data*)rrset->rrset->entry.data;
@@ -1789,7 +1846,7 @@ rpz_apply_clientip_localdata_action(struct clientip_synthesized_rr* raddr,
}
/* check query type / rr type */
- rrset = rpz_find_synthesized_rrset(qinfo->qtype, raddr);
+ rrset = rpz_find_synthesized_rrset(qinfo->qtype, raddr, 1);
if(rrset == NULL) {
verbose(VERB_ALGO, "rpz: unable to find local-data for query");
rrset_count = 0;
@@ -1823,6 +1880,28 @@ nodata:
rrset_count, rcode, rsoa);
}
+/** Apply the cname override action, during worker request callback.
+ * false on failure. */
+static int
+rpz_apply_cname_override_action(struct rpz* r,
+ struct query_info* qinfo, struct regional* temp)
+{
+ if(!r)
+ return 0;
+ qinfo->local_alias = regional_alloc_zero(temp,
+ sizeof(struct local_rrset));
+ if(qinfo->local_alias == NULL)
+ return 0; /* out of memory */
+ qinfo->local_alias->rrset = respip_copy_rrset(r->cname_override, temp);
+ if(qinfo->local_alias->rrset == NULL) {
+ qinfo->local_alias = NULL;
+ return 0; /* out of memory */
+ }
+ qinfo->local_alias->rrset->rk.dname = qinfo->qname;
+ qinfo->local_alias->rrset->rk.dname_len = qinfo->qname_len;
+ return 1;
+}
+
/** add additional section SOA record to the reply.
* Since this gets fed into the normal iterator answer creation, it
* gets minimal-responses applied to it, that can remove the additional SOA
@@ -1933,6 +2012,7 @@ rpz_synthesize_localdata_from_rrset(struct rpz* ATTR_UNUSED(r), struct module_qs
msg = rpz_dns_msg_new(ms->region);
if(msg == NULL) { return NULL; }
+ msg->qinfo = *qi;
new_reply_info = construct_reply_info_base(ms->region,
LDNS_RCODE_NOERROR | BIT_QR | BIT_AA | BIT_RA,
1, /* qd */
@@ -1975,40 +2055,42 @@ rpz_synthesize_localdata_from_rrset(struct rpz* ATTR_UNUSED(r), struct module_qs
static inline struct dns_msg*
rpz_synthesize_nsip_localdata(struct rpz* r, struct module_qstate* ms,
- struct clientip_synthesized_rr* data, struct auth_zone* az)
+ struct query_info* qi, struct clientip_synthesized_rr* data,
+ struct auth_zone* az)
{
- struct query_info* qi = &ms->qinfo;
struct local_rrset* rrset;
- rrset = rpz_find_synthesized_rrset(qi->qtype, data);
+ rrset = rpz_find_synthesized_rrset(qi->qtype, data, 1);
if(rrset == NULL) {
verbose(VERB_ALGO, "rpz: nsip: no matching local data found");
return NULL;
}
- return rpz_synthesize_localdata_from_rrset(r, ms, &ms->qinfo, rrset, az);
+ return rpz_synthesize_localdata_from_rrset(r, ms, qi, rrset, az);
}
/* copy'n'paste from localzone.c */
static struct local_rrset*
local_data_find_type(struct local_data* data, uint16_t type, int alias_ok)
{
- struct local_rrset* p;
+ struct local_rrset* p, *cname = NULL;
type = htons(type);
for(p = data->rrsets; p; p = p->next) {
if(p->rrset->rk.type == type)
return p;
if(alias_ok && p->rrset->rk.type == htons(LDNS_RR_TYPE_CNAME))
- return p;
+ cname = p;
}
+ if(alias_ok)
+ return cname;
return NULL;
}
/* based on localzone.c:local_data_answer() */
static inline struct dns_msg*
rpz_synthesize_nsdname_localdata(struct rpz* r, struct module_qstate* ms,
- struct local_zone* z, struct matched_delegation_point const* match,
- struct auth_zone* az)
+ struct query_info* qi, struct local_zone* z,
+ struct matched_delegation_point const* match, struct auth_zone* az)
{
struct local_data key;
struct local_data* ld;
@@ -2029,13 +2111,13 @@ rpz_synthesize_nsdname_localdata(struct rpz* r, struct module_qstate* ms,
return NULL;
}
- rrset = local_data_find_type(ld, ms->qinfo.qtype, 1);
+ rrset = local_data_find_type(ld, qi->qtype, 1);
if(rrset == NULL) {
verbose(VERB_ALGO, "rpz: nsdname: no matching local data found");
return NULL;
}
- return rpz_synthesize_localdata_from_rrset(r, ms, &ms->qinfo, rrset, az);
+ return rpz_synthesize_localdata_from_rrset(r, ms, qi, rrset, az);
}
/* like local_data_answer for qname triggers after a cname */
@@ -2052,17 +2134,70 @@ rpz_synthesize_qname_localdata_msg(struct rpz* r, struct module_qstate* ms,
key.namelabs = dname_count_labels(qinfo->qname);
ld = (struct local_data*)rbtree_search(&z->data, &key.node);
if(ld == NULL) {
- verbose(VERB_ALGO, "rpz: qname after cname: name not found");
+ verbose(VERB_ALGO, "rpz: qname: name not found");
return NULL;
}
rrset = local_data_find_type(ld, qinfo->qtype, 1);
if(rrset == NULL) {
- verbose(VERB_ALGO, "rpz: qname after cname: type not found");
+ verbose(VERB_ALGO, "rpz: qname: type not found");
return NULL;
}
return rpz_synthesize_localdata_from_rrset(r, ms, qinfo, rrset, az);
}
+/** Synthesize a CNAME message for RPZ action override */
+static struct dns_msg*
+rpz_synthesize_cname_override_msg(struct rpz* r, struct module_qstate* ms,
+ struct query_info* qinfo)
+{
+ struct dns_msg* msg = NULL;
+ struct reply_info* new_reply_info;
+ struct ub_packed_rrset_key* rp;
+
+ msg = rpz_dns_msg_new(ms->region);
+ if(msg == NULL) { return NULL; }
+
+ msg->qinfo = *qinfo;
+ new_reply_info = construct_reply_info_base(ms->region,
+ LDNS_RCODE_NOERROR | BIT_QR | BIT_AA | BIT_RA,
+ 1, /* qd */
+ 0, /* ttl */
+ 0, /* prettl */
+ 0, /* expttl */
+ 1, /* an */
+ 0, /* ns */
+ 0, /* ar */
+ 1, /* total */
+ sec_status_insecure,
+ LDNS_EDE_NONE);
+ if(new_reply_info == NULL) {
+ log_err("out of memory");
+ return NULL;
+ }
+ new_reply_info->authoritative = 1;
+
+ rp = respip_copy_rrset(r->cname_override, ms->region);
+ if(rp == NULL) {
+ log_err("out of memory");
+ return NULL;
+ }
+ rp->rk.dname = qinfo->qname;
+ rp->rk.dname_len = qinfo->qname_len;
+ /* this rrset is from the rpz data, or synthesized.
+ * It is not actually from the network, so we flag it with this
+ * flags as a fake RRset. If later the cache is used to look up
+ * rrsets, then the fake ones are not returned (if you look without
+ * the flag). For like CNAME lookups from the iterator or A, AAAA
+ * lookups for nameserver targets, it would use the without flag
+ * actual data. So that the actual network data and fake data
+ * are kept track of separately. */
+ rp->rk.flags |= PACKED_RRSET_RPZ;
+ new_reply_info->rrsets[0] = rp;
+
+ msg->rep = new_reply_info;
+ return msg;
+}
+
static int
rpz_synthesize_qname_localdata(struct module_env* env, struct rpz* r,
struct local_zone* z, enum localzone_type lzt, struct query_info* qinfo,
@@ -2072,17 +2207,8 @@ rpz_synthesize_qname_localdata(struct module_env* env, struct rpz* r,
struct local_data* ld = NULL;
int ret = 0;
if(r->action_override == RPZ_CNAME_OVERRIDE_ACTION) {
- qinfo->local_alias = regional_alloc_zero(temp, sizeof(struct local_rrset));
- if(qinfo->local_alias == NULL) {
- return 0; /* out of memory */
- }
- qinfo->local_alias->rrset = regional_alloc_init(temp, r->cname_override,
- sizeof(*r->cname_override));
- if(qinfo->local_alias->rrset == NULL) {
- return 0; /* out of memory */
- }
- qinfo->local_alias->rrset->rk.dname = qinfo->qname;
- qinfo->local_alias->rrset->rk.dname_len = qinfo->qname_len;
+ if(!rpz_apply_cname_override_action(r, qinfo, temp))
+ return 0;
if(r->log) {
log_rpz_apply("qname", z->name, NULL, RPZ_CNAME_OVERRIDE_ACTION,
qinfo, repinfo, NULL, r->log_name);
@@ -2134,8 +2260,9 @@ rpz_delegation_point_ipbased_trigger_lookup(struct rpz* rpz, struct iter_qstate*
}
static struct dns_msg*
-rpz_apply_nsip_trigger(struct module_qstate* ms, struct rpz* r,
- struct clientip_synthesized_rr* raddr, struct auth_zone* az)
+rpz_apply_nsip_trigger(struct module_qstate* ms, struct query_info* qchase,
+ struct rpz* r, struct clientip_synthesized_rr* raddr,
+ struct auth_zone* az)
{
enum rpz_action action = raddr->action;
struct dns_msg* ret = NULL;
@@ -2148,16 +2275,16 @@ rpz_apply_nsip_trigger(struct module_qstate* ms, struct rpz* r,
if(action == RPZ_LOCAL_DATA_ACTION && raddr->data == NULL) {
verbose(VERB_ALGO, "rpz: bug: nsip local data action but no local data");
- ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nodata(r, ms, qchase, az);
goto done;
}
switch(action) {
case RPZ_NXDOMAIN_ACTION:
- ret = rpz_synthesize_nxdomain(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nxdomain(r, ms, qchase, az);
break;
case RPZ_NODATA_ACTION:
- ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nodata(r, ms, qchase, az);
break;
case RPZ_TCP_ONLY_ACTION:
/* basically a passthru here but the tcp-only will be
@@ -2166,17 +2293,20 @@ rpz_apply_nsip_trigger(struct module_qstate* ms, struct rpz* r,
ret = NULL;
break;
case RPZ_DROP_ACTION:
- ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nodata(r, ms, qchase, az);
ms->is_drop = 1;
break;
case RPZ_LOCAL_DATA_ACTION:
- ret = rpz_synthesize_nsip_localdata(r, ms, raddr, az);
- if(ret == NULL) { ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az); }
+ ret = rpz_synthesize_nsip_localdata(r, ms, qchase, raddr, az);
+ if(ret == NULL) { ret = rpz_synthesize_nodata(r, ms, qchase, az); }
break;
case RPZ_PASSTHRU_ACTION:
ret = NULL;
ms->rpz_passthru = 1;
break;
+ case RPZ_CNAME_OVERRIDE_ACTION:
+ ret = rpz_synthesize_cname_override_msg(r, ms, qchase);
+ break;
default:
verbose(VERB_ALGO, "rpz: nsip: bug: unhandled or invalid action: '%s'",
rpz_action_to_string(action));
@@ -2194,9 +2324,9 @@ done:
}
static struct dns_msg*
-rpz_apply_nsdname_trigger(struct module_qstate* ms, struct rpz* r,
- struct local_zone* z, struct matched_delegation_point const* match,
- struct auth_zone* az)
+rpz_apply_nsdname_trigger(struct module_qstate* ms, struct query_info* qchase,
+ struct rpz* r, struct local_zone* z,
+ struct matched_delegation_point const* match, struct auth_zone* az)
{
struct dns_msg* ret = NULL;
enum rpz_action action = localzone_type_to_rpz_action(z->type);
@@ -2209,10 +2339,10 @@ rpz_apply_nsdname_trigger(struct module_qstate* ms, struct rpz* r,
switch(action) {
case RPZ_NXDOMAIN_ACTION:
- ret = rpz_synthesize_nxdomain(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nxdomain(r, ms, qchase, az);
break;
case RPZ_NODATA_ACTION:
- ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nodata(r, ms, qchase, az);
break;
case RPZ_TCP_ONLY_ACTION:
/* basically a passthru here but the tcp-only will be
@@ -2221,19 +2351,22 @@ rpz_apply_nsdname_trigger(struct module_qstate* ms, struct rpz* r,
ret = NULL;
break;
case RPZ_DROP_ACTION:
- ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az);
+ ret = rpz_synthesize_nodata(r, ms, qchase, az);
ms->is_drop = 1;
break;
case RPZ_LOCAL_DATA_ACTION:
- ret = rpz_synthesize_nsdname_localdata(r, ms, z, match, az);
- if(ret == NULL) { ret = rpz_synthesize_nodata(r, ms, &ms->qinfo, az); }
+ ret = rpz_synthesize_nsdname_localdata(r, ms, qchase, z, match, az);
+ if(ret == NULL) { ret = rpz_synthesize_nodata(r, ms, qchase, az); }
break;
case RPZ_PASSTHRU_ACTION:
ret = NULL;
ms->rpz_passthru = 1;
break;
+ case RPZ_CNAME_OVERRIDE_ACTION:
+ ret = rpz_synthesize_cname_override_msg(r, ms, qchase);
+ break;
default:
- verbose(VERB_ALGO, "rpz: nsip: bug: unhandled or invalid action: '%s'",
+ verbose(VERB_ALGO, "rpz: nsdname: bug: unhandled or invalid action: '%s'",
rpz_action_to_string(action));
ret = NULL;
}
@@ -2324,7 +2457,7 @@ rpz_callback_from_iterator_module(struct module_qstate* ms, struct iter_qstate*
/* the nsdname has precedence over the nsip triggers */
z = rpz_delegation_point_zone_lookup(is->dp, r->nsdname_zones,
- ms->qinfo.qclass, &match);
+ is->qchase.qclass, &match);
if(z != NULL) {
lock_rw_unlock(&a->lock);
break;
@@ -2347,9 +2480,9 @@ rpz_callback_from_iterator_module(struct module_qstate* ms, struct iter_qstate*
if(z) {
lock_rw_unlock(&z->lock);
}
- return rpz_apply_nsip_trigger(ms, r, raddr, a);
+ return rpz_apply_nsip_trigger(ms, &is->qchase, r, raddr, a);
}
- return rpz_apply_nsdname_trigger(ms, r, z, &match, a);
+ return rpz_apply_nsdname_trigger(ms, &is->qchase, r, z, &match, a);
}
struct dns_msg* rpz_callback_from_iterator_cname(struct module_qstate* ms,
@@ -2412,10 +2545,10 @@ struct dns_msg* rpz_callback_from_iterator_cname(struct module_qstate* ms,
dname_str(is->qchase.qname, nm);
dname_str(z->name, zn);
if(strcmp(zn, nm) != 0)
- verbose(VERB_ALGO, "rpz: qname trigger after cname %s on %s, with action=%s",
+ verbose(VERB_ALGO, "rpz: qname trigger %s on %s, with action=%s",
zn, nm, rpz_action_to_string(localzone_type_to_rpz_action(lzt)));
else
- verbose(VERB_ALGO, "rpz: qname trigger after cname %s, with action=%s",
+ verbose(VERB_ALGO, "rpz: qname trigger %s, with action=%s",
nm, rpz_action_to_string(localzone_type_to_rpz_action(lzt)));
}
switch(localzone_type_to_rpz_action(lzt)) {
@@ -2444,7 +2577,7 @@ struct dns_msg* rpz_callback_from_iterator_cname(struct module_qstate* ms,
ms->rpz_passthru = 1;
break;
default:
- verbose(VERB_ALGO, "rpz: qname trigger after cname: bug: unhandled or invalid action: '%s'",
+ verbose(VERB_ALGO, "rpz: qname trigger: bug: unhandled or invalid action: '%s'",
rpz_action_to_string(localzone_type_to_rpz_action(lzt)));
ret = NULL;
}
@@ -2472,8 +2605,21 @@ rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
az, qinfo, repinfo, taglist, taglen, stats, z_out, a_out, r_out);
client_action = ((node == NULL) ? RPZ_INVALID_ACTION : node->action);
+ if(node != NULL && *r_out &&
+ (*r_out)->action_override != RPZ_NO_OVERRIDE_ACTION) {
+ client_action = (*r_out)->action_override;
+ }
if(client_action == RPZ_PASSTHRU_ACTION) {
+ if(*r_out && (*r_out)->log)
+ log_rpz_apply(
+ (node?"clientip":"qname"),
+ ((*z_out)?(*z_out)->name:NULL),
+ (node?&node->node:NULL),
+ client_action, qinfo, repinfo, NULL,
+ (*r_out)->log_name);
*passthru = 1;
+ ret = 0;
+ goto done;
}
if(*z_out == NULL || (client_action != RPZ_INVALID_ACTION &&
client_action != RPZ_PASSTHRU_ACTION)) {
@@ -2488,14 +2634,15 @@ rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
if(client_action == RPZ_LOCAL_DATA_ACTION) {
rpz_apply_clientip_localdata_action(node, env, qinfo,
edns, repinfo, buf, temp, *a_out);
+ ret = 1;
+ } else if(client_action == RPZ_CNAME_OVERRIDE_ACTION) {
+ if(!rpz_apply_cname_override_action(*r_out, qinfo,
+ temp)) {
+ ret = 0;
+ goto done;
+ }
+ ret = 0;
} else {
- if(*r_out && (*r_out)->log)
- log_rpz_apply(
- (node?"clientip":"qname"),
- ((*z_out)?(*z_out)->name:NULL),
- (node?&node->node:NULL),
- client_action, qinfo, repinfo, NULL,
- (*r_out)->log_name);
local_zones_zone_answer(*z_out /*likely NULL, no zone*/, env, qinfo, edns,
repinfo, buf, temp, 0 /* no local data used */,
rpz_action_to_localzone_type(client_action));
@@ -2503,8 +2650,15 @@ rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
LDNS_RCODE_WIRE(sldns_buffer_begin(buf))
== LDNS_RCODE_NXDOMAIN)
LDNS_RA_CLR(sldns_buffer_begin(buf));
+ ret = 1;
}
- ret = 1;
+ if(*r_out && (*r_out)->log)
+ log_rpz_apply(
+ (node?"clientip":"qname"),
+ ((*z_out)?(*z_out)->name:NULL),
+ (node?&node->node:NULL),
+ client_action, qinfo, repinfo, NULL,
+ (*r_out)->log_name);
goto done;
}
ret = -1;
diff --git a/contrib/unbound/services/rpz.h b/contrib/unbound/services/rpz.h
index e6d8bf566e16..7f409087f772 100644
--- a/contrib/unbound/services/rpz.h
+++ b/contrib/unbound/services/rpz.h
@@ -226,6 +226,14 @@ int rpz_clear(struct rpz* r);
struct rpz* rpz_create(struct config_auth* p);
/**
+ * Change config on rpz, after reload.
+ * @param r: the rpz structure.
+ * @param p: the config that was read.
+ * @return false on failure.
+ */
+int rpz_config(struct rpz* r, struct config_auth* p);
+
+/**
* String for RPZ action enum
* @param a: RPZ action to get string for
* @return: string for RPZ action
diff --git a/contrib/unbound/services/view.h b/contrib/unbound/services/view.h
index 17778100474b..12f7a64e7171 100644
--- a/contrib/unbound/services/view.h
+++ b/contrib/unbound/services/view.h
@@ -126,7 +126,8 @@ void view_delete(struct view* v);
*/
void views_print(struct views* v);
-/* Find a view by name.
+/**
+ * Find a view by name.
* @param vs: views
* @param name: name of the view we are looking for
* @param write: 1 for obtaining write lock on found view, 0 for read lock
diff --git a/contrib/unbound/smallapp/unbound-anchor.c b/contrib/unbound/smallapp/unbound-anchor.c
index e60831c2e160..340deb6163c4 100644
--- a/contrib/unbound/smallapp/unbound-anchor.c
+++ b/contrib/unbound/smallapp/unbound-anchor.c
@@ -1828,15 +1828,49 @@ verify_p7sig(BIO* data, BIO* p7s, STACK_OF(X509)* trust, const char* p7signer)
return secure;
}
+/** open a temp file */
+static FILE*
+tempfile_open(char* tempf, size_t tempflen, const char* fname, const char* mode)
+{
+ snprintf(tempf, tempflen, "%s~", fname);
+ return fopen(tempf, mode);
+}
+
+/** close an open temp file and replace the original with it */
+static void
+tempfile_close(FILE* fd, const char* tempf, const char* fname)
+{
+ fflush(fd);
+#ifdef HAVE_FSYNC
+ fsync(fileno(fd));
+#else
+ FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(fd)));
+#endif
+ if(fclose(fd) != 0) {
+ printf("could not complete write: %s: %s\n",
+ tempf, strerror(errno));
+ unlink(tempf);
+ return;
+ }
+ /* success; overwrite actual file */
+#ifdef USE_WINSOCK
+ (void)unlink(fname); /* windows does not replace file with rename() */
+#endif
+ if(rename(tempf, fname) < 0) {
+ printf("rename(%s to %s): %s", tempf, fname, strerror(errno));
+ }
+}
+
/** write unsigned root anchor file, a 5011 revoked tp */
static void
write_unsigned_root(const char* root_anchor_file)
{
FILE* out;
time_t now = time(NULL);
- out = fopen(root_anchor_file, "w");
+ char tempf[2048];
+ out = tempfile_open(tempf, sizeof(tempf), root_anchor_file, "w");
if(!out) {
- if(verb) printf("%s: %s\n", root_anchor_file, strerror(errno));
+ if(verb) printf("%s: %s\n", tempf, strerror(errno));
return;
}
if(fprintf(out, "; autotrust trust anchor file\n"
@@ -1851,13 +1885,7 @@ write_unsigned_root(const char* root_anchor_file)
root_anchor_file);
if(verb && errno != 0) printf("%s\n", strerror(errno));
}
- fflush(out);
-#ifdef HAVE_FSYNC
- fsync(fileno(out));
-#else
- FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(out)));
-#endif
- fclose(out);
+ tempfile_close(out, tempf, root_anchor_file);
}
/** write root anchor file */
@@ -1867,29 +1895,24 @@ write_root_anchor(const char* root_anchor_file, BIO* ds)
char* pp = NULL;
int len;
FILE* out;
+ char tempf[2048];
(void)BIO_seek(ds, 0);
len = BIO_get_mem_data(ds, &pp);
if(!len || !pp) {
if(verb) printf("out of memory\n");
return;
}
- out = fopen(root_anchor_file, "w");
+ out = tempfile_open(tempf, sizeof(tempf), root_anchor_file, "w");
if(!out) {
- if(verb) printf("%s: %s\n", root_anchor_file, strerror(errno));
+ if(verb) printf("%s: %s\n", tempf, strerror(errno));
return;
}
if(fwrite(pp, (size_t)len, 1, out) != 1) {
if(verb) printf("failed to write all data to %s\n",
- root_anchor_file);
+ tempf);
if(verb && errno != 0) printf("%s\n", strerror(errno));
}
- fflush(out);
-#ifdef HAVE_FSYNC
- fsync(fileno(out));
-#else
- FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(out)));
-#endif
- fclose(out);
+ tempfile_close(out, tempf, root_anchor_file);
}
/** Perform the verification and update of the trustanchor file */
@@ -2033,18 +2056,19 @@ try_read_anchor(const char* file)
static void
write_builtin_anchor(const char* file)
{
+ char tempf[2048];
const char* builtin_root_anchor = get_builtin_ds();
- FILE* out = fopen(file, "w");
+ FILE* out = tempfile_open(tempf, sizeof(tempf), file, "w");
if(!out) {
printf("could not write builtin anchor, to file %s: %s\n",
- file, strerror(errno));
+ tempf, strerror(errno));
return;
}
if(!fwrite(builtin_root_anchor, strlen(builtin_root_anchor), 1, out)) {
printf("could not complete write builtin anchor, to file %s: %s\n",
- file, strerror(errno));
+ tempf, strerror(errno));
}
- fclose(out);
+ tempfile_close(out, tempf, file);
}
/**
diff --git a/contrib/unbound/smallapp/unbound-checkconf.c b/contrib/unbound/smallapp/unbound-checkconf.c
index f5f0ab332c86..ae2cae3649bc 100644
--- a/contrib/unbound/smallapp/unbound-checkconf.c
+++ b/contrib/unbound/smallapp/unbound-checkconf.c
@@ -88,6 +88,7 @@ usage(void)
printf("file if omitted %s is used.\n", CONFIGFILE);
printf("-o option print value of option to stdout.\n");
printf("-f output full pathname with chroot applied, eg. with -o pidfile.\n");
+ printf("-q quiet (suppress output on success).\n");
printf("-h show this usage help.\n");
printf("Version %s\n", PACKAGE_VERSION);
printf("BSD licensed, see LICENSE in source package for details.\n");
@@ -965,7 +966,7 @@ check_auth(struct config_file* cfg)
/** check config file */
static void
-checkconf(const char* cfgfile, const char* opt, int final)
+checkconf(const char* cfgfile, const char* opt, int final, int quiet)
{
char oldwd[4096];
struct config_file* cfg = config_create();
@@ -998,7 +999,7 @@ checkconf(const char* cfgfile, const char* opt, int final)
check_fwd(cfg);
check_hints(cfg);
check_auth(cfg);
- printf("unbound-checkconf: no errors in %s\n", cfgfile);
+ if(!quiet) { printf("unbound-checkconf: no errors in %s\n", cfgfile); }
config_delete(cfg);
}
@@ -1012,6 +1013,7 @@ int main(int argc, char* argv[])
{
int c;
int final = 0;
+ int quiet = 0;
const char* f;
const char* opt = NULL;
const char* cfgfile = CONFIGFILE;
@@ -1024,7 +1026,7 @@ int main(int argc, char* argv[])
cfgfile = CONFIGFILE;
#endif /* USE_WINSOCK */
/* parse the options */
- while( (c=getopt(argc, argv, "fho:")) != -1) {
+ while( (c=getopt(argc, argv, "fhqo:")) != -1) {
switch(c) {
case 'f':
final = 1;
@@ -1032,6 +1034,9 @@ int main(int argc, char* argv[])
case 'o':
opt = optarg;
break;
+ case 'q':
+ quiet = 1;
+ break;
case '?':
case 'h':
default:
@@ -1045,7 +1050,7 @@ int main(int argc, char* argv[])
if(argc == 1)
f = argv[0];
else f = cfgfile;
- checkconf(f, opt, final);
+ checkconf(f, opt, final, quiet);
checklock_stop();
return 0;
}
diff --git a/contrib/unbound/smallapp/unbound-control.c b/contrib/unbound/smallapp/unbound-control.c
index 54ff42f6ccc3..9280ab86d480 100644
--- a/contrib/unbound/smallapp/unbound-control.c
+++ b/contrib/unbound/smallapp/unbound-control.c
@@ -150,12 +150,13 @@ usage(void)
printf(" list_local_data list local-data RRs in use\n");
printf(" insecure_add zone add domain-insecure zone\n");
printf(" insecure_remove zone remove domain-insecure zone\n");
- printf(" forward_add [+i] zone addr.. add forward-zone with servers\n");
+ printf(" forward_add [+it] zone addr.. add forward-zone with servers\n");
printf(" forward_remove [+i] zone remove forward zone\n");
- printf(" stub_add [+ip] zone addr.. add stub-zone with servers\n");
+ printf(" stub_add [+ipt] zone addr.. add stub-zone with servers\n");
printf(" stub_remove [+i] zone remove stub zone\n");
printf(" +i also do dnssec insecure point\n");
printf(" +p set stub to use priming\n");
+ printf(" +t set to use tls upstream\n");
printf(" forward [off | addr ...] without arg show forward setup\n");
printf(" or off to turn off root forwarding\n");
printf(" or give list of ip addresses\n");
diff --git a/contrib/unbound/testdata/cachedb_expired.crpl b/contrib/unbound/testdata/cachedb_expired.crpl
new file mode 100644
index 000000000000..9f9ff677c6d1
--- /dev/null
+++ b/contrib/unbound/testdata/cachedb_expired.crpl
@@ -0,0 +1,324 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ minimal-responses: no
+ serve-expired: yes
+ module-config: "cachedb iterator"
+
+cachedb:
+ backend: "testframe"
+ secret-seed: "testvalue"
+ cachedb-check-when-serve-expired: yes
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129
+CONFIG_END
+
+SCENARIO_BEGIN Test cachedb and serve expired.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 400
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 400
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns2.example.com.
+SECTION ADDITIONAL
+ns2.example.com. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.com. IN NS
+SECTION AUTHORITY
+foo.com. IN NS ns.example.com.
+ENTRY_END
+RANGE_END
+
+; ns2.example.com.
+RANGE_BEGIN 0 400
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+RANGE_END
+
+; Get an entry in cache, to make it expired.
+STEP 1 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; Get another query in cache to make it expired.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 30 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; it is now expired
+STEP 40 TIME_PASSES ELAPSE 20
+
+; cache is expired, and cachedb is expired.
+STEP 50 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 60 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 30 IN A 1.2.3.5
+ENTRY_END
+
+; cache is expired, cachedb has no answer
+STEP 70 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 80 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+STEP 90 TRAFFIC
+; the entry should be refreshed in cache now.
+; cache is valid and cachedb is valid.
+STEP 100 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 110 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; flush the entry from cache
+STEP 120 FLUSH_MESSAGE www.example.com. IN A
+
+; cache has no answer, cachedb valid
+STEP 130 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 140 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; it is now expired
+STEP 150 TIME_PASSES ELAPSE 20
+; flush the entry from cache
+STEP 160 FLUSH_MESSAGE www.example.com. IN A
+
+; cache has no answer, cachedb is expired
+STEP 170 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 180 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+STEP 190 TRAFFIC
+; the expired message is updated.
+
+; cache is valid, cachedb is valid
+STEP 200 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 210 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; expire the entry in cache
+STEP 220 EXPIRE_MESSAGE www.example.com. IN A
+
+; cache is expired, cachedb valid
+STEP 230 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 240 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; it is now expired
+STEP 250 TIME_PASSES ELAPSE 20
+; expire the entry in cache
+STEP 260 EXPIRE_MESSAGE www.example.com. IN A
+
+; cache is expired, cachedb is expired
+STEP 270 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 280 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+STEP 290 TRAFFIC
+; the expired message is updated.
+
+; cache is valid, cachedb is valid
+STEP 300 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 310 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/cachedb_expired_client_timeout.crpl b/contrib/unbound/testdata/cachedb_expired_client_timeout.crpl
new file mode 100644
index 000000000000..78ddf4d8f698
--- /dev/null
+++ b/contrib/unbound/testdata/cachedb_expired_client_timeout.crpl
@@ -0,0 +1,343 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ minimal-responses: no
+ serve-expired: yes
+ serve-expired-reply-ttl: 30
+ ; at least one second, so we can time skip past the timer in the
+ ; testbound script steps, but also reply within the time.
+ serve-expired-client-timeout: 1200
+ module-config: "cachedb iterator"
+ discard-timeout: 3000
+
+cachedb:
+ backend: "testframe"
+ secret-seed: "testvalue"
+ cachedb-check-when-serve-expired: yes
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129
+CONFIG_END
+
+SCENARIO_BEGIN Test cachedb and serve-expired-client-timeout.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 400
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 400
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns2.example.com.
+SECTION ADDITIONAL
+ns2.example.com. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.com. IN NS
+SECTION AUTHORITY
+foo.com. IN NS ns.example.com.
+ENTRY_END
+RANGE_END
+
+; ns2.example.com.
+RANGE_BEGIN 0 60
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - after a change
+RANGE_BEGIN 80 90
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.6
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.7
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - steps 90-120 not responding.
+
+; ns2.example.com. - after a change
+RANGE_BEGIN 130 140
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.8
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.9
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - steps 150-160 not responding.
+
+; ns2.example.com. - after a change
+RANGE_BEGIN 170 200
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.10
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.11
+ENTRY_END
+RANGE_END
+
+; make time not 0
+STEP 2 TIME_PASSES ELAPSE 212
+
+; Get an entry in cache.
+STEP 4 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; Get another query in cache.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 30 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; www.example.com and www2.example.com are in cache, www2 in cachedb.
+STEP 40 FLUSH_MESSAGE www2.example.com. IN A
+; now www in cache, www2 not in cache, www2 in cachedb.
+; because of the client timeout, it should be able to use the
+; response from cachedb for www2.
+
+; make 2 seconds pass to decrement the TTL on the response,
+; the upstream TTL would be 10, cachedb 8.
+STEP 48 TIME_PASSES ELAPSE 2
+
+STEP 50 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 60 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 8 IN A 1.2.3.5
+ENTRY_END
+
+; make both cache and cachedb expired
+STEP 70 TIME_PASSES ELAPSE 20
+
+; www and www2 expired in cache, www2 expired in cachedb.
+; the query should now try to resolve and complete within the
+; client timeout, and return the upstream version.
+; the upstream is changed to give a different one now.
+STEP 80 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 90 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.7
+ENTRY_END
+
+; expire the data again
+STEP 100 TIME_PASSES ELAPSE 20
+
+; the query should now try to resolve, but the upstream is not
+; responsive for several testbound steps. When the timer expires,
+; the expired answer should be returned.
+
+; www2 expired in cache and www2 expired in cachedb.
+STEP 110 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+; make 2 seconds pass to go past the client timeout
+STEP 112 TIME_PASSES ELAPSE 2
+
+STEP 120 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 30 IN A 1.2.3.7
+ENTRY_END
+
+; make traffic flow to resolve the query, server responds.
+STEP 130 TRAFFIC
+
+; expire the data again
+STEP 140 TIME_PASSES ELAPSE 20
+
+; The client query tries to resolve, but gets no immediate answer,
+; so the expired data is used. But the expired data is in cache and
+; the query is not in cachedb.
+STEP 150 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; make 2 seconds pass to go past the client timeout
+STEP 152 TIME_PASSES ELAPSE 2
+
+STEP 160 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+; make traffic flow to resolve the query, server responds.
+STEP 170 TRAFFIC
+
+; now the client query tries to resolve, and completes within the client
+; timeout, but there is expired data in cache but not in cachedb.
+STEP 180 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 190 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.11
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/cachedb_expired_reply_ttl.crpl b/contrib/unbound/testdata/cachedb_expired_reply_ttl.crpl
new file mode 100644
index 000000000000..b5f34050594e
--- /dev/null
+++ b/contrib/unbound/testdata/cachedb_expired_reply_ttl.crpl
@@ -0,0 +1,259 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ minimal-responses: no
+ serve-expired: yes
+ serve-expired-reply-ttl: 30
+ module-config: "cachedb iterator"
+
+cachedb:
+ backend: "testframe"
+ secret-seed: "testvalue"
+ cachedb-check-when-serve-expired: yes
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129
+CONFIG_END
+
+SCENARIO_BEGIN Test cachedb and serve-expired-reply-ttl.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 400
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 400
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns2.example.com.
+SECTION ADDITIONAL
+ns2.example.com. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.com. IN NS
+SECTION AUTHORITY
+foo.com. IN NS ns.example.com.
+ENTRY_END
+RANGE_END
+
+; ns2.example.com.
+RANGE_BEGIN 0 400
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+RANGE_END
+
+; make time not 0
+STEP 2 TIME_PASSES ELAPSE 212
+
+; Get an entry in cache, to make it expired.
+STEP 4 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; Get another query in cache to make it expired.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 30 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; it is now expired
+STEP 40 TIME_PASSES ELAPSE 20
+
+; cache is expired, and cachedb is expired.
+STEP 50 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 60 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 30 IN A 1.2.3.5
+ENTRY_END
+
+; got an answer from upstream
+STEP 61 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 62 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; cache is expired, cachedb has no answer
+STEP 70 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 80 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+STEP 90 TRAFFIC
+; the entry should be refreshed in cache now.
+; cache is valid and cachedb is valid.
+STEP 100 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 110 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; make both cache and cachedb expired.
+STEP 120 TIME_PASSES ELAPSE 20
+STEP 130 FLUSH_MESSAGE www.example.com. IN A
+
+; cache has no entry and cachedb is expired.
+STEP 140 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 150 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+; the name is resolved
+STEP 160 TRAFFIC
+
+; the resolve name has been updated.
+STEP 170 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 180 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/cachedb_subnet_change.crpl b/contrib/unbound/testdata/cachedb_subnet_change.crpl
new file mode 100644
index 000000000000..73584305ce60
--- /dev/null
+++ b/contrib/unbound/testdata/cachedb_subnet_change.crpl
@@ -0,0 +1,304 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ minimal-responses: no
+ serve-expired: yes
+ serve-expired-reply-ttl: 30
+
+ ; disable the serve expired client timeout.
+ serve-expired-client-timeout: 0
+ send-client-subnet: 1.2.3.4
+ max-client-subnet-ipv4: 17
+ ; subnetcache is to the left of cachedb, because it sets no cache
+ ; store for edns subnet content for modules to the right of it.
+ ; this keeps subnet content out of cachedb as global content.
+ module-config: "subnetcache cachedb iterator"
+
+cachedb:
+ backend: "testframe"
+ secret-seed: "testvalue"
+ cachedb-check-when-serve-expired: yes
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129
+CONFIG_END
+
+SCENARIO_BEGIN Test cachedb, subnet and serve-expired, with a domain change from global to subnet.
+; So the CNAME first points to a global record, then points to a subnet record.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 400
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 400
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns2.example.com.
+SECTION ADDITIONAL
+ns2.example.com. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.com. IN NS
+SECTION AUTHORITY
+foo.com. IN NS ns.foo.com.
+SECTION ADDITIONAL
+ns.foo.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+initial.com. IN NS
+SECTION AUTHORITY
+initial.com. IN NS ns.initial.com.
+SECTION ADDITIONAL
+ns.initial.com. IN A 1.2.3.6
+ENTRY_END
+RANGE_END
+
+; ns2.example.com.
+RANGE_BEGIN 0 30
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME www.initial.com.
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - after change
+RANGE_BEGIN 40 80
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+ENTRY_END
+RANGE_END
+
+; ns.initial.com.
+RANGE_BEGIN 0 400
+ ADDRESS 1.2.3.6
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.initial.com. IN A
+SECTION ANSWER
+www.initial.com. 10 IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.foo.com.
+RANGE_BEGIN 40 80
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qname qtype ednsdata
+REPLY QR AA NOERROR
+SECTION QUESTION
+example.foo.com. IN A
+SECTION ANSWER
+example.foo.com. 10 IN A 1.2.3.5
+SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - later
+RANGE_BEGIN 90 200
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+ENTRY_END
+RANGE_END
+
+; ns.foo.com. - later
+RANGE_BEGIN 90 200
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qname qtype ednsdata
+REPLY QR AA NOERROR
+SECTION QUESTION
+example.foo.com. IN A
+SECTION ANSWER
+example.foo.com. 10 IN A 1.2.3.6
+SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ENTRY_END
+RANGE_END
+
+; make time not 0
+STEP 2 TIME_PASSES ELAPSE 212
+
+; Get an entry in cache.
+STEP 4 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME www.initial.com.
+www.initial.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; now valid in cache and valid in cachedb, without subnet.
+STEP 30 TIME_PASSES ELAPSE 20
+
+; now the cache and cachedb have an expired entry.
+; the upstream is updated to CNAME to a subnet zone A record.
+
+STEP 40 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; the expired answer, while the ECS answer is looked up.
+STEP 50 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 30 IN CNAME www.initial.com.
+www.initial.com. 30 IN A 1.2.3.4
+ENTRY_END
+
+; check that subnet has the query in cache.
+STEP 58 TIME_PASSES ELAPSE 2
+STEP 60 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 8 IN CNAME example.foo.com.
+example.foo.com. 8 IN A 1.2.3.5
+ENTRY_END
+
+; everything is expired, cache, subnetcache and cachedb.
+STEP 80 TIME_PASSES ELAPSE 20
+
+STEP 90 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 100 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+example.foo.com. 10 IN A 1.2.3.6
+ENTRY_END
+
+; see the entry now in cache, from the subnetcache.
+STEP 142 TIME_PASSES ELAPSE 2
+STEP 150 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 160 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 8 IN CNAME example.foo.com.
+example.foo.com. 8 IN A 1.2.3.6
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/cachedb_subnet_expired.crpl b/contrib/unbound/testdata/cachedb_subnet_expired.crpl
new file mode 100644
index 000000000000..eddff1002dd8
--- /dev/null
+++ b/contrib/unbound/testdata/cachedb_subnet_expired.crpl
@@ -0,0 +1,322 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ minimal-responses: no
+ serve-expired: yes
+ serve-expired-reply-ttl: 30
+ ; at least one second, so we can time skip past the timer in the
+ ; testbound script steps, but also reply within the time.
+ serve-expired-client-timeout: 1200
+ send-client-subnet: 1.2.3.4
+ max-client-subnet-ipv4: 17
+ ; subnetcache is to the left of cachedb, because it sets no cache
+ ; store for edns subnet content for modules to the right of it.
+ ; this keeps subnet content out of cachedb as global content.
+ module-config: "subnetcache cachedb iterator"
+ discard-timeout: 3000
+
+cachedb:
+ backend: "testframe"
+ secret-seed: "testvalue"
+ cachedb-check-when-serve-expired: yes
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129
+CONFIG_END
+
+SCENARIO_BEGIN Test cachedb, subnet and serve-expired-client-timeout.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 400
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 400
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns2.example.com.
+SECTION ADDITIONAL
+ns2.example.com. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.com. IN NS
+SECTION AUTHORITY
+foo.com. IN NS ns.foo.com.
+SECTION ADDITIONAL
+ns.foo.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns2.example.com.
+RANGE_BEGIN 0 30
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - after change
+RANGE_BEGIN 40 100
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+ENTRY_END
+RANGE_END
+
+; ns.foo.com.
+RANGE_BEGIN 40 100
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qname qtype ednsdata
+REPLY QR AA NOERROR
+SECTION QUESTION
+example.foo.com. IN A
+SECTION ANSWER
+example.foo.com. 10 IN A 1.2.3.5
+SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. and ns.foo.com - no answer in 110-130.
+
+; ns2.example.com. - later
+RANGE_BEGIN 140 200
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+ENTRY_END
+RANGE_END
+
+; ns.foo.com. - later
+RANGE_BEGIN 140 200
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qname qtype ednsdata
+REPLY QR AA NOERROR
+SECTION QUESTION
+example.foo.com. IN A
+SECTION ANSWER
+example.foo.com. 10 IN A 1.2.3.6
+SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ENTRY_END
+RANGE_END
+
+
+; make time not 0
+STEP 2 TIME_PASSES ELAPSE 212
+
+; Get an entry in cache.
+STEP 4 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; now valid in cache and valid in cachedb, without subnet.
+STEP 20 FLUSH_MESSAGE www.example.com. IN A
+STEP 30 TIME_PASSES ELAPSE 20
+
+; now nothing in cache and cachedb has an expired entry.
+; the upstream is updated to CNAME to a subnet zone A record.
+
+STEP 40 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 50 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+example.foo.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; check that subnet has the query in cache.
+STEP 58 TIME_PASSES ELAPSE 2
+STEP 60 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 8 IN CNAME example.foo.com.
+example.foo.com. 8 IN A 1.2.3.5
+ENTRY_END
+
+; everything is expired, cache, subnetcache and cachedb.
+STEP 80 TIME_PASSES ELAPSE 20
+
+; send the query, reply arrives quickly.
+STEP 90 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 100 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+example.foo.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; everything is expired, cache, subnetcache and cachedb.
+STEP 110 TIME_PASSES ELAPSE 20
+
+; send the query, but the reply is late, and there is expired data,
+; the expired entry from cachedb is used to reply with.
+STEP 120 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 122 TIME_PASSES ELAPSE 2
+
+; But the entry has been deleted, so it cannot be served, the reply
+; at step 141 is returned instead.
+;STEP 130 CHECK_ANSWER
+;ENTRY_BEGIN
+;MATCH all
+;REPLY QR RD RA NOERROR
+;SECTION QUESTION
+;www.example.com. IN A
+;SECTION ANSWER
+;www.example.com. 30 IN A 1.2.3.4
+;ENTRY_END
+
+; reply can flow again.
+STEP 140 TRAFFIC
+
+STEP 141 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+example.foo.com. 10 IN A 1.2.3.6
+ENTRY_END
+
+; see the entry now in cache, from the subnetcache.
+STEP 142 TIME_PASSES ELAPSE 2
+STEP 150 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 160 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 8 IN CNAME example.foo.com.
+example.foo.com. 8 IN A 1.2.3.6
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/cachedb_subnet_toecs_timeout.crpl b/contrib/unbound/testdata/cachedb_subnet_toecs_timeout.crpl
new file mode 100644
index 000000000000..f53fd9658e21
--- /dev/null
+++ b/contrib/unbound/testdata/cachedb_subnet_toecs_timeout.crpl
@@ -0,0 +1,229 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ minimal-responses: no
+ serve-expired: yes
+ serve-expired-reply-ttl: 30
+ ; at least one second, so we can time skip past the timer in the
+ ; testbound script steps, but also reply within the time.
+ serve-expired-client-timeout: 1200
+ send-client-subnet: 1.2.3.4
+ max-client-subnet-ipv4: 17
+ ; subnetcache is to the left of cachedb, because it sets no cache
+ ; store for edns subnet content for modules to the right of it.
+ ; this keeps subnet content out of cachedb as global content.
+ module-config: "subnetcache cachedb iterator"
+
+cachedb:
+ backend: "testframe"
+ secret-seed: "testvalue"
+ cachedb-check-when-serve-expired: yes
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129
+CONFIG_END
+
+SCENARIO_BEGIN Test cachedb, subnet and serve-expired, with a domain change from global to subnet with serve-expired-client-timeout enabled.
+; So the CNAME first points to a global record, then points to a subnet record.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 400
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 400
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns2.example.com.
+SECTION ADDITIONAL
+ns2.example.com. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.com. IN NS
+SECTION AUTHORITY
+foo.com. IN NS ns.foo.com.
+SECTION ADDITIONAL
+ns.foo.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+initial.com. IN NS
+SECTION AUTHORITY
+initial.com. IN NS ns.initial.com.
+SECTION ADDITIONAL
+ns.initial.com. IN A 1.2.3.6
+ENTRY_END
+RANGE_END
+
+; ns2.example.com.
+RANGE_BEGIN 0 30
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME www.initial.com.
+ENTRY_END
+RANGE_END
+
+; ns2.example.com. - after change
+RANGE_BEGIN 40 100
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+ENTRY_END
+RANGE_END
+
+; ns.initial.com.
+RANGE_BEGIN 0 400
+ ADDRESS 1.2.3.6
+ENTRY_BEGIN
+MATCH opcode qname qtype
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.initial.com. IN A
+SECTION ANSWER
+www.initial.com. 10 IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.foo.com.
+RANGE_BEGIN 40 100
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qname qtype ednsdata
+REPLY QR AA NOERROR
+SECTION QUESTION
+example.foo.com. IN A
+SECTION ANSWER
+example.foo.com. 10 IN A 1.2.3.5
+SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ENTRY_END
+RANGE_END
+
+; make time not 0
+STEP 2 TIME_PASSES ELAPSE 212
+
+; Get an entry in cache.
+STEP 4 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; get the answer for it
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME www.initial.com.
+www.initial.com. 10 IN A 1.2.3.4
+ENTRY_END
+
+; now valid in cache and valid in cachedb, without subnet.
+STEP 30 TIME_PASSES ELAPSE 20
+
+; now the cache and cachedb have an expired entry.
+; the upstream is updated to CNAME to a subnet zone A record.
+
+STEP 40 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; this answer is returned by the subnet lookup within
+; the serve-expired-client-timeout.
+STEP 50 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 10 IN CNAME example.foo.com.
+example.foo.com. 10 IN A 1.2.3.5
+ENTRY_END
+
+; check that subnet has the query in cache.
+STEP 58 TIME_PASSES ELAPSE 2
+STEP 60 QUERY ADDRESS 127.0.0.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. 8 IN CNAME example.foo.com.
+example.foo.com. 8 IN A 1.2.3.5
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/iter_dname_ttl.rpl b/contrib/unbound/testdata/iter_dname_ttl.rpl
index 115947af3ab3..71934c39fd69 100644
--- a/contrib/unbound/testdata/iter_dname_ttl.rpl
+++ b/contrib/unbound/testdata/iter_dname_ttl.rpl
@@ -145,31 +145,6 @@ ns.example.com. IN A 1.2.3.4
ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
ENTRY_END
-; response to query of interest
-ENTRY_BEGIN
-MATCH opcode qtype qname
-ADJUST copy_id
-REPLY QR NOERROR
-SECTION QUESTION
-www.example.com. IN CNAME
-SECTION ANSWER
-www.example.com. IN CNAME www.example.net.
-www.example.com. 3600 IN RRSIG CNAME DSA 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFGcJxnNxpWCBzXejiSdl4p1BKRMnAhUApoJrugVBRwFgAoYAhhqlZFac7fE= ;{id = 2854}
-SECTION AUTHORITY
-SECTION ADDITIONAL
-ENTRY_END
-
-ENTRY_BEGIN
-MATCH opcode qtype qname
-ADJUST copy_id
-REPLY QR NOERROR
-SECTION QUESTION
-www2.example.com. IN A
-SECTION ANSWER
-www2.example.com. 3600 IN CNAME www.example.net.
-www2.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AGgh6pDCL7VF0uJablClW7cgvsPuNzpHZ+M7nZIwi61+0RPhFZLHcN4=
-ENTRY_END
-
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
@@ -218,20 +193,6 @@ ns.example.net. IN A 1.2.3.5
ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
ENTRY_END
-; response to query of interest
-ENTRY_BEGIN
-MATCH opcode qtype qname
-ADJUST copy_id
-REPLY QR NOERROR
-SECTION QUESTION
-www.example.net. IN A
-SECTION ANSWER
-www.example.net. IN A 11.12.13.14
-www.example.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 example.net. CPxF5hK9Kg5eT7W6LgZwr0ePYEm9HMcSY4vvqCS6gDWB4X9jvXLCfBkCLhsNybPBpGWlsLi5wM6MTdJXuPpsRA== ;{id = 30899}
-SECTION AUTHORITY
-SECTION ADDITIONAL
-ENTRY_END
-
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
diff --git a/contrib/unbound/testdata/iter_ghost_grandchild_delegation.rpl b/contrib/unbound/testdata/iter_ghost_grandchild_delegation.rpl
new file mode 100644
index 000000000000..d1e521b57e9c
--- /dev/null
+++ b/contrib/unbound/testdata/iter_ghost_grandchild_delegation.rpl
@@ -0,0 +1,256 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: "no"
+ minimal-responses: no
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test that deep delegation from the parent deletes intermediate delegations to avoid triggering the ghost domain countermeasure.
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 19
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. 86400 IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. 86400 IN A 193.0.14.129
+ENTRY_END
+
+; we will explicitly ask for this
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. 10 IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. 86400 IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. 86400 IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. 86400 IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 100
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. 10 IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. 86400 IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+ns.example.com. IN A
+SECTION ANSWER
+ns.example.com. IN A 1.2.3.4
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+a.example.com. IN A
+SECTION ANSWER
+a.example.com. IN A 10.20.30.40
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+b.example.com. IN A
+SECTION ANSWER
+b.example.com. IN A 10.20.30.40
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+c.example.com. IN A
+SECTION ANSWER
+c.example.com. IN A 10.20.30.40
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; get the com. IN NS delegation in cache
+STEP 0 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+com. IN NS
+ENTRY_END
+
+STEP 1 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. 10 IN NS a.gtld-servers.net.
+ENTRY_END
+
+STEP 2 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+a.example.com. IN A
+ENTRY_END
+
+STEP 3 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+a.example.com. IN A
+SECTION ANSWER
+a.example.com. IN A 10.20.30.40
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+; time passes for com. IN NS to expire.
+STEP 9 TIME_PASSES ELAPSE 11
+
+; the following query should go to the root instead of example.com. IN NS
+; because com. IN NS is expired
+STEP 10 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+b.example.com. IN A
+ENTRY_END
+
+; root replies with the example.com IN NS delegation
+; the expired com. IN NS delegation should be deleted
+STEP 12 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+b.example.com. IN A
+SECTION ANSWER
+b.example.com. IN A 10.20.30.40
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+; root is offline in this range.
+; the following query should go straight to the example.com. IN NS delegation
+; because the expired com. IN NS should not be in the cache anymore
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+c.example.com. IN A
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+c.example.com. IN A
+SECTION ANSWER
+c.example.com. IN A 10.20.30.40
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/local_cnameother.rpl b/contrib/unbound/testdata/local_cnameother.rpl
new file mode 100644
index 000000000000..d86ba4f9d81a
--- /dev/null
+++ b/contrib/unbound/testdata/local_cnameother.rpl
@@ -0,0 +1,67 @@
+; config options
+server:
+ local-zone: "a." static
+ local-data: "myd.a. NSEC myd2.a. CNAME NSEC"
+ local-data: "myd.a. CNAME myd.target.a."
+
+ ; Switches the types first one then the other.
+ local-data: "myd2.a. CNAME myd2.target.a."
+ local-data: "myd2.a. NSEC myd3.a. CNAME NSEC"
+
+stub-zone:
+ name: "a"
+ stub-addr: 1.2.3.4
+
+CONFIG_END
+SCENARIO_BEGIN Test local data queries with CNAME and other data.
+
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.refuse.top. IN A
+SECTION ANSWER
+www.refuse.top. IN A 5.5.5.5
+ENTRY_END
+RANGE_END
+
+; local data query for type next to CNAME, the specific type should
+; be preferred over the CNAME.
+STEP 10 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+myd.a. IN NSEC
+ENTRY_END
+
+STEP 20 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA
+SECTION QUESTION
+myd.a. IN NSEC
+SECTION ANSWER
+myd.a. NSEC myd2.a. CNAME NSEC
+ENTRY_END
+
+STEP 30 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+myd2.a. IN NSEC
+ENTRY_END
+
+STEP 40 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA
+SECTION QUESTION
+myd2.a. IN NSEC
+SECTION ANSWER
+myd2.a. NSEC myd3.a. CNAME NSEC
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_clientip_override.rpl b/contrib/unbound/testdata/rpz_clientip_override.rpl
new file mode 100644
index 000000000000..20e5213ff626
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_clientip_override.rpl
@@ -0,0 +1,269 @@
+; config options
+server:
+ module-config: "respip validator iterator"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ access-control: 192.0.0.0/8 allow
+
+rpz:
+ name: "rpz.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz.example.com"
+ rpz-action-override: "nxdomain"
+ zonefile:
+TEMPFILE_NAME rpz.example.com
+TEMPFILE_CONTENTS rpz.example.com
+$ORIGIN example.com.
+rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz.example.com.
+ 3600 IN NS ns2.rpz.example.com.
+$ORIGIN rpz.example.com.
+32.1.5.0.192.rpz-client-ip CNAME rpz-passthru.
+32.2.5.0.192.rpz-client-ip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz2.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz2.example.com"
+ rpz-action-override: "nodata"
+ zonefile:
+TEMPFILE_NAME rpz2.example.com
+TEMPFILE_CONTENTS rpz2.example.com
+$ORIGIN example.com.
+rpz2 3600 IN SOA ns1.rpz2.example.com. hostmaster.rpz2.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz2.example.com.
+ 3600 IN NS ns2.rpz2.example.com.
+$ORIGIN rpz2.example.com.
+32.4.5.0.192.rpz-client-ip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz3.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz3.example.com"
+ rpz-action-override: "passthru"
+ zonefile:
+TEMPFILE_NAME rpz3.example.com
+TEMPFILE_CONTENTS rpz3.example.com
+$ORIGIN example.com.
+rpz3 3600 IN SOA ns1.rpz3.example.com. hostmaster.rpz3.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz3.example.com.
+ 3600 IN NS ns2.rpz3.example.com.
+$ORIGIN rpz3.example.com.
+32.5.5.0.192.rpz-client-ip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz4.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz4.example.com"
+ rpz-action-override: "drop"
+ zonefile:
+TEMPFILE_NAME rpz4.example.com
+TEMPFILE_CONTENTS rpz4.example.com
+$ORIGIN example.com.
+rpz4 3600 IN SOA ns1.rpz4.example.com. hostmaster.rpz4.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz4.example.com.
+ 3600 IN NS ns2.rpz4.example.com.
+$ORIGIN rpz4.example.com.
+32.5.5.0.192.rpz-client-ip A 1.2.3.5
+32.6.5.0.192.rpz-client-ip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz5.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz5.example.com"
+ rpz-action-override: "cname"
+ rpz-cname-override: "target.a"
+ zonefile:
+TEMPFILE_NAME rpz5.example.com
+TEMPFILE_CONTENTS rpz5.example.com
+$ORIGIN example.com.
+rpz5 3600 IN SOA ns1.rpz5.example.com. hostmaster.rpz5.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz5.example.com.
+ 3600 IN NS ns2.rpz5.example.com.
+$ORIGIN rpz5.example.com.
+32.7.5.0.192.rpz-client-ip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz6.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz6.example.com"
+ rpz-action-override: "disabled"
+ zonefile:
+TEMPFILE_NAME rpz6.example.com
+TEMPFILE_CONTENTS rpz6.example.com
+$ORIGIN example.com.
+rpz6 3600 IN SOA ns1.rpz6.example.com. hostmaster.rpz6.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz6.example.com.
+ 3600 IN NS ns2.rpz6.example.com.
+$ORIGIN rpz6.example.com.
+32.8.5.0.192.rpz-client-ip A 1.2.3.5
+TEMPFILE_END
+
+stub-zone:
+ name: "a."
+ stub-addr: 10.20.30.40
+CONFIG_END
+
+SCENARIO_BEGIN Test RPZ action override with trigger from clientip.
+
+; a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.40
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+target.a. IN A
+SECTION ANSWER
+target.a. IN A 1.2.3.6
+ENTRY_END
+RANGE_END
+
+STEP 10 QUERY ADDRESS 192.0.5.2
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 11 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NXDOMAIN
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 20 QUERY ADDRESS 192.0.5.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NXDOMAIN
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 30 QUERY ADDRESS 192.0.5.3
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 31 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. IN A 1.2.3.4
+ENTRY_END
+
+STEP 40 QUERY ADDRESS 192.0.5.4
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 41 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 50 QUERY ADDRESS 192.0.5.5
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 51 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. IN A 1.2.3.4
+ENTRY_END
+
+STEP 60 QUERY ADDRESS 192.0.5.6
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+; dropped.
+
+STEP 70 QUERY ADDRESS 192.0.5.7
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 71 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. CNAME target.a.
+target.a. A 1.2.3.6
+ENTRY_END
+
+STEP 80 QUERY ADDRESS 192.0.5.8
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 81 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. IN A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_cname_handle.rpl b/contrib/unbound/testdata/rpz_cname_handle.rpl
new file mode 100644
index 000000000000..38dddf12c52a
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_cname_handle.rpl
@@ -0,0 +1,779 @@
+; config options
+server:
+ module-config: "respip validator iterator"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ access-control: 192.0.0.0/8 allow
+
+rpz:
+ name: "rpz.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz.example.com"
+ zonefile:
+TEMPFILE_NAME rpz.example.com
+TEMPFILE_CONTENTS rpz.example.com
+$ORIGIN example.com.
+rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz.example.com.
+ 3600 IN NS ns2.rpz.example.com.
+$ORIGIN rpz.example.com.
+www.gotham.a A 1.2.3.61
+www.gotham2.a CNAME g2.target.a.
+g2.target.a A 1.2.3.62
+www.gotham3.a CNAME g3.target.a.
+g3.target.a CNAME g3b.target.a.
+g3b.target.a A 1.2.3.63
+www.gotham4.a CNAME g4.target.a.
+g4.target.a CNAME g4b.target.a.
+g4b.target.a CNAME g4c.target.a.
+g4c.target.a A 1.2.3.64
+w2.gotham5.a A 1.2.3.65
+w2.gotham6.a CNAME g6.target.a.
+g6.target.a A 1.2.3.66
+w2.gotham7.a CNAME g7.target.a.
+g7.target.a CNAME g7b.target.a.
+g7b.target.a A 1.2.3.66
+; ns1.gotham8.a
+32.48.30.20.10.rpz-nsip A 1.2.3.68
+; ns1.gotham9.a
+32.49.30.20.10.rpz-nsip CNAME g9.target.a.
+g9.target.a A 1.2.3.69
+; ns1.gotham10.a
+32.50.30.20.10.rpz-nsip CNAME g10.target.a.
+g10.target.a CNAME g10b.target.a.
+g10b.target.a A 1.2.3.70
+www.gotham11.a CNAME g11.target.a.
+www.gotham12.a CNAME g12.target.a.
+g12.target.a CNAME g12b.target.a.
+www.gotham13.a CNAME g13.target.a.
+g13.target.a CNAME g13b.target.a.
+g13b.target.a CNAME g13c.target.a.
+w2.gotham14.a CNAME g14.target.a.
+w2.gotham15.a CNAME g15.target.a.
+g15.target.a CNAME g15b.target.a.
+; ns1.gotham16.a
+32.56.30.20.10.rpz-nsip CNAME g16.target.a.
+; ns1.gotham17.a
+32.57.30.20.10.rpz-nsip CNAME g17.target.a.
+g17.target.a CNAME g17b.target.a.
+TEMPFILE_END
+
+stub-zone:
+ name: "a."
+ stub-addr: 10.20.30.40
+CONFIG_END
+
+SCENARIO_BEGIN Test RPZ handling of CNAMEs.
+
+; a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.40
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham5.a. IN NS
+SECTION AUTHORITY
+gotham5.a. NS ns1.gotham5.a.
+SECTION ADDITIONAL
+ns1.gotham5.a. A 10.20.30.45
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham6.a. IN NS
+SECTION AUTHORITY
+gotham6.a. NS ns1.gotham6.a.
+SECTION ADDITIONAL
+ns1.gotham6.a. A 10.20.30.46
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham7.a. IN NS
+SECTION AUTHORITY
+gotham7.a. NS ns1.gotham7.a.
+SECTION ADDITIONAL
+ns1.gotham7.a. A 10.20.30.47
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham8.a. IN NS
+SECTION AUTHORITY
+gotham8.a. NS ns1.gotham8.a.
+SECTION ADDITIONAL
+ns1.gotham8.a. A 10.20.30.48
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham9.a. IN NS
+SECTION AUTHORITY
+gotham9.a. NS ns1.gotham9.a.
+SECTION ADDITIONAL
+ns1.gotham9.a. A 10.20.30.49
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham10.a. IN NS
+SECTION AUTHORITY
+gotham10.a. NS ns1.gotham10.a.
+SECTION ADDITIONAL
+ns1.gotham10.a. A 10.20.30.50
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham14.a. IN NS
+SECTION AUTHORITY
+gotham14.a. NS ns1.gotham14.a.
+SECTION ADDITIONAL
+ns1.gotham14.a. A 10.20.30.54
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham15.a. IN NS
+SECTION AUTHORITY
+gotham15.a. NS ns1.gotham15.a.
+SECTION ADDITIONAL
+ns1.gotham15.a. A 10.20.30.55
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham16.a. IN NS
+SECTION AUTHORITY
+gotham16.a. NS ns1.gotham16.a.
+SECTION ADDITIONAL
+ns1.gotham16.a. A 10.20.30.56
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham17.a. IN NS
+SECTION AUTHORITY
+gotham17.a. NS ns1.gotham17.a.
+SECTION ADDITIONAL
+ns1.gotham17.a. A 10.20.30.57
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+target.a. IN A
+SECTION ANSWER
+target.a. IN A 1.2.3.6
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g11.target.a. IN A
+SECTION ANSWER
+g11.target.a. IN A 1.2.3.11
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g12b.target.a. IN A
+SECTION ANSWER
+g12b.target.a. A 1.2.3.12
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g13c.target.a. IN A
+SECTION ANSWER
+g13c.target.a. A 1.2.3.13
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g14.target.a. IN A
+SECTION ANSWER
+g14.target.a. A 1.2.3.14
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g15b.target.a. IN A
+SECTION ANSWER
+g15b.target.a. A 1.2.3.15
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g16.target.a. IN A
+SECTION ANSWER
+g16.target.a. A 1.2.3.16
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+g17b.target.a. IN A
+SECTION ANSWER
+g17b.target.a. A 1.2.3.17
+ENTRY_END
+RANGE_END
+
+; gotham5.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.45
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION ANSWER
+www.gotham5.a. CNAME w2.gotham5.a.
+ENTRY_END
+RANGE_END
+
+; gotham6.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.46
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. CNAME w2.gotham6.a.
+ENTRY_END
+RANGE_END
+
+; gotham7.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.47
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.gotham7.a. IN A
+SECTION ANSWER
+www.gotham7.a. CNAME w2.gotham7.a.
+ENTRY_END
+RANGE_END
+
+; gotham14.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.54
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.gotham14.a. IN A
+SECTION ANSWER
+www.gotham14.a. CNAME w2.gotham14.a.
+ENTRY_END
+RANGE_END
+
+; gotham15.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.55
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.gotham15.a. IN A
+SECTION ANSWER
+www.gotham15.a. CNAME w2.gotham15.a.
+ENTRY_END
+RANGE_END
+
+; Test with zero rpz CNAMEs, rpz answer.
+STEP 10 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham.a. IN A
+ENTRY_END
+
+STEP 11 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham.a. IN A
+SECTION ANSWER
+www.gotham.a. A 1.2.3.61
+ENTRY_END
+
+; Test with one rpz CNAME, rpz answer.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham2.a. IN A
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham2.a. IN A
+SECTION ANSWER
+www.gotham2.a. CNAME g2.target.a.
+g2.target.a. A 1.2.3.62
+ENTRY_END
+
+; Test with two rpz CNAMEs, rpz answer.
+STEP 30 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham3.a. IN A
+ENTRY_END
+
+STEP 31 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION ANSWER
+www.gotham3.a. CNAME g3.target.a.
+g3.target.a. CNAME g3b.target.a.
+g3b.target.a. A 1.2.3.63
+ENTRY_END
+
+; Test with three rpz CNAMEs, rpz answer.
+STEP 40 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham4.a. IN A
+ENTRY_END
+
+STEP 41 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham4.a. IN A
+SECTION ANSWER
+www.gotham4.a. CNAME g4.target.a.
+g4.target.a. CNAME g4b.target.a.
+g4b.target.a. CNAME g4c.target.a.
+g4c.target.a. A 1.2.3.64
+ENTRY_END
+
+; Test with a CNAME from upstream, zero rpz CNAMEs, rpz answer.
+STEP 50 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham5.a. IN A
+ENTRY_END
+
+STEP 51 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION ANSWER
+www.gotham5.a. CNAME w2.gotham5.a.
+w2.gotham5.a. A 1.2.3.65
+ENTRY_END
+
+; Test with a CNAME from upstream, one rpz CNAME, rpz answer.
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham6.a. IN A
+ENTRY_END
+
+STEP 61 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. CNAME w2.gotham6.a.
+w2.gotham6.a. CNAME g6.target.a.
+g6.target.a. A 1.2.3.66
+ENTRY_END
+
+; Test with a CNAME from upstream, two rpz CNAMEs, rpz answer.
+STEP 70 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham7.a. IN A
+ENTRY_END
+
+STEP 71 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham7.a. IN A
+SECTION ANSWER
+www.gotham7.a. CNAME w2.gotham7.a.
+w2.gotham7.a. CNAME g7.target.a.
+g7.target.a. CNAME g7b.target.a.
+g7b.target.a. A 1.2.3.66
+ENTRY_END
+
+; Test with a CNAME from cache, zero rpz CNAMEs, rpz answer.
+STEP 80 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham5.a. IN A
+ENTRY_END
+
+STEP 81 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION ANSWER
+www.gotham5.a. CNAME w2.gotham5.a.
+w2.gotham5.a. A 1.2.3.65
+ENTRY_END
+
+; Test with a CNAME from cache, one rpz CNAME, rpz answer.
+STEP 90 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham6.a. IN A
+ENTRY_END
+
+STEP 91 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. CNAME w2.gotham6.a.
+w2.gotham6.a. CNAME g6.target.a.
+g6.target.a. A 1.2.3.66
+ENTRY_END
+
+; Test with a CNAME from cache, two rpz CNAMEs, rpz answer.
+STEP 100 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham7.a. IN A
+ENTRY_END
+
+STEP 101 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham7.a. IN A
+SECTION ANSWER
+www.gotham7.a. CNAME w2.gotham7.a.
+w2.gotham7.a. CNAME g7.target.a.
+g7.target.a. CNAME g7b.target.a.
+g7b.target.a. A 1.2.3.66
+ENTRY_END
+
+; Test with lookup from nameserver, zero rpz CNAMEs, rpz nsip answer.
+STEP 110 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham8.a. IN A
+ENTRY_END
+
+STEP 111 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham8.a. IN A
+SECTION ANSWER
+www.gotham8.a. A 1.2.3.68
+ENTRY_END
+
+; Test with lookup from nameserver, one rpz CNAME, rpz nsip answer.
+STEP 120 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham9.a. IN A
+ENTRY_END
+
+STEP 121 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham9.a. IN A
+SECTION ANSWER
+www.gotham9.a. CNAME g9.target.a.
+g9.target.a. A 1.2.3.69
+ENTRY_END
+
+; Test with lookup from nameserver, two rpz CNAMEs, rpz nsip answer.
+STEP 130 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham10.a. IN A
+ENTRY_END
+
+STEP 131 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham10.a. IN A
+SECTION ANSWER
+www.gotham10.a. CNAME g10.target.a.
+g10.target.a. CNAME g10b.target.a.
+g10b.target.a. A 1.2.3.70
+ENTRY_END
+
+; Test with one rpz CNAME, upstream answer.
+STEP 140 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham11.a. IN A
+ENTRY_END
+
+STEP 141 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham11.a. IN A
+SECTION ANSWER
+www.gotham11.a. CNAME g11.target.a.
+g11.target.a. A 1.2.3.11
+ENTRY_END
+
+; Test with two rpz CNAMEs, upstream answer.
+STEP 150 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham12.a. IN A
+ENTRY_END
+
+STEP 151 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham12.a. IN A
+SECTION ANSWER
+www.gotham12.a. CNAME g12.target.a.
+g12.target.a. CNAME g12b.target.a.
+g12b.target.a. A 1.2.3.12
+ENTRY_END
+
+; Test with three rpz CNAMEs, upstream answer.
+STEP 160 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham13.a. IN A
+ENTRY_END
+
+STEP 161 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham13.a. IN A
+SECTION ANSWER
+www.gotham13.a. CNAME g13.target.a.
+g13.target.a. CNAME g13b.target.a.
+g13b.target.a. CNAME g13c.target.a.
+g13c.target.a. A 1.2.3.13
+ENTRY_END
+
+; Test with a CNAME from upstream, one rpz CNAME, upstream answer.
+STEP 170 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham14.a. IN A
+ENTRY_END
+
+STEP 171 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham14.a. IN A
+SECTION ANSWER
+www.gotham14.a. CNAME w2.gotham14.a.
+w2.gotham14.a. CNAME g14.target.a.
+g14.target.a. A 1.2.3.14
+ENTRY_END
+
+; Test with a CNAME from upstream, two rpz CNAMEs, upstream answer.
+STEP 180 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham15.a. IN A
+ENTRY_END
+
+STEP 181 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham15.a. IN A
+SECTION ANSWER
+www.gotham15.a. CNAME w2.gotham15.a.
+w2.gotham15.a. CNAME g15.target.a.
+g15.target.a. CNAME g15b.target.a.
+g15b.target.a. A 1.2.3.15
+ENTRY_END
+
+; Test with a CNAME from cache, one rpz CNAME, upstream answer.
+STEP 190 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham14.a. IN A
+ENTRY_END
+
+STEP 191 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham14.a. IN A
+SECTION ANSWER
+www.gotham14.a. CNAME w2.gotham14.a.
+w2.gotham14.a. CNAME g14.target.a.
+g14.target.a. A 1.2.3.14
+ENTRY_END
+
+; Test with a CNAME from cache, two rpz CNAMEs, upstream answer.
+STEP 200 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham15.a. IN A
+ENTRY_END
+
+STEP 201 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham15.a. IN A
+SECTION ANSWER
+www.gotham15.a. CNAME w2.gotham15.a.
+w2.gotham15.a. CNAME g15.target.a.
+g15.target.a. CNAME g15b.target.a.
+g15b.target.a. A 1.2.3.15
+ENTRY_END
+
+; Test with lookup from nameserver, one rpz nsip CNAME, upstream answer.
+STEP 210 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham16.a. IN A
+ENTRY_END
+
+STEP 211 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham16.a. IN A
+SECTION ANSWER
+www.gotham16.a. CNAME g16.target.a.
+g16.target.a. A 1.2.3.16
+ENTRY_END
+
+; Test with lookup from nameserver, two rpz nsip CNAMEs, upstream answer.
+STEP 220 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham17.a. IN A
+ENTRY_END
+
+STEP 221 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham17.a. IN A
+SECTION ANSWER
+www.gotham17.a. CNAME g17.target.a.
+g17.target.a. CNAME g17b.target.a.
+g17b.target.a. A 1.2.3.17
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_nsdname_override.rpl b/contrib/unbound/testdata/rpz_nsdname_override.rpl
new file mode 100644
index 000000000000..d662e55c7775
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_nsdname_override.rpl
@@ -0,0 +1,325 @@
+; config options
+server:
+ module-config: "respip validator iterator"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ access-control: 192.0.0.0/8 allow
+
+rpz:
+ name: "rpz.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz.example.com"
+ rpz-action-override: "nxdomain"
+ zonefile:
+TEMPFILE_NAME rpz.example.com
+TEMPFILE_CONTENTS rpz.example.com
+$ORIGIN example.com.
+rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz.example.com.
+ 3600 IN NS ns2.rpz.example.com.
+$ORIGIN rpz.example.com.
+ns1.gotham.a.rpz-nsdname A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz2.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz2.example.com"
+ rpz-action-override: "nodata"
+ zonefile:
+TEMPFILE_NAME rpz2.example.com
+TEMPFILE_CONTENTS rpz2.example.com
+$ORIGIN example.com.
+rpz2 3600 IN SOA ns1.rpz2.example.com. hostmaster.rpz2.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz2.example.com.
+ 3600 IN NS ns2.rpz2.example.com.
+$ORIGIN rpz2.example.com.
+ns1.gotham2.a.rpz-nsdname A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz3.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz3.example.com"
+ rpz-action-override: "passthru"
+ zonefile:
+TEMPFILE_NAME rpz3.example.com
+TEMPFILE_CONTENTS rpz3.example.com
+$ORIGIN example.com.
+rpz3 3600 IN SOA ns1.rpz3.example.com. hostmaster.rpz3.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz3.example.com.
+ 3600 IN NS ns2.rpz3.example.com.
+$ORIGIN rpz3.example.com.
+ns1.gotham3.a.rpz-nsdname A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz4.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz4.example.com"
+ rpz-action-override: "drop"
+ zonefile:
+TEMPFILE_NAME rpz4.example.com
+TEMPFILE_CONTENTS rpz4.example.com
+$ORIGIN example.com.
+rpz4 3600 IN SOA ns1.rpz4.example.com. hostmaster.rpz4.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz4.example.com.
+ 3600 IN NS ns2.rpz4.example.com.
+$ORIGIN rpz4.example.com.
+ns1.gotham3.a.rpz-nsdname A 1.2.3.5
+ns1.gotham4.a.rpz-nsdname A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz5.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz5.example.com"
+ rpz-action-override: "cname"
+ rpz-cname-override: "target.a"
+ zonefile:
+TEMPFILE_NAME rpz5.example.com
+TEMPFILE_CONTENTS rpz5.example.com
+$ORIGIN example.com.
+rpz5 3600 IN SOA ns1.rpz5.example.com. hostmaster.rpz5.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz5.example.com.
+ 3600 IN NS ns2.rpz5.example.com.
+$ORIGIN rpz5.example.com.
+ns1.gotham5.a.rpz-nsdname A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz6.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz6.example.com"
+ rpz-action-override: "disabled"
+ zonefile:
+TEMPFILE_NAME rpz6.example.com
+TEMPFILE_CONTENTS rpz6.example.com
+$ORIGIN example.com.
+rpz6 3600 IN SOA ns1.rpz6.example.com. hostmaster.rpz6.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz6.example.com.
+ 3600 IN NS ns2.rpz6.example.com.
+$ORIGIN rpz6.example.com.
+ns1.gotham6.a.rpz-nsdname A 1.2.3.5
+TEMPFILE_END
+
+stub-zone:
+ name: "a."
+ stub-addr: 10.20.30.40
+CONFIG_END
+
+SCENARIO_BEGIN Test RPZ action override with trigger from nsdname.
+
+; a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.40
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham.a. IN A
+SECTION AUTHORITY
+gotham.a. NS ns1.gotham.a.
+SECTION ADDITIONAL
+ns1.gotham.a. A 10.20.30.41
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham2.a. IN A
+SECTION AUTHORITY
+gotham2.a. NS ns1.gotham2.a.
+SECTION ADDITIONAL
+ns1.gotham2.a. A 10.20.30.42
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION AUTHORITY
+gotham3.a. NS ns1.gotham3.a.
+SECTION ADDITIONAL
+ns1.gotham3.a. A 10.20.30.43
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham4.a. IN A
+SECTION AUTHORITY
+gotham4.a. NS ns1.gotham4.a.
+SECTION ADDITIONAL
+ns1.gotham4.a. A 10.20.30.44
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION AUTHORITY
+gotham5.a. NS ns1.gotham5.a.
+SECTION ADDITIONAL
+ns1.gotham5.a. A 10.20.30.45
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION AUTHORITY
+gotham6.a. NS ns1.gotham6.a.
+SECTION ADDITIONAL
+ns1.gotham6.a. A 10.20.30.46
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+target.a. IN A
+SECTION ANSWER
+target.a. IN A 1.2.3.6
+ENTRY_END
+RANGE_END
+
+; gotham3.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.43
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION ANSWER
+www.gotham3.a. A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; gotham6.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.46
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+STEP 10 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham.a. IN A
+ENTRY_END
+
+STEP 11 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NXDOMAIN
+SECTION QUESTION
+www.gotham.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham2.a. IN A
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham2.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 30 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham3.a. IN A
+ENTRY_END
+
+STEP 31 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION ANSWER
+www.gotham3.a. A 1.2.3.4
+ENTRY_END
+
+STEP 40 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham4.a. IN A
+ENTRY_END
+;dropped
+
+STEP 50 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham5.a. IN A
+ENTRY_END
+
+STEP 51 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION ANSWER
+www.gotham5.a. CNAME target.a
+target.a A 1.2.3.6
+ENTRY_END
+
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham6.a. IN A
+ENTRY_END
+
+STEP 61 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_nsip_override.rpl b/contrib/unbound/testdata/rpz_nsip_override.rpl
new file mode 100644
index 000000000000..8c3b20be381c
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_nsip_override.rpl
@@ -0,0 +1,332 @@
+; config options
+server:
+ module-config: "respip validator iterator"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ access-control: 192.0.0.0/8 allow
+
+rpz:
+ name: "rpz.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz.example.com"
+ rpz-action-override: "nxdomain"
+ zonefile:
+TEMPFILE_NAME rpz.example.com
+TEMPFILE_CONTENTS rpz.example.com
+$ORIGIN example.com.
+rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz.example.com.
+ 3600 IN NS ns2.rpz.example.com.
+$ORIGIN rpz.example.com.
+; ns1.gotham.a
+32.41.30.20.10.rpz-nsip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz2.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz2.example.com"
+ rpz-action-override: "nodata"
+ zonefile:
+TEMPFILE_NAME rpz2.example.com
+TEMPFILE_CONTENTS rpz2.example.com
+$ORIGIN example.com.
+rpz2 3600 IN SOA ns1.rpz2.example.com. hostmaster.rpz2.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz2.example.com.
+ 3600 IN NS ns2.rpz2.example.com.
+$ORIGIN rpz2.example.com.
+; ns1.gotham2.a
+32.42.30.20.10.rpz-nsip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz3.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz3.example.com"
+ rpz-action-override: "passthru"
+ zonefile:
+TEMPFILE_NAME rpz3.example.com
+TEMPFILE_CONTENTS rpz3.example.com
+$ORIGIN example.com.
+rpz3 3600 IN SOA ns1.rpz3.example.com. hostmaster.rpz3.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz3.example.com.
+ 3600 IN NS ns2.rpz3.example.com.
+$ORIGIN rpz3.example.com.
+; ns1.gotham3.a
+32.43.30.20.10.rpz-nsip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz4.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz4.example.com"
+ rpz-action-override: "drop"
+ zonefile:
+TEMPFILE_NAME rpz4.example.com
+TEMPFILE_CONTENTS rpz4.example.com
+$ORIGIN example.com.
+rpz4 3600 IN SOA ns1.rpz4.example.com. hostmaster.rpz4.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz4.example.com.
+ 3600 IN NS ns2.rpz4.example.com.
+$ORIGIN rpz4.example.com.
+; ns1.gotham3.a
+32.43.30.20.10.rpz-nsip A 1.2.3.5
+; ns1.gotham4.a
+32.44.30.20.10.rpz-nsip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz5.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz5.example.com"
+ rpz-action-override: "cname"
+ rpz-cname-override: "target.a"
+ zonefile:
+TEMPFILE_NAME rpz5.example.com
+TEMPFILE_CONTENTS rpz5.example.com
+$ORIGIN example.com.
+rpz5 3600 IN SOA ns1.rpz5.example.com. hostmaster.rpz5.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz5.example.com.
+ 3600 IN NS ns2.rpz5.example.com.
+$ORIGIN rpz5.example.com.
+; ns1.gotham5.a
+32.45.30.20.10.rpz-nsip A 1.2.3.5
+TEMPFILE_END
+
+rpz:
+ name: "rpz6.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz6.example.com"
+ rpz-action-override: "disabled"
+ zonefile:
+TEMPFILE_NAME rpz6.example.com
+TEMPFILE_CONTENTS rpz6.example.com
+$ORIGIN example.com.
+rpz6 3600 IN SOA ns1.rpz6.example.com. hostmaster.rpz6.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz6.example.com.
+ 3600 IN NS ns2.rpz6.example.com.
+$ORIGIN rpz6.example.com.
+; ns1.gotham6.a
+32.46.30.20.10.rpz-nsip A 1.2.3.5
+TEMPFILE_END
+
+stub-zone:
+ name: "a."
+ stub-addr: 10.20.30.40
+CONFIG_END
+
+SCENARIO_BEGIN Test RPZ action override with trigger from nsip.
+
+; a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.40
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham.a. IN A
+SECTION AUTHORITY
+gotham.a. NS ns1.gotham.a.
+SECTION ADDITIONAL
+ns1.gotham.a. A 10.20.30.41
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham2.a. IN A
+SECTION AUTHORITY
+gotham2.a. NS ns1.gotham2.a.
+SECTION ADDITIONAL
+ns1.gotham2.a. A 10.20.30.42
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION AUTHORITY
+gotham3.a. NS ns1.gotham3.a.
+SECTION ADDITIONAL
+ns1.gotham3.a. A 10.20.30.43
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham4.a. IN A
+SECTION AUTHORITY
+gotham4.a. NS ns1.gotham4.a.
+SECTION ADDITIONAL
+ns1.gotham4.a. A 10.20.30.44
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION AUTHORITY
+gotham5.a. NS ns1.gotham5.a.
+SECTION ADDITIONAL
+ns1.gotham5.a. A 10.20.30.45
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION AUTHORITY
+gotham6.a. NS ns1.gotham6.a.
+SECTION ADDITIONAL
+ns1.gotham6.a. A 10.20.30.46
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+target.a. IN A
+SECTION ANSWER
+target.a. IN A 1.2.3.6
+ENTRY_END
+RANGE_END
+
+; gotham3.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.43
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION ANSWER
+www.gotham3.a. A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; gotham6.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.46
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+STEP 10 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham.a. IN A
+ENTRY_END
+
+STEP 11 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NXDOMAIN
+SECTION QUESTION
+www.gotham.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham2.a. IN A
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham2.a. IN A
+SECTION ANSWER
+ENTRY_END
+
+STEP 30 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham3.a. IN A
+ENTRY_END
+
+STEP 31 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham3.a. IN A
+SECTION ANSWER
+www.gotham3.a. A 1.2.3.4
+ENTRY_END
+
+STEP 40 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham4.a. IN A
+ENTRY_END
+;dropped
+
+STEP 50 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham5.a. IN A
+ENTRY_END
+
+STEP 51 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham5.a. IN A
+SECTION ANSWER
+www.gotham5.a. CNAME target.a
+target.a A 1.2.3.6
+ENTRY_END
+
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham6.a. IN A
+ENTRY_END
+
+STEP 61 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+www.gotham6.a. IN A
+SECTION ANSWER
+www.gotham6.a. A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_passthru_clientip.rpl b/contrib/unbound/testdata/rpz_passthru_clientip.rpl
new file mode 100644
index 000000000000..1ffb79a00575
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_passthru_clientip.rpl
@@ -0,0 +1,90 @@
+; config options
+server:
+ module-config: "respip validator iterator"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ access-control: 192.0.0.0/8 allow
+
+rpz:
+ name: "rpz.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz.example.com"
+ zonefile:
+TEMPFILE_NAME rpz.example.com
+TEMPFILE_CONTENTS rpz.example.com
+$ORIGIN example.com.
+rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz.example.com.
+ 3600 IN NS ns2.rpz.example.com.
+$ORIGIN rpz.example.com.
+d.a A 127.0.0.1
+32.1.5.0.192.rpz-client-ip CNAME rpz-passthru.
+32.2.5.0.192.rpz-client-ip CNAME rpz-drop.
+TEMPFILE_END
+
+stub-zone:
+ name: "a."
+ stub-addr: 10.20.30.40
+CONFIG_END
+
+SCENARIO_BEGIN Test RPZ passthru ends processing after clientip.
+
+; a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.40
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+STEP 10 QUERY ADDRESS 192.0.5.1
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 11 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. A 1.2.3.4
+ENTRY_END
+
+; This reply should get the rpz data
+STEP 20 QUERY ADDRESS 192.0.5.3
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+d.a. IN A
+SECTION ANSWER
+d.a. A 127.0.0.1
+ENTRY_END
+
+; This reply should be dropped.
+STEP 30 QUERY ADDRESS 192.0.5.2
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+d.a. IN A
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_qtype_cname.rpl b/contrib/unbound/testdata/rpz_qtype_cname.rpl
new file mode 100644
index 000000000000..fa5674a0fba8
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_qtype_cname.rpl
@@ -0,0 +1,120 @@
+; config options
+server:
+ module-config: "respip validator iterator"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: no
+ access-control: 192.0.0.0/8 allow
+
+rpz:
+ name: "rpz.example.com."
+ rpz-log: yes
+ rpz-log-name: "rpz.example.com"
+ zonefile:
+TEMPFILE_NAME rpz.example.com
+TEMPFILE_CONTENTS rpz.example.com
+$ORIGIN example.com.
+rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
+ 1379078166 28800 7200 604800 7200 )
+ 3600 IN NS ns1.rpz.example.com.
+ 3600 IN NS ns2.rpz.example.com.
+$ORIGIN rpz.example.com.
+www.gotham.a CNAME foo.target.a.
+32.42.30.20.10.rpz-nsip CNAME foo.target.a.
+TEMPFILE_END
+
+stub-zone:
+ name: "a."
+ stub-addr: 10.20.30.40
+CONFIG_END
+
+SCENARIO_BEGIN Test RPZ with qtype CNAME.
+
+; a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.40
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham.a. IN A
+SECTION AUTHORITY
+gotham.a. NS ns1.gotham.a.
+SECTION ADDITIONAL
+ns1.gotham.a. A 10.20.30.41
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+gotham2.a. IN NS
+SECTION AUTHORITY
+gotham2.a. NS ns1.gotham2.a.
+SECTION ADDITIONAL
+ns1.gotham2.a. A 10.20.30.42
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+target.a. IN A
+SECTION ANSWER
+target.a. IN A 1.2.3.6
+ENTRY_END
+RANGE_END
+
+; gotham2.a.
+RANGE_BEGIN 0 1000
+ ADDRESS 10.20.30.42
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.gotham2.a. IN CNAME
+SECTION ANSWER
+www.gotham2.a. CNAME foo2.target.a.
+ENTRY_END
+RANGE_END
+
+; Query for type CNAME, from the RPZ response
+STEP 10 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham.a. IN CNAME
+ENTRY_END
+
+STEP 11 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA
+SECTION QUESTION
+www.gotham.a. IN CNAME
+SECTION ANSWER
+www.gotham.a. IN CNAME foo.target.a.
+ENTRY_END
+
+; Query for type CNAME, the answer is nameserver lookup, CNAME from rpz nsip.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.gotham2.a. IN CNAME
+ENTRY_END
+
+STEP 21 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AA NOERROR
+SECTION QUESTION
+www.gotham2.a. IN CNAME
+SECTION ANSWER
+www.gotham2.a. IN CNAME foo.target.a.
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/example.org.zone b/contrib/unbound/testdata/rpz_reload.tdir/example.org.zone
new file mode 100644
index 000000000000..21dd8993880a
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/example.org.zone
@@ -0,0 +1,2 @@
+example.org. 3600 IN SOA ns1.example.org. hostmaster.example.org. 1379078166 28800 7200 604800 7200
+www.example.org. A 1.2.3.5
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/rpz.example.com.zone b/contrib/unbound/testdata/rpz_reload.tdir/rpz.example.com.zone
new file mode 100644
index 000000000000..ad075b18b359
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/rpz.example.com.zone
@@ -0,0 +1,6 @@
+; example rpz file
+rpz.example.com. 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. 1379078166 28800 7200 604800 7200
+ NS ns1.rpz.example.com.
+ NS ns2.rpz.example.com.
+foo.example.net CNAME .
+www.example.net A 1.2.3.4
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.conf b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.conf
new file mode 100644
index 000000000000..d3c81e486cdd
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.conf
@@ -0,0 +1,30 @@
+server:
+ verbosity: 7
+ # num-threads: 1
+ interface: 127.0.0.1
+ port: @PORT@
+ use-syslog: no
+ directory: ""
+ pidfile: "unbound.pid"
+ chroot: ""
+ username: ""
+ module-config: "respip iterator"
+ log-time-ascii: yes
+
+remote-control:
+ control-enable: yes
+ control-interface: @CONTROL_PATH@/controlpipe.@CONTROL_PID@
+ control-use-cert: no
+
+rpz:
+ name: "rpz.example.com"
+ zonefile: "rpz.example.com.zone"
+ rpz-action-override: cname
+ rpz-cname-override: "www.example.org"
+ rpz-log: yes
+ rpz-log-name: "example policy"
+
+auth-zone:
+ name: "example.org"
+ zonefile: "example.org.zone"
+ for-upstream: yes
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.dsc b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.dsc
new file mode 100644
index 000000000000..27f31cff19df
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.dsc
@@ -0,0 +1,16 @@
+BaseName: rpz_reload
+Version: 1.0
+Description: check rpz reload change
+CreationDate: Mon 11 Mar 16:00:00 CET 2024
+Maintainer: dr. W.C.A. Wijngaards
+Category:
+Component:
+CmdDepends:
+Depends:
+Help:
+Pre: rpz_reload.pre
+Post: rpz_reload.post
+Test: rpz_reload.test
+AuxFiles:
+Passed:
+Failure:
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.post b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.post
new file mode 100644
index 000000000000..ef93cd46bc59
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.post
@@ -0,0 +1,12 @@
+# #-- rpz_reload.post --#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# source the test var file when it's there
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+#
+# do your teardown here
+. ../common.sh
+echo "> cat logfiles"
+cat unbound.log
+kill_pid $UNBOUND_PID
+rm -f $CONTROL_PATH/controlpipe.$CONTROL_PID
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.pre b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.pre
new file mode 100644
index 000000000000..8f88b6094264
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.pre
@@ -0,0 +1,26 @@
+# #-- rpz_reload.pre--#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+. ../common.sh
+
+get_random_port 1
+UNBOUND_PORT=$RND_PORT
+echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
+
+# make config file
+CONTROL_PATH=/tmp
+CONTROL_PID=$$
+sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's?@CONTROL_PATH\@?'$CONTROL_PATH'?' -e 's/@CONTROL_PID@/'$CONTROL_PID'/' < rpz_reload.conf > ub.conf
+# start unbound in the background
+PRE="../.."
+$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
+UNBOUND_PID=$!
+echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
+echo "CONTROL_PATH=$CONTROL_PATH" >> .tpkg.var.test
+echo "CONTROL_PID=$CONTROL_PID" >> .tpkg.var.test
+
+cat .tpkg.var.test
+wait_unbound_up unbound.log
diff --git a/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.test b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.test
new file mode 100644
index 000000000000..f3cf9b29ef51
--- /dev/null
+++ b/contrib/unbound/testdata/rpz_reload.tdir/rpz_reload.test
@@ -0,0 +1,109 @@
+# #-- rpz_reload.test --#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+PRE="../.."
+. ../common.sh
+# do the test
+echo "> dig . SOA"
+dig @127.0.0.1 -p $UNBOUND_PORT localhost. A | tee outfile
+echo "> check answer"
+if grep localhost outfile | grep "127.0.0.1"; then
+ echo "OK"
+else
+ echo "Not OK"
+ exit 1
+fi
+
+echo ""
+echo "> unbound-control status"
+$PRE/unbound-control -c ub.conf status
+if test $? -ne 0; then
+ echo "wrong exit value."
+ exit 1
+else
+ echo "exit value: OK"
+fi
+
+# Have the RPZ block some things.
+dig @127.0.0.1 -p $UNBOUND_PORT foo.example.net. A | tee outfile
+echo "> check answer"
+if grep "www.example.org" outfile | grep "1.2.3.5"; then
+ echo "OK"
+else
+ echo "Not OK"
+ exit 1
+fi
+if grep "rpz: applied .example policy." unbound.log | grep "foo.example.net. A"; then
+ echo "log line OK"
+else
+ echo "log line not OK"
+ exit 1
+fi
+
+dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. A | tee outfile
+if grep "www.example.org" outfile | grep "1.2.3.5"; then
+ echo "OK"
+else
+ echo "Not OK"
+ exit 1
+fi
+if grep "rpz: applied .example policy." unbound.log | grep "www.example.net. A"; then
+ echo "log line OK"
+else
+ echo "log line not OK"
+ exit 1
+fi
+
+# Modify the config
+cp ub.conf ub2.conf
+sed -e 's/rpz-action-override: cname/#rpz-action-override: ""/' \
+ -e 's/rpz-cname-override: "www.example.org"/rpz-cname-override: ""/' \
+ -e 's/rpz-log-name: "example policy"/rpz-log-name: "exrpz"/' \
+ < ub2.conf > ub.conf
+echo ""
+echo "> Modified config"
+grep "rpz" ub.conf
+echo ""
+
+echo "> unbound-control reload"
+$PRE/unbound-control -c ub.conf reload 2>&1 | tee outfile
+if test $? -ne 0; then
+ echo "wrong exit value."
+ exit 1
+fi
+wait_logfile unbound.log "Restart of unbound" 60
+
+# Check the output after reload
+dig @127.0.0.1 -p $UNBOUND_PORT foo.example.net. A | tee outfile
+echo "> check answer"
+if grep "NXDOMAIN" outfile; then
+ echo "OK"
+else
+ echo "Not OK"
+ exit 1
+fi
+if grep "rpz: applied .exrpz." unbound.log | grep "foo.example.net. A"; then
+ echo "log line OK"
+else
+ echo "log line not OK"
+ exit 1
+fi
+
+dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. A | tee outfile
+if grep "1.2.3.4" outfile; then
+ echo "OK"
+else
+ echo "Not OK"
+ exit 1
+fi
+if grep "rpz: applied .exrpz." unbound.log | grep "www.example.net. A"; then
+ echo "log line OK"
+else
+ echo "log line not OK"
+ exit 1
+fi
+
+exit 0
diff --git a/contrib/unbound/testdata/subnet_cached_size.crpl b/contrib/unbound/testdata/subnet_cached_size.crpl
new file mode 100644
index 000000000000..d221d0d37bc8
--- /dev/null
+++ b/contrib/unbound/testdata/subnet_cached_size.crpl
@@ -0,0 +1,308 @@
+; Ask the same question twice. Check to see second is answered
+; from cache
+
+server:
+ trust-anchor: "example.com. 3600 IN DS 2854 3 1 46e4ffc6e9a4793b488954bd3f0cc6af0dfb201b"
+ val-override-date: "20070916134226"
+ trust-anchor-signaling: no
+ target-fetch-policy: "0 0 0 0 0"
+ send-client-subnet: 1.2.3.4
+ max-client-subnet-ipv4: 17
+ module-config: "subnetcache validator iterator"
+ verbosity: 3
+ fake-sha1: yes
+ fake-dsa: yes
+ access-control: 127.0.0.0/8 allow_snoop
+ qname-minimisation: "no"
+ minimal-responses: no
+ ; the size for the edns subnet cache
+ msg-cache-size: 1500
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test subnet cached response size
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 100
+ ADDRESS 193.0.14.129
+ ENTRY_BEGIN
+ MATCH opcode qtype qname ednsdata
+ ADJUST copy_id
+ REPLY QR NOERROR
+ SECTION QUESTION
+ . IN NS
+ SECTION ANSWER
+ . IN NS K.ROOT-SERVERS.NET.
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ;; we expect to receive empty
+ HEX_EDNSDATA_END
+ K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ ENTRY_END
+
+ ENTRY_BEGIN
+ MATCH opcode qtype qname
+ ADJUST copy_id
+ REPLY QR NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION AUTHORITY
+ com. IN NS a.gtld-servers.net.
+ SECTION ADDITIONAL
+ a.gtld-servers.net. IN A 192.5.6.30
+ ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 100
+ ADDRESS 192.5.6.30
+ ENTRY_BEGIN
+ MATCH opcode qtype qname ednsdata
+ ADJUST copy_id
+ REPLY QR NOERROR
+ SECTION QUESTION
+ com. IN NS
+ SECTION ANSWER
+ com. IN NS a.gtld-servers.net.
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ;; we expect to receive empty
+ HEX_EDNSDATA_END
+ a.gtld-servers.net. IN A 192.5.6.30
+ ENTRY_END
+
+ ENTRY_BEGIN
+ MATCH opcode qtype qname
+ ADJUST copy_id
+ REPLY QR NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ SECTION ADDITIONAL
+ ns.example.com. IN A 1.2.3.4
+ ENTRY_END
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.4
+ ENTRY_BEGIN
+ MATCH opcode qtype qname ednsdata
+ ADJUST copy_id
+ REPLY QR NOERROR
+ SECTION QUESTION
+ example.com. IN NS
+ SECTION ANSWER
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ;; we expect to receive empty
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ ENTRY_END
+
+ ; response to DNSKEY priming query
+ ENTRY_BEGIN
+ MATCH opcode qtype qname ednsdata
+ ADJUST copy_id
+ REPLY QR NOERROR
+ SECTION QUESTION
+ example.com. IN DNSKEY
+ SECTION ANSWER
+ example.com. 3600 IN DNSKEY 256 3 3 ALXLUsWqUrY3JYER3T4TBJII s70j+sDS/UT2QRp61SE7S3E EXopNXoFE73JLRmvpi/UrOO/Vz4Se 6wXv/CYCKjGw06U4WRgR YXcpEhJROyNapmdIKSx hOzfLVE1gqA0PweZR8d tY3aNQSRn3sPpwJr6Mi /PqQKAMMrZ9ckJpf1+b QMOOvxgzz2U1GS18b3y ZKcgTMEaJzd/GZYzi/B N2DzQ0MsrSwYXfsNLFO Bbs8PJMW4LYIxeeOe6rUgkWOF 7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2854 (zsk), size = 1688b}
+ example.com. 3600 IN RRSIG DNSKEY 3 2 3600 20070926134802 20070829134802 2854 example.com. MCwCFG1yhRNtTEa3Eno2zhVVuy2EJX3wAhQeLyUp6+UXcpC5qGNu9tkrTEgPUg== ;{id = 2854}
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ;; we expect to receive empty
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ ENTRY_END
+
+ ; response to query of interest
+ ENTRY_BEGIN
+ MATCH opcode qtype qname ednsdata
+ ADJUST copy_id copy_ednsdata_assume_clientsubnet
+ REPLY QR NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION ANSWER
+ www.example.com. IN A 10.20.30.40
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCQMyTjn7WWwpwAR1LlVeLpRgZGuQIUCcJDEkwAuzytTDRlYK7nIMwH1CM= ;{id = 2854}
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ www.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFC99iE9K5y2WNgI0gFvBWaTi9wm6AhUAoUqOpDtG5Zct+Qr9F3mSdnbc6V4= ;{id = 2854}
+ ENTRY_END
+
+ ENTRY_BEGIN
+ MATCH opcode qtype qname ednsdata
+ ADJUST copy_id copy_ednsdata_assume_clientsubnet
+ REPLY QR NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION ANSWER
+ www.example.com. IN A 10.20.30.43
+ www.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. AFC5G+z0jWt132hDuTIFOva59cZ7MTd+ex/osuoiQhIIuWFAr9xoZz8=
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.3.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 00 ; source mask, scopemask
+ 7f 03 00 ; address
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCQMyTjn7WWwpwAR1LlVeLpRgZGuQIUCcJDEkwAuzytTDRlYK7nIMwH1CM= ;{id = 2854}
+ ENTRY_END
+RANGE_END
+
+STEP 1 QUERY
+ENTRY_BEGIN
+ HEX_ANSWER_BEGIN;
+ 00 00 01 00 00 01 00 00 ;ID 0
+ 00 00 00 01 03 77 77 77 ; www.example.com A? (DO)
+ 07 65 78 61 6d 70 6c 65
+ 03 63 6f 6d 00 00 01 00
+ 01 00 00 29 10 00 00 00
+ 80 00 00 0b
+
+ 00 08 00 07 ; OPC, optlen
+ 00 01 11 00 ; ip4, scope 17, source 0
+ 7f 00 00 ;127.0.0.0/17
+ HEX_ANSWER_END
+ENTRY_END
+
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+ MATCH all ednsdata
+ REPLY QR RD RA AD NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION ANSWER
+ www.example.com. IN A 10.20.30.40
+ www.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFC99iE9K5y2WNgI0gFvBWaTi9wm6AhUAoUqOpDtG5Zct+Qr9F3mSdnbc6V4= ;{id = 2854}
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 11 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCQMyTjn7WWwpwAR1LlVeLpRgZGuQIUCcJDEkwAuzytTDRlYK7nIMwH1CM= ;{id = 2854}
+ENTRY_END
+
+STEP 11 QUERY
+
+ENTRY_BEGIN
+ HEX_ANSWER_BEGIN;
+ 00 00 00 00 00 01 00 00 ;ID 0, no RD
+ 00 00 00 01 03 77 77 77 ; www.example.com A? (DO)
+ 07 65 78 61 6d 70 6c 65
+ 03 63 6f 6d 00 00 01 00
+ 01 00 00 29 10 00 00 00
+ 80 00 00 0b
+
+ 00 08 00 07 ; OPC, optlen
+ 00 01 12 00 ; ip4, scope 18, source 0
+ 7f 00 00 ;127.0.0.0/18
+ HEX_ANSWER_END
+ENTRY_END
+
+STEP 20 CHECK_ANSWER
+ENTRY_BEGIN
+ MATCH all ednsdata
+ REPLY QR RA AD NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION ANSWER
+ www.example.com. IN A 10.20.30.40
+ www.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFC99iE9K5y2WNgI0gFvBWaTi9wm6AhUAoUqOpDtG5Zct+Qr9F3mSdnbc6V4= ;{id = 2854}
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.0.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 12 11 ; source mask, scopemask
+ 7f 00 00 ; address
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCQMyTjn7WWwpwAR1LlVeLpRgZGuQIUCcJDEkwAuzytTDRlYK7nIMwH1CM= ;{id = 2854}
+ENTRY_END
+
+; update the cache entry
+STEP 30 QUERY
+ENTRY_BEGIN
+ HEX_ANSWER_BEGIN;
+ 00 00 01 00 00 01 00 00 ;ID 0
+ 00 00 00 01 03 77 77 77 ; www.example.com A? (DO)
+ 07 65 78 61 6d 70 6c 65
+ 03 63 6f 6d 00 00 01 00
+ 01 00 00 29 10 00 00 00
+ 80 00 00 0b
+
+ 00 08 00 07 ; OPC, optlen
+ 00 01 11 00 ; ip4, scope 17, source 0
+ 7f 03 00 ;127.3.0.0/17
+ HEX_ANSWER_END
+ENTRY_END
+
+STEP 40 CHECK_ANSWER
+ENTRY_BEGIN
+ MATCH all ednsdata
+ REPLY QR RD RA AD NOERROR
+ SECTION QUESTION
+ www.example.com. IN A
+ SECTION ANSWER
+ www.example.com. IN A 10.20.30.43
+ www.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. AFC5G+z0jWt132hDuTIFOva59cZ7MTd+ex/osuoiQhIIuWFAr9xoZz8=
+ SECTION AUTHORITY
+ example.com. IN NS ns.example.com.
+ example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ SECTION ADDITIONAL
+ HEX_EDNSDATA_BEGIN
+ ; client is 127.3.0.1
+ 00 08 ; OPC
+ 00 07 ; option length
+ 00 01 ; Family
+ 11 11 ; source mask, scopemask
+ 7f 03 00 ; address
+ HEX_EDNSDATA_END
+ ns.example.com. IN A 1.2.3.4
+ ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCQMyTjn7WWwpwAR1LlVeLpRgZGuQIUCcJDEkwAuzytTDRlYK7nIMwH1CM= ;{id = 2854}
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/ttl_max_negative.rpl b/contrib/unbound/testdata/ttl_max_negative.rpl
new file mode 100644
index 000000000000..243b66fe39b6
--- /dev/null
+++ b/contrib/unbound/testdata/ttl_max_negative.rpl
@@ -0,0 +1,206 @@
+; config options
+server:
+ access-control: 127.0.0.1 allow_snoop
+ cache-max-ttl: 15 # This will be overriden
+ cache-max-negative-ttl: 10
+ qname-minimisation: "no"
+ minimal-responses: no
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test TTL max option for messages in the cache
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 100
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN A
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+a.gtld-servers.net. IN A
+SECTION ANSWER
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+K.ROOT-SERVERS.NET. IN A
+SECTION ANSWER
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+a.gtld-servers.net. IN AAAA
+SECTION AUTHORITY
+. 86400 IN SOA . . 20070304 28800 7200 604800 86400
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+K.ROOT-SERVERS.NET. IN AAAA
+SECTION AUTHORITY
+. 86400 IN SOA . . 20070304 28800 7200 604800 86400
+ENTRY_END
+
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 100
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN A
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+ns.example.com. IN A
+SECTION ANSWER
+ns.example.com. IN A 1.2.3.4
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NXDOMAIN
+SECTION QUESTION
+www.example.com. IN A
+SECTION AUTHORITY
+example.com. 3600 IN SOA . . 15 28800 7200 604800 3600
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION AUTHORITY
+example.com. 3600 IN SOA . . 15 28800 7200 604800 3600
+ENTRY_END
+
+RANGE_END
+
+; start by passing time ; so we are not at 0
+STEP 1 TIME_PASSES ELAPSE 10
+
+; query for the record
+STEP 8 QUERY
+ENTRY_BEGIN
+REPLY RD CD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA CD NXDOMAIN
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+SECTION AUTHORITY
+example.com. 10 IN SOA . . 15 28800 7200 604800 3600
+ENTRY_END
+
+; wait
+STEP 20 TIME_PASSES ELAPSE 5
+
+; do a lookup to check TTLs.
+STEP 25 QUERY
+ENTRY_BEGIN
+REPLY
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 26 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RA NXDOMAIN
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+SECTION AUTHORITY
+example.com. 5 IN SOA . . 15 28800 7200 604800 3600
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/ttl_min_negative.rpl b/contrib/unbound/testdata/ttl_min_negative.rpl
new file mode 100644
index 000000000000..ece3366c54ee
--- /dev/null
+++ b/contrib/unbound/testdata/ttl_min_negative.rpl
@@ -0,0 +1,204 @@
+; config options
+server:
+ access-control: 127.0.0.1 allow_snoop
+ cache-min-ttl: 5 # This will be overriden
+ cache-min-negative-ttl: 10
+ qname-minimisation: "no"
+ minimal-responses: no
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test TTL min option for messages in the cache
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 100
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN A
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+a.gtld-servers.net. IN A
+SECTION ANSWER
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+K.ROOT-SERVERS.NET. IN A
+SECTION ANSWER
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+a.gtld-servers.net. IN AAAA
+SECTION AUTHORITY
+. 86400 IN SOA . . 20070304 28800 7200 604800 86400
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+K.ROOT-SERVERS.NET. IN AAAA
+SECTION AUTHORITY
+. 86400 IN SOA . . 20070304 28800 7200 604800 86400
+ENTRY_END
+
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 100
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN A
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+ns.example.com. IN A
+SECTION ANSWER
+ns.example.com. IN A 1.2.3.4
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NXDOMAIN
+SECTION QUESTION
+www.example.com. IN A
+SECTION AUTHORITY
+example.com. 1 IN SOA . . 15 28800 7200 604800 1
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION AUTHORITY
+example.com. 1 IN SOA . . 15 28800 7200 604800 1
+ENTRY_END
+
+RANGE_END
+
+; start by passing time ; so we are not at 0
+STEP 1 TIME_PASSES ELAPSE 10
+
+; query for the record
+STEP 8 QUERY
+ENTRY_BEGIN
+REPLY RD CD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RD RA CD NXDOMAIN
+SECTION QUESTION
+www.example.com. IN A
+SECTION AUTHORITY
+example.com. 10 IN SOA . . 15 28800 7200 604800 1
+ENTRY_END
+
+; wait for 7 seconds
+STEP 20 TIME_PASSES ELAPSE 7
+
+; do a lookup to check TTLs.
+STEP 25 QUERY
+ENTRY_BEGIN
+REPLY
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+STEP 26 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all ttl
+REPLY QR RA NXDOMAIN
+SECTION QUESTION
+www.example.com. IN A
+SECTION AUTHORITY
+example.com. 3 IN SOA . . 15 28800 7200 604800 1
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/val_cnameqtype_qmin.rpl b/contrib/unbound/testdata/val_cnameqtype_qmin.rpl
new file mode 100644
index 000000000000..7943b09488ec
--- /dev/null
+++ b/contrib/unbound/testdata/val_cnameqtype_qmin.rpl
@@ -0,0 +1,784 @@
+; config options
+; The island of trust is at example.com
+server:
+ trust-anchor: "example.com. 3600 IN DS 2854 3 1 46e4ffc6e9a4793b488954bd3f0cc6af0dfb201b"
+ trust-anchor: "example.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}"
+ trust-anchor: "foo.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}"
+ val-override-date: "20070916134226"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: "yes"
+ fake-sha1: yes
+ trust-anchor-signaling: no
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test validator with a query for type cname
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 1000
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+net. IN A
+SECTION AUTHORITY
+net. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 1000
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+net. IN NS
+SECTION ANSWER
+net. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN A
+SECTION AUTHORITY
+example.net. IN NS ns.example.net.
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.net. IN NS
+SECTION AUTHORITY
+foo.net. IN NS ns.example.com.
+ENTRY_END
+
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ENTRY_END
+
+; response to DNSKEY priming query
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN DNSKEY
+SECTION ANSWER
+example.com. 3600 IN DNSKEY 256 3 3 ALXLUsWqUrY3JYER3T4TBJII s70j+sDS/UT2QRp61SE7S3E EXopNXoFE73JLRmvpi/UrOO/Vz4Se 6wXv/CYCKjGw06U4WRgR YXcpEhJROyNapmdIKSx hOzfLVE1gqA0PweZR8d tY3aNQSRn3sPpwJr6Mi /PqQKAMMrZ9ckJpf1+b QMOOvxgzz2U1GS18b3y ZKcgTMEaJzd/GZYzi/B N2DzQ0MsrSwYXfsNLFO Bbs8PJMW4LYIxeeOe6rUgkWOF 7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2854 (zsk), size = 1688b}
+example.com. 3600 IN RRSIG DNSKEY DSA 2 3600 20070926134150 20070829134150 2854 example.com. MCwCFBQRtlR4BEv9ohi+PGFjp+AHsJuHAhRCvz0shggvnvI88DFnBDCczHUcVA== ;{id = 2854}
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ENTRY_END
+
+; response to query of interest
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.com. IN CNAME
+SECTION ANSWER
+www.example.com. IN CNAME www.example.net.
+www.example.com. 3600 IN RRSIG CNAME DSA 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFGcJxnNxpWCBzXejiSdl4p1BKRMnAhUApoJrugVBRwFgAoYAhhqlZFac7fE= ;{id = 2854}
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+www.example.com. IN CNAME www.example.net.
+www.example.com. 3600 IN RRSIG CNAME DSA 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFGcJxnNxpWCBzXejiSdl4p1BKRMnAhUApoJrugVBRwFgAoYAhhqlZFac7fE= ;{id = 2854}
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 3600 IN CNAME www.example.net.
+www2.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AGgh6pDCL7VF0uJablClW7cgvsPuNzpHZ+M7nZIwi61+0RPhFZLHcN4=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+test-dname.example.com. IN A
+SECTION AUTHORITY
+test-dname.example.com. IN NSEC ur.example.com. DNAME RRSIG NSEC
+test-dname.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. AAez/ZKaKWeaFxTR139M1czTPdpAXG7QDAbNLEF3QT0/nBRKGyI3BAM=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN CNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN A
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www3.example.com. IN A
+SECTION ANSWER
+www3.example.com. 3600 IN CNAME www3.foo.net.
+www3.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AFCgCmBh9ZhKJj6AqJAaai8Xwrp9nVYP/yyg4RglHEHb7LlIKED93Ic=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www3.foo.net. IN A
+SECTION ANSWER
+www3.foo.net. IN A 12.13.14.15
+www3.foo.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 foo.net. y50vzw6pCWNmM4y1LNbc37htWGvjxKzdV/JS5ONdFWUQelbDx5YrD91m9U88ItIpwQiGKJWQBwNgHzVKW7iF2A==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN CNAME
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN A
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.foo.net. IN CNAME
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN A
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www5.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+h-dname.example.com. IN A
+SECTION AUTHORITY
+h-dname.example.com. IN NSEC ip.example.com. DNAME RRSIG NSEC
+h-dname.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. AFFsp8m0uRY9RaXCtk47kKuQEDj1YsM7izqOz9N+8sMT5wBXhWg3KqI=
+example.com. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+example.com. 3600 IN RRSIG SOA 3 2 3600 20070926135752 20070829135752 2854 example.com. ABRSIKVO+4LWyeGBM5lPJlZBJaj6iDihKwPSzYx6fgGbiHdtLkXOMUc=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN CNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN A
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+tea.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.tea.foo.net. IN CNAME
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.tea.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.net. IN DNSKEY
+SECTION ANSWER
+foo.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
+foo.net. 3600 IN RRSIG DNSKEY 5 2 3600 20070926134150 20070829134150 30899 foo.net. FLWrxrEnMpKoUDf+mbHGKSQ9OYloJs1eVbxkQaTSfJSLnLzOS0MLflMfbH1nC+Fk8idN7Aw07P5S9Ez1/fAb4w==
+ENTRY_END
+
+RANGE_END
+
+; ns.example.net.
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN NS
+SECTION ANSWER
+example.net. IN NS ns.example.net.
+example.net. 3600 IN RRSIG NS RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. E8JX0l4B+cSR5bkHQwOJy1pBmlLMTYCJ8EwfNMU/eCv0YhKwo26rHhn52FGisgv+Nwp7/NbhHqQ+kJgoZC94XA== ;{id = 30899}
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
+ENTRY_END
+
+; response to DNSKEY priming query
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN DNSKEY
+SECTION ANSWER
+example.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
+example.net. 3600 IN RRSIG DNSKEY RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. hiFzlQ8VoYgCuvIsfVuxC3mfJDqsTh0yc6abs5xMx5uEcIjb0dndFQx7INOM+imlzveEN73Hqp4OLFpFhsWLlw== ;{id = 30899}
+SECTION AUTHORITY
+example.net. IN NS ns.example.net.
+example.net. 3600 IN RRSIG NS RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. E8JX0l4B+cSR5bkHQwOJy1pBmlLMTYCJ8EwfNMU/eCv0YhKwo26rHhn52FGisgv+Nwp7/NbhHqQ+kJgoZC94XA== ;{id = 30899}
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+foo.example.net. IN A
+SECTION ANSWER
+foo.example.net. IN A 11.12.13.16
+foo.example.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 example.net. nDw60j3CmEUuFDXnTTNbdUHKJFTIEGHbSKE096CdgbSK73wV2xfG5YdMPA59cYUG0oODPyAKuhDltzk7LoTaWg==
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+foo.example.net. IN CNAME
+SECTION AUTHORITY
+foo.example.net. IN NSEC go.example.net. A AAAA RRSIG NSEC
+foo.example.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 example.net. JgRBvtJwQqzidljfbnINd283z57/7UFcLGfSLKdgEXky0hf8S54cnFKsruMv8d3OMScmGOMFnYQ1flJxfK0+Zw==
+example.net. IN SOA ns.example.net. admin.example.net. 2024030884 3600 3600 604800 3600
+example.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 example.net. ZlStOlahsMp7yzVD2GRAOKXoYlsV372Q2hMpFJYNdhpHcqlqodgVFxA80ftJ66OjeVpb+1DJSIZitSaQrfF8rA==
+ENTRY_END
+
+; response to query of interest
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.net. IN A
+SECTION ANSWER
+www.example.net. IN A 11.12.13.14
+www.example.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 example.net. CPxF5hK9Kg5eT7W6LgZwr0ePYEm9HMcSY4vvqCS6gDWB4X9jvXLCfBkCLhsNybPBpGWlsLi5wM6MTdJXuPpsRA== ;{id = 30899}
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+RANGE_END
+
+; Test qtype CNAME, answer from upstream.
+STEP 1 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www.example.com. IN CNAME
+ENTRY_END
+
+; recursion happens here.
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www.example.com. IN CNAME
+SECTION ANSWER
+www.example.com. IN CNAME www.example.net.
+www.example.com. 3600 IN RRSIG CNAME DSA 3 3600 20070926134150 20070829134150 2854 example.com. MC0CFGcJxnNxpWCBzXejiSdl4p1BKRMnAhUApoJrugVBRwFgAoYAhhqlZFac7fE= ;{id = 2854}
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+
+; Test qtype CNAME, answer from cache after A query.
+; perform the A query that gets the CNAME in cache.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www2.example.com. IN A
+ENTRY_END
+
+STEP 30 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 3600 IN CNAME www.example.net.
+www2.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AGgh6pDCL7VF0uJablClW7cgvsPuNzpHZ+M7nZIwi61+0RPhFZLHcN4=
+www.example.net. IN A 11.12.13.14
+www.example.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 example.net. CPxF5hK9Kg5eT7W6LgZwr0ePYEm9HMcSY4vvqCS6gDWB4X9jvXLCfBkCLhsNybPBpGWlsLi5wM6MTdJXuPpsRA== ;{id = 30899}
+ENTRY_END
+
+; now query for type CNAME, that is in cache.
+STEP 40 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www2.example.com. IN CNAME
+ENTRY_END
+
+STEP 50 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www2.example.com. IN CNAME
+SECTION ANSWER
+www2.example.com. 3600 IN CNAME www.example.net.
+www2.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AGgh6pDCL7VF0uJablClW7cgvsPuNzpHZ+M7nZIwi61+0RPhFZLHcN4=
+ENTRY_END
+
+; Test qtype CNAME, answer DNAME from upstream.
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+foo.test-dname.example.com. IN CNAME
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN CNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+ENTRY_END
+
+; Test qtype CNAME, answer DNAME from cached DNAME record.
+STEP 80 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+foo2.test-dname.example.com. IN CNAME
+ENTRY_END
+
+STEP 90 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+foo2.test-dname.example.com. IN CNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo2.test-dname.example.com. 3600 IN CNAME foo2.example.net.
+ENTRY_END
+
+; Test first a simple A query, that connects example.com to foo.net.
+STEP 100 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www3.example.com. IN A
+ENTRY_END
+
+STEP 110 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www3.example.com. IN A
+SECTION ANSWER
+www3.example.com. 3600 IN CNAME www3.foo.net.
+www3.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AFCgCmBh9ZhKJj6AqJAaai8Xwrp9nVYP/yyg4RglHEHb7LlIKED93Ic=
+www3.foo.net. IN A 12.13.14.15
+www3.foo.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 foo.net. y50vzw6pCWNmM4y1LNbc37htWGvjxKzdV/JS5ONdFWUQelbDx5YrD91m9U88ItIpwQiGKJWQBwNgHzVKW7iF2A==
+ENTRY_END
+
+; Test qtype CNAME, but the upstream responds that there is NXDOMAIN,
+; it can do this because it has the zone loaded at the name after the CNAME,
+; in the zone foo.net. and it chases the CNAME.
+STEP 120 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www4.example.com. IN CNAME
+ENTRY_END
+
+STEP 130 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN CNAME
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+; Test, first pull a CNAME to NXDOMAIN in cache with an A query and then use
+; it for qtype CNAME.
+STEP 140 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www5.example.com. IN A
+ENTRY_END
+
+STEP 150 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN A
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+STEP 160 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www5.example.com. IN CNAME
+ENTRY_END
+
+STEP 170 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www5.example.com. IN CNAME
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+ENTRY_END
+
+; Test, qtype CNAME, but it is a DNAME and the upstream server can respond
+; with NXDOMAIN, it can do this because the foo.net zone is also loaded by
+; the server and it looks in the other zone.
+STEP 180 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+cup.h-dname.example.com. IN CNAME
+ENTRY_END
+
+STEP 190 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN CNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+; Test, first pull a DNAME in cache and then use it for qtype CNAME to an
+; NXDOMAIN.
+STEP 200 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+cup2.h-dname.example.com. IN CNAME
+ENTRY_END
+
+STEP 210 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+cup2.h-dname.example.com. IN CNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup2.h-dname.example.com. 3600 IN CNAME cup2.tea.foo.net.
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/val_dnameqtype.rpl b/contrib/unbound/testdata/val_dnameqtype.rpl
new file mode 100644
index 000000000000..74cc45ec2008
--- /dev/null
+++ b/contrib/unbound/testdata/val_dnameqtype.rpl
@@ -0,0 +1,689 @@
+; config options
+; The island of trust is at example.com
+server:
+ trust-anchor: "example.com. 3600 IN DS 2854 3 1 46e4ffc6e9a4793b488954bd3f0cc6af0dfb201b"
+ trust-anchor: "example.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}"
+ trust-anchor: "foo.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}"
+ val-override-date: "20070916134226"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: "no"
+ fake-sha1: yes
+ trust-anchor-signaling: no
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test validator with a query for type dname
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 1000
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+net. IN A
+SECTION AUTHORITY
+net. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 1000
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+net. IN NS
+SECTION ANSWER
+net. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN A
+SECTION AUTHORITY
+example.net. IN NS ns.example.net.
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.net. IN NS
+SECTION AUTHORITY
+foo.net. IN NS ns.example.com.
+ENTRY_END
+
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ENTRY_END
+
+; response to DNSKEY priming query
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN DNSKEY
+SECTION ANSWER
+example.com. 3600 IN DNSKEY 256 3 3 ALXLUsWqUrY3JYER3T4TBJII s70j+sDS/UT2QRp61SE7S3E EXopNXoFE73JLRmvpi/UrOO/Vz4Se 6wXv/CYCKjGw06U4WRgR YXcpEhJROyNapmdIKSx hOzfLVE1gqA0PweZR8d tY3aNQSRn3sPpwJr6Mi /PqQKAMMrZ9ckJpf1+b QMOOvxgzz2U1GS18b3y ZKcgTMEaJzd/GZYzi/B N2DzQ0MsrSwYXfsNLFO Bbs8PJMW4LYIxeeOe6rUgkWOF 7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2854 (zsk), size = 1688b}
+example.com. 3600 IN RRSIG DNSKEY DSA 2 3600 20070926134150 20070829134150 2854 example.com. MCwCFBQRtlR4BEv9ohi+PGFjp+AHsJuHAhRCvz0shggvnvI88DFnBDCczHUcVA== ;{id = 2854}
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ENTRY_END
+
+; response to query of interest
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.com. IN DNAME
+SECTION ANSWER
+www.example.com. IN DNAME www.example.net.
+www.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926134150 20070829134150 2854 example.com. AKXpbBNiurXv6oFOFQJv5rASdxpoWp2WV1j4ZdJAJ1f48cOkBM2oiEE=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www2.example.com. IN DNAME
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+fore.www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+fore.www2.example.com. IN CNAME fore.www.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN DNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www3.example.com. IN A
+SECTION ANSWER
+www3.example.com. 3600 IN CNAME www3.foo.net.
+www3.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AFCgCmBh9ZhKJj6AqJAaai8Xwrp9nVYP/yyg4RglHEHb7LlIKED93Ic=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www3.foo.net. IN A
+SECTION ANSWER
+www3.foo.net. IN A 12.13.14.15
+www3.foo.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 foo.net. y50vzw6pCWNmM4y1LNbc37htWGvjxKzdV/JS5ONdFWUQelbDx5YrD91m9U88ItIpwQiGKJWQBwNgHzVKW7iF2A==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN DNAME
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.foo.net. IN DNAME
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN A
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www5.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN DNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.tea.foo.net. IN DNAME
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.net. IN DNSKEY
+SECTION ANSWER
+foo.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
+foo.net. 3600 IN RRSIG DNSKEY 5 2 3600 20070926134150 20070829134150 30899 foo.net. FLWrxrEnMpKoUDf+mbHGKSQ9OYloJs1eVbxkQaTSfJSLnLzOS0MLflMfbH1nC+Fk8idN7Aw07P5S9Ez1/fAb4w==
+ENTRY_END
+
+RANGE_END
+
+; ns.example.net.
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN NS
+SECTION ANSWER
+example.net. IN NS ns.example.net.
+example.net. 3600 IN RRSIG NS RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. E8JX0l4B+cSR5bkHQwOJy1pBmlLMTYCJ8EwfNMU/eCv0YhKwo26rHhn52FGisgv+Nwp7/NbhHqQ+kJgoZC94XA== ;{id = 30899}
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
+ENTRY_END
+
+; response to DNSKEY priming query
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN DNSKEY
+SECTION ANSWER
+example.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
+example.net. 3600 IN RRSIG DNSKEY RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. hiFzlQ8VoYgCuvIsfVuxC3mfJDqsTh0yc6abs5xMx5uEcIjb0dndFQx7INOM+imlzveEN73Hqp4OLFpFhsWLlw== ;{id = 30899}
+SECTION AUTHORITY
+example.net. IN NS ns.example.net.
+example.net. 3600 IN RRSIG NS RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. E8JX0l4B+cSR5bkHQwOJy1pBmlLMTYCJ8EwfNMU/eCv0YhKwo26rHhn52FGisgv+Nwp7/NbhHqQ+kJgoZC94XA== ;{id = 30899}
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.example.net. IN DNAME
+SECTION ANSWER
+foo.example.net. IN DNAME lower.example.net.
+foo.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. OZLH158CkKbQZOkBCof7oLzy8sbtDI3/BHEOqBeYZzcfHHfHS9L4qJBII5uO+x8yB/DTkFEhdL5WZV2IjRlkNQ==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo2.example.net. IN DNAME
+SECTION ANSWER
+foo2.example.net. IN DNAME lower.example.net.
+foo2.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. xth0C1DoNubf4PpjkS0tgo6O7yzaLPuTKB2yTNFM1iZRm5pd0o3eo/upvfG2SwqfzimgvM1eDyK06QX/R7Enfw==
+ENTRY_END
+
+; response to query of interest
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.net. IN A
+SECTION ANSWER
+www.example.net. IN A 11.12.13.14
+www.example.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 example.net. CPxF5hK9Kg5eT7W6LgZwr0ePYEm9HMcSY4vvqCS6gDWB4X9jvXLCfBkCLhsNybPBpGWlsLi5wM6MTdJXuPpsRA== ;{id = 30899}
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+fore.www.example.net. IN A
+SECTION ANSWER
+fore.www.example.net. IN A 11.12.13.15
+fore.www.example.net. 3600 IN RRSIG A 5 4 3600 20070926134150 20070829134150 30899 example.net. D1axzzs2olCCMQUQchy4ZRs8oefSdLpiIlhPsF1Y5GTTLHKKs6H14tm3FrRTLUIb2FzZywHX0Hl+pfoB/lG2qQ==
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+RANGE_END
+
+; Test qtype DNAME, answer from upstream.
+STEP 1 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www.example.com. IN DNAME
+ENTRY_END
+
+; recursion happens here.
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www.example.com. IN DNAME
+SECTION ANSWER
+www.example.com. IN DNAME www.example.net.
+www.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926134150 20070829134150 2854 example.com. AKXpbBNiurXv6oFOFQJv5rASdxpoWp2WV1j4ZdJAJ1f48cOkBM2oiEE=
+ENTRY_END
+
+; Test qtype DNAME, answer from cache after A query.
+; perform the A query that gets the DNAME in cache.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+fore.www2.example.com. IN A
+ENTRY_END
+
+STEP 30 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+fore.www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+fore.www2.example.com. IN CNAME fore.www.example.net.
+fore.www.example.net. IN A 11.12.13.15
+fore.www.example.net. 3600 IN RRSIG A 5 4 3600 20070926134150 20070829134150 30899 example.net. D1axzzs2olCCMQUQchy4ZRs8oefSdLpiIlhPsF1Y5GTTLHKKs6H14tm3FrRTLUIb2FzZywHX0Hl+pfoB/lG2qQ==
+ENTRY_END
+
+; now query for type DNAME, that is in cache.
+STEP 40 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www2.example.com. IN DNAME
+ENTRY_END
+
+STEP 50 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www2.example.com. IN DNAME
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+ENTRY_END
+
+; Test qtype DNAME, answer DNAME from upstream.
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+foo.test-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN DNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+foo.example.net. IN DNAME lower.example.net.
+foo.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. OZLH158CkKbQZOkBCof7oLzy8sbtDI3/BHEOqBeYZzcfHHfHS9L4qJBII5uO+x8yB/DTkFEhdL5WZV2IjRlkNQ==
+ENTRY_END
+
+; Test qtype DNAME, answer DNAME from cached DNAME record.
+STEP 80 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+foo2.test-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 90 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+foo2.test-dname.example.com. IN DNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo2.test-dname.example.com. 3600 IN CNAME foo2.example.net.
+foo2.example.net. IN DNAME lower.example.net.
+foo2.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. xth0C1DoNubf4PpjkS0tgo6O7yzaLPuTKB2yTNFM1iZRm5pd0o3eo/upvfG2SwqfzimgvM1eDyK06QX/R7Enfw==
+ENTRY_END
+
+; Test first a simple A query, that connects example.com to foo.net.
+STEP 100 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www3.example.com. IN A
+ENTRY_END
+
+STEP 110 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www3.example.com. IN A
+SECTION ANSWER
+www3.example.com. 3600 IN CNAME www3.foo.net.
+www3.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AFCgCmBh9ZhKJj6AqJAaai8Xwrp9nVYP/yyg4RglHEHb7LlIKED93Ic=
+www3.foo.net. IN A 12.13.14.15
+www3.foo.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 foo.net. y50vzw6pCWNmM4y1LNbc37htWGvjxKzdV/JS5ONdFWUQelbDx5YrD91m9U88ItIpwQiGKJWQBwNgHzVKW7iF2A==
+ENTRY_END
+
+; Test qtype DNAME, but the upstream responds that there is NXDOMAIN,
+; it can do this because it has the zone loaded at the name after the CNAME,
+; in the zone foo.net. and it chases the query there.
+STEP 120 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www4.example.com. IN DNAME
+ENTRY_END
+
+STEP 130 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN DNAME
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+; Test, first pull a CNAME to NXDOMAIN in cache with an A query and then use
+; it for qtype DNAME.
+STEP 140 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www5.example.com. IN A
+ENTRY_END
+
+STEP 150 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN A
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+STEP 160 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www5.example.com. IN DNAME
+ENTRY_END
+
+STEP 170 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN DNAME
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+; Test, qtype DNAME, but it is under a DNAME and the upstream server can
+; respond with NXDOMAIN, it can do this because the foo.net zone is also
+; loaded by the server and it looks in the other zone.
+STEP 180 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+cup.h-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 190 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN DNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+; Test, first pull a DNAME in cache and then use it for qtype DNAME to an
+; NXDOMAIN.
+STEP 200 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+cup2.h-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 210 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+cup2.h-dname.example.com. IN DNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup2.h-dname.example.com. 3600 IN CNAME cup2.tea.foo.net.
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/testdata/val_dnameqtype_qmin.rpl b/contrib/unbound/testdata/val_dnameqtype_qmin.rpl
new file mode 100644
index 000000000000..b37157d0ca69
--- /dev/null
+++ b/contrib/unbound/testdata/val_dnameqtype_qmin.rpl
@@ -0,0 +1,859 @@
+; config options
+; The island of trust is at example.com
+server:
+ trust-anchor: "example.com. 3600 IN DS 2854 3 1 46e4ffc6e9a4793b488954bd3f0cc6af0dfb201b"
+ trust-anchor: "example.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}"
+ trust-anchor: "foo.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}"
+ val-override-date: "20070916134226"
+ target-fetch-policy: "0 0 0 0 0"
+ qname-minimisation: "yes"
+ fake-sha1: yes
+ trust-anchor-signaling: no
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+CONFIG_END
+
+SCENARIO_BEGIN Test validator with a query for type dname
+
+; K.ROOT-SERVERS.NET.
+RANGE_BEGIN 0 1000
+ ADDRESS 193.0.14.129
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+. IN NS
+SECTION ANSWER
+. IN NS K.ROOT-SERVERS.NET.
+SECTION ADDITIONAL
+K.ROOT-SERVERS.NET. IN A 193.0.14.129
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION AUTHORITY
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+net. IN A
+SECTION AUTHORITY
+net. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+RANGE_END
+
+; a.gtld-servers.net.
+RANGE_BEGIN 0 1000
+ ADDRESS 192.5.6.30
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+com. IN NS
+SECTION ANSWER
+com. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+net. IN NS
+SECTION ANSWER
+net. IN NS a.gtld-servers.net.
+SECTION ADDITIONAL
+a.gtld-servers.net. IN A 192.5.6.30
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN A
+SECTION AUTHORITY
+example.net. IN NS ns.example.net.
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode subdomain
+ADJUST copy_id copy_query
+REPLY QR NOERROR
+SECTION QUESTION
+foo.net. IN NS
+SECTION AUTHORITY
+foo.net. IN NS ns.example.com.
+ENTRY_END
+
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.4
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ENTRY_END
+
+; response to DNSKEY priming query
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.com. IN DNSKEY
+SECTION ANSWER
+example.com. 3600 IN DNSKEY 256 3 3 ALXLUsWqUrY3JYER3T4TBJII s70j+sDS/UT2QRp61SE7S3E EXopNXoFE73JLRmvpi/UrOO/Vz4Se 6wXv/CYCKjGw06U4WRgR YXcpEhJROyNapmdIKSx hOzfLVE1gqA0PweZR8d tY3aNQSRn3sPpwJr6Mi /PqQKAMMrZ9ckJpf1+b QMOOvxgzz2U1GS18b3y ZKcgTMEaJzd/GZYzi/B N2DzQ0MsrSwYXfsNLFO Bbs8PJMW4LYIxeeOe6rUgkWOF 7CC9Dh/dduQ1QrsJhmZAEFfd6ByYV+ ;{id = 2854 (zsk), size = 1688b}
+example.com. 3600 IN RRSIG DNSKEY DSA 2 3600 20070926134150 20070829134150 2854 example.com. MCwCFBQRtlR4BEv9ohi+PGFjp+AHsJuHAhRCvz0shggvnvI88DFnBDCczHUcVA== ;{id = 2854}
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+ENTRY_END
+
+; response to query of interest
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.com. IN DNAME
+SECTION ANSWER
+www.example.com. IN DNAME www.example.net.
+www.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926134150 20070829134150 2854 example.com. AKXpbBNiurXv6oFOFQJv5rASdxpoWp2WV1j4ZdJAJ1f48cOkBM2oiEE=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.com. IN A
+SECTION AUTHORITY
+www.example.com. IN NSEC www2.example.com. DNAME RRSIG NSEC
+www.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. AFHQydH3FKwEv2XUy5holgQFEPC7dOQMJKamf16zu8ov2L37F9wl7ak=
+example.com. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+example.com. 3600 IN RRSIG SOA 3 2 3600 20070926135752 20070829135752 2854 example.com. ABRSIKVO+4LWyeGBM5lPJlZBJaj6iDihKwPSzYx6fgGbiHdtLkXOMUc=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www2.example.com. IN DNAME
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www2.example.com. IN A
+SECTION AUTHORITY
+www2.example.com. IN NSEC www3.example.com. DNAME RRSIG NSEC
+www2.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. AHXqx82+YKFrEUSAFGEJJ+W27gtNA/1eWniwf9g+ZT4KTsTbqYnkYpk=
+example.com. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+example.com. 3600 IN RRSIG SOA 3 2 3600 20070926135752 20070829135752 2854 example.com. ABRSIKVO+4LWyeGBM5lPJlZBJaj6iDihKwPSzYx6fgGbiHdtLkXOMUc=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+fore.www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+fore.www2.example.com. IN CNAME fore.www.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+test-dname.example.com. IN A
+SECTION AUTHORITY
+test-dname.example.com. IN NSEC ur.example.com. DNAME RRSIG NSEC
+test-dname.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. AAez/ZKaKWeaFxTR139M1czTPdpAXG7QDAbNLEF3QT0/nBRKGyI3BAM=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN DNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN A
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www3.example.com. IN A
+SECTION ANSWER
+www3.example.com. 3600 IN CNAME www3.foo.net.
+www3.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AFCgCmBh9ZhKJj6AqJAaai8Xwrp9nVYP/yyg4RglHEHb7LlIKED93Ic=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+www3.foo.net. IN A
+SECTION ANSWER
+www3.foo.net. IN A 12.13.14.15
+www3.foo.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 foo.net. y50vzw6pCWNmM4y1LNbc37htWGvjxKzdV/JS5ONdFWUQelbDx5YrD91m9U88ItIpwQiGKJWQBwNgHzVKW7iF2A==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN DNAME
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN A
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.foo.net. IN DNAME
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www4.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN A
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+www5.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+h-dname.example.com. IN A
+SECTION AUTHORITY
+h-dname.example.com. IN NSEC ip.example.com. DNAME RRSIG NSEC
+h-dname.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. AFFsp8m0uRY9RaXCtk47kKuQEDj1YsM7izqOz9N+8sMT5wBXhWg3KqI=
+example.com. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+example.com. 3600 IN RRSIG SOA 3 2 3600 20070926135752 20070829135752 2854 example.com. ABRSIKVO+4LWyeGBM5lPJlZBJaj6iDihKwPSzYx6fgGbiHdtLkXOMUc=
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN DNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN A
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+tea.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.tea.foo.net. IN DNAME
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NXDOMAIN
+SECTION QUESTION
+cup.tea.foo.net. IN A
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.net. IN DNSKEY
+SECTION ANSWER
+foo.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
+foo.net. 3600 IN RRSIG DNSKEY 5 2 3600 20070926134150 20070829134150 30899 foo.net. FLWrxrEnMpKoUDf+mbHGKSQ9OYloJs1eVbxkQaTSfJSLnLzOS0MLflMfbH1nC+Fk8idN7Aw07P5S9Ez1/fAb4w==
+ENTRY_END
+
+RANGE_END
+
+; ns.example.net.
+RANGE_BEGIN 0 1000
+ ADDRESS 1.2.3.5
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN NS
+SECTION ANSWER
+example.net. IN NS ns.example.net.
+example.net. 3600 IN RRSIG NS RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. E8JX0l4B+cSR5bkHQwOJy1pBmlLMTYCJ8EwfNMU/eCv0YhKwo26rHhn52FGisgv+Nwp7/NbhHqQ+kJgoZC94XA== ;{id = 30899}
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
+ENTRY_END
+
+; response to DNSKEY priming query
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+example.net. IN DNSKEY
+SECTION ANSWER
+example.net. 3600 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
+example.net. 3600 IN RRSIG DNSKEY RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. hiFzlQ8VoYgCuvIsfVuxC3mfJDqsTh0yc6abs5xMx5uEcIjb0dndFQx7INOM+imlzveEN73Hqp4OLFpFhsWLlw== ;{id = 30899}
+SECTION AUTHORITY
+example.net. IN NS ns.example.net.
+example.net. 3600 IN RRSIG NS RSASHA1 2 3600 20070926134150 20070829134150 30899 example.net. E8JX0l4B+cSR5bkHQwOJy1pBmlLMTYCJ8EwfNMU/eCv0YhKwo26rHhn52FGisgv+Nwp7/NbhHqQ+kJgoZC94XA== ;{id = 30899}
+SECTION ADDITIONAL
+ns.example.net. IN A 1.2.3.5
+ns.example.net. 3600 IN RRSIG A RSASHA1 3 3600 20070926134150 20070829134150 30899 example.net. x+tQMC9FhzT7Fcy1pM5NrOC7E8nLd7THPI3C6ie4EwL8PrxllqlR3q/DKB0d/m0qCOPcgN6HFOYURV1s4uAcsw== ;{id = 30899}
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.example.net. IN A
+SECTION AUTHORITY
+foo.example.net. IN NSEC foo2.example.net. DNAME RRSIG NSEC
+foo.example.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 example.net. dl9WUrcxjV2vi46WBbCqhS2aVODCkZGvd/pbd6wo232P9+RmeEcRYrY05kbvW2A8+uHhY6dh7N7ft6wElG4IZQ==
+example.net. IN SOA ns.example.net. admin.example.net. 2024030884 3600 3600 604800 3600
+example.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 example.net. ZlStOlahsMp7yzVD2GRAOKXoYlsV372Q2hMpFJYNdhpHcqlqodgVFxA80ftJ66OjeVpb+1DJSIZitSaQrfF8rA==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo.example.net. IN DNAME
+SECTION ANSWER
+foo.example.net. IN DNAME lower.example.net.
+foo.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. OZLH158CkKbQZOkBCof7oLzy8sbtDI3/BHEOqBeYZzcfHHfHS9L4qJBII5uO+x8yB/DTkFEhdL5WZV2IjRlkNQ==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo2.example.net. IN A
+SECTION AUTHORITY
+foo2.example.net. IN NSEC foo3.example.net. DNAME RRSIG NSEC
+foo2.example.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 example.net. HEYg0iOnIgQEFH+FiMqqnFnXvx5KdIjQG/hwNrUqWZlknqOmnCLVDxSXr+PmSKuICcfStDqCMjnXEKOCr3Malg==
+example.net. IN SOA ns.example.net. admin.example.net. 2024030884 3600 3600 604800 3600
+example.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 example.net. ZlStOlahsMp7yzVD2GRAOKXoYlsV372Q2hMpFJYNdhpHcqlqodgVFxA80ftJ66OjeVpb+1DJSIZitSaQrfF8rA==
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA NOERROR
+SECTION QUESTION
+foo2.example.net. IN DNAME
+SECTION ANSWER
+foo2.example.net. IN DNAME lower.example.net.
+foo2.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. xth0C1DoNubf4PpjkS0tgo6O7yzaLPuTKB2yTNFM1iZRm5pd0o3eo/upvfG2SwqfzimgvM1eDyK06QX/R7Enfw==
+ENTRY_END
+
+; response to query of interest
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+www.example.net. IN A
+SECTION ANSWER
+www.example.net. IN A 11.12.13.14
+www.example.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 example.net. CPxF5hK9Kg5eT7W6LgZwr0ePYEm9HMcSY4vvqCS6gDWB4X9jvXLCfBkCLhsNybPBpGWlsLi5wM6MTdJXuPpsRA== ;{id = 30899}
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+fore.www.example.net. IN A
+SECTION ANSWER
+fore.www.example.net. IN A 11.12.13.15
+fore.www.example.net. 3600 IN RRSIG A 5 4 3600 20070926134150 20070829134150 30899 example.net. D1axzzs2olCCMQUQchy4ZRs8oefSdLpiIlhPsF1Y5GTTLHKKs6H14tm3FrRTLUIb2FzZywHX0Hl+pfoB/lG2qQ==
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+RANGE_END
+
+; Test qtype DNAME, answer from upstream.
+STEP 1 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www.example.com. IN DNAME
+ENTRY_END
+
+; recursion happens here.
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www.example.com. IN DNAME
+SECTION ANSWER
+www.example.com. IN DNAME www.example.net.
+www.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926134150 20070829134150 2854 example.com. AKXpbBNiurXv6oFOFQJv5rASdxpoWp2WV1j4ZdJAJ1f48cOkBM2oiEE=
+ENTRY_END
+
+; Test qtype DNAME, answer from cache after A query.
+; perform the A query that gets the DNAME in cache.
+STEP 20 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+fore.www2.example.com. IN A
+ENTRY_END
+
+STEP 30 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+fore.www2.example.com. IN A
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+fore.www2.example.com. IN CNAME fore.www.example.net.
+fore.www.example.net. IN A 11.12.13.15
+fore.www.example.net. 3600 IN RRSIG A 5 4 3600 20070926134150 20070829134150 30899 example.net. D1axzzs2olCCMQUQchy4ZRs8oefSdLpiIlhPsF1Y5GTTLHKKs6H14tm3FrRTLUIb2FzZywHX0Hl+pfoB/lG2qQ==
+ENTRY_END
+
+; now query for type DNAME, that is in cache.
+STEP 40 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www2.example.com. IN DNAME
+ENTRY_END
+
+STEP 50 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www2.example.com. IN DNAME
+SECTION ANSWER
+www2.example.com. 3600 IN DNAME www.example.net.
+www2.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ABu2/f8Ec9BfUkWVid/ufoIjTuS1iZ/zQ5qeF5GiKxPDu//bP2eTgmI=
+ENTRY_END
+
+; Test qtype DNAME, answer DNAME from upstream.
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+foo.test-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+foo.test-dname.example.com. IN DNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo.test-dname.example.com. 3600 IN CNAME foo.example.net.
+foo.example.net. IN DNAME lower.example.net.
+foo.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. OZLH158CkKbQZOkBCof7oLzy8sbtDI3/BHEOqBeYZzcfHHfHS9L4qJBII5uO+x8yB/DTkFEhdL5WZV2IjRlkNQ==
+ENTRY_END
+
+; Test qtype DNAME, answer DNAME from cached DNAME record.
+STEP 80 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+foo2.test-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 90 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+foo2.test-dname.example.com. IN DNAME
+SECTION ANSWER
+test-dname.example.com. 3600 IN DNAME example.net.
+test-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. ACp31Evt1c6tKzmTh/smAuGFydZ1OO26Qkej/BW4Bw5RFBQiKaY22Z0=
+foo2.test-dname.example.com. 3600 IN CNAME foo2.example.net.
+foo2.example.net. IN DNAME lower.example.net.
+foo2.example.net. 3600 IN RRSIG DNAME 5 3 3600 20070926134150 20070829134150 30899 example.net. xth0C1DoNubf4PpjkS0tgo6O7yzaLPuTKB2yTNFM1iZRm5pd0o3eo/upvfG2SwqfzimgvM1eDyK06QX/R7Enfw==
+ENTRY_END
+
+; Test first a simple A query, that connects example.com to foo.net.
+STEP 100 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www3.example.com. IN A
+ENTRY_END
+
+STEP 110 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NOERROR
+SECTION QUESTION
+www3.example.com. IN A
+SECTION ANSWER
+www3.example.com. 3600 IN CNAME www3.foo.net.
+www3.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AFCgCmBh9ZhKJj6AqJAaai8Xwrp9nVYP/yyg4RglHEHb7LlIKED93Ic=
+www3.foo.net. IN A 12.13.14.15
+www3.foo.net. 3600 IN RRSIG A 5 3 3600 20070926134150 20070829134150 30899 foo.net. y50vzw6pCWNmM4y1LNbc37htWGvjxKzdV/JS5ONdFWUQelbDx5YrD91m9U88ItIpwQiGKJWQBwNgHzVKW7iF2A==
+ENTRY_END
+
+; Test qtype DNAME, but the upstream responds that there is NXDOMAIN,
+; it can do this because it has the zone loaded at the name after the CNAME,
+; in the zone foo.net. and it chases the query there.
+STEP 120 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www4.example.com. IN DNAME
+ENTRY_END
+
+STEP 130 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www4.example.com. IN DNAME
+SECTION ANSWER
+www4.example.com. 3600 IN CNAME www4.foo.net.
+www4.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AA/PJO3mDuDAGQHZ2nb52q3SG0vTp0RcshM09InjZlGTIwHPIYcuizw=
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+; Test, first pull a CNAME to NXDOMAIN in cache with an A query and then use
+; it for qtype DNAME.
+STEP 140 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www5.example.com. IN A
+ENTRY_END
+
+STEP 150 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN A
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+STEP 160 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+www5.example.com. IN DNAME
+ENTRY_END
+
+STEP 170 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+www5.example.com. IN DNAME
+SECTION ANSWER
+www5.example.com. 3600 IN CNAME www5.foo.net.
+www5.example.com. 3600 IN RRSIG CNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AIXA8v0JC14UIQtthXS0Kv66rE0jqPKHgq3CPdc6PDi+tLqGjFrXIdI=
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+van.foo.net. 3600 IN NSEC xix.foo.net. A AAAA RRSIG NSEC
+van.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. awGqM+lA86rKWm8Rh1RvBYC9fJdAM2YBSqVE4VvWfhsUVN+JCspNtU3yg+R3/njfXox6cDTCfqqPDXB7KSPXaw==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+; Test, qtype DNAME, but it is under a DNAME and the upstream server can
+; respond with NXDOMAIN, it can do this because the foo.net zone is also
+; loaded by the server and it looks in the other zone.
+STEP 180 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+cup.h-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 190 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+cup.h-dname.example.com. IN DNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup.h-dname.example.com. 3600 IN CNAME cup.tea.foo.net.
+SECTION AUTHORITY
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+ENTRY_END
+
+; Test, first pull a DNAME in cache and then use it for qtype DNAME to an
+; NXDOMAIN.
+STEP 200 QUERY
+ENTRY_BEGIN
+REPLY RD DO
+SECTION QUESTION
+cup2.h-dname.example.com. IN DNAME
+ENTRY_END
+
+STEP 210 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA AD DO NXDOMAIN
+SECTION QUESTION
+cup2.h-dname.example.com. IN DNAME
+SECTION ANSWER
+h-dname.example.com. 3600 IN DNAME tea.foo.net.
+h-dname.example.com. 3600 IN RRSIG DNAME 3 3 3600 20070926135752 20070829135752 2854 example.com. AKXt5koLeZD2ibFrmZyE3ZOQCWHIA/UtrlCgFLalfaTm91NVlki5aV0=
+cup2.h-dname.example.com. 3600 IN CNAME cup2.tea.foo.net.
+SECTION AUTHORITY
+foo.net. 3600 IN NSEC bank.foo.net. NS SOA RRSIG NSEC DNSKEY
+foo.net. 3600 IN RRSIG NSEC 5 2 3600 20070926134150 20070829134150 30899 foo.net. w0nZn1gL11mBfDBWrnU5Z7ZDBQNpytyok7TL0K/adxUV5crNxmnX0IZjsMPcM6KG995DtLIqG7w2Ux82ltgllg==
+sea.foo.net. 3600 IN NSEC ur.foo.net. A AAAA RRSIG NSEC
+sea.foo.net. 3600 IN RRSIG NSEC 5 3 3600 20070926134150 20070829134150 30899 foo.net. SOz+kQrhbR7M4oid0L9HfHK3re9L5T+6x1m+DFyV0ogqGcsAfAmyvAPJUQyclENMWWqyJMgSfrqzpqEdM5HRWQ==
+foo.net. IN SOA ns.example.com. admin.foo.net. 2024030800 3600 3600 604800 3600
+foo.net. 3600 IN RRSIG SOA 5 2 3600 20070926134150 20070829134150 30899 foo.net. pDamdEYFVw2l2tBl2ZMYKHXRWWbBpIsi12AGpCv9fOBzvefsFZrFb79amLKOvfknmMUix5NnXeoc6zzQSkXeZQ==
+ENTRY_END
+
+SCENARIO_END
diff --git a/contrib/unbound/util/config_file.c b/contrib/unbound/util/config_file.c
index e8de5119ba68..f16d1c2ddb84 100644
--- a/contrib/unbound/util/config_file.c
+++ b/contrib/unbound/util/config_file.c
@@ -174,6 +174,7 @@ config_create(void)
cfg->min_ttl = 0;
cfg->max_ttl = 3600 * 24;
cfg->max_negative_ttl = 3600;
+ cfg->min_negative_ttl = 0;
cfg->prefetch = 0;
cfg->prefetch_key = 0;
cfg->deny_any = 0;
@@ -308,6 +309,11 @@ config_create(void)
cfg->minimal_responses = 1;
cfg->rrset_roundrobin = 1;
cfg->unknown_server_time_limit = 376;
+ cfg->discard_timeout = 1900; /* msec */
+ cfg->wait_limit = 1000;
+ cfg->wait_limit_cookie = 10000;
+ cfg->wait_limit_netblock = NULL;
+ cfg->wait_limit_cookie_netblock = NULL;
cfg->max_udp_size = 1232; /* value taken from edns_buffer_size */
if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key")))
goto error_exit;
@@ -384,6 +390,7 @@ config_create(void)
if(!(cfg->cachedb_backend = strdup("testframe"))) goto error_exit;
if(!(cfg->cachedb_secret = strdup("default"))) goto error_exit;
cfg->cachedb_no_store = 0;
+ cfg->cachedb_check_when_serve_expired = 1;
#ifdef USE_REDIS
if(!(cfg->redis_server_host = strdup("127.0.0.1"))) goto error_exit;
cfg->redis_server_path = NULL;
@@ -615,6 +622,8 @@ int config_set_option(struct config_file* cfg, const char* opt,
{ IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=(time_t)cfg->max_ttl;}
else if(strcmp(opt, "cache-max-negative-ttl:") == 0)
{ IS_NUMBER_OR_ZERO; cfg->max_negative_ttl = atoi(val); MAX_NEG_TTL=(time_t)cfg->max_negative_ttl;}
+ else if(strcmp(opt, "cache-min-negative-ttl:") == 0)
+ { IS_NUMBER_OR_ZERO; cfg->min_negative_ttl = atoi(val); MIN_NEG_TTL=(time_t)cfg->min_negative_ttl;}
else if(strcmp(opt, "cache-min-ttl:") == 0)
{ IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=(time_t)cfg->min_ttl;}
else if(strcmp(opt, "infra-cache-min-rtt:") == 0) {
@@ -722,6 +731,9 @@ int config_set_option(struct config_file* cfg, const char* opt,
else S_YNO("minimal-responses:", minimal_responses)
else S_YNO("rrset-roundrobin:", rrset_roundrobin)
else S_NUMBER_OR_ZERO("unknown-server-time-limit:", unknown_server_time_limit)
+ else S_NUMBER_OR_ZERO("discard-timeout:", discard_timeout)
+ else S_NUMBER_OR_ZERO("wait-limit:", wait_limit)
+ else S_NUMBER_OR_ZERO("wait-limit-cookie:", wait_limit_cookie)
else S_STRLIST("local-data:", local_data)
else S_YNO("unblock-lan-zones:", unblock_lan_zones)
else S_YNO("insecure-lan-zones:", insecure_lan_zones)
@@ -827,6 +839,7 @@ int config_set_option(struct config_file* cfg, const char* opt,
#endif
#ifdef USE_CACHEDB
else S_YNO("cachedb-no-store:", cachedb_no_store)
+ else S_YNO("cachedb-check-when-serve-expired:", cachedb_check_when_serve_expired)
#endif /* USE_CACHEDB */
else if(strcmp(opt, "define-tag:") ==0) {
return config_add_tag(cfg, val);
@@ -1065,6 +1078,7 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_YNO(opt, "deny-any", deny_any)
else O_DEC(opt, "cache-max-ttl", max_ttl)
else O_DEC(opt, "cache-max-negative-ttl", max_negative_ttl)
+ else O_DEC(opt, "cache-min-negative-ttl", min_negative_ttl)
else O_DEC(opt, "cache-min-ttl", min_ttl)
else O_DEC(opt, "infra-host-ttl", host_ttl)
else O_DEC(opt, "infra-cache-slabs", infra_cache_slabs)
@@ -1201,6 +1215,11 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_YNO(opt, "minimal-responses", minimal_responses)
else O_YNO(opt, "rrset-roundrobin", rrset_roundrobin)
else O_DEC(opt, "unknown-server-time-limit", unknown_server_time_limit)
+ else O_DEC(opt, "discard-timeout", discard_timeout)
+ else O_DEC(opt, "wait-limit", wait_limit)
+ else O_DEC(opt, "wait-limit-cookie", wait_limit_cookie)
+ else O_LS2(opt, "wait-limit-netblock", wait_limit_netblock)
+ else O_LS2(opt, "wait-limit-cookie-netblock", wait_limit_cookie_netblock)
#ifdef CLIENT_SUBNET
else O_LST(opt, "send-client-subnet", client_subnet)
else O_LST(opt, "client-subnet-zone", client_subnet_zone)
@@ -1318,6 +1337,7 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_STR(opt, "backend", cachedb_backend)
else O_STR(opt, "secret-seed", cachedb_secret)
else O_YNO(opt, "cachedb-no-store", cachedb_no_store)
+ else O_YNO(opt, "cachedb-check-when-serve-expired", cachedb_check_when_serve_expired)
#ifdef USE_REDIS
else O_STR(opt, "redis-server-host", redis_server_host)
else O_DEC(opt, "redis-server-port", redis_server_port)
@@ -1671,6 +1691,8 @@ config_delete(struct config_file* cfg)
config_deltrplstrlist(cfg->interface_tag_actions);
config_deltrplstrlist(cfg->interface_tag_datas);
config_delstrlist(cfg->control_ifs.first);
+ config_deldblstrlist(cfg->wait_limit_netblock);
+ config_deldblstrlist(cfg->wait_limit_cookie_netblock);
free(cfg->server_key_file);
free(cfg->server_cert_file);
free(cfg->control_key_file);
@@ -1761,6 +1783,10 @@ cfg_mark_ports(const char* str, int allow, int* avail, int num)
#endif
if(!mid) {
int port = atoi(str);
+ if(port < 0) {
+ log_err("port number is negative: %d", port);
+ return 0;
+ }
if(port == 0 && strcmp(str, "0") != 0) {
log_err("cannot parse port number '%s'", str);
return 0;
@@ -1770,6 +1796,10 @@ cfg_mark_ports(const char* str, int allow, int* avail, int num)
} else {
int i, low, high = atoi(mid+1);
char buf[16];
+ if(high < 0) {
+ log_err("port number is negative: %d", high);
+ return 0;
+ }
if(high == 0 && strcmp(mid+1, "0") != 0) {
log_err("cannot parse port number '%s'", mid+1);
return 0;
@@ -1782,10 +1812,18 @@ cfg_mark_ports(const char* str, int allow, int* avail, int num)
memcpy(buf, str, (size_t)(mid-str));
buf[mid-str] = 0;
low = atoi(buf);
+ if(low < 0) {
+ log_err("port number is negative: %d", low);
+ return 0;
+ }
if(low == 0 && strcmp(buf, "0") != 0) {
log_err("cannot parse port number '%s'", buf);
return 0;
}
+ if(high > num) {
+ /* Stop very high values from taking a long time. */
+ high = num;
+ }
for(i=low; i<=high; i++) {
if(i < num)
avail[i] = (allow?i:0);
@@ -2310,6 +2348,7 @@ config_apply(struct config_file* config)
SERVE_EXPIRED_REPLY_TTL = (time_t)config->serve_expired_reply_ttl;
SERVE_ORIGINAL_TTL = config->serve_original_ttl;
MAX_NEG_TTL = (time_t)config->max_negative_ttl;
+ MIN_NEG_TTL = (time_t)config->min_negative_ttl;
RTT_MIN_TIMEOUT = config->infra_cache_min_rtt;
RTT_MAX_TIMEOUT = config->infra_cache_max_rtt;
EDNS_ADVERTISED_SIZE = (uint16_t)config->edns_buffer_size;
diff --git a/contrib/unbound/util/config_file.h b/contrib/unbound/util/config_file.h
index 491109833e4b..d3a2e268c49f 100644
--- a/contrib/unbound/util/config_file.h
+++ b/contrib/unbound/util/config_file.h
@@ -315,6 +315,8 @@ struct config_file {
int min_ttl;
/** the number of seconds maximal negative TTL for SOA in auth */
int max_negative_ttl;
+ /** the number of seconds minimal negative TTL for SOA in auth */
+ int min_negative_ttl;
/** if prefetching of messages should be performed. */
int prefetch;
/** if prefetching of DNSKEYs should be performed. */
@@ -535,6 +537,21 @@ struct config_file {
/* wait time for unknown server in msec */
int unknown_server_time_limit;
+ /** Wait time to drop recursion replies */
+ int discard_timeout;
+
+ /** Wait limit for number of replies per IP address */
+ int wait_limit;
+
+ /** Wait limit for number of replies per IP address with cookie */
+ int wait_limit_cookie;
+
+ /** wait limit per netblock */
+ struct config_str2list* wait_limit_netblock;
+
+ /** wait limit with cookie per netblock */
+ struct config_str2list* wait_limit_cookie_netblock;
+
/* maximum UDP response size */
size_t max_udp_size;
@@ -705,6 +722,8 @@ struct config_file {
char* cachedb_secret;
/** cachedb that does not store, but only reads from database, if on */
int cachedb_no_store;
+ /** cachedb check before serving serve-expired response */
+ int cachedb_check_when_serve_expired;
#ifdef USE_REDIS
/** redis server's IP address or host name */
char* redis_server_host;
diff --git a/contrib/unbound/util/configlexer.c b/contrib/unbound/util/configlexer.c
index 4fe0d8b4d61e..578a5793be35 100644
--- a/contrib/unbound/util/configlexer.c
+++ b/contrib/unbound/util/configlexer.c
@@ -354,8 +354,8 @@ static void yynoreturn yy_fatal_error ( const char* msg );
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 385
-#define YY_END_OF_BUFFER 386
+#define YY_NUM_RULES 392
+#define YY_END_OF_BUFFER 393
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -363,428 +363,438 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[3816] =
+static const flex_int16_t yy_accept[3905] =
{ 0,
- 1, 1, 359, 359, 363, 363, 367, 367, 371, 371,
- 1, 1, 375, 375, 379, 379, 386, 383, 1, 357,
- 357, 384, 2, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 384, 359, 360, 360, 361,
- 384, 363, 364, 364, 365, 384, 370, 367, 368, 368,
- 369, 384, 371, 372, 372, 373, 384, 382, 358, 2,
- 362, 382, 384, 378, 375, 376, 376, 377, 384, 379,
- 380, 380, 381, 384, 383, 0, 1, 2, 2, 2,
- 2, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 359, 0, 363, 0, 370, 0, 367, 371, 0, 382,
- 0, 2, 2, 382, 378, 0, 375, 379, 0, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 382, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 355, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 136, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 146, 383, 383, 383, 383, 383,
-
- 383, 383, 382, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 118,
- 383, 383, 354, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 8, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 137, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 151, 383,
- 383, 382, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 345, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 382, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 71, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 267, 383, 14, 15, 383, 383,
-
- 20, 19, 383, 383, 246, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 144, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 244, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 3, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 382, 383, 383, 383, 383, 383,
- 383, 383, 383, 335, 383, 383, 383, 334, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 366, 383, 383, 383, 383, 383, 383, 383, 383,
- 70, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 74, 383,
- 304, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 346, 347, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 75, 383, 383, 145, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 140, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 233, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 22, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 172, 383, 383, 383, 383, 383, 382, 366, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 116, 383, 383, 383, 383, 383, 383,
- 383, 383, 312, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 16, 383, 383, 383, 383, 383, 383,
- 383, 383, 200, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 171, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 115, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 37,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 38, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 72,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 143, 383, 383, 383, 382, 383, 383, 383, 383, 383,
- 383, 135, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 73,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 271, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 201, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 60, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 290, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 65, 383, 66, 383, 383, 383, 383, 383,
- 383, 119, 383, 120, 383, 383, 383, 383, 383, 117,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 7, 383, 383, 383, 383, 382, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 256, 383, 383, 383, 383, 383, 175, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 272, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 51, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 61, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 224, 383, 223, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 17,
- 18, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 76, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 232, 383, 383, 383, 383, 383, 383, 383, 122, 383,
- 121, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 214, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 152, 383, 383,
- 383, 382, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 110, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 97, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 245, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 102, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 69, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 217, 218, 383, 383, 383, 306, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 6, 383, 383, 383, 383, 383, 383,
- 383, 325, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 310, 383, 383, 383, 383, 383, 383, 383,
- 336, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 48, 383, 383, 383,
-
- 383, 383, 50, 383, 383, 383, 98, 383, 383, 383,
- 383, 383, 58, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 382, 383, 210, 383, 383, 383,
- 147, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 237, 383, 383, 211, 383, 383, 383,
- 383, 252, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 59, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 149, 128, 383, 129, 383, 383,
- 383, 383, 127, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 168, 383, 383, 56, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 288, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 212, 383, 383,
- 383, 383, 383, 222, 215, 383, 221, 383, 383, 383,
- 383, 383, 383, 383, 383, 251, 383, 383, 383, 383,
- 383, 383, 255, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 114, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 141, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 67, 383, 383, 383, 383,
- 31, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 21, 383, 383, 383, 383, 383, 383,
- 383, 32, 41, 383, 180, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 208,
- 383, 383, 382, 383, 383, 383, 383, 350, 383, 383,
- 84, 86, 383, 383, 383, 383, 383, 383, 383, 383,
- 351, 383, 383, 383, 383, 383, 383, 383, 314, 383,
- 383, 383, 383, 268, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 383, 130, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 167, 383, 52, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 262, 383, 383, 383, 383, 383, 383,
- 383, 383, 329, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 174, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 323, 383,
- 383, 383, 383, 243, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 342, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 193, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 123, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 187, 383, 202, 383, 383, 383,
- 383, 383, 383, 383, 382, 383, 155, 383, 383, 383,
- 383, 383, 383, 109, 383, 383, 383, 383, 235, 383,
- 383, 383, 383, 383, 383, 383, 253, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 280, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 148, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 191, 383, 383, 383, 383, 383,
- 383, 383, 87, 383, 88, 383, 383, 383, 383, 383,
- 265, 383, 383, 383, 383, 383, 68, 332, 383, 383,
- 383, 383, 383, 96, 203, 383, 225, 383, 257, 383,
- 383, 216, 307, 383, 383, 383, 383, 302, 383, 383,
- 383, 80, 383, 205, 383, 383, 383, 383, 383, 383,
- 9, 383, 383, 383, 383, 383, 113, 383, 383, 383,
-
- 383, 383, 383, 294, 383, 383, 383, 383, 383, 383,
- 234, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 382, 383, 383,
- 383, 383, 190, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 192, 176, 383, 313, 383, 383,
- 383, 383, 383, 279, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 247, 383, 383, 383, 383,
- 383, 383, 305, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 173, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 333, 383, 204, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 79, 81, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 112, 383, 383,
- 383, 383, 383, 383, 292, 383, 383, 383, 383, 383,
- 383, 383, 309, 383, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 239, 383, 39, 33,
- 35, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 40, 383, 34, 36, 383, 42,
- 383, 383, 383, 383, 383, 383, 383, 108, 383, 186,
- 383, 383, 383, 383, 383, 383, 383, 382, 383, 383,
- 383, 383, 383, 383, 337, 383, 383, 383, 383, 383,
- 241, 238, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 78, 383, 383, 383, 150, 383, 131, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 169,
-
- 53, 383, 383, 383, 374, 13, 383, 383, 383, 383,
- 383, 383, 383, 156, 383, 383, 383, 383, 383, 383,
- 383, 383, 327, 383, 330, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 12, 383,
- 383, 23, 383, 383, 383, 383, 383, 383, 383, 298,
- 383, 383, 344, 383, 383, 383, 383, 311, 383, 383,
- 383, 383, 82, 383, 249, 383, 383, 383, 383, 383,
- 240, 383, 383, 383, 383, 77, 383, 383, 383, 383,
- 383, 383, 24, 383, 383, 49, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 185, 184,
-
- 383, 383, 374, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 242, 236, 383, 254, 383, 383, 315, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 198, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 89, 383, 383, 383,
- 383, 383, 383, 383, 383, 293, 383, 383, 383, 383,
- 220, 383, 383, 383, 383, 383, 383, 248, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 300, 383,
- 383, 383, 338, 383, 340, 339, 182, 383, 383, 383,
-
- 83, 383, 383, 383, 383, 194, 383, 383, 383, 383,
- 383, 124, 126, 125, 383, 383, 383, 26, 383, 383,
- 177, 383, 179, 383, 226, 383, 383, 383, 383, 183,
- 383, 383, 383, 383, 258, 383, 383, 383, 383, 383,
- 383, 383, 158, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 270, 383, 383, 383, 383,
- 383, 383, 383, 352, 383, 28, 383, 308, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 94, 227, 383, 383,
- 264, 383, 383, 383, 291, 383, 331, 383, 219, 383,
-
- 383, 303, 383, 383, 383, 301, 62, 383, 383, 383,
- 383, 383, 383, 383, 4, 383, 383, 383, 383, 383,
- 139, 383, 157, 383, 383, 383, 199, 30, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 261, 43, 44,
- 383, 383, 383, 383, 383, 383, 383, 316, 383, 383,
- 383, 383, 383, 383, 383, 278, 383, 383, 383, 383,
- 383, 383, 383, 383, 230, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 93, 92, 383, 383, 63, 383, 383, 289, 297, 383,
-
- 266, 383, 383, 383, 383, 383, 11, 383, 383, 383,
- 383, 356, 383, 383, 383, 383, 383, 138, 383, 383,
- 383, 383, 383, 383, 228, 99, 383, 383, 46, 383,
- 383, 383, 383, 383, 383, 383, 383, 189, 383, 383,
- 383, 383, 383, 383, 383, 160, 383, 383, 383, 383,
- 269, 383, 383, 383, 383, 383, 277, 383, 383, 383,
- 383, 153, 383, 383, 383, 132, 134, 133, 383, 383,
- 383, 101, 105, 100, 383, 170, 383, 383, 383, 383,
- 90, 383, 263, 299, 383, 383, 383, 383, 383, 383,
- 10, 383, 383, 383, 383, 383, 295, 343, 383, 383,
-
- 383, 383, 383, 383, 383, 383, 349, 45, 383, 383,
- 383, 383, 383, 188, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 106,
- 104, 383, 383, 57, 383, 383, 91, 383, 328, 383,
- 383, 383, 383, 25, 383, 383, 383, 383, 383, 213,
- 383, 383, 341, 383, 383, 383, 383, 229, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 209, 383, 383,
- 178, 85, 383, 383, 383, 383, 383, 317, 383, 383,
- 383, 383, 383, 383, 383, 274, 383, 383, 273, 154,
-
- 383, 383, 103, 383, 54, 383, 383, 161, 162, 165,
- 166, 163, 164, 95, 326, 383, 383, 296, 142, 383,
- 383, 383, 383, 27, 383, 181, 383, 383, 383, 383,
- 207, 383, 260, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 196, 195, 231, 47, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 324, 383, 383, 383, 383, 111, 383,
- 259, 383, 287, 321, 383, 383, 383, 383, 383, 383,
-
- 383, 383, 383, 383, 383, 353, 383, 107, 55, 64,
- 5, 383, 383, 250, 383, 383, 322, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 275, 29, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 276, 383, 383, 383, 159, 383, 383, 383, 383, 383,
- 383, 383, 383, 197, 383, 206, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 318, 383, 383, 383, 383,
- 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
- 383, 383, 383, 348, 383, 383, 283, 383, 383, 383,
- 383, 383, 319, 383, 383, 383, 383, 383, 383, 320,
-
- 383, 383, 383, 281, 383, 284, 285, 383, 383, 383,
- 383, 383, 282, 286, 0
+ 1, 1, 366, 366, 370, 370, 374, 374, 378, 378,
+ 1, 1, 382, 382, 386, 386, 393, 390, 1, 364,
+ 364, 391, 2, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 391, 366, 367, 367,
+ 368, 391, 370, 371, 371, 372, 391, 377, 374, 375,
+ 375, 376, 391, 378, 379, 379, 380, 391, 389, 365,
+ 2, 369, 389, 391, 385, 382, 383, 383, 384, 391,
+ 386, 387, 387, 388, 391, 390, 0, 1, 2, 2,
+ 2, 2, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 366, 0, 370, 0, 377, 0, 374, 378,
+ 0, 389, 0, 2, 2, 389, 385, 0, 382, 386,
+ 0, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 389, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 362, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 137, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 147, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 389, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 119, 390, 390, 361, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 8, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 138, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 152, 390, 390, 390, 389, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 352, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 389, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 71, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 273, 390, 14, 15, 390, 390,
+ 20, 19, 390, 390, 247, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 145, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 245, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 3, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 389, 390, 390, 390, 390,
+ 390, 390, 390, 390, 341, 390, 390, 390, 340, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 373, 390, 390, 390, 390, 390, 390,
+ 390, 390, 70, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 74, 390, 310, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 353, 354, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 75, 390, 390, 146, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 141, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 234, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 22, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 173, 390, 390, 390, 390, 390, 390,
+ 389, 373, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 117, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 318, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 16, 390,
+ 390, 390, 390, 390, 390, 390, 390, 201, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 172, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 116, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 37, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 38, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 72, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 144, 390, 390, 390,
+ 389, 390, 390, 390, 390, 390, 390, 136, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 73, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 277, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 202, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 60, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 296, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 65, 390, 66, 390, 390, 390, 390, 390, 390, 120,
+ 390, 121, 390, 390, 390, 390, 390, 118, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 7, 390, 390, 390, 390, 390, 389, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 262, 390, 390, 390, 390, 390, 390, 176, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 278, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 51, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 61,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 225, 390, 224, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 17, 18, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 76, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 233, 390, 390, 390, 390, 390, 390, 390,
+ 123, 390, 122, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 215,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 153,
+ 390, 253, 390, 390, 390, 389, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 111, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 98, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 246,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 103, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 69, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 218, 219,
+ 390, 390, 390, 312, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 6, 390, 390, 390, 390, 390, 390, 390, 331, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 316,
+ 390, 390, 390, 390, 390, 390, 390, 342, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 48, 390, 390, 390, 390, 390, 50,
+ 390, 390, 390, 99, 390, 390, 390, 390, 390, 58,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 389, 390, 211, 390, 390, 390, 148,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 238, 390, 390, 212, 390, 390,
+ 390, 390, 390, 258, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 59, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 150, 129, 390, 130,
+ 390, 390, 390, 390, 128, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 169, 390, 390, 56, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 294,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 213,
+ 390, 390, 390, 390, 390, 223, 216, 390, 222, 390,
+ 390, 390, 390, 390, 390, 390, 390, 257, 390, 390,
+ 390, 390, 390, 390, 261, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 115, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 142, 390,
+ 390, 390, 390, 390, 390, 390, 390, 67, 390, 390,
+ 390, 390, 31, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 21, 390, 390, 390, 390,
+ 390, 390, 390, 32, 41, 390, 181, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 209, 390, 390, 389, 390, 390, 390,
+ 390, 357, 390, 390, 84, 390, 87, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 358, 390, 390, 390,
+ 390, 390, 390, 390, 390, 320, 390, 390, 390, 390,
+ 274, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 131, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 168, 390, 52,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 268, 390, 390, 390, 390, 390, 390, 390, 390, 335,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 175, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 329, 390, 390, 390, 390,
+ 244, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 349, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 194, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 124, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 188, 390, 203, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 389, 390, 156, 390, 390, 390, 390,
+ 390, 390, 390, 390, 110, 390, 390, 390, 390, 236,
+ 390, 390, 390, 390, 390, 390, 390, 390, 259, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 286, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 149, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 192, 390, 390, 390,
+ 390, 390, 390, 390, 88, 390, 89, 390, 390, 390,
+ 390, 390, 271, 390, 390, 390, 390, 390, 68, 338,
+
+ 390, 390, 390, 390, 390, 97, 204, 390, 226, 390,
+ 263, 390, 390, 217, 313, 390, 390, 390, 390, 308,
+ 390, 390, 390, 80, 390, 206, 390, 390, 390, 390,
+ 390, 390, 9, 390, 390, 390, 390, 390, 114, 390,
+ 390, 390, 390, 390, 390, 300, 390, 390, 390, 390,
+ 390, 390, 235, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 389, 390, 390, 390, 390, 191, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 193, 252, 177, 390, 319, 390, 390, 390, 390, 390,
+ 285, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 248, 390, 390, 390, 390, 390, 390, 311,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 174, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 339, 390, 205, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 79, 81, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 113, 390, 390, 390, 390, 390,
+ 390, 298, 390, 390, 390, 390, 390, 390, 390, 315,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 240, 390, 39, 33, 35, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 40, 390, 34, 36, 390, 42, 390, 390, 390,
+ 390, 390, 390, 390, 109, 390, 187, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 389, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 343, 390, 390, 390, 390,
+ 390, 242, 239, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 78, 390, 390, 390, 151, 390, 132, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 170, 53, 390, 390, 390, 381, 13, 390, 390, 390,
+ 390, 390, 390, 390, 157, 390, 390, 390, 390, 390,
+ 390, 390, 390, 333, 390, 336, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 12,
+ 390, 390, 23, 390, 390, 390, 390, 390, 390, 390,
+
+ 304, 390, 390, 351, 390, 390, 390, 390, 317, 390,
+ 390, 390, 390, 82, 390, 250, 390, 390, 390, 390,
+ 390, 241, 390, 390, 390, 390, 77, 390, 390, 390,
+ 390, 390, 390, 24, 390, 390, 49, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 186,
+ 185, 390, 390, 390, 390, 381, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 243, 237, 390,
+ 260, 390, 390, 321, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 199, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 90, 390, 390, 390, 390, 390, 390, 390, 390,
+ 299, 390, 390, 390, 390, 221, 390, 390, 390, 390,
+ 390, 390, 249, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 306, 390, 390, 390, 345, 390, 347,
+ 346, 183, 390, 390, 390, 83, 390, 390, 390, 390,
+ 195, 390, 390, 390, 390, 390, 125, 127, 126, 390,
+ 390, 390, 26, 390, 390, 178, 390, 180, 390, 227,
+ 390, 390, 390, 390, 184, 390, 390, 254, 390, 390,
+ 390, 390, 264, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 159, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 276, 390, 390, 390, 390,
+ 390, 390, 390, 359, 390, 28, 390, 314, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 95, 228, 390, 390,
+ 270, 390, 390, 390, 297, 390, 337, 390, 220, 390,
+ 390, 309, 390, 390, 390, 307, 62, 390, 390, 390,
+ 390, 390, 390, 390, 4, 390, 390, 390, 390, 390,
+ 140, 390, 158, 390, 390, 390, 200, 30, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 267,
+ 43, 44, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 322, 390, 390, 390, 390, 390, 390, 390, 284,
+ 390, 390, 390, 390, 390, 390, 390, 390, 231, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 94, 93, 390, 390, 63, 390,
+ 390, 295, 303, 390, 272, 390, 390, 390, 390, 390,
+ 11, 390, 390, 390, 390, 363, 390, 390, 390, 390,
+ 390, 139, 390, 390, 390, 390, 390, 390, 229, 100,
+ 390, 390, 46, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 190, 390, 255, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 161, 390, 390, 390, 390, 275, 390,
+ 390, 390, 390, 390, 283, 390, 390, 390, 390, 154,
+ 390, 390, 390, 133, 135, 134, 390, 390, 390, 102,
+ 106, 101, 390, 171, 390, 390, 390, 390, 91, 390,
+ 269, 305, 390, 390, 390, 390, 390, 390, 10, 390,
+ 390, 390, 390, 390, 301, 350, 390, 390, 390, 390,
+ 390, 390, 390, 390, 356, 45, 390, 390, 390, 390,
+ 390, 189, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 107, 105, 390, 390, 57, 390, 390, 92, 390, 334,
+ 390, 390, 390, 390, 25, 390, 390, 390, 390, 390,
+ 214, 390, 390, 348, 390, 390, 390, 390, 230, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 210,
+ 390, 390, 179, 85, 86, 390, 390, 390, 390, 390,
+ 390, 323, 390, 390, 390, 390, 390, 390, 390, 280,
+ 390, 390, 279, 155, 390, 390, 104, 390, 54, 390,
+ 390, 162, 163, 166, 167, 164, 165, 96, 332, 390,
+ 390, 302, 143, 390, 390, 390, 390, 27, 390, 182,
+
+ 390, 390, 390, 390, 390, 208, 390, 266, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 197, 196, 232, 47, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 330, 390, 390, 390, 390, 112, 390, 390, 265,
+ 390, 390, 293, 327, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 360, 390, 108, 55, 64,
+ 5, 390, 390, 251, 390, 390, 390, 390, 328, 390,
+
+ 390, 390, 390, 390, 390, 390, 390, 390, 281, 29,
+ 390, 390, 390, 256, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 282, 390, 390, 390, 390, 160,
+ 390, 390, 390, 390, 390, 390, 390, 390, 198, 390,
+ 207, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 324, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 355, 344, 390, 390, 289, 390, 390, 390, 390,
+ 390, 325, 390, 390, 390, 390, 390, 390, 326, 390,
+ 390, 390, 287, 390, 290, 291, 390, 390, 390, 390,
+
+ 390, 288, 292, 0
} ;
static const YY_CHAR yy_ec[256] =
@@ -830,2064 +840,2112 @@ static const YY_CHAR yy_meta[67] =
1, 1, 1, 1, 1, 1
} ;
-static const flex_int16_t yy_base[3834] =
+static const flex_int16_t yy_base[3923] =
{ 0,
0, 0, 64, 67, 70, 72, 78, 84, 89, 92,
- 131, 137, 112, 118, 123, 142, 616, 527, 96,10847,
- 10847,10847, 160, 185, 116, 183, 229, 132, 175, 173,
+ 131, 137, 112, 118, 123, 142, 572, 520, 96,11109,
+ 11109,11109, 160, 185, 116, 183, 229, 132, 175, 173,
232, 50, 66, 120, 263, 275, 159, 323, 134, 375,
- 416, 286, 308, 283, 126, 258, 516,10847,10847,10847,
- 95, 496,10847,10847,10847, 187, 471, 490,10847,10847,
- 10847, 238, 449,10847,10847,10847, 104, 401,10847, 351,
- 10847, 194, 369, 379, 381,10847,10847,10847, 375, 309,
- 10847,10847,10847, 146, 307, 392, 177, 0, 405, 0,
- 0, 201, 270, 233, 230, 310, 259, 290, 371, 178,
-
- 335, 396, 413, 415, 330, 358, 417, 368, 442, 402,
- 453, 423, 448, 451, 450, 454, 412, 481, 476, 469,
- 480, 503, 494, 475, 463, 381, 504, 502, 511, 512,
- 514, 515, 530, 531, 532, 551, 543, 345, 544, 561,
- 540, 542, 554, 591, 559, 581, 577, 596, 595, 373,
- 579, 599, 569, 608, 603, 622, 616, 621, 629, 624,
- 281, 180, 273, 339, 268, 668, 273, 228, 222, 210,
- 678, 682, 0, 650, 152, 690, 188, 128, 672, 663,
- 680, 660, 670, 665, 683, 675, 692, 674, 679, 699,
- 676, 697, 702, 727, 705, 709, 716, 250, 743, 787,
-
- 732, 722, 745, 720, 747, 748, 738, 731, 761, 758,
- 766, 721, 754, 767, 785, 765, 794, 798, 835, 810,
- 786, 789, 256, 816, 825, 258, 802, 418, 845, 829,
- 792, 833, 91, 851, 843, 856, 857, 862, 848, 863,
- 865, 867, 880, 852, 879, 882, 892, 889, 884, 888,
- 881, 910, 908, 900, 917, 911, 922, 923, 919, 928,
- 912, 929, 945, 924, 946, 957, 959, 939, 967, 951,
- 950, 970, 965, 981, 980, 977, 960, 984, 976, 974,
- 987, 982, 1000, 990, 1007, 1023, 1024, 1016, 1020, 1029,
- 1015, 1014, 1017, 1022, 1019, 1037, 1011, 1042, 1050, 1052,
-
- 1058, 167, 1043, 1064, 1066, 1055, 1072, 1075, 1070, 1080,
- 1081, 1049,10847, 1088, 1082, 1108, 1102, 1111, 1106, 1112,
- 1114, 1116, 1117, 1098, 1103, 1099, 1115, 1123, 1129, 1131,
- 1130, 1133, 1135, 1163, 1147, 1166, 1155, 1171, 1170, 1156,
- 1210, 1172, 1157, 1180, 1255, 1174, 1176, 1193, 1215, 1211,
- 320, 1206, 1188, 1204, 1208, 1225, 1244, 1250, 1254, 1226,
- 1238, 1265, 1267, 1253, 1264, 1270, 1257, 1285, 1287, 1283,
- 1183, 1308,10847, 1295, 1312, 1313, 1314, 1318, 1321, 1316,
- 1333, 1346, 1328, 1331, 1357, 1361, 1358, 1394, 1442, 1351,
- 1366, 1359, 1364, 1386,10847, 1401, 1391, 1491, 1384, 1408,
-
- 1375, 1427, 1389, 1422, 1435, 1437, 1429, 1382, 1439, 1355,
- 1432, 1460, 1485, 1490, 1451, 1482, 1481, 1492, 1509, 1484,
- 1424, 1454, 1508, 1488, 1511, 1544, 1517, 1527, 1540, 1548,
- 1529, 1530, 1535, 1537, 1546, 1556, 1554, 1586, 1564, 1578,
- 1565, 1571, 1569, 1583, 1576, 1587, 1610, 1655, 1607, 1595,
- 1615, 1596, 1616, 1612, 1608, 1634, 1644, 1635, 1631, 1650,
- 1652, 1651, 1654, 1661, 1671, 1682, 1617, 1680, 1686, 1659,
- 1681, 1687, 1689, 1714, 1693, 1698, 1704, 1712, 1703, 1707,
- 1721, 1730, 1732, 1725, 1739, 1733, 1747, 1742, 1734,10847,
- 1749, 1745,10847, 1750, 1767, 1757, 1770, 1759, 1776, 1762,
-
- 1773,10847, 1772, 1769, 1784, 1793, 1796, 1798, 1806, 1818,
- 1811, 1807, 1819, 1823, 1808, 1809, 1820, 1833, 1812, 1837,
- 1857, 1841, 1839, 1836, 1849, 1861, 1774, 1864, 1847, 1867,
- 1863, 1854, 1874, 1914,10847, 1866, 1856, 1883, 1876, 1889,
- 1900, 1896, 1917, 1941, 1909, 1938, 1910, 1945, 1957, 1944,
- 1942, 1961, 1951, 1891, 1965, 1955, 1975, 1968, 1967, 1972,
- 1995, 1978, 1982, 1993, 1991, 1989, 2002, 2005,10847, 2003,
- 2009, 2015, 2020, 2014, 2006, 2018, 2029, 2033, 2034, 2032,
- 2047, 2039, 2053, 2030, 2057, 1727, 2063, 2056, 2067, 2072,
- 2059, 2066, 2061, 2058, 2082, 2086, 2088, 2085, 2108, 2078,
-
- 2106, 2110, 158, 2116, 2117, 2119, 2125, 2126, 2105, 2109,
- 2115, 2135, 2124, 2120, 2114, 2137, 2143, 2132, 2141, 2154,
- 2150, 2149, 2157, 2145, 2166, 2159, 2177, 2164, 2153, 2184,
- 2175, 2176, 2187, 2188, 2190, 2183, 2215, 2202, 2208, 2210,
- 2214, 2233, 2234, 2217, 2198,10847, 2237, 2240, 2243, 2248,
- 2232, 2257, 2253, 2258, 2255, 2250, 2265, 2273, 2264, 2261,
- 2287, 2284, 2275, 2292, 2282, 2290, 2289, 2298, 2300, 2311,
- 2309, 2319, 2330, 2310, 2320, 2313, 2317, 2327, 2329, 2328,
- 2332, 2353, 2347, 2363, 2358, 2339, 2360, 2355, 2372, 2356,
- 2362, 2381, 2368, 2357, 2385, 2392, 2384, 2405, 2402, 2403,
-
- 2420, 2378, 2395, 2430, 2444, 2413, 2390, 2424, 2427, 2441,
- 2428, 2434, 2440, 2442, 2429, 2439, 2468, 2470, 2455, 2462,
- 2463, 2465, 2461, 2481, 2479, 2486, 2476, 2485, 2488, 2490,
- 2495, 2505, 2498, 2501, 2514, 2513, 2515, 2518, 2520, 2543,
- 2535, 2551, 2540, 2536, 2546, 2542, 2541, 2554, 2556, 2566,
- 2561, 2577, 2582, 2583, 2567, 2592, 2593, 2578, 2588, 2580,
- 2586, 2594, 2614, 2607, 2601, 2605, 2625, 2617, 2627, 2622,
- 2635, 2628, 2618, 2640, 2650, 2648, 2641, 2652,10847, 2653,
- 2655, 2657, 2654, 2656, 2658, 2664, 2675, 2695, 2684, 2687,
- 2678, 2673, 2686, 2732,10847, 2697,10847,10847, 1581, 2691,
-
- 10847,10847, 2700, 2720,10847, 2716, 2722, 2721, 2688, 2736,
- 2745, 2749, 2718, 2742, 2748, 2763, 2715, 2810, 2766, 2753,
- 2761, 2773, 2770, 2768, 2803, 2789, 2779, 2800, 2793, 2799,
- 2830, 2845, 2835, 2846, 2821, 2838, 2851, 2848, 2856, 2849,
- 2861, 2862, 2855, 2858, 2880, 2870, 2868, 2885, 2891, 2881,
- 2878, 2886, 2901, 2888, 2897, 2894, 2775, 2905, 2899, 2935,
- 10847, 2917, 2876, 2913, 2915, 2918, 2944, 2936, 2951, 2945,
- 2946, 2939, 2950, 2953, 2937, 2949, 2942, 2954, 2963, 2976,
- 2970, 2969, 2972, 2989, 2984, 2987, 2992, 2975, 2980, 2981,
- 10847, 2996, 2997, 2977, 2994, 3008, 3017, 3027, 3024, 3020,
-
- 3012, 3022, 3025, 3046, 3028, 3044, 3033, 3040, 3041, 3039,
- 3052, 3071,10847, 3060, 3076, 3057, 3075, 3064, 3083, 3072,
- 3073, 3084, 3094, 3086, 3081, 3112, 3099, 3105, 3101, 3109,
- 3111, 3113, 3108, 3120, 3119, 3122, 3128, 3132, 3148, 3139,
- 3133, 3154, 3145, 3159, 3150, 3146, 3152, 3156, 3162, 3179,
- 3183, 3173, 3189, 3174, 3184, 3196, 3198, 3195, 3186, 3200,
- 3197, 3207, 3216, 3213, 3223, 3218, 3215, 3222, 3224, 3210,
- 3236, 3234, 3241, 3251, 3258, 3244, 3260, 3255, 3243, 3257,
- 3261, 3270, 3247,10847, 3271, 3285, 3286,10847, 3288, 3287,
- 3284, 3332, 3304, 3289, 3302, 3303, 3319, 3298, 3334, 3325,
-
- 3328, 3344, 3333, 3356, 3345, 3359, 3374, 3362, 3379, 3370,
- 3380, 3381, 3387, 3371, 3388, 3401, 3386, 3393, 3398, 3294,
- 3421, 3396, 477, 3429, 3405, 3412, 3415, 3460, 3423, 3438,
- 3422, 3428, 3444, 3446, 3449, 3450, 3465, 3455, 3456, 3470,
- 3478, 3458, 3485, 3487, 3482, 3488, 3492, 3493, 3498, 3514,
- 3502,10847, 3508, 3520, 3505, 3525, 3515, 3538, 3529, 3517,
- 10847, 3531, 3537, 3527, 3544, 3539, 3541, 3554, 3542, 3558,
- 3552, 3556, 3565, 3569, 3573, 3568, 3567, 3593,10847, 3575,
- 10847, 3583, 3586, 3587, 3602, 3595, 3589, 3601, 3599, 3604,
- 3616, 3618,10847,10847, 3620, 3622, 3628, 3629, 3641, 3643,
-
- 3631, 3636, 3646,10847, 3644, 3666,10847, 3661, 3654, 3650,
- 3658, 3655, 3663, 3667, 3673, 3670, 3680, 3681, 3678, 3689,
- 3688, 3699, 3697,10847, 3708, 3710, 3693, 3707, 3716, 3701,
- 3718, 3724, 3728, 3720,10847, 3736, 3730, 3743, 3731, 3755,
- 3753, 3756, 3744, 3758, 3763, 3748, 3759, 3747, 3769, 3768,
- 3773, 3782, 3789, 3792, 3793, 3806, 3799, 3807,10847, 3805,
- 3785, 3791, 3812, 3808, 3787, 3814, 3818, 3816, 3824, 3809,
- 3819, 3826, 3833, 3847, 3839, 3846, 3840, 3820, 3866, 3848,
- 3860, 3862, 3845, 3854, 3870, 3876, 552, 3878, 3871, 3881,
- 3874,10847, 3883, 3877, 3898, 3907, 3908, 3891, 115, 3901,
-
- 3904, 3905, 3909, 3921, 3922, 3916, 3925, 3893, 3927, 3932,
- 3934, 3946, 3953, 3957, 3942, 3944, 3960, 3948, 3949, 3964,
- 3959, 3973, 3977,10847, 3970, 3984, 3975, 3981, 3986, 3997,
- 3985, 4002,10847, 4006, 4008, 4012, 4014, 4013, 4024, 4019,
- 4023, 4034, 4044,10847, 4049, 4036, 4045, 4032, 4051, 4046,
- 4047, 4043,10847, 4064, 4061, 4063, 4072, 4070, 4073, 4085,
- 4071, 4081, 4082, 4102, 4088, 4099, 4095, 4091, 4090, 4098,
- 4118, 4112, 4109, 4136, 4115, 4126, 4131, 4129, 4130, 4138,
- 4133, 4134, 4151, 4153, 4148,10847, 4160, 4154, 4156, 4164,
- 4162, 4158, 4179, 4176, 4205, 4171, 4180, 4189, 4191, 4232,
-
- 4195, 4203, 4209, 4219, 4221, 4223, 4216, 4215, 4229, 4239,
- 4230, 4242, 4248, 4274, 4253, 4247, 4243, 4267, 4278, 4275,
- 4266, 4280, 4269, 4270, 4292, 4289, 4294, 4293, 4287, 4290,
- 4322, 4318, 4310, 4325, 4329, 4321,10847, 4330, 4320, 4319,
- 4337, 4345, 4373, 4351, 4361, 4349, 4369, 4363, 4366, 4364,
- 4365, 4372, 4314, 4378, 4368, 4381, 4395, 4398, 4400, 4385,
- 4408, 4399, 4393, 4419, 4423, 4413, 4429, 4426, 4430,10847,
- 4434, 4433, 4420, 4440, 4443, 4442, 4448, 4451, 4458, 4447,
- 4450, 4459, 4454, 4464, 4455, 4470, 4467, 4488, 4491, 4483,
- 4499, 4475,10847, 4500, 4489, 4495, 4507, 4510, 4516, 4498,
-
- 4527, 4514, 4531, 4528, 4533, 4522, 4539, 4535, 4534,10847,
- 4551, 4555, 4548, 4552, 4569, 4559, 4554, 4560, 4570, 4556,
- 10847, 4572, 4567, 4578, 4574, 4582, 4583, 4595, 4596, 4586,
- 4597,10847, 4598, 4600, 4591, 4612, 4601, 4605, 4616, 4613,
- 4625, 4622, 4609, 4619, 4640, 4632, 4651, 4633, 4649,10847,
- 4636, 4648, 4670, 4653, 4657, 4660, 4659, 4664, 4681, 4680,
- 4665, 4692, 4676,10847, 4707, 4700, 4698, 4710, 4695, 4702,
- 4693, 4708, 4719, 4725, 4715, 4712, 4738, 4727,10847, 4731,
- 4726, 4746, 4748, 4752, 4750, 4742, 4721, 4751, 4765, 4766,
- 4753, 4769, 4771, 4770, 4777, 4780, 4794, 4783, 4788, 4779,
-
- 4796, 4816, 4803, 4810, 4804, 4821, 4723, 4808, 4806, 4833,
- 4825, 4830, 4823, 4832, 4835, 4843, 4846, 4847, 4854, 4857,
- 10847, 4856, 4860, 4859, 4851, 4863, 4862, 4873, 4865, 4870,
- 4874, 4885, 4900, 4895, 4889, 4918, 4919, 4903, 4890, 4922,
- 4906, 4912, 4902, 4921, 4924, 4920, 4936, 4929, 4937, 4939,
- 4935, 4944, 4934, 4946, 4949, 4966, 4970, 4956, 4965, 4958,
- 4961, 4971, 4981, 4964, 4982, 4979, 4988, 4993, 4991, 4992,
- 5001, 5012, 5014, 5017, 5020, 5016, 5018, 5023, 5021, 5051,
- 10847, 5028, 5039, 5031, 5037, 5045, 5055, 5035, 5049, 5072,
- 5059, 5062, 5073, 5078, 5081, 5084, 5067, 5077, 5082, 5076,
-
- 5098, 5090,10847, 5089,10847, 5111, 5092, 5115, 5123, 5126,
- 5108,10847, 5127,10847, 5129, 5130, 5117, 5121, 5125,10847,
- 5136, 5122, 5138, 5152, 5142, 5144, 5159, 5146, 5156, 5171,
- 5163, 5151, 5179, 5172, 5164, 5169, 5168, 5185, 5186, 5183,
- 5198, 5195, 5202, 5192, 5211, 5201, 5222, 5204, 5214, 5207,
- 5231, 5220, 5225,10847, 5236, 5234, 5227, 5241, 5243, 5238,
- 5255, 5252, 5260, 5250, 5267, 5277, 5279, 5261, 5265, 5270,
- 5280, 5282, 5288, 5290, 5298, 5308, 5295, 5294, 5324, 5318,
- 10847, 5312, 5328, 5311, 5315, 5325,10847, 5327, 5309, 5342,
- 5345, 5335, 5329, 5348, 5341, 5364, 5359, 5354, 5358, 5376,
-
- 5353, 5383, 5381,10847, 5380, 5390, 5371, 5398, 5387, 5375,
- 5402, 5417, 5408, 5418, 5423, 5425, 5426, 5420, 5412, 5415,
- 5416, 5429, 5442, 5443, 5446, 5444, 5453, 5439, 5450, 5454,
- 5459, 5447, 5448, 5452, 5466, 5463, 5470, 5473, 5474, 5478,
- 5477, 5494, 5497, 5489, 5500,10847, 5491, 5501, 5493, 5514,
- 5511, 5516, 5517, 5522, 5539, 5518, 5538,10847, 5548, 5530,
- 5546, 5540, 5553, 5541, 5557, 5558, 5543, 5563, 5574, 5569,
- 5583, 5570,10847, 5585,10847, 5575, 5579, 5588, 5594, 5607,
- 5596, 5599, 5611, 5624, 5612, 5609, 5632, 5635, 5626, 5621,
- 5638, 5627, 5631, 5636, 5630, 5659, 5651, 5652, 5655, 5633,
-
- 5670, 5660, 5672, 5663, 5669, 5673, 5706, 5686, 5682,10847,
- 10847, 5678, 5666, 5713, 5712, 5701, 5710, 5721, 5723, 5720,
- 5730, 5733, 5709, 5704, 5737, 5763,10847, 5752, 5753, 5745,
- 5764, 5756, 5748, 5758, 5771, 5750, 5773, 5760, 5786, 5782,
- 10847, 5772, 5784, 5775, 5791, 5793, 5805, 5812,10847, 5802,
- 10847, 5798, 5803, 5807, 5813, 5818, 5815, 5825, 5819, 5830,
- 5833, 5840, 5856, 5832, 5841, 5855, 5848, 5862, 5844, 5845,
- 5857, 5866, 5860, 5874, 5870, 5878, 5868,10847, 5879, 5882,
- 5895, 5891, 5887, 5893, 5903, 5901, 5888,10847, 5905, 5915,
- 5909, 5919, 5918, 5917, 5921, 5929, 5928, 5927, 5944, 5936,
-
- 5945, 5953, 5954, 5937,10847, 5942, 5955, 5958, 5971, 5960,
- 5964, 5959, 5986, 5974, 5973,10847, 5985, 6000, 5987, 6004,
- 6003, 5995, 6006, 6012, 5991, 5997, 6002, 6010, 6021, 6027,
- 6016, 6024, 6029, 6035, 6048, 6038, 6056, 6045, 6049, 6060,
- 6014, 6052,10847, 6053, 6047, 6059, 6065, 6062, 6088, 6085,
- 6093, 6098, 6102, 6083, 6104, 6105, 6086, 6095, 6097, 6111,
- 6110, 6124, 6120,10847, 6132, 6117, 6141, 6119, 6134, 6127,
- 6137, 6148, 6129, 6150, 6153, 6143, 6136, 6160, 6166, 6172,
- 6169, 6177, 6176, 6182, 6179, 6185, 6183, 6187, 6191, 6201,
- 6214,10847, 6186, 6206, 6210, 6221, 6215, 6212, 6235, 6222,
-
- 6216, 6224, 6194, 6229, 6239, 6237, 6238, 6243, 6259, 6261,
- 6248,10847,10847, 6269, 6249, 6264,10847, 6270, 6256, 6283,
- 6262, 6276, 6266, 6285, 6278, 6275, 6287, 6289, 6296, 6308,
- 6311, 6301, 6297,10847, 6320, 6324, 6323, 6310, 6325, 6336,
- 6331,10847, 6315, 6344, 6341, 6338, 6337, 6340, 6342, 6326,
- 6363, 6364, 6371, 6357, 6351, 6378, 6353, 6369, 6388, 6365,
- 6372, 6390,10847, 6380, 6389, 6392, 6386, 6396, 6399, 6407,
- 10847, 6406, 6405, 6427, 6423, 6421, 6431, 6426, 6436, 6448,
- 6439, 6444, 6446, 6424, 6456, 6449, 6452, 6454, 6451, 6450,
- 6467, 6475, 6471, 6485, 6488, 6486,10847, 6491, 6492, 6477,
-
- 6501, 6493,10847, 6505, 6526, 6515,10847, 6519, 6496, 6520,
- 6517, 6536,10847, 6527, 6530, 6528, 6537, 6516, 6542, 6523,
- 6553, 6551, 6543, 6554, 6555, 6546,10847, 6559, 6556, 6572,
- 10847, 6576, 6581, 6578, 6588, 6590, 6580, 6573, 6564, 6586,
- 6589, 6591, 6587,10847, 6604, 6610,10847, 6622, 6608, 6614,
- 6627,10847, 6617, 6618, 6633, 6632, 6631, 6637, 6641, 6644,
- 6634, 6623, 6639, 6645, 6657, 6658, 6672, 6656, 6660, 6670,
- 6664, 6666,10847, 6699, 6668, 6683, 6685, 6661, 6695, 6689,
- 6690, 6693, 6710, 6705,10847,10847, 6701,10847, 6721, 6717,
- 6719, 6720,10847, 6716, 6725, 6745, 6732, 6729, 6748, 6740,
-
- 6737, 6734, 6757,10847, 6753, 6767,10847, 6746, 6764, 6776,
- 6760, 6771, 6761, 6759, 6784, 6798, 6781, 6777, 6788, 6794,
- 6801, 6791, 6805, 6804, 6835, 6797, 6836,10847, 6823, 6810,
- 6837, 6845, 6830, 6831, 6850, 6847, 6834,10847, 6862, 6857,
- 6865, 6863, 6864,10847,10847, 6876,10847, 6869, 6879, 6881,
- 6895, 6880, 6882, 6795, 6884,10847, 6898, 6891, 6901, 6890,
- 6908, 6917,10847, 6918, 6925, 6915, 6920, 6914, 6926, 6931,
- 6924, 6927, 6967, 6941,10847, 6929, 6945, 6943, 6969, 6970,
- 6962, 6963, 6954, 6982, 6975, 6977, 6965, 6989, 6987, 6985,
- 6981, 6990, 6998, 7002, 7008, 6997,10847, 7017, 7019, 7025,
-
- 7012, 7037, 7022, 7014, 7024,10847, 7030, 7035, 7040, 7048,
- 10847, 7046, 7057, 7060, 7056, 7058, 7061, 7063, 7055, 7041,
- 7064, 7074, 7090,10847, 7082, 7085, 7080, 7105, 7106, 7093,
- 7096,10847,10847, 7107,10847, 7109, 7108, 7103, 7101, 7122,
- 7116, 7139, 7135, 7148, 7132, 7136, 7152, 7146, 7141,10847,
- 7138, 6992, 7142, 7172, 7165, 7166, 7167,10847, 7168, 7160,
- 10847,10847, 7171, 7185, 7187, 7181, 7196, 7199, 7192, 7183,
- 10847, 7191, 7194, 7206, 7219, 7205, 7217, 7229,10847, 7221,
- 7210, 7231, 7214,10847, 7218, 7237, 7227, 7224, 7248, 7241,
- 7244, 7245, 7258, 7251, 7255, 7270, 7252, 7271, 7266, 7262,
-
- 7277, 7269, 7264, 7294, 7289, 7287, 7306,10847, 7301, 7293,
- 7298, 7300, 7307, 7311, 7304, 7297, 7325, 7320, 7345, 7347,
- 10847, 7328,10847, 7336, 7334, 7350, 7351, 7338, 7354, 7355,
- 7363, 7346, 7364, 7357, 7376, 7368, 7367, 7377, 7392, 7382,
- 7384, 7387, 7401,10847, 7407, 7409, 7393, 7411, 7413, 7417,
- 7418, 7416,10847, 7426, 7403, 7427, 7429, 7433, 7442, 7432,
- 7446, 7437, 7457, 7448, 7456, 7462, 7465, 7452, 7458, 7469,
- 7454, 7472, 7473, 7476,10847, 7475, 7477, 7482, 7486, 7488,
- 7500, 7485, 7507, 7515, 7508, 7492, 7502, 7518,10847, 7509,
- 7521, 7523, 7526,10847, 7519, 7534, 7529, 7542, 7537, 7554,
-
- 7536, 7560, 7558, 7544, 7573,10847, 7570, 7563, 7568, 7564,
- 7576, 7580, 7581, 7546, 7592, 7595, 7607, 7608,10847, 7585,
- 7602, 7612, 7613, 7619, 7605, 7620, 7616, 7639, 7622, 7632,
- 10847, 7645, 7647, 7651, 7646, 7667, 7668, 7644, 7654, 7672,
- 7671, 7675, 7657, 7673, 7684, 7670, 7692, 7695, 7696, 7697,
- 7694, 7698, 7715, 7685,10847, 7700,10847, 7709, 7717, 7733,
- 7723, 7736, 7721, 7738, 7735, 7732,10847, 7742, 7755, 7741,
- 7728, 7764, 7769,10847, 7763, 7760, 7762, 7766,10847, 7780,
- 7779, 7768, 7782, 7786, 7792, 7796,10847, 7799, 7805, 7807,
- 7819, 7821, 7809, 7817, 7806, 7824, 7810, 7813, 7811, 7828,
-
- 7833, 7836, 7826,10847, 7837, 7839, 7843, 7854, 7856, 7853,
- 7858, 7845, 7869, 7871, 7863,10847, 7870, 7864, 7879, 7881,
- 7868, 7883, 7885, 7888, 7909, 7907, 7915, 7917, 7903, 7900,
- 7904, 7920, 7908, 7922,10847, 7912, 7937, 7928, 7942, 7943,
- 7946, 7939,10847, 7948,10847, 7944, 7945, 7960, 7962, 7966,
- 10847, 7971, 7963, 7973, 7956, 7990,10847,10847, 7975, 7968,
- 7984, 7977, 7988,10847,10847, 7999,10847, 7989,10847, 7994,
- 7998,10847,10847, 8005, 7986, 8001, 8006,10847, 8015, 8017,
- 8029,10847, 8030,10847, 8036, 8018, 8039, 8032, 8028, 8046,
- 10847, 8033, 8055, 8041, 8049, 8043,10847, 8056, 8060, 8065,
-
- 8067, 8063, 8059,10847, 8064, 8086, 8082, 8076, 8085, 8075,
- 10847, 8096, 8100, 8101, 8092, 8098, 8102, 8109, 8116, 8103,
- 8112, 8123, 8133, 8120, 8128, 8141, 8149, 8136, 8152, 8154,
- 8156, 8145, 8159, 8153, 8164, 8165, 8173, 8176, 8158, 8162,
- 8175, 8179, 8184, 8191, 8190, 8189, 8194, 8195, 8201, 8210,
- 8203, 8206, 8211, 8200, 8214, 8204, 8209, 8225, 8234, 8244,
- 8222, 8233, 8232, 8230, 8241, 8236, 8260, 8252, 8265, 8267,
- 8259, 8263,10847, 8270, 8273, 8269, 8275, 8280, 8285, 8279,
- 8303, 8277, 8309, 8312,10847,10847, 8315,10847, 8317, 8296,
- 8310, 8300, 8305,10847, 8304, 8311, 8306, 8330, 8325, 8333,
-
- 8347, 8338, 8336, 8341, 8361,10847, 8360, 8366, 8355, 8345,
- 8370, 8371,10847, 8374, 8373, 8357, 8372, 8377, 8385, 8388,
- 8387, 8389, 8393, 8394, 8404, 8411, 8423, 8424, 8406, 8410,
- 8419,10847, 8427, 8429, 8416, 8421, 8431, 8432, 8438, 8446,
- 8436, 8442, 8444, 8450, 8452, 8451, 8456, 8455, 8476, 8459,
- 8480, 8483, 8490,10847, 8473,10847, 8484, 8477, 8486, 8489,
- 8500, 8494, 8501, 8495, 8499,10847,10847, 8504, 8511, 8527,
- 8534, 8520, 8519, 8539, 8532, 8525, 8544,10847, 8538, 8545,
- 8549, 8546, 8558, 8556,10847, 8559, 8563, 8561, 8565, 8570,
- 8571, 8568,10847, 8567, 8580, 8595, 8592, 8600, 8583, 8603,
-
- 8604, 8605, 8596, 8601, 8597, 8615,10847, 8616,10847,10847,
- 10847, 8620, 8624, 8623, 8625, 8622, 8640, 8641, 8629, 8646,
- 8648, 8634, 8639, 8643,10847, 8663,10847,10847, 8664,10847,
- 8666, 8660, 8672, 8668, 8670, 8679, 8675,10847, 8685,10847,
- 8687, 8702, 8690, 8694, 8708, 8704, 8699, 8711, 8706, 8715,
- 8710, 8712, 8651, 8717,10847, 8723, 8726, 8738, 8725, 8746,
- 10847,10847, 8735, 8754, 8753, 8763, 8755, 8759, 8747, 8771,
- 8765, 8762, 8768, 8757, 8770, 8758, 8776, 8781, 8788, 8789,
- 8800,10847, 8795, 8804, 8807,10847, 8799,10847, 8808, 8812,
- 8814, 8803, 8805, 8815, 8816, 8822, 8838, 8829, 8848,10847,
-
- 10847, 8836, 8860, 8851,10847,10847, 8839, 8841, 8842, 8840,
- 8864, 8863, 8852,10847, 8867, 8868, 8872, 8878, 8874, 8881,
- 8882, 8887,10847, 8892,10847, 8891, 8898, 8912, 8888, 8897,
- 8921, 8903, 8899, 8926, 8927, 8920, 8910, 8931,10847, 8923,
- 8929,10847, 8946, 8940, 8941, 8933, 8938, 8957, 8949,10847,
- 8960, 8948,10847, 8971, 8954, 8974, 8980,10847, 8982, 8979,
- 8981, 8976,10847, 8989,10847, 8970, 8987, 8984, 8999, 8988,
- 10847, 8975, 8998, 9001, 9004,10847, 9020, 9024, 9029, 9027,
- 9022, 9023,10847, 9033, 9016,10847, 9017, 9038, 9039, 9041,
- 9031, 9042, 9057, 9053, 9045, 9058, 9052, 9051,10847,10847,
-
- 9079, 9072, 73, 9081, 9060, 9068, 9069, 9084, 9080, 9066,
- 9096, 9092,10847,10847, 9097,10847, 9086, 9098,10847, 9078,
- 9106, 9111, 9114, 9115, 9108, 9117, 9129, 9122, 9134, 9149,
- 9136, 9127, 9147,10847, 9145, 9162, 9159, 9165, 9166, 9168,
- 9170, 9179, 9182, 9172, 9176, 9164, 9174, 9193, 9190, 9207,
- 9194, 9209, 9210, 9196, 9198, 9206,10847, 9222, 9224, 9225,
- 9215, 9232, 9229, 9233, 9236,10847, 9244, 9240, 9248, 9245,
- 10847, 9258, 9252, 9255, 9266, 9259, 9260,10847, 9262, 9270,
- 9273, 9272, 9274, 9265, 9267, 9275, 9286, 9309,10847, 9285,
- 9299, 9310,10847, 9300,10847,10847,10847, 9311, 9318, 9305,
-
- 10847, 9320, 9307, 9297, 9312,10847, 9323, 9328, 9331, 9139,
- 9317,10847,10847,10847, 9326, 9347, 9345,10847, 9339, 9336,
- 10847, 9348,10847, 9341,10847, 9356, 9364, 9370, 9367,10847,
- 9368, 9372, 9363, 9401,10847, 9365, 9380, 9382, 9384, 9386,
- 9389, 9409,10847, 9415, 9412, 9413, 9419, 9403, 9410, 9404,
- 9429, 9420, 9428, 9399, 9427,10847, 9439, 9445, 9448, 9456,
- 9440, 9447, 9449,10847, 9451,10847, 9458,10847, 9455, 9460,
- 9466, 9465, 9454, 9472, 9475, 9489, 9496, 9483, 9484, 9506,
- 9499, 9487, 9486, 9509, 9517, 9500,10847,10847, 9525, 9515,
- 10847, 9516, 9518, 9537,10847, 9520,10847, 9538,10847, 9524,
-
- 9532,10847, 9545, 9539, 9549,10847,10847, 9553, 9542, 9551,
- 9563, 9534, 9570, 9552,10847, 9572, 9569, 9566, 9568, 9574,
- 10847, 9593,10847, 9582, 9596, 9587,10847,10847, 9581, 9578,
- 9594, 9606, 9600, 9591, 9607, 9605, 9608, 9619, 9627, 9609,
- 9613, 9621, 9624, 9622, 9642, 9644, 9649,10847,10847,10847,
- 9646, 9636, 9662, 9659, 9657, 9666, 9652,10847, 9673, 9665,
- 9675, 9648, 9686, 9681, 9682,10847, 9676, 9677, 9685, 9693,
- 9690, 9692, 9700, 9687,10847, 9691, 9701, 9721, 9719, 9715,
- 9725, 9731, 9732, 9734, 9726, 9736, 9727, 9718, 9746, 9742,
- 10847,10847, 9739, 9733,10847, 9750, 9755,10847,10847, 9745,
-
- 10847, 9743, 9753, 9759, 9757, 9767,10847, 9781, 9761, 9766,
- 9769,10847, 9770, 9780, 9798, 9799, 9796,10847, 9786, 9806,
- 9791, 9801, 9810, 9814,10847,10847, 9782, 9821,10847, 9822,
- 9824, 9818, 9839, 9823, 9828, 9840, 9838,10847, 9848, 9849,
- 9833, 9837, 9856, 9846, 9862,10847, 9863, 9850, 9866, 9867,
- 10847, 9864, 9876, 9883, 9851, 9897,10847, 9899, 9885, 9879,
- 9903,10847, 9891, 9912, 9894,10847,10847,10847, 9916, 9917,
- 9918,10847,10847,10847, 9910,10847, 9920, 9928, 9921, 9923,
- 10847, 9926,10847,10847, 9936, 7880, 9958, 9946, 9960, 9947,
- 10847, 9949, 9952, 9962, 9948, 9950,10847,10847, 9965, 9968,
-
- 9963, 9974, 9975, 9970, 9981, 9978,10847,10847, 9957, 9979,
- 9996, 9995, 9988,10847, 9993,10007,10014,10008,10015,10018,
- 10019,10009,10023,10020,10053,10038,10027,10022,10036,10035,
- 10055,10039,10061,10073,10063,10070,10071,10059,10067,10847,
- 10847,10075,10062,10847,10077,10082,10847,10065,10847,10078,
- 10081,10093,10095,10847,10106,10107,10111,10112,10087,10847,
- 10108,10115,10847,10116,10110,10109,10103,10847,10114,10124,
- 10126,10125,10132,10136,10142,10130,10128,10847,10146,10160,
- 10847,10847,10144,10163,10138,10167,10152,10847,10172,10182,
- 10169,10173,10165,10180,10185,10847,10197,10177,10847,10847,
-
- 10202,10193,10847,10213,10847,10189,10199,10847,10847,10847,
- 10847,10847,10847,10847,10847,10212,10218,10847,10847,10209,
- 10223,10227,10231,10847,10232,10847,10211,10228,10239,10233,
- 10847,10238,10847,10224,10245,10257,10261,10254,10266,10255,
- 10258,10260,10259,10246,10276,10283,10285,10294,10279,10289,
- 10302,10290,10308,10293,10306,10847,10847,10847,10847,10316,
- 10295,10314,10322,10323,10324,10332,10337,10320,10326,10341,
- 10340,10343,10329,10347,10360,10349,10353,10356,10369,10357,
- 10378,10379,10382,10847,10385,10371,10372,10393,10847,10380,
- 10847,10376,10847,10847,10397,10399,10402,10389,10406,10407,
-
- 10401,10398,10404,10409,10417,10847,10419,10847,10847,10847,
- 10847,10418,10420,10847,10416,10428,10847,10429,10443,10433,
- 10438,10441,10434,10457,10458,10464,10847,10847,10466,10455,
- 10450,10471,10467,10479,10482,10487,10490,10496,10478,10493,
- 10847,10502,10498,10504,10847,10507,10489,10505,10499,10514,
- 10520,10517,10524,10847,10526,10847,10521,10531,10541,10523,
- 10530,10539,10554,10551,10548,10847,10545,10558,10565,10573,
- 10576,10575,10582,10568,10590,10586,10592,10593,10598,10599,
- 10596,10603,10609,10847,10597,10610,10847,10607,10617,10619,
- 10621,10626,10847,10631,10624,10633,10644,10641,10650,10847,
-
- 10647,10659,10654,10847,10658,10847,10847,10664,10656,10668,
- 10662,10666,10847,10847,10847,10727,10734,10741,10748,10755,
- 10762,10769, 100,10776,10783,10790,10797,10804,10811,10818,
- 10825,10832,10839
+ 416, 286, 308, 283, 177, 126, 258, 471,11109,11109,
+ 11109, 95, 462,11109,11109,11109, 236, 438, 436,11109,
+ 11109,11109, 351, 388,11109,11109,11109, 104, 385,11109,
+ 369,11109, 167, 375, 345, 368,11109,11109,11109, 390,
+ 309,11109,11109,11109, 146, 291, 394, 177, 0, 406,
+ 0, 0, 210, 224, 235, 281, 310, 259, 343, 389,
+
+ 256, 187, 396, 428, 426, 325, 382, 446, 303, 425,
+ 402, 463, 344, 381, 423, 450, 451, 454, 473, 469,
+ 472, 480, 501, 498, 496, 507, 453, 513, 487, 518,
+ 503, 509, 535, 523, 538, 528, 543, 537, 386, 547,
+ 559, 556, 351, 561, 573, 568, 594, 565, 592, 599,
+ 585, 596, 595, 609, 627, 618, 626, 620, 621, 636,
+ 637, 635, 273, 180, 270, 238, 268, 678, 296, 230,
+ 342, 152, 689, 693, 0, 668, 150, 697, 176, 128,
+ 455, 669, 666, 672, 677, 680, 697, 683, 698, 681,
+ 696, 704, 695, 702, 707, 740, 701, 732, 743, 226,
+
+ 749, 793, 750, 733, 754, 728, 753, 756, 772, 762,
+ 767, 788, 795, 785, 777, 783, 811, 748, 803, 816,
+ 853, 828, 817, 789, 240, 835, 850, 250, 819, 607,
+ 852, 847, 723, 860, 91, 768, 845, 863, 887, 872,
+ 569, 864, 855, 879, 883, 877, 895, 880, 904, 842,
+ 898, 892, 891, 929, 910, 899, 923, 912, 938, 928,
+ 930, 948, 925, 944, 951, 939, 952, 956, 965, 943,
+ 968, 955, 950, 980, 969, 992, 989, 986, 970, 979,
+ 985, 991, 982, 994, 984, 995, 1011, 1009, 1028, 1029,
+ 1020, 1030, 1038, 1024, 1026, 1027, 1033, 1032, 1036, 1023,
+
+ 1054, 1055, 1041, 1063, 1073, 233, 1059, 1075, 1078, 1067,
+ 1092, 1081, 1085, 1086, 1087, 1090,11109, 1097, 1101, 1102,
+ 1116, 1103, 1117, 1098, 1122, 1136, 1137, 1113, 1123, 1125,
+ 1126, 1134, 1144, 1140, 1151, 1150, 1152, 1171, 1157, 1173,
+ 1168, 1162, 1178, 1174, 1217, 1179, 1196, 1185, 1262, 1189,
+ 1191, 1212, 1225, 1230, 486, 1219, 1211, 1249, 1218, 1232,
+ 1255, 1241, 1261, 1258, 1282, 1274, 1277, 1259, 1276, 1285,
+ 1286, 1296, 1299, 1301, 1164, 1321,11109, 1300, 1325, 1215,
+ 1326, 1327, 1334, 1336, 1341, 1353, 1335, 1354, 1346, 1370,
+ 1371, 1403, 1451, 1358, 1381, 1373, 1380, 1396,11109, 1390,
+
+ 1399, 1500, 1417, 1419, 1391, 1392, 1429, 1420, 1430, 1423,
+ 1444, 1439, 1450, 1446, 1434, 1462, 1469, 1480, 1499, 1473,
+ 1478, 1491, 1518, 1527, 1509, 1468, 1507, 1501, 1525, 1520,
+ 1530, 1558, 1465, 1539, 1551, 1562, 1543, 1547, 1552, 1553,
+ 1559, 1570, 1571, 1585, 1577, 1597, 1583, 1590, 1591, 1586,
+ 1603, 1593, 1617, 1662, 1596, 1613, 1614, 1623, 1629, 1636,
+ 1624, 1641, 1631, 1654, 1650, 1651, 1658, 1660, 1642, 1665,
+ 1677, 1687, 1666, 1686, 1692, 1684, 1674, 1700, 1703, 1711,
+ 1697, 1701, 1698, 1717, 1728, 1713, 1732, 1736, 1738, 1733,
+ 1748, 1746, 1750, 1752, 1735,11109, 1755, 1765,11109, 1760,
+
+ 1759, 1762, 1761, 1764, 1769, 1775, 1778,11109, 1786, 1782,
+ 1787, 1808, 1797, 1820, 1809, 1821, 1794, 1805, 1817, 1826,
+ 1816, 1822, 1814, 1844, 1831, 1839, 1845, 1840, 1855, 1843,
+ 1841, 1857, 1856, 1869, 1864, 1870, 1877, 1867, 1872, 1920,
+ 11109, 1878, 1882, 1880, 1904, 1891, 1906, 1900, 1925, 1945,
+ 1917, 1937, 1941, 1949, 1970, 1956, 1963, 1977, 1951, 1966,
+ 1981, 1967, 1987, 1976, 1983, 1984, 2004, 1993, 1892, 2011,
+ 2008, 2002, 2009, 1918,11109, 2013, 2014, 2026, 2029, 1922,
+ 2015, 2019, 2018, 2035, 2001, 2032, 2040, 2051, 2050, 2064,
+ 2041, 2061, 2070, 2076, 2060, 2078, 2080, 2067, 2081, 2075,
+
+ 2068, 2093, 2082, 2097, 2103, 2088, 2123, 2101, 2117, 2121,
+ 158, 2106, 2126, 2129, 2137, 2140, 2116, 2115, 2133, 2135,
+ 2142, 2132, 2144, 2154, 2150, 2143, 2149, 2169, 2159, 2160,
+ 2171, 2165, 2184, 2174, 2190, 2170, 2178, 2198, 2187, 2192,
+ 2193, 2163, 2204, 2207, 2234, 2205, 2226, 2211, 2212, 2217,
+ 2236, 2233, 2243,11109, 2248, 2250, 2249, 2261, 2262, 2266,
+ 2264, 2273, 2268, 2272, 2275, 2270, 2291, 2286, 2224, 2292,
+ 2285, 2298, 2294, 2293, 2300, 2313, 2312, 2331, 2323, 2332,
+ 2338, 2325, 2342, 2339, 2328, 2333, 2334, 2349, 2351, 2337,
+ 2352, 2358, 2360, 2355, 2362, 2361, 2391, 2379, 2382, 2393,
+
+ 2388, 2381, 2387, 2394, 2383, 2401, 2404, 2409, 2430, 2422,
+ 2423, 2419, 2442, 2440, 2420, 2450, 2436, 2451, 2437, 2438,
+ 2463, 2466, 2467, 2468, 2449, 2469, 2462, 2472, 2476, 2474,
+ 2478, 2504, 2494, 2475, 2490, 2498, 2508, 2503, 2502, 2513,
+ 2524, 2515, 2511, 2526, 2538, 2539, 2542, 2536, 2548, 2545,
+ 2560, 2553, 2551, 2563, 2565, 2571, 2566, 2577, 2568, 2592,
+ 2595, 2598, 2583, 2597, 2606, 2594, 2608, 2604, 2603, 2609,
+ 2619, 2625, 2479, 2636, 2640, 2644, 2633, 2642, 2634, 2650,
+ 2645, 2635, 2654, 2657, 2687, 2668, 2670,11109, 2669, 2550,
+ 2671, 2672, 2685, 2682, 2676, 2684, 2696, 2709, 2697, 2700,
+
+ 2695, 2683, 2698, 2744,11109, 2715,11109,11109, 759, 2714,
+ 11109,11109, 2711, 2727,11109, 2721, 2745, 2741, 2758, 2748,
+ 2754, 2760, 2773, 2768, 2775, 2772, 2742, 2819, 2777, 2798,
+ 2785, 2787, 2814, 2783, 2824, 2822, 2790, 2830, 2841, 2834,
+ 2812, 2767, 2836, 2851, 2845, 2861, 2868, 2870, 2871, 2872,
+ 2873, 2878, 2864, 2862, 2886, 2865, 2887, 2901, 2883, 2900,
+ 2896, 2904, 2893, 2907, 2910, 2897, 2931, 2924, 2930, 2940,
+ 11109, 2927, 2943, 2921, 2928, 2933, 2946, 2945, 2949, 2958,
+ 2956, 2955, 2964, 2965, 2951, 2960, 2957, 2966, 2977, 2972,
+ 2976, 2970, 2982, 3000, 2996, 2999, 3010, 3016, 2997, 2993,
+
+ 11109, 3008, 3009, 2995, 3014, 3020, 3021, 3028, 3033, 3026,
+ 3024, 3041, 3046, 3066, 3048, 3053, 3055, 3044, 3060, 3061,
+ 3056, 3081,11109, 3076, 3064, 3073, 3090, 3077, 3097, 3052,
+ 3086, 3087, 3096, 3101, 3103, 3111, 3100, 3112, 3125, 3123,
+ 3122, 3119, 3121, 3127, 3138, 3139, 3137, 3150, 3156, 3153,
+ 3143, 3148, 3149, 3152, 3161, 3164, 3166, 3174, 3175, 3178,
+ 3197, 3184, 3202, 3189, 3180, 3209, 3211, 3206, 3196, 3208,
+ 3212, 3205, 3213, 3223, 3224, 3231, 3225, 3232, 3236, 3229,
+ 3246, 3230, 3241, 3255, 3261, 3267, 3251, 3265, 3270, 3258,
+ 3263, 3259, 3284, 3276,11109, 3275, 3286, 3305,11109, 3296,
+
+ 3294, 3291, 3344, 3310, 3316, 3321, 3330, 3324, 3304, 3354,
+ 3341, 3335, 3352, 3362, 3356, 3369, 3364, 3376, 3391, 3383,
+ 3394, 3389, 3379, 3388, 3378, 3387, 3405, 3403, 3415, 3417,
+ 3422, 3418, 3429, 3404, 760, 3438, 3421, 3432, 3434, 3479,
+ 3428, 3436, 3448, 3445, 3463, 3468, 3461, 3467, 3470, 3488,
+ 3455, 3484, 3494, 3465, 3504, 3506, 3501, 3500, 3517, 3520,
+ 3477, 3530, 3521,11109, 3522, 3536, 3523, 3546, 3527, 3528,
+ 3547, 3537,11109, 3544, 3549, 3543, 3565, 3563, 3562, 3570,
+ 3557, 3568, 3586, 3571, 3576, 3584, 3585, 3590, 3583, 3606,
+ 11109, 3589,11109, 3608, 3599, 3603, 3602, 3611, 3612, 3610,
+
+ 3618, 3625, 3637, 3638,11109,11109, 3639, 3645, 3632, 3646,
+ 3630, 3653, 3651, 3661, 3662,11109, 3663, 3686,11109, 3681,
+ 3668, 3688, 3670, 3672, 3677, 3687, 3678, 3703, 3702, 3705,
+ 3704, 3706, 3707, 3720, 3712,11109, 3727, 3732, 3715, 3733,
+ 3740, 3721, 3741, 3751, 3752, 3734,11109, 3760, 3742, 3764,
+ 3753, 3776, 3775, 3772, 3768, 3779, 3787, 3771, 3773, 3784,
+ 3791, 3783, 3795, 3810, 3812, 3815, 3819, 3817, 3821, 3822,
+ 11109, 3823, 3807, 3809, 3832, 3830, 3833, 3831, 3834, 3836,
+ 3827, 3846, 3861, 3863, 3858, 3870, 3853, 3862, 3857, 3882,
+ 3883, 3872, 3881, 3879, 3885, 3880, 3888, 3893, 1348, 3898,
+
+ 3896, 3899, 3892,11109, 3903, 3915, 3928, 3921, 3930, 3931,
+ 3913, 115, 3920, 3926, 3925, 3945, 3956, 3939, 3946, 3947,
+ 3944, 3964, 3961, 3955, 3959, 3971, 3977, 3973, 3966, 3981,
+ 3982, 3974, 3991, 3996, 4004, 3997, 3994,11109, 3990, 4001,
+ 4016, 4018, 4007, 4014, 4024, 4026, 4044,11109, 4028, 4034,
+ 4043, 4050, 4057, 4051, 4066, 4053, 4056, 4059,11109, 4062,
+ 4078, 4076, 4071, 4077, 4086, 4091, 4087,11109, 4081, 4105,
+ 4107, 4096, 4114, 4113, 4111, 4115, 4121, 4126, 4146, 4135,
+ 4144, 4140, 4137, 4133, 4141, 4155, 4160, 4163, 4084, 4108,
+ 4164, 4171, 4177, 4170, 4181, 4176, 4169, 4185, 4204, 4186,
+
+ 11109, 4210, 4199, 4201, 4209, 4198, 4207, 4219, 4220, 4235,
+ 4221, 4225, 4216, 4237, 4267, 4242, 4251, 4254, 4256, 4265,
+ 4269, 4252, 4258, 4266, 4284, 4300, 4283, 4305, 4309, 4288,
+ 4302, 4282, 4296, 4315, 4310, 4323, 4317, 4307, 4333, 4329,
+ 4332, 4330, 4335, 4348, 4341, 4373, 4353, 4347, 4368, 3439,
+ 4365,11109, 4359, 4356, 4357, 4379, 4385, 4407, 4390, 4392,
+ 4383, 4403, 4409, 4402, 4406, 4412, 4413, 4418, 4414, 4410,
+ 4435, 4430, 4441, 4433, 4439, 4449, 4437, 4426, 4454, 4326,
+ 4450, 4461, 4458, 4467,11109, 4476, 4475, 4468, 4482, 4472,
+ 4473, 4484, 4488, 4492, 4477, 4496, 4500, 4501, 4485, 4509,
+
+ 4507, 4502, 4513, 4525, 4524, 4529, 4520,11109, 4532, 4527,
+ 4528, 4534, 4536, 4540, 4556, 4565, 4568, 4569, 4572, 4575,
+ 4558, 4578, 4579, 4577,11109, 4548, 4551, 4582, 4583, 4594,
+ 4599, 4593, 4605, 4618, 4602, 4603,11109, 4614, 4606, 4615,
+ 4613, 4607, 4621, 4636, 4641, 4631, 4642,11109, 4643, 4645,
+ 4646, 4651, 4652, 4647, 4649, 4648, 4663, 4676, 4664, 4670,
+ 4678, 4680, 4682, 4698, 4679, 4694,11109, 4691, 4687, 4703,
+ 4720, 4706, 4704, 4709, 4705, 4723, 4727, 4744, 4726, 4732,
+ 4741,11109, 4746, 4753, 4737, 4763, 4747, 4751, 4765, 4762,
+ 4776, 4780, 4768, 4771, 4782, 4779,11109, 4774, 4778, 4784,
+
+ 4815, 4793, 4801, 4798, 4805, 4809, 4806, 4808, 4820, 4823,
+ 4824, 4818, 4825, 4833, 4826, 4841, 4842, 4849, 4846, 4861,
+ 4848, 4865, 4851, 4876, 4884, 4885, 4858, 4880, 4887, 4888,
+ 4875, 4879, 4890, 4889, 4898, 4901, 4904, 4918,11109, 4909,
+ 4906, 4914, 4902, 4912, 4916, 4927, 4928, 4925, 4929, 4936,
+ 4943, 4945, 4939, 4973, 4979, 4956, 4957, 4963, 4961, 4962,
+ 4969, 4987, 4974, 4975, 4976, 5002, 5004, 4997, 4990, 4984,
+ 4986, 5003, 5006, 5017, 5021, 5008, 5019, 5013, 5022, 5024,
+ 5026, 5020, 5035, 5042, 5037, 5055, 5044, 5047, 5048, 4934,
+ 5067, 5068, 5072, 5064, 5065, 5069, 5075, 5095,11109, 5071,
+
+ 5083, 5103, 5091, 5092, 5093, 5111, 5116, 5122, 5110, 5113,
+ 5128, 5124, 5123, 5130, 5138, 5141, 5133, 5143, 5137, 5144,
+ 11109, 5148,11109, 5150, 5146, 5157, 5171, 5151, 5154,11109,
+ 5176,11109, 5177, 5179, 5175, 5181, 5184,11109, 5185, 5189,
+ 5193, 5178, 5199, 5194, 5202, 5204, 5209, 5218, 5216, 5214,
+ 5231, 5224, 5220, 5227, 5236, 5229, 5247, 5239, 5244, 5259,
+ 5252, 5268, 5266, 5257, 5271, 5251, 5263, 5274, 5279, 5284,
+ 5287,11109, 5281, 5307, 5293, 5300, 5310, 5289, 5299, 5304,
+ 5302, 5311, 5308, 5319, 5323, 5331, 5327, 5334, 5337, 5338,
+ 5340, 5343, 5344, 5351, 5342, 5370, 5368, 5380, 5361, 5382,
+
+ 5371,11109, 5365, 5385, 5374, 5375, 5386, 5384,11109, 5399,
+ 5392, 5395, 5409, 5400, 5397, 5413, 5402, 5424, 5412, 5421,
+ 5418, 5441, 5439, 5445, 5443,11109, 5440, 5448, 5429, 5455,
+ 5461, 5460, 5468, 5469, 5473, 5482, 5489, 5474, 5486, 5466,
+ 5476, 5480, 5477, 5495, 5507, 5513, 5517, 5487, 5520, 5500,
+ 5524, 5528, 5525, 5514, 5511, 5518, 5516, 5519, 5522, 5534,
+ 5540, 5546, 5543, 5538, 5551, 5552, 5565,11109, 5562, 5570,
+ 5563, 5588, 5557, 5569, 5566, 5573, 5599, 5604, 5597,11109,
+ 5594, 5590, 5603, 5595, 5615, 5596, 5613, 5601, 5618, 5630,
+ 5626, 5637, 5646, 5632,11109, 5645,11109, 5643, 5624, 5647,
+
+ 5619, 5656, 5657, 5662, 5664, 5678, 5666, 5671, 5676, 5692,
+ 5683, 5674, 5694, 5685, 5684, 5693, 5696, 5716, 5706, 5705,
+ 5721, 5709, 5711, 5717, 5722, 5729, 5726, 5723, 5751, 5749,
+ 5746,11109,11109, 5734, 5742, 5762, 5765, 5755, 5761, 5774,
+ 5776, 5784, 5767, 5782, 5787, 5786, 5790, 5821,11109, 5798,
+ 5800, 5797, 5817, 5814, 5831, 5811, 5830, 5836, 5832, 5826,
+ 5838, 5839,11109, 5823, 5827, 5846, 5841, 5848, 5868, 5856,
+ 11109, 5854,11109, 5857, 5859, 5863, 5872, 5864, 5870, 5881,
+ 5883, 5887, 5888, 5897, 5901, 5890, 5898, 5909, 5903, 5913,
+ 5906, 5905, 5915, 5918, 5924, 5925, 5919, 5928, 5929,11109,
+
+ 5931, 5939, 5950, 5930, 5940, 5943, 5958, 5956, 5946,11109,
+ 5975,11109, 5961, 5967, 5977, 5970, 5964, 5984, 5974, 5983,
+ 5981, 5998, 6007, 5999, 6008, 6002, 6010, 6006, 6019, 6001,
+ 11109, 6004, 6016, 6024, 6020, 6031, 6046, 6038, 6050, 6034,
+ 6055,11109, 6051, 6065, 6047, 6057, 6069, 6067, 6058, 6073,
+ 6068, 6079, 6064, 6083, 6085, 6082, 6100, 6081, 6092, 6096,
+ 6102, 6113, 6098, 6131, 6110, 6106, 6120, 6129, 6123,11109,
+ 6125, 6127, 6132, 6137, 6140, 6155, 6158, 6138, 6161, 6169,
+ 6156, 6175, 6178, 6165, 6168, 6170, 6177, 6190, 6195, 6197,
+ 11109, 6198, 6192, 6203, 6184, 6204, 6187, 6205, 6215, 6206,
+
+ 6218, 6220, 6213, 6217, 6224, 6236, 6242, 6244, 6251, 6245,
+ 6234, 6248, 6240, 6253, 6262, 6263, 6267, 6268,11109, 6297,
+ 6284, 6281, 6250, 6277, 6287, 6304, 6294, 6285, 6286, 6306,
+ 6290, 6317, 6299, 6300, 6327, 6320, 6335, 6321,11109,11109,
+ 6336, 6312, 6329,11109, 6331, 6330, 6347, 6333, 6334, 6339,
+ 6359, 6348, 6355, 6364, 6363, 6357, 6375, 6373, 6361, 6365,
+ 11109, 6390, 6384, 6398, 6374, 6388, 6409, 6403,11109, 6393,
+ 6411, 6407, 6408, 6410, 6414, 6404, 6399, 6420, 6415, 6425,
+ 6426, 6422, 6432, 6462, 6431, 6466, 6445, 6449, 6459,11109,
+ 6447, 6446, 6472, 6469, 6454, 6461, 6470,11109, 6481, 6483,
+
+ 6497, 6476, 6475, 6501, 6504, 6511, 6505, 6517, 6499, 6508,
+ 6510, 6514, 6503, 6525, 6531, 6538, 6535, 6539, 6550, 6544,
+ 6534, 6558, 6556,11109, 6561, 6552, 6547, 6564, 6573,11109,
+ 6575, 6598, 6581,11109, 6594, 6577, 6587, 6589, 6604,11109,
+ 6593, 6602, 6595, 6608, 6585, 6616, 6591, 6620, 6611, 6612,
+ 6623, 6622, 6625, 6619, 6615,11109, 6636, 6637, 6650,11109,
+ 6657, 6658, 6659, 6662, 6664, 6666, 6663, 6652, 6649, 6675,
+ 6668, 6673, 6691, 6671,11109, 6676, 6699,11109, 6701, 6702,
+ 6688, 6698, 6711,11109, 6705, 6707, 6708, 6714, 6718, 6715,
+ 6716, 6746, 6723, 6731, 6743, 6735, 6736, 6756, 6754, 6761,
+
+ 6739, 6758, 6747, 6750,11109, 6788, 6772, 6766, 6786, 6776,
+ 6770, 6792, 6793, 6783, 6802, 6798,11109,11109, 6806,11109,
+ 6809, 6808, 6810, 6814,11109, 6825, 6828, 6819, 6827, 6820,
+ 6816, 6835, 6832, 6856, 6852,11109, 6858, 6862,11109, 6838,
+ 6864, 6869, 6854, 6859, 6851, 6855, 6871, 6883, 6853, 6882,
+ 6891, 6889, 6893, 6880, 6899, 6897, 6922, 6900, 6934,11109,
+ 6918, 6902, 6916, 6914, 6924, 6927, 6941, 6943, 6939,11109,
+ 6951, 6955, 6954, 6968, 6969,11109,11109, 6970,11109, 6967,
+ 6978, 6950, 6986, 6971, 6981, 6965, 6982,11109, 6989, 6993,
+ 7004, 6984, 7014, 7020,11109, 7016, 7018, 7006, 7008, 7005,
+
+ 7032, 7031, 7017, 7027, 7060, 7034,11109, 7037, 7048, 7053,
+ 7040, 7067, 7059, 7057, 7051, 7078, 7069, 7075, 7058, 7084,
+ 7092, 7082, 7079, 7087, 7089, 7098, 7105, 7094,11109, 7109,
+ 7111, 7122, 7121, 7131, 7116, 7132, 7117,11109, 7133, 7118,
+ 7147, 7148,11109, 7149, 7157, 7145, 7161, 7160, 7164, 7167,
+ 7170, 7168, 7169, 7175, 7194,11109, 7188, 7189, 7187, 7198,
+ 7206, 7209, 7204,11109,11109, 7213,11109, 7202, 7214, 7224,
+ 7225, 7217, 7238, 7171, 7241, 7248, 7235, 7236, 7252, 7249,
+ 7244, 7245, 7258,11109, 7267, 7263, 7266, 7296, 7272, 7294,
+ 7270,11109, 7284, 7275,11109, 7281,11109, 7280, 7291, 7298,
+
+ 7305, 7307, 7310, 7311, 7302, 7299,11109, 7329, 7325, 7315,
+ 7322, 7344, 7346, 7343, 7355,11109, 7347, 7333, 7357, 7339,
+ 11109, 7338, 7364, 7354, 7368, 7371, 7367, 7373, 7372, 7374,
+ 7375, 7387, 7401, 7393, 7402, 7391, 7395, 7399, 7403, 7404,
+ 7406, 7400, 7419, 7425,11109, 7431, 7422, 7424, 7426, 7432,
+ 7430, 7442, 7435, 7448, 7444, 7452, 7468,11109, 7458,11109,
+ 7463, 7453, 7471, 7472, 7464, 7478, 7481, 7490, 7483, 7482,
+ 7475, 7494, 7511, 7497, 7513, 7514, 7503, 7504, 7509, 7524,
+ 11109, 7526, 7531, 7520, 7536, 7545, 7529, 7543, 7539,11109,
+ 7555, 7541, 7547, 7538, 7548, 7569, 7559, 7573, 7558, 7579,
+
+ 7565, 7584, 7583, 7590, 7577, 7586, 7592, 7581, 7597, 7585,
+ 7582,11109, 7609, 7602, 7596, 7621, 7612, 7622, 7625, 7629,
+ 7634, 7633, 7618, 7628, 7636,11109, 7651, 7648, 7644, 7645,
+ 11109, 7626, 7653, 7624, 7654, 7672, 7679, 7663, 7678, 7680,
+ 7670, 7686,11109, 7688, 7671, 7693, 7675, 7690, 7703, 7677,
+ 7696, 7723, 7716, 7727, 7735,11109, 7731, 7720, 7734, 7736,
+ 7737, 7719, 7747, 7746, 7748, 7765, 7750,11109, 7773, 7774,
+ 7780, 7766, 7745, 7788, 7768, 7771, 7793, 7791, 7794, 7777,
+ 7797, 7787, 7805, 7800, 7813, 7819, 7821, 7817, 7816, 7824,
+ 7829,11109, 7814,11109, 7815, 7836, 7837, 7844, 7858, 7839,
+
+ 7851, 7860, 7846, 7849, 7848,11109, 7863, 7866, 7883, 7873,
+ 7875, 7880, 7890, 7886,11109, 7887, 7876, 7893, 7900,11109,
+ 7901, 7916, 7902, 7911, 7905, 7924, 7930, 7932,11109, 7934,
+ 7937, 7931, 7942, 7946, 7935, 7945, 7938, 7953, 7943, 7960,
+ 7949, 7965, 7951, 7961, 7972,11109, 7979, 7981, 7985, 7986,
+ 7989, 7987, 7988, 7978, 7999, 7990, 8006,11109, 7995, 8008,
+ 8009, 8011, 7993, 8033, 8012, 8035, 8014, 8036, 8043, 8046,
+ 8027, 8030, 8034, 8060, 8054, 8050,11109, 8039, 8052, 8077,
+ 8057, 8088, 8078, 8083,11109, 8080,11109, 8076, 8079, 8095,
+ 8091, 8097,11109, 8105, 8084, 8111, 8074, 8118,11109,11109,
+
+ 8124, 8102, 8121, 8130, 8122,11109,11109, 8134,11109, 8125,
+ 11109, 8123, 8120,11109,11109, 8135, 8127, 8138, 8145,11109,
+ 8154, 8163, 8142,11109, 8144,11109, 8178, 8155, 8173, 8160,
+ 8157, 8172,11109, 8169, 8182, 8180, 8186, 8189,11109, 8181,
+ 8201, 8205, 8196, 8199, 8203,11109, 8194, 8219, 8212, 8208,
+ 8223, 8202,11109, 8230, 8233, 8229, 8235, 8239, 8238, 8247,
+ 8257, 8241, 8249, 8260, 8262, 8244, 8261, 8268, 8277, 8270,
+ 8283, 8292, 8293, 8284, 8299, 8280, 8297, 8304, 8308, 8312,
+ 8291, 8294, 8310, 8307, 8317, 8290, 8315, 8324, 8345, 8346,
+ 8336, 8348, 8340, 8349, 8341, 8330, 8354, 8335, 8344, 8358,
+
+ 8351, 8361, 8363, 8372, 8371, 8342, 8380, 8386, 8385, 8374,
+ 8398, 8390, 8403, 8399, 8391, 8405,11109, 8410, 8387, 8412,
+ 8433, 8415, 8417, 8442, 8427, 8443, 8444, 8446, 8450, 8451,
+ 11109,11109,11109, 8455,11109, 8457, 8435, 8463, 8462, 8471,
+ 11109, 8467, 8470, 8469, 8472, 8484, 8475, 8498, 8483, 8489,
+ 8494, 8504,11109, 8502, 8509, 8510, 8501, 8508, 8526,11109,
+ 8529, 8540, 8525, 8527, 8528, 8534, 8532, 8530, 8531, 8544,
+ 8550, 8558, 8556, 8564, 8566, 8559, 8570, 8572,11109, 8580,
+ 8581, 8587, 8574, 8576, 8583, 8585, 8586, 8590, 8584, 8582,
+ 8596, 8606, 8607, 8609, 8608, 8619, 8630, 8637, 8636, 8639,
+
+ 11109, 8621,11109, 8633, 8622, 8644, 8634, 8645, 8653, 8647,
+ 8655, 8643,11109,11109, 8658, 8666, 8683, 8676, 8672, 8670,
+ 8690, 8680, 8677, 8694,11109, 8681, 8697, 8689, 8702, 8701,
+ 8707,11109, 8711, 8709, 8710, 8708, 8723, 8721, 8732,11109,
+ 8728, 8733, 8739, 8744, 8746, 8737, 8749, 8747, 8753, 8759,
+ 8751, 8757, 8761,11109, 8760,11109,11109,11109, 8764, 8773,
+ 8771, 8785, 8783, 8784, 8786, 8792, 8794, 8798, 8795, 8809,
+ 8790,11109, 8806,11109,11109, 8810,11109, 8811, 8800, 8813,
+ 8823, 8820, 8826, 8836,11109, 8833,11109, 8841, 8847, 8834,
+ 8851, 8854, 8850, 8842, 8859, 8853, 8865, 8860, 8878, 8870,
+
+ 8871, 8875, 8880, 8890, 8879,11109, 8899, 8881, 8898, 8901,
+ 8904,11109,11109, 8905, 8909, 8908, 8919, 8916, 8924, 8920,
+ 8938, 8933, 8935, 8930, 8926, 8936, 8928, 8947, 8955, 8953,
+ 8942, 8952,11109, 8963, 8967, 8956,11109, 8961,11109, 8979,
+ 8982, 8986, 8971, 8965, 8966, 8968, 8995, 8992, 8999, 9002,
+ 11109,11109, 8990, 9015, 9006,11109,11109, 9005, 9000, 9011,
+ 9017, 9021, 9018, 9022,11109, 9028, 9034, 9039, 9035, 9044,
+ 9042, 9046, 9055,11109, 9045,11109, 9056, 9061, 9054, 9064,
+ 9080, 9083, 9066, 9068, 9084, 9090, 9088, 9072, 9093,11109,
+ 9091, 9081,11109, 9107, 9101, 9102, 9087, 9095, 9119, 9111,
+
+ 11109, 9129, 9117,11109, 9137, 9116, 9140, 9141,11109, 9142,
+ 9143, 9144, 9136,11109, 9148,11109, 9131, 9150, 9153, 9159,
+ 9161,11109, 9163, 9164, 9167, 9178,11109, 9181, 9185, 9189,
+ 9190, 9182, 9186,11109, 9196, 9180,11109, 9177, 9201, 9202,
+ 9215, 9204, 9218, 9208, 9209, 9220, 9237, 9233, 9235,11109,
+ 11109, 9243, 9238, 9242, 9244, 73, 9255, 9217, 9231, 9232,
+ 9247, 9261, 9262, 9268, 9248, 9277, 9272,11109,11109, 9278,
+ 11109, 9276, 9282,11109, 9265, 9288, 9286, 9279, 9289, 9275,
+ 9299, 9308, 9298, 9313, 9325, 9315, 9311, 9323,11109, 9337,
+ 9339, 9314, 9343, 9344, 9346, 9350, 9352, 9358, 9349, 9356,
+
+ 9342, 9341, 9366, 9368, 9376, 9371, 9379, 9378, 9377, 9380,
+ 9392,11109, 9391, 9396, 9398, 9395, 9399, 9407, 9411, 9402,
+ 11109, 9415, 9414, 9430, 9426,11109, 9432, 9424, 9427, 9435,
+ 9437, 9440,11109, 9434, 9444, 9445, 9451, 9441, 9447, 9454,
+ 9460, 9463, 9485,11109, 9457, 9477, 9484,11109, 9474,11109,
+ 11109,11109, 9464, 9494, 9481,11109, 9498, 9491, 9482, 9496,
+ 11109, 9499, 9500, 9497, 9508, 9516,11109,11109,11109, 9492,
+ 9515, 9521,11109, 9509, 9536,11109, 9525,11109, 9518,11109,
+ 9533, 9535, 9545, 9541,11109, 9544, 9547,11109, 9542, 9557,
+ 9564, 9581,11109, 9554, 9559, 9575, 9574, 9567, 9569, 9571,
+
+ 9573, 9588,11109, 9584, 9594, 9598, 9595, 9586, 9606, 9602,
+ 9619, 9609, 9611, 9607, 9628,11109, 9631, 9634, 9636, 9642,
+ 9621, 9622, 9629,11109, 9633,11109, 9647,11109, 9652, 9659,
+ 9660, 9671, 9667, 9661, 9662, 9670, 9679, 9663, 9687, 9690,
+ 9686, 9694, 9689, 9682, 9693, 9700,11109,11109, 9701, 9709,
+ 11109, 9718, 9725, 9726,11109, 9708,11109, 9730,11109, 9716,
+ 9717,11109, 9735, 9721, 9736,11109,11109, 9731, 9727, 9746,
+ 9743, 9738, 9749, 9750,11109, 9765, 9757, 9753, 9760, 9775,
+ 11109, 9784,11109, 9763, 9786, 9780,11109,11109, 9767, 9774,
+ 9791, 9795, 9782, 9788, 9804, 9792, 9805, 9801, 9811, 9798,
+
+ 9822, 9806, 9820, 9824, 9836, 9825, 9839, 9843, 9844,11109,
+ 11109,11109, 9847, 9835, 9837, 9849, 9848, 9858, 9862, 9873,
+ 9860,11109, 9872, 9879, 9875, 9864, 9893, 9891, 9890,11109,
+ 9884, 9876, 9870, 9885, 9901, 9897, 9899, 9904,11109, 9914,
+ 9919, 9927, 9924, 9918, 9925, 9933, 9934, 9937, 9935, 9938,
+ 9926, 9921, 9954, 9945,11109,11109, 9955, 9942,11109, 9963,
+ 9967,11109,11109, 9949,11109, 9948, 9951, 9960, 9961, 9985,
+ 11109, 9980, 9965, 9974, 9975,11109, 9976, 9990, 9984, 9998,
+ 10000,11109, 9987,10013, 9995,10002,10014,10023,11109,11109,
+ 10003,10009,11109,10033,10029,10025,10040,10026,10035,10037,
+
+ 10042,11109,10048,11109,10045,10052,10051,10053,10054,10065,
+ 10070,10067,10081,11109,10075,10069,10079,10091,11109,10089,
+ 10074,10102,10100,10098,11109,10108,10104,10096,10117,11109,
+ 10112,10125,10123,11109,11109,11109,10133,10137,10138,11109,
+ 11109,11109,10126,11109,10143,10140,10135,10156,11109,10146,
+ 11109,11109,10157,10176,10178,10158,10180,10162,11109,10177,
+ 10181,10171,10168,10173,11109,11109,10191,10193,10172,10195,
+ 10196,10197,10184,10205,11109,11109,10185,10199,10212,10218,
+ 10219,11109,10213,10228,10233,10235,10232,10243,10236,10247,
+ 10248,10229,10249,10245,10257,10285,10254,10261,10252,10262,
+
+ 10268,10277,10271,10287,10297,10293,10301,10302,10288,10300,
+ 11109,11109,10306,10294,11109,10307,10309,11109,10298,11109,
+ 10311,10319,10322,10323,11109,10331,10337,10339,10340,10315,
+ 11109,10335,10347,11109,10348,10342,10343,10332,11109,10338,
+ 10354,10357,10356,10345,10350,10361,10384,10374,10389,11109,
+ 10377,10391,11109,11109,11109,10388,10378,10394,10372,10401,
+ 10390,11109,10403,10399,10395,10405,10412,10416,10411,11109,
+ 10435,10433,11109,11109,10436,10429,11109,10445,11109,10421,
+ 10430,11109,11109,11109,11109,11109,11109,11109,11109,10448,
+ 10449,11109,11109,10438,10455,10459,10464,11109,10466,11109,
+
+ 10458,10461,10479,10467,10469,11109,10475,11109,10495,10476,
+ 10490,10493,10502,10485,10491,10494,10486,10497,10514,10508,
+ 10521,10528,10511,10534,10519,10531,10542,10525,10545,10529,
+ 10546,11109,11109,11109,11109,10548,10557,10553,10556,10576,
+ 10554,10563,10558,10582,10587,10569,10571,10590,10589,10592,
+ 10574,10585,10607,10596,10601,10603,10605,10602,10611,10625,
+ 10631,11109,10633,10621,10620,10641,11109,10627,10632,11109,
+ 10626,10628,11109,11109,10644,10655,10637,10638,10666,10667,
+ 10660,10662,10659,10671,10679,11109,10680,11109,11109,11109,
+ 11109,10664,10661,11109,10682,10690,10683,10688,11109,10677,
+
+ 10695,10694,10698,10701,10710,10715,10725,10716,11109,11109,
+ 10712,10717,10726,11109,10722,10733,10741,10723,10747,10749,
+ 10750,10756,10744,10739,11109,10751,10759,10765,10752,11109,
+ 10776,10766,10760,10777,10779,10774,10781,10782,11109,10783,
+ 11109,10794,10789,10793,10808,10809,10811,10804,10814,10819,
+ 10820,10835,11109,10792,10836,10829,10842,10849,10847,10827,
+ 10840,10853,10858,10860,10866,10871,10874,10875,10864,10867,
+ 10869,11109,11109,10873,10870,11109,10879,10885,10886,10895,
+ 10902,11109,10904,10899,10900,10906,10920,10916,11109,10921,
+ 10924,10928,11109,10931,11109,11109,10932,10925,10930,10938,
+
+ 10939,11109,11109,11109,10989,10996,11003,11010,11017,11024,
+ 11031, 100,11038,11045,11052,11059,11066,11073,11080,11087,
+ 11094,11101
} ;
-static const flex_int16_t yy_def[3834] =
+static const flex_int16_t yy_def[3923] =
{ 0,
- 3815, 1, 3816, 3816, 3817, 3817, 3818, 3818, 3819, 3819,
- 3820, 3820, 3821, 3821, 3822, 3822, 3815, 3823, 3815, 3815,
- 3815, 3815, 3824, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3825, 3815, 3815, 3815,
- 3825, 3826, 3815, 3815, 3815, 3826, 3827, 3815, 3815, 3815,
- 3815, 3827, 3828, 3815, 3815, 3815, 3828, 3829, 3815, 3830,
- 3815, 3829, 3829, 3831, 3815, 3815, 3815, 3815, 3831, 3832,
- 3815, 3815, 3815, 3832, 3823, 3823, 3815, 3833, 3824, 3833,
- 3824, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3825, 3825, 3826, 3826, 3827, 3827, 3815, 3828, 3828, 3829,
- 3829, 3830, 3830, 3829, 3831, 3831, 3815, 3832, 3832, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3829, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3829, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3829, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3829, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3815, 3815, 3823, 3823,
-
- 3815, 3815, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3829, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3829, 3829, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3829, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3829, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3829, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3815, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
-
- 3823, 3823, 3815, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3829, 3823, 3815, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3815, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3815, 3815, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3829, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3815, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3829, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823,
- 3823, 3823, 3823, 3815, 3815, 3823, 3815, 3823, 3815, 3823,
- 3823, 3815, 3815, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3829, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3815, 3815,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3815, 3815, 3823, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3829, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3815, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
-
- 3815, 3823, 3823, 3823, 3815, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3815,
-
- 3823, 3823, 3829, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3815, 3823, 3815, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823,
- 3823, 3823, 3815, 3823, 3815, 3815, 3815, 3823, 3823, 3823,
-
- 3815, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3815, 3815, 3815, 3823, 3823, 3823, 3815, 3823, 3823,
- 3815, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823,
- 3815, 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3815, 3823,
-
- 3823, 3815, 3823, 3823, 3823, 3815, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3815, 3823, 3823, 3823, 3815, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3815,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3815, 3823, 3823, 3815, 3823, 3823, 3815, 3815, 3823,
-
- 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3815, 3823, 3823, 3823, 3815, 3815, 3815, 3823, 3823,
- 3823, 3815, 3815, 3815, 3823, 3815, 3823, 3823, 3823, 3823,
- 3815, 3823, 3815, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
- 3815, 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3815, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3815,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3815, 3815, 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3815, 3815,
-
- 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3823, 3823, 3815, 3815, 3823,
- 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823,
- 3815, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3815, 3815, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3815, 3823,
- 3815, 3823, 3815, 3815, 3823, 3823, 3823, 3823, 3823, 3823,
-
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3815, 3815, 3815,
- 3815, 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3815, 3815, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3815, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3815, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823, 3823,
- 3823, 3823, 3823, 3815, 3823, 3823, 3815, 3823, 3823, 3823,
- 3823, 3823, 3815, 3823, 3823, 3823, 3823, 3823, 3823, 3815,
-
- 3823, 3823, 3823, 3815, 3823, 3815, 3815, 3823, 3823, 3823,
- 3823, 3823, 3815, 3815, 0, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815
+ 3904, 1, 3905, 3905, 3906, 3906, 3907, 3907, 3908, 3908,
+ 3909, 3909, 3910, 3910, 3911, 3911, 3904, 3912, 3904, 3904,
+ 3904, 3904, 3913, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3914, 3904, 3904,
+ 3904, 3914, 3915, 3904, 3904, 3904, 3915, 3916, 3904, 3904,
+ 3904, 3904, 3916, 3917, 3904, 3904, 3904, 3917, 3918, 3904,
+ 3919, 3904, 3918, 3918, 3920, 3904, 3904, 3904, 3904, 3920,
+ 3921, 3904, 3904, 3904, 3921, 3912, 3912, 3904, 3922, 3913,
+ 3922, 3913, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3914, 3914, 3915, 3915, 3916, 3916, 3904, 3917,
+ 3917, 3918, 3918, 3919, 3919, 3918, 3920, 3920, 3904, 3921,
+ 3921, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3918, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3918, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3904, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3918, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3918, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3904, 3912, 3904, 3904, 3912, 3912,
+ 3904, 3904, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3918, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3904, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3918, 3918, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3918, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3918, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3904, 3912, 3912, 3912, 3918, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3904,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3918, 3912, 3904, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3904, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3918, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3918, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3904, 3904,
+
+ 3912, 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3904, 3912,
+ 3904, 3912, 3912, 3904, 3904, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3918, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3904, 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3904, 3904, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3904, 3904, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3918, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3904, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3904, 3912, 3912, 3912, 3904, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3904, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3904, 3912, 3912, 3912, 3912, 3918, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3904, 3912,
+ 3904, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3904, 3912, 3904,
+ 3904, 3904, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3904, 3904, 3904, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3904, 3912, 3904, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3904, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3904, 3904, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3904, 3912, 3912, 3912, 3904, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3904, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3912, 3904, 3912,
+ 3912, 3904, 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3904,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3904, 3904, 3904, 3912, 3912, 3912, 3904,
+ 3904, 3904, 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3904, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3904, 3912, 3912, 3904, 3912, 3912, 3904, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3904, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3904, 3904, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3904, 3904, 3912, 3912, 3904, 3912, 3904, 3912,
+ 3912, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3912,
+ 3912, 3904, 3904, 3912, 3912, 3912, 3912, 3904, 3912, 3904,
+
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3904, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3904, 3904, 3904, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3904,
+ 3912, 3912, 3904, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3904, 3912, 3904, 3904, 3904,
+ 3904, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904, 3912,
+
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3904,
+ 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3904,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3904, 3912, 3912, 3904, 3912, 3912, 3912, 3912,
+ 3912, 3904, 3912, 3912, 3912, 3912, 3912, 3912, 3904, 3912,
+ 3912, 3912, 3904, 3912, 3904, 3904, 3912, 3912, 3912, 3912,
+
+ 3912, 3904, 3904, 0, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904
} ;
-static const flex_int16_t yy_nxt[10914] =
+static const flex_int16_t yy_nxt[11176] =
{ 0,
18, 19, 20, 21, 22, 23, 22, 18, 18, 18,
18, 18, 22, 24, 25, 26, 27, 28, 29, 18,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 18, 18, 18, 45, 46,
+ 40, 41, 42, 43, 44, 45, 18, 18, 46, 47,
24, 25, 26, 27, 28, 29, 18, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 18, 18, 18, 45, 48, 49, 50, 48,
- 49, 50, 53, 54, 53, 54, 55, 120, 55, 58,
- 59, 60, 61, 121, 22, 58, 59, 60, 61, 86,
- 22, 64, 65, 66, 64, 65, 66, 87, 161, 161,
-
- 85, 88, 351, 51, 120, 86, 51, 168, 168, 56,
- 121, 56, 171, 75, 76, 77, 78, 62, 22, 75,
- 76, 77, 78, 62, 22, 81, 82, 83, 67, 98,
- 86, 67, 19, 20, 21, 69, 70, 71, 19, 20,
- 21, 69, 70, 71, 81, 82, 83, 122, 109, 178,
- 178, 79, 72, 160, 171, 86, 98, 79, 72, 86,
- 138, 90, 84, 90, 90, 86, 90, 179, 110, 799,
- 73, 86, 90, 86, 122, 109, 73, 426, 87, 72,
- 160, 84, 88, 161, 161, 72, 113, 138, 111, 177,
- 163, 176, 131, 163, 114, 110, 99, 86, 86, 91,
-
- 92, 93, 112, 100, 94, 115, 86, 101, 189, 95,
- 102, 96, 86, 113, 86, 111, 180, 86, 97, 131,
- 174, 114, 86, 99, 86, 168, 168, 92, 93, 112,
- 100, 94, 115, 171, 101, 189, 95, 102, 96, 165,
- 86, 165, 165, 180, 165, 97, 103, 174, 116, 171,
- 104, 117, 182, 105, 183, 106, 107, 301, 118, 85,
- 119, 85, 85, 339, 85, 343, 108, 169, 86, 86,
- 85, 86, 86, 103, 167, 116, 123, 104, 117, 182,
- 105, 183, 106, 107, 124, 118, 181, 119, 127, 86,
- 125, 185, 128, 108, 126, 86, 157, 86, 86, 149,
-
- 158, 150, 86, 123, 159, 186, 129, 166, 130, 86,
- 151, 124, 164, 181, 86, 127, 152, 125, 185, 128,
- 162, 126, 86, 157, 153, 86, 149, 158, 150, 86,
- 491, 159, 186, 129, 154, 130, 132, 151, 155, 156,
- 133, 184, 163, 152, 134, 163, 86, 86, 179, 86,
- 135, 153, 90, 136, 90, 90, 190, 90, 246, 86,
- 137, 154, 86, 132, 198, 155, 156, 133, 184, 86,
- 170, 134, 170, 170, 86, 170, 175, 135, 175, 175,
- 136, 175, 177, 190, 86, 246, 187, 137, 139, 199,
- 173, 198, 140, 85, 202, 85, 85, 86, 85, 188,
-
- 231, 266, 141, 142, 85, 143, 90, 86, 90, 90,
- 86, 90, 86, 187, 86, 139, 199, 90, 176, 140,
- 86, 202, 191, 192, 200, 345, 188, 231, 266, 141,
- 142, 193, 143, 144, 205, 86, 145, 194, 214, 195,
- 171, 86, 201, 146, 91, 196, 197, 147, 148, 191,
- 192, 86, 86, 209, 86, 86, 86, 86, 193, 203,
- 144, 205, 86, 145, 194, 214, 195, 211, 204, 201,
- 146, 213, 196, 197, 147, 148, 206, 207, 210, 230,
- 209, 86, 212, 219, 208, 1254, 203, 86, 169, 86,
- 86, 167, 86, 86, 211, 204, 215, 222, 213, 216,
-
- 221, 229, 86, 206, 207, 210, 230, 220, 86, 212,
- 166, 208, 217, 218, 86, 86, 86, 223, 224, 86,
- 86, 234, 225, 215, 222, 227, 216, 221, 229, 232,
- 228, 238, 235, 86, 220, 164, 233, 236, 226, 217,
- 218, 86, 86, 86, 223, 224, 237, 240, 234, 225,
- 86, 86, 227, 86, 86, 162, 232, 228, 238, 235,
- 239, 1415, 241, 233, 236, 226, 86, 251, 242, 86,
- 86, 86, 243, 237, 240, 245, 247, 248, 244, 86,
- 252, 86, 86, 86, 257, 253, 249, 239, 258, 241,
- 86, 86, 250, 86, 251, 242, 259, 269, 86, 243,
-
- 86, 260, 245, 247, 248, 244, 254, 252, 86, 261,
- 267, 257, 253, 249, 264, 3815, 86, 255, 86, 250,
- 86, 256, 270, 259, 269, 265, 262, 273, 260, 263,
- 86, 271, 268, 254, 86, 86, 261, 267, 86, 274,
- 275, 264, 86, 272, 255, 3815, 277, 86, 256, 270,
- 278, 276, 265, 262, 273, 86, 263, 3815, 271, 268,
- 86, 86, 3815, 86, 3815, 279, 274, 275, 86, 165,
- 272, 165, 165, 277, 165, 178, 178, 278, 276, 170,
- 280, 170, 170, 90, 170, 90, 90, 281, 90, 171,
- 283, 175, 279, 175, 175, 3815, 175, 284, 288, 86,
-
- 285, 282, 86, 286, 86, 290, 291, 280, 293, 86,
- 287, 3815, 289, 86, 86, 86, 292, 283, 86, 86,
- 294, 173, 86, 295, 284, 288, 299, 285, 282, 300,
- 286, 86, 290, 291, 296, 293, 86, 287, 86, 289,
- 297, 86, 298, 292, 86, 310, 311, 294, 86, 323,
- 295, 314, 312, 299, 302, 86, 300, 313, 303, 86,
- 86, 86, 317, 318, 315, 316, 86, 297, 319, 298,
- 86, 86, 310, 311, 321, 304, 323, 86, 314, 3815,
- 324, 3815, 86, 322, 86, 303, 86, 86, 3815, 317,
- 318, 315, 316, 86, 325, 328, 320, 86, 3815, 349,
-
- 86, 321, 304, 305, 86, 86, 86, 324, 306, 326,
- 322, 329, 327, 307, 3815, 330, 3815, 338, 337, 308,
- 309, 325, 328, 320, 86, 86, 86, 336, 86, 340,
- 305, 86, 341, 86, 344, 306, 326, 86, 329, 327,
- 307, 86, 330, 342, 338, 337, 308, 309, 331, 86,
- 350, 332, 346, 333, 336, 86, 340, 3815, 352, 353,
- 3815, 344, 348, 354, 86, 334, 347, 335, 86, 357,
- 342, 355, 86, 358, 86, 331, 356, 350, 332, 3815,
- 333, 359, 86, 3815, 86, 361, 353, 86, 364, 348,
- 86, 86, 334, 347, 335, 86, 86, 360, 355, 365,
-
- 358, 86, 86, 356, 86, 362, 86, 366, 359, 367,
- 368, 369, 361, 371, 363, 364, 370, 372, 86, 86,
- 86, 86, 373, 86, 360, 374, 365, 86, 86, 378,
- 375, 86, 362, 376, 366, 382, 367, 368, 369, 86,
- 371, 363, 381, 370, 383, 377, 384, 86, 3815, 86,
- 86, 86, 374, 379, 380, 386, 86, 375, 86, 385,
- 376, 86, 86, 86, 388, 387, 389, 86, 86, 381,
- 390, 383, 377, 384, 391, 392, 393, 395, 86, 3815,
- 379, 380, 386, 394, 86, 86, 385, 398, 396, 86,
- 86, 399, 387, 3815, 3815, 401, 86, 390, 86, 86,
-
- 403, 402, 392, 393, 86, 404, 86, 405, 400, 86,
- 394, 397, 3815, 86, 406, 171, 86, 407, 399, 86,
- 86, 86, 401, 86, 409, 408, 86, 403, 402, 86,
- 410, 411, 404, 412, 405, 400, 414, 413, 397, 86,
- 416, 406, 415, 418, 407, 419, 86, 417, 421, 422,
- 86, 409, 408, 86, 86, 86, 86, 420, 86, 86,
- 412, 86, 86, 86, 413, 423, 424, 416, 86, 415,
- 418, 425, 419, 427, 417, 421, 86, 428, 3815, 429,
- 437, 86, 86, 430, 420, 431, 434, 3815, 86, 86,
- 433, 86, 423, 424, 86, 438, 3815, 86, 425, 432,
-
- 427, 435, 436, 86, 428, 86, 429, 437, 439, 86,
- 430, 86, 431, 434, 86, 440, 441, 433, 442, 86,
- 86, 86, 443, 447, 448, 445, 432, 86, 435, 436,
- 450, 446, 452, 451, 3815, 439, 454, 86, 86, 444,
- 453, 86, 86, 441, 455, 86, 457, 86, 449, 443,
- 86, 86, 445, 86, 86, 86, 86, 450, 446, 452,
- 451, 456, 86, 454, 458, 459, 444, 453, 86, 86,
- 86, 455, 86, 457, 86, 449, 460, 461, 465, 464,
- 467, 462, 3815, 3815, 3815, 466, 86, 476, 456, 484,
- 513, 458, 459, 475, 86, 86, 86, 477, 463, 3815,
-
- 493, 485, 86, 460, 461, 86, 464, 467, 462, 86,
- 86, 86, 466, 86, 476, 86, 484, 486, 489, 86,
- 475, 492, 86, 490, 477, 463, 468, 86, 485, 487,
- 488, 469, 86, 494, 470, 496, 495, 3815, 502, 471,
- 472, 473, 474, 86, 486, 86, 3815, 86, 492, 86,
- 86, 3815, 497, 468, 86, 503, 487, 488, 469, 3815,
- 494, 470, 496, 495, 86, 86, 471, 472, 473, 474,
- 478, 500, 479, 498, 499, 501, 3815, 86, 504, 497,
- 505, 509, 503, 86, 480, 481, 482, 508, 483, 86,
- 506, 507, 86, 86, 86, 3815, 86, 478, 500, 479,
-
- 498, 499, 501, 86, 86, 504, 86, 505, 509, 86,
- 512, 480, 481, 482, 508, 483, 510, 506, 507, 511,
- 520, 514, 86, 515, 86, 3815, 86, 518, 3815, 519,
- 3815, 521, 516, 3815, 86, 522, 524, 512, 525, 517,
- 527, 523, 526, 510, 533, 3815, 511, 86, 514, 532,
- 515, 86, 86, 86, 518, 86, 519, 86, 521, 516,
- 86, 528, 522, 524, 534, 525, 517, 86, 523, 526,
- 86, 533, 86, 535, 529, 536, 532, 530, 3815, 531,
- 3815, 550, 568, 549, 3815, 86, 552, 569, 528, 577,
- 86, 553, 3815, 579, 86, 3815, 86, 86, 86, 551,
-
- 86, 529, 536, 86, 530, 86, 531, 537, 550, 538,
- 549, 566, 554, 552, 86, 539, 555, 557, 553, 540,
- 579, 86, 572, 86, 541, 86, 551, 542, 171, 567,
- 86, 592, 556, 86, 537, 3815, 538, 3815, 566, 554,
- 86, 3815, 539, 555, 557, 570, 540, 86, 3815, 572,
- 3815, 541, 571, 573, 542, 543, 567, 544, 575, 556,
- 576, 86, 574, 86, 580, 3815, 86, 593, 86, 578,
- 545, 86, 570, 546, 86, 547, 86, 548, 86, 571,
- 573, 86, 543, 586, 544, 575, 581, 576, 3815, 574,
- 86, 580, 582, 86, 593, 3815, 578, 545, 3815, 86,
-
- 546, 583, 547, 3815, 548, 558, 559, 584, 588, 589,
- 586, 591, 595, 581, 587, 560, 561, 562, 563, 564,
- 86, 86, 565, 86, 86, 585, 590, 86, 583, 86,
- 86, 86, 558, 559, 584, 588, 589, 596, 591, 595,
- 594, 587, 560, 561, 562, 563, 564, 86, 86, 565,
- 86, 597, 585, 590, 598, 599, 86, 600, 601, 602,
- 3815, 603, 604, 605, 596, 606, 86, 594, 86, 86,
- 608, 609, 607, 3815, 86, 3815, 86, 3815, 616, 86,
- 613, 598, 599, 86, 600, 86, 3815, 86, 603, 604,
- 605, 1013, 606, 86, 614, 86, 618, 608, 609, 607,
-
- 610, 611, 617, 86, 86, 616, 620, 613, 86, 615,
- 86, 619, 635, 621, 632, 86, 633, 86, 612, 637,
- 86, 614, 86, 618, 650, 86, 86, 610, 611, 617,
- 622, 623, 634, 620, 86, 86, 615, 636, 619, 635,
- 621, 638, 624, 633, 625, 612, 86, 86, 642, 86,
- 641, 86, 639, 3815, 86, 86, 86, 622, 623, 634,
- 640, 3815, 3815, 3815, 636, 644, 646, 3815, 638, 624,
- 86, 625, 626, 86, 86, 642, 645, 641, 647, 639,
- 627, 628, 643, 86, 629, 630, 653, 640, 631, 86,
- 86, 86, 644, 86, 86, 649, 648, 651, 86, 626,
-
- 86, 3815, 652, 645, 655, 647, 656, 627, 628, 643,
- 86, 629, 630, 653, 654, 631, 3815, 659, 663, 86,
- 86, 86, 649, 648, 651, 86, 86, 657, 86, 652,
- 660, 655, 86, 656, 661, 658, 662, 86, 665, 779,
- 664, 654, 86, 86, 659, 663, 86, 666, 667, 668,
- 670, 86, 669, 86, 657, 672, 674, 660, 675, 3815,
- 86, 661, 658, 662, 86, 665, 86, 664, 673, 86,
- 3815, 86, 86, 86, 666, 667, 668, 670, 86, 669,
- 671, 86, 672, 676, 86, 675, 86, 677, 86, 86,
- 678, 679, 680, 681, 682, 673, 86, 683, 86, 686,
-
- 688, 86, 684, 711, 685, 690, 86, 671, 86, 86,
- 676, 86, 86, 86, 677, 86, 687, 678, 679, 680,
- 681, 682, 689, 86, 683, 692, 686, 691, 693, 684,
- 711, 685, 86, 694, 698, 86, 699, 86, 697, 695,
- 701, 700, 696, 687, 702, 86, 86, 86, 86, 689,
- 86, 86, 703, 3815, 691, 693, 707, 86, 86, 86,
- 694, 698, 86, 699, 704, 697, 695, 706, 700, 696,
- 708, 702, 86, 3815, 713, 86, 86, 710, 86, 703,
- 86, 712, 709, 707, 714, 716, 86, 705, 86, 727,
- 3815, 715, 729, 86, 706, 86, 86, 708, 726, 717,
-
- 86, 713, 86, 86, 710, 86, 86, 3815, 712, 709,
- 728, 714, 716, 86, 705, 86, 727, 731, 715, 729,
- 730, 3815, 86, 748, 732, 726, 717, 718, 86, 3815,
- 86, 3815, 719, 733, 720, 86, 736, 728, 739, 86,
- 721, 740, 722, 3815, 731, 723, 724, 730, 86, 86,
- 748, 732, 725, 86, 718, 737, 86, 3815, 734, 719,
- 733, 720, 735, 736, 742, 739, 741, 721, 740, 722,
- 745, 744, 723, 724, 743, 738, 746, 86, 749, 725,
- 86, 86, 737, 86, 86, 734, 747, 3815, 751, 735,
- 86, 753, 750, 741, 86, 752, 86, 745, 744, 754,
-
- 86, 743, 738, 746, 86, 749, 86, 86, 755, 756,
- 758, 86, 759, 747, 86, 751, 757, 86, 753, 750,
- 760, 86, 752, 762, 763, 764, 754, 766, 86, 761,
- 86, 765, 86, 768, 86, 755, 756, 758, 767, 759,
- 771, 86, 86, 757, 86, 86, 3815, 760, 86, 769,
- 762, 763, 764, 86, 171, 770, 761, 86, 765, 86,
- 768, 772, 773, 774, 775, 767, 777, 776, 86, 86,
- 780, 86, 86, 86, 782, 3815, 769, 778, 86, 783,
- 781, 785, 770, 784, 3815, 787, 86, 786, 772, 773,
- 774, 775, 86, 777, 776, 86, 86, 86, 86, 788,
-
- 86, 789, 86, 796, 778, 86, 86, 781, 785, 790,
- 784, 86, 787, 793, 786, 794, 791, 86, 797, 792,
- 795, 86, 798, 800, 86, 86, 788, 86, 789, 801,
- 796, 802, 803, 804, 812, 806, 790, 3815, 805, 808,
- 793, 810, 807, 791, 86, 86, 792, 86, 86, 86,
- 809, 811, 813, 86, 86, 86, 86, 818, 86, 86,
- 814, 812, 806, 86, 86, 86, 808, 815, 810, 807,
- 817, 86, 816, 820, 86, 821, 86, 809, 811, 813,
- 86, 819, 86, 822, 86, 823, 826, 814, 86, 86,
- 824, 825, 86, 86, 815, 831, 86, 817, 86, 816,
-
- 820, 827, 821, 86, 829, 86, 828, 832, 819, 833,
- 822, 3815, 823, 826, 86, 86, 86, 824, 825, 830,
- 3815, 839, 86, 86, 3815, 845, 86, 86, 827, 86,
- 834, 829, 838, 828, 832, 835, 833, 86, 836, 837,
- 840, 86, 841, 844, 846, 3815, 830, 86, 839, 86,
- 842, 843, 845, 86, 86, 3815, 86, 834, 848, 838,
- 3815, 847, 835, 851, 849, 836, 837, 840, 853, 841,
- 844, 86, 86, 86, 852, 854, 86, 842, 843, 86,
- 856, 859, 86, 855, 857, 848, 850, 86, 847, 86,
- 851, 849, 86, 860, 86, 853, 86, 86, 858, 861,
-
- 86, 852, 854, 86, 86, 862, 863, 856, 859, 864,
- 855, 857, 86, 850, 86, 865, 866, 867, 870, 868,
- 860, 86, 3815, 86, 869, 858, 86, 871, 86, 86,
- 877, 86, 862, 863, 872, 876, 864, 86, 875, 86,
- 873, 874, 865, 866, 867, 881, 868, 878, 86, 86,
- 86, 869, 86, 879, 871, 880, 86, 877, 86, 86,
- 883, 872, 876, 882, 884, 875, 86, 86, 86, 86,
- 885, 86, 881, 886, 878, 898, 887, 888, 86, 890,
- 879, 892, 880, 889, 891, 908, 86, 893, 899, 3815,
- 882, 884, 86, 3815, 86, 86, 86, 86, 894, 86,
-
- 886, 86, 86, 887, 888, 895, 900, 86, 892, 901,
- 889, 86, 896, 897, 893, 899, 902, 86, 903, 909,
- 86, 904, 905, 86, 86, 894, 914, 915, 3815, 86,
- 3815, 86, 895, 900, 86, 906, 901, 3815, 916, 896,
- 897, 86, 86, 902, 86, 903, 909, 910, 904, 905,
- 907, 912, 86, 914, 915, 918, 913, 911, 917, 86,
- 923, 919, 906, 86, 920, 916, 86, 86, 86, 86,
- 921, 924, 922, 86, 910, 925, 927, 907, 86, 86,
- 86, 86, 918, 86, 911, 917, 926, 923, 919, 928,
- 929, 920, 931, 935, 86, 930, 932, 921, 924, 922,
-
- 86, 86, 86, 927, 86, 933, 934, 86, 936, 86,
- 3815, 937, 938, 926, 942, 86, 928, 929, 86, 931,
- 86, 939, 930, 932, 86, 86, 3815, 86, 940, 86,
- 3815, 943, 933, 934, 86, 936, 941, 86, 937, 938,
- 86, 942, 944, 945, 86, 946, 947, 3815, 939, 948,
- 3815, 949, 86, 86, 86, 940, 953, 86, 943, 86,
- 950, 951, 954, 941, 952, 956, 3815, 957, 3815, 944,
- 945, 958, 946, 947, 86, 86, 948, 955, 949, 86,
- 86, 86, 86, 953, 959, 86, 961, 950, 951, 954,
- 86, 952, 956, 86, 957, 86, 962, 960, 958, 963,
-
- 86, 970, 964, 965, 955, 86, 86, 969, 968, 966,
- 967, 959, 971, 961, 974, 972, 86, 86, 975, 86,
- 976, 86, 86, 962, 960, 86, 963, 86, 970, 964,
- 965, 86, 86, 86, 969, 968, 966, 967, 973, 971,
- 171, 977, 972, 978, 86, 975, 86, 976, 979, 980,
- 981, 983, 984, 86, 982, 987, 86, 86, 989, 3815,
- 988, 86, 992, 985, 86, 973, 86, 86, 977, 3815,
- 978, 986, 995, 990, 86, 979, 980, 981, 983, 86,
- 86, 982, 996, 3815, 991, 989, 994, 86, 993, 86,
- 985, 86, 86, 86, 86, 86, 86, 86, 986, 995,
-
- 990, 997, 999, 86, 1000, 998, 1001, 3815, 1002, 996,
- 1003, 991, 86, 994, 86, 993, 1020, 86, 1004, 3815,
- 1014, 1015, 1028, 86, 1012, 86, 86, 86, 997, 3815,
- 86, 1000, 998, 1001, 86, 1002, 86, 1003, 1016, 86,
- 1018, 1024, 1019, 1020, 3815, 1004, 1005, 1014, 1015, 1006,
- 1017, 1012, 1021, 1007, 86, 86, 1008, 86, 1022, 86,
- 86, 86, 1023, 1009, 1010, 1016, 1011, 1018, 1024, 1019,
- 1038, 86, 1025, 1005, 1026, 86, 1006, 1017, 3815, 1021,
- 1007, 86, 1077, 1008, 86, 1022, 1041, 86, 86, 1023,
- 1009, 1010, 86, 1011, 1039, 1027, 3815, 1038, 1037, 1025,
-
- 86, 1026, 86, 1040, 1042, 86, 1045, 86, 3815, 86,
- 1046, 3815, 86, 1041, 86, 3815, 3815, 1047, 86, 1043,
- 1048, 1039, 1027, 1029, 1030, 1037, 1031, 3815, 86, 1032,
- 1040, 1042, 86, 1045, 1033, 1044, 1049, 1046, 86, 86,
- 1034, 1035, 86, 1036, 1047, 1050, 1043, 1048, 1055, 86,
- 1029, 1030, 1051, 1031, 1053, 1056, 1032, 1052, 3815, 1054,
- 86, 1033, 1044, 1049, 1057, 1058, 1060, 1034, 1035, 86,
- 1036, 1059, 1050, 1061, 86, 1055, 1062, 86, 3815, 1063,
- 3815, 1053, 1056, 1083, 86, 86, 1054, 86, 86, 1064,
- 86, 1057, 1058, 1060, 86, 86, 1065, 86, 1059, 1067,
-
- 86, 86, 1066, 1062, 1069, 1068, 1063, 86, 1070, 86,
- 1071, 1079, 1072, 3815, 1073, 86, 1064, 86, 1074, 86,
- 86, 1075, 1078, 1065, 86, 86, 1067, 86, 1076, 1066,
- 86, 1069, 1068, 86, 1082, 1070, 86, 1071, 86, 1072,
- 86, 1073, 1080, 1084, 86, 1074, 1085, 1081, 1075, 1078,
- 1086, 1087, 86, 1088, 86, 1076, 86, 86, 1089, 1092,
- 1090, 1082, 1093, 3815, 1091, 1094, 3815, 1095, 3815, 1096,
- 1084, 1098, 1097, 1085, 86, 86, 86, 1086, 86, 1099,
- 1088, 86, 1108, 86, 86, 86, 1092, 1090, 86, 86,
- 86, 1091, 86, 86, 1095, 1100, 1096, 1102, 1098, 1097,
-
- 1101, 1104, 86, 1103, 1107, 1105, 1099, 1106, 86, 86,
- 1109, 86, 1110, 1113, 86, 86, 86, 1111, 1112, 86,
- 86, 1114, 1100, 86, 1102, 1115, 86, 1101, 86, 3815,
- 1103, 86, 1105, 86, 1106, 86, 86, 1109, 1116, 1110,
- 1113, 1118, 1117, 1121, 1111, 1112, 1119, 86, 1114, 1120,
- 1122, 86, 1115, 1123, 1125, 3815, 86, 1126, 1124, 86,
- 1127, 86, 1129, 86, 86, 1116, 86, 86, 1118, 1117,
- 1121, 1128, 86, 1119, 1134, 1130, 1120, 1122, 86, 86,
- 86, 1125, 1131, 86, 1126, 86, 1132, 1127, 1135, 1129,
- 1136, 86, 1137, 3815, 1133, 3815, 86, 1138, 1128, 86,
-
- 1139, 1134, 1130, 86, 1140, 1141, 3815, 1144, 1149, 1131,
- 86, 86, 86, 1132, 86, 86, 1145, 1136, 1142, 1137,
- 86, 1133, 86, 86, 1138, 86, 1143, 1139, 1146, 1147,
- 1150, 1140, 1141, 86, 1144, 1151, 1148, 1155, 86, 1153,
- 86, 1152, 1156, 1145, 86, 1142, 1154, 86, 86, 1158,
- 86, 86, 86, 1143, 1157, 1146, 1147, 1150, 86, 86,
- 1159, 86, 1151, 1148, 1155, 1161, 1153, 86, 1152, 1156,
- 1160, 86, 86, 1154, 3815, 1162, 1158, 1163, 86, 1164,
- 1166, 1157, 1165, 1167, 86, 86, 1170, 86, 1168, 86,
- 1171, 86, 1161, 86, 1169, 86, 1173, 1160, 86, 1172,
-
- 1174, 86, 1162, 1176, 1163, 1177, 1164, 1166, 3815, 1165,
- 1167, 1178, 86, 86, 1182, 1168, 1175, 1179, 86, 3815,
- 1185, 1169, 86, 86, 1180, 86, 1172, 1174, 86, 1184,
- 1186, 1190, 1181, 1187, 86, 86, 86, 86, 1178, 86,
- 1183, 1182, 1191, 1175, 1179, 1188, 86, 1189, 1192, 86,
- 3815, 1180, 86, 3815, 86, 86, 1184, 86, 1194, 1181,
- 1187, 86, 86, 86, 1193, 1198, 1195, 1183, 1202, 1191,
- 1199, 1200, 1188, 86, 1189, 86, 1201, 1203, 1207, 1196,
- 86, 1197, 86, 86, 3815, 1194, 86, 1206, 1205, 1204,
- 86, 1193, 3815, 1195, 86, 1202, 86, 171, 1200, 86,
-
- 86, 1251, 1221, 1201, 1203, 1207, 1196, 1208, 1197, 86,
- 86, 1209, 1210, 1211, 1206, 1205, 1204, 1213, 1222, 1212,
- 3815, 1220, 3815, 86, 86, 86, 86, 86, 86, 1221,
- 1223, 1224, 3815, 86, 1208, 1225, 3815, 86, 1209, 1210,
- 1211, 86, 86, 86, 1213, 1222, 1212, 1214, 1220, 1215,
- 1226, 1227, 1228, 1216, 1229, 1217, 3815, 1223, 86, 1231,
- 1218, 1230, 1225, 1232, 86, 1219, 1234, 86, 1233, 3815,
- 3815, 86, 86, 86, 1214, 3815, 1215, 1226, 1227, 1228,
- 1216, 1229, 1217, 86, 86, 1235, 1231, 1218, 1230, 1238,
- 1236, 3815, 1219, 1234, 1241, 86, 1239, 1242, 86, 1244,
-
- 3815, 86, 1237, 1248, 1245, 3815, 1240, 1243, 1253, 86,
- 86, 1249, 1235, 86, 1246, 1250, 1238, 1236, 86, 86,
- 86, 1241, 1247, 1239, 1242, 86, 86, 86, 1252, 1237,
- 1248, 1245, 86, 1240, 1243, 86, 1255, 86, 1249, 1256,
- 86, 1246, 1250, 1257, 86, 1258, 3815, 1266, 1268, 1247,
- 3815, 86, 1269, 3815, 86, 1267, 3815, 1270, 3815, 3815,
- 86, 86, 86, 1271, 3815, 1279, 1256, 86, 86, 1272,
- 1257, 3815, 1258, 1259, 1266, 1268, 1273, 86, 1260, 1269,
- 1261, 1275, 1267, 86, 1270, 86, 1262, 1276, 86, 86,
- 1271, 1263, 1264, 1274, 86, 86, 1272, 86, 1265, 86,
-
- 1259, 1277, 1280, 1273, 86, 1260, 1278, 1261, 1275, 86,
- 1286, 1281, 1282, 1262, 1276, 1289, 1283, 86, 1263, 1264,
- 1274, 86, 1284, 1285, 86, 1265, 86, 86, 1277, 1280,
- 1287, 86, 86, 1278, 1288, 1290, 1291, 86, 1281, 1282,
- 1293, 86, 1292, 1283, 86, 1294, 1295, 86, 1296, 1284,
- 1285, 1300, 1297, 86, 86, 1299, 86, 1287, 1298, 86,
- 1301, 1288, 1290, 1291, 86, 1306, 86, 1293, 86, 1292,
- 86, 1303, 1302, 1295, 1304, 1296, 86, 86, 86, 1297,
- 86, 86, 1299, 86, 1305, 1298, 1311, 1301, 1307, 1308,
- 1309, 86, 1306, 86, 1310, 86, 1312, 86, 1303, 1302,
-
- 1313, 1304, 1319, 1314, 86, 3815, 86, 86, 86, 1315,
- 3815, 1305, 86, 1311, 86, 1307, 1308, 1309, 1316, 1318,
- 1320, 1310, 86, 1312, 1317, 86, 86, 1321, 86, 1322,
- 1314, 1323, 86, 1324, 86, 1325, 1315, 1326, 86, 1327,
- 86, 86, 1329, 86, 3815, 1316, 1318, 1320, 1330, 1328,
- 1331, 1317, 1332, 3815, 1321, 86, 1322, 86, 1323, 86,
- 1324, 86, 1325, 1333, 1326, 1341, 1327, 86, 86, 1329,
- 86, 1334, 1335, 1336, 1338, 86, 1328, 1339, 1337, 1332,
- 86, 1340, 86, 86, 1342, 86, 1345, 1343, 1349, 86,
- 1333, 1344, 1341, 86, 86, 1347, 1351, 86, 1334, 1335,
-
- 86, 1338, 86, 1346, 1339, 86, 86, 1348, 1340, 86,
- 1350, 1342, 86, 1345, 1343, 1352, 1353, 86, 1344, 86,
- 86, 1355, 1347, 1354, 1358, 1356, 1357, 86, 86, 1360,
- 1346, 3815, 86, 1359, 1348, 3815, 86, 1350, 86, 1361,
- 86, 1362, 1352, 1353, 1364, 1363, 86, 86, 1355, 86,
- 1354, 1358, 1356, 1357, 1365, 86, 1360, 86, 1366, 86,
- 1359, 1367, 1369, 86, 1368, 1370, 1361, 86, 1362, 86,
- 86, 1364, 1363, 1373, 1372, 86, 1374, 1371, 1375, 1377,
- 1380, 1365, 86, 86, 1378, 1366, 86, 86, 1367, 1381,
- 1376, 1368, 86, 1379, 86, 86, 1382, 86, 86, 1393,
-
- 1373, 1372, 86, 1374, 1371, 1375, 1377, 86, 86, 1383,
- 1384, 1378, 86, 1385, 1387, 1389, 1386, 1376, 3815, 1391,
- 1379, 86, 1388, 1390, 86, 1392, 86, 1406, 86, 3815,
- 86, 86, 86, 1396, 1399, 1394, 1383, 1384, 86, 1395,
- 1398, 1400, 1389, 1386, 86, 86, 86, 86, 86, 1388,
- 1390, 86, 1392, 86, 1397, 86, 1401, 86, 86, 86,
- 1396, 1399, 1394, 86, 1402, 86, 1395, 1398, 1400, 1403,
- 1404, 1405, 86, 1407, 1410, 1408, 1411, 1409, 86, 86,
- 1412, 1397, 3815, 1401, 86, 86, 86, 86, 3815, 1421,
- 3815, 1402, 1417, 86, 1413, 3815, 1403, 1404, 1405, 86,
-
- 1434, 86, 1408, 1411, 1409, 86, 1414, 1412, 1416, 86,
- 86, 1419, 1418, 86, 1420, 86, 86, 86, 1422, 1417,
- 86, 1413, 86, 1425, 1423, 1424, 1429, 1426, 1432, 1428,
- 171, 1427, 86, 1414, 1435, 1416, 3815, 86, 1419, 1418,
- 86, 1420, 1430, 86, 86, 1422, 86, 86, 86, 1431,
- 1425, 1423, 1424, 1429, 1426, 86, 1428, 1433, 1427, 1436,
- 86, 86, 1437, 1438, 86, 3815, 86, 1439, 1441, 1430,
- 1442, 86, 3815, 86, 1440, 1444, 1431, 1443, 1447, 1446,
- 1445, 86, 1450, 86, 1433, 86, 1436, 86, 86, 1437,
- 1438, 1452, 86, 3815, 1439, 1441, 86, 1442, 86, 86,
-
- 1448, 1440, 1444, 86, 1443, 1447, 1446, 1445, 1449, 86,
- 1451, 1453, 86, 1454, 86, 1455, 86, 1456, 1452, 1457,
- 86, 1462, 1461, 86, 86, 86, 1464, 1448, 1458, 1463,
- 1459, 3815, 1465, 1460, 1467, 1449, 86, 1451, 1453, 1474,
- 1454, 86, 1455, 3815, 1456, 86, 1457, 86, 1462, 1461,
- 1466, 86, 86, 86, 1468, 1458, 1463, 1459, 86, 1465,
- 1460, 1467, 86, 86, 1469, 1470, 1471, 1472, 1475, 1473,
- 1477, 86, 1476, 86, 1478, 86, 1479, 1466, 1480, 3815,
- 1481, 1468, 86, 86, 86, 86, 86, 1483, 86, 1484,
- 86, 1469, 1470, 1471, 1472, 1475, 1473, 1477, 1486, 1476,
-
- 86, 1478, 86, 86, 1482, 1480, 1485, 1481, 1487, 86,
- 86, 86, 86, 1488, 1483, 1491, 1484, 1489, 1492, 1493,
- 86, 86, 1494, 1495, 86, 1486, 1490, 86, 1496, 86,
- 86, 1482, 1499, 1485, 86, 1487, 1497, 86, 86, 1498,
- 1488, 86, 1491, 1500, 1489, 1492, 1493, 1501, 86, 1494,
- 1495, 86, 1503, 1490, 86, 1496, 1504, 86, 1502, 1499,
- 1510, 1505, 1506, 1497, 1507, 86, 1498, 1512, 86, 86,
- 86, 1508, 86, 86, 1501, 86, 3815, 86, 1509, 1503,
- 1511, 1513, 1514, 1504, 1515, 1502, 1517, 86, 1505, 1506,
- 86, 1507, 86, 86, 1516, 86, 1518, 86, 1508, 86,
-
- 1519, 86, 1522, 86, 1525, 1509, 1523, 1511, 1513, 1514,
- 86, 1515, 1520, 1517, 1524, 86, 1535, 1521, 86, 86,
- 1533, 1516, 1540, 1518, 1534, 3815, 3815, 1519, 86, 1522,
- 86, 1525, 1536, 1523, 86, 3815, 3815, 1539, 1537, 1538,
- 3815, 1524, 86, 1543, 86, 1526, 1541, 1533, 86, 1527,
- 1550, 1534, 1528, 1529, 86, 86, 1542, 1530, 86, 1536,
- 86, 1545, 86, 1531, 1539, 1537, 1538, 1532, 86, 86,
- 1543, 86, 1526, 1541, 1551, 1544, 1527, 1549, 86, 1528,
- 1529, 86, 86, 1542, 1530, 1548, 86, 86, 1545, 1546,
- 1531, 1547, 86, 1552, 1532, 1556, 1553, 1555, 1554, 1558,
-
- 1557, 1560, 1544, 1562, 1549, 86, 86, 1559, 86, 86,
- 1561, 3815, 1548, 86, 86, 1563, 1546, 86, 1547, 86,
- 1552, 1591, 1556, 1553, 1555, 1554, 86, 1557, 86, 86,
- 1562, 86, 86, 86, 1559, 1569, 1570, 1561, 1571, 1572,
- 1573, 3815, 1563, 1564, 1574, 3815, 1575, 1576, 1565, 86,
- 1566, 1577, 1567, 86, 1568, 3815, 3815, 86, 86, 86,
- 86, 86, 1569, 1570, 86, 1571, 1579, 1578, 86, 86,
- 1564, 1574, 1582, 1575, 1576, 1565, 86, 1566, 1577, 1567,
- 1580, 1568, 1583, 1584, 86, 1581, 1585, 1587, 86, 1586,
- 86, 1592, 1593, 1579, 1578, 1588, 1589, 3815, 1590, 1582,
-
- 86, 1594, 86, 86, 86, 86, 1598, 86, 86, 1583,
- 1584, 86, 86, 1585, 1587, 1596, 1586, 86, 1592, 1593,
- 86, 1595, 1588, 1589, 86, 1590, 1597, 1599, 1594, 1600,
- 1601, 3815, 86, 1598, 86, 1603, 1602, 86, 86, 86,
- 1604, 1605, 1596, 1606, 1607, 3815, 3815, 86, 1595, 1608,
- 1609, 1610, 86, 1597, 1599, 1612, 1600, 1601, 86, 86,
- 1614, 1611, 86, 1602, 1615, 86, 1620, 1604, 86, 86,
- 1606, 1607, 86, 86, 1613, 1616, 1608, 1609, 1610, 86,
- 1617, 86, 86, 1618, 1622, 1623, 86, 86, 1611, 86,
- 86, 1615, 1619, 86, 86, 1625, 1621, 86, 86, 1624,
-
- 3815, 1613, 1616, 86, 1627, 1629, 86, 1617, 1626, 86,
- 1618, 1622, 1623, 1628, 86, 1630, 1631, 3815, 1636, 1619,
- 1632, 3815, 86, 1621, 1633, 3815, 1624, 86, 86, 1638,
- 86, 1627, 1629, 1635, 86, 1626, 1634, 86, 86, 86,
- 1628, 1640, 1630, 1631, 1637, 1636, 86, 1632, 1639, 86,
- 1641, 1633, 1642, 86, 1644, 86, 1638, 1643, 1646, 1645,
- 1635, 86, 1647, 1634, 3815, 1648, 86, 86, 1640, 1649,
- 86, 1637, 86, 86, 86, 1639, 1650, 1641, 86, 1642,
- 1651, 1644, 1654, 1653, 1643, 1652, 1645, 86, 1655, 1656,
- 86, 86, 1648, 86, 86, 86, 1649, 1657, 86, 86,
-
- 1658, 1659, 1662, 1663, 1664, 1666, 86, 1651, 86, 86,
- 1653, 86, 1652, 171, 1660, 1655, 1656, 86, 1661, 1670,
- 1665, 86, 86, 1669, 1657, 86, 1667, 1658, 1659, 1672,
- 86, 1664, 1668, 1671, 86, 86, 86, 86, 1675, 86,
- 86, 1660, 1673, 1674, 86, 1661, 1677, 1665, 86, 1678,
- 1669, 86, 86, 1667, 1676, 86, 1672, 1679, 86, 1668,
- 1671, 86, 1680, 1681, 86, 1675, 1683, 1684, 1682, 1673,
- 1674, 86, 86, 1677, 1685, 86, 1678, 1686, 1689, 86,
- 1690, 1676, 1687, 1688, 1679, 1691, 1697, 86, 86, 1680,
- 86, 1692, 86, 1683, 1684, 1682, 86, 1695, 86, 86,
-
- 1696, 1685, 1699, 86, 86, 1689, 1698, 1690, 1693, 86,
- 1688, 1694, 1691, 1697, 1700, 86, 1701, 1703, 1692, 86,
- 86, 1702, 1704, 1707, 1695, 1708, 1705, 1696, 1722, 1699,
- 1742, 86, 86, 1698, 86, 1693, 1709, 86, 1694, 86,
- 1706, 86, 1710, 1701, 1712, 1711, 86, 86, 1702, 86,
- 1707, 86, 1708, 1705, 86, 1713, 1716, 1715, 86, 1714,
- 86, 1718, 86, 1709, 86, 86, 86, 1706, 1719, 1710,
- 86, 1712, 1711, 1721, 3815, 1723, 1717, 86, 3815, 1726,
- 1720, 86, 1713, 1716, 1715, 86, 1714, 86, 1718, 86,
- 86, 86, 86, 1724, 1730, 1719, 1727, 1725, 1728, 1731,
-
- 1721, 1729, 1723, 1717, 86, 86, 1726, 1720, 86, 86,
- 86, 1732, 1735, 1733, 1734, 1743, 86, 1736, 86, 86,
- 1724, 1730, 86, 1727, 1725, 1728, 1731, 86, 1729, 1737,
- 1738, 1739, 1744, 86, 1741, 86, 1740, 1746, 1732, 1735,
- 1733, 1734, 86, 86, 1736, 86, 1745, 86, 1747, 86,
- 1751, 1748, 1750, 1752, 1753, 86, 1737, 1738, 1739, 1744,
- 86, 1741, 86, 1740, 86, 1749, 3815, 1754, 1758, 86,
- 1755, 86, 86, 1745, 86, 1747, 1759, 3815, 1748, 1750,
- 1760, 1761, 86, 1766, 1765, 86, 86, 1762, 1763, 1756,
- 86, 1757, 1749, 86, 1754, 86, 86, 1755, 86, 86,
-
- 1764, 86, 86, 1759, 86, 1768, 1767, 1760, 1761, 86,
- 1766, 1765, 86, 86, 1762, 1763, 1756, 1769, 1757, 1776,
- 1771, 1770, 1777, 1781, 86, 1772, 1774, 1764, 86, 86,
- 1773, 1775, 1768, 1767, 86, 1778, 1786, 1779, 1782, 86,
- 3815, 86, 86, 1780, 1769, 86, 1776, 1771, 1770, 1777,
- 1781, 86, 1784, 1792, 1787, 1783, 3815, 86, 86, 86,
- 86, 86, 1778, 86, 1779, 1782, 1785, 1789, 86, 1788,
- 1780, 1790, 1791, 86, 86, 86, 86, 1795, 86, 1784,
- 1793, 1787, 1783, 86, 1794, 86, 1797, 1796, 86, 1798,
- 1802, 3815, 1799, 1785, 1789, 86, 1788, 86, 1790, 1791,
-
- 86, 1805, 1800, 86, 86, 86, 1804, 1793, 1806, 86,
- 86, 1794, 1801, 1797, 1796, 1803, 1798, 1802, 86, 1799,
- 86, 86, 1807, 1808, 1810, 1809, 1811, 86, 1805, 1800,
- 86, 86, 86, 1804, 1812, 1806, 1813, 3815, 3815, 1801,
- 86, 1814, 1803, 3815, 1816, 1815, 1817, 1827, 1823, 1807,
- 1808, 86, 1809, 86, 1822, 86, 86, 86, 1821, 86,
- 86, 1812, 86, 1813, 1824, 1818, 1828, 86, 1814, 1819,
- 86, 1816, 1815, 1817, 86, 1823, 86, 1825, 86, 1829,
- 1832, 1822, 1820, 1826, 86, 1821, 1830, 1831, 86, 3815,
- 86, 1824, 1818, 1828, 86, 1833, 1819, 1834, 86, 1836,
-
- 1835, 86, 1841, 1838, 1825, 1840, 86, 1837, 1839, 1820,
- 1826, 86, 86, 1830, 1831, 86, 86, 86, 1843, 1842,
- 86, 86, 1833, 86, 1834, 1844, 1836, 1835, 86, 86,
- 1838, 86, 1845, 1847, 1837, 1839, 1846, 86, 3815, 1849,
- 1848, 3815, 1851, 3815, 1850, 1852, 1842, 86, 3815, 1853,
- 86, 1855, 1844, 1854, 86, 1856, 86, 1860, 1866, 1845,
- 86, 86, 86, 1846, 86, 86, 86, 1848, 86, 86,
- 1857, 1850, 1852, 1858, 1859, 86, 1853, 86, 1855, 1862,
- 1854, 86, 1856, 86, 1860, 86, 1861, 1863, 1864, 1865,
- 86, 86, 1867, 1868, 1869, 86, 1870, 1857, 86, 1873,
-
- 1858, 1859, 86, 86, 1878, 1871, 1862, 86, 86, 1874,
- 86, 86, 1876, 1861, 1863, 1864, 1865, 1872, 86, 1867,
- 1868, 1869, 86, 1870, 86, 86, 1873, 1879, 1875, 1877,
- 1884, 86, 1871, 1880, 86, 1881, 1874, 86, 1882, 1876,
- 86, 86, 1887, 86, 1872, 1883, 86, 1885, 1888, 1889,
- 86, 1886, 1890, 86, 1879, 1875, 1877, 1884, 1891, 86,
- 1880, 86, 1881, 3815, 86, 1882, 86, 3815, 1893, 1887,
- 86, 1892, 1883, 86, 1885, 86, 1889, 86, 1886, 1890,
- 86, 1894, 171, 1895, 1896, 1891, 1897, 1898, 1899, 86,
- 1900, 86, 1905, 1902, 86, 1893, 1901, 1903, 1892, 86,
-
- 86, 1904, 1911, 1906, 86, 1907, 86, 3815, 1894, 86,
- 1895, 1896, 1909, 1897, 1898, 1899, 86, 1900, 86, 86,
- 1902, 86, 1908, 1901, 1903, 1910, 1912, 86, 1904, 86,
- 1906, 1913, 1907, 86, 86, 1914, 3815, 86, 1915, 1909,
- 1916, 3815, 1917, 1919, 1920, 1921, 1918, 86, 86, 1908,
- 86, 86, 1910, 1912, 86, 1922, 1927, 86, 1923, 1925,
- 1935, 1924, 1914, 86, 86, 1915, 86, 86, 86, 1917,
- 1919, 1920, 1921, 1918, 86, 1926, 3815, 1928, 1930, 3815,
- 86, 86, 1922, 1927, 86, 1923, 1925, 86, 1924, 1929,
- 1931, 1932, 86, 86, 1933, 3815, 1937, 86, 86, 1943,
-
- 1936, 1939, 1926, 86, 1928, 1930, 1934, 1940, 1941, 1945,
- 86, 1944, 1938, 1942, 86, 86, 1929, 1931, 1932, 86,
- 86, 1933, 86, 1937, 1946, 1947, 86, 1936, 1939, 86,
- 3815, 1948, 1950, 1934, 1940, 1941, 1949, 86, 1944, 1938,
- 1942, 86, 1953, 1951, 1956, 1952, 1954, 86, 1955, 1957,
- 1958, 86, 1947, 1959, 86, 86, 86, 86, 1948, 86,
- 1961, 1960, 86, 1949, 86, 86, 1964, 1963, 86, 1953,
- 1951, 1956, 1952, 1954, 1962, 1955, 1965, 1966, 86, 1968,
- 1967, 86, 86, 86, 3815, 86, 86, 86, 1960, 86,
- 3815, 86, 86, 86, 1963, 1970, 1971, 1969, 86, 1972,
-
- 1973, 1962, 86, 1965, 1966, 86, 1968, 1967, 1974, 86,
- 1976, 1977, 86, 86, 1975, 1980, 86, 86, 1982, 1979,
- 1978, 1983, 1970, 1971, 1969, 1981, 1972, 1973, 86, 3815,
- 86, 1990, 86, 86, 3815, 1974, 86, 1976, 1977, 86,
- 86, 1975, 1980, 1984, 1985, 1982, 1979, 1978, 1987, 1986,
- 86, 3815, 1981, 86, 1988, 86, 86, 86, 1990, 1991,
- 1992, 86, 1993, 1994, 1995, 3815, 1996, 3815, 1997, 86,
- 1984, 1985, 1989, 2000, 3815, 1987, 1986, 86, 86, 86,
- 86, 1988, 86, 1998, 2001, 86, 1991, 86, 2003, 1993,
- 1994, 1995, 86, 1996, 1999, 1997, 86, 86, 2006, 1989,
-
- 2000, 2002, 86, 2011, 2004, 2009, 2012, 2005, 86, 86,
- 1998, 2001, 2007, 86, 86, 2003, 2010, 2008, 86, 2013,
- 2014, 1999, 86, 3815, 86, 2006, 2016, 86, 2002, 2015,
- 2011, 2004, 2009, 86, 2005, 86, 2017, 2018, 86, 2007,
- 2019, 2022, 3815, 2010, 2008, 2034, 86, 2014, 86, 2020,
- 86, 86, 2021, 2016, 2023, 2024, 2015, 2027, 2025, 2026,
- 86, 2028, 2033, 86, 2018, 86, 86, 2019, 2022, 86,
- 86, 86, 86, 2032, 86, 86, 2020, 86, 3815, 2021,
- 2029, 2023, 2024, 2030, 2027, 2025, 2026, 2031, 2028, 2035,
- 86, 86, 2036, 2038, 86, 2039, 2046, 2037, 86, 86,
-
- 2032, 2040, 86, 2043, 3815, 86, 2044, 2029, 86, 86,
- 2030, 86, 86, 2041, 2031, 2045, 2035, 86, 2042, 2036,
- 2038, 86, 2039, 2046, 2037, 86, 2047, 2048, 2040, 2049,
- 2043, 2050, 3815, 2044, 2051, 3815, 2053, 2060, 2052, 2059,
- 86, 2055, 2045, 86, 2056, 86, 2058, 2057, 86, 86,
- 2054, 86, 86, 2047, 2048, 2069, 2049, 2072, 2050, 86,
- 86, 2051, 86, 2053, 2060, 2052, 2059, 2061, 2055, 86,
- 2062, 2056, 86, 2058, 2057, 2063, 86, 2054, 2064, 2066,
- 2065, 2067, 2068, 2071, 86, 3815, 2074, 86, 2070, 86,
- 2073, 86, 86, 2075, 2061, 86, 3815, 86, 2080, 86,
-
- 2076, 2079, 86, 86, 2077, 2064, 2066, 2065, 2067, 2068,
- 86, 86, 86, 2074, 86, 2070, 2078, 2073, 2081, 2084,
- 2082, 86, 2085, 86, 3815, 86, 2083, 2076, 2079, 2086,
- 86, 2077, 86, 2089, 2087, 2090, 2091, 86, 2088, 2099,
- 2093, 86, 86, 2078, 86, 2081, 86, 2082, 2100, 2085,
- 2092, 86, 86, 2083, 86, 2094, 2086, 86, 86, 2095,
- 2089, 2087, 2090, 2091, 86, 2088, 2096, 2093, 2097, 86,
- 2101, 86, 86, 2102, 2103, 2105, 2104, 2092, 2107, 86,
- 86, 2109, 2094, 86, 86, 2108, 2095, 86, 2106, 2098,
- 3815, 2113, 3815, 2096, 86, 86, 86, 2101, 2112, 86,
-
- 2102, 86, 2105, 2104, 2110, 86, 2111, 86, 2116, 86,
- 2118, 2115, 2108, 86, 2114, 2106, 2098, 86, 86, 2117,
- 2119, 86, 2120, 2121, 2124, 2112, 86, 86, 2122, 2127,
- 86, 2110, 86, 2111, 86, 2116, 2123, 2118, 2115, 2131,
- 86, 2114, 86, 2125, 86, 2126, 2117, 2119, 86, 2120,
- 2121, 2124, 2128, 2129, 86, 2122, 86, 86, 171, 2130,
- 86, 2132, 2133, 2123, 2134, 2140, 86, 86, 86, 2137,
- 2125, 2144, 2126, 2138, 3815, 86, 86, 2135, 2136, 2128,
- 2129, 86, 2143, 86, 86, 2147, 2130, 2139, 2132, 2133,
- 2142, 2134, 86, 86, 86, 2141, 2137, 86, 86, 86,
-
- 2138, 2145, 2148, 86, 2135, 2136, 2146, 2149, 2150, 2143,
- 86, 2151, 86, 86, 2139, 2152, 3815, 2142, 3815, 2153,
- 2154, 2174, 2141, 2156, 86, 86, 86, 2155, 2145, 2148,
- 86, 2157, 2158, 2146, 86, 2150, 86, 2162, 2160, 86,
- 2159, 86, 86, 86, 2161, 86, 2153, 2154, 2163, 86,
- 2156, 86, 2165, 86, 2155, 86, 2164, 3815, 2157, 2158,
- 86, 3815, 2171, 86, 2162, 2160, 86, 2159, 86, 2166,
- 2168, 2161, 2173, 2169, 86, 2163, 2172, 86, 2177, 2165,
- 2170, 2176, 2167, 2164, 86, 2175, 86, 86, 86, 2171,
- 2178, 86, 86, 2179, 2180, 86, 2166, 2168, 86, 86,
-
- 2169, 86, 2181, 2172, 86, 2177, 2184, 2170, 2176, 2167,
- 2185, 2182, 2175, 2183, 2186, 2187, 2188, 2178, 2189, 2190,
- 2179, 2180, 86, 2193, 86, 86, 2194, 86, 2191, 2181,
- 2192, 2195, 86, 2184, 86, 2196, 86, 86, 2182, 2197,
- 2183, 86, 2187, 86, 86, 2189, 2190, 2198, 2199, 86,
- 86, 2201, 2203, 2194, 2200, 2191, 86, 2192, 86, 86,
- 2204, 2205, 2196, 86, 2202, 2207, 86, 2206, 86, 2209,
- 2208, 86, 3815, 86, 2198, 86, 86, 2210, 2201, 2203,
- 86, 2200, 86, 2211, 2214, 2212, 2213, 86, 2205, 86,
- 2222, 2202, 86, 2227, 2206, 3815, 2209, 2208, 2228, 86,
-
- 2215, 2216, 2217, 3815, 2210, 86, 2238, 2218, 86, 2220,
- 2211, 86, 2212, 2213, 2219, 86, 86, 2221, 86, 2223,
- 2225, 86, 86, 2224, 86, 86, 86, 2215, 2216, 2217,
- 86, 2226, 2229, 86, 2218, 2231, 2220, 2230, 2232, 2233,
- 86, 2219, 2234, 2235, 2221, 86, 2223, 2225, 2236, 86,
- 2224, 86, 2240, 86, 86, 86, 2243, 2237, 2226, 2229,
- 86, 86, 2231, 86, 2230, 2232, 2233, 2239, 86, 2241,
- 2235, 2244, 2242, 2245, 86, 2236, 86, 86, 86, 2240,
- 2246, 2247, 86, 2243, 2237, 2249, 2248, 86, 86, 2251,
- 2252, 2250, 2255, 2253, 2239, 86, 2241, 2256, 86, 2242,
-
- 86, 86, 2258, 86, 2254, 86, 2259, 2246, 86, 86,
- 2260, 2257, 2249, 2248, 86, 86, 2251, 86, 2250, 2255,
- 2253, 2262, 86, 2263, 86, 2265, 86, 2266, 86, 2258,
- 2268, 2254, 3815, 2259, 2261, 86, 86, 2260, 2257, 2264,
- 86, 2267, 2269, 2271, 2270, 2272, 2273, 86, 2262, 86,
- 86, 2274, 2265, 2275, 86, 2276, 3815, 2280, 2277, 86,
- 2287, 2261, 86, 86, 86, 86, 2264, 2278, 2267, 2269,
- 86, 2270, 2272, 2273, 2279, 86, 86, 86, 2281, 86,
- 86, 86, 2276, 86, 2280, 2277, 2283, 2284, 2282, 2285,
- 86, 2286, 86, 2288, 2278, 2289, 86, 2290, 2297, 2291,
-
- 3815, 2279, 86, 86, 86, 2281, 2292, 3815, 86, 2296,
- 86, 86, 2294, 2283, 2284, 2282, 2285, 86, 2286, 86,
- 2288, 2302, 2293, 2295, 2290, 86, 2291, 86, 86, 86,
- 2299, 86, 2298, 2292, 2300, 86, 2296, 2301, 86, 2294,
- 2303, 2304, 2305, 2306, 86, 86, 86, 2307, 2302, 2293,
- 2295, 2311, 2308, 3815, 3815, 2314, 3815, 2299, 2319, 2298,
- 86, 2300, 86, 86, 2301, 86, 86, 2303, 2304, 2305,
- 86, 2309, 2313, 2315, 2307, 86, 2310, 2312, 86, 2308,
- 2320, 2316, 2314, 86, 2317, 86, 2318, 86, 86, 86,
- 86, 86, 2322, 86, 2321, 86, 2323, 2324, 2309, 2313,
-
- 2315, 2325, 2326, 2310, 2312, 2332, 86, 2320, 2316, 2330,
- 86, 2317, 2327, 2318, 86, 2328, 86, 2333, 2331, 2322,
- 2329, 2321, 2336, 2323, 86, 86, 2337, 86, 2325, 2326,
- 86, 86, 86, 2334, 2338, 86, 2330, 2339, 2335, 2327,
- 86, 2340, 2328, 2341, 86, 2331, 2343, 2329, 3815, 2347,
- 2345, 2342, 2344, 2346, 86, 86, 86, 2348, 86, 86,
- 2349, 2338, 86, 2350, 2339, 86, 86, 86, 2340, 86,
- 2354, 2365, 2353, 2343, 2351, 86, 86, 2345, 2342, 2344,
- 2346, 86, 86, 2355, 2348, 86, 2352, 2356, 2358, 2357,
- 86, 2360, 86, 86, 171, 86, 2359, 2354, 86, 2353,
-
- 2361, 2351, 2362, 86, 2366, 2364, 2367, 2363, 2369, 2368,
- 2355, 86, 86, 2352, 2356, 86, 2357, 86, 2360, 86,
- 86, 2370, 2371, 2359, 2373, 86, 86, 86, 86, 86,
- 86, 2366, 2364, 2367, 2363, 2369, 2368, 2372, 2374, 3815,
- 2375, 2376, 2377, 86, 2379, 3815, 2384, 86, 2370, 86,
- 2378, 2373, 2380, 86, 2381, 2385, 86, 86, 2382, 2383,
- 2386, 86, 86, 2391, 2372, 2374, 86, 2375, 2376, 2377,
- 86, 86, 86, 86, 2389, 2387, 86, 2378, 86, 2380,
- 86, 2381, 2385, 86, 86, 2382, 2383, 2386, 2388, 2390,
- 2392, 2393, 2395, 2401, 2394, 86, 86, 86, 2398, 86,
-
- 86, 2389, 2387, 86, 2399, 86, 2400, 86, 2402, 86,
- 2403, 86, 2396, 2408, 2404, 2388, 2390, 2392, 2393, 2395,
- 2401, 2394, 86, 2397, 86, 2398, 2405, 2406, 86, 86,
- 2407, 2399, 86, 2400, 86, 2402, 2409, 2403, 86, 2396,
- 86, 2404, 2417, 2413, 86, 2410, 2421, 2411, 2412, 86,
- 2397, 2414, 2415, 2405, 2406, 86, 86, 2407, 86, 86,
- 86, 2416, 2418, 2409, 86, 2423, 2419, 2420, 86, 2417,
- 2413, 86, 2410, 86, 2411, 2412, 86, 2422, 2414, 86,
- 2424, 2425, 2426, 2427, 86, 86, 2428, 86, 2416, 2418,
- 2429, 2431, 86, 2419, 2420, 2430, 86, 2432, 86, 86,
-
- 86, 2436, 2471, 86, 2422, 3815, 86, 2424, 2425, 2426,
- 86, 2433, 2437, 2428, 2435, 86, 86, 2429, 2431, 2434,
- 86, 2438, 2430, 86, 2432, 2439, 2441, 86, 2436, 2440,
- 86, 2442, 2445, 86, 86, 3815, 86, 86, 2433, 2437,
- 86, 2435, 2443, 86, 86, 2451, 2434, 2444, 2438, 86,
- 2446, 2447, 2439, 2441, 2448, 2450, 2440, 2453, 2442, 2445,
- 2454, 2452, 86, 2455, 2457, 2456, 2458, 2449, 3815, 86,
- 86, 2460, 2451, 86, 86, 86, 86, 2446, 2447, 2459,
- 2462, 2448, 2450, 2463, 86, 3815, 86, 2454, 2452, 86,
- 2455, 2457, 2456, 2458, 2449, 2461, 86, 2464, 2460, 2465,
-
- 2466, 86, 86, 86, 86, 2467, 2459, 2462, 86, 2468,
- 2463, 2469, 2473, 2475, 2470, 86, 2472, 2474, 86, 86,
- 86, 86, 2461, 86, 2464, 2477, 2465, 2466, 2476, 86,
- 86, 2478, 2467, 2484, 86, 2479, 2468, 86, 2469, 2473,
- 86, 2470, 2480, 2472, 2474, 2481, 2483, 86, 2485, 2486,
- 2482, 2487, 2477, 86, 86, 2476, 86, 86, 2478, 86,
- 2491, 2490, 2479, 86, 86, 86, 86, 2493, 86, 2480,
- 86, 2492, 2481, 2483, 2488, 2485, 2486, 2482, 2487, 2489,
- 86, 2494, 86, 2495, 86, 2496, 2498, 2491, 2490, 2499,
- 2497, 2501, 2500, 86, 2493, 2502, 2503, 2506, 2492, 2564,
-
- 3815, 86, 86, 2508, 86, 2507, 86, 2504, 86, 86,
- 2495, 2509, 2496, 2498, 86, 2505, 86, 2497, 2501, 2500,
- 86, 86, 2502, 2510, 86, 2511, 86, 2512, 86, 86,
- 2508, 86, 2507, 2513, 2504, 2521, 86, 86, 2509, 2516,
- 2514, 86, 2505, 2515, 2518, 2517, 2520, 86, 2522, 2519,
- 2510, 86, 2511, 86, 2512, 2523, 86, 2525, 86, 2524,
- 2513, 86, 2521, 86, 86, 2526, 2516, 2514, 2531, 86,
- 2515, 2527, 2517, 2520, 86, 2522, 86, 2528, 2536, 86,
- 86, 2530, 2523, 2535, 2525, 86, 2524, 86, 2532, 2529,
- 2537, 2533, 2526, 2534, 86, 86, 86, 86, 2527, 86,
-
- 86, 2538, 86, 86, 2528, 2536, 2540, 2539, 2530, 2541,
- 2535, 3815, 2542, 86, 2545, 2532, 2529, 2537, 2533, 86,
- 2534, 86, 2543, 2544, 86, 2547, 2546, 2549, 2538, 86,
- 2551, 2552, 86, 2540, 2539, 86, 2541, 2554, 2548, 2542,
- 86, 2545, 86, 2550, 86, 86, 86, 86, 86, 2543,
- 2544, 2555, 2547, 2546, 2549, 86, 2556, 2551, 2552, 2553,
- 2557, 86, 2558, 2561, 2554, 2548, 2562, 2559, 2560, 2563,
- 2550, 86, 2568, 2569, 86, 86, 2565, 86, 86, 2566,
- 86, 171, 2570, 2556, 2567, 86, 2553, 86, 2571, 2558,
- 2561, 86, 2572, 2562, 2559, 2560, 2563, 2574, 2583, 86,
-
- 2575, 2573, 2578, 2565, 86, 86, 86, 86, 2579, 2570,
- 86, 86, 2580, 2582, 2576, 2571, 2581, 2587, 3815, 2572,
- 86, 2584, 86, 2585, 86, 2577, 86, 2575, 2573, 2578,
- 86, 86, 2586, 86, 2588, 86, 2589, 2590, 86, 2580,
- 2582, 2576, 2591, 2581, 86, 86, 2593, 2592, 2584, 86,
- 2585, 2597, 2577, 86, 2595, 2594, 86, 86, 86, 2586,
- 86, 2588, 2596, 86, 2590, 2598, 86, 2604, 86, 2591,
- 86, 2599, 2600, 2593, 2592, 2602, 86, 2601, 2597, 2606,
- 86, 2595, 2594, 86, 86, 2603, 2605, 86, 2607, 2596,
- 86, 86, 2598, 2611, 86, 2612, 2608, 86, 2599, 2600,
-
- 2609, 86, 2602, 86, 2601, 86, 2606, 2610, 86, 86,
- 86, 2613, 2603, 2605, 2614, 2607, 86, 2615, 2616, 3815,
- 2611, 2617, 2612, 2608, 2618, 3815, 86, 2609, 86, 2619,
- 2624, 2620, 86, 86, 2610, 2623, 86, 86, 2613, 86,
- 86, 2614, 2621, 86, 2615, 86, 86, 2622, 2617, 2625,
- 86, 2618, 2627, 2626, 2628, 2629, 2619, 2624, 2620, 86,
- 2631, 2630, 2623, 3815, 86, 2633, 2635, 86, 2632, 2621,
- 2634, 2638, 2636, 86, 2622, 86, 2625, 86, 2637, 2643,
- 2626, 2642, 2629, 2640, 86, 86, 86, 2631, 2630, 86,
- 86, 2644, 2633, 86, 86, 2632, 86, 2634, 2638, 2636,
-
- 2639, 2641, 86, 86, 2645, 2637, 86, 86, 2642, 2646,
- 2640, 2647, 2648, 3815, 2649, 86, 86, 2650, 2644, 2651,
- 2653, 86, 2652, 86, 2654, 3815, 86, 2639, 2641, 2657,
- 2658, 86, 86, 2659, 2655, 2661, 2646, 2656, 2647, 2648,
- 86, 2649, 86, 2660, 2650, 2664, 86, 2653, 86, 2652,
- 86, 2654, 86, 2663, 2665, 86, 86, 86, 2667, 2662,
- 2659, 2655, 2661, 2666, 2656, 86, 86, 2668, 86, 2669,
- 2660, 86, 86, 2671, 2672, 2670, 86, 2673, 2674, 2675,
- 2663, 86, 2676, 2677, 2678, 86, 2662, 86, 3815, 2682,
- 2666, 86, 2681, 86, 2668, 86, 86, 86, 2684, 2679,
-
- 2671, 86, 2670, 2687, 86, 2674, 2675, 2680, 86, 2676,
- 2677, 86, 86, 2683, 86, 86, 86, 2686, 2685, 2681,
- 2691, 86, 2688, 2692, 86, 86, 2679, 86, 2689, 2693,
- 2687, 86, 2694, 2698, 2680, 2697, 2695, 3815, 3815, 86,
- 2683, 86, 3815, 2690, 2686, 2685, 86, 86, 86, 2688,
- 2692, 2699, 2696, 2703, 86, 2689, 2693, 86, 86, 2694,
- 86, 2700, 86, 2695, 2701, 86, 2704, 2705, 86, 2702,
- 2690, 2708, 3815, 86, 2707, 86, 86, 2706, 2699, 2696,
- 2703, 86, 2711, 86, 2718, 86, 2709, 2713, 2700, 3815,
- 2714, 2701, 2725, 86, 2705, 2712, 2702, 86, 2708, 86,
-
- 2710, 2707, 86, 86, 2706, 2719, 2715, 86, 2717, 86,
- 2716, 2718, 86, 2709, 2713, 86, 2720, 2714, 3815, 86,
- 86, 2721, 2712, 2722, 86, 3815, 2726, 2710, 3815, 2727,
- 2728, 86, 2719, 2715, 86, 2717, 2729, 2716, 2723, 2734,
- 2724, 86, 2730, 2720, 86, 2731, 86, 86, 2721, 2732,
- 2722, 86, 86, 2726, 3815, 86, 2727, 2728, 86, 86,
- 2733, 86, 2736, 2729, 2737, 2723, 2734, 2724, 2738, 2730,
- 2735, 86, 2731, 2739, 2740, 2741, 2732, 2742, 86, 2744,
- 3815, 2743, 3815, 86, 86, 86, 86, 2733, 2745, 2736,
- 86, 2737, 2746, 86, 2747, 2738, 86, 2735, 2748, 2749,
-
- 2739, 2758, 2750, 3815, 2742, 2756, 86, 86, 2743, 86,
- 86, 86, 86, 2751, 86, 2745, 2752, 2753, 2754, 2746,
- 2755, 2747, 2757, 86, 86, 2748, 2749, 3815, 2758, 2750,
- 2763, 86, 2759, 86, 86, 86, 86, 86, 2761, 86,
- 2751, 2760, 2766, 2752, 2753, 2754, 2762, 2755, 86, 2764,
- 3815, 2767, 2768, 2773, 86, 2774, 86, 2765, 3815, 2759,
- 86, 3815, 86, 3815, 2769, 2761, 2770, 86, 2760, 2766,
- 2771, 86, 86, 2762, 171, 86, 2764, 86, 2767, 2768,
- 86, 86, 2774, 2772, 2765, 2775, 2776, 2777, 2778, 2779,
- 2780, 2769, 3815, 2770, 86, 2781, 2782, 2771, 2785, 86,
-
- 2783, 86, 86, 86, 2786, 86, 2784, 86, 86, 2787,
- 2772, 2788, 2775, 2776, 2777, 2778, 2779, 2780, 86, 86,
- 2789, 86, 2781, 2782, 2790, 86, 2791, 2783, 2792, 2794,
- 2793, 86, 2795, 2784, 2797, 86, 2787, 2796, 86, 2798,
- 2801, 2800, 2799, 2803, 86, 86, 86, 2789, 86, 86,
- 86, 2790, 86, 2804, 2805, 2806, 86, 2793, 86, 2795,
- 86, 2797, 2802, 86, 2796, 86, 2798, 86, 2800, 2799,
- 2803, 2807, 86, 2808, 2809, 86, 86, 2811, 86, 2810,
- 2804, 2805, 86, 2813, 86, 2812, 3815, 2815, 2814, 2802,
- 3550, 3551, 86, 86, 2819, 86, 2816, 86, 2807, 2820,
-
- 2808, 2809, 86, 86, 2811, 2822, 2810, 86, 86, 86,
- 86, 2817, 2812, 2818, 2815, 2814, 2823, 2821, 86, 86,
- 86, 2819, 86, 2816, 86, 2824, 2820, 86, 2825, 3815,
- 2826, 2828, 2822, 2827, 2832, 2829, 2833, 2830, 2817, 86,
- 2818, 2831, 86, 86, 2821, 2835, 86, 86, 86, 2836,
- 2837, 86, 2824, 2839, 86, 2825, 86, 2826, 2828, 86,
- 2827, 86, 2829, 2833, 2830, 2834, 2838, 86, 2831, 2840,
- 2841, 2842, 2835, 2843, 3815, 2852, 86, 2844, 86, 2845,
- 2839, 86, 86, 86, 86, 86, 2846, 86, 2848, 2854,
- 2847, 2851, 2834, 2838, 2849, 86, 2840, 2841, 2842, 86,
-
- 2843, 86, 86, 2850, 2844, 86, 2845, 86, 2853, 2855,
- 86, 2856, 86, 2846, 86, 2848, 86, 2847, 2851, 2857,
- 2858, 2849, 2860, 86, 2861, 86, 2859, 86, 86, 86,
- 2850, 2862, 2864, 86, 2865, 2853, 2855, 86, 86, 2863,
- 86, 2866, 2867, 2868, 86, 86, 2857, 2858, 3815, 2860,
- 2869, 2861, 2870, 2859, 86, 2878, 86, 86, 2862, 2864,
- 2871, 2865, 2872, 2873, 2874, 2876, 2863, 86, 86, 86,
- 2875, 86, 86, 2877, 2882, 86, 2885, 2869, 86, 2870,
- 86, 2880, 86, 2881, 2879, 86, 2884, 2871, 86, 2872,
- 2873, 2874, 2876, 2883, 86, 86, 2887, 2875, 86, 86,
-
- 2877, 2886, 86, 86, 86, 2891, 86, 2888, 2880, 2892,
- 2881, 2879, 2893, 2884, 86, 86, 2889, 2890, 2894, 2896,
- 2883, 86, 2895, 2887, 86, 86, 2898, 2897, 2886, 2900,
- 2899, 86, 2891, 3815, 2888, 86, 2892, 86, 2901, 86,
- 86, 86, 86, 2889, 2890, 2894, 2896, 2902, 86, 2895,
- 2903, 86, 2904, 2898, 2897, 86, 2900, 2899, 2906, 86,
- 2905, 2907, 86, 2908, 2909, 2901, 2910, 86, 2911, 2912,
- 3815, 3815, 86, 2913, 2902, 86, 3815, 2903, 2916, 2904,
- 86, 2915, 2919, 2914, 86, 2906, 2917, 2905, 86, 2918,
- 2908, 86, 86, 86, 2920, 86, 2912, 86, 86, 2921,
-
- 2913, 86, 2925, 86, 86, 2916, 2927, 2928, 2915, 2919,
- 2914, 2922, 86, 2917, 86, 86, 2918, 2923, 86, 2924,
- 2926, 2920, 2930, 86, 2929, 2932, 2921, 2931, 86, 86,
- 86, 2935, 2934, 86, 86, 2933, 2936, 2938, 2922, 86,
- 86, 2937, 86, 86, 2923, 86, 2924, 2926, 86, 86,
- 86, 2929, 2932, 86, 2931, 2939, 2940, 2943, 2935, 2934,
- 2941, 86, 2933, 2936, 86, 2942, 2944, 2945, 2937, 86,
- 2946, 86, 86, 86, 2947, 86, 2948, 3815, 2949, 3815,
- 86, 2955, 2939, 86, 2943, 3815, 2951, 2941, 2950, 2961,
- 2952, 171, 2942, 2944, 2945, 2957, 2959, 2946, 86, 86,
-
- 2953, 2947, 86, 2948, 86, 2949, 86, 2954, 86, 86,
- 2956, 2958, 86, 2951, 86, 2950, 86, 2952, 86, 86,
- 2960, 2962, 2957, 2959, 86, 2963, 2966, 2953, 2964, 3815,
- 2965, 2968, 2969, 2967, 2954, 86, 2970, 2956, 2958, 86,
- 2972, 2971, 86, 86, 86, 86, 2974, 2960, 86, 86,
- 86, 86, 2963, 2966, 86, 2964, 86, 2965, 2968, 2969,
- 2967, 2976, 2973, 2970, 86, 2975, 2978, 2972, 2971, 86,
- 2977, 2979, 86, 2974, 2980, 86, 2981, 86, 2982, 2984,
- 86, 2983, 3815, 2986, 86, 2988, 86, 2989, 2976, 2973,
- 3815, 2985, 2975, 2978, 86, 2987, 86, 2977, 2979, 86,
-
- 86, 2980, 2990, 2981, 2992, 86, 2984, 2991, 2983, 86,
- 86, 86, 86, 86, 2989, 2993, 86, 2994, 2985, 2995,
- 2998, 2996, 2987, 3007, 86, 2997, 86, 86, 86, 2990,
- 2999, 2992, 86, 86, 2991, 3000, 3001, 3004, 3002, 3005,
- 3003, 3006, 2993, 86, 2994, 86, 2995, 2998, 2996, 86,
- 86, 3008, 2997, 3013, 3014, 86, 3815, 2999, 86, 3010,
- 86, 3009, 86, 86, 3004, 3002, 86, 3003, 86, 3011,
- 86, 86, 3012, 3022, 3018, 86, 3015, 86, 3008, 3019,
- 3013, 86, 3016, 86, 3017, 86, 3010, 3020, 3009, 86,
- 86, 86, 3023, 3021, 86, 86, 3011, 3024, 86, 3012,
-
- 3022, 3018, 3025, 3015, 3026, 3027, 3019, 3815, 3028, 3016,
- 3029, 3017, 86, 3815, 3020, 86, 86, 3031, 3033, 86,
- 3021, 3030, 86, 86, 3024, 86, 3032, 3034, 86, 86,
- 3035, 3026, 3027, 86, 86, 3028, 3036, 3029, 86, 86,
- 86, 3037, 3038, 86, 3031, 3033, 3039, 3040, 3030, 3041,
- 86, 3042, 3044, 3032, 3034, 3043, 3815, 3035, 86, 86,
- 3045, 3815, 3049, 3036, 86, 3046, 86, 3048, 3037, 3038,
- 3050, 86, 3047, 86, 3040, 3053, 3041, 86, 86, 3044,
- 3058, 3051, 3043, 86, 86, 86, 3052, 3045, 86, 3049,
- 3056, 3059, 3046, 3054, 3048, 86, 3055, 86, 86, 3047,
-
- 86, 3060, 86, 3057, 86, 3062, 86, 86, 3051, 86,
- 86, 3061, 3063, 3052, 3064, 3065, 3815, 3056, 3059, 86,
- 3054, 3066, 86, 3055, 3068, 3069, 3067, 3071, 3060, 3070,
- 3057, 86, 3062, 3073, 86, 86, 86, 3076, 3061, 86,
- 86, 3064, 86, 86, 86, 3074, 3083, 3077, 3066, 3072,
- 3080, 3068, 3069, 3067, 86, 86, 3070, 3075, 3108, 86,
- 3073, 86, 86, 86, 86, 3078, 3079, 3081, 86, 3082,
- 3085, 3084, 3074, 86, 3077, 3086, 3072, 3080, 86, 86,
- 86, 3087, 86, 3088, 3075, 86, 3089, 86, 3091, 3090,
- 86, 3815, 3078, 3079, 3081, 3094, 3082, 3085, 3084, 86,
-
- 3093, 3092, 86, 86, 3096, 86, 3099, 86, 3087, 86,
- 3088, 86, 3095, 3089, 86, 3091, 3090, 3098, 86, 3097,
- 3100, 3101, 3094, 3103, 86, 3104, 86, 3093, 3092, 86,
- 3102, 3096, 3105, 86, 3109, 3815, 3110, 3113, 86, 3095,
- 3106, 86, 3107, 86, 3098, 86, 3097, 86, 3101, 86,
- 171, 86, 3104, 3111, 86, 3112, 86, 3102, 3114, 3105,
- 3115, 3109, 86, 3110, 86, 86, 3116, 3106, 3117, 3107,
- 3118, 3815, 3120, 3122, 86, 3119, 3121, 86, 3123, 3125,
- 3111, 3124, 3112, 3130, 3127, 86, 86, 3115, 3131, 3126,
- 3128, 3129, 86, 86, 86, 3117, 86, 86, 86, 3120,
-
- 3122, 86, 86, 3121, 86, 3132, 3125, 86, 3124, 86,
- 86, 3127, 3134, 3133, 3135, 86, 3126, 3128, 3129, 3815,
- 86, 3136, 3137, 3138, 3815, 3139, 3815, 86, 86, 3140,
- 3143, 3141, 3132, 3142, 86, 3146, 3144, 3145, 86, 86,
- 3133, 3135, 86, 86, 86, 3148, 86, 86, 3136, 3137,
- 3138, 86, 3139, 86, 86, 86, 3140, 3143, 3141, 3147,
- 3142, 86, 3146, 3144, 3145, 3149, 3150, 3151, 86, 3152,
- 3153, 3156, 3148, 3154, 3155, 86, 3157, 86, 86, 86,
- 86, 86, 3158, 3159, 3815, 3162, 3147, 86, 3160, 3161,
- 86, 86, 3149, 3150, 3166, 3164, 3152, 3153, 3156, 86,
-
- 3154, 3155, 86, 86, 3173, 3163, 86, 86, 3165, 3158,
- 3159, 86, 3162, 86, 3170, 3160, 3161, 86, 3167, 3168,
- 86, 86, 3164, 3169, 3171, 3172, 86, 86, 3174, 3176,
- 86, 86, 3163, 3177, 3175, 3165, 86, 86, 86, 3178,
- 3179, 3170, 86, 3815, 3182, 3167, 3168, 3180, 3181, 86,
- 3169, 86, 3172, 3184, 3183, 3185, 3176, 3186, 3815, 86,
- 86, 3175, 86, 3187, 3188, 86, 86, 3179, 86, 3189,
- 86, 3182, 86, 3191, 3180, 3181, 3190, 86, 3192, 86,
- 86, 3183, 3185, 3193, 3186, 86, 3195, 86, 86, 3194,
- 3187, 3188, 3196, 86, 3197, 3198, 86, 3200, 3199, 86,
-
- 3191, 3201, 3202, 3190, 3203, 3192, 3205, 3208, 3204, 86,
- 86, 3206, 3207, 86, 86, 86, 3194, 3211, 86, 86,
- 86, 86, 3198, 86, 3200, 3199, 86, 86, 86, 3202,
- 3209, 3203, 3212, 3210, 3208, 3204, 3213, 86, 86, 3207,
- 86, 3214, 3215, 86, 3211, 3218, 3219, 3216, 3217, 3220,
- 3221, 3815, 3222, 3223, 3225, 86, 86, 3209, 3224, 86,
- 3210, 86, 86, 86, 3230, 3229, 86, 3231, 86, 3215,
- 86, 3228, 86, 3219, 3216, 3217, 3220, 86, 86, 3222,
- 86, 86, 3226, 3227, 86, 3224, 3232, 3240, 3234, 3233,
- 86, 86, 86, 3235, 3231, 3236, 86, 86, 3228, 86,
-
- 3237, 3238, 3239, 3241, 3243, 86, 3245, 86, 86, 3226,
- 3227, 86, 3242, 3246, 3244, 3247, 3233, 86, 86, 86,
- 86, 3248, 3236, 86, 3249, 86, 3815, 3237, 3238, 3239,
- 3241, 86, 3252, 3245, 3256, 86, 86, 86, 3253, 3242,
- 3246, 3244, 3247, 3250, 3251, 86, 3330, 86, 3248, 3254,
- 86, 3249, 3263, 86, 86, 3255, 86, 3264, 3261, 3252,
- 3257, 86, 3260, 3815, 3258, 3253, 86, 3262, 86, 3265,
- 3250, 3251, 3259, 86, 3266, 86, 3254, 3268, 86, 3269,
- 3815, 3270, 3255, 3271, 86, 3261, 86, 3257, 86, 3260,
- 3267, 3258, 3272, 3275, 3262, 3273, 3276, 3815, 86, 3259,
-
- 3274, 86, 3815, 86, 86, 86, 3269, 86, 3270, 86,
- 3271, 86, 3277, 86, 3278, 86, 3279, 3267, 86, 3272,
- 3275, 86, 3273, 3276, 3280, 3281, 3282, 3274, 3284, 86,
- 3285, 3283, 86, 86, 3287, 86, 3288, 86, 3286, 3277,
- 3289, 3278, 3290, 3279, 3291, 86, 86, 3292, 86, 86,
- 3293, 3280, 3281, 3282, 86, 3284, 3295, 3285, 3283, 3296,
- 3297, 86, 3298, 86, 86, 3286, 3294, 3289, 86, 3290,
- 3299, 86, 86, 3300, 3292, 86, 3301, 3293, 3302, 86,
- 3303, 3304, 3306, 86, 86, 3307, 3296, 86, 3308, 3298,
- 3311, 86, 3305, 3294, 86, 3309, 3310, 86, 86, 86,
-
- 3300, 86, 3312, 3301, 86, 86, 86, 3303, 3304, 86,
- 3316, 86, 86, 86, 86, 3308, 3314, 3311, 3313, 3305,
- 3317, 3315, 3309, 3310, 86, 86, 3318, 3319, 3320, 3312,
- 3321, 3322, 3323, 3324, 3325, 3327, 86, 3316, 86, 86,
- 3328, 3331, 3326, 3336, 86, 3313, 86, 3317, 86, 86,
- 86, 86, 3329, 3318, 3319, 3320, 86, 86, 3322, 86,
- 3324, 3325, 86, 3332, 3333, 86, 3334, 86, 3331, 3326,
- 86, 3335, 3337, 3339, 3338, 86, 3815, 3348, 86, 3329,
- 86, 3340, 3815, 3341, 86, 3343, 86, 86, 3342, 3345,
- 3332, 3333, 3349, 3334, 3350, 86, 3815, 3344, 3335, 3337,
-
- 3339, 3338, 86, 86, 86, 3351, 86, 86, 3340, 86,
- 3341, 86, 3343, 3815, 3346, 3342, 3345, 3347, 3352, 86,
- 3353, 86, 3355, 86, 3344, 86, 3354, 3815, 86, 3356,
- 3357, 3358, 3351, 3359, 3360, 3364, 3365, 3361, 86, 3366,
- 86, 3346, 86, 86, 3347, 3352, 3362, 3353, 86, 86,
- 3363, 86, 86, 3354, 86, 3367, 3356, 3357, 86, 86,
- 3359, 3360, 3368, 3365, 3361, 3369, 86, 86, 86, 3370,
- 3375, 3371, 3815, 3362, 3372, 3380, 3373, 3363, 86, 86,
- 3376, 3379, 3367, 3374, 86, 3377, 86, 86, 86, 3368,
- 86, 3378, 3369, 86, 86, 86, 3370, 86, 3371, 86,
-
- 3381, 3372, 3380, 3373, 86, 86, 3382, 3376, 3379, 3383,
- 3374, 86, 3377, 3384, 86, 3385, 3386, 3389, 3378, 3387,
- 3388, 3391, 86, 86, 3390, 86, 86, 3381, 86, 3392,
- 3398, 3393, 3394, 3382, 3397, 86, 3383, 3395, 86, 86,
- 3384, 3396, 3385, 3386, 3389, 86, 3387, 3388, 86, 3399,
- 3401, 3390, 3402, 3400, 86, 86, 86, 86, 3393, 86,
- 3403, 3397, 3404, 86, 86, 3407, 3406, 3405, 3396, 3411,
- 3410, 86, 3409, 86, 3408, 3815, 86, 86, 86, 3402,
- 3400, 86, 3412, 3413, 86, 3414, 3418, 3403, 86, 3404,
- 86, 86, 86, 3406, 3405, 3415, 3411, 3416, 3417, 3409,
-
- 3419, 3408, 86, 3421, 3422, 86, 3425, 86, 86, 86,
- 3413, 86, 3414, 86, 3420, 3423, 3424, 86, 3426, 3429,
- 86, 86, 3415, 3428, 3416, 3417, 86, 3427, 3431, 3432,
- 86, 3422, 86, 86, 3434, 86, 3438, 3436, 3430, 86,
- 3435, 3420, 3423, 3424, 86, 86, 86, 86, 86, 3439,
- 3428, 3433, 86, 3437, 3427, 3431, 3432, 3440, 86, 3441,
- 86, 86, 3442, 86, 3436, 3430, 86, 3435, 3444, 3445,
- 3443, 3446, 3447, 3448, 3815, 86, 3439, 3451, 3433, 3453,
- 3437, 86, 3449, 86, 3440, 86, 3441, 86, 86, 3442,
- 3450, 86, 3452, 3454, 3457, 3444, 86, 3443, 86, 3447,
-
- 3458, 86, 3462, 3466, 86, 86, 3453, 3459, 3465, 3449,
- 3455, 3456, 86, 3467, 86, 86, 86, 3450, 3461, 3452,
- 86, 86, 3460, 3463, 86, 86, 86, 3458, 3464, 86,
- 86, 86, 86, 3468, 3459, 3465, 3469, 3455, 3456, 86,
- 86, 3470, 3471, 3472, 3473, 3461, 3474, 3475, 3476, 3460,
- 3463, 3481, 3477, 3479, 86, 3464, 3478, 86, 86, 3480,
- 86, 3482, 3483, 3469, 86, 86, 86, 3484, 3470, 3471,
- 86, 86, 86, 86, 3475, 86, 3485, 3486, 86, 3477,
- 3490, 86, 86, 3478, 86, 86, 3480, 3487, 3482, 86,
- 3488, 3489, 86, 3491, 86, 3494, 86, 3493, 86, 3492,
-
- 86, 3496, 3495, 3485, 3486, 86, 86, 3490, 86, 86,
- 3497, 3498, 3499, 3501, 3487, 3506, 3500, 3488, 3489, 86,
- 86, 86, 3494, 3502, 3493, 86, 3492, 3504, 3496, 3495,
- 86, 3505, 3503, 3507, 3508, 86, 3815, 86, 86, 3499,
- 86, 3509, 3506, 3500, 3510, 86, 3511, 3512, 3513, 86,
- 3502, 3815, 3514, 86, 3504, 3515, 3815, 86, 3505, 3503,
- 86, 86, 86, 86, 3516, 3518, 3517, 86, 3509, 3519,
- 3521, 3510, 86, 3520, 3512, 3513, 86, 86, 86, 86,
- 3522, 3524, 3515, 3523, 3531, 86, 3535, 86, 86, 86,
- 86, 3516, 3518, 3517, 3527, 86, 3519, 3521, 3525, 3526,
-
- 3520, 86, 86, 86, 3528, 86, 86, 3522, 3524, 3815,
- 3523, 3531, 3529, 3530, 3532, 86, 3533, 3534, 86, 3539,
- 3536, 3527, 86, 3537, 86, 3525, 3526, 3538, 3540, 3541,
- 86, 3528, 3544, 86, 3542, 3547, 86, 3543, 86, 3529,
- 3530, 3532, 86, 3533, 3534, 3545, 3539, 3536, 3549, 86,
- 3537, 86, 3546, 3548, 3538, 86, 86, 86, 3554, 86,
- 86, 3542, 86, 3557, 3543, 86, 3558, 86, 3552, 3553,
- 3555, 3556, 3545, 3559, 3560, 86, 3562, 3563, 3561, 3546,
- 3548, 3564, 3568, 3815, 3815, 86, 86, 86, 86, 86,
- 3557, 86, 3567, 3558, 3571, 3565, 86, 86, 3572, 86,
-
- 3559, 86, 86, 3562, 86, 3561, 3566, 86, 3564, 86,
- 3570, 3569, 3573, 86, 86, 3575, 3574, 86, 86, 3567,
- 86, 3571, 3565, 3576, 3577, 3572, 3578, 86, 3580, 3579,
- 3581, 3582, 86, 3566, 86, 86, 3583, 3570, 3569, 3573,
- 3584, 3585, 3575, 3574, 3586, 3589, 86, 86, 86, 3591,
- 3576, 3577, 3593, 86, 86, 3580, 3579, 86, 86, 86,
- 3587, 86, 86, 3583, 3590, 3588, 86, 3584, 3585, 3592,
- 3595, 3586, 3594, 3596, 86, 86, 3591, 86, 86, 3593,
- 3597, 3598, 3599, 3600, 3602, 3815, 3601, 3603, 3604, 3605,
- 3608, 3590, 86, 3609, 86, 3607, 3592, 3595, 86, 3594,
-
- 86, 86, 86, 3606, 86, 3610, 86, 3611, 3598, 86,
- 86, 3602, 86, 3601, 86, 3604, 86, 86, 3612, 3613,
- 86, 86, 3607, 3614, 3615, 3616, 86, 3618, 3619, 3617,
- 3606, 3620, 86, 3621, 86, 3622, 3624, 3626, 3815, 3815,
- 3631, 3623, 86, 3630, 3815, 86, 86, 86, 86, 86,
- 86, 86, 3616, 86, 86, 86, 3617, 3625, 3620, 3627,
- 3621, 3628, 3622, 86, 86, 86, 3629, 86, 3623, 86,
- 3630, 86, 3633, 3632, 3634, 86, 3636, 86, 3635, 3815,
- 3637, 86, 3638, 86, 3625, 86, 3627, 3639, 3628, 3640,
- 3642, 86, 3815, 3629, 3815, 3641, 3643, 3815, 3647, 86,
-
- 3632, 3634, 86, 3636, 86, 3635, 86, 3637, 86, 3638,
- 3644, 86, 86, 3645, 3639, 3646, 86, 3642, 3648, 86,
- 3649, 86, 3641, 3643, 86, 3647, 3650, 3651, 86, 3653,
- 3815, 3652, 86, 3654, 3655, 3656, 86, 3644, 86, 3657,
- 3645, 86, 3646, 3658, 3659, 3648, 3660, 3649, 86, 3661,
- 86, 86, 86, 3650, 3651, 3662, 3653, 86, 3652, 3665,
- 3654, 3655, 86, 86, 3664, 3663, 86, 86, 3666, 3815,
- 86, 86, 86, 3660, 3667, 3668, 3661, 86, 86, 3670,
- 3671, 3669, 3662, 3675, 86, 86, 3665, 3674, 3815, 3672,
- 3673, 3664, 3663, 86, 86, 3666, 86, 86, 86, 86,
-
- 86, 3667, 3668, 3676, 3677, 86, 3670, 3671, 3669, 3678,
- 3675, 3679, 3680, 3681, 3674, 86, 3672, 3673, 86, 3682,
- 3684, 3683, 86, 3686, 86, 3685, 3689, 3688, 86, 86,
- 3676, 3677, 86, 86, 86, 3691, 3678, 3692, 3679, 3680,
- 3681, 86, 3687, 3690, 3693, 86, 3682, 86, 3683, 3694,
- 3686, 3695, 3685, 86, 3688, 86, 3697, 3698, 3696, 86,
- 3699, 86, 86, 86, 3692, 86, 3700, 3702, 86, 3687,
- 3690, 86, 3815, 3705, 3701, 3703, 86, 3704, 3695, 86,
- 86, 3706, 86, 3697, 3698, 3696, 86, 3699, 86, 3707,
- 3708, 3709, 86, 3700, 3710, 86, 86, 3711, 3712, 86,
-
- 3705, 3701, 3703, 3713, 3704, 3714, 3716, 3715, 86, 3717,
- 86, 86, 3718, 3721, 3722, 86, 3707, 86, 86, 86,
- 3720, 86, 3719, 3724, 86, 3712, 3726, 3723, 86, 3727,
- 3713, 3728, 86, 3716, 3715, 3725, 86, 86, 86, 3718,
- 86, 86, 3731, 86, 3732, 86, 86, 3720, 86, 3719,
- 3724, 3729, 3730, 3726, 3723, 86, 86, 86, 86, 86,
- 3734, 3733, 3725, 3736, 3735, 3738, 3737, 86, 86, 3731,
- 3815, 3732, 86, 86, 3739, 3740, 3741, 86, 3729, 3730,
- 86, 3744, 86, 3745, 3746, 3743, 3747, 3734, 3733, 86,
- 3736, 3735, 3738, 3737, 86, 3748, 86, 86, 3742, 3815,
-
- 3753, 3739, 3740, 86, 3749, 86, 86, 3750, 3744, 3752,
- 86, 3746, 3743, 3751, 3754, 3755, 3756, 86, 86, 3815,
- 3758, 86, 3748, 3757, 3759, 3742, 86, 3762, 86, 86,
- 3760, 3749, 86, 3766, 3750, 86, 3752, 86, 86, 3765,
- 3751, 86, 3755, 86, 86, 3761, 86, 3758, 3763, 3764,
- 3757, 3759, 3767, 86, 3770, 3768, 86, 3760, 3769, 86,
- 86, 3771, 86, 86, 3772, 86, 3765, 3773, 3774, 86,
- 86, 3777, 3761, 3775, 3815, 3763, 3764, 3815, 86, 3767,
- 86, 3770, 3768, 3776, 86, 3769, 3779, 86, 3771, 3780,
- 86, 3772, 3781, 86, 3773, 3774, 3778, 86, 3777, 3783,
-
- 3775, 3782, 3784, 3785, 86, 3787, 3786, 86, 3815, 3793,
- 3776, 3815, 86, 3779, 86, 86, 3780, 3788, 3789, 3781,
- 3791, 86, 3815, 3778, 3795, 86, 3783, 3790, 3782, 86,
- 3785, 86, 86, 3786, 3796, 86, 86, 86, 86, 3799,
- 3792, 3794, 86, 3800, 3788, 3789, 86, 3791, 86, 86,
- 3797, 3795, 3798, 3804, 3790, 3801, 86, 3803, 86, 3806,
- 86, 3796, 3815, 86, 3802, 86, 3799, 3792, 3794, 3805,
- 86, 3807, 86, 3808, 3813, 3809, 3815, 3797, 3814, 3798,
- 86, 3810, 3801, 86, 3803, 3815, 86, 3811, 3815, 86,
- 3815, 3802, 3815, 86, 3815, 86, 3805, 86, 86, 3812,
-
- 3808, 86, 3809, 86, 3815, 86, 3815, 86, 3810, 3815,
- 3815, 3815, 3815, 3815, 3811, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3812, 47, 47, 47,
- 47, 47, 47, 47, 52, 52, 52, 52, 52, 52,
- 52, 57, 57, 57, 57, 57, 57, 57, 63, 63,
- 63, 63, 63, 63, 63, 68, 68, 68, 68, 68,
- 68, 68, 74, 74, 74, 74, 74, 74, 74, 80,
- 80, 80, 80, 80, 80, 80, 89, 89, 3815, 89,
- 89, 89, 89, 161, 161, 3815, 3815, 3815, 161, 161,
- 163, 163, 3815, 3815, 163, 3815, 163, 165, 3815, 3815,
-
- 3815, 3815, 3815, 165, 168, 168, 3815, 3815, 3815, 168,
- 168, 170, 3815, 3815, 3815, 3815, 3815, 170, 172, 172,
- 3815, 172, 172, 172, 172, 175, 3815, 3815, 3815, 3815,
- 3815, 175, 178, 178, 3815, 3815, 3815, 178, 178, 90,
- 90, 3815, 90, 90, 90, 90, 17, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
-
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815
+ 43, 44, 45, 18, 18, 46, 49, 50, 51, 49,
+ 50, 51, 54, 55, 54, 55, 56, 121, 56, 59,
+ 60, 61, 62, 122, 22, 59, 60, 61, 62, 87,
+ 22, 65, 66, 67, 65, 66, 67, 88, 163, 163,
+
+ 86, 89, 355, 52, 121, 87, 52, 170, 170, 57,
+ 122, 57, 173, 76, 77, 78, 79, 63, 22, 76,
+ 77, 78, 79, 63, 22, 82, 83, 84, 68, 99,
+ 87, 68, 19, 20, 21, 70, 71, 72, 19, 20,
+ 21, 70, 71, 72, 82, 83, 84, 123, 110, 180,
+ 180, 80, 73, 162, 173, 87, 99, 80, 73, 87,
+ 139, 91, 85, 91, 91, 87, 91, 181, 111, 809,
+ 74, 87, 91, 87, 123, 110, 74, 179, 88, 73,
+ 162, 85, 89, 163, 163, 73, 114, 139, 112, 178,
+ 161, 173, 132, 176, 115, 111, 100, 87, 87, 92,
+
+ 93, 94, 113, 101, 95, 116, 173, 102, 192, 96,
+ 103, 97, 87, 114, 87, 112, 87, 161, 98, 132,
+ 176, 115, 87, 100, 87, 182, 87, 93, 94, 113,
+ 101, 95, 116, 305, 102, 192, 96, 103, 97, 165,
+ 183, 165, 165, 432, 165, 98, 104, 343, 117, 87,
+ 105, 118, 182, 106, 184, 107, 108, 347, 119, 86,
+ 120, 86, 86, 87, 86, 87, 109, 183, 87, 171,
+ 86, 87, 87, 104, 87, 117, 124, 105, 118, 87,
+ 106, 184, 107, 108, 125, 119, 191, 120, 128, 87,
+ 126, 187, 129, 109, 127, 87, 158, 169, 87, 150,
+
+ 159, 151, 87, 124, 160, 185, 130, 168, 131, 166,
+ 152, 125, 164, 191, 87, 128, 153, 126, 187, 129,
+ 87, 127, 87, 158, 154, 87, 150, 159, 151, 204,
+ 87, 160, 185, 130, 155, 131, 133, 152, 156, 157,
+ 134, 186, 87, 153, 135, 170, 170, 87, 181, 87,
+ 136, 154, 167, 137, 167, 167, 204, 167, 188, 200,
+ 138, 155, 87, 133, 87, 156, 157, 134, 186, 179,
+ 91, 135, 91, 91, 211, 91, 172, 136, 172, 172,
+ 137, 172, 87, 87, 178, 188, 200, 138, 140, 254,
+ 87, 177, 141, 177, 177, 86, 177, 86, 86, 248,
+
+ 86, 211, 142, 143, 189, 144, 86, 91, 175, 91,
+ 91, 212, 91, 201, 87, 140, 254, 190, 91, 141,
+ 87, 87, 193, 194, 173, 87, 248, 171, 87, 142,
+ 143, 189, 144, 145, 207, 87, 146, 169, 212, 213,
+ 201, 87, 205, 147, 190, 92, 195, 148, 149, 193,
+ 194, 206, 196, 202, 197, 87, 198, 199, 180, 180,
+ 145, 207, 87, 146, 87, 87, 213, 87, 215, 205,
+ 147, 203, 233, 195, 148, 149, 221, 168, 206, 196,
+ 216, 197, 214, 198, 199, 87, 208, 209, 217, 87,
+ 87, 218, 87, 87, 210, 215, 497, 224, 203, 233,
+
+ 222, 166, 87, 223, 219, 220, 236, 216, 87, 214,
+ 164, 87, 87, 208, 209, 217, 226, 225, 218, 87,
+ 227, 210, 231, 232, 224, 87, 87, 222, 238, 229,
+ 223, 219, 220, 236, 230, 87, 228, 87, 234, 237,
+ 87, 239, 87, 226, 225, 235, 87, 227, 87, 231,
+ 232, 240, 87, 241, 242, 238, 229, 87, 243, 87,
+ 244, 230, 87, 228, 245, 234, 237, 87, 239, 247,
+ 246, 3904, 235, 3904, 87, 250, 87, 87, 240, 249,
+ 241, 242, 87, 253, 251, 243, 87, 244, 256, 262,
+ 252, 245, 255, 259, 362, 87, 247, 246, 87, 257,
+
+ 87, 260, 250, 258, 87, 263, 249, 87, 87, 261,
+ 253, 251, 87, 268, 349, 256, 262, 252, 266, 255,
+ 259, 362, 264, 3904, 87, 265, 257, 269, 270, 267,
+ 258, 87, 263, 87, 87, 87, 261, 271, 87, 3904,
+ 268, 272, 275, 276, 277, 266, 87, 3904, 87, 264,
+ 273, 278, 265, 279, 269, 270, 267, 87, 280, 87,
+ 87, 281, 274, 3904, 271, 87, 87, 3904, 272, 275,
+ 276, 277, 3904, 284, 87, 87, 87, 273, 278, 167,
+ 279, 167, 167, 282, 167, 280, 283, 285, 281, 274,
+ 172, 3904, 172, 172, 91, 172, 91, 91, 177, 91,
+
+ 177, 177, 286, 177, 287, 87, 291, 173, 87, 3904,
+ 282, 87, 293, 283, 285, 288, 87, 289, 292, 87,
+ 87, 295, 87, 294, 290, 297, 3904, 296, 298, 286,
+ 353, 287, 175, 291, 87, 87, 87, 87, 301, 293,
+ 87, 87, 288, 87, 289, 292, 87, 299, 295, 302,
+ 294, 290, 297, 300, 296, 298, 303, 315, 304, 318,
+ 306, 316, 87, 314, 307, 301, 317, 87, 1269, 1025,
+ 319, 87, 87, 320, 323, 356, 302, 3904, 332, 87,
+ 300, 308, 87, 303, 315, 304, 318, 87, 87, 87,
+ 314, 307, 87, 87, 322, 87, 321, 319, 87, 87,
+
+ 320, 87, 324, 328, 325, 332, 87, 87, 308, 309,
+ 329, 87, 326, 327, 310, 3904, 87, 342, 3904, 311,
+ 333, 322, 87, 321, 87, 312, 313, 87, 87, 324,
+ 328, 325, 87, 334, 87, 330, 309, 329, 331, 326,
+ 327, 310, 87, 3904, 342, 340, 311, 333, 344, 341,
+ 87, 348, 312, 313, 3904, 87, 87, 345, 87, 350,
+ 334, 357, 330, 372, 3904, 331, 335, 87, 346, 336,
+ 358, 337, 340, 351, 87, 344, 341, 354, 348, 361,
+ 352, 87, 363, 338, 87, 339, 87, 364, 357, 87,
+ 372, 87, 87, 335, 87, 346, 336, 365, 337, 87,
+
+ 351, 359, 87, 87, 354, 370, 360, 352, 366, 363,
+ 338, 87, 339, 368, 364, 369, 87, 367, 87, 87,
+ 374, 371, 87, 375, 365, 373, 87, 378, 359, 379,
+ 87, 87, 370, 360, 87, 366, 376, 87, 87, 380,
+ 368, 377, 369, 87, 367, 382, 381, 374, 371, 87,
+ 375, 87, 373, 385, 378, 386, 379, 387, 383, 384,
+ 3904, 388, 87, 392, 87, 389, 380, 87, 87, 87,
+ 390, 391, 393, 381, 394, 395, 397, 87, 87, 396,
+ 385, 399, 87, 87, 387, 383, 384, 87, 388, 87,
+ 87, 87, 389, 398, 87, 87, 402, 390, 391, 400,
+
+ 403, 394, 407, 397, 87, 405, 396, 87, 87, 87,
+ 3904, 406, 412, 409, 410, 408, 411, 404, 87, 87,
+ 398, 87, 401, 87, 87, 87, 414, 403, 87, 407,
+ 173, 87, 405, 87, 87, 415, 416, 417, 406, 412,
+ 409, 410, 408, 411, 404, 419, 413, 418, 87, 401,
+ 87, 420, 421, 414, 423, 429, 425, 422, 424, 87,
+ 426, 427, 87, 87, 417, 87, 87, 87, 87, 87,
+ 428, 87, 87, 413, 418, 87, 430, 87, 420, 421,
+ 87, 423, 429, 425, 422, 424, 431, 426, 434, 433,
+ 3904, 435, 3904, 87, 87, 436, 439, 428, 87, 3904,
+
+ 3904, 440, 87, 430, 444, 437, 87, 441, 442, 446,
+ 448, 451, 87, 431, 87, 434, 433, 87, 435, 438,
+ 87, 443, 436, 439, 87, 87, 87, 445, 440, 87,
+ 447, 87, 437, 449, 441, 442, 87, 87, 451, 452,
+ 87, 87, 87, 453, 454, 456, 438, 460, 443, 3904,
+ 450, 459, 87, 457, 445, 87, 87, 447, 458, 461,
+ 449, 87, 87, 3904, 87, 87, 452, 463, 455, 471,
+ 462, 519, 456, 87, 460, 87, 87, 450, 459, 87,
+ 457, 464, 465, 87, 466, 458, 461, 467, 468, 87,
+ 87, 87, 470, 472, 463, 455, 87, 462, 473, 3904,
+
+ 481, 87, 483, 87, 490, 469, 3904, 87, 464, 465,
+ 87, 466, 87, 87, 467, 468, 491, 87, 87, 470,
+ 472, 3904, 526, 499, 87, 473, 482, 481, 87, 483,
+ 87, 490, 469, 474, 498, 87, 492, 495, 475, 493,
+ 494, 476, 496, 491, 3904, 502, 477, 478, 479, 480,
+ 87, 87, 3904, 482, 87, 3904, 87, 87, 87, 503,
+ 474, 498, 506, 492, 87, 475, 493, 494, 476, 87,
+ 508, 87, 502, 477, 478, 479, 480, 484, 500, 485,
+ 87, 501, 507, 3904, 504, 505, 503, 510, 87, 506,
+ 511, 486, 487, 488, 87, 489, 512, 87, 87, 509,
+
+ 87, 87, 514, 513, 484, 500, 485, 3904, 501, 507,
+ 515, 504, 505, 87, 510, 87, 87, 511, 486, 487,
+ 488, 87, 489, 512, 87, 87, 509, 516, 518, 514,
+ 513, 517, 524, 3904, 520, 87, 521, 515, 87, 87,
+ 87, 3904, 525, 527, 528, 522, 3904, 3904, 533, 530,
+ 529, 531, 523, 540, 516, 518, 538, 1430, 517, 524,
+ 87, 520, 532, 521, 87, 87, 87, 539, 534, 525,
+ 527, 528, 522, 87, 87, 87, 530, 529, 531, 523,
+ 87, 535, 541, 538, 536, 87, 537, 87, 542, 532,
+ 555, 3904, 87, 87, 539, 534, 556, 87, 574, 576,
+
+ 558, 3904, 3904, 575, 3904, 561, 3904, 559, 535, 87,
+ 87, 536, 87, 537, 557, 542, 543, 555, 544, 87,
+ 87, 562, 560, 556, 545, 563, 3904, 558, 546, 87,
+ 87, 87, 561, 547, 559, 87, 548, 3904, 87, 3904,
+ 573, 557, 87, 543, 572, 544, 3904, 577, 562, 560,
+ 581, 545, 563, 579, 578, 546, 87, 584, 87, 173,
+ 547, 580, 87, 548, 549, 582, 550, 573, 87, 87,
+ 583, 572, 586, 87, 577, 599, 585, 581, 87, 551,
+ 579, 578, 552, 87, 553, 87, 554, 589, 580, 87,
+ 87, 549, 582, 550, 587, 588, 590, 583, 3904, 586,
+
+ 3904, 87, 606, 585, 87, 593, 551, 87, 87, 552,
+ 594, 553, 87, 554, 564, 565, 591, 87, 595, 87,
+ 600, 587, 588, 590, 566, 567, 568, 569, 570, 606,
+ 87, 571, 593, 601, 592, 596, 598, 594, 87, 87,
+ 87, 564, 565, 591, 597, 595, 87, 600, 87, 602,
+ 603, 566, 567, 568, 569, 570, 604, 87, 571, 87,
+ 601, 592, 596, 598, 87, 605, 87, 607, 608, 87,
+ 3904, 597, 609, 610, 3904, 611, 602, 603, 87, 612,
+ 613, 614, 87, 604, 616, 615, 87, 3904, 617, 3904,
+ 87, 87, 87, 621, 607, 608, 624, 87, 87, 618,
+
+ 619, 87, 611, 640, 3904, 3904, 612, 613, 614, 87,
+ 87, 616, 615, 622, 627, 617, 87, 620, 626, 629,
+ 621, 625, 87, 624, 87, 87, 618, 619, 623, 87,
+ 87, 642, 87, 628, 641, 87, 87, 630, 631, 643,
+ 622, 627, 87, 645, 620, 626, 629, 648, 625, 632,
+ 644, 633, 87, 87, 654, 623, 87, 646, 642, 647,
+ 628, 641, 87, 87, 630, 631, 643, 650, 87, 649,
+ 87, 652, 3904, 658, 648, 87, 632, 644, 633, 634,
+ 87, 87, 655, 651, 646, 653, 647, 635, 636, 87,
+ 87, 637, 638, 87, 650, 639, 649, 87, 652, 87,
+
+ 657, 87, 656, 659, 87, 87, 634, 662, 660, 655,
+ 651, 661, 653, 87, 635, 636, 87, 663, 637, 638,
+ 664, 667, 639, 87, 665, 87, 87, 657, 669, 656,
+ 659, 87, 666, 668, 662, 660, 87, 87, 661, 87,
+ 87, 670, 87, 671, 663, 3904, 672, 664, 667, 673,
+ 87, 665, 87, 674, 675, 669, 87, 676, 3904, 666,
+ 668, 677, 682, 678, 3904, 680, 3904, 87, 670, 681,
+ 671, 87, 87, 672, 87, 87, 673, 87, 683, 685,
+ 674, 675, 687, 679, 676, 87, 689, 87, 677, 87,
+ 678, 87, 680, 684, 87, 686, 681, 688, 87, 87,
+
+ 87, 87, 691, 87, 87, 683, 685, 690, 87, 687,
+ 679, 701, 694, 689, 87, 696, 692, 87, 693, 695,
+ 684, 87, 686, 697, 688, 87, 87, 698, 700, 691,
+ 699, 702, 3904, 87, 690, 708, 87, 703, 701, 694,
+ 704, 705, 706, 692, 87, 693, 695, 87, 87, 707,
+ 697, 709, 712, 87, 711, 87, 87, 699, 702, 87,
+ 87, 87, 708, 710, 703, 87, 714, 704, 705, 706,
+ 87, 3904, 715, 718, 717, 713, 707, 716, 87, 87,
+ 87, 711, 87, 87, 87, 719, 720, 722, 3904, 3904,
+ 710, 721, 3904, 714, 87, 87, 87, 725, 724, 715,
+
+ 718, 717, 713, 87, 716, 723, 87, 736, 87, 87,
+ 734, 87, 719, 720, 722, 735, 87, 87, 721, 87,
+ 737, 87, 738, 739, 725, 724, 765, 3904, 740, 775,
+ 87, 87, 723, 726, 736, 3904, 770, 734, 727, 87,
+ 728, 741, 735, 87, 744, 87, 729, 737, 730, 738,
+ 739, 731, 732, 765, 745, 740, 87, 87, 733, 87,
+ 726, 87, 742, 770, 87, 727, 743, 728, 741, 747,
+ 749, 744, 748, 729, 746, 730, 87, 750, 731, 732,
+ 87, 745, 3904, 752, 87, 733, 755, 751, 87, 742,
+ 87, 753, 754, 743, 757, 87, 747, 749, 756, 748,
+
+ 759, 746, 87, 760, 758, 87, 87, 761, 780, 87,
+ 752, 762, 3904, 755, 751, 87, 87, 763, 753, 754,
+ 87, 757, 87, 87, 764, 756, 87, 759, 766, 767,
+ 760, 758, 87, 768, 761, 772, 769, 771, 762, 776,
+ 87, 87, 773, 87, 763, 774, 777, 87, 87, 778,
+ 87, 764, 87, 87, 87, 766, 767, 87, 87, 781,
+ 768, 779, 772, 769, 771, 87, 776, 783, 173, 773,
+ 782, 87, 774, 777, 87, 784, 778, 786, 785, 87,
+ 87, 787, 788, 789, 790, 791, 781, 792, 779, 87,
+ 87, 793, 3904, 3904, 783, 796, 794, 782, 798, 87,
+
+ 87, 795, 784, 87, 786, 785, 87, 87, 787, 87,
+ 797, 790, 799, 810, 87, 87, 803, 87, 793, 87,
+ 87, 87, 796, 794, 800, 798, 806, 87, 795, 807,
+ 804, 801, 87, 808, 802, 805, 87, 797, 811, 799,
+ 87, 812, 87, 803, 813, 87, 816, 814, 817, 3904,
+ 819, 800, 815, 806, 87, 87, 87, 818, 801, 820,
+ 87, 802, 87, 821, 822, 87, 828, 824, 87, 823,
+ 841, 87, 87, 816, 87, 817, 87, 819, 825, 87,
+ 826, 87, 87, 87, 818, 827, 820, 830, 87, 87,
+ 821, 822, 829, 87, 824, 831, 823, 835, 87, 87,
+
+ 833, 832, 87, 834, 87, 825, 3904, 826, 87, 87,
+ 87, 836, 827, 87, 830, 837, 3904, 87, 838, 829,
+ 839, 842, 831, 87, 835, 840, 87, 833, 832, 87,
+ 834, 87, 87, 843, 852, 848, 871, 87, 836, 849,
+ 851, 850, 837, 87, 87, 838, 87, 839, 842, 844,
+ 87, 87, 840, 853, 845, 856, 87, 846, 847, 854,
+ 843, 852, 848, 87, 858, 87, 849, 851, 850, 3904,
+ 855, 857, 87, 87, 3904, 87, 844, 859, 3904, 863,
+ 853, 845, 87, 862, 846, 847, 854, 87, 87, 87,
+ 864, 858, 3904, 861, 867, 868, 865, 855, 857, 860,
+
+ 87, 87, 866, 87, 859, 87, 863, 87, 869, 87,
+ 862, 87, 87, 872, 87, 874, 873, 864, 870, 876,
+ 861, 867, 868, 865, 87, 87, 860, 875, 877, 866,
+ 87, 87, 87, 87, 878, 869, 879, 87, 880, 87,
+ 872, 881, 874, 873, 893, 870, 876, 882, 883, 884,
+ 3904, 87, 87, 885, 875, 877, 887, 886, 888, 889,
+ 890, 878, 87, 879, 87, 895, 891, 87, 881, 894,
+ 87, 87, 87, 87, 882, 896, 87, 87, 87, 898,
+ 885, 87, 892, 887, 886, 888, 889, 890, 87, 899,
+ 87, 87, 897, 891, 87, 908, 894, 87, 900, 87,
+
+ 87, 87, 896, 901, 902, 3904, 898, 903, 910, 892,
+ 904, 911, 909, 3904, 913, 912, 899, 905, 87, 897,
+ 87, 87, 87, 914, 906, 907, 87, 87, 915, 918,
+ 87, 902, 87, 87, 903, 910, 920, 904, 911, 909,
+ 87, 913, 912, 87, 905, 916, 921, 919, 87, 922,
+ 914, 906, 907, 924, 923, 915, 935, 925, 87, 87,
+ 917, 87, 87, 920, 926, 928, 3904, 927, 930, 87,
+ 929, 3904, 916, 921, 919, 87, 87, 87, 3904, 87,
+ 924, 87, 945, 937, 925, 936, 985, 917, 87, 87,
+ 87, 926, 928, 931, 927, 930, 932, 929, 933, 938,
+
+ 934, 87, 87, 939, 940, 87, 87, 87, 87, 941,
+ 937, 87, 936, 87, 87, 87, 3904, 87, 87, 942,
+ 931, 944, 946, 932, 947, 933, 938, 934, 943, 87,
+ 939, 940, 948, 87, 949, 950, 941, 87, 3904, 954,
+ 952, 87, 87, 87, 951, 953, 942, 87, 944, 946,
+ 87, 947, 87, 960, 87, 943, 955, 1003, 962, 948,
+ 3904, 949, 950, 87, 3904, 87, 954, 952, 956, 957,
+ 958, 951, 953, 959, 961, 87, 963, 87, 87, 964,
+ 960, 87, 965, 955, 87, 962, 966, 87, 968, 87,
+ 87, 967, 87, 971, 969, 956, 957, 958, 3904, 87,
+
+ 959, 961, 87, 963, 87, 87, 964, 87, 970, 965,
+ 87, 972, 973, 966, 976, 968, 87, 974, 967, 975,
+ 971, 969, 87, 977, 978, 980, 3904, 979, 3904, 981,
+ 982, 87, 3904, 87, 87, 970, 87, 87, 972, 973,
+ 983, 976, 87, 87, 974, 87, 975, 87, 87, 984,
+ 977, 978, 980, 986, 979, 987, 981, 982, 87, 989,
+ 988, 991, 3904, 990, 87, 992, 995, 983, 994, 3904,
+ 996, 993, 87, 87, 87, 173, 984, 3904, 997, 87,
+ 986, 87, 987, 87, 87, 1000, 989, 988, 991, 87,
+ 990, 1001, 992, 87, 998, 994, 87, 996, 993, 999,
+
+ 1002, 1006, 1004, 1010, 1005, 997, 1007, 87, 87, 87,
+ 87, 87, 1000, 1008, 1009, 87, 1011, 1012, 1001, 1013,
+ 1015, 87, 87, 87, 87, 1014, 87, 1002, 1006, 1004,
+ 1016, 1005, 1027, 1007, 87, 87, 87, 87, 3904, 87,
+ 1008, 1009, 1024, 1026, 1012, 1028, 1013, 1015, 87, 1040,
+ 87, 3904, 1014, 87, 87, 1029, 3904, 1016, 1017, 1027,
+ 87, 1018, 1031, 1030, 1033, 1019, 87, 1034, 1020, 1024,
+ 1026, 3904, 1028, 1035, 1063, 1021, 1022, 3904, 1023, 1064,
+ 87, 87, 1029, 87, 87, 1017, 1032, 87, 1018, 1031,
+ 1030, 1033, 1019, 87, 1034, 1020, 1036, 87, 1037, 87,
+
+ 1035, 1038, 1021, 1022, 1039, 1023, 87, 87, 3904, 1049,
+ 3904, 87, 87, 1032, 87, 1050, 87, 1052, 1051, 1054,
+ 3904, 1058, 87, 1036, 87, 1037, 87, 1062, 1038, 87,
+ 1053, 1039, 1041, 1042, 3904, 1043, 1049, 87, 1044, 1057,
+ 1055, 3904, 1050, 1045, 1052, 1051, 1054, 1059, 1058, 1046,
+ 1047, 87, 1048, 87, 1062, 1065, 1056, 1053, 87, 1041,
+ 1042, 87, 1043, 87, 1066, 1044, 1057, 1055, 1060, 87,
+ 1045, 1061, 1067, 87, 1059, 87, 1046, 1047, 1068, 1048,
+ 87, 1069, 1065, 1056, 87, 1073, 1071, 1070, 1075, 1072,
+ 87, 1066, 1074, 1076, 3904, 1060, 1081, 1078, 1061, 1067,
+
+ 87, 87, 1077, 87, 87, 1068, 1085, 87, 1069, 87,
+ 87, 87, 87, 1071, 1070, 1075, 1072, 87, 1079, 1074,
+ 1076, 1080, 87, 1081, 1078, 87, 87, 1082, 1083, 1077,
+ 1084, 1088, 87, 1085, 1087, 87, 87, 1086, 1089, 87,
+ 87, 1090, 1091, 87, 1094, 1079, 87, 1092, 1080, 87,
+ 1095, 1096, 1093, 1099, 1082, 1083, 1101, 1084, 1088, 1097,
+ 87, 1087, 1100, 87, 1086, 1098, 87, 87, 1090, 87,
+ 87, 1094, 87, 1102, 1103, 1104, 1105, 1106, 1096, 87,
+ 1108, 1107, 87, 1110, 87, 87, 1097, 1109, 87, 1100,
+ 87, 1112, 1098, 1111, 87, 87, 87, 87, 1114, 87,
+
+ 1102, 1103, 1104, 87, 87, 87, 1113, 1108, 1107, 87,
+ 1110, 87, 1116, 1115, 1109, 87, 87, 1117, 1112, 1118,
+ 1111, 87, 1119, 1120, 1122, 1114, 3904, 1121, 3904, 1123,
+ 1124, 1125, 87, 1113, 87, 87, 87, 1127, 87, 87,
+ 1115, 1126, 1128, 1129, 1117, 3904, 1118, 87, 87, 87,
+ 1130, 1122, 1131, 87, 1121, 87, 1123, 1124, 1125, 87,
+ 87, 1132, 1133, 87, 1127, 87, 1138, 87, 1126, 1128,
+ 1129, 1134, 87, 1135, 1137, 1140, 1147, 1130, 1136, 1131,
+ 87, 1141, 1139, 87, 1152, 87, 1143, 87, 1132, 1133,
+ 1146, 87, 87, 1138, 87, 87, 1144, 1142, 1134, 87,
+
+ 87, 1137, 1140, 87, 1145, 87, 1148, 1149, 1141, 1139,
+ 1150, 1152, 87, 1143, 1151, 87, 87, 1146, 1153, 3904,
+ 87, 1154, 1156, 1144, 1142, 87, 87, 1158, 1155, 87,
+ 1159, 1145, 1161, 1148, 1149, 87, 87, 1150, 1157, 87,
+ 87, 1151, 87, 1160, 1162, 1153, 1163, 1164, 1154, 1156,
+ 87, 87, 1165, 1166, 1158, 1155, 1167, 1159, 87, 1168,
+ 87, 87, 87, 1169, 87, 1157, 87, 1170, 1171, 1174,
+ 1160, 1162, 1176, 1163, 1164, 1173, 87, 87, 87, 1165,
+ 1166, 1175, 87, 1167, 1172, 1182, 1168, 87, 87, 87,
+ 1169, 87, 87, 1177, 1170, 87, 1174, 1179, 1178, 1176,
+
+ 87, 3904, 1173, 87, 1183, 87, 1180, 1181, 1175, 1185,
+ 1184, 1172, 1187, 87, 87, 1186, 1188, 87, 1189, 87,
+ 1177, 3904, 1190, 87, 1179, 1178, 1196, 1191, 87, 1194,
+ 1197, 1198, 1192, 1180, 1181, 87, 87, 1184, 1195, 1187,
+ 1193, 87, 1186, 1202, 87, 87, 1199, 87, 87, 1190,
+ 87, 87, 87, 1196, 1191, 1200, 1194, 1201, 1204, 1192,
+ 1205, 1203, 87, 87, 87, 1195, 1206, 1193, 87, 87,
+ 87, 87, 1207, 1199, 1211, 87, 1208, 3904, 1213, 1212,
+ 87, 1214, 1200, 1215, 1201, 87, 1218, 1205, 1203, 1209,
+ 87, 1210, 1216, 1206, 87, 1217, 3904, 87, 87, 1207,
+
+ 87, 1219, 87, 1208, 87, 1213, 173, 1220, 1214, 87,
+ 1215, 1221, 1222, 1218, 87, 87, 1209, 3904, 1210, 1216,
+ 1223, 1225, 1217, 87, 1227, 87, 1226, 1234, 1219, 1235,
+ 87, 1224, 3904, 87, 1220, 87, 1238, 1236, 1221, 1222,
+ 3904, 1239, 3904, 87, 87, 3904, 3904, 1223, 1225, 87,
+ 3904, 1227, 3904, 1226, 1234, 87, 1235, 1237, 1224, 1228,
+ 87, 1229, 1243, 87, 1236, 1230, 3904, 1231, 1239, 87,
+ 1240, 1241, 1232, 1242, 87, 3904, 1247, 1233, 1244, 1245,
+ 87, 1248, 1246, 87, 1237, 1249, 1228, 3904, 1229, 1243,
+ 1259, 87, 1230, 87, 1231, 87, 1257, 1240, 1241, 1232,
+
+ 1242, 87, 1250, 87, 1233, 1244, 1245, 1251, 87, 1246,
+ 1253, 1254, 1249, 1256, 1258, 87, 1268, 87, 87, 1252,
+ 1260, 1255, 87, 1257, 1262, 1266, 87, 87, 87, 1250,
+ 87, 1261, 1263, 87, 1251, 1264, 1267, 1253, 1254, 1265,
+ 1256, 1258, 87, 87, 87, 1270, 1252, 1260, 1255, 1590,
+ 1591, 1262, 1281, 1282, 87, 1271, 87, 87, 1261, 1263,
+ 87, 87, 1264, 1272, 1273, 3904, 1265, 87, 87, 1284,
+ 3904, 87, 1294, 87, 1283, 87, 1285, 87, 87, 1281,
+ 1282, 1287, 1271, 3904, 87, 1286, 1291, 87, 3904, 1301,
+ 1272, 1273, 1274, 1288, 87, 3904, 1284, 1275, 1289, 1276,
+
+ 87, 1283, 87, 1285, 87, 1277, 87, 87, 1287, 87,
+ 1278, 1279, 1286, 1291, 1290, 1292, 87, 1280, 87, 1274,
+ 1288, 1295, 1293, 87, 1275, 1289, 1276, 87, 1298, 1304,
+ 1296, 1297, 1277, 87, 3904, 1309, 3904, 1278, 1279, 87,
+ 87, 1290, 1292, 87, 1280, 87, 1302, 1299, 1295, 1293,
+ 1300, 1305, 1308, 1303, 1306, 1298, 87, 1296, 1297, 87,
+ 87, 87, 87, 1307, 1310, 1312, 87, 87, 1311, 87,
+ 1313, 1314, 1315, 1302, 1299, 87, 87, 1300, 1305, 1308,
+ 1303, 1306, 87, 87, 1316, 87, 87, 1318, 87, 1319,
+ 1307, 1310, 1312, 1317, 1320, 1311, 87, 1313, 1314, 1321,
+
+ 1323, 87, 87, 1322, 87, 1324, 1325, 87, 1326, 87,
+ 87, 1316, 1327, 1328, 1318, 87, 1319, 1329, 1334, 1333,
+ 1317, 1320, 87, 87, 87, 87, 1321, 1323, 87, 87,
+ 1322, 1331, 1324, 1325, 1330, 1326, 1336, 1345, 87, 1327,
+ 1332, 87, 87, 1335, 1329, 87, 1333, 87, 1337, 87,
+ 87, 87, 1338, 1343, 1339, 1340, 1341, 87, 1331, 1344,
+ 1346, 1330, 1342, 1336, 87, 3904, 3904, 1332, 3904, 87,
+ 1335, 87, 1347, 3904, 3904, 1337, 87, 87, 87, 1338,
+ 1343, 1339, 1340, 1341, 87, 87, 1344, 1349, 1348, 1342,
+ 87, 1350, 87, 1351, 1353, 1355, 1357, 1354, 1352, 1347,
+
+ 87, 87, 87, 1356, 1358, 1359, 1360, 87, 1361, 87,
+ 3904, 87, 1364, 1366, 1349, 1348, 87, 87, 1350, 3904,
+ 87, 1353, 1355, 1357, 1354, 87, 87, 87, 1362, 1363,
+ 1356, 1358, 1359, 1360, 1367, 1361, 1365, 1368, 1369, 3904,
+ 1370, 87, 87, 87, 87, 87, 87, 1371, 1372, 1375,
+ 1373, 87, 3904, 3904, 87, 1362, 1363, 1374, 1379, 87,
+ 87, 1367, 1376, 1365, 1368, 1369, 87, 1370, 1377, 1378,
+ 1381, 87, 87, 87, 1371, 1372, 1375, 1373, 1380, 87,
+ 87, 87, 1382, 1384, 1374, 1379, 1383, 1385, 3904, 1376,
+ 87, 87, 87, 1386, 1388, 1377, 1378, 1381, 1387, 87,
+
+ 1389, 1390, 1395, 87, 1391, 1380, 1393, 87, 1394, 1382,
+ 87, 87, 87, 1383, 87, 87, 1392, 1396, 87, 1397,
+ 1386, 1388, 87, 87, 1400, 1387, 87, 1389, 1390, 1402,
+ 87, 1391, 1398, 1393, 87, 1394, 1399, 1404, 1401, 1406,
+ 1403, 1405, 3904, 1392, 3904, 1408, 87, 1407, 87, 87,
+ 3904, 87, 1409, 1411, 87, 1410, 87, 1412, 87, 1398,
+ 87, 87, 87, 1399, 1404, 1401, 87, 1403, 1405, 87,
+ 87, 87, 87, 87, 1407, 87, 1414, 1413, 1415, 1409,
+ 1411, 1416, 1410, 1418, 1412, 87, 1419, 1417, 1420, 1421,
+ 1422, 1425, 87, 3904, 3904, 3904, 87, 87, 1424, 1423,
+
+ 87, 87, 87, 1414, 1413, 1415, 1427, 3904, 1416, 87,
+ 1418, 87, 1428, 1419, 1417, 1420, 1426, 1432, 87, 87,
+ 87, 87, 87, 1429, 87, 1424, 1423, 87, 1431, 1434,
+ 1433, 87, 87, 1427, 1435, 87, 1436, 87, 87, 1428,
+ 1437, 1438, 87, 1426, 1432, 1441, 1442, 1439, 1440, 1444,
+ 1429, 1450, 173, 1443, 87, 1431, 1434, 1433, 1448, 87,
+ 87, 1435, 1445, 1436, 87, 87, 1447, 87, 1438, 87,
+ 87, 1451, 1441, 1442, 1439, 1440, 1444, 1446, 87, 1449,
+ 1443, 1452, 1453, 87, 87, 87, 87, 1454, 1455, 1445,
+ 1457, 1456, 1458, 1447, 87, 87, 3904, 3904, 87, 1460,
+
+ 87, 1461, 1467, 87, 1446, 87, 1449, 1459, 1452, 1453,
+ 87, 1463, 87, 87, 1454, 1455, 87, 1457, 1456, 1458,
+ 87, 87, 1462, 1464, 1465, 1466, 1460, 1468, 1461, 87,
+ 87, 3904, 1469, 87, 1459, 87, 87, 1471, 1463, 1470,
+ 87, 1472, 1473, 87, 1479, 3904, 87, 1480, 3904, 1462,
+ 1464, 1465, 1466, 87, 1468, 87, 3904, 87, 1474, 1469,
+ 1481, 1475, 1482, 87, 1471, 87, 1470, 87, 1472, 1473,
+ 1476, 1479, 1477, 87, 1480, 1478, 1483, 1484, 1492, 1489,
+ 1488, 1485, 87, 87, 1486, 1474, 1487, 1481, 1475, 87,
+ 87, 1518, 87, 1497, 1493, 87, 87, 1476, 87, 1477,
+
+ 1491, 87, 1478, 1483, 1484, 87, 1489, 1488, 1485, 1490,
+ 87, 1486, 1494, 1487, 1495, 87, 87, 87, 1496, 3904,
+ 87, 1493, 1498, 87, 1499, 87, 87, 1491, 1500, 1502,
+ 87, 1501, 1503, 3904, 3904, 87, 1490, 3904, 3904, 1494,
+ 1519, 1495, 1504, 3904, 87, 1496, 87, 87, 1505, 1498,
+ 87, 1499, 87, 87, 87, 1500, 1502, 1506, 1501, 1503,
+ 87, 1507, 1509, 1510, 1511, 87, 1513, 1519, 1512, 1504,
+ 1508, 1514, 87, 1515, 87, 1505, 87, 3904, 3904, 87,
+ 87, 3904, 3904, 87, 1506, 87, 1517, 1516, 1507, 1509,
+ 1510, 1511, 1521, 1513, 87, 1512, 1520, 1508, 1514, 87,
+
+ 1515, 1523, 87, 87, 1522, 1524, 1526, 1525, 87, 87,
+ 87, 1528, 1527, 1517, 1516, 87, 87, 1530, 1529, 1521,
+ 87, 3904, 3904, 1520, 87, 87, 1531, 1532, 1523, 1533,
+ 1534, 1522, 1524, 1526, 1525, 1535, 1536, 87, 87, 1527,
+ 87, 1542, 1538, 87, 1537, 1529, 87, 1539, 87, 87,
+ 1543, 1541, 1540, 1531, 1532, 87, 1533, 1534, 87, 87,
+ 87, 1553, 1535, 1536, 87, 1558, 3904, 1551, 1542, 1554,
+ 3904, 1537, 1552, 1557, 87, 3904, 87, 1543, 1541, 1540,
+ 1544, 87, 1555, 1559, 1545, 1556, 3904, 1546, 1547, 1568,
+ 87, 87, 1548, 87, 1551, 87, 1554, 87, 1549, 1552,
+
+ 1557, 1560, 1550, 1569, 87, 87, 87, 1544, 87, 1555,
+ 1559, 1545, 1556, 1561, 1546, 1547, 1562, 3904, 1563, 1548,
+ 1566, 87, 87, 87, 1564, 1549, 1565, 87, 1560, 1550,
+ 1570, 1571, 1567, 1574, 1573, 87, 1576, 1578, 1621, 87,
+ 1561, 87, 3904, 1562, 87, 1563, 87, 1566, 87, 87,
+ 1577, 1564, 1579, 1565, 87, 1572, 87, 1570, 1571, 1567,
+ 1574, 1573, 87, 1575, 1580, 87, 1581, 3904, 87, 87,
+ 1587, 87, 87, 1588, 87, 1593, 3904, 1577, 3904, 1579,
+ 87, 1589, 1572, 1594, 3904, 3904, 87, 87, 1592, 1595,
+ 1575, 1580, 87, 1581, 1582, 87, 87, 1587, 87, 1583,
+
+ 1588, 1584, 1593, 1585, 87, 1586, 1597, 87, 1589, 1596,
+ 1594, 1600, 87, 1601, 1598, 1592, 1595, 1602, 87, 1599,
+ 1603, 1582, 87, 1605, 87, 1609, 1583, 1610, 1584, 87,
+ 1585, 87, 1586, 1597, 1611, 1604, 1596, 1606, 1600, 1608,
+ 1601, 87, 87, 1607, 1602, 87, 87, 1603, 87, 87,
+ 1605, 87, 87, 87, 1610, 1612, 1613, 87, 1614, 1615,
+ 1616, 1611, 1604, 1619, 1606, 87, 1608, 1618, 1617, 87,
+ 1607, 1620, 87, 1623, 87, 1624, 87, 1622, 87, 3904,
+ 87, 1625, 1612, 1613, 1630, 1614, 1615, 1616, 87, 87,
+ 1619, 1626, 1627, 87, 1618, 1617, 1632, 87, 1620, 1628,
+
+ 87, 1633, 1624, 1629, 1622, 1631, 87, 87, 1625, 1634,
+ 1635, 87, 87, 1638, 87, 87, 87, 1639, 1626, 1627,
+ 1643, 87, 1641, 87, 87, 3904, 1628, 87, 1633, 1636,
+ 1629, 87, 1631, 1637, 1642, 87, 1634, 1635, 1640, 87,
+ 87, 87, 1644, 1646, 1639, 1645, 87, 1648, 87, 1641,
+ 1647, 1651, 87, 1650, 1649, 1664, 1636, 1653, 1665, 87,
+ 1637, 1642, 1652, 87, 87, 1640, 87, 87, 87, 1644,
+ 1646, 87, 1645, 87, 1648, 87, 1654, 1647, 1651, 87,
+ 1650, 1649, 1655, 1656, 1653, 1658, 1657, 87, 1660, 1652,
+ 87, 3904, 1659, 3904, 3904, 87, 1661, 87, 1662, 1666,
+
+ 1667, 1668, 1663, 1654, 87, 3904, 3904, 87, 87, 1655,
+ 1656, 87, 1658, 1657, 87, 1660, 87, 87, 87, 1659,
+ 1669, 87, 87, 1661, 1670, 1662, 1666, 1667, 1671, 1663,
+ 1672, 1675, 87, 87, 1673, 1674, 1676, 1677, 87, 1679,
+ 1678, 87, 87, 1681, 87, 87, 87, 1669, 1682, 1683,
+ 1685, 1670, 173, 87, 87, 1671, 1680, 87, 1675, 1691,
+ 87, 1673, 1674, 1676, 1677, 1684, 1679, 1678, 1690, 3904,
+ 87, 1686, 1688, 1693, 1694, 87, 1683, 1687, 1689, 1692,
+ 87, 87, 87, 1680, 87, 87, 87, 87, 87, 1696,
+ 87, 87, 1684, 1695, 3904, 1690, 1697, 1700, 1686, 1688,
+
+ 1693, 1694, 87, 87, 1687, 1689, 1692, 1698, 1699, 87,
+ 1702, 1704, 1701, 1706, 1703, 87, 1696, 87, 87, 87,
+ 1695, 87, 1705, 1697, 1700, 1711, 87, 1708, 1707, 1712,
+ 87, 1713, 1709, 87, 1698, 1699, 1710, 87, 1704, 1701,
+ 1706, 1703, 87, 87, 87, 87, 1720, 1719, 87, 1705,
+ 1714, 3904, 1711, 1722, 1715, 1707, 1712, 1716, 1713, 87,
+ 1724, 1717, 87, 1710, 1718, 87, 87, 1721, 3904, 1723,
+ 1725, 87, 3904, 1720, 1719, 1726, 87, 1714, 1727, 1730,
+ 87, 1715, 3904, 87, 1716, 87, 87, 1724, 1717, 1728,
+ 87, 1718, 87, 1731, 1721, 1729, 1723, 1732, 1733, 1735,
+
+ 1737, 87, 87, 1734, 87, 1727, 1730, 87, 1738, 1741,
+ 87, 1736, 1744, 87, 1739, 87, 1728, 87, 87, 87,
+ 1731, 87, 1729, 87, 1732, 1733, 1735, 1737, 1740, 1743,
+ 1734, 1742, 87, 1745, 1746, 1738, 1741, 87, 1736, 1747,
+ 87, 1739, 1752, 1754, 87, 87, 1748, 87, 87, 1751,
+ 1749, 1750, 1753, 3904, 87, 1740, 1743, 87, 1742, 87,
+ 1745, 1746, 87, 87, 87, 87, 1747, 1758, 1756, 1752,
+ 1754, 1755, 87, 1748, 1759, 1760, 1751, 1749, 1750, 1753,
+ 87, 87, 1757, 1762, 1766, 87, 1761, 87, 87, 1763,
+ 87, 1764, 1765, 1767, 1758, 1756, 1773, 87, 1755, 1768,
+
+ 87, 1759, 1760, 1770, 87, 1774, 1769, 1772, 1775, 1757,
+ 1762, 1766, 1771, 1761, 87, 87, 1763, 1776, 87, 87,
+ 1767, 1780, 1781, 87, 87, 3904, 87, 87, 87, 87,
+ 1770, 1777, 1783, 1769, 1772, 1782, 1784, 87, 1788, 1771,
+ 87, 87, 1785, 87, 1776, 87, 1832, 1787, 87, 1781,
+ 1778, 87, 1779, 87, 1786, 87, 1790, 87, 1777, 1783,
+ 1791, 1789, 1782, 1784, 87, 1788, 87, 87, 87, 1785,
+ 1793, 1792, 1798, 87, 1787, 87, 1800, 1778, 87, 1779,
+ 1794, 1786, 87, 1790, 87, 1795, 1796, 1791, 1789, 1799,
+ 1803, 1797, 1801, 1802, 3904, 87, 87, 1793, 1792, 1798,
+
+ 87, 87, 87, 1800, 1804, 1805, 1807, 1806, 87, 1808,
+ 1814, 1812, 87, 87, 87, 87, 1799, 1803, 87, 1801,
+ 1802, 1809, 1811, 87, 1813, 87, 87, 1810, 1817, 87,
+ 3904, 1804, 1805, 1807, 1806, 1816, 87, 1815, 1812, 1818,
+ 1819, 87, 87, 87, 1820, 87, 1824, 87, 1809, 1811,
+ 1827, 1813, 87, 1821, 1810, 1822, 87, 1823, 87, 87,
+ 87, 87, 1816, 87, 1815, 87, 1818, 1819, 1825, 1826,
+ 1828, 1820, 1831, 1824, 87, 1829, 87, 1827, 1830, 1833,
+ 1821, 87, 1822, 87, 1823, 1834, 87, 87, 1835, 1836,
+ 1838, 3904, 1837, 3904, 87, 1825, 1826, 1828, 1844, 1831,
+
+ 1839, 1843, 1829, 87, 87, 1830, 87, 87, 87, 1840,
+ 87, 87, 1834, 1841, 87, 1835, 1836, 1838, 1846, 1837,
+ 1845, 1848, 87, 1849, 1847, 1844, 1842, 1839, 1843, 1851,
+ 87, 87, 87, 1850, 87, 1854, 1840, 1852, 1853, 1856,
+ 1841, 1855, 87, 3904, 1862, 1846, 1857, 1845, 1848, 87,
+ 87, 1847, 87, 1842, 1860, 87, 1863, 1865, 1869, 3904,
+ 1850, 87, 87, 87, 1852, 1853, 1856, 87, 1855, 87,
+ 1858, 1859, 87, 1857, 1867, 1861, 87, 87, 1864, 1866,
+ 87, 1860, 87, 87, 1868, 87, 1870, 87, 1871, 87,
+ 87, 1873, 1872, 87, 3904, 3904, 87, 1858, 1859, 1880,
+
+ 1877, 1867, 1861, 1874, 3904, 1864, 1866, 1882, 3904, 1875,
+ 87, 1868, 1876, 1870, 87, 87, 87, 87, 87, 1872,
+ 87, 1888, 1878, 87, 87, 1879, 1880, 1877, 87, 1883,
+ 1874, 1881, 87, 87, 1882, 1886, 1875, 1884, 87, 1876,
+ 1885, 87, 1887, 87, 1889, 1890, 3904, 3904, 87, 1878,
+ 1891, 3904, 1879, 87, 1892, 87, 1883, 87, 1881, 87,
+ 1895, 1894, 1886, 87, 1884, 1896, 87, 1885, 87, 1887,
+ 87, 1889, 1890, 1893, 1897, 87, 1898, 1891, 87, 1899,
+ 1900, 1892, 1901, 87, 1903, 1904, 87, 1895, 1894, 1902,
+ 87, 87, 1896, 1910, 1905, 1907, 87, 1906, 87, 3904,
+
+ 1893, 1897, 87, 1898, 1909, 87, 1899, 87, 1913, 1901,
+ 87, 1903, 1904, 87, 1911, 1908, 1902, 1916, 87, 1912,
+ 87, 1905, 1907, 87, 1906, 1914, 87, 1915, 173, 1917,
+ 1918, 1909, 87, 1919, 1920, 1913, 1924, 1921, 87, 87,
+ 1923, 87, 1908, 87, 1916, 1922, 87, 87, 1925, 87,
+ 87, 1927, 1914, 1929, 1915, 1931, 1917, 1918, 87, 1926,
+ 1919, 1920, 87, 1924, 1921, 1932, 87, 1923, 1933, 1928,
+ 87, 1930, 1922, 87, 1934, 1925, 87, 87, 1927, 87,
+ 1929, 87, 87, 87, 1935, 1936, 1926, 1937, 1940, 1939,
+ 87, 1941, 1932, 1938, 3904, 1933, 1928, 1942, 1930, 3904,
+
+ 87, 1934, 1946, 1945, 87, 1943, 1944, 87, 1949, 87,
+ 87, 1935, 1936, 87, 87, 1940, 1947, 1954, 1941, 87,
+ 1938, 87, 1950, 87, 87, 87, 1951, 1952, 1948, 1946,
+ 1945, 87, 1943, 1944, 87, 1949, 87, 1955, 87, 87,
+ 1953, 87, 1956, 1947, 1954, 1957, 1962, 3904, 87, 1950,
+ 1958, 87, 87, 1951, 1952, 1948, 1959, 87, 1964, 1960,
+ 87, 1966, 1963, 87, 1955, 1967, 1968, 1953, 87, 1956,
+ 1969, 1961, 1957, 1970, 1965, 1972, 1973, 1958, 87, 87,
+ 87, 1977, 87, 1959, 87, 1964, 1960, 87, 1966, 1963,
+ 1974, 1979, 1967, 1968, 87, 1975, 1971, 1969, 1961, 87,
+
+ 87, 1965, 1976, 1978, 1987, 87, 1980, 87, 87, 1982,
+ 1983, 1981, 87, 87, 1984, 87, 87, 1974, 1979, 87,
+ 1985, 87, 1975, 1971, 1986, 87, 87, 1988, 87, 1976,
+ 1978, 1987, 3904, 1980, 87, 1989, 1982, 1983, 1981, 87,
+ 1991, 1990, 1992, 1994, 1993, 1995, 87, 1996, 1998, 3904,
+ 87, 1997, 87, 87, 2003, 87, 87, 87, 87, 87,
+ 1999, 87, 1989, 87, 87, 2004, 2000, 87, 1990, 1992,
+ 1994, 1993, 1995, 87, 1996, 1998, 2001, 87, 1997, 87,
+ 2002, 2003, 87, 2005, 2006, 87, 2007, 1999, 2009, 2011,
+ 87, 87, 2004, 2000, 2008, 2010, 87, 2012, 2013, 2014,
+
+ 3904, 87, 87, 2001, 87, 87, 2019, 2002, 87, 87,
+ 2005, 2006, 87, 2007, 2015, 2009, 2011, 2017, 2018, 2022,
+ 2021, 2008, 2020, 2024, 2012, 2013, 2014, 87, 2023, 87,
+ 3904, 2039, 2016, 87, 87, 87, 87, 2026, 87, 2025,
+ 87, 2015, 87, 87, 2017, 2018, 2022, 2021, 2027, 2020,
+ 2024, 2028, 87, 2029, 87, 2023, 2030, 87, 87, 2016,
+ 2033, 2037, 2038, 87, 2026, 87, 2025, 2031, 2040, 87,
+ 2032, 87, 2034, 2036, 3904, 2027, 87, 2035, 2028, 2043,
+ 2029, 2041, 87, 2030, 87, 87, 87, 2033, 2037, 2038,
+ 2044, 2045, 2042, 2047, 2031, 87, 87, 2032, 2049, 2034,
+
+ 2036, 87, 2046, 87, 2035, 87, 2043, 2050, 2041, 2048,
+ 87, 2051, 2053, 87, 2054, 87, 2052, 87, 2045, 2042,
+ 2047, 2061, 87, 87, 87, 2049, 2059, 2055, 2060, 2046,
+ 2062, 87, 87, 87, 2050, 87, 2048, 2056, 2051, 2053,
+ 2057, 2054, 2058, 2052, 87, 87, 3904, 2064, 87, 2063,
+ 87, 2067, 2066, 2059, 2055, 87, 87, 2062, 2068, 2065,
+ 87, 87, 87, 2069, 2056, 87, 2070, 2057, 87, 2058,
+ 2071, 2072, 2073, 87, 2064, 2074, 2063, 3904, 2067, 2066,
+ 2075, 87, 2077, 2076, 2084, 87, 2065, 2078, 87, 2080,
+ 87, 2079, 3904, 2070, 87, 2085, 3904, 2071, 2072, 2073,
+
+ 87, 87, 2074, 2081, 87, 2082, 87, 2075, 2083, 2077,
+ 2076, 2084, 3904, 87, 2078, 87, 2080, 2086, 2079, 2087,
+ 2088, 87, 2085, 87, 2091, 87, 87, 2092, 2089, 87,
+ 2081, 2093, 2082, 2090, 2094, 2083, 87, 87, 2096, 87,
+ 2095, 2097, 2098, 2099, 2086, 2102, 2087, 2088, 2107, 2100,
+ 87, 2091, 2101, 87, 2092, 2104, 87, 2103, 2093, 2105,
+ 87, 2094, 87, 2111, 3904, 87, 87, 2095, 2097, 87,
+ 87, 87, 2106, 2108, 2112, 87, 2100, 87, 87, 2101,
+ 87, 2117, 2104, 2109, 2103, 87, 2105, 87, 2113, 2110,
+ 2114, 2118, 2116, 87, 2115, 87, 87, 2126, 87, 2106,
+
+ 2108, 2112, 87, 87, 2120, 2127, 2119, 87, 2117, 87,
+ 2109, 87, 2121, 2124, 2122, 2113, 2110, 2114, 2118, 2116,
+ 87, 2115, 87, 2123, 2128, 2130, 87, 87, 2129, 87,
+ 2134, 2120, 2136, 2119, 2125, 2132, 87, 87, 2131, 2121,
+ 87, 2122, 87, 2140, 87, 87, 2133, 2143, 87, 2135,
+ 2123, 2128, 87, 2137, 87, 2129, 2138, 87, 87, 2139,
+ 2145, 2125, 2132, 87, 87, 2131, 2142, 87, 87, 87,
+ 87, 2141, 2144, 2133, 2143, 2146, 2135, 2147, 87, 87,
+ 2137, 2148, 87, 2138, 2151, 87, 2139, 2145, 2152, 87,
+ 2149, 2155, 2153, 2142, 2154, 87, 2156, 87, 2141, 2144,
+
+ 87, 2150, 2146, 87, 2147, 2157, 87, 2158, 2148, 173,
+ 2160, 2151, 2159, 87, 87, 2152, 87, 2149, 2155, 2153,
+ 87, 2154, 87, 87, 2161, 2162, 2164, 2163, 2150, 2165,
+ 2166, 2171, 2157, 2168, 2158, 2169, 3904, 87, 87, 2159,
+ 87, 87, 2167, 87, 2172, 87, 87, 87, 2170, 87,
+ 2175, 2161, 2162, 2164, 2163, 87, 2165, 2166, 87, 87,
+ 2168, 2173, 2169, 87, 2174, 2176, 2177, 2178, 2179, 2167,
+ 87, 2172, 2180, 87, 2181, 2170, 2183, 87, 2182, 2184,
+ 3904, 3904, 2185, 2187, 3904, 87, 87, 2186, 2173, 87,
+ 87, 2174, 2176, 2177, 87, 2179, 87, 87, 2189, 2192,
+
+ 3904, 2181, 2194, 87, 87, 2182, 87, 87, 87, 2185,
+ 2187, 2188, 87, 2190, 2186, 2191, 2195, 2193, 87, 2197,
+ 87, 87, 87, 2196, 87, 2189, 2192, 2203, 3904, 2194,
+ 2200, 87, 2205, 2204, 2198, 87, 2206, 87, 2188, 87,
+ 2190, 87, 2191, 2195, 2193, 87, 2197, 2199, 2201, 87,
+ 2196, 2216, 87, 2208, 2203, 2202, 2207, 2200, 2209, 87,
+ 2204, 2198, 87, 2210, 87, 2211, 87, 3904, 87, 2213,
+ 87, 87, 2212, 2217, 2199, 2201, 87, 87, 2216, 87,
+ 2208, 2218, 2202, 2207, 2214, 2209, 2215, 2220, 2219, 2225,
+ 2210, 2221, 2211, 3904, 87, 87, 2213, 87, 2222, 2212,
+
+ 87, 2223, 2227, 2224, 87, 2229, 2226, 87, 87, 87,
+ 2231, 2214, 2228, 2215, 87, 2219, 87, 87, 2221, 2232,
+ 2235, 2233, 2230, 87, 2234, 2222, 87, 2236, 2223, 87,
+ 2224, 87, 2239, 2226, 87, 2238, 87, 87, 2237, 2228,
+ 2240, 2242, 87, 87, 87, 87, 2232, 2235, 2233, 2230,
+ 2241, 2234, 87, 2243, 87, 2244, 87, 87, 2246, 87,
+ 2254, 2245, 2238, 87, 2263, 2237, 2251, 2240, 2242, 2247,
+ 2248, 2249, 2253, 87, 3904, 87, 2250, 2241, 2252, 87,
+ 2243, 87, 2244, 87, 87, 2258, 2257, 87, 2245, 87,
+ 87, 2263, 87, 2251, 2255, 2256, 2247, 2248, 2249, 2253,
+
+ 2264, 87, 87, 2250, 2259, 2252, 87, 87, 2262, 2260,
+ 2261, 2266, 2258, 2257, 2265, 2267, 87, 2268, 2270, 2269,
+ 87, 2255, 2256, 87, 87, 87, 87, 2264, 2271, 87,
+ 2272, 2273, 2276, 87, 2274, 2262, 87, 2261, 87, 87,
+ 2275, 2265, 2267, 87, 2268, 87, 2269, 2277, 2279, 2280,
+ 2281, 87, 2282, 2278, 2284, 2271, 87, 2272, 2273, 87,
+ 87, 2274, 2286, 2283, 2285, 2287, 87, 2275, 87, 87,
+ 87, 2288, 87, 87, 87, 87, 2280, 2281, 87, 2282,
+ 2278, 2289, 2290, 2291, 2292, 2295, 87, 87, 2294, 2286,
+ 2283, 2285, 2287, 2297, 87, 2293, 87, 2298, 87, 2296,
+
+ 87, 2299, 87, 87, 87, 2300, 2301, 2302, 2289, 2290,
+ 2291, 2292, 87, 87, 87, 2294, 2303, 2304, 2306, 2307,
+ 2297, 3904, 2293, 87, 2305, 2308, 2296, 87, 2299, 87,
+ 2312, 2309, 87, 2301, 2302, 2313, 2311, 87, 87, 2314,
+ 2315, 2310, 87, 87, 2304, 2318, 87, 87, 87, 87,
+ 87, 2305, 2308, 87, 87, 2320, 2316, 2312, 2309, 87,
+ 2317, 87, 2313, 2311, 87, 87, 2314, 2315, 2310, 2319,
+ 87, 87, 2318, 2321, 3904, 2324, 2323, 2322, 3904, 2326,
+ 2327, 2329, 2320, 2316, 87, 87, 87, 2317, 87, 2328,
+ 2330, 2325, 2331, 87, 2336, 3904, 2337, 2332, 87, 2334,
+
+ 87, 87, 2324, 2323, 2322, 87, 2326, 2327, 87, 87,
+ 2335, 87, 2333, 2338, 87, 87, 2328, 2330, 2325, 2331,
+ 87, 2336, 87, 2337, 2332, 2339, 2334, 2340, 2341, 2343,
+ 3904, 2347, 2344, 2342, 2345, 2348, 87, 2335, 87, 2333,
+ 87, 2346, 87, 87, 87, 2351, 2356, 87, 3904, 87,
+ 87, 3904, 2339, 87, 2340, 2341, 87, 2349, 2347, 2344,
+ 2342, 2345, 2348, 2350, 87, 2352, 2353, 2354, 2346, 2355,
+ 87, 2357, 2358, 87, 87, 2360, 3904, 87, 87, 2362,
+ 2361, 2363, 2359, 87, 2349, 2364, 87, 2365, 2368, 87,
+ 2350, 87, 2352, 2353, 2354, 87, 2355, 87, 2357, 2358,
+
+ 87, 2369, 2360, 87, 2371, 2366, 2362, 2361, 2363, 2359,
+ 2367, 2373, 87, 2372, 87, 2370, 87, 2374, 2375, 2376,
+ 87, 2377, 2378, 2379, 87, 2380, 87, 2381, 87, 2383,
+ 87, 2371, 87, 87, 87, 2384, 2387, 87, 2382, 2388,
+ 2372, 87, 2370, 87, 2374, 2375, 2376, 87, 2377, 2378,
+ 87, 87, 2380, 2385, 87, 87, 2383, 2386, 173, 87,
+ 2389, 87, 87, 2387, 87, 2382, 2388, 2391, 2390, 2392,
+ 2398, 3904, 2394, 2393, 2395, 87, 87, 2396, 2397, 2399,
+ 2385, 2400, 2401, 3904, 2386, 3904, 2402, 2389, 87, 87,
+ 2403, 87, 2405, 2406, 2391, 2390, 87, 87, 87, 2394,
+
+ 2393, 87, 87, 87, 2396, 87, 2399, 87, 2400, 2404,
+ 87, 2407, 87, 2402, 87, 87, 2408, 2403, 2409, 2405,
+ 2406, 2410, 2411, 3904, 2412, 2415, 2416, 87, 3904, 2413,
+ 87, 2414, 2418, 2419, 3904, 2421, 2404, 87, 87, 2417,
+ 87, 87, 3904, 2408, 87, 2409, 87, 87, 2410, 2411,
+ 87, 2412, 2415, 87, 87, 87, 2413, 87, 2414, 2418,
+ 2419, 2420, 87, 2422, 2423, 2424, 2417, 2425, 2428, 2429,
+ 87, 2427, 2426, 3904, 87, 87, 2432, 2431, 87, 2430,
+ 3904, 3904, 87, 2439, 3904, 87, 87, 2436, 2420, 87,
+ 2422, 2423, 2424, 87, 2425, 87, 2429, 87, 2427, 2426,
+
+ 87, 2433, 2435, 2432, 2431, 87, 2430, 2437, 2438, 87,
+ 2439, 87, 2434, 2440, 2436, 87, 2442, 2441, 2445, 2443,
+ 3904, 3904, 87, 2444, 2446, 87, 2452, 87, 2433, 2435,
+ 2455, 87, 87, 2454, 2437, 2438, 2447, 87, 2448, 2434,
+ 2440, 87, 2449, 2442, 2441, 87, 2443, 87, 87, 87,
+ 2444, 2446, 2450, 87, 2451, 87, 2453, 2455, 87, 87,
+ 2454, 2456, 2457, 2447, 87, 2448, 87, 87, 2458, 2449,
+ 2460, 87, 2459, 2462, 87, 2461, 2464, 87, 2466, 2450,
+ 2465, 2451, 2463, 2453, 2469, 2467, 2472, 2468, 2456, 2457,
+ 87, 87, 87, 87, 87, 87, 2470, 87, 87, 2459,
+
+ 2462, 87, 2461, 87, 2471, 2466, 2473, 2465, 87, 2463,
+ 87, 2469, 2467, 2472, 2468, 2474, 2475, 2476, 2477, 87,
+ 2478, 87, 87, 2470, 2479, 3904, 2490, 3904, 87, 2480,
+ 87, 2471, 87, 2473, 2481, 2482, 87, 2488, 87, 87,
+ 2489, 87, 2474, 2475, 2476, 2477, 3904, 2478, 2483, 2484,
+ 2487, 2479, 2485, 87, 2491, 87, 2493, 87, 3904, 2492,
+ 2494, 87, 2482, 87, 2488, 2486, 87, 2489, 2496, 2497,
+ 3904, 2495, 2508, 87, 2504, 2483, 2484, 2487, 87, 2485,
+ 87, 2491, 87, 2493, 2498, 2499, 2492, 2494, 2500, 87,
+ 87, 2501, 2486, 87, 87, 2496, 2497, 2502, 2495, 2503,
+
+ 2505, 2504, 2506, 2510, 87, 3904, 87, 87, 87, 87,
+ 87, 2498, 2499, 2507, 2509, 2500, 2512, 87, 2501, 2511,
+ 87, 87, 2513, 87, 2502, 87, 2503, 2505, 87, 2506,
+ 2510, 2514, 87, 2516, 2515, 2517, 2518, 2520, 2519, 2521,
+ 2507, 2509, 2523, 87, 87, 87, 2511, 87, 2522, 2513,
+ 3904, 2524, 2531, 87, 2527, 87, 87, 87, 2514, 87,
+ 2516, 2515, 2517, 2518, 2520, 2519, 87, 2525, 2528, 2523,
+ 87, 87, 2526, 87, 2529, 2522, 87, 2530, 2524, 87,
+ 2532, 2527, 2533, 2535, 2534, 2536, 2537, 87, 2539, 2538,
+ 87, 2540, 87, 3904, 2543, 2528, 87, 87, 87, 87,
+
+ 2545, 2529, 2546, 2544, 2530, 3904, 87, 2532, 87, 2533,
+ 2535, 2534, 2541, 2537, 87, 2539, 2538, 87, 87, 2547,
+ 2542, 87, 2548, 87, 2549, 2550, 87, 2545, 87, 2546,
+ 2544, 87, 2551, 87, 3904, 2552, 2553, 87, 2555, 2541,
+ 2557, 2559, 2561, 2556, 87, 3904, 2547, 2542, 87, 2548,
+ 87, 2549, 2550, 2558, 2554, 87, 87, 87, 2560, 2551,
+ 87, 87, 2552, 2553, 2562, 2563, 2567, 2557, 2559, 2561,
+ 87, 87, 87, 2568, 2564, 3904, 3904, 2565, 3904, 3904,
+ 2558, 2554, 3904, 2592, 87, 2560, 87, 87, 87, 2566,
+ 2569, 2562, 2563, 2567, 2570, 2574, 87, 2571, 2572, 87,
+
+ 87, 2564, 2575, 87, 2565, 2573, 87, 87, 87, 87,
+ 87, 2576, 2577, 2578, 87, 2580, 2566, 2569, 3904, 2579,
+ 2586, 2570, 2574, 2581, 2571, 2572, 87, 87, 87, 2575,
+ 2582, 2584, 2573, 87, 2583, 3904, 3904, 87, 2576, 2577,
+ 2578, 87, 2580, 87, 2585, 87, 2579, 2586, 87, 2587,
+ 2581, 2588, 87, 87, 2590, 2589, 87, 2582, 2584, 2591,
+ 2594, 2583, 2593, 87, 87, 2595, 2598, 2596, 2597, 2599,
+ 2603, 2585, 2600, 3904, 87, 87, 2587, 87, 2588, 2607,
+ 87, 2590, 2589, 87, 87, 2609, 2591, 87, 87, 2593,
+ 2601, 87, 2595, 2598, 2596, 2597, 2599, 87, 2602, 2600,
+
+ 2604, 2608, 87, 2605, 2610, 173, 87, 2611, 2606, 87,
+ 2615, 87, 2609, 2612, 87, 2613, 3904, 2601, 2616, 87,
+ 87, 2614, 2620, 87, 2621, 2602, 2622, 2604, 2619, 2623,
+ 87, 2610, 2617, 87, 2611, 87, 2624, 87, 87, 2627,
+ 2612, 87, 2613, 2618, 87, 2616, 87, 2626, 2614, 87,
+ 87, 2621, 2625, 2622, 87, 2619, 2623, 2628, 2629, 2617,
+ 2630, 87, 2631, 2632, 87, 2633, 2627, 3904, 87, 3904,
+ 2618, 2635, 87, 2634, 2626, 2636, 3904, 87, 87, 2625,
+ 3904, 2637, 87, 87, 2628, 87, 87, 2630, 2640, 2638,
+ 2632, 2644, 2633, 87, 87, 2639, 87, 2641, 2635, 2646,
+
+ 2634, 2642, 2636, 87, 2643, 3904, 87, 87, 2637, 2645,
+ 87, 87, 87, 87, 87, 2640, 2638, 2647, 2644, 2649,
+ 2648, 2650, 2639, 2655, 2641, 2656, 87, 2653, 2642, 2652,
+ 87, 2643, 87, 2651, 87, 2654, 2645, 2658, 87, 87,
+ 87, 87, 87, 87, 2647, 87, 2649, 2648, 2650, 2657,
+ 2655, 2659, 2656, 2660, 2653, 2661, 2652, 2662, 87, 2669,
+ 2651, 87, 2654, 87, 87, 87, 2664, 2663, 2666, 87,
+ 87, 87, 2667, 2665, 87, 2670, 2657, 2668, 2659, 2673,
+ 2660, 87, 2661, 87, 2662, 2671, 2675, 87, 2672, 2674,
+ 2677, 87, 87, 2664, 2663, 2666, 2676, 87, 2678, 2667,
+
+ 2665, 2682, 87, 87, 2668, 2679, 2673, 87, 2680, 2685,
+ 87, 87, 2671, 2675, 87, 2672, 2674, 87, 2681, 2683,
+ 87, 87, 87, 2676, 2684, 2678, 2687, 2686, 2682, 87,
+ 2688, 2689, 2679, 87, 2690, 2680, 87, 2691, 2693, 3904,
+ 2692, 2699, 87, 87, 2694, 2681, 2683, 2695, 87, 2696,
+ 87, 2684, 87, 87, 2686, 2700, 2701, 2688, 2689, 87,
+ 2706, 2690, 2705, 87, 2691, 87, 2697, 2692, 87, 2698,
+ 87, 2694, 2702, 2703, 2695, 87, 2696, 87, 87, 2704,
+ 87, 2707, 87, 2701, 87, 2709, 87, 87, 2710, 2705,
+ 2708, 2711, 2712, 2697, 87, 2714, 2698, 87, 87, 2702,
+
+ 2703, 2713, 2715, 2716, 87, 2718, 2704, 2717, 87, 2720,
+ 2719, 2721, 87, 2722, 2724, 2710, 87, 2708, 87, 2712,
+ 87, 87, 87, 87, 87, 87, 2723, 2725, 2713, 87,
+ 2716, 87, 2718, 2726, 2717, 87, 87, 2719, 2721, 2728,
+ 2722, 87, 2727, 2729, 2730, 2733, 3904, 2731, 87, 2734,
+ 2736, 87, 2740, 2723, 2725, 2735, 2739, 87, 2741, 2743,
+ 87, 87, 2732, 87, 87, 87, 2728, 87, 87, 2727,
+ 2729, 2730, 87, 87, 2731, 87, 2734, 2736, 2737, 2738,
+ 2742, 2744, 2735, 87, 87, 2741, 2743, 87, 2745, 2732,
+ 87, 2746, 87, 87, 2747, 2748, 2749, 2750, 3904, 2751,
+
+ 2753, 2756, 87, 2754, 2759, 2737, 2738, 2742, 2744, 87,
+ 87, 87, 2755, 2752, 87, 2745, 87, 87, 87, 87,
+ 2757, 2747, 2748, 2749, 2750, 87, 2751, 87, 2756, 87,
+ 2754, 2759, 87, 2758, 2760, 87, 2761, 2762, 2767, 2755,
+ 2752, 2763, 87, 3904, 2768, 3904, 3904, 2757, 3904, 3904,
+ 2764, 2769, 2782, 2770, 2771, 87, 2772, 3904, 87, 87,
+ 2758, 2760, 87, 2761, 2762, 2765, 87, 2766, 2763, 2775,
+ 87, 2768, 2773, 87, 87, 87, 87, 2764, 2769, 2774,
+ 2770, 2771, 2776, 2772, 87, 87, 87, 87, 2777, 87,
+ 2778, 2779, 2765, 2781, 2766, 2783, 2775, 2780, 2785, 2773,
+
+ 2786, 2784, 2791, 3904, 87, 87, 2774, 87, 2787, 2776,
+ 87, 2788, 87, 87, 2789, 2777, 87, 2778, 2779, 87,
+ 2781, 2793, 2790, 2798, 2780, 2785, 87, 87, 2784, 2791,
+ 87, 2799, 87, 87, 2794, 2787, 87, 2792, 2788, 87,
+ 2795, 2789, 2796, 2797, 87, 2800, 2801, 2802, 2793, 2790,
+ 2804, 2805, 87, 87, 87, 87, 87, 2803, 87, 2811,
+ 87, 2794, 2808, 87, 2792, 2809, 2812, 2795, 87, 2796,
+ 2797, 2806, 2800, 2801, 2802, 87, 87, 2804, 87, 2807,
+ 2813, 2810, 2814, 87, 2803, 87, 2811, 87, 173, 2808,
+ 87, 2815, 2809, 2812, 2816, 2817, 2819, 87, 2806, 87,
+
+ 2818, 2820, 87, 2822, 2824, 87, 2807, 2813, 2810, 2814,
+ 2821, 2823, 87, 3904, 87, 87, 2827, 2831, 2815, 87,
+ 2825, 2816, 87, 2819, 2826, 87, 87, 2818, 2820, 87,
+ 2822, 2824, 87, 2828, 2829, 2830, 2832, 2821, 2823, 87,
+ 87, 87, 2833, 2827, 87, 2834, 2835, 2825, 2837, 2838,
+ 87, 2826, 2836, 2839, 3904, 87, 2840, 2841, 2848, 3904,
+ 2828, 2829, 2830, 87, 2842, 3904, 2843, 2844, 3904, 87,
+ 87, 87, 2834, 87, 87, 2837, 87, 87, 2847, 2836,
+ 2846, 87, 87, 2840, 87, 87, 2845, 2849, 87, 2850,
+ 87, 2842, 87, 2843, 2844, 2851, 2852, 2853, 3904, 87,
+
+ 87, 3904, 2860, 2854, 87, 2847, 2855, 2846, 2856, 2857,
+ 2858, 87, 2862, 2845, 2849, 2859, 2850, 87, 87, 2866,
+ 87, 2870, 2851, 2852, 87, 87, 87, 87, 87, 87,
+ 2854, 2861, 87, 2855, 87, 2856, 2857, 2858, 87, 2862,
+ 2863, 2864, 2859, 2865, 2868, 87, 2866, 87, 87, 2867,
+ 87, 87, 2869, 87, 2871, 3904, 2872, 2874, 2861, 2873,
+ 3904, 2875, 2879, 2880, 2883, 2876, 87, 2863, 2864, 87,
+ 2865, 2868, 87, 87, 87, 87, 2867, 2877, 87, 2869,
+ 2881, 2871, 87, 2872, 2874, 87, 2873, 2878, 2875, 87,
+ 2880, 87, 2876, 87, 2882, 2884, 87, 2886, 2885, 87,
+
+ 3904, 2887, 2888, 3904, 2877, 2889, 2891, 2881, 2890, 2899,
+ 2892, 2894, 2896, 87, 2878, 87, 87, 87, 87, 87,
+ 2893, 2882, 87, 87, 2886, 2885, 2895, 87, 2887, 2888,
+ 87, 2897, 2889, 2891, 87, 2890, 87, 2892, 2894, 2896,
+ 2898, 87, 2901, 2902, 87, 2900, 2903, 2893, 2906, 2905,
+ 87, 3904, 2907, 2895, 2913, 2904, 2914, 87, 2897, 87,
+ 87, 87, 87, 87, 87, 2908, 87, 2898, 2909, 87,
+ 2902, 2911, 2900, 87, 87, 2906, 2905, 87, 2910, 2907,
+ 2912, 87, 2904, 87, 87, 2915, 2917, 2916, 2918, 2920,
+ 3904, 2919, 2908, 87, 87, 2909, 87, 2922, 2911, 87,
+
+ 2921, 2925, 87, 2929, 2923, 2910, 2932, 2912, 87, 2926,
+ 2924, 87, 87, 2917, 2916, 2918, 2920, 87, 2919, 87,
+ 87, 87, 2927, 2928, 2922, 87, 2934, 2921, 87, 2930,
+ 2931, 2923, 2938, 87, 2933, 87, 2926, 2924, 87, 2935,
+ 87, 87, 87, 2939, 87, 2940, 2941, 87, 3904, 2927,
+ 2928, 87, 3904, 2934, 2936, 2937, 2930, 2931, 87, 2938,
+ 2943, 2933, 87, 2944, 2945, 2942, 2935, 2947, 87, 87,
+ 2939, 2946, 87, 2941, 87, 2948, 2951, 87, 87, 2950,
+ 87, 2936, 2937, 87, 2949, 2953, 87, 2943, 87, 2954,
+ 2944, 2945, 2942, 2952, 2947, 2956, 87, 2955, 2946, 87,
+
+ 87, 87, 2948, 2951, 2957, 2958, 2950, 87, 2959, 87,
+ 2961, 2949, 2953, 2960, 2962, 2966, 87, 2963, 2971, 87,
+ 2952, 2964, 87, 87, 2955, 2965, 2967, 2972, 3904, 87,
+ 87, 87, 87, 87, 2968, 2959, 87, 2961, 87, 2969,
+ 2960, 2962, 2966, 87, 2963, 2971, 87, 87, 2964, 87,
+ 2970, 87, 2965, 2967, 87, 2973, 87, 2974, 2975, 2976,
+ 2977, 2968, 2981, 87, 2978, 2980, 2969, 2983, 2979, 87,
+ 2985, 2982, 2986, 2987, 87, 87, 2984, 2970, 2991, 87,
+ 87, 87, 2973, 87, 87, 87, 2976, 87, 87, 2981,
+ 87, 2978, 2980, 87, 2983, 2979, 2990, 87, 2982, 2986,
+
+ 87, 2988, 87, 2984, 2989, 2991, 2992, 2993, 2995, 2994,
+ 87, 87, 2996, 87, 2997, 3904, 2998, 3904, 3000, 87,
+ 2999, 3003, 3904, 2990, 87, 87, 87, 3006, 2988, 173,
+ 87, 2989, 3001, 2992, 2993, 2995, 2994, 87, 87, 2996,
+ 3002, 2997, 87, 2998, 87, 3000, 3004, 2999, 3003, 87,
+ 3005, 87, 3007, 3009, 87, 3904, 87, 3008, 3012, 3001,
+ 3010, 3011, 3013, 3904, 3014, 3017, 87, 3002, 3015, 3904,
+ 3016, 3904, 87, 3004, 87, 3904, 3904, 3005, 3904, 3007,
+ 3009, 87, 87, 87, 3008, 87, 3018, 3010, 3011, 87,
+ 87, 3014, 3017, 3019, 87, 3015, 87, 3016, 3020, 3021,
+
+ 3022, 87, 87, 3023, 3024, 3025, 87, 3026, 87, 87,
+ 87, 87, 3027, 3018, 87, 3028, 3904, 3031, 3032, 3029,
+ 3019, 3033, 87, 87, 3030, 3020, 3021, 3022, 87, 3036,
+ 3023, 3024, 3025, 87, 3026, 3035, 3034, 87, 3037, 3027,
+ 87, 87, 3028, 87, 3031, 3032, 3029, 87, 87, 87,
+ 3038, 3030, 3039, 3043, 3904, 3040, 3036, 3041, 3042, 3044,
+ 3045, 3046, 3035, 3034, 87, 87, 87, 87, 87, 87,
+ 87, 87, 3047, 87, 3049, 3050, 3051, 3038, 3052, 87,
+ 3043, 3048, 3040, 87, 3041, 3042, 3044, 3045, 3046, 87,
+ 3055, 3053, 3056, 3057, 3058, 87, 3065, 87, 87, 3047,
+
+ 3054, 3049, 3050, 87, 3059, 87, 3060, 3064, 3048, 87,
+ 3061, 87, 3063, 87, 3066, 87, 3062, 3055, 3053, 87,
+ 87, 87, 87, 87, 87, 87, 87, 3054, 3067, 87,
+ 3069, 3059, 3070, 3060, 3064, 87, 3072, 3061, 3068, 3063,
+ 3071, 3066, 3904, 3062, 3073, 87, 87, 87, 87, 3074,
+ 3075, 3076, 3077, 3079, 3078, 3067, 3904, 3069, 87, 3070,
+ 87, 87, 3082, 3072, 3084, 3068, 3081, 3071, 3080, 87,
+ 3904, 3073, 87, 87, 3086, 87, 87, 3075, 87, 3077,
+ 3079, 3078, 87, 87, 87, 3083, 87, 3085, 3090, 3082,
+ 3087, 3084, 87, 3081, 87, 3080, 3088, 87, 3089, 3091,
+
+ 3092, 3086, 3093, 3094, 3095, 87, 3904, 3099, 3097, 87,
+ 3096, 87, 3083, 3101, 3085, 87, 87, 3087, 3100, 87,
+ 87, 3104, 87, 3088, 3098, 3089, 3091, 3092, 87, 87,
+ 3094, 3095, 3102, 87, 3099, 3097, 87, 3096, 3103, 3106,
+ 87, 87, 3105, 3107, 3109, 3100, 87, 87, 87, 87,
+ 87, 3098, 3110, 3108, 3111, 3112, 3904, 3113, 3114, 3102,
+ 87, 3116, 87, 3904, 3117, 3103, 3106, 87, 3115, 3105,
+ 3107, 87, 87, 3122, 3118, 3120, 87, 3124, 87, 3110,
+ 3108, 3111, 3112, 87, 3113, 87, 87, 3119, 87, 3121,
+ 87, 3117, 87, 3123, 3125, 3115, 87, 3127, 87, 87,
+
+ 87, 3118, 3120, 87, 3124, 3126, 3904, 3134, 3128, 3129,
+ 87, 3130, 87, 3131, 3119, 3132, 3121, 3136, 3137, 3133,
+ 3123, 3125, 87, 87, 87, 87, 3140, 3138, 3139, 87,
+ 3141, 87, 3126, 87, 87, 3128, 3129, 87, 3130, 87,
+ 3131, 3135, 3132, 3142, 3136, 87, 3133, 3144, 87, 87,
+ 87, 3143, 87, 3140, 3138, 3139, 3145, 3141, 3147, 87,
+ 3146, 3149, 87, 3150, 3148, 87, 3151, 3152, 3135, 3153,
+ 3142, 3904, 87, 87, 3144, 87, 3154, 3156, 3143, 3157,
+ 87, 87, 3161, 3145, 3155, 3147, 87, 3146, 3149, 87,
+ 87, 3148, 87, 87, 3152, 3158, 3153, 3162, 87, 87,
+
+ 3159, 3160, 3904, 3154, 173, 3164, 3157, 3163, 3166, 87,
+ 87, 3155, 3165, 3168, 87, 3167, 3169, 87, 87, 87,
+ 87, 3171, 3158, 3172, 3162, 3904, 3173, 3159, 3160, 87,
+ 3170, 3174, 3164, 3175, 3163, 3166, 3904, 87, 87, 3165,
+ 87, 3176, 3167, 87, 87, 3178, 3177, 87, 87, 3179,
+ 3172, 3181, 3180, 3182, 3185, 87, 3183, 3170, 87, 87,
+ 3175, 3184, 3186, 87, 3189, 87, 3188, 87, 3176, 87,
+ 3187, 3192, 87, 3177, 87, 87, 3179, 87, 3181, 3180,
+ 3182, 87, 3190, 3183, 3191, 3193, 87, 3199, 3184, 3200,
+ 3198, 87, 87, 3188, 87, 87, 3194, 3187, 3192, 3195,
+
+ 87, 3197, 87, 3196, 87, 87, 87, 87, 3201, 3190,
+ 87, 3191, 3193, 3202, 3199, 3203, 3200, 3198, 87, 3204,
+ 3205, 87, 3206, 3194, 3207, 87, 3195, 3904, 3197, 87,
+ 3196, 87, 3209, 3212, 87, 3201, 3208, 3213, 87, 87,
+ 3202, 87, 3203, 3210, 87, 87, 3204, 3205, 3211, 3215,
+ 87, 3207, 3217, 3214, 87, 3216, 87, 87, 3221, 3209,
+ 87, 87, 3218, 3208, 3213, 3219, 3226, 87, 3904, 3220,
+ 3210, 3904, 3223, 87, 87, 3211, 3215, 3225, 87, 3217,
+ 3214, 87, 3216, 87, 87, 87, 3222, 3228, 3224, 3218,
+ 3229, 3232, 3219, 87, 87, 87, 3220, 3230, 3231, 3223,
+
+ 87, 3227, 3233, 87, 3225, 87, 3238, 87, 3234, 3235,
+ 3236, 87, 3237, 3222, 3239, 3224, 3240, 3242, 3241, 87,
+ 87, 3243, 87, 87, 3230, 3231, 87, 87, 3227, 87,
+ 87, 3244, 87, 3238, 87, 3234, 3235, 3236, 3245, 3237,
+ 87, 87, 3246, 3240, 3242, 3241, 87, 3247, 3243, 3248,
+ 87, 3249, 3250, 3251, 3252, 87, 87, 3255, 87, 3253,
+ 3256, 3254, 3904, 3257, 3904, 3245, 3260, 3258, 87, 3246,
+ 87, 3261, 3904, 3904, 3247, 87, 87, 3259, 3249, 87,
+ 87, 87, 87, 87, 3255, 3262, 3253, 87, 3254, 87,
+ 3257, 3266, 87, 3267, 3258, 3263, 3264, 3268, 87, 3265,
+
+ 87, 3269, 87, 87, 3259, 3270, 87, 3271, 3273, 3275,
+ 3274, 3272, 3262, 3276, 3904, 3277, 87, 87, 3266, 87,
+ 87, 87, 3263, 3264, 87, 87, 3265, 3278, 87, 87,
+ 3280, 3279, 3270, 3281, 3271, 87, 3275, 3274, 3272, 3282,
+ 87, 87, 3277, 87, 3284, 3285, 3283, 87, 87, 3290,
+ 3287, 3286, 3294, 3289, 87, 3288, 87, 87, 3279, 87,
+ 3281, 3291, 3292, 3295, 3296, 3297, 3282, 3293, 3298, 3299,
+ 87, 87, 87, 3283, 87, 3300, 87, 87, 3286, 3294,
+ 3289, 87, 87, 87, 3303, 3301, 87, 87, 3291, 3904,
+ 3295, 3296, 3297, 3302, 87, 3304, 3305, 3306, 3904, 3309,
+
+ 87, 87, 3307, 3308, 87, 3313, 3312, 87, 3310, 3311,
+ 3316, 87, 3301, 3904, 87, 87, 87, 87, 87, 3904,
+ 3302, 87, 3304, 3305, 3306, 87, 3309, 87, 87, 3307,
+ 3308, 3314, 3313, 3312, 3315, 3310, 3311, 87, 87, 3317,
+ 3318, 3320, 3321, 3322, 3323, 3327, 3325, 87, 3319, 3324,
+ 87, 3326, 87, 87, 87, 3328, 3904, 3329, 3314, 3330,
+ 3904, 3315, 87, 3331, 87, 3332, 3317, 3318, 3320, 3321,
+ 3322, 3333, 3327, 3335, 3336, 3319, 87, 3334, 87, 3337,
+ 87, 87, 87, 87, 3329, 87, 3330, 3338, 87, 87,
+ 3331, 87, 3332, 3340, 3339, 87, 3342, 87, 3333, 3343,
+
+ 3335, 3336, 3341, 3347, 3334, 87, 3337, 87, 3348, 3344,
+ 87, 3351, 3345, 3349, 3338, 87, 87, 87, 87, 87,
+ 3340, 3339, 3350, 3342, 3346, 3352, 3343, 3355, 3353, 3341,
+ 87, 87, 3354, 3356, 87, 87, 3344, 87, 87, 3345,
+ 3349, 87, 3357, 3358, 3359, 3360, 87, 3362, 3361, 3350,
+ 87, 3346, 3352, 87, 87, 3353, 3366, 3367, 3363, 3354,
+ 3356, 3364, 3369, 87, 3365, 87, 87, 3368, 3904, 87,
+ 3358, 87, 3360, 87, 87, 3361, 87, 3371, 3370, 87,
+ 87, 3380, 3376, 87, 87, 3363, 87, 3372, 3364, 3369,
+ 87, 3365, 3374, 87, 3368, 3373, 87, 3375, 3377, 87,
+
+ 3378, 3379, 87, 87, 3371, 3370, 3381, 3382, 3380, 3376,
+ 3383, 3387, 3388, 87, 3372, 3390, 87, 3384, 3389, 3385,
+ 87, 87, 3373, 87, 87, 3377, 3386, 3378, 3379, 3392,
+ 87, 87, 3393, 87, 3382, 87, 87, 87, 87, 87,
+ 3391, 3395, 3394, 3396, 3384, 3389, 3385, 87, 87, 3397,
+ 3399, 3398, 3400, 3386, 87, 87, 3392, 87, 3401, 3393,
+ 87, 3403, 3402, 3904, 87, 3405, 3410, 3391, 3395, 3394,
+ 3904, 3411, 87, 3404, 87, 87, 3397, 3399, 3398, 3400,
+ 87, 87, 3406, 87, 87, 3401, 87, 3412, 3403, 3402,
+ 3407, 3419, 3405, 87, 3408, 3413, 87, 3409, 87, 3414,
+
+ 3404, 3415, 3416, 87, 3417, 3418, 87, 3422, 87, 3406,
+ 87, 3420, 87, 87, 87, 3421, 3423, 3407, 3428, 3904,
+ 87, 3408, 3413, 87, 3409, 87, 3414, 87, 3415, 3416,
+ 3424, 3417, 3418, 87, 87, 3425, 3426, 87, 3420, 3427,
+ 3430, 87, 3421, 3423, 3429, 87, 87, 3431, 87, 3436,
+ 87, 3432, 3435, 3433, 3904, 3434, 3437, 3424, 87, 3439,
+ 87, 87, 3425, 3426, 3904, 3438, 3427, 87, 87, 3904,
+ 87, 3429, 87, 87, 3431, 87, 3436, 3440, 3432, 3435,
+ 3433, 87, 3434, 3437, 3441, 3442, 87, 3443, 3444, 3445,
+ 3447, 87, 3438, 3446, 3455, 3449, 3448, 3904, 87, 87,
+
+ 87, 87, 87, 3451, 3440, 3456, 87, 3452, 3458, 87,
+ 87, 3441, 3442, 3459, 3443, 3444, 3445, 3447, 87, 3450,
+ 3446, 87, 3449, 3448, 3453, 87, 87, 3454, 87, 87,
+ 3451, 3457, 87, 87, 3452, 3460, 3461, 3462, 3463, 87,
+ 87, 3464, 3465, 3471, 3466, 3467, 3450, 87, 87, 3469,
+ 3474, 3453, 3468, 3470, 3454, 87, 87, 87, 3457, 3472,
+ 87, 3476, 3460, 3461, 87, 87, 87, 3473, 3464, 87,
+ 87, 3466, 3467, 3475, 87, 87, 3469, 87, 3478, 3468,
+ 3470, 3477, 87, 3479, 3480, 87, 3472, 3482, 87, 87,
+ 3481, 3483, 87, 3485, 3473, 3484, 87, 3486, 3904, 87,
+
+ 3475, 3487, 87, 3489, 87, 3478, 87, 3490, 3477, 3491,
+ 3479, 3480, 3488, 87, 87, 3495, 3493, 3481, 3498, 87,
+ 3492, 87, 3484, 87, 3486, 87, 3496, 87, 3487, 3499,
+ 87, 87, 3502, 3497, 87, 3494, 3491, 87, 3501, 3488,
+ 87, 3503, 3495, 87, 87, 87, 3500, 3492, 3504, 3904,
+ 87, 3904, 3505, 3496, 3506, 3513, 3499, 3508, 3507, 87,
+ 3497, 87, 3494, 87, 87, 3501, 3512, 3510, 3503, 3511,
+ 3514, 3509, 3904, 3500, 87, 87, 87, 3515, 87, 3505,
+ 3516, 3506, 87, 87, 3508, 3507, 87, 87, 87, 3518,
+ 3517, 3519, 3520, 3512, 3510, 3521, 3511, 87, 3509, 87,
+
+ 3522, 87, 3525, 87, 3515, 3904, 3527, 3528, 3526, 87,
+ 3529, 87, 87, 3530, 87, 87, 3518, 3517, 87, 3520,
+ 3523, 3524, 3521, 87, 87, 3533, 3534, 3532, 3531, 87,
+ 87, 3535, 87, 3527, 3528, 3526, 87, 3529, 87, 3536,
+ 87, 3537, 3539, 87, 3538, 3540, 3541, 3523, 3524, 3542,
+ 3544, 3545, 3533, 87, 3532, 3531, 3543, 87, 87, 3546,
+ 87, 3547, 3548, 87, 87, 87, 87, 3549, 3537, 3539,
+ 3550, 3538, 87, 87, 87, 3551, 87, 87, 3545, 3552,
+ 3553, 87, 3554, 3543, 87, 3555, 3546, 87, 87, 3548,
+ 87, 3556, 3559, 87, 87, 3557, 3565, 3550, 3558, 87,
+
+ 87, 3562, 87, 3560, 87, 3561, 87, 3553, 3563, 3554,
+ 3566, 3564, 3555, 87, 87, 87, 3567, 3568, 3556, 87,
+ 3569, 3575, 3557, 87, 87, 3558, 87, 3570, 3562, 87,
+ 3560, 3572, 3561, 3571, 87, 3563, 3574, 87, 3564, 87,
+ 3573, 87, 87, 3567, 3568, 3576, 3577, 3579, 87, 3582,
+ 3580, 3578, 87, 87, 3570, 3581, 3904, 3904, 3572, 3583,
+ 3571, 3585, 87, 3574, 87, 87, 3904, 3573, 87, 3586,
+ 3904, 3589, 87, 3577, 87, 3904, 87, 3580, 3578, 87,
+ 3584, 87, 3581, 3587, 87, 3588, 3583, 87, 3585, 3590,
+ 87, 87, 87, 87, 3591, 3594, 3586, 3592, 3589, 3593,
+
+ 3595, 3904, 3599, 3606, 87, 3904, 87, 3584, 87, 87,
+ 3587, 3596, 3588, 87, 87, 3603, 3590, 3904, 87, 3598,
+ 87, 3591, 3594, 3597, 3592, 3604, 3593, 3595, 87, 3599,
+ 87, 3600, 3601, 3602, 3607, 87, 3605, 87, 3596, 87,
+ 3609, 87, 3603, 87, 3608, 3611, 3598, 87, 3610, 3612,
+ 3597, 87, 3604, 3614, 3613, 3615, 87, 3616, 3600, 3601,
+ 3602, 3607, 87, 3605, 87, 87, 3617, 3609, 3618, 3620,
+ 3625, 3608, 87, 3619, 87, 3610, 87, 87, 3628, 87,
+ 3614, 3613, 87, 3631, 3616, 87, 3621, 3622, 3623, 3624,
+ 3626, 3627, 3904, 3617, 3629, 87, 87, 87, 3632, 3633,
+
+ 3619, 87, 3630, 3634, 3636, 3628, 3635, 87, 3904, 3639,
+ 87, 87, 87, 3638, 3640, 87, 87, 87, 3643, 87,
+ 87, 3629, 3642, 87, 87, 3632, 3633, 3637, 3644, 3630,
+ 87, 3636, 87, 3635, 87, 87, 87, 3641, 87, 3645,
+ 3638, 3640, 3648, 3647, 87, 3643, 3646, 3650, 3653, 3642,
+ 3649, 87, 87, 3651, 3637, 3644, 3652, 87, 87, 3654,
+ 3655, 3663, 3658, 3656, 3641, 3904, 3645, 87, 87, 3648,
+ 3647, 87, 87, 3646, 87, 87, 3657, 3649, 3659, 3665,
+ 3651, 3660, 87, 3652, 87, 3667, 87, 87, 87, 3658,
+ 3656, 87, 3661, 87, 3668, 3666, 87, 3662, 3664, 3670,
+
+ 87, 87, 3669, 3657, 3671, 3659, 3665, 87, 3660, 3904,
+ 87, 3672, 3667, 3673, 3674, 3675, 87, 3676, 3677, 3679,
+ 3678, 3668, 3666, 3682, 87, 3664, 87, 87, 3681, 3669,
+ 3680, 3683, 87, 87, 3684, 3685, 87, 87, 3672, 87,
+ 87, 87, 3675, 3686, 3676, 87, 87, 3678, 87, 3687,
+ 87, 3688, 3689, 3690, 87, 3681, 3691, 3680, 87, 3692,
+ 3693, 87, 87, 3694, 3696, 3697, 3698, 3695, 3700, 3904,
+ 87, 87, 3701, 3904, 87, 3702, 87, 87, 87, 87,
+ 3690, 87, 87, 3691, 87, 3703, 87, 87, 3699, 87,
+ 3694, 3696, 3697, 87, 3695, 87, 87, 3704, 3705, 3701,
+
+ 87, 3706, 3702, 3708, 3707, 3709, 3716, 3904, 3710, 3711,
+ 3712, 87, 3703, 87, 3713, 3699, 87, 87, 3715, 3904,
+ 3714, 3717, 3718, 87, 3704, 3705, 3904, 87, 87, 87,
+ 87, 3707, 3709, 87, 87, 3710, 3711, 3712, 87, 3721,
+ 87, 3713, 87, 3719, 87, 3715, 3720, 3714, 3717, 3718,
+ 87, 87, 3724, 3722, 3723, 87, 3725, 3904, 3726, 3727,
+ 87, 3904, 3728, 3731, 3730, 3729, 3721, 3732, 87, 87,
+ 3719, 3733, 87, 3720, 87, 87, 3734, 87, 3735, 3724,
+ 3722, 3723, 3737, 3725, 87, 3726, 3727, 87, 87, 3728,
+ 3731, 3730, 3729, 3736, 87, 3738, 3740, 87, 87, 3739,
+
+ 87, 3741, 3742, 87, 3748, 87, 87, 3904, 87, 3737,
+ 3745, 3743, 3747, 3744, 87, 87, 3746, 3750, 87, 3749,
+ 3736, 3904, 3738, 3740, 87, 87, 3739, 3751, 3741, 87,
+ 87, 3748, 87, 87, 87, 3756, 87, 3745, 3743, 3747,
+ 3744, 87, 3752, 3746, 3750, 3753, 3749, 87, 3754, 3755,
+ 87, 3757, 3758, 87, 3751, 3759, 3761, 3762, 87, 3760,
+ 87, 3763, 3756, 3764, 87, 3767, 3770, 87, 87, 3752,
+ 87, 3772, 3753, 87, 3765, 3754, 3755, 3768, 3757, 3758,
+ 3771, 87, 3759, 3761, 87, 87, 3760, 87, 3763, 3766,
+ 3764, 3769, 87, 87, 3773, 87, 87, 87, 3772, 3774,
+
+ 3775, 3765, 87, 3776, 3768, 3777, 3778, 3771, 87, 3779,
+ 87, 3780, 3781, 87, 3782, 87, 3766, 3786, 3769, 3904,
+ 3785, 87, 3783, 3788, 87, 3784, 87, 3775, 87, 87,
+ 3776, 87, 3777, 3778, 3787, 87, 3779, 3789, 3780, 3781,
+ 87, 87, 87, 3790, 87, 3791, 87, 3785, 3792, 3783,
+ 87, 3793, 3784, 3794, 3795, 3796, 3799, 3801, 3798, 87,
+ 87, 3787, 3797, 3904, 87, 87, 87, 87, 3800, 3802,
+ 87, 87, 87, 3803, 3804, 3792, 87, 87, 3793, 3904,
+ 87, 3795, 3796, 87, 3801, 3798, 3805, 3806, 3808, 3797,
+ 3807, 3809, 3810, 3812, 87, 3800, 3802, 3811, 87, 87,
+
+ 87, 87, 3814, 87, 3816, 87, 87, 3904, 3813, 3817,
+ 87, 3815, 3818, 3805, 3806, 3808, 87, 3807, 87, 87,
+ 3812, 87, 87, 3820, 3811, 3819, 3821, 87, 3825, 87,
+ 3832, 3816, 3823, 87, 87, 3813, 3817, 87, 3815, 3818,
+ 87, 3822, 3824, 3829, 3826, 3830, 3838, 3827, 3904, 87,
+ 3820, 87, 3819, 3821, 87, 87, 87, 3828, 3831, 3823,
+ 3833, 87, 87, 3839, 87, 87, 3834, 3835, 3822, 3824,
+ 3829, 3826, 87, 3836, 3827, 3837, 3840, 3841, 87, 3845,
+ 87, 3848, 3842, 87, 3828, 3831, 87, 3833, 87, 87,
+ 87, 87, 3843, 3834, 3835, 87, 3851, 3844, 87, 87,
+
+ 3836, 3853, 3837, 3840, 87, 87, 3845, 3850, 3846, 3842,
+ 3847, 3852, 3849, 87, 3854, 87, 87, 3855, 87, 3843,
+ 87, 87, 87, 3851, 3844, 3856, 3904, 3860, 87, 3859,
+ 3864, 87, 87, 87, 3850, 3846, 3861, 3847, 3852, 3849,
+ 3857, 3854, 3858, 87, 3855, 3862, 3870, 87, 87, 3865,
+ 87, 3863, 3856, 87, 3860, 3867, 3859, 3864, 87, 87,
+ 3866, 3904, 3868, 3861, 3869, 3872, 87, 3857, 87, 3858,
+ 3873, 3871, 3862, 3870, 87, 87, 3865, 3874, 3863, 87,
+ 3875, 87, 3867, 3876, 3880, 3882, 87, 3866, 87, 3868,
+ 3904, 3869, 87, 3877, 3878, 3879, 3884, 87, 3871, 87,
+
+ 3881, 3883, 3885, 87, 3874, 87, 87, 3875, 87, 87,
+ 87, 3880, 87, 87, 87, 3888, 3889, 3886, 87, 3892,
+ 3877, 3878, 3879, 3884, 87, 87, 3887, 3881, 3883, 3885,
+ 3890, 3891, 3893, 3895, 87, 3894, 3896, 3904, 87, 87,
+ 3904, 87, 3888, 87, 3886, 87, 3892, 3897, 3898, 3899,
+ 3902, 3903, 3904, 3887, 3904, 87, 3900, 3890, 3891, 87,
+ 87, 3901, 3894, 87, 87, 3904, 3904, 87, 3904, 87,
+ 87, 87, 3904, 3904, 3897, 3898, 3899, 87, 87, 3904,
+ 3904, 3904, 3904, 3900, 3904, 3904, 3904, 3904, 3901, 48,
+ 48, 48, 48, 48, 48, 48, 53, 53, 53, 53,
+
+ 53, 53, 53, 58, 58, 58, 58, 58, 58, 58,
+ 64, 64, 64, 64, 64, 64, 64, 69, 69, 69,
+ 69, 69, 69, 69, 75, 75, 75, 75, 75, 75,
+ 75, 81, 81, 81, 81, 81, 81, 81, 90, 90,
+ 3904, 90, 90, 90, 90, 163, 163, 3904, 3904, 3904,
+ 163, 163, 165, 165, 3904, 3904, 165, 3904, 165, 167,
+ 3904, 3904, 3904, 3904, 3904, 167, 170, 170, 3904, 3904,
+ 3904, 170, 170, 172, 3904, 3904, 3904, 3904, 3904, 172,
+ 174, 174, 3904, 174, 174, 174, 174, 177, 3904, 3904,
+ 3904, 3904, 3904, 177, 180, 180, 3904, 3904, 3904, 180,
+
+ 180, 91, 91, 3904, 91, 91, 91, 91, 17, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904
} ;
-static const flex_int16_t yy_chk[10914] =
+static const flex_int16_t yy_chk[11176] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -2898,1198 +2956,1226 @@ static const flex_int16_t yy_chk[10914] =
1, 1, 1, 1, 1, 1, 3, 3, 3, 4,
4, 4, 5, 5, 6, 6, 5, 32, 6, 7,
7, 7, 7, 33, 7, 8, 8, 8, 8, 32,
- 8, 9, 9, 9, 10, 10, 10, 19, 51, 51,
+ 8, 9, 9, 9, 10, 10, 10, 19, 52, 52,
- 3823, 19, 233, 3, 32, 33, 4, 67, 67, 5,
- 33, 6, 3103, 13, 13, 13, 13, 7, 13, 14,
+ 3912, 19, 235, 3, 32, 33, 4, 68, 68, 5,
+ 33, 6, 3156, 13, 13, 13, 13, 7, 13, 14,
14, 14, 14, 8, 14, 15, 15, 15, 9, 25,
- 233, 10, 11, 11, 11, 11, 11, 11, 12, 12,
- 12, 12, 12, 12, 16, 16, 16, 34, 28, 84,
- 84, 13, 11, 45, 1199, 25, 25, 14, 12, 34,
- 39, 23, 15, 23, 23, 45, 23, 178, 28, 603,
- 11, 28, 23, 39, 34, 28, 12, 302, 87, 11,
- 45, 16, 87, 162, 162, 12, 30, 39, 29, 177,
- 56, 175, 37, 56, 30, 28, 26, 603, 37, 23,
-
- 24, 24, 29, 26, 24, 30, 302, 26, 100, 24,
- 26, 24, 30, 30, 29, 29, 92, 100, 24, 37,
- 72, 30, 26, 26, 24, 169, 169, 24, 24, 29,
- 26, 24, 30, 72, 26, 100, 24, 26, 24, 62,
- 92, 62, 62, 92, 62, 24, 27, 72, 31, 170,
- 27, 31, 94, 27, 95, 27, 27, 198, 31, 46,
- 31, 46, 46, 223, 46, 226, 27, 168, 27, 95,
- 46, 31, 94, 27, 167, 31, 35, 27, 31, 94,
- 27, 95, 27, 27, 35, 31, 93, 31, 36, 198,
- 35, 97, 36, 27, 35, 223, 44, 226, 97, 42,
-
- 44, 42, 35, 35, 44, 98, 36, 165, 36, 93,
- 42, 35, 163, 93, 36, 36, 42, 35, 97, 36,
- 161, 35, 44, 44, 43, 42, 42, 44, 42, 98,
- 351, 44, 98, 36, 43, 36, 38, 42, 43, 43,
- 38, 96, 164, 42, 38, 164, 85, 43, 80, 96,
- 38, 43, 70, 38, 70, 70, 101, 70, 138, 351,
- 38, 43, 38, 38, 105, 43, 43, 38, 96, 105,
- 73, 38, 73, 73, 101, 73, 79, 38, 79, 79,
- 38, 79, 75, 101, 138, 138, 99, 38, 40, 106,
- 70, 105, 40, 86, 108, 86, 86, 106, 86, 99,
-
- 126, 150, 40, 40, 86, 40, 89, 108, 89, 89,
- 99, 89, 150, 99, 40, 40, 106, 89, 74, 40,
- 126, 108, 102, 102, 107, 228, 99, 126, 150, 40,
- 40, 103, 40, 41, 110, 102, 41, 103, 117, 103,
- 68, 110, 107, 41, 89, 104, 104, 41, 41, 102,
- 102, 117, 103, 112, 104, 41, 107, 228, 103, 109,
- 41, 110, 112, 41, 103, 117, 103, 114, 109, 107,
- 41, 116, 104, 104, 41, 41, 111, 111, 113, 125,
- 112, 109, 115, 119, 111, 1023, 109, 113, 63, 115,
- 114, 58, 111, 116, 114, 109, 118, 121, 116, 118,
-
- 120, 124, 125, 111, 111, 113, 125, 119, 120, 115,
- 57, 111, 118, 118, 124, 119, 1023, 121, 122, 121,
- 118, 128, 122, 118, 121, 123, 118, 120, 124, 127,
- 123, 132, 129, 123, 119, 52, 127, 130, 122, 118,
- 118, 128, 122, 127, 121, 122, 131, 134, 128, 122,
- 129, 130, 123, 131, 132, 47, 127, 123, 132, 129,
- 133, 1187, 135, 127, 130, 122, 18, 141, 136, 133,
- 134, 135, 136, 131, 134, 137, 139, 140, 136, 141,
- 142, 142, 137, 139, 145, 143, 140, 133, 146, 135,
- 136, 1187, 140, 143, 141, 136, 146, 153, 145, 136,
-
- 140, 147, 137, 139, 140, 136, 144, 142, 153, 148,
- 151, 145, 143, 140, 149, 17, 147, 144, 151, 140,
- 146, 144, 154, 146, 153, 149, 148, 155, 147, 148,
- 144, 154, 152, 144, 149, 148, 148, 151, 152, 156,
- 157, 149, 155, 154, 144, 0, 159, 154, 144, 154,
- 160, 158, 149, 148, 155, 157, 148, 0, 154, 152,
- 158, 156, 0, 160, 0, 174, 156, 157, 159, 166,
- 154, 166, 166, 159, 166, 179, 179, 160, 158, 171,
- 180, 171, 171, 172, 171, 172, 172, 181, 172, 174,
- 182, 176, 174, 176, 176, 0, 176, 183, 186, 182,
-
- 184, 181, 180, 185, 184, 188, 189, 180, 191, 183,
- 185, 0, 187, 188, 186, 191, 190, 182, 189, 181,
- 192, 172, 185, 193, 183, 186, 196, 184, 181, 197,
- 185, 187, 188, 189, 194, 191, 192, 185, 190, 187,
- 194, 193, 195, 190, 195, 201, 202, 192, 196, 212,
- 193, 204, 203, 196, 199, 197, 197, 203, 199, 204,
- 212, 202, 207, 208, 205, 206, 194, 194, 209, 195,
- 208, 201, 201, 202, 210, 199, 212, 207, 204, 0,
- 213, 0, 199, 211, 203, 199, 205, 206, 0, 207,
- 208, 205, 206, 213, 214, 216, 209, 210, 0, 231,
-
- 209, 210, 199, 200, 216, 211, 214, 213, 200, 215,
- 211, 217, 215, 200, 0, 218, 0, 222, 221, 200,
- 200, 214, 216, 209, 215, 221, 200, 220, 222, 224,
- 200, 231, 225, 217, 227, 200, 215, 218, 217, 215,
- 200, 227, 218, 225, 222, 221, 200, 200, 219, 220,
- 232, 219, 229, 219, 220, 224, 224, 0, 234, 235,
- 0, 227, 230, 236, 225, 219, 229, 219, 230, 238,
- 225, 237, 232, 239, 219, 219, 237, 232, 219, 0,
- 219, 240, 235, 0, 229, 242, 235, 239, 244, 230,
- 234, 244, 219, 229, 219, 236, 237, 241, 237, 245,
-
- 239, 238, 240, 237, 241, 243, 242, 246, 240, 247,
- 248, 249, 242, 251, 243, 244, 250, 252, 245, 243,
- 251, 246, 252, 249, 241, 253, 245, 250, 248, 257,
- 254, 247, 243, 255, 246, 260, 247, 248, 249, 254,
- 251, 243, 259, 250, 261, 256, 262, 253, 0, 252,
- 256, 261, 253, 258, 258, 264, 255, 254, 259, 263,
- 255, 257, 258, 264, 266, 265, 267, 260, 262, 259,
- 268, 261, 256, 262, 269, 270, 271, 273, 268, 0,
- 258, 258, 264, 272, 263, 265, 263, 275, 274, 271,
- 270, 276, 265, 0, 0, 277, 266, 268, 267, 277,
-
- 279, 278, 270, 271, 273, 280, 269, 281, 276, 272,
- 272, 274, 0, 280, 282, 279, 276, 283, 276, 275,
- 274, 282, 277, 278, 285, 284, 281, 279, 278, 284,
- 286, 287, 280, 288, 281, 276, 290, 289, 274, 283,
- 292, 282, 291, 294, 283, 295, 285, 293, 297, 298,
- 297, 285, 284, 292, 291, 288, 293, 296, 295, 289,
- 288, 294, 286, 287, 289, 299, 300, 292, 290, 291,
- 294, 301, 295, 303, 293, 297, 296, 304, 0, 305,
- 312, 298, 303, 306, 296, 307, 309, 0, 312, 299,
- 308, 300, 299, 300, 306, 314, 0, 301, 301, 307,
-
- 303, 310, 311, 304, 304, 305, 305, 312, 315, 309,
- 306, 307, 307, 309, 308, 316, 317, 308, 318, 310,
- 311, 315, 319, 322, 323, 320, 307, 314, 310, 311,
- 324, 321, 326, 325, 0, 315, 328, 324, 326, 319,
- 327, 317, 325, 317, 329, 319, 331, 316, 323, 319,
- 318, 320, 320, 321, 327, 322, 323, 324, 321, 326,
- 325, 330, 328, 328, 332, 333, 319, 327, 329, 331,
- 330, 329, 332, 331, 333, 323, 334, 335, 338, 337,
- 340, 336, 0, 0, 0, 339, 335, 343, 330, 346,
- 371, 332, 333, 342, 337, 340, 343, 344, 336, 0,
-
- 353, 347, 334, 334, 335, 336, 337, 340, 336, 339,
- 338, 342, 339, 346, 343, 347, 346, 348, 350, 344,
- 342, 352, 371, 350, 344, 336, 341, 353, 347, 349,
- 349, 341, 348, 354, 341, 355, 354, 0, 360, 341,
- 341, 341, 341, 354, 348, 352, 0, 355, 352, 341,
- 350, 0, 356, 341, 349, 361, 349, 349, 341, 0,
- 354, 341, 355, 354, 356, 360, 341, 341, 341, 341,
- 345, 358, 345, 357, 357, 359, 0, 361, 362, 356,
- 363, 367, 361, 357, 345, 345, 345, 366, 345, 358,
- 364, 365, 364, 359, 345, 0, 367, 345, 358, 345,
-
- 357, 357, 359, 365, 362, 362, 363, 363, 367, 366,
- 370, 345, 345, 345, 366, 345, 368, 364, 365, 369,
- 376, 372, 370, 372, 368, 0, 369, 374, 0, 375,
- 0, 377, 372, 0, 374, 378, 379, 370, 379, 372,
- 381, 378, 380, 368, 384, 0, 369, 372, 372, 383,
- 372, 375, 376, 377, 374, 380, 375, 378, 377, 372,
- 379, 382, 378, 379, 385, 379, 372, 383, 378, 380,
- 384, 384, 381, 386, 382, 387, 383, 382, 0, 382,
- 0, 391, 401, 390, 0, 382, 392, 401, 382, 408,
- 390, 393, 0, 410, 410, 0, 385, 387, 392, 391,
-
- 386, 382, 387, 393, 382, 391, 382, 388, 391, 388,
- 390, 399, 394, 392, 401, 388, 396, 397, 393, 388,
- 410, 408, 403, 399, 388, 394, 391, 388, 403, 400,
- 397, 421, 396, 388, 388, 0, 388, 0, 399, 394,
- 396, 0, 388, 396, 397, 402, 388, 400, 0, 403,
- 0, 388, 402, 404, 388, 389, 400, 389, 406, 396,
- 407, 404, 405, 421, 411, 0, 402, 422, 407, 409,
- 389, 411, 402, 389, 405, 389, 406, 389, 409, 402,
- 404, 389, 389, 415, 389, 406, 412, 407, 0, 405,
- 415, 411, 413, 422, 422, 0, 409, 389, 0, 412,
-
- 389, 413, 389, 0, 389, 398, 398, 414, 417, 418,
- 415, 420, 424, 412, 416, 398, 398, 398, 398, 398,
- 417, 416, 398, 420, 413, 414, 419, 424, 413, 414,
- 398, 418, 398, 398, 414, 417, 418, 425, 420, 424,
- 423, 416, 398, 398, 398, 398, 398, 423, 419, 398,
- 425, 426, 414, 419, 427, 428, 427, 429, 430, 430,
- 0, 431, 432, 433, 425, 434, 428, 423, 431, 432,
- 436, 437, 435, 0, 433, 0, 434, 0, 441, 429,
- 439, 427, 428, 426, 429, 435, 0, 430, 431, 432,
- 433, 799, 434, 437, 440, 436, 443, 436, 437, 435,
-
- 438, 438, 442, 439, 441, 441, 445, 439, 443, 440,
- 442, 444, 452, 446, 449, 445, 450, 440, 438, 454,
- 799, 440, 444, 443, 467, 438, 446, 438, 438, 442,
- 447, 447, 451, 445, 450, 452, 440, 453, 444, 452,
- 446, 455, 447, 450, 447, 438, 449, 455, 459, 447,
- 458, 454, 456, 0, 451, 453, 467, 447, 447, 451,
- 457, 0, 0, 0, 453, 461, 463, 0, 455, 447,
- 459, 447, 448, 456, 458, 459, 462, 458, 464, 456,
- 448, 448, 460, 457, 448, 448, 470, 457, 448, 460,
- 462, 461, 461, 463, 448, 466, 465, 468, 470, 448,
-
- 464, 0, 469, 462, 472, 464, 473, 448, 448, 460,
- 465, 448, 448, 470, 471, 448, 0, 475, 479, 468,
- 471, 466, 466, 465, 468, 469, 472, 474, 473, 469,
- 476, 472, 475, 473, 477, 474, 478, 476, 481, 586,
- 480, 471, 479, 477, 475, 479, 480, 482, 483, 484,
- 486, 478, 485, 474, 474, 488, 491, 476, 492, 0,
- 481, 477, 474, 478, 484, 481, 586, 480, 489, 482,
- 0, 483, 486, 489, 482, 483, 484, 486, 485, 485,
- 487, 488, 488, 494, 492, 492, 487, 495, 491, 494,
- 496, 497, 498, 499, 500, 489, 496, 501, 498, 504,
-
- 506, 500, 503, 527, 503, 508, 495, 487, 504, 497,
- 494, 503, 501, 527, 495, 499, 505, 496, 497, 498,
- 499, 500, 507, 505, 501, 510, 504, 509, 511, 503,
- 527, 503, 506, 512, 515, 507, 516, 508, 514, 513,
- 518, 517, 513, 505, 519, 509, 512, 515, 516, 507,
- 511, 519, 520, 0, 509, 511, 523, 510, 513, 517,
- 512, 515, 514, 516, 521, 514, 513, 522, 517, 513,
- 524, 519, 518, 0, 529, 524, 520, 526, 523, 520,
- 522, 528, 525, 523, 530, 532, 529, 521, 525, 537,
- 0, 531, 539, 532, 522, 537, 521, 524, 536, 533,
-
- 526, 529, 531, 528, 526, 536, 530, 0, 528, 525,
- 538, 530, 532, 533, 521, 539, 537, 541, 531, 539,
- 540, 0, 538, 554, 542, 536, 533, 534, 540, 0,
- 554, 0, 534, 543, 534, 542, 545, 538, 547, 541,
- 534, 547, 534, 0, 541, 534, 534, 540, 545, 547,
- 554, 542, 534, 534, 534, 546, 543, 0, 544, 534,
- 543, 534, 544, 545, 549, 547, 548, 534, 547, 534,
- 551, 550, 534, 534, 549, 546, 552, 546, 555, 534,
- 544, 551, 546, 550, 548, 544, 553, 0, 557, 544,
- 553, 559, 556, 548, 556, 558, 549, 551, 550, 560,
-
- 552, 549, 546, 552, 555, 555, 559, 558, 561, 562,
- 564, 560, 565, 553, 557, 557, 563, 562, 559, 556,
- 566, 563, 558, 568, 570, 571, 560, 573, 566, 567,
- 565, 572, 564, 575, 561, 561, 562, 564, 574, 565,
- 578, 567, 570, 563, 568, 575, 0, 566, 571, 576,
- 568, 570, 571, 574, 572, 577, 567, 576, 572, 573,
- 575, 579, 580, 581, 582, 574, 584, 583, 577, 584,
- 587, 580, 578, 579, 589, 0, 576, 585, 582, 590,
- 588, 592, 577, 591, 0, 594, 581, 593, 579, 580,
- 581, 582, 583, 584, 583, 588, 585, 594, 591, 595,
-
- 593, 596, 587, 600, 585, 592, 589, 588, 592, 597,
- 591, 590, 594, 598, 593, 599, 597, 600, 601, 597,
- 599, 595, 602, 604, 598, 596, 595, 597, 596, 605,
- 600, 606, 607, 608, 615, 609, 597, 0, 608, 611,
- 598, 613, 610, 597, 609, 601, 597, 599, 610, 602,
- 612, 614, 616, 615, 611, 604, 605, 621, 606, 614,
- 617, 615, 609, 613, 607, 608, 611, 618, 613, 610,
- 620, 618, 619, 623, 612, 624, 616, 612, 614, 616,
- 619, 622, 617, 625, 624, 626, 629, 617, 622, 621,
- 627, 628, 629, 620, 618, 634, 623, 620, 626, 619,
-
- 623, 630, 624, 628, 632, 625, 631, 635, 622, 636,
- 625, 0, 626, 629, 631, 632, 627, 627, 628, 633,
- 0, 639, 636, 630, 0, 645, 633, 634, 630, 635,
- 637, 632, 638, 631, 635, 637, 636, 645, 637, 637,
- 640, 638, 641, 644, 647, 0, 633, 639, 639, 640,
- 642, 643, 645, 641, 637, 0, 644, 637, 649, 638,
- 0, 648, 637, 651, 650, 637, 637, 640, 653, 641,
- 644, 651, 642, 643, 652, 654, 647, 642, 643, 648,
- 656, 659, 649, 655, 657, 649, 650, 650, 648, 656,
- 651, 650, 653, 660, 655, 653, 652, 654, 658, 661,
-
- 660, 652, 654, 659, 657, 662, 663, 656, 659, 664,
- 655, 657, 658, 650, 663, 665, 666, 667, 670, 668,
- 660, 665, 0, 662, 669, 658, 661, 671, 667, 666,
- 676, 664, 662, 663, 672, 675, 664, 668, 674, 669,
- 673, 673, 665, 666, 667, 680, 668, 677, 671, 674,
- 670, 669, 676, 678, 671, 679, 677, 676, 672, 675,
- 682, 672, 675, 681, 683, 674, 678, 680, 679, 673,
- 684, 681, 680, 685, 677, 693, 686, 687, 686, 689,
- 678, 690, 679, 688, 689, 702, 683, 691, 694, 0,
- 681, 683, 682, 0, 688, 690, 694, 685, 692, 687,
-
- 685, 691, 684, 686, 687, 692, 695, 693, 690, 696,
- 688, 689, 692, 692, 691, 694, 697, 702, 698, 703,
- 692, 699, 700, 697, 695, 692, 706, 707, 0, 707,
- 0, 696, 692, 695, 703, 701, 696, 0, 708, 692,
- 692, 699, 700, 697, 698, 698, 703, 704, 699, 700,
- 701, 705, 706, 706, 707, 710, 705, 704, 709, 701,
- 715, 711, 701, 708, 712, 708, 709, 711, 715, 704,
- 713, 716, 714, 712, 704, 717, 719, 701, 716, 713,
- 710, 714, 710, 705, 704, 709, 718, 715, 711, 720,
- 721, 712, 723, 726, 719, 722, 724, 713, 716, 714,
-
- 723, 720, 721, 719, 722, 724, 725, 717, 727, 718,
- 0, 728, 729, 718, 733, 727, 720, 721, 725, 723,
- 724, 730, 722, 724, 728, 726, 0, 729, 731, 730,
- 0, 734, 724, 725, 731, 727, 732, 733, 728, 729,
- 734, 733, 735, 736, 732, 737, 737, 0, 730, 738,
- 0, 739, 736, 735, 737, 731, 743, 738, 734, 739,
- 740, 741, 744, 732, 742, 746, 0, 747, 0, 735,
- 736, 748, 737, 737, 741, 744, 738, 745, 739, 743,
- 747, 746, 740, 743, 749, 745, 751, 740, 741, 744,
- 742, 742, 746, 748, 747, 749, 752, 750, 748, 753,
-
- 751, 760, 754, 755, 745, 750, 755, 759, 758, 756,
- 757, 749, 761, 751, 764, 762, 752, 758, 765, 760,
- 766, 753, 754, 752, 750, 761, 753, 759, 760, 754,
- 755, 756, 757, 762, 759, 758, 756, 757, 763, 761,
- 765, 767, 762, 768, 766, 765, 764, 766, 769, 770,
- 771, 773, 774, 763, 772, 776, 768, 773, 777, 0,
- 776, 770, 781, 775, 767, 763, 769, 772, 767, 0,
- 768, 775, 784, 778, 771, 769, 770, 771, 773, 774,
- 777, 772, 785, 0, 780, 777, 783, 776, 782, 775,
- 775, 778, 780, 783, 781, 784, 782, 785, 775, 784,
-
- 778, 786, 788, 786, 789, 787, 790, 0, 791, 785,
- 792, 780, 792, 783, 787, 782, 809, 791, 793, 0,
- 800, 803, 817, 789, 796, 793, 790, 809, 786, 0,
- 800, 789, 787, 790, 788, 791, 796, 792, 804, 803,
- 807, 813, 808, 809, 0, 793, 794, 800, 803, 794,
- 806, 796, 810, 794, 817, 806, 794, 813, 811, 804,
- 808, 807, 812, 794, 794, 804, 794, 807, 813, 808,
- 820, 794, 814, 794, 815, 810, 794, 806, 0, 810,
- 794, 814, 857, 794, 811, 811, 823, 815, 812, 812,
- 794, 794, 820, 794, 821, 816, 0, 820, 819, 814,
-
- 821, 815, 816, 822, 824, 819, 826, 824, 0, 823,
- 827, 0, 822, 823, 857, 0, 0, 828, 827, 825,
- 829, 821, 816, 818, 818, 819, 818, 0, 826, 818,
- 822, 824, 829, 826, 818, 825, 830, 827, 830, 828,
- 818, 818, 825, 818, 828, 831, 825, 829, 835, 818,
- 818, 818, 832, 818, 833, 836, 818, 832, 0, 834,
- 835, 818, 825, 830, 837, 838, 840, 818, 818, 831,
- 818, 839, 831, 841, 833, 835, 842, 836, 0, 843,
- 0, 833, 836, 863, 832, 834, 834, 838, 840, 844,
- 837, 837, 838, 840, 843, 839, 845, 844, 839, 847,
-
- 841, 842, 846, 842, 849, 848, 843, 847, 850, 846,
- 851, 859, 852, 0, 853, 863, 844, 851, 854, 845,
- 850, 855, 858, 845, 848, 852, 847, 854, 856, 846,
- 849, 849, 848, 856, 862, 850, 855, 851, 859, 852,
- 853, 853, 860, 864, 858, 854, 865, 860, 855, 858,
- 866, 867, 864, 868, 865, 856, 862, 866, 869, 872,
- 870, 862, 873, 0, 871, 874, 0, 875, 0, 876,
- 864, 878, 877, 865, 860, 868, 875, 866, 872, 879,
- 868, 877, 888, 867, 870, 871, 872, 870, 876, 873,
- 869, 871, 874, 878, 875, 880, 876, 882, 878, 877,
-
- 881, 884, 879, 883, 887, 885, 879, 886, 882, 881,
- 889, 883, 890, 894, 888, 880, 894, 892, 893, 889,
- 890, 895, 880, 885, 882, 896, 886, 881, 884, 0,
- 883, 887, 885, 895, 886, 892, 893, 889, 897, 890,
- 894, 899, 898, 902, 892, 893, 900, 896, 895, 901,
- 903, 901, 896, 904, 905, 0, 897, 906, 904, 900,
- 907, 902, 909, 899, 903, 897, 898, 905, 899, 898,
- 902, 908, 907, 900, 914, 910, 901, 903, 910, 908,
- 909, 905, 911, 906, 906, 904, 912, 907, 915, 909,
- 916, 911, 917, 0, 912, 0, 916, 918, 908, 914,
-
- 919, 914, 910, 918, 920, 921, 0, 924, 929, 911,
- 912, 920, 921, 912, 917, 915, 925, 916, 922, 917,
- 925, 912, 919, 922, 918, 924, 923, 919, 926, 927,
- 930, 920, 921, 923, 924, 931, 928, 935, 927, 933,
- 929, 932, 936, 925, 928, 922, 934, 933, 930, 938,
- 931, 926, 932, 923, 937, 926, 927, 930, 935, 934,
- 939, 936, 931, 928, 935, 941, 933, 937, 932, 936,
- 940, 938, 941, 934, 0, 942, 938, 943, 940, 944,
- 946, 937, 945, 947, 943, 946, 950, 939, 948, 945,
- 951, 947, 941, 942, 949, 948, 953, 940, 944, 952,
-
- 954, 949, 942, 956, 943, 957, 944, 946, 0, 945,
- 947, 958, 952, 954, 961, 948, 955, 959, 950, 0,
- 964, 949, 951, 955, 960, 959, 952, 954, 953, 963,
- 965, 969, 960, 966, 958, 956, 961, 957, 958, 960,
- 962, 961, 970, 955, 959, 967, 962, 968, 971, 970,
- 0, 960, 964, 0, 967, 963, 963, 966, 973, 960,
- 966, 968, 965, 969, 972, 975, 974, 962, 978, 970,
- 975, 976, 967, 972, 968, 971, 977, 979, 983, 974,
- 973, 974, 979, 976, 0, 973, 983, 982, 981, 980,
- 974, 972, 0, 974, 978, 978, 980, 975, 976, 977,
-
- 981, 1020, 994, 977, 979, 983, 974, 985, 974, 982,
- 985, 986, 987, 989, 982, 981, 980, 991, 995, 990,
- 0, 993, 0, 991, 986, 987, 990, 989, 994, 994,
- 996, 997, 0, 1020, 985, 998, 0, 998, 986, 987,
- 989, 995, 996, 993, 991, 995, 990, 992, 993, 992,
- 999, 999, 1000, 992, 1001, 992, 0, 996, 997, 1003,
- 992, 1002, 998, 1004, 1000, 992, 1005, 1001, 1004, 0,
- 0, 992, 1003, 999, 992, 0, 992, 999, 999, 1000,
- 992, 1001, 992, 1002, 1005, 1006, 1003, 992, 1002, 1008,
- 1007, 0, 992, 1005, 1010, 1004, 1009, 1011, 1006, 1013,
-
- 0, 1008, 1007, 1017, 1014, 0, 1009, 1012, 1022, 1010,
- 1014, 1018, 1006, 1007, 1015, 1019, 1008, 1007, 1009, 1011,
- 1012, 1010, 1016, 1009, 1011, 1017, 1013, 1015, 1021, 1007,
- 1017, 1014, 1018, 1009, 1012, 1022, 1024, 1019, 1018, 1025,
- 1016, 1015, 1019, 1026, 1025, 1027, 0, 1029, 1031, 1016,
- 0, 1026, 1032, 0, 1027, 1030, 0, 1033, 0, 0,
- 1021, 1031, 1029, 1034, 0, 1042, 1025, 1032, 1024, 1035,
- 1026, 0, 1027, 1028, 1029, 1031, 1036, 1030, 1028, 1032,
- 1028, 1038, 1030, 1033, 1033, 1034, 1028, 1039, 1035, 1036,
- 1034, 1028, 1028, 1037, 1038, 1039, 1035, 1042, 1028, 1028,
-
- 1028, 1040, 1043, 1036, 1037, 1028, 1041, 1028, 1038, 1040,
- 1049, 1044, 1045, 1028, 1039, 1053, 1046, 1041, 1028, 1028,
- 1037, 1045, 1047, 1048, 1043, 1028, 1044, 1046, 1040, 1043,
- 1050, 1047, 1048, 1041, 1051, 1054, 1055, 1049, 1044, 1045,
- 1057, 1051, 1056, 1046, 1055, 1058, 1059, 1053, 1060, 1047,
- 1048, 1065, 1062, 1050, 1057, 1064, 1060, 1050, 1063, 1054,
- 1066, 1051, 1054, 1055, 1056, 1071, 1064, 1057, 1059, 1056,
- 1062, 1068, 1067, 1059, 1069, 1060, 1063, 1058, 1066, 1062,
- 1067, 1069, 1064, 1065, 1070, 1063, 1076, 1066, 1072, 1073,
- 1074, 1071, 1071, 1068, 1075, 1072, 1077, 1070, 1068, 1067,
-
- 1078, 1069, 1086, 1080, 1073, 0, 1077, 1076, 1074, 1082,
- 0, 1070, 1075, 1076, 1080, 1072, 1073, 1074, 1083, 1085,
- 1087, 1075, 1082, 1077, 1084, 1083, 1084, 1088, 1087, 1089,
- 1080, 1090, 1078, 1091, 1086, 1092, 1082, 1095, 1089, 1096,
- 1088, 1085, 1098, 1090, 0, 1083, 1085, 1087, 1099, 1097,
- 1100, 1084, 1101, 0, 1088, 1091, 1089, 1092, 1090, 1095,
- 1091, 1096, 1092, 1102, 1095, 1110, 1096, 1097, 1098, 1098,
- 1101, 1103, 1105, 1106, 1108, 1102, 1097, 1108, 1106, 1101,
- 1099, 1109, 1100, 1105, 1111, 1103, 1114, 1112, 1118, 1110,
- 1102, 1113, 1110, 1109, 1112, 1116, 1120, 1111, 1103, 1105,
-
- 1108, 1108, 1113, 1115, 1108, 1106, 1114, 1117, 1109, 1116,
- 1119, 1111, 1115, 1114, 1112, 1121, 1122, 1119, 1113, 1117,
- 1118, 1125, 1116, 1123, 1128, 1126, 1127, 1121, 1120, 1130,
- 1115, 0, 1127, 1129, 1117, 0, 1123, 1119, 1122, 1131,
- 1130, 1132, 1121, 1122, 1134, 1133, 1128, 1125, 1125, 1126,
- 1123, 1128, 1126, 1127, 1136, 1129, 1130, 1131, 1137, 1134,
- 1129, 1138, 1140, 1132, 1139, 1141, 1131, 1133, 1132, 1137,
- 1139, 1134, 1133, 1144, 1143, 1136, 1145, 1142, 1146, 1148,
- 1151, 1136, 1138, 1143, 1149, 1137, 1148, 1146, 1138, 1152,
- 1147, 1139, 1141, 1150, 1140, 1142, 1153, 1144, 1147, 1165,
-
- 1144, 1143, 1145, 1145, 1142, 1146, 1148, 1150, 1149, 1154,
- 1155, 1149, 1151, 1156, 1158, 1161, 1157, 1147, 0, 1163,
- 1150, 1152, 1160, 1162, 1161, 1164, 1165, 1178, 1153, 0,
- 1162, 1154, 1155, 1168, 1171, 1166, 1154, 1155, 1157, 1167,
- 1170, 1172, 1161, 1157, 1160, 1156, 1158, 1164, 1170, 1160,
- 1162, 1163, 1164, 1166, 1169, 1168, 1173, 1167, 1171, 1178,
- 1168, 1171, 1166, 1169, 1174, 1172, 1167, 1170, 1172, 1175,
- 1176, 1177, 1173, 1179, 1182, 1180, 1183, 1181, 1175, 1177,
- 1184, 1169, 0, 1173, 1183, 1176, 1174, 1180, 0, 1194,
- 0, 1174, 1189, 1184, 1185, 0, 1175, 1176, 1177, 1181,
-
- 1208, 1182, 1180, 1183, 1181, 1179, 1186, 1184, 1188, 1185,
- 1189, 1191, 1190, 1191, 1193, 1186, 1194, 1188, 1195, 1189,
- 1190, 1185, 1193, 1198, 1196, 1197, 1203, 1200, 1206, 1202,
- 1198, 1201, 1208, 1186, 1209, 1188, 0, 1195, 1191, 1190,
- 1200, 1193, 1204, 1201, 1202, 1195, 1196, 1197, 1203, 1205,
- 1198, 1196, 1197, 1203, 1200, 1206, 1202, 1207, 1201, 1210,
- 1204, 1205, 1211, 1212, 1207, 0, 1209, 1213, 1215, 1204,
- 1216, 1210, 0, 1211, 1214, 1218, 1205, 1217, 1221, 1220,
- 1219, 1215, 1225, 1216, 1207, 1212, 1210, 1218, 1219, 1211,
- 1212, 1227, 1213, 0, 1213, 1215, 1214, 1216, 1221, 1217,
-
- 1222, 1214, 1218, 1220, 1217, 1221, 1220, 1219, 1223, 1225,
- 1226, 1228, 1222, 1229, 1227, 1230, 1223, 1231, 1227, 1232,
- 1228, 1235, 1234, 1226, 1231, 1229, 1237, 1222, 1232, 1236,
- 1232, 0, 1238, 1232, 1240, 1223, 1230, 1226, 1228, 1248,
- 1229, 1232, 1230, 0, 1231, 1234, 1232, 1235, 1235, 1234,
- 1239, 1236, 1238, 1237, 1241, 1232, 1236, 1232, 1240, 1238,
- 1232, 1240, 1241, 1239, 1242, 1243, 1245, 1246, 1249, 1247,
- 1251, 1248, 1250, 1242, 1252, 1246, 1254, 1239, 1255, 0,
- 1256, 1241, 1252, 1243, 1247, 1250, 1251, 1258, 1245, 1259,
- 1249, 1242, 1243, 1245, 1246, 1249, 1247, 1251, 1261, 1250,
-
- 1255, 1252, 1256, 1254, 1257, 1255, 1260, 1256, 1262, 1258,
- 1261, 1257, 1259, 1263, 1258, 1265, 1259, 1264, 1266, 1267,
- 1262, 1263, 1268, 1269, 1260, 1261, 1264, 1265, 1270, 1269,
- 1268, 1257, 1273, 1260, 1267, 1262, 1271, 1270, 1266, 1272,
- 1263, 1264, 1265, 1274, 1264, 1266, 1267, 1275, 1273, 1268,
- 1269, 1272, 1277, 1264, 1275, 1270, 1278, 1271, 1276, 1273,
- 1284, 1279, 1280, 1271, 1281, 1276, 1272, 1287, 1278, 1279,
- 1277, 1282, 1281, 1282, 1275, 1274, 0, 1280, 1283, 1277,
- 1285, 1288, 1289, 1278, 1290, 1276, 1292, 1285, 1279, 1280,
- 1283, 1281, 1284, 1288, 1291, 1289, 1293, 1292, 1282, 1287,
-
- 1294, 1291, 1296, 1290, 1299, 1283, 1297, 1285, 1288, 1289,
- 1296, 1290, 1295, 1292, 1298, 1294, 1303, 1295, 1293, 1297,
- 1301, 1291, 1308, 1293, 1302, 0, 0, 1294, 1298, 1296,
- 1299, 1299, 1304, 1297, 1301, 0, 0, 1307, 1305, 1306,
- 0, 1298, 1302, 1311, 1295, 1300, 1309, 1301, 1303, 1300,
- 1317, 1302, 1300, 1300, 1308, 1307, 1310, 1300, 1304, 1304,
- 1305, 1313, 1306, 1300, 1307, 1305, 1306, 1300, 1309, 1311,
- 1311, 1300, 1300, 1309, 1318, 1312, 1300, 1316, 1310, 1300,
- 1300, 1312, 1317, 1310, 1300, 1315, 1316, 1313, 1313, 1314,
- 1300, 1314, 1315, 1319, 1300, 1323, 1320, 1322, 1321, 1325,
-
- 1324, 1327, 1312, 1329, 1316, 1321, 1318, 1326, 1323, 1324,
- 1328, 0, 1315, 1314, 1320, 1330, 1314, 1319, 1314, 1322,
- 1319, 1353, 1323, 1320, 1322, 1321, 1329, 1324, 1326, 1330,
- 1329, 1325, 1328, 1327, 1326, 1332, 1333, 1328, 1334, 1335,
- 1335, 0, 1330, 1331, 1336, 0, 1338, 1339, 1331, 1333,
- 1331, 1340, 1331, 1353, 1331, 0, 0, 1332, 1340, 1339,
- 1336, 1331, 1332, 1333, 1334, 1334, 1342, 1341, 1335, 1338,
- 1331, 1336, 1344, 1338, 1339, 1331, 1341, 1331, 1340, 1331,
- 1343, 1331, 1345, 1346, 1342, 1343, 1347, 1349, 1346, 1348,
- 1344, 1354, 1355, 1342, 1341, 1350, 1351, 0, 1352, 1344,
-
- 1345, 1356, 1348, 1350, 1351, 1349, 1360, 1355, 1347, 1345,
- 1346, 1352, 1343, 1347, 1349, 1358, 1348, 1354, 1354, 1355,
- 1356, 1357, 1350, 1351, 1360, 1352, 1359, 1361, 1356, 1362,
- 1363, 0, 1363, 1360, 1357, 1365, 1364, 1358, 1362, 1359,
- 1366, 1367, 1358, 1368, 1369, 0, 0, 1361, 1357, 1371,
- 1372, 1373, 1366, 1359, 1361, 1375, 1362, 1363, 1364, 1373,
- 1377, 1374, 1365, 1364, 1378, 1368, 1383, 1366, 1367, 1369,
- 1368, 1369, 1372, 1371, 1376, 1379, 1371, 1372, 1373, 1374,
- 1380, 1376, 1375, 1381, 1385, 1386, 1380, 1377, 1374, 1381,
- 1378, 1378, 1382, 1383, 1385, 1388, 1384, 1379, 1382, 1387,
-
- 0, 1376, 1379, 1384, 1390, 1392, 1387, 1380, 1389, 1386,
- 1381, 1385, 1386, 1391, 1392, 1394, 1395, 0, 1400, 1382,
- 1396, 0, 1390, 1384, 1397, 0, 1387, 1388, 1395, 1402,
- 1389, 1390, 1392, 1399, 1396, 1389, 1398, 1400, 1391, 1394,
- 1391, 1404, 1394, 1395, 1401, 1400, 1397, 1396, 1403, 1398,
- 1405, 1397, 1406, 1402, 1408, 1399, 1402, 1407, 1411, 1409,
- 1399, 1406, 1412, 1398, 0, 1413, 1401, 1404, 1404, 1414,
- 1403, 1401, 1405, 1409, 1408, 1403, 1415, 1405, 1407, 1406,
- 1416, 1408, 1419, 1418, 1407, 1417, 1409, 1413, 1420, 1422,
- 1411, 1414, 1413, 1417, 1412, 1420, 1414, 1423, 1416, 1418,
-
- 1424, 1425, 1428, 1429, 1430, 1433, 1423, 1416, 1415, 1419,
- 1418, 1422, 1417, 1425, 1426, 1420, 1422, 1424, 1427, 1436,
- 1431, 1426, 1427, 1435, 1423, 1430, 1434, 1424, 1425, 1438,
- 1435, 1430, 1434, 1437, 1428, 1429, 1431, 1433, 1441, 1434,
- 1437, 1426, 1439, 1440, 1438, 1427, 1443, 1431, 1443, 1444,
- 1435, 1436, 1440, 1434, 1442, 1439, 1438, 1445, 1444, 1434,
- 1437, 1442, 1446, 1447, 1441, 1441, 1449, 1451, 1448, 1439,
- 1440, 1446, 1448, 1443, 1452, 1451, 1444, 1453, 1455, 1445,
- 1456, 1442, 1453, 1454, 1445, 1457, 1461, 1452, 1449, 1446,
- 1447, 1458, 1454, 1449, 1451, 1448, 1455, 1460, 1457, 1456,
-
- 1460, 1452, 1463, 1458, 1461, 1455, 1462, 1456, 1459, 1453,
- 1454, 1459, 1457, 1461, 1465, 1463, 1466, 1468, 1458, 1460,
- 1459, 1467, 1468, 1471, 1460, 1472, 1469, 1460, 1487, 1463,
- 1507, 1462, 1471, 1462, 1469, 1459, 1473, 1467, 1459, 1466,
- 1470, 1470, 1474, 1466, 1476, 1475, 1465, 1472, 1467, 1468,
- 1471, 1476, 1472, 1469, 1475, 1477, 1481, 1480, 1473, 1478,
- 1487, 1483, 1507, 1473, 1474, 1481, 1478, 1470, 1484, 1474,
- 1480, 1476, 1475, 1486, 0, 1488, 1482, 1477, 0, 1491,
- 1485, 1486, 1477, 1481, 1480, 1482, 1478, 1483, 1483, 1485,
- 1488, 1484, 1491, 1489, 1495, 1484, 1492, 1490, 1493, 1496,
-
- 1486, 1494, 1488, 1482, 1489, 1490, 1491, 1485, 1492, 1494,
- 1493, 1497, 1500, 1498, 1499, 1508, 1495, 1501, 1500, 1496,
- 1489, 1495, 1498, 1492, 1490, 1493, 1496, 1499, 1494, 1502,
- 1503, 1504, 1509, 1497, 1506, 1501, 1505, 1511, 1497, 1500,
- 1498, 1499, 1503, 1505, 1501, 1509, 1510, 1508, 1512, 1504,
- 1516, 1513, 1515, 1517, 1518, 1502, 1502, 1503, 1504, 1509,
- 1506, 1506, 1513, 1505, 1511, 1514, 0, 1519, 1522, 1512,
- 1520, 1514, 1510, 1510, 1515, 1512, 1523, 0, 1513, 1515,
- 1524, 1525, 1516, 1530, 1529, 1517, 1518, 1526, 1527, 1520,
- 1525, 1520, 1514, 1519, 1519, 1522, 1520, 1520, 1524, 1523,
-
- 1528, 1527, 1526, 1523, 1529, 1532, 1531, 1524, 1525, 1530,
- 1530, 1529, 1528, 1531, 1526, 1527, 1520, 1533, 1520, 1538,
- 1535, 1534, 1539, 1543, 1532, 1536, 1537, 1528, 1535, 1539,
- 1536, 1537, 1532, 1531, 1534, 1540, 1548, 1541, 1544, 1533,
- 0, 1543, 1538, 1542, 1533, 1541, 1538, 1535, 1534, 1539,
- 1543, 1542, 1546, 1554, 1549, 1545, 0, 1536, 1537, 1546,
- 1544, 1540, 1540, 1545, 1541, 1544, 1547, 1551, 1548, 1550,
- 1542, 1552, 1553, 1553, 1551, 1547, 1549, 1557, 1550, 1546,
- 1555, 1549, 1545, 1552, 1556, 1554, 1559, 1558, 1555, 1560,
- 1564, 0, 1561, 1547, 1551, 1558, 1550, 1560, 1552, 1553,
-
- 1561, 1567, 1562, 1564, 1559, 1556, 1566, 1555, 1568, 1557,
- 1562, 1556, 1563, 1559, 1558, 1565, 1560, 1564, 1566, 1561,
- 1563, 1565, 1569, 1570, 1572, 1571, 1573, 1567, 1567, 1562,
- 1569, 1570, 1568, 1566, 1574, 1568, 1575, 0, 0, 1563,
- 1571, 1576, 1565, 0, 1578, 1577, 1579, 1588, 1584, 1569,
- 1570, 1572, 1571, 1573, 1583, 1576, 1574, 1577, 1582, 1575,
- 1579, 1574, 1578, 1575, 1585, 1580, 1589, 1582, 1576, 1580,
- 1584, 1578, 1577, 1579, 1588, 1584, 1585, 1586, 1583, 1590,
- 1593, 1583, 1580, 1587, 1586, 1582, 1591, 1592, 1589, 0,
- 1580, 1585, 1580, 1589, 1587, 1594, 1580, 1595, 1591, 1597,
-
- 1596, 1592, 1602, 1599, 1586, 1601, 1597, 1598, 1600, 1580,
- 1587, 1590, 1593, 1591, 1592, 1600, 1598, 1594, 1606, 1604,
- 1595, 1599, 1594, 1596, 1595, 1607, 1597, 1596, 1604, 1602,
- 1599, 1607, 1608, 1610, 1598, 1600, 1609, 1601, 0, 1613,
- 1611, 0, 1616, 0, 1615, 1617, 1604, 1611, 0, 1618,
- 1606, 1621, 1607, 1619, 1608, 1622, 1617, 1626, 1632, 1608,
- 1618, 1622, 1609, 1609, 1619, 1610, 1613, 1611, 1615, 1616,
- 1623, 1615, 1617, 1624, 1625, 1621, 1618, 1623, 1621, 1628,
- 1619, 1625, 1622, 1626, 1626, 1628, 1627, 1629, 1630, 1631,
- 1632, 1624, 1633, 1634, 1635, 1629, 1636, 1623, 1627, 1639,
-
- 1624, 1625, 1631, 1635, 1644, 1637, 1628, 1637, 1636, 1640,
- 1630, 1634, 1642, 1627, 1629, 1630, 1631, 1638, 1633, 1633,
- 1634, 1635, 1640, 1636, 1638, 1639, 1639, 1645, 1641, 1643,
- 1650, 1644, 1637, 1646, 1642, 1647, 1640, 1641, 1648, 1642,
- 1646, 1643, 1653, 1648, 1638, 1649, 1650, 1651, 1655, 1656,
- 1645, 1652, 1657, 1649, 1645, 1641, 1643, 1650, 1658, 1652,
- 1646, 1647, 1647, 0, 1653, 1648, 1657, 0, 1660, 1653,
- 1651, 1659, 1649, 1656, 1651, 1655, 1656, 1660, 1652, 1657,
- 1658, 1661, 1659, 1662, 1662, 1658, 1663, 1664, 1665, 1664,
- 1666, 1662, 1671, 1668, 1661, 1660, 1667, 1669, 1659, 1663,
-
- 1668, 1670, 1677, 1672, 1669, 1673, 1665, 0, 1661, 1670,
- 1662, 1662, 1675, 1663, 1664, 1665, 1666, 1666, 1667, 1671,
- 1668, 1672, 1674, 1667, 1669, 1676, 1678, 1673, 1670, 1674,
- 1672, 1679, 1673, 1678, 1677, 1680, 0, 1675, 1682, 1675,
- 1683, 0, 1684, 1686, 1688, 1689, 1685, 1676, 1689, 1674,
- 1684, 1682, 1676, 1678, 1685, 1690, 1695, 1680, 1691, 1693,
- 1701, 1692, 1680, 1679, 1686, 1682, 1688, 1683, 1693, 1684,
- 1686, 1688, 1689, 1685, 1692, 1694, 0, 1696, 1698, 0,
- 1695, 1690, 1690, 1695, 1691, 1691, 1693, 1694, 1692, 1697,
- 1699, 1700, 1701, 1698, 1700, 0, 1703, 1699, 1697, 1709,
-
- 1702, 1705, 1694, 1696, 1696, 1698, 1700, 1706, 1707, 1711,
- 1707, 1710, 1703, 1708, 1710, 1700, 1697, 1699, 1700, 1705,
- 1703, 1700, 1702, 1703, 1712, 1713, 1709, 1702, 1705, 1706,
- 0, 1714, 1716, 1700, 1706, 1707, 1715, 1708, 1710, 1703,
- 1708, 1711, 1719, 1717, 1722, 1718, 1720, 1713, 1721, 1723,
- 1724, 1719, 1713, 1725, 1720, 1721, 1712, 1714, 1714, 1718,
- 1727, 1726, 1715, 1715, 1716, 1717, 1730, 1729, 1722, 1719,
- 1717, 1722, 1718, 1720, 1728, 1721, 1731, 1732, 1728, 1734,
- 1733, 1723, 1724, 1726, 0, 1725, 1732, 1733, 1726, 1729,
- 0, 1734, 1727, 1730, 1729, 1736, 1737, 1735, 1731, 1738,
-
- 1739, 1728, 1736, 1731, 1732, 1735, 1734, 1733, 1740, 1737,
- 1742, 1743, 1738, 1739, 1741, 1747, 1741, 1740, 1749, 1745,
- 1744, 1750, 1736, 1737, 1735, 1748, 1738, 1739, 1744, 0,
- 1747, 1756, 1749, 1742, 0, 1740, 1743, 1742, 1743, 1745,
- 1748, 1741, 1747, 1751, 1752, 1749, 1745, 1744, 1754, 1753,
- 1751, 0, 1748, 1750, 1755, 1752, 1753, 1756, 1756, 1757,
- 1759, 1754, 1760, 1761, 1762, 0, 1763, 0, 1764, 1760,
- 1751, 1752, 1755, 1767, 0, 1754, 1753, 1757, 1755, 1762,
- 1764, 1755, 1767, 1765, 1768, 1761, 1757, 1759, 1770, 1760,
- 1761, 1762, 1763, 1763, 1766, 1764, 1765, 1766, 1772, 1755,
-
- 1767, 1769, 1768, 1778, 1771, 1776, 1779, 1771, 1770, 1772,
- 1765, 1768, 1774, 1769, 1776, 1770, 1777, 1774, 1777, 1780,
- 1781, 1766, 1771, 0, 1774, 1772, 1783, 1778, 1769, 1782,
- 1778, 1771, 1776, 1779, 1771, 1781, 1784, 1785, 1782, 1774,
- 1786, 1789, 0, 1777, 1774, 1800, 1780, 1781, 1786, 1787,
- 1783, 1785, 1788, 1783, 1790, 1791, 1782, 1794, 1792, 1793,
- 1790, 1795, 1799, 1784, 1785, 1789, 1792, 1786, 1789, 1795,
- 1793, 1787, 1800, 1798, 1788, 1794, 1787, 1791, 0, 1788,
- 1796, 1790, 1791, 1796, 1794, 1792, 1793, 1797, 1795, 1801,
- 1797, 1798, 1802, 1804, 1799, 1805, 1813, 1803, 1796, 1802,
-
- 1798, 1806, 1804, 1808, 0, 1813, 1809, 1796, 1805, 1801,
- 1796, 1803, 1806, 1807, 1797, 1812, 1801, 1812, 1807, 1802,
- 1804, 1809, 1805, 1813, 1803, 1808, 1814, 1815, 1806, 1816,
- 1808, 1817, 0, 1809, 1818, 0, 1819, 1824, 1818, 1823,
- 1816, 1820, 1812, 1824, 1820, 1807, 1822, 1821, 1823, 1817,
- 1819, 1815, 1814, 1814, 1815, 1833, 1816, 1836, 1817, 1820,
- 1818, 1818, 1819, 1819, 1824, 1818, 1823, 1825, 1820, 1821,
- 1826, 1820, 1822, 1822, 1821, 1826, 1825, 1819, 1828, 1830,
- 1829, 1831, 1832, 1835, 1830, 0, 1838, 1833, 1834, 1836,
- 1837, 1828, 1829, 1839, 1825, 1832, 0, 1834, 1845, 1838,
-
- 1840, 1844, 1826, 1831, 1842, 1828, 1830, 1829, 1831, 1832,
- 1835, 1842, 1837, 1838, 1844, 1834, 1843, 1837, 1846, 1848,
- 1847, 1840, 1850, 1843, 0, 1839, 1847, 1840, 1844, 1852,
- 1845, 1842, 1846, 1855, 1853, 1856, 1857, 1852, 1854, 1864,
- 1859, 1850, 1853, 1843, 1847, 1846, 1854, 1847, 1865, 1850,
- 1858, 1848, 1855, 1847, 1857, 1860, 1852, 1856, 1859, 1861,
- 1855, 1853, 1856, 1857, 1858, 1854, 1862, 1859, 1863, 1860,
- 1866, 1864, 1861, 1867, 1868, 1870, 1869, 1858, 1872, 1862,
- 1865, 1874, 1860, 1869, 1870, 1873, 1861, 1867, 1871, 1863,
- 0, 1879, 0, 1862, 1866, 1863, 1871, 1866, 1877, 1873,
-
- 1867, 1868, 1870, 1869, 1875, 1872, 1876, 1877, 1882, 1875,
- 1884, 1881, 1873, 1874, 1880, 1871, 1863, 1876, 1879, 1883,
- 1885, 1880, 1886, 1887, 1891, 1877, 1883, 1887, 1889, 1894,
- 1882, 1875, 1884, 1876, 1881, 1882, 1890, 1884, 1881, 1898,
- 1886, 1880, 1885, 1892, 1889, 1893, 1883, 1885, 1891, 1886,
- 1887, 1891, 1895, 1896, 1890, 1889, 1894, 1893, 1892, 1897,
- 1895, 1899, 1900, 1890, 1901, 1908, 1898, 1897, 1896, 1904,
- 1892, 1912, 1893, 1906, 0, 1900, 1904, 1902, 1903, 1895,
- 1896, 1906, 1911, 1899, 1901, 1915, 1897, 1907, 1899, 1900,
- 1910, 1901, 1902, 1903, 1907, 1909, 1904, 1908, 1912, 1910,
-
- 1906, 1913, 1917, 1911, 1902, 1903, 1914, 1918, 1919, 1911,
- 1909, 1920, 1915, 1914, 1907, 1921, 0, 1910, 0, 1922,
- 1923, 1941, 1909, 1925, 1917, 1913, 1919, 1924, 1913, 1917,
- 1925, 1926, 1927, 1914, 1922, 1919, 1926, 1931, 1929, 1918,
- 1928, 1927, 1921, 1920, 1930, 1923, 1922, 1923, 1932, 1928,
- 1925, 1924, 1934, 1941, 1924, 1931, 1933, 0, 1926, 1927,
- 1929, 0, 1938, 1932, 1931, 1929, 1930, 1928, 1933, 1935,
- 1936, 1930, 1940, 1937, 1934, 1932, 1939, 1936, 1945, 1934,
- 1937, 1944, 1935, 1933, 1938, 1942, 1945, 1935, 1939, 1938,
- 1946, 1942, 1944, 1947, 1948, 1937, 1935, 1936, 1946, 1940,
-
- 1937, 1948, 1949, 1939, 1947, 1945, 1951, 1937, 1944, 1935,
- 1952, 1950, 1942, 1950, 1953, 1954, 1955, 1946, 1956, 1957,
- 1947, 1948, 1954, 1960, 1950, 1957, 1961, 1949, 1958, 1949,
- 1959, 1962, 1951, 1951, 1958, 1963, 1959, 1952, 1950, 1965,
- 1950, 1953, 1954, 1955, 1956, 1956, 1957, 1966, 1967, 1961,
- 1960, 1969, 1971, 1961, 1968, 1958, 1966, 1959, 1968, 1963,
- 1972, 1973, 1963, 1962, 1970, 1975, 1970, 1974, 1973, 1977,
- 1976, 1965, 0, 1969, 1966, 1977, 1971, 1978, 1969, 1971,
- 1967, 1968, 1976, 1979, 1982, 1980, 1981, 1972, 1973, 1974,
- 1987, 1970, 1975, 1993, 1974, 0, 1977, 1976, 1993, 1978,
-
- 1983, 1983, 1983, 0, 1978, 1979, 2003, 1983, 1981, 1985,
- 1979, 1980, 1980, 1981, 1984, 1983, 1982, 1986, 1985, 1988,
- 1990, 1984, 1987, 1989, 1986, 1993, 1988, 1983, 1983, 1983,
- 1989, 1991, 1994, 2003, 1983, 1996, 1985, 1995, 1997, 1998,
- 1990, 1984, 1999, 2000, 1986, 1994, 1988, 1990, 2001, 1995,
- 1989, 1998, 2005, 1991, 1997, 2001, 2008, 2002, 1991, 1994,
- 1996, 2000, 1996, 2002, 1995, 1997, 1998, 2004, 2004, 2006,
- 2000, 2009, 2007, 2010, 1999, 2001, 2006, 2007, 2005, 2005,
- 2011, 2014, 2008, 2008, 2002, 2016, 2015, 2011, 2015, 2019,
- 2020, 2018, 2023, 2021, 2004, 2019, 2006, 2024, 2009, 2007,
-
- 2010, 2021, 2026, 2016, 2022, 2023, 2027, 2011, 2014, 2018,
- 2028, 2025, 2016, 2015, 2026, 2022, 2019, 2025, 2018, 2023,
- 2021, 2030, 2020, 2031, 2024, 2033, 2027, 2035, 2028, 2026,
- 2037, 2022, 0, 2027, 2029, 2029, 2033, 2028, 2025, 2032,
- 2032, 2036, 2038, 2040, 2039, 2041, 2043, 2030, 2030, 2038,
- 2031, 2044, 2033, 2045, 2043, 2046, 0, 2050, 2047, 2035,
- 2057, 2029, 2037, 2036, 2039, 2050, 2032, 2048, 2036, 2038,
- 2041, 2039, 2041, 2043, 2049, 2040, 2047, 2046, 2051, 2048,
- 2045, 2049, 2046, 2044, 2050, 2047, 2053, 2054, 2052, 2055,
- 2055, 2056, 2057, 2058, 2048, 2059, 2054, 2060, 2067, 2061,
-
- 0, 2049, 2051, 2052, 2060, 2051, 2062, 0, 2058, 2066,
- 2053, 2061, 2064, 2053, 2054, 2052, 2055, 2056, 2056, 2064,
- 2058, 2073, 2062, 2065, 2060, 2067, 2061, 2059, 2065, 2062,
- 2069, 2066, 2068, 2062, 2070, 2068, 2066, 2072, 2069, 2064,
- 2074, 2075, 2076, 2077, 2073, 2072, 2070, 2078, 2073, 2062,
- 2065, 2081, 2079, 0, 0, 2084, 0, 2069, 2089, 2068,
- 2076, 2070, 2075, 2084, 2072, 2078, 2074, 2074, 2075, 2076,
- 2077, 2080, 2083, 2085, 2078, 2079, 2080, 2082, 2081, 2079,
- 2090, 2086, 2084, 2082, 2087, 2083, 2088, 2080, 2086, 2090,
- 2089, 2087, 2092, 2088, 2091, 2085, 2093, 2094, 2080, 2083,
-
- 2085, 2095, 2096, 2080, 2082, 2102, 2091, 2090, 2086, 2100,
- 2093, 2087, 2098, 2088, 2092, 2099, 2100, 2104, 2101, 2092,
- 2099, 2091, 2106, 2093, 2094, 2096, 2108, 2095, 2095, 2096,
- 2098, 2099, 2102, 2105, 2109, 2109, 2100, 2110, 2105, 2098,
- 2101, 2111, 2099, 2112, 2104, 2101, 2115, 2099, 0, 2119,
- 2117, 2114, 2116, 2118, 2106, 2118, 2111, 2120, 2108, 2110,
- 2121, 2109, 2120, 2122, 2110, 2105, 2114, 2116, 2111, 2115,
- 2126, 2139, 2125, 2115, 2123, 2112, 2117, 2117, 2114, 2116,
- 2118, 2119, 2123, 2128, 2120, 2126, 2124, 2129, 2132, 2130,
- 2122, 2134, 2121, 2124, 2125, 2129, 2133, 2126, 2128, 2125,
-
- 2135, 2123, 2136, 2139, 2140, 2138, 2141, 2137, 2143, 2142,
- 2128, 2130, 2138, 2124, 2129, 2132, 2130, 2134, 2134, 2137,
- 2133, 2145, 2146, 2133, 2149, 2140, 2143, 2135, 2141, 2136,
- 2142, 2140, 2138, 2141, 2137, 2143, 2142, 2148, 2150, 0,
- 2151, 2153, 2154, 2145, 2156, 0, 2161, 2149, 2145, 2146,
- 2155, 2149, 2157, 2150, 2158, 2162, 2153, 2154, 2159, 2160,
- 2163, 2148, 2162, 2168, 2148, 2150, 2151, 2151, 2153, 2154,
- 2157, 2156, 2155, 2161, 2166, 2164, 2158, 2155, 2163, 2157,
- 2159, 2158, 2162, 2160, 2164, 2159, 2160, 2163, 2165, 2167,
- 2169, 2170, 2172, 2178, 2171, 2168, 2165, 2166, 2175, 2169,
-
- 2178, 2166, 2164, 2171, 2176, 2172, 2177, 2175, 2179, 2170,
- 2180, 2167, 2174, 2187, 2181, 2165, 2167, 2169, 2170, 2172,
- 2178, 2171, 2176, 2174, 2177, 2175, 2182, 2183, 2180, 2181,
- 2184, 2176, 2182, 2177, 2179, 2179, 2189, 2180, 2174, 2174,
- 2187, 2181, 2198, 2194, 2184, 2190, 2202, 2191, 2192, 2183,
- 2174, 2195, 2196, 2182, 2183, 2194, 2190, 2184, 2191, 2192,
- 2189, 2197, 2199, 2189, 2195, 2205, 2200, 2201, 2198, 2198,
- 2194, 2197, 2190, 2202, 2191, 2192, 2201, 2203, 2195, 2200,
- 2206, 2208, 2209, 2210, 2196, 2208, 2211, 2199, 2197, 2199,
- 2212, 2214, 2205, 2200, 2201, 2213, 2203, 2215, 2214, 2211,
-
- 2213, 2218, 2254, 2209, 2203, 0, 2206, 2206, 2208, 2209,
- 2212, 2216, 2219, 2211, 2217, 2210, 2218, 2212, 2214, 2216,
- 2217, 2220, 2213, 2215, 2215, 2221, 2223, 2219, 2218, 2222,
- 2222, 2224, 2226, 2220, 2254, 0, 2226, 2216, 2216, 2219,
- 2221, 2217, 2225, 2224, 2223, 2230, 2216, 2225, 2220, 2230,
- 2227, 2227, 2221, 2223, 2227, 2229, 2222, 2232, 2224, 2226,
- 2233, 2231, 2229, 2234, 2236, 2235, 2237, 2227, 0, 2233,
- 2234, 2240, 2230, 2237, 2225, 2227, 2231, 2227, 2227, 2239,
- 2242, 2227, 2229, 2243, 2232, 0, 2236, 2233, 2231, 2235,
- 2234, 2236, 2235, 2237, 2227, 2241, 2240, 2246, 2240, 2248,
-
- 2249, 2239, 2242, 2243, 2241, 2250, 2239, 2242, 2248, 2251,
- 2243, 2252, 2257, 2259, 2253, 2246, 2255, 2258, 2249, 2252,
- 2250, 2253, 2241, 2255, 2246, 2261, 2248, 2249, 2260, 2260,
- 2258, 2262, 2250, 2269, 2251, 2264, 2251, 2257, 2252, 2257,
- 2259, 2253, 2265, 2255, 2258, 2266, 2268, 2261, 2270, 2271,
- 2267, 2272, 2261, 2268, 2266, 2260, 2262, 2264, 2262, 2267,
- 2276, 2274, 2264, 2271, 2265, 2269, 2272, 2278, 2276, 2265,
- 2270, 2277, 2266, 2268, 2273, 2270, 2271, 2267, 2272, 2273,
- 2274, 2279, 2278, 2280, 2277, 2281, 2283, 2276, 2274, 2284,
- 2282, 2286, 2285, 2283, 2278, 2287, 2288, 2290, 2277, 2352,
-
- 0, 2281, 2282, 2292, 2287, 2291, 2273, 2289, 2279, 2280,
- 2280, 2293, 2281, 2283, 2285, 2289, 2286, 2282, 2286, 2285,
- 2291, 2284, 2287, 2294, 2290, 2295, 2289, 2296, 2288, 2292,
- 2292, 2352, 2291, 2298, 2289, 2304, 2296, 2293, 2293, 2300,
- 2299, 2294, 2289, 2299, 2302, 2301, 2303, 2295, 2305, 2302,
- 2294, 2301, 2295, 2304, 2296, 2307, 2298, 2309, 2299, 2308,
- 2298, 2303, 2304, 2305, 2300, 2310, 2300, 2299, 2315, 2307,
- 2299, 2312, 2301, 2303, 2308, 2305, 2302, 2313, 2320, 2309,
- 2320, 2314, 2307, 2319, 2309, 2312, 2308, 2310, 2316, 2313,
- 2321, 2317, 2310, 2318, 2319, 2315, 2313, 2316, 2312, 2314,
-
- 2317, 2322, 2318, 2321, 2313, 2320, 2325, 2323, 2314, 2326,
- 2319, 0, 2327, 2322, 2330, 2316, 2313, 2321, 2317, 2327,
- 2318, 2325, 2328, 2329, 2326, 2334, 2331, 2336, 2322, 2323,
- 2338, 2339, 2330, 2325, 2323, 2331, 2326, 2341, 2334, 2327,
- 2339, 2330, 2338, 2337, 2328, 2329, 2334, 2337, 2336, 2328,
- 2329, 2342, 2334, 2331, 2336, 2341, 2343, 2338, 2339, 2340,
- 2344, 2340, 2345, 2348, 2341, 2334, 2349, 2346, 2347, 2351,
- 2337, 2345, 2355, 2356, 2343, 2346, 2353, 2351, 2342, 2354,
- 2349, 2353, 2357, 2343, 2354, 2348, 2340, 2344, 2359, 2345,
- 2348, 2347, 2360, 2349, 2346, 2347, 2351, 2364, 2372, 2360,
-
- 2365, 2363, 2366, 2353, 2355, 2356, 2357, 2359, 2367, 2357,
- 2363, 2354, 2368, 2370, 2365, 2359, 2369, 2376, 0, 2360,
- 2366, 2373, 2370, 2374, 2364, 2365, 2365, 2365, 2363, 2366,
- 2372, 2369, 2375, 2373, 2377, 2367, 2378, 2380, 2368, 2368,
- 2370, 2365, 2381, 2369, 2376, 2374, 2383, 2382, 2373, 2381,
- 2374, 2388, 2365, 2383, 2386, 2385, 2377, 2385, 2375, 2375,
- 2380, 2377, 2387, 2388, 2380, 2389, 2387, 2395, 2378, 2381,
- 2382, 2390, 2391, 2383, 2382, 2393, 2386, 2392, 2388, 2397,
- 2390, 2386, 2385, 2391, 2392, 2394, 2396, 2389, 2398, 2387,
- 2394, 2397, 2389, 2402, 2395, 2403, 2399, 2393, 2390, 2391,
-
- 2400, 2400, 2393, 2403, 2392, 2399, 2397, 2401, 2402, 2396,
- 2398, 2404, 2394, 2396, 2405, 2398, 2401, 2406, 2407, 0,
- 2402, 2409, 2403, 2399, 2410, 0, 2406, 2400, 2405, 2411,
- 2416, 2412, 2410, 2404, 2401, 2415, 2416, 2411, 2404, 2412,
- 2409, 2405, 2413, 2415, 2406, 2407, 2413, 2414, 2409, 2417,
- 2414, 2410, 2419, 2418, 2420, 2422, 2411, 2416, 2412, 2418,
- 2425, 2424, 2415, 0, 2417, 2427, 2429, 2422, 2426, 2413,
- 2428, 2432, 2430, 2425, 2414, 2424, 2417, 2428, 2431, 2437,
- 2418, 2436, 2422, 2434, 2419, 2432, 2420, 2425, 2424, 2426,
- 2427, 2438, 2427, 2429, 2430, 2426, 2434, 2428, 2432, 2430,
-
- 2433, 2435, 2431, 2433, 2439, 2431, 2437, 2436, 2436, 2440,
- 2434, 2441, 2442, 0, 2443, 2435, 2438, 2443, 2438, 2445,
- 2447, 2440, 2446, 2441, 2448, 0, 2442, 2433, 2435, 2450,
- 2451, 2439, 2447, 2452, 2449, 2455, 2440, 2449, 2441, 2442,
- 2443, 2443, 2455, 2454, 2443, 2458, 2445, 2447, 2446, 2446,
- 2448, 2448, 2449, 2457, 2459, 2452, 2450, 2451, 2461, 2456,
- 2452, 2449, 2455, 2460, 2449, 2454, 2456, 2462, 2457, 2463,
- 2454, 2460, 2458, 2465, 2466, 2464, 2462, 2467, 2468, 2469,
- 2457, 2459, 2470, 2471, 2472, 2461, 2456, 2464, 0, 2477,
- 2460, 2468, 2476, 2471, 2462, 2465, 2463, 2469, 2479, 2473,
-
- 2465, 2466, 2464, 2482, 2467, 2468, 2469, 2474, 2470, 2470,
- 2471, 2472, 2473, 2478, 2476, 2474, 2477, 2481, 2480, 2476,
- 2485, 2478, 2483, 2486, 2482, 2479, 2473, 2480, 2484, 2487,
- 2482, 2486, 2488, 2493, 2474, 2492, 2490, 0, 0, 2481,
- 2478, 2487, 0, 2484, 2481, 2480, 2483, 2485, 2490, 2483,
- 2486, 2495, 2491, 2499, 2484, 2484, 2487, 2488, 2495, 2488,
- 2491, 2496, 2492, 2490, 2497, 2493, 2500, 2501, 2497, 2498,
- 2484, 2504, 0, 2496, 2503, 2501, 2499, 2502, 2495, 2491,
- 2499, 2498, 2507, 2504, 2514, 2514, 2505, 2509, 2496, 0,
- 2510, 2497, 2520, 2500, 2501, 2508, 2498, 2503, 2504, 2502,
-
- 2505, 2503, 2508, 2510, 2502, 2515, 2511, 2509, 2513, 2507,
- 2512, 2514, 2505, 2505, 2509, 2511, 2516, 2510, 0, 2512,
- 2513, 2517, 2508, 2518, 2520, 0, 2521, 2505, 0, 2522,
- 2523, 2515, 2515, 2511, 2516, 2513, 2524, 2512, 2518, 2529,
- 2518, 2521, 2525, 2516, 2525, 2526, 2517, 2518, 2517, 2527,
- 2518, 2522, 2523, 2521, 0, 2527, 2522, 2523, 2524, 2526,
- 2528, 2529, 2532, 2524, 2533, 2518, 2529, 2518, 2534, 2525,
- 2530, 2530, 2526, 2535, 2536, 2537, 2527, 2538, 2528, 2540,
- 0, 2539, 0, 2538, 2532, 2535, 2533, 2528, 2541, 2532,
- 2534, 2533, 2542, 2539, 2543, 2534, 2543, 2530, 2544, 2545,
-
- 2535, 2554, 2546, 0, 2538, 2552, 2536, 2537, 2539, 2546,
- 2541, 2540, 2544, 2547, 2542, 2541, 2548, 2549, 2550, 2542,
- 2551, 2543, 2553, 2545, 2554, 2544, 2545, 0, 2554, 2546,
- 2561, 2547, 2556, 2551, 2548, 2549, 2550, 2552, 2559, 2556,
- 2547, 2558, 2563, 2548, 2549, 2550, 2560, 2551, 2558, 2562,
- 0, 2564, 2565, 2570, 2553, 2571, 2559, 2562, 0, 2556,
- 2563, 0, 2561, 0, 2566, 2559, 2566, 2571, 2558, 2563,
- 2568, 2566, 2560, 2560, 2565, 2562, 2562, 2564, 2564, 2565,
- 2570, 2568, 2571, 2569, 2562, 2572, 2573, 2575, 2576, 2577,
- 2578, 2566, 0, 2566, 2569, 2580, 2581, 2568, 2584, 2576,
-
- 2582, 2577, 2575, 2572, 2585, 2578, 2583, 2582, 2573, 2586,
- 2569, 2588, 2572, 2573, 2575, 2576, 2577, 2578, 2581, 2580,
- 2589, 2583, 2580, 2581, 2590, 2584, 2591, 2582, 2592, 2594,
- 2593, 2585, 2595, 2583, 2597, 2586, 2586, 2596, 2588, 2598,
- 2601, 2600, 2599, 2603, 2589, 2595, 2590, 2589, 2593, 2597,
- 2599, 2590, 2598, 2605, 2606, 2607, 2594, 2593, 2591, 2595,
- 2592, 2597, 2602, 2596, 2596, 2603, 2598, 2600, 2600, 2599,
- 2603, 2608, 2601, 2609, 2610, 2602, 2605, 2612, 2606, 2611,
- 2605, 2606, 2607, 2614, 2612, 2613, 0, 2617, 2615, 2602,
- 3486, 3486, 2610, 2608, 2621, 2609, 2618, 2611, 2608, 2622,
-
- 2609, 2610, 2615, 2618, 2612, 2624, 2611, 2621, 2613, 2617,
- 2614, 2619, 2613, 2620, 2617, 2615, 2625, 2623, 2619, 3486,
- 2620, 2621, 2622, 2618, 2623, 2626, 2622, 2624, 2627, 0,
- 2628, 2630, 2624, 2629, 2634, 2631, 2636, 2632, 2619, 2630,
- 2620, 2633, 2629, 2631, 2623, 2638, 2626, 2633, 2625, 2639,
- 2640, 2636, 2626, 2642, 2627, 2627, 2628, 2628, 2630, 2632,
- 2629, 2634, 2631, 2636, 2632, 2637, 2641, 2638, 2633, 2644,
- 2646, 2647, 2638, 2648, 0, 2660, 2637, 2649, 2642, 2650,
- 2642, 2639, 2640, 2646, 2647, 2641, 2652, 2644, 2654, 2662,
- 2653, 2659, 2637, 2641, 2655, 2655, 2644, 2646, 2647, 2648,
-
- 2648, 2649, 2653, 2656, 2649, 2650, 2650, 2660, 2661, 2663,
- 2652, 2666, 2654, 2652, 2659, 2654, 2662, 2653, 2659, 2668,
- 2670, 2655, 2674, 2661, 2675, 2675, 2671, 2663, 2668, 2656,
- 2656, 2676, 2679, 2670, 2680, 2661, 2663, 2671, 2666, 2677,
- 2676, 2681, 2683, 2685, 2674, 2677, 2668, 2670, 0, 2674,
- 2686, 2675, 2687, 2671, 2679, 2696, 2680, 2686, 2676, 2679,
- 2688, 2680, 2689, 2690, 2692, 2694, 2677, 2689, 2681, 2683,
- 2693, 2688, 2692, 2695, 2701, 2685, 2705, 2686, 2687, 2687,
- 2694, 2699, 2696, 2700, 2698, 2690, 2703, 2688, 2695, 2689,
- 2690, 2692, 2694, 2702, 2693, 2698, 2707, 2693, 2703, 2699,
-
- 2695, 2706, 2702, 2705, 2700, 2710, 2701, 2708, 2699, 2712,
- 2700, 2698, 2713, 2703, 2710, 2708, 2709, 2709, 2714, 2716,
- 2702, 2707, 2715, 2707, 2709, 2706, 2718, 2717, 2706, 2720,
- 2719, 2715, 2710, 0, 2708, 2712, 2712, 2716, 2721, 2713,
- 2714, 2717, 2720, 2709, 2709, 2714, 2716, 2722, 2718, 2715,
- 2723, 2721, 2724, 2718, 2717, 2719, 2720, 2719, 2726, 2724,
- 2725, 2727, 2722, 2728, 2729, 2721, 2730, 2725, 2731, 2732,
- 0, 0, 2723, 2733, 2722, 2728, 0, 2723, 2736, 2724,
- 2726, 2735, 2739, 2734, 2732, 2726, 2737, 2725, 2727, 2738,
- 2728, 2729, 2734, 2730, 2740, 2731, 2732, 2739, 2733, 2741,
-
- 2733, 2740, 2745, 2735, 2736, 2736, 2747, 2748, 2735, 2739,
- 2734, 2742, 2737, 2737, 2741, 2738, 2738, 2743, 2742, 2744,
- 2746, 2740, 2750, 2743, 2749, 2752, 2741, 2751, 2746, 2745,
- 2744, 2755, 2754, 2747, 2748, 2753, 2756, 2758, 2742, 2754,
- 2749, 2757, 2751, 2756, 2743, 2752, 2744, 2746, 2757, 2750,
- 2753, 2749, 2752, 2755, 2751, 2759, 2760, 2763, 2755, 2754,
- 2761, 2761, 2753, 2756, 2758, 2762, 2764, 2765, 2757, 2764,
- 2766, 2763, 2762, 2759, 2767, 2766, 2768, 0, 2769, 0,
- 2765, 2776, 2759, 2760, 2763, 0, 2771, 2761, 2770, 2782,
- 2772, 2768, 2762, 2764, 2765, 2778, 2780, 2766, 2771, 2767,
-
- 2774, 2767, 2772, 2768, 2769, 2769, 2770, 2775, 2776, 2774,
- 2777, 2779, 2775, 2771, 2777, 2770, 2782, 2772, 2780, 2778,
- 2781, 2783, 2778, 2780, 2779, 2784, 2790, 2774, 2787, 0,
- 2789, 2792, 2793, 2791, 2775, 2790, 2795, 2777, 2779, 2792,
- 2797, 2796, 2781, 2795, 2793, 2797, 2799, 2781, 2783, 2791,
- 2796, 2784, 2784, 2790, 2787, 2787, 2789, 2789, 2792, 2793,
- 2791, 2801, 2798, 2795, 2799, 2800, 2803, 2797, 2796, 2798,
- 2802, 2804, 2800, 2799, 2805, 2803, 2807, 2802, 2808, 2810,
- 2804, 2809, 0, 2812, 2810, 2815, 2801, 2816, 2801, 2798,
- 0, 2811, 2800, 2803, 2809, 2814, 2816, 2802, 2804, 2807,
-
- 2805, 2805, 2817, 2807, 2819, 2808, 2810, 2818, 2809, 2811,
- 2812, 2817, 2815, 2814, 2816, 2820, 2818, 2821, 2811, 2822,
- 2825, 2823, 2814, 2835, 2819, 2824, 2821, 2820, 2822, 2817,
- 2826, 2819, 2823, 2824, 2818, 2827, 2828, 2831, 2829, 2833,
- 2830, 2834, 2820, 2825, 2821, 2829, 2822, 2825, 2823, 2830,
- 2826, 2836, 2824, 2841, 2842, 2835, 0, 2826, 2831, 2838,
- 2836, 2837, 2827, 2828, 2831, 2829, 2833, 2830, 2834, 2839,
- 2837, 2838, 2840, 2850, 2846, 2841, 2843, 2839, 2836, 2847,
- 2841, 2842, 2844, 2843, 2845, 2840, 2838, 2848, 2837, 2844,
- 2846, 2845, 2851, 2849, 2848, 2847, 2839, 2852, 2850, 2840,
-
- 2850, 2846, 2853, 2843, 2855, 2857, 2847, 0, 2858, 2844,
- 2859, 2845, 2855, 0, 2848, 2849, 2858, 2861, 2863, 2851,
- 2849, 2860, 2852, 2857, 2852, 2859, 2862, 2864, 2860, 2853,
- 2865, 2855, 2857, 2862, 2864, 2858, 2868, 2859, 2865, 2861,
- 2863, 2869, 2870, 2868, 2861, 2863, 2871, 2872, 2860, 2873,
- 2869, 2874, 2876, 2862, 2864, 2875, 0, 2865, 2873, 2872,
- 2877, 0, 2882, 2868, 2876, 2879, 2870, 2881, 2869, 2870,
- 2883, 2875, 2880, 2871, 2872, 2887, 2873, 2879, 2874, 2876,
- 2892, 2884, 2875, 2877, 2880, 2882, 2886, 2877, 2881, 2882,
- 2890, 2894, 2879, 2888, 2881, 2884, 2889, 2883, 2886, 2880,
-
- 2888, 2895, 2887, 2891, 2889, 2897, 2894, 2892, 2884, 2890,
- 2891, 2896, 2898, 2886, 2899, 2900, 0, 2890, 2894, 2895,
- 2888, 2901, 2899, 2889, 2903, 2904, 2902, 2906, 2895, 2905,
- 2891, 2897, 2897, 2912, 2896, 2903, 2905, 2915, 2896, 2898,
- 2904, 2899, 2900, 2901, 2902, 2913, 2922, 2916, 2901, 2908,
- 2919, 2903, 2904, 2902, 2906, 2908, 2905, 2914, 2953, 2912,
- 2912, 2916, 2914, 2913, 2915, 2917, 2918, 2920, 2919, 2921,
- 2924, 2923, 2913, 2922, 2916, 2926, 2908, 2919, 2923, 2917,
- 2918, 2929, 2924, 2931, 2914, 2920, 2932, 2921, 2934, 2933,
- 2953, 0, 2917, 2918, 2920, 2937, 2921, 2924, 2923, 2932,
-
- 2936, 2935, 2926, 2929, 2941, 2931, 2944, 2934, 2929, 2935,
- 2931, 2933, 2939, 2932, 2937, 2934, 2933, 2943, 2936, 2942,
- 2945, 2946, 2937, 2948, 2939, 2949, 2941, 2936, 2935, 2943,
- 2947, 2941, 2950, 2944, 2954, 0, 2956, 2959, 2947, 2939,
- 2951, 2942, 2952, 2946, 2943, 2949, 2942, 2945, 2946, 2951,
- 2948, 2952, 2949, 2957, 2950, 2958, 2954, 2947, 2960, 2950,
- 2963, 2954, 2956, 2956, 2959, 2957, 2964, 2951, 2965, 2952,
- 2966, 0, 2967, 2969, 2963, 2966, 2968, 2958, 2970, 2972,
- 2957, 2971, 2958, 2977, 2974, 2960, 2969, 2963, 2978, 2973,
- 2975, 2976, 2965, 2964, 2967, 2965, 2974, 2976, 2968, 2967,
-
- 2969, 2972, 2966, 2968, 2971, 2979, 2972, 2973, 2971, 2975,
- 2970, 2974, 2981, 2980, 2983, 2977, 2973, 2975, 2976, 0,
- 2978, 2984, 2985, 2987, 0, 2989, 0, 2979, 2980, 2990,
- 2993, 2991, 2979, 2992, 2983, 2996, 2994, 2995, 2987, 2981,
- 2980, 2983, 2992, 2984, 2993, 2998, 2985, 2989, 2984, 2985,
- 2987, 2990, 2989, 2991, 2994, 2995, 2990, 2993, 2991, 2997,
- 2992, 2996, 2996, 2994, 2995, 2999, 3002, 3003, 2998, 3004,
- 3007, 3010, 2998, 3008, 3009, 3002, 3011, 2997, 3007, 3010,
- 3008, 3009, 3012, 3013, 0, 3017, 2997, 2999, 3015, 3016,
- 3004, 3013, 2999, 3002, 3021, 3019, 3004, 3007, 3010, 3003,
-
- 3008, 3009, 3012, 3011, 3030, 3018, 3015, 3016, 3020, 3012,
- 3013, 3017, 3017, 3019, 3027, 3015, 3016, 3018, 3022, 3024,
- 3020, 3021, 3019, 3026, 3028, 3029, 3022, 3029, 3031, 3033,
- 3026, 3024, 3018, 3034, 3032, 3020, 3030, 3027, 3033, 3035,
- 3036, 3027, 3032, 0, 3040, 3022, 3024, 3037, 3038, 3037,
- 3026, 3028, 3029, 3043, 3041, 3044, 3033, 3045, 0, 3036,
- 3031, 3032, 3040, 3046, 3047, 3034, 3035, 3036, 3041, 3048,
- 3038, 3040, 3046, 3051, 3037, 3038, 3049, 3047, 3052, 3044,
- 3045, 3041, 3044, 3054, 3045, 3043, 3056, 3052, 3049, 3055,
- 3046, 3047, 3057, 3055, 3059, 3060, 3048, 3062, 3061, 3051,
-
- 3051, 3064, 3066, 3049, 3067, 3052, 3069, 3072, 3068, 3066,
- 3054, 3069, 3070, 3056, 3072, 3062, 3055, 3075, 3060, 3057,
- 3061, 3059, 3060, 3068, 3062, 3061, 3067, 3070, 3064, 3066,
- 3073, 3067, 3077, 3074, 3072, 3068, 3078, 3073, 3069, 3070,
- 3074, 3079, 3080, 3075, 3075, 3084, 3085, 3081, 3082, 3087,
- 3088, 0, 3089, 3090, 3092, 3085, 3087, 3073, 3091, 3077,
- 3074, 3081, 3082, 3078, 3097, 3096, 3080, 3098, 3079, 3080,
- 3091, 3095, 3084, 3085, 3081, 3082, 3087, 3088, 3089, 3089,
- 3090, 3092, 3093, 3094, 3095, 3091, 3101, 3109, 3104, 3102,
- 3098, 3097, 3094, 3104, 3098, 3105, 3093, 3096, 3095, 3105,
-
- 3106, 3107, 3108, 3110, 3112, 3110, 3117, 3106, 3107, 3093,
- 3094, 3102, 3111, 3118, 3115, 3120, 3102, 3120, 3101, 3109,
- 3104, 3121, 3105, 3108, 3122, 3117, 0, 3106, 3107, 3108,
- 3110, 3112, 3124, 3117, 3128, 3111, 3115, 3118, 3125, 3111,
- 3118, 3115, 3120, 3123, 3123, 3121, 3210, 3125, 3121, 3126,
- 3122, 3122, 3135, 3123, 3124, 3127, 3126, 3135, 3132, 3124,
- 3129, 3128, 3131, 0, 3130, 3125, 3132, 3133, 3127, 3136,
- 3123, 3123, 3130, 3129, 3136, 3131, 3126, 3138, 3210, 3139,
- 0, 3140, 3127, 3141, 3135, 3132, 3133, 3129, 3130, 3131,
- 3137, 3130, 3142, 3145, 3133, 3143, 3146, 0, 3137, 3130,
-
- 3144, 3136, 0, 3146, 3138, 3139, 3139, 3140, 3140, 3141,
- 3141, 3144, 3147, 3147, 3148, 3145, 3149, 3137, 3142, 3142,
- 3145, 3143, 3143, 3146, 3150, 3151, 3152, 3144, 3154, 3149,
- 3155, 3153, 3148, 3151, 3158, 3154, 3159, 3155, 3156, 3147,
- 3160, 3148, 3161, 3149, 3162, 3156, 3150, 3163, 3152, 3153,
- 3164, 3150, 3151, 3152, 3161, 3154, 3167, 3155, 3153, 3168,
- 3169, 3158, 3170, 3159, 3160, 3156, 3165, 3160, 3163, 3161,
- 3172, 3162, 3164, 3173, 3163, 3165, 3174, 3164, 3175, 3168,
- 3176, 3177, 3180, 3167, 3170, 3181, 3168, 3169, 3182, 3170,
- 3185, 3173, 3179, 3165, 3174, 3183, 3184, 3172, 3176, 3177,
-
- 3173, 3179, 3186, 3174, 3184, 3175, 3185, 3176, 3177, 3180,
- 3190, 3182, 3181, 3183, 3186, 3182, 3188, 3185, 3187, 3179,
- 3191, 3188, 3183, 3184, 3190, 3187, 3192, 3194, 3198, 3186,
- 3199, 3200, 3202, 3203, 3204, 3207, 3204, 3190, 3191, 3194,
- 3208, 3211, 3205, 3220, 3200, 3187, 3203, 3191, 3188, 3192,
- 3198, 3205, 3209, 3192, 3194, 3198, 3211, 3199, 3200, 3202,
- 3203, 3204, 3207, 3215, 3216, 3215, 3217, 3208, 3211, 3205,
- 3209, 3219, 3222, 3226, 3224, 3220, 0, 3236, 3219, 3209,
- 3224, 3227, 0, 3228, 3217, 3231, 3216, 3222, 3229, 3233,
- 3215, 3216, 3237, 3217, 3238, 3226, 0, 3232, 3219, 3222,
-
- 3226, 3224, 3233, 3227, 3236, 3239, 3229, 3231, 3227, 3228,
- 3228, 3232, 3231, 0, 3234, 3229, 3233, 3234, 3240, 3237,
- 3241, 3238, 3244, 3239, 3232, 3240, 3242, 0, 3241, 3245,
- 3246, 3247, 3239, 3248, 3249, 3253, 3254, 3250, 3254, 3255,
- 3234, 3234, 3248, 3250, 3234, 3240, 3251, 3241, 3242, 3249,
- 3252, 3245, 3246, 3242, 3244, 3257, 3245, 3246, 3247, 3252,
- 3248, 3249, 3258, 3254, 3250, 3259, 3255, 3253, 3251, 3260,
- 3267, 3261, 0, 3251, 3262, 3273, 3263, 3252, 3257, 3261,
- 3269, 3272, 3257, 3265, 3258, 3270, 3262, 3259, 3263, 3258,
- 3265, 3271, 3259, 3273, 3269, 3260, 3260, 3267, 3261, 3270,
-
- 3274, 3262, 3273, 3263, 3272, 3271, 3275, 3269, 3272, 3276,
- 3265, 3274, 3270, 3277, 3275, 3278, 3279, 3282, 3271, 3280,
- 3281, 3284, 3278, 3279, 3283, 3283, 3282, 3274, 3276, 3285,
- 3293, 3286, 3289, 3275, 3292, 3277, 3276, 3289, 3281, 3286,
- 3277, 3290, 3278, 3279, 3282, 3280, 3280, 3281, 3284, 3294,
- 3298, 3283, 3300, 3296, 3290, 3292, 3285, 3293, 3286, 3296,
- 3301, 3292, 3303, 3300, 3289, 3308, 3305, 3304, 3290, 3312,
- 3311, 3301, 3310, 3312, 3309, 0, 3294, 3298, 3304, 3300,
- 3296, 3309, 3313, 3314, 3303, 3316, 3320, 3301, 3305, 3303,
- 3310, 3314, 3308, 3305, 3304, 3317, 3312, 3318, 3319, 3310,
-
- 3322, 3309, 3311, 3325, 3326, 3318, 3331, 3319, 3317, 3313,
- 3314, 3316, 3316, 3320, 3324, 3329, 3330, 3330, 3332, 3335,
- 3329, 3324, 3317, 3334, 3318, 3319, 3326, 3333, 3336, 3337,
- 3334, 3326, 3322, 3331, 3339, 3325, 3343, 3341, 3335, 3333,
- 3340, 3324, 3329, 3330, 3336, 3332, 3335, 3337, 3340, 3344,
- 3334, 3338, 3341, 3342, 3333, 3336, 3337, 3345, 3338, 3346,
- 3342, 3344, 3347, 3343, 3341, 3335, 3339, 3340, 3352, 3353,
- 3351, 3354, 3355, 3356, 0, 3352, 3344, 3360, 3338, 3362,
- 3342, 3345, 3357, 3346, 3345, 3351, 3346, 3362, 3347, 3347,
- 3359, 3357, 3361, 3363, 3365, 3352, 3355, 3351, 3354, 3355,
-
- 3367, 3353, 3371, 3376, 3360, 3356, 3362, 3368, 3374, 3357,
- 3364, 3364, 3359, 3377, 3361, 3367, 3368, 3359, 3370, 3361,
- 3364, 3365, 3369, 3372, 3369, 3363, 3374, 3367, 3373, 3371,
- 3376, 3372, 3370, 3378, 3368, 3374, 3379, 3364, 3364, 3373,
- 3377, 3380, 3381, 3382, 3383, 3370, 3384, 3385, 3386, 3369,
- 3372, 3393, 3387, 3389, 3380, 3373, 3388, 3388, 3379, 3390,
- 3378, 3394, 3396, 3379, 3381, 3385, 3387, 3397, 3380, 3381,
- 3382, 3383, 3394, 3384, 3385, 3386, 3400, 3402, 3393, 3387,
- 3406, 3390, 3402, 3388, 3400, 3389, 3390, 3403, 3394, 3396,
- 3404, 3405, 3403, 3408, 3397, 3411, 3405, 3410, 3404, 3409,
-
- 3409, 3414, 3413, 3400, 3402, 3410, 3406, 3406, 3411, 3413,
- 3415, 3416, 3417, 3420, 3403, 3427, 3419, 3404, 3405, 3414,
- 3408, 3427, 3411, 3421, 3410, 3419, 3409, 3423, 3414, 3413,
- 3421, 3424, 3422, 3428, 3430, 3417, 0, 3415, 3416, 3417,
- 3422, 3431, 3427, 3419, 3432, 3420, 3433, 3434, 3435, 3423,
- 3421, 0, 3436, 3424, 3423, 3437, 0, 3432, 3424, 3422,
- 3428, 3430, 3434, 3431, 3439, 3441, 3440, 3435, 3431, 3442,
- 3444, 3432, 3441, 3443, 3434, 3435, 3442, 3437, 3433, 3436,
- 3445, 3448, 3437, 3447, 3455, 3444, 3460, 3439, 3440, 3448,
- 3455, 3439, 3441, 3440, 3452, 3443, 3442, 3444, 3449, 3450,
-
- 3443, 3445, 3447, 3452, 3453, 3449, 3450, 3445, 3448, 0,
- 3447, 3455, 3454, 3454, 3456, 3453, 3458, 3459, 3460, 3465,
- 3461, 3452, 3454, 3463, 3459, 3449, 3450, 3464, 3469, 3470,
- 3463, 3453, 3477, 3465, 3471, 3480, 3456, 3475, 3458, 3454,
- 3454, 3456, 3461, 3458, 3459, 3478, 3465, 3461, 3485, 3475,
- 3463, 3464, 3479, 3482, 3464, 3469, 3470, 3471, 3488, 3477,
- 3479, 3471, 3480, 3490, 3475, 3482, 3492, 3478, 3487, 3487,
- 3489, 3489, 3478, 3493, 3494, 3485, 3496, 3499, 3495, 3479,
- 3482, 3500, 3504, 0, 0, 3488, 3490, 3495, 3492, 3496,
- 3490, 3493, 3503, 3492, 3509, 3501, 3509, 3487, 3510, 3489,
-
- 3493, 3494, 3501, 3496, 3499, 3495, 3502, 3500, 3500, 3504,
- 3506, 3505, 3511, 3502, 3503, 3513, 3512, 3506, 3510, 3503,
- 3505, 3509, 3501, 3515, 3516, 3510, 3517, 3513, 3519, 3518,
- 3520, 3521, 3515, 3502, 3512, 3511, 3522, 3506, 3505, 3511,
- 3523, 3524, 3513, 3512, 3524, 3526, 3516, 3518, 3522, 3528,
- 3515, 3516, 3530, 3517, 3519, 3519, 3518, 3520, 3521, 3524,
- 3525, 3528, 3523, 3522, 3527, 3525, 3527, 3523, 3524, 3529,
- 3532, 3524, 3531, 3533, 3530, 3529, 3528, 3526, 3532, 3530,
- 3534, 3535, 3536, 3537, 3539, 0, 3538, 3542, 3543, 3545,
- 3550, 3527, 3525, 3551, 3531, 3548, 3529, 3532, 3538, 3531,
-
- 3533, 3543, 3535, 3546, 3548, 3552, 3539, 3553, 3535, 3536,
- 3537, 3539, 3534, 3538, 3542, 3543, 3545, 3550, 3555, 3556,
- 3551, 3546, 3548, 3557, 3558, 3559, 3559, 3562, 3564, 3561,
- 3546, 3565, 3552, 3566, 3553, 3567, 3570, 3572, 0, 0,
- 3577, 3569, 3567, 3576, 0, 3555, 3556, 3561, 3566, 3565,
- 3557, 3558, 3559, 3569, 3562, 3564, 3561, 3571, 3565, 3573,
- 3566, 3574, 3567, 3570, 3572, 3571, 3575, 3577, 3569, 3576,
- 3576, 3573, 3580, 3579, 3583, 3574, 3585, 3585, 3584, 0,
- 3586, 3575, 3587, 3583, 3571, 3579, 3573, 3589, 3574, 3590,
- 3592, 3587, 0, 3575, 0, 3591, 3593, 0, 3598, 3580,
-
- 3579, 3583, 3584, 3585, 3593, 3584, 3586, 3586, 3591, 3587,
- 3594, 3589, 3592, 3595, 3589, 3597, 3598, 3592, 3601, 3594,
- 3602, 3590, 3591, 3593, 3595, 3598, 3604, 3606, 3606, 3616,
- 0, 3607, 3602, 3617, 3620, 3621, 3597, 3594, 3607, 3622,
- 3595, 3601, 3597, 3623, 3625, 3601, 3627, 3602, 3620, 3628,
- 3627, 3616, 3604, 3604, 3606, 3629, 3616, 3617, 3607, 3634,
- 3617, 3620, 3621, 3634, 3632, 3630, 3622, 3628, 3635, 0,
- 3623, 3625, 3630, 3627, 3636, 3637, 3628, 3632, 3629, 3639,
- 3640, 3638, 3629, 3644, 3635, 3644, 3634, 3643, 0, 3641,
- 3642, 3632, 3630, 3638, 3640, 3635, 3636, 3641, 3643, 3642,
-
- 3637, 3636, 3637, 3645, 3646, 3639, 3639, 3640, 3638, 3647,
- 3644, 3648, 3649, 3650, 3643, 3645, 3641, 3642, 3649, 3651,
- 3653, 3652, 3646, 3655, 3647, 3654, 3662, 3661, 3650, 3652,
- 3645, 3646, 3654, 3648, 3661, 3664, 3647, 3665, 3648, 3649,
- 3650, 3651, 3660, 3663, 3666, 3655, 3651, 3653, 3652, 3667,
- 3655, 3668, 3654, 3662, 3661, 3660, 3670, 3671, 3669, 3668,
- 3672, 3663, 3664, 3665, 3665, 3669, 3673, 3675, 3673, 3660,
- 3663, 3666, 0, 3678, 3674, 3676, 3667, 3677, 3668, 3671,
- 3670, 3679, 3672, 3670, 3671, 3669, 3674, 3672, 3676, 3680,
- 3681, 3682, 3677, 3673, 3683, 3678, 3680, 3685, 3686, 3675,
-
- 3678, 3674, 3676, 3687, 3677, 3688, 3692, 3690, 3679, 3695,
- 3686, 3687, 3696, 3699, 3700, 3692, 3680, 3681, 3682, 3690,
- 3698, 3683, 3697, 3702, 3685, 3686, 3704, 3701, 3698, 3705,
- 3687, 3707, 3688, 3692, 3690, 3703, 3695, 3702, 3696, 3696,
- 3701, 3697, 3715, 3703, 3716, 3699, 3700, 3698, 3704, 3697,
- 3702, 3712, 3713, 3704, 3701, 3715, 3705, 3712, 3707, 3713,
- 3719, 3718, 3703, 3721, 3720, 3723, 3722, 3716, 3718, 3715,
- 0, 3716, 3720, 3723, 3724, 3725, 3726, 3721, 3712, 3713,
- 3722, 3731, 3719, 3732, 3733, 3730, 3734, 3719, 3718, 3731,
- 3721, 3720, 3723, 3722, 3730, 3735, 3724, 3725, 3729, 0,
-
- 3740, 3724, 3725, 3726, 3736, 3729, 3733, 3737, 3731, 3739,
- 3732, 3733, 3730, 3738, 3742, 3743, 3744, 3739, 3734, 0,
- 3747, 3735, 3735, 3746, 3748, 3729, 3736, 3751, 3747, 3737,
- 3749, 3736, 3740, 3757, 3737, 3738, 3739, 3743, 3749, 3755,
- 3738, 3742, 3743, 3744, 3748, 3750, 3746, 3747, 3752, 3753,
- 3746, 3748, 3758, 3750, 3760, 3758, 3752, 3749, 3759, 3751,
- 3757, 3761, 3760, 3753, 3762, 3755, 3755, 3763, 3764, 3761,
- 3758, 3768, 3750, 3765, 0, 3752, 3753, 0, 3762, 3758,
- 3759, 3760, 3758, 3767, 3767, 3759, 3770, 3765, 3761, 3771,
- 3764, 3762, 3772, 3763, 3763, 3764, 3769, 3768, 3768, 3774,
-
- 3765, 3773, 3775, 3776, 3769, 3778, 3777, 3774, 0, 3785,
- 3767, 0, 3770, 3770, 3772, 3771, 3771, 3779, 3780, 3772,
- 3782, 3773, 0, 3769, 3788, 3776, 3774, 3781, 3773, 3775,
- 3776, 3777, 3778, 3777, 3789, 3781, 3785, 3779, 3780, 3792,
- 3783, 3786, 3782, 3794, 3779, 3780, 3788, 3782, 3783, 3786,
- 3790, 3788, 3791, 3798, 3781, 3795, 3789, 3797, 3790, 3801,
- 3791, 3789, 0, 3795, 3796, 3792, 3792, 3783, 3786, 3799,
- 3794, 3802, 3796, 3803, 3811, 3805, 0, 3790, 3812, 3791,
- 3798, 3808, 3795, 3797, 3797, 0, 3801, 3809, 0, 3799,
- 0, 3796, 0, 3803, 0, 3809, 3799, 3805, 3802, 3810,
-
- 3803, 3811, 3805, 3808, 0, 3812, 0, 3810, 3808, 0,
- 0, 0, 0, 0, 3809, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 3810, 3816, 3816, 3816,
- 3816, 3816, 3816, 3816, 3817, 3817, 3817, 3817, 3817, 3817,
- 3817, 3818, 3818, 3818, 3818, 3818, 3818, 3818, 3819, 3819,
- 3819, 3819, 3819, 3819, 3819, 3820, 3820, 3820, 3820, 3820,
- 3820, 3820, 3821, 3821, 3821, 3821, 3821, 3821, 3821, 3822,
- 3822, 3822, 3822, 3822, 3822, 3822, 3824, 3824, 0, 3824,
- 3824, 3824, 3824, 3825, 3825, 0, 0, 0, 3825, 3825,
- 3826, 3826, 0, 0, 3826, 0, 3826, 3827, 0, 0,
-
- 0, 0, 0, 3827, 3828, 3828, 0, 0, 0, 3828,
- 3828, 3829, 0, 0, 0, 0, 0, 3829, 3830, 3830,
- 0, 3830, 3830, 3830, 3830, 3831, 0, 0, 0, 0,
- 0, 3831, 3832, 3832, 0, 0, 0, 3832, 3832, 3833,
- 3833, 0, 3833, 3833, 3833, 3833, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
-
- 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815, 3815,
- 3815, 3815, 3815
+ 235, 10, 11, 11, 11, 11, 11, 11, 12, 12,
+ 12, 12, 12, 12, 16, 16, 16, 34, 28, 85,
+ 85, 13, 11, 46, 1212, 25, 25, 14, 12, 34,
+ 39, 23, 15, 23, 23, 46, 23, 180, 28, 611,
+ 11, 28, 23, 39, 34, 28, 12, 179, 88, 11,
+ 46, 16, 88, 164, 164, 12, 30, 39, 29, 177,
+ 45, 172, 37, 73, 30, 28, 26, 611, 37, 23,
+
+ 24, 24, 29, 26, 24, 30, 73, 26, 102, 24,
+ 26, 24, 30, 30, 29, 29, 45, 45, 24, 37,
+ 73, 30, 26, 26, 24, 93, 102, 24, 24, 29,
+ 26, 24, 30, 200, 26, 102, 24, 26, 24, 57,
+ 94, 166, 57, 306, 166, 24, 27, 225, 31, 93,
+ 27, 31, 93, 27, 95, 27, 27, 228, 31, 47,
+ 31, 47, 47, 94, 47, 200, 27, 94, 27, 170,
+ 47, 31, 306, 27, 95, 31, 35, 27, 31, 225,
+ 27, 95, 27, 27, 35, 31, 101, 31, 36, 228,
+ 35, 98, 36, 27, 35, 101, 44, 169, 98, 42,
+
+ 44, 42, 35, 35, 44, 96, 36, 167, 36, 165,
+ 42, 35, 163, 101, 36, 36, 42, 35, 98, 36,
+ 96, 35, 44, 44, 43, 42, 42, 44, 42, 109,
+ 86, 44, 96, 36, 43, 36, 38, 42, 43, 43,
+ 38, 97, 109, 42, 38, 171, 171, 43, 81, 97,
+ 38, 43, 63, 38, 63, 63, 109, 63, 99, 106,
+ 38, 43, 38, 38, 106, 43, 43, 38, 97, 76,
+ 71, 38, 71, 71, 113, 71, 74, 38, 74, 74,
+ 38, 74, 99, 113, 75, 99, 106, 38, 40, 143,
+ 143, 80, 40, 80, 80, 87, 80, 87, 87, 139,
+
+ 87, 113, 40, 40, 100, 40, 87, 90, 71, 90,
+ 90, 114, 90, 107, 40, 40, 143, 100, 90, 40,
+ 114, 107, 103, 103, 69, 139, 139, 64, 100, 40,
+ 40, 100, 40, 41, 111, 103, 41, 59, 114, 115,
+ 107, 111, 110, 41, 100, 90, 104, 41, 41, 103,
+ 103, 110, 104, 108, 104, 41, 105, 105, 181, 181,
+ 41, 111, 115, 41, 110, 105, 115, 104, 117, 110,
+ 41, 108, 127, 104, 41, 41, 120, 58, 110, 104,
+ 118, 104, 116, 105, 105, 108, 112, 112, 119, 116,
+ 117, 119, 127, 118, 112, 117, 355, 122, 108, 127,
+
+ 120, 53, 112, 121, 119, 119, 129, 118, 120, 116,
+ 48, 121, 119, 112, 112, 119, 123, 122, 119, 122,
+ 123, 112, 125, 126, 122, 355, 129, 120, 131, 124,
+ 121, 119, 119, 129, 124, 125, 123, 124, 128, 130,
+ 123, 132, 131, 123, 122, 128, 126, 123, 132, 125,
+ 126, 133, 128, 134, 135, 131, 124, 130, 136, 18,
+ 137, 124, 134, 123, 137, 128, 130, 136, 132, 138,
+ 137, 17, 128, 0, 133, 141, 138, 135, 133, 140,
+ 134, 135, 137, 142, 141, 136, 140, 137, 145, 148,
+ 141, 137, 144, 146, 241, 142, 138, 137, 141, 145,
+
+ 144, 147, 141, 145, 148, 149, 140, 146, 241, 147,
+ 142, 141, 145, 151, 230, 145, 148, 141, 150, 144,
+ 146, 241, 149, 0, 151, 149, 145, 152, 153, 150,
+ 145, 149, 149, 147, 153, 152, 147, 154, 150, 0,
+ 151, 155, 156, 157, 158, 150, 230, 0, 154, 149,
+ 155, 159, 149, 160, 152, 153, 150, 156, 161, 158,
+ 159, 162, 155, 0, 154, 157, 155, 0, 155, 156,
+ 157, 158, 0, 183, 162, 160, 161, 155, 159, 168,
+ 160, 168, 168, 176, 168, 161, 182, 183, 162, 155,
+ 173, 0, 173, 173, 174, 173, 174, 174, 178, 174,
+
+ 178, 178, 184, 178, 185, 183, 188, 176, 182, 0,
+ 176, 184, 190, 182, 183, 186, 185, 187, 189, 186,
+ 190, 192, 188, 191, 187, 194, 0, 193, 195, 184,
+ 233, 185, 174, 188, 193, 191, 187, 189, 197, 190,
+ 197, 194, 186, 192, 187, 189, 195, 196, 192, 198,
+ 191, 187, 194, 196, 193, 195, 199, 204, 199, 206,
+ 201, 205, 233, 203, 201, 197, 205, 206, 1035, 809,
+ 207, 198, 204, 208, 211, 236, 198, 0, 218, 196,
+ 196, 201, 199, 199, 204, 199, 206, 218, 201, 203,
+ 203, 201, 207, 205, 210, 208, 209, 207, 809, 1035,
+
+ 208, 210, 211, 215, 212, 218, 211, 236, 201, 202,
+ 216, 209, 213, 214, 202, 0, 215, 224, 0, 202,
+ 219, 210, 216, 209, 214, 202, 202, 212, 224, 211,
+ 215, 212, 202, 220, 213, 217, 202, 216, 217, 213,
+ 214, 202, 219, 0, 224, 222, 202, 219, 226, 223,
+ 217, 229, 202, 202, 0, 220, 223, 227, 229, 231,
+ 220, 237, 217, 250, 0, 217, 221, 222, 227, 221,
+ 238, 221, 222, 231, 226, 226, 223, 234, 229, 240,
+ 232, 250, 242, 221, 237, 221, 232, 243, 237, 227,
+ 250, 231, 221, 221, 243, 227, 221, 244, 221, 234,
+
+ 231, 239, 238, 242, 234, 248, 239, 232, 245, 242,
+ 221, 240, 221, 246, 243, 247, 246, 245, 244, 248,
+ 252, 249, 245, 253, 244, 251, 239, 255, 239, 256,
+ 253, 252, 248, 239, 247, 245, 254, 251, 256, 257,
+ 246, 254, 247, 249, 245, 259, 258, 252, 249, 255,
+ 253, 258, 251, 261, 255, 262, 256, 263, 260, 260,
+ 0, 264, 257, 268, 263, 265, 257, 260, 254, 261,
+ 266, 267, 269, 258, 270, 271, 273, 259, 266, 272,
+ 261, 275, 270, 264, 263, 260, 260, 262, 264, 273,
+ 265, 267, 265, 274, 272, 268, 277, 266, 267, 276,
+
+ 278, 270, 281, 273, 269, 279, 272, 271, 275, 279,
+ 0, 280, 286, 283, 284, 282, 285, 278, 280, 274,
+ 274, 283, 276, 285, 281, 278, 288, 278, 277, 281,
+ 282, 276, 279, 284, 286, 289, 290, 291, 280, 286,
+ 283, 284, 282, 285, 278, 293, 287, 292, 288, 276,
+ 287, 294, 295, 288, 297, 303, 299, 296, 298, 291,
+ 300, 301, 300, 294, 291, 295, 296, 289, 290, 292,
+ 302, 298, 297, 287, 292, 299, 304, 293, 294, 295,
+ 303, 297, 303, 299, 296, 298, 305, 300, 308, 307,
+ 0, 309, 0, 301, 302, 310, 312, 302, 307, 0,
+
+ 0, 313, 304, 304, 318, 311, 310, 314, 315, 320,
+ 322, 324, 305, 305, 308, 308, 307, 309, 309, 311,
+ 312, 316, 310, 312, 313, 314, 315, 319, 313, 316,
+ 321, 311, 311, 323, 314, 315, 318, 324, 324, 325,
+ 319, 320, 322, 326, 327, 328, 311, 332, 316, 0,
+ 323, 331, 328, 329, 319, 321, 323, 321, 330, 333,
+ 323, 325, 329, 0, 330, 331, 325, 335, 327, 342,
+ 334, 375, 328, 332, 332, 326, 327, 323, 331, 334,
+ 329, 336, 337, 333, 338, 330, 333, 339, 340, 336,
+ 335, 337, 341, 343, 335, 327, 339, 334, 344, 0,
+
+ 346, 342, 348, 375, 350, 340, 0, 341, 336, 337,
+ 338, 338, 340, 344, 339, 340, 351, 343, 346, 341,
+ 343, 0, 380, 357, 348, 344, 347, 346, 350, 348,
+ 351, 350, 340, 345, 356, 347, 352, 354, 345, 353,
+ 353, 345, 354, 351, 0, 359, 345, 345, 345, 345,
+ 357, 352, 0, 347, 380, 0, 345, 359, 356, 360,
+ 345, 356, 362, 352, 353, 345, 353, 353, 345, 354,
+ 364, 360, 359, 345, 345, 345, 345, 349, 358, 349,
+ 362, 358, 363, 0, 361, 361, 360, 366, 358, 362,
+ 367, 349, 349, 349, 361, 349, 368, 364, 368, 365,
+
+ 363, 349, 370, 369, 349, 358, 349, 0, 358, 363,
+ 371, 361, 361, 366, 366, 369, 367, 367, 349, 349,
+ 349, 365, 349, 368, 370, 371, 365, 372, 374, 370,
+ 369, 373, 378, 0, 376, 372, 376, 371, 373, 378,
+ 374, 0, 379, 381, 382, 376, 0, 0, 385, 383,
+ 382, 383, 376, 389, 372, 374, 387, 1199, 373, 378,
+ 376, 376, 384, 376, 379, 381, 382, 388, 386, 379,
+ 381, 382, 376, 383, 387, 384, 383, 382, 383, 376,
+ 385, 386, 390, 387, 386, 389, 386, 1199, 391, 384,
+ 394, 0, 386, 388, 388, 386, 395, 394, 405, 406,
+
+ 396, 0, 0, 405, 0, 400, 0, 397, 386, 390,
+ 391, 386, 396, 386, 395, 391, 392, 394, 392, 397,
+ 395, 400, 398, 395, 392, 401, 0, 396, 392, 400,
+ 405, 406, 400, 392, 397, 398, 392, 0, 401, 0,
+ 404, 395, 392, 392, 403, 392, 0, 407, 400, 398,
+ 410, 392, 401, 408, 407, 392, 403, 413, 404, 408,
+ 392, 409, 410, 392, 393, 411, 393, 404, 407, 409,
+ 412, 403, 415, 415, 407, 426, 414, 410, 412, 393,
+ 408, 407, 393, 411, 393, 414, 393, 418, 409, 413,
+ 393, 393, 411, 393, 416, 417, 418, 412, 0, 415,
+
+ 0, 416, 433, 414, 433, 420, 393, 426, 417, 393,
+ 421, 393, 420, 393, 402, 402, 419, 421, 422, 418,
+ 427, 416, 417, 418, 402, 402, 402, 402, 402, 433,
+ 422, 402, 420, 428, 419, 423, 425, 421, 419, 402,
+ 428, 402, 402, 419, 424, 422, 427, 427, 425, 429,
+ 430, 402, 402, 402, 402, 402, 431, 423, 402, 430,
+ 428, 419, 423, 425, 429, 432, 424, 434, 435, 431,
+ 0, 424, 436, 436, 0, 437, 429, 430, 434, 438,
+ 439, 440, 437, 431, 442, 441, 438, 0, 443, 0,
+ 435, 439, 440, 445, 434, 435, 447, 432, 441, 444,
+
+ 444, 436, 437, 455, 0, 0, 438, 439, 440, 442,
+ 443, 442, 441, 446, 450, 443, 445, 444, 449, 452,
+ 445, 448, 447, 447, 444, 450, 444, 444, 446, 448,
+ 449, 457, 452, 451, 456, 455, 446, 453, 453, 458,
+ 446, 450, 451, 460, 444, 449, 452, 463, 448, 453,
+ 459, 453, 456, 457, 469, 446, 453, 461, 457, 462,
+ 451, 456, 458, 461, 453, 453, 458, 465, 459, 464,
+ 463, 467, 0, 473, 463, 460, 453, 459, 453, 454,
+ 462, 469, 470, 466, 461, 468, 462, 454, 454, 465,
+ 466, 454, 454, 464, 465, 454, 464, 467, 467, 468,
+
+ 472, 454, 471, 474, 470, 473, 454, 477, 475, 470,
+ 466, 476, 468, 477, 454, 454, 471, 478, 454, 454,
+ 479, 481, 454, 476, 480, 474, 472, 472, 483, 471,
+ 474, 475, 480, 482, 477, 475, 481, 483, 476, 478,
+ 482, 484, 479, 485, 478, 0, 486, 479, 481, 487,
+ 480, 480, 486, 488, 489, 483, 484, 490, 0, 480,
+ 482, 491, 497, 492, 0, 494, 0, 485, 484, 495,
+ 485, 487, 490, 486, 495, 488, 487, 489, 498, 501,
+ 488, 489, 503, 493, 490, 492, 505, 491, 491, 493,
+ 492, 494, 494, 500, 497, 502, 495, 504, 501, 500,
+
+ 503, 502, 507, 504, 498, 498, 501, 506, 505, 503,
+ 493, 517, 510, 505, 506, 512, 509, 507, 509, 511,
+ 500, 510, 502, 513, 504, 509, 511, 514, 516, 507,
+ 515, 518, 0, 517, 506, 523, 513, 519, 517, 510,
+ 519, 520, 521, 509, 518, 509, 511, 512, 515, 522,
+ 513, 524, 527, 523, 526, 521, 519, 515, 518, 514,
+ 516, 522, 523, 525, 519, 520, 528, 519, 520, 521,
+ 525, 0, 529, 532, 531, 527, 522, 530, 526, 528,
+ 531, 526, 530, 524, 527, 533, 534, 536, 0, 0,
+ 525, 535, 0, 528, 529, 533, 532, 539, 538, 529,
+
+ 532, 531, 527, 535, 530, 537, 538, 544, 534, 536,
+ 542, 539, 533, 534, 536, 543, 537, 542, 535, 544,
+ 545, 543, 546, 547, 539, 538, 569, 0, 548, 580,
+ 546, 569, 537, 540, 544, 0, 574, 542, 540, 548,
+ 540, 549, 543, 545, 551, 547, 540, 545, 540, 546,
+ 547, 540, 540, 569, 552, 548, 551, 574, 540, 540,
+ 540, 580, 550, 574, 549, 540, 550, 540, 549, 553,
+ 554, 551, 553, 540, 552, 540, 552, 555, 540, 540,
+ 553, 552, 0, 556, 550, 540, 559, 555, 554, 550,
+ 559, 557, 558, 550, 561, 556, 553, 554, 560, 553,
+
+ 563, 552, 557, 564, 562, 560, 562, 565, 585, 555,
+ 556, 566, 0, 559, 555, 564, 558, 567, 557, 558,
+ 561, 561, 565, 566, 568, 560, 563, 563, 570, 571,
+ 564, 562, 568, 572, 565, 577, 573, 576, 566, 581,
+ 585, 572, 578, 567, 567, 579, 582, 571, 573, 583,
+ 570, 568, 576, 577, 581, 570, 571, 583, 582, 586,
+ 572, 584, 577, 573, 576, 578, 581, 588, 579, 578,
+ 587, 586, 579, 582, 584, 589, 583, 591, 590, 587,
+ 591, 592, 593, 594, 595, 596, 586, 597, 584, 589,
+ 588, 598, 0, 0, 588, 601, 599, 587, 603, 595,
+
+ 592, 600, 589, 590, 591, 590, 598, 601, 592, 593,
+ 602, 595, 604, 612, 600, 594, 606, 596, 598, 597,
+ 599, 603, 601, 599, 605, 603, 608, 606, 600, 609,
+ 607, 605, 602, 610, 605, 607, 604, 602, 613, 604,
+ 608, 614, 605, 606, 615, 612, 617, 616, 618, 0,
+ 620, 605, 616, 608, 618, 617, 609, 619, 605, 621,
+ 610, 605, 607, 622, 623, 613, 629, 625, 614, 624,
+ 642, 622, 619, 617, 620, 618, 615, 620, 626, 616,
+ 627, 621, 626, 623, 619, 628, 621, 631, 627, 625,
+ 622, 623, 630, 624, 625, 632, 624, 636, 629, 630,
+
+ 634, 633, 642, 635, 632, 626, 0, 627, 628, 636,
+ 631, 637, 628, 634, 631, 638, 0, 637, 639, 630,
+ 640, 643, 632, 633, 636, 641, 639, 634, 633, 635,
+ 635, 640, 641, 644, 650, 646, 669, 638, 637, 647,
+ 649, 648, 638, 643, 646, 639, 644, 640, 643, 645,
+ 648, 649, 641, 651, 645, 655, 650, 645, 645, 652,
+ 644, 650, 646, 669, 657, 647, 647, 649, 648, 0,
+ 653, 656, 652, 645, 0, 651, 645, 658, 0, 661,
+ 651, 645, 653, 660, 645, 645, 652, 655, 657, 656,
+ 662, 657, 0, 659, 665, 666, 663, 653, 656, 658,
+
+ 658, 659, 664, 661, 658, 660, 661, 663, 667, 666,
+ 660, 664, 662, 670, 665, 672, 671, 662, 668, 674,
+ 659, 665, 666, 663, 671, 668, 658, 673, 675, 664,
+ 667, 670, 674, 673, 676, 667, 677, 672, 678, 675,
+ 670, 679, 672, 671, 690, 668, 674, 680, 681, 681,
+ 0, 677, 676, 682, 673, 675, 684, 683, 685, 686,
+ 687, 676, 679, 677, 682, 692, 688, 685, 679, 691,
+ 678, 680, 686, 687, 680, 693, 690, 681, 684, 695,
+ 682, 683, 689, 684, 683, 685, 686, 687, 688, 696,
+ 689, 691, 694, 688, 694, 701, 691, 692, 697, 693,
+
+ 696, 695, 693, 697, 698, 0, 695, 699, 703, 689,
+ 700, 704, 702, 0, 706, 705, 696, 700, 698, 694,
+ 702, 699, 705, 707, 700, 700, 703, 701, 708, 710,
+ 697, 698, 700, 704, 699, 703, 712, 700, 704, 702,
+ 706, 706, 705, 707, 700, 709, 712, 711, 708, 713,
+ 707, 700, 700, 714, 713, 708, 725, 715, 712, 715,
+ 709, 710, 711, 712, 716, 718, 0, 717, 720, 709,
+ 719, 0, 709, 712, 711, 717, 719, 720, 0, 714,
+ 714, 713, 734, 727, 715, 726, 773, 709, 725, 716,
+ 718, 716, 718, 721, 717, 720, 722, 719, 723, 728,
+
+ 724, 727, 721, 729, 730, 722, 723, 724, 726, 731,
+ 727, 728, 726, 730, 734, 729, 0, 731, 773, 732,
+ 721, 733, 735, 722, 736, 723, 728, 724, 732, 735,
+ 729, 730, 737, 733, 738, 739, 731, 736, 0, 743,
+ 741, 739, 738, 732, 740, 742, 732, 737, 733, 735,
+ 743, 736, 740, 748, 742, 732, 744, 790, 750, 737,
+ 0, 738, 739, 741, 0, 744, 743, 741, 745, 745,
+ 746, 740, 742, 747, 749, 748, 751, 745, 746, 752,
+ 748, 747, 753, 744, 750, 750, 754, 749, 756, 790,
+ 753, 755, 752, 759, 757, 745, 745, 746, 0, 751,
+
+ 747, 749, 754, 751, 755, 757, 752, 759, 758, 753,
+ 756, 760, 761, 754, 764, 756, 758, 762, 755, 763,
+ 759, 757, 763, 765, 766, 768, 0, 767, 0, 769,
+ 770, 760, 0, 766, 761, 758, 764, 762, 760, 761,
+ 771, 764, 769, 768, 762, 765, 763, 767, 770, 772,
+ 765, 766, 768, 774, 767, 775, 769, 770, 771, 777,
+ 776, 779, 0, 778, 772, 780, 783, 771, 782, 0,
+ 784, 781, 777, 779, 782, 774, 772, 0, 784, 775,
+ 774, 778, 775, 776, 781, 786, 777, 776, 779, 780,
+ 778, 787, 780, 783, 785, 782, 784, 784, 781, 785,
+
+ 789, 793, 791, 797, 792, 784, 794, 786, 789, 787,
+ 791, 792, 786, 795, 796, 795, 798, 799, 787, 800,
+ 802, 794, 802, 796, 793, 801, 785, 789, 793, 791,
+ 803, 792, 813, 794, 801, 797, 799, 803, 0, 800,
+ 795, 796, 806, 810, 799, 814, 800, 802, 798, 827,
+ 813, 0, 801, 810, 806, 816, 0, 803, 804, 813,
+ 816, 804, 818, 817, 820, 804, 814, 821, 804, 806,
+ 810, 0, 814, 822, 842, 804, 804, 0, 804, 842,
+ 818, 827, 816, 804, 817, 804, 819, 820, 804, 818,
+ 817, 820, 804, 821, 821, 804, 823, 819, 824, 822,
+
+ 822, 825, 804, 804, 826, 804, 842, 824, 0, 829,
+ 0, 826, 823, 819, 825, 830, 829, 832, 831, 834,
+ 0, 837, 834, 823, 831, 824, 832, 841, 825, 837,
+ 833, 826, 828, 828, 0, 828, 829, 830, 828, 836,
+ 835, 0, 830, 828, 832, 831, 834, 838, 837, 828,
+ 828, 841, 828, 833, 841, 843, 835, 833, 828, 828,
+ 828, 836, 828, 835, 844, 828, 836, 835, 839, 838,
+ 828, 840, 845, 840, 838, 843, 828, 828, 846, 828,
+ 839, 847, 843, 835, 845, 851, 849, 848, 853, 850,
+ 844, 844, 852, 854, 0, 839, 859, 856, 840, 845,
+
+ 846, 854, 855, 853, 856, 846, 863, 847, 847, 848,
+ 849, 850, 851, 849, 848, 853, 850, 852, 857, 852,
+ 854, 858, 859, 859, 856, 855, 857, 860, 861, 855,
+ 862, 866, 863, 863, 865, 861, 866, 864, 867, 860,
+ 858, 868, 869, 862, 872, 857, 864, 870, 858, 865,
+ 873, 874, 870, 877, 860, 861, 879, 862, 866, 875,
+ 874, 865, 878, 868, 864, 876, 872, 875, 868, 869,
+ 867, 872, 876, 880, 881, 882, 883, 884, 874, 870,
+ 886, 885, 873, 888, 878, 877, 875, 887, 879, 878,
+ 885, 890, 876, 889, 882, 881, 887, 880, 892, 886,
+
+ 880, 881, 882, 883, 884, 888, 891, 886, 885, 892,
+ 888, 890, 894, 893, 887, 891, 889, 895, 890, 896,
+ 889, 893, 897, 898, 900, 892, 0, 899, 0, 902,
+ 903, 904, 900, 891, 904, 895, 899, 906, 896, 894,
+ 893, 905, 907, 908, 895, 0, 896, 902, 903, 897,
+ 909, 900, 910, 905, 899, 898, 902, 903, 904, 906,
+ 907, 911, 912, 911, 906, 910, 916, 908, 905, 907,
+ 908, 913, 909, 914, 915, 918, 925, 909, 914, 910,
+ 912, 919, 917, 918, 930, 913, 921, 915, 911, 912,
+ 924, 930, 916, 916, 917, 921, 922, 920, 913, 919,
+
+ 920, 915, 918, 925, 922, 914, 926, 927, 919, 917,
+ 928, 930, 926, 921, 929, 924, 928, 924, 931, 0,
+ 922, 932, 934, 922, 920, 931, 932, 936, 933, 927,
+ 937, 922, 939, 926, 927, 933, 929, 928, 935, 937,
+ 934, 929, 935, 938, 940, 931, 941, 942, 932, 934,
+ 936, 938, 943, 944, 936, 933, 945, 937, 942, 946,
+ 943, 941, 940, 947, 939, 935, 944, 948, 949, 952,
+ 938, 940, 954, 941, 942, 951, 947, 945, 946, 943,
+ 944, 953, 951, 945, 950, 960, 946, 952, 953, 948,
+ 947, 954, 950, 955, 948, 949, 952, 957, 956, 954,
+
+ 955, 0, 951, 956, 961, 957, 958, 959, 953, 963,
+ 962, 950, 965, 958, 959, 964, 966, 960, 967, 965,
+ 955, 0, 968, 962, 957, 956, 973, 969, 964, 971,
+ 974, 975, 970, 958, 959, 969, 961, 962, 972, 965,
+ 970, 963, 964, 979, 972, 968, 976, 970, 966, 968,
+ 967, 971, 973, 973, 969, 977, 971, 978, 981, 970,
+ 982, 980, 974, 975, 977, 972, 983, 970, 980, 982,
+ 976, 978, 984, 976, 986, 979, 985, 0, 987, 986,
+ 983, 988, 977, 989, 978, 981, 992, 982, 980, 985,
+ 987, 985, 990, 983, 984, 991, 0, 990, 992, 984,
+
+ 985, 993, 991, 985, 988, 987, 986, 994, 988, 989,
+ 989, 996, 997, 992, 996, 994, 985, 0, 985, 990,
+ 998, 1000, 991, 993, 1002, 997, 1001, 1004, 993, 1005,
+ 1002, 998, 0, 1001, 994, 1000, 1008, 1006, 996, 997,
+ 0, 1009, 0, 1009, 998, 0, 0, 998, 1000, 1004,
+ 0, 1002, 0, 1001, 1004, 1005, 1005, 1007, 998, 1003,
+ 1006, 1003, 1012, 1008, 1006, 1003, 0, 1003, 1009, 1007,
+ 1010, 1010, 1003, 1011, 1012, 0, 1016, 1003, 1013, 1014,
+ 1011, 1016, 1015, 1003, 1007, 1017, 1003, 0, 1003, 1012,
+ 1025, 1013, 1003, 1010, 1003, 1015, 1023, 1010, 1010, 1003,
+
+ 1011, 1014, 1018, 1017, 1003, 1013, 1014, 1019, 1016, 1015,
+ 1020, 1021, 1017, 1022, 1024, 1018, 1034, 1025, 1023, 1019,
+ 1026, 1021, 1020, 1023, 1028, 1032, 1026, 1024, 1022, 1018,
+ 1019, 1027, 1029, 1021, 1019, 1030, 1033, 1020, 1021, 1031,
+ 1022, 1024, 1028, 1034, 1027, 1036, 1019, 1026, 1021, 1350,
+ 1350, 1028, 1041, 1042, 1029, 1037, 1030, 1032, 1027, 1029,
+ 1037, 1031, 1030, 1038, 1039, 0, 1031, 1041, 1033, 1044,
+ 0, 1038, 1054, 1039, 1043, 1042, 1045, 1036, 1350, 1041,
+ 1042, 1047, 1037, 0, 1044, 1046, 1051, 1043, 0, 1061,
+ 1038, 1039, 1040, 1048, 1051, 0, 1044, 1040, 1049, 1040,
+
+ 1047, 1043, 1045, 1045, 1054, 1040, 1048, 1046, 1047, 1049,
+ 1040, 1040, 1046, 1051, 1050, 1052, 1061, 1040, 1040, 1040,
+ 1048, 1055, 1053, 1052, 1040, 1049, 1040, 1050, 1058, 1065,
+ 1056, 1057, 1040, 1053, 0, 1070, 0, 1040, 1040, 1058,
+ 1057, 1050, 1052, 1055, 1040, 1056, 1062, 1059, 1055, 1053,
+ 1060, 1066, 1069, 1063, 1067, 1058, 1059, 1056, 1057, 1060,
+ 1063, 1065, 1067, 1068, 1071, 1074, 1069, 1070, 1072, 1062,
+ 1075, 1076, 1077, 1062, 1059, 1066, 1072, 1060, 1066, 1069,
+ 1063, 1067, 1076, 1074, 1078, 1068, 1071, 1080, 1075, 1081,
+ 1068, 1071, 1074, 1079, 1082, 1072, 1081, 1075, 1076, 1083,
+
+ 1085, 1079, 1078, 1084, 1077, 1086, 1087, 1082, 1088, 1080,
+ 1084, 1078, 1089, 1090, 1080, 1085, 1081, 1092, 1098, 1097,
+ 1079, 1082, 1089, 1086, 1087, 1083, 1083, 1085, 1092, 1088,
+ 1084, 1095, 1086, 1087, 1094, 1088, 1100, 1111, 1095, 1089,
+ 1096, 1097, 1096, 1099, 1092, 1090, 1097, 1094, 1101, 1100,
+ 1098, 1099, 1102, 1109, 1103, 1104, 1107, 1101, 1095, 1110,
+ 1112, 1094, 1108, 1100, 1102, 0, 0, 1096, 0, 1111,
+ 1099, 1109, 1113, 0, 0, 1101, 1103, 1104, 1107, 1102,
+ 1109, 1103, 1104, 1107, 1108, 1110, 1110, 1115, 1114, 1108,
+ 1113, 1117, 1112, 1118, 1120, 1121, 1123, 1120, 1118, 1113,
+
+ 1114, 1115, 1117, 1122, 1124, 1125, 1126, 1121, 1127, 1123,
+ 0, 1124, 1130, 1132, 1115, 1114, 1125, 1127, 1117, 0,
+ 1120, 1120, 1121, 1123, 1120, 1118, 1126, 1122, 1128, 1129,
+ 1122, 1124, 1125, 1126, 1133, 1127, 1131, 1134, 1135, 0,
+ 1137, 1129, 1128, 1131, 1130, 1132, 1133, 1138, 1139, 1142,
+ 1140, 1135, 0, 0, 1139, 1128, 1129, 1141, 1146, 1134,
+ 1142, 1133, 1143, 1131, 1134, 1135, 1137, 1137, 1144, 1145,
+ 1149, 1138, 1140, 1146, 1138, 1139, 1142, 1140, 1148, 1141,
+ 1143, 1149, 1150, 1152, 1141, 1146, 1151, 1153, 0, 1143,
+ 1144, 1145, 1151, 1154, 1156, 1144, 1145, 1149, 1155, 1148,
+
+ 1157, 1158, 1163, 1150, 1159, 1148, 1161, 1155, 1162, 1150,
+ 1158, 1154, 1159, 1151, 1153, 1152, 1160, 1164, 1156, 1165,
+ 1154, 1156, 1162, 1160, 1168, 1155, 1157, 1157, 1158, 1170,
+ 1161, 1159, 1166, 1161, 1163, 1162, 1167, 1173, 1169, 1175,
+ 1172, 1174, 0, 1160, 0, 1177, 1173, 1176, 1174, 1164,
+ 0, 1165, 1178, 1180, 1166, 1179, 1168, 1181, 1167, 1166,
+ 1169, 1170, 1172, 1167, 1173, 1169, 1181, 1172, 1174, 1176,
+ 1178, 1175, 1177, 1179, 1176, 1180, 1183, 1182, 1184, 1178,
+ 1180, 1185, 1179, 1187, 1181, 1182, 1188, 1186, 1189, 1190,
+ 1191, 1194, 1187, 0, 0, 0, 1189, 1185, 1193, 1192,
+
+ 1183, 1188, 1184, 1183, 1182, 1184, 1196, 0, 1185, 1186,
+ 1187, 1192, 1197, 1188, 1186, 1189, 1195, 1201, 1194, 1196,
+ 1193, 1190, 1191, 1198, 1195, 1193, 1192, 1197, 1200, 1203,
+ 1202, 1203, 1198, 1196, 1205, 1201, 1206, 1200, 1202, 1197,
+ 1207, 1208, 1205, 1195, 1201, 1211, 1213, 1209, 1210, 1215,
+ 1198, 1221, 1211, 1214, 1206, 1200, 1203, 1202, 1219, 1213,
+ 1208, 1205, 1216, 1206, 1215, 1214, 1218, 1207, 1208, 1209,
+ 1210, 1222, 1211, 1213, 1209, 1210, 1215, 1217, 1218, 1220,
+ 1214, 1223, 1224, 1221, 1216, 1219, 1220, 1225, 1226, 1216,
+ 1228, 1227, 1229, 1218, 1224, 1217, 0, 0, 1225, 1231,
+
+ 1223, 1232, 1239, 1222, 1217, 1229, 1220, 1230, 1223, 1224,
+ 1226, 1234, 1228, 1232, 1225, 1226, 1227, 1228, 1227, 1229,
+ 1230, 1231, 1233, 1235, 1236, 1237, 1231, 1240, 1232, 1239,
+ 1233, 0, 1241, 1237, 1230, 1234, 1236, 1243, 1234, 1242,
+ 1240, 1244, 1245, 1235, 1249, 0, 1243, 1250, 0, 1233,
+ 1235, 1236, 1237, 1244, 1240, 1241, 0, 1242, 1246, 1241,
+ 1251, 1247, 1252, 1245, 1243, 1246, 1242, 1249, 1244, 1245,
+ 1247, 1249, 1247, 1250, 1250, 1247, 1253, 1254, 1263, 1260,
+ 1258, 1255, 1251, 1247, 1256, 1246, 1257, 1251, 1247, 1252,
+ 1254, 1289, 1256, 1269, 1264, 1257, 1253, 1247, 1258, 1247,
+
+ 1262, 1260, 1247, 1253, 1254, 1255, 1260, 1258, 1255, 1261,
+ 1263, 1256, 1265, 1257, 1266, 1262, 1264, 1261, 1267, 0,
+ 1269, 1264, 1270, 1289, 1271, 1265, 1267, 1262, 1272, 1274,
+ 1266, 1273, 1275, 0, 0, 1272, 1261, 0, 0, 1265,
+ 1290, 1266, 1276, 0, 1270, 1267, 1271, 1290, 1277, 1270,
+ 1275, 1271, 1274, 1273, 1276, 1272, 1274, 1278, 1273, 1275,
+ 1277, 1279, 1280, 1281, 1282, 1278, 1284, 1290, 1283, 1276,
+ 1279, 1285, 1284, 1286, 1280, 1277, 1283, 0, 0, 1282,
+ 1285, 0, 0, 1281, 1278, 1279, 1288, 1287, 1279, 1280,
+ 1281, 1282, 1292, 1284, 1286, 1283, 1291, 1279, 1285, 1287,
+
+ 1286, 1294, 1288, 1291, 1293, 1295, 1297, 1296, 1297, 1294,
+ 1292, 1299, 1298, 1288, 1287, 1296, 1293, 1302, 1300, 1292,
+ 1295, 0, 0, 1291, 1298, 1300, 1303, 1304, 1294, 1305,
+ 1306, 1293, 1295, 1297, 1296, 1307, 1308, 1306, 1303, 1298,
+ 1304, 1313, 1310, 1299, 1309, 1300, 1307, 1310, 1305, 1302,
+ 1314, 1312, 1311, 1303, 1304, 1313, 1305, 1306, 1308, 1309,
+ 1311, 1318, 1307, 1308, 1312, 1323, 0, 1316, 1313, 1319,
+ 0, 1309, 1317, 1322, 1310, 0, 1314, 1314, 1312, 1311,
+ 1315, 1316, 1320, 1324, 1315, 1321, 0, 1315, 1315, 1332,
+ 1317, 1322, 1315, 1318, 1316, 1319, 1319, 1323, 1315, 1317,
+
+ 1322, 1325, 1315, 1333, 1320, 1324, 1315, 1315, 1321, 1320,
+ 1324, 1315, 1321, 1326, 1315, 1315, 1327, 0, 1328, 1315,
+ 1330, 1332, 1327, 1325, 1329, 1315, 1329, 1330, 1325, 1315,
+ 1334, 1335, 1331, 1338, 1337, 1333, 1340, 1342, 1380, 1326,
+ 1326, 1331, 0, 1327, 1328, 1328, 1338, 1330, 1329, 1335,
+ 1341, 1329, 1343, 1329, 1334, 1336, 1337, 1334, 1335, 1331,
+ 1338, 1337, 1336, 1339, 1344, 1380, 1345, 0, 1340, 1342,
+ 1347, 1341, 1339, 1348, 1343, 1353, 0, 1341, 0, 1343,
+ 1345, 1349, 1336, 1354, 0, 0, 1348, 1344, 1351, 1355,
+ 1339, 1344, 1347, 1345, 1346, 1354, 1355, 1347, 1353, 1346,
+
+ 1348, 1346, 1353, 1346, 1351, 1346, 1357, 1349, 1349, 1356,
+ 1354, 1359, 1346, 1360, 1358, 1351, 1355, 1361, 1356, 1358,
+ 1362, 1346, 1361, 1364, 1357, 1368, 1346, 1369, 1346, 1359,
+ 1346, 1360, 1346, 1357, 1370, 1363, 1356, 1365, 1359, 1367,
+ 1360, 1364, 1362, 1366, 1361, 1365, 1358, 1362, 1363, 1370,
+ 1364, 1366, 1367, 1369, 1369, 1371, 1372, 1368, 1373, 1374,
+ 1375, 1370, 1363, 1378, 1365, 1378, 1367, 1377, 1376, 1372,
+ 1366, 1379, 1374, 1382, 1371, 1383, 1377, 1381, 1375, 0,
+ 1373, 1384, 1371, 1372, 1390, 1373, 1374, 1375, 1376, 1381,
+ 1378, 1386, 1387, 1379, 1377, 1376, 1392, 1383, 1379, 1388,
+
+ 1382, 1393, 1383, 1389, 1381, 1391, 1384, 1388, 1384, 1394,
+ 1395, 1390, 1391, 1398, 1387, 1386, 1395, 1399, 1386, 1387,
+ 1403, 1389, 1401, 1392, 1399, 0, 1388, 1393, 1393, 1396,
+ 1389, 1394, 1391, 1397, 1402, 1396, 1394, 1395, 1400, 1397,
+ 1398, 1402, 1404, 1406, 1399, 1405, 1401, 1409, 1400, 1401,
+ 1407, 1412, 1403, 1411, 1410, 1426, 1396, 1414, 1427, 1407,
+ 1397, 1402, 1413, 1405, 1404, 1400, 1410, 1411, 1406, 1404,
+ 1406, 1409, 1405, 1412, 1409, 1413, 1415, 1407, 1412, 1414,
+ 1411, 1410, 1416, 1417, 1414, 1419, 1418, 1426, 1421, 1413,
+ 1427, 0, 1420, 0, 0, 1415, 1422, 1421, 1423, 1428,
+
+ 1429, 1430, 1424, 1415, 1416, 0, 0, 1417, 1418, 1416,
+ 1417, 1419, 1419, 1418, 1420, 1421, 1424, 1422, 1423, 1420,
+ 1431, 1428, 1429, 1422, 1432, 1423, 1428, 1429, 1433, 1424,
+ 1434, 1438, 1432, 1430, 1435, 1436, 1439, 1440, 1431, 1442,
+ 1441, 1435, 1436, 1444, 1433, 1439, 1442, 1431, 1445, 1446,
+ 1449, 1432, 1441, 1438, 1440, 1433, 1443, 1434, 1438, 1453,
+ 1443, 1435, 1436, 1439, 1440, 1447, 1442, 1441, 1452, 0,
+ 1446, 1450, 1451, 1455, 1456, 1444, 1446, 1450, 1451, 1454,
+ 1445, 1447, 1449, 1443, 1450, 1451, 1454, 1456, 1455, 1458,
+ 1452, 1453, 1447, 1457, 0, 1452, 1459, 1462, 1450, 1451,
+
+ 1455, 1456, 1457, 1459, 1450, 1451, 1454, 1460, 1461, 1460,
+ 1464, 1466, 1463, 1469, 1465, 1458, 1458, 1461, 1465, 1462,
+ 1457, 1463, 1468, 1459, 1462, 1473, 1469, 1471, 1470, 1474,
+ 1468, 1475, 1471, 1466, 1460, 1461, 1472, 1464, 1466, 1463,
+ 1469, 1465, 1470, 1473, 1475, 1472, 1480, 1479, 1474, 1468,
+ 1476, 0, 1473, 1483, 1477, 1470, 1474, 1477, 1475, 1471,
+ 1485, 1478, 1476, 1472, 1478, 1479, 1477, 1481, 0, 1484,
+ 1486, 1480, 0, 1480, 1479, 1486, 1485, 1476, 1487, 1490,
+ 1481, 1477, 0, 1478, 1477, 1483, 1487, 1485, 1478, 1488,
+ 1488, 1478, 1484, 1491, 1481, 1489, 1484, 1492, 1493, 1495,
+
+ 1498, 1490, 1486, 1494, 1489, 1487, 1490, 1493, 1499, 1502,
+ 1494, 1496, 1505, 1498, 1500, 1491, 1488, 1499, 1496, 1492,
+ 1491, 1495, 1489, 1500, 1492, 1493, 1495, 1498, 1501, 1504,
+ 1494, 1503, 1502, 1506, 1507, 1499, 1502, 1504, 1496, 1508,
+ 1503, 1500, 1513, 1515, 1505, 1507, 1509, 1508, 1506, 1512,
+ 1510, 1511, 1514, 0, 1501, 1501, 1504, 1512, 1503, 1509,
+ 1506, 1507, 1510, 1511, 1513, 1515, 1508, 1519, 1517, 1513,
+ 1515, 1516, 1514, 1509, 1520, 1521, 1512, 1510, 1511, 1514,
+ 1516, 1517, 1518, 1523, 1527, 1519, 1522, 1521, 1518, 1524,
+ 1523, 1525, 1526, 1528, 1519, 1517, 1534, 1527, 1516, 1529,
+
+ 1520, 1520, 1521, 1531, 1522, 1535, 1530, 1533, 1536, 1518,
+ 1523, 1527, 1532, 1522, 1531, 1524, 1524, 1537, 1532, 1528,
+ 1528, 1540, 1541, 1525, 1526, 0, 1529, 1530, 1534, 1533,
+ 1531, 1538, 1543, 1530, 1533, 1542, 1544, 1535, 1548, 1532,
+ 1536, 1543, 1545, 1537, 1537, 1541, 1590, 1547, 1540, 1541,
+ 1538, 1544, 1538, 1542, 1546, 1545, 1550, 1538, 1538, 1543,
+ 1551, 1549, 1542, 1544, 1548, 1548, 1546, 1547, 1549, 1545,
+ 1553, 1552, 1556, 1590, 1547, 1550, 1558, 1538, 1553, 1538,
+ 1554, 1546, 1551, 1550, 1552, 1554, 1555, 1551, 1549, 1557,
+ 1561, 1555, 1559, 1560, 0, 1556, 1557, 1553, 1552, 1556,
+
+ 1559, 1560, 1558, 1558, 1562, 1563, 1565, 1564, 1561, 1566,
+ 1572, 1570, 1554, 1563, 1564, 1565, 1557, 1561, 1555, 1559,
+ 1560, 1567, 1569, 1570, 1571, 1571, 1562, 1568, 1575, 1569,
+ 0, 1562, 1563, 1565, 1564, 1574, 1568, 1573, 1570, 1576,
+ 1577, 1566, 1572, 1567, 1578, 1573, 1582, 1576, 1567, 1569,
+ 1585, 1571, 1578, 1579, 1568, 1580, 1574, 1581, 1577, 1582,
+ 1575, 1579, 1574, 1580, 1573, 1581, 1576, 1577, 1583, 1584,
+ 1586, 1578, 1589, 1582, 1583, 1587, 1585, 1585, 1588, 1591,
+ 1579, 1584, 1580, 1587, 1581, 1592, 1588, 1589, 1593, 1594,
+ 1596, 0, 1595, 0, 1586, 1583, 1584, 1586, 1601, 1589,
+
+ 1597, 1600, 1587, 1594, 1595, 1588, 1591, 1592, 1596, 1598,
+ 1600, 1593, 1592, 1598, 1597, 1593, 1594, 1596, 1603, 1595,
+ 1602, 1605, 1601, 1606, 1604, 1601, 1598, 1597, 1600, 1608,
+ 1603, 1604, 1605, 1607, 1598, 1611, 1598, 1609, 1610, 1613,
+ 1598, 1612, 1602, 0, 1619, 1603, 1614, 1602, 1605, 1609,
+ 1606, 1604, 1610, 1598, 1617, 1607, 1620, 1624, 1628, 0,
+ 1607, 1608, 1613, 1612, 1609, 1610, 1613, 1611, 1612, 1614,
+ 1615, 1616, 1617, 1614, 1626, 1618, 1619, 1615, 1622, 1625,
+ 1616, 1617, 1618, 1620, 1627, 1625, 1629, 1622, 1631, 1624,
+ 1628, 1634, 1633, 1629, 0, 0, 1626, 1615, 1616, 1642,
+
+ 1639, 1626, 1618, 1635, 0, 1622, 1625, 1644, 0, 1636,
+ 1627, 1627, 1637, 1629, 1635, 1631, 1633, 1642, 1634, 1633,
+ 1636, 1650, 1640, 1637, 1639, 1641, 1642, 1639, 1640, 1645,
+ 1635, 1643, 1641, 1644, 1644, 1648, 1636, 1646, 1643, 1637,
+ 1647, 1645, 1649, 1646, 1651, 1652, 0, 0, 1647, 1640,
+ 1653, 0, 1641, 1650, 1654, 1649, 1645, 1648, 1643, 1653,
+ 1657, 1656, 1648, 1652, 1646, 1658, 1654, 1647, 1656, 1649,
+ 1651, 1651, 1652, 1655, 1659, 1655, 1660, 1653, 1658, 1661,
+ 1662, 1654, 1663, 1659, 1665, 1666, 1657, 1657, 1656, 1664,
+ 1666, 1661, 1658, 1673, 1667, 1669, 1664, 1668, 1660, 0,
+
+ 1655, 1659, 1667, 1660, 1671, 1663, 1661, 1662, 1675, 1663,
+ 1665, 1665, 1666, 1668, 1674, 1670, 1664, 1678, 1669, 1674,
+ 1673, 1667, 1669, 1670, 1668, 1676, 1671, 1677, 1678, 1679,
+ 1680, 1671, 1675, 1681, 1681, 1675, 1685, 1682, 1679, 1676,
+ 1684, 1681, 1670, 1680, 1678, 1683, 1674, 1683, 1686, 1677,
+ 1682, 1688, 1676, 1690, 1677, 1692, 1679, 1680, 1684, 1687,
+ 1681, 1681, 1685, 1685, 1682, 1693, 1687, 1684, 1694, 1689,
+ 1686, 1691, 1683, 1688, 1695, 1686, 1689, 1690, 1688, 1691,
+ 1690, 1695, 1692, 1693, 1696, 1697, 1687, 1698, 1701, 1700,
+ 1694, 1703, 1693, 1699, 0, 1694, 1689, 1704, 1691, 0,
+
+ 1699, 1695, 1708, 1707, 1703, 1705, 1706, 1697, 1712, 1696,
+ 1701, 1696, 1697, 1705, 1706, 1701, 1710, 1717, 1703, 1698,
+ 1699, 1700, 1713, 1708, 1704, 1707, 1714, 1715, 1711, 1708,
+ 1707, 1711, 1705, 1706, 1712, 1712, 1715, 1718, 1710, 1714,
+ 1716, 1717, 1719, 1710, 1717, 1720, 1723, 0, 1713, 1713,
+ 1721, 1719, 1716, 1714, 1715, 1711, 1722, 1721, 1725, 1722,
+ 1720, 1727, 1724, 1718, 1718, 1728, 1729, 1716, 1729, 1719,
+ 1730, 1722, 1720, 1731, 1725, 1733, 1734, 1721, 1723, 1727,
+ 1722, 1738, 1725, 1722, 1724, 1725, 1722, 1728, 1727, 1724,
+ 1735, 1740, 1728, 1729, 1730, 1736, 1732, 1730, 1722, 1732,
+
+ 1731, 1725, 1737, 1739, 1748, 1740, 1741, 1733, 1734, 1743,
+ 1744, 1742, 1735, 1738, 1745, 1741, 1743, 1735, 1740, 1742,
+ 1746, 1736, 1736, 1732, 1747, 1739, 1748, 1749, 1737, 1737,
+ 1739, 1748, 0, 1741, 1744, 1750, 1743, 1744, 1742, 1750,
+ 1752, 1751, 1753, 1755, 1754, 1756, 1745, 1757, 1759, 0,
+ 1755, 1758, 1746, 1754, 1764, 1757, 1747, 1756, 1758, 1749,
+ 1760, 1759, 1750, 1751, 1753, 1765, 1761, 1752, 1751, 1753,
+ 1755, 1754, 1756, 1760, 1757, 1759, 1762, 1764, 1758, 1761,
+ 1763, 1764, 1763, 1766, 1767, 1762, 1769, 1760, 1771, 1773,
+ 1765, 1766, 1765, 1761, 1770, 1772, 1773, 1774, 1775, 1776,
+
+ 0, 1769, 1771, 1762, 1767, 1775, 1781, 1763, 1774, 1770,
+ 1766, 1767, 1776, 1769, 1777, 1771, 1773, 1778, 1779, 1784,
+ 1783, 1770, 1782, 1786, 1774, 1775, 1776, 1772, 1785, 1782,
+ 0, 1801, 1777, 1781, 1784, 1786, 1779, 1788, 1777, 1787,
+ 1788, 1777, 1783, 1778, 1778, 1779, 1784, 1783, 1789, 1782,
+ 1786, 1790, 1787, 1791, 1785, 1785, 1792, 1789, 1801, 1777,
+ 1794, 1799, 1800, 1799, 1788, 1791, 1787, 1793, 1802, 1790,
+ 1793, 1794, 1796, 1798, 0, 1789, 1792, 1796, 1790, 1805,
+ 1791, 1803, 1798, 1792, 1796, 1793, 1800, 1794, 1799, 1800,
+ 1806, 1807, 1804, 1809, 1793, 1802, 1803, 1793, 1811, 1796,
+
+ 1798, 1804, 1808, 1805, 1796, 1807, 1805, 1812, 1803, 1810,
+ 1808, 1813, 1815, 1812, 1816, 1809, 1814, 1806, 1807, 1804,
+ 1809, 1822, 1811, 1815, 1814, 1811, 1820, 1817, 1821, 1808,
+ 1823, 1810, 1816, 1813, 1812, 1817, 1810, 1818, 1813, 1815,
+ 1818, 1816, 1819, 1814, 1820, 1819, 0, 1825, 1822, 1824,
+ 1823, 1828, 1827, 1820, 1817, 1818, 1824, 1823, 1829, 1826,
+ 1821, 1825, 1828, 1829, 1818, 1827, 1830, 1818, 1826, 1819,
+ 1831, 1834, 1835, 1834, 1825, 1836, 1824, 0, 1828, 1827,
+ 1837, 1835, 1839, 1838, 1843, 1831, 1826, 1840, 1830, 1841,
+ 1829, 1840, 0, 1830, 1838, 1844, 0, 1831, 1834, 1835,
+
+ 1839, 1836, 1836, 1841, 1837, 1842, 1843, 1837, 1842, 1839,
+ 1838, 1843, 0, 1840, 1840, 1841, 1841, 1845, 1840, 1846,
+ 1847, 1844, 1844, 1842, 1850, 1846, 1845, 1851, 1848, 1847,
+ 1841, 1852, 1842, 1848, 1853, 1842, 1852, 1850, 1855, 1851,
+ 1854, 1856, 1857, 1858, 1845, 1861, 1846, 1847, 1867, 1859,
+ 1856, 1850, 1860, 1854, 1851, 1864, 1853, 1862, 1852, 1865,
+ 1848, 1853, 1864, 1870, 0, 1860, 1865, 1854, 1856, 1857,
+ 1855, 1859, 1866, 1868, 1872, 1858, 1859, 1861, 1862, 1860,
+ 1867, 1878, 1864, 1869, 1862, 1866, 1865, 1868, 1874, 1869,
+ 1875, 1879, 1877, 1872, 1876, 1870, 1874, 1886, 1875, 1866,
+
+ 1868, 1872, 1876, 1878, 1881, 1887, 1880, 1869, 1878, 1879,
+ 1869, 1877, 1882, 1885, 1883, 1874, 1869, 1875, 1879, 1877,
+ 1880, 1876, 1881, 1884, 1888, 1890, 1882, 1883, 1889, 1886,
+ 1894, 1881, 1896, 1880, 1885, 1892, 1884, 1887, 1891, 1882,
+ 1885, 1883, 1889, 1901, 1892, 1891, 1893, 1904, 1888, 1895,
+ 1884, 1888, 1890, 1897, 1893, 1889, 1898, 1894, 1897, 1899,
+ 1906, 1885, 1892, 1895, 1896, 1891, 1903, 1898, 1899, 1904,
+ 1901, 1902, 1905, 1893, 1904, 1907, 1895, 1908, 1902, 1905,
+ 1897, 1909, 1906, 1898, 1913, 1909, 1899, 1906, 1914, 1903,
+ 1911, 1917, 1915, 1903, 1916, 1908, 1918, 1907, 1902, 1905,
+
+ 1913, 1911, 1907, 1917, 1908, 1919, 1914, 1920, 1909, 1916,
+ 1922, 1913, 1921, 1919, 1911, 1914, 1915, 1911, 1917, 1915,
+ 1921, 1916, 1920, 1918, 1923, 1924, 1926, 1925, 1911, 1927,
+ 1928, 1934, 1919, 1930, 1920, 1932, 0, 1922, 1924, 1921,
+ 1930, 1926, 1929, 1932, 1935, 1928, 1923, 1925, 1933, 1927,
+ 1938, 1923, 1924, 1926, 1925, 1933, 1927, 1928, 1929, 1935,
+ 1930, 1936, 1932, 1934, 1937, 1939, 1940, 1941, 1943, 1929,
+ 1936, 1935, 1944, 1940, 1945, 1933, 1947, 1938, 1946, 1948,
+ 0, 0, 1949, 1951, 0, 1937, 1945, 1950, 1936, 1939,
+ 1943, 1937, 1939, 1940, 1941, 1943, 1946, 1949, 1953, 1956,
+
+ 0, 1945, 1958, 1953, 1944, 1946, 1948, 1951, 1947, 1949,
+ 1951, 1952, 1950, 1954, 1950, 1955, 1959, 1957, 1952, 1961,
+ 1958, 1956, 1954, 1960, 1955, 1953, 1956, 1965, 0, 1958,
+ 1963, 1959, 1967, 1966, 1962, 1960, 1968, 1963, 1952, 1957,
+ 1954, 1961, 1955, 1959, 1957, 1966, 1961, 1962, 1964, 1965,
+ 1960, 1978, 1962, 1971, 1965, 1964, 1969, 1963, 1972, 1967,
+ 1966, 1962, 1969, 1973, 1971, 1974, 1972, 0, 1968, 1976,
+ 1964, 1973, 1975, 1979, 1962, 1964, 1974, 1978, 1978, 1975,
+ 1971, 1980, 1964, 1969, 1977, 1972, 1977, 1982, 1981, 1987,
+ 1973, 1983, 1974, 0, 1976, 1981, 1976, 1977, 1984, 1975,
+
+ 1979, 1985, 1989, 1986, 1984, 1992, 1988, 1985, 1980, 1986,
+ 1994, 1977, 1990, 1977, 1982, 1981, 1987, 1983, 1983, 1995,
+ 1998, 1996, 1993, 1995, 1997, 1984, 1997, 1999, 1985, 1988,
+ 1986, 1993, 2002, 1988, 1989, 2001, 1990, 1992, 2000, 1990,
+ 2003, 2005, 1994, 1996, 1998, 2000, 1995, 1998, 1996, 1993,
+ 2004, 1997, 2003, 2006, 1999, 2007, 2004, 2001, 2009, 2002,
+ 2014, 2008, 2001, 2005, 2023, 2000, 2011, 2003, 2005, 2010,
+ 2010, 2010, 2013, 2011, 0, 2006, 2010, 2004, 2012, 2013,
+ 2006, 2007, 2007, 2008, 2010, 2018, 2017, 2012, 2008, 2023,
+ 2009, 2023, 2014, 2011, 2015, 2016, 2010, 2010, 2010, 2013,
+
+ 2024, 2015, 2016, 2010, 2020, 2012, 2017, 2018, 2022, 2020,
+ 2021, 2026, 2018, 2017, 2025, 2027, 2024, 2028, 2030, 2029,
+ 2022, 2015, 2016, 2021, 2028, 2029, 2025, 2024, 2031, 2031,
+ 2032, 2033, 2036, 2027, 2034, 2022, 2020, 2021, 2033, 2034,
+ 2035, 2025, 2027, 2026, 2028, 2030, 2029, 2037, 2041, 2042,
+ 2043, 2042, 2045, 2038, 2047, 2031, 2032, 2032, 2033, 2036,
+ 2038, 2034, 2049, 2046, 2048, 2050, 2035, 2035, 2043, 2046,
+ 2045, 2051, 2048, 2049, 2037, 2041, 2042, 2043, 2050, 2045,
+ 2038, 2052, 2053, 2054, 2055, 2058, 2047, 2052, 2057, 2049,
+ 2046, 2048, 2050, 2060, 2053, 2056, 2056, 2062, 2051, 2059,
+
+ 2059, 2063, 2055, 2054, 2060, 2064, 2065, 2066, 2052, 2053,
+ 2054, 2055, 2058, 2065, 2057, 2057, 2067, 2068, 2071, 2072,
+ 2060, 0, 2056, 2063, 2070, 2073, 2059, 2066, 2063, 2062,
+ 2077, 2074, 2070, 2065, 2066, 2078, 2076, 2064, 2077, 2079,
+ 2080, 2075, 2068, 2076, 2068, 2083, 2072, 2073, 2067, 2074,
+ 2071, 2070, 2073, 2075, 2079, 2085, 2081, 2077, 2074, 2078,
+ 2082, 2082, 2078, 2076, 2080, 2081, 2079, 2080, 2075, 2084,
+ 2085, 2083, 2083, 2086, 0, 2089, 2088, 2087, 0, 2091,
+ 2092, 2094, 2085, 2081, 2087, 2092, 2091, 2082, 2088, 2093,
+ 2095, 2089, 2096, 2095, 2102, 0, 2103, 2097, 2089, 2100,
+
+ 2096, 2084, 2089, 2088, 2087, 2086, 2091, 2092, 2094, 2097,
+ 2101, 2093, 2099, 2104, 2103, 2102, 2093, 2095, 2089, 2096,
+ 2099, 2102, 2100, 2103, 2097, 2105, 2100, 2106, 2107, 2108,
+ 0, 2112, 2109, 2107, 2110, 2113, 2101, 2101, 2109, 2099,
+ 2104, 2111, 2113, 2105, 2107, 2116, 2121, 2110, 0, 2111,
+ 2106, 0, 2105, 2112, 2106, 2107, 2108, 2114, 2112, 2109,
+ 2107, 2110, 2113, 2115, 2114, 2117, 2118, 2119, 2111, 2120,
+ 2115, 2122, 2123, 2121, 2117, 2126, 0, 2116, 2118, 2127,
+ 2126, 2128, 2125, 2120, 2114, 2129, 2127, 2131, 2133, 2119,
+ 2115, 2126, 2117, 2118, 2119, 2123, 2120, 2122, 2122, 2123,
+
+ 2125, 2135, 2126, 2128, 2137, 2132, 2127, 2126, 2128, 2125,
+ 2132, 2139, 2129, 2138, 2131, 2136, 2136, 2141, 2142, 2143,
+ 2133, 2144, 2145, 2146, 2145, 2147, 2137, 2148, 2138, 2150,
+ 2147, 2137, 2141, 2135, 2143, 2151, 2154, 2132, 2149, 2155,
+ 2138, 2142, 2136, 2139, 2141, 2142, 2143, 2144, 2144, 2145,
+ 2149, 2150, 2147, 2152, 2155, 2146, 2150, 2153, 2154, 2148,
+ 2157, 2152, 2151, 2154, 2153, 2149, 2155, 2159, 2158, 2161,
+ 2167, 0, 2163, 2162, 2164, 2157, 2158, 2165, 2166, 2168,
+ 2152, 2169, 2170, 0, 2153, 0, 2171, 2157, 2169, 2159,
+ 2172, 2168, 2174, 2176, 2159, 2158, 2161, 2162, 2163, 2163,
+
+ 2162, 2164, 2167, 2165, 2165, 2166, 2168, 2171, 2169, 2173,
+ 2174, 2177, 2172, 2171, 2170, 2176, 2179, 2172, 2180, 2174,
+ 2176, 2181, 2182, 0, 2183, 2187, 2188, 2181, 0, 2185,
+ 2173, 2186, 2190, 2191, 0, 2193, 2173, 2182, 2177, 2189,
+ 2179, 2180, 0, 2179, 2185, 2180, 2186, 2187, 2181, 2182,
+ 2183, 2183, 2187, 2188, 2190, 2191, 2185, 2189, 2186, 2190,
+ 2191, 2192, 2193, 2194, 2195, 2196, 2189, 2197, 2200, 2201,
+ 2194, 2199, 2198, 0, 2196, 2197, 2204, 2203, 2201, 2202,
+ 0, 0, 2195, 2211, 0, 2192, 2203, 2208, 2192, 2204,
+ 2194, 2195, 2196, 2199, 2197, 2198, 2201, 2202, 2199, 2198,
+
+ 2200, 2206, 2207, 2204, 2203, 2208, 2202, 2209, 2210, 2211,
+ 2211, 2207, 2206, 2212, 2208, 2210, 2214, 2213, 2219, 2215,
+ 0, 0, 2214, 2216, 2221, 2209, 2228, 2206, 2206, 2207,
+ 2231, 2212, 2213, 2230, 2209, 2210, 2222, 2216, 2223, 2206,
+ 2212, 2215, 2224, 2214, 2213, 2219, 2215, 2222, 2221, 2223,
+ 2216, 2221, 2226, 2224, 2227, 2231, 2229, 2231, 2228, 2230,
+ 2230, 2232, 2233, 2222, 2226, 2223, 2229, 2227, 2234, 2224,
+ 2237, 2233, 2235, 2240, 2232, 2238, 2242, 2240, 2244, 2226,
+ 2243, 2227, 2241, 2229, 2247, 2245, 2249, 2246, 2232, 2233,
+ 2245, 2235, 2249, 2243, 2246, 2234, 2248, 2237, 2244, 2235,
+
+ 2240, 2238, 2238, 2241, 2248, 2244, 2250, 2243, 2242, 2241,
+ 2247, 2247, 2245, 2249, 2246, 2251, 2252, 2253, 2254, 2254,
+ 2255, 2250, 2248, 2248, 2256, 0, 2264, 0, 2252, 2257,
+ 2251, 2248, 2253, 2250, 2257, 2258, 2256, 2262, 2255, 2258,
+ 2263, 2262, 2251, 2252, 2253, 2254, 0, 2255, 2259, 2259,
+ 2261, 2256, 2259, 2264, 2265, 2263, 2267, 2261, 0, 2266,
+ 2268, 2257, 2258, 2265, 2262, 2259, 2266, 2263, 2271, 2272,
+ 0, 2269, 2286, 2259, 2282, 2259, 2259, 2261, 2269, 2259,
+ 2267, 2265, 2268, 2267, 2273, 2274, 2266, 2268, 2275, 2282,
+ 2271, 2278, 2259, 2273, 2272, 2271, 2272, 2280, 2269, 2281,
+
+ 2283, 2282, 2284, 2289, 2286, 0, 2280, 2274, 2275, 2278,
+ 2284, 2273, 2274, 2285, 2287, 2275, 2291, 2281, 2278, 2290,
+ 2285, 2287, 2292, 2292, 2280, 2283, 2281, 2283, 2289, 2284,
+ 2289, 2293, 2290, 2296, 2294, 2297, 2298, 2300, 2299, 2301,
+ 2285, 2287, 2303, 2291, 2300, 2298, 2290, 2299, 2302, 2292,
+ 0, 2304, 2311, 2293, 2306, 2296, 2303, 2297, 2293, 2294,
+ 2296, 2294, 2297, 2298, 2300, 2299, 2304, 2305, 2308, 2303,
+ 2302, 2301, 2305, 2306, 2309, 2302, 2308, 2310, 2304, 2311,
+ 2312, 2306, 2313, 2315, 2314, 2316, 2317, 2309, 2319, 2318,
+ 2315, 2320, 2310, 0, 2322, 2308, 2314, 2319, 2313, 2305,
+
+ 2324, 2309, 2325, 2323, 2310, 0, 2312, 2312, 2317, 2313,
+ 2315, 2314, 2321, 2317, 2318, 2319, 2318, 2316, 2323, 2326,
+ 2321, 2322, 2327, 2320, 2328, 2330, 2324, 2324, 2325, 2325,
+ 2323, 2321, 2331, 2328, 0, 2331, 2332, 2326, 2334, 2321,
+ 2335, 2337, 2340, 2334, 2327, 0, 2326, 2321, 2330, 2327,
+ 2331, 2328, 2330, 2336, 2333, 2335, 2337, 2340, 2339, 2331,
+ 2333, 2332, 2331, 2332, 2341, 2342, 2346, 2335, 2337, 2340,
+ 2334, 2336, 2339, 2347, 2344, 0, 0, 2345, 0, 0,
+ 2336, 2333, 0, 2374, 2346, 2339, 2341, 2342, 2344, 2345,
+ 2348, 2341, 2342, 2346, 2349, 2353, 2345, 2350, 2351, 2348,
+
+ 2347, 2344, 2354, 2349, 2345, 2352, 2350, 2352, 2353, 2351,
+ 2374, 2355, 2357, 2358, 2354, 2360, 2345, 2348, 0, 2359,
+ 2368, 2349, 2353, 2361, 2350, 2351, 2359, 2357, 2358, 2354,
+ 2362, 2366, 2352, 2355, 2363, 0, 0, 2360, 2355, 2357,
+ 2358, 2368, 2360, 2363, 2366, 2361, 2359, 2368, 2362, 2369,
+ 2361, 2370, 2366, 2369, 2372, 2371, 2372, 2362, 2366, 2373,
+ 2376, 2363, 2375, 2370, 2371, 2377, 2380, 2378, 2379, 2381,
+ 2386, 2366, 2382, 0, 2377, 2378, 2369, 2373, 2370, 2389,
+ 2375, 2372, 2371, 2381, 2382, 2391, 2373, 2376, 2380, 2375,
+ 2383, 2379, 2377, 2380, 2378, 2379, 2381, 2383, 2385, 2382,
+
+ 2387, 2390, 2386, 2388, 2393, 2387, 2385, 2394, 2388, 2391,
+ 2400, 2389, 2391, 2396, 2394, 2398, 0, 2383, 2401, 2398,
+ 2396, 2399, 2403, 2393, 2404, 2385, 2405, 2387, 2402, 2406,
+ 2399, 2393, 2401, 2390, 2394, 2388, 2408, 2400, 2406, 2411,
+ 2396, 2405, 2398, 2401, 2401, 2401, 2402, 2410, 2399, 2403,
+ 2404, 2404, 2409, 2405, 2410, 2402, 2406, 2412, 2413, 2401,
+ 2414, 2411, 2415, 2417, 2409, 2418, 2411, 0, 2408, 0,
+ 2401, 2420, 2418, 2419, 2410, 2422, 0, 2422, 2420, 2409,
+ 0, 2423, 2414, 2412, 2412, 2413, 2417, 2414, 2426, 2424,
+ 2417, 2430, 2418, 2424, 2415, 2425, 2419, 2427, 2420, 2432,
+
+ 2419, 2428, 2422, 2423, 2429, 0, 2427, 2425, 2423, 2431,
+ 2426, 2429, 2428, 2430, 2431, 2426, 2424, 2433, 2430, 2435,
+ 2434, 2436, 2425, 2441, 2427, 2442, 2432, 2439, 2428, 2438,
+ 2436, 2429, 2434, 2437, 2437, 2440, 2431, 2444, 2438, 2442,
+ 2433, 2435, 2439, 2440, 2433, 2441, 2435, 2434, 2436, 2443,
+ 2441, 2446, 2442, 2447, 2439, 2448, 2438, 2449, 2443, 2456,
+ 2437, 2447, 2440, 2448, 2444, 2449, 2451, 2450, 2453, 2451,
+ 2446, 2450, 2454, 2452, 2453, 2457, 2443, 2455, 2446, 2462,
+ 2447, 2452, 2448, 2455, 2449, 2459, 2464, 2454, 2461, 2463,
+ 2466, 2456, 2462, 2451, 2450, 2453, 2465, 2459, 2467, 2454,
+
+ 2452, 2471, 2461, 2465, 2455, 2468, 2462, 2457, 2469, 2474,
+ 2463, 2464, 2459, 2464, 2471, 2461, 2463, 2466, 2470, 2472,
+ 2467, 2470, 2469, 2465, 2473, 2467, 2476, 2475, 2471, 2468,
+ 2477, 2478, 2468, 2472, 2479, 2469, 2474, 2480, 2482, 0,
+ 2480, 2487, 2477, 2478, 2483, 2470, 2472, 2484, 2479, 2485,
+ 2473, 2473, 2475, 2476, 2475, 2488, 2489, 2477, 2478, 2484,
+ 2495, 2479, 2494, 2480, 2480, 2482, 2486, 2480, 2487, 2486,
+ 2483, 2483, 2491, 2492, 2484, 2485, 2485, 2494, 2489, 2493,
+ 2492, 2496, 2488, 2489, 2486, 2498, 2493, 2495, 2499, 2494,
+ 2497, 2500, 2501, 2486, 2491, 2503, 2486, 2499, 2497, 2491,
+
+ 2492, 2502, 2504, 2505, 2501, 2507, 2493, 2506, 2496, 2509,
+ 2508, 2510, 2498, 2511, 2514, 2499, 2505, 2497, 2500, 2501,
+ 2508, 2511, 2503, 2502, 2510, 2506, 2513, 2515, 2502, 2504,
+ 2505, 2507, 2507, 2516, 2506, 2515, 2509, 2508, 2510, 2518,
+ 2511, 2514, 2517, 2519, 2520, 2522, 0, 2521, 2513, 2523,
+ 2525, 2517, 2530, 2513, 2515, 2524, 2529, 2523, 2532, 2534,
+ 2516, 2518, 2521, 2534, 2519, 2532, 2518, 2524, 2520, 2517,
+ 2519, 2520, 2522, 2521, 2521, 2525, 2523, 2525, 2527, 2528,
+ 2533, 2535, 2524, 2529, 2530, 2532, 2534, 2528, 2536, 2521,
+ 2527, 2537, 2533, 2535, 2538, 2539, 2540, 2541, 0, 2542,
+
+ 2544, 2547, 2538, 2545, 2550, 2527, 2528, 2533, 2535, 2541,
+ 2545, 2536, 2546, 2542, 2547, 2536, 2550, 2539, 2537, 2540,
+ 2548, 2538, 2539, 2540, 2541, 2542, 2542, 2544, 2547, 2548,
+ 2545, 2550, 2546, 2549, 2551, 2551, 2552, 2553, 2557, 2546,
+ 2542, 2554, 2549, 0, 2558, 0, 0, 2548, 0, 0,
+ 2555, 2559, 2573, 2560, 2561, 2553, 2562, 0, 2562, 2558,
+ 2549, 2551, 2552, 2552, 2553, 2555, 2554, 2555, 2554, 2565,
+ 2557, 2558, 2563, 2559, 2555, 2560, 2561, 2555, 2559, 2564,
+ 2560, 2561, 2566, 2562, 2573, 2564, 2563, 2565, 2567, 2567,
+ 2569, 2570, 2555, 2572, 2555, 2574, 2565, 2571, 2576, 2563,
+
+ 2577, 2575, 2582, 0, 2566, 2572, 2564, 2575, 2578, 2566,
+ 2576, 2579, 2569, 2570, 2580, 2567, 2580, 2569, 2570, 2571,
+ 2572, 2584, 2581, 2589, 2571, 2576, 2582, 2574, 2575, 2582,
+ 2578, 2590, 2577, 2579, 2585, 2578, 2581, 2583, 2579, 2584,
+ 2586, 2580, 2587, 2588, 2583, 2591, 2593, 2595, 2584, 2581,
+ 2597, 2598, 2585, 2593, 2595, 2589, 2588, 2596, 2586, 2603,
+ 2587, 2585, 2600, 2590, 2583, 2601, 2604, 2586, 2591, 2587,
+ 2588, 2599, 2591, 2593, 2595, 2596, 2597, 2597, 2600, 2599,
+ 2605, 2602, 2605, 2598, 2596, 2603, 2603, 2605, 2604, 2600,
+ 2601, 2607, 2601, 2604, 2608, 2609, 2611, 2599, 2599, 2602,
+
+ 2610, 2612, 2607, 2614, 2617, 2608, 2599, 2605, 2602, 2605,
+ 2613, 2616, 2610, 0, 2611, 2617, 2621, 2625, 2607, 2612,
+ 2618, 2608, 2609, 2611, 2619, 2614, 2616, 2610, 2612, 2613,
+ 2614, 2617, 2618, 2622, 2623, 2624, 2626, 2613, 2616, 2619,
+ 2621, 2623, 2627, 2621, 2625, 2628, 2630, 2618, 2632, 2633,
+ 2624, 2619, 2631, 2634, 0, 2622, 2635, 2636, 2643, 0,
+ 2622, 2623, 2624, 2626, 2637, 0, 2638, 2639, 0, 2627,
+ 2632, 2628, 2628, 2630, 2635, 2632, 2631, 2637, 2642, 2631,
+ 2641, 2633, 2639, 2635, 2636, 2634, 2640, 2644, 2641, 2645,
+ 2643, 2637, 2638, 2638, 2639, 2647, 2648, 2649, 0, 2640,
+
+ 2644, 0, 2656, 2650, 2642, 2642, 2651, 2641, 2652, 2653,
+ 2654, 2645, 2659, 2640, 2644, 2655, 2645, 2654, 2647, 2663,
+ 2648, 2667, 2647, 2648, 2649, 2650, 2652, 2653, 2651, 2656,
+ 2650, 2657, 2663, 2651, 2659, 2652, 2653, 2654, 2655, 2659,
+ 2660, 2661, 2655, 2662, 2665, 2657, 2663, 2660, 2661, 2664,
+ 2662, 2665, 2666, 2667, 2668, 0, 2669, 2671, 2657, 2670,
+ 0, 2672, 2676, 2678, 2681, 2673, 2671, 2660, 2661, 2672,
+ 2662, 2665, 2664, 2673, 2666, 2668, 2664, 2674, 2678, 2666,
+ 2679, 2668, 2669, 2669, 2671, 2670, 2670, 2675, 2672, 2676,
+ 2678, 2679, 2673, 2675, 2680, 2682, 2681, 2684, 2683, 2674,
+
+ 0, 2686, 2688, 0, 2674, 2689, 2691, 2679, 2690, 2702,
+ 2692, 2695, 2697, 2697, 2675, 2688, 2680, 2683, 2689, 2686,
+ 2694, 2680, 2684, 2695, 2684, 2683, 2696, 2682, 2686, 2688,
+ 2691, 2698, 2689, 2691, 2690, 2690, 2692, 2692, 2695, 2697,
+ 2701, 2702, 2704, 2705, 2694, 2703, 2708, 2694, 2713, 2712,
+ 2696, 0, 2716, 2696, 2723, 2710, 2725, 2698, 2698, 2713,
+ 2703, 2705, 2712, 2701, 2710, 2717, 2717, 2701, 2718, 2704,
+ 2705, 2721, 2703, 2708, 2716, 2713, 2712, 2718, 2719, 2716,
+ 2722, 2723, 2710, 2725, 2719, 2727, 2729, 2728, 2730, 2732,
+ 0, 2731, 2717, 2721, 2728, 2718, 2731, 2735, 2721, 2730,
+
+ 2734, 2738, 2722, 2743, 2736, 2719, 2747, 2722, 2734, 2740,
+ 2737, 2732, 2729, 2729, 2728, 2730, 2732, 2727, 2731, 2736,
+ 2740, 2735, 2741, 2742, 2735, 2737, 2749, 2734, 2738, 2744,
+ 2745, 2736, 2752, 2747, 2748, 2743, 2740, 2737, 2744, 2750,
+ 2741, 2752, 2745, 2754, 2742, 2755, 2756, 2750, 0, 2741,
+ 2742, 2749, 0, 2749, 2751, 2751, 2744, 2745, 2748, 2752,
+ 2758, 2748, 2751, 2759, 2760, 2757, 2750, 2762, 2756, 2754,
+ 2754, 2761, 2755, 2756, 2757, 2763, 2766, 2759, 2758, 2765,
+ 2762, 2751, 2751, 2766, 2764, 2768, 2760, 2758, 2763, 2769,
+ 2759, 2760, 2757, 2767, 2762, 2771, 2761, 2770, 2761, 2764,
+
+ 2767, 2765, 2763, 2766, 2772, 2773, 2765, 2768, 2774, 2770,
+ 2776, 2764, 2768, 2775, 2777, 2781, 2769, 2778, 2786, 2776,
+ 2767, 2779, 2771, 2774, 2770, 2780, 2782, 2787, 0, 2786,
+ 2781, 2772, 2773, 2782, 2783, 2774, 2777, 2776, 2775, 2784,
+ 2775, 2777, 2781, 2778, 2778, 2786, 2784, 2779, 2779, 2783,
+ 2785, 2780, 2780, 2782, 2787, 2788, 2785, 2789, 2790, 2791,
+ 2792, 2783, 2796, 2788, 2793, 2795, 2784, 2798, 2794, 2796,
+ 2800, 2797, 2801, 2802, 2798, 2791, 2799, 2785, 2806, 2793,
+ 2795, 2806, 2788, 2799, 2789, 2790, 2791, 2792, 2794, 2796,
+ 2801, 2793, 2795, 2797, 2798, 2794, 2805, 2800, 2797, 2801,
+
+ 2802, 2803, 2803, 2799, 2804, 2806, 2807, 2808, 2810, 2809,
+ 2805, 2804, 2811, 2810, 2812, 0, 2813, 0, 2815, 2807,
+ 2814, 2819, 0, 2805, 2809, 2808, 2819, 2822, 2803, 2812,
+ 2815, 2804, 2816, 2807, 2808, 2810, 2809, 2811, 2814, 2811,
+ 2818, 2812, 2813, 2813, 2816, 2815, 2820, 2814, 2819, 2818,
+ 2821, 2820, 2823, 2825, 2822, 0, 2823, 2824, 2828, 2816,
+ 2826, 2827, 2829, 0, 2830, 2837, 2825, 2818, 2834, 0,
+ 2836, 0, 2821, 2820, 2837, 0, 0, 2821, 0, 2823,
+ 2825, 2824, 2826, 2827, 2824, 2828, 2838, 2826, 2827, 2829,
+ 2830, 2830, 2837, 2839, 2834, 2834, 2836, 2836, 2840, 2842,
+
+ 2843, 2839, 2838, 2844, 2845, 2846, 2842, 2847, 2844, 2843,
+ 2840, 2845, 2848, 2838, 2847, 2849, 0, 2852, 2854, 2850,
+ 2839, 2855, 2849, 2846, 2851, 2840, 2842, 2843, 2850, 2858,
+ 2844, 2845, 2846, 2851, 2847, 2857, 2856, 2848, 2859, 2848,
+ 2857, 2854, 2849, 2852, 2852, 2854, 2850, 2858, 2855, 2856,
+ 2861, 2851, 2862, 2866, 0, 2863, 2858, 2864, 2865, 2867,
+ 2868, 2869, 2857, 2856, 2863, 2859, 2864, 2865, 2861, 2868,
+ 2869, 2867, 2870, 2866, 2872, 2873, 2874, 2861, 2875, 2862,
+ 2866, 2871, 2863, 2870, 2864, 2865, 2867, 2868, 2869, 2871,
+ 2878, 2876, 2880, 2881, 2882, 2873, 2889, 2872, 2876, 2870,
+
+ 2877, 2872, 2873, 2874, 2883, 2875, 2884, 2888, 2871, 2877,
+ 2885, 2878, 2887, 2883, 2890, 2884, 2886, 2878, 2876, 2880,
+ 2881, 2890, 2885, 2889, 2886, 2887, 2882, 2877, 2891, 2888,
+ 2893, 2883, 2894, 2884, 2888, 2891, 2896, 2885, 2892, 2887,
+ 2895, 2890, 0, 2886, 2897, 2892, 2893, 2895, 2894, 2898,
+ 2899, 2900, 2902, 2905, 2904, 2891, 0, 2893, 2896, 2894,
+ 2902, 2905, 2908, 2896, 2910, 2892, 2907, 2895, 2906, 2897,
+ 0, 2897, 2904, 2907, 2912, 2899, 2898, 2899, 2900, 2902,
+ 2905, 2904, 2912, 2906, 2908, 2909, 2910, 2911, 2918, 2908,
+ 2915, 2910, 2909, 2907, 2911, 2906, 2916, 2915, 2917, 2919,
+
+ 2920, 2912, 2921, 2922, 2923, 2916, 0, 2928, 2926, 2920,
+ 2924, 2919, 2909, 2930, 2911, 2918, 2923, 2915, 2929, 2922,
+ 2926, 2934, 2917, 2916, 2927, 2917, 2919, 2920, 2928, 2921,
+ 2922, 2923, 2931, 2924, 2928, 2926, 2927, 2924, 2933, 2936,
+ 2930, 2929, 2935, 2937, 2939, 2929, 2931, 2936, 2934, 2935,
+ 2933, 2927, 2941, 2938, 2942, 2943, 0, 2944, 2945, 2931,
+ 2938, 2947, 2937, 0, 2948, 2933, 2936, 2941, 2946, 2935,
+ 2937, 2939, 2942, 2953, 2949, 2951, 2946, 2959, 2943, 2941,
+ 2938, 2942, 2943, 2944, 2944, 2945, 2948, 2950, 2947, 2952,
+ 2951, 2948, 2949, 2955, 2960, 2946, 2952, 2962, 2950, 2955,
+
+ 2953, 2949, 2951, 2959, 2959, 2961, 0, 2969, 2963, 2964,
+ 2961, 2965, 2960, 2966, 2950, 2967, 2952, 2971, 2973, 2968,
+ 2955, 2960, 2963, 2964, 2962, 2965, 2979, 2976, 2978, 2971,
+ 2980, 2966, 2961, 2967, 2969, 2963, 2964, 2968, 2965, 2979,
+ 2966, 2970, 2967, 2981, 2971, 2973, 2968, 2983, 2970, 2976,
+ 2978, 2982, 2980, 2979, 2976, 2978, 2984, 2980, 2988, 2982,
+ 2986, 2990, 2981, 2991, 2989, 2983, 2992, 2993, 2970, 2994,
+ 2981, 0, 2986, 2990, 2983, 2984, 2995, 2997, 2982, 2998,
+ 2988, 2994, 3002, 2984, 2996, 2988, 2989, 2986, 2990, 2993,
+ 2991, 2989, 2996, 2992, 2993, 2999, 2994, 3003, 2995, 2998,
+
+ 3000, 3001, 0, 2995, 2997, 3005, 2998, 3004, 3008, 3000,
+ 3001, 2996, 3007, 3010, 3002, 3009, 3011, 2999, 3005, 3003,
+ 3008, 3015, 2999, 3016, 3003, 0, 3017, 3000, 3001, 3004,
+ 3014, 3017, 3005, 3018, 3004, 3008, 0, 3009, 3007, 3007,
+ 3010, 3019, 3009, 3011, 3014, 3021, 3020, 3016, 3015, 3022,
+ 3016, 3024, 3023, 3025, 3028, 3018, 3026, 3014, 3017, 3020,
+ 3018, 3027, 3029, 3019, 3032, 3025, 3031, 3027, 3019, 3024,
+ 3030, 3036, 3022, 3020, 3023, 3026, 3022, 3021, 3024, 3023,
+ 3025, 3031, 3034, 3026, 3035, 3038, 3028, 3045, 3027, 3046,
+ 3044, 3032, 3030, 3031, 3029, 3036, 3040, 3030, 3036, 3041,
+
+ 3038, 3043, 3034, 3042, 3044, 3045, 3035, 3046, 3047, 3034,
+ 3043, 3035, 3038, 3048, 3045, 3049, 3046, 3044, 3040, 3050,
+ 3053, 3041, 3054, 3040, 3055, 3042, 3041, 0, 3043, 3053,
+ 3042, 3048, 3059, 3062, 3047, 3047, 3058, 3063, 3049, 3059,
+ 3048, 3050, 3049, 3060, 3058, 3055, 3050, 3053, 3061, 3066,
+ 3060, 3055, 3068, 3064, 3054, 3067, 3061, 3063, 3072, 3059,
+ 3062, 3064, 3069, 3058, 3063, 3070, 3079, 3066, 0, 3071,
+ 3060, 0, 3075, 3067, 3069, 3061, 3066, 3078, 3068, 3068,
+ 3064, 3071, 3067, 3070, 3075, 3072, 3073, 3081, 3077, 3069,
+ 3082, 3085, 3070, 3079, 3073, 3077, 3071, 3083, 3084, 3075,
+
+ 3078, 3080, 3086, 3080, 3078, 3083, 3092, 3084, 3087, 3088,
+ 3089, 3088, 3091, 3073, 3094, 3077, 3095, 3097, 3096, 3081,
+ 3092, 3098, 3082, 3085, 3083, 3084, 3097, 3087, 3080, 3086,
+ 3091, 3099, 3089, 3092, 3098, 3087, 3088, 3089, 3100, 3091,
+ 3095, 3096, 3102, 3095, 3097, 3096, 3094, 3103, 3098, 3105,
+ 3100, 3106, 3107, 3108, 3110, 3106, 3103, 3113, 3099, 3111,
+ 3115, 3112, 0, 3117, 0, 3100, 3120, 3118, 3102, 3102,
+ 3117, 3120, 0, 0, 3103, 3113, 3105, 3119, 3106, 3107,
+ 3108, 3110, 3111, 3112, 3113, 3121, 3111, 3115, 3112, 3118,
+ 3117, 3126, 3119, 3128, 3118, 3123, 3124, 3129, 3120, 3125,
+
+ 3121, 3130, 3123, 3124, 3119, 3131, 3125, 3132, 3135, 3138,
+ 3136, 3133, 3121, 3139, 0, 3140, 3138, 3126, 3126, 3136,
+ 3128, 3132, 3123, 3124, 3129, 3133, 3125, 3141, 3130, 3131,
+ 3143, 3142, 3131, 3144, 3132, 3135, 3138, 3136, 3133, 3145,
+ 3139, 3140, 3140, 3142, 3147, 3148, 3146, 3144, 3145, 3154,
+ 3152, 3149, 3158, 3153, 3141, 3152, 3158, 3143, 3142, 3146,
+ 3144, 3155, 3157, 3159, 3160, 3161, 3145, 3157, 3162, 3163,
+ 3159, 3160, 3148, 3146, 3149, 3164, 3147, 3153, 3149, 3158,
+ 3153, 3154, 3152, 3155, 3167, 3165, 3161, 3165, 3155, 0,
+ 3159, 3160, 3161, 3166, 3157, 3170, 3172, 3173, 0, 3177,
+
+ 3162, 3163, 3175, 3176, 3175, 3180, 3179, 3164, 3178, 3178,
+ 3183, 3167, 3165, 0, 3180, 3172, 3166, 3170, 3178, 0,
+ 3166, 3173, 3170, 3172, 3173, 3177, 3177, 3176, 3179, 3175,
+ 3176, 3181, 3180, 3179, 3182, 3178, 3178, 3183, 3181, 3184,
+ 3185, 3186, 3187, 3188, 3190, 3192, 3191, 3182, 3185, 3190,
+ 3187, 3191, 3184, 3192, 3186, 3193, 0, 3194, 3181, 3195,
+ 0, 3182, 3188, 3196, 3185, 3197, 3184, 3185, 3186, 3187,
+ 3188, 3198, 3192, 3200, 3201, 3185, 3190, 3199, 3191, 3202,
+ 3202, 3201, 3193, 3194, 3194, 3195, 3195, 3203, 3199, 3196,
+ 3196, 3197, 3197, 3205, 3204, 3200, 3207, 3198, 3198, 3208,
+
+ 3200, 3201, 3206, 3213, 3199, 3203, 3202, 3204, 3214, 3209,
+ 3206, 3217, 3210, 3215, 3203, 3205, 3209, 3208, 3207, 3210,
+ 3205, 3204, 3216, 3207, 3211, 3218, 3208, 3222, 3219, 3206,
+ 3213, 3211, 3220, 3223, 3216, 3214, 3209, 3215, 3217, 3210,
+ 3215, 3220, 3224, 3225, 3227, 3228, 3218, 3230, 3229, 3216,
+ 3219, 3211, 3218, 3223, 3222, 3219, 3235, 3236, 3231, 3220,
+ 3223, 3232, 3238, 3228, 3234, 3225, 3229, 3237, 0, 3224,
+ 3225, 3227, 3228, 3234, 3230, 3229, 3231, 3240, 3239, 3232,
+ 3238, 3253, 3245, 3235, 3236, 3231, 3239, 3241, 3232, 3238,
+ 3237, 3234, 3243, 3240, 3237, 3242, 3245, 3243, 3246, 3241,
+
+ 3247, 3249, 3242, 3253, 3240, 3239, 3254, 3255, 3253, 3245,
+ 3257, 3262, 3263, 3249, 3241, 3265, 3246, 3258, 3264, 3259,
+ 3255, 3259, 3242, 3247, 3243, 3246, 3260, 3247, 3249, 3270,
+ 3258, 3270, 3271, 3254, 3255, 3260, 3264, 3257, 3262, 3263,
+ 3266, 3274, 3272, 3275, 3258, 3264, 3259, 3265, 3274, 3277,
+ 3281, 3279, 3282, 3260, 3271, 3266, 3270, 3279, 3283, 3271,
+ 3272, 3286, 3284, 0, 3277, 3289, 3294, 3266, 3274, 3272,
+ 0, 3295, 3281, 3287, 3282, 3275, 3277, 3281, 3279, 3282,
+ 3284, 3289, 3290, 3286, 3283, 3283, 3287, 3296, 3286, 3284,
+ 3291, 3304, 3289, 3294, 3292, 3297, 3290, 3292, 3295, 3298,
+
+ 3287, 3299, 3300, 3291, 3301, 3302, 3298, 3307, 3299, 3290,
+ 3300, 3305, 3301, 3297, 3296, 3306, 3308, 3291, 3313, 0,
+ 3292, 3292, 3297, 3304, 3292, 3308, 3298, 3302, 3299, 3300,
+ 3309, 3301, 3302, 3305, 3307, 3310, 3311, 3306, 3305, 3312,
+ 3315, 3310, 3306, 3308, 3314, 3309, 3314, 3317, 3312, 3322,
+ 3313, 3318, 3321, 3319, 0, 3320, 3323, 3309, 3311, 3327,
+ 3321, 3322, 3310, 3311, 0, 3325, 3312, 3315, 3323, 0,
+ 3317, 3314, 3325, 3318, 3317, 3319, 3322, 3329, 3318, 3321,
+ 3319, 3320, 3320, 3323, 3330, 3331, 3327, 3332, 3333, 3334,
+ 3336, 3329, 3325, 3335, 3344, 3338, 3337, 0, 3330, 3331,
+
+ 3334, 3335, 3338, 3340, 3329, 3345, 3333, 3341, 3349, 3336,
+ 3332, 3330, 3331, 3349, 3332, 3333, 3334, 3336, 3337, 3339,
+ 3335, 3344, 3338, 3337, 3342, 3341, 3339, 3343, 3343, 3340,
+ 3340, 3346, 3345, 3342, 3341, 3350, 3352, 3353, 3354, 3346,
+ 3349, 3356, 3358, 3368, 3360, 3361, 3339, 3356, 3350, 3364,
+ 3371, 3342, 3363, 3365, 3343, 3360, 3361, 3352, 3346, 3369,
+ 3364, 3373, 3350, 3352, 3353, 3354, 3369, 3370, 3356, 3358,
+ 3368, 3360, 3361, 3372, 3363, 3365, 3364, 3372, 3376, 3363,
+ 3365, 3374, 3371, 3377, 3378, 3370, 3369, 3380, 3373, 3374,
+ 3379, 3382, 3378, 3385, 3370, 3384, 3377, 3386, 0, 3379,
+
+ 3372, 3389, 3384, 3391, 3376, 3376, 3389, 3392, 3374, 3393,
+ 3377, 3378, 3390, 3390, 3380, 3396, 3395, 3379, 3399, 3386,
+ 3394, 3393, 3384, 3382, 3386, 3385, 3397, 3394, 3389, 3400,
+ 3391, 3396, 3403, 3398, 3392, 3395, 3393, 3400, 3402, 3390,
+ 3398, 3404, 3396, 3395, 3397, 3402, 3401, 3394, 3405, 0,
+ 3399, 0, 3406, 3397, 3407, 3417, 3400, 3409, 3408, 3403,
+ 3398, 3401, 3395, 3404, 3406, 3402, 3416, 3414, 3404, 3415,
+ 3418, 3413, 0, 3401, 3414, 3405, 3415, 3419, 3407, 3406,
+ 3420, 3407, 3408, 3409, 3409, 3408, 3413, 3417, 3416, 3423,
+ 3421, 3424, 3425, 3416, 3414, 3426, 3415, 3418, 3413, 3421,
+
+ 3427, 3419, 3429, 3426, 3419, 0, 3432, 3433, 3431, 3433,
+ 3434, 3423, 3420, 3435, 3425, 3432, 3423, 3421, 3424, 3425,
+ 3428, 3428, 3426, 3431, 3434, 3438, 3440, 3437, 3436, 3429,
+ 3428, 3441, 3427, 3432, 3433, 3431, 3436, 3434, 3437, 3442,
+ 3435, 3443, 3445, 3438, 3444, 3446, 3447, 3428, 3428, 3448,
+ 3450, 3451, 3438, 3440, 3437, 3436, 3449, 3444, 3441, 3452,
+ 3452, 3453, 3454, 3443, 3445, 3451, 3442, 3457, 3443, 3445,
+ 3458, 3444, 3446, 3447, 3449, 3460, 3448, 3450, 3451, 3461,
+ 3464, 3458, 3466, 3449, 3454, 3467, 3452, 3466, 3464, 3454,
+ 3467, 3468, 3472, 3453, 3457, 3469, 3479, 3458, 3470, 3468,
+
+ 3469, 3475, 3460, 3473, 3473, 3474, 3461, 3464, 3477, 3466,
+ 3480, 3478, 3467, 3474, 3475, 3477, 3481, 3483, 3468, 3472,
+ 3484, 3492, 3469, 3479, 3470, 3470, 3483, 3485, 3475, 3478,
+ 3473, 3487, 3474, 3486, 3485, 3477, 3491, 3480, 3478, 3481,
+ 3488, 3486, 3491, 3481, 3483, 3494, 3495, 3497, 3492, 3500,
+ 3498, 3496, 3484, 3487, 3485, 3499, 0, 0, 3487, 3501,
+ 3486, 3505, 3488, 3491, 3496, 3498, 0, 3488, 3495, 3506,
+ 0, 3509, 3494, 3495, 3499, 0, 3500, 3498, 3496, 3497,
+ 3503, 3501, 3499, 3507, 3505, 3508, 3501, 3503, 3505, 3510,
+ 3507, 3506, 3508, 3509, 3511, 3515, 3506, 3512, 3509, 3513,
+
+ 3516, 0, 3521, 3528, 3510, 0, 3512, 3503, 3516, 3511,
+ 3507, 3517, 3508, 3521, 3515, 3524, 3510, 0, 3517, 3520,
+ 3513, 3511, 3515, 3518, 3512, 3526, 3513, 3516, 3520, 3521,
+ 3518, 3522, 3522, 3523, 3529, 3528, 3527, 3524, 3517, 3523,
+ 3532, 3522, 3524, 3527, 3531, 3537, 3520, 3526, 3533, 3538,
+ 3518, 3531, 3526, 3543, 3539, 3545, 3529, 3546, 3522, 3522,
+ 3523, 3529, 3533, 3527, 3532, 3543, 3547, 3532, 3548, 3553,
+ 3556, 3531, 3537, 3550, 3547, 3533, 3538, 3539, 3558, 3546,
+ 3543, 3539, 3545, 3562, 3546, 3550, 3554, 3554, 3555, 3555,
+ 3557, 3557, 0, 3547, 3560, 3548, 3553, 3556, 3563, 3564,
+
+ 3550, 3558, 3561, 3567, 3569, 3558, 3568, 3563, 0, 3572,
+ 3562, 3569, 3564, 3571, 3573, 3554, 3560, 3555, 3578, 3557,
+ 3561, 3560, 3577, 3573, 3577, 3563, 3564, 3570, 3579, 3561,
+ 3567, 3569, 3568, 3568, 3570, 3571, 3572, 3574, 3578, 3580,
+ 3571, 3573, 3584, 3583, 3574, 3578, 3581, 3586, 3589, 3577,
+ 3585, 3579, 3583, 3587, 3570, 3579, 3588, 3580, 3581, 3590,
+ 3591, 3597, 3594, 3592, 3574, 0, 3580, 3584, 3592, 3584,
+ 3583, 3587, 3585, 3581, 3586, 3589, 3593, 3585, 3595, 3599,
+ 3587, 3595, 3588, 3588, 3594, 3601, 3590, 3591, 3593, 3594,
+ 3592, 3599, 3596, 3597, 3602, 3600, 3595, 3596, 3598, 3604,
+
+ 3598, 3600, 3603, 3593, 3605, 3595, 3599, 3601, 3595, 0,
+ 3603, 3606, 3601, 3607, 3608, 3609, 3602, 3610, 3613, 3616,
+ 3614, 3602, 3600, 3621, 3596, 3598, 3604, 3609, 3619, 3603,
+ 3617, 3622, 3606, 3614, 3623, 3624, 3605, 3619, 3606, 3610,
+ 3607, 3608, 3609, 3626, 3610, 3613, 3616, 3614, 3617, 3627,
+ 3621, 3628, 3629, 3630, 3630, 3619, 3632, 3617, 3622, 3633,
+ 3635, 3623, 3624, 3636, 3638, 3640, 3641, 3637, 3643, 0,
+ 3626, 3638, 3644, 0, 3632, 3645, 3627, 3640, 3628, 3629,
+ 3630, 3636, 3637, 3632, 3644, 3646, 3633, 3635, 3642, 3645,
+ 3636, 3638, 3640, 3641, 3637, 3643, 3642, 3647, 3648, 3644,
+
+ 3646, 3649, 3645, 3652, 3651, 3656, 3664, 0, 3657, 3658,
+ 3659, 3659, 3646, 3648, 3660, 3642, 3651, 3657, 3663, 0,
+ 3661, 3665, 3666, 3647, 3647, 3648, 0, 3656, 3649, 3661,
+ 3652, 3651, 3656, 3658, 3665, 3657, 3658, 3659, 3664, 3669,
+ 3660, 3660, 3663, 3667, 3666, 3663, 3668, 3661, 3665, 3666,
+ 3669, 3667, 3675, 3671, 3672, 3668, 3676, 0, 3678, 3680,
+ 3680, 0, 3681, 3694, 3691, 3690, 3669, 3695, 3676, 3681,
+ 3667, 3696, 3672, 3668, 3671, 3675, 3697, 3694, 3699, 3675,
+ 3671, 3672, 3702, 3676, 3678, 3678, 3680, 3690, 3691, 3681,
+ 3694, 3691, 3690, 3701, 3695, 3703, 3705, 3701, 3696, 3704,
+
+ 3702, 3707, 3709, 3697, 3715, 3699, 3704, 0, 3705, 3702,
+ 3712, 3710, 3714, 3711, 3707, 3710, 3713, 3717, 3703, 3716,
+ 3701, 0, 3703, 3705, 3714, 3717, 3704, 3718, 3707, 3711,
+ 3715, 3715, 3712, 3716, 3709, 3723, 3718, 3712, 3710, 3714,
+ 3711, 3713, 3719, 3713, 3717, 3720, 3716, 3720, 3721, 3722,
+ 3723, 3724, 3725, 3719, 3718, 3726, 3728, 3729, 3725, 3727,
+ 3721, 3730, 3723, 3731, 3728, 3738, 3741, 3722, 3730, 3719,
+ 3726, 3743, 3720, 3724, 3736, 3721, 3722, 3739, 3724, 3725,
+ 3742, 3727, 3726, 3728, 3729, 3731, 3727, 3736, 3730, 3737,
+ 3731, 3740, 3738, 3741, 3744, 3739, 3737, 3743, 3743, 3745,
+
+ 3746, 3736, 3742, 3747, 3739, 3748, 3749, 3742, 3746, 3750,
+ 3747, 3751, 3752, 3751, 3753, 3740, 3737, 3757, 3740, 0,
+ 3756, 3744, 3754, 3759, 3752, 3755, 3745, 3746, 3749, 3748,
+ 3747, 3750, 3748, 3749, 3758, 3754, 3750, 3760, 3751, 3752,
+ 3755, 3758, 3756, 3761, 3757, 3763, 3753, 3756, 3764, 3754,
+ 3759, 3765, 3755, 3766, 3768, 3769, 3775, 3777, 3772, 3765,
+ 3764, 3758, 3771, 0, 3760, 3771, 3768, 3772, 3776, 3778,
+ 3761, 3769, 3763, 3779, 3780, 3764, 3777, 3778, 3765, 0,
+ 3766, 3768, 3769, 3775, 3777, 3772, 3781, 3782, 3784, 3771,
+ 3783, 3785, 3787, 3793, 3776, 3776, 3778, 3792, 3783, 3781,
+
+ 3793, 3782, 3796, 3792, 3798, 3779, 3780, 0, 3795, 3800,
+ 3784, 3797, 3801, 3781, 3782, 3784, 3800, 3783, 3785, 3787,
+ 3793, 3795, 3797, 3803, 3792, 3802, 3804, 3798, 3808, 3796,
+ 3818, 3798, 3806, 3802, 3801, 3795, 3800, 3803, 3797, 3801,
+ 3804, 3805, 3807, 3815, 3811, 3816, 3824, 3812, 0, 3805,
+ 3803, 3811, 3802, 3804, 3806, 3808, 3812, 3813, 3817, 3806,
+ 3819, 3815, 3818, 3826, 3807, 3813, 3820, 3821, 3805, 3807,
+ 3815, 3811, 3816, 3822, 3812, 3823, 3827, 3828, 3824, 3833,
+ 3817, 3836, 3829, 3823, 3813, 3817, 3819, 3819, 3820, 3821,
+ 3826, 3829, 3831, 3820, 3821, 3822, 3840, 3832, 3827, 3833,
+
+ 3822, 3843, 3823, 3827, 3828, 3832, 3833, 3838, 3834, 3829,
+ 3835, 3842, 3837, 3836, 3844, 3831, 3834, 3844, 3835, 3831,
+ 3837, 3838, 3840, 3840, 3832, 3845, 0, 3849, 3843, 3848,
+ 3854, 3854, 3844, 3842, 3838, 3834, 3850, 3835, 3842, 3837,
+ 3846, 3844, 3847, 3848, 3844, 3851, 3860, 3845, 3846, 3855,
+ 3847, 3852, 3845, 3849, 3849, 3857, 3848, 3854, 3850, 3851,
+ 3856, 0, 3858, 3850, 3859, 3862, 3860, 3846, 3856, 3847,
+ 3863, 3861, 3851, 3860, 3852, 3855, 3855, 3864, 3852, 3861,
+ 3865, 3857, 3857, 3866, 3870, 3874, 3859, 3856, 3858, 3858,
+ 0, 3859, 3862, 3867, 3868, 3869, 3877, 3863, 3861, 3864,
+
+ 3871, 3875, 3878, 3869, 3864, 3865, 3870, 3865, 3871, 3875,
+ 3866, 3870, 3874, 3867, 3868, 3881, 3883, 3879, 3877, 3886,
+ 3867, 3868, 3869, 3877, 3878, 3879, 3880, 3871, 3875, 3878,
+ 3884, 3885, 3887, 3890, 3880, 3888, 3891, 0, 3884, 3885,
+ 0, 3881, 3881, 3883, 3879, 3886, 3886, 3892, 3894, 3897,
+ 3900, 3901, 0, 3880, 0, 3888, 3898, 3884, 3885, 3887,
+ 3890, 3899, 3888, 3891, 3898, 0, 0, 3892, 0, 3899,
+ 3894, 3897, 0, 0, 3892, 3894, 3897, 3900, 3901, 0,
+ 0, 0, 0, 3898, 0, 0, 0, 0, 3899, 3905,
+ 3905, 3905, 3905, 3905, 3905, 3905, 3906, 3906, 3906, 3906,
+
+ 3906, 3906, 3906, 3907, 3907, 3907, 3907, 3907, 3907, 3907,
+ 3908, 3908, 3908, 3908, 3908, 3908, 3908, 3909, 3909, 3909,
+ 3909, 3909, 3909, 3909, 3910, 3910, 3910, 3910, 3910, 3910,
+ 3910, 3911, 3911, 3911, 3911, 3911, 3911, 3911, 3913, 3913,
+ 0, 3913, 3913, 3913, 3913, 3914, 3914, 0, 0, 0,
+ 3914, 3914, 3915, 3915, 0, 0, 3915, 0, 3915, 3916,
+ 0, 0, 0, 0, 0, 3916, 3917, 3917, 0, 0,
+ 0, 3917, 3917, 3918, 0, 0, 0, 0, 0, 3918,
+ 3919, 3919, 0, 3919, 3919, 3919, 3919, 3920, 0, 0,
+ 0, 0, 0, 3920, 3921, 3921, 0, 0, 0, 3921,
+
+ 3921, 3922, 3922, 0, 3922, 3922, 3922, 3922, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904, 3904,
+ 3904, 3904, 3904, 3904, 3904
} ;
static yy_state_type yy_last_accepting_state;
@@ -4295,7 +4381,7 @@ static void config_end_include(void)
}
#endif
-#line 4296 "<stdout>"
+#line 4382 "<stdout>"
#define YY_NO_INPUT 1
#line 191 "util/configlexer.lex"
#ifndef YY_NO_UNPUT
@@ -4304,9 +4390,9 @@ static void config_end_include(void)
#ifndef YY_NO_INPUT
#define YY_NO_INPUT 1
#endif
-#line 4305 "<stdout>"
+#line 4391 "<stdout>"
-#line 4307 "<stdout>"
+#line 4393 "<stdout>"
#define INITIAL 0
#define quotedstring 1
@@ -4530,7 +4616,7 @@ YY_DECL
{
#line 211 "util/configlexer.lex"
-#line 4531 "<stdout>"
+#line 4617 "<stdout>"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -4563,13 +4649,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 3816 )
+ if ( yy_current_state >= 3905 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 10847 );
+ while ( yy_base[yy_current_state] != 11109 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -5024,122 +5110,122 @@ YY_RULE_SETUP
case 86:
YY_RULE_SETUP
#line 300 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHE_MIN_TTL) }
+{ YDVAR(1, VAR_CACHE_MIN_NEGATIVE_TTL) }
YY_BREAK
case 87:
YY_RULE_SETUP
#line 301 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_HOST_TTL) }
+{ YDVAR(1, VAR_CACHE_MIN_TTL) }
YY_BREAK
case 88:
YY_RULE_SETUP
#line 302 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_LAME_TTL) }
+{ YDVAR(1, VAR_INFRA_HOST_TTL) }
YY_BREAK
case 89:
YY_RULE_SETUP
#line 303 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_CACHE_SLABS) }
+{ YDVAR(1, VAR_INFRA_LAME_TTL) }
YY_BREAK
case 90:
YY_RULE_SETUP
#line 304 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) }
+{ YDVAR(1, VAR_INFRA_CACHE_SLABS) }
YY_BREAK
case 91:
YY_RULE_SETUP
#line 305 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) }
+{ YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) }
YY_BREAK
case 92:
YY_RULE_SETUP
#line 306 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_CACHE_MIN_RTT) }
+{ YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) }
YY_BREAK
case 93:
YY_RULE_SETUP
#line 307 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_CACHE_MAX_RTT) }
+{ YDVAR(1, VAR_INFRA_CACHE_MIN_RTT) }
YY_BREAK
case 94:
YY_RULE_SETUP
#line 308 "util/configlexer.lex"
-{ YDVAR(1, VAR_INFRA_KEEP_PROBING) }
+{ YDVAR(1, VAR_INFRA_CACHE_MAX_RTT) }
YY_BREAK
case 95:
YY_RULE_SETUP
#line 309 "util/configlexer.lex"
-{ YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) }
+{ YDVAR(1, VAR_INFRA_KEEP_PROBING) }
YY_BREAK
case 96:
YY_RULE_SETUP
#line 310 "util/configlexer.lex"
-{ YDVAR(1, VAR_JOSTLE_TIMEOUT) }
+{ YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) }
YY_BREAK
case 97:
YY_RULE_SETUP
#line 311 "util/configlexer.lex"
-{ YDVAR(1, VAR_DELAY_CLOSE) }
+{ YDVAR(1, VAR_JOSTLE_TIMEOUT) }
YY_BREAK
case 98:
YY_RULE_SETUP
#line 312 "util/configlexer.lex"
-{ YDVAR(1, VAR_UDP_CONNECT) }
+{ YDVAR(1, VAR_DELAY_CLOSE) }
YY_BREAK
case 99:
YY_RULE_SETUP
#line 313 "util/configlexer.lex"
-{ YDVAR(1, VAR_TARGET_FETCH_POLICY) }
+{ YDVAR(1, VAR_UDP_CONNECT) }
YY_BREAK
case 100:
YY_RULE_SETUP
#line 314 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) }
+{ YDVAR(1, VAR_TARGET_FETCH_POLICY) }
YY_BREAK
case 101:
YY_RULE_SETUP
#line 315 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_LARGE_QUERIES) }
+{ YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) }
YY_BREAK
case 102:
YY_RULE_SETUP
#line 316 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_GLUE) }
+{ YDVAR(1, VAR_HARDEN_LARGE_QUERIES) }
YY_BREAK
case 103:
YY_RULE_SETUP
#line 317 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) }
+{ YDVAR(1, VAR_HARDEN_GLUE) }
YY_BREAK
case 104:
YY_RULE_SETUP
#line 318 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) }
+{ YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) }
YY_BREAK
case 105:
YY_RULE_SETUP
#line 319 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_REFERRAL_PATH) }
+{ YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) }
YY_BREAK
case 106:
YY_RULE_SETUP
#line 320 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_ALGO_DOWNGRADE) }
+{ YDVAR(1, VAR_HARDEN_REFERRAL_PATH) }
YY_BREAK
case 107:
YY_RULE_SETUP
#line 321 "util/configlexer.lex"
-{ YDVAR(1, VAR_HARDEN_UNKNOWN_ADDITIONAL) }
+{ YDVAR(1, VAR_HARDEN_ALGO_DOWNGRADE) }
YY_BREAK
case 108:
YY_RULE_SETUP
#line 322 "util/configlexer.lex"
-{ YDVAR(1, VAR_USE_CAPS_FOR_ID) }
+{ YDVAR(1, VAR_HARDEN_UNKNOWN_ADDITIONAL) }
YY_BREAK
case 109:
YY_RULE_SETUP
#line 323 "util/configlexer.lex"
-{ YDVAR(1, VAR_CAPS_WHITELIST) }
+{ YDVAR(1, VAR_USE_CAPS_FOR_ID) }
YY_BREAK
case 110:
YY_RULE_SETUP
@@ -5149,72 +5235,72 @@ YY_RULE_SETUP
case 111:
YY_RULE_SETUP
#line 325 "util/configlexer.lex"
-{ YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) }
+{ YDVAR(1, VAR_CAPS_WHITELIST) }
YY_BREAK
case 112:
YY_RULE_SETUP
#line 326 "util/configlexer.lex"
-{ YDVAR(1, VAR_PRIVATE_ADDRESS) }
+{ YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) }
YY_BREAK
case 113:
YY_RULE_SETUP
#line 327 "util/configlexer.lex"
-{ YDVAR(1, VAR_PRIVATE_DOMAIN) }
+{ YDVAR(1, VAR_PRIVATE_ADDRESS) }
YY_BREAK
case 114:
YY_RULE_SETUP
#line 328 "util/configlexer.lex"
-{ YDVAR(1, VAR_PREFETCH_KEY) }
+{ YDVAR(1, VAR_PRIVATE_DOMAIN) }
YY_BREAK
case 115:
YY_RULE_SETUP
#line 329 "util/configlexer.lex"
-{ YDVAR(1, VAR_PREFETCH) }
+{ YDVAR(1, VAR_PREFETCH_KEY) }
YY_BREAK
case 116:
YY_RULE_SETUP
#line 330 "util/configlexer.lex"
-{ YDVAR(1, VAR_DENY_ANY) }
+{ YDVAR(1, VAR_PREFETCH) }
YY_BREAK
case 117:
YY_RULE_SETUP
#line 331 "util/configlexer.lex"
-{ YDVAR(0, VAR_STUB_ZONE) }
+{ YDVAR(1, VAR_DENY_ANY) }
YY_BREAK
case 118:
YY_RULE_SETUP
#line 332 "util/configlexer.lex"
-{ YDVAR(1, VAR_NAME) }
+{ YDVAR(0, VAR_STUB_ZONE) }
YY_BREAK
case 119:
YY_RULE_SETUP
#line 333 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_ADDR) }
+{ YDVAR(1, VAR_NAME) }
YY_BREAK
case 120:
YY_RULE_SETUP
#line 334 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_HOST) }
+{ YDVAR(1, VAR_STUB_ADDR) }
YY_BREAK
case 121:
YY_RULE_SETUP
#line 335 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_PRIME) }
+{ YDVAR(1, VAR_STUB_HOST) }
YY_BREAK
case 122:
YY_RULE_SETUP
#line 336 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_FIRST) }
+{ YDVAR(1, VAR_STUB_PRIME) }
YY_BREAK
case 123:
YY_RULE_SETUP
#line 337 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_NO_CACHE) }
+{ YDVAR(1, VAR_STUB_FIRST) }
YY_BREAK
case 124:
YY_RULE_SETUP
#line 338 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_SSL_UPSTREAM) }
+{ YDVAR(1, VAR_STUB_NO_CACHE) }
YY_BREAK
case 125:
YY_RULE_SETUP
@@ -5224,37 +5310,37 @@ YY_RULE_SETUP
case 126:
YY_RULE_SETUP
#line 340 "util/configlexer.lex"
-{ YDVAR(1, VAR_STUB_TCP_UPSTREAM) }
+{ YDVAR(1, VAR_STUB_SSL_UPSTREAM) }
YY_BREAK
case 127:
YY_RULE_SETUP
#line 341 "util/configlexer.lex"
-{ YDVAR(0, VAR_FORWARD_ZONE) }
+{ YDVAR(1, VAR_STUB_TCP_UPSTREAM) }
YY_BREAK
case 128:
YY_RULE_SETUP
#line 342 "util/configlexer.lex"
-{ YDVAR(1, VAR_FORWARD_ADDR) }
+{ YDVAR(0, VAR_FORWARD_ZONE) }
YY_BREAK
case 129:
YY_RULE_SETUP
#line 343 "util/configlexer.lex"
-{ YDVAR(1, VAR_FORWARD_HOST) }
+{ YDVAR(1, VAR_FORWARD_ADDR) }
YY_BREAK
case 130:
YY_RULE_SETUP
#line 344 "util/configlexer.lex"
-{ YDVAR(1, VAR_FORWARD_FIRST) }
+{ YDVAR(1, VAR_FORWARD_HOST) }
YY_BREAK
case 131:
YY_RULE_SETUP
#line 345 "util/configlexer.lex"
-{ YDVAR(1, VAR_FORWARD_NO_CACHE) }
+{ YDVAR(1, VAR_FORWARD_FIRST) }
YY_BREAK
case 132:
YY_RULE_SETUP
#line 346 "util/configlexer.lex"
-{ YDVAR(1, VAR_FORWARD_SSL_UPSTREAM) }
+{ YDVAR(1, VAR_FORWARD_NO_CACHE) }
YY_BREAK
case 133:
YY_RULE_SETUP
@@ -5264,57 +5350,57 @@ YY_RULE_SETUP
case 134:
YY_RULE_SETUP
#line 348 "util/configlexer.lex"
-{ YDVAR(1, VAR_FORWARD_TCP_UPSTREAM) }
+{ YDVAR(1, VAR_FORWARD_SSL_UPSTREAM) }
YY_BREAK
case 135:
YY_RULE_SETUP
#line 349 "util/configlexer.lex"
-{ YDVAR(0, VAR_AUTH_ZONE) }
+{ YDVAR(1, VAR_FORWARD_TCP_UPSTREAM) }
YY_BREAK
case 136:
YY_RULE_SETUP
#line 350 "util/configlexer.lex"
-{ YDVAR(0, VAR_RPZ) }
+{ YDVAR(0, VAR_AUTH_ZONE) }
YY_BREAK
case 137:
YY_RULE_SETUP
#line 351 "util/configlexer.lex"
-{ YDVAR(1, VAR_TAGS) }
+{ YDVAR(0, VAR_RPZ) }
YY_BREAK
case 138:
YY_RULE_SETUP
#line 352 "util/configlexer.lex"
-{ YDVAR(1, VAR_RPZ_ACTION_OVERRIDE) }
+{ YDVAR(1, VAR_TAGS) }
YY_BREAK
case 139:
YY_RULE_SETUP
#line 353 "util/configlexer.lex"
-{ YDVAR(1, VAR_RPZ_CNAME_OVERRIDE) }
+{ YDVAR(1, VAR_RPZ_ACTION_OVERRIDE) }
YY_BREAK
case 140:
YY_RULE_SETUP
#line 354 "util/configlexer.lex"
-{ YDVAR(1, VAR_RPZ_LOG) }
+{ YDVAR(1, VAR_RPZ_CNAME_OVERRIDE) }
YY_BREAK
case 141:
YY_RULE_SETUP
#line 355 "util/configlexer.lex"
-{ YDVAR(1, VAR_RPZ_LOG_NAME) }
+{ YDVAR(1, VAR_RPZ_LOG) }
YY_BREAK
case 142:
YY_RULE_SETUP
#line 356 "util/configlexer.lex"
-{ YDVAR(1, VAR_RPZ_SIGNAL_NXDOMAIN_RA) }
+{ YDVAR(1, VAR_RPZ_LOG_NAME) }
YY_BREAK
case 143:
YY_RULE_SETUP
#line 357 "util/configlexer.lex"
-{ YDVAR(1, VAR_ZONEFILE) }
+{ YDVAR(1, VAR_RPZ_SIGNAL_NXDOMAIN_RA) }
YY_BREAK
case 144:
YY_RULE_SETUP
#line 358 "util/configlexer.lex"
-{ YDVAR(1, VAR_MASTER) }
+{ YDVAR(1, VAR_ZONEFILE) }
YY_BREAK
case 145:
YY_RULE_SETUP
@@ -5324,1104 +5410,1139 @@ YY_RULE_SETUP
case 146:
YY_RULE_SETUP
#line 360 "util/configlexer.lex"
-{ YDVAR(1, VAR_URL) }
+{ YDVAR(1, VAR_MASTER) }
YY_BREAK
case 147:
YY_RULE_SETUP
#line 361 "util/configlexer.lex"
-{ YDVAR(1, VAR_ALLOW_NOTIFY) }
+{ YDVAR(1, VAR_URL) }
YY_BREAK
case 148:
YY_RULE_SETUP
#line 362 "util/configlexer.lex"
-{ YDVAR(1, VAR_FOR_DOWNSTREAM) }
+{ YDVAR(1, VAR_ALLOW_NOTIFY) }
YY_BREAK
case 149:
YY_RULE_SETUP
#line 363 "util/configlexer.lex"
-{ YDVAR(1, VAR_FOR_UPSTREAM) }
+{ YDVAR(1, VAR_FOR_DOWNSTREAM) }
YY_BREAK
case 150:
YY_RULE_SETUP
#line 364 "util/configlexer.lex"
-{ YDVAR(1, VAR_FALLBACK_ENABLED) }
+{ YDVAR(1, VAR_FOR_UPSTREAM) }
YY_BREAK
case 151:
YY_RULE_SETUP
#line 365 "util/configlexer.lex"
-{ YDVAR(0, VAR_VIEW) }
+{ YDVAR(1, VAR_FALLBACK_ENABLED) }
YY_BREAK
case 152:
YY_RULE_SETUP
#line 366 "util/configlexer.lex"
-{ YDVAR(1, VAR_VIEW_FIRST) }
+{ YDVAR(0, VAR_VIEW) }
YY_BREAK
case 153:
YY_RULE_SETUP
#line 367 "util/configlexer.lex"
-{ YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
+{ YDVAR(1, VAR_VIEW_FIRST) }
YY_BREAK
case 154:
YY_RULE_SETUP
#line 368 "util/configlexer.lex"
-{ YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
+{ YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
YY_BREAK
case 155:
YY_RULE_SETUP
#line 369 "util/configlexer.lex"
-{ YDVAR(2, VAR_ACCESS_CONTROL) }
+{ YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
YY_BREAK
case 156:
YY_RULE_SETUP
#line 370 "util/configlexer.lex"
-{ YDVAR(2, VAR_INTERFACE_ACTION) }
+{ YDVAR(2, VAR_ACCESS_CONTROL) }
YY_BREAK
case 157:
YY_RULE_SETUP
#line 371 "util/configlexer.lex"
-{ YDVAR(1, VAR_SEND_CLIENT_SUBNET) }
+{ YDVAR(2, VAR_INTERFACE_ACTION) }
YY_BREAK
case 158:
YY_RULE_SETUP
#line 372 "util/configlexer.lex"
-{ YDVAR(1, VAR_CLIENT_SUBNET_ZONE) }
+{ YDVAR(1, VAR_SEND_CLIENT_SUBNET) }
YY_BREAK
case 159:
YY_RULE_SETUP
#line 373 "util/configlexer.lex"
-{ YDVAR(1, VAR_CLIENT_SUBNET_ALWAYS_FORWARD) }
+{ YDVAR(1, VAR_CLIENT_SUBNET_ZONE) }
YY_BREAK
case 160:
YY_RULE_SETUP
#line 374 "util/configlexer.lex"
-{ YDVAR(1, VAR_CLIENT_SUBNET_OPCODE) }
+{ YDVAR(1, VAR_CLIENT_SUBNET_ALWAYS_FORWARD) }
YY_BREAK
case 161:
YY_RULE_SETUP
#line 375 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_CLIENT_SUBNET_IPV4) }
+{ YDVAR(1, VAR_CLIENT_SUBNET_OPCODE) }
YY_BREAK
case 162:
YY_RULE_SETUP
#line 376 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_CLIENT_SUBNET_IPV6) }
+{ YDVAR(1, VAR_MAX_CLIENT_SUBNET_IPV4) }
YY_BREAK
case 163:
YY_RULE_SETUP
#line 377 "util/configlexer.lex"
-{ YDVAR(1, VAR_MIN_CLIENT_SUBNET_IPV4) }
+{ YDVAR(1, VAR_MAX_CLIENT_SUBNET_IPV6) }
YY_BREAK
case 164:
YY_RULE_SETUP
#line 378 "util/configlexer.lex"
-{ YDVAR(1, VAR_MIN_CLIENT_SUBNET_IPV6) }
+{ YDVAR(1, VAR_MIN_CLIENT_SUBNET_IPV4) }
YY_BREAK
case 165:
YY_RULE_SETUP
#line 379 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_ECS_TREE_SIZE_IPV4) }
+{ YDVAR(1, VAR_MIN_CLIENT_SUBNET_IPV6) }
YY_BREAK
case 166:
YY_RULE_SETUP
#line 380 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_ECS_TREE_SIZE_IPV6) }
+{ YDVAR(1, VAR_MAX_ECS_TREE_SIZE_IPV4) }
YY_BREAK
case 167:
YY_RULE_SETUP
#line 381 "util/configlexer.lex"
-{ YDVAR(1, VAR_HIDE_IDENTITY) }
+{ YDVAR(1, VAR_MAX_ECS_TREE_SIZE_IPV6) }
YY_BREAK
case 168:
YY_RULE_SETUP
#line 382 "util/configlexer.lex"
-{ YDVAR(1, VAR_HIDE_VERSION) }
+{ YDVAR(1, VAR_HIDE_IDENTITY) }
YY_BREAK
case 169:
YY_RULE_SETUP
#line 383 "util/configlexer.lex"
-{ YDVAR(1, VAR_HIDE_TRUSTANCHOR) }
+{ YDVAR(1, VAR_HIDE_VERSION) }
YY_BREAK
case 170:
YY_RULE_SETUP
#line 384 "util/configlexer.lex"
-{ YDVAR(1, VAR_HIDE_HTTP_USER_AGENT) }
+{ YDVAR(1, VAR_HIDE_TRUSTANCHOR) }
YY_BREAK
case 171:
YY_RULE_SETUP
#line 385 "util/configlexer.lex"
-{ YDVAR(1, VAR_IDENTITY) }
+{ YDVAR(1, VAR_HIDE_HTTP_USER_AGENT) }
YY_BREAK
case 172:
YY_RULE_SETUP
#line 386 "util/configlexer.lex"
-{ YDVAR(1, VAR_VERSION) }
+{ YDVAR(1, VAR_IDENTITY) }
YY_BREAK
case 173:
YY_RULE_SETUP
#line 387 "util/configlexer.lex"
-{ YDVAR(1, VAR_HTTP_USER_AGENT) }
+{ YDVAR(1, VAR_VERSION) }
YY_BREAK
case 174:
YY_RULE_SETUP
#line 388 "util/configlexer.lex"
-{ YDVAR(1, VAR_MODULE_CONF) }
+{ YDVAR(1, VAR_HTTP_USER_AGENT) }
YY_BREAK
case 175:
YY_RULE_SETUP
#line 389 "util/configlexer.lex"
-{ YDVAR(1, VAR_DLV_ANCHOR) }
+{ YDVAR(1, VAR_MODULE_CONF) }
YY_BREAK
case 176:
YY_RULE_SETUP
#line 390 "util/configlexer.lex"
-{ YDVAR(1, VAR_DLV_ANCHOR_FILE) }
+{ YDVAR(1, VAR_DLV_ANCHOR) }
YY_BREAK
case 177:
YY_RULE_SETUP
#line 391 "util/configlexer.lex"
-{ YDVAR(1, VAR_TRUST_ANCHOR_FILE) }
+{ YDVAR(1, VAR_DLV_ANCHOR_FILE) }
YY_BREAK
case 178:
YY_RULE_SETUP
#line 392 "util/configlexer.lex"
-{ YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) }
+{ YDVAR(1, VAR_TRUST_ANCHOR_FILE) }
YY_BREAK
case 179:
YY_RULE_SETUP
#line 393 "util/configlexer.lex"
-{ YDVAR(1, VAR_TRUSTED_KEYS_FILE) }
+{ YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) }
YY_BREAK
case 180:
YY_RULE_SETUP
#line 394 "util/configlexer.lex"
-{ YDVAR(1, VAR_TRUST_ANCHOR) }
+{ YDVAR(1, VAR_TRUSTED_KEYS_FILE) }
YY_BREAK
case 181:
YY_RULE_SETUP
#line 395 "util/configlexer.lex"
-{ YDVAR(1, VAR_TRUST_ANCHOR_SIGNALING) }
+{ YDVAR(1, VAR_TRUST_ANCHOR) }
YY_BREAK
case 182:
YY_RULE_SETUP
#line 396 "util/configlexer.lex"
-{ YDVAR(1, VAR_ROOT_KEY_SENTINEL) }
+{ YDVAR(1, VAR_TRUST_ANCHOR_SIGNALING) }
YY_BREAK
case 183:
YY_RULE_SETUP
#line 397 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_OVERRIDE_DATE) }
+{ YDVAR(1, VAR_ROOT_KEY_SENTINEL) }
YY_BREAK
case 184:
YY_RULE_SETUP
#line 398 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_SIG_SKEW_MIN) }
+{ YDVAR(1, VAR_VAL_OVERRIDE_DATE) }
YY_BREAK
case 185:
YY_RULE_SETUP
#line 399 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_SIG_SKEW_MAX) }
+{ YDVAR(1, VAR_VAL_SIG_SKEW_MIN) }
YY_BREAK
case 186:
YY_RULE_SETUP
#line 400 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_MAX_RESTART) }
+{ YDVAR(1, VAR_VAL_SIG_SKEW_MAX) }
YY_BREAK
case 187:
YY_RULE_SETUP
#line 401 "util/configlexer.lex"
-{ YDVAR(1, VAR_BOGUS_TTL) }
+{ YDVAR(1, VAR_VAL_MAX_RESTART) }
YY_BREAK
case 188:
YY_RULE_SETUP
#line 402 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) }
+{ YDVAR(1, VAR_BOGUS_TTL) }
YY_BREAK
case 189:
YY_RULE_SETUP
#line 403 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_PERMISSIVE_MODE) }
+{ YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) }
YY_BREAK
case 190:
YY_RULE_SETUP
#line 404 "util/configlexer.lex"
-{ YDVAR(1, VAR_AGGRESSIVE_NSEC) }
+{ YDVAR(1, VAR_VAL_PERMISSIVE_MODE) }
YY_BREAK
case 191:
YY_RULE_SETUP
#line 405 "util/configlexer.lex"
-{ YDVAR(1, VAR_IGNORE_CD_FLAG) }
+{ YDVAR(1, VAR_AGGRESSIVE_NSEC) }
YY_BREAK
case 192:
YY_RULE_SETUP
#line 406 "util/configlexer.lex"
-{ YDVAR(1, VAR_DISABLE_EDNS_DO) }
+{ YDVAR(1, VAR_IGNORE_CD_FLAG) }
YY_BREAK
case 193:
YY_RULE_SETUP
#line 407 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVE_EXPIRED) }
+{ YDVAR(1, VAR_DISABLE_EDNS_DO) }
YY_BREAK
case 194:
YY_RULE_SETUP
#line 408 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVE_EXPIRED_TTL) }
+{ YDVAR(1, VAR_SERVE_EXPIRED) }
YY_BREAK
case 195:
YY_RULE_SETUP
#line 409 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVE_EXPIRED_TTL_RESET) }
+{ YDVAR(1, VAR_SERVE_EXPIRED_TTL) }
YY_BREAK
case 196:
YY_RULE_SETUP
#line 410 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVE_EXPIRED_REPLY_TTL) }
+{ YDVAR(1, VAR_SERVE_EXPIRED_TTL_RESET) }
YY_BREAK
case 197:
YY_RULE_SETUP
#line 411 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVE_EXPIRED_CLIENT_TIMEOUT) }
+{ YDVAR(1, VAR_SERVE_EXPIRED_REPLY_TTL) }
YY_BREAK
case 198:
YY_RULE_SETUP
#line 412 "util/configlexer.lex"
-{ YDVAR(1, VAR_EDE_SERVE_EXPIRED) }
+{ YDVAR(1, VAR_SERVE_EXPIRED_CLIENT_TIMEOUT) }
YY_BREAK
case 199:
YY_RULE_SETUP
#line 413 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVE_ORIGINAL_TTL) }
+{ YDVAR(1, VAR_EDE_SERVE_EXPIRED) }
YY_BREAK
case 200:
YY_RULE_SETUP
#line 414 "util/configlexer.lex"
-{ YDVAR(1, VAR_FAKE_DSA) }
+{ YDVAR(1, VAR_SERVE_ORIGINAL_TTL) }
YY_BREAK
case 201:
YY_RULE_SETUP
#line 415 "util/configlexer.lex"
-{ YDVAR(1, VAR_FAKE_SHA1) }
+{ YDVAR(1, VAR_FAKE_DSA) }
YY_BREAK
case 202:
YY_RULE_SETUP
#line 416 "util/configlexer.lex"
-{ YDVAR(1, VAR_VAL_LOG_LEVEL) }
+{ YDVAR(1, VAR_FAKE_SHA1) }
YY_BREAK
case 203:
YY_RULE_SETUP
#line 417 "util/configlexer.lex"
-{ YDVAR(1, VAR_KEY_CACHE_SIZE) }
+{ YDVAR(1, VAR_VAL_LOG_LEVEL) }
YY_BREAK
case 204:
YY_RULE_SETUP
#line 418 "util/configlexer.lex"
-{ YDVAR(1, VAR_KEY_CACHE_SLABS) }
+{ YDVAR(1, VAR_KEY_CACHE_SIZE) }
YY_BREAK
case 205:
YY_RULE_SETUP
#line 419 "util/configlexer.lex"
-{ YDVAR(1, VAR_NEG_CACHE_SIZE) }
+{ YDVAR(1, VAR_KEY_CACHE_SLABS) }
YY_BREAK
case 206:
YY_RULE_SETUP
#line 420 "util/configlexer.lex"
-{
- YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) }
+{ YDVAR(1, VAR_NEG_CACHE_SIZE) }
YY_BREAK
case 207:
YY_RULE_SETUP
-#line 422 "util/configlexer.lex"
-{ YDVAR(1, VAR_ZONEMD_PERMISSIVE_MODE) }
+#line 421 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) }
YY_BREAK
case 208:
YY_RULE_SETUP
#line 423 "util/configlexer.lex"
-{ YDVAR(1, VAR_ZONEMD_CHECK) }
+{ YDVAR(1, VAR_ZONEMD_PERMISSIVE_MODE) }
YY_BREAK
case 209:
YY_RULE_SETUP
#line 424 "util/configlexer.lex"
-{ YDVAR(1, VAR_ZONEMD_REJECT_ABSENCE) }
+{ YDVAR(1, VAR_ZONEMD_CHECK) }
YY_BREAK
case 210:
YY_RULE_SETUP
#line 425 "util/configlexer.lex"
-{ YDVAR(1, VAR_ADD_HOLDDOWN) }
+{ YDVAR(1, VAR_ZONEMD_REJECT_ABSENCE) }
YY_BREAK
case 211:
YY_RULE_SETUP
#line 426 "util/configlexer.lex"
-{ YDVAR(1, VAR_DEL_HOLDDOWN) }
+{ YDVAR(1, VAR_ADD_HOLDDOWN) }
YY_BREAK
case 212:
YY_RULE_SETUP
#line 427 "util/configlexer.lex"
-{ YDVAR(1, VAR_KEEP_MISSING) }
+{ YDVAR(1, VAR_DEL_HOLDDOWN) }
YY_BREAK
case 213:
YY_RULE_SETUP
#line 428 "util/configlexer.lex"
-{ YDVAR(1, VAR_PERMIT_SMALL_HOLDDOWN) }
+{ YDVAR(1, VAR_KEEP_MISSING) }
YY_BREAK
case 214:
YY_RULE_SETUP
#line 429 "util/configlexer.lex"
-{ YDVAR(1, VAR_USE_SYSLOG) }
+{ YDVAR(1, VAR_PERMIT_SMALL_HOLDDOWN) }
YY_BREAK
case 215:
YY_RULE_SETUP
#line 430 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_IDENTITY) }
+{ YDVAR(1, VAR_USE_SYSLOG) }
YY_BREAK
case 216:
YY_RULE_SETUP
#line 431 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_TIME_ASCII) }
+{ YDVAR(1, VAR_LOG_IDENTITY) }
YY_BREAK
case 217:
YY_RULE_SETUP
#line 432 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_QUERIES) }
+{ YDVAR(1, VAR_LOG_TIME_ASCII) }
YY_BREAK
case 218:
YY_RULE_SETUP
#line 433 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_REPLIES) }
+{ YDVAR(1, VAR_LOG_QUERIES) }
YY_BREAK
case 219:
YY_RULE_SETUP
#line 434 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_TAG_QUERYREPLY) }
+{ YDVAR(1, VAR_LOG_REPLIES) }
YY_BREAK
case 220:
YY_RULE_SETUP
#line 435 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_LOCAL_ACTIONS) }
+{ YDVAR(1, VAR_LOG_TAG_QUERYREPLY) }
YY_BREAK
case 221:
YY_RULE_SETUP
#line 436 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_SERVFAIL) }
+{ YDVAR(1, VAR_LOG_LOCAL_ACTIONS) }
YY_BREAK
case 222:
YY_RULE_SETUP
#line 437 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOG_DESTADDR) }
+{ YDVAR(1, VAR_LOG_SERVFAIL) }
YY_BREAK
case 223:
YY_RULE_SETUP
#line 438 "util/configlexer.lex"
-{ YDVAR(2, VAR_LOCAL_ZONE) }
+{ YDVAR(1, VAR_LOG_DESTADDR) }
YY_BREAK
case 224:
YY_RULE_SETUP
#line 439 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOCAL_DATA) }
+{ YDVAR(2, VAR_LOCAL_ZONE) }
YY_BREAK
case 225:
YY_RULE_SETUP
#line 440 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOCAL_DATA_PTR) }
+{ YDVAR(1, VAR_LOCAL_DATA) }
YY_BREAK
case 226:
YY_RULE_SETUP
#line 441 "util/configlexer.lex"
-{ YDVAR(1, VAR_UNBLOCK_LAN_ZONES) }
+{ YDVAR(1, VAR_LOCAL_DATA_PTR) }
YY_BREAK
case 227:
YY_RULE_SETUP
#line 442 "util/configlexer.lex"
-{ YDVAR(1, VAR_INSECURE_LAN_ZONES) }
+{ YDVAR(1, VAR_UNBLOCK_LAN_ZONES) }
YY_BREAK
case 228:
YY_RULE_SETUP
#line 443 "util/configlexer.lex"
-{ YDVAR(1, VAR_STATISTICS_INTERVAL) }
+{ YDVAR(1, VAR_INSECURE_LAN_ZONES) }
YY_BREAK
case 229:
YY_RULE_SETUP
#line 444 "util/configlexer.lex"
-{ YDVAR(1, VAR_STATISTICS_CUMULATIVE) }
+{ YDVAR(1, VAR_STATISTICS_INTERVAL) }
YY_BREAK
case 230:
YY_RULE_SETUP
#line 445 "util/configlexer.lex"
-{ YDVAR(1, VAR_EXTENDED_STATISTICS) }
+{ YDVAR(1, VAR_STATISTICS_CUMULATIVE) }
YY_BREAK
case 231:
YY_RULE_SETUP
#line 446 "util/configlexer.lex"
-{ YDVAR(1, VAR_STATISTICS_INHIBIT_ZERO) }
+{ YDVAR(1, VAR_EXTENDED_STATISTICS) }
YY_BREAK
case 232:
YY_RULE_SETUP
#line 447 "util/configlexer.lex"
-{ YDVAR(1, VAR_SHM_ENABLE) }
+{ YDVAR(1, VAR_STATISTICS_INHIBIT_ZERO) }
YY_BREAK
case 233:
YY_RULE_SETUP
#line 448 "util/configlexer.lex"
-{ YDVAR(1, VAR_SHM_KEY) }
+{ YDVAR(1, VAR_SHM_ENABLE) }
YY_BREAK
case 234:
YY_RULE_SETUP
#line 449 "util/configlexer.lex"
-{ YDVAR(0, VAR_REMOTE_CONTROL) }
+{ YDVAR(1, VAR_SHM_KEY) }
YY_BREAK
case 235:
YY_RULE_SETUP
#line 450 "util/configlexer.lex"
-{ YDVAR(1, VAR_CONTROL_ENABLE) }
+{ YDVAR(0, VAR_REMOTE_CONTROL) }
YY_BREAK
case 236:
YY_RULE_SETUP
#line 451 "util/configlexer.lex"
-{ YDVAR(1, VAR_CONTROL_INTERFACE) }
+{ YDVAR(1, VAR_CONTROL_ENABLE) }
YY_BREAK
case 237:
YY_RULE_SETUP
#line 452 "util/configlexer.lex"
-{ YDVAR(1, VAR_CONTROL_PORT) }
+{ YDVAR(1, VAR_CONTROL_INTERFACE) }
YY_BREAK
case 238:
YY_RULE_SETUP
#line 453 "util/configlexer.lex"
-{ YDVAR(1, VAR_CONTROL_USE_CERT) }
+{ YDVAR(1, VAR_CONTROL_PORT) }
YY_BREAK
case 239:
YY_RULE_SETUP
#line 454 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVER_KEY_FILE) }
+{ YDVAR(1, VAR_CONTROL_USE_CERT) }
YY_BREAK
case 240:
YY_RULE_SETUP
#line 455 "util/configlexer.lex"
-{ YDVAR(1, VAR_SERVER_CERT_FILE) }
+{ YDVAR(1, VAR_SERVER_KEY_FILE) }
YY_BREAK
case 241:
YY_RULE_SETUP
#line 456 "util/configlexer.lex"
-{ YDVAR(1, VAR_CONTROL_KEY_FILE) }
+{ YDVAR(1, VAR_SERVER_CERT_FILE) }
YY_BREAK
case 242:
YY_RULE_SETUP
#line 457 "util/configlexer.lex"
-{ YDVAR(1, VAR_CONTROL_CERT_FILE) }
+{ YDVAR(1, VAR_CONTROL_KEY_FILE) }
YY_BREAK
case 243:
YY_RULE_SETUP
#line 458 "util/configlexer.lex"
-{ YDVAR(1, VAR_PYTHON_SCRIPT) }
+{ YDVAR(1, VAR_CONTROL_CERT_FILE) }
YY_BREAK
case 244:
YY_RULE_SETUP
#line 459 "util/configlexer.lex"
-{ YDVAR(0, VAR_PYTHON) }
+{ YDVAR(1, VAR_PYTHON_SCRIPT) }
YY_BREAK
case 245:
YY_RULE_SETUP
#line 460 "util/configlexer.lex"
-{ YDVAR(1, VAR_DYNLIB_FILE) }
+{ YDVAR(0, VAR_PYTHON) }
YY_BREAK
case 246:
YY_RULE_SETUP
#line 461 "util/configlexer.lex"
-{ YDVAR(0, VAR_DYNLIB) }
+{ YDVAR(1, VAR_DYNLIB_FILE) }
YY_BREAK
case 247:
YY_RULE_SETUP
#line 462 "util/configlexer.lex"
-{ YDVAR(1, VAR_DOMAIN_INSECURE) }
+{ YDVAR(0, VAR_DYNLIB) }
YY_BREAK
case 248:
YY_RULE_SETUP
#line 463 "util/configlexer.lex"
-{ YDVAR(1, VAR_MINIMAL_RESPONSES) }
+{ YDVAR(1, VAR_DOMAIN_INSECURE) }
YY_BREAK
case 249:
YY_RULE_SETUP
#line 464 "util/configlexer.lex"
-{ YDVAR(1, VAR_RRSET_ROUNDROBIN) }
+{ YDVAR(1, VAR_MINIMAL_RESPONSES) }
YY_BREAK
case 250:
YY_RULE_SETUP
#line 465 "util/configlexer.lex"
-{ YDVAR(1, VAR_UNKNOWN_SERVER_TIME_LIMIT) }
+{ YDVAR(1, VAR_RRSET_ROUNDROBIN) }
YY_BREAK
case 251:
YY_RULE_SETUP
#line 466 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_UDP_SIZE) }
+{ YDVAR(1, VAR_UNKNOWN_SERVER_TIME_LIMIT) }
YY_BREAK
case 252:
YY_RULE_SETUP
#line 467 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNS64_PREFIX) }
+{ YDVAR(1, VAR_DISCARD_TIMEOUT) }
YY_BREAK
case 253:
YY_RULE_SETUP
#line 468 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNS64_SYNTHALL) }
+{ YDVAR(1, VAR_WAIT_LIMIT) }
YY_BREAK
case 254:
YY_RULE_SETUP
#line 469 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNS64_IGNORE_AAAA) }
+{ YDVAR(1, VAR_WAIT_LIMIT_COOKIE) }
YY_BREAK
case 255:
YY_RULE_SETUP
#line 470 "util/configlexer.lex"
-{ YDVAR(1, VAR_NAT64_PREFIX) }
+{ YDVAR(1, VAR_WAIT_LIMIT_NETBLOCK) }
YY_BREAK
case 256:
YY_RULE_SETUP
#line 471 "util/configlexer.lex"
-{ YDVAR(1, VAR_DEFINE_TAG) }
+{ YDVAR(1, VAR_WAIT_LIMIT_COOKIE_NETBLOCK) }
YY_BREAK
case 257:
YY_RULE_SETUP
#line 472 "util/configlexer.lex"
-{ YDVAR(2, VAR_LOCAL_ZONE_TAG) }
+{ YDVAR(1, VAR_MAX_UDP_SIZE) }
YY_BREAK
case 258:
YY_RULE_SETUP
#line 473 "util/configlexer.lex"
-{ YDVAR(2, VAR_ACCESS_CONTROL_TAG) }
+{ YDVAR(1, VAR_DNS64_PREFIX) }
YY_BREAK
case 259:
YY_RULE_SETUP
#line 474 "util/configlexer.lex"
-{ YDVAR(3, VAR_ACCESS_CONTROL_TAG_ACTION) }
+{ YDVAR(1, VAR_DNS64_SYNTHALL) }
YY_BREAK
case 260:
YY_RULE_SETUP
#line 475 "util/configlexer.lex"
-{ YDVAR(3, VAR_ACCESS_CONTROL_TAG_DATA) }
+{ YDVAR(1, VAR_DNS64_IGNORE_AAAA) }
YY_BREAK
case 261:
YY_RULE_SETUP
#line 476 "util/configlexer.lex"
-{ YDVAR(2, VAR_ACCESS_CONTROL_VIEW) }
+{ YDVAR(1, VAR_NAT64_PREFIX) }
YY_BREAK
case 262:
YY_RULE_SETUP
#line 477 "util/configlexer.lex"
-{ YDVAR(2, VAR_INTERFACE_TAG) }
+{ YDVAR(1, VAR_DEFINE_TAG) }
YY_BREAK
case 263:
YY_RULE_SETUP
#line 478 "util/configlexer.lex"
-{ YDVAR(3, VAR_INTERFACE_TAG_ACTION) }
+{ YDVAR(2, VAR_LOCAL_ZONE_TAG) }
YY_BREAK
case 264:
YY_RULE_SETUP
#line 479 "util/configlexer.lex"
-{ YDVAR(3, VAR_INTERFACE_TAG_DATA) }
+{ YDVAR(2, VAR_ACCESS_CONTROL_TAG) }
YY_BREAK
case 265:
YY_RULE_SETUP
#line 480 "util/configlexer.lex"
-{ YDVAR(2, VAR_INTERFACE_VIEW) }
+{ YDVAR(3, VAR_ACCESS_CONTROL_TAG_ACTION) }
YY_BREAK
case 266:
YY_RULE_SETUP
#line 481 "util/configlexer.lex"
-{ YDVAR(3, VAR_LOCAL_ZONE_OVERRIDE) }
+{ YDVAR(3, VAR_ACCESS_CONTROL_TAG_DATA) }
YY_BREAK
case 267:
YY_RULE_SETUP
#line 482 "util/configlexer.lex"
-{ YDVAR(0, VAR_DNSTAP) }
+{ YDVAR(2, VAR_ACCESS_CONTROL_VIEW) }
YY_BREAK
case 268:
YY_RULE_SETUP
#line 483 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_ENABLE) }
+{ YDVAR(2, VAR_INTERFACE_TAG) }
YY_BREAK
case 269:
YY_RULE_SETUP
#line 484 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_BIDIRECTIONAL) }
+{ YDVAR(3, VAR_INTERFACE_TAG_ACTION) }
YY_BREAK
case 270:
YY_RULE_SETUP
#line 485 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_SOCKET_PATH) }
+{ YDVAR(3, VAR_INTERFACE_TAG_DATA) }
YY_BREAK
case 271:
YY_RULE_SETUP
#line 486 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_IP) }
+{ YDVAR(2, VAR_INTERFACE_VIEW) }
YY_BREAK
case 272:
YY_RULE_SETUP
#line 487 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_TLS) }
+{ YDVAR(3, VAR_LOCAL_ZONE_OVERRIDE) }
YY_BREAK
case 273:
YY_RULE_SETUP
#line 488 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_TLS_SERVER_NAME) }
+{ YDVAR(0, VAR_DNSTAP) }
YY_BREAK
case 274:
YY_RULE_SETUP
#line 489 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_TLS_CERT_BUNDLE) }
+{ YDVAR(1, VAR_DNSTAP_ENABLE) }
YY_BREAK
case 275:
YY_RULE_SETUP
#line 490 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSTAP_TLS_CLIENT_KEY_FILE) }
+{ YDVAR(1, VAR_DNSTAP_BIDIRECTIONAL) }
YY_BREAK
case 276:
YY_RULE_SETUP
-#line 492 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSTAP_TLS_CLIENT_CERT_FILE) }
+#line 491 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_SOCKET_PATH) }
YY_BREAK
case 277:
YY_RULE_SETUP
-#line 494 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_SEND_IDENTITY) }
+#line 492 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_IP) }
YY_BREAK
case 278:
YY_RULE_SETUP
-#line 495 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_SEND_VERSION) }
+#line 493 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_TLS) }
YY_BREAK
case 279:
YY_RULE_SETUP
-#line 496 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_IDENTITY) }
+#line 494 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_TLS_SERVER_NAME) }
YY_BREAK
case 280:
YY_RULE_SETUP
-#line 497 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSTAP_VERSION) }
+#line 495 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_TLS_CERT_BUNDLE) }
YY_BREAK
case 281:
YY_RULE_SETUP
-#line 498 "util/configlexer.lex"
+#line 496 "util/configlexer.lex"
{
- YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES) }
+ YDVAR(1, VAR_DNSTAP_TLS_CLIENT_KEY_FILE) }
YY_BREAK
case 282:
YY_RULE_SETUP
-#line 500 "util/configlexer.lex"
+#line 498 "util/configlexer.lex"
{
- YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES) }
+ YDVAR(1, VAR_DNSTAP_TLS_CLIENT_CERT_FILE) }
YY_BREAK
case 283:
YY_RULE_SETUP
-#line 502 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES) }
+#line 500 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_SEND_IDENTITY) }
YY_BREAK
case 284:
YY_RULE_SETUP
-#line 504 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES) }
+#line 501 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_SEND_VERSION) }
YY_BREAK
case 285:
YY_RULE_SETUP
-#line 506 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES) }
+#line 502 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_IDENTITY) }
YY_BREAK
case 286:
YY_RULE_SETUP
-#line 508 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES) }
+#line 503 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSTAP_VERSION) }
YY_BREAK
case 287:
YY_RULE_SETUP
-#line 510 "util/configlexer.lex"
-{ YDVAR(1, VAR_DISABLE_DNSSEC_LAME_CHECK) }
+#line 504 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES) }
YY_BREAK
case 288:
YY_RULE_SETUP
-#line 511 "util/configlexer.lex"
-{ YDVAR(1, VAR_IP_RATELIMIT) }
+#line 506 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES) }
YY_BREAK
case 289:
YY_RULE_SETUP
-#line 512 "util/configlexer.lex"
-{ YDVAR(1, VAR_IP_RATELIMIT_COOKIE) }
+#line 508 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES) }
YY_BREAK
case 290:
YY_RULE_SETUP
-#line 513 "util/configlexer.lex"
-{ YDVAR(1, VAR_RATELIMIT) }
+#line 510 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES) }
YY_BREAK
case 291:
YY_RULE_SETUP
-#line 514 "util/configlexer.lex"
-{ YDVAR(1, VAR_IP_RATELIMIT_SLABS) }
+#line 512 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES) }
YY_BREAK
case 292:
YY_RULE_SETUP
-#line 515 "util/configlexer.lex"
-{ YDVAR(1, VAR_RATELIMIT_SLABS) }
+#line 514 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES) }
YY_BREAK
case 293:
YY_RULE_SETUP
#line 516 "util/configlexer.lex"
-{ YDVAR(1, VAR_IP_RATELIMIT_SIZE) }
+{ YDVAR(1, VAR_DISABLE_DNSSEC_LAME_CHECK) }
YY_BREAK
case 294:
YY_RULE_SETUP
#line 517 "util/configlexer.lex"
-{ YDVAR(1, VAR_RATELIMIT_SIZE) }
+{ YDVAR(1, VAR_IP_RATELIMIT) }
YY_BREAK
case 295:
YY_RULE_SETUP
#line 518 "util/configlexer.lex"
-{ YDVAR(2, VAR_RATELIMIT_FOR_DOMAIN) }
+{ YDVAR(1, VAR_IP_RATELIMIT_COOKIE) }
YY_BREAK
case 296:
YY_RULE_SETUP
#line 519 "util/configlexer.lex"
-{ YDVAR(2, VAR_RATELIMIT_BELOW_DOMAIN) }
+{ YDVAR(1, VAR_RATELIMIT) }
YY_BREAK
case 297:
YY_RULE_SETUP
#line 520 "util/configlexer.lex"
-{ YDVAR(1, VAR_IP_RATELIMIT_FACTOR) }
+{ YDVAR(1, VAR_IP_RATELIMIT_SLABS) }
YY_BREAK
case 298:
YY_RULE_SETUP
#line 521 "util/configlexer.lex"
-{ YDVAR(1, VAR_RATELIMIT_FACTOR) }
+{ YDVAR(1, VAR_RATELIMIT_SLABS) }
YY_BREAK
case 299:
YY_RULE_SETUP
#line 522 "util/configlexer.lex"
-{ YDVAR(1, VAR_IP_RATELIMIT_BACKOFF) }
+{ YDVAR(1, VAR_IP_RATELIMIT_SIZE) }
YY_BREAK
case 300:
YY_RULE_SETUP
#line 523 "util/configlexer.lex"
-{ YDVAR(1, VAR_RATELIMIT_BACKOFF) }
+{ YDVAR(1, VAR_RATELIMIT_SIZE) }
YY_BREAK
case 301:
YY_RULE_SETUP
#line 524 "util/configlexer.lex"
-{ YDVAR(1, VAR_OUTBOUND_MSG_RETRY) }
+{ YDVAR(2, VAR_RATELIMIT_FOR_DOMAIN) }
YY_BREAK
case 302:
YY_RULE_SETUP
#line 525 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_SENT_COUNT) }
+{ YDVAR(2, VAR_RATELIMIT_BELOW_DOMAIN) }
YY_BREAK
case 303:
YY_RULE_SETUP
#line 526 "util/configlexer.lex"
-{ YDVAR(1, VAR_MAX_QUERY_RESTARTS) }
+{ YDVAR(1, VAR_IP_RATELIMIT_FACTOR) }
YY_BREAK
case 304:
YY_RULE_SETUP
#line 527 "util/configlexer.lex"
-{ YDVAR(1, VAR_LOW_RTT) }
+{ YDVAR(1, VAR_RATELIMIT_FACTOR) }
YY_BREAK
case 305:
YY_RULE_SETUP
#line 528 "util/configlexer.lex"
-{ YDVAR(1, VAR_FAST_SERVER_NUM) }
+{ YDVAR(1, VAR_IP_RATELIMIT_BACKOFF) }
YY_BREAK
case 306:
YY_RULE_SETUP
#line 529 "util/configlexer.lex"
-{ YDVAR(1, VAR_FAST_SERVER_PERMIL) }
+{ YDVAR(1, VAR_RATELIMIT_BACKOFF) }
YY_BREAK
case 307:
YY_RULE_SETUP
#line 530 "util/configlexer.lex"
-{ YDVAR(1, VAR_FAST_SERVER_PERMIL) }
+{ YDVAR(1, VAR_OUTBOUND_MSG_RETRY) }
YY_BREAK
case 308:
YY_RULE_SETUP
#line 531 "util/configlexer.lex"
-{ YDVAR(1, VAR_FAST_SERVER_PERMIL) }
+{ YDVAR(1, VAR_MAX_SENT_COUNT) }
YY_BREAK
case 309:
YY_RULE_SETUP
#line 532 "util/configlexer.lex"
-{ YDVAR(2, VAR_RESPONSE_IP_TAG) }
+{ YDVAR(1, VAR_MAX_QUERY_RESTARTS) }
YY_BREAK
case 310:
YY_RULE_SETUP
#line 533 "util/configlexer.lex"
-{ YDVAR(2, VAR_RESPONSE_IP) }
+{ YDVAR(1, VAR_LOW_RTT) }
YY_BREAK
case 311:
YY_RULE_SETUP
#line 534 "util/configlexer.lex"
-{ YDVAR(2, VAR_RESPONSE_IP_DATA) }
+{ YDVAR(1, VAR_FAST_SERVER_NUM) }
YY_BREAK
case 312:
YY_RULE_SETUP
#line 535 "util/configlexer.lex"
-{ YDVAR(0, VAR_DNSCRYPT) }
+{ YDVAR(1, VAR_FAST_SERVER_PERMIL) }
YY_BREAK
case 313:
YY_RULE_SETUP
#line 536 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_ENABLE) }
+{ YDVAR(1, VAR_FAST_SERVER_PERMIL) }
YY_BREAK
case 314:
YY_RULE_SETUP
#line 537 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_PORT) }
+{ YDVAR(1, VAR_FAST_SERVER_PERMIL) }
YY_BREAK
case 315:
YY_RULE_SETUP
#line 538 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_PROVIDER) }
+{ YDVAR(2, VAR_RESPONSE_IP_TAG) }
YY_BREAK
case 316:
YY_RULE_SETUP
#line 539 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_SECRET_KEY) }
+{ YDVAR(2, VAR_RESPONSE_IP) }
YY_BREAK
case 317:
YY_RULE_SETUP
#line 540 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_PROVIDER_CERT) }
+{ YDVAR(2, VAR_RESPONSE_IP_DATA) }
YY_BREAK
case 318:
YY_RULE_SETUP
#line 541 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_PROVIDER_CERT_ROTATED) }
+{ YDVAR(0, VAR_DNSCRYPT) }
YY_BREAK
case 319:
YY_RULE_SETUP
#line 542 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE) }
+{ YDVAR(1, VAR_DNSCRYPT_ENABLE) }
YY_BREAK
case 320:
YY_RULE_SETUP
-#line 544 "util/configlexer.lex"
-{
- YDVAR(1, VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS) }
+#line 543 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSCRYPT_PORT) }
YY_BREAK
case 321:
YY_RULE_SETUP
-#line 546 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_NONCE_CACHE_SIZE) }
+#line 544 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSCRYPT_PROVIDER) }
YY_BREAK
case 322:
YY_RULE_SETUP
-#line 547 "util/configlexer.lex"
-{ YDVAR(1, VAR_DNSCRYPT_NONCE_CACHE_SLABS) }
+#line 545 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSCRYPT_SECRET_KEY) }
YY_BREAK
case 323:
YY_RULE_SETUP
-#line 548 "util/configlexer.lex"
-{ YDVAR(1, VAR_PAD_RESPONSES) }
+#line 546 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSCRYPT_PROVIDER_CERT) }
YY_BREAK
case 324:
YY_RULE_SETUP
-#line 549 "util/configlexer.lex"
-{ YDVAR(1, VAR_PAD_RESPONSES_BLOCK_SIZE) }
+#line 547 "util/configlexer.lex"
+{ YDVAR(1, VAR_DNSCRYPT_PROVIDER_CERT_ROTATED) }
YY_BREAK
case 325:
YY_RULE_SETUP
-#line 550 "util/configlexer.lex"
-{ YDVAR(1, VAR_PAD_QUERIES) }
+#line 548 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE) }
YY_BREAK
case 326:
YY_RULE_SETUP
-#line 551 "util/configlexer.lex"
-{ YDVAR(1, VAR_PAD_QUERIES_BLOCK_SIZE) }
+#line 550 "util/configlexer.lex"
+{
+ YDVAR(1, VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS) }
YY_BREAK
case 327:
YY_RULE_SETUP
#line 552 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_ENABLED) }
+{ YDVAR(1, VAR_DNSCRYPT_NONCE_CACHE_SIZE) }
YY_BREAK
case 328:
YY_RULE_SETUP
#line 553 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_IGNORE_BOGUS) }
+{ YDVAR(1, VAR_DNSCRYPT_NONCE_CACHE_SLABS) }
YY_BREAK
case 329:
YY_RULE_SETUP
#line 554 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_HOOK) }
+{ YDVAR(1, VAR_PAD_RESPONSES) }
YY_BREAK
case 330:
YY_RULE_SETUP
#line 555 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_MAX_TTL) }
+{ YDVAR(1, VAR_PAD_RESPONSES_BLOCK_SIZE) }
YY_BREAK
case 331:
YY_RULE_SETUP
#line 556 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_WHITELIST) }
+{ YDVAR(1, VAR_PAD_QUERIES) }
YY_BREAK
case 332:
YY_RULE_SETUP
#line 557 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_WHITELIST) }
+{ YDVAR(1, VAR_PAD_QUERIES_BLOCK_SIZE) }
YY_BREAK
case 333:
YY_RULE_SETUP
#line 558 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSECMOD_STRICT) }
+{ YDVAR(1, VAR_IPSECMOD_ENABLED) }
YY_BREAK
case 334:
YY_RULE_SETUP
#line 559 "util/configlexer.lex"
-{ YDVAR(0, VAR_CACHEDB) }
+{ YDVAR(1, VAR_IPSECMOD_IGNORE_BOGUS) }
YY_BREAK
case 335:
YY_RULE_SETUP
#line 560 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_BACKEND) }
+{ YDVAR(1, VAR_IPSECMOD_HOOK) }
YY_BREAK
case 336:
YY_RULE_SETUP
#line 561 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_SECRETSEED) }
+{ YDVAR(1, VAR_IPSECMOD_MAX_TTL) }
YY_BREAK
case 337:
YY_RULE_SETUP
#line 562 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_NO_STORE) }
+{ YDVAR(1, VAR_IPSECMOD_WHITELIST) }
YY_BREAK
case 338:
YY_RULE_SETUP
#line 563 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISHOST) }
+{ YDVAR(1, VAR_IPSECMOD_WHITELIST) }
YY_BREAK
case 339:
YY_RULE_SETUP
#line 564 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISPORT) }
+{ YDVAR(1, VAR_IPSECMOD_STRICT) }
YY_BREAK
case 340:
YY_RULE_SETUP
#line 565 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISPATH) }
+{ YDVAR(0, VAR_CACHEDB) }
YY_BREAK
case 341:
YY_RULE_SETUP
#line 566 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISPASSWORD) }
+{ YDVAR(1, VAR_CACHEDB_BACKEND) }
YY_BREAK
case 342:
YY_RULE_SETUP
#line 567 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISTIMEOUT) }
+{ YDVAR(1, VAR_CACHEDB_SECRETSEED) }
YY_BREAK
case 343:
YY_RULE_SETUP
#line 568 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISEXPIRERECORDS) }
+{ YDVAR(1, VAR_CACHEDB_NO_STORE) }
YY_BREAK
case 344:
YY_RULE_SETUP
#line 569 "util/configlexer.lex"
-{ YDVAR(1, VAR_CACHEDB_REDISLOGICALDB) }
+{ YDVAR(1, VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED) }
YY_BREAK
case 345:
YY_RULE_SETUP
#line 570 "util/configlexer.lex"
-{ YDVAR(0, VAR_IPSET) }
+{ YDVAR(1, VAR_CACHEDB_REDISHOST) }
YY_BREAK
case 346:
YY_RULE_SETUP
#line 571 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSET_NAME_V4) }
+{ YDVAR(1, VAR_CACHEDB_REDISPORT) }
YY_BREAK
case 347:
YY_RULE_SETUP
#line 572 "util/configlexer.lex"
-{ YDVAR(1, VAR_IPSET_NAME_V6) }
+{ YDVAR(1, VAR_CACHEDB_REDISPATH) }
YY_BREAK
case 348:
YY_RULE_SETUP
#line 573 "util/configlexer.lex"
-{ YDVAR(1, VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM) }
+{ YDVAR(1, VAR_CACHEDB_REDISPASSWORD) }
YY_BREAK
case 349:
YY_RULE_SETUP
#line 574 "util/configlexer.lex"
-{ YDVAR(2, VAR_TCP_CONNECTION_LIMIT) }
+{ YDVAR(1, VAR_CACHEDB_REDISTIMEOUT) }
YY_BREAK
case 350:
YY_RULE_SETUP
#line 575 "util/configlexer.lex"
-{ YDVAR(1, VAR_ANSWER_COOKIE ) }
+{ YDVAR(1, VAR_CACHEDB_REDISEXPIRERECORDS) }
YY_BREAK
case 351:
YY_RULE_SETUP
#line 576 "util/configlexer.lex"
-{ YDVAR(1, VAR_COOKIE_SECRET) }
+{ YDVAR(1, VAR_CACHEDB_REDISLOGICALDB) }
YY_BREAK
case 352:
YY_RULE_SETUP
#line 577 "util/configlexer.lex"
-{ YDVAR(2, VAR_EDNS_CLIENT_STRING) }
+{ YDVAR(0, VAR_IPSET) }
YY_BREAK
case 353:
YY_RULE_SETUP
#line 578 "util/configlexer.lex"
-{ YDVAR(1, VAR_EDNS_CLIENT_STRING_OPCODE) }
+{ YDVAR(1, VAR_IPSET_NAME_V4) }
YY_BREAK
case 354:
YY_RULE_SETUP
#line 579 "util/configlexer.lex"
-{ YDVAR(1, VAR_NSID ) }
+{ YDVAR(1, VAR_IPSET_NAME_V6) }
YY_BREAK
case 355:
YY_RULE_SETUP
#line 580 "util/configlexer.lex"
-{ YDVAR(1, VAR_EDE ) }
+{ YDVAR(1, VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM) }
YY_BREAK
case 356:
YY_RULE_SETUP
#line 581 "util/configlexer.lex"
-{ YDVAR(1, VAR_PROXY_PROTOCOL_PORT) }
+{ YDVAR(2, VAR_TCP_CONNECTION_LIMIT) }
YY_BREAK
case 357:
-/* rule 357 can match eol */
YY_RULE_SETUP
#line 582 "util/configlexer.lex"
-{ LEXOUT(("NL\n")); cfg_parser->line++; }
+{ YDVAR(1, VAR_ANSWER_COOKIE ) }
YY_BREAK
-/* Quoted strings. Strip leading and ending quotes */
case 358:
YY_RULE_SETUP
+#line 583 "util/configlexer.lex"
+{ YDVAR(1, VAR_COOKIE_SECRET) }
+ YY_BREAK
+case 359:
+YY_RULE_SETUP
+#line 584 "util/configlexer.lex"
+{ YDVAR(2, VAR_EDNS_CLIENT_STRING) }
+ YY_BREAK
+case 360:
+YY_RULE_SETUP
#line 585 "util/configlexer.lex"
+{ YDVAR(1, VAR_EDNS_CLIENT_STRING_OPCODE) }
+ YY_BREAK
+case 361:
+YY_RULE_SETUP
+#line 586 "util/configlexer.lex"
+{ YDVAR(1, VAR_NSID ) }
+ YY_BREAK
+case 362:
+YY_RULE_SETUP
+#line 587 "util/configlexer.lex"
+{ YDVAR(1, VAR_EDE ) }
+ YY_BREAK
+case 363:
+YY_RULE_SETUP
+#line 588 "util/configlexer.lex"
+{ YDVAR(1, VAR_PROXY_PROTOCOL_PORT) }
+ YY_BREAK
+case 364:
+/* rule 364 can match eol */
+YY_RULE_SETUP
+#line 589 "util/configlexer.lex"
+{ LEXOUT(("NL\n")); cfg_parser->line++; }
+ YY_BREAK
+/* Quoted strings. Strip leading and ending quotes */
+case 365:
+YY_RULE_SETUP
+#line 592 "util/configlexer.lex"
{ BEGIN(quotedstring); LEXOUT(("QS ")); }
YY_BREAK
case YY_STATE_EOF(quotedstring):
-#line 586 "util/configlexer.lex"
+#line 593 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
if(--num_args == 0) { BEGIN(INITIAL); }
else { BEGIN(val); }
}
YY_BREAK
-case 359:
+case 366:
YY_RULE_SETUP
-#line 591 "util/configlexer.lex"
+#line 598 "util/configlexer.lex"
{ LEXOUT(("STR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 360:
-/* rule 360 can match eol */
+case 367:
+/* rule 367 can match eol */
YY_RULE_SETUP
-#line 592 "util/configlexer.lex"
+#line 599 "util/configlexer.lex"
{ yyerror("newline inside quoted string, no end \"");
cfg_parser->line++; BEGIN(INITIAL); }
YY_BREAK
-case 361:
+case 368:
YY_RULE_SETUP
-#line 594 "util/configlexer.lex"
+#line 601 "util/configlexer.lex"
{
LEXOUT(("QE "));
if(--num_args == 0) { BEGIN(INITIAL); }
@@ -6434,34 +6555,34 @@ YY_RULE_SETUP
}
YY_BREAK
/* Single Quoted strings. Strip leading and ending quotes */
-case 362:
+case 369:
YY_RULE_SETUP
-#line 606 "util/configlexer.lex"
+#line 613 "util/configlexer.lex"
{ BEGIN(singlequotedstr); LEXOUT(("SQS ")); }
YY_BREAK
case YY_STATE_EOF(singlequotedstr):
-#line 607 "util/configlexer.lex"
+#line 614 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
if(--num_args == 0) { BEGIN(INITIAL); }
else { BEGIN(val); }
}
YY_BREAK
-case 363:
+case 370:
YY_RULE_SETUP
-#line 612 "util/configlexer.lex"
+#line 619 "util/configlexer.lex"
{ LEXOUT(("STR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 364:
-/* rule 364 can match eol */
+case 371:
+/* rule 371 can match eol */
YY_RULE_SETUP
-#line 613 "util/configlexer.lex"
+#line 620 "util/configlexer.lex"
{ yyerror("newline inside quoted string, no end '");
cfg_parser->line++; BEGIN(INITIAL); }
YY_BREAK
-case 365:
+case 372:
YY_RULE_SETUP
-#line 615 "util/configlexer.lex"
+#line 622 "util/configlexer.lex"
{
LEXOUT(("SQE "));
if(--num_args == 0) { BEGIN(INITIAL); }
@@ -6474,38 +6595,38 @@ YY_RULE_SETUP
}
YY_BREAK
/* include: directive */
-case 366:
+case 373:
YY_RULE_SETUP
-#line 627 "util/configlexer.lex"
+#line 634 "util/configlexer.lex"
{
LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include); }
YY_BREAK
case YY_STATE_EOF(include):
-#line 629 "util/configlexer.lex"
+#line 636 "util/configlexer.lex"
{
yyerror("EOF inside include directive");
BEGIN(inc_prev);
}
YY_BREAK
-case 367:
+case 374:
YY_RULE_SETUP
-#line 633 "util/configlexer.lex"
+#line 640 "util/configlexer.lex"
{ LEXOUT(("ISP ")); /* ignore */ }
YY_BREAK
-case 368:
-/* rule 368 can match eol */
+case 375:
+/* rule 375 can match eol */
YY_RULE_SETUP
-#line 634 "util/configlexer.lex"
+#line 641 "util/configlexer.lex"
{ LEXOUT(("NL\n")); cfg_parser->line++;}
YY_BREAK
-case 369:
+case 376:
YY_RULE_SETUP
-#line 635 "util/configlexer.lex"
+#line 642 "util/configlexer.lex"
{ LEXOUT(("IQS ")); BEGIN(include_quoted); }
YY_BREAK
-case 370:
+case 377:
YY_RULE_SETUP
-#line 636 "util/configlexer.lex"
+#line 643 "util/configlexer.lex"
{
LEXOUT(("Iunquotedstr(%s) ", yytext));
config_start_include_glob(yytext, 0);
@@ -6513,27 +6634,27 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(include_quoted):
-#line 641 "util/configlexer.lex"
+#line 648 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
BEGIN(inc_prev);
}
YY_BREAK
-case 371:
+case 378:
YY_RULE_SETUP
-#line 645 "util/configlexer.lex"
+#line 652 "util/configlexer.lex"
{ LEXOUT(("ISTR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 372:
-/* rule 372 can match eol */
+case 379:
+/* rule 379 can match eol */
YY_RULE_SETUP
-#line 646 "util/configlexer.lex"
+#line 653 "util/configlexer.lex"
{ yyerror("newline before \" in include name");
cfg_parser->line++; BEGIN(inc_prev); }
YY_BREAK
-case 373:
+case 380:
YY_RULE_SETUP
-#line 648 "util/configlexer.lex"
+#line 655 "util/configlexer.lex"
{
LEXOUT(("IQE "));
yytext[yyleng - 1] = '\0';
@@ -6543,7 +6664,7 @@ YY_RULE_SETUP
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(val):
-#line 654 "util/configlexer.lex"
+#line 661 "util/configlexer.lex"
{
LEXOUT(("LEXEOF "));
yy_set_bol(1); /* Set beginning of line, so "^" rules match. */
@@ -6558,39 +6679,39 @@ case YY_STATE_EOF(val):
}
YY_BREAK
/* include-toplevel: directive */
-case 374:
+case 381:
YY_RULE_SETUP
-#line 668 "util/configlexer.lex"
+#line 675 "util/configlexer.lex"
{
LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include_toplevel);
}
YY_BREAK
case YY_STATE_EOF(include_toplevel):
-#line 671 "util/configlexer.lex"
+#line 678 "util/configlexer.lex"
{
yyerror("EOF inside include_toplevel directive");
BEGIN(inc_prev);
}
YY_BREAK
-case 375:
+case 382:
YY_RULE_SETUP
-#line 675 "util/configlexer.lex"
+#line 682 "util/configlexer.lex"
{ LEXOUT(("ITSP ")); /* ignore */ }
YY_BREAK
-case 376:
-/* rule 376 can match eol */
+case 383:
+/* rule 383 can match eol */
YY_RULE_SETUP
-#line 676 "util/configlexer.lex"
+#line 683 "util/configlexer.lex"
{ LEXOUT(("NL\n")); cfg_parser->line++; }
YY_BREAK
-case 377:
+case 384:
YY_RULE_SETUP
-#line 677 "util/configlexer.lex"
+#line 684 "util/configlexer.lex"
{ LEXOUT(("ITQS ")); BEGIN(include_toplevel_quoted); }
YY_BREAK
-case 378:
+case 385:
YY_RULE_SETUP
-#line 678 "util/configlexer.lex"
+#line 685 "util/configlexer.lex"
{
LEXOUT(("ITunquotedstr(%s) ", yytext));
config_start_include_glob(yytext, 1);
@@ -6599,29 +6720,29 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(include_toplevel_quoted):
-#line 684 "util/configlexer.lex"
+#line 691 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
BEGIN(inc_prev);
}
YY_BREAK
-case 379:
+case 386:
YY_RULE_SETUP
-#line 688 "util/configlexer.lex"
+#line 695 "util/configlexer.lex"
{ LEXOUT(("ITSTR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 380:
-/* rule 380 can match eol */
+case 387:
+/* rule 387 can match eol */
YY_RULE_SETUP
-#line 689 "util/configlexer.lex"
+#line 696 "util/configlexer.lex"
{
yyerror("newline before \" in include name");
cfg_parser->line++; BEGIN(inc_prev);
}
YY_BREAK
-case 381:
+case 388:
YY_RULE_SETUP
-#line 693 "util/configlexer.lex"
+#line 700 "util/configlexer.lex"
{
LEXOUT(("ITQE "));
yytext[yyleng - 1] = '\0';
@@ -6630,33 +6751,33 @@ YY_RULE_SETUP
return (VAR_FORCE_TOPLEVEL);
}
YY_BREAK
-case 382:
+case 389:
YY_RULE_SETUP
-#line 701 "util/configlexer.lex"
+#line 708 "util/configlexer.lex"
{ LEXOUT(("unquotedstr(%s) ", yytext));
if(--num_args == 0) { BEGIN(INITIAL); }
yylval.str = strdup(yytext); return STRING_ARG; }
YY_BREAK
-case 383:
+case 390:
YY_RULE_SETUP
-#line 705 "util/configlexer.lex"
+#line 712 "util/configlexer.lex"
{
ub_c_error_msg("unknown keyword '%s'", yytext);
}
YY_BREAK
-case 384:
+case 391:
YY_RULE_SETUP
-#line 709 "util/configlexer.lex"
+#line 716 "util/configlexer.lex"
{
ub_c_error_msg("stray '%s'", yytext);
}
YY_BREAK
-case 385:
+case 392:
YY_RULE_SETUP
-#line 713 "util/configlexer.lex"
+#line 720 "util/configlexer.lex"
ECHO;
YY_BREAK
-#line 6657 "<stdout>"
+#line 6778 "<stdout>"
case YY_END_OF_BUFFER:
{
@@ -6951,7 +7072,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 3816 )
+ if ( yy_current_state >= 3905 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -6979,11 +7100,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 3816 )
+ if ( yy_current_state >= 3905 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 3815);
+ yy_is_jam = (yy_current_state == 3904);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -7622,6 +7743,6 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 713 "util/configlexer.lex"
+#line 720 "util/configlexer.lex"
diff --git a/contrib/unbound/util/configlexer.lex b/contrib/unbound/util/configlexer.lex
index c114678eafb3..521056992b04 100644
--- a/contrib/unbound/util/configlexer.lex
+++ b/contrib/unbound/util/configlexer.lex
@@ -298,6 +298,7 @@ rrset-cache-size{COLON} { YDVAR(1, VAR_RRSET_CACHE_SIZE) }
rrset-cache-slabs{COLON} { YDVAR(1, VAR_RRSET_CACHE_SLABS) }
cache-max-ttl{COLON} { YDVAR(1, VAR_CACHE_MAX_TTL) }
cache-max-negative-ttl{COLON} { YDVAR(1, VAR_CACHE_MAX_NEGATIVE_TTL) }
+cache-min-negative-ttl{COLON} { YDVAR(1, VAR_CACHE_MIN_NEGATIVE_TTL) }
cache-min-ttl{COLON} { YDVAR(1, VAR_CACHE_MIN_TTL) }
infra-host-ttl{COLON} { YDVAR(1, VAR_INFRA_HOST_TTL) }
infra-lame-ttl{COLON} { YDVAR(1, VAR_INFRA_LAME_TTL) }
@@ -464,6 +465,11 @@ domain-insecure{COLON} { YDVAR(1, VAR_DOMAIN_INSECURE) }
minimal-responses{COLON} { YDVAR(1, VAR_MINIMAL_RESPONSES) }
rrset-roundrobin{COLON} { YDVAR(1, VAR_RRSET_ROUNDROBIN) }
unknown-server-time-limit{COLON} { YDVAR(1, VAR_UNKNOWN_SERVER_TIME_LIMIT) }
+discard-timeout{COLON} { YDVAR(1, VAR_DISCARD_TIMEOUT) }
+wait-limit{COLON} { YDVAR(1, VAR_WAIT_LIMIT) }
+wait-limit-cookie{COLON} { YDVAR(1, VAR_WAIT_LIMIT_COOKIE) }
+wait-limit-netblock{COLON} { YDVAR(1, VAR_WAIT_LIMIT_NETBLOCK) }
+wait-limit-cookie-netblock{COLON} { YDVAR(1, VAR_WAIT_LIMIT_COOKIE_NETBLOCK) }
max-udp-size{COLON} { YDVAR(1, VAR_MAX_UDP_SIZE) }
dns64-prefix{COLON} { YDVAR(1, VAR_DNS64_PREFIX) }
dns64-synthall{COLON} { YDVAR(1, VAR_DNS64_SYNTHALL) }
@@ -561,6 +567,7 @@ cachedb{COLON} { YDVAR(0, VAR_CACHEDB) }
backend{COLON} { YDVAR(1, VAR_CACHEDB_BACKEND) }
secret-seed{COLON} { YDVAR(1, VAR_CACHEDB_SECRETSEED) }
cachedb-no-store{COLON} { YDVAR(1, VAR_CACHEDB_NO_STORE) }
+cachedb-check-when-serve-expired{COLON} { YDVAR(1, VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED) }
redis-server-host{COLON} { YDVAR(1, VAR_CACHEDB_REDISHOST) }
redis-server-port{COLON} { YDVAR(1, VAR_CACHEDB_REDISPORT) }
redis-server-path{COLON} { YDVAR(1, VAR_CACHEDB_REDISPATH) }
diff --git a/contrib/unbound/util/configparser.c b/contrib/unbound/util/configparser.c
index 71f3ae46678a..5841490f2fcc 100644
--- a/contrib/unbound/util/configparser.c
+++ b/contrib/unbound/util/configparser.c
@@ -353,504 +353,518 @@ enum yysymbol_kind_t
YYSYMBOL_VAR_CAPS_WHITELIST = 224, /* VAR_CAPS_WHITELIST */
YYSYMBOL_VAR_CACHE_MAX_NEGATIVE_TTL = 225, /* VAR_CACHE_MAX_NEGATIVE_TTL */
YYSYMBOL_VAR_PERMIT_SMALL_HOLDDOWN = 226, /* VAR_PERMIT_SMALL_HOLDDOWN */
- YYSYMBOL_VAR_QNAME_MINIMISATION = 227, /* VAR_QNAME_MINIMISATION */
- YYSYMBOL_VAR_QNAME_MINIMISATION_STRICT = 228, /* VAR_QNAME_MINIMISATION_STRICT */
- YYSYMBOL_VAR_IP_FREEBIND = 229, /* VAR_IP_FREEBIND */
- YYSYMBOL_VAR_DEFINE_TAG = 230, /* VAR_DEFINE_TAG */
- YYSYMBOL_VAR_LOCAL_ZONE_TAG = 231, /* VAR_LOCAL_ZONE_TAG */
- YYSYMBOL_VAR_ACCESS_CONTROL_TAG = 232, /* VAR_ACCESS_CONTROL_TAG */
- YYSYMBOL_VAR_LOCAL_ZONE_OVERRIDE = 233, /* VAR_LOCAL_ZONE_OVERRIDE */
- YYSYMBOL_VAR_ACCESS_CONTROL_TAG_ACTION = 234, /* VAR_ACCESS_CONTROL_TAG_ACTION */
- YYSYMBOL_VAR_ACCESS_CONTROL_TAG_DATA = 235, /* VAR_ACCESS_CONTROL_TAG_DATA */
- YYSYMBOL_VAR_VIEW = 236, /* VAR_VIEW */
- YYSYMBOL_VAR_ACCESS_CONTROL_VIEW = 237, /* VAR_ACCESS_CONTROL_VIEW */
- YYSYMBOL_VAR_VIEW_FIRST = 238, /* VAR_VIEW_FIRST */
- YYSYMBOL_VAR_SERVE_EXPIRED = 239, /* VAR_SERVE_EXPIRED */
- YYSYMBOL_VAR_SERVE_EXPIRED_TTL = 240, /* VAR_SERVE_EXPIRED_TTL */
- YYSYMBOL_VAR_SERVE_EXPIRED_TTL_RESET = 241, /* VAR_SERVE_EXPIRED_TTL_RESET */
- YYSYMBOL_VAR_SERVE_EXPIRED_REPLY_TTL = 242, /* VAR_SERVE_EXPIRED_REPLY_TTL */
- YYSYMBOL_VAR_SERVE_EXPIRED_CLIENT_TIMEOUT = 243, /* VAR_SERVE_EXPIRED_CLIENT_TIMEOUT */
- YYSYMBOL_VAR_EDE_SERVE_EXPIRED = 244, /* VAR_EDE_SERVE_EXPIRED */
- YYSYMBOL_VAR_SERVE_ORIGINAL_TTL = 245, /* VAR_SERVE_ORIGINAL_TTL */
- YYSYMBOL_VAR_FAKE_DSA = 246, /* VAR_FAKE_DSA */
- YYSYMBOL_VAR_FAKE_SHA1 = 247, /* VAR_FAKE_SHA1 */
- YYSYMBOL_VAR_LOG_IDENTITY = 248, /* VAR_LOG_IDENTITY */
- YYSYMBOL_VAR_HIDE_TRUSTANCHOR = 249, /* VAR_HIDE_TRUSTANCHOR */
- YYSYMBOL_VAR_HIDE_HTTP_USER_AGENT = 250, /* VAR_HIDE_HTTP_USER_AGENT */
- YYSYMBOL_VAR_HTTP_USER_AGENT = 251, /* VAR_HTTP_USER_AGENT */
- YYSYMBOL_VAR_TRUST_ANCHOR_SIGNALING = 252, /* VAR_TRUST_ANCHOR_SIGNALING */
- YYSYMBOL_VAR_AGGRESSIVE_NSEC = 253, /* VAR_AGGRESSIVE_NSEC */
- YYSYMBOL_VAR_USE_SYSTEMD = 254, /* VAR_USE_SYSTEMD */
- YYSYMBOL_VAR_SHM_ENABLE = 255, /* VAR_SHM_ENABLE */
- YYSYMBOL_VAR_SHM_KEY = 256, /* VAR_SHM_KEY */
- YYSYMBOL_VAR_ROOT_KEY_SENTINEL = 257, /* VAR_ROOT_KEY_SENTINEL */
- YYSYMBOL_VAR_DNSCRYPT = 258, /* VAR_DNSCRYPT */
- YYSYMBOL_VAR_DNSCRYPT_ENABLE = 259, /* VAR_DNSCRYPT_ENABLE */
- YYSYMBOL_VAR_DNSCRYPT_PORT = 260, /* VAR_DNSCRYPT_PORT */
- YYSYMBOL_VAR_DNSCRYPT_PROVIDER = 261, /* VAR_DNSCRYPT_PROVIDER */
- YYSYMBOL_VAR_DNSCRYPT_SECRET_KEY = 262, /* VAR_DNSCRYPT_SECRET_KEY */
- YYSYMBOL_VAR_DNSCRYPT_PROVIDER_CERT = 263, /* VAR_DNSCRYPT_PROVIDER_CERT */
- YYSYMBOL_VAR_DNSCRYPT_PROVIDER_CERT_ROTATED = 264, /* VAR_DNSCRYPT_PROVIDER_CERT_ROTATED */
- YYSYMBOL_VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE = 265, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE */
- YYSYMBOL_VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS = 266, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS */
- YYSYMBOL_VAR_DNSCRYPT_NONCE_CACHE_SIZE = 267, /* VAR_DNSCRYPT_NONCE_CACHE_SIZE */
- YYSYMBOL_VAR_DNSCRYPT_NONCE_CACHE_SLABS = 268, /* VAR_DNSCRYPT_NONCE_CACHE_SLABS */
- YYSYMBOL_VAR_PAD_RESPONSES = 269, /* VAR_PAD_RESPONSES */
- YYSYMBOL_VAR_PAD_RESPONSES_BLOCK_SIZE = 270, /* VAR_PAD_RESPONSES_BLOCK_SIZE */
- YYSYMBOL_VAR_PAD_QUERIES = 271, /* VAR_PAD_QUERIES */
- YYSYMBOL_VAR_PAD_QUERIES_BLOCK_SIZE = 272, /* VAR_PAD_QUERIES_BLOCK_SIZE */
- YYSYMBOL_VAR_IPSECMOD_ENABLED = 273, /* VAR_IPSECMOD_ENABLED */
- YYSYMBOL_VAR_IPSECMOD_HOOK = 274, /* VAR_IPSECMOD_HOOK */
- YYSYMBOL_VAR_IPSECMOD_IGNORE_BOGUS = 275, /* VAR_IPSECMOD_IGNORE_BOGUS */
- YYSYMBOL_VAR_IPSECMOD_MAX_TTL = 276, /* VAR_IPSECMOD_MAX_TTL */
- YYSYMBOL_VAR_IPSECMOD_WHITELIST = 277, /* VAR_IPSECMOD_WHITELIST */
- YYSYMBOL_VAR_IPSECMOD_STRICT = 278, /* VAR_IPSECMOD_STRICT */
- YYSYMBOL_VAR_CACHEDB = 279, /* VAR_CACHEDB */
- YYSYMBOL_VAR_CACHEDB_BACKEND = 280, /* VAR_CACHEDB_BACKEND */
- YYSYMBOL_VAR_CACHEDB_SECRETSEED = 281, /* VAR_CACHEDB_SECRETSEED */
- YYSYMBOL_VAR_CACHEDB_REDISHOST = 282, /* VAR_CACHEDB_REDISHOST */
- YYSYMBOL_VAR_CACHEDB_REDISPORT = 283, /* VAR_CACHEDB_REDISPORT */
- YYSYMBOL_VAR_CACHEDB_REDISTIMEOUT = 284, /* VAR_CACHEDB_REDISTIMEOUT */
- YYSYMBOL_VAR_CACHEDB_REDISEXPIRERECORDS = 285, /* VAR_CACHEDB_REDISEXPIRERECORDS */
- YYSYMBOL_VAR_CACHEDB_REDISPATH = 286, /* VAR_CACHEDB_REDISPATH */
- YYSYMBOL_VAR_CACHEDB_REDISPASSWORD = 287, /* VAR_CACHEDB_REDISPASSWORD */
- YYSYMBOL_VAR_CACHEDB_REDISLOGICALDB = 288, /* VAR_CACHEDB_REDISLOGICALDB */
- YYSYMBOL_VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM = 289, /* VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM */
- YYSYMBOL_VAR_FOR_UPSTREAM = 290, /* VAR_FOR_UPSTREAM */
- YYSYMBOL_VAR_AUTH_ZONE = 291, /* VAR_AUTH_ZONE */
- YYSYMBOL_VAR_ZONEFILE = 292, /* VAR_ZONEFILE */
- YYSYMBOL_VAR_MASTER = 293, /* VAR_MASTER */
- YYSYMBOL_VAR_URL = 294, /* VAR_URL */
- YYSYMBOL_VAR_FOR_DOWNSTREAM = 295, /* VAR_FOR_DOWNSTREAM */
- YYSYMBOL_VAR_FALLBACK_ENABLED = 296, /* VAR_FALLBACK_ENABLED */
- YYSYMBOL_VAR_TLS_ADDITIONAL_PORT = 297, /* VAR_TLS_ADDITIONAL_PORT */
- YYSYMBOL_VAR_LOW_RTT = 298, /* VAR_LOW_RTT */
- YYSYMBOL_VAR_LOW_RTT_PERMIL = 299, /* VAR_LOW_RTT_PERMIL */
- YYSYMBOL_VAR_FAST_SERVER_PERMIL = 300, /* VAR_FAST_SERVER_PERMIL */
- YYSYMBOL_VAR_FAST_SERVER_NUM = 301, /* VAR_FAST_SERVER_NUM */
- YYSYMBOL_VAR_ALLOW_NOTIFY = 302, /* VAR_ALLOW_NOTIFY */
- YYSYMBOL_VAR_TLS_WIN_CERT = 303, /* VAR_TLS_WIN_CERT */
- YYSYMBOL_VAR_TCP_CONNECTION_LIMIT = 304, /* VAR_TCP_CONNECTION_LIMIT */
- YYSYMBOL_VAR_ANSWER_COOKIE = 305, /* VAR_ANSWER_COOKIE */
- YYSYMBOL_VAR_COOKIE_SECRET = 306, /* VAR_COOKIE_SECRET */
- YYSYMBOL_VAR_IP_RATELIMIT_COOKIE = 307, /* VAR_IP_RATELIMIT_COOKIE */
- YYSYMBOL_VAR_FORWARD_NO_CACHE = 308, /* VAR_FORWARD_NO_CACHE */
- YYSYMBOL_VAR_STUB_NO_CACHE = 309, /* VAR_STUB_NO_CACHE */
- YYSYMBOL_VAR_LOG_SERVFAIL = 310, /* VAR_LOG_SERVFAIL */
- YYSYMBOL_VAR_DENY_ANY = 311, /* VAR_DENY_ANY */
- YYSYMBOL_VAR_UNKNOWN_SERVER_TIME_LIMIT = 312, /* VAR_UNKNOWN_SERVER_TIME_LIMIT */
- YYSYMBOL_VAR_LOG_TAG_QUERYREPLY = 313, /* VAR_LOG_TAG_QUERYREPLY */
- YYSYMBOL_VAR_STREAM_WAIT_SIZE = 314, /* VAR_STREAM_WAIT_SIZE */
- YYSYMBOL_VAR_TLS_CIPHERS = 315, /* VAR_TLS_CIPHERS */
- YYSYMBOL_VAR_TLS_CIPHERSUITES = 316, /* VAR_TLS_CIPHERSUITES */
- YYSYMBOL_VAR_TLS_USE_SNI = 317, /* VAR_TLS_USE_SNI */
- YYSYMBOL_VAR_IPSET = 318, /* VAR_IPSET */
- YYSYMBOL_VAR_IPSET_NAME_V4 = 319, /* VAR_IPSET_NAME_V4 */
- YYSYMBOL_VAR_IPSET_NAME_V6 = 320, /* VAR_IPSET_NAME_V6 */
- YYSYMBOL_VAR_TLS_SESSION_TICKET_KEYS = 321, /* VAR_TLS_SESSION_TICKET_KEYS */
- YYSYMBOL_VAR_RPZ = 322, /* VAR_RPZ */
- YYSYMBOL_VAR_TAGS = 323, /* VAR_TAGS */
- YYSYMBOL_VAR_RPZ_ACTION_OVERRIDE = 324, /* VAR_RPZ_ACTION_OVERRIDE */
- YYSYMBOL_VAR_RPZ_CNAME_OVERRIDE = 325, /* VAR_RPZ_CNAME_OVERRIDE */
- YYSYMBOL_VAR_RPZ_LOG = 326, /* VAR_RPZ_LOG */
- YYSYMBOL_VAR_RPZ_LOG_NAME = 327, /* VAR_RPZ_LOG_NAME */
- YYSYMBOL_VAR_DYNLIB = 328, /* VAR_DYNLIB */
- YYSYMBOL_VAR_DYNLIB_FILE = 329, /* VAR_DYNLIB_FILE */
- YYSYMBOL_VAR_EDNS_CLIENT_STRING = 330, /* VAR_EDNS_CLIENT_STRING */
- YYSYMBOL_VAR_EDNS_CLIENT_STRING_OPCODE = 331, /* VAR_EDNS_CLIENT_STRING_OPCODE */
- YYSYMBOL_VAR_NSID = 332, /* VAR_NSID */
- YYSYMBOL_VAR_ZONEMD_PERMISSIVE_MODE = 333, /* VAR_ZONEMD_PERMISSIVE_MODE */
- YYSYMBOL_VAR_ZONEMD_CHECK = 334, /* VAR_ZONEMD_CHECK */
- YYSYMBOL_VAR_ZONEMD_REJECT_ABSENCE = 335, /* VAR_ZONEMD_REJECT_ABSENCE */
- YYSYMBOL_VAR_RPZ_SIGNAL_NXDOMAIN_RA = 336, /* VAR_RPZ_SIGNAL_NXDOMAIN_RA */
- YYSYMBOL_VAR_INTERFACE_AUTOMATIC_PORTS = 337, /* VAR_INTERFACE_AUTOMATIC_PORTS */
- YYSYMBOL_VAR_EDE = 338, /* VAR_EDE */
- YYSYMBOL_VAR_INTERFACE_ACTION = 339, /* VAR_INTERFACE_ACTION */
- YYSYMBOL_VAR_INTERFACE_VIEW = 340, /* VAR_INTERFACE_VIEW */
- YYSYMBOL_VAR_INTERFACE_TAG = 341, /* VAR_INTERFACE_TAG */
- YYSYMBOL_VAR_INTERFACE_TAG_ACTION = 342, /* VAR_INTERFACE_TAG_ACTION */
- YYSYMBOL_VAR_INTERFACE_TAG_DATA = 343, /* VAR_INTERFACE_TAG_DATA */
- YYSYMBOL_VAR_PROXY_PROTOCOL_PORT = 344, /* VAR_PROXY_PROTOCOL_PORT */
- YYSYMBOL_VAR_STATISTICS_INHIBIT_ZERO = 345, /* VAR_STATISTICS_INHIBIT_ZERO */
- YYSYMBOL_VAR_HARDEN_UNKNOWN_ADDITIONAL = 346, /* VAR_HARDEN_UNKNOWN_ADDITIONAL */
- YYSYMBOL_VAR_DISABLE_EDNS_DO = 347, /* VAR_DISABLE_EDNS_DO */
- YYSYMBOL_VAR_CACHEDB_NO_STORE = 348, /* VAR_CACHEDB_NO_STORE */
- YYSYMBOL_VAR_LOG_DESTADDR = 349, /* VAR_LOG_DESTADDR */
- YYSYMBOL_YYACCEPT = 350, /* $accept */
- YYSYMBOL_toplevelvars = 351, /* toplevelvars */
- YYSYMBOL_toplevelvar = 352, /* toplevelvar */
- YYSYMBOL_force_toplevel = 353, /* force_toplevel */
- YYSYMBOL_serverstart = 354, /* serverstart */
- YYSYMBOL_contents_server = 355, /* contents_server */
- YYSYMBOL_content_server = 356, /* content_server */
- YYSYMBOL_stubstart = 357, /* stubstart */
- YYSYMBOL_contents_stub = 358, /* contents_stub */
- YYSYMBOL_content_stub = 359, /* content_stub */
- YYSYMBOL_forwardstart = 360, /* forwardstart */
- YYSYMBOL_contents_forward = 361, /* contents_forward */
- YYSYMBOL_content_forward = 362, /* content_forward */
- YYSYMBOL_viewstart = 363, /* viewstart */
- YYSYMBOL_contents_view = 364, /* contents_view */
- YYSYMBOL_content_view = 365, /* content_view */
- YYSYMBOL_authstart = 366, /* authstart */
- YYSYMBOL_contents_auth = 367, /* contents_auth */
- YYSYMBOL_content_auth = 368, /* content_auth */
- YYSYMBOL_rpz_tag = 369, /* rpz_tag */
- YYSYMBOL_rpz_action_override = 370, /* rpz_action_override */
- YYSYMBOL_rpz_cname_override = 371, /* rpz_cname_override */
- YYSYMBOL_rpz_log = 372, /* rpz_log */
- YYSYMBOL_rpz_log_name = 373, /* rpz_log_name */
- YYSYMBOL_rpz_signal_nxdomain_ra = 374, /* rpz_signal_nxdomain_ra */
- YYSYMBOL_rpzstart = 375, /* rpzstart */
- YYSYMBOL_contents_rpz = 376, /* contents_rpz */
- YYSYMBOL_content_rpz = 377, /* content_rpz */
- YYSYMBOL_server_num_threads = 378, /* server_num_threads */
- YYSYMBOL_server_verbosity = 379, /* server_verbosity */
- YYSYMBOL_server_statistics_interval = 380, /* server_statistics_interval */
- YYSYMBOL_server_statistics_cumulative = 381, /* server_statistics_cumulative */
- YYSYMBOL_server_extended_statistics = 382, /* server_extended_statistics */
- YYSYMBOL_server_statistics_inhibit_zero = 383, /* server_statistics_inhibit_zero */
- YYSYMBOL_server_shm_enable = 384, /* server_shm_enable */
- YYSYMBOL_server_shm_key = 385, /* server_shm_key */
- YYSYMBOL_server_port = 386, /* server_port */
- YYSYMBOL_server_send_client_subnet = 387, /* server_send_client_subnet */
- YYSYMBOL_server_client_subnet_zone = 388, /* server_client_subnet_zone */
- YYSYMBOL_server_client_subnet_always_forward = 389, /* server_client_subnet_always_forward */
- YYSYMBOL_server_client_subnet_opcode = 390, /* server_client_subnet_opcode */
- YYSYMBOL_server_max_client_subnet_ipv4 = 391, /* server_max_client_subnet_ipv4 */
- YYSYMBOL_server_max_client_subnet_ipv6 = 392, /* server_max_client_subnet_ipv6 */
- YYSYMBOL_server_min_client_subnet_ipv4 = 393, /* server_min_client_subnet_ipv4 */
- YYSYMBOL_server_min_client_subnet_ipv6 = 394, /* server_min_client_subnet_ipv6 */
- YYSYMBOL_server_max_ecs_tree_size_ipv4 = 395, /* server_max_ecs_tree_size_ipv4 */
- YYSYMBOL_server_max_ecs_tree_size_ipv6 = 396, /* server_max_ecs_tree_size_ipv6 */
- YYSYMBOL_server_interface = 397, /* server_interface */
- YYSYMBOL_server_outgoing_interface = 398, /* server_outgoing_interface */
- YYSYMBOL_server_outgoing_range = 399, /* server_outgoing_range */
- YYSYMBOL_server_outgoing_port_permit = 400, /* server_outgoing_port_permit */
- YYSYMBOL_server_outgoing_port_avoid = 401, /* server_outgoing_port_avoid */
- YYSYMBOL_server_outgoing_num_tcp = 402, /* server_outgoing_num_tcp */
- YYSYMBOL_server_incoming_num_tcp = 403, /* server_incoming_num_tcp */
- YYSYMBOL_server_interface_automatic = 404, /* server_interface_automatic */
- YYSYMBOL_server_interface_automatic_ports = 405, /* server_interface_automatic_ports */
- YYSYMBOL_server_do_ip4 = 406, /* server_do_ip4 */
- YYSYMBOL_server_do_ip6 = 407, /* server_do_ip6 */
- YYSYMBOL_server_do_nat64 = 408, /* server_do_nat64 */
- YYSYMBOL_server_do_udp = 409, /* server_do_udp */
- YYSYMBOL_server_do_tcp = 410, /* server_do_tcp */
- YYSYMBOL_server_prefer_ip4 = 411, /* server_prefer_ip4 */
- YYSYMBOL_server_prefer_ip6 = 412, /* server_prefer_ip6 */
- YYSYMBOL_server_tcp_mss = 413, /* server_tcp_mss */
- YYSYMBOL_server_outgoing_tcp_mss = 414, /* server_outgoing_tcp_mss */
- YYSYMBOL_server_tcp_idle_timeout = 415, /* server_tcp_idle_timeout */
- YYSYMBOL_server_max_reuse_tcp_queries = 416, /* server_max_reuse_tcp_queries */
- YYSYMBOL_server_tcp_reuse_timeout = 417, /* server_tcp_reuse_timeout */
- YYSYMBOL_server_tcp_auth_query_timeout = 418, /* server_tcp_auth_query_timeout */
- YYSYMBOL_server_tcp_keepalive = 419, /* server_tcp_keepalive */
- YYSYMBOL_server_tcp_keepalive_timeout = 420, /* server_tcp_keepalive_timeout */
- YYSYMBOL_server_sock_queue_timeout = 421, /* server_sock_queue_timeout */
- YYSYMBOL_server_tcp_upstream = 422, /* server_tcp_upstream */
- YYSYMBOL_server_udp_upstream_without_downstream = 423, /* server_udp_upstream_without_downstream */
- YYSYMBOL_server_ssl_upstream = 424, /* server_ssl_upstream */
- YYSYMBOL_server_ssl_service_key = 425, /* server_ssl_service_key */
- YYSYMBOL_server_ssl_service_pem = 426, /* server_ssl_service_pem */
- YYSYMBOL_server_ssl_port = 427, /* server_ssl_port */
- YYSYMBOL_server_tls_cert_bundle = 428, /* server_tls_cert_bundle */
- YYSYMBOL_server_tls_win_cert = 429, /* server_tls_win_cert */
- YYSYMBOL_server_tls_additional_port = 430, /* server_tls_additional_port */
- YYSYMBOL_server_tls_ciphers = 431, /* server_tls_ciphers */
- YYSYMBOL_server_tls_ciphersuites = 432, /* server_tls_ciphersuites */
- YYSYMBOL_server_tls_session_ticket_keys = 433, /* server_tls_session_ticket_keys */
- YYSYMBOL_server_tls_use_sni = 434, /* server_tls_use_sni */
- YYSYMBOL_server_https_port = 435, /* server_https_port */
- YYSYMBOL_server_http_endpoint = 436, /* server_http_endpoint */
- YYSYMBOL_server_http_max_streams = 437, /* server_http_max_streams */
- YYSYMBOL_server_http_query_buffer_size = 438, /* server_http_query_buffer_size */
- YYSYMBOL_server_http_response_buffer_size = 439, /* server_http_response_buffer_size */
- YYSYMBOL_server_http_nodelay = 440, /* server_http_nodelay */
- YYSYMBOL_server_http_notls_downstream = 441, /* server_http_notls_downstream */
- YYSYMBOL_server_use_systemd = 442, /* server_use_systemd */
- YYSYMBOL_server_do_daemonize = 443, /* server_do_daemonize */
- YYSYMBOL_server_use_syslog = 444, /* server_use_syslog */
- YYSYMBOL_server_log_time_ascii = 445, /* server_log_time_ascii */
- YYSYMBOL_server_log_queries = 446, /* server_log_queries */
- YYSYMBOL_server_log_replies = 447, /* server_log_replies */
- YYSYMBOL_server_log_tag_queryreply = 448, /* server_log_tag_queryreply */
- YYSYMBOL_server_log_servfail = 449, /* server_log_servfail */
- YYSYMBOL_server_log_destaddr = 450, /* server_log_destaddr */
- YYSYMBOL_server_log_local_actions = 451, /* server_log_local_actions */
- YYSYMBOL_server_chroot = 452, /* server_chroot */
- YYSYMBOL_server_username = 453, /* server_username */
- YYSYMBOL_server_directory = 454, /* server_directory */
- YYSYMBOL_server_logfile = 455, /* server_logfile */
- YYSYMBOL_server_pidfile = 456, /* server_pidfile */
- YYSYMBOL_server_root_hints = 457, /* server_root_hints */
- YYSYMBOL_server_dlv_anchor_file = 458, /* server_dlv_anchor_file */
- YYSYMBOL_server_dlv_anchor = 459, /* server_dlv_anchor */
- YYSYMBOL_server_auto_trust_anchor_file = 460, /* server_auto_trust_anchor_file */
- YYSYMBOL_server_trust_anchor_file = 461, /* server_trust_anchor_file */
- YYSYMBOL_server_trusted_keys_file = 462, /* server_trusted_keys_file */
- YYSYMBOL_server_trust_anchor = 463, /* server_trust_anchor */
- YYSYMBOL_server_trust_anchor_signaling = 464, /* server_trust_anchor_signaling */
- YYSYMBOL_server_root_key_sentinel = 465, /* server_root_key_sentinel */
- YYSYMBOL_server_domain_insecure = 466, /* server_domain_insecure */
- YYSYMBOL_server_hide_identity = 467, /* server_hide_identity */
- YYSYMBOL_server_hide_version = 468, /* server_hide_version */
- YYSYMBOL_server_hide_trustanchor = 469, /* server_hide_trustanchor */
- YYSYMBOL_server_hide_http_user_agent = 470, /* server_hide_http_user_agent */
- YYSYMBOL_server_identity = 471, /* server_identity */
- YYSYMBOL_server_version = 472, /* server_version */
- YYSYMBOL_server_http_user_agent = 473, /* server_http_user_agent */
- YYSYMBOL_server_nsid = 474, /* server_nsid */
- YYSYMBOL_server_so_rcvbuf = 475, /* server_so_rcvbuf */
- YYSYMBOL_server_so_sndbuf = 476, /* server_so_sndbuf */
- YYSYMBOL_server_so_reuseport = 477, /* server_so_reuseport */
- YYSYMBOL_server_ip_transparent = 478, /* server_ip_transparent */
- YYSYMBOL_server_ip_freebind = 479, /* server_ip_freebind */
- YYSYMBOL_server_ip_dscp = 480, /* server_ip_dscp */
- YYSYMBOL_server_stream_wait_size = 481, /* server_stream_wait_size */
- YYSYMBOL_server_edns_buffer_size = 482, /* server_edns_buffer_size */
- YYSYMBOL_server_msg_buffer_size = 483, /* server_msg_buffer_size */
- YYSYMBOL_server_msg_cache_size = 484, /* server_msg_cache_size */
- YYSYMBOL_server_msg_cache_slabs = 485, /* server_msg_cache_slabs */
- YYSYMBOL_server_num_queries_per_thread = 486, /* server_num_queries_per_thread */
- YYSYMBOL_server_jostle_timeout = 487, /* server_jostle_timeout */
- YYSYMBOL_server_delay_close = 488, /* server_delay_close */
- YYSYMBOL_server_udp_connect = 489, /* server_udp_connect */
- YYSYMBOL_server_unblock_lan_zones = 490, /* server_unblock_lan_zones */
- YYSYMBOL_server_insecure_lan_zones = 491, /* server_insecure_lan_zones */
- YYSYMBOL_server_rrset_cache_size = 492, /* server_rrset_cache_size */
- YYSYMBOL_server_rrset_cache_slabs = 493, /* server_rrset_cache_slabs */
- YYSYMBOL_server_infra_host_ttl = 494, /* server_infra_host_ttl */
- YYSYMBOL_server_infra_lame_ttl = 495, /* server_infra_lame_ttl */
- YYSYMBOL_server_infra_cache_numhosts = 496, /* server_infra_cache_numhosts */
- YYSYMBOL_server_infra_cache_lame_size = 497, /* server_infra_cache_lame_size */
- YYSYMBOL_server_infra_cache_slabs = 498, /* server_infra_cache_slabs */
- YYSYMBOL_server_infra_cache_min_rtt = 499, /* server_infra_cache_min_rtt */
- YYSYMBOL_server_infra_cache_max_rtt = 500, /* server_infra_cache_max_rtt */
- YYSYMBOL_server_infra_keep_probing = 501, /* server_infra_keep_probing */
- YYSYMBOL_server_target_fetch_policy = 502, /* server_target_fetch_policy */
- YYSYMBOL_server_harden_short_bufsize = 503, /* server_harden_short_bufsize */
- YYSYMBOL_server_harden_large_queries = 504, /* server_harden_large_queries */
- YYSYMBOL_server_harden_glue = 505, /* server_harden_glue */
- YYSYMBOL_server_harden_dnssec_stripped = 506, /* server_harden_dnssec_stripped */
- YYSYMBOL_server_harden_below_nxdomain = 507, /* server_harden_below_nxdomain */
- YYSYMBOL_server_harden_referral_path = 508, /* server_harden_referral_path */
- YYSYMBOL_server_harden_algo_downgrade = 509, /* server_harden_algo_downgrade */
- YYSYMBOL_server_harden_unknown_additional = 510, /* server_harden_unknown_additional */
- YYSYMBOL_server_use_caps_for_id = 511, /* server_use_caps_for_id */
- YYSYMBOL_server_caps_whitelist = 512, /* server_caps_whitelist */
- YYSYMBOL_server_private_address = 513, /* server_private_address */
- YYSYMBOL_server_private_domain = 514, /* server_private_domain */
- YYSYMBOL_server_prefetch = 515, /* server_prefetch */
- YYSYMBOL_server_prefetch_key = 516, /* server_prefetch_key */
- YYSYMBOL_server_deny_any = 517, /* server_deny_any */
- YYSYMBOL_server_unwanted_reply_threshold = 518, /* server_unwanted_reply_threshold */
- YYSYMBOL_server_do_not_query_address = 519, /* server_do_not_query_address */
- YYSYMBOL_server_do_not_query_localhost = 520, /* server_do_not_query_localhost */
- YYSYMBOL_server_access_control = 521, /* server_access_control */
- YYSYMBOL_server_interface_action = 522, /* server_interface_action */
- YYSYMBOL_server_module_conf = 523, /* server_module_conf */
- YYSYMBOL_server_val_override_date = 524, /* server_val_override_date */
- YYSYMBOL_server_val_sig_skew_min = 525, /* server_val_sig_skew_min */
- YYSYMBOL_server_val_sig_skew_max = 526, /* server_val_sig_skew_max */
- YYSYMBOL_server_val_max_restart = 527, /* server_val_max_restart */
- YYSYMBOL_server_cache_max_ttl = 528, /* server_cache_max_ttl */
- YYSYMBOL_server_cache_max_negative_ttl = 529, /* server_cache_max_negative_ttl */
- YYSYMBOL_server_cache_min_ttl = 530, /* server_cache_min_ttl */
- YYSYMBOL_server_bogus_ttl = 531, /* server_bogus_ttl */
- YYSYMBOL_server_val_clean_additional = 532, /* server_val_clean_additional */
- YYSYMBOL_server_val_permissive_mode = 533, /* server_val_permissive_mode */
- YYSYMBOL_server_aggressive_nsec = 534, /* server_aggressive_nsec */
- YYSYMBOL_server_ignore_cd_flag = 535, /* server_ignore_cd_flag */
- YYSYMBOL_server_disable_edns_do = 536, /* server_disable_edns_do */
- YYSYMBOL_server_serve_expired = 537, /* server_serve_expired */
- YYSYMBOL_server_serve_expired_ttl = 538, /* server_serve_expired_ttl */
- YYSYMBOL_server_serve_expired_ttl_reset = 539, /* server_serve_expired_ttl_reset */
- YYSYMBOL_server_serve_expired_reply_ttl = 540, /* server_serve_expired_reply_ttl */
- YYSYMBOL_server_serve_expired_client_timeout = 541, /* server_serve_expired_client_timeout */
- YYSYMBOL_server_ede_serve_expired = 542, /* server_ede_serve_expired */
- YYSYMBOL_server_serve_original_ttl = 543, /* server_serve_original_ttl */
- YYSYMBOL_server_fake_dsa = 544, /* server_fake_dsa */
- YYSYMBOL_server_fake_sha1 = 545, /* server_fake_sha1 */
- YYSYMBOL_server_val_log_level = 546, /* server_val_log_level */
- YYSYMBOL_server_val_nsec3_keysize_iterations = 547, /* server_val_nsec3_keysize_iterations */
- YYSYMBOL_server_zonemd_permissive_mode = 548, /* server_zonemd_permissive_mode */
- YYSYMBOL_server_add_holddown = 549, /* server_add_holddown */
- YYSYMBOL_server_del_holddown = 550, /* server_del_holddown */
- YYSYMBOL_server_keep_missing = 551, /* server_keep_missing */
- YYSYMBOL_server_permit_small_holddown = 552, /* server_permit_small_holddown */
- YYSYMBOL_server_key_cache_size = 553, /* server_key_cache_size */
- YYSYMBOL_server_key_cache_slabs = 554, /* server_key_cache_slabs */
- YYSYMBOL_server_neg_cache_size = 555, /* server_neg_cache_size */
- YYSYMBOL_server_local_zone = 556, /* server_local_zone */
- YYSYMBOL_server_local_data = 557, /* server_local_data */
- YYSYMBOL_server_local_data_ptr = 558, /* server_local_data_ptr */
- YYSYMBOL_server_minimal_responses = 559, /* server_minimal_responses */
- YYSYMBOL_server_rrset_roundrobin = 560, /* server_rrset_roundrobin */
- YYSYMBOL_server_unknown_server_time_limit = 561, /* server_unknown_server_time_limit */
- YYSYMBOL_server_max_udp_size = 562, /* server_max_udp_size */
- YYSYMBOL_server_dns64_prefix = 563, /* server_dns64_prefix */
- YYSYMBOL_server_dns64_synthall = 564, /* server_dns64_synthall */
- YYSYMBOL_server_dns64_ignore_aaaa = 565, /* server_dns64_ignore_aaaa */
- YYSYMBOL_server_nat64_prefix = 566, /* server_nat64_prefix */
- YYSYMBOL_server_define_tag = 567, /* server_define_tag */
- YYSYMBOL_server_local_zone_tag = 568, /* server_local_zone_tag */
- YYSYMBOL_server_access_control_tag = 569, /* server_access_control_tag */
- YYSYMBOL_server_access_control_tag_action = 570, /* server_access_control_tag_action */
- YYSYMBOL_server_access_control_tag_data = 571, /* server_access_control_tag_data */
- YYSYMBOL_server_local_zone_override = 572, /* server_local_zone_override */
- YYSYMBOL_server_access_control_view = 573, /* server_access_control_view */
- YYSYMBOL_server_interface_tag = 574, /* server_interface_tag */
- YYSYMBOL_server_interface_tag_action = 575, /* server_interface_tag_action */
- YYSYMBOL_server_interface_tag_data = 576, /* server_interface_tag_data */
- YYSYMBOL_server_interface_view = 577, /* server_interface_view */
- YYSYMBOL_server_response_ip_tag = 578, /* server_response_ip_tag */
- YYSYMBOL_server_ip_ratelimit = 579, /* server_ip_ratelimit */
- YYSYMBOL_server_ip_ratelimit_cookie = 580, /* server_ip_ratelimit_cookie */
- YYSYMBOL_server_ratelimit = 581, /* server_ratelimit */
- YYSYMBOL_server_ip_ratelimit_size = 582, /* server_ip_ratelimit_size */
- YYSYMBOL_server_ratelimit_size = 583, /* server_ratelimit_size */
- YYSYMBOL_server_ip_ratelimit_slabs = 584, /* server_ip_ratelimit_slabs */
- YYSYMBOL_server_ratelimit_slabs = 585, /* server_ratelimit_slabs */
- YYSYMBOL_server_ratelimit_for_domain = 586, /* server_ratelimit_for_domain */
- YYSYMBOL_server_ratelimit_below_domain = 587, /* server_ratelimit_below_domain */
- YYSYMBOL_server_ip_ratelimit_factor = 588, /* server_ip_ratelimit_factor */
- YYSYMBOL_server_ratelimit_factor = 589, /* server_ratelimit_factor */
- YYSYMBOL_server_ip_ratelimit_backoff = 590, /* server_ip_ratelimit_backoff */
- YYSYMBOL_server_ratelimit_backoff = 591, /* server_ratelimit_backoff */
- YYSYMBOL_server_outbound_msg_retry = 592, /* server_outbound_msg_retry */
- YYSYMBOL_server_max_sent_count = 593, /* server_max_sent_count */
- YYSYMBOL_server_max_query_restarts = 594, /* server_max_query_restarts */
- YYSYMBOL_server_low_rtt = 595, /* server_low_rtt */
- YYSYMBOL_server_fast_server_num = 596, /* server_fast_server_num */
- YYSYMBOL_server_fast_server_permil = 597, /* server_fast_server_permil */
- YYSYMBOL_server_qname_minimisation = 598, /* server_qname_minimisation */
- YYSYMBOL_server_qname_minimisation_strict = 599, /* server_qname_minimisation_strict */
- YYSYMBOL_server_pad_responses = 600, /* server_pad_responses */
- YYSYMBOL_server_pad_responses_block_size = 601, /* server_pad_responses_block_size */
- YYSYMBOL_server_pad_queries = 602, /* server_pad_queries */
- YYSYMBOL_server_pad_queries_block_size = 603, /* server_pad_queries_block_size */
- YYSYMBOL_server_ipsecmod_enabled = 604, /* server_ipsecmod_enabled */
- YYSYMBOL_server_ipsecmod_ignore_bogus = 605, /* server_ipsecmod_ignore_bogus */
- YYSYMBOL_server_ipsecmod_hook = 606, /* server_ipsecmod_hook */
- YYSYMBOL_server_ipsecmod_max_ttl = 607, /* server_ipsecmod_max_ttl */
- YYSYMBOL_server_ipsecmod_whitelist = 608, /* server_ipsecmod_whitelist */
- YYSYMBOL_server_ipsecmod_strict = 609, /* server_ipsecmod_strict */
- YYSYMBOL_server_edns_client_string = 610, /* server_edns_client_string */
- YYSYMBOL_server_edns_client_string_opcode = 611, /* server_edns_client_string_opcode */
- YYSYMBOL_server_ede = 612, /* server_ede */
- YYSYMBOL_server_proxy_protocol_port = 613, /* server_proxy_protocol_port */
- YYSYMBOL_stub_name = 614, /* stub_name */
- YYSYMBOL_stub_host = 615, /* stub_host */
- YYSYMBOL_stub_addr = 616, /* stub_addr */
- YYSYMBOL_stub_first = 617, /* stub_first */
- YYSYMBOL_stub_no_cache = 618, /* stub_no_cache */
- YYSYMBOL_stub_ssl_upstream = 619, /* stub_ssl_upstream */
- YYSYMBOL_stub_tcp_upstream = 620, /* stub_tcp_upstream */
- YYSYMBOL_stub_prime = 621, /* stub_prime */
- YYSYMBOL_forward_name = 622, /* forward_name */
- YYSYMBOL_forward_host = 623, /* forward_host */
- YYSYMBOL_forward_addr = 624, /* forward_addr */
- YYSYMBOL_forward_first = 625, /* forward_first */
- YYSYMBOL_forward_no_cache = 626, /* forward_no_cache */
- YYSYMBOL_forward_ssl_upstream = 627, /* forward_ssl_upstream */
- YYSYMBOL_forward_tcp_upstream = 628, /* forward_tcp_upstream */
- YYSYMBOL_auth_name = 629, /* auth_name */
- YYSYMBOL_auth_zonefile = 630, /* auth_zonefile */
- YYSYMBOL_auth_master = 631, /* auth_master */
- YYSYMBOL_auth_url = 632, /* auth_url */
- YYSYMBOL_auth_allow_notify = 633, /* auth_allow_notify */
- YYSYMBOL_auth_zonemd_check = 634, /* auth_zonemd_check */
- YYSYMBOL_auth_zonemd_reject_absence = 635, /* auth_zonemd_reject_absence */
- YYSYMBOL_auth_for_downstream = 636, /* auth_for_downstream */
- YYSYMBOL_auth_for_upstream = 637, /* auth_for_upstream */
- YYSYMBOL_auth_fallback_enabled = 638, /* auth_fallback_enabled */
- YYSYMBOL_view_name = 639, /* view_name */
- YYSYMBOL_view_local_zone = 640, /* view_local_zone */
- YYSYMBOL_view_response_ip = 641, /* view_response_ip */
- YYSYMBOL_view_response_ip_data = 642, /* view_response_ip_data */
- YYSYMBOL_view_local_data = 643, /* view_local_data */
- YYSYMBOL_view_local_data_ptr = 644, /* view_local_data_ptr */
- YYSYMBOL_view_first = 645, /* view_first */
- YYSYMBOL_rcstart = 646, /* rcstart */
- YYSYMBOL_contents_rc = 647, /* contents_rc */
- YYSYMBOL_content_rc = 648, /* content_rc */
- YYSYMBOL_rc_control_enable = 649, /* rc_control_enable */
- YYSYMBOL_rc_control_port = 650, /* rc_control_port */
- YYSYMBOL_rc_control_interface = 651, /* rc_control_interface */
- YYSYMBOL_rc_control_use_cert = 652, /* rc_control_use_cert */
- YYSYMBOL_rc_server_key_file = 653, /* rc_server_key_file */
- YYSYMBOL_rc_server_cert_file = 654, /* rc_server_cert_file */
- YYSYMBOL_rc_control_key_file = 655, /* rc_control_key_file */
- YYSYMBOL_rc_control_cert_file = 656, /* rc_control_cert_file */
- YYSYMBOL_dtstart = 657, /* dtstart */
- YYSYMBOL_contents_dt = 658, /* contents_dt */
- YYSYMBOL_content_dt = 659, /* content_dt */
- YYSYMBOL_dt_dnstap_enable = 660, /* dt_dnstap_enable */
- YYSYMBOL_dt_dnstap_bidirectional = 661, /* dt_dnstap_bidirectional */
- YYSYMBOL_dt_dnstap_socket_path = 662, /* dt_dnstap_socket_path */
- YYSYMBOL_dt_dnstap_ip = 663, /* dt_dnstap_ip */
- YYSYMBOL_dt_dnstap_tls = 664, /* dt_dnstap_tls */
- YYSYMBOL_dt_dnstap_tls_server_name = 665, /* dt_dnstap_tls_server_name */
- YYSYMBOL_dt_dnstap_tls_cert_bundle = 666, /* dt_dnstap_tls_cert_bundle */
- YYSYMBOL_dt_dnstap_tls_client_key_file = 667, /* dt_dnstap_tls_client_key_file */
- YYSYMBOL_dt_dnstap_tls_client_cert_file = 668, /* dt_dnstap_tls_client_cert_file */
- YYSYMBOL_dt_dnstap_send_identity = 669, /* dt_dnstap_send_identity */
- YYSYMBOL_dt_dnstap_send_version = 670, /* dt_dnstap_send_version */
- YYSYMBOL_dt_dnstap_identity = 671, /* dt_dnstap_identity */
- YYSYMBOL_dt_dnstap_version = 672, /* dt_dnstap_version */
- YYSYMBOL_dt_dnstap_log_resolver_query_messages = 673, /* dt_dnstap_log_resolver_query_messages */
- YYSYMBOL_dt_dnstap_log_resolver_response_messages = 674, /* dt_dnstap_log_resolver_response_messages */
- YYSYMBOL_dt_dnstap_log_client_query_messages = 675, /* dt_dnstap_log_client_query_messages */
- YYSYMBOL_dt_dnstap_log_client_response_messages = 676, /* dt_dnstap_log_client_response_messages */
- YYSYMBOL_dt_dnstap_log_forwarder_query_messages = 677, /* dt_dnstap_log_forwarder_query_messages */
- YYSYMBOL_dt_dnstap_log_forwarder_response_messages = 678, /* dt_dnstap_log_forwarder_response_messages */
- YYSYMBOL_pythonstart = 679, /* pythonstart */
- YYSYMBOL_contents_py = 680, /* contents_py */
- YYSYMBOL_content_py = 681, /* content_py */
- YYSYMBOL_py_script = 682, /* py_script */
- YYSYMBOL_dynlibstart = 683, /* dynlibstart */
- YYSYMBOL_contents_dl = 684, /* contents_dl */
- YYSYMBOL_content_dl = 685, /* content_dl */
- YYSYMBOL_dl_file = 686, /* dl_file */
- YYSYMBOL_server_disable_dnssec_lame_check = 687, /* server_disable_dnssec_lame_check */
- YYSYMBOL_server_log_identity = 688, /* server_log_identity */
- YYSYMBOL_server_response_ip = 689, /* server_response_ip */
- YYSYMBOL_server_response_ip_data = 690, /* server_response_ip_data */
- YYSYMBOL_dnscstart = 691, /* dnscstart */
- YYSYMBOL_contents_dnsc = 692, /* contents_dnsc */
- YYSYMBOL_content_dnsc = 693, /* content_dnsc */
- YYSYMBOL_dnsc_dnscrypt_enable = 694, /* dnsc_dnscrypt_enable */
- YYSYMBOL_dnsc_dnscrypt_port = 695, /* dnsc_dnscrypt_port */
- YYSYMBOL_dnsc_dnscrypt_provider = 696, /* dnsc_dnscrypt_provider */
- YYSYMBOL_dnsc_dnscrypt_provider_cert = 697, /* dnsc_dnscrypt_provider_cert */
- YYSYMBOL_dnsc_dnscrypt_provider_cert_rotated = 698, /* dnsc_dnscrypt_provider_cert_rotated */
- YYSYMBOL_dnsc_dnscrypt_secret_key = 699, /* dnsc_dnscrypt_secret_key */
- YYSYMBOL_dnsc_dnscrypt_shared_secret_cache_size = 700, /* dnsc_dnscrypt_shared_secret_cache_size */
- YYSYMBOL_dnsc_dnscrypt_shared_secret_cache_slabs = 701, /* dnsc_dnscrypt_shared_secret_cache_slabs */
- YYSYMBOL_dnsc_dnscrypt_nonce_cache_size = 702, /* dnsc_dnscrypt_nonce_cache_size */
- YYSYMBOL_dnsc_dnscrypt_nonce_cache_slabs = 703, /* dnsc_dnscrypt_nonce_cache_slabs */
- YYSYMBOL_cachedbstart = 704, /* cachedbstart */
- YYSYMBOL_contents_cachedb = 705, /* contents_cachedb */
- YYSYMBOL_content_cachedb = 706, /* content_cachedb */
- YYSYMBOL_cachedb_backend_name = 707, /* cachedb_backend_name */
- YYSYMBOL_cachedb_secret_seed = 708, /* cachedb_secret_seed */
- YYSYMBOL_cachedb_no_store = 709, /* cachedb_no_store */
- YYSYMBOL_redis_server_host = 710, /* redis_server_host */
- YYSYMBOL_redis_server_port = 711, /* redis_server_port */
- YYSYMBOL_redis_server_path = 712, /* redis_server_path */
- YYSYMBOL_redis_server_password = 713, /* redis_server_password */
- YYSYMBOL_redis_timeout = 714, /* redis_timeout */
- YYSYMBOL_redis_expire_records = 715, /* redis_expire_records */
- YYSYMBOL_redis_logical_db = 716, /* redis_logical_db */
- YYSYMBOL_server_tcp_connection_limit = 717, /* server_tcp_connection_limit */
- YYSYMBOL_server_answer_cookie = 718, /* server_answer_cookie */
- YYSYMBOL_server_cookie_secret = 719, /* server_cookie_secret */
- YYSYMBOL_ipsetstart = 720, /* ipsetstart */
- YYSYMBOL_contents_ipset = 721, /* contents_ipset */
- YYSYMBOL_content_ipset = 722, /* content_ipset */
- YYSYMBOL_ipset_name_v4 = 723, /* ipset_name_v4 */
- YYSYMBOL_ipset_name_v6 = 724 /* ipset_name_v6 */
+ YYSYMBOL_VAR_CACHE_MIN_NEGATIVE_TTL = 227, /* VAR_CACHE_MIN_NEGATIVE_TTL */
+ YYSYMBOL_VAR_QNAME_MINIMISATION = 228, /* VAR_QNAME_MINIMISATION */
+ YYSYMBOL_VAR_QNAME_MINIMISATION_STRICT = 229, /* VAR_QNAME_MINIMISATION_STRICT */
+ YYSYMBOL_VAR_IP_FREEBIND = 230, /* VAR_IP_FREEBIND */
+ YYSYMBOL_VAR_DEFINE_TAG = 231, /* VAR_DEFINE_TAG */
+ YYSYMBOL_VAR_LOCAL_ZONE_TAG = 232, /* VAR_LOCAL_ZONE_TAG */
+ YYSYMBOL_VAR_ACCESS_CONTROL_TAG = 233, /* VAR_ACCESS_CONTROL_TAG */
+ YYSYMBOL_VAR_LOCAL_ZONE_OVERRIDE = 234, /* VAR_LOCAL_ZONE_OVERRIDE */
+ YYSYMBOL_VAR_ACCESS_CONTROL_TAG_ACTION = 235, /* VAR_ACCESS_CONTROL_TAG_ACTION */
+ YYSYMBOL_VAR_ACCESS_CONTROL_TAG_DATA = 236, /* VAR_ACCESS_CONTROL_TAG_DATA */
+ YYSYMBOL_VAR_VIEW = 237, /* VAR_VIEW */
+ YYSYMBOL_VAR_ACCESS_CONTROL_VIEW = 238, /* VAR_ACCESS_CONTROL_VIEW */
+ YYSYMBOL_VAR_VIEW_FIRST = 239, /* VAR_VIEW_FIRST */
+ YYSYMBOL_VAR_SERVE_EXPIRED = 240, /* VAR_SERVE_EXPIRED */
+ YYSYMBOL_VAR_SERVE_EXPIRED_TTL = 241, /* VAR_SERVE_EXPIRED_TTL */
+ YYSYMBOL_VAR_SERVE_EXPIRED_TTL_RESET = 242, /* VAR_SERVE_EXPIRED_TTL_RESET */
+ YYSYMBOL_VAR_SERVE_EXPIRED_REPLY_TTL = 243, /* VAR_SERVE_EXPIRED_REPLY_TTL */
+ YYSYMBOL_VAR_SERVE_EXPIRED_CLIENT_TIMEOUT = 244, /* VAR_SERVE_EXPIRED_CLIENT_TIMEOUT */
+ YYSYMBOL_VAR_EDE_SERVE_EXPIRED = 245, /* VAR_EDE_SERVE_EXPIRED */
+ YYSYMBOL_VAR_SERVE_ORIGINAL_TTL = 246, /* VAR_SERVE_ORIGINAL_TTL */
+ YYSYMBOL_VAR_FAKE_DSA = 247, /* VAR_FAKE_DSA */
+ YYSYMBOL_VAR_FAKE_SHA1 = 248, /* VAR_FAKE_SHA1 */
+ YYSYMBOL_VAR_LOG_IDENTITY = 249, /* VAR_LOG_IDENTITY */
+ YYSYMBOL_VAR_HIDE_TRUSTANCHOR = 250, /* VAR_HIDE_TRUSTANCHOR */
+ YYSYMBOL_VAR_HIDE_HTTP_USER_AGENT = 251, /* VAR_HIDE_HTTP_USER_AGENT */
+ YYSYMBOL_VAR_HTTP_USER_AGENT = 252, /* VAR_HTTP_USER_AGENT */
+ YYSYMBOL_VAR_TRUST_ANCHOR_SIGNALING = 253, /* VAR_TRUST_ANCHOR_SIGNALING */
+ YYSYMBOL_VAR_AGGRESSIVE_NSEC = 254, /* VAR_AGGRESSIVE_NSEC */
+ YYSYMBOL_VAR_USE_SYSTEMD = 255, /* VAR_USE_SYSTEMD */
+ YYSYMBOL_VAR_SHM_ENABLE = 256, /* VAR_SHM_ENABLE */
+ YYSYMBOL_VAR_SHM_KEY = 257, /* VAR_SHM_KEY */
+ YYSYMBOL_VAR_ROOT_KEY_SENTINEL = 258, /* VAR_ROOT_KEY_SENTINEL */
+ YYSYMBOL_VAR_DNSCRYPT = 259, /* VAR_DNSCRYPT */
+ YYSYMBOL_VAR_DNSCRYPT_ENABLE = 260, /* VAR_DNSCRYPT_ENABLE */
+ YYSYMBOL_VAR_DNSCRYPT_PORT = 261, /* VAR_DNSCRYPT_PORT */
+ YYSYMBOL_VAR_DNSCRYPT_PROVIDER = 262, /* VAR_DNSCRYPT_PROVIDER */
+ YYSYMBOL_VAR_DNSCRYPT_SECRET_KEY = 263, /* VAR_DNSCRYPT_SECRET_KEY */
+ YYSYMBOL_VAR_DNSCRYPT_PROVIDER_CERT = 264, /* VAR_DNSCRYPT_PROVIDER_CERT */
+ YYSYMBOL_VAR_DNSCRYPT_PROVIDER_CERT_ROTATED = 265, /* VAR_DNSCRYPT_PROVIDER_CERT_ROTATED */
+ YYSYMBOL_VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE = 266, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE */
+ YYSYMBOL_VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS = 267, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS */
+ YYSYMBOL_VAR_DNSCRYPT_NONCE_CACHE_SIZE = 268, /* VAR_DNSCRYPT_NONCE_CACHE_SIZE */
+ YYSYMBOL_VAR_DNSCRYPT_NONCE_CACHE_SLABS = 269, /* VAR_DNSCRYPT_NONCE_CACHE_SLABS */
+ YYSYMBOL_VAR_PAD_RESPONSES = 270, /* VAR_PAD_RESPONSES */
+ YYSYMBOL_VAR_PAD_RESPONSES_BLOCK_SIZE = 271, /* VAR_PAD_RESPONSES_BLOCK_SIZE */
+ YYSYMBOL_VAR_PAD_QUERIES = 272, /* VAR_PAD_QUERIES */
+ YYSYMBOL_VAR_PAD_QUERIES_BLOCK_SIZE = 273, /* VAR_PAD_QUERIES_BLOCK_SIZE */
+ YYSYMBOL_VAR_IPSECMOD_ENABLED = 274, /* VAR_IPSECMOD_ENABLED */
+ YYSYMBOL_VAR_IPSECMOD_HOOK = 275, /* VAR_IPSECMOD_HOOK */
+ YYSYMBOL_VAR_IPSECMOD_IGNORE_BOGUS = 276, /* VAR_IPSECMOD_IGNORE_BOGUS */
+ YYSYMBOL_VAR_IPSECMOD_MAX_TTL = 277, /* VAR_IPSECMOD_MAX_TTL */
+ YYSYMBOL_VAR_IPSECMOD_WHITELIST = 278, /* VAR_IPSECMOD_WHITELIST */
+ YYSYMBOL_VAR_IPSECMOD_STRICT = 279, /* VAR_IPSECMOD_STRICT */
+ YYSYMBOL_VAR_CACHEDB = 280, /* VAR_CACHEDB */
+ YYSYMBOL_VAR_CACHEDB_BACKEND = 281, /* VAR_CACHEDB_BACKEND */
+ YYSYMBOL_VAR_CACHEDB_SECRETSEED = 282, /* VAR_CACHEDB_SECRETSEED */
+ YYSYMBOL_VAR_CACHEDB_REDISHOST = 283, /* VAR_CACHEDB_REDISHOST */
+ YYSYMBOL_VAR_CACHEDB_REDISPORT = 284, /* VAR_CACHEDB_REDISPORT */
+ YYSYMBOL_VAR_CACHEDB_REDISTIMEOUT = 285, /* VAR_CACHEDB_REDISTIMEOUT */
+ YYSYMBOL_VAR_CACHEDB_REDISEXPIRERECORDS = 286, /* VAR_CACHEDB_REDISEXPIRERECORDS */
+ YYSYMBOL_VAR_CACHEDB_REDISPATH = 287, /* VAR_CACHEDB_REDISPATH */
+ YYSYMBOL_VAR_CACHEDB_REDISPASSWORD = 288, /* VAR_CACHEDB_REDISPASSWORD */
+ YYSYMBOL_VAR_CACHEDB_REDISLOGICALDB = 289, /* VAR_CACHEDB_REDISLOGICALDB */
+ YYSYMBOL_VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM = 290, /* VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM */
+ YYSYMBOL_VAR_FOR_UPSTREAM = 291, /* VAR_FOR_UPSTREAM */
+ YYSYMBOL_VAR_AUTH_ZONE = 292, /* VAR_AUTH_ZONE */
+ YYSYMBOL_VAR_ZONEFILE = 293, /* VAR_ZONEFILE */
+ YYSYMBOL_VAR_MASTER = 294, /* VAR_MASTER */
+ YYSYMBOL_VAR_URL = 295, /* VAR_URL */
+ YYSYMBOL_VAR_FOR_DOWNSTREAM = 296, /* VAR_FOR_DOWNSTREAM */
+ YYSYMBOL_VAR_FALLBACK_ENABLED = 297, /* VAR_FALLBACK_ENABLED */
+ YYSYMBOL_VAR_TLS_ADDITIONAL_PORT = 298, /* VAR_TLS_ADDITIONAL_PORT */
+ YYSYMBOL_VAR_LOW_RTT = 299, /* VAR_LOW_RTT */
+ YYSYMBOL_VAR_LOW_RTT_PERMIL = 300, /* VAR_LOW_RTT_PERMIL */
+ YYSYMBOL_VAR_FAST_SERVER_PERMIL = 301, /* VAR_FAST_SERVER_PERMIL */
+ YYSYMBOL_VAR_FAST_SERVER_NUM = 302, /* VAR_FAST_SERVER_NUM */
+ YYSYMBOL_VAR_ALLOW_NOTIFY = 303, /* VAR_ALLOW_NOTIFY */
+ YYSYMBOL_VAR_TLS_WIN_CERT = 304, /* VAR_TLS_WIN_CERT */
+ YYSYMBOL_VAR_TCP_CONNECTION_LIMIT = 305, /* VAR_TCP_CONNECTION_LIMIT */
+ YYSYMBOL_VAR_ANSWER_COOKIE = 306, /* VAR_ANSWER_COOKIE */
+ YYSYMBOL_VAR_COOKIE_SECRET = 307, /* VAR_COOKIE_SECRET */
+ YYSYMBOL_VAR_IP_RATELIMIT_COOKIE = 308, /* VAR_IP_RATELIMIT_COOKIE */
+ YYSYMBOL_VAR_FORWARD_NO_CACHE = 309, /* VAR_FORWARD_NO_CACHE */
+ YYSYMBOL_VAR_STUB_NO_CACHE = 310, /* VAR_STUB_NO_CACHE */
+ YYSYMBOL_VAR_LOG_SERVFAIL = 311, /* VAR_LOG_SERVFAIL */
+ YYSYMBOL_VAR_DENY_ANY = 312, /* VAR_DENY_ANY */
+ YYSYMBOL_VAR_UNKNOWN_SERVER_TIME_LIMIT = 313, /* VAR_UNKNOWN_SERVER_TIME_LIMIT */
+ YYSYMBOL_VAR_LOG_TAG_QUERYREPLY = 314, /* VAR_LOG_TAG_QUERYREPLY */
+ YYSYMBOL_VAR_DISCARD_TIMEOUT = 315, /* VAR_DISCARD_TIMEOUT */
+ YYSYMBOL_VAR_WAIT_LIMIT = 316, /* VAR_WAIT_LIMIT */
+ YYSYMBOL_VAR_WAIT_LIMIT_COOKIE = 317, /* VAR_WAIT_LIMIT_COOKIE */
+ YYSYMBOL_VAR_WAIT_LIMIT_NETBLOCK = 318, /* VAR_WAIT_LIMIT_NETBLOCK */
+ YYSYMBOL_VAR_WAIT_LIMIT_COOKIE_NETBLOCK = 319, /* VAR_WAIT_LIMIT_COOKIE_NETBLOCK */
+ YYSYMBOL_VAR_STREAM_WAIT_SIZE = 320, /* VAR_STREAM_WAIT_SIZE */
+ YYSYMBOL_VAR_TLS_CIPHERS = 321, /* VAR_TLS_CIPHERS */
+ YYSYMBOL_VAR_TLS_CIPHERSUITES = 322, /* VAR_TLS_CIPHERSUITES */
+ YYSYMBOL_VAR_TLS_USE_SNI = 323, /* VAR_TLS_USE_SNI */
+ YYSYMBOL_VAR_IPSET = 324, /* VAR_IPSET */
+ YYSYMBOL_VAR_IPSET_NAME_V4 = 325, /* VAR_IPSET_NAME_V4 */
+ YYSYMBOL_VAR_IPSET_NAME_V6 = 326, /* VAR_IPSET_NAME_V6 */
+ YYSYMBOL_VAR_TLS_SESSION_TICKET_KEYS = 327, /* VAR_TLS_SESSION_TICKET_KEYS */
+ YYSYMBOL_VAR_RPZ = 328, /* VAR_RPZ */
+ YYSYMBOL_VAR_TAGS = 329, /* VAR_TAGS */
+ YYSYMBOL_VAR_RPZ_ACTION_OVERRIDE = 330, /* VAR_RPZ_ACTION_OVERRIDE */
+ YYSYMBOL_VAR_RPZ_CNAME_OVERRIDE = 331, /* VAR_RPZ_CNAME_OVERRIDE */
+ YYSYMBOL_VAR_RPZ_LOG = 332, /* VAR_RPZ_LOG */
+ YYSYMBOL_VAR_RPZ_LOG_NAME = 333, /* VAR_RPZ_LOG_NAME */
+ YYSYMBOL_VAR_DYNLIB = 334, /* VAR_DYNLIB */
+ YYSYMBOL_VAR_DYNLIB_FILE = 335, /* VAR_DYNLIB_FILE */
+ YYSYMBOL_VAR_EDNS_CLIENT_STRING = 336, /* VAR_EDNS_CLIENT_STRING */
+ YYSYMBOL_VAR_EDNS_CLIENT_STRING_OPCODE = 337, /* VAR_EDNS_CLIENT_STRING_OPCODE */
+ YYSYMBOL_VAR_NSID = 338, /* VAR_NSID */
+ YYSYMBOL_VAR_ZONEMD_PERMISSIVE_MODE = 339, /* VAR_ZONEMD_PERMISSIVE_MODE */
+ YYSYMBOL_VAR_ZONEMD_CHECK = 340, /* VAR_ZONEMD_CHECK */
+ YYSYMBOL_VAR_ZONEMD_REJECT_ABSENCE = 341, /* VAR_ZONEMD_REJECT_ABSENCE */
+ YYSYMBOL_VAR_RPZ_SIGNAL_NXDOMAIN_RA = 342, /* VAR_RPZ_SIGNAL_NXDOMAIN_RA */
+ YYSYMBOL_VAR_INTERFACE_AUTOMATIC_PORTS = 343, /* VAR_INTERFACE_AUTOMATIC_PORTS */
+ YYSYMBOL_VAR_EDE = 344, /* VAR_EDE */
+ YYSYMBOL_VAR_INTERFACE_ACTION = 345, /* VAR_INTERFACE_ACTION */
+ YYSYMBOL_VAR_INTERFACE_VIEW = 346, /* VAR_INTERFACE_VIEW */
+ YYSYMBOL_VAR_INTERFACE_TAG = 347, /* VAR_INTERFACE_TAG */
+ YYSYMBOL_VAR_INTERFACE_TAG_ACTION = 348, /* VAR_INTERFACE_TAG_ACTION */
+ YYSYMBOL_VAR_INTERFACE_TAG_DATA = 349, /* VAR_INTERFACE_TAG_DATA */
+ YYSYMBOL_VAR_PROXY_PROTOCOL_PORT = 350, /* VAR_PROXY_PROTOCOL_PORT */
+ YYSYMBOL_VAR_STATISTICS_INHIBIT_ZERO = 351, /* VAR_STATISTICS_INHIBIT_ZERO */
+ YYSYMBOL_VAR_HARDEN_UNKNOWN_ADDITIONAL = 352, /* VAR_HARDEN_UNKNOWN_ADDITIONAL */
+ YYSYMBOL_VAR_DISABLE_EDNS_DO = 353, /* VAR_DISABLE_EDNS_DO */
+ YYSYMBOL_VAR_CACHEDB_NO_STORE = 354, /* VAR_CACHEDB_NO_STORE */
+ YYSYMBOL_VAR_LOG_DESTADDR = 355, /* VAR_LOG_DESTADDR */
+ YYSYMBOL_VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED = 356, /* VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED */
+ YYSYMBOL_YYACCEPT = 357, /* $accept */
+ YYSYMBOL_toplevelvars = 358, /* toplevelvars */
+ YYSYMBOL_toplevelvar = 359, /* toplevelvar */
+ YYSYMBOL_force_toplevel = 360, /* force_toplevel */
+ YYSYMBOL_serverstart = 361, /* serverstart */
+ YYSYMBOL_contents_server = 362, /* contents_server */
+ YYSYMBOL_content_server = 363, /* content_server */
+ YYSYMBOL_stubstart = 364, /* stubstart */
+ YYSYMBOL_contents_stub = 365, /* contents_stub */
+ YYSYMBOL_content_stub = 366, /* content_stub */
+ YYSYMBOL_forwardstart = 367, /* forwardstart */
+ YYSYMBOL_contents_forward = 368, /* contents_forward */
+ YYSYMBOL_content_forward = 369, /* content_forward */
+ YYSYMBOL_viewstart = 370, /* viewstart */
+ YYSYMBOL_contents_view = 371, /* contents_view */
+ YYSYMBOL_content_view = 372, /* content_view */
+ YYSYMBOL_authstart = 373, /* authstart */
+ YYSYMBOL_contents_auth = 374, /* contents_auth */
+ YYSYMBOL_content_auth = 375, /* content_auth */
+ YYSYMBOL_rpz_tag = 376, /* rpz_tag */
+ YYSYMBOL_rpz_action_override = 377, /* rpz_action_override */
+ YYSYMBOL_rpz_cname_override = 378, /* rpz_cname_override */
+ YYSYMBOL_rpz_log = 379, /* rpz_log */
+ YYSYMBOL_rpz_log_name = 380, /* rpz_log_name */
+ YYSYMBOL_rpz_signal_nxdomain_ra = 381, /* rpz_signal_nxdomain_ra */
+ YYSYMBOL_rpzstart = 382, /* rpzstart */
+ YYSYMBOL_contents_rpz = 383, /* contents_rpz */
+ YYSYMBOL_content_rpz = 384, /* content_rpz */
+ YYSYMBOL_server_num_threads = 385, /* server_num_threads */
+ YYSYMBOL_server_verbosity = 386, /* server_verbosity */
+ YYSYMBOL_server_statistics_interval = 387, /* server_statistics_interval */
+ YYSYMBOL_server_statistics_cumulative = 388, /* server_statistics_cumulative */
+ YYSYMBOL_server_extended_statistics = 389, /* server_extended_statistics */
+ YYSYMBOL_server_statistics_inhibit_zero = 390, /* server_statistics_inhibit_zero */
+ YYSYMBOL_server_shm_enable = 391, /* server_shm_enable */
+ YYSYMBOL_server_shm_key = 392, /* server_shm_key */
+ YYSYMBOL_server_port = 393, /* server_port */
+ YYSYMBOL_server_send_client_subnet = 394, /* server_send_client_subnet */
+ YYSYMBOL_server_client_subnet_zone = 395, /* server_client_subnet_zone */
+ YYSYMBOL_server_client_subnet_always_forward = 396, /* server_client_subnet_always_forward */
+ YYSYMBOL_server_client_subnet_opcode = 397, /* server_client_subnet_opcode */
+ YYSYMBOL_server_max_client_subnet_ipv4 = 398, /* server_max_client_subnet_ipv4 */
+ YYSYMBOL_server_max_client_subnet_ipv6 = 399, /* server_max_client_subnet_ipv6 */
+ YYSYMBOL_server_min_client_subnet_ipv4 = 400, /* server_min_client_subnet_ipv4 */
+ YYSYMBOL_server_min_client_subnet_ipv6 = 401, /* server_min_client_subnet_ipv6 */
+ YYSYMBOL_server_max_ecs_tree_size_ipv4 = 402, /* server_max_ecs_tree_size_ipv4 */
+ YYSYMBOL_server_max_ecs_tree_size_ipv6 = 403, /* server_max_ecs_tree_size_ipv6 */
+ YYSYMBOL_server_interface = 404, /* server_interface */
+ YYSYMBOL_server_outgoing_interface = 405, /* server_outgoing_interface */
+ YYSYMBOL_server_outgoing_range = 406, /* server_outgoing_range */
+ YYSYMBOL_server_outgoing_port_permit = 407, /* server_outgoing_port_permit */
+ YYSYMBOL_server_outgoing_port_avoid = 408, /* server_outgoing_port_avoid */
+ YYSYMBOL_server_outgoing_num_tcp = 409, /* server_outgoing_num_tcp */
+ YYSYMBOL_server_incoming_num_tcp = 410, /* server_incoming_num_tcp */
+ YYSYMBOL_server_interface_automatic = 411, /* server_interface_automatic */
+ YYSYMBOL_server_interface_automatic_ports = 412, /* server_interface_automatic_ports */
+ YYSYMBOL_server_do_ip4 = 413, /* server_do_ip4 */
+ YYSYMBOL_server_do_ip6 = 414, /* server_do_ip6 */
+ YYSYMBOL_server_do_nat64 = 415, /* server_do_nat64 */
+ YYSYMBOL_server_do_udp = 416, /* server_do_udp */
+ YYSYMBOL_server_do_tcp = 417, /* server_do_tcp */
+ YYSYMBOL_server_prefer_ip4 = 418, /* server_prefer_ip4 */
+ YYSYMBOL_server_prefer_ip6 = 419, /* server_prefer_ip6 */
+ YYSYMBOL_server_tcp_mss = 420, /* server_tcp_mss */
+ YYSYMBOL_server_outgoing_tcp_mss = 421, /* server_outgoing_tcp_mss */
+ YYSYMBOL_server_tcp_idle_timeout = 422, /* server_tcp_idle_timeout */
+ YYSYMBOL_server_max_reuse_tcp_queries = 423, /* server_max_reuse_tcp_queries */
+ YYSYMBOL_server_tcp_reuse_timeout = 424, /* server_tcp_reuse_timeout */
+ YYSYMBOL_server_tcp_auth_query_timeout = 425, /* server_tcp_auth_query_timeout */
+ YYSYMBOL_server_tcp_keepalive = 426, /* server_tcp_keepalive */
+ YYSYMBOL_server_tcp_keepalive_timeout = 427, /* server_tcp_keepalive_timeout */
+ YYSYMBOL_server_sock_queue_timeout = 428, /* server_sock_queue_timeout */
+ YYSYMBOL_server_tcp_upstream = 429, /* server_tcp_upstream */
+ YYSYMBOL_server_udp_upstream_without_downstream = 430, /* server_udp_upstream_without_downstream */
+ YYSYMBOL_server_ssl_upstream = 431, /* server_ssl_upstream */
+ YYSYMBOL_server_ssl_service_key = 432, /* server_ssl_service_key */
+ YYSYMBOL_server_ssl_service_pem = 433, /* server_ssl_service_pem */
+ YYSYMBOL_server_ssl_port = 434, /* server_ssl_port */
+ YYSYMBOL_server_tls_cert_bundle = 435, /* server_tls_cert_bundle */
+ YYSYMBOL_server_tls_win_cert = 436, /* server_tls_win_cert */
+ YYSYMBOL_server_tls_additional_port = 437, /* server_tls_additional_port */
+ YYSYMBOL_server_tls_ciphers = 438, /* server_tls_ciphers */
+ YYSYMBOL_server_tls_ciphersuites = 439, /* server_tls_ciphersuites */
+ YYSYMBOL_server_tls_session_ticket_keys = 440, /* server_tls_session_ticket_keys */
+ YYSYMBOL_server_tls_use_sni = 441, /* server_tls_use_sni */
+ YYSYMBOL_server_https_port = 442, /* server_https_port */
+ YYSYMBOL_server_http_endpoint = 443, /* server_http_endpoint */
+ YYSYMBOL_server_http_max_streams = 444, /* server_http_max_streams */
+ YYSYMBOL_server_http_query_buffer_size = 445, /* server_http_query_buffer_size */
+ YYSYMBOL_server_http_response_buffer_size = 446, /* server_http_response_buffer_size */
+ YYSYMBOL_server_http_nodelay = 447, /* server_http_nodelay */
+ YYSYMBOL_server_http_notls_downstream = 448, /* server_http_notls_downstream */
+ YYSYMBOL_server_use_systemd = 449, /* server_use_systemd */
+ YYSYMBOL_server_do_daemonize = 450, /* server_do_daemonize */
+ YYSYMBOL_server_use_syslog = 451, /* server_use_syslog */
+ YYSYMBOL_server_log_time_ascii = 452, /* server_log_time_ascii */
+ YYSYMBOL_server_log_queries = 453, /* server_log_queries */
+ YYSYMBOL_server_log_replies = 454, /* server_log_replies */
+ YYSYMBOL_server_log_tag_queryreply = 455, /* server_log_tag_queryreply */
+ YYSYMBOL_server_log_servfail = 456, /* server_log_servfail */
+ YYSYMBOL_server_log_destaddr = 457, /* server_log_destaddr */
+ YYSYMBOL_server_log_local_actions = 458, /* server_log_local_actions */
+ YYSYMBOL_server_chroot = 459, /* server_chroot */
+ YYSYMBOL_server_username = 460, /* server_username */
+ YYSYMBOL_server_directory = 461, /* server_directory */
+ YYSYMBOL_server_logfile = 462, /* server_logfile */
+ YYSYMBOL_server_pidfile = 463, /* server_pidfile */
+ YYSYMBOL_server_root_hints = 464, /* server_root_hints */
+ YYSYMBOL_server_dlv_anchor_file = 465, /* server_dlv_anchor_file */
+ YYSYMBOL_server_dlv_anchor = 466, /* server_dlv_anchor */
+ YYSYMBOL_server_auto_trust_anchor_file = 467, /* server_auto_trust_anchor_file */
+ YYSYMBOL_server_trust_anchor_file = 468, /* server_trust_anchor_file */
+ YYSYMBOL_server_trusted_keys_file = 469, /* server_trusted_keys_file */
+ YYSYMBOL_server_trust_anchor = 470, /* server_trust_anchor */
+ YYSYMBOL_server_trust_anchor_signaling = 471, /* server_trust_anchor_signaling */
+ YYSYMBOL_server_root_key_sentinel = 472, /* server_root_key_sentinel */
+ YYSYMBOL_server_domain_insecure = 473, /* server_domain_insecure */
+ YYSYMBOL_server_hide_identity = 474, /* server_hide_identity */
+ YYSYMBOL_server_hide_version = 475, /* server_hide_version */
+ YYSYMBOL_server_hide_trustanchor = 476, /* server_hide_trustanchor */
+ YYSYMBOL_server_hide_http_user_agent = 477, /* server_hide_http_user_agent */
+ YYSYMBOL_server_identity = 478, /* server_identity */
+ YYSYMBOL_server_version = 479, /* server_version */
+ YYSYMBOL_server_http_user_agent = 480, /* server_http_user_agent */
+ YYSYMBOL_server_nsid = 481, /* server_nsid */
+ YYSYMBOL_server_so_rcvbuf = 482, /* server_so_rcvbuf */
+ YYSYMBOL_server_so_sndbuf = 483, /* server_so_sndbuf */
+ YYSYMBOL_server_so_reuseport = 484, /* server_so_reuseport */
+ YYSYMBOL_server_ip_transparent = 485, /* server_ip_transparent */
+ YYSYMBOL_server_ip_freebind = 486, /* server_ip_freebind */
+ YYSYMBOL_server_ip_dscp = 487, /* server_ip_dscp */
+ YYSYMBOL_server_stream_wait_size = 488, /* server_stream_wait_size */
+ YYSYMBOL_server_edns_buffer_size = 489, /* server_edns_buffer_size */
+ YYSYMBOL_server_msg_buffer_size = 490, /* server_msg_buffer_size */
+ YYSYMBOL_server_msg_cache_size = 491, /* server_msg_cache_size */
+ YYSYMBOL_server_msg_cache_slabs = 492, /* server_msg_cache_slabs */
+ YYSYMBOL_server_num_queries_per_thread = 493, /* server_num_queries_per_thread */
+ YYSYMBOL_server_jostle_timeout = 494, /* server_jostle_timeout */
+ YYSYMBOL_server_delay_close = 495, /* server_delay_close */
+ YYSYMBOL_server_udp_connect = 496, /* server_udp_connect */
+ YYSYMBOL_server_unblock_lan_zones = 497, /* server_unblock_lan_zones */
+ YYSYMBOL_server_insecure_lan_zones = 498, /* server_insecure_lan_zones */
+ YYSYMBOL_server_rrset_cache_size = 499, /* server_rrset_cache_size */
+ YYSYMBOL_server_rrset_cache_slabs = 500, /* server_rrset_cache_slabs */
+ YYSYMBOL_server_infra_host_ttl = 501, /* server_infra_host_ttl */
+ YYSYMBOL_server_infra_lame_ttl = 502, /* server_infra_lame_ttl */
+ YYSYMBOL_server_infra_cache_numhosts = 503, /* server_infra_cache_numhosts */
+ YYSYMBOL_server_infra_cache_lame_size = 504, /* server_infra_cache_lame_size */
+ YYSYMBOL_server_infra_cache_slabs = 505, /* server_infra_cache_slabs */
+ YYSYMBOL_server_infra_cache_min_rtt = 506, /* server_infra_cache_min_rtt */
+ YYSYMBOL_server_infra_cache_max_rtt = 507, /* server_infra_cache_max_rtt */
+ YYSYMBOL_server_infra_keep_probing = 508, /* server_infra_keep_probing */
+ YYSYMBOL_server_target_fetch_policy = 509, /* server_target_fetch_policy */
+ YYSYMBOL_server_harden_short_bufsize = 510, /* server_harden_short_bufsize */
+ YYSYMBOL_server_harden_large_queries = 511, /* server_harden_large_queries */
+ YYSYMBOL_server_harden_glue = 512, /* server_harden_glue */
+ YYSYMBOL_server_harden_dnssec_stripped = 513, /* server_harden_dnssec_stripped */
+ YYSYMBOL_server_harden_below_nxdomain = 514, /* server_harden_below_nxdomain */
+ YYSYMBOL_server_harden_referral_path = 515, /* server_harden_referral_path */
+ YYSYMBOL_server_harden_algo_downgrade = 516, /* server_harden_algo_downgrade */
+ YYSYMBOL_server_harden_unknown_additional = 517, /* server_harden_unknown_additional */
+ YYSYMBOL_server_use_caps_for_id = 518, /* server_use_caps_for_id */
+ YYSYMBOL_server_caps_whitelist = 519, /* server_caps_whitelist */
+ YYSYMBOL_server_private_address = 520, /* server_private_address */
+ YYSYMBOL_server_private_domain = 521, /* server_private_domain */
+ YYSYMBOL_server_prefetch = 522, /* server_prefetch */
+ YYSYMBOL_server_prefetch_key = 523, /* server_prefetch_key */
+ YYSYMBOL_server_deny_any = 524, /* server_deny_any */
+ YYSYMBOL_server_unwanted_reply_threshold = 525, /* server_unwanted_reply_threshold */
+ YYSYMBOL_server_do_not_query_address = 526, /* server_do_not_query_address */
+ YYSYMBOL_server_do_not_query_localhost = 527, /* server_do_not_query_localhost */
+ YYSYMBOL_server_access_control = 528, /* server_access_control */
+ YYSYMBOL_server_interface_action = 529, /* server_interface_action */
+ YYSYMBOL_server_module_conf = 530, /* server_module_conf */
+ YYSYMBOL_server_val_override_date = 531, /* server_val_override_date */
+ YYSYMBOL_server_val_sig_skew_min = 532, /* server_val_sig_skew_min */
+ YYSYMBOL_server_val_sig_skew_max = 533, /* server_val_sig_skew_max */
+ YYSYMBOL_server_val_max_restart = 534, /* server_val_max_restart */
+ YYSYMBOL_server_cache_max_ttl = 535, /* server_cache_max_ttl */
+ YYSYMBOL_server_cache_max_negative_ttl = 536, /* server_cache_max_negative_ttl */
+ YYSYMBOL_server_cache_min_negative_ttl = 537, /* server_cache_min_negative_ttl */
+ YYSYMBOL_server_cache_min_ttl = 538, /* server_cache_min_ttl */
+ YYSYMBOL_server_bogus_ttl = 539, /* server_bogus_ttl */
+ YYSYMBOL_server_val_clean_additional = 540, /* server_val_clean_additional */
+ YYSYMBOL_server_val_permissive_mode = 541, /* server_val_permissive_mode */
+ YYSYMBOL_server_aggressive_nsec = 542, /* server_aggressive_nsec */
+ YYSYMBOL_server_ignore_cd_flag = 543, /* server_ignore_cd_flag */
+ YYSYMBOL_server_disable_edns_do = 544, /* server_disable_edns_do */
+ YYSYMBOL_server_serve_expired = 545, /* server_serve_expired */
+ YYSYMBOL_server_serve_expired_ttl = 546, /* server_serve_expired_ttl */
+ YYSYMBOL_server_serve_expired_ttl_reset = 547, /* server_serve_expired_ttl_reset */
+ YYSYMBOL_server_serve_expired_reply_ttl = 548, /* server_serve_expired_reply_ttl */
+ YYSYMBOL_server_serve_expired_client_timeout = 549, /* server_serve_expired_client_timeout */
+ YYSYMBOL_server_ede_serve_expired = 550, /* server_ede_serve_expired */
+ YYSYMBOL_server_serve_original_ttl = 551, /* server_serve_original_ttl */
+ YYSYMBOL_server_fake_dsa = 552, /* server_fake_dsa */
+ YYSYMBOL_server_fake_sha1 = 553, /* server_fake_sha1 */
+ YYSYMBOL_server_val_log_level = 554, /* server_val_log_level */
+ YYSYMBOL_server_val_nsec3_keysize_iterations = 555, /* server_val_nsec3_keysize_iterations */
+ YYSYMBOL_server_zonemd_permissive_mode = 556, /* server_zonemd_permissive_mode */
+ YYSYMBOL_server_add_holddown = 557, /* server_add_holddown */
+ YYSYMBOL_server_del_holddown = 558, /* server_del_holddown */
+ YYSYMBOL_server_keep_missing = 559, /* server_keep_missing */
+ YYSYMBOL_server_permit_small_holddown = 560, /* server_permit_small_holddown */
+ YYSYMBOL_server_key_cache_size = 561, /* server_key_cache_size */
+ YYSYMBOL_server_key_cache_slabs = 562, /* server_key_cache_slabs */
+ YYSYMBOL_server_neg_cache_size = 563, /* server_neg_cache_size */
+ YYSYMBOL_server_local_zone = 564, /* server_local_zone */
+ YYSYMBOL_server_local_data = 565, /* server_local_data */
+ YYSYMBOL_server_local_data_ptr = 566, /* server_local_data_ptr */
+ YYSYMBOL_server_minimal_responses = 567, /* server_minimal_responses */
+ YYSYMBOL_server_rrset_roundrobin = 568, /* server_rrset_roundrobin */
+ YYSYMBOL_server_unknown_server_time_limit = 569, /* server_unknown_server_time_limit */
+ YYSYMBOL_server_discard_timeout = 570, /* server_discard_timeout */
+ YYSYMBOL_server_wait_limit = 571, /* server_wait_limit */
+ YYSYMBOL_server_wait_limit_cookie = 572, /* server_wait_limit_cookie */
+ YYSYMBOL_server_wait_limit_netblock = 573, /* server_wait_limit_netblock */
+ YYSYMBOL_server_wait_limit_cookie_netblock = 574, /* server_wait_limit_cookie_netblock */
+ YYSYMBOL_server_max_udp_size = 575, /* server_max_udp_size */
+ YYSYMBOL_server_dns64_prefix = 576, /* server_dns64_prefix */
+ YYSYMBOL_server_dns64_synthall = 577, /* server_dns64_synthall */
+ YYSYMBOL_server_dns64_ignore_aaaa = 578, /* server_dns64_ignore_aaaa */
+ YYSYMBOL_server_nat64_prefix = 579, /* server_nat64_prefix */
+ YYSYMBOL_server_define_tag = 580, /* server_define_tag */
+ YYSYMBOL_server_local_zone_tag = 581, /* server_local_zone_tag */
+ YYSYMBOL_server_access_control_tag = 582, /* server_access_control_tag */
+ YYSYMBOL_server_access_control_tag_action = 583, /* server_access_control_tag_action */
+ YYSYMBOL_server_access_control_tag_data = 584, /* server_access_control_tag_data */
+ YYSYMBOL_server_local_zone_override = 585, /* server_local_zone_override */
+ YYSYMBOL_server_access_control_view = 586, /* server_access_control_view */
+ YYSYMBOL_server_interface_tag = 587, /* server_interface_tag */
+ YYSYMBOL_server_interface_tag_action = 588, /* server_interface_tag_action */
+ YYSYMBOL_server_interface_tag_data = 589, /* server_interface_tag_data */
+ YYSYMBOL_server_interface_view = 590, /* server_interface_view */
+ YYSYMBOL_server_response_ip_tag = 591, /* server_response_ip_tag */
+ YYSYMBOL_server_ip_ratelimit = 592, /* server_ip_ratelimit */
+ YYSYMBOL_server_ip_ratelimit_cookie = 593, /* server_ip_ratelimit_cookie */
+ YYSYMBOL_server_ratelimit = 594, /* server_ratelimit */
+ YYSYMBOL_server_ip_ratelimit_size = 595, /* server_ip_ratelimit_size */
+ YYSYMBOL_server_ratelimit_size = 596, /* server_ratelimit_size */
+ YYSYMBOL_server_ip_ratelimit_slabs = 597, /* server_ip_ratelimit_slabs */
+ YYSYMBOL_server_ratelimit_slabs = 598, /* server_ratelimit_slabs */
+ YYSYMBOL_server_ratelimit_for_domain = 599, /* server_ratelimit_for_domain */
+ YYSYMBOL_server_ratelimit_below_domain = 600, /* server_ratelimit_below_domain */
+ YYSYMBOL_server_ip_ratelimit_factor = 601, /* server_ip_ratelimit_factor */
+ YYSYMBOL_server_ratelimit_factor = 602, /* server_ratelimit_factor */
+ YYSYMBOL_server_ip_ratelimit_backoff = 603, /* server_ip_ratelimit_backoff */
+ YYSYMBOL_server_ratelimit_backoff = 604, /* server_ratelimit_backoff */
+ YYSYMBOL_server_outbound_msg_retry = 605, /* server_outbound_msg_retry */
+ YYSYMBOL_server_max_sent_count = 606, /* server_max_sent_count */
+ YYSYMBOL_server_max_query_restarts = 607, /* server_max_query_restarts */
+ YYSYMBOL_server_low_rtt = 608, /* server_low_rtt */
+ YYSYMBOL_server_fast_server_num = 609, /* server_fast_server_num */
+ YYSYMBOL_server_fast_server_permil = 610, /* server_fast_server_permil */
+ YYSYMBOL_server_qname_minimisation = 611, /* server_qname_minimisation */
+ YYSYMBOL_server_qname_minimisation_strict = 612, /* server_qname_minimisation_strict */
+ YYSYMBOL_server_pad_responses = 613, /* server_pad_responses */
+ YYSYMBOL_server_pad_responses_block_size = 614, /* server_pad_responses_block_size */
+ YYSYMBOL_server_pad_queries = 615, /* server_pad_queries */
+ YYSYMBOL_server_pad_queries_block_size = 616, /* server_pad_queries_block_size */
+ YYSYMBOL_server_ipsecmod_enabled = 617, /* server_ipsecmod_enabled */
+ YYSYMBOL_server_ipsecmod_ignore_bogus = 618, /* server_ipsecmod_ignore_bogus */
+ YYSYMBOL_server_ipsecmod_hook = 619, /* server_ipsecmod_hook */
+ YYSYMBOL_server_ipsecmod_max_ttl = 620, /* server_ipsecmod_max_ttl */
+ YYSYMBOL_server_ipsecmod_whitelist = 621, /* server_ipsecmod_whitelist */
+ YYSYMBOL_server_ipsecmod_strict = 622, /* server_ipsecmod_strict */
+ YYSYMBOL_server_edns_client_string = 623, /* server_edns_client_string */
+ YYSYMBOL_server_edns_client_string_opcode = 624, /* server_edns_client_string_opcode */
+ YYSYMBOL_server_ede = 625, /* server_ede */
+ YYSYMBOL_server_proxy_protocol_port = 626, /* server_proxy_protocol_port */
+ YYSYMBOL_stub_name = 627, /* stub_name */
+ YYSYMBOL_stub_host = 628, /* stub_host */
+ YYSYMBOL_stub_addr = 629, /* stub_addr */
+ YYSYMBOL_stub_first = 630, /* stub_first */
+ YYSYMBOL_stub_no_cache = 631, /* stub_no_cache */
+ YYSYMBOL_stub_ssl_upstream = 632, /* stub_ssl_upstream */
+ YYSYMBOL_stub_tcp_upstream = 633, /* stub_tcp_upstream */
+ YYSYMBOL_stub_prime = 634, /* stub_prime */
+ YYSYMBOL_forward_name = 635, /* forward_name */
+ YYSYMBOL_forward_host = 636, /* forward_host */
+ YYSYMBOL_forward_addr = 637, /* forward_addr */
+ YYSYMBOL_forward_first = 638, /* forward_first */
+ YYSYMBOL_forward_no_cache = 639, /* forward_no_cache */
+ YYSYMBOL_forward_ssl_upstream = 640, /* forward_ssl_upstream */
+ YYSYMBOL_forward_tcp_upstream = 641, /* forward_tcp_upstream */
+ YYSYMBOL_auth_name = 642, /* auth_name */
+ YYSYMBOL_auth_zonefile = 643, /* auth_zonefile */
+ YYSYMBOL_auth_master = 644, /* auth_master */
+ YYSYMBOL_auth_url = 645, /* auth_url */
+ YYSYMBOL_auth_allow_notify = 646, /* auth_allow_notify */
+ YYSYMBOL_auth_zonemd_check = 647, /* auth_zonemd_check */
+ YYSYMBOL_auth_zonemd_reject_absence = 648, /* auth_zonemd_reject_absence */
+ YYSYMBOL_auth_for_downstream = 649, /* auth_for_downstream */
+ YYSYMBOL_auth_for_upstream = 650, /* auth_for_upstream */
+ YYSYMBOL_auth_fallback_enabled = 651, /* auth_fallback_enabled */
+ YYSYMBOL_view_name = 652, /* view_name */
+ YYSYMBOL_view_local_zone = 653, /* view_local_zone */
+ YYSYMBOL_view_response_ip = 654, /* view_response_ip */
+ YYSYMBOL_view_response_ip_data = 655, /* view_response_ip_data */
+ YYSYMBOL_view_local_data = 656, /* view_local_data */
+ YYSYMBOL_view_local_data_ptr = 657, /* view_local_data_ptr */
+ YYSYMBOL_view_first = 658, /* view_first */
+ YYSYMBOL_rcstart = 659, /* rcstart */
+ YYSYMBOL_contents_rc = 660, /* contents_rc */
+ YYSYMBOL_content_rc = 661, /* content_rc */
+ YYSYMBOL_rc_control_enable = 662, /* rc_control_enable */
+ YYSYMBOL_rc_control_port = 663, /* rc_control_port */
+ YYSYMBOL_rc_control_interface = 664, /* rc_control_interface */
+ YYSYMBOL_rc_control_use_cert = 665, /* rc_control_use_cert */
+ YYSYMBOL_rc_server_key_file = 666, /* rc_server_key_file */
+ YYSYMBOL_rc_server_cert_file = 667, /* rc_server_cert_file */
+ YYSYMBOL_rc_control_key_file = 668, /* rc_control_key_file */
+ YYSYMBOL_rc_control_cert_file = 669, /* rc_control_cert_file */
+ YYSYMBOL_dtstart = 670, /* dtstart */
+ YYSYMBOL_contents_dt = 671, /* contents_dt */
+ YYSYMBOL_content_dt = 672, /* content_dt */
+ YYSYMBOL_dt_dnstap_enable = 673, /* dt_dnstap_enable */
+ YYSYMBOL_dt_dnstap_bidirectional = 674, /* dt_dnstap_bidirectional */
+ YYSYMBOL_dt_dnstap_socket_path = 675, /* dt_dnstap_socket_path */
+ YYSYMBOL_dt_dnstap_ip = 676, /* dt_dnstap_ip */
+ YYSYMBOL_dt_dnstap_tls = 677, /* dt_dnstap_tls */
+ YYSYMBOL_dt_dnstap_tls_server_name = 678, /* dt_dnstap_tls_server_name */
+ YYSYMBOL_dt_dnstap_tls_cert_bundle = 679, /* dt_dnstap_tls_cert_bundle */
+ YYSYMBOL_dt_dnstap_tls_client_key_file = 680, /* dt_dnstap_tls_client_key_file */
+ YYSYMBOL_dt_dnstap_tls_client_cert_file = 681, /* dt_dnstap_tls_client_cert_file */
+ YYSYMBOL_dt_dnstap_send_identity = 682, /* dt_dnstap_send_identity */
+ YYSYMBOL_dt_dnstap_send_version = 683, /* dt_dnstap_send_version */
+ YYSYMBOL_dt_dnstap_identity = 684, /* dt_dnstap_identity */
+ YYSYMBOL_dt_dnstap_version = 685, /* dt_dnstap_version */
+ YYSYMBOL_dt_dnstap_log_resolver_query_messages = 686, /* dt_dnstap_log_resolver_query_messages */
+ YYSYMBOL_dt_dnstap_log_resolver_response_messages = 687, /* dt_dnstap_log_resolver_response_messages */
+ YYSYMBOL_dt_dnstap_log_client_query_messages = 688, /* dt_dnstap_log_client_query_messages */
+ YYSYMBOL_dt_dnstap_log_client_response_messages = 689, /* dt_dnstap_log_client_response_messages */
+ YYSYMBOL_dt_dnstap_log_forwarder_query_messages = 690, /* dt_dnstap_log_forwarder_query_messages */
+ YYSYMBOL_dt_dnstap_log_forwarder_response_messages = 691, /* dt_dnstap_log_forwarder_response_messages */
+ YYSYMBOL_pythonstart = 692, /* pythonstart */
+ YYSYMBOL_contents_py = 693, /* contents_py */
+ YYSYMBOL_content_py = 694, /* content_py */
+ YYSYMBOL_py_script = 695, /* py_script */
+ YYSYMBOL_dynlibstart = 696, /* dynlibstart */
+ YYSYMBOL_contents_dl = 697, /* contents_dl */
+ YYSYMBOL_content_dl = 698, /* content_dl */
+ YYSYMBOL_dl_file = 699, /* dl_file */
+ YYSYMBOL_server_disable_dnssec_lame_check = 700, /* server_disable_dnssec_lame_check */
+ YYSYMBOL_server_log_identity = 701, /* server_log_identity */
+ YYSYMBOL_server_response_ip = 702, /* server_response_ip */
+ YYSYMBOL_server_response_ip_data = 703, /* server_response_ip_data */
+ YYSYMBOL_dnscstart = 704, /* dnscstart */
+ YYSYMBOL_contents_dnsc = 705, /* contents_dnsc */
+ YYSYMBOL_content_dnsc = 706, /* content_dnsc */
+ YYSYMBOL_dnsc_dnscrypt_enable = 707, /* dnsc_dnscrypt_enable */
+ YYSYMBOL_dnsc_dnscrypt_port = 708, /* dnsc_dnscrypt_port */
+ YYSYMBOL_dnsc_dnscrypt_provider = 709, /* dnsc_dnscrypt_provider */
+ YYSYMBOL_dnsc_dnscrypt_provider_cert = 710, /* dnsc_dnscrypt_provider_cert */
+ YYSYMBOL_dnsc_dnscrypt_provider_cert_rotated = 711, /* dnsc_dnscrypt_provider_cert_rotated */
+ YYSYMBOL_dnsc_dnscrypt_secret_key = 712, /* dnsc_dnscrypt_secret_key */
+ YYSYMBOL_dnsc_dnscrypt_shared_secret_cache_size = 713, /* dnsc_dnscrypt_shared_secret_cache_size */
+ YYSYMBOL_dnsc_dnscrypt_shared_secret_cache_slabs = 714, /* dnsc_dnscrypt_shared_secret_cache_slabs */
+ YYSYMBOL_dnsc_dnscrypt_nonce_cache_size = 715, /* dnsc_dnscrypt_nonce_cache_size */
+ YYSYMBOL_dnsc_dnscrypt_nonce_cache_slabs = 716, /* dnsc_dnscrypt_nonce_cache_slabs */
+ YYSYMBOL_cachedbstart = 717, /* cachedbstart */
+ YYSYMBOL_contents_cachedb = 718, /* contents_cachedb */
+ YYSYMBOL_content_cachedb = 719, /* content_cachedb */
+ YYSYMBOL_cachedb_backend_name = 720, /* cachedb_backend_name */
+ YYSYMBOL_cachedb_secret_seed = 721, /* cachedb_secret_seed */
+ YYSYMBOL_cachedb_no_store = 722, /* cachedb_no_store */
+ YYSYMBOL_cachedb_check_when_serve_expired = 723, /* cachedb_check_when_serve_expired */
+ YYSYMBOL_redis_server_host = 724, /* redis_server_host */
+ YYSYMBOL_redis_server_port = 725, /* redis_server_port */
+ YYSYMBOL_redis_server_path = 726, /* redis_server_path */
+ YYSYMBOL_redis_server_password = 727, /* redis_server_password */
+ YYSYMBOL_redis_timeout = 728, /* redis_timeout */
+ YYSYMBOL_redis_expire_records = 729, /* redis_expire_records */
+ YYSYMBOL_redis_logical_db = 730, /* redis_logical_db */
+ YYSYMBOL_server_tcp_connection_limit = 731, /* server_tcp_connection_limit */
+ YYSYMBOL_server_answer_cookie = 732, /* server_answer_cookie */
+ YYSYMBOL_server_cookie_secret = 733, /* server_cookie_secret */
+ YYSYMBOL_ipsetstart = 734, /* ipsetstart */
+ YYSYMBOL_contents_ipset = 735, /* contents_ipset */
+ YYSYMBOL_content_ipset = 736, /* content_ipset */
+ YYSYMBOL_ipset_name_v4 = 737, /* ipset_name_v4 */
+ YYSYMBOL_ipset_name_v6 = 738 /* ipset_name_v6 */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
@@ -1172,19 +1186,19 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 745
+#define YYLAST 761
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 350
+#define YYNTOKENS 357
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 375
+#define YYNNTS 382
/* YYNRULES -- Number of rules. */
-#define YYNRULES 727
+#define YYNRULES 741
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 1088
+#define YYNSTATES 1111
/* YYMAXUTOK -- Last valid token kind. */
-#define YYMAXUTOK 604
+#define YYMAXUTOK 611
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -1258,86 +1272,89 @@ static const yytype_int16 yytranslate[] =
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348, 349
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
- 0, 206, 206, 206, 207, 207, 208, 208, 209, 209,
- 209, 210, 210, 211, 211, 212, 212, 213, 215, 222,
- 228, 229, 230, 230, 230, 231, 231, 232, 232, 232,
- 233, 233, 233, 234, 234, 234, 235, 235, 236, 237,
- 237, 237, 238, 238, 238, 239, 239, 240, 240, 241,
- 241, 242, 242, 243, 243, 244, 244, 245, 245, 246,
- 246, 247, 247, 247, 248, 248, 249, 249, 249, 250,
- 250, 250, 251, 251, 252, 252, 253, 253, 254, 254,
- 255, 255, 255, 256, 256, 257, 257, 258, 258, 258,
- 259, 259, 260, 260, 261, 261, 262, 262, 262, 263,
- 263, 264, 264, 265, 265, 266, 266, 267, 267, 268,
- 268, 269, 269, 270, 270, 271, 271, 271, 272, 272,
- 272, 273, 273, 273, 274, 274, 274, 274, 275, 276,
- 276, 276, 277, 277, 277, 278, 278, 279, 279, 280,
- 280, 280, 281, 281, 281, 282, 282, 283, 283, 283,
- 284, 285, 285, 285, 286, 286, 286, 287, 287, 288,
- 288, 289, 289, 290, 291, 291, 292, 292, 293, 293,
- 294, 294, 295, 295, 296, 296, 297, 297, 298, 298,
- 299, 299, 300, 300, 301, 301, 302, 302, 302, 303,
- 303, 304, 304, 305, 305, 306, 306, 306, 307, 307,
- 308, 309, 309, 310, 310, 311, 312, 312, 313, 313,
- 314, 314, 314, 315, 315, 316, 316, 316, 317, 317,
- 317, 318, 318, 319, 320, 320, 321, 321, 322, 322,
- 323, 323, 324, 324, 324, 325, 325, 325, 326, 326,
- 326, 327, 327, 328, 328, 329, 329, 330, 330, 330,
- 331, 331, 332, 332, 333, 333, 334, 334, 335, 335,
- 336, 336, 337, 337, 338, 340, 354, 355, 356, 356,
- 356, 356, 356, 357, 357, 357, 359, 373, 374, 375,
- 375, 375, 375, 376, 376, 376, 378, 394, 395, 396,
- 396, 396, 396, 397, 397, 397, 399, 420, 421, 422,
- 422, 422, 422, 423, 423, 423, 424, 424, 424, 427,
- 446, 463, 471, 481, 488, 498, 517, 518, 519, 519,
- 519, 519, 519, 520, 520, 520, 521, 521, 521, 521,
- 523, 532, 541, 552, 561, 570, 579, 588, 599, 608,
- 620, 634, 649, 660, 677, 694, 711, 728, 743, 758,
- 771, 786, 795, 804, 813, 822, 831, 840, 847, 856,
- 865, 874, 883, 892, 901, 910, 919, 928, 941, 952,
- 963, 974, 983, 996, 1009, 1018, 1027, 1036, 1043, 1050,
- 1059, 1066, 1075, 1083, 1090, 1097, 1105, 1114, 1122, 1138,
- 1146, 1154, 1162, 1170, 1178, 1187, 1196, 1210, 1219, 1228,
- 1237, 1246, 1255, 1264, 1273, 1280, 1287, 1313, 1321, 1328,
- 1335, 1342, 1349, 1357, 1365, 1373, 1380, 1391, 1402, 1409,
- 1418, 1427, 1436, 1445, 1452, 1459, 1466, 1482, 1490, 1498,
- 1508, 1518, 1528, 1542, 1550, 1563, 1574, 1582, 1595, 1604,
- 1613, 1622, 1631, 1641, 1651, 1659, 1672, 1681, 1689, 1698,
- 1706, 1719, 1728, 1737, 1747, 1754, 1764, 1774, 1784, 1794,
- 1804, 1814, 1824, 1834, 1844, 1851, 1858, 1865, 1874, 1883,
- 1892, 1901, 1908, 1918, 1926, 1935, 1942, 1960, 1973, 1986,
- 1999, 2008, 2017, 2026, 2035, 2045, 2055, 2066, 2075, 2084,
- 2093, 2102, 2111, 2120, 2129, 2138, 2147, 2160, 2173, 2182,
- 2189, 2198, 2207, 2216, 2225, 2235, 2243, 2256, 2264, 2320,
- 2327, 2342, 2352, 2362, 2369, 2376, 2383, 2392, 2400, 2407,
- 2421, 2442, 2463, 2475, 2487, 2499, 2508, 2529, 2541, 2553,
- 2562, 2583, 2592, 2601, 2610, 2618, 2626, 2639, 2652, 2667,
- 2682, 2691, 2700, 2710, 2720, 2729, 2738, 2747, 2753, 2762,
- 2771, 2781, 2791, 2801, 2810, 2820, 2829, 2842, 2855, 2867,
- 2881, 2893, 2907, 2916, 2927, 2936, 2943, 2953, 2960, 2967,
- 2976, 2985, 2995, 3005, 3015, 3025, 3032, 3039, 3048, 3057,
- 3067, 3077, 3087, 3094, 3101, 3108, 3116, 3126, 3136, 3146,
- 3156, 3166, 3176, 3232, 3242, 3250, 3258, 3273, 3282, 3288,
- 3289, 3290, 3290, 3290, 3291, 3291, 3291, 3292, 3292, 3294,
- 3304, 3313, 3320, 3327, 3334, 3341, 3348, 3355, 3361, 3362,
- 3363, 3363, 3363, 3364, 3364, 3364, 3365, 3366, 3366, 3367,
- 3367, 3368, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3376,
- 3385, 3395, 3402, 3409, 3418, 3425, 3432, 3439, 3446, 3455,
- 3464, 3471, 3478, 3488, 3498, 3508, 3518, 3528, 3538, 3544,
- 3545, 3546, 3548, 3555, 3561, 3562, 3563, 3565, 3572, 3582,
- 3589, 3598, 3606, 3612, 3613, 3615, 3615, 3615, 3616, 3616,
- 3617, 3618, 3619, 3620, 3621, 3623, 3632, 3641, 3648, 3657,
- 3664, 3673, 3681, 3694, 3702, 3715, 3721, 3722, 3723, 3723,
- 3724, 3724, 3724, 3725, 3725, 3725, 3726, 3726, 3728, 3740,
- 3752, 3765, 3777, 3792, 3804, 3816, 3829, 3842, 3857, 3868,
- 3877, 3893, 3899, 3900, 3901, 3901, 3903, 3918
+ 0, 209, 209, 209, 210, 210, 211, 211, 212, 212,
+ 212, 213, 213, 214, 214, 215, 215, 216, 218, 225,
+ 231, 232, 233, 233, 233, 234, 234, 235, 235, 235,
+ 236, 236, 236, 237, 237, 237, 238, 238, 239, 240,
+ 240, 240, 241, 241, 241, 242, 242, 243, 243, 244,
+ 244, 245, 245, 246, 246, 247, 247, 248, 248, 249,
+ 249, 250, 250, 250, 251, 251, 252, 252, 252, 253,
+ 253, 253, 254, 254, 255, 255, 256, 256, 257, 257,
+ 258, 258, 258, 259, 259, 260, 260, 261, 261, 261,
+ 262, 262, 263, 263, 264, 264, 265, 265, 265, 266,
+ 266, 267, 267, 268, 268, 269, 269, 270, 270, 271,
+ 271, 272, 272, 273, 273, 274, 274, 274, 275, 275,
+ 275, 276, 276, 276, 277, 277, 277, 277, 278, 279,
+ 279, 279, 280, 280, 280, 281, 281, 282, 282, 283,
+ 283, 283, 284, 284, 284, 285, 285, 286, 286, 286,
+ 287, 288, 288, 288, 289, 289, 289, 290, 290, 291,
+ 291, 292, 292, 293, 294, 294, 295, 295, 296, 296,
+ 297, 297, 298, 298, 299, 299, 300, 300, 301, 301,
+ 302, 302, 303, 303, 304, 305, 305, 306, 306, 306,
+ 307, 307, 308, 308, 309, 309, 310, 310, 310, 311,
+ 311, 312, 313, 313, 314, 314, 315, 316, 316, 317,
+ 317, 318, 318, 318, 319, 319, 320, 320, 320, 321,
+ 321, 321, 322, 322, 323, 324, 324, 325, 325, 326,
+ 326, 327, 327, 328, 328, 328, 329, 329, 329, 330,
+ 330, 330, 331, 331, 332, 332, 332, 333, 333, 334,
+ 334, 335, 335, 336, 336, 336, 337, 337, 338, 338,
+ 339, 339, 340, 340, 341, 341, 342, 342, 343, 343,
+ 344, 346, 360, 361, 362, 362, 362, 362, 362, 363,
+ 363, 363, 365, 379, 380, 381, 381, 381, 381, 382,
+ 382, 382, 384, 400, 401, 402, 402, 402, 402, 403,
+ 403, 403, 405, 426, 427, 428, 428, 428, 428, 429,
+ 429, 429, 430, 430, 430, 433, 452, 469, 477, 487,
+ 494, 504, 523, 524, 525, 525, 525, 525, 525, 526,
+ 526, 526, 527, 527, 527, 527, 529, 538, 547, 558,
+ 567, 576, 585, 594, 605, 614, 626, 640, 655, 666,
+ 683, 700, 717, 734, 749, 764, 777, 792, 801, 810,
+ 819, 828, 837, 846, 853, 862, 871, 880, 889, 898,
+ 907, 916, 925, 934, 947, 958, 969, 980, 989, 1002,
+ 1015, 1024, 1033, 1042, 1049, 1056, 1065, 1072, 1081, 1089,
+ 1096, 1103, 1111, 1120, 1128, 1144, 1152, 1160, 1168, 1176,
+ 1184, 1193, 1202, 1216, 1225, 1234, 1243, 1252, 1261, 1270,
+ 1279, 1286, 1293, 1319, 1327, 1334, 1341, 1348, 1355, 1363,
+ 1371, 1379, 1386, 1397, 1408, 1415, 1424, 1433, 1442, 1451,
+ 1458, 1465, 1472, 1488, 1496, 1504, 1514, 1524, 1534, 1548,
+ 1556, 1569, 1580, 1588, 1601, 1610, 1619, 1628, 1637, 1647,
+ 1657, 1665, 1678, 1687, 1695, 1704, 1712, 1725, 1734, 1743,
+ 1753, 1760, 1770, 1780, 1790, 1800, 1810, 1820, 1830, 1840,
+ 1850, 1857, 1864, 1871, 1880, 1889, 1898, 1907, 1914, 1924,
+ 1932, 1941, 1948, 1966, 1979, 1992, 2005, 2014, 2023, 2032,
+ 2041, 2050, 2060, 2070, 2081, 2090, 2099, 2108, 2117, 2126,
+ 2135, 2144, 2153, 2162, 2175, 2188, 2197, 2204, 2213, 2222,
+ 2231, 2240, 2250, 2258, 2271, 2279, 2335, 2342, 2357, 2367,
+ 2377, 2384, 2391, 2398, 2405, 2420, 2435, 2442, 2449, 2458,
+ 2466, 2473, 2487, 2508, 2529, 2541, 2553, 2565, 2574, 2595,
+ 2607, 2619, 2628, 2649, 2658, 2667, 2676, 2684, 2692, 2705,
+ 2718, 2733, 2748, 2757, 2766, 2776, 2786, 2795, 2804, 2813,
+ 2819, 2828, 2837, 2847, 2857, 2867, 2876, 2886, 2895, 2908,
+ 2921, 2933, 2947, 2959, 2973, 2982, 2993, 3002, 3009, 3019,
+ 3026, 3033, 3042, 3051, 3061, 3071, 3081, 3091, 3098, 3105,
+ 3114, 3123, 3133, 3143, 3153, 3160, 3167, 3174, 3182, 3192,
+ 3202, 3212, 3222, 3232, 3242, 3298, 3308, 3316, 3324, 3339,
+ 3348, 3354, 3355, 3356, 3356, 3356, 3357, 3357, 3357, 3358,
+ 3358, 3360, 3370, 3379, 3386, 3393, 3400, 3407, 3414, 3421,
+ 3427, 3428, 3429, 3429, 3429, 3430, 3430, 3430, 3431, 3432,
+ 3432, 3433, 3433, 3434, 3434, 3435, 3436, 3437, 3438, 3439,
+ 3440, 3442, 3451, 3461, 3468, 3475, 3484, 3491, 3498, 3505,
+ 3512, 3521, 3530, 3537, 3544, 3554, 3564, 3574, 3584, 3594,
+ 3604, 3610, 3611, 3612, 3614, 3621, 3627, 3628, 3629, 3631,
+ 3638, 3648, 3655, 3664, 3672, 3678, 3679, 3681, 3681, 3681,
+ 3682, 3682, 3683, 3684, 3685, 3686, 3687, 3689, 3698, 3707,
+ 3714, 3723, 3730, 3739, 3747, 3760, 3768, 3781, 3787, 3788,
+ 3789, 3789, 3790, 3790, 3790, 3791, 3791, 3791, 3792, 3792,
+ 3792, 3794, 3806, 3818, 3831, 3844, 3856, 3871, 3883, 3895,
+ 3908, 3921, 3936, 3947, 3956, 3972, 3978, 3979, 3980, 3980,
+ 3982, 3997
};
#endif
@@ -1438,12 +1455,13 @@ static const char *const yytname[] =
"VAR_MIN_CLIENT_SUBNET_IPV4", "VAR_MIN_CLIENT_SUBNET_IPV6",
"VAR_MAX_ECS_TREE_SIZE_IPV4", "VAR_MAX_ECS_TREE_SIZE_IPV6",
"VAR_CAPS_WHITELIST", "VAR_CACHE_MAX_NEGATIVE_TTL",
- "VAR_PERMIT_SMALL_HOLDDOWN", "VAR_QNAME_MINIMISATION",
- "VAR_QNAME_MINIMISATION_STRICT", "VAR_IP_FREEBIND", "VAR_DEFINE_TAG",
- "VAR_LOCAL_ZONE_TAG", "VAR_ACCESS_CONTROL_TAG",
- "VAR_LOCAL_ZONE_OVERRIDE", "VAR_ACCESS_CONTROL_TAG_ACTION",
- "VAR_ACCESS_CONTROL_TAG_DATA", "VAR_VIEW", "VAR_ACCESS_CONTROL_VIEW",
- "VAR_VIEW_FIRST", "VAR_SERVE_EXPIRED", "VAR_SERVE_EXPIRED_TTL",
+ "VAR_PERMIT_SMALL_HOLDDOWN", "VAR_CACHE_MIN_NEGATIVE_TTL",
+ "VAR_QNAME_MINIMISATION", "VAR_QNAME_MINIMISATION_STRICT",
+ "VAR_IP_FREEBIND", "VAR_DEFINE_TAG", "VAR_LOCAL_ZONE_TAG",
+ "VAR_ACCESS_CONTROL_TAG", "VAR_LOCAL_ZONE_OVERRIDE",
+ "VAR_ACCESS_CONTROL_TAG_ACTION", "VAR_ACCESS_CONTROL_TAG_DATA",
+ "VAR_VIEW", "VAR_ACCESS_CONTROL_VIEW", "VAR_VIEW_FIRST",
+ "VAR_SERVE_EXPIRED", "VAR_SERVE_EXPIRED_TTL",
"VAR_SERVE_EXPIRED_TTL_RESET", "VAR_SERVE_EXPIRED_REPLY_TTL",
"VAR_SERVE_EXPIRED_CLIENT_TIMEOUT", "VAR_EDE_SERVE_EXPIRED",
"VAR_SERVE_ORIGINAL_TTL", "VAR_FAKE_DSA", "VAR_FAKE_SHA1",
@@ -1473,13 +1491,15 @@ static const char *const yytname[] =
"VAR_TCP_CONNECTION_LIMIT", "VAR_ANSWER_COOKIE", "VAR_COOKIE_SECRET",
"VAR_IP_RATELIMIT_COOKIE", "VAR_FORWARD_NO_CACHE", "VAR_STUB_NO_CACHE",
"VAR_LOG_SERVFAIL", "VAR_DENY_ANY", "VAR_UNKNOWN_SERVER_TIME_LIMIT",
- "VAR_LOG_TAG_QUERYREPLY", "VAR_STREAM_WAIT_SIZE", "VAR_TLS_CIPHERS",
- "VAR_TLS_CIPHERSUITES", "VAR_TLS_USE_SNI", "VAR_IPSET",
- "VAR_IPSET_NAME_V4", "VAR_IPSET_NAME_V6", "VAR_TLS_SESSION_TICKET_KEYS",
- "VAR_RPZ", "VAR_TAGS", "VAR_RPZ_ACTION_OVERRIDE",
- "VAR_RPZ_CNAME_OVERRIDE", "VAR_RPZ_LOG", "VAR_RPZ_LOG_NAME",
- "VAR_DYNLIB", "VAR_DYNLIB_FILE", "VAR_EDNS_CLIENT_STRING",
- "VAR_EDNS_CLIENT_STRING_OPCODE", "VAR_NSID",
+ "VAR_LOG_TAG_QUERYREPLY", "VAR_DISCARD_TIMEOUT", "VAR_WAIT_LIMIT",
+ "VAR_WAIT_LIMIT_COOKIE", "VAR_WAIT_LIMIT_NETBLOCK",
+ "VAR_WAIT_LIMIT_COOKIE_NETBLOCK", "VAR_STREAM_WAIT_SIZE",
+ "VAR_TLS_CIPHERS", "VAR_TLS_CIPHERSUITES", "VAR_TLS_USE_SNI",
+ "VAR_IPSET", "VAR_IPSET_NAME_V4", "VAR_IPSET_NAME_V6",
+ "VAR_TLS_SESSION_TICKET_KEYS", "VAR_RPZ", "VAR_TAGS",
+ "VAR_RPZ_ACTION_OVERRIDE", "VAR_RPZ_CNAME_OVERRIDE", "VAR_RPZ_LOG",
+ "VAR_RPZ_LOG_NAME", "VAR_DYNLIB", "VAR_DYNLIB_FILE",
+ "VAR_EDNS_CLIENT_STRING", "VAR_EDNS_CLIENT_STRING_OPCODE", "VAR_NSID",
"VAR_ZONEMD_PERMISSIVE_MODE", "VAR_ZONEMD_CHECK",
"VAR_ZONEMD_REJECT_ABSENCE", "VAR_RPZ_SIGNAL_NXDOMAIN_RA",
"VAR_INTERFACE_AUTOMATIC_PORTS", "VAR_EDE", "VAR_INTERFACE_ACTION",
@@ -1487,17 +1507,18 @@ static const char *const yytname[] =
"VAR_INTERFACE_TAG_DATA", "VAR_PROXY_PROTOCOL_PORT",
"VAR_STATISTICS_INHIBIT_ZERO", "VAR_HARDEN_UNKNOWN_ADDITIONAL",
"VAR_DISABLE_EDNS_DO", "VAR_CACHEDB_NO_STORE", "VAR_LOG_DESTADDR",
- "$accept", "toplevelvars", "toplevelvar", "force_toplevel",
- "serverstart", "contents_server", "content_server", "stubstart",
- "contents_stub", "content_stub", "forwardstart", "contents_forward",
- "content_forward", "viewstart", "contents_view", "content_view",
- "authstart", "contents_auth", "content_auth", "rpz_tag",
- "rpz_action_override", "rpz_cname_override", "rpz_log", "rpz_log_name",
- "rpz_signal_nxdomain_ra", "rpzstart", "contents_rpz", "content_rpz",
- "server_num_threads", "server_verbosity", "server_statistics_interval",
- "server_statistics_cumulative", "server_extended_statistics",
- "server_statistics_inhibit_zero", "server_shm_enable", "server_shm_key",
- "server_port", "server_send_client_subnet", "server_client_subnet_zone",
+ "VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED", "$accept", "toplevelvars",
+ "toplevelvar", "force_toplevel", "serverstart", "contents_server",
+ "content_server", "stubstart", "contents_stub", "content_stub",
+ "forwardstart", "contents_forward", "content_forward", "viewstart",
+ "contents_view", "content_view", "authstart", "contents_auth",
+ "content_auth", "rpz_tag", "rpz_action_override", "rpz_cname_override",
+ "rpz_log", "rpz_log_name", "rpz_signal_nxdomain_ra", "rpzstart",
+ "contents_rpz", "content_rpz", "server_num_threads", "server_verbosity",
+ "server_statistics_interval", "server_statistics_cumulative",
+ "server_extended_statistics", "server_statistics_inhibit_zero",
+ "server_shm_enable", "server_shm_key", "server_port",
+ "server_send_client_subnet", "server_client_subnet_zone",
"server_client_subnet_always_forward", "server_client_subnet_opcode",
"server_max_client_subnet_ipv4", "server_max_client_subnet_ipv6",
"server_min_client_subnet_ipv4", "server_min_client_subnet_ipv6",
@@ -1559,21 +1580,25 @@ static const char *const yytname[] =
"server_val_override_date", "server_val_sig_skew_min",
"server_val_sig_skew_max", "server_val_max_restart",
"server_cache_max_ttl", "server_cache_max_negative_ttl",
- "server_cache_min_ttl", "server_bogus_ttl",
- "server_val_clean_additional", "server_val_permissive_mode",
- "server_aggressive_nsec", "server_ignore_cd_flag",
- "server_disable_edns_do", "server_serve_expired",
- "server_serve_expired_ttl", "server_serve_expired_ttl_reset",
- "server_serve_expired_reply_ttl", "server_serve_expired_client_timeout",
- "server_ede_serve_expired", "server_serve_original_ttl",
- "server_fake_dsa", "server_fake_sha1", "server_val_log_level",
- "server_val_nsec3_keysize_iterations", "server_zonemd_permissive_mode",
- "server_add_holddown", "server_del_holddown", "server_keep_missing",
+ "server_cache_min_negative_ttl", "server_cache_min_ttl",
+ "server_bogus_ttl", "server_val_clean_additional",
+ "server_val_permissive_mode", "server_aggressive_nsec",
+ "server_ignore_cd_flag", "server_disable_edns_do",
+ "server_serve_expired", "server_serve_expired_ttl",
+ "server_serve_expired_ttl_reset", "server_serve_expired_reply_ttl",
+ "server_serve_expired_client_timeout", "server_ede_serve_expired",
+ "server_serve_original_ttl", "server_fake_dsa", "server_fake_sha1",
+ "server_val_log_level", "server_val_nsec3_keysize_iterations",
+ "server_zonemd_permissive_mode", "server_add_holddown",
+ "server_del_holddown", "server_keep_missing",
"server_permit_small_holddown", "server_key_cache_size",
"server_key_cache_slabs", "server_neg_cache_size", "server_local_zone",
"server_local_data", "server_local_data_ptr", "server_minimal_responses",
"server_rrset_roundrobin", "server_unknown_server_time_limit",
- "server_max_udp_size", "server_dns64_prefix", "server_dns64_synthall",
+ "server_discard_timeout", "server_wait_limit",
+ "server_wait_limit_cookie", "server_wait_limit_netblock",
+ "server_wait_limit_cookie_netblock", "server_max_udp_size",
+ "server_dns64_prefix", "server_dns64_synthall",
"server_dns64_ignore_aaaa", "server_nat64_prefix", "server_define_tag",
"server_local_zone_tag", "server_access_control_tag",
"server_access_control_tag_action", "server_access_control_tag_data",
@@ -1633,11 +1658,12 @@ static const char *const yytname[] =
"dnsc_dnscrypt_nonce_cache_size", "dnsc_dnscrypt_nonce_cache_slabs",
"cachedbstart", "contents_cachedb", "content_cachedb",
"cachedb_backend_name", "cachedb_secret_seed", "cachedb_no_store",
- "redis_server_host", "redis_server_port", "redis_server_path",
- "redis_server_password", "redis_timeout", "redis_expire_records",
- "redis_logical_db", "server_tcp_connection_limit",
- "server_answer_cookie", "server_cookie_secret", "ipsetstart",
- "contents_ipset", "content_ipset", "ipset_name_v4", "ipset_name_v6", YY_NULLPTR
+ "cachedb_check_when_serve_expired", "redis_server_host",
+ "redis_server_port", "redis_server_path", "redis_server_password",
+ "redis_timeout", "redis_expire_records", "redis_logical_db",
+ "server_tcp_connection_limit", "server_answer_cookie",
+ "server_cookie_secret", "ipsetstart", "contents_ipset", "content_ipset",
+ "ipset_name_v4", "ipset_name_v6", YY_NULLPTR
};
static const char *
@@ -1686,11 +1712,12 @@ static const yytype_int16 yytoknum[] =
565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
- 595, 596, 597, 598, 599, 600, 601, 602, 603, 604
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611
};
#endif
-#define YYPACT_NINF (-293)
+#define YYPACT_NINF (-299)
#define yypact_value_is_default(Yyn) \
((Yyn) == YYPACT_NINF)
@@ -1704,115 +1731,118 @@ static const yytype_int16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- -293, 267, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -13, 262, 122, 276, 56, 45, 293, 268,
- -81, -292, -100, -35, -285, 31, 32, 33, 75, 76,
- 77, 78, 79, 80, 81, 83, 89, 94, 121, 123,
- 125, 126, 134, 160, 161, 162, 163, 164, 165, 166,
- 213, 215, 244, 245, 259, 260, 263, 264, 265, 270,
- 271, 272, 273, 279, 285, 286, 295, 296, 297, 300,
- 304, 306, 312, 325, 331, 332, 333, 334, 335, 343,
- 344, 345, 346, 347, 351, 352, 353, 354, 356, 357,
- 363, 365, 366, 367, 368, 369, 370, 372, 374, 375,
- 377, 378, 379, 390, 391, 392, 393, 394, 395, 396,
- 398, 399, 401, 402, 403, 404, 405, 406, 407, 408,
- 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
- 421, 422, 423, 424, 425, 426, 427, 428, 430, 450,
- 451, 452, 453, 454, 455, 456, 457, 458, 461, 462,
- 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
- 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
- 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
- 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
- 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
- 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
- 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
- 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
- 547, 549, 550, 551, 552, 553, 554, 555, 556, 557,
- 558, 559, 560, 562, 563, 564, 565, 566, 567, 568,
- 569, 570, 571, 572, 573, 574, 576, 577, 578, 580,
- 581, 582, 583, 584, 586, 587, 588, 589, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, 590, 591, 592, 593, 594, 595, 596, 597,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, 598,
- 599, 600, 601, 602, 603, 604, -293, -293, -293, -293,
- -293, -293, -293, -293, 605, 606, 607, 608, 609, 610,
- 611, -293, -293, -293, -293, -293, -293, -293, -293, 612,
- 613, 614, 615, 616, 617, 618, 619, 620, 621, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- 622, 623, 624, 625, 626, 627, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, 628,
- 629, 630, 631, 632, 633, 634, 635, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, 636, 637, 638, 639,
- 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
- 650, 651, 652, 653, 654, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, 655, -293, -293, 656, -293,
- -293, 657, 658, 659, 660, 661, 662, 663, 664, 665,
- 666, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, 667, 668, 669, 670, 671, 672, 673, 674,
- 675, 676, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, 677, 678, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- 679, 680, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, 681, 682, 683, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, 684, 685,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, 686, 687, 688, 689, 690, 691, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, 692, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, 693, -293, -293, -293, -293,
- -293, 694, 695, 696, 697, 698, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, 699, -293, -293,
- 700, 701, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, 702,
- 703, 704, -293, -293, -293, -293, -293, -293, 705, 706,
- -293, -293, -293, -293, -293, -293, -293, -293
+ -299, 267, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -13, 199, 225, 235, 112, 56, -14, 281,
+ -81, -298, -100, 135, -291, 31, 32, 33, 83, 89,
+ 94, 121, 122, 123, 125, 126, 134, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 214, 216, 237, 240,
+ 241, 242, 243, 244, 245, 246, 258, 259, 260, 261,
+ 263, 264, 265, 266, 273, 274, 277, 280, 286, 287,
+ 302, 303, 306, 307, 310, 312, 317, 318, 319, 331,
+ 333, 336, 338, 343, 344, 345, 347, 348, 350, 351,
+ 352, 353, 354, 356, 357, 358, 360, 362, 363, 365,
+ 366, 367, 368, 369, 370, 371, 372, 374, 380, 381,
+ 382, 383, 384, 385, 386, 387, 389, 390, 391, 392,
+ 394, 400, 401, 402, 403, 404, 415, 416, 417, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 463, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 480, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 495, 496,
+ 497, 498, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 517, 518,
+ 519, 520, 521, 522, 523, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 582,
+ 583, 584, 586, 587, 588, 589, 590, 592, 593, 594,
+ 595, 596, 597, 598, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, 599, 600, 601, 602, 603, 604,
+ 605, 606, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, 607, 608, 609, 610, 611, 612, 613, -299, -299,
+ -299, -299, -299, -299, -299, -299, 614, 615, 616, 617,
+ 618, 619, 620, -299, -299, -299, -299, -299, -299, -299,
+ -299, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, 631, 632, 633, 634, 635, 636, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, 637, 638, 639, 640, 641, 642, 643, 644, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, 664, -299, -299,
+ 665, -299, -299, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 685, 686, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, 687, 688, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, 689, 690, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, 691, 692, 693, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, 694, 695, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, 696, 697, 698, 699,
+ 700, 701, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, 702, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, 703, 704,
+ -299, -299, -299, -299, -299, 705, -299, -299, -299, -299,
+ -299, 706, 707, 708, 709, 710, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, 711, -299, -299,
+ 712, 713, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ 714, 715, 716, -299, -299, -299, -299, -299, -299, -299,
+ -299, 717, 718, -299, -299, -299, -299, -299, -299, -299,
+ -299
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1820,10 +1850,10 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_int16 yydefact[] =
{
- 2, 0, 1, 18, 19, 265, 276, 598, 658, 617,
- 286, 672, 695, 296, 721, 315, 663, 3, 17, 21,
- 267, 278, 288, 298, 317, 600, 619, 660, 665, 674,
- 697, 723, 4, 5, 6, 10, 14, 15, 8, 9,
+ 2, 0, 1, 18, 19, 271, 282, 610, 670, 629,
+ 292, 684, 707, 302, 735, 321, 675, 3, 17, 21,
+ 273, 284, 294, 304, 323, 612, 631, 672, 677, 686,
+ 709, 737, 4, 5, 6, 10, 14, 15, 8, 9,
7, 16, 11, 12, 13, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1848,173 +1878,178 @@ static const yytype_int16 yydefact[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 20, 22,
- 23, 90, 93, 102, 261, 218, 219, 24, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 181, 39, 81,
- 25, 94, 95, 50, 74, 89, 258, 26, 27, 28,
- 31, 32, 29, 30, 33, 34, 35, 255, 256, 257,
- 36, 37, 38, 126, 230, 127, 129, 130, 131, 232,
- 237, 233, 244, 245, 246, 250, 132, 133, 134, 135,
- 136, 137, 138, 214, 91, 80, 106, 124, 125, 242,
- 239, 264, 128, 40, 41, 42, 43, 44, 82, 96,
- 97, 113, 68, 78, 69, 222, 223, 107, 60, 61,
- 221, 64, 62, 63, 65, 253, 117, 121, 142, 154,
- 186, 157, 243, 118, 75, 45, 46, 47, 104, 143,
- 144, 145, 146, 48, 49, 51, 52, 54, 55, 53,
- 151, 152, 158, 56, 57, 58, 66, 85, 122, 99,
- 153, 262, 92, 182, 100, 101, 119, 120, 240, 105,
- 59, 83, 86, 195, 67, 70, 108, 109, 110, 84,
- 183, 111, 71, 72, 73, 231, 123, 263, 205, 206,
- 207, 208, 209, 210, 211, 212, 220, 112, 79, 254,
- 114, 115, 116, 184, 76, 77, 98, 87, 88, 103,
- 139, 140, 241, 141, 147, 148, 149, 150, 187, 188,
- 190, 192, 193, 191, 194, 197, 198, 199, 196, 215,
- 155, 249, 156, 161, 162, 159, 160, 163, 164, 166,
- 165, 168, 167, 169, 170, 171, 234, 236, 235, 185,
- 200, 201, 202, 203, 204, 224, 226, 225, 227, 228,
- 229, 251, 252, 259, 260, 189, 213, 216, 217, 238,
- 247, 248, 0, 0, 0, 0, 0, 0, 0, 0,
- 266, 268, 269, 270, 272, 273, 274, 275, 271, 0,
- 0, 0, 0, 0, 0, 0, 277, 279, 280, 281,
- 282, 283, 284, 285, 0, 0, 0, 0, 0, 0,
- 0, 287, 289, 290, 293, 294, 291, 295, 292, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 297,
- 299, 300, 301, 302, 306, 307, 308, 303, 304, 305,
- 0, 0, 0, 0, 0, 0, 320, 324, 325, 326,
- 327, 328, 316, 318, 319, 321, 322, 323, 329, 0,
- 0, 0, 0, 0, 0, 0, 0, 599, 601, 603,
- 602, 608, 604, 605, 606, 607, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 618, 620, 622, 621, 623,
- 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
- 634, 635, 636, 637, 638, 0, 659, 661, 0, 664,
- 666, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 673, 675, 676, 677, 679, 680, 678, 681, 682,
- 683, 684, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 696, 698, 699, 706, 700, 701, 704, 705,
- 702, 703, 707, 0, 0, 722, 724, 725, 331, 330,
- 338, 351, 349, 363, 358, 359, 360, 364, 361, 362,
- 365, 366, 367, 371, 372, 373, 404, 405, 406, 407,
- 408, 436, 437, 438, 444, 445, 354, 446, 447, 450,
- 448, 449, 454, 455, 456, 471, 419, 420, 423, 424,
- 457, 475, 413, 415, 476, 483, 484, 485, 355, 435,
- 505, 506, 414, 499, 396, 350, 409, 472, 480, 458,
- 0, 0, 509, 356, 332, 395, 463, 333, 352, 353,
- 410, 411, 507, 460, 465, 466, 369, 368, 334, 510,
- 439, 470, 397, 418, 477, 478, 479, 482, 498, 412,
- 503, 501, 502, 427, 434, 467, 468, 428, 429, 459,
- 487, 398, 399, 403, 374, 376, 370, 377, 378, 379,
- 380, 387, 388, 389, 390, 391, 392, 393, 511, 512,
- 514, 440, 441, 442, 443, 451, 452, 453, 515, 516,
- 517, 518, 0, 0, 0, 461, 430, 432, 668, 531,
- 536, 534, 533, 537, 535, 544, 545, 546, 0, 0,
- 540, 541, 542, 543, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348, 464, 481, 504, 550, 551, 431,
- 519, 0, 0, 0, 0, 0, 0, 489, 490, 491,
- 492, 493, 494, 495, 496, 497, 669, 421, 422, 425,
- 416, 486, 394, 336, 337, 417, 552, 553, 554, 555,
- 556, 558, 557, 559, 560, 561, 375, 382, 547, 549,
- 548, 381, 0, 719, 720, 532, 401, 469, 513, 400,
- 433, 383, 384, 386, 385, 0, 563, 426, 500, 357,
- 564, 0, 0, 0, 0, 0, 565, 335, 462, 488,
- 402, 566, 567, 568, 573, 571, 572, 569, 570, 574,
- 575, 576, 577, 579, 580, 578, 591, 0, 595, 596,
- 0, 0, 597, 581, 589, 582, 583, 584, 588, 590,
- 585, 586, 587, 309, 310, 311, 312, 313, 314, 609,
- 611, 610, 613, 614, 615, 616, 612, 639, 641, 642,
- 643, 644, 645, 646, 647, 648, 649, 640, 650, 651,
- 652, 653, 654, 655, 656, 657, 662, 667, 685, 686,
- 687, 690, 688, 689, 691, 692, 693, 694, 708, 709,
- 711, 712, 715, 716, 713, 714, 717, 710, 726, 727,
- 473, 508, 530, 670, 671, 538, 539, 520, 521, 0,
- 0, 0, 525, 718, 562, 474, 529, 526, 0, 0,
- 592, 593, 594, 524, 522, 523, 527, 528
+ 0, 0, 0, 0, 20, 22, 23, 90, 93, 102,
+ 267, 219, 220, 24, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 39, 81, 25, 94, 95, 50,
+ 74, 89, 264, 26, 27, 28, 31, 32, 29, 30,
+ 33, 34, 35, 261, 262, 263, 36, 37, 38, 126,
+ 231, 127, 129, 130, 131, 233, 238, 234, 250, 251,
+ 252, 256, 132, 133, 134, 135, 136, 137, 138, 215,
+ 91, 80, 106, 124, 125, 243, 240, 270, 128, 40,
+ 41, 42, 43, 44, 82, 96, 97, 113, 68, 78,
+ 69, 223, 224, 107, 60, 61, 222, 64, 62, 63,
+ 65, 259, 117, 121, 142, 154, 187, 157, 249, 118,
+ 75, 45, 46, 47, 104, 143, 144, 145, 146, 48,
+ 49, 51, 52, 54, 55, 53, 151, 152, 158, 56,
+ 57, 58, 66, 85, 122, 99, 153, 268, 92, 182,
+ 100, 101, 119, 120, 241, 105, 59, 83, 86, 196,
+ 67, 70, 108, 109, 110, 84, 183, 184, 111, 71,
+ 72, 73, 232, 123, 269, 206, 207, 208, 209, 210,
+ 211, 212, 213, 221, 112, 79, 260, 114, 115, 116,
+ 185, 76, 77, 98, 87, 88, 103, 139, 140, 242,
+ 244, 245, 246, 247, 248, 141, 147, 148, 149, 150,
+ 188, 189, 191, 193, 194, 192, 195, 198, 199, 200,
+ 197, 216, 155, 255, 156, 161, 162, 159, 160, 163,
+ 164, 166, 165, 168, 167, 169, 170, 171, 235, 237,
+ 236, 186, 201, 202, 203, 204, 205, 225, 227, 226,
+ 228, 229, 230, 257, 258, 265, 266, 190, 214, 217,
+ 218, 239, 253, 254, 0, 0, 0, 0, 0, 0,
+ 0, 0, 272, 274, 275, 276, 278, 279, 280, 281,
+ 277, 0, 0, 0, 0, 0, 0, 0, 283, 285,
+ 286, 287, 288, 289, 290, 291, 0, 0, 0, 0,
+ 0, 0, 0, 293, 295, 296, 299, 300, 297, 301,
+ 298, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 303, 305, 306, 307, 308, 312, 313, 314, 309,
+ 310, 311, 0, 0, 0, 0, 0, 0, 326, 330,
+ 331, 332, 333, 334, 322, 324, 325, 327, 328, 329,
+ 335, 0, 0, 0, 0, 0, 0, 0, 0, 611,
+ 613, 615, 614, 620, 616, 617, 618, 619, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 630, 632, 634,
+ 633, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 0, 671, 673,
+ 0, 676, 678, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 685, 687, 688, 689, 691, 692, 690,
+ 693, 694, 695, 696, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 708, 710, 711, 718, 720,
+ 712, 713, 716, 717, 714, 715, 719, 0, 0, 736,
+ 738, 739, 337, 336, 344, 357, 355, 369, 364, 365,
+ 366, 370, 367, 368, 371, 372, 373, 377, 378, 379,
+ 410, 411, 412, 413, 414, 442, 443, 444, 450, 451,
+ 360, 452, 453, 456, 454, 455, 460, 461, 462, 477,
+ 425, 426, 429, 430, 463, 481, 419, 421, 482, 490,
+ 491, 492, 361, 441, 512, 513, 420, 506, 402, 356,
+ 415, 478, 486, 464, 0, 0, 516, 362, 338, 401,
+ 469, 339, 358, 359, 416, 417, 514, 466, 471, 472,
+ 375, 374, 340, 517, 445, 476, 403, 424, 483, 484,
+ 485, 489, 505, 418, 510, 508, 509, 433, 440, 473,
+ 474, 434, 435, 465, 494, 404, 405, 409, 380, 382,
+ 376, 383, 384, 385, 386, 393, 394, 395, 396, 397,
+ 398, 399, 518, 519, 526, 446, 447, 448, 449, 457,
+ 458, 459, 527, 528, 529, 530, 0, 0, 0, 467,
+ 436, 438, 680, 543, 548, 546, 545, 549, 547, 556,
+ 557, 558, 0, 0, 552, 553, 554, 555, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 470, 487,
+ 511, 488, 562, 563, 437, 531, 0, 0, 0, 0,
+ 0, 0, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 681, 427, 428, 431, 422, 493, 400, 342, 343,
+ 423, 564, 565, 566, 567, 568, 570, 569, 571, 572,
+ 573, 381, 388, 559, 561, 560, 387, 0, 733, 734,
+ 544, 407, 475, 520, 406, 521, 522, 523, 0, 0,
+ 439, 389, 390, 392, 391, 0, 575, 432, 507, 363,
+ 576, 0, 0, 0, 0, 0, 577, 341, 468, 495,
+ 408, 578, 579, 580, 585, 583, 584, 581, 582, 586,
+ 587, 588, 589, 591, 592, 590, 603, 0, 607, 608,
+ 0, 0, 609, 593, 601, 594, 595, 596, 600, 602,
+ 597, 598, 599, 315, 316, 317, 318, 319, 320, 621,
+ 623, 622, 625, 626, 627, 628, 624, 651, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 652, 662, 663,
+ 664, 665, 666, 667, 668, 669, 674, 679, 697, 698,
+ 699, 702, 700, 701, 703, 704, 705, 706, 721, 722,
+ 725, 726, 729, 730, 727, 728, 731, 723, 724, 740,
+ 741, 479, 515, 542, 682, 683, 550, 551, 532, 533,
+ 0, 0, 0, 537, 732, 524, 525, 574, 480, 541,
+ 538, 0, 0, 604, 605, 606, 536, 534, 535, 539,
+ 540
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, 95,
- 235, 240, 249, 707, -293, -293, 708, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
- -293, -293, -293, -293, -293
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, 719, 720, 721, 722, 723,
+ -299, -299, 724, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- 0, 1, 17, 18, 19, 32, 288, 20, 33, 540,
- 21, 34, 556, 22, 35, 571, 23, 36, 589, 606,
- 607, 608, 609, 610, 611, 24, 37, 612, 289, 290,
- 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
- 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
- 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
- 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
- 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
- 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
- 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
- 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
- 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
- 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
- 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
- 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
- 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
- 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
- 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
- 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
- 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
- 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
- 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
- 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
- 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
- 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
- 521, 522, 523, 524, 541, 542, 543, 544, 545, 546,
- 547, 548, 557, 558, 559, 560, 561, 562, 563, 590,
- 591, 592, 593, 594, 595, 596, 597, 598, 599, 572,
- 573, 574, 575, 576, 577, 578, 25, 38, 627, 628,
- 629, 630, 631, 632, 633, 634, 635, 26, 39, 655,
- 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
- 666, 667, 668, 669, 670, 671, 672, 673, 674, 27,
- 40, 676, 677, 28, 41, 679, 680, 525, 526, 527,
- 528, 29, 42, 691, 692, 693, 694, 695, 696, 697,
- 698, 699, 700, 701, 30, 43, 712, 713, 714, 715,
- 716, 717, 718, 719, 720, 721, 722, 529, 530, 531,
- 31, 44, 725, 726, 727
+ 0, 1, 17, 18, 19, 32, 294, 20, 33, 552,
+ 21, 34, 568, 22, 35, 583, 23, 36, 601, 618,
+ 619, 620, 621, 622, 623, 24, 37, 624, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 553, 554, 555, 556, 557, 558, 559, 560, 569, 570,
+ 571, 572, 573, 574, 575, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 584, 585, 586, 587, 588,
+ 589, 590, 25, 38, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 26, 39, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 685, 686, 27, 40, 688, 689, 28,
+ 41, 691, 692, 537, 538, 539, 540, 29, 42, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 30, 43, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 541, 542, 543, 31, 44, 739,
+ 740, 741
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -2025,78 +2060,80 @@ static const yytype_int16 yytable[] =
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, 723, 724, 675, 678, 79, 80,
- 81, 728, 729, 730, 82, 83, 84, 85, 86, 87,
+ 75, 76, 77, 78, 737, 738, 687, 690, 79, 80,
+ 81, 742, 743, 744, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, 122, 731, 732, 733, 734, 735,
- 736, 737, 579, 738, 123, 124, 125, 126, 127, 739,
- 128, 129, 130, 579, 740, 131, 132, 133, 134, 135,
+ 118, 119, 120, 121, 122, 631, 632, 633, 634, 635,
+ 636, 637, 638, 745, 123, 124, 125, 126, 127, 746,
+ 128, 129, 130, 591, 747, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
- 156, 741, 613, 742, 157, 743, 744, 158, 159, 160,
- 161, 162, 163, 164, 745, 165, 166, 167, 168, 169,
- 170, 171, 172, 173, 174, 175, 176, 177, 178, 681,
- 682, 683, 684, 685, 686, 687, 688, 689, 690, 549,
- 746, 747, 748, 749, 750, 751, 752, 550, 551, 179,
+ 156, 748, 749, 750, 157, 751, 752, 158, 159, 160,
+ 161, 162, 163, 164, 753, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 591,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 754, 755, 756, 757, 758, 759, 760, 761, 762, 179,
180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
- 220, 221, 222, 753, 223, 754, 224, 225, 226, 227,
+ 220, 221, 222, 223, 763, 224, 764, 225, 226, 227,
228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
- 238, 239, 240, 241, 242, 702, 703, 704, 705, 706,
- 707, 708, 709, 710, 755, 756, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 552, 2, 553, 757,
- 758, 554, 614, 759, 760, 761, 253, 615, 3, 4,
- 762, 763, 764, 765, 254, 255, 616, 256, 257, 766,
- 258, 259, 260, 261, 262, 767, 768, 263, 264, 265,
- 266, 267, 268, 269, 270, 769, 770, 771, 271, 532,
- 772, 533, 534, 711, 773, 5, 774, 272, 273, 274,
- 275, 6, 775, 564, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 776, 287, 581, 582, 583,
- 584, 777, 778, 779, 780, 781, 580, 586, 581, 582,
- 583, 584, 585, 782, 783, 784, 785, 786, 586, 565,
- 566, 787, 788, 789, 790, 7, 791, 792, 600, 601,
- 602, 603, 604, 793, 535, 794, 795, 796, 797, 798,
- 799, 605, 800, 8, 801, 802, 567, 803, 804, 805,
- 587, 588, 619, 620, 621, 622, 623, 624, 625, 626,
- 806, 807, 808, 809, 810, 811, 812, 536, 813, 814,
- 537, 815, 816, 817, 818, 819, 820, 821, 822, 538,
- 823, 824, 825, 826, 827, 828, 829, 830, 831, 832,
- 555, 833, 834, 835, 836, 837, 838, 839, 840, 9,
- 841, 636, 637, 638, 639, 640, 641, 642, 643, 644,
- 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
- 842, 843, 844, 845, 846, 847, 848, 849, 850, 568,
- 569, 851, 852, 853, 854, 855, 856, 857, 858, 859,
- 860, 861, 862, 863, 864, 865, 866, 867, 868, 869,
- 870, 871, 872, 873, 874, 875, 876, 877, 878, 879,
- 880, 881, 882, 10, 883, 884, 885, 886, 887, 888,
- 889, 890, 891, 892, 570, 893, 894, 895, 896, 897,
- 898, 899, 900, 901, 902, 11, 903, 904, 905, 906,
- 907, 908, 909, 910, 911, 912, 913, 914, 915, 916,
- 917, 918, 919, 920, 921, 922, 12, 923, 924, 925,
- 926, 927, 928, 929, 930, 931, 932, 933, 13, 934,
- 935, 936, 937, 938, 939, 940, 941, 942, 943, 944,
- 945, 539, 946, 947, 948, 949, 950, 951, 952, 953,
- 954, 955, 956, 957, 958, 14, 959, 960, 961, 15,
- 962, 963, 964, 965, 966, 16, 967, 968, 969, 970,
- 971, 972, 973, 974, 975, 976, 977, 978, 979, 980,
- 981, 982, 983, 984, 985, 986, 987, 988, 989, 990,
- 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000,
- 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
- 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020,
- 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
- 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040,
- 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050,
- 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060,
- 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070,
- 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080,
- 1081, 1082, 1083, 1084, 1085, 1086, 1087, 0, 0, 0,
+ 238, 239, 240, 241, 242, 243, 544, 765, 545, 546,
+ 766, 767, 768, 769, 770, 771, 772, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 2, 773, 774,
+ 775, 776, 561, 777, 778, 779, 780, 254, 3, 4,
+ 562, 563, 576, 781, 782, 255, 256, 783, 257, 258,
+ 784, 259, 260, 261, 262, 263, 785, 786, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 547, 787, 788, 277, 5, 789, 790, 577, 578,
+ 791, 6, 792, 278, 279, 280, 281, 793, 794, 795,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 796, 293, 797, 548, 579, 798, 549, 799, 593,
+ 594, 595, 596, 800, 801, 802, 550, 803, 804, 598,
+ 805, 806, 807, 808, 809, 7, 810, 811, 812, 564,
+ 813, 565, 814, 815, 566, 816, 817, 818, 819, 820,
+ 821, 822, 823, 8, 824, 612, 613, 614, 615, 616,
+ 825, 826, 827, 828, 829, 830, 831, 832, 617, 833,
+ 834, 835, 836, 592, 837, 593, 594, 595, 596, 597,
+ 838, 839, 840, 841, 842, 598, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 843, 844, 845, 580, 581,
+ 846, 847, 848, 849, 850, 851, 852, 853, 854, 9,
+ 855, 856, 857, 858, 859, 860, 861, 862, 863, 864,
+ 865, 866, 599, 600, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 867, 582, 868, 869, 870, 871, 872,
+ 873, 874, 875, 876, 877, 878, 879, 880, 881, 723,
+ 882, 724, 883, 884, 885, 886, 887, 888, 889, 890,
+ 891, 892, 893, 894, 10, 895, 896, 897, 898, 551,
+ 899, 900, 901, 902, 903, 904, 905, 906, 907, 908,
+ 909, 910, 911, 912, 913, 914, 11, 915, 916, 917,
+ 918, 919, 920, 921, 567, 922, 923, 924, 925, 926,
+ 927, 928, 929, 930, 931, 932, 933, 12, 934, 935,
+ 936, 937, 938, 939, 940, 941, 942, 943, 944, 13,
+ 945, 946, 947, 948, 949, 950, 951, 952, 953, 954,
+ 955, 956, 957, 958, 959, 960, 961, 962, 963, 964,
+ 965, 966, 967, 968, 969, 970, 971, 972, 973, 974,
+ 975, 14, 976, 977, 978, 15, 979, 980, 981, 982,
+ 983, 16, 984, 985, 986, 987, 988, 989, 990, 991,
+ 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
+ 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
+ 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021,
+ 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031,
+ 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
+ 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051,
+ 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061,
+ 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
+ 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081,
+ 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091,
+ 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101,
+ 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 617, 618
+ 0, 0, 0, 0, 0, 0, 625, 626, 627, 628,
+ 629, 630
};
static const yytype_int16 yycheck[] =
@@ -2104,63 +2141,64 @@ static const yytype_int16 yycheck[] =
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 319, 320, 117, 329, 51, 52,
+ 43, 44, 45, 46, 325, 326, 117, 335, 51, 52,
53, 10, 10, 10, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
- 93, 94, 95, 96, 97, 10, 10, 10, 10, 10,
- 10, 10, 47, 10, 107, 108, 109, 110, 111, 10,
+ 93, 94, 95, 96, 97, 99, 100, 101, 102, 103,
+ 104, 105, 106, 10, 107, 108, 109, 110, 111, 10,
113, 114, 115, 47, 10, 118, 119, 120, 121, 122,
123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
- 143, 10, 37, 10, 147, 10, 10, 150, 151, 152,
+ 143, 10, 10, 10, 147, 10, 10, 150, 151, 152,
153, 154, 155, 156, 10, 158, 159, 160, 161, 162,
- 163, 164, 165, 166, 167, 168, 169, 170, 171, 259,
- 260, 261, 262, 263, 264, 265, 266, 267, 268, 47,
- 10, 10, 10, 10, 10, 10, 10, 55, 56, 192,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 47,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
213, 214, 215, 216, 217, 218, 219, 220, 221, 222,
223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 10, 237, 10, 239, 240, 241, 242,
+ 233, 234, 235, 236, 10, 238, 10, 240, 241, 242,
243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
- 253, 254, 255, 256, 257, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 10, 10, 269, 270, 271, 272,
- 273, 274, 275, 276, 277, 278, 144, 0, 146, 10,
- 10, 149, 37, 10, 10, 10, 289, 37, 11, 12,
- 10, 10, 10, 10, 297, 298, 37, 300, 301, 10,
- 303, 304, 305, 306, 307, 10, 10, 310, 311, 312,
- 313, 314, 315, 316, 317, 10, 10, 10, 321, 47,
- 10, 49, 50, 348, 10, 48, 10, 330, 331, 332,
- 333, 54, 10, 47, 337, 338, 339, 340, 341, 342,
- 343, 344, 345, 346, 347, 10, 349, 292, 293, 294,
- 295, 10, 10, 10, 10, 10, 290, 302, 292, 293,
- 294, 295, 296, 10, 10, 10, 10, 10, 302, 83,
- 84, 10, 10, 10, 10, 98, 10, 10, 323, 324,
- 325, 326, 327, 10, 112, 10, 10, 10, 10, 10,
- 10, 336, 10, 116, 10, 10, 110, 10, 10, 10,
- 334, 335, 99, 100, 101, 102, 103, 104, 105, 106,
- 10, 10, 10, 10, 10, 10, 10, 145, 10, 10,
- 148, 10, 10, 10, 10, 10, 10, 10, 10, 157,
+ 253, 254, 255, 256, 257, 258, 47, 10, 49, 50,
+ 10, 10, 10, 10, 10, 10, 10, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 0, 10, 10,
+ 10, 10, 47, 10, 10, 10, 10, 290, 11, 12,
+ 55, 56, 47, 10, 10, 298, 299, 10, 301, 302,
+ 10, 304, 305, 306, 307, 308, 10, 10, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 112, 10, 10, 327, 48, 10, 10, 83, 84,
+ 10, 54, 10, 336, 337, 338, 339, 10, 10, 10,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 10, 355, 10, 145, 110, 10, 148, 10, 293,
+ 294, 295, 296, 10, 10, 10, 157, 10, 10, 303,
+ 10, 10, 10, 10, 10, 98, 10, 10, 10, 144,
+ 10, 146, 10, 10, 149, 10, 10, 10, 10, 10,
+ 10, 10, 10, 116, 10, 329, 330, 331, 332, 333,
+ 10, 10, 10, 10, 10, 10, 10, 10, 342, 10,
+ 10, 10, 10, 291, 10, 293, 294, 295, 296, 297,
+ 10, 10, 10, 10, 10, 303, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 10, 10, 10, 193, 194,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 172,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 308, 10, 10, 10, 10, 10, 10, 10, 10, 172,
- 10, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 193,
- 194, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 340, 341, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 10, 239, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 354,
+ 10, 356, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 237, 10, 10, 10, 10, 310,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 259, 10, 10, 10,
+ 10, 10, 10, 10, 309, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 280, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 292,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 236, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 238, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 258, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 279, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 291, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 309, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 318, 10, 10, 10, 322,
- 10, 10, 10, 10, 10, 328, 10, 10, 10, 10,
+ 10, 324, 10, 10, 10, 328, 10, 10, 10, 10,
+ 10, 334, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
@@ -2172,21 +2210,22 @@ static const yytype_int16 yycheck[] =
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, -1, -1, -1,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 37, 37
+ -1, -1, -1, -1, -1, -1, 37, 37, 37, 37,
+ 37, 37
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_int16 yystos[] =
{
- 0, 351, 0, 11, 12, 48, 54, 98, 116, 172,
- 236, 258, 279, 291, 318, 322, 328, 352, 353, 354,
- 357, 360, 363, 366, 375, 646, 657, 679, 683, 691,
- 704, 720, 355, 358, 361, 364, 367, 376, 647, 658,
- 680, 684, 692, 705, 721, 13, 14, 15, 16, 17,
+ 0, 358, 0, 11, 12, 48, 54, 98, 116, 172,
+ 237, 259, 280, 292, 324, 328, 334, 359, 360, 361,
+ 364, 367, 370, 373, 382, 659, 670, 692, 696, 704,
+ 717, 734, 362, 365, 368, 371, 374, 383, 660, 671,
+ 693, 697, 705, 718, 735, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 51,
@@ -2204,57 +2243,60 @@ static const yytype_int16 yystos[] =
203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
213, 214, 215, 216, 217, 218, 219, 220, 221, 222,
223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 237, 239, 240, 241, 242, 243, 244,
+ 233, 234, 235, 236, 238, 240, 241, 242, 243, 244,
245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 269, 270, 271, 272, 273, 274, 275,
- 276, 277, 278, 289, 297, 298, 300, 301, 303, 304,
- 305, 306, 307, 310, 311, 312, 313, 314, 315, 316,
- 317, 321, 330, 331, 332, 333, 337, 338, 339, 340,
- 341, 342, 343, 344, 345, 346, 347, 349, 356, 378,
- 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
- 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
- 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
- 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
- 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
- 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
- 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
- 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
- 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
- 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
- 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
- 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
- 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
- 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
- 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
- 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
- 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
- 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
- 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
- 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
- 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
- 609, 610, 611, 612, 613, 687, 688, 689, 690, 717,
- 718, 719, 47, 49, 50, 112, 145, 148, 157, 309,
- 359, 614, 615, 616, 617, 618, 619, 620, 621, 47,
- 55, 56, 144, 146, 149, 308, 362, 622, 623, 624,
- 625, 626, 627, 628, 47, 83, 84, 110, 193, 194,
- 238, 365, 639, 640, 641, 642, 643, 644, 645, 47,
- 290, 292, 293, 294, 295, 296, 302, 334, 335, 368,
- 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
- 323, 324, 325, 326, 327, 336, 369, 370, 371, 372,
- 373, 374, 377, 629, 630, 631, 632, 633, 636, 99,
- 100, 101, 102, 103, 104, 105, 106, 648, 649, 650,
- 651, 652, 653, 654, 655, 656, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
- 187, 188, 189, 190, 191, 659, 660, 661, 662, 663,
- 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
- 674, 675, 676, 677, 678, 117, 681, 682, 329, 685,
- 686, 259, 260, 261, 262, 263, 264, 265, 266, 267,
- 268, 693, 694, 695, 696, 697, 698, 699, 700, 701,
- 702, 703, 280, 281, 282, 283, 284, 285, 286, 287,
- 288, 348, 706, 707, 708, 709, 710, 711, 712, 713,
- 714, 715, 716, 319, 320, 722, 723, 724, 10, 10,
+ 255, 256, 257, 258, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 290, 298, 299, 301, 302, 304,
+ 305, 306, 307, 308, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 327, 336, 337,
+ 338, 339, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 355, 363, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 700, 701, 702,
+ 703, 731, 732, 733, 47, 49, 50, 112, 145, 148,
+ 157, 310, 366, 627, 628, 629, 630, 631, 632, 633,
+ 634, 47, 55, 56, 144, 146, 149, 309, 369, 635,
+ 636, 637, 638, 639, 640, 641, 47, 83, 84, 110,
+ 193, 194, 239, 372, 652, 653, 654, 655, 656, 657,
+ 658, 47, 291, 293, 294, 295, 296, 297, 303, 340,
+ 341, 375, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 329, 330, 331, 332, 333, 342, 376, 377,
+ 378, 379, 380, 381, 384, 642, 643, 644, 645, 646,
+ 649, 99, 100, 101, 102, 103, 104, 105, 106, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 117, 694, 695,
+ 335, 698, 699, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 354, 356, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 325, 326, 736,
+ 737, 738, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
@@ -2290,85 +2332,87 @@ static const yytype_int16 yystos[] =
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10
+ 10
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_int16 yyr1[] =
{
- 0, 350, 351, 351, 352, 352, 352, 352, 352, 352,
- 352, 352, 352, 352, 352, 352, 352, 352, 353, 354,
- 355, 355, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
- 356, 356, 356, 356, 356, 357, 358, 358, 359, 359,
- 359, 359, 359, 359, 359, 359, 360, 361, 361, 362,
- 362, 362, 362, 362, 362, 362, 363, 364, 364, 365,
- 365, 365, 365, 365, 365, 365, 366, 367, 367, 368,
- 368, 368, 368, 368, 368, 368, 368, 368, 368, 369,
- 370, 371, 372, 373, 374, 375, 376, 376, 377, 377,
- 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
- 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
- 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
- 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
- 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
- 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
- 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
- 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
- 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
- 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
- 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
- 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
- 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
- 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
- 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
- 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
- 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
- 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
- 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
- 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
- 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
- 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
- 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
- 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
- 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
- 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
- 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
- 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
- 647, 648, 648, 648, 648, 648, 648, 648, 648, 649,
- 650, 651, 652, 653, 654, 655, 656, 657, 658, 658,
- 659, 659, 659, 659, 659, 659, 659, 659, 659, 659,
- 659, 659, 659, 659, 659, 659, 659, 659, 659, 660,
+ 0, 357, 358, 358, 359, 359, 359, 359, 359, 359,
+ 359, 359, 359, 359, 359, 359, 359, 359, 360, 361,
+ 362, 362, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 364, 365, 365, 366, 366, 366, 366, 366, 366,
+ 366, 366, 367, 368, 368, 369, 369, 369, 369, 369,
+ 369, 369, 370, 371, 371, 372, 372, 372, 372, 372,
+ 372, 372, 373, 374, 374, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 383, 384, 384, 384, 384, 384, 384,
+ 384, 384, 384, 384, 384, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 660, 661, 661, 661, 661, 661, 661, 661,
661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
- 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
- 680, 681, 682, 683, 684, 684, 685, 686, 687, 688,
- 689, 690, 691, 692, 692, 693, 693, 693, 693, 693,
- 693, 693, 693, 693, 693, 694, 695, 696, 697, 698,
- 699, 700, 701, 702, 703, 704, 705, 705, 706, 706,
- 706, 706, 706, 706, 706, 706, 706, 706, 707, 708,
- 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
- 719, 720, 721, 721, 722, 722, 723, 724
+ 671, 671, 672, 672, 672, 672, 672, 672, 672, 672,
+ 672, 672, 672, 672, 672, 672, 672, 672, 672, 672,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, 681,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 693, 694, 695, 696, 697, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 705, 706, 706, 706,
+ 706, 706, 706, 706, 706, 706, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 718,
+ 719, 719, 719, 719, 719, 719, 719, 719, 719, 719,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 735, 736, 736,
+ 737, 738
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -2400,13 +2444,14 @@ static const yytype_int8 yyr2[] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 0, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 1, 2, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
+ 2, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -2420,33 +2465,34 @@ static const yytype_int8 yyr2[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
+ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 3, 3, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 4, 4, 4, 3, 3, 4, 4, 3,
- 3, 2, 2, 2, 2, 2, 2, 2, 3, 3,
+ 2, 2, 2, 2, 2, 3, 2, 2, 2, 2,
+ 2, 2, 2, 2, 3, 3, 2, 2, 2, 2,
+ 2, 2, 3, 3, 4, 4, 4, 3, 3, 4,
+ 4, 3, 3, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 3, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 3, 3, 3, 2, 2, 2,
+ 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 1,
+ 2, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 3, 3, 3, 2, 2, 2, 1, 2,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 1, 2, 0, 1, 2, 1, 2, 0, 1, 2,
+ 2, 2, 3, 3, 1, 2, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 1, 2, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
- 0, 1, 2, 1, 2, 0, 1, 2, 2, 2,
- 3, 3, 1, 2, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 0, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
- 2, 1, 2, 0, 1, 1, 2, 2
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 3, 2, 2, 1, 2, 0, 1, 1,
+ 2, 2
};
@@ -2914,25 +2960,25 @@ yyreduce:
switch (yyn)
{
case 18: /* force_toplevel: VAR_FORCE_TOPLEVEL */
-#line 216 "util/configparser.y"
+#line 219 "util/configparser.y"
{
OUTYY(("\nP(force-toplevel)\n"));
cfg_parser->started_toplevel = 0;
}
-#line 2923 "util/configparser.c"
+#line 2969 "util/configparser.c"
break;
case 19: /* serverstart: VAR_SERVER */
-#line 223 "util/configparser.y"
+#line 226 "util/configparser.y"
{
OUTYY(("\nP(server:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 2932 "util/configparser.c"
+#line 2978 "util/configparser.c"
break;
- case 265: /* stubstart: VAR_STUB_ZONE */
-#line 341 "util/configparser.y"
+ case 271: /* stubstart: VAR_STUB_ZONE */
+#line 347 "util/configparser.y"
{
struct config_stub* s;
OUTYY(("\nP(stub_zone:)\n"));
@@ -2945,11 +2991,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 2949 "util/configparser.c"
+#line 2995 "util/configparser.c"
break;
- case 276: /* forwardstart: VAR_FORWARD_ZONE */
-#line 360 "util/configparser.y"
+ case 282: /* forwardstart: VAR_FORWARD_ZONE */
+#line 366 "util/configparser.y"
{
struct config_stub* s;
OUTYY(("\nP(forward_zone:)\n"));
@@ -2962,11 +3008,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 2966 "util/configparser.c"
+#line 3012 "util/configparser.c"
break;
- case 286: /* viewstart: VAR_VIEW */
-#line 379 "util/configparser.y"
+ case 292: /* viewstart: VAR_VIEW */
+#line 385 "util/configparser.y"
{
struct config_view* s;
OUTYY(("\nP(view:)\n"));
@@ -2981,11 +3027,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 2985 "util/configparser.c"
+#line 3031 "util/configparser.c"
break;
- case 296: /* authstart: VAR_AUTH_ZONE */
-#line 400 "util/configparser.y"
+ case 302: /* authstart: VAR_AUTH_ZONE */
+#line 406 "util/configparser.y"
{
struct config_auth* s;
OUTYY(("\nP(auth_zone:)\n"));
@@ -3005,11 +3051,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 3009 "util/configparser.c"
+#line 3055 "util/configparser.c"
break;
- case 309: /* rpz_tag: VAR_TAGS STRING_ARG */
-#line 428 "util/configparser.y"
+ case 315: /* rpz_tag: VAR_TAGS STRING_ARG */
+#line 434 "util/configparser.y"
{
uint8_t* bitlist;
size_t len = 0;
@@ -3026,11 +3072,11 @@ yyreduce:
}
}
-#line 3030 "util/configparser.c"
+#line 3076 "util/configparser.c"
break;
- case 310: /* rpz_action_override: VAR_RPZ_ACTION_OVERRIDE STRING_ARG */
-#line 447 "util/configparser.y"
+ case 316: /* rpz_action_override: VAR_RPZ_ACTION_OVERRIDE STRING_ARG */
+#line 453 "util/configparser.y"
{
OUTYY(("P(rpz_action_override:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "nxdomain")!=0 && strcmp((yyvsp[0].str), "nodata")!=0 &&
@@ -3045,21 +3091,21 @@ yyreduce:
cfg_parser->cfg->auths->rpz_action_override = (yyvsp[0].str);
}
}
-#line 3049 "util/configparser.c"
+#line 3095 "util/configparser.c"
break;
- case 311: /* rpz_cname_override: VAR_RPZ_CNAME_OVERRIDE STRING_ARG */
-#line 464 "util/configparser.y"
+ case 317: /* rpz_cname_override: VAR_RPZ_CNAME_OVERRIDE STRING_ARG */
+#line 470 "util/configparser.y"
{
OUTYY(("P(rpz_cname_override:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->auths->rpz_cname);
cfg_parser->cfg->auths->rpz_cname = (yyvsp[0].str);
}
-#line 3059 "util/configparser.c"
+#line 3105 "util/configparser.c"
break;
- case 312: /* rpz_log: VAR_RPZ_LOG STRING_ARG */
-#line 472 "util/configparser.y"
+ case 318: /* rpz_log: VAR_RPZ_LOG STRING_ARG */
+#line 478 "util/configparser.y"
{
OUTYY(("P(rpz_log:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3067,21 +3113,21 @@ yyreduce:
else cfg_parser->cfg->auths->rpz_log = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3071 "util/configparser.c"
+#line 3117 "util/configparser.c"
break;
- case 313: /* rpz_log_name: VAR_RPZ_LOG_NAME STRING_ARG */
-#line 482 "util/configparser.y"
+ case 319: /* rpz_log_name: VAR_RPZ_LOG_NAME STRING_ARG */
+#line 488 "util/configparser.y"
{
OUTYY(("P(rpz_log_name:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->auths->rpz_log_name);
cfg_parser->cfg->auths->rpz_log_name = (yyvsp[0].str);
}
-#line 3081 "util/configparser.c"
+#line 3127 "util/configparser.c"
break;
- case 314: /* rpz_signal_nxdomain_ra: VAR_RPZ_SIGNAL_NXDOMAIN_RA STRING_ARG */
-#line 489 "util/configparser.y"
+ case 320: /* rpz_signal_nxdomain_ra: VAR_RPZ_SIGNAL_NXDOMAIN_RA STRING_ARG */
+#line 495 "util/configparser.y"
{
OUTYY(("P(rpz_signal_nxdomain_ra:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3089,11 +3135,11 @@ yyreduce:
else cfg_parser->cfg->auths->rpz_signal_nxdomain_ra = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3093 "util/configparser.c"
+#line 3139 "util/configparser.c"
break;
- case 315: /* rpzstart: VAR_RPZ */
-#line 499 "util/configparser.y"
+ case 321: /* rpzstart: VAR_RPZ */
+#line 505 "util/configparser.y"
{
struct config_auth* s;
OUTYY(("\nP(rpz:)\n"));
@@ -3111,11 +3157,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 3115 "util/configparser.c"
+#line 3161 "util/configparser.c"
break;
- case 330: /* server_num_threads: VAR_NUM_THREADS STRING_ARG */
-#line 524 "util/configparser.y"
+ case 336: /* server_num_threads: VAR_NUM_THREADS STRING_ARG */
+#line 530 "util/configparser.y"
{
OUTYY(("P(server_num_threads:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3123,11 +3169,11 @@ yyreduce:
else cfg_parser->cfg->num_threads = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3127 "util/configparser.c"
+#line 3173 "util/configparser.c"
break;
- case 331: /* server_verbosity: VAR_VERBOSITY STRING_ARG */
-#line 533 "util/configparser.y"
+ case 337: /* server_verbosity: VAR_VERBOSITY STRING_ARG */
+#line 539 "util/configparser.y"
{
OUTYY(("P(server_verbosity:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3135,11 +3181,11 @@ yyreduce:
else cfg_parser->cfg->verbosity = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3139 "util/configparser.c"
+#line 3185 "util/configparser.c"
break;
- case 332: /* server_statistics_interval: VAR_STATISTICS_INTERVAL STRING_ARG */
-#line 542 "util/configparser.y"
+ case 338: /* server_statistics_interval: VAR_STATISTICS_INTERVAL STRING_ARG */
+#line 548 "util/configparser.y"
{
OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0)
@@ -3149,11 +3195,11 @@ yyreduce:
else cfg_parser->cfg->stat_interval = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3153 "util/configparser.c"
+#line 3199 "util/configparser.c"
break;
- case 333: /* server_statistics_cumulative: VAR_STATISTICS_CUMULATIVE STRING_ARG */
-#line 553 "util/configparser.y"
+ case 339: /* server_statistics_cumulative: VAR_STATISTICS_CUMULATIVE STRING_ARG */
+#line 559 "util/configparser.y"
{
OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3161,11 +3207,11 @@ yyreduce:
else cfg_parser->cfg->stat_cumulative = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3165 "util/configparser.c"
+#line 3211 "util/configparser.c"
break;
- case 334: /* server_extended_statistics: VAR_EXTENDED_STATISTICS STRING_ARG */
-#line 562 "util/configparser.y"
+ case 340: /* server_extended_statistics: VAR_EXTENDED_STATISTICS STRING_ARG */
+#line 568 "util/configparser.y"
{
OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3173,11 +3219,11 @@ yyreduce:
else cfg_parser->cfg->stat_extended = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3177 "util/configparser.c"
+#line 3223 "util/configparser.c"
break;
- case 335: /* server_statistics_inhibit_zero: VAR_STATISTICS_INHIBIT_ZERO STRING_ARG */
-#line 571 "util/configparser.y"
+ case 341: /* server_statistics_inhibit_zero: VAR_STATISTICS_INHIBIT_ZERO STRING_ARG */
+#line 577 "util/configparser.y"
{
OUTYY(("P(server_statistics_inhibit_zero:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3185,11 +3231,11 @@ yyreduce:
else cfg_parser->cfg->stat_inhibit_zero = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3189 "util/configparser.c"
+#line 3235 "util/configparser.c"
break;
- case 336: /* server_shm_enable: VAR_SHM_ENABLE STRING_ARG */
-#line 580 "util/configparser.y"
+ case 342: /* server_shm_enable: VAR_SHM_ENABLE STRING_ARG */
+#line 586 "util/configparser.y"
{
OUTYY(("P(server_shm_enable:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3197,11 +3243,11 @@ yyreduce:
else cfg_parser->cfg->shm_enable = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3201 "util/configparser.c"
+#line 3247 "util/configparser.c"
break;
- case 337: /* server_shm_key: VAR_SHM_KEY STRING_ARG */
-#line 589 "util/configparser.y"
+ case 343: /* server_shm_key: VAR_SHM_KEY STRING_ARG */
+#line 595 "util/configparser.y"
{
OUTYY(("P(server_shm_key:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0)
@@ -3211,11 +3257,11 @@ yyreduce:
else cfg_parser->cfg->shm_key = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3215 "util/configparser.c"
+#line 3261 "util/configparser.c"
break;
- case 338: /* server_port: VAR_PORT STRING_ARG */
-#line 600 "util/configparser.y"
+ case 344: /* server_port: VAR_PORT STRING_ARG */
+#line 606 "util/configparser.y"
{
OUTYY(("P(server_port:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -3223,11 +3269,11 @@ yyreduce:
else cfg_parser->cfg->port = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3227 "util/configparser.c"
+#line 3273 "util/configparser.c"
break;
- case 339: /* server_send_client_subnet: VAR_SEND_CLIENT_SUBNET STRING_ARG */
-#line 609 "util/configparser.y"
+ case 345: /* server_send_client_subnet: VAR_SEND_CLIENT_SUBNET STRING_ARG */
+#line 615 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(server_send_client_subnet:%s)\n", (yyvsp[0].str)));
@@ -3238,11 +3284,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 3242 "util/configparser.c"
+#line 3288 "util/configparser.c"
break;
- case 340: /* server_client_subnet_zone: VAR_CLIENT_SUBNET_ZONE STRING_ARG */
-#line 621 "util/configparser.y"
+ case 346: /* server_client_subnet_zone: VAR_CLIENT_SUBNET_ZONE STRING_ARG */
+#line 627 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(server_client_subnet_zone:%s)\n", (yyvsp[0].str)));
@@ -3254,11 +3300,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 3258 "util/configparser.c"
+#line 3304 "util/configparser.c"
break;
- case 341: /* server_client_subnet_always_forward: VAR_CLIENT_SUBNET_ALWAYS_FORWARD STRING_ARG */
-#line 635 "util/configparser.y"
+ case 347: /* server_client_subnet_always_forward: VAR_CLIENT_SUBNET_ALWAYS_FORWARD STRING_ARG */
+#line 641 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(server_client_subnet_always_forward:%s)\n", (yyvsp[0].str)));
@@ -3272,11 +3318,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3276 "util/configparser.c"
+#line 3322 "util/configparser.c"
break;
- case 342: /* server_client_subnet_opcode: VAR_CLIENT_SUBNET_OPCODE STRING_ARG */
-#line 650 "util/configparser.y"
+ case 348: /* server_client_subnet_opcode: VAR_CLIENT_SUBNET_OPCODE STRING_ARG */
+#line 656 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(client_subnet_opcode:%s)\n", (yyvsp[0].str)));
@@ -3286,11 +3332,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3290 "util/configparser.c"
+#line 3336 "util/configparser.c"
break;
- case 343: /* server_max_client_subnet_ipv4: VAR_MAX_CLIENT_SUBNET_IPV4 STRING_ARG */
-#line 661 "util/configparser.y"
+ case 349: /* server_max_client_subnet_ipv4: VAR_MAX_CLIENT_SUBNET_IPV4 STRING_ARG */
+#line 667 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(max_client_subnet_ipv4:%s)\n", (yyvsp[0].str)));
@@ -3306,11 +3352,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3310 "util/configparser.c"
+#line 3356 "util/configparser.c"
break;
- case 344: /* server_max_client_subnet_ipv6: VAR_MAX_CLIENT_SUBNET_IPV6 STRING_ARG */
-#line 678 "util/configparser.y"
+ case 350: /* server_max_client_subnet_ipv6: VAR_MAX_CLIENT_SUBNET_IPV6 STRING_ARG */
+#line 684 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(max_client_subnet_ipv6:%s)\n", (yyvsp[0].str)));
@@ -3326,11 +3372,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3330 "util/configparser.c"
+#line 3376 "util/configparser.c"
break;
- case 345: /* server_min_client_subnet_ipv4: VAR_MIN_CLIENT_SUBNET_IPV4 STRING_ARG */
-#line 695 "util/configparser.y"
+ case 351: /* server_min_client_subnet_ipv4: VAR_MIN_CLIENT_SUBNET_IPV4 STRING_ARG */
+#line 701 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(min_client_subnet_ipv4:%s)\n", (yyvsp[0].str)));
@@ -3346,11 +3392,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3350 "util/configparser.c"
+#line 3396 "util/configparser.c"
break;
- case 346: /* server_min_client_subnet_ipv6: VAR_MIN_CLIENT_SUBNET_IPV6 STRING_ARG */
-#line 712 "util/configparser.y"
+ case 352: /* server_min_client_subnet_ipv6: VAR_MIN_CLIENT_SUBNET_IPV6 STRING_ARG */
+#line 718 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(min_client_subnet_ipv6:%s)\n", (yyvsp[0].str)));
@@ -3366,11 +3412,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3370 "util/configparser.c"
+#line 3416 "util/configparser.c"
break;
- case 347: /* server_max_ecs_tree_size_ipv4: VAR_MAX_ECS_TREE_SIZE_IPV4 STRING_ARG */
-#line 729 "util/configparser.y"
+ case 353: /* server_max_ecs_tree_size_ipv4: VAR_MAX_ECS_TREE_SIZE_IPV4 STRING_ARG */
+#line 735 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(max_ecs_tree_size_ipv4:%s)\n", (yyvsp[0].str)));
@@ -3384,11 +3430,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3388 "util/configparser.c"
+#line 3434 "util/configparser.c"
break;
- case 348: /* server_max_ecs_tree_size_ipv6: VAR_MAX_ECS_TREE_SIZE_IPV6 STRING_ARG */
-#line 744 "util/configparser.y"
+ case 354: /* server_max_ecs_tree_size_ipv6: VAR_MAX_ECS_TREE_SIZE_IPV6 STRING_ARG */
+#line 750 "util/configparser.y"
{
#ifdef CLIENT_SUBNET
OUTYY(("P(max_ecs_tree_size_ipv6:%s)\n", (yyvsp[0].str)));
@@ -3402,11 +3448,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 3406 "util/configparser.c"
+#line 3452 "util/configparser.c"
break;
- case 349: /* server_interface: VAR_INTERFACE STRING_ARG */
-#line 759 "util/configparser.y"
+ case 355: /* server_interface: VAR_INTERFACE STRING_ARG */
+#line 765 "util/configparser.y"
{
OUTYY(("P(server_interface:%s)\n", (yyvsp[0].str)));
if(cfg_parser->cfg->num_ifs == 0)
@@ -3418,11 +3464,11 @@ yyreduce:
else
cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = (yyvsp[0].str);
}
-#line 3422 "util/configparser.c"
+#line 3468 "util/configparser.c"
break;
- case 350: /* server_outgoing_interface: VAR_OUTGOING_INTERFACE STRING_ARG */
-#line 772 "util/configparser.y"
+ case 356: /* server_outgoing_interface: VAR_OUTGOING_INTERFACE STRING_ARG */
+#line 778 "util/configparser.y"
{
OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[0].str)));
if(cfg_parser->cfg->num_out_ifs == 0)
@@ -3436,11 +3482,11 @@ yyreduce:
cfg_parser->cfg->out_ifs[
cfg_parser->cfg->num_out_ifs++] = (yyvsp[0].str);
}
-#line 3440 "util/configparser.c"
+#line 3486 "util/configparser.c"
break;
- case 351: /* server_outgoing_range: VAR_OUTGOING_RANGE STRING_ARG */
-#line 787 "util/configparser.y"
+ case 357: /* server_outgoing_range: VAR_OUTGOING_RANGE STRING_ARG */
+#line 793 "util/configparser.y"
{
OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -3448,11 +3494,11 @@ yyreduce:
else cfg_parser->cfg->outgoing_num_ports = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3452 "util/configparser.c"
+#line 3498 "util/configparser.c"
break;
- case 352: /* server_outgoing_port_permit: VAR_OUTGOING_PORT_PERMIT STRING_ARG */
-#line 796 "util/configparser.y"
+ case 358: /* server_outgoing_port_permit: VAR_OUTGOING_PORT_PERMIT STRING_ARG */
+#line 802 "util/configparser.y"
{
OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[0].str)));
if(!cfg_mark_ports((yyvsp[0].str), 1,
@@ -3460,11 +3506,11 @@ yyreduce:
yyerror("port number or range (\"low-high\") expected");
free((yyvsp[0].str));
}
-#line 3464 "util/configparser.c"
+#line 3510 "util/configparser.c"
break;
- case 353: /* server_outgoing_port_avoid: VAR_OUTGOING_PORT_AVOID STRING_ARG */
-#line 805 "util/configparser.y"
+ case 359: /* server_outgoing_port_avoid: VAR_OUTGOING_PORT_AVOID STRING_ARG */
+#line 811 "util/configparser.y"
{
OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[0].str)));
if(!cfg_mark_ports((yyvsp[0].str), 0,
@@ -3472,11 +3518,11 @@ yyreduce:
yyerror("port number or range (\"low-high\") expected");
free((yyvsp[0].str));
}
-#line 3476 "util/configparser.c"
+#line 3522 "util/configparser.c"
break;
- case 354: /* server_outgoing_num_tcp: VAR_OUTGOING_NUM_TCP STRING_ARG */
-#line 814 "util/configparser.y"
+ case 360: /* server_outgoing_num_tcp: VAR_OUTGOING_NUM_TCP STRING_ARG */
+#line 820 "util/configparser.y"
{
OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3484,11 +3530,11 @@ yyreduce:
else cfg_parser->cfg->outgoing_num_tcp = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3488 "util/configparser.c"
+#line 3534 "util/configparser.c"
break;
- case 355: /* server_incoming_num_tcp: VAR_INCOMING_NUM_TCP STRING_ARG */
-#line 823 "util/configparser.y"
+ case 361: /* server_incoming_num_tcp: VAR_INCOMING_NUM_TCP STRING_ARG */
+#line 829 "util/configparser.y"
{
OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3496,11 +3542,11 @@ yyreduce:
else cfg_parser->cfg->incoming_num_tcp = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3500 "util/configparser.c"
+#line 3546 "util/configparser.c"
break;
- case 356: /* server_interface_automatic: VAR_INTERFACE_AUTOMATIC STRING_ARG */
-#line 832 "util/configparser.y"
+ case 362: /* server_interface_automatic: VAR_INTERFACE_AUTOMATIC STRING_ARG */
+#line 838 "util/configparser.y"
{
OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3508,21 +3554,21 @@ yyreduce:
else cfg_parser->cfg->if_automatic = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3512 "util/configparser.c"
+#line 3558 "util/configparser.c"
break;
- case 357: /* server_interface_automatic_ports: VAR_INTERFACE_AUTOMATIC_PORTS STRING_ARG */
-#line 841 "util/configparser.y"
+ case 363: /* server_interface_automatic_ports: VAR_INTERFACE_AUTOMATIC_PORTS STRING_ARG */
+#line 847 "util/configparser.y"
{
OUTYY(("P(server_interface_automatic_ports:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->if_automatic_ports);
cfg_parser->cfg->if_automatic_ports = (yyvsp[0].str);
}
-#line 3522 "util/configparser.c"
+#line 3568 "util/configparser.c"
break;
- case 358: /* server_do_ip4: VAR_DO_IP4 STRING_ARG */
-#line 848 "util/configparser.y"
+ case 364: /* server_do_ip4: VAR_DO_IP4 STRING_ARG */
+#line 854 "util/configparser.y"
{
OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3530,11 +3576,11 @@ yyreduce:
else cfg_parser->cfg->do_ip4 = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3534 "util/configparser.c"
+#line 3580 "util/configparser.c"
break;
- case 359: /* server_do_ip6: VAR_DO_IP6 STRING_ARG */
-#line 857 "util/configparser.y"
+ case 365: /* server_do_ip6: VAR_DO_IP6 STRING_ARG */
+#line 863 "util/configparser.y"
{
OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3542,11 +3588,11 @@ yyreduce:
else cfg_parser->cfg->do_ip6 = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3546 "util/configparser.c"
+#line 3592 "util/configparser.c"
break;
- case 360: /* server_do_nat64: VAR_DO_NAT64 STRING_ARG */
-#line 866 "util/configparser.y"
+ case 366: /* server_do_nat64: VAR_DO_NAT64 STRING_ARG */
+#line 872 "util/configparser.y"
{
OUTYY(("P(server_do_nat64:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3554,11 +3600,11 @@ yyreduce:
else cfg_parser->cfg->do_nat64 = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3558 "util/configparser.c"
+#line 3604 "util/configparser.c"
break;
- case 361: /* server_do_udp: VAR_DO_UDP STRING_ARG */
-#line 875 "util/configparser.y"
+ case 367: /* server_do_udp: VAR_DO_UDP STRING_ARG */
+#line 881 "util/configparser.y"
{
OUTYY(("P(server_do_udp:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3566,11 +3612,11 @@ yyreduce:
else cfg_parser->cfg->do_udp = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3570 "util/configparser.c"
+#line 3616 "util/configparser.c"
break;
- case 362: /* server_do_tcp: VAR_DO_TCP STRING_ARG */
-#line 884 "util/configparser.y"
+ case 368: /* server_do_tcp: VAR_DO_TCP STRING_ARG */
+#line 890 "util/configparser.y"
{
OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3578,11 +3624,11 @@ yyreduce:
else cfg_parser->cfg->do_tcp = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3582 "util/configparser.c"
+#line 3628 "util/configparser.c"
break;
- case 363: /* server_prefer_ip4: VAR_PREFER_IP4 STRING_ARG */
-#line 893 "util/configparser.y"
+ case 369: /* server_prefer_ip4: VAR_PREFER_IP4 STRING_ARG */
+#line 899 "util/configparser.y"
{
OUTYY(("P(server_prefer_ip4:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3590,11 +3636,11 @@ yyreduce:
else cfg_parser->cfg->prefer_ip4 = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3594 "util/configparser.c"
+#line 3640 "util/configparser.c"
break;
- case 364: /* server_prefer_ip6: VAR_PREFER_IP6 STRING_ARG */
-#line 902 "util/configparser.y"
+ case 370: /* server_prefer_ip6: VAR_PREFER_IP6 STRING_ARG */
+#line 908 "util/configparser.y"
{
OUTYY(("P(server_prefer_ip6:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3602,11 +3648,11 @@ yyreduce:
else cfg_parser->cfg->prefer_ip6 = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3606 "util/configparser.c"
+#line 3652 "util/configparser.c"
break;
- case 365: /* server_tcp_mss: VAR_TCP_MSS STRING_ARG */
-#line 911 "util/configparser.y"
+ case 371: /* server_tcp_mss: VAR_TCP_MSS STRING_ARG */
+#line 917 "util/configparser.y"
{
OUTYY(("P(server_tcp_mss:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3614,11 +3660,11 @@ yyreduce:
else cfg_parser->cfg->tcp_mss = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3618 "util/configparser.c"
+#line 3664 "util/configparser.c"
break;
- case 366: /* server_outgoing_tcp_mss: VAR_OUTGOING_TCP_MSS STRING_ARG */
-#line 920 "util/configparser.y"
+ case 372: /* server_outgoing_tcp_mss: VAR_OUTGOING_TCP_MSS STRING_ARG */
+#line 926 "util/configparser.y"
{
OUTYY(("P(server_outgoing_tcp_mss:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3626,11 +3672,11 @@ yyreduce:
else cfg_parser->cfg->outgoing_tcp_mss = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3630 "util/configparser.c"
+#line 3676 "util/configparser.c"
break;
- case 367: /* server_tcp_idle_timeout: VAR_TCP_IDLE_TIMEOUT STRING_ARG */
-#line 929 "util/configparser.y"
+ case 373: /* server_tcp_idle_timeout: VAR_TCP_IDLE_TIMEOUT STRING_ARG */
+#line 935 "util/configparser.y"
{
OUTYY(("P(server_tcp_idle_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3642,11 +3688,11 @@ yyreduce:
else cfg_parser->cfg->tcp_idle_timeout = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3646 "util/configparser.c"
+#line 3692 "util/configparser.c"
break;
- case 368: /* server_max_reuse_tcp_queries: VAR_MAX_REUSE_TCP_QUERIES STRING_ARG */
-#line 942 "util/configparser.y"
+ case 374: /* server_max_reuse_tcp_queries: VAR_MAX_REUSE_TCP_QUERIES STRING_ARG */
+#line 948 "util/configparser.y"
{
OUTYY(("P(server_max_reuse_tcp_queries:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3656,11 +3702,11 @@ yyreduce:
else cfg_parser->cfg->max_reuse_tcp_queries = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3660 "util/configparser.c"
+#line 3706 "util/configparser.c"
break;
- case 369: /* server_tcp_reuse_timeout: VAR_TCP_REUSE_TIMEOUT STRING_ARG */
-#line 953 "util/configparser.y"
+ case 375: /* server_tcp_reuse_timeout: VAR_TCP_REUSE_TIMEOUT STRING_ARG */
+#line 959 "util/configparser.y"
{
OUTYY(("P(server_tcp_reuse_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3670,11 +3716,11 @@ yyreduce:
else cfg_parser->cfg->tcp_reuse_timeout = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3674 "util/configparser.c"
+#line 3720 "util/configparser.c"
break;
- case 370: /* server_tcp_auth_query_timeout: VAR_TCP_AUTH_QUERY_TIMEOUT STRING_ARG */
-#line 964 "util/configparser.y"
+ case 376: /* server_tcp_auth_query_timeout: VAR_TCP_AUTH_QUERY_TIMEOUT STRING_ARG */
+#line 970 "util/configparser.y"
{
OUTYY(("P(server_tcp_auth_query_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3684,11 +3730,11 @@ yyreduce:
else cfg_parser->cfg->tcp_auth_query_timeout = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3688 "util/configparser.c"
+#line 3734 "util/configparser.c"
break;
- case 371: /* server_tcp_keepalive: VAR_EDNS_TCP_KEEPALIVE STRING_ARG */
-#line 975 "util/configparser.y"
+ case 377: /* server_tcp_keepalive: VAR_EDNS_TCP_KEEPALIVE STRING_ARG */
+#line 981 "util/configparser.y"
{
OUTYY(("P(server_tcp_keepalive:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3696,11 +3742,11 @@ yyreduce:
else cfg_parser->cfg->do_tcp_keepalive = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3700 "util/configparser.c"
+#line 3746 "util/configparser.c"
break;
- case 372: /* server_tcp_keepalive_timeout: VAR_EDNS_TCP_KEEPALIVE_TIMEOUT STRING_ARG */
-#line 984 "util/configparser.y"
+ case 378: /* server_tcp_keepalive_timeout: VAR_EDNS_TCP_KEEPALIVE_TIMEOUT STRING_ARG */
+#line 990 "util/configparser.y"
{
OUTYY(("P(server_tcp_keepalive_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3712,11 +3758,11 @@ yyreduce:
else cfg_parser->cfg->tcp_keepalive_timeout = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3716 "util/configparser.c"
+#line 3762 "util/configparser.c"
break;
- case 373: /* server_sock_queue_timeout: VAR_SOCK_QUEUE_TIMEOUT STRING_ARG */
-#line 997 "util/configparser.y"
+ case 379: /* server_sock_queue_timeout: VAR_SOCK_QUEUE_TIMEOUT STRING_ARG */
+#line 1003 "util/configparser.y"
{
OUTYY(("P(server_sock_queue_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3728,11 +3774,11 @@ yyreduce:
else cfg_parser->cfg->sock_queue_timeout = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3732 "util/configparser.c"
+#line 3778 "util/configparser.c"
break;
- case 374: /* server_tcp_upstream: VAR_TCP_UPSTREAM STRING_ARG */
-#line 1010 "util/configparser.y"
+ case 380: /* server_tcp_upstream: VAR_TCP_UPSTREAM STRING_ARG */
+#line 1016 "util/configparser.y"
{
OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3740,11 +3786,11 @@ yyreduce:
else cfg_parser->cfg->tcp_upstream = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3744 "util/configparser.c"
+#line 3790 "util/configparser.c"
break;
- case 375: /* server_udp_upstream_without_downstream: VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM STRING_ARG */
-#line 1019 "util/configparser.y"
+ case 381: /* server_udp_upstream_without_downstream: VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM STRING_ARG */
+#line 1025 "util/configparser.y"
{
OUTYY(("P(server_udp_upstream_without_downstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3752,11 +3798,11 @@ yyreduce:
else cfg_parser->cfg->udp_upstream_without_downstream = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3756 "util/configparser.c"
+#line 3802 "util/configparser.c"
break;
- case 376: /* server_ssl_upstream: VAR_SSL_UPSTREAM STRING_ARG */
-#line 1028 "util/configparser.y"
+ case 382: /* server_ssl_upstream: VAR_SSL_UPSTREAM STRING_ARG */
+#line 1034 "util/configparser.y"
{
OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3764,31 +3810,31 @@ yyreduce:
else cfg_parser->cfg->ssl_upstream = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3768 "util/configparser.c"
+#line 3814 "util/configparser.c"
break;
- case 377: /* server_ssl_service_key: VAR_SSL_SERVICE_KEY STRING_ARG */
-#line 1037 "util/configparser.y"
+ case 383: /* server_ssl_service_key: VAR_SSL_SERVICE_KEY STRING_ARG */
+#line 1043 "util/configparser.y"
{
OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->ssl_service_key);
cfg_parser->cfg->ssl_service_key = (yyvsp[0].str);
}
-#line 3778 "util/configparser.c"
+#line 3824 "util/configparser.c"
break;
- case 378: /* server_ssl_service_pem: VAR_SSL_SERVICE_PEM STRING_ARG */
-#line 1044 "util/configparser.y"
+ case 384: /* server_ssl_service_pem: VAR_SSL_SERVICE_PEM STRING_ARG */
+#line 1050 "util/configparser.y"
{
OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->ssl_service_pem);
cfg_parser->cfg->ssl_service_pem = (yyvsp[0].str);
}
-#line 3788 "util/configparser.c"
+#line 3834 "util/configparser.c"
break;
- case 379: /* server_ssl_port: VAR_SSL_PORT STRING_ARG */
-#line 1051 "util/configparser.y"
+ case 385: /* server_ssl_port: VAR_SSL_PORT STRING_ARG */
+#line 1057 "util/configparser.y"
{
OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -3796,21 +3842,21 @@ yyreduce:
else cfg_parser->cfg->ssl_port = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3800 "util/configparser.c"
+#line 3846 "util/configparser.c"
break;
- case 380: /* server_tls_cert_bundle: VAR_TLS_CERT_BUNDLE STRING_ARG */
-#line 1060 "util/configparser.y"
+ case 386: /* server_tls_cert_bundle: VAR_TLS_CERT_BUNDLE STRING_ARG */
+#line 1066 "util/configparser.y"
{
OUTYY(("P(server_tls_cert_bundle:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->tls_cert_bundle);
cfg_parser->cfg->tls_cert_bundle = (yyvsp[0].str);
}
-#line 3810 "util/configparser.c"
+#line 3856 "util/configparser.c"
break;
- case 381: /* server_tls_win_cert: VAR_TLS_WIN_CERT STRING_ARG */
-#line 1067 "util/configparser.y"
+ case 387: /* server_tls_win_cert: VAR_TLS_WIN_CERT STRING_ARG */
+#line 1073 "util/configparser.y"
{
OUTYY(("P(server_tls_win_cert:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3818,53 +3864,53 @@ yyreduce:
else cfg_parser->cfg->tls_win_cert = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3822 "util/configparser.c"
+#line 3868 "util/configparser.c"
break;
- case 382: /* server_tls_additional_port: VAR_TLS_ADDITIONAL_PORT STRING_ARG */
-#line 1076 "util/configparser.y"
+ case 388: /* server_tls_additional_port: VAR_TLS_ADDITIONAL_PORT STRING_ARG */
+#line 1082 "util/configparser.y"
{
OUTYY(("P(server_tls_additional_port:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->tls_additional_port,
(yyvsp[0].str)))
yyerror("out of memory");
}
-#line 3833 "util/configparser.c"
+#line 3879 "util/configparser.c"
break;
- case 383: /* server_tls_ciphers: VAR_TLS_CIPHERS STRING_ARG */
-#line 1084 "util/configparser.y"
+ case 389: /* server_tls_ciphers: VAR_TLS_CIPHERS STRING_ARG */
+#line 1090 "util/configparser.y"
{
OUTYY(("P(server_tls_ciphers:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->tls_ciphers);
cfg_parser->cfg->tls_ciphers = (yyvsp[0].str);
}
-#line 3843 "util/configparser.c"
+#line 3889 "util/configparser.c"
break;
- case 384: /* server_tls_ciphersuites: VAR_TLS_CIPHERSUITES STRING_ARG */
-#line 1091 "util/configparser.y"
+ case 390: /* server_tls_ciphersuites: VAR_TLS_CIPHERSUITES STRING_ARG */
+#line 1097 "util/configparser.y"
{
OUTYY(("P(server_tls_ciphersuites:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->tls_ciphersuites);
cfg_parser->cfg->tls_ciphersuites = (yyvsp[0].str);
}
-#line 3853 "util/configparser.c"
+#line 3899 "util/configparser.c"
break;
- case 385: /* server_tls_session_ticket_keys: VAR_TLS_SESSION_TICKET_KEYS STRING_ARG */
-#line 1098 "util/configparser.y"
+ case 391: /* server_tls_session_ticket_keys: VAR_TLS_SESSION_TICKET_KEYS STRING_ARG */
+#line 1104 "util/configparser.y"
{
OUTYY(("P(server_tls_session_ticket_keys:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_append(&cfg_parser->cfg->tls_session_ticket_keys,
(yyvsp[0].str)))
yyerror("out of memory");
}
-#line 3864 "util/configparser.c"
+#line 3910 "util/configparser.c"
break;
- case 386: /* server_tls_use_sni: VAR_TLS_USE_SNI STRING_ARG */
-#line 1106 "util/configparser.y"
+ case 392: /* server_tls_use_sni: VAR_TLS_USE_SNI STRING_ARG */
+#line 1112 "util/configparser.y"
{
OUTYY(("P(server_tls_use_sni:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3872,11 +3918,11 @@ yyreduce:
else cfg_parser->cfg->tls_use_sni = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3876 "util/configparser.c"
+#line 3922 "util/configparser.c"
break;
- case 387: /* server_https_port: VAR_HTTPS_PORT STRING_ARG */
-#line 1115 "util/configparser.y"
+ case 393: /* server_https_port: VAR_HTTPS_PORT STRING_ARG */
+#line 1121 "util/configparser.y"
{
OUTYY(("P(server_https_port:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -3884,11 +3930,11 @@ yyreduce:
else cfg_parser->cfg->https_port = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3888 "util/configparser.c"
+#line 3934 "util/configparser.c"
break;
- case 388: /* server_http_endpoint: VAR_HTTP_ENDPOINT STRING_ARG */
-#line 1123 "util/configparser.y"
+ case 394: /* server_http_endpoint: VAR_HTTP_ENDPOINT STRING_ARG */
+#line 1129 "util/configparser.y"
{
OUTYY(("P(server_http_endpoint:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->http_endpoint);
@@ -3904,11 +3950,11 @@ yyreduce:
cfg_parser->cfg->http_endpoint = (yyvsp[0].str);
}
}
-#line 3908 "util/configparser.c"
+#line 3954 "util/configparser.c"
break;
- case 389: /* server_http_max_streams: VAR_HTTP_MAX_STREAMS STRING_ARG */
-#line 1139 "util/configparser.y"
+ case 395: /* server_http_max_streams: VAR_HTTP_MAX_STREAMS STRING_ARG */
+#line 1145 "util/configparser.y"
{
OUTYY(("P(server_http_max_streams:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -3916,11 +3962,11 @@ yyreduce:
else cfg_parser->cfg->http_max_streams = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 3920 "util/configparser.c"
+#line 3966 "util/configparser.c"
break;
- case 390: /* server_http_query_buffer_size: VAR_HTTP_QUERY_BUFFER_SIZE STRING_ARG */
-#line 1147 "util/configparser.y"
+ case 396: /* server_http_query_buffer_size: VAR_HTTP_QUERY_BUFFER_SIZE STRING_ARG */
+#line 1153 "util/configparser.y"
{
OUTYY(("P(server_http_query_buffer_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str),
@@ -3928,11 +3974,11 @@ yyreduce:
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 3932 "util/configparser.c"
+#line 3978 "util/configparser.c"
break;
- case 391: /* server_http_response_buffer_size: VAR_HTTP_RESPONSE_BUFFER_SIZE STRING_ARG */
-#line 1155 "util/configparser.y"
+ case 397: /* server_http_response_buffer_size: VAR_HTTP_RESPONSE_BUFFER_SIZE STRING_ARG */
+#line 1161 "util/configparser.y"
{
OUTYY(("P(server_http_response_buffer_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str),
@@ -3940,11 +3986,11 @@ yyreduce:
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 3944 "util/configparser.c"
+#line 3990 "util/configparser.c"
break;
- case 392: /* server_http_nodelay: VAR_HTTP_NODELAY STRING_ARG */
-#line 1163 "util/configparser.y"
+ case 398: /* server_http_nodelay: VAR_HTTP_NODELAY STRING_ARG */
+#line 1169 "util/configparser.y"
{
OUTYY(("P(server_http_nodelay:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3952,11 +3998,11 @@ yyreduce:
else cfg_parser->cfg->http_nodelay = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3956 "util/configparser.c"
+#line 4002 "util/configparser.c"
break;
- case 393: /* server_http_notls_downstream: VAR_HTTP_NOTLS_DOWNSTREAM STRING_ARG */
-#line 1171 "util/configparser.y"
+ case 399: /* server_http_notls_downstream: VAR_HTTP_NOTLS_DOWNSTREAM STRING_ARG */
+#line 1177 "util/configparser.y"
{
OUTYY(("P(server_http_notls_downstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3964,11 +4010,11 @@ yyreduce:
else cfg_parser->cfg->http_notls_downstream = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3968 "util/configparser.c"
+#line 4014 "util/configparser.c"
break;
- case 394: /* server_use_systemd: VAR_USE_SYSTEMD STRING_ARG */
-#line 1179 "util/configparser.y"
+ case 400: /* server_use_systemd: VAR_USE_SYSTEMD STRING_ARG */
+#line 1185 "util/configparser.y"
{
OUTYY(("P(server_use_systemd:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3976,11 +4022,11 @@ yyreduce:
else cfg_parser->cfg->use_systemd = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3980 "util/configparser.c"
+#line 4026 "util/configparser.c"
break;
- case 395: /* server_do_daemonize: VAR_DO_DAEMONIZE STRING_ARG */
-#line 1188 "util/configparser.y"
+ case 401: /* server_do_daemonize: VAR_DO_DAEMONIZE STRING_ARG */
+#line 1194 "util/configparser.y"
{
OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -3988,11 +4034,11 @@ yyreduce:
else cfg_parser->cfg->do_daemonize = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 3992 "util/configparser.c"
+#line 4038 "util/configparser.c"
break;
- case 396: /* server_use_syslog: VAR_USE_SYSLOG STRING_ARG */
-#line 1197 "util/configparser.y"
+ case 402: /* server_use_syslog: VAR_USE_SYSLOG STRING_ARG */
+#line 1203 "util/configparser.y"
{
OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4005,11 +4051,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 4009 "util/configparser.c"
+#line 4055 "util/configparser.c"
break;
- case 397: /* server_log_time_ascii: VAR_LOG_TIME_ASCII STRING_ARG */
-#line 1211 "util/configparser.y"
+ case 403: /* server_log_time_ascii: VAR_LOG_TIME_ASCII STRING_ARG */
+#line 1217 "util/configparser.y"
{
OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4017,11 +4063,11 @@ yyreduce:
else cfg_parser->cfg->log_time_ascii = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4021 "util/configparser.c"
+#line 4067 "util/configparser.c"
break;
- case 398: /* server_log_queries: VAR_LOG_QUERIES STRING_ARG */
-#line 1220 "util/configparser.y"
+ case 404: /* server_log_queries: VAR_LOG_QUERIES STRING_ARG */
+#line 1226 "util/configparser.y"
{
OUTYY(("P(server_log_queries:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4029,11 +4075,11 @@ yyreduce:
else cfg_parser->cfg->log_queries = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4033 "util/configparser.c"
+#line 4079 "util/configparser.c"
break;
- case 399: /* server_log_replies: VAR_LOG_REPLIES STRING_ARG */
-#line 1229 "util/configparser.y"
+ case 405: /* server_log_replies: VAR_LOG_REPLIES STRING_ARG */
+#line 1235 "util/configparser.y"
{
OUTYY(("P(server_log_replies:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4041,11 +4087,11 @@ yyreduce:
else cfg_parser->cfg->log_replies = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4045 "util/configparser.c"
+#line 4091 "util/configparser.c"
break;
- case 400: /* server_log_tag_queryreply: VAR_LOG_TAG_QUERYREPLY STRING_ARG */
-#line 1238 "util/configparser.y"
+ case 406: /* server_log_tag_queryreply: VAR_LOG_TAG_QUERYREPLY STRING_ARG */
+#line 1244 "util/configparser.y"
{
OUTYY(("P(server_log_tag_queryreply:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4053,11 +4099,11 @@ yyreduce:
else cfg_parser->cfg->log_tag_queryreply = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4057 "util/configparser.c"
+#line 4103 "util/configparser.c"
break;
- case 401: /* server_log_servfail: VAR_LOG_SERVFAIL STRING_ARG */
-#line 1247 "util/configparser.y"
+ case 407: /* server_log_servfail: VAR_LOG_SERVFAIL STRING_ARG */
+#line 1253 "util/configparser.y"
{
OUTYY(("P(server_log_servfail:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4065,11 +4111,11 @@ yyreduce:
else cfg_parser->cfg->log_servfail = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4069 "util/configparser.c"
+#line 4115 "util/configparser.c"
break;
- case 402: /* server_log_destaddr: VAR_LOG_DESTADDR STRING_ARG */
-#line 1256 "util/configparser.y"
+ case 408: /* server_log_destaddr: VAR_LOG_DESTADDR STRING_ARG */
+#line 1262 "util/configparser.y"
{
OUTYY(("P(server_log_destaddr:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4077,11 +4123,11 @@ yyreduce:
else cfg_parser->cfg->log_destaddr = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4081 "util/configparser.c"
+#line 4127 "util/configparser.c"
break;
- case 403: /* server_log_local_actions: VAR_LOG_LOCAL_ACTIONS STRING_ARG */
-#line 1265 "util/configparser.y"
+ case 409: /* server_log_local_actions: VAR_LOG_LOCAL_ACTIONS STRING_ARG */
+#line 1271 "util/configparser.y"
{
OUTYY(("P(server_log_local_actions:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4089,31 +4135,31 @@ yyreduce:
else cfg_parser->cfg->log_local_actions = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4093 "util/configparser.c"
+#line 4139 "util/configparser.c"
break;
- case 404: /* server_chroot: VAR_CHROOT STRING_ARG */
-#line 1274 "util/configparser.y"
+ case 410: /* server_chroot: VAR_CHROOT STRING_ARG */
+#line 1280 "util/configparser.y"
{
OUTYY(("P(server_chroot:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->chrootdir);
cfg_parser->cfg->chrootdir = (yyvsp[0].str);
}
-#line 4103 "util/configparser.c"
+#line 4149 "util/configparser.c"
break;
- case 405: /* server_username: VAR_USERNAME STRING_ARG */
-#line 1281 "util/configparser.y"
+ case 411: /* server_username: VAR_USERNAME STRING_ARG */
+#line 1287 "util/configparser.y"
{
OUTYY(("P(server_username:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->username);
cfg_parser->cfg->username = (yyvsp[0].str);
}
-#line 4113 "util/configparser.c"
+#line 4159 "util/configparser.c"
break;
- case 406: /* server_directory: VAR_DIRECTORY STRING_ARG */
-#line 1288 "util/configparser.y"
+ case 412: /* server_directory: VAR_DIRECTORY STRING_ARG */
+#line 1294 "util/configparser.y"
{
OUTYY(("P(server_directory:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->directory);
@@ -4138,105 +4184,105 @@ yyreduce:
}
}
}
-#line 4142 "util/configparser.c"
+#line 4188 "util/configparser.c"
break;
- case 407: /* server_logfile: VAR_LOGFILE STRING_ARG */
-#line 1314 "util/configparser.y"
+ case 413: /* server_logfile: VAR_LOGFILE STRING_ARG */
+#line 1320 "util/configparser.y"
{
OUTYY(("P(server_logfile:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->logfile);
cfg_parser->cfg->logfile = (yyvsp[0].str);
cfg_parser->cfg->use_syslog = 0;
}
-#line 4153 "util/configparser.c"
+#line 4199 "util/configparser.c"
break;
- case 408: /* server_pidfile: VAR_PIDFILE STRING_ARG */
-#line 1322 "util/configparser.y"
+ case 414: /* server_pidfile: VAR_PIDFILE STRING_ARG */
+#line 1328 "util/configparser.y"
{
OUTYY(("P(server_pidfile:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->pidfile);
cfg_parser->cfg->pidfile = (yyvsp[0].str);
}
-#line 4163 "util/configparser.c"
+#line 4209 "util/configparser.c"
break;
- case 409: /* server_root_hints: VAR_ROOT_HINTS STRING_ARG */
-#line 1329 "util/configparser.y"
+ case 415: /* server_root_hints: VAR_ROOT_HINTS STRING_ARG */
+#line 1335 "util/configparser.y"
{
OUTYY(("P(server_root_hints:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4173 "util/configparser.c"
+#line 4219 "util/configparser.c"
break;
- case 410: /* server_dlv_anchor_file: VAR_DLV_ANCHOR_FILE STRING_ARG */
-#line 1336 "util/configparser.y"
+ case 416: /* server_dlv_anchor_file: VAR_DLV_ANCHOR_FILE STRING_ARG */
+#line 1342 "util/configparser.y"
{
OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[0].str)));
log_warn("option dlv-anchor-file ignored: DLV is decommissioned");
free((yyvsp[0].str));
}
-#line 4183 "util/configparser.c"
+#line 4229 "util/configparser.c"
break;
- case 411: /* server_dlv_anchor: VAR_DLV_ANCHOR STRING_ARG */
-#line 1343 "util/configparser.y"
+ case 417: /* server_dlv_anchor: VAR_DLV_ANCHOR STRING_ARG */
+#line 1349 "util/configparser.y"
{
OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[0].str)));
log_warn("option dlv-anchor ignored: DLV is decommissioned");
free((yyvsp[0].str));
}
-#line 4193 "util/configparser.c"
+#line 4239 "util/configparser.c"
break;
- case 412: /* server_auto_trust_anchor_file: VAR_AUTO_TRUST_ANCHOR_FILE STRING_ARG */
-#line 1350 "util/configparser.y"
+ case 418: /* server_auto_trust_anchor_file: VAR_AUTO_TRUST_ANCHOR_FILE STRING_ARG */
+#line 1356 "util/configparser.y"
{
OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
auto_trust_anchor_file_list, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4204 "util/configparser.c"
+#line 4250 "util/configparser.c"
break;
- case 413: /* server_trust_anchor_file: VAR_TRUST_ANCHOR_FILE STRING_ARG */
-#line 1358 "util/configparser.y"
+ case 419: /* server_trust_anchor_file: VAR_TRUST_ANCHOR_FILE STRING_ARG */
+#line 1364 "util/configparser.y"
{
OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
trust_anchor_file_list, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4215 "util/configparser.c"
+#line 4261 "util/configparser.c"
break;
- case 414: /* server_trusted_keys_file: VAR_TRUSTED_KEYS_FILE STRING_ARG */
-#line 1366 "util/configparser.y"
+ case 420: /* server_trusted_keys_file: VAR_TRUSTED_KEYS_FILE STRING_ARG */
+#line 1372 "util/configparser.y"
{
OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
trusted_keys_file_list, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4226 "util/configparser.c"
+#line 4272 "util/configparser.c"
break;
- case 415: /* server_trust_anchor: VAR_TRUST_ANCHOR STRING_ARG */
-#line 1374 "util/configparser.y"
+ case 421: /* server_trust_anchor: VAR_TRUST_ANCHOR STRING_ARG */
+#line 1380 "util/configparser.y"
{
OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4236 "util/configparser.c"
+#line 4282 "util/configparser.c"
break;
- case 416: /* server_trust_anchor_signaling: VAR_TRUST_ANCHOR_SIGNALING STRING_ARG */
-#line 1381 "util/configparser.y"
+ case 422: /* server_trust_anchor_signaling: VAR_TRUST_ANCHOR_SIGNALING STRING_ARG */
+#line 1387 "util/configparser.y"
{
OUTYY(("P(server_trust_anchor_signaling:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4246,11 +4292,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4250 "util/configparser.c"
+#line 4296 "util/configparser.c"
break;
- case 417: /* server_root_key_sentinel: VAR_ROOT_KEY_SENTINEL STRING_ARG */
-#line 1392 "util/configparser.y"
+ case 423: /* server_root_key_sentinel: VAR_ROOT_KEY_SENTINEL STRING_ARG */
+#line 1398 "util/configparser.y"
{
OUTYY(("P(server_root_key_sentinel:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4260,21 +4306,21 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4264 "util/configparser.c"
+#line 4310 "util/configparser.c"
break;
- case 418: /* server_domain_insecure: VAR_DOMAIN_INSECURE STRING_ARG */
-#line 1403 "util/configparser.y"
+ case 424: /* server_domain_insecure: VAR_DOMAIN_INSECURE STRING_ARG */
+#line 1409 "util/configparser.y"
{
OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4274 "util/configparser.c"
+#line 4320 "util/configparser.c"
break;
- case 419: /* server_hide_identity: VAR_HIDE_IDENTITY STRING_ARG */
-#line 1410 "util/configparser.y"
+ case 425: /* server_hide_identity: VAR_HIDE_IDENTITY STRING_ARG */
+#line 1416 "util/configparser.y"
{
OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4282,11 +4328,11 @@ yyreduce:
else cfg_parser->cfg->hide_identity = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4286 "util/configparser.c"
+#line 4332 "util/configparser.c"
break;
- case 420: /* server_hide_version: VAR_HIDE_VERSION STRING_ARG */
-#line 1419 "util/configparser.y"
+ case 426: /* server_hide_version: VAR_HIDE_VERSION STRING_ARG */
+#line 1425 "util/configparser.y"
{
OUTYY(("P(server_hide_version:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4294,11 +4340,11 @@ yyreduce:
else cfg_parser->cfg->hide_version = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4298 "util/configparser.c"
+#line 4344 "util/configparser.c"
break;
- case 421: /* server_hide_trustanchor: VAR_HIDE_TRUSTANCHOR STRING_ARG */
-#line 1428 "util/configparser.y"
+ case 427: /* server_hide_trustanchor: VAR_HIDE_TRUSTANCHOR STRING_ARG */
+#line 1434 "util/configparser.y"
{
OUTYY(("P(server_hide_trustanchor:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4306,11 +4352,11 @@ yyreduce:
else cfg_parser->cfg->hide_trustanchor = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4310 "util/configparser.c"
+#line 4356 "util/configparser.c"
break;
- case 422: /* server_hide_http_user_agent: VAR_HIDE_HTTP_USER_AGENT STRING_ARG */
-#line 1437 "util/configparser.y"
+ case 428: /* server_hide_http_user_agent: VAR_HIDE_HTTP_USER_AGENT STRING_ARG */
+#line 1443 "util/configparser.y"
{
OUTYY(("P(server_hide_user_agent:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4318,41 +4364,41 @@ yyreduce:
else cfg_parser->cfg->hide_http_user_agent = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4322 "util/configparser.c"
+#line 4368 "util/configparser.c"
break;
- case 423: /* server_identity: VAR_IDENTITY STRING_ARG */
-#line 1446 "util/configparser.y"
+ case 429: /* server_identity: VAR_IDENTITY STRING_ARG */
+#line 1452 "util/configparser.y"
{
OUTYY(("P(server_identity:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->identity);
cfg_parser->cfg->identity = (yyvsp[0].str);
}
-#line 4332 "util/configparser.c"
+#line 4378 "util/configparser.c"
break;
- case 424: /* server_version: VAR_VERSION STRING_ARG */
-#line 1453 "util/configparser.y"
+ case 430: /* server_version: VAR_VERSION STRING_ARG */
+#line 1459 "util/configparser.y"
{
OUTYY(("P(server_version:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->version);
cfg_parser->cfg->version = (yyvsp[0].str);
}
-#line 4342 "util/configparser.c"
+#line 4388 "util/configparser.c"
break;
- case 425: /* server_http_user_agent: VAR_HTTP_USER_AGENT STRING_ARG */
-#line 1460 "util/configparser.y"
+ case 431: /* server_http_user_agent: VAR_HTTP_USER_AGENT STRING_ARG */
+#line 1466 "util/configparser.y"
{
OUTYY(("P(server_http_user_agent:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->http_user_agent);
cfg_parser->cfg->http_user_agent = (yyvsp[0].str);
}
-#line 4352 "util/configparser.c"
+#line 4398 "util/configparser.c"
break;
- case 426: /* server_nsid: VAR_NSID STRING_ARG */
-#line 1467 "util/configparser.y"
+ case 432: /* server_nsid: VAR_NSID STRING_ARG */
+#line 1473 "util/configparser.y"
{
OUTYY(("P(server_nsid:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->nsid_cfg_str);
@@ -4367,33 +4413,33 @@ yyreduce:
yyerror("the NSID must be either a hex string or an "
"ascii character string prepended with ascii_.");
}
-#line 4371 "util/configparser.c"
+#line 4417 "util/configparser.c"
break;
- case 427: /* server_so_rcvbuf: VAR_SO_RCVBUF STRING_ARG */
-#line 1483 "util/configparser.y"
+ case 433: /* server_so_rcvbuf: VAR_SO_RCVBUF STRING_ARG */
+#line 1489 "util/configparser.y"
{
OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_rcvbuf))
yyerror("buffer size expected");
free((yyvsp[0].str));
}
-#line 4382 "util/configparser.c"
+#line 4428 "util/configparser.c"
break;
- case 428: /* server_so_sndbuf: VAR_SO_SNDBUF STRING_ARG */
-#line 1491 "util/configparser.y"
+ case 434: /* server_so_sndbuf: VAR_SO_SNDBUF STRING_ARG */
+#line 1497 "util/configparser.y"
{
OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_sndbuf))
yyerror("buffer size expected");
free((yyvsp[0].str));
}
-#line 4393 "util/configparser.c"
+#line 4439 "util/configparser.c"
break;
- case 429: /* server_so_reuseport: VAR_SO_REUSEPORT STRING_ARG */
-#line 1499 "util/configparser.y"
+ case 435: /* server_so_reuseport: VAR_SO_REUSEPORT STRING_ARG */
+#line 1505 "util/configparser.y"
{
OUTYY(("P(server_so_reuseport:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4402,11 +4448,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4406 "util/configparser.c"
+#line 4452 "util/configparser.c"
break;
- case 430: /* server_ip_transparent: VAR_IP_TRANSPARENT STRING_ARG */
-#line 1509 "util/configparser.y"
+ case 436: /* server_ip_transparent: VAR_IP_TRANSPARENT STRING_ARG */
+#line 1515 "util/configparser.y"
{
OUTYY(("P(server_ip_transparent:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4415,11 +4461,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4419 "util/configparser.c"
+#line 4465 "util/configparser.c"
break;
- case 431: /* server_ip_freebind: VAR_IP_FREEBIND STRING_ARG */
-#line 1519 "util/configparser.y"
+ case 437: /* server_ip_freebind: VAR_IP_FREEBIND STRING_ARG */
+#line 1525 "util/configparser.y"
{
OUTYY(("P(server_ip_freebind:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4428,11 +4474,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4432 "util/configparser.c"
+#line 4478 "util/configparser.c"
break;
- case 432: /* server_ip_dscp: VAR_IP_DSCP STRING_ARG */
-#line 1529 "util/configparser.y"
+ case 438: /* server_ip_dscp: VAR_IP_DSCP STRING_ARG */
+#line 1535 "util/configparser.y"
{
OUTYY(("P(server_ip_dscp:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4445,22 +4491,22 @@ yyreduce:
cfg_parser->cfg->ip_dscp = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4449 "util/configparser.c"
+#line 4495 "util/configparser.c"
break;
- case 433: /* server_stream_wait_size: VAR_STREAM_WAIT_SIZE STRING_ARG */
-#line 1543 "util/configparser.y"
+ case 439: /* server_stream_wait_size: VAR_STREAM_WAIT_SIZE STRING_ARG */
+#line 1549 "util/configparser.y"
{
OUTYY(("P(server_stream_wait_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->stream_wait_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 4460 "util/configparser.c"
+#line 4506 "util/configparser.c"
break;
- case 434: /* server_edns_buffer_size: VAR_EDNS_BUFFER_SIZE STRING_ARG */
-#line 1551 "util/configparser.y"
+ case 440: /* server_edns_buffer_size: VAR_EDNS_BUFFER_SIZE STRING_ARG */
+#line 1557 "util/configparser.y"
{
OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -4472,11 +4518,11 @@ yyreduce:
else cfg_parser->cfg->edns_buffer_size = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4476 "util/configparser.c"
+#line 4522 "util/configparser.c"
break;
- case 435: /* server_msg_buffer_size: VAR_MSG_BUFFER_SIZE STRING_ARG */
-#line 1564 "util/configparser.y"
+ case 441: /* server_msg_buffer_size: VAR_MSG_BUFFER_SIZE STRING_ARG */
+#line 1570 "util/configparser.y"
{
OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -4486,22 +4532,22 @@ yyreduce:
else cfg_parser->cfg->msg_buffer_size = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4490 "util/configparser.c"
+#line 4536 "util/configparser.c"
break;
- case 436: /* server_msg_cache_size: VAR_MSG_CACHE_SIZE STRING_ARG */
-#line 1575 "util/configparser.y"
+ case 442: /* server_msg_cache_size: VAR_MSG_CACHE_SIZE STRING_ARG */
+#line 1581 "util/configparser.y"
{
OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->msg_cache_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 4501 "util/configparser.c"
+#line 4547 "util/configparser.c"
break;
- case 437: /* server_msg_cache_slabs: VAR_MSG_CACHE_SLABS STRING_ARG */
-#line 1583 "util/configparser.y"
+ case 443: /* server_msg_cache_slabs: VAR_MSG_CACHE_SLABS STRING_ARG */
+#line 1589 "util/configparser.y"
{
OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -4513,11 +4559,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 4517 "util/configparser.c"
+#line 4563 "util/configparser.c"
break;
- case 438: /* server_num_queries_per_thread: VAR_NUM_QUERIES_PER_THREAD STRING_ARG */
-#line 1596 "util/configparser.y"
+ case 444: /* server_num_queries_per_thread: VAR_NUM_QUERIES_PER_THREAD STRING_ARG */
+#line 1602 "util/configparser.y"
{
OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -4525,11 +4571,11 @@ yyreduce:
else cfg_parser->cfg->num_queries_per_thread = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4529 "util/configparser.c"
+#line 4575 "util/configparser.c"
break;
- case 439: /* server_jostle_timeout: VAR_JOSTLE_TIMEOUT STRING_ARG */
-#line 1605 "util/configparser.y"
+ case 445: /* server_jostle_timeout: VAR_JOSTLE_TIMEOUT STRING_ARG */
+#line 1611 "util/configparser.y"
{
OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4537,11 +4583,11 @@ yyreduce:
else cfg_parser->cfg->jostle_time = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4541 "util/configparser.c"
+#line 4587 "util/configparser.c"
break;
- case 440: /* server_delay_close: VAR_DELAY_CLOSE STRING_ARG */
-#line 1614 "util/configparser.y"
+ case 446: /* server_delay_close: VAR_DELAY_CLOSE STRING_ARG */
+#line 1620 "util/configparser.y"
{
OUTYY(("P(server_delay_close:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4549,11 +4595,11 @@ yyreduce:
else cfg_parser->cfg->delay_close = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4553 "util/configparser.c"
+#line 4599 "util/configparser.c"
break;
- case 441: /* server_udp_connect: VAR_UDP_CONNECT STRING_ARG */
-#line 1623 "util/configparser.y"
+ case 447: /* server_udp_connect: VAR_UDP_CONNECT STRING_ARG */
+#line 1629 "util/configparser.y"
{
OUTYY(("P(server_udp_connect:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4561,11 +4607,11 @@ yyreduce:
else cfg_parser->cfg->udp_connect = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4565 "util/configparser.c"
+#line 4611 "util/configparser.c"
break;
- case 442: /* server_unblock_lan_zones: VAR_UNBLOCK_LAN_ZONES STRING_ARG */
-#line 1632 "util/configparser.y"
+ case 448: /* server_unblock_lan_zones: VAR_UNBLOCK_LAN_ZONES STRING_ARG */
+#line 1638 "util/configparser.y"
{
OUTYY(("P(server_unblock_lan_zones:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4574,11 +4620,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4578 "util/configparser.c"
+#line 4624 "util/configparser.c"
break;
- case 443: /* server_insecure_lan_zones: VAR_INSECURE_LAN_ZONES STRING_ARG */
-#line 1642 "util/configparser.y"
+ case 449: /* server_insecure_lan_zones: VAR_INSECURE_LAN_ZONES STRING_ARG */
+#line 1648 "util/configparser.y"
{
OUTYY(("P(server_insecure_lan_zones:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4587,22 +4633,22 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4591 "util/configparser.c"
+#line 4637 "util/configparser.c"
break;
- case 444: /* server_rrset_cache_size: VAR_RRSET_CACHE_SIZE STRING_ARG */
-#line 1652 "util/configparser.y"
+ case 450: /* server_rrset_cache_size: VAR_RRSET_CACHE_SIZE STRING_ARG */
+#line 1658 "util/configparser.y"
{
OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->rrset_cache_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 4602 "util/configparser.c"
+#line 4648 "util/configparser.c"
break;
- case 445: /* server_rrset_cache_slabs: VAR_RRSET_CACHE_SLABS STRING_ARG */
-#line 1660 "util/configparser.y"
+ case 451: /* server_rrset_cache_slabs: VAR_RRSET_CACHE_SLABS STRING_ARG */
+#line 1666 "util/configparser.y"
{
OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -4614,11 +4660,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 4618 "util/configparser.c"
+#line 4664 "util/configparser.c"
break;
- case 446: /* server_infra_host_ttl: VAR_INFRA_HOST_TTL STRING_ARG */
-#line 1673 "util/configparser.y"
+ case 452: /* server_infra_host_ttl: VAR_INFRA_HOST_TTL STRING_ARG */
+#line 1679 "util/configparser.y"
{
OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4626,22 +4672,22 @@ yyreduce:
else cfg_parser->cfg->host_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4630 "util/configparser.c"
+#line 4676 "util/configparser.c"
break;
- case 447: /* server_infra_lame_ttl: VAR_INFRA_LAME_TTL STRING_ARG */
-#line 1682 "util/configparser.y"
+ case 453: /* server_infra_lame_ttl: VAR_INFRA_LAME_TTL STRING_ARG */
+#line 1688 "util/configparser.y"
{
OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[0].str)));
verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
"removed, use infra-host-ttl)", (yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4641 "util/configparser.c"
+#line 4687 "util/configparser.c"
break;
- case 448: /* server_infra_cache_numhosts: VAR_INFRA_CACHE_NUMHOSTS STRING_ARG */
-#line 1690 "util/configparser.y"
+ case 454: /* server_infra_cache_numhosts: VAR_INFRA_CACHE_NUMHOSTS STRING_ARG */
+#line 1696 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -4649,22 +4695,22 @@ yyreduce:
else cfg_parser->cfg->infra_cache_numhosts = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4653 "util/configparser.c"
+#line 4699 "util/configparser.c"
break;
- case 449: /* server_infra_cache_lame_size: VAR_INFRA_CACHE_LAME_SIZE STRING_ARG */
-#line 1699 "util/configparser.y"
+ case 455: /* server_infra_cache_lame_size: VAR_INFRA_CACHE_LAME_SIZE STRING_ARG */
+#line 1705 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[0].str)));
verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
"(option removed, use infra-cache-numhosts)", (yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4664 "util/configparser.c"
+#line 4710 "util/configparser.c"
break;
- case 450: /* server_infra_cache_slabs: VAR_INFRA_CACHE_SLABS STRING_ARG */
-#line 1707 "util/configparser.y"
+ case 456: /* server_infra_cache_slabs: VAR_INFRA_CACHE_SLABS STRING_ARG */
+#line 1713 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -4676,11 +4722,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 4680 "util/configparser.c"
+#line 4726 "util/configparser.c"
break;
- case 451: /* server_infra_cache_min_rtt: VAR_INFRA_CACHE_MIN_RTT STRING_ARG */
-#line 1720 "util/configparser.y"
+ case 457: /* server_infra_cache_min_rtt: VAR_INFRA_CACHE_MIN_RTT STRING_ARG */
+#line 1726 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_min_rtt:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4688,11 +4734,11 @@ yyreduce:
else cfg_parser->cfg->infra_cache_min_rtt = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4692 "util/configparser.c"
+#line 4738 "util/configparser.c"
break;
- case 452: /* server_infra_cache_max_rtt: VAR_INFRA_CACHE_MAX_RTT STRING_ARG */
-#line 1729 "util/configparser.y"
+ case 458: /* server_infra_cache_max_rtt: VAR_INFRA_CACHE_MAX_RTT STRING_ARG */
+#line 1735 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_max_rtt:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4700,11 +4746,11 @@ yyreduce:
else cfg_parser->cfg->infra_cache_max_rtt = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4704 "util/configparser.c"
+#line 4750 "util/configparser.c"
break;
- case 453: /* server_infra_keep_probing: VAR_INFRA_KEEP_PROBING STRING_ARG */
-#line 1738 "util/configparser.y"
+ case 459: /* server_infra_keep_probing: VAR_INFRA_KEEP_PROBING STRING_ARG */
+#line 1744 "util/configparser.y"
{
OUTYY(("P(server_infra_keep_probing:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4713,21 +4759,21 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4717 "util/configparser.c"
+#line 4763 "util/configparser.c"
break;
- case 454: /* server_target_fetch_policy: VAR_TARGET_FETCH_POLICY STRING_ARG */
-#line 1748 "util/configparser.y"
+ case 460: /* server_target_fetch_policy: VAR_TARGET_FETCH_POLICY STRING_ARG */
+#line 1754 "util/configparser.y"
{
OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->target_fetch_policy);
cfg_parser->cfg->target_fetch_policy = (yyvsp[0].str);
}
-#line 4727 "util/configparser.c"
+#line 4773 "util/configparser.c"
break;
- case 455: /* server_harden_short_bufsize: VAR_HARDEN_SHORT_BUFSIZE STRING_ARG */
-#line 1755 "util/configparser.y"
+ case 461: /* server_harden_short_bufsize: VAR_HARDEN_SHORT_BUFSIZE STRING_ARG */
+#line 1761 "util/configparser.y"
{
OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4736,11 +4782,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4740 "util/configparser.c"
+#line 4786 "util/configparser.c"
break;
- case 456: /* server_harden_large_queries: VAR_HARDEN_LARGE_QUERIES STRING_ARG */
-#line 1765 "util/configparser.y"
+ case 462: /* server_harden_large_queries: VAR_HARDEN_LARGE_QUERIES STRING_ARG */
+#line 1771 "util/configparser.y"
{
OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4749,11 +4795,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4753 "util/configparser.c"
+#line 4799 "util/configparser.c"
break;
- case 457: /* server_harden_glue: VAR_HARDEN_GLUE STRING_ARG */
-#line 1775 "util/configparser.y"
+ case 463: /* server_harden_glue: VAR_HARDEN_GLUE STRING_ARG */
+#line 1781 "util/configparser.y"
{
OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4762,11 +4808,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4766 "util/configparser.c"
+#line 4812 "util/configparser.c"
break;
- case 458: /* server_harden_dnssec_stripped: VAR_HARDEN_DNSSEC_STRIPPED STRING_ARG */
-#line 1785 "util/configparser.y"
+ case 464: /* server_harden_dnssec_stripped: VAR_HARDEN_DNSSEC_STRIPPED STRING_ARG */
+#line 1791 "util/configparser.y"
{
OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4775,11 +4821,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4779 "util/configparser.c"
+#line 4825 "util/configparser.c"
break;
- case 459: /* server_harden_below_nxdomain: VAR_HARDEN_BELOW_NXDOMAIN STRING_ARG */
-#line 1795 "util/configparser.y"
+ case 465: /* server_harden_below_nxdomain: VAR_HARDEN_BELOW_NXDOMAIN STRING_ARG */
+#line 1801 "util/configparser.y"
{
OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4788,11 +4834,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4792 "util/configparser.c"
+#line 4838 "util/configparser.c"
break;
- case 460: /* server_harden_referral_path: VAR_HARDEN_REFERRAL_PATH STRING_ARG */
-#line 1805 "util/configparser.y"
+ case 466: /* server_harden_referral_path: VAR_HARDEN_REFERRAL_PATH STRING_ARG */
+#line 1811 "util/configparser.y"
{
OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4801,11 +4847,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4805 "util/configparser.c"
+#line 4851 "util/configparser.c"
break;
- case 461: /* server_harden_algo_downgrade: VAR_HARDEN_ALGO_DOWNGRADE STRING_ARG */
-#line 1815 "util/configparser.y"
+ case 467: /* server_harden_algo_downgrade: VAR_HARDEN_ALGO_DOWNGRADE STRING_ARG */
+#line 1821 "util/configparser.y"
{
OUTYY(("P(server_harden_algo_downgrade:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4814,11 +4860,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4818 "util/configparser.c"
+#line 4864 "util/configparser.c"
break;
- case 462: /* server_harden_unknown_additional: VAR_HARDEN_UNKNOWN_ADDITIONAL STRING_ARG */
-#line 1825 "util/configparser.y"
+ case 468: /* server_harden_unknown_additional: VAR_HARDEN_UNKNOWN_ADDITIONAL STRING_ARG */
+#line 1831 "util/configparser.y"
{
OUTYY(("P(server_harden_unknown_additional:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4827,11 +4873,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4831 "util/configparser.c"
+#line 4877 "util/configparser.c"
break;
- case 463: /* server_use_caps_for_id: VAR_USE_CAPS_FOR_ID STRING_ARG */
-#line 1835 "util/configparser.y"
+ case 469: /* server_use_caps_for_id: VAR_USE_CAPS_FOR_ID STRING_ARG */
+#line 1841 "util/configparser.y"
{
OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4840,41 +4886,41 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4844 "util/configparser.c"
+#line 4890 "util/configparser.c"
break;
- case 464: /* server_caps_whitelist: VAR_CAPS_WHITELIST STRING_ARG */
-#line 1845 "util/configparser.y"
+ case 470: /* server_caps_whitelist: VAR_CAPS_WHITELIST STRING_ARG */
+#line 1851 "util/configparser.y"
{
OUTYY(("P(server_caps_whitelist:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->caps_whitelist, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4854 "util/configparser.c"
+#line 4900 "util/configparser.c"
break;
- case 465: /* server_private_address: VAR_PRIVATE_ADDRESS STRING_ARG */
-#line 1852 "util/configparser.y"
+ case 471: /* server_private_address: VAR_PRIVATE_ADDRESS STRING_ARG */
+#line 1858 "util/configparser.y"
{
OUTYY(("P(server_private_address:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4864 "util/configparser.c"
+#line 4910 "util/configparser.c"
break;
- case 466: /* server_private_domain: VAR_PRIVATE_DOMAIN STRING_ARG */
-#line 1859 "util/configparser.y"
+ case 472: /* server_private_domain: VAR_PRIVATE_DOMAIN STRING_ARG */
+#line 1865 "util/configparser.y"
{
OUTYY(("P(server_private_domain:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4874 "util/configparser.c"
+#line 4920 "util/configparser.c"
break;
- case 467: /* server_prefetch: VAR_PREFETCH STRING_ARG */
-#line 1866 "util/configparser.y"
+ case 473: /* server_prefetch: VAR_PREFETCH STRING_ARG */
+#line 1872 "util/configparser.y"
{
OUTYY(("P(server_prefetch:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4882,11 +4928,11 @@ yyreduce:
else cfg_parser->cfg->prefetch = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4886 "util/configparser.c"
+#line 4932 "util/configparser.c"
break;
- case 468: /* server_prefetch_key: VAR_PREFETCH_KEY STRING_ARG */
-#line 1875 "util/configparser.y"
+ case 474: /* server_prefetch_key: VAR_PREFETCH_KEY STRING_ARG */
+#line 1881 "util/configparser.y"
{
OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4894,11 +4940,11 @@ yyreduce:
else cfg_parser->cfg->prefetch_key = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4898 "util/configparser.c"
+#line 4944 "util/configparser.c"
break;
- case 469: /* server_deny_any: VAR_DENY_ANY STRING_ARG */
-#line 1884 "util/configparser.y"
+ case 475: /* server_deny_any: VAR_DENY_ANY STRING_ARG */
+#line 1890 "util/configparser.y"
{
OUTYY(("P(server_deny_any:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4906,11 +4952,11 @@ yyreduce:
else cfg_parser->cfg->deny_any = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4910 "util/configparser.c"
+#line 4956 "util/configparser.c"
break;
- case 470: /* server_unwanted_reply_threshold: VAR_UNWANTED_REPLY_THRESHOLD STRING_ARG */
-#line 1893 "util/configparser.y"
+ case 476: /* server_unwanted_reply_threshold: VAR_UNWANTED_REPLY_THRESHOLD STRING_ARG */
+#line 1899 "util/configparser.y"
{
OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -4918,21 +4964,21 @@ yyreduce:
else cfg_parser->cfg->unwanted_threshold = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 4922 "util/configparser.c"
+#line 4968 "util/configparser.c"
break;
- case 471: /* server_do_not_query_address: VAR_DO_NOT_QUERY_ADDRESS STRING_ARG */
-#line 1902 "util/configparser.y"
+ case 477: /* server_do_not_query_address: VAR_DO_NOT_QUERY_ADDRESS STRING_ARG */
+#line 1908 "util/configparser.y"
{
OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 4932 "util/configparser.c"
+#line 4978 "util/configparser.c"
break;
- case 472: /* server_do_not_query_localhost: VAR_DO_NOT_QUERY_LOCALHOST STRING_ARG */
-#line 1909 "util/configparser.y"
+ case 478: /* server_do_not_query_localhost: VAR_DO_NOT_QUERY_LOCALHOST STRING_ARG */
+#line 1915 "util/configparser.y"
{
OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -4941,22 +4987,22 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 4945 "util/configparser.c"
+#line 4991 "util/configparser.c"
break;
- case 473: /* server_access_control: VAR_ACCESS_CONTROL STRING_ARG STRING_ARG */
-#line 1919 "util/configparser.y"
+ case 479: /* server_access_control: VAR_ACCESS_CONTROL STRING_ARG STRING_ARG */
+#line 1925 "util/configparser.y"
{
OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
validate_acl_action((yyvsp[0].str));
if(!cfg_str2list_insert(&cfg_parser->cfg->acls, (yyvsp[-1].str), (yyvsp[0].str)))
fatal_exit("out of memory adding acl");
}
-#line 4956 "util/configparser.c"
+#line 5002 "util/configparser.c"
break;
- case 474: /* server_interface_action: VAR_INTERFACE_ACTION STRING_ARG STRING_ARG */
-#line 1927 "util/configparser.y"
+ case 480: /* server_interface_action: VAR_INTERFACE_ACTION STRING_ARG STRING_ARG */
+#line 1933 "util/configparser.y"
{
OUTYY(("P(server_interface_action:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
validate_acl_action((yyvsp[0].str));
@@ -4964,21 +5010,21 @@ yyreduce:
&cfg_parser->cfg->interface_actions, (yyvsp[-1].str), (yyvsp[0].str)))
fatal_exit("out of memory adding acl");
}
-#line 4968 "util/configparser.c"
+#line 5014 "util/configparser.c"
break;
- case 475: /* server_module_conf: VAR_MODULE_CONF STRING_ARG */
-#line 1936 "util/configparser.y"
+ case 481: /* server_module_conf: VAR_MODULE_CONF STRING_ARG */
+#line 1942 "util/configparser.y"
{
OUTYY(("P(server_module_conf:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->module_conf);
cfg_parser->cfg->module_conf = (yyvsp[0].str);
}
-#line 4978 "util/configparser.c"
+#line 5024 "util/configparser.c"
break;
- case 476: /* server_val_override_date: VAR_VAL_OVERRIDE_DATE STRING_ARG */
-#line 1943 "util/configparser.y"
+ case 482: /* server_val_override_date: VAR_VAL_OVERRIDE_DATE STRING_ARG */
+#line 1949 "util/configparser.y"
{
OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[0].str)));
if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
@@ -4995,11 +5041,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 4999 "util/configparser.c"
+#line 5045 "util/configparser.c"
break;
- case 477: /* server_val_sig_skew_min: VAR_VAL_SIG_SKEW_MIN STRING_ARG */
-#line 1961 "util/configparser.y"
+ case 483: /* server_val_sig_skew_min: VAR_VAL_SIG_SKEW_MIN STRING_ARG */
+#line 1967 "util/configparser.y"
{
OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[0].str)));
if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
@@ -5011,11 +5057,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5015 "util/configparser.c"
+#line 5061 "util/configparser.c"
break;
- case 478: /* server_val_sig_skew_max: VAR_VAL_SIG_SKEW_MAX STRING_ARG */
-#line 1974 "util/configparser.y"
+ case 484: /* server_val_sig_skew_max: VAR_VAL_SIG_SKEW_MAX STRING_ARG */
+#line 1980 "util/configparser.y"
{
OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[0].str)));
if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
@@ -5027,11 +5073,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5031 "util/configparser.c"
+#line 5077 "util/configparser.c"
break;
- case 479: /* server_val_max_restart: VAR_VAL_MAX_RESTART STRING_ARG */
-#line 1987 "util/configparser.y"
+ case 485: /* server_val_max_restart: VAR_VAL_MAX_RESTART STRING_ARG */
+#line 1993 "util/configparser.y"
{
OUTYY(("P(server_val_max_restart:%s)\n", (yyvsp[0].str)));
if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
@@ -5043,11 +5089,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5047 "util/configparser.c"
+#line 5093 "util/configparser.c"
break;
- case 480: /* server_cache_max_ttl: VAR_CACHE_MAX_TTL STRING_ARG */
-#line 2000 "util/configparser.y"
+ case 486: /* server_cache_max_ttl: VAR_CACHE_MAX_TTL STRING_ARG */
+#line 2006 "util/configparser.y"
{
OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5055,11 +5101,11 @@ yyreduce:
else cfg_parser->cfg->max_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5059 "util/configparser.c"
+#line 5105 "util/configparser.c"
break;
- case 481: /* server_cache_max_negative_ttl: VAR_CACHE_MAX_NEGATIVE_TTL STRING_ARG */
-#line 2009 "util/configparser.y"
+ case 487: /* server_cache_max_negative_ttl: VAR_CACHE_MAX_NEGATIVE_TTL STRING_ARG */
+#line 2015 "util/configparser.y"
{
OUTYY(("P(server_cache_max_negative_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5067,11 +5113,23 @@ yyreduce:
else cfg_parser->cfg->max_negative_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5071 "util/configparser.c"
+#line 5117 "util/configparser.c"
break;
- case 482: /* server_cache_min_ttl: VAR_CACHE_MIN_TTL STRING_ARG */
-#line 2018 "util/configparser.y"
+ case 488: /* server_cache_min_negative_ttl: VAR_CACHE_MIN_NEGATIVE_TTL STRING_ARG */
+#line 2024 "util/configparser.y"
+ {
+ OUTYY(("P(server_cache_min_negative_ttl:%s)\n", (yyvsp[0].str)));
+ if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
+ yyerror("number expected");
+ else cfg_parser->cfg->min_negative_ttl = atoi((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 5129 "util/configparser.c"
+ break;
+
+ case 489: /* server_cache_min_ttl: VAR_CACHE_MIN_TTL STRING_ARG */
+#line 2033 "util/configparser.y"
{
OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5079,11 +5137,11 @@ yyreduce:
else cfg_parser->cfg->min_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5083 "util/configparser.c"
+#line 5141 "util/configparser.c"
break;
- case 483: /* server_bogus_ttl: VAR_BOGUS_TTL STRING_ARG */
-#line 2027 "util/configparser.y"
+ case 490: /* server_bogus_ttl: VAR_BOGUS_TTL STRING_ARG */
+#line 2042 "util/configparser.y"
{
OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5091,11 +5149,11 @@ yyreduce:
else cfg_parser->cfg->bogus_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5095 "util/configparser.c"
+#line 5153 "util/configparser.c"
break;
- case 484: /* server_val_clean_additional: VAR_VAL_CLEAN_ADDITIONAL STRING_ARG */
-#line 2036 "util/configparser.y"
+ case 491: /* server_val_clean_additional: VAR_VAL_CLEAN_ADDITIONAL STRING_ARG */
+#line 2051 "util/configparser.y"
{
OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5104,11 +5162,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5108 "util/configparser.c"
+#line 5166 "util/configparser.c"
break;
- case 485: /* server_val_permissive_mode: VAR_VAL_PERMISSIVE_MODE STRING_ARG */
-#line 2046 "util/configparser.y"
+ case 492: /* server_val_permissive_mode: VAR_VAL_PERMISSIVE_MODE STRING_ARG */
+#line 2061 "util/configparser.y"
{
OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5117,11 +5175,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5121 "util/configparser.c"
+#line 5179 "util/configparser.c"
break;
- case 486: /* server_aggressive_nsec: VAR_AGGRESSIVE_NSEC STRING_ARG */
-#line 2056 "util/configparser.y"
+ case 493: /* server_aggressive_nsec: VAR_AGGRESSIVE_NSEC STRING_ARG */
+#line 2071 "util/configparser.y"
{
OUTYY(("P(server_aggressive_nsec:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5131,11 +5189,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5135 "util/configparser.c"
+#line 5193 "util/configparser.c"
break;
- case 487: /* server_ignore_cd_flag: VAR_IGNORE_CD_FLAG STRING_ARG */
-#line 2067 "util/configparser.y"
+ case 494: /* server_ignore_cd_flag: VAR_IGNORE_CD_FLAG STRING_ARG */
+#line 2082 "util/configparser.y"
{
OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5143,11 +5201,11 @@ yyreduce:
else cfg_parser->cfg->ignore_cd = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5147 "util/configparser.c"
+#line 5205 "util/configparser.c"
break;
- case 488: /* server_disable_edns_do: VAR_DISABLE_EDNS_DO STRING_ARG */
-#line 2076 "util/configparser.y"
+ case 495: /* server_disable_edns_do: VAR_DISABLE_EDNS_DO STRING_ARG */
+#line 2091 "util/configparser.y"
{
OUTYY(("P(server_disable_edns_do:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5155,11 +5213,11 @@ yyreduce:
else cfg_parser->cfg->disable_edns_do = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5159 "util/configparser.c"
+#line 5217 "util/configparser.c"
break;
- case 489: /* server_serve_expired: VAR_SERVE_EXPIRED STRING_ARG */
-#line 2085 "util/configparser.y"
+ case 496: /* server_serve_expired: VAR_SERVE_EXPIRED STRING_ARG */
+#line 2100 "util/configparser.y"
{
OUTYY(("P(server_serve_expired:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5167,11 +5225,11 @@ yyreduce:
else cfg_parser->cfg->serve_expired = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5171 "util/configparser.c"
+#line 5229 "util/configparser.c"
break;
- case 490: /* server_serve_expired_ttl: VAR_SERVE_EXPIRED_TTL STRING_ARG */
-#line 2094 "util/configparser.y"
+ case 497: /* server_serve_expired_ttl: VAR_SERVE_EXPIRED_TTL STRING_ARG */
+#line 2109 "util/configparser.y"
{
OUTYY(("P(server_serve_expired_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5179,11 +5237,11 @@ yyreduce:
else cfg_parser->cfg->serve_expired_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5183 "util/configparser.c"
+#line 5241 "util/configparser.c"
break;
- case 491: /* server_serve_expired_ttl_reset: VAR_SERVE_EXPIRED_TTL_RESET STRING_ARG */
-#line 2103 "util/configparser.y"
+ case 498: /* server_serve_expired_ttl_reset: VAR_SERVE_EXPIRED_TTL_RESET STRING_ARG */
+#line 2118 "util/configparser.y"
{
OUTYY(("P(server_serve_expired_ttl_reset:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5191,11 +5249,11 @@ yyreduce:
else cfg_parser->cfg->serve_expired_ttl_reset = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5195 "util/configparser.c"
+#line 5253 "util/configparser.c"
break;
- case 492: /* server_serve_expired_reply_ttl: VAR_SERVE_EXPIRED_REPLY_TTL STRING_ARG */
-#line 2112 "util/configparser.y"
+ case 499: /* server_serve_expired_reply_ttl: VAR_SERVE_EXPIRED_REPLY_TTL STRING_ARG */
+#line 2127 "util/configparser.y"
{
OUTYY(("P(server_serve_expired_reply_ttl:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5203,11 +5261,11 @@ yyreduce:
else cfg_parser->cfg->serve_expired_reply_ttl = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5207 "util/configparser.c"
+#line 5265 "util/configparser.c"
break;
- case 493: /* server_serve_expired_client_timeout: VAR_SERVE_EXPIRED_CLIENT_TIMEOUT STRING_ARG */
-#line 2121 "util/configparser.y"
+ case 500: /* server_serve_expired_client_timeout: VAR_SERVE_EXPIRED_CLIENT_TIMEOUT STRING_ARG */
+#line 2136 "util/configparser.y"
{
OUTYY(("P(server_serve_expired_client_timeout:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5215,11 +5273,11 @@ yyreduce:
else cfg_parser->cfg->serve_expired_client_timeout = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5219 "util/configparser.c"
+#line 5277 "util/configparser.c"
break;
- case 494: /* server_ede_serve_expired: VAR_EDE_SERVE_EXPIRED STRING_ARG */
-#line 2130 "util/configparser.y"
+ case 501: /* server_ede_serve_expired: VAR_EDE_SERVE_EXPIRED STRING_ARG */
+#line 2145 "util/configparser.y"
{
OUTYY(("P(server_ede_serve_expired:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5227,11 +5285,11 @@ yyreduce:
else cfg_parser->cfg->ede_serve_expired = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5231 "util/configparser.c"
+#line 5289 "util/configparser.c"
break;
- case 495: /* server_serve_original_ttl: VAR_SERVE_ORIGINAL_TTL STRING_ARG */
-#line 2139 "util/configparser.y"
+ case 502: /* server_serve_original_ttl: VAR_SERVE_ORIGINAL_TTL STRING_ARG */
+#line 2154 "util/configparser.y"
{
OUTYY(("P(server_serve_original_ttl:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5239,11 +5297,11 @@ yyreduce:
else cfg_parser->cfg->serve_original_ttl = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5243 "util/configparser.c"
+#line 5301 "util/configparser.c"
break;
- case 496: /* server_fake_dsa: VAR_FAKE_DSA STRING_ARG */
-#line 2148 "util/configparser.y"
+ case 503: /* server_fake_dsa: VAR_FAKE_DSA STRING_ARG */
+#line 2163 "util/configparser.y"
{
OUTYY(("P(server_fake_dsa:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5255,11 +5313,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 5259 "util/configparser.c"
+#line 5317 "util/configparser.c"
break;
- case 497: /* server_fake_sha1: VAR_FAKE_SHA1 STRING_ARG */
-#line 2161 "util/configparser.y"
+ case 504: /* server_fake_sha1: VAR_FAKE_SHA1 STRING_ARG */
+#line 2176 "util/configparser.y"
{
OUTYY(("P(server_fake_sha1:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5271,11 +5329,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 5275 "util/configparser.c"
+#line 5333 "util/configparser.c"
break;
- case 498: /* server_val_log_level: VAR_VAL_LOG_LEVEL STRING_ARG */
-#line 2174 "util/configparser.y"
+ case 505: /* server_val_log_level: VAR_VAL_LOG_LEVEL STRING_ARG */
+#line 2189 "util/configparser.y"
{
OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5283,21 +5341,21 @@ yyreduce:
else cfg_parser->cfg->val_log_level = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5287 "util/configparser.c"
+#line 5345 "util/configparser.c"
break;
- case 499: /* server_val_nsec3_keysize_iterations: VAR_VAL_NSEC3_KEYSIZE_ITERATIONS STRING_ARG */
-#line 2183 "util/configparser.y"
+ case 506: /* server_val_nsec3_keysize_iterations: VAR_VAL_NSEC3_KEYSIZE_ITERATIONS STRING_ARG */
+#line 2198 "util/configparser.y"
{
OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->val_nsec3_key_iterations);
cfg_parser->cfg->val_nsec3_key_iterations = (yyvsp[0].str);
}
-#line 5297 "util/configparser.c"
+#line 5355 "util/configparser.c"
break;
- case 500: /* server_zonemd_permissive_mode: VAR_ZONEMD_PERMISSIVE_MODE STRING_ARG */
-#line 2190 "util/configparser.y"
+ case 507: /* server_zonemd_permissive_mode: VAR_ZONEMD_PERMISSIVE_MODE STRING_ARG */
+#line 2205 "util/configparser.y"
{
OUTYY(("P(server_zonemd_permissive_mode:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5305,11 +5363,11 @@ yyreduce:
else cfg_parser->cfg->zonemd_permissive_mode = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5309 "util/configparser.c"
+#line 5367 "util/configparser.c"
break;
- case 501: /* server_add_holddown: VAR_ADD_HOLDDOWN STRING_ARG */
-#line 2199 "util/configparser.y"
+ case 508: /* server_add_holddown: VAR_ADD_HOLDDOWN STRING_ARG */
+#line 2214 "util/configparser.y"
{
OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5317,11 +5375,11 @@ yyreduce:
else cfg_parser->cfg->add_holddown = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5321 "util/configparser.c"
+#line 5379 "util/configparser.c"
break;
- case 502: /* server_del_holddown: VAR_DEL_HOLDDOWN STRING_ARG */
-#line 2208 "util/configparser.y"
+ case 509: /* server_del_holddown: VAR_DEL_HOLDDOWN STRING_ARG */
+#line 2223 "util/configparser.y"
{
OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5329,11 +5387,11 @@ yyreduce:
else cfg_parser->cfg->del_holddown = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5333 "util/configparser.c"
+#line 5391 "util/configparser.c"
break;
- case 503: /* server_keep_missing: VAR_KEEP_MISSING STRING_ARG */
-#line 2217 "util/configparser.y"
+ case 510: /* server_keep_missing: VAR_KEEP_MISSING STRING_ARG */
+#line 2232 "util/configparser.y"
{
OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5341,11 +5399,11 @@ yyreduce:
else cfg_parser->cfg->keep_missing = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5345 "util/configparser.c"
+#line 5403 "util/configparser.c"
break;
- case 504: /* server_permit_small_holddown: VAR_PERMIT_SMALL_HOLDDOWN STRING_ARG */
-#line 2226 "util/configparser.y"
+ case 511: /* server_permit_small_holddown: VAR_PERMIT_SMALL_HOLDDOWN STRING_ARG */
+#line 2241 "util/configparser.y"
{
OUTYY(("P(server_permit_small_holddown:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5354,22 +5412,22 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5358 "util/configparser.c"
+#line 5416 "util/configparser.c"
break;
- case 505: /* server_key_cache_size: VAR_KEY_CACHE_SIZE STRING_ARG */
-#line 2236 "util/configparser.y"
+ case 512: /* server_key_cache_size: VAR_KEY_CACHE_SIZE STRING_ARG */
+#line 2251 "util/configparser.y"
{
OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->key_cache_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 5369 "util/configparser.c"
+#line 5427 "util/configparser.c"
break;
- case 506: /* server_key_cache_slabs: VAR_KEY_CACHE_SLABS STRING_ARG */
-#line 2244 "util/configparser.y"
+ case 513: /* server_key_cache_slabs: VAR_KEY_CACHE_SLABS STRING_ARG */
+#line 2259 "util/configparser.y"
{
OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -5381,22 +5439,22 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5385 "util/configparser.c"
+#line 5443 "util/configparser.c"
break;
- case 507: /* server_neg_cache_size: VAR_NEG_CACHE_SIZE STRING_ARG */
-#line 2257 "util/configparser.y"
+ case 514: /* server_neg_cache_size: VAR_NEG_CACHE_SIZE STRING_ARG */
+#line 2272 "util/configparser.y"
{
OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->neg_cache_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 5396 "util/configparser.c"
+#line 5454 "util/configparser.c"
break;
- case 508: /* server_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG */
-#line 2265 "util/configparser.y"
+ case 515: /* server_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG */
+#line 2280 "util/configparser.y"
{
OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 &&
@@ -5451,21 +5509,21 @@ yyreduce:
fatal_exit("out of memory adding local-zone");
}
}
-#line 5455 "util/configparser.c"
+#line 5513 "util/configparser.c"
break;
- case 509: /* server_local_data: VAR_LOCAL_DATA STRING_ARG */
-#line 2321 "util/configparser.y"
+ case 516: /* server_local_data: VAR_LOCAL_DATA STRING_ARG */
+#line 2336 "util/configparser.y"
{
OUTYY(("P(server_local_data:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[0].str)))
fatal_exit("out of memory adding local-data");
}
-#line 5465 "util/configparser.c"
+#line 5523 "util/configparser.c"
break;
- case 510: /* server_local_data_ptr: VAR_LOCAL_DATA_PTR STRING_ARG */
-#line 2328 "util/configparser.y"
+ case 517: /* server_local_data_ptr: VAR_LOCAL_DATA_PTR STRING_ARG */
+#line 2343 "util/configparser.y"
{
char* ptr;
OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[0].str)));
@@ -5479,11 +5537,11 @@ yyreduce:
yyerror("local-data-ptr could not be reversed");
}
}
-#line 5483 "util/configparser.c"
+#line 5541 "util/configparser.c"
break;
- case 511: /* server_minimal_responses: VAR_MINIMAL_RESPONSES STRING_ARG */
-#line 2343 "util/configparser.y"
+ case 518: /* server_minimal_responses: VAR_MINIMAL_RESPONSES STRING_ARG */
+#line 2358 "util/configparser.y"
{
OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5492,11 +5550,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5496 "util/configparser.c"
+#line 5554 "util/configparser.c"
break;
- case 512: /* server_rrset_roundrobin: VAR_RRSET_ROUNDROBIN STRING_ARG */
-#line 2353 "util/configparser.y"
+ case 519: /* server_rrset_roundrobin: VAR_RRSET_ROUNDROBIN STRING_ARG */
+#line 2368 "util/configparser.y"
{
OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5505,41 +5563,107 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5509 "util/configparser.c"
+#line 5567 "util/configparser.c"
break;
- case 513: /* server_unknown_server_time_limit: VAR_UNKNOWN_SERVER_TIME_LIMIT STRING_ARG */
-#line 2363 "util/configparser.y"
+ case 520: /* server_unknown_server_time_limit: VAR_UNKNOWN_SERVER_TIME_LIMIT STRING_ARG */
+#line 2378 "util/configparser.y"
{
OUTYY(("P(server_unknown_server_time_limit:%s)\n", (yyvsp[0].str)));
cfg_parser->cfg->unknown_server_time_limit = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5519 "util/configparser.c"
+#line 5577 "util/configparser.c"
+ break;
+
+ case 521: /* server_discard_timeout: VAR_DISCARD_TIMEOUT STRING_ARG */
+#line 2385 "util/configparser.y"
+ {
+ OUTYY(("P(server_discard_timeout:%s)\n", (yyvsp[0].str)));
+ cfg_parser->cfg->discard_timeout = atoi((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 5587 "util/configparser.c"
break;
- case 514: /* server_max_udp_size: VAR_MAX_UDP_SIZE STRING_ARG */
-#line 2370 "util/configparser.y"
+ case 522: /* server_wait_limit: VAR_WAIT_LIMIT STRING_ARG */
+#line 2392 "util/configparser.y"
+ {
+ OUTYY(("P(server_wait_limit:%s)\n", (yyvsp[0].str)));
+ cfg_parser->cfg->wait_limit = atoi((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 5597 "util/configparser.c"
+ break;
+
+ case 523: /* server_wait_limit_cookie: VAR_WAIT_LIMIT_COOKIE STRING_ARG */
+#line 2399 "util/configparser.y"
+ {
+ OUTYY(("P(server_wait_limit_cookie:%s)\n", (yyvsp[0].str)));
+ cfg_parser->cfg->wait_limit_cookie = atoi((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 5607 "util/configparser.c"
+ break;
+
+ case 524: /* server_wait_limit_netblock: VAR_WAIT_LIMIT_NETBLOCK STRING_ARG STRING_ARG */
+#line 2406 "util/configparser.y"
+ {
+ OUTYY(("P(server_wait_limit_netblock:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
+ if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) {
+ yyerror("number expected");
+ free((yyvsp[-1].str));
+ free((yyvsp[0].str));
+ } else {
+ if(!cfg_str2list_insert(&cfg_parser->cfg->
+ wait_limit_netblock, (yyvsp[-1].str), (yyvsp[0].str)))
+ fatal_exit("out of memory adding "
+ "wait-limit-netblock");
+ }
+ }
+#line 5625 "util/configparser.c"
+ break;
+
+ case 525: /* server_wait_limit_cookie_netblock: VAR_WAIT_LIMIT_COOKIE_NETBLOCK STRING_ARG STRING_ARG */
+#line 2421 "util/configparser.y"
+ {
+ OUTYY(("P(server_wait_limit_cookie_netblock:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
+ if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) {
+ yyerror("number expected");
+ free((yyvsp[-1].str));
+ free((yyvsp[0].str));
+ } else {
+ if(!cfg_str2list_insert(&cfg_parser->cfg->
+ wait_limit_cookie_netblock, (yyvsp[-1].str), (yyvsp[0].str)))
+ fatal_exit("out of memory adding "
+ "wait-limit-cookie-netblock");
+ }
+ }
+#line 5643 "util/configparser.c"
+ break;
+
+ case 526: /* server_max_udp_size: VAR_MAX_UDP_SIZE STRING_ARG */
+#line 2436 "util/configparser.y"
{
OUTYY(("P(server_max_udp_size:%s)\n", (yyvsp[0].str)));
cfg_parser->cfg->max_udp_size = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5529 "util/configparser.c"
+#line 5653 "util/configparser.c"
break;
- case 515: /* server_dns64_prefix: VAR_DNS64_PREFIX STRING_ARG */
-#line 2377 "util/configparser.y"
+ case 527: /* server_dns64_prefix: VAR_DNS64_PREFIX STRING_ARG */
+#line 2443 "util/configparser.y"
{
OUTYY(("P(dns64_prefix:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dns64_prefix);
cfg_parser->cfg->dns64_prefix = (yyvsp[0].str);
}
-#line 5539 "util/configparser.c"
+#line 5663 "util/configparser.c"
break;
- case 516: /* server_dns64_synthall: VAR_DNS64_SYNTHALL STRING_ARG */
-#line 2384 "util/configparser.y"
+ case 528: /* server_dns64_synthall: VAR_DNS64_SYNTHALL STRING_ARG */
+#line 2450 "util/configparser.y"
{
OUTYY(("P(server_dns64_synthall:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5547,32 +5671,32 @@ yyreduce:
else cfg_parser->cfg->dns64_synthall = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5551 "util/configparser.c"
+#line 5675 "util/configparser.c"
break;
- case 517: /* server_dns64_ignore_aaaa: VAR_DNS64_IGNORE_AAAA STRING_ARG */
-#line 2393 "util/configparser.y"
+ case 529: /* server_dns64_ignore_aaaa: VAR_DNS64_IGNORE_AAAA STRING_ARG */
+#line 2459 "util/configparser.y"
{
OUTYY(("P(dns64_ignore_aaaa:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->dns64_ignore_aaaa,
(yyvsp[0].str)))
fatal_exit("out of memory adding dns64-ignore-aaaa");
}
-#line 5562 "util/configparser.c"
+#line 5686 "util/configparser.c"
break;
- case 518: /* server_nat64_prefix: VAR_NAT64_PREFIX STRING_ARG */
-#line 2401 "util/configparser.y"
+ case 530: /* server_nat64_prefix: VAR_NAT64_PREFIX STRING_ARG */
+#line 2467 "util/configparser.y"
{
OUTYY(("P(nat64_prefix:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->nat64_prefix);
cfg_parser->cfg->nat64_prefix = (yyvsp[0].str);
}
-#line 5572 "util/configparser.c"
+#line 5696 "util/configparser.c"
break;
- case 519: /* server_define_tag: VAR_DEFINE_TAG STRING_ARG */
-#line 2408 "util/configparser.y"
+ case 531: /* server_define_tag: VAR_DEFINE_TAG STRING_ARG */
+#line 2474 "util/configparser.y"
{
char* p, *s = (yyvsp[0].str);
OUTYY(("P(server_define_tag:%s)\n", (yyvsp[0].str)));
@@ -5585,11 +5709,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5589 "util/configparser.c"
+#line 5713 "util/configparser.c"
break;
- case 520: /* server_local_zone_tag: VAR_LOCAL_ZONE_TAG STRING_ARG STRING_ARG */
-#line 2422 "util/configparser.y"
+ case 532: /* server_local_zone_tag: VAR_LOCAL_ZONE_TAG STRING_ARG STRING_ARG */
+#line 2488 "util/configparser.y"
{
size_t len = 0;
uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str),
@@ -5609,11 +5733,11 @@ yyreduce:
}
}
}
-#line 5613 "util/configparser.c"
+#line 5737 "util/configparser.c"
break;
- case 521: /* server_access_control_tag: VAR_ACCESS_CONTROL_TAG STRING_ARG STRING_ARG */
-#line 2443 "util/configparser.y"
+ case 533: /* server_access_control_tag: VAR_ACCESS_CONTROL_TAG STRING_ARG STRING_ARG */
+#line 2509 "util/configparser.y"
{
size_t len = 0;
uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str),
@@ -5633,11 +5757,11 @@ yyreduce:
}
}
}
-#line 5637 "util/configparser.c"
+#line 5761 "util/configparser.c"
break;
- case 522: /* server_access_control_tag_action: VAR_ACCESS_CONTROL_TAG_ACTION STRING_ARG STRING_ARG STRING_ARG */
-#line 2464 "util/configparser.y"
+ case 534: /* server_access_control_tag_action: VAR_ACCESS_CONTROL_TAG_ACTION STRING_ARG STRING_ARG STRING_ARG */
+#line 2530 "util/configparser.y"
{
OUTYY(("P(server_access_control_tag_action:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_actions,
@@ -5648,11 +5772,11 @@ yyreduce:
free((yyvsp[0].str));
}
}
-#line 5652 "util/configparser.c"
+#line 5776 "util/configparser.c"
break;
- case 523: /* server_access_control_tag_data: VAR_ACCESS_CONTROL_TAG_DATA STRING_ARG STRING_ARG STRING_ARG */
-#line 2476 "util/configparser.y"
+ case 535: /* server_access_control_tag_data: VAR_ACCESS_CONTROL_TAG_DATA STRING_ARG STRING_ARG STRING_ARG */
+#line 2542 "util/configparser.y"
{
OUTYY(("P(server_access_control_tag_data:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_datas,
@@ -5663,11 +5787,11 @@ yyreduce:
free((yyvsp[0].str));
}
}
-#line 5667 "util/configparser.c"
+#line 5791 "util/configparser.c"
break;
- case 524: /* server_local_zone_override: VAR_LOCAL_ZONE_OVERRIDE STRING_ARG STRING_ARG STRING_ARG */
-#line 2488 "util/configparser.y"
+ case 536: /* server_local_zone_override: VAR_LOCAL_ZONE_OVERRIDE STRING_ARG STRING_ARG STRING_ARG */
+#line 2554 "util/configparser.y"
{
OUTYY(("P(server_local_zone_override:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str3list_insert(&cfg_parser->cfg->local_zone_overrides,
@@ -5678,11 +5802,11 @@ yyreduce:
free((yyvsp[0].str));
}
}
-#line 5682 "util/configparser.c"
+#line 5806 "util/configparser.c"
break;
- case 525: /* server_access_control_view: VAR_ACCESS_CONTROL_VIEW STRING_ARG STRING_ARG */
-#line 2500 "util/configparser.y"
+ case 537: /* server_access_control_view: VAR_ACCESS_CONTROL_VIEW STRING_ARG STRING_ARG */
+#line 2566 "util/configparser.y"
{
OUTYY(("P(server_access_control_view:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str2list_insert(&cfg_parser->cfg->acl_view,
@@ -5690,11 +5814,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 5694 "util/configparser.c"
+#line 5818 "util/configparser.c"
break;
- case 526: /* server_interface_tag: VAR_INTERFACE_TAG STRING_ARG STRING_ARG */
-#line 2509 "util/configparser.y"
+ case 538: /* server_interface_tag: VAR_INTERFACE_TAG STRING_ARG STRING_ARG */
+#line 2575 "util/configparser.y"
{
size_t len = 0;
uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str),
@@ -5714,11 +5838,11 @@ yyreduce:
}
}
}
-#line 5718 "util/configparser.c"
+#line 5842 "util/configparser.c"
break;
- case 527: /* server_interface_tag_action: VAR_INTERFACE_TAG_ACTION STRING_ARG STRING_ARG STRING_ARG */
-#line 2530 "util/configparser.y"
+ case 539: /* server_interface_tag_action: VAR_INTERFACE_TAG_ACTION STRING_ARG STRING_ARG STRING_ARG */
+#line 2596 "util/configparser.y"
{
OUTYY(("P(server_interface_tag_action:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str3list_insert(&cfg_parser->cfg->interface_tag_actions,
@@ -5729,11 +5853,11 @@ yyreduce:
free((yyvsp[0].str));
}
}
-#line 5733 "util/configparser.c"
+#line 5857 "util/configparser.c"
break;
- case 528: /* server_interface_tag_data: VAR_INTERFACE_TAG_DATA STRING_ARG STRING_ARG STRING_ARG */
-#line 2542 "util/configparser.y"
+ case 540: /* server_interface_tag_data: VAR_INTERFACE_TAG_DATA STRING_ARG STRING_ARG STRING_ARG */
+#line 2608 "util/configparser.y"
{
OUTYY(("P(server_interface_tag_data:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str3list_insert(&cfg_parser->cfg->interface_tag_datas,
@@ -5744,11 +5868,11 @@ yyreduce:
free((yyvsp[0].str));
}
}
-#line 5748 "util/configparser.c"
+#line 5872 "util/configparser.c"
break;
- case 529: /* server_interface_view: VAR_INTERFACE_VIEW STRING_ARG STRING_ARG */
-#line 2554 "util/configparser.y"
+ case 541: /* server_interface_view: VAR_INTERFACE_VIEW STRING_ARG STRING_ARG */
+#line 2620 "util/configparser.y"
{
OUTYY(("P(server_interface_view:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str2list_insert(&cfg_parser->cfg->interface_view,
@@ -5756,11 +5880,11 @@ yyreduce:
yyerror("out of memory");
}
}
-#line 5760 "util/configparser.c"
+#line 5884 "util/configparser.c"
break;
- case 530: /* server_response_ip_tag: VAR_RESPONSE_IP_TAG STRING_ARG STRING_ARG */
-#line 2563 "util/configparser.y"
+ case 542: /* server_response_ip_tag: VAR_RESPONSE_IP_TAG STRING_ARG STRING_ARG */
+#line 2629 "util/configparser.y"
{
size_t len = 0;
uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str),
@@ -5780,11 +5904,11 @@ yyreduce:
}
}
}
-#line 5784 "util/configparser.c"
+#line 5908 "util/configparser.c"
break;
- case 531: /* server_ip_ratelimit: VAR_IP_RATELIMIT STRING_ARG */
-#line 2584 "util/configparser.y"
+ case 543: /* server_ip_ratelimit: VAR_IP_RATELIMIT STRING_ARG */
+#line 2650 "util/configparser.y"
{
OUTYY(("P(server_ip_ratelimit:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5792,11 +5916,11 @@ yyreduce:
else cfg_parser->cfg->ip_ratelimit = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5796 "util/configparser.c"
+#line 5920 "util/configparser.c"
break;
- case 532: /* server_ip_ratelimit_cookie: VAR_IP_RATELIMIT_COOKIE STRING_ARG */
-#line 2593 "util/configparser.y"
+ case 544: /* server_ip_ratelimit_cookie: VAR_IP_RATELIMIT_COOKIE STRING_ARG */
+#line 2659 "util/configparser.y"
{
OUTYY(("P(server_ip_ratelimit_cookie:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5804,11 +5928,11 @@ yyreduce:
else cfg_parser->cfg->ip_ratelimit_cookie = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5808 "util/configparser.c"
+#line 5932 "util/configparser.c"
break;
- case 533: /* server_ratelimit: VAR_RATELIMIT STRING_ARG */
-#line 2602 "util/configparser.y"
+ case 545: /* server_ratelimit: VAR_RATELIMIT STRING_ARG */
+#line 2668 "util/configparser.y"
{
OUTYY(("P(server_ratelimit:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5816,33 +5940,33 @@ yyreduce:
else cfg_parser->cfg->ratelimit = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5820 "util/configparser.c"
+#line 5944 "util/configparser.c"
break;
- case 534: /* server_ip_ratelimit_size: VAR_IP_RATELIMIT_SIZE STRING_ARG */
-#line 2611 "util/configparser.y"
+ case 546: /* server_ip_ratelimit_size: VAR_IP_RATELIMIT_SIZE STRING_ARG */
+#line 2677 "util/configparser.y"
{
OUTYY(("P(server_ip_ratelimit_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ip_ratelimit_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 5831 "util/configparser.c"
+#line 5955 "util/configparser.c"
break;
- case 535: /* server_ratelimit_size: VAR_RATELIMIT_SIZE STRING_ARG */
-#line 2619 "util/configparser.y"
+ case 547: /* server_ratelimit_size: VAR_RATELIMIT_SIZE STRING_ARG */
+#line 2685 "util/configparser.y"
{
OUTYY(("P(server_ratelimit_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ratelimit_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 5842 "util/configparser.c"
+#line 5966 "util/configparser.c"
break;
- case 536: /* server_ip_ratelimit_slabs: VAR_IP_RATELIMIT_SLABS STRING_ARG */
-#line 2627 "util/configparser.y"
+ case 548: /* server_ip_ratelimit_slabs: VAR_IP_RATELIMIT_SLABS STRING_ARG */
+#line 2693 "util/configparser.y"
{
OUTYY(("P(server_ip_ratelimit_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -5854,11 +5978,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5858 "util/configparser.c"
+#line 5982 "util/configparser.c"
break;
- case 537: /* server_ratelimit_slabs: VAR_RATELIMIT_SLABS STRING_ARG */
-#line 2640 "util/configparser.y"
+ case 549: /* server_ratelimit_slabs: VAR_RATELIMIT_SLABS STRING_ARG */
+#line 2706 "util/configparser.y"
{
OUTYY(("P(server_ratelimit_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -5870,11 +5994,11 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 5874 "util/configparser.c"
+#line 5998 "util/configparser.c"
break;
- case 538: /* server_ratelimit_for_domain: VAR_RATELIMIT_FOR_DOMAIN STRING_ARG STRING_ARG */
-#line 2653 "util/configparser.y"
+ case 550: /* server_ratelimit_for_domain: VAR_RATELIMIT_FOR_DOMAIN STRING_ARG STRING_ARG */
+#line 2719 "util/configparser.y"
{
OUTYY(("P(server_ratelimit_for_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) {
@@ -5888,11 +6012,11 @@ yyreduce:
"ratelimit-for-domain");
}
}
-#line 5892 "util/configparser.c"
+#line 6016 "util/configparser.c"
break;
- case 539: /* server_ratelimit_below_domain: VAR_RATELIMIT_BELOW_DOMAIN STRING_ARG STRING_ARG */
-#line 2668 "util/configparser.y"
+ case 551: /* server_ratelimit_below_domain: VAR_RATELIMIT_BELOW_DOMAIN STRING_ARG STRING_ARG */
+#line 2734 "util/configparser.y"
{
OUTYY(("P(server_ratelimit_below_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) {
@@ -5906,11 +6030,11 @@ yyreduce:
"ratelimit-below-domain");
}
}
-#line 5910 "util/configparser.c"
+#line 6034 "util/configparser.c"
break;
- case 540: /* server_ip_ratelimit_factor: VAR_IP_RATELIMIT_FACTOR STRING_ARG */
-#line 2683 "util/configparser.y"
+ case 552: /* server_ip_ratelimit_factor: VAR_IP_RATELIMIT_FACTOR STRING_ARG */
+#line 2749 "util/configparser.y"
{
OUTYY(("P(server_ip_ratelimit_factor:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5918,11 +6042,11 @@ yyreduce:
else cfg_parser->cfg->ip_ratelimit_factor = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5922 "util/configparser.c"
+#line 6046 "util/configparser.c"
break;
- case 541: /* server_ratelimit_factor: VAR_RATELIMIT_FACTOR STRING_ARG */
-#line 2692 "util/configparser.y"
+ case 553: /* server_ratelimit_factor: VAR_RATELIMIT_FACTOR STRING_ARG */
+#line 2758 "util/configparser.y"
{
OUTYY(("P(server_ratelimit_factor:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5930,11 +6054,11 @@ yyreduce:
else cfg_parser->cfg->ratelimit_factor = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5934 "util/configparser.c"
+#line 6058 "util/configparser.c"
break;
- case 542: /* server_ip_ratelimit_backoff: VAR_IP_RATELIMIT_BACKOFF STRING_ARG */
-#line 2701 "util/configparser.y"
+ case 554: /* server_ip_ratelimit_backoff: VAR_IP_RATELIMIT_BACKOFF STRING_ARG */
+#line 2767 "util/configparser.y"
{
OUTYY(("P(server_ip_ratelimit_backoff:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5943,11 +6067,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5947 "util/configparser.c"
+#line 6071 "util/configparser.c"
break;
- case 543: /* server_ratelimit_backoff: VAR_RATELIMIT_BACKOFF STRING_ARG */
-#line 2711 "util/configparser.y"
+ case 555: /* server_ratelimit_backoff: VAR_RATELIMIT_BACKOFF STRING_ARG */
+#line 2777 "util/configparser.y"
{
OUTYY(("P(server_ratelimit_backoff:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -5956,11 +6080,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 5960 "util/configparser.c"
+#line 6084 "util/configparser.c"
break;
- case 544: /* server_outbound_msg_retry: VAR_OUTBOUND_MSG_RETRY STRING_ARG */
-#line 2721 "util/configparser.y"
+ case 556: /* server_outbound_msg_retry: VAR_OUTBOUND_MSG_RETRY STRING_ARG */
+#line 2787 "util/configparser.y"
{
OUTYY(("P(server_outbound_msg_retry:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5968,11 +6092,11 @@ yyreduce:
else cfg_parser->cfg->outbound_msg_retry = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5972 "util/configparser.c"
+#line 6096 "util/configparser.c"
break;
- case 545: /* server_max_sent_count: VAR_MAX_SENT_COUNT STRING_ARG */
-#line 2730 "util/configparser.y"
+ case 557: /* server_max_sent_count: VAR_MAX_SENT_COUNT STRING_ARG */
+#line 2796 "util/configparser.y"
{
OUTYY(("P(server_max_sent_count:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5980,11 +6104,11 @@ yyreduce:
else cfg_parser->cfg->max_sent_count = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5984 "util/configparser.c"
+#line 6108 "util/configparser.c"
break;
- case 546: /* server_max_query_restarts: VAR_MAX_QUERY_RESTARTS STRING_ARG */
-#line 2739 "util/configparser.y"
+ case 558: /* server_max_query_restarts: VAR_MAX_QUERY_RESTARTS STRING_ARG */
+#line 2805 "util/configparser.y"
{
OUTYY(("P(server_max_query_restarts:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -5992,20 +6116,20 @@ yyreduce:
else cfg_parser->cfg->max_query_restarts = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 5996 "util/configparser.c"
+#line 6120 "util/configparser.c"
break;
- case 547: /* server_low_rtt: VAR_LOW_RTT STRING_ARG */
-#line 2748 "util/configparser.y"
+ case 559: /* server_low_rtt: VAR_LOW_RTT STRING_ARG */
+#line 2814 "util/configparser.y"
{
OUTYY(("P(low-rtt option is deprecated, use fast-server-num instead)\n"));
free((yyvsp[0].str));
}
-#line 6005 "util/configparser.c"
+#line 6129 "util/configparser.c"
break;
- case 548: /* server_fast_server_num: VAR_FAST_SERVER_NUM STRING_ARG */
-#line 2754 "util/configparser.y"
+ case 560: /* server_fast_server_num: VAR_FAST_SERVER_NUM STRING_ARG */
+#line 2820 "util/configparser.y"
{
OUTYY(("P(server_fast_server_num:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) <= 0)
@@ -6013,11 +6137,11 @@ yyreduce:
else cfg_parser->cfg->fast_server_num = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 6017 "util/configparser.c"
+#line 6141 "util/configparser.c"
break;
- case 549: /* server_fast_server_permil: VAR_FAST_SERVER_PERMIL STRING_ARG */
-#line 2763 "util/configparser.y"
+ case 561: /* server_fast_server_permil: VAR_FAST_SERVER_PERMIL STRING_ARG */
+#line 2829 "util/configparser.y"
{
OUTYY(("P(server_fast_server_permil:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -6025,11 +6149,11 @@ yyreduce:
else cfg_parser->cfg->fast_server_permil = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 6029 "util/configparser.c"
+#line 6153 "util/configparser.c"
break;
- case 550: /* server_qname_minimisation: VAR_QNAME_MINIMISATION STRING_ARG */
-#line 2772 "util/configparser.y"
+ case 562: /* server_qname_minimisation: VAR_QNAME_MINIMISATION STRING_ARG */
+#line 2838 "util/configparser.y"
{
OUTYY(("P(server_qname_minimisation:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6038,11 +6162,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6042 "util/configparser.c"
+#line 6166 "util/configparser.c"
break;
- case 551: /* server_qname_minimisation_strict: VAR_QNAME_MINIMISATION_STRICT STRING_ARG */
-#line 2782 "util/configparser.y"
+ case 563: /* server_qname_minimisation_strict: VAR_QNAME_MINIMISATION_STRICT STRING_ARG */
+#line 2848 "util/configparser.y"
{
OUTYY(("P(server_qname_minimisation_strict:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6051,11 +6175,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6055 "util/configparser.c"
+#line 6179 "util/configparser.c"
break;
- case 552: /* server_pad_responses: VAR_PAD_RESPONSES STRING_ARG */
-#line 2792 "util/configparser.y"
+ case 564: /* server_pad_responses: VAR_PAD_RESPONSES STRING_ARG */
+#line 2858 "util/configparser.y"
{
OUTYY(("P(server_pad_responses:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6064,11 +6188,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6068 "util/configparser.c"
+#line 6192 "util/configparser.c"
break;
- case 553: /* server_pad_responses_block_size: VAR_PAD_RESPONSES_BLOCK_SIZE STRING_ARG */
-#line 2802 "util/configparser.y"
+ case 565: /* server_pad_responses_block_size: VAR_PAD_RESPONSES_BLOCK_SIZE STRING_ARG */
+#line 2868 "util/configparser.y"
{
OUTYY(("P(server_pad_responses_block_size:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -6076,11 +6200,11 @@ yyreduce:
else cfg_parser->cfg->pad_responses_block_size = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 6080 "util/configparser.c"
+#line 6204 "util/configparser.c"
break;
- case 554: /* server_pad_queries: VAR_PAD_QUERIES STRING_ARG */
-#line 2811 "util/configparser.y"
+ case 566: /* server_pad_queries: VAR_PAD_QUERIES STRING_ARG */
+#line 2877 "util/configparser.y"
{
OUTYY(("P(server_pad_queries:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6089,11 +6213,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6093 "util/configparser.c"
+#line 6217 "util/configparser.c"
break;
- case 555: /* server_pad_queries_block_size: VAR_PAD_QUERIES_BLOCK_SIZE STRING_ARG */
-#line 2821 "util/configparser.y"
+ case 567: /* server_pad_queries_block_size: VAR_PAD_QUERIES_BLOCK_SIZE STRING_ARG */
+#line 2887 "util/configparser.y"
{
OUTYY(("P(server_pad_queries_block_size:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -6101,11 +6225,11 @@ yyreduce:
else cfg_parser->cfg->pad_queries_block_size = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 6105 "util/configparser.c"
+#line 6229 "util/configparser.c"
break;
- case 556: /* server_ipsecmod_enabled: VAR_IPSECMOD_ENABLED STRING_ARG */
-#line 2830 "util/configparser.y"
+ case 568: /* server_ipsecmod_enabled: VAR_IPSECMOD_ENABLED STRING_ARG */
+#line 2896 "util/configparser.y"
{
#ifdef USE_IPSECMOD
OUTYY(("P(server_ipsecmod_enabled:%s)\n", (yyvsp[0].str)));
@@ -6117,11 +6241,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 6121 "util/configparser.c"
+#line 6245 "util/configparser.c"
break;
- case 557: /* server_ipsecmod_ignore_bogus: VAR_IPSECMOD_IGNORE_BOGUS STRING_ARG */
-#line 2843 "util/configparser.y"
+ case 569: /* server_ipsecmod_ignore_bogus: VAR_IPSECMOD_IGNORE_BOGUS STRING_ARG */
+#line 2909 "util/configparser.y"
{
#ifdef USE_IPSECMOD
OUTYY(("P(server_ipsecmod_ignore_bogus:%s)\n", (yyvsp[0].str)));
@@ -6133,11 +6257,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 6137 "util/configparser.c"
+#line 6261 "util/configparser.c"
break;
- case 558: /* server_ipsecmod_hook: VAR_IPSECMOD_HOOK STRING_ARG */
-#line 2856 "util/configparser.y"
+ case 570: /* server_ipsecmod_hook: VAR_IPSECMOD_HOOK STRING_ARG */
+#line 2922 "util/configparser.y"
{
#ifdef USE_IPSECMOD
OUTYY(("P(server_ipsecmod_hook:%s)\n", (yyvsp[0].str)));
@@ -6148,11 +6272,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 6152 "util/configparser.c"
+#line 6276 "util/configparser.c"
break;
- case 559: /* server_ipsecmod_max_ttl: VAR_IPSECMOD_MAX_TTL STRING_ARG */
-#line 2868 "util/configparser.y"
+ case 571: /* server_ipsecmod_max_ttl: VAR_IPSECMOD_MAX_TTL STRING_ARG */
+#line 2934 "util/configparser.y"
{
#ifdef USE_IPSECMOD
OUTYY(("P(server_ipsecmod_max_ttl:%s)\n", (yyvsp[0].str)));
@@ -6165,11 +6289,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 6169 "util/configparser.c"
+#line 6293 "util/configparser.c"
break;
- case 560: /* server_ipsecmod_whitelist: VAR_IPSECMOD_WHITELIST STRING_ARG */
-#line 2882 "util/configparser.y"
+ case 572: /* server_ipsecmod_whitelist: VAR_IPSECMOD_WHITELIST STRING_ARG */
+#line 2948 "util/configparser.y"
{
#ifdef USE_IPSECMOD
OUTYY(("P(server_ipsecmod_whitelist:%s)\n", (yyvsp[0].str)));
@@ -6180,11 +6304,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 6184 "util/configparser.c"
+#line 6308 "util/configparser.c"
break;
- case 561: /* server_ipsecmod_strict: VAR_IPSECMOD_STRICT STRING_ARG */
-#line 2894 "util/configparser.y"
+ case 573: /* server_ipsecmod_strict: VAR_IPSECMOD_STRICT STRING_ARG */
+#line 2960 "util/configparser.y"
{
#ifdef USE_IPSECMOD
OUTYY(("P(server_ipsecmod_strict:%s)\n", (yyvsp[0].str)));
@@ -6197,11 +6321,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 6201 "util/configparser.c"
+#line 6325 "util/configparser.c"
break;
- case 562: /* server_edns_client_string: VAR_EDNS_CLIENT_STRING STRING_ARG STRING_ARG */
-#line 2908 "util/configparser.y"
+ case 574: /* server_edns_client_string: VAR_EDNS_CLIENT_STRING STRING_ARG STRING_ARG */
+#line 2974 "util/configparser.y"
{
OUTYY(("P(server_edns_client_string:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(!cfg_str2list_insert(
@@ -6209,11 +6333,11 @@ yyreduce:
fatal_exit("out of memory adding "
"edns-client-string");
}
-#line 6213 "util/configparser.c"
+#line 6337 "util/configparser.c"
break;
- case 563: /* server_edns_client_string_opcode: VAR_EDNS_CLIENT_STRING_OPCODE STRING_ARG */
-#line 2917 "util/configparser.y"
+ case 575: /* server_edns_client_string_opcode: VAR_EDNS_CLIENT_STRING_OPCODE STRING_ARG */
+#line 2983 "util/configparser.y"
{
OUTYY(("P(edns_client_string_opcode:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
@@ -6223,11 +6347,11 @@ yyreduce:
else cfg_parser->cfg->edns_client_string_opcode = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 6227 "util/configparser.c"
+#line 6351 "util/configparser.c"
break;
- case 564: /* server_ede: VAR_EDE STRING_ARG */
-#line 2928 "util/configparser.y"
+ case 576: /* server_ede: VAR_EDE STRING_ARG */
+#line 2994 "util/configparser.y"
{
OUTYY(("P(server_ede:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6235,21 +6359,21 @@ yyreduce:
else cfg_parser->cfg->ede = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6239 "util/configparser.c"
+#line 6363 "util/configparser.c"
break;
- case 565: /* server_proxy_protocol_port: VAR_PROXY_PROTOCOL_PORT STRING_ARG */
-#line 2937 "util/configparser.y"
+ case 577: /* server_proxy_protocol_port: VAR_PROXY_PROTOCOL_PORT STRING_ARG */
+#line 3003 "util/configparser.y"
{
OUTYY(("P(server_proxy_protocol_port:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->proxy_protocol_port, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6249 "util/configparser.c"
+#line 6373 "util/configparser.c"
break;
- case 566: /* stub_name: VAR_NAME STRING_ARG */
-#line 2944 "util/configparser.y"
+ case 578: /* stub_name: VAR_NAME STRING_ARG */
+#line 3010 "util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
if(cfg_parser->cfg->stubs->name)
@@ -6258,31 +6382,31 @@ yyreduce:
free(cfg_parser->cfg->stubs->name);
cfg_parser->cfg->stubs->name = (yyvsp[0].str);
}
-#line 6262 "util/configparser.c"
+#line 6386 "util/configparser.c"
break;
- case 567: /* stub_host: VAR_STUB_HOST STRING_ARG */
-#line 2954 "util/configparser.y"
+ case 579: /* stub_host: VAR_STUB_HOST STRING_ARG */
+#line 3020 "util/configparser.y"
{
OUTYY(("P(stub-host:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6272 "util/configparser.c"
+#line 6396 "util/configparser.c"
break;
- case 568: /* stub_addr: VAR_STUB_ADDR STRING_ARG */
-#line 2961 "util/configparser.y"
+ case 580: /* stub_addr: VAR_STUB_ADDR STRING_ARG */
+#line 3027 "util/configparser.y"
{
OUTYY(("P(stub-addr:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6282 "util/configparser.c"
+#line 6406 "util/configparser.c"
break;
- case 569: /* stub_first: VAR_STUB_FIRST STRING_ARG */
-#line 2968 "util/configparser.y"
+ case 581: /* stub_first: VAR_STUB_FIRST STRING_ARG */
+#line 3034 "util/configparser.y"
{
OUTYY(("P(stub-first:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6290,11 +6414,11 @@ yyreduce:
else cfg_parser->cfg->stubs->isfirst=(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6294 "util/configparser.c"
+#line 6418 "util/configparser.c"
break;
- case 570: /* stub_no_cache: VAR_STUB_NO_CACHE STRING_ARG */
-#line 2977 "util/configparser.y"
+ case 582: /* stub_no_cache: VAR_STUB_NO_CACHE STRING_ARG */
+#line 3043 "util/configparser.y"
{
OUTYY(("P(stub-no-cache:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6302,11 +6426,11 @@ yyreduce:
else cfg_parser->cfg->stubs->no_cache=(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6306 "util/configparser.c"
+#line 6430 "util/configparser.c"
break;
- case 571: /* stub_ssl_upstream: VAR_STUB_SSL_UPSTREAM STRING_ARG */
-#line 2986 "util/configparser.y"
+ case 583: /* stub_ssl_upstream: VAR_STUB_SSL_UPSTREAM STRING_ARG */
+#line 3052 "util/configparser.y"
{
OUTYY(("P(stub-ssl-upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6315,11 +6439,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6319 "util/configparser.c"
+#line 6443 "util/configparser.c"
break;
- case 572: /* stub_tcp_upstream: VAR_STUB_TCP_UPSTREAM STRING_ARG */
-#line 2996 "util/configparser.y"
+ case 584: /* stub_tcp_upstream: VAR_STUB_TCP_UPSTREAM STRING_ARG */
+#line 3062 "util/configparser.y"
{
OUTYY(("P(stub-tcp-upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6328,11 +6452,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6332 "util/configparser.c"
+#line 6456 "util/configparser.c"
break;
- case 573: /* stub_prime: VAR_STUB_PRIME STRING_ARG */
-#line 3006 "util/configparser.y"
+ case 585: /* stub_prime: VAR_STUB_PRIME STRING_ARG */
+#line 3072 "util/configparser.y"
{
OUTYY(("P(stub-prime:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6341,11 +6465,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6345 "util/configparser.c"
+#line 6469 "util/configparser.c"
break;
- case 574: /* forward_name: VAR_NAME STRING_ARG */
-#line 3016 "util/configparser.y"
+ case 586: /* forward_name: VAR_NAME STRING_ARG */
+#line 3082 "util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
if(cfg_parser->cfg->forwards->name)
@@ -6354,31 +6478,31 @@ yyreduce:
free(cfg_parser->cfg->forwards->name);
cfg_parser->cfg->forwards->name = (yyvsp[0].str);
}
-#line 6358 "util/configparser.c"
+#line 6482 "util/configparser.c"
break;
- case 575: /* forward_host: VAR_FORWARD_HOST STRING_ARG */
-#line 3026 "util/configparser.y"
+ case 587: /* forward_host: VAR_FORWARD_HOST STRING_ARG */
+#line 3092 "util/configparser.y"
{
OUTYY(("P(forward-host:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6368 "util/configparser.c"
+#line 6492 "util/configparser.c"
break;
- case 576: /* forward_addr: VAR_FORWARD_ADDR STRING_ARG */
-#line 3033 "util/configparser.y"
+ case 588: /* forward_addr: VAR_FORWARD_ADDR STRING_ARG */
+#line 3099 "util/configparser.y"
{
OUTYY(("P(forward-addr:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6378 "util/configparser.c"
+#line 6502 "util/configparser.c"
break;
- case 577: /* forward_first: VAR_FORWARD_FIRST STRING_ARG */
-#line 3040 "util/configparser.y"
+ case 589: /* forward_first: VAR_FORWARD_FIRST STRING_ARG */
+#line 3106 "util/configparser.y"
{
OUTYY(("P(forward-first:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6386,11 +6510,11 @@ yyreduce:
else cfg_parser->cfg->forwards->isfirst=(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6390 "util/configparser.c"
+#line 6514 "util/configparser.c"
break;
- case 578: /* forward_no_cache: VAR_FORWARD_NO_CACHE STRING_ARG */
-#line 3049 "util/configparser.y"
+ case 590: /* forward_no_cache: VAR_FORWARD_NO_CACHE STRING_ARG */
+#line 3115 "util/configparser.y"
{
OUTYY(("P(forward-no-cache:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6398,11 +6522,11 @@ yyreduce:
else cfg_parser->cfg->forwards->no_cache=(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6402 "util/configparser.c"
+#line 6526 "util/configparser.c"
break;
- case 579: /* forward_ssl_upstream: VAR_FORWARD_SSL_UPSTREAM STRING_ARG */
-#line 3058 "util/configparser.y"
+ case 591: /* forward_ssl_upstream: VAR_FORWARD_SSL_UPSTREAM STRING_ARG */
+#line 3124 "util/configparser.y"
{
OUTYY(("P(forward-ssl-upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6411,11 +6535,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6415 "util/configparser.c"
+#line 6539 "util/configparser.c"
break;
- case 580: /* forward_tcp_upstream: VAR_FORWARD_TCP_UPSTREAM STRING_ARG */
-#line 3068 "util/configparser.y"
+ case 592: /* forward_tcp_upstream: VAR_FORWARD_TCP_UPSTREAM STRING_ARG */
+#line 3134 "util/configparser.y"
{
OUTYY(("P(forward-tcp-upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6424,11 +6548,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6428 "util/configparser.c"
+#line 6552 "util/configparser.c"
break;
- case 581: /* auth_name: VAR_NAME STRING_ARG */
-#line 3078 "util/configparser.y"
+ case 593: /* auth_name: VAR_NAME STRING_ARG */
+#line 3144 "util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
if(cfg_parser->cfg->auths->name)
@@ -6437,52 +6561,52 @@ yyreduce:
free(cfg_parser->cfg->auths->name);
cfg_parser->cfg->auths->name = (yyvsp[0].str);
}
-#line 6441 "util/configparser.c"
+#line 6565 "util/configparser.c"
break;
- case 582: /* auth_zonefile: VAR_ZONEFILE STRING_ARG */
-#line 3088 "util/configparser.y"
+ case 594: /* auth_zonefile: VAR_ZONEFILE STRING_ARG */
+#line 3154 "util/configparser.y"
{
OUTYY(("P(zonefile:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->auths->zonefile);
cfg_parser->cfg->auths->zonefile = (yyvsp[0].str);
}
-#line 6451 "util/configparser.c"
+#line 6575 "util/configparser.c"
break;
- case 583: /* auth_master: VAR_MASTER STRING_ARG */
-#line 3095 "util/configparser.y"
+ case 595: /* auth_master: VAR_MASTER STRING_ARG */
+#line 3161 "util/configparser.y"
{
OUTYY(("P(master:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->auths->masters, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6461 "util/configparser.c"
+#line 6585 "util/configparser.c"
break;
- case 584: /* auth_url: VAR_URL STRING_ARG */
-#line 3102 "util/configparser.y"
+ case 596: /* auth_url: VAR_URL STRING_ARG */
+#line 3168 "util/configparser.y"
{
OUTYY(("P(url:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->auths->urls, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6471 "util/configparser.c"
+#line 6595 "util/configparser.c"
break;
- case 585: /* auth_allow_notify: VAR_ALLOW_NOTIFY STRING_ARG */
-#line 3109 "util/configparser.y"
+ case 597: /* auth_allow_notify: VAR_ALLOW_NOTIFY STRING_ARG */
+#line 3175 "util/configparser.y"
{
OUTYY(("P(allow-notify:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->auths->allow_notify,
(yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6482 "util/configparser.c"
+#line 6606 "util/configparser.c"
break;
- case 586: /* auth_zonemd_check: VAR_ZONEMD_CHECK STRING_ARG */
-#line 3117 "util/configparser.y"
+ case 598: /* auth_zonemd_check: VAR_ZONEMD_CHECK STRING_ARG */
+#line 3183 "util/configparser.y"
{
OUTYY(("P(zonemd-check:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6491,11 +6615,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6495 "util/configparser.c"
+#line 6619 "util/configparser.c"
break;
- case 587: /* auth_zonemd_reject_absence: VAR_ZONEMD_REJECT_ABSENCE STRING_ARG */
-#line 3127 "util/configparser.y"
+ case 599: /* auth_zonemd_reject_absence: VAR_ZONEMD_REJECT_ABSENCE STRING_ARG */
+#line 3193 "util/configparser.y"
{
OUTYY(("P(zonemd-reject-absence:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6504,11 +6628,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6508 "util/configparser.c"
+#line 6632 "util/configparser.c"
break;
- case 588: /* auth_for_downstream: VAR_FOR_DOWNSTREAM STRING_ARG */
-#line 3137 "util/configparser.y"
+ case 600: /* auth_for_downstream: VAR_FOR_DOWNSTREAM STRING_ARG */
+#line 3203 "util/configparser.y"
{
OUTYY(("P(for-downstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6517,11 +6641,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6521 "util/configparser.c"
+#line 6645 "util/configparser.c"
break;
- case 589: /* auth_for_upstream: VAR_FOR_UPSTREAM STRING_ARG */
-#line 3147 "util/configparser.y"
+ case 601: /* auth_for_upstream: VAR_FOR_UPSTREAM STRING_ARG */
+#line 3213 "util/configparser.y"
{
OUTYY(("P(for-upstream:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6530,11 +6654,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6534 "util/configparser.c"
+#line 6658 "util/configparser.c"
break;
- case 590: /* auth_fallback_enabled: VAR_FALLBACK_ENABLED STRING_ARG */
-#line 3157 "util/configparser.y"
+ case 602: /* auth_fallback_enabled: VAR_FALLBACK_ENABLED STRING_ARG */
+#line 3223 "util/configparser.y"
{
OUTYY(("P(fallback-enabled:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6543,11 +6667,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6547 "util/configparser.c"
+#line 6671 "util/configparser.c"
break;
- case 591: /* view_name: VAR_NAME STRING_ARG */
-#line 3167 "util/configparser.y"
+ case 603: /* view_name: VAR_NAME STRING_ARG */
+#line 3233 "util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
if(cfg_parser->cfg->views->name)
@@ -6556,11 +6680,11 @@ yyreduce:
free(cfg_parser->cfg->views->name);
cfg_parser->cfg->views->name = (yyvsp[0].str);
}
-#line 6560 "util/configparser.c"
+#line 6684 "util/configparser.c"
break;
- case 592: /* view_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG */
-#line 3177 "util/configparser.y"
+ case 604: /* view_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG */
+#line 3243 "util/configparser.y"
{
OUTYY(("P(view_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 &&
@@ -6615,11 +6739,11 @@ yyreduce:
fatal_exit("out of memory adding local-zone");
}
}
-#line 6619 "util/configparser.c"
+#line 6743 "util/configparser.c"
break;
- case 593: /* view_response_ip: VAR_RESPONSE_IP STRING_ARG STRING_ARG */
-#line 3233 "util/configparser.y"
+ case 605: /* view_response_ip: VAR_RESPONSE_IP STRING_ARG STRING_ARG */
+#line 3299 "util/configparser.y"
{
OUTYY(("P(view_response_ip:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
validate_respip_action((yyvsp[0].str));
@@ -6628,33 +6752,33 @@ yyreduce:
fatal_exit("out of memory adding per-view "
"response-ip action");
}
-#line 6632 "util/configparser.c"
+#line 6756 "util/configparser.c"
break;
- case 594: /* view_response_ip_data: VAR_RESPONSE_IP_DATA STRING_ARG STRING_ARG */
-#line 3243 "util/configparser.y"
+ case 606: /* view_response_ip_data: VAR_RESPONSE_IP_DATA STRING_ARG STRING_ARG */
+#line 3309 "util/configparser.y"
{
OUTYY(("P(view_response_ip_data:%s)\n", (yyvsp[-1].str)));
if(!cfg_str2list_insert(
&cfg_parser->cfg->views->respip_data, (yyvsp[-1].str), (yyvsp[0].str)))
fatal_exit("out of memory adding response-ip-data");
}
-#line 6643 "util/configparser.c"
+#line 6767 "util/configparser.c"
break;
- case 595: /* view_local_data: VAR_LOCAL_DATA STRING_ARG */
-#line 3251 "util/configparser.y"
+ case 607: /* view_local_data: VAR_LOCAL_DATA STRING_ARG */
+#line 3317 "util/configparser.y"
{
OUTYY(("P(view_local_data:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->views->local_data, (yyvsp[0].str))) {
fatal_exit("out of memory adding local-data");
}
}
-#line 6654 "util/configparser.c"
+#line 6778 "util/configparser.c"
break;
- case 596: /* view_local_data_ptr: VAR_LOCAL_DATA_PTR STRING_ARG */
-#line 3259 "util/configparser.y"
+ case 608: /* view_local_data_ptr: VAR_LOCAL_DATA_PTR STRING_ARG */
+#line 3325 "util/configparser.y"
{
char* ptr;
OUTYY(("P(view_local_data_ptr:%s)\n", (yyvsp[0].str)));
@@ -6668,11 +6792,11 @@ yyreduce:
yyerror("local-data-ptr could not be reversed");
}
}
-#line 6672 "util/configparser.c"
+#line 6796 "util/configparser.c"
break;
- case 597: /* view_first: VAR_VIEW_FIRST STRING_ARG */
-#line 3274 "util/configparser.y"
+ case 609: /* view_first: VAR_VIEW_FIRST STRING_ARG */
+#line 3340 "util/configparser.y"
{
OUTYY(("P(view-first:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6680,20 +6804,20 @@ yyreduce:
else cfg_parser->cfg->views->isfirst=(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6684 "util/configparser.c"
+#line 6808 "util/configparser.c"
break;
- case 598: /* rcstart: VAR_REMOTE_CONTROL */
-#line 3283 "util/configparser.y"
+ case 610: /* rcstart: VAR_REMOTE_CONTROL */
+#line 3349 "util/configparser.y"
{
OUTYY(("\nP(remote-control:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 6693 "util/configparser.c"
+#line 6817 "util/configparser.c"
break;
- case 609: /* rc_control_enable: VAR_CONTROL_ENABLE STRING_ARG */
-#line 3295 "util/configparser.y"
+ case 621: /* rc_control_enable: VAR_CONTROL_ENABLE STRING_ARG */
+#line 3361 "util/configparser.y"
{
OUTYY(("P(control_enable:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6702,11 +6826,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6706 "util/configparser.c"
+#line 6830 "util/configparser.c"
break;
- case 610: /* rc_control_port: VAR_CONTROL_PORT STRING_ARG */
-#line 3305 "util/configparser.y"
+ case 622: /* rc_control_port: VAR_CONTROL_PORT STRING_ARG */
+#line 3371 "util/configparser.y"
{
OUTYY(("P(control_port:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -6714,80 +6838,80 @@ yyreduce:
else cfg_parser->cfg->control_port = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 6718 "util/configparser.c"
+#line 6842 "util/configparser.c"
break;
- case 611: /* rc_control_interface: VAR_CONTROL_INTERFACE STRING_ARG */
-#line 3314 "util/configparser.y"
+ case 623: /* rc_control_interface: VAR_CONTROL_INTERFACE STRING_ARG */
+#line 3380 "util/configparser.y"
{
OUTYY(("P(control_interface:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_append(&cfg_parser->cfg->control_ifs, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 6728 "util/configparser.c"
+#line 6852 "util/configparser.c"
break;
- case 612: /* rc_control_use_cert: VAR_CONTROL_USE_CERT STRING_ARG */
-#line 3321 "util/configparser.y"
+ case 624: /* rc_control_use_cert: VAR_CONTROL_USE_CERT STRING_ARG */
+#line 3387 "util/configparser.y"
{
OUTYY(("P(control_use_cert:%s)\n", (yyvsp[0].str)));
cfg_parser->cfg->control_use_cert = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6738 "util/configparser.c"
+#line 6862 "util/configparser.c"
break;
- case 613: /* rc_server_key_file: VAR_SERVER_KEY_FILE STRING_ARG */
-#line 3328 "util/configparser.y"
+ case 625: /* rc_server_key_file: VAR_SERVER_KEY_FILE STRING_ARG */
+#line 3394 "util/configparser.y"
{
OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->server_key_file);
cfg_parser->cfg->server_key_file = (yyvsp[0].str);
}
-#line 6748 "util/configparser.c"
+#line 6872 "util/configparser.c"
break;
- case 614: /* rc_server_cert_file: VAR_SERVER_CERT_FILE STRING_ARG */
-#line 3335 "util/configparser.y"
+ case 626: /* rc_server_cert_file: VAR_SERVER_CERT_FILE STRING_ARG */
+#line 3401 "util/configparser.y"
{
OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->server_cert_file);
cfg_parser->cfg->server_cert_file = (yyvsp[0].str);
}
-#line 6758 "util/configparser.c"
+#line 6882 "util/configparser.c"
break;
- case 615: /* rc_control_key_file: VAR_CONTROL_KEY_FILE STRING_ARG */
-#line 3342 "util/configparser.y"
+ case 627: /* rc_control_key_file: VAR_CONTROL_KEY_FILE STRING_ARG */
+#line 3408 "util/configparser.y"
{
OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->control_key_file);
cfg_parser->cfg->control_key_file = (yyvsp[0].str);
}
-#line 6768 "util/configparser.c"
+#line 6892 "util/configparser.c"
break;
- case 616: /* rc_control_cert_file: VAR_CONTROL_CERT_FILE STRING_ARG */
-#line 3349 "util/configparser.y"
+ case 628: /* rc_control_cert_file: VAR_CONTROL_CERT_FILE STRING_ARG */
+#line 3415 "util/configparser.y"
{
OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->control_cert_file);
cfg_parser->cfg->control_cert_file = (yyvsp[0].str);
}
-#line 6778 "util/configparser.c"
+#line 6902 "util/configparser.c"
break;
- case 617: /* dtstart: VAR_DNSTAP */
-#line 3356 "util/configparser.y"
+ case 629: /* dtstart: VAR_DNSTAP */
+#line 3422 "util/configparser.y"
{
OUTYY(("\nP(dnstap:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 6787 "util/configparser.c"
+#line 6911 "util/configparser.c"
break;
- case 639: /* dt_dnstap_enable: VAR_DNSTAP_ENABLE STRING_ARG */
-#line 3377 "util/configparser.y"
+ case 651: /* dt_dnstap_enable: VAR_DNSTAP_ENABLE STRING_ARG */
+#line 3443 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_enable:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6795,11 +6919,11 @@ yyreduce:
else cfg_parser->cfg->dnstap = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6799 "util/configparser.c"
+#line 6923 "util/configparser.c"
break;
- case 640: /* dt_dnstap_bidirectional: VAR_DNSTAP_BIDIRECTIONAL STRING_ARG */
-#line 3386 "util/configparser.y"
+ case 652: /* dt_dnstap_bidirectional: VAR_DNSTAP_BIDIRECTIONAL STRING_ARG */
+#line 3452 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_bidirectional:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6808,31 +6932,31 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6812 "util/configparser.c"
+#line 6936 "util/configparser.c"
break;
- case 641: /* dt_dnstap_socket_path: VAR_DNSTAP_SOCKET_PATH STRING_ARG */
-#line 3396 "util/configparser.y"
+ case 653: /* dt_dnstap_socket_path: VAR_DNSTAP_SOCKET_PATH STRING_ARG */
+#line 3462 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_socket_path:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_socket_path);
cfg_parser->cfg->dnstap_socket_path = (yyvsp[0].str);
}
-#line 6822 "util/configparser.c"
+#line 6946 "util/configparser.c"
break;
- case 642: /* dt_dnstap_ip: VAR_DNSTAP_IP STRING_ARG */
-#line 3403 "util/configparser.y"
+ case 654: /* dt_dnstap_ip: VAR_DNSTAP_IP STRING_ARG */
+#line 3469 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_ip:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_ip);
cfg_parser->cfg->dnstap_ip = (yyvsp[0].str);
}
-#line 6832 "util/configparser.c"
+#line 6956 "util/configparser.c"
break;
- case 643: /* dt_dnstap_tls: VAR_DNSTAP_TLS STRING_ARG */
-#line 3410 "util/configparser.y"
+ case 655: /* dt_dnstap_tls: VAR_DNSTAP_TLS STRING_ARG */
+#line 3476 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_tls:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6840,51 +6964,51 @@ yyreduce:
else cfg_parser->cfg->dnstap_tls = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6844 "util/configparser.c"
+#line 6968 "util/configparser.c"
break;
- case 644: /* dt_dnstap_tls_server_name: VAR_DNSTAP_TLS_SERVER_NAME STRING_ARG */
-#line 3419 "util/configparser.y"
+ case 656: /* dt_dnstap_tls_server_name: VAR_DNSTAP_TLS_SERVER_NAME STRING_ARG */
+#line 3485 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_tls_server_name:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_tls_server_name);
cfg_parser->cfg->dnstap_tls_server_name = (yyvsp[0].str);
}
-#line 6854 "util/configparser.c"
+#line 6978 "util/configparser.c"
break;
- case 645: /* dt_dnstap_tls_cert_bundle: VAR_DNSTAP_TLS_CERT_BUNDLE STRING_ARG */
-#line 3426 "util/configparser.y"
+ case 657: /* dt_dnstap_tls_cert_bundle: VAR_DNSTAP_TLS_CERT_BUNDLE STRING_ARG */
+#line 3492 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_tls_cert_bundle:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_tls_cert_bundle);
cfg_parser->cfg->dnstap_tls_cert_bundle = (yyvsp[0].str);
}
-#line 6864 "util/configparser.c"
+#line 6988 "util/configparser.c"
break;
- case 646: /* dt_dnstap_tls_client_key_file: VAR_DNSTAP_TLS_CLIENT_KEY_FILE STRING_ARG */
-#line 3433 "util/configparser.y"
+ case 658: /* dt_dnstap_tls_client_key_file: VAR_DNSTAP_TLS_CLIENT_KEY_FILE STRING_ARG */
+#line 3499 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_tls_client_key_file:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_tls_client_key_file);
cfg_parser->cfg->dnstap_tls_client_key_file = (yyvsp[0].str);
}
-#line 6874 "util/configparser.c"
+#line 6998 "util/configparser.c"
break;
- case 647: /* dt_dnstap_tls_client_cert_file: VAR_DNSTAP_TLS_CLIENT_CERT_FILE STRING_ARG */
-#line 3440 "util/configparser.y"
+ case 659: /* dt_dnstap_tls_client_cert_file: VAR_DNSTAP_TLS_CLIENT_CERT_FILE STRING_ARG */
+#line 3506 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_tls_client_cert_file:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_tls_client_cert_file);
cfg_parser->cfg->dnstap_tls_client_cert_file = (yyvsp[0].str);
}
-#line 6884 "util/configparser.c"
+#line 7008 "util/configparser.c"
break;
- case 648: /* dt_dnstap_send_identity: VAR_DNSTAP_SEND_IDENTITY STRING_ARG */
-#line 3447 "util/configparser.y"
+ case 660: /* dt_dnstap_send_identity: VAR_DNSTAP_SEND_IDENTITY STRING_ARG */
+#line 3513 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_send_identity:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6892,11 +7016,11 @@ yyreduce:
else cfg_parser->cfg->dnstap_send_identity = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6896 "util/configparser.c"
+#line 7020 "util/configparser.c"
break;
- case 649: /* dt_dnstap_send_version: VAR_DNSTAP_SEND_VERSION STRING_ARG */
-#line 3456 "util/configparser.y"
+ case 661: /* dt_dnstap_send_version: VAR_DNSTAP_SEND_VERSION STRING_ARG */
+#line 3522 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_send_version:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6904,31 +7028,31 @@ yyreduce:
else cfg_parser->cfg->dnstap_send_version = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6908 "util/configparser.c"
+#line 7032 "util/configparser.c"
break;
- case 650: /* dt_dnstap_identity: VAR_DNSTAP_IDENTITY STRING_ARG */
-#line 3465 "util/configparser.y"
+ case 662: /* dt_dnstap_identity: VAR_DNSTAP_IDENTITY STRING_ARG */
+#line 3531 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_identity:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_identity);
cfg_parser->cfg->dnstap_identity = (yyvsp[0].str);
}
-#line 6918 "util/configparser.c"
+#line 7042 "util/configparser.c"
break;
- case 651: /* dt_dnstap_version: VAR_DNSTAP_VERSION STRING_ARG */
-#line 3472 "util/configparser.y"
+ case 663: /* dt_dnstap_version: VAR_DNSTAP_VERSION STRING_ARG */
+#line 3538 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_version:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnstap_version);
cfg_parser->cfg->dnstap_version = (yyvsp[0].str);
}
-#line 6928 "util/configparser.c"
+#line 7052 "util/configparser.c"
break;
- case 652: /* dt_dnstap_log_resolver_query_messages: VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES STRING_ARG */
-#line 3479 "util/configparser.y"
+ case 664: /* dt_dnstap_log_resolver_query_messages: VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES STRING_ARG */
+#line 3545 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_log_resolver_query_messages:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6937,11 +7061,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6941 "util/configparser.c"
+#line 7065 "util/configparser.c"
break;
- case 653: /* dt_dnstap_log_resolver_response_messages: VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES STRING_ARG */
-#line 3489 "util/configparser.y"
+ case 665: /* dt_dnstap_log_resolver_response_messages: VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES STRING_ARG */
+#line 3555 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_log_resolver_response_messages:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6950,11 +7074,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6954 "util/configparser.c"
+#line 7078 "util/configparser.c"
break;
- case 654: /* dt_dnstap_log_client_query_messages: VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES STRING_ARG */
-#line 3499 "util/configparser.y"
+ case 666: /* dt_dnstap_log_client_query_messages: VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES STRING_ARG */
+#line 3565 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_log_client_query_messages:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6963,11 +7087,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6967 "util/configparser.c"
+#line 7091 "util/configparser.c"
break;
- case 655: /* dt_dnstap_log_client_response_messages: VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES STRING_ARG */
-#line 3509 "util/configparser.y"
+ case 667: /* dt_dnstap_log_client_response_messages: VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES STRING_ARG */
+#line 3575 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_log_client_response_messages:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6976,11 +7100,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6980 "util/configparser.c"
+#line 7104 "util/configparser.c"
break;
- case 656: /* dt_dnstap_log_forwarder_query_messages: VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES STRING_ARG */
-#line 3519 "util/configparser.y"
+ case 668: /* dt_dnstap_log_forwarder_query_messages: VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES STRING_ARG */
+#line 3585 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_log_forwarder_query_messages:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -6989,11 +7113,11 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 6993 "util/configparser.c"
+#line 7117 "util/configparser.c"
break;
- case 657: /* dt_dnstap_log_forwarder_response_messages: VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES STRING_ARG */
-#line 3529 "util/configparser.y"
+ case 669: /* dt_dnstap_log_forwarder_response_messages: VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES STRING_ARG */
+#line 3595 "util/configparser.y"
{
OUTYY(("P(dt_dnstap_log_forwarder_response_messages:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -7002,49 +7126,49 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 7006 "util/configparser.c"
+#line 7130 "util/configparser.c"
break;
- case 658: /* pythonstart: VAR_PYTHON */
-#line 3539 "util/configparser.y"
+ case 670: /* pythonstart: VAR_PYTHON */
+#line 3605 "util/configparser.y"
{
OUTYY(("\nP(python:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 7015 "util/configparser.c"
+#line 7139 "util/configparser.c"
break;
- case 662: /* py_script: VAR_PYTHON_SCRIPT STRING_ARG */
-#line 3549 "util/configparser.y"
+ case 674: /* py_script: VAR_PYTHON_SCRIPT STRING_ARG */
+#line 3615 "util/configparser.y"
{
OUTYY(("P(python-script:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_append_ex(&cfg_parser->cfg->python_script, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 7025 "util/configparser.c"
+#line 7149 "util/configparser.c"
break;
- case 663: /* dynlibstart: VAR_DYNLIB */
-#line 3556 "util/configparser.y"
+ case 675: /* dynlibstart: VAR_DYNLIB */
+#line 3622 "util/configparser.y"
{
OUTYY(("\nP(dynlib:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 7034 "util/configparser.c"
+#line 7158 "util/configparser.c"
break;
- case 667: /* dl_file: VAR_DYNLIB_FILE STRING_ARG */
-#line 3566 "util/configparser.y"
+ case 679: /* dl_file: VAR_DYNLIB_FILE STRING_ARG */
+#line 3632 "util/configparser.y"
{
OUTYY(("P(dynlib-file:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_append_ex(&cfg_parser->cfg->dynlib_file, (yyvsp[0].str)))
yyerror("out of memory");
}
-#line 7044 "util/configparser.c"
+#line 7168 "util/configparser.c"
break;
- case 668: /* server_disable_dnssec_lame_check: VAR_DISABLE_DNSSEC_LAME_CHECK STRING_ARG */
-#line 3573 "util/configparser.y"
+ case 680: /* server_disable_dnssec_lame_check: VAR_DISABLE_DNSSEC_LAME_CHECK STRING_ARG */
+#line 3639 "util/configparser.y"
{
OUTYY(("P(disable_dnssec_lame_check:%s)\n", (yyvsp[0].str)));
if (strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -7053,21 +7177,21 @@ yyreduce:
(strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 7057 "util/configparser.c"
+#line 7181 "util/configparser.c"
break;
- case 669: /* server_log_identity: VAR_LOG_IDENTITY STRING_ARG */
-#line 3583 "util/configparser.y"
+ case 681: /* server_log_identity: VAR_LOG_IDENTITY STRING_ARG */
+#line 3649 "util/configparser.y"
{
OUTYY(("P(server_log_identity:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->log_identity);
cfg_parser->cfg->log_identity = (yyvsp[0].str);
}
-#line 7067 "util/configparser.c"
+#line 7191 "util/configparser.c"
break;
- case 670: /* server_response_ip: VAR_RESPONSE_IP STRING_ARG STRING_ARG */
-#line 3590 "util/configparser.y"
+ case 682: /* server_response_ip: VAR_RESPONSE_IP STRING_ARG STRING_ARG */
+#line 3656 "util/configparser.y"
{
OUTYY(("P(server_response_ip:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
validate_respip_action((yyvsp[0].str));
@@ -7075,31 +7199,31 @@ yyreduce:
(yyvsp[-1].str), (yyvsp[0].str)))
fatal_exit("out of memory adding response-ip");
}
-#line 7079 "util/configparser.c"
+#line 7203 "util/configparser.c"
break;
- case 671: /* server_response_ip_data: VAR_RESPONSE_IP_DATA STRING_ARG STRING_ARG */
-#line 3599 "util/configparser.y"
+ case 683: /* server_response_ip_data: VAR_RESPONSE_IP_DATA STRING_ARG STRING_ARG */
+#line 3665 "util/configparser.y"
{
OUTYY(("P(server_response_ip_data:%s)\n", (yyvsp[-1].str)));
if(!cfg_str2list_insert(&cfg_parser->cfg->respip_data,
(yyvsp[-1].str), (yyvsp[0].str)))
fatal_exit("out of memory adding response-ip-data");
}
-#line 7090 "util/configparser.c"
+#line 7214 "util/configparser.c"
break;
- case 672: /* dnscstart: VAR_DNSCRYPT */
-#line 3607 "util/configparser.y"
+ case 684: /* dnscstart: VAR_DNSCRYPT */
+#line 3673 "util/configparser.y"
{
OUTYY(("\nP(dnscrypt:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 7099 "util/configparser.c"
+#line 7223 "util/configparser.c"
break;
- case 685: /* dnsc_dnscrypt_enable: VAR_DNSCRYPT_ENABLE STRING_ARG */
-#line 3624 "util/configparser.y"
+ case 697: /* dnsc_dnscrypt_enable: VAR_DNSCRYPT_ENABLE STRING_ARG */
+#line 3690 "util/configparser.y"
{
OUTYY(("P(dnsc_dnscrypt_enable:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -7107,11 +7231,11 @@ yyreduce:
else cfg_parser->cfg->dnscrypt = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 7111 "util/configparser.c"
+#line 7235 "util/configparser.c"
break;
- case 686: /* dnsc_dnscrypt_port: VAR_DNSCRYPT_PORT STRING_ARG */
-#line 3633 "util/configparser.y"
+ case 698: /* dnsc_dnscrypt_port: VAR_DNSCRYPT_PORT STRING_ARG */
+#line 3699 "util/configparser.y"
{
OUTYY(("P(dnsc_dnscrypt_port:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0)
@@ -7119,21 +7243,21 @@ yyreduce:
else cfg_parser->cfg->dnscrypt_port = atoi((yyvsp[0].str));
free((yyvsp[0].str));
}
-#line 7123 "util/configparser.c"
+#line 7247 "util/configparser.c"
break;
- case 687: /* dnsc_dnscrypt_provider: VAR_DNSCRYPT_PROVIDER STRING_ARG */
-#line 3642 "util/configparser.y"
+ case 699: /* dnsc_dnscrypt_provider: VAR_DNSCRYPT_PROVIDER STRING_ARG */
+#line 3708 "util/configparser.y"
{
OUTYY(("P(dnsc_dnscrypt_provider:%s)\n", (yyvsp[0].str)));
free(cfg_parser->cfg->dnscrypt_provider);
cfg_parser->cfg->dnscrypt_provider = (yyvsp[0].str);
}
-#line 7133 "util/configparser.c"
+#line 7257 "util/configparser.c"
break;
- case 688: /* dnsc_dnscrypt_provider_cert: VAR_DNSCRYPT_PROVIDER_CERT STRING_ARG */
-#line 3649 "util/configparser.y"
+ case 700: /* dnsc_dnscrypt_provider_cert: VAR_DNSCRYPT_PROVIDER_CERT STRING_ARG */
+#line 3715 "util/configparser.y"
{
OUTYY(("P(dnsc_dnscrypt_provider_cert:%s)\n", (yyvsp[0].str)));
if(cfg_strlist_find(cfg_parser->cfg->dnscrypt_provider_cert, (yyvsp[0].str)))
@@ -7141,21 +7265,21 @@ yyreduce:
if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert, (yyvsp[0].str)))
fatal_exit("out of memory adding dnscrypt-provider-cert");
}
-#line 7145 "util/configparser.c"
+#line 7269 "util/configparser.c"
break;
- case 689: /* dnsc_dnscrypt_provider_cert_rotated: VAR_DNSCRYPT_PROVIDER_CERT_ROTATED STRING_ARG */
-#line 3658 "util/configparser.y"
+ case 701: /* dnsc_dnscrypt_provider_cert_rotated: VAR_DNSCRYPT_PROVIDER_CERT_ROTATED STRING_ARG */
+#line 3724 "util/configparser.y"
{
OUTYY(("P(dnsc_dnscrypt_provider_cert_rotated:%s)\n", (yyvsp[0].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert_rotated, (yyvsp[0].str)))
fatal_exit("out of memory adding dnscrypt-provider-cert-rotated");
}
-#line 7155 "util/configparser.c"
+#line 7279 "util/configparser.c"
break;
- case 690: /* dnsc_dnscrypt_secret_key: VAR_DNSCRYPT_SECRET_KEY STRING_ARG */
-#line 3665 "util/configparser.y"
+ case 702: /* dnsc_dnscrypt_secret_key: VAR_DNSCRYPT_SECRET_KEY STRING_ARG */
+#line 3731 "util/configparser.y"
{
OUTYY(("P(dnsc_dnscrypt_secret_key:%s)\n", (yyvsp[0].str)));
if(cfg_strlist_find(cfg_parser->cfg->dnscrypt_secret_key, (yyvsp[0].str)))
@@ -7163,22 +7287,22 @@ yyreduce:
if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_secret_key, (yyvsp[0].str)))
fatal_exit("out of memory adding dnscrypt-secret-key");
}
-#line 7167 "util/configparser.c"
+#line 7291 "util/configparser.c"
break;
- case 691: /* dnsc_dnscrypt_shared_secret_cache_size: VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE STRING_ARG */
-#line 3674 "util/configparser.y"
+ case 703: /* dnsc_dnscrypt_shared_secret_cache_size: VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE STRING_ARG */
+#line 3740 "util/configparser.y"
{
OUTYY(("P(dnscrypt_shared_secret_cache_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->dnscrypt_shared_secret_cache_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 7178 "util/configparser.c"
+#line 7302 "util/configparser.c"
break;
- case 692: /* dnsc_dnscrypt_shared_secret_cache_slabs: VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS STRING_ARG */
-#line 3682 "util/configparser.y"
+ case 704: /* dnsc_dnscrypt_shared_secret_cache_slabs: VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS STRING_ARG */
+#line 3748 "util/configparser.y"
{
OUTYY(("P(dnscrypt_shared_secret_cache_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -7190,22 +7314,22 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 7194 "util/configparser.c"
+#line 7318 "util/configparser.c"
break;
- case 693: /* dnsc_dnscrypt_nonce_cache_size: VAR_DNSCRYPT_NONCE_CACHE_SIZE STRING_ARG */
-#line 3695 "util/configparser.y"
+ case 705: /* dnsc_dnscrypt_nonce_cache_size: VAR_DNSCRYPT_NONCE_CACHE_SIZE STRING_ARG */
+#line 3761 "util/configparser.y"
{
OUTYY(("P(dnscrypt_nonce_cache_size:%s)\n", (yyvsp[0].str)));
if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->dnscrypt_nonce_cache_size))
yyerror("memory size expected");
free((yyvsp[0].str));
}
-#line 7205 "util/configparser.c"
+#line 7329 "util/configparser.c"
break;
- case 694: /* dnsc_dnscrypt_nonce_cache_slabs: VAR_DNSCRYPT_NONCE_CACHE_SLABS STRING_ARG */
-#line 3703 "util/configparser.y"
+ case 706: /* dnsc_dnscrypt_nonce_cache_slabs: VAR_DNSCRYPT_NONCE_CACHE_SLABS STRING_ARG */
+#line 3769 "util/configparser.y"
{
OUTYY(("P(dnscrypt_nonce_cache_slabs:%s)\n", (yyvsp[0].str)));
if(atoi((yyvsp[0].str)) == 0) {
@@ -7217,20 +7341,20 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 7221 "util/configparser.c"
+#line 7345 "util/configparser.c"
break;
- case 695: /* cachedbstart: VAR_CACHEDB */
-#line 3716 "util/configparser.y"
+ case 707: /* cachedbstart: VAR_CACHEDB */
+#line 3782 "util/configparser.y"
{
OUTYY(("\nP(cachedb:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 7230 "util/configparser.c"
+#line 7354 "util/configparser.c"
break;
- case 708: /* cachedb_backend_name: VAR_CACHEDB_BACKEND STRING_ARG */
-#line 3729 "util/configparser.y"
+ case 721: /* cachedb_backend_name: VAR_CACHEDB_BACKEND STRING_ARG */
+#line 3795 "util/configparser.y"
{
#ifdef USE_CACHEDB
OUTYY(("P(backend:%s)\n", (yyvsp[0].str)));
@@ -7241,11 +7365,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7245 "util/configparser.c"
+#line 7369 "util/configparser.c"
break;
- case 709: /* cachedb_secret_seed: VAR_CACHEDB_SECRETSEED STRING_ARG */
-#line 3741 "util/configparser.y"
+ case 722: /* cachedb_secret_seed: VAR_CACHEDB_SECRETSEED STRING_ARG */
+#line 3807 "util/configparser.y"
{
#ifdef USE_CACHEDB
OUTYY(("P(secret-seed:%s)\n", (yyvsp[0].str)));
@@ -7256,11 +7380,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7260 "util/configparser.c"
+#line 7384 "util/configparser.c"
break;
- case 710: /* cachedb_no_store: VAR_CACHEDB_NO_STORE STRING_ARG */
-#line 3753 "util/configparser.y"
+ case 723: /* cachedb_no_store: VAR_CACHEDB_NO_STORE STRING_ARG */
+#line 3819 "util/configparser.y"
{
#ifdef USE_CACHEDB
OUTYY(("P(cachedb_no_store:%s)\n", (yyvsp[0].str)));
@@ -7272,11 +7396,27 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 7276 "util/configparser.c"
+#line 7400 "util/configparser.c"
break;
- case 711: /* redis_server_host: VAR_CACHEDB_REDISHOST STRING_ARG */
-#line 3766 "util/configparser.y"
+ case 724: /* cachedb_check_when_serve_expired: VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED STRING_ARG */
+#line 3832 "util/configparser.y"
+ {
+ #ifdef USE_CACHEDB
+ OUTYY(("P(cachedb_check_when_serve_expired:%s)\n", (yyvsp[0].str)));
+ if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
+ yyerror("expected yes or no.");
+ else cfg_parser->cfg->cachedb_check_when_serve_expired = (strcmp((yyvsp[0].str), "yes")==0);
+ #else
+ OUTYY(("P(Compiled without cachedb, ignoring)\n"));
+ #endif
+ free((yyvsp[0].str));
+ }
+#line 7416 "util/configparser.c"
+ break;
+
+ case 725: /* redis_server_host: VAR_CACHEDB_REDISHOST STRING_ARG */
+#line 3845 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
OUTYY(("P(redis_server_host:%s)\n", (yyvsp[0].str)));
@@ -7287,11 +7427,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7291 "util/configparser.c"
+#line 7431 "util/configparser.c"
break;
- case 712: /* redis_server_port: VAR_CACHEDB_REDISPORT STRING_ARG */
-#line 3778 "util/configparser.y"
+ case 726: /* redis_server_port: VAR_CACHEDB_REDISPORT STRING_ARG */
+#line 3857 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
int port;
@@ -7305,11 +7445,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 7309 "util/configparser.c"
+#line 7449 "util/configparser.c"
break;
- case 713: /* redis_server_path: VAR_CACHEDB_REDISPATH STRING_ARG */
-#line 3793 "util/configparser.y"
+ case 727: /* redis_server_path: VAR_CACHEDB_REDISPATH STRING_ARG */
+#line 3872 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
OUTYY(("P(redis_server_path:%s)\n", (yyvsp[0].str)));
@@ -7320,11 +7460,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7324 "util/configparser.c"
+#line 7464 "util/configparser.c"
break;
- case 714: /* redis_server_password: VAR_CACHEDB_REDISPASSWORD STRING_ARG */
-#line 3805 "util/configparser.y"
+ case 728: /* redis_server_password: VAR_CACHEDB_REDISPASSWORD STRING_ARG */
+#line 3884 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
OUTYY(("P(redis_server_password:%s)\n", (yyvsp[0].str)));
@@ -7335,11 +7475,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7339 "util/configparser.c"
+#line 7479 "util/configparser.c"
break;
- case 715: /* redis_timeout: VAR_CACHEDB_REDISTIMEOUT STRING_ARG */
-#line 3817 "util/configparser.y"
+ case 729: /* redis_timeout: VAR_CACHEDB_REDISTIMEOUT STRING_ARG */
+#line 3896 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
OUTYY(("P(redis_timeout:%s)\n", (yyvsp[0].str)));
@@ -7351,11 +7491,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 7355 "util/configparser.c"
+#line 7495 "util/configparser.c"
break;
- case 716: /* redis_expire_records: VAR_CACHEDB_REDISEXPIRERECORDS STRING_ARG */
-#line 3830 "util/configparser.y"
+ case 730: /* redis_expire_records: VAR_CACHEDB_REDISEXPIRERECORDS STRING_ARG */
+#line 3909 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
OUTYY(("P(redis_expire_records:%s)\n", (yyvsp[0].str)));
@@ -7367,11 +7507,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 7371 "util/configparser.c"
+#line 7511 "util/configparser.c"
break;
- case 717: /* redis_logical_db: VAR_CACHEDB_REDISLOGICALDB STRING_ARG */
-#line 3843 "util/configparser.y"
+ case 731: /* redis_logical_db: VAR_CACHEDB_REDISLOGICALDB STRING_ARG */
+#line 3922 "util/configparser.y"
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
int db;
@@ -7385,11 +7525,11 @@ yyreduce:
#endif
free((yyvsp[0].str));
}
-#line 7389 "util/configparser.c"
+#line 7529 "util/configparser.c"
break;
- case 718: /* server_tcp_connection_limit: VAR_TCP_CONNECTION_LIMIT STRING_ARG STRING_ARG */
-#line 3858 "util/configparser.y"
+ case 732: /* server_tcp_connection_limit: VAR_TCP_CONNECTION_LIMIT STRING_ARG STRING_ARG */
+#line 3937 "util/configparser.y"
{
OUTYY(("P(server_tcp_connection_limit:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
if (atoi((yyvsp[0].str)) < 0)
@@ -7399,11 +7539,11 @@ yyreduce:
fatal_exit("out of memory adding tcp connection limit");
}
}
-#line 7403 "util/configparser.c"
+#line 7543 "util/configparser.c"
break;
- case 719: /* server_answer_cookie: VAR_ANSWER_COOKIE STRING_ARG */
-#line 3869 "util/configparser.y"
+ case 733: /* server_answer_cookie: VAR_ANSWER_COOKIE STRING_ARG */
+#line 3948 "util/configparser.y"
{
OUTYY(("P(server_answer_cookie:%s)\n", (yyvsp[0].str)));
if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
@@ -7411,11 +7551,11 @@ yyreduce:
else cfg_parser->cfg->do_answer_cookie = (strcmp((yyvsp[0].str), "yes")==0);
free((yyvsp[0].str));
}
-#line 7415 "util/configparser.c"
+#line 7555 "util/configparser.c"
break;
- case 720: /* server_cookie_secret: VAR_COOKIE_SECRET STRING_ARG */
-#line 3878 "util/configparser.y"
+ case 734: /* server_cookie_secret: VAR_COOKIE_SECRET STRING_ARG */
+#line 3957 "util/configparser.y"
{
uint8_t secret[32];
size_t secret_len = sizeof(secret);
@@ -7430,20 +7570,20 @@ yyreduce:
}
free((yyvsp[0].str));
}
-#line 7434 "util/configparser.c"
+#line 7574 "util/configparser.c"
break;
- case 721: /* ipsetstart: VAR_IPSET */
-#line 3894 "util/configparser.y"
+ case 735: /* ipsetstart: VAR_IPSET */
+#line 3973 "util/configparser.y"
{
OUTYY(("\nP(ipset:)\n"));
cfg_parser->started_toplevel = 1;
}
-#line 7443 "util/configparser.c"
+#line 7583 "util/configparser.c"
break;
- case 726: /* ipset_name_v4: VAR_IPSET_NAME_V4 STRING_ARG */
-#line 3904 "util/configparser.y"
+ case 740: /* ipset_name_v4: VAR_IPSET_NAME_V4 STRING_ARG */
+#line 3983 "util/configparser.y"
{
#ifdef USE_IPSET
OUTYY(("P(name-v4:%s)\n", (yyvsp[0].str)));
@@ -7457,11 +7597,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7461 "util/configparser.c"
+#line 7601 "util/configparser.c"
break;
- case 727: /* ipset_name_v6: VAR_IPSET_NAME_V6 STRING_ARG */
-#line 3919 "util/configparser.y"
+ case 741: /* ipset_name_v6: VAR_IPSET_NAME_V6 STRING_ARG */
+#line 3998 "util/configparser.y"
{
#ifdef USE_IPSET
OUTYY(("P(name-v6:%s)\n", (yyvsp[0].str)));
@@ -7475,11 +7615,11 @@ yyreduce:
free((yyvsp[0].str));
#endif
}
-#line 7479 "util/configparser.c"
+#line 7619 "util/configparser.c"
break;
-#line 7483 "util/configparser.c"
+#line 7623 "util/configparser.c"
default: break;
}
@@ -7673,7 +7813,7 @@ yyreturn:
return yyresult;
}
-#line 3933 "util/configparser.y"
+#line 4012 "util/configparser.y"
/* parse helper routines could be here */
diff --git a/contrib/unbound/util/configparser.h b/contrib/unbound/util/configparser.h
index a285af866c52..cfb9e01cdcd5 100644
--- a/contrib/unbound/util/configparser.h
+++ b/contrib/unbound/util/configparser.h
@@ -278,129 +278,136 @@ extern int yydebug;
VAR_CAPS_WHITELIST = 479, /* VAR_CAPS_WHITELIST */
VAR_CACHE_MAX_NEGATIVE_TTL = 480, /* VAR_CACHE_MAX_NEGATIVE_TTL */
VAR_PERMIT_SMALL_HOLDDOWN = 481, /* VAR_PERMIT_SMALL_HOLDDOWN */
- VAR_QNAME_MINIMISATION = 482, /* VAR_QNAME_MINIMISATION */
- VAR_QNAME_MINIMISATION_STRICT = 483, /* VAR_QNAME_MINIMISATION_STRICT */
- VAR_IP_FREEBIND = 484, /* VAR_IP_FREEBIND */
- VAR_DEFINE_TAG = 485, /* VAR_DEFINE_TAG */
- VAR_LOCAL_ZONE_TAG = 486, /* VAR_LOCAL_ZONE_TAG */
- VAR_ACCESS_CONTROL_TAG = 487, /* VAR_ACCESS_CONTROL_TAG */
- VAR_LOCAL_ZONE_OVERRIDE = 488, /* VAR_LOCAL_ZONE_OVERRIDE */
- VAR_ACCESS_CONTROL_TAG_ACTION = 489, /* VAR_ACCESS_CONTROL_TAG_ACTION */
- VAR_ACCESS_CONTROL_TAG_DATA = 490, /* VAR_ACCESS_CONTROL_TAG_DATA */
- VAR_VIEW = 491, /* VAR_VIEW */
- VAR_ACCESS_CONTROL_VIEW = 492, /* VAR_ACCESS_CONTROL_VIEW */
- VAR_VIEW_FIRST = 493, /* VAR_VIEW_FIRST */
- VAR_SERVE_EXPIRED = 494, /* VAR_SERVE_EXPIRED */
- VAR_SERVE_EXPIRED_TTL = 495, /* VAR_SERVE_EXPIRED_TTL */
- VAR_SERVE_EXPIRED_TTL_RESET = 496, /* VAR_SERVE_EXPIRED_TTL_RESET */
- VAR_SERVE_EXPIRED_REPLY_TTL = 497, /* VAR_SERVE_EXPIRED_REPLY_TTL */
- VAR_SERVE_EXPIRED_CLIENT_TIMEOUT = 498, /* VAR_SERVE_EXPIRED_CLIENT_TIMEOUT */
- VAR_EDE_SERVE_EXPIRED = 499, /* VAR_EDE_SERVE_EXPIRED */
- VAR_SERVE_ORIGINAL_TTL = 500, /* VAR_SERVE_ORIGINAL_TTL */
- VAR_FAKE_DSA = 501, /* VAR_FAKE_DSA */
- VAR_FAKE_SHA1 = 502, /* VAR_FAKE_SHA1 */
- VAR_LOG_IDENTITY = 503, /* VAR_LOG_IDENTITY */
- VAR_HIDE_TRUSTANCHOR = 504, /* VAR_HIDE_TRUSTANCHOR */
- VAR_HIDE_HTTP_USER_AGENT = 505, /* VAR_HIDE_HTTP_USER_AGENT */
- VAR_HTTP_USER_AGENT = 506, /* VAR_HTTP_USER_AGENT */
- VAR_TRUST_ANCHOR_SIGNALING = 507, /* VAR_TRUST_ANCHOR_SIGNALING */
- VAR_AGGRESSIVE_NSEC = 508, /* VAR_AGGRESSIVE_NSEC */
- VAR_USE_SYSTEMD = 509, /* VAR_USE_SYSTEMD */
- VAR_SHM_ENABLE = 510, /* VAR_SHM_ENABLE */
- VAR_SHM_KEY = 511, /* VAR_SHM_KEY */
- VAR_ROOT_KEY_SENTINEL = 512, /* VAR_ROOT_KEY_SENTINEL */
- VAR_DNSCRYPT = 513, /* VAR_DNSCRYPT */
- VAR_DNSCRYPT_ENABLE = 514, /* VAR_DNSCRYPT_ENABLE */
- VAR_DNSCRYPT_PORT = 515, /* VAR_DNSCRYPT_PORT */
- VAR_DNSCRYPT_PROVIDER = 516, /* VAR_DNSCRYPT_PROVIDER */
- VAR_DNSCRYPT_SECRET_KEY = 517, /* VAR_DNSCRYPT_SECRET_KEY */
- VAR_DNSCRYPT_PROVIDER_CERT = 518, /* VAR_DNSCRYPT_PROVIDER_CERT */
- VAR_DNSCRYPT_PROVIDER_CERT_ROTATED = 519, /* VAR_DNSCRYPT_PROVIDER_CERT_ROTATED */
- VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE = 520, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE */
- VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS = 521, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS */
- VAR_DNSCRYPT_NONCE_CACHE_SIZE = 522, /* VAR_DNSCRYPT_NONCE_CACHE_SIZE */
- VAR_DNSCRYPT_NONCE_CACHE_SLABS = 523, /* VAR_DNSCRYPT_NONCE_CACHE_SLABS */
- VAR_PAD_RESPONSES = 524, /* VAR_PAD_RESPONSES */
- VAR_PAD_RESPONSES_BLOCK_SIZE = 525, /* VAR_PAD_RESPONSES_BLOCK_SIZE */
- VAR_PAD_QUERIES = 526, /* VAR_PAD_QUERIES */
- VAR_PAD_QUERIES_BLOCK_SIZE = 527, /* VAR_PAD_QUERIES_BLOCK_SIZE */
- VAR_IPSECMOD_ENABLED = 528, /* VAR_IPSECMOD_ENABLED */
- VAR_IPSECMOD_HOOK = 529, /* VAR_IPSECMOD_HOOK */
- VAR_IPSECMOD_IGNORE_BOGUS = 530, /* VAR_IPSECMOD_IGNORE_BOGUS */
- VAR_IPSECMOD_MAX_TTL = 531, /* VAR_IPSECMOD_MAX_TTL */
- VAR_IPSECMOD_WHITELIST = 532, /* VAR_IPSECMOD_WHITELIST */
- VAR_IPSECMOD_STRICT = 533, /* VAR_IPSECMOD_STRICT */
- VAR_CACHEDB = 534, /* VAR_CACHEDB */
- VAR_CACHEDB_BACKEND = 535, /* VAR_CACHEDB_BACKEND */
- VAR_CACHEDB_SECRETSEED = 536, /* VAR_CACHEDB_SECRETSEED */
- VAR_CACHEDB_REDISHOST = 537, /* VAR_CACHEDB_REDISHOST */
- VAR_CACHEDB_REDISPORT = 538, /* VAR_CACHEDB_REDISPORT */
- VAR_CACHEDB_REDISTIMEOUT = 539, /* VAR_CACHEDB_REDISTIMEOUT */
- VAR_CACHEDB_REDISEXPIRERECORDS = 540, /* VAR_CACHEDB_REDISEXPIRERECORDS */
- VAR_CACHEDB_REDISPATH = 541, /* VAR_CACHEDB_REDISPATH */
- VAR_CACHEDB_REDISPASSWORD = 542, /* VAR_CACHEDB_REDISPASSWORD */
- VAR_CACHEDB_REDISLOGICALDB = 543, /* VAR_CACHEDB_REDISLOGICALDB */
- VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM = 544, /* VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM */
- VAR_FOR_UPSTREAM = 545, /* VAR_FOR_UPSTREAM */
- VAR_AUTH_ZONE = 546, /* VAR_AUTH_ZONE */
- VAR_ZONEFILE = 547, /* VAR_ZONEFILE */
- VAR_MASTER = 548, /* VAR_MASTER */
- VAR_URL = 549, /* VAR_URL */
- VAR_FOR_DOWNSTREAM = 550, /* VAR_FOR_DOWNSTREAM */
- VAR_FALLBACK_ENABLED = 551, /* VAR_FALLBACK_ENABLED */
- VAR_TLS_ADDITIONAL_PORT = 552, /* VAR_TLS_ADDITIONAL_PORT */
- VAR_LOW_RTT = 553, /* VAR_LOW_RTT */
- VAR_LOW_RTT_PERMIL = 554, /* VAR_LOW_RTT_PERMIL */
- VAR_FAST_SERVER_PERMIL = 555, /* VAR_FAST_SERVER_PERMIL */
- VAR_FAST_SERVER_NUM = 556, /* VAR_FAST_SERVER_NUM */
- VAR_ALLOW_NOTIFY = 557, /* VAR_ALLOW_NOTIFY */
- VAR_TLS_WIN_CERT = 558, /* VAR_TLS_WIN_CERT */
- VAR_TCP_CONNECTION_LIMIT = 559, /* VAR_TCP_CONNECTION_LIMIT */
- VAR_ANSWER_COOKIE = 560, /* VAR_ANSWER_COOKIE */
- VAR_COOKIE_SECRET = 561, /* VAR_COOKIE_SECRET */
- VAR_IP_RATELIMIT_COOKIE = 562, /* VAR_IP_RATELIMIT_COOKIE */
- VAR_FORWARD_NO_CACHE = 563, /* VAR_FORWARD_NO_CACHE */
- VAR_STUB_NO_CACHE = 564, /* VAR_STUB_NO_CACHE */
- VAR_LOG_SERVFAIL = 565, /* VAR_LOG_SERVFAIL */
- VAR_DENY_ANY = 566, /* VAR_DENY_ANY */
- VAR_UNKNOWN_SERVER_TIME_LIMIT = 567, /* VAR_UNKNOWN_SERVER_TIME_LIMIT */
- VAR_LOG_TAG_QUERYREPLY = 568, /* VAR_LOG_TAG_QUERYREPLY */
- VAR_STREAM_WAIT_SIZE = 569, /* VAR_STREAM_WAIT_SIZE */
- VAR_TLS_CIPHERS = 570, /* VAR_TLS_CIPHERS */
- VAR_TLS_CIPHERSUITES = 571, /* VAR_TLS_CIPHERSUITES */
- VAR_TLS_USE_SNI = 572, /* VAR_TLS_USE_SNI */
- VAR_IPSET = 573, /* VAR_IPSET */
- VAR_IPSET_NAME_V4 = 574, /* VAR_IPSET_NAME_V4 */
- VAR_IPSET_NAME_V6 = 575, /* VAR_IPSET_NAME_V6 */
- VAR_TLS_SESSION_TICKET_KEYS = 576, /* VAR_TLS_SESSION_TICKET_KEYS */
- VAR_RPZ = 577, /* VAR_RPZ */
- VAR_TAGS = 578, /* VAR_TAGS */
- VAR_RPZ_ACTION_OVERRIDE = 579, /* VAR_RPZ_ACTION_OVERRIDE */
- VAR_RPZ_CNAME_OVERRIDE = 580, /* VAR_RPZ_CNAME_OVERRIDE */
- VAR_RPZ_LOG = 581, /* VAR_RPZ_LOG */
- VAR_RPZ_LOG_NAME = 582, /* VAR_RPZ_LOG_NAME */
- VAR_DYNLIB = 583, /* VAR_DYNLIB */
- VAR_DYNLIB_FILE = 584, /* VAR_DYNLIB_FILE */
- VAR_EDNS_CLIENT_STRING = 585, /* VAR_EDNS_CLIENT_STRING */
- VAR_EDNS_CLIENT_STRING_OPCODE = 586, /* VAR_EDNS_CLIENT_STRING_OPCODE */
- VAR_NSID = 587, /* VAR_NSID */
- VAR_ZONEMD_PERMISSIVE_MODE = 588, /* VAR_ZONEMD_PERMISSIVE_MODE */
- VAR_ZONEMD_CHECK = 589, /* VAR_ZONEMD_CHECK */
- VAR_ZONEMD_REJECT_ABSENCE = 590, /* VAR_ZONEMD_REJECT_ABSENCE */
- VAR_RPZ_SIGNAL_NXDOMAIN_RA = 591, /* VAR_RPZ_SIGNAL_NXDOMAIN_RA */
- VAR_INTERFACE_AUTOMATIC_PORTS = 592, /* VAR_INTERFACE_AUTOMATIC_PORTS */
- VAR_EDE = 593, /* VAR_EDE */
- VAR_INTERFACE_ACTION = 594, /* VAR_INTERFACE_ACTION */
- VAR_INTERFACE_VIEW = 595, /* VAR_INTERFACE_VIEW */
- VAR_INTERFACE_TAG = 596, /* VAR_INTERFACE_TAG */
- VAR_INTERFACE_TAG_ACTION = 597, /* VAR_INTERFACE_TAG_ACTION */
- VAR_INTERFACE_TAG_DATA = 598, /* VAR_INTERFACE_TAG_DATA */
- VAR_PROXY_PROTOCOL_PORT = 599, /* VAR_PROXY_PROTOCOL_PORT */
- VAR_STATISTICS_INHIBIT_ZERO = 600, /* VAR_STATISTICS_INHIBIT_ZERO */
- VAR_HARDEN_UNKNOWN_ADDITIONAL = 601, /* VAR_HARDEN_UNKNOWN_ADDITIONAL */
- VAR_DISABLE_EDNS_DO = 602, /* VAR_DISABLE_EDNS_DO */
- VAR_CACHEDB_NO_STORE = 603, /* VAR_CACHEDB_NO_STORE */
- VAR_LOG_DESTADDR = 604 /* VAR_LOG_DESTADDR */
+ VAR_CACHE_MIN_NEGATIVE_TTL = 482, /* VAR_CACHE_MIN_NEGATIVE_TTL */
+ VAR_QNAME_MINIMISATION = 483, /* VAR_QNAME_MINIMISATION */
+ VAR_QNAME_MINIMISATION_STRICT = 484, /* VAR_QNAME_MINIMISATION_STRICT */
+ VAR_IP_FREEBIND = 485, /* VAR_IP_FREEBIND */
+ VAR_DEFINE_TAG = 486, /* VAR_DEFINE_TAG */
+ VAR_LOCAL_ZONE_TAG = 487, /* VAR_LOCAL_ZONE_TAG */
+ VAR_ACCESS_CONTROL_TAG = 488, /* VAR_ACCESS_CONTROL_TAG */
+ VAR_LOCAL_ZONE_OVERRIDE = 489, /* VAR_LOCAL_ZONE_OVERRIDE */
+ VAR_ACCESS_CONTROL_TAG_ACTION = 490, /* VAR_ACCESS_CONTROL_TAG_ACTION */
+ VAR_ACCESS_CONTROL_TAG_DATA = 491, /* VAR_ACCESS_CONTROL_TAG_DATA */
+ VAR_VIEW = 492, /* VAR_VIEW */
+ VAR_ACCESS_CONTROL_VIEW = 493, /* VAR_ACCESS_CONTROL_VIEW */
+ VAR_VIEW_FIRST = 494, /* VAR_VIEW_FIRST */
+ VAR_SERVE_EXPIRED = 495, /* VAR_SERVE_EXPIRED */
+ VAR_SERVE_EXPIRED_TTL = 496, /* VAR_SERVE_EXPIRED_TTL */
+ VAR_SERVE_EXPIRED_TTL_RESET = 497, /* VAR_SERVE_EXPIRED_TTL_RESET */
+ VAR_SERVE_EXPIRED_REPLY_TTL = 498, /* VAR_SERVE_EXPIRED_REPLY_TTL */
+ VAR_SERVE_EXPIRED_CLIENT_TIMEOUT = 499, /* VAR_SERVE_EXPIRED_CLIENT_TIMEOUT */
+ VAR_EDE_SERVE_EXPIRED = 500, /* VAR_EDE_SERVE_EXPIRED */
+ VAR_SERVE_ORIGINAL_TTL = 501, /* VAR_SERVE_ORIGINAL_TTL */
+ VAR_FAKE_DSA = 502, /* VAR_FAKE_DSA */
+ VAR_FAKE_SHA1 = 503, /* VAR_FAKE_SHA1 */
+ VAR_LOG_IDENTITY = 504, /* VAR_LOG_IDENTITY */
+ VAR_HIDE_TRUSTANCHOR = 505, /* VAR_HIDE_TRUSTANCHOR */
+ VAR_HIDE_HTTP_USER_AGENT = 506, /* VAR_HIDE_HTTP_USER_AGENT */
+ VAR_HTTP_USER_AGENT = 507, /* VAR_HTTP_USER_AGENT */
+ VAR_TRUST_ANCHOR_SIGNALING = 508, /* VAR_TRUST_ANCHOR_SIGNALING */
+ VAR_AGGRESSIVE_NSEC = 509, /* VAR_AGGRESSIVE_NSEC */
+ VAR_USE_SYSTEMD = 510, /* VAR_USE_SYSTEMD */
+ VAR_SHM_ENABLE = 511, /* VAR_SHM_ENABLE */
+ VAR_SHM_KEY = 512, /* VAR_SHM_KEY */
+ VAR_ROOT_KEY_SENTINEL = 513, /* VAR_ROOT_KEY_SENTINEL */
+ VAR_DNSCRYPT = 514, /* VAR_DNSCRYPT */
+ VAR_DNSCRYPT_ENABLE = 515, /* VAR_DNSCRYPT_ENABLE */
+ VAR_DNSCRYPT_PORT = 516, /* VAR_DNSCRYPT_PORT */
+ VAR_DNSCRYPT_PROVIDER = 517, /* VAR_DNSCRYPT_PROVIDER */
+ VAR_DNSCRYPT_SECRET_KEY = 518, /* VAR_DNSCRYPT_SECRET_KEY */
+ VAR_DNSCRYPT_PROVIDER_CERT = 519, /* VAR_DNSCRYPT_PROVIDER_CERT */
+ VAR_DNSCRYPT_PROVIDER_CERT_ROTATED = 520, /* VAR_DNSCRYPT_PROVIDER_CERT_ROTATED */
+ VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE = 521, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE */
+ VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS = 522, /* VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS */
+ VAR_DNSCRYPT_NONCE_CACHE_SIZE = 523, /* VAR_DNSCRYPT_NONCE_CACHE_SIZE */
+ VAR_DNSCRYPT_NONCE_CACHE_SLABS = 524, /* VAR_DNSCRYPT_NONCE_CACHE_SLABS */
+ VAR_PAD_RESPONSES = 525, /* VAR_PAD_RESPONSES */
+ VAR_PAD_RESPONSES_BLOCK_SIZE = 526, /* VAR_PAD_RESPONSES_BLOCK_SIZE */
+ VAR_PAD_QUERIES = 527, /* VAR_PAD_QUERIES */
+ VAR_PAD_QUERIES_BLOCK_SIZE = 528, /* VAR_PAD_QUERIES_BLOCK_SIZE */
+ VAR_IPSECMOD_ENABLED = 529, /* VAR_IPSECMOD_ENABLED */
+ VAR_IPSECMOD_HOOK = 530, /* VAR_IPSECMOD_HOOK */
+ VAR_IPSECMOD_IGNORE_BOGUS = 531, /* VAR_IPSECMOD_IGNORE_BOGUS */
+ VAR_IPSECMOD_MAX_TTL = 532, /* VAR_IPSECMOD_MAX_TTL */
+ VAR_IPSECMOD_WHITELIST = 533, /* VAR_IPSECMOD_WHITELIST */
+ VAR_IPSECMOD_STRICT = 534, /* VAR_IPSECMOD_STRICT */
+ VAR_CACHEDB = 535, /* VAR_CACHEDB */
+ VAR_CACHEDB_BACKEND = 536, /* VAR_CACHEDB_BACKEND */
+ VAR_CACHEDB_SECRETSEED = 537, /* VAR_CACHEDB_SECRETSEED */
+ VAR_CACHEDB_REDISHOST = 538, /* VAR_CACHEDB_REDISHOST */
+ VAR_CACHEDB_REDISPORT = 539, /* VAR_CACHEDB_REDISPORT */
+ VAR_CACHEDB_REDISTIMEOUT = 540, /* VAR_CACHEDB_REDISTIMEOUT */
+ VAR_CACHEDB_REDISEXPIRERECORDS = 541, /* VAR_CACHEDB_REDISEXPIRERECORDS */
+ VAR_CACHEDB_REDISPATH = 542, /* VAR_CACHEDB_REDISPATH */
+ VAR_CACHEDB_REDISPASSWORD = 543, /* VAR_CACHEDB_REDISPASSWORD */
+ VAR_CACHEDB_REDISLOGICALDB = 544, /* VAR_CACHEDB_REDISLOGICALDB */
+ VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM = 545, /* VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM */
+ VAR_FOR_UPSTREAM = 546, /* VAR_FOR_UPSTREAM */
+ VAR_AUTH_ZONE = 547, /* VAR_AUTH_ZONE */
+ VAR_ZONEFILE = 548, /* VAR_ZONEFILE */
+ VAR_MASTER = 549, /* VAR_MASTER */
+ VAR_URL = 550, /* VAR_URL */
+ VAR_FOR_DOWNSTREAM = 551, /* VAR_FOR_DOWNSTREAM */
+ VAR_FALLBACK_ENABLED = 552, /* VAR_FALLBACK_ENABLED */
+ VAR_TLS_ADDITIONAL_PORT = 553, /* VAR_TLS_ADDITIONAL_PORT */
+ VAR_LOW_RTT = 554, /* VAR_LOW_RTT */
+ VAR_LOW_RTT_PERMIL = 555, /* VAR_LOW_RTT_PERMIL */
+ VAR_FAST_SERVER_PERMIL = 556, /* VAR_FAST_SERVER_PERMIL */
+ VAR_FAST_SERVER_NUM = 557, /* VAR_FAST_SERVER_NUM */
+ VAR_ALLOW_NOTIFY = 558, /* VAR_ALLOW_NOTIFY */
+ VAR_TLS_WIN_CERT = 559, /* VAR_TLS_WIN_CERT */
+ VAR_TCP_CONNECTION_LIMIT = 560, /* VAR_TCP_CONNECTION_LIMIT */
+ VAR_ANSWER_COOKIE = 561, /* VAR_ANSWER_COOKIE */
+ VAR_COOKIE_SECRET = 562, /* VAR_COOKIE_SECRET */
+ VAR_IP_RATELIMIT_COOKIE = 563, /* VAR_IP_RATELIMIT_COOKIE */
+ VAR_FORWARD_NO_CACHE = 564, /* VAR_FORWARD_NO_CACHE */
+ VAR_STUB_NO_CACHE = 565, /* VAR_STUB_NO_CACHE */
+ VAR_LOG_SERVFAIL = 566, /* VAR_LOG_SERVFAIL */
+ VAR_DENY_ANY = 567, /* VAR_DENY_ANY */
+ VAR_UNKNOWN_SERVER_TIME_LIMIT = 568, /* VAR_UNKNOWN_SERVER_TIME_LIMIT */
+ VAR_LOG_TAG_QUERYREPLY = 569, /* VAR_LOG_TAG_QUERYREPLY */
+ VAR_DISCARD_TIMEOUT = 570, /* VAR_DISCARD_TIMEOUT */
+ VAR_WAIT_LIMIT = 571, /* VAR_WAIT_LIMIT */
+ VAR_WAIT_LIMIT_COOKIE = 572, /* VAR_WAIT_LIMIT_COOKIE */
+ VAR_WAIT_LIMIT_NETBLOCK = 573, /* VAR_WAIT_LIMIT_NETBLOCK */
+ VAR_WAIT_LIMIT_COOKIE_NETBLOCK = 574, /* VAR_WAIT_LIMIT_COOKIE_NETBLOCK */
+ VAR_STREAM_WAIT_SIZE = 575, /* VAR_STREAM_WAIT_SIZE */
+ VAR_TLS_CIPHERS = 576, /* VAR_TLS_CIPHERS */
+ VAR_TLS_CIPHERSUITES = 577, /* VAR_TLS_CIPHERSUITES */
+ VAR_TLS_USE_SNI = 578, /* VAR_TLS_USE_SNI */
+ VAR_IPSET = 579, /* VAR_IPSET */
+ VAR_IPSET_NAME_V4 = 580, /* VAR_IPSET_NAME_V4 */
+ VAR_IPSET_NAME_V6 = 581, /* VAR_IPSET_NAME_V6 */
+ VAR_TLS_SESSION_TICKET_KEYS = 582, /* VAR_TLS_SESSION_TICKET_KEYS */
+ VAR_RPZ = 583, /* VAR_RPZ */
+ VAR_TAGS = 584, /* VAR_TAGS */
+ VAR_RPZ_ACTION_OVERRIDE = 585, /* VAR_RPZ_ACTION_OVERRIDE */
+ VAR_RPZ_CNAME_OVERRIDE = 586, /* VAR_RPZ_CNAME_OVERRIDE */
+ VAR_RPZ_LOG = 587, /* VAR_RPZ_LOG */
+ VAR_RPZ_LOG_NAME = 588, /* VAR_RPZ_LOG_NAME */
+ VAR_DYNLIB = 589, /* VAR_DYNLIB */
+ VAR_DYNLIB_FILE = 590, /* VAR_DYNLIB_FILE */
+ VAR_EDNS_CLIENT_STRING = 591, /* VAR_EDNS_CLIENT_STRING */
+ VAR_EDNS_CLIENT_STRING_OPCODE = 592, /* VAR_EDNS_CLIENT_STRING_OPCODE */
+ VAR_NSID = 593, /* VAR_NSID */
+ VAR_ZONEMD_PERMISSIVE_MODE = 594, /* VAR_ZONEMD_PERMISSIVE_MODE */
+ VAR_ZONEMD_CHECK = 595, /* VAR_ZONEMD_CHECK */
+ VAR_ZONEMD_REJECT_ABSENCE = 596, /* VAR_ZONEMD_REJECT_ABSENCE */
+ VAR_RPZ_SIGNAL_NXDOMAIN_RA = 597, /* VAR_RPZ_SIGNAL_NXDOMAIN_RA */
+ VAR_INTERFACE_AUTOMATIC_PORTS = 598, /* VAR_INTERFACE_AUTOMATIC_PORTS */
+ VAR_EDE = 599, /* VAR_EDE */
+ VAR_INTERFACE_ACTION = 600, /* VAR_INTERFACE_ACTION */
+ VAR_INTERFACE_VIEW = 601, /* VAR_INTERFACE_VIEW */
+ VAR_INTERFACE_TAG = 602, /* VAR_INTERFACE_TAG */
+ VAR_INTERFACE_TAG_ACTION = 603, /* VAR_INTERFACE_TAG_ACTION */
+ VAR_INTERFACE_TAG_DATA = 604, /* VAR_INTERFACE_TAG_DATA */
+ VAR_PROXY_PROTOCOL_PORT = 605, /* VAR_PROXY_PROTOCOL_PORT */
+ VAR_STATISTICS_INHIBIT_ZERO = 606, /* VAR_STATISTICS_INHIBIT_ZERO */
+ VAR_HARDEN_UNKNOWN_ADDITIONAL = 607, /* VAR_HARDEN_UNKNOWN_ADDITIONAL */
+ VAR_DISABLE_EDNS_DO = 608, /* VAR_DISABLE_EDNS_DO */
+ VAR_CACHEDB_NO_STORE = 609, /* VAR_CACHEDB_NO_STORE */
+ VAR_LOG_DESTADDR = 610, /* VAR_LOG_DESTADDR */
+ VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED = 611 /* VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED */
};
typedef enum yytokentype yytoken_kind_t;
#endif
@@ -633,129 +640,136 @@ extern int yydebug;
#define VAR_CAPS_WHITELIST 479
#define VAR_CACHE_MAX_NEGATIVE_TTL 480
#define VAR_PERMIT_SMALL_HOLDDOWN 481
-#define VAR_QNAME_MINIMISATION 482
-#define VAR_QNAME_MINIMISATION_STRICT 483
-#define VAR_IP_FREEBIND 484
-#define VAR_DEFINE_TAG 485
-#define VAR_LOCAL_ZONE_TAG 486
-#define VAR_ACCESS_CONTROL_TAG 487
-#define VAR_LOCAL_ZONE_OVERRIDE 488
-#define VAR_ACCESS_CONTROL_TAG_ACTION 489
-#define VAR_ACCESS_CONTROL_TAG_DATA 490
-#define VAR_VIEW 491
-#define VAR_ACCESS_CONTROL_VIEW 492
-#define VAR_VIEW_FIRST 493
-#define VAR_SERVE_EXPIRED 494
-#define VAR_SERVE_EXPIRED_TTL 495
-#define VAR_SERVE_EXPIRED_TTL_RESET 496
-#define VAR_SERVE_EXPIRED_REPLY_TTL 497
-#define VAR_SERVE_EXPIRED_CLIENT_TIMEOUT 498
-#define VAR_EDE_SERVE_EXPIRED 499
-#define VAR_SERVE_ORIGINAL_TTL 500
-#define VAR_FAKE_DSA 501
-#define VAR_FAKE_SHA1 502
-#define VAR_LOG_IDENTITY 503
-#define VAR_HIDE_TRUSTANCHOR 504
-#define VAR_HIDE_HTTP_USER_AGENT 505
-#define VAR_HTTP_USER_AGENT 506
-#define VAR_TRUST_ANCHOR_SIGNALING 507
-#define VAR_AGGRESSIVE_NSEC 508
-#define VAR_USE_SYSTEMD 509
-#define VAR_SHM_ENABLE 510
-#define VAR_SHM_KEY 511
-#define VAR_ROOT_KEY_SENTINEL 512
-#define VAR_DNSCRYPT 513
-#define VAR_DNSCRYPT_ENABLE 514
-#define VAR_DNSCRYPT_PORT 515
-#define VAR_DNSCRYPT_PROVIDER 516
-#define VAR_DNSCRYPT_SECRET_KEY 517
-#define VAR_DNSCRYPT_PROVIDER_CERT 518
-#define VAR_DNSCRYPT_PROVIDER_CERT_ROTATED 519
-#define VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE 520
-#define VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS 521
-#define VAR_DNSCRYPT_NONCE_CACHE_SIZE 522
-#define VAR_DNSCRYPT_NONCE_CACHE_SLABS 523
-#define VAR_PAD_RESPONSES 524
-#define VAR_PAD_RESPONSES_BLOCK_SIZE 525
-#define VAR_PAD_QUERIES 526
-#define VAR_PAD_QUERIES_BLOCK_SIZE 527
-#define VAR_IPSECMOD_ENABLED 528
-#define VAR_IPSECMOD_HOOK 529
-#define VAR_IPSECMOD_IGNORE_BOGUS 530
-#define VAR_IPSECMOD_MAX_TTL 531
-#define VAR_IPSECMOD_WHITELIST 532
-#define VAR_IPSECMOD_STRICT 533
-#define VAR_CACHEDB 534
-#define VAR_CACHEDB_BACKEND 535
-#define VAR_CACHEDB_SECRETSEED 536
-#define VAR_CACHEDB_REDISHOST 537
-#define VAR_CACHEDB_REDISPORT 538
-#define VAR_CACHEDB_REDISTIMEOUT 539
-#define VAR_CACHEDB_REDISEXPIRERECORDS 540
-#define VAR_CACHEDB_REDISPATH 541
-#define VAR_CACHEDB_REDISPASSWORD 542
-#define VAR_CACHEDB_REDISLOGICALDB 543
-#define VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM 544
-#define VAR_FOR_UPSTREAM 545
-#define VAR_AUTH_ZONE 546
-#define VAR_ZONEFILE 547
-#define VAR_MASTER 548
-#define VAR_URL 549
-#define VAR_FOR_DOWNSTREAM 550
-#define VAR_FALLBACK_ENABLED 551
-#define VAR_TLS_ADDITIONAL_PORT 552
-#define VAR_LOW_RTT 553
-#define VAR_LOW_RTT_PERMIL 554
-#define VAR_FAST_SERVER_PERMIL 555
-#define VAR_FAST_SERVER_NUM 556
-#define VAR_ALLOW_NOTIFY 557
-#define VAR_TLS_WIN_CERT 558
-#define VAR_TCP_CONNECTION_LIMIT 559
-#define VAR_ANSWER_COOKIE 560
-#define VAR_COOKIE_SECRET 561
-#define VAR_IP_RATELIMIT_COOKIE 562
-#define VAR_FORWARD_NO_CACHE 563
-#define VAR_STUB_NO_CACHE 564
-#define VAR_LOG_SERVFAIL 565
-#define VAR_DENY_ANY 566
-#define VAR_UNKNOWN_SERVER_TIME_LIMIT 567
-#define VAR_LOG_TAG_QUERYREPLY 568
-#define VAR_STREAM_WAIT_SIZE 569
-#define VAR_TLS_CIPHERS 570
-#define VAR_TLS_CIPHERSUITES 571
-#define VAR_TLS_USE_SNI 572
-#define VAR_IPSET 573
-#define VAR_IPSET_NAME_V4 574
-#define VAR_IPSET_NAME_V6 575
-#define VAR_TLS_SESSION_TICKET_KEYS 576
-#define VAR_RPZ 577
-#define VAR_TAGS 578
-#define VAR_RPZ_ACTION_OVERRIDE 579
-#define VAR_RPZ_CNAME_OVERRIDE 580
-#define VAR_RPZ_LOG 581
-#define VAR_RPZ_LOG_NAME 582
-#define VAR_DYNLIB 583
-#define VAR_DYNLIB_FILE 584
-#define VAR_EDNS_CLIENT_STRING 585
-#define VAR_EDNS_CLIENT_STRING_OPCODE 586
-#define VAR_NSID 587
-#define VAR_ZONEMD_PERMISSIVE_MODE 588
-#define VAR_ZONEMD_CHECK 589
-#define VAR_ZONEMD_REJECT_ABSENCE 590
-#define VAR_RPZ_SIGNAL_NXDOMAIN_RA 591
-#define VAR_INTERFACE_AUTOMATIC_PORTS 592
-#define VAR_EDE 593
-#define VAR_INTERFACE_ACTION 594
-#define VAR_INTERFACE_VIEW 595
-#define VAR_INTERFACE_TAG 596
-#define VAR_INTERFACE_TAG_ACTION 597
-#define VAR_INTERFACE_TAG_DATA 598
-#define VAR_PROXY_PROTOCOL_PORT 599
-#define VAR_STATISTICS_INHIBIT_ZERO 600
-#define VAR_HARDEN_UNKNOWN_ADDITIONAL 601
-#define VAR_DISABLE_EDNS_DO 602
-#define VAR_CACHEDB_NO_STORE 603
-#define VAR_LOG_DESTADDR 604
+#define VAR_CACHE_MIN_NEGATIVE_TTL 482
+#define VAR_QNAME_MINIMISATION 483
+#define VAR_QNAME_MINIMISATION_STRICT 484
+#define VAR_IP_FREEBIND 485
+#define VAR_DEFINE_TAG 486
+#define VAR_LOCAL_ZONE_TAG 487
+#define VAR_ACCESS_CONTROL_TAG 488
+#define VAR_LOCAL_ZONE_OVERRIDE 489
+#define VAR_ACCESS_CONTROL_TAG_ACTION 490
+#define VAR_ACCESS_CONTROL_TAG_DATA 491
+#define VAR_VIEW 492
+#define VAR_ACCESS_CONTROL_VIEW 493
+#define VAR_VIEW_FIRST 494
+#define VAR_SERVE_EXPIRED 495
+#define VAR_SERVE_EXPIRED_TTL 496
+#define VAR_SERVE_EXPIRED_TTL_RESET 497
+#define VAR_SERVE_EXPIRED_REPLY_TTL 498
+#define VAR_SERVE_EXPIRED_CLIENT_TIMEOUT 499
+#define VAR_EDE_SERVE_EXPIRED 500
+#define VAR_SERVE_ORIGINAL_TTL 501
+#define VAR_FAKE_DSA 502
+#define VAR_FAKE_SHA1 503
+#define VAR_LOG_IDENTITY 504
+#define VAR_HIDE_TRUSTANCHOR 505
+#define VAR_HIDE_HTTP_USER_AGENT 506
+#define VAR_HTTP_USER_AGENT 507
+#define VAR_TRUST_ANCHOR_SIGNALING 508
+#define VAR_AGGRESSIVE_NSEC 509
+#define VAR_USE_SYSTEMD 510
+#define VAR_SHM_ENABLE 511
+#define VAR_SHM_KEY 512
+#define VAR_ROOT_KEY_SENTINEL 513
+#define VAR_DNSCRYPT 514
+#define VAR_DNSCRYPT_ENABLE 515
+#define VAR_DNSCRYPT_PORT 516
+#define VAR_DNSCRYPT_PROVIDER 517
+#define VAR_DNSCRYPT_SECRET_KEY 518
+#define VAR_DNSCRYPT_PROVIDER_CERT 519
+#define VAR_DNSCRYPT_PROVIDER_CERT_ROTATED 520
+#define VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE 521
+#define VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS 522
+#define VAR_DNSCRYPT_NONCE_CACHE_SIZE 523
+#define VAR_DNSCRYPT_NONCE_CACHE_SLABS 524
+#define VAR_PAD_RESPONSES 525
+#define VAR_PAD_RESPONSES_BLOCK_SIZE 526
+#define VAR_PAD_QUERIES 527
+#define VAR_PAD_QUERIES_BLOCK_SIZE 528
+#define VAR_IPSECMOD_ENABLED 529
+#define VAR_IPSECMOD_HOOK 530
+#define VAR_IPSECMOD_IGNORE_BOGUS 531
+#define VAR_IPSECMOD_MAX_TTL 532
+#define VAR_IPSECMOD_WHITELIST 533
+#define VAR_IPSECMOD_STRICT 534
+#define VAR_CACHEDB 535
+#define VAR_CACHEDB_BACKEND 536
+#define VAR_CACHEDB_SECRETSEED 537
+#define VAR_CACHEDB_REDISHOST 538
+#define VAR_CACHEDB_REDISPORT 539
+#define VAR_CACHEDB_REDISTIMEOUT 540
+#define VAR_CACHEDB_REDISEXPIRERECORDS 541
+#define VAR_CACHEDB_REDISPATH 542
+#define VAR_CACHEDB_REDISPASSWORD 543
+#define VAR_CACHEDB_REDISLOGICALDB 544
+#define VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM 545
+#define VAR_FOR_UPSTREAM 546
+#define VAR_AUTH_ZONE 547
+#define VAR_ZONEFILE 548
+#define VAR_MASTER 549
+#define VAR_URL 550
+#define VAR_FOR_DOWNSTREAM 551
+#define VAR_FALLBACK_ENABLED 552
+#define VAR_TLS_ADDITIONAL_PORT 553
+#define VAR_LOW_RTT 554
+#define VAR_LOW_RTT_PERMIL 555
+#define VAR_FAST_SERVER_PERMIL 556
+#define VAR_FAST_SERVER_NUM 557
+#define VAR_ALLOW_NOTIFY 558
+#define VAR_TLS_WIN_CERT 559
+#define VAR_TCP_CONNECTION_LIMIT 560
+#define VAR_ANSWER_COOKIE 561
+#define VAR_COOKIE_SECRET 562
+#define VAR_IP_RATELIMIT_COOKIE 563
+#define VAR_FORWARD_NO_CACHE 564
+#define VAR_STUB_NO_CACHE 565
+#define VAR_LOG_SERVFAIL 566
+#define VAR_DENY_ANY 567
+#define VAR_UNKNOWN_SERVER_TIME_LIMIT 568
+#define VAR_LOG_TAG_QUERYREPLY 569
+#define VAR_DISCARD_TIMEOUT 570
+#define VAR_WAIT_LIMIT 571
+#define VAR_WAIT_LIMIT_COOKIE 572
+#define VAR_WAIT_LIMIT_NETBLOCK 573
+#define VAR_WAIT_LIMIT_COOKIE_NETBLOCK 574
+#define VAR_STREAM_WAIT_SIZE 575
+#define VAR_TLS_CIPHERS 576
+#define VAR_TLS_CIPHERSUITES 577
+#define VAR_TLS_USE_SNI 578
+#define VAR_IPSET 579
+#define VAR_IPSET_NAME_V4 580
+#define VAR_IPSET_NAME_V6 581
+#define VAR_TLS_SESSION_TICKET_KEYS 582
+#define VAR_RPZ 583
+#define VAR_TAGS 584
+#define VAR_RPZ_ACTION_OVERRIDE 585
+#define VAR_RPZ_CNAME_OVERRIDE 586
+#define VAR_RPZ_LOG 587
+#define VAR_RPZ_LOG_NAME 588
+#define VAR_DYNLIB 589
+#define VAR_DYNLIB_FILE 590
+#define VAR_EDNS_CLIENT_STRING 591
+#define VAR_EDNS_CLIENT_STRING_OPCODE 592
+#define VAR_NSID 593
+#define VAR_ZONEMD_PERMISSIVE_MODE 594
+#define VAR_ZONEMD_CHECK 595
+#define VAR_ZONEMD_REJECT_ABSENCE 596
+#define VAR_RPZ_SIGNAL_NXDOMAIN_RA 597
+#define VAR_INTERFACE_AUTOMATIC_PORTS 598
+#define VAR_EDE 599
+#define VAR_INTERFACE_ACTION 600
+#define VAR_INTERFACE_VIEW 601
+#define VAR_INTERFACE_TAG 602
+#define VAR_INTERFACE_TAG_ACTION 603
+#define VAR_INTERFACE_TAG_DATA 604
+#define VAR_PROXY_PROTOCOL_PORT 605
+#define VAR_STATISTICS_INHIBIT_ZERO 606
+#define VAR_HARDEN_UNKNOWN_ADDITIONAL 607
+#define VAR_DISABLE_EDNS_DO 608
+#define VAR_CACHEDB_NO_STORE 609
+#define VAR_LOG_DESTADDR 610
+#define VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED 611
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -765,7 +779,7 @@ union YYSTYPE
char* str;
-#line 769 "util/configparser.h"
+#line 783 "util/configparser.h"
};
typedef union YYSTYPE YYSTYPE;
diff --git a/contrib/unbound/util/configparser.y b/contrib/unbound/util/configparser.y
index 0e4cd5960a29..0feeb61b168b 100644
--- a/contrib/unbound/util/configparser.y
+++ b/contrib/unbound/util/configparser.y
@@ -153,6 +153,7 @@ extern struct config_parser_state* cfg_parser;
%token VAR_MIN_CLIENT_SUBNET_IPV4 VAR_MIN_CLIENT_SUBNET_IPV6
%token VAR_MAX_ECS_TREE_SIZE_IPV4 VAR_MAX_ECS_TREE_SIZE_IPV6
%token VAR_CAPS_WHITELIST VAR_CACHE_MAX_NEGATIVE_TTL VAR_PERMIT_SMALL_HOLDDOWN
+%token VAR_CACHE_MIN_NEGATIVE_TTL
%token VAR_QNAME_MINIMISATION VAR_QNAME_MINIMISATION_STRICT VAR_IP_FREEBIND
%token VAR_DEFINE_TAG VAR_LOCAL_ZONE_TAG VAR_ACCESS_CONTROL_TAG
%token VAR_LOCAL_ZONE_OVERRIDE VAR_ACCESS_CONTROL_TAG_ACTION
@@ -188,6 +189,8 @@ extern struct config_parser_state* cfg_parser;
%token VAR_ANSWER_COOKIE VAR_COOKIE_SECRET VAR_IP_RATELIMIT_COOKIE
%token VAR_FORWARD_NO_CACHE VAR_STUB_NO_CACHE VAR_LOG_SERVFAIL VAR_DENY_ANY
%token VAR_UNKNOWN_SERVER_TIME_LIMIT VAR_LOG_TAG_QUERYREPLY
+%token VAR_DISCARD_TIMEOUT VAR_WAIT_LIMIT VAR_WAIT_LIMIT_COOKIE
+%token VAR_WAIT_LIMIT_NETBLOCK VAR_WAIT_LIMIT_COOKIE_NETBLOCK
%token VAR_STREAM_WAIT_SIZE VAR_TLS_CIPHERS VAR_TLS_CIPHERSUITES VAR_TLS_USE_SNI
%token VAR_IPSET VAR_IPSET_NAME_V4 VAR_IPSET_NAME_V6
%token VAR_TLS_SESSION_TICKET_KEYS VAR_RPZ VAR_TAGS VAR_RPZ_ACTION_OVERRIDE
@@ -200,7 +203,7 @@ extern struct config_parser_state* cfg_parser;
%token VAR_INTERFACE_TAG_ACTION VAR_INTERFACE_TAG_DATA
%token VAR_PROXY_PROTOCOL_PORT VAR_STATISTICS_INHIBIT_ZERO
%token VAR_HARDEN_UNKNOWN_ADDITIONAL VAR_DISABLE_EDNS_DO VAR_CACHEDB_NO_STORE
-%token VAR_LOG_DESTADDR
+%token VAR_LOG_DESTADDR VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED
%%
toplevelvars: /* empty */ | toplevelvars toplevelvar ;
@@ -298,6 +301,7 @@ content_server: server_num_threads | server_verbosity | server_port |
server_min_client_subnet_ipv4 | server_min_client_subnet_ipv6 |
server_max_ecs_tree_size_ipv4 | server_max_ecs_tree_size_ipv6 |
server_caps_whitelist | server_cache_max_negative_ttl |
+ server_cache_min_negative_ttl |
server_permit_small_holddown | server_qname_minimisation |
server_ip_freebind | server_define_tag | server_local_zone_tag |
server_disable_dnssec_lame_check | server_access_control_tag |
@@ -325,6 +329,8 @@ content_server: server_num_threads | server_verbosity | server_port |
server_fast_server_permil | server_fast_server_num | server_tls_win_cert |
server_tcp_connection_limit | server_log_servfail | server_deny_any |
server_unknown_server_time_limit | server_log_tag_queryreply |
+ server_discard_timeout | server_wait_limit | server_wait_limit_cookie |
+ server_wait_limit_netblock | server_wait_limit_cookie_netblock |
server_stream_wait_size | server_tls_ciphers |
server_tls_ciphersuites | server_tls_session_ticket_keys |
server_answer_cookie | server_cookie_secret | server_ip_ratelimit_cookie |
@@ -2014,6 +2020,15 @@ server_cache_max_negative_ttl: VAR_CACHE_MAX_NEGATIVE_TTL STRING_ARG
free($2);
}
;
+server_cache_min_negative_ttl: VAR_CACHE_MIN_NEGATIVE_TTL STRING_ARG
+ {
+ OUTYY(("P(server_cache_min_negative_ttl:%s)\n", $2));
+ if(atoi($2) == 0 && strcmp($2, "0") != 0)
+ yyerror("number expected");
+ else cfg_parser->cfg->min_negative_ttl = atoi($2);
+ free($2);
+ }
+ ;
server_cache_min_ttl: VAR_CACHE_MIN_TTL STRING_ARG
{
OUTYY(("P(server_cache_min_ttl:%s)\n", $2));
@@ -2366,6 +2381,57 @@ server_unknown_server_time_limit: VAR_UNKNOWN_SERVER_TIME_LIMIT STRING_ARG
free($2);
}
;
+server_discard_timeout: VAR_DISCARD_TIMEOUT STRING_ARG
+ {
+ OUTYY(("P(server_discard_timeout:%s)\n", $2));
+ cfg_parser->cfg->discard_timeout = atoi($2);
+ free($2);
+ }
+ ;
+server_wait_limit: VAR_WAIT_LIMIT STRING_ARG
+ {
+ OUTYY(("P(server_wait_limit:%s)\n", $2));
+ cfg_parser->cfg->wait_limit = atoi($2);
+ free($2);
+ }
+ ;
+server_wait_limit_cookie: VAR_WAIT_LIMIT_COOKIE STRING_ARG
+ {
+ OUTYY(("P(server_wait_limit_cookie:%s)\n", $2));
+ cfg_parser->cfg->wait_limit_cookie = atoi($2);
+ free($2);
+ }
+ ;
+server_wait_limit_netblock: VAR_WAIT_LIMIT_NETBLOCK STRING_ARG STRING_ARG
+ {
+ OUTYY(("P(server_wait_limit_netblock:%s %s)\n", $2, $3));
+ if(atoi($3) == 0 && strcmp($3, "0") != 0) {
+ yyerror("number expected");
+ free($2);
+ free($3);
+ } else {
+ if(!cfg_str2list_insert(&cfg_parser->cfg->
+ wait_limit_netblock, $2, $3))
+ fatal_exit("out of memory adding "
+ "wait-limit-netblock");
+ }
+ }
+ ;
+server_wait_limit_cookie_netblock: VAR_WAIT_LIMIT_COOKIE_NETBLOCK STRING_ARG STRING_ARG
+ {
+ OUTYY(("P(server_wait_limit_cookie_netblock:%s %s)\n", $2, $3));
+ if(atoi($3) == 0 && strcmp($3, "0") != 0) {
+ yyerror("number expected");
+ free($2);
+ free($3);
+ } else {
+ if(!cfg_str2list_insert(&cfg_parser->cfg->
+ wait_limit_cookie_netblock, $2, $3))
+ fatal_exit("out of memory adding "
+ "wait-limit-cookie-netblock");
+ }
+ }
+ ;
server_max_udp_size: VAR_MAX_UDP_SIZE STRING_ARG
{
OUTYY(("P(server_max_udp_size:%s)\n", $2));
@@ -3723,7 +3789,7 @@ contents_cachedb: contents_cachedb content_cachedb
content_cachedb: cachedb_backend_name | cachedb_secret_seed |
redis_server_host | redis_server_port | redis_timeout |
redis_expire_records | redis_server_path | redis_server_password |
- cachedb_no_store | redis_logical_db
+ cachedb_no_store | redis_logical_db | cachedb_check_when_serve_expired
;
cachedb_backend_name: VAR_CACHEDB_BACKEND STRING_ARG
{
@@ -3762,6 +3828,19 @@ cachedb_no_store: VAR_CACHEDB_NO_STORE STRING_ARG
free($2);
}
;
+cachedb_check_when_serve_expired: VAR_CACHEDB_CHECK_WHEN_SERVE_EXPIRED STRING_ARG
+ {
+ #ifdef USE_CACHEDB
+ OUTYY(("P(cachedb_check_when_serve_expired:%s)\n", $2));
+ if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
+ yyerror("expected yes or no.");
+ else cfg_parser->cfg->cachedb_check_when_serve_expired = (strcmp($2, "yes")==0);
+ #else
+ OUTYY(("P(Compiled without cachedb, ignoring)\n"));
+ #endif
+ free($2);
+ }
+ ;
redis_server_host: VAR_CACHEDB_REDISHOST STRING_ARG
{
#if defined(USE_CACHEDB) && defined(USE_REDIS)
diff --git a/contrib/unbound/util/data/msgparse.h b/contrib/unbound/util/data/msgparse.h
index 8e5c94a28cba..656e0d285dcd 100644
--- a/contrib/unbound/util/data/msgparse.h
+++ b/contrib/unbound/util/data/msgparse.h
@@ -82,6 +82,8 @@ extern time_t MAX_TTL;
extern time_t MIN_TTL;
/** Maximum Negative TTL that is allowed */
extern time_t MAX_NEG_TTL;
+/** Minimum Negative TTL that is allowed */
+extern time_t MIN_NEG_TTL;
/** If we serve expired entries and prefetch them */
extern int SERVE_EXPIRED;
/** Time to serve records after expiration */
diff --git a/contrib/unbound/util/data/msgreply.c b/contrib/unbound/util/data/msgreply.c
index 2286d46bc3ff..c9d7bbf3ad47 100644
--- a/contrib/unbound/util/data/msgreply.c
+++ b/contrib/unbound/util/data/msgreply.c
@@ -61,6 +61,8 @@ time_t MAX_TTL = 3600 * 24 * 10; /* ten days */
time_t MIN_TTL = 0;
/** MAX Negative TTL, for SOA records in authority section */
time_t MAX_NEG_TTL = 3600; /* one hour */
+/** MIN Negative TTL, for SOA records in authority section */
+time_t MIN_NEG_TTL = 0;
/** If we serve expired entries and prefetch them */
int SERVE_EXPIRED = 0;
/** Time to serve records after expiration */
@@ -223,18 +225,25 @@ rdata_copy(sldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to,
if(type == LDNS_RR_TYPE_SOA && section == LDNS_SECTION_AUTHORITY) {
/* negative response. see if TTL of SOA record larger than the
* minimum-ttl in the rdata of the SOA record */
- if(*rr_ttl > soa_find_minttl(rr))
- *rr_ttl = soa_find_minttl(rr);
- }
- if(!SERVE_ORIGINAL_TTL && (*rr_ttl < MIN_TTL))
- *rr_ttl = MIN_TTL;
- if(!SERVE_ORIGINAL_TTL && (*rr_ttl > MAX_TTL))
- *rr_ttl = MAX_TTL;
- if(type == LDNS_RR_TYPE_SOA && section == LDNS_SECTION_AUTHORITY) {
- /* max neg ttl overrides the min and max ttl of everything
- * else, it is for a more specific record */
- if(*rr_ttl > MAX_NEG_TTL)
- *rr_ttl = MAX_NEG_TTL;
+ if(*rr_ttl > soa_find_minttl(rr)) *rr_ttl = soa_find_minttl(rr);
+ if(!SERVE_ORIGINAL_TTL) {
+ /* If MIN_NEG_TTL is configured skip setting MIN_TTL */
+ if(MIN_NEG_TTL <= 0 && *rr_ttl < MIN_TTL) {
+ *rr_ttl = MIN_TTL;
+ }
+ if(*rr_ttl > MAX_TTL) *rr_ttl = MAX_TTL;
+ }
+ /* MAX_NEG_TTL overrides the min and max ttl of everything
+ * else; it is for a more specific record */
+ if(*rr_ttl > MAX_NEG_TTL) *rr_ttl = MAX_NEG_TTL;
+ /* MIN_NEG_TTL overrides the min and max ttl of everything
+ * else if configured; it is for a more specific record */
+ if(MIN_NEG_TTL > 0 && *rr_ttl < MIN_NEG_TTL) {
+ *rr_ttl = MIN_NEG_TTL;
+ }
+ } else if(!SERVE_ORIGINAL_TTL) {
+ if(*rr_ttl < MIN_TTL) *rr_ttl = MIN_TTL;
+ if(*rr_ttl > MAX_TTL) *rr_ttl = MAX_TTL;
}
if(*rr_ttl < data->ttl)
data->ttl = *rr_ttl;
diff --git a/contrib/unbound/util/module.c b/contrib/unbound/util/module.c
index 62e5de4a05bb..90a155b5e8aa 100644
--- a/contrib/unbound/util/module.c
+++ b/contrib/unbound/util/module.c
@@ -129,7 +129,7 @@ void errinf_origin(struct module_qstate* qstate, struct sock_list *origin)
}
}
-char* errinf_to_str_bogus(struct module_qstate* qstate)
+char* errinf_to_str_bogus(struct module_qstate* qstate, struct regional* region)
{
char buf[20480];
char* p = buf;
@@ -148,7 +148,10 @@ char* errinf_to_str_bogus(struct module_qstate* qstate)
snprintf(p, left, " %s", s->str);
left -= strlen(p); p += strlen(p);
}
- p = strdup(buf);
+ if(region)
+ p = regional_strdup(region, buf);
+ else
+ p = strdup(buf);
if(!p)
log_err("malloc failure in errinf_to_str");
return p;
@@ -188,7 +191,7 @@ char* errinf_to_str_servfail(struct module_qstate* qstate)
snprintf(p, left, " %s", s->str);
left -= strlen(p); p += strlen(p);
}
- p = strdup(buf);
+ p = regional_strdup(qstate->region, buf);
if(!p)
log_err("malloc failure in errinf_to_str");
return p;
@@ -206,7 +209,7 @@ char* errinf_to_str_misc(struct module_qstate* qstate)
snprintf(p, left, "%s%s", (s==qstate->errinf?"":" "), s->str);
left -= strlen(p); p += strlen(p);
}
- p = strdup(buf);
+ p = regional_strdup(qstate->region, buf);
if(!p)
log_err("malloc failure in errinf_to_str");
return p;
diff --git a/contrib/unbound/util/module.h b/contrib/unbound/util/module.h
index 8a9da3f931a1..c9df74624918 100644
--- a/contrib/unbound/util/module.h
+++ b/contrib/unbound/util/module.h
@@ -180,6 +180,7 @@ struct iter_hints;
struct respip_set;
struct respip_client_info;
struct respip_addr_info;
+struct module_stack;
/** Maximum number of modules in operation */
#define MAX_MODULE 16
@@ -511,10 +512,10 @@ struct module_env {
/** auth zones */
struct auth_zones* auth_zones;
/** Mapping of forwarding zones to targets.
- * iterator forwarder information. per-thread, created by worker */
+ * iterator forwarder information. */
struct iter_forwards* fwds;
/**
- * iterator forwarder information. per-thread, created by worker.
+ * iterator stub information.
* The hints -- these aren't stored in the cache because they don't
* expire. The hints are always used to "prime" the cache. Note
* that both root hints and stub zone "hints" are stored in this
@@ -537,6 +538,12 @@ struct module_env {
/** EDNS client string information */
struct edns_strings* edns_strings;
+ /** module stack */
+ struct module_stack* modstack;
+#ifdef USE_CACHEDB
+ /** the cachedb enabled value, copied and stored here. */
+ int cachedb_enabled;
+#endif
/* Make every mesh state unique, do not aggregate mesh states. */
int unique_mesh;
};
@@ -824,10 +831,11 @@ void errinf_dname(struct module_qstate* qstate, const char* str,
/**
* Create error info in string. For validation failures.
* @param qstate: query state.
+ * @param region: the region for the result or NULL for malloced result.
* @return string or NULL on malloc failure (already logged).
- * This string is malloced and has to be freed by caller.
+ * This string is malloced if region is NULL and has to be freed by caller.
*/
-char* errinf_to_str_bogus(struct module_qstate* qstate);
+char* errinf_to_str_bogus(struct module_qstate* qstate, struct regional* region);
/**
* Check the sldns_ede_code of the qstate->errinf.
@@ -840,7 +848,6 @@ sldns_ede_code errinf_to_reason_bogus(struct module_qstate* qstate);
* Create error info in string. For other servfails.
* @param qstate: query state.
* @return string or NULL on malloc failure (already logged).
- * This string is malloced and has to be freed by caller.
*/
char* errinf_to_str_servfail(struct module_qstate* qstate);
@@ -848,7 +855,6 @@ char* errinf_to_str_servfail(struct module_qstate* qstate);
* Create error info in string. For misc failures that are not servfail.
* @param qstate: query state.
* @return string or NULL on malloc failure (already logged).
- * This string is malloced and has to be freed by caller.
*/
char* errinf_to_str_misc(struct module_qstate* qstate);
diff --git a/contrib/unbound/util/net_help.c b/contrib/unbound/util/net_help.c
index 8970247926d7..d2218ea88332 100644
--- a/contrib/unbound/util/net_help.c
+++ b/contrib/unbound/util/net_help.c
@@ -77,6 +77,8 @@
/** max length of an IP address (the address portion) that we allow */
#define MAX_ADDR_STRLEN 128 /* characters */
+/** max length of a hostname (with port and tls name) that we allow */
+#define MAX_HOST_STRLEN (LDNS_MAX_DOMAINLEN * 3) /* characters */
/** default value for EDNS ADVERTISED size */
uint16_t EDNS_ADVERTISED_SIZE = 4096;
@@ -486,28 +488,38 @@ uint8_t* authextstrtodname(char* str, int* port, char** auth_name)
*port = UNBOUND_DNS_PORT;
*auth_name = NULL;
if((s=strchr(str, '@'))) {
+ char buf[MAX_HOST_STRLEN];
+ size_t len = (size_t)(s-str);
char* hash = strchr(s+1, '#');
if(hash) {
*auth_name = hash+1;
} else {
*auth_name = NULL;
}
+ if(len >= MAX_HOST_STRLEN) {
+ return NULL;
+ }
+ (void)strlcpy(buf, str, sizeof(buf));
+ buf[len] = 0;
*port = atoi(s+1);
if(*port == 0) {
if(!hash && strcmp(s+1,"0")!=0)
- return 0;
+ return NULL;
if(hash && strncmp(s+1,"0#",2)!=0)
- return 0;
+ return NULL;
}
- *s = 0;
- dname = sldns_str2wire_dname(str, &dname_len);
- *s = '@';
+ dname = sldns_str2wire_dname(buf, &dname_len);
} else if((s=strchr(str, '#'))) {
+ char buf[MAX_HOST_STRLEN];
+ size_t len = (size_t)(s-str);
+ if(len >= MAX_HOST_STRLEN) {
+ return NULL;
+ }
+ (void)strlcpy(buf, str, sizeof(buf));
+ buf[len] = 0;
*port = UNBOUND_DNS_OVER_TLS_PORT;
*auth_name = s+1;
- *s = 0;
- dname = sldns_str2wire_dname(str, &dname_len);
- *s = '#';
+ dname = sldns_str2wire_dname(buf, &dname_len);
} else {
dname = sldns_str2wire_dname(str, &dname_len);
}
@@ -1026,11 +1038,11 @@ static void log_crypto_err_io_code_arg(const char* str, int r,
} else {
if(print_errno) {
if(errno == 0)
- log_err("str: syscall error with errno %s",
- strerror(errno));
- else log_err("str: %s", strerror(errno));
+ log_err("%s: syscall error with errno %s",
+ str, strerror(errno));
+ else log_err("%s: %s", str, strerror(errno));
} else {
- log_err("str: %s", inf);
+ log_err("%s: %s", str, inf);
}
}
}
diff --git a/contrib/unbound/util/netevent.c b/contrib/unbound/util/netevent.c
index 1fc8c6b8658e..980829d087e9 100644
--- a/contrib/unbound/util/netevent.c
+++ b/contrib/unbound/util/netevent.c
@@ -4772,9 +4772,9 @@ comm_point_send_reply(struct comm_reply *repinfo)
* sending src (client)/dst (local service) addresses over DNSTAP from udp callback
*/
if(repinfo->c->dtenv != NULL && repinfo->c->dtenv->log_client_response_messages) {
- log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->socket->addr->ai_addrlen);
+ log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
log_addr(VERB_ALGO, "response to client", &repinfo->client_addr, repinfo->client_addrlen);
- dt_msg_send_client_response(repinfo->c->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->type, repinfo->c->ssl, repinfo->c->buffer);
+ dt_msg_send_client_response(repinfo->c->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, repinfo->c->type, repinfo->c->ssl, repinfo->c->buffer);
}
#endif
} else {
@@ -4783,9 +4783,9 @@ comm_point_send_reply(struct comm_reply *repinfo)
* sending src (client)/dst (local service) addresses over DNSTAP from TCP callback
*/
if(repinfo->c->tcp_parent->dtenv != NULL && repinfo->c->tcp_parent->dtenv->log_client_response_messages) {
- log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->socket->addr->ai_addrlen);
+ log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
log_addr(VERB_ALGO, "response to client", &repinfo->client_addr, repinfo->client_addrlen);
- dt_msg_send_client_response(repinfo->c->tcp_parent->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->type, repinfo->c->ssl,
+ dt_msg_send_client_response(repinfo->c->tcp_parent->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, repinfo->c->type, repinfo->c->ssl,
( repinfo->c->tcp_req_info? repinfo->c->tcp_req_info->spool_buffer: repinfo->c->buffer ));
}
#endif
diff --git a/contrib/unbound/util/netevent.h b/contrib/unbound/util/netevent.h
index dc9619c163b0..1e4a13f9b7e5 100644
--- a/contrib/unbound/util/netevent.h
+++ b/contrib/unbound/util/netevent.h
@@ -181,6 +181,8 @@ struct comm_point {
/** if the event is added or not */
int event_added;
+ /** Reference to struct that is part of the listening ports,
+ * where for listening ports information is kept about the address. */
struct unbound_socket* socket;
/** file descriptor for communication point */
diff --git a/contrib/unbound/util/storage/lookup3.c b/contrib/unbound/util/storage/lookup3.c
index c4026626c6d3..f2a48f413da5 100644
--- a/contrib/unbound/util/storage/lookup3.c
+++ b/contrib/unbound/util/storage/lookup3.c
@@ -89,7 +89,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
# if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
__BYTE_ORDER == __LITTLE_ENDIAN) || \
(defined(i386) || defined(__i386__) || defined(__i486__) || \
- defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL) || defined(__x86))
+ defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL) || defined(__x86) || defined(__loongarch__))
# define HASH_LITTLE_ENDIAN 1
# define HASH_BIG_ENDIAN 0
# elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
diff --git a/contrib/unbound/util/storage/lruhash.c b/contrib/unbound/util/storage/lruhash.c
index e17b180db8b8..aba9fcc1d83b 100644
--- a/contrib/unbound/util/storage/lruhash.c
+++ b/contrib/unbound/util/storage/lruhash.c
@@ -528,6 +528,40 @@ lruhash_setmarkdel(struct lruhash* table, lruhash_markdelfunc_type md)
lock_quick_unlock(&table->lock);
}
+void
+lruhash_update_space_used(struct lruhash* table, void* cb_arg, int diff_size)
+{
+ struct lruhash_entry *reclaimlist = NULL;
+
+ fptr_ok(fptr_whitelist_hash_sizefunc(table->sizefunc));
+ fptr_ok(fptr_whitelist_hash_delkeyfunc(table->delkeyfunc));
+ fptr_ok(fptr_whitelist_hash_deldatafunc(table->deldatafunc));
+ fptr_ok(fptr_whitelist_hash_markdelfunc(table->markdelfunc));
+
+ if(cb_arg == NULL) cb_arg = table->cb_arg;
+
+ /* update space used */
+ lock_quick_lock(&table->lock);
+
+ if((int)table->space_used + diff_size < 0)
+ table->space_used = 0;
+ else table->space_used = (size_t)((int)table->space_used + diff_size);
+
+ if(table->space_used > table->space_max)
+ reclaim_space(table, &reclaimlist);
+
+ lock_quick_unlock(&table->lock);
+
+ /* finish reclaim if any (outside of critical region) */
+ while(reclaimlist) {
+ struct lruhash_entry* n = reclaimlist->overflow_next;
+ void* d = reclaimlist->data;
+ (*table->delkeyfunc)(reclaimlist->key, cb_arg);
+ (*table->deldatafunc)(d, cb_arg);
+ reclaimlist = n;
+ }
+}
+
void
lruhash_traverse(struct lruhash* h, int wr,
void (*func)(struct lruhash_entry*, void*), void* arg)
diff --git a/contrib/unbound/util/storage/lruhash.h b/contrib/unbound/util/storage/lruhash.h
index 2086e4dec93e..5ab488beb508 100644
--- a/contrib/unbound/util/storage/lruhash.h
+++ b/contrib/unbound/util/storage/lruhash.h
@@ -303,6 +303,17 @@ void lru_touch(struct lruhash* table, struct lruhash_entry* entry);
*/
void lruhash_setmarkdel(struct lruhash* table, lruhash_markdelfunc_type md);
+/**
+ * Update the size of an element in the hashtable.
+ *
+ * @param table: hash table.
+ * @param cb_override: if not NULL overrides the cb_arg for deletefunc.
+ * @param diff_size: difference in size to the hash table storage.
+ * This is newsize - oldsize, a positive number uses more space.
+ */
+void lruhash_update_space_used(struct lruhash* table, void* cb_override,
+ int diff_size);
+
/************************* getdns functions ************************/
/*** these are used by getdns only and not by unbound. ***/
diff --git a/contrib/unbound/util/storage/slabhash.c b/contrib/unbound/util/storage/slabhash.c
index 7d376c4d684a..62396e16a82d 100644
--- a/contrib/unbound/util/storage/slabhash.c
+++ b/contrib/unbound/util/storage/slabhash.c
@@ -166,6 +166,13 @@ int slabhash_is_size(struct slabhash* sl, size_t size, size_t slabs)
return 0;
}
+void slabhash_update_space_used(struct slabhash* sl, hashvalue_type hash,
+ void* cb_arg, int diff_size)
+{
+ lruhash_update_space_used(sl->array[slab_idx(sl, hash)], cb_arg,
+ diff_size);
+}
+
size_t slabhash_get_mem(struct slabhash* sl)
{
size_t i, total = sizeof(*sl);
diff --git a/contrib/unbound/util/storage/slabhash.h b/contrib/unbound/util/storage/slabhash.h
index dc5fc3603294..089847d9359b 100644
--- a/contrib/unbound/util/storage/slabhash.h
+++ b/contrib/unbound/util/storage/slabhash.h
@@ -162,6 +162,18 @@ size_t slabhash_get_size(struct slabhash* table);
int slabhash_is_size(struct slabhash* table, size_t size, size_t slabs);
/**
+ * Update the size of an element in the hashtable, uses
+ * lruhash_update_space_used.
+ *
+ * @param table: hash table.
+ * @param hash: hash value. User calculates the hash.
+ * @param cb_override: if not NULL overrides the cb_arg for deletefunc.
+ * @param diff_size: difference in size to the hash table storage.
+ */
+void slabhash_update_space_used(struct slabhash* table, hashvalue_type hash,
+ void* cb_override, int diff_size);
+
+/**
* Retrieve slab hash current memory use.
* @param table: hash table.
* @return memory in use.
diff --git a/contrib/unbound/validator/val_utils.c b/contrib/unbound/validator/val_utils.c
index c316183a9d9e..a7db41dadc3d 100644
--- a/contrib/unbound/validator/val_utils.c
+++ b/contrib/unbound/validator/val_utils.c
@@ -118,7 +118,30 @@ val_classify_response(uint16_t query_flags, struct query_info* origqinf,
* ANY responses are validated differently. */
if(rcode == LDNS_RCODE_NOERROR && qinf->qtype == LDNS_RR_TYPE_ANY)
return VAL_CLASS_ANY;
-
+
+ /* For the query type DNAME, the name matters. Equal name is the
+ * answer looked for, but a subdomain redirects the query. */
+ if(qinf->qtype == LDNS_RR_TYPE_DNAME) {
+ for(i=skip; i<rep->an_numrrsets; i++) {
+ if(rcode == LDNS_RCODE_NOERROR &&
+ ntohs(rep->rrsets[i]->rk.type)
+ == LDNS_RR_TYPE_DNAME &&
+ query_dname_compare(qinf->qname,
+ rep->rrsets[i]->rk.dname) == 0) {
+ /* type is DNAME and name is equal, it is
+ * the answer. For the query name a subdomain
+ * of the rrset.dname it would redirect. */
+ return VAL_CLASS_POSITIVE;
+ }
+ if(ntohs(rep->rrsets[i]->rk.type)
+ == LDNS_RR_TYPE_CNAME)
+ return VAL_CLASS_CNAME;
+ }
+ log_dns_msg("validator: error. failed to classify response message: ",
+ qinf, rep);
+ return VAL_CLASS_UNKNOWN;
+ }
+
/* Note that DNAMEs will be ignored here, unless qtype=DNAME. Unless
* qtype=CNAME, this will yield a CNAME response. */
for(i=skip; i<rep->an_numrrsets; i++) {
@@ -231,6 +254,21 @@ val_find_signer(enum val_classification subtype, struct query_info* qinf,
rep->rrsets[i]->rk.dname) == 0) {
val_find_rrset_signer(rep->rrsets[i],
signer_name, signer_len);
+ /* If there was no signer, and the query
+ * was for type CNAME, and this is a CNAME,
+ * and the previous is a DNAME, then this
+ * is the synthesized CNAME, use the signer
+ * of the DNAME record. */
+ if(*signer_name == NULL &&
+ qinf->qtype == LDNS_RR_TYPE_CNAME &&
+ ntohs(rep->rrsets[i]->rk.type) ==
+ LDNS_RR_TYPE_CNAME && i > skip &&
+ ntohs(rep->rrsets[i-1]->rk.type) ==
+ LDNS_RR_TYPE_DNAME &&
+ dname_strict_subdomain_c(rep->rrsets[i]->rk.dname, rep->rrsets[i-1]->rk.dname)) {
+ val_find_rrset_signer(rep->rrsets[i-1],
+ signer_name, signer_len);
+ }
return;
}
}
diff --git a/contrib/unbound/validator/validator.c b/contrib/unbound/validator/validator.c
index aa71df9cbf58..3cf291658e71 100644
--- a/contrib/unbound/validator/validator.c
+++ b/contrib/unbound/validator/validator.c
@@ -621,7 +621,6 @@ prime_trust_anchor(struct module_qstate* qstate, struct val_qstate* vq,
* @param vq: validator query state.
* @param env: module env for verify.
* @param ve: validator env for verify.
- * @param qchase: query that was made.
* @param chase_reply: answer to validate.
* @param key_entry: the key entry, which is trusted, and which matches
* the signer of the answer. The key entry isgood().
@@ -632,7 +631,7 @@ prime_trust_anchor(struct module_qstate* qstate, struct val_qstate* vq,
*/
static int
validate_msg_signatures(struct module_qstate* qstate, struct val_qstate* vq,
- struct module_env* env, struct val_env* ve, struct query_info* qchase,
+ struct module_env* env, struct val_env* ve,
struct reply_info* chase_reply, struct key_entry_key* key_entry,
int* suspend)
{
@@ -640,7 +639,7 @@ validate_msg_signatures(struct module_qstate* qstate, struct val_qstate* vq,
size_t i, slen;
struct ub_packed_rrset_key* s;
enum sec_status sec;
- int dname_seen = 0, num_verifies = 0, verified, have_state = 0;
+ int num_verifies = 0, verified, have_state = 0;
char* reason = NULL;
sldns_ede_code reason_bogus = LDNS_EDE_DNSSEC_BOGUS;
*suspend = 0;
@@ -658,9 +657,13 @@ validate_msg_signatures(struct module_qstate* qstate, struct val_qstate* vq,
/* Skip the CNAME following a (validated) DNAME.
* Because of the normalization routines in the iterator,
* there will always be an unsigned CNAME following a DNAME
- * (unless qtype=DNAME). */
- if(dname_seen && ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME) {
- dname_seen = 0;
+ * (unless qtype=DNAME in the answer part). */
+ if(i>0 && ntohs(chase_reply->rrsets[i-1]->rk.type) ==
+ LDNS_RR_TYPE_DNAME &&
+ ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME &&
+ ((struct packed_rrset_data*)chase_reply->rrsets[i-1]->entry.data)->security == sec_status_secure &&
+ dname_strict_subdomain_c(s->rk.dname, chase_reply->rrsets[i-1]->rk.dname)
+ ) {
/* CNAME was synthesized by our own iterator */
/* since the DNAME verified, mark the CNAME as secure */
((struct packed_rrset_data*)s->entry.data)->security =
@@ -691,12 +694,6 @@ validate_msg_signatures(struct module_qstate* qstate, struct val_qstate* vq,
return 0;
}
- /* Notice a DNAME that should be followed by an unsigned
- * CNAME. */
- if(qchase->qtype != LDNS_RR_TYPE_DNAME &&
- ntohs(s->rk.type) == LDNS_RR_TYPE_DNAME) {
- dname_seen = 1;
- }
num_verifies += verified;
if(num_verifies > MAX_VALIDATE_AT_ONCE &&
i+1 < (env->cfg->val_clean_additional?
@@ -2186,7 +2183,7 @@ processValidate(struct module_qstate* qstate, struct val_qstate* vq,
/* check signatures in the message;
* answer and authority must be valid, additional is only checked. */
- if(!validate_msg_signatures(qstate, vq, qstate->env, ve, &vq->qchase,
+ if(!validate_msg_signatures(qstate, vq, qstate->env, ve,
vq->chase_reply, vq->key_entry, &suspend)) {
if(suspend) {
if(!validate_suspend_setup_timer(qstate, vq,
@@ -2456,19 +2453,12 @@ processFinished(struct module_qstate* qstate, struct val_qstate* vq,
log_query_info(NO_VERBOSE, "validation failure",
&qstate->qinfo);
else {
- char* err_str = errinf_to_str_bogus(qstate);
+ char* err_str = errinf_to_str_bogus(qstate,
+ qstate->region);
if(err_str) {
- size_t err_str_len = strlen(err_str);
log_info("%s", err_str);
- /* allocate space and store the error
- * string */
- vq->orig_msg->rep->reason_bogus_str = regional_alloc(
- qstate->region,
- sizeof(char) * (err_str_len+1));
- memcpy(vq->orig_msg->rep->reason_bogus_str,
- err_str, err_str_len+1);
+ vq->orig_msg->rep->reason_bogus_str = err_str;
}
- free(err_str);
}
}
/*
diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c
index d5ff51cee456..14c19eb1246c 100644
--- a/contrib/wpa/src/drivers/driver_bsd.c
+++ b/contrib/wpa/src/drivers/driver_bsd.c
@@ -1557,17 +1557,6 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
if (devcaps.dc_drivercaps & IEEE80211_C_WPA2)
drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 |
WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
-#ifdef __FreeBSD__
- drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
- WPA_DRIVER_CAPA_ENC_WEP104 |
- WPA_DRIVER_CAPA_ENC_TKIP |
- WPA_DRIVER_CAPA_ENC_CCMP;
-#else
- /*
- * XXX
- * FreeBSD exports hardware cryptocaps. These have no meaning for wpa
- * since net80211 performs software crypto.
- */
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP)
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
@@ -1576,7 +1565,6 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv)
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP;
if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM)
drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP;
-#endif
if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP)
drv->capa.flags |= WPA_DRIVER_FLAGS_AP;
diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist
index 8b4bf66c65bd..f8c83d6dde7a 100644
--- a/etc/mtree/BSD.include.dist
+++ b/etc/mtree/BSD.include.dist
@@ -153,6 +153,8 @@
..
nvme
..
+ nvmf
+ ..
ofw
..
pbio
@@ -370,6 +372,8 @@
mac_veriexec
..
..
+ ssp
+ ..
sys
disk
..
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index d0451081022b..3f447f9ec25e 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -419,6 +419,8 @@
..
libdevdctl
..
+ libdiff
+ ..
libexecinfo
..
libkvm
diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist
index 6f2327b59f0c..0845d8a59f65 100644
--- a/etc/mtree/BSD.var.dist
+++ b/etc/mtree/BSD.var.dist
@@ -53,8 +53,6 @@
..
ports
..
- portsnap
- ..
zfsd tags=package=zfs
cases
..
diff --git a/include/Makefile b/include/Makefile
index d44c982d950c..32774419f162 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -4,7 +4,7 @@
PACKAGE=clibs
CLEANFILES= osreldate.h version
-SUBDIR= arpa protocols rpcsvc rpc xlocale
+SUBDIR= arpa protocols rpcsvc rpc ssp xlocale
.if ${MACHINE_CPUARCH} == "amd64"
SUBDIR+= i386
INCLUDE_SUBDIRS+= i386
@@ -182,6 +182,11 @@ OPENCRYPTODIR= ${INCLUDEDIR}/crypto
NVME= nvme.h
NVMEDIR= ${INCLUDEDIR}/dev/nvme
+.PATH: ${SRCTOP}/sys/dev/nvmf
+NVMF= nvmf.h \
+ nvmf_proto.h
+NVMFDIR= ${INCLUDEDIR}/dev/nvmf
+
.PATH: ${SRCTOP}/sys/dev/pci
PCI= pcireg.h
PCIDIR= ${INCLUDEDIR}/dev/pci
@@ -255,6 +260,7 @@ INCSGROUPS= INCS \
HYPERV \
OPENCRYPTO \
NVME \
+ NVMF \
PCI \
RPC \
SECAUDIT \
diff --git a/include/endian.h b/include/endian.h
index eb25cedf0bef..87ec7866c791 100644
--- a/include/endian.h
+++ b/include/endian.h
@@ -12,8 +12,32 @@
#define _ENDIAN_H_
/*
+ * POSIX Issue 8 requires that endian.h define uint{16,32,64}_t. Although POSIX
+ * allows stdint.h symbols here, be conservative and only define there required
+ * ones. FreeBSD's sys/_endian.h doesn't need to expose those types since it
+ * implements all the [bl]eXtoh hto[bl]eX interfaces as macros calling builtin
+ * functions. POSIX allows functions, macros or both. We opt for macros only.
+ */
+#include <sys/_types.h>
+
+#ifndef _UINT16_T_DECLARED
+typedef __uint16_t uint16_t;
+#define _UINT16_T_DECLARED
+#endif
+
+#ifndef _UINT32_T_DECLARED
+typedef __uint32_t uint32_t;
+#define _UINT32_T_DECLARED
+#endif
+
+#ifndef _UINT64_T_DECLARED
+typedef __uint64_t uint64_t;
+#define _UINT64_T_DECLARED
+#endif
+
+/*
* FreeBSD's sys/_endian.h is very close to the interface provided on Linux by
- * glibc's endian.h.
+ * glibc's endian.h as well as POSIX Issue 8's endian.h.
*/
#include <sys/_endian.h>
diff --git a/include/paths.h b/include/paths.h
index 9f9071af915c..86900664230b 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -61,7 +61,6 @@
#define _PATH_FIRMWARE "/usr/share/firmware"
#define _PATH_FTPUSERS "/etc/ftpusers"
#define _PATH_FWMEM "/dev/fwmem"
-#define _PATH_GBDE "/sbin/gbde"
#define _PATH_GELI "/sbin/geli"
#define _PATH_HALT "/sbin/halt"
#ifdef COMPAT_libcompat
diff --git a/include/ssp/Makefile b/include/ssp/Makefile
new file mode 100644
index 000000000000..69e7df68bb47
--- /dev/null
+++ b/include/ssp/Makefile
@@ -0,0 +1,4 @@
+INCS= ssp.h stdio.h string.h strings.h unistd.h
+INCSDIR= ${INCLUDEDIR}/ssp
+
+.include <bsd.prog.mk>
diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h
new file mode 100644
index 000000000000..35a9aeee02df
--- /dev/null
+++ b/include/ssp/ssp.h
@@ -0,0 +1,91 @@
+/* $NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $ */
+
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SSP_SSP_H_
+#define _SSP_SSP_H_
+
+#include <sys/cdefs.h>
+
+#if !defined(__cplusplus)
+# if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && \
+ (__OPTIMIZE__ > 0 || defined(__clang__))
+# if _FORTIFY_SOURCE > 1
+# define __SSP_FORTIFY_LEVEL 2
+# else
+# define __SSP_FORTIFY_LEVEL 1
+# endif
+# else
+# define __SSP_FORTIFY_LEVEL 0
+# endif
+#else
+# define __SSP_FORTIFY_LEVEL 0
+#endif
+
+#define __ssp_var(type) __CONCAT(__ssp_ ## type, __COUNTER__)
+
+/* __ssp_real is used by the implementation in libc */
+#if __SSP_FORTIFY_LEVEL == 0
+#define __ssp_real_(fun) fun
+#else
+#define __ssp_real_(fun) __ssp_real_ ## fun
+#endif
+#define __ssp_real(fun) __ssp_real_(fun)
+
+#define __ssp_inline static __inline __attribute__((__always_inline__))
+
+#define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
+#define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)
+
+#define __ssp_check(buf, len, bos) \
+ if (bos(buf) != (size_t)-1 && len > bos(buf)) \
+ __chk_fail()
+#define __ssp_redirect_raw(rtype, fun, symbol, args, call, cond, bos) \
+rtype __ssp_real_(fun) args __RENAME(symbol); \
+__ssp_inline rtype fun args __RENAME(__ssp_protected_ ## fun); \
+__ssp_inline rtype fun args { \
+ if (cond) \
+ __ssp_check(__buf, __len, bos); \
+ return __ssp_real_(fun) call; \
+}
+
+#define __ssp_redirect(rtype, fun, args, call) \
+ __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos)
+#define __ssp_redirect0(rtype, fun, args, call) \
+ __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0)
+
+__BEGIN_DECLS
+void __stack_chk_fail(void) __dead2;
+void __chk_fail(void) __dead2;
+__END_DECLS
+
+#endif /* _SSP_SSP_H_ */
diff --git a/include/ssp/stdio.h b/include/ssp/stdio.h
new file mode 100644
index 000000000000..4bca1de7d4f9
--- /dev/null
+++ b/include/ssp/stdio.h
@@ -0,0 +1,87 @@
+/* $NetBSD: stdio.h,v 1.5 2011/07/17 20:54:34 joerg Exp $ */
+
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SSP_STDIO_H_
+#define _SSP_STDIO_H_
+
+#include <ssp/ssp.h>
+
+__BEGIN_DECLS
+int __sprintf_chk(char *__restrict, int, size_t, const char *__restrict, ...)
+ __printflike(4, 5);
+int __vsprintf_chk(char *__restrict, int, size_t, const char *__restrict,
+ __va_list)
+ __printflike(4, 0);
+int __snprintf_chk(char *__restrict, size_t, int, size_t,
+ const char *__restrict, ...)
+ __printflike(5, 6);
+int __vsnprintf_chk(char *__restrict, size_t, int, size_t,
+ const char *__restrict, __va_list)
+ __printflike(5, 0);
+char *__fgets_chk(char *, int, size_t, FILE *);
+__END_DECLS
+
+#if __SSP_FORTIFY_LEVEL > 0
+
+#define sprintf(str, ...) __extension__ ({ \
+ char *_ssp_str = (str); \
+ __builtin___sprintf_chk(_ssp_str, 0, __ssp_bos(_ssp_str), \
+ __VA_ARGS__); \
+})
+
+#define vsprintf(str, fmt, ap) __extension__ ({ \
+ char *_ssp_str = (str); \
+ __builtin___vsprintf_chk(_ssp_str, 0, __ssp_bos(_ssp_str), fmt, \
+ ap); \
+})
+
+#define snprintf(str, len, ...) __extension__ ({ \
+ char *_ssp_str = (str); \
+ __builtin___snprintf_chk(_ssp_str, len, 0, __ssp_bos(_ssp_str), \
+ __VA_ARGS__); \
+})
+
+#define vsnprintf(str, len, fmt, ap) __extension__ ({ \
+ char *_ssp_str = (str); \
+ __builtin___vsnprintf_chk(_ssp_str, len, 0, __ssp_bos(_ssp_str), \
+ fmt, ap); \
+})
+
+#define fgets(str, len, fp) __extension__ ({ \
+ char *_ssp_str = (str); \
+ __fgets_chk(_ssp_str, len, __ssp_bos(_ssp_str), fp); \
+})
+
+#endif /* __SSP_FORTIFY_LEVEL > 0 */
+
+#endif /* _SSP_STDIO_H_ */
diff --git a/include/ssp/string.h b/include/ssp/string.h
new file mode 100644
index 000000000000..ceb4ba2a2174
--- /dev/null
+++ b/include/ssp/string.h
@@ -0,0 +1,129 @@
+/* $NetBSD: string.h,v 1.14 2020/09/05 13:37:59 mrg Exp $ */
+
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SSP_STRING_H_
+#define _SSP_STRING_H_
+
+#include <ssp/ssp.h>
+
+__BEGIN_DECLS
+void *__memcpy_chk(void *, const void *, size_t, size_t);
+void *__memmove_chk(void *, const void *, size_t, size_t);
+void *__memset_chk(void *, int, size_t, size_t);
+char *__stpcpy_chk(char *, const char *, size_t);
+char *__stpncpy_chk(char *, const char *, size_t, size_t);
+char *__strcat_chk(char *, const char *, size_t);
+char *__strcpy_chk(char *, const char *, size_t);
+char *__strncat_chk(char *, const char *, size_t, size_t);
+char *__strncpy_chk(char *, const char *, size_t, size_t);
+__END_DECLS
+
+#if __SSP_FORTIFY_LEVEL > 0
+
+#define __ssp_bos_check3_typed_var(fun, dsttype, dsrvar, dst, srctype, srcvar, \
+ src, lenvar, len) __extension__ ({ \
+ srctype srcvar = (src); \
+ dsttype dstvar = (dst); \
+ size_t lenvar = (len); \
+ ((__ssp_bos0(dstvar) != (size_t)-1) ? \
+ __builtin___ ## fun ## _chk(dstvar, srcvar, lenvar, \
+ __ssp_bos0(dstvar)) : \
+ __ ## fun ## _ichk(dstvar, srcvar, lenvar)); \
+})
+
+#define __ssp_bos_check3_typed(fun, dsttype, dst, srctype, src, len) \
+ __ssp_bos_check3_typed_var(fun, dsttype, __ssp_var(dstv), dst, \
+ srctype, __ssp_var(srcv), src, __ssp_var(lenv), len)
+
+#define __ssp_bos_check3(fun, dst, src, len) \
+ __ssp_bos_check3_typed_var(fun, void *, __ssp_var(dstv), dst, \
+ const void *, __ssp_var(srcv), src, __ssp_var(lenv), len)
+
+#define __ssp_bos_check2_var(fun, dstvar, dst, srcvar, src) __extension__ ({ \
+ const void *srcvar = (src); \
+ void *dstvar = (dst); \
+ ((__ssp_bos0(dstvar) != (size_t)-1) ? \
+ __builtin___ ## fun ## _chk(dstvar, srcvar, \
+ __ssp_bos0(dstvar)) : \
+ __ ## fun ## _ichk(dstvar, srcvar)); \
+})
+
+#define __ssp_bos_check2(fun, dst, src) \
+ __ssp_bos_check2_var(fun, __ssp_var(dstv), dst, __ssp_var(srcv), src)
+
+#define __ssp_bos_icheck3_restrict(fun, type1, type2) \
+static __inline type1 __ ## fun ## _ichk(type1 __restrict, type2 __restrict, size_t); \
+static __inline __attribute__((__always_inline__)) type1 \
+__ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src, size_t len) { \
+ return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); \
+}
+
+#define __ssp_bos_icheck3(fun, type1, type2) \
+static __inline type1 __ ## fun ## _ichk(type1, type2, size_t); \
+static __inline __attribute__((__always_inline__)) type1 \
+__ ## fun ## _ichk(type1 dst, type2 src, size_t len) { \
+ return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); \
+}
+
+#define __ssp_bos_icheck2_restrict(fun, type1, type2) \
+static __inline type1 __ ## fun ## _ichk(type1, type2); \
+static __inline __attribute__((__always_inline__)) type1 \
+__ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src) { \
+ return __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)); \
+}
+
+__BEGIN_DECLS
+__ssp_bos_icheck3_restrict(memcpy, void *, const void *)
+__ssp_bos_icheck3(memmove, void *, const void *)
+__ssp_bos_icheck3(memset, void *, int)
+__ssp_bos_icheck2_restrict(stpcpy, char *, const char *)
+__ssp_bos_icheck3_restrict(stpncpy, char *, const char *)
+__ssp_bos_icheck2_restrict(strcpy, char *, const char *)
+__ssp_bos_icheck2_restrict(strcat, char *, const char *)
+__ssp_bos_icheck3_restrict(strncpy, char *, const char *)
+__ssp_bos_icheck3_restrict(strncat, char *, const char *)
+__END_DECLS
+
+#define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len)
+#define memmove(dst, src, len) __ssp_bos_check3(memmove, dst, src, len)
+#define memset(dst, val, len) \
+ __ssp_bos_check3_typed(memset, void *, dst, int, val, len)
+#define stpcpy(dst, src) __ssp_bos_check2(stpcpy, dst, src)
+#define stpncpy(dst, src, len) __ssp_bos_check3(stpncpy, dst, src, len)
+#define strcpy(dst, src) __ssp_bos_check2(strcpy, dst, src)
+#define strcat(dst, src) __ssp_bos_check2(strcat, dst, src)
+#define strncpy(dst, src, len) __ssp_bos_check3(strncpy, dst, src, len)
+#define strncat(dst, src, len) __ssp_bos_check3(strncat, dst, src, len)
+
+#endif /* __SSP_FORTIFY_LEVEL > 0 */
+#endif /* _SSP_STRING_H_ */
diff --git a/include/ssp/strings.h b/include/ssp/strings.h
new file mode 100644
index 000000000000..51b11a14ee87
--- /dev/null
+++ b/include/ssp/strings.h
@@ -0,0 +1,67 @@
+/* $NetBSD: strings.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */
+
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SSP_STRINGS_H_
+#define _SSP_STRINGS_H_
+
+#include <ssp/ssp.h>
+#include <string.h>
+
+#if __SSP_FORTIFY_LEVEL > 0
+
+#define _ssp_bcopy(srcvar, src, dstvar, dst, lenvar, len) __extension__ ({ \
+ const void *srcvar = (src); \
+ void *dstvar = (dst); \
+ size_t lenvar = (len); \
+ ((__ssp_bos0(dstvar) != (size_t)-1) ? \
+ __builtin___memmove_chk(dstvar, srcvar, lenvar, \
+ __ssp_bos0(dstvar)) : \
+ __memmove_ichk(dstvar, srcvar, lenvar)); \
+})
+
+#define bcopy(src, dst, len) \
+ _ssp_bcopy(__ssp_var(srcv), src, __ssp_var(dstv), dst, __ssp_var(lenv), len)
+
+#define _ssp_bzero(dstvar, dst, lenvar, len) __extension__ ({ \
+ void *dstvar = (dst); \
+ size_t lenvar = (len); \
+ ((__ssp_bos0(dstvar) != (size_t)-1) ? \
+ __builtin___memset_chk(dstvar, 0, lenvar, \
+ __ssp_bos0(dstvar)) : \
+ __memset_ichk(dstvar, 0, lenvar)); \
+})
+
+#define bzero(dst, len) _ssp_bzero(__ssp_var(dstv), dst, __ssp_var(lenv), len)
+
+#endif /* __SSP_FORTIFY_LEVEL > 0 */
+#endif /* _SSP_STRINGS_H_ */
diff --git a/include/ssp/unistd.h b/include/ssp/unistd.h
new file mode 100644
index 000000000000..bcd3664116cc
--- /dev/null
+++ b/include/ssp/unistd.h
@@ -0,0 +1,58 @@
+/* $NetBSD: unistd.h,v 1.7 2015/06/25 18:41:03 joerg Exp $ */
+
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SSP_UNISTD_H_
+#define _SSP_UNISTD_H_
+
+#include <ssp/ssp.h>
+
+#if __SSP_FORTIFY_LEVEL > 0
+__BEGIN_DECLS
+
+#ifndef _FORTIFY_SOURCE_read
+#define _FORTIFY_SOURCE_read read
+#endif
+
+__ssp_redirect0(ssize_t, _FORTIFY_SOURCE_read, (int __fd, void *__buf,
+ size_t __len), (__fd, __buf, __len));
+
+__ssp_redirect(ssize_t, readlink, (const char *__restrict __path, \
+ char *__restrict __buf, size_t __len), (__path, __buf, __len));
+
+__ssp_redirect_raw(char *, getcwd, getcwd, (char *__buf, size_t __len),
+ (__buf, __len), __buf != 0, __ssp_bos);
+
+__END_DECLS
+
+#endif /* __SSP_FORTIFY_LEVEL > 0 */
+#endif /* _SSP_UNISTD_H_ */
diff --git a/include/stdio.h b/include/stdio.h
index fe7a6f7d6f82..ea53816cf1d4 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -530,4 +530,7 @@ extern int __isthreaded;
__END_DECLS
__NULLABILITY_PRAGMA_POP
+#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#include <ssp/stdio.h>
+#endif
#endif /* !_STDIO_H_ */
diff --git a/include/string.h b/include/string.h
index 597308020cdb..ce605117daa6 100644
--- a/include/string.h
+++ b/include/string.h
@@ -168,4 +168,7 @@ errno_t memset_s(void *, rsize_t, int, rsize_t);
#endif /* __EXT1_VISIBLE */
__END_DECLS
+#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#include <ssp/string.h>
+#endif
#endif /* _STRING_H_ */
diff --git a/include/strings.h b/include/strings.h
index fde007186e04..511f7c03cb3c 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -68,4 +68,7 @@ int strncasecmp(const char *, const char *, size_t) __pure;
#endif
__END_DECLS
+#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#include <ssp/strings.h>
+#endif
#endif /* _STRINGS_H_ */
diff --git a/include/sysexits.h b/include/sysexits.h
index f7247cc80080..3b24e131c647 100644
--- a/include/sysexits.h
+++ b/include/sysexits.h
@@ -35,9 +35,10 @@
/*
* SYSEXITS.H -- Exit status codes for system programs.
*
- * This include file attempts to categorize possible error
- * exit statuses for system programs, notably delivermail
- * and the Berkeley network.
+ * This include file attempts to categorize error exit statuses
+ * for system programs, notably sendmail. These values exist only
+ * for interface compatibility, and are deprecated for FreeBSD
+ * base software.
*
* Error numbers begin at EX__BASE to reduce the possibility of
* clashing with other exit statuses that random programs may
diff --git a/include/unistd.h b/include/unistd.h
index e4e5c62fbb67..48155bb2971b 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -37,6 +37,10 @@
#include <sys/_null.h>
#include <sys/_types.h>
+#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#include <ssp/unistd.h>
+#endif
+
#ifndef _GID_T_DECLARED
typedef __gid_t gid_t;
#define _GID_T_DECLARED
diff --git a/lib/Makefile b/lib/Makefile
index 6135cff10c15..5696fa4aa593 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -78,6 +78,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \
libnetbsd \
libnetmap \
libnv \
+ libnvmf \
libopenbsd \
libpam \
libpathconv \
diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc
index 687fb1656937..941c98e43c9a 100644
--- a/lib/clang/include/VCSVersion.inc
+++ b/lib/clang/include/VCSVersion.inc
@@ -1,8 +1,8 @@
-#define LLVM_REVISION "llvmorg-18.1.4-0-ge6c3289804a6"
+#define LLVM_REVISION "llvmorg-18.1.6-0-g1118c2e05e67"
#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"
-#define CLANG_REVISION "llvmorg-18.1.4-0-ge6c3289804a6"
+#define CLANG_REVISION "llvmorg-18.1.6-0-g1118c2e05e67"
#define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git"
-#define LLDB_REVISION "llvmorg-18.1.4-0-ge6c3289804a6"
+#define LLDB_REVISION "llvmorg-18.1.6-0-g1118c2e05e67"
#define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git"
diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc
index 536f72efec52..405ee341dfcd 100644
--- a/lib/clang/include/clang/Basic/Version.inc
+++ b/lib/clang/include/clang/Basic/Version.inc
@@ -1,8 +1,8 @@
-#define CLANG_VERSION 18.1.4
-#define CLANG_VERSION_STRING "18.1.4"
+#define CLANG_VERSION 18.1.6
+#define CLANG_VERSION_STRING "18.1.6"
#define CLANG_VERSION_MAJOR 18
#define CLANG_VERSION_MAJOR_STRING "18"
#define CLANG_VERSION_MINOR 1
-#define CLANG_VERSION_PATCHLEVEL 4
+#define CLANG_VERSION_PATCHLEVEL 6
#define CLANG_VENDOR "FreeBSD "
diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc
index 66642a489e94..1de090a4b4d0 100644
--- a/lib/clang/include/lld/Common/Version.inc
+++ b/lib/clang/include/lld/Common/Version.inc
@@ -1,4 +1,4 @@
// Local identifier in __FreeBSD_version style
#define LLD_FREEBSD_VERSION 1500000
-#define LLD_VERSION_STRING "18.1.4 (FreeBSD llvmorg-18.1.4-0-ge6c3289804a6-" __XSTRING(LLD_FREEBSD_VERSION) ")"
+#define LLD_VERSION_STRING "18.1.6 (FreeBSD llvmorg-18.1.6-0-g1118c2e05e67-" __XSTRING(LLD_FREEBSD_VERSION) ")"
diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc
index 1fc1a4d88b7b..c693f099ccff 100644
--- a/lib/clang/include/lldb/Version/Version.inc
+++ b/lib/clang/include/lldb/Version/Version.inc
@@ -1,6 +1,6 @@
-#define LLDB_VERSION 18.1.4
-#define LLDB_VERSION_STRING "18.1.4"
+#define LLDB_VERSION 18.1.6
+#define LLDB_VERSION_STRING "18.1.6"
#define LLDB_VERSION_MAJOR 18
#define LLDB_VERSION_MINOR 1
-#define LLDB_VERSION_PATCH 4
+#define LLDB_VERSION_PATCH 6
/* #undef LLDB_FULL_VERSION_STRING */
diff --git a/lib/clang/include/llvm/Config/AsmParsers.def b/lib/clang/include/llvm/Config/AsmParsers.def
index afd86d898673..3dccab75a285 100644
--- a/lib/clang/include/llvm/Config/AsmParsers.def
+++ b/lib/clang/include/llvm/Config/AsmParsers.def
@@ -42,9 +42,6 @@ LLVM_ASM_PARSER(PowerPC)
#ifdef LLVM_TARGET_ENABLE_RISCV
LLVM_ASM_PARSER(RISCV)
#endif
-#ifdef LLVM_TARGET_ENABLE_SPARC
-LLVM_ASM_PARSER(Sparc)
-#endif
#ifdef LLVM_TARGET_ENABLE_X86
LLVM_ASM_PARSER(X86)
#endif
diff --git a/lib/clang/include/llvm/Config/AsmPrinters.def b/lib/clang/include/llvm/Config/AsmPrinters.def
index ffcca0730101..649b8353c926 100644
--- a/lib/clang/include/llvm/Config/AsmPrinters.def
+++ b/lib/clang/include/llvm/Config/AsmPrinters.def
@@ -42,9 +42,6 @@ LLVM_ASM_PRINTER(PowerPC)
#ifdef LLVM_TARGET_ENABLE_RISCV
LLVM_ASM_PRINTER(RISCV)
#endif
-#ifdef LLVM_TARGET_ENABLE_SPARC
-LLVM_ASM_PRINTER(Sparc)
-#endif
#ifdef LLVM_TARGET_ENABLE_X86
LLVM_ASM_PRINTER(X86)
#endif
diff --git a/lib/clang/include/llvm/Config/Disassemblers.def b/lib/clang/include/llvm/Config/Disassemblers.def
index 18e29e3a09ff..c44fa4e303e2 100644
--- a/lib/clang/include/llvm/Config/Disassemblers.def
+++ b/lib/clang/include/llvm/Config/Disassemblers.def
@@ -42,9 +42,6 @@ LLVM_DISASSEMBLER(PowerPC)
#ifdef LLVM_TARGET_ENABLE_RISCV
LLVM_DISASSEMBLER(RISCV)
#endif
-#ifdef LLVM_TARGET_ENABLE_SPARC
-LLVM_DISASSEMBLER(Sparc)
-#endif
#ifdef LLVM_TARGET_ENABLE_X86
LLVM_DISASSEMBLER(X86)
#endif
diff --git a/lib/clang/include/llvm/Config/Targets.def b/lib/clang/include/llvm/Config/Targets.def
index 604fd9337048..d3332a51a2cc 100644
--- a/lib/clang/include/llvm/Config/Targets.def
+++ b/lib/clang/include/llvm/Config/Targets.def
@@ -41,9 +41,6 @@ LLVM_TARGET(PowerPC)
#ifdef LLVM_TARGET_ENABLE_RISCV
LLVM_TARGET(RISCV)
#endif
-#ifdef LLVM_TARGET_ENABLE_SPARC
-LLVM_TARGET(Sparc)
-#endif
#ifdef LLVM_TARGET_ENABLE_X86
LLVM_TARGET(X86)
#endif
diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h
index a017437dc568..65e903427a83 100644
--- a/lib/clang/include/llvm/Config/config.h
+++ b/lib/clang/include/llvm/Config/config.h
@@ -344,10 +344,10 @@
#define PACKAGE_NAME "LLVM"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "LLVM 18.1.4"
+#define PACKAGE_STRING "LLVM 18.1.6"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "18.1.4"
+#define PACKAGE_VERSION "18.1.6"
/* Define to the vendor of this package. */
/* #undef PACKAGE_VENDOR */
diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h
index fb878ccdde4d..372a69017f79 100644
--- a/lib/clang/include/llvm/Config/llvm-config.h
+++ b/lib/clang/include/llvm/Config/llvm-config.h
@@ -130,11 +130,7 @@
#endif
/* Define if the Sparc target is built in */
-#ifdef LLVM_TARGET_ENABLE_SPARC
-#define LLVM_HAS_SPARC_TARGET 1
-#else
#define LLVM_HAS_SPARC_TARGET 0
-#endif
/* Define if the SPIRV target is built in */
#define LLVM_HAS_SPIRV_TARGET 0
@@ -180,10 +176,10 @@
#define LLVM_VERSION_MINOR 1
/* Patch version of the LLVM API */
-#define LLVM_VERSION_PATCH 4
+#define LLVM_VERSION_PATCH 6
/* LLVM version string */
-#define LLVM_VERSION_STRING "18.1.4"
+#define LLVM_VERSION_STRING "18.1.6"
/* Whether LLVM records statistics for use with GetStatistics(),
* PrintStatistics() or PrintStatisticsJSON()
diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h
index e324de0f9fc6..9c8ecebe02de 100644
--- a/lib/clang/include/llvm/Support/VCSRevision.h
+++ b/lib/clang/include/llvm/Support/VCSRevision.h
@@ -1,2 +1,2 @@
-#define LLVM_REVISION "llvmorg-18.1.4-0-ge6c3289804a6"
+#define LLVM_REVISION "llvmorg-18.1.6-0-g1118c2e05e67"
#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"
diff --git a/lib/csu/aarch64/crt1_s.S b/lib/csu/aarch64/crt1_s.S
index 981cf4653efd..1fb60f756a7a 100644
--- a/lib/csu/aarch64/crt1_s.S
+++ b/lib/csu/aarch64/crt1_s.S
@@ -44,8 +44,8 @@ ENTRY(_start)
add x2, x1, x0, lsl #3 /* env is after argv */
add x2, x2, #8 /* argv is null terminated */
#ifdef PIC
- adrp x4, main
- add x4, x4, :lo12:main
+ adrp x4, :got:main
+ ldr x4, [x4, :got_lo12:main]
#else
ldr x4, =main
#endif
diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8
index 098ba4d0485e..d34e15dc4ad8 100644
--- a/lib/geom/eli/geli.8
+++ b/lib/geom/eli/geli.8
@@ -1242,10 +1242,8 @@ after the first time a provider is attached and before it is
initialized in this way.
.Sh SEE ALSO
.Xr crypto 4 ,
-.Xr gbde 4 ,
.Xr geom 4 ,
.Xr loader.conf 5 ,
-.Xr gbde 8 ,
.Xr geom 8 ,
.Xr crypto 9
.Sh HISTORY
diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8
index a133b4abff72..da958b52befd 100644
--- a/lib/geom/label/glabel.8
+++ b/lib/geom/label/glabel.8
@@ -115,6 +115,9 @@ EXT2FS (directory
.It
NTFS (directory
.Pa /dev/ntfs/ ) .
+.It
+Swap Linux (directory
+.Pa /dev/swaplinux/ ) .
.El
.Pp
Support for partition metadata is implemented for:
@@ -134,7 +137,7 @@ e.g.
.Pa /dev/diskid/DISK-6QG3Z026 .
.Pp
Generic labels created and managed solely by
-.Xr glabel 8
+.Nm
are created in the
.Pa /dev/label/
directory.
@@ -161,7 +164,8 @@ device will be one sector smaller than the device from which it was created.
.Pp
Note that for all label types, nested GEOM classes will cause additional
device nodes to be created, with context-specific data appended to their
-names. E.g. for every node like
+names.
+E.g. for every node like
.Pa /dev/label/bigdisk
there will be additional entries for any partitions which the device
contains, like
@@ -169,6 +173,17 @@ contains, like
and
.Pa /dev/label/bigdiskp1a .
.Pp
+.Nm
+requires write access to a device to create, modify, and destroy
+"automatic" labels.
+It will fail to persist changes if they are applied while a file
+system on the device is currently mounted.
+To ensure that modifications are stored across a reboot, the file system
+needs to be unmounted first.
+If the device holds the system's root file system, entering into
+single user mode and mounting in read-only mode is required to persist
+the change.
+.Pp
The first argument to
.Nm
indicates an action to be performed:
@@ -249,12 +264,13 @@ Most
.Nm LABEL
providers implement a
.Xr sysctl 8
-flag and a tunable variable named in the above format. This flag
-controls if the label provider will be active, tasting devices
+flag and a tunable variable named in the above format.
+This flag controls if the label provider will be active, tasting devices
and creating label nodes in the
-.Xr devfs 5
-tree. It is sometimes desirable to disable certain label types if
-they conflict with other classes in complex GEOM topologies.
+.Xr devfs 4
+tree.
+It is sometimes desirable to disable certain label types if they
+conflict with other classes in complex GEOM topologies.
.El
.Sh EXIT STATUS
Exit status is 0 on success, and 1 if the command fails.
diff --git a/lib/geom/shsec/gshsec.8 b/lib/geom/shsec/gshsec.8
index 9430fde13c52..d4477de3a71e 100644
--- a/lib/geom/shsec/gshsec.8
+++ b/lib/geom/shsec/gshsec.8
@@ -116,7 +116,6 @@ detected and connected, making the secret available via the
device.
.Sh SEE ALSO
.Xr geom 4 ,
-.Xr gbde 8 ,
.Xr geom 8 ,
.Xr newfs 8
.Sh HISTORY
diff --git a/lib/libarchive/Makefile.inc b/lib/libarchive/Makefile.inc
index 153f96b12165..755a39ec01e8 100644
--- a/lib/libarchive/Makefile.inc
+++ b/lib/libarchive/Makefile.inc
@@ -4,7 +4,8 @@
LIBADD= z bz2 lzma bsdxml zstd
CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 \
- -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1
+ -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1 \
+ -DHAVE_SYSCONF=1
CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
.if ${MK_OPENSSL} != "no"
diff --git a/lib/libarchive/tests/Makefile b/lib/libarchive/tests/Makefile
index e14b37621e5c..dc3767c319c3 100644
--- a/lib/libarchive/tests/Makefile
+++ b/lib/libarchive/tests/Makefile
@@ -188,6 +188,7 @@ TESTS_SRCS= \
test_read_format_ustar_filename.c \
test_read_format_warc.c \
test_read_format_xar.c \
+ test_read_format_xar_doublelink.c \
test_read_format_zip.c \
test_read_format_zip_7075_utf8_paths.c \
test_read_format_zip_comment_stored.c \
@@ -611,6 +612,7 @@ ${PACKAGE}FILES+= test_read_format_ustar_filename_cp866.tar.Z.uu
${PACKAGE}FILES+= test_read_format_ustar_filename_eucjp.tar.Z.uu
${PACKAGE}FILES+= test_read_format_ustar_filename_koi8r.tar.Z.uu
${PACKAGE}FILES+= test_read_format_warc.warc.uu
+${PACKAGE}FILES+= test_read_format_xar_doublelink.xar.uu
${PACKAGE}FILES+= test_read_format_zip.zip.uu
${PACKAGE}FILES+= test_read_format_zip_7075_utf8_paths.zip.uu
${PACKAGE}FILES+= test_read_format_zip_7z_deflate.zip.uu
@@ -679,6 +681,7 @@ ${PACKAGE}FILES+= test_splitted_rar_seek_support_aa.uu
${PACKAGE}FILES+= test_splitted_rar_seek_support_ab.uu
${PACKAGE}FILES+= test_splitted_rar_seek_support_ac.uu
${PACKAGE}FILES+= test_write_disk_appledouble.cpio.gz.uu
+${PACKAGE}FILES+= test_write_disk_appledouble_zip.zip.uu
${PACKAGE}FILES+= test_write_disk_hfs_compression.tgz.uu
${PACKAGE}FILES+= test_write_disk_mac_metadata.tar.gz.uu
${PACKAGE}FILES+= test_write_disk_no_hfs_compression.tgz.uu
diff --git a/lib/libauditd/Makefile b/lib/libauditd/Makefile
index 26da06489d05..76ffb70bbe25 100644
--- a/lib/libauditd/Makefile
+++ b/lib/libauditd/Makefile
@@ -5,6 +5,7 @@ OPENBSMDIR= ${SRCTOP}/contrib/openbsm
_LIBAUDITDDIR= ${OPENBSMDIR}/libauditd
_LIBBSMDIR= ${OPENBSMDIR}/libbsm
+PACKAGE= audit
LIB= auditd
.PATH: ${_LIBAUDITDDIR}
diff --git a/lib/libbsm/Makefile b/lib/libbsm/Makefile
index 54af604eaa8e..67802eef62ac 100644
--- a/lib/libbsm/Makefile
+++ b/lib/libbsm/Makefile
@@ -60,12 +60,6 @@ MAN= libbsm.3 \
# they're not all libbsm parts.
#
MAN+= audit.2 \
- audit.log.5 \
- audit_class.5 \
- audit_control.5 \
- audit_event.5 \
- audit_user.5 \
- audit_warn.5 \
auditctl.2 \
auditon.2 \
getaudit.2 \
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 674986a7e065..c70e57498771 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -19,6 +19,8 @@ LIBC_ARCH=${M}
LIBC_ARCH=${MACHINE_CPUARCH}
.endif
+CFLAGS+=-D_FORTIFY_SOURCE_read=_read
+
# All library objects contain FreeBSD revision strings by default; they may be
# excluded as a space-saving measure. To produce a library that does
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
diff --git a/lib/libc/amd64/string/bcopy.c b/lib/libc/amd64/string/bcopy.c
index 868567711e8b..0dee529fb9df 100644
--- a/lib/libc/amd64/string/bcopy.c
+++ b/lib/libc/amd64/string/bcopy.c
@@ -4,6 +4,8 @@
#include <string.h>
+#undef bcopy /* _FORTIFY_SOURCE */
+
void
bcopy(const void *src, void *dst, size_t len)
{
diff --git a/lib/libc/amd64/string/bzero.c b/lib/libc/amd64/string/bzero.c
index 92adb2bb4f0e..d82f3061865b 100644
--- a/lib/libc/amd64/string/bzero.c
+++ b/lib/libc/amd64/string/bzero.c
@@ -4,6 +4,8 @@
#include <string.h>
+#undef bzero /* _FORTIFY_SOURCE */
+
void
bzero(void *b, size_t len)
{
diff --git a/lib/libc/amd64/string/strncat.c b/lib/libc/amd64/string/strncat.c
index 33b278ac5e04..2c63ab50b3c3 100644
--- a/lib/libc/amd64/string/strncat.c
+++ b/lib/libc/amd64/string/strncat.c
@@ -8,6 +8,8 @@
#include <string.h>
+#undef strncat /* _FORTIFY_SOURCE */
+
void *__memccpy(void *restrict, const void *restrict, int, size_t);
char *
diff --git a/lib/libc/amd64/string/strncpy.c b/lib/libc/amd64/string/strncpy.c
index b3d868787fbe..0e7a58222aa8 100644
--- a/lib/libc/amd64/string/strncpy.c
+++ b/lib/libc/amd64/string/strncpy.c
@@ -29,6 +29,8 @@
#include <sys/cdefs.h>
#include <string.h>
+#undef strncpy /* _FORTIFY_SOURCE */
+
char *__stpncpy(char *restrict, const char *restrict, size_t);
char *
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index 9871029a84b5..340545114114 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -29,7 +29,7 @@
.\"
.\" Copyright (c) 1991 Sun Microsystems, Inc.
.\"
-.Dd May 14, 2020
+.Dd May 7, 2024
.Dt DLOPEN 3
.Os
.Sh NAME
@@ -199,6 +199,10 @@ The
function can be used by the code that needs to perform
additional checks on the loaded objects, to prevent races with
symlinking or renames.
+Applications sandboxed using
+.Xr capsicum 4
+can also make beneficial use of
+.Fn fdlopen .
.Pp
The
.Fn dlsym
diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3
index 8f866e5ab321..ce289ebf502a 100644
--- a/lib/libc/gen/exec.3
+++ b/lib/libc/gen/exec.3
@@ -344,7 +344,7 @@ function first appeared in
The
.Fn execvpe
function first appeared in
-.Fx 15.0 .
+.Fx 14.1 .
.Sh BUGS
The type of the
.Fa argv
diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c
index 191fa50a599b..18d8ce668274 100644
--- a/lib/libc/gen/getcwd.c
+++ b/lib/libc/gen/getcwd.c
@@ -40,6 +40,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <ssp/ssp.h>
#include "un-namespace.h"
#include "gen-private.h"
@@ -51,7 +52,7 @@
extern int __getcwd(char *, size_t);
char *
-getcwd(char *pt, size_t size)
+__ssp_real(getcwd)(char *pt, size_t size)
{
struct dirent *dp;
DIR *dir = NULL;
diff --git a/lib/libc/net/sctp_recvmsg.3 b/lib/libc/net/sctp_recvmsg.3
index 53aae5dd2527..7bcdcc74f7a1 100644
--- a/lib/libc/net/sctp_recvmsg.3
+++ b/lib/libc/net/sctp_recvmsg.3
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 2, 2024
+.Dd May 2, 2024
.Dt SCTP_RECVMSG 3
.Os
.Sh NAME
@@ -40,8 +40,8 @@
.In netinet/sctp.h
.Ft ssize_t
.Fo sctp_recvmsg
-.Fa "int s" "void *msg" "size_t len" "struct sockaddr * restrict from"
-.Fa "socklen_t * restrict fromlen" "struct sctp_sndrcvinfo *sinfo" "int *flags"
+.Fa "int s" "void *msg" "size_t len" "struct sockaddr *from"
+.Fa "socklen_t *fromlen" "struct sctp_sndrcvinfo *sinfo" "int *flags"
.Fc
.Ft ssize_t
.Fo sctp_recvv
diff --git a/lib/libc/posix1e/posix1e.3 b/lib/libc/posix1e/posix1e.3
index 8eef3bb21724..1dbe12427da1 100644
--- a/lib/libc/posix1e/posix1e.3
+++ b/lib/libc/posix1e/posix1e.3
@@ -46,7 +46,7 @@ its interfaces are widely used.
implements POSIX.1e interface for access control lists, described in
.Xr acl 3 ,
and supports ACLs on the
-.Xr ffs 7
+.Xr ffs 4
file system; ACLs must be administratively enabled using
.Xr tunefs 8 .
.Pp
@@ -95,7 +95,7 @@ for mandatory access control labels.
.Xr libcasper 3 ,
.Xr mac 3 ,
.Xr capsicum 4 ,
-.Xr ffs 7 ,
+.Xr ffs 4 ,
.Xr getfmac 8 ,
.Xr setfmac 8 ,
.Xr tunefs 8 ,
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 7481d3ecf240..f34dc322d0bb 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -453,7 +453,9 @@ p_ere_exp(struct parse *p, struct branchc *bc)
case '*':
case '+':
case '?':
+#ifndef NO_STRICT_REGEX
case '{':
+#endif
SETERROR(REG_BADRPT);
break;
case '.':
@@ -536,6 +538,11 @@ p_ere_exp(struct parse *p, struct branchc *bc)
break;
}
break;
+#ifdef NO_STRICT_REGEX
+ case '{': /* okay as ordinary except if digit follows */
+ (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
+ /* FALLTHROUGH */
+#endif
default:
if (p->error != 0)
return (false);
@@ -549,11 +556,19 @@ p_ere_exp(struct parse *p, struct branchc *bc)
return (false);
c = PEEK();
/* we call { a repetition if followed by a digit */
- if (!( c == '*' || c == '+' || c == '?' || c == '{'))
+ if (!( c == '*' || c == '+' || c == '?' ||
+#ifdef NO_STRICT_REGEX
+ (c == '{' && MORE2() && isdigit((uch)PEEK2()))
+#else
+ c == '{'
+#endif
+ ))
return (false); /* no repetition, we're done */
+#ifndef NO_STRICT_REGEX
else if (c == '{')
(void)REQUIRE(MORE2() && \
(isdigit((uch)PEEK2()) || PEEK2() == ','), REG_BADRPT);
+#endif
NEXT();
(void)REQUIRE(!wascaret, REG_BADRPT);
@@ -892,6 +907,9 @@ p_simp_re(struct parse *p, struct branchc *bc)
(void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
break;
case BACKSL|')': /* should not get here -- must be user */
+#ifdef NO_STRICT_REGEX
+ case BACKSL|'}':
+#endif
SETERROR(REG_EPAREN);
break;
case BACKSL|'1':
diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map
index 5bf364f28d81..e4fecb83ec66 100644
--- a/lib/libc/rpc/Symbol.map
+++ b/lib/libc/rpc/Symbol.map
@@ -8,37 +8,6 @@ FBSD_1.0 {
xdr_desargs;
xdr_desresp;
- /* From yp_xdr.c (generated by rpcgen - include/rpcsvc/yp.x) */
- xdr_domainname;
- xdr_keydat;
- xdr_mapname;
- xdr_peername;
- xdr_valdat;
- xdr_ypbind_binding;
- xdr_ypbind_resp;
- xdr_ypbind_resptype;
- xdr_ypbind_setdom;
- xdr_ypmap_parms;
- xdr_ypmaplist;
- xdr_yppush_status;
- xdr_yppushresp_xfr;
- xdr_ypreq_key;
- xdr_ypreq_nokey;
- xdr_ypreq_xfr;
- xdr_ypreqtype;
- xdr_yprequest;
- xdr_ypresp_all;
- xdr_ypresp_key_val;
- xdr_ypresp_maplist;
- xdr_ypresp_master;
- xdr_ypresp_order;
- xdr_ypresp_val;
- xdr_ypresp_xfr;
- xdr_ypresponse;
- xdr_ypresptype;
- xdr_ypstat;
- xdr_ypxfrstat;
-
authdes_seccreate;
authdes_pk_seccreate;
authnone_create;
diff --git a/lib/libc/secure/Makefile.inc b/lib/libc/secure/Makefile.inc
index 8574c5a05dc5..28289127c7a6 100644
--- a/lib/libc/secure/Makefile.inc
+++ b/lib/libc/secure/Makefile.inc
@@ -3,6 +3,17 @@
.PATH: ${LIBC_SRCTOP}/secure
+# _FORTIFY_SOURCE
+SRCS+= fgets_chk.c memcpy_chk.c memmove_chk.c memset_chk.c \
+ snprintf_chk.c sprintf_chk.c stpcpy_chk.c stpncpy_chk.c \
+ strcat_chk.c strcpy_chk.c strncat_chk.c strncpy_chk.c \
+ vsnprintf_chk.c vsprintf_chk.c
+
+CFLAGS.snprintf_chk.c+= -Wno-unused-parameter
+CFLAGS.sprintf_chk.c+= -Wno-unused-parameter
+CFLAGS.vsnprintf_chk.c+= -Wno-unused-parameter
+CFLAGS.vsprintf_chk.c+= -Wno-unused-parameter
+
# Sources common to both syscall interfaces:
SRCS+= stack_protector.c \
stack_protector_compat.c
diff --git a/lib/libc/secure/Symbol.map b/lib/libc/secure/Symbol.map
index 641f451b5421..0d854039955f 100644
--- a/lib/libc/secure/Symbol.map
+++ b/lib/libc/secure/Symbol.map
@@ -3,3 +3,20 @@ FBSD_1.0 {
__stack_chk_fail;
__stack_chk_guard;
};
+
+FBSD_1.8 {
+ __fgets_chk;
+ __memcpy_chk;
+ __memmove_chk;
+ __memset_chk;
+ __snprintf_chk;
+ __sprintf_chk;
+ __stpcpy_chk;
+ __stpncpy_chk;
+ __strcat_chk;
+ __strcpy_chk;
+ __strncat_chk;
+ __strncpy_chk;
+ __vsnprintf_chk;
+ __vsprintf_chk;
+};
diff --git a/lib/libc/secure/fgets_chk.c b/lib/libc/secure/fgets_chk.c
new file mode 100644
index 000000000000..72aa1d816ce1
--- /dev/null
+++ b/lib/libc/secure/fgets_chk.c
@@ -0,0 +1,54 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: fgets_chk.c,v 1.6 2009/02/05 05:41:51 lukem Exp $");
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <ssp/stdio.h>
+#include <ssp/string.h>
+#undef fgets
+
+char *
+__fgets_chk(char * __restrict buf, int len, size_t slen, FILE *fp)
+{
+ if (slen >= (size_t)INT_MAX)
+ return (fgets(buf, len, fp));
+
+ if (len >= 0 && (size_t)len > slen)
+ __chk_fail();
+
+ return (fgets(buf, len, fp));
+}
diff --git a/lib/libc/secure/memcpy_chk.c b/lib/libc/secure/memcpy_chk.c
new file mode 100644
index 000000000000..99cf2d5f13ff
--- /dev/null
+++ b/lib/libc/secure/memcpy_chk.c
@@ -0,0 +1,53 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: memcpy_chk.c,v 1.7 2015/05/13 19:57:16 joerg Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef memcpy
+
+#include "ssp_internal.h"
+
+void *
+__memcpy_chk(void * __restrict dst, const void * __restrict src, size_t len,
+ size_t slen)
+{
+ if (len > slen)
+ __chk_fail();
+
+ if (__ssp_overlap((const char *)src, (const char *)dst, len))
+ __chk_fail();
+
+ return (memcpy(dst, src, len));
+}
diff --git a/lib/libc/secure/memmove_chk.c b/lib/libc/secure/memmove_chk.c
new file mode 100644
index 000000000000..07f965d608fc
--- /dev/null
+++ b/lib/libc/secure/memmove_chk.c
@@ -0,0 +1,47 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: memmove_chk.c,v 1.6 2020/09/05 13:37:59 mrg Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef memmove
+
+void *
+__memmove_chk(void *dst, const void *src, size_t len,
+ size_t slen)
+{
+ if (len > slen)
+ __chk_fail();
+ return (memmove(dst, src, len));
+}
diff --git a/lib/libc/secure/memset_chk.c b/lib/libc/secure/memset_chk.c
new file mode 100644
index 000000000000..f337be98b46d
--- /dev/null
+++ b/lib/libc/secure/memset_chk.c
@@ -0,0 +1,46 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: memset_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef memset
+
+void *
+__memset_chk(void * __restrict dst, int val, size_t len, size_t slen)
+{
+ if (len > slen)
+ __chk_fail();
+ return (memset(dst, val, len));
+}
diff --git a/lib/libc/secure/snprintf_chk.c b/lib/libc/secure/snprintf_chk.c
new file mode 100644
index 000000000000..52ef874ede5b
--- /dev/null
+++ b/lib/libc/secure/snprintf_chk.c
@@ -0,0 +1,56 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: snprintf_chk.c,v 1.5 2008/04/28 20:23:00 martin Exp $");
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include <ssp/stdio.h>
+#undef vsnprintf
+
+int
+__snprintf_chk(char * __restrict buf, size_t len, int flags, size_t slen,
+ const char * __restrict fmt, ...)
+{
+ va_list ap;
+ int rv;
+
+ if (len > slen)
+ __chk_fail();
+
+ va_start(ap, fmt);
+ rv = vsnprintf(buf, len, fmt, ap);
+ va_end(ap);
+
+ return (rv);
+}
diff --git a/lib/libc/secure/sprintf_chk.c b/lib/libc/secure/sprintf_chk.c
new file mode 100644
index 000000000000..d4c42ccba3ce
--- /dev/null
+++ b/lib/libc/secure/sprintf_chk.c
@@ -0,0 +1,61 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: sprintf_chk.c,v 1.6 2009/02/05 05:40:36 lukem Exp $");
+
+#include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#include <ssp/stdio.h>
+#undef vsnprintf
+#undef vsprintf
+
+int
+__sprintf_chk(char * __restrict buf, int flags, size_t slen,
+ const char * __restrict fmt, ...)
+{
+ va_list ap;
+ int rv;
+
+ va_start(ap, fmt);
+ if (slen > (size_t)INT_MAX)
+ rv = vsprintf(buf, fmt, ap);
+ else {
+ if ((rv = vsnprintf(buf, slen, fmt, ap)) >= 0 &&
+ (size_t)rv >= slen)
+ __chk_fail();
+ }
+ va_end(ap);
+
+ return (rv);
+}
diff --git a/lib/libc/secure/ssp_internal.h b/lib/libc/secure/ssp_internal.h
new file mode 100644
index 000000000000..34e5981ba0ca
--- /dev/null
+++ b/lib/libc/secure/ssp_internal.h
@@ -0,0 +1,37 @@
+/* $NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $ */
+
+/*-
+ * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SECURE_SSP_INTERNAL_H_
+#define _SECURE_SSP_INTERNAL_H_
+
+#define __ssp_overlap(a, b, l) \
+ (((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l)))
+
+#endif /* _SECURE_SSP_INTERNAL_H_ */
diff --git a/lib/libc/secure/stpcpy_chk.c b/lib/libc/secure/stpcpy_chk.c
new file mode 100644
index 000000000000..72a4bfb8017a
--- /dev/null
+++ b/lib/libc/secure/stpcpy_chk.c
@@ -0,0 +1,55 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: stpcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef memcpy
+
+#include "ssp_internal.h"
+
+char *
+__stpcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen)
+{
+ size_t len = strlen(src);
+
+ if (len >= slen)
+ __chk_fail();
+
+ if (__ssp_overlap(src, dst, len))
+ __chk_fail();
+
+ (void)memcpy(dst, src, len + 1);
+ return (dst + len);
+}
diff --git a/lib/libc/secure/stpncpy_chk.c b/lib/libc/secure/stpncpy_chk.c
new file mode 100644
index 000000000000..dfd26133feed
--- /dev/null
+++ b/lib/libc/secure/stpncpy_chk.c
@@ -0,0 +1,53 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: stpncpy_chk.c,v 1.3 2015/05/09 15:42:21 christos Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef stpncpy
+
+#include "ssp_internal.h"
+
+char *
+__stpncpy_chk(char * __restrict dst, const char * __restrict src, size_t len,
+ size_t slen)
+{
+ if (len > slen)
+ __chk_fail();
+
+ if (__ssp_overlap(src, dst, len))
+ __chk_fail();
+
+ return (stpncpy(dst, src, len));
+}
diff --git a/lib/libc/secure/strcat_chk.c b/lib/libc/secure/strcat_chk.c
new file mode 100644
index 000000000000..202d084fddc9
--- /dev/null
+++ b/lib/libc/secure/strcat_chk.c
@@ -0,0 +1,60 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: strcat_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+
+char *
+__strcat_chk(char * __restrict dst, const char * __restrict src, size_t slen)
+{
+ char *d;
+
+ for (d = dst; *d; d++) {
+ if (slen-- == 0)
+ __chk_fail();
+ }
+
+ while (*src) {
+ if (slen-- == 0)
+ __chk_fail();
+ *d++ = *src++;
+ }
+
+ if (slen-- == 0)
+ __chk_fail();
+
+ *d = '\0';
+ return (dst);
+}
diff --git a/lib/libc/secure/strcpy_chk.c b/lib/libc/secure/strcpy_chk.c
new file mode 100644
index 000000000000..b89be466240d
--- /dev/null
+++ b/lib/libc/secure/strcpy_chk.c
@@ -0,0 +1,54 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: strcpy_chk.c,v 1.8 2015/05/09 15:42:21 christos Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef memcpy
+
+#include "ssp_internal.h"
+
+char *
+__strcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen)
+{
+ size_t len = strlen(src) + 1;
+
+ if (len > slen)
+ __chk_fail();
+
+ if (__ssp_overlap(src, dst, len))
+ __chk_fail();
+
+ return (memcpy(dst, src, len));
+}
diff --git a/lib/libc/secure/strncat_chk.c b/lib/libc/secure/strncat_chk.c
new file mode 100644
index 000000000000..94ef34675386
--- /dev/null
+++ b/lib/libc/secure/strncat_chk.c
@@ -0,0 +1,70 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: strncat_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
+
+#include <stdio.h>
+#include <string.h>
+
+#include <ssp/string.h>
+
+char *
+__strncat_chk(char * __restrict dst, const char * __restrict src, size_t len,
+ size_t slen)
+{
+ char *d;
+
+ if (len == 0)
+ return (dst);
+
+ if (len > slen)
+ __chk_fail();
+
+ for (d = dst; *d; d++) {
+ if (slen-- == 0)
+ __chk_fail();
+ }
+
+ do {
+ if ((*d = *src++) == '\0')
+ break;
+ if (slen-- == 0)
+ __chk_fail();
+ d++;
+ } while (--len != 0);
+
+ if (slen-- == 0)
+ __chk_fail();
+
+ *d = '\0';
+ return (dst);
+}
diff --git a/lib/libc/secure/strncpy_chk.c b/lib/libc/secure/strncpy_chk.c
new file mode 100644
index 000000000000..3a2c19796a39
--- /dev/null
+++ b/lib/libc/secure/strncpy_chk.c
@@ -0,0 +1,53 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: strncpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $");
+
+#include <string.h>
+
+#include <ssp/string.h>
+#undef strncpy
+
+#include "ssp_internal.h"
+
+char *
+__strncpy_chk(char * __restrict dst, const char * __restrict src, size_t len,
+ size_t slen)
+{
+ if (len > slen)
+ __chk_fail();
+
+ if (__ssp_overlap(src, dst, len))
+ __chk_fail();
+
+ return (strncpy(dst, src, len));
+}
diff --git a/lib/libc/secure/vsnprintf_chk.c b/lib/libc/secure/vsnprintf_chk.c
new file mode 100644
index 000000000000..c48e7bf929b1
--- /dev/null
+++ b/lib/libc/secure/vsnprintf_chk.c
@@ -0,0 +1,49 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: vsnprintf_chk.c,v 1.5 2008/04/28 20:23:00 martin Exp $");
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include <ssp/stdio.h>
+#undef vsnprintf
+
+int
+__vsnprintf_chk(char * __restrict buf, size_t len, int flags, size_t slen,
+ const char * __restrict fmt, va_list ap)
+{
+ if (len > slen)
+ __chk_fail();
+
+ return (vsnprintf(buf, len, fmt, ap));
+}
diff --git a/lib/libc/secure/vsprintf_chk.c b/lib/libc/secure/vsprintf_chk.c
new file mode 100644
index 000000000000..6855feb92f15
--- /dev/null
+++ b/lib/libc/secure/vsprintf_chk.c
@@ -0,0 +1,58 @@
+/*-
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2006 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: vsprintf_chk.c,v 1.6 2009/02/05 05:39:38 lukem Exp $");
+
+#include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#include <ssp/stdio.h>
+#undef vsprintf
+#undef vsnprintf
+
+int
+__vsprintf_chk(char * __restrict buf, int flags, size_t slen,
+ const char * __restrict fmt, va_list ap)
+{
+ int rv;
+
+ if (slen > (size_t)INT_MAX)
+ rv = vsprintf(buf, fmt, ap);
+ else {
+ if ((rv = vsnprintf(buf, slen, fmt, ap)) >= 0 &&
+ (size_t)rv >= slen)
+ __chk_fail();
+ }
+
+ return (rv);
+}
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c
index 19f68304efc1..504338c012a2 100644
--- a/lib/libc/stdio/fgets.c
+++ b/lib/libc/stdio/fgets.c
@@ -40,6 +40,8 @@
#include "local.h"
#include "libc_private.h"
+#undef fgets /* _FORTIFY_SOURCE */
+
/*
* Read at most n-1 characters from the given file.
* Stop when a newline has been read, or the count runs out.
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c
index 398f1596d2c5..607bb3770ccd 100644
--- a/lib/libc/stdio/snprintf.c
+++ b/lib/libc/stdio/snprintf.c
@@ -45,6 +45,8 @@
#include "local.h"
+#undef snprintf /* _FORTIFY_SOURCE */
+
int
snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...)
{
diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c
index 3b0e4c061b43..1cac21e98a46 100644
--- a/lib/libc/stdio/sprintf.c
+++ b/lib/libc/stdio/sprintf.c
@@ -43,6 +43,8 @@
#include "local.h"
#include "xlocale_private.h"
+#undef sprintf /* _FORTIFY_SOURCE */
+
int
sprintf(char * __restrict str, char const * __restrict fmt, ...)
{
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c
index 2213b20e3f1e..1e25e6757459 100644
--- a/lib/libc/stdio/vsnprintf.c
+++ b/lib/libc/stdio/vsnprintf.c
@@ -43,6 +43,8 @@
#include "local.h"
#include "xlocale_private.h"
+#undef vsnprintf /* _FORTIFY_SOURCE */
+
int
vsnprintf_l(char * __restrict str, size_t n, locale_t locale,
const char * __restrict fmt, __va_list ap)
diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c
index a478759a2471..298f969a1318 100644
--- a/lib/libc/stdio/vsprintf.c
+++ b/lib/libc/stdio/vsprintf.c
@@ -42,6 +42,8 @@
#include "local.h"
#include "xlocale_private.h"
+#undef vsprintf /* _FORTIFY_SOURCE */
+
int
vsprintf_l(char * __restrict str, locale_t locale,
const char * __restrict fmt, __va_list ap)
diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c b/lib/libc/stdlib/cxa_thread_atexit_impl.c
index f95384b30347..3123bd12dca8 100644
--- a/lib/libc/stdlib/cxa_thread_atexit_impl.c
+++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c
@@ -102,7 +102,7 @@ walk_cb_call(struct cxa_thread_dtor *dtor)
{
struct dl_phdr_info phdr_info;
- if (_rtld_addr_phdr(dtor->dso, &phdr_info) &&
+ if (_rtld_addr_phdr(dtor->func, &phdr_info) &&
__elf_phdr_match_addr(&phdr_info, dtor->func))
dtor->func(dtor->obj);
else
diff --git a/lib/libc/string/bcopy.c b/lib/libc/string/bcopy.c
index fdc05f20253c..20f7bc60b76a 100644
--- a/lib/libc/string/bcopy.c
+++ b/lib/libc/string/bcopy.c
@@ -47,6 +47,9 @@ typedef intptr_t word; /* "word" used for optimal copy speed */
#if defined(MEMCOPY) || defined(MEMMOVE)
#include <string.h>
+#undef memcpy /* _FORTIFY_SOURCE */
+#undef memmove /* _FORTIFY_SOURCE */
+
void *
#ifdef MEMCOPY
memcpy
@@ -57,6 +60,8 @@ memmove
#else
#include <strings.h>
+#undef bcopy /* _FORTIFY_SOURCE */
+
void
bcopy(const void *src0, void *dst0, size_t length)
#endif
diff --git a/lib/libc/string/memset.c b/lib/libc/string/memset.c
index a49ce7cea756..811def0fc9b4 100644
--- a/lib/libc/string/memset.c
+++ b/lib/libc/string/memset.c
@@ -42,6 +42,8 @@
#ifdef BZERO
#include <strings.h>
+#undef bzero /* _FORTIFY_SOURCE */
+
#define RETURN return
#define VAL 0
#define WIDEVAL 0
@@ -51,6 +53,8 @@ bzero(void *dst0, size_t length)
#else
#include <string.h>
+#undef memset /* _FORTIFY_SOURCE */
+
#define RETURN return (dst0)
#define VAL c0
#define WIDEVAL c
diff --git a/lib/libc/string/stpcpy.c b/lib/libc/string/stpcpy.c
index c096e81da075..4521e0877e07 100644
--- a/lib/libc/string/stpcpy.c
+++ b/lib/libc/string/stpcpy.c
@@ -33,6 +33,8 @@
#include <string.h>
+#undef stpcpy /* _FORTIFY_SOURCE */
+
char *
stpcpy(char * __restrict to, const char * __restrict from)
{
diff --git a/lib/libc/string/stpncpy.c b/lib/libc/string/stpncpy.c
index 8c7f14ecf8dd..d3a1dddb4a65 100644
--- a/lib/libc/string/stpncpy.c
+++ b/lib/libc/string/stpncpy.c
@@ -28,6 +28,8 @@
#include <string.h>
+#undef stpncpy /* _FORTIFY_SOURCE */
+
char *
stpncpy(char * __restrict dst, const char * __restrict src, size_t n)
{
diff --git a/lib/libc/string/strcat.c b/lib/libc/string/strcat.c
index 593a1afd7048..1c13c519b563 100644
--- a/lib/libc/string/strcat.c
+++ b/lib/libc/string/strcat.c
@@ -31,6 +31,8 @@
#include <string.h>
+#undef strcat /* _FORTIFY_SOURCE */
+
char *
strcat(char * __restrict s, const char * __restrict append)
{
diff --git a/lib/libc/string/strncat.c b/lib/libc/string/strncat.c
index ee951cdc956a..086bdef32b68 100644
--- a/lib/libc/string/strncat.c
+++ b/lib/libc/string/strncat.c
@@ -34,6 +34,8 @@
#include <string.h>
+#undef strncat /* _FORTIFY_SOURCE */
+
/*
* Concatenate src on the end of dst. At most strlen(dst)+n+1 bytes
* are written at dst (at most n+1 bytes being appended). Return dst.
diff --git a/lib/libc/yp/Symbol.map b/lib/libc/yp/Symbol.map
index fff2b2e60e39..f50beed7be31 100644
--- a/lib/libc/yp/Symbol.map
+++ b/lib/libc/yp/Symbol.map
@@ -18,4 +18,36 @@ FBSD_1.0 {
yperr_string;
ypprot_err;
_yp_check;
+
+ /* From yp_xdr.c (generated by rpcgen - include/rpcsvc/yp.x) */
+ xdr_domainname;
+ xdr_keydat;
+ xdr_mapname;
+ xdr_peername;
+ xdr_valdat;
+ xdr_ypbind_binding;
+ xdr_ypbind_resp;
+ xdr_ypbind_resptype;
+ xdr_ypbind_setdom;
+ xdr_ypmap_parms;
+ xdr_ypmaplist;
+ xdr_yppush_status;
+ xdr_yppushresp_xfr;
+ xdr_ypreq_key;
+ xdr_ypreq_nokey;
+ xdr_ypreq_xfr;
+ xdr_ypreqtype;
+ xdr_yprequest;
+ xdr_ypresp_all;
+ xdr_ypresp_key_val;
+ xdr_ypresp_maplist;
+ xdr_ypresp_master;
+ xdr_ypresp_order;
+ xdr_ypresp_val;
+ xdr_ypresp_xfr;
+ xdr_ypresponse;
+ xdr_ypresptype;
+ xdr_ypstat;
+ xdr_ypxfrstat;
+
};
diff --git a/lib/libcapsicum/capsicum_helpers.3 b/lib/libcapsicum/capsicum_helpers.3
index 9c4c0bfa0229..38dd329ef2f3 100644
--- a/lib/libcapsicum/capsicum_helpers.3
+++ b/lib/libcapsicum/capsicum_helpers.3
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 2, 2020
+.Dd May 16, 2024
.Dt CAPSICUM_HELPERS 3
.Os
.Sh NAME
@@ -150,6 +150,31 @@ NLS data is used for localized error printing by
and
.Xr err 3 ,
among others.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn caph_enter ,
+.Fn caph_enter_casper ,
+.Fn caph_rights_limit ,
+.Fn caph_ioctls_limit ,
+.Fn caph_fcntls_limit ,
+.Fn caph_limit_stream ,
+.Fn caph_limit_stdin ,
+.Fn caph_limit_stderr ,
+.Fn caph_limit_stdout ,
+and
+.Fn caph_limit_stdio
+return a value
+of 0.
+Otherwise, a value of -1 is returned and the global variable
+.Va errno
+is set to indicate the error.
+.Pp
+Functions
+.Fn caph_stream_rights ,
+.Fn caph_cache_tzdata ,
+and
+.Fn caph_cache_catpages
+can not fail.
.Ed
.Sh SEE ALSO
.Xr cap_enter 2 ,
diff --git a/lib/libcbor/Makefile b/lib/libcbor/Makefile
index 5ae2c34a5963..c9d86c0b95ad 100644
--- a/lib/libcbor/Makefile
+++ b/lib/libcbor/Makefile
@@ -30,6 +30,7 @@ SRCS+= cbor/internal/unicode.c
CFLAGS+= -I${DIST}/src -I${.CURDIR}
WARNS?= 2
+IGNORE_PRAGMA=
MAN=
.include <bsd.lib.mk>
diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc
index 9aea0f2b051a..bdb6b93e6fda 100644
--- a/lib/libcompiler_rt/Makefile.inc
+++ b/lib/libcompiler_rt/Makefile.inc
@@ -132,7 +132,6 @@ SRCF+= floatundisf
#
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
SRCF+= divxc3
-SRCF+= extendxftf2
SRCF+= fixxfdi
SRCF+= fixxfti
SRCF+= fixunsxfdi
@@ -142,7 +141,6 @@ SRCF+= floattixf
SRCF+= floatuntixf
SRCF+= mulxc3
SRCF+= powixf2
-SRCF+= trunctfxf2
# Avoid using SSE2 instructions on i386, if unsupported.
.if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
@@ -154,6 +152,12 @@ SRCF+= floatundixf
.endif
.endif
+# 128-bit float is an amd64 feature
+.if ${MACHINE_CPUARCH} == "amd64"
+SRCF+= extendxftf2
+SRCF+= trunctfxf2
+.endif
+
# __cpu_model support, only used on aarch64 and x86
.if ${MACHINE_CPUARCH} == "aarch64"
SRCS+= cpu_model/aarch64.c
@@ -229,7 +233,6 @@ SRCF+= comparesf2
# Helper to reduce complexity of _Float16 and __bf16 statements below.
.if ${MACHINE_CPUARCH} == "aarch64" || \
${MACHINE_CPUARCH} == "amd64" || \
- ${MACHINE_CPUARCH} == "arm" || \
(${MACHINE_CPUARCH} == "i386" && !empty(MACHINE_CPU:Msse2))
CRT_COMMON_F16_ARCH=t
.endif
@@ -239,7 +242,8 @@ CRT_COMMON_F16_ARCH=t
# versions.
#
.if ((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000) && \
- (defined(CRT_COMMON_F16_ARCH) || ${MACHINE_CPUARCH} == "riscv")) || \
+ (defined(CRT_COMMON_F16_ARCH) || \
+ ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv")) || \
((${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120000) && \
(defined(CRT_COMMON_F16_ARCH)))
CFLAGS+= -DCOMPILER_RT_HAS_FLOAT16
diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile
index 6ad89e9da107..7a683ba779f6 100644
--- a/lib/libcxxrt/Makefile
+++ b/lib/libcxxrt/Makefile
@@ -42,3 +42,13 @@ Version-64.map: Version.map
.endif
.include <bsd.lib.mk>
+
+# gcc13 doesn't support _Float16 on riscv, powerpc64, and x86 or __int128
+# on i386. Disable checks for missing symbols to allow this to link.
+#
+# XXX: This is a hack that hides an ABI divergence between clang and gcc.
+.if ${COMPILER_TYPE} == "gcc" && \
+ (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
+ ${MACHINE_ARCH:Mpowerpc64*} || ${MACHINE_ARCH} == "riscv64")
+LDFLAGS+= -Wl,--undefined-version
+.endif
diff --git a/lib/libdiff/Makefile b/lib/libdiff/Makefile
index 3fa8e6b05d2d..8541ff424de2 100644
--- a/lib/libdiff/Makefile
+++ b/lib/libdiff/Makefile
@@ -1,3 +1,5 @@
+.include <src.opts.mk>
+
LIB= diff
INTERNALLIB= # API not published or supported.
@@ -12,4 +14,7 @@ WARNS=
CFLAGS+= -I${SRCTOP}/contrib/libdiff/compat/include
CFLAGS+= -I${SRCTOP}/contrib/libdiff/include
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
+
.include <bsd.lib.mk>
diff --git a/lib/libdiff/tests/Makefile b/lib/libdiff/tests/Makefile
new file mode 100644
index 000000000000..278ad7c95dcf
--- /dev/null
+++ b/lib/libdiff/tests/Makefile
@@ -0,0 +1,8 @@
+PACKAGE= tests
+
+ATF_TESTS_C= libdiff_test
+
+CFLAGS = -I${SRCTOP}/contrib/libdiff/lib -I${SRCTOP}/contrib/libdiff/include
+LIBADD = diff
+
+.include <bsd.test.mk>
diff --git a/lib/libdiff/tests/libdiff_test.c b/lib/libdiff/tests/libdiff_test.c
new file mode 100644
index 000000000000..e82a36f3d38a
--- /dev/null
+++ b/lib/libdiff/tests/libdiff_test.c
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2024 Klara, Inc.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <arraylist.h>
+#include <diff_main.h>
+
+#include <atf-c.h>
+
+ATF_TC_WITH_CLEANUP(diff_atomize_truncated);
+ATF_TC_HEAD(diff_atomize_truncated, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Verify that the atomizer "
+ "does not crash when an input file is truncated");
+}
+ATF_TC_BODY(diff_atomize_truncated, tc)
+{
+ char line[128];
+ struct diff_config cfg = { .atomize_func = diff_atomize_text_by_line };
+ struct diff_data d = { };
+ const char *fn = atf_tc_get_ident(tc);
+ FILE *f;
+ unsigned char *p;
+ size_t size = 65536;
+
+ ATF_REQUIRE((f = fopen(fn, "w+")) != NULL);
+ line[sizeof(line) - 1] = '\n';
+ for (unsigned int i = 0; i <= size / sizeof(line); i++) {
+ memset(line, 'a' + i % 26, sizeof(line) - 1);
+ ATF_REQUIRE(fwrite(line, sizeof(line), 1, f) == 1);
+ }
+ ATF_REQUIRE(fsync(fileno(f)) == 0);
+ rewind(f);
+ ATF_REQUIRE(truncate(fn, size / 2) == 0);
+ ATF_REQUIRE((p = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fileno(f), 0)) != MAP_FAILED);
+ ATF_REQUIRE(diff_atomize_file(&d, &cfg, f, p, size, 0) == 0);
+ ATF_REQUIRE((size_t)d.len <= size / 2);
+ ATF_REQUIRE((size_t)d.len >= size / 2 - sizeof(line));
+ ATF_REQUIRE(d.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED);
+}
+ATF_TC_CLEANUP(diff_atomize_truncated, tc)
+{
+ unlink(atf_tc_get_ident(tc));
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, diff_atomize_truncated);
+ return atf_no_error();
+}
diff --git a/lib/libfido2/Makefile b/lib/libfido2/Makefile
index dc985e2797ed..10c008967e3d 100644
--- a/lib/libfido2/Makefile
+++ b/lib/libfido2/Makefile
@@ -71,7 +71,7 @@ CFLAGS+= -DHAVE_UNISTD_H
CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L
CFLAGS+= -DTLS=__thread
CFLAGS+= -D_FIDO_MAJOR=1
-CFLAGS+= -D_FIDO_MINOR=13
+CFLAGS+= -D_FIDO_MINOR=14
CFLAGS+= -D_FIDO_PATCH=0
LIBADD= crypto z
diff --git a/lib/libgcc_s/Symbol.map b/lib/libgcc_s/Symbol.map
index 2c507656f037..e8f7e824adaf 100644
--- a/lib/libgcc_s/Symbol.map
+++ b/lib/libgcc_s/Symbol.map
@@ -33,14 +33,14 @@ GCC_3.0 {
#ifndef __arm__
__fixunssfsi;
#endif
-#ifndef __powerpc__
+#if defined(__amd64__) || defined(__i386__)
__fixunsxfdi;
__fixunsxfsi;
__fixxfdi;
#endif
__floatdidf;
__floatdisf;
-#ifndef __powerpc__
+#if defined(__amd64__) || defined(__i386__)
__floatdixf;
#endif
__lshrdi3;
@@ -91,11 +91,8 @@ GCC_3.0 {
__fixsfti;
__fixunsdfti;
__fixunssfti;
- __fixunsxfti;
- __fixxfti;
__floattidf;
__floattisf;
- __floattixf;
__lshrti3;
__modti3;
__multi3;
@@ -104,6 +101,11 @@ GCC_3.0 {
__udivmodti4;
__udivti3;
__umodti3;
+#ifdef __amd64__
+ __fixunsxfti;
+ __fixxfti;
+ __floattixf;
+#endif
#endif
};
@@ -152,17 +154,17 @@ GCC_3.4.4 {
GCC_4.0.0 {
__divdc3;
__divsc3;
-#ifndef __powerpc__
+#if defined(__amd64__) || defined(__i386__)
__divxc3;
#endif
__muldc3;
__mulsc3;
-#ifndef __powerpc__
+#if defined(__amd64__) || defined(__i386__)
__mulxc3;
#endif
__powidf2;
__powisf2;
-#ifndef __powerpc__
+#if defined(__amd64__) || defined(__i386__)
__powixf2;
#endif
};
@@ -170,7 +172,7 @@ GCC_4.0.0 {
GCC_4.2.0 {
__floatundidf;
__floatundisf;
-#ifndef __powerpc__
+#if defined(__amd64__) || defined(__i386__)
__floatundixf;
#endif
_Unwind_GetIPInfo;
@@ -178,8 +180,10 @@ GCC_4.2.0 {
#ifdef CRT_HAS_128BIT
__floatuntidf;
__floatuntisf;
+#ifdef __amd64__
__floatuntixf;
#endif
+#endif
};
GCC_4.3.0 {
@@ -187,15 +191,14 @@ GCC_4.3.0 {
__bswapsi2;
};
-#if defined(__aarch64__) || defined(__riscv)
GCC_4.6.0 {
+#if defined(__aarch64__) || defined(__riscv)
__addtf3;
__cmptf2;
__divtf3;
__eqtf2;
__extenddftf2;
__extendsftf2;
- __extendxftf2;
__fixtfdi;
__fixtfsi;
__fixtfti;
@@ -217,10 +220,13 @@ GCC_4.6.0 {
__subtf3;
__trunctfdf2;
__trunctfsf2;
- __trunctfxf2;
__unordtf2;
-};
#endif
+#if defined(__amd64__)
+ __extendxftf2;
+ __trunctfxf2;
+#endif
+};
GCC_7.0.0 {
#ifdef __i386__
diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h
index 03a0d0b199b7..8d5ca01b0ce6 100644
--- a/lib/libifconfig/libifconfig.h
+++ b/lib/libifconfig/libifconfig.h
@@ -287,6 +287,9 @@ struct ifconfig_carp {
uint8_t carpr_key[CARP_KEY_LEN];
struct in_addr carpr_addr;
struct in6_addr carpr_addr6;
+ carp_version_t carpr_version;
+ uint8_t carpr_vrrp_prio;
+ uint16_t carpr_vrrp_adv_inter;
};
int ifconfig_carp_get_vhid(ifconfig_handle_t *h, const char *name,
diff --git a/lib/libifconfig/libifconfig_carp.c b/lib/libifconfig/libifconfig_carp.c
index 40556eda813f..59faa8def496 100644
--- a/lib/libifconfig/libifconfig_carp.c
+++ b/lib/libifconfig/libifconfig_carp.c
@@ -56,6 +56,9 @@ static struct snl_attr_parser ap_carp_get[] = {
{ .type = CARP_NL_KEY, .off = _OUT(carpr_key), .cb = snl_attr_copy_string, .arg_u32 = CARP_KEY_LEN },
{ .type = CARP_NL_ADDR, .off = _OUT(carpr_addr), .cb = snl_attr_get_in_addr },
{ .type = CARP_NL_ADDR6, .off = _OUT(carpr_addr6), .cb = snl_attr_get_in6_addr },
+ { .type = CARP_NL_VERSION, .off = _OUT(carpr_version), .cb = snl_attr_get_uint8 },
+ { .type = CARP_NL_VRRP_PRIORITY, .off = _OUT(carpr_vrrp_prio), .cb = snl_attr_get_uint8 },
+ { .type = CARP_NL_VRRP_ADV_INTER, .off = _OUT(carpr_vrrp_adv_inter), .cb = snl_attr_get_uint16 },
};
#undef _OUT
@@ -175,6 +178,9 @@ ifconfig_carp_set_info(ifconfig_handle_t *h, const char *name,
snl_add_msg_attr(&nw, CARP_NL_ADDR6, sizeof(carpr->carpr_addr6),
&carpr->carpr_addr6);
snl_add_msg_attr_string(&nw, CARP_NL_KEY, carpr->carpr_key);
+ snl_add_msg_attr_u8(&nw, CARP_NL_VERSION, carpr->carpr_version);
+ snl_add_msg_attr_u8(&nw, CARP_NL_VRRP_PRIORITY, carpr->carpr_vrrp_prio);
+ snl_add_msg_attr_u16(&nw, CARP_NL_VRRP_ADV_INTER, carpr->carpr_vrrp_adv_inter);
hdr = snl_finalize_msg(&nw);
if (hdr == NULL) {
diff --git a/lib/libmixer/Makefile b/lib/libmixer/Makefile
index 6ca17a9d020d..3f8a4dad4a65 100644
--- a/lib/libmixer/Makefile
+++ b/lib/libmixer/Makefile
@@ -22,6 +22,7 @@ MLINKS+= mixer.3 mixer_get_dunit.3
MLINKS+= mixer.3 mixer_set_dunit.3
MLINKS+= mixer.3 mixer_get_mode.3
MLINKS+= mixer.3 mixer_get_nmixers.3
+MLINKS+= mixer.3 mixer_get_path.3
MLINKS+= mixer.3 MIX_ISDEV.3
MLINKS+= mixer.3 MIX_ISMUTE.3
MLINKS+= mixer.3 MIX_ISREC.3
diff --git a/lib/libmixer/Symbol.map b/lib/libmixer/Symbol.map
index f16e13d66e4c..2ce39fd058ab 100644
--- a/lib/libmixer/Symbol.map
+++ b/lib/libmixer/Symbol.map
@@ -19,3 +19,7 @@ FBSD_1.7 {
mixer_get_mode;
mixer_get_nmixers;
};
+
+FBSD_1.8 {
+ mixer_get_path;
+};
diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3
index af2a8ff135a8..4008867ef2fb 100644
--- a/lib/libmixer/mixer.3
+++ b/lib/libmixer/mixer.3
@@ -19,8 +19,7 @@
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.\" THE SOFTWARE.
.\"
-
-.Dd January 19, 2023
+.Dd May 22, 2024
.Dt MIXER 3
.Os
.Sh NAME
@@ -40,6 +39,7 @@
.Nm mixer_set_dunit ,
.Nm mixer_get_mode ,
.Nm mixer_get_nmixers ,
+.Nm mixer_get_path ,
.Nm MIX_ISDEV ,
.Nm MIX_ISMUTE ,
.Nm MIX_ISREC ,
@@ -86,6 +86,8 @@ Mixer library (libmixer, -lmixer)
.Ft int
.Fn mixer_get_nmixers "void"
.Ft int
+.Fn mixer_get_path "char * buf" "size_t size" "int unit"
+.Ft int
.Fn MIX_ISDEV "struct mixer *m" "int devno"
.Ft int
.Fn MIX_ISMUTE "struct mixer *m" "int devno"
@@ -165,13 +167,15 @@ is always equal to the number of that pcmX device.
For example, if the audio device's number is 0 (i.e pcm0), then
.Ar unit
is 0 as well.
-This number is useful when checking if the mixer's audio card is the default one.
+This number is useful when checking if the mixer's audio card is the default
+one.
.It Fa ndev
Number of devices in
.Ar devs .
.It Fa devmask
Bit mask containing all supported devices for the mixer.
-For example, if device 10 is supported, then the 10th bit in the mask will be set.
+For example, if device 10 is supported, then the 10th bit in the mask will be
+set.
By default,
.Fn mixer_open
stores only the supported devices in devs, so it is very unlikely this mask will
@@ -315,23 +319,27 @@ opens the default mixer (hw.snd.default_unit).
The
.Fn mixer_close
function frees resources and closes the mixer device.
-It is a good practice to always call it when the application is done using the mixer.
+It is a good practice to always call it when the application is done using the
+mixer.
.Ss Manipulating the mixer
The
.Fn mixer_get_dev
and
.Fn mixer_get_dev_byname
-functions select a mixer device, either by its number or by its name respectively.
-The mixer structure keeps a list of all the devices, but only \
-one can be manipulated at a time.
-Each time a new device is to be manipulated, one of the two functions has to be called.
+functions select a mixer device, either by its number or by its name
+respectively.
+The mixer structure keeps a list of all the devices, but only one can be
+manipulated at a time.
+Each time a new device is to be manipulated, one of the two functions has to be
+called.
.Pp
The
.Fn mixer_set_vol
function changes the volume of the selected mixer device.
The
.Ar vol
-parameter is a structure that stores the left and right volumes of a given device.
+parameter is a structure that stores the left and right volumes of a given
+device.
The allowed volume values are between MIX_VOLMIN (0.0) and MIX_VOLMAX (1.0).
.Pp
The
@@ -352,7 +360,8 @@ Toggle the device's mute (e.g mute if unmuted and unmute if muted).
The
.Fn mixer_mod_recsrc
function modifies a recording device.
-The selected device has to be a recording device, otherwise the function will fail.
+The selected device has to be a recording device, otherwise the function will
+fail.
The
.Ar opt
parameter has to be one of the following options:
@@ -395,7 +404,24 @@ Playback and recording.
.Pp
The
.Fn mixer_get_nmixers
-function returns the total number of mixer devices in the system.
+function returns the maximum mixer unit number.
+Although this might sound as incorrect behavior, given that one would expect
+"nmixers" to refer to the total number of active mixers, it is more intuitive
+for applications that want to loop through all mixer devices (see the
+.Sx EXAMPLES
+section).
+.Pp
+The
+.Fn mixer_get_path
+function writes the path of the mixer device specified in the
+.Ar unit
+argument to the buffer specified in
+.Ar buf .
+.Ar unit
+can be either -1, in which case
+.Fn mixer_get_path
+will fetch the path of the default mixer, or between 0 and the maximum mixer
+unit.
.Pp
The
.Fn MIX_ISDEV
@@ -467,9 +493,10 @@ The
.Fn mixer_set_mute ,
.Fn mixer_mod_recsrc ,
.Fn mixer_get_dunut ,
-.Fn mixer_set_dunit
+.Fn mixer_set_dunit ,
+.Fn mixer_get_nmixers ,
and
-.Fn mixer_get_nmixers
+.Fn mixer_get_path
functions return 0 or positive values on success and -1 on failure.
.Pp
The
@@ -539,6 +566,22 @@ TAILQ_FOREACH(dp, &m->devs, devs) {
(void)mixer_close(m);
.Ed
+.Ss Loop through all mixer devices in the system
+.Bd -literal
+struct mixer *m;
+char buf[NAME_MAX];
+int n;
+
+if ((n = mixer_get_nmixers()) < 0)
+ errx(1, "no mixers present in the system");
+for (i = 0; i < n; i++) {
+ (void)mixer_get_path(buf, sizeof(buf), i);
+ if ((m = mixer_open(buf)) == NULL)
+ continue;
+ ...
+ (void)mixer_close(m);
+}
+.Ed
.Sh SEE ALSO
.Xr queue 3 ,
.Xr sysctl 3 ,
diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c
index 93ace1d0c69b..4abbed9b27d3 100644
--- a/lib/libmixer/mixer.c
+++ b/lib/libmixer/mixer.c
@@ -493,3 +493,28 @@ mixer_get_nmixers(void)
return (si.nummixers);
}
+
+/*
+ * Get the full path to a mixer device.
+ */
+int
+mixer_get_path(char *buf, size_t size, int unit)
+{
+ size_t n;
+
+ if (!(unit == -1 || (unit >= 0 && unit < mixer_get_nmixers()))) {
+ errno = EINVAL;
+ return (-1);
+ }
+ if (unit == -1)
+ n = strlcpy(buf, BASEPATH, size);
+ else
+ n = snprintf(buf, size, BASEPATH "%d", unit);
+
+ if (n >= size) {
+ errno = ENOMEM;
+ return (-1);
+ }
+
+ return (0);
+}
diff --git a/lib/libmixer/mixer.h b/lib/libmixer/mixer.h
index cb9575c5f012..80a4b5c91a82 100644
--- a/lib/libmixer/mixer.h
+++ b/lib/libmixer/mixer.h
@@ -115,6 +115,7 @@ int mixer_get_dunit(void);
int mixer_set_dunit(struct mixer *, int);
int mixer_get_mode(int);
int mixer_get_nmixers(void);
+int mixer_get_path(char *, size_t, int);
__END_DECLS
diff --git a/lib/libnvmf/Makefile b/lib/libnvmf/Makefile
new file mode 100644
index 000000000000..dbba6b476510
--- /dev/null
+++ b/lib/libnvmf/Makefile
@@ -0,0 +1,22 @@
+.PATH: ${SRCTOP}/sys/dev/nvmf/controller
+.PATH: ${SRCTOP}/sys/libkern
+
+LIB= nvmf
+INTERNALLIB=
+PACKAGE= nvmf
+
+INCS= libnvmf.h
+
+SRCS= gsb_crc32.c \
+ nvmf_controller.c \
+ nvmf_host.c \
+ nvmf_tcp.c \
+ nvmf_transport.c \
+ nvmft_subr.c
+
+CFLAGS+= -I${SRCTOP}/sys/dev/nvmf/controller
+CFLAGS+= -I${SRCTOP}/sys/dev/nvmf
+
+.include <bsd.lib.mk>
+
+CWARNFLAGS.gsb_crc32.c= -Wno-cast-align
diff --git a/lib/libnvmf/internal.h b/lib/libnvmf/internal.h
new file mode 100644
index 000000000000..cf45c15ba2f0
--- /dev/null
+++ b/lib/libnvmf/internal.h
@@ -0,0 +1,116 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __LIBNVMF_INTERNAL_H__
+#define __LIBNVMF_INTERNAL_H__
+
+#include <sys/queue.h>
+
+struct nvmf_transport_ops {
+ /* Association management. */
+ struct nvmf_association *(*allocate_association)(bool controller,
+ const struct nvmf_association_params *params);
+ void (*update_association)(struct nvmf_association *na,
+ const struct nvme_controller_data *cdata);
+ void (*free_association)(struct nvmf_association *na);
+
+ /* Queue pair management. */
+ struct nvmf_qpair *(*allocate_qpair)(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params);
+ void (*free_qpair)(struct nvmf_qpair *qp);
+
+ /* Create params for kernel handoff. */
+ int (*kernel_handoff_params)(struct nvmf_qpair *qp,
+ struct nvmf_handoff_qpair_params *qparams);
+
+ /* Capsule operations. */
+ struct nvmf_capsule *(*allocate_capsule)(struct nvmf_qpair *qp);
+ void (*free_capsule)(struct nvmf_capsule *nc);
+ int (*transmit_capsule)(struct nvmf_capsule *nc);
+ int (*receive_capsule)(struct nvmf_qpair *qp,
+ struct nvmf_capsule **ncp);
+ uint8_t (*validate_command_capsule)(const struct nvmf_capsule *nc);
+
+ /* Transferring controller data. */
+ size_t (*capsule_data_len)(const struct nvmf_capsule *nc);
+ int (*receive_controller_data)(const struct nvmf_capsule *nc,
+ uint32_t data_offset, void *buf, size_t len);
+ int (*send_controller_data)(const struct nvmf_capsule *nc,
+ const void *buf, size_t len);
+};
+
+struct nvmf_association {
+ struct nvmf_transport_ops *na_ops;
+ enum nvmf_trtype na_trtype;
+ bool na_controller;
+
+ struct nvmf_association_params na_params;
+
+ /* Each qpair holds a reference on an association. */
+ u_int na_refs;
+
+ char *na_last_error;
+};
+
+struct nvmf_qpair {
+ struct nvmf_association *nq_association;
+ bool nq_admin;
+
+ uint16_t nq_cid; /* host only */
+
+ /*
+ * Queue sizes. This assumes the same size for both the
+ * completion and submission queues within a pair.
+ */
+ u_int nq_qsize;
+
+ /* Flow control management for submission queues. */
+ bool nq_flow_control;
+ uint16_t nq_sqhd;
+ uint16_t nq_sqtail; /* host only */
+
+ /* Value in response to/from CONNECT. */
+ uint16_t nq_cntlid;
+
+ uint32_t nq_kato; /* valid on admin queue only */
+
+ TAILQ_HEAD(, nvmf_capsule) nq_rx_capsules;
+};
+
+struct nvmf_capsule {
+ struct nvmf_qpair *nc_qpair;
+
+ /* Either a SQE or CQE. */
+ union {
+ struct nvme_command nc_sqe;
+ struct nvme_completion nc_cqe;
+ };
+ int nc_qe_len;
+
+ /*
+ * Is SQHD in received capsule valid? False for locally-
+ * synthesized responses.
+ */
+ bool nc_sqhd_valid;
+
+ /* Data buffer. */
+ bool nc_send_data;
+ void *nc_data;
+ size_t nc_data_len;
+
+ TAILQ_ENTRY(nvmf_capsule) nc_link;
+};
+
+extern struct nvmf_transport_ops tcp_ops;
+
+void na_clear_error(struct nvmf_association *na);
+void na_error(struct nvmf_association *na, const char *fmt, ...);
+
+int nvmf_kernel_handoff_params(struct nvmf_qpair *qp,
+ struct nvmf_handoff_qpair_params *qparams);
+
+#endif /* !__LIBNVMF_INTERNAL_H__ */
diff --git a/lib/libnvmf/libnvmf.h b/lib/libnvmf/libnvmf.h
new file mode 100644
index 000000000000..f15277a02621
--- /dev/null
+++ b/lib/libnvmf/libnvmf.h
@@ -0,0 +1,363 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __LIBNVMF_H__
+#define __LIBNVMF_H__
+
+#include <sys/uio.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_proto.h>
+
+struct nvmf_capsule;
+struct nvmf_association;
+struct nvmf_qpair;
+
+/*
+ * Parameters shared by all queue-pairs of an association. Note that
+ * this contains the requested values used to initiate transport
+ * negotiation.
+ */
+struct nvmf_association_params {
+ bool sq_flow_control; /* SQ flow control required. */
+ bool dynamic_controller_model; /* Controller only */
+ uint16_t max_admin_qsize; /* Controller only */
+ uint32_t max_io_qsize; /* Controller only, 0 for discovery */
+ union {
+ struct {
+ uint8_t pda; /* Tx-side PDA. */
+ bool header_digests;
+ bool data_digests;
+ uint32_t maxr2t; /* Host only */
+ uint32_t maxh2cdata; /* Controller only */
+ } tcp;
+ };
+};
+
+/* Parameters specific to a single queue pair of an association. */
+struct nvmf_qpair_params {
+ bool admin; /* Host only */
+ union {
+ struct {
+ int fd;
+ } tcp;
+ };
+};
+
+/* Transport-independent APIs. */
+
+/*
+ * A host should allocate a new association for each association with
+ * a controller. After the admin queue has been allocated and the
+ * controller's data has been fetched, it should be passed to
+ * nvmf_update_association to update internal transport-specific
+ * parameters before allocating I/O queues.
+ *
+ * A controller uses a single association to manage all incoming
+ * queues since it is not known until after parsing the CONNECT
+ * command which transport queues are admin vs I/O and which
+ * controller they are created against.
+ */
+struct nvmf_association *nvmf_allocate_association(enum nvmf_trtype trtype,
+ bool controller, const struct nvmf_association_params *params);
+void nvmf_update_assocation(struct nvmf_association *na,
+ const struct nvme_controller_data *cdata);
+void nvmf_free_association(struct nvmf_association *na);
+
+/* The most recent association-wide error message. */
+const char *nvmf_association_error(const struct nvmf_association *na);
+
+/*
+ * A queue pair represents either an Admin or I/O
+ * submission/completion queue pair.
+ *
+ * Each open qpair holds a reference on its association. Once queue
+ * pairs are allocated, callers can safely free the association to
+ * ease bookkeeping.
+ *
+ * If nvmf_allocate_qpair fails, a detailed error message can be obtained
+ * from nvmf_association_error.
+ */
+struct nvmf_qpair *nvmf_allocate_qpair(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params);
+void nvmf_free_qpair(struct nvmf_qpair *qp);
+
+/*
+ * Capsules are either commands (host -> controller) or responses
+ * (controller -> host). A single data buffer segment may be
+ * associated with a command capsule. Transmitted data is not copied
+ * by this API but instead must be preserved until the capsule is
+ * transmitted and freed.
+ */
+struct nvmf_capsule *nvmf_allocate_command(struct nvmf_qpair *qp,
+ const void *sqe);
+struct nvmf_capsule *nvmf_allocate_response(struct nvmf_qpair *qp,
+ const void *cqe);
+void nvmf_free_capsule(struct nvmf_capsule *nc);
+int nvmf_capsule_append_data(struct nvmf_capsule *nc,
+ void *buf, size_t len, bool send);
+int nvmf_transmit_capsule(struct nvmf_capsule *nc);
+int nvmf_receive_capsule(struct nvmf_qpair *qp, struct nvmf_capsule **ncp);
+const void *nvmf_capsule_sqe(const struct nvmf_capsule *nc);
+const void *nvmf_capsule_cqe(const struct nvmf_capsule *nc);
+
+/* Return a string name for a transport type. */
+const char *nvmf_transport_type(uint8_t trtype);
+
+/* Validate a NVMe Qualified Name. */
+bool nvmf_nqn_valid(const char *nqn);
+
+/* Controller-specific APIs. */
+
+/*
+ * A controller calls this function to check for any
+ * transport-specific errors (invalid fields) in a received command
+ * capsule. The callback returns a generic command status value:
+ * NVME_SC_SUCCESS if no error is found.
+ */
+uint8_t nvmf_validate_command_capsule(const struct nvmf_capsule *nc);
+
+/*
+ * A controller calls this function to query the amount of data
+ * associated with a command capsule.
+ */
+size_t nvmf_capsule_data_len(const struct nvmf_capsule *cc);
+
+/*
+ * A controller calls this function to receive data associated with a
+ * command capsule (e.g. the data for a WRITE command). This can
+ * either return in-capsule data or fetch data from the host
+ * (e.g. using a R2T PDU over TCP). The received command capsule
+ * should be passed in 'nc'. The received data is stored in '*buf'.
+ */
+int nvmf_receive_controller_data(const struct nvmf_capsule *nc,
+ uint32_t data_offset, void *buf, size_t len);
+
+/*
+ * A controller calls this function to send data in response to a
+ * command along with a response capsule. If the data transfer
+ * succeeds, a success response is sent. If the data transfer fails,
+ * an appropriate error status capsule is sent. Regardless, a
+ * response capsule is always sent.
+ */
+int nvmf_send_controller_data(const struct nvmf_capsule *nc,
+ const void *buf, size_t len);
+
+/*
+ * Construct a CQE for a reply to a command capsule in 'nc' with the
+ * completion status 'status'. This is useful when additional CQE
+ * info is required beyond the completion status.
+ */
+void nvmf_init_cqe(void *cqe, const struct nvmf_capsule *nc,
+ uint16_t status);
+
+/*
+ * Construct and send a response capsule to a command capsule with
+ * the supplied CQE.
+ */
+int nvmf_send_response(const struct nvmf_capsule *nc, const void *cqe);
+
+/*
+ * Wait for a single command capsule and return it in *ncp. This can
+ * fail if an invalid capsule is received or an I/O error occurs.
+ */
+int nvmf_controller_receive_capsule(struct nvmf_qpair *qp,
+ struct nvmf_capsule **ncp);
+
+/* Send a response capsule from a controller. */
+int nvmf_controller_transmit_response(struct nvmf_capsule *nc);
+
+/* Construct and send an error response capsule. */
+int nvmf_send_error(const struct nvmf_capsule *cc, uint8_t sc_type,
+ uint8_t sc_status);
+
+/*
+ * Construct and send an error response capsule using a generic status
+ * code.
+ */
+int nvmf_send_generic_error(const struct nvmf_capsule *nc,
+ uint8_t sc_status);
+
+/* Construct and send a simple success response capsule. */
+int nvmf_send_success(const struct nvmf_capsule *nc);
+
+/*
+ * Allocate a new queue pair and wait for the CONNECT command capsule.
+ * If this fails, a detailed error message can be obtained from
+ * nvmf_association_error. On success, the command capsule is saved
+ * in '*ccp' and the connect data is saved in 'data'. The caller
+ * must send an explicit response and free the the command capsule.
+ */
+struct nvmf_qpair *nvmf_accept(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params, struct nvmf_capsule **ccp,
+ struct nvmf_fabric_connect_data *data);
+
+/*
+ * Construct and send a response capsule with the Fabrics CONNECT
+ * invalid parameters error status. If data is true the offset is
+ * relative to the CONNECT data structure, otherwise the offset is
+ * relative to the SQE.
+ */
+void nvmf_connect_invalid_parameters(const struct nvmf_capsule *cc,
+ bool data, uint16_t offset);
+
+/* Construct and send a response capsule for a successful CONNECT. */
+int nvmf_finish_accept(const struct nvmf_capsule *cc, uint16_t cntlid);
+
+/* Compute the initial state of CAP for a controller. */
+uint64_t nvmf_controller_cap(struct nvmf_qpair *qp);
+
+/* Generate a serial number string from a host ID. */
+void nvmf_controller_serial(char *buf, size_t len, u_long hostid);
+
+/*
+ * Populate an Identify Controller data structure for a Discovery
+ * controller.
+ */
+void nvmf_init_discovery_controller_data(struct nvmf_qpair *qp,
+ struct nvme_controller_data *cdata);
+
+/*
+ * Populate an Identify Controller data structure for an I/O
+ * controller.
+ */
+void nvmf_init_io_controller_data(struct nvmf_qpair *qp, const char *serial,
+ const char *subnqn, int nn, uint32_t ioccsz,
+ struct nvme_controller_data *cdata);
+
+/*
+ * Validate if a new value for CC is legal given the existing values of
+ * CAP and CC.
+ */
+bool nvmf_validate_cc(struct nvmf_qpair *qp, uint64_t cap, uint32_t old_cc,
+ uint32_t new_cc);
+
+/* Return the log page id (LID) of a GET_LOG_PAGE command. */
+uint8_t nvmf_get_log_page_id(const struct nvme_command *cmd);
+
+/* Return the requested data length of a GET_LOG_PAGE command. */
+uint64_t nvmf_get_log_page_length(const struct nvme_command *cmd);
+
+/* Return the requested data offset of a GET_LOG_PAGE command. */
+uint64_t nvmf_get_log_page_offset(const struct nvme_command *cmd);
+
+/* Prepare to handoff a controller qpair. */
+int nvmf_handoff_controller_qpair(struct nvmf_qpair *qp,
+ struct nvmf_handoff_controller_qpair *h);
+
+/* Host-specific APIs. */
+
+/*
+ * Connect to an admin or I/O queue. If this fails, a detailed error
+ * message can be obtained from nvmf_association_error.
+ */
+struct nvmf_qpair *nvmf_connect(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params, uint16_t qid, u_int queue_size,
+ const uint8_t hostid[16], uint16_t cntlid, const char *subnqn,
+ const char *hostnqn, uint32_t kato);
+
+/* Return the CNTLID for a queue returned from CONNECT. */
+uint16_t nvmf_cntlid(struct nvmf_qpair *qp);
+
+/*
+ * Send a command to the controller. This can fail with EBUSY if the
+ * submission queue is full.
+ */
+int nvmf_host_transmit_command(struct nvmf_capsule *nc);
+
+/*
+ * Wait for a response to a command. If there are no outstanding
+ * commands in the SQ, fails with EWOULDBLOCK.
+ */
+int nvmf_host_receive_response(struct nvmf_qpair *qp,
+ struct nvmf_capsule **rcp);
+
+/*
+ * Wait for a response to a specific command. The command must have been
+ * succesfully sent previously.
+ */
+int nvmf_host_wait_for_response(struct nvmf_capsule *cc,
+ struct nvmf_capsule **rcp);
+
+/* Build a KeepAlive command. */
+struct nvmf_capsule *nvmf_keepalive(struct nvmf_qpair *qp);
+
+/* Read a controller property. */
+int nvmf_read_property(struct nvmf_qpair *qp, uint32_t offset, uint8_t size,
+ uint64_t *value);
+
+/* Write a controller property. */
+int nvmf_write_property(struct nvmf_qpair *qp, uint32_t offset,
+ uint8_t size, uint64_t value);
+
+/* Construct a 16-byte HostId from kern.hostuuid. */
+int nvmf_hostid_from_hostuuid(uint8_t hostid[16]);
+
+/* Construct a NQN from kern.hostuuid. */
+int nvmf_nqn_from_hostuuid(char nqn[NVMF_NQN_MAX_LEN]);
+
+/* Fetch controller data via IDENTIFY. */
+int nvmf_host_identify_controller(struct nvmf_qpair *qp,
+ struct nvme_controller_data *data);
+
+/* Fetch namespace data via IDENTIFY. */
+int nvmf_host_identify_namespace(struct nvmf_qpair *qp, uint32_t nsid,
+ struct nvme_namespace_data *nsdata);
+
+/*
+ * Fetch discovery log page. The memory for the log page is allocated
+ * by malloc() and returned in *logp. The caller must free the
+ * memory.
+ */
+int nvmf_host_fetch_discovery_log_page(struct nvmf_qpair *qp,
+ struct nvme_discovery_log **logp);
+
+/*
+ * Request a desired number of I/O queues via SET_FEATURES. The
+ * number of actual I/O queues available is returned in *actual on
+ * success.
+ */
+int nvmf_host_request_queues(struct nvmf_qpair *qp, u_int requested,
+ u_int *actual);
+
+/*
+ * Handoff active host association to the kernel. This frees the
+ * qpairs (even on error).
+ */
+int nvmf_handoff_host(struct nvmf_qpair *admin_qp, u_int num_queues,
+ struct nvmf_qpair **io_queues, const struct nvme_controller_data *cdata);
+
+/*
+ * Disconnect an active host association previously handed off to the
+ * kernel. *name is either the name of the device (nvmeX) for this
+ * association or the remote subsystem NQN.
+ */
+int nvmf_disconnect_host(const char *host);
+
+/*
+ * Disconnect all active host associations previously handed off to
+ * the kernel.
+ */
+int nvmf_disconnect_all(void);
+
+/*
+ * Fetch reconnect parameters from an existing kernel host to use for
+ * establishing a new association.
+ */
+int nvmf_reconnect_params(int fd, struct nvmf_reconnect_params *rparams);
+
+/*
+ * Handoff active host association to an existing host in the kernel.
+ * This frees the qpairs (even on error).
+ */
+int nvmf_reconnect_host(int fd, struct nvmf_qpair *admin_qp,
+ u_int num_queues, struct nvmf_qpair **io_queues,
+ const struct nvme_controller_data *cdata);
+
+#endif /* !__LIBNVMF_H__ */
diff --git a/lib/libnvmf/nvmf_controller.c b/lib/libnvmf/nvmf_controller.c
new file mode 100644
index 000000000000..554e5e769ded
--- /dev/null
+++ b/lib/libnvmf/nvmf_controller.c
@@ -0,0 +1,463 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/utsname.h>
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "libnvmf.h"
+#include "internal.h"
+#include "nvmft_subr.h"
+
+void
+nvmf_init_cqe(void *cqe, const struct nvmf_capsule *nc, uint16_t status)
+{
+ struct nvme_completion *cpl = cqe;
+ const struct nvme_command *cmd = nvmf_capsule_sqe(nc);
+
+ memset(cpl, 0, sizeof(*cpl));
+ cpl->cid = cmd->cid;
+ cpl->status = htole16(status);
+}
+
+static struct nvmf_capsule *
+nvmf_simple_response(const struct nvmf_capsule *nc, uint8_t sc_type,
+ uint8_t sc_status)
+{
+ struct nvme_completion cpl;
+ uint16_t status;
+
+ status = NVMEF(NVME_STATUS_SCT, sc_type) |
+ NVMEF(NVME_STATUS_SC, sc_status);
+ nvmf_init_cqe(&cpl, nc, status);
+ return (nvmf_allocate_response(nc->nc_qpair, &cpl));
+}
+
+int
+nvmf_controller_receive_capsule(struct nvmf_qpair *qp,
+ struct nvmf_capsule **ncp)
+{
+ struct nvmf_capsule *nc;
+ int error;
+ uint8_t sc_status;
+
+ *ncp = NULL;
+ error = nvmf_receive_capsule(qp, &nc);
+ if (error != 0)
+ return (error);
+
+ sc_status = nvmf_validate_command_capsule(nc);
+ if (sc_status != NVME_SC_SUCCESS) {
+ nvmf_send_generic_error(nc, sc_status);
+ nvmf_free_capsule(nc);
+ return (EPROTO);
+ }
+
+ *ncp = nc;
+ return (0);
+}
+
+int
+nvmf_controller_transmit_response(struct nvmf_capsule *nc)
+{
+ struct nvmf_qpair *qp = nc->nc_qpair;
+
+ /* Set SQHD. */
+ if (qp->nq_flow_control) {
+ qp->nq_sqhd = (qp->nq_sqhd + 1) % qp->nq_qsize;
+ nc->nc_cqe.sqhd = htole16(qp->nq_sqhd);
+ } else
+ nc->nc_cqe.sqhd = 0;
+
+ return (nvmf_transmit_capsule(nc));
+}
+
+int
+nvmf_send_response(const struct nvmf_capsule *cc, const void *cqe)
+{
+ struct nvmf_capsule *rc;
+ int error;
+
+ rc = nvmf_allocate_response(cc->nc_qpair, cqe);
+ if (rc == NULL)
+ return (ENOMEM);
+ error = nvmf_controller_transmit_response(rc);
+ nvmf_free_capsule(rc);
+ return (error);
+}
+
+int
+nvmf_send_error(const struct nvmf_capsule *cc, uint8_t sc_type,
+ uint8_t sc_status)
+{
+ struct nvmf_capsule *rc;
+ int error;
+
+ rc = nvmf_simple_response(cc, sc_type, sc_status);
+ error = nvmf_controller_transmit_response(rc);
+ nvmf_free_capsule(rc);
+ return (error);
+}
+
+int
+nvmf_send_generic_error(const struct nvmf_capsule *nc, uint8_t sc_status)
+{
+ return (nvmf_send_error(nc, NVME_SCT_GENERIC, sc_status));
+}
+
+int
+nvmf_send_success(const struct nvmf_capsule *nc)
+{
+ return (nvmf_send_generic_error(nc, NVME_SC_SUCCESS));
+}
+
+void
+nvmf_connect_invalid_parameters(const struct nvmf_capsule *cc, bool data,
+ uint16_t offset)
+{
+ struct nvmf_fabric_connect_rsp rsp;
+ struct nvmf_capsule *rc;
+
+ nvmf_init_cqe(&rsp, cc,
+ NVMEF(NVME_STATUS_SCT, NVME_SCT_COMMAND_SPECIFIC) |
+ NVMEF(NVME_STATUS_SC, NVMF_FABRIC_SC_INVALID_PARAM));
+ rsp.status_code_specific.invalid.ipo = htole16(offset);
+ rsp.status_code_specific.invalid.iattr = data ? 1 : 0;
+ rc = nvmf_allocate_response(cc->nc_qpair, &rsp);
+ nvmf_transmit_capsule(rc);
+ nvmf_free_capsule(rc);
+}
+
+struct nvmf_qpair *
+nvmf_accept(struct nvmf_association *na, const struct nvmf_qpair_params *params,
+ struct nvmf_capsule **ccp, struct nvmf_fabric_connect_data *data)
+{
+ static const char hostid_zero[sizeof(data->hostid)];
+ const struct nvmf_fabric_connect_cmd *cmd;
+ struct nvmf_qpair *qp;
+ struct nvmf_capsule *cc, *rc;
+ u_int qsize;
+ int error;
+ uint16_t cntlid;
+ uint8_t sc_status;
+
+ qp = NULL;
+ cc = NULL;
+ rc = NULL;
+ *ccp = NULL;
+ na_clear_error(na);
+ if (!na->na_controller) {
+ na_error(na, "Cannot accept on a host");
+ goto error;
+ }
+
+ qp = nvmf_allocate_qpair(na, params);
+ if (qp == NULL)
+ goto error;
+
+ /* Read the CONNECT capsule. */
+ error = nvmf_receive_capsule(qp, &cc);
+ if (error != 0) {
+ na_error(na, "Failed to receive CONNECT: %s", strerror(error));
+ goto error;
+ }
+
+ sc_status = nvmf_validate_command_capsule(cc);
+ if (sc_status != 0) {
+ na_error(na, "CONNECT command failed to validate: %u",
+ sc_status);
+ rc = nvmf_simple_response(cc, NVME_SCT_GENERIC, sc_status);
+ goto error;
+ }
+
+ cmd = nvmf_capsule_sqe(cc);
+ if (cmd->opcode != NVME_OPC_FABRICS_COMMANDS ||
+ cmd->fctype != NVMF_FABRIC_COMMAND_CONNECT) {
+ na_error(na, "Invalid opcode in CONNECT (%u,%u)", cmd->opcode,
+ cmd->fctype);
+ rc = nvmf_simple_response(cc, NVME_SCT_GENERIC,
+ NVME_SC_INVALID_OPCODE);
+ goto error;
+ }
+
+ if (cmd->recfmt != htole16(0)) {
+ na_error(na, "Unsupported CONNECT record format %u",
+ le16toh(cmd->recfmt));
+ rc = nvmf_simple_response(cc, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_INCOMPATIBLE_FORMAT);
+ goto error;
+ }
+
+ qsize = le16toh(cmd->sqsize) + 1;
+ if (cmd->qid == 0) {
+ /* Admin queue limits. */
+ if (qsize < NVME_MIN_ADMIN_ENTRIES ||
+ qsize > NVME_MAX_ADMIN_ENTRIES ||
+ qsize > na->na_params.max_admin_qsize) {
+ na_error(na, "Invalid queue size %u", qsize);
+ nvmf_connect_invalid_parameters(cc, false,
+ offsetof(struct nvmf_fabric_connect_cmd, sqsize));
+ goto error;
+ }
+ qp->nq_admin = true;
+ } else {
+ /* I/O queues not allowed for discovery. */
+ if (na->na_params.max_io_qsize == 0) {
+ na_error(na, "I/O queue on discovery controller");
+ nvmf_connect_invalid_parameters(cc, false,
+ offsetof(struct nvmf_fabric_connect_cmd, qid));
+ goto error;
+ }
+
+ /* I/O queue limits. */
+ if (qsize < NVME_MIN_IO_ENTRIES ||
+ qsize > NVME_MAX_IO_ENTRIES ||
+ qsize > na->na_params.max_io_qsize) {
+ na_error(na, "Invalid queue size %u", qsize);
+ nvmf_connect_invalid_parameters(cc, false,
+ offsetof(struct nvmf_fabric_connect_cmd, sqsize));
+ goto error;
+ }
+
+ /* KATO is reserved for I/O queues. */
+ if (cmd->kato != 0) {
+ na_error(na,
+ "KeepAlive timeout specified for I/O queue");
+ nvmf_connect_invalid_parameters(cc, false,
+ offsetof(struct nvmf_fabric_connect_cmd, kato));
+ goto error;
+ }
+ qp->nq_admin = false;
+ }
+ qp->nq_qsize = qsize;
+
+ /* Fetch CONNECT data. */
+ if (nvmf_capsule_data_len(cc) != sizeof(*data)) {
+ na_error(na, "Invalid data payload length for CONNECT: %zu",
+ nvmf_capsule_data_len(cc));
+ nvmf_connect_invalid_parameters(cc, false,
+ offsetof(struct nvmf_fabric_connect_cmd, sgl1));
+ goto error;
+ }
+
+ error = nvmf_receive_controller_data(cc, 0, data, sizeof(*data));
+ if (error != 0) {
+ na_error(na, "Failed to read data for CONNECT: %s",
+ strerror(error));
+ rc = nvmf_simple_response(cc, NVME_SCT_GENERIC,
+ NVME_SC_DATA_TRANSFER_ERROR);
+ goto error;
+ }
+
+ /* The hostid must be non-zero. */
+ if (memcmp(data->hostid, hostid_zero, sizeof(hostid_zero)) == 0) {
+ na_error(na, "HostID in CONNECT data is zero");
+ nvmf_connect_invalid_parameters(cc, true,
+ offsetof(struct nvmf_fabric_connect_data, hostid));
+ goto error;
+ }
+
+ cntlid = le16toh(data->cntlid);
+ if (cmd->qid == 0) {
+ if (na->na_params.dynamic_controller_model) {
+ if (cntlid != NVMF_CNTLID_DYNAMIC) {
+ na_error(na, "Invalid controller ID %#x",
+ cntlid);
+ nvmf_connect_invalid_parameters(cc, true,
+ offsetof(struct nvmf_fabric_connect_data,
+ cntlid));
+ goto error;
+ }
+ } else {
+ if (cntlid > NVMF_CNTLID_STATIC_MAX &&
+ cntlid != NVMF_CNTLID_STATIC_ANY) {
+ na_error(na, "Invalid controller ID %#x",
+ cntlid);
+ nvmf_connect_invalid_parameters(cc, true,
+ offsetof(struct nvmf_fabric_connect_data,
+ cntlid));
+ goto error;
+ }
+ }
+ } else {
+ /* Wildcard Controller IDs are only valid on an Admin queue. */
+ if (cntlid > NVMF_CNTLID_STATIC_MAX) {
+ na_error(na, "Invalid controller ID %#x", cntlid);
+ nvmf_connect_invalid_parameters(cc, true,
+ offsetof(struct nvmf_fabric_connect_data, cntlid));
+ goto error;
+ }
+ }
+
+ /* Simple validation of each NQN. */
+ if (!nvmf_nqn_valid(data->subnqn)) {
+ na_error(na, "Invalid SubNQN %.*s", (int)sizeof(data->subnqn),
+ data->subnqn);
+ nvmf_connect_invalid_parameters(cc, true,
+ offsetof(struct nvmf_fabric_connect_data, subnqn));
+ goto error;
+ }
+ if (!nvmf_nqn_valid(data->hostnqn)) {
+ na_error(na, "Invalid HostNQN %.*s", (int)sizeof(data->hostnqn),
+ data->hostnqn);
+ nvmf_connect_invalid_parameters(cc, true,
+ offsetof(struct nvmf_fabric_connect_data, hostnqn));
+ goto error;
+ }
+
+ if (na->na_params.sq_flow_control ||
+ (cmd->cattr & NVMF_CONNECT_ATTR_DISABLE_SQ_FC) == 0)
+ qp->nq_flow_control = true;
+ else
+ qp->nq_flow_control = false;
+ qp->nq_sqhd = 0;
+ qp->nq_kato = le32toh(cmd->kato);
+ *ccp = cc;
+ return (qp);
+error:
+ if (rc != NULL) {
+ nvmf_transmit_capsule(rc);
+ nvmf_free_capsule(rc);
+ }
+ if (cc != NULL)
+ nvmf_free_capsule(cc);
+ if (qp != NULL)
+ nvmf_free_qpair(qp);
+ return (NULL);
+}
+
+int
+nvmf_finish_accept(const struct nvmf_capsule *cc, uint16_t cntlid)
+{
+ struct nvmf_fabric_connect_rsp rsp;
+ struct nvmf_qpair *qp = cc->nc_qpair;
+ struct nvmf_capsule *rc;
+ int error;
+
+ nvmf_init_cqe(&rsp, cc, 0);
+ if (qp->nq_flow_control)
+ rsp.sqhd = htole16(qp->nq_sqhd);
+ else
+ rsp.sqhd = htole16(0xffff);
+ rsp.status_code_specific.success.cntlid = htole16(cntlid);
+ rc = nvmf_allocate_response(qp, &rsp);
+ if (rc == NULL)
+ return (ENOMEM);
+ error = nvmf_transmit_capsule(rc);
+ nvmf_free_capsule(rc);
+ if (error == 0)
+ qp->nq_cntlid = cntlid;
+ return (error);
+}
+
+uint64_t
+nvmf_controller_cap(struct nvmf_qpair *qp)
+{
+ const struct nvmf_association *na = qp->nq_association;
+
+ return (_nvmf_controller_cap(na->na_params.max_io_qsize,
+ NVMF_CC_EN_TIMEOUT));
+}
+
+bool
+nvmf_validate_cc(struct nvmf_qpair *qp, uint64_t cap, uint32_t old_cc,
+ uint32_t new_cc)
+{
+ const struct nvmf_association *na = qp->nq_association;
+
+ return (_nvmf_validate_cc(na->na_params.max_io_qsize, cap, old_cc,
+ new_cc));
+}
+
+void
+nvmf_init_discovery_controller_data(struct nvmf_qpair *qp,
+ struct nvme_controller_data *cdata)
+{
+ const struct nvmf_association *na = qp->nq_association;
+ struct utsname utsname;
+ char *cp;
+
+ memset(cdata, 0, sizeof(*cdata));
+
+ /*
+ * 5.2 Figure 37 states model name and serial are reserved,
+ * but Linux includes them. Don't bother with serial, but
+ * do set model name.
+ */
+ uname(&utsname);
+ nvmf_strpad(cdata->mn, utsname.sysname, sizeof(cdata->mn));
+ nvmf_strpad(cdata->fr, utsname.release, sizeof(cdata->fr));
+ cp = memchr(cdata->fr, '-', sizeof(cdata->fr));
+ if (cp != NULL)
+ memset(cp, ' ', sizeof(cdata->fr) - (cp - (char *)cdata->fr));
+
+ cdata->ctrlr_id = htole16(qp->nq_cntlid);
+ cdata->ver = htole32(NVME_REV(1, 4));
+ cdata->cntrltype = 2;
+
+ cdata->lpa = NVMEF(NVME_CTRLR_DATA_LPA_EXT_DATA, 1);
+ cdata->elpe = 0;
+
+ cdata->maxcmd = htole16(na->na_params.max_admin_qsize);
+
+ /* Transport-specific? */
+ cdata->sgls = htole32(
+ NVMEF(NVME_CTRLR_DATA_SGLS_TRANSPORT_DATA_BLOCK, 1) |
+ NVMEF(NVME_CTRLR_DATA_SGLS_ADDRESS_AS_OFFSET, 1) |
+ NVMEF(NVME_CTRLR_DATA_SGLS_NVM_COMMAND_SET, 1));
+
+ strlcpy(cdata->subnqn, NVMF_DISCOVERY_NQN, sizeof(cdata->subnqn));
+}
+
+void
+nvmf_init_io_controller_data(struct nvmf_qpair *qp, const char *serial,
+ const char *subnqn, int nn, uint32_t ioccsz,
+ struct nvme_controller_data *cdata)
+{
+ const struct nvmf_association *na = qp->nq_association;
+ struct utsname utsname;
+
+ uname(&utsname);
+
+ _nvmf_init_io_controller_data(qp->nq_cntlid, na->na_params.max_io_qsize,
+ serial, utsname.sysname, utsname.release, subnqn, nn, ioccsz,
+ sizeof(struct nvme_completion), cdata);
+}
+
+uint8_t
+nvmf_get_log_page_id(const struct nvme_command *cmd)
+{
+ assert(cmd->opc == NVME_OPC_GET_LOG_PAGE);
+ return (le32toh(cmd->cdw10) & 0xff);
+}
+
+uint64_t
+nvmf_get_log_page_length(const struct nvme_command *cmd)
+{
+ uint32_t numd;
+
+ assert(cmd->opc == NVME_OPC_GET_LOG_PAGE);
+ numd = le32toh(cmd->cdw10) >> 16 | (le32toh(cmd->cdw11) & 0xffff) << 16;
+ return ((numd + 1) * 4);
+}
+
+uint64_t
+nvmf_get_log_page_offset(const struct nvme_command *cmd)
+{
+ assert(cmd->opc == NVME_OPC_GET_LOG_PAGE);
+ return (le32toh(cmd->cdw12) | (uint64_t)le32toh(cmd->cdw13) << 32);
+}
+
+int
+nvmf_handoff_controller_qpair(struct nvmf_qpair *qp,
+ struct nvmf_handoff_controller_qpair *h)
+{
+ h->trtype = qp->nq_association->na_trtype;
+ return (nvmf_kernel_handoff_params(qp, &h->params));
+}
diff --git a/lib/libnvmf/nvmf_host.c b/lib/libnvmf/nvmf_host.c
new file mode 100644
index 000000000000..a0d95470d8ee
--- /dev/null
+++ b/lib/libnvmf/nvmf_host.c
@@ -0,0 +1,915 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/sysctl.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <uuid.h>
+
+#include "libnvmf.h"
+#include "internal.h"
+
+static void
+nvmf_init_sqe(void *sqe, uint8_t opcode)
+{
+ struct nvme_command *cmd = sqe;
+
+ memset(cmd, 0, sizeof(*cmd));
+ cmd->opc = opcode;
+}
+
+static void
+nvmf_init_fabrics_sqe(void *sqe, uint8_t fctype)
+{
+ struct nvmf_capsule_cmd *cmd = sqe;
+
+ nvmf_init_sqe(sqe, NVME_OPC_FABRICS_COMMANDS);
+ cmd->fctype = fctype;
+}
+
+struct nvmf_qpair *
+nvmf_connect(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params, uint16_t qid, u_int queue_size,
+ const uint8_t hostid[16], uint16_t cntlid, const char *subnqn,
+ const char *hostnqn, uint32_t kato)
+{
+ struct nvmf_fabric_connect_cmd cmd;
+ struct nvmf_fabric_connect_data data;
+ const struct nvmf_fabric_connect_rsp *rsp;
+ struct nvmf_qpair *qp;
+ struct nvmf_capsule *cc, *rc;
+ int error;
+ uint16_t sqhd, status;
+
+ qp = NULL;
+ cc = NULL;
+ rc = NULL;
+ na_clear_error(na);
+ if (na->na_controller) {
+ na_error(na, "Cannot connect on a controller");
+ goto error;
+ }
+
+ if (params->admin != (qid == 0)) {
+ na_error(na, "Admin queue must use Queue ID 0");
+ goto error;
+ }
+
+ if (qid == 0) {
+ if (queue_size < NVME_MIN_ADMIN_ENTRIES ||
+ queue_size > NVME_MAX_ADMIN_ENTRIES) {
+ na_error(na, "Invalid queue size %u", queue_size);
+ goto error;
+ }
+ } else {
+ if (queue_size < NVME_MIN_IO_ENTRIES ||
+ queue_size > NVME_MAX_IO_ENTRIES) {
+ na_error(na, "Invalid queue size %u", queue_size);
+ goto error;
+ }
+
+ /* KATO is only for Admin queues. */
+ if (kato != 0) {
+ na_error(na, "Cannot set KATO on I/O queues");
+ goto error;
+ }
+ }
+
+ qp = nvmf_allocate_qpair(na, params);
+ if (qp == NULL)
+ goto error;
+
+ nvmf_init_fabrics_sqe(&cmd, NVMF_FABRIC_COMMAND_CONNECT);
+ cmd.recfmt = 0;
+ cmd.qid = htole16(qid);
+
+ /* N.B. sqsize is 0's based. */
+ cmd.sqsize = htole16(queue_size - 1);
+ if (!na->na_params.sq_flow_control)
+ cmd.cattr |= NVMF_CONNECT_ATTR_DISABLE_SQ_FC;
+ cmd.kato = htole32(kato);
+
+ cc = nvmf_allocate_command(qp, &cmd);
+ if (cc == NULL) {
+ na_error(na, "Failed to allocate command capsule: %s",
+ strerror(errno));
+ goto error;
+ }
+
+ memset(&data, 0, sizeof(data));
+ memcpy(data.hostid, hostid, sizeof(data.hostid));
+ data.cntlid = htole16(cntlid);
+ strlcpy(data.subnqn, subnqn, sizeof(data.subnqn));
+ strlcpy(data.hostnqn, hostnqn, sizeof(data.hostnqn));
+
+ error = nvmf_capsule_append_data(cc, &data, sizeof(data), true);
+ if (error != 0) {
+ na_error(na, "Failed to append data to CONNECT capsule: %s",
+ strerror(error));
+ goto error;
+ }
+
+ error = nvmf_transmit_capsule(cc);
+ if (error != 0) {
+ na_error(na, "Failed to transmit CONNECT capsule: %s",
+ strerror(errno));
+ goto error;
+ }
+
+ error = nvmf_receive_capsule(qp, &rc);
+ if (error != 0) {
+ na_error(na, "Failed to receive CONNECT response: %s",
+ strerror(error));
+ goto error;
+ }
+
+ rsp = (const struct nvmf_fabric_connect_rsp *)&rc->nc_cqe;
+ status = le16toh(rc->nc_cqe.status);
+ if (status != 0) {
+ if (NVME_STATUS_GET_SC(status) == NVMF_FABRIC_SC_INVALID_PARAM)
+ na_error(na,
+ "CONNECT invalid parameter IATTR: %#x IPO: %#x",
+ rsp->status_code_specific.invalid.iattr,
+ rsp->status_code_specific.invalid.ipo);
+ else
+ na_error(na, "CONNECT failed, status %#x", status);
+ goto error;
+ }
+
+ if (rc->nc_cqe.cid != cmd.cid) {
+ na_error(na, "Mismatched CID in CONNECT response");
+ goto error;
+ }
+
+ if (!rc->nc_sqhd_valid) {
+ na_error(na, "CONNECT response without valid SQHD");
+ goto error;
+ }
+
+ sqhd = le16toh(rsp->sqhd);
+ if (sqhd == 0xffff) {
+ if (na->na_params.sq_flow_control) {
+ na_error(na, "Controller disabled SQ flow control");
+ goto error;
+ }
+ qp->nq_flow_control = false;
+ } else {
+ qp->nq_flow_control = true;
+ qp->nq_sqhd = sqhd;
+ qp->nq_sqtail = sqhd;
+ }
+
+ if (rsp->status_code_specific.success.authreq) {
+ na_error(na, "CONNECT response requests authentication\n");
+ goto error;
+ }
+
+ qp->nq_qsize = queue_size;
+ qp->nq_cntlid = le16toh(rsp->status_code_specific.success.cntlid);
+ qp->nq_kato = kato;
+ /* XXX: Save qid in qp? */
+ return (qp);
+
+error:
+ if (rc != NULL)
+ nvmf_free_capsule(rc);
+ if (cc != NULL)
+ nvmf_free_capsule(cc);
+ if (qp != NULL)
+ nvmf_free_qpair(qp);
+ return (NULL);
+}
+
+uint16_t
+nvmf_cntlid(struct nvmf_qpair *qp)
+{
+ return (qp->nq_cntlid);
+}
+
+int
+nvmf_host_transmit_command(struct nvmf_capsule *nc)
+{
+ struct nvmf_qpair *qp = nc->nc_qpair;
+ uint16_t new_sqtail;
+ int error;
+
+ /* Fail if the queue is full. */
+ new_sqtail = (qp->nq_sqtail + 1) % qp->nq_qsize;
+ if (new_sqtail == qp->nq_sqhd)
+ return (EBUSY);
+
+ nc->nc_sqe.cid = htole16(qp->nq_cid);
+
+ /* 4.2 Skip CID of 0xFFFF. */
+ qp->nq_cid++;
+ if (qp->nq_cid == 0xFFFF)
+ qp->nq_cid = 0;
+
+ error = nvmf_transmit_capsule(nc);
+ if (error != 0)
+ return (error);
+
+ qp->nq_sqtail = new_sqtail;
+ return (0);
+}
+
+/* Receive a single capsule and update SQ FC accounting. */
+static int
+nvmf_host_receive_capsule(struct nvmf_qpair *qp, struct nvmf_capsule **ncp)
+{
+ struct nvmf_capsule *nc;
+ int error;
+
+ /* If the SQ is empty, there is no response to wait for. */
+ if (qp->nq_sqhd == qp->nq_sqtail)
+ return (EWOULDBLOCK);
+
+ error = nvmf_receive_capsule(qp, &nc);
+ if (error != 0)
+ return (error);
+
+ if (qp->nq_flow_control) {
+ if (nc->nc_sqhd_valid)
+ qp->nq_sqhd = le16toh(nc->nc_cqe.sqhd);
+ } else {
+ /*
+ * If SQ FC is disabled, just advance the head for
+ * each response capsule received so that we track the
+ * number of outstanding commands.
+ */
+ qp->nq_sqhd = (qp->nq_sqhd + 1) % qp->nq_qsize;
+ }
+ *ncp = nc;
+ return (0);
+}
+
+int
+nvmf_host_receive_response(struct nvmf_qpair *qp, struct nvmf_capsule **ncp)
+{
+ struct nvmf_capsule *nc;
+
+ /* Return the oldest previously received response. */
+ if (!TAILQ_EMPTY(&qp->nq_rx_capsules)) {
+ nc = TAILQ_FIRST(&qp->nq_rx_capsules);
+ TAILQ_REMOVE(&qp->nq_rx_capsules, nc, nc_link);
+ *ncp = nc;
+ return (0);
+ }
+
+ return (nvmf_host_receive_capsule(qp, ncp));
+}
+
+int
+nvmf_host_wait_for_response(struct nvmf_capsule *cc,
+ struct nvmf_capsule **rcp)
+{
+ struct nvmf_qpair *qp = cc->nc_qpair;
+ struct nvmf_capsule *rc;
+ int error;
+
+ /* Check if a response was already received. */
+ TAILQ_FOREACH(rc, &qp->nq_rx_capsules, nc_link) {
+ if (rc->nc_cqe.cid == cc->nc_sqe.cid) {
+ TAILQ_REMOVE(&qp->nq_rx_capsules, rc, nc_link);
+ *rcp = rc;
+ return (0);
+ }
+ }
+
+ /* Wait for a response. */
+ for (;;) {
+ error = nvmf_host_receive_capsule(qp, &rc);
+ if (error != 0)
+ return (error);
+
+ if (rc->nc_cqe.cid != cc->nc_sqe.cid) {
+ TAILQ_INSERT_TAIL(&qp->nq_rx_capsules, rc, nc_link);
+ continue;
+ }
+
+ *rcp = rc;
+ return (0);
+ }
+}
+
+struct nvmf_capsule *
+nvmf_keepalive(struct nvmf_qpair *qp)
+{
+ struct nvme_command cmd;
+
+ if (!qp->nq_admin) {
+ errno = EINVAL;
+ return (NULL);
+ }
+
+ nvmf_init_sqe(&cmd, NVME_OPC_KEEP_ALIVE);
+
+ return (nvmf_allocate_command(qp, &cmd));
+}
+
+static struct nvmf_capsule *
+nvmf_get_property(struct nvmf_qpair *qp, uint32_t offset, uint8_t size)
+{
+ struct nvmf_fabric_prop_get_cmd cmd;
+
+ nvmf_init_fabrics_sqe(&cmd, NVMF_FABRIC_COMMAND_PROPERTY_GET);
+ switch (size) {
+ case 4:
+ cmd.attrib.size = NVMF_PROP_SIZE_4;
+ break;
+ case 8:
+ cmd.attrib.size = NVMF_PROP_SIZE_8;
+ break;
+ default:
+ errno = EINVAL;
+ return (NULL);
+ }
+ cmd.ofst = htole32(offset);
+
+ return (nvmf_allocate_command(qp, &cmd));
+}
+
+int
+nvmf_read_property(struct nvmf_qpair *qp, uint32_t offset, uint8_t size,
+ uint64_t *value)
+{
+ struct nvmf_capsule *cc, *rc;
+ const struct nvmf_fabric_prop_get_rsp *rsp;
+ uint16_t status;
+ int error;
+
+ if (!qp->nq_admin)
+ return (EINVAL);
+
+ cc = nvmf_get_property(qp, offset, size);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ rsp = (const struct nvmf_fabric_prop_get_rsp *)&rc->nc_cqe;
+ status = le16toh(rc->nc_cqe.status);
+ if (status != 0) {
+ printf("NVMF: PROPERTY_GET failed, status %#x\n", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ if (size == 8)
+ *value = le64toh(rsp->value.u64);
+ else
+ *value = le32toh(rsp->value.u32.low);
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+static struct nvmf_capsule *
+nvmf_set_property(struct nvmf_qpair *qp, uint32_t offset, uint8_t size,
+ uint64_t value)
+{
+ struct nvmf_fabric_prop_set_cmd cmd;
+
+ nvmf_init_fabrics_sqe(&cmd, NVMF_FABRIC_COMMAND_PROPERTY_SET);
+ switch (size) {
+ case 4:
+ cmd.attrib.size = NVMF_PROP_SIZE_4;
+ cmd.value.u32.low = htole32(value);
+ break;
+ case 8:
+ cmd.attrib.size = NVMF_PROP_SIZE_8;
+ cmd.value.u64 = htole64(value);
+ break;
+ default:
+ errno = EINVAL;
+ return (NULL);
+ }
+ cmd.ofst = htole32(offset);
+
+ return (nvmf_allocate_command(qp, &cmd));
+}
+
+int
+nvmf_write_property(struct nvmf_qpair *qp, uint32_t offset, uint8_t size,
+ uint64_t value)
+{
+ struct nvmf_capsule *cc, *rc;
+ uint16_t status;
+ int error;
+
+ if (!qp->nq_admin)
+ return (EINVAL);
+
+ cc = nvmf_set_property(qp, offset, size, value);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ status = le16toh(rc->nc_cqe.status);
+ if (status != 0) {
+ printf("NVMF: PROPERTY_SET failed, status %#x\n", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+int
+nvmf_hostid_from_hostuuid(uint8_t hostid[16])
+{
+ char hostuuid_str[64];
+ uuid_t hostuuid;
+ size_t len;
+ uint32_t status;
+
+ len = sizeof(hostuuid_str);
+ if (sysctlbyname("kern.hostuuid", hostuuid_str, &len, NULL, 0) != 0)
+ return (errno);
+
+ uuid_from_string(hostuuid_str, &hostuuid, &status);
+ switch (status) {
+ case uuid_s_ok:
+ break;
+ case uuid_s_no_memory:
+ return (ENOMEM);
+ default:
+ return (EINVAL);
+ }
+
+ uuid_enc_le(hostid, &hostuuid);
+ return (0);
+}
+
+int
+nvmf_nqn_from_hostuuid(char nqn[NVMF_NQN_MAX_LEN])
+{
+ char hostuuid_str[64];
+ size_t len;
+
+ len = sizeof(hostuuid_str);
+ if (sysctlbyname("kern.hostuuid", hostuuid_str, &len, NULL, 0) != 0)
+ return (errno);
+
+ strlcpy(nqn, NVMF_NQN_UUID_PRE, NVMF_NQN_MAX_LEN);
+ strlcat(nqn, hostuuid_str, NVMF_NQN_MAX_LEN);
+ return (0);
+}
+
+int
+nvmf_host_identify_controller(struct nvmf_qpair *qp,
+ struct nvme_controller_data *cdata)
+{
+ struct nvme_command cmd;
+ struct nvmf_capsule *cc, *rc;
+ int error;
+ uint16_t status;
+
+ if (!qp->nq_admin)
+ return (EINVAL);
+
+ nvmf_init_sqe(&cmd, NVME_OPC_IDENTIFY);
+
+ /* 5.15.1 Use CNS of 0x01 for controller data. */
+ cmd.cdw10 = htole32(1);
+
+ cc = nvmf_allocate_command(qp, &cmd);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_capsule_append_data(cc, cdata, sizeof(*cdata), false);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ status = le16toh(rc->nc_cqe.status);
+ if (status != 0) {
+ printf("NVMF: IDENTIFY failed, status %#x\n", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+int
+nvmf_host_identify_namespace(struct nvmf_qpair *qp, uint32_t nsid,
+ struct nvme_namespace_data *nsdata)
+{
+ struct nvme_command cmd;
+ struct nvmf_capsule *cc, *rc;
+ int error;
+ uint16_t status;
+
+ if (!qp->nq_admin)
+ return (EINVAL);
+
+ nvmf_init_sqe(&cmd, NVME_OPC_IDENTIFY);
+
+ /* 5.15.1 Use CNS of 0x00 for namespace data. */
+ cmd.cdw10 = htole32(0);
+ cmd.nsid = htole32(nsid);
+
+ cc = nvmf_allocate_command(qp, &cmd);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_capsule_append_data(cc, nsdata, sizeof(*nsdata), false);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ status = le16toh(rc->nc_cqe.status);
+ if (status != 0) {
+ printf("NVMF: IDENTIFY failed, status %#x\n", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+static int
+nvmf_get_discovery_log_page(struct nvmf_qpair *qp, uint64_t offset, void *buf,
+ size_t len)
+{
+ struct nvme_command cmd;
+ struct nvmf_capsule *cc, *rc;
+ size_t numd;
+ int error;
+ uint16_t status;
+
+ if (len % 4 != 0 || len == 0 || offset % 4 != 0)
+ return (EINVAL);
+
+ numd = (len / 4) - 1;
+ nvmf_init_sqe(&cmd, NVME_OPC_GET_LOG_PAGE);
+ cmd.cdw10 = htole32(numd << 16 | NVME_LOG_DISCOVERY);
+ cmd.cdw11 = htole32(numd >> 16);
+ cmd.cdw12 = htole32(offset);
+ cmd.cdw13 = htole32(offset >> 32);
+
+ cc = nvmf_allocate_command(qp, &cmd);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_capsule_append_data(cc, buf, len, false);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ status = le16toh(rc->nc_cqe.status);
+ if (NVMEV(NVME_STATUS_SC, status) ==
+ NVMF_FABRIC_SC_LOG_RESTART_DISCOVERY) {
+ nvmf_free_capsule(rc);
+ return (EAGAIN);
+ }
+ if (status != 0) {
+ printf("NVMF: GET_LOG_PAGE failed, status %#x\n", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+int
+nvmf_host_fetch_discovery_log_page(struct nvmf_qpair *qp,
+ struct nvme_discovery_log **logp)
+{
+ struct nvme_discovery_log hdr, *log;
+ size_t payload_len;
+ int error;
+
+ if (!qp->nq_admin)
+ return (EINVAL);
+
+ log = NULL;
+ for (;;) {
+ error = nvmf_get_discovery_log_page(qp, 0, &hdr, sizeof(hdr));
+ if (error != 0) {
+ free(log);
+ return (error);
+ }
+ nvme_discovery_log_swapbytes(&hdr);
+
+ if (hdr.recfmt != 0) {
+ printf("NVMF: Unsupported discovery log format: %d\n",
+ hdr.recfmt);
+ free(log);
+ return (EINVAL);
+ }
+
+ if (hdr.numrec > 1024) {
+ printf("NVMF: Too many discovery log entries: %ju\n",
+ (uintmax_t)hdr.numrec);
+ free(log);
+ return (EFBIG);
+ }
+
+ payload_len = sizeof(log->entries[0]) * hdr.numrec;
+ log = reallocf(log, sizeof(*log) + payload_len);
+ if (log == NULL)
+ return (ENOMEM);
+ *log = hdr;
+ if (hdr.numrec == 0)
+ break;
+
+ error = nvmf_get_discovery_log_page(qp, sizeof(hdr),
+ log->entries, payload_len);
+ if (error == EAGAIN)
+ continue;
+ if (error != 0) {
+ free(log);
+ return (error);
+ }
+
+ /* Re-read the header and check the generation count. */
+ error = nvmf_get_discovery_log_page(qp, 0, &hdr, sizeof(hdr));
+ if (error != 0) {
+ free(log);
+ return (error);
+ }
+ nvme_discovery_log_swapbytes(&hdr);
+
+ if (log->genctr != hdr.genctr)
+ continue;
+
+ for (u_int i = 0; i < log->numrec; i++)
+ nvme_discovery_log_entry_swapbytes(&log->entries[i]);
+ break;
+ }
+ *logp = log;
+ return (0);
+}
+
+int
+nvmf_host_request_queues(struct nvmf_qpair *qp, u_int requested, u_int *actual)
+{
+ struct nvme_command cmd;
+ struct nvmf_capsule *cc, *rc;
+ int error;
+ uint16_t status;
+
+ if (!qp->nq_admin || requested < 1 || requested > 65535)
+ return (EINVAL);
+
+ /* The number of queues is 0's based. */
+ requested--;
+
+ nvmf_init_sqe(&cmd, NVME_OPC_SET_FEATURES);
+ cmd.cdw10 = htole32(NVME_FEAT_NUMBER_OF_QUEUES);
+
+ /* Same number of completion and submission queues. */
+ cmd.cdw11 = htole32((requested << 16) | requested);
+
+ cc = nvmf_allocate_command(qp, &cmd);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ status = le16toh(rc->nc_cqe.status);
+ if (status != 0) {
+ printf("NVMF: SET_FEATURES failed, status %#x\n", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ *actual = (le32toh(rc->nc_cqe.cdw0) & 0xffff) + 1;
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+static bool
+is_queue_pair_idle(struct nvmf_qpair *qp)
+{
+ if (qp->nq_sqhd != qp->nq_sqtail)
+ return (false);
+ if (!TAILQ_EMPTY(&qp->nq_rx_capsules))
+ return (false);
+ return (true);
+}
+
+static int
+prepare_queues_for_handoff(struct nvmf_handoff_host *hh,
+ struct nvmf_qpair *admin_qp, u_int num_queues,
+ struct nvmf_qpair **io_queues, const struct nvme_controller_data *cdata)
+{
+ struct nvmf_handoff_qpair_params *io;
+ u_int i;
+ int error;
+
+ memset(hh, 0, sizeof(*hh));
+
+ /* All queue pairs must be idle. */
+ if (!is_queue_pair_idle(admin_qp))
+ return (EBUSY);
+ for (i = 0; i < num_queues; i++) {
+ if (!is_queue_pair_idle(io_queues[i]))
+ return (EBUSY);
+ }
+
+ /* First, the admin queue. */
+ hh->trtype = admin_qp->nq_association->na_trtype;
+ hh->kato = admin_qp->nq_kato;
+ error = nvmf_kernel_handoff_params(admin_qp, &hh->admin);
+ if (error)
+ return (error);
+
+ /* Next, the I/O queues. */
+ hh->num_io_queues = num_queues;
+ io = calloc(num_queues, sizeof(*io));
+ for (i = 0; i < num_queues; i++) {
+ error = nvmf_kernel_handoff_params(io_queues[i], &io[i]);
+ if (error) {
+ free(io);
+ return (error);
+ }
+ }
+
+ hh->io = io;
+ hh->cdata = cdata;
+ return (0);
+}
+
+int
+nvmf_handoff_host(struct nvmf_qpair *admin_qp, u_int num_queues,
+ struct nvmf_qpair **io_queues, const struct nvme_controller_data *cdata)
+{
+ struct nvmf_handoff_host hh;
+ u_int i;
+ int error, fd;
+
+ fd = open("/dev/nvmf", O_RDWR);
+ if (fd == -1) {
+ error = errno;
+ goto out;
+ }
+
+ error = prepare_queues_for_handoff(&hh, admin_qp, num_queues, io_queues,
+ cdata);
+ if (error != 0)
+ goto out;
+
+ if (ioctl(fd, NVMF_HANDOFF_HOST, &hh) == -1)
+ error = errno;
+ free(hh.io);
+
+out:
+ if (fd >= 0)
+ close(fd);
+ for (i = 0; i < num_queues; i++)
+ (void)nvmf_free_qpair(io_queues[i]);
+ (void)nvmf_free_qpair(admin_qp);
+ return (error);
+}
+
+int
+nvmf_disconnect_host(const char *host)
+{
+ int error, fd;
+
+ error = 0;
+ fd = open("/dev/nvmf", O_RDWR);
+ if (fd == -1) {
+ error = errno;
+ goto out;
+ }
+
+ if (ioctl(fd, NVMF_DISCONNECT_HOST, &host) == -1)
+ error = errno;
+
+out:
+ if (fd >= 0)
+ close(fd);
+ return (error);
+}
+
+int
+nvmf_disconnect_all(void)
+{
+ int error, fd;
+
+ error = 0;
+ fd = open("/dev/nvmf", O_RDWR);
+ if (fd == -1) {
+ error = errno;
+ goto out;
+ }
+
+ if (ioctl(fd, NVMF_DISCONNECT_ALL) == -1)
+ error = errno;
+
+out:
+ if (fd >= 0)
+ close(fd);
+ return (error);
+}
+
+int
+nvmf_reconnect_params(int fd, struct nvmf_reconnect_params *rparams)
+{
+ if (ioctl(fd, NVMF_RECONNECT_PARAMS, rparams) == -1)
+ return (errno);
+ return (0);
+}
+
+int
+nvmf_reconnect_host(int fd, struct nvmf_qpair *admin_qp, u_int num_queues,
+ struct nvmf_qpair **io_queues, const struct nvme_controller_data *cdata)
+{
+ struct nvmf_handoff_host hh;
+ u_int i;
+ int error;
+
+ error = prepare_queues_for_handoff(&hh, admin_qp, num_queues, io_queues,
+ cdata);
+ if (error != 0)
+ goto out;
+
+ if (ioctl(fd, NVMF_RECONNECT_HOST, &hh) == -1)
+ error = errno;
+ free(hh.io);
+
+out:
+ for (i = 0; i < num_queues; i++)
+ (void)nvmf_free_qpair(io_queues[i]);
+ (void)nvmf_free_qpair(admin_qp);
+ return (error);
+}
diff --git a/lib/libnvmf/nvmf_tcp.c b/lib/libnvmf/nvmf_tcp.c
new file mode 100644
index 000000000000..b9bf8153ab1b
--- /dev/null
+++ b/lib/libnvmf/nvmf_tcp.c
@@ -0,0 +1,1474 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/endian.h>
+#include <sys/gsb_crc32.h>
+#include <sys/queue.h>
+#include <sys/uio.h>
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "libnvmf.h"
+#include "internal.h"
+#include "nvmf_tcp.h"
+
+struct nvmf_tcp_qpair;
+
+struct nvmf_tcp_command_buffer {
+ struct nvmf_tcp_qpair *qp;
+
+ void *data;
+ size_t data_len;
+ size_t data_xfered;
+ uint32_t data_offset;
+
+ uint16_t cid;
+ uint16_t ttag;
+
+ LIST_ENTRY(nvmf_tcp_command_buffer) link;
+};
+
+LIST_HEAD(nvmf_tcp_command_buffer_list, nvmf_tcp_command_buffer);
+
+struct nvmf_tcp_association {
+ struct nvmf_association na;
+
+ uint32_t ioccsz;
+};
+
+struct nvmf_tcp_rxpdu {
+ struct nvme_tcp_common_pdu_hdr *hdr;
+ uint32_t data_len;
+};
+
+struct nvmf_tcp_capsule {
+ struct nvmf_capsule nc;
+
+ struct nvmf_tcp_rxpdu rx_pdu;
+ struct nvmf_tcp_command_buffer *cb;
+
+ TAILQ_ENTRY(nvmf_tcp_capsule) link;
+};
+
+struct nvmf_tcp_qpair {
+ struct nvmf_qpair qp;
+ int s;
+
+ uint8_t txpda;
+ uint8_t rxpda;
+ bool header_digests;
+ bool data_digests;
+ uint32_t maxr2t;
+ uint32_t maxh2cdata;
+ uint32_t max_icd; /* Host only */
+ uint16_t next_ttag; /* Controller only */
+
+ struct nvmf_tcp_command_buffer_list tx_buffers;
+ struct nvmf_tcp_command_buffer_list rx_buffers;
+ TAILQ_HEAD(, nvmf_tcp_capsule) rx_capsules;
+};
+
+#define TASSOC(nc) ((struct nvmf_tcp_association *)(na))
+#define TCAP(nc) ((struct nvmf_tcp_capsule *)(nc))
+#define CTCAP(nc) ((const struct nvmf_tcp_capsule *)(nc))
+#define TQP(qp) ((struct nvmf_tcp_qpair *)(qp))
+
+static const char zero_padding[NVME_TCP_PDU_PDO_MAX_OFFSET];
+
+static uint32_t
+compute_digest(const void *buf, size_t len)
+{
+ return (calculate_crc32c(0xffffffff, buf, len) ^ 0xffffffff);
+}
+
+static struct nvmf_tcp_command_buffer *
+tcp_alloc_command_buffer(struct nvmf_tcp_qpair *qp, void *data,
+ uint32_t data_offset, size_t data_len, uint16_t cid, uint16_t ttag,
+ bool receive)
+{
+ struct nvmf_tcp_command_buffer *cb;
+
+ cb = malloc(sizeof(*cb));
+ cb->qp = qp;
+ cb->data = data;
+ cb->data_offset = data_offset;
+ cb->data_len = data_len;
+ cb->data_xfered = 0;
+ cb->cid = cid;
+ cb->ttag = ttag;
+
+ if (receive)
+ LIST_INSERT_HEAD(&qp->rx_buffers, cb, link);
+ else
+ LIST_INSERT_HEAD(&qp->tx_buffers, cb, link);
+ return (cb);
+}
+
+static struct nvmf_tcp_command_buffer *
+tcp_find_command_buffer(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ bool receive)
+{
+ struct nvmf_tcp_command_buffer_list *list;
+ struct nvmf_tcp_command_buffer *cb;
+
+ list = receive ? &qp->rx_buffers : &qp->tx_buffers;
+ LIST_FOREACH(cb, list, link) {
+ if (cb->cid == cid && cb->ttag == ttag)
+ return (cb);
+ }
+ return (NULL);
+}
+
+static void
+tcp_purge_command_buffer(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ bool receive)
+{
+ struct nvmf_tcp_command_buffer *cb;
+
+ cb = tcp_find_command_buffer(qp, cid, ttag, receive);
+ if (cb != NULL)
+ LIST_REMOVE(cb, link);
+}
+
+static void
+tcp_free_command_buffer(struct nvmf_tcp_command_buffer *cb)
+{
+ LIST_REMOVE(cb, link);
+ free(cb);
+}
+
+static int
+nvmf_tcp_write_pdu(struct nvmf_tcp_qpair *qp, const void *pdu, size_t len)
+{
+ ssize_t nwritten;
+ const char *cp;
+
+ cp = pdu;
+ while (len != 0) {
+ nwritten = write(qp->s, cp, len);
+ if (nwritten < 0)
+ return (errno);
+ len -= nwritten;
+ cp += nwritten;
+ }
+ return (0);
+}
+
+static int
+nvmf_tcp_write_pdu_iov(struct nvmf_tcp_qpair *qp, struct iovec *iov,
+ u_int iovcnt, size_t len)
+{
+ ssize_t nwritten;
+
+ for (;;) {
+ nwritten = writev(qp->s, iov, iovcnt);
+ if (nwritten < 0)
+ return (errno);
+
+ len -= nwritten;
+ if (len == 0)
+ return (0);
+
+ while (iov->iov_len <= (size_t)nwritten) {
+ nwritten -= iov->iov_len;
+ iovcnt--;
+ iov++;
+ }
+
+ iov->iov_base = (char *)iov->iov_base + nwritten;
+ iov->iov_len -= nwritten;
+ }
+}
+
+static void
+nvmf_tcp_report_error(struct nvmf_association *na, struct nvmf_tcp_qpair *qp,
+ uint16_t fes, uint32_t fei, const void *rx_pdu, size_t pdu_len, u_int hlen)
+{
+ struct nvme_tcp_term_req_hdr hdr;
+ struct iovec iov[2];
+
+ if (hlen != 0) {
+ if (hlen > NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE)
+ hlen = NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE;
+ if (hlen > pdu_len)
+ hlen = pdu_len;
+ }
+
+ memset(&hdr, 0, sizeof(hdr));
+ hdr.common.pdu_type = na->na_controller ?
+ NVME_TCP_PDU_TYPE_C2H_TERM_REQ : NVME_TCP_PDU_TYPE_H2C_TERM_REQ;
+ hdr.common.hlen = sizeof(hdr);
+ hdr.common.plen = sizeof(hdr) + hlen;
+ hdr.fes = htole16(fes);
+ le32enc(hdr.fei, fei);
+ iov[0].iov_base = &hdr;
+ iov[0].iov_len = sizeof(hdr);
+ iov[1].iov_base = __DECONST(void *, rx_pdu);
+ iov[1].iov_len = hlen;
+
+ (void)nvmf_tcp_write_pdu_iov(qp, iov, nitems(iov), sizeof(hdr) + hlen);
+ close(qp->s);
+ qp->s = -1;
+}
+
+static int
+nvmf_tcp_validate_pdu(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu,
+ size_t pdu_len)
+{
+ const struct nvme_tcp_common_pdu_hdr *ch;
+ uint32_t data_len, fei, plen;
+ uint32_t digest, rx_digest;
+ u_int hlen;
+ int error;
+ uint16_t fes;
+
+ /* Determine how large of a PDU header to return for errors. */
+ ch = pdu->hdr;
+ hlen = ch->hlen;
+ plen = le32toh(ch->plen);
+ if (hlen < sizeof(*ch) || hlen > plen)
+ hlen = sizeof(*ch);
+
+ error = nvmf_tcp_validate_pdu_header(ch,
+ qp->qp.nq_association->na_controller, qp->header_digests,
+ qp->data_digests, qp->rxpda, &data_len, &fes, &fei);
+ if (error != 0) {
+ if (error == ECONNRESET) {
+ close(qp->s);
+ qp->s = -1;
+ } else {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ fes, fei, ch, pdu_len, hlen);
+ }
+ return (error);
+ }
+
+ /* Check header digest if present. */
+ if ((ch->flags & NVME_TCP_CH_FLAGS_HDGSTF) != 0) {
+ digest = compute_digest(ch, ch->hlen);
+ memcpy(&rx_digest, (const char *)ch + ch->hlen,
+ sizeof(rx_digest));
+ if (digest != rx_digest) {
+ printf("NVMe/TCP: Header digest mismatch\n");
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_HDGST_ERROR, rx_digest, ch,
+ pdu_len, hlen);
+ return (EBADMSG);
+ }
+ }
+
+ /* Check data digest if present. */
+ if ((ch->flags & NVME_TCP_CH_FLAGS_DDGSTF) != 0) {
+ digest = compute_digest((const char *)ch + ch->pdo, data_len);
+ memcpy(&rx_digest, (const char *)ch + plen - sizeof(rx_digest),
+ sizeof(rx_digest));
+ if (digest != rx_digest) {
+ printf("NVMe/TCP: Data digest mismatch\n");
+ return (EBADMSG);
+ }
+ }
+
+ pdu->data_len = data_len;
+ return (0);
+}
+
+/*
+ * Read data from a socket, retrying until the data has been fully
+ * read or an error occurs.
+ */
+static int
+nvmf_tcp_read_buffer(int s, void *buf, size_t len)
+{
+ ssize_t nread;
+ char *cp;
+
+ cp = buf;
+ while (len != 0) {
+ nread = read(s, cp, len);
+ if (nread < 0)
+ return (errno);
+ if (nread == 0)
+ return (ECONNRESET);
+ len -= nread;
+ cp += nread;
+ }
+ return (0);
+}
+
+static int
+nvmf_tcp_read_pdu(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvme_tcp_common_pdu_hdr ch;
+ uint32_t plen;
+ int error;
+
+ memset(pdu, 0, sizeof(*pdu));
+ error = nvmf_tcp_read_buffer(qp->s, &ch, sizeof(ch));
+ if (error != 0)
+ return (error);
+
+ plen = le32toh(ch.plen);
+
+ /*
+ * Validate a header with garbage lengths to trigger
+ * an error message without reading more.
+ */
+ if (plen < sizeof(ch) || ch.hlen > plen) {
+ pdu->hdr = &ch;
+ error = nvmf_tcp_validate_pdu(qp, pdu, sizeof(ch));
+ pdu->hdr = NULL;
+ assert(error != 0);
+ return (error);
+ }
+
+ /* Read the rest of the PDU. */
+ pdu->hdr = malloc(plen);
+ memcpy(pdu->hdr, &ch, sizeof(ch));
+ error = nvmf_tcp_read_buffer(qp->s, pdu->hdr + 1, plen - sizeof(ch));
+ if (error != 0)
+ return (error);
+ error = nvmf_tcp_validate_pdu(qp, pdu, plen);
+ if (error != 0) {
+ free(pdu->hdr);
+ pdu->hdr = NULL;
+ }
+ return (error);
+}
+
+static void
+nvmf_tcp_free_pdu(struct nvmf_tcp_rxpdu *pdu)
+{
+ free(pdu->hdr);
+ pdu->hdr = NULL;
+}
+
+static int
+nvmf_tcp_handle_term_req(struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvme_tcp_term_req_hdr *hdr;
+
+ hdr = (void *)pdu->hdr;
+
+ printf("NVMe/TCP: Received termination request: fes %#x fei %#x\n",
+ le16toh(hdr->fes), le32dec(hdr->fei));
+ nvmf_tcp_free_pdu(pdu);
+ return (ECONNRESET);
+}
+
+static int
+nvmf_tcp_save_command_capsule(struct nvmf_tcp_qpair *qp,
+ struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvme_tcp_cmd *cmd;
+ struct nvmf_capsule *nc;
+ struct nvmf_tcp_capsule *tc;
+
+ cmd = (void *)pdu->hdr;
+
+ nc = nvmf_allocate_command(&qp->qp, &cmd->ccsqe);
+ if (nc == NULL)
+ return (ENOMEM);
+
+ tc = TCAP(nc);
+ tc->rx_pdu = *pdu;
+
+ TAILQ_INSERT_TAIL(&qp->rx_capsules, tc, link);
+ return (0);
+}
+
+static int
+nvmf_tcp_save_response_capsule(struct nvmf_tcp_qpair *qp,
+ struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvme_tcp_rsp *rsp;
+ struct nvmf_capsule *nc;
+ struct nvmf_tcp_capsule *tc;
+
+ rsp = (void *)pdu->hdr;
+
+ nc = nvmf_allocate_response(&qp->qp, &rsp->rccqe);
+ if (nc == NULL)
+ return (ENOMEM);
+
+ nc->nc_sqhd_valid = true;
+ tc = TCAP(nc);
+ tc->rx_pdu = *pdu;
+
+ TAILQ_INSERT_TAIL(&qp->rx_capsules, tc, link);
+
+ /*
+ * Once the CQE has been received, no further transfers to the
+ * command buffer for the associated CID can occur.
+ */
+ tcp_purge_command_buffer(qp, rsp->rccqe.cid, 0, true);
+ tcp_purge_command_buffer(qp, rsp->rccqe.cid, 0, false);
+
+ return (0);
+}
+
+/*
+ * Construct and send a PDU that contains an optional data payload.
+ * This includes dealing with digests and the length fields in the
+ * common header.
+ */
+static int
+nvmf_tcp_construct_pdu(struct nvmf_tcp_qpair *qp, void *hdr, size_t hlen,
+ void *data, uint32_t data_len)
+{
+ struct nvme_tcp_common_pdu_hdr *ch;
+ struct iovec iov[5];
+ u_int iovcnt;
+ uint32_t header_digest, data_digest, pad, pdo, plen;
+
+ plen = hlen;
+ if (qp->header_digests)
+ plen += sizeof(header_digest);
+ if (data_len != 0) {
+ pdo = roundup2(plen, qp->txpda);
+ pad = pdo - plen;
+ plen = pdo + data_len;
+ if (qp->data_digests)
+ plen += sizeof(data_digest);
+ } else {
+ assert(data == NULL);
+ pdo = 0;
+ pad = 0;
+ }
+
+ ch = hdr;
+ ch->hlen = hlen;
+ if (qp->header_digests)
+ ch->flags |= NVME_TCP_CH_FLAGS_HDGSTF;
+ if (qp->data_digests && data_len != 0)
+ ch->flags |= NVME_TCP_CH_FLAGS_DDGSTF;
+ ch->pdo = pdo;
+ ch->plen = htole32(plen);
+
+ /* CH + PSH */
+ iov[0].iov_base = hdr;
+ iov[0].iov_len = hlen;
+ iovcnt = 1;
+
+ /* HDGST */
+ if (qp->header_digests) {
+ header_digest = compute_digest(hdr, hlen);
+ iov[iovcnt].iov_base = &header_digest;
+ iov[iovcnt].iov_len = sizeof(header_digest);
+ iovcnt++;
+ }
+
+ if (pad != 0) {
+ /* PAD */
+ iov[iovcnt].iov_base = __DECONST(char *, zero_padding);
+ iov[iovcnt].iov_len = pad;
+ iovcnt++;
+ }
+
+ if (data_len != 0) {
+ /* DATA */
+ iov[iovcnt].iov_base = data;
+ iov[iovcnt].iov_len = data_len;
+ iovcnt++;
+
+ /* DDGST */
+ if (qp->data_digests) {
+ data_digest = compute_digest(data, data_len);
+ iov[iovcnt].iov_base = &data_digest;
+ iov[iovcnt].iov_len = sizeof(data_digest);
+ iovcnt++;
+ }
+ }
+
+ return (nvmf_tcp_write_pdu_iov(qp, iov, iovcnt, plen));
+}
+
+static int
+nvmf_tcp_handle_h2c_data(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvme_tcp_h2c_data_hdr *h2c;
+ struct nvmf_tcp_command_buffer *cb;
+ uint32_t data_len, data_offset;
+ const char *icd;
+
+ h2c = (void *)pdu->hdr;
+ if (le32toh(h2c->datal) > qp->maxh2cdata) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_LIMIT_EXCEEDED, 0,
+ pdu->hdr, le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb = tcp_find_command_buffer(qp, h2c->cccid, h2c->ttag, true);
+ if (cb == NULL) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_h2c_data_hdr, ttag), pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_len = le32toh(h2c->datal);
+ if (data_len != pdu->data_len) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_h2c_data_hdr, datal), pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_offset = le32toh(h2c->datao);
+ if (data_offset < cb->data_offset ||
+ data_offset + data_len > cb->data_offset + cb->data_len) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE, 0,
+ pdu->hdr, le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if (data_offset != cb->data_offset + cb->data_xfered) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if ((cb->data_xfered + data_len == cb->data_len) !=
+ ((pdu->hdr->flags & NVME_TCP_H2C_DATA_FLAGS_LAST_PDU) != 0)) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb->data_xfered += data_len;
+ data_offset -= cb->data_offset;
+ icd = (const char *)pdu->hdr + pdu->hdr->pdo;
+ memcpy((char *)cb->data + data_offset, icd, data_len);
+
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+}
+
+static int
+nvmf_tcp_handle_c2h_data(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvme_tcp_c2h_data_hdr *c2h;
+ struct nvmf_tcp_command_buffer *cb;
+ uint32_t data_len, data_offset;
+ const char *icd;
+
+ c2h = (void *)pdu->hdr;
+
+ cb = tcp_find_command_buffer(qp, c2h->cccid, 0, true);
+ if (cb == NULL) {
+ /*
+ * XXX: Could be PDU sequence error if cccid is for a
+ * command that doesn't use a command buffer.
+ */
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_c2h_data_hdr, cccid), pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_len = le32toh(c2h->datal);
+ if (data_len != pdu->data_len) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_c2h_data_hdr, datal), pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_offset = le32toh(c2h->datao);
+ if (data_offset < cb->data_offset ||
+ data_offset + data_len > cb->data_offset + cb->data_len) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE, 0,
+ pdu->hdr, le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if (data_offset != cb->data_offset + cb->data_xfered) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if ((cb->data_xfered + data_len == cb->data_len) !=
+ ((pdu->hdr->flags & NVME_TCP_C2H_DATA_FLAGS_LAST_PDU) != 0)) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb->data_xfered += data_len;
+ data_offset -= cb->data_offset;
+ icd = (const char *)pdu->hdr + pdu->hdr->pdo;
+ memcpy((char *)cb->data + data_offset, icd, data_len);
+
+ if ((pdu->hdr->flags & NVME_TCP_C2H_DATA_FLAGS_SUCCESS) != 0) {
+ struct nvme_completion cqe;
+ struct nvmf_tcp_capsule *tc;
+ struct nvmf_capsule *nc;
+
+ memset(&cqe, 0, sizeof(cqe));
+ cqe.cid = cb->cid;
+
+ nc = nvmf_allocate_response(&qp->qp, &cqe);
+ if (nc == NULL) {
+ nvmf_tcp_free_pdu(pdu);
+ return (ENOMEM);
+ }
+ nc->nc_sqhd_valid = false;
+
+ tc = TCAP(nc);
+ TAILQ_INSERT_TAIL(&qp->rx_capsules, tc, link);
+ }
+
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+}
+
+/* NB: cid and ttag and little-endian already. */
+static int
+tcp_send_h2c_pdu(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ uint32_t data_offset, void *buf, size_t len, bool last_pdu)
+{
+ struct nvme_tcp_h2c_data_hdr h2c;
+
+ memset(&h2c, 0, sizeof(h2c));
+ h2c.common.pdu_type = NVME_TCP_PDU_TYPE_H2C_DATA;
+ if (last_pdu)
+ h2c.common.flags |= NVME_TCP_H2C_DATA_FLAGS_LAST_PDU;
+ h2c.cccid = cid;
+ h2c.ttag = ttag;
+ h2c.datao = htole32(data_offset);
+ h2c.datal = htole32(len);
+
+ return (nvmf_tcp_construct_pdu(qp, &h2c, sizeof(h2c), buf, len));
+}
+
+/* Sends one or more H2C_DATA PDUs, subject to MAXH2CDATA. */
+static int
+tcp_send_h2c_pdus(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ uint32_t data_offset, void *buf, size_t len, bool last_pdu)
+{
+ char *p;
+
+ p = buf;
+ while (len != 0) {
+ size_t todo;
+ int error;
+
+ todo = len;
+ if (todo > qp->maxh2cdata)
+ todo = qp->maxh2cdata;
+ error = tcp_send_h2c_pdu(qp, cid, ttag, data_offset, p, todo,
+ last_pdu && todo == len);
+ if (error != 0)
+ return (error);
+ p += todo;
+ len -= todo;
+ }
+ return (0);
+}
+
+static int
+nvmf_tcp_handle_r2t(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ struct nvmf_tcp_command_buffer *cb;
+ struct nvme_tcp_r2t_hdr *r2t;
+ uint32_t data_len, data_offset;
+ int error;
+
+ r2t = (void *)pdu->hdr;
+
+ cb = tcp_find_command_buffer(qp, r2t->cccid, 0, false);
+ if (cb == NULL) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_r2t_hdr, cccid), pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_offset = le32toh(r2t->r2to);
+ if (data_offset != cb->data_xfered) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->hdr,
+ le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ /*
+ * XXX: The spec does not specify how to handle R2T tranfers
+ * out of range of the original command.
+ */
+ data_len = le32toh(r2t->r2tl);
+ if (data_offset + data_len > cb->data_len) {
+ nvmf_tcp_report_error(qp->qp.nq_association, qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE, 0,
+ pdu->hdr, le32toh(pdu->hdr->plen), pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb->data_xfered += data_len;
+
+ /*
+ * Write out one or more H2C_DATA PDUs containing the
+ * requested data.
+ */
+ error = tcp_send_h2c_pdus(qp, r2t->cccid, r2t->ttag,
+ data_offset, (char *)cb->data + data_offset, data_len, true);
+
+ nvmf_tcp_free_pdu(pdu);
+ return (error);
+}
+
+static int
+nvmf_tcp_receive_pdu(struct nvmf_tcp_qpair *qp)
+{
+ struct nvmf_tcp_rxpdu pdu;
+ int error;
+
+ error = nvmf_tcp_read_pdu(qp, &pdu);
+ if (error != 0)
+ return (error);
+
+ switch (pdu.hdr->pdu_type) {
+ default:
+ __unreachable();
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ return (nvmf_tcp_handle_term_req(&pdu));
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ return (nvmf_tcp_save_command_capsule(qp, &pdu));
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ return (nvmf_tcp_save_response_capsule(qp, &pdu));
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ return (nvmf_tcp_handle_h2c_data(qp, &pdu));
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ return (nvmf_tcp_handle_c2h_data(qp, &pdu));
+ case NVME_TCP_PDU_TYPE_R2T:
+ return (nvmf_tcp_handle_r2t(qp, &pdu));
+ }
+}
+
+static bool
+nvmf_tcp_validate_ic_pdu(struct nvmf_association *na, struct nvmf_tcp_qpair *qp,
+ const struct nvme_tcp_common_pdu_hdr *ch, size_t pdu_len)
+{
+ const struct nvme_tcp_ic_req *pdu;
+ uint32_t plen;
+ u_int hlen;
+
+ /* Determine how large of a PDU header to return for errors. */
+ hlen = ch->hlen;
+ plen = le32toh(ch->plen);
+ if (hlen < sizeof(*ch) || hlen > plen)
+ hlen = sizeof(*ch);
+
+ /*
+ * Errors must be reported for the lowest incorrect field
+ * first, so validate fields in order.
+ */
+
+ /* Validate pdu_type. */
+
+ /* Controllers only receive PDUs with a PDU direction of 0. */
+ if (na->na_controller != ((ch->pdu_type & 0x01) == 0)) {
+ na_error(na, "NVMe/TCP: Invalid PDU type %u", ch->pdu_type);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 0, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ switch (ch->pdu_type) {
+ case NVME_TCP_PDU_TYPE_IC_REQ:
+ case NVME_TCP_PDU_TYPE_IC_RESP:
+ break;
+ default:
+ na_error(na, "NVMe/TCP: Invalid PDU type %u", ch->pdu_type);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 0, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ /* Validate flags. */
+ if (ch->flags != 0) {
+ na_error(na, "NVMe/TCP: Invalid PDU header flags %#x",
+ ch->flags);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 1, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ /* Validate hlen. */
+ if (ch->hlen != 128) {
+ na_error(na, "NVMe/TCP: Invalid PDU header length %u",
+ ch->hlen);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 2, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ /* Validate pdo. */
+ if (ch->pdo != 0) {
+ na_error(na, "NVMe/TCP: Invalid PDU data offset %u", ch->pdo);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 3, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ /* Validate plen. */
+ if (plen != 128) {
+ na_error(na, "NVMe/TCP: Invalid PDU length %u", plen);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 4, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ /* Validate fields common to both ICReq and ICResp. */
+ pdu = (const struct nvme_tcp_ic_req *)ch;
+ if (le16toh(pdu->pfv) != 0) {
+ na_error(na, "NVMe/TCP: Unsupported PDU version %u",
+ le16toh(pdu->pfv));
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_DATA_UNSUPPORTED_PARAMETER,
+ 8, ch, pdu_len, hlen);
+ return (false);
+ }
+
+ if (pdu->hpda > NVME_TCP_HPDA_MAX) {
+ na_error(na, "NVMe/TCP: Unsupported PDA %u", pdu->hpda);
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 10, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ if (pdu->dgst.bits.reserved != 0) {
+ na_error(na, "NVMe/TCP: Invalid digest settings");
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 11, ch, pdu_len,
+ hlen);
+ return (false);
+ }
+
+ return (true);
+}
+
+static bool
+nvmf_tcp_read_ic_req(struct nvmf_association *na, struct nvmf_tcp_qpair *qp,
+ struct nvme_tcp_ic_req *pdu)
+{
+ int error;
+
+ error = nvmf_tcp_read_buffer(qp->s, pdu, sizeof(*pdu));
+ if (error != 0) {
+ na_error(na, "NVMe/TCP: Failed to read IC request: %s",
+ strerror(error));
+ return (false);
+ }
+
+ return (nvmf_tcp_validate_ic_pdu(na, qp, &pdu->common, sizeof(*pdu)));
+}
+
+static bool
+nvmf_tcp_read_ic_resp(struct nvmf_association *na, struct nvmf_tcp_qpair *qp,
+ struct nvme_tcp_ic_resp *pdu)
+{
+ int error;
+
+ error = nvmf_tcp_read_buffer(qp->s, pdu, sizeof(*pdu));
+ if (error != 0) {
+ na_error(na, "NVMe/TCP: Failed to read IC response: %s",
+ strerror(error));
+ return (false);
+ }
+
+ return (nvmf_tcp_validate_ic_pdu(na, qp, &pdu->common, sizeof(*pdu)));
+}
+
+static struct nvmf_association *
+tcp_allocate_association(bool controller __unused,
+ const struct nvmf_association_params *params __unused)
+{
+ struct nvmf_tcp_association *ta;
+
+ ta = calloc(1, sizeof(*ta));
+
+ return (&ta->na);
+}
+
+static void
+tcp_update_association(struct nvmf_association *na,
+ const struct nvme_controller_data *cdata)
+{
+ struct nvmf_tcp_association *ta = TASSOC(na);
+
+ ta->ioccsz = le32toh(cdata->ioccsz);
+}
+
+static void
+tcp_free_association(struct nvmf_association *na)
+{
+ free(na);
+}
+
+static bool
+tcp_connect(struct nvmf_tcp_qpair *qp, struct nvmf_association *na, bool admin)
+{
+ const struct nvmf_association_params *params = &na->na_params;
+ struct nvmf_tcp_association *ta = TASSOC(na);
+ struct nvme_tcp_ic_req ic_req;
+ struct nvme_tcp_ic_resp ic_resp;
+ int error;
+
+ if (!admin) {
+ if (ta->ioccsz == 0) {
+ na_error(na, "TCP I/O queues require cdata");
+ return (false);
+ }
+ if (ta->ioccsz < 4) {
+ na_error(na, "Invalid IOCCSZ %u", ta->ioccsz);
+ return (false);
+ }
+ }
+
+ memset(&ic_req, 0, sizeof(ic_req));
+ ic_req.common.pdu_type = NVME_TCP_PDU_TYPE_IC_REQ;
+ ic_req.common.hlen = sizeof(ic_req);
+ ic_req.common.plen = htole32(sizeof(ic_req));
+ ic_req.pfv = htole16(0);
+ ic_req.hpda = params->tcp.pda;
+ if (params->tcp.header_digests)
+ ic_req.dgst.bits.hdgst_enable = 1;
+ if (params->tcp.data_digests)
+ ic_req.dgst.bits.ddgst_enable = 1;
+ ic_req.maxr2t = htole32(params->tcp.maxr2t);
+
+ error = nvmf_tcp_write_pdu(qp, &ic_req, sizeof(ic_req));
+ if (error != 0) {
+ na_error(na, "Failed to write IC request: %s", strerror(error));
+ return (false);
+ }
+
+ if (!nvmf_tcp_read_ic_resp(na, qp, &ic_resp))
+ return (false);
+
+ /* Ensure the controller didn't enable digests we didn't request. */
+ if ((!params->tcp.header_digests &&
+ ic_resp.dgst.bits.hdgst_enable != 0) ||
+ (!params->tcp.data_digests &&
+ ic_resp.dgst.bits.ddgst_enable != 0)) {
+ na_error(na, "Controller enabled unrequested digests");
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_DATA_UNSUPPORTED_PARAMETER,
+ 11, &ic_resp, sizeof(ic_resp), sizeof(ic_resp));
+ return (false);
+ }
+
+ /*
+ * XXX: Is there an upper-bound to enforce here? Perhaps pick
+ * some large value and report larger values as an unsupported
+ * parameter?
+ */
+ if (le32toh(ic_resp.maxh2cdata) < 4096) {
+ na_error(na, "Invalid MAXH2CDATA %u",
+ le32toh(ic_resp.maxh2cdata));
+ nvmf_tcp_report_error(na, qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD, 12, &ic_resp,
+ sizeof(ic_resp), sizeof(ic_resp));
+ return (false);
+ }
+
+ qp->txpda = (params->tcp.pda + 1) * 4;
+ qp->rxpda = (ic_resp.cpda + 1) * 4;
+ qp->header_digests = ic_resp.dgst.bits.hdgst_enable != 0;
+ qp->data_digests = ic_resp.dgst.bits.ddgst_enable != 0;
+ qp->maxr2t = params->tcp.maxr2t;
+ qp->maxh2cdata = le32toh(ic_resp.maxh2cdata);
+ if (admin)
+ /* 7.4.3 */
+ qp->max_icd = 8192;
+ else
+ qp->max_icd = (ta->ioccsz - 4) * 16;
+
+ return (0);
+}
+
+static bool
+tcp_accept(struct nvmf_tcp_qpair *qp, struct nvmf_association *na)
+{
+ const struct nvmf_association_params *params = &na->na_params;
+ struct nvme_tcp_ic_req ic_req;
+ struct nvme_tcp_ic_resp ic_resp;
+ int error;
+
+ if (!nvmf_tcp_read_ic_req(na, qp, &ic_req))
+ return (false);
+
+ memset(&ic_resp, 0, sizeof(ic_resp));
+ ic_resp.common.pdu_type = NVME_TCP_PDU_TYPE_IC_RESP;
+ ic_resp.common.hlen = sizeof(ic_req);
+ ic_resp.common.plen = htole32(sizeof(ic_req));
+ ic_resp.pfv = htole16(0);
+ ic_resp.cpda = params->tcp.pda;
+ if (params->tcp.header_digests && ic_req.dgst.bits.hdgst_enable != 0)
+ ic_resp.dgst.bits.hdgst_enable = 1;
+ if (params->tcp.data_digests && ic_req.dgst.bits.ddgst_enable != 0)
+ ic_resp.dgst.bits.ddgst_enable = 1;
+ ic_resp.maxh2cdata = htole32(params->tcp.maxh2cdata);
+
+ error = nvmf_tcp_write_pdu(qp, &ic_resp, sizeof(ic_resp));
+ if (error != 0) {
+ na_error(na, "Failed to write IC response: %s",
+ strerror(error));
+ return (false);
+ }
+
+ qp->txpda = (params->tcp.pda + 1) * 4;
+ qp->rxpda = (ic_req.hpda + 1) * 4;
+ qp->header_digests = ic_resp.dgst.bits.hdgst_enable != 0;
+ qp->data_digests = ic_resp.dgst.bits.ddgst_enable != 0;
+ qp->maxr2t = le32toh(ic_req.maxr2t);
+ qp->maxh2cdata = params->tcp.maxh2cdata;
+ qp->max_icd = 0; /* XXX */
+ return (0);
+}
+
+static struct nvmf_qpair *
+tcp_allocate_qpair(struct nvmf_association *na,
+ const struct nvmf_qpair_params *qparams)
+{
+ const struct nvmf_association_params *aparams = &na->na_params;
+ struct nvmf_tcp_qpair *qp;
+ int error;
+
+ if (aparams->tcp.pda > NVME_TCP_CPDA_MAX) {
+ na_error(na, "Invalid PDA");
+ return (NULL);
+ }
+
+ qp = calloc(1, sizeof(*qp));
+ qp->s = qparams->tcp.fd;
+ LIST_INIT(&qp->rx_buffers);
+ LIST_INIT(&qp->tx_buffers);
+ TAILQ_INIT(&qp->rx_capsules);
+ if (na->na_controller)
+ error = tcp_accept(qp, na);
+ else
+ error = tcp_connect(qp, na, qparams->admin);
+ if (error != 0) {
+ free(qp);
+ return (NULL);
+ }
+
+ return (&qp->qp);
+}
+
+static void
+tcp_free_qpair(struct nvmf_qpair *nq)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nq);
+ struct nvmf_tcp_capsule *ntc, *tc;
+ struct nvmf_tcp_command_buffer *ncb, *cb;
+
+ TAILQ_FOREACH_SAFE(tc, &qp->rx_capsules, link, ntc) {
+ TAILQ_REMOVE(&qp->rx_capsules, tc, link);
+ nvmf_free_capsule(&tc->nc);
+ }
+ LIST_FOREACH_SAFE(cb, &qp->rx_buffers, link, ncb) {
+ tcp_free_command_buffer(cb);
+ }
+ LIST_FOREACH_SAFE(cb, &qp->tx_buffers, link, ncb) {
+ tcp_free_command_buffer(cb);
+ }
+ free(qp);
+}
+
+static int
+tcp_kernel_handoff_params(struct nvmf_qpair *nq,
+ struct nvmf_handoff_qpair_params *qparams)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nq);
+
+ qparams->tcp.fd = qp->s;
+ qparams->tcp.rxpda = qp->rxpda;
+ qparams->tcp.txpda = qp->txpda;
+ qparams->tcp.header_digests = qp->header_digests;
+ qparams->tcp.data_digests = qp->data_digests;
+ qparams->tcp.maxr2t = qp->maxr2t;
+ qparams->tcp.maxh2cdata = qp->maxh2cdata;
+ qparams->tcp.max_icd = qp->max_icd;
+
+ return (0);
+}
+
+static struct nvmf_capsule *
+tcp_allocate_capsule(struct nvmf_qpair *qp __unused)
+{
+ struct nvmf_tcp_capsule *nc;
+
+ nc = calloc(1, sizeof(*nc));
+ return (&nc->nc);
+}
+
+static void
+tcp_free_capsule(struct nvmf_capsule *nc)
+{
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+
+ nvmf_tcp_free_pdu(&tc->rx_pdu);
+ if (tc->cb != NULL)
+ tcp_free_command_buffer(tc->cb);
+ free(tc);
+}
+
+static int
+tcp_transmit_command(struct nvmf_capsule *nc)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+ struct nvme_tcp_cmd cmd;
+ struct nvme_sgl_descriptor *sgl;
+ int error;
+ bool use_icd;
+
+ use_icd = false;
+ if (nc->nc_data_len != 0 && nc->nc_send_data &&
+ nc->nc_data_len <= qp->max_icd)
+ use_icd = true;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.common.pdu_type = NVME_TCP_PDU_TYPE_CAPSULE_CMD;
+ cmd.ccsqe = nc->nc_sqe;
+
+ /* Populate SGL in SQE. */
+ sgl = &cmd.ccsqe.sgl;
+ memset(sgl, 0, sizeof(*sgl));
+ sgl->address = 0;
+ sgl->length = htole32(nc->nc_data_len);
+ if (use_icd) {
+ /* Use in-capsule data. */
+ sgl->type = NVME_SGL_TYPE_ICD;
+ } else {
+ /* Use a command buffer. */
+ sgl->type = NVME_SGL_TYPE_COMMAND_BUFFER;
+ }
+
+ /* Send command capsule. */
+ error = nvmf_tcp_construct_pdu(qp, &cmd, sizeof(cmd), use_icd ?
+ nc->nc_data : NULL, use_icd ? nc->nc_data_len : 0);
+ if (error != 0)
+ return (error);
+
+ /*
+ * If data will be transferred using a command buffer, allocate a
+ * buffer structure and queue it.
+ */
+ if (nc->nc_data_len != 0 && !use_icd)
+ tc->cb = tcp_alloc_command_buffer(qp, nc->nc_data, 0,
+ nc->nc_data_len, cmd.ccsqe.cid, 0, !nc->nc_send_data);
+
+ return (0);
+}
+
+static int
+tcp_transmit_response(struct nvmf_capsule *nc)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ struct nvme_tcp_rsp rsp;
+
+ memset(&rsp, 0, sizeof(rsp));
+ rsp.common.pdu_type = NVME_TCP_PDU_TYPE_CAPSULE_RESP;
+ rsp.rccqe = nc->nc_cqe;
+
+ return (nvmf_tcp_construct_pdu(qp, &rsp, sizeof(rsp), NULL, 0));
+}
+
+static int
+tcp_transmit_capsule(struct nvmf_capsule *nc)
+{
+ if (nc->nc_qe_len == sizeof(struct nvme_command))
+ return (tcp_transmit_command(nc));
+ else
+ return (tcp_transmit_response(nc));
+}
+
+static int
+tcp_receive_capsule(struct nvmf_qpair *nq, struct nvmf_capsule **ncp)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nq);
+ struct nvmf_tcp_capsule *tc;
+ int error;
+
+ while (TAILQ_EMPTY(&qp->rx_capsules)) {
+ error = nvmf_tcp_receive_pdu(qp);
+ if (error != 0)
+ return (error);
+ }
+ tc = TAILQ_FIRST(&qp->rx_capsules);
+ TAILQ_REMOVE(&qp->rx_capsules, tc, link);
+ *ncp = &tc->nc;
+ return (0);
+}
+
+static uint8_t
+tcp_validate_command_capsule(const struct nvmf_capsule *nc)
+{
+ const struct nvmf_tcp_capsule *tc = CTCAP(nc);
+ const struct nvme_sgl_descriptor *sgl;
+
+ assert(tc->rx_pdu.hdr != NULL);
+
+ sgl = &nc->nc_sqe.sgl;
+ switch (sgl->type) {
+ case NVME_SGL_TYPE_ICD:
+ if (tc->rx_pdu.data_len != le32toh(sgl->length)) {
+ printf("NVMe/TCP: Command Capsule with mismatched ICD length\n");
+ return (NVME_SC_DATA_SGL_LENGTH_INVALID);
+ }
+ break;
+ case NVME_SGL_TYPE_COMMAND_BUFFER:
+ if (tc->rx_pdu.data_len != 0) {
+ printf("NVMe/TCP: Command Buffer SGL with ICD\n");
+ return (NVME_SC_INVALID_FIELD);
+ }
+ break;
+ default:
+ printf("NVMe/TCP: Invalid SGL type in Command Capsule\n");
+ return (NVME_SC_SGL_DESCRIPTOR_TYPE_INVALID);
+ }
+
+ if (sgl->address != 0) {
+ printf("NVMe/TCP: Invalid SGL offset in Command Capsule\n");
+ return (NVME_SC_SGL_OFFSET_INVALID);
+ }
+
+ return (NVME_SC_SUCCESS);
+}
+
+static size_t
+tcp_capsule_data_len(const struct nvmf_capsule *nc)
+{
+ assert(nc->nc_qe_len == sizeof(struct nvme_command));
+ return (le32toh(nc->nc_sqe.sgl.length));
+}
+
+/* NB: cid and ttag are both little-endian already. */
+static int
+tcp_send_r2t(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ uint32_t data_offset, uint32_t data_len)
+{
+ struct nvme_tcp_r2t_hdr r2t;
+
+ memset(&r2t, 0, sizeof(r2t));
+ r2t.common.pdu_type = NVME_TCP_PDU_TYPE_R2T;
+ r2t.cccid = cid;
+ r2t.ttag = ttag;
+ r2t.r2to = htole32(data_offset);
+ r2t.r2tl = htole32(data_len);
+
+ return (nvmf_tcp_construct_pdu(qp, &r2t, sizeof(r2t), NULL, 0));
+}
+
+static int
+tcp_receive_r2t_data(const struct nvmf_capsule *nc, uint32_t data_offset,
+ void *buf, size_t len)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ struct nvmf_tcp_command_buffer *cb;
+ int error;
+ uint16_t ttag;
+
+ /*
+ * Don't bother byte-swapping ttag as it is just a cookie
+ * value returned by the other end as-is.
+ */
+ ttag = qp->next_ttag++;
+
+ error = tcp_send_r2t(qp, nc->nc_sqe.cid, ttag, data_offset, len);
+ if (error != 0)
+ return (error);
+
+ cb = tcp_alloc_command_buffer(qp, buf, data_offset, len,
+ nc->nc_sqe.cid, ttag, true);
+
+ /* Parse received PDUs until the data transfer is complete. */
+ while (cb->data_xfered < cb->data_len) {
+ error = nvmf_tcp_receive_pdu(qp);
+ if (error != 0)
+ break;
+ }
+ tcp_free_command_buffer(cb);
+ return (error);
+}
+
+static int
+tcp_receive_icd_data(const struct nvmf_capsule *nc, uint32_t data_offset,
+ void *buf, size_t len)
+{
+ const struct nvmf_tcp_capsule *tc = CTCAP(nc);
+ const char *icd;
+
+ icd = (const char *)tc->rx_pdu.hdr + tc->rx_pdu.hdr->pdo + data_offset;
+ memcpy(buf, icd, len);
+ return (0);
+}
+
+static int
+tcp_receive_controller_data(const struct nvmf_capsule *nc, uint32_t data_offset,
+ void *buf, size_t len)
+{
+ struct nvmf_association *na = nc->nc_qpair->nq_association;
+ const struct nvme_sgl_descriptor *sgl;
+ size_t data_len;
+
+ if (nc->nc_qe_len != sizeof(struct nvme_command) || !na->na_controller)
+ return (EINVAL);
+
+ sgl = &nc->nc_sqe.sgl;
+ data_len = le32toh(sgl->length);
+ if (data_offset + len > data_len)
+ return (EFBIG);
+
+ if (sgl->type == NVME_SGL_TYPE_ICD)
+ return (tcp_receive_icd_data(nc, data_offset, buf, len));
+ else
+ return (tcp_receive_r2t_data(nc, data_offset, buf, len));
+}
+
+/* NB: cid is little-endian already. */
+static int
+tcp_send_c2h_pdu(struct nvmf_tcp_qpair *qp, uint16_t cid,
+ uint32_t data_offset, const void *buf, size_t len, bool last_pdu,
+ bool success)
+{
+ struct nvme_tcp_c2h_data_hdr c2h;
+
+ memset(&c2h, 0, sizeof(c2h));
+ c2h.common.pdu_type = NVME_TCP_PDU_TYPE_C2H_DATA;
+ if (last_pdu)
+ c2h.common.flags |= NVME_TCP_C2H_DATA_FLAGS_LAST_PDU;
+ if (success)
+ c2h.common.flags |= NVME_TCP_C2H_DATA_FLAGS_SUCCESS;
+ c2h.cccid = cid;
+ c2h.datao = htole32(data_offset);
+ c2h.datal = htole32(len);
+
+ return (nvmf_tcp_construct_pdu(qp, &c2h, sizeof(c2h),
+ __DECONST(void *, buf), len));
+}
+
+static int
+tcp_send_controller_data(const struct nvmf_capsule *nc, const void *buf,
+ size_t len)
+{
+ struct nvmf_association *na = nc->nc_qpair->nq_association;
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ const struct nvme_sgl_descriptor *sgl;
+ const char *src;
+ size_t todo;
+ uint32_t data_len, data_offset;
+ int error;
+ bool last_pdu, send_success_flag;
+
+ if (nc->nc_qe_len != sizeof(struct nvme_command) || !na->na_controller)
+ return (EINVAL);
+
+ sgl = &nc->nc_sqe.sgl;
+ data_len = le32toh(sgl->length);
+ if (len != data_len) {
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+ return (EFBIG);
+ }
+
+ if (sgl->type != NVME_SGL_TYPE_COMMAND_BUFFER) {
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+ return (EINVAL);
+ }
+
+ /* Use the SUCCESS flag if SQ flow control is disabled. */
+ send_success_flag = !qp->qp.nq_flow_control;
+
+ /*
+ * Write out one or more C2H_DATA PDUs containing the data.
+ * Each PDU is arbitrarily capped at 256k.
+ */
+ data_offset = 0;
+ src = buf;
+ while (len > 0) {
+ if (len > 256 * 1024) {
+ todo = 256 * 1024;
+ last_pdu = false;
+ } else {
+ todo = len;
+ last_pdu = true;
+ }
+ error = tcp_send_c2h_pdu(qp, nc->nc_sqe.cid, data_offset,
+ src, todo, last_pdu, last_pdu && send_success_flag);
+ if (error != 0) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_TRANSIENT_TRANSPORT_ERROR);
+ return (error);
+ }
+ data_offset += todo;
+ src += todo;
+ len -= todo;
+ }
+ if (!send_success_flag)
+ nvmf_send_success(nc);
+ return (0);
+}
+
+struct nvmf_transport_ops tcp_ops = {
+ .allocate_association = tcp_allocate_association,
+ .update_association = tcp_update_association,
+ .free_association = tcp_free_association,
+ .allocate_qpair = tcp_allocate_qpair,
+ .free_qpair = tcp_free_qpair,
+ .kernel_handoff_params = tcp_kernel_handoff_params,
+ .allocate_capsule = tcp_allocate_capsule,
+ .free_capsule = tcp_free_capsule,
+ .transmit_capsule = tcp_transmit_capsule,
+ .receive_capsule = tcp_receive_capsule,
+ .validate_command_capsule = tcp_validate_command_capsule,
+ .capsule_data_len = tcp_capsule_data_len,
+ .receive_controller_data = tcp_receive_controller_data,
+ .send_controller_data = tcp_send_controller_data,
+};
diff --git a/lib/libnvmf/nvmf_transport.c b/lib/libnvmf/nvmf_transport.c
new file mode 100644
index 000000000000..1a8505f2a993
--- /dev/null
+++ b/lib/libnvmf/nvmf_transport.c
@@ -0,0 +1,269 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/refcount.h>
+#include <assert.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libnvmf.h"
+#include "internal.h"
+
+struct nvmf_association *
+nvmf_allocate_association(enum nvmf_trtype trtype, bool controller,
+ const struct nvmf_association_params *params)
+{
+ struct nvmf_transport_ops *ops;
+ struct nvmf_association *na;
+
+ switch (trtype) {
+ case NVMF_TRTYPE_TCP:
+ ops = &tcp_ops;
+ break;
+ default:
+ errno = EINVAL;
+ return (NULL);
+ }
+
+ na = ops->allocate_association(controller, params);
+ if (na == NULL)
+ return (NULL);
+
+ na->na_ops = ops;
+ na->na_trtype = trtype;
+ na->na_controller = controller;
+ na->na_params = *params;
+ na->na_last_error = NULL;
+ refcount_init(&na->na_refs, 1);
+ return (na);
+}
+
+void
+nvmf_update_assocation(struct nvmf_association *na,
+ const struct nvme_controller_data *cdata)
+{
+ na->na_ops->update_association(na, cdata);
+}
+
+void
+nvmf_free_association(struct nvmf_association *na)
+{
+ if (refcount_release(&na->na_refs)) {
+ free(na->na_last_error);
+ na->na_ops->free_association(na);
+ }
+}
+
+const char *
+nvmf_association_error(const struct nvmf_association *na)
+{
+ return (na->na_last_error);
+}
+
+void
+na_clear_error(struct nvmf_association *na)
+{
+ free(na->na_last_error);
+ na->na_last_error = NULL;
+}
+
+void
+na_error(struct nvmf_association *na, const char *fmt, ...)
+{
+ va_list ap;
+ char *str;
+
+ if (na->na_last_error != NULL)
+ return;
+ va_start(ap, fmt);
+ vasprintf(&str, fmt, ap);
+ va_end(ap);
+ na->na_last_error = str;
+}
+
+struct nvmf_qpair *
+nvmf_allocate_qpair(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params)
+{
+ struct nvmf_qpair *qp;
+
+ na_clear_error(na);
+ qp = na->na_ops->allocate_qpair(na, params);
+ if (qp == NULL)
+ return (NULL);
+
+ refcount_acquire(&na->na_refs);
+ qp->nq_association = na;
+ qp->nq_admin = params->admin;
+ TAILQ_INIT(&qp->nq_rx_capsules);
+ return (qp);
+}
+
+void
+nvmf_free_qpair(struct nvmf_qpair *qp)
+{
+ struct nvmf_association *na;
+ struct nvmf_capsule *nc, *tc;
+
+ TAILQ_FOREACH_SAFE(nc, &qp->nq_rx_capsules, nc_link, tc) {
+ TAILQ_REMOVE(&qp->nq_rx_capsules, nc, nc_link);
+ nvmf_free_capsule(nc);
+ }
+ na = qp->nq_association;
+ na->na_ops->free_qpair(qp);
+ nvmf_free_association(na);
+}
+
+struct nvmf_capsule *
+nvmf_allocate_command(struct nvmf_qpair *qp, const void *sqe)
+{
+ struct nvmf_capsule *nc;
+
+ nc = qp->nq_association->na_ops->allocate_capsule(qp);
+ if (nc == NULL)
+ return (NULL);
+
+ nc->nc_qpair = qp;
+ nc->nc_qe_len = sizeof(struct nvme_command);
+ memcpy(&nc->nc_sqe, sqe, nc->nc_qe_len);
+
+ /* 4.2 of NVMe base spec: Fabrics always uses SGL. */
+ nc->nc_sqe.fuse &= ~NVMEM(NVME_CMD_PSDT);
+ nc->nc_sqe.fuse |= NVMEF(NVME_CMD_PSDT, NVME_PSDT_SGL);
+ return (nc);
+}
+
+struct nvmf_capsule *
+nvmf_allocate_response(struct nvmf_qpair *qp, const void *cqe)
+{
+ struct nvmf_capsule *nc;
+
+ nc = qp->nq_association->na_ops->allocate_capsule(qp);
+ if (nc == NULL)
+ return (NULL);
+
+ nc->nc_qpair = qp;
+ nc->nc_qe_len = sizeof(struct nvme_completion);
+ memcpy(&nc->nc_cqe, cqe, nc->nc_qe_len);
+ return (nc);
+}
+
+int
+nvmf_capsule_append_data(struct nvmf_capsule *nc, void *buf, size_t len,
+ bool send)
+{
+ if (nc->nc_qe_len == sizeof(struct nvme_completion))
+ return (EINVAL);
+ if (nc->nc_data_len != 0)
+ return (EBUSY);
+
+ nc->nc_data = buf;
+ nc->nc_data_len = len;
+ nc->nc_send_data = send;
+ return (0);
+}
+
+void
+nvmf_free_capsule(struct nvmf_capsule *nc)
+{
+ nc->nc_qpair->nq_association->na_ops->free_capsule(nc);
+}
+
+int
+nvmf_transmit_capsule(struct nvmf_capsule *nc)
+{
+ return (nc->nc_qpair->nq_association->na_ops->transmit_capsule(nc));
+}
+
+int
+nvmf_receive_capsule(struct nvmf_qpair *qp, struct nvmf_capsule **ncp)
+{
+ return (qp->nq_association->na_ops->receive_capsule(qp, ncp));
+}
+
+const void *
+nvmf_capsule_sqe(const struct nvmf_capsule *nc)
+{
+ assert(nc->nc_qe_len == sizeof(struct nvme_command));
+ return (&nc->nc_sqe);
+}
+
+const void *
+nvmf_capsule_cqe(const struct nvmf_capsule *nc)
+{
+ assert(nc->nc_qe_len == sizeof(struct nvme_completion));
+ return (&nc->nc_cqe);
+}
+
+uint8_t
+nvmf_validate_command_capsule(const struct nvmf_capsule *nc)
+{
+ assert(nc->nc_qe_len == sizeof(struct nvme_command));
+
+ if (NVMEV(NVME_CMD_PSDT, nc->nc_sqe.fuse) != NVME_PSDT_SGL)
+ return (NVME_SC_INVALID_FIELD);
+
+ return (nc->nc_qpair->nq_association->na_ops->validate_command_capsule(nc));
+}
+
+size_t
+nvmf_capsule_data_len(const struct nvmf_capsule *nc)
+{
+ return (nc->nc_qpair->nq_association->na_ops->capsule_data_len(nc));
+}
+
+int
+nvmf_receive_controller_data(const struct nvmf_capsule *nc,
+ uint32_t data_offset, void *buf, size_t len)
+{
+ return (nc->nc_qpair->nq_association->na_ops->receive_controller_data(nc,
+ data_offset, buf, len));
+}
+
+int
+nvmf_send_controller_data(const struct nvmf_capsule *nc, const void *buf,
+ size_t len)
+{
+ return (nc->nc_qpair->nq_association->na_ops->send_controller_data(nc,
+ buf, len));
+}
+
+int
+nvmf_kernel_handoff_params(struct nvmf_qpair *qp,
+ struct nvmf_handoff_qpair_params *qparams)
+{
+ memset(qparams, 0, sizeof(*qparams));
+ qparams->admin = qp->nq_admin;
+ qparams->sq_flow_control = qp->nq_flow_control;
+ qparams->qsize = qp->nq_qsize;
+ qparams->sqhd = qp->nq_sqhd;
+ qparams->sqtail = qp->nq_sqtail;
+ return (qp->nq_association->na_ops->kernel_handoff_params(qp, qparams));
+}
+
+const char *
+nvmf_transport_type(uint8_t trtype)
+{
+ static _Thread_local char buf[8];
+
+ switch (trtype) {
+ case NVMF_TRTYPE_RDMA:
+ return ("RDMA");
+ case NVMF_TRTYPE_FC:
+ return ("Fibre Channel");
+ case NVMF_TRTYPE_TCP:
+ return ("TCP");
+ case NVMF_TRTYPE_INTRA_HOST:
+ return ("Intra-host");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", trtype);
+ return (buf);
+ }
+}
diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile
index aa9e6799ab59..2be8a207a219 100644
--- a/lib/libomp/Makefile
+++ b/lib/libomp/Makefile
@@ -1,4 +1,7 @@
+# z_Linux_asm.S is missing BTI support
+MK_BRANCH_PROTECTION=no
+
.include <bsd.compiler.mk>
SHLIB_NAME= libomp.so
diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c
index 4d586a21566a..2c80f0a0332f 100644
--- a/lib/libpam/modules/pam_xdg/pam_xdg.c
+++ b/lib/libpam/modules/pam_xdg/pam_xdg.c
@@ -67,7 +67,7 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused,
/* Get user info */
rv = pam_get_item(pamh, PAM_USER, (const void **)&user);
- if (rv != PAM_SUCCESS) {
+ if (rv != PAM_SUCCESS || user == NULL) {
PAM_VERBOSE_ERROR("Can't get user information");
goto out;
}
@@ -221,7 +221,7 @@ _pam_xdg_close(pam_handle_t *pamh __unused, int flags __unused,
/* Get user info */
rv = pam_get_item(pamh, PAM_USER, (const void **)&user);
- if (rv != PAM_SUCCESS) {
+ if (rv != PAM_SUCCESS || user == NULL) {
PAM_VERBOSE_ERROR("Can't get user information");
goto out;
}
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index 076cfd3400e6..479b96123012 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -102,6 +102,12 @@ pfctl_close(struct pfctl_handle *h)
free(h);
}
+int
+pfctl_fd(struct pfctl_handle *h)
+{
+ return (h->fd);
+}
+
static int
pfctl_do_ioctl(int dev, uint cmd, size_t size, nvlist_t **nvl)
{
@@ -281,6 +287,153 @@ _pfctl_get_status_counters(const nvlist_t *nvl,
}
}
+#define _OUT(_field) offsetof(struct pfctl_status_counter, _field)
+static const struct snl_attr_parser ap_counter[] = {
+ { .type = PF_C_COUNTER, .off = _OUT(counter), .cb = snl_attr_get_uint64 },
+ { .type = PF_C_NAME, .off = _OUT(name), .cb = snl_attr_get_string },
+ { .type = PF_C_ID, .off = _OUT(id), .cb = snl_attr_get_uint32 },
+};
+SNL_DECLARE_ATTR_PARSER(counter_parser, ap_counter);
+#undef _OUT
+
+static bool
+snl_attr_get_counters(struct snl_state *ss, struct nlattr *nla,
+ const void *arg __unused, void *target)
+{
+ struct pfctl_status_counter counter = {};
+ struct pfctl_status_counter *c;
+ bool error;
+
+ error = snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla), &counter_parser, &counter);
+ if (! error)
+ return (error);
+
+ c = malloc(sizeof(*c));
+ if (c == NULL)
+ return (false);
+
+ c->id = counter.id;
+ c->counter = counter.counter;
+ c->name = strdup(counter.name);
+
+ TAILQ_INSERT_TAIL((struct pfctl_status_counters *)target, c, entry);
+
+ return (error);
+}
+
+struct snl_uint64_array {
+ uint64_t *array;
+ size_t count;
+ size_t max;
+};
+static bool
+snl_attr_get_uint64_element(struct snl_state *ss, struct nlattr *nla,
+ const void *arg, void *target)
+{
+ bool error;
+ uint64_t value;
+ struct snl_uint64_array *t = (struct snl_uint64_array *)target;
+
+ if (t->count >= t->max)
+ return (false);
+
+ error = snl_attr_get_uint64(ss, nla, arg, &value);
+ if (! error)
+ return (error);
+
+ t->array[t->count++] = value;
+
+ return (true);
+}
+
+static const struct snl_attr_parser ap_array[] = {
+ { .cb = snl_attr_get_uint64_element },
+};
+SNL_DECLARE_ATTR_PARSER(array_parser, ap_array);
+static bool
+snl_attr_get_uint64_array(struct snl_state *ss, struct nlattr *nla,
+ const void *arg, void *target)
+{
+ struct snl_uint64_array a = {
+ .array = target,
+ .count = 0,
+ .max = (size_t)arg,
+ };
+ bool error;
+
+ error = snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla), &array_parser, &a);
+ if (! error)
+ return (error);
+
+ return (true);
+}
+
+#define _OUT(_field) offsetof(struct pfctl_status, _field)
+static const struct snl_attr_parser ap_getstatus[] = {
+ { .type = PF_GS_IFNAME, .off = _OUT(ifname), .arg_u32 = IFNAMSIZ, .cb = snl_attr_copy_string },
+ { .type = PF_GS_RUNNING, .off = _OUT(running), .cb = snl_attr_get_bool },
+ { .type = PF_GS_SINCE, .off = _OUT(since), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_DEBUG, .off = _OUT(debug), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_HOSTID, .off = _OUT(hostid), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_STATES, .off = _OUT(states), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_SRC_NODES, .off = _OUT(src_nodes), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_REASSEMBLE, .off = _OUT(reass), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_SYNCOOKIES_ACTIVE, .off = _OUT(syncookies_active), .cb = snl_attr_get_uint32 },
+ { .type = PF_GS_COUNTERS, .off = _OUT(counters), .cb = snl_attr_get_counters },
+ { .type = PF_GS_LCOUNTERS, .off = _OUT(lcounters), .cb = snl_attr_get_counters },
+ { .type = PF_GS_FCOUNTERS, .off = _OUT(fcounters), .cb = snl_attr_get_counters },
+ { .type = PF_GS_SCOUNTERS, .off = _OUT(scounters), .cb = snl_attr_get_counters },
+ { .type = PF_GS_CHKSUM, .off = _OUT(pf_chksum), .arg_u32 = PF_MD5_DIGEST_LENGTH, .cb = snl_attr_get_bytes },
+ { .type = PF_GS_BCOUNTERS, .off = _OUT(bcounters), .arg_u32 = 2 * 2, .cb = snl_attr_get_uint64_array },
+ { .type = PF_GS_PCOUNTERS, .off = _OUT(pcounters), .arg_u32 = 2 * 2 * 2, .cb = snl_attr_get_uint64_array },
+};
+static struct snl_field_parser fp_getstatus[] = {};
+SNL_DECLARE_PARSER(getstatus_parser, struct genlmsghdr, fp_getstatus, ap_getstatus);
+#undef _OUT
+
+struct pfctl_status *
+pfctl_get_status_h(struct pfctl_handle *h __unused)
+{
+ struct pfctl_status *status;
+ struct snl_errmsg_data e = {};
+ struct nlmsghdr *hdr;
+ struct snl_writer nw;
+ uint32_t seq_id;
+ int family_id;
+
+ family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME);
+ if (family_id == 0)
+ return (NULL);
+
+ snl_init_writer(&h->ss, &nw);
+ hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_GET_STATUS);
+ hdr->nlmsg_flags |= NLM_F_DUMP;
+
+ hdr = snl_finalize_msg(&nw);
+ if (hdr == NULL) {
+ return (NULL);
+ }
+
+ seq_id = hdr->nlmsg_seq;
+ if (! snl_send_message(&h->ss, hdr))
+ return (NULL);
+
+ status = calloc(1, sizeof(*status));
+ if (status == NULL)
+ return (NULL);
+ TAILQ_INIT(&status->counters);
+ TAILQ_INIT(&status->lcounters);
+ TAILQ_INIT(&status->fcounters);
+ TAILQ_INIT(&status->scounters);
+
+ while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) {
+ if (! snl_parse_nlmsg(&h->ss, hdr, &getstatus_parser, status))
+ continue;
+ }
+
+ return (status);
+}
+
struct pfctl_status *
pfctl_get_status(int dev)
{
@@ -325,7 +478,7 @@ pfctl_get_status(int dev)
_pfctl_get_status_counters(nvlist_get_nvlist(nvl, "scounters"),
&status->scounters);
- pf_nvuint_64_array(nvl, "pcounters", 2 * 2 * 3,
+ pf_nvuint_64_array(nvl, "pcounters", 2 * 2 * 2,
(uint64_t *)status->pcounters, NULL);
pf_nvuint_64_array(nvl, "bcounters", 2 * 2,
(uint64_t *)status->bcounters, NULL);
@@ -1183,22 +1336,20 @@ static struct snl_field_parser fp_getrules[] = {
SNL_DECLARE_PARSER(getrules_parser, struct genlmsghdr, fp_getrules, ap_getrules);
int
-pfctl_get_rules_info(int dev __unused, struct pfctl_rules_info *rules, uint32_t ruleset,
+pfctl_get_rules_info_h(struct pfctl_handle *h, struct pfctl_rules_info *rules, uint32_t ruleset,
const char *path)
{
- struct snl_state ss = {};
struct snl_errmsg_data e = {};
struct nlmsghdr *hdr;
struct snl_writer nw;
uint32_t seq_id;
int family_id;
- snl_init(&ss, NETLINK_GENERIC);
- family_id = snl_get_genl_family(&ss, PFNL_FAMILY_NAME);
+ family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME);
if (family_id == 0)
return (ENOTSUP);
- snl_init_writer(&ss, &nw);
+ snl_init_writer(&h->ss, &nw);
hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_GETRULES);
hdr->nlmsg_flags |= NLM_F_DUMP;
@@ -1210,11 +1361,11 @@ pfctl_get_rules_info(int dev __unused, struct pfctl_rules_info *rules, uint32_t
return (ENOMEM);
seq_id = hdr->nlmsg_seq;
- if (! snl_send_message(&ss, hdr))
+ if (! snl_send_message(&h->ss, hdr))
return (ENXIO);
- while ((hdr = snl_read_reply_multi(&ss, seq_id, &e)) != NULL) {
- if (! snl_parse_nlmsg(&ss, hdr, &getrules_parser, rules))
+ while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) {
+ if (! snl_parse_nlmsg(&h->ss, hdr, &getrules_parser, rules))
continue;
}
@@ -1222,6 +1373,22 @@ pfctl_get_rules_info(int dev __unused, struct pfctl_rules_info *rules, uint32_t
}
int
+pfctl_get_rules_info(int dev __unused, struct pfctl_rules_info *rules, uint32_t ruleset,
+ const char *path)
+{
+ struct pfctl_handle *h;
+ int error;
+
+ h = pfctl_open(PF_DEVICE);
+ if (h == NULL)
+ return (ENOTSUP);
+ error = pfctl_get_rules_info_h(h, rules, ruleset, path);
+ pfctl_close(h);
+
+ return (error);
+}
+
+int
pfctl_get_rule(int dev, uint32_t nr, uint32_t ticket, const char *anchor,
uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call)
{
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 4e06981a79c7..73282eb3cc3d 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -62,7 +62,7 @@ struct pfctl_status {
struct pfctl_status_counters lcounters;
struct pfctl_status_counters fcounters;
struct pfctl_status_counters scounters;
- uint64_t pcounters[2][2][3];
+ uint64_t pcounters[2][2][2];
uint64_t bcounters[2][2];
};
@@ -390,8 +390,10 @@ struct pfctl_syncookies {
struct pfctl_handle;
struct pfctl_handle *pfctl_open(const char *pf_device);
void pfctl_close(struct pfctl_handle *);
+int pfctl_fd(struct pfctl_handle *);
int pfctl_startstop(struct pfctl_handle *h, int start);
+struct pfctl_status* pfctl_get_status_h(struct pfctl_handle *h);
struct pfctl_status* pfctl_get_status(int dev);
uint64_t pfctl_status_counter(struct pfctl_status *status, int id);
uint64_t pfctl_status_lcounter(struct pfctl_status *status, int id);
@@ -410,6 +412,9 @@ int pfctl_get_eth_rule(int dev, uint32_t nr, uint32_t ticket,
char *anchor_call);
int pfctl_add_eth_rule(int dev, const struct pfctl_eth_rule *r,
const char *anchor, const char *anchor_call, uint32_t ticket);
+int pfctl_get_rules_info_h(struct pfctl_handle *h,
+ struct pfctl_rules_info *rules, uint32_t ruleset,
+ const char *path);
int pfctl_get_rules_info(int dev, struct pfctl_rules_info *rules,
uint32_t ruleset, const char *path);
int pfctl_get_rule(int dev, uint32_t nr, uint32_t ticket,
diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c
index fa2e76e8d026..74a93ae963d7 100644
--- a/lib/libpmc/libpmc_pmu_util.c
+++ b/lib/libpmc/libpmc_pmu_util.c
@@ -622,7 +622,6 @@ pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm)
if (pmu_parse_event(&ped, pe->event))
return (ENOENT);
- assert(ped.ped_event >= 0);
pm->pm_ev = idx;
pm->pm_md.pm_event = ped.ped_event;
pm->pm_class = PMC_CLASS_POWER8;
diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c
index 7059b31da2ba..628ed26c6f9d 100644
--- a/lib/libpmc/pmu-events/jevents.c
+++ b/lib/libpmc/pmu-events/jevents.c
@@ -1355,7 +1355,7 @@ err_out:
#include <fts.h>
static int
-#if defined(__GLIBC__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
fts_compare(const FTSENT **a, const FTSENT **b)
#else
fts_compare(const FTSENT * const *a, const FTSENT * const *b)
diff --git a/lib/libssp/Makefile b/lib/libssp/Makefile
index b5e2841ba391..1a95c4b49844 100644
--- a/lib/libssp/Makefile
+++ b/lib/libssp/Makefile
@@ -4,6 +4,22 @@ SHLIBDIR?= /lib
SHLIB= ssp
SHLIB_MAJOR= 0
+SSP_SRCS= fgets_chk.c memcpy_chk.c memmove_chk.c memset_chk.c \
+ snprintf_chk.c sprintf_chk.c stpcpy_chk.c stpncpy_chk.c \
+ strcat_chk.c strcpy_chk.c strncat_chk.c strncpy_chk.c \
+ vsnprintf_chk.c vsprintf_chk.c
+
+.for i in ${SSP_SRCS}
+SRCS+=${i}
+.endfor
+
+CFLAGS.snprintf_chk.c+= -Wno-unused-parameter
+CFLAGS.sprintf_chk.c+= -Wno-unused-parameter
+CFLAGS.vsnprintf_chk.c+= -Wno-unused-parameter
+CFLAGS.vsprintf_chk.c+= -Wno-unused-parameter
+
+MAN+= ssp.3 __builtin_object_size.3
+
VERSION_DEF= ${.CURDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
@@ -12,9 +28,7 @@ CFLAGS+= -I${SRCTOP}/lib/libc/include
# _elf_aux_info is exported from libc as elf_aux_info(3), so just that for the
# libssp build instead.
CFLAGS+= -D_elf_aux_info=elf_aux_info
-SRCS= stack_protector.c fortify_stubs.c
-
-CFLAGS.fortify_stubs.c= -Wno-unused-parameter
+SRCS+= stack_protector.c
# Stack protection on libssp symbols should be considered harmful, as we may
# be talking about, for example, the guard setup constructor.
diff --git a/lib/libssp/Symbol.map b/lib/libssp/Symbol.map
index 5c2e089c6ab8..e401bf9293e2 100644
--- a/lib/libssp/Symbol.map
+++ b/lib/libssp/Symbol.map
@@ -6,11 +6,6 @@ LIBSSP_1.0 {
__stack_chk_fail;
__stack_chk_guard;
- /*
- * Currently unsupported: _FORTIFY_SOURCE symbols. It is believed
- * that these have never been used on FreeBSD, as our headers lack the
- * support that would have generated references to them.
- */
__memcpy_chk;
__memset_chk;
__snprintf_chk;
@@ -23,3 +18,9 @@ LIBSSP_1.0 {
__vsnprintf_chk;
__vsprintf_chk;
};
+
+LIBSSP_1.1 {
+ __fgets_chk;
+ __memmove_chk;
+ __stpncpy_chk;
+};
diff --git a/lib/libssp/Versions.def b/lib/libssp/Versions.def
index be9d9874947b..85682c88a3e0 100644
--- a/lib/libssp/Versions.def
+++ b/lib/libssp/Versions.def
@@ -1,3 +1,8 @@
+# This version was first added to 13.0-current.
LIBSSP_1.0 {
};
+
+# This version was first added to 15.0-current.
+LIBSSP_1.1 {
+} LIBSSP_1.0;
diff --git a/lib/libssp/__builtin_object_size.3 b/lib/libssp/__builtin_object_size.3
new file mode 100644
index 000000000000..23d74792918b
--- /dev/null
+++ b/lib/libssp/__builtin_object_size.3
@@ -0,0 +1,110 @@
+.\" $NetBSD: __builtin_object_size.3,v 1.11 2017/07/03 21:32:49 wiz Exp $
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Christos Zoulas.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\"
+.Dd April 27, 2024
+.Dt __BUILTIN_OBJECT_SIZE 3
+.Os
+.Sh NAME
+.Nm __builtin_object_size
+.Nd return the size of the given object
+.Sh SYNOPSIS
+.Ft size_t
+.Fn __builtin_object_size "void *ptr" "int type"
+.Sh DESCRIPTION
+The
+.Fn __builtin_object_size
+function is a
+.Xr clang 1
+and
+.Xr gcc 1
+built-in function that returns the size of the object referenced by
+.Fa ptr
+if known at compile time.
+If the
+.Fa ptr
+expression has any side effects, then they will not be evaluated.
+.Sh RETURN VALUES
+If the size of the object is not known or the
+.Fa ptr
+expression has side effects, the
+.Fn __builtin_object_size
+function returns:
+.Bl -tag -width (size_t)\-1 -offset indent
+.It Dv (size_t)\-1
+for
+.Fa type
+.Dv 0
+and
+.Dv 1 .
+.It Dv (size_t)0
+for
+.Fa type
+.Dv 2
+and
+.Dv 3 .
+.El
+.Pp
+If the size of the object is known, then the
+.Fn __builtin_object_size
+function returns the maximum size of all the objects that the compiler
+knows can be pointed to by
+.Fa ptr
+when
+.Fa type
+.Dv & 2 == 0 ,
+and the minimum size when
+.Fa type
+.Dv & 2 != 0 .
+.Sh SEE ALSO
+.Xr clang 1 ,
+.Xr gcc 1 ,
+.Xr __builtin_return_address 3 ,
+.Xr attribute 3 ,
+.Xr ssp 3
+.Sh HISTORY
+The
+.Fn __builtin_object_size
+appeared in
+.Tn GCC 4.1 .
+.Sh CAVEATS
+This is a non-standard, compiler-specific extension.
+.Pp
+Note that currently the object size calculation pass is only done at -O1
+or above, meaning that this function always returns \-1 when the optimizer
+is off.
+.Pp
+There are some discussions about always doing the object size pass, but
+the issue is that without the optimization pass data sizes are not going
+to be correct.
+.Pp
+For that reason code fortification (size-checked replacement
+functions) is currently disabled when optimization is off.
diff --git a/lib/libssp/fortify_stubs.c b/lib/libssp/fortify_stubs.c
deleted file mode 100644
index 1e6046bfee6b..000000000000
--- a/lib/libssp/fortify_stubs.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2019 Kyle Evans <kevans@FreeBSD.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-
-#include <stdarg.h>
-#include <stdlib.h>
-
-/* Signatures grabbed from LSB Core Specification 4.1 */
-void *__memcpy_chk(void *dst, const void *src, size_t len,
- size_t dstlen);
-void *__memset_chk(void *dst, int c, size_t len, size_t dstlen);
-int __snprintf_chk(char *str, size_t maxlen, int flag, size_t strlen,
- const char *fmt, ...);
-int __sprintf_chk(char *str, int flag, size_t strlen, const char *fmt, ...);
-char *__stpcpy_chk(char *dst, const char *src, size_t dstlen);
-char *__strcat_chk(char *dst, const char *src, size_t dstlen);
-char *__strcpy_chk(char *dst, const char *src, size_t dstlen);
-char *__strncat_chk(char *dst, const char *src, size_t len, size_t dstlen);
-char *__strncpy_chk(char *dst, const char *src, size_t len, size_t dstlen);
-int __vsnprintf_chk(char *str, size_t size, int flags, size_t len,
- const char *format, va_list ap);
-int __vsprintf_chk(char *str, int flag, size_t slen, const char *format,
- va_list ap);
-
-#define ABORT() abort2("_FORTIFY_SOURCE not supported", 0, NULL)
-
-void *
-__memcpy_chk(void *dst, const void *src, size_t len,
- size_t dstlen)
-{
-
- ABORT();
-}
-
-void *
-__memset_chk(void *dst, int c, size_t len, size_t dstlen)
-{
-
- ABORT();
-}
-
-int
-__snprintf_chk(char *str, size_t maxlen, int flag, size_t strlen,
- const char *fmt, ...)
-{
-
- ABORT();
-}
-
-int
-__sprintf_chk(char *str, int flag, size_t strlen, const char *fmt, ...)
-{
-
- ABORT();
-}
-
-char *
-__stpcpy_chk(char *dst, const char *src, size_t dstlen)
-{
-
- ABORT();
-}
-
-char *
-__strcat_chk(char *dst, const char *src, size_t dstlen)
-{
-
- ABORT();
-}
-
-char *
-__strcpy_chk(char *dst, const char *src, size_t dstlen)
-{
-
- ABORT();
-}
-
-char *
-__strncat_chk(char *dst, const char *src, size_t len, size_t dstlen)
-{
-
- ABORT();
-}
-
-char *
-__strncpy_chk(char *dst, const char *src, size_t len, size_t dstlen)
-{
-
- ABORT();
-}
-
-int
-__vsnprintf_chk(char *str, size_t size, int flags, size_t len,
- const char *format, va_list ap)
-{
-
- ABORT();
-}
-
-int
-__vsprintf_chk(char *str, int flag, size_t slen, const char *format,
- va_list ap)
-{
-
- ABORT();
-}
diff --git a/lib/libssp/ssp.3 b/lib/libssp/ssp.3
new file mode 100644
index 000000000000..5b00fe53f9fc
--- /dev/null
+++ b/lib/libssp/ssp.3
@@ -0,0 +1,128 @@
+.\" $NetBSD: ssp.3,v 1.9 2015/12/03 13:11:45 christos Exp $
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Christos Zoulas.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\"
+.Dd December 3, 2015
+.Dt SSP 3
+.Os
+.Sh NAME
+.Nm ssp
+.Nd bounds checked libc functions
+.Sh LIBRARY
+.Lb libssp
+.Sh SYNOPSIS
+.In ssp/stdio.h
+.Ft int
+.Fn sprintf "char *str" "const char *fmt" "..."
+.Ft int
+.Fn vsprintf "char *str" "const char *fmt" "va_list ap"
+.Ft int
+.Fn snprintf "char *str" "size_t len" "const char *fmt" "..."
+.Ft int
+.Fn vsnprintf "char *str" "size_t len" "const char *fmt" "va_list ap"
+.Ft char *
+.Fn fgets "char *str" "int len" "FILE *fp"
+.In ssp/string.h
+.Ft void *
+.Fn memcpy "void *str" "const void *ptr" "size_t len"
+.Ft void *
+.Fn memmove "void *str" "const void *ptr" "size_t len"
+.Ft void *
+.Fn memset "void *str" "int val" "size_t len"
+.Ft char *
+.Fn stpcpy "char *str" "const char *ptr"
+.Ft char *
+.Fn strcpy "char *str" "const char *ptr"
+.Ft char *
+.Fn strcat "char *str" "const char *ptr"
+.Ft char *
+.Fn strncpy "char *str" "const char *ptr" "size_t len"
+.Ft char *
+.Fn strncat "char *str" "const char *ptr" "size_t len"
+.In ssp/strings.h
+.Ft void *
+.Fn bcopy "const void *ptr" "void *str" "size_t len"
+.Ft void *
+.Fn bzero "void *str" "size_t len"
+.In ssp/unistd.h
+.Ft ssize_t
+.Fn read "int fd" "void *str" "size_t len"
+.Ft int
+.Fn readlink "const char * restrict path" "char * restrict str" "size_t len"
+.Ft int
+.Fn getcwd "char *str" "size_t len"
+.Sh DESCRIPTION
+When
+.Dv _FORTIFY_SOURCE
+bounds checking is enabled as described below, the above functions get
+overwritten to use the
+.Xr __builtin_object_size 3
+function to compute the size of
+.Fa str ,
+if known at compile time,
+and perform bounds check on it in order
+to avoid data buffer or stack buffer overflows.
+If an overflow is detected, the routines will call
+.Xr abort 3 .
+.Pp
+To enable these function overrides the following should be added to the
+.Xr clang 1
+or
+.Xr gcc 1
+command line:
+.Dq \-D_FORTIFY_SOURCE=1
+or
+.Dq \-D_FORTIFY_SOURCE=2 .
+.Pp
+If
+.Dv _FORTIFY_SOURCE is set to
+.Dv 1
+the code will compute the maximum possible buffer size for
+.Fa str ,
+and if set to
+.Dv 2
+it will compute the minimum buffer size.
+.Sh SEE ALSO
+.Xr clang 1 ,
+.Xr gcc 1 ,
+.Xr __builtin_object_size 3 ,
+.Xr stdio 3 ,
+.Xr string 3 ,
+.Xr security 7
+.Sh HISTORY
+The
+.Nm
+library appeared in
+.Nx 4.0 .
+This version of the
+.Nm
+library replaced the GNU library of the same name in
+.Fx 12.2 .
diff --git a/lib/libsys/Symbol.map b/lib/libsys/Symbol.map
index 2cd524c19a3f..b24e72b75b83 100644
--- a/lib/libsys/Symbol.map
+++ b/lib/libsys/Symbol.map
@@ -10,5 +10,4 @@ FBSDprivate_1.0 {
freebsd11_lstat;
freebsd11_stat;
freebsd11_statfs;
- freebsd7___semctl;
};
diff --git a/lib/libsys/access.2 b/lib/libsys/access.2
index 1dab63afccde..46c00362a574 100644
--- a/lib/libsys/access.2
+++ b/lib/libsys/access.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 30, 2021
+.Dd May 21, 2024
.Dt ACCESS 2
.Os
.Sh NAME
@@ -45,35 +45,43 @@
.Fn faccessat "int fd" "const char *path" "int mode" "int flag"
.Sh DESCRIPTION
The
-.Fn access
-and
+.Fn access ,
.Fn eaccess
-system calls check the accessibility of the
-file named by
-the
+and
+.Fn faccessat
+system calls report whether an attempt to access the file designated
+by their
.Fa path
-argument
-for the access permissions indicated by
-the
+in the manner described by their
.Fa mode
-argument.
+argument is likely to succeed.
The value of
.Fa mode
-is either the bitwise-inclusive OR of the access permissions to be
-checked
-.Dv ( R_OK
+is either the bitwise-inclusive OR of the desired permissions
+.Po
+.Dv R_OK
for read permission,
.Dv W_OK
for write permission, and
.Dv X_OK
-for execute/search permission),
-or the existence test
-.Pq Dv F_OK .
+for execute / search permission
+.Pc
+or
+.Dv F_OK
+to simply check whether the file exists.
.Pp
-For additional information, see the
-.Sx "File Access Permission"
-section of
-.Xr intro 2 .
+For a number of reasons, these system calls cannot be relied upon to
+give a correct and definitive answer.
+They can at best provide an early indication of the expected outcome,
+to be confirmed by actually attempting the operation.
+For existence checks, either
+.Xr stat 2
+or
+.Xr lstat 2
+should be used instead.
+See also
+.Sx SECURITY CONSIDERATIONS
+below.
.Pp
The
.Fn eaccess
@@ -87,6 +95,13 @@ the real user ID in place of the effective user ID,
the real group ID in place of the effective group ID,
and the rest of the group access list.
.Pp
+See the
+.Sx DEFINITIONS
+section of
+.Xr intro 2
+for additional information on file access permissions and real
+vs. effective user and group IDs.
+.Pp
The
.Fn faccessat
system call is equivalent to
@@ -114,8 +129,10 @@ list, defined in
.In fcntl.h :
.Bl -tag -width indent
.It Dv AT_EACCESS
-The checks for accessibility are performed using the effective user and group
-IDs instead of the real user and group ID as required in a call to
+The checks are performed using the effective user and group IDs,
+like
+.Fn eaccess ,
+instead of the real user and group ID, like
.Fn access .
.It Dv AT_RESOLVE_BENEATH
Only walk paths below the directory specified by the
@@ -150,11 +167,12 @@ and
.Sh RETURN VALUES
.Rv -std
.Sh ERRORS
+The
.Fn access ,
.Fn eaccess ,
-or
+and
.Fn faccessat
-will fail if:
+system calls may fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The value of the
@@ -245,25 +263,11 @@ system call appeared in
.Fx 8.0 .
.Sh SECURITY CONSIDERATIONS
The
-.Fn access
-system call
-is a potential security hole due to race conditions and
-should never be used.
-Set-user-ID and set-group-ID applications should restore the
-effective user or group ID,
-and perform actions directly rather than use
-.Fn access
-to simulate access checks for the real user or group ID.
-The
-.Fn eaccess
-system call
-likewise may be subject to races if used inappropriately.
-.Pp
-.Fn access
-remains useful for providing clues to users as to whether operations
-make sense for particular filesystem objects (e.g. 'delete' menu
-item only highlighted in a writable folder ... avoiding interpretation
-of the st_mode bits that the application might not understand --
-e.g. in the case of AFS).
-It also allows a cheaper file existence test than
-.Xr stat 2 .
+.Fn access ,
+.Fn eaccess ,
+and
+.Fn faccessat
+system calls are subject to time-of-check-to-time-of-use races and
+should not be relied upon for file permission enforcement purposes.
+Instead, applications should perform the desired action using the
+requesting user's credentials.
diff --git a/lib/libsys/cap_rights_limit.2 b/lib/libsys/cap_rights_limit.2
index eca30f55ea48..8372d07f6a5c 100644
--- a/lib/libsys/cap_rights_limit.2
+++ b/lib/libsys/cap_rights_limit.2
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 9, 2023
+.Dd April 27, 2024
.Dt CAP_RIGHTS_LIMIT 2
.Os
.Sh NAME
@@ -44,20 +44,22 @@
.Fn cap_rights_limit "int fd" "const cap_rights_t *rights"
.Sh DESCRIPTION
When a file descriptor is created by a function such as
-.Xr accept 2 ,
-.Xr accept4 2 ,
.Xr fhopen 2 ,
.Xr kqueue 2 ,
.Xr mq_open 2 ,
.Xr open 2 ,
-.Xr openat 2 ,
.Xr pdfork 2 ,
.Xr pipe 2 ,
.Xr shm_open 2 ,
.Xr socket 2
or
.Xr socketpair 2 ,
-it is assigned all capability rights.
+it is assigned all capability rights; for
+.Xr accept 2 ,
+.Xr accept4 2
+or
+.Xr openat 2 ,
+it inherits capability rights from the "parent" file descriptor.
Those rights can be reduced (but never expanded) by using the
.Fn cap_rights_limit
system call.
diff --git a/lib/libsys/clock_gettime.2 b/lib/libsys/clock_gettime.2
index a0f1274f0eff..82f6615e8b93 100644
--- a/lib/libsys/clock_gettime.2
+++ b/lib/libsys/clock_gettime.2
@@ -94,35 +94,35 @@ Returns the execution time of the calling thread.
.El
.Pp
The clock IDs
-.Fa CLOCK_REALTIME ,
-.Fa CLOCK_MONOTONIC ,
+.Dv CLOCK_REALTIME ,
+.Dv CLOCK_MONOTONIC ,
and
-.Fa CLOCK_UPTIME
+.Dv CLOCK_UPTIME
perform a full time counter query.
The clock IDs with the _FAST suffix, i.e.,
-.Fa CLOCK_REALTIME_FAST ,
-.Fa CLOCK_MONOTONIC_FAST ,
+.Dv CLOCK_REALTIME_FAST ,
+.Dv CLOCK_MONOTONIC_FAST ,
and
-.Fa CLOCK_UPTIME_FAST ,
+.Dv CLOCK_UPTIME_FAST ,
do not perform
a full time counter query, so their accuracy is one timer tick.
Similarly,
-.Fa CLOCK_REALTIME_PRECISE ,
-.Fa CLOCK_MONOTONIC_PRECISE ,
+.Dv CLOCK_REALTIME_PRECISE ,
+.Dv CLOCK_MONOTONIC_PRECISE ,
and
-.Fa CLOCK_UPTIME_PRECISE
+.Dv CLOCK_UPTIME_PRECISE
are used to get the most exact value as possible, at the expense of
execution time.
The clock IDs
-.Fa CLOCK_REALTIME_COARSE
+.Dv CLOCK_REALTIME_COARSE
and
-.Fa CLOCK_MONOTONIC_COARSE
+.Dv CLOCK_MONOTONIC_COARSE
are aliases of corresponding IDs with _FAST suffix for compatibility with other
systems.
Finally,
-.Fa CLOCK_BOOTTIME
+.Dv CLOCK_BOOTTIME
is an alias for
-.Fa CLOCK_UPTIME
+.Dv CLOCK_UPTIME
for compatibility with other systems and is unrelated to the
.Fa kern.boottime
.Xr sysctl 8 .
@@ -140,7 +140,7 @@ struct timespec {
.Ed
.Pp
Only the super-user may set the time of day, using only
-.Fa CLOCK_REALTIME .
+.Dv CLOCK_REALTIME .
If the system
.Xr securelevel 7
is greater than 1 (see
@@ -188,14 +188,14 @@ and
system calls conform to
.St -p1003.1b-93 .
The clock IDs
-.Fa CLOCK_REALTIME_FAST ,
-.Fa CLOCK_REALTIME_PRECISE ,
-.Fa CLOCK_MONOTONIC_FAST ,
-.Fa CLOCK_MONOTONIC_PRECISE ,
-.Fa CLOCK_UPTIME ,
-.Fa CLOCK_UPTIME_FAST ,
-.Fa CLOCK_UPTIME_PRECISE ,
-.Fa CLOCK_SECOND
+.Dv CLOCK_REALTIME_FAST ,
+.Dv CLOCK_REALTIME_PRECISE ,
+.Dv CLOCK_MONOTONIC_FAST ,
+.Dv CLOCK_MONOTONIC_PRECISE ,
+.Dv CLOCK_UPTIME ,
+.Dv CLOCK_UPTIME_FAST ,
+.Dv CLOCK_UPTIME_PRECISE ,
+.Dv CLOCK_SECOND
are
.Fx
extensions to the POSIX interface.
diff --git a/lib/libsys/execve.2 b/lib/libsys/execve.2
index 8fc1f2529197..5a35980e9555 100644
--- a/lib/libsys/execve.2
+++ b/lib/libsys/execve.2
@@ -325,9 +325,9 @@ argument is not a valid file descriptor open for executing.
.Xr execl 3 ,
.Xr exit 3 ,
.Xr sysctl 3 ,
+.Xr fdescfs 4 ,
.Xr a.out 5 ,
.Xr elf 5 ,
-.Xr fdescfs 5 ,
.Xr environ 7 ,
.Xr mount 8
.Sh STANDARDS
@@ -374,6 +374,6 @@ is the file descriptor passed in the
argument to
.Fn fexecve .
For this construction to work correctly, the
-.Xr fdescfs 5
+.Xr fdescfs 4
filesystem shall be mounted on
.Pa /dev/fd .
diff --git a/lib/libsys/gettimeofday.2 b/lib/libsys/gettimeofday.2
index cfba97149199..4fcd4b52312b 100644
--- a/lib/libsys/gettimeofday.2
+++ b/lib/libsys/gettimeofday.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 24, 2024
+.Dd April 28, 2024
.Dt GETTIMEOFDAY 2
.Os
.Sh NAME
@@ -139,11 +139,9 @@ function is considered obsolescent and its usage discouraged by
.\" XXX: This should be replaced in the future when an appropriate argument to
.\" the St macro is available: -p1003.1-2017
.No IEEE Std 1003.1-2008, 2017 Edition (\\(LqPOSIX.1\\(Rq) .
-Application should use the
+Applications should use the
.Xr clock_gettime 2
-function instead as
-.Nm gettimeofday
-might be removed in the future.
+function instead.
.Sh HISTORY
The
.Fn gettimeofday
diff --git a/lib/libsys/i386/i386_set_watch.3 b/lib/libsys/i386/i386_set_watch.3
index 68c46e0ec081..265c21119c53 100644
--- a/lib/libsys/i386/i386_set_watch.3
+++ b/lib/libsys/i386/i386_set_watch.3
@@ -110,7 +110,7 @@ or
is invalid.
.Sh SEE ALSO
.Xr ptrace 2 ,
-.Xr procfs 5
+.Xr procfs 4
.Sh AUTHORS
This man page was written by
.An Brian S. Dean .
diff --git a/lib/libsys/intro.2 b/lib/libsys/intro.2
index 6e7abeb2c373..008936b278ae 100644
--- a/lib/libsys/intro.2
+++ b/lib/libsys/intro.2
@@ -32,11 +32,13 @@
.Dt INTRO 2
.Os
.Sh NAME
-.Nm intro
-.Nd introduction to system calls and error numbers
+.Nm intro ,
+.Nm errno
+.Nd introduction to system calls and their error numbers
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
+.In sys/syscall.h
.In errno.h
.Sh DESCRIPTION
This section contains the system calls which comprise the
@@ -332,7 +334,7 @@ Table of currently available system calls.
.Sh ERRORS
Nearly all of the system calls provide an error number referenced via
the external identifier
-.Va errno .
+.Nm errno .
This identifier is defined in
.In sys/errno.h
as:
@@ -348,7 +350,7 @@ For the initial thread and
non-threaded processes,
.Va __error()
returns a pointer to a global
-.Va errno
+.Nm errno
variable that is compatible with the previous definition.
.Pp
When a system call detects an error,
@@ -356,12 +358,12 @@ it returns an integer value
indicating failure
.Pq usually -1
and sets the variable
-.Va errno
+.Nm errno
accordingly.
This allows interpretation of the failure on receiving
-1 and to take action accordingly.
Successful calls never set
-.Va errno ;
+.Nm errno ;
once set, it remains until another error occurs.
It should only be examined after an error.
Note that a number of system calls overload the meanings of these
@@ -511,8 +513,13 @@ system call was issued on a socket, pipe or FIFO.
An attempt was made to modify a file or directory
on a file system that was read-only at the time.
.It Er 31 EMLINK Em "Too many links" .
-Maximum allowable hard links to a single file has been exceeded
-.Pq limit of 32767 hard links per file .
+Maximum allowable hard links to a single file has been exceeded.
+This limit is a filesystem dependent variable
+.Po
+.Va UFS_LINK_MAX No on Xr ufs 4 ,
+.Va FUSE_LINK_MAX No on Xr fusefs 4 , and
+.Va TMPFS_MAX No on Xr tmpfs 4
+.Pc .
.It Er 32 EPIPE Em "Broken pipe" .
A write on a pipe, socket or FIFO for which there is no process to read
the data.
diff --git a/lib/libsys/mq_open.2 b/lib/libsys/mq_open.2
index 17e290e541ca..4800ab18de59 100644
--- a/lib/libsys/mq_open.2
+++ b/lib/libsys/mq_open.2
@@ -35,7 +35,7 @@
.\" the referee document. The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
-.Dd September 26, 2023
+.Dd May 15, 2024
.Dt MQ_OPEN 2
.Os
.Sh NAME
@@ -223,7 +223,7 @@ and
system calls are supported for message queue descriptor.
.Pp
Please see the
-.Xr mqueuefs 5
+.Xr mqueuefs 4
man page for instructions on loading the module or compiling the service into
the kernel.
.Pp
@@ -310,7 +310,7 @@ There is insufficient space for the creation of the new message queue.
.Xr mq_unlink 2 ,
.Xr mq_timedreceive 3 ,
.Xr mq_timedsend 3 ,
-.Xr mqueuefs 5
+.Xr mqueuefs 4
.Sh STANDARDS
The
.Fn mq_open
@@ -322,7 +322,7 @@ Support for POSIX message queues first appeared in
.Sh BUGS
This implementation places strict requirements on the value of
.Fa name :
-it must begin with a slash
+it may begin with a slash
.Pq Ql /
and contain no other slash characters.
.Pp
diff --git a/lib/libsys/mq_unlink.2 b/lib/libsys/mq_unlink.2
index 07f0364abe00..1bc74b85524f 100644
--- a/lib/libsys/mq_unlink.2
+++ b/lib/libsys/mq_unlink.2
@@ -90,7 +90,7 @@ a pathname component is longer than
.It Bq Er ENOENT
The message queue does not exist.
.It Bq Er ENOSYS
-.Xr mqueuefs 5
+.Xr mqueuefs 4
module is neither loaded nor included in the kernel.
.El
.Sh SEE ALSO
diff --git a/lib/libsys/open.2 b/lib/libsys/open.2
index aac3ef1318f8..be164aae1834 100644
--- a/lib/libsys/open.2
+++ b/lib/libsys/open.2
@@ -384,7 +384,7 @@ The file pointer used to mark the current position within the
file is set to the beginning of the file.
.Pp
If a sleeping open of a device node from
-.Xr devfs 5
+.Xr devfs 4
is interrupted by a signal, the call always fails with
.Er EINTR ,
even if the
diff --git a/lib/libsys/sendfile.2 b/lib/libsys/sendfile.2
index 3ffbd733494d..07a563d5ef82 100644
--- a/lib/libsys/sendfile.2
+++ b/lib/libsys/sendfile.2
@@ -126,7 +126,7 @@ Starting with
.Fx 11
.Nm
sending files off the
-.Xr ffs 7
+.Xr ffs 4
filesystem does not block on I/O
(see
.Sx IMPLEMENTATION NOTES
@@ -209,7 +209,7 @@ The
implementation of
.Fn sendfile
does not block on disk I/O when it sends a file off the
-.Xr ffs 7
+.Xr ffs 4
filesystem.
The syscall returns success before the actual I/O completes, and data
is put into the socket later unattended.
diff --git a/lib/libsys/statfs.2 b/lib/libsys/statfs.2
index 561774f686d8..50809869a022 100644
--- a/lib/libsys/statfs.2
+++ b/lib/libsys/statfs.2
@@ -107,7 +107,7 @@ All I/O to the file system is done synchronously.
No file system I/O is done synchronously.
.It Dv MNT_SOFTDEP
Soft updates being done (see
-.Xr ffs 7 ) .
+.Xr ffs 4 ) .
.It Dv MNT_GJOURNAL
Journaling with gjournal is enabled (see
.Xr gjournal 8 ) .
diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile
index a5bf5da44170..85c028f521a1 100644
--- a/lib/libthr/Makefile
+++ b/lib/libthr/Makefile
@@ -11,6 +11,9 @@ LDFLAGS+= -Wl,--rpath=/usr/lib${COMPAT_libcompat}
.include <src.opts.mk>
MK_SSP= no
+# SSP forced off already implies FORTIFY_SOURCE=0, but we must make sure that
+# one cannot turn it back on.
+FORTIFY_SOURCE= 0
LIB=thr
SHLIB_MAJOR= 3
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index f89941f96c78..de65e8e7353d 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -864,8 +864,8 @@ int _pthread_mutexattr_setrobust(pthread_mutexattr_t * _Nonnull, int);
/* #include <fcntl.h> */
#ifdef _SYS_FCNTL_H_
#ifndef _LIBC_PRIVATE_H_
-int __sys_fcntl(int, int, ...);
-int __sys_openat(int, const char *, int, ...);
+int __sys_fcntl(int, int, intptr_t);
+int __sys_openat(int, const char *, int, int);
#endif /* _LIBC_PRIVATE_H_ */
#endif /* _SYS_FCNTL_H_ */
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
index ba07c92576c2..22f9c1f68ec2 100644
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -188,22 +188,19 @@ __thr_connect(int fd, const struct sockaddr *name, socklen_t namelen)
* if it is canceled.
*/
static int
-__thr_fcntl(int fd, int cmd, ...)
+__thr_fcntl(int fd, int cmd, __intptr_t arg)
{
struct pthread *curthread;
int ret;
- va_list ap;
curthread = _get_curthread();
- va_start(ap, cmd);
if (cmd == F_OSETLKW || cmd == F_SETLKW) {
_thr_cancel_enter(curthread);
- ret = __sys_fcntl(fd, cmd, (intptr_t)va_arg(ap, void *));
+ ret = __sys_fcntl(fd, cmd, arg);
_thr_cancel_leave(curthread, ret == -1);
} else {
- ret = __sys_fcntl(fd, cmd, (intptr_t)va_arg(ap, void *));
+ ret = __sys_fcntl(fd, cmd, arg);
}
- va_end(ap);
return (ret);
}
@@ -294,23 +291,11 @@ __thr_nanosleep(const struct timespec *time_to_sleep,
* If the thread is canceled, file is not opened.
*/
static int
-__thr_openat(int fd, const char *path, int flags, ...)
+__thr_openat(int fd, const char *path, int flags, int mode)
{
struct pthread *curthread;
- int mode, ret;
- va_list ap;
+ int ret;
-
- /* Check if the file is being created: */
- if ((flags & O_CREAT) != 0) {
- /* Get the creation mode: */
- va_start(ap, flags);
- mode = va_arg(ap, int);
- va_end(ap);
- } else {
- mode = 0;
- }
-
curthread = _get_curthread();
_thr_cancel_enter(curthread);
ret = __sys_openat(fd, path, flags, mode);
diff --git a/lib/libufs/libufs.3 b/lib/libufs/libufs.3
index 9547396249de..aa3386ad9771 100644
--- a/lib/libufs/libufs.3
+++ b/lib/libufs/libufs.3
@@ -70,7 +70,7 @@ to a string describing the error.
.Xr ufs_disk_fillout 3 ,
.Xr ufs_disk_fillout_blank 3 ,
.Xr ufs_disk_write 3 ,
-.Xr ffs 7
+.Xr ffs 4
.Sh HISTORY
The
.Xr libufs 3
diff --git a/lib/libulog/ulog_login.c b/lib/libulog/ulog_login.c
index c51c56a31f4a..103543458485 100644
--- a/lib/libulog/ulog_login.c
+++ b/lib/libulog/ulog_login.c
@@ -49,7 +49,7 @@ ulog_fill(struct utmpx *utx, const char *line)
utx->ut_pid = getpid();
gettimeofday(&utx->ut_tv, NULL);
- strncpy(utx->ut_line, line, sizeof utx->ut_line);
+ strlcpy(utx->ut_line, line, sizeof utx->ut_line);
SHA1_Init(&c);
SHA1_Update(&c, "libulog", 7);
@@ -66,9 +66,9 @@ ulog_login(const char *line, const char *user, const char *host)
ulog_fill(&utx, line);
utx.ut_type = USER_PROCESS;
- strncpy(utx.ut_user, user, sizeof utx.ut_user);
+ strlcpy(utx.ut_user, user, sizeof utx.ut_user);
if (host != NULL)
- strncpy(utx.ut_host, host, sizeof utx.ut_host);
+ strlcpy(utx.ut_host, host, sizeof utx.ut_host);
pututxline(&utx);
}
diff --git a/lib/libunbound/config.h b/lib/libunbound/config.h
index 071c0aeb6006..e03276056d8f 100644
--- a/lib/libunbound/config.h
+++ b/lib/libunbound/config.h
@@ -793,7 +793,7 @@
#define PACKAGE_NAME "unbound"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "unbound 1.19.3"
+#define PACKAGE_STRING "unbound 1.20.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "unbound"
@@ -802,7 +802,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.19.3"
+#define PACKAGE_VERSION "1.20.0"
/* default pidfile location */
#define PIDFILE "/var/unbound/unbound.pid"
@@ -825,7 +825,7 @@
#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
/* version number for resource files */
-#define RSRC_PACKAGE_VERSION 1,19,3,0
+#define RSRC_PACKAGE_VERSION 1,20,0,0
/* Directory to chdir to */
#define RUN_DIR "/var/unbound"
diff --git a/libexec/atrun/atrun.man b/libexec/atrun/atrun.man
index 1f49ad9fbb37..766953ef015d 100644
--- a/libexec/atrun/atrun.man
+++ b/libexec/atrun/atrun.man
@@ -16,7 +16,7 @@ runs jobs queued by
The system
.Xr crontab 5
file
-.Pa /etc/crontab
+.Pa /etc/cron.d/at
must contain the line
.Bd -literal
*/5 * * * * root /usr/libexec/atrun
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index 742de2f4c086..c090130d8137 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -451,12 +451,12 @@ cmd
| LIST check_login CRLF
{
if ($2)
- retrieve(_PATH_LS " -lgA", "");
+ retrieve(_PATH_LS " -lA", "");
}
| LIST check_login SP pathstring CRLF
{
if ($2)
- retrieve(_PATH_LS " -lgA %s", $4);
+ retrieve(_PATH_LS " -lA %s", $4);
free($4);
}
| STAT check_login SP pathname CRLF
diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8
index fcc5da0b6db1..2241ea78de81 100644
--- a/libexec/ftpd/ftpd.8
+++ b/libexec/ftpd/ftpd.8
@@ -276,7 +276,7 @@ is specified.
.It EPSV Ta "prepare for server-to-server transfer, multiprotocol"
.It FEAT Ta "give information on extended features of server"
.It HELP Ta "give help information"
-.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA"
+.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA"
.It LPRT Ta "specify data connection port, multiprotocol"
.It LPSV Ta "prepare for server-to-server transfer, multiprotocol"
.It MDTM Ta "show last modification time of file"
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 8004d51a4579..f3a1105f6437 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -2321,7 +2321,7 @@ statfilecmd(char *filename)
struct stat st;
code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213;
- (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename);
+ (void)snprintf(line, sizeof(line), _PATH_LS " -lA %s", filename);
fin = ftpd_popen(line, "r");
if (fin == NULL) {
perror_reply(551, filename);
diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit
index 08224061d1b1..df637bbc5064 100755
--- a/libexec/nuageinit/nuageinit
+++ b/libexec/nuageinit/nuageinit
@@ -164,13 +164,6 @@ if citype == "config-2" then
nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err)
end
local obj = parser:get_object()
- local sshkeys = obj["public_keys"]
- if sshkeys then
- local homedir = nuage.adduser(default_user)
- for _,v in pairs(sshkeys) do
- nuage.addsshkey(root .. homedir, v)
- end
- end
nuage.sethostname(obj["hostname"])
-- network
diff --git a/libexec/phttpget/phttpget.8 b/libexec/phttpget/phttpget.8
index b82c788c53c6..16e0be65cd4c 100644
--- a/libexec/phttpget/phttpget.8
+++ b/libexec/phttpget/phttpget.8
@@ -49,9 +49,7 @@ small files need to be downloaded.
.Pp
The
.Xr freebsd-update 8
-and
-.Xr portsnap 8
-tools use
+tool uses
.Nm
to download binary patch files.
.Sh ENVIRONMENT
@@ -69,17 +67,16 @@ Timeout for HTTP request in seconds.
.El
.Sh SEE ALSO
.Xr fetch 1 ,
-.Xr freebsd-update 8 ,
-.Xr portsnap 8
+.Xr freebsd-update 8
.Sh AUTHORS
.An -nosplit
The
.Nm
utility was written by
.An Colin Percival Aq Mt cperciva@FreeBSD.org
-for use with
+initially for use with
.Xr portsnap 8
-and later with
+(now removed) and has been used by
.Xr freebsd-update 8 .
This manual page was written by
.An Xin LI Aq Mt delphij@FreeBSD.org .
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index c91f13bd9812..1ee1573bbdba 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -86,12 +86,6 @@ zfsd_enable="NO" # Set to YES to automatically start the ZFS fault
gptboot_enable="YES" # GPT boot success/failure reporting.
-# Experimental - test before enabling
-gbde_autoattach_all="NO" # YES automatically mounts gbde devices from fstab
-gbde_devices="NO" # Devices to automatically attach (list, or AUTO)
-gbde_attach_attempts="3" # Number of times to attempt attaching gbde devices
-gbde_lockdir="/etc" # Where to look for gbde lockfiles
-
# GELI disk encryption configuration.
geli_devices="" # List of devices to automatically attach in addition to
# GELI devices listed in /etc/fstab.
@@ -727,6 +721,7 @@ newsyslog_enable="YES" # Run newsyslog at startup.
newsyslog_flags="-CN" # Newsyslog flags to create marked files
mixer_enable="YES" # Run the sound mixer.
opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off
+nuageinit_enable="NO" # Run nuageinit at startup
# rctl(8) requires kernel options RACCT and RCTL
rctl_enable="YES" # Load rctl(8) rules on boot
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index 6e9cb7fc50ae..331f0edf44bc 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -24,7 +24,6 @@ CONFS= DAEMON \
dmesg \
dumpon \
fsck \
- gbde \
geli \
geli2 \
gptboot \
@@ -67,7 +66,6 @@ CONFS= DAEMON \
nfsuserd \
nisdomain \
${_nscd} \
- ntpdate \
${_opensm} \
os-release \
pf \
@@ -167,7 +165,7 @@ APMPACKAGE= apm
CONFGROUPS+= AUDIT
AUDIT+= auditd
AUDIT+= auditdistd
-AUDITPACKAGE= rc
+AUDITPACKAGE= audit
.endif
.if ${MK_AUTOFS} != "no"
@@ -283,7 +281,10 @@ _nscd= nscd
.endif
.if ${MK_NTP} != "no"
-CONFS+= ntpd
+CONFGROUPS+= NTP
+NTP+= ntpd \
+ ntpdate
+NTPPACKAGE= ntp
.endif
.if ${MK_OFED} != "no"
diff --git a/libexec/rc/rc.d/accounting b/libexec/rc/rc.d/accounting
index 5c08f18cd2ca..1e0ece84fb15 100755
--- a/libexec/rc/rc.d/accounting
+++ b/libexec/rc/rc.d/accounting
@@ -76,4 +76,8 @@ accounting_rotate_log()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: jail can't manipulate accounting
+accounting_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/adjkerntz b/libexec/rc/rc.d/adjkerntz
index 81ee596369a5..339f8add7201 100755
--- a/libexec/rc/rc.d/adjkerntz
+++ b/libexec/rc/rc.d/adjkerntz
@@ -14,4 +14,8 @@ start_cmd="adjkerntz -i"
stop_cmd=":"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: jail can't modify kerntz
+adjkerntz_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/apm b/libexec/rc/rc.d/apm
index b2bde4d32d1c..3187f41c3a50 100755
--- a/libexec/rc/rc.d/apm
+++ b/libexec/rc/rc.d/apm
@@ -43,4 +43,8 @@ apm_status()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+apm_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/apmd b/libexec/rc/rc.d/apmd
index 8c6293549dc0..aeb5042342d6 100755
--- a/libexec/rc/rc.d/apmd
+++ b/libexec/rc/rc.d/apmd
@@ -34,4 +34,8 @@ apmd_prestart()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+apmd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/auditd b/libexec/rc/rc.d/auditd
index 90017d88ab85..caea2587a2e9 100755
--- a/libexec/rc/rc.d/auditd
+++ b/libexec/rc/rc.d/auditd
@@ -32,4 +32,8 @@ auditd_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+auditd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/auditdistd b/libexec/rc/rc.d/auditdistd
index e7ae7d64d39d..0814c2a4d2c7 100755
--- a/libexec/rc/rc.d/auditdistd
+++ b/libexec/rc/rc.d/auditdistd
@@ -17,5 +17,7 @@ command="/usr/sbin/${name}"
required_files="/etc/security/${name}.conf"
extra_commands="reload"
+: ${auditdistd_svcj_options:="net_basic"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/automount b/libexec/rc/rc.d/automount
index b01928651ec4..19f367837189 100755
--- a/libexec/rc/rc.d/automount
+++ b/libexec/rc/rc.d/automount
@@ -28,4 +28,8 @@ automount_stop()
}
load_rc_config $name
+
+# mounting shall not be performed in a svcj
+automount_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/automountd b/libexec/rc/rc.d/automountd
index 4bc6f7d01862..b809e9dfc8ad 100755
--- a/libexec/rc/rc.d/automountd
+++ b/libexec/rc/rc.d/automountd
@@ -17,4 +17,8 @@ command="/usr/sbin/${name}"
required_modules="autofs"
load_rc_config $name
+
+# mounting shall not be performed in a svcj
+automountd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/autounmountd b/libexec/rc/rc.d/autounmountd
index c939c6d8d011..1d8b3bfa354f 100755
--- a/libexec/rc/rc.d/autounmountd
+++ b/libexec/rc/rc.d/autounmountd
@@ -16,4 +16,8 @@ pidfile="/var/run/${name}.pid"
command="/usr/sbin/${name}"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+autounmountd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/bgfsck b/libexec/rc/rc.d/bgfsck
index 24753f9f561f..dd5c330c3d11 100755
--- a/libexec/rc/rc.d/bgfsck
+++ b/libexec/rc/rc.d/bgfsck
@@ -46,4 +46,8 @@ bgfsck_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+bgfsck_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/blacklistd b/libexec/rc/rc.d/blacklistd
index b58c7c8a76b6..ecbb71e41fca 100755
--- a/libexec/rc/rc.d/blacklistd
+++ b/libexec/rc/rc.d/blacklistd
@@ -40,5 +40,8 @@ rcvar="blacklistd_enable"
command="/usr/sbin/${name}"
required_files="/etc/blacklistd.conf"
+# no svcj options needed
+: ${blacklistd_svcj_options:=""}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth
index 679d669a6191..22bd5078034d 100755
--- a/libexec/rc/rc.d/bluetooth
+++ b/libexec/rc/rc.d/bluetooth
@@ -317,5 +317,8 @@ bluetooth_stop()
load_rc_config $name
hccontrol="${bluetooth_hccontrol:-/usr/sbin/hccontrol}"
+# doesn't make sense to run in a svcj: nojail keyword
+bluetooth_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/bootparams b/libexec/rc/rc.d/bootparams
index ce0b8a45e672..1d435d4ee480 100755
--- a/libexec/rc/rc.d/bootparams
+++ b/libexec/rc/rc.d/bootparams
@@ -15,5 +15,7 @@ rcvar="bootparamd_enable"
required_files="/etc/bootparams"
command="/usr/sbin/${name}"
+: ${bootparamd_svcj_options:="net_basic"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/bridge b/libexec/rc/rc.d/bridge
index a42d82adacc5..98d9212593e5 100755
--- a/libexec/rc/rc.d/bridge
+++ b/libexec/rc/rc.d/bridge
@@ -90,4 +90,8 @@ bridge_stop()
iflist=$2
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+bridge_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/bsnmpd b/libexec/rc/rc.d/bsnmpd
index 60c7242f0c1f..60f4f5e86617 100755
--- a/libexec/rc/rc.d/bsnmpd
+++ b/libexec/rc/rc.d/bsnmpd
@@ -13,6 +13,8 @@ desc="Simple and extensible SNMP daemon"
rcvar="bsnmpd_enable"
command="/usr/sbin/${name}"
+: ${bsnmpd_svcj_options:="net_basic"}
+
load_rc_config $name
pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}"
command_args="-p ${pidfile}"
diff --git a/libexec/rc/rc.d/bthidd b/libexec/rc/rc.d/bthidd
index ec7da8181ca3..4b230406c4d5 100755
--- a/libexec/rc/rc.d/bthidd
+++ b/libexec/rc/rc.d/bthidd
@@ -50,4 +50,7 @@ if evdev_enabled; then
fi
required_files="${config}"
+# doesn't make sense to run in a svcj: nojail keyword
+bthidd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ccd b/libexec/rc/rc.d/ccd
index f7dde1c23f4e..5f2427e4beb0 100755
--- a/libexec/rc/rc.d/ccd
+++ b/libexec/rc/rc.d/ccd
@@ -21,4 +21,8 @@ ccd_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+ccd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/cfumass b/libexec/rc/rc.d/cfumass
index 79c9b0ae63d4..7d1117d7c388 100755
--- a/libexec/rc/rc.d/cfumass
+++ b/libexec/rc/rc.d/cfumass
@@ -145,4 +145,8 @@ cfumass_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+cfumass_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/cleanvar b/libexec/rc/rc.d/cleanvar
index 08e647dde5ae..dce5baa6875b 100755
--- a/libexec/rc/rc.d/cleanvar
+++ b/libexec/rc/rc.d/cleanvar
@@ -43,4 +43,8 @@ cleanvar_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+cleanvar_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/cleartmp b/libexec/rc/rc.d/cleartmp
index 8101474b33cf..c4dfb5367dcb 100755
--- a/libexec/rc/rc.d/cleartmp
+++ b/libexec/rc/rc.d/cleartmp
@@ -57,4 +57,8 @@ cleartmp_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+cleartmp_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/cron b/libexec/rc/rc.d/cron
index a37d3ceee02e..584db590d835 100755
--- a/libexec/rc/rc.d/cron
+++ b/libexec/rc/rc.d/cron
@@ -16,6 +16,11 @@ command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: in the generic case it may need
+# access to more than a jails allows
+cron_svcj="NO"
+
if checkyesno cron_dst
then
cron_flags="$cron_flags -s"
diff --git a/libexec/rc/rc.d/ctld b/libexec/rc/rc.d/ctld
index f09c032575d9..c91d7a9be921 100755
--- a/libexec/rc/rc.d/ctld
+++ b/libexec/rc/rc.d/ctld
@@ -19,4 +19,8 @@ required_modules="ctl"
extra_commands="reload"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+ctld_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ddb b/libexec/rc/rc.d/ddb
index 40235bebf90e..08a7d345c326 100755
--- a/libexec/rc/rc.d/ddb
+++ b/libexec/rc/rc.d/ddb
@@ -35,4 +35,7 @@ load_rc_config $name
required_files="${ddb_config}"
command_args="${ddb_config}"
+# doesn't make sense to run in a svcj: privileged operation
+ddb_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/defaultroute b/libexec/rc/rc.d/defaultroute
index d8d6b2e97dcd..b96f91d36118 100755
--- a/libexec/rc/rc.d/defaultroute
+++ b/libexec/rc/rc.d/defaultroute
@@ -70,4 +70,8 @@ defaultroute_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+defaultroute_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd
index 43fb9d5928dd..47326662339c 100755
--- a/libexec/rc/rc.d/devd
+++ b/libexec/rc/rc.d/devd
@@ -38,4 +38,8 @@ devd_prestart()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: executing potential privileged operations
+devd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/devfs b/libexec/rc/rc.d/devfs
index b7835bd561ce..9987d35f6ad3 100755
--- a/libexec/rc/rc.d/devfs
+++ b/libexec/rc/rc.d/devfs
@@ -68,4 +68,8 @@ read_devfs_conf()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: may need more permissions
+devfs_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/devmatch b/libexec/rc/rc.d/devmatch
index 78050cfa4541..21846355fcfe 100755
--- a/libexec/rc/rc.d/devmatch
+++ b/libexec/rc/rc.d/devmatch
@@ -46,6 +46,7 @@ devmatch_start()
if [ -n "$one_nomatch" ]; then
list=$(devmatch -p "${one_nomatch}" | sort -u)
else
+ sysctl hw.bus.devctl_nomatch_enabled=1
list=$(devmatch | sort -u)
fi
@@ -77,4 +78,8 @@ devmatch_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: privileged operations
+devmatch_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/dhclient b/libexec/rc/rc.d/dhclient
index e2f204076eb6..78442da29193 100755
--- a/libexec/rc/rc.d/dhclient
+++ b/libexec/rc/rc.d/dhclient
@@ -59,6 +59,9 @@ dhclient_prestart()
load_rc_config $name
load_rc_config network
+# dhclient_prestart is not compatible with svcj
+dhclient_svcj="NO"
+
if [ -z $ifn ] ; then
# only complain if a command was specified but no interface
if [ -n "$1" ] ; then
diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg
index ed36ec17b419..51e35d5d4e80 100755
--- a/libexec/rc/rc.d/dmesg
+++ b/libexec/rc/rc.d/dmesg
@@ -23,4 +23,8 @@ do_dmesg()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+dmesg_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/dnctl b/libexec/rc/rc.d/dnctl
index 7e65b899bd01..9067d278088e 100644
--- a/libexec/rc/rc.d/dnctl
+++ b/libexec/rc/rc.d/dnctl
@@ -16,6 +16,9 @@ start_cmd="${name}_start"
required_files="$dnctl_rules"
required_modules="dummynet"
+# doesn't make sense to run in a svcj: config setting
+dnctl_svcj="NO"
+
dnctl_start()
{
startmsg -n "Enabling ${name}"
diff --git a/libexec/rc/rc.d/dumpon b/libexec/rc/rc.d/dumpon
index a6748711b796..0dfcdb266b20 100755
--- a/libexec/rc/rc.d/dumpon
+++ b/libexec/rc/rc.d/dumpon
@@ -97,4 +97,8 @@ dumpon_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+dumpon_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/fsck b/libexec/rc/rc.d/fsck
index 359733d8484c..e755f055dbe6 100755
--- a/libexec/rc/rc.d/fsck
+++ b/libexec/rc/rc.d/fsck
@@ -91,4 +91,8 @@ fsck_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+fsck_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ftp-proxy b/libexec/rc/rc.d/ftp-proxy
index 250088d6bb35..c77dd36cd60b 100755
--- a/libexec/rc/rc.d/ftp-proxy
+++ b/libexec/rc/rc.d/ftp-proxy
@@ -13,6 +13,8 @@ desc="Internet File Transfer Protocol proxy daemon"
rcvar="ftpproxy_enable"
command="/usr/sbin/ftp-proxy"
+: ${ftpproxy_svcj_options:="net_basic"}
+
load_rc_config $name
#
diff --git a/libexec/rc/rc.d/ftpd b/libexec/rc/rc.d/ftpd
index 9bb9a722a2af..e25a561a520a 100755
--- a/libexec/rc/rc.d/ftpd
+++ b/libexec/rc/rc.d/ftpd
@@ -13,13 +13,11 @@ desc="Internet File Transfer Protocol daemon"
rcvar="ftpd_enable"
command="/usr/libexec/${name}"
pidfile="/var/run/${name}.pid"
-start_precmd=ftpd_prestart
-ftpd_prestart()
-{
- rc_flags="-D ${rc_flags}"
- return 0
-}
+: ${ftpd_svcj_options:="net_basic"}
load_rc_config $name
+
+flags="-D ${flags} ${rc_flags}"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/gbde b/libexec/rc/rc.d/gbde
deleted file mode 100755
index 295972a5697b..000000000000
--- a/libexec/rc/rc.d/gbde
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-#
-# This file, originally written by Garrett A. Wollman, is in the public
-# domain.
-#
-#
-
-# PROVIDE: disks
-# KEYWORD: nojail
-
-. /etc/rc.subr
-
-name="gbde"
-desc="GEOM Based Disk Encryption"
-start_precmd="find_gbde_devices start"
-stop_precmd="find_gbde_devices stop"
-start_cmd="gbde_start"
-stop_cmd="gbde_stop"
-
-find_gbde_devices()
-{
- case "${gbde_devices-auto}" in
- [Aa][Uu][Tt][Oo])
- gbde_devices=""
- ;;
- *)
- return 0
- ;;
- esac
-
- case "$1" in
- start)
- fstab="/etc/fstab"
- ;;
- stop)
- fstab=$(mktemp /tmp/mtab.XXXXXX)
- mount -p >${fstab}
- ;;
- esac
-
- #
- # We can't use "mount -p | while ..." because when a shell loop
- # is the target of a pipe it executes in a subshell, and so can't
- # modify variables in the script.
- #
- while read device mountpt type options dump pass; do
- case "$device" in
- *.bde)
- # Ignore swap devices
- case "$type" in
- swap)
- continue
- ;;
- esac
-
- case "$options" in
- *noauto*)
- if checkyesno gbde_autoattach_all; then
- gbde_devices="${gbde_devices} ${device}"
- fi
- ;;
- *)
- gbde_devices="${gbde_devices} ${device}"
- ;;
- esac
- ;;
- esac
- done <${fstab}
-
- case "$1" in
- stop)
- rm -f ${fstab}
- ;;
- esac
-
- return 0
-}
-
-gbde_start()
-{
- for device in $gbde_devices; do
- parent=${device%.bde}
- parent=${parent#/dev/}
- parent_=`ltr ${parent} '/' '_'`
- eval "lock=\${gbde_lock_${parent_}-\"${gbde_lockdir}/${parent_}.lock\"}"
- if [ -e "/dev/${parent}" -a ! -e "/dev/${parent}.bde" ]; then
- echo "Configuring Disk Encryption for ${parent}."
-
- count=1
- while [ ${count} -le ${gbde_attach_attempts} ]; do
- if [ -e "${lock}" ]; then
- gbde attach ${parent} -l ${lock}
- else
- gbde attach ${parent}
- fi
- if [ -e "/dev/${parent}.bde" ]; then
- break
- fi
- echo "Attach failed; attempt ${count} of ${gbde_attach_attempts}."
- count=$((${count} + 1))
- done
- fi
- done
-}
-
-gbde_stop()
-{
- for device in $gbde_devices; do
- parent=${device%.bde}
- parent=${parent#/dev/}
- if [ -e "/dev/${parent}.bde" ]; then
- umount "/dev/${parent}.bde" 2>/dev/null
- gbde detach "${parent}"
- fi
- done
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/libexec/rc/rc.d/geli b/libexec/rc/rc.d/geli
index 312d76a361ad..5fc5ded54ec3 100755
--- a/libexec/rc/rc.d/geli
+++ b/libexec/rc/rc.d/geli
@@ -44,7 +44,6 @@ geli_start()
if [ -z "${geli_tries}" ]; then
if [ -n "${geli_attach_attempts}" ]; then
- # Compatibility with rc.d/gbde.
geli_tries=${geli_attach_attempts}
else
geli_tries=`${SYSCTL_N} kern.geom.eli.tries`
@@ -122,4 +121,8 @@ geli_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+geli_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/geli2 b/libexec/rc/rc.d/geli2
index 16248d32ece8..cedd48a312ee 100755
--- a/libexec/rc/rc.d/geli2
+++ b/libexec/rc/rc.d/geli2
@@ -55,4 +55,8 @@ geli2_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+geli2_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ggated b/libexec/rc/rc.d/ggated
index 22bc8beb7ca0..846019acb055 100755
--- a/libexec/rc/rc.d/ggated
+++ b/libexec/rc/rc.d/ggated
@@ -14,6 +14,9 @@ pidfile="/var/run/${name}.pid"
load_rc_config $name
required_files="${ggated_config}"
+# XXX?: doesn't make sense to run in a svcj: low-level access
+ggated_svcj="NO"
+
command_args="${ggated_config}"
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/gptboot b/libexec/rc/rc.d/gptboot
index 3f04143e79ec..188f1bb77557 100755
--- a/libexec/rc/rc.d/gptboot
+++ b/libexec/rc/rc.d/gptboot
@@ -73,4 +73,8 @@ gptboot_report()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+gptboot_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/growfs b/libexec/rc/rc.d/growfs
index d16951b4bc3e..86bf199a8611 100755
--- a/libexec/rc/rc.d/growfs
+++ b/libexec/rc/rc.d/growfs
@@ -306,4 +306,8 @@ growfs_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+growfs_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/growfs_fstab b/libexec/rc/rc.d/growfs_fstab
index a9d18c1eaed3..8b7cea3a63e5 100755
--- a/libexec/rc/rc.d/growfs_fstab
+++ b/libexec/rc/rc.d/growfs_fstab
@@ -58,4 +58,8 @@ growfs_fstab_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+growfs_fstab_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/gssd b/libexec/rc/rc.d/gssd
index fa0edcead140..7ab3c181eeb1 100755
--- a/libexec/rc/rc.d/gssd
+++ b/libexec/rc/rc.d/gssd
@@ -13,5 +13,7 @@ name=gssd
desc="Generic Security Services Daemon"
rcvar=gssd_enable
+: ${gssd_svcj_options:="net_basic nfsd"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/hastd b/libexec/rc/rc.d/hastd
index 8c1d9e8bc16a..37df43d26c7d 100755
--- a/libexec/rc/rc.d/hastd
+++ b/libexec/rc/rc.d/hastd
@@ -26,4 +26,8 @@ hastd_stop_precmd()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+hastd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/hcsecd b/libexec/rc/rc.d/hcsecd
index 542305040357..8827e53777f3 100755
--- a/libexec/rc/rc.d/hcsecd
+++ b/libexec/rc/rc.d/hcsecd
@@ -21,4 +21,7 @@ config="${hcsecd_config:-/etc/bluetooth/${name}.conf}"
command_args="-f ${config}"
required_files="${config}"
+# doesn't make sense to run in a svcj: nojail keyword
+hcsecd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/hostapd b/libexec/rc/rc.d/hostapd
index fe3dac1dea06..251df91a280b 100755
--- a/libexec/rc/rc.d/hostapd
+++ b/libexec/rc/rc.d/hostapd
@@ -38,4 +38,8 @@ required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp"
extra_commands="reload"
load_rc_config ${name}
+
+# doesn't make sense to run in a svcj: nojail keyword
+hostapd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/hostid b/libexec/rc/rc.d/hostid
index 0210ca433501..18d0fbabf6e4 100755
--- a/libexec/rc/rc.d/hostid
+++ b/libexec/rc/rc.d/hostid
@@ -156,4 +156,8 @@ hostid_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+hostid_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/hostid_save b/libexec/rc/rc.d/hostid_save
index af7f4138a5dd..b9727d24bc57 100755
--- a/libexec/rc/rc.d/hostid_save
+++ b/libexec/rc/rc.d/hostid_save
@@ -44,4 +44,8 @@ hostid_save()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+hostid_save_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/hostname b/libexec/rc/rc.d/hostname
index f6ac95c9c888..8b26c4f60633 100755
--- a/libexec/rc/rc.d/hostname
+++ b/libexec/rc/rc.d/hostname
@@ -77,4 +77,8 @@ hostname_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+hostname_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/inetd b/libexec/rc/rc.d/inetd
index 9820f8dc319a..81cc18d95be2 100755
--- a/libexec/rc/rc.d/inetd
+++ b/libexec/rc/rc.d/inetd
@@ -16,5 +16,7 @@ pidfile="/var/run/${name}.pid"
required_files="/etc/${name}.conf"
extra_commands="reload"
+: ${inetd_svcj_options:="net_basic"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/iovctl b/libexec/rc/rc.d/iovctl
index 01e16221cc4a..b2404f5665b1 100755
--- a/libexec/rc/rc.d/iovctl
+++ b/libexec/rc/rc.d/iovctl
@@ -35,4 +35,8 @@ iovctl_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+iovctl_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ip6addrctl b/libexec/rc/rc.d/ip6addrctl
index 50d9408d0731..eac1d2729e78 100755
--- a/libexec/rc/rc.d/ip6addrctl
+++ b/libexec/rc/rc.d/ip6addrctl
@@ -120,4 +120,8 @@ ip6addrctl_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+ipv6addrctl_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter
index e951bc9b7878..d0cb09ab527c 100755
--- a/libexec/rc/rc.d/ipfilter
+++ b/libexec/rc/rc.d/ipfilter
@@ -15,6 +15,9 @@ rcvar="ipfilter_enable"
load_rc_config $name
stop_precmd="test -f ${ipfilter_rules}"
+# doesn't make sense to run in a svcj: config setting
+ipfilter_svcj="NO"
+
start_precmd="$stop_precmd"
start_cmd="ipfilter_start"
stop_cmd="ipfilter_stop"
diff --git a/libexec/rc/rc.d/ipfs b/libexec/rc/rc.d/ipfs
index c51527bde43c..2ec4ad3b1d00 100755
--- a/libexec/rc/rc.d/ipfs
+++ b/libexec/rc/rc.d/ipfs
@@ -49,4 +49,8 @@ ipfs_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+ipfs_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw
index 2f6b20a41b1a..6d6f7577828f 100755
--- a/libexec/rc/rc.d/ipfw
+++ b/libexec/rc/rc.d/ipfw
@@ -163,4 +163,7 @@ ipfw_status()
load_rc_config $name
firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}"
+# doesn't make sense to run in a svcj: config setting
+ipfw_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/ipfw_netflow b/libexec/rc/rc.d/ipfw_netflow
index 219f0a4facf6..129488ce60d0 100755
--- a/libexec/rc/rc.d/ipfw_netflow
+++ b/libexec/rc/rc.d/ipfw_netflow
@@ -73,4 +73,7 @@ ipfw_netflow_stop()
load_rc_config $name
+# doesn't make sense to run in a svcj: config setting
+ipfw_netflow_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/ipmon b/libexec/rc/rc.d/ipmon
index a6449f241b87..3ef0c895ad16 100755
--- a/libexec/rc/rc.d/ipmon
+++ b/libexec/rc/rc.d/ipmon
@@ -15,6 +15,9 @@ rcvar="ipmon_enable"
command="/sbin/${name}"
start_precmd="ipmon_precmd"
+# no svcj options needed
+: ${ipmon_svcj_options:=""}
+
ipmon_precmd()
{
# Continue only if ipfilter or ipnat is enabled and the
diff --git a/libexec/rc/rc.d/ipnat b/libexec/rc/rc.d/ipnat
index 88cf368876d7..56fe443686b1 100755
--- a/libexec/rc/rc.d/ipnat
+++ b/libexec/rc/rc.d/ipnat
@@ -18,6 +18,9 @@ extra_commands="reload"
required_files="${ipnat_rules}"
required_modules="ipl:ipfilter"
+# doesn't make sense to run in a svcj: config setting
+ipnat_svcj="NO"
+
ipnat_start()
{
echo "Installing NAT rules."
diff --git a/libexec/rc/rc.d/ippool b/libexec/rc/rc.d/ippool
index 42cef3faf7eb..0db8bbe98f61 100755
--- a/libexec/rc/rc.d/ippool
+++ b/libexec/rc/rc.d/ippool
@@ -13,6 +13,10 @@ name="ippool"
desc="user interface to the IPFilter pools"
rcvar="ippool_enable"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+ippool_svcj="NO"
+
start_precmd="ippool_start_precmd"
stop_cmd="${ippool_program} -F"
reload_cmd="ippool_reload"
diff --git a/libexec/rc/rc.d/ipropd_master b/libexec/rc/rc.d/ipropd_master
index 9f8e1ee14490..a3ca498afe6c 100755
--- a/libexec/rc/rc.d/ipropd_master
+++ b/libexec/rc/rc.d/ipropd_master
@@ -14,6 +14,8 @@ required_files="$ipropd_master_keytab"
start_precmd=${name}_start_precmd
start_postcmd=${name}_start_postcmd
+: ${ipropd_master_svcj_options:="net_basic"}
+
ipropd_master_start_precmd()
{
@@ -24,10 +26,6 @@ ipropd_master_start_precmd()
for _slave in $ipropd_master_slaves; do
echo $_slave
done > /var/heimdal/slaves || return 1
- command_args="$command_args \
- --keytab=\"$ipropd_master_keytab\" \
- --detach \
- "
}
ipropd_master_start_postcmd()
{
@@ -36,4 +34,10 @@ ipropd_master_start_postcmd()
}
load_rc_config $name
+
+command_args="$command_args \
+ --keytab=\"$ipropd_master_keytab\" \
+ --detach \
+"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ipropd_slave b/libexec/rc/rc.d/ipropd_slave
index 9d4b06f0e8f3..1735cff3de86 100755
--- a/libexec/rc/rc.d/ipropd_slave
+++ b/libexec/rc/rc.d/ipropd_slave
@@ -13,6 +13,8 @@ rcvar=${name}_enable
required_files="$ipropd_slave_keytab"
start_precmd=${name}_start_precmd
+: ${ipropd_slave_svcj_options:="net_basic"}
+
ipropd_slave_start_precmd()
{
@@ -20,12 +22,14 @@ ipropd_slave_start_precmd()
warn "\$ipropd_slave_master is empty."
return 1
fi
- command_args=" \
- $command_args \
- --keytab=\"$ipropd_slave_keytab\" \
- --detach \
- $ipropd_slave_master"
}
load_rc_config $name
+
+command_args=" \
+ command_args \
+ --keytab=\"$ipropd_slave_keytab\" \
+ --detach \
+ $ipropd_slave_master"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ipsec b/libexec/rc/rc.d/ipsec
index 1e9d65f6699e..0e7ad213ce67 100755
--- a/libexec/rc/rc.d/ipsec
+++ b/libexec/rc/rc.d/ipsec
@@ -57,4 +57,8 @@ ipsec_reload()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+ipsec_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/iscsictl b/libexec/rc/rc.d/iscsictl
index d2231958c6cb..247954e0d4f1 100755
--- a/libexec/rc/rc.d/iscsictl
+++ b/libexec/rc/rc.d/iscsictl
@@ -17,4 +17,8 @@ command_args="${iscsictl_flags}"
required_modules="iscsi"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+iscsictl_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/iscsid b/libexec/rc/rc.d/iscsid
index 277b6f5a8c7e..e2418e8baaa1 100755
--- a/libexec/rc/rc.d/iscsid
+++ b/libexec/rc/rc.d/iscsid
@@ -17,4 +17,8 @@ command="/usr/sbin/${name}"
required_modules="iscsi"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+iscsid_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail
index e24d6f8e21e0..f059363e1e8d 100755
--- a/libexec/rc/rc.d/jail
+++ b/libexec/rc/rc.d/jail
@@ -605,6 +605,10 @@ jail_warn()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+jail_svcj="NO"
+
case $# in
1) run_rc_command $@ ${jail_list:-_ALL} ;;
*) jail_reverse_stop="no"
diff --git a/libexec/rc/rc.d/kadmind b/libexec/rc/rc.d/kadmind
index 140ece811f66..0cee49630480 100755
--- a/libexec/rc/rc.d/kadmind
+++ b/libexec/rc/rc.d/kadmind
@@ -12,17 +12,13 @@ name=kadmind
desc="Server for administrative access to Kerberos database"
rcvar=${name}_enable
required_vars=kdc_enable
-start_precmd=${name}_start_precmd
+command_args="$command_args &"
+
+: ${kadmind_svcj_options:="net_basic"}
set_rcvar_obsolete kadmind5_server_enable kadmind_enable
set_rcvar_obsolete kadmind5_server kadmind_program
set_rcvar_obsolete kerberos5_server_enable kdc_enable
-kadmind_start_precmd()
-{
-
- command_args="$command_args &"
-}
-
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/kdc b/libexec/rc/rc.d/kdc
index a2d9f87f8e20..621129b20164 100755
--- a/libexec/rc/rc.d/kdc
+++ b/libexec/rc/rc.d/kdc
@@ -14,6 +14,7 @@ desc="Kerberos 5 server"
rcvar=${name}_enable
: ${kdc_restart:="NO"}
: ${kdc_restart_delay:=""}
+: ${kdc_svcj_options:="net_basic"}
set_rcvar_obsolete kerberos5_server_enable kdc_enable
set_rcvar_obsolete kerberos5_server kdc_program
diff --git a/libexec/rc/rc.d/keyserv b/libexec/rc/rc.d/keyserv
index b51d01cfceee..d78695eb33b2 100755
--- a/libexec/rc/rc.d/keyserv
+++ b/libexec/rc/rc.d/keyserv
@@ -17,6 +17,8 @@ rcvar="keyserv_enable"
command="/usr/sbin/${name}"
start_precmd="keyserv_prestart"
+: ${keyserv_svcj_options:="net_basic"}
+
keyserv_prestart()
{
force_depend rpcbind || return 1
diff --git a/libexec/rc/rc.d/kfd b/libexec/rc/rc.d/kfd
index 0d124e14033f..23ad790abab5 100755
--- a/libexec/rc/rc.d/kfd
+++ b/libexec/rc/rc.d/kfd
@@ -11,13 +11,9 @@
name=kfd
desc="Receive forwarded tickets"
rcvar=${name}_enable
-start_precmd=${name}_start_precmd
+command_args="$command_args -i &"
-kfd_start_precmd()
-{
-
- command_args="$command_args -i &"
-}
+: ${kfd_svcj_options:="net_basic"}
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/kld b/libexec/rc/rc.d/kld
index 510884a117d0..d9c45a05f7a6 100755
--- a/libexec/rc/rc.d/kld
+++ b/libexec/rc/rc.d/kld
@@ -51,4 +51,8 @@ kld_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+kld_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/kldxref b/libexec/rc/rc.d/kldxref
index d2b733eddce3..d6aa02d778d9 100755
--- a/libexec/rc/rc.d/kldxref
+++ b/libexec/rc/rc.d/kldxref
@@ -33,4 +33,8 @@ kldxref_start() {
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+kldxref_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/kpasswdd b/libexec/rc/rc.d/kpasswdd
index 2d3449bf52a6..7e2562769640 100755
--- a/libexec/rc/rc.d/kpasswdd
+++ b/libexec/rc/rc.d/kpasswdd
@@ -12,17 +12,13 @@ name=kpasswdd
desc="Kerberos 5 password changing"
rcvar=${name}_enable
required_vars=kdc_enable
-start_precmd=${name}_start_precmd
+command_args="$command_args &"
+
+: ${kpasswdd_svcj_options:="net_basic"}
set_rcvar_obsolete kpasswdd_server_enable kpasswdd_enable
set_rcvar_obsolete kpasswdd_server kpasswdd_program
set_rcvar_obsolete kerberos5_server_enable kdc_enable
-kpasswdd_start_precmd()
-{
-
- command_args="$command_args &"
-}
-
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ldconfig b/libexec/rc/rc.d/ldconfig
index fd54b2d3444e..494228e96501 100755
--- a/libexec/rc/rc.d/ldconfig
+++ b/libexec/rc/rc.d/ldconfig
@@ -72,4 +72,8 @@ ldconfig_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+ldconfig_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/linux b/libexec/rc/rc.d/linux
index 1c6a97f606fe..d419920acaca 100755
--- a/libexec/rc/rc.d/linux
+++ b/libexec/rc/rc.d/linux
@@ -81,4 +81,8 @@ linux_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: kernel modules and FS-mounting
+linux_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/local b/libexec/rc/rc.d/local
index 6ac99c4b7e3c..c3f5e037563e 100755
--- a/libexec/rc/rc.d/local
+++ b/libexec/rc/rc.d/local
@@ -33,4 +33,8 @@ local_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: it may contain everything
+local_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/local_unbound b/libexec/rc/rc.d/local_unbound
index 4a717dad70fd..94f01810b303 100755
--- a/libexec/rc/rc.d/local_unbound
+++ b/libexec/rc/rc.d/local_unbound
@@ -35,6 +35,7 @@ load_rc_config $name
: ${local_unbound_tls:=}
: ${local_unbound_pidfile:=${pidfile}}
pidfile=${local_unbound_pidfile}
+: ${local_unbound_svcj_options:="net_basic"}
do_as_unbound()
{
diff --git a/libexec/rc/rc.d/localpkg b/libexec/rc/rc.d/localpkg
index ca5fc3e1109b..12fb9e0fd927 100755
--- a/libexec/rc/rc.d/localpkg
+++ b/libexec/rc/rc.d/localpkg
@@ -66,6 +66,8 @@ pkg_stop()
(set -T
trap 'exit 1' 2
${script} stop)
+ elif [ -f "${script}" -o -L "${script}" ]; then
+ echo -n " (skipping ${script##*/}, not executable)"
fi
done
[ -n "${initdone}" ] && echo '.'
@@ -74,4 +76,8 @@ pkg_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: other rc.d scripts need to decide on their own
+localpkg_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/lockd b/libexec/rc/rc.d/lockd
index c35dd0975cfe..9c804751031a 100755
--- a/libexec/rc/rc.d/lockd
+++ b/libexec/rc/rc.d/lockd
@@ -16,6 +16,8 @@ rcvar=rpc_lockd_enable
command="/usr/sbin/rpc.${name}"
start_precmd='lockd_precmd'
+: ${lockd_svcj_options:="net_basic"}
+
# Make sure that we are either an NFS client or server, and that we get
# the correct flags from rc.conf(5).
#
@@ -23,9 +25,10 @@ lockd_precmd()
{
force_depend rpcbind || return 1
force_depend statd rpc_statd || return 1
-
- rc_flags=${rpc_lockd_flags}
}
load_rc_config $name
+
+rc_flags=${rpc_lockd_flags}
+
run_rc_command $1
diff --git a/libexec/rc/rc.d/lpd b/libexec/rc/rc.d/lpd
index 428b33f7c9fd..0c169bef99a5 100755
--- a/libexec/rc/rc.d/lpd
+++ b/libexec/rc/rc.d/lpd
@@ -16,6 +16,8 @@ command="/usr/sbin/${name}"
required_files="/etc/printcap"
start_precmd="chkprintcap"
+: ${lpd_svcj_options:="net_basic"}
+
chkprintcap()
{
if checkyesno chkprintcap_enable ; then
diff --git a/libexec/rc/rc.d/mdconfig b/libexec/rc/rc.d/mdconfig
index 2322cdc55fc2..4df14017334b 100755
--- a/libexec/rc/rc.d/mdconfig
+++ b/libexec/rc/rc.d/mdconfig
@@ -181,6 +181,9 @@ fi
load_rc_config $name
+# doesn't make sense to run in a svcj: config setting
+mdconfig_svcj="NO"
+
if [ -z "${_mdconfig_list}" ]; then
for _mdconfig_config in `list_vars mdconfig_md[0-9]\* |
sort_lite -nk1.12`
diff --git a/libexec/rc/rc.d/mdconfig2 b/libexec/rc/rc.d/mdconfig2
index 2f958611f7de..716e71cd2a32 100755
--- a/libexec/rc/rc.d/mdconfig2
+++ b/libexec/rc/rc.d/mdconfig2
@@ -211,6 +211,9 @@ fi
load_rc_config $name
+# doesn't make sense to run in a svcj: config setting
+mdconfig2_svcj="NO"
+
if [ -z "${_mdconfig2_list}" ]; then
for _mdconfig2_config in `list_vars mdconfig_md[0-9]\* |
sort_lite -nk1.12`
diff --git a/libexec/rc/rc.d/mixer b/libexec/rc/rc.d/mixer
index d8d43a2ffcc8..7527e16918d2 100755
--- a/libexec/rc/rc.d/mixer
+++ b/libexec/rc/rc.d/mixer
@@ -100,4 +100,8 @@ mixer_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+mixer_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/motd b/libexec/rc/rc.d/motd
index b0f46df8ea7a..7858aef2c3fe 100755
--- a/libexec/rc/rc.d/motd
+++ b/libexec/rc/rc.d/motd
@@ -55,4 +55,8 @@ motd_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+motd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/mountcritlocal b/libexec/rc/rc.d/mountcritlocal
index e9b8885279a2..f91eaf44457c 100755
--- a/libexec/rc/rc.d/mountcritlocal
+++ b/libexec/rc/rc.d/mountcritlocal
@@ -60,4 +60,8 @@ mountcritlocal_start()
}
load_rc_config $name
+
+# mounting shall not be performed in a svcj
+mountcritlocal_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/mountcritremote b/libexec/rc/rc.d/mountcritremote
index b2e0f9cfec49..99becaefb10f 100755
--- a/libexec/rc/rc.d/mountcritremote
+++ b/libexec/rc/rc.d/mountcritremote
@@ -86,4 +86,8 @@ mountcritremote_start()
}
load_rc_config $name
+
+# mounting shall not be performed in a svcj
+mountcritremote_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/mountd b/libexec/rc/rc.d/mountd
index 39b16d604321..8c0aa87e1d13 100755
--- a/libexec/rc/rc.d/mountd
+++ b/libexec/rc/rc.d/mountd
@@ -17,6 +17,8 @@ required_files="/etc/exports"
start_precmd="mountd_precmd"
extra_commands="reload"
+: ${mountd_svcj_options:="net_basic nfsd"}
+
mountd_precmd()
{
@@ -68,4 +70,8 @@ mountd_precmd()
}
load_rc_config $name
+
+# precmd is not compatible with svcj
+mountd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/mountlate b/libexec/rc/rc.d/mountlate
index 133192ac183c..87ea9edccb74 100755
--- a/libexec/rc/rc.d/mountlate
+++ b/libexec/rc/rc.d/mountlate
@@ -44,4 +44,8 @@ mountlate_start()
}
load_rc_config $name
+
+# mounting shall not be performed in a svcj
+mountlate_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index 85a04c89447a..6f1b95af0f0a 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -18,6 +18,11 @@ pidfile="${pidprefix}.pid"
pidarg=
load_rc_config $name
+# doesn't make sense to run in a svcj: nojail keyword
+# XXX: How does moused communiacte with the kernel?
+# XXX: Does the kernel prevent this communcation in jails?
+moused_svcj="NO"
+
# Set the pid file and variable name. The second argument, if it exists, is
# expected to be the mouse device.
#
diff --git a/libexec/rc/rc.d/msgs b/libexec/rc/rc.d/msgs
index 4ea396c99f66..424d545f884d 100755
--- a/libexec/rc/rc.d/msgs
+++ b/libexec/rc/rc.d/msgs
@@ -22,4 +22,8 @@ msgs_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+msgs_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/natd b/libexec/rc/rc.d/natd
index d95d586ac69f..1c8c1cb50a96 100755
--- a/libexec/rc/rc.d/natd
+++ b/libexec/rc/rc.d/natd
@@ -40,4 +40,8 @@ natd_precmd()
}
load_rc_config $name
+
+# precmd is not compatible with svcj
+natd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/netif b/libexec/rc/rc.d/netif
index 3da296e97384..4fe9b60cbb20 100755
--- a/libexec/rc/rc.d/netif
+++ b/libexec/rc/rc.d/netif
@@ -268,4 +268,8 @@ netif_common()
# This is needed for mfsBSD at least.
load_rc_config network
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+netif_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/netoptions b/libexec/rc/rc.d/netoptions
index 7f57c02f0fb4..0f329a5385cf 100755
--- a/libexec/rc/rc.d/netoptions
+++ b/libexec/rc/rc.d/netoptions
@@ -122,4 +122,8 @@ netoptions_inet6()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+netoptions_svcj="NO"
+
run_rc_command $1
diff --git a/libexec/rc/rc.d/netwait b/libexec/rc/rc.d/netwait
index 8342a100bd87..3f374806d97c 100755
--- a/libexec/rc/rc.d/netwait
+++ b/libexec/rc/rc.d/netwait
@@ -111,4 +111,8 @@ netwait_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+netwait_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/newsyslog b/libexec/rc/rc.d/newsyslog
index 9434bb8e12ec..9b959bfabe85 100755
--- a/libexec/rc/rc.d/newsyslog
+++ b/libexec/rc/rc.d/newsyslog
@@ -23,4 +23,8 @@ newsyslog_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: needs to send signals outside the svcj
+newsyslog_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/nfscbd b/libexec/rc/rc.d/nfscbd
index 317a41ef8d3b..450de46e0855 100755
--- a/libexec/rc/rc.d/nfscbd
+++ b/libexec/rc/rc.d/nfscbd
@@ -14,6 +14,8 @@ rcvar="nfscbd_enable"
command="/usr/sbin/${name}"
sig_stop="USR1"
+: ${nfscbd_svcj_options:="net_basic"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/nfsclient b/libexec/rc/rc.d/nfsclient
index f475e867b6c9..857cfa02036f 100755
--- a/libexec/rc/rc.d/nfsclient
+++ b/libexec/rc/rc.d/nfsclient
@@ -46,4 +46,8 @@ unmount_all()
fi
}
load_rc_config $name
+
+# no unmounting in svcj
+nfsclient_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/nfsd b/libexec/rc/rc.d/nfsd
index 86409f0e655f..364c2a3b6bd3 100755
--- a/libexec/rc/rc.d/nfsd
+++ b/libexec/rc/rc.d/nfsd
@@ -14,7 +14,11 @@ rcvar="nfs_server_enable"
command="/usr/sbin/${name}"
nfs_server_vhost=""
+: ${nfsd_svcj_options:="net_basic nfsd"}
+
load_rc_config $name
+# precmd is not compatible with svcj
+nfsd_svcj="NO"
start_precmd="nfsd_precmd"
sig_stop="USR1"
diff --git a/libexec/rc/rc.d/nfsuserd b/libexec/rc/rc.d/nfsuserd
index 297b88dccfcd..3ef88dcc6dfc 100755
--- a/libexec/rc/rc.d/nfsuserd
+++ b/libexec/rc/rc.d/nfsuserd
@@ -14,7 +14,11 @@ rcvar="nfsuserd_enable"
command="/usr/sbin/${name}"
sig_stop="USR1"
+: ${nfsuserd_svcj_options:="net_basic nfsd"}
+
load_rc_config $name
+# precmd is not compatible with svcj
+nfsuserd_svcj="NO"
start_precmd="nfsuserd_precmd"
nfsuserd_precmd()
diff --git a/libexec/rc/rc.d/nisdomain b/libexec/rc/rc.d/nisdomain
index 56fe1a6c5c0b..9616d7be39ac 100755
--- a/libexec/rc/rc.d/nisdomain
+++ b/libexec/rc/rc.d/nisdomain
@@ -51,4 +51,8 @@ nisdomain_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+nisdomain_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/nscd b/libexec/rc/rc.d/nscd
index 64421c29358c..611d2d8ddb8f 100755
--- a/libexec/rc/rc.d/nscd
+++ b/libexec/rc/rc.d/nscd
@@ -21,6 +21,9 @@ name="nscd"
desc="Name-service caching daemon"
rcvar="nscd_enable"
+# no svcj options needed
+: ${nscd_svcj_options:=""}
+
command=/usr/sbin/nscd
extra_commands="flush"
flush_cmd="${command} -I all"
diff --git a/libexec/rc/rc.d/ntpd b/libexec/rc/rc.d/ntpd
index 76d83149ae1a..e7e42da8acc7 100755
--- a/libexec/rc/rc.d/ntpd
+++ b/libexec/rc/rc.d/ntpd
@@ -28,6 +28,9 @@ pidfile="${_ntp_default_dir}/${name}.pid"
load_rc_config $name
+# doesn't make sense to run in a svcj: nojail keyword
+ntpd_svcj="NO"
+
leapfile_is_disabled() {
# Return true (0) if automatic leapfile handling is disabled.
case "$ntp_db_leapfile" in
diff --git a/libexec/rc/rc.d/ntpdate b/libexec/rc/rc.d/ntpdate
index 428072a05f49..cb948d739227 100755
--- a/libexec/rc/rc.d/ntpdate
+++ b/libexec/rc/rc.d/ntpdate
@@ -31,4 +31,8 @@ ntpdate_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: privileged operations
+ntpdate_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/opensm b/libexec/rc/rc.d/opensm
index ff208ddc3ae4..650345d81c12 100755
--- a/libexec/rc/rc.d/opensm
+++ b/libexec/rc/rc.d/opensm
@@ -12,6 +12,8 @@ name="opensm"
start_cmd="opensm_start"
rcvar="opensm_enable"
+: ${opensm_svcj_options:="net_basic"}
+
command=/usr/bin/opensm
command_args="-B"
diff --git a/libexec/rc/rc.d/os-release b/libexec/rc/rc.d/os-release
index 3373d42b1533..0f8ee71e06b4 100755
--- a/libexec/rc/rc.d/os-release
+++ b/libexec/rc/rc.d/os-release
@@ -41,4 +41,8 @@ __EOF__
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+osrelease_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/pf b/libexec/rc/rc.d/pf
index f227782e640c..0b4c086db22b 100755
--- a/libexec/rc/rc.d/pf
+++ b/libexec/rc/rc.d/pf
@@ -22,6 +22,9 @@ extra_commands="check reload resync"
required_files="$pf_rules"
required_modules="pf"
+# doesn't make sense to run in a svcj: config setting
+pf_svcj="NO"
+
pf_fallback()
{
warn "Unable to load $pf_rules."
diff --git a/libexec/rc/rc.d/pflog b/libexec/rc/rc.d/pflog
index c6bb024ee0be..b47252a23e0f 100755
--- a/libexec/rc/rc.d/pflog
+++ b/libexec/rc/rc.d/pflog
@@ -17,6 +17,9 @@ start_precmd="pflog_prestart"
stop_postcmd="pflog_poststop"
extra_commands="reload resync"
+# no svcj options needed
+: ${pflog_svcj_options:=""}
+
# for backward compatibility
resync_cmd="pflog_resync"
@@ -70,6 +73,9 @@ pflog_resync()
load_rc_config $name
+# precmd is not compatible with svcj
+pflog_svcj="NO"
+
# Check if spawning multiple pflogd and told what to spawn
if [ -n "$2" ]; then
# Set required variables
diff --git a/libexec/rc/rc.d/pfsync b/libexec/rc/rc.d/pfsync
index 1e75644315b1..e2ba9c17cd45 100755
--- a/libexec/rc/rc.d/pfsync
+++ b/libexec/rc/rc.d/pfsync
@@ -45,4 +45,8 @@ pfsync_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+pfsync_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/power_profile b/libexec/rc/rc.d/power_profile
index 71f3f3ad8792..7e187bf0a67c 100755
--- a/libexec/rc/rc.d/power_profile
+++ b/libexec/rc/rc.d/power_profile
@@ -62,6 +62,9 @@ if [ $# -ne 1 ]; then
fi
load_rc_config $name
+# doesn't make sense to run in a svcj: privileged operations
+power_profile_svcj="NO"
+
# Find the next state (performance or economy).
state=$1
case ${state} in
diff --git a/libexec/rc/rc.d/powerd b/libexec/rc/rc.d/powerd
index d0f10f781231..8ebc9cc2dc7f 100755
--- a/libexec/rc/rc.d/powerd
+++ b/libexec/rc/rc.d/powerd
@@ -15,4 +15,8 @@ rcvar="powerd_enable"
command="/usr/sbin/${name}"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: privileged operations
+powerd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ppp b/libexec/rc/rc.d/ppp
index cc7c8599777c..6f41d67f8940 100755
--- a/libexec/rc/rc.d/ppp
+++ b/libexec/rc/rc.d/ppp
@@ -131,4 +131,8 @@ ppp_stop() {
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+ppp_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/pppoed b/libexec/rc/rc.d/pppoed
index 6e7225b83a52..5c64862c6a49 100755
--- a/libexec/rc/rc.d/pppoed
+++ b/libexec/rc/rc.d/pppoed
@@ -30,4 +30,8 @@ pppoed_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+pppoed_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/pwcheck b/libexec/rc/rc.d/pwcheck
index 564c110d6a98..db42fdd0d37e 100755
--- a/libexec/rc/rc.d/pwcheck
+++ b/libexec/rc/rc.d/pwcheck
@@ -24,4 +24,8 @@ pwcheck_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+pwcheck_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/quota b/libexec/rc/rc.d/quota
index adbc3b3bd372..9a3a3d50739c 100755
--- a/libexec/rc/rc.d/quota
+++ b/libexec/rc/rc.d/quota
@@ -18,6 +18,9 @@ load_rc_config $name
start_cmd="quota_start"
stop_cmd="/usr/sbin/quotaoff ${quotaoff_flags}"
+# doesn't make sense to run in a svcj: config setting
+quota_svcj="NO"
+
quota_start()
{
if checkyesno check_quotas; then
diff --git a/libexec/rc/rc.d/random b/libexec/rc/rc.d/random
index 1900f6cef5a4..c34f0d1f86b4 100755
--- a/libexec/rc/rc.d/random
+++ b/libexec/rc/rc.d/random
@@ -151,4 +151,8 @@ random_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+random_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/rarpd b/libexec/rc/rc.d/rarpd
index f7f5f3b04094..2618565ae0d1 100755
--- a/libexec/rc/rc.d/rarpd
+++ b/libexec/rc/rc.d/rarpd
@@ -15,6 +15,8 @@ rcvar="rarpd_enable"
command="/usr/sbin/${name}"
required_files="/etc/ethers"
+: ${rarpd_svcj_options:="net_basic"}
+
load_rc_config $name
pidfile="${rarpd_pidfile:-/var/run/${name}.pid}"
diff --git a/libexec/rc/rc.d/rctl b/libexec/rc/rc.d/rctl
index 3d644cd1d8ec..96c148e78bcd 100755
--- a/libexec/rc/rc.d/rctl
+++ b/libexec/rc/rc.d/rctl
@@ -38,4 +38,8 @@ rctl_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+rctl_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/resolv b/libexec/rc/rc.d/resolv
index c94e1c8ff1f1..a46c7ba314e9 100755
--- a/libexec/rc/rc.d/resolv
+++ b/libexec/rc/rc.d/resolv
@@ -59,4 +59,8 @@ resolv_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+resolv_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/rfcomm_pppd_server b/libexec/rc/rc.d/rfcomm_pppd_server
index ef5afa7a5de2..810c1adc8e91 100755
--- a/libexec/rc/rc.d/rfcomm_pppd_server
+++ b/libexec/rc/rc.d/rfcomm_pppd_server
@@ -119,4 +119,8 @@ rfcomm_pppd_server_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+rfcomm_pppd_server_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/root b/libexec/rc/rc.d/root
index e64ea7fe2dcd..e1dad6270e7d 100755
--- a/libexec/rc/rc.d/root
+++ b/libexec/rc/rc.d/root
@@ -39,4 +39,8 @@ root_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: mounting / config setting
+root_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/route6d b/libexec/rc/rc.d/route6d
index f27a0e7f8d6c..873efdeb123c 100755
--- a/libexec/rc/rc.d/route6d
+++ b/libexec/rc/rc.d/route6d
@@ -12,6 +12,8 @@ name="route6d"
desc="RIP6 routing daemon"
rcvar="route6d_enable"
+: ${route6d_svcj_options:="net_basic"}
+
set_rcvar_obsolete ipv6_router_enable route6d_enable
set_rcvar_obsolete ipv6_router route6d_program
set_rcvar_obsolete ipv6_router_flags route6d_flags
diff --git a/libexec/rc/rc.d/routed b/libexec/rc/rc.d/routed
index d5fb464ece8c..9338cf034edd 100755
--- a/libexec/rc/rc.d/routed
+++ b/libexec/rc/rc.d/routed
@@ -13,6 +13,8 @@ name="routed"
desc="Network RIP and router discovery routing daemon"
rcvar="routed_enable"
+: ${routed_svcj_options:="net_basic"}
+
set_rcvar_obsolete router_enable routed_enable
set_rcvar_obsolete router routed_program
set_rcvar_obsolete router_flags routed_flags
diff --git a/libexec/rc/rc.d/routing b/libexec/rc/rc.d/routing
index d7113eb90722..893acb83cf4a 100755
--- a/libexec/rc/rc.d/routing
+++ b/libexec/rc/rc.d/routing
@@ -435,4 +435,8 @@ options_inet6()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+routing_svcj="NO"
+
run_rc_command "$@"
diff --git a/libexec/rc/rc.d/rpcbind b/libexec/rc/rc.d/rpcbind
index 699fdd094241..c393df666219 100755
--- a/libexec/rc/rc.d/rpcbind
+++ b/libexec/rc/rc.d/rpcbind
@@ -13,6 +13,8 @@ desc="Universal addresses to RPC program number mapper"
rcvar="rpcbind_enable"
command="/usr/sbin/${name}"
+: ${rpcbind_svcj_options:="net_basic"}
+
stop_postcmd='/bin/rm -f /var/run/rpcbind.*'
load_rc_config $name
diff --git a/libexec/rc/rc.d/rtadvd b/libexec/rc/rc.d/rtadvd
index 1340c18e29e4..99fec22604aa 100755
--- a/libexec/rc/rc.d/rtadvd
+++ b/libexec/rc/rc.d/rtadvd
@@ -18,6 +18,8 @@ extra_commands="reload"
reload_cmd="rtadvd_reload"
start_precmd="rtadvd_precmd"
+: ${rtadvd_svcj_options:="net_basic"}
+
rtadvd_precmd()
{
# This should be enabled with a great care.
@@ -69,4 +71,7 @@ rtadvd_reload() {
}
load_rc_config $name
+
+# precmd is not compatible with svcj
+rtadvd_svcj="NO"
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/rtsold b/libexec/rc/rc.d/rtsold
index fe21e5a235bb..5578af5a367f 100755
--- a/libexec/rc/rc.d/rtsold
+++ b/libexec/rc/rc.d/rtsold
@@ -16,6 +16,8 @@ command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
start_postcmd="rtsold_poststart"
+: ${rtsold_svcj_options:="net_basic"}
+
rtsold_poststart()
{
# wait for DAD
diff --git a/libexec/rc/rc.d/rwho b/libexec/rc/rc.d/rwho
index ea6c6c8c3b20..f35bcda30ebf 100755
--- a/libexec/rc/rc.d/rwho
+++ b/libexec/rc/rc.d/rwho
@@ -14,5 +14,7 @@ desc="System status server"
rcvar="rwhod_enable"
command="/usr/sbin/${name}"
+: ${rwhod_svcj_options:="net_basic"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/savecore b/libexec/rc/rc.d/savecore
index 9f326eba21b3..889476591dac 100755
--- a/libexec/rc/rc.d/savecore
+++ b/libexec/rc/rc.d/savecore
@@ -78,4 +78,8 @@ savecore_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+savecore_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/sdpd b/libexec/rc/rc.d/sdpd
index 1de7ed5d8fa9..a7bf51ecdc75 100755
--- a/libexec/rc/rc.d/sdpd
+++ b/libexec/rc/rc.d/sdpd
@@ -21,4 +21,7 @@ group="${sdpd_groupname:-nobody}"
user="${sdpd_username:-nobody}"
command_args="-c ${control} -g ${group} -u ${user}"
+# doesn't make sense to run in a svcj: nojail keyword
+sdpd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/securelevel b/libexec/rc/rc.d/securelevel
index 427d424f5e3d..e5c5a410cf62 100755
--- a/libexec/rc/rc.d/securelevel
+++ b/libexec/rc/rc.d/securelevel
@@ -22,4 +22,8 @@ securelevel_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+securelevel_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/sendmail b/libexec/rc/rc.d/sendmail
index 68803a957952..94100b6d00a9 100755
--- a/libexec/rc/rc.d/sendmail
+++ b/libexec/rc/rc.d/sendmail
@@ -19,6 +19,8 @@ rcvar="sendmail_enable"
required_files="/etc/mail/${name}.cf"
start_precmd="sendmail_precmd"
+: ${sendmail_svcj_options:="net_basic"}
+
load_rc_config $name
command=${sendmail_program:-/usr/sbin/${name}}
pidfile=${sendmail_pidfile:-/var/run/${name}.pid}
diff --git a/libexec/rc/rc.d/sshd b/libexec/rc/rc.d/sshd
index 63113fd9ee74..000336a6dcc8 100755
--- a/libexec/rc/rc.d/sshd
+++ b/libexec/rc/rc.d/sshd
@@ -25,6 +25,12 @@ extra_commands="configtest keygen reload"
: ${sshd_ecdsa_enable:="yes"}
: ${sshd_ed25519_enable:="yes"}
+# sshd in a jail would not see other jails. As such exclude it from
+# svcj_all_enable="YES" by setting sshd_svcj to NO. This allows to
+# enable it in rc.conf.
+: ${sshd_svcj:="NO"}
+: ${sshd_svcj_options:="net_basic"}
+
sshd_keygen_alg()
{
local alg=$1
diff --git a/libexec/rc/rc.d/statd b/libexec/rc/rc.d/statd
index 03254932c37c..3f2678af2940 100755
--- a/libexec/rc/rc.d/statd
+++ b/libexec/rc/rc.d/statd
@@ -16,15 +16,18 @@ rcvar=rpc_statd_enable
command="/usr/sbin/rpc.${name}"
start_precmd='statd_precmd'
+: ${statd_svcj_options:="net_basic"}
+
# Make sure that we are either an NFS client or server, and that we get
# the correct flags from rc.conf(5).
#
statd_precmd()
{
force_depend rpcbind || return 1
-
- rc_flags=${rpc_statd_flags}
}
load_rc_config $name
+
+rc_flags=${rpc_statd_flags}
+
run_rc_command $1
diff --git a/libexec/rc/rc.d/static_arp b/libexec/rc/rc.d/static_arp
index b6ad064cc102..42db3c2c8fff 100755
--- a/libexec/rc/rc.d/static_arp
+++ b/libexec/rc/rc.d/static_arp
@@ -70,4 +70,8 @@ static_arp_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+statc_arp_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/static_ndp b/libexec/rc/rc.d/static_ndp
index 8f0f3fc35957..e66c4a0080c3 100755
--- a/libexec/rc/rc.d/static_ndp
+++ b/libexec/rc/rc.d/static_ndp
@@ -69,4 +69,8 @@ static_ndp_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+static_ndp_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/stf b/libexec/rc/rc.d/stf
index 48a27b542f05..94a585693982 100755
--- a/libexec/rc/rc.d/stf
+++ b/libexec/rc/rc.d/stf
@@ -75,4 +75,8 @@ stf_down()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+stf_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/swap b/libexec/rc/rc.d/swap
index fb1e11281ea6..f7663fc422bf 100755
--- a/libexec/rc/rc.d/swap
+++ b/libexec/rc/rc.d/swap
@@ -14,4 +14,8 @@ start_cmd='/sbin/swapon -aq'
stop_cmd=':'
load_rc_config $name
+
+# doesn't make sense to run in a svcj: privileged operations
+swap_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/swaplate b/libexec/rc/rc.d/swaplate
index 28beb8e835c9..da86cb2bf686 100755
--- a/libexec/rc/rc.d/swaplate
+++ b/libexec/rc/rc.d/swaplate
@@ -14,4 +14,8 @@ start_cmd='/sbin/swapon -aLq'
stop_cmd='/sbin/swapoff -aLq'
load_rc_config swap
+
+# doesn't make sense to run in a svcj: privileged operations
+swaplate_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/syscons b/libexec/rc/rc.d/syscons
index beef467deaf8..325628a83d8c 100755
--- a/libexec/rc/rc.d/syscons
+++ b/libexec/rc/rc.d/syscons
@@ -396,5 +396,9 @@ syscons_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+syscons_svcj="NO"
+
run_rc_command $*
diff --git a/libexec/rc/rc.d/sysctl b/libexec/rc/rc.d/sysctl
index 5d586776929e..0ca753b530af 100755
--- a/libexec/rc/rc.d/sysctl
+++ b/libexec/rc/rc.d/sysctl
@@ -34,4 +34,8 @@ sysctl_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+sysctl_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/sysctl_lastload b/libexec/rc/rc.d/sysctl_lastload
index 335bd9cdc1bc..6d97561ed2c0 100755
--- a/libexec/rc/rc.d/sysctl_lastload
+++ b/libexec/rc/rc.d/sysctl_lastload
@@ -14,4 +14,8 @@ start_cmd="/etc/rc.d/sysctl lastload"
stop_cmd=":"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+sysctl_lastload_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/syslogd b/libexec/rc/rc.d/syslogd
index 3f67014d0b01..8d0ff952a6b2 100755
--- a/libexec/rc/rc.d/syslogd
+++ b/libexec/rc/rc.d/syslogd
@@ -22,6 +22,8 @@ extra_commands="reload"
sockfile="/var/run/syslogd.sockets"
evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\""
+: ${syslogd_svcj_options:="net_basic"}
+
syslogd_precmd()
{
local _l _ldir
diff --git a/libexec/rc/rc.d/sysvipc b/libexec/rc/rc.d/sysvipc
index a76e662576db..ce38db598641 100755
--- a/libexec/rc/rc.d/sysvipc
+++ b/libexec/rc/rc.d/sysvipc
@@ -22,4 +22,8 @@ sysvipc_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: privileged operations
+sysvipc_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/tlsclntd b/libexec/rc/rc.d/tlsclntd
index ff1336b2d08a..5688c7ff53a2 100755
--- a/libexec/rc/rc.d/tlsclntd
+++ b/libexec/rc/rc.d/tlsclntd
@@ -15,6 +15,8 @@ rcvar="tlsclntd_enable"
command="/usr/sbin/rpc.${name}"
pidfile="/var/run/rpc.${name}.pid"
+: ${tlsclntd_svcj_options:="net_basic"}
+
load_rc_config $name
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/tlsservd b/libexec/rc/rc.d/tlsservd
index 98a713dd3ff5..989e17996043 100755
--- a/libexec/rc/rc.d/tlsservd
+++ b/libexec/rc/rc.d/tlsservd
@@ -14,6 +14,8 @@ desc="NFS over TLS server side daemon"
rcvar="tlsservd_enable"
command="/usr/sbin/rpc.${name}"
+: ${tlsservd_svcj_options:="net_basic nfsd"}
+
pidfile="/var/run/rpc.${name}.pid"
required_files="/etc/rpc.tlsservd/cert.pem /etc/rpc.tlsservd/certkey.pem"
extra_commands="reload"
diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp
index bde1ba257c2c..cc970816e45c 100755
--- a/libexec/rc/rc.d/tmp
+++ b/libexec/rc/rc.d/tmp
@@ -37,6 +37,9 @@ stop_cmd=':'
load_rc_config $name
+# doesn't make sense to run in a svcj: mounting
+tmp_svcj="NO"
+
mount_tmpmfs()
{
while read line; do
diff --git a/libexec/rc/rc.d/ubthidhci b/libexec/rc/rc.d/ubthidhci
index a311ec07ebf6..9792a0e3530d 100755
--- a/libexec/rc/rc.d/ubthidhci
+++ b/libexec/rc/rc.d/ubthidhci
@@ -28,6 +28,10 @@ ubthidhci_prestart()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+ubthidhci_svcj="NO"
+
#
# We discard the output because:
# 1) we don't want it to show up during boot; and
diff --git a/libexec/rc/rc.d/ugidfw b/libexec/rc/rc.d/ugidfw
index 852c04bc216f..13b20c45ee29 100755
--- a/libexec/rc/rc.d/ugidfw
+++ b/libexec/rc/rc.d/ugidfw
@@ -48,4 +48,8 @@ ugidfw_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: nojail keyword
+ugidfw_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/utx b/libexec/rc/rc.d/utx
index 96bbae07d2cf..d7149f66e68b 100755
--- a/libexec/rc/rc.d/utx
+++ b/libexec/rc/rc.d/utx
@@ -16,4 +16,8 @@ start_cmd="utx boot"
stop_cmd="utx shutdown"
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+utx_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/var b/libexec/rc/rc.d/var
index ff5150a96904..b4939e2bc4a0 100755
--- a/libexec/rc/rc.d/var
+++ b/libexec/rc/rc.d/var
@@ -39,6 +39,9 @@ stop_cmd=':'
load_rc_config $name
+# doesn't make sense to run in a svcj: mounting
+var_svcj="NO"
+
populate_var()
{
/usr/sbin/mtree -deiU -f /etc/mtree/BSD.var.dist -p /var > /dev/null
diff --git a/libexec/rc/rc.d/var_run b/libexec/rc/rc.d/var_run
index bf8f0cb737b4..0dc37698ee76 100755
--- a/libexec/rc/rc.d/var_run
+++ b/libexec/rc/rc.d/var_run
@@ -17,6 +17,9 @@ stop_cmd="_var_run_stop"
load_rc_config $name
+# doesn't make sense to run in a svcj: config setting
+var_run_svcj="NO"
+
_var_run_load() {
test -f ${var_run_mtree} &&
mtree -U -i -q -f ${var_run_mtree} -p /var/run > /dev/null
diff --git a/libexec/rc/rc.d/virecover b/libexec/rc/rc.d/virecover
index ed65fc00474a..d6f9f8bdef9a 100755
--- a/libexec/rc/rc.d/virecover
+++ b/libexec/rc/rc.d/virecover
@@ -62,4 +62,8 @@ virecover_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+virecover_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/watchdogd b/libexec/rc/rc.d/watchdogd
index 7565d8bcd94d..6cd37b8c5ceb 100755
--- a/libexec/rc/rc.d/watchdogd
+++ b/libexec/rc/rc.d/watchdogd
@@ -88,4 +88,8 @@ watchdogd_poststop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: privileged operations
+watchdogd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant
index fea0f36997ef..61525a82894b 100755
--- a/libexec/rc/rc.d/wpa_supplicant
+++ b/libexec/rc/rc.d/wpa_supplicant
@@ -33,4 +33,7 @@ command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile"
required_files=$conf_file
required_modules="wlan_wep wlan_tkip wlan_ccmp"
+# doesn't make sense to run in a svcj: nojail keyword
+wpa_supplicant_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/ypbind b/libexec/rc/rc.d/ypbind
index b4e47cb0a37d..a6bf00f1ed9d 100755
--- a/libexec/rc/rc.d/ypbind
+++ b/libexec/rc/rc.d/ypbind
@@ -13,6 +13,8 @@ name="ypbind"
desc="NIS domain binding daemon"
rcvar="nis_client_enable"
+: ${ypbind_svcj_options:="net_basic"}
+
load_rc_config $name
command="/usr/sbin/${name}"
diff --git a/libexec/rc/rc.d/ypldap b/libexec/rc/rc.d/ypldap
index 051d0ce9977e..579b004a07c0 100755
--- a/libexec/rc/rc.d/ypldap
+++ b/libexec/rc/rc.d/ypldap
@@ -12,6 +12,8 @@
name="ypldap"
rcvar="nis_ypldap_enable"
+: ${ypldap_svcj_options:="net_basic"}
+
load_rc_config $name
command="/usr/sbin/${name}"
diff --git a/libexec/rc/rc.d/yppasswdd b/libexec/rc/rc.d/yppasswdd
index 83a7bcc713dd..81a04d753305 100755
--- a/libexec/rc/rc.d/yppasswdd
+++ b/libexec/rc/rc.d/yppasswdd
@@ -13,6 +13,8 @@ name="yppasswdd"
desc="Server for updating NIS passwords"
rcvar="nis_yppasswdd_enable"
+: ${yppasswdd_svcj_options:="net_basic"}
+
load_rc_config $name
command="/usr/sbin/rpc.${name}"
diff --git a/libexec/rc/rc.d/ypserv b/libexec/rc/rc.d/ypserv
index 9b60e9a55b25..8cae179fdd11 100755
--- a/libexec/rc/rc.d/ypserv
+++ b/libexec/rc/rc.d/ypserv
@@ -12,6 +12,8 @@ name="ypserv"
desc="NIS database server"
rcvar="nis_server_enable"
+: ${ypserv_svcj_options:="net_basic"}
+
load_rc_config $name
command="/usr/sbin/${name}"
diff --git a/libexec/rc/rc.d/ypset b/libexec/rc/rc.d/ypset
index 2f259de05e59..123a94ea44e8 100755
--- a/libexec/rc/rc.d/ypset
+++ b/libexec/rc/rc.d/ypset
@@ -14,6 +14,9 @@ rcvar="nis_ypset_enable"
load_rc_config $name
+# doesn't make sense to run in a svcj: config setting
+ypset_svcj="NO"
+
command="/usr/sbin/${name}"
command_args="${nis_ypset_flags}"
diff --git a/libexec/rc/rc.d/ypupdated b/libexec/rc/rc.d/ypupdated
index f7a7769c766a..1a4c595c745a 100755
--- a/libexec/rc/rc.d/ypupdated
+++ b/libexec/rc/rc.d/ypupdated
@@ -11,6 +11,8 @@
name="ypupdated"
rcvar="rpc_ypupdated_enable"
+: ${ypupdated_svcj_options:="net_basic"}
+
load_rc_config $name
command="/usr/sbin/rpc.${name}"
diff --git a/libexec/rc/rc.d/ypxfrd b/libexec/rc/rc.d/ypxfrd
index 3bc7fd8d29e6..ea929b0d25ce 100755
--- a/libexec/rc/rc.d/ypxfrd
+++ b/libexec/rc/rc.d/ypxfrd
@@ -12,6 +12,8 @@ name="ypxfrd"
desc="NIS map transfer server"
rcvar="nis_ypxfrd_enable"
+: ${ypxfrd_svcj_options:="net_basic"}
+
load_rc_config $name
command="/usr/sbin/rpc.${name}"
diff --git a/libexec/rc/rc.d/zfs b/libexec/rc/rc.d/zfs
index d7c5b20ee6d1..26bf3046444b 100755
--- a/libexec/rc/rc.d/zfs
+++ b/libexec/rc/rc.d/zfs
@@ -75,4 +75,8 @@ zfs_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: mounting / config setting
+zfs_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zfsbe b/libexec/rc/rc.d/zfsbe
index 31b0a180800f..f61f3bf097f0 100755
--- a/libexec/rc/rc.d/zfsbe
+++ b/libexec/rc/rc.d/zfsbe
@@ -85,4 +85,8 @@ be_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: mounting / config setting
+zfsbe_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zfsd b/libexec/rc/rc.d/zfsd
index 5b9c2ea31837..f0abeeeb446b 100755
--- a/libexec/rc/rc.d/zfsd
+++ b/libexec/rc/rc.d/zfsd
@@ -13,4 +13,8 @@ rcvar="zfsd_enable"
command="/usr/sbin/${name}"
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+zfsd_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zfskeys b/libexec/rc/rc.d/zfskeys
index c558eb3af5d7..ea38182a66c7 100755
--- a/libexec/rc/rc.d/zfskeys
+++ b/libexec/rc/rc.d/zfskeys
@@ -116,4 +116,8 @@ unload_zfs_keys()
zfskeys_args=$(encode_args "$@")
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+zfskeys_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zpool b/libexec/rc/rc.d/zpool
index 5a5ef00755cc..94e107bd9ae0 100755
--- a/libexec/rc/rc.d/zpool
+++ b/libexec/rc/rc.d/zpool
@@ -34,4 +34,8 @@ zpool_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj
+zpool_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zpoolreguid b/libexec/rc/rc.d/zpoolreguid
index 77ecac13ad5a..f94630d9283f 100755
--- a/libexec/rc/rc.d/zpoolreguid
+++ b/libexec/rc/rc.d/zpoolreguid
@@ -22,4 +22,8 @@ zpoolreguid_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+zpoolreguid_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zpoolupgrade b/libexec/rc/rc.d/zpoolupgrade
index 6f5720bac6a7..1435cba7199c 100755
--- a/libexec/rc/rc.d/zpoolupgrade
+++ b/libexec/rc/rc.d/zpoolupgrade
@@ -22,4 +22,8 @@ zpoolupgrade_start()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+zpoolupgrade_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.d/zvol b/libexec/rc/rc.d/zvol
index 351dce09ca27..b9f17fad5bfd 100755
--- a/libexec/rc/rc.d/zvol
+++ b/libexec/rc/rc.d/zvol
@@ -42,4 +42,8 @@ zvol_stop()
}
load_rc_config $name
+
+# doesn't make sense to run in a svcj: config setting
+zvol_svcj="NO"
+
run_rc_command "$1"
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr
index 16b2c9fc5e88..23651cbf8e58 100644
--- a/libexec/rc/rc.subr
+++ b/libexec/rc/rc.subr
@@ -50,6 +50,9 @@ PROTECT="/usr/bin/protect"
ID="/usr/bin/id"
IDCMD="if [ -x $ID ]; then $ID -un; fi"
PS="/bin/ps -ww"
+SERVICE=/usr/sbin/service
+JAIL_CMD=/usr/sbin/jail
+_svcj_generic_params="path=/ mount.nodevfs host=inherit"
JID=0
CPUSET="/bin/cpuset"
@@ -521,6 +524,16 @@ _find_processes()
$_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")'
fi
+ if checkyesno ${name}_svcj && [ "${_rc_svcj}" != jailing ]; then
+ JID=$(/usr/sbin/jls -j svcj-${name} jid 2>/dev/null)
+
+ case ${JID} in
+ ''|*[!0-9]*)
+ # svcj-jail doesn't exist, fallback to host-check
+ JID=0
+ ;;
+ esac
+ fi
_proccheck="\
$PS 2>/dev/null -o pid= -o jid= -o command= $_psargs"' |
while read _npid _jid '"$_fp_args"'; do
@@ -1076,7 +1089,7 @@ run_rc_command()
err 3 'run_rc_command: $name is not set.'
fi
- DebugOn rc:$name rc:$name:$rc_arg $name:$rc_arg
+ DebugOn rc:all rc:all:$rc_arg rc:$name rc:$name:$rc_arg $name:$rc_arg
# Don't repeat the first argument when passing additional command-
# line arguments to the command subroutines.
@@ -1138,6 +1151,18 @@ run_rc_command()
_cpusetcmd="$CPUSET -l $_cpuset"
fi
+ # If a specific jail has a specific svcj request, honor it (YES/NO).
+ # If not (variable empty), evaluate the global svcj catch-all.
+ # A global YES can be overriden by a specific NO, and a global NO is overriden
+ # by a specific YES.
+ eval _svcj=\$${name}_svcj
+ if [ -z "$_svcj" ]; then
+ _svcj=${svcj_all_enable}
+ if [ -z "$_svcj" ]; then
+ eval ${name}_svcj=NO
+ fi
+ fi
+
# setup pid check command
if [ -n "$_procname" ]; then
if [ -n "$pidfile" ]; then
@@ -1174,7 +1199,7 @@ run_rc_command()
_prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} \
_limits=\$${name}_limits _oomprotect=\$${name}_oomprotect \
_setup=\$${name}_setup _env_file=\$${name}_env_file \
- _umask=\$${name}_umask
+ _umask=\$${name}_umask _svcj_options=\$${name}_svcj_options
if [ -n "$_env_file" ] && [ -r "${_env_file}" ]; then # load env from file
set -a
@@ -1188,6 +1213,45 @@ run_rc_command()
fi
fi
+ if [ -n "$_svcj_options" ]; then # translate service jail options
+ _svcj_cmd_options=""
+
+ for _svcj_option in $_svcj_options; do
+ case "$_svcj_option" in
+ mlock)
+ _svcj_cmd_options="allow.mlock ${_svcj_cmd_options}"
+ ;;
+ netv4)
+ _svcj_cmd_options="ip4=inherit allow.reserved_ports ${_svcj_cmd_options}"
+ ;;
+ netv6)
+ _svcj_cmd_options="ip6=inherit allow.reserved_ports ${_svcj_cmd_options}"
+ ;;
+ net_basic)
+ _svcj_cmd_options="ip4=inherit ip6=inherit allow.reserved_ports ${_svcj_cmd_options}"
+ ;;
+ net_raw)
+ _svcj_cmd_options="allow.raw_sockets ${_svcj_cmd_options}"
+ ;;
+ net_all)
+ _svcj_cmd_options="allow.socket_af allow.raw_sockets allow.reserved_ports ip4=inherit ip6=inherit ${_svcj_cmd_options}"
+ ;;
+ nfsd)
+ _svcj_cmd_options="allow.nfsd enforce_statfs=1 ${_svcj_cmd_options}"
+ ;;
+ sysvipc)
+ _svcj_cmd_options="sysvmsg=inherit sysvsem=inherit sysvshm=inherit ${_svcj_cmd_options}"
+ ;;
+ vmm)
+ _svcj_cmd_options="allow.vmm ${_svcj_cmd_options}"
+ ;;
+ *)
+ echo ${name}: unknown service jail option: $_svcj_option
+ ;;
+ esac
+ done
+ fi
+
[ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary
for _elem in $_keywords; do
@@ -1235,9 +1299,49 @@ run_rc_command()
if [ -n "$_env" ]; then
eval "export -- $_env"
fi
- _run_rc_precmd || return 1
- _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1
- _run_rc_postcmd
+
+ if [ "${_rc_svcj}" != jailing ]; then
+ _run_rc_precmd || return 1
+ fi
+ if ! checkyesno ${name}_svcj; then
+ _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1
+ else
+ case "$rc_arg" in
+ start)
+ if [ "${_rc_svcj}" != jailing ]; then
+ _return=1
+ $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \
+ exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \
+ exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \
+ exec.consolelog="/var/log/svcj_${name}_console.log" \
+ name=svcj-${name} && _return=0
+ else
+ _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1
+ fi
+ ;;
+ stop)
+ if [ "${_rc_svcj}" != jailing ]; then
+ $SERVICE -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}stop $rc_extra_args || _return=1
+ $JAIL_CMD -r svcj-${name} 2>/dev/null
+ else
+ _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1
+ fi
+ ;;
+ restart|status) ;; # no special case needed for svcj or handled somewhere else
+ *)
+ eval _rc_svcj_extra_cmd=\$${name}_${rc_arg}_svcj_enable
+ : ${_rc_svcj_extra_cmd:=NO}
+ if checkyesno _rc_svcj_extra_cmd && [ "${_rc_svcj}" != jailing ]; then
+ $SERVICE -v -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}${rc_arg} $rc_extra_args || _return=1
+ else
+ _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1
+ fi
+ ;;
+ esac
+ fi
+ if [ "${_rc_svcj}" != jailing ]; then
+ _run_rc_postcmd
+ fi
return $_return
fi
@@ -1295,9 +1399,21 @@ run_rc_command()
return 1
fi
- if ! _run_rc_precmd; then
- warn "failed precmd routine for ${name}"
- return 1
+ if [ "${_rc_svcj}" != jailing ]; then
+ if ! _run_rc_precmd; then
+ warn "failed precmd routine for ${name}"
+ return 1
+ fi
+ fi
+
+ if checkyesno ${name}_svcj; then
+ if [ "${_rc_svcj}" != jailing ]; then
+ $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options\
+ exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \
+ exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \
+ exec.consolelog="/var/log/svcj_${name}_console.log" \
+ name=svcj-${name} || return 1
+ fi
fi
# setup the full command to run
@@ -1341,16 +1457,28 @@ $_cpusetcmd $command $rc_flags $command_args"
# Prepend default limits
_doit="$_cd limits -C $_login_class $_limits $_doit"
+
+ local _really_run_it=true
+ if checkyesno ${name}_svcj; then
+ if [ "${_rc_svcj}" != jailing ]; then
+ _really_run_it=false
+ fi
+ fi
+
+ if [ "$_really_run_it" = true ]; then
# run the full command
#
- if ! _run_rc_doit "$_doit"; then
- warn "failed to start ${name}"
- return 1
+ if ! _run_rc_doit "$_doit"; then
+ warn "failed to start ${name}"
+ return 1
+ fi
fi
+ if [ "${_rc_svcj}" != jailing ]; then
# finally, run postcmd
#
- _run_rc_postcmd
+ _run_rc_postcmd
+ fi
;;
stop)
@@ -1372,6 +1500,11 @@ $_cpusetcmd $command $rc_flags $command_args"
# and run postcmd.
wait_for_pids $rc_pid
+ if checkyesno ${name}_svcj; then
+ # remove service jail
+ $JAIL_CMD -r svcj-${name} 2>/dev/null
+ fi
+
_run_rc_postcmd
;;
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile
index 37c3840538d5..864448ad782a 100644
--- a/libexec/rtld-elf/Makefile
+++ b/libexec/rtld-elf/Makefile
@@ -15,6 +15,10 @@ MK_UBSAN= no
.include <bsd.compat.pre.mk>
+# SSP forced off already implies FORTIFY_SOURCE=0, but we must make sure that
+# one cannot turn it back on.
+FORTIFY_SOURCE= 0
+
.if !defined(NEED_COMPAT)
CONFS= libmap.conf
.endif
diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c
index d73982e26b76..78e2e2b1aaae 100644
--- a/libexec/rtld-elf/aarch64/reloc.c
+++ b/libexec/rtld-elf/aarch64/reloc.c
@@ -55,6 +55,17 @@ void *_rtld_tlsdesc_dynamic(void *);
void _exit(int);
bool
+arch_digest_dynamic(struct Struct_Obj_Entry *obj, const Elf_Dyn *dynp)
+{
+ if (dynp->d_tag == DT_AARCH64_VARIANT_PCS) {
+ obj->variant_pcs = true;
+ return (true);
+ }
+
+ return (false);
+}
+
+bool
arch_digest_note(struct Struct_Obj_Entry *obj __unused, const Elf_Note *note)
{
const char *note_name;
@@ -228,19 +239,54 @@ reloc_tlsdesc(const Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *where,
int
reloc_plt(Obj_Entry *obj, int flags, RtldLockState *lockstate)
{
+ const Obj_Entry *defobj;
const Elf_Rela *relalim;
const Elf_Rela *rela;
+ const Elf_Sym *def, *sym;
+ bool lazy;
relalim = (const Elf_Rela *)((const char *)obj->pltrela +
obj->pltrelasize);
for (rela = obj->pltrela; rela < relalim; rela++) {
- Elf_Addr *where;
+ Elf_Addr *where, target;
where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
switch(ELF_R_TYPE(rela->r_info)) {
case R_AARCH64_JUMP_SLOT:
- *where += (Elf_Addr)obj->relocbase;
+ lazy = true;
+ if (obj->variant_pcs) {
+ sym = &obj->symtab[ELF_R_SYM(rela->r_info)];
+ /*
+ * Variant PCS functions don't follow the
+ * standard register convention. Because of
+ * this we can't use lazy relocation and
+ * need to set the target address.
+ */
+ if ((sym->st_other & STO_AARCH64_VARIANT_PCS) !=
+ 0)
+ lazy = false;
+ }
+ if (lazy) {
+ *where += (Elf_Addr)obj->relocbase;
+ } else {
+ def = find_symdef(ELF_R_SYM(rela->r_info), obj,
+ &defobj, SYMLOOK_IN_PLT | flags, NULL,
+ lockstate);
+ if (def == NULL)
+ return (-1);
+ if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC){
+ obj->gnu_ifunc = true;
+ continue;
+ }
+ target = (Elf_Addr)(defobj->relocbase +
+ def->st_value);
+ /*
+ * Ignore ld_bind_not as it requires lazy
+ * binding
+ */
+ *where = target;
+ }
break;
case R_AARCH64_TLSDESC:
reloc_tlsdesc(obj, rela, where, SYMLOOK_IN_PLT | flags,
diff --git a/libexec/rtld-elf/aarch64/rtld_machdep.h b/libexec/rtld-elf/aarch64/rtld_machdep.h
index 36e3ec3e1a4e..3cc1339fcad4 100644
--- a/libexec/rtld-elf/aarch64/rtld_machdep.h
+++ b/libexec/rtld-elf/aarch64/rtld_machdep.h
@@ -37,6 +37,9 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY \
+ bool variant_pcs : 1; /* Object has a variant pcs function */
+
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) \
({ \
@@ -45,6 +48,8 @@ struct Struct_Obj_Entry;
(const Elf_Dyn *)_dynamic_addr; \
})
+bool arch_digest_dynamic(struct Struct_Obj_Entry *obj, const Elf_Dyn *dynp);
+
bool arch_digest_note(struct Struct_Obj_Entry *obj, const Elf_Note *note);
Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target,
diff --git a/libexec/rtld-elf/amd64/rtld_machdep.h b/libexec/rtld-elf/amd64/rtld_machdep.h
index ab23567cb6e6..1797d13c847d 100644
--- a/libexec/rtld-elf/amd64/rtld_machdep.h
+++ b/libexec/rtld-elf/amd64/rtld_machdep.h
@@ -35,10 +35,15 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY
+
/* Return the address of the .dynamic section in the dynamic linker. */
Elf_Dyn *rtld_dynamic_addr(void);
#define rtld_dynamic(obj) rtld_dynamic_addr()
+/* No arch-specific dynamic tags */
+#define arch_digest_dynamic(obj, dynp) false
+
/* No architecture specific notes */
#define arch_digest_note(obj, note) false
diff --git a/libexec/rtld-elf/arm/rtld_machdep.h b/libexec/rtld-elf/arm/rtld_machdep.h
index 26f62547ae8e..f59b30028a3b 100644
--- a/libexec/rtld-elf/arm/rtld_machdep.h
+++ b/libexec/rtld-elf/arm/rtld_machdep.h
@@ -36,9 +36,14 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY
+
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) (&_DYNAMIC)
+/* No arch-specific dynamic tags */
+#define arch_digest_dynamic(obj, dynp) false
+
/* No architecture specific notes */
#define arch_digest_note(obj, note) false
diff --git a/libexec/rtld-elf/i386/rtld_machdep.h b/libexec/rtld-elf/i386/rtld_machdep.h
index 69078d56df4c..581f1dfb002d 100644
--- a/libexec/rtld-elf/i386/rtld_machdep.h
+++ b/libexec/rtld-elf/i386/rtld_machdep.h
@@ -35,10 +35,15 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY
+
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) \
((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC))
+/* No arch-specific dynamic tags */
+#define arch_digest_dynamic(obj, dynp) false
+
/* No architecture specific notes */
#define arch_digest_note(obj, note) false
diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c
index 73a1c89991e2..5618efb7f716 100644
--- a/libexec/rtld-elf/powerpc/reloc.c
+++ b/libexec/rtld-elf/powerpc/reloc.c
@@ -57,6 +57,17 @@
void _rtld_bind_secureplt_start(void);
+bool
+arch_digest_dynamic(struct Struct_Obj_Entry *obj, const Elf_Dyn *dynp)
+{
+ if (dynp->d_tag == DT_PPC_GOT) {
+ obj->gotptr = (Elf_Addr *)(obj->relocbase + dynp->d_un.d_ptr);
+ return (true);
+ }
+
+ return (false);
+}
+
/*
* Process the R_PPC_COPY relocations
*/
diff --git a/libexec/rtld-elf/powerpc/rtld_machdep.h b/libexec/rtld-elf/powerpc/rtld_machdep.h
index 2450d58490e1..ec470f238991 100644
--- a/libexec/rtld-elf/powerpc/rtld_machdep.h
+++ b/libexec/rtld-elf/powerpc/rtld_machdep.h
@@ -35,9 +35,14 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY \
+ Elf_Addr *gotptr; /* GOT pointer (secure-plt only) */
+
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) (&_DYNAMIC)
+bool arch_digest_dynamic(struct Struct_Obj_Entry *, const Elf_Dyn *);
+
/* No architecture specific notes */
#define arch_digest_note(obj, note) false
diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c
index 70928829aeda..2d06d5821d1b 100644
--- a/libexec/rtld-elf/powerpc64/reloc.c
+++ b/libexec/rtld-elf/powerpc64/reloc.c
@@ -52,6 +52,17 @@ struct funcdesc {
};
#endif
+bool
+arch_digest_dynamic(struct Struct_Obj_Entry *obj, const Elf_Dyn *dynp)
+{
+ if (dynp->d_tag == DT_PPC64_GLINK) {
+ obj->glink = (Elf_Addr)(obj->relocbase + dynp->d_un.d_ptr);
+ return (true);
+ }
+
+ return (false);
+}
+
/*
* Process the R_PPC_COPY relocations
*/
diff --git a/libexec/rtld-elf/powerpc64/rtld_machdep.h b/libexec/rtld-elf/powerpc64/rtld_machdep.h
index 63939110356b..d628e776bae9 100644
--- a/libexec/rtld-elf/powerpc64/rtld_machdep.h
+++ b/libexec/rtld-elf/powerpc64/rtld_machdep.h
@@ -35,9 +35,14 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY \
+ Elf_Addr glink; /* GLINK PLT call stub section */
+
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) (&_DYNAMIC)
+bool arch_digest_dynamic(struct Struct_Obj_Entry *, const Elf_Dyn *);
+
/* No architecture specific notes */
#define arch_digest_note(obj, note) false
diff --git a/libexec/rtld-elf/riscv/rtld_machdep.h b/libexec/rtld-elf/riscv/rtld_machdep.h
index 814840790902..fb5f5643efc6 100644
--- a/libexec/rtld-elf/riscv/rtld_machdep.h
+++ b/libexec/rtld-elf/riscv/rtld_machdep.h
@@ -42,6 +42,8 @@
struct Struct_Obj_Entry;
+#define MD_OBJ_ENTRY
+
uint64_t set_gp(struct Struct_Obj_Entry *obj);
/* Return the address of the .dynamic section in the dynamic linker. */
@@ -52,6 +54,9 @@ uint64_t set_gp(struct Struct_Obj_Entry *obj);
(const Elf_Dyn *)_dynamic_addr; \
})
+/* No arch-specific dynamic tags */
+#define arch_digest_dynamic(obj, dynp) false
+
/* No architecture specific notes */
#define arch_digest_note(obj, note) false
diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1
index a152dd444bd7..4cc5b639c89a 100644
--- a/libexec/rtld-elf/rtld.1
+++ b/libexec/rtld-elf/rtld.1
@@ -26,7 +26,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 29, 2023
+.Dd April 28, 2024
.Dt RTLD 1
.Os
.Sh NAME
@@ -352,6 +352,7 @@ The syntax of the direct invocation is
.Op Fl b Ar exe
.Op Fl d
.Op Fl f Ar fd
+.Op Fl o Ar OPT=NAME
.Op Fl p
.Op Fl u
.Op Fl v
@@ -387,6 +388,23 @@ If this option is specified,
is only used to provide the
.Va argv[0]
value to the program.
+.It Fl o Ar OPT=VALUE
+Set the
+.Ar OPT
+configuration variable to the value
+.Ar VALUE .
+The possible variable names are listed above as
+.Ev LD_
+prefixed environment variables, but here are referenced without the
+.Ev LD_
+prefix.
+A configuration variable set this way does not leak into
+the activated image's environment.
+.Pp
+The option can be repeated as many times as needed to set
+all configuration parameters.
+The parameters set using this option have priority over
+the same parameters assigned via environment.
.It Fl p
If the
.Pa image_path
@@ -400,7 +418,9 @@ to find the binary to execute.
.It Fl u
Ignore all
.Ev LD_
-environment variables that otherwise affect the dynamic
+environment variables and previous command line
+.Fl o
+options that otherwise affect the dynamic
linker behavior.
.It Fl v
Display information about this run-time linker binary, then exit.
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index a46cbe4e59c8..ef34a9d36bc3 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1520,18 +1520,6 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath,
obj->static_tls = true;
break;
-#ifdef __powerpc__
-#ifdef __powerpc64__
- case DT_PPC64_GLINK:
- obj->glink = (Elf_Addr)(obj->relocbase + dynp->d_un.d_ptr);
- break;
-#else
- case DT_PPC_GOT:
- obj->gotptr = (Elf_Addr *)(obj->relocbase + dynp->d_un.d_ptr);
- break;
-#endif
-#endif
-
case DT_FLAGS_1:
if (dynp->d_un.d_val & DF_1_NOOPEN)
obj->z_noopen = true;
@@ -1554,6 +1542,9 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath,
break;
default:
+ if (arch_digest_dynamic(obj, dynp))
+ break;
+
if (!early) {
dbg("Ignoring d_tag %ld = %#lx", (long)dynp->d_tag,
(long)dynp->d_tag);
@@ -6157,10 +6148,42 @@ parse_args(char* argv[], int argc, bool *use_pathp, int *fdp,
*fdp = fd;
seen_f = true;
break;
+ } else if (opt == 'o') {
+ struct ld_env_var_desc *l;
+ char *n, *v;
+ u_int ll;
+
+ if (j != arglen - 1) {
+ _rtld_error("Invalid options: %s", arg);
+ rtld_die();
+ }
+ i++;
+ n = argv[i];
+ v = strchr(n, '=');
+ if (v == NULL) {
+ _rtld_error("No '=' in -o parameter");
+ rtld_die();
+ }
+ for (ll = 0; ll < nitems(ld_env_vars); ll++) {
+ l = &ld_env_vars[ll];
+ if (v - n == (ptrdiff_t)strlen(l->n) &&
+ strncmp(n, l->n, v - n) == 0) {
+ l->val = v + 1;
+ break;
+ }
+ }
+ if (ll == nitems(ld_env_vars)) {
+ _rtld_error("Unknown LD_ option %s",
+ n);
+ rtld_die();
+ }
} else if (opt == 'p') {
*use_pathp = true;
} else if (opt == 'u') {
- trust = false;
+ u_int ll;
+
+ for (ll = 0; ll < nitems(ld_env_vars); ll++)
+ ld_env_vars[ll].val = NULL;
} else if (opt == 'v') {
machine[0] = '\0';
mib[0] = CTL_HW;
@@ -6240,6 +6263,7 @@ print_usage(const char *argv0)
" -b <exe> Execute <exe> instead of <binary>, arg0 is <binary>\n"
" -d Ignore lack of exec permissions for the binary\n"
" -f <FD> Execute <FD> instead of searching for <binary>\n"
+ " -o <OPT>=<VAL> Set LD_<OPT> to <VAL>, without polluting env\n"
" -p Search in PATH for named binary\n"
" -u Ignore LD_ environment variables\n"
" -v Display identification information\n"
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index 6311b3e6cc7f..9df5b4ec8f59 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -183,13 +183,6 @@ typedef struct Struct_Obj_Entry {
const Elf_Sym *symtab; /* Symbol table */
const char *strtab; /* String table */
unsigned long strsize; /* Size in bytes of string table */
-#ifdef __powerpc__
-#ifdef __powerpc64__
- Elf_Addr glink; /* GLINK PLT call stub section */
-#else
- Elf_Addr *gotptr; /* GOT pointer (secure-plt only) */
-#endif
-#endif
const Elf_Verneed *verneed; /* Required versions. */
Elf_Word verneednum; /* Number of entries in verneed table */
@@ -277,6 +270,8 @@ typedef struct Struct_Obj_Entry {
bool unholdfree : 1; /* unmap upon last unhold */
bool doomed : 1; /* Object cannot be referenced */
+ MD_OBJ_ENTRY;
+
struct link_map linkmap; /* For GDB and dlinfo() */
Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
Objlist dagmembers; /* DAG has these members (%) */
diff --git a/libexec/rtld-elf/rtld_printf.c b/libexec/rtld-elf/rtld_printf.c
index 07598c73c6d4..befac1c547b7 100644
--- a/libexec/rtld-elf/rtld_printf.c
+++ b/libexec/rtld-elf/rtld_printf.c
@@ -81,11 +81,10 @@ snprintf_func(int ch, struct snprintf_arg *const info)
}
break;
case PRINT_METHOD_WRITE:
- if (info->remain > 0) {
- *info->str++ = ch;
- info->remain--;
- } else
+ if (info->remain == 0)
printf_out(info);
+ *info->str++ = ch;
+ info->remain--;
break;
}
}
diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c
index d3d2f46ffdee..54ace29d718c 100644
--- a/libexec/tftpd/tests/functional.c
+++ b/libexec/tftpd/tests/functional.c
@@ -28,6 +28,7 @@
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <sys/wait.h>
#include <netinet/in.h>
diff --git a/libexec/tftpd/tftp-file.h b/libexec/tftpd/tftp-file.h
index 0fb7f6c1decc..c424e5cbc75b 100644
--- a/libexec/tftpd/tftp-file.h
+++ b/libexec/tftpd/tftp-file.h
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
int write_init(int fd, FILE *f, const char *mode);
size_t write_file(char *buffer, int count);
int write_close(void);
diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c
index d43e5f5505f9..50102e652d2f 100644
--- a/libexec/tftpd/tftp-io.c
+++ b/libexec/tftpd/tftp-io.c
@@ -71,13 +71,13 @@ static struct errmsg {
#define DROPPACKET(s) \
if (packetdroppercentage != 0 && \
- random()%100 < packetdroppercentage) { \
+ arc4random()%100 < packetdroppercentage) { \
tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \
return; \
}
#define DROPPACKETn(s,n) \
if (packetdroppercentage != 0 && \
- random()%100 < packetdroppercentage) { \
+ arc4random()%100 < packetdroppercentage) { \
tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \
return (n); \
}
@@ -156,10 +156,8 @@ send_error(int peer, int error)
pe->e_msg = strerror(error - 100);
tp->th_code = EUNDEF; /* set 'undef' errorcode */
}
- strcpy(tp->th_msg, pe->e_msg);
- length = strlen(pe->e_msg);
- tp->th_msg[length] = '\0';
- length += 5;
+ snprintf(tp->th_msg, MAXPKTSIZE - 4, "%s%n", pe->e_msg, &length);
+ length += 5; /* header and terminator */
if (debug & DEBUG_PACKETS)
tftp_log(LOG_DEBUG, "Sending ERROR %d: %s", error, tp->th_msg);
@@ -330,7 +328,6 @@ send_ack(int fp, uint16_t block)
DROPPACKETn("send_ack", 0);
tp = (struct tftphdr *)buf;
- size = sizeof(buf) - 2;
tp->th_opcode = htons((u_short)ACK);
tp->th_block = htons((u_short)block);
size = 4;
diff --git a/libexec/tftpd/tftp-io.h b/libexec/tftpd/tftp-io.h
index 85934e824a1a..1d6bc2bd8b5e 100644
--- a/libexec/tftpd/tftp-io.h
+++ b/libexec/tftpd/tftp-io.h
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#define RP_NONE 0
#define RP_RECVFROM -1
#define RP_TOOSMALL -2
diff --git a/libexec/tftpd/tftp-options.h b/libexec/tftpd/tftp-options.h
index c68db53de4e2..f1b0a5cfaf32 100644
--- a/libexec/tftpd/tftp-options.h
+++ b/libexec/tftpd/tftp-options.h
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
/*
* Options
*/
diff --git a/libexec/tftpd/tftp-transfer.h b/libexec/tftpd/tftp-transfer.h
index 48431ebbc863..449f29c246e0 100644
--- a/libexec/tftpd/tftp-transfer.h
+++ b/libexec/tftpd/tftp-transfer.h
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
int tftp_send(int peer, uint16_t *block, struct tftp_stats *tp);
int tftp_receive(int peer, uint16_t *block, struct tftp_stats *tp,
struct tftphdr *firstblock, size_t fb_size);
diff --git a/libexec/tftpd/tftp-utils.c b/libexec/tftpd/tftp-utils.c
index b309a94f7653..8ce7c09c9992 100644
--- a/libexec/tftpd/tftp-utils.c
+++ b/libexec/tftpd/tftp-utils.c
@@ -204,7 +204,7 @@ struct debugs debugs[] = {
{ DEBUG_ACCESS, "access", "TCPd access debugging" },
{ DEBUG_NONE, NULL, "No debugging" },
};
-int packetdroppercentage = 0;
+unsigned int packetdroppercentage = 0;
int
debug_find(char *s)
diff --git a/libexec/tftpd/tftp-utils.h b/libexec/tftpd/tftp-utils.h
index 763b3b493c7e..276dedcf74cd 100644
--- a/libexec/tftpd/tftp-utils.h
+++ b/libexec/tftpd/tftp-utils.h
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
/*
*/
#define TIMEOUT 5
@@ -100,7 +99,7 @@ struct debugs {
};
extern int debug;
extern struct debugs debugs[];
-extern int packetdroppercentage;
+extern unsigned int packetdroppercentage;
int debug_find(char *s);
int debug_finds(char *s);
const char *debug_show(int d);
diff --git a/libexec/tftpd/tftpd.8 b/libexec/tftpd/tftpd.8
index d71da9f1f9ea..558f7bdf809a 100644
--- a/libexec/tftpd/tftpd.8
+++ b/libexec/tftpd/tftpd.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 20, 2023
+.Dd May 8, 2024
.Dt TFTPD 8
.Os
.Sh NAME
@@ -33,11 +33,11 @@
.Nd Internet Trivial File Transfer Protocol server
.Sh SYNOPSIS
.Nm tftpd
-.Op Fl cdClnow
+.Op Fl CcdlnoSw
.Op Fl F Ar strftime-format
.Op Fl s Ar directory
-.Op Fl u Ar user
.Op Fl U Ar umask
+.Op Fl u Ar user
.Op Ar directory ...
.Sh DESCRIPTION
The
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index 13f53024b147..3f67ad2920cf 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -160,7 +160,7 @@ main(int argc, char *argv[])
options_extra_enabled = 0;
break;
case 'p':
- packetdroppercentage = atoi(optarg);
+ packetdroppercentage = (unsigned int)atoi(optarg);
tftp_log(LOG_INFO,
"Randomly dropping %d out of 100 packets",
packetdroppercentage);
@@ -451,9 +451,9 @@ static char *
parse_header(int peer, char *recvbuffer, size_t size,
char **filename, char **mode)
{
- char *cp;
- int i;
struct formats *pf;
+ char *cp;
+ size_t i;
*mode = NULL;
cp = recvbuffer;
@@ -470,12 +470,11 @@ parse_header(int peer, char *recvbuffer, size_t size,
i = get_field(peer, cp, size);
*mode = cp;
- cp += i;
/* Find the file transfer mode */
- for (cp = *mode; *cp; cp++)
- if (isupper(*cp))
- *cp = tolower(*cp);
+ for (; *cp; cp++)
+ if (isupper((unsigned char)*cp))
+ *cp = tolower((unsigned char)*cp);
for (pf = formats; pf->f_mode; pf++)
if (strcmp(pf->f_mode, *mode) == 0)
break;
@@ -612,12 +611,20 @@ tftp_rrq(int peer, char *recvbuffer, size_t size)
static int
find_next_name(char *filename, int *fd)
{
- int i;
+ /*
+ * GCC "knows" that we might write all of yyyymmdd plus the static
+ * elemenents in the format into into newname and thus complains
+ * unless we reduce the size. This array is still too big, but since
+ * the format is user supplied, it's not clear what a better limit
+ * value would be and this is sufficent to silence the warnings.
+ */
+ static const int suffix_len = strlen("..00");
+ char yyyymmdd[MAXPATHLEN - suffix_len];
+ char newname[MAXPATHLEN];
+ int i, ret;
time_t tval;
- size_t len;
+ size_t len, namelen;
struct tm lt;
- char yyyymmdd[MAXPATHLEN];
- char newname[MAXPATHLEN];
/* Create the YYYYMMDD part of the filename */
time(&tval);
@@ -625,26 +632,33 @@ find_next_name(char *filename, int *fd)
len = strftime(yyyymmdd, sizeof(yyyymmdd), newfile_format, &lt);
if (len == 0) {
syslog(LOG_WARNING,
- "Filename suffix too long (%d characters maximum)",
- MAXPATHLEN);
+ "Filename suffix too long (%zu characters maximum)",
+ sizeof(yyyymmdd) - 1);
return (EACCESS);
}
/* Make sure the new filename is not too long */
- if (strlen(filename) > MAXPATHLEN - len - 5) {
+ namelen = strlen(filename);
+ if (namelen >= sizeof(newname) - len - suffix_len) {
syslog(LOG_WARNING,
- "Filename too long (%zd characters, %zd maximum)",
- strlen(filename), MAXPATHLEN - len - 5);
+ "Filename too long (%zu characters, %zu maximum)",
+ namelen,
+ sizeof(newname) - len - suffix_len - 1);
return (EACCESS);
}
/* Find the first file which doesn't exist */
for (i = 0; i < 100; i++) {
- sprintf(newname, "%s.%s.%02d", filename, yyyymmdd, i);
- *fd = open(newname,
- O_WRONLY | O_CREAT | O_EXCL,
- S_IRUSR | S_IWUSR | S_IRGRP |
- S_IWGRP | S_IROTH | S_IWOTH);
+ ret = snprintf(newname, sizeof(newname), "%s.%s.%02d",
+ filename, yyyymmdd, i);
+ /*
+ * Size checked above so this can't happen, we'd use a
+ * (void) cast, but gcc intentionally ignores that if
+ * snprintf has __attribute__((warn_unused_result)).
+ */
+ if (ret < 0 || (size_t)ret >= sizeof(newname))
+ __unreachable();
+ *fd = open(newname, O_WRONLY | O_CREAT | O_EXCL, 0666);
if (*fd > 0)
return 0;
}
@@ -687,10 +701,11 @@ validate_access(int peer, char **filep, int mode)
* it's a /.
*/
for (dirp = dirs; dirp->name != NULL; dirp++) {
- if (dirp->len == 1 ||
- (!strncmp(filename, dirp->name, dirp->len) &&
- filename[dirp->len] == '/'))
- break;
+ if (dirp->len == 1)
+ break;
+ if (strncmp(filename, dirp->name, dirp->len) == 0 &&
+ filename[dirp->len] == '/')
+ break;
}
/* If directory list is empty, allow access to any file */
if (dirp->name == NULL && dirp != dirs)
diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index cbc5cd768e28..591fd85b29ea 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -193,6 +193,16 @@ vm-images-stage:
cd ${VM_DIR}/Latest && \
ln -s ../${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz \
${OSRELEASE}.${VMFORMAT}.xz
+. for FS in ${VMFSLIST}
+ cd ${RELEASEDIR}/vmimages && \
+ mv ${OSRELEASE}-${FS}.${VMFORMAT}.xz \
+ ${OSRELEASE}-${FS}-${SNAP_SUFFIX}.${VMFORMAT}.xz
+ cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${FS}-${SNAP_SUFFIX}.${VMFORMAT}.xz \
+ ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${FS}-${SNAP_SUFFIX}.${VMFORMAT}.xz
+ cd ${VM_DIR}/Latest && \
+ ln -s ../${BUILDDATE}/${OSRELEASE}-${FS}-${SNAP_SUFFIX}.${VMFORMAT}.xz \
+ ${OSRELEASE}-${FS}.${VMFORMAT}.xz
+. endfor
. endfor
cd ${RELEASEDIR}/vmimages && rm -f CHECKSUM.*
. for CHECKSUM in ${CHECKSUM_FILES}
@@ -212,6 +222,10 @@ vm-images-stage:
. for VMFORMAT in ${VMFORMATS}
cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}.${VMFORMAT}.xz \
${VM_DIR}/Latest/${OSRELEASE}.${VMFORMAT}.xz
+. for FS in ${VMFSLIST}
+ cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${FS}.${VMFORMAT}.xz \
+ ${VM_DIR}/Latest/${OSRELEASE}-${FS}.${VMFORMAT}.xz
+. endfor
. endfor
. for CHECKSUM in ${CHECKSUM_FILES}
cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM} \
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 2565a13ef671..548b4c1cca3b 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -157,12 +157,13 @@ CLEANFILES+= ${VMBASE}.${FS}.${FORMAT}
vm-base: vm-image
-vm-image:
+vm-image: ${QEMUTGT}
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
. for FORMAT in ${VMFORMATS}
. for FS in ${VMFSLIST}
mkdir -p ${.OBJDIR}/${.TARGET}-${FORMAT}-${FS}
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \
+ QEMUSTATIC=${QEMUSTATIC} \
${.CURDIR}/scripts/mk-vmimage.sh \
-C ${.CURDIR}/tools/vmimage.subr \
-d ${.OBJDIR}/${.TARGET}-${FORMAT}-${FS} -F ${FS} \
@@ -222,14 +223,16 @@ vm-install:
${DESTDIR}/vmimages/CHECKSUM.SHA256
.endif
-vm-release:
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
- ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS}
+vm-release: ${VMTARGETS}
+.else
+vm-release:
.endif
-cloudware-release:
.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
- ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS}
+cloudware-release: ${CLOUDTARGETS}
+.else
+cloudware-release:
.endif
.include "${.CURDIR}/Makefile.azure"
diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package
index 2c0aa259737d..87585f7eac38 100644
--- a/release/packages/Makefile.package
+++ b/release/packages/Makefile.package
@@ -11,6 +11,8 @@ apm_COMMENT= APM Utilities
apm_DESC= APM Utilities
at_COMMENT= AT Utilities
at_DESC= AT Utilities
+audit_COMMENT= OpenBSM auditing utilities
+audit_DESC= OpenBSM auditing utilities
autofs_COMMENT= Autofs Utilities
autofs_DESC= Autofs Utilities
bhyve_COMMENT= Bhyve Utilities
@@ -118,6 +120,8 @@ newsyslog_COMMENT= Newsyslog Utility
newsyslog_DESC= Newsyslog Utility
nfs_COMMENT= NFS Utilities
nfs_DESC= NFS Utilities
+ntp_COMMENT= Network Time Protocol server and client
+ntp_DESC= Network Time Protocol server and client
nuageinit_COMMENT= CloudInit support scripts
nuageinit_DESC= CloudInit support scripts
nvme-tools_COMMENT= NVME Utilities
diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh
index c7147a97a868..27adddad96c0 100755
--- a/release/packages/generate-ucl.sh
+++ b/release/packages/generate-ucl.sh
@@ -40,6 +40,9 @@ main() {
clang)
pkgdeps="lld libcompiler_rt-dev"
;;
+ periodic)
+ pkgdeps="cron"
+ ;;
# -dev packages that have no corresponding non-dev package
# as a dependency.
@@ -153,7 +156,7 @@ EOF
PKG_WWW "${PKG_WWW}" \
PKG_MAINTAINER "${PKG_MAINTAINER}" \
UCLFILES "${srctree}/release/packages/" \
- ${uclsource} ${uclfile}
+ ${uclfile} ${uclfile}
return 0
}
diff --git a/release/scripts/mk-vmimage.sh b/release/scripts/mk-vmimage.sh
index ca6a359affbd..dfd91f43140d 100755
--- a/release/scripts/mk-vmimage.sh
+++ b/release/scripts/mk-vmimage.sh
@@ -97,13 +97,14 @@ main() {
vm_create_base
vm_install_base
+ vm_emulation_setup
vm_extra_install_base
vm_extra_install_packages
vm_extra_install_ports
vm_extra_enable_services
vm_extra_pre_umount
vm_extra_pkg_rmcache
- cleanup
+ vm_emulation_cleanup
vm_copy_base
vm_create_disk || return 0
vm_extra_create_disk
diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh
index 551876eca8c6..a887173aa858 100755
--- a/release/scripts/pkg-stage.sh
+++ b/release/scripts/pkg-stage.sh
@@ -12,29 +12,28 @@ export ROOTDIR="$PWD/dvd"
export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}"
export PORTSDIR="${PORTSDIR:-/usr/ports}"
-_DVD_PACKAGES="archivers/unzip
-devel/git
-emulators/linux_base-c7
+_DVD_PACKAGES="devel/git@lite
graphics/drm-kmod
graphics/drm-510-kmod
graphics/drm-515-kmod
misc/freebsd-doc-all
net/mpd5
net/rsync
+net/wifi-firmware-rtw88-kmod
ports-mgmt/pkg
-ports-mgmt/portmaster
shells/bash
shells/zsh
security/sudo
sysutils/screen
+sysutils/seatd
sysutils/tmux
www/firefox
www/links
-x11-drivers/xf86-video-vmware
x11/gnome
x11/kde5
x11/sddm
-x11/xorg"
+x11/xorg
+x11-wm/sway"
# If NOPORTS is set for the release, do not attempt to build pkg(8).
if [ ! -f ${PORTSDIR}/Makefile ]; then
@@ -61,10 +60,10 @@ fi
# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
# final list.
for _P in ${_DVD_PACKAGES}; do
- if [ -d "${PORTSDIR}/${_P}" ]; then
+ if [ -d "${PORTSDIR}/${_P%%@*}" ]; then
DVD_PACKAGES="${DVD_PACKAGES} ${_P}"
else
- echo "*** Skipping nonexistent port: ${_P}"
+ echo "*** Skipping nonexistent port: ${_P%%@*}"
fi
done
diff --git a/release/tools/azure.conf b/release/tools/azure.conf
index b6526f21e474..9da2b19de694 100644
--- a/release/tools/azure.conf
+++ b/release/tools/azure.conf
@@ -53,7 +53,5 @@ EOF
touch ${DESTDIR}/firstboot
- rm -f ${DESTDIR}/etc/resolv.conf
-
return 0
}
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index f8bfe0911759..989e8a05a318 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -102,10 +102,5 @@ EOF
# The first time the AMI boots, run "first boot" scripts.
touch ${DESTDIR}/firstboot
- if ! [ -z "${QEMUSTATIC}" ]; then
- rm -f ${DESTDIR}/${EMULATOR}
- fi
- rm -f ${DESTDIR}/etc/resolv.conf
-
return 0
}
diff --git a/release/tools/gce.conf b/release/tools/gce.conf
index aad4a74d2e39..5ad83bcded53 100644
--- a/release/tools/gce.conf
+++ b/release/tools/gce.conf
@@ -118,7 +118,15 @@ EOF
touch ${DESTDIR}/firstboot
- rm -f ${DESTDIR}/etc/resolv.conf
+ return 0
+}
+# Do everything except deleting resolv.conf since we construct our own
+# Googlized resolv.conf file in vm_extra_install_base.
+vm_emulation_cleanup() {
+ if ! [ -z "${QEMUSTATIC}" ]; then
+ rm -f ${DESTDIR}/${EMULATOR}
+ fi
+ umount_loop ${DESTDIR}/dev
return 0
}
diff --git a/release/tools/oci.conf b/release/tools/oci.conf
index c57a7683a500..a4fe54ad3031 100644
--- a/release/tools/oci.conf
+++ b/release/tools/oci.conf
@@ -90,10 +90,5 @@ EOF
touch ${DESTDIR}/firstboot
- if ! [ -z "${QEMUSTATIC}" ]; then
- rm -f ${DESTDIR}/${EMULATOR}
- fi
- rm -f ${DESTDIR}/etc/resolv.conf
-
return 0
}
diff --git a/release/tools/openstack.conf b/release/tools/openstack.conf
index 4c905fbae4ba..05d2d13bbb39 100644
--- a/release/tools/openstack.conf
+++ b/release/tools/openstack.conf
@@ -35,8 +35,6 @@ vm_extra_pre_umount() {
echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> \
${DESTDIR}/usr/local/etc/sudoers.d/cloud-init
- rm -f ${DESTDIR}/etc/resolv.conf
-
# The console is not interactive, so we might as well boot quickly.
echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf
echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf
diff --git a/release/tools/vagrant-virtualbox.conf b/release/tools/vagrant-virtualbox.conf
index 4dd7ca8953ad..9e0e430bbc88 100644
--- a/release/tools/vagrant-virtualbox.conf
+++ b/release/tools/vagrant-virtualbox.conf
@@ -14,5 +14,4 @@ vm_extra_pre_umount () {
# Setup the Vagrant common items
vagrant_common
- rm -f ${DESTDIR}/etc/resolv.conf
}
diff --git a/release/tools/vagrant-vmware.conf b/release/tools/vagrant-vmware.conf
index 52ff7f1aac1a..fff929829222 100644
--- a/release/tools/vagrant-vmware.conf
+++ b/release/tools/vagrant-vmware.conf
@@ -18,5 +18,4 @@ vm_extra_pre_umount () {
# Setup the Vagrant common items
vagrant_common
- rm -f ${DESTDIR}/etc/resolv.conf
}
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 93658b9a03da..9a60be57acf3 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -80,8 +80,14 @@ vm_install_base() {
echo "zfs_enable=\"YES\"" >> ${DESTDIR}/etc/rc.conf
echo "zpool_reguid=\"zroot\"" >> ${DESTDIR}/etc/rc.conf
echo "zpool_upgrade=\"zroot\"" >> ${DESTDIR}/etc/rc.conf
+ echo "kern.geom.label.disk_ident.enable=0" >> ${DESTDIR}/boot/loader.conf
+ echo "zfs_load=YES" >> ${DESTDIR}/boot/loader.conf
fi
+ return 0
+}
+
+vm_emulation_setup() {
if ! [ -z "${QEMUSTATIC}" ]; then
export EMULATOR=/qemu
cp ${QEMUSTATIC} ${DESTDIR}/${EMULATOR}
@@ -91,15 +97,8 @@ vm_install_base() {
mount -t devfs devfs ${DESTDIR}/dev
chroot ${DESTDIR} ${EMULATOR} /usr/bin/newaliases
chroot ${DESTDIR} ${EMULATOR} /bin/sh /etc/rc.d/ldconfig forcestart
- umount_loop ${DESTDIR}/dev
-
cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf
- if [ "${VMFS}" = zfs ]; then
- echo "kern.geom.label.disk_ident.enable=0" >> ${DESTDIR}/boot/loader.conf
- echo "zfs_load=YES" >> ${DESTDIR}/boot/loader.conf
- fi
-
return 0
}
@@ -133,15 +132,12 @@ vm_extra_install_packages() {
if [ -z "${VM_EXTRA_PACKAGES}" ]; then
return 0
fi
- mkdir -p ${DESTDIR}/dev
- mount -t devfs devfs ${DESTDIR}/dev
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
/usr/sbin/pkg bootstrap -y
for p in ${VM_EXTRA_PACKAGES}; do
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
/usr/sbin/pkg install -y ${p}
done
- umount_loop ${DESTDIR}/dev
return 0
}
@@ -156,13 +152,16 @@ vm_extra_install_ports() {
vm_extra_pre_umount() {
# Prototype. When overridden, performs additional tasks within the
# virtual machine environment prior to unmounting the filesystem.
- # Note: When overriding this function, removing resolv.conf in the
- # disk image must be included.
+ return 0
+}
+
+vm_emulation_cleanup() {
if ! [ -z "${QEMUSTATIC}" ]; then
rm -f ${DESTDIR}/${EMULATOR}
fi
rm -f ${DESTDIR}/etc/resolv.conf
+ umount_loop ${DESTDIR}/dev
return 0
}
diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index 6dceea6f5077..c3604c6e22ad 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -92,7 +92,7 @@ CRUNCH_SRCDIRS+= sbin
CRUNCH_PROGS_sbin= \
camcontrol clri devfs dmesg dump \
dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \
- fsirand gbde geom ifconfig init \
+ fsirand geom ifconfig init \
kldconfig kldload kldstat kldunload ldconfig \
md5 mdconfig mdmfs mknod mount mount_cd9660 \
mount_msdosfs mount_nfs mount_nullfs \
@@ -144,6 +144,7 @@ CRUNCH_PROGS_usr.sbin+= zdb
# CRUNCH_PROGS+= devd
CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma
+CRUNCH_LIBS_camcontrol+= ${LIBNVMF}
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -lpthread -luutil -lumem -ltpool -lspl -lrt
CRUNCH_LIBS_zfs+= ${LIBBE} \
diff --git a/sbin/Makefile b/sbin/Makefile
index 200dc9da11c8..303e29e9e124 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -22,7 +22,6 @@ SUBDIR=adjkerntz \
fsck_msdosfs \
fsdb \
fsirand \
- gbde \
geom \
ggate \
growfs \
diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile
index b04eb5614c62..64703f656a89 100644
--- a/sbin/camcontrol/Makefile
+++ b/sbin/camcontrol/Makefile
@@ -24,7 +24,8 @@ SRCS+= nvme_util.c
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
.endif
-LIBADD= cam sbuf util
+CFLAGS+= -I${SRCTOP}/lib/libnvmf
+LIBADD= cam nvmf sbuf util
MAN= camcontrol.8
.include <bsd.prog.mk>
diff --git a/sbin/camcontrol/attrib.c b/sbin/camcontrol/attrib.c
index 7e89dbc3d48e..4cf9832756b4 100644
--- a/sbin/camcontrol/attrib.c
+++ b/sbin/camcontrol/attrib.c
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#include <sys/ioctl.h>
#include <sys/stdint.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/endian.h>
#include <sys/sbuf.h>
#include <sys/queue.h>
@@ -265,7 +265,7 @@ scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num = 0;
status = scsi_get_nv(elem_type_map,
- sizeof(elem_type_map) / sizeof(elem_type_map[0]),
+ nitems(elem_type_map),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
element_type = elem_type_map[entry_num].value;
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index db26b45ac508..3aa91eb00ecf 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -44,6 +44,7 @@
#include <fcntl.h>
#include <ctype.h>
#include <err.h>
+#include <libnvmf.h>
#include <libutil.h>
#include <limits.h>
#include <inttypes.h>
@@ -5378,6 +5379,26 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts)
sata->caps);
}
}
+ if (cts->transport == XPORT_NVME) {
+ struct ccb_trans_settings_nvme *nvme =
+ &cts->xport_specific.nvme;
+
+ if (nvme->valid & CTS_NVME_VALID_LINK) {
+ fprintf(stdout, "%sPCIe lanes: %d (%d max)\n", pathstr,
+ nvme->lanes, nvme->max_lanes);
+ fprintf(stdout, "%sPCIe Generation: %d (%d max)\n", pathstr,
+ nvme->speed, nvme->max_speed);
+ }
+ }
+ if (cts->transport == XPORT_NVMF) {
+ struct ccb_trans_settings_nvmf *nvmf =
+ &cts->xport_specific.nvmf;
+
+ if (nvmf->valid & CTS_NVMF_VALID_TRTYPE) {
+ fprintf(stdout, "%sTransport: %s\n", pathstr,
+ nvmf_transport_type(nvmf->trtype));
+ }
+ }
if (cts->protocol == PROTO_ATA) {
struct ccb_trans_settings_ata *ata=
&cts->proto_specific.ata;
@@ -5399,19 +5420,13 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts)
}
}
if (cts->protocol == PROTO_NVME) {
- struct ccb_trans_settings_nvme *nvmex =
- &cts->xport_specific.nvme;
+ struct ccb_trans_settings_nvme *nvme =
+ &cts->proto_specific.nvme;
- if (nvmex->valid & CTS_NVME_VALID_SPEC) {
+ if (nvme->valid & CTS_NVME_VALID_SPEC) {
fprintf(stdout, "%sNVMe Spec: %d.%d\n", pathstr,
- NVME_MAJOR(nvmex->spec),
- NVME_MINOR(nvmex->spec));
- }
- if (nvmex->valid & CTS_NVME_VALID_LINK) {
- fprintf(stdout, "%sPCIe lanes: %d (%d max)\n", pathstr,
- nvmex->lanes, nvmex->max_lanes);
- fprintf(stdout, "%sPCIe Generation: %d (%d max)\n", pathstr,
- nvmex->speed, nvmex->max_speed);
+ NVME_MAJOR(nvme->spec),
+ NVME_MINOR(nvme->spec));
}
}
}
diff --git a/sbin/camcontrol/epc.c b/sbin/camcontrol/epc.c
index 206b34594f4f..4273ad19047c 100644
--- a/sbin/camcontrol/epc.c
+++ b/sbin/camcontrol/epc.c
@@ -33,10 +33,9 @@
* ATA Extended Power Conditions (EPC) support
*/
-#include <sys/cdefs.h>
+#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/stdint.h>
-#include <sys/types.h>
#include <sys/endian.h>
#include <sys/sbuf.h>
#include <sys/queue.h>
@@ -151,7 +150,7 @@ epc_print_pcl_desc(struct ata_power_cond_log_desc *desc, const char *prefix)
max_chars = 75;
num_printed = printf("%sFlags: ", prefix);
- for (i = 0; i < (sizeof(epc_flags) / sizeof(epc_flags[0])); i++) {
+ for (i = 0; i < nitems(epc_flags); i++) {
if ((desc->flags & epc_flags[i].value) == 0)
continue;
if (first == 0) {
@@ -466,7 +465,7 @@ check_power_mode:
}
mode_name = scsi_nv_to_str(epc_power_cond_map,
- sizeof(epc_power_cond_map) / sizeof(epc_power_cond_map[0]), count);
+ nitems(epc_power_cond_map), count);
printf("Current power state: ");
/* Note: ident can be null in power_only mode */
if ((ident == NULL)
@@ -638,7 +637,7 @@ epc(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num;
status = scsi_get_nv(epc_cmd_map,
- (sizeof(epc_cmd_map) / sizeof(epc_cmd_map[0])),
+ nitems(epc_cmd_map),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
action = epc_cmd_map[entry_num].value;
@@ -715,7 +714,7 @@ epc(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num;
status = scsi_get_nv(epc_ps_map,
- (sizeof(epc_ps_map) / sizeof(epc_ps_map[0])),
+ nitems(epc_ps_map),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
power_src = epc_ps_map[entry_num].value;
diff --git a/sbin/camcontrol/zone.c b/sbin/camcontrol/zone.c
index d651ca0e2acf..dc87cd9a9570 100644
--- a/sbin/camcontrol/zone.c
+++ b/sbin/camcontrol/zone.c
@@ -34,10 +34,9 @@
* This is an implementation of the SCSI ZBC and ATA ZAC specs.
*/
-#include <sys/cdefs.h>
+#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/stdint.h>
-#include <sys/types.h>
#include <sys/endian.h>
#include <sys/sbuf.h>
#include <sys/queue.h>
@@ -353,7 +352,7 @@ zone(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num;
status = scsi_get_nv(zone_cmd_map,
- (sizeof(zone_cmd_map) / sizeof(zone_cmd_map[0])),
+ nitems(zone_cmd_map),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
action = zone_cmd_map[entry_num].value;
@@ -387,7 +386,7 @@ zone(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num;
status = scsi_get_nv(zone_rep_opts,
- (sizeof(zone_rep_opts) /sizeof(zone_rep_opts[0])),
+ nitems(zone_rep_opts),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
rep_option = zone_rep_opts[entry_num].value;
diff --git a/sbin/devfs/devfs.8 b/sbin/devfs/devfs.8
index 598f2303a605..bbe4825b8bb2 100644
--- a/sbin/devfs/devfs.8
+++ b/sbin/devfs/devfs.8
@@ -38,7 +38,7 @@
The
.Nm
utility provides an interface to manipulate properties of
-.Xr devfs 5
+.Xr devfs 4
mounts.
.Pp
The rules, by default as configured by
@@ -64,7 +64,7 @@ The following flags are common to all keywords:
Operate on
.Ar mount-point ,
which is expected to be a
-.Xr devfs 5
+.Xr devfs 4
mount.
If this option is not specified,
.Nm
@@ -73,7 +73,7 @@ operates on
.El
.Ss Rule Subsystem
The
-.Xr devfs 5
+.Xr devfs 4
rule subsystem provides a way for the administrator of a system to control
the attributes of DEVFS nodes.
.\" XXX devfs node? entry? what?
@@ -372,7 +372,7 @@ this feature can be used to copy rulesets:
.Xr chmod 1 ,
.Xr jail 2 ,
.Xr glob 3 ,
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr devfs.conf 5 ,
.Xr devfs.rules 5 ,
.Xr chown 8 ,
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index 399b5c1ecf6c..a80c5bd8f23e 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -199,7 +199,6 @@ struct client_state {
struct interface_info {
struct interface_info *next;
struct hardware hw_address;
- struct in_addr primary_address;
char name[IFNAMSIZ];
int rfdesc;
int wfdesc;
diff --git a/sbin/fsck_ffs/fsck_ffs.8 b/sbin/fsck_ffs/fsck_ffs.8
index 1eb9ebeb3b9b..8df5e684b963 100644
--- a/sbin/fsck_ffs/fsck_ffs.8
+++ b/sbin/fsck_ffs/fsck_ffs.8
@@ -421,9 +421,9 @@ are fully enumerated and explained in Appendix A of
.%T "Fsck \- The UNIX File System Check Program"
.Re
.Sh SEE ALSO
+.Xr ffs 4 ,
.Xr fs 5 ,
.Xr fstab 5 ,
-.Xr ffs 7 ,
.Xr fsck 8 ,
.Xr fsdb 8 ,
.Xr newfs 8 ,
diff --git a/sbin/gbde/Makefile b/sbin/gbde/Makefile
deleted file mode 100644
index 8c84781fc4ed..000000000000
--- a/sbin/gbde/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-
-PACKAGE=geom
-PROG= gbde
-SRCS= gbde.c template.c
-SRCS+= rijndael-alg-fst.c
-SRCS+= rijndael-api-fst.c
-SRCS+= g_bde_lock.c
-
-# rijndael-fst.c does evil casting things which can results in warnings,
-# the test-vectors check out however, so it works right.
-NO_WCAST_ALIGN=
-NO_WMISSING_VARIABLE_DECLARATIONS=
-
-CFLAGS+= -I${SRCTOP}/sys
-.PATH: ${SRCTOP}/sys/geom/bde \
- ${SRCTOP}/sys/crypto/rijndael \
- ${SRCTOP}/sys/crypto/sha2
-
-CLEANFILES+= template.c
-
-MAN= gbde.8
-LIBADD= md util geom
-
-template.c: template.txt
- file2c 'const char template[] = {' ',0};' \
- < ${.CURDIR}/template.txt > template.c
-
-test: ${PROG}
- sh ${.CURDIR}/test.sh ${.CURDIR}
-
-.include <bsd.prog.mk>
diff --git a/sbin/gbde/Makefile.depend b/sbin/gbde/Makefile.depend
deleted file mode 100644
index 2edf986e595a..000000000000
--- a/sbin/gbde/Makefile.depend
+++ /dev/null
@@ -1,18 +0,0 @@
-# Autogenerated - do NOT edit!
-
-DIRDEPS = \
- include \
- include/xlocale \
- lib/${CSU_DIR} \
- lib/libc \
- lib/libcompiler_rt \
- lib/libgeom \
- lib/libmd \
- lib/libutil \
-
-
-.include <dirdeps.mk>
-
-.if ${DEP_RELDIR} == ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/sbin/gbde/gbde.8 b/sbin/gbde/gbde.8
deleted file mode 100644
index 1f3d41017307..000000000000
--- a/sbin/gbde/gbde.8
+++ /dev/null
@@ -1,271 +0,0 @@
-.\"
-.\" Copyright (c) 2002 Poul-Henning Kamp
-.\" Copyright (c) 2002 Networks Associates Technology, Inc.
-.\" All rights reserved.
-.\"
-.\" This software was developed for the FreeBSD Project by Poul-Henning Kamp
-.\" and NAI Labs, the Security Research Division of Network Associates, Inc.
-.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
-.\" DARPA CHATS research program.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd October 3, 2016
-.Dt GBDE 8
-.Os
-.Sh NAME
-.Nm gbde
-.Nd operation and management utility for Geom Based Disk Encryption
-.Sh SYNOPSIS
-.Nm
-.Cm attach
-.Ar destination
-.Op Fl k Ar keyfile
-.Op Fl l Ar lockfile
-.Op Fl p Ar pass-phrase
-.Nm
-.Cm detach
-.Ar destination
-.Nm
-.Cm init
-.Ar destination
-.Op Fl i
-.Op Fl f Ar filename
-.Op Fl K Ar new-keyfile
-.Op Fl L Ar new-lockfile
-.Op Fl P Ar new-pass-phrase
-.Nm
-.Cm setkey
-.Ar destination
-.Op Fl n Ar key
-.Op Fl k Ar keyfile
-.Op Fl l Ar lockfile
-.Op Fl p Ar pass-phrase
-.Op Fl K Ar new-keyfile
-.Op Fl L Ar new-lockfile
-.Op Fl P Ar new-pass-phrase
-.Nm
-.Cm nuke
-.Ar destination
-.Op Fl n Ar key
-.Op Fl k Ar keyfile
-.Op Fl l Ar lockfile
-.Op Fl p Ar pass-phrase
-.Nm
-.Cm destroy
-.Ar destination
-.Op Fl k Ar keyfile
-.Op Fl l Ar lockfile
-.Op Fl p Ar pass-phrase
-.Sh DESCRIPTION
-.Bf -symbolic
-NOTICE:
-Please be aware that this code has not yet received much review
-and analysis by qualified cryptographers and therefore should be considered
-a slightly suspect experimental facility.
-.Pp
-We cannot at this point guarantee that the on-disk format will not change
-in response to reviews or bug-fixes, so potential users are advised to
-be prepared that
-.Xr dump 8 Ns / Ns
-.Xr restore 8
-based migrations may be called for in the future.
-.Ef
-.Pp
-The
-.Nm
-utility is the only official operation and management interface for the
-.Xr gbde 4
-.Tn GEOM
-based disk encryption kernel facility.
-The interaction between the
-.Nm
-utility and the kernel part is not a published interface.
-.Pp
-The operational aspect consists of two subcommands:
-one to open and attach
-a device to the in-kernel cryptographic
-.Nm
-module
-.Pq Cm attach ,
-and one to close and detach a device
-.Pq Cm detach .
-.Pp
-The management part allows initialization of the master key and lock sectors
-on a device
-.Pq Cm init ,
-initialization and replacement of pass-phrases
-.Pq Cm setkey ,
-and key invalidation
-.Pq Cm nuke
-and blackening
-.Pq Cm destroy
-functions.
-.Pp
-The
-.Fl l Ar lockfile
-argument is used to supply the lock selector data.
-If no
-.Fl l
-option is specified, the first sector is used for this purpose.
-.Pp
-The
-.Fl L Ar new-lockfile
-argument
-specifies the lock selector file for the key
-initialized with the
-.Cm init
-subcommand
-or modified with the
-.Cm setkey
-subcommand.
-.Pp
-The
-.Fl n Ar key
-argument can be used to specify to which of the four keys
-the operation applies.
-A value of 1 to 4 selects the specified key, a value of 0 (the default)
-means
-.Dq "this key"
-(i.e., the key used to gain access to the device)
-and a value of \-1 means
-.Dq "all keys" .
-.Pp
-The
-.Fl f Ar filename
-specifies an optional parameter file for use under initialization.
-.Pp
-Alternatively, the
-.Fl i
-option toggles an interactive mode where a template file with descriptions
-of the parameters can be interactively edited.
-.Pp
-The
-.Fl p Ar pass-phrase
-argument
-specifies the pass-phrase used for opening the device.
-If not specified, the controlling terminal will be used to prompt the user
-for the pass-phrase.
-Be aware that using this option may expose the pass-phrase to other
-users who happen to run
-.Xr ps 1
-or similar while the command is running.
-.Pp
-The
-.Fl P Ar new-pass-phrase
-argument
-can be used to specify the new pass-phrase to the
-.Cm init
-and
-.Cm setkey
-subcommands.
-If not specified, the user is prompted for the new pass-phrase on the
-controlling terminal.
-Be aware that using this option may expose the pass-phrase to other
-users who happen to run
-.Xr ps 1
-or similar while the command is running.
-.Pp
-The
-.Fl k Ar keyfile
-argument specifies a key file to be used in combination with the
-pass-phrase (whether the pass-phrase is specified on the command line
-or entered from the terminal) for opening the device.
-The device will only be opened if the contents of the key file and the
-pass-phrase are both correct.
-.Pp
-The
-.Fl K Ar new-keyfile
-argument can be used to specify a new key file to the
-.Cm init
-and
-.Cm setkey
-subcommands.
-If not specified, no key file will be used (even if one was previously
-used).
-.Sh EXAMPLES
-To initialize a device, using default parameters:
-.Pp
-.Dl "gbde init /dev/ada0s1f -L /etc/ada0s1f.lock"
-.Pp
-To attach an encrypted device:
-.Pp
-.Dl "gbde attach ada0s1f -l /etc/ada0s1f.lock"
-.Pp
-The encrypted device has the suffix
-.Pa .bde
-so a typical
-command to create and mount a file system would be:
-.Pp
-.Dl "newfs /dev/ada0s1f.bde"
-.Dl "mount /dev/ada0s1f.bde /secret"
-.Pp
-To detach an encrypted device:
-.Pp
-.Dl "gbde detach ada0s1f"
-.Pp
-Please notice that detaching an encrypted device corresponds to
-physically removing it, do not forget to unmount the file system first.
-.Pp
-To initialize the second key using a detached lockfile and a trivial
-pass-phrase:
-.Pp
-.Dl "gbde setkey ada0s1f -n 2 -P foo -L key2.lockfile"
-.Pp
-To invalidate your own masterkey:
-.Pp
-.Dl "gbde nuke ada0s1f"
-.Pp
-This will overwrite your masterkey sector with zeros, and results in
-a diagnostic if you try to use the key again.
-You can also destroy the other three copies of the masterkey with the
--n argument.
-.Pp
-You can also invalidate your masterkey without leaving a tell-tale sector
-full of zeros:
-.Pp
-.Dl "gbde destroy ada0s1f"
-.Pp
-This will overwrite the information fields in your masterkey sector,
-encrypt it and write it back.
-You get a (different) diagnostic if you try to use it.
-.Sh SEE ALSO
-.Xr gbde 4 ,
-.Xr geom 4
-.Sh HISTORY
-This software was developed for the
-.Fx
-Project by
-.An Poul-Henning Kamp
-and NAI Labs, the Security Research Division of Network Associates, Inc.\&
-under DARPA/SPAWAR contract N66001-01-C-8035
-.Pq Dq CBOSS ,
-as part of the
-DARPA CHATS research program.
-.Nm
-first appeared in
-.Fx 5.0 .
-.Sh AUTHORS
-.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org
-.Sh BUGS
-The cryptographic algorithms and the overall design have not been
-attacked mercilessly for over 10 years by a gang of cryptoanalysts.
diff --git a/sbin/gbde/gbde.c b/sbin/gbde/gbde.c
deleted file mode 100644
index e173bb78ad90..000000000000
--- a/sbin/gbde/gbde.c
+++ /dev/null
@@ -1,895 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2002 Poul-Henning Kamp
- * Copyright (c) 2002 Networks Associates Technology, Inc.
- * All rights reserved.
- *
- * This software was developed for the FreeBSD Project by Poul-Henning Kamp
- * and NAI Labs, the Security Research Division of Network Associates, Inc.
- * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * XXX: Future stuff
- *
- * Replace the template file options (-i & -f) with command-line variables
- * "-v property=foo"
- *
- * Introduce -e, extra entropy source (XOR with /dev/random)
- *
- * Introduce -E, alternate entropy source (instead of /dev/random)
- *
- * Introduce -i take IV from keyboard or
- *
- * Introduce -I take IV from file/cmd
- *
- * Introduce -m/-M store encrypted+encoded masterkey in file
- *
- * Introduce -k/-K get pass-phrase part from file/cmd
- *
- * Introduce -d add more dest-devices to worklist.
- *
- * Add key-option: selfdestruct bit.
- *
- * New/changed verbs:
- * "onetime" attach with onetime nonstored locksector
- * "key"/"unkey" to blast memory copy of key without orphaning
- * "nuke" blow away everything attached, crash/halt/power-off if possible.
- * "blast" destroy all copies of the masterkey
- * "destroy" destroy one copy of the masterkey
- * "backup"/"restore" of masterkey sectors.
- *
- * Make all verbs work on both attached/detached devices.
- *
- */
-
-#include <sys/types.h>
-#include <sys/queue.h>
-#include <sys/mutex.h>
-#include <md5.h>
-#include <readpassphrase.h>
-#include <string.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <paths.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <err.h>
-#include <stdio.h>
-#include <libutil.h>
-#include <libgeom.h>
-#include <sys/errno.h>
-#include <sys/disk.h>
-#include <sys/stat.h>
-#include <crypto/rijndael/rijndael-api-fst.h>
-#include <crypto/sha2/sha512.h>
-#include <sys/param.h>
-#include <sys/linker.h>
-
-#define GBDEMOD "geom_bde"
-#define KASSERT(foo, bar) do { if(!(foo)) { warn bar ; exit (1); } } while (0)
-
-#include <geom/geom.h>
-#include <geom/bde/g_bde.h>
-
-extern const char template[];
-
-
-#if 0
-static void
-g_hexdump(void *ptr, int length)
-{
- int i, j, k;
- unsigned char *cp;
-
- cp = ptr;
- for (i = 0; i < length; i+= 16) {
- printf("%04x ", i);
- for (j = 0; j < 16; j++) {
- k = i + j;
- if (k < length)
- printf(" %02x", cp[k]);
- else
- printf(" ");
- }
- printf(" |");
- for (j = 0; j < 16; j++) {
- k = i + j;
- if (k >= length)
- printf(" ");
- else if (cp[k] >= ' ' && cp[k] <= '~')
- printf("%c", cp[k]);
- else
- printf(".");
- }
- printf("|\n");
- }
-}
-#endif
-
-static void __dead2
-usage(void)
-{
-
- (void)fprintf(stderr,
-"usage: gbde attach destination [-k keyfile] [-l lockfile] [-p pass-phrase]\n"
-" gbde detach destination\n"
-" gbde init destination [-i] [-f filename] [-K new-keyfile]\n"
-" [-L new-lockfile] [-P new-pass-phrase]\n"
-" gbde setkey destination [-n key]\n"
-" [-k keyfile] [-l lockfile] [-p pass-phrase]\n"
-" [-K new-keyfile] [-L new-lockfile] [-P new-pass-phrase]\n"
-" gbde nuke destination [-n key]\n"
-" [-k keyfile] [-l lockfile] [-p pass-phrase]\n"
-" gbde destroy destination [-k keyfile] [-l lockfile] [-p pass-phrase]\n");
- exit(1);
-}
-
-void *
-g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error)
-{
- void *p;
- int fd, i;
- off_t o2;
-
- p = malloc(length);
- if (p == NULL)
- err(1, "malloc");
- fd = *(int *)cp;
- o2 = lseek(fd, offset, SEEK_SET);
- if (o2 != offset)
- err(1, "lseek");
- i = read(fd, p, length);
- if (i != length)
- err(1, "read");
- if (error != NULL)
- error = 0;
- return (p);
-}
-
-static void
-random_bits(void *p, u_int len)
-{
- arc4random_buf(p, len);
-}
-
-/* XXX: not nice */
-static u_char sha2[SHA512_DIGEST_LENGTH];
-
-static void
-reset_passphrase(struct g_bde_softc *sc)
-{
-
- memcpy(sc->sha2, sha2, SHA512_DIGEST_LENGTH);
-}
-
-static void
-setup_passphrase(struct g_bde_softc *sc, int sure, const char *input,
- const char *keyfile)
-{
- char buf1[BUFSIZ + SHA512_DIGEST_LENGTH];
- char buf2[BUFSIZ + SHA512_DIGEST_LENGTH];
- char *p;
- int kfd, klen, bpos = 0;
-
- if (keyfile != NULL) {
- /* Read up to BUFSIZ bytes from keyfile */
- kfd = open(keyfile, O_RDONLY, 0);
- if (kfd < 0)
- err(1, "%s", keyfile);
- klen = read(kfd, buf1, BUFSIZ);
- if (klen == -1)
- err(1, "%s", keyfile);
- close(kfd);
-
- /* Prepend the passphrase with the hash of the key read */
- g_bde_hash_pass(sc, buf1, klen);
- memcpy(buf1, sc->sha2, SHA512_DIGEST_LENGTH);
- memcpy(buf2, sc->sha2, SHA512_DIGEST_LENGTH);
- bpos = SHA512_DIGEST_LENGTH;
- }
-
- if (input != NULL) {
- if (strlen(input) >= BUFSIZ)
- errx(1, "Passphrase too long");
- strcpy(buf1 + bpos, input);
-
- g_bde_hash_pass(sc, buf1, strlen(buf1 + bpos) + bpos);
- memcpy(sha2, sc->sha2, SHA512_DIGEST_LENGTH);
- return;
- }
- for (;;) {
- p = readpassphrase(
- sure ? "Enter new passphrase:" : "Enter passphrase: ",
- buf1 + bpos, sizeof buf1 - bpos,
- RPP_ECHO_OFF | RPP_REQUIRE_TTY);
- if (p == NULL)
- err(1, "readpassphrase");
-
- if (sure) {
- p = readpassphrase("Reenter new passphrase: ",
- buf2 + bpos, sizeof buf2 - bpos,
- RPP_ECHO_OFF | RPP_REQUIRE_TTY);
- if (p == NULL)
- err(1, "readpassphrase");
-
- if (strcmp(buf1 + bpos, buf2 + bpos)) {
- printf("They didn't match.\n");
- continue;
- }
- }
- if (strlen(buf1 + bpos) < 3) {
- printf("Too short passphrase.\n");
- continue;
- }
- break;
- }
- g_bde_hash_pass(sc, buf1, strlen(buf1 + bpos) + bpos);
- memcpy(sha2, sc->sha2, SHA512_DIGEST_LENGTH);
-}
-
-static void
-encrypt_sector(void *d, int len, int klen, void *key)
-{
- keyInstance ki;
- cipherInstance ci;
- int error;
-
- error = rijndael_cipherInit(&ci, MODE_CBC, NULL);
- if (error <= 0)
- errx(1, "rijndael_cipherInit=%d", error);
- error = rijndael_makeKey(&ki, DIR_ENCRYPT, klen, key);
- if (error <= 0)
- errx(1, "rijndael_makeKeY=%d", error);
- error = rijndael_blockEncrypt(&ci, &ki, d, len * 8, d);
- if (error <= 0)
- errx(1, "rijndael_blockEncrypt=%d", error);
-}
-
-static void
-cmd_attach(const struct g_bde_softc *sc, const char *dest, const char *lfile)
-{
- int ffd;
- u_char buf[16];
- struct gctl_req *r;
- const char *errstr;
-
- r = gctl_get_handle();
- gctl_ro_param(r, "verb", -1, "create geom");
- gctl_ro_param(r, "class", -1, "BDE");
- gctl_ro_param(r, "provider", -1, dest);
- gctl_ro_param(r, "pass", SHA512_DIGEST_LENGTH, sc->sha2);
- if (lfile != NULL) {
- ffd = open(lfile, O_RDONLY, 0);
- if (ffd < 0)
- err(1, "%s", lfile);
- read(ffd, buf, 16);
- gctl_ro_param(r, "key", 16, buf);
- close(ffd);
- }
- errstr = gctl_issue(r);
- if (errstr != NULL)
- errx(1, "Attach to %s failed: %s", dest, errstr);
-
- exit (0);
-}
-
-static void
-cmd_detach(const char *dest)
-{
- struct gctl_req *r;
- const char *errstr;
- char buf[BUFSIZ];
-
- r = gctl_get_handle();
- gctl_ro_param(r, "verb", -1, "destroy geom");
- gctl_ro_param(r, "class", -1, "BDE");
- sprintf(buf, "%s.bde", dest);
- gctl_ro_param(r, "geom", -1, buf);
- /* gctl_dump(r, stdout); */
- errstr = gctl_issue(r);
- if (errstr != NULL)
- errx(1, "Detach of %s failed: %s", dest, errstr);
- exit (0);
-}
-
-static void
-cmd_open(struct g_bde_softc *sc, int dfd , const char *l_opt, u_int *nkey)
-{
- int error;
- int ffd;
- u_char keyloc[16];
- u_int sectorsize;
- off_t mediasize;
- struct stat st;
-
- error = ioctl(dfd, DIOCGSECTORSIZE, &sectorsize);
- if (error)
- sectorsize = 512;
- error = ioctl(dfd, DIOCGMEDIASIZE, &mediasize);
- if (error) {
- error = fstat(dfd, &st);
- if (error == 0 && S_ISREG(st.st_mode))
- mediasize = st.st_size;
- else
- error = ENOENT;
- }
- if (error)
- mediasize = (off_t)-1;
- if (l_opt != NULL) {
- ffd = open(l_opt, O_RDONLY, 0);
- if (ffd < 0)
- err(1, "%s", l_opt);
- read(ffd, keyloc, sizeof keyloc);
- close(ffd);
- } else {
- memset(keyloc, 0, sizeof keyloc);
- }
-
- error = g_bde_decrypt_lock(sc, sc->sha2, keyloc, mediasize,
- sectorsize, nkey);
- if (error == ENOENT)
- errx(1, "Lock was destroyed.");
- if (error == ESRCH)
- errx(1, "Lock was nuked.");
- if (error == ENOTDIR)
- errx(1, "Lock not found");
- if (error != 0)
- errx(1, "Error %d decrypting lock", error);
- if (nkey)
- printf("Opened with key %u\n", 1 + *nkey);
- return;
-}
-
-static void
-cmd_nuke(struct g_bde_key *gl, int dfd , int key)
-{
- int i;
- u_char *sbuf;
- off_t offset, offset2;
-
- sbuf = malloc(gl->sectorsize);
- memset(sbuf, 0, gl->sectorsize);
- offset = (gl->lsector[key] & ~(gl->sectorsize - 1));
- offset2 = lseek(dfd, offset, SEEK_SET);
- if (offset2 != offset)
- err(1, "lseek");
- i = write(dfd, sbuf, gl->sectorsize);
- free(sbuf);
- if (i != (int)gl->sectorsize)
- err(1, "write");
- printf("Nuked key %d\n", 1 + key);
-}
-
-static void
-cmd_write(struct g_bde_key *gl, struct g_bde_softc *sc, int dfd , int key, const char *l_opt)
-{
- int i, ffd;
- uint64_t off[2];
- u_char keyloc[16];
- u_char *sbuf, *q;
- off_t offset, offset2;
-
- sbuf = malloc(gl->sectorsize);
- /*
- * Find the byte-offset in the lock sector where we will put the lock
- * data structure. We can put it any random place as long as the
- * structure fits.
- */
- for(;;) {
- random_bits(off, sizeof off);
- off[0] &= (gl->sectorsize - 1);
- if (off[0] + G_BDE_LOCKSIZE > gl->sectorsize)
- continue;
- break;
- }
-
- /* Add the sector offset in bytes */
- off[0] += (gl->lsector[key] & ~(gl->sectorsize - 1));
- gl->lsector[key] = off[0];
-
- i = g_bde_keyloc_encrypt(sc->sha2, off[0], off[1], keyloc);
- if (i)
- errx(1, "g_bde_keyloc_encrypt()");
- if (l_opt != NULL) {
- ffd = open(l_opt, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (ffd < 0)
- err(1, "%s", l_opt);
- write(ffd, keyloc, sizeof keyloc);
- close(ffd);
- } else if (gl->flags & GBDE_F_SECT0) {
- offset2 = lseek(dfd, 0, SEEK_SET);
- if (offset2 != 0)
- err(1, "lseek");
- i = read(dfd, sbuf, gl->sectorsize);
- if (i != (int)gl->sectorsize)
- err(1, "read");
- memcpy(sbuf + key * 16, keyloc, sizeof keyloc);
- offset2 = lseek(dfd, 0, SEEK_SET);
- if (offset2 != 0)
- err(1, "lseek");
- i = write(dfd, sbuf, gl->sectorsize);
- if (i != (int)gl->sectorsize)
- err(1, "write");
- } else {
- errx(1, "No -L option and no space in sector 0 for lockfile");
- }
-
- /* Allocate a sectorbuffer and fill it with random junk */
- if (sbuf == NULL)
- err(1, "malloc");
- random_bits(sbuf, gl->sectorsize);
-
- /* Fill random bits in the spare field */
- random_bits(gl->spare, sizeof(gl->spare));
-
- /* Encode the structure where we want it */
- q = sbuf + (off[0] % gl->sectorsize);
- i = g_bde_encode_lock(sc->sha2, gl, q);
- if (i < 0)
- errx(1, "programming error encoding lock");
-
- encrypt_sector(q, G_BDE_LOCKSIZE, 256, sc->sha2 + 16);
- offset = gl->lsector[key] & ~(gl->sectorsize - 1);
- offset2 = lseek(dfd, offset, SEEK_SET);
- if (offset2 != offset)
- err(1, "lseek");
- i = write(dfd, sbuf, gl->sectorsize);
- if (i != (int)gl->sectorsize)
- err(1, "write");
- free(sbuf);
-#if 0
- printf("Wrote key %d at %jd\n", key, (intmax_t)offset);
- printf("s0 = %jd\n", (intmax_t)gl->sector0);
- printf("sN = %jd\n", (intmax_t)gl->sectorN);
- printf("l[0] = %jd\n", (intmax_t)gl->lsector[0]);
- printf("l[1] = %jd\n", (intmax_t)gl->lsector[1]);
- printf("l[2] = %jd\n", (intmax_t)gl->lsector[2]);
- printf("l[3] = %jd\n", (intmax_t)gl->lsector[3]);
- printf("k = %jd\n", (intmax_t)gl->keyoffset);
- printf("ss = %jd\n", (intmax_t)gl->sectorsize);
-#endif
-}
-
-static void
-cmd_destroy(struct g_bde_key *gl, int nkey)
-{
- int i;
-
- bzero(&gl->sector0, sizeof gl->sector0);
- bzero(&gl->sectorN, sizeof gl->sectorN);
- bzero(&gl->keyoffset, sizeof gl->keyoffset);
- gl->flags &= GBDE_F_SECT0;
- bzero(gl->mkey, sizeof gl->mkey);
- for (i = 0; i < G_BDE_MAXKEYS; i++)
- if (i != nkey)
- gl->lsector[i] = ~0;
-}
-
-static int
-sorthelp(const void *a, const void *b)
-{
- const uint64_t *oa, *ob;
-
- oa = a;
- ob = b;
- if (*oa > *ob)
- return 1;
- if (*oa < *ob)
- return -1;
- return 0;
-}
-
-static void
-cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char *l_opt)
-{
- int i;
- u_char *buf;
- unsigned sector_size;
- uint64_t first_sector;
- uint64_t last_sector;
- uint64_t total_sectors;
- off_t off, off2;
- unsigned nkeys;
- const char *p;
- char *q, cbuf[BUFSIZ];
- unsigned u, u2;
- uint64_t o;
- properties params;
-
- bzero(gl, sizeof *gl);
- if (f_opt != NULL) {
- i = open(f_opt, O_RDONLY);
- if (i < 0)
- err(1, "%s", f_opt);
- params = properties_read(i);
- close (i);
- } else if (i_opt) {
- /* XXX: Polish */
- asprintf(&q, "%stemp.XXXXXXXXXX", _PATH_TMP);
- if (q == NULL)
- err(1, "asprintf");
- i = mkstemp(q);
- if (i < 0)
- err(1, "%s", q);
- write(i, template, strlen(template));
- close (i);
- p = getenv("EDITOR");
- if (p == NULL)
- p = "vi";
- if (snprintf(cbuf, sizeof(cbuf), "%s %s\n", p, q) >=
- (ssize_t)sizeof(cbuf)) {
- unlink(q);
- errx(1, "EDITOR is too long");
- }
- system(cbuf);
- i = open(q, O_RDONLY);
- if (i < 0)
- err(1, "%s", f_opt);
- params = properties_read(i);
- close (i);
- unlink(q);
- free(q);
- } else {
- /* XXX: Hack */
- i = open(_PATH_DEVNULL, O_RDONLY);
- if (i < 0)
- err(1, "%s", _PATH_DEVNULL);
- params = properties_read(i);
- close (i);
- }
-
- /* <sector_size> */
- p = property_find(params, "sector_size");
- i = ioctl(dfd, DIOCGSECTORSIZE, &u);
- if (p != NULL) {
- sector_size = strtoul(p, &q, 0);
- if (!*p || *q)
- errx(1, "sector_size not a proper number");
- } else if (i == 0) {
- sector_size = u;
- } else {
- errx(1, "Missing sector_size property");
- }
- if (sector_size & (sector_size - 1))
- errx(1, "sector_size not a power of 2");
- if (sector_size < 512)
- errx(1, "sector_size is smaller than 512");
- buf = malloc(sector_size);
- if (buf == NULL)
- err(1, "Failed to malloc sector buffer");
- gl->sectorsize = sector_size;
-
- i = ioctl(dfd, DIOCGMEDIASIZE, &off);
- if (i == 0) {
- first_sector = 0;
- total_sectors = off / sector_size;
- last_sector = total_sectors - 1;
- } else {
- first_sector = 0;
- last_sector = 0;
- total_sectors = 0;
- }
-
- /* <first_sector> */
- p = property_find(params, "first_sector");
- if (p != NULL) {
- first_sector = strtoul(p, &q, 0);
- if (!*p || *q)
- errx(1, "first_sector not a proper number");
- }
-
- /* <last_sector> */
- p = property_find(params, "last_sector");
- if (p != NULL) {
- last_sector = strtoul(p, &q, 0);
- if (!*p || *q)
- errx(1, "last_sector not a proper number");
- if (last_sector <= first_sector)
- errx(1, "last_sector not larger than first_sector");
- total_sectors = last_sector + 1;
- }
-
- /* <total_sectors> */
- p = property_find(params, "total_sectors");
- if (p != NULL) {
- total_sectors = strtoul(p, &q, 0);
- if (!*p || *q)
- errx(1, "total_sectors not a proper number");
- if (last_sector == 0)
- last_sector = first_sector + total_sectors - 1;
- }
-
- if (l_opt == NULL && first_sector != 0)
- errx(1, "No -L new-lockfile argument and first_sector != 0");
- else if (l_opt == NULL) {
- first_sector++;
- total_sectors--;
- gl->flags |= GBDE_F_SECT0;
- }
- gl->sector0 = first_sector * gl->sectorsize;
-
- if (total_sectors != (last_sector - first_sector) + 1)
- errx(1, "total_sectors disagree with first_sector and last_sector");
- if (total_sectors == 0)
- errx(1, "missing last_sector or total_sectors");
-
- gl->sectorN = (last_sector + 1) * gl->sectorsize;
-
- /* Find a random keyoffset */
- random_bits(&o, sizeof o);
- o %= (gl->sectorN - gl->sector0);
- o &= ~(gl->sectorsize - 1);
- gl->keyoffset = o;
-
- /* <number_of_keys> */
- p = property_find(params, "number_of_keys");
- if (p != NULL) {
- nkeys = strtoul(p, &q, 0);
- if (!*p || *q)
- errx(1, "number_of_keys not a proper number");
- if (nkeys < 1 || nkeys > G_BDE_MAXKEYS)
- errx(1, "number_of_keys out of range");
- } else {
- nkeys = 4;
- }
- for (u = 0; u < nkeys; u++) {
- for(;;) {
- do {
- random_bits(&o, sizeof o);
- o %= gl->sectorN;
- o &= ~(gl->sectorsize - 1);
- } while(o < gl->sector0);
- for (u2 = 0; u2 < u; u2++)
- if (o == gl->lsector[u2])
- break;
- if (u2 < u)
- continue;
- break;
- }
- gl->lsector[u] = o;
- }
- for (; u < G_BDE_MAXKEYS; u++) {
- do
- random_bits(&o, sizeof o);
- while (o < gl->sectorN);
- gl->lsector[u] = o;
- }
- qsort(gl->lsector, G_BDE_MAXKEYS, sizeof gl->lsector[0], sorthelp);
-
- /* Flush sector zero if we use it for lockfile data */
- if (gl->flags & GBDE_F_SECT0) {
- off2 = lseek(dfd, 0, SEEK_SET);
- if (off2 != 0)
- err(1, "lseek(2) to sector 0");
- random_bits(buf, sector_size);
- i = write(dfd, buf, sector_size);
- if (i != (int)sector_size)
- err(1, "write sector 0");
- }
-
- /* <random_flush> */
- p = property_find(params, "random_flush");
- if (p != NULL) {
- off = first_sector * sector_size;
- off2 = lseek(dfd, off, SEEK_SET);
- if (off2 != off)
- err(1, "lseek(2) to first_sector");
- off2 = last_sector * sector_size;
- while (off <= off2) {
- random_bits(buf, sector_size);
- i = write(dfd, buf, sector_size);
- if (i != (int)sector_size)
- err(1, "write to $device_name");
- off += sector_size;
- }
- }
-
- random_bits(gl->mkey, sizeof gl->mkey);
- random_bits(gl->salt, sizeof gl->salt);
-
- return;
-}
-
-static enum action {
- ACT_HUH,
- ACT_ATTACH, ACT_DETACH,
- ACT_INIT, ACT_SETKEY, ACT_DESTROY, ACT_NUKE
-} action;
-
-int
-main(int argc, char **argv)
-{
- const char *opts;
- const char *k_opt, *K_opt;
- const char *l_opt, *L_opt;
- const char *p_opt, *P_opt;
- const char *f_opt;
- char *dest;
- int i_opt, n_opt, ch, dfd, doopen;
- u_int nkey;
- int i;
- char *q, buf[BUFSIZ];
- struct g_bde_key *gl;
- struct g_bde_softc sc;
-
- fprintf(stderr, "GBDE disk-encryption is deprecated,\n");
- fprintf(stderr, "and will be removed in FreeBSD 15.0\n");
- fprintf(stderr, "(continuing in 5 seconds)\n");
- sleep(5);
-
- if (argc < 3)
- usage();
-
- if (modfind("g_bde") < 0) {
- /* need to load the gbde module */
- if (kldload(GBDEMOD) < 0 || modfind("g_bde") < 0)
- err(1, GBDEMOD ": Kernel module not available");
- }
- doopen = 0;
- if (!strcmp(argv[1], "attach")) {
- action = ACT_ATTACH;
- opts = "k:l:p:";
- } else if (!strcmp(argv[1], "detach")) {
- action = ACT_DETACH;
- opts = "";
- } else if (!strcmp(argv[1], "init")) {
- action = ACT_INIT;
- doopen = 1;
- opts = "f:iK:L:P:";
- } else if (!strcmp(argv[1], "setkey")) {
- action = ACT_SETKEY;
- doopen = 1;
- opts = "k:K:l:L:n:p:P:";
- } else if (!strcmp(argv[1], "destroy")) {
- action = ACT_DESTROY;
- doopen = 1;
- opts = "k:l:p:";
- } else if (!strcmp(argv[1], "nuke")) {
- action = ACT_NUKE;
- doopen = 1;
- opts = "k:l:n:p:";
- } else {
- usage();
- }
- argc--;
- argv++;
-
- dest = strdup(argv[1]);
- argc--;
- argv++;
-
- p_opt = NULL;
- P_opt = NULL;
- k_opt = NULL;
- K_opt = NULL;
- l_opt = NULL;
- L_opt = NULL;
- f_opt = NULL;
- n_opt = 0;
- i_opt = 0;
-
- while((ch = getopt(argc, argv, opts)) != -1)
- switch (ch) {
- case 'f':
- f_opt = optarg;
- break;
- case 'i':
- i_opt = !i_opt;
- break;
- case 'k':
- k_opt = optarg;
- break;
- case 'K':
- K_opt = optarg;
- break;
- case 'l':
- l_opt = optarg;
- break;
- case 'L':
- L_opt = optarg;
- break;
- case 'n':
- n_opt = strtoul(optarg, &q, 0);
- if (!*optarg || *q)
- errx(1, "-n argument not numeric");
- if (n_opt < -1 || n_opt > G_BDE_MAXKEYS)
- errx(1, "-n argument out of range");
- break;
- case 'p':
- p_opt = optarg;
- break;
- case 'P':
- P_opt = optarg;
- break;
- default:
- usage();
- }
-
- if (doopen) {
- dfd = open(dest, O_RDWR);
- if (dfd < 0 && dest[0] != '/') {
- if (snprintf(buf, sizeof(buf), "%s%s",
- _PATH_DEV, dest) >= (ssize_t)sizeof(buf))
- errno = ENAMETOOLONG;
- else
- dfd = open(buf, O_RDWR);
- }
- if (dfd < 0)
- err(1, "%s", dest);
- } else {
- if (!memcmp(dest, _PATH_DEV, strlen(_PATH_DEV)))
- strcpy(dest, dest + strlen(_PATH_DEV));
- }
-
- memset(&sc, 0, sizeof sc);
- sc.consumer = (void *)&dfd;
- gl = &sc.key;
- switch(action) {
- case ACT_ATTACH:
- setup_passphrase(&sc, 0, p_opt, k_opt);
- cmd_attach(&sc, dest, l_opt);
- break;
- case ACT_DETACH:
- cmd_detach(dest);
- break;
- case ACT_INIT:
- cmd_init(gl, dfd, f_opt, i_opt, L_opt);
- setup_passphrase(&sc, 1, P_opt, K_opt);
- cmd_write(gl, &sc, dfd, 0, L_opt);
- break;
- case ACT_SETKEY:
- setup_passphrase(&sc, 0, p_opt, k_opt);
- cmd_open(&sc, dfd, l_opt, &nkey);
- if (n_opt == 0)
- n_opt = nkey + 1;
- setup_passphrase(&sc, 1, P_opt, K_opt);
- cmd_write(gl, &sc, dfd, n_opt - 1, L_opt);
- break;
- case ACT_DESTROY:
- setup_passphrase(&sc, 0, p_opt, k_opt);
- cmd_open(&sc, dfd, l_opt, &nkey);
- cmd_destroy(gl, nkey);
- reset_passphrase(&sc);
- cmd_write(gl, &sc, dfd, nkey, l_opt);
- break;
- case ACT_NUKE:
- setup_passphrase(&sc, 0, p_opt, k_opt);
- cmd_open(&sc, dfd, l_opt, &nkey);
- if (n_opt == 0)
- n_opt = nkey + 1;
- if (n_opt == -1) {
- for(i = 0; i < G_BDE_MAXKEYS; i++)
- cmd_nuke(gl, dfd, i);
- } else {
- cmd_nuke(gl, dfd, n_opt - 1);
- }
- break;
- default:
- errx(1, "internal error");
- }
-
- return(0);
-}
diff --git a/sbin/gbde/image.uu b/sbin/gbde/image.uu
deleted file mode 100644
index 1c06d84f1e45..000000000000
--- a/sbin/gbde/image.uu
+++ /dev/null
@@ -1,3304 +0,0 @@
-
-begin 644 gbde.image.bz2
-M0EIH.3%!629364"&9H\`Y1=_____________________________________
-M________X7"_"W7I7N^[5>OM;NXTY!ZK'VZ]]MS?=??>>OM=[?/I-WMSSFM;
-MO>[&RU[OMNKV=>\:^>K>]N;5WN];V*7F[O6[[[>G;WWRKZ]ZK7?7UZ7=[WN=
-M[?<5WWR[97V[M=U[>UAYYW'WNW<^^WUM??7U]UZ=>MZ?7KOOK[;WM[O>]'O;
-MKWU?;[Z^=*YZYNLNKYQ7KWO=Z]W.>OOO/HR>KV^N>L]>>Z\O;ZWWN[O=IOK*
-MT]>WUUS=V]:Y+[/OON]>[?9[GWS>][OK27KI]UK.N]]]WOJW=URR]L[[LU>\
-M77VSN]YM\]Z*]NW>S[GWONYONZ^[SI>^^YWN[6Z^YUF:Y]Z^[[=]=\NNY]Y;
-MO>^NEW>S=GGKW>^^[;?.[[7?;[?'7N.^YZ^UW/K[VY./:N\M]S:]WWV>^I>W
-M./3MVW>]GKR^]5K-=GG>^\MW'NWO>^^]?/7O7WO/?;O7UU[O?=]OO=<9@7V]
-M<\V=W5OOMS7>;[[Z^O/OO=ES[>7VON]Z^WE>]OI\^]ZE??+,[WG5FW33V;4/
-M:]O-[M:SUWWOENY[S*]>[/0]]O!=];G>MWEGOO:MW>K?7NW6NVHO6NMWOJ\^
-MOO?;K;UUM;>VV:Z>YV]T]ON9MCWGMN[WGNCWWW=[Z[5/O?5=??;WINOMG>TO
-MO+??;U?;XS=]VK;<W>UYYYSNOGWO/I[WTT=KV[JI[:]]WU[?:NFNO=W>GNZ]
-MFV]W>WGJ+S;OO>T=+Q[7UP[WKNOHR;C>M5?=SMNU==O>Y3[[?55WW;U\\U>=
-M[>^;NUU?5VNWGON^^>W3ZUKNNN[-WW>NVC4\QUO;N&77;>W>>=\Y].^^[[=]
-MZWW?;YTJ]BFW??=O3M[V[[Z^=Y?>^\L];;O?/OM\]MON[N.]Y[KSV[PWN]W=
-M+ZK=]/M]SO>]GN^[>]O??=U-Z=[OGWMQ][ZP3[[;OK[V=]W?:ZZ^]>]SO`.)
-M[?7>[=U7O>OOOEM]]W=?>VUE:-;,ON]Y][O5V^^][OK[[[V]Y]WVV]M>@Z.V
-M?7OFU\???=[[E=WM-/MRV/.9MJ)6>[[UMNWSOGQ]?/ON>]]OGE/'K;?=J[ZU
-M]?9=U\[O<T]H9OM]WJVN?7>ENZ[A[M[O.2]U[O<S-[7V^[YT^OI]W??/HO?<
-MZSXWWJ7N?>YW(^?;[?;S[)OO=][SV8O?<GS.]7OO?>WW9:WUWWWOGN>^^]/?
-M7GK>7N5[VRSYNVIWVU>YNU;KSP9=9][+;[VOMMZ^^C[WO?.GIWJ^NN^ON]WN
-M[V]OO;Z^J[UMNOGFN[WM4]>OO=UVOM]X8]MNO>\9&^N^WU]WG;CJ[NMW=O8.
-MZ5?9U?==R^;?6N]O>M:VUF]N]N[,VY'K*WSW=XZN[O>K[M\Z:?7>][IUK%[=
-MV.]N[O6O?77=OIWMFGOG>:?.^YWWS[SX5>ON^VY]3WW=[K[7O6^^]?7>M]\V
-M/<UUQ]:^WOMC>1TDZVWF[U>[IO;"[[NVR]:]GKWON^\S'>]]=O/?>W>K[[O>
-M6O7K[V^CO/NUY?=U[O/7GSVKG;[OJX^[S?=;W5TSO>[Z^USMN[O?=WWVUZWN
-MWNS[[O>];KQE>MWS:US8^[=[ZWM>G??/=>^9W=?;OO'CW;[[X'S/<YW???==
-MSNY"J?X`3``!&```IL````5/P`3$P``)@`````````3```"8``-&F@``:&@:
-M`JB%5/_`````!4_%4_P```````````F``````3```--`#$``````"8`!,3*>
-M!51*I_@`)@```-)@`$P`F`3`3``5/P`F``3`T-!IH:#30R!IH%-@!,$TP``$
-MP3`)B8)@C$P*HA53_P`$P``````````!4_#0,0#0#0T-`T``)@`!#``E3_3!
-M38`"&```F``3```542J?X`!,"8`3`F`&1HT9!IH,AB-"8`3$R,`)@$P``3)A
-M-,3)@$R8"9J4_31@3"8%/``3`3``&@*H90TR&@T#0#$:9-&A,!,3`)@`$PF`
-M$:81FB:8``F``)B8`3*>!&3`1B81IDP3``!,IX!,J?J>`":4["(B(J<C``(@
-M"(`B]!&1```$0`'41D1$`1``$0!$!L$8```!$1$0`&(1D0``!$``TD9$`1``
-M$1$1>@C``(@`"(``!)"$G*%(@"(`B`(B(B`(C\C`(@1&1`$1$``1$1$`1/OL
-MKOMIH+QS3GG]CAF%<+B]I?#`V7-_"-Y#LDSH9(@]7VLR`[HWF)TW`6KW'/:[
-M(XX%BKB][$SP'KU?K:_(1N9_H^2@JA3P.J%L@];AP_!DU0#Q+M]J`25MW8VF
-M*XL679-BSK:$@%7+58\#PQMY/2W?@M+-W)\E?]B$TIE`=%,17/[11-(;\I/#
-M3K0@:YL-M_DJH(H!9LQB\>C6A#Z#2)'V&%ST*32:^<7Z,WD!2Y^/JR(;=ORJ
-M>,<*PVQ,R&#QC8-[$9MU[)EC?'-!R@=(2:X0\CG?++DK!YO[LOU*6-G(56S[
-MML*@CU_P?SNY*I`D2CK+X+*<D33>[&5,NIT^H*%`ZF8Q<'K7)XIWZ8=1A[<'
-M;TS"6Q^U[E3BL90'SR0^'D=A@&E@R::PDR3?^0@H869KI`T;Z3$XA/LY\]1E
-M/C0"&C\V"&S3KB$?U0>XUFH\Q[N+OQNKX'*LW]</]KK<$L][=G,6P<.>*#OQ
-MPCD->$>?-13U@<R>8#8*D.'R)W#N8IFE^^*R@S%:&O"R%#-'W?!YNM3N5PZ`
-M/#!F3E9,(+E-0&:61NBQ11&;HL-7T,4#Z:MA]`E:==_$3](_^+,-FT4#KAN+
-MBE/&6*K[.Y6IUY,+C%C*7"\Z&7P!BW("$L:%`G#&<?&$\=LA)""T$O078Q1Q
-MMTR<,YL&6.H!.P$NQ4C\5:*(-AQ?@B2`II;>'-[R2,L8NQD^'8NKDO6%V-S]
-M.XJ9#YRP6=JD;F2*J'B=3QEU]OH\;!N7\Q_OE"0`"(B``(B(B`(D-T3;PKMS
-ME!5Z$Y68,"-/Q<GA,D'YFYSB^;*9@X#0S:+&?]I6A(/?N%TE=YWX'"3:")XR
-M@>>PAYR72R[0T3+!<W`!BSS#NJP"^QE)#]U8NJO;%H#8@ZFPD5^(XZ5R+S?9
-M,;7[T@)0"OI+_%3*6R$4M)._@@GW,9&OV[[;-#T`VF``;R(4:!QU[=*3AX:Y
-M]QUY1>9,F9+<[0LJ,'K!]IX"V'V63B#J53F7=OS`#2?&W!1[9G`*'&?SYV2N
-MW5W]E$!P+VH9'#BZ;8[/'<$>1S4//EG80Q8;"06GUQ=I<,<MC0,MGN:3J,A'
-M(Z")BMPGM_S&X/51E6LW*\%2%.ZY_$-(C++?8^[IC?>]Y7D(7FTGIUAK$E9@
-MG$JE)3V?>1[&:XGBU&L)E>&W&XYK%=/0]20P38X^,$3A/B+Y`![Z4:ZJ_RZ3
-M5O9QO4@7/4:,]*_@!XU8;!W>8B]V%ZATFI*&3JQU@A;8*IW`S;E&3A9=#W.J
-M`H@<XS:A&850DGDFMDVN.17D2I+*HT6*RA4%6L.8R2EE9WHTLWF.JTJ`"I18
-M<2LSCK4:D\M3#S"^@YI(Z?L(9(?EN43_C'54GG!XRLK6*(4D))8LW^RF[G,#
-MT?*CW1;UJ+,6E'GXP4F8`K^F]0@\(77%3F)+%RGE>5MZ#+DN\BXYH.2C>"<%
-MJF?>2G6_7\\@-/$FU7[5XKM.7&U+XO\E7\+V$,8:`K'Q&"(^ZA[8'4*!.B=9
-M_TQ@Z596F1WTPA:,40MQ5CS*H;5H21VQS6@9P$^U;$\D=LR-1HU^42O(>K+J
-M:L@X=VR&SWEZ=!Z.]1PX^+V[E>F>=!PSK.#KV'"G^,MUMU;(HF:<A\21.#;Q
-M>QL+H*ZR(TM"9V,/*)3X+*%=HLY<)W^`#[H(PPH(<N./[$:SQ!O7,$8?+:GE
-M$X-TB5BUFQ<W'N?X150PB5$'_%R]N?>$?;XL0)TC##3VW2WP(S!3X5H#\($,
-M%2D%>[/>W\9=))4F[$:]V]J?9X@\OUKEG;3272J_<IN69W>R(T:R##2:"L;O
-M2"SKT7P)Z9$@T"?1B4<_JD--\(C4:'3+J>($7XU]F1[G8;U!R)]'8+M/WAYV
-M=TSANI97]6K?,&AG`GA(6*M,JV:*BL<25%3%@Q?0K8E>0Y:U,MY$"J0WSD6M
-MB;C;W<?7(\=W=3J9`NQ76BR['PN-'R<W^1[DA.AE["+&3)4%U;,RMP[Z;H.]
-M*)=:2B9!)V'%47_&7_F94`TK<#7B7+,&",N*X?5/?KKN,9=PG)>[A*5#-WKZ
-M^4*GD`WKYL[5FCI)Q-KE<DFT7L<I0UHML:XC+O#5]<UP_#\+B6N26F([)0Z>
-MV\Q\2*G9'!?`BX'Q2.:J*%%LRJ6?D#\-)>B>NA7!,I0#4C-)7J6Z#7YF@L*C
-M]KEA9^]?J]LJ'.H-P>\ZY,8RA\7=_1<DN$0:^SGV<EB?.YKH=2$DL=]["KB7
-M.B<UMV0,$B)9\KS6]^:^W*A,B?[VTUP8K3K>97H'F'?-*@<??7:@&1P?V9-S
-ME68E_5XV*#)M^*Q:.L6!GK.W0I+A,;^S>VIJ4&-\)4U#613H+]^6-I6%=O:V
-MCO7^I];_E<=Q,7U\WB_KZJ>+K2SR`FAD/D$RN'675:N`\RWP\()^OKK():JT
-MB-E5L,!,=,GS;)@YE?/^^C[V1V_@"Z.P033VJ*^A!AE5Q_QVMTI'=[0Y^K5E
-MA^`0E>6=>&9X=>"XH>%8M6TT2.A_S::_D'=^LWN6.9\UAA,\J7;C//PJ]C)^
-M:\;1(O$K-4W@@=DVC2^'C'U-545^#=I*P.58$<K]L[5VSY#G-NKT_T>+T"G9
-M?LE2U\W^6`M;<IL['I;Z+FP`<W[=6R,4=U?-W\IS_E;`?JEHV#=)PAHWIJ1C
-MZ-VX4EWQ$B<OH!0]Z#C,7ND!!^1PSPQT>5C&^]2S'&$)=V502NFDJF^HF'35
-M.\%4(M+Y.VMX)OW?Q1\?-M@8V^L!?6D2M6!SI5*!^A$6L"^"^]L5Z"9E#XI1
-MA=-5"CIK7Q=2/A/V83`RIEWD-TV2!DX^H_U"@MYZC(:O=;W;L>9O=%W=>#U4
-MZ]L=2H3_W"<?"8=Z@A?T&T-$,%]NH]0_NG>N..'ZVK.^%FCDG?!F8S%$\2HO
-M?IY+618!N;^FV85%.C0.Q3A+1=ZS+U<(O&G2:!=;$'SW;Y9B$$7<<^.$P-_2
-M92+RQZM'_`>12>R<//V4^^FBAIN/K]$YH+.YZ7P&I<1&$$O3_WU,D^L@RO(:
-MT%Y4&,.+51)V5J60-&D_%2\ZER0VB;19<_Y]J[L#D'P9'9:3',PE8*BW%4KI
-MJ[&D6%X;X?O=IKY`Z$$SF>'1@N72M<?WBG?Z58T77-PEK2=6.,8&YN]J>-XF
-M`8J+I5'F*J(75:2GKH]V&^!LX--5ZXQ20I:+ZK)9>/=SC,IRG7JU#6N/C)Y<
-MS=Q(T2=4+T>T_O`JEA6JWN"8!+^))2+?432]+))3O"3T&):8C2>Q&>V&J98.
-MY9\\QVE%LKZC=O95UY)^AQW@X?!=]WC'""_B%8<[^TB\8X3#WQ!WI2\;+@L$
-M0HHMOQ)Z4X[[MP7=(>MNO`?E'K--#20D@$A&,;!(?.LDU'[7I91VV#_.BV[H
-MP5,5RU@>O)>$[<#H$8V"V0&`T1&XA*F-$Q<Q2"9``GXQL(Z].FXO"[G-46%-
-MLBX_=&$T89_0JA>:5A\`.:-[2;/P6NMJLZ:3GP`/.Q.NE(*#:LAXJ4-99LT)
-M-ID,,T/2_VS/4.TD%7-$RUDT;UFQFUKRFV7Z]C:<YLNW]L)Z:X5[KS@O9-5/
-M)%H95QON)(".;G*JE3_NO95RQ('G,#T'-:\292P&>E"-MM]6_QCH[T`7!S74
-M3YOR.*:#X;9I+O)J"G1=U].?[.YM3;VAGY&-70TI2(!G2K=RJ!>?AB'8:7_I
-M/L+4I=?6%ULTFV**N3]#K$X5:9"ZEH-,/S;H-#S,1CQ.T-PJPDB3@#Z(VD]I
-M]L("A/`:@7Q!?U>UG_@Z:/+Z#SN$E21[R')ZR,X<>",[`S'0FR["<G."Z<!R
-M@X>Y\^$\#S<!%U`OX1`LRH%-KG6)=,"V!%=WV+Q>Y""@M=04)(OCRT+42_7^
-MS&V]B&#`NB-KE\MW&),/\/DZCN(&PJ<>PL"M)$A1[GS"N<DOIUP[*WUH./@\
-M&]HP?<BT(^TTUW)GMJUK[R?`GIL=4SATC8(\Q^QL>9^)'BI&VQ-)9W?<B7.G
-M8'<D6-&'"O-/MO4\<:E1IN8O=*8EJC#.`3)R@##0-FW02,U=MH7?C86Z?KQB
-M=!:T[H\I]/?K+/K0@8S#G7I<A%51[T+`C-*>IK,$>N,[K[$)--3"Q<^7"S2V
-M5P5=BK%%/<AA=+_BH:G-8BQ0OQ9=!$B;D04@3A'9$JVVR3]$8#0![_Q^U75@
-M796@9?*^M$EY$GS!!UBK_OM"N)M<&5OG5GA?:U;ELC:XX>JC62*6F[)8%2*;
-MXTE-2&)%]LA<B$SWEZ2H6/X(`DKW3Y%C/M,.--?.$'!53K$G[[8@P52)8E/N
-M"&K*;G"'3!6;G\O/S[W,Z:J,#RPG!*QU7OQ?UR:<K0=!8'44JV<U,UX-&W8@
-MR<HJ>DS\D\_KUW/UQ+4Y3C'YJ@V0>&D?'%&B/["^4C0FWE;+:I:;MPNK:;1/
-MV6=(0V`+H%>:KN%*F>R!F3IRS8%6)8[O17E<>]-/@.$[!-4]>,)Z:>GFGU#2
-M5O_)=\5B*[(0?ZV1$EYRT^J%P'Q;-WLC^TMI[=)=$!$XY^`K0GV6@A+QGM]Z
-MQ1;,"[0'!97SB_'S/B[Y>;<50/2&/J*6_AW;0A8&RP?SG[/R`]A?7K`$P5D\
-MKC,M.O(*M3/6MB_FL\<"?II+/35,(Q+X^TJV\NJ*QZ?]^IF3JGH='PB!?H8_
-MM!3FR=HN>P1C;8%NY]W2@%&AQ"9L:9_]0E'\8KOI\7RG8/5\/FHH8N,%#4O\
-MWES>AS5&N!J@/#L:M`)C;6A'!=FC_,W#.<&^R&Z+"`GQT2?K(#KS(L+`Y?)K
-MCP#?<J4G5Z9B8EI%]IVG"XF"X<;PC0`(#E?(D.L-!4(A\H^6#$HEHY"J-[G^
-M\SND>C;'2>1&L'G=!`EMUUAH'[&J9K#BVC>6#G[E0T)#7PRV9=7O\*"Z3A;'
-M/K^8T"YBF15.'XV)EZ)%!TTY@$42I8=RY5RV.6]L<AF4UN,O"QH(HC?5%93@
-M*_B(]N93V0YW'-:3%E-#@'J#.?J5=.0,-@C@=R<;`&?><_`]T8'"9LQ1+AIV
-M_ET<\KE<XY-:468&HV-0K?I7.*1H]3NN079QL3]QR&3$-CBGFEJFO_J0:@5C
-MUG=/4JQ-BBNNC22>*G31(1NQS?#<TSR[#_$2-XAO'P+!Y0`N.#O1/ORKZ$,-
-M!"V;'=:3=Y<V.O\\H`BH]`TA16X['']L"S:_]K[QQE'_AL:S>W+0R%\EW$P+
-M(;40NK"#=5#>_2J(RP,/;`>8L.=YPK,`LJS.M7TL=`[)HJ4->?>A(,V)$1P;
-MC?&;M^C;OS"EIG3EUZRI*'ZE1[6^3G2")'U(1B9%@%O^^@%.&T`@.A,67:O$
-M?U`PSK,E%-M+JN?K/[U=_$HI.8,%8SO0=;HJW?+L^+%5PS8!S"\D<%&/@,"%
-M_3:!O6-*4)GKFTTEFN87$H1)/QB>.;=\9D(.JC#8'V55AZ'X2J\<5E#<I;X^
-MV\WKH+G,1P<17)-]OX^,:/CSSB;6PZ0'[NTX?U!_:8^P.%J>EH+-B9B/YUU[
-M_V/&"'D;YX%P6W699`7$F]`B9`'=+RR(,7E-T;S>%0C_:I;::@ZU>N!HV0C`
-M$/N33[_WS19QN$(S`U&3H'L;U>_39M[HW4=SWESHD\NZ88-9BO6]U`#0"G!-
-M_*I!W.PR<LVA7TNI&O5L>&I"*#F;;1Y`"J4:XV:S`6$>8%M9='ONF`9-L6BA
-MFD_(\4P\#V^J6\V;S'IJFU)7CIQJ?3UCD59)4THHV;4[),QJ(Y6#W8$)P-V7
-MO9^^38)Q9;U/Y`6A*?\E)05BC=M-(STFE@+^?)3(#DWZ']9CSJCL\^FYL5?,
-MN)D<=^%(!YN60H%B1I+>?T.ZL#.9(CFRMO0V?6-P*!'?VL^V/'U=2NQL36X-
-MJ0\E-_-IMVYNJ<]Y;D,F1"DX*3T=;+[/9L#=`<J0L>ER34&`^:F%-F3O#D+Q
-M$8:*^I38G_WTW]RN)H:"OPNC+.T7O32F\%G%)?+75LPM:$F4&)=![(&3&GO@
-M&FC(7;_IL@EH'Y@'K15QK<+IGBWKY=O7J\/08C6[B75=ZJXXIU233\^HS$5&
-MSWI5H9.%.!^8018ZZ5T1>Q;3X"-<_\V;C!4V8=UI%_D<'-PBE@]9Y?-K6*9)
-M?)9P(N&++8LPNNVC-:-\2&FNL>"4P#DU/TP&X')*>IL;T7$SA%R&0[PYR7P"
-MT4WG)6?6BXNDA#R)2191XTUDG;<6QM.?Z>-O9+U6V*!L-8$(`&ISZ62I]PC3
-M.LNLY4=D4IKZ9LU5DCW17KK=B+F%#D(Y<QY>%YJF$T*)&`FN=POR'"+UNF=G
-ME`B-F^ZU,6E^A1XZAA3-U?6QQ>)B1`'C%Q*<=@IM+LR>"4%)26\YRROK"S8=
-M]E08V/V<59::9ZWMS`@_PE1>7-B+_RQV(F(\'(.R;$5:503.3Z2]@$[A_MM4
-MXO#;=A7H+RE\)((TJ[T4"9,(W-GY4&Y227=&CEE_XXAJ$O>%X):'^0?]V"%-
-M"S_*HIT)3?"9QN%\LX>+5,C*!!"AKF0KGOB@H72HV<=K(+83-47Y$A9K\SC1
-M+9RD7,/]9!ADS"$&_-Y$07SVM#/Y6>]W$H@,Q_"`4`WPPHU!Y?MFGDUS@9I\
-M9SA/1=*;<RF$Z5#/E>UR<V<>-IFYBFM33W%(?]L^U>-,9H]TP+Z-JP:5ZDA+
-MNC*8)=7)SQYJ5M;*NW^)>3862XJI[''?<WX4LY.B+5@TF$<W)Q,HXH_UD!J'
-M@I'+IXVV8%6N,:@J,*0>,)'ZGS%7R@KX/RI*;\3FJ<F>3:`5-DDN?M\GQ:?`
-MM&!="%>ULO1U;(\?_8I)+S"%8B_,Z,3:F&X*.V5-55?[$ZD`7PVN80)P=U3Y
-M&@EHD0725=0VK:.,$'K!3592LBPUU#;80U7GW!\THD2-=%Y`?<UFU6>!7PQ?
-M"UV1SI]&Q:`7IL8H3W&JZ$PIYD?W>*#I:3FJ^+O:,5WQ;)RY6M0$WMB86T]-
-M)A3(#!>0BN,A?R+NW#=1P;[>!/(^F6'.=(:B]X_10T:U@X.ULJ;B1N*_->X/
-MG*#;,PE#\DUE?)=57*HC&N`M1#1;Z7@X8L949)[*!V$J_4.N*'A8L(V2KY&@
-M*?Q2'<+W^H'`L6),P90)?ZNGI<F'NNH=E90U"@?HNI`S<+U$*UGHS06.Y-S<
-MI44+GH\'\/AYEXV<KL22OQ,8TZ:+A91E\T64`B.NG?C3DF*2R!C^#TUH!YJ:
-M)GO<)"QUZ&$NLX`:N^!(KE5Y+$@%KNN+M14:[L0>7%G]!A!E7:\"ZNJDB*\J
-M!^_4^"2K3LM<ZGQA8M"5&MD=CM4N:0%#($]Z#=MM:?%;]?3R'+XB2/BTJC.^
-MK<N1CQ"G[XUDNX*FLWVT/)U:!(V9(^-48.]K)2ZMJ@R7))I8D0OOR#.$%TR`
-MA`:2&W=ZP,EVMT-DIV$&?C.R#8L"09S.^46X/=?XT_9!$`<!PN5_>'C4YNVL
-M3KK4M',5@[SKX7;,=6I8V]URL>G3+J]<3?8U1T41GAFWG=>O$6-A%%1N>Y5'
-MAA5C`OGFC&`.QO'K(!N/5TU0MTOS4!.@X6V=R<7+GPK$>/VUZ(]-<B=%N<ED
-ML`:,<EKJ*5'(G9"ZLFI1-3]78R%]B%"O'\#=[SKI/?)W<D`\2U0URSC"!>N0
-M,!NU?9'H9B34VC116\#V/%?N3Y`AH8HQ=-.,1I_RY]?L29VQEC*!N0Q)@W"V
-M<J((@0?/B+]<ZC.5(BWH,^I'$_"'2=WJZ;\?(XLI\^/BO(G9=H"=>7+ESQEL
-MX'416G$O>>UK7J9&\,5/6M.7'1;=IQ,^;$'95%XPFEBHT35LGI6<5.B;1#O[
-MM^WBEM$5*.\1<M>N5\32DU:I5LKE27E*7:9DIPU.XJ74&X3;N_U"FH[9G?:>
-MA9EXYF[3NS,32%#UL?NNQ8"Q`MY?UJF\%B??OZN_6[8*<4OG&79=;@0_I2A;
-M2A#4BWS5+!^O77#&<,BK":<5]B@VN!59?T_XU!4CR+8>N$"R/?-DT6E;>8;5
-M];61"409>??#$0J/*[R&+*>KU#1CHW%%P#/+,U;O/^[G!/C;H2)&-DWKB%?_
-MRP-7HAN8VZ=)(Y-?2MD9/WDO9BW_BI%BHE[^H6%52<6`WM[&_W^1(U/X9]`Z
-MKC!MX(^Y)9(0:SJ?ZL<(D/#0'F$P<8SIC=`@!T%E+-.;E:&.>N]K'W73"A"I
-MR/.5P"<_5,.H:%.EQ388AI2UPFI!PY1IHR^=2!A%[SJ[J<;A69C1<6RM-)_H
-M$:ZC7*@"&/N<[R:DP8,X]=H7]7,A2F5$#O&?IP#A4OM$VYQ5<\G7SL7<O=57
-M5YKQ^#/S)SZOB?QO$L'Z9<)83=HA,RS8^U11R=$S\\2S^=.RE<I'&8FX\3`;
-MJV@R(6[>6?!9):BS4GF[W>\\4`\@=5Y:\.AP?<+:_CSU-4]5CWV\I!I2Q;N>
-M,"ACP/KL,G1GT;(I^A7F%'":\X+[+A/@:++ER/\WC$G6SHSS**)ND9-B:O[<
-MW4O;4C)P1GAU6MV(JIII=C:MB?`2<2N<6P$0K<HQ6%;.U<WU.<`3$":GVL-8
-M7U'DW##L`*IVB0K!SOW#B?7;'D[N9.?,<S=GF616Y5^"3=RG1"F7P-J"1>T=
-MC`FYE>3RU3582+[^_7_3!;QDZ(6-&:]L?EU7%_9&E&UUTXG@+;CU&6H5W%2X
-M=,GAZ`VGO]>X2#BB44LM1J<^U=AJF65K\]FO1SAO'K4$4EH[:.7B*"<`<AB&
-M0OCB[CPDXW$G1?W&W9],KX*X#"I;->V70/_=UFLQ]C#B0QU<KTF@]TXF`?$"
-M&^T%Y<YN'4L%63FNY")LYQ$G,M/Z0-63"7WHQK$5WN%:CIU;6SN4:7?L\,.;
-M;!U7MOGX\=*YFK,^@![24V?*M,XB$?+5<X%4CJ'S^`C>3["TN?P2R"2-=M[(
-M%*YBR9;'=-^%_)KII?-BX(N^10+=9%]&1G<<(HY'LV4$;HGG!/NC2"K$EC%N
-M<!\S!EID>]C/=\A?'F0YA-M)O8LN6?J2P+KC6!G\L/7,Y5J4_C!?F?6?(TNA
-M1R-5<CVH](2QA;DUZ^(I0BM2L5ZA)Y@Z(P/FM,0.HW6!0A[R-;O`SU5P/SUQ
-MT"N;)Z?1?ENJA3(5E3#2YOD.];X^4[,YG)3YM4^V5]J\6$>"O8MN91<$R8HZ
-MOJ/@?&,$DOIYK5T;GF;PDI=-'>HC`F"UKP*(@/K@.M,E\,D6EC<#B:"JT_%!
-M,A-L>TQY"%[,J_YHRH<N'M*^4VI;QS62&5>O+3B=!ST^XY0.]CWT_4=4-GKF
-M=GTS/Q%3405:P0^"WJ'BFDH#%0!*Q;+^0.NIX&SD7\=G#-8GJ@XI6K]\=J`?
-ML4,6G>L$!MV_:DFC@91RW]9:B_.]LXAB+DVZ?:596RPY%D[6UQM6K?#'54GB
-M=^*F6L/&LI=V#>RYKLYTB0G5K1>7MEQSQ$3$"OI1VBK?L^LQXKQ=MMLX)E`^
-MSXQYGCY4#`-B;<6?YGX5N;=J>X&U.R1_0Z:_X>Z8G&9KQN@V\Z`.5M7CHUZ&
-M6X9-\%O1EH-#8XWHDJURS!*UL,6DQGV)I^E!S-/&GNG'[V#>=]%+`O;.\E_(
-M\5A^%VS"=O:-]EJE(:GG-Q5LA)+=%;G4.,R%GBLP]"DW<MMUY$WS%V7>"><L
-M\4%ZZFF=6O.W^\EC8O1B9J92<A1X.8)Q7GZK+VER![^H\W8!"SHL'N'TUQ/W
-M[QWHA!PA/F*:&PPW?WC]^WC6K;L?_J,9J0>Q*9#8NA>(.#L$[NN#4$[=%V6+
-MJA!"\+SH[+ZDS64G2Z:]\<4(`Z\WQV7_?5KC$,:U,*I.A93MU"5C*/3OWF^N
-MY5U\4*=B69='G@U.Z<JX<@=P+LM1[A@362.P/`RV7N40%'I(]/@3FAC8ZCKW
-M%BLO3V*[:[DHN_04+%=9)D307=.PRAV'X=@7TC^PA$++WM?-U&S?)2F@N<GE
-M>U3-F=Y(9MH;D=;DKI.T7H.LHYK(;SFH#W2TGC&^</"Z?L>^B`3?*)-]<U6Y
-M$9?+]KK<?/;4Q;EV\R:'X7.@[_IN$F=`K/EU5FJY:*=/:8+)\HRCXF8R&OON
-M9A>&XF0=FN];0\J]&`4,97O_^Y[FX\MA%0HO7ED*@!T-5KZ/='U<!#.]'H/^
-M9J0/U>\"BHX&"+Z-NO2J93U)*;0U21E=4)G(=6_*7)8/8$@;7^'@>6P5U<PB
-M-:I4>E?77EBI[7G)Z#RWQ(:GOT.2=6PM53(JK/(Q5M+M5!+N2Z>[QLE^I"3"
-M_GM*/%Q_[S?Y5NON&HH-OV<XVQ^SL"<.YK`J>)'R>YINM\W=PS'X?:Z\E![/
-MOYL=YW%4P6'[!B3&-[";FY5:/14I)DJJ^A`$W3?5M/>YVK89%I*,J9++%8[7
-M7,&!*/M<ACOTOLPQNS<.,>?Z=EH"`GH7$[Q[02J8GJ1]+L)G2B):1C:T#BK0
-M34TOI/E<)@BM-$@W1XA;*UBN+SA%AS(6^Q>,,?W4)U+Z+L2S$`W$?]F-4"QK
-MRVY!,@?+Z^7A;&:U?-025].,*NQ5ZU@HI&?1C05DM>#,%ZC<>>9C]3=K#4!!
-M'Y0=%&]K)[S24Q9%KK)D6F%4LYZ#X2KVE^N''=$O>S=(91#VXEM9ECQUU7X4
-MK^?&$M^W,:%;&V$E[96O^`5^@UG12/.'/Y>SO(NE@RZUI!&D)3^;4A5J![=9
-MX'1^$AMTNB-?;(5*(4,PD1L(!K&KF3,MA.2\@_[@#GQL\ENC>@_1R138&`Z'
-M'==(@&?K&Q`A!7J0#IE^A:\,)BONS0CT('>Y@BJL!1O6T%7;'U_V<+;$]R[V
-M&_6I6T'[4EG-YR?-@R[4)/P.L99EXE-M6CRNB54_A?L\)4]Z'..=;^_YXH5W
-MV=C0P`:34M3LSR.6,S&[F-6PB46=)PD2R_*Y+'5<T9WXMR*C_VY0*SGF.`R.
-MJ(+)UY`H(YU:U]4=SQ;&[W![`)O_AF5823/B!#-:+;/?5'3[O',I1=DBI]Q/
-M;FS'%=F]W&(#>@H?$5IZ*QVI%[S*R1];4Z@DBAN_TBK41T.KK@4J=)H\UY#V
-M,$2)3%_6+?)EJ@5M,-RTJ(O[U]!"$!5((LKP_7C;O_9"U0?T0G>\;*=F=W#2
-MFG".-87"3VM)<%>2%9F\;9L2W4L;/AN>TU#30W2?9V52QW+YV6*<E$82NR/^
-MKPK%8*P@J6F1A9?<1LUT!48SC[U6=)4.FL#D)ID:C(O0>6Q"4TRU.W/9]%YP
-M=UW030;';"VAH"P_D'Y0`FIF47UR1A9FN;IT1E#CU-,O0O9[2X"=VEF"=@TR
-MO/RO)UQS"#RW3E]LD&RM8%_Z<$"&6+MX,8J(9KI;;YSZO&+1E[!K%/I?;07G
-M6)^-X<2[+6\MS13DJUVQS*@6/!)/=?6<>XTDIBO;OG_P'43I/ICY^Q7G"K!A
-MOT9WY#C`^*EO/,[19/DR+6'`',9DN5ZWC!;$;AHK8U;0=TYXM"E(VUR>:^#2
-MI;3.(Z#KJUBXJY?;C;2+C:(`Y<G.O7&*VAC&3B>]/X0_?;/YQX$7($DML/49
-MFK[-.9VW?6=!%D]U)'+RZ@_RB&]TSY_GZE5PKEWZUJ8M7FJ0Q[C`@+OONQ1;
-M(S9Y`0&:[7#0%JP1H7C[/]QY=K;'Q58W/;Q/"=%>B/3H,2D\@0"Z9@5A;<4E
-MK&@5()-DC(_^++-%Y#E&%]*WI!Z5;F`K)/T;=I7?W`D#P"VR.V="XAQ!WM,'
-M4:N+:349^1U@8OYJ0`IU9-.PX=JYZ4S15FJ02L1XCDP%Z']O-'GIX1!1!?7^
-M]^.(G7/=FVS@GOPAD9U>O%U(#2HI<K6:C<^\IXG2:_,[(S:.=?:R)B<FQ84Z
-MKO01TY0<MTCJ$S[N\($[T*$,(W8/NJ1J^P.,=>$9FEOE\HA\D?/5ZTSO!]5(
-MPA;N]FV3*FAY0Z1\OI\+_P3RT(5T&6&*)VF<!@Q^+&H4^.*VYF)CF][UP1\:
-M@BB!#_"D?`E_#FT;M[X^1O8>5V'/%"0QPPJJ"U\-=8LEWO53^=N4!NF3NUKJ
-M[0#;QE-=]0X//Q+RD#??<^G]X1C)I)T]>_N_A$Q=U5J+I\"F&<9W-*L]_`Q)
-M'(B3*:?B5U.JPV2)[%?)<,;R2^-0+;`\.J+7!Y-YX\9!*NV8'Q9J*7'9_R6U
-M&2:T@O>J8#;L(8VFX3`WVU#`7`^>U1Z\PVGL*N1AGSK6KAGQF=$/SRV%[JF3
-M4[%NFI)56E26&-6JG1?VUV_1`AV`L'MCZ@]NG.V\7?P<<J-[.$^=PJ.BB#-H
-M&&_\&29ZT7S;F,+ZH"6<(]WL(^>I[I5)>87#&`^?`_!!5\QY9T>.XD3M>&SR
-MPX#[.^L`<)(*CF;%G-Z9)-^X;H/_N7`\5GR0Y7E6!S-L-N+M_E)Y,]GVC/OJ
-MUT/B<<D+GM%8"ST]Z"'LX(N4,(0K]?:_,R+RTYU[0F&`XT%_8S06<GR.IK`2
-M]=W,%GZ&-X!NV=?*G"&"*WJ"L1\>]A])X"H)?I+GF6`U]?1/6Q^Z-<#C[W<T
-M5W!EVU`*M-(SN[FMF;UF1SM/OR>#YN;],NK\^=^[ZY%&+Y)+%+5>W>FN4NR9
-M9<V1J!P#$=[C;<\(,B/?VPR:6)Y[P*C`)_U25(E2JR?)Y8]@Q$6"X$0AJ;U2
-M!EFL[X;4\TY^B1F2SW%<2L3F@5*F\?&-((9*0(];9$09?>=MG,5OAW0"YK?E
-M/W^3T%LN36+<YUC/SLB,YNKVI)>..5I:3Z*!Y0&T5?U&%<RY/X'Q'*<T`\#]
-M:-M"];!R^](?+F.ZK(V>*:$Q=@X>X7\,BL:9FMAZW$`*<0NH'ZJV?JU-T$6[
-MQ)>$N%)=:V6;9TDFRV:X&BZHHC2.?C&BZS@::&-<_^AXX_1)=Z!B.+N#R4/P
-MUEBK7%7YO2D)K(G+$U2J<!XSKI=8>/*V8<@+7CN2N="C*$H^<$VU_$WN^CN`
-M,%02KL,@#E2IBC&S,K.JX[;O.4]U>1Y(:++2F+73F&)1H)B]6]\BW(5-Y]`*
-M5:XOXM4&G^^&&,:4/3OMQ&(=/-RF]BJ\<T5W_\BP%;)WN:G+<:'I:RO24,EW
-MT$]PYSI\/"6+55[NDE@^"V\WB4=$@,IU*,W9PHBYT=#MI;*9WM8U6%\"%EK&
-MTNPYS)?MD+%BN$:$#)3%\`KG3KXS8'2MY_I7M.O?'XNX7V.><4L!(W&O"%<)
-M,-=H/I>5PA50PH)C(#4$&'0:8XQRH8G]9\WV]A#NO=EVA41V(3V[`G)U?Y/9
-MLE8"ES5Y+^/;$,K"YK#HPA2PDHA%)+7^%*,610#-QT/W`4_JA"/F."Z?>1OA
-M^NTC(H+H3PAY^;"O?,!\#Q6QBZVYI9MS3F3'FWQG5+QI+5RABJ':2NO&'C%@
-M^V8Y&"3H3IZPS(W%-""N-C8UNTJ2E7`XR?*>ZPC$G![S_Z<H=%0QY/P&.8TA
-MM6R#!C_D&<]\TLC8M9^*X`J%GCK)Z]&,LEKU24CW%:BY@AWSJX)E3LHT*2&O
-M,:3+%>%C[,%>[&<Z2O%2K$G.BGM[$L0_A@QF51RP%.^1&9#Y+2S<3;-I/)\G
-M/%_QXAF4@Q3$1YFT3[O;L<M0Y7WG9YP%$2V2_$3I?VINTG)4-2\<'7HZ9&G<
-M,'ULRD[&C_%PX7"34GIG[W^V%Y9RV-'=$/@*M0<+*>K),L*"IY*N58.:[_U2
-MJP8NG2LCEA=X3_9/K"^:^_`3,?1<KP-^GP*HB@1OLQ@])6WHLSM1$8:EG3O4
-M^JHSRK`8>4">[8#.QW\@NH1`F!D/(*.(JRQ\PV;VM1:6L;=?X2C[\2PA3C7=
-ML"?H+HK\2"P,;'3E?S6;W.'[H#YNE)<;,V1M<]2BD+UQ"<M*Q%Q#!J`[9-[!
-M/W?A?SN%UQ'8YA4@J`R;[<ZV\)!%LST;4,5.Z8*7>\/+5N(#SS$@C=U"_L=B
-M8F.&XEBQ[YJZ?&F%8\=?XIB57+FUIR:V.:]%;D%)5::]'*J?)84"O`BB_TH1
-MM9AW!OJK!%G\ME9';NT1J<YA"=[GK,6/S]EEL"W8"[6VNX]]:8[+;Z25$JAM
-M;LMUD)P"4MN&"X%#^!D?41*H#B:'<?WV*V-/)C<R1#A9S:7N"6.@CI*S4@&5
-M-571'-=R!.J-`K+NI"L'P2"X]5TX(2-@I7:V7=BTXE,N0N3Z4)_NQ5GQU&K_
-M%+_IIE"[.^#*AAV#[/[&#PO)M5NQ"P9YB7X_XQWAZJ=XW1U`9A`$\B=M.0[)
-MFY)Y>!(#&GIMNX1=]1\YJUQ333'M>"N)9=>%3CPBKJ_B0NFM6XD,GU@=\22)
-MOHU$`^,=6"$A';1A'#\D[.?9\7RD'LA`VJ%'H.'^2-<"22J``']V=2/-]#6X
-M)LR1*O^<P(3YHP*#IOTXU+:1+J3%]C-)WX]6I3+OM@6R6Z]_Y7_%G\`L;=)&
-MF0=3.,1=`0Z?SL5L&T]#<F]`C]FH3T;)1EPQ'6]=:]P$2P$IOU)[+1SL)X=L
-M?"M(F/=TLM,.6ZU?K_N\>267#SR1J(B5R^9Y8=SASFEE;^<F'KMH.Z([2\H!
-M"WX!P`K&!79[L]2IT71CF,ZT*AW<:$Q78=]AJ^\NK8FBW>\KP^45[RN03!!M
-M3Y)/8RBOK#='/<3I<'!/:;3/OD;^Z@UJS:!K<L(G>Y(`<+B7;3^3T\-:^!]8
-M5U'LQ+.]/UGW"S8=(9,F@)?\P+.B+E%>\7G:H'UWGZ'(JHP7,M$EZLH5L#D"
-MCDA/M56\4PREU:)VG;<>'J6`CNSHP>`,(EGN1_4:FX@,4(XE+N\R^/$=")6M
-MJY<"&/DF,(5Q3BZO4(.3G_K?R,-I9^5'R\JJ*7SC]+>?-0&B/K!(7^@S[S:D
-M'\MQ+*@6,>00<I:5M_R5!$X>,(Y5P;Z""F5`3P#.)O/JTS.J-^H9/EF&Z'YP
-M$SPIC*Y='$1DD7C;\K50P!L7)#O7DWH[/K]#6<*<(M!2=GLHP!(\56W[[4RL
-M07O2RQUS'*^U8*7,\T+F.3GFV1]6.VU?)-N%VBK.]C9([93)-ZT`WMXV;WX=
-M[))]+S#['ZY164%7/QMYI4=*!RZTUOR'PVT;Q9..FX7&?'71Z%L>H"M157&F
-M++N)3R%8.E8)K`XM(L(:?MQK1H@!`$OK\>O#/Y&!^"6/0IN2O5^8;_GCDD6U
-MOA,H"A5-.I0=2[2"?,<0?4_F[@7[LQ8J6A3U@DYXR>;.OETGH50Z@4Y=()(B
-MB:?[;!8X2LC4O.ZF[VO5V<B41%&(K[9!`U>B[.!5\V8?*9K=B5_0@*$&RN,*
-MW=F4T7=0)/;4+L=[L$SCHQKK^DE0J&<IOF5VM"<$<'QJFUA<5?V6A)T$Y,A_
-MA/T`ZRT<1']K>`63MN<*1'L8Q*2B3#""!DF:9R7:(,K2FK3:+\TPXXP\(?WH
-M=B5O554O`UD)26'W+`A<Y%9LSTDVN!NL>K(7BMG>6^.]WKX;!?-8*&1YT@Q5
-MW[<U[9KZF[22'A;UVF^=6DR)G>#LT=;%$GN0NH`:AG]L=*JQ-3D]IRHZ]U.;
-MQ@F0'+M4(UIRO!3JMU:SY,P/OH.0SWP*>>;;]M2U[9;4+A""[0;"'H9;P66J
-M<X2?LG3`8T>:'?"1J6T`%K_2?XV,LWS^LTS6212(U6LGZ`9`<4I:8QW(4@]H
-M2(?R/2/H7B46?I.L04V\=0=GU&T.F4C2+^M_+P6&?-+Y?X=(P8!J;ISZR\]_
-M8]2?"BB;MBWMN?^-O+8J!TZ]R@=1JC_0-L-E18IA3?,[VT69<%VWX.N0<O@G
-M/=CDWGWK-98^*2.`K!HKK1#>RC5#\N.:`0NZ1E$SRGT^4S&#W90:R$WWB\#6
-M`$XCSVN8NOC;\T=A4_Z]Y(HP#@/&*%2(.S2*[+PN(`(MTG<A-^`2QHV18O.8
-MN//4DQ/C@=0?'Z&($VD$[3;_<__><"9,4E>"XKF3]$E6X@T(\,%->]GG$1>#
-MC==G"7N-46<#I,XU6K<^2.\30A-5*U0)OZ2UCS3UHK1:*BH5&U_O&O4<3<F8
-M"+9V2;\:2X?.D:;QX,$`6U5'W?RYR6P2G'5FT-Q-LIJ&;Q=YUG<@"'<\VK\N
-M;F%Q(ZJ7-%EF:(YYDA&JW*;/:UN.:G;80KB>,X;A>.57+.,BP<B/_CO_<D`!
-M5K]9"A6I%2KXW391:;36H@;;WU?S=8#]/MG0VF!0E&O+?KI3KTZ(18,.?VW=
-M+,3241;,<Y7:I<(-R!UV@(OAESTI8'YSAF8DB2VR?V)Q*,<N#^AY4/G`CKJB
-M@B%.A\M35%-_8EL:")U^H.CXGQ3UH2**UY'U8X@TU/.BY/0P)''CU$D=T=/Q
-M^R:1Q9?+$W53OL)..9Z%H"6R#&I]*F\]ECJ"NE8^VS?,GW0>^//=*1T-M-K:
-M&)FU2ZC\*=%JSVY8EPB^*"49%!EG_+H$%!`UL`]@WT;-4TR]3;3O'CK0'A+X
-M$Z)X<*RZ[EQ+6$R"2.GXR0R8DUI5<QVF,V3+2+?9=.QA`_\VI!#2W&X_\]GC
-MQ09.AD&N>O"\CS^_G&P6^NR+YII6Z_!QYR_CIF8[Q8>`$6*6R8!,AR9B$&&*
-MQLR:H_?SI39Y]A@VLN6H(I$H1F[WH;4MUT\9S.[\9"_LEV7(SA7#8T84:F#]
-M1+FR3Q\&B9XGY>[/P7*S^,.,C!&V`02(H5VUEAOE6-3I1_CMI<[$&'5Q\%XH
-M/"6()*4L?.@(VQ`/9=GSVT]]P%1YD+?=84"-Z$9<INKP:.[HM#;<'4?J;`;-
-M3!E%-,0555)5]*H1U`*?K2W`185Y<4CMXAW-^#,M].K"H?%?$T>5"#=\)"[7
-M[L>9OSM#K.J/&Q-'[8WV_?E<^HX&^X-[RVHVE,:F=$V_'@(JRYLS[S##%DO9
-M0>M,%GMC/@"ZO]SZ`FV#'MI64ITLD73(;EXX'D4ZU@LN;**FXLF0L`832#8H
-MF[MQ;AN?$7K/7.,=MS1F<<G39`X3F$!`MJ_B'N1C57_;U9?G3F_,/@`#1E/"
-MR[\D>1PT:`R\'XQ(/ZOLKC'#%,8L$>.V1Q[AXOC3IS:72)'$_=2'\@,T$P7Z
-MJ+&#,>2=71]WC$+SQ[1QM:`EQQ"OBXJU)T<%J\V[6YX6YQU@WN67+?Z:UMF:
-M.,+]"GRAI_)R*-9SIPOF?-3E;8O)BMM:]ENG-0=_BFJYI.T&D$?$ST_^C%L"
-M@..TVDQ'RFV#24M0LJU:,/)D<6P7+)06[8H]&KJO#7@?`SIA4\Z!+N>*_?P`
-M</7+8^;@/5O=^P,.^\V,O"CDG:`HL_%@?(Z7&1%L>Y/!=&HJKJIAW!&(Q*]>
-MLH3S2>*IF$G^4,W_I5\<;XV1L3>'3/-6JS$_9Q_*'M!\,*A1!'>HZ&`*IR2@
-M0@H!:I(%"SS3KO`N1D9\)Q8SLJ*;(H(86B)M+!U>8M%%0F:*H+ZCDQ=RQM(9
-MK<,;A$S7_<H_?\\$)[6=5SN=8HW$9SG?JC#X2`_>0)RG+*Q3,T>!=H?M'_C`
-MW$>N1.CPT[[A[TH/N8L/`+18TO/2N^^4+Y.PKI"SK.#-D_W198URJ_+'Z8\&
-MPSP*:;7]EJ)K%9*\``.Q;Y0Z@EE]\E":^>!@CV2X-OS(<51T'*[#6,M1#F=Y
-M5A;+GA8P=0PV[?^O+N-83?P3WRNO?O(`:\C_F_OX-%:6'*F=0B:,NT8+`3?R
-M:B.)VX<X;"NW>5@R>[3K,FC'8Y]A@6@E]P1?)KC-%Z;3PJ*^@"DYZH3?5%QA
-M:["TZ1\3RM08*=IQ#D_^7'"P_$V=L!IE!;+\`!V__LEE>E>J3"9M$D):Q%6R
-M:-.,(S.,YD:+N]48XPH",7#0L)>ZBU=F4R)K^-WWH,<$&:D_,D!<K0"<;1RR
-M/[PB\J0;[6LLI=L28OM1T\9>:1?H_.8LOC>STI9^&$01AT-X4M8`W$Q6:KWE
-M`A`[$[4-R)2'6S<C1O0^%FVD\(2C=]/!KX]"N++(>?H`_`DUEO@2`$,W/OCE
-MYU/IZOR&\/PU82@):QBUD11A_G4$U&*2]4/M8_#*+?-0FY">]NAQA.3ZX6ID
-M_61H!>-FF/T@>?LL>B46G.C\%9K3DCL@XLVG4BP:M1_9_/CSL=`A1)R15(09
-M"-8302RRN/VB\.<S<X_KMZDO3#K"=DMA/6[<=S[):K@O%C/-X-(TG\;WN%O\
-MPA*:!IMO[J`I[/T$@PUN7'''H%IG]=J*N>\<^1N*IT8R-4@:BOJ*==`+*)F=
-M.)Z@+3_R5)1_DA>/A[6:47[U8*\K=O>!JM4SH.^"X-JYY2H1"6FBBV2""M,U
-M0XPKQ;UJ;Z[HTTIRRYG"US/=E*RI'ECK.Y7*)'-*R1C_10;WAID8@+3R.5B`
-M8+L#8AQ[8F.!>-\O$7J^V!T(+F6?_0=FAB?%]1^=DP[[Z^,H)10E8)3&:@5I
-MH*1\F\V^X$[S4'X033_.._PD!ZN'F`+^44/4$6VN1D2G!!\X0TGG1@]*GF:M
-M&T*F1[K\N=-9$[030!L/MO(T<(X1DPN\1T07AY>%R()KV'[,#FT6&$I1R7D<
-MJ9ST]W<CU&6_?'S%X*%NP2YIY?MC`-C#4.0/C\3LH[]3.G4S;(Z13*,%J;]4
-MX_U!A444CQ1Y;)NI0$=W`(/\7Z2P,+%-ILU.O,UV?(^C['L=4;@E'465`S:M
-M]TX[7'^TW8/\BP4PX*P"E;J!F@0&>D]H!!%F+'I&*O@U8,F*6U?+>AT67=Z]
-M'VT50EX._#LXE'7UFO1J-*B%.?&X;4=B\WB_&B?^`GR=C:<#*0<0I%(,]G=&
-MM4YR;FJ6@?.?:Y(?)6JC6R*\5UO-L_I6=I!]6%S;R:X-"^5.=:P6<03ND1V>
-MND$O'^IC(-_`!5@6_8U;[K5!8;<),K"38U3ZV3CLOI=S8H\_=?'-20QY_`%Q
-M:B68X^I&WUC5=&B8,#&VQ-LUZ>I61UUI:J_G*_\F_VR3U4%3LW$C(@9T"Q1%
-MT:O[)=J]N_'ZJ7%TWY?MJ!BP_U#89A#*#`(:$^I\C8]V%:[Y!_YG;/5R?`EW
-M[?]'".`KIVNL>WZE^R3P]C$^-MZ''^0%=VY_%SS]PH.8/M(%>4+]&?_?6+S:
-M[?B!6Z$,VQK<L+=IO<,=(U5.:87N)'WF)<$UN\=62TN!"04+)*+SOOVK3N$\
-M/E+(T;8#X1=K5OHB]@D322NZ0A%%GCR-PKF1Q/3C1Q-3=@[8BIY"Y3)&L.K$
-M0RL"OO>;_J2/H3.'LGL>I53ZG`155Q+'I"HT,FS)K*&M5K$R=R4M!V#OB/A;
-M90P1A6LG4'\+D719!H)"DP"='IQGP0F*UYH8R5#`.M7_1P/%BVS5V]>U,:]&
-MAW485;G<6-T9U1W7BV8+C^D7L#5U\3"3=1EWM6IB`'7KH&;X;;M`SJ:YW1V8
-M$,$][US]E`U[*405?'<)GQ\."LG3H-;:Z0(>[;4*%;6_>!4_!O_*)_(3$L`;
-MO0[P.]3PU=_3_]]3#]E4(M8816X-YTLXMXL0%*^]N+,/.:#$L>:DXU>JHZ6)
-MFS[T''%^L9%CL3?P"[SEY,62D'QOG"0+-:".>"6<YG>'#XWGY"8)D9_A$#DR
-M2T<'`O5I9+,LN^=#/?`-SF74RLF\LI[2./11BGVH%=$M$(KY2NI#H++9\K'=
-MF'GPQHP7NXTR+Z8TO!GD#Z'ECU[B+Q]"F;(Z0KBNM"35W(*!Y[_32J.A.:'>
-M6$5SN$8C>L\`?THWA;?'YXP%@I50:_<L"A"@DP7R&U'<N-TZ78*$%C@`[?7!
-M$>_J>I^B*IFA@GNY@V==8?K!11-`Z!&QO'Y".X;IR"Q'H1LN%1V)K&6)GID-
-MI*]W'94S<'@FHO!U61J-(IMU(/$P/+B>]^K"RJESN^GAMC@;<:W^Z';(B?2Z
-M-)XI+$!,[((MJ?&X:YFFPV;JG#=8$Y5KQH)HX/W8J1+;"E#KF9R>?:_^FD0?
-M9MYLXS8;3BQ8!)[H'._:E#;VF#YJ0&;U_HD=N)E6`>6?A:L>!;;B]>&>'%J!
-M`J^*;V>><0CQ+U9%(H!1=*W;L7+E_'=/*H1!$-I'7<T[.]:UQMB!;NP/'Z0;
-M6D#;?9>9Q!(8CT/;SM:QN(P?0DX#&0):MD.V_`7>G%$:K,^`@I(*G>70]+;T
-MS#G(N%[?&28QA8*DQ]Q>M`ZV=T)W$Y2@FZF!M5]']F,X"4.Y/>"::XS\8#WT
-M*`-=+R$J(&R7"NF:+AF>3=?ID41-+(2A3Y8AZZOD]&)+6"^7-V%I/>!CP"R-
-M$9,-1<:G-\]JBIZ&5^MZ&@17!?.>5A4%K>I>"\/N+^RE:M3'#P9?!3#<?D<<
-M`[\\Q=HA1'+IQ+\";P&XLDP)92"&M"'8.K2'4!"1=.,K">G]N8/,,!;J%CDJ
-M#C^N3K],")70:N`-86TK]D,\6C";1+=,9*<65*R-'?$,OHSZ!@?IC_W,9]+.
-MN]XC7]&,+EB"T'*#2(F=E<L^*<J&'--OXJ%+CP/RV('O)_K#`SZBI&R;1"(6
-MHFZ;DD!6-U$*/KU\H0LQ4'O:NJ[B1ESCL$)53^6<7_Z*FFER]"E)I44&:[V3
-M5.7G+IW!!BVF=:T<NA<2=&.Z)\1[99\S/XH+\6.V2`NNR[J#T\*<`[T:#]K3
-MR=E-)*,MG=,&A#F$9P^8T[]G(NA0B6\L\0#WR37T07S)W5&V(YLFDW*E5U4M
-MFU_=\`R9TB:-`Y_/T&H]"4OL$:2\G#G/-LGC]8'(74&<(#PR5TP2AQK87UD,
-M]WV#%,%:TS'5`)H>>-K.ES&LS9_O@Q)T,L3,'N8Q#)#!-#=GRR1/L,A70VMZ
-MI0E`KI;:3`.GVGD$9-L(RZOQ?]@([KT&M`?!U[E![B^)S/@\X=/'Z-&46_%^
-M$E[[-*!LBZI:5.6%8X?%/[.L/!8O<2>/AC%O4U4J5K+';H*`(W+79#LM,8?_
-M9Y4!35H=X?DUR3&/6LT?!"1-HCNV]D(L6*U0GVUKK"D4J//73](J2XQ6;1!I
-M]G\G`$2N.C2@/ZE]<'ML$6D$Z!QNV#31&QUM"O"+H!;<_1*C*M;M),\@J6@>
-M5*`\SZ^B(4Z!!>I&AZB%FAA%W&J`"85[&$C4A4BKT:T\PC&AOV!%]>Q'2^?J
-M;$#"L2OZ^$'C14@4,QQ,D,=@<@E#/*U2@^(5>W;1(&A<^;BGAO+O.3-BR]21
-M3@GDK+96PFG=3)SO.1SM.2[YY-0>`<:XBP9&>_Y\::N'^>!(F%:M%D9!(M3B
-MY@LK!AH0'3E<`=%BG,BZC2,=U/']YT;EY%DB#5@M3N<?N^V)D=''HX1[2ZQA
-MQ(.'^TNL#)4M)^$]9:X]:[N5!+5D"]O[A.MZ.GYD#2VI:C/J^8^9+9'^#O+$
-M`KLYK<D\@34;PV=Y;L2&B(UU->?-*_\`!^.[6T6<.*6&V452@2@F6&N(\]Q@
-MT;[^C@U)!&;-_;'779\QU(,,P'-;E7:2D<D>^3NX@[J$)A/I[XMC'0E"4K?"
-M7A`]D2R\/4B2IQJUSV\K!KB*K=83&)*-AQNI+AMQ_3"24_MDW&ID7[:2:5\<
-ME2M.]^AX/!9+H"XVE*EEC'\<GC0_%42ARXV$72^YUGA?+^HX[FXL+8*#@KJJ
-ME;60&A*R;4JJKR>#.P/?<X1T?7P>$(0X;I<6D9(G__$)NK--6!P3>JLP\!2/
-MC>Z'^E]D]V;]L+04,FWUVLEB*DH,46:B;"-B*Q]<CV'K%;CWT-L_WMNSH;/=
-M"9!B8;)11,.IP'*$/WG`_Z>V1"(7(MS"OP5&:L(K":?*JCOZ`A)"N)!2W3G(
-M,SO:6W;Q?+@<BOG#;%3;4>G=\YU]75;/GSCQ7C@I<BIV^49V@MOI'@);084U
-M!+;%V`-8M_N#+%/WW(YB<LB@SAHJ(_*2IL,SB6`,M9T\M4FXT$_OZ^6F?9&"
-MG<(&9&F`O@W#CB+<6FE@8D2FK@*P<`41(NU>]&^IG'@F*/HI`T#,'&U.XD5:
-MR$\KNHXU;'D?K1ZN@D]QO^J,M]M'ZC2<'?58C/[SZ]G,8?%:I]-_93][N!NE
-M1O<Z$G3N6;"2P)59XU*%[1J%;_>]@>2^C]9,TX(52]6M6+\B=JO+N.(\R<%@
-MO#I49FN/>NY[I8B<HYI,)6"@I%F'\XL>6%%SNB`R[4!NWT1I/D3C0HG=2Y.$
-M#FOPQI76=/,*Z`)*OHE,NXIMS7_<K?:T]OE"X[[+/*?TV+?\^,1XT/NKT;&M
-M7=0#YA;`$?[[!%M`0^5NIGAS;'TS;)+,5TFCYM%7%,P>YL2)SS3HB+FL5/S3
-MVD#+X_I&O7U%^6!GT[C(9&=UO*>DX6(GD9BZ=HAN<9H0^BUKXF"R0^,IO`)M
-M,,T!1%GD<!%_BQM>_+\?9HV7D:]'#_3XSI3Q6^T@*==?<9(A6N`4VC:$_)X"
-M3XO6M4S`MWUM%ZK5.'"(W!BT-6?2ZSGY%C[V,@\6L4UN+O\-ABF;YPP\H8@S
-MKV7`>:RIQIJPYJ^]\+(0_FD/B:BV&@DC68&0-K]*J&C$\JX<&EUK!ZWG@]NN
-MW#]Q+_<4Z0^JLM]$+(U.NN.[@J\BRL0-B80Z5?H(D3HML4>QW^$F)/,$NJ3:
-MFLY2YE4`J:%$D"'>^:BUWP3_HBE$/ZU")$00:=L$33J"A:?\B81*";L@7=6H
-M:\0QB7#^NEGT'%/%NIL#!:^XP3_L@:AKL62T*X9\5Z)=>"]9?IGS"!T?VFIV
-MI'+]^KYA`/2I%`Y![4%.5GW%@:Y=:!(AH4>C/3F+!,W@=,45J^QMP`^3S^T,
-M;(SMODVKP&%R+NH[M-W#XUPB*694U\!SQ1T5H/B?1:_&^,3ED%-^UTZY<=&E
-M%!][/*?&\YH@[S),F/%2NN@CII!_0KS^)7$B<J3_>JT<[N\?EK<0CU^XL$<8
-M&K``$NA033ST(P5M]!78P`=Q>\GS<E8<1N,D0`HND]KPMQTN_H5FWT;2:OW$
-M\^D1Q4Z4"QW+(RQRI?8+8AD.@99H(HKDQ0LBPL).2X+]4WU3Y`?O<SMO4FG4
-M;_S5%`EUU51&$01K>A3"T]9H&]K(0?R)21YS+K0PS/0=/]588@\.]$;:<#AU
-M@.?FPZD]ZR^0<@9#,)N(\ZS^=9:6)\-)3+KK21U]0F03I4)U-H\)'5\;VO[7
-M%#6A9!8^Y8`3F);'1U58H.4TUL3HNW0(5">D_W1N8>I62O.^BM%E^O>,U,'<
-M\$',CS-U,(+B2IC2"CF:GU7=QO)7%,3PTXU0FE?96/JLD69/U%@B!]])!HA=
-MH0,!UW$B,E6<OGC!PZ#.CMEU\Y@EC&(18WL!V'2\<?ZIXN"C/'[]8T'RQG7Q
-M06M3AI5TV[0PP69EHG<!Q'+8!:STD2[!E#?>:'=8CT`_X6]-?5EX]9-9361V
-MM>;A*U"3,4LFH60HKKT^D4Q8S66A*@\O+5&1=>/G'[Z\X53>@LK;PQS<N'>#
-M4QWPBA/WXI\J4'=_+>SXJ65/'RCE/$T,<=5.*%W=0U2>N.J[I7H3'GBSB[W:
-M`>J78=F_G`F<R2?<S"E&YT+3BGMIRM9'TJ2TT)1^WN326#?G\L.VF3Z?@LV$
-MW5C^*ZT+$*SLO`(B9CR::%^F1(8#?:IE2.2-SAT%0YLFNC;G,[01FG9]CD+E
-M9H<6AY&KP_0QX8LT>E0XT@$2U%2;U$,CZ,HISPEJU"CS(C5P/,]/Z.40Q6)-
-M1//@%(JS+P1Q,43$[5^8A]O$:2UR]8IHI]CK$KV?61_9"C^F0>S[G='Z5XAE
-M\*AQ7L$4CM/J=E'CHKT>BHGY\EM%4</"/Y)OB4)'BC_JG%LK+P.\Q*E`-Z`3
-M7=SZ\%`O3YH6=74'"1XLD6SQ#>LH=1@H2O"GSR/BZ)=*WE[S%[N*/A,^/[_0
-M24J)*RP6^B1F.FG=I\%+;$QBC<K:*8NR4(3&[O?G;OWM1L->QU!48$P/)-)+
-M\^,Z><^F]6#%=9]T?,QE"9\.^"/4E%K5U=;]M,/APJ!:F<P*S_C1*@]^_ZR?
-MXY>3@G7Y<S7Q(I\H>^B&$L_#\RFLH]^21"S#<>]WY%/5%M!(;ATDDKQS;ROA
-MR9IB"4WWF)BD\8FJ$6ZG&.W\KE'6[ZR/[HR6%MV&-3]''[0B4GUF%R>5?;A@
-M+OWT"8WKH"OU@QDDBHB^?HN7W<Z.P/>Q=8FZ/NO[Y<'*VTE?,ZC&J6F6Z^&>
-MZ$F$@5#\$/;48*/U1>8$YW<:"35D<8L';4HUMH`[E'+)J;=_FAAR=('B`,F`
-MOXK03CC\65^WV1M&2>J&X)CCZBI/QH_-K#MU=/XS0JGU9T4F`Z&WP]X/=\L6
-MGAQ:C62G"-)<*KUNDEO^]F^)FN&//I<R.3\9WS;;8&6WU(92_L1L,2_D6T^)
-ML/C>8QE5"&B1Z9\&?JPUOR50?G%EWR4%JCFEK?^F+_E`Z$7:7>WF7<X>+2CW
-MC!,6!6["I@!GSL1.]3GSGO%C'%7MCU5&?292;?3G>LOVD$+&3+TWC!.&\,W.
-M4D2XWV=4"K""*J)Z!/$<DZ8(2RV5!L.Q!0,@`W,;%&G9GI9W96?T#SK6Z5!%
-MYR&$3WX:$YEX5)J#W*+\JI;*X#O2LL#N/*W4,/2!`$R]W[GC2T$?I(].17^0
-MFZYP7OK](T+A9TE%)M<K>M)KI]@:.4TZ.&*53=.:[NB/^I69F.*3*O$UP8>>
-MI;<6(U#M1=_/Y=\\3:B5U49@F<<G%6654E_TM<,EUVIHQ_/-8UX`Z(R_*PJN
-MM1-@OSXXMAT[.ZG%:7??N/+67YOW0HK<*0CQS^RV3N%Y"5P"DFP!^A^A($Q4
-M=+:,[X9C.4ZD1%JK?K]#<<133@?87ASJ)8/737^9;J4(F-+^CT<*5Q-$L@)&
-M&&N'7R3GC4KA3>Y&E+FRX=1![GVS*H7;KI6N`[WW,4X.ZT^FSR?TH8XLOWSV
-M"K$3WV)4)1YM+2U"*?CQ#WS'&K*2F33D``_)#`$FP.XYV\F14<E?#T#RU:XX
-M/[APYS6!34N%"+?_.<%=7LS?P=Q6O_?Q.^/5T`:&,$FZ+_J((D.W9*4F3N)Q
-MK<L'M#9FQXM@M8[5#3J)9"_H7-A%\W4/K/+LI:B[8CKW96=&3A.X;D;4\:W;
-M9=R7%1NE<EKK6/O*(?Z/OMD#)9Q(XJC4N,)OD;^P342A<>;*<M\&UU>$KK\)
-MKK51[A5V/F>)P;/G+P?,(3+(M#SWXK7Z";9H5**@Z2)7><I'F1E?Y>Q8B1!R
-MA^@2A)*/Y"CWI3Z3KSE^!NN2=V-Y_B[:/N/I*$T^YWKJNVB,+'-/`1:59"<I
-M^!CFUKB&OL]UE5"XR+=8W'A898=$&9CW-OH?3.RSSJHF=WN+<BU/YV[04`(2
-M`ST!%M(@L'0:KQ].CN^>9Z$=I7`IMUT2[I?M#\>2A8%EE2K1VKD/`E^.[:AZ
-M!R/[HJ+`ISZE1A"`HM@U+Q&V8'P4L9!!RF+%M_+9@?+K(NU9\K=:9F4"T<D<
-MKS;?+@>(J>M\LT-IWH7_`7M$JO+RRB:^RHD*V42O8ZGRBGJ+C3T"2W&_?`T7
-M/HDMHJ8)9.]LB=$!G<K(JW0B:<%^.QX_T8/6I\&PN%N:N\XZO>EH#4()[AQO
-M+C#CKP;FL;VD''(NU$KX4'.0'"G_RQB``[E@CGA,<PAC;M#<SDB(GGDW4'35
-M[D0=OU%KD'<7D6&;'OS@2GH,8K392(1LQ%V!K,ZZ!;O4-]RR:"]%E="^6I3V
-M$ILF4HJ5/$O'5BS:45@7-:*%%A"LC020\Y6&<>++<*-S;V;#:4R=I+,!-YD%
-M8%@.U%+VG?YG!M8BV1H>Q@E@R'!JT<67U[S1<TH%SH4*8+`0+CV_!6<$0I"H
-M)-JU]5%\&[NS77<AT##M#/)'%9*1NN.]&_8S87!J7KH)V)['YC>J^)Y40T-3
-MUG^9,7G^-?USVF53)`/QWIJ*(%HKG?9K]8*]9DAHJ#.,GN6R/[5Z'\VP`KYP
-MO`2@1F6S'WI+.IP[CF%2>8`@O#X<`6](CGE&-WBD$&!O&?3/2>HR27Q[(%<4
-MM=$Q\L>=&`&L)Y?DU`/)*&[`PBG_?Y3@YG8KF<G!#$0J"KV>],2U2(<RO>="
-M7G"&?7JT;TFMN)%H,!?+ET.OY%D%2"BUAJHN[/D*V"USN!PQN1JH;/>\%(Q3
-M.CB&7H_L5#ZD_(/@FKP<@Q43XZEZPS4=H`U%@9/9HB"8&LA0:8KE]?`$4E2<
-MO&KS]OJ$^V1.5U5^:1SDI`_-OSTZY?>ZJQA!#'52*\-.^SI?OUZ,Z:O1MT]:
-M@T2*VL(7&:CD?R6V28)_^B%(&I^?!5WWOHZ^Z&0D4OK6:/ZT.#<0BA6V=%B$
-M`QB&R4T_T_?E8XWD^7]5RO&RP>98EXCNL&.<^N]YH3XUUZ'KA4M:[4F'O!GM
-MTBZ1O/0@AXDPF\;SZ\K`G[(JF;8D&1S4V3R2?\O)4".R/JFXV-0SP;]JCI6+
-MM'8X\6O]:1V0KW;<B!<3+8K)4[5-4(N&(9)2)?VZ@FX\$&?B#/Q$LNB2MQ<7
-M2ZS-(T4K">;_BQPRMQ3IV2RP`B7MFS76'=2]#VKN`.S=+X>.E9][EP?RG@TB
-M*<.DYIXA@.=^IR?RH^_D#'UZRF+(;G(HPYGJ=1N+-\J9VE3UD?A2((";4VON
-M;??QR(3P<4;WITO^DA\3'Q>1"]8)MD(V4],ANDOW_,VK`$<G$?MZ<?*%8,*X
-M[UKR,00R]5<]2X?XMPD196-G%\<AE\+F9EQ^H0)V28K]ZLX"!"5E(=08YD1^
-M,?<.,,23!F:.?+H9#4E3^:UFK^D8O'A<"CW\Y"]9$O7$$;*U][W2"`>$MCY@
-M,JKU85+PAX/Y^E:XE&0$"*4"D_A28GXJW8HB(5VEHUS7*2\_K?J@X5N)=/]N
-MH8AXN!+EW!(&6?$)ZWKW>[>HD*H^CEJI[_?>AS>^1<6/>P%BHWHHWF'LQX9#
-MJH?P<3L4*@QWMIB.]<25^M6LKKAJSMEC[#WMX_9PA9.L3ALT>D;ST(9;0[YS
-M"O9DFEFU73OB+=^,Q%CC7(8X<"4W_?5Y;,S0@0IH6)W\?UQG*+[EL;^-8I\<
-M0Y<NV.50#(,TIH8,7L4\W`5#.Y\QL$Z*YP?'1Y1(3*@F,*_RC0[-E82F&G-2
-MG,R!2*.VMKXY.D2KO%:Y=*&%ZOL/1NM<B0$JC5'=MF`]O9>(\V-`75V4TA$$
-MXP\";2;D99CI'@XO2?=3`3T`61'2<3*`</?;K`P'CH9>A6&L.OE?6T3[*N!,
-M?GQ'7Y+GCY86WG:2C24(&-%D]]8NG%IV.+!]#(2/E>UJ?X75QU0>'V.R'2/K
-MF@XP5DNP5E!3@BTLSA&<B62#XD*D7.A^W%LY)-<Q@_5S,ZEVWJCKVWS#T.S"
-M0G*OVS.WM""_943:9AV+P_$+A&IT>0H*OU*DXXT/ZZVK7[7=F7O8Q6-/%IRY
-MW*0Z]'"WG@``S0F^329`![>X/U.\)&1GIJBP^U)IRV;S.O<,?,/,I9IMTR?I
-M)5,_:WC.%4$[QMM&-N*^:W1^7*U<BFV8\1R-HGW!3NQJ.[_O?ZQF)%U].3ZC
-MEY8O<YL!:K<SM0(DJD](BP&#V?CD$]GM]N^W-Q>W&'A=<>6S4ZM'K^[SP9<K
-MJ:^BY)?`E(.N??[KF=5J\^YZ2-4=@>7'DZ24>\/!2&S-"BNZ*K?M5D]GA[M3
-MW[M^M'ZT,VW4UCSC?#F>Q\F2OS[#B5+]?8;0>EYTD+5%#->ZN\DIZ]:A@H59
-M01I5;")$NPAA)X>@5Y]2%-A9H,?+OS/AI9QA=3[73]L&/IJU8?5D((BHLD[X
-M4>0$$E@K14YAAH:GM;AR>_LB7&**'Y?E"4W(M#E1O;%A)_'NY^@4/#RH+?[_
-M.ATT8WG+=O`Y^7O),BYTOMD,0#''L=%9O2[CNUG)>$!O.?^%O%:BM93IJL[,
-M)P@)#A82J<+=#&3TY313J&2L.7$\82AI]$^K/VU-%G4KX]AQSS,69=3]&NO>
-MR9FWA!M\<E-P*._RVS8.I"NPD)/@0]>M&G?-_:>PVO@(V=-%;EQ*)Y<@9$P"
-MM\<0G_@,D5+;;!`=HQEQ67K+(6*$NC!$:4&.#<`9=>_:(^ES[#BMS*A7Q^*?
-M`3H*8$J>IP\KOUQ!>M[U`"#$0@M/4E`-WO]\A$667TJ"C-VQ9_H0@5+/";9]
-M!@,+!J8C@*](L4`TZ63[EQH\DG<IG18U&Z/T'[(>RDCPG4OSW%,1)%\1>ZW`
-MJ?*?=H[]42+R9=E4!9Q\0QHK;#F[![^3Q9^D#?@+-N7R-AYB,/,+Q#]I2+@A
-M,__/IC)HO_G!?I1NPOE\QEGJK=H4]6JTJ"X9^IPT`]755TNU%\_`,8$[B+N:
-MU6>;UM*QZC$/RHM&*QU'8_!U?/A;J_I4OHA,!C(9,\IC<'<T`<6H9<OO7TWO
-M;/+H-"V-QIG\@=4=2J=0;Y<JEH:;+2!.<MN5M^4NN]`'.5OJ&'!-[97(]!D:
-M+YX'M%J@;X]+41)/<3M`^Z8BZ["&S-<.CP0L]*GQ;FKH4@\EM<:$$^5]WLA$
-M8_"ZJN0/&PZW1S2";H0332J!OYDLQ,O=&**&.G'C(;\3O(YW:*IK;+O4(R5N
-MB]&;<'?S;BSA%6)G*G\?1^"X`*5G(HIWX!<S\VG&(ZO5L0#7JC\BG$3*@@AP
-M%%NU(#U_<W>XL&;,<(T1A;MGT?_%+X8<J^BJ!:[FR7&>V#(O;I8AI)MO[X/J
-MJ$LQ`QF/RHH@X!LLV?AXH.MJ]!1X?PR5];!+9M,/AM])\Z.SN`*);A_6J[0`
-M2QK>:CEDB=MLS9A"[12&PZ3.N::;+:Q@J82.1,?5AN8[(4>6=]J'6RK%J"2H
-MY?)^^M"L*.0(=H,41[=XXX/ZPX0X4Q%H)P24\=B$:;V)Z78;?0#\<;`U9B[I
-MV5"':![WFYJ\?J%+*,PAMPIO!DC)DD:VL8/[X;RST)<EN?O638"N)W?%M-RA
-M2XBNWN'6DM?)8H&5&[>_JX`9W"U5A>0Z<\3`DY"<WM_QO)Q1MY%!0Q6(]YA[
-MXDW@],A!8H<D(>6)75US7(-)7G&X4HBSBK&64+(6R#$SPD;M]K[YL#*W5[(*
-M9^<]ASK#;Z/?#>^#1)_!*]E]K3;B'-;46D+`BG0^;<5D@R2NGA[!$D`MD;Q.
-M8.8=5)UQ(LR6!B)F.!7N&W;<P&G,/BQ*803:?+1L]O[WJ"P_`HUT;4KZN7#K
-M!%><Y9Y0#OJV]$>C":+#UP03UGWM4Z\I*-KPV'J=_>-!&RVK6!TJF[R$PHGR
-M,)0C=*[>\5';F$55"U=#YBJ4<\0$,9"A^O7H>3,T=N2/XD)1%]!X3Q)?7I:M
-M]>7KKCJWKBF:.OJ$HDLT#0\L2?&,2?%19G#'QHZ1\ORA<4IN:6L#5[[VBH&V
-MGJ/4+VWB"&NP9F-C@G2P$D2A_NJ"`H+4ZA4F9WG!'7`&97Z]:E/WJL`\Z^,<
-M!$;D=3_NPA>)4_*!=@P?D#1/@B($<FB.#N\DAQ3G"FGMT/X][+5[:<XZ4ZYD
-M&_5@Q.WK2*A6GRL>9R%![7WD(O^4B/`F=L^`YT@LJ\Q4_6%4[8MP6:0Z53X&
-MFQ5C9#IK$E.OVWW;L,YNS^9)`_\7(#59++:*_AW>2)D@/HC5K37@"4P$0FMG
-MD^M^O4_+7Y30O8XQ*D,LDS>F5X"D@)[Z:'-''?V(QH%A_QL@X*O\NY*4C9BW
-M#08MUN/K`S"D?</VIY'\:MDY3T$.72^A1]96Z=,FL-+64H&)2D@$^7;PQ`G2
-MVOX.^NA'NPGD^4:^0X/[0F!X*)7>"QC"S@[)8B&Y:N$<E<2VSW&;3X&J$YFA
-MMDXJ9\D<:I(77'7,7VUIK%GY;^Z6SS%!&D0;Q8&A??&)QO8R5EX^$*,-+Q!=
-MT@Z59C9\HY9H*!>-%]STH6O_UB=,FGZP)<F9?)%U:YOIY-([\6":TN>2WWZP
-M,7UFN:@K65I&RJ5SH+LG?,*TL/?8+OABF@/G'X+?PUV;[L^!B"MP8?1RJDL;
-M&,\BUED-QP'30J(!0!Z-'5CJ#\003QOW34521J.TY@8JUKP;9\'FH\.0\?#`
-M7WP/=9AP9G9GM?CWD?A5I?#@_K*#L+#EK'%KX"7M5(F@R;?RV6T!Z,J"!2,O
-M>M$X3$)U`]4I7,6]M'*_M*G(Y>9G1F+M+M'W:='6@])G]D`#`=I:_F('4%B>
-MP,#A7F.%]#57"8O;A9;KK[&(S#<?4^7$'$0%J<C?QA-$5:&`+5^D/'#!X\\X
-MK%.F$632$]-;9#M9H1F\^U"+[^%?)+RI7>M^Q)O1V%3\:O*%1>^JHV_7?UK"
-M/06($V"0V83$IBF)2V[LF1HDX],/=1]8>\G*N_A'J[L.V$!N)#O9?C-44^^W
-MH-RZ]MP8L0.PU#"6=+YI2"JZ6MP&2E^)'6>O'8![6)TD,]BQ\L7JEN.:Z&%#
-MNO.X)9,*$5Z$@455>J7B&P7KG+A9HWEVB7'.F#;"MQF6@H%Q'O\XI[!%#%I"
-M1/.W5)(XS!1C[O/6)3RF.G5=80@#3IUI7"K>BLI;5<R&YIQ8?O'GW3]Y^<N=
-MDGZ-(O#W?-SZ;<:8X7#.'"""R8_H30.DNW`NGD2`)F)JU+F!PV'=5/[R`<K_
-M<3O\+$>*B`MC2Z9W&)13ZRIO4%QI`B7V;I%=$PJM3SL#LW90(4@_)UQ-3SCG
-M``Q_I^+[JX4JKXCXS,`L.)48M-7;P&-.?SD:;/8O\[8"1\@/6PCC;>$O5Q'3
-M`AG=.IHGZEWE;!J%1D^)R(DE%D#\(K@2YSZ:#C'$))&AA!%`.P6[YOV^R&C;
-M(K*23U6,5Z\:2_*$G@VI#R0!K@6P<I77C$$EPJ)`MS@PST#N3P&9+`&?FZ8S
-MY]M@>SWKN\2]Z!"S;L^FV3287)[UY9UAV'KX^"<*-FR</7.$Z'I+G;#@F*H7
-MV[=]48,9RY,G9(D<FL@^<B?S-#RV;EWX:3F[/A!,NPJP?7@%X_$AVB"1X>KL
-M^%,>M?RP/R&PJ0>:GOJ:*S]@0[7XT]8!6W123XY`U4<P,]2V9DS79U`TS88>
-MHF;M,$%628**O""TX9;R5>5:Y6^)/\6Q()G8-/@+RW@VO)U--#K.#910,7R^
-M?+<.+]>P:$/GU)$"Q0O<2OA$]>BJ+#>=KO]I)0^J#Q*!%4%!D$0B?;$G&9(*
-MM[X+O,DDP-C--@/!5A@=\3:/PZ>C'TE[444,!-,3J&_L=K25IYE+^1(PK=25
-MF%Z2M'/G/K.Y[>@UX5-CD4\8B<R.>=E2HSP.,"P2(_)<_`LR)-!>=4YT1'QN
-MG0`LPSE/UTO:N0^%"\RR(!G,14^.:.B%S:5R.@TM;@JW*I3>T36`4HX6>5M7
-M10]6X8?(-+FA3)$3!/F5/-&LG*""]`6^Y0YGT<DP=?NN>%<UQP^=<KDS[_Z-
-M+R^%DMC#-9`1,VT*8[F-QMS.4:-AI!B6<Z)9O3UV^:Z2;3IQ9TC7AT?BVD<%
-M3NAG3#L'(HAA"3=(I,G-.K-/MW5UW)6N!M#AG[(O@S]A1]H/'COY0`:]L`QF
-MFD4.(01;@=[2M/GNT*A>KI;P6`^U'H,?C%A87"YGD1>UY)*E@.P_RD]RQ92=
-M\A?>\-*\$'$>X4LS0C0*$@(],ZU[J$H`R?3\;/3+*P;334509?J!T".5)RY>
-MKS(V:8^=597C4[BYT+<_OFTH1A*"@Q<OD)!CX'4@VO;%JO=Q]M(F1P3/7DGQ
-MR2$]D41S^C37@N?TIOX'Y2[;6<VT8)LT:UK,;)U]#(O"&6?.+<[U0R%E("8]
-M;_/])Y+)Z4_4NA3:^GV339F`/G5JQ^&<HHYZ=',F[*4RT?JK!:?WGM$37E\H
-M`BZ)L.#:KD;%,*7F(-%9TU8J5Q"7]P)I,'32SZ4,IDIH$[>X0:+_[1;DS$$"
-MT5D,!I3'G#OO"+KR@*&M)G#R8(C@.VLS)G]0IVT1[IHX:^=9PXO.IA3!>.R>
-MJ'S$)0>90Z?CP'JIY:2WBWAHQ9<E2)ZON-O2AM_RH"NY3NM-.$>L8V0_83*)
-MCK'P$U2NN%3=B5FBH7#D@BH3[P[60?^Q,CH$VP'`?'I:8+AXZ-;!H^%G%X=[
-M<QC4FP:-H='KE('U2F"@\(56]Z46+71]Z1Y0E@8J9Z08OS=K+O:1?L8N1/PN
-MY_`;8F`-AF>`($#,"4NT*G#VYQ>QU%#Z_X2/S68>;;!)9,[FN(S40S$E@_=P
-MEEC$U/YV#]MCM1"[%K"?[9X<Z'E-OAP-@0E%.X\8%[L`SX/Y7@AVHQX<<9NW
-M,8D>!Y#AI?U4B!:*X/)(WR0(LFT$6:/ZTWT//:-^'/C825Z#J^@ZJU8#K9P"
-M96B:W#;N1FA;)&#ZE<XEN6J7X`(V/]QTG!*-*3@[;5SG.HN]H$W^U^B3V"]-
-M?Y#"F@!,RCO05__GK44U8IO1^OX8GHWQA!L'G4:4C\N/2I6;')-"-GGN]X(J
-MN;%F1OEL8=F.V5<.RO\>H*)CI<>;5+B`M@>P;@)FE1,9$(T:L:16KN>R559Q
-MM.B2S;[\R$D)T)EL`Y=X14X:-*^AP';5(8:9T>>K_WI5K=M,N.""+=_P:52$
-MR5H6K4]5SYC([PZ>5>+][#58J5+Q.BCQ4;$R"3H\7RQK;VKG4LWW156@Y3CZ
-MOXD.G]?`11B$2GD##F_T14H,RM>3A.L$9UH;V^J@I_06;N%0;R55=\5J9Z=F
-M,[,Y\,F<A8Q]/(4,E'&/!H5U1S-CC+^K"[=,J7BD0E=2;D:+A(Z(OD:@]"=!
-M9+[KBG?#U>IRGE&_#LV$"Y7D%^LHP;C+HN>!ULT!J%#V/;'>YM_[,<3=[C.F
-M)D;B\`'F)UI.N!P<D;\![O#,3KO`';P]<>!8KKC*[&0NK0)OU!1)\M.:6M9+
-M>5I._2@]F]/<1:QV$V!,5$2J@DZFK2#3%AE/&658W?M!L/E:!G5S:)C@Z!.6
-MT;5[M.K/``;KSS"WU&)LT)JO<SX["Y&JD0VNP\DB;\OW6T"].++VYRB>J%DN
-M5240N!4;3\JFF+51;(2MW:SM$9:'`B!33//F@@1?O.8S/^L-E"X5^\T#[9)$
-M1RJ)SHSE)*X9YJEYH.T][.+FC:8K\QR^VP;J8]W8E&.U7()&H\Z%JX%[4)%H
-MUEOH:XJ!P%'ZD$[</?28H$XJX:(F(D?GE!_^EV>P9)`IYD[@=+CM6FE<5AU3
-M!QQ]*9C9\P=L?O`^UWH94%M_/XW:W/\S',9HJAUSR`Z@V-9B^&LC\:(H[,[=
-M\5!LSQ.T1J45%:IU#6&[WQ=`^9*(:M4O2PWI^>/@"TAM)=F-VK)/;^NXFRQ5
-MH7J_:&VC/ABF%9LEIZ&0#JZH)D$]!%UZ,8U$(SE;^BVX\U6B^0`:KSFD:(`0
-M7[9^<VA^GWD*)(U*A/:,;L].J%X!_E4-XHWE/BR<@Y2=9)?29P&K';<<9C[G
-M@A5W&C;_D>MA28F8]`'5'CQ>*UE/K9_P5APLFK`$V):]EM,>7C6Q-&VY$L9;
-M];85C%<;)AFIXRBIU&`?#0=-(^00@4A7_8/=7/]>C>V++ON2*#K3D6"4R1>D
-MX-F4W5H!.&#IM`ZSJ0#L(>4Y]Q^-S9]OOZ"JC:#DA`T:#HQ)3A+<J**`@&C:
-MH$99RK8F@[`.*L,F+BT<.CKBY+)SRS?_S-748/_;_1Z0/4O\.I&EW#NP,W<)
-M\47C"_O(NK!W6XCP./@VA^G5?V<A65CZSHYGU;@ALL'*A?2V^="H]^]5#V9>
-M4QI8+,9+=@CGS=R)11>Z)P[9+2.,M,XK3U]F9%EC-PM3_)76L7SZ;8=D?\&,
-MK_D$00UH_]R^DS[^0L'@?WQDS]9U`!]U^]\`D#B[NNG99*ZIHX?`A[$5CE9Y
-M=$E(FSXB>Z;""]HA>>C^T&I_AWVA=@3RB`W3NT_Z'*+V#*DFQ.+#UP/@[YM>
-M&S4`AHF7CCF527\V;-0=&!S.<J<8RD'BK^?P.G\,?)MA7F\S,\8,RHAY-[;8
-MU'U030RI]P!?&$>WUG`LB9V-2)8TT)A(&QQGBL^'O>VB6-B,R=8EGR4XT):-
-M9EMRYJ^.=J7J70F5UCWT5)%6Q@6!9#1PG1^V>KEX1_SS_]49)99`^>K^NYJR
-MR?`8*(*A*;0^L_&'`U0H"#!N?%8KT2S0[/:*]F7\):1]7CW0&ISY8C2F;YJU
-MB,GR#L<?^%2$[[)9=OYD&YVD5^Q);5P7YX;EQ']S2#"^Z9I;$=-KP/![R'!B
-M!OM#\JU)II;:V=U5((Q&O6(U,UL4_;Z+(,)(DR#]%43Y47!Q9F`5K!.)-5SN
-M#7F<&#3,>%]L9XM5J-VLUH,WR_%:0"%]-"(EFA\O/-R0J"R0ZLUVZQYS0PE]
-M6!QLBC<HNXK@7C"Q5@T]J=UDFS`3(D2-79MMN;%84UN,%8OJRRYG:7T?]_8D
-MB`W/?A47L/7;PF16W"W3$#H5+A8QPIQUP")%#I@2,(76QX:G'S_EZV.^;5VG
-M.FKA]QD!/>&EYI]!I-^CGN-+$M$YO1P/KS=;UGB+1\>4_P*V_UA;9ZI)A?$A
-M!V:`"0S4YC@<F]?EP2UEKH68Z,4ZOCNHG(E]:GN7!&OW2QD]7<WI^F^W^B,"
-M5X5$[91P`']_G;/!-+K56YW#0^:J.)6Y2I:4P(RJ9<`9:^L>"$7[CGCW"0FN
-M%"D<4!@M-$ORVG46CBPHVT!J1>$++KK"P3$,1,7E-UE#8)WT$?!];&J:IL+)
-M;V9$49/\*T&8E!F\8\)8"U1I3KE=KZ_>%O5O^"6F=T(SV;^D>PT'!F(VGW?\
-M]52V3:M/K+-P2K;)75XBL-(99:\>;YY2CQ=UC3T_QP1=EB.[/Q6H5W,:1\ON
-M9>0D%1C`@-6G$U]WG+7SA@J'YG+>7U):"W499H8?#Y^J<0"_7/K<0T89MYE<
-M+ABPHE[O1C=2.O\9_7Q22JHVP20NNV(M6O'#=CK%,ZL131_D\P$8(L"HM?O9
-M5ZV)!O,4^;+>-]>;&"UW*R^FR=8889)EP;A*P!OQ<,!_4:$.VM7^;%<LA.A;
-M(T+XT"_T,NOSS\F"I<M,L&1)].@=(X.\A2(<%O:P\A-#FNS,:/#=F4TWMLV]
-MW@4ME`73I($\;ZNMHI*0T8*,#(>MK`:?5T`$E?7#++_&/.2CHU"A+RNI/D]<
-M2R4Z8S4F!J\AF`-9(']L6=9T-X.1@NI9CSMG]2&>/VEV4-P.:42>7ET//_/$
-M&$@)T_I`3(W@=H?*3TD`/6@N)V916PZ,Z6B_CZD0L\;"IJ-+.XW2WEU-W05N
-MTC$]"_#*RP`XR($CKX=]])6"<'/S.*W=LY<\J"5:P=<QR.O";M=K5T,VQ0T;
-MVKQ1"8CGJ-"\3>$>F-<1NSOF$:;Z=W?Z:J#6J2UT_8V$AMFA@'5QY\52Y)30
-MAWJ2$6@9D_[`7,0)7/O@?SA-3FA%[!TOLQ4"#$C?.7#R59SGF[$$R]BZSC)3
-M/L11.K1^16X\C\MO14D)8-68NM."H;'=AQ%/L506;NM+2B&C>+(A94OQ\:G7
-MQ]&+&QO0:AG:Z-4IDB<`C&W^@SQ7DJ5$4U>E>[.F8NK(T3!CGI#PPKJ^<H4:
-MT-212<U/XG<95A@4U/'E"0I\;=./WYF@`E]W]@T$TK<Q*YHBQNXZ79`/N-PF
-M$FD$\Y5&\[5TDI4-_3FBD@`K0IQ#'^&AO=*1G+24"MA7]O1)?E*J])N(.L_I
-MO82H`EM/%\$D@/%)3#6?(.X-)8*E'X%/`(4`.#[<@V`26:Y9):(`;U5*QOD'
-M7AO_D7>N#1==<-<%E,NHTA3@%LYBT&$8"=I,L$#Q[:5Y24O?.><]CGM[0[[V
-MUU@&C]'9K$Q1]R'C$TCJAFR^A(I;G?1&:-`Q&_%>1GI5^,,T&>PKHYU<W.MC
-ML3#?I,''?.'E#[M#C]IDG>X"H'"G2R[Z`N[`;6<HB-ZXO21(*TA4;KN40]NT
-M&QOM(J@&_,H9N$J=($6KP#(DG>8VW('44=X2^HSW,S/#E)&;7L37',0Q5YZ?
-M`=_\X7WU<&:$*.._+S!_#(MEZ;48E2]XEC[;9BNU<#`1"2#]\9?"71=G%D;T
-MVE1`-?Z)S$R6UBD&W):N#ZRPRK4YT'H(,JUE6M9X"86,Z\!_Y\1`QR7ZT:J9
-M0]S>6;]X[B?2!,%8%.BJ>(8$9A7DL>\$(JMN4F=J3M#Z7AR1EJP-_&I!#!`"
-MF<2(FHD?G8>E;?;0U8-Z#"P<$SI21+IBTO%=)Q[Q<'-?,W+YI0^L>Y2L4@^9
-MK%E_2%8?>P6TXI4P9-PJ1`VN7*[_5+?Z<=\^3&HJ^>X8`+'BM+=^U)8[$S>)
-M,A!C^"Z7<TK$<K@1_SXH(X=G7'G1\`I347V/@]49;8,JOO#O?*!$C=4C3DGF
-M1$\I>I>;GXZG'XOY%Q`'^.5G:-1R(S2][RG4S^?X'1EXY*T"6,#=]DE<G=Y<
-M75KBC9HH7F=#9:6*<3!6=`P*+0+7A@Z7_=[O$#X)VK9`7;.W;)B*39UXU:8>
-M+D)U"U4BG&GW_EW28CR[\9X/--A<(D*"-OBI0;P^[U-HT$1[&HB>8;EF;PI:
-M`-B23\]2G5)<(K(MHF_0%/ZFC\G[SO+)_.0U#9DG<=@LX*285`G)IQK.-"I<
-M4/P-TN($:7QWQ`MM;5&S3,["?PQI%/O[^,:W)V4GL(,RAFUU14$*K#^*$SZS
-MBB:91AN1*Y.0A`=/$A*`#=9+KC:3I#+S*A:^6P4HF?RV%X_>!<'/>$`G*9/-
-M7*0K/WHU(:VA\AXI4<Q[&!C1=QF\90_,)KG%9K+I*NHJ[0FZ%E`75S>88#^-
-MB80#A&)]0O<[R9'Y)V4!T>N,E+\<DJ)%"92-Q>L#^WP73C]]^6";V_E5`:(J
-M$PQVM7>:-REY;E$7=G0$&&(EI.K>28`<*6P@&#7:H=&A>65\FIJYMXBFKGIU
-MWZ5X31;/`3;1[08G'4#YBQPY>H-SH&*#KD@_^HP)#P^0R_ES\GF_7LL.!^(G
-M9\'OC/$3=@_EGSNU%+/'OT`Q;)4=D7*:03.5>@NPATG!U8L"_?-:7F>F>B.(
-MJ$:+CF+@$XG:'=%W*W]!Z(&/$'&Q&-B$U8OD;[\#&`-&[I17=,*HOT]/HC@3
-MUYF&+&N&1]3?0I"L5^,/X5^K1E:3>AM6,9(FU-7B2$A0?3[%%`N?:[C[-RZ^
-M5T-#NH=O!G^C7;1'LR?<$C<L>0FZ2[]-K&#^G)KI$S2]LD0O[5IIU^D+-7UE
-M5"1N`<^P;9`D=XFVXT?]*>3&,QS"XDH!\[#*L/-S)<PJ;#"H`^19;]Q%#W8N
-M`LSI[G,BO4C-P4EA)+/A7+L6W;T/2X\.B&[-R%:F5F49/;A"TA6D%:<)I+IF
-M$<>D.NF^UD>#"MR!#V^67H2XX5WQ(/K35J$16PMKRZFVDP1:QY]6WA:>2]EV
-MAB@HJR^!<SK^9H^IV7S7NA&KO0\OQG@-Y)356Z\,\XR^D0GJZWO4AR6'F:LW
-M6PW^%(S[AEW-./@VGAR1"/9^.M>$6'W`6B,U5'?=&_RWRA&MY0;E*+L:O^O1
-M-^?>O#%N;NI4VF9D'#M_*72T9CCA;2N7\FC4DT?VV&D;2%EB1P8,?SO!Q9H\
-M.7TX[@J0#TVT2A4+6H'2GIU(NO+T7#B_[>VHO`S!R5XQ'*96F"/'/;B;P#P>
-M[@90&37?((%B7N\\<<B54)/$ROL&,$79RL="O(ASRU+Q<R"@M5]`9:#G"?6)
-M%'9?K97!6>;V/JHD,)03YBF(HL#;BRZ$/GJ+;]_,_`*7N1P4S8[AE%-84UY=
-M:\281;W&'6B]U/LO[1;;8"?(S4J@XZ?0V4;Q^1%M-ZR)"/+QPHV_XE9E<'=E
-M?R2B3T+DK*WMSA0;]J-D!MK"V>Z#_"6V\I64L>FZ[_PFO'3J?/&4N&4]<P.S
-M[[O2QF^4Y[5O-=`4V?\14'&D,3!Q^TF"X]\PCFZ='&+HY]?NJ@%K3%>?R+[\
-M@02Q'=FN`%Q>D2@0\@M6ZD7^!S!R'?68Y$TS:&ZK3-!KO+_BM+T9?*FV\]=V
-M87Q7)O'RF@-<CG=SYLY`XV8$9#B@NO0_K=\S<C*OG]^&E84+"Q)'\_C>)V?]
-M*^1*MH<4^YC6;^T3T7*WQ)$-..F,DUV_O,^PU-B7&+==(D!L38%=ZZFHBAA0
-MV^/2,VL+:/QY^XS;TS@9/1@\0UBLY"'-2=.AH-6K?'81`7\X?&J^N.R3LCRM
-M@88Y.N2O=M.T]I>P\NY%F?<C@[AZI]AFV^&0[.VQP`2[A.?$8MW>1GV./=\H
-M=AS:/%@;N@+6[2Y-=X_)GI#YM@[:72K]^ST\5JYJ3F\F-!NND;4<7U\:U6TU
-M8,E.6<^3H6#@&+SN(/NTP?!;"L]_J@L.<5R<E/#D!^$T8<RH/)%K,]P,!]B-
-M@R+=Q/":C`5A7CN976L#5KW6H!M59@;HC\>`ETD49>:X_5$I3P\4+QQ-14"D
-M!M5O4@7[QDQ2WE_(_S#1^.69Y)=/#(1S2S$B<X]$D\[+'E<":7SS.*D@17PS
-MJ'BV\K"W21T_^ST8II`V=7Y'X=PB<Y]<<YP!0>AZIVTCI]WME)>JYN+=W46B
-M+D)*1/*(ET5C8\YZ_OX2<L$BVS"T*U-;]1+Q`&E1$BXDKSN%[_YNJ=<ZMP<=
-MT(:K)F=R$`^43L#B\77>=S?`<\\:&7&$U+N+KG`)T2R']K#81&-K&AI-Y"IM
-M7<8-J!H)XZG.F&"X`G07$10Q_,K`F$D2TSZ8M]>3CCTCI]DQN@^Y-UQH?Y>&
-M)_FK(J<S5",J-SI&R,6\"D3I=1EVJN6)Y\E$2G(F8H<L!7"#]^\TRM&"DFXX
-M6`\,@I(%@-0X/W&2JK_PE+>IBEE3^3,[@TU5`$0,%Y'FV"2RHW"BC6+K`<RE
-M:N2-V$\FZB78=YEA@K5O]L`.A^QQ6^UFXA;M(XGY"MK`RC:>>C4S,.Z)V$OY
-MT[ZP<4!?!$'&G\[CZ,A[(\KHQ.FCI[-Y=#,[DL!-?($BBLJ42EN)-@MCCET;
-MW>W0NGV3:S5BD6/<->,K/8UH#"&17S71_F2&P]T-:D6-!JO;<WK3ETCQ%GW9
-MV,:&<7-]EJ>=.\X6+WWKW0+.P\`[+:SN[HO)\JL96PJ5/EYQ,Y[K**=TC*GM
-M.E]@T=Z@QL)!M#?/-AA.?14=/+8@#1I!'QU`VYG1GT>DK&I&0!J\G7>NB_\_
-MC'@;"2A%UO=0@`+[N95Y71P/<%NLE.+L_90^UZ#V<.V#RC*+M"HQS5A9L?*S
-MF8R7%QD,2.7B!G0_V:X^_KI5/\>(.;D]_>$_Z-V;$["-U76W7N3SHOCRT!KK
-M@TA8MDX4<E3*1G90HLWO[EOW'#SL]*"_`063V1;`$S[=T;&NL;#.0$!JP6!,
-M:`;[2ZDNC1FN]?DK:FF&RE0DSAG);SU[O1<41/MK1)ZZ1XR?>MM=.]_1N?4K
-MB.K>J'-K(Q#2E\4T;J%Q?>_$>GSD$"1]3D\!R4Q">E&7]._&ZW/.XAJ/!3%G
-MC%!U25A8=D(B(8_'7:K2DE5GQIK.4FW7-5)XPUA;O>II1N9R!M]6UO1<O+%_
-M#*J\<<1]N7.=!IVD`Z?"A=U[`%PN3+5>^V(2__'*>T_"8R(4#>C9,/*!IL02
-MN.0=T-N38M%4<ZJL8VAU-TCI!F)^<ERS`?'4(VYS<DZJ%][J\\\"#7!U`QG?
-M@!TXOATP!&@(WE4]AB;,.!P1"]Z^ZLQ[1%F>9^)4L1!%9O!A\__VB;-?Y?E:
-MYQJ,)"V[S1CCO"=`KI@T)5I#/%`]BP)E3>[B`/P%WGB[JFACJ.OKLEM7!B>Q
-M\#%_LL<,%LN'5D)]7A]L%I*E$#4DI)%`TQ3<RM^.+C]G]Y"1^DF4NWOL$`WK
-MOSVY>(HKL5/9LE/9$^>7B^)AGS3P,*79%7NK@B$I676LY08(KO\MT$!BPY/C
-M,$6K,+A3R!WV:*GXH-4XQ`RZAX]QJHV37(UTMW)MCOI.PZX&P0Q#%Z&+M![8
-M!F3K>F-W:WT]4/?)?VYL3\?<87I$>TB5-I(![3;)*&.HH1.85"^6K-P-PT;D
-M;&G$E%AJ>_2!ZG;@,7@\_R!T)*+-C<Q_,E^@F"[NH<QRA-U="\I\HM@8N;AC
-M3QDIAKM#2-R$RJB_0.B.?!2!$^7F^C*QO#\V73LH;]*6#B2L\`A6@KT&!B0Q
-M'E!WK(307O0DSW<HPRN:54$9,!+NOL<-JV61TLG(HEKK$#8'::YZW$^+.4'$
-MS:[L[YS>\KM?)@OS?=FVLMGIO0<3LQ9^K@$`>;X!WFGG,MI5<.<>X"11+QG.
-M>Z>:56XUC_O$W!U]\`"N@ELIJ<G^J"P]L_M':CJBQ:[4!8+(S$'O%"L?"\Q`
-MO(5%":XJQ:93%"MH".6T[EKC;^W$PII+?/)65.0O@(X??F&I^C@LB70'OPS9
-MF0:<U847T^5?*.<V?@E,+/401A2@JEU3[Z*@PUQ<9V*)OL>M'_.2FEJE%&W;
-M'[45&,.+?@>32;'?;WP!G[^R1'O$GDM6+ZPAC>X`@\1O1D%W!J_#_<'AXH_A
-M*20%W(\Y&RV_,ST4EJ*6ETJ$:MJ'N%K8O>@66"O^:&JYNN'5?V%<NKZ-&F$T
-ML16(V_2C,LA?)FZ%6AG83\3I8W;>!@&>/U(+$.TV&Q/M-D891*@!FI&BWJA4
-MI6\-DMI4[!Q]M_?QI5V276FKU*F<?`("V!F7:E=1XAD>,"O4)CP-@:3;=3?B
-MZ[51**V"+GZX5<[-=C7F*7!^@ULB/.I$^%63Y(T)F)7?C-P3[HNPQC_6X'2Z
-MC$B1:?FINX>SHHK@"L]N":J?'"#O2EJ/N?M(;"H`1!NY+.("J>S%'*ZL:#V/
-M5"YP;'(-N$SN9'CFT;?7KW3H$0?<VMK7#P*8FKSU(PGW78"Y\1_9X>*CVU\V
-MZ-C:(X77K=G#,21W/5:$K,[2<N\L-"U`J>HWO/RYIH4HJ("4^&1M:'J:[ET[
-M*)C#PIBHH`:&4M*6VQY/4?/&)=SKJDI&+COPZA:`"^I\>1Q"$Q,[CW29=+4)
-MB)A8S16L6B2$&HU1<]2HR/!L0WTDG4S+/77;FDO/GW#ULN6F*QK[_'U.X*]C
-M7@TVN\_(A"]LJLKSFZD-_\ER@+8R206#H$-4-CP@$9<##+0'+]]LIMW]*5(6
-M$U/WKJT[04KH0>_7^N@1?M9FV.5X5\P17)`,<<>'I#&\!7UB6YMBS577[O9$
-MG3&I4,R/M$/8T2<ZS5&\K=#6R:#7YM%!GV91QAXQ%^:MZ=HY+6FO-N]&DM*`
-M6J!@QN2[T9E9)4BD+/0$*;?B59,*[=YGOEZY(+'"P]<F:-]JT+KU01E<PK?C
-M&GKW^BS%+9`H+!!-WBRGB[@LYQP0#0.GV>3O.0^+U"G1'^8(_A$&9/]MH+_3
-M2/0'V[[V\_N=8!+OU&DO"QR#\45I,:5\,#>`]L]Z`UH`(*=[^>(\+06=&QR?
-M4?*P*S`XXS+/G$V]?;P,D0XRY)EBVT6>.)/!E12)`'5%#L&H"V.Z9MJ.A.;<
-MF*I6'!MLS&M7U<$A]US^2[F_(6(1GTV//F#:($=XF#6)!P[@Z#LM^8#PB8GG
-M,],G_X_[9;RM_UV76S95+04"H$`<5.TPD<^N.OJ&4B^"5.3!DF8EE`A%W5RD
-M58TW'8+T7"4C_V`NN[\H$B$_V7..$NDRR?ZA^[SR"68?%%\8OLB"F"QAFK(4
-M@/:*J<E/Q<U2IYR`M(P;O0,/Z?;-&"7-UH:4*UYY[PLZI<"@$\OUR62"_-B=
-MNFOW]I;K7":>129H"E+V*88S-<\)7H4+>-JMFJN'0*N71S/R0C3>V\0R=2I$
-MIL"XZ\8_ILS2++N*^/F<?;SW$LB^`_7`:Y?75L1MQNNPW]]K4E"YP]B.MG5B
-M?[SA^*.'3BVA6;^R#XR6,D+V_CB&I9T?4,N$AF<2C71)9]$"W+1H@K`:\8!,
-M"Y_YVC&%Y9\`<UB=U^%[N?&6#2L]T33TB=0?HAJ9C^C(E_1E'$Y$_$P&+_1X
-M>WK+QPF3@8LJTPG=)>_G2A,8[/8^"U(94@NA*;=F6;KK&9O/DB\9'"A%N2D7
-MO\F!UAW@"B^_RX-_@>`1(14NF[>J7F[;Y:O^T_]=?-T&[%;"72NVK/'%BA$I
-M[X009*7`GY:.M0N!*&>+'`\63G(.^\X2X^FL#`8+G8*0Y!*;-?GHZ7#7Z6/.
-M]A0>.53O2P^6K-H3$NH`/W(*`BK'61_@B"9_.+V''D0!>KHXORG@#FCT?Z7F
-MEKBW;@.4RE0F:MS\37:LEQF0*\W<V2HW4I#`F<#S('$P8:^#:=AHBAMR^2O*
-M&O9>Q?#HAROEWJ3F9]+7!Z`%!S/Z3?)ZC5TW.7/(KDO$]>!"/&7?<-;1.6O`
-M/4&=`&\D%#WR1T$GH36>.XX(0?Z?;.6OMB*8[4[+0I.:.OVS3V#"2[%HF*!T
-M%N0NBI#>I[V\I1!5N5R)=/?W7_>BS3?"KR3@0+OI!YS?3H@RG9#K#G7YW*F?
-MF^SR5/W'G/HK$VW*OH_')OR!X%;>52]J@7M8O(WFS!'8Y(%XL0*6>7!\O:"\
-M"CZ4LEJ"1[YQ%^D!R4EO+%\[#>=--],V.KL</+=*[/XXCV^(W2`!B."(^'[O
-MX^(7<@4`6MNPKJV2YYKJ@B<Y^BR"[_H&?R6*YQWZ;M<1RICFHW`T\1GJB03/
-M1';[7=Y%[IOY+*DM<1A:="52D@Y?G/!M,,6ZX<\8^\X+7%?YV@E(N!5:FM%C
-MK&`.G:1$CG>!7<T_`%@/C@R4F7[;WA6"QOUGQL-_0H.DB)C-XRS71DUYL-'T
-M=UI?GGYI!IYA5UIU&1P^;H_.<\D3?GU2;=K0N$=5BE0]9.WQTT>XDPO7!'M-
-MRKWETO^HV*Z2#WV"*XUN?RCQHX:G+D+HZX2725D(6I0<X.X7@,RV,]:S?IQI
-MHUHJ?G?@XV&_LZ<CJG4R2Q^YA"LW8MWASP>C%D#K_CP_W^H5>B>LW(9T)<X0
-MTL9I,J&.0L<P*=SXM0I]'TIW5&>.(+<!>O=-$3MY.0N;Z_;^C32)9#"$YW_9
-MF?R^_8/=$#7A*P(BS"4A[+^8S#5\92D,4*/_RPR!C5^[H-RQ@I2*!VI@P5R8
-MHZ-E)EYV4-VM4)Z?GOUQIX"SM3(R]_!1'@Y/D']]Z2[^6M^1YT3_7M3.U/C/
-MK6,@.6PGO9LO`E*E.01?!RI91543UW1(6,EC>4C94D$5NY/L.M8="U)CWX-%
-MYT.</?W<6F-RO_-_+X<.4#[0%7-ITSXQSCX+%,(.0:3GTEO<$MPJ+HMA19#5
-M^0'4?<<LV>G"+Z6)D&UYAJ3J'<LTB*A6GIR3K/K4G']2=YXGEZU0PX8>)<J/
-M97UH?L;F-YD-3JBYYZUP1DE8Q*[$8"<0MP6QV=,,>\F7%,F:I_K61.1OS2*0
-MT`?VIE,XCM1V7M6SC(I(-(+1(_7N$<U4<E301\QEM/(5\?*\(2FQIVST"J4N
-MV</!W#,?B0JN7MUG;%%7%EU"%8E"`M3!/4?N;82(V6&?F9V0@>_LR9MSW"2"
-M_#LZE9T&/"/[2.^RK%I1+-XO@7W1S*:W!ST$#U>.)<4WM&IG`5_5)(+R=0R^
-MQ?Z\<6;H;J7@VD8<Z;`KBN43;%F&C*0"GF)&[.$,+CM@]?!"E`L@G^$LHSBL
-MO)Y`"NX"$*]WBGI[ZWS4UXYPS:R'RZK-"F2:][L;<BS?52QM"/?-D<!$>2T$
-MI5WB"X<=H[^D8`TCH/L7/!;&`$[0HFZD./1CV(.9AK8X<R+M^IK!]'^JSA\2
-MN/6?^P6C#;-N)KVBH%EK\"X52!F7@8K+$?3"?VG??:8\;5W07_HFRN]+IRX@
-MJI+4:H:B[OGR8:$J&BP7A@JJVSD_VW+L;(SI0'7G,+_KX">YGJ>#Y,LR&SY<
-M"+@BEY^T&Y;A#W='!6T#.:#C+08?),B+-:/%1;Q`\K0K(PQ)"+A<DU:5"<EV
-M`(OUDJ!+`X3T=XQ*T.?)9`?J(#?2._`>7>'/0[]"8<&5AR'408F*_'K>\EFW
-MN;7NVJCI-[G/TJ4?H@:_LY*(+G*H`>L$%KR!8#E\B3J&,`DRP3D6TS?/7(UC
-M4WQW'SW?$^II3\J9HBH=A!]=9PMS/>_L=Y_173#31^['%A^:XV$<&WPT-B::
-MPAB*@,OY#,&>H+9%.<=180U.N=:J?:*EB"(X,@8"U%$8].61$"8F[ZL>`IQR
-MQ_].ET,K7ZF!9-X<3;4HY85NO2T8S7#;AAT9"#3"B2/;J?X)EZBM#+G[0D96
-MZFLX9[IHYF=G0\JB-4:S70=)TH7L0+DK5?I1`.&J[UE?OC,%'R6:JP+1X"+Y
-M6&\:?Q:..WX01//[2CN6,GU[^,!MH!.@E>#4@CI5OB2E,'X76-*JK6$DI+KV
-M45C5F.'?%!G`/T6Z3E%4-'<C`7SVD`ZC]!>GMSF_@5&I5-2;F_"^(LT)!L69
-ME08^2K)2U^R5[G1E\#XORXW@)^Q/NG(&;%EWD<C).AU53Q=]>@%Z3Q)?PX&"
-MZR=W#4XMF.V^0TSRBLI!\8T.A4E^HT]\E._Z,?)T3QH-7Y:A?\]F]9TN.G6)
-MJ3&OAL/&F70ZR.U%D`D-:J_L:/E75E3?H_GF*F8$:)P?^!A$+>'<+G\N.OA$
-M17&?@1@:$=YUO?Y+W'G5`++\-E+`B3"<5)AY1S+1W=7>ET8@-3[1=C8\[_</
-MABDG':Q68CS00"6^=?VS:)4#^.;JT5:+2W(]\O;/&Z&KX0SECM3`JP,?=W64
-M.L:\70`#KCU#AZ+5PHEY4C)3^-^SU[Q4TST/#!H9T]!OJGG!QGTU$96$44GJ
-M]T\9;M!J:I5]$F*0*HO>MDQJR$3+RFX4X+P["LNO]2WYJDUA=6E5)=0DL8$E
-MAD28,%+:S%B_BICW3V*87VBP%'7QC]17_594]0FGS3ME4V7Q(8XB.'*MY<W]
-MV*4#1(:5W__*L9V.\[><UX:_PXG)*V1N$.209=(UX\BR!Q;1I."-GR#$TC_=
-MM[6@ZV54M?$BY&?%IPUQ%OP]*XB/`QHG68F:%B:ZTLGY3LY3%/GC+7!)\G)L
-MN3YZ^\F<O4!+'$1X$"YY6S-4!9\[=PYZ:N`]2;*0G@WR>/VTA"5PG4(M-4WE
-MCX)*FO=2-G27(_.IV:/KB>N_+=RV&AV\T8?R<,@@H"<,4\$4[)A4U4$Y!D4T
-M5>D[OMP(LZ`_"H+9+W.N8XYS^/`?V^@9R2&"O:,D;,`/1V4V6GM.D'U+1J77
-MU.;./3=90[U\N.0-J+_O:,8:L[;VG0I6%AD[((V!LSS6%DB$TKRZI)*4(Z)%
-M@@SB2WDJ*5;=9(_'WDK..:[_W;^'*S!1>9#*N2_R43*L&:VDKM%D""D-"LXF
-MPD*6NO):9O2F']P2&?BI<'CK4^R&3EGMR/C&[:"W@M32P`2O;<#)-(+YOI5[
-M,1RG3=G<6M^[<_7BQD@^THSO5K0YZHB]SO1N-UQ;8ES'3[-7WAT-5C6Y\?6#
-MV4"!^_;Y;;8T^P*.U7.*(*RS9!Z%F13>G='?L>9H5U"F:A/'':.^&Y_+=I"V
-M9]V]ZW15V8[(^W!8:[POE)_\L@G3=\9%9VA'U5:C$JRP"`?VYU@\>-P)I:0#
-M]]#;E&T0\0_7I\36B*_:9`7W[O0JX+X*D0*$Q=H$8[<>L15V2E>H[*V`92_(
-M.+5+Z3@@![!.R/WV&*-Y>33FA?JX_I_UO@=%>-9`L<&:,@?]&T&V2H<%.Z:^
-M=O-:T?1J``[5&=50RWD/\^A^N64\Q:@`!!T!#>=JBH=??O_V69VTO/+`Y?,7
-M(U;":RTV^]HEA`^6TM)/.;XH3=<$@(L!4SHA96>=!(VV6(WU@XV@H$124Y<J
-M0^$,YXZ7)"AO_4+K0;$"%#HG%26T9\\>B>AR9:#M:(,K_`/*,N/0/EO,IJI?
-M>K@YJ.;_7(2^A67_<`)5H/F2\\.2M^1BI1EVZ%8OB$./Q`K$Y6A56LC'/J!+
-MI?8->T7O+IT,75&L\!T?91?Z-)@PMU-P85NV6Y0-[ZDEYM6O7*_6ZE@AH^^?
-M3!LN!:22.)W+-FM($U.W0==O+HWKGYBL,4TQ2AI@JE8(.PZ0LM8QI++E8%GW
-MDO/)DGCN8[BD)(/B$*-$B=V(X\-?9?<1)M+K)1+F.9#[MB8S/'OULMNG*W<M
-MJC_/JZQ/&3C'Z")WJT'+'+U]W/]O!LL[#)UN8HB,?F`A?0O-ZU,PJ7@#[=;1
-M+3&`BBA/=L!76>9#,_^JZ^NN@V<O%FZ-V;#M)Z<XMAW30$.[&I42J&_0R>U%
-M$02Y64%4$O4PATHVX*Q2(JD2.T6#WZ<',N.K<^'C@$L=;7.+^G-38XE/*&*I
-M;).4?,KOJ5>]RO,NU1F]KW\.CNIN<@H.%P_NS&`@[+8]>#G/KGWENP]U$/&-
-M+1YY`7;(VYVZY:8PB]5M;'%=N3:^,,;CF(_L_E@M7I)9NCHEFVBG=)AX:H,6
-M(CZ&8^$K\_8GI8H>CG<ML'%+-@>UXABE%[D,I#<4WCU$#E!@/2E_P@11+*:P
-M89V0V#"!^'IB.PL`6G1>E?UCC/N0=`FR+.<8%CG>)^<'2)=DR5D7;1D<M4L)
-MJ>KH\3LDL\,!(<]$LFQ"?*U3O%I$,=+#*CR,)6PZ!O+D5M^<MT7D??R<H?8_
-MYHQDIW+<6M':-"O)4:8?\PC6&9$[:KOB['<[H@G85E-1WC5J=!LE+F=N>]IH
-M[R*^;P>;:K%T::>&>;JSL=R74/'#1^P`BPR60J.;$(PIE>E7S"D>2^]-NR?S
-M%@294U>H1+VNEDZF)OLLFT+>WWA[.E7_G)D^,ZW,94=/@HHF!DX"+8T$P#VL
-MX8T!G5B<&QV9Z]:PX\JZ:!QCO3;5^3;S:JUK`PK,FHMLV*#<<BYB[(I5^*JT
-M6OSXO5MVQ61Y:/6A;K>C:JRQ0?_I(O`4EXIAJ5U>#(,Z**=#9OOFN=NQ8]=:
-M9+<1#ICA]*_F*\GOA_@QCS4&+4U@5OLY7UG%1W(?OT]@H=L2A;&ADR]1T9,2
-M;_IZT%@`M]B(ZA!]NN69B[/6O,H!TQT7RNE46T^`2.NFJ;%-QLX5J@5A5?H'
-MG71K_<L<KBZX@/8]<0AO^GNU8MOF^.%\5/0A(&'"'0\=FV,_7P3+!SC3)<'^
-M9\,?*%I=K7'H/?OE@TZE>U;7VR$==_1L%8F`/9,\H#YYM$D9(:T[-=Z58Y>Q
-MU78QJB];YGWT1(BJD5]^&0U0-I?([-;HO'7^"?:/7<85[?V>.)-[.J"=^:B2
-MP;H*J$:_3UT>#?.#V!1OTSW>0/39NV7^CQ'(G-!QDPB;)E6H7%FLR2X]2%V*
-MUGQ'1?:GK&3A=AR894`(J)OUU[9:D:V;1&>7RT0[>2M'?AWX2-#Y\5_LTZ1B
-M43!&4/&_8FXQO>.K!WT5XP??PK]BR8')CH2AX*G[LG5^*Q@M:%-N+9+CL1E@
-MIY`J0?;RVI./EL%IAM>2#/[?93H0@]K7O)O"Z"9[?C:=4I]_*TX;H47^;HH,
-M[#1AY@`GUT?1*@T-R2#9[6$W+<L;YK9:O[X_,;<>7?=\I=.</6_=S0'YKP::
-MJKRDP@`P;_R@WQUNM#@]R*\K"<H,EV5>%^2D4Z8TZ;,8KM=BUZYH!L<(.8K1
-M%@`TVY4*J:EI%5`'V\1G;.1F$D:ZC/X'WK)79]ZF(JQ1_QIQ(!'@PN]SGSN\
-M/JY8JR3RFD*'M5;=&O>Z4&#3#D!P>/UC$G#*I"ZY2A-$'3-'_@UK8UPC]7*Q
-MU_=LBJU.GVQC#M>4,TLPJIUZ<I]EWST/"$[R/[CK;/IQK5]2B!8Z[F+3Z#69
-M#'$KW>*'XD3$4_SW+@9V[G:9@Z8)AL$!<UHLKY:HML`;OT/2E?[*@PNGR^?/
-M1/.GA0%U1K;(Z_Z3CXY:BG?FEEP9`Q>C=^1$(3LG%#TI9.XM>KE,G*P?:N?%
-MXB"D<\K+%)@=YL?P1]XW2W@JZ715[."FV[O37S/<7Z'\8T+1RJ0IVI&[?NR)
-M@/R\IR\D.8)W@ZW/Q2V<0FYOY,O5N/!ZC+#(,NE_B>B9F*EFC]R>XU&XX(D]
-M6B999P@GOG>V/V+2:ZV3.;E3\V6O;&`77TI00AYUFY."+@:RZ(:.4MNUI9!L
-MW<T8+)(KASBL\Q2P4CVQ09Q;U<$94?FO\58:_@,_,W=*!A%%"B]T@ADZVB4.
-M*G6TS]FMI\A&)9DJ>3WA]3@L)$-!)%UHD`YYEZ?J3IFNJ`U6L":MTBR"L-Z"
-MJE^_``7NC@U\C!N,F4`W,_N2DP.E*HHARZ6P9\[3"PEJ*ZQ0[K^4_\BJ:>F]
-MYS#@?[\YKGN;GVXF5.YDS,O6\5ZM`MK6%5/?<$`F8#+UE6YF=.A*$`9]7>'#
-MF].GR><Y\LX"I[K?6LJT`;&)4T#L6#0:3$E$^+6%0(\2TDEC0)7\A04P?.IZ
-M*'>H#]L]9\-[9L,,SF%6/8.-?7EWO@).N![=EW.;[%,/M7"Y30INML(OZ``H
-M!`PT5711PO]($A3C-9%M+[XYEJ([WHS6[1W%DJ67%F[OU3$5/@YO::W$:9];
-MX:.KIM"GR`+A_$<G.8L1U6LRXA+'NZZ(6-[YKLA%=+CU`/E7A""8!>,G0FQ3
-M>>G)I'OQR;6F0K)-]>:H^0]<C+V=UL%ZE4;H3ZDUQ:UX?IG'P%#8S97*Z<"L
-M>;R"!.SD+3/A.D*WQ*.'M5Z+>U_*YXP9.,`[Z]:'1GA%+$S<WFROO6EPNN$@
-MCY!Y!1YD($@5O"WPDE>OO<1\?6FNQ/\+XCP-$+4ZN+6_'7_F5%M"V9V&9@_=
-MUV3>G15A'BV=<M"IGTOG')(GT8&R`9'/Y]AD2$:G%4*/H;4`WE,&-"[FO+HA
-M5[[TO@4W/#RTH4+'PZK%RP:8\TJGC#+4H:Y/'3<N&2?4RG84/+Z&=S6^N:@`
-MV9L&*J:J4O]8_\^BB4=HT]?@F/KY=VVN^Y.E2L"_0!3K84#W@;MEK1\W#&1G
-MF/XMD^CU=<GR75[G2WSEEXH/4NI94Y^>V'0ITXYR2!VP,OKM0#$E3>PZX9`>
-M-MW^*OGQ200ZX93D^O&!%\5%[!K`]XWIO9PO,B7CSB\5@3Y5*92:S;GMEL#K
-M2D1/ZD$)BOO25KOW*K32`Z=*]YQP`7H_9Y"`C$>Y$Q<M^8NW(8EJH6M2E5%_
-MK-N)=^%B![^_`=U7P6*-O_KGYCX.`&+"=7"FY044/L8(U<G,(Y'V>>X*4/])
-MVZD/9VOOZS>'$`?%\]AR%4!C.>!V@"PQL<':J9]T$9G6SLGN)5"XUD<G?B2(
-M<Q.@TG+4F7GG?+(V%*JNT?4TWR[.!^1%!4&D_.9.E6\PA$WQ[3Y;\&>,KA#!
-M[$R,:-425')$#HH&R+/62*M%VKSAY1V;-$U51VMDN6K`7%=9DJ'S><%"/#KL
-M9>\R%"S6$"2O]O,!4)$Z?2$C687"@ZEFBT_R@-X0NNN.RS*RSQCFIW]+@(&^
-MVB[;VJJQMS-A9[-N<;</#7O>0[*S2=_?UH@'OX.`K?OP7*)7WC,@I0*',N-U
-M/K`J[[C]0RZA3NF,SF)^I%WDZ!1UVR6L9D4_[G)NAU(WG[6V?PJ"JKP4'[C6
-M]E2QAV9#%A0^[>X[:)'A%D1^9N;EYCHJ@H]'W]9Q76O<70_><C$F0(MR:(@"
-MFI2EHD8J'*?SBYN,N'&_E:M%_+W;F.9'7RHAXL!/L_&JEP$R[CY][0?-J5U(
-M`6'U./GNR44Y;Y_:=(S<,X5M6"(ZH/[P%T#-XP8"3U<H*[L`[E?CRCM=OTN.
-MLQN[PAD/OT[:W?,V#S"SI&/:MGU0/B9;:^OL1ONMO#4*2T=IKW+8B16)(7*9
-MQU)OOIKYZ&]-#%*K8PGOG_7H,V3(UZL9G5]1CR3['LY6E0R8%TG67`A*C]K:
-M`K$^=?VC(S=K/>YEY'I,.O0WV['A::#+/CVJ:HI923I7KW6H5'PO"2U(_.1?
-MM/B(9KA,ENJU$U+$&Y#XQF6(!7<^F(J$IK;J/",K?([GDR/&4`'*F96+J.^T
-MI.!1Z</$(J+5*`6ZS"3^',4::E[N5C@W2]O!)VS4[\`N:Q#]'P^W=$",EJ+(
-M+H^<X\GNC":Z3@`GI/[$L-;:$`9196.ADS%X-)(@>6!10?KD^'^*AIVA%\"R
-M[.\L%4,\5.DLMBUI=!G85V<Z[S/DJ(DQP';WI&=_'2W.=>=IK>2''TKPP5R=
-M.^DP$]NT#.'ELQ6':CMT^>:(*O/9C`-<=Z+B>YO?G+<QY/>ZXF2EB;79Q7K+
-M):3783]I>$7N7=UA)_7-UU8/J^;(=O?REI!<\SG`TT^]*D`E]I^P4W;MR,05
-MU*G@=H4U`IORK),KC@25Y!9>;6O26C)0OR\-,-\\-(EDPGXNL,0CT2M/_(ZK
-MI^/J.SR[DGKOD38=:2.Q\S'%(#6XPK8W0#1J[9:DD.>O0VV>S"$IZD5YS1%$
-MQO6@!7S4?[.@`T)#60_[O*T*L6A]*6ZYX9+B#F8R+9M0Q-,E3F(59G\XFD%3
-M<`VG_LMIU2(3V>R:_@Q&:QLJ@V)5=(X9S:Z`X>EH6_34*,G7_\*YJ04Y*Z9V
-M^.=W[Q\W%NRA">3'^>CLTNPM>;#5L)D@V8XG*T&#9SKHUH@"S?<#8NE`A'3A
-M[-):69.:MC(\4(M_SK0P\:KNT+0KIWVBQ[PR4I=I%0$'K4E$'\SAASPRO3(;
-MS2RJ/HPF9KW?XY=:PL`5ET\K1$<SW-T!'_[H:56;C68X>^/<Y#=VL4&N>GVM
-M,/'WA6C:00;K&#X(?'!X_R_I<H7HCGS*8*6)LAE<?:4VYV+`4L8!'<^546#;
-M/8M]Q&:UGFO"9T0H[SG'D;*+@.;_V$3(CVZ/BLLH'B.*;Z>!F&48:PNP\69C
-M"MU4U4*0)KB_WP65`+07(*UG/HQQS*?6'7:;&5RI#6'ZCK:&9YP%B.ZRV1T6
-MY4Y2=VY`"3$G_ZK!$*E"<TV.B\\]".5IYU-11(RM`H5MZ>_1H6C?I)`3G822
-M<:M$KJ$QD%JGH&+UV0'ZVZ&):GK[KVC3\K;HJD-E*C^P)KG,&+W51Q=<)OOF
-M12]DK\P:1FI^0;C@0R>,<&T/'=`"&_#"R;EA]4-TS:`B]*9L#.GV*^8]EJ.M
-M^(U&>:#]O\O?5,_,`W]C$13`3Y+DAZJ."49^"&4T,3*-?[<?'9^0B\^$KBCH
-MAUA2[%=N8,RG4E!-#P>X4Z:57+T#@3(AC\:Z"8G$>MWJ6%?$;GBNRH6WEWK]
-M#LRP;.05S$9:5F=^3#AVJ/(4-^-5X9>F@X3C+`74XLI41SP2<H>*6UXD(\I5
-MOF2,03C;QYY`MOE&`CY<;UF[D,JGK:("+IM*UR]^T$VO/J)KY_AH5"2)1$S`
-MCJ)G)3#+!HL[DCX=C4F8YMGEB?3T@,LQHY>/I&#G>94YWB+CM8&=IBC._*7T
-MK%7%TZ^D\LJC(25)JA(-7_\W\#'UAXHZ%V\L=(YJJ+Q.S?F37:RZH.UI^^:B
-MHP4U\Z_#.L^=//A$W47)7`<-P!=Z%&WH\2,B/JR3>>ST]YH"<36'T9,R'F=9
-MC794=_H*648U\H>]916[I$$Y"XK(&N\V-C-,\7)*R+ECA,\S0`B("JO9(R-G
-M7(L8/JW2R(&%71OT@G[5_["<U'$!('4TGZ4V37)3S^'8:_(4BXJ[>R;2%,)/
-M37LC/FQGS*EZ@`@/$=M!?A=+K:T.<6Y)?X^@>!IPI-DK,>85J1C1I[XTCD+0
-M1(Y"F>26S5SSN%6:\*7D*A8J;1N'('Y_"F_([N=/;@SXR8,89SX^<*OV10D:
-MM.)?;!(C6HQNU9`0E1OZD84])W0B(H^CW,:UG?X;H%\%]#XJ<+KZBJ!<0QB#
-M@0_+6GWU>.U^%GJ0D]%?A5=&ON#>#XQT,%FDR"=!-G1,E]U;)&I/Y^I6PD6T
-MF^LLV#YWY842K/;D\K5'8^NM\WMAJ.S550IP0)(*\<"&<^)1>WZ+6-JACA.*
-M@1XF\Q#.XUGQ8_>3B74;V)+]M@QNX=)I631^9P*#!5A:M1_^%FF!I^1[U?BQ
-M@.7R95/7)FZ9NHPKUNIWJ6HL)"$_:1<4T?;T:1K7?I>R3OS'OH53X-"SP"L-
-M`?/X/9/),;^G/OS$/&\#*)?2-PF>,;/5`8I(7DF.Q*,@S+C#(ICR<YR;$)8R
-M5/!))C++&P\W.-I,S4P/(6K2E$"_!*6]/&M%_AT2Z,5:UM5V%MJ2O.QP_2Y]
-M9B2:[_'>1ZYU(>8K;4G,&]C?!?!L.#$TJ3$MIRO@V9X*)]MSOAJ!;[3K=O(C
-M7(Z!Y4UK!@*/`Y[8.S-8FE26D4\RCR%SGOS(T9TP&%VCSTN1@/N)%LX[X"[#
-M1?)_N#G!EC)=),,&BB6/9_9!<\-MO+9IJI*Q=\F\=J^(;3TH:,C,YTT'?^]H
-M1/#.</)X"R([<GC@HFN-BU<QMI0&8<+D>4\J%G_T0O*3Z/'^H0/#JP/4.,V5
-M/I2PU^9='9S!1HHMK74X9DCG3Q=8<`2#FZP#B"Z_Y'M9;"(8;`Q!A5<:W`?7
-MRG[GR:\3U&)G:V>ML3?[*J':PP8`?R3TOL(M4+STK;2=[^WIX&"')EW-BX3=
-MKW=/=3`*[?N:44JFW<V'K9[RD9K]]4%&V.?82_:LXM4W9[D\3+8$^%#8HSX@
-MADN08`+H9^N,D."WYVP/Y'Q,**-/E(C@RSU<W<)-M-%?VGHOH2R4#^HZ:$#_
-M?$6.IU[X:$#5D1&2<>QT>-2_`/84*,FU"V'+;)BMEBY5:3+(J,8/T6C%[/_!
-M*L;L.TZCT/3HZ^@/#_TC)_3L"1.[Z+Q(FA,,1VLT:2KUQ*#442*=9Y0X<>S]
-M>RLSP/3!%K-0YW/>_M&8HW^8C=CG:.,LI>V$P#MT*B)]^8B8[3B_[DHS#X+-
-MOQR3>](1H])E)$BTL5*X-_FVM\M*ZTS5;8>+-=^L\<O`8NY!E+ZI[$+^EV<Y
-M[D[HT)XU&SIA`S]SXB?O%'2,E#]3[M?_-SP>;#"N3O\8@-@`$JS[#CC,(ON<
-MI<*3?DRS.&$@*>@PZ]9EX""F@^[?,/2@?\%`3&?>"#:(.L:)$`7_0`/">3W:
-M+_,Q8?Z-1U:CR#2]M&OP->&AM9%2UV2?M895?3NHH34>_#/$HA&VW&>M+ZV@
-M99YH6]["E.38OULK44>G8_-!'_"LZ1[J58F!IWQ;9NS?)9*II2Q4U>$(D>T9
-M&K9X!MFGX@\$$Z[OH<(%G8=UM,LLJ]$ULV%,8&'_1Q_1?&X0/'>V!NN*^*F?
-M84X`=I+@F%$8$04YHA;N,7&/T`[)30/!F86:85?07\BWHVCW6WG<$ZC86BS3
-M5@'O<_0W3LDL5%R4;U[U-S.E?R/\#+$8V/<NQW)3D&FA#+K9VB9_G'M^?<8$
-M+Z.3C&?403O]NHC>SDBF?ZD[AVT-2S4^2UB>['<Y$R+ZOA6=*LWXA,=;H'Y]
-M/#SV=VEVPKYP2-=)R)1C#450IP<ZK6S_V"J%H.2'S`^UO]BB^4`\:="PB2E%
-MLF?2328%6RM=6QP\-&"UN:,"E30@V)T5*C_/V(0TM(J),=31505`'>0CR,@<
-MZT6*&,U/M\[T8X(3JUU^I4-S]E8%L/VVMJI.2@EMW>O:<##A(5?`S7>CO&>8
-MVLJ&C+@A`"G?5P-6K09+L</N,CA40J\)L<HGWQVQ$<J*FSJ+/^&_<LB]'5P4
-M@+U3$SWY/'6D--<]?LAQUZ"\X=E-3R<1#QA<HYUAS:>65I$>=K7..0)HN/4O
-ML+>POI?S#CS\("$2R=>"<IJH-UON7I@RJE3I58'0",6/N=YX2_])W'^_V4M!
-M8*/P8:WMX>3LIFK$#@L<]2'(98F,,5C^[!`2_+S%7&`L+=E.0/$?NO\+K'6T
-M!"#K)DN3R&N4@N*M%!?M'L9>Y1W.?'IJ$?AP->\K"X5Q.'0(&7?P<=JH^-&#
-M5+^I;*K@/S>>KT87)W=^RSOPH)"B4'P9"'JJZHN-FMO^/VL1"?4@4Q(CRY$>
-M!`ZSW.#^@><8;HG?+HD-2'3\O_4-5!N'%(CKRE5=^6AG@N@DM$O*V4.8E*@M
-MUO,HGT_6\87H-6'][[TE0J*N1Y4^9E#WVQOR,^Q;,V/BL(.Z04'VRD,,RF/8
-MFA&+T@[U7@]I;C_ZPT_<(3CLO!)X-ZS_M%H)=P4]4%.`Y4#[<`S2%C[<<#JJ
-M]6HH>B97X9U\D==`L8KBS`;$VODE[+NC_%<WS2].][EDGMB'-V(?#08LY%K)
-M'ZX%OX2@DZ_;)<-G)KSG!&OR7Y8$`=F*D)DQE*#*9@$4%E&\XL8[RH!#/7"?
-M8(CO4W>*]-2YW=_ZPU*^G@O3(4&KV9.Z1,>RD'GM=Z'LGA94:*$U<YT84K),
-M9]T`O9<=/:$F;#7JRA*]6X>PG=A&Y\[1FG/JBLRV8KV49RY'>[T!!3M7)W<U
-ME(UF'+45\HFZ`^R/(BM-)/,N3:XT:V3Y[>$W+5W?"%J73+]#LF#Q2"\('IN?
-M"LB*9/RXKGP>'C36;8.^0KGQ\@6'/R*4^#I]'O'@HM!/9<>V4C3E23CB$Q";
-M>[37(7@IKR#AN(R'+!:(#"F[4<,XJR2E?TL>A7\4[D$NPGW+QENJ\XA@S,6-
-MF*G<3W\KP&[XKIMJI<8.1=SL>5ZUAH5LNCGO)G"<CK8HJEA4LRZWG$"NJJSW
-MK.ZH7OZMBQ[8I+;X?QU26;,FG^VR1KSO8@BUPS<4DP-2-QBXN(A1CA-4PB(Q
-ME8$5T<@EG,`R?\`@S<S'#,#IE4Y$'W!T0#6<6$V"=/8:M8/`WQ6ZE%P?O;LZ
-MM+[A8*4"4H)S[U/^T,,S0FH`BHJQ81V,FL<85',>TUWUPG)KZIOWRO2TQD%/
-M&V(I2H)T;G9YOQT]I<7.G`Q,)JHWQY))^2M7F&V`QL3A0DH][%KA(E77]-`L
-M6A!,BB3LR5E8_J"[>[[XI9FG%T`A+=H8J?;3%"R![DE?%E/VCV]+2:CX;5(J
-MQ/4&(1`&,$?"\CK79=(4&/WA#DG&**S%,+:+\\YJBY+)FTFOBASLJ_\`V+WS
-MJ3!74[Y)3B=<KYHT"CCOZIDL^J*K[Z\+&XR!`G&SXSEV/V"1D2?(P>!4ZJ*/
-MUR5W;Z=>%^/F(?'WV<[I>2.M,7^84`\MD*J?;24J@'\\+*YY">Z7[J;XD,ZA
-M=S,<9S2][?2O[Q//'J+_C$Q76R6DF\/_#)SE'80'YW_=-[F.SY59TLQ:-MHF
-M(U7EAGS]/!CEP^9.Y5Z=0K`F6;_.('2R`\@GG:_WXTJ\.=,S`@7KQ5%HTAG9
-M3HTO,'NKUTPQWA3R(O8$YU>C>BF.X.W%E;MT>QBM,/L#^?B*+R5W:S%8#@P_
-M\XWFZ2%`)(<Q@`41U[;0HHF48/P;N;/!>@8E2T?YWPE#KVHO>V1_:VUF-'`&
-M3P<?A9$13+7<WMHP5H>ZK5B;%"3EA0!W,`]JJ#,.C@"7`$P83#B1=-K_(PXK
-M$J#28M*H2D`0)'&S/Z5\&HIQ[[2\A!("M5G7+JJILMDAYIM.*=M"S/)>=TV7
-MF`<8>1Q@,-_<RZE:=JAETL'H_I[8`^Z6Q7T:]WO\Q2'!F3IT2"M64'S\ZB]!
-M>U?D:&%T+`;#%PJK)AIL^56N2/@]U&O*:*,PV-JA2I$>EB'!"7KS?AFJP02%
-M++(UN>*(8N"XBY8&A/7QX_F6!9<@;7K,6>=T/^?F!\H>Z>W9HD7/<6?BUM\:
-MC*)3@/@8GU;$R@G,*:S7-P+H(E+5,G0',RK=MCP%/R32MSN'PULI(RMV;@Z"
-M;7)2=/&I/&E-3YBM(PE4E)\6GDQ3(R``_E?"^T6!VE`E^3GJ#7$P,HL['^>^
-M%H5YZ1LT_+NQ:0^N%:MA%A:K^!"GJ]I6_=WHT\Y-&9(N9GMIU8X]H^5[M^DK
-M/?<M)1(FQN$6P>'8S$0H<E!4/(?3RBA$7>1X'=MB?NI"5)3OG00DQ,TZ6('R
-M<;(S79.#4)NT0%;O5+031-=:JQ1K$N4X#N>E?D^WY%J1M#(K#7=H:6;OC1+;
-MVE%?Z_%K%YYO;_2;YZ@FJ-9W%:LF0FZ0=W7I+&6O'NX%,_E.@$8>UR@Y\[<Y
-ME<7!AC;&`X,\O2,:3X7H5!F6721MPG;PZO(1D+O*(#J#0^&<\>,[S-;#?&EZ
-MB+4_AH%Q>A='PFZ:4YN(-A)ASN_@EB=Y"(O%]C]B6Q,UUP3[>'K\;!<3;]5Q
-M*_1K^$TFZ<BYH48W-C;6!/\Q+KM))?%7S_U`=#[C^5.K;:6R:O(!N@&V)(_X
-MD2]9K6U8%1=*^.)'U^H6)?1HA<DL^=UK%2BS`AAE#:&`L2D/%GGU7\X8Q/P+
-M5&@7NAO'@"Y\[?*=L!?(:W.1A[X8[.\J+L]-'%<%64B'78JJBT[D[UY.`=F2
-M;IM[OD;(C,EC2-Q'QJ+762A/;$#4KZ7VW1$C<=,H!X?`3SF<WF%!3)^:SK\'
-MBJC.M2^X*90^@`6&S=6,XD1B.(:=317GZI>BXF(?KO`Q='\16))\5I^$2OA7
-MR9;!2!3>E#7R)`ZMR?W;F'-',J!?<DZK6JB`>YHW=H7!H$K+/U/JJKY\NGP9
-M:&=P7[Z7[D+#6&4N8<II,GVO9P?8TT(6-$<XQ)QQ?:'QC.MN2VCV\$=?:H.W
-MD3(6(W=WDS)Q2=YCD;ND1E0NK$OMV&Y,)$)C&TOE%GLJ3$YC_3Q*`[;R<Y>T
-M^@9?J(YB],Z52^2,HW+^ZS7">.5)?&\;!./"5M4[>O+9LX\G0\6&:C^A)2@*
-M2$BXG\6KJ%Q[LIKTVMBXBI#ST!@V7Y``22HW?VWQ*I"9[E<JP2&DAK@7+5\'
-MQ%T8B"!2_0C)[TD:6'8PUU/LZ&V^IY"L$Q'QYE3?2;(9K]DPZ)$Y)H(20W?P
-M3N=J*G3."T52V6-1#E(47)#9N`/0.R&<!-`ZKMH^&GI^.]B-2,FE-AO8PC5N
-MF0&+M*:@^NF1?5IGH'T>RJ$X+)Z\$F:^EF#Y]VX!,H3U"D;;)V&$=^4`%,-A
-M05PKYH1",%%]5`Y;NVZ3J?/IV6/Q_7?KY"<3OHLPQ-JDTND7#4'27^TQUGX"
-M#&AM<HLB3STG]1@Y*!-K+^#>_'ET@&9US((#:!TSM]20*M?GHH2FJ@./-SV5
-M-XKD]+:J[]I0J!#$]^G=(_;FU%Y`_P%BR=P:X"3-XK3OF9#9,)I>)J5*O7BT
-M3`3S$)^959$V^+G4KG_ECRS+#OK_,NH^@<]L\6QY"G3(XRR+"V1AP7X;VM#'
-M_/;H%P/6@F>58-IAN6X0#O\"R5#3<WZ]^3RQ_[E^[T5F-[V"!Z-6Y`'NVR,(
-M0:/<SA>BU6!<6W(DEB\=`KCW7-F;DGE6G9^=R?_M0@24^2!`:%XI-(#F4<T=
-MK.MK[FI*B8FH3(L@&]27B=9K#T:"A/JC@)D42O[XY:@S8+,B??(R@O<?]#K_
-M`850IPNK24SY(W70;)O&O;>T[J%@2&6\J&&K'G-.5*@_"ZY>MP6IHV912].-
-M?9IDL.2/71/2U]A.QY+/)%ASZ$#L_D:&%48F.)(<DFRC>UJ,I5"0"Y,7%4FC
-M$$,8XQI60,YE'R6D##)/:2F+E=5#H-V"/G7DB+;WHA9CMUJJW_M=IOP^Y+WU
-MZPH<2YQ&L_,Z\D]]@(%FH4JM1!3GN1AXB'<[SVJ'@$04<_2+N<MK.?+LKJ$A
-M`'7Y8N-*_G@RF3VZ.[HDI]*8[=?\Y/]?JSH^QQG#:\[_H_-,]:_I:%;@9U)P
-M4W<0J!`^?1-9+QX\C`:M7T82L1EFG5Y27_05*CMD`FWKU)WS0D)/[#&SD7K0
-ML5]SY`LBAC._.H,O7C6:YF$/!*M1SF4"H%5F(T-=OGFX<1'Y*RV;UQ89+Y_X
-MXY`UP"NL^3Y0[(K&K-_D6&00SQM7<"[V%64?;BGCF,0GE(81AFN6MPOJPHMD
-M94L^XK/2,9>;.\)PF#.&1&U792N_\:GBL0U["T]"F:+?9:14W]*F1RZK.]V?
-ME,EQJ!%2I36/E-)?=K9%C.O$6!N=B-1M+%)XP1%Y\=FFTQW[_@+>='5&!O!]
-ML;9'38D[\N9K4F7>.FD7G+MOB.#GI[]CB6V<<M62^N*\;36KG)94N6=(URN/
-M7D$*(4.E/*2.\0#YKDE-L\WQBZI<'#DXHTH3=\[[[NVW>&8N619!&1(_+B]8
-MOXM<79A/B,2WJ;+W;_=5<'##@LX?H?I1!YANJBHX^CP#SF?8.Z_/LM)J-/SM
-M6U7\PK5KT>KYO-!YOY9/("3M4XY_Q'#D;2(03Y-_N!>=N@8A;\(G<)30(%:G
-MM<W9/'V@GQ^7"-_T=,2I7IDRZ4CS0N,E?0S%,ACO"R):VZ'_;D,'-PJBR5_'
-MZ%`HPHV*%1@X%\Y:A8+A0[1:=6W]EWEZ=/#8UY;.)<GOMV1[(5G37OC4R,A*
-MC5Y!=-S788:B@7YDIV24QC!,$';9\:D_JMR]93HU";WGIENWKD)DL92L6]F[
-MP#BA'%1-LGJJ\GVJ/8BKCPZ*S#>(MNCMD'3K<U^5@99$0])=;FMPO?2]F5*8
-M?$(K^Q,/4,87\8"^!#@U>3[KK`G'!%J,#U$V^NX9U@FE7W>>3J]7Y'(X0%PO
-MF;2A='"4%N@ES"1`CSJ0"-`/[2M6"+VN\6W/^J7X[/-4F'\Q`R,ZSQQ5(-6Q
-M8B"JW?(=O[WK/4Z+37$48H6N'K?4S)`ZM2L[RN^W]FVRS$0*_YV[O5A/3GVM
-M=XR-8N6PG"SML[0ZE!T]?9'"`Q`-1R.4%-@OJV$I#7`H[W<E)8+^2.KW3L=G
-M5'YOH?`&/C3<].`$5>%U@DM`1Z_^(C/S&)LN)-_#DD05+"_>)7K[8F2,*=F^
-M!GU_@MM0V&(95MQZ/V;H!8"MM>S4P'F`CK#YO_&_O#5POEQB&?T)8C+P)'BC
-M:VQVJ`O+PAA+R<"88VZ62X_1?-'3OJBG-6/GI,'4'S6I!ZT;Q;JR<2Z8=EO7
-M=Z0HDBE;0R=_<M5G$LK\\.V'WXE0YTE9*Q8TEQW$K-4N;"<#T@=`?%N_P%-R
-MM@NW3<;'T0!O?;^P_#Y8VT#\"U*P[^,_YGJQRDS?<K/^!0(<"2T,YO852CPZ
-M7`[Q\@&&C=[W+*;_X[+4<B0<E!$Z.I`$RL:,;P(!X=1GD"74,L'8:.]+;$M^
-MZC-=8X^*L@?!$R3$.#7'GC#_5X[S2E>B]-A:&72#5>1,^0'7V.QS0^&7\ZL*
-M-Q8.;[N8DRT:E-1_JTS?GA/\@20)T2U?W`]=EW$(,U[PM@B<4!,+(Z1P`PNT
-M=VR?.1RBH/][YP=D[VTVV\VRQ5JB\G%8$4W5.W'M#'T`GXK_H2\MP+A]62;K
-MPME!%4C/WJ4W1<PV7[061T1?S]R&5%:(8W]NQH']&N.`2#H[@3@KK8KM,M3_
-M%,U3U#!F=+V>OF#0JM#N.UUD'W'&2R3AI$H%2XD,7!;>DG.]3$><GG7&+HTU
-MXQE(AN:C(T@_74KCFXHDH,Z-&!O-5IR9LX^RQ4Q17#SKF_WV]F7CJ.$2-CR=
-M1\G]2M'IP+'WR6,_2!<!?#'*XU[I2O3G1Q8NT?:!4'ZF!(?.&@\1A@H1VD+I
-M'@OTVW^YS,PCW!0YE0:%633KPN!-YBU<9_TM!&@"3L$F.YH)P"L8AX65SLA#
-MC=QMW;.=WNEOMSH)H94TWW9(-QS^I,?IIDIW^;0(0A+'?F$K%G>,N6CFY$UY
-M=V!P2DL!6CV6.&8+'P[\_Y>!<\/!9"';;/CO]%MWJ8$'*Y(>*-7;M][IEFY%
-MZRWQ%8!E1_"'>MW#.N@@2Z)(A;/,F!7GCQK"+/Q;B[L)?Q6O'M/31:S+5'OF
-MR2O\J3Q6$@*>B[$V#@R>'*Q9MQ78]\<<E5-C4Y$<P%`@8J@?AR[V>385L34F
-MTFH:R?4'I$`6'5HB/47:;VO4(/!W:C?D47CK"/G?(L82W*/9#7&2<'E[$2^O
-MUX6,:S2)&`3,OO'@[1&V&B=-LG4:A]3E%&R464MXG8/LH"]P"R5N=Z`HYJ>[
-M-KCZ#&.R3ID.-R:)YA#/)LVV'74-`2[EZ7%0T@#SOTD07*R#.)+2K^J_7':Q
-M@9BSF",15B@VW0U@?"0?T#]=Y';,J2:KK7#X\T[8C]O<GM'.+&/,VX.O7BRD
-M#<?9R.Y)1YN8+@QU(F,>(/CA5VW3%NRWC6LT4)W9KE7O1CWFC8#="B%4/H1K
-MYS5BH47=%`QFFW7%*'%74:)8V]4**A,#1V)WR8S*70,N$ZSWWU]H*^.N61X>
-M;]A3]SJ3)/47MI350ZX=1L,W,ZVK_;H+VP4]I4[G>_^/NM$4#%A2IKK26YJ&
-M+`4">/+.':]Q>,\Z:WS#MN7+U;M.,6L\597"7NOI#/I3[GGP6#05F9Z@[1E*
-MD!KQH$D2\DH,-&WUH3X!JMK9X9J4,BIVBZ!5SY>W#,X*3X]G$L7-_M5K\IOH
-M?(HMP1"5G^,,.@KM"!]1=?ZJ&.G(6;*O&^02J$:AQ'IF<)]O!)A5>1DOH'?W
-M:")&[T$>B?`U"7/F12N.YF,G)(BG>+6`@OH[UH/KLY44IM'G,/@%(SO#C4.N
-M\Y"QYG*<_`BYE`V2H6K3F/IM'(H-QB+,7843T.T;PRE+6/L_$7[2D'G-*H3!
-M?Z=KRTDRLU8@79&`/VI+_O8BNZ[C)B&Q!9RU;(5,XC/'".\_%4Y0MG0X;N<;
-MPYF.A10G;KX6OQ&S7$0$VQMLC`0ZK/M4+TT'9/8^!RYOJ$S0S5YT"!><Y_[Y
-M:<+3N]/UCV<2U)XB&PJNZ"]UR0H]$GQTH?^;&^21F&,RN,HD5.).EYNICC+<
-M&NL!AXDG_C^];R91XDF2G$BVS/#JJ$3@U,=B<CNT-`R,N\RVVV8SA,KOIOP=
-M!YU>M))T98:YTFHAU=,\C6?/#,(!]RHH[-Q2M9ED9ZLR?H8):P3SP.6JOCQ*
-M#T*'N$6K!=`]-%\*CV,>E]9?T\1+#@;#5<=.D!T(PU"T?'6Z;%/"IF#Q<D"R
-M#I[XM()75.J`?1F&NV^CM$O-L)!WJZ#+R^4P0>[//R2]!$81YAAC?_7Q6:L:
-M$J_.%S^3W1_,\>4V81*12;%\0>@2/,*OV,9%O9+M26Q=_%.!(A!J3X<#D>RS
-M>.]F*A<%PY.8`PC+B!^%D[F'J-G>,DH1Y098!K^$;!7M\-=PAYJSA86CDO;;
-M-0M0[R(ZD@/D97$\4XD?--S]20*6FJ)@LOX@,#<R1/SB3>CFF+9NK$I&[GV3
-MC\,W01`E/VW+U,+R2AI)/B_1.[T4R+V&S"BA;9NPZ<@,H_QY0%*AYQR9QE@H
-M$*V<?=%$?(](/+B?M4Z_6MZZ]:-F*RA=Q09Y=/$YD)E&?RIG%<P3$,/B2]L_
-ML!0F*7]OV,YC7379>V52"=F)8=_^AD>G9DV-0V7CIX;18!@6`+6XWORG;BVC
-M3<@9B*!:]&>P2UX)6`E7<@9*6\IKD;%*V^45"7+LZ18G"VA*7_PM,FR2HJ'8
-MD,VO0!=?I47D,'D!(L",.J]K3R,$:B@TBO#]M#DGG;_\*/:YSA)`XOOD(Q(#
-M&88F^Q34CYKU:@0.:)1E9'R2_CY5"+;,.530_#LA+[*>-Z=+!WN?!>'9*7`R
-ME;F/F&>E,SLJY*6S0SOF(4*_Z<@S9^\53WQS7)#8LZQ/VWS>?ND*K.;E@SP=
-MN;1)Q"S_:0GW3V':"4R+A(]8:R[=T^4F)%B.%'QJ1D_W6S]-!T(K55+@&19P
-MN'Y4>QY;6"HO4^"%_9;;N8>9&!-5K"B1?^+K)LZ$8@UJPDE94HYL8MV_K@EK
-M>%9(G1D.'9@]-5#(G[*[?-"M/7X_MK/=WD5"`4PAKB58Z3EQ<9T/SV=4V<;<
-MQI-.0V$9`DG@Z8@@%"I'$\M>.\6&*Y=U/=[(CIZV#P:$P*9W[MTBV9%$TOY<
-M,OXP-(%E_S4O/DJR=)N$'!,KB^@=6557^`IEW&!'7\=7WMA!?G@M\^0]#5YA
-MM"1T-)_U<'1&1NWY[4&(K_$.'2?1B+;E%Z4>%`N(IV9Y*K7BVY_Z@8A6TW[*
-M7H5I\%]AZ1^X+>J/W/*`7:+%VMY#O>:.JSX&!\[2)G-T;0UWVB,@OH:E>^7O
-MBFX`:7]:7.=7Y]$8GR"83--'<4T*9'>4L-S2._0#B..[6V%AU2AT`FRD$=:"
-MM7<20UE+\^*:\?&7VY92(^=P+5L>&*'U,>(1M<&(%1N^2/<MN3E8N:J]E]TA
-MEJ1^GK&+#`_R2A*]<V;O]"4C,&:\83DS]:?MTU30+P"Q*2*P;ORX50&:4U[/
-M*40QDJ7Z*"U7@2&`'1_C_&81+"!71Y>,"22-[P95;=WQVA(>RR%B5[S.\9X:
-M6;;%R)N".K(B38[@5'=PT.-"%LGY&IG70OF(WAI%*^-"-$&Y=[-ZW^ZRAY2R
-MDO0-5>"H#/N_'W*ZG"\U;"(A'WZJIBT%K*G5'W8G<8C<F'I%R[*N,DXY@O:+
-M;9>#-GQ89^^CQS_4J#!'FHNB0"_;53Q(GAW]<`"IVB>IJ[/WB"J6LEE:=6+Q
-M*V,'4M%L:/HX.#$N&PDX->-H9<`3:48T_M58I^R#*O7F?($L/D`3)1L]85O4
-M@,WN\DEBT&L6[O&)CW^^2*'?[L1)?F_-I,!ROVMGTV%#,E=.-Z.P@CI3NV%^
-M?0P\:>P$RD8JR50/&7.YN1\P>U-6%$/\A9U6B&F3,MH/EH%FX$D1BCP\[.3&
-M#1ZU>D`NJ">_A\^AK=3/T:80WAE:O_=1<(/+F\K>RW>:5G>.D,P51</V5F_F
-MXB9JVKK#OPP*)P;3IBL]/1C%-X!K5W3%;ACG+FSXMH)OG-O2XTCFO171:SQ7
-M;_U#F=4=-G%?#G.-*5&`\:.3Q!@D:EQYZNQ$.,/OG"8**B?ZSAL0)AJ<-27)
-MT=9_LNNPMSJI3J7/T#]AYNFT48C9-HT0+)C2"N.?D_P(_Q9IZ'$^7HA"T)*]
-M_YH!Y1NA=CWN\U'V;.&I\(X>[K*E#!DE&_'VJP)]9%\501([L-:K!^KO%JDI
-M[I-COIMZ'D70A<IT,?HVGJ/A/2/HF7T-O?N9-[8W#X)03`$?^JURH65?:BO0
-M!_0\A#A'K&-T9+"C]5)?#)"DK6E$2M2=;-/>;VK(-*#^2]-QS"S_SNLBHPDQ
-MRH`$#.!D3?4-KB^5D4=J`'0^Z,TB:I^78ZW*+OW*BGL1CCRZ(5!J..&JD^Q<
-MXS!W17U&J7*]"E5C)`C@,7H($!1ESTG9R8L))>6_/[Z>G;BGMU@2$Q8=RD$_
-M'Y9/<Q:SWT8@$='^S;%@964-*PSYE5.-RO'YXJ2UD:Z=VC33F;MFBKZ*4=ZY
-M/B*4`,5E*<\'Y3X?C<[S-=1=@$#\P+LN=D?J?58C\,]Y`M(?NK5_YN*9/GN.
-M@?^Z=<PIP<(UP+6(+F3<KG<A[X2+F9$L?W81)"'V!9V,ZRI;@6O'_6!KD)!?
-M>K:IUA0$N:--)AR;T=3X0NK%_.25"O[D\J'/OWY&>$-F'87Z:,KU*/KN$]8Y
-MRAS_8BU'LY/:H4>VHQ"SG`U>;6QLVDMDBSFS#XLLO88\>BDDOXW/EC_'UF:6
-MZDD-P56Y5UG(O6[>!E3M_*98R[;ZDB<,+<_)G2ZR')LY`<[+]L4HX5$N`N-\
-MAM\#SM/LS48'&&J6U3=.2FJ:_AP<Q4IZ,-YE.P)@WQ^*FU?=I%:IXU.9;!/L
-M)!*_>:8:&_7G180)1.7-)*:5&9#;7%O^.H;XNSX*V&G+^PO=Y10^+'BUISY9
-MT[X78E%50C=4M?#Z-Y<ZN9&/=P_7L#SI.T2_=:=UP*3\T%`<`R>M>4?RO+7M
-MQM5?J^DOSCK1_B(OXF(9[!^WIX@VQ)`^>Y10ICYGAV:`N[R;]/D^<]:`@UP-
-M<A8^K9AU^E77,:<"L0J%[H.^L^0[%!+TYTE?[6N^3[FG7QJ*90;9JIJ6OQ[V
-MJ9ME`GQ*-BSN0MWYX9JSL<_R$X<"?@<TP6)NK!PGPQ)U[\[`&FG^_03>:DX]
-M!;KG36`94`H=JWD65.;^A[H#4*<ZBVGS&^W#E3)VJ0E!;RB7G_Z:J94J`;Q^
-M6+)1<B!=G'!DCQ$-%FB;0\*ZO37PQ#`C49F<82E6<'PHEKZX$[F^Y6S\(JM%
-M%[O21_T_ZQ)Q1IX_$)AXJ59JSA'SI@:ZE)],(^35-@`Z:?&]0_&D?PG>!R<"
-M&X<0?/H(L@OP@""%1)3:T.=8U?*(7[J1WZE6LT:CYF=!DX>1]<K@&=:I=T8B
-MK`MO*OMH(H8@YI9ROTOC8RY"4F))F6CT1/#V5K^:0T*I)F1<"W<>%J>OW8I"
-MGP)4'8INX*:E54P9S^3_UL0OZE73$ES$6G_FZMN'9QR2F!$;4Z[-Z@N,##S[
-M=J_^5/8F<R"8M-MVD!0B`@B'%+UG<$+"(!9_N]$3IXKWL`^*^!^=Q@M_8/D<
-M_/UL@,KX!4'9%*S/S.N.2XC:!6R1H$L!,"T?#4(U#`IEC5_?Z(#*K?X5NQN_
-M\5WE>C>!LD&`?R][OR*FRL:_H%"5C!&"M8+%/Z)YG-YM\2G]:P#2IUL-JGQ5
-M5>:>YCNP^!V1HZ.PX_(,;R;14(]-J0F:%4FVSPUDH'MVG[]7IK=:_^Q?ZLOY
-M4O\$H2.`<-2J'$PK&I?`*_^.>(`H[<117@S]'GZ`K^(WIM5I44/2BGTE/PI,
-MW31U?1HW6K14EG9W?IT>*419,5#-N\(H+:^13C6LVQ(L@]J&/EZ^85S:%_KW
-M$$_[8''Q\K?B5UV89Q37[MA/Y$A%:>""E^Q9U5325Q"IS4OJ27H)$1Z=G"H2
-MBY<H.M/H@5*U#^A&*ZO>@I[21%Q1.`/?945EB,<W`;?_4V_`,GQ8/G0!X"+[
-M-D@](0'4%6Z<\>/5=;UC2>>&>B`>`D^>RRK`@[FP/9SP?_O!][3EB%[Y$9UK
-M3>@VOH:[5]#M?38L>$Y2CFN/ES/,7["%,9M-&R7R5$@`XYXUE$L(1>2,&@YY
-M2(9?Q+N^76(BOGZ@;G[C=]I7HZ)AD+CLR25G8J;9@FJDRJ(#9VA^37F1.+_@
-M8`(;<$GG#YM34V+?=%N>SL?-;416UOU]XRP^<87/7QS+XX&1I..=D*=<Y&!^
-M_1!A9#=XN<]?_[C)-#).W5VDA1P\]?5/Q!YE"G?,OE:?W9Y<J31=*L4IMM]2
-ME!9V-<MI7!NO6)PL7V1\IN\"YM]_89YAY^";281(V<@V<;L.-?WJTKS)J9"(
-M33,*LD<\X9.UC:Q3;?[%17T_.EI/K%DP1Z\!00P]*Z)_=NAAS1S!D(A4QK*K
-M:W;"4P']NSB]G5L84FW:Y?:Q($^*V'A+&Z=HJNOY/Y&[913`O0*FL;U*C-/$
-M@52+,:H&M7#.N%DWQ;YVU:_YW.0"D*A,`1+XWB/$`RGB(8>@WAVZ/"3C@?;W
-M:/$Q#-.%>Y6`0_J.R;V]-P/>&?^<SI8UH2X:#K!0[CGG"/_<[^BTC?"8E.(`
-M8F<U^#B,#A&FM.[<:+3+GS7)\3Y9"/KVZ(&/_4R8QW7L\RMO>PF:R[&H?&H`
-M*`C[G`)AN2;NIVP[J$5#/3<<!CVY^M;NFTG[RD9=(&Z"(8K;\5)>4+D:KPVF
-M<73KSWAXZ!*TU,CLI^46,C*P-S%ZV'H6JCM1'-?-DU,GEAQM797_I%$J]D#B
-MI"W(.,^L5"H6C-CMLQ*JZB\-6S'>R%E]`%=)/$\OI4M*<%I87?CS=K&4O8N$
-MJA."LPUD+0VG;>\]!*Y_U:6;@P`)Q#B5)=.J^:?HV_);X*5R#1J%O.2.\<)!
-MTD0@4D43IT[,&&&O.TGJG-RCTAG174KP/$JZ;WOOS/48^I,$NMZ(%`@V]V`3
-MPAY4OS(0/L]1B/67786TXR:CO!L'O_M7UST'W:C>U3FOTKQQI[0FWU]$Z+Z#
-MBN(1>D-V6MZFZ_A-:4VD$OK>QU\/\94B`^,A/2-CE2(WZ[DFAYC>9%8%M=[?
-MF&0]5(OA_P:?G)`EIS8@&7OE<[W,1DJSV;LJBGG7.+'(JH4^YP==+D_+&/,?
-MJ*;\*[J)AT9M-5,\1E7AZE'XN0?/=)UR`('0'P+.:/IEYUA\UB&78T#V!XIG
-M''8/J^EQ22E56A>*7JO4KBWEQD8-B8/W7$$#QP,Y:FZW:MK`-Y/G0K`=/"=M
-M<3X!Z!U"UNIA!XK;)5BH24*5IP8T\P2+]XD6*9?R^5""*?I'U.F-XNUE/Y+Y
-M(=<AXK7COA`J3.!?TWRH-<];KEE*]V+GM.+>%XGTSAD,-22NX2'M,;[[O#,Z
-M2ANUP%M#H+\Y4S#26N^09,"BT\<@'+JU"\4@#.2I?&4'I-@-N"TVDE=;GAJ^
-MMQ?''*K^-@10VEHJ^:LJUT^E2MZAE/T5_@/")KVX[KHZ6;>%"85WA+XG&L,4
-M#N$7"2>QN;GM%X]M+<YD.VR)D2+XS1R1WE[II?G6)Z$I=YA\$%03!K*^("!0
-M_?`YGL\%_`P*;'/QD)6B\3CJF(1$)+@3*XQ(YOV]>H`F.,S3(8QF1B"<V!P$
-MB]%;(N-(RM7"NH^E&<3>TR0Q.XPF-*=?O[#!_N97%$/K-"EZE\KU"\ZL,Q1R
-M0;(LW'YN:.&DLTR4&<!YH0W"-X2>^L4/5>E-]Y]@PDM93)L1-3HO%UPD&<2B
-M,&<7I6`%[:]/7%87M74T<<$W+J=T5+%SUP&"/KI_6FPB+[5ST5#]S:5,CX#:
-ME"4P2H4X[-8>[,0;T3AI8WJ%E;;A.%527A608M]Y;MWD;Y>-:7.]@&CX3)!L
-MTH(M]#-\2PSU'T'1(OHL@8?P&6MX](#PFT\YOO&(*`6#R[UUD`P=1.]I<:3C
-MQ#R@'G`&WQ9;O=TO'(]G5C3K;`T[<DA)##NWXB,"=,E#_*!CK$%`\XM#H(7W
-M[H*Z&[GBQYBH:#!WH-03L:1Q9-F^].6;!3";A!H9<U=30]8"KP8<[/=3G9R3
-MX,ZH4WPWL#N:U(L&'7#K^8,AF#4S=JN-CXM"[_XVU:V>B\[I*KND&7V(RKIS
-M3..2Y8)(-0,43)M79C*EQ.]/;\J,XQ5[/'W-=H+*Z&*_OCJ_1^5&`3U2Y&A0
-M4F"%,ZFI%;"6]_YT[ZS76H^1P9[&+7E^E\=ON!GA?0,9<PEX8CL-W8N0:U[/
-M:$E<SB57(<Q=_Z@F)\"%[DV+`P;OO>I@H0%5$%F_[R+NRC_9/86X6V.FQK;C
-MZF:W)QAM@N/#10*69+<=KM&TK#;6GK5JS^G6<C<.$;I`[W;,FJY)1T2C\Q<O
-M%HA\QR9")PKB9O`SC%$WB.X-30V,;T*,N6"N-_);HCI4_II/@/?<UIK3`.0/
-MZ'$D]5<QE5X\MZ$`6=9<,FPR8HH2_LL-)I)&Q/ETA@V]?<R7L[@^&/TS,[&K
-MI$6LX]Q71N\>>`T9'LR\UCWO.N##D4(8P=KRV2Q2]JX]\,"M"U'YFWP0%AV5
-M)`5?>RHO]UU_Y[NYH5ZOYPUHR7J2]K4X"^U6_4R/+^_U'J$[0,:OWY&R8Z3/
-M`!K_X<8#`A`/2ZLK1I*_,7/K`WY9FE7]:;Z+`P)WH^#)^FNLN7I$DR9WGS2W
-MFMA\#TJ0A,(Q1S5.,HH&24/&U1)=505B/K&4]XMMC7@\X0(AY/$'W'+QPQ[B
-M+H9-V:8+'S$GL^_;SL`GW.+GU.A(D]GRO\HE^)/9RP?>\'W2OZW!->_A;/\K
-MU:T<#+>#XSUR.D(L#(-CMF(GO";DEQ98.\R7OLU+Y[KXBX7!>$92U-<HQZ.T
-M/(5=GF9_OP_(E<[G;?2`8P3XC![XU#0?=-99M]+R(XCU08'MRRN$(12(3?D*
-M!X(M_ZN7\($K(*[].IK8_U&)P%%KN;O4M&X+F>>&^5O>,M$GOAEH5]@Y\-U0
-M\]GBOA`&H4,G-J[.GKDZ[ZC4Z=G+"7T)L!J[?A>`:#X)W1U^6N"LOF;.8I=&
-MLH+BLQP:4L`B00W6M+]K)0/;22*EO&64IKDRL[X]=2E@.N3I4T67^/"UO+W8
-M#Q77K(18U]GC0M.MM4$)."(%]R@FZ.^D9Y'':-+MR8=MLOZCK.,/YLU7<7YC
-M/`R>9$NCGL!R!&[WQR.5Y7_,8TS"^-CH6QNL%&*_L=,03,.G&_DK(&1H'L6;
-M?.&>I,#Q.I*O*G61<SD(P.]*<:>7.=O"OJ`JL(];`)3D[3#H=5/M9/$@#:(\
-MY+=3QS4(%J)$/;R.\-8F@Y]DV65^;7MW#Q8IMHN"[;KI:Y+<$[=>!H>1;N`B
-M$'K@X;NU^PNJUM-"(M,XD59P,.=4>&0S90ZBHKPHF-VNUNDTT$#'34*=<3#8
-MH3\YV_Q,SS2[AV)=L;+E693>TZIO^IZG1"4:-ZEO-,M8$8"PH9(27Z$$]_TN
-M*"7)]AO?2H.K*V(R)\C#3A`P";,=5@3_GK,#H,CQ_1#5C@G-G[NKQC2#WX6=
-MNMB&QA@.+>CK?FVU!G*.9SUH".<EF:-Z2\B8]H*_G?0`SK^RK`H^<F"W(&K!
-M*[-M#%1^0H&$H].$ZUN/(KJFZ-[!5QIUE*?7+/)?(JZ;YN]XE,O_+M*<G:VL
-M,X7GH1'0!J)KT;%_Z#9[<[\'"MUG-YIO?;CT^*D$R5-NNT@/C')L;NM*_T]_
-MJGJH(58$KL1EP4D'`!ENQ-&&*1_@ZR:6@EUPB=3[T]NW,4LI^-1FHU><+MJ+
-M!2D:)7,*!C]#O9*:A%O#QJR&=RGC^(5\3GY=C6`YAJQ-X*'*6?'_5=,_WGLL
-M3>M\*%8D%]<-)N?!<^<T=F01L.,`9!8J-W*^].S0]GJDF3$6[-91JQ"A&X;H
-M??GQ/NG"<_LX!D[R7V^M^T9S;OW+BKBRVNG5'51YK61/YG#\T3N3UQZ]TG,%
-M+8$YS.Z\@;3^"MBA*MW3;E`?I/BP+LM9$O2O!EYCQBE*H%&+6/R8^9LF9!;)
-MZ[)GBKM-0VPTUVY9G9".H+N-%$5E.X"XK*)(XTA]",P<6[[OT@!/1%10B(4%
-MW?*#@#\620KAB9R!PB-5=+:*?9_PY1O(5ZI.]ETO.<6&S<UY"/.7#HFR%+W:
-ME^X-\^QE:W>"#GB9U+8'<,H<B69-N<-"\/>Y*GT3U')@4`H]\(GD'3QS!K6X
-M-*H[$-".5'*>]P;1)3T/*DOPPEVS=.Y7&"_JRK_(@4%Q]<W5%VNF<&0Y]:R:
-M'8!PGC$/"L5Q09G)WA:`)2&GG3#QXW.9M$`$(@SOVTT@MY[JE0F`".:%Z8#"
-M^O>D99QF$,8NA,):#D'9!P>6N)PL4%$DK/``"@`,&<LL,[AI)BB.U!!O:A44
-M)VO6D6H.-\;+LMW1[6$.IJY@(T(_9J'[^21`_\#>1!]:P$1Y-J!?K-G?&NYC
-MD?GEPYJ#.A-"VS]VU"3)P2KJ'T4K<[`0*Z_AV*TK+UC[*7KN.U>%*I^OZ1.?
-MY1LK6,3JZ82H[8*G,8W5W/-3'1+8`%91>W3_H:];:G',D&;.+6U$"8Z7G_N%
-M)T*A9PT@S2/B.KOMUTD">+'FKX=<?>BT!$^;P9M3J%;CVG+[C3-YJ74,=R*U
-M3RD2;7SJX$+Y`L8S)W]#*%'^SQZ7;UFU[(ISN2B-2/)"D;V8<<:&<#_I!<PJ
-M+KB%-E_X#MZ<]R'-M_[W98J=V6"2WP3/:[P7\?Y<Y?C-?+U,+)<1.TB%BB3\
-ML4$,WF/:4P!JXBE:(S-]QB7@#QG;#L;/86S[*Z8BIK'__P'U($?=H.`,G3+?
-MZ9!6_B"-!B`JX+#RV,B'KE][`^P0-URH<G!'UJ/5,&W[V,63;/4J!>:>(%*@
-MWZ=T6F6?=1%\QZ16"-,.[=*D\D=%TAER<%'8"]#V>/P[:(X+%TK15,/"@''.
-MLRS,(9>6'2*/R[BEV,ELSZ"S^SJ6C`T+@@8V3N5&>7AJF^ZI'^)M9)I$NX:Q
-MEMUGSUB0&*ZY'J<4'[.(51F:DF$P3)Y<)+DUA@;05M9K"^C9\RU-*#4P+LY%
-MQYSY9M=5<$%3(`-G=*`.:_G^<#AA!Q$2&7TJ]A;MBC&2_M:#$#(S6+?+3GK9
-MP\<1/ZGXE>B!K:+@AETBQVH]@X^=]4]164@EPM,46#L)&1=1LE6Y%X$XQ*U9
-MK(X'<@K!ED'#=93HJA<%CTLVM29`8S=U\RCFRPU'!$`FAX^?@YUQ^-34/E)V
-M?FUT[WMFY$P:XB9JMXWK/1#6<9#F9U9@">@[2*\4Z7#(8N_Q\HL*O8!H[B9]
-MYS97;)QSEJR2Z,R)T\#9N=(?5^1IY*4)G.N8C4;;'%`D8#&@3'C>6&R-;LRN
-M.!6]SDCZWAEO%MR]0<<C?TX1+T+L%70-ZD);_$PH*XK0M]O8I6QM07<[`)!Q
-M[I->4`#$@>7?L3UN<U3S=V^1=\$ONO3JF$.]@8'PL!F#]C'6\E!R:858(?R<
-M'-<K>95&.Z8$K?UMG.V3"(JWZ*`A,V=NG>O9&<KDN&@WV@IN9#KWHVE^WX;&
-M3RX<:!B2*HZSFYR">ANB2/C%%=O?[NU01`>QFEE9)YD:SCC,M%B;%[W/LEWC
-MX4?8\&_ZMQPQH<B]UH1+O<",@;;4@P_FQ02G9,\BNOM$_?YR"7@U2;I<$&$G
-MS5D4KG;5\6^^Y<H/L?^2N[@5KN<+6YV*P2-7OX4`K=U:%1`JE>"N$<Z2228C
-M).;;F:9/1M94D"8T"\_@R?I05B<I#_=TMJ(0Y$R'J5*Y(%/G6`YBK1'M^ZQ"
-MSH!=YL:F35ZBZWAA;$)7+W3>K@0FO[CFS_17G`_GS)+R0$?\O6:6^I%C&$U`
-MX)Q&KF+]&U5U9:^[&E/!C@4.P=R'HR]Q9@-TWYLMP6%MZ]PW0'=NA@P!K,J8
-M_IO^]LEK8]\8K:O1(*$7FCBC>+VT.;7,8.#>>'^RJEJ=X_D@=;JB9?BB>4-F
-MW>8'A=9J4C.0#XJX<'H+$S:_B/M;)E/-,FXG8$A62@_<TVQT^L3%_'G'!P8J
-M!JSV_KA%,S')9R5#5W^4L18FO17;+J,4/.NRM&*9*05"M+'RZVUA;,M&5XT[
-MM_;9D9KG<:L@-ZU_.")UTOS=SA/4,^L[)*]2BDV5EFD;.=WFAK#\1*2-ZO/)
-M:XSD76FH%(4GH,P(0A]"?Q4B^8)HFZ4PQK5L\2&YQ8ZE4RJG_&GQO>;5#1%D
-M)<AOSP"O0V@S48A5D+@:OH<?CBND9G<-:M)NS>20<ASP,:;EU9_0VG*'O5Q@
-M"G#!(SE^6+Z5I)E%WK??#%5N:X<(%//Y[4\4SWXJ%&C.J5AA134_6G8K)2^^
-M@R$DU8;_:'8WF#9#'I%V^HY6L;14`[XRT[!P<V,2)S!7[X>N4E"MA]`[?/OU
-M[-3ZV,FRL,`_&\X&Z3C0X58LUQ7_%PO,(Z-&VZR'5X'[(@R7.'J00"8MAMUM
-M'CO;M7CUSZ.'<RFTZ_,-O<.Y9ET5D!,![=C*.1-,DXB60[%<=<V1[O%U&(L+
-M_P2_.X4/.P2#/SC$BF.&B!DN!0$G`'_TWM\5YBA'PC\AM;OMGM->J>KU+*("
-MT]^D0EN]\YK>=2%$QN5W\@``MW2];(,+,Q_HJ(`Q`P;@'"E$QODV>/2<01)F
-M6T_=7^1^E:TA'#B\W`+7<:=0HL]AI#2O::_[FH$6CUC7X3H/"W_I[T8R7\06
-MB?=N!#"4DK-'?ONGUU^OP*45=G^08KQ;Y]ULV6Y%==X$3:E=@LUK3N8LL18@
-M7E`0][#62YIFA$BH>X0^A9-RMB#$$D8T]/OWM;JDS+`IOQI==05";!XL[_CK
-MVA$0T5V!E4Y1\Y1!6WEAG@?$C`FJ>8)A$^J&Z/:L\^'AI11EU^\2F,Z+&`\7
-M+#DB+.*;]Q>33!]+*9TY?61P;]$8:G-DZ__,]#FI76>HGD,R"#5/#=NEU&FL
-M7OYWRBR$TP-;(Q3EA&V"2UPD*2775Z%(]1X%"2BY4>Y"*='P)[WO#*P&<,#W
-M]X-T77R*DB80/#"`BE(PIY$!4;1U&S]%@2WWV>2MFE5W'@&YU\F,0TU!YM_@
-ME3J[Y@,1[*A=;4B&@8H7ELH5]LT;.+V6)V@6=B7CHA4Y#1"6`>M_P,C<SSA;
-MS9HBIQ?NJ!GO7KD)["%98C/A]SP9S*BVGO%*K!WTJ*6)L2\,\-QW$"],X/Q]
-M",]+%\;/<7++.O2.5^!,8=D];Q=`(C0TCM\A^P%N2E3PL1-=9M1`C#U63Y7C
-ME)7AKDR>$#TQIA-.<17]ZZZM874%&EZX"JA**6Y]1F%-T^TVXQ4@W1I8(*ZW
-MVK#!CICY-ABSGHQ?72M%+/!`0N3J-5<;XGN\@Z1`1$IP1F>S<SF[`9+%RI,'
-M'4`C(FF8\\XQ!\\7:3)K?K?X!I7]R@(@QZNTDX2Q-0[2ICNM05K.L-$*"M40
-M,#)!BBD]N\`K#`7;1G!Z(/01"&KR6Z5)H;<3I6JNC5\GI92)&2@]-BO8*05$
-MT&>_D0W63>NO\#>21>J<8JC+,N_,&[*7I,K[\;\=[B#"4]3O5J<;YY8K1HA/
-ML_8!JEH'@U)+:/Z!TFRGH[J44U&%M!EIH$5ZA$L\L:``@27'?:UK89-EZ>,O
-M0KHG*O(UXIR-ZOZ0'Y38+FTW425PL+%>!R[1VS_F4F$%0K_O'8UGDZ:D[V'[
-M\UTV10?8R\6M?;^P7Q(75RZ=XA?E7$_/.$^:D:,S)7W95(C[=R-R[4EF+!5E
-M,HUVA//CS:&VUW/8\9-"H\04LD7M)^2_>#&!TB$Q@0CE'`1[4N=-EY%VYKCK
-M2Y3*&8E_"'FV#8"8V]WVLKA#C?<"&B<%5PH#*;#CUS*QZS)%!LA"=%OE)C.G
-M^Y`DM)!NN`+6(7U#14RK1#1C96*;MW3BD2X@S,VY?+D+_VK)_RSY\"TG/LLD
-MT*&[,[!6&;?:B$*H'>@`@+Q3DR$)Z/*$2V?_;V[G\:(I6AE#>82U2O=)*TP-
-MSJY>+0_FI(A3G/6(K5CO*R1(G<;(J0(.'\K-[';]/N('6$<+2J=X2U^X!_D`
-MH(??L?VPDD$W$`O?[5(OCH4D%SJ5D+6$([B#/A][4.P^Q!CG8G$82I,T_`_?
-MIH"V7L'(/I2(S#!WTHL_?VIAC#'BH<EJD<Q/O=9:.L"@\U?)X;G(/&$]>%Q7
-M\.O6Q"2Y>#O!5(;;#TH=^9/\D)0%KRNP3?E_U&`Z.K-CG>!]6KK8PY=8A7AF
-M\%XQ+MXIT)7R:8!!/@)DG>#<4EC-46$_=7`J<C_RIAXGF<+>OZCZ20+)Y.*'
-MM%O"=KL`!T-1H0\&*F)`KEVK2_:,([/$>XT+M9]P3OGQ`O2J6AI==8Y8\$_;
-MD40D+'1$IPD$\BRY-O49>S^S&BC0_1&.Z:5KC?F[C3;A"X^J7-V$;=#45O94
-M&/O+/9'?H]*B^.X7)?^BW+XA34\[#B^)S,&MFI:/T?:7^+\'_)<>\,;/+NR%
-MD@0ZV38LVLC>+,-K0[GQ@D$]P?VIJ+R_QRE'QPV7R>R\D4>O3IF(,EHS+O/V
-M3O!I((?&D=1XSS`@R!%7V`[!AQ=<L_D>\LRW0;K')=$`G,T9!V88GJZ/+%-<
-M$*SY%T4'3*-1)/FO$4JUDJ,=I#'Q>_L5<1G8>@REOP`],+G,_%69_@]*N5*X
-M:O4H^.MDXVWOS/U`^ZQHPD37!G)UU`AE:5,5E??'GY@;G[?CK^')\A9Z^-CX
-M"&(E#P',R%"_:^^&8]1+Z$><VC%@UY4/P;I#*B^[GLZ<ER](5)V,;J/1L5K^
-MT0OJV`PEX.D4N*U"IS+F"<",_IW!F8/>4(%I[`8C\\@XVW7BIR&EI,`9%FV6
-M;&ZQ7!@$J0P7%5XZX#Y?\T!%]G]TN==$LIRZQGE*:Y]V%B?^$W21@Q(YP'%\
-M6X)U!R\@!YRTHO_/#6+$ZNNR4(;=4W5V!>@"%T-#F?]LH*RG<8M2(2SE>LJT
-MJN>;AAHK47VWF;XJ.,#T$Q=_9N9?3LJ_FYN,DG-O*P/1ASF@VQG5,Z#<VKP`
-MM47K[+VWR!>P*"*$99*"6PBIFW]95HFR]*T6FZ38DW&@GLBZ,;S3+AA1$P6?
-M0RYF@+:HZ1VD],KKR;8PQPQ)A;LMURJ7Z'U;\*O\ZW%*W!>&DFABOP-?R*]6
-M\Q'%00RMAC;\W6Z+!M)N0HPHB%&6I9)AV>/(<9.KD56UZ6Y/KU_31W1-%0H]
-M\Q2F=*:%Z4%*<(;S:CJF8NPHB'*!:&HG+*N:3Z`\)J6_L/'GW8;;NWX%.5K[
-M)1CIUMK=H!R3P)DSM^%!.%4<Q568OT<!1XNV6I;5G.O):KHR1@C]^P8K@E=^
-M(4BFHCI(WJ0C9'+=XN7V9"QUQ.E?J$?.<'_V\LS/"Q!'V_2%_L&-+L8$W5MZ
-MAQC89F?3J/#)6G.L?6S"[/R`$45M,L`D]80+Q@IBBNH^%6%Q)T!AC)/_[YG*
-MP,.<HA9TO=!5E8(WU-#O/?:;^%_F4C]0[/WI?0Q<X^V9\:W.6HT*7FU-B$5E
-MI61$R`]4EM@$$.4I9Q*8W34$9?H)*>"1>=VS@SST/**G[-R<2F_I<Z"2ZV"7
-M&T9WE!.N`6,8O3@-9TQ-^],'/Z.M#7/F`8NK?%C^0P\CM.[?=PE-;$!A7[)T
-M6Z2Y^?0#_Y<9^<>/E`#$E`5TD!T;&1`^I+,I=WP$Z*0>WD?Z!2G*7L1PSM?\
-M**NC#SIL6B<4UV%_RFZX>7),GS8B%:X$00%#39?#X6G8Y%^/U`J<==8XBG1X
-MNF:&/,)7B*;MQO=\!CMJF4F487=$&)6#^RCQI9<[K<I+$3/%7SI><C=/?A<9
-M>:H=ER7#Z?HTQRL;(*A3O24<KH6M5ODE-)9$GC@%*^YE5V.QR0V^1=F9:>O<
-M<#OH.)`D:#V26C#A^._9BS;H'[?#964+RO043[$EWBR01VOFK>Q4ZJPH..5D
-MDCH\W?I:'V+I9KIPL4Y>LC@HT(R^GE]?MH6T)0Q[.!^Z&441Q10;HI6P!Y@W
-M+/'(L.:.`HS4[L-V`PI1V/`I+TXAU]5D7_&+^R+?RY31:%M^&=4.Y#9"G>PQ
-MS*H?50QJ',(1-'H[.*JN)/;G-4:6@6Z_(6Q#Q)7>A6``=#U!?,8`#L;/1MS-
-M!EO0M4<X!+:/ZCD2H0GQO#PXS+0]?N7N?P*I&FPZU&"]@.!4.(Q[D>SP7%./
-MU`IHW.,=<_4>><^4/Q+K"=G\'[MRD,MRS^V4`#/BS])8SK+#*%/@3$0S\+5'
-M9Z&UF](VO!*\L$S]!PMX3TCSY%L$W3;\1QU\P$MI3/!>XV.`QH2OV;?O255*
-MZ6;YPPMA<S`W%S4<=3F8N3P\@BC#M(P#Y?W-O1MCVA(G0I8*8?#67B4M1$[9
-MGE+3M99:]:1LW4"'F$Q)OVOI:\&:#GJ+/0OP?96=D1X/<G\/;]("9RD9A4DR
-M7]GZ+_9$U==:R=IU/Q(IK)=-(^U)>^D:7I`ESE)BN>6B=K>/KA!?;Z0#.&%.
-M_]F.N/KYJ6P!!DRSK.:T!)8WP%'.TO9&)1LD";IG`KJ(!D^L=XX\6>Y[<W\]
-M#HSO'0E!S,S=#V>EXI][C:1@AN?8W$1Z>5QY`0)0:6-Y5S&P9"F8H?C;:L\B
-MRQ4@PVVCZ[U^!?#R=Q.\IG>0X>+K&OY?G2Y0H=#P9V9^!V=Q-8-\,`289CCO
-M*)EX1'3=.=98&MRS,O&(JCR^^J1[9;`Z%KO\>OSQ^W2YB+/8,;C:#4EI09U9
-MY]#\Z_+/&%_1HZ&!L-%Y<8IPE%[`X9^9A(Q!*S'3N]ZV[&&,*QL7"EKFY6Q[
-M8I@F;C0CJSC_7$*;2\4![)$]JPB9DG;X<&`\\][W_@I5VC+&O)Z/G00U*&?N
-M("[)/C/>R*/+3E$_*9`Y<Y)U]5SI?@P%#_VRM2*EBG&"\K"K,IH-RET5SZ%U
-MH/&(3N(]MB$8W>DZQ>NRHN-HF%HS:8Z<]W(VPTR=BZM(6*^CPRSM(B*4E&*3
-M5Y6UQ3KKW2)Q-PMW+Q2,'XC;Y):T,#1,M<AP<)/-7:WL14/4UN*5?O(5Y.RT
-M;MCM#4E=-/GVW@/,B^"JU.,;<!)"N#M_D@V?!)C#[E:UNIU)2>'^\B.#$I@3
-M_RJKJ0E%"+3*6_.X$:UT&MX5U`J-B<;X6U-[36T'&!.SGKF@$[;P1KW0I/H$
-MPKXRX;L/SS?1$OE3HV!O!$>S+.*CT;NVS`RLXS9_\O>_`RC5IR``<)U$BPG7
-MNJ-C!%%[`^[6W(,8J/*7A\*75G$EEI$E,6-ZZD/SNW<\5!+/K66^*1U7G%S<
-MYB'T61&&ZKZ3%WO:]Q0(SG..[RE3<$2"CE457HR84UEKPSA8&(\MHW29CT75
-M>;SPA!9FLWD2A2B*JT,W((8XS\]1,V3BG5L@YXK!JS<6Y(,$NVL332ZXQ*SE
-M@/&[A^)1>T(J\E^!E_U?S8-QU8K5BF2.`YO$G18R(96;([T;0>SNM4R.UF*2
-M2(LKS#V8Y=B`XNY-:2<G4C)`,%>'J7H`'N4ZWI%),3[IT/*8Q"9+VQS2(Z5Q
-MX0MZ](%N)9#"_O"WI(J_8J23'MS1\.UNJ)0:^*OA6>,:%YC^,&"_!/B&%/Z^
-M6$,+#(2J"IZ@4RBM6$!TP*K$-]6[XSUL5VQ>)S>U++XWN.$1PMEZ0<*L:FB5
-MNX,N`4S'DF>`V*HM*/SK+PO<[<*4)JA$Z#<>D+G#%X(8-0O;].LE/\&@L.NO
-MOSS)*LM/F#UHYEFEP[XT;JZ;H'6OQX]IUXN]Q2'@-^R0N`K'$92!9<W&)G%U
-M++`=]0B@P3O37)L4<9,9DQ,F1(0^2;S'@6B@WIJ$.6C*\@EAJ_JE#2#=(S97
-MDXR`9#+<9\X(363=_OS9Z"=^J_NP8(RRKDI3!W_Q40FW`WLM\=]`/I'QW-*5
-M!R3!%%/X3]R29KT*3_64AFE)G&AM'U+,M])W;!>X$FUYR)KKJ^*$B%"3+YQU
-MB\"^.":MIN*%RO-G6M9YN.DWU8_U(BU+$O#I2MR%4E37.&?$%N^$/#'<NNV#
-M2YQUNN68N.W8;C=8QMN5P]2YT^PE0ZF[*(C":&<'D]G7?(@'M-O1C)U_JAF/
-M:(L17VD!.XO&4*%`V-ZETNS[^-^QTY0S[#\QO6O^&`._3N1&NIUXVW/S'18(
-M)YF/J8U:+.\('B]9AM6R@%`HUDZ-^\"QEQ*N./0T!Y2*I$)2&!1^BSR/U"!R
-M38QE)A0;@(VF#</3+;.)%N<B4QX]5BT9H;U8X+LJK@9V([[4=.S+6SM3KO1W
-M`>5"@3GZKW$*TON"$7KBBO:AW+K%VARVX7P_Z2.DSEJSO[7X=>MKK-:J%[$;
-M1,8$GM;NL+Y^GM&%K_H^'BNVXHS97OSHEZ;UVVAX,"J3F1GY`P*/T5$KK1%@
-M+]U8_/,[X3TO<2N2'8\S*%+^&S,',*@F[K([GQT16^!C?8C-WT`>V[K-$D)/
-M8OCAAJH\=1=5A2K$Q/Q$XS6H43#&EH$`?`M^\O;4CU"WIVV/GNMYNH<M*VMD
-MO$GBGY+YL8*NVO3P.?@6D6-TRYL_W#7K@UR-Q]<U@^-%((M**19,WX6MI(EW
-M?U*@VY=:%OUK*H"JDGQI/YO;]"\^KH$2XFS+4FXPL[$S,*3%H\8,QMZV2*F-
-M76\S520ZJPUAUYP32(B-5N#<LPD8P@-##>PL'6,J>$MEC/_!XC'N^R3)'>A)
-M:+#J!877OWH8%LM67^]X^RG6!@.4M(-?'85R43'V>ONR9O!=A(=C;>T5FUB4
-M?"`?[/H3ZV*[@WN?*E\;V/54,3>W#4=\G&0@4&@N(Z'DYHSK*0MSRJMV-DO5
-M)3I`%T0<&G<2G[,EMXE"HP?GPR!5QPW*R9Z*M[!;#CE4/Z?8;Q!A[#"\2;!S
-M$\QO&1\:NE!_ZB,C-1S$5?<.,K)ENXN2/)]>X[QJ6G`,CUVYZ_FX1`/(&A7_
-MMVK^'&SN`YYZL@)/H`FY]Q2<MPNFJ=+ZR8!$VBT\IN[,2HA$>NQNP!BF'HPK
-M7J<IT#Q91V_H9R4R4:NYVDTP(>1+)AQ#DSLR.2VXR+D=^R5JCW[FW:,*='[4
-M5<_)D@$EEG+=TX'97"N06;!&6XO3_SL4!BJ@;C<5DN85:S@WM!?O,BJY#/)W
-MW"Z$)C#<SIM.NXQU^%_#9L[PIK/G@3DBC"$!L],I^Y_MS\SB-#:/59RF!C0C
-M:[4YXEB(]^J@C__4`H&UQ`?YN.)L!!@PY@E;GYDV^'X_]1P'@!(\$7D3IL[>
-M^<KM9T<AC0F9D\)GL$=.`6,PI0V>E=R06ZI/;GS6?E_6PQ*XCP/]'L8]OJSI
-MB*3A(E7#(&%KV^-"OBV:NN5#<^0*LX8GRF@@R:V^>[<6ANRR)LQJ`4,4]FI]
-M&)+"8:@;+ZQJN+W7!=T\F.MD[GH%A@W]=\"`SC].(S#86@1)'RFI_+[D/#X`
-M#[,`-B=:IV:>X+59^Z3;:GQC-J7=N?_;&P@_3X+$['JLSCP?/T,`5R<4X+^!
-MSX(C@$B%M\=$.OMQQHGDPPJ<MIG$0D\4BL7P1[$(X*?[2WQK/[_;R9+0!V,E
-M=FQ75<I](B&$I-97(N/QW]1L=9D9?A,-ZW^>LH^W[B/@-PB)*)Z!Z;]3O+GB
-MZS;8NM)13N[=_NB/3[V*"MD)QYD:WV`XII'<]`YN6/6T6F"%D]Q%.J54?:Z#
-MVYIM#%6%D7)G-C,LG2H>XZ!W_[^D#MV6W7_3LA8P3T4YB64':;ZT"/+E.^,@
-M<^TW;^UIXJ;(?&ET"4H'+Y/7,0$`/RL!D/"X4DU;3/A3+M-ZLOQJ,7'RGZO2
-MSB5.<MZ]]D+B4:D%R#N(M6O*]>3>9IZ7]BE!`T+ZR<W1U+;HH5^/H[,7TVZ=
-M$GW)QV:E^TO-2Y(P*+9U#%Q:')/W)V[$XMW^V#"OI2-H1J%:4,Y2K9_2;=\3
-M7KI=(^?#O$P>L[74W>,PI`$UW=IT0)EKTD55D9J)AUE7V,NOSHVR+R0(M;UE
-MM8LRCG%!;<U_^"3J:)#3#&AT&;FVPNT%:%)`O%*[Z*Y;OM28ILNW1:5E[N]=
-M3FM5^J6A^)^L#;^'Y#'R(U$JCS<4VGH5NGQ#[`C(7,128F9"VH=LB7?QN;'T
-MWBR[+I\@J>K6U@)!EEIDM![.C6]^>IDVKC700S^P(&JP+`H-*[;QI%,W?J-F
-MG1M'/@H<U9>;"98[<1D:QJPB/,<R_2_-%R^0(`+[(D?_JC8./;*BNK$CRAZP
-M`IKR#(_P24"-HR:UX4MXS6V[!>'[CQ+9%UHW4^K%GP551%Q%JECG2)11JX-N
-M58I*]L94+1>Y@(A$E/.QD&T1/J6>^FNR0\;08+L?C#%M)#T->9M=^;CQ@E88
-M07T=HEF=TI.ZUFK#V*'>%4Q?X:V,HH2ZZJ?\CXLHN^><A0%>G]X1IE--@YSV
-M1G[[M(R^M'F+C$BGY`/<`58(M`A`+0F=@SV]L4Q&`,S51U&_D,/*2A_41>OV
-MW)I`4;E2>^#8^UL[QB5VKQI%,%?L<)Q'&S(WGGP<U%G34(E;;='Z';PMR[69
-M<LR[]*<-;AQH@7&?.(T4--%?RG\OG25^XM'\1JQ!+#Q^L&.V^3&)$]O@HFC-
-M":T5*E5!'#:`86QR+U-17!MQ%./FN8W=/54<W:./G&\C+ZM#N3XO9%'0Y.WV
-MC@,_V0(GQ`KL35!$E5D<N"97(H664;T5>:_%4:ZR;8R2A<%#D;S]4A,'ON7>
-ML\T?P-)6PF;!?3H&C&=IH)N3]G6S)MM*0[2.PWM6UH.-P-:!AH)-9^5*6@S`
-M31IBGSEFKKUNO:PB9;L8%>]H_XQ]%,0N'/.,$*:T^U+=!A;H3\/Y(,T#X)LA
-M,/@[E"4%</*Y/ABHM1%W.I-C$-%;^U6WGXB_Y1>Q(4V#[F=_ZURVC'\&QF%H
-M(=5/+O"XOX?^H^ZG[<^?9C*G:&FRE-E%TSE'AB6OCKD*8H48A!R(776+A(53
-MJ5=\`A%]NVJ-P0@J0?LB[]-*6Z"FEQ*OZ]1LSE\CU!%(D>7QE9=EUZ3F.M13
-MU)J@?DPY^U\>%$>N]83_`A"0LSQ6D26`9<J`%;UZ$*V8[F7Z93>@C"SKT.2"
-M3R)98I\O?3I>_:+O-*[G+?6,-_K]9E[*:S0R>MT@_OI\^P>B9\SM=7$N<=.5
-M2_?I6+5):\M]Y%C0ZF.F0?2=CE]6'`#XO17,'QJ]&4(2K9`EQN\NEL7HJ+0L
-MKE`V:AE\A3?,8THE:K>8Z0?_1/\T04H4>SW,Z0UAG0G?XYPAP9SC%T!N@WQA
-MFG1&HL&(&MU&<!XF`0-Z6]O'KC@3\ZB]"8NV8YC5=_;GXZ@D0.<)T'!3K\9-
-M^N3<+[-;M`#7RTKPUG0)[0QG,ULWKO>@*.C%PY<E6B-IR9[[;/%SGA%K)5YZ
-M&.CL`-H^*MD,X/6-5#KHG)U6,C^1[HRFW.YG;[`&F#EWJMD!M*=*/+#$_E6@
-MLNN*G3&?&G>FR]U5E&:U&"5;9!&LB;K:KE1(;DZ7=IO*9LF#<D[SCQ.G^HR&
-M@\JI"<"JT^?L"K&QG&U'^-/![A;F\Q&E<+--#K1:6D]W+@):(JYI&>:KPM5>
-M8^Q#,\"('4UCN]*)B4"N"KU@^GO",CRFJU)>N_Y7,`2/T'=CR17?5@=0\6L-
-M&,C3/N0_)3VH(6UDS[]=#X>^B!SBEL^/LI).,HW8VJC'X,$.^GFL]`YT]QO5
-MQK1XEU:X\?:2K!WBI[*SCVJ63I>8E'>Y61'LX.(XL1LV7N$9-0*U:EN>U'VS
-M6=Q2.A$501UPZC0"C?+UCZ\+G-W!:8IQ>_UIH++QJ_7^@P(6G((+E["ND>=5
-M%3XL1,YV/@NYU@2?!7%*5.J1G;*&)8U=#$FRZE[PLF(M-*ONHD&KTFSD1(6R
-MB4BA*EF#*1:\;J>X"WU5ONB?$"F^;9L#+YTOOU1X4W?L-*/K1A6<;F\<0.O\
-M_6,JM_]`.7I(B`#D>4?'ZZ_;RCBG=8#6C)K(H35E(LA/>AV)ZRN/UC;2PP],
-MT4J&IMD1(+Z)N!).^M8E*LF\(<P:R[?'AF([O#IU<D\/3H'>.#)"A\27*^!E
-M8H64E)-'C0ML7X3]=LG49YZ7A]5ZG5/M&!R&ZD4&_\P,%'?QF"FV:&0@[<,=
-M/0DNJJ3I\=&5@4=N'DXA-:R:O#-D./1<^U[60PE-B5ZCH,27B@P6TC^(3BEI
-M6_.9)"_(HT.!LO]4#SUY/,]G&_#ST;+6U\>3UU;=):^+8)YKOA6=AQR5$?NE
-ME[[&'2E\V)^Y>?826Q>,'`%N<BK:5L+EVN5,/:M-Y;*>[<V#F+T+")Y402HZ
-MK2Q"+WFX=NS0@3*P>&NFL3TW*YUWFP`X(T0A5G9;9-8SY/6-)/P)/^(24V:2
-M>[:#4>L4KD?Y^D9[5/X`N7Z;+6<>$T(WPTAV?^Y'B&E,OP_;VF?HL9/,2#GG
-M*49!*I\&214-E]M(+/O6,NMJCV=FHG+=7%4IC;6-N8DJ!J<!\WYVW<-@5B-A
-M)Y/@9YLM&RU^AGHCM]8\9+N=@U26<=D5#WW^0GY4R%GW/FZ5H`F_B9*Y$<>H
-MC_ZST/4_5/W=Y5I9/$2>'K&*.T_L=H8`BD^TQY)%7D%X(B658VWEB]G\\L+,
-MOPKRIJ@69H3H\HT-+O]@MRQ<!!1=)@6-\^\)/1$?5]:FK*S&IW=&TLP/:0I4
-M6<\<ZD@6N6.2@.DJ4"$?K:02X?>Q-H)5#]5!??BM)^>6@<A;8`WF@('G.J2_
-M$5&]7=$J'8ABE9%K8@3K<B#^\.II>_!8^V\K$Z,.]*WEX95?H8P'_).M?G%<
-MW`M0&O2,@@"F@<\P%(`5M8+.5@P+5#ANRPV^/[J_RE`2@?<7NT5]H8A9>&>'
-M1DV9]C*!^HJ;5L[]DI:U_4<54Y:S;_K#/K-JU"-5)O;L+OCUH1L+R\3R-UAD
-ML%A7A0-P#_E&,M3HE;%G^`]B(K&YL7SX5PNOZB,7?_20KZS`1']4)HWZ/Y(^
-M<JAXMLM"TPR]ABPF<8._G<3JY$KB=:%D82?#!MA')ZEW&W.I0$%966_WJ#AT
-MS7AY\DH"QW7>MOV>!A_E\OMI&;KN7S[IN2!;1YI\/MO%;LO"LSLAX0\>6]NN
-M]-@VU_7JE:5*C`9HKPF*WQN)U$;V]-MPT(^A>7U$#K=KFEFIF^/3?NM+8.7+
-MUB`K[?!+WN+'Z2#NM#KG0M$JZ.\N`5JE(HH/Y#?EA(=N]T3E]#!6X>SXB-N8
-MA-ZW0`1JX&I@^4,@--7?B?]X'Z_.S<.RD&05G,OT-:$!23UOV).&)TOE$;OB
-ML^*9_06SMQV$74?B885J9B64W]'E,OH%8&CAO]U1BVBD]GML`:5E.GA`'#:M
-MM'LQSQ6E'TBWQ)F'^<<*C3[:MLY>?RY:_&Z_T9!GF[W7\O]66<Z):+DL7NB0
-M1,I4&@4C<`CQ0-!J.O#R,]]FTJ04C'=3[_%0QA=MEN''I3_5XURC;J"YL\=#
-ML0]Y1=2,JTFKX*MW>E0N+&_4(9WJM'+X(/D=&Q;D&_J3*"(G(4P]Y0=;;+E6
-M'VG[$>JF[?Q]#>"8>YY1V=I'EM'E+9B""^S=W6/IC`SN@<,K/'1C2_XS3R:"
-M1!M#)H:N8'<:S?2<QS.5K2`#);X,7[;6FS.NT9B-?]_Z+AC3#`'Q6N?W70B4
-M)$;7ETBDD%&L/V$/\*^2OII3&B<NC:J<QV(W\0-;W@%Z(6_QPC2^0S8%L[,M
-M4?"6ZV&N:.X#/TO!4GI[2&83;=5;&-`R;SN_Z7>)Y^=@U11KE3QXRX3AF^A@
-M3"!XR39%EWZC-%!JVGB&6)616+O\D\MQ%3;MP(M%Z3&)A#^+!#N#Y4)F0"8(
-M@`$E;5E#40_#3R?//9[%;_P#Z%3OQ0Y(#WF19W:G.HHTO^WUDG?EL-/DG*LK
-M<,`.6Z=!G7/M.^".)36YKC-;/@6&Z."&W81><98I%4KI;`+TN##V%`!D_5_&
-M-,+M-2'?5`%%P^LY=VFN)-LOKQJMZ,"HCB$9IGX`BO\GO;DQ[(/W\8HR,58G
-M-WJI."B,32"0FE1-+W@4+=V>LIJ6`SX<(R-JU?K(46#B<XM:6O6[Y&IQ^;?=
-M9&IE>0Y0IH14:Z9;MOH/3"JB6"N_GD%H/%L[,@JYU#];5*MK@*HLJCQN5V*@
-M?NG-JC%($L^?#@;4M"T`3&4`@\B#859J]>O$_:H0<HPS4K<SA5:<?Z7Y-.W*
-MCBFRFJ2N9-4*(:*=J.<H!G?#S6I.,S^F`,9>(C_(DK,YF(Y54$WFURJ%+'UR
-M(#=#F.223EU"V.Y_,5OS[E&V?$WF>^&O><*XE#D0_-JS4<:B*%\!7#;CLDNY
-M=0Y$A0O$2*9;Z]^"QH.>-3.FN=6@F\RYI^VH&DU?'&N(#<Y%NVH[\J0X&WSQ
-MN+SN5Q56<ITS4Z;Y-=P"W1*K7P)-.ZDD<-]ES^8RC/,2NFABQ;/=$#(<6G;:
-M43GE\?@QDWE`:M3=M]7RJ1,.)JV/^+O7FYW&+[80,.:A=',#PO-,YSZ#[)"$
-M`Q)7JZ5NGIPQ?>*&*V"R'):W'9"NU_U)Z7!O'.3".>%%WJN,L74>SQM(4I.@
-M_[%<,)^.S;_K,A8?K*Q$8ZH`F>E!HTZS$9KY-7$VQ!GR/Y.:_:"@606+YWK%
-MIU@/XTT\DPF<_Y"(@OIS@34,G/&O78N]@T\IKT1N&#XT03PEID(1@3J<3U64
-MOY5$983R?>#T]Z!=X$=*Y\R:Z*_G;1Z%!VLVH[5E)DS3;2H31#NGZ;!",,[G
-M:L5.^$K5N%[=B7;`53)T$G/H_&MSJ=(6#\H6;72!RM+MM1_`A%L@446Z6G3#
-M(0D6/+I>K"]B,AH21IX`2-"W6=GY1(M"%U>F_AMJW:H!#TN]F69"LPL#SK-7
-M<^E6@SN3#(GF3TK6G-9.;N@M^91*Y/0<KQ43-KR$U;.LS9S.5H2@46U,ELDL
-M-O[B!,AJBV-!*M3H4+?6?->""N!.Y>S?P@S*"KE0O9RUU?NI>W2ZOVHP0W8B
-MWZJGE6`^,F6N?VHO@*HJV[:]ZW6Z)27Y3H3>CJ0I]4HF)JJAI<;2<#J$0NPQ
-MM7`MP@9OJBS)^)+#NF7!B(`LS?SG)Z<*/T,++KGM_K4YORU/UW^P2&_U8C(N
-MH!)3T'F"`L9RF%WLF3",NOJHEJ:U"GVA(J4N!^^%*PMA)'"<?JDK94._4@,F
-MN.>\5PY76<C3^48<18ONZ#;+1*$-MHJ\8(RDH^S.A7>#,5)*[IQG\>:)L?F/
-MM9>^5M+M<SL'=[8(%.\B\?NH=`GA-$PN31F8Q/BM4]$_B6!$3UA=@TE0>6A`
-M9:-_L9?7!9N(IME!&^V;;(2Y@A#*Q[,=_,7M=6Q]9MM\!^;D$I*<JIOP5G>%
-MJCZ,B,*[?"1`@,_7BS&I#KY2<T=`F,'3T:]K6K+I*/IJO!@SSL14F-XN6LJ%
-M%GD@_5>@%LAH$;O;(R-9'7W^JZ4M#L@)F@>).2(L2S0'9&PU/">+MAOGHHH:
-MZM-B0`5<AW*:^$*>_+?R_OH3R=9*%A<F@F)[6,E&6VH>\JV:?G;_?Z,I;(`=
-M!S5RN.>9_!("#*AY:-]VIE:J=/5P^$I4D1?\OSSQ"MR;.*-O2N%>4.V?'<2B
-MB8[4M[L?]#:.+H'T0%<LB*3M%.-`RMRW#]GM;-ZZ1@\6'QZX4`^FO!8`<0!N
-M=S8\`UOB7":]F2&%!DZ+S_J.<L-F7$(KZX=(6'HIL_QCC+O$0;>!$JO-:E.\
-M,G'4W8V+.<[/:UR<26*Q9C,-^*1U0C[04/:=SD:)K^HYY8P@9&'$-N0O?`"%
-MB\=#3!(IJ]G)UMC!C5U;K`Y3]P<9VH/9!+HT><[O;@'XG,_TV!(.:OY\&>/#
-M,+0F!P`M+V'0Z<VA0_DJ!&?2-DJ+#C*U#W<.>\H_;M*VUZHT39:EL.[63D.:
-M=_=$1N#CBCTA,4]4]9D4*NV4N'*G#BM&V8OD^_Q>::-YV(I9^WW9/@PMQ$K'
-M27L_S,T,O>P`<\9+.-D4#71YQ@E5XZ-80J3>UU5H!-K5K1&-W#]^T&.'>E(D
-MC7K6J\UU&*#'IBR0&-/G/8+VHPHG$R:`972%6^X4B_4N7'B;:F(?JP_!<X%M
-MO=P<U\<+N-V)+$90\WJ;486YF.M8'R;?C2=E)*'FSW>/!\@YI=-JN8%X7UW*
-ML/07="&0N+B7L2[C"W#&#GFF'+(GZG2;T74?3$%V@_`?M/Z+6=^4LA<*/5S?
-M1^62WTG*O3\YZ-C^F3]*6\],QR4D/Q1T1X(>!Y4#-"]!A%?#_*8;?G`18`_(
-ME@RNFJ):@N^-50R^C_5%&+$>5VHZ@9U?-)G$"%065!J::(R7[;JI3R_PD*MX
-MF64>JLJU=4OETX?[]M$-=&;RS)W;O^SB.,*%4@Y$!U3DNOLO[`K%Q/I/!]GK
-M8X5P20=_#QZR;^8B!0Q(Q/$=#>KW/KY"G!7C0<Y>"`:56N-2'CV=6KM&[^D0
-MHBS8^`>IW:N_N.E\!@Z'.R73/P;]SKF*HNRF&<WT_L.=N@P=9%AYHHK;"_R7
-MHE`9MW]B:>%/X8I4$2)9+W'HBWKYW_QGI`8``I\S+AJOBIBSGK/2R^:;?GLF
-M\3B"G-$-@VKGU%34@WQ*<(F`"Y!J@%`V6=%8U'A4^@;^OT/#(D@[6$4@US+6
-MML[%&1A>_`W\_U@E1?D!PB_N2Z3I1H:%3&OB]NRKTZI)%V+LM.[-_E[!L9TS
-M/-DQL6D]]UW3QC=\/'D4A=/6:&%?F7YM'2UKN]9">C/ZT'D1?M`:1O'D_[1W
-MWW=N6:\2SA7HQ*X@=)FNBM^^+X=Q6U1&8-ZN&C]>U66#O7FW@*%)NN4:5.H*
-M8&"5?&-D1\=HY*>G?NP:=6]1X+\`]=+!&`R#FL5*V=78\Z`U)DS=G\=E$Z@-
-M/;Y36O5M+@V@>I53FPK\+J)@;AY_EL\,=;.:)&"$-NXGNP7(3*=RBP>S%5"L
-MOVBT`OP''VW?Y78S($S<AD\VQBK2&V7V1+5K)^Q';6E]N@?>,)_$>;^S`,O`
-MEX67DL`;*L^-BJ]0&I;^5C9M!'/6E26=P*U.S\-!W+8:0V7/>%2'FCOYK/8K
-M[`:E6%=S`"C5[]Y$1>=>_@_7[)%K7XSN<N^2&%:=<FH+*4J1A1*D'"*+SB4/
-M[JM/5-CKTDUG\YRKI$32VP3++\#GC3-&G>_SK02&TXEBX4TBR89!H5Y0/"1_
-MI53.!0O8/DN:A(]:%3B]"*`%Z-6+^H4&\A_'AB?P+4TR\8J=O-1&4?_2`D!+
-MB*+M7(7FYIJ<B&*W4DSR]+>^D)82)3$((W46%>;G_:JXXI;;O<\WS0NQ+7P:
-MMM]8>W%_*14`KW,H8_@Q;\[9<LQ1R%W"8CATS],R&^.B[:"8M=;W>/HEF7J6
-M/][(8K-,70M0(678W==RCYI(""XFN-KYWYTD@.U>K>)B(O)&;J08#">"F#;,
-M9?4R'6"V$M:QQ[1XV]+B*2KD9WGK@3^S]E"'0^7>;X$D7R&^4[Q[AA(QN._,
-MZ.&R^R97WGQD14X!0&=*&\+FQ35W%B9&Q:\X)E3(*\$GH5?!.=,Q.@1E$W7^
-M4>`)=[[&,_\8AAC%CI[T0&ML[@7EI3(Q+";/X]7#[S&MQ/8X/]HAB$Y0?@A(
-M;*#2S4Q+P"])+V%NADDYU[#P!0I"B-,Y^1DM[*6K'^9T+%4H9-1XL4G$0C`)
-M9VA/TR$#C=""N9W17X6V4@L8;6D>1@\6-Y+@M_6M*J6<<MR4`5S9X_Z(1/`6
-MHV^U)_$!8,L!1?!P/L9N30`37M0]:^%-=RDQ!`!M!W%""RG26N>7"F:JZ@KR
-M-<G&K/(=:W>(>UQA#(3V]+[:/4ZS&?P+:"=M#S1D4:.G_!1<ITP3EZ"RT;O4
-M<M,&O!/S1?@5/U-3P`G76&+JUXY)&,G>B@R*7#GW3.'I_+;B>*&5G&XC&IQ1
-M&K3(?^IHPO=W06S&$JR-,'!3'!?1O^%94(8[*5$7[:A?+_]&8R#]@!PH=E!S
-MP&7!JDIJN:^S].5UTUBHTJ_=5"M95[)DX!G-9UR*%WK!BJ:"LMU<<47E)82>
-MTOMJ.L1]-]]PDZ_`MKQ6A,,7V&3E-P/Y^%93=#VD!Z`JXQD#07%L%ZSN0+.X
-MG>J'E-%4^'SVTQ7?[<U3D5A^<C;,E"\^/CH.ZR+T#R$H06:\RY$#FJ]VD)"5
-M`(;6!=]2LQ0U&=TW:=A"ZK[)#+"5F44;LU(O"*2='S%'S]"<[K7G8X4SI9QG
-MK'!'_BB/9D/)Y1JFU$;C'%ZN.GBU4V8+IU;GOL3]U'5$8"0@X3>5'_M+"+LA
-M<`_V@7M'_8$@([&4VF,K+@C_#@4Q.9,(7GK%S:B/2F/:JD?.=PK.<;A;N21=
-M1XRO>.'`DP8;FT^LR_%%("X]7WT-_B*7ZFR==V4BS7A_%W$!*LZ/9>@)5\,F
-M992CVBJW*LW?I@;P@[JJJN6OC17<J,TG3=Y+DVG#N"-J*56%5-L=9WK_1:']
-M;]UJ?1.87:S]V=XHH9ZYK=FL3#<2JW1=X&YQ;%66K`D?AQJ)?<RQLXHHS!@*
-M\)5..NN:`UR,8;H/<\C[\<0D[Y:^X7@0K8Z5W'-MCHI^:(<CH#(BUL7^W_L8
-M,<6HE2QPXN&J.]0SPE_2#Y2IUH\X;I@)Y*((Q?5?=)".OBK9=>:G&;:).R"E
-M8QQ[^&Q.8FHY5!A,0[J96"H+#I:SV3`??L)E"!?B]6F`4@.]?`%LST0@%(5.
-M6"@LC%Q!P]R/V\E&+X:NW")56]R6IS+*W4V,.^D9[*#0*<47*AZ.\_F[@7E$
-MR/QSHDU?9AX6S2AA)H!+P<=4A)=_2:BO!"78"1I/?4U]](F/$T)VR\N]@7^:
-M_0%87E3P^1KWD4US7[7_M7/[Z,EP3'A_E*\DMJ#`F*X5,M6!N@FL6:"2>&,X
-M"<$QG;*UIA89VJ:9Q$5<(T5^5\7WMOT)A76CNMF_:2^RW'%'<S0(`CLEM'WL
-M*/-:J/D1[F4FCS1I560K(78)GMYE`T4M#X68ELS1O\)46T^/=I,92@79G=^(
-M/C2SDK3VSE%E<<J2"3O`"#Y@#W1T3^N"Q\3-=;SUB\R_URNEY01N=DCQ85(]
-MW?EK[XN!"C)%J.,+6LL0LE58>5L-==AX.9>XK-AME:RYY">)+^N;0K(6L?@Y
-M#889RL>W/F08&XX9KU51TRBPONQ+=4<EL/9+VQ;@8V?<>8RS!^[#%T5[`(;T
-M/DG\8_Y$"2F-PM@1,KH.T6?*"?F]?**V!B05:%9$752Z*KH^U^(P7E\H3"F#
-M!;@4:R;8N.Z"`MZP'GMDA7TG!00!VE*_`4P(G,8,@)*$79FDGOMB]4+01^>N
-M;:NR7>:V[4JC8G#2W_>"7BEN#I@&+7<%+#H_AKN<X[?]`_6TGJ5;S0.9N=^U
-M`R8U:JC:<C2VY`"7`\`]],:*/20LK#*<!(P9!^[`@JVJ(8"GS;W=',Z(850]
-M,D$#MFE"O0HE?''>#Q1-$!MMARND-$/Q[3TV>;CGU"+Q(\JF&,/OV\W-M3-U
-MO0.M0J26"HDO^99Z<I.^ZYTWI90M>:$9,:H/ODIP0P!GHU1K,AQ3WZW?R/RV
-MKKK39U6)"%N.O@/I(#Z$(U"KMA4&&,FI(>_(69*5(]%[4O`O-U>_0^BMFP@F
-M'"B)]*!/W"OHY#VV%XM\P-O);!42`(C`1`J3&VJ.76,(R[(WKJN7I5#H2)5&
-M+V%_<OQ:P7MAQ:RAQ7_B7H?D&M#5+4&<3*'E63WR&5-\SZI?EL@U$:JR^%$I
-M1XZD]BA.EYV79KV>5+J<Q$HEQ@@$MYY5P(;BL8(Z03JTBG$2W8VT<)M=B&G#
-M1'#8[KWK+$2>'9\V"98!F&SB(*Q--<BTF#18%"[V5=`%]IZ62]43F/J33>(C
-MF@0=]:CPAK"L*1??)M/FFE<=`ADQB7G/O?9M&]3`WV/N[[_9#HF,V$/5%!"%
-M@YOCOL-T]3P(%,=>$%KQ=U?IJUPO@C7_:H&K$F![7$]7W_?/67F`]=9(YPZ/
-MHQZ#I&%S./9YV+:(0AW5F^UHTM1]A`@&[6K:.0D')85`PYJRW'BLD+/-JGC=
-MP#1'+HVLG*U>17ZA:*:(N(BL@@'K>)OK"'Y=?PORYH(3)]^AB:20B"/I:E?Y
-M-QLQFM$&MO#8D'SK:=BZ6DEL>05H47'LA=FA)\]>>FC_3O7GLVWO%`-F]9KZ
-M"-DC$@K%;NJD41V8G'H/R*"E*MA!TK:?%0"P]I2"Y/&1G:"D8)D35&R+_$C_
-MNEF;F2_'/4^("B@^9"]FSR/7V>N\?7L<+$U!YQ@H>)Z`/**Y017;7W.;GJ^8
-M.R;L"XQ`OR=R(6;K]<:=5O*:::->-?R]\91(^^@R!>//`>"NP1-`^:5MMBJ,
-M81LR54_WE_0Z$2F&OZ$-J9Y"Q-BG6I(G4%YJ8HTPIWD;,WF)/I;LM&8.I9ZD
-M_XEG+U6!F<*LFID\)8QHM9B.N<P,-F)N,LR"JR&EF54Z>".8ZU7*KQAK+V&#
-M78E\FL!,XJ-=U!N:VQ$Q$9!W;O=*6!-I0BB8ZW"T<K"ROD=Z[.<$*/]T9<_L
-M`+#S`$K(JS;(PMF343>("FF5Q^D[WV[QIN/Q:VY!HK%)H?2:%L*M)Z^;%PU-
-M;+VYML'(\H1"?M+;O[>B4J<'+FI"0+:"7XO%[;JO2G(?7WDE%&1UI.N[+[SQ
-M%5=7<_C^_FVL`8VORR(;9)P>ZMX<F12DQ&:"*W-!#<+]B%7O<4M_D*L3R,\*
-M<MB:[*2-G)]7XY06<N5[ITA1<:)@K%7;L2!B1=>"\N.2`F"F/]4)5VA$6`&K
-M#<$B#!R-9'5>!P*W/7IYPX$>=JN>Y:=F2&NXY],EC&@OBB<.S\J$&OG?9.^L
-MA@._I=1]>R>]4)"*$U]XJ9N>&[%/L-&`Z6'/1(3@?T+P*H<;Y.5@=S.MVO==
-M<U*%%ZG:6QR[:!F,C<J6E+E8:7]]CX%G2GVLTB\8^#H%E79'-,I`X.4R[P]Y
-M!)7\OL/IM_,'V'!<YX"6E@W?K#F7G46$U?=<I*7Z0IVA9,P$8W2`HS$:7G7^
-MIBPH$GF'\Z3E8GUT0F'MJJ.7E['^@'TH<U@8*X&C%CV7F:3?'2-&O+T0`/J=
-M]N=9VSG.*Y$B1>%22,P-Q?.[QLP$I;1<K[>Y_#=Z(WD:%U*X2251'W%GT`6S
-M+=JXW?$0QOMKZ&"[>1[X^-J)',K]-^.:5LX:2]H;Y.!7'#?>Z_&\Z-'AP^)G
-MFHX3B$Q^`9:8DY.DZ:_PIQ:-X29\RB2KU*=N&J*%L/;T'>%_K+=BHN?DI-$Q
-MIWNY@FM"_\Q3?X%K\$@)ML'X@&ZD-OTO<^O1,2YAO=)%US=%'J#\M'<N$U_X
-M?81-?^D.['3%!O,L3>'MOQHX<QD$GX9TI^G$U890&(#<]QJ?DD`!U+[>JN=7
-MCJVK3J8I4=^MT:7/E$Z@GJ-F@`:]&;0[4VL]%M>"BN:)8`;B/@1,^*_8A#G=
-MIZPUYIZCN/>`T3R*N:T0S'7##35&HY[7U/\BCA"[1/NIC<$5!5O>&RC/FYPS
-MDTH5]74*KSMQ5,\RIY@SF_"W+^?5"D<C0:*)&3"@+->$G9+VI:@*$$E:#1TG
-MYL1])T29I/?2\O5+I8G0!F==W,658@!`6J1GV\!"J4]HL$BHX-$A[A$/],/!
-MEZ[IIFTB=$^X<A2'-/X^1>][C1_<TSX!#>E``"SX(8QJQ\^`BYK5+Z6W@A_*
-MH&>].-?.F8@C"U3-/>12;2.<-%6N82G<4EEE?AP7YR#:?<KAR<9@SAG!XYY'
-M!^[3ZF.6J2`9KE]R[-'TZUC'CL*+%`BDX_BR<F7?LS)5=#C]R\YPV":N"<*!
-MT7>)Q8Y<2%*:<^6G4R[(/ZFB(:R"]LEGVO@+B$T=.6A8.ZM=IQ&.'K=9M?W"
-M0FH*LDQ;!?U.DJ=(`(/N&?HX+`B[,[A]].&O1`Z!+F6W6P1)\V5A/*P3NR<-
-M//AT_+"5F/+5H_A9QW!$MKW^4=#?F1=9*<ZAC^O^@I]P&7GRF`E]PG"J:U<<
-MXL(=GRRC,H22&$GC^0G:0=VV<A?**HA<3Z#Y3M'@P^L>;[-\&^A,:Z`Z.N'\
-MPZ;1,"3%M!F&1:;'$EC&OK_4FR&^?PRP'>+4N;MM@"FJ-![5.9G,[82OY6GN
-M(NC_I$2"+2:!FO?Y)R^!141&`_`Q"DU%45)^/O;6H'4M7(HR<SKDIOBA<9%,
-M$^WK<GYAGJBO$YJ$B3=!%[4[#BHF9(PURVBA=.W*WR(Y]U&_ED!FLI7F6D4I
-MVK\D:5M+&\@M&R9'\4=*T.OU`"BL[0N^[FTZE)'@EJ>C?7.67%;+Z)1,PI*1
-MLIGF\=T)`"33!_)(@4F-#\;.#0"H>F%J23$/$AG0JLF$1]G>8G#6E=AREW-\
-M)L?>`T`?(&B_<4T6&)?1"K^#FOM+:'/:!E+SV.*E.)X"64T+Z>5A"D;L@+]G
-MDY%J;QH*!<*@>3%G=1)5^"-"QW8Q=FTJN)6/LBJ[>GH[!MO/O[1]0&QU(RIP
-M3+T(XZMS2\7(!M?>]>!R8=K_`.V.9<"#6ZF68?'"7%2(6H>!/V1^.S#MCPA,
-MLXTU8-\/:=;)APY?57'\7K(Y@\"EPB8RN2N&G&CS,_^I$4%$TX1FQV?\&XA>
-M5M0TUA1,S>,UXHY!*'H950578Z;P*V(;-&+$35NI8U'1UF[HIU#.C#25=T(0
-M=$T,P_LVO-:[ZJ]A0Z38E\0.01>@$5B+0)(V,5NYO"F/EN4-F:9\8G#R[8<B
-M&C),R-#WW76;4#1!:-C*3`K:Y+N<%Y#-?_NI^!]!0;2-UDED;S.WUGP>S&T<
-M.(]EB,-L>O=;KB&.F:5EF>HG8A>IUO^+,,"JJ4EPSG9`PT[X;>)IM@7/O5ZU
-MDYT_TB</$!@MX*.`E%T3*=P`A,805XL?,TG8A%,K_&XYH5*LQ;E3Q71XU<_[
-MPK4NE0U64I`X<W;F\EV>KS<JF?J<#L/^K`J%DNON8Y5!9=WOF,,9#>Y=XEJ;
-M&H*7.\]V>*Y*++7"(5&`::.A6R)MC0$*WGW84POHLAFQ%1YP+81H'/^)BE?]
-M19?*=][INL]*\^>%H"K\YT^5@1;IIC-F2&G6>9:#!2X&=D@Q30X(WJN&?RQK
-M_0[":`GBF*N=EVQ\83Z%X>!;Z<#91BF1U!X>:Q1.`=NA-!B(M29QZ]%!1@$T
-M7F0:JAEKD_Q@=PR&LWM/X?UB\CS<?>-WP,$0<.2X:^33S"67\[U[*!WG4Y5L
-MCO/\)ZO4KRE9R'G3E$;O#,VR^>'CQWG/VI<18M-=#@2V`47[4^6'M97CM9-:
-MCKD30!4VK<$I,$%[AQR8K7_,LA340I^&),.9PMTW![@7DQY1E`XN`DRV`)IX
-M,)JO58-;A<^"JR&S@G*7NX43!5"0).1(3F'!?P+T?XFA:F9V03A_32^CJ3Y:
-M30_O82&1@X:R?2U*)4!2ODQZ'NY);VF1OM@<E5W&-VMC?F1VX\K@-D"]\E:E
-M$XEU:;#CQCZE,S0(O7>*9`R1Q]&FC\K?.!KNVY.%:O!U*FT5-$&"^?(E4])#
-M[_7"]U?1?A.9+1BSX`?K*%'USHK?>/UF>C=6Y*9O<>'KR)9'BSJ75EY'\+.(
-M9E<L2SZ2"Q>:D/J(>M#\M5(AQP09H=Z!3V<&NFPIV)VD*[UC?])F8!8;Z\-G
-M2*!O:PRVSG-=1);R+;M`(MLIZY2)9A!>)$7(V7$MMU,0RI>9IO"LZ3PN[+ES
-M[V:=]J=$>M\_+/.^PRYMOH0\^=4S=->`Q'BXQY3C#$"-A@:T7J%`';)*<&>(
-M`=EID0O4&X9ZGV(@S'G`W[&C&-N7TH%6!T<[9ZT8/TY)^3QV&@G<'VGO""Z2
-MU/!=9V:TY!FJH;Y4ZUC@6W5`3O/X>-<S-5T(SR*]LXD`]9_U':<K"AU;YDHQ
-M==1RS77_,J<;ZS'\-C=[/8'Y;),9.=HZ(^6HPJ!P=PK[8`D\J`A9"RHE\W&=
-M,_8V4+FI`E#0T*?^?+-Q5]--UC,S(RJF9+/^@>2(77RC5O_B+,+W[-U))O3H
-M.K.XUW@"MB5(KL5R=$-`8A"D"S#>;I5\)<,??D4]4YPG]],,IA<!%G]L.TPD
-MD$4N1?;8:#MO%\9'_$8R^:;%QWXEP\Q$U\+#-YL0>%#IU*]C*>)CQV=^]\/&
-M[J`EQS9'RIU@QX'HD!F6%;8I<[!Q/ES2&UR=)/L+>E_)NFI&T%JT_9G6\4Q#
-M&_6MN!:7.-F-F_88$H</D*>R"$1:LQ@4?[`X?2TW0(JT]1]+3/)]\V`"@NWI
-MN'PMM^)%`.Y84PX+\J][>U2`Y([$TG8G/WLS+E^O()2B<7:*3JE^5-]PC#4!
-M5,W&T]<*<B=2MDE'Z*A)<FRJ,>L':*3T;-.0A!L4;#?U=&W"C`MCF`7BH!=%
-M<[X/W4>:,^_Q>FB]Z91F)_3&(%71F6!\AI18M_4V<I7O?$PW4.(3-&UZU5R;
-M<IE&A]R]<,W+YHAE2@5>:UX%,R\CTN[!?IUSI?5U:C0&WG_??-TR&K$?;3#F
-MV#8Y0.@DDJ)E)+U!$5`K+3@XM-0\Q?3-&*CS%8K$8&"G`A=#((,'/7^O4W'W
-M:<,DM]<(=5L08_-';B[?P7Q:FM&?W&A/-\=@WZ672`K:9/S?GZ,]'![]XX(O
-M:9RD;H4ACDE'B5+Z1#JG[0_\.&LVO*;IDH^I^/7O&W0+IJN^9@4]JO'N[Y:]
-M+4?)8*DDZ#S_T@2V76$+NZQIC(<AI1K"I^-\+J\"2U5[X=A!1H=<0,$+_&,E
-M!W'8^^%X$B_2F56./K3T^(3&1)*2N6!-^5R+1@5L?S^A;^>#`$MTZ,6RNUL:
-M::F3$2EQ`1\AKD5_"?J#ZTC-TVW?YF2_G*`<<>=15@MQ3B@F.F4`(>CUH5C+
-M?[UK[D_<5GU0]LJ6;RENWT0VQQ$OJ9$"<L;9D$R?E_I]AV'E6`RX%==%PF.F
-M8LX&=HB)FN4P*2Y9"B'OA3V*[O23D\%_::-PW=TA?=T3[L4?&.XJ9N.T'"8^
-M[#F2V'0AN:.,0'Y0JERS/Q"%`0,LN]XBS_Z<J4R=*6TBJA!"$>]U_.5F&<3"
-M2?A"24HRK>,`4OJ2"HH1(;D4:T*JQTEU_8.T8!68``_,;N?]Y0T:Z?:@6F'>
-MZ6".?Z!S35Z`UD1I[>12_O@92ZFD3$D^Q@%@C%TJ"6'_)'Q=U+.PH7L$:8Z8
-MG'W\4959=XT+&>S!`\X.:6#'?3*I_RSMWGB[:0,N_G=[SA/&BBEU-H)0Q0]\
-M(H1P>2Y'8']D)6&`::Z,E,'%\UN5#_T`/#>1QYC_:&38(P);Q3)?H359=M"*
-MQ+OG++/TN:HQJQNDR/Z&-TS1C-:A=:H%&+U?>IVIJ^*IFP<U;>SQ(QS637MJ
-M'2,#"X5(-D`A!,+EZ2Y3K_GQ9$UZ1IR\G$<#G\!7^+8#J()%%J>Q,74Z]%S5
-MIB)KH83_PP?;YBK\UJK[5K]2>AJ2Y,XK"24N8*^2^8J&JG"4"Q#K!UVJALB4
-M:QC_[M'?VLQ@ZT6BQ:5SRZWU;K6PWIWADOVZ;NRI.FJ*G01,P`<(ME88(P-1
-M[9:/SJ\ZX>KT?KJ74I5ED*3%4:RHC93'()B_H+L?(%R"^YEC)K(;**S&AR)=
-ME9=A$E%U^MH!^[]U0CX4R'''VA<9(1U1><;%1%Q.(][!#0EC8[B:J0<S@UW$
-M3\Y%S^_.*Q`)"DR-V,$@!W.?RV'-C\?$)H,GL2``+\:ZMRZ,9P9O.TLU]3NK
-MPL=(]'.V>PY$>U_=S^#5+PVF>;ZY9O5(R([\23_YXT>/@LT?M>#0V6<6D:1\
-M%M:D:(%.+A,:J/>77':B.`708[S;==^M59B[9<PW]2[71^D@FM-LI7#U5/8L
-MI"/K):+S%H&8I3(O?X2YPI84U!0.6-U\)YSXFD*K]M`MN+YB9:*R0&J2ZO;)
-MDGVRG\4\7]''(JJ;5J</:.)2NL7V39A:F3FRX'E5QF$GELJ63P?\5$VKN$<R
-M6/I7S.B87^6DV:'F.5)1P3AS$](^15NRLBYB>0$U+M/TJ'HOWR$L0BV%EI_A
-M'<X8345&;MGC[)2.+D`,YIQTM6JKQ<*TP,>@+_E2.\F:S8=6&A[3(@?,#&V%
-MG$%[5F]M$E)Y#CU\S%'U$^[\8O\W3$YF^/@W80MC#EL<"_Q55DCT9Z06>N4V
-M?U]?Y655KE@TU@R"G04W8Q!/.$$\Y5>K8ZD-IZOSE3K'"M;@\6&W91S/YFF6
-MEOV=,PS?1B:DWS""H$_C(NP1KGUB:MM#2L3L.,(_JI\\<+FRRG2A\E&^TOW6
-MP:YX+KY//H7N*23OBK[/(-J&?4X+<?SEE@_4$O3<*9E':P3_&7X6U!L^Q^3(
-M@ROTH*O[EZ2MJG7R3RO'$.W$^OSDE?,K1JX:ZYF-JPD\/2M*N+R^QXF'.Y@Q
-M:O+'U]ZB6&'Y4MX`Z(>VQ*,*D[)'5).Y*IXP<^[%?"`>BQ+YXQ^/,LR@E(48
-M8)UI#\80`NHV96<[?3<PVX8_B!:_$KUE;"T`W67=Z)MN`ROR%.9%/,OIHC5#
-M-A9YZ(V2M//_)WHOHC+8S*`*"REUBW1*$%(\BR3A@A>S&$^8ZIO$(4X9@)%;
-M353VOW>%3#W[E)U$VLEL.0>M+'L^)UYS\,&;PIK71D@3K_7<L&C)XB6ZJ7;M
-MP?5T5MD5YJ-5PG[><?5P8#F']RY1H_]6'Y@Z40ZUX$IAQR(5J@`3D?3>+\>@
-M^H)%N1AB6AL./F'JXDA+'Q=,\Y%BC"_JXZA<6='OF'TO?1#>DCWI=I/5AYK/
-M%P'!,Y+Z$<N&=!!^UO]G%$/S!S;9[Z5X1NRSC3/&*%[M:%L3J3D/=*$#V$F;
-MBH17^4MP@M8-:]X?EXP0;S303F3#5ZOC@*%U8D3B-2/O*G36QS<8U\+IE*4C
-MUQ'=S?>7CV!VDR\I\7_9>KG6@&XKM+0-<W,X8V;23)_^)T8ZTY_9)F.23Y#0
-M.&@-J,/BX]33CSS@5]+%_4]PUK\3"(UJ7F4#I8!AV20XF*9,1['GGE^U3M<5
-M)J[$R<^M=?OW^DNR-GN?;#C3B#0NP)^13\'-/&N2)9\K#+J]?2NJ;SIF-72M
-MP+DSIR%2$_K#Z7NWIJ5\X5V._3YKE4$)ST=/%HB`AFMC#KE(JZK*;6EM%?``
-M&TC_0-I]GL!]M&L<LLY+H0;'%&&;M5J"C<#F+,2==1=:.5>E2><H>[%X:9K6
-MAX;W>JMLF[.BAT(EI,-_7:,)[Y81OD[1F/&<#BJ#,?O[?\Y%OS9$;4>0V;J(
-MLKW5K6D=)H,J?O$XH@$?-79,A,30*!VJJY[*EH)0RE]M`-\]3:>\BK60.<)7
-MTJB]\8"8.]RC)5%@@^NA^)W`7VO*6_-',(!2&1.&?^N,#+]-W]$C+CZ;4!&*
-M.BLUAT.22/EU*WYAAI_D">2V&%RSCF3*58355CKW<I'3SA>^DJ#HWK\T0NBQ
-MRCY3%)>._^?JCOI<8ZCN,5C&^,E8AXS\8ST5:*=6,OOS?(QD/3,"?9!'.G/1
-MS3I`D([J`G"6AFM<0)T5<10Z(PLFO[4)"6A]\TZ^7,!_EA/'S*TT\.?'(^FA
-M?K>VY#[(83*;!1LUBT>5U,+HJ3X,'C&,.,]RH6AE6/_^0]D\/-%F((SXM-V(
-MJ0_F9[W=1@N/S#(/MDUV!?S^4@3K;W.JH#VD8\@I',889A2^#+:\/6KO$M^D
-M%TAF,PZIO^&/E]9CN<-`FS]8CHRF]ASLZ`R8R*F!70'(`\)=/)B1T'?O[:4D
-M;5>#\&^-0O4J">O@K+6?CMR43C(FLE3:J:2))"?!GZMRSG1EV$TFRHAT_/.Y
-MZH-$@UP,GTZ3IFUIX?HYB_E[."Q(9_FQ<YRT/`SW,&5GD>G!#K@<9"`"1\FW
-M$F0S+%;(?/G\*K;6_NK"(+8T&ZT!.*!V_">#/D54:5FDO:03SNU8X(*F6"#V
-M].!.$!`ONSH:/W;6*?1NJH]P4O#J.E,1B;<G(F<BQ"8E%4:T4ONT!F&9SX3_
-M\81U@]VW2_$'ZEI"H&Q(RFK*AU-HN%8OH#;!AM!)9N":7H96L[D7P$_-F70;
-M]H.85GE.L)KXG:(_/=_#[%H`B]B\V[!'VB;_34!26ML9]?==4_L9P[QQ+V"T
-MW5+ZDB;D/_%K>IP9E.#M)Y7LRT"P&9HXTG7NP]^*+9<7;$!G&?$8I'ZU+N9.
-MS=TAT:(>QLM?Y]CG&I!XG\3@,*OJ5)7*]HB/C_D>6YC&JE`,]<!"A3>.$"!?
-M(3'\^XB![%:7LA,IV2E(ZJS6^0<JL%*LO_.@8;28P6=$T<,_!!]D3)&RDN-'
-M\WH_O#&/3WP"=SMN!K\M@^+1>RQ2E"U/'5L3!O$/#\E,[0"<$Q@S:XVQ86OS
-M%W2EPR):8C_J("&<R+2VU/63B=H!:_U2&2XU26W:)&.A,D@_7JC`=7L:4_3/
-M^)3@5VQB5;H*$Y0XO\H&!C4>O;&.?2E+9%"*N>7G%0LF!"!.T'7YYLN!F2@`
-M*]RW_%Q`!3$"O9,\]4V5S=29/UH(R'LNKL\JK*ALRW8P,,X=[;OYSQP-W3G)
-MLZPZ!3W+8#I/]G"\Q;E\(9"3JWR6@&"D;$,\"P[9$4H!=5'S5TPY[W;O&G;K
-MX\"EA/NDLK$TJQ0A+LF-E8HK17^+PP\KWND[FP_S+T."\2;(._MLM<BVORTU
-M;;JJ1Y;(]7\KSIP&Y)F>VYU@]^3II7.2^E*^;!\)F55N[$R2HD!A'$TA^($@
-MUGZM_,A:R"#(%/SI&:@3G6;B7CT)-XMX1\>VW@`9KN"2U+)JS54P;"WSMN^+
-ME'[H?1U_TUJ"F.<#B5OG5F)\B5,&2W'D"9>=*3CVF`*_SKGN&GG'\]+JR.L@
-M23\,,`DT(X(\*L]%3@H712.,N["*XEP`+#ZJ8(#6M-\)9!V&8<>DP"OFVFC8
-M[^&(XJ@7QS52Z>@IT08<PR73_*'C\EME'6?=OZ.%,NHFCYX"$H":V?5DNL#%
-M#W7B&X7WLZ[:5:SJM[&::"YY*5/'I[3\CRUH*\X0"*]*7KD&F?4OVQVH.]=.
-M234RBB",HN?CIEF$2*'=4#U.%N^(\Y:B,>MN>D+FWBJ]=+SGE^BW?:`=.8(M
-MCAW;M:0XZ'-68O-OX8<.XXDO^5)31&^QX`P0=)<R6\X3!-T_ZTJ1727GL.FV
-M83T!]RQ7LXN_X-$NE00H9?9",FP$?D=SDG(Q5`/R`J%I*#&_G0A$."+_Q"),
-MUKIDZ1!0_)K['W9-_%A%>3.I(L0KMH#]A`.<:NAE2O#/]MGE=%0]K)5(-GVZ
-M2XS3MJA$]7*DKF[,^`FQMR"5FF8*A?R5Z\XY&\LE67N5I5D"$2#!X,_U(41K
-M[[>0!4HT#S!TX$8=$T&\'KCC%&+?B7^MMCIOL1F/E%DA:H!U,U?2L(]ZAO*W
-M!67?:4_SEV#]D-5?`;^YH'K$#F))1@9K4\;&E`[5*OLO!'V'C?4%>0Y#P],R
-MI,?Q3NT=KS2?O1N=`U[-"?!1.]6@LWYN0,&%9^4C/UK[A+`Y[4IYNR#W@%1%
-MTY,?M,JCS%(N4OB_JI5SB"N??K7O3&UZ:*JS.,)E//4&SP:73<ZYT9=GHAA+
-M.\7]F^B*IPM+T\*M>%@L/;:"/'NI<L5ENI3G1M;,?H.Y"/I3&`-AZTE1J.I+
-M%K18$G9\UNCI<+<VO6&M;[U)1KS9%Z52/&!M'BQ_"QXOG+E)<T@J&F2H)7[X
-M)W&9J`<2;%8S?FS1ADQ39'K/M#^Q5B.!Y#*`4X13>/.N!@DD"T*'Q#/$QJP.
-M9V6Y3SB\.)--!>\!MGFZ?K(7``UB>8R>V1X1BWDR_S$^MY6QD!Y/HR12UMTI
-M@U<O,1INS*7YW!7JD_!USQ)A-`RC#PZ?+@E64B5//.6OGE+'<'\7O+'6#D*E
-MDC[:185^:J=QI`Z,0W8@_T<DNYP,!!V!VHG>G9'EWI.8\I].;>44]7C>A2AA
-M3X5I;/V*NIC'DU.ITRQR?,*(TX$';TM,&?TIZTOD*^^,;2N1!'%"RV]*0R\C
-M)+)/3<:]M2("H6*71A*8F2IZO\KX`*VG_AW`30IX:C%S+N!?M59)?GQ^*!</
-MMKGZF]!?C=;A4S(/#L!&XTCWA15SFL&T5>BC^Y(,ZIK+?J6IDQ3__<`2@,,,
-MT1PL@_ENYV@[G(<%&IA1*N'[?`:")J.IKA,"!T<8[W_>H$G\]FPEE!-QS2<K
-M/BR-(.*WNCI+80"#M=`V\M)/]TASVNH%N\/5&ZF:OWRA9,;+.-/S;<R4L7*>
-M]?/U$]2X9<5+"4'O-O!\W46_HX9J%U$3VDX#8@/TJI-?1JG'.O>D#7?RPO\J
-MUQ8*I+-C9LN^#9"8WF'\)>E^6H`]/Y>5?&3ZDQUDCR<5XIWE8\Z'I>W747Z>
-M<)9K/(N/<G-?Q$YR?WU^[Z7/R.F)<YIZ1!E=E[&P[?ULQ+SGOV%[I+*T6Q/;
-M[:&*$M:/L.P%V4B%+?1@"ZZ$`P5'N1?_[SB__0XFO1:Y+3P,[:[$_(DCILG,
-M9*8W133/\@;U5RQR;'$P"<Q.U8K<\V6S!ON%X6W?C?/.KD7*)Z\-E"_0X5\>
-MU,6U$K)%%%&`OCBMTYL+*JM%:88K9R8G`+275Q!!W<`]%-WNE7K@>?HM9)+E
-MO#A/7!8X)P7,41W"+\V6<W6B`;VBQ.V$2,O6(4#;[T+OTN\S_/[J*D_Y["5O
-M\519ZBKALKRC)Q-P'*DE,3(#+VR+L:6[,(E[M^=@;<#677J%%RK!QQ:<@6O(
-M<T^Y&NYJ5%U-$Q%.?5(RB\F0_+$"QM=`^TZ+T30>*"7UHP79FT+`]XZG'6L\
-MW'3<*[8QRQUU_BL#$<3CBL[E(@]M")K3M['@V'_!"[?M(#I"3_,U%[)[(5,X
-MCQ?4X)`0K&W+WU'$MNY\^BETX(,E$T_>>O@\3+N\@XWN,(<$U),8FGFQC`#"
-M6NG&##NJ^WE7A0/#\O6!IL)._$8.82-4A"L"1;]/,"R[+2/#U(QK"G"=]*V3
-M+'P)*%W=K8WU>5J4I(JT<!T[CQ>B:I40XX5-:"'7!TZ5%P<B(I%RUQ((F$@^
-M(YU,GN7N0"6XBU%*\<DS'LV&%EWB<I'%[E`T9Z*&-]%%I^\-M/K+RR&;Q&I%
-MR$Q3"V^EO%=?Z<H<<G@?SX4XF_D&VY=6AH0BD&PN?6NI!3OG^@'JXRUXL[-S
-MZ1SY:([%]%5KRXPZ]9.<D/`N,K<?"+S87];PIG\S@4=J8&>'Y'X8X,@T@T'2
-M"'4/5X^"])."F)G:7BO0Y!RO(T,3D"_BLU6XC-446ED8O_'4JJDY,=@\.=9H
-MS[66=;_YS;>3VS]4RY;)U_HEN/.MA"I.)2&B&ZN*1DCH3$IA40*?Q1\E]JE,
-ME7E]&QLK^35FW)MZV"%2"V<EC<?I5MT2'6B+MHV9"!T75!$#4QZ==;QVUX=H
-M;)<LGS@Y[B-7>"#L9HT$VN31HD##Z'@M*+^4$.]6FFXISR>DPJ60E#%Z7Y#1
-MR!@X9^E*",\B@BK+#8C;L[!/D%"\CC7*4[XF>:C*V^9:!ON`QG^_]Z7KPM^1
-M=3IZ#@CSN$1X%L?VK9`=0EV8<"9U]?D0TVT0BBDR+D(/KU!7J;EO0=LKCX-Y
-M7EP<J:WRLJ]#"-6@%G`G#34@D-)&$`(:XQ4R\;"*+]V`V(Y2F.#LU3_OW,!5
-M,,Q88^VIZ*M^D3H,N05P"@RTF**#IF6NR*.#F,CK&G4``(0-`TY1*HQ`(!Q5
-MCD'8NGH0)7MF=:VKU7=>KY5KZ-G;OK\7+,\;E+,#(N^4PW)=[<@PK*V`9/KS
-MH>O/]IUG[/6EM";_'MWGIIM_-`Z5@\6'<K/&,KG:#%S].05=DQJ<)4GIG)'2
-MW0B:@O<M=N0A94G:LX;J5=\HUN&9L1&=.N2:(JJOV#1%QMPX%:C7$P9\DUNH
-MY;$[IU,.CRW$<UHY_GTUJB+JVW=X`K8U"_":*^,$S`6LYBOA^Z+7?DZ*KC`8
-M4')'#K;;0&#$S5%?Y>1]AS7CB;]9O^?.:&+]YL@0D@P"PI,15J`8F'H=]R:'
-M5N,D%$=RQW630!I(OD7#7'!I7XI'U:*9L&1:JS>Q2OYV%\N@:.9JJ@87&<Z:
-MPT_J>35+32$-HV>Y10AV&6M<:JTT5ZK-T?X_6.W$V1^#6.T'WAFZ<YLH>1=<
-M3BUBW<2!8J:NNPA<.:C!=%M2,C=E34G^+]]T>X'WG/K!0)?:8+ZP.#%`?/>=
-M)4#0DN-67PM2DW"D^,*N)O$KNC6W=.[U6LCGT-](</Q&IN&M'#1H*\#E9MO^
-MDXLF'KYA_6KN9[G&T9_:HKR6+_1-A@R,,?&%GG[9B;.HRQ@!L;5PH!-I4O%B
-M(Z^0SXZ-QBGB!2#7QTMU.CL.'/V@_(WI.`K0M&.L],/:P!\RC@S14O0UVU&0
-MKJN6U7SREZ*!5I13:[4+ZHT,VZD:@!TGS7;[PVQBL!_-)C+<W5?MXV%H:C77
-M6MB5US5O&,`.2$TPWP8BM_(PVSX<^+&SKYU;0&[QAN8;ZZB*K0,_W#0ZJ%BS
-MI%"O0,9I<&'1D_(8_^2_,KI,@S+(HDHAI4R$O>V<I@+)N,P%9W&[:ZRT&V-$
-M1(YJ9#P?L>WL1:D*]9J47F<**0LS3[F'1KXV!P8Z+^^1J09A,M7U4N)D9DCY
-M>IM"V*NW-:VB(L#'?D0$?@J!EZ/MK+)KSK,!RS^<G8Z,$\9^ODA)QX)$PQ\X
-M7O\5FAR=)(_Y/6H($"3K&K$7+B#VSM]N2<WXAC1"U[?YF6UW%T)A*EUB1R>G
-M"IJK'?.[1XXR+*W\"W>EQ$-E=!PF/Y"6Q_SQ*8%BAM2F!P)JL)0"NG-DQ+/N
-M)MZR1=$N3;"N>ISLJ,!Q&+%-#EBWV2EKF5U%SY$7B0OW?FGB)[.H4!=\T/HG
-MGXP<N!>M8I2;:+@C]MFTN4NZ[;S"^NDMY!N@]%*GE7@QX,W0VO`$DGLVZ.'*
-MOV_/*,[Q#$9A,2PXSEMIPW$.NM60I'`G'BS!.85#UPN+W[41[7-G+Z.%HV>,
-M[.=#4XU*8F_0;USPCP?15-W`'#3IPE:$5J^%,EP<2I]^RW:4G!88VP'$D`PW
-M&W;/M87]\`,'US%NWFA6N`%:_Z58J'MU.\HBJY^$6^C/188>S2ONO=BFIU'B
-M1\76?<PZ1&K6JM4<4@"YEA?^#KI'2GEG9_/+"(,45B/XJ-(]J]PDR9U]:L?F
-M/OFDR2J8,A?CX;L9;)D$4FNL\L/>@RF6)\,EF^R8ED982Y.=_XX>`B'&@"+@
-M[;*`/M\7\5`*-,M&1VP]?,F93;L+!?P]2.SV59&3OM&H`+FL14H'F6Q&T\<7
-M@).B)SSBDHYQY.BZ!<:I6+.9^*\+J/OV@UD[\0YU!5Z/B5;&(26([R6F6[N8
-M7P3LY;<%"5-"'*Y;PYTS-8V`SMIK!V2%`(85).TBG:C+&7V7B,TV80[Z@"J[
-M3PMCQNV!\D18A3\`L&3V%\1!_[59RGVY7YK4&8,;53YA_DQIG39*%!_EZK5[
-MZH4A/O'I"I7+;@XKH-3VE'%IPJN4X%I=]#9>_X4P_+WR5<O\(\D,ZC"WUGE#
-M!]=T*B9)!KK#SX3G)XHQ[VE[G@];M"1<X/%\/Z&F&!`:O-^/9>/AT2DJ6.BU
-MAN2TV0Z#A&1F8P$HU+QG]B8+8])+C;I9RB"[*O+<6EQVUMO>E%?W61MKGE"H
-MTHH@[WJ%F3/+7O^_A2U,^*@Q[?4U0DLY:PNKK>K[H$E.%*2HFBC8+S'V#I=;
-M>I%9CQ:9B]FX,FCQV'MPS4B?,7(15R-)&R)]VPWJ@>K]$QDWB2#X9#1])KW]
-M>,4(DFJ(X2V<^>U$\[U5YQC@+GZ34WD&>;2FDL3JT;!PO.%62^T;?K=XT4<D
-MA.].J,LJGN^KM2QV*LFR_GRYYTZ7!^OC)-;-`E&19\@'K)3<(]6K0G_\U=E1
-M(\7GD[XSN0H6P079`.SH1EK,IH]H*UI9'E1PUYCD(NW,!^^AE_JT]*XJQ4->
-M(3A69J?02H31=[["IH'UJ<GE]Z(*C@.Z_`XL`=-D.PO`+J4PXN[(S;>8C7!]
-MXG$\CO?727&8[FEJO6BY5^K;-]3NI60;/6>&KY\HD;TS03MJFY/ZJ,HP'['G
-M@JCY=,!_7&YU#"<C87!N29/J4A.3QM7/(,XP.AS)\LV7;'^?8-!.8+9M_E1H
-MR?7.!9)JXX&X`%4\/]<_I;92Q>!-TGKE_[S*1&=CO0BK/0W`#]GY,H+F-:S;
-M'=G-'`_'^Q>G+7PA@Z;XM:E_8[G<9NKCMY.3J\OE=L[584Q#GCT5O-_<55?8
-M&>IUCBH-$L;C$7RECH;UZY6$\="<QR$DYI=@Q'9TWBIQV"@TMWGC[`W>9O4.
-M;ES%=S>&FL:V[">3Z9U0S%L6_Q4W7W$,*1G$TWX\YR%"=NU88*17MM-`EJ2=
-M!S@C0&@Y]-SG(63"%W&4>A!=4*#B`Q.SG@WJO]IIE*'9BSA,EE*VO!+B?U&$
-MP10(30E5Y7>ZXX*M&5P_:.\#D"0R5#M95]>X\/LR-GHA0UF*+-^`+JF:&@HQ
-M_'L6KUX1#$-F!:8NI]SE"3IZ_&H+<GV\V:9!RCI$"S]8\/OX!7K$ENA2.X41
-M")(NP6E=[Q6*4B(ZQUZ=BVEC#&X!K:Q$*OQI#"&7-`0S4=*X5%_5RX"5S#K`
-MRJTOX!JK6M"CC5EIO=,_A=.HMLO2-6RM@ZBFH),SY=!<=8B4M-'4;T$4TW/>
-M:GXO#-CNH&F@C5<BVE?;ZDN;T1PG[%\#I_,`+$IRSIL9WAWA1C+;`D?6!C`*
-M,)'JZ(RY"=9L?Z%/'BWKLFS&AGFQ-=H'`8!-D_W2>$:?3Z+PO<9-LTJ/M57*
-ME.^Z#?H-B9E9)3KP:.@):/ZRIC5T=L!KN/!X*)<%A*G^%';?FI4MP'3GRGIW
-M+Y6/+S+!??P(6!39!?,Z.)J#II9GY'*J^G'XJ@!/J(O!C$%'?3,A@GX#$KW?
-M,D=/2"W9&[3\%^C,EL'R[`AT(E3(OM@7E"]"5";J9,R>JECFI]8CIU<EW_T"
-M,JZ7RW6YR0,V+BV&HS87-F>`H_`O3'31&W$S4W9-/U,J^!33Z4WU,:_Y3QUK
-MT)%A%"DQ)H[<],??J9O-_I*?8MJUV&*)PY;?5="%AMJUU>.+Z@!>)ZM3N59H
-MNH7-;7X(!D4(+K\:/2^`V).DZ]NV?#[:*5)[/G2Z;40\#?%^^Q%]?(&4U,J%
-M4/KW1):YRSQO2H!HRU1YOW+CDCYPD/8R:]B2@)SSUY__OGGN4;D#GX6*UM.N
-MAC*MXK3AW?@_60D;43.&.AC`*/`F5U`8"0"T=9B@5VL1SH-S5CY[LNRT5]L;
-M'+K;:-#'FHQJOK30^>#<&K'DH!]WM\9;DF!E]C2JW)-8(17@2(7KAFQ8D<V7
-MHFP[@`C?]]9V^^N8!QP;ZL126N"^Y.K5"B6@Y9R=9+FSU6@/P,W]FP`%><%>
-M%52.#9?JQ\9*A`OU(=:SVRI'S.S)40RPS;UDEO\4F6QX[B>T7X!RC[?Y[:%Z
-MU3Q+"XM.9N@3`_$A9^/FPO+$3P,;XW<H"MG3RTLIX8M?`E_PJ4=!TZ:/ZU62
-MUAQ^Y,"R[J7CG'^;NCP!8E)@^I:S-/FZLY[27G<KSO7KWF;_K+4Y)WL/Y2C1
-M,#%4ISJC!3#&;.U+V=]N[JQ-(H,[R^VZ0*S.*L]FNF=`M[T3(BP'O$`D:ID,
-MCPX7Y9RACGGO`PYQE\XNKG?4!IT_&7(14\,#.%FZ!F#>$8?_(-RX08.4;AP>
-M(KXY+I%AQO_0<>A;-)WET]E7&8,:?2Z+J2[$0+SD\IO_F<=5&K%5D./A&-5S
-M#U5*:KNK?G`ZD\>(+=ZJWPT>&QHOZ`X>2A^7)ZE4?XLMF!EW`WZDM.T2OZ8D
-M[B($2EPY<)WP[X@BWYU`^C(JH/,%:A*_,<T(A#L\ACB7\U&OW:S%TUV!^X]O
-MP6J7_Q/CKL>L1*-C(=KDL9'2X]?APTQ7A1:&,'O6*4"#2;WK;YMX+41O,X+#
-M&%TW<T_.F:SC8UV>DN]GL4N%6ZXCNA$H79Q(86LF]QZC4[!\/>TI@VKAGPT4
-MGTNXN!SM%]69(@-$I>**I%&^+O3F<5C9O7=I:QV5<P>>X.V0#CCQ9RJSVZ@%
-M2H>ZJR3?`CHEA"A?=/]#-1[19+C]MT*?^&X*EP#3;LPA.3OIL'=:_JB.MFI@
-M;XKC]W>AC^$=C\(SL!]TG$NKX3K6JU$;@:]L25^=O,HMAPO$DMC@\6V)/X^F
-M=[R?YV`NZV!:/^$:ZYBGEL!]C7S+>.(S+')K35+;?<2V)SJN"96*;I]IZ8A)
-M8M/4U3'HSY#]SH>#Q31<WUQ-O_N<!UX"O/%5HG='!W(G[7]>4-@(LZI.,T/;
-M,].V32O]A5_MO./]Z5'Q`AZ<==K[,P[)N?JD^-R<A]_4@><DPI`$X>)G.D\D
-M'K;CI9"*Y!`S2.Q$?N)95;`\+/?HNXBI2C8H1P@7]N>='&KH)2Y'BH_F>E$:
-M7U5Y4`%6W-\.:<O'AZZ^!7UN!3DOT+KZB_0W-"L"+$4ASO@76FCR`U.!LW<G
-MX+T='K^ZG*+[IK$MQ50:/KCJT+_`\H[>SE$3[]0JM)$GF=',!EHS<+/N!PP^
-MG=[&S3]_DT`B`OO$,=Z3_@'W>0<.;),\<2<IK/T:KT<R]AF'Y?E^WF>D^14%
-MT<@]DZ\0JT;%="#86$S.9%GNRZ&<E`]PVA=M=GN/:)_B7>,#`J8#?,*,:X&I
-MO"[])6*#S-S9T;?)(9V:32Z!!`*UX#B1P&MGIYD!1MX*H92BKUVY&.>OY=O&
-MK:@BA36$H,!Q>RJ$/<2-'_,%*/-L\:<R\WA^\=;;Z%U'T7UZ))_;T$AG[H#F
-M*.:D[CTY4OXP<4;8UO(3L*W&Q">&4]EU,VI;6Y<"U%)_V3YXU[F*QBU.'P1&
-M..HF/*L`QX8L@6(V,S-5D<W'P>KZDN1KW[:D7L,MUE*[1:QOD-=;\-[9^%R5
-M$LOQ?#/8R969?BH)@"*8<QC+".%5R6B1;=#P6'1G=2;[RR_]4!L^N<;FEWH4
-M@<JZRF]W[.<@U+(A+>*^9C-C]].B=BALQR8[XF(9GX,H&I\_0[++0!W*53(#
-M]S6QE[T)HBFE?2)!!QC)#V\I<4.&+CS[<Y4R)4N*-#QV--\?\!2446`%JHH)
-MSE:KG":P:+FK3*TRWW+)?5*PM](QL7Q7QE^_U]<,UTL3DN*Y.*Q/GV![6#*V
-M\8"R5:-B,]8(R#F=OV$TLP`',D+7%W]V]^P'6?^XR1IPOHA\A$KLM&HI>:BQ
-M#7"S/R[1MWESGQE`&*!\6>,K"2AU;)?.M=,;>G_VXT1FE#:#>3/;C[<`!*"]
-MO!\$N'53DY6<L`\)YZ3<4*72H@''J*OA+--*\2C@<.+\9HF0`M03*'YY"E>]
-MX%%`<.<E38#Z/$<JO5PZMM/O@=V!O<;S=(0`S[6"F5-PW4SD'?Q+'UD-/O/=
-M_]E?CI2*APP[@5&(1GHB^8%XI+SY:*D-A@8ZT'DMPJ@ZJ+N\VK1F7<6Y7+,V
-M=DBLW\U=<E6)0G?`GSR<&?:]@W7-]73-328::,YMU`=,<?;XJ]\S<Y2\-M)Q
-MG>J\"A?'M4KVZED\$!&Z:8,C(_*"^]*:39%)Q77E2I2V$E>PR!$7^%A]=&]S
-M*=[Y>O>4@.-B\&P]W45?1*L4?KM$8"=@^.1PT:WM<$!"3,&]K=XE:?F;"5U)
-M)V<+?:LR^'RU7FPD%0OQ:O(;`WM5>?"7;FRM>%9"I=I!H"X?>PVBXV4[TCJO
-M$'^PG+6C-I,)+7NZ6J%.D8]BI&NI@J2GMM2L5='^_I-H"VF/G%2(67^[C9]`
-M$`.#%5",:\X+`H*?#?O$%VZV=\_%B&(J!H6^;E41_K6VFM32]C&7I-Z%FV?:
-M\^!O.\L.]`$9\?.%XZRY);F[Q>D9#;5F1.:^:&D']K4>@\V&WN^L$%S?&#^C
-M[(%#7HJ.5NOTU6@18AW"U-Q*.M$\$<N!,#NK`39)F!OSJHZSK[Y/]BZ@1T$Y
-MVOH`H%^6>))X2-*9S9/.&I`ZC_L![O70LMKV*WX`N^*GJ]G9<S\L0@S5H1F7
-M1?97.?$#E1!Z)6PA5NZZ[*U_=33TM$0]I)L8FQE]68@6'T=[+$KC6:NRI\>E
-MD3B?M:L>T+XAD0B5R3A<\SXMI7HGG6N;+>[O,28F7]&;2@&T"E7DUV^@:*K[
-M&T2/]C>)F"O;RR=HQ>OZ/(4*\]+&.A#.9^4$)56_&C@.-YC7%NJ#U.FW#<,9
-MU49+NB(Q,E%C`"T0D)^[+4/6F3C`&H7X0"8N$=Z!,%?)<81$58!Z@G\I&62F
-MW;2@NDNR7^ZZ\LPE1WR3*,7#E&BD1.^`/+M5<@$B*,&N'S*'R1'-A#,[A=%M
-M5:>F__E60*WP)PR>9M,>W7GH2O`G@K2.U8'3!=DUUFYLH8^0C9QKI0TXZ^F_
-M1U-S^K_70\A04UZVF$4,PF0*DAI=9SJA.'ZS/ZAY&N0W4/ND#@&D<TO(;7.@
-M#::%(@]`,@N_\P,$D76LZP,))D2QT)3,Q17IO]$43<B-A>V??YV0E>ZV%'8W
-M-6[/G(0W9L`&;29!]?]#&,H4GGE\/TC@D1_/2`=/P(Y!7!M#B$X\.!XD$9`=
-MB:3\>?E*;-4)AWH+R):O]%`2(A/4M@M_9XF#%^D;B-%=J3G".GV4R:A8GU76
-MSW2I^AY]<)"9I6'KF0K>M]0^!G;+FZS1[SQSA\>JRWG.8TUG]X\-P/^-[02]
-MBVCC&WE-&?ICHDO%D]T@^U)@,/(H^K$P,M._8A$0=0J*'H9UT3.Z'D+`A6%W
-M,KSZ,V;=,#F#CY*E&#89=]R_Q,EF\S\N4NS6<6'DNBPM^DTZPF+L1S^=X`.'
-MFHYR%Z[A^6].J2;PC,^?S721*XCU60+?WOX-\E#7>WK%Z\MS$ABG5=SFFF7K
-M/?[WYDLAR8*XMH<D8_ND-S:>;LX7SN]'TD68]B)O7>;/-#KR<"=HA)YV/:<O
-M-L'+;D\#YWR;R!U!Y5-;M;&8^3ED?R)X(C)>V\:SJ+8S_A#8:V,?\9^W_G/`
-M5*Y-=52U2"*@4TR5TP`;#%2Z3M"F$B-M`H+V_1!WV%O9#41-C'>A+OQ)3;:N
-M*4:;&"(!B.V1-(X<*0H6F<M..MS6O@]^UGY.K/'0^[$?$QMLL`-)?[MNZ(A1
-M."Y/DR!LF$%+(AW2D$[>_6BI.RF(E&*%ZE:([WC';/$OS.&$HME@9$!F@?@H
-M`1MIA[GE+P.O<;KL,)#:J'JE9V1P^DU!_:MU9]QQPHOV//5\2T!K([5P@P(D
-MJT@9N9HO\/-R-,@JU!K=<2H+<\DK8TI]O),FM\BX6Y3$E[6[<OSDKR4QZB\`
-M%!6SDYVR5E#&U;=&;)'._NC.(J>;!)$A=PG/TH963H=\3O_JX[.B;XQ;QLUG
-M&5,(JE2Q0/O,CP32()\L&IQTBPG.9:6W`*PL1Y@"_Z_E@[D74@#U"S\M]X\L
-M'_PY4J2^=!8(RT;N'#\?RTJ%Q::4-0-*`^>`NR>Z562:+I"D7[+/6CQ>E.?2
-M#IW?:`"''D>%[G5;94G9,#77U=4(BTIG:*.U?Q`DC,=?QG1B/<7E6MQ/2,C;
-M[08G?DJE%1RE$+S%>0R&*C]<\W7K^\IF[=M*X>!(S,3CW&]GXCIU?P,F+.*9
-M(*[F.C_@=\<Z>RZNPY?*2W?\[+X1RW_J$(8'?R_M[:+V=X>@3Q2LYP5(:/&[
-MV1*:E3M6N:.;V%I=#(78.1BCA/[P^.3_W=R:.1J$F"=2LT2]_U#6"YXM=D#L
-M.U8')FGFK8::;)K$^_B8?YJ6+NVZU$NA'G4Z0QS\I:P(C0TR]<NU7-&O5SU!
-M'3D(-RP-H8:@L?D4ENU>WRQ7TY8<;!T_5M\5!\"6NO(KB5LO&ES9VB-N`\,\
-M,(KUM\:0]@O03_&UWYO>>:6*VHI'S>TG,_GUMAB\:<&&!:)1X[):N[@9E)3^
-M%/Z1/T3K^6S0JT4'3PG1N>SE%>D)];*&!Q%S6(OEATA9&2&I_Z-G^`#\]%R?
-M@,)SFL(`/QPH:<8K`R\6=6+/=B]7#NTJ,DP9_,IME!.KFR>U'AQVX-.BJ?P;
-M.8Q([0<`/0@EU8CN(UM6?W[(:FH8,KU:/P2OPTJ&F2RJ!ZBYM@C@0]NIFA,`
-M:6EH6W;1-Q1>@\F774_[O8W8Z$Z.*@1%CQ`/`_K'M^?7,W:!.F]D8"O)CGXS
-MCM2WG!LL!)00MD=TF*/8CD;G?E@=3Y6/SHACY44=KF8+8TDKL3NWLMB$&Y,F
-M>Z;O5`PMDC3V8</)*Y$S4/!16H@TPFP1T1D1K&Y5?5)O002CKQ#+`54NH.FV
-M:=5<#6K2KG/5S['KEZ+(@7RGL7X(O[]^Y%>,X0)7PR`36'H6P7`;;&:,A%#J
-M#+Z@2W27*?_YA<8S8E6JN,ZX1QOE&ZQ@"]2&2%F60919.5'AEA;8#Q&0[Q"T
-M#-%:]35Z6HI01;C5#NS9J+HGK#>H9856L]^I<*(GRXO6.:P+'+93_-=BY'.;
-ME`_VSUTEWF+UH:DTKPP#>^1MSAZ!F.K_B$].DOM<K%DUC*V`Z/Z#&"YHZ\9'
-M#7H8A-=:\.?K(U"\HZM+8"`H+>8;BO0#L^&*9>]VM(@T0O*7H@K;VNG'ZK%?
-MD?W9.76U$F1`F`^M'S>1;#C\N;E\;"B8W;%2<!1#=F`R!XGXBZ#,,,:IG)!]
-MFV(9PC!MTQ7N/0-)^CMP'*FB%]]LZ_K$,P^CCHP)NR[$48]T-4PUT:_RC00>
-MI+I42BZ`*([527G8/!C0FUF%NAIRZ+7.`L@%8&_>!3%0>/@@ICB<3(*[OHF&
-MHO4A://B9J,@Z//U)"G?Q&-8[AM7PXL,JIK-,D;ER$(B89SR4?"LX_>M+1-I
-M_($%_%*F<(FX1@!-H+.Q7"T<,=EE#")H?`2\:]R_9G@K(=5>Y%$JH.\)VJ;;
-M.?<Q=&>Y>H$[=NP3PA!^G59[$8L%4L^G?6N1X8L*F<U;>`8#:Y;M43*TEHZ,
-M4YWU2+K;Y9CC^[_I$]L0H35PR/8TJV#J:WECGQ>OHXIK_>",;A`S>OJT2X"7
-MKN)/32%73;ZVX>YC]XCX0A:7-GVO94V)0G#[61%3DB?`H1X=9CDS<6O:1,:&
-M_X1R:V33`$69*&&GN#D8K5K`O%HA+!0%*)F:*/ZMD-F\$'C0GG?Y3JK;%+`6
-M>X0>)911F4YQ(^;Y32W)"%H01CF@^F)Y5876/QQT(N%U110PFB#\\'-)3E,Z
-M?J(G*2:XS""995"]%W?HYN14\=,E/2@C\A/^9K'23P]"OQE*OO]ZY,_#_*0G
-M"023)FAL=;D#!R0*MV#CNE3^+!A*K*X.>T_4ZW=(MVD22^#'@%Z31=:<3%/W
-M:!,8C6WALTC0>\,`H@*X\'96,79A.0A1&CO;C&1.A@[YA%:QEO?3D^K1O\(<
-MCGOZD.F^>%C\TI[@3F_?SQ[!>BA,"\7,IG/.LJ2_98!H:AQR,1AYH]>/9W^)
-MW,M"S7O(3Z)B/\;W,NH]X!L/-:6/FDQRDRZT"(EI39XK^O0"H:(Z8ZKIA!TX
-MY0BT:L(F*.?J=5(FWM.5+7.6F(>2$N.76+<>,/BZ<1ZD=?T^6N,V*2-_<C2J
-M)H:#BM55F+HLU2&S7MM+9N3/MDGCOH:V#ES0'2I!_UC0R_3A?";NI[\I%R_8
-MS?7?'T6)=/TM.`N/11J<4*E:7>!0+6YH&ZMY_>^O;Q:;36\+5LG.!`>K]]8T
-M8!Q2_(C902?[>G$$M672E5]0WA6[P&X8J1X^=35W?MKZ"2F%AEM."JA1Q,X=
-M1/D0PL#G,<OK@4F5Z3S#_9^UHE6<J3P#EP$%'5`278QE&F**!Z^'(C*U"4HQ
-M4&!!`'BM$:^7F\/A!:3W74:MA:ME-D\+FA7!]F_&Y/)Y="T;@\FZVS$BS.8:
-M2U53L91\Z-S=3-`-F$C-U]5,2RXJ.0;5"Q'DKW%DX;AN35SJF4_Z#V:L.SZ-
-M:#-2*'T9$&P@CF%]*M?C71HM9E[<27L01]8A:,HY$Z8AY[(=V<+P^:'&5*BS
-MDX#2R$^(JBK7T8@029H:DJ6`,W-];%:G)W37*%P0.ZR66Q_KA#]J`5>X7#BG
-M9*I!,"_"<PP[^85:]FZ.H9Q26)(Q]8'_*RV>*8HZ&H$'Y"0:U=[]'+L"<`Y"
-M#+:@XO81E,5.Q12'K(6QA1Q-1Y_PCFLI!]<HWML-Z1Y03`^Q&3>%E3_`>E4[
-MLL\H*7_/=L^R22QK/*:T'$;Q";H./?'6*:W8FK2/VCW(=5N]E`%LD2LPC?XW
-MR?]WOI@N4VU8P&?J?6=AK4V4UARN??A>89(`S#<$"#EI+].$KG0T`N!9)2I3
-MPWR\\/R72!ES7;]4^R7MW]\U-2V'!RX<P%'&F2,K'*KIQA?_5X]"O4^GE\!?
-M[$+EDYE4+5YR@%%"*,3O\9CW.:%8;Y$56@$N,D?3J`2++?VTZ,&I+)2B<9#P
-M+#^6\(:#Y,WR]<XB#,O.V6*@0?`Q&=2BA^^I3V;4P(W>;%D1HN*6"\;'M]C4
-MA,Q0%ZGC'88I0+3/M_KT7NR_+]"TX"&XLR/Q6>B'VMWDNS-L(P;3/X5'ORC8
-M(Y.8M=FJ/37<N6>)QW)3AJV-0=:&?C/]Y:RZ>'BX3L%R]]_%"[TG/4<+V-1/
-MLH^Y)$BXGFE`MPEKUSQO7N+*&>'42YAJ0LNY,$#%TD+?YZTIU/UY@A:_)4Q*
-MM,3#L!2O:L?/+<`,2$0'1VZ]3T3&5:E@Z4-/X#F5>K]%>;Y(S3;G@=LV%)5P
-MX]6F?9=:):W>)%-7>3[<NVV>H9X;T=LR\UH<RQQ'])W9U\6>GL-9K1P\+^C-
-MG)C97J`D>M3WL\I^,6AT&RMZ18PYQM?0,2`GY8U^AP0@9?QJ1)?0</UJI7#=
-M/K<J!/8U<C"30E`7>/XG-?R[^7\/!UBD?]EP.9(E6DN,=?U-A4`AIO\[/\GC
-MB*<A6-(%QK&O:0]KVKZ4AKEW/.6DC(Z,T%"!4YH"GD!*QI]9U.MJ\T2[$.]^
-MN"Y#*E8%3ZK1!6*F,Q%%V;7A'<7,!FZC2VY<WS`$O0\]\5&^;]3XD-4<03G<
-MOA4$Z"A%(2V:6/KRK`@C%&K/)')ZJ'\O;W.53L6KK,*B/)=ZVY/",VC(X:R[
-MPX(F$,W'L<_.*/6<S8X"7$1@&(,S5W"=CLC_.I%Z2.,\PW%RFZ+3N*;T&-A.
-M2<>QR(C<LTSO!`&Z`\'G\D\SPX@;=C2%]CMOOWIV"$4J"OX*N4X!=U22?ZL(
-MF0U`!.TCFG/A@P6!<&(+C\J9K!0;D9LDP;7V%VVP%V"2/7&ZP&8V'%2;/-E&
-MZSSM\GVZ.4LA88GP!*;M+9&]*'87'&&"V=#USRT[&%36@.1NJO.OSG&0%=OQ
-M?+!2-)-`]1EBI+4M]"NS;V1-_`!_6E`+OV5NPAQE%X!L[9`^7`/VXZ?%E;S@
-M;H2Z>EAF[_,OW._I<<^L9&6.GB:059O]CEA#LW490-D_()!YIIEN5IX-GP,D
-M]F/@U416>X*/7DSL2"O<]1#XL9[2VO<!]_=NZXP\F@*13X:6Y(EP[K4PY$-;
-MZUU8TS<!?I0BYRG"MM:+[4'E[-@\S$B1-4<$9/`QQMC=RFK(?;1IBATRRV1N
-MA]Y*9!5E;A]_K+PNE!?F0-P]&#WDQ[&,65%MMMAVH9R!7!I;'(CS^VNZ[T$;
-M9DV##XL:ROD-<1'S[^.O&.I<ZS:9+8W%LX6JR;JS1];3/)*SW)E1R3Y*E.KP
-M(,1.)Z9AA"^YM\<CN,]`*\5:M'"2.=FIA!9*>A2/$?Q]*/\27D#%)Q:/R<:[
-M5^A(7]=/>>6K\R)_3D]XH/BC/AGI!F$G("D^LM]PCOHSXIZ#IO+P'!'1;$,]
-M@P.'KHR\@<H7C@U).&PM(-90FJ>PVY/88)LW,^.Q^O7,FV,9D"6O),!HL-5$
-M5<;NX*G!0SG%Z<"!T(OT,F`E+M9_(`CBEUT+P$*IPS;3&\;H:7VC.T/D9*W"
-M7H<D89M#3F&MUY>,,C896@]'0)^QG`0R5^"`T7W3,L=WHRB$02[2P%_:(F<#
-MSVN;!NZKAK$XOD)D\I90$Y0[T;NM">L1V&^Y<X8E[1KTIQL)8FN]]'H/4V`I
-M1N*ZWI&(8Q%(SQE_B]P;AUKY>A[*\7T75/OBV1+D%9:X'4;"WD1X+7>9.J:=
-M?*J^:K-Q3S"')=XW(1Y<ZK\?"[&7=<@0@&RT[EN_X9*A#)(,S$`*P8>:?^,1
-M5492*U;*_7P?`>/'Y2:/:#)DQ&$R:@<:_Q^+_#2<W^B`K&3.?>59BF(TW(GF
-MO`"]&G'$AQ[-9=AI7U+0&+Y_]ZK6IQWM?09N/8S`-*H[W?;6Y`+KD$8EC?_H
-MJ>ZNDM`*P/XBD^_&!9R&]IHAC,>8E?L*[52\QMIP-X;U(?QBM]6S\4TOSJKV
-M.XM",?]7_.JY3MM,Y.@)OBJ-4OI^E:&0+ZYHB\1I=<`QG/G%B:<^J`;N5-SW
-MO_K'JR@27)-IMM<=:@-9XZK^<XGDT<5'\_M;XJ3RU)KZOTH8'5:$$ZAV:U+%
-MM-'7CX$Z*$IB=Q.M7["OQYB\L;P/^U_G[W6#9'*UV\RUEEC&TWB"FJB23Q[;
-M(NMZWP.(3@]";H:H%;LOE)7>Z^W0@^^I9+V,R;4.IRV=C$':)]:2;!Z-BJJ)
-M?BMUJ`SU@:N7CMBELW,F@P<!6<88\%3D'MB"K.[>]7!$OK27Z(;!V\O&^L[:
-M#%Q]J4#3^39%_SUB8QV^4[>*-S9@]J.?^CV`N"_8#^_P>_3OL6$"-[-*$BV'
-MF\%'#5BC[/\'5>#RQNMG0Y6=28646]QE3MAE5%%9)R.`>>Q7KV>&D"DA$-]8
-MBE$>[PJDGZSA2QC=LV'X_'75]3QP(VYW*3">P$;QSX00(ER2Q=L9HO7:0@S.
-M0/?:_Y(M9B,1'39[V,?/<GM8YL!KK'MCP@.MJDIME-?FJ3I14G=1O5SQ<4;E
-M`/FC&O>+!Y^#,.3/"0$U.4_ZYE/%B<Z/+RJ^,!DR==NR^G.`KB)9`S^N\NXR
-MFNVFA$T_3Y"?JP""PH1US3X9D#8K9TKVMVL??$4:_?2%4ODOTK1;>=76B4U(
-M/+ZL4Q!O_W=9;8/J+,)8H#77SG5RYIM]E]!BO<BB5G3=:GC_H?`%"4IHW\4?
-M'YXG6DZ?9Y'JP,'8Q;':M9&<^RWDQUO6^>\U2<A"R]@HMNA3P!=4-,GF5`,`
-MN]0!D^)#N#Z_T"/O:82K/PN7\$-<=)NC0,XM/IEQ,'Q9L&*>4*]=(+W"?LMH
-MJB&S]4G3Q"OJ7NG91"#^48"80WX#4GP&"LZ-F5H_GA#8YSG&NC*U5(DKQQSS
-MHWU'&?_8=YZ5[M2Q_%T:]V&J6L<72@U)+?6WRY(.@%3&E$;,TC'@AXU&6=GB
-MP_M\R'<)=.G(MC.MFL2\R'W<*T:F@SPTN47L+:\\[GQB5I^S4_,"F-Z.%7]S
-MR;[H;S)\3LQ335<KTMEJ7DT.>4*DYD]@;JJ1U&<NB['@]^G;>!=A@9M(>PSY
-M+[V?#6S259;<O9^AV:7_&ULGF-G/A>X&%"\<D8!"WV"[)T896N^5YH>3$+%9
-MZ_AG[OJI7%&0X3S0-"+CL=`?P.$$Y4@V&-S5/9L!%=1<4RU0H@82P=%\;C?$
-ML&?0X?SZ3H-ZEE*=2BC89\(7E'?,#JNG//S]FF28+_+D',>+^-%C,0W1U%B@
-MJO:YY`HX,CVO?[3$`HBIKLEM$N(0]5WJ[1!5-8>AI4]BEAX.N?7@E2-ZCW9W
-M:Q6"(5V#$_.P1E71HC/%N/W$/FQ&L/TV^I29C#):16>(U*Z-2=S!X5V#S#)M
-M=]AUV.JD/A/1<Y&;61UAUKU/S,'J,X:5+?7XF>NG;IDJ^Y9F8^D\U"0W+3\8
-M=U@[(L-6A=_,T-B3/#ZR^U.Z//=-++B.,%0"*-UZVCIX6H6M+HF7P-'3!AUV
-M>MVVU\]!B08.4`EI0B;KV$J)_?S2!!84FU,\EK]3A3&A-E';93K/+,\?2<HR
-MA,X\)[/0`;[[@!*\Y-S-`+_)EI49K2Q(?KW(#3YU%@.2IPR6*7*[^$ZCMKS8
-M^.V5Q`5Z>E9V/S\Y:YFW=Q+6X#83`MDIQD47L9B6E&,.UPC`5B77/`#!VCU%
-M#Z[%CT>:X!\]0(0--I9N=-1O@SATO&MU<;SOH7<EK3Q2##)J+-<6U@HN&.O<
-MT;?U\:WM2W&7@U(/(QZ*E5RZRG?UARY77S'G=\0H92RV%.>CRTVVK_=^WXP!
-MRP3,W97]]HK;NQ41=WW69MNOZ_-0Q<)IGZ70X<;9`G=MW394R>F<CB9:'@.)
-M!6'K77&:\)0]]-\ED4"_,DI/>SM";NW?>MY]J8H3X!VFXT55S82OX+LV-%HE
-M.Z$?3/`U<,40/H/,)D<_%%_C"$<KQRI1-(%P>.<Y2ZCY(S\>_P\1&*6^YSM#
-ME2J7P#&P32@8JPFIZ2*J?H=>9Z.8*0R5`"P0*J%F/J'[ZYKYF2\;7+RZQ4!Z
-MQQ"M+:G9(C!&/28NBJ[N'^YX0*Y(`D/&E(8A0"9R1>PN?GF_FQKVDVC:YM36
-ML%D7%L>E_4E>IH"UX19-[>],397X[M3:O@;M/\E*93&D"NDO&5<<25;U]H7-
-MZ\.Z&*D\]5I;`$\@;_#58#7&*88$E^KA4Q6GC2BXD]-J_"%3'VX29$<:Y-4]
-M[NO-O)G>CN?\QSMZ*VQ.E3GXI@Q(.ZOR\&]11H1-KWJ6*I;5(@YMCA(=+Q'_
-MF$)`>DV=DCT]K$A2T=[F>B[G`_+KOJ,/Z#[P&>E#F4"5X>[:_XBWF'V]/4O*
-M2@^)_,D:PUD.&4_+NOQM;N!_PINQM.^2+H`$=.[R#._#5O4C!C&;(Z^:>TAR
-M[X"(*\([;$)0TX(G^O$HHZ@,D)5[&#4VOI)`&_2L.&^")B=IQEL&,VD.&)_7
-M1'^OPJX-KU#ZGS):`[-.-76*M()-E/+QGEE4T[M54*N_[KH;F4:#P6O1B>:?
-M[XPH>QQQ*G:BJ7W=IN2^.GC]LB*%UR(M$6M#/6]*H?[0G+F6#:ZQ6HYSKTP`
-M_+/INF4H2=@K3U3:D3=U)U*=CEZ!C&K_Z*OFEJHB0T:`Z=413)X]C^G%H$RV
-MF1]8/EE1A%:&C#K(W:N\("UOUW<E45EF=.)#65$VP@?CB"?GE-JH\#E:[?YS
-MF+KD+R@??-Z.?I_.TQUX!7>C+E(6->9P=*!EV!\$EX[U1B:)A'ETN-QCXT8Z
-M<::?N!1:B$E>IA,(NZOO7!E1<,P6W$Q5V_I-_-W2V^!Q3*EW2GM/)G5"3TGE
-M'B.=,<=TCX[:O"ZLVJ%[H*P1%=\L0\_\/%8V)PW.\'B6S#=YX/=SB:/^&PWC
-M3SALM\!0>T#'AE);\@L%+FC0X]7/O.+T>8ZO(U&\CP+51B]7\^\"^!*\5CYV
-MU[=>G[Q5\F`&DM;U$ZHU4I")J,+\"M@+?IR:C0Q1H%3+P9`<=147H!>RH4-V
-M,9Z9>R'BA$2>4755]WH:!0CTPJYUKB.^^6B%FI8'M>V.W*R$9_A/)?:1P^#D
-MJZP*H'7NP(,NR6!)L?#1X&F5%I9<*)8M@#SD*`/-RT5CFT9(]#G")L7\:"?'
-M,Z-+:B*3]>(;8_25[?*?X-/XC,`MSLTCC_^^I]P=U$A#2:P$*T'?SVR*984E
-MX+AJ3%'P.J&`VA/,0UG2O@D%A:3YTBV&6R89.H[.R=<#T;HX%;X]X05X2Z>2
-M-Z2PX0!G40ZW&,V,/'YI+$XDVYF^[2LDZ"IT*SR&:]TF91#`0T3/=E3Q.;KU
-MX`4(+3+=$=4SCJ-=MZ[Q<LL=D8U^3+NM7\6Z[TR4I^UTRK;_<_FFWO&-1;)/
-M!V3X-41U"7URG[6HR&DH+@P3:XN!"4'>28,0$LEZ:`.VX,Y4PRZIL(9](P?.
-M;,:*OB1V+0-8%QG;59'*_)/BUD\-984@VSK@*.=],^VDB51GI8K1XV$,'",E
-MN!(%S7\$E@P_"**.6H^WH$C%6<^LO`U>4O?'06(0-BF_XBA-]3=M?Q;'>XI=
-MT8ZW'Q<E(;/<YU.:]\[CJ2N-_"2_3<94>QT219:&QP?3C`!IZ>X$607%?[X3
-MDO?J&:`_;!7V$&*W3A_.2"7?(Z/)P_E)!E7&>>'!L):D%:%.D4IS.9TWS[T<
-M==877;;=#`&LKU*-C^02UL\>B]W#MDLU^JCG&E79';9F4*_R5KE,O6X/DRD-
-M61U2J;<EWRM\?*VPVU)^?VSYAO3;9UFQM5U>LAZ-/7JVW<)9B0&DF_TF'8=J
-M-Q,03T\NJ7F;FRP-SW_>4KXXBI)UY?KJ)W$]O^./<=%"+M$*I,[!+U$`,TLH
-M6O!_-68GK9SI3E^NS&5[5V44A.IFD%[-DFI^;Y$%^NL,T_"6,B>>1^48P<[M
-M67]5N&&/<EC[//-VMXE=4R`]G#]7*U+-=`DV"$TQ0]?;\?1V7O,B+T8#RM;I
-MUG_"#]#4"_*-T:'-MA0U>H=!&6UNXSQ3LJ0PKI6H0QQV6RGGA1,K3F4^Z;R+
-M`R3^GQL,2(I=#&5&C2<$G>XUF;7[*-'IN^*"20@,><_IA0)GB0>%_)V2?O(+
-MEE*GI*C<*=]B:]"@\KZPM#PW=T-I0!GV6'[KOE,(?^:KEL#K%>-0TZ?(8\S^
-M4\;T$=$C@)S347:@U'=V,=9_?O<+L2MQA^QR]5O0M@K)%*!E4IMCTSC8I_`\
-MT8+1#A7D2NF8]@#-4`@$_STA++KVA&0J$5Q0JWOR'N"%0H7?((U%57NUP.K2
-MSO:[V?^D&1KURD7`D/%,=)8<GGDLH(8C<^KR6"+@X\<T`5'Z437"%JS.8G$E
-M]WFUC*#-\.TRG@,/N5JS"TT?E-?ZYFO;*\^KZPI_1WBN7$#,L"$8\'M=CLH1
-M&TB]<(,TZ53]RU-&K,*3/B]\93"8'7PIZP3IY*#HK!JU(6G'E=>,&>WN3_5)
-M#AD7[GLC1,K^D!/M`XEE(A=3L@"W1%73&-&ES479KP>VW(C1^M!++O'IX)'6
-M&OY#7S<4)6C8D=_[/`\W,PYLTOQ3[KA.\O(</-9C^7R>G4H-IRC4,0T0:6E7
-MI\LB!%?,4$A`J?B_)NC(6))1<W+_L[]JZX!82VSJ,LHD/UQNUJ-K;XG^-'2+
-MQ^QI>%T0?CSJ>=[2UO[W^8H&S?AWXW>`!>9`AT9'%^]%5IM9D-Z=@?`@6<Z)
-M^SEX<)1"0UU86*[U0?49I2_T%58LB(&2>#ZXNL\-6(2>==F[K-./?J^%2_;Y
-M=H*1^H9G+4%I_O@4)WLB4=+1/&7J,1B6A/G^T*3]X4FL39G9:RX*.VZNR#_=
-M#,:^Y375/*P&V'*EG.[']0L9.0[O-3:U\3HXMGR//42GUWF(+8A5V&W![=B$
-M8QR&C:0^2VC?C;.3RSZUFI7\#QQ-W[6CQ,K2A@61L)1DIS30NX(_-PM%J/+^
-MFCX'29+@#A%:"#.F:.8L+`EQ9P#4@60!@?0TU*R/`S=*UM7W3#FT4H4:2:'F
-M\+>^SE,CN.+*SUQ;.]W\UW:T<X.KRI9W[I=PU#=^N<@/##&\L871C\H&A7]4
-MGI^47IRV_88!LJ]3>R#+M;;V&O.2E_1YU*%CP:J`,2RF-<QS$>'=.?"85EV.
-M;PU0)O,]UC_QW);MF7<XAITV+.K[,%9[8K&;Q&\CXJ.\-JQ^#2D/FZ%);>DT
-MI3]2$3LZ69\+6\XMZ$453&LR++,D!C_-K9_$Q'/IMRW#`W&^K+X'/<Y!V^%>
-M%$[1I!(5M/\J$@P';[3*6(KA?LLTS:##K;I22!<D%S7_O_VT__I/8Q,R>0(<
-M4-@'@R@IH'OGP6*RX6:V=U28I,_*K6E7D5[/<>=_(WCU3(L<4$9`IR"^Y-R2
-M-JW;.L3B$Q/-"?HOA-_O5G>2`&I<T%MF_B1I'\=]32L'!NS2>;;\(AXSXRH.
-M)9W4;08ZN'%:>5SKLG&L2U7Z47-18%+JN!-\::C.]\#?<X+R"\DU.*YGU8AW
-MA1U!.WP;J15_F()H@H-0BZL29R(^#IHK[PA@F%-.'QLEB']G,?1O4Y'0K5OU
-MNIDE\3D2'JU_XI.$B-?AJHVCXJ,G.:JFP;<X7S.W(DB9B#O&<@!+M)YJ%KA`
-M8TS"!`6R#L!+G;&;$P;'UK"T2I%JQ]W[#_K&-$1;C'9;%,3Q>,_MH35$CY.%
-M*&*(//=200`CMV3NEMH&!><?E+QH#>)A;X=K=V!9@P[;&`4FCZ2,>XKLW#EA
-M*NQLY5>!5`5N@>@810+8/JFU^VI4BZ<L&P.TRY)"S:,,J;VK,]Y\WX7]<,5?
-M";5.+[B:DYA3;8_5"KS)3+`&ROM0_A31J4[12!\K@XJS=YM6*^B,1NVWT$Q[
-M2[260TC6.\I7[_+G9*W-]Q5<A/'A++N0;$$?+YS72J:7'.5$'*05$:'##G4V
-M(,B@T?9V(MH:)>9H+N_Z!)TDO%M7NKC*]*Q;>A2.WQ1I-"R(K*I0OQD/(-3%
-MWU#L9*O*\D<?Z<]KIB*]#[";0XOB:B.N<_\\-U(Q\.-H]^C]U#M0JRR5D:>]
-M-T7_"(A\^`^6#@E403_=U\?E$X6M^((0&'TD0-+C2%-%:>%0SN[FS5TENQI6
-MXV?-#6.5%J*F#TYRUF$Q<F2RZ.3US?6`*^JSD:=32A9K4(>;C@&+`AJX['2V
-M_RO7#9'C6H6%_Z[D$&,!*PI5]$KB$UGWPB=-%-3FC^SX1L)IO$+4FB.'1K*;
-M]27D%Y^C`LEJ@C^UKB7FD/33GJZBE9INV6V0DDHL:WCW%"Y&5$S\+T@HKS^+
-MCN9_UWKPR:#8N:"A]9D]*48]>!BH^N6.A$,L>OWVM3G_Y$O7E=E0L0V=K!H/
-MVXD)=:?*,+[+GSFCA/P*N_.H6`1`]MFP_W*KAR2[A2O(SPNIV.]L_^(MD`TP
-MLPHS=*3^)%YR6SS,K"M#5RF4:K^(;NPW1B*8;5G#L!@G91X&"]1(%ZDFYF\I
-M<;Q6#.Z61GT/M)1O(A8^@K^Q1#ODZC.FZSF-)=1MFR82S3*@%M!-I**63;YN
-M;A7LBZWQYFGD&_OU]ISU<$QYHP5IIPG;!.,23)-C0BX-,U7AU?;>F`W87AHH
-M-''[GNK<^O@IHE7:A:I<YO#CRJ`G#(+5!X62_6<=T[0]PQTW'<BTYOCGQN;(
-MF7;TW[??G5X[M_QYR`ZD$G72AKZASKUG4\'1!SKL']GD+;9P9$A2+3+!\PH3
-MY]TARBW#!L#O\N\5!W2YZ2\:^=?)')\>H`I+OT'I=!?=]Y1+EDXX@[*1MM<9
-MEJJ/W(!"?WG1ZM'ZX1A?M)EZ(8C$7K?5[8#5L"@CY'01'UWU9%4G0AEJNMDA
-M`2C:C(PO,W-I`+6B8;6ESV)R_DQ.@\AA.1Z$]]CHE;RR%UBZ"A$H-E98]H,<
-MI0L79NFGV<Z2#\+PR^NHT#G7?/RTDT%[236?#`^HDB3>!\2T)&0T\49H,M7R
-M9);_V<'P;B7[4AR7#2'-Y-[KXKLHA933U!C5S..PCDI)T^2NHQ=(\72`4L?C
-M3-YG;N<S7+/61Z?!HQJA_M^;VW1O0\D#<N^_<:(HLEAS&I;WH<=_O2#)U0TE
-M:*F3F[R^BSV%72LBMD"C5C.`H>J-1.>]X);:+B^Q<91>,3PDIBPKE0T:$#5T
-M"]!R),7/L?><<!=$IG#8U!YV@S>&Y]<1\%?Q8CZ$,[OZMD_">%F'&M"]].6O
-M*8XME=?8H[+/B-^RF#CW'7D;`;RCO+4C?L4:R@]<?O$14+Z#TCCN\<`(!M6J
-M[A/YY]3B&UOKBD]CMRG(A2G"0+[IU`GR<%EW-H,8YQG>/H`*:+?MC$*!QSO4
-MJ]4;:KCJ^3TBP_B=3^NJ@0O8M^=ZTU72'.6HWO.N<=#6M'5[*W1RM*1+/_MX
-MLM<3D2;/W&ER#\T#3IINR*+U6RN32-V)Y8*N+=&?0)P#I6A]*^B7^.&B!$<#
-MC'!`2:\@T)I@EAM2<I?430)^HH9&U7]X!'87UY3,JY7PX"$%1N9Z^SUV#C?J
-M]B9E(>!=QWRFSZ1Y/MQXSA-0]69?T6BH$Z>=J@#.XE('O(IO5KEF`@-+4U1%
-M9$Z\'1[V>K=4CZVH`-J^_<'/,>R%=R$%P7!X?N%]=[2C?Y)<9TVRPLO"$^C/
-M<W8D_QAPHF1Q@GJYE%B02:>@<VZGVGD#6"P<RL8CL!CN4M(LXZUW!'%W,W)'
-M>W>T^660O8_WSRQ*-_S`.+1`V2TRX"'40L$SC8Q+)K1V0DJB02Q(E_X?#=/*
-M#4JRL*[FQ'I.T$;Z"T[&%#2R5*R3<X4UT%+C1/2,X1>T+)NEL26E:('EQL-'
-MUK7GT38>SG7-4N$J?Q.JDYLG%7=/6(&GWN#=:EV6V/793#L53=O9;8B&+3!U
-M,@?6`KZ<)!=R8^M!V?L7ZYNH&I;&6F=^AE8:E?+G:)04;**Q2T9($Q_1=M]O
-MA2.GRO:HZ]V&Y#HX2FFS.M&R).QM@:AY15VU[7+T).Q5USU:5WCXL=]+T>[0
-M`1]Y^I_WB5.+L'G>HV\7:EQ*0L/7A^"+;$$L:&I\#9+H4#9NFH6#4S?$E;D'
-MWBJQ)WOTD;[C7SFEB:PPN9K7J0:L@XM,A3=8)4HJ71069[^>=RO2%1U7B*,1
-M:5"W))L5?MZ7'=K9:CO&#FT6:]5$#(286L,BB:>8H\&`+&[!B;^HFVD$$C8[
-M<CYY?*1*GB;R8#MX$^E;4K/"^W17]2UCKD\_ES&79B1GPIJ)=50X[,@4AW6\
-MHMRU_BM]D=GJ/A8H`,S&"S&\>GQUHD3=5>?ZL>VLXSHS0/G^B\['4D4>7G(J
-M%H:P65E?%++?3[>GLY+1BU?*N9K4%9-'B5(WFPPA>5$D5OXA#8*9V&0>I7*S
-M>D/%*<+&56+FQR_%*KF+&.A5'[]#GS;IC]3>7&\-*0UXI;8A7F%C)@7V4@1Y
-M>TO>;;S]XLK<5(]ER"GE?_]O@_[\`P';T]9IAV<)6":V?_R7K2WS9^5GS"L1
-MF8'<=ND@&&L"N"AV5GH]$!LHI0,,A'/"X<8Q(.X4VBE.\ZND(AS5`=2,.<X?
-M3-,Q'V<F^"X)7]%QSU>C=QS@\>/;ZE6!5C@J-.Y#:IO]CRYE?/8BG%7RA<4E
-M?$=5S/TOL>I8WU97_Q:<80;N=TE&!_1('AEDYZ]]8.>0ME',W_-]%\]0)E[5
-M;R7=IN[X'S=U?/CFYT^$.K:BP5\^]ZFD.2GK4?621PAQEU<#W$X8K`-S$(=K
-MMPLM$6YQQPM#'MI@=DQA8%W(EKH[Q33Y/<'_D##4E]NM(+5+G743?KV8+0M:
-M#*0*Q<&4-36V/;]C\N!)L<:E2&8U<!,]-M;1"->&[95VK8[#VF&T?.NCA;R1
-M6'E*&5QY@2Y`(N=1=2>$A_V^/XB1^96J$I$_#U5?Z#7'*]$=L34S=@Z+IVNO
-M=!)=35;RQ,!\UI9;2"=F0_CYD9,M=(Q2$0\42:*(];-3=\BCPD0SQT*X7?M&
-MNERJ[B!-V.)DH<@;&;UV1J-S/U@I.[$+IUTI,:9_S7`.%FN3.NN.K]&[Y=SH
-MUAI+W5'FU\]B;NX\^C$,W0"I">O)(C+&,!T>69\0/7>4V(Q_">.`\LRKP;8@
-M#'W+I%/I#D,_+9EN5^M1;YQ+O(F!!<H6/OK=/5[WZMA],3C@[#316X:$2RX9
-MKXAD=:!%`%A&T>>7@IB('Q,/-?"FZ9!+>!LS\15Y>1NHJE0P;ZTK]%7/J`Q$
-M1GC2-:+XH=%3F`'G5ID1N`<IS8$GA5]VKP\*.TE9!(SLX=GRF`!OU\JH<'>"
-MJ4RRT!H6LAT_B8(K/,,S5?9F@\TXSIYQ81]6MF3ECT+7;Q0O*GT)$#\A@6KP
-M:Y.T>QSKN0#%+CM1!XY\U&J<A27`BI`]4'R$6-VDR2M(J0S8,5-(89--Y.K_
-MM,4\)J"XO=5([-=@8@H$275^_WA<6:ZXW>[.]EL&V?SG0UCV8M-DPV$3/6V]
-M[*=//@&:K&#_DF#0P--LS@9UR0F91KW+4F/U"1R05!+^:2/F0E+\^XOVLQE"
-MD+OWI5$WVM?]Q,]V1YB-%3Y-@[WE"<WGF:[@!'RQ<$..RRK[X+$GVOL#A3\2
-M=6,7!(M6N\]PT$*EN2:@W`-L3GS&(:KA?K7@@_:4&1K/JG\$]`=1D^#VM^(^
-MAM3Z%\7XH%=AMVZV0*\3/P*-S#X\>D6GV8/$E*::[/:T1HV8V*_8A`M0ZJ+J
-M*+I"MR4E-XFND"[A3L6I,T&S-',WO]\3>LR#UX9MQ^;FI7J0&>-*235%GI15
-M($,;68<1\G$/?$<#)LC:KU&BI-Y[`5+MLK\#Z0GNRWZZ42M6^N@0P-/WC2"9
-M_D08,[P.7\(`[4**=C&:%(>";1PFR2>E[$90'@Q9<ISW:#2\0=W8O^S/A:W;
-MW#AM*QV>T-4K/;DVQ2=J+4MC_/6G]F0L^\8>1P9ZRQK%]V&)F,->_0_QT:9R
-MGVLYZ/)!(4J%ZU5N)"]+2Y`&*HCNHV;`Q[CN?8$K^F6-/4'><(Z7\O,**C>E
-MR(^D(Q[-X-ON(KQ0A&A3R8];,?]`J9(SXG%`&:^)/\:\J3D9:A+.V4E0':Z\
-ML\N].)8SRSN43%/!R0+4GD1M9F4U"K<6XZ$RK\G+I''Z*;"XY3Z]W+<PW6!K
-M-.M6'5SCU-93L?+(=9U?]5&II2!!/%3Z@^%%GT9,8FY\DR0V3L`<3:[_:AOP
-M038/<$,&">Y/GY*$9"^=.1B'5PZDJ;]O,L!;"<AH<\KU_$HT%ZR\LQ((866M
-MGH:*.]J8P^X9!5'?-[$TJTOI;&C$`DVJAK@G'+N<,42^M$B;SC1WQPNW#\]?
-M"-CTIWH/V""G;S2.0>-*^TY=4=BS?7"-HE'6(#8W1)Z:M?`I8#=R\"X4J:62
-M$%$A._[#8?`/.PZ"%D^=H;<HL-VDU%:I`\0)BE_P^D:;@[;QMA?]LNKR_RN`
-M\HSN3PU/C86<K*FT;U5,)`\?+)(YJIHIRO2#YN6KENY0`C#S9?5.7T47.%PH
-MSCB'+V>(?8WP=EC-Q<PDRV-(]\R&KF)346=7_"-6O_4F0F/X]MTT@G=S^;[0
-MYI/7;<"B[4JF7%SFFC15$Z3'806:J7EU'ONM.!T\>[-8LSNQ":WO)]J?)0J(
-MMQ*;=0EA`4.,;(BGA05B1!N<;[7?H0=H1ZUAJ=9][8?[FZ)L)`G..4D@!O+S
-M9#+NC&JWAZAEI>^)ZP/[+^,S6PC&T)7:AKRLB_HWC<VO'QEZ[C<QC;D`DXY+
-M"N@$OF-"'Q9Y*%JR3S':<B1OJ%W$P(<6\A6Q>&LL"L`'9*8]^.9ER4]0*:G9
-M">Q[@UK"<-20^!PM8#35I6TTK/L4P2U]W#XCE'4(=4I!!KV"N\;$YUMOF*$/
-M#!_F9AM&U(<J!@0+WT+61#C9WIQ&#YQM`I+<Y$$H:@M>6GU^@[_8JTHH7:\D
-MS5CK*30D;)!K-/P"Y7S+1-15EUCH(]7M^_&?/\R:&[NY1Z)_8?UDCK8P6B&6
-MXNEVC@@%DD@V<[BL#S"_]E5+31CM6DBF)*XH%D7K:76^*AK.;\FO]$1T-%75
-M2#A&KPR98IME.M37+16!EYM(B'N5A]ML)3!?:9G@G"-J]R^,O89#VS"XQT1V
-MGRPC,PEO7K&5TCK24,QA^'XIB3BR!$;&Z.':.'JN0/@]^1@99Y#K'LR9`F9\
-M=L:^U/SQY=FZE\"3P;1Q8<BL"-LS+13\"H*-U*/,F*3?AP92/]I4'W?EV:UG
-MOK/9>W2=4YF+T"*/]RCP^R`;WHB@YGK&8-C."W?L"42CJZPG?^,`N"EVE#JQ
-M<*E+]Q@D=6Q&$*-55OK<$EN'XFEHPLVB+;%_H(M4HTCR\2@)<[2^S58,9\CZ
-M/Q%PC]=-3P?/.A5L'VZB:TGL+*/K)F3%<ZECNF\E3'MN8D^85-6;=N*7.K\3
-MJ*&P*.L88A7"#X\-LKX5>-?Q4*')6,5X:5UJ4G>52,\5^-,)ZFD2JA!\#/"U
-MA>%EIW:.N@9<'V)[<HOE2/,QQ(Y8?CNWOX$@!?\-0J>LF3Z7PJ.^ON*PB4$!
-M+N=DD=+[F\AV7E=@,Z_#/CJ40SW>.[?/Z8R41&=2),4=/+[\%M6NVUF!F(@O
-MLUXI>'@QO\.S])+XD9#R*K5V2CE?8N</<+7O:Y<_\IR!%$>S!'_B+QP5XVBV
-MG10N"G:,_%S^'KE<;"!V%0:=UK@I3TZBM6FZC&N>3U\=GYUWTW(1NK>7?(<I
-M-HES?L?;.BI^][,?C??];+:8S5$U2R0:,Z(LN/RX!=DWDSI4X72H/)B$INI'
-M8FL:LK2?%K^5%>/.W_(:_GT*3J$DB2\O!KZ26]+8=_'I,:-0Q;O!C-$'I)#?
-MT/?EU_RZK+NDX!G.Z40,\9:>R3X^4"!Y?ZRQO8#!ZSX)1;+(9AQ&8GFF9YNA
-M!6$1KKDM6&?)O\P8[P(`L1&A_(4ZEV`?'U40U79.4_1GS\Y0V,O+Y*P5'BST
-MR@Z/NT]6@1L+4B4NR_:>L`&EWR+U7IO=532Y$ZD(@GEED@UWW]I^A9X.;8E4
-MV>6OS>):>]?:R]DY\;7=4\\V\^J8-H@_J;FEBMV?`8<E27)&.U<9]351.>"0
-M@Z@R3WC-3^\0+_+B[<+C-`RO>/T#8>)CZ,$*!812^J?F.4N9L$9Q#7?<DXJ_
-M8#1"'A1++/.0I4&4&J7+<DB`+Y.5M"$^0<)\M*UW0VP#V('</[&$'M2W*@;K
-M($4,G)<K)M2Y<1O&>VA)W>L\O.P#OUR_L=R*FL<.DF"`^ZA;>Z((%B@%.Y1)
-M?MCIOY1,)K^"X3N6O1Q6$:T0\:.\:23D?-+AODEYM(SMZ@R5E^[@52N?$XH7
-M>E@!HH$6X@/@H%`X#Z"=%&NB3*Z)M+C^N>;'@,O&FHH5,9EA$X]"J975$6RS
-M/Z(:IVX/C7@R7V9QTOX*%7@=^$*V_#V/\F/8\9GD]IM+[A5OR&P6&P+=/?&^
-MXCYPU(V*?N']7"OZN!*R9G'XX0P(+UT-?!7**!Z8[;X*L!BCB&[LZTC[V0F+
-MA9[42Q3$KY2P/2\X0^82TT<,;*W4`U)FG^$MS+L8#=>6N*VSQ9@GC&,0-H.R
-MW^8SU3X<*^9"\7J'@"FF&\)5/8EN]-TF@SR(AV%V?8-=,:+VVEEPM(\[-N3*
-MF[LT+X8%-0^"PIO%89O>:/Q8KC7$/2A48*N.UD#!>W7_DF*&6U#R]ZF-]#:-
-ML:R<<!1C5X]V3>#>!`572E^LF)*\V/(Y*'9=\"4)J4^N?#P7MRE[AE8$87_K
-M-.')B=$O8R=5A6SBO1,PIA"/EG/5^M(DV3H"L=:/R/G-L^:]Y7OFW4@?/E33
-M;+)#ZAPNAP"0./>KC9&UBY(@FNZMTXNVS+N&CO!&:RVE3865#IH3];33!_4F
-MYF;?+H`)MZ<,3^R-IY%122A`@`"$EF.U9NH)M3Y[AG:#E8Q8_,F>^%!3A/C<
-MUFN=?@N&$H^ASPHJMR(!P-,:*@[.46ZJ]&^.1[K4<DU:JQ0EEO__<.MP-'^>
-M@1^LPK:4F]ZO)NXK6A'^'T3,5/??_+KY/1VE(SOJLE7HWD5)K`BV%CS>7/F-
-MG:*<,YR2ZO!#8"F<32YVA@^_]S*`D:/=,%3$^DK_2VL/`36T;L+,\E+ZWQ5+
-M/T5?>`<[+('6Q92VX='C*%V0$(\KQV'Q]9^9C#1DY!O<E19<E/NN&TWWK8A;
-M#A;L.(]`HR(8@[OZ)FM`I00.9@J]D_W%J"#E(C8*2IC+_2SB,M8VX@W,^UB_
-M9_DZ]Y(]]=MF0K/F/\>6XI\#_TY>20GG3#9&&L03[[/-`\_@R7?V/EMN0EID
-MQ$],*S(.`Q@N'R#S=!$\WI+TN$!K%U*W*%8J57]*%55L%](&*#_2Q>4\ZZ.5
-M-C=$EZ)(7`-IP8.;`0E,XE[LQ:+,.0@IP&7,8S#&P/:\F+A@=7U`BAV6SB1-
-M]UCU.:>1LEKYT5E7S-8;M`=LVYX>0!_8D8O#]F=46`=Z;TUD?M'?=.MA9(Z8
-M;_E*-YE:XZ@T[8-P&Y!^`@/XS65PM*-`T(_Q:.8*9T(TETP4LX?0JSIXOAG+
-M:+M9FW/PT16G#-#=.9DHR'DV\A:A&Z8_5;N;2VZ=.C2DSY4B#\RU'N4*A_<!
-MHV[+Q.?S:K+8KOP]:+)H.EL/PF$RMQ/H.'RV"I'8.1%Y8M%GT\;FL/:FVP0^
-MWX5A.-127/&ST2Q1'JGHTM0RGMAT7\8^SVH7),.W61ERU2H&>M\9QT1>IFXL
-M:($I20P'0NIW@W@-K.L$]/7+>94-@%?'J*<_[1KEN[=#9L@OT$:LTV2$)WJ3
-MG5GZ/>#PCF&@Q6.-+T#]Q&M+#M`3D'F+`2U>6>6K_R^D(H/6R0HH>?1_#6+N
-MD8A\+Y/HO7AB/G+`DCGQJ6Q#_:9?MFI:EN5KED.8Z/?M$`AVM;1U[?R]3R4T
-M9L#?67RZ5"RP=N``E0QI,W-#YS@$-S>"TM)P6.Z'%+6^T4-0TBID2KM,&[O"
-M=JEK?&H>]MI]3IMDXB!PX"6F=S6',3V`8VM$:S8J!,A/A<O"8(KO_SCU&7N0
-MZP$A:[!^B>-(F8J;I2^]WSC[$??TWX^6<'E$VD_[EA<U7Z`82*WWDHLM0%*O
-M$/0DT1.=#ZD!J?AZ<1170=767E4[G$-J\440@>A4A%6Q)E;U_GIE*K8.!;I0
-MG_IZ2VA&KQJ08)/AW"]#H*=_TPI^,#7@/!K%[,%`]ROGQS416WJ(2<X`^#?/
-M#_4_%/Q`'CHVW&?IB5]XW(EF]T-GU_RXBFLN-5HS_E?*IWO[[#.-E'_3K5M[
-MN<L`2,H=L"0IT,JCF/-D$F._1]*)1AQ>Q^Y"\@TN_3BAI=#=&`?J[Q=`%3:Z
-M?G5*_XT?BIXR(6A]"=0XL>197%@@7>`!A1D6IA@M8GFO]IZ8W(JWCG"QK=>Q
-M@FCSOZGZF/Z+8!9^!AFQ9I1W@8`SLI,"_@9G*9I>(P'9);FL?1HG9H[T25$@
-M*D[9@U*1E:,);(IY2QQ9,'_&3=HQEX'IK<@2)(1^5XX`D,5G)0&8"8F.C3T>
-M2FY*WIH%'1?!F&+I'Z@&'OR&;XNYBN8EA]WO822ZB)R_)VX\PZ]_&.+K_UMS
-M-_+/@A7N8K.Q0&C,&VND_E.)1E^D<GL65*IA=Q%`Q6V=O17U=V#L*T?6!=H!
-M!?:>N?U3GJC0D$6U/M1LO1QC0U#FZ@^(]>XM'4W-SC\XO\3)65YXM7PF4%CA
-MH,C`';DJCAUFR*G:RS[2JHBVK'S<+C1QM+_$2GG>LCOW(0)A6GOBX._G]88:
-MY#Q@F_MB:S=MF`S,(B66CU&@AKC^[UT8.J@KG2YXYN)5FF+PWQ*9QZ0F;R`&
-MQT0#)]O4X@O>9W8-PKM88M"/NET:88E9*1KNO<D.2G#G(T#;XC`5]A['=VT@
-MU7[J[3X.I^3+@/]3C105#.2D]/.T<?Y]/W4'=K0]/LM!;*80GO%\^R'#LQQY
-M"/MHM)JQJX,_31<GVJ1+'IE>$WLNY7;NO[&NTQY:5SV0>LP8P`3L!?EP?)YP
-MJ5DGNXEO25E7`R:E\]&DSF/`R&O2OM_/Q9&>A`JAT%8,_!5@LP(3;+\7_V@)
-M;ZM;T^<U,V9(X%8T.5N8#.03C;Z9"^??(,?1%?4?KK?M2&8!E'YGO%'#X],%
-M+"E*]'XMIMGE$=G/]T.:ON9CM5T65$+$_,['9R]4&+FI2;9?JW+9_R1OMV/(
-MQRRYD<M'XM(5U%3)'(H6/I-2I@DRX(M%&P2A`M#$4[.%=DGLHI$DK,EG&E1Q
-MZFT#-#R&/SY.6X*G(3SM/US$CDW$I$F4)+^H.THNK<Q.Q;*M'H[_:U1<O37W
-M8TMSK^Q1=[C;A+BL'X1^/RABII2'-*8S2)WXP/1D*7FFK?OM2<]&VN=$GTML
-M4H-:>-V"HMI'JCP>TH`DC$\%BH-+E89H#IX@):3%!-'-6T5F%DX8/S_!`3?_
-MO*F(.D\'P!;76>20^$1>6`S->K^1GAZ86K;WT%==OM^;^_QKDAJ($LS#OWKB
-M*%SK+A!.0#FEJ/TE:&RA-D@BA'>XZ<(7F)&>;=<84!6S4X#F&<T?QDDF#.S2
-M/TK[!DQ+1SZD=N/<"5().[.<0A9?4$]ZA<?G^A[[XP`?."R!7K.@U@:S_.<C
-MIB#B9JH+-%4A(+/?P?SUB0IP&%R'&'1::-14]L7I6<3"K]39*N\47RT7:]*B
-MVQPU'/',\7,1[PG[;SAYK+W2Q#;C!MZ.&TQI'H_9]#X5>((WSWI<=Q#:W*NV
-M+R2`]-O?A^5A?`EQK9GTZ.ULZX@#:E!Z1[1\J;6.+'72_([6>3Q*9"`J+^76
-M6!=_#GY<9)+E1[WR;)I7R-QG;IZO+F?%]PI5Q-;Q-H]2UYGYD$(6C.$H('.E
-M=DS/=_#*FI(Y<YZX"5'K2Q-+[7_62%Z2I'O=1E<Z53FD:5=9?Z,9AE.)I]W3
-M,MG5@$DP6&$R%SZ_<M>U5A@5`O:#A?9YCHWC9!1*WFF[?,["PL"UI8_/U"F4
-M0WK/B;$(<3689#F&:>'E.8#]S"M&,@RC"/RYV[G^U9':SB$[\CF^N+V/!;HJ
-M*EQX+\71BU4GR&\1GRAU7B0-8]5&?M&5_/==/D_GB,!AMP*4R,%[`T6_X\I1
-M@SI/["ES:S<$*DJ2_`UZ!^@><-I+_:!+<)O*9JTHS*0A=Z`3S`5CF_JE\6V6
-M\KPUGM"_$'7+2''FG:[+9D@,N3Q'-U^&5*^T:0-J4=&<5D/*T*Q?2G9"XG_F
-M^2X)F+9F@P3XI>##N5,;O$/&>=<TGD!V`0&`5K?@KK0_!Q;UK)%_#/IF`D*F
-M0`*+CM'SJ<#V_&+"VTVA#NUY6M4".I;AS#G2,"`!&M@/1D1HD4\3WN+JI/?9
-M;HS>_Z13&_4,IA"'OLI+?0HG)N'[U>9S`5\M?0@`=_E0S#,\H$IBJ:7J,5WG
-M$\/;P&\[->G/%2/?+VN!$76;T%+"TP38:.!Q/(/)2M?)5,"/HE$L'AI4<$<H
-M'D^<]+$5X+UQ%#V"I/F2"_)%JLCJ-/RXML]&;I:0S5P8!F,W1MCNAAQ)4^(<
-M+T7ST6Q=RB1?*Q'/?34G9E\HB>5$7'3TGQB]@\5.="J-47WSO*`8W\FR(-TK
-MN1#44(^V9R2DKNDRXH&E+N[YJH<"@W5`5"K;-;*&HC8:'"1$?84]D:\RO\EF
-M9M'=!$H:GT[W->G'\;/JWKD,IJURPTUV@KX)Q62[`Y8[1QHX%Y4GI.VXJR%O
-M#'"\C(WUA!:0IR(R,S0^!"FSLSEVD6T^4(8B-U%,NGOZ/DHTOD*,:'Q#[C0'
-M#A53.FF_<]S%96#8SLW%+5@50ZG3^S.<=,2<3@0&?1+AT@37'LR`I,^V]=F:
-M]Q;B@18UR\]EATL0/U7<LYANKE:@;>,+3Q.J2)0;_F\86$V_X(=`N6U$88+<
-M/5TYN*0R@X$$RQUM&8WV\,K;IW+"YYW+OC[,6(""\2Y`+P>SC:$P.YF$NWD\
-M4LY76R:NINW%%_RCZ@HT<GTR;?I)I>M0'-!L]0@Z-G>0HTD;3VPSCO?>9?)M
-MQRD9;9%5J:[N76I4+AC*_5MO2IM)1#40"I9!<N!Z1&/R$^Q^IN(N\P8F>&#M
-ML3A:&<("5>#K85DM7=C"]C20H)$+?'V/(6"N?ZT4%CL7W7K[>);E:J8:R+W6
-MA\^*".N9L.;!S:)Z#GY&#.OS$B#CO,'I<[29K3"#2SXJAI$8#,)>0&."HR[(
-MJ3?B+8_PRFH<`&):V22,L7H-I1TQ=,%DM_BMNP'3ZJF9_%*>2%>`O80A$6M^
-MOZ-Q*<?[5J74X8/V=4M8MW3BDGG$V3[IX#D9)8_E;`<8:(26TS7,>FEV#T;'
-M/[#[S")5SEVOT<J^E<ZQ@]/CK_@^,SI8FW?&M*>:JKNRC!0.[KQ\Z&Z[_,0O
-M$O)@Y%`+YOQG2^0(F7U>HP2>26)>)ND`<PX+:1CF`LU%,%<YLW71(LO7C0L^
-M+IP<L-D?92<DGRS5FSO"<)'&+$\7MND`_6V,E=\,2.N=6M&S4'TV#@X:O[Z/
-M[5A2-CQ>3:7B$;I9PZA%-I<B[0U=K25+`T<)AZ*E'9/'G<N2=-N*\7W^[)YL
-MKCY8AD=6^5J++;-VZ![+<=Z\"!H(CI/-_`R,8S/UV)`N7P`N5I6F][[<+F++
-MZ)'Z2(?ZJVU.N<Y5-_\B<0(97:`?CT8@YC:+5>NYJ-FG6+9`$U(MAKH+CL0(
-ML3E[@4%XM>WTM0:.)3;Z:7+-CZ6^]\.\JCQ+-?WTP@'CUWW]Y!HFBC+76!ZK
-M6>!TW_:U,$MNX)JV:IX[:4$P?G#&P**KMO4_ZO.7,]=F["^%!DX#?*>H++O2
-M>&5">P_]4-"/*"#-%8J`\_U;OR$;7ZX`FM6UA'FG-7CT:6`/E%>)(87P4Q.F
-M>/VL(E_8OO8:E_$\VSGP<3"KE6)LG[RTI&"SRF_Q\>@TSXHN52^Q"=8JNK5#
-MRT/'#:F'PKN'FA\UM<7R)6D0$\=F'JIKV3!I[68\^NB_6I[@*T3$=W=\/_06
-M/9DH[9/KSX7H_\X3W_*O6-/8VEI$Y]J!PZN8<5.6^:F;K2;QL;7`T(Z8]0?Q
-MPRR7*\E!@"(WV[]A"?LC@D$[<*HD>,W]?!C\&(XV':O\N'_RPJ*F=`![E1#2
-MI7]D^>"EU@=><1*55VBV1<3[S?NBL=.(VR]/:J,=+M77O2<<+/8[9,QZK%#U
-MV)L.`4+)G'V#@<*`.@?EP&^L$Q(N/]MZXR!KU^M;0B%17>J;60["AR!RB<U6
-MH`]6T<L;"[U?8X%XNU1EG:L/ON#WIENG]2P0+K=6;0./`Q;`X7+#2\^JV-C3
-MN>PZ!.2YWPS`(O+*CJ2:G%ZD,Q<9Q%35>->:6[IW0:G/*HR$[Q:RA&0NP.C(
-MX&.,OA!Y:C5X\4*43=+E*N5O0&$4T_9M"7A\O*BV@.-HEALG-[(/PA#<+MIX
-MO.8"1\E=_#&&L`:HRI\L>==->YMDU,+^TWF'$8XT]:&.1YS0;W5DFD32&FYW
-MZ=FK>^%IL`ADNQ20RL-ZQ*\1"\V_3=WK!BU&T@_-FV@+.%=(<<HPF95\PB*,
-MD$_+TR@K`3X!]9A@6O3`91-:'_]=&3+GH?$QGQ:C)^?!*B80;LF]>;L11JH&
-M8B0GNZ?,@@'N=7'^@V59PI;>H#A1>D?\U[/VYCD\(*"/^;G[!@G"2,F>[^X7
-MH]^I?3?O;+PU[N>V3('5V:V!P\[M^&+-,F(4?K,OZ72R$V1/FOWS!<BV3'E!
-M#A17#&FI$3Z@/`*.Q".Y3\39#0O[D-/).>@37`.U[(-!E=:>R>;&LK-ZO`8B
-MGP1DCXM0<"6&(KZD3^CJ3KST]H?YT@JR]3Q_%[GJ17OOI?%$54JJIS[\4V9?
-MSM_"H\[0:[<0%0_6S20WLGVR44<%??5'Q9NT=B[<*_1=Z665O.%:.N0$QV%(
-M2O,Z/-5".^+^V38!E3:/)=O+>C4//+;?70RM]N+?ZE05TA\$@&HD$@J<=*FN
-M5\JO$7DCL\O-[N7"EX1G4/DZN:$'B2\-9)>$1A'?]^,UI*$/%WQP20C[9=X:
-MYTQEM"CJ(B80D-+-"<J2,,22!/1`B?_1".6?A*/*M-7R)#?)#E*:C%=2+1X`
-M'6\S<BQ]V',VQ6TT\YV<_PYP#_Y95WZAP-LS.4%<<N-A;!8[6V*V-Z5KA["U
-MP1)9_YK2N,HCKD%'L`H(W^!V$%]LJ;/._"$`?K-P:>^,)V!D&NCXRHW!>@__
-MS(9;H=]>@@G>T).AP;83HN0RX-'?;E1.RQWN5D+"ZS9RC:2__B?MW$BRF/^'
-M>3KB50,\"[J]<T+ZK*7G^ZG%6.RG?B*=5<5@K[4RM$5CV>_UB+1FO7>F=WN`
-M#T=XUCDBG2WW8F#1#=XU%Q<0\$CD,APLD%R!KE6`69V]$3`8@QF;=>O?VV#;
-M:CS$"^%'>8K8G[.&OWR'17S;*[^G:[(L]#OR.(J,/8H<6DA]T'T[<RDX2&`N
-M'0^5P2C,E8PQGN)]U6BD1[\?[`WQ/;SJ.'&8,2YD=<:P;-JOC/ZM/KL/)],5
-M)`8^7"])!K#J7%B7%$[Q$&:R^C7'$WZU0Y<SS0UTLY3=\VCK\=SJXWL9WKIL
-M>*'##2QF=/7.<\/8X+JO2PC]7ITH\74L%DQ#)K!YK]2,ZB17<[Q4**N5LK(M
-M6L\F_7(96#YJ2Y2N?(W:F]"=<'`"+4D)C8[*%,:0-H\7`Q%(W&-$IT)9_C]/
-M2AN*;I][)#0R0"DG@=)?JO>'N<=F8<AE<2*!<0Y=(LEC^%T*@7KOFQ&T[%LE
-MT^CPQS7@2[(Q>YK+%J,*C7;$RX[Q!'MS7#I_MI49XLB3F1?6'Z]K]QC.-$0:
-M9HQ2@4[WH*0&(XI$\21VQ@#I163\!VAZUR%<ER,G3.T^2S>ZNRA0NJ\&<WR=
-MJQBSFA_$;TW1]M#TT$O:1N`PY?6]7GYKR6$YJ!5)SP&LF<L"#8(.-I.(J/*Z
-MTN!X19R\+J0P/^+<JWU5:[NK7+!)-9]!DH"^MAU9M<:`RUE6*IQ78;BW=,N1
-MUYDYVY$HW4@0'5]_I,O;-(_LZ>+MU!#M60_,FTY.;VC`*Q(>"TP-UP6#8PQL
-ME>,5U%&/,S#64&N&:!PK85RWW;@8*"<_=OR)?%^GU1@>\L:D-%.+ZX.+--2W
-MHU`_"[,6?$T.941^_;9"Y`U&8L3,=3X5NQ;\02.*K$Q=+0`CF[2NIN6E&<5Q
-M9%6NM9,`#O&/O7J9QT3Y$3"L5>,JY+BJ`%'B!Z^GKD5S0.M^E.1/U[)RJ/0$
-M<_%12N.>Z[1<`1.`1:1J]B1Z1+<@6,PRPVW?P\<JR-0(#XB(N!<RPC!M7%$W
-M)'(9I0I<QTXP!;&:NQ;@S1T`TO>@TX"=XC)1H&L4\9]W^_)CQ5(*^EZ,YI+D
-MI.O2("R?)!#1;F!-`EY@?3JI(\<NXO%I;(-N*X7-^@#B_DL\28#;R\TFL"`+
-ML\?$4XW)+_)(.K7-:E/S*TKI\)H@_=FU*I05>O[B*^#E&U-!>X&LZMOUOCAD
-M>Z"(R3%`"GUKH5\>][="7C]^$@\^,-'?($YHQ.4-Q\#.%,CA`4)#TU4-BW\:
-M9\G4<NTFNN78%%+S.:<S'EW5I!/L[<%=S+"!V%7BTKGKG)/I":($GS7"@UVQ
-M,:L>;3X/6\-\$;'^29_<SY6N50;Q#4@#F/!E_QSSP91Y$4"W`:?PSEHRB0+?
-MG/+V=2"F[^'[Q9*UMZ[O]OS^LGZOGMJ1V.;QLU:>"^@O5*0N5IC@D'M/F_15
-M'(TOV$*/DGN*[0=V[`V8CK)5]H`$J`;F)^EU[^K>&<K]GG,QA5;I0F%AR0]L
-M4LD/5A'GM8#-?.I>M_<H%3D#OX-;7TY%5IS5C@:OU#T@_8DD[AE43RH3BYJ(
-M60F`<I$-H*DSB!H1#V$RRKP`FFNZE`+L?FI@CF8!!#20=,D8O8;8NLR7<:'.
-M@TR8@KP)B;<C=W81JL>&JQ6"(^F3YP0Q_AQ6S^8-E5S'K@WH^7J^546#`_17
-MU=_G4ME>@"=5+"X3PU4K@:#!!6S>%@56FX<J?HUL!;DE=<]"<DVQ?,8C=!*\
-M)\<!HR\,.\;YNPJ4BQP_+?QZ1TA"-.^W9*\G5D=Z>/M6C.33N-LIN&^Y<-T"
-M(W>Q-\J%U&2*.W8F#,1L.:`U5T7G)+&+Z>8J"0EJ@C4RCC"\M'SJYF=.RWTX
-M7[HPO0!E<A0=4<G32_KU:[4'9^(*C_:S75:RS@`2]SKEB[=OHX?(>&)UK31.
-M5E1$;(WA^^A!JT<[:F]&B5EI2;!6TE"G'/J^G^&24"C.^4\04GK@RE.)=FP8
-M20*7L7*RMS#U!JPY1_Y%8WB(Y)/C-]R;M\F`#XQ\@W]0L7J\32=B?X;@D!RK
-M(#XE[YISQ'\,R(1>,N]=4/EBH1LH==-N@1@L.%V>+7MLI:/`E.?IY+_]6D(+
-MZ1GCDDK5K-TIF=6A(PV8)="XWX,`>P5I<$%Y(\)DK244[`\D1K=ACR/":I\.
-M-=/GP<:C:P1U>3A=1-2T=7SAB<XYVV34Q&1F(D0N%`N)I"VPN$^LF(N7-O'O
-M@[BJEP,<>J)2PI&R*0A__,97HSL&IR+G_X!YX'3UGEKC&K>P78FVN6V+D"_C
-M3"A'3:!ME2M%T_KOYPGZH%0RL"PT#`+`B>#[)GA+,MT3/5],F8I,$*:8(3A2
-MD<K]YRW/YRI/`<J5F<E5U*?!)U(0-3Y%<RPRQ'*'MM&Q&_(BL/@^RIIJ+ZEP
-M>JP!E^G!,5,2$%6R2MV3"[<<BUO_.EW-$?;[G#V%@GLE0"^8,'JT:XSI*I@0
-MRM/]`9<NF?C.JAWGR]EG><C<B,#$/7#?J#0%@$16F:J0S!4Q0M*/_I.O.;*$
-M)Q8:JH)_<L`G-_]`R=(P-D+9/$;J*"$*X%@=+I]9DUI#GL=8W.8O2R<@+VM#
-MW:6!`H%HV59!V=$=A>;2^1_OD5)O?@.TUNB0ZQE)(+],T.50<NMA!K!$(X&@
-MA!S$B+FNJ>-TH&D9*932%47KC7JUMTC>15I[4BM^<("J$/#KFK?Z*2RK%#]Y
-M/<@\+F4*SHF(NQP!0JW:T:[U-C4-B%7VMPM[QLK#W?T`8HBX*/.:BMVP85+=
-M`B$WWP]`,6646CK?5I?I#7A2O#?\+'2W[]@*P\TN4\.8V]AZ5(",C:%?;[ED
-MUMB;.JG[.JM\F.P8HD9:Q*C,3!<J>[H!7G"E@,P;RO%NBYV`L[9A*;U+8'8>
-M$=",<W*3Y5%HV,<,NS+H_KUEMGH<"<LM_$%&2*9N!<!N$P-D6%V%O-]:U.,.
-M]LJ)?&)]UCTD6GQM2;17D78>A6="3BPM.=)FKCE,GF]/Z0$>CF<;2W#MMP-?
-MXE:RCNI"3PUM?BJF@S'/-Q&DQ4LO2`&]OV7`NG89G6'*<Z=L4W%XM%5F`ZWN
-M'(Z^5LN#H-^&50LFXB%<<(%.1P_T_AO`\N@=&"K@0.<G%"_W$^*L^6(CI;`0
-M2&@U%#^8E>!%@QPX_8M&TTOU0O#6X%@X*9YN*\`0\]C3;VEO5?R7+-;,"/?1
-M3!V9+$OIHRF)%@4JVKI>MF2IK!&%#/BYK6,4"OR<*((*V!@;SKRS[5'4'UM1
-M^*X[*I@8*4H5!.LXW7ZRW0ZUL`NFT/]_"43_,+A[SY"-U+?_215PLV7W%B')
-M/?X20SA_(J$)'/OA]RM?66IW$O0&E/HV^RZQRX[3D4X&YDV<8?<M:0NLK#)Y
-M@VRPT&60"U[CT.]9F15>[8U(=?.R1)O'GS+(?[?[/>79V(2I4%M>[\B;XI(;
-M>UOH<$=:F?^K^G!)`%.^$T*R(*Q98&#;\)8LY%&KJLM;`&)9%$MF+_;\@&/_
-MZS"<^?+284P..5,KF3XW]',>>_'/=)FHMA:DUQKPWQ3ACM]%ZN12O`.,F1"B
-M%L]IZ:--PI;]C1N]DE8!W.2/.5`N49MZ/X0#LC?IY6>1Y)="8+/6U-W^E.:Q
-MP<N@='[Z,$(AYG+BC&?L`/41TH*2W--IT,&-7J1R8^V_%<GJ"GE]G.E_JS?,
-MQB9E[2XF1U`NF7T/;N!FQ[X#)9U%>$?4;L2J9E[CL<0O/?&\=W^"UZ*>\8YJ
-M1=R[JS)41[%2[N7-\(<VNZ58L%4RY+]Z/43`C4O,STW2]S[=\H4.H-Q6!5[4
-M#_QR!O=L4J?A-#=?Z^_>NBCTK41F)C=!\OC#=TG)_4%?"UZX(6Z9!^=%[!#M
-M_Y&,9\HU?"+M:LI;M/KQIRY93)J@(@5[-OY`6@DN/@5T/=QN!9X`,IM03BLZ
-M;B<@4\2VF""-2O`,:8L)Y#'QQ(:E&X]IRWB2D=`'P24^))O+/U8W9T>]Q;V?
-M0WQ2[.!DF4*'0_=()*+3W0*$I,#/])_O.X`1<9#)$!NY<SFJ[Z<,B%Z75XG;
-M/=ED0LC8J;?VO(Y&);BG7<^KS7NC)PL9B?'KX0-,,9F&9V!7.0VC&,J?B^0O
-MB`"XT8>DL<@GA=VH9(V2XG)^^U8)IL!3V64)K!^69&C8P'0<+X_9G%*`(5R9
-MP,@$.:VGB8G+S4/THHW@50$5E[[8M2J9?#N@:[YC=('E#AK/-;ZE'!/105)[
-MA3;W`^S_FXUF+G"C&RK'MO&Z@OLZ?MQ3-6\TX.O)9I:K^\)Z>"%-&>"W0^:G
-M_6K<Q&,NFR<G53QE>2ZO3S]<T[#&`LB$@1UABS&9AM0.W2_]7YJ`X)P.70_'
-MIRN8]).A+7-B/2IM!Z8^\;7!?MP`S-"BF;3/+K`5SQEH+\/AAA]X3"=BJ"SW
-M2\N[6&QMKWFB]>#B<VT>CY!YHHNT^D;"5WV?^*3H?Y;&ZT^?+#W5DFXZV>H%
-MK3N(QA?NV`2/IH,G"!T?#J0OF.),$R]C1%\644RQGU<F@C5!CZ1VBT=/RQJ%
-M&^O5Z[F0J99<2@9Y=6(^G,W+4V4UU9;P.2'V!?$/4*(S@AGG<F:\8,"J-V&'
-MS;O_`N:""3=IN$%9MO`W`(DZ$VT/V(UQC9HK].=_GOJ;IAT"IS"WS:+4@M4S
-MX174X`I57\`.?,7^$@0@_<_(VA`:T7STT54>V-)N!98\1@@BHXZX_R,"/PF6
-MWZRCBJ6S%<!50F,8`6>TU97]$PP\I_EPVNCF`=@H#N&.S:MVS&*Z^KO\5Q>C
-MAN5V0:;7-329D;ARPF6V2!Z6]N>(_WF%WKD;>%U8\&_7`9;YXP-M+#"^_Q3B
-M?8WLDM6;DI`HQLLAR!I>#IJ18V9C.EE6Y,C7_DT\;;E8,J"^^<L>8QTA0"*:
-M#24CSL<WOT:67S43;8RB%TJ^UCP6696T\Q@-T)18_27N#LH0M%"2\'DX9[(H
-M44G8!H/>EW*30NOW;(Q!`.^Z/8XUXN5$)4.P@%J]-GY<7YX7X;-8)G[E,P:&
-M"X;?TIASUU.0!W\J&R>IAV29$;:JR(=??Q`AR/^F@OP:#5075."V$:9:STB5
-MJ33+S@5HU^@M,[3A=E(B*W@VY6_*B',K+YB>1EF_AYM'+#O-+LR2@F)M7*YS
-MFZF7P*3S@9NW;U)X/:U_G7-E):['85.!$>?T,M[5B</2Q$Y?7`]`]P-*+.U*
-MOSE.GZ^*H=;4]D(#$G_1U:M+CE"%TE]%[N,7Q+)#WNC-UM+\D;GN%M->TT\D
-M*^S%><=W71IC;>;T;WB8K<R?F4:3N[!\*C[$3AJ4[Z+B;K7G=5EX"!8]?;1M
-MZGWTHH"W,IM+WWR3UI^8M)?%RW28R,_6W1W$K&YE0-8ZC7O:L:DM`JNE+16T
-MNI;F=L3+P0C9;;VV@K5H7"A-6=S/H%V*X\7P1B%VZ<&OD(O8:1@\8E]`1:C)
-MVW9"->OG`/_,%`&_".+,6[Q-;QV1PFHM4IZU[/V8"QCQ)/_P=@K\ANJ]Z!IJ
-M36&\\O7?&Y5VU,IL7LF3IZ/JW]))@FWLTQF6FNR@[8Z,#/P/&M_ICGK?+7`&
-MO71'@>&>'LL>$Z[HSQT'NE1E,/!&BMBHY,`#&6QHKX),+&I@E]68-!'4.KD^
-MB2+Q$-),>#T[@M+\:Q(T8'[,I9^CPW14-[^@VKN?L*CO%]K@0&2^G;_5".S[
-M9/F]F$!F*]3XH$$A.02;F=,?*1<#!S@]461'WP`_GFH!X`5AC*A-9>1?_')3
-MWMA\R<>?HYDHC@7[^S\0)8PD0$9PI<'7YRH<9F?@=PVC$B@-;";QZEMH_K-%
-M?=2SM@<<C1WS7>YO?\"3(6AE[`$35<&_NDS)>?NN"4#$F78>>.^E\T9K,G%6
-M((S3T\'RL+<ILE"69J2($U*$=UU(7N8+[9:\29%EOV]0Z=EH&(+-?CENEIXV
-MT\O=&O@UD+V[I;*LN`&-`^RR?>($WNUT4$5^H=?DC$3(9$B.WOMJ**U'08Y)
-M[(R3]!&,+6"/D&FI?(49Q8RT#%06P4N@V-:+K&8;!#0>B-J'_),>#*OF4ZE/
-MHO$+6_GSKPRCEK@<_]CW;.NNPP7+3@UT0YPG?=TX]$TR6CN"N\N:29NOR@+3
-MF@GH%S-*/;BVJ--4'E-GV%)0"[Q9NL*(``!AFHP7="J+:\CI^H7ZU#B<;-0<
-MI43VI06;UBE_K\SR$3J5E@HU/:$,Q;:06("EUL?II)K`$F408L1\_>IC7CJI
-M//EYLFU`YFW/>R$G8C.P/TVC<YDU-`ZR3$<1'FJG&[DZPEK1:'DYX?/V%8]?
-MGW1R[['AR3E](9PG4LPR17)RQ)<[YF0FA0('Q#/\JU?Y57]">.!R<RPS@*(.
-M7G8K6K+C)D4MQQ=54QD:<8-NN[C?(=D&YOK65UN%+=(3CC9P(X\[@,#C]2LC
-MID[&HT^JN)MS##OWA!4V0U+`%/%6O"@F9IG[!H=GPICE7\W3]4PA=DZC&R(O
-MTML#8]V#]`UYJ,(_IW;E%0.%X'*4D6:\9[K<ST&;"=V9>>[^K<]9S.4@MK9;
-MAM`YFRC^7`_O0;&9V<0D)]W)XJ@G3MXK[M@/Y4\@1DAG7@C<6RUAYP82!S9[
-MMMD<(RBB:?^JBXN&9XE3ZG@8C`W$HM\!L3K/?G\5A.M;U[K7K\<&9;*S<CK6
-M#(T!^1&-)??RE]ZA7!^JWX+.60YHRQKN<I3!WO[@EG?3@-L*?D@I\7XXI*8(
-M&G^#"#[B%IPG$#G:4G%S*B<I.4:#?E2^5@GAP+4]5@V(C%NJ>,T^]JL)A8@C
-M,O3W<.[D*=^VERR'"#!9NK=W2T@CFE,*>2>J#OO+)C3\.#(0Y(<+;EP6C7(B
-M1">.+SON/',;>Z7;MZ&]U._.YJU(&)ZX)5PB9=2JU:7GE.4/G3VL.,)6Y\;+
-M2'B^%!^LE=?/6'[."2FK?$'<2#4`S7>/NK,9GM`Q]K:6G9*ZM'PT`:USGTL:
-MCG'::2>[.(0`ORUR^U6\.Z479\P*31-O)"B4=:O@0-OE99U]R)KP'2?.11H'
-MDR%).*6*.8SQM\9[;SP\*++8Y$W"SL,_M^?*&D>7*W/6D0"0I:#R?$7'Q1:O
-M5/^N@U)V%/?Z<LR?AKI%X(FP<J^/<E%_4&!.(#*A-HEUDMYYG(+/!I@@P:O4
-M4Y9KC!MD"^]Y?6P:V5L,81Y/X!P8.-%Z\-2]9B\K-153H[#7O%E2-`:$=Q>\
-MJE<$8^ZQU.6*;5_!Y*8;D(!3A#>%P3^S?/LF%7KSJ<>6Q^#]:6.R77X*KV[.
-M063OZ^SOP(C@X<E!7U=^^"Q8,B:B);*',*(2CE*(=-Y_]3GO6M6=F7I%!SI\
-M_"GI>GX))<3;)*D<97G?/B=APU.1MN4D'\Y.P_;DI(FD@78=P(W*-$E?2S?3
-M=?1LL6Z)MJ]EW/1$K%H55C%WA[2"*(']T[]&QJ;$='7"-\Y!8N`'RNX-6+AC
-MQ(4NEHR!&E$HWFN7,W1Z$*;A40:L>29)3K;?U[5#$?8[Z7]D4JYLTJ('S/32
-M>O[5I_/9!=$8V$0>CJV3DCMD<V:BK:H_Q>S^<&\!Z\CM%5_S^\O$%C76\_5Y
-M+ZN+$2=2#))A0`,FTOZG-3)\VNT'*(ITTK;GV2Y6,CJ2WH]H.;5NX0MPMB*E
-M0D4;YGCBREB@&0K2-]'D2/<E3.RJ+(=`=HO7Z@!RVTM3@D/`N"*K4+U!V468
-M`WIAG:?Q+YIX7?O0#G67217VA[93)T]C7?Y#ZH-9"8:5&_L;<"##T[II`H$E
-M+GQ.S[%I1IB>5/C&*@47!N,6T4?OU/>?2[FV,VT;YR_E`OP[E$Z65XB<W:3Z
-MD_FE'D88*Q;]&M>EE#"6L5(NK')ILDG9\S.%JYNS(:)0PV<"6\*]%?9MZ1_+
-M)8UVQPGE@[20;R8DJZR[!S7-,PJ(&=&X?P6M.R/"GX^UU_[+C:Y:JZK?1[,G
-M5LU'3,U4N3\7)3Z)'/PP4-1N(+X5QJ(O/.?O[#DED'JI<H9:O9!-Y1B_=Z=1
-M1J$HT^R-@Y*N.0*=;#^N9,?(\\0J2I*H\IM'IJPEC2=?!#V,51GK5KWOC^(<
-M;+R1J]AY%E.G+.<I(;,HG4/\CPQEQE;C-FEWWO[M%LOC&(>K](5,+$B/NPVT
-MSB5.R\.+]\%?T#_>&O_:>)6P)A;.*0:*\$)/[`2XP1X>"$D>B94<$DT+'$*/
-MHK6B[INHZP5-U/N!E.,(M-4*D"^<G0\[Y&^UIJA9R07()'.52#X-DNDMX?@;
-M(?JWW7PO[!-\]^$\MS)V#>KTSZEN/4LF\(F!$A6Y"A!5?IH'^1-Q5$.3;`9P
-ML=E>JZB0G!/0W01R@NP<L4T`X>&)JBBVTP6&^%I+;=FP#UH&LRNNLATUY#U%
-M7S[>$OG%FQT$).%%>H(SPG+QO-<,W39(BE3@Q[MP*CK04.A*3'].KEJ0"P0H
-MZ$Z%UJF!AC@'=^N,KB.`"PAN$3IR>SRN6='Z61#OVA,\RCC4P!:BXL20V]FV
-M069A;?]+K???AT5J0AB1/78:![V2VIXAKW*[(0'S/2Y1].W]?%6LZ$:.F)@D
-M.@2HN6?$3>VO\2NG?!&;JY26;;@[4)`%N=(3QM,O@YC]4Y)!_?Q\EI=&"A#&
-M3?B4M$6;:[?0[ZYBFJ>!-574*[$(8_8^,[R@8??F^%2+[AC]2`2R:%1CLAC>
-MVB9-2:3USYY68?L0O#JCS$B'SKHB5BP^CB#Q)S2=O9`H/)<8UOU"O&1.VBJ/
-MB6,W+5`KY"6$]LIJL!M*R!MZ>LN\SRE)H0,@/)<@K9#-`?:01;4!`JY/F*^0
-M%TL),OV[5#TU2E#ZBOSP[*2X0AT8;$WP]UL_BB'<JOD+RAX/Z2Y#E;H]5C#8
-M913:N<A3!HGVE-'\01N>\K\,$L?>:-)7?_\]Z-$%+T*#B7L%K16W*3Q@KX\R
-M[=&RL[$HP*&0<'@XVX8N88`*T&9"<TW\LS/9=.VAM"#VC01STV`*8)ERPCE[
-M\=ICVJCNU/\'("G=%U=<8STI&EX0[AO`*B>DT=N"!$]9)9[+7+_QL:NB0IH,
-M7D.1X&C/6YW\`;<%HWJ(4`?0G!LXOVE,$I6P85#GIBD%M5B7\S56WQ24'VGP
-M,I%%4#P+LOL9UEM8OD;%">45A$0]"?<)=N>C<2Z3E@@>.:XJ^8SG7K)Z3?$3
-M!1$D%))Q`AI^5RD"'32JG#OR?L%EK?M2>11*LJ]O7T89/@7]%`(OAD@K#DS$
-M0Y\8MHJW4H@<K&)$3[C`W:6$4#VI1:[R'CI1,_S1PH^-F_$C\+,\F_$M)K5'
-M->]"KU,5WRP#^?J=XRJOFDGO(GWS(F`JHVMN%2,[]O0)0L\*EMM#6T9`X9+G
-MPLL@/T#LS+(EYHTO$8PI1%#O;PT07^XT,=QE0$J>^DBRK]7+^>F>@`S*W'*;
-MA)L)4D0%\[%DGPC5(`<%,_*X3J/JT1UK5*AX);JWV:WE!8CY>!H427/RG0[A
-M)A;J7^;_1/CZ:XA+.*#&BKSAGDGR`FY:4/()"GMTVR"3(LX-"A[/#:O$BM'N
-M;P$!!8,TAEHM/0*;ZX)2(@P^H)GNCS_C47C'+2<.##^Q-7+1LA9@IWB9$RQ7
-MH?EM%*=/='DIU\/!ELP]ZZ!._Y;R5U:+M+.P\*ET1Q.D(+D0@:-\R,9QN/CB
-M_#V:Y))'*25-#,2"=\H,;VR\K/EVCSG#$CT!^^=0*B,@\;$_.B+(6#A8C-QJ
-M13",G3^N+'"0EX"H8.K!;?)H[?+B+FY^?AT)BAS;'9J.V&.O&-NZ'&&<7NU6
-M0!R"=(YJ,%[%OC5;Q(;YS`V3@_K/%>[&%=VZ$=2^"-`I/Q[D@*SQZ<M!C3?+
-MYF<(P&4-@UOI!/J0'#K\D2H)A:N@Y$QKJIK'^(LN-:_A6LA_A1<+/G_J4^0T
-M*KT"X1O5>`S'L-E;5QJE,WF]?2*?J<XAH80A!`_[9'U2_*738T`,!-F(UZ!P
-MK</'M\0LO&*I@=HA+I\W7!.XT-Z3H,""A)M88XXZN_)SNG]KF6B2=<BP%A1P
-M"Z^BT(]_AU@./2O]Q::>ZAHQ.;P4@I)*"X6A<.?5'2L/F/.U>60U1^95<O-=
-M_Y4O1-Y@&?08P^P\^\D%0Z5',AU6G66,Q`O@X\)",^S9ADLCYEGLF34<UDKW
-M3(E$18C-5ECSI0VYM6[V0>SK*##L%1&,C$=0*"&W53<8F5OW*+=8NW&2<.81
-M_B#WP!A4;V1N=V$7!KKC1,EY^1U#A?HX!J1HC=3!1Q1I(1-]\57L+[>S3G0U
-MP[.9>/SN\2LW%EF/3+-;I=P.Z0;53RN&L4U$-A<*_XO6FV'2M%4H$WOU.("%
-MR>^/(5./$N$EF(;G,D1.I+5-6DG";Q1*G.L(>R+U@[-OVJP?/G;T:ZGI!-T)
-M^9L<Q=QYU?.'&`-C5)V'+8Y9:ED^K'.L5(3/EJC.S,:N)S^BRX65G?):\<_$
-MTCZ(1)473^V728!D$KCV?C%JN&TV//;]$E'QN`=]\TD(Z]>+)PRXVC]'.-+N
-M":Z&YO.^YG_@MD>^$`K"E)L5Y(O"OE--1I[QQY,,;)L7P4UIJ]QZW-VIN\O_
-MOH9AJ,DE4E";LLQN'Y>P<8'1OVXA./]1*R0W0Q>?82E-VKJI7A![FL*_MAW\
-M.^&X%2"B40I[Z5C+>5X>,@J:!?=#U98#MW*ZG&=&HW(^<X>G5$L]#7-Q"0K6
-M:Y,TKSFNN$*<ZGD@Q#FA\*^\`O+AM^2+3]%/27*K81K+UKBF#2K9$60Q@ZF2
-M^FP`%UC&]Q'76K(VAC*6)(K+8DSOZ,5?\ROZ7"R9Z'AVQN[46^G&O9Z>-K'=
-M^\905W+ZSK<,L".@#=RZT(4J-%D()85747/N\I*_SA5<H3N,32F;N\2;$[EM
-M^D*5\Y@.R0\DR8-#*)N^FG"\!WJ?IO?W9C#=NF1=+(!T15=:PUDRSZY3UP)7
-M#<&/]U[,,Y_<P9XQ<("AIR*2/-%V3$\]Y#CW2GZI'7_1"`[<XB:RZLPF2^2M
-M]WI^VK[?/.+43@1)QJ3]M$D<M$T1-0\(T']&Y!D/71^I&TRJEFMJ0NGY+Q,F
-M&DPO-[%P/E)H%OS\4EYQ^UHL6_L#%K!"8S_\=L['C4ARI9`QK-1'K8L@RZH;
-M94P[9:&HB'NVW*(<JZ00)0PF&U,>TG=51T.0Z%@[`=0'=5*CZCG@>\B'24(B
-MO+AT'&_:&CAU7C9QS<EU(_1P+AA7)@=;U,(:V`'#`1"QO.X[L)V+2R'\0^JW
-ME?K+#VX!_(W@1;K1-G`;*(:@NZ-,S7).68(?3)5R5*1\&Y1\6/TMD</VY3A*
-MRR'"TUP&:W$C:?)FW69.N)@P+MK=U1#8X311,X;JT(-&,+Z$&SX?@STP&3>>
-MCAUFI!&'YH"&LLK`#O[)1>/R>(CB3Z(Y!=]IMDZ6)D0><P%CN]@\A0<?CZ:O
-M"B;C^F"ADWFKE$I-ZMMJ/J9M&AR>)X*A\!B"#D,[TVJ1<M+6>W*P<Q*$U3'J
-M"^>)XRE*Z#"]-NW(O(/;\96:^L9WG7'U`>S4EY5)BNF46"3?#_]U$'E)M^SY
-M'Z6#DZY+.!O!VBSP,U7')F2*('I"G.E[#M#M^;M%@%;ULD['(FAKUL1%V!2<
-MPEP?6(1U<*%SZ+,B+2;("V&T!*BL7B=,!F;XZ&A,D7B7IS'N-Y*>WC8_OQ[:
-M[_I@-J*>%LIZ7>"!TV4O2GR-E@;%F;&I;).9'Q23DGYT)E*D^_J=:TWN?`ED
-M=ZV%*Y8DHVN0.#L'K52/.<':N>>%NO"#RB`VZI=PY]-7DH'0:4,/P,CHS;;]
-M1^.?:RZ_SI%]]=8MJV@$R-2"[>=B+X\`\X:B@_&S7S:]$5S*@]E:R%*$3E^U
-MW/&.FMP;EVN.P;[1>Q81YMI-!Y(_.&B,.G*J8V6D<NG07PZO1GL<H.^36FG)
-M2-<NTF"ST9`9@.?_1(E.M_G/))TF@AKD`EI5;W?89B\M&-U<#_N_XC\"Z4/&
-MEU,'MT*[@@U'#'OY">/V@I#>W^T0&#+#=1NE/V4%-135B=\J=>_;UP.Y^CMV
-MIY\J#;&84,1:R0#A!"3(AQJ^=ZYZ0(Y`?!&QJ)0$AO/Y7AA$(Q[>J9^TQ94=
-M0I.$&<>`@`)#<!GNP;4S`(@R_'L^I[13@H$MI=XF&V@O<,^_(?R'L!X.RW\H
-M3[@6K:!O!&2-\3J>T3)7K!M4&<ODGI(0/<$YWIS_=3>G#"_)?F42M&.JEA9;
-M/@E@%B;LU;.T-1DV31Z*]<E:]Y#NS/]ZVF?P1;+!LR%"H4CZCE#]B)H&]ABP
-MCF^][.&E1F'>/'(;T`YML=8^E7E:&(AA/8[`JVWB:FKN1ZRQ#]T]%,2M+)OS
-M2&"?(Y<R:$Q/.*]JGFI"<Y,T!XU,85A,.CN"&W/<OS'>GP[@7I0T+LQK9E/T
-M0'R<6*$"S[CCF*@!ADWK*?2<=I&O*$[BBCWM(5H=Y$,F<J>J&LP?C0`1LA,H
-M)I\L]H?@VIS<KWB'3!;](IBJV&,4U6-*/9$#`012#V*91S`X9BP7&4%6'MDE
-M:E8Q^GCPS=!>-7RNZN6R/UUS@:]#4YP8AV2P4HH]-'E$'J_*1S`(,GU))CVD
-M`^M,L>.\L1#A)Z?LH'3-+O@1P*TQPG%P1Q.)D6*=7515G.?OFO5G:'F=TR](
-M%B6OVS1YJ^\F+:FSB!(RU>.PK+4^V*6(;O^;<;&.^DZRJM279=B[/?KN0[0]
-M23?J`2\@;Z:Y!Z9&ITH*IBH);VUI&-J$8HUW.]DD[_BQ=)MZ.KE0B%W=%VY$
-M06X0\:L84:KY?NFR#:R%B8\KT7JC+P:GDET1+[I;F<'OERXTKD^>2!FY+P.0
-MS&O2&`^A)F9C5Q'A_FG+BC:VWML$WNA>H"]NTQ2J2T*C2%RXU_6K@ISB8E+`
-M@3V1(&%!W@@D2V]MRM.RL2E./J!(2R3;2".Y$MFVOB&A(WVN#.1I3MP3&ZHK
-M:/,<H4V/FYDDE5-):,?,_;^9BY^C.2(EY]RR(I&X<(!8"[?DT[7)')5KH)(;
-M^-?WNL_#AP[^7%N>D`6;^UZ22UV>XI9)C]7B&-A?2@\K5O6PGY1%61B]7U0?
-M9KX;>)#`@%1NY'E#@D?RGL&G@F81?!3HZDI*/./8"WQ=?"HT-`+CM`?^LD<U
-MIO0ZJU?'YI/IF4PLU*492$C(KY($/+/J=U(]"*^ELG,WIF.M!M?"96FIO0R/
-MZA[3<Q,YQR5WC\YD_=A/8+\H`P"#F.#W#>M)I@:+#6Z+-G=OF>,[PJ8*=8).
-M2V3HL/S3"T*(E>%EDH)[B.:&3]SO:*7.^.;3`(I.["/07%NQ[X`9=//R=H+Y
-M,$SDW3'4#//OEC\Q8)W8TIG^A![8H-<CV\=MDS]O1S]F<_:RL?S2;H4=+_>.
-MAP*T4[U+/?&68+@(X/_0HP1AC5_X+WB+N@0PC$-DJ%_NO*0^@CQ.MJ[-BDSX
-M_>K]WX'7QF&A8'&FX0K_94/Z@#*MZJ[M,Z(%O#'GXJ-2BC5QDOS)*C3!#=7!
-MUD)]N0K4/=J2[`WA,,>*_9Z<?J.R$_/8=-FAG*9T7\/@Q+;[G.?_N<,:X.=V
-M;"665>G#[SO(B2-7C-!;=P3?0O<P/VB3*:C:2:`'^;Z<X'W='UBGT\50@+%@
-MSD@^G3Q_RD\&NI>4/H\1)O.2R;DX?"T)NJ.,D9D"F'-'#JOTE3&HK>QL+@FY
-MAZC:08VT=@E]-A4<]<&+1/[T7!/W&T9C\`)9S/^O>K(DSQLI9OLM7E73:EJJ
-M`A^U7+J^:I;B5&MQSAXWA[[A3R&TR6Y-%TRPSM&C$,8C(;R&`-3P,ARFNR>%
-M['<!KOO[XIZ2"U<<W.Q@Y?0QS!X?N-^F=-I($$B.9;(D)<CD=&KBX@Y5`2NO
-M6>C>@%=1A&WA;(]6;;NXD>DTJ7FT]?Y-,9':4]M[`!_\YQ#E4NKBSO5I--*$
-MSJ`'UQ'8_??-^)XF<'1,K=<E"Q3B:\)VZNJ'P*'L4M?U?@<-^'K64*^^#RYM
-M&M<'9LUM(`3A-,33)#;O9>1AE,`KS/90:H)&5T.5A"*>?'`@AWB<6UC5KS%F
-M"R`)BS>1CU!\L6U1CE*+>_'JK^!+'R>IDS\CC-Q\G&>9V3)"BT0KU]3\2']E
-MT`O!A"1PL7Z8=NR67TE_J.^8=B:R7G!IQIZLT7Q/OM81H!>6%!A!.XG<0VJK
-M[<7^%4M6$>;#;_K/YD@?YK0<RBR8HBB)7K5F*65$6U;NR:U#)7FK++7/KAO/
-MU+^B`JTG9.:SIK+_;>\:0E,/9\R_C>.E05R#Y2^%PON@C2BUPWK5$7-1_8<Z
-MZX0<0Z5O>A#&Z%32OQE7*:6Z9_7PP[]/`ZY4)[K;BQ+S*D09)<O_"6`[T9G?
-MC3@Q"P.HS,)_RK:8\:`XGRH$4<%H>QR)IZ`.,4+#OY'Z!(7ZB_JQA\7O9@$A
-MGWOX)PM4$K_E!B'=<,X6&8<#J_R4.\8?SH<,H"P''&$M$/1:@*?/$D:!,M=Q
-M*J>59-/VB+Q>9RM)-0(W.L$ALXT_D+$K46'T%>:@#D8+TNGQT9]G0R]@7'H7
-MW[AHE.G\H=UAQZJG]J/\S3Y,7M+T%@99X""$-FP"<HG[8\?(I8L0S=V#*4<,
-M8X.Z[I1?>6_2@L+DIU^!:#)Q-/7TD*ME!VI*(VG`$"E_F)S:AO$P8AU,KE0M
-M*V)&!B\8A`3,;($;)@Y*]?12`;H%TLJD\)81!ZB.'%C_X4R;B[4PL%\B3)"<
-MA/VEC)5*4U6D^]$'>(2QM6>;F[$@(S=X7]-B*S5^0>)O3=*)RQ.JBXXW/>W8
-M(_G'7U'@?Y>XL3W1*7@5\"GL%?^&IDE"W8NKI@-F$?FMOI@&1%+P4#19YIF&
-M&MCKFM<W3B@4X>SYF)V97V0D<Y0-NZ`\PDZJ<+4X3D`FHQQVA&FT>E[>F'ZT
-MO-ZNO3JPA7/-$'80?R>*)^LBB]I_E9EPY2'/'=Y4H\.SHK.6T23<AQ\8:^(D
-M:LHL^][PA)F,4O4=I69&4[M+3OO:7W(TR;P)HO<!T%+$5#M:@>SD-A)?L[T%
-M)B(A_JOL*G]*J>I8,^ZI2PT\.4=8<N4BYQKO\LJZ@VLG$3?E$.!Q(]F-[I<C
-MSGLA+JM%&7%6L6/M%([/(@DTSXH:=`<\GR*-JM.>GO*?K-P]%P^+H&\.$V+K
-MA<2)%Z"ZFC%NT7G25G)P9X*%U7$CK&RE<]**F\:FDR7HB?^[7A(PV6NL']N\
-M\\TCV3L-#IM&YFP^RFX7LL[ON!AB%6ZX6K<]#A0K_!TT(EJ]!R-F&`R'+X)N
-M%M&V&)1WX4&8OJ<4NBU?62R63<M8$/K*V`PT.4`K8<W==!WRO3V;\7)W-6Z,
-MJF_&!>YGHP*8.0L<6!#?[')QR<$YZM()?;#&9'KC:<\<^YT&[\BY7WT@5)@5
-M&KXE%O@,4U_C`UEROV2PF@/:%MXWB7>0M:(^_IAY?CE"BR8>M_>>0*;M-_LR
-M%@.!&I/]O$1FV\"^+XJC!5,A'QC4NCD!DKLZ0,DV48A::&C8FR*+8*9$;JPJ
-MPTOQMAM'=X"=CF="QE&032%W0&NAJZ68VJTM9G:2A_Q>=PYD3R^U9H+>#EH'
-MW$_3XK5%MO/U5CF(\PA!8V2^;P,0:VT(#59+\7HZ3!73OG3^@EY][M>_*K3.
-M9J\,9.I,3U;SPR;O/)U;)$=N#XLSEX2%.+HWLD\L<9G5LWH6)<C3+,B#;AY>
-M#6/$)=%?%S<G%$68XR2>%9E=$FXN,MZ)#MER1T)$:.I/^$](E5BI!4->*J`<
-MZYE!E:)-Y1<24JP^(7H7X24=W,BH?(A@PM$\%6.3C9/I!_<C@^"1-B7=.PG0
-M4*V^SS0O0#+7A*ETP@E3GV$3QV:6&U"92?U.NAXR9,";Y-*[;I,W#$Y1R@&'
-M;)BF@!VI/-#^T`^$&0G2M;F[7!/[K)HW9$`KEGQ#E;@J2D_KY!\]SM<`:97)
-M_-:7^]D5@S3G?1])US8"4B>D0EDR<X]0`D84K--ZR*AJ_8QBL*#=A5QYHV+=
-M<;G/@^:"BOH4;88-(FS"$E(NPRKPO[R_/CI$1*W,O/AV096X]>Y_8L/Q<,3^
-MT,3\WK-@[I:BRL%SC&O12WO0%ZWD`C9KY_%>(1DIN[`:**V3K>%+MIRA]9CP
-M\2?%2.#ZU-E/$.*#)D5(BA(O0.+QV%Q9_L9[\8IY3_\-51XB$S98P[W12,N.
-MC'(=!NQX==7T%N,28.!W#3:;][J+%Z(?^>W)G8/&EBX$=#D%LU4*?4EXWYR=
-MI-J^?K;*I;)9^.;=/3BV3"LFM>-/A5'_(GV-[P#:;3YQ0?O<]>?A7#A+8!VV
-M?K":T;%M\=@$.K/HUO`0;7I=%",7&A\$??>;-@TJQS4K\4[]>6(XQ3@W(M)0
-MV1QO^781R7\*7F_Y7#C.9<\Z31G,.=XN2GV5A"?-.'\[LJ(>#+(VE=GZ0O,=
-M*'5(ZQ)6M(Z]_X\_-]2^7W57K2V*O!M6CEO5,2/.D`TXJ=)M>:C!BNU9BV,"
-M7@D(@JHJP/W;R'8YI>NZ)8`D^V6>4-TAF_?W53**LWW-_AO/6@#H&/]%7Z)K
-M(M]>M.^4-`BI\='%ZI"/<;K4-9LW@#ZQ?\=7S@TJA9#OR1C.>;!NB)X^S$2)
-M)N7Y@VDSGZ'=S2#\JYEZAVU.%=D$`N)E8>\*!TY>LO9TT:^I>O?,,62.%-U>
-M2Q_=<",1;9GG7Z$`,4R^\ZUZY$`%G%\<V2Z0[B*-LDDCHVUP#UVP16*S&:FX
-MLZLN#P<\<W=/<OC?;61X;T7<K5>76!/P1_<>VKUR48+X\>`F:.:0#14"27Y@
-M"%LYX^'%3[:'XQC70IC"Y,OOTK+B/NLJ2ALOJ((6:7GR:;<A)R*N7GP["0B?
-M81V^YJR6#400=LAK'XD`9GND=P1(7@X59WUWKZ1&ZN(FT<[9Q([FDJ'["LBJ
-MK:GK]1IBI`0M&;Y#O(*VMN;?4(O0IT;`+\?[;/"GXZS]QQ5;")_=91,[-E9?
-ME[;S7ZQ(I.?WE.BF]IT,P@RPVO1/.\#YIRQALW$B3QE6R,0,'^?Q*Y_%54IX
-MJ(15>2I)PGL"IE_0<IL=A6.M7Z"64H-OUSZ5M6>=#89V#;U.$WBT'+5!3A\W
-MFV:80&1R3M`&Y@3G(,`H!-]Q:3,[BN9JZ$6Z5)M.%V!L.?4YSH_OZ$(\2'[!
-MUF[WA:26DCKLP'7Z,L&!"TB4=U7Y2EYS:#C/40BS("*G0*BA@W;SMH5Y!W>/
-M&.2^%[B:#!*^VYU'6'@C7%X7&5]@1@86,_TO])ZW>^A_ZAEO4(-^2##A3R1$
-MR9PE1@7E2&K9/$Y,C?'P6N3(^,XPF"E'++\R0.53UJ<B^^Z-&%[XH$D`V#_9
-M3L.,3_]HUV&2QH7`Z^C`"OF:1>#C)#;I8&5<71SXTA$2*U0J6@4#.%@LM:.?
-M6C<:W'-Q$A_6`6?"*Q#F<N?1/L]C[:IG`M3.<"_QWTF/U2@&6U2J!RD)-('S
-M*!J9U!-F]$AXK3?'J9DX,NUL7I/'QL*&*K%4!JWWIT<`L_9+PK>O.C%<:`0[
-MR!C;F_SX/.>L:,&G?\?'-Y[M5]G$*TQ9Y4*ZTG8\^=-9%[QHD1E(MT@<8>T.
-M'G+'G5:@PC78'2DJ?8@Q1EZA;G"+ZTIUK'^HV.8DFOD7J&AP4>TG/V=`@KEV
-M^_:.7A#SQS*".LIK=[)LEK;J+'KU'>4^9IXV3V&1UA,QI&;GV,"\%RS'5F%%
-M:TXP/V%U+1-V(<*^/'R?-EA/D%;KR<)X!=MTK5L/-5=-[Y:IG"KG.]\8&P-W
-M$/?^NHM'-*O#36ZVG^E&X]&)JY:;8V>@22]"OK@G:VL;6-RCR_?6[5HD7Q+F
-MRD(.6ND*NK"KMF:"V<@)>^W<`:NW2%<!,KUWLCB9*>B'V+T2^XO4Y$9HH*`F
-M%$CDT)_H!R26<Q1'PHUX)JS_R*3C-F\K<:"L54G@'Y.P1F_N]M&C8@?J*?\]
-MH;\K5O;D\"'REFOW6=%K5EF`^G.YHG%^E!U%@MODA:@AQW<SB"2K[6]RE%41
-MG^]=M72S?$4HBK;\YNJ^KN'ID`&=H#IX>VRZ83(_&(MW"E9$HRI>[RH>C@D&
-MN&@O'&0XAH5G^16_"Z5=Z\8-?G[(JJTSNP4[3/+:B.FC=VHB.TN5T`JU85;%
-M5W\(0!C->T+*.$A,;@/Y7GPH@``B*O8\N3)UEC_K"HJA.1*A4F(A84+,X'GU
-MW)M#C$;*M\V&;+[HE-[P:9D%%O>&%Y`5H,UQ=C#GMYR=YT.++;2S8O1@/Z/L
-MC%2D(QEH$7R#:>"(45>R8T3'OLI7=9&Z=KJS!->T*7T>'<CU!DG%JG:=A?NV
-M=_N<8NBB_9?D@JE[=_&XM/(C;B%E_``)X@%"I/GQ>XQD3#95QUD,ED"W'*KE
-ML2Q5'6(8G<@_(PEW[JS$HQ-E*4P=D9(G5#V_B+/512LGFDQY0S_3.9&A4=Y,
-MM\)YDA2*]$7MA-96'\?<?N7.:>%K:KK?`=#[;FW8>P\.Y>?DD1O/J%6$<PE.
-M`"I+8DR7^*;YCW(B.E3_J@J[SVYD/'\Q7R03^%I$);W'#/7CGJ-1F.0I<F%G
-ME!QLN5Q+8+K8H6FO5(#<BE@\LD;X]4,D,FYH+(7/\ZO3@;2F>;%%4$YG*[:N
-MB]LY+ZD[=CN%GFI>3U_.Y\M8]MBV95Q(^F!3./B([&VSRXV4K</PO&X<$K,'
-M6,+&!F*%+S0Y^5#7E++[;YFJG38N^]3'=1(U5OK]F5(JX"<;>O]%-VF6RH3X
-M;P.`AAS<_X1YMRY!ZCL!.^U'-!A";Z[+=$&7!A-/'@:N\/%8G'/@CP,2(OG:
-MTQHCMI7&%!7I!Q]JKYO[G:9G64Y_->0OT?/M?<]P,,F^F1=!EQXD>/FL2Y:/
-MX:I6)Z8(/N.D1K<RD;=9T'A9084ZMIL$:+\H?/@11J]2P-*RX\AX@;,33/5)
-M*,'+F7"PZT]`1^=5%:?A%C@";^+T<5-Z4^5'JB20I4Q?76$L1987R>G%\3L.
-M-^(]GW4\.LI07S))_E\";.TQ_K%]#[WQM?^/<L;;*^'TR+VQDL^V-2I`4GLK
-M.XBD7#=*Z0PUQLL^#NZYIP9KSVZ0\LWZ:J9^5/>)Y`2<-#?,])SX0_@&A?'P
-MOA.:`X+ZMQ2T,HIR+YRT&_@.7^8T\*$[VI8[PYG1PW3JB:J,H_\>2F1+)^:9
-MJ+I2QJ/+>H'U1UN'H:&0$I$31L_XPUN-_;X]B$/>*.U3*`$FF'85I,DK3'Z4
-M(#=V(O->FQY.3A@K$U!T8[)M^/;&<3LA[_$6\O?$;??1+&<2_HH]4J3H<+A/
-MI@#MA\3]9`8TR"5NY#HNF\WVP.\,5K1)2(Y:RA+P]I!H0&9O9GCL_<<MP71C
-M<]>$Y5#MQ56!+!US!;SY_7L,'Q+/@&N:5X[(A@HOL^-GWV0@%Y/KHLI_TS&D
-MOQDKVU%3-69(2X;FH!/+J+MRY02L]#6/-%9,EPWYJ3MR'#'4JOHCM`,/;DKE
-MA4T@M-`1SD/MIR0'024^7`1O\,VK9]M61(X,.N\@;K'56L)_4=D[9L`-=^=<
-M.40.1C&.D#>P[??J$]2RP)?-GYSEX$G#XRQ=\_5I<U%F>+UO'%I_P(BS.R<S
-M*D*3;W:]9_G!UKX[Y&QG%ZI)-A$Y0%[>(WDB@A@!+.@#D[P[EH+\$N+S!B1Y
-M_#87K?-,SSDYC6HU<'`-;W\%@+]T-<5^>@&T-Y$N3*CEOBP&_7+`,7A!&'7@
-MNBI`3S/#@"LSD@JC.41(M&V6!DJ5Y93WS'>C9DS7%]%AQ2+C.!Y)JF/%\IPS
-MS*;ZNV"E>GCQ>6%6HJH/WV,;!T%I_ZD$:;4\([%E4EAGX$:3*:EX``R'K+,.
-M75,`4\GCJ8$+P&969,>R_%&8S0^O,NS6V\\[_E@=W"*6K]8UO#3%<AW=+37'
-MA5G3.Y:?T=J4T3S!;6_:02Y`GTK8U>WWX"V9`D\"]^)9".509G:&TYHDUQ#+
-M68I2LLUA5T=U,'7/JA^$4T<O`;S2#CLR'M)(/\E4L6Q5'V%N+J8]*EO!_\W[
-M#W8*OI7O+V:`G`Q].2TF9TGM[<]>7:N>@JC0MJ2(8B!TMGWTC]%*R3'1JV>7
-ME#^7DS%XVN1OY:ZIK;6)?GBCQY`3MM[GO.ZLIU$)Y:"1Q4$F]0N+H$A!ZZD%
-M0J[&CK>">H-&$6UJUU(;:YMN<N9L08LFO;).:V@R%@_MO]X6A;B_`IQ].>-X
-M;N8<+T<GOTS^],Y8@&L]9^H%T[+9DRC!^0#X+G+JOZG\?2?AK8XH->U$QS%A
-M&[Q@TY<CW<T#G6%IJ$P4RH0<%(0=H?M,W67#M5>3"NM@MYO!.(\T,R.;&J+#
-M^UO6D&KG0&VW8AG346=;/O`OP3I*:7Y44VTY2ZHPN#YJ_3A.B6B8SNQ_T,RZ
-M0)[^/*&1A\?#3;1_9`&2#D_?!K0C=J?@W;YI%)3Q2U5F[*H%NA9F=0)^7,CA
-M5]6VOO:%S#N0;T:0FK;'#H/!<1CKQ[7T7PK":A.I4A.L0X<#!+Z`RR?=:^X(
-MXA@3>>K]976/^]+<2;5$5>/B5/8N(`H2PW2]51UZ_MMM\72HLH'3IF9B>W9J
-MJXE8+J&Q66<7:QAFA"^23YL@22,;-42U31+QFM_%8[E09?(POX'3Q9>EW-;D
-MRD:C^N@W8.2N2Q,1W+<(8RPS>&;_Z5;U+6N((AQL!]K@G>GX=^E2$6_OY.S;
-M.YK79C$&A#62,+JK7+>+?SB$(6].6N.):#Y):Z?ZV=#/7K$;WOB49+<T^^H(
-M6P3DHG.CK[&OX%T#B,TS7LSXO/@/I%/Q>A">>-JJMX;7&(HD`:ZMBM(FC8F>
-M3(G$?DC/G:D<IN0B6R;J%J]@KJTQ4\E$Q@[-*MW5!9*:H8\S>P%/N_K5N>T7
-M0'TC2P[[+$J3>!<YG'S#HT1#&:B.US]#\\`)WO%!H-?JJ/(.X9F<5C%%9%\%
-M>./)/031#N%8T0UM-WD=#(38H';\*&)K(;(:/4A\*H:WU;[[[/>0P6!^$SZ=
-MBU4B\3COU,+.OQYH#RZ/O^$2@VERP><4=R!A,+ORVNN*_67WBYTI`^8O.3-^
-M4+Z?W?4(;:_+4`,BVE&*U]FYTLR:;2<6$L,VPZ)G]?@>\0QZ@HS,OQINQZ5:
-M3637F5E&]#?)[>[?X5,)L-+^[L=D&3N0>#'C>KIC`<</JIFWU=-W,F2M\-74
-M%<*51Y+[%OK@-:V9W(W:)O<TP;3@J(K^(9-[)0%)]K70T3(V`T&3^IZP=)RL
-M\%&$N*'7WQ3+/`$8\F,+4A4/'#SJPM8M+GH-OKVFQT@I3R]D?#M_)6]\,UN^
-M-I1I3IQ0QE[N413SQ07()8B-/#\<O'@.W/2,)Y,$<K2W:)/%H^E2/]'C&:PR
-MLUS9-&,;K>A4`BU#MD*X7E?Z^1,+UX5H\,UH@O[D?81E#P!PQ7#J#Y+3C@.2
-M<C+)7Q(,2SU:T^Z'_ZK9X+:MH2725LXFAU/S(?*ZJ_5`I=GE@M=M?(8V(4A@
-MD_@`1(W91*MCK&H=1=%H.('D-B<B<C"I*3,IFIVC`Z)G+Q!NRU,<_A?YB_H0
-M=87-D6C_?811W#$[I#1O3EL>*JNZ17!U&]HJZ45+^@J+K_)IH!HA^O&"W"=/
-MC-?VMUWI5TW8`:A!HU-&DE>G>T9;2AI<Z)#-9,VO]9F/59&%S2O`1EF!F"NG
-M&&X%DO0S!Y2VW`WLF:J8$`Z8(S;.HF7/_"38F]5%EQ<^(I4\O9\18<3YO;1`
-MUZP9F;PKB?93I0I`6-)N6YC"IHP,Z<%50S:MZ^S@T#CM4,L=\T>DL7EJ?=8N
-M9?0STL$XD7C"*I+!@_[&G1?9DP(`$)]+)8,7L5N\PMUZ(1DZE]&9L6`G]Y&,
-MAGS)'*SRC.Q<,HE&@5AI)U7@4]]>OXE>R7.")N+J%Q[)<Z]?3>E9(J.40-%Q
-MYX[3(&5.*<7R#:1=U1;,/4-7'Z%3*-6WM2*RJ:RWMU['VZ/"5\&=I4@MA22(
-MS1IC,A-*9./T&=!2TUCI#Q4,MS4;Z"T5(5+UF.7-OO.9$,/%\B66^2.OR"(E
-M7,Q\$?O4Y)>>G67-K"DNE^DGJ+H#,_V09^'MAA7=-H/\!>*\2_VMFXE3BZ"+
-MQ?53B$F@:<.`-D(<D"YN\QGDGRQ'V(H:=W?[;X(?TC)S>.T;4NRCX-`P2UF6
-ME&KP!Y/Q!=0Z*/'KOB$0'2Y2U0/Y]`B:W7:C+-JY\Y1<;CP,NU5`1OD%\IM.
-MC@IB8E*9M:BAW0JY&YNISC<<K8/]2'PKS?5!Q*Z;=*X<>^MJHAXF9LHC<Z##
-M<*0-U`)^$-0J`TEG]2J7WK[XH$1C$9'\+CSNIR;`*VU>J\0`Y%]X.<CX_4QJ
-M_VFTL,:C?/F]<*:NW]MY!6+B9NKBW`_J6AW%QG0[MOTV?)+U@AHIOVS*G5AQ
-M/F^D]YV*\2D21)@KCD/=>GOR]YI!D/?SG]YQ:D6R_%ISD(#((<YT`9RYLV4!
-MKIBP^\5,C8]F.[NXACO5+SP_!+.MFZ5U'IY*:3>QW/!EII;\LB>:(8W'I'#R
-MA[J-\A+M9C!`DNL0SEW!,@^X2`PER<EEVQO5FO=-<U([>CA=HDA,3O0+0@6V
-M*JJF.86W+<`?&^[7R<W=49E)<=BO[.EVJYWJA$"(2/"Z&J?JWGH-A,&]#$?R
-M[TZ9W(IIRE,]Z"Z76=NRX6&+=0,-0UVX!]>:W>KH[E5^IZ'[^Z-GXK'FR"@]
-M83;T.>**0M/.?"VM2^V[9:\I[D[<^^K-L"".F9K5`V6,M1ICG([*SK0@^P+4
-M\+25$)KACNIG#>K%SV13B@>JY"FX990[XQ<U[XH,G$_\,P]*JG;S3U'\S[SG
-M?"#EI+4T^7%10XA2&`1$/J2SPMZ2$;PM)]A5`K[W:U")8].IO#]2+HHTDP&9
-MW3)&M@2F-"*_?1)>\0?\CS/*HED;ZQU0EEG1V+!H2[`2V]R_TF8GZHWUH<4-
-M_@$F2B<9L&[$<,*G5CA"'S%,])-/,)"P"OOP7JIK&2BH;%V)`@*<1P]"#_MO
-MZ^+=?WIZ@3R;9C6Q'%T0;.[P0*%V?0YB*_VV2OW'7NU]8U[F=]IUU,DVQIL8
-M5V-;^L_QVH9X=P^ZKB7_HVYN@=Z,!A&E*YG0$YA^LR>$FU5U6@5TEQCP>4>:
-M+1KYNR%F,<IVG,C8Y@5A"P/;K,%)U$A8\.2#RG-/3';R*^I44PA>(\=%.*9$
-ML-'.GD3Q[WY0RQPGH[>>6^+34A#JSZD;OG>&0'W37.@:%_.2`^HZW+PR:E6I
-MC8P`BK%EQ)$(\DS8]72O*,WV:9P%ES^,T\>RE22Q3,SZP9.O219)E7R%9\3W
-M-JGOG%$WL+S#^0D^T^<:7/<SYKN%$BD=#2K^&*#I(_F"ZZ&G%INJ&3>A7N%,
-M$3/OK8A)7OR(/.&E@9#>C$9<J<>C':DGF#!5UAUXPQ1;:&K6V=)/1[5R8V3%
-M<JRH'$+F:TG&RQ_D1`T6VHD@=AB=?'H?DFV]>V-'VS>6\@NQEB#;+6Z1]2<+
-MTCN$408(\F2I069U-5;\QO!&^"P60JY;')WZMF9K')J$)>H5D)05.(,5A`Y#
-M@K^STGC#E09>"D3@3WS=@4@V%3]^:K=*099J]@5_ML)(2)5R%C9LR?C1."C&
-M;5>654=R$E]&>5ETG'^GNN`F_F'U,"C6;#T:?2ID7^+\ZILJ^#+]%(9G>Q.8
-M)\4@.%M&+8;Y>0"['R4ZBXPJWR[4K'[/=YL]/MFH$[RJRM16Z_VU.SXE]JQ<
-M\F[>0Y$LT0K7[<=]QY9ES#VOPS'G0[P&B%AE%91SK*XQ+5VXO`@S57^2=PP8
-M_,JJCC0VMJAYMV`2@<Q^'(!C:[YDFBJ@B+(S=V<!_2(PG@+P'=..F,=>3>%>
-M/&75%:U6=J<*8+='XB77(T%`02AU`&X3(X)V0JLH\:#+!EGN+V%7PCO223K&
-M\\<FR)^[X/E_CG[?,VHDFP+@P'-Y8'SUZO_`AJCT/]*1[9[ED.&5*J`]3D'B
-MRA.\;EG!O8"L'U(29M+*Y8O$7?]TXM[A9AIB!<BN?U*LOI)0\Q4Q4DT'#K(P
-M)PGYU7#++Q.F6MN=QS8]W#9G)V%XR-BSBG4CM]ME;)GCRZ[*L[RJ<+@-MV,^
-M_E?#H]>JHI*C*Y?QMM7J^;457+JJ"_X6GPS(8W%?K&L`_#/,/\`!NJ1)9W.U
-M@J0IZ2JBJ[IQ5J(T2)IK.<&*Q$,3\9P502-.5#@PQE'@0P&K3G(GR!O*:"<?
-MI'AG%OX8/G=6PK=Y>*&$_M'V=4>5]:>WL0B%=IBA0VW,DOQV(!`XO$&56+A%
-M-'@(UJ[#X\-%?W:Y/:-KQT?H4RU+TD$*Z0R)>L`YVI-<^_;[G@YK3UM->H"5
-M+X*'P-6R3N%1M:7SP?X);#M\3)^#[+7!(-HR(/,F*!%&*P$/)XD'`GCZ$Q)?
-MCT]9M`+^B9&M2W-3'AZ]A?BMHCUK+2^\]2,(^9&-IV3F"OS>\V7"V'E^W-J2
-M$MG4(XVPQ5/)"T[$A7E)A'GXV$#]C-YU##`-\,QX)DXMX1!ULG95@'3WLY9Y
-MPI``B$/PX6^%V)49,>^3VN9:\=23IZP?D)P&QKVC(EQT-'MTV8<HU[489=>"
-MP!J#C9R\8U5'<:R>4;('\*!2;5O'[KWXI*B6B+%2Y+@T&Q';/:?SD6VRV&E@
-M8L_OJK](9*2)%N9D-K7M`+@3$1)9)%#()WSKC.6KBMWVA+P>_\;'#@6W9-01
-M$]A]N?*&`M&EJ5WMW41!_'7?C<H85YZ-8/7EG!-[EAK1$1?,S4@^K"ZI3P6@
-MU_QNC'%Q^,<=YJHOW6Q6KR)*]`V:3]CRE(.>B6$L>IPH0TDEIC&W8$:"4/AD
-M;WE'2=7ZK8:L/]2U(31ZY!8/T;-JG#"3;(ZY'T-4:831*027\ALKKI[J.WZ`
-M<T!;:Y7\DA]SCFG;["D%MNOZ/L=U926E6),*K2>?3S$YQ?`J4LUF>^5.2-&2
-MY''&AU>5C_'7(EY66S$/UI:S'X#%UJMZBM7<L*QR/$Y$II\*^Z]]DMO&G/GT
-M;6!%H@AD^\[>X^4@)%SB'V7=04UN0'>NS4Y#Y+V;Y!08J<93JOD^MNLO_>?1
-M9I&]?(@6C9!46X9EGW`OF*()ZYQ)@.S[J=KA(_YN)GAFLU&'J+WJ-/TTWOXC
-M0UC(JA.'[U;(X]`CQ`TU]_OX9/ZGR/U,[6!V(!B4QV?HJO/-=O<*#+:7&!"6
-M"4?O6(0VY'6K/K2VXP>?SR(Y@-QUV>8BUHT^;!,3&WY(7^)_1[G^*D"-0"I0
-MC5N)?03KW9\T2K3O%5#$0[N9>0$PRQ'BC3%R)K$:JZ#S$M%$6Z*R._]:D6_6
-MD@U*%7IN\MIQK"#BY>Y;X7['"QU;ISL&-"3!#KV2]N>5J]4CBLA6S$WMO<'U
-MA]8LS7MUH?+V'`2_6L`?@Z>ALILBA(;:9=-0O7=EZ3<7^OU)1B_G,UY:_WVE
-M!J.3BW>JQW!A0!%<ZJQ<8[L<<_4-Y-A`;J+X:)4H@SJ-A4`%=(PEELL(9TH!
-MV&S-F.$5RTS=M.+K1B[+$T'F:WB7Z;H[57H'UT.UMZ@AB^T97Z.W-DGCUKD-
-MUT@76$HQ;9U_YD#*?G6LK2X!B-SK#-GN>SE''<<4.A-U-?URW/&(9R/U,(8S
-MW9H2U/*T[0VP:XAQX,&1EZA>B6E_/J$+#TBE\T$D'9H:07+X8"']M?]>]0AM
-M_$TK38WWNO%!\C?M,7,ZE;XY@:8D_C>^`L,),#@U4>5'JVL+$<,'&3F.:TN.
-M?^/3L&1S5\M6/N,QQ']`?"@4SYEP#ZN`T5RT27W"F.C+.Q]^.K;*`.]^K%)3
-M26MBJ%O[!:\@^,JTR@^OI*Q,IH$6J2*GUD-XBCNE=U4N?Z$YP!EPBM0BZ,_9
-MRC.6-=RW%<[=D111A2<A;#X*%367!!1;5"O-=WZ"GU;UQ*/FV=-)5(5FI0;L
-MN1B.!\`G[;#>UYA"V(UQ.0:)<)P_7W:O"JYV-O/W%,XY.+6;,KF1/4TM:@PR
-M&.LB[J]]5A^`XKYX='X;PV:K2^[T]!^1I1/+&*LTTY1",]X\/)[5`$'46"$0
-M-GQ!U7\SC&<<E8HXY=AH.IC:1']C2VKXZ;V_I*_&8S+?%A6DXN[DMS$U1!1&
-M*ELYNAF:L=E!TG-^&1TP'!]QO:3UTVZ<.`F_9SOO#EX#0B+S7:9S:3,CV63M
-M.I=+[+NM4A%AI1=5:7`O(*;Z<(&T12X1;("IB#-EIK8J+EK[JT[=SL[JSP)M
-M[4+OU:,'*NZ24(+&J\6^^(IW:LEYK>&F3C]VQ'FFA(OPHCYL55*NZ!JKG9NS
-M8OM#GLVQN[FL'@`E@#_7!<8*HNK*2MXU/,D!WFXD^3C<2\.GP8KSA6JW[)JY
-M>+=5(],!U76-/X">Q./TOXW"KY7A]*GI>F%[V9.@WO@UEQK].'/0#9#3QI84
-M?`?KZY.B;+[+=-53DZ58:<->"_'0MU2\%0`#K<<-=--!K/[$99-LK-F-)_PX
-MP]-N9V6=2BNL,$>H^PTPKMI'2"-T)M"WET_+AU,IK^O!O_(_AY)GP#PAW)6-
-M\KU"A)=OFIK%,-FW2G+US6^1T]7GEZA:'R#>\&VM,=V/M:Q&<S(E.$H)RQJ<
-M()A%VUA?2B&-4H%(ZLI5=`#[;+H7+Z'UW,J]:$5`]%C.$.,_W_;KIRJ*/JX^
-MG8BH_+)7/ZF*O0@G%0GSGWBWQZ?BZR$E+GIS[FE8K9T_G;#;`/X=H_1W==A7
-MPF7OXP4IAT512Q"2=+<&UX(6A]M6(I2]&'N:"G%I;M._'(>K8X")@Q+!B.(+
-M;5%AJ+/?_V.N?G83%V%7+?RR4@7*H/C>3O%3+>"#E-G[IQ1X;6^/N9.Q0YO\
-M_IAO1FP+^0>ZBSB"Z@F/?V/UQ+)3^&)^_#)LK-K-,-`PZ:$+AXV[BFO(S!;H
-M%V=B.1`YARLHR?+"C8(ZR.S0?3?\+T-6[<Z?'ROB@;3"3DH:$KDLW2OT/5%N
-M,46(PVFSG-3.;A)VKUS3G<QQ3^\"].,["3=&8,&_P`TK"C<C9?Z/X'\]KKUH
-MKHT5P>S#`644/VYJT7C+`76T93U)=^<JE4VL`/=:99$QKK)%V$2ZK/9V4N@)
-M.Z/(!G>8&WRE*BMT@O77X"!Y+$N3"I9Q0D\K%''4Z%6'&,^FPB/^J6)<0Q'U
-MQ<)?.W/>+P*9Q1RNX2WEZ&WXU>Y)S7Z=@9FR60-WCM4<F=3<YX@!BF$(S)X,
-MJS/#>><>V/G9QH7Q)&&I>ZV'<]E'7-_69GIQ)6_>/AMN_-+L1"P2+RM?3HDO
-M6A/+VO.27J92PJ1$P%^KE6OJ">3AE/Q.`J#5[<%=J<//]*IW6[XG#@$C+&CT
-M#?_0UE3$HY$GZCG_24']C1W2=9'%^78L[U:/;?4-PZ4K,VT.+:C#!R'`$^1W
-M*<"Q\(\92>\V*K[SU^0,^LL!5'NH]W39N.84')"E2H83:;\OG::'@@5%FB6"
-MRD5DZ4:::]9ZW-A7\=7&K"*K^'^D,T(Z.,=?"OUNE:_KS_C+PTI;):FV6ACY
-M@UQ68A`';(UHWY4?KQEGHA&!0LU!DGATXJ\,2??I0T<=>8N[DROXK^BKY/@Z
-MA2#_+1MZ+]7YB\^)PY)Y%M7`3"89N:&'1KO;#H]:T,%.1]X%%"7?U`S@PFA'
-MA(+@]K$;GKAD6RR3)A^-2IL-5XJIN+C837'3F:NJ0,MI/&^AF2GB71"CJ;?8
-M*15-0>DSVM3WJ]+>BMU9)KF$=D9R=GJV8&$\'ETDAR-EMC85S=8\F90%L[22
-M[H\\[7.UXIP&56XC_$*\N4N1!Q2/>\_VZ88XOL2GIN:Y4NRL0#2Q>J$-!W1-
-M#=*\#&H\0^=<U`A56[(=7*&ORY%[-IL^1XV\_,+##,^%A:<3_CI\#!84SN/O
-M"IK/`?L2.LI*II!UZ-/J)0?^`-$+DZ"K-M/'1ULAE_9GH:^QJER'C?^0`IT*
-MS04H:FKP!<$*()P:R+^L5*CX>8`I%?T)E@]@W^X(MHIDC$83E;'<TD.;-$)*
-MOWB[,R=!E!5>T6(0MYA(RZ8(C$ID)7H\B-2AQ[8&>(N(X5`ZOVN<F7%'#8V'
-MJUVZ_WU[\7")<4X8%A"TQSE?^]>[^)X/KGGC6R)9XL`K`S:O:T:V3^J`UFZZ
-M"@CS#@1OOM_1?61Q8EZ9]IHV]13+7!`<FF,B9-$G/2J1N0<SGO)96T0W'Q4=
-MX`1#B@R_1PSLYR45JS,0(FLD(QI.$L_5=QN)(5'6=8):T)DMK\I/(GFX+`^-
-M$)Q8OFU\.-9:[FUHN(.<D]*$@NG)^+:MZFDMN5M3%@!-.XQ5<Q)AZ<\4LJH'
-M\L?'L8A31D&CX0KV*R$TA'R#(R2U";H0:)8R9K4H@F<$H2_D,Y<?D^#6X^B^
-M'(U^7%=QKRM2Z(;FL6R.WLP;@@)+[V/KHZ/\UZ6'QK]^>J@37X%5C''&VD@W
-MY3CX?45HY0<MQ,2!5]2?QG>B!#^9.%"DH@46U/N-_2JRE39#+(&AIQI9U_0\
-M9Z?V("HS"R``]Q(B_YR[R,.GU9#4U=1CN6`U4=;7@;A20HVT^R68B$\.=,"5
-M0\UT,;#'$P5X3Q'3#!(A1?`=-OY37%%>`-*[V2841UCY)7L&X;2;!E`?>>==
-MFF?1[CYI<"L:"9*ZYS9?[TXPY'3^O@CE0O&D!)'3KM)?=Q.71RQ1!L&&AI,<
-MSC[[VH\!+[(R;PV^#"),)]"`VLC9@NFVZ7>C<IA\G'R:V9.R_UHA+V\VU(SF
-MBC9V#3C[0+13262VVTL`D9A+`529%Y`O[-7R(+6O)6`$D[2QKQNZ\0[Y@M=S
-MZ"XGS[[\K"?X;7X&T@O6-G!4]5?#R=UC&$RSQY*;X>G19=4D\OT)/@U8P5MR
-M=[/>[:_]I66'W+VGHV`GH)I$_',U(`\RLD(EK4N!A;:NO#VWC_4N,Z<OU+NI
-MJ0%7.@Z+>S]*83LGAZ7(BLTYPH8$6*&9P%<^DS;D6V7T:.<;/40^7RH+CREB
-M2:$W[+R#:I>!2G=&N<P?^Z5Z(X#,-P!O>@#6N.<)NC0"(9))::H[R0C03L%I
-M)A<L"%B+@FKU>@R0C#*:-ST*-0@3'ZH6R*N4L4^\5\OED]?9TJ'Y'L<6;'O<
-MLG^%'`=$W#<^R",A=$LJ7=1"3KH]UZ"^>Z?V`-5UDL_M;R^R^"UCKH3#<F>[
-MV0HGI5CV"OWF'66V5YK)/?0#U^0]MA@7ET5S(`S='DOM'0UB_2;1A'4XJD@B
-MT*N\X*$T\C!*VA!IC4WBL>M"UEP-_;S?%0J6?8(YK%IW_36Y`4J_D9G<PFD-
-M-1#T/N0M5I^U];NI((MMH'A)L(QH%W2K1;P8+MWLW,84HHB!LJ;&N<13AQB<
-MY-K#(Q?\2G>$E@Y*(F<(R?Y^H#GLEPZA_F,/#9#<U#4#N@?@/W:#RQ4<H6:S
-MA:32R1>89QOR+C<DTQ>A_GH@[:7"1#(9:`3J91G!??HL/+CP2+U:W9PE80DY
-M</6#?GKN)6GB0AE,__4L4K..$M/#(Y<=M++7ML-K%&+7`&U]GBODNT@,G6%7
-M!>O=$5$^ZIK<,MB5=5]L=)7D4"*DC&]<50;V%UKI4$U*K.Z77T!+>W<2$HG/
-M)M[?^Q@>\7-\$-B>!.#4^U^_>Z"C]N:.?,POL]ULLC>9--4;M<Y'XWV38KIU
-M`WY7J0Q.`J6L*V,N8.'[8HYZ;9A/K`*:C`!.UG05@"N;)6V0:Y4-8Y._L7;:
-M-05ZIOE^]<0,HHOYU]J/'.9`>VG?#`>*44E*EQ>Y\6.MMM8<K'U$$)F30*L+
-M@-,F&'>>^#S>35D](AA%V`M,QF,DBRTE\@ILWS46)?_(!L:!EB=BHIG@)+XJ
-M`H%;T[K[QD'ZY2FI^QIG3,8#:%)HUU[Q*R:SM[<1$CS>1<:-WM=HH#I.W'/F
-MSY[M,>F(-K2/SOB&M?`,:\GJS]A99R4$!IKX<J:[ILJ3T)QV4FD-F6<Y6W(I
-MN^RBYE(P5MO7%.6-M6LF&&-WH'N&*LNW!,2I0W_^L]^ML&O/S"4=%67)KMF=
-MK<61<^T?J1X[?FOM"V+,S_SC3NI0OW<W#7\#6=4$17-]7",2?:O**U/>0I$^
-M>Y5MO%>`XR&@HP9LIUB'!`W=JRR;;]+FP2+[*`4V2)X*2%/A8V,6F[,#-,-X
-MUNI&EY&,_:?M1'FM!Y`?I(6A,)8):X`^5:Q9[\/)'$7#EB*4&:A-:XD#'F[F
-M>:GT/XAH8=!_$8VZ::B5T(^J+%C3>];#?=%QZ>O(A8&TKGI?2->]<V@>O[2%
-MBCU?4\X."`R7/3K7`N2+NJA=+\6AV]IH@0A=I4G,"2HLEQ5*+4PC0"E\2:-%
-MQ:@X2?N@&'&CQ_OII(D'=`'7&"O+0T&=(?H)&64Y%7KQL@^^ZS8).TB;8:HN
-M$K@2;R[EP%5[<8M::3#7#_2E)@XNPS"@N7;"PU7EC12^9?/-:+Z@F3))JO8'
-MW^PGAX/)M&PX$%?#^M\V,%4$J)2EXE5,F61TOJ&Z"MIA3I+21MI8+/,WVT:,
-M4U,-\6]14&&4,]='>T+;8UZ+:?B]#X8Q_YYQ2Q6L<_?ON%'<LD%7%`1G?P+,
-MYQ%/<=4J=M>_3EU6Z4COD!7FHGZI*H7%FSC&)*QO.6AV6GYD=UE2B</HTY[4
-M9V]U2>A=J:JFFIOAM)O&RG68OA>4X2'4J21'28,VA="`J&G`L`''_RS0_;&-
-MGQAXYB?'^_=*=BQY!IR\,AQ+?SM)3R'$^=DHWE23XGJ$7!*Y9(N>Y8RSY\2-
-MW&4<P(/F;8394KC<+$@9[>'%#4,M^)-6,-$T,O9P*(8MF=%!??\T<G,J1Z<W
-M:>(M_SL9^?OZ824<['@5H-5DBKM8]N4I*'NVW$3*(54R*""+5/6<3WGNN=6[
-M>7#7FX7TH,%54GCC1.)HJYG`Y-+\*#AJ(Y&A:&&C.F&D%VE1QJ4T^,]@F&1G
-M;`<9'&#Y=MC%!O,NGNE`<_?EO577STG:Z9[^@7#5='Z4$3ZYB\SQA**X2ASN
-M68;AUZYHBK&"PW4\3UP?CU$M)]=MW4>AD"/^UG[07EGT:F>'2D8`KS74"M[?
-MZ\DL%4!5GLA0_#Y([??Q3LYWM\YX*6!&='$,O\"&*N1EQJ\F_D0VE)&"#"J+
-MZNITF6'WH1\E_\%B6=,&7ZT:&1U=V#)DHG1.H[NA[Q2)@B7<J'W7_\O.O:?X
-MEZ"./DP-\\:#ARA@%0CR(NBM3V^?)T3Y>XJ\7A9#R4SN6R$1(#H:8MZD(M;S
-MH3YI5$]L&4R!)Y=N12-[(Y*1"BW#FLERNJ-1NZ$PPEKT\&NXIE+B3](.7EO+
-M'R*^Z"R#/5L\AZ)GV#+;&1EXLXK=1ITQ'S9PXSL8Q!J8DH32W&_\5%+U0U\L
-M#"-*U"!=W9J?OBODB41O;<MX*'MX`Q)M^VY:FR/U6?,=%:FJ+NOM+_3?25V0
-MU\&U09AN(+:12_R4@$NQ,9)5!#X80S%0I)-ZE^W?D*'\C6Z+WZO9E@.L^.W'
-MW0=.<UEV+=(2V,V#GHA.!.Y.HS%Q#IZS!MTVBT"?Z(6RS69Q73#T^=V,O!DH
-M`PAOFO!1'.TJI[=0I<$Y;GGS3.=_<0@N[_7/3FP-_<HCR":KL,8.GYU'H.7?
-M#\Q6"@:YF"S]!W0R[:0;#L1#!8-VT([`<5R;P=EZ?L`C4F*\/<.."%QZ5N=A
-M(^1'*/QC=U8\1Q>+8<4S`./IB\W:N'0!WK5%'7-Q?!G*:I\('SG`,:!D_AK;
-M;]3$6>&R4DUBOSEC-H"%8B:T;$)@D#M$P3#ZB?9<TEG?*'*[3P?!W]8GX94F
-MAH/$^7C]N0$\.!]]:\'N)PQQAJ3$Z*/=C!$P31&VL(CI@,6M9Y_[$B5%WET9
-MIV;)$7[:65(MP8,#A*W03<3&&T9I1IYA?*^SE+V4#?$LH.VU9$U>OH/A@PAO
-M!?J75;``+*RG6X2*;JL@=WI>(_WL$DYNRN+X)D3.7*B<[TD+/[77?O*EZ7QC
-M-!4A]R@&Z3Q_`YX64GZ;#,33,.?6:*:65>`(KSP4'<(*'^:Q/2;+;D;+>_5Y
-MI3\\BP7F'8J[X_Y6>8(*V>O$BJ(U@ZO+<N7]L=K2TM2%:VX1T.;NFNH3^.;%
-MI21W7?I^&@9V^_@-R/7OESYG(6.IQH4L4T%7K2*\4;J/,.[BEZ?>&67C4$S>
-M0A8@JO8)&Y4B64[1P@P8D?]I:C18^F/O\:D^>>TH=I`'.6`\K#$Q_",O.ISB
-M+"BKT2?+`XSJ'4!\_+"O?8ZB_^?7<%24:,)K&\6C7>)<76_.SELA#ZV$Z\$D
-M+:`8MGW_W/'U<EC2/$C-?3OO7`@L1W?:9YN7C\BKPV`H'EW*IW'>][&R!Y9)
-M<G50XN&]36#$2+,`<^Q8$"E'>$6>U_RA']J\+`Y30+%:-G9RPW?&1#4S<[3+
-MQW,_CY+))LE3^%IJ]SE$<!*O'-9&[?U-6;UR;?N&,*`F(.^/H,\UI-11_.KE
-M,F_-RBSR\&<<9C%EQJ@*ABUA'GX36DZ0L^<;`7E6K85A2N[T&$?-"4UQ$$ET
-M.X/,YHH2I`?PEG2V5X61!1Q`9EILBG`)1NEY&9=TXOTV<J.U>E2H[&82N`%*
-M?K?]!"QH&HV#'"SW8Y=-%[>CG6O'V%"M.XLFLJ]PLSV05)ALT]3@Q.9RPE$?
-M[WP3\H=<:5PU2Z]AOLII4-<%4UQP3K0IAQ98SX4>ZN!U8C62++0:?X2`5'>8
-M6RY))A49;3?9;X;:=D\$.F/64Z_>X`7R*FKB_)$ZU$ID/P&L_UV1\_/VDR46
-MA:5,GD=[QR9^.@F._A*RS_H5NN9P\:#T(BY;348QA(2\<^6G%G36(-3^YH?G
-ML-.U3NOA-6;/N&+'3NV?H(H4H$"B8"6^-/OIVO.H<%A/I;IW!%Z[>&BR-6-J
-MF]+TGD5J;E,^,KR%G+CZ^S._3<3J1E9F>AK&)9Y=#DB;@\6M&;3P?A2X3:@S
-MP.4!N*A9>WY.W:9G;<LEVABF1L)N:_M.B6EHS2JG'W@\WMS"G/D1!Q4[+6=(
-M>';1&V"VYF]-\_M1V$L>A'#A5_1W_JH%\\%"@L"VUJ]\!HU*I3J#<74UT*OX
-MVLH^EDR#<4T\OS"%$D!Q?&EF!E:_5#=2?-YUY:_'$NZ#G:<<GP/N[*%R#=^S
-ML*PSZG6MF^NIRFJ&!UJF+PIF^F*;5#_\"EOC'AHBJ=#+$F$L0W:[109F@[(M
-M:DV\,7]1E9,Y\Y1@XL/00&>96Z?GN`.\50?ZP4Q1O=?0`S3S_'&]<3]A'QR1
-M!NV*:-9LS(D4\_5SG]G\_K<9YU;=F.T,0JZPE.4`SFADM!7H7'P(*JZ0YFO@
-MN='@-5EJ\_019!"I:8PLGDJ@\2\#.X7==PY:%8LS'R9L-<LRT1#1*1>F9M6\
-M"G\?T.X:DZM=1EI<.5-E_>!['J%>*%S-_K])EI<42[L!?N,'8(@$G'9(.Q:F
-MX;(*#8B'89B2O:P/?2KB&\M->S;L?"5['+0_#A8PJ33<.95C%3C:E4<=2>1`
-MXVO-T[/\L6D8H'U*PK@N4,T>"6:".W\LR82ZAJEX@7R/ANA-VRNX@Q[0M95D
-M8-!]J"27<3U>]C"5.*)$]-VV7M^>6E_&Q<-<.6HHEC:%?EK[B0SV1,WQ&7<*
-M3VH)=YN0NW=,OJ<1`6\B']=+7V(E4DZSAA;9.I2E98Z!:19/3;*/J]&:A0<"
-MKQ7-:L-B^T5D96E9@Q*RY6V<S7.)3&*P*2E?CAC?!X(EFUN9RF7$TP/B/3MN
-M&Q@LL"-NL$0;,Q]-=*R%*9'_VGB3D@6Y6QM!W$^2J#KR!6OI!"%.>'V!3@O`
-M?VB=>_TY_'4%:![G@].98=':@)U[EC>66`,90-YP^FX9IHR,D,7U8+A'?I?2
-MU6[SG"!HZ53-#SEO..E];]P&1?*PX\^YC,U0$NXR1K=2$:(`Q+S=FC\1!-1H
-MYAK_XTQC7OU,9V@ZSB*P5KY4E1&52=M8-'N%[8%JY^:H4:+4SHU.,PU]]LIO
-MA5DR[/+NHE*<SU-(:H%O+LT-*X5.X?"&4(4S?',+N>,&A0'&TQ]*<8",*IXK
-MS&49@WZB4J3*_W$__CB+EOQ]"!6]$2-T=-[*Q4SVFE1AST26FEW[!YT0+AQ9
-M3\S%I659Y-QXG[?BZ'C)_NY/C7(RJ;.`(4JQF%YY!;H8V7;.>'@FARV$ZU\N
-M!E4/M6<>A2**A[.\E.VBFF/^B>6DZZ-`PY_VU[08[2("U7`#4CX8QV1RVZ"S
-M\VT:?W2;6$HC<&8E[XWTG']5CN1PQ]5,46@]Y]!W4IAG2=9K=A4L52$->6!M
-MCLS,+%*(*S^6Y2UOUOA/G4-&VY;:$IHPS%8$:G'VNI07C]/I$S@H>C/,@-5L
-M?F:$\C.)Q9^DSI16U6DUP1(*12MRU<@9H0?':C2:#:H&\R-!SY)/OV//L:R\
-MAJY2%E>[&HC*DVZVS@UNF<Y?6;?*HNV+^;PMF/\D.8O"(B6B`@7XNA>-V`&]
-MN!-)(,(KP:X[X_3\*>^D!J;:IZV'GU)8U#T&IQ-*\$CVQM>BCXCO[[_IXY*7
-M7V$^V"&Y>_HJ>*3=\T`<[,NL9LIK@#8=8?@(+VK5".IE.XDIKYAH1/3!QT6Q
-MF8STG?>/NR3OZHVN3I^HC<H4?%[F^S,0"S84?,!;&R*79RF#F+W\M5>DRZ]@
-M-`RV\,1-4`<'"1GA]!<^6E0FG.[^B%:"TE1R1C"./&:XX[X9Y8\',)?!2-65
-MHTPNYJH1\)$DJG[RQ!,?$84>_JFWHS5G25[/.#05I@.PN:^F'=G/QZY&]GB)
-M"^=2\(WD_2M3:0RC'-?'P(I)`=O+)3::!OM)I+`%GYFC0OT-X7GH)?/03Z*9
-MO-.%3:DN0UVI$TG,\./DC&4R3S\#&8(N8XIXB"P-7I1IFS9FB^4B+*_)`[WT
-M7:./XKDDS`$54D"Q![])F_:;AC;:B7S>RI.]H0R3`_0.\\.1C';DOI(BETU[
-MTMEH04]Y9<SJLNQI!D8\)'^T0PMU8.]$U1XTR9TFZ!PN\*:D8'X-Z5=8^6I[
-MC7]Y&J!/ZEJGPG<[+.\(W?JGR3O-"]##UN0I7+!PF!',&VG1.[*G(+HX.G5W
-M1IT_%I3DIDS"6T&YS#!TZ\]/RZ:=_<6!IB!D,,3TU*R)D,Z"1([Z%ABNAF(!
-M#^UO\\4YBRK;.S(YFS]6G*#?:S?-"Q6/5^%^CN;4)';G$*WAQ1J!2Q#$\(Y3
-M2!N*8N^HQ%EVO,=*9)KG0<>?ZLC7;>%IZVRP9&NC:-J29#8Z8'"N2R;*N;]+
-M:!G:=M/5M`3<'">)CO1:W%'V>&=L:"J91O\TQS5,:XCLBT_XW..AD_=3V>NQ
-M`?E'JMYE<\HR![N>IIT/?W-=R_G&I#S0#PT)D%B`EXO,>&D:4BX9'7!J,PEA
-M8;X-S^L.6?8"YN3^7W:C"(L,>X\V(^HM!7SG08F#5#(=A[N';F&S85;,^WCU
-M>`/#2:_`"^7&-46<>;$N:/>IZ[%Q\[\E)9#B=VR+7']<9XLHJ;(QY$@5"O"$
-M_$<F;'F^%[+'4#ZG(^[G,D.F3D9K0"5O3273S+O'#!(W;@I9TI991WO2<<9J
-MA`1C%]AVC*2L>Q\@*-9^[19_JCA52?4I#<V_!1STJ>H:PU]LM#7O,D_".^9[
-M5/_?P]EVUEU6!5OUOHR2+VIS:1PF!D^;'9$@G*ET2\U3<3MR11!&'RME'EL"
-M6F?Y(*S2XO3VO3@J9F;N(-(.[7`]6_Z))((K#96D0=V8ZCDA3&N!L^EV<Z@#
-MH8,CIC1?-[I<VQ2L1I6G'+/%%;W=CFI$I@K&'?[V(,HZQH3X`MLQ:1ZSG#2C
-M0I]4`J<[;&450P1V,7'%&M*ZNZ[@12DR*.5*O!Y;_6CC(>.#4>.FJ'VEE*?2
-MREJ61.3PEB>#8APQJ==!F].=$(7%@:&^$IUUX>8EF)/`5+]UJ]T%GQH5YI&P
-MAF#Q3'T;^/$\3A+,SG8GNA[:LL(L#=#N;&U$Z,A_4LV]*K-,]\X`8TK5;)H%
-M$[MLS'KTT]KZ(-B22FQ!2P^QH29G-L9=\!TUSD#FI!&TR+6B/E9L8AFO1.CB
-M42%3:5H6G,0A,@T*9-[OYK:2M.-J'WR(`C#`@8CE635>7&$G7-B])KNZHD\A
-M,9R,-N#:+#?PO19:"$?3I*)-*(74\2T/0!%T#\4X3JH/C=>VJNS@W\<R5>M2
-MTF+G<Z>L8:O;-5!>6K-6NF*_L?#S=*+YC;=Q:ME9GD_7,]##K'^Z']2APP\C
-M@04C?<PEY-`6D?OS#/E%4MPBI?X80`M,HCG5&]@V[@^!"$/W]\!/3Q&#00JB
-MZTZ1,;NF[9?"9@<,/6?=QXT;^.=SD3`VSFW9LR"C.WQ75N\HYB-DR^!;,@P7
-MN3QPO/2L"6%\"RQ:L?WT-<+,ITNH#U.>O*[0_*Y#5Z+.A&S&RO`P.2.\Q2`5
-M=%VL<]41RRLKDK5(\`V/Y7ZK1__O@+WET-:!L6^Y?.+UP:5,U977F';)35B"
-M91><<`H:5^:VF:RS-8QN[N@LK)(8/KV2;%G/^-?'X3C+'7<)F3ZIQ1#^)F'A
-MIW'+P`9UVOTIB/SGJ6TO22U;ZQY2;HZNE2`2YI4"G@H$M$E9P21-*J@ZQH2N
-MPW8;,>9^[?ONGH#%.N3"(#)LQ+8ZK-?IAVC5O5]N(RUW?YU?$T;*;!EA,-4"
-MW='@</<R>(6:MR:BK/!00W\,FK'668^*/11SI[=Q8VVU]I/AS6R*K]UU[RS(
-MV0C)2J[OZVC*RHOD0+YY:NH6(07?1J6KU^-N)!K<I_"LB'\499[[L^%0HKU[
-M^P'\MYHEQ]?%+&([?DQ%766!U+9_W'[CX:(@D/^_CQ?7-)LJ?VB],H"RM^SE
-M7731B?!+MT)!')_5#^>ZC$%^!2[2I0_<6&=XG).7?54GN.7M#6?=+U#(*E,O
-MWPJSF39;698N2<Q^B4F*>7?[ML>=ES`:2^,Q=O"W14E?`_"+]=B==`I%>#SP
-MH-^Q'XBJ=QA\V9.6FC,.C_T'4H)E3!`DXPZP?8DC:O_,]B5CK'_#&,T&8,';
-M%>"HV!!@]Y;.Y=/Z/"U9M$U'&_K&[IT9TJ6ES6O@FF?*`<U*(.@+$-S=*]R?
-M9\=^]A[+PM>+\'CRX)<+\?N^8&BAVCQ9,:E.@BPX7IZXE%U.`M'[1C$5_<5Z
-M:**MMA*,8N`)C\B(6"[A.>IFBZAJ3\()D\\VI5E^9Y97@"W^R2R>VN2!R-!]
-M34Q6W`*IUV3QH[$X-'R@;S,5^(C.T<;'HWFZP]&<]K),;D#K1;$I,.)8!7&#
-M/."5X.HD$G;_)A\GVNL<'NB>/HVPZ;3X.1ZDW8]!!Q?*E`'S@XW*(PK]D73)
-M07@)M8*L@#!@1K=T'!%*[2LM\01/?@]UW:R022=.\+,)%'8>@+:SZ']B:4;5
-MR@M92A:7_.B^E7Y*/KML%B;.Q_3/.V00_"30BCU;`@:M,3&Q1RG5A3D_2>=!
-MANJ<K&IO`J08%;81G"QI"^&3ZK!XFKRW[B,\],28HR6B&>F=L&H"?3Z0*7Q<
-M*R?$:ZU?+DY4O%Y$<K/Z.+*@Z.A2I98GV3QQD(K[P&I]"#F2:%ZGPYMR61,[
-M),?9U`ZJ]V0&72V(?R,[72^MB$:"O@R-7]OE"MRDP?7\UV^U:_9F-F>V7PLA
-M%:31!!VX<1B\V?E&R*F?[BL\B?;9S*9N3AM!.AKP%0NO,K/,%E&VJB.7WEN<
-M1ODQ^%J(NQ+LZ37Y=T:0K6TH>\VK(X1661[XS5D8-3[U5#@8.,6GGS&3GSF&
-M]87!J<&D.\'8\O4TN:(&:@N07LEPQV6<<6+A[SX@FW)E",[[W%D2Y+>Z>QK6
-MS+@G?29H\*L]=M4<$R'RW>8)IPS?[%!/R='ARV6]:B;L%T@_(\[2%*ZHV=9>
-MYX5#;C)[KQ";Q=[?/E=B).ROQ-OW2$A"V34MJK0$2)=/B$M@$2(N271<'&8/
-M/!OVI:/\BLO$;(+UF]CO0]>_9;U:"Z^I\A9==]K)Q]A<%$K1P2B\75;,_<6H
-M`'1G]/#!8\C"F3DJ=C^(*Q"ZTITB!1N-ZVH\M#>$Q)MD,WYJO>24<W1*(XS*
-MF'9,K@29V%]]GQ1^2U<+W#-FZZ`N%VB]F1;\=O(83$;E#78BYC6KLXR4DH!Y
-MS,=2OU+#MN]NJ4D5<-61`8.O@RZK(Q:LL'%"')MQ?/7\ODM2ML+,E<E\;_DT
-M1Z+`VPC\Y>#^&.@HGB.RP#'(UU[0K[WWPX?24_OJ]3$C:*R+4`^'/#)*&_DC
-MWKY<Y!Q29?<<8C#5L&/7!;\13EL7PM3"3^#_2X;P4*:)!=&!J#6>K"T#[V.T
-MY,QSPD6C1*K).`)/P;/&#M@.(@^K;4FA22YK981X5@<U1OL\0'@F!#D"%8&,
-M$#"&VK=QC4+OQ^^7PU3Q//VR/FQ:2SBOYXJ"*[$8:UW4:`=P3JXG.99!$$HT
-MHXE,6Z0P#]E_Q!^KHO)N3D.D9]2;EC.O&1!^J?EW@5IZ5Q]CZ&\!-%-9NY9P
-M7'&F@,3U.79Z5$=D<G.7&Z3G]E6Y@4T_?'8<@8"W#2S(]6O]>$=>VAX@N[NZ
-M2NQ!TR$,P^Y8ZADZ>N@Z<2:WD'J)-C99IZCVBL1I/RD)(A3+N,*54KS"RTD<
-M]A6X-:1@P$4(1%E2B6!-J=M`KL,V3<#WI:8N6!_":RU@')NMZ=BR\AN=RYS`
-MDC@=_\!2W">Q.@TA!']#]^7LEA*"T.RYFT\!P'M8=(#8[Z"VGV6.H-W)Q$V+
-M<HG@<@J"ZZ`WA\8D(?BF,]@LM3*`VJS"T:`%?9-C(VTA&R_50]?=SKF,[F`O
-M"*"R?$M!`'+"\^[T0$+KV^QF]$$0CF8]_E<M9Z6!H"*'H3O2W*95DN?='(@O
-MN,KXF:.I38KU3S1$&@8@X@/XEO-F^<:318<&E=)3C+U\B*30E!*2H>HBMB:X
-M\Z288+ZIV]V>LU/5+9$//2_@SVM=Y>UST(M#]O.\M0@.!SKRKG-?K,8&_0N?
-M;$:S%0WR'@!&T#L0>C0!VB\^KH39\N5RO@!;_V(P=N^?XCO&_98\6O\^0Y82
-M5EM*H9]%2,/-'GM7%>2D7#"I!@+T"#0&[UYDL3`A]RI:=)1\ORT<.S+?"%=?
-M1X;J-KR?TK]B\!=_FO(M8YS<YQ2%<V)C6*\]`CXI>[5E/)_8_7\-:F'""SYP
-M)U![V!F^PPKD.>&*4[O:,5"OT')=UZ?C62FI*4U?#&`2_@U>KK:"GT/!.INN
-MJLY.3'Z%<L%D4J1O)YD*_LG6'X="LW<>0RYW'XS!2@JC!,#\<J,\'7J#QL]X
-M<L2(@F%VM_:8#2#][IOY@L/>)W2-Z_XA1SL53[ZFZ8UMDS+APY`;XLMI7Q8F
-M2PD8@_9TX4_(`DZ-X:9`=82#K1K!8^FCKQHC2$.!AE'D4L(1-ZEEM+_`?IG@
-M`;YN-]=M+WSYY35Y$+X#1!9H[$;@QD)\;E5.;5-4+C>:7S,##-%OYOWLA)"_
-M<BX>23U0JNZ,"\ZPL]6<VD'86@N;(,B<S94"DRV6[@K*GG9X^V&$LQKVJ+K'
-M#'4T#!<7I]'_Y:XH?'!G=H3Q'MILB^<E5,4TI"&^-Y=*&&-]V!(<29EW(H8X
-MN[M&1&"D<\J[XD=[\4,GJ@=,EHPQP-`[0''?\#Q"E_!'S(Q^!HI:;X5_E2FL
-M4F"+F8J(LS:JRV6-SYYD@LE]V)NQY.$F1;HTB3B!O`>HQDPV;7I=/-XASP2:
-M4<T=Z["4^BB\V7Q*94/&P30;E)2+CO,VGZ'CBP4QV)Q#IE6'_E5*^+?/T%NR
-M&^8$.U1*&0[G`FD:R%D29;,&/\HZ"`*5OWSNB)>FS`\P&:[A23S+]/O@V]Y7
-M+0\W(E?=&T3IC_QK^#-/X[+^;:(XR0O)DN8TN+X0CG>_:H%>^C5(>S7C?0JZ
-M]LU,[.>Y;+"2:GYJ227P0.5"'D:[-VZNRRE*3,))37(RMA8G#1R-T7T=!`D7
-M)Y<R*ARY2V/K_FF^<=!\YQ(P)[+AC`>IHU7FD5<YN>J(A*1;LFCE$[FUA?C;
-M9EF5KZMESOV>;B$7<?791I>HYEBX+OO`2$#[`I$B2.[=;>W'AAI4:%],K7Y2
-M<^!.VX`_-")B'&OM>_':]5VR.03>-##N9ON0WF@1[Q93+(JF0Y%^0O^U^S6S
-M*V]=QB7]7@8L1>C)59[Y#^"B+)[8_@5O1;N!/G:51L3#J)CFDI#ZBTDXHB5]
-MK3"67RM/F$&9,HB&![K\3<(0WY:O\GY`SOP+TBB6OG?]A]JQY_*4?1\*W->K
-MRMP:#($,#:C1"!D=Y]X-\KSQ%89U_7]LON<];'I!L0E/!K>@IUY0S"KQQ5)L
-M4_V:@RX)Z,6GSW?BP6Z^!(S,W_W<[S<FNV)#7E'1G1;=N0>:[A&N61T_P)5Y
-MJE1/;/M&NFH^=>[]LA-Z%Y[1Z3CXM9(_00&\%SMR@?E<LI%+'!'(J)^<\9O`
-MW4#0R7ORA*,1[9R1V6ME=Q#4!DHMTA6+>--]B5DHZ'"94HPPVQ[BIR92E*^<
-M43X5=A2T*B<KH:,2^-7:X1>[[6]^6B:Y6+=Y\>#12%-15FYW*5Y+^#"01O?"
-M6A6>#389L0<Y=IOTM2")3K+K<3]Y79`/)HXB<4J<M\VXS>!YA<&FNJY!L_`"
-MG9TQ<N\I6&/5N41>]JU"QZ9$0D\[I1G1X9+%Q.OW4=\/ODXJ4>88V%W#U>,@
-MY41ECU^PNA!'2GEV1H`X/_BAKG-_?0H_:E8?HOTF5>$ZOYC@$CA=2^:G_U5D
-MFN1_D4R,@@;2B1E1(*RMUV'D(PC#(RY/Y2%,M]%C<DVE%G="=[ES3NF_T59$
-M_TD3@!VCF[@%6LWM53DQ>GRU^W_-`4V;F6B9WI=N%Z)_#P$I/D1:W?ZJ%FI<
-M\O9!G&%F-*OE>-KBT\('_L#["P'N]E*647.-OI*55%/VH]GRMF('%/C"]J6:
-M(3W@TK<U=(TU$)#WHRG.3IUDLYDGXR?D6!GW+:!BU*O7L/Z26D.INU+'+X//
-MQU9?XI]3[#2\)&Q,]+[`MY"/5#H<#R>V-$O$QS1\Z]O_<A*7*BA4_J&&BWH[
-MU"?!I@<&HY4(*Y<F8AJLI?]YMIDZ\\V5(\W"G&H!O*+.::=`_==02O5$V3BW
-M$.@09ISL9^@W*@",'P*\OSVUO]=56CZ!1?(6.`/#SG2)1(=I8Y8QV?4A_].2
-M1Z//3&OS17P/VKO.S]V=K-CW[1B<%3FOIC&8FX>#!N:G%;QVNTP>=B;+9+R(
-MT--A2DDH`=HDFL+S>S'9:U=:QJ><?^0T:>5)IW7>.>1^":NP)88%YP=IY`F2
-MB4GX6X?M!D^>AI6D0T2S`CY7M#J[TDZ62><+'-:D+N@'HT.;FC9UR"@27^JC
-M]W(>?MIB(;>-^4.)-B6GKM+R[),#AYXKHM)PHB*CJ!%R)%W*"`8,;'&-O^^#
-MDWW363H).%R_AYDSI*%8*K%*B1&7Q<'H:$CDAP+G>*[FA>D8_E#2?TV=9ZVR
-MADI-IQ4P'Q+W(78W:<;.*A+CZ82:HH\T%"5_8K,$S:5^.S[+=G(SM7@]:1;#
-M)[=54<[8+EOOT]NE6U/$4_5U]9#NJ.9*H*3[R&=FRIVK/QY:R,,R:5Z*G5WN
-M6I_(Y!<6696SO1;,1:R^S:M)729`BA+SZ+)1'Y@VSQGIL02=68!\;/%SG#^+
-MX;OI?L7@5K8;24ME)!;IFVSZ79U6E_;)IO2,4JXQ#H;)+UCSE>-4"V+,89.U
-M?%0F>?[CEEC[NQX'J.KSX$-`VP=%QRY-3%C"+@D\;F$J=WQX%:YEQ<P7AZ,M
-MLZ8'_$ORJN,\S$*<X''=,`O8A/YRJG'YWQ?@88GX\R!:YM'X42T'B2=)'K-.
-M*+_;%:)N1FFY5"MC06[^[];%`RT'.FGJF<W][BG;MV-_?4^C8")*IR#`>U&G
-MP3_1K+,HV?LU']#I)HHF)GO92YJ:RL>XCVKUMBT_H3QNJ9^332,LG>*T[-_"
-MJWC?[0,QV$C<@E3C-SJN$:O)+_O?=]A?#W+K$O)"Q(?.0<[:OHE0PT+73>)@
-M"WGL(R:.,%>IJ>PVPPZPN81CK`ZM_`HTM^'L7%8W3\VTIFRZPP"EXOMYW#C9
-M!#BQ246Q:"Z^N&S=/Q)R(V]T_0W]\>4`/^`TYOYKT<U'5@J_)D+-BZ^.>OA[
-MC#H:_SMTUP>_`B7GROE9(MOXTS?7>^D;Z/D3$+>JI('UYJ#Z*RXJJ5%5!0HG
-MR-2C>*(:`P.0DA!.9MB"3U]^LQ]\]1493]PQ4,2SG$ZI@NI2!I)5F52R"370
-M_L13(H'>.0P"]3[4NHH"NUQ(+]9S2VW(0%@KN_O-RE!<?NBJW?18\XILVU/L
-MUO$&\A-.$2O))]);&6]G*/]M2=X>=]*[+FI]HX5QJ03L[7.7/#S-,=HQNI'\
-MRE7Z$.8!"R7I6K?H9.!90R5T9;24H^38X9='V!"^+!5@3%,-Y9>)T+;AQ1[^
-M",FK\!+KGKF4+BZ.T&+E1Y4%WYRNFR,"QN#-LW*6)U>NY9V!R<8A=NU)Y[67
-M;]?-&YAF;=9(!R@_>;DND7@\B1CFF<<FEQ8YSXZ`Y"!!.[^]E?.N6T.NGBTL
-M@C9`'8]-M,'0O\`1\_?%#M%\R*CD/>B=JG^*Y6*_*O9DNV"<I:WG81U)+74N
-MQ7XG^Z-9MDF1FVFSDZ3<*ZZT)L*ATBX[8WQ_3""@V$H6<D)6#6A9<$G^30Z"
-M0DJ035_W7?:[9G=6'IRY<=T=W*LKWR%!LK40U('>A2/-H%\2C*C!R]K`=5]>
-MN"J$?C330VMB2G:?795%%L!;R_$%O;I'Q5<QB()RL@094:S3,0V95+X7,$4#
-M%7-S-H5L$)XO]B#C,G>4?Z+6S-=6>1@(:-B"GX+78B-ISZ&IP4(51E+@$5I.
-MWT*#0ZRT8$SJ@)PQ.)6@HNE;ODQ4C@9`B)_FZ9Q_Y\,[,J.B!?IL!_DN<7*D
-MJOUP4!M[F4"EK@)D(KN@_T!<)\(+/KGC`<(56V.:[V^<,N3Q-^$R/"`L?9?U
-MXFB8<1>-Q7`9(0*=_0<IX"96ETH72SPZ_RS&.89YEC1U(^[*U<:OPIQS<8F*
-M#-M?[,!7+6X_BRL^RDOUFO"MPH**";Y.-3:D'6E3PUR["0U)]H@=H-?':>6=
-MTGM_(SA+!:$I(8[?]L6Q63@"UF#5(XWM$%C,IP4Y;]@S5@Y3S=-'$0GB'.B?
-MWQ+CS7OCL'W/MV7E6']C=([_SQC0ZW-MS5DV,\ST0SZ9=&/IQ].8YS6:0T0U
-M*3T=@;J"I^U5&F2&*^Y7'`K'*1,A5:PMEG92O^*XLU8$<]T!2(HUY%06)I)&
-M7,TN0P+*D:8($O;SI-"6+EY:@.#Q'W3CP_U`ETK[D3%R(=.HZW9C2HJ9)=Z@
-M^B_;!B<?2)U=U'GAY\7$XW]\/YCEE(9K#>Y/O5F#)1,%I2'1-1O$+-B11)>J
-M+R@'LDK@Y_ZE"A*,H2S_V5Y(IEOEAQ@M;ROXS7G')"221L,BI*`6QVCWC`T.
-MXA0^HI^=YA[^;'.6!T\VC87$I`^-15^]=84#,CKOV[%9.)/0Q`K5\!(E(GT2
-M9%XX,W&GSU0:B$J`FBPB/<$<!&5K"LRB[1?P]A)R</2$,=*;\M08CU)F$HF*
-MJ3ANH@9[VH0=`75J84[RKB6\B.HJY(FO%>&G`;J$EY;Z];W(Y)_'U=8!?5FD
-M6=0'0^L..T6VDI%H[S7<(NE9(/DV0XV3VNA/5\/%`ZO:&)(K>,88(W[_K*O>
-M<JD#7=`CYV&%?3V@BAHQ4+\'+2XG,D-0ODKV)8!NBW6X4B\(__&)9"Q22-[W
-M,UAD5+1>A2/'UYLK[X_[^*<U`.0'^_XR&>GV=W@P^U!DF%,M#0C9':>S`?PO
-MZJK/4$':&B148:UOF9*6?;-5E_-58Y^&1RXW*-)#%<GS^>6F90W/"&^WXD].
-M:2OL]F+7S_"?TOG;D\#X?K70QJ\\83R*FOCUJ6^FCL]N1'TV/J]KUU)5X&DM
-M^Y4P_'R#C+:;O$<1CA>4Y8Q.'Z=W.?L)%[HYJ"!$R2`6T<A^]E]7:0QKL.^"
-M8^<G^TOO1P=7_BHR@B<6:/LR&7SZ,%N[Q*424F!?5P.9R2=)F#:TDOO<+K#U
-M:=FZ0$;ESE%9*DP)HW*3C`?[:EGYG^(_%@QIR."<,7%;'YU-"J\6>-"W,:C7
-MWN*1M0.P3D(8UFG=I\6HG)$8+V+C7F'XVH)^XEI^)D"AI!]'A6B(U*\Y1Z(L
-MP7@U+(3I:9ZMOTAG8A?(9H):193*M6^TL?'W'>USC(VO*J/89=<\\@Z9R58Z
-MN16K_.A.`R+RMG[)<VX4HXF43,#!3U#$-<CK[VG;XH2DJZ*.$;&(4AB.\H?B
-MWXCOIZCK$35GS]I+YF:D]IB#//N?##%>E(M8\@"@?J.\F\G?%S.MRD*0#=Y/
-M,([Q;:WF`E7D7`+E"0*26-;7U%@AMY(J>5T*!QJYW_XJX""4V^(`]AZ$DAK@
-MF`.E'(-<(.16>XE$V1H<&/YE>$W,/]E8Q)9A!,JYLI2"?/S^/A[@YD%;5@K8
-M[]O60`(#)^%C).[@OJL_%,W@+*S>-\D0.Q<D2%T.7DU)HYS80Y6W:=^0T.%:
-MT+(0*E!=)_LBF6;;?ZS%<[6U0GM=`U'*4W<7Q:]MXK;R^[=41IM9C(S*M&#P
-M5(\?0Y7.9OZ-^"`1E!B`T&&<<,<3\-HW?Q<+;ZY/6#^E>5=1XKX)[$SFL]I]
-MB^DO*D&APRZWF"TV:KU6'6_.5E`E]T!=H98`%!]'[G#*T&S%%/U[][MBGZNK
-MY/:(]L3OU"#/!E./M:N'J9'+''CB:1G,$AQOM;.[9DL")S^*$$:.9X1$XAW,
-MJ"GEIFW2";NJ?`U($DJ?`L#5E1_-3NO;GXD9"N.=J;1[W/N@Y`#&3Z`1]DAL
-MFP'VE;E^D,(AZ:\Y`N60NB;FFH@`6W&@BN9:+?[NJQ9RG#O(W14A,0-3Q*GA
-MX1%O]I#-_<'[0?XS!EGB<FLMWDP#`:=M$*XS<<7.GJ$M]70,^Y\N&J`U`[QQ
-M%KCF!>%5-F_?7Z!^V^=5'\QDTR(5[\B"]N0B['5E%XT\+RL,:]=MCE_>W^'`
-M[2/4EQ<#CRRSJ?VX\1H!_&9BH;7AIQ_RI&ZM'8BMM;BOHAE!U&HX;145<"[9
-MUH]:[4+\^S-U"^,(0+U@-.<*L52")%!X\?U\VZ*#\(2T@K/_?$C#-_*($(AC
-MBR@UY+1V<U.H_!DI692?ICZ98]FC;&,_AO3!8S204$68K+0#OF?SA*\ZRP6.
-MV!8$#`HXWE2_#O@+N=><!97QV>5]F9$#T+3E"WS.G7ZGK_%0L[)VADS%:%V@
-M,I._<&:YFOR4#P*"*WT[N:RBT`VA6'FU&8@T6UU<B5#`JNG-6B,F;L./+0A"
-M/!A`&FK."U)^)F0?<LOO<MOXWNF5,O8FC248UX]"<07O;RPFZ8U%!0H9='LO
-M$8-.-`4.QB>*E-^&W_.1?"(#9AT0,]^=V^_J+4W!U6%\[,*4MU'-12.`,=`=
-MO&YYV8%84/DO8$6L!-CY@&BY07TX==D>ZF#>?#R"=0ZC[)P1&T6+(B2@7ZGX
-M]AIMQQ!95_+O71G>,(#!0!J:&YE8V!Z-B280@W-W_B0D@IRH(%1B<^"W!>U_
-MVA_OQM3?#_W29"=RF.W@FVXE5_V(9\`L=0L$NCQ&D-=,[PE$85E+ESO+@<.J
-M!:^#+,<W23$#,R2.$F;96W+X\BP:<];5%8!I,:X!#A26-^6BH)"X<:%.'EGI
-M;:+.<;?<UFX?X>LBQU;=&=`!'UN/NJ*A%@<C`]II^^LF.#:\7D1LAG7`,K^S
-M/=TZ`WR8U#C'_4VAFH[H,U%`[5)]/$ZRV%9C._DH\9UB*A>9+`7]KV9,-$_-
-MQ./-P#Z&W@,7W;N)G'FS5'-_D0[AP,[,9KA-BE&H.ZBKKB9AE6)IX^S!8@\=
-MQVAA]AD^)+C/5?6;=?<0*X=I`KJV:3B]FP.KVI&!GF:[Q[@)8#H-A4>]5M)+
-M47Z7[@4=?A+H%9OWORZL5!6S0XN2-^X4)VSHY,].\M:J)9%]#_(@1D%7B<UX
-M--'P\4)'/);DY28/O1I623:UIH.*`YXN4XKA;="!7FU>S%!@7K/B"6E7?7P*
-M6CY['4,N\M39@WN]DZF6,1^*]`FZ>F`F739L9CCSJ_MFMF,A;]A4!A8-/?^J
-MB1!WU$:-1[UW>3%38_VY7R$IP(27LVTHXC?^&O;UCCYD":`XP"35T$K0+=&(
-M3%:C$?]"DXQG-=T<K7$3_P2F/=7?S`H>%]L&"NOV/#M>FGD_@23B6EP;:6[T
-M>%.]6,`'!(^M>:A<7\)GMG[!8450Q0D9ND/E\[U@IQ-H7-9X%\W,.E;*5&G^
-MR:3B(XYD#6UU!\](S5NH<WC"-&3/-@CQ_TY;Q!OS$9+_\,"H,UMZ-V[.B29<
-MD/$$S1KA0'[6]#,P=X1?F`N]\<U"ZK^$1;+/MFOW7B$U:-@XHGK4HQ$=$=,@
-M_,*//_<H2CS[6"^!O30M^-B`S:>M2]W0SU?$PYP!S#,NV7";"&#<JK8^P,F-
-M=)_%$[7GW2SM@?DAUTG33"!BI2;P.@FHC%CEXDLY6JW'])]XPH17Z"2OUIMI
-M!T-P`=.@FEI"YLVDWO_BZ)C]>0"&_!(QL^.(H3^MYSG'?JF2O0<,VIA#-.]@
-M63-R+#".9$OY'OCF48'7WAL.YUY`YB0ML.3(@SD#D>HTU_WWG4!S_=O-+M(&
-MVY_[TK'?80K6MH[&"QY3<*A@<-03`QZ#V0Z!H,'E]WMN-VHK/'L\XL<H6^$O
-M6F35(?#1(`R<_X-@D+``F6!?`Z7BN$W+&APH]SPQ^)5:68^FI#`X?4?L3W4.
-M6%E7&8VH!3(?U3FO.GB=X^(9E[Z"$T^XECV8PB+7>]S3!RKW&M2C^ZVA>[D]
-MM.7J\(9;(2D=\8<.-2GOC33GYT-7,&G%;/X\L@G5-'E=^/HQ+U['B5EHH=)P
-M]G/#8P1+S,&FBZ<3"MA)HJ.CU9@R@I7?/7XYRG$OV'&5+86"G0(`*';VT]QW
-MN9**GP1RP2"[LC'-+OMN'/O2OS3VPF?=)[%5P9G$AT&)8N=+J8J'DF($M&T,
-M"_7\(O#WG._NOG[6A`/@AB!'/>>"G-#+T(:-UD27V*FV(^_/#<.+1H(PM!J_
-M/B^6D6>C-_2><,)>U':E$JA27TSZR\P.W_Y\S=4%_U&?R\&\I(>(%3\<\9';
-M_KL4!ZO7'?<\U=!1PB]F_C!'U\?F&(*IK'[#)SC#I5QR[+#(.&K8\TD$]Y)2
-M/*$O5,(#Y$$9&^OV-0P]Z*4K8P=N:EPKM>A1K?3_R._+`8O:#'8E`KUV'>.L
-M<;"Z9$\V:*YS1>CXZ2M)[P'7ZUIA+?&MT/M2*8JD3YC53]\W2=;[:4"^.\R9
-M77[NFA*H39'UV[2_3>/.H*UEPF.9XV8_9KJ7`MG*QV4>'Y8E\ZW569RSD[O;
-M`(02H.!^`?I!J8B`3&ODME/V$KSRSFXY)RB/:JA-$&3M+%+JI/C`"OYQ#"ZR
-M?'DR./?\T""$3H'JB;1IV=2F(U_8B"+UQN4G>=VK,8&EK*1854LNB9E',:WM
-M]ZEH.^&B7KP,PDA)#>T7<8+!KUG0Q3!V?5%L04=/\TEZ79RT=U!C8(O>+2XJ
-M$F@%!)M*NZ%XB8E]3RL=9U!?W9>T^<7RL:S[QM,B\=.3$-M-,`GF?G\ITAF<
-M:)(%47T&CD>D/=:NYORN]`=VJ=/"CY.9]9Y#Q`\<G2`/W9(;S#A[J==&*>"[
-MD*O<%G`;X9VQR0=!67L>>M7.B-.%EE%>ERBKD"<>^T'E=L#/(-F`-^?E]X3U
-M3SE]4NZ<QP/8=BEFAZ&*3_Q'N"7]R_;#7CL/.EI3V6[)VM:M?(8-AO"<5+@Y
-MJN4W[$=!.*67"Y0=W_R\90L=TS&[R:<J,4JJ.W!(8=E7>Y&$O54-/B[.2M*$
-M-$>-!UBY;ID<E(9=+DGCN['[L5^1FS9O#*'D3:Y+MTH%%E5&U#@?<2"]\]`!
-MEW,3/*72=;<&DA;DPXV7.!#4#4FHLP:=DI>!8JM5JDTAK(7L<-BJWF!VG=YD
-M*9.&,_)0$D5\1<&(,JYJ[[5_O$_?[*Q@:]4(:8D<$65QANG.B/!3M)NYZ<G)
-M?DVYFRD+@FJA#807R-:E]^FRV!PST99-0O0O\42&EJPL#Y\]JPQG*0OLG*^\
-MV'\57Z`T)8`S#M:ER25<5?`A8;PF9M:3&I,M[/G3(BB8_[YUICE^USZ#]!-I
-M_%W3#VW_F.46FP.231/2<;D?4*:-Z_N%^..3<>57=TA598NS^#_60J!]]??X
-M5P@3SLFX_)//[A'QY0=&_?G(*(FY^C$G"$[Z/:,_39?Y7"'.+',Z[+L/-^;$
-M=O;L5\82BEW[0&<[,I##(Z;8"K%;'&60X&O>53E\7BTG!A+@TV?.V/4T3X+)
-M;BKSZS:<`;O$CMM3C,N@*\(VE-B>]`0)7\,9=X8^W1PT\QF9P&J42YGQ[J.#
-MKOV[Z]C`U(DJILZ\-)CTTJ#)"7\6K8G5'5$5SZXDW4DXY)JV>W2!<<;T@$:?
-M,'A=/\9-GU];Q&(XYOG?SJE]HQ353V@QG-WP#=!3*C=>+67U"B2:8\F_N7ID
-M8;RFN;`^=M'T[_(C?IM.I:>R:(MR!<I+14Z/1GX90=XS;\ITT>;@+Z+QG5@`
-M2"G"=//C^%C"D\^W1E:75S+H*3,GCU>^W>P0;&7BWEM0%Y>SM*)'K_6>[XE4
-MG^`9J5I!&DI>29K9.;D0EC'+D"@C%TI4#RTMB%H,NVN$Q4J;%:>>I"GC#:><
-M:^JK$O-(U)`W?:,L?5@0\J'UY$(?&I>2#11:"`'Q&?[!4+`%]?,=%/^2'KJ4
-M(FAUR57H2!/PH7I$HV@9)FK)<RSKBIQ3@FBP\E@[5+=Y:OJUN!DL#,E5)&!4
-M_RIMZ+8?![)R00@7$.BJTG24Q_;R,]*4'F3.H.UA#")`:QJ@*]7PE8^N!2)E
-M2_.S=NBZ6%=*"L<%?N^%,A%F[%$L%T3<OH'",5<9*QQS*2$:0,*QYMYJ7MO=
-MXNL>1_`2C`@-/`@=L`FHM0"R\B;J9_PA>U4%`>DN3#WR,M3V[2E+XZ,DN^[0
-MV2;%M=^.1A%0;Z.7%>.JB0W1]?5V!2G@*UCV9XHJH$8.XNW<(O`9RA\AU/F+
-M]R6$IVKB&-CN3=DL9<C70*!D1#:=V](WU!.IY9U3><YX>A6(5022%(STL2=H
-ME<N:AY4/OR!T579`BMAX>7O8I>>]-3]IYD+G09K,JZTEQ7MH-0\LPN<78SE=
-M8`J9)L3+N9G*--`:7,P.I:B-8PWMCDKZ4#)WE(FK5X<M,5L)6E'B>HG)HXH3
-MC+P<N4I.\UTMOD?0O3E&;^FL@NZ7+?B!;PD1#9?YWK1(!9AIK>-;OY=%M/?*
-M,4"ER?VIUVQ4)K)15@YW@FZUED\'7A6E/^#KOD7=>5O\R,1`],$4/[5=E82M
-M.C`^HB^S.@>;O>9R.(Z^SP#^,3]E,HJP_Z'<UTQ+#*W5^U]),BM"FB<GS:07
-M*"+7\KOOO!(3N#M+[CP(,>-S1%[!]Y=-SA]X+XB",?-3=*11<]:__<Z6&21M
-MTE9MC4[[HB>$UOUW9B(X*%^EO=4,[!3!&Y?(<GE?)K$DFU8TL3K<<'A?8GPJ
-M-0R_PV\N8\@,L#@ECZE?F;%M2HPJL_89P::)ZI?-&UAP!.BUCU1)UGAR_KPA
-MT%I/^'ZA>F>!5*KPY-LS"Q5MT[)FSCZ$XE0(WO6[FGR*MR0YW&C;T,H2K?X9
-M'J\!C[>,!,[S*:@B&VR;-7%`V7_8XQKJ93FG)]Z;ZG"RK&T,Q)_N==IB=>JI
-MRFWG'6_3-:N?O@`_D@*;\%1@5VAF\*,ZQWM*PQAZMCMB,?;,N@4UI#1'B$CW
-MT$ZPX8%"[=UE(:GL-$IRAA?&;A$3B_!E_R;)7U[K2TJ2#OAY).W4OP%HXHK[
-M1#!I*V:GL-2"DZSD-)P";+UW\P(@0B:DJ[#&D$@I,TNE`HL&Y"+*[O$OUY_K
-M=/8A6QIIZX^HKUBH7>]+".=`S'$(\7<P`[AN2[*[6V?:#';!8<&9])6-IO(W
-M4UL$U>2%34HGD[B4;5K3O(;!GO0E\8I-SNQ^F&FO@J0MT,FZ/;362U^"/0%Z
-MU>T#*:B5X]4<(A=%AT08%'H.P1[\T_QL@TUS9@^1EF;)Q)UFMMN?=B33S:-M
-MNU<DTU[^H;W("K3M.,.N2)C#UG+#6W(]0$-TS!OQ,.U/4"TPE5V;2@?.U4Q1
-M^Y@K.D[DT56<OZ\6+:HW4):A+M9(I)S^C_$#O>,AK>E;YJLSKV`)[S4TEZ36
-MR4A1U^\^:TP$*MW$)L<$\W>Q`?E),O3MZ76YY`T"K7V25@^"A>UQ"H\P[]VQ
-M'>UZ98I;]%/@F``WO`J`TMAC-]\5:ERE+LTLHM@U4S:;AKX,`;8O_OL52<1B
-M<8W`E;S65N'^BR\.O=\H8_/?!I)=>`_+$`TRCZ::#BD(<6B2>6F4IY&C[BJ:
-MZL$3J<3X'B]T#\[@'HH7H<@Q-ONM`1YVHRZ^HO0W_C.+LAD'E0C$XR>Q#I-<
-M9750\QN.,W3G-D12.[:8Z^A+>L1@B92.OD9VC_?0P:",[O2[^IO0&/G2ANRD
-MBG'M!2U<X/<8I)%!V><K[-LOL8;BY2&Y1+=?S;+'K576;P9GG@%.3E$GO4TS
-MT>F\<?P*MY>WH4.?PE*E4`+$S("Y4!M(O?JQLWE-N4==254UTWZWC_MS`*O%
-MD[)%P@`;B&=%4#6,R@%J\V5L_#@F3PNS"X%]D\$AJ%[5X\-6-G4>0EV80CXQ
-MK]=:+!IVEYC.YS#?Q>S2RO'*[?+/`MCPPU./FC8)X)JC>AT/FQBR7;,A='\V
-MVJ()]!"+:CV4!/$Y-K:P4*1"04[/SR(/RH>"F^YU2Z^:T1[9%]D%Z5<&8!P)
-MBI&<\=JF'YW\0)J"3I+UR.M%B-<EZN73QZK#N3AD&K`RN?)PF*1=0:U=F!,!
-M@<(&B7G+?RFX7?%/@6B0'](\X.26-YY:9^W.O)\=.ZNB,C5(M=<1[\M?36)T
-M]"<F=85,'@7^+E3F!@?:/R*/37T9"D%P:;H:=1?8>AK:\]^;-S#^!(WCOQ[\
-MQ/JWY`=_#F:U/8EO(LRBC],WZ*]GFPBS.,*NSAW2@L/2T(CWGZSQ84H5#=6Y
-MPCO'VHN+?=<(AU!@+J3L42<FY9Q!!KP[BY$GI3<CS5T0[O)5_L?Y(AGF''TM
-MF]H<4,F9KC6"KLVA:C:$RJ&3`#>(3<;D:'FI7PZ-($CZXK?(M2J;N=+(V]0B
-ME5=AB2VK/;B\.C/T]]"T#DPVR9[=Z[7/5#EYD#J<]<%O.:9OED.N&L?H9XP4
-METB`N4@CJRU2ZH]X[TG>R\SY<]M[L.R]O^UB.GZ&M\3TZ'E2(4-C1O:A*`,1
-M44C+G/?G8N8W!0F$$9_J,PW-R8UPM\N+STX1N`70A%6[%M:/N<QUQV%^`%2!
-M<M'ENZ*+:T]AFP+.>W#]/3.(I/`3WQFH`7B3=$R\T,9F1"M)8C5NJL-GOTTZ
-MHM+M5K][2B(-K]\IKF$VH/)&2*?I(H(E!/R6B(L_,J;2WV(D3;DTZX8R]\M"
-M2/M:8MJ"[-@;BR"HH;SDS&WJ7=A-VIS9=0/H1,]'QZWT!G/IPP?V>-B,2$KL
-M3)MR@K3;BET&'G)G9KC/595+GYN'Z;3JMPX-ZW<OCC6-LQUR[WX9LSW7^QSA
-MB!L)G7:^T9VEO6[WC]2ES*>FZG!`U_.^-25C8DE/\J7TR.+^VA,$:B"E][6S
-M,-KN);=USVNKCX^T\HWSYKR?6I3YC'^&,?#CL]M(+BQ%)>CR)E)X.IGS(K##
-M,,WC#8>,O*P-6Q3?UU^(22&>1MM.U$E10B22_1CW_4TT%YY#J0WI9^CBN_/"
-M:B*$R'OV:O@SC8E>@>`.8O9-ZF(_3:DK#@[ZPE2BC$A,PT@TX!_M(RN=!"I^
-MSN*U3_"L":<6G^XVX_J\&N.R"`%&JKF7]K$O)[3S6R_*,-I=MJ3[J:T\ZH-(
-M_MS.E-[A%I44U,%2T/1/L]T$HSAK>,`8M\&.,DS=%,LX$\1:G[I\+@^>62J!
-M'VTXDXE\R6^"SW7"312`J.6+_V[/SK#"6"-A<^\<RB]E(V6&?L`("HL1Y@:6
-M<:AO2JQZF15RV2OZ4IRDK<<-.W[%5`>)7@","G9(^!Z`A'QJF0]?YZ&J9<K5
-M6<[U(=Y=JQ=#7-K<^O-F/]BF\D[6?@"9&U!DV6:@X/1X4Q^N,&\PFO[K4JOZ
-M2QS)-;MB=.WZ85C_G"'<Q1D<KMEAH8OH.WPZARSV675A#@GB)(,#/1RKFT["
-MGHEL$KB\&VKWDSXDO2$B%+B&\J'8KI'7C\]&58D9534/$AS-8@/GA]N%KP>3
-MDP&#ML,HX/`#[_+W>_TF<V)J3VOY"@*Q`B-)!BW5/]E6:5_4P>$Z9P5G]$`/
-M+4#^#JM).YMA<:.*J'D$J?ONKF<DA"C!=^NCTIY@.+>??*<7L2QT!..'D1B&
-MI*LZ-@G_N;/@"RQ%198\^25R4\B-TE_Q5\U7`)YW%;_6]U-U)??57HP4WX&D
-M!O6=`!]?]FMKB3J5;9)TVG-).]TTR:<\7]?,<<EGP>3&S-/VWH^^;"`AZ`>?
-M4M\7!$?7GRKZO<[R0NB8:EX69@M&WXA8?E>)C!&M5.^!H<_L1V,JD91>"L7$
-M,I]5``LA0<!MA(>/T40IO9EAWII&4"ZM^>S\"V!>\EBL4\\DZK.?V7,9A$+5
-M6-?\0W@/UM!7`163NV[Y,QKS*/KO!('R9W)H[`A&)SHG_TM[&`A)6R\:Y>]=
-MB!25:/9M5.I2F[3738,_N3D_!Z#Y9?`J-#ZRO!0'43J*#3*FFA>OZPD!WL[?
-M\#?3G[`*/0`^52;!J":^],.$_..5MBEA.P/(`]$=F[-N-D10<B.$I;79JG%2
-M.RQP6)07FM=KCJ#3#T1O,YVP'.?.2F!*K:=:=:)!C?`7X)@%JK$:^<4AGPQ2
-MG.TL4F,9&7R7^<J>I@"_?""V2M0?E6K$)'V`[8"L4_^[;0O=S?*R"%5;-+%%
-MQ5E^UWM`N:-(B\*L\=#Q_T@4_[Y1&Q.7I^FY*!(4M*6A%U57$8DPM$>'Y)=^
-M.?<^1"\$&!&JM^4&KC7""5+1J&V5O*\<F#&,&DXH*[N<]$1O!1F$80[7G8@M
-M"'(UE]G6O^A$1@4<<@FL[[GC=6(</(V>TQRH/_%J.9?@)?S+)1*W9INP5R>V
-MX\:/!V811YV@ZI&T<";%U;#;/4%G!5%F4;$M^'^.-J8!SR;!/9WM%NT[A"18
-M6`/\X((+B2`6S.*E![/4&MPN:#9I[DG#(Q^D0%Z;YLQA1`6C-VY[-YS:I>/K
-M+0\*QIPWBVQG"K?D^J]^-\"([N5.$OS?I6I$WFL0_P^#J^<K4M@'CEQ/(BFR
-MK=X;X%8/QV_-J_>.'=E!3H:UBB-K;GP3&B8MFR]5<J8M5.,BBH;WIM]R#63\
-M`,WZ46PN-%FB+3%4QI1]WSDR"FCH<X,_+E<_>N*Q_H!6ZU(7@8:>Y!D`VWQ_
-M<&7@@)3DKDBAAM3]1)FJ\Y!Y;@#3]Q5N]+#WUDS7K9YCR)R"(X7<?QTVYXC8
-M(R-2JDD!%9-,`XK%68:!H-A8L8=%%AP\%AAOK?4ZH#KIIRY$B&L47#YC(K.+
-MZKP<'0#%+]JUQ]7&ZGEYA)S5SZ--SB&HW_E+"`_[72?0H<=,X=S\<*KGH3,J
-MK0I$U^]PDY8,`[G)C@,P?L%2]6+6%!+Q)7?CIW?K2.\#.4V+KF9\F0YVL4B#
-M.:(1-1CF0,X:=UP52N[.>@8!M6G$\K<>L+R]-IIUC&/J5=4F#YJG@<E[5)+]
-MG+@#\<+2L0B5!F%5WBH;M$-7'TBV@**)A69I*^!UEF+$+/:S_I>EF\=,;;X`
-M-3;%-8;PD:*T83G;2;DAP2S.8X9815&@R_`B<&=Y/G)T[-%RKL.JY&\/6V_N
-MN&D7%B2S,7!,3W?-5DIT"`$<$V.4!;+3MDIK!NXF:':@:XHK]@!-0PLGUA=5
-M/6UV1@6F@>!>^O[^,,.,-(Z][-XSU,M_JMJ($FL!8WJ3@DQ=YR.->CTJP7`2
-M\^G`32I:8AO(?S7IO&8='X!IH/_7;!V%YPA452Q_LJ=AC?,?-,\?%\<`'&[Z
-M5<X>?'E8=O&Q?B1TM0CYR.\+24$SX=%%-X!.C9)/N?W54ELW&UO96.EX-Y0[
-MI\46:ZQWV9B%PCM^OG:KL0J@RN57,.[+^LD<>T/NME.H[:$_>A<L1P#?;*X_
-MW3&YY3Q[R4;*$F$-Z6+P+4Q"=`>=?S?:!",QYV+.KG?U].40BE\\Y4RE;3*/
-M#N/ZFU,'):10@3C\65\?IQU12CI\@N2+;DV@R"*3<'--7B\R3[EX9IT31Q3R
-M:70RL/N<O7*R?`U9V\RNVP=D(27H8+FF1K0O=3MR!.M@X#0>DK"&RNMAXV("
-MZ<-Z@F<0(E%@[IE/6#*X>C[P-IE#QONK>M*"&7Z3J'E9O=K^BW<M</M]1R=.
-M-L1>C!>K7#,.D#5D5Y"95I`D-I:1(NC6L2*E(5DN_R_MS/0U9&QPWFG)G`#P
-M:T]5IS5RB.+\IAYS0XX&P5B3*452W)K21`10(J(]3P.MON5-1B#JZ"*#>L?`
-M'WH9E%*I7#H,[4*W9,,'W6T*[+NEBN`!!&T`Q.&3^H:1]HL[F%.DGH>[T>'/
-M:QV->LMHX>;U.CDN1U8I&>HYZAIV<>3\*'@0D:G96FP$4GJ8O'*]AA-N'##W
-M+8Q`9E<NP'#]#ZX&TO;KPW*C<0[>DFL/O<6L=Y(UOY0PZSI]A@104,Y]#;?"
-M$NMLAOF33.K6M'H=;=3QL"!+?NS9G/G5O/F7?$B$.++O&O)LEU/>QS[*ZD':
-ME*$KFX-=2].4J*J)FU3@$'W>%]4PQ_:B_2#:%[%KP=&G43BYX_NZ;'<K,&L9
-MAW-@PZETR51,WAMRU6J05)N&(58]_)K(`UG8R1I-K#T%XVE+R0W-N90YX.Q`
-MX[^-`8@=9$,;O*,"QM<1E;)(?[IEW7*[(`<-=1FT2&&5W61#NASD$13.X+%3
-MNH!>E1BG/`6KW;_9E/CT>;8%N/5HYS]I(+B63C/Z$.#\#6\>:]F$VS1.;;B.
-M!6B5Z,Z*?0MO3[-?''WY.Q7J645#D!O>_^\/B$E3+TFF%;V"=)!>-;Y<^:J+
-MUB&^B5.K2P!*Y&WQRG$,3T5T(_O:[MKOV&_K@W(?.GPE?E3S;8;5J/$+_)6\
-M8^P=L>YEO@Q@GJ],EPR.._N?;7?T+Y<OQ_I'5[>R35#K2U/OJ.@G!2O%N#E[
-M-CQN8[?I"C(O[B<W+5S4[5IFO,XG>R0W,;F-#8"V`1C!0I<G+TH6D\43I+;I
-MSD%M#=+P]JKB(3>**#YQG?!S96K?8&;VW79E&UVSDO3UJC8H[,K_J:0G<9BN
-MGR+SN<+>D-O-/V(,-2Q&>5;0OIA("W!W6/*3*#CV')^?A\-!-*#B+^QC!T<H
-MXK]MJ5?=OH_.(@`/=*FJ'$A'+QAMX.?5@%E,12ZUTP:T4S33EBU4%B9>32^%
-M-^^AQH'D@6>QWM6Z)\!7%?FFG<O)F#^\1D[0A$DUC9=,OEZ^<:G2K%<&D+?M
-MMEWZ\MK4;RREHIQRY>&BVQH8'>QBGIW0TI`#$*(!KE?R%G^S#Z'G6,T/8`U6
-M^ZGLWG4<]5DIUM6D4^3R.OI<L=LCQ7TNFP-+_$X_,[8$)+A:E-W\]<-17R.Y
-M61'8;]7(T`T"T3O%>OOT,)(=(C?IE_B5`-4CP4(S0.#ZU,$EW`QIG%%N[16@
-MC2D^W'5ZO7ZLGST37!A#A29!]1/_WS^M2%AN.T*^)8Z)VY&%$A1MVF)@OS;5
-M?$8A%94<?4,W/PT%HBA\!!==US=9>QP07U%8?E^`BK6!LT&61R]NF5A2,4Q<
-MJD4>H&3PH*J[;<&WA(6EWA!,Q#`8CY["\D9F`XUQ&,D$M,1/M$]K:'G:4S@7
-MI7QT.'I.D;F(&&],_')#C7-.`5FU4P9&]"V!BMG_&,7DT5:MKDJ9L#]Y]L#.
-MNPQ]7Y5#FS+6#[+K:3M)_B#A#?7+VY`VEXWWR%&>8=Y-(?MXK1-KU6*&U?J^
-M?!>L&E<.4)9=VZ/Q_6NY4S;70979!+[@C(H9QYH""ZO,#GP+LD-PP'3*>K;%
-MD&4_G+-IV78$1TW&Y#1R1ROEM,-4#ZQ8T>\-,H;=P1(#V>*5;@&9D[)(4?V/
-ME02\2T"0@[B]*?\PTK'M)"#OE4L.1\];@5YZ?'G44N4,7;]E.(H`)8\C\&Q_
-MKOUCT!Y?-K-&>`RGU4Y&%>`I%DC"<4#05E-+^^Q>/5HMH4LAX])^M8\P"#[R
-MN!.5"*&K48=DNF,2@34*FN1(IEP#W:(8S3#*E%.WTAUP/H!A`'X`]BUHA,!%
-M<+O"05/'@DY.!Q6#[UTF2OE`$0*^A%(0!]\AU<3]->?(_]M&XUY<T9T_5,I;
-MC,F7'IDADYIN)??P`AK4+9_-0*Y`@.DC>3/-D3N%'3@$B-B$[888)CO%PC=?
-M<+D5_U57<_[,$H/<KGVEBQ`6160!G2(BH.D^BGDQAT<<G9AU?_J7.%3L>(ZP
-MM`.V(J6*C*!Z(B`;("FF$EF)1TE;\@](SP)[0JW>8KG;X5<N^[G5>1X0];$G
-METI8+;!U0J(PV.,6'L>W-V%SWNQS/\M:X3/PO?A>L\CZ'K'N_*\M>==RG_GU
-MH.:;R:2[O-'+AAG@KD[&PX2!^&R,KJ:_!=+,NDK*-]-;>?!>7=OE$1DX+K59
-M\1O`M2JHR]@9(&%LO@R"A[$OSI0JP5V`40HW(]B*K]&,>7J2>4U7GP=[]PN<
-M]'P^T9O^;FP"$8Z6E8?J;O7&3N3!BESQ1X$8=BM\I",#7):`?=-G+4DMKJ!K
-M@F9QEOS5+DU71EX9%2D@TW#0T7>LL9B)=B+D7/%3@IL]+!]?JK$T567P=,.$
-M\03QC'2).RUWEUU6.G@X;CNL]ZKNL-NN@;-50Y,MBMWO7T65R3B=H-U+5`CU
-ML[EY0!Z<N'(<<,LOH?[#`8R4#"J2D^N$`NO5,(V-J.[47,OHX-"PNH^\UXJ1
-MKI=K.L4YW4[8O4'>7-'4H72'ZUVO03[@L;]5'D7G>/U1VQ5:W%6,12_JL-5)
-M_AC'PUF7=6Z+<QKZMK;3=(A_6L^(YP6[6^>X/@E]UM9'@U.\E`^C'U0(@2K-
-M_N%M7H[D7Y1342`9>=%'HY"#&1NFVE6/+V'O\3<4R5E\I5KP)Z_B?"-SWV\Z
-M-`K0*4#`<)"F"WG9^7GH1G7P:NDU/FJW+-7EOU0@F!6"8\`!Y>62JE%:SB#3
-M4=L.@4XN+;BFZG\)^[Y?P7U%/!7J*]L:@Y-<S9H9U[\PN['G6(R9=U&V\]LH
-MPDA`^%Z+S8:7J"YS;HU$J?G!>IHF]J(JQU*A""7L53#3`>(Y*D6T*JB1G[XL
-M'@%FDI:6`(DTU,LXI1^Y`56F%/%O';682K;=6K,=_)#];ASLVDV>6%/KD[1A
-MBS('5AOW8!TP`<YG'#RO$42R,)4#(WMSA*E97?/[UAZK!O=T_.J@=U+'=>^L
-MB<-&$6_CQC;BVPV5+/XYJ2I#5M["5[ZS*SH3`7)?OWAZG25?C)N,/DFDS'(X
-M3.Y=\^JV4IUM%>J*8#ADHM^*<C`/L2B8FQ5L-(O5ZG?'C!(_)`9>5TZ(PV!J
-M&VIDPY2Z[)*3NOX._P_/@1-AGT'[1>W(X+-"D*1B+`XRQ(82P7B6CE_33T?P
-M*0@:(THTL3_;5>$@UDA)<V^GTA7#L-WNHXYYW_'L=!E,S#];S>G#4^KE\"/E
-MXJAY>V#1WIY"#^1-+0D.+4(T$)(XYP0?&\7N#F[!KK7X`>PU5Y:YG>)\[XG4
-M"N#K;PEB@FH>CW`J+3VV'_.YPJUM=(;PR?T6W7Z;`C<GG(2E@4'8G._Z#T`_
-M)J7YK%O>+>7#^T="5,T"42%@'GQ3R[&D)15$`5DBO4X;P-1UM"\E%]=4@^9%
-M(GPRGW"+/X%UC"SK+[>T]Y2DPB*1;W!\9O;B32T.^.>!N-TDN*N!1MI\:N7P
-M<K*9<Y]=L6O?X62PI/GA]J+4R\L173,6QP1Z8ETOK-B@A>&6X#W7\M,MU]2)
-MLC=RZ"G)=DF<:JBFF2U]!_DB^QT@8)`KS>2P7"4Z,$G$<G+D)"_QC*U^W*,I
-MW@23@2QJ*RR@>+'F<F/,K,A&+?]68EG>YQ[U-!)P/C0`A0NG[2D^T6+H3X74
-MIX-"J\'653J/#)`I]$5C^M00M[9^L/=5+/O>T6,];.!%+#+T9%HDP%)^#TFC
-M_Y>UZK#-]_.`X8+1#>8J'JULUE0"R7D>SH-F.`6L+FLFGFDIZJO_:_92HI:`
-M[V3?"=0.5+>J;J&;8C:]/WAVOHC\XBS7YS%)E@I22V2:NKPF;WA]M,=95EZ)
-M&S-2KP8/B[0CZO9<:C$N]*AC;B95.0[TA,)`_ROE)$3-/P-!_\3'G,M=(++K
-M'=U#:.A.#1OBAO%BRK3DO+V<U"PF#9P6#'3,2HD[@PFI&</?BEJ%H#9D/%ES
-M$Y`[+6M1EJ[784NG7M\*'LN5;(4Y>LC!I\N\XC;NQ"H_-,^HJ6]1'8#_N_L.
-MK&N"J2J[NRTXH[XU66V1^)=BT_ODUD38[-C#'DZ*&B9>&+WM?4(*&A'#13C?
-MN4N^3N)0AN52(:%FJL4#+NH%!=[%XCU6.-\+^:I_!E-!KCV7,Y#CKM<*3$KY
-M-^YNH,K74'^<K\:><=J<+-.K"DMWQAY3`BG65W0TI?FB4C"B#;N=H5K!^.B@
-MI\!NM^R7.0(3@_VW<J0CG%H'!0AQ'L#60;<5N0K@[4*BTF+TKN(W\B'BQGG4
-M'DBF<19`$75U2^=W^CE..V_11$E86-^6V:H.ZVJ-Z)/:8X7@9TFYRN]?E!N$
-M:"8^8]]+#]*(6E<7T)$V.#/G:"/QYZK$@$4\`#94G/9?WD@LV:@BW<LMTYM'
-M08>WX78[+?RL_;NN@,E?]"``;+/-=ZA.WM4+J#X7$?3FR.+):$WZHS\_VF70
-MI_4@_P43CV%V'9Z.L%E_RG_:I"ZB(NYAEJ"Q!$5\H`_RDVT3BD,9VN>RL4>9
-M@T-:"?]!D0`SWVE?L!E1WUP(/SON(IILHQ7-C3$?@<!:"ZH#=Q(YMPMZ;,_R
-M[5L%&U(1T0ZU7:YS8[D:Z`Q3`C=AK"'?;/YSMZJNNZLG%*[\F!<+E4U433VF
-MWCQ3IV(""1&_)5&IFX'K85&-B9G=W2D$/\H^5[DSAQ>H-6&J45-6D6Y[3,[G
-M-LM-I!T36W]"!PSC`J(4&---W*RMM>+VC7U>W?=XUQ=7GF0;OPP&>>V+8UIX
-M6>=/&J84@KT#,NBIGR,?;0P_W(PJ_.LI6"Y\S^@/RMA]NEN"0B+^E[Z679=G
-ME$D]\<,ITD[WQ(I%3XQ]/%'+0U*4'-O>*5BXE:DX0<]E=+DO&,[]%VM`D;%C
-M:9B`ZTTFNKSME,K*#+$%8%W:A*F]P6@*^A3Z>Y<D2&^QR9]%T1_M)&<!VBWB
-MTYA'Q'A/D]L=LE%_0X0[-Q@0?]_(@PF;^-`VIVI/@#>,::YU?:->H%L+LR>(
-M3743+1"?98<,Z71Y=87$3KHF.,-\,815Y*:F2`+YR^R7YW9/#4+`R%?7Q+]@
-M&%R6(%S<\PL:2XN2#V_=G<"%D"BJCK3H.42M=M=+R$L^I7_UT*ZNYN1(8"&T
-MM@V[7F[65C0`RPGV!03$W>-II057<]_6IH>T#XEA/"[LP)RM@O1#/"O$2N-!
-M4\VS.&'M_7X:+L)6,;RC9U8%'>0QC_Y<QCH1A-D*0E*&##C?+Y2#HQ%PV.N?
-M)<ZYRC[K&K)$3B74(<MT)B2V2+",U\YO#X-H(M$7.4H)QUPI9L+^8.QNQ34<
-M9DWUR2^)8102C]F.+`RQRPH9/%2"&QDXE&49KN5-$9_"MYG*C_D=$Z+#0O9:
-M@V5\V.3X:R\[@2VC4K"J@E'[S.?ZC4UF!=ZKJ>N$1B'#3$6P`$&MRM:]%B0P
-MI4)9X1MC=_L1#T>XA/L6MWD^<U),3'<-5NNX2JY&*[A5$>.]DJ*OBU<!RYP*
-M7IA\&64FXV\^.($V;MZU*.;:7XS7"0@7(*I%>3]]OH/1CLRFO(TVCGUE`K17
-MA;[=OKO!I9?"=3>&D!`:@:!])5C?"%/VEYEC'A9VR*F`K2<GLS+"1)[[=X_D
-M;+>&3O;=J%%'?FU*6>:NJEW)4U*`(G7UI5/(B;:G*3.S(;__>_M'EVW=)P\6
-MN<..Z?.^\]WEIM1G="0WP3B$JY8R>3!L1M;<II@2BW5,G5]U$W@Z\%MOHP(9
-M;?I'#4Y5AFV3)#KJXA,8WN0B\%^/"$#%.^[I<&?>U\[""R!B35K!GX:'V)LY
-MNX"?O0KL"6^2^8!:E9O4;0#'0<.,B5RJ,$LP)T<C$*.=5&IWN?]EX$/Q[U?_
-MMG6N*Z7W(VW:R\UTT6@@%P;?*C1#2'^6RR%H12:R&Q"G>'>&B\MKYS)<73/V
-M7`-&,;(=$JIUD-A"[UBOY0'T\8JQH8;I*/%/9\_#NF=YB;CY(XZ>?++EU"B'
-M/NMO0NWU@D=QGF6XHU8C%VD&5H%6VBP?Y[D1'&BHS1R$B?/R@.LH4!%#:]:4
-M.B+RUT,8`S7XXDV:_1F/DP?\Q)LX#/]$*JHR(>F]0WE3*'/\?Q96S\9T!(Y1
-MG!5KNIJDM0_2O\E%`OF7_D&Z',`P$Z)\7Y+\\F/I/.ZUG)I0![2^1+H9[\7P
-M5+W5-$(.C-B%SQ6:Y$X9']3]Y?X?L(3G;<^@?*;FT,UX-ELEKH-*=Y)!:RXS
-MM@'6HOD@_>\URN?MV@*L0=4W!`I5@-1/0E?21%U`SI#>U!\;:0C,VC\R8Y^V
-M&*/Q7'7%S2+RO@$3X/=)*P7Y`L`]Y3D513V#:^#7\O^'$NA[_>0-I//L)3],
-M?6&?A*=\/,Q*)N(&=Q4`*MP8H66'`)(X*D"S/<4@BX$;_<GD#<C_M,I\H%Q>
-M$QR?5PF'TTLN>3>`P(Q)J%+TPW'N$2M.Z1E.*N5Z@B1V6]'YQ$]Q79F-"G9O
-M\K77QQ+$\)]T]9.7B/V:P=>(_CG`)9!=SAR"N5A2^[>1Y(512+%?K*]`^Y03
-M(G5+/@Z(?G-Z6D.EC;4]C]+`:."U8TVK8V-=?>+Y+\2I4-ZU9[`&KW+.#VRA
-MW'9`U/+`WY'X&[ZIVZ3;@1'D@*MQ=AVZM245'SFG(GLT(`T6\Z(%FT^/LA1(
-ML%JC%9(MC6.XC)NK;3[)_:78+YD)-<2T<JQJ%D%XZM>8Y+#8K8+L[YKLW.;L
-M#\_>0>47TBG>1W#U>6*=9-+>*XJ(@1:N3[[!AD45M,TCVF:/%)!,&S'T^C/I
-MZ<KFLW-;:CQ\:-'1+"[>3]=0?6.%D5<,77M[+K&W;"46[#;=W%*A-`EH9AS!
-MT-1XQ.)R5).>FW>0*V'>.;5*H`BPS?1@QIC-^1'*^6N`<PA%>=G.T6[9-?PR
-M*10DFZ5Z`XC!6L9K'6810=RISK9NG1,VTT@.L!\&"JJ8NB]NK5^^I_3KI8M^
-M]D%7=[_X+F%.<9][Y%/^[-I50_L3-QEE`P9HMQ5'3-I2&64.Y!,;;VZ9&UI8
-M*K((WW)QK:7]M7G!R\6'X7>\8AMG)%<!=,OZTWA=69!M_KRMW=4A?Y&%.\6D
-M>D078"1C6(%C\N)_B^)L(Q&BD+X-BM9Q9V9?<:+$M"(>,,\P]$!#11>G6ZJ0
-MG7%>I_"1`N_J3+Y8Y][(>$GMY=4M>)P:0A]!W/ZBKJ?P&?@<-">3S,]R_^4L
-MTQ+A4H8BHQ[+,HP!Y#<HB+FM&]LDR-B+Q:>#)%=NN&Q^6_)S^5^0$<L,70P^
-MN'`60BTMI[1!3&M]^#A?,/W_H!E70)#[I`$%ON8@+X$P_*"ON!4.TIK'KKXQ
-M&RX6U<FC\A3*`2;?:.GS4\@REI&:CY?FTLU,`WY'M>X1>+T*SO$]Y$09--E6
-MWY9\Q=31^A`J6;Q\!['XR01MPTF(LKDM!D49'NQ).D=ZS/TVJ84$Q(K6=?DR
-MAF.L0)GR*82(9NC.N!&;7S5QD>%,6ZA+R,)P8<\7XGV?[>UN98#QOQM&'40_
-MJ!&Z5ETFM:LEUWR&@S^;B>/L.7-DE(Z>\B[S2D.BJ/'QIJ4G,#5P0%G>:97L
-M9."_:KH87F_!"<Z*T8<NZCG`L*\=10`Q&C`!E8]L@T!$AVZ$0;>?MC3:RW,N
-M?O'1TE\8.W6.DAV4?'\.OGI@7];/H\3:@`-\OX_M474]*?U.T+>#H$6DV4V?
-MXO]",$7+'`V%H0:V;DA#<M$"'7/DL.*-^1?1':#R\:WWOU^$]HK?CZ$&;28%
-MF/`0!G]87L;L",\,9\C$YC#OK=,]T/GL_#]TBUAZ/:29SY"WN3V9HI5)*Y3V
-MQ3'^H@*>V;E9I$T"CA&F$1YFV>234);XZOG>*<`.6QX[QR6O2Y4Y"=G_W7:1
-M0]-H$/[C&KK8%T2?=V55]_=!,S+17/0)L%!?[.TFG/1([EMU=;T=:MP[SO`9
-M.D0^]Y?S0>QF!>B@X^@GK,>0!Q$H50"G"H6O*FIP>%=E$U,#JPWK78AX-238
-MBW]V)3)B9[(Z3-^U55Y$,Y??5MBKL/5O]U2@QW>X""RA?843K:!Q(!&-XB[R
-MSZ*Y.8VBDP-%VZN]4,$O+@^1J'S1P'%TY5K^#\RQ%+`9,WVQFB/^O<B4D[]`
-M5>Q>&9<_\YID51L)8R@TQ@-2G]<PZ3P]'1>94[Y#QR``(B(``B(B(`B48CWT
-M#:9+`.KIL\&<+Z#?_KT56D^=!)6:W\?`5>"9Q3M^O=Y+B0\A4NW&$US#F@OX
-M?BW*3PIQ0WSUGU[HB?$6=J:C1ROH'FL7M6JB[6?N:;O1]63P]FC]DM<7'K,L
-MW#*%*PF/T"W.K9`0_E($^CS$`^1E2Z,U$81U8'#01]E^KBBL?ZKV8<7.X[]/
-M]!8<5Y0-+@'L\$$KC"J<;V_9@\9",AW,%M5O+3(<Z2A-@$Z6#;!-3%%SB:Q,
-M_.58QW]72#"I0P_^4?UN,ZBMVW(U[G$79U>TS68>R14:$9!F),WC"VA`G;+I
-MA:_NS*TQ:@V'(.X.*Z053HI;K\8GH%/QD?BEH*F^Y*BV.#/3]Q2MH<8HTZI*
-M%J5WL\3YB+=!E2H5"=XXLVT=%-"N%7CNQ]6NK9[[/%^E1JVTUJBDI;U^[I2S
-MZMH?HE\7+,=L6F-@,QZ[Z"%;N_0`=4N+KW0TR^;2S`DX8G$`,=#-"W26`CBJ
-M]*WBXFL[^;OH0GR*@<W$T=-KE9H.1KR$8N^BJ^5KZ=JF?H!K([7I&8=L]9ST
-M8F24X"G=3Z,=+]-%4(9U>.SOEZ_^&I[?LB4-G(ZW;LS<U/;@C[8.5^O$X!?_
-M%49<LS0;JQ3&X\(H'X*[0?A6`\@GPW%&'#Y4/A1X;`7UM7LJ-[KEAC1,)T7X
-MWSUIX[(I\2]C+QVR:D\=59H/=XWNE/L/&:&0O<Z@_Q;4WI0+R*AS2(Z,=AJP
-M@^JJE'V$KX2(TR`11_L38][YVP]-J+C"M-<3>Q`(<*862`6E<LI-X.BZ-\)=
-M%B_;U+3E-IOA2J/"B&+C;"4]3WTZ%ZO?0Q!9W9/9@ZNPC`S<S3'6`1@OT<QW
-MFA#C>Z*#NUL`R3716+IKE>45,`!DV96SH0J=W#6>5)U@M>AX*0!U2[.N0NW$
-M*0#=@LPHJO2V#G%2VBGIVK?`"7<E&&@0IS33&`8:/19CE]9$;4!^>>%,:$)F
-M*1\>BPP!:5_*4[FBZ(<O[J$F/ZS><W0HJ4TCU.IUC,_!4D%)M_0ZJR(1IKZ'
-ME2JJ=/L@."]HE&_1)^!G0C34=(0['`>,#2H(O-&;)]_(U+"!-)<Z-U`%`,O*
-ML-.]4_PO[R]F\#;I1*2"7_IK'XW:C!R5$IG?CB&+A]2%^T5C$:4#3I<O^0V8
-M&=$!JLOFP&`29]U,J#IMN]N]2F\C)HA--%Q[()];IBD*.$'DEK?][W3QDY^J
-MX[Y&G^V=;<'A3&+L=+0$X,SATI`XP0KS]<RBX6*X(Q?^P56HQ\G;QVM<B$3G
-MP+TB%]T=<\N03SIDZ&`LVS!&$P:=/9Z=7+J&00+:&5>%1R%V1)FA0H2G7R[*
-MM^&^WZQP&PUY+00*`A>39^'))`5<0>2:PAE+R[,A'#O5-SY0@:;8#]$6LP)*
-MR7[>Z\=<FY2(/$3_M0+FP!13$-T/!_%'7#E/*)@RNQ8=A=[/;XDV;AV26A(8
-MB#%,Z#6'"^T^0MBA)'R9.^'?V#KTA19($>%LR7KZ-*T@:WVFM&KQJ-P:>$NS
-M$EO%'."?.,_ENBAV:%ZYJRM`OWU[)">!(AB3<E+>&>/JX[1+@&^3410##33;
-M-Y`FMV?X?REOA6H*0I+@,K54R&@R,[NHCB7<-3OH&QB_F,;KU7_T%7SC@S>^
-MN07.>B@B%[*\T!$B.?*FR%K/TH9@S2^&!'+OBEB5^[17P1<YL=[;4:?VA8CS
-MAQ=#D`NRBL@\]K>@P-NK&RB0PUIT)OE%H0!=.Z-?ZJ2/,J>FK7Z#HK5J&5R'
-M?&M%W;=S%8XM273[BT>&;X)U%A5YI=R+OS5IY=9+2O8"A,F]70:F$EP[B@I`
-M=_U`,<W$2RZ8&!U:%>"L=?:-`J+6DC)O3PH%%[Y^:KAE'5^^*DT-Y9/-K,:N
-M`V=:B[PY;/'WIX%<PPE5D=$U*:,R&#S=Q,I9GF'1L&D8W)*:^Q<47!XW>=\D
-MTZ1/Y3G?A:_\NN6/OR7V1Q9Q3KF.>""FU"P'8<;6S9,NWD)C59=J_XW;A9KF
-M99IP,F!<Q!A7\KI#U`M^]#(<05M%AM:'J<09`-<:$K;$"DU=SF/H[$PE/'-W
-MZ';2K*\97,$(M&/<J76*POK7[75!Z!S,/?QDGXEFU2-1T7CV?(*#0P3TPX_Q
-M]8PH0FA_8D67T&0U`4K#<2=LUPA7I>2>5;T*]W$"8ENZ^A$8+2[Y[L"@4F0_
-M"<^,C]]&\!7V5)=^>&S5__X<=S/H`"`$:*'+(K).WAZKWC4%*W]O+G"3%ESI
-M).7VFUQDMR*2GRH#VN:M3XL]]H3#BG,7ZUNI9(8JA&NY4\>(>F;]KSJ\529X
-MY_0K;8)/(GT0!,B%&7=',L#%$T;]G363YNE31U#7S\'V7^A%E*@%Z-.+9XTO
-MO`IK'Z`@.*_R7R7DY?7\5GA4ZY8&//YA7(B*XSL=T]MD]B@@E'>;S?@N3M3>
-M*A]XGP\+-%`92I(BUR>?"6\)6U[4?)1DNH\R+#BG4;L?-D2)P4W'/'W)2$C7
-M5>H9EOG13%VST,<QSE1,#8\Y,>,K/G`UPP)B6LYU\M+6\.PL<;+_Y"88^'FX
-M5R?XZ,X@@*7Q3B(.IGC=MV7YG+1>=<O-IC+X.,-P\?YL)SQ_0@4UG>1)I'$.
-MZA]R@5KY=YFN&Q(N7["&>C-=+DOI:9/,_L#NU240B+_HI4&$N2\!J"M4?JJ(
-MNHI:67WD&7K*=UY]R;%(BEN!8NU/X'6IA,*Y7'GC;<'--G;K5#%_TEV7;]:)
-M7''T7D1<11W@YOVYRE!8LV`0\?R9VAXKF!<22L@EP)H*K_@!X>M9S]V??C%U
-M(X<F#+:V/^'PB,YLE_[XSX'RE"])I[28P]L\YLM>"JY5[4#-54QK^T1@L)%B
-MQ+L$S%1\&"-#DE2N!.K#;9"?-4GSA'7`0THA/YM;/`PZ9&+@(-&9K#7Q12!F
-MZOQ-M<QM,`U<DNEH8_PD[$J6IUP4RDGIM/)E?+9D?+'?8LR4-ZZ5SNT%+@6,
-MV_`^;NF(3Z#"K-0!*>=_0G'IG=#35>+J2XE0$#2Z^.P?_*!%_<&U8$_V/RZM
-M\F`!ZACID'V(;F%1PZ'3+VF,R))&D+[+EFWI#>H>W<#)E/*V)+@J&;_:*!34
-M[@=G&[?#@_H6(N4R'5)4]3>A'Q^&772N3.=ZOVP(=)AC`'&=[R#(_&3D8?_)
-MO<FK3+4ZB<$!XU=]KM5R!"9-MOZOF&7&.;Z0L33.T-0_E%H>Z9R+$T>O(VC>
-M>N!JA@!88!.+,J_<_!;J$X<0Z8])HC3?9MK63CEZ=+OK5-T-&+*:#=#4.ZU1
-MUQ/4*RNCZABL^@?32Q$^W$M[.OKD4FG@S>Y]Z_D[$>74B*!X]4COZ%R5E6U<
-M*+A8^M+K@3-!^E`QA-B\=ZKD")GI\LI)>C^#]R>@?$X8F^.IIL%K8Z@"$E=!
-MA-1#L'H[N`N"Q4JD2E_C2\6Z.;S,!.Y?.8<>VH63RN1,%'S8VIS7R3-"WS72
-M(M^"`@"+-X<PC'JISJ3`KCQ0OZT9"^<UL*>MWJ,H/#DF?V*BVNLA@2(NG6_W
-MLX^4@^-QY*>%N6/IW`&%J<E/XO#.<MUVH6/EDS;$9,LPE/N-*.^K4E(L/*\S
-M%"0[-H1<[L;&$-SO4R2@E]!$E&W@E0<,]PJ/U\L&+OFL;2"&7T-JF1F$$3\P
-M-INM#<G"95%YA\^85H<L-&1'L=TA6`3)PV%4]=KAMCC9X"6^QN4\AH"W(I:1
-M17"WFS6ZXN902EUKB+0`DA^?`R'5Z%G80KKPP>^YS"7K^];J4)P7XPW'HNGP
--^K_XNY(IPH2"!#,T>```
-`
-end
diff --git a/sbin/gbde/template.txt b/sbin/gbde/template.txt
deleted file mode 100644
index 6de6c6b0b485..000000000000
--- a/sbin/gbde/template.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Sector size is the smallest unit of data which can be read or written.
-# Making it too small decreases performance and decreases available space.
-# Making it too large may prevent filesystems from working. 512 is the
-# minimum and always safe. For UFS, use the fragment size
-#
-sector_size = 512
-
-#
-# Start and end of the encrypted section of the partition. Specify in
-# sector numbers. If none specified, "all" will be assumed, to the
-# extent the value of this can be established.
-#
-#first_sector = 0
-#last_sector = 2879
-#total_sectors = 2880
-
-#
-# An encrypted partition can have more than one key. It may be a good idea
-# to make at least two keys, and save one of them for "just in case" use.
-# The minimum is obviously one and the maximum is 4.
-#
-number_of_keys = 4
-
-#
-# Flushing the partition with random bytes prevents a brute-force attack
-# from skipping sectors which obviously contains un-encrypted data.
-# NB: This variable is boolean, if it is present it means "yes" even if
-# you set it to the value "no"
-#
-#random_flush =
diff --git a/sbin/gbde/test.sh b/sbin/gbde/test.sh
deleted file mode 100644
index 502bfd8dbd68..000000000000
--- a/sbin/gbde/test.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-
-set -e
-
-MD=99
-mdconfig -d -u $MD > /dev/null 2>&1 || true
-
-mdconfig -a -t malloc -s 1m -u $MD
-
-D=/dev/md$MD
-
-./gbde init $D -P foo -L /tmp/_l1
-./gbde setkey $D -p foo -l /tmp/_l1 -P bar -L /tmp/_l1
-./gbde setkey $D -p bar -l /tmp/_l1 -P foo -L /tmp/_l1
-
-./gbde setkey $D -p foo -l /tmp/_l1 -n 2 -P foo2 -L /tmp/_l2
-./gbde setkey $D -p foo2 -l /tmp/_l2 -n 3 -P foo3 -L /tmp/_l3
-./gbde setkey $D -p foo3 -l /tmp/_l3 -n 4 -P foo4 -L /tmp/_l4
-./gbde setkey $D -p foo4 -l /tmp/_l4 -n 1 -P foo1 -L /tmp/_l1
-
-./gbde nuke $D -p foo1 -l /tmp/_l1 -n 4
-if ./gbde nuke $D -p foo4 -l /tmp/_l4 -n 3 ; then false ; fi
-./gbde destroy $D -p foo2 -l /tmp/_l2
-if ./gbde destroy $D -p foo2 -l /tmp/_l2 ; then false ; fi
-
-./gbde nuke $D -p foo1 -l /tmp/_l1 -n -1
-if ./gbde nuke $D -p foo1 -l /tmp/_l1 -n -1 ; then false ; fi
-if ./gbde nuke $D -p foo2 -l /tmp/_l2 -n -1 ; then false ; fi
-if ./gbde nuke $D -p foo3 -l /tmp/_l3 -n -1 ; then false ; fi
-if ./gbde nuke $D -p foo4 -l /tmp/_l4 -n -1 ; then false ; fi
-
-rm -f /tmp/_l1 /tmp/_l2 /tmp/_l3 /tmp/_l4
-
-./gbde init $D -P foo
-./gbde setkey $D -p foo -P bar
-./gbde setkey $D -p bar -P foo
-
-./gbde setkey $D -p foo -n 2 -P foo2
-./gbde setkey $D -p foo2 -n 3 -P foo3
-./gbde setkey $D -p foo3 -n 4 -P foo4
-./gbde setkey $D -p foo4 -n 1 -P foo1
-
-mdconfig -d -u $MD
-
-mdconfig -a -t malloc -s 1m -u $MD
-if [ -f image.uu ] ; then
- uudecode -p image.uu | bzcat > $D
-else
- uudecode -p ${1}/image.uu | bzcat > $D
-fi
-
-if [ `md5 < $D` != "a4066a739338d451b919e63f9ee4a12c" ] ; then
- echo "Failed to set up md(4) device correctly"
- exit 2
-fi
-
-./gbde attach $D -p foo
-fsck_ffs ${D}.bde
-./gbde detach $D
-mdconfig -d -u $MD
-
-
-echo "***********"
-echo "Test passed"
-echo "***********"
-exit 0
diff --git a/sbin/ggate/ggatel/ggatel.8 b/sbin/ggate/ggatel/ggatel.8
index 1ac41ed9eaa7..816a5b9a6e0e 100644
--- a/sbin/ggate/ggatel/ggatel.8
+++ b/sbin/ggate/ggatel/ggatel.8
@@ -125,27 +125,9 @@ To get details about the failure,
should be called with the
.Fl v
option.
-.Sh EXAMPLES
-.Dq GEOMify
-the
-.Dq Li fd0
-device and use
-.Xr gbde 8
-to encrypt data on a floppy disk.
-.Bd -literal -offset indent
-ggatel create -u 5 /dev/fd0
-gbde init /dev/ggate5
-gbde attach ggate5
-newfs /dev/ggate5.bde
-mount /dev/ggate5.bde /secret
-cp /private/foo /secret/
-umount /secret
-gbde detach ggate5
-ggatel destroy -u 5
.Ed
.Sh SEE ALSO
.Xr geom 4 ,
-.Xr gbde 8 ,
.Xr ggatec 8 ,
.Xr ggated 8 ,
.Xr mount 8 ,
diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c
index dd09838b5d8b..36b5d85ab7b8 100644
--- a/sbin/ifconfig/carp.c
+++ b/sbin/ifconfig/carp.c
@@ -68,6 +68,9 @@ static int carpr_state = -1;
static struct in_addr carp_addr;
static struct in6_addr carp_addr6;
static unsigned char const *carpr_key;
+static carp_version_t carpr_version;
+static uint8_t carpr_vrrp_prio;
+static uint16_t carpr_vrrp_adv_inter;
static void
carp_status(if_ctx *ctx)
@@ -79,19 +82,28 @@ carp_status(if_ctx *ctx)
return;
for (size_t i = 0; i < carpr[0].carpr_count; i++) {
- printf("\tcarp: %s vhid %d advbase %d advskew %d",
- carp_states[carpr[i].carpr_state], carpr[i].carpr_vhid,
- carpr[i].carpr_advbase, carpr[i].carpr_advskew);
- if (ctx->args->printkeys && carpr[i].carpr_key[0] != '\0')
- printf(" key \"%s\"\n", carpr[i].carpr_key);
- else
- printf("\n");
-
- inet_ntop(AF_INET6, &carpr[i].carpr_addr6, addr_buf,
- sizeof(addr_buf));
-
- printf("\t peer %s peer6 %s\n",
- inet_ntoa(carpr[i].carpr_addr), addr_buf);
+ switch (carpr[i].carpr_version) {
+ case CARP_VERSION_CARP:
+ printf("\tcarp: %s vhid %d advbase %d advskew %d",
+ carp_states[carpr[i].carpr_state], carpr[i].carpr_vhid,
+ carpr[i].carpr_advbase, carpr[i].carpr_advskew);
+ if (ctx->args->printkeys && carpr[i].carpr_key[0] != '\0')
+ printf(" key \"%s\"\n", carpr[i].carpr_key);
+ else
+ printf("\n");
+
+ inet_ntop(AF_INET6, &carpr[i].carpr_addr6, addr_buf,
+ sizeof(addr_buf));
+
+ printf("\t peer %s peer6 %s\n",
+ inet_ntoa(carpr[i].carpr_addr), addr_buf);
+ break;
+ case CARP_VERSION_VRRPv3:
+ printf("\tvrrp: %s vrid %d prio %d interval %d\n",
+ carp_states[carpr[i].carpr_state], carpr[i].carpr_vhid,
+ carpr[i].carpr_vrrp_prio, carpr[i].carpr_vrrp_adv_inter);
+ break;
+ }
}
}
@@ -137,6 +149,12 @@ setcarp_callback(if_ctx *ctx, void *arg __unused)
if (! IN6_IS_ADDR_UNSPECIFIED(&carp_addr6))
memcpy(&carpr.carpr_addr6, &carp_addr6,
sizeof(carp_addr6));
+ if (carpr_version != 0)
+ carpr.carpr_version = carpr_version;
+ if (carpr_vrrp_prio != 0)
+ carpr.carpr_vrrp_prio = carpr_vrrp_prio;
+ if (carpr_vrrp_adv_inter != 0)
+ carpr.carpr_vrrp_adv_inter = carpr_vrrp_adv_inter;
if (ifconfig_carp_set_info(lifh, ctx->ifname, &carpr))
err(1, "SIOCSVH");
@@ -226,6 +244,31 @@ setcarp_mcast6(if_ctx *ctx __unused, const char *val __unused, int dummy __unuse
carp_addr6.s6_addr[15] = 0x12;
}
+static void
+setcarp_version(if_ctx *ctx __unused, const char *val, int dummy __unused)
+{
+ carpr_version = atoi(val);
+
+ if (carpr_version != CARP_VERSION_CARP && carpr_version != CARP_VERSION_VRRPv3)
+ errx(1, "version must be %d or %d", CARP_VERSION_CARP,
+ CARP_VERSION_VRRPv3);
+}
+
+static void
+setvrrp_prio(if_ctx *ctx __unused, const char *val, int dummy __unused)
+{
+ carpr_vrrp_prio = atoi(val);
+}
+
+static void
+setvrrp_interval(if_ctx *ctx __unused, const char *val, int dummy __unused)
+{
+ carpr_vrrp_adv_inter = atoi(val);
+
+ if (carpr_vrrp_adv_inter == 0 || carpr_vrrp_adv_inter > VRRP_MAX_INTERVAL)
+ errx(1, "vrrpinterval must be greater than 0 and less than %d", VRRP_MAX_INTERVAL);
+}
+
static struct cmd carp_cmds[] = {
DEF_CMD_ARG("advbase", setcarp_advbase),
DEF_CMD_ARG("advskew", setcarp_advskew),
@@ -236,6 +279,9 @@ static struct cmd carp_cmds[] = {
DEF_CMD("mcast", 0, setcarp_mcast),
DEF_CMD_ARG("peer6", setcarp_peer6),
DEF_CMD("mcast6", 0, setcarp_mcast6),
+ DEF_CMD_ARG("carpver", setcarp_version),
+ DEF_CMD_ARG("vrrpprio", setvrrp_prio),
+ DEF_CMD_ARG("vrrpinterval", setvrrp_interval),
};
static struct afswtch af_carp = {
.af_name = "af_carp",
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index e8a18d08635b..e91dff6e59fd 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 08, 2023
+.Dd May 12, 2024
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -135,7 +135,7 @@ and their associated
.Ar format
strings are:
.Pp
-.Bl -tag -width ether
+.Bl -tag -width default
.It Cm addr
Adjust the display of inet and inet6 addresses:
.Pp
@@ -200,6 +200,16 @@ Integer format, for example:
.Ql prefixlen 64
.El
.El
+.Pp
+In addition, the following shortcuts are accepted:
+.Bl -tag -width default
+.It Cm default
+Resets all formats to their default values.
+.It Cm cidr
+Shortcut notation for
+.Cm inet:cidr,inet6:cidr .
+.El
+.Pp
.It Fl G Ar groupname
Exclude members of the specified
.Ar groupname
@@ -462,13 +472,17 @@ sending out requests and listening for replies.
.It Cm stickyarp
Enable the so-called sticky ARP mode for the interface.
If this option is enabled on the given interface, any resolved address is
-marked as a static one and never expires. This may be used to increase
+marked as a static one and never expires.
+This may be used to increase
security of the network by preventing ARP spoofing or to reduce latency for
high-performance Ethernet networks where the time needed for ARP resolution is
-too high. Please note that a similar feature is also provided for bridges. See
+too high.
+Please note that a similar feature is also provided for bridges.
+See
the sticky option in the
.Sx Bridge Interface Parameters
-section. Enabling this
+section.
+Enabling this
option may impact techniques which rely on ARP expiration/overwriting feature
such as load-balancers or high-availabity solutions such as
.Xr carp 4 .
@@ -1226,8 +1240,8 @@ Set the interval at which beacon frames are sent when operating in
ad-hoc or ap mode.
The
.Ar interval
-parameter is specified in TU's (1024 usecs).
-By default beacon frames are transmitted every 100 TU's.
+parameter is specified in TUs (1024 usecs).
+By default beacon frames are transmitted every 100 TUs.
.It Cm bmissthreshold Ar count
Set the number of consecutive missed beacons at which the station
will attempt to roam (i.e., search for a new access point).
@@ -1884,8 +1898,8 @@ Use
.Fl powersave
to disable powersave operation when operating as a client.
.It Cm powersavesleep Ar sleep
-Set the desired max powersave sleep time in TU's (1024 usecs).
-By default the max powersave sleep time is 100 TU's.
+Set the desired max powersave sleep time in TUs (1024 usecs).
+By default the max powersave sleep time is 100 TUs.
.It Cm protmode Ar technique
For interfaces operating in 802.11g, use the specified
.Ar technique
@@ -3151,6 +3165,20 @@ announcements to.
Restore the default destination address for (IPv4)
.Xr carp 4
announcements, which is ff02::12.
+.It Cm carpver
+Set the protocol version.
+Valid choices are 2 (for
+.Xr carp 4)
+and 3 (for VRRPv3).
+This can only be set when
+.Xr carp 4
+is initiated.
+.It Cm vrrpprio
+Set the VRRPv3 priority.
+Valid values are 1-255.
+.It Cm vrrpinterval
+Set the VRRPv3 Master Advertisement Interval.
+Values are in centiseconds.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 2cbe7a881bd0..a8bd5a0c89db 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -313,14 +313,10 @@ cmpifaddrs(struct ifaddrs *a, struct ifaddrs *b, struct ifa_queue *q)
static void freeformat(void)
{
- if (f_inet != NULL)
- free(f_inet);
- if (f_inet6 != NULL)
- free(f_inet6);
- if (f_ether != NULL)
- free(f_ether);
- if (f_addr != NULL)
- free(f_addr);
+ free(f_inet);
+ free(f_inet6);
+ free(f_ether);
+ free(f_addr);
}
static void setformat(char *input)
@@ -330,9 +326,18 @@ static void setformat(char *input)
formatstr = strdup(input);
while ((category = strsep(&formatstr, ",")) != NULL) {
modifier = strchr(category, ':');
- if (modifier == NULL || modifier[1] == '\0') {
- warnx("Skipping invalid format specification: %s\n",
- category);
+ if (modifier == NULL) {
+ if (strcmp(category, "default") == 0) {
+ freeformat();
+ } else if (strcmp(category, "cidr") == 0) {
+ free(f_inet);
+ f_inet = strdup(category);
+ free(f_inet6);
+ f_inet6 = strdup(category);
+ } else {
+ warnx("Skipping invalid format: %s\n",
+ category);
+ }
continue;
}
@@ -340,14 +345,19 @@ static void setformat(char *input)
modifier[0] = '\0';
modifier++;
- if (strcmp(category, "addr") == 0)
+ if (strcmp(category, "addr") == 0) {
+ free(f_addr);
f_addr = strdup(modifier);
- else if (strcmp(category, "ether") == 0)
+ } else if (strcmp(category, "ether") == 0) {
+ free(f_ether);
f_ether = strdup(modifier);
- else if (strcmp(category, "inet") == 0)
+ } else if (strcmp(category, "inet") == 0) {
+ free(f_inet);
f_inet = strdup(modifier);
- else if (strcmp(category, "inet6") == 0)
+ } else if (strcmp(category, "inet6") == 0) {
+ free(f_inet6);
f_inet6 = strdup(modifier);
+ }
}
free(formatstr);
}
@@ -612,8 +622,6 @@ main(int ac, char *av[])
.io_s = -1,
};
- f_inet = f_inet6 = f_ether = f_addr = NULL;
-
lifh = ifconfig_open();
if (lifh == NULL)
err(EXIT_FAILURE, "ifconfig_open");
diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c
index a79ea35bc14b..0a2603f1736f 100644
--- a/sbin/ifconfig/ifvlan.c
+++ b/sbin/ifconfig/ifvlan.c
@@ -60,6 +60,7 @@
#include "ifconfig.h"
#define NOTAG ((u_short) -1)
+#define NOPROTO ((u_short) -1)
static const char proto_8021Q[] = "802.1q";
static const char proto_8021ad[] = "802.1ad";
@@ -67,7 +68,7 @@ static const char proto_qinq[] = "qinq";
static struct vlanreq params = {
.vlr_tag = NOTAG,
- .vlr_proto = ETHERTYPE_VLAN,
+ .vlr_proto = NOPROTO,
};
static void
@@ -157,6 +158,8 @@ vlan_create(if_ctx *ctx, struct ifreq *ifr)
errx(1, "must specify a tag for vlan create");
if (params.vlr_parent[0] == '\0')
errx(1, "must specify a parent device for vlan create");
+ if (params.vlr_proto == NOPROTO)
+ params.vlr_proto = ETHERTYPE_VLAN;
ifr->ifr_data = (caddr_t) &params;
}
ifcreate_ioctl(ctx, ifr);
@@ -173,6 +176,8 @@ static void
vlan_set(int s, struct ifreq *ifr)
{
if (params.vlr_tag != NOTAG && params.vlr_parent[0] != '\0') {
+ if (params.vlr_proto == NOPROTO)
+ params.vlr_proto = ETHERTYPE_VLAN;
ifr->ifr_data = (caddr_t) &params;
if (ioctl(s, SIOCSETVLAN, (caddr_t)ifr) == -1)
err(1, "SIOCSETVLAN");
@@ -196,8 +201,16 @@ setvlantag(if_ctx *ctx, const char *val, int dummy __unused)
errx(1, "value for vlan out of range");
if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) {
- vreq.vlr_tag = params.vlr_tag;
- memcpy(&params, &vreq, sizeof(params));
+ /*
+ * Retrieve the current settings if the interface has already
+ * been configured.
+ */
+ if (vreq.vlr_parent[0] != '\0') {
+ if (params.vlr_parent[0] == '\0')
+ strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ);
+ if (params.vlr_proto == NOPROTO)
+ params.vlr_proto = vreq.vlr_proto;
+ }
vlan_set(ctx->io_s, &ifr);
}
}
@@ -230,8 +243,16 @@ setvlanproto(if_ctx *ctx, const char *val, int dummy __unused)
errx(1, "invalid value for vlanproto");
if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) {
- vreq.vlr_proto = params.vlr_proto;
- memcpy(&params, &vreq, sizeof(params));
+ /*
+ * Retrieve the current settings if the interface has already
+ * been configured.
+ */
+ if (vreq.vlr_parent[0] != '\0') {
+ if (params.vlr_parent[0] == '\0')
+ strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ);
+ if (params.vlr_tag == NOTAG)
+ params.vlr_tag = vreq.vlr_tag;
+ }
vlan_set(ctx->io_s, &ifr);
}
}
diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c
index 5a898c72032d..d1980765ef93 100644
--- a/sbin/ipf/common/lexer.c
+++ b/sbin/ipf/common/lexer.c
@@ -10,6 +10,7 @@
# include "netinet/ip_scan.h"
#endif
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <syslog.h>
#ifdef TEST_LEXER
# define NO_YACC
@@ -675,7 +676,7 @@ yysetfixeddict(wordtab_t *newdict)
if (yydebug)
printf("yysetfixeddict(%lx)\n", (u_long)newdict);
- if (yysavedepth == sizeof(yysavewords)/sizeof(yysavewords[0])) {
+ if (yysavedepth == nitems(yysavewords)) {
fprintf(stderr, "%d: at maximum dictionary depth\n",
yylineNum);
return;
@@ -694,7 +695,7 @@ yysetdict(wordtab_t *newdict)
if (yydebug)
printf("yysetdict(%lx)\n", (u_long)newdict);
- if (yysavedepth == sizeof(yysavewords)/sizeof(yysavewords[0])) {
+ if (yysavedepth == nitems(yysavewords)) {
fprintf(stderr, "%d: at maximum dictionary depth\n",
yylineNum);
return;
diff --git a/sbin/ipf/libipf/facpri.c b/sbin/ipf/libipf/facpri.c
index 9f66cedc7df5..9325a03c8dc3 100644
--- a/sbin/ipf/libipf/facpri.c
+++ b/sbin/ipf/libipf/facpri.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <limits.h>
-#include <sys/types.h>
+#include <sys/param.h>
#if !defined(__SVR4) && !defined(__svr4__)
#include <strings.h>
#endif
@@ -76,7 +76,7 @@ fac_toname(int facpri)
fac = facpri & LOG_FACMASK;
j = fac >> 3;
- if (j < (sizeof(facs)/sizeof(facs[0]))) {
+ if (j < nitems(facs)) {
if (facs[j].value == fac)
return (facs[j].name);
}
diff --git a/sbin/ipfw/dummynet.c b/sbin/ipfw/dummynet.c
index 9663e983b31a..6714b2af3124 100644
--- a/sbin/ipfw/dummynet.c
+++ b/sbin/ipfw/dummynet.c
@@ -22,7 +22,7 @@
#define NEW_AQM
#include <sys/limits.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/socket.h>
/* XXX there are several sysctl leftover here */
#include <sys/sysctl.h>
@@ -1401,7 +1401,7 @@ ipfw_config_pipe(int ac, char **av)
*/
if (p)
p->bandwidth = -1;
- for (j = 0; j < sizeof(fs->par)/sizeof(fs->par[0]); j++)
+ for (j = 0; j < nitems(fs->par); j++)
fs->par[j] = -1;
while (ac > 0) {
double d;
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 72927e336fa8..51eae7e8e246 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -4035,8 +4035,8 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
rblen = *rbufsize / sizeof(uint32_t);
rblen -= sizeof(struct ip_fw_rule) / sizeof(uint32_t);
- ablen = sizeof(actbuf) / sizeof(actbuf[0]);
- cblen = sizeof(cmdbuf) / sizeof(cmdbuf[0]);
+ ablen = nitems(actbuf);
+ cblen = nitems(cmdbuf);
cblen -= F_INSN_SIZE(ipfw_insn_u32) + 1;
#define CHECK_RBUFLEN(len) { CHECK_LENGTH(rblen, len); rblen -= len; }
diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c
index 7901950acadd..4c783e02f856 100644
--- a/sbin/ipfw/tables.c
+++ b/sbin/ipfw/tables.c
@@ -1037,6 +1037,9 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add,
}
}
+ /* Get real OS error */
+ error = errno;
+
/* Report results back */
ptent = tent_buf;
for (i = 0; i < count; ptent++, i++) {
@@ -1089,8 +1092,6 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add,
if (error == 0)
return;
- /* Get real OS error */
- error = errno;
/* Try to provide more human-readable error */
switch (error) {
diff --git a/sbin/mdconfig/mdconfig.8 b/sbin/mdconfig/mdconfig.8
index 938d6ddf12b0..73d4b30aac35 100644
--- a/sbin/mdconfig/mdconfig.8
+++ b/sbin/mdconfig/mdconfig.8
@@ -333,7 +333,7 @@ mdconfig -rs 2g -u md3
.Ed
.Pp
Create a 1 gigabyte swap backed disk, initialize an
-.Xr ffs 7
+.Xr ffs 4
file system on it, and mount it on
.Pa /tmp :
.Bd -literal -offset indent
@@ -366,8 +366,8 @@ mount /dev/md1.nop /mnt
.Xr fpathconf 2 ,
.Xr fspacectl 2 ,
.Xr open 2 ,
+.Xr ffs 4 ,
.Xr md 4 ,
-.Xr ffs 7 ,
.Xr gpart 8 ,
.Xr mdmfs 8 ,
.Xr malloc 9 ,
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 740f800e3e79..d49eb6ed08e5 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -56,7 +56,7 @@
static struct md_ioctl mdio;
static enum {UNSET, ATTACH, DETACH, RESIZE, LIST} action = UNSET;
-static int nflag;
+static int md_fd, nflag;
static void usage(void) __dead2;
static void md_set_file(const char *);
@@ -65,6 +65,7 @@ static int md_query(const char *, const int, const char *);
static int md_list(const char *, int, const char *);
static char *geom_config_get(struct gconf *g, const char *name);
static void md_prthumanval(char *length);
+static void print_options(const char *s, const char *);
#define OPT_VERBOSE 0x01
#define OPT_UNIT 0x02
@@ -86,11 +87,11 @@ usage(void)
" mdconfig -l [-v] [-n] [-f file] [-u unit]\n"
" mdconfig file\n");
fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
- fprintf(stderr, "\t\toption = {cache, cluster, compress, force,\n");
- fprintf(stderr, "\t\t mustdealloc, readonly, reserve, ro,\n");
- fprintf(stderr, "\t\t verify}\n");
+ fprintf(stderr, "\t\toption = {async, cache, cluster, compress,\n");
+ fprintf(stderr, "\t\t force, mustdealloc, readonly, ro,\n");
+ fprintf(stderr, "\t\t reserve, verify}\n");
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
- fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB), \n");
+ fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB),\n");
fprintf(stderr, "\t\t %%dt (TB), or %%dp (PB)\n");
exit(1);
}
@@ -98,7 +99,7 @@ usage(void)
int
main(int argc, char **argv)
{
- int ch, fd, i, vflag;
+ int ch, i, vflag;
char *p;
char *fflag = NULL, *sflag = NULL, *tflag = NULL, *uflag = NULL;
@@ -366,12 +367,12 @@ main(int argc, char **argv)
if (!kld_isloaded("g_md") && kld_load("geom_md") == -1)
err(1, "failed to load geom_md module");
- fd = open(_PATH_DEV MDCTL_NAME, O_RDWR, 0);
- if (fd < 0)
+ md_fd = open(_PATH_DEV MDCTL_NAME, O_RDWR, 0);
+ if (md_fd < 0)
err(1, "open(%s%s)", _PATH_DEV, MDCTL_NAME);
if (action == ATTACH) {
- i = ioctl(fd, MDIOCATTACH, &mdio);
+ i = ioctl(md_fd, MDIOCATTACH, &mdio);
if (i < 0)
err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
if (mdio.md_options & MD_AUTOUNIT)
@@ -379,13 +380,13 @@ main(int argc, char **argv)
} else if (action == DETACH) {
if (mdio.md_options & MD_AUTOUNIT)
errx(1, "-d requires -u");
- i = ioctl(fd, MDIOCDETACH, &mdio);
+ i = ioctl(md_fd, MDIOCDETACH, &mdio);
if (i < 0)
err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
} else if (action == RESIZE) {
if (mdio.md_options & MD_AUTOUNIT)
errx(1, "-r requires -u");
- i = ioctl(fd, MDIOCRESIZE, &mdio);
+ i = ioctl(md_fd, MDIOCRESIZE, &mdio);
if (i < 0)
err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
} else if (action == LIST) {
@@ -399,11 +400,71 @@ main(int argc, char **argv)
return (md_query(uflag, vflag, fflag));
} else
usage();
- close(fd);
+ close(md_fd);
return (0);
}
static void
+print_options(const char *dev, const char *file)
+{
+ struct md_ioctl mdiox;
+ int unit;
+ char sep = '\0';
+
+ if (sscanf(dev, "md%d", &unit) != 1)
+ err(1, "invalid device: %s", dev);
+
+ memset(&mdiox, 0, sizeof(mdiox));
+ mdiox.md_version = MDIOVERSION;
+ mdiox.md_unit = unit;
+ mdiox.md_file = file[0] == '-' ? NULL : strdup(file);
+
+ if (ioctl(md_fd, MDIOCQUERY, &mdiox) < 0)
+ err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
+
+ if (mdiox.md_file != NULL)
+ free(mdiox.md_file);
+
+ printf("\t");
+ if (mdiox.md_options & MD_ASYNC) {
+ printf("%casync", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_CACHE) {
+ printf("%ccache", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_CLUSTER) {
+ printf("%ccluster", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_COMPRESS) {
+ printf("%ccompress", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_FORCE) {
+ printf("%cforce", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_READONLY) {
+ printf("%creadonly", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_RESERVE) {
+ printf("%creserve", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_VERIFY) {
+ printf("%cverify", sep);
+ sep = ',';
+ }
+ if (mdiox.md_options & MD_MUSTDEALLOC) {
+ printf("%cmustdealloc", sep);
+ sep = ',';
+ }
+}
+
+static void
md_set_file(const char *fn)
{
struct stat sb;
@@ -500,11 +561,12 @@ md_list(const char *units, int opt, const char *fflag)
if (file == NULL)
file = "-";
printf("\t%s", file);
- file = NULL;
label = geom_config_get(gc, "label");
if (label == NULL)
- label = "";
+ label = "-";
printf("\t%s", label);
+ print_options(pp->lg_name, file);
+ file = label = NULL;
}
opt |= OPT_DONE;
if ((opt & OPT_LIST) && !(opt & OPT_VERBOSE))
diff --git a/sbin/mdmfs/mdmfs.8 b/sbin/mdmfs/mdmfs.8
index 50819bfee0c6..ff5b78068299 100644
--- a/sbin/mdmfs/mdmfs.8
+++ b/sbin/mdmfs/mdmfs.8
@@ -32,7 +32,7 @@
.Nd configure and mount an in-memory file system using the
.Xr md 4
driver or the
-.Xr tmpfs 5
+.Xr tmpfs 4
filesystem
.Sh SYNOPSIS
.Nm
@@ -69,7 +69,7 @@ Based on
the
.Nm
utility either creates a
-.Xr tmpfs 5
+.Xr tmpfs 4
filesystem, or it configures an
.Xr md 4
disk using
@@ -91,7 +91,7 @@ When
is `auto',
.Nm
uses
-.Xr tmpfs 5
+.Xr tmpfs 4
if it is present in the kernel or can be loaded as a module,
otherwise it falls back to using
.Xr md 4
@@ -102,14 +102,14 @@ When
is `tmpfs',
.Nm
mounts a
-.Xr tmpfs 5
+.Xr tmpfs 4
filesystem, translating the
.Fl s
size option, if present, into a `-o size=' mount option.
Any
.Fl o
options on the command line are passed through to the
-.Xr tmpfs 5
+.Xr tmpfs 4
mount.
Options specific to
.Xr mdconfig 8
@@ -120,7 +120,7 @@ are ignored.
When
.Ar md-device
does not result in
-.Xr tmpfs 5
+.Xr tmpfs 4
being used, then an
.Xr md 4
device is configured instead.
@@ -435,8 +435,8 @@ was given on the command line.
.El
.Sh SEE ALSO
.Xr md 4 ,
+.Xr tmpfs 4 ,
.Xr fstab 5 ,
-.Xr tmpfs 5 ,
.Xr mdconfig 8 ,
.Xr mount 8 ,
.Xr newfs 8
diff --git a/sbin/mknod/mknod.8 b/sbin/mknod/mknod.8
index 99337bd34767..fc562e76f0db 100644
--- a/sbin/mknod/mknod.8
+++ b/sbin/mknod/mknod.8
@@ -107,7 +107,7 @@ will cause the number to be interpreted as octal.
The
.Nm
utility can be used to recreate deleted device nodes under a
-.Xr devfs 5
+.Xr devfs 4
mount point by invoking it with only a filename as an argument.
Example:
.Pp
@@ -129,7 +129,7 @@ devices.
As of
.Fx 5.0 ,
device nodes are managed by the device file system
-.Xr devfs 5 ,
+.Xr devfs 4 ,
making the
.Nm
utility superfluous.
@@ -140,7 +140,7 @@ nodes cannot be used to access devices.
.Sh SEE ALSO
.Xr mkfifo 1 ,
.Xr mknod 2 ,
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr chown 8
.Sh HISTORY
A
diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8
index e8e604ba4088..ac04ba409ec6 100644
--- a/sbin/mount/mount.8
+++ b/sbin/mount/mount.8
@@ -565,14 +565,14 @@ support for a particular file system might be provided either on a static
.Xr getmntinfo 3 ,
.Xr libxo 3 ,
.Xr xo_parse_args 3 ,
+.Xr cd9660 4 ,
+.Xr devfs 4 ,
+.Xr ext2fs 4 ,
.Xr mac 4 ,
-.Xr cd9660 5 ,
-.Xr devfs 5 ,
-.Xr ext2fs 5 ,
+.Xr procfs 4 ,
+.Xr tarfs 4 ,
+.Xr tmpfs 4 ,
.Xr fstab 5 ,
-.Xr procfs 5 ,
-.Xr tarfs 5 ,
-.Xr tmpfs 5 ,
.Xr automount 8 ,
.Xr fstyp 8 ,
.Xr kldload 8 ,
diff --git a/sbin/mount_cd9660/mount_cd9660.8 b/sbin/mount_cd9660/mount_cd9660.8
index d2cdd2f3ef20..017ad7ee9a11 100644
--- a/sbin/mount_cd9660/mount_cd9660.8
+++ b/sbin/mount_cd9660/mount_cd9660.8
@@ -170,7 +170,7 @@ The following command can be used to mount a Kodak Photo-CD:
.Xr cdcontrol 1 ,
.Xr mount 2 ,
.Xr unmount 2 ,
-.Xr cd9660 5 ,
+.Xr cd9660 4 ,
.Xr fstab 5 ,
.Xr mdconfig 8 ,
.Xr mount 8
diff --git a/sbin/mount_msdosfs/mount_msdosfs.8 b/sbin/mount_msdosfs/mount_msdosfs.8
index 94532cafb543..3a97089e220c 100644
--- a/sbin/mount_msdosfs/mount_msdosfs.8
+++ b/sbin/mount_msdosfs/mount_msdosfs.8
@@ -179,8 +179,8 @@ To mount a Japanese MS-DOS file system located in
.Sh SEE ALSO
.Xr mount 2 ,
.Xr unmount 2 ,
+.Xr msdosfs 4 ,
.Xr fstab 5 ,
-.Xr msdosfs 5 ,
.Xr mount 8
.Pp
List of Localized MS Operating Systems:
diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8
index 3ef622a96dc0..13f0608ccad9 100644
--- a/sbin/mount_nfs/mount_nfs.8
+++ b/sbin/mount_nfs/mount_nfs.8
@@ -648,7 +648,7 @@ named options are equivalent to other
.Fl o
named options and are supported for compatibility with other
operating systems (e.g., Linux, Solaris, and OSX) to ease usage of
-.Xr autofs 5
+.Xr autofs 4
support.
.Bl -tag -width indent
.It Fl o Cm vers Ns = Ns 2
diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8
index 8638c25c0610..17b1f45f5e42 100644
--- a/sbin/mount_nullfs/mount_nullfs.8
+++ b/sbin/mount_nullfs/mount_nullfs.8
@@ -45,7 +45,7 @@
The
.Nm
utility creates a
-.Xr nullfs 5
+.Xr nullfs 4
layer, duplicating a sub-tree of the file system
name space under another part of the global file system namespace.
This allows existing files and directories to be accessed
@@ -257,7 +257,7 @@ is that vnode arguments must be manually mapped.
.\"
.\"
.Sh SEE ALSO
-.Xr nullfs 5 ,
+.Xr nullfs 4 ,
.Xr mount 8
.Pp
UCLA Technical Report CSD-910056,
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
index 05d2413a44e4..a7f792635aa9 100644
--- a/sbin/newfs/newfs.8
+++ b/sbin/newfs/newfs.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 21, 2022
+.Dd May 18, 2024
.Dt NEWFS 8
.Os
.Sh NAME
@@ -98,6 +98,10 @@ The default format is UFS2.
For backward compatibility.
.It Fl U
Enable soft updates on the new file system.
+Soft updates are enabled by default for UFS2 format file systems.
+Use
+.Xr tunefs 8
+to disable soft updates if they are not wanted.
.It Fl a Ar maxcontig
Specify the maximum number of contiguous blocks that will be
laid out before forcing a rotational delay.
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 38781368e8ca..49bd8b7dc4b6 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -383,6 +383,9 @@ main(int argc, char *argv[])
fprintf(stderr, "because minfree is less than %d%%\n", MINFREE);
opt = FS_OPTSPACE;
}
+ /* Use soft updates by default for UFS2 and above */
+ if (Oflag > 1)
+ Uflag = 1;
realsectorsize = sectorsize;
if (sectorsize != DEV_BSIZE) { /* XXX */
int secperblk = sectorsize / DEV_BSIZE;
diff --git a/sbin/nvmecontrol/Makefile b/sbin/nvmecontrol/Makefile
index f534093b1332..2abcd72dedfa 100644
--- a/sbin/nvmecontrol/Makefile
+++ b/sbin/nvmecontrol/Makefile
@@ -3,7 +3,11 @@
PACKAGE=nvme-tools
PROG= nvmecontrol
SRCS+= comnd.c
+SRCS+= connect.c
SRCS+= devlist.c
+SRCS+= disconnect.c
+SRCS+= discover.c
+SRCS+= fabrics.c
SRCS+= firmware.c
SRCS+= format.c
SRCS+= identify.c
@@ -17,13 +21,16 @@ SRCS+= nvmecontrol.c
SRCS+= passthru.c
SRCS+= perftest.c
SRCS+= power.c
+SRCS+= reconnect.c
SRCS+= reset.c
SRCS+= resv.c
SRCS+= sanitize.c
SRCS+= selftest.c
+SRCS+= telemetry.c
+CFLAGS+= -I${SRCTOP}/lib/libnvmf
MAN= nvmecontrol.8
LDFLAGS+= -rdynamic
-LIBADD+= util
+LIBADD+= nvmf util
SUBDIR= modules
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
diff --git a/sbin/nvmecontrol/connect.c b/sbin/nvmecontrol/connect.c
new file mode 100644
index 000000000000..14bd0cce1f8f
--- /dev/null
+++ b/sbin/nvmecontrol/connect.c
@@ -0,0 +1,286 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/socket.h>
+#include <err.h>
+#include <libnvmf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include "comnd.h"
+#include "fabrics.h"
+
+/*
+ * Settings that are currently hardcoded but could be exposed to the
+ * user via additional command line options:
+ *
+ * - ADMIN queue entries
+ * - MaxR2T
+ */
+
+static struct options {
+ const char *transport;
+ const char *address;
+ const char *cntlid;
+ const char *subnqn;
+ const char *hostnqn;
+ uint32_t kato;
+ uint16_t num_io_queues;
+ uint16_t queue_size;
+ bool data_digests;
+ bool flow_control;
+ bool header_digests;
+} opt = {
+ .transport = "tcp",
+ .address = NULL,
+ .cntlid = "dynamic",
+ .subnqn = NULL,
+ .hostnqn = NULL,
+ .kato = NVMF_KATO_DEFAULT / 1000,
+ .num_io_queues = 1,
+ .queue_size = 0,
+ .data_digests = false,
+ .flow_control = false,
+ .header_digests = false,
+};
+
+static void
+tcp_association_params(struct nvmf_association_params *params)
+{
+ params->tcp.pda = 0;
+ params->tcp.header_digests = opt.header_digests;
+ params->tcp.data_digests = opt.data_digests;
+ /* XXX */
+ params->tcp.maxr2t = 1;
+}
+
+static int
+connect_nvm_controller(enum nvmf_trtype trtype, int adrfam, const char *address,
+ const char *port, uint16_t cntlid, const char *subnqn)
+{
+ struct nvme_controller_data cdata;
+ struct nvmf_association_params aparams;
+ struct nvmf_qpair *admin, **io;
+ int error;
+
+ memset(&aparams, 0, sizeof(aparams));
+ aparams.sq_flow_control = opt.flow_control;
+ switch (trtype) {
+ case NVMF_TRTYPE_TCP:
+ tcp_association_params(&aparams);
+ break;
+ default:
+ warnx("Unsupported transport %s", nvmf_transport_type(trtype));
+ return (EX_UNAVAILABLE);
+ }
+
+ io = calloc(opt.num_io_queues, sizeof(*io));
+ error = connect_nvm_queues(&aparams, trtype, adrfam, address, port,
+ cntlid, subnqn, opt.hostnqn, opt.kato, &admin, io,
+ opt.num_io_queues, opt.queue_size, &cdata);
+ if (error != 0) {
+ free(io);
+ return (error);
+ }
+
+ error = nvmf_handoff_host(admin, opt.num_io_queues, io, &cdata);
+ if (error != 0) {
+ warnc(error, "Failed to handoff queues to kernel");
+ free(io);
+ return (EX_IOERR);
+ }
+ free(io);
+ return (0);
+}
+
+static void
+connect_discovery_entry(struct nvme_discovery_log_entry *entry)
+{
+ int adrfam;
+
+ switch (entry->trtype) {
+ case NVMF_TRTYPE_TCP:
+ switch (entry->adrfam) {
+ case NVMF_ADRFAM_IPV4:
+ adrfam = AF_INET;
+ break;
+ case NVMF_ADRFAM_IPV6:
+ adrfam = AF_INET6;
+ break;
+ default:
+ warnx("Skipping unsupported address family for %s",
+ entry->subnqn);
+ return;
+ }
+ switch (entry->tsas.tcp.sectype) {
+ case NVME_TCP_SECURITY_NONE:
+ break;
+ default:
+ warnx("Skipping unsupported TCP security type for %s",
+ entry->subnqn);
+ return;
+ }
+ break;
+ default:
+ warnx("Skipping unsupported transport %s for %s",
+ nvmf_transport_type(entry->trtype), entry->subnqn);
+ return;
+ }
+
+ /*
+ * XXX: Track portids and avoid duplicate connections for a
+ * given (subnqn,portid)?
+ */
+
+ /* XXX: Should this make use of entry->aqsz in some way? */
+ connect_nvm_controller(entry->trtype, adrfam, entry->traddr,
+ entry->trsvcid, entry->cntlid, entry->subnqn);
+}
+
+static void
+connect_discovery_log_page(struct nvmf_qpair *qp)
+{
+ struct nvme_discovery_log *log;
+ int error;
+
+ error = nvmf_host_fetch_discovery_log_page(qp, &log);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to fetch discovery log page");
+
+ for (u_int i = 0; i < log->numrec; i++)
+ connect_discovery_entry(&log->entries[i]);
+ free(log);
+}
+
+static void
+discover_controllers(enum nvmf_trtype trtype, const char *address,
+ const char *port)
+{
+ struct nvmf_qpair *qp;
+
+ qp = connect_discovery_adminq(trtype, address, port, opt.hostnqn);
+
+ connect_discovery_log_page(qp);
+
+ nvmf_free_qpair(qp);
+}
+
+static void
+connect_fn(const struct cmd *f, int argc, char *argv[])
+{
+ enum nvmf_trtype trtype;
+ const char *address, *port;
+ char *tofree;
+ u_long cntlid;
+ int error;
+
+ if (arg_parse(argc, argv, f))
+ return;
+
+ if (opt.num_io_queues <= 0)
+ errx(EX_USAGE, "Invalid number of I/O queues");
+
+ if (strcasecmp(opt.transport, "tcp") == 0) {
+ trtype = NVMF_TRTYPE_TCP;
+ } else
+ errx(EX_USAGE, "Unsupported or invalid transport");
+
+ nvmf_parse_address(opt.address, &address, &port, &tofree);
+ if (port == NULL)
+ errx(EX_USAGE, "Explicit port required");
+
+ cntlid = nvmf_parse_cntlid(opt.cntlid);
+
+ error = connect_nvm_controller(trtype, AF_UNSPEC, address, port, cntlid,
+ opt.subnqn);
+ if (error != 0)
+ exit(error);
+
+ free(tofree);
+}
+
+static void
+connect_all_fn(const struct cmd *f, int argc, char *argv[])
+{
+ enum nvmf_trtype trtype;
+ const char *address, *port;
+ char *tofree;
+
+ if (arg_parse(argc, argv, f))
+ return;
+
+ if (opt.num_io_queues <= 0)
+ errx(EX_USAGE, "Invalid number of I/O queues");
+
+ if (strcasecmp(opt.transport, "tcp") == 0) {
+ trtype = NVMF_TRTYPE_TCP;
+ } else
+ errx(EX_USAGE, "Unsupported or invalid transport");
+
+ nvmf_parse_address(opt.address, &address, &port, &tofree);
+ discover_controllers(trtype, address, port);
+
+ free(tofree);
+}
+
+static const struct opts connect_opts[] = {
+#define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc }
+ OPT("transport", 't', arg_string, opt, transport,
+ "Transport type"),
+ OPT("cntlid", 'c', arg_string, opt, cntlid,
+ "Controller ID"),
+ OPT("nr-io-queues", 'i', arg_uint16, opt, num_io_queues,
+ "Number of I/O queues"),
+ OPT("queue-size", 'Q', arg_uint16, opt, queue_size,
+ "Number of entries in each I/O queue"),
+ OPT("keep-alive-tmo", 'k', arg_uint32, opt, kato,
+ "Keep Alive timeout (in seconds)"),
+ OPT("hostnqn", 'q', arg_string, opt, hostnqn,
+ "Host NQN"),
+ OPT("flow_control", 'F', arg_none, opt, flow_control,
+ "Request SQ flow control"),
+ OPT("hdr_digests", 'g', arg_none, opt, header_digests,
+ "Enable TCP PDU header digests"),
+ OPT("data_digests", 'G', arg_none, opt, data_digests,
+ "Enable TCP PDU data digests"),
+ { NULL, 0, arg_none, NULL, NULL }
+};
+#undef OPT
+
+static const struct args connect_args[] = {
+ { arg_string, &opt.address, "address" },
+ { arg_string, &opt.subnqn, "SubNQN" },
+ { arg_none, NULL, NULL },
+};
+
+static const struct args connect_all_args[] = {
+ { arg_string, &opt.address, "address" },
+ { arg_none, NULL, NULL },
+};
+
+static struct cmd connect_cmd = {
+ .name = "connect",
+ .fn = connect_fn,
+ .descr = "Connect to a fabrics controller",
+ .ctx_size = sizeof(opt),
+ .opts = connect_opts,
+ .args = connect_args,
+};
+
+static struct cmd connect_all_cmd = {
+ .name = "connect-all",
+ .fn = connect_all_fn,
+ .descr = "Discover and connect to fabrics controllers",
+ .ctx_size = sizeof(opt),
+ .opts = connect_opts,
+ .args = connect_all_args,
+};
+
+CMD_COMMAND(connect_cmd);
+CMD_COMMAND(connect_all_cmd);
diff --git a/sbin/nvmecontrol/disconnect.c b/sbin/nvmecontrol/disconnect.c
new file mode 100644
index 000000000000..b1b6af6271e8
--- /dev/null
+++ b/sbin/nvmecontrol/disconnect.c
@@ -0,0 +1,82 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <err.h>
+#include <libnvmf.h>
+#include <stdlib.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include "nvmecontrol.h"
+
+static struct options {
+ const char *dev;
+} opt = {
+ .dev = NULL
+};
+
+static const struct args args[] = {
+ { arg_string, &opt.dev, "controller-id|namespace-id|SubNQN" },
+ { arg_none, NULL, NULL },
+};
+
+static void
+disconnect(const struct cmd *f, int argc, char *argv[])
+{
+ int error, fd;
+ char *path;
+
+ if (arg_parse(argc, argv, f))
+ return;
+ if (nvmf_nqn_valid(opt.dev)) {
+ error = nvmf_disconnect_host(opt.dev);
+ if (error != 0)
+ errc(EX_IOERR, error, "failed to disconnect from %s",
+ opt.dev);
+ } else {
+ open_dev(opt.dev, &fd, 1, 1);
+ get_nsid(fd, &path, NULL);
+ close(fd);
+
+ error = nvmf_disconnect_host(path);
+ if (error != 0)
+ errc(EX_IOERR, error, "failed to disconnect from %s",
+ path);
+ }
+
+ exit(0);
+}
+
+static void
+disconnect_all(const struct cmd *f __unused, int argc __unused,
+ char *argv[] __unused)
+{
+ int error;
+
+ error = nvmf_disconnect_all();
+ if (error != 0)
+ errc(EX_IOERR, error,
+ "failed to disconnect from remote controllers");
+
+ exit(0);
+}
+
+static struct cmd disconnect_cmd = {
+ .name = "disconnect",
+ .fn = disconnect,
+ .descr = "Disconnect from a fabrics controller",
+ .args = args,
+};
+
+static struct cmd disconnect_all_cmd = {
+ .name = "disconnect-all",
+ .fn = disconnect_all,
+ .descr = "Disconnect from all fabrics controllers",
+};
+
+CMD_COMMAND(disconnect_cmd);
+CMD_COMMAND(disconnect_all_cmd);
diff --git a/sbin/nvmecontrol/discover.c b/sbin/nvmecontrol/discover.c
new file mode 100644
index 000000000000..c782ebeb7452
--- /dev/null
+++ b/sbin/nvmecontrol/discover.c
@@ -0,0 +1,300 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <err.h>
+#include <libnvmf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+
+#include "comnd.h"
+#include "fabrics.h"
+#include "nvmecontrol_ext.h"
+
+static struct options {
+ const char *transport;
+ const char *address;
+ const char *hostnqn;
+ bool verbose;
+} opt = {
+ .transport = "tcp",
+ .address = NULL,
+ .hostnqn = NULL,
+ .verbose = false,
+};
+
+static void
+identify_controller(struct nvmf_qpair *qp)
+{
+ struct nvme_controller_data cdata;
+ int error;
+
+ error = nvmf_host_identify_controller(qp, &cdata);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to fetch controller data");
+ nvme_print_controller(&cdata);
+}
+
+static const char *
+nvmf_address_family(uint8_t adrfam)
+{
+ static char buf[8];
+
+ switch (adrfam) {
+ case NVMF_ADRFAM_IPV4:
+ return ("AF_INET");
+ case NVMF_ADRFAM_IPV6:
+ return ("AF_INET6");
+ case NVMF_ADRFAM_IB:
+ return ("InfiniBand");
+ case NVMF_ADRFAM_FC:
+ return ("Fibre Channel");
+ case NVMF_ADRFAM_INTRA_HOST:
+ return ("Intra-host");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", adrfam);
+ return (buf);
+ }
+}
+
+static const char *
+nvmf_subsystem_type(uint8_t subtype)
+{
+ static char buf[8];
+
+ switch (subtype) {
+ case NVMF_SUBTYPE_DISCOVERY:
+ return ("Discovery");
+ case NVMF_SUBTYPE_NVME:
+ return ("NVMe");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", subtype);
+ return (buf);
+ }
+}
+
+static const char *
+nvmf_secure_channel(uint8_t treq)
+{
+ switch (treq & 0x03) {
+ case NVMF_TREQ_SECURE_CHANNEL_NOT_SPECIFIED:
+ return ("Not specified");
+ case NVMF_TREQ_SECURE_CHANNEL_REQUIRED:
+ return ("Required");
+ case NVMF_TREQ_SECURE_CHANNEL_NOT_REQUIRED:
+ return ("Not required");
+ default:
+ return ("0x03");
+ }
+}
+
+static const char *
+nvmf_controller_id(uint16_t cntlid)
+{
+ static char buf[8];
+
+ switch (cntlid) {
+ case NVMF_CNTLID_DYNAMIC:
+ return ("Dynamic");
+ case NVMF_CNTLID_STATIC_ANY:
+ return ("Static");
+ default:
+ snprintf(buf, sizeof(buf), "%u", cntlid);
+ return (buf);
+ }
+}
+
+static const char *
+nvmf_rdma_service_type(uint8_t qptype)
+{
+ static char buf[8];
+
+ switch (qptype) {
+ case NVMF_RDMA_QPTYPE_RELIABLE_CONNECTED:
+ return ("Reliable connected");
+ case NVMF_RDMA_QPTYPE_RELIABLE_DATAGRAM:
+ return ("Reliable datagram");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", qptype);
+ return (buf);
+ }
+}
+
+static const char *
+nvmf_rdma_provider_type(uint8_t prtype)
+{
+ static char buf[8];
+
+ switch (prtype) {
+ case NVMF_RDMA_PRTYPE_NONE:
+ return ("None");
+ case NVMF_RDMA_PRTYPE_IB:
+ return ("InfiniBand");
+ case NVMF_RDMA_PRTYPE_ROCE:
+ return ("RoCE (v1)");
+ case NVMF_RDMA_PRTYPE_ROCE2:
+ return ("RoCE (v2)");
+ case NVMF_RDMA_PRTYPE_IWARP:
+ return ("iWARP");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", prtype);
+ return (buf);
+ }
+}
+
+static const char *
+nvmf_rdma_cms(uint8_t cms)
+{
+ static char buf[8];
+
+ switch (cms) {
+ case NVMF_RDMA_CMS_RDMA_CM:
+ return ("RDMA_IP_CM");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", cms);
+ return (buf);
+ }
+}
+
+static const char *
+nvmf_tcp_security_type(uint8_t sectype)
+{
+ static char buf[8];
+
+ switch (sectype) {
+ case NVME_TCP_SECURITY_NONE:
+ return ("None");
+ case NVME_TCP_SECURITY_TLS_1_2:
+ return ("TLS 1.2");
+ case NVME_TCP_SECURITY_TLS_1_3:
+ return ("TLS 1.3");
+ default:
+ snprintf(buf, sizeof(buf), "0x%02x\n", sectype);
+ return (buf);
+ }
+}
+
+static void
+print_discovery_entry(u_int i, struct nvme_discovery_log_entry *entry)
+{
+ printf("Entry %02d\n", i + 1);
+ printf("========\n");
+ printf(" Transport type: %s\n",
+ nvmf_transport_type(entry->trtype));
+ printf(" Address family: %s\n",
+ nvmf_address_family(entry->adrfam));
+ printf(" Subsystem type: %s\n",
+ nvmf_subsystem_type(entry->subtype));
+ printf(" SQ flow control: %s\n",
+ (entry->treq & (1 << 2)) == 0 ? "required" : "optional");
+ printf(" Secure Channel: %s\n", nvmf_secure_channel(entry->treq));
+ printf(" Port ID: %u\n", entry->portid);
+ printf(" Controller ID: %s\n",
+ nvmf_controller_id(entry->cntlid));
+ printf(" Max Admin SQ Size: %u\n", entry->aqsz);
+ printf(" Sub NQN: %s\n", entry->subnqn);
+ printf(" Transport address: %s\n", entry->traddr);
+ printf(" Service identifier: %s\n", entry->trsvcid);
+ switch (entry->trtype) {
+ case NVMF_TRTYPE_RDMA:
+ printf(" RDMA Service Type: %s\n",
+ nvmf_rdma_service_type(entry->tsas.rdma.rdma_qptype));
+ printf(" RDMA Provider Type: %s\n",
+ nvmf_rdma_provider_type(entry->tsas.rdma.rdma_prtype));
+ printf(" RDMA CMS: %s\n",
+ nvmf_rdma_cms(entry->tsas.rdma.rdma_cms));
+ printf(" Partition key: %u\n",
+ entry->tsas.rdma.rdma_pkey);
+ break;
+ case NVMF_TRTYPE_TCP:
+ printf(" Security Type: %s\n",
+ nvmf_tcp_security_type(entry->tsas.tcp.sectype));
+ break;
+ }
+}
+
+static void
+dump_discovery_log_page(struct nvmf_qpair *qp)
+{
+ struct nvme_discovery_log *log;
+ int error;
+
+ error = nvmf_host_fetch_discovery_log_page(qp, &log);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to fetch discovery log page");
+
+ printf("Discovery\n");
+ printf("=========\n");
+ if (log->numrec == 0) {
+ printf("No entries found\n");
+ } else {
+ for (u_int i = 0; i < log->numrec; i++)
+ print_discovery_entry(i, &log->entries[i]);
+ }
+ free(log);
+}
+
+static void
+discover(const struct cmd *f, int argc, char *argv[])
+{
+ enum nvmf_trtype trtype;
+ struct nvmf_qpair *qp;
+ const char *address, *port;
+ char *tofree;
+
+ if (arg_parse(argc, argv, f))
+ return;
+
+ if (strcasecmp(opt.transport, "tcp") == 0) {
+ trtype = NVMF_TRTYPE_TCP;
+ } else
+ errx(EX_USAGE, "Unsupported or invalid transport");
+
+ nvmf_parse_address(opt.address, &address, &port, &tofree);
+ qp = connect_discovery_adminq(trtype, address, port, opt.hostnqn);
+ free(tofree);
+
+ /* Use Identify to fetch controller data */
+ if (opt.verbose) {
+ identify_controller(qp);
+ printf("\n");
+ }
+
+ /* Fetch Log pages */
+ dump_discovery_log_page(qp);
+
+ nvmf_free_qpair(qp);
+}
+
+static const struct opts discover_opts[] = {
+#define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc }
+ OPT("transport", 't', arg_string, opt, transport,
+ "Transport type"),
+ OPT("hostnqn", 'q', arg_string, opt, hostnqn,
+ "Host NQN"),
+ OPT("verbose", 'v', arg_none, opt, verbose,
+ "Display the discovery controller's controller data"),
+ { NULL, 0, arg_none, NULL, NULL }
+};
+#undef OPT
+
+static const struct args discover_args[] = {
+ { arg_string, &opt.address, "address" },
+ { arg_none, NULL, NULL },
+};
+
+static struct cmd discover_cmd = {
+ .name = "discover",
+ .fn = discover,
+ .descr = "List discovery log pages from a fabrics controller",
+ .ctx_size = sizeof(opt),
+ .opts = discover_opts,
+ .args = discover_args,
+};
+
+CMD_COMMAND(discover_cmd);
diff --git a/sbin/nvmecontrol/fabrics.c b/sbin/nvmecontrol/fabrics.c
new file mode 100644
index 000000000000..de069e3df62a
--- /dev/null
+++ b/sbin/nvmecontrol/fabrics.c
@@ -0,0 +1,521 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <err.h>
+#include <libnvmf.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include "fabrics.h"
+
+/*
+ * Subroutines shared by several Fabrics commands.
+ */
+static char nqn[NVMF_NQN_MAX_LEN];
+static uint8_t hostid[16];
+static bool hostid_initted = false;
+
+static bool
+init_hostid(void)
+{
+ int error;
+
+ if (hostid_initted)
+ return (true);
+
+ error = nvmf_hostid_from_hostuuid(hostid);
+ if (error != 0) {
+ warnc(error, "Failed to generate hostid");
+ return (false);
+ }
+ error = nvmf_nqn_from_hostuuid(nqn);
+ if (error != 0) {
+ warnc(error, "Failed to generate host NQN");
+ return (false);
+ }
+
+ hostid_initted = true;
+ return (true);
+}
+
+void
+nvmf_parse_address(const char *in_address, const char **address,
+ const char **port, char **tofree)
+{
+ char *cp;
+
+ /*
+ * Accepts the following address formats:
+ *
+ * [IPv6 address]:port
+ * IPv4 address:port
+ * hostname:port
+ * [IPv6 address]
+ * IPv6 address
+ * IPv4 address
+ * hostname
+ */
+ if (in_address[0] == '[') {
+ /* IPv6 address in square brackets. */
+ cp = strchr(in_address + 1, ']');
+ if (cp == NULL || cp == in_address + 1)
+ errx(EX_USAGE, "Invalid address %s", in_address);
+ *tofree = strndup(in_address + 1, cp - (in_address + 1));
+ *address = *tofree;
+
+ /* Skip over ']' */
+ cp++;
+ switch (*cp) {
+ case '\0':
+ *port = NULL;
+ return;
+ case ':':
+ if (cp[1] != '\0') {
+ *port = cp + 1;
+ return;
+ }
+ /* FALLTHROUGH */
+ default:
+ errx(EX_USAGE, "Invalid address %s", in_address);
+ }
+ }
+
+ /* Look for the first colon. */
+ cp = strchr(in_address, ':');
+ if (cp == NULL) {
+ *address = in_address;
+ *port = NULL;
+ *tofree = NULL;
+ return;
+ }
+
+ /* If there is another colon, assume this is an IPv6 address. */
+ if (strchr(cp + 1, ':') != NULL) {
+ *address = in_address;
+ *port = NULL;
+ *tofree = NULL;
+ return;
+ }
+
+ /* Both strings on either side of the colon must be non-empty. */
+ if (cp == in_address || cp[1] == '\0')
+ errx(EX_USAGE, "Invalid address %s", in_address);
+
+ *tofree = strndup(in_address, cp - in_address);
+ *address = *tofree;
+
+ /* Skip over ':' */
+ *port = cp + 1;
+}
+
+uint16_t
+nvmf_parse_cntlid(const char *cntlid)
+{
+ u_long value;
+
+ if (strcasecmp(cntlid, "dynamic") == 0)
+ return (NVMF_CNTLID_DYNAMIC);
+ else if (strcasecmp(cntlid, "static") == 0)
+ return (NVMF_CNTLID_STATIC_ANY);
+ else {
+ value = strtoul(cntlid, NULL, 0);
+
+ if (value > NVMF_CNTLID_STATIC_MAX)
+ errx(EX_USAGE, "Invalid controller ID");
+
+ return (value);
+ }
+}
+
+bool
+tcp_qpair_params(struct nvmf_qpair_params *params, int adrfam,
+ const char *address, const char *port)
+{
+ struct addrinfo hints, *ai, *list;
+ int error, s;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = adrfam;
+ hints.ai_protocol = IPPROTO_TCP;
+ error = getaddrinfo(address, port, &hints, &list);
+ if (error != 0) {
+ warnx("%s", gai_strerror(error));
+ return (false);
+ }
+
+ for (ai = list; ai != NULL; ai = ai->ai_next) {
+ s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+ if (s == -1)
+ continue;
+
+ if (connect(s, ai->ai_addr, ai->ai_addrlen) != 0) {
+ close(s);
+ continue;
+ }
+
+ params->tcp.fd = s;
+ freeaddrinfo(list);
+ return (true);
+ }
+ warn("Failed to connect to controller at %s:%s", address, port);
+ freeaddrinfo(list);
+ return (false);
+}
+
+static void
+tcp_discovery_association_params(struct nvmf_association_params *params)
+{
+ params->tcp.pda = 0;
+ params->tcp.header_digests = false;
+ params->tcp.data_digests = false;
+ params->tcp.maxr2t = 1;
+}
+
+struct nvmf_qpair *
+connect_discovery_adminq(enum nvmf_trtype trtype, const char *address,
+ const char *port, const char *hostnqn)
+{
+ struct nvmf_association_params aparams;
+ struct nvmf_qpair_params qparams;
+ struct nvmf_association *na;
+ struct nvmf_qpair *qp;
+ uint64_t cap, cc, csts;
+ int error, timo;
+
+ memset(&aparams, 0, sizeof(aparams));
+ aparams.sq_flow_control = false;
+ switch (trtype) {
+ case NVMF_TRTYPE_TCP:
+ /* 7.4.9.3 Default port for discovery */
+ if (port == NULL)
+ port = "8009";
+ tcp_discovery_association_params(&aparams);
+ break;
+ default:
+ errx(EX_UNAVAILABLE, "Unsupported transport %s",
+ nvmf_transport_type(trtype));
+ }
+
+ if (!init_hostid())
+ exit(EX_IOERR);
+ if (hostnqn != NULL) {
+ if (!nvmf_nqn_valid(hostnqn))
+ errx(EX_USAGE, "Invalid HostNQN %s", hostnqn);
+ } else
+ hostnqn = nqn;
+
+ na = nvmf_allocate_association(trtype, false, &aparams);
+ if (na == NULL)
+ err(EX_IOERR, "Failed to create discovery association");
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.admin = true;
+ if (!tcp_qpair_params(&qparams, AF_UNSPEC, address, port))
+ exit(EX_NOHOST);
+ qp = nvmf_connect(na, &qparams, 0, NVME_MIN_ADMIN_ENTRIES, hostid,
+ NVMF_CNTLID_DYNAMIC, NVMF_DISCOVERY_NQN, hostnqn, 0);
+ if (qp == NULL)
+ errx(EX_IOERR, "Failed to connect to discovery controller: %s",
+ nvmf_association_error(na));
+ nvmf_free_association(na);
+
+ /* Fetch Controller Capabilities Property */
+ error = nvmf_read_property(qp, NVMF_PROP_CAP, 8, &cap);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to fetch CAP");
+
+ /* Set Controller Configuration Property (CC.EN=1) */
+ error = nvmf_read_property(qp, NVMF_PROP_CC, 4, &cc);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to fetch CC");
+
+ /* Clear known fields preserving any reserved fields. */
+ cc &= ~(NVMEM(NVME_CC_REG_SHN) | NVMEM(NVME_CC_REG_AMS) |
+ NVMEM(NVME_CC_REG_MPS) | NVMEM(NVME_CC_REG_CSS));
+
+ /* Leave AMS, MPS, and CSS as 0. */
+
+ cc |= NVMEF(NVME_CC_REG_EN, 1);
+
+ error = nvmf_write_property(qp, NVMF_PROP_CC, 4, cc);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to set CC");
+
+ /* Wait for CSTS.RDY in Controller Status */
+ timo = NVME_CAP_LO_TO(cap);
+ for (;;) {
+ error = nvmf_read_property(qp, NVMF_PROP_CSTS, 4, &csts);
+ if (error != 0)
+ errc(EX_IOERR, error, "Failed to fetch CSTS");
+
+ if (NVMEV(NVME_CSTS_REG_RDY, csts) != 0)
+ break;
+
+ if (timo == 0)
+ errx(EX_IOERR, "Controller failed to become ready");
+ timo--;
+ usleep(500 * 1000);
+ }
+
+ return (qp);
+}
+
+/*
+ * XXX: Should this accept the admin queue size as a parameter rather
+ * than always using NVMF_MIN_ADMIN_MAX_SQ_SIZE?
+ */
+static int
+connect_nvm_adminq(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params, struct nvmf_qpair **qpp,
+ uint16_t cntlid, const char *subnqn, const char *hostnqn, uint32_t kato,
+ uint16_t *mqes)
+{
+ struct nvmf_qpair *qp;
+ uint64_t cap, cc, csts;
+ u_int mps, mpsmin, mpsmax;
+ int error, timo;
+
+ qp = nvmf_connect(na, params, 0, NVMF_MIN_ADMIN_MAX_SQ_SIZE, hostid,
+ cntlid, subnqn, hostnqn, kato);
+ if (qp == NULL) {
+ warnx("Failed to connect to NVM controller %s: %s", subnqn,
+ nvmf_association_error(na));
+ return (EX_IOERR);
+ }
+
+ /* Fetch Controller Capabilities Property */
+ error = nvmf_read_property(qp, NVMF_PROP_CAP, 8, &cap);
+ if (error != 0) {
+ warnc(error, "Failed to fetch CAP");
+ nvmf_free_qpair(qp);
+ return (EX_IOERR);
+ }
+
+ /* Require the NVM command set. */
+ if (NVME_CAP_HI_CSS_NVM(cap >> 32) == 0) {
+ warnx("Controller %s does not support the NVM command set",
+ subnqn);
+ nvmf_free_qpair(qp);
+ return (EX_UNAVAILABLE);
+ }
+
+ *mqes = NVME_CAP_LO_MQES(cap);
+
+ /* Prefer native host page size if it fits. */
+ mpsmin = NVMEV(NVME_CAP_HI_REG_MPSMIN, cap >> 32);
+ mpsmax = NVMEV(NVME_CAP_HI_REG_MPSMAX, cap >> 32);
+ mps = ffs(getpagesize()) - 1;
+ if (mps < mpsmin + NVME_MPS_SHIFT)
+ mps = mpsmin;
+ else if (mps > mpsmax + NVME_MPS_SHIFT)
+ mps = mpsmax;
+ else
+ mps -= NVME_MPS_SHIFT;
+
+ /* Configure controller. */
+ error = nvmf_read_property(qp, NVMF_PROP_CC, 4, &cc);
+ if (error != 0) {
+ warnc(error, "Failed to fetch CC");
+ nvmf_free_qpair(qp);
+ return (EX_IOERR);
+ }
+
+ /* Clear known fields preserving any reserved fields. */
+ cc &= ~(NVMEM(NVME_CC_REG_IOCQES) | NVMEM(NVME_CC_REG_IOSQES) |
+ NVMEM(NVME_CC_REG_SHN) | NVMEM(NVME_CC_REG_AMS) |
+ NVMEM(NVME_CC_REG_MPS) | NVMEM(NVME_CC_REG_CSS));
+
+ cc |= NVMEF(NVME_CC_REG_IOCQES, 4); /* CQE entry size == 16 */
+ cc |= NVMEF(NVME_CC_REG_IOSQES, 6); /* SEQ entry size == 64 */
+ cc |= NVMEF(NVME_CC_REG_AMS, 0); /* AMS 0 (Round-robin) */
+ cc |= NVMEF(NVME_CC_REG_MPS, mps);
+ cc |= NVMEF(NVME_CC_REG_CSS, 0); /* NVM command set */
+ cc |= NVMEF(NVME_CC_REG_EN, 1); /* EN = 1 */
+
+ error = nvmf_write_property(qp, NVMF_PROP_CC, 4, cc);
+ if (error != 0) {
+ warnc(error, "Failed to set CC");
+ nvmf_free_qpair(qp);
+ return (EX_IOERR);
+ }
+
+ /* Wait for CSTS.RDY in Controller Status */
+ timo = NVME_CAP_LO_TO(cap);
+ for (;;) {
+ error = nvmf_read_property(qp, NVMF_PROP_CSTS, 4, &csts);
+ if (error != 0) {
+ warnc(error, "Failed to fetch CSTS");
+ nvmf_free_qpair(qp);
+ return (EX_IOERR);
+ }
+
+ if (NVMEV(NVME_CSTS_REG_RDY, csts) != 0)
+ break;
+
+ if (timo == 0) {
+ warnx("Controller failed to become ready");
+ nvmf_free_qpair(qp);
+ return (EX_IOERR);
+ }
+ timo--;
+ usleep(500 * 1000);
+ }
+
+ *qpp = qp;
+ return (0);
+}
+
+static void
+shutdown_controller(struct nvmf_qpair *qp)
+{
+ uint64_t cc;
+ int error;
+
+ error = nvmf_read_property(qp, NVMF_PROP_CC, 4, &cc);
+ if (error != 0) {
+ warnc(error, "Failed to fetch CC");
+ goto out;
+ }
+
+ cc |= NVMEF(NVME_CC_REG_SHN, NVME_SHN_NORMAL);
+
+ error = nvmf_write_property(qp, NVMF_PROP_CC, 4, cc);
+ if (error != 0) {
+ warnc(error, "Failed to set CC to trigger shutdown");
+ goto out;
+ }
+
+out:
+ nvmf_free_qpair(qp);
+}
+
+/* Returns a value from <sysexits.h> */
+int
+connect_nvm_queues(const struct nvmf_association_params *aparams,
+ enum nvmf_trtype trtype, int adrfam, const char *address,
+ const char *port, uint16_t cntlid, const char *subnqn, const char *hostnqn,
+ uint32_t kato, struct nvmf_qpair **admin, struct nvmf_qpair **io,
+ u_int num_io_queues, u_int queue_size, struct nvme_controller_data *cdata)
+{
+ struct nvmf_qpair_params qparams;
+ struct nvmf_association *na;
+ u_int queues;
+ int error;
+ uint16_t mqes;
+
+ switch (trtype) {
+ case NVMF_TRTYPE_TCP:
+ break;
+ default:
+ warnx("Unsupported transport %s", nvmf_transport_type(trtype));
+ return (EX_UNAVAILABLE);
+ }
+
+ if (!init_hostid())
+ return (EX_IOERR);
+ if (hostnqn != NULL) {
+ if (!nvmf_nqn_valid(hostnqn)) {
+ warnx("Invalid HostNQN %s", hostnqn);
+ return (EX_USAGE);
+ }
+ } else
+ hostnqn = nqn;
+
+ /* Association. */
+ na = nvmf_allocate_association(trtype, false, aparams);
+ if (na == NULL) {
+ warn("Failed to create association for %s", subnqn);
+ return (EX_IOERR);
+ }
+
+ /* Admin queue. */
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.admin = true;
+ if (!tcp_qpair_params(&qparams, adrfam, address, port)) {
+ nvmf_free_association(na);
+ return (EX_NOHOST);
+ }
+ error = connect_nvm_adminq(na, &qparams, admin, cntlid, subnqn, hostnqn,
+ kato, &mqes);
+ if (error != 0) {
+ nvmf_free_association(na);
+ return (error);
+ }
+
+ /* Validate I/O queue size. */
+ if (queue_size == 0)
+ queue_size = (u_int)mqes + 1;
+ else if (queue_size > (u_int)mqes + 1) {
+ shutdown_controller(*admin);
+ nvmf_free_association(na);
+ warn("I/O queue size exceeds controller maximum (%u)",
+ mqes + 1);
+ return (EX_USAGE);
+ }
+
+ /* Fetch controller data. */
+ error = nvmf_host_identify_controller(*admin, cdata);
+ if (error != 0) {
+ shutdown_controller(*admin);
+ nvmf_free_association(na);
+ warnc(error, "Failed to fetch controller data for %s", subnqn);
+ return (EX_IOERR);
+ }
+
+ nvmf_update_assocation(na, cdata);
+
+ error = nvmf_host_request_queues(*admin, num_io_queues, &queues);
+ if (error != 0) {
+ shutdown_controller(*admin);
+ nvmf_free_association(na);
+ warnc(error, "Failed to request I/O queues");
+ return (EX_IOERR);
+ }
+ if (queues < num_io_queues) {
+ shutdown_controller(*admin);
+ nvmf_free_association(na);
+ warnx("Controller enabled fewer I/O queues (%u) than requested (%u)",
+ queues, num_io_queues);
+ return (EX_PROTOCOL);
+ }
+
+ /* I/O queues. */
+ memset(io, 0, sizeof(*io) * num_io_queues);
+ for (u_int i = 0; i < num_io_queues; i++) {
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.admin = false;
+ if (!tcp_qpair_params(&qparams, adrfam, address, port)) {
+ error = EX_NOHOST;
+ goto out;
+ }
+ io[i] = nvmf_connect(na, &qparams, i + 1, queue_size, hostid,
+ nvmf_cntlid(*admin), subnqn, hostnqn, 0);
+ if (io[i] == NULL) {
+ warnx("Failed to create I/O queue: %s",
+ nvmf_association_error(na));
+ error = EX_IOERR;
+ goto out;
+ }
+ }
+ nvmf_free_association(na);
+ return (0);
+
+out:
+ for (u_int i = 0; i < num_io_queues; i++) {
+ if (io[i] == NULL)
+ break;
+ nvmf_free_qpair(io[i]);
+ }
+ shutdown_controller(*admin);
+ nvmf_free_association(na);
+ return (error);
+}
diff --git a/sbin/nvmecontrol/fabrics.h b/sbin/nvmecontrol/fabrics.h
new file mode 100644
index 000000000000..9d6ee24b88fb
--- /dev/null
+++ b/sbin/nvmecontrol/fabrics.h
@@ -0,0 +1,41 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __FABRICS_H__
+#define __FABRICS_H__
+
+/*
+ * Splits 'in_address' into separate 'address' and 'port' strings. If
+ * a separate buffer for the address was allocated, 'tofree' is set to
+ * the allocated buffer, otherwise 'tofree' is set to NULL.
+ */
+void nvmf_parse_address(const char *in_address, const char **address,
+ const char **port, char **tofree);
+
+uint16_t nvmf_parse_cntlid(const char *cntlid);
+
+/* Returns true if able to open a connection. */
+bool tcp_qpair_params(struct nvmf_qpair_params *params, int adrfam,
+ const char *address, const char *port);
+
+/* Connect to a discovery controller and return the Admin qpair. */
+struct nvmf_qpair *connect_discovery_adminq(enum nvmf_trtype trtype,
+ const char *address, const char *port, const char *hostnqn);
+
+/*
+ * Connect to an NVM controller establishing an Admin qpair and one or
+ * more I/O qpairs. The controller's controller data is returned in
+ * *cdata on success. Returns a non-zero value from <sysexits.h> on
+ * failure.
+ */
+int connect_nvm_queues(const struct nvmf_association_params *aparams,
+ enum nvmf_trtype trtype, int adrfam, const char *address,
+ const char *port, uint16_t cntlid, const char *subnqn, const char *hostnqn,
+ uint32_t kato, struct nvmf_qpair **admin, struct nvmf_qpair **io,
+ u_int num_io_queues, u_int queue_size, struct nvme_controller_data *cdata);
+
+#endif /* !__FABRICS_H__ */
diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8
index b5a85b1ab9f5..713fcf092d64 100644
--- a/sbin/nvmecontrol/nvmecontrol.8
+++ b/sbin/nvmecontrol/nvmecontrol.8
@@ -33,7 +33,7 @@
.\"
.\" Author: Jim Harris <jimharris@FreeBSD.org>
.\"
-.Dd April 17, 2024
+.Dd May 10, 2024
.Dt NVMECONTROL 8
.Os
.Sh NAME
@@ -205,9 +205,53 @@
.Ic io-passthru
.Op args
.Aq Ar namespace-id
+.Nm
+.Ic discover
+.Op Fl v
+.Op Fl t Ar transport
+.Op Fl q Ar HostNQN
+.Nm
+.Ic connect
+.Op Fl FGg
+.Op Fl c Ar cntl-id
+.Op Fl i Ar queues
+.Op Fl k Ar seconds
+.Op Fl t Ar transport
+.Op Fl q Ar HostNQN
+.Op Fl Q Ar entries
+.Aq Ar address
+.Aq Ar SubNQN
+.Nm
+.Ic connect-all
+.Op Fl FGg
+.Op Fl i Ar queues
+.Op Fl k Ar seconds
+.Op Fl t Ar transport
+.Op Fl q Ar HostNQN
+.Op Fl Q Ar entries
+.Aq Ar address
+.Nm
+.Ic disconnect
+.Aq Ar device-id | Ar namespace-id | Ar SubNQN
+.Nm
+.Ic reconnect
+.Op Fl FGg
+.Op Fl i Ar queues
+.Op Fl k Ar seconds
+.Op Fl t Ar transport
+.Op Fl q Ar HostNQN
+.Op Fl Q Ar entries
+.Aq Ar device-id
+.Aq Ar address
+.Nm
+.Ic telemetry-log
+.Fl O Ar output-file
+.Op Fl d Ar data-area
+.Aq Ar device-id
.Sh DESCRIPTION
-NVM Express (NVMe) is a storage protocol standard, for SSDs and other
-high-speed storage devices over PCI Express.
+NVM Express (NVMe) is a storage protocol standard for SSDs and other
+high-speed storage devices over PCI Express as well as remote storage
+devices accessed via a network fabric.
.Ss devlist
List all NVMe controllers and namespaces along with their device nodes.
With the
@@ -676,6 +720,108 @@ Commands either read data or write it, but not both.
Commands needing metadata are not supported by the
.Xr nvme 4
drive.
+.Ss discover
+List the remote controllers advertised by a remote Discovery Controller:
+.Bl -tag -width 6n
+.It Fl t Ar transport
+Transport to use.
+The default is
+.It Fl q Ar HostNQN
+NVMe Qualified Name to use for this host.
+By default an NQN is auto-generated from the current host's UUID.
+.Ar tcp .
+.It Fl v
+Display the
+.Dv IDENTIFY_CONTROLLER
+data for the Discovery Controller.
+.El
+.Ss connect
+Establish an association with the I/O controller named
+.Ar SubNQN
+at
+.Ar address .
+The address must include a port.
+.Pp
+An admin queue pair and one or more I/O queue pairs are created and handed
+off to the kernel to create a new controller device.
+.Bl -tag -width 6n
+.It Fl c Ar cntl-id
+Remote controller ID to request:
+.Bl -tag
+.It dynamic
+Request a dynamic controller ID for controllers using the dynamic
+controller model.
+This is the default.
+.It static
+Request a dynamic controller ID for controllers using the static
+controller model.
+.It Ar number
+Request a specific controller ID for controllers using the static
+controller model.
+.El
+.It Fl F
+Request submission queue flow control.
+By default submission queue flow control is disabled unless the remote
+controller requires it.
+.It Fl g
+Enable TCP PDU header digests.
+.It Fl G
+Enable TCP PDU data digests.
+.It Fl i Ar queues
+Number of I/O queue pairs to create.
+The default is 1.
+.It Fl k Ar seconds
+Keep Alive timer duration in seconds.
+The default is 120.
+.It Fl t Ar transport
+Transport to use.
+The default is
+.Ar tcp .
+.It Fl q Ar HostNQN
+NVMe Qualified Name to use for this host.
+By default an NQN is auto-generated from the current host's UUID.
+.It Fl Q Ar entries
+Number of entries in each I/O queue.
+By default the maximum queue size reported by the MQES field
+of the remote host's CAP property is used.
+.El
+.Ss connect-all
+Query the Discovery Controller at
+.Ar address
+and establish an association for each advertised I/O controller.
+The
+.Fl t
+flag determines the transport used for the initial association with
+the Discovery Controller and defaults to
+.Ar tcp .
+All other flags are used to control properties of each I/O assocation as
+described above for the
+.Cm connect
+command.
+.Ss disconnect
+Delete the controller device associated with a remote I/O controller
+including any active association and open queues.
+.Ss reconnect
+Reestablish an association for the remote I/O controller associated with
+.Ar device-id
+at
+.Ar address .
+The address must include a port.
+The flags have the same meaning for the new association as described above
+for the
+.Cm connect
+command.
+.Ss telemetry-log
+Extract the telemetry log associated with
+.Ar device-id ,
+using the specified parameters:
+.Bl -tag -width 6n
+.It Fl O Ar output-file
+Output file for the data.
+This parameter is mandatory.
+.It Fl d Ar data-area
+The data area is either 1, 2 or 3.
+.El
.Sh DEVICE NAMES
Where
.Aq Ar namespace-id
@@ -687,7 +833,7 @@ or
.Pa nvdZ .
The leading
.Pa /dev/
-is omitted.
+may be omitted.
Where
.Aq Ar device-id
is required, you can use either the
@@ -705,6 +851,37 @@ A
of
.Dq 0
means query the drive itself.
+.Sh FABRICS TRANSPORTS
+The following NVM Express over Fabrics transports are supported for
+accessing remote controllers:
+.Bl -tag
+.It tcp
+TCP transport
+.El
+.Sh NETWORK ADDRESSES
+Network addresses for remote controllers can use one of the following formats:
+.Bl -bullet
+.It
+.Bq Ar IPv6 address
+.Ns : Ns Ar port
+.It
+.Ar IPv4 address
+.Ns : Ns Ar port
+.It
+.Ar hostname Ns : Ns Ar port
+.It
+.Bq Ar IPv6 address
+.It
+.Ar IPv6 address
+.It
+.Ar IPv4 address
+.It
+.Ar hostname
+.El
+.Pp
+If a
+.Ar port
+is not provided, a default value is used if possible.
.Sh EXAMPLES
.Dl nvmecontrol devlist
.Pp
diff --git a/sbin/nvmecontrol/nvmecontrol.c b/sbin/nvmecontrol/nvmecontrol.c
index 10623799d705..8ad9703de9f6 100644
--- a/sbin/nvmecontrol/nvmecontrol.c
+++ b/sbin/nvmecontrol/nvmecontrol.c
@@ -145,9 +145,12 @@ read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata)
int
open_dev(const char *str, int *fd, int write, int exit_on_error)
{
- char full_path[64];
+ char full_path[MAXPATHLEN];
- snprintf(full_path, sizeof(full_path), _PATH_DEV"%s", str);
+ if (str[0] == '/') /* Full path */
+ strlcpy(full_path, str, sizeof(full_path));
+ else /* Add /dev/ */
+ snprintf(full_path, sizeof(full_path), _PATH_DEV"%s", str);
*fd = open(full_path, write ? O_RDWR : O_RDONLY);
if (*fd < 0) {
if (exit_on_error) {
diff --git a/sbin/nvmecontrol/reconnect.c b/sbin/nvmecontrol/reconnect.c
new file mode 100644
index 000000000000..b606409eea90
--- /dev/null
+++ b/sbin/nvmecontrol/reconnect.c
@@ -0,0 +1,170 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/socket.h>
+#include <err.h>
+#include <libnvmf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include "nvmecontrol.h"
+#include "fabrics.h"
+
+/*
+ * See comment about other possible settings in connect.c.
+ */
+
+static struct options {
+ const char *dev;
+ const char *transport;
+ const char *address;
+ const char *hostnqn;
+ uint32_t kato;
+ uint16_t num_io_queues;
+ uint16_t queue_size;
+ bool data_digests;
+ bool flow_control;
+ bool header_digests;
+} opt = {
+ .dev = NULL,
+ .transport = "tcp",
+ .address = NULL,
+ .hostnqn = NULL,
+ .kato = NVMF_KATO_DEFAULT / 1000,
+ .num_io_queues = 1,
+ .queue_size = 0,
+ .data_digests = false,
+ .flow_control = false,
+ .header_digests = false,
+};
+
+static void
+tcp_association_params(struct nvmf_association_params *params)
+{
+ params->tcp.pda = 0;
+ params->tcp.header_digests = opt.header_digests;
+ params->tcp.data_digests = opt.data_digests;
+ /* XXX */
+ params->tcp.maxr2t = 1;
+}
+
+static int
+reconnect_nvm_controller(int fd, enum nvmf_trtype trtype, int adrfam,
+ const char *address, const char *port)
+{
+ struct nvme_controller_data cdata;
+ struct nvmf_association_params aparams;
+ struct nvmf_reconnect_params rparams;
+ struct nvmf_qpair *admin, **io;
+ int error;
+
+ error = nvmf_reconnect_params(fd, &rparams);
+ if (error != 0) {
+ warnc(error, "Failed to fetch reconnect parameters");
+ return (EX_IOERR);
+ }
+
+ memset(&aparams, 0, sizeof(aparams));
+ aparams.sq_flow_control = opt.flow_control;
+ switch (trtype) {
+ case NVMF_TRTYPE_TCP:
+ tcp_association_params(&aparams);
+ break;
+ default:
+ warnx("Unsupported transport %s", nvmf_transport_type(trtype));
+ return (EX_UNAVAILABLE);
+ }
+
+ io = calloc(opt.num_io_queues, sizeof(*io));
+ error = connect_nvm_queues(&aparams, trtype, adrfam, address, port,
+ rparams.cntlid, rparams.subnqn, opt.hostnqn, opt.kato, &admin, io,
+ opt.num_io_queues, opt.queue_size, &cdata);
+ if (error != 0) {
+ free(io);
+ return (error);
+ }
+
+ error = nvmf_reconnect_host(fd, admin, opt.num_io_queues, io, &cdata);
+ if (error != 0) {
+ warnc(error, "Failed to handoff queues to kernel");
+ free(io);
+ return (EX_IOERR);
+ }
+ free(io);
+ return (0);
+}
+
+static void
+reconnect_fn(const struct cmd *f, int argc, char *argv[])
+{
+ enum nvmf_trtype trtype;
+ const char *address, *port;
+ char *tofree;
+ int error, fd;
+
+ if (arg_parse(argc, argv, f))
+ return;
+
+ if (strcasecmp(opt.transport, "tcp") == 0) {
+ trtype = NVMF_TRTYPE_TCP;
+ } else
+ errx(EX_USAGE, "Unsupported or invalid transport");
+
+ nvmf_parse_address(opt.address, &address, &port, &tofree);
+
+ open_dev(opt.dev, &fd, 1, 1);
+ if (port == NULL)
+ errx(EX_USAGE, "Explicit port required");
+
+ error = reconnect_nvm_controller(fd, trtype, AF_UNSPEC, address, port);
+ if (error != 0)
+ exit(error);
+
+ close(fd);
+ free(tofree);
+}
+
+static const struct opts reconnect_opts[] = {
+#define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc }
+ OPT("transport", 't', arg_string, opt, transport,
+ "Transport type"),
+ OPT("nr-io-queues", 'i', arg_uint16, opt, num_io_queues,
+ "Number of I/O queues"),
+ OPT("queue-size", 'Q', arg_uint16, opt, queue_size,
+ "Number of entries in each I/O queue"),
+ OPT("keep-alive-tmo", 'k', arg_uint32, opt, kato,
+ "Keep Alive timeout (in seconds)"),
+ OPT("hostnqn", 'q', arg_string, opt, hostnqn,
+ "Host NQN"),
+ OPT("flow_control", 'F', arg_none, opt, flow_control,
+ "Request SQ flow control"),
+ OPT("hdr_digests", 'g', arg_none, opt, header_digests,
+ "Enable TCP PDU header digests"),
+ OPT("data_digests", 'G', arg_none, opt, data_digests,
+ "Enable TCP PDU data digests"),
+ { NULL, 0, arg_none, NULL, NULL }
+};
+#undef OPT
+
+static const struct args reconnect_args[] = {
+ { arg_string, &opt.dev, "controller-id" },
+ { arg_string, &opt.address, "address" },
+ { arg_none, NULL, NULL },
+};
+
+static struct cmd reconnect_cmd = {
+ .name = "reconnect",
+ .fn = reconnect_fn,
+ .descr = "Reconnect to a fabrics controller",
+ .ctx_size = sizeof(opt),
+ .opts = reconnect_opts,
+ .args = reconnect_args,
+};
+
+CMD_COMMAND(reconnect_cmd);
diff --git a/sbin/nvmecontrol/telemetry.c b/sbin/nvmecontrol/telemetry.c
new file mode 100644
index 000000000000..72c304229a80
--- /dev/null
+++ b/sbin/nvmecontrol/telemetry.c
@@ -0,0 +1,182 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2024 Netflix, Inc
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/param.h>
+#include <sys/ioccom.h>
+
+#include <ctype.h>
+#include <err.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+#include <sys/endian.h>
+
+#include "nvmecontrol.h"
+
+/* Tables for command line parsing */
+
+static cmd_fn_t telemetry_log;
+
+#define NONE 0xffffffffu
+static struct options {
+ const char *outfn;
+ const char *dev;
+ uint8_t da;
+} opt = {
+ .outfn = NULL,
+ .dev = NULL,
+ .da = 3,
+};
+
+static const struct opts telemetry_log_opts[] = {
+#define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc }
+ OPT("output-file", 'O', arg_string, opt, outfn,
+ "output file for telemetry data"),
+ OPT("data-area", 'd', arg_uint8, opt, da,
+ "output file for telemetry data"),
+ { NULL, 0, arg_none, NULL, NULL }
+};
+#undef OPT
+
+static const struct args telemetry_log_args[] = {
+ { arg_string, &opt.dev, "<controller id|namespace id>" },
+ { arg_none, NULL, NULL },
+};
+
+static struct cmd telemetry_log_cmd = {
+ .name = "telemetry-log",
+ .fn = telemetry_log,
+ .descr = "Retrieves telemetry log pages from drive",
+ .ctx_size = sizeof(opt),
+ .opts = telemetry_log_opts,
+ .args = telemetry_log_args,
+};
+
+CMD_COMMAND(telemetry_log_cmd);
+
+/* End of tables for command line parsing */
+
+/*
+ * Note: Even though this is a logpage, it's variable size and tricky
+ * to get with some weird options, so it's its own command.
+ */
+
+static void
+telemetry_log(const struct cmd *f, int argc, char *argv[])
+{
+ int fd, fdout;
+ char *path;
+ uint32_t nsid;
+ ssize_t size;
+ uint64_t off;
+ ssize_t chunk;
+ struct nvme_controller_data cdata;
+ bool can_telemetry;
+ struct nvme_telemetry_log_page tlp, buf;
+
+ if (arg_parse(argc, argv, f))
+ return;
+ if (opt.da < 1 || opt.da > 3)
+ errx(EX_USAGE, "Data area %d is not in the range 1-3\n", opt.da);
+ if (opt.outfn == NULL)
+ errx(EX_USAGE, "No output file specified");
+
+ open_dev(opt.dev, &fd, 0, 1);
+ get_nsid(fd, &path, &nsid);
+ if (nsid == 0) {
+ nsid = NVME_GLOBAL_NAMESPACE_TAG;
+ } else {
+ close(fd);
+ open_dev(path, &fd, 0, 1);
+ }
+ free(path);
+
+ if (read_controller_data(fd, &cdata))
+ errx(EX_IOERR, "Identify request failed");
+
+ can_telemetry = NVMEV(NVME_CTRLR_DATA_LPA_TELEMETRY, cdata.lpa);
+ if (!can_telemetry)
+ errx(EX_UNAVAILABLE, "Drive does not support telemetry");
+ if (nsid != NVME_GLOBAL_NAMESPACE_TAG)
+ errx(EX_UNAVAILABLE, "Cannot operate on namespace");
+
+ fdout = open(opt.outfn, O_WRONLY | O_CREAT, 0664);
+ if (fdout == -1)
+ err(EX_IOERR, "Can't create %s", opt.outfn);
+
+ /* Read the log page */
+ size = sizeof(tlp);
+ off = 0;
+ read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, 0,
+ off, 0, 0, 0, &tlp, size);
+ switch(opt.da) {
+ case 1:
+ size = letoh(tlp.da1_last);
+ break;
+ case 2:
+ size = letoh(tlp.da2_last);
+ break;
+ case 3:
+ size = letoh(tlp.da3_last);
+ break;
+ default:
+ errx(EX_USAGE, "Impossible data area %d", opt.da);
+ }
+ size = (size + 1) * 512; /* The count of additional pages */
+ chunk = 4096;
+
+ printf("Extracting %llu bytes\n", (unsigned long long)size);
+ do {
+ if (chunk > size)
+ chunk = size;
+ read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, 0,
+ off, 0, 0, 0, &buf, chunk);
+ if (off == 0) {
+ /*
+ * Sanity check to make sure that the generation number
+ * didn't change between the two reads.
+ */
+ if (tlp.hi_gen != buf.hi_gen)
+ warnx(
+ "Generation number changed from %d to %d",
+ tlp.hi_gen, buf.hi_gen);
+ }
+ if (write(fdout, &buf, chunk) != chunk)
+ err(EX_IOERR, "Error writing %s", opt.outfn);
+ off += chunk;
+ size -= chunk;
+ } while (size > 0);
+
+ close(fdout);
+ close(fd);
+ exit(0);
+}
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 8d59871701f8..1843ec5713d6 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1283,14 +1283,14 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
}
if (opts & PF_OPT_SHOWALL) {
- ret = pfctl_get_rules_info(dev, &ri, PF_PASS, path);
+ ret = pfctl_get_rules_info_h(pfh, &ri, PF_PASS, path);
if (ret != 0) {
warn("DIOCGETRULES");
goto error;
}
header++;
}
- ret = pfctl_get_rules_info(dev, &ri, PF_SCRUB, path);
+ ret = pfctl_get_rules_info_h(pfh, &ri, PF_SCRUB, path);
if (ret != 0) {
warn("DIOCGETRULES");
goto error;
@@ -1328,7 +1328,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
}
pfctl_clear_pool(&rule.rpool);
}
- ret = pfctl_get_rules_info(dev, &ri, PF_PASS, path);
+ ret = pfctl_get_rules_info_h(pfh, &ri, PF_PASS, path);
if (ret != 0) {
warn("DIOCGETRULES");
goto error;
@@ -1435,7 +1435,7 @@ pfctl_show_nat(int dev, char *path, int opts, char *anchorname, int depth)
snprintf(&path[len], MAXPATHLEN - len, "%s", anchorname);
for (i = 0; i < 3; i++) {
- ret = pfctl_get_rules_info(dev, &ri, nattype[i], path);
+ ret = pfctl_get_rules_info_h(pfh, &ri, nattype[i], path);
if (ret != 0) {
warn("DIOCGETRULES");
return (-1);
@@ -1578,7 +1578,7 @@ pfctl_show_status(int dev, int opts)
struct pfctl_status *status;
struct pfctl_syncookies cookies;
- if ((status = pfctl_get_status(dev)) == NULL) {
+ if ((status = pfctl_get_status_h(pfh)) == NULL) {
warn("DIOCGETSTATUS");
return (-1);
}
@@ -1600,7 +1600,7 @@ pfctl_show_running(int dev)
struct pfctl_status *status;
int running;
- if ((status = pfctl_get_status(dev)) == NULL) {
+ if ((status = pfctl_get_status_h(pfh)) == NULL) {
warn("DIOCGETSTATUS");
return (-1);
}
@@ -2035,7 +2035,7 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth)
if ((pf->opts & PF_OPT_NOACTION) == 0) {
if (pfctl_add_pool(pf, &r->rpool, r->af))
return (1);
- error = pfctl_add_rule(pf->dev, r, anchor, name, ticket,
+ error = pfctl_add_rule_h(pf->h, r, anchor, name, ticket,
pf->paddr.ticket);
switch (error) {
case 0:
@@ -2130,6 +2130,7 @@ pfctl_rules(int dev, char *filename, int opts, int optimize,
sizeof(trs.pfrt_anchor)) >= sizeof(trs.pfrt_anchor))
ERRX("pfctl_rules: strlcpy");
pf.dev = dev;
+ pf.h = pfh;
pf.opts = opts;
pf.optimize = optimize;
pf.loadopt = loadopt;
diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c
index 95292999c50a..9b43a840c06f 100644
--- a/sbin/pfctl/pfctl_optimize.c
+++ b/sbin/pfctl/pfctl_optimize.c
@@ -889,7 +889,7 @@ load_feedback_profile(struct pfctl *pf, struct superblocks *superblocks)
TAILQ_INIT(&queue);
TAILQ_INIT(&prof_superblocks);
- if (pfctl_get_rules_info(pf->dev, &rules, PF_PASS, "")) {
+ if (pfctl_get_rules_info_h(pf->h, &rules, PF_PASS, "")) {
warn("DIOCGETRULES");
return (1);
}
diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h
index d0f3bc3c303c..6534baa9a7dd 100644
--- a/sbin/pfctl/pfctl_parser.h
+++ b/sbin/pfctl/pfctl_parser.h
@@ -75,6 +75,7 @@ struct pfr_buffer; /* forward definition */
struct pfctl {
int dev;
+ struct pfctl_handle *h;
int opts;
int optimize;
int loadopt;
diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8
index ed055327b36a..59cbd9de7519 100644
--- a/sbin/reboot/reboot.8
+++ b/sbin/reboot/reboot.8
@@ -175,7 +175,7 @@ After changing vfs.root.mountfrom with
.Nm Fl r
can be used to change the root filesystem while preserving kernel state.
This requires the
-.Xr tmpfs 5
+.Xr tmpfs 4
kernel module to be loaded because
.Xr init 8
needs a place to store itself after the old root is unmounted, but
diff --git a/sbin/setkey/setkey.c b/sbin/setkey/setkey.c
index d9b905ad845e..f7268d8f1e10 100644
--- a/sbin/setkey/setkey.c
+++ b/sbin/setkey/setkey.c
@@ -502,7 +502,7 @@ static const char *ipproto[] = {
};
#define STR_OR_ID(x, tab) \
- (((x) < sizeof(tab)/sizeof(tab[0]) && tab[(x)]) ? tab[(x)] : numstr(x))
+ (((x) < nitems(tab) && tab[(x)]) ? tab[(x)] : numstr(x))
const char *
numstr(int x)
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 26a7dc22654a..a09f2598e2ac 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -56,7 +56,6 @@
static void usage(void) __dead2;
static const char *swap_on_off(const char *, int, char *);
-static const char *swap_on_off_gbde(const char *, int);
static const char *swap_on_off_geli(const char *, char *, int);
static const char *swap_on_off_md(const char *, char *, int);
static const char *swap_on_off_sfile(const char *, int);
@@ -238,12 +237,6 @@ swap_on_off(const char *name, int doingall, char *mntops)
basebuf = strdup(name);
base = basename(basebuf);
- /* Swap on encrypted device by GEOM_BDE. */
- if (fnmatch("*.bde", base, 0) == 0) {
- free(basebuf);
- return (swap_on_off_gbde(name, doingall));
- }
-
/* Swap on encrypted device by GEOM_ELI. */
if (fnmatch("*.eli", base, 0) == 0) {
free(basebuf);
@@ -269,59 +262,6 @@ swap_basename(const char *name)
return (dname);
}
-static const char *
-swap_on_off_gbde(const char *name, int doingall)
-{
- const char *ret;
- char pass[64 * 2 + 1];
- unsigned char bpass[64];
- char *dname;
- int i, error;
-
- dname = swap_basename(name);
- if (dname == NULL)
- return (NULL);
-
- if (which_prog == SWAPON) {
- arc4random_buf(bpass, sizeof(bpass));
- for (i = 0; i < (int)sizeof(bpass); i++)
- sprintf(&pass[2 * i], "%02x", bpass[i]);
- pass[sizeof(pass) - 1] = '\0';
-
- error = run_cmd(NULL, "%s init %s -P %s", _PATH_GBDE,
- dname, pass);
- if (error) {
- /* bde device found. Ignore it. */
- free(dname);
- if (qflag == 0)
- warnx("%s: Device already in use", name);
- return (NULL);
- }
- error = run_cmd(NULL, "%s attach %s -p %s", _PATH_GBDE,
- dname, pass);
- free(dname);
- if (error) {
- warnx("gbde (attach) error: %s", name);
- return (NULL);
- }
- }
-
- ret = swap_on_off_sfile(name, doingall);
-
- if (which_prog == SWAPOFF) {
- error = run_cmd(NULL, "%s detach %s", _PATH_GBDE, dname);
- free(dname);
- if (error) {
- /* bde device not found. Ignore it. */
- if (qflag == 0)
- warnx("%s: Device not found", name);
- return (NULL);
- }
- }
-
- return (ret);
-}
-
/* Build geli(8) arguments from mntops */
static char *
swap_on_geli_args(const char *mntops)
diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8
index 97de1abf33c0..0fb11041d97d 100644
--- a/sbin/tunefs/tunefs.8
+++ b/sbin/tunefs/tunefs.8
@@ -215,8 +215,8 @@ read this to determine the device file for a
specified mount point.
.El
.Sh SEE ALSO
+.Xr ffs 4 ,
.Xr fs 5 ,
-.Xr ffs 7 ,
.Xr tuning 7 ,
.Xr dumpfs 8 ,
.Xr gjournal 8 ,
diff --git a/share/examples/Makefile b/share/examples/Makefile
index 0425e36c1cf5..61e21f9350c1 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -41,7 +41,7 @@ SE_BSD_DAEMON= \
eps.patch \
poster.sh
-.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64"
.if ${MK_BHYVE} != "no"
LDIRS+= bhyve
SE_DIRS+= bhyve
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh
index 19eed87af0bf..52935363023a 100755
--- a/share/examples/bhyve/vmrun.sh
+++ b/share/examples/bhyve/vmrun.sh
@@ -72,29 +72,29 @@ usage() {
echo " -C: console device (default: ${DEFAULT_CONSOLE})"
echo " -d: virtio diskdev file (default: ${DEFAULT_VIRTIO_DISK})"
echo " -e: set FreeBSD loader environment variable"
- echo " -E: Use UEFI mode"
- echo " -f: Use a specific UEFI firmware"
+ echo " -E: Use UEFI mode (amd64 only)"
+ echo " -f: Use a specific boot firmware (e.g., EDK2, U-Boot)"
echo " -F: Use a custom UEFI GOP framebuffer size" \
- "(default: ${DEFAULT_VNCSIZE})"
+ "(default: ${DEFAULT_VNCSIZE}) (amd64 only)"
echo " -G: bind the GDB stub to the specified address"
echo " -H: host filesystem to export to the loader"
echo " -i: force boot of the Installation CDROM image"
echo " -I: Installation CDROM image location" \
"(default: ${DEFAULT_ISOFILE})"
- echo " -l: the OS loader to use (default: /boot/userboot.so)"
+ echo " -l: the OS loader to use (default: /boot/userboot.so) (amd64 only)"
echo " -L: IP address for UEFI GOP VNC server" \
"(default: ${DEFAULT_VNCHOST})"
echo " -m: memory size (default: ${DEFAULT_MEMSIZE})"
echo " -n: network adapter emulation type" \
"(default: ${DEFAULT_NIC})"
echo " -p: pass-through a host PCI device (e.g ppt0 or" \
- "bus/slot/func)"
+ "bus/slot/func) (amd64 only)"
echo " -P: UEFI GOP VNC port (default: ${DEFAULT_VNCPORT})"
echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)"
- echo " -T: Enable tablet device (for UEFI GOP)"
+ echo " -T: Enable tablet device (for UEFI GOP) (amd64 only)"
echo " -u: RTC keeps UTC time"
echo " -v: Wait for VNC client connection before booting VM"
- echo " -w: ignore unimplemented MSRs"
+ echo " -w: ignore unimplemented MSRs (amd64 only)"
echo ""
[ -n "$msg" ] && errmsg "$msg"
exit 1
@@ -111,6 +111,12 @@ if [ $? -ne 0 ]; then
exit 1
fi
+platform=$(uname -m)
+if [ "${platform}" != amd64 -a "${platform}" != arm64 ]; then
+ errmsg "This script is only supported on amd64 and arm64 platforms"
+ exit 1
+fi
+
force_install=0
isofile=${DEFAULT_ISOFILE}
memsize=${DEFAULT_MEMSIZE}
@@ -121,7 +127,6 @@ tap_total=0
disk_total=0
disk_emulation=${DEFAULT_DISK}
loader_opt=""
-bhyverun_opt="-H -P"
pass_total=0
# EFI-specific options
@@ -133,7 +138,21 @@ vncport=${DEFAULT_VNCPORT}
vncsize=${DEFAULT_VNCSIZE}
tablet=""
-while getopts aAc:C:d:e:Ef:F:G:hH:iI:l:L:m:n:p:P:t:Tuvw c ; do
+# arm64 only
+uboot_firmware="/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin"
+
+case ${platform} in
+amd64)
+ bhyverun_opt="-H -P"
+ opts="aAc:C:d:e:Ef:F:G:hH:iI:l:L:m:n:p:P:t:Tuvw"
+ ;;
+arm64)
+ bhyverun_opt=""
+ opts="aAc:C:d:e:f:F:G:hH:iI:L:m:n:P:t:uv"
+ ;;
+esac
+
+while getopts $opts c ; do
case $c in
a)
bhyverun_opt="${bhyverun_opt} -a"
@@ -161,7 +180,7 @@ while getopts aAc:C:d:e:Ef:F:G:hH:iI:l:L:m:n:p:P:t:Tuvw c ; do
efi_mode=1
;;
f)
- efi_firmware="${OPTARG}"
+ firmware="${OPTARG}"
;;
F)
vncsize="${OPTARG}"
@@ -246,12 +265,25 @@ if [ ${pass_total} -gt 0 ]; then
bhyverun_opt="${bhyverun_opt} -S"
fi
-if [ ${efi_mode} -gt 0 ]; then
- if [ ! -f ${efi_firmware} ]; then
- echo "Error: EFI Firmware ${efi_firmware} doesn't exist." \
- "Try: pkg install edk2-bhyve"
- exit 1
+if [ -z "$firmware" ]; then
+ case ${platform} in
+ amd64)
+ firmware="${efi_firmware}"
+ firmware_pkg="edk2-bhyve"
+ ;;
+ arm64)
+ firmware="${uboot_firmware}"
+ firmware_pkg="u-boot-bhyve-arm64"
+ ;;
+ esac
+fi
+
+if [ -n "${firmware}" -a ! -f "${firmware}" ]; then
+ echo "Error: Firmware file ${firmware} doesn't exist."
+ if [ -n "${firmware_pkg}" ]; then
+ echo " Try: pkg install ${firmware_pkg}"
fi
+ exit 1
fi
make_and_check_diskdev()
@@ -317,7 +349,7 @@ while [ 1 ]; do
installer_opt=""
fi
- if [ ${efi_mode} -eq 0 ]; then
+ if [ ${platform} = amd64 -a ${efi_mode} -eq 0 ]; then
${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} \
${loader_opt} ${vmname}
bhyve_exit=$?
@@ -329,15 +361,19 @@ while [ 1 ]; do
#
# Build up args for additional tap and disk devices now.
#
- nextslot=2 # slot 0 is hostbridge, slot 1 is lpc
- devargs="" # accumulate disk/tap args here
- i=0
- while [ $i -lt $tap_total ] ; do
- eval "tapname=\$tap_dev${i}"
- devargs="$devargs -s $nextslot:0,${nic},${tapname} "
- nextslot=$(($nextslot + 1))
- i=$(($i + 1))
- done
+ devargs="-s 0:0,hostbridge" # accumulate disk/tap args here
+ case ${platform} in
+ amd64)
+ console_opt="-l com1,${console}"
+ devargs="$devargs -s 1:0,lpc "
+ nextslot=2 # slot 0 is hostbridge, slot 1 is lpc
+ ;;
+ arm64)
+ console_opt="-o console=${console}"
+ devargs="$devargs -o bootrom=${firmware} "
+ nextslot=1 # slot 0 is hostbridge
+ ;;
+ esac
i=0
while [ $i -lt $disk_total ] ; do
@@ -350,6 +386,14 @@ while [ 1 ]; do
done
i=0
+ while [ $i -lt $tap_total ] ; do
+ eval "tapname=\$tap_dev${i}"
+ devargs="$devargs -s $nextslot:0,${nic},${tapname} "
+ nextslot=$(($nextslot + 1))
+ i=$(($i + 1))
+ done
+
+ i=0
while [ $i -lt $pass_total ] ; do
eval "pass=\$pass_dev${i}"
bsfform="$(echo "${pass}" | grep "^[0-9]\+/[0-9]\+/[0-9]\+$")"
@@ -372,16 +416,14 @@ while [ 1 ]; do
if [ ${efi_mode} -gt 0 ]; then
efiargs="-s 29,fbuf,tcp=${vnchost}:${vncport},"
efiargs="${efiargs}${vncsize}${vncwait}"
- efiargs="${efiargs} -l bootrom,${efi_firmware}"
+ efiargs="${efiargs} -l bootrom,${firmware}"
efiargs="${efiargs} ${tablet}"
fi
${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \
- -s 0:0,hostbridge \
- -s 1:0,lpc \
${efiargs} \
${devargs} \
- -l com1,${console} \
+ ${console_opt} \
${installer_opt} \
${vmname}
diff --git a/share/examples/modules/Makefile b/share/examples/modules/Makefile
index 0f0a2fb01e8a..4ed5e5354c79 100644
--- a/share/examples/modules/Makefile
+++ b/share/examples/modules/Makefile
@@ -4,3 +4,5 @@ KMOD= skel
SRCS= skel.c
.include <bsd.kmod.mk>
+
+CFLAGS+= -DKDTRACE_HOOKS
diff --git a/share/man/man3/makedev.3 b/share/man/man3/makedev.3
index 4cf851f87508..3c0e176a0621 100644
--- a/share/man/man3/makedev.3
+++ b/share/man/man3/makedev.3
@@ -97,4 +97,4 @@ macros return numbers whose value can span the complete range of an
.Sh SEE ALSO
.Xr mknod 2 ,
.Xr devname 3 ,
-.Xr devfs 5
+.Xr devfs 4
diff --git a/share/man/man3/sysexits.3 b/share/man/man3/sysexits.3
index ef736192e439..62f79b286a16 100644
--- a/share/man/man3/sysexits.3
+++ b/share/man/man3/sysexits.3
@@ -1,7 +1,7 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
+.\" Copyright (c) 1996 Joerg Wunsch. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -23,27 +23,20 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" "
-.Dd January 21, 2010
+.Dd May 9, 2024
.Dt SYSEXITS 3
.Os
.Sh NAME
.Nm sysexits
-.Nd preferable exit codes for programs
+.Nd legacy exit status codes for system programs
.Sh SYNOPSIS
.In sysexits.h
.Sh DESCRIPTION
-According to
-.Xr style 9 ,
-it is not a good practice to call
-.Xr exit 3
-with arbitrary values to indicate a failure condition when ending
-a program.
-Instead, the pre-defined exit codes from
-.Nm
-should be used, so the caller of the process can get a rough
-estimation about the failure class without looking up the source code.
-.Pp
+Some commands attempt to describe the nature of a failure condition
+by using these pre-defined exit codes.
+This interface has been deprecated and is retained only for compatibility.
+Its use is discouraged.
+.Sh ERRORS
The successful exit is always indicated by a status of 0, or
.Sy EX_OK .
Error numbers begin at
@@ -112,8 +105,7 @@ The remote system returned something that was
during a protocol exchange.
.It Sy EX_NOPERM Pq 77
You did not have sufficient permission to perform the operation.
-This
-is not intended for file system problems, which should use
+This is not intended for file system problems, which should use
.Sy EX_NOINPUT
or
.Sy EX_CANTCREAT ,
@@ -131,12 +123,13 @@ parenthesis for easy reference.
.Sh HISTORY
The
.Nm
-file appeared somewhere after
-.Bx 4.3 .
+file first appeared in
+.Bx 4 .
.Sh AUTHORS
This manual page was written by
-.An J\(:org Wunsch
-after the comments in
-.In sysexits.h .
+.An J\(:org Wunsch .
.Sh BUGS
-The choice of an appropriate exit value is often ambiguous.
+.Bl -tag -width 0 -compact
+.It This interface is not portable.
+.It The choice of an appropriate exit value is often ambiguous.
+.El
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 020b009893d5..69424a4be271 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -100,6 +100,7 @@ MAN= aac.4 \
cc_vegas.4 \
${_ccd.4} \
ccr.4 \
+ cd9660.4 \
cd.4 \
cdce.4 \
cdceem.4 \
@@ -127,6 +128,7 @@ MAN= aac.4 \
dcons_crom.4 \
ddb.4 \
devctl.4 \
+ devfs.4 \
disc.4 \
disk.4 \
divert.4 \
@@ -147,23 +149,26 @@ MAN= aac.4 \
etherswitch.4 \
eventtimers.4 \
exca.4 \
+ ext2fs.4 \
e6060sw.4 \
fd.4 \
fdc.4 \
+ fdescfs.4 \
fdt.4 \
fdt_pinctrl.4 \
fdtbus.4 \
ffclock.4 \
+ ffs.4 \
filemon.4 \
firewire.4 \
${_ftgpio.4} \
${_ftwd.4} \
full.4 \
+ fusefs.4 \
fwe.4 \
fwip.4 \
fwohci.4 \
fxp.4 \
- gbde.4 \
gdb.4 \
gem.4 \
genet.4 \
@@ -209,6 +214,7 @@ MAN= aac.4 \
${_hwpstate_intel.4} \
i2ctinyusb.4 \
iavf.4 \
+ ice.4 \
ichsmb.4 \
${_ichwd.4} \
icmp.4 \
@@ -276,6 +282,9 @@ MAN= aac.4 \
le.4 \
led.4 \
lge.4 \
+ lindebugfs.4 \
+ linprocfs.4 \
+ linsysfs.4 \
${_linux.4} \
liquidio.4 \
lm75.4 \
@@ -288,6 +297,7 @@ MAN= aac.4 \
mac_biba.4 \
mac_bsdextended.4 \
mac_ddb.4 \
+ mac_do.4 \
mac_ifoff.4 \
mac_ipacl.4 \
mac_lomac.4 \
@@ -322,7 +332,9 @@ MAN= aac.4 \
mpr.4 \
mps.4 \
mpt.4 \
+ mqueuefs.4 \
mrsas.4 \
+ msdosfs.4 \
msk.4 \
mtio.4 \
multicast.4 \
@@ -342,6 +354,7 @@ MAN= aac.4 \
netlink.4 \
netmap.4 \
${_nfe.4} \
+ nfslockd.4 \
${_nfsmb.4} \
ng_async.4 \
ng_bpf.4 \
@@ -404,10 +417,14 @@ MAN= aac.4 \
${_nda.4} \
${_if_ntb.4} \
null.4 \
+ nullfs.4 \
numa.4 \
nvd.4 \
${_nvdimm.4} \
nvme.4 \
+ nvmf.4 \
+ nvmf_tcp.4 \
+ nvmft.4 \
${_nvram.4} \
oce.4 \
ocs_fc.4\
@@ -443,6 +460,7 @@ MAN= aac.4 \
ppc.4 \
ppi.4 \
procdesc.4 \
+ procfs.4 \
proto.4 \
ps4dshock.4 \
psm.4 \
@@ -491,6 +509,7 @@ MAN= aac.4 \
send.4 \
ses.4 \
${_sfxge.4} \
+ sg.4 \
sge.4 \
siba.4 \
siftr.4 \
@@ -500,6 +519,7 @@ MAN= aac.4 \
sk.4 \
${_smartpqi.4} \
smb.4 \
+ smbfs.4 \
smbios.4 \
smbus.4 \
smp.4 \
@@ -516,6 +536,7 @@ MAN= aac.4 \
snd_es137x.4 \
snd_fm801.4 \
snd_hda.4 \
+ snd_hdsp.4 \
snd_hdspe.4 \
snd_ich.4 \
snd_maestro3.4 \
@@ -543,6 +564,7 @@ MAN= aac.4 \
syscons.4 \
sysmouse.4 \
tap.4 \
+ tarfs.4 \
targ.4 \
tcp.4 \
tcp_bbr.4 \
@@ -552,6 +574,7 @@ MAN= aac.4 \
textdump.4 \
ti.4 \
timecounters.4 \
+ tmpfs.4 \
${_tpm.4} \
tslog.4 \
tty.4 \
@@ -560,6 +583,7 @@ MAN= aac.4 \
tws.4 \
udp.4 \
udplite.4 \
+ unionfs.4 \
ure.4 \
vale.4 \
vga.4 \
@@ -665,6 +689,7 @@ MLINKS+=em.4 if_em.4 \
MLINKS+=enc.4 if_enc.4
MLINKS+=epair.4 if_epair.4
MLINKS+=et.4 if_et.4
+MLINKS+=ext2fs.4 ext4fs.4
MLINKS+=fd.4 stderr.4 \
fd.4 stdin.4 \
fd.4 stdout.4
@@ -688,6 +713,7 @@ MLINKS+=ip.4 rawip.4
MLINKS+=ipfirewall.4 ipaccounting.4 \
ipfirewall.4 ipacct.4 \
ipfirewall.4 ipfw.4
+MLINKS+=ice.4 if_ice.4
MLINKS+=ipheth.4 if_ipheth.4
MLINKS+=ipw.4 if_ipw.4
MLINKS+=iwi.4 if_iwi.4
@@ -714,6 +740,7 @@ MLINKS+=mfi.4 mfi_linux.4 \
mfi.4 mfip.4
MLINKS+=mlx5en.4 mce.4
MLINKS+=mos.4 if_mos.4
+MLINKS+=msdosfs.4 msdos.4
MLINKS+=msk.4 if_msk.4
MLINKS+=mwl.4 if_mwl.4
MLINKS+=mxge.4 if_mxge.4
@@ -909,6 +936,10 @@ SUBDIR+= man4.${__arch}
.endif
.endfor
+.if ${MK_AUTOFS} != "no"
+MAN+= autofs.4
+.endif
+
.if ${MK_BLUETOOTH} != "no"
MAN+= ng_bluetooth.4
.endif
diff --git a/share/man/man4/ahc.4 b/share/man/man4/ahc.4
index a666885f8f4a..582b34fe2071 100644
--- a/share/man/man4/ahc.4
+++ b/share/man/man4/ahc.4
@@ -40,12 +40,6 @@ kernel configuration file:
.Pp
For one or more PCI cards:
.Cd "device pci"
-.Pp
-To allow PCI adapters to use memory mapped I/O if enabled:
-.Cd options AHC_ALLOW_MEMIO
-.Pp
-To configure one or more controllers to assume the target role:
-.Cd options AHC_TMODE_ENABLE <bitmask of units>
.Ed
.Pp
Alternatively, to load the driver as a
@@ -66,29 +60,6 @@ Driver features include support for twin and wide busses,
fast, ultra or ultra2 synchronous transfers depending on controller type,
tagged queueing, SCB paging, and target mode.
.Pp
-Memory mapped I/O can be enabled for PCI devices with the
-.Dq Dv AHC_ALLOW_MEMIO
-configuration option.
-Memory mapped I/O is more efficient than the alternative, programmed I/O.
-Most PCI BIOSes will map devices so that either technique for communicating
-with the card is available.
-In some cases,
-usually when the PCI device is sitting behind a PCI->PCI bridge,
-the BIOS may fail to properly initialize the chip for memory mapped I/O.
-The typical symptom of this problem is a system hang if memory mapped I/O
-is attempted.
-Most modern motherboards perform the initialization correctly and work fine
-with this option enabled.
-.Pp
-Individual controllers may be configured to operate in the target role
-through the
-.Dq Dv AHC_TMODE_ENABLE
-configuration option.
-The value assigned to this option should be a bitmap
-of all units where target mode is desired.
-For example, a value of 0x25, would enable target mode on units 0, 2, and 5.
-A value of 0x8a enables it for units 1, 3, and 7.
-.Pp
Per target configuration performed in the
.Tn SCSI-Select
menu, accessible at boot
@@ -156,6 +127,50 @@ Multiple Target IDs - Allows the controller to respond to selection as a
target on multiple SCSI IDs.
.El
.Ed
+.Sh CONFIGURATION OPTIONS
+.Pp
+To allow PCI adapters to use memory mapped I/O if enabled:
+.Pp
+.Cd options AHC_ALLOW_MEMIO=(0 -- disabled, 1 -- enabled)
+.Bd -ragged -offset indent
+Memory mapped I/O is more efficient than the alternative, programmed I/O.
+Most PCI BIOSes will map devices so that either technique for communicating
+with the card is available. In some cases, usually when the PCI device is
+sitting behind a PCI->PCI bridge, the BIOS may fail to properly initialize
+the chip for memory mapped I/O. The typical symptom of this problem is a
+system hang if memory mapped I/O is attempted.
+.Pp
+Most modern motherboards perform the initialization correctly and work fine
+with this option enabled and it is the default. This option can also be
+dynamically configued through a device hint documented below.
+.Ed
+.Pp
+To statically configure one or more controllers to assume the target role:
+.Pp
+.Cd options AHC_TMODE_ENABLE=<bitmask of units>
+.Bd -ragged -offset indent
+The value assigned to this option should be a bitmap of all units where target
+mode is desired. For example, a value of 0x25, would enable target mode on
+units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7.
+.Pp
+Note that controllers can be dynamically configured through a device hint
+documented below.
+.El
+.Ed
+.Sh BOOT OPTIONS
+The following options are switchable by setting values in
+.Pa /boot/device.hints .
+.Pp
+They are:
+.Bl -tag -width indent
+.It Va hint.ahc. Ns Ar N Ns Va .tmode_enable
+A hint to define whether the SCSI target mode is enabled, defaults to disabled
+(0 -- disabled, 1 -- enabled).
+.It Va hint.ahc. Ns Ar N Ns Va .allow_memio
+A hint to define whether memory mapped io is enabled or disabled for this
+adapter, defaults to enabled (0 -- disabled, 1 -- enabled).
+.El
+.Ed
.Sh HARDWARE
The
.Nm
diff --git a/share/man/man4/ahd.4 b/share/man/man4/ahd.4
index cf04863ce1c8..e7f9b73f085a 100644
--- a/share/man/man4/ahd.4
+++ b/share/man/man4/ahd.4
@@ -45,9 +45,6 @@ To compile in debugging code:
.Cd options AHD_DEBUG
.Cd options AHD_DEBUG_OPTS=<bitmask of options>
.Cd options AHD_REG_PRETTY_PRINT
-.Pp
-To configure one or more controllers to assume the target role:
-.Cd options AHD_TMODE_ENABLE=<bitmask of units>
.Ed
.Pp
Alternatively, to load the driver as a
@@ -99,15 +96,6 @@ that is printed by the debugging code.
However, it also bloats the compiled
size of the driver by approximately 215KB.
.Pp
-Individual controllers may be configured to operate in the target role
-through the
-.Dv AHD_TMODE_ENABLE
-configuration option.
-The value assigned to this option should be a bitmap
-of all units where target mode is desired.
-For example, a value of 0x25 would enable target mode on units 0, 2, and 5.
-Note that target mode is only supported for ultra160 speeds and below.
-.Pp
Per target configuration performed in the
.Tn SCSI-Select
menu, accessible at boot,
@@ -119,6 +107,30 @@ disconnection,
and the host adapter's
.Tn SCSI
ID.
+.El
+.Ed
+.Sh CONFIGURATION OPTIONS
+To statically configure one or more controllers to assume the target role:
+.Pp
+.Cd options AHD_TMODE_ENABLE <bitmask of units>
+.Bd -ragged -offset indent
+The value assigned to this option should be a bitmap of all units where target
+mode is desired. For example, a value of 0x25, would enable target mode on
+units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7.
+.Pp
+Note that controllers can be dynamically configured through a device hint
+documented below.
+
+.Sh BOOT OPTIONS
+The following options are switchable by setting values in
+.Pa /boot/device.hints .
+.Pp
+They are:
+.Bl -tag -width indent
+.It Va hint.ahd. Ns Ar N Ns Va .tmode_enable
+A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled).
+.El
+.Ed
.Sh HARDWARE
The
.Nm
diff --git a/share/man/man5/autofs.5 b/share/man/man4/autofs.4
index e82df1929877..a721a6e27a53 100644
--- a/share/man/man5/autofs.5
+++ b/share/man/man4/autofs.4
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.Dd December 2, 2017
-.Dt AUTOFS 5
+.Dt AUTOFS 4
.Os
.Sh NAME
.Nm autofs
diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4
index 00c8e3d7a2b6..bb955fd4497d 100644
--- a/share/man/man4/blackhole.4
+++ b/share/man/man4/blackhole.4
@@ -10,7 +10,7 @@
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
-.Dd November 3, 2021
+.Dd May 25, 2024
.Dt BLACKHOLE 4
.Os
.Sh NAME
@@ -21,7 +21,7 @@ MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connectio
attempts
.Sh SYNOPSIS
.Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2"
-.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2"
+.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3"
.Cd sysctl net.inet.tcp.blackhole_local Ns Op = Ns Brq "0 | 1"
.Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "0 | 1"
.Cd sysctl net.inet.udp.blackhole_local Ns Op = Ns Brq "0 | 1"
@@ -30,7 +30,8 @@ The
.Nm
.Xr sysctl 8
MIB is used to control system behaviour when connection requests
-are received on SCTP, TCP, or UDP ports where there is no socket listening.
+are received on SCTP, TCP, or UDP ports where there is no socket listening
+or unexpected packets are received on listening sockets.
.Pp
The blackhole behaviour is useful to slow down an attacker who is port-scanning
a system in an attempt to detect vulnerable services.
@@ -51,7 +52,7 @@ when unexpected packets are received.
.Ss TCP
Normal behaviour, when a TCP SYN segment is received on a port where
there is no socket accepting connections, is for the system to return
-a RST segment, and drop the connection.
+a RST segment, and drop the incoming SYN segment.
The connecting system will
see this as a
.Dq Connection refused .
@@ -61,6 +62,9 @@ is merely dropped, and no RST is sent, making the system appear
as a blackhole.
By setting the MIB value to two, any segment arriving
on a closed port is dropped without returning a RST.
+Setting the MIB value to three, any segment arriving on a closed port
+or an unexpected segment on a listening port is dropped without sending a
+RST in reply.
This provides some degree of protection against stealth port scans.
.Ss UDP
Enabling blackhole behaviour turns off the sending
diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4
index 19079a2cc97e..c972e0288791 100644
--- a/share/man/man4/carp.4
+++ b/share/man/man4/carp.4
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 6, 2023
+.Dd April 12, 2024
.Dt CARP 4
.Os
.Sh NAME
@@ -93,6 +93,17 @@ or through the
.Dv SIOCSPEER
.Xr ioctl 2 .
.Pp
+.Xr carp 4
+can be configured to use either the non-standard CARP protocol, or VRRPv3 (RFC 5798).
+Use the
+.Cm carpver
+parameter to select either 2 (CARP) or 3 (VRRPv3).
+VRRPv3 specific parameters can be configured using the
+.Cm vrrpprio
+and
+.Cm vrrpinterval
+parameters.
+.Pp
CARP virtual hosts can be configured on multicast-capable interfaces: Ethernet,
layer 2 VLAN, FDDI and Token Ring.
An arbitrary number of virtual host IDs can be configured on an interface.
diff --git a/share/man/man4/cd.4 b/share/man/man4/cd.4
index 7c3fa6ed9850..b05e486af6b6 100644
--- a/share/man/man4/cd.4
+++ b/share/man/man4/cd.4
@@ -335,9 +335,9 @@ devices
.Sh DIAGNOSTICS
None.
.Sh SEE ALSO
+.Xr cd9660 4 ,
.Xr cam 4 ,
.Xr da 4 ,
-.Xr cd9660 5 ,
.Xr disklabel 8 ,
.Xr cd 9
.Sh HISTORY
diff --git a/share/man/man5/cd9660.5 b/share/man/man4/cd9660.4
index 224816e16c57..0e4fd33637cb 100644
--- a/share/man/man5/cd9660.5
+++ b/share/man/man4/cd9660.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 25, 2023
-.Dt CD9660 5
+.Dt CD9660 4
.Os
.Sh NAME
.Nm cd9660
diff --git a/share/man/man5/devfs.5 b/share/man/man4/devfs.4
index 0f914f671bf8..3022a23dfe9a 100644
--- a/share/man/man5/devfs.5
+++ b/share/man/man4/devfs.4
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.Dd June 30, 2022
-.Dt DEVFS 5
+.Dt DEVFS 4
.Os
.Sh NAME
.Nm devfs
@@ -65,13 +65,13 @@ tool can be used to recover deleted device entries under
.Nm .
.Pp
The
-.Xr fdescfs 5
+.Xr fdescfs 4
filesystem is an alternate means for populating
.Pa /dev/fd .
The character devices that both
.Nm
and
-.Xr fdescfs 5
+.Xr fdescfs 4
present in
.Pa /dev/fd
correspond to the open file descriptors of the process
@@ -82,7 +82,7 @@ only creates files for the standard file descriptors
.Pa 1
and
.Pa 2 .
-.Xr fdescfs 5
+.Xr fdescfs 4
creates files for all open descriptors.
.Pp
The options are as follows:
@@ -123,7 +123,7 @@ volume located on
.Pp
.Dl "mount -t devfs devfs /mychroot/dev"
.Sh SEE ALSO
-.Xr fdescfs 5 ,
+.Xr fdescfs 4 ,
.Xr devfs 8 ,
.Xr mount 8 ,
.Xr make_dev 9
diff --git a/share/man/man4/disk.4 b/share/man/man4/disk.4
index 6451ff0e7370..a6316d3fd268 100644
--- a/share/man/man4/disk.4
+++ b/share/man/man4/disk.4
@@ -111,8 +111,6 @@ the case for multipathing for example,
GEOM classes that consume a single provider and provide single
provider, like
.Xr geli 8 ,
-and
-.Xr gbde 8 ,
the identifier should be formed by attaching that provider's class
name to the ident of the underlying provider,
.It
diff --git a/share/man/man4/etherswitch.4 b/share/man/man4/etherswitch.4
index aeb5e484e7cf..4813d7cce1e5 100644
--- a/share/man/man4/etherswitch.4
+++ b/share/man/man4/etherswitch.4
@@ -48,14 +48,11 @@ driver provides a framework for Ethernet switch devices.
device nodes
.El
.Sh SEE ALSO
+.Xr adm6996fc 4 ,
.Xr arswitch 4 ,
-.Xr iicbus 4 ,
-.Xr ip17x 4 ,
-.Xr rtl8366rb 4 ,
.Xr e6060sw 4 ,
-.Xr adm6996fc 4 ,
+.Xr iicbus 4 ,
.Xr ksz8995ma 4 ,
-.Xr ukswitch 4 ,
.Xr etherswitchcfg 8
.Sh HISTORY
The
diff --git a/share/man/man5/ext2fs.5 b/share/man/man4/ext2fs.4
index 7504a144496f..816ea942d29f 100644
--- a/share/man/man5/ext2fs.5
+++ b/share/man/man4/ext2fs.4
@@ -25,7 +25,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 30, 2018
-.Dt EXT2FS 5
+.Dt EXT2FS 4
.Os
.Sh NAME
.Nm ext2fs
diff --git a/share/man/man4/fd.4 b/share/man/man4/fd.4
index f91c0e0501fb..06cc12d25696 100644
--- a/share/man/man4/fd.4
+++ b/share/man/man4/fd.4
@@ -78,11 +78,11 @@ are ignored.
By default,
.Pa /dev/fd
is provided by
-.Xr devfs 5 ,
+.Xr devfs 4 ,
which provides nodes for the first three file descriptors.
Some sites may require nodes for additional file descriptors; these can be
made available by mounting
-.Xr fdescfs 5
+.Xr fdescfs 4
on
.Pa /dev/fd .
.Sh FILES
@@ -93,6 +93,6 @@ on
.It Pa /dev/stderr
.El
.Sh SEE ALSO
-.Xr tty 4 ,
-.Xr devfs 5 ,
-.Xr fdescfs 5
+.Xr devfs 4 ,
+.Xr fdescfs 4 ,
+.Xr tty 4
diff --git a/share/man/man5/fdescfs.5 b/share/man/man4/fdescfs.4
index fa260cbc12f3..b050f024ac40 100644
--- a/share/man/man5/fdescfs.5
+++ b/share/man/man4/fdescfs.4
@@ -39,7 +39,7 @@
.\" SUCH DAMAGE.
.\"
.Dd Jul 11, 2023
-.Dt FDESCFS 5
+.Dt FDESCFS 4
.Os
.Sh NAME
.Nm fdescfs
@@ -196,7 +196,7 @@ flag use:
.Pp
.Dl "mount -t fdescfs -o nodup none /dev/fdpath"
.Sh SEE ALSO
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr mount 8
.Sh HISTORY
The
diff --git a/share/man/man7/ffs.7 b/share/man/man4/ffs.4
index 7d003443f32a..fa0cf9be1510 100644
--- a/share/man/man7/ffs.7
+++ b/share/man/man4/ffs.4
@@ -29,7 +29,7 @@
.\" SUCH DAMAGE.
.\"
.Dd May 3, 2020
-.Dt FFS 7
+.Dt FFS 4
.Os
.Sh NAME
.Nm ffs
diff --git a/share/man/man5/fusefs.5 b/share/man/man4/fusefs.4
index 987e7f898eca..33c31f355e09 100644
--- a/share/man/man5/fusefs.5
+++ b/share/man/man4/fusefs.4
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.Dd July 31, 2019
-.Dt FUSEFS 5
+.Dt FUSEFS 4
.Os
.Sh NAME
.Nm fusefs
diff --git a/share/man/man4/gbde.4 b/share/man/man4/gbde.4
deleted file mode 100644
index 79acfbe81444..000000000000
--- a/share/man/man4/gbde.4
+++ /dev/null
@@ -1,302 +0,0 @@
-.\"
-.\" Copyright (c) 2002 Poul-Henning Kamp
-.\" Copyright (c) 2002 Networks Associates Technology, Inc.
-.\" All rights reserved.
-.\"
-.\" This software was developed for the FreeBSD Project by Poul-Henning Kamp
-.\" and NAI Labs, the Security Research Division of Network Associates, Inc.
-.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
-.\" DARPA CHATS research program.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd October 19, 2002
-.Dt GBDE 4
-.Os
-.Sh NAME
-.Nm gbde
-.Nd Geom Based Disk Encryption
-.Sh SYNOPSIS
-.Cd "options GEOM_BDE"
-.Sh DESCRIPTION
-.Bf -symbolic
-NOTICE:
-Please be aware that this code has not yet received much review
-and analysis by qualified cryptographers and therefore should be considered
-a slightly suspect experimental facility.
-.Pp
-We cannot at this point guarantee that the on-disk format will not change
-in response to reviews or bug-fixes, so potential users are advised to
-be prepared that
-.Xr dump 8 Ns / Ns Xr restore 8
-based migrations may be called for in the future.
-.Ef
-.Pp
-The objective of this facility is to provide a high degree of
-denial of access to the contents of a
-.Dq cold
-storage device.
-.Pp
-Be aware that if the computer is compromised while up and running
-.Em and
-the storage device is actively attached and opened with a valid
-pass-phrase, this facility offers no protection or denial of access
-to the contents of the storage device.
-.Pp
-If, on the other hand, the device is
-.Dq cold ,
-it should present a formidable
-challenge for an attacker to gain access to the contents in the absence of
-a valid pass-phrase.
-.Pp
-Four cryptographic barriers must be passed to gain access to the data,
-and only a valid pass-phrase will yield this access.
-.Pp
-When the pass-phrase is entered, it is hashed with SHA2 into a 512 bit
-.Dq key-material .
-This is a way of producing cryptographic usable keys from a typically
-.No all- Ns Tn ASCII
-pass-phrase of an unpredictable user-selected length.
-.Ss First barrier: the location of the \&"lock-sector".
-During initialization, up to four independent but mutually aware
-.Dq lock
-sectors are written to the device in randomly chosen
-locations.
-These lock-sectors contain the 2048 random bit master-key and a number
-of parameters of the layout geometry (more on this later).
-Since the entire device will contain isotropic data, there is no
-short-cut to rapidly determine which sequence of bytes contain a lock-sector.
-.Pp
-To locate a lock-sector, a small piece of data called the
-.Dq metadata
-and the key-material must be available.
-The key-material decrypts the
-metadata, which contains the byte offset on the device where the
-corresponding lock-sector is located.
-If the metadata is lost or unavailable but the key-material is at
-hand, it would be feasible to do a brute force scan where each byte offset
-of the device is checked to see if it contains the lock-sector data.
-.Ss Second barrier: decryption of the master-key using key-material.
-The lock-sector contains an encrypted copy of an architecture neutral
-byte-sequence which encodes the fields of the lock-structure.
-The order in which these fields are encoded is determined from the key-material.
-The encoded byte stream is encrypted with 256bit AES in CBC mode.
-.Ss Third barrier: decryption of the sector key.
-For each sector, an MD5 hash over a
-.Dq salt
-from the lock-sector and the sector number is used to
-.Dq cherry-pick
-a subset of the master key,
-which hashed together with the sector offset through MD5 produces the
-.Dq kkey ,
-the key which encrypts the sector key.
-.Ss Fourth barrier: decryption of the sector data.
-The actual payload of the sector is encrypted with 128 bit AES in CBC mode
-using a single-use random bits key.
-.Ss Examining the reverse path
-Assuming an attacker knows an amount of plaintext and has managed to
-locate the corresponding encrypted sectors on the device, gaining access
-to the plaintext context of other sectors is a daunting task:
-.Pp
-First he will have to derive from the encrypted sector and the known plain
-text the sector key(s) used.
-At the time of writing, it has been speculated that it could maybe be
-possible to break open AES in only 2^80 operations; even so, that is still
-a very impossible task.
-.Pp
-Armed with one or more sector keys, our patient attacker will then go
-through essentially the same exercise, using the sector key and the
-encrypted sector key to find the key used to encrypt the sector key.
-.Pp
-Armed with one or more of these
-.Dq kkeys ,
-our attacker has to
-run them backwards through MD5.
-Even though he knows that the input to MD5 was 24 bytes and has the value
-of 8 of these bytes from the sector number, he is still faced with 2^128
-equally likely possibilities.
-.Pp
-Having successfully done that, our attacker has successfully discovered
-up to 16 bytes of the master-key, but is still unaware which 16 bytes,
-and in which other sectors any of these known bytes contribute to the kkey.
-.Pp
-To unravel the last bit, the attacker has to guess the 16 byte random-bits
-salt stored in the lock-sector to recover the indexes into the masterkey.
-.Pp
-Any attacker with access to the necessary machine power to even attempt
-this attack will be better off attempting to brute-force the pass-phrase.
-.Ss Positive denial facilities
-Considering the infeasibility of the above attack,
-gaining access to the pass-phrase will be of paramount importance for an
-attacker,
-and a number of scenarios can be imagined where undue pressure will be
-applied to an individual to divulge the pass-phrase.
-.Pp
-A
-.Dq Blackening
-feature provides a way for the user, given a moment of
-opportunity, to destroy the master-key in such a way that the pass-phrase
-will be acknowledged as good but access to the data will still be
-denied.
-.Ss A practical analogy
-For persons who think cryptography is only slightly more interesting than
-watching silicon sublimate the author humbly offers this analogy to the
-keying scheme for a protected device:
-.Pp
-Imagine an installation with a vault with walls of several hundred meters
-thick solid steel.
-This vault can only be feasibly accessed using the
-single key, which has a complexity comparable to a number with 600 digits.
-.Pp
-This key exists in four copies, each of which is stored in one of
-four small safes, each of which can be opened
-with unique key which has a complexity comparable to an 80 digit
-number.
-.Pp
-In addition to the masterkey, each of the four safes also contains
-the exact locations of all four key-safes which are located in
-randomly chosen places on the outside surface of the vault where they
-are practically impossible to detect when they are closed.
-.Pp
-Finally, each safe contains four switches which are wired to a bar
-of dynamite inside each of the four safes.
-.Pp
-In addition to this, a keyholder after opening his key-safe is
-also able to install a copy of the master-key and re-key any of
-key-safes (including his own).
-.Pp
-In normal use, the user will open the safe for which he has the key,
-take out the master-key and access the vault.
-When done, he will lock up the master-key in the safe again.
-.Pp
-If a keyholder-X for some reason distrusts keyholder-Y, she
-has the option of opening her own safe, flipping one of the switches
-and detonating the bar of dynamite in safe-Y.
-This will obliterate the master-key in that safe and thereby deny
-keyholder-Y access to the vault.
-.Pp
-Should the facility come under attack, any of the keyholders can detonate
-all four bars of dynamite and thereby make sure that access to the
-vault is denied to everybody, keyholders and attackers alike.
-Should the facility fall to the enemy, and a keyholder be forced to apply
-his personal key, he can do so in confidence that the contents of his safe
-will not yield access to the vault, and the enemy will hopefully realize
-that applying further pressure on the personnel will not give access to
-the vault.
-.Pp
-The final point to make here is that it is perfectly possible to
-make a detached copy of any one of these keys, including the master
-key, and deposit or hide it as one sees fit.
-.Ss Steganography support
-When the device is initialized, it is possible to restrict the encrypted
-data to a single contiguous area of the device.
-If configured with care, this area could masquerade as some sort of
-valid data or as random trash left behind by the systems operation.
-.Pp
-This can be used to offer a plausible deniability of existence, where
-it will be impossible to prove that this specific area of the device
-is in fact used to store encrypted data and not just random junk.
-.Pp
-The main obstacle in this is that the output from any encryption algorithm
-worth its salt is so totally random looking that it stands out like a sore
-thumb amongst practically any other sort of data which contains at least
-some kind of structure or identifying byte sequences.
-.Pp
-Certain file formats like ELF contain multiple distinct sections, and it
-would be possible to locate things just right in such a way that a device
-contains a partition with a file system with a large executable,
-.Pq Dq "a backup copy of my kernel"
-where a non-loaded ELF section is laid out
-consecutively on the device and thereby could be used to contain a
-.Nm
-encrypted device.
-.Pp
-Apart from the ability to instruct
-.Nm
-which those sectors are, no support is provided for creating such a setup.
-.Ss Deployment suggestions
-For personal use, it may be wise to make a backup copy of the masterkey
-or use one of the four keys as a backup.
-Fitting protection of this key is up to yourself, your local circumstances and
-your imagination.
-.Pp
-For company or institutional use, it is strongly advised to make a copy
-of the master-key and put it under whatever protection you have at your
-means.
-If you fail to do this, a disgruntled employee can deny you access to
-the data
-.Dq "by accident" .
-(The employee can still intentionally deny access by applying another
-encryption scheme to the data, but that problem has no technical solution.)
-.Ss Cryptographic strength
-This section lists the specific components which contribute to the cryptographic
-strength of
-.Nm .
-.Pp
-The payload is encrypted with AES in CBC mode using a 128 bit random
-single-use key
-.Pq Dq "the skey" .
-AES is well documented.
-.Pp
-No IV is used in the encryption of the sectors, the assumption being
-that since the key is random bits and single-use, an IV adds nothing to the
-security of AES.
-.Pp
-The random key is produced with
-.Xr arc4rand 9
-which is believed to do a respectable job at producing unpredictable bytes.
-.Pp
-The skey is stored on the device in a location which can be derived from
-the location of the encrypted payload data.
-The stored copy is encrypted with AES in CBC mode using a 128 bit key
-.Pq Dq "the kkey"
-derived
-from a subset of the master key chosen by the output of an MD5 hash
-over a 16 byte random bit static salt and the sector offset.
-Up to 6.25% of the masterkey (16 bytes out of 2048 bits) will be selected
-and hashed through MD5 with the sector offset to generate the kkey.
-.Pp
-Up to four copies of the master-key and associated geometry information
-is stored on the device in static randomly chosen sectors.
-The exact location inside the sector is randomly chosen.
-The order in which the fields are encoded depends on the key-material.
-The encoded byte-stream is encrypted with AES in CBC mode using 256 bit
-key-material.
-.Pp
-The key-material is derived from the user-entered pass-phrase using
-512 bit SHA2.
-.Pp
-No chain is stronger than its weakest link, which usually is poor pass-phrases.
-.Sh SEE ALSO
-.Xr gbde 8
-.Sh HISTORY
-This software was developed for the
-.Fx
-Project by
-.An Poul-Henning Kamp
-and NAI Labs, the Security Research Division of Network Associates, Inc.\&
-under DARPA/SPAWAR contract N66001-01-C-8035
-.Pq Dq CBOSS ,
-as part of the
-DARPA CHATS research program.
-.Sh AUTHORS
-.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org
diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4
index 2e265a5a2fbb..d55e084e82cc 100644
--- a/share/man/man4/iavf.4
+++ b/share/man/man4/iavf.4
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
.\" Copyright (c) 2013-2018, Intel Corporation
.\" All rights reserved.
.\"
@@ -29,12 +32,12 @@
.\"
.\" * Other names and brands may be claimed as the property of others.
.\"
-.Dd January 30, 2019
+.Dd May 21, 2024
.Dt IAVF 4
.Os
.Sh NAME
.Nm iavf
-.Nd "Intel Adaptive Virtual Function driver"
+.Nd "Intel Ethernet Adaptive Virtual Function Driver"
.Sh SYNOPSIS
To compile this driver into the kernel, place the following lines in your
kernel configuration file:
@@ -51,87 +54,300 @@ if_iavf_load="YES"
.Sh DESCRIPTION
The
.Nm
-driver provides support for the PCI Virtual Functions from the 700 Series of
-ethernet devices and newer product families.
-The driver supports Jumbo Frames, TX/RX checksum offload,
-TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN
-tag insertion/extraction, VLAN checksum offload, VLAN TSO, and
-Receive Side Steering (RSS), all for both IPv4 and IPv6.
-For further hardware information and questions related to hardware
-requirements, see
-.Pa http://support.intel.com/ .
-.Pp
-Support for Jumbo Frames is provided via the interface MTU setting.
-Selecting an MTU larger than 1500 bytes with the
+driver provides support for any PCI Virtual Function created from certain
+Intel Ethernet devices.
+This driver is compatible with virtual functions bound to devices based on the
+following:
+.Pp
+.Bl -bullet -compact
+.It
+Intel\(rg Ethernet Controller E810\-C
+.It
+Intel\(rg Ethernet Controller E810\-XXV
+.It
+Intel\(rg Ethernet Connection E822\-C
+.It
+Intel\(rg Ethernet Connection E822\-L
+.It
+Intel\(rg Ethernet Connection E823\-C
+.It
+Intel\(rg Ethernet Connection E823\-L
+.It
+Intel\(rg Ethernet Controller I710
+.It
+Intel\(rg Ethernet Controller X710
+.It
+Intel\(rg Ethernet Controller XL710
+.It
+Intel\(rg Ethernet Network Connection X722
+.It
+Intel\(rg Ethernet Controller XXV710
+.It
+Intel\(rg Ethernet Controller V710
+.El
+.Pp
+The associated Physical Function (PF) drivers for this VF driver are:
+.Pp
+.Bl -bullet -compact
+.It
+.Xr ice 4
+.It
+.Xr ixl 4
+.El
+.Pp
+For questions related to hardware requirements, refer to the documentation
+supplied with your Intel Ethernet Adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Ss The VF Driver
+The VF driver is normally used in a virtualized environment where a host driver
+manages SR\-IOV, and provides a VF device to the guest.
+.Pp
+In the
+.Fx
+guest, the iavf driver would be loaded and will function using
+the VF device assigned to it.
+.Pp
+The VF driver provides most of the same functionality as the core driver, but
+is actually a subordinate to the host.
+Access to many controls is accomplished by a request to the host via what is
+called the "Admin queue."
+These are startup and initialization events, however; once in operation, the
+device is self\-contained and should achieve near native performance.
+.Pp
+Some notable limitations of the VF environment:
+.Bl -bullet
+.It
+The PF can configure the VF to allow promiscuous mode, using a configuration
+parameter in
+.Xr iovctl.conf 5 ;
+otherwise, promiscuous mode will not work
+.It
+Media info is not available from the PF, so the active media will always be
+displayed as auto in
.Xr ifconfig 8
-utility configures the adapter to receive and transmit Jumbo Frames.
-The maximum MTU size for Jumbo Frames is 9706.
+.El
+.Ss Adaptive Virtual Function
+Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to
+adapt to changing feature sets of the physical function driver (PF) with which
+it is associated.
+This allows system administrators to update a PF without having to update all
+the VFs associated with it.
+All AVFs have a single common device ID and branding string.
.Pp
-Offloads are also controlled via the interface, for instance,
-checksumming for both IPv4 and IPv6 can be set and unset, TSO4
-and/or TSO6, and finally LRO can be set and unset.
+AVFs have a minimum set of features known as "base mode," but may provide
+additional features depending on what features are available in the PF with
+which the AVF is associated.
+The following are base mode features:
+.Bl -bullet -compact
+.It
+4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs)
+for Tx/Rx
+.It
+iavf descriptors and ring format
+.It
+Descriptor write\-back completion
+.It
+1 control queue, with iavf descriptors, CSRs and ring format
+.It
+5 MSI\-X interrupt vectors and corresponding iavf CSRs
+.It
+1 Interrupt Throttle Rate (ITR) index
+.It
+1 Virtual Station Interface (VSI) per VF
+.It
+1 Traffic Class (TC), TC0
+.It
+Receive Side Scaling (RSS) with 64 entry indirection table and key,
+configured through the PF
+.It
+1 unicast MAC address reserved per VF
+.It
+8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device
+.It
+16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device
+.It
+Stateless offloads \- non\-tunneled checksums
+.It
+AVF device ID
+.It
+HW mailbox is used for VF to PF communications
+.El
+.Sh CONFIGURATION AND TUNING
+.Ss Important System Configuration Changes
+It is important to note that 100G operation can generate high
+numbers of interrupts, often incorrectly being interpreted as
+a storm condition in the kernel.
+It is suggested that this be resolved by setting
+.Va hw.intr_storm_threshold
+to 0.
.Pp
-For more information on configuring this device, see
-.Xr ifconfig 8 .
+The default is 1000.
.Pp
-.Em NOTE :
-This
+Best throughput results are seen with a large MTU; use 9706 if possible.
+The default number of descriptors per ring is 1024.
+Increasing this may improve performance, depending on your use case.
+.Ss Configuring for no iflib
+.Xr iflib 4
+is a common framework for network interface drivers for
+.Fx
+that uses a shared set of sysctl names.
+.Pp
+The default
.Nm
-driver is only for Virtual Functions.
-For 700 series Physical Functions, use the
-.Xr ixl 4
-driver.
-.Sh LOADER TUNABLES
-Tunables can be set at the
-.Xr loader 8
-prompt before booting the kernel or stored in
-.Xr loader.conf 5 .
-.Bl -tag -width indent
-.It Va hw.iavf.rx_itr
-The RX interrupt rate value, set to 62 (124 usec) by default.
-.It Va hw.iavf.tx_itr
-The TX interrupt rate value, set to 122 (244 usec) by default.
-.It Va hw.iavf.enable_head_writeback
-When the driver is finding the last TX descriptor processed by the hardware,
-use a value written to memory by the hardware instead of scanning the
-descriptor ring for completed descriptors.
-Disabled by default; this mimics the "legacy" TX behavior found in
-.Xr ixgbe 4 .
-to ensure compatibility with future, non-700 series VF devices.
+driver depends on it, but it can be compiled without it.
+.Ss Jumbo Frames
+Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU)
+to a value larger than the default value of 1500.
+.Pp
+Use the
+.Xr ifconfig 8
+command to increase the MTU size.
+.Pp
+To confirm the MTU used between two specific devices, use
+.Xr route 8 :
+.Bd -literal -offset indent
+route get <destination_IP_address>
+.Ed
+.Pp
+NOTE:
+.Bl -bullet
+.It
+The maximum MTU setting for jumbo frames is 9706.
+This corresponds to the maximum jumbo frame size of 9728 bytes.
+.It
+This driver will attempt to use multiple page-sized buffers to receive
+each jumbo packet.
+This should help to avoid buffer starvation issues when allocating receive
+packets.
+.It
+Packet loss may have a greater impact on throughput when you use jumbo
+frames.
+If you observe a drop in performance after enabling jumbo frames, enabling
+flow control may mitigate the issue.
.El
-.Sh SUPPORT
-For general information and support,
-go to the Intel support website at:
-.Pa http://support.intel.com/ .
+.Ss Checksum Offload
+Checksum offloading supports both TCP and UDP packets and is supported for both
+transmit and receive.
+.Pp
+TSO (TCP Segmentation Offload) supports both IPv4 and IPv6.
+Both of these features are enabled and disabled via
+.Xr ifconfig 8 .
.Pp
-If an issue is identified with this driver with a supported adapter,
-email all the specific information related to the issue to
-.Mt freebsd@intel.com .
+NOTE:
+.Bl -bullet -compact
+.It
+TSO requires Tx checksum; if Tx checksum is disabled then TSO will also
+be disabled.
+.El
+.Ss LRO
+LRO (Large Receive Offload) may provide Rx performance improvement.
+However, it is incompatible with packet\-forwarding workloads.
+You should carefully evaluate the environment and enable LRO when possible.
+.Ss Rx and Tx Descriptor Rings
+Allows you to set the Rx and Tx descriptor rings independently.
+Set them via these
+.Xr iflib 4
+sysctls:
+.Bl -tag -width indent
+.It dev.iavf.#.iflib.override_nrxds
+.It dev.iavf.#.iflib.override_ntxds
+.El
+.Ss Link\-Level Flow Control (LFC)
+The VF driver does not have access to flow control settings.
+It must be managed from the host side.
.Sh SEE ALSO
.Xr arp 4 ,
+.Xr ice 4 ,
+.Xr iflib 4 ,
.Xr ixl 4 ,
.Xr netintro 4 ,
.Xr vlan 4 ,
-.Xr ifconfig 8 ,
-.Xr iflib 9
+.Xr ifconfig 8
+.Pp
+See the
+.Dq Intel\(rg Ethernet Adapters and Devices User Guide
+for additional information on features.
+It is available on the Intel website at either of the following:
+.Bl -bullet
+.It
+.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831
+.It
+.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html
+.El
+.Pp
+For information on how to identify your adapter, and for the latest Intel
+network drivers, refer to the Intel Support website:
+.Aq Lk http://www.intel.com/support
+.Sh CAVEATS
+.Ss Driver Buffer Overflow Fix
+The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069
+.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html ,
+is included in this and future versions of the driver.
+.Ss Network Memory Buffer Allocation
+.Fx
+may have a low number of network memory buffers (mbufs) by default.
+If your mbuf value is too low, it may cause the driver to fail to initialize
+and/or cause the system to become unresponsive.
+You can check to see if the system is mbuf\-starved by running
+.Li "netstat -m" .
+Increase the number of mbufs by editing the lines below in
+.Xr sysctl.conf 5 :
+.Bd -literal -offset indent
+kern.ipc.nmbclusters
+kern.ipc.nmbjumbop
+kern.ipc.nmbjumbo9
+kern.ipc.nmbjumbo16
+kern.ipc.nmbufs
+.Ed
+.Pp
+The amount of memory that you allocate is system specific, and may require
+some trial and error.
+Also, increasing the following in
+.Xr sysctl.conf 5
+could help increase
+network performance:
+.Bd -literal -offset indent
+kern.ipc.maxsockbuf
+net.inet.tcp.sendspace
+net.inet.tcp.recvspace
+net.inet.udp.maxdgram
+net.inet.udp.recvspace
+.Ed
+.Ss UDP Stress Test Dropped Packet Issue
+Under small packet UDP stress with the
+.Nm
+driver, the system may drop UDP packets due to socket buffers being full.
+Setting the PF driver's Flow Control variables to the minimum may resolve the
+issue.
+.Ss Disable LRO when routing/bridging
+LRO must be turned off when forwarding traffic.
+.Sh SUPPORT
+For general information, go to the Intel support website at
+.Aq Lk http://www.intel.com/support/ .
+.Pp
+If an issue is identified with the released source code on a supported kernel
+with a supported adapter, email the specific information related to the issue
+to
+.Aq Mt freebsd@intel.com .
+.Sh LEGAL
+Intel\(rg is a trademark or registered trademark of Intel Corporation
+or its subsidiaries in the United States and / or other countries.
+.Pp
+Other names and brands may be claimed as the property of others.
.Sh HISTORY
The
.Nm
device driver first appeared in
-.Fx 10.1 .
-under the name "ixlv"
+.Fx 10.1
+under the name
+.Nm ixlv .
It was converted to use
-.Xr iflib 9
-and changed to its current name in
-.Fx 12 .
+.Xr iflib 4
+and renamed in
+.Fx 12.4 .
.Sh AUTHORS
-.An -nosplit
The
.Nm
-driver was written by
-.An Jack Vogel Aq Mt jfv@freebsd.org
-and
-.An Eric Joyner Aq Mt erj@freebsd.org .
-.Sh CAVEATS
-This driver is supposed to function on VFs spawned from future network devices by Intel,
-but at the time of this writing, has only been tested on the 700 series VFs.
+driver was written by the
+.An Intel Corporation Aq Mt freebsd@intel.com
diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4
new file mode 100644
index 000000000000..da46c758479c
--- /dev/null
+++ b/share/man/man4/ice.4
@@ -0,0 +1,250 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
+.\" Copyright (c) 2019-2020, Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms of the Software, with or
+.\" without modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright notice,
+.\" this list of conditions and the following disclaimer in the documentation
+.\" and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Intel Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this Software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.Dd May 20, 2024
+.Dt ICE 4
+.Os
+.Sh NAME
+.Nm ice
+.Nd "Intel Ethernet 800 Series Driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iflib"
+.Cd "device ice"
+.Ed
+.Pp
+To load the driver as a module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ice_load="YES"
+.Ed
+.Sh DESCRIPTION
+.Ss Features
+The
+.Nm
+driver provides support for any PCI Express adapter or LOM
+(LAN On Motherboard)
+in the Intel Ethernet 800 Series.
+As of this writing, the series includes devices with these model numbers:
+.Pp
+.Bl -bullet -compact
+.It
+Intel\(rg Ethernet Controller E810\-C
+.It
+Intel\(rg Ethernet Controller E810\-XXV
+.It
+Intel\(rg Ethernet Connection E822\-C
+.It
+Intel\(rg Ethernet Connection E822\-L
+.It
+Intel\(rg Ethernet Connection E823\-C
+.It
+Intel\(rg Ethernet Connection E823\-L
+.El
+.Pp
+For questions related to hardware requirements, refer to the documentation
+supplied with your adapter.
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 9706.
+This value coincides with the maximum Jumbo Frame size of 9728.
+.Pp
+This driver version supports VLANs.
+For information on enabling VLANs, see the
+.Pa README .
+.Pp
+Offloads are also controlled via the interface, for instance, checksumming for
+both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can
+be set and unset.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Ss Additional Utilities
+There are additional tools available from Intel to help configure and update
+the adapters covered by this driver.
+These tools can be downloaded directly from Intel at
+.Lk https://downloadcenter.intel.com ,
+by searching for their names, or by installing certain packages:
+.Bl -bullet
+.It
+To change the behavior of the QSFP28 ports on E810-C adapters, use the
+Intel EPCT (Ethernet Port configuration tool); installed by the
+.Em sysutils/intel-epct
+package.
+.It
+To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM)
+Update Utility for Intel Network Adapter 800 series; installed by the
+.Em sysutils/intel-nvmupdate-100g
+package.
+.El
+.Sh HARDWARE
+Most adapters in the Intel Ethernet 800 Series with SFP28/QSFP28 cages
+have firmware that requires that Intel qualified modules are used; these
+qualified modules are listed below.
+This qualification check cannot be disabled by the driver.
+.Pp
+The
+.Nm
+driver supports 100Gb Ethernet adapters with these QSFP28 modules:
+.Pp
+.Bl -bullet -compact
+.It
+Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX
+.It
+Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF
+.It
+Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO
+.It
+Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF
+.El
+.Pp
+The
+.Nm
+driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules:
+.Pp
+.Bl -bullet -compact
+.It
+Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR
+.It
+Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp)
+.It
+Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp)
+.El
+.Pp
+The
+.Nm
+driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules:
+.Pp
+.Bl -bullet -compact
+.It
+Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR
+.It
+Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5
+.It
+Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5
+.It
+Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp)
+.It
+Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR
+.El
+.Pp
+Note that adapters also support all passive and active
+limiting direct attach cables that comply with SFF-8431 v4.1 and
+SFF-8472 v10.4 specifications.
+.Pp
+This is not an exhaustive list; please consult product documentation for an
+up-to-date list of supported media.
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+See the
+.Xr iflib 4
+man page for more information on using iflib sysctl variables as tunables.
+.Bl -tag -width indent
+.It Va hw.ice.#.enable_health_events
+TBW
+.It Va hw.ice.#.debug.enable_tx_fc_filter
+TBW
+.It Va hw.ice.#.debug.enable_tx_lldp_filter
+TBW
+.It Va hw.ice.#.debug.enable_health_events
+TBW
+.El
+.Sh SYSCTL PROCEDURES
+.Bl -tag -width indent
+.It Va dev.ice.#.fc
+Allows one to set the flow control value.
+A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is
+TX pause.
+.It Va dev.ice.#.advertise_speed
+Allows one to set advertised link speeds, this will then cause a link
+renegotiation.
+.It Va dev.ice.#.current_speed
+This is a display of the current setting.
+.It Va dev.ice.#.fw_version
+Displays the current firmware and NVM versions of the adapter.
+.It Va dev.ice.#.ddp_version
+TBW
+.It Va dev.ice.#.requested_fec
+TBW
+.It Va dev.ice.#.negotiated_fec
+TBW
+.It Va dev.ice.#.fw_lldp_agent
+TBW
+.It Va dev.ice.#.ets_min_rate
+TBW
+.It Va dev.ice.#.up2tc_map
+TBW
+.It Va dev.ice.#.pfc
+TBW
+.El
+.Sh INTERRUPT STORMS
+It is important to note that 100G operation can generate high
+numbers of interrupts, often incorrectly being interpreted as
+a storm condition in the kernel.
+It is suggested that this be resolved by setting
+.Va hw.intr_storm_threshold
+to 0.
+.Sh SUPPORT
+For general information and support,
+go to the Intel support website at:
+.Lk http://www.intel.com/support/ .
+.Pp
+If an issue is identified with this driver with a supported adapter,
+email all the specific information related to the issue to
+.Aq Mt freebsd@intel.com .
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr iflib 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 12.2 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Intel Corporation Aq Mt freebsd@intel.com .
diff --git a/share/man/man4/intro.4 b/share/man/man4/intro.4
index 9b22e89ff6c3..e4caf6690efb 100644
--- a/share/man/man4/intro.4
+++ b/share/man/man4/intro.4
@@ -77,7 +77,7 @@ are accessed through
sometimes also called
.Em special files .
They are located within instances of the
-.Xr devfs 5
+.Xr devfs 4
filesystem, which is conventionally mounted on the directory
.Pa /dev
in the file system hierarchy
@@ -85,7 +85,7 @@ in the file system hierarchy
.Xr hier 7 ) .
.Pp
The
-.Xr devfs 5
+.Xr devfs 4
filesystem creates or removes device nodes automatically according to
the physical hardware recognized as present at any given time.
For pseudo-devices, device nodes may be created and removed dynamically
@@ -104,7 +104,7 @@ or set using the
command.
In the latter case, different rules may be used to make different sets
of devices visible within different instances of the
-.Xr devfs 5
+.Xr devfs 4
filesystem, which may be used, for example, to prevent jailed
subsystems from accessing unsafe devices.
Manual changes to device
@@ -200,7 +200,7 @@ device.
.Xr select 2 ,
.Xr socket 2 ,
.Xr write 2 ,
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr hier 7 ,
.Xr config 8
.Sh HISTORY
diff --git a/share/man/man4/kld.4 b/share/man/man4/kld.4
index bba32f02e677..e0186dec9ccc 100644
--- a/share/man/man4/kld.4
+++ b/share/man/man4/kld.4
@@ -96,7 +96,7 @@ drivers may be loaded into the system with
.Nm .
Device nodes for the loaded drivers are automatically created when a
module is loaded and destroyed when it is unloaded by
-.Xr devfs 5 .
+.Xr devfs 4 .
You can specify userland programs that will run when new devices
become available as a result of loading modules, or existing devices
go away when modules are unloaded, by configuring
@@ -121,7 +121,7 @@ example source code implementing a sample kld module
.Xr kldnext 2 ,
.Xr kldstat 2 ,
.Xr kldunload 2 ,
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr devd 8 ,
.Xr kldload 8 ,
.Xr kldstat 8 ,
diff --git a/share/man/man5/lindebugfs.5 b/share/man/man4/lindebugfs.4
index 8e385be7d743..25a398a93f22 100644
--- a/share/man/man5/lindebugfs.5
+++ b/share/man/man4/lindebugfs.4
@@ -24,7 +24,7 @@
.\" SUCH DAMAGE.
.Dd August 10, 2022
-.Dt LINDEBUGFS 5
+.Dt LINDEBUGFS 4
.Os
.Sh NAME
.Nm lindebugfs
@@ -77,8 +77,8 @@ file system on
.Pp
.Dl "mount -t lindebugfs lindebugfs /sys/kernel/debug"
.Sh SEE ALSO
-.Xr linprocfs 5 ,
-.Xr linsysfs 5 ,
+.Xr linprocfs 4 ,
+.Xr linsysfs 4 ,
.Xr pseudofs 9 ,
.Xr linux 4 ,
.Xr mount 1
diff --git a/share/man/man5/linprocfs.5 b/share/man/man4/linprocfs.4
index 6b30d944b14b..f5ab7d9a10ad 100644
--- a/share/man/man5/linprocfs.5
+++ b/share/man/man4/linprocfs.4
@@ -2,7 +2,7 @@
.\" This file is in the public domain.
.\"
.Dd November 13, 2019
-.Dt LINPROCFS 5
+.Dt LINPROCFS 4
.Os
.Sh NAME
.Nm linprocfs
diff --git a/share/man/man5/linsysfs.5 b/share/man/man4/linsysfs.4
index f87f791c5f94..12729a814085 100644
--- a/share/man/man5/linsysfs.5
+++ b/share/man/man4/linsysfs.4
@@ -2,7 +2,7 @@
.\" This file is in the public domain.
.\"
.Dd November 13, 2019
-.Dt LINSYSFS 5
+.Dt LINSYSFS 4
.Os
.Sh NAME
.Nm linsysfs
@@ -74,8 +74,8 @@ is a mount point.
.Sh SEE ALSO
.Xr nmount 2 ,
.Xr unmount 2 ,
+.Xr linprocfs 4 ,
.Xr linux 4 ,
-.Xr linprocfs 5 ,
.Xr pseudofs 9
.Sh HISTORY
The
@@ -93,6 +93,6 @@ by
This manual page was edited by
.An Doug Ambrisko ,
based on the
-.Xr linprocfs 5
+.Xr linprocfs 4
manual page by
.An Garrett Wollman .
diff --git a/share/man/man4/linux.4 b/share/man/man4/linux.4
index 0efc469985f9..212dd2526f3f 100644
--- a/share/man/man4/linux.4
+++ b/share/man/man4/linux.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 9, 2022
+.Dd May 19, 2024
.Dt LINUX 4
.Os
.Sh NAME
@@ -156,30 +156,34 @@ Defaults to 0.
Linux run-time environment
.It Pa /compat/linux/dev
device file system, see
-.Xr devfs 5
+.Xr devfs 4
.It Pa /compat/linux/dev/fd
file descriptor file system mounted with the
.Cm linrdlnk
option, see
-.Xr fdescfs 5
+.Xr fdescfs 4
+.It Pa /compat/linux/dev/mqueue
+symbolic link to a mqueuefs mount, see
+.Xr mqueuefs 4
.It Pa /compat/linux/dev/shm
in-memory file system, see
-.Xr tmpfs 5
+.Xr tmpfs 4
.It Pa /compat/linux/proc
Linux process file system, see
-.Xr linprocfs 5
+.Xr linprocfs 4
.It Pa /compat/linux/sys
Linux kernel objects file system, see
-.Xr linsysfs 5
+.Xr linsysfs 4
.El
.Sh SEE ALSO
.Xr brandelf 1 ,
+.Xr fdescfs 4 ,
+.Xr linprocfs 4 ,
+.Xr linsysfs 4 ,
+.Xr mqueuefs 4 ,
.Xr pty 4 ,
-.Xr elf 5 ,
-.Xr fdescfs 5 ,
-.Xr linprocfs 5 ,
-.Xr linsysfs 5 ,
-.Xr tmpfs 5
+.Xr tmpfs 4 ,
+.Xr elf 5
.Sh HISTORY
Linux ABI support first appeared for i386 in
.Fx 2.1 .
diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4
new file mode 100644
index 000000000000..ce9f8cf25a4a
--- /dev/null
+++ b/share/man/man4/mac_do.4
@@ -0,0 +1,78 @@
+.\"-
+.\" Copyright (c) 2024 Baptiste Daroussin <bapt@FreeBSD.org>
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd May 22, 2024
+.Dt MAC_DO 4
+.Os
+.Sh NAME
+.Nm mac_do
+.Nd "policy allowing user to execute program as another user"
+.Sh SYNOPSIS
+To compile the
+.Nm
+policy into your kernel, place the following lines
+in your kernel configruation file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_DO"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy grants users the ability to run processs as other users
+according to predefined rules.
+.Pp
+The exact set of kernel privileges granted are:
+.Bl -inset -compact -offset indent
+.It Dv PRIV_CRED_SETGROUPS
+.It Dv PRIV_CRED_SETUID
+.El
+.Pp
+The following
+.Xr sysctl 8
+MIBs are available:
+.Bl -tag -width indent
+.It Va security.mac.do.enabled
+Enable the
+.Nm
+policy.
+(Default: 1).
+.It Va security.mac.do.rules
+The set of rules.
+.El
+.Pp
+The rules consist of a list of elements separated by
+.So , Sc .
+Each element is of the form
+.Sm off
+.Do
+.Op Cm uid | Cm gid
+.Li =
+.Ar fid
+.Li :
+.Ar tid
+.Dc
+.Sm on .
+Where
+.Ar fid
+is the uid or gid of the user or group the rule applies to, and
+.Ar tid
+is the uid of the targetted user.
+Two special forms are accepted for
+.Ar tid :
+.Va any
+or
+.Va * ,
+which allow to target any user.
+.Sh EXAMPLES
+The following rule:
+.Pp
+.Dl security.mac.do.rules=uid=1001:80,gid=0:any
+.Pp
+means the user with the uid 1001 can execute processes as user with uid 80,
+all the users which belongs to the group gid 0 can execute processes as any user.
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mdo 1
diff --git a/share/man/man4/mlx5io.4 b/share/man/man4/mlx5io.4
index 66a767d97d31..ebfbb41a0823 100644
--- a/share/man/man4/mlx5io.4
+++ b/share/man/man4/mlx5io.4
@@ -172,7 +172,7 @@ field reports the third page validity.
.Sh FILES
The
.Pa /dev/mlx5ctl
-.Xr devfs 5
+.Xr devfs 4
node is used to pass commands to the driver.
.Sh RETURN VALUES
If successful, the IOCTL returns zero.
diff --git a/share/man/man5/mqueuefs.5 b/share/man/man4/mqueuefs.4
index 7be49a816968..384a3e3e6546 100644
--- a/share/man/man5/mqueuefs.5
+++ b/share/man/man4/mqueuefs.4
@@ -26,7 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 30, 2005
-.Dt MQUEUEFS 5
+.Dt MQUEUEFS 4
.Os
.Sh NAME
.Nm mqueuefs
diff --git a/share/man/man5/msdosfs.5 b/share/man/man4/msdosfs.4
index 2856b4b5cc82..df937311060b 100644
--- a/share/man/man5/msdosfs.5
+++ b/share/man/man4/msdosfs.4
@@ -2,7 +2,7 @@
.\" This file is in the public domain.
.\"
.Dd September 27, 2018
-.Dt MSDOSFS 5
+.Dt MSDOSFS 4
.Os
.Sh NAME
.Nm msdosfs
diff --git a/share/man/man4/nfslockd.4 b/share/man/man4/nfslockd.4
new file mode 100644
index 000000000000..770d9b8736b0
--- /dev/null
+++ b/share/man/man4/nfslockd.4
@@ -0,0 +1,45 @@
+.\"-
+.\" Copyright (c) 2024 Dag-Erling Smørgrav
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd May 8, 2024
+.Dt NFSLOCKD 4
+.Os
+.Sh NAME
+.Nm nfslockd
+.Nd NFS advisory locking
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options NFSLOCKD"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nfslockd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides kernel support for NFSv3 advisory locking.
+It works in tandem with
+.Xr rpc.lockd 8 ,
+which will normally load it on startup if it is not already loaded or
+compiled-in.
+.Sh SEE ALSO
+.Xr rpc.lockd 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.4 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Doug Rabson Aq Mt dfr@FreeBSD.org .
diff --git a/share/man/man5/nullfs.5 b/share/man/man4/nullfs.4
index 6e2c199aa3b0..5aca03071594 100644
--- a/share/man/man5/nullfs.5
+++ b/share/man/man4/nullfs.4
@@ -23,7 +23,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd March 15, 2022
-.Dt NULLFS 5
+.Dt NULLFS 4
.Os
.Sh NAME
.Nm nullfs
diff --git a/share/man/man4/nvmf.4 b/share/man/man4/nvmf.4
new file mode 100644
index 000000000000..8afbb4d9daaf
--- /dev/null
+++ b/share/man/man4/nvmf.4
@@ -0,0 +1,87 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2024 Chelsio Communications, Inc.
+.\"
+.Dd May 2, 2024
+.Dt NVMF 4
+.Os
+.Sh NAME
+.Nm nvmf
+.Nd "NVM Express over Fabrics host driver"
+.Sh SYNOPSIS
+To compile the driver into the kernel,
+place the following line in the
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvmf"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvmf_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides the kernel component of an NVM Express over Fabrics
+host.
+The NVMeoF host is the client which provides local access to
+namespaces exported by a remote controller.
+.Pp
+Associations between the local host and remote controllers are managed
+using
+.Xr nvmecontrol 8 .
+New associations are created via the
+.Cm connect
+command and destroyed via the
+.Cm disconnect
+command.
+If an association's connection is interrupted,
+the
+.Cm reconnect
+command creates a new association to replace the interrupted association.
+.Pp
+Similar to
+.Xr nvme 4 ,
+.Nm
+creates controller device nodes using the format
+.Pa /dev/nvmeX
+and namespace device nodes using the format
+.Pa /dev/nvmeXnsY .
+.Nm
+also exports remote namespaces via the CAM
+.Xr nda 4
+peripheral driver.
+Unlike
+.Xr nvme 4 ,
+.Nm
+does not support the
+.Xr nvd 4
+disk driver.
+.Pp
+Associations require a supported transport such as
+.Xr nvmf_tcp 4
+for associations using TCP/IP.
+.Sh SEE ALSO
+.Xr nda 4 ,
+.Xr nvme 4 ,
+.Xr nvmf_tcp 4 ,
+.Xr nvmft 4 ,
+.Xr nvmecontrol 8
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 15.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was developed by
+.An John Baldwin Aq Mt jhb@FreeBSD.org
+under sponsorship from Chelsio Communications, Inc.
+.Sh BUGS
+.Nm
+only supports a single I/O queue pair per association.
diff --git a/share/man/man4/nvmf_tcp.4 b/share/man/man4/nvmf_tcp.4
new file mode 100644
index 000000000000..4d77997c19a2
--- /dev/null
+++ b/share/man/man4/nvmf_tcp.4
@@ -0,0 +1,57 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2024 Chelsio Communications, Inc.
+.\"
+.Dd May 2, 2024
+.Dt NVMF_TCP 4
+.Os
+.Sh NAME
+.Nm nvmf_tcp
+.Nd "TCP transport for NVM Express over Fabrics"
+.Sh SYNOPSIS
+To compile the module into the kernel,
+place the following line in the
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvmf_tcp"
+.Ed
+.Pp
+Alternatively, to load the
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvmf_tcp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+module implements the software TCP/IP transport for NVM Express over Fabrics.
+It can be used by either the in-kernel NVMeoF host driver or controller.
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va kern.nvmf.tcp.max_c2hdata
+The maximum data payload size of a
+.Va C2H_DATA
+PDU sent by the controller to a remote host.
+The default size is 256 kilobytes.
+.El
+.Sh SEE ALSO
+.Xr nvmf 4 ,
+.Xr nvmft 4
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 15.0 .
+.Sh AUTHORS
+The
+.Nm
+module was developed by
+.An John Baldwin Aq Mt jhb@FreeBSD.org
+under sponsorship from Chelsio Communications, Inc.
diff --git a/share/man/man4/nvmft.4 b/share/man/man4/nvmft.4
new file mode 100644
index 000000000000..d121fb97b514
--- /dev/null
+++ b/share/man/man4/nvmft.4
@@ -0,0 +1,85 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2024 Chelsio Communications, Inc.
+.\"
+.Dd May 2, 2024
+.Dt NVMFT 4
+.Os
+.Sh NAME
+.Nm nvmft
+.Nd "NVM Express over Fabrics CAM Target Layer frontend"
+.Sh SYNOPSIS
+To compile the subsystem into the kernel,
+place the following lines in the
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvmft"
+.Cd "device ctl"
+.Ed
+.Pp
+Alternatively, to load the subsystem as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvmft_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides the kernel component of an NVM Express over Fabrics
+controller.
+The NVMeoF controller is the server exporting namespaces backed by
+local files and volumes to remote hosts.
+.Nm
+follows the dynamic controller model and creates a new dynamic controller
+for each association.
+.Pp
+.Nm
+is implemented as a
+.Xr ctl 4
+frontend and exports CAM Target Layer LUNs as namespaces to remote hosts.
+LUNs can be configured via
+.Xr ctladm 8 .
+.Pp
+Associations between the local controller and remote hosts are managed
+using both the
+.Xr nvmfd 8
+daemon and the
+.Xr ctladm 8
+utility.
+The
+.Xr nvmfd 8
+daemon listens for new associations and handles transport-specific
+negotiation before handing off connected queue pairs to
+.Nm
+which associates queue pairs with a suitable controller instance.
+The
+.Cm nvlist
+.Xr ctladm 8
+command lists active controllers.
+The
+.Cm nvterminate
+command terminates one or more associations between a local controller
+and a remote host.
+.Pp
+Associations require a supported transport such as
+.Xr nvmf_tcp 4
+for associations using TCP/IP.
+.Sh SEE ALSO
+.Xr ctl 4 ,
+.Xr nvmf 4 ,
+.Xr nvmf_tcp 4 ,
+.Xr ctladm 8 ,
+.Xr nvmfd 8
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 15.0 .
+.Sh AUTHORS
+The
+.Nm
+subsystem was developed by
+.An John Baldwin Aq Mt jhb@FreeBSD.org
+under sponsorship from Chelsio Communications, Inc.
diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4
index e406bd2c8343..769f562fe91e 100644
--- a/share/man/man4/pcm.4
+++ b/share/man/man4/pcm.4
@@ -101,6 +101,8 @@ The following bridge device drivers are available:
.It
.Xr snd_hda 4 (enabled by default on amd64, i386)
.It
+.Xr snd_hdsp 4
+.It
.Xr snd_hdspe 4
.It
.Xr snd_ich 4 (enabled by default on amd64, i386)
@@ -283,7 +285,7 @@ Use the most recently attached device.
.It Va hw.snd.default_unit
Default sound card for systems with multiple sound cards.
When using
-.Xr devfs 5 ,
+.Xr devfs 4 ,
the default device for
.Pa /dev/dsp .
Equivalent to a symlink from
@@ -595,6 +597,7 @@ or outgoing (record) data.
A device node is not created properly.
.El
.Sh SEE ALSO
+.Xr devfs 4 ,
.Xr snd_ai2s 4 ,
.Xr snd_als4000 4 ,
.Xr snd_atiixp 4 ,
@@ -609,6 +612,7 @@ A device node is not created properly.
.Xr snd_es137x 4 ,
.Xr snd_fm801 4 ,
.Xr snd_hda 4 ,
+.Xr snd_hdsp 4 ,
.Xr snd_hdspe 4 ,
.Xr snd_ich 4 ,
.Xr snd_maestro3 4 ,
@@ -620,7 +624,6 @@ A device node is not created properly.
.Xr snd_via8233 4 ,
.Xr snd_via82c686 4 ,
.Xr snd_vibes 4 ,
-.Xr devfs 5 ,
.Xr device.hints 5 ,
.Xr loader.conf 5 ,
.Xr dmesg 8 ,
diff --git a/share/man/man5/procfs.5 b/share/man/man4/procfs.4
index 5977a8bced81..64dd3100e6bc 100644
--- a/share/man/man5/procfs.5
+++ b/share/man/man4/procfs.4
@@ -2,7 +2,7 @@
.\" This file is in the public domain.
.\"
.Dd April 10, 2023
-.Dt PROCFS 5
+.Dt PROCFS 4
.Os
.Sh NAME
.Nm procfs
diff --git a/share/man/man4/rights.4 b/share/man/man4/rights.4
index 2d44a1060006..3e5e18fc65d8 100644
--- a/share/man/man4/rights.4
+++ b/share/man/man4/rights.4
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 22, 2024
+.Dd April 27, 2024
.Dt RIGHTS 4
.Os
.Sh NAME
@@ -38,20 +38,22 @@
.Nd Capsicum capability rights for file descriptors
.Sh DESCRIPTION
When a file descriptor is created by a function such as
-.Xr accept 2 ,
-.Xr accept4 2 ,
.Xr fhopen 2 ,
.Xr kqueue 2 ,
.Xr mq_open 2 ,
.Xr open 2 ,
-.Xr openat 2 ,
.Xr pdfork 2 ,
.Xr pipe 2 ,
.Xr shm_open 2 ,
.Xr socket 2
or
.Xr socketpair 2 ,
-it is assigned all capability rights.
+it is assigned all capability rights; for
+.Xr accept 2 ,
+.Xr accept4 2
+or
+.Xr openat 2 ,
+it inherits capability rights from the "parent" file descriptor.
Those rights can be reduced (but never expanded) by using the
.Xr cap_rights_limit 2 ,
.Xr cap_fcntls_limit 2 and
@@ -501,7 +503,10 @@ with the
is also required),
.Xr preadv 2
.Dv ( CAP_SEEK
-is also required) and related system calls.
+is also required),
+.Xr getdents 2 ,
+.Xr getdirentries 2 ,
+and related system calls.
.It Dv CAP_RECV
An alias to
.Dv CAP_READ .
@@ -611,6 +616,8 @@ with the
.Dv O_WRONLY
flag, but without the
.Dv O_APPEND
+or
+.Dv O_TRUNC
flag,
.Dv CAP_SEEK
is also required.
@@ -657,6 +664,8 @@ is also required.
.Xr fsync 2 ,
.Xr ftruncate 2 ,
.Xr futimes 2 ,
+.Xr getdents 2 ,
+.Xr getdirentries 2 ,
.Xr getpeername 2 ,
.Xr getsockname 2 ,
.Xr getsockopt 2 ,
diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4
new file mode 100644
index 000000000000..ac549452cc93
--- /dev/null
+++ b/share/man/man4/sg.4
@@ -0,0 +1,63 @@
+.\"
+.\" Copyright (c) 2024 Netflix, Inc.
+.\"
+.\" SPDX-License-Expression: BSD-2-Clause
+.\"
+.Dd May 6, 2024
+.Dt SG 4
+.Os
+.Sh NAME
+.Nm sg
+.Nd Linux ioctl-compatible SCSI passthru device
+.Sh SYNOPSIS
+.Cd device sg
+.Cd device scbus
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a Linux compatible scsi passthru device.
+This driver attaches to all
+.Xr cam 4
+peripheral devices.
+It is similar to the
+.Xr pass 4
+device, but uses the Linux interfaces, rather than the FreeBSD CAM interfaces.
+.Sh IOCTL
+The following subset of the Linux sg ioctl interfaces are implemented:
+.Bl -tag -width 12
+.It Va SG_SET_TIMEOUT
+.Fa u_int to
+Set the timeout in milliseconds.
+.It Va SG_GET_TIMEOUT
+Get the timeout in milliseconds
+.It Va SG_GET_RESERVED_SIZE
+.Fa u_int
+Returns the size of the I/O one can do this device.
+.It Va SG_GET_SCSI_ID
+.Fa struct sg_scsi_id
+Returns the bus number, channel, scsi bus ID number, lun and other information
+about the SCSI device.
+.It Va SG_GET_SG_TABLESIZE
+.Fa u_int
+Returns the table size, though hard wired to 0.
+.It Va SG_GET_VERSION_NUM
+.Fa u_int
+Return the version number that is implemented.
+.It Va SG_IO
+.Fa struct sg_io_hdr
+.El
+All other ioctl interfaces return
+.Va ENODEV .
+.Sh FILES
+.Bl -tag -width ".Pa /dev/sg*" -compact
+.It Pa /dev/sg*
+Passthru devices.
+.El
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr pass 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 7.0 .
diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4
index d2a1c3b9a618..fb4836c03688 100644
--- a/share/man/man4/smb.4
+++ b/share/man/man4/smb.4
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifer: BSD-2-Clause
+.\"
.\" Copyright (c) 1998, Nicolas Souchu
.\" Copyright (c) 2004, Joerg Wunsch
.\" Copyright (c) 2015, Michael Gmelin <freebsd@grem.de>
@@ -29,7 +32,7 @@
.Os
.Sh NAME
.Nm smb
-.Nd SMB generic I/O device driver
+.Nd System Management Bus generic I/O device driver
.Sh SYNOPSIS
.Cd "device smb"
.Sh DESCRIPTION
diff --git a/share/man/man5/smbfs.5 b/share/man/man4/smbfs.4
index 7be90c3ba882..f60a9618bc3f 100644
--- a/share/man/man5/smbfs.5
+++ b/share/man/man4/smbfs.4
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2020 Gordon Bergling
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,11 +25,11 @@
.\" SUCH DAMAGE.
.\"
.Dd April 6, 2022
-.Dt SMBFS 5
+.Dt SMBFS 4
.Os
.Sh NAME
.Nm smbfs
-.Nd "SMB FS"
+.Nd server message block (SMB1/CIFS) file system
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
diff --git a/share/man/man4/smsc.4 b/share/man/man4/smsc.4
index 56c1556e5f83..61b12c7d230c 100644
--- a/share/man/man4/smsc.4
+++ b/share/man/man4/smsc.4
@@ -25,12 +25,12 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 24, 2015
+.Dd May 7, 2024
.Dt SMSC 4
.Os
.Sh NAME
.Nm smsc
-.Nd "USB SMSC LAN9xxx Fast Ethernet driver"
+.Nd "USB Microchip LAN9xxx Fast Ethernet driver"
.Sh SYNOPSIS
To load the driver as a module at boot time, place the
following line in
@@ -53,7 +53,7 @@ following lines in your kernel configuration file:
The
.Nm
device driver provides support for USB Fast Ethernet adapters based
-on the SMSC LAN9xxx chipsets.
+on the Microchip (formerly SMSC) LAN9xxx chipsets.
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
@@ -64,11 +64,11 @@ driver:
.Pp
.Bl -bullet -compact
.It
-SMSC LAN9500, LAN9500A, LAN9505 and LAN9505A based Ethernet adapters
+LAN9500, LAN9500A, LAN9505 and LAN9505A based Ethernet adapters
.It
-SMSC LAN89530, LAN9530 and LAN9730 based Ethernet adapters
+LAN89530, LAN9530 and LAN9730 based Ethernet adapters
.It
-SMSC LAN951x Ethernet adapters with integrated USB hub
+LAN951x Ethernet adapters with integrated USB hub
.El
.Sh SEE ALSO
.Xr arp 4 ,
diff --git a/share/man/man4/snd_hdsp.4 b/share/man/man4/snd_hdsp.4
new file mode 100644
index 000000000000..23eb98a3ccc2
--- /dev/null
+++ b/share/man/man4/snd_hdsp.4
@@ -0,0 +1,154 @@
+.\" Copyright (c) 2012 Ruslan Bukin <br@bsdpad.com>
+.\" Copyright (c) 2024 Florian Walpen <dev@submerge.ch>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd May 1, 2024
+.Dt SND_HDSP 4
+.Os
+.Sh NAME
+.Nm snd_hdsp
+.Nd "RME HDSP bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_hdsp"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_hdsp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to RME HDSP audio devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+RME HDSP 9632
+.It
+RME HDSP 9652
+.El
+.Pp
+By default, each
+.Xr pcm 4
+device corresponds to a physical port on the sound card.
+For ADAT ports, 8 channel, 4 channel and 2 channel formats are supported.
+The effective number of ADAT channels is 8 channels at single speed
+(32kHz-48kHz) and 4 channels at double speed (64kHz-96kHz).
+Only the HDSP 9632 can operate at quad speed (128kHz-192kHz), ADAT is
+disabled in this mode.
+Depending on sample rate and channel format selected, not all pcm channels can
+be mapped to ADAT channels and vice versa.
+.Sh LOADER TUNABLES
+These settings can be entered at the
+.Xr loader 8
+prompt or in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.hdsp.unified_pcm
+If set to 1, all physical ports are combined into one unified pcm device.
+When opened in multi-channel audio software, this makes all ports available
+at the same time, and fully synchronized.
+For resulting channel numbers consult the following table:
+.El
+.Bl -column "Sound Card" "Single Speed" "Double Speed" "Quad Speed"
+.Sy "Sound Card" Ta Sy "Single Speed" Ta Sy "Double Speed" Ta Sy "Quad Speed"
+.It "" Ta "Play | Rec" Ta "Play | Rec" Ta "Play | Rec"
+.It HDSP 9632 Ta " 12 | 12" Ta " 8 | 8" Ta " 4 | 4"
+.It HDSP 9652 Ta " 26 | 26" Ta " 14 | 14" Ta " - | -"
+.El
+.Sh SYSCTL TUNABLES
+These settings and informational values can be accessed at runtime with the
+.Xr sysctl 8
+command.
+If multiple RME HDSP sound cards are installed, each device has a separate
+configuration.
+To adjust the following sysctl identifiers for a specific sound card, insert
+the respective device number in place of
+.Ql 0 .
+.Bl -tag -width indent
+.It Va dev.hdsp.0.sample_rate
+Set a fixed sample rate from 32000, 44100, 48000, up to 192000.
+This is usually required for digital connections (AES, S/PDIF, ADAT).
+The default value of 0 adjusts the sample rate according to pcm device settings.
+.It Va dev.hdsp.0.period
+The number of samples processed per interrupt, from 32, 64, 128, up to 4096.
+Setting a lower value here results in less latency, but increases system load
+due to frequent interrupt processing.
+Extreme values may cause audio gaps and glitches.
+.It Va dev.hdsp.0.clock_list
+Lists possible clock sources to sync with, depending on the hardware model.
+This includes internal and external master clocks as well as incoming digital
+audio signals like AES, S/PDIF and ADAT.
+.It Va dev.hdsp.0.clock_preference
+Select a preferred clock source from the clock list.
+HDSP cards will sync to this clock source when available, but fall back to
+auto-sync with any other digital clock signal they receive.
+Set this to
+.Ql internal
+if the HDSP card should act as master clock.
+.It Va dev.hdsp.0.clock_source
+Shows the actual clock source in use (read only).
+This differs from what is set as clock preference when in auto-sync mode.
+.It Va dev.hdsp.0.sync_status
+Display the current sync status of all external clock sources.
+Status indications are
+.Ql none
+for no signal at all,
+.Ql lock
+for when a valid signal is present, and
+.Ql sync
+for accurately synchronized signals (required for recording digital
+audio).
+.El
+.Pp
+Where appropriate these sysctl values are modeled after official RME software on
+other platforms, and adopt their terminology.
+Consult the RME user manuals for additional information.
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 15.0 .
+.Sh AUTHORS
+.An -nosplit
+Based on
+.Xr snd_hdspe 4
+originally written by
+.An Ruslan Bukin <br@bsdpad.com> .
+All adaptation to HDSP cards by
+.An Florian Walpen <dev@submerge.ch> .
diff --git a/share/man/man5/tarfs.5 b/share/man/man4/tarfs.4
index 56c56ac43287..56c56ac43287 100644
--- a/share/man/man5/tarfs.5
+++ b/share/man/man4/tarfs.4
diff --git a/share/man/man5/tmpfs.5 b/share/man/man4/tmpfs.4
index f3d6a2f6c2b5..ce6b23e3ae7b 100644
--- a/share/man/man5/tmpfs.5
+++ b/share/man/man4/tmpfs.4
@@ -52,7 +52,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 18, 2023
-.Dt TMPFS 5
+.Dt TMPFS 4
.Os
.Sh NAME
.Nm tmpfs
diff --git a/share/man/man5/unionfs.5 b/share/man/man4/unionfs.4
index a20889d54839..85714331b6ce 100644
--- a/share/man/man5/unionfs.5
+++ b/share/man/man4/unionfs.4
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2020 Gordon Bergling
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,11 +25,11 @@
.\" SUCH DAMAGE.
.\"
.Dd April 27, 2020
-.Dt UNIONFS 5
+.Dt UNIONFS 4
.Os
.Sh NAME
.Nm unionfs
-.Nd "UNION FS"
+.Nd union mount file system
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4
index ed4da98df673..45e6c0ceb979 100644
--- a/share/man/man4/vt.4
+++ b/share/man/man4/vt.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 8, 2023
+.Dd May 24, 2024
.Dt "VT" 4
.Os
.Sh NAME
@@ -220,6 +220,11 @@ The
kernel uses
.Nm
when this value is not set.
+Note that
+.Ql sc
+is not compatible with
+.Xr UEFI 8
+boot.
.It Va kern.vt.color. Ns Ar colornum Ns Va .rgb
Set this value to override default palette entry for color
.Pa colornum
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
index d9129307bea2..bc345b42717c 100644
--- a/share/man/man5/Makefile
+++ b/share/man/man5/Makefile
@@ -6,9 +6,7 @@ MAN= acct.5 \
ar.5 \
a.out.5 \
${_boot.config.5} \
- cd9660.5 \
core.5 \
- devfs.5 \
devfs.conf.5 \
devfs.rules.5 \
device.hints.5 \
@@ -17,41 +15,31 @@ MAN= acct.5 \
elf.5 \
ethers.5 \
eui64.5 \
- ext2fs.5 \
fbtab.5 \
- fdescfs.5 \
forward.5 \
fs.5 \
fstab.5 \
- fusefs.5 \
group.5 \
hosts.5 \
hosts.equiv.5 \
hosts.lpd.5 \
intro.5 \
libmap.conf.5 \
- lindebugfs.5 \
link.5 \
- linprocfs.5 \
- linsysfs.5 \
mailer.conf.5 \
make.conf.5 \
moduli.5 \
motd.5 \
mount.conf.5 \
- mqueuefs.5 \
- msdosfs.5 \
networks.5 \
nsmb.conf.5 \
nsswitch.conf.5 \
- nullfs.5 \
os-release.5 \
passwd.5 \
pbm.5 \
periodic.conf.5 \
phones.5 \
portindex.5 \
- procfs.5 \
protocols.5 \
quota.user.5 \
rc.conf.5 \
@@ -61,21 +49,15 @@ MAN= acct.5 \
resolver.5 \
services.5 \
shells.5 \
- smbfs.5 \
src.conf.5 \
stab.5 \
style.Makefile.5 \
style.mdoc.5 \
sysctl.conf.5 \
- tarfs.5 \
- tmpfs.5 \
- unionfs.5
MLINKS= dir.5 dirent.5
-MLINKS+=ext2fs.5 ext4fs.5
MLINKS+=fs.5 inode.5
MLINKS+=hosts.equiv.5 rhosts.5
-MLINKS+=msdosfs.5 msdos.5
MLINKS+=passwd.5 master.passwd.5
MLINKS+=passwd.5 pwd.db.5
MLINKS+=passwd.5 spwd.db.5
@@ -85,10 +67,6 @@ MLINKS+=rc.conf.5 rc.conf.local.5
MLINKS+=resolver.5 resolv.conf.5
MLINKS+=src.conf.5 src-env.conf.5
-.if ${MK_AUTOFS} != "no"
-MAN+= autofs.5
-.endif
-
.if ${MK_BLUETOOTH} != "no"
MAN+= bluetooth.device.conf.5 \
bluetooth.hosts.5 \
diff --git a/share/man/man5/devfs.conf.5 b/share/man/man5/devfs.conf.5
index e95c7b578bf5..f7141b76c3f6 100644
--- a/share/man/man5/devfs.conf.5
+++ b/share/man/man5/devfs.conf.5
@@ -54,7 +54,7 @@ The action to take for the device.
The action names are only significant to the first unique character.
.It Ar devname
The name of the device created by
-.Xr devfs 5 .
+.Xr devfs 4 .
.It Ar arg
The argument of the
.Ar action .
@@ -68,7 +68,7 @@ This action creates a symbolic link named
that points to
.Ar devname ,
the name of the device created by
-.Xr devfs 5 .
+.Xr devfs 4 .
.It Ic own
This action changes the ownership of
.Ar devname .
@@ -118,8 +118,8 @@ perm cd0 0660
.Ed
.Sh SEE ALSO
.Xr chmod 1 ,
+.Xr devfs 4 ,
.Xr devd.conf 5 ,
-.Xr devfs 5 ,
.Xr devfs.rules 5 ,
.Xr chown 8
.Sh AUTHORS
diff --git a/share/man/man5/devfs.rules.5 b/share/man/man5/devfs.rules.5
index 368a7696b5cd..e878c2a97738 100644
--- a/share/man/man5/devfs.rules.5
+++ b/share/man/man5/devfs.rules.5
@@ -124,7 +124,7 @@ group, a similar rule may be used:
.Dl "add path 'usb/*' mode 0660 group usb"
.Sh SEE ALSO
.Xr glob 3 ,
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr devfs.conf 5 ,
.Xr devfs 8 ,
.Xr service 8
diff --git a/share/man/man5/fstab.5 b/share/man/man5/fstab.5
index 6a357e497ca7..787fe3933aca 100644
--- a/share/man/man5/fstab.5
+++ b/share/man/man5/fstab.5
@@ -113,7 +113,7 @@ flag.
Other options need both the file system specific flag and its argument,
separated by an equal sign.
For example, mounting an
-.Xr msdosfs 5
+.Xr msdosfs 4
filesystem, the options
.Bd -literal -offset indent
-o sync -o noatime -m 644 -M 755 -u foo -g bar
@@ -423,10 +423,9 @@ resides in
# Swap space on a block device.
/dev/da0p1 none swap sw 0 0
#
-# Swap space using a block device with GBDE/GELI encryption.
+# Swap space using a block device with GELI encryption.
# aalgo, ealgo, keylen, sectorsize options are available
# for .eli devices.
-/dev/da1p1.bde none swap sw 0 0
/dev/da1p2.eli none swap sw 0 0
#
# tmpfs.
diff --git a/share/man/man5/mount.conf.5 b/share/man/man5/mount.conf.5
index 633a642e37be..4b5c272ef601 100644
--- a/share/man/man5/mount.conf.5
+++ b/share/man/man5/mount.conf.5
@@ -50,7 +50,7 @@ The logic for this is in
.Fn vfs_mountroot_conf0 .
.It
The kernel will first mount
-.Xr devfs 5
+.Xr devfs 4
as the root file system.
.It
Next, the kernel will parse the in-memory config file created in step 1
@@ -60,7 +60,7 @@ See
for the format of the config file.
.It
When the actual root file system is mounted,
-.Xr devfs 5
+.Xr devfs 4
will be re-mounted on the
.Pa /dev
directory.
@@ -221,7 +221,7 @@ For each root file system which is mounted, a
directory
.Em must
exist so that the root mount logic can properly re-mount
-.Xr devfs 5 .
+.Xr devfs 4 .
If this directory does not exist, the system
may hang during the bootup process.
.Sh SEE ALSO
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index ad84bcbd576c..9f32cfa5ab82 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 13, 2023
+.Dd May 22, 2024
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -263,6 +263,19 @@ value.
.It Ao Ar name Ac Ns Va _user
.Pq Vt str
Run the service under this user account.
+.It Ao Ar name Ac Ns Va _svcj
+.Pq Vt bool
+If set to
+.Dq Li YES ,
+auto-jail the service with inherited filesystem and other
+jail properties depending on
+.Ao Ar name Ac Ns Va _svcj_options .
+.It Ao Ar name Ac Ns Va _svcj_options
+.Pq Vt str
+A list of jail properties for the service.
+See
+.Sx SERVICE JAILS
+for a list of valid properties.
.It Va apm_enable
.Pq Vt bool
If set to
@@ -334,10 +347,6 @@ A whitespace-separated list of kernel modules to load right after
the local disks are mounted, without any
.Pa .ko
extension or path.
-Loading modules at this point in the boot process is
-much faster than doing it via
-.Pa /boot/loader.conf
-for those modules not necessary for mounting local disks.
.It Va kldxref_enable
.Pq Vt bool
Set to
@@ -396,6 +405,12 @@ is set to
these are the flags to pass to the
.Xr powerd 8
daemon.
+.It Va svcj_all_enable
+Enable auto-jailing of all services which are not explicitly
+excluded.
+See
+.Sx SERVICE JAILS
+for more info.
.It Va tmpmfs
Controls the creation of a
.Pa /tmp
@@ -1420,13 +1435,18 @@ variables as described below.
.Pp
An
.Va ifconfig_ Ns Aq Ar interface
-variable is also assumed to exist for each value of
+variable is assumed to exist for each value of
.Ar interface .
When an interface name contains any of the characters
.Dq Li .-/+
they are translated to
.Dq Li _
before lookup.
+For example, the interface
+.Va em0.102
+would be configured using the variable
+.Va ifconfig_em0_102 .
+.Pp
The variable can contain arguments to
.Xr ifconfig 8 ,
as well as special case-insensitive keywords described below.
@@ -1434,6 +1454,18 @@ Such keywords are removed before passing the value to
.Xr ifconfig 8
while the order of the other arguments is preserved.
.Pp
+For example, to assign the IPv4 address 192.0.2.1/24 to the interface em0:
+.Bd -literal
+ifconfig_em0="inet 192.0.2.1/24 up"
+.Ed
+.Pp
+If the variable
+.Va ifconfig_ Ns Ao Ar interface Ac Ns Pa _ipv6
+is set, then
+.Va ifconfig_ Ns Aq Ar interface
+does not need to be set unless an IPv4 address should also be assigned to
+the interface.
+.Pp
It is possible to add IP alias entries using
.Xr ifconfig 8
syntax with the address family keyword such as
@@ -1442,8 +1474,8 @@ Assuming that the interface in question was
.Li em0 ,
it might look something like this:
.Bd -literal
-ifconfig_em0_alias0="inet 127.0.0.253 netmask 0xffffffff"
-ifconfig_em0_alias1="inet 127.0.0.254 netmask 0xffffffff"
+ifconfig_em0_alias0="inet 127.0.0.253/32"
+ifconfig_em0_alias1="inet 127.0.0.254/32"
.Ed
.Pp
It also possible to configure multiple IP addresses in Classless
@@ -1472,12 +1504,12 @@ netif_ipexpand_max="4096"
.Pp
In the case of
.Li 192.0.2.5-23/24 ,
-the address 192.0.2.5 will be configured with the
-netmask /24 and the addresses 192.0.2.6 to 192.0.2.23 with
-the non-conflicting netmask /32 as explained in the
+the address 192.0.2.5 will be configured with the prefix length /24 and the
+addresses 192.0.2.6 to 192.0.2.23 with the non-conflicting prefix length /32 as
+explained in the
.Xr ifconfig 8
alias section.
-Note that this special netmask handling is only for
+Note that this special CIDR handling is only for
.Li inet ,
not for the other address families such as
.Li inet6 .
@@ -1509,10 +1541,10 @@ its contents are passed to
Execution stops at the first unsuccessful access, so if
something like this is present:
.Bd -literal
-ifconfig_em0_alias0="inet 127.0.0.251 netmask 0xffffffff"
-ifconfig_em0_alias1="inet 127.0.0.252 netmask 0xffffffff"
-ifconfig_em0_alias2="inet 127.0.0.253 netmask 0xffffffff"
-ifconfig_em0_alias4="inet 127.0.0.254 netmask 0xffffffff"
+ifconfig_em0_alias0="inet 127.0.0.251/32"
+ifconfig_em0_alias1="inet 127.0.0.252/32"
+ifconfig_em0_alias2="inet 127.0.0.253/32"
+ifconfig_em0_alias4="inet 127.0.0.254/32"
.Ed
.Pp
Then note that alias4 would
@@ -1529,13 +1561,13 @@ variable, which has the same functionality as
and can have all of the entries in a variable like the following:
.Bd -literal
ifconfig_em0_aliases="\\
- inet 127.0.0.251 netmask 0xffffffff \\
- inet 127.0.0.252 netmask 0xffffffff \\
- inet 127.0.0.253 netmask 0xffffffff \\
- inet 127.0.0.254 netmask 0xffffffff"
+ inet 127.0.0.251/32 \\
+ inet 127.0.0.252/32 \\
+ inet 127.0.0.253/32 \\
+ inet 127.0.0.254/32"
.Ed
.Pp
-It also supports CIDR notation.
+It also supports netmask notation for backward compatibility.
.Pp
If the
.Pa /etc/start_if . Ns Aq Ar interface
@@ -1688,7 +1720,7 @@ variable.
It is also possible to rename an interface by doing:
.Bd -literal
ifconfig_em0_name="net0"
-ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00"
+ifconfig_net0="inet 192.0.2.1/24"
.Ed
.It Va ipv6_enable
.Pq Vt bool
@@ -2045,9 +2077,9 @@ interfaces with:
.Bd -literal
gif_interfaces="gif0 gif1"
gifconfig_gif0="100.64.0.1 100.64.0.2"
-ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252"
+ifconfig_gif0="inet 10.0.0.1/30 10.0.0.2"
gifconfig_gif1="inet6 2a00::1 2a01::1"
-ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252"
+ifconfig_gif1="inet 10.1.0.1/30 10.1.0.2"
.Ed
.It Va ppp_enable
.Pq Vt bool
@@ -2164,43 +2196,6 @@ which had the
attribute set using
.Xr gpart 8
utility.
-.It Va gbde_autoattach_all
-.Pq Vt bool
-If set to
-.Dq Li YES ,
-.Pa /etc/rc.d/gbde
-will attempt to automatically initialize the .bde devices specified in
-.Pa /etc/fstab .
-.It Va gbde_devices
-.Pq Vt str
-List the devices that the script should try to attach,
-or
-.Dq Li AUTO .
-.It Va gbde_lockdir
-.Pq Vt str
-The directory where the
-.Xr gbde 4
-lockfiles are located.
-The default lockfile directory is
-.Pa /etc .
-.Pp
-The lockfile for each individual
-.Xr gbde 4
-device can be overridden by setting the variable
-.Va gbde_lock_ Ns Aq Ar device ,
-where
-.Ar device
-is the encrypted device without the
-.Dq Pa /dev/
-and
-.Dq Pa .bde
-parts.
-.It Va gbde_attach_attempts
-.Pq Vt int
-Number of times to attempt attaching to a
-.Xr gbde 4
-device, i.e., how many times the user is asked for the pass-phrase.
-Default is 3.
.It Va geli_devices
.Pq Vt str
List of devices to automatically attach on boot.
@@ -4941,6 +4936,97 @@ daemon.
these are the flags to pass to the
.Xr sendmail 8
.El
+.Sh SERVICE JAILS
+The service jails part of the rc system automatically puts a service
+into a jail.
+This jail inherits the filesystem and various other parts of the
+parent (if you allow child-jails in your jails, service jails
+can be used in jails) depending on the content of the
+.Ao Ar name Ac Ns Va _svcj_options
+variable.
+Typically this variable is set inside rc scripts, but it can be
+overriden in the rc config.
+Valid options for
+.Ao Ar name Ac Ns Va _svcj_options
+are:
+.Bl -tag -width indent-two
+.It mlock
+Allows to lock memory pages into the physical memory.
+.It netv4
+Inherit the IPv4 address and allows to open reserved ports.
+This can not be combined with
+.Pa netv6 .
+.It netv6
+Inherit the IPv6 address and allows to open reserved ports.
+This can not be combined with
+.Pa netv4 .
+.It net_basic
+Inherits the IPv4 and IPv6 addresses and allows to open
+reserved ports.
+.It net_raw
+Allow to open raw sockets.
+This option can be combined with
+.Pa netv4 ,
+.Pa netv6 ,
+.Pa net_basic .
+.It net_all
+Inherits the IPv4 and IPv6 addresses, allows to open reserved
+ports, allows to open raw sockets, and allows to open sockets
+of protocol stacks that have not had jail functionality added
+to them.
+.It nfsd
+Allows to run nfsd and affiliated daemons.
+.It sysvipc
+Allows access to SysV semaphores, SysV shared memory and
+SysV messages.
+.It vmm
+Allows access to
+.Xr vmm 4 .
+This option is only available when
+.Xr vmm 4
+is enabled in the kernel.
+.El
+
+All non-network options can be combined with all other options.
+
+If the
+.Ao Ar name Ac Ns Va _svcj
+variable is set to
+.Dq Li YES ,
+this particular service is started in a
+service jail named
+.Va svcj- Ns Ar name Ac .
+
+The
+.Va svcj_all_enable
+variable allows to enable service jails for all services of the
+system at once.
+Services which have
+.Ao Ar name Ac Ns Va _svcj
+set to
+.Dq Li NO
+are excluded.
+Some services may set
+.Ao Ar name Ac Ns Va _svcj
+to
+.Dq Li NO
+in the script to either prevent service jails for this
+service at all, or may set it to
+.Dq Li NO
+if it is not set in the
+rc config, to exclude it from
+.Va svcj_all_enable
+but allow to explicitely enable it.
+The sshd service for example would not see other jails, if
+it would run as a service jail.
+This may or may not be what is needed, and as such it is
+excluded from
+.Va svcj_all_enable
+but can be enabled via setting
+.Va sshd_svcj
+to
+.Dq Li YES .
+.El
.Sh FILES
.Bl -tag -width "/etc/defaults/rc.conf" -compact
.It Pa /etc/defaults/rc.conf
diff --git a/share/man/man5/services.5 b/share/man/man5/services.5
index 7a94ae4e4f1c..e7f65cb929fd 100644
--- a/share/man/man5/services.5
+++ b/share/man/man5/services.5
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -25,12 +28,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 4, 2010
+.Dd April 29, 2024
.Dt SERVICES 5
.Os
.Sh NAME
.Nm services
-.Nd service name data base
+.Nd internet service name and port number data base
.Sh DESCRIPTION
The
.Nm
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index 5301fc488021..1d35823fc9c4 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1,5 +1,5 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
-.Dd April 23, 2024
+.Dd May 22, 2024
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -137,7 +137,7 @@ Do not build
.Xr authpf 8 .
.It Va WITHOUT_AUTOFS
Do not build
-.Xr autofs 5
+.Xr autofs 4
related programs, libraries, and kernel modules.
.It Va WITHOUT_AUTO_OBJ
Disable automatic creation of objdirs.
@@ -234,6 +234,11 @@ Do not build or install
.It Va WITHOUT_BOOTPD
Do not build or install
.Xr bootpd 8 .
+.It Va WITH_BRANCH_PROTECTION
+Build with branch protection enabled.
+On arm64 enable the use of pointer authentication and
+branch target identification instructions on arm64.
+These can be used to help mitigate some exploit techniques.
.It Va WITHOUT_BSDINSTALL
Do not build
.Xr bsdinstall 8 ,
@@ -1552,6 +1557,9 @@ When set, it enforces these options:
.El
.It Va WITHOUT_SSP
Do not build world with stack smashing protection.
+See
+.Xr security 7
+for more information.
.It Va WITH_STAGING
Enable staging of files to a stage tree.
This can be best thought of as auto-install to
@@ -1716,9 +1724,11 @@ and that the runtime support library is available
Do not build
.Xr unbound 8
and related programs.
-.It Va WITHOUT_UNDEFINED_VERSION
-Link libraries with --no-undefined-version to ensure all symbols are
-provided.
+.It Va WITH_UNDEFINED_VERSION
+Link libraries with --undefined-version which permits version maps to
+contain symbols that are not present in the library.
+If this is necessicary to build a particular configuration, a bug is
+present and the configuration should be reported.
.It Va WITHOUT_UNIFIED_OBJDIR
Use the historical object directory format for
.Xr build 7
diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile
index f163d4e0a0d8..b83399b2917d 100644
--- a/share/man/man7/Makefile
+++ b/share/man/man7/Makefile
@@ -11,7 +11,6 @@ MAN= arch.7 \
crypto.7 \
development.7 \
environ.7 \
- ffs.7 \
firewall.7 \
growfs.7 \
hier.7 \
diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7
index 7d164b5683d6..e0a6ff3dfefc 100644
--- a/share/man/man7/hier.7
+++ b/share/man/man7/hier.7
@@ -128,7 +128,7 @@ compatibility run-time
device nodes and special files; see
.Xr intro 4
and
-.Xr devfs 5
+.Xr devfs 4
.Pp
.Bl -tag -width "loader.conf.d" -compact
.It Pa ada0
@@ -365,7 +365,7 @@ that need no home directory; see also
.Pa /var/empty/
.It Pa /proc/
process file system; see
-.Xr procfs 5
+.Xr procfs 4
.It Pa /rescue/
statically linked programs for emergency recovery; see
.Xr rescue 8
diff --git a/share/man/man7/intro.7 b/share/man/man7/intro.7
index a155839bde64..be6f68556895 100644
--- a/share/man/man7/intro.7
+++ b/share/man/man7/intro.7
@@ -54,9 +54,6 @@ development introduction to
.Fx
.It Xr environ 7
user environment
-.It Xr ffs 7
-commonly used filesystem in
-.Fx
.It Xr firewall 7
simple firewalls under
.Fx
diff --git a/share/man/man7/security.7 b/share/man/man7/security.7
index ccbeeb4575ce..2e690e35d534 100644
--- a/share/man/man7/security.7
+++ b/share/man/man7/security.7
@@ -939,6 +939,81 @@ option that SSH allows in its
.Pa authorized_keys
file to make the key only usable to entities logging in from specific
machines.
+.Sh STACK OVERFLOW PROTECTION
+.Fx
+supports stack overflow protection using the Stack Smashing Protector
+.Pq SSP
+compiler feature.
+In userland, SSP adds a per-process randomized canary at the end of every stack
+frame which is checked for corruption upon return from the function.
+In the kernel, a single randomized canary is used globally except on aarch64,
+which has a
+.Dv PERTHREAD_SSP
+.Xr config 8
+option to enable per-thread randomized canaries.
+If stack corruption is detected, then the process aborts to avoid potentially
+malicious execution as a result of the corruption.
+SSP may be enabled or disabled when building
+.Fx
+base with the
+.Xr src.conf 5
+SSP knob.
+.Pp
+When
+.Va WITH_SSP
+is enabled, which is the default, world is built with the
+.Fl fstack-protector-strong
+compiler option.
+The kernel is built with the
+.Fl fstack-protector
+option.
+.Pp
+In addition to SSP, a
+.Dq FORTIFY_SOURCE
+implementation is supported up to level 2 by defining
+.Va _FORTIFY_SOURCE
+to
+.Dv 1
+or
+.Dv 2
+before including any
+.Fx
+headers.
+.Fx
+world builds can set
+.Va FORTIFY_SOURCE
+to provide a default value for
+.Va _FORTIFY_SOURCE .
+When enabled,
+.Dq FORTIFY_SOURCE
+enables extra bounds checking in various functions that accept buffers to be
+written into.
+These functions currently have extra bounds checking support:
+.Bl -column -offset indent "snprintf" "memmove" "strncpy" "vsnprintf" "readlink"
+.It bcopy Ta bzero Ta fgets Ta getcwd Ta gets
+.It memcpy Ta memmove Ta memset Ta read Ta readlink
+.It snprintf Ta sprintf Ta stpcpy Ta stpncpy Ta strcat
+.It strcpy Ta strncat Ta strncpy Ta vsnprintf Ta vsprintf
+.El
+.Pp
+.Dq FORTIFY_SOURCE
+requires compiler support from
+.Xr clang 1
+or
+.Xr gcc 1 ,
+which provide the
+.Xr __builtin_object_size 3
+function that is used to determine the bounds of an object.
+This feature works best at optimization levels
+.Fl O1
+and above, as some object sizes may be less obvious without some data that the
+compiler would collect in an optimization pass.
+.Pp
+Similar to SSP, violating the bounds of an object will cause the program to
+abort in an effort to avoid malicious execution.
+This effectively provides finer-grained protection than SSP for some class of
+function and system calls, along with some protection for buffers allocated as
+part of the program data.
.Sh KNOBS AND TWEAKS
.Fx
provides several knobs and tweak handles that make some introspection
diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7
index f04500d0f0dc..caa1efb7d450 100644
--- a/share/man/man7/tuning.7
+++ b/share/man/man7/tuning.7
@@ -695,10 +695,10 @@ over services you export from your box (web services, email).
.Xr ata 4 ,
.Xr dummynet 4 ,
.Xr eventtimers 4 ,
+.Xr ffs 4 ,
.Xr login.conf 5 ,
.Xr rc.conf 5 ,
.Xr sysctl.conf 5 ,
-.Xr ffs 7 ,
.Xr firewall 7 ,
.Xr hier 7 ,
.Xr ports 7 ,
diff --git a/share/man/man8/beinstall.8 b/share/man/man8/beinstall.8
index e403f25d2f35..114483ba752a 100644
--- a/share/man/man8/beinstall.8
+++ b/share/man/man8/beinstall.8
@@ -41,10 +41,8 @@ source tree.
also automatically performs
.Pa /etc
updates
-(using either
-.Xr etcupdate 8
-or
-.Xr mergemaster 8 )
+(using
+.Xr etcupdate 8 )
and
package updates using
.Xr pkg-upgrade 8
@@ -88,18 +86,12 @@ from ports (sysutils/beadm).
.It Ev CONFIG_UPDATER Pq default: Dq Li "etcupdate"
Config updater:
.Xr etcupdate 8
-and
-.Xr mergemaster 8
-are supported.
+is supported.
Set to an empty string to skip.
.It Ev ETCUPDATE_FLAGS Pq default: Dq Li "-F"
Flags for
.Xr etcupdate 8
if used.
-.It Ev MERGEMASTER_FLAGS Pq default: Dq Li "-iFU"
-Flags for
-.Xr mergemaster 8
-if used.
.It Ev NO_PKG_UPGRADE Pq default: Dq Li ""
If not empty,
.Dq Li pkg upgrade
@@ -117,7 +109,6 @@ lives in the src tree.
.Xr development 7 ,
.Xr bectl 8 ,
.Xr etcupdate 8 ,
-.Xr mergemaster 8 ,
.Xr pkg 8
.Sh HISTORY
.Nm
diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8
index 42642bb48260..7a684f6b092b 100644
--- a/share/man/man8/uefi.8
+++ b/share/man/man8/uefi.8
@@ -45,7 +45,7 @@ The
boot process loads system bootstrap code located in an EFI System Partition
(ESP).
The ESP is a GPT or MBR partition with a specific identifier that contains an
-.Xr msdosfs 5
+.Xr msdosfs 4
FAT file system with a specified file hierarchy.
.Bl -column -offset indent "Partition Scheme" "ESP Identifier"
.It Sy "Partition Scheme" Ta Sy "ESP Identifier"
@@ -110,7 +110,7 @@ Typical non-default kernel (optional)
.Sh SEE ALSO
.Xr vt 4 ,
.Xr boot.config 5 ,
-.Xr msdosfs 5 ,
+.Xr msdosfs 4 ,
.Xr boot 8 ,
.Xr efibootmgr 8 ,
.Xr efidp 8 ,
diff --git a/share/man/man9/DEVICE_ATTACH.9 b/share/man/man9/DEVICE_ATTACH.9
index 0946e1f13b7c..083a0e86f0bc 100644
--- a/share/man/man9/DEVICE_ATTACH.9
+++ b/share/man/man9/DEVICE_ATTACH.9
@@ -46,7 +46,7 @@ The
.Fn DEVICE_ATTACH
method should initialize the hardware and allocate other
system resources (such as
-.Xr devfs 5
+.Xr devfs 4
entries).
.Pp
Devices which implement buses should use this method to probe for
@@ -58,7 +58,7 @@ the child devices will be automatically probed and attached.
.Sh RETURN VALUES
Zero is returned on success, otherwise an appropriate error is returned.
.Sh SEE ALSO
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr device 9 ,
.Xr DEVICE_DETACH 9 ,
.Xr DEVICE_IDENTIFY 9 ,
diff --git a/share/man/man9/dev_clone.9 b/share/man/man9/dev_clone.9
index f5f59e3c6666..56bdd1a9a248 100644
--- a/share/man/man9/dev_clone.9
+++ b/share/man/man9/dev_clone.9
@@ -42,7 +42,7 @@ EVENTHANDLER_REGISTER(dev_clone, clone_handler, arg, priority);
.Sh DESCRIPTION
A device driver may register a listener that will be notified each time
a name lookup on the
-.Xr devfs 5
+.Xr devfs 4
mount point fails to find the vnode.
A listener shall be registered for the
.Va dev_clone
@@ -72,5 +72,5 @@ that were started before
.Fn drain_dev_clone_events
call, are finished before it returns control.
.Sh SEE ALSO
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr namei 9
diff --git a/share/man/man9/dev_refthread.9 b/share/man/man9/dev_refthread.9
index e12b5f49a0e5..f615725b0a47 100644
--- a/share/man/man9/dev_refthread.9
+++ b/share/man/man9/dev_refthread.9
@@ -47,7 +47,7 @@ The
and
.Fn dev_relthread
routines provide a safe way to access
-.Xr devfs 5
+.Xr devfs 4
devices that may be concurrently destroyed by
.Fn destroy_dev
(e.g., removable media).
@@ -143,7 +143,7 @@ and do not initialize the value pointed to by the
parameter in any way.
.Ef
.Sh SEE ALSO
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr destroy_dev 9
.Sh CAVEATS
Do not invoke
diff --git a/share/man/man9/devfs_set_cdevpriv.9 b/share/man/man9/devfs_set_cdevpriv.9
index 3258ca082e5f..0cbfd3eebeb7 100644
--- a/share/man/man9/devfs_set_cdevpriv.9
+++ b/share/man/man9/devfs_set_cdevpriv.9
@@ -62,7 +62,7 @@ Currently, functioning of these functions is restricted to the context
of the
.Fa cdevsw
switch method calls performed as
-.Xr devfs 5
+.Xr devfs 4
operations in response to system calls that use filedescriptors.
.Pp
The
@@ -151,7 +151,7 @@ any blockable locking inside the callback
.Sh SEE ALSO
.Xr close 2 ,
.Xr open 2 ,
-.Xr devfs 5
+.Xr devfs 4
.Sh HISTORY
The
.Fn devfs_cdevpriv
diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9
index 047abb96c619..41436427cbc2 100644
--- a/share/man/man9/disk.9
+++ b/share/man/man9/disk.9
@@ -51,7 +51,7 @@ disk-like storage devices to advertise the device to other kernel
components, including
.Xr GEOM 4
and
-.Xr devfs 5 .
+.Xr devfs 4 .
.Pp
Each disk device is described by a
.Vt "struct disk"
@@ -242,8 +242,8 @@ Typically used to store a pointer to the drivers
structure for this disk device.
.El
.Sh SEE ALSO
-.Xr GEOM 4 ,
-.Xr devfs 5
+.Xr devfs 4 ,
+.Xr GEOM 4
.Sh HISTORY
The
.Nm kernel disk storage API
diff --git a/share/man/man9/g_provider.9 b/share/man/man9/g_provider.9
index d421af3b1264..940772b26fa5 100644
--- a/share/man/man9/g_provider.9
+++ b/share/man/man9/g_provider.9
@@ -50,7 +50,7 @@ The
function creates a new provider on given geom
.Fa gp .
The name of the provider, which will appear as device in
-.Xr devfs 5 ,
+.Xr devfs 4 ,
is created
in a
.Xr printf 3 Ns
diff --git a/share/man/man9/ieee80211.9 b/share/man/man9/ieee80211.9
index 100b4e7540a5..40c8c243a77c 100644
--- a/share/man/man9/ieee80211.9
+++ b/share/man/man9/ieee80211.9
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 26, 2021
+.Dd April 24, 2024
.Dt IEEE80211 9
.Os
.Sh NAME
@@ -514,6 +514,8 @@ General capabilities are specified by
.Vt ic_caps .
Hardware cryptographic capabilities are specified by
.Vt ic_cryptocaps .
+Software cryptographic capabilities are specified by
+.Vt ic_sw_cryptocaps .
802.11n capabilities, if any, are specified by
.Vt ic_htcaps .
The
diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9
index 110fdd68fda0..96f617a72123 100644
--- a/share/man/man9/lock.9
+++ b/share/man/man9/lock.9
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
.\" DAMAGE.
.\"
-.Dd November 17, 2017
+.Dd May 18, 2024
.Dt LOCK 9
.Os
.Sh NAME
@@ -108,10 +108,6 @@ should log messages about duplicate locks being acquired.
Disable
.Xr ktr 4
logging for this lock.
-.It Dv LK_TIMELOCK
-Use
-.Fa timo
-during a sleep; otherwise, 0 is used.
.El
.El
.Pp
@@ -182,6 +178,10 @@ Fail if operation has slept.
.It Dv LK_NOWAIT
Do not allow the call to sleep.
This can be used to test the lock.
+.It Dv LK_TIMELOCK
+Use
+.Fa timo
+during a sleep; otherwise, 0 is used.
.It Dv LK_NOWITNESS
Skip the
.Xr witness 4
diff --git a/share/man/man9/make_dev.9 b/share/man/man9/make_dev.9
index 2beb38586593..5428b4c7a74e 100644
--- a/share/man/man9/make_dev.9
+++ b/share/man/man9/make_dev.9
@@ -81,7 +81,7 @@ structure for a new device, which is returned into the
.Fa cdev
argument.
It also notifies
-.Xr devfs 5
+.Xr devfs 4
of the presence of the new device, that causes corresponding nodes
to be created.
Besides this, a
@@ -123,7 +123,7 @@ would print it.
The name determines its path under
.Pa /dev
or other
-.Xr devfs 5
+.Xr devfs 4
mount point and may contain slash
.Ql /
characters to denote subdirectories.
@@ -457,7 +457,7 @@ flag was specified and the provided device name already exists.
.El
.Sh SEE ALSO
.Xr devctl 4 ,
-.Xr devfs 5 ,
+.Xr devfs 4 ,
.Xr dev_clone 9
.Sh HISTORY
The
diff --git a/share/man/man9/pseudofs.9 b/share/man/man9/pseudofs.9
index e076c398c711..d87bbb0030c7 100644
--- a/share/man/man9/pseudofs.9
+++ b/share/man/man9/pseudofs.9
@@ -36,9 +36,9 @@
The
.Nm
module offers an abstract API for pseudo-file systems such as
-.Xr procfs 5
+.Xr procfs 4
and
-.Xr linprocfs 5 .
+.Xr linprocfs 4 .
It takes care of all the hairy bits like interfacing with the VFS
system, enforcing access control, keeping track of file numbers, and
cloning files and directories that are process-specific.
@@ -51,9 +51,9 @@ and callbacks that report file attributes or write the actual file
contents into sbufs.
.\" Insert more info here
.Sh SEE ALSO
-.Xr linprocfs 5 ,
-.Xr linsysfs 5 ,
-.Xr procfs 5 ,
+.Xr linprocfs 4 ,
+.Xr linsysfs 4 ,
+.Xr procfs 4 ,
.Xr sbuf 9 ,
.Xr vnode 9
.Sh HISTORY
diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9
index 35a2d176233c..d175b60b4010 100644
--- a/share/man/man9/rman.9
+++ b/share/man/man9/rman.9
@@ -40,7 +40,6 @@
.Nm rman_last_free_region ,
.Nm rman_release_resource ,
.Nm rman_reserve_resource ,
-.Nm rman_reserve_resource_bound ,
.Nm rman_make_alignment_flags ,
.Nm rman_get_start ,
.Nm rman_get_end ,
@@ -90,11 +89,6 @@
.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count"
.Fa "u_int flags" "device_t dev"
.Fc
-.Ft "struct resource *"
-.Fo rman_reserve_resource_bound
-.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count"
-.Fa "rman_res_t bound" "u_int flags" "device_t dev"
-.Fc
.Ft uint32_t
.Fn rman_make_alignment_flags "uint32_t size"
.Ft rman_res_t
@@ -266,7 +260,7 @@ and
are set to the bounds of the free region and zero is returned.
.Pp
The
-.Fn rman_reserve_resource_bound
+.Fn rman_reserve_resource
function is where the bulk of the
.Nm
logic is located.
@@ -279,7 +273,7 @@ The caller can specify the
and
.Fa end
of an acceptable range,
-as well as a boundary restriction and required alignment,
+required alignment,
and the code will attempt to find a free segment which fits.
The
.Fa start
@@ -296,15 +290,13 @@ The alignment requirement
.Pq if any
is specified in
.Fa flags .
-The
-.Fa bound
-argument may be set to specify a boundary restriction such that an
-allocated region may cross an address that is a multiple of the
-boundary.
-The
-.Fa bound
-argument must be a power of two.
-It may be set to zero to specify no boundary restriction.
+Often the
+.Dv RF_ALIGNMENT_LOG2
+macro is used to specify alignment to a power-of-2 size, or
+.Fn rman_make_alignment_flags
+can be used to compute the
+.Fa flags
+value at runtime.
A shared segment will be allocated if the
.Dv RF_SHAREABLE
flag is set, otherwise an exclusive segment will be allocated.
@@ -312,15 +304,6 @@ If this shared segment already exists, the caller has its device
added to the list of consumers.
.Pp
The
-.Fn rman_reserve_resource
-function is used to reserve resources within a previously established region.
-It is a simplified interface to
-.Fn rman_reserve_resource_bound
-which passes 0 for the
-.Fa bound
-argument.
-.Pp
-The
.Fn rman_make_alignment_flags
function returns the flag mask corresponding to the desired alignment
.Fa size .
diff --git a/share/man/man9/vfs_getopt.9 b/share/man/man9/vfs_getopt.9
index 0e68655f540f..ff0f027314c7 100644
--- a/share/man/man9/vfs_getopt.9
+++ b/share/man/man9/vfs_getopt.9
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
.\" DAMAGE.
.\"
-.Dd July 31, 2011
+.Dd May 19, 2024
.Dt VFS_GETOPT 9
.Os
.Sh NAME
@@ -46,7 +46,7 @@
.Fa "struct vfsoptlist *opts" "const char *name" "void **buf" "int *len"
.Fc
.Ft "char *"
-.Fn vfs_getops "struct vfsoptlist *opts" "const char *name" "int *error"
+.Fn vfs_getopts "struct vfsoptlist *opts" "const char *name" "int *error"
.Ft int
.Fo vfs_flagopt
.Fa "struct vfsoptlist *opts" "const char *name" "uint64_t *flags" "uint64_t flag"
@@ -177,7 +177,7 @@ function returns 0 if the option was found; otherwise,
is returned.
.Pp
The
-.Fn vfs_getops
+.Fn vfs_getopts
function returns the specified option if it is found, and is
.Dv NUL
terminated.
diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors
index ca3e5af4c97c..df152a4e97e0 100644
--- a/share/misc/pci_vendors
+++ b/share/misc/pci_vendors
@@ -1,8 +1,8 @@
#
# List of PCI ID's
#
-# Version: 2024.02.02
-# Date: 2024-02-02 14:41:33
+# Version: 2024.05.14
+# Date: 2024-05-14 03:15:02
#
# Maintained by Albert Pool, Martin Mares, and other volunteers from
# the PCI ID Project at https://pci-ids.ucw.cz/.
@@ -454,6 +454,7 @@
1028 1f07 SAS 5/iR Integrated RAID Controller
1028 1f08 SAS 5/iR Integrated RAID Controller
1028 1f09 SAS 5/iR Adapter RAID Controller
+ 103c 3228 SAS3080X-HP 8-port PCI-X 133MHz Host Bus Adapter with 2xSFF-8484
15ad 1976 SAS Controller
0055 SAS1068 PCI-X Fusion-MPT SAS
1033 8336 SAS1068
@@ -764,7 +765,7 @@
1bd4 0026 12G SAS3008IT RACK
1bd4 0027 12G SAS3008IMR RACK
1bd4 0028 12G SAS3008IR RACK
- 00a5 Fusion-MPT 24GSAS/PCIe SAS40xx
+ 00a5 Fusion-MPT 24GSAS/PCIe SAS40xx/41xx
1000 4600 MegaRAID 9670W-16i Tri-Mode Storage Adapter
1000 4610 MegaRAID 9670-24i Tri-Mode Storage Adapter
1000 4620 MegaRAID 9660-16i Tri-Mode Storage Adapter
@@ -3779,6 +3780,7 @@
699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X]
1028 1720 Radeon RX 550X
148c 2380 Lexa XL [Radeon RX 550]
+ 17aa 5069 Thinkpad E480/E580
1da2 e367 Lexa PRO [Radeon RX 550]
69a0 Vega 12
69a1 Vega 12
@@ -3960,6 +3962,8 @@
73a3 Navi 21 GL-XL [Radeon PRO W6800]
73a4 Navi 21 USB
73a5 Navi 21 [Radeon RX 6950 XT]
+# Reference
+ 1002 0e3a Radeon RX 6950 XT
1849 5230 Navi 21 [ASRock OC Forumla Radeon RX 6950XT]
1da2 441d Navi 21 [Sapphire Nitro+ Radeon RX 6950 XT]
1eae 6950 Navi 21 [XFX Speedster MERC319 Radeon RX 6950 XT]
@@ -3990,6 +3994,7 @@
1da2 465e Radeon RX 6750 XT PULSE OC
1da2 e445 Sapphire Radeon RX 6700
1eae 6601 Speedster QICK 319 RX 6700 XT
+ 1eae 661a Radeon RX 6700 [SPEEDSTER SWFT 309]
73e0 Navi 23
73e1 Navi 23 WKS-XM [Radeon PRO W6600M]
73e3 Navi 23 WKS-XL [Radeon PRO W6600]
@@ -5642,6 +5647,8 @@
9609 RS780/RS880 PCI to PCI bridge (PCIE port 5)
960a RS780 PCI to PCI bridge (NB-SB link)
960b RS780 PCI to PCI bridge (ext gfx port 1)
+# Takes over NVMe PCI ID when RAID is enabled
+ b000 RAID Bottom Device
1023 Trident Microsystems
0194 82C194
2000 4DWave DX
@@ -9193,6 +9200,7 @@
87d0 PEX PCI Express Switch DMA interface
9016 PLX 9016 8-port serial controller
9030 PCI9030 32-bit 33MHz PCI <-> IOBus Bridge
+ 10b5 1205 Becker & Hickl MSA-1000
10b5 2695 Hilscher CIF50-PB/DPS Profibus
10b5 2862 Alpermann+Velte PCL PCI LV (3V/5V): Timecode Reader Board
10b5 2906 Alpermann+Velte PCI TS (3V/5V): Time Synchronisation Board
@@ -9228,7 +9236,13 @@
10b5 1067 IXXAT CAN i165
10b5 114e Wasco WITIO PCI168extended
10b5 1169 Wasco OPTOIO32standard 32 digital in, 32 digital out
+ 10b5 1171 Becker & Hickl PMS-400
10b5 1172 IK220 (Heidenhain)
+ 10b5 1201 Becker & Hickl SPC-6x0
+ 10b5 1202 Becker & Hickl SPC-7x0
+ 10b5 1203 Becker & Hickl MSA-300
+ 10b5 1206 Becker & Hickl DCC-100
+ 10b5 120a Becker & Hickl STP-340
10b5 2036 SatPak GPS
10b5 2221 Alpermann+Velte PCL PCI LV: Timecode Reader Board
10b5 2273 SH ARC-PCI SOHARD ARCNET card
@@ -9276,6 +9290,11 @@
d84d 4078 EX-4078 2S(16C552) RS-232+1P
9052 PCI9052 PCI <-> IOBus Bridge
9054 PCI9054 32-bit 33MHz PCI <-> IOBus Bridge
+ 10b5 1171 Becker & Hickl PMS-400A
+ 10b5 1208 Becker & Hickl SPC-830
+ 10b5 120e Becker & Hickl SPC-930
+ 10b5 120f Becker & Hickl SPC-150
+ 10b5 1210 Becker & Hickl DPC-230
10b5 2455 Wessex Techology PHIL-PCI
10b5 2696 Innes Corp AM Radcap card
10b5 2717 Innes Corp Auricon card
@@ -11734,6 +11753,9 @@
0f02 GF108 [GeForce GT 730]
0f03 GF108 [GeForce GT 610]
0f06 GF108 [GeForce GT 730]
+ 0fa0 GK11x [GK11x_FPGA]
+ 0fa5 GK11x
+ 0fa7 GK11x [Tegra on x86 (PEATRANS)]
0fb0 GM200 High Definition Audio
0fb8 GP108 High Definition Audio Controller
0fb9 GP107GL High Definition Audio Controller
@@ -11743,13 +11765,18 @@
0fc0 GK107 [GeForce GT 640 OEM]
0fc1 GK107 [GeForce GT 640]
0fc2 GK107 [GeForce GT 630 OEM]
+ 0fc4 GK107 [D14P1-15]
0fc5 GK107 [GeForce GT 1030]
0fc6 GK107 [GeForce GTX 650]
1043 8428 GTX650-DC-1GD5
0fc8 GK107 [GeForce GT 740]
0fc9 GK107 [GeForce GT 730]
+ 0fcb GK107 [EXK107]
+ 0fcc GK107 [GeForce GT 720]
0fcd GK107M [GeForce GT 755M]
0fce GK107M [GeForce GT 640M LE]
+ 0fcf GK107 [GEN3 ESI]
+ 0fd0 GK107 [NB1G]
0fd1 GK107M [GeForce GT 650M]
1043 1597 GeForce GT 650M
1043 15a7 GeForce GT 650M
@@ -11764,10 +11791,15 @@
0fd3 GK107M [GeForce GT 640M LE]
0fd4 GK107M [GeForce GTX 660M]
0fd5 GK107M [GeForce GT 650M Mac Edition]
- 0fd6 GK107M
+ 0fd6 GK107M [N13P-GS-W]
+ 0fd7 GK107 [GK107-GTX]
0fd8 GK107M [GeForce GT 640M Mac Edition]
0fd9 GK107M [GeForce GT 645M]
- 0fdb GK107M
+ 0fda GK107 [GK107-ES-A1]
+ 0fdb GK107 [GK107-ESP-A1]
+ 0fdc GK107 [GK107-INT22-A1]
+ 0fdd GK107 [GK107-INT11-A1]
+ 0fde GK107 [GK107-ES-KA-E1]
0fdf GK107M [GeForce GT 740M]
0fe0 GK107M [GeForce GTX 660M Mac Edition]
0fe1 GK107M [GeForce GT 730M]
@@ -11788,6 +11820,7 @@
0fed GK107M [GeForce 820M]
0fee GK107M [GeForce 810M]
0fef GK107GL [GRID K340]
+ 0ff0 GK107 [NB1Q]
0ff1 GK107 [NVS 1000]
0ff2 GK107GL [GRID K1]
0ff3 GK107GL [Quadro K420]
@@ -12307,9 +12340,13 @@
11a2 GK104M [GeForce GTX 675MX Mac Edition]
11a3 GK104M [GeForce GTX 680MX]
106b 010d iMac 13,2
+ 11a4 GK104 [GK104-ESA]
+ 11a5 GK104 [GK104-ESA]
11a7 GK104M [GeForce GTX 675MX]
11a8 GK104GLM [Quadro K5100M]
11a9 GK104M [GeForce GTX 870M]
+ 11aa GK104 [GK104-INT]
+ 11ac GK104 [GK104-CS]
11af GK104GLM [GRID IceCube]
11b0 GK104GL [GRID K240Q / K260Q vGPU]
10de 101a GRID K240Q
@@ -12327,6 +12364,7 @@
11be GK104GLM [Quadro K3000M]
11bf GK104GL [GRID K2]
11c0 GK106 [GeForce GTX 660]
+ 11c1 GK106 [D14P2-30]
11c2 GK106 [GeForce GTX 650 Ti Boost]
1043 845b GeForce GTX 650 Ti Boost DirectCU II OC
1462 2874 GeForce GTX 650 Ti Boost TwinFrozr II OC
@@ -12342,6 +12380,10 @@
11c7 GK106 [GeForce GTX 750 Ti]
11c8 GK106 [GeForce GTX 650 OEM]
11cb GK106 [GeForce GT 740]
+ 11d0 GK106 [GK106-INT353]
+ 11d1 GK106 [GK106-INT343]
+ 11d2 GK106 [GK106-INT232]
+ 11d3 GK106 [GK106-ES]
11e0 GK106M [GeForce GTX 770M]
11e1 GK106M [GeForce GTX 765M]
11e2 GK106M [GeForce GTX 765M]
@@ -12350,6 +12392,7 @@
11e7 GK106M
11fa GK106GL [Quadro K4000]
11fc GK106GLM [Quadro K2100M]
+ 11ff GK106 [NB1Q]
1200 GF114 [GeForce GTX 560 Ti]
1201 GF114 [GeForce GTX 560]
1202 GF114 [GeForce GTX 560 Ti OEM]
@@ -12397,7 +12440,9 @@
1280 GK208 [GeForce GT 635]
1281 GK208 [GeForce GT 710]
1282 GK208 [GeForce GT 640 Rev. 2]
+ 1283 GK208 [D15M2-10]
1284 GK208 [GeForce GT 630 Rev. 2]
+ 1285 GK208 [GK208-100]
1286 GK208 [GeForce GT 720]
1287 GK208B [GeForce GT 730]
1288 GK208B [GeForce GT 720]
@@ -12437,8 +12482,14 @@
17aa 36af GeForce 920M
129a GK208BM [GeForce 910M]
12a0 GK208
+ 12ad GK208 [GK208-ES]
+ 12ae GK208 [GK208-CS1-C]
+ 12af GK208 [GK208-INT]
+ 12b0 GK208 [GK208-CS-Q]
+ 12b1 GK208 [GK208 INT]
12b9 GK208GLM [Quadro K610M]
12ba GK208GLM [Quadro K510M]
+ 130b GK110 [Q12U-1]
1340 GM108M [GeForce 830M]
103c 2b2b GeForce 830A
1341 GM108M [GeForce 840M]
@@ -12483,6 +12534,8 @@
103c 2b4c GeForce GTX 960A
139c GM107M [GeForce 940M]
139d GM107M [GeForce GTX 750 Ti]
+ 13ad GM204 [GM107 INT52]
+ 13ae GM204 [GM107 CS1]
13b0 GM107GLM [Quadro M2000M]
13b1 GM107GLM [Quadro M1000M]
13b2 GM107GLM [Quadro M600M]
@@ -12497,15 +12550,19 @@
10de 110a GRID M40
10de 1160 Tesla M10
10de 11d2 GRID M10-8Q
+ 13be GM204 [GM107 CS1]
+ 13bf GM204 [GM107 INT52]
13c0 GM204 [GeForce GTX 980]
1043 8504 GTX980-4GD5
13c1 GM204
13c2 GM204 [GeForce GTX 970]
13c3 GM204
+ 13c4 GM204 [D17U-20]
13d7 GM204M [GeForce GTX 980M]
13d8 GM204M [GeForce GTX 960 OEM / 970M]
13d9 GM204M [GeForce GTX 965M]
13da GM204M [GeForce GTX 980 Mobile]
+ 13e4 GM204 [Graphics Device ES-A]
13e7 GM204GL [GeForce GTX 980 Engineering Sample]
13f0 GM204GL [Quadro M5000]
13f1 GM204GL [Quadro M4000]
@@ -12531,6 +12588,7 @@
1430 GM206GL [Quadro M2000]
1431 GM206GL [Tesla M4]
1436 GM206GLM [Quadro M2200 Mobile]
+ 15c2 GP100 [CMP 100-100]
15f0 GP100GL [Quadro GP100]
15f1 GP100GL
15f7 GP100GL [Tesla P100 PCIe 12GB]
@@ -12538,6 +12596,7 @@
15f9 GP100GL [Tesla P100 SXM2 16GB]
15fa GP100GL [DGX Station / PH402 SKU 200]
15fb GP100GL [GP100 SKU 200]
+ 15fc GP100GL [Tesla P100-DGXS-16GB]
15ff GP100GL [GP100 SKU 15ff]
1617 GM204M [GeForce GTX 980M]
1618 GM204M [GeForce GTX 970M]
@@ -12697,6 +12756,7 @@
1d81 GV100 [TITAN V]
1d83 GV100 [CMP 100-200]
1d84 GV100 [CMP 100-210]
+ 1db0 GV100GL [Tesla GV100 SXM2-16GB SKU 890]
1db1 GV100GL [Tesla V100 SXM2 16GB]
1db2 GV100GL [Tesla V100 DGXS 16GB]
1db3 GV100GL [Tesla V100 FHHL 16GB]
@@ -12713,6 +12773,7 @@
1dc1 GV100 [CMP 100-200]
1df0 GV100GL [Tesla PG500-216]
1df2 GV100GL [Tesla PG503-216]
+ 1df4 GV100 [CMP 100-210]
1df5 GV100GL [Tesla V100 SXM2 16GB]
1df6 GV100GL [Tesla V100S PCIe 32GB]
1e02 TU102 [TITAN RTX]
@@ -12726,6 +12787,7 @@
1e30 TU102GL [Quadro RTX 6000/8000]
10de 129e Quadro RTX 8000
10de 12ba Quadro RTX 6000
+ 1e35 TU102GL [Tesla T10]
1e36 TU102GL [Quadro RTX 6000]
1e37 TU102GL [Tesla T10 16GB / GRID RTX T10-2/T10-4/T10-8]
10de 1304 Tesla T10 16GB
@@ -12823,7 +12885,7 @@
1fd9 TU117BM [GeForce GTX 1650 Mobile Refresh]
1fdd TU117BM [GeForce GTX 1650 Mobile Refresh]
1ff0 TU117GL [T1000 8GB]
- 1ff2 TU117GL [T400 4GB]
+ 1ff2 TU117GL [T400 4GB / T400E]
1ff9 TU117GLM [Quadro T1000 Mobile]
2080 GA100
2081 GA100
@@ -12902,8 +12964,10 @@
2321 GH100 [H100L 94GB]
2322 GH100 [H800 PCIe]
2324 GH100 [H800]
+ 2329 GH100 [H20]
2330 GH100 [H100 SXM5 80GB]
2331 GH100 [H100 PCIe]
+ 2335 GH100 [H200 SXM 141GB]
2336 GH100 [H100]
2337 GH100 [H100 SXM5 64GB]
2338 GH100 [H100 SXM5 96GB]
@@ -12932,6 +12996,9 @@
2488 GA104 [GeForce RTX 3070 Lite Hash Rate]
2489 GA104 [GeForce RTX 3060 Ti Lite Hash Rate]
248a GA104 [CMP 70HX]
+ 248c GA104 [GeForce RTX 3070 Ti]
+ 248d GA104 [GeForce RTX 3070]
+ 248e GA104 [GeForce RTX 3060 Ti]
249c GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB]
249d GA104M [GeForce RTX 3070 Mobile / Max-Q]
249f GA104M
@@ -12991,6 +13058,8 @@
25ac GN20-P0-R-K2 [GeForce RTX 3050 6GB Laptop GPU]
25ad GA107 [GeForce RTX 2050]
25af GA107 [GeForce RTX 3050 Engineering Sample]
+ 25b0 GA107GL [RTX A1000]
+ 25b2 GA107GL [RTX A400]
25b5 GA107GLM [RTX A4 Mobile]
# A16 - 25B6 10DE 14A9 / A2 - 25B6 10DE 157E
25b6 GA107GL [A2 / A16]
@@ -13024,6 +13093,7 @@
2703 AD103 [GeForce RTX 4080 SUPER]
2704 AD103 [GeForce RTX 4080]
2705 AD103 [GeForce RTX 4070 Ti SUPER]
+ 2709 AD103 [GeForce RTX 4070]
2717 GN21-X11 [GeForce RTX 4090 Laptop GPU]
2730 AD103GLM [RTX 5000 Ada Generation Laptop GPU]
2757 GN21-X11
@@ -13032,6 +13102,7 @@
2783 AD104 [GeForce RTX 4070 SUPER]
2785 AD104 [AC AD104 20GB]
2786 AD104 [GeForce RTX 4070]
+ 2788 AD104 [GeForce RTX 4060 Ti]
27a0 AD104M [GeForce RTX 4080 Max-Q / Mobile]
27b0 AD104GL [RTX 4000 SFF Ada Generation]
27b1 AD104GL [RTX 4500 Ada Generation]
@@ -13046,6 +13117,7 @@
27fb AD104GLM [RTX 3500 Ada Generation Embedded GPU]
2803 AD106 [GeForce RTX 4060 Ti]
2805 AD106 [GeForce RTX 4060 Ti 16GB]
+ 2808 AD106 [GeForce RTX 4060]
2820 AD106M [GeForce RTX 4070 Max-Q / Mobile]
2838 AD106GLM [RTX 3000 Ada Generation Laptop GPU]
2860 AD106M [GeForce RTX 4070 Max-Q / Mobile]
@@ -13053,7 +13125,11 @@
2882 AD107 [GeForce RTX 4060]
28a0 AD107M [GeForce RTX 4060 Max-Q / Mobile]
28a1 AD107M [GeForce RTX 4050 Max-Q / Mobile]
+ 28b0 AD107GL [RTX 2000 / 2000E Ada Generation]
28b8 AD107GLM [RTX 2000 Ada Generation Laptop GPU]
+ 28b9 AD107GLM [RTX 1000 Ada Generation Laptop GPU]
+ 28ba AD107GLM [RTX 500 Ada Generation Laptop GPU]
+ 28bb AD107GLM [RTX 500 Ada Generation Laptop GPU]
28e0 AD107M [GeForce RTX 4060 Max-Q / Mobile]
28e1 AD107M [GeForce RTX 4050 Max-Q / Mobile]
28f8 AD107GLM [RTX 2000 Ada Generation Embedded GPU]
@@ -13308,6 +13384,7 @@
5762 RTS5762 NVMe SSD Controller
5763 RTS5763DL NVMe SSD Controller (DRAM-less)
5765 RTS5765DL NVMe SSD Controller (DRAM-less)
+ 5770 RTS5770DL NVMe SSD Controller (DRAM-less)
5772 RTS5772DL NVMe SSD Controller (DRAM-less)
8029 RTL-8029(AS)
10b8 2011 EZ-Card (SMC1208)
@@ -13317,6 +13394,7 @@
1259 2400 AT-2400
1af4 1100 QEMU Virtual Machine
8125 RTL8125 2.5GbE Controller
+ 4c52 2022 LRES2022PT Single-port 2.5Gb Ethernet Network Adapter
8129 RTL-8129
10ec 8129 RT8129 Fast Ethernet Adapter
11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured)
@@ -13416,7 +13494,7 @@
1043 8505 P8 series motherboard
1043 8554 H81M-C Motherboard
1043 859e AM1I-A Motherboard
- 1043 8677 PRIME B450M-A Motherboard
+ 1043 8677 Onboard RTL8111H Ethernet
105b 0d7c D270S/D250S Motherboard
10ec 8168 RTL8111/8168 PCI Express Gigabit Ethernet controller
144d c652 RTL8168 on a NP300E5C series laptop
@@ -13432,6 +13510,7 @@
17aa 3098 ThinkCentre E73
17aa 3814 Z50-75
17aa 3823 Lenovo V130-15IGM Laptop - Type 81HL
+ 17aa 5068 Thinkpad E480/E580
17aa 5124 ThinkPad E595
1849 8168 Motherboard (one of many)
7470 3468 TG-3468 Gigabit PCI Express Network Adapter
@@ -16401,6 +16480,38 @@
11e2 Samsung Information Systems America
11e3 Quicklogic Corporation
0001 COM-ON-AIR Dosch&Amand DECT
+ 0010 QL5032 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0011 QL5032 (PBGA256) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0012 QL5232 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 11e3 1204 Becker & Hickl SPC-130
+ 11e3 1207 Becker & Hickl DDG-200
+ 11e3 1209 Becker & Hickl SHM-180
+ 11e3 120c Becker & Hickl PMM-428
+ 0013 QL5232 (PBGA456) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0014 QL5030 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM
+ 0015 QL5130 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM
+ 0016 QL5130 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM
+ 11e3 120b Becker & Hickl DEL-350
+ 0017 QL5130 (PBGA256) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM
+ 0019 QL5332 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 001a QL5332 (PBGA256) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 001b QL5432 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 11e3 120d Becker & Hickl SPC-140
+ 11e3 1211 Becker & Hickl GVD-120
+ 11e3 1212 Becker & Hickl DDG-210
+ 001c QL5432 (PBGA456) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 001d QL5632 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 001e QL5632 (PBGA280) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 001f QL5632 (PBGA484) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0020 QL5632 (PBGA516) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0021 QL5732 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0022 QL5732 (PBGA280) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0023 QL5732 (PBGA484) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 0024 QL5732 (PBGA516) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 002d QL5022 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 002e QL5022 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM
+ 002f QL5020 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM
+ 0030 QL5020 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM
0560 QL5064 Companion Design Demo Board
5030 PC Watchdog
8417 QL5064 [QuickPCI] PCI v2.2 bridge for SMT417 Dual TMS320C6416T PMC Module
@@ -16649,6 +16760,7 @@
8331 O2 Flash Memory Card
8520 SD/MMC Card Reader Controller
8621 SD/MMC Card Reader Controller
+ 17aa 5068 Thinkpad E480/E580
8760 FORESEE E2M2 NVMe SSD
1218 Hybricon Corp.
1219 First Virtual Corporation
@@ -17009,6 +17121,7 @@
0820 SM820 Lynx3D
0910 SM910
2260 SM2260 NVMe SSD Controller
+ 2261 SM2261XT x2 NVMe SSD Controller (DRAM-less)
2262 SM2262/SM2262EN SSD Controller
2263 SM2263EN/SM2263XT (DRAM-less) NVMe SSD Controllers
2269 SM2269XT (DRAM-less) NVMe SSD Controller
@@ -17498,6 +17611,7 @@
8152 PI7C8152A/PI7C8152B/PI7C8152BI PCI-to-PCI Bridge
8154 PI7C8154A/PI7C8154B/PI7C8154BI PCI-to-PCI Bridge
8619 PI7C9X2G1616PR PCIe2 16-Port/16-Lane Packet Switch
+ b404 PI7C9X2G404 EV/SV PCIe2 4-Port/4-Lane Packet Switch
e110 PI7C9X110 PCIe- to-PCI bridge
1775 11cc CC11/CL11 CompactPCI Bridge
e111 PI7C9X111SL PCIe-to-PCI Reversible Bridge
@@ -17848,8 +17962,25 @@
1344 5000 6.4 TB U.2
1344 6000 12.8TB U.2
51b7 7500 PRO NVMe SSD
+ 1028 22e7 DC NVMe 7500 U.2 SED RI 15.36TB
+ 1028 22e8 DC NVMe 7500 U.2 SED RI 7.68TB
+ 1028 22e9 DC NVMe 7500 U.2 SED RI 3.84TB
+ 1028 22ea DC NVMe 7500 U.2 SED RI 1.92TB
+ 1028 22eb DC NVMe 7500 U.2 SED RI 960GB
+ 1028 22ec DC NVMe 7500 U.2 ISE RI 15.36TB
+ 1028 22ed DC NVMe 7500 U.2 ISE RI 7.68TB
+ 1028 22ee DC NVMe 7500 U.2 ISE RI 3.84TB
+ 1028 22ef DC NVMe 7500 U.2 ISE RI 1.92TB
+ 1028 22f0 DC NVMe 7500 U.2 ISE RI 960GB
51b8 7500 MAX NVMe SSD
+ 1028 22f1 DC NVMe 7500 U.2 ISE MU 12.8TB
+ 1028 22f2 DC NVMe 7500 U.2 ISE MU 6.4TB
+ 1028 22f3 DC NVMe 7500 U.2 ISE MU 3.2TB
+ 1028 22f4 DC NVMe 7500 U.2 ISE MU 1.6TB
+ 1028 22f5 DC NVMe 7500 U.2 ISE MU 800GB
51b9 6500 ION NVMe SSD
+ 1028 22e6 Ent NVMe 6500 RI 30.72TB
+ 1028 22f6 Ent NVMe 6500 RI FIPS 30.72TB
51c0 7400 PRO NVMe SSD
1028 2162 EC NVMe OPAL 7400 RI M.2 480GB
1028 2163 EC NVMe OPAL 7400 RI M.2 960GB
@@ -17887,7 +18018,38 @@
1344 4000 U.3 3200GB
1344 5000 U.3 6400GB
51c3 7450 PRO NVMe SSD
+ 1028 226b EC NVMe FIPS 7450 RI M.2 110 960GB
+ 1028 226c EC NVMe ISE 7450 RI M.2 80 480GB
+ 1028 226d EC NVMe ISE 7450 RI M.2 80 960GB
+ 1028 226e EC NVMe SED 7450 RI M.2 80 480GB
+ 1028 226f EC NVMe SED 7450 RI M.2 80 960GB
+ 1028 2270 EC NVMe FIPS 7450 RI M.2 80 480GB
+ 1028 2271 EC NVMe FIPS 7450 RI M.2 80 960GB
+ 1028 2273 EC NVMe ISE 7450 RI M.2 110 960GB
+ 1028 2274 EC NVMe ISE 7450 RI M.2 110 1920GB
+ 1028 2275 EC NVMe ISE 7450 RI M.2 110 3840GB
+ 1028 2278 DC NVMe ISE 7450 RI U.2 960GB
+ 1028 2279 DC NVMe ISE 7450 RI U.2 1.92TB
+ 1028 227a DC NVMe ISE 7450 RI U.2 3.84TB
+ 1028 227b DC NVMe ISE 7450 RI U.2 7.68TB
+ 1028 227c DC NVMe ISE 7450 RI U.2 15.36TB
+ 1028 227d DC NVMe SED 7450 RI U.2 960GB
+ 1028 227e DC NVMe SED 7450 RI U.2 1.92TB
+ 1028 227f DC NVMe SED 7450 RI U.2 3.84TB
+ 1028 2280 DC NVMe SED 7450 RI U.2 7.68TB
+ 1028 2281 DC NVMe SED 7450 RI U.2 15.36TB
51c4 7450 MAX NVMe SSD
+ 1028 2272 EC NVMe ISE 7450 MU M.2 80 800GB
+ 1028 228b DC NVMe SED 7450 MU U.2 800GB
+ 1028 228c DC NVMe ISE 7450 MU U.2 800GB
+ 1028 228d DC NVMe SED 7450 MU U.2 1.6TB
+ 1028 228e DC NVMe ISE 7450 MU U.2 1.6TB
+ 1028 228f DC NVMe SED 7450 MU U.2 3.2TB
+ 1028 2290 DC NVMe ISE 7450 MU U.2 3.2TB
+ 1028 2291 DC NVMe SED 7450 MU U.2 6.4TB
+ 1028 2292 DC NVMe ISE 7450 MU U.2 6.4TB
+ 1028 2293 DC NVMe SED 7450 MU U.2 12.8TB
+ 1028 2294 DC NVMe ISE 7450 MU U.2 12.8TB
1344 3000 U.3 1600GB [MTFDKCB1T6TFS/MTFDKCC1T6TFS]
5404 2210 NVMe SSD [Cobain]
5405 2300 NVMe SSD [Santana]
@@ -19493,14 +19655,14 @@
6002 T6225-SO-CR Unified Wire Ethernet Controller
6003 T6425-CR Unified Wire Ethernet Controller
6004 T6425-SO-CR Unified Wire Ethernet Controller
- 6005 T6225-OCP-SO Unified Wire Ethernet Controller
- 6006 T62100-OCP-SO Unified Wire Ethernet Controller
+ 6005 T6225-SO-OCP3 Unified Wire Ethernet Controller
+ 6006 T6225-OCP3 Unified Wire Ethernet Controller
6007 T62100-LP-CR Unified Wire Ethernet Controller
6008 T62100-SO-CR Unified Wire Ethernet Controller
6009 T6210-BT Unified Wire Ethernet Controller
600d T62100-CR Unified Wire Ethernet Controller
6011 T6225-LL-CR Unified Wire Ethernet Controller
- 6014 T61100-OCP-SO Unified Wire Ethernet Controller
+ 6014 T62100-SO-OCP3 Unified Wire Ethernet Controller
6015 T6201-BT Unified Wire Ethernet Controller
6080 T6225-6080 Unified Wire Ethernet Controller
6081 T62100-6081 Unified Wire Ethernet Controller
@@ -19519,14 +19681,14 @@
6402 T6225-SO-CR Unified Wire Ethernet Controller
6403 T6425-CR Unified Wire Ethernet Controller
6404 T6425-SO-CR Unified Wire Ethernet Controller
- 6405 T6225-OCP-SO Unified Wire Ethernet Controller
- 6406 T62100-OCP-SO Unified Wire Ethernet Controller
+ 6405 T6225-SO-OCP3 Unified Wire Ethernet Controller
+ 6406 T6225-OCP3 Unified Wire Ethernet Controller
6407 T62100-LP-CR Unified Wire Ethernet Controller
6408 T62100-SO-CR Unified Wire Ethernet Controller
6409 T6210-BT Unified Wire Ethernet Controller
640d T62100-CR Unified Wire Ethernet Controller
6411 T6225-LL-CR Unified Wire Ethernet Controller
- 6414 T61100-OCP-SO Unified Wire Ethernet Controller
+ 6414 T62100-SO-OCP3 Unified Wire Ethernet Controller
6415 T6201-BT Unified Wire Ethernet Controller
6480 T6225-6080 Unified Wire Ethernet Controller
6481 T62100-6081 Unified Wire Ethernet Controller
@@ -19545,14 +19707,14 @@
6502 T6225-SO-CR Unified Wire Storage Controller
6503 T6425-CR Unified Wire Storage Controller
6504 T6425-SO-CR Unified Wire Storage Controller
- 6505 T6225-OCP-SO Unified Wire Storage Controller
- 6506 T62100-OCP-SO Unified Wire Storage Controller
+ 6505 T6225-SO-OCP3 Unified Wire Storage Controller
+ 6506 T6225-OCP3 Unified Wire Storage Controller
6507 T62100-LP-CR Unified Wire Storage Controller
6508 T62100-SO-CR Unified Wire Storage Controller
6509 T6210-BT Unified Wire Storage Controller
650d T62100-CR Unified Wire Storage Controller
6511 T6225-LL-CR Unified Wire Storage Controller
- 6514 T61100-OCP-SO Unified Wire Storage Controller
+ 6514 T62100-SO-OCP3 Unified Wire Storage Controller
6515 T6201-BT Unified Wire Storage Controller
6580 T6225-6080 Unified Wire Storage Controller
6581 T62100-6081 Unified Wire Storage Controller
@@ -19570,14 +19732,14 @@
6602 T6225-SO-CR Unified Wire Storage Controller
6603 T6425-CR Unified Wire Storage Controller
6604 T6425-SO-CR Unified Wire Storage Controller
- 6605 T6225-OCP-SO Unified Wire Storage Controller
- 6606 T62100-OCP-SO Unified Wire Storage Controller
+ 6605 T6225-SO-OCP3 Unified Wire Storage Controller
+ 6606 T6225-OCP3 Unified Wire Storage Controller
6607 T62100-LP-CR Unified Wire Storage Controller
6608 T62100-SO-CR Unified Wire Storage Controller
6609 T6210-BT Unified Wire Storage Controller
660d T62100-CR Unified Wire Storage Controller
6611 T6225-LL-CR Unified Wire Storage Controller
- 6614 T61100-OCP-SO Unified Wire Storage Controller
+ 6614 T62100-SO-OCP3 Unified Wire Storage Controller
6615 T6201-BT Unified Wire Storage Controller
6680 T6225-6080 Unified Wire Storage Controller
6681 T62100-6081 Unified Wire Storage Controller
@@ -19595,14 +19757,14 @@
6802 T6225-SO-CR Unified Wire Ethernet Controller [VF]
6803 T6425-CR Unified Wire Ethernet Controller [VF]
6804 T6425-SO-CR Unified Wire Ethernet Controller [VF]
- 6805 T6225-OCP-SO Unified Wire Ethernet Controller [VF]
- 6806 T62100-OCP-SO Unified Wire Ethernet Controller [VF]
+ 6805 T6225-SO-OCP3 Unified Wire Ethernet Controller [VF]
+ 6806 T6225-OCP3 Unified Wire Ethernet Controller [VF]
6807 T62100-LP-CR Unified Wire Ethernet Controller [VF]
6808 T62100-SO-CR Unified Wire Ethernet Controller [VF]
6809 T6210-BT Unified Wire Ethernet Controller [VF]
680d T62100-CR Unified Wire Ethernet Controller [VF]
6811 T6225-LL-CR Unified Wire Ethernet Controller [VF]
- 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF]
+ 6814 T62100-SO-OCP3 Unified Wire Ethernet Controller [VF]
6815 T6201-BT Unified Wire Ethernet Controller [VF]
6880 T6225-6080 Unified Wire Ethernet Controller [VF]
6881 T62100-6081 Unified Wire Ethernet Controller [VF]
@@ -19847,6 +20009,7 @@
1028 225d NVMe PM1745 MU U.2 6.4TB
1028 225e NVMe FIPS PM1745 MU U.2 12.8TB
1028 225f NVMe PM1745 MU U.2 12.8TB
+ a900 NVMe SSD Controller PM9DXa
ecec Exynos 8895 PCIe Root Complex
144e OLITEC
144f Askey Computer Corp.
@@ -20434,6 +20597,7 @@
193d 1003 530F-B
193d 1006 530F-L
193d 100f NIC-ETH522i-Mb-2x10G
+ 4c52 9812 LREC9812AF Dual-port 10Gb Ethernet Server Adapter
1690 NetXtreme BCM57760 Gigabit Ethernet PCIe
1691 NetLink BCM57788 Gigabit Ethernet PCIe
1028 04aa XPS 8300
@@ -20461,6 +20625,7 @@
16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet
1043 866e PEB-10G/57840-2T 10GBase-T Network Adapter
193d 100b NIC-ETH521i-Mb-4x10G
+ 4c52 9814 LREC9814AF Quad-port 10Gb Ethernet Server Adapter
16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet
103c 1916 FlexFabric 20Gb 2-port 630FLB Adapter
103c 1917 FlexFabric 20Gb 2-port 630M Adapter
@@ -20680,7 +20845,7 @@
14e4 5425 NetXtreme-E Quad-port 25G SFP28 Ethernet OCP 3.0 Adapter (BCM957504-N425G)
14e4 d142 NetXtreme-E P425D BCM57504 4x25G SFP28 PCIE
1752 BCM57502 NetXtreme-E 10Gb/25Gb/40Gb/50Gb Ethernet
- 1760 BCM57608 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb/400Gb Ethernet
+ 1760 BCM57608 10Gb/25Gb/50Gb/100Gb/200Gb/400Gb Ethernet
14e4 d125 BCM57608 2x200G PCIe Ethernet NIC
1800 BCM57502 NetXtreme-E Ethernet Partition
1801 BCM57504 NetXtreme-E Ethernet Partition
@@ -21508,6 +21673,7 @@
9290 FPGA Card
9300 Universal Exhaust Gas Oxygen Sensor Simulator
9310 Digital Programmable Resistor
+ 9320 Arria 10 FPGA Card
9350 Analog Input Card
1543 SILICON Laboratories
3052 Intel 537 [Winmodem]
@@ -21719,6 +21885,10 @@
021f CX8 Family [ConnectX-8 Secure Flash Recovery]
0220 BF4 Family Flash Recovery [BlueField-4 SoC Flash Recovery]
0221 BF4 Family Secure Flash Recovery [BlueField-4 Secure Flash Recovery]
+ 0222 CX8 PCIe Switch Family [ConnectX-8 PCIe Switch Flash Recovery]
+ 0223 CX8 PCIe Switch Family [ConnectX-8 PCIe Switch Secure Flash Recovery-RMA]
+ 0224 CX9 Family [ConnectX-9 Flash Recovery]
+ 0225 CX9 Family [ConnectX-9 Secure Flash Recovery-RMA]
024e MT53100 [Spectrum-2, Flash recovery mode]
024f MT53100 [Spectrum-2, Secure Flash recovery mode]
0250 Spectrum-3, Flash recovery mode
@@ -21750,6 +21920,9 @@
0285 Sagitta RMA
0286 LibraE Flash Recovery
0287 LibraE RMA
+# Flash recovery
+ 0288 Arcus2
+ 0289 Arcus2 RMA
1002 MT25400 Family [ConnectX-2 Virtual Function]
1003 MT27500 Family [ConnectX-3]
1014 04b5 PCIe3 40GbE RoCE Converged Host Bus Adapter for Power
@@ -21850,6 +22023,8 @@
1020 MT28860
1021 MT2910 Family [ConnectX-7]
1023 CX8 Family [ConnectX-8]
+ 1024 CX8 PCIe Switch Family [ConnectX-8 PCIe Switch]
+ 1025 CX9 Family [ConnectX-9]
1974 MT28800 Family [ConnectX-5 PCIe Bridge]
1975 MT416842 Family [BlueField SoC PCIe Bridge]
1976 MT28908 Family [ConnectX-6 PCIe Bridge]
@@ -21859,11 +22034,14 @@
197a MT43162 Family [BlueField-3 Lx SoC PCIe Bridge]
197b MT43244 Family [BlueField-3 SoC PCIe Bridge]
197c ConnectX/BlueField Family mlx5Gen PCIe Bridge [PCIe Bridge]
+ 197d CX8 Family [ConnectX-8 PCIe Bridge]
+ 197e CX9 Family [ConnectX-9 PCIe Bridge]
2020 MT2892 Family [ConnectX-6 Dx Emulated PCIe Bridge]
2021 MT42822 Family [BlueField-2 SoC Emulated PCIe Bridge]
2023 MT2910 Family [ConnectX-7 Emulated PCIe Bridge]
2024 MT43244 Family [BlueField-3 SoC Emulated PCIe Bridge]
2025 ConnectX/BlueField Family mlx5Gen Emulated PCIe Bridge [Emulated PCIe Bridge]
+ 2100 CX8 Family [CX8 Data Direct Interface]
4117 MT27712A0-FDCF-AE
1bd4 0039 SN10XMP2P25
1bd4 003a 25G SFP28 SP EO251FM9 Adapter
@@ -21929,6 +22107,7 @@
a2df BF4 Family integrated network controller [BlueField-4 integrated network controller]
b200 ArcusE
b201 LibraE
+ b202 Arcus2
c2d1 BlueField DPU Family Auxiliary Communication Channel [BlueField Family]
c2d2 MT416842 BlueField SoC management interfac
c2d3 MT42822 BlueField-2 SoC Management Interface
@@ -21995,12 +22174,14 @@
5019 WD Green SN350 240GB (DRAM-less) / SN560E NVMe SSD
501a SanDisk Ultra 3D / WD Blue SN570 NVMe SSD (DRAM-less)
501d WD Blue SN550 NVMe SSD 2TB (DRAM-less)
- 501e PC SN735 NVMe SSD (DRAM-less)
+ 501e PC SN735 / WD_BLACK SN750 SE NVMe SSD (DRAM-less)
501f WD PC SN735 NVMe SSD 512GB (DRAM-less)
5025 WD Blue SN570 NVMe SSD 2TB
5026 WD PC SN735 NVMe SSD 1TB (DRAM-less)
5028 WD CH SN560 NVMe SSD
5030 WD Black SN850X NVMe SSD
+ 5034 WD PC SN5000S M.2 2230 NVMe SSD (DRAM-less)
+ 5036 WD PC SN5000S M.2 2280 NVMe SSD (DRAM-less)
5041 WD Blue SN580 NVMe SSD (DRAM-less)
5042 WD Black SN770M NVMe SSD (DRAM-less)
15b8 ADDI-DATA GmbH
@@ -23753,7 +23934,7 @@
0100 A104d QUAD T1/E1 AFT card
0300 A101 single-port T1/E1
0400 A104u Quad T1/E1 AFT
-1924 Solarflare Communications
+1924 AMD Solarflare
0703 SFC4000 rev A net [Solarstorm]
10b8 0102 SMC10GPCIe-10BT (A2) [TigerCard]
10b8 0103 SMC10GPCIe-10BT (A3) [TigerCard]
@@ -24070,8 +24251,11 @@
196d Club-3D BV
196e PNY
1971 AGEIA Technologies, Inc.
- 1011 Physics Processing Unit [PhysX]
+ 0000 Physics Processing Unit [PhysX] 100 Series PCI Express Card
+# The PCI and PCIe versions have a different PID
+ 1011 Physics Processing Unit [PhysX] 100 Series PCI Card
1043 0001 PhysX P1
+ 1021 Physics Processing Unit [PhysX] 200 Series PCI Express Card
# nee Eberspaecher Electronics
1974 Star Electronics GmbH & Co. KG
0009 FlexCard PMC-II
@@ -24727,6 +24911,7 @@
1b96 4000 WD_BLACK AN1500 NVMe SSD
1d49 0306 ThinkSystem M.2 NVMe 2-Bay RAID Enablement Kit
1d49 0307 ThinkSystem 7mm NVMe 2-Bay Rear RAID Enablement Kit
+ 2b42 88W8997 2.4/5 GHz Dual-Band 2x2 Wi-Fi® 5 (802.11ac) + Bluetooth® 5.3 Solution
2b43 NXP 88W9098 Wi-Fi 6 (ax) MAC #1
2b44 NXP 88W9098 Wi-Fi 6 (ax) MAC #2
2b45 NXP 88W9098 Bluetooth 5.3
@@ -24775,6 +24960,7 @@
# 2xHDMI and 2xHD-SDI inputs
e5f4 MPEG2 and H264 Encoder-Transcoder
f1c4 Dual ASI-RX/TX-CI card
+1b61 Byd Precision Manufacture Co.,Ltd
1b66 DELTACAST
0007 DELTA-3G-elp-d
1b6f Etron Technology, Inc.
@@ -25005,6 +25191,21 @@
1bee IXXAT Automation GmbH
0002 CAN-IB100/PCIe
0003 CAN-IB200/PCIe
+ 0004 CAN-IB120/PCIe Mini
+ 0005 CAN-IB130/PCIe 104
+ 0006 CAN-IB230/PCIe 104
+ 000e CAN-IB500/PCIe
+ 000f CAN-IB600/PCIe
+ 0010 CAN-IB300/PCI
+ 0011 CAN-IB400/PCI
+ 0012 CAN-IB520/PCIe Mini
+ 0016 CAN-IB410/PMC
+ 001c CAN-IB810/PMC
+ 001e INpact PCIe
+ 001f INpact PCIe Mini
+ 0029 INpact M.2
+ 002d CAN-IB630/PCIe 104
+ 002e CAN-IB640/PCIe
1bef Lantiq
0011 MIPS SoC PCI Express Port
1bf4 VTI Instruments Corporation
@@ -25133,6 +25334,7 @@
2429 PE6011 NVMe Solid State Drive
243b PE6110 NVMe Solid State Drive
1c5c 0100 PE6110 NVMe Solid State Drive
+ 2527 PE4010 NVMe Solid State Drive
2839 PE8000 Series NVMe Solid State Drive
1028 2143 DC NVMe SED PE8010 RI U.2 960GB
1028 2144 DC NVMe PE8010 RI U.2 960GB
@@ -25259,6 +25461,14 @@
1c5f 5445 NVMe SSD PBlaze7 7946 6400G E1.S
1c5f 5450 NVMe SSD PBlaze7 7946 12800G AIC
1c5f 5451 NVMe SSD PBlaze7 7946 12800G 2.5" U.2
+ 1ea0 2100 TP2510 Series U.2 NVMe Datacenter SSD(3.84TB)
+ 1ea0 2101 TP2511 Series U.2 NVMe Datacenter SSD(3.84TB)
+ 1ea0 2110 TP2510 Series E3.S NVMe Datacenter SSD(3.84TB)
+ 1ea0 2111 TP2511 Series E3.S NVMe Datacenter SSD(3.84TB)
+ 1ea0 2200 TP2510 Series U.2 NVMe Datacenter SSD(7.68TB)
+ 1ea0 2201 TP2511 Series U.2 NVMe Datacenter SSD(7.68TB)
+ 1ea0 2210 TP2510 Series E3.S NVMe Datacenter SSD(7.68TB)
+ 1ea0 2211 TP2511 Series E3.S NVMe Datacenter SSD(7.68TB)
0540 PBlaze4 NVMe SSD
0550 PBlaze5 700/900
0555 PBlaze5 510/516
@@ -25373,6 +25583,10 @@
1cc4 2213 NVMe SSD UH832a E3.S 3.2TB
1cc4 2214 NVMe SSD UH832a E3.S 6.4TB
1cc4 2215 NVMe SSD UH832a E3.S 12.8TB
+ 1cc4 3122 NVMe SSD UH712a U.2 1.92TB
+ 1cc4 3123 NVMe SSD UH712a U.2 3.84TB
+ 1cc4 3124 NVMe SSD UH712a U.2 7.68TB
+ 1cc4 3125 NVMe SSD UH712a U.2 15.36TB
1cc5 Embedded Intelligence, Inc.
0100 PCIe-CAN-02 Dual CAN bus (9-pin male). PCI Express x1.
0101 PCIe-CAN-01 Single CAN bus (9-pin male). PCI Express x1.
@@ -25571,14 +25785,18 @@
2440 CL2440
1d6a Aquantia Corp.
0001 AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]
+ 4c52 6880 LREC6880BT Single-port 10Gb Ethernet Network Adapter
00b1 AQtion AQC100 NBase-T/IEEE 802.3an Ethernet Controller [Atlantic 10G]
00c0 Antigua NBase-T/IEEE 802.3an Ethernet Controller - Engineering Sample
04c0 AQtion AQC113 NBase-T/IEEE 802.3an Ethernet Controller [Antigua 10G]
+ 4c52 1053 LRES1053PT Quad-port 10Gb Ethernet Network Adapter
+ 4c52 2051 LRES2051PT Single-port 10Gb Ethernet Network Adapter
07b1 AQtion AQC107 NBase-T/IEEE 802.3an Ethernet Controller [Atlantic 10G]
# Older revision of QNAP QM2 M.2 2280 PCIe SSD & 10GbE Expansion Card
1baa 07b1 QM2-2P10G1TA [QXG 10GbE Network Adapter]
# Newer revision of QNAP QM2 M.2 2280 PCIe SSD & 10GbE Expansion Card
1baa 07b2 QM2-2P10G1TA [QM2 Expansion Adapter]
+ 4c52 6880 LREC6880BT Single-port 10Gb Ethernet Network Adapter
08b1 AQC108 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]
11b1 AQC111 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]
12b1 AQC112 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]
@@ -25701,7 +25919,7 @@
2262 NVMe PCIe SSD 220S/MTE662T2
2263 NVMe PCIe SSD 110S/112S/120S/MTE300S/MTE400S/MTE652T2 (DRAM-less)
2264 NVMe PCIe SSD 250H
- 2267 NVMe PCIe SSD 240S/MTE710T
+ 2267 NVMe PCIe SSD 220S/240S/MTE710T
5766 NVMe PCIe SSD 110Q (DRAM-less)
1d7c Aerotech, Inc.
# Fiber-optic HyperWire motion control bus from Aerotech.
@@ -26178,6 +26396,7 @@
1df3 0001 ENA2100RN
1df5 Shenzhen TIGO Semiconductor
1202 kimtigo NVMe SSD (DRAM-less)
+ 2263 kimtigo MG931K NVMe SSD (DRAM-less)
1df7 opencpi.org
0001 ml605
0002 alst4
@@ -26286,6 +26505,7 @@
1028 223c Ent NVMe CM7 U.2 MU 6.4TB
1028 223d Ent NVMe CM7 U.2 MU 3.2TB
1028 223e Ent NVMe CM7 U.2 MU 1.6TB
+ 002a Exceria Plus G3 NVMe SSD (DRAM-less)
002c NVMe SSD Controller CD8P EDSFF
1028 22bf DC NVMe CD8P E3.S 15.36TB
1028 22c0 DC NVMe CD8P E3.S 7.68TB
@@ -26329,7 +26549,9 @@
# FHFL PCIe card, dual slot, 3rd generation from Enflame, 48GB device memory
c032 S90 [Enflame]
# FHFL PCIe card, dual slot, 3rd generation from Enflame, 48GB device memory
- c033 S60 [Enflame]
+ c033 S60G [Enflame]
+# FHFL PCIe card, dual slot, 3rd generation from Enflame, 48GB device memory
+ c035 S60 [Enflame]
# nee Thinci, Inc
1e38 Blaize, Inc
0102 Xplorer X1600
@@ -26338,7 +26560,7 @@
2263 270PM6, 270PM7 series NVMe SSD
1e3b DapuStor Corporation
0600 NVMe SSD Controller DP600
- 1e3b 0006 Enterprise NVMe SSD U.2 QDP 7.68TB (J5000)
+ 1e3b 0006 Enterprise NVMe SSD U.2 ODP 7.68TB (J5001)
1e3b 0010 Enterprise NVMe SSD U.2 3.84TB (R5102)
1e3b 0013 Enterprise NVMe SSD U.2 3.20TB (R5302)
1e3b 0030 Enterprise NVMe SSD U.2 3.84TB (J5100)
@@ -26377,23 +26599,39 @@
1e3b 00be Enterprise NVMe SSD U.2 QDP 30.72TB (R5100)
1e3b 00c1 Enterprise NVMe SSD U.2 QDP 25.60TB (R5300D)
1e3b 00c4 Enterprise NVMe SSD U.2 QDP 30.72TB (R5100D)
- 1e3b 00c9 Enterprise NVMe SSD U.2 15.36TB (J5000)
- 1e3b 00ca Enterprise NVMe SSD U.2 3.84TB (J5102)
- 1e3b 00cb Enterprise NVMe SSD U.2 7.68TB (J5102)
- 1e3b 00cc Enterprise NVMe SSD U.2 3.84TB (J5101)
- 1e3b 00cd Enterprise NVMe SSD U.2 7.68TB (J5101)
- 1e3b 00ce Enterprise NVMe SSD U.2 3.84TB (J5101D)
- 1e3b 00cf Enterprise NVMe SSD U.2 7.68TB (J5101D)
- 1e3b 00e8 Enterprise NVMe SSD U.2 3.20TB (J5301)
- 1e3b 00e9 Enterprise NVMe SSD U.2 6.40TB (J5301)
- 1e3b 00ea Enterprise NVMe SSD U.2 3.20TB (J5301D)
- 1e3b 00eb Enterprise NVMe SSD U.2 6.40TB (J5301D)
+ 1e3b 00c9 Enterprise NVMe SSD U.2 ODP 15.36TB (J5001)
+ 1e3b 00ca Enterprise NVMe SSD U.2 ODP 3.84TB (J5102)
+ 1e3b 00cb Enterprise NVMe SSD U.2 ODP 7.68TB (J5102)
+ 1e3b 00cc Enterprise NVMe SSD U.2 QDP 3.84TB (J5101)
+ 1e3b 00cd Enterprise NVMe SSD U.2 ODP 7.68TB (J5101)
+ 1e3b 00ce Enterprise NVMe SSD U.2 QDP 3.84TB (J5101D)
+ 1e3b 00cf Enterprise NVMe SSD U.2 ODP 7.68TB (J5101D)
+ 1e3b 00dc Enterprise NVMe SSD U.2 ODP 30.72TB with SAMSUNG 32GB DRAM (J5001)
+ 1e3b 00dd Enterprise NVMe SSD U.2 ODP 30.72TB with MT 32GB DRAM(J5001)
+ 1e3b 00de Enterprise NVMe SSD U.2 ODP 15.36TB with SK 16GB DRAM(J5001D)
+ 1e3b 00df Enterprise NVMe SSD U.2 ODP 30.72TB with SAMSUNG 32GB DRAM(J5001D)
+ 1e3b 00e7 Enterprise NVMe SSD U.2 ODP 30.72TB with MT 32GB DRAM(J5001D)
+ 1e3b 00e8 Enterprise NVMe SSD U.2 QDP 3.20TB (J5301)
+ 1e3b 00e9 Enterprise NVMe SSD U.2 ODP 6.40TB (J5301)
+ 1e3b 00ea Enterprise NVMe SSD U.2 QDP 3.20TB (J5301D)
+ 1e3b 00eb Enterprise NVMe SSD U.2 ODP 6.40TB (J5301D)
1e3b 00f0 Enterprise NVMe SSD U.2 0.40TB (X2900)
1e3b 00f1 Enterprise NVMe SSD U.2 0.80TB (X2900)
1e3b 00f2 Enterprise NVMe SSD U.2 1.60TB (X2900)
1e3b 00f3 Enterprise NVMe SSD U.2 3.20TB (X2900)
1e3b 00f5 Enterprise NVMe SSD U.2 0.40TB (X2900P)
1e3b 00f6 Enterprise NVMe SSD U.2 0.80TB (X2900P)
+ 0800 DP800
+ 1e3b 0001 Enterprise NVMe SSD U.2 QDP 3.84TB(R6100)
+ 1e3b 0007 Enterprise NVMe SSD U.2 ODP 15.36TB (R6100)
+ 1e3b 000a Enterprise NVMe SSD U.2 3.20TB (R6300)
+ 1e3b 000d Enterprise NVMe SSD U.2 6.40TB (R6300)
+ 1e3b 0010 Enterprise NVMe SSD U.2 12.80TB (R6300)
+ 1e3b 0018 Enterprise NVMe SSD U.2 QDP 3.84TB (R6100C)
+ 1e3b 0019 Enterprise NVMe SSD U.2 ODP 7.68TB (R6100C)
+ 1e3b 001a Enterprise NVMe SSD U.2 3.20TB (R6300C)
+ 1e3b 001b Enterprise NVMe SSD U.2 6.40TB (R6300C)
+ 1e3b 001c Enterprise NVMe SSD U.2 ODP 7.68TB (R6100)
1098 Haishen3 NVMe SSD
1e3b 0001 Enterprise NVMe SSD U.2 0.8TB (H2100)
1e3b 0002 Enterprise NVMe SSD U.2 0.96TB (H2200)
@@ -26446,6 +26684,8 @@
1011 PC210 NVMe SSD
1013 PC210 NVMe SSD
1031 PC300 NVMe SSD (DRAM-less)
+ 1033 PC300 NVMe SSD (DRAM-less)
+ 1071 PC411 NVMe SSD (DRAM-less)
1e4b MAXIO Technology (Hangzhou) Ltd.
1001 NVMe SSD Controller MAP1001
1002 NVMe SSD Controller MAP1002 (DRAM-less)
@@ -26461,8 +26701,13 @@
1e50 IP3 Tech (HK) Limited
1e52 Tenstorrent Inc
401e Wormhole
+ 1e52 0014 n300
+ 1e52 0018 n150
b140 Blackhole
faca Grayskull
+ 1e52 0003 e150
+ 1e52 0007 e75
+ 1e52 000a e300
1e57 Beijing Panyi Technology Co., Ltd
0100 The device has already been deleted.
0000 0100 PY8800 64GB Accelerator
@@ -26526,6 +26771,7 @@
2a16 Cloud Intelligent Inference Controller
2a18 Video Transcode Controller
2a20 Cloud Intelligent Inference and Training Controller
+ 2a22 Cloud Intelligent Inference Controller
1ea7 Intelliprop, Inc
223a Typhon+ PCIe to Gen-Z Bridge
224a IPA-PE224A CXL to Gen-Z Bridge [Sphinx]
@@ -26585,6 +26831,10 @@
1ed0 Hosin Global Electronics
1ed2 FuriosaAI, Inc.
0000 Warboy
+ 1111 RNGD
+ 0000 1111 RNGD-S
+ 0000 2222 RNGD VF
+ 0000 3333 RNGD-S VF
1ed3 Yeston
1ed5 Moore Threads Technology Co.,Ltd
0100 MTT S10
@@ -26604,6 +26854,7 @@
0211 MTT X300
0221 G2S80
0222 MTT S3000
+ 1ed5 0001 C3150
0223 G2S4
0251 G2N10
02ff MTT HDMI/DP Audio
@@ -26896,6 +27147,7 @@
1fe4 0076 Enterprise NVMe SSD U.2 7.68TB(HP610)
1fe4 0077 Enterprise NVMe SSD U.2 6.40TB(HP630)
1fe4 0078 Enterprise NVMe SSD U.2 3.20TB(HP630)
+1fe9 MemryX
1ff4 DEEPX Co., Ltd.
0000 DX_M1
0001 DX_M1A
@@ -26910,7 +27162,12 @@
2003 Smart Link Ltd.
8800 LM-I56N
2004 Smart Link Ltd.
-2046 Shenzhen Inovance Technology Co., Ltd.
+202c CAEN S.p.A.
+ 5818 A5818
+2036 Netforward Microelectronics Co., Ltd.
+ 1618 NF1618 PCI Express Ethernet Controller
+ 1619 NF1618 Family Virtual Function
+2046 GXMICRO Technology (Shanghai) Co., Ltd.
2048 Beijing SpaceControl Technology Co.Ltd
20f4 TRENDnet
2116 ZyDAS Technology Corp.
@@ -26919,6 +27176,7 @@
22b8 Flex-Logix Technologies
22a0 Flex Logix InferX X1 Inference Accelerator
22db Missing Link Electronics, Inc.
+ 1200 NVMe Streamer EP ERD
2304 Colorgraphic Communications Corp.
2321 Bruker AXS Inc.
2348 Racore
@@ -26946,11 +27204,13 @@
# 128GB
501a OM8PGP4 Design-In PCIe 4 NVMe SSD (TLC) (DRAM-less)
501b OM8PGP4 NVMe PCIe SSD (DRAM-less)
- 501c NV2 NVMe SSD E19T
+ 501c NV2 NVMe SSD E19T (DRAM-less)
501d NV2 NVMe SSD TC2200 (DRAM-less)
501f FURY Renegade NVMe SSD with heatsink
5021 OM8SEP4 Design-In PCIe 4 NVMe SSD (QLC) (DRAM-less)
- 5023 NV2 NVMe SSD SM2269XT
+ 5022 OM8PGP4 Design-In PCIe 4 NVMe SSD (QLC) (DRAM-less)
+ 5023 NV2 NVMe SSD SM2269XT (DRAM-less)
+ 5024 DC2000B NVMe SSD E18DC
270b Xantel Corporation
270f Chaintech Computer Co. Ltd
2711 AVID Technology Inc.
@@ -27339,13 +27599,15 @@
9999 UberNIC PoC/testing/dev
4c52 LR-LINK
1001 Smart Network Adapter
- 4c52 a006 LREG1006PT Single-port 1.2Gb Network Security Isolation Adapter
4c52 a008 LREG1008PT Single-port 1Gb Smart Ethernet Network Adapter
4c52 a009 LREG1009PT Single-port 2.5Gb Smart Ethernet Network Adapter
1002 Smart Network Adapter
+ 4c52 a006 LREG1006PT Single-port 1.2Gb Network Security Isolation Adapter
4c52 a007 LREG1007PT Quad-port 10Gb Smart Ethernet Network Adapter
1003 Smart Network Adapter
+ 1004 Smart Network Adapter
4c52 b010 LREG1010PF Single-port 10Gb FPGA Network Security Isolation Adapter
+ 4c52 b011 LREG1011PF Dual-port 10Gb FPGA Network Security Isolation Adapter
4c53 SBS Technologies
0000 PLUSTEST device
4c53 3000 PLUSTEST card (PC104+)
@@ -27770,6 +28032,7 @@
1028 04aa XPS 8300
1043 844d P8P67/P8H67 Series Motherboard
1734 11b9 Esprimo P510 D3171 motherboard
+ 17aa 3070 ThinkCentre M91p
8086 200d DH61CR motherboard
0101 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port
1028 04b2 Vostro 3350
@@ -27779,6 +28042,7 @@
1028 04aa XPS 8300
1043 0102 P8H67 Series Motherboard
1734 11b9 G640 [Sandy Bridge, HD Graphics] on Esprimo P510 D3171 motherboard
+ 17aa 3070 ThinkCentre M91p
0104 2nd Generation Core Processor Family DRAM Controller
1028 04a3 Precision M4600
1028 04b2 Vostro 3350
@@ -28393,7 +28657,10 @@
8086 8d08 NVMe Datacenter SSD [3DNAND] VE 2.5" U.2 (P5316)
8086 8d1d NVMe Datacenter SSD [3DNAND] VE E1.L 9.5/18mm (P5316)
8086 c008 NVMe Datacenter SSD [3DNAND] SE U.2 15mm (P5530)
+ 0b69 Ponte Vecchio XT (2 Tile) [Data Center GPU Max 1450]
+ 0b6e Ponte Vecchio XT (1 Tile) [Data Center GPU Max 1100C]
0bd0 Ponte Vecchio XL (2 Tile)
+ 0bd4 Ponte Vecchio XT (2 Tile) [Data Center GPU Max 1550VG]
0bd5 Ponte Vecchio XT (2 Tile) [Data Center GPU Max 1550]
0bd6 Ponte Vecchio XT (2 Tile) [Data Center GPU Max 1550]
0bd7 Ponte Vecchio XT (2 Tile) [Data Center GPU Max 1350]
@@ -29105,6 +29372,7 @@
10a9 8028 UV-BaseIO dual-port GbE
13a3 0037 DS4100 Secure Multi-Gigabit Server Adapter with Compression
15d9 a811 H8DGU
+ 4c52 9212 LREC9212PT Dual-port 10Gb Ethernet Network Adapter
8086 a01c Gigabit ET Dual Port Server Adapter
8086 a03c Gigabit ET Dual Port Server Adapter
8086 a04c Gigabit ET Dual Port Server Adapter
@@ -29122,6 +29390,7 @@
15d9 0605 X8SIL
15d9 060a X7SPA-H/X7SPA-HF Motherboard
15d9 060d C7SIM-Q Motherboard
+ 4c52 2201 LRES2201PT Single-port 1Gb Ethernet Network Adapter
8086 0001 Gigabit CT2 Desktop Adapter
8086 3578 Server Board S1200BTLR
8086 357a Server Board S1200BTS
@@ -29153,6 +29422,7 @@
8086 a02f Gigabit EF Dual Port Server Adapter
10e7 82576 Gigabit Network Connection
103c 31ff NC362i Integrated Dual Port BL-c Gigabit Server Adapter
+ 4c52 9701 LREC9701EF Single-port 1Gb Ethernet Network Adapter
10e8 82576 Gigabit Network Connection
8086 a02b Gigabit ET Quad Port Server Adapter
8086 a02c Gigabit ET Quad Port Server Adapter
@@ -29212,6 +29482,7 @@
1bd4 002f 10G SFP+ DP EP102Fi4A Adapter
1bd4 0032 10G SFP+ DP EP102Fi4 Adapter
1bd4 0067 F102I82599
+ 4c52 1024 LR-LINK LRES9804BF Quad-port 10Gb Ethernet Server Adapter
4c52 3002 LRES3002PF Dual-port 10Gb Ethernet Server Adapter for OCP
4c52 3012 LRES3012PF Dual-port 10Gb Ethernet Server Adapter for OCP
4c52 9801 LREC9801BF Single-port 10Gb Ethernet Server Adapter
@@ -29469,6 +29740,12 @@
12d2 Ethernet Controller E830-CC for QSFP
12d3 Ethernet Controller E830-CC for SFP
12d4 Ethernet Controller E830-CC for SFP-DD
+ 12d5 Ethernet Controller E830-C for backplane
+ 12d8 Ethernet Controller E830-C for QSFP
+ 12da Ethernet Controller E830-C for SFP
+ 12dc Ethernet Controller E830-XXV for backplane
+ 12dd Ethernet Controller E830-XXV for QSFP
+ 12de Ethernet Controller E830-XXV for SFP
1360 82806AA PCI64 Hub PCI Bridge
1361 82806AA PCI64 Hub Controller (HRes)
8086 1361 82806AA PCI64 Hub Controller (HRes)
@@ -29484,6 +29761,7 @@
1502 82579LM Gigabit Network Connection (Lewisville)
1028 04a3 Precision M4600
17aa 21ce ThinkPad T520
+ 17aa 3070 ThinkCentre M91p
8086 3578 Server Board S1200BTLR
8086 357a Server Board S1200BTS
1503 82579V Gigabit Network Connection
@@ -29567,10 +29845,18 @@
1bd4 008d ENFI1100-T4
4c52 0350 I350 1Gb 2-port Ethernet Network Adapter
4c52 1350 LREC9222HT Dual-port 1Gb Ethernet Network Adapter
+ 4c52 2003 LRES2003PT Dual-port 1Gb Ethernet Network Adapter
+ 4c52 2005 LRES2005PT Quad-port 1Gb Ethernet Network Adapter
+ 4c52 2006 LRES2006PT Six-port 1Gb Ethernet Network Adapter
+ 4c52 2008 LRES2008PT Eight-port 1Gb Ethernet Network Adapter
+ 4c52 2018 LRES2018PT Twelve-port 1Gb Ethernet Network Adapter
+ 4c52 2202 LRES2202PT Dual-port 1Gb Ethernet Network Adapter
+ 4c52 2217 LRES2217PT Dual-port 1Gb Ethernet Network Adapter
4c52 3010 LRES3010PF Dual-port 1Gb Ethernet Server Adapter for OCP
4c52 3023 LRES3023PT Quad-port 1Gb Ethernet Server Adapter for OCP
4c52 3041 LRES3041PT Dual-port 1Gb Ethernet Server Adapter for OCP
4c52 4006 LRES4006MT Quad-port 1Gb Ethernet Netwaork Adapter
+ 4c52 9712 LREC9712HT Dual-port 10Gb Ethernet Network Adapter
8086 0001 Ethernet Server Adapter I350-T4
8086 0002 Ethernet Server Adapter I350-T2
8086 0003 Ethernet Network Adapter I350-T4 for OCP NIC 3.0
@@ -29585,6 +29871,11 @@
1522 I350 Gigabit Fiber Network Connection
108e 7b17 Quad Port GbE PCIe 2.0 ExpressModule, MMF
108e 7b19 Dual Port GbE PCIe 2.0 Low Profile Adapter, MMF
+ 4c52 1006 LRES1006PF Six-port 1Gb Ethernet Network Adapter
+ 4c52 2203 LRES2203PF Dual-port 1Gb Ethernet Network Adapter
+ 4c52 9710 LREC9710HF Single-port 1Gb Ethernet Network Adapter
+ 4c52 9712 LREC9712HF Dual-port 1Gb Ethernet Network Adapter
+ 4c52 9714 LREC9714HF Quad-port 1Gb Ethernet Network Adapter
8086 0002 Ethernet Server Adapter I350-T2
8086 0003 Ethernet Server Adapter I350-F4
8086 0004 Ethernet Server Adapter I350-F2
@@ -29599,6 +29890,7 @@
103c 18d1 Ethernet 1Gb 2-port 361FLB Adapter
103c 1989 Ethernet 1Gb 2-port 363i Adapter
103c 339f Ethernet 1Gb 4-port 366M Adapter
+ 4c52 9714 LREC9714HT Quad-port 10Gb Ethernet Network Adapter
8086 1f52 1GbE 4P I350 Mezz
1524 I350 Gigabit Connection
1525 82567V-4 Gigabit Network Connection
@@ -29624,6 +29916,7 @@
1bd4 001a 10G base-T DP ER102Ti3 Rack Adapter
1bd4 0033 10G base-T DP EP102Ti3 Adapter
1bd4 0034 10G base-T DP EP102Ti3A Adapter
+ 4c52 9802 LREC9802BT Dual-port 10Gb Ethernet Network Adapter
8086 0001 Ethernet Converged Network Adapter X540-T2
8086 0002 Ethernet Converged Network Adapter X540-T1
8086 001a Ethernet Converged Network Adapter X540-T2
@@ -29649,10 +29942,22 @@
17aa 1509 I210 Gigabit Network Connection
17aa 404d I210 PCIe 1Gb 1-Port RJ45 LOM
17aa 407a I210 PCIe 1Gb 1-Port RJ45 LOM
+ 4c52 1051 LRES1051PT Dual-port 1Gb Ethernet Network Adapter
4c52 1210 LREC9204CT Single-port 1Gb Ethernet Network Adapter
+ 4c52 2057 LRES2057PT Dual-port 1Gb Ethernet Network Adapter
+ 4c52 2206 LRES2206PT Single-port 1Gb Ethernet Network Adapter
+ 4c52 2210 LRES2210PT Single-port 1Gb Ethernet Network Adapter
+ 4c52 2211 LRES2211PT Single-port 1Gb Ethernet Network Adapter
+ 4c52 2214 LRES2214PT Single-port 1Gb Ethernet Network Adapter
+ 4c52 3002 LRES3002PT Dual-port 1Gb Ethernet Network Adapter
+ 4c52 3004 LRES3004PT Quad-port 1Gb Ethernet Network Adapter
8086 0001 Ethernet Server Adapter I210-T1
8086 0002 Ethernet Server Adapter I210-T1
1536 I210 Gigabit Fiber Network Connection
+ 4c52 2204 LRES2204PT Single-port 1Gb Ethernet Network Adapter
+ 4c52 2212 LRES2212PF Single-port 1Gb Ethernet Network Adapter
+ 4c52 2213 LRES2213PF Single-port 1Gb Ethernet Network Adapter
+ 4c52 6230 LREC6230PF Single-port 1Gb Ethernet Network Adapter
1537 I210 Gigabit Backplane Connection
1059 0110 T4005 1GbE interface
1059 0111 T4007 1GbE interface
@@ -29696,6 +30001,7 @@
8086 0001 Ethernet Server Bypass Adapter X520-SR2
8086 0002 Ethernet Server Bypass Adapter X520-LR2
1560 Ethernet Controller X540
+ 4c52 9801 LREC9801BT Single-port 10Gb Ethernet Network Adapter
1563 Ethernet Controller X550
1028 1fa8 Ethernet 10G 4P X550/I350 rNDC
1028 1fa9 Ethernet 10G 4P X550 rNDC
@@ -29710,6 +30016,8 @@
193d 1008 560T-B
193d 1009 560T-L
193d 1011 UN-NIC-ETH563T-sL-2P
+ 4c52 1025 LRES1025PT Dual-port 10Gb Ethernet Network Adapter
+ 4c52 9812 LREC9812BT Dual-port 10Gb Ethernet Network Adapter
8086 0001 Ethernet Converged Network Adapter X550-T2
8086 001a Ethernet Converged Network Adapter X550-T2
8086 001b Ethernet Server Adapter X550-T2 for OCP
@@ -29760,6 +30068,8 @@
4c52 3003 LRES3003PF Quad-port 10Gb Ethernet Server Adapter for OCP
4c52 3007 LRES3007PF Quad-port 10Gb Ethernet Server Adapter for OCP
4c52 3039 LRES3039PF Dual-port 10Gb Ethernet Server Adapter for OCP
+ 4c52 9804 LREC9804BF Quad-port 10Gb Ethernet Server Adapter
+ 4c52 9812 LREC9812BF Dual-port 10Gb Ethernet Server Adapter
8086 0000 Ethernet Converged Network Adapter X710
8086 0001 Ethernet Converged Network Adapter X710-4
8086 0002 Ethernet Converged Network Adapter X710-4
@@ -29815,6 +30125,7 @@
1137 0000 Ethernet Converged NIC XL710-QDA2
1137 013c Ethernet Converged NIC XL710-QDA2
4c52 3042 LRES3042PF Dual-port 40Gb Ethernet Server Adapter for OCP
+ 4c52 9902 LREC9902BF Dual-port 40Gb Ethernet Server Adapter
8086 0000 Ethernet Converged Network Adapter XL710-Q2
8086 0001 Ethernet Converged Network Adapter XL710-Q2
8086 0002 Ethernet Converged Network Adapter XL710-Q2
@@ -29822,6 +30133,7 @@
8086 0004 Ethernet Server Adapter XL710-Q2OCP
8086 0006 Ethernet Converged Network Adapter XL710-Q2
1584 Ethernet Controller XL710 for 40GbE QSFP+
+ 4c52 9901 LREC9901BF Single-port 40Gb Ethernet Server Adapter
8086 0000 Ethernet Converged Network Adapter XL710-Q1
8086 0001 Ethernet Converged Network Adapter XL710-Q1
8086 0002 Ethernet Converged Network Adapter XL710-Q1
@@ -29842,6 +30154,7 @@
1589 Ethernet Controller X710/X557-AT 10GBASE-T
108e 0000 Quad Port 10GBase-T Adapter
108e 7b1c Quad Port 10GBase-T Adapter
+ 4c52 9804 LREC9804BT Quad-port 10Gb Ethernet Network Adapter
8086 0000 Ethernet Converged Network Adapter X710-T
8086 0001 Ethernet Converged Network Adapter X710-T4
8086 0002 Ethernet Converged Network Adapter X710-T4
@@ -29918,6 +30231,7 @@
1137 02c3 E810XXVDA4 4x25/10 GbE SFP28 PCIe NIC
1137 02e9 E810XXVDA4TG 4x25/10 GbE SFP28 PCIe NIC
1137 02ea E810XXVDA4T 4x25/10 GbE SFP28 PCIe NIC
+ 4c52 1023 LRES1023PF Quad-port 25Gb Ethernet Server Adapter
4c52 3027 LRES3027PF Quad-port 25Gb Ethernet Server Adapter for OCP
8086 0002 Ethernet Network Adapter E810-L-2
8086 0005 Ethernet Network Adapter E810-XXV-4
@@ -29980,6 +30294,7 @@
15b6 DSL6540 USB 3.1 Controller [Alpine Ridge]
15b7 Ethernet Connection (2) I219-LM
15b8 Ethernet Connection (2) I219-V
+ 1462 7994 H110M ECO/GAMING
1462 7a72 H270 PC MATE
15b9 Ethernet Connection (3) I219-LM
15bb Ethernet Connection (7) I219-LM
@@ -30001,6 +30316,7 @@
8086 0001 Ethernet SDI Adapter FM10420-100GbE-QDA2
8086 0002 Ethernet SDI Adapter FM10840-MTP2
15d1 Ethernet Controller 10G X550T
+ 4c52 9811 LREC9811BT Single-port 10Gb Ethernet Network Adapter
8086 0002 Ethernet Converged Network Adapter X550-T1
8086 001b Ethernet Server Adapter X550-T1 for OCP
8086 0021 Ethernet Converged Network Adapter X550-T1
@@ -30037,9 +30353,11 @@
15ef JHL7540 Thunderbolt 3 Bridge [Titan Ridge DD 2018]
15f0 JHL7540 Thunderbolt 3 USB Controller [Titan Ridge DD 2018]
15f2 Ethernet Controller I225-LM
+ 4c52 2031 LRES2031PT Single-port 2.5Gb Ethernet Network Adapter
8086 0001 Ethernet Network Adapter I225-T1
8086 0002 Ethernet Network Adapter I225-T1
15f3 Ethernet Controller I225-V
+ 4c52 2031 LRES2031PT Single-port 2.5Gb Ethernet Network Adapter
8086 0003 Intel(R) Ethernet Controller (3) I225-V
15f4 Ethernet Connection (15) I219-LM
15f5 Ethernet Connection (15) I219-V
@@ -30057,6 +30375,7 @@
1137 02da Ethernet Network Adapter X710-T4L OCP 3.0
# NIC-ETH565T-3S-2P OCP3.0 2x10G Base-T Card
193d 1082 NIC-ETH565T-3S-2P
+ 4c52 1012 LRES1012PT Dual-port 10Gb Ethernet Network Adapter
4c52 3021 LRES3021PT Dual-port 10Gb Ethernet Server Adapter for OCP
8086 0000 Ethernet Network Adapter X710-TL
8086 0001 Ethernet Network Adapter X710-T4L
@@ -30133,10 +30452,18 @@
1898 Ethernet Connection E822-L for SFP
1899 Ethernet Connection E822-L/X557-AT 10GBASE-T
189a Ethernet Connection E822-L 1GbE
- 18a0 C4xxx Series QAT
+ 18a0 Atom Processor P5xxx Series QAT
18a1 C4XXX Series QAT Virtual Function
+ 18b3 Atom Processor P5xxx Series SATA Controller
+ 18d0 Atom Processor P5xxx Series USB xHCI Controller
+ 18d3 Atom Processor P5xxx Series MEI Controller
+ 18d6 Atom Processor P5xxx Series MEI Controller
+ 18df Atom Processor P5xxx Series SMBus Controller
+ 18e0 Atom Processor P5xxx Series SPI Controller
+ 18e1 Atom Processor P5xxx Series Trace Hub
18ee 200xx Series QAT
18ef 200xx Series QAT Virtual Function
+ 18f3 Atom Processor P5xxx Series SATA Controller
1900 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
1901 6th-10th Gen Core Processor PCIe Controller (x16)
1902 HD Graphics 510
@@ -30170,6 +30497,7 @@
1911 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
1028 0869 Vostro 3470
1028 09be Latitude 7410
+ 1462 7994 H110M ECO/GAMING
1462 7a72 H270 PC MATE
17aa 2247 ThinkPad T570
17aa 224f ThinkPad X1 Carbon 5th Gen
@@ -30300,6 +30628,9 @@
1b48 82597EX 10GbE Ethernet Controller
8086 a01f PRO/10GbE LR Server Adapter
8086 a11f PRO/10GbE LR Server Adapter
+# Also rebranded as Montage IOH M88IO3020
+ 1bcd Emmitsburg (C740 Family) USB 3.2 Gen 1 xHCI Controller
+ 1bd4 00a5 RS0800I5H16i
1bd2 Sapphire Rapids SATA AHCI Controller
1bf2 Sapphire Rapids SATA AHCI Controller
1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3)
@@ -30307,6 +30638,7 @@
1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller
1028 04aa XPS 8300
1043 844d P8 series motherboard
+ 17aa 3070 ThinkCentre M91p
8086 200d DH61CR motherboard
8086 7270 Server Board S1200BT Family
1c03 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller
@@ -30358,6 +30690,7 @@
1043 8418 P8P67 Deluxe Motherboard
1043 841b P8H67 Series Motherboard
17aa 21cf ThinkPad T520
+ 17aa 3070 ThinkCentre M91p
# Realtek ALC888 audio codec
8086 2008 DQ67SW board
8086 200d DH61CR motherboard
@@ -30369,6 +30702,7 @@
1028 04da Vostro 3750
1043 844d P8 series motherboard
17aa 21cf ThinkPad T520
+ 17aa 3070 ThinkCentre M91p
8086 200d DH61CR motherboard
8086 7270 Server Board S1200BT Family / Apple MacBook Pro 8,1/8,2
1c24 6 Series/C200 Series Chipset Family Thermal Management Controller
@@ -30380,6 +30714,7 @@
1028 04da Vostro 3750
1043 844d P8 series motherboard
17aa 21cf ThinkPad T520
+ 17aa 3070 ThinkCentre M91p
8086 200d DH61CR motherboard
8086 7270 Server Board S1200BT Family / Apple MacBook Pro 8,1/8,2
1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1
@@ -30393,22 +30728,26 @@
1028 04da Vostro 3750
1043 844d P8 series motherboard
17aa 21cf ThinkPad T520
+ 17aa 3070 ThinkCentre M91p
8086 200d DH61CR motherboard
8086 7270 Server Board S1200BT Family / Apple MacBook Pro 8,1/8,2
1c33 6 Series/C200 Series Chipset Family LAN Controller
1c35 6 Series/C200 Series Chipset Family VECI Controller
1c3a 6 Series/C200 Series Chipset Family MEI Controller #1
+ 1028 0493 Latitude E6420
1028 04a3 Precision M4600
1028 04aa XPS 8300
1028 04b2 Vostro 3350
1028 04da Vostro 3750
1043 844d P8 series motherboard
17aa 21cf ThinkPad T520
+ 17aa 3070 ThinkCentre M91p
8086 200d DH61CR motherboard
8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011]
1c3b 6 Series/C200 Series Chipset Family MEI Controller #2
1c3c 6 Series/C200 Series Chipset Family IDE-r Controller
1c3d 6 Series/C200 Series Chipset Family KT Controller
+ 17aa 3070 ThinkCentre M91p
1c40 6 Series/C200 Series Chipset Family LPC Controller
1c41 Mobile SFF 6 Series Chipset Family LPC Controller
1c42 6 Series/C200 Series Chipset Family LPC Controller
@@ -30430,6 +30769,7 @@
1c4c Q65 Express Chipset LPC Controller
1c4d QS67 Express Chipset LPC Controller
1c4e Q67 Express Chipset LPC Controller
+ 17aa 3070 ThinkCentre M91p
1c4f QM67 Express Chipset LPC Controller
1028 04a3 Precision M4600
17aa 21cf ThinkPad T520
@@ -31053,6 +31393,7 @@
1028 0211 Optiplex 755
1028 02da OptiPlex 980
1028 04f7 PowerEdge R320 server
+ 103c 130a Z600 Workstation
103c 2a3b Pavilion A1512X
103c 2a6f Asus IPIBL-LB Motherboard
103c 31fe ProLiant DL140 G3
@@ -31069,6 +31410,7 @@
15d9 9680 X7DBN Motherboard
1734 11d6 B75 [Ivy Bridge] chipset on Esprimo P510 D3171 motherboard
1775 11cc CC11/CL11
+ 17aa 3070 ThinkCentre M91p
8086 7270 Server Board S1200BTS
2450 82801E ISA Bridge (LPC)
2452 82801E USB Controller
@@ -34566,6 +34908,8 @@
4538 Elkhart Lake PCI-e Root Complex
4555 Elkhart Lake [UHD Graphics Gen11 16EU]
4571 Elkhart Lake [UHD Graphics Gen11 32EU]
+# Seems to be different than ID 4602
+ 4601 Alder Lake-U15 Host and DRAM Controller
4602 Alder Lake Host and DRAM Controller
460d 12th Gen Core Processor PCI Express x16 Controller #1
461d Alder Lake Innovation Platform Framework Processor Participant
@@ -34615,6 +34959,7 @@
46b0 AlderLake-P [Iris Xe Graphics]
46b1 AlderLake-P [Iris Xe Graphics]
46b3 Alder Lake-UP3 GT1 [UHD Graphics]
+ 1025 161d N22C6 [Extensa 15 EX215-55]
46b6 AlderLake-P [Iris Xe Graphics]
46b8 AlderLake-P [Iris Xe Graphics]
46ba AlderLake-P [Iris Xe Graphics]
@@ -34624,6 +34969,8 @@
46d0 Alder Lake-N [UHD Graphics]
46d1 Alder Lake-N [UHD Graphics]
46d2 Alder Lake-N [UHD Graphics]
+ 46d3 Alder Lake-N [Intel Graphics]
+ 46d4 Alder Lake-N [Intel Graphics]
4905 DG1 [Iris Xe MAX Graphics]
4906 DG1 [Iris Xe Pod]
4907 SG1 [Server GPU SG-18M]
@@ -34854,8 +35201,11 @@
56bb DG2 [Intel Graphics]
56bc DG2 [Intel Graphics]
56bd DG2 [Intel Graphics]
+ 56be DG2 [Arc Graphics A750E]
+ 56bf DG2 [Arc Graphics A580E]
56c0 ATS-M [Data Center GPU Flex 170]
56c1 ATS-M [Data Center GPU Flex 140]
+ 56c2 ATS-M [Data Center GPU Flex 170G]
5780 Thunderbolt 80/120G Bridge [Barlow Ridge Host 80G 2023]
5781 Thunderbolt 80/120G NHI [Barlow Ridge Host 80G 2023]
5782 Thunderbolt 80/120G USB Controller [Barlow Ridge Host 80G 2023]
@@ -34869,7 +35219,8 @@
579e Ethernet Connection E825-C for SFP
57a4 Thunderbolt Bridge [Barlow Ridge Hub 40G 2023]
57a5 Thunderbolt USB Controller [Barlow Ridge Hub 40G 2023]
- 57b1 Ethernet Controller E610 1GBASE T
+ 57b0 Ethernet Controller E610 10GBASE T
+ 57b1 Ethernet Controller E610 2.5GBASE T
8086 0000 Ethernet Converged Network Adapter E610
5845 QEMU NVM Express Controller
1af4 1100 QEMU Virtual Machine
@@ -34886,11 +35237,15 @@
590b HD Graphics 610
590c Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers
590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
1462 7a68 B250 KRAIT GAMING (MS-7A68)
1462 7a72 H270 PC MATE
5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers
5911 Xeon E3-1200 v6/7th Gen Core Processor Gaussian Mixture Model
5912 HD Graphics 630
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
1462 7a72 H270 PC MATE
5914 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers
17aa 225d ThinkPad T480
@@ -35271,11 +35626,11 @@
7ab4 Alder Lake-S PCH PCI Express Root Port #13
7ab8 Alder Lake-S PCH PCI Express Root Port #1
7ab9 Alder Lake-S PCH PCI Express Root Port #2
- 7aba Alder Lake-S PCH PCI Express Root Port #????
+ 7aba Alder Lake-S PCH PCI Express Root Port #3
7abc Alder Lake-S PCH PCI Express Root Port #5
7abd Alder Lake-S PCH PCI Express Root Port #6
7abf Alder Lake-S PCH PCI Express Root Port #8
- 7ac4 Alder Lake-S PCH PCI Express Root Port #????
+ 7ac4 Alder Lake-S PCH PCI Express Root Port #21
7ac8 Alder Lake-S PCH PCI Express Root Port #25
7acc Alder Lake-S PCH Serial IO I2C Controller #0
7acd Alder Lake-S PCH Serial IO I2C Controller #1
@@ -35294,11 +35649,12 @@
7d0b Volume Management Device NVMe RAID Controller Intel Corporation
7d1d Meteor Lake NPU
7d40 Meteor Lake-M [Intel Graphics]
+ 7d41 Arrow Lake-U [Intel Graphics]
7d45 Meteor Lake-P [Intel Graphics]
7d51 Arrow Lake-P [Intel Graphics]
7d55 Meteor Lake-P [Intel Arc Graphics]
7d60 Meteor Lake-M [Intel Graphics]
- 7d67 Arrow Lake [Intel Graphics]
+ 7d67 Arrow Lake-U [Intel Graphics]
7dd1 Arrow Lake-P [Intel Graphics]
7dd5 Meteor Lake-P [Intel Graphics]
7e01 Meteor Lake-P LPC/eSPI Controller
@@ -35310,6 +35666,8 @@
7e27 Meteor Lake-P Serial IO SPI Controller #0
7e28 Meteor Lake-P HD Audio Controller
7e30 Meteor Lake-P Serial IO SPI Controller #1
+ 7e40 Meteor Lake PCH CNVi WiFi
+ 8086 0094 Wi-Fi 6E AX211 160MHz
7e46 Meteor Lake-P Serial IO SPI Controller #2
7e50 Meteor Lake-P Serial IO I2C Controller #4
7e51 Meteor Lake-P Serial IO I2C Controller #5
@@ -36051,6 +36409,8 @@
8086 0244 Wi-Fi 6 AX101NGW
a0fc Tiger Lake-LP Integrated Sensor Hub
a102 Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode]
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
a103 HM170/QM170 Chipset SATA Controller [AHCI Mode]
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
@@ -36063,11 +36423,14 @@
a112 100 Series/C230 Series Chipset Family PCI Express Root Port #3
a113 100 Series/C230 Series Chipset Family PCI Express Root Port #4
a114 100 Series/C230 Series Chipset Family PCI Express Root Port #5
+ 1043 8694 H110I-PLUS Motherboard
a115 100 Series/C230 Series Chipset Family PCI Express Root Port #6
a116 100 Series/C230 Series Chipset Family PCI Express Root Port #7
a117 100 Series/C230 Series Chipset Family PCI Express Root Port #8
a118 100 Series/C230 Series Chipset Family PCI Express Root Port #9
+ 1043 8694 H110I-PLUS Motherboard
a119 100 Series/C230 Series Chipset Family PCI Express Root Port #10
+ 1043 8694 H110I-PLUS Motherboard
a11a 100 Series/C230 Series Chipset Family PCI Express Root Port #11
a11b 100 Series/C230 Series Chipset Family PCI Express Root Port #12
a11c 100 Series/C230 Series Chipset Family PCI Express Root Port #13
@@ -36078,10 +36441,14 @@
a121 100 Series/C230 Series Chipset Family Power Management Controller
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
a122 Sunrise Point-H cAVS
a123 100 Series/C230 Series Chipset Family SMBus
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
a124 100 Series/C230 Series Chipset Family SPI Controller
a125 100 Series/C230 Series Chipset Family Gigabit Ethernet Controller
a126 100 Series/C230 Series Chipset Family Trace Hub
@@ -36092,15 +36459,20 @@
a12f 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
a130 100 Series/C230 Series Chipset Family USB Device Controller (OTG)
a131 100 Series/C230 Series Chipset Family Thermal Subsystem
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
+ 1462 7994 H110M ECO/GAMING
a133 Sunrise Point-H Northpeak ACPI Function
a135 100 Series/C230 Series Chipset Family Integrated Sensor Hub
a13a 100 Series/C230 Series Chipset Family MEI Controller #1
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
a13b 100 Series/C230 Series Chipset Family MEI Controller #2
a13c 100 Series/C230 Series Chipset Family IDE Redirection
a13d 100 Series/C230 Series Chipset Family KT Redirection
@@ -36109,6 +36481,8 @@
a141 Sunrise Point-H LPC Controller
a142 Sunrise Point-H LPC Controller
a143 H110 Chipset LPC/eSPI Controller
+ 1043 8694 H110I-PLUS Motherboard
+ 1462 7994 H110M ECO/GAMING
a144 H170 Chipset LPC/eSPI Controller
a145 Z170 Chipset LPC/eSPI Controller
a146 Q170 Chipset LPC/eSPI Controller
@@ -36154,6 +36528,8 @@
a170 100 Series/C230 Series Chipset Family HD Audio Controller
1028 06e4 XPS 15 9550
103c 825b OMEN-17-w001nv
+ 1043 86c7 H110I-PLUS Motherboard
+ 1462 f994 H110M ECO/GAMING
a171 CM238 HD Audio Controller
a182 C620 Series Chipset Family SATA Controller [AHCI mode]
a186 C620 Series Chipset Family SATA Controller [RAID mode]
@@ -36296,6 +36672,7 @@
1028 0869 Vostro 3470
a305 Z390 Chipset LPC/eSPI Controller
a306 Q370 Chipset LPC/eSPI Controller
+ a308 300 Series Chipset Family LPC Controller
a309 Cannon Point-LP LPC Controller
a30c QM370 Chipset LPC/eSPI Controller
a30d HM470 Chipset LPC/eSPI Controller
@@ -36366,10 +36743,12 @@
a3eb Comet Lake PCI Express Root Port #21
a3f0 Comet Lake PCH-V cAVS
a620 6400/6402 Advanced Memory Buffer (AMB)
+ a703 Raptor Lake-S Host Bridge/DRAM Controller
a706 Raptor Lake-P 6p+8e cores Host Bridge/DRAM Controller
1028 0c06 Precision 3580
a707 Raptor Lake-P/U 4p+8e cores Host Bridge/DRAM Controller
a708 Raptor Lake-P/U 2p+8e cores Host Bridge/DRAM Controller
+ a70d Raptor Lake PCI Express 5.0 Graphics Port (PEG010)
a71d Raptor Lake Dynamic Platform and Thermal Framework Processor Participant
1028 0c06 Precision 3580
a71e Raptor Lake-P Thunderbolt 4 USB Controller
@@ -36435,6 +36814,7 @@
abc0 Omni-Path Fabric Switch Silicon 100 Series
ad0b Volume Management Device NVMe RAID Controller Intel Corporation
ad1d Arrow Lake NPU
+ b03e Panther Lake NPU
b152 21152 PCI-to-PCI Bridge
8086 b152 21152 PCI-to-PCI Bridge
# observed, and documented in Intel revision note; new mask of 1011:0026
@@ -36526,9 +36906,10 @@
8088 0420 Qual-Port Ethernet Network Adaptor SF400HT-S
0109 WX1860-LC Gigabit Ethernet Controller
010a WX1860A1 Gigabit Ethernet Controller
- 4c52 2023 LRES2034PT Single-port 1Gb Ethernet Network Adapter
4c52 2026 LRES2026PF Single-port 1Gb Ethernet Network Adapter
+ 4c52 2034 LRES2034PT Single-port 1Gb Ethernet Network Adapter
010b WX1860AL1 Gigabit Ethernet Controller
+ 4c52 2215 LRES2215PT Single-port 1Gb Ethernet Network Adapter
8088 0102 Single-Port Ethernet Network Adaptor SF100HT
8088 4102 Single-Port Ethernet Network Adaptor SF100HT (WOL)
8088 8102 Single-Port Ethernet Network Adaptor SF100HT (NCSI)
@@ -36541,7 +36922,7 @@
011a WX1860A1 Gigabit Ethernet Controller Virtual Function
011b WX1860AL1 Gigabit Ethernet Controller Virtual Function
1000 Ethernet Controller RP1000 Virtual Function for 10GbE SFP+
- 1001 Ethernet Controller RP1000 for 10GbE SFP+
+ 1001 Ethernet Controller SP1000A for 10GbE SFP+
1bd4 0084 Ethernet Controller SP1000A for 10GbE SFP+(lldp)
1bd4 0085 Ethernet Controller SP1000A for 10GBASE-T
4c52 1002 LRES1002PF Dual-port 10Gb Ethernet Server Adapter
@@ -36551,7 +36932,7 @@
8088 0300 Ethernet Network Adaptor RP1000-A03 for 10GbE SFP+
8088 0400 Ethernet Network Adaptor RP1000-A04 for 10GbE SFP+
2000 Ethernet Controller RP2000 Virtual Function for 10GbE SFP+
- 2001 Ethernet Controller RP2000 for 10GbE SFP+
+ 2001 Ethernet Controller WX1820AL for 10GbE SFP+
8088 2000 Ethernet Network Adaptor RP2000 for 10GbE SFP+
8088 2300 Ethernet Network Adaptor RP2000-A03 for 10GbE SFP+
8088 2400 Ethernet Network Adaptor RP2000-A04 for 10GbE SFP+
@@ -36574,6 +36955,7 @@
# Wuxi Micro Innovation Integrated Circuit Design Co.,Ltd.
8848 MUCSE
1000 Ethernet Controller N10 Series for 10GbE or 40GbE (Dual-port)
+ 4c52 3032 LRES3032PF Dual-port 10Gb Ethernet Server Adapter for OCP
8848 8410 Ethernet Network Adapter N10G-X2-DC for 10GbE SFP+ 2-port
1001 Ethernet Controller N400 Series for 1GbE (Dual-port)
1003 Ethernet Controller N400 Series for 10GbE (Single-port)
@@ -36591,12 +36973,18 @@
1081 Ethernet Controller N400 Series Virtual Function
1083 Ethernet Controller N400 Series Virtual Function
8308 Ethernet Controller N500 Series for 1GbE (Quad-port, Copper RJ45)
+# NIC-ETH3M0T-3S-4P Quad-Port RJ45 Adapter for OCP 3.0
+ 193d 1088 NIC-ETH3M0T-3S-4P
4c52 1048 LRES1048PT Quad-port 1Gb Ethernet Network Adapter
+ 4c52 3044 LRES3044PT Quad-port 1Gb Ethernet Server Adapter for OCP
8309 Ethernet Controller N500 Series Virtual Function
8318 Ethernet Controller N500 Series for 1GbE (Dual-port, Copper RJ45)
4c52 1049 LRES1049PT Dual-port 1Gb Ethernet Network Adapter
+ 4c52 3043 LRES3043PT Dual-port 1Gb Ethernet Server Adapter for OCP
8866 T-Square Design Inc.
8888 Silicon Magic
+# 4 port HDMI capture card
+ 8504 AVMatrix VC42
8912 TRX
# 8c4a is not Winbond but there is a board misprogrammed
8c4a Winbond
@@ -37174,6 +37562,9 @@
2001 STAR2000E NVMe SSD
2002 STAR2000C NVMe SSD
2003 STAR2000L NVMe SSD
+ 2004 EAST 2000K SSD
+ 2008 STAR2008 PCIE NVMe SSD Controller
+ 2010 STAR2010 PCIE NVMe Secure SSD Controller
bb5b Asgard AN3+ NVMe SSD
fc22 Asgard AN3+ NVMe SSD
a000 Asix Electronics Corporation (Wrong ID)
@@ -37271,6 +37662,7 @@ c0a9 Micron/Crucial Technology
5412 P5 NVMe PCIe SSD[SlashP5]
5415 T500 NVMe PCIe SSD
5419 T700 NVMe PCIe SSD
+ 5421 P3 Plus NVMe PCIe SSD (DRAM-less)
c0de Motorola
c0fe Motion Engineering, Inc.
ca01 I-TEK OptoElectronics Co., LTD.
@@ -37535,6 +37927,11 @@ edd8 ARK Logic Inc
f043 ASUSTeK Computer Inc. (Wrong ID)
f05b Foxconn International, Inc. (Wrong ID)
f111 Framework Computer Inc.
+f117 Cerio
+ 1000 Emulated PCIe Switch
+ 1010 Placeholder Device
+ 1020 Pseudo-Device
+ 1030 Test Device
f15e SiFive, Inc.
0000 FU740-C000 RISC-V SoC PCI Express x8 to AXI4 Bridge
f1d0 AJA Video
diff --git a/share/misc/usb_vendors b/share/misc/usb_vendors
index 74a0cef04aa3..a1e3ea4acd1d 100644
--- a/share/misc/usb_vendors
+++ b/share/misc/usb_vendors
@@ -9,8 +9,8 @@
# The latest version can be obtained from
# http://www.linux-usb.org/usb.ids
#
-# Version: 2024.01.30
-# Date: 2024-01-30 20:34:02
+# Version: 2024.03.18
+# Date: 2024-03-18 20:34:02
#
# Vendors, devices and interfaces. Please keep sorted.
@@ -209,6 +209,7 @@
0012 DeskJet 1125C Printer Port
0024 KU-0316 Keyboard
002a LaserJet P1102
+ 0036 CCID Smartcard Keyboard KUS0133
0053 DeskJet 2620 All-in-One Printer
0101 ScanJet 4100c
0102 PhotoSmart S20
@@ -2401,6 +2402,7 @@
02ea Xbox One Controller
02fd Xbox One S Controller [Bluetooth]
02fe Xbox Wireless Adapter for Windows
+ 0306 Surface Pro 7 SD Card Reader
0400 Windows Powered Pocket PC 2002
0401 Windows Powered Pocket PC 2002
0402 Windows Powered Pocket PC 2002
@@ -5049,6 +5051,7 @@
072d Revio KD410Z
04ca Lite-On Technology Corp.
0020 USB Keyboard
+ 003a Multimedia Keyboard
004b Keyboard
004f SK-9020 keyboard
008a Acer Wired Mouse Model SM-9023
@@ -8243,6 +8246,7 @@
1093 Rugged
1094 Rugged THB
1095 Rugged
+ 1105 Mobile Drive (RLSD: 2022)
a601 HardDrive
a602 CD R/W
05a0 Vetronix Corp.
@@ -9283,6 +9287,8 @@
# typo?
4004 Minolta Dimage Scan Elite II AF-2920 (2888)
0639 Chrontel, Inc.
+ 7213 CH7213
+ 7231 CH7213
063a Techwin Corp.
063b Taugagreining HF
063c Yamaichi Electronics Co., Ltd (Sakura)
@@ -11443,6 +11449,7 @@
0826 Data Transit
0827 BroadLogic, Inc.
0828 Sato Corp.
+ a003 WS408 Label Printer
0829 DirecTV Broadband, Inc. (Telocity)
082d Handspring
0100 Visor
@@ -12081,6 +12088,12 @@
04b2 NC interface
04b3 keyboard front panel Cockpit
04b4 SCR_CCID
+ 04b5 Camera
+ 04b6 Cockpit Touchkeypad
+ 04b7 Cockpit Touchkeypad Bootloader
+ 04b8 MediSET USB4-W
+ 04b9 MediSET USB4-R
+ 04ba MediSET USB4-G
2701 ShenZhen SANZHAI Technology Co.,Ltd Spy Pen VGA
0909 Audio-Technica Corp.
001b ATR2100-USB
@@ -12188,6 +12201,7 @@
4cda Fenix 6 Sapphire
4cdb Fenix 6
0920 Echelon Co.
+ 5550 U60 FT Network Interface
7500 Network Interface
0921 GoHubs, Inc.
1001 GoCOM232 Serial
@@ -12406,6 +12420,7 @@
010f nanoKONTROL studio controller
0117 nanoKONTROL2 MIDI Controller
012f SQ-1
+ 0203 KRONOS
0f03 K-Series K61P MIDI studio controller
0945 Pasco Scientific
0948 Kronauer music in digital
@@ -12477,7 +12492,8 @@
7140 T124 [Tegra K1/Logan 32-bit]
7210 SHIELD Controller
7321 Switch [Tegra Erista] recovery mode
- 7423 T234 [Orin NX] recovery mode
+ 7323 T234 [Orin NX 16GB] recovery mode
+ 7423 T234 [Orin NX 8GB] recovery mode
7721 T210 [TX1 Tegra Erista] recovery mode
7820 T20 [Tegra 2] recovery mode
7c18 T186 [TX2 Tegra Parker] recovery mode
@@ -12678,6 +12694,8 @@
09d8 ELATEC GmbH
0320 TWN3 Multi125
0406 TWN4 MIFARE NFC
+ 0410 TWN4 HID
+ 0420 TWN4 CDC
09d9 KRF Tech, Ltd
09da A4Tech Co., Ltd.
0006 Optical Mouse WOP-35 / Trust 450L Optical Mouse
@@ -12686,6 +12704,7 @@
0018 Trust Human Interface Device
001a Wireless Mouse & RXM-15 Receiver
002a Wireless Optical Mouse NB-30
+ 0103 Oscar X-710BK Gaming Mouse
022b Wireless Mouse (Battery Free)
024f RF Receiver and G6-20D Wireless Optical Mouse
0260 KV-300H Isolation Keyboard
@@ -12693,12 +12712,16 @@
09da Bloody V8 Mouse
1068 Bloody A90 Mouse
112c Bloody V5 Mouse
+ 2268 Keyboard (FK11)
+ 2690 PK-635G
3a60 Bloody V8M Core 2 Mouse
8090 X-718BK Oscar Optical Gaming Mouse
9033 X-718BK Optical Mouse
9066 F3 V-Track Gaming Mouse
- 9090 XL-730K / XL-750BK / XL-755BK Mice
+ 9090 XL-730K / XL-747H / XL-750BK / XL-755BK Mice
f613 Bloody V7M Mouse
+ f6cc B314 Light Strike Gaming Keyboard
+ fa44 B930 Light Strike RGB Mechanical Gaming Keyboard
09db Measurement Computing Corp.
0075 MiniLab 1008
0076 PMD-1024
@@ -12715,11 +12738,13 @@
09e6 Silutia, Inc.
09e7 Real 3D, Inc.
09e8 AKAI Professional M.I. Corp.
+ 0029 APC40 mkII
0045 MPK Mini Mk II MIDI Controller
0062 MPD16 MIDI Pad Controller Unit
006d EWI electronic wind instrument
0071 MPK25 MIDI Keyboard
0076 LPK25 MIDI Keyboard
+ 007c MPK Mini MIDI Controller
09e9 Chen-Source, Inc.
09eb IM Networks, Inc.
4331 iRhythm Tuner Remote
@@ -12783,6 +12808,9 @@
1010 Bluetooth Device
1011 Bluetooth Device
1012 Bluetooth Device
+ 1243 CSRA64210 [TaoTronics Headset BH-22 in charging mode]
+ 4007 Mpow HC5 Headset in charging mode - HID / Mass Storage
+ 4010 Mpow HC5 Headset in charging mode - USB Hub
ffff USB Bluetooth Device in DFU State
0a13 Telebyte, Inc.
0a14 Spacelabs Medical, Inc.
@@ -12826,6 +12854,7 @@
0a35 Radikal Technologies
002a SAC - Software Assigned Controller
008a SAC Hub
+0a38 IRIS sa
0a39 Gilat Satellite Networks, Ltd
0a3a PentaMedia Co., Ltd
0163 KN-W510U 1.0 Wireless LAN Adapter
@@ -12950,6 +12979,7 @@
217f BCM2045B (BDC-2.1)
2198 Bluetooth 3.0 Device
219b Bluetooth 2.1 Device
+ 219c BCM2070 Bluetooth
21b1 HP Bluetooth Module
21b4 BCM2070 Bluetooth 2.1 + EDR
21b9 BCM2070 Bluetooth 2.1 + EDR
@@ -12973,6 +13003,7 @@
5802 BCM5880 Secure Applications Processor with fingerprint touch sensor
5803 BCM5880 Secure Applications Processor with secure keyboard
5804 BCM5880 Secure Applications Processor with fingerprint swipe sensor
+ 5832 BCM5880 Secure Applications Processor Smartcard reader
6300 Pirelli Remote NDIS Device
6410 BCM20703A1 Bluetooth 4.1 + LE
bd11 BCM4320 802.11bg Wireless Adapter
@@ -21442,6 +21473,8 @@
20a0 Clay Logic
0006 flirc
4107 GPF Crypto Stick V1.2
+ 4108 Nitrokey Pro
+ 4109 Nitrokey Storage
4123 IKALOGIC SCANALOGIC 2
414a MDE SPI Interface
415a OpenPilot
@@ -21450,7 +21483,16 @@
41e5 BlinkStick
4211 Nitrokey Start
4223 ATSAMD21 [castAR]
+ 4230 Nitrokey HSM
+ 4287 Nitrokey FIDO U2F
428d Electrosense wideband converter
+ 42b1 Nitrokey FIDO2
+ 42b2 Nitrokey 3A Mini/3A NFC/3C NFC
+ 42b4 Nitrokey Pro Bootloader
+ 42da MuteMe
+ 42dd Nitrokey 3A NFC Bootloader/3C NFC Bootloader
+ 42e8 Nitrokey 3A Mini Bootloader
+ 42ec RP2040 [PicoWifi]
20b1 XMOS Ltd
10ad XUSB Loader
f7d1 XTAG2 - JTAG Adapter
@@ -22171,7 +22213,7 @@
2581 Plug-up
1807 Generic HID Smartcard
1808 WinUSB Smartcard
- f1d0 FIDO U2F Security Key
+ f1d0 Nitrokey U2F
258d Sequans Communications
259a TriQuint Semiconductor
25a7 Areson Technology Corp
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 981d0b49df39..575b521bea55 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -97,6 +97,12 @@ LDFLAGS+= -Wl,-zretpolineplt
.endif
# LLD sensibly defaults to -znoexecstack, so do the same for BFD
LDFLAGS.bfd+= -Wl,-znoexecstack
+.if ${MK_BRANCH_PROTECTION} != "no"
+CFLAGS+= -mbranch-protection=standard
+.if ${MACHINE_ARCH} == "aarch64" && defined(BTI_REPORT_ERROR)
+LDFLAGS+= -Wl,-zbti-report=error
+.endif
+.endif
# Initialize stack variables on function entry
.if ${OPT_INIT_ALL} != "none"
diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk
index 38d53cc6bf30..18098c93605c 100644
--- a/share/mk/bsd.opts.mk
+++ b/share/mk/bsd.opts.mk
@@ -68,20 +68,21 @@ __DEFAULT_YES_OPTIONS = \
SSP \
TESTS \
TOOLCHAIN \
- UNDEFINED_VERSION \
WARNS \
WERROR
__DEFAULT_NO_OPTIONS = \
ASAN \
BIND_NOW \
+ BRANCH_PROTECTION \
CCACHE_BUILD \
CTF \
INSTALL_AS_USER \
PROFILE \
RETPOLINE \
STALE_STAGED \
- UBSAN
+ UBSAN \
+ UNDEFINED_VERSION
__DEFAULT_DEPENDENT_OPTIONS = \
MAKE_CHECK_USE_SANDBOX/TESTS \
@@ -102,6 +103,10 @@ __DEFAULT_NO_OPTIONS+= PIE
__DEFAULT_YES_OPTIONS+=PIE
.endif
+.if ${MACHINE_CPUARCH} != "aarch64"
+BROKEN_OPTIONS+= BRANCH_PROTECTION
+.endif
+
__SINGLE_OPTIONS = \
INIT_ALL
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index c546c4f0b680..74a653057bda 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -69,6 +69,12 @@ LDFLAGS+= -Wl,-zretpolineplt
.endif
# LLD sensibly defaults to -znoexecstack, so do the same for BFD
LDFLAGS.bfd+= -Wl,-znoexecstack
+.if ${MK_BRANCH_PROTECTION} != "no"
+CFLAGS+= -mbranch-protection=standard
+.if ${MACHINE_ARCH} == "aarch64" && defined(BTI_REPORT_ERROR)
+LDFLAGS+= -Wl,-zbti-report=error
+.endif
+.endif
# Initialize stack variables on function entry
.if ${OPT_INIT_ALL} != "none"
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index de91e00d8cc7..52c3d07746c7 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -294,11 +294,18 @@ CFLAGS.clang+= -Qunused-arguments
# but not yet.
CXXFLAGS.clang+= -Wno-c++11-extensions
+# XXX This should be defaulted to 2 when WITH_SSP is in use after further
+# testing and soak time.
+FORTIFY_SOURCE?= 0
.if ${MK_SSP} != "no"
# Don't use -Wstack-protector as it breaks world with -Werror.
SSP_CFLAGS?= -fstack-protector-strong
CFLAGS+= ${SSP_CFLAGS}
.endif # SSP
+.if ${FORTIFY_SOURCE} > 0
+CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE}
+CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE}
+.endif
# Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is
# enabled.
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index ebe788a346aa..0bde68ea443b 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -56,6 +56,7 @@ _INTERNALLIBS= \
netbsd \
ntp \
ntpevent \
+ nvmf \
openbsd \
opts \
parse \
@@ -599,6 +600,9 @@ LIBNV?= ${LIBNVDIR}/libnv${PIE_SUFFIX}.a
LIBISCSIUTILDIR= ${_LIB_OBJTOP}/lib/libiscsiutil
LIBISCSIUTIL?= ${LIBISCSIUTILDIR}/libiscsiutil${PIE_SUFFIX}.a
+LIBNVMFDIR= ${_LIB_OBJTOP}/lib/libnvmf
+LIBNVMF?= ${LIBNVMFDIR}/libnvmf${PIE_SUFFIX}.a
+
LIBTELNETDIR= ${_LIB_OBJTOP}/lib/libtelnet
LIBTELNET?= ${LIBTELNETDIR}/libtelnet${PIE_SUFFIX}.a
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 00405e3f934f..501df88cd776 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -303,7 +303,7 @@ __DEFAULT_YES_OPTIONS+=LLDB
__DEFAULT_NO_OPTIONS+=LLDB
.endif
# LIB32 is not supported on all 64-bit architectures.
-.if (${__T} == "amd64" || ${__T:Maarch64*} != "" || ${__T} == "powerpc64")
+.if (${__T:Maarch64*} != "" && ((defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} != "gcc") || (!defined(X_COMPILER_TYPE) && ${COMPILER_TYPE} != "gcc"))) || ${__T} == "amd64" || ${__T} == "powerpc64"
__DEFAULT_YES_OPTIONS+=LIB32
.else
BROKEN_OPTIONS+=LIB32
diff --git a/stand/Makefile.inc b/stand/Makefile.inc
index 13b3f2a1f418..391de6abc6d4 100644
--- a/stand/Makefile.inc
+++ b/stand/Makefile.inc
@@ -1,4 +1,7 @@
SUBDIR_PARALLEL= yes
+# Firmware may not be able to handle branch protection failures
+MK_BRANCH_PROTECTION= no
+
.include "defs.mk"
diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h
index b7d6e538f9be..79ce0b023b7a 100644
--- a/stand/common/bootstrap.h
+++ b/stand/common/bootstrap.h
@@ -54,7 +54,8 @@ bool interp_has_builtin_cmd(const char *cmd);
/* Called by interp.c for interp_*.c embedded interpreters */
int interp_include(const char *); /* Execute commands from filename */
-void interp_init(void); /* Initialize interpreater */
+void interp_preinit(void); /* Initialize interpreater execution engine */
+void interp_init(void); /* Initialize interpreater and run main script */
int interp_run(const char *); /* Run a single command */
/* interp_backslash.c */
diff --git a/stand/common/interp.c b/stand/common/interp.c
index c6ac01ea099b..5d20822e037d 100644
--- a/stand/common/interp.c
+++ b/stand/common/interp.c
@@ -60,6 +60,7 @@ interact(void)
* we need to switch interpreters.
*/
interp_identifier = bootprog_interp;
+ interp_preinit();
interp_init();
printf("\n");
diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c
index 854addb22d5c..388a20e319b3 100644
--- a/stand/common/interp_forth.c
+++ b/stand/common/interp_forth.c
@@ -337,12 +337,21 @@ bf_run(const char *line)
return (result);
}
+static bool preinit_run = false;
+
void
-interp_init(void)
+interp_preinit(void)
{
-
+ if (preinit_run)
+ return;
setenv("script.lang", "forth", 1);
bf_init();
+ preinit_run = true;
+}
+
+void
+interp_init(void)
+{
/* Read our default configuration. */
interp_include("/boot/loader.rc");
}
diff --git a/stand/common/interp_lua.c b/stand/common/interp_lua.c
index aa759aa99ec1..2a61bb9d04af 100644
--- a/stand/common/interp_lua.c
+++ b/stand/common/interp_lua.c
@@ -96,17 +96,21 @@ static const luaL_Reg loadedlibs[] = {
{NULL, NULL}
};
+static bool preinit_done = false;
+
void
-interp_init(void)
+interp_preinit(void)
{
lua_State *luap;
struct interp_lua_softc *softc = &lua_softc;
- const char *filename;
const luaL_Reg *lib;
lua_init_md_t **fnpp;
TSENTER();
+ if (preinit_done)
+ return;
+
setenv("script.lang", "lua", 1);
LDBG("creating context");
@@ -126,6 +130,21 @@ interp_init(void)
LUA_FOREACH_SET(fnpp)
(*fnpp)(luap);
+ preinit_done = true;
+
+ TSEXIT();
+}
+
+void
+interp_init(void)
+{
+ lua_State *luap;
+ struct interp_lua_softc *softc = &lua_softc;
+ const char *filename;
+
+ TSENTER();
+
+ luap = softc->luap;
filename = getenv("loader_lua");
if (filename == NULL)
filename = LOADER_LUA;
diff --git a/stand/common/interp_simple.c b/stand/common/interp_simple.c
index d675da0aa61e..437739a3bcc4 100644
--- a/stand/common/interp_simple.c
+++ b/stand/common/interp_simple.c
@@ -35,6 +35,11 @@
INTERP_DEFINE("simp");
void
+interp_preinit(void)
+{
+}
+
+void
interp_init(void)
{
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
index fd5069004dff..fb1c7d74eec1 100644
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -29,7 +29,7 @@ CWARNFLAGS.zfs_module.c += -Wno-unused-parameter
CWARNFLAGS.zfs_module.c += -Wno-unused-function
# architecture-specific loader code
-SRCS+= boot1.c proto.c self_reloc.c start.S ufs_module.c devpath.c
+SRCS+= boot1.c proto.c self_reloc.c start.S ufs_module.c
.if ${MK_LOADER_ZFS} != "no"
SRCS+= zfs_module.c
CFLAGS.zfs_module.c+= -I${ZFSSRC}
@@ -58,7 +58,6 @@ CFLAGS+= -DEFI_DEBUG
.PATH: ${EFISRC}/loader/arch/${MACHINE}
.PATH: ${EFISRC}/loader
.PATH: ${LDRSRC}
-.PATH: ${EFISRC}/libefi
CFLAGS+= -I${LDRSRC}
FILES= ${BOOT1}.efi
diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c
index 4a3219ef3017..2e28cf1ec460 100644
--- a/stand/efi/libefi/efi_console.c
+++ b/stand/efi/libefi/efi_console.c
@@ -126,14 +126,14 @@ int efi_cons_poll(void);
static void cons_draw_frame(teken_attr_t *);
struct console efi_console = {
- "efi",
- "EFI console",
- C_WIDEOUT,
- efi_cons_probe,
- efi_cons_init,
- efi_cons_putchar,
- efi_cons_getchar,
- efi_cons_poll
+ .c_name = "efi",
+ .c_desc = "EFI console",
+ .c_flags = C_WIDEOUT,
+ .c_probe = efi_cons_probe,
+ .c_init = efi_cons_init,
+ .c_out = efi_cons_putchar,
+ .c_in = efi_cons_getchar,
+ .c_ready = efi_cons_poll
};
/*
diff --git a/stand/efi/libefi/eficom.c b/stand/efi/libefi/eficom.c
index d5f3f07e083f..f1ce14eb50f8 100644
--- a/stand/efi/libefi/eficom.c
+++ b/stand/efi/libefi/eficom.c
@@ -390,10 +390,10 @@ static int
comc_init(int arg __unused)
{
if (comc_setup())
- return (CMD_OK);
+ return (0);
eficom.c_flags &= ~(C_ACTIVEIN | C_ACTIVEOUT);
- return (CMD_ERROR);
+ return (1);
}
static void
diff --git a/stand/efi/loader/arch/arm64/arm64.ldscript b/stand/efi/loader/arch/arm64/arm64.ldscript
index 18aead05cb49..889a1bafb9f7 100644
--- a/stand/efi/loader/arch/arm64/arm64.ldscript
+++ b/stand/efi/loader/arch/arm64/arm64.ldscript
@@ -68,7 +68,7 @@ SECTIONS
. = ALIGN(16);
.dynsym : { *(.dynsym) }
_edata = .;
- __data_size = . - __data_start;
+ __data_size = ABSOLUTE(. - __data_start);
/* Unused sections */
.interp : { *(.interp) }
diff --git a/stand/i386/libi386/comconsole.c b/stand/i386/libi386/comconsole.c
index b2d48b13a9f4..dc6bbcfe9806 100644
--- a/stand/i386/libi386/comconsole.c
+++ b/stand/i386/libi386/comconsole.c
@@ -140,8 +140,8 @@ comc_init(int arg)
if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) ==
(C_PRESENTIN | C_PRESENTOUT))
- return (CMD_OK);
- return (CMD_ERROR);
+ return (0);
+ return (1);
}
static void
diff --git a/stand/i386/libi386/nullconsole.c b/stand/i386/libi386/nullconsole.c
index b4ffd3e30789..2878512071ad 100644
--- a/stand/i386/libi386/nullconsole.c
+++ b/stand/i386/libi386/nullconsole.c
@@ -45,14 +45,13 @@ static int nullc_getchar(void);
static int nullc_ischar(void);
struct console nullconsole = {
- "nullconsole",
- "null port",
- 0,
- nullc_probe,
- nullc_init,
- nullc_putchar,
- nullc_getchar,
- nullc_ischar
+ .c_name = "nullconsole",
+ .c_desc = "null port",
+ .c_probe = nullc_probe,
+ .c_init = nullc_init,
+ .c_out = nullc_putchar,
+ .c_in = nullc_getchar,
+ .c_ready = nullc_ischar
};
static void
@@ -64,7 +63,7 @@ nullc_probe(struct console *cp)
static int
nullc_init(int arg)
{
- return(0);
+ return (0);
}
static void
@@ -75,11 +74,11 @@ nullc_putchar(int c)
static int
nullc_getchar(void)
{
- return(-1);
+ return (-1);
}
static int
nullc_ischar(void)
{
- return(0);
+ return (0);
}
diff --git a/stand/i386/libi386/spinconsole.c b/stand/i386/libi386/spinconsole.c
index 156eaf35e1c0..d4c22bdbb1c3 100644
--- a/stand/i386/libi386/spinconsole.c
+++ b/stand/i386/libi386/spinconsole.c
@@ -47,14 +47,13 @@ static int spinc_ischar(void);
extern struct console *consoles[];
struct console spinconsole = {
- "spinconsole",
- "spin port",
- 0,
- spinc_probe,
- spinc_init,
- spinc_putchar,
- spinc_getchar,
- spinc_ischar
+ .c_name = "spinconsole",
+ .c_desc = "spin port",
+ .c_probe = spinc_probe,
+ .c_init = spinc_init,
+ .c_out = spinc_putchar,
+ .c_in = spinc_getchar,
+ .c_ready = spinc_ischar
};
static struct console *parent = NULL;
@@ -72,7 +71,7 @@ static int
spinc_init(int arg)
{
- return(parent->c_init(arg));
+ return (parent->c_init(arg));
}
static void
@@ -98,12 +97,12 @@ static int
spinc_getchar(void)
{
- return(-1);
+ return (-1);
}
static int
spinc_ischar(void)
{
- return(0);
+ return (0);
}
diff --git a/stand/i386/libi386/textvidc.c b/stand/i386/libi386/textvidc.c
index 4b79f9fc66b3..1dd950bc4021 100644
--- a/stand/i386/libi386/textvidc.c
+++ b/stand/i386/libi386/textvidc.c
@@ -70,125 +70,124 @@ static int esc;
struct console textvidc = {
- "vidconsole",
- "internal video/keyboard",
- 0,
- vidc_probe,
- vidc_init,
- vidc_putchar,
- vidc_getchar,
- vidc_ischar
+ .c_name = "vidconsole",
+ .c_desc = "internal video/keyboard",
+ .c_probe = vidc_probe,
+ .c_init = vidc_init,
+ .c_out = vidc_putchar,
+ .c_in = vidc_getchar,
+ .c_ready = vidc_ischar
};
static void
vidc_probe(struct console *cp)
{
- /* look for a keyboard */
+ /* look for a keyboard */
#if KEYBOARD_PROBE
- if (probe_keyboard())
+ if (probe_keyboard())
#endif
- {
- cp->c_flags |= C_PRESENTIN;
- }
+ {
+ cp->c_flags |= C_PRESENTIN;
+ }
- /* XXX for now, always assume we can do BIOS screen output */
- cp->c_flags |= C_PRESENTOUT;
+ /* XXX for now, always assume we can do BIOS screen output */
+ cp->c_flags |= C_PRESENTOUT;
}
static int
vidc_init(int arg)
{
- int i;
+ int i;
- if (vidc_started && arg == 0)
- return (0);
- vidc_started = 1;
+ if (vidc_started && arg == 0)
+ return (0);
+ vidc_started = 1;
#ifdef TERM_EMU
- /* Init terminal emulator */
- end_term();
- get_pos(&curx, &cury);
- curs_move(&curx, &cury, curx, cury);
- fg_c = DEFAULT_FGCOLOR;
- bg_c = DEFAULT_BGCOLOR;
+ /* Init terminal emulator */
+ end_term();
+ get_pos(&curx, &cury);
+ curs_move(&curx, &cury, curx, cury);
+ fg_c = DEFAULT_FGCOLOR;
+ bg_c = DEFAULT_BGCOLOR;
#endif
- for (i = 0; i < 10 && vidc_ischar(); i++)
- (void)vidc_getchar();
- return (0); /* XXX reinit? */
+ for (i = 0; i < 10 && vidc_ischar(); i++)
+ (void)vidc_getchar();
+ return (0); /* XXX reinit? */
}
static void
vidc_biosputchar(int c)
{
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0xe00 | (c & 0xff);
- v86.ebx = 0x7;
- v86int();
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0xe00 | (c & 0xff);
+ v86.ebx = 0x7;
+ v86int();
}
static void
vidc_rawputchar(int c)
{
- int i;
+ int i;
- if (c == '\t') {
- int n;
+ if (c == '\t') {
+ int n;
#ifndef TERM_EMU
- int curx, cury;
+ int curx, cury;
- get_pos(&curx, &cury);
+ get_pos(&curx, &cury);
#endif
- n = 8 - ((curx + 8) % 8);
- for (i = 0; i < n; i++)
- vidc_rawputchar(' ');
- } else {
+ n = 8 - ((curx + 8) % 8);
+ for (i = 0; i < n; i++)
+ vidc_rawputchar(' ');
+ } else {
#ifndef TERM_EMU
- vidc_biosputchar(c);
+ vidc_biosputchar(c);
#else
- /* Emulate AH=0eh (teletype output) */
- switch(c) {
- case '\a':
- vidc_biosputchar(c);
- return;
- case '\r':
- curx = 0;
- curs_move(&curx, &cury, curx, cury);
- return;
- case '\n':
- cury++;
- if (cury > 24) {
- scroll_up(1, fg_c, bg_c);
- cury--;
- } else {
- curs_move(&curx, &cury, curx, cury);
- }
- return;
- case '\b':
- if (curx > 0) {
- curx--;
+ /* Emulate AH=0eh (teletype output) */
+ switch(c) {
+ case '\a':
+ vidc_biosputchar(c);
+ return;
+ case '\r':
+ curx = 0;
+ curs_move(&curx, &cury, curx, cury);
+ return;
+ case '\n':
+ cury++;
+ if (cury > 24) {
+ scroll_up(1, fg_c, bg_c);
+ cury--;
+ } else {
+ curs_move(&curx, &cury, curx, cury);
+ }
+ return;
+ case '\b':
+ if (curx > 0) {
+ curx--;
+ curs_move(&curx, &cury, curx, cury);
+ /* write_char(' ', fg_c, bg_c); XXX destructive(!) */
+ return;
+ }
+ return;
+ default:
+ write_char(c, fg_c, bg_c);
+ curx++;
+ if (curx > 79) {
+ curx = 0;
+ cury++;
+ }
+ if (cury > 24) {
+ curx = 0;
+ scroll_up(1, fg_c, bg_c);
+ cury--;
+ }
+ }
curs_move(&curx, &cury, curx, cury);
- /* write_char(' ', fg_c, bg_c); XXX destructive(!) */
- return;
- }
- return;
- default:
- write_char(c, fg_c, bg_c);
- curx++;
- if (curx > 79) {
- curx = 0;
- cury++;
- }
- if (cury > 24) {
- curx = 0;
- scroll_up(1, fg_c, bg_c);
- cury--;
- }
- }
- curs_move(&curx, &cury, curx, cury);
#endif
- }
+ }
}
/* Get cursor position on the screen. Result is in edx. Sets
@@ -198,13 +197,13 @@ void
get_pos(int *x, int *y)
{
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0x0300;
- v86.ebx = 0x0;
- v86int();
- *x = v86.edx & 0x00ff;
- *y = (v86.edx & 0xff00) >> 8;
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0300;
+ v86.ebx = 0x0;
+ v86int();
+ *x = v86.edx & 0x00ff;
+ *y = (v86.edx & 0xff00) >> 8;
}
#ifdef TERM_EMU
@@ -214,26 +213,26 @@ void
curs_move(int *_x, int *_y, int x, int y)
{
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0x0200;
- v86.ebx = 0x0;
- v86.edx = ((0x00ff & y) << 8) + (0x00ff & x);
- v86int();
- *_x = x;
- *_y = y;
- /* If there is ctrl char at this position, cursor would be invisible.
- * Make it a space instead.
- */
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0x0800;
- v86.ebx = 0x0;
- v86int();
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0200;
+ v86.ebx = 0x0;
+ v86.edx = ((0x00ff & y) << 8) + (0x00ff & x);
+ v86int();
+ *_x = x;
+ *_y = y;
+ /* If there is ctrl char at this position, cursor would be invisible.
+ * Make it a space instead.
+ */
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0800;
+ v86.ebx = 0x0;
+ v86int();
#define isvisible(c) (((c) >= 32) && ((c) < 255))
- if (!isvisible(v86.eax & 0x00ff)) {
- write_char(' ', fg_c, bg_c);
- }
+ if (!isvisible(v86.eax & 0x00ff)) {
+ write_char(' ', fg_c, bg_c);
+ }
}
/* Scroll up the whole window by a number of rows. If rows==0,
@@ -244,15 +243,15 @@ void
scroll_up(int rows, int fgcol, int bgcol)
{
- if (rows == 0)
- rows = 25;
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0x0600 + (0x00ff & rows);
- v86.ebx = (bgcol << 12) + (fgcol << 8);
- v86.ecx = 0x0;
- v86.edx = 0x184f;
- v86int();
+ if (rows == 0)
+ rows = 25;
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0600 + (0x00ff & rows);
+ v86.ebx = (bgcol << 12) + (fgcol << 8);
+ v86.ecx = 0x0;
+ v86.edx = 0x184f;
+ v86int();
}
/* Write character and attribute at cursor position. */
@@ -260,12 +259,12 @@ void
write_char(int c, int fgcol, int bgcol)
{
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0x0900 + (0x00ff & c);
- v86.ebx = (bgcol << 4) + fgcol;
- v86.ecx = 0x1;
- v86int();
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0900 + (0x00ff & c);
+ v86.ebx = (bgcol << 4) + fgcol;
+ v86.ecx = 0x1;
+ v86int();
}
/**************************************************************/
@@ -280,28 +279,28 @@ void
CD(void)
{
- get_pos(&curx, &cury);
- if (curx > 0) {
+ get_pos(&curx, &cury);
+ if (curx > 0) {
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0600;
+ v86.ebx = (bg_c << 4) + fg_c;
+ v86.ecx = (cury << 8) + curx;
+ v86.edx = (cury << 8) + 79;
+ v86int();
+ if (++cury > 24) {
+ end_term();
+ return;
+ }
+ }
v86.ctl = 0;
v86.addr = 0x10;
v86.eax = 0x0600;
v86.ebx = (bg_c << 4) + fg_c;
- v86.ecx = (cury << 8) + curx;
- v86.edx = (cury << 8) + 79;
+ v86.ecx = (cury << 8) + 0;
+ v86.edx = (24 << 8) + 79;
v86int();
- if (++cury > 24) {
- end_term();
- return;
- }
- }
- v86.ctl = 0;
- v86.addr = 0x10;
- v86.eax = 0x0600;
- v86.ebx = (bg_c << 4) + fg_c;
- v86.ecx = (cury << 8) + 0;
- v86.edx = (24 << 8) + 79;
- v86int();
- end_term();
+ end_term();
}
/* Absolute cursor move to args[0] rows and args[1] columns
@@ -311,12 +310,12 @@ void
CM(void)
{
- if (args[0] > 0)
- args[0]--;
- if (args[1] > 0)
- args[1]--;
- curs_move(&curx, &cury, args[1], args[0]);
- end_term();
+ if (args[0] > 0)
+ args[0]--;
+ if (args[1] > 0)
+ args[1]--;
+ curs_move(&curx, &cury, args[1], args[0]);
+ end_term();
}
/* Home cursor (left top corner) */
@@ -324,9 +323,9 @@ void
HO(void)
{
- argc = 1;
- args[0] = args[1] = 1;
- CM();
+ argc = 1;
+ args[0] = args[1] = 1;
+ CM();
}
/* Clear internal state of the terminal emulation code */
@@ -334,162 +333,162 @@ void
end_term(void)
{
- esc = 0;
- argc = -1;
+ esc = 0;
+ argc = -1;
}
/* Gracefully exit ESC-sequence processing in case of misunderstanding */
void
bail_out(int c)
{
- char buf[16], *ch;
- int i;
-
- if (esc) {
- vidc_rawputchar('\033');
- if (esc != '\033')
- vidc_rawputchar(esc);
- for (i = 0; i <= argc; ++i) {
- sprintf(buf, "%d", args[i]);
- ch = buf;
- while (*ch)
- vidc_rawputchar(*ch++);
+ char buf[16], *ch;
+ int i;
+
+ if (esc) {
+ vidc_rawputchar('\033');
+ if (esc != '\033')
+ vidc_rawputchar(esc);
+ for (i = 0; i <= argc; ++i) {
+ sprintf(buf, "%d", args[i]);
+ ch = buf;
+ while (*ch)
+ vidc_rawputchar(*ch++);
+ }
}
- }
- vidc_rawputchar(c);
- end_term();
+ vidc_rawputchar(c);
+ end_term();
}
static void
get_arg(int c)
{
- if (argc < 0)
- argc = 0;
- args[argc] *= 10;
- args[argc] += c - '0';
+ if (argc < 0)
+ argc = 0;
+ args[argc] *= 10;
+ args[argc] += c - '0';
}
/* Emulate basic capabilities of cons25 terminal */
void
vidc_term_emu(int c)
{
- static int ansi_col[] = {
- 0, 4, 2, 6, 1, 5, 3, 7,
- };
- int t;
- int i;
-
- switch (esc) {
- case 0:
- switch (c) {
+ static int ansi_col[] = {
+ 0, 4, 2, 6, 1, 5, 3, 7,
+ };
+ int t;
+ int i;
+
+ switch (esc) {
+ case 0:
+ switch (c) {
+ case '\033':
+ esc = c;
+ break;
+ default:
+ vidc_rawputchar(c);
+ break;
+ }
+ break;
+
case '\033':
- esc = c;
- break;
- default:
- vidc_rawputchar(c);
- break;
- }
- break;
+ switch (c) {
+ case '[':
+ esc = c;
+ args[0] = 0;
+ argc = -1;
+ break;
+ default:
+ bail_out(c);
+ break;
+ }
+ break;
- case '\033':
- switch (c) {
case '[':
- esc = c;
- args[0] = 0;
- argc = -1;
- break;
- default:
- bail_out(c);
- break;
- }
- break;
-
- case '[':
- switch (c) {
- case ';':
- if (argc < 0) /* XXX */
- argc = 0;
- else if (argc + 1 >= MAXARGS)
- bail_out(c);
- else
- args[++argc] = 0;
- break;
- case 'H':
- if (argc < 0)
- HO();
- else if (argc == 1)
- CM();
- else
- bail_out(c);
- break;
- case 'J':
- if (argc < 0)
- CD();
- else
- bail_out(c);
- break;
- case 'm':
- if (argc < 0) {
- fg_c = DEFAULT_FGCOLOR;
- bg_c = DEFAULT_BGCOLOR;
- }
- for (i = 0; i <= argc; ++i) {
- switch (args[i]) {
- case 0: /* back to normal */
- fg_c = DEFAULT_FGCOLOR;
- bg_c = DEFAULT_BGCOLOR;
- break;
- case 1: /* bold */
- fg_c |= 0x8;
- break;
- case 4: /* underline */
- case 5: /* blink */
- bg_c |= 0x8;
- break;
- case 7: /* reverse */
- t = fg_c;
- fg_c = bg_c;
- bg_c = t;
- break;
- case 22: /* normal intensity */
- fg_c &= ~0x8;
- break;
- case 24: /* not underline */
- case 25: /* not blinking */
- bg_c &= ~0x8;
- break;
- case 30: case 31: case 32: case 33:
- case 34: case 35: case 36: case 37:
- fg_c = ansi_col[args[i] - 30];
- break;
- case 39: /* normal */
- fg_c = DEFAULT_FGCOLOR;
- break;
- case 40: case 41: case 42: case 43:
- case 44: case 45: case 46: case 47:
- bg_c = ansi_col[args[i] - 40];
- break;
- case 49: /* normal */
- bg_c = DEFAULT_BGCOLOR;
- break;
+ switch (c) {
+ case ';':
+ if (argc < 0) /* XXX */
+ argc = 0;
+ else if (argc + 1 >= MAXARGS)
+ bail_out(c);
+ else
+ args[++argc] = 0;
+ break;
+ case 'H':
+ if (argc < 0)
+ HO();
+ else if (argc == 1)
+ CM();
+ else
+ bail_out(c);
+ break;
+ case 'J':
+ if (argc < 0)
+ CD();
+ else
+ bail_out(c);
+ break;
+ case 'm':
+ if (argc < 0) {
+ fg_c = DEFAULT_FGCOLOR;
+ bg_c = DEFAULT_BGCOLOR;
+ }
+ for (i = 0; i <= argc; ++i) {
+ switch (args[i]) {
+ case 0: /* back to normal */
+ fg_c = DEFAULT_FGCOLOR;
+ bg_c = DEFAULT_BGCOLOR;
+ break;
+ case 1: /* bold */
+ fg_c |= 0x8;
+ break;
+ case 4: /* underline */
+ case 5: /* blink */
+ bg_c |= 0x8;
+ break;
+ case 7: /* reverse */
+ t = fg_c;
+ fg_c = bg_c;
+ bg_c = t;
+ break;
+ case 22: /* normal intensity */
+ fg_c &= ~0x8;
+ break;
+ case 24: /* not underline */
+ case 25: /* not blinking */
+ bg_c &= ~0x8;
+ break;
+ case 30: case 31: case 32: case 33:
+ case 34: case 35: case 36: case 37:
+ fg_c = ansi_col[args[i] - 30];
+ break;
+ case 39: /* normal */
+ fg_c = DEFAULT_FGCOLOR;
+ break;
+ case 40: case 41: case 42: case 43:
+ case 44: case 45: case 46: case 47:
+ bg_c = ansi_col[args[i] - 40];
+ break;
+ case 49: /* normal */
+ bg_c = DEFAULT_BGCOLOR;
+ break;
+ }
+ }
+ end_term();
+ break;
+ default:
+ if (isdigit(c))
+ get_arg(c);
+ else
+ bail_out(c);
+ break;
}
- }
- end_term();
- break;
+ break;
+
default:
- if (isdigit(c))
- get_arg(c);
- else
bail_out(c);
- break;
+ break;
}
- break;
-
- default:
- bail_out(c);
- break;
- }
}
#endif
@@ -497,9 +496,9 @@ static void
vidc_putchar(int c)
{
#ifdef TERM_EMU
- vidc_term_emu(c);
+ vidc_term_emu(c);
#else
- vidc_rawputchar(c);
+ vidc_rawputchar(c);
#endif
}
@@ -507,26 +506,26 @@ static int
vidc_getchar(void)
{
- if (vidc_ischar()) {
- v86.ctl = 0;
- v86.addr = 0x16;
- v86.eax = 0x0;
- v86int();
- return (v86.eax & 0xff);
- } else {
- return (-1);
- }
+ if (vidc_ischar()) {
+ v86.ctl = 0;
+ v86.addr = 0x16;
+ v86.eax = 0x0;
+ v86int();
+ return (v86.eax & 0xff);
+ } else {
+ return (-1);
+ }
}
static int
vidc_ischar(void)
{
- v86.ctl = V86_FLAGS;
- v86.addr = 0x16;
- v86.eax = 0x100;
- v86int();
- return (!V86_ZR(v86.efl));
+ v86.ctl = V86_FLAGS;
+ v86.addr = 0x16;
+ v86.eax = 0x100;
+ v86int();
+ return (!V86_ZR(v86.efl));
}
#if KEYBOARD_PROBE
@@ -551,13 +550,16 @@ vidc_ischar(void)
static void
delay7(void)
{
- /*
- * I know this is broken, but no timer is available yet at this stage...
- * See also comments in `delay1ms()'.
- */
- inb(IO_DUMMY); inb(IO_DUMMY);
- inb(IO_DUMMY); inb(IO_DUMMY);
- inb(IO_DUMMY); inb(IO_DUMMY);
+ /*
+ * I know this is broken, but no timer is available yet at this stage...
+ * See also comments in `delay1ms()'.
+ */
+ inb(IO_DUMMY);
+ inb(IO_DUMMY);
+ inb(IO_DUMMY);
+ inb(IO_DUMMY);
+ inb(IO_DUMMY);
+ inb(IO_DUMMY);
}
/*
@@ -572,9 +574,9 @@ delay7(void)
static void
delay1ms(void)
{
- int i = 800;
- while (--i >= 0)
- (void)inb(0x84);
+ int i = 800;
+ while (--i >= 0)
+ (void)inb(0x84);
}
/*
@@ -588,55 +590,55 @@ delay1ms(void)
static int
probe_keyboard(void)
{
- int retry = PROBE_MAXRETRY;
- int wait;
- int i;
-
- while (--retry >= 0) {
- /* flush any noise */
- while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) {
- delay7();
- inb(IO_KBD + KBD_DATA_PORT);
- delay1ms();
- }
+ int retry = PROBE_MAXRETRY;
+ int wait;
+ int i;
+
+ while (--retry >= 0) {
+ /* flush any noise */
+ while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) {
+ delay7();
+ inb(IO_KBD + KBD_DATA_PORT);
+ delay1ms();
+ }
- /* wait until the controller can accept a command */
- for (wait = PROBE_MAXWAIT; wait > 0; --wait) {
- if (((i = inb(IO_KBD + KBD_STATUS_PORT))
- & (KBDS_INPUT_BUFFER_FULL | KBDS_ANY_BUFFER_FULL)) == 0)
- break;
- if (i & KBDS_ANY_BUFFER_FULL) {
- delay7();
- inb(IO_KBD + KBD_DATA_PORT);
- }
- delay1ms();
- }
- if (wait <= 0)
- continue;
+ /* wait until the controller can accept a command */
+ for (wait = PROBE_MAXWAIT; wait > 0; --wait) {
+ if (((i = inb(IO_KBD + KBD_STATUS_PORT))
+ & (KBDS_INPUT_BUFFER_FULL | KBDS_ANY_BUFFER_FULL)) == 0)
+ break;
+ if (i & KBDS_ANY_BUFFER_FULL) {
+ delay7();
+ inb(IO_KBD + KBD_DATA_PORT);
+ }
+ delay1ms();
+ }
+ if (wait <= 0)
+ continue;
- /* send the ECHO command */
- outb(IO_KBD + KBD_DATA_PORT, KBDC_ECHO);
+ /* send the ECHO command */
+ outb(IO_KBD + KBD_DATA_PORT, KBDC_ECHO);
- /* wait for a response */
- for (wait = PROBE_MAXWAIT; wait > 0; --wait) {
- if (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL)
- break;
- delay1ms();
- }
- if (wait <= 0)
- continue;
+ /* wait for a response */
+ for (wait = PROBE_MAXWAIT; wait > 0; --wait) {
+ if (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL)
+ break;
+ delay1ms();
+ }
+ if (wait <= 0)
+ continue;
- delay7();
- i = inb(IO_KBD + KBD_DATA_PORT);
+ delay7();
+ i = inb(IO_KBD + KBD_DATA_PORT);
#ifdef PROBE_KBD_BEBUG
- printf("probe_keyboard: got 0x%x.\n", i);
+ printf("probe_keyboard: got 0x%x.\n", i);
#endif
- if (i == KBD_ECHO) {
- /* got the right answer */
- return (1);
+ if (i == KBD_ECHO) {
+ /* got the right answer */
+ return (1);
+ }
}
- }
- return (0);
+ return (0);
}
#endif /* KEYBOARD_PROBE */
diff --git a/stand/kboot/kboot/arch/aarch64/aarch64.ldscript b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript
index 9460be1874bf..dd551247125b 100644
--- a/stand/kboot/kboot/arch/aarch64/aarch64.ldscript
+++ b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript
@@ -1,4 +1,4 @@
-OUTPUT_FORMAT("elf64-aarch64", "elf64-aarch64", "elf64-aarch64")
+OUTPUT_FORMAT("elf64-littleaarch64")
OUTPUT_ARCH(aarch64)
ENTRY(_start)
SECTIONS
diff --git a/stand/kboot/kboot/hostcons.c b/stand/kboot/kboot/hostcons.c
index 114188adcff2..9c09a2721891 100644
--- a/stand/kboot/kboot/hostcons.c
+++ b/stand/kboot/kboot/hostcons.c
@@ -35,14 +35,13 @@ static int hostcons_getchar(void);
static int hostcons_poll(void);
struct console hostconsole = {
- "host",
- "Host Console",
- 0,
- hostcons_probe,
- hostcons_init,
- hostcons_putchar,
- hostcons_getchar,
- hostcons_poll,
+ .c_name = "host",
+ .c_desc = "Host Console",
+ .c_probe = hostcons_probe,
+ .c_init = hostcons_init,
+ .c_out = hostcons_putchar,
+ .c_in = hostcons_getchar,
+ .c_ready = hostcons_poll,
};
static struct host_termios old_settings;
diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c
index e57446baa47d..994df1ec9fa1 100644
--- a/stand/kboot/kboot/main.c
+++ b/stand/kboot/kboot/main.c
@@ -342,25 +342,32 @@ main(int argc, const char **argv)
heapbase = host_getmem(heapsize);
setheap(heapbase, heapbase + heapsize);
- /* Parse the command line args -- ignoring for now the console selection */
- parse_args(argc, argv);
-
- parse_file("host:/kboot.conf");
-
/*
- * Set up console.
+ * Set up console so we get error messages.
*/
cons_probe();
+ /*
+ * Find acpi and smbios, if they exists. This allows command line and
+ * later scripts to override if necessary.
+ */
+ find_acpi();
+ find_smbios();
+
+ /* Parse the command line args -- ignoring for now the console selection */
+ parse_args(argc, argv);
+
+ hostfs_root = getenv("hostfs_root");
+ if (hostfs_root == NULL)
+ hostfs_root = "/";
+
/* Initialize all the devices */
devinit();
+ /* Figure out where we're booting from */
bootdev = getenv("bootdev");
if (bootdev == NULL)
bootdev = hostdisk_gen_probe();
- hostfs_root = getenv("hostfs_root");
- if (hostfs_root == NULL)
- hostfs_root = "/";
#if defined(LOADER_ZFS_SUPPORT)
if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) {
/*
@@ -394,13 +401,6 @@ main(int argc, const char **argv)
memory_limits();
enumerate_memory_arch();
- /*
- * Find acpi, if it exists
- */
- find_acpi();
-
- find_smbios();
-
interact(); /* doesn't return */
return (0);
diff --git a/stand/liblua/lutils.h b/stand/liblua/lutils.h
index ea715096df09..7fff8d3ae83d 100644
--- a/stand/liblua/lutils.h
+++ b/stand/liblua/lutils.h
@@ -34,7 +34,7 @@ int luaopen_pager(lua_State *);
#include <sys/linker_set.h>
typedef void lua_init_md_t(lua_State *);
-#define _LUA_COMPIE_SET Xlua_compile_set
+#define _LUA_COMPILE_SET Xlua_compile_set
#define LUA_COMPILE_SET(func) \
DATA_SET(_LUA_COMPILE_SET, func)
#define LUA_FOREACH_SET(s) \
diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c
index 5e3a789c13db..f6419632c6bc 100644
--- a/stand/libofw/devicename.c
+++ b/stand/libofw/devicename.c
@@ -101,12 +101,12 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path
idev = malloc(sizeof(struct ofw_devdesc));
if (idev == NULL) {
printf("ofw_parsedev: malloc failed\n");
- return ENOMEM;
+ return (ENOMEM);
};
strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1,
sizeof(idev->d_path)));
*dev = &idev->dd;
if (path != NULL)
*path = rem_path;
- return 0;
+ return (0);
}
diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c
index b0ead0aba198..6925641eb606 100644
--- a/stand/libofw/ofw_console.c
+++ b/stand/libofw/ofw_console.c
@@ -41,14 +41,13 @@ static ihandle_t stdin;
static ihandle_t stdout;
struct console ofwconsole = {
- "ofw",
- "Open Firmware console",
- 0,
- ofw_cons_probe,
- ofw_cons_init,
- ofw_cons_putchar,
- ofw_cons_getchar,
- ofw_cons_poll,
+ .c_name = "ofw",
+ .c_desc = "Open Firmware console",
+ .c_probe = ofw_cons_probe,
+ .c_init = ofw_cons_init,
+ .c_out = ofw_cons_putchar,
+ .c_in = ofw_cons_getchar,
+ .c_ready = ofw_cons_poll,
};
static void
@@ -63,7 +62,7 @@ ofw_cons_probe(struct console *cp)
static int
ofw_cons_init(int arg)
{
- return 0;
+ return (0);
}
void
@@ -91,7 +90,7 @@ ofw_cons_getchar(void)
if (saved_char != -1) {
l = saved_char;
saved_char = -1;
- return l;
+ return (l);
}
/* At least since version 4.0.0, QEMU became bug-compatible
@@ -110,12 +109,12 @@ ofw_cons_poll(void)
unsigned char ch;
if (saved_char != -1)
- return 1;
+ return (1);
if (OF_read(stdin, &ch, 1) > 0) {
saved_char = ch;
- return 1;
+ return (1);
}
- return 0;
+ return (0);
}
diff --git a/stand/libofw/ofw_copy.c b/stand/libofw/ofw_copy.c
index b855a5b41d96..17a46fe4e480 100644
--- a/stand/libofw/ofw_copy.c
+++ b/stand/libofw/ofw_copy.c
@@ -119,14 +119,14 @@ ofw_copyin(const void *src, vm_offset_t dest, const size_t len)
}
bcopy(src, (void *)dest, len);
- return(len);
+ return (len);
}
ssize_t
ofw_copyout(const vm_offset_t src, void *dest, const size_t len)
{
bcopy((void *)src, dest, len);
- return(len);
+ return (len);
}
ssize_t
@@ -143,7 +143,7 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len)
buf = malloc(chunk);
if (buf == NULL) {
printf("ofw_readin: buf malloc failed\n");
- return(0);
+ return (0);
}
if (ofw_mapmem(dest, len)) {
@@ -166,5 +166,5 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len)
}
free(buf);
- return(len - resid);
+ return (len - resid);
}
diff --git a/stand/libofw/ofw_module.c b/stand/libofw/ofw_module.c
index 8d56f6debbb6..4c1fe9cd279d 100644
--- a/stand/libofw/ofw_module.c
+++ b/stand/libofw/ofw_module.c
@@ -42,5 +42,5 @@ int
ofw_autoload(void)
{
/* XXX Call some machdep autoload routine? */
- return(0);
+ return (0);
}
diff --git a/stand/libofw/ofw_net.c b/stand/libofw/ofw_net.c
index b4bcb7a00fe2..3418216a9836 100644
--- a/stand/libofw/ofw_net.c
+++ b/stand/libofw/ofw_net.c
@@ -80,13 +80,13 @@ static void *dmabuf;
static int
ofwn_match(struct netif *nif, void *machdep_hint)
{
- return 1;
+ return (1);
}
static int
ofwn_probe(struct netif *nif, void *machdep_hint)
{
- return 0;
+ return (0);
}
static ssize_t
@@ -123,7 +123,7 @@ ofwn_put(struct iodesc *desc, void *pkt, size_t len)
printf("netif_put: OF_write returned %d\n", rv);
#endif
- return rv;
+ return (rv);
}
static ssize_t
@@ -256,13 +256,13 @@ ofwn_getunit(const char *path)
for (i = 0; i < nofwninfo; i++) {
printf(">>> test =\t%s\n", ofwninfo[i].ofwn_path);
if (strcmp(path, ofwninfo[i].ofwn_path) == 0)
- return i;
+ return (i);
if (strcmp(newpath, ofwninfo[i].ofwn_path) == 0)
- return i;
+ return (i);
}
- return -1;
+ return (-1);
}
#endif
diff --git a/stand/libofw/ofw_time.c b/stand/libofw/ofw_time.c
index c2da603bb52e..48372428ae29 100644
--- a/stand/libofw/ofw_time.c
+++ b/stand/libofw/ofw_time.c
@@ -35,7 +35,7 @@ time(time_t *tloc)
secs = OF_milliseconds() / 1000;
if (tloc)
*tloc = secs;
- return secs;
+ return (secs);
}
time_t
@@ -43,7 +43,7 @@ getsecs(void)
{
time_t n = 0;
time(&n);
- return n;
+ return (n);
}
void
diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c
index 60d6ccaf4417..b850a88c4018 100644
--- a/stand/uboot/uboot_console.c
+++ b/stand/uboot/uboot_console.c
@@ -37,14 +37,13 @@ static int uboot_cons_getchar(void);
static int uboot_cons_poll(void);
struct console uboot_console = {
- "uboot",
- "U-Boot console",
- 0,
- uboot_cons_probe,
- uboot_cons_init,
- uboot_cons_putchar,
- uboot_cons_getchar,
- uboot_cons_poll,
+ .c_name = "uboot",
+ .c_desc = "U-Boot console",
+ .c_probe = uboot_cons_probe,
+ .c_init = uboot_cons_init,
+ .c_out = uboot_cons_putchar,
+ .c_in = uboot_cons_getchar,
+ .c_ready = uboot_cons_poll,
};
static void
diff --git a/stand/userboot/test/test.c b/stand/userboot/test/test.c
index d4b7ed713336..22aaf8d7785a 100644
--- a/stand/userboot/test/test.c
+++ b/stand/userboot/test/test.c
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2011 Google, Inc.
+ * Copyright (c) 2023-2024 Juniper Networks, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,7 +36,9 @@
#include <fcntl.h>
#include <getopt.h>
#include <inttypes.h>
+#include <libgen.h>
#include <limits.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -44,6 +47,8 @@
#include <userboot.h>
+char **vars;
+
char *host_base = NULL;
struct termios term, oldterm;
char *image;
@@ -102,47 +107,164 @@ struct test_file {
} tf_u;
};
-int
-test_open(void *arg, const char *filename, void **h_return)
+static int
+test_open_internal(void *arg, const char *filename, void **h_return,
+ struct test_file *tf, int depth)
{
- struct stat st;
- struct test_file *tf;
char path[PATH_MAX];
+ char linkpath[PATH_MAX];
+ char *component, *cp, *linkptr;
+ ssize_t slen;
+ int comp_fd, dir_fd, error;
+ char c;
+ bool openbase;
+
+ if (depth++ >= MAXSYMLINKS)
+ return (ELOOP);
+
+ openbase = false;
+ error = EINVAL;
+ if (tf == NULL) {
+ tf = calloc(1, sizeof(struct test_file));
+ if (tf == NULL)
+ return (error);
+ openbase = true;
+ } else if (tf->tf_isdir) {
+ if (filename[0] == '/') {
+ closedir(tf->tf_u.dir);
+ openbase = true;
+ }
+ } else
+ return (error);
- if (!host_base)
- return (ENOENT);
-
- strlcpy(path, host_base, PATH_MAX);
- if (path[strlen(path) - 1] == '/')
- path[strlen(path) - 1] = 0;
- strlcat(path, filename, PATH_MAX);
- tf = malloc(sizeof(struct test_file));
- if (stat(path, &tf->tf_stat) < 0) {
- free(tf);
- return (errno);
- }
+ if (openbase) {
+ dir_fd = open(host_base, O_RDONLY);
+ if (dir_fd < 0)
+ goto out;
- tf->tf_size = st.st_size;
- if (S_ISDIR(tf->tf_stat.st_mode)) {
tf->tf_isdir = 1;
- tf->tf_u.dir = opendir(path);
- if (!tf->tf_u.dir)
+ tf->tf_u.dir = fdopendir(dir_fd);
+
+ if (fstat(dir_fd, &tf->tf_stat) < 0) {
+ error = errno;
goto out;
- *h_return = tf;
- return (0);
+ }
+ tf->tf_size = tf->tf_stat.st_size;
}
- if (S_ISREG(tf->tf_stat.st_mode)) {
- tf->tf_isdir = 0;
- tf->tf_u.fd = open(path, O_RDONLY);
- if (tf->tf_u.fd < 0)
+
+ strlcpy(path, filename, sizeof(path));
+ cp = path;
+ while (*cp) {
+ /*
+ * The test file should be a directory at this point.
+ * If it is not, then the caller provided an invalid filename.
+ */
+ if (!tf->tf_isdir)
+ goto out;
+
+ /* Trim leading slashes */
+ while (*cp == '/')
+ cp++;
+
+ /* If we reached the end, we are done */
+ if (*cp == '\0')
+ break;
+
+ /* Get the file descriptor for the directory */
+ dir_fd = dirfd(tf->tf_u.dir);
+
+ /* Get the next component path */
+ component = cp;
+ while ((c = *cp) != '\0' && c != '/')
+ cp++;
+ if (c == '/')
+ *cp++ = '\0';
+
+ /* Get status of the component */
+ if (fstatat(dir_fd, component, &tf->tf_stat,
+ AT_SYMLINK_NOFOLLOW) < 0) {
+ error = errno;
goto out;
- *h_return = tf;
- return (0);
+ }
+ tf->tf_size = tf->tf_stat.st_size;
+
+ /*
+ * Check that the path component is a directory, regular file,
+ * or a symlink.
+ */
+ if (!S_ISDIR(tf->tf_stat.st_mode) &&
+ !S_ISREG(tf->tf_stat.st_mode) &&
+ !S_ISLNK(tf->tf_stat.st_mode))
+ goto out;
+
+ /* For anything that is not a symlink, open it */
+ if (!S_ISLNK(tf->tf_stat.st_mode)) {
+ comp_fd = openat(dir_fd, component, O_RDONLY);
+ if (comp_fd < 0)
+ goto out;
+ }
+
+ if (S_ISDIR(tf->tf_stat.st_mode)) {
+ /* Directory */
+
+ /* close the parent directory */
+ closedir(tf->tf_u.dir);
+
+ /* Open the directory from the component descriptor */
+ tf->tf_isdir = 1;
+ tf->tf_u.dir = fdopendir(comp_fd);
+ if (!tf->tf_u.dir)
+ goto out;
+ } else if (S_ISREG(tf->tf_stat.st_mode)) {
+ /* Regular file */
+
+ /* close the parent directory */
+ closedir(tf->tf_u.dir);
+
+ /* Stash the component descriptor */
+ tf->tf_isdir = 0;
+ tf->tf_u.fd = comp_fd;
+ } else if (S_ISLNK(tf->tf_stat.st_mode)) {
+ /* Symlink */
+
+ /* Read what the symlink points to */
+ slen = readlinkat(dir_fd, component, linkpath,
+ sizeof(linkpath));
+ if (slen < 0)
+ goto out;
+ /* NUL-terminate the string */
+ linkpath[(size_t)slen] = '\0';
+
+ /* Open the thing that the symlink points to */
+ error = test_open_internal(arg, linkpath, NULL,
+ tf, depth);
+ if (error != 0)
+ goto out;
+ }
}
+ /* Completed the entire path and have a good file/directory */
+ if (h_return != NULL)
+ *h_return = tf;
+ return (0);
+
out:
+ /* Failure of some sort, clean up */
+ if (tf->tf_isdir)
+ closedir(tf->tf_u.dir);
+ else
+ close(tf->tf_u.fd);
free(tf);
- return (EINVAL);
+ return (error);
+}
+
+int
+test_open(void *arg, const char *filename, void **h_return)
+{
+ if (host_base == NULL)
+ return (ENOENT);
+
+ return (test_open_internal(arg, filename, h_return, NULL, 0));
}
int
@@ -394,13 +516,15 @@ test_getmem(void *arg, uint64_t *lowmem, uint64_t *highmem)
char *
test_getenv(void *arg, int idx)
{
- static char *vars[] = {
- "foo=bar",
- "bar=barbar",
- NULL
+ static char *myvars[] = {
+ "USERBOOT=1"
};
+ static const int num_myvars = nitems(myvars);
- return (vars[idx]);
+ if (idx < num_myvars)
+ return (myvars[idx]);
+ else
+ return (vars[idx - num_myvars]);
}
struct loader_callbacks cb = {
@@ -444,7 +568,7 @@ usage()
}
int
-main(int argc, char** argv)
+main(int argc, char** argv, char ** environment)
{
void *h;
void (*func)(struct loader_callbacks *, void *, int, int) __dead2;
@@ -452,6 +576,8 @@ main(int argc, char** argv)
const char *userboot_obj = "/boot/userboot.so";
int oflag = O_RDONLY;
+ vars = environment;
+
while ((opt = getopt(argc, argv, "wb:d:h:")) != -1) {
switch (opt) {
case 'b':
diff --git a/stand/userboot/userboot/userboot_cons.c b/stand/userboot/userboot/userboot_cons.c
index a905f1397232..26c89dc2a37e 100644
--- a/stand/userboot/userboot/userboot_cons.c
+++ b/stand/userboot/userboot/userboot_cons.c
@@ -42,14 +42,13 @@ static int userboot_cons_getchar(void);
static int userboot_cons_poll(void);
struct console userboot_console = {
- "userboot",
- "userboot",
- 0,
- userboot_cons_probe,
- userboot_cons_init,
- userboot_cons_putchar,
- userboot_cons_getchar,
- userboot_cons_poll,
+ .c_name = "userboot",
+ .c_desc = "userboot",
+ .c_probe = userboot_cons_probe,
+ .c_init = userboot_cons_init,
+ .c_out = userboot_cons_putchar,
+ .c_in = userboot_cons_getchar,
+ .c_ready = userboot_cons_poll,
};
/*
@@ -57,14 +56,13 @@ struct console userboot_console = {
* console to comconsole without resulting in an error
*/
struct console userboot_comconsole = {
- "comconsole",
- "comconsole",
- 0,
- userboot_comcons_probe,
- userboot_comcons_init,
- userboot_cons_putchar,
- userboot_cons_getchar,
- userboot_cons_poll,
+ .c_name = "comconsole",
+ .c_desc = "comconsole",
+ .c_probe = userboot_comcons_probe,
+ .c_init = userboot_comcons_init,
+ .c_out = userboot_cons_putchar,
+ .c_in = userboot_cons_getchar,
+ .c_ready = userboot_cons_poll,
};
static void
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index c8539b7b189d..c509dcc2f7dd 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1464,15 +1464,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
r_idt.rd_base = (long) idt;
lidt(&r_idt);
- /*
- * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4)
- * transition).
- * Once bootblocks have updated, we can test directly for
- * efi_systbl != NULL here...
- */
- if (efi_boot)
- vty_set_preferred(VTY_VT);
-
TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable);
TUNABLE_INT_FETCH("machdep.mitigations.ibrs.disable", &hw_ibrs_disable);
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index e5285586b928..25d22805ed3e 100644
--- a/sys/amd64/amd64/mem.c
+++ b/sys/amd64/amd64/mem.c
@@ -79,6 +79,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
struct iovec *iov;
void *p;
ssize_t orig_resid;
+ vm_prot_t prot;
u_long v, vd;
u_int c;
int error;
@@ -110,8 +111,16 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
break;
}
- if (!kernacc((void *)v, c, uio->uio_rw == UIO_READ ?
- VM_PROT_READ : VM_PROT_WRITE)) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
+ prot = VM_PROT_READ;
+ break;
+ case UIO_WRITE:
+ prot = VM_PROT_WRITE;
+ break;
+ }
+
+ if (!kernacc((void *)v, c, prot)) {
error = EFAULT;
break;
}
diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c
index 7b5c89747bc2..83795653fa28 100644
--- a/sys/amd64/amd64/uio_machdep.c
+++ b/sys/amd64/amd64/uio_machdep.c
@@ -97,18 +97,26 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error)
goto out;
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/amd64/amd64/uma_machdep.c b/sys/amd64/amd64/uma_machdep.c
deleted file mode 100644
index f83f0674cc4e..000000000000
--- a/sys/amd64/amd64/uma_machdep.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/vm_page.h>
-#include <vm/vm_phys.h>
-#include <vm/vm_dumpset.h>
-#include <vm/uma.h>
-#include <vm/uma_int.h>
-#include <machine/md_var.h>
-
-void *
-uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
- int wait)
-{
- vm_page_t m;
- vm_paddr_t pa;
- void *va;
-
- *flags = UMA_SLAB_PRIV;
- m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) |
- VM_ALLOC_WIRED);
- if (m == NULL)
- return (NULL);
- pa = m->phys_addr;
- if ((wait & M_NODUMP) == 0)
- dump_add_page(pa);
- va = (void *)PHYS_TO_DMAP(pa);
- return (va);
-}
-
-void
-uma_small_free(void *mem, vm_size_t size, u_int8_t flags)
-{
- vm_page_t m;
- vm_paddr_t pa;
-
- pa = DMAP_TO_PHYS((vm_offset_t)mem);
- dump_drop_page(pa);
- m = PHYS_TO_VM_PAGE(pa);
- vm_page_unwire_noq(m);
- vm_page_free(m);
-}
diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER
index b8ea17ee4a78..a36fb974c24e 100644
--- a/sys/amd64/conf/FIRECRACKER
+++ b/sys/amd64/conf/FIRECRACKER
@@ -57,11 +57,6 @@ options GEOM_RAID # Soft RAID functionality.
options GEOM_LABEL # Provides labelization
options EFIRT # EFI Runtime Services support
options COMPAT_FREEBSD32 # Compatible with i386 binaries
-options COMPAT_FREEBSD4 # Compatible with FreeBSD4
-options COMPAT_FREEBSD5 # Compatible with FreeBSD5
-options COMPAT_FREEBSD6 # Compatible with FreeBSD6
-options COMPAT_FREEBSD7 # Compatible with FreeBSD7
-options COMPAT_FREEBSD9 # Compatible with FreeBSD9
options COMPAT_FREEBSD10 # Compatible with FreeBSD10
options COMPAT_FREEBSD11 # Compatible with FreeBSD11
options COMPAT_FREEBSD12 # Compatible with FreeBSD12
diff --git a/sys/amd64/conf/LINT-NOINET b/sys/amd64/conf/LINT-NOINET
index 3f2246001b72..f5e704f6c071 100644
--- a/sys/amd64/conf/LINT-NOINET
+++ b/sys/amd64/conf/LINT-NOINET
@@ -1,7 +1,4 @@
include LINT
ident LINT-NOINET
-makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT="
nooptions INET
-nodevice gre
-nodevice netmap
diff --git a/sys/amd64/conf/LINT-NOINET6 b/sys/amd64/conf/LINT-NOINET6
index e314ad1b01ec..041916883277 100644
--- a/sys/amd64/conf/LINT-NOINET6
+++ b/sys/amd64/conf/LINT-NOINET6
@@ -1,5 +1,4 @@
include LINT
ident LINT-NOINET6
-makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT="
nooptions INET6
diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL
index 3447cbc366fb..0baf6d6431de 100644
--- a/sys/amd64/conf/MINIMAL
+++ b/sys/amd64/conf/MINIMAL
@@ -49,11 +49,6 @@ options QUOTA # Enable disk quotas for UFS
options MD_ROOT # MD is a potential root device
options GEOM_LABEL # Provides labelization
options COMPAT_FREEBSD32 # Compatible with i386 binaries
-options COMPAT_FREEBSD4 # Compatible with FreeBSD4
-options COMPAT_FREEBSD5 # Compatible with FreeBSD5
-options COMPAT_FREEBSD6 # Compatible with FreeBSD6
-options COMPAT_FREEBSD7 # Compatible with FreeBSD7
-options COMPAT_FREEBSD9 # Compatible with FreeBSD9
options COMPAT_FREEBSD10 # Compatible with FreeBSD10
options COMPAT_FREEBSD11 # Compatible with FreeBSD11
options COMPAT_FREEBSD12 # Compatible with FreeBSD12
@@ -149,3 +144,15 @@ device xentimer # Xen x86 PV timer device
options EVDEV_SUPPORT # evdev support in legacy drivers
device evdev # input event device support
device uinput # install /dev/uinput cdev
+
+# NVM Express (NVMe) support
+device nvme # base NVMe driver
+
+# ATA controllers
+device ahci # AHCI-compatible SATA controllers
+
+# CAM
+device scbus # SCSI bus (required for ATA/SCSI)
+device da # Direct Access (disks)
+device cd # CD
+device pass # Passthrough device (direct ATA/SCSI access)
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
index bff9bf840036..93c2648e8fac 100644
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -72,12 +72,12 @@
#endif
/*
- * We provide a machine specific single page allocator through the use
- * of the direct mapped segment. This uses 2MB pages for reduced
+ * We provide a single page allocator through the use of the
+ * direct mapped segment. This uses 2MB pages for reduced
* TLB pressure.
*/
#if !defined(KASAN) && !defined(KMSAN)
-#define UMA_MD_SMALL_ALLOC
+#define UMA_USE_DMAP
#endif
/*
@@ -294,7 +294,8 @@
/*
* Need a page dump array for minidump.
*/
-#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#endif /* _MACHINE_VMPARAM_H_ */
diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c
index 759586d9f1fc..53bdb8099578 100644
--- a/sys/amd64/linux/linux_dummy_machdep.c
+++ b/sys/amd64/linux/linux_dummy_machdep.c
@@ -56,12 +56,6 @@ DUMMY(io_destroy);
DUMMY(io_getevents);
DUMMY(io_submit);
DUMMY(io_cancel);
-DUMMY(mq_open);
-DUMMY(mq_unlink);
-DUMMY(mq_timedsend);
-DUMMY(mq_timedreceive);
-DUMMY(mq_notify);
-DUMMY(mq_getsetattr);
DUMMY(readahead);
DUMMY(restart_syscall);
/* Linux 3.15: */
diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index 065c82d7db50..15e1dfc1a444 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -780,7 +780,7 @@ struct linux_fadvise64_args {
};
struct linux_timer_create_args {
char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)];
- char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)];
+ char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)];
char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)];
};
struct linux_timer_settime_args {
@@ -875,7 +875,7 @@ struct linux_mq_timedreceive_args {
};
struct linux_mq_notify_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
- char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)];
+ char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)];
};
struct linux_mq_getsetattr_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c
index 8a350eeda6c0..0126fdf7aa5a 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -1676,7 +1676,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 222: {
struct linux_timer_create_args *p = params;
iarg[a++] = p->clock_id; /* clockid_t */
- uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */
+ uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */
uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */
*n_args = 3;
break;
@@ -1849,7 +1849,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 244: {
struct linux_mq_notify_args *p = params;
iarg[a++] = p->mqd; /* l_mqd_t */
- uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */
+ uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */
*n_args = 2;
break;
}
@@ -5484,7 +5484,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "clockid_t";
break;
case 1:
- p = "userland struct sigevent *";
+ p = "userland struct l_sigevent *";
break;
case 2:
p = "userland l_timer_t *";
@@ -5769,7 +5769,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mqd_t";
break;
case 1:
- p = "userland const struct l_timespec *";
+ p = "userland const struct l_sigevent *";
break;
default:
break;
diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
index 10084b53a1e1..fd08c9b0279d 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -1296,7 +1296,7 @@
222 AUE_NULL STD {
int linux_timer_create(
clockid_t clock_id,
- struct sigevent *evp,
+ struct l_sigevent *evp,
l_timer_t *timerid
);
}
@@ -1428,7 +1428,7 @@
244 AUE_NULL STD {
int linux_mq_notify(
l_mqd_t mqd,
- const struct l_timespec *abs_timeout
+ const struct l_sigevent *sevp,
);
}
245 AUE_NULL STD {
diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c
index c2206c81c528..1476d39b9c35 100644
--- a/sys/amd64/linux32/linux32_dummy_machdep.c
+++ b/sys/amd64/linux32/linux32_dummy_machdep.c
@@ -55,12 +55,6 @@ DUMMY(olduname);
DUMMY(uname);
DUMMY(bdflush);
DUMMY(ptrace);
-DUMMY(mq_open);
-DUMMY(mq_unlink);
-DUMMY(mq_timedsend);
-DUMMY(mq_timedreceive);
-DUMMY(mq_notify);
-DUMMY(mq_getsetattr);
/* Linux 4.11: */
DUMMY(arch_prctl);
/* Linux 5.0: */
diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h
index 59bb85e742db..ab0edd99df42 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -846,7 +846,7 @@ struct linux_set_tid_address_args {
};
struct linux_timer_create_args {
char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)];
- char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)];
+ char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)];
char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)];
};
struct linux_timer_settime_args {
@@ -944,7 +944,7 @@ struct linux_mq_timedreceive_args {
};
struct linux_mq_notify_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
- char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)];
+ char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)];
};
struct linux_mq_getsetattr_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c
index 994f80b92d81..a37de1d753dd 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -1791,7 +1791,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 259: {
struct linux_timer_create_args *p = params;
iarg[a++] = p->clock_id; /* clockid_t */
- uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */
+ uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */
uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */
*n_args = 3;
break;
@@ -1967,7 +1967,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 281: {
struct linux_mq_notify_args *p = params;
iarg[a++] = p->mqd; /* l_mqd_t */
- uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */
+ uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */
*n_args = 2;
break;
}
@@ -6151,7 +6151,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "clockid_t";
break;
case 1:
- p = "userland struct sigevent *";
+ p = "userland struct l_sigevent *";
break;
case 2:
p = "userland l_timer_t *";
@@ -6445,7 +6445,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mqd_t";
break;
case 1:
- p = "userland const struct l_timespec *";
+ p = "userland const struct l_sigevent *";
break;
default:
break;
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index 6b40a89db66d..92d5f09c423f 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -1402,7 +1402,7 @@
259 AUE_NULL STD {
int linux_timer_create(
clockid_t clock_id,
- struct sigevent *evp,
+ struct l_sigevent *evp,
l_timer_t *timerid
);
}
@@ -1538,7 +1538,7 @@
281 AUE_NULL STD {
int linux_mq_notify(
l_mqd_t mqd,
- const struct l_timespec *abs_timeout
+ const struct l_sigevent *sevp
);
}
282 AUE_NULL STD {
diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c
index 5214cd3f1447..46cddce4e4b8 100644
--- a/sys/amd64/vmm/vmm_dev.c
+++ b/sys/amd64/vmm/vmm_dev.c
@@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include "opt_bhyve_snapshot.h"
#include <sys/param.h>
@@ -163,14 +162,14 @@ vcpu_lock_one(struct vcpu *vcpu)
}
static void
-vcpu_unlock_one(struct vmmdev_softc *sc, int vcpuid, struct vcpu *vcpu)
+vcpu_unlock_one(struct vcpu *vcpu)
{
enum vcpu_state state;
state = vcpu_get_state(vcpu, NULL);
if (state != VCPU_FROZEN) {
- panic("vcpu %s(%d) has invalid state %d", vm_name(sc->vm),
- vcpuid, state);
+ panic("vcpu %s(%d) has invalid state %d",
+ vm_name(vcpu_vm(vcpu)), vcpu_vcpuid(vcpu), state);
}
vcpu_set_state(vcpu, VCPU_IDLE, false);
@@ -200,7 +199,7 @@ vcpu_lock_all(struct vmmdev_softc *sc)
vcpu = vm_vcpu(sc->vm, j);
if (vcpu == NULL)
continue;
- vcpu_unlock_one(sc, j, vcpu);
+ vcpu_unlock_one(vcpu);
}
vm_unlock_vcpus(sc->vm);
}
@@ -219,7 +218,7 @@ vcpu_unlock_all(struct vmmdev_softc *sc)
vcpu = vm_vcpu(sc->vm, i);
if (vcpu == NULL)
continue;
- vcpu_unlock_one(sc, i, vcpu);
+ vcpu_unlock_one(vcpu);
}
vm_unlock_vcpus(sc->vm);
}
@@ -1086,7 +1085,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag,
done:
if (vcpus_locked == SINGLE)
- vcpu_unlock_one(sc, vcpuid, vcpu);
+ vcpu_unlock_one(vcpu);
else if (vcpus_locked == ALL)
vcpu_unlock_all(sc);
if (memsegs_locked)
@@ -1231,7 +1230,7 @@ sysctl_vmm_destroy(SYSCTL_HANDLER_ARGS)
* is scheduled for destruction.
*/
cdev = sc->cdev;
- sc->cdev = NULL;
+ sc->cdev = NULL;
mtx_unlock(&vmmdev_mtx);
/*
diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c
index 421d1c015691..9294c1e5290c 100644
--- a/sys/arm/allwinner/a10_codec.c
+++ b/sys/arm/allwinner/a10_codec.c
@@ -40,7 +40,6 @@
#include <machine/bus.h>
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/chip.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c
index 44bc96bed734..13af7eb682d6 100644
--- a/sys/arm/arm/busdma_machdep.c
+++ b/sys/arm/arm/busdma_machdep.c
@@ -168,11 +168,15 @@ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */
MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
#define dmat_alignment(dmat) ((dmat)->alignment)
+#define dmat_bounce_flags(dmat) (0)
+#define dmat_boundary(dmat) ((dmat)->boundary)
#define dmat_flags(dmat) ((dmat)->flags)
#define dmat_highaddr(dmat) ((dmat)->highaddr)
#define dmat_lowaddr(dmat) ((dmat)->lowaddr)
#define dmat_lockfunc(dmat) ((dmat)->lockfunc)
#define dmat_lockfuncarg(dmat) ((dmat)->lockfuncarg)
+#define dmat_maxsegsz(dmat) ((dmat)->maxsegsz)
+#define dmat_nsegments(dmat) ((dmat)->nsegments)
#include "../../kern/subr_busdma_bounce.c"
@@ -792,7 +796,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
*/
curaddr = buf;
while (buflen != 0) {
- sgsize = MIN(buflen, dmat->maxsegsz);
+ sgsize = buflen;
if (must_bounce(dmat, map, curaddr, sgsize) != 0) {
sgsize = MIN(sgsize,
PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -829,7 +833,6 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, pmap_t pmap, bus_dmamap_t map,
while (vaddr < vendaddr) {
sg_len = MIN(vendaddr - vaddr,
(PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)));
- sg_len = MIN(sg_len, dmat->maxsegsz);
if (__predict_true(pmap == kernel_pmap))
paddr = pmap_kextract(vaddr);
else
@@ -843,47 +846,6 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, pmap_t pmap, bus_dmamap_t map,
}
/*
- * Add a single contiguous physical range to the segment list.
- */
-static int
-_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
- bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
-{
- int seg;
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (!vm_addr_bound_ok(curaddr, sgsize, dmat->boundary))
- sgsize = roundup2(curaddr, dmat->boundary) - curaddr;
-
- /*
- * Insert chunk into a segment, coalescing with
- * previous segment if possible.
- */
- seg = *segp;
- if (seg == -1) {
- seg = 0;
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- } else {
- if (curaddr == segs[seg].ds_addr + segs[seg].ds_len &&
- (segs[seg].ds_len + sgsize) <= dmat->maxsegsz &&
- vm_addr_bound_ok(segs[seg].ds_addr,
- segs[seg].ds_len + sgsize, dmat->boundary))
- segs[seg].ds_len += sgsize;
- else {
- if (++seg >= dmat->nsegments)
- return (0);
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- }
- }
- *segp = seg;
- return (sgsize);
-}
-
-/*
* Utility function to load a physical buffer. segp contains
* the starting segment on entrace, and the ending segment on exit.
*/
@@ -921,7 +883,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
while (buflen > 0) {
curaddr = buf;
- sgsize = MIN(buflen, dmat->maxsegsz);
+ sgsize = buflen;
if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr,
sgsize)) {
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -945,9 +907,8 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
} else
sl->datacount += sgsize;
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
buf += sgsize;
buflen -= sgsize;
@@ -1037,11 +998,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
/*
* Compute the segment size, and adjust counts.
*/
- sgsize = PAGE_SIZE - (curaddr & PAGE_MASK);
- if (sgsize > dmat->maxsegsz)
- sgsize = dmat->maxsegsz;
- if (buflen < sgsize)
- sgsize = buflen;
+ sgsize = MIN(buflen, PAGE_SIZE - (curaddr & PAGE_MASK));
if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr,
sgsize)) {
@@ -1074,9 +1031,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
} else
sl->datacount += sgsize;
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
vaddr += sgsize;
buflen -= sgsize;
diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c
index d98c2a022d71..d3e264527a7f 100644
--- a/sys/arm/arm/generic_timer.c
+++ b/sys/arm/arm/generic_timer.c
@@ -171,12 +171,14 @@ static struct timecounter arm_tmr_timecount = {
#define set_el0(x, val) cp15_## x ##_set(val)
#define set_el1(x, val) cp15_## x ##_set(val)
#define HAS_PHYS true
+#define IN_VHE false
#else /* __aarch64__ */
#define get_el0(x) READ_SPECIALREG(x ##_el0)
#define get_el1(x) READ_SPECIALREG(x ##_el1)
#define set_el0(x, val) WRITE_SPECIALREG(x ##_el0, val)
#define set_el1(x, val) WRITE_SPECIALREG(x ##_el1, val)
#define HAS_PHYS has_hyp()
+#define IN_VHE in_vhe()
#endif
static int
@@ -564,6 +566,8 @@ arm_tmr_acpi_identify(driver_t *driver, device_t parent)
gtdt->NonSecureEl1Interrupt);
arm_tmr_acpi_add_irq(parent, dev, GT_VIRT,
gtdt->VirtualTimerInterrupt);
+ arm_tmr_acpi_add_irq(parent, dev, GT_HYP_PHYS,
+ gtdt->NonSecureEl2Interrupt);
out:
acpi_unmap_table(gtdt);
@@ -676,13 +680,22 @@ arm_tmr_attach(device_t dev)
#endif
#ifdef __aarch64__
- /*
- * Use the virtual timer when we can't use the hypervisor.
- * A hypervisor guest may change the virtual timer registers while
- * executing so any use of the virtual timer interrupt needs to be
- * coordinated with the virtual machine manager.
- */
- if (!HAS_PHYS) {
+ if (IN_VHE) {
+ /*
+ * The kernel is running at EL2. The EL0 timer registers are
+ * re-mapped to the EL2 version. Because of this we need to
+ * use the EL2 interrupt.
+ */
+ sc->physical_sys = true;
+ first_timer = GT_HYP_PHYS;
+ last_timer = GT_HYP_PHYS;
+ } else if (!HAS_PHYS) {
+ /*
+ * Use the virtual timer when we can't use the hypervisor.
+ * A hypervisor guest may change the virtual timer registers
+ * while executing so any use of the virtual timer interrupt
+ * needs to be coordinated with the virtual machine manager.
+ */
sc->physical_sys = false;
first_timer = GT_VIRT;
last_timer = GT_VIRT;
diff --git a/sys/arm/arm/pmu.c b/sys/arm/arm/pmu.c
index 98d8cdcf2df8..050121934447 100644
--- a/sys/arm/arm/pmu.c
+++ b/sys/arm/arm/pmu.c
@@ -46,6 +46,7 @@
#include <sys/timetc.h>
#include <sys/pmc.h>
#include <sys/pmckern.h>
+#include <sys/proc.h>
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -65,9 +66,6 @@ uint32_t ccnt_hi[MAXCPU];
static int
pmu_intr(void *arg)
{
-#ifdef HWPMC_HOOKS
- struct trapframe *tf;
-#endif
uint32_t r;
#if defined(__arm__) && (__ARM_ARCH > 6)
u_int cpu;
@@ -87,10 +85,8 @@ pmu_intr(void *arg)
#ifdef HWPMC_HOOKS
/* Only call into the HWPMC framework if we know there is work. */
- if (r != 0 && pmc_intr) {
- tf = arg;
- (*pmc_intr)(tf);
- }
+ if (r != 0 && pmc_intr)
+ (*pmc_intr)(curthread->td_intr_frame);
#endif
return (FILTER_HANDLED);
diff --git a/sys/arm/arm/uio_machdep.c b/sys/arm/arm/uio_machdep.c
index de9bc94317e8..6b8e4352e06f 100644
--- a/sys/arm/arm/uio_machdep.c
+++ b/sys/arm/arm/uio_machdep.c
@@ -94,20 +94,28 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error) {
sf_buf_free(sf);
goto out;
}
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c
index e0f525fa9520..75a0c81f29a1 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c
@@ -28,7 +28,6 @@
#endif
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/chip.h>
#include "mixer_if.h"
diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c
index 2fb55ca161d3..273957f64b21 100644
--- a/sys/arm/freescale/imx/imx6_ssi.c
+++ b/sys/arm/freescale/imx/imx6_ssi.c
@@ -42,7 +42,6 @@
#include <sys/timetc.h>
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/chip.h>
#include <mixer_if.h>
#include <dev/ofw/openfirm.h>
diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c
index 6a36ddc3c057..696ecfb980f4 100644
--- a/sys/arm/freescale/vybrid/vf_sai.c
+++ b/sys/arm/freescale/vybrid/vf_sai.c
@@ -43,7 +43,6 @@
#include <sys/watchdog.h>
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/chip.h>
#include <mixer_if.h>
#include <dev/ofw/openfirm.h>
diff --git a/sys/arm/include/armreg.h b/sys/arm/include/armreg.h
index 8beef9b31022..819355111909 100644
--- a/sys/arm/include/armreg.h
+++ b/sys/arm/include/armreg.h
@@ -41,8 +41,6 @@
#ifndef MACHINE_ARMREG_H
#define MACHINE_ARMREG_H
-#define INSN_SIZE 4
-#define INSN_COND_MASK 0xf0000000 /* Condition mask */
#define PSR_MODE 0x0000001f /* mode mask */
#define PSR_USR32_MODE 0x00000010
#define PSR_FIQ32_MODE 0x00000011
diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h
index 2cf97017b04a..88b5bd7acbc5 100644
--- a/sys/arm/include/atomic.h
+++ b/sys/arm/include/atomic.h
@@ -1052,6 +1052,12 @@ atomic_thread_fence_seq_cst(void)
dmb();
}
+#define atomic_add_ptr atomic_add_32
+#define atomic_add_acq_ptr atomic_add_acq_32
+#define atomic_add_rel_ptr atomic_add_rel_32
+#define atomic_subtract_ptr atomic_subtract_32
+#define atomic_subtract_acq_ptr atomic_subtract_acq_32
+#define atomic_subtract_rel_ptr atomic_subtract_rel_32
#define atomic_clear_ptr atomic_clear_32
#define atomic_clear_acq_ptr atomic_clear_acq_32
#define atomic_clear_rel_ptr atomic_clear_rel_32
@@ -1059,15 +1065,16 @@ atomic_thread_fence_seq_cst(void)
#define atomic_set_acq_ptr atomic_set_acq_32
#define atomic_set_rel_ptr atomic_set_rel_32
#define atomic_fcmpset_ptr atomic_fcmpset_32
-#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_32
#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_32
+#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_32
#define atomic_cmpset_ptr atomic_cmpset_32
#define atomic_cmpset_acq_ptr atomic_cmpset_acq_32
#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32
+#define atomic_fetchadd_ptr atomic_fetchadd_32
+#define atomic_readandclear_ptr atomic_readandclear_32
#define atomic_load_acq_ptr atomic_load_acq_32
#define atomic_store_rel_ptr atomic_store_rel_32
#define atomic_swap_ptr atomic_swap_32
-#define atomic_readandclear_ptr atomic_readandclear_32
#define atomic_add_int atomic_add_32
#define atomic_add_acq_int atomic_add_acq_32
diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h
index 4ad42cfbe16b..15807923cefb 100644
--- a/sys/arm/include/vmparam.h
+++ b/sys/arm/include/vmparam.h
@@ -200,5 +200,6 @@ extern vm_offset_t vm_max_kernel_address;
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 0
#endif /* _MACHINE_VMPARAM_H_ */
diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c
index e62794da2753..f218bc062642 100644
--- a/sys/arm64/arm64/busdma_bounce.c
+++ b/sys/arm64/arm64/busdma_bounce.c
@@ -121,12 +121,16 @@ static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
static MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
#define dmat_alignment(dmat) ((dmat)->common.alignment)
+#define dmat_bounce_flags(dmat) ((dmat)->bounce_flags)
+#define dmat_boundary(dmat) ((dmat)->common.boundary)
#define dmat_domain(dmat) ((dmat)->common.domain)
#define dmat_flags(dmat) ((dmat)->common.flags)
#define dmat_highaddr(dmat) ((dmat)->common.highaddr)
#define dmat_lowaddr(dmat) ((dmat)->common.lowaddr)
#define dmat_lockfunc(dmat) ((dmat)->common.lockfunc)
#define dmat_lockfuncarg(dmat) ((dmat)->common.lockfuncarg)
+#define dmat_maxsegsz(dmat) ((dmat)->common.maxsegsz)
+#define dmat_nsegments(dmat) ((dmat)->common.nsegments)
#include "../../kern/subr_busdma_bounce.c"
@@ -639,7 +643,7 @@ _bus_dmamap_pagesneeded(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
count = 0;
curaddr = buf;
while (buflen != 0) {
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if (must_bounce(dmat, map, curaddr, sgsize)) {
sgsize = MIN(sgsize,
PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -692,15 +696,13 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
vendaddr = (vm_offset_t)buf + buflen;
while (vaddr < vendaddr) {
- sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK);
- sg_len = MIN(sg_len, dmat->common.maxsegsz);
+ sg_len = MIN(vendaddr - vaddr,
+ PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));
if (pmap == kernel_pmap)
paddr = pmap_kextract(vaddr);
else
paddr = pmap_extract(pmap, vaddr);
- if (must_bounce(dmat, map, paddr,
- min(vendaddr - vaddr, (PAGE_SIZE - ((vm_offset_t)vaddr &
- PAGE_MASK)))) != 0) {
+ if (must_bounce(dmat, map, paddr, sg_len) != 0) {
sg_len = roundup2(sg_len,
dmat->common.alignment);
map->pagesneeded++;
@@ -712,47 +714,6 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
}
/*
- * Add a single contiguous physical range to the segment list.
- */
-static bus_size_t
-_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
- bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
-{
- int seg;
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (!vm_addr_bound_ok(curaddr, sgsize, dmat->common.boundary))
- sgsize = roundup2(curaddr, dmat->common.boundary) - curaddr;
-
- /*
- * Insert chunk into a segment, coalescing with
- * previous segment if possible.
- */
- seg = *segp;
- if (seg == -1) {
- seg = 0;
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- } else {
- if (curaddr == segs[seg].ds_addr + segs[seg].ds_len &&
- (segs[seg].ds_len + sgsize) <= dmat->common.maxsegsz &&
- vm_addr_bound_ok(segs[seg].ds_addr,
- segs[seg].ds_len + sgsize, dmat->common.boundary))
- segs[seg].ds_len += sgsize;
- else {
- if (++seg >= dmat->common.nsegments)
- return (0);
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- }
- }
- *segp = seg;
- return (sgsize);
-}
-
-/*
* Utility function to load a physical buffer. segp contains
* the starting segment on entrace, and the ending segment on exit.
*/
@@ -783,7 +744,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
while (buflen > 0) {
curaddr = buf;
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if (map->pagesneeded != 0 &&
must_bounce(dmat, map, curaddr, sgsize)) {
/*
@@ -817,9 +778,8 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
} else
sl->datacount += sgsize;
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
buf += sgsize;
buflen -= sgsize;
@@ -895,7 +855,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
/*
* Compute the segment size, and adjust counts.
*/
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if ((map->flags & DMAMAP_FROM_DMAMEM) == 0)
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -934,9 +894,8 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
} else
sl->datacount += sgsize;
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
vaddr += sgsize;
buflen -= sgsize;
diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c
index 2e1a956ad75c..d92d3fb37ce4 100644
--- a/sys/arm64/arm64/debug_monitor.c
+++ b/sys/arm64/arm64/debug_monitor.c
@@ -40,6 +40,7 @@
#include <machine/armreg.h>
#include <machine/cpu.h>
#include <machine/debug_monitor.h>
+#include <machine/machdep.h>
#include <machine/kdb.h>
#include <machine/pcb.h>
@@ -86,6 +87,7 @@ void dbg_monitor_exit(struct thread *, struct trapframe *);
#define DBG_WATCH_CTRL_ACCESS_MASK(x) ((x) & (0x3 << 3))
/* Common for breakpoint and watchpoint */
+#define DBG_WB_CTRL_HMC (0x1 << 13)
#define DBG_WB_CTRL_EL1 (0x1 << 1)
#define DBG_WB_CTRL_EL0 (0x2 << 1)
#define DBG_WB_CTRL_ELX_MASK(x) ((x) & (0x3 << 1))
@@ -457,6 +459,8 @@ dbg_setup_breakpoint(struct debug_monitor_state *monitor, vm_offset_t addr)
if ((monitor->dbg_flags & DBGMON_KERNEL) == 0)
bcr_priv = DBG_WB_CTRL_EL0;
+ else if (in_vhe())
+ bcr_priv = DBG_WB_CTRL_EL1 | DBG_WB_CTRL_HMC;
else
bcr_priv = DBG_WB_CTRL_EL1;
@@ -530,6 +534,8 @@ dbg_setup_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr,
if ((monitor->dbg_flags & DBGMON_KERNEL) == 0)
wcr_priv = DBG_WB_CTRL_EL0;
+ else if (in_vhe())
+ wcr_priv = DBG_WB_CTRL_EL1 | DBG_WB_CTRL_HMC;
else
wcr_priv = DBG_WB_CTRL_EL1;
diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c
index b57dd9be48aa..0b25650b3fbf 100644
--- a/sys/arm64/arm64/gic_v3.c
+++ b/sys/arm64/arm64/gic_v3.c
@@ -494,6 +494,10 @@ gic_v3_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
case GICV3_IVAR_REDIST:
*result = (uintptr_t)&sc->gic_redists.pcpu[PCPU_GET(cpuid)];
return (0);
+ case GICV3_IVAR_SUPPORT_LPIS:
+ *result =
+ (gic_d_read(sc, 4, GICD_TYPER) & GICD_TYPER_LPIS) != 0;
+ return (0);
case GIC_IVAR_HW_REV:
KASSERT(
GICR_PIDR2_ARCH(sc->gic_pidr2) == GICR_PIDR2_ARCH_GICv3 ||
diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h
index 81526e7cc15e..1c5d354ee217 100644
--- a/sys/arm64/arm64/gic_v3_var.h
+++ b/sys/arm64/arm64/gic_v3_var.h
@@ -102,9 +102,11 @@ MALLOC_DECLARE(M_GIC_V3);
#define GICV3_IVAR_NIRQS 1000
/* 1001 was GICV3_IVAR_REDIST_VADDR */
#define GICV3_IVAR_REDIST 1002
+#define GICV3_IVAR_SUPPORT_LPIS 1003
__BUS_ACCESSOR(gicv3, nirqs, GICV3, NIRQS, u_int);
__BUS_ACCESSOR(gicv3, redist, GICV3, REDIST, void *);
+__BUS_ACCESSOR(gicv3, support_lpis, GICV3, SUPPORT_LPIS, bool);
/* Device methods */
int gic_v3_attach(device_t dev);
diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c
index 31a0ded6c95d..46695a415e86 100644
--- a/sys/arm64/arm64/gicv3_its.c
+++ b/sys/arm64/arm64/gicv3_its.c
@@ -2208,6 +2208,9 @@ gicv3_its_fdt_probe(device_t dev)
if (!ofw_bus_is_compatible(dev, "arm,gic-v3-its"))
return (ENXIO);
+ if (!gicv3_get_support_lpis(dev))
+ return (ENXIO);
+
device_set_desc(dev, "ARM GIC Interrupt Translation Service");
return (BUS_PROBE_DEFAULT);
}
@@ -2277,6 +2280,9 @@ gicv3_its_acpi_probe(device_t dev)
if (gic_get_hw_rev(dev) < 3)
return (EINVAL);
+ if (!gicv3_get_support_lpis(dev))
+ return (ENXIO);
+
device_set_desc(dev, "ARM GIC Interrupt Translation Service");
return (BUS_PROBE_DEFAULT);
}
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index 01b434fd4f47..5fec7cba385f 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -138,15 +138,11 @@ struct cpu_desc {
uint64_t id_aa64mmfr0;
uint64_t id_aa64mmfr1;
uint64_t id_aa64mmfr2;
-#ifdef NOTYET
uint64_t id_aa64mmfr3;
uint64_t id_aa64mmfr4;
-#endif
uint64_t id_aa64pfr0;
uint64_t id_aa64pfr1;
-#ifdef NOTYET
uint64_t id_aa64pfr2;
-#endif
uint64_t id_aa64zfr0;
uint64_t ctr;
#ifdef COMPAT_FREEBSD32
@@ -1297,7 +1293,6 @@ static const struct mrs_field id_aa64mmfr2_fields[] = {
};
-#ifdef NOTYET
/* ID_AA64MMFR2_EL1 */
static const struct mrs_field_value id_aa64mmfr3_spec_fpacc[] = {
MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR3, Spec_FPACC, NONE, IMPL),
@@ -1333,7 +1328,6 @@ static const struct mrs_field id_aa64mmfr3_fields[] = {
static const struct mrs_field id_aa64mmfr4_fields[] = {
MRS_FIELD_END,
};
-#endif
/* ID_AA64PFR0_EL1 */
@@ -1572,12 +1566,10 @@ static const struct mrs_field id_aa64pfr1_fields[] = {
};
-#ifdef NOTYET
/* ID_AA64PFR2_EL1 */
static const struct mrs_field id_aa64pfr2_fields[] = {
MRS_FIELD_END,
};
-#endif
/* ID_AA64ZFR0_EL1 */
@@ -1880,16 +1872,12 @@ static const struct mrs_user_reg user_regs[] = {
USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0, true),
USER_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1, true),
USER_REG(ID_AA64MMFR2_EL1, id_aa64mmfr2, true),
-#ifdef NOTYET
USER_REG(ID_AA64MMFR3_EL1, id_aa64mmfr3, true),
USER_REG(ID_AA64MMFR4_EL1, id_aa64mmfr4, true),
-#endif
USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0, true),
USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1, true),
-#ifdef NOTYET
USER_REG(ID_AA64PFR2_EL1, id_aa64pfr2, true),
-#endif
USER_REG(ID_AA64ZFR0_EL1, id_aa64zfr0, true),
@@ -2669,12 +2657,10 @@ print_cpu_features(u_int cpu, struct cpu_desc *desc,
print_id_register(sb, "Processor Features 1",
desc->id_aa64pfr1, id_aa64pfr1_fields);
-#ifdef NOTYET
/* AArch64 Processor Feature Register 2 */
if (SHOULD_PRINT_REG(id_aa64pfr2))
print_id_register(sb, "Processor Features 2",
desc->id_aa64pfr2, id_aa64pfr2_fields);
-#endif
/* AArch64 Memory Model Feature Register 0 */
if (SHOULD_PRINT_REG(id_aa64mmfr0))
@@ -2691,7 +2677,6 @@ print_cpu_features(u_int cpu, struct cpu_desc *desc,
print_id_register(sb, "Memory Model Features 2",
desc->id_aa64mmfr2, id_aa64mmfr2_fields);
-#ifdef NOTYET
/* AArch64 Memory Model Feature Register 3 */
if (SHOULD_PRINT_REG(id_aa64mmfr3))
print_id_register(sb, "Memory Model Features 3",
@@ -2701,7 +2686,6 @@ print_cpu_features(u_int cpu, struct cpu_desc *desc,
if (SHOULD_PRINT_REG(id_aa64mmfr4))
print_id_register(sb, "Memory Model Features 4",
desc->id_aa64mmfr4, id_aa64mmfr4_fields);
-#endif
/* AArch64 Debug Feature Register 0 */
if (SHOULD_PRINT_REG(id_aa64dfr0))
@@ -2809,23 +2793,19 @@ identify_cpu(u_int cpu)
CPU_AFFINITY(cpu) = desc->mpidr & CPU_AFF_MASK;
desc->ctr = READ_SPECIALREG(ctr_el0);
- desc->id_aa64dfr0 = READ_SPECIALREG(id_aa64dfr0_el1);
- desc->id_aa64dfr1 = READ_SPECIALREG(id_aa64dfr1_el1);
- desc->id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1);
- desc->id_aa64isar1 = READ_SPECIALREG(id_aa64isar1_el1);
- desc->id_aa64isar2 = READ_SPECIALREG(id_aa64isar2_el1);
- desc->id_aa64mmfr0 = READ_SPECIALREG(id_aa64mmfr0_el1);
- desc->id_aa64mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1);
- desc->id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1);
-#ifdef NOTYET
- desc->id_aa64mmfr3 = READ_SPECIALREG(id_aa64mmfr3_el1);
- desc->id_aa64mmfr4 = READ_SPECIALREG(id_aa64mmfr4_el1);
-#endif
- desc->id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_el1);
- desc->id_aa64pfr1 = READ_SPECIALREG(id_aa64pfr1_el1);
-#ifdef NOTYET
- desc->id_aa64pfr2 = READ_SPECIALREG(id_aa64pfr2_el1);
-#endif
+ desc->id_aa64dfr0 = READ_SPECIALREG(ID_AA64DFR0_EL1_REG);
+ desc->id_aa64dfr1 = READ_SPECIALREG(ID_AA64DFR1_EL1_REG);
+ desc->id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1_REG);
+ desc->id_aa64isar1 = READ_SPECIALREG(ID_AA64ISAR1_EL1_REG);
+ desc->id_aa64isar2 = READ_SPECIALREG(ID_AA64ISAR2_EL1_REG);
+ desc->id_aa64mmfr0 = READ_SPECIALREG(ID_AA64MMFR0_EL1_REG);
+ desc->id_aa64mmfr1 = READ_SPECIALREG(ID_AA64MMFR1_EL1_REG);
+ desc->id_aa64mmfr2 = READ_SPECIALREG(ID_AA64MMFR2_EL1_REG);
+ desc->id_aa64mmfr3 = READ_SPECIALREG(ID_AA64MMFR3_EL1_REG);
+ desc->id_aa64mmfr4 = READ_SPECIALREG(ID_AA64MMFR4_EL1_REG);
+ desc->id_aa64pfr0 = READ_SPECIALREG(ID_AA64PFR0_EL1_REG);
+ desc->id_aa64pfr1 = READ_SPECIALREG(ID_AA64PFR1_EL1_REG);
+ desc->id_aa64pfr2 = READ_SPECIALREG(ID_AA64PFR2_EL1_REG);
/*
* ID_AA64ZFR0_EL1 is only valid when at least one of:
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
index fd77938edae9..fffebe8f2b02 100644
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -29,6 +29,7 @@
#include <sys/syscall.h>
#include <machine/asm.h>
#include <machine/armreg.h>
+#include <machine/cpu.h>
#include <machine/hypervisor.h>
#include <machine/param.h>
#include <machine/pte.h>
@@ -192,12 +193,50 @@ END(_start)
#ifdef SMP
/*
- * mpentry(unsigned long)
+ * void
+ * mpentry_psci(unsigned long)
*
- * Called by a core when it is being brought online.
+ * Called by a core when it is being brought online with psci.
* The data in x0 is passed straight to init_secondary.
*/
-ENTRY(mpentry)
+ENTRY(mpentry_psci)
+ mov x26, xzr
+ b mpentry_common
+END(mpentry_psci)
+
+/*
+ * void
+ * mpentry_spintable(void)
+ *
+ * Called by a core when it is being brought online with a spin-table.
+ * Reads the new CPU ID and passes this to init_secondary.
+ */
+ENTRY(mpentry_spintable)
+ ldr x26, =spintable_wait
+ b mpentry_common
+END(mpentry_spintable)
+
+/* Wait for the current CPU to be released */
+LENTRY(spintable_wait)
+ /* Read the affinity bits from mpidr_el1 */
+ mrs x1, mpidr_el1
+ ldr x2, =CPU_AFF_MASK
+ and x1, x1, x2
+
+ adrp x2, ap_cpuid
+1:
+ ldr x0, [x2, :lo12:ap_cpuid]
+ cmp x0, x1
+ b.ne 1b
+
+ str xzr, [x2, :lo12:ap_cpuid]
+ dsb sy
+ sev
+
+ ret
+LEND(mpentry_spintable)
+
+LENTRY(mpentry_common)
/* Disable interrupts */
msr daifset, #DAIF_INTR
@@ -228,6 +267,14 @@ ENTRY(mpentry)
mp_virtdone:
BTI_J
+ /*
+ * Allow this CPU to wait until the kernel is ready for it,
+ * e.g. with spin-table but each CPU uses the same release address
+ */
+ cbz x26, 1f
+ blr x26
+1:
+
/* Start using the AP boot stack */
adrp x4, bootstack
ldr x4, [x4, :lo12:bootstack]
@@ -258,7 +305,7 @@ mp_virtdone:
msr tpidr_el1, x18
b init_secondary
-END(mpentry)
+LEND(mpentry_common)
#endif
/*
@@ -382,14 +429,16 @@ LEND(get_load_phys_addr)
* All the memory must not cross a 1GiB boundaty
* x28 contains the physical address we were loaded from
*
- * TODO: This is out of date.
- * There are at least 5 pages before that address for the page tables
+ * There are 7 or 8 pages before that address for the page tables
* The pages used are:
+ * - The Kernel L3 tables (only for 16k kernel)
* - The Kernel L2 table
* - The Kernel L1 table
* - The Kernel L0 table (TTBR1)
+ * - The identity (PA = VA) L2 table
* - The identity (PA = VA) L1 table
- * - The identity (PA = VA) L0 table (TTBR0)
+ * - The identity (PA = VA) L0 table (Early TTBR0)
+ * - The Kernel empty L0 table (Late TTBR0)
*/
LENTRY(create_pagetables)
/* Save the Link register */
@@ -467,23 +516,32 @@ booti_no_fdt:
common:
#if PAGE_SIZE != PAGE_SIZE_4K
/*
- * Create L3 pages. The kernel will be loaded at a 2M aligned
- * address, however L2 blocks are too large when the page size is
- * not 4k to map the kernel with such an aligned address. However,
- * when the page size is larger than 4k, L2 blocks are too large to
- * map the kernel with such an alignment.
+ * Create L3 and L3C pages. The kernel will be loaded at a 2M aligned
+ * address, enabling the creation of L3C pages. However, when the page
+ * size is larger than 4k, L2 blocks are too large to map the kernel
+ * with 2M alignment.
*/
+#define PTE_SHIFT L3_SHIFT
+#define BUILD_PTE_FUNC build_l3_page_pagetable
+#else
+#define PTE_SHIFT L2_SHIFT
+#define BUILD_PTE_FUNC build_l2_block_pagetable
+#endif
- /* Get the number of l3 pages to allocate, rounded down */
- lsr x10, x8, #(L3_SHIFT)
+ /* Get the number of blocks/pages to allocate, rounded down */
+ lsr x10, x8, #(PTE_SHIFT)
- /* Create the kernel space L2 table */
+ /* Create the kernel space PTE table */
mov x6, x26
mov x7, #(ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK))
mov x8, #(KERNBASE)
mov x9, x28
- bl build_l3_page_pagetable
+ bl BUILD_PTE_FUNC
+
+#undef PTE_SHIFT
+#undef BUILD_PTE_FUNC
+#if PAGE_SIZE != PAGE_SIZE_4K
/* Move to the l2 table */
ldr x9, =(PAGE_SIZE * L3_PAGE_COUNT)
add x26, x26, x9
@@ -492,16 +550,6 @@ common:
mov x9, x6
mov x6, x26
bl link_l2_pagetable
-#else
- /* Get the number of l2 pages to allocate, rounded down */
- lsr x10, x8, #(L2_SHIFT)
-
- /* Create the kernel space L2 table */
- mov x6, x26
- mov x7, #(ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK))
- mov x8, #(KERNBASE)
- mov x9, x28
- bl build_l2_block_pagetable
#endif
/* Move to the l1 table */
@@ -735,13 +783,17 @@ LENTRY(link_l2_pagetable)
LEND(link_l2_pagetable)
/*
- * Builds count level 3 page table entries
+ * Builds count level 3 page table entries. Uses ATTR_CONTIGUOUS to create
+ * large page (L3C) mappings when the current VA and remaining count allow
+ * it.
* x6 = L3 table
* x7 = Block attributes
* x8 = VA start
* x9 = PA start (trashed)
* x10 = Entry count (trashed)
* x11, x12 and x13 are trashed
+ *
+ * VA start (x8) modulo L3C_SIZE must equal PA start (x9) modulo L3C_SIZE.
*/
LENTRY(build_l3_page_pagetable)
/*
@@ -762,8 +814,17 @@ LENTRY(build_l3_page_pagetable)
/* Only use the output address bits */
lsr x9, x9, #L3_SHIFT
+ /* Check if an ATTR_CONTIGUOUS mapping is possible */
+1: tst x11, #(L3C_ENTRIES - 1)
+ b.ne 2f
+ cmp x10, #L3C_ENTRIES
+ b.lo 3f
+ orr x12, x12, #(ATTR_CONTIGUOUS)
+ b 2f
+3: and x12, x12, #(~ATTR_CONTIGUOUS)
+
/* Set the physical address for this virtual address */
-1: orr x13, x12, x9, lsl #L3_SHIFT
+2: orr x13, x12, x9, lsl #L3_SHIFT
/* Store the entry */
str x13, [x6, x11, lsl #3]
diff --git a/sys/arm64/arm64/mem.c b/sys/arm64/arm64/mem.c
index 1f44d547204e..2a998ca1f845 100644
--- a/sys/arm64/arm64/mem.c
+++ b/sys/arm64/arm64/mem.c
@@ -49,6 +49,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
struct vm_page m;
vm_page_t marr;
vm_offset_t off, v;
+ vm_prot_t prot;
u_int cnt;
int error;
@@ -78,8 +79,16 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
break;
}
- if (!kernacc((void *)v, cnt, uio->uio_rw == UIO_READ ?
- VM_PROT_READ : VM_PROT_WRITE)) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
+ prot = VM_PROT_READ;
+ break;
+ case UIO_WRITE:
+ prot = VM_PROT_WRITE;
+ break;
+ }
+
+ if (!kernacc((void *)v, cnt, prot)) {
error = EFAULT;
break;
}
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index 9c6175445572..e9b015443477 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -106,7 +106,8 @@ static void ipi_stop(void *);
static u_int fdt_cpuid;
#endif
-void mpentry(unsigned long cpuid);
+void mpentry_psci(unsigned long cpuid);
+void mpentry_spintable(void);
void init_secondary(uint64_t);
/* Synchronize AP startup. */
@@ -114,6 +115,7 @@ static struct mtx ap_boot_mtx;
/* Used to initialize the PCPU ahead of calling init_secondary(). */
void *bootpcpu;
+uint64_t ap_cpuid;
/* Stacks for AP initialization, discarded once idle threads are started. */
void *bootstack;
@@ -420,18 +422,25 @@ enable_cpu_spin(uint64_t cpu, vm_paddr_t entry, vm_paddr_t release_paddr)
{
vm_paddr_t *release_addr;
- release_addr = pmap_mapdev(release_paddr, sizeof(*release_addr));
+ ap_cpuid = cpu & CPU_AFF_MASK;
+
+ release_addr = pmap_mapdev_attr(release_paddr, sizeof(*release_addr),
+ VM_MEMATTR_DEFAULT);
if (release_addr == NULL)
return (ENOMEM);
*release_addr = entry;
+ cpu_dcache_wbinv_range(release_addr, sizeof(*release_addr));
pmap_unmapdev(release_addr, sizeof(*release_addr));
__asm __volatile(
- "dsb sy \n"
"sev \n"
::: "memory");
+ /* Wait for the target CPU to start */
+ while (atomic_load_64(&ap_cpuid) != 0)
+ __asm __volatile("wfe");
+
return (0);
}
@@ -475,7 +484,6 @@ start_cpu(u_int cpuid, uint64_t target_cpu, int domain, vm_paddr_t release_addr)
bootstack = (char *)bootstacks[cpuid] + MP_BOOTSTACK_SIZE;
printf("Starting CPU %u (%lx)\n", cpuid, target_cpu);
- pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry);
/*
* A limited set of hardware we support can only do spintables and
@@ -483,10 +491,13 @@ start_cpu(u_int cpuid, uint64_t target_cpu, int domain, vm_paddr_t release_addr)
* PSCI branch here.
*/
MPASS(release_addr == 0 || !psci_present);
- if (release_addr != 0)
+ if (release_addr != 0) {
+ pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry_spintable);
err = enable_cpu_spin(target_cpu, pa, release_addr);
- else
+ } else {
+ pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry_psci);
err = enable_cpu_psci(target_cpu, pa, cpuid);
+ }
if (err != 0) {
pcpu_destroy(pcpup);
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index ea7ff18971e4..2ce313de36cf 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -281,6 +281,9 @@ VM_PAGE_TO_PV_LIST_LOCK(vm_page_t m)
} \
} while (0)
+#define PTE_TO_VM_PAGE(pte) PHYS_TO_VM_PAGE(PTE_TO_PHYS(pte))
+#define VM_PAGE_TO_PTE(m) PHYS_TO_PTE(VM_PAGE_TO_PHYS(m))
+
/*
* The presence of this flag indicates that the mapping is writeable.
* If the ATTR_S1_AP_RO bit is also set, then the mapping is clean, otherwise
@@ -426,7 +429,6 @@ void (*pmap_stage2_invalidate_all)(uint64_t);
#define TLBI_VA_SHIFT 12
#define TLBI_VA_MASK ((1ul << 44) - 1)
#define TLBI_VA(addr) (((addr) >> TLBI_VA_SHIFT) & TLBI_VA_MASK)
-#define TLBI_VA_L3_INCR (L3_SIZE >> TLBI_VA_SHIFT)
static int __read_frequently superpages_enabled = 1;
SYSCTL_INT(_vm_pmap, OID_AUTO, superpages_enabled,
@@ -467,6 +469,7 @@ static pt_entry_t *pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va);
static pt_entry_t *pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2,
vm_offset_t va, struct rwlock **lockp);
static pt_entry_t *pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va);
+static bool pmap_demote_l2c(pmap_t pmap, pt_entry_t *l2p, vm_offset_t va);
static bool pmap_demote_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va);
static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va,
vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp);
@@ -1105,6 +1108,7 @@ pmap_bootstrap_l2_table(struct pmap_bootstrap_state *state)
static void
pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i)
{
+ pt_entry_t contig;
u_int l2_slot;
bool first;
@@ -1115,7 +1119,7 @@ pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i)
pmap_bootstrap_l1_table(state);
MPASS((state->va & L2_OFFSET) == 0);
- for (first = true;
+ for (first = true, contig = 0;
state->va < DMAP_MAX_ADDRESS &&
(physmap[i + 1] - state->pa) >= L2_SIZE;
state->va += L2_SIZE, state->pa += L2_SIZE) {
@@ -1126,13 +1130,27 @@ pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i)
if (!first && (state->pa & L1_OFFSET) == 0)
break;
+ /*
+ * If we have an aligned, contiguous chunk of L2C_ENTRIES
+ * L2 blocks, set the contiguous bit within each PTE so that
+ * the chunk can be cached using only one TLB entry.
+ */
+ if ((state->pa & L2C_OFFSET) == 0) {
+ if (state->va + L2C_SIZE < DMAP_MAX_ADDRESS &&
+ physmap[i + 1] - state->pa >= L2C_SIZE) {
+ contig = ATTR_CONTIGUOUS;
+ } else {
+ contig = 0;
+ }
+ }
+
first = false;
l2_slot = pmap_l2_index(state->va);
MPASS((state->pa & L2_OFFSET) == 0);
MPASS(state->l2[l2_slot] == 0);
pmap_store(&state->l2[l2_slot], PHYS_TO_PTE(state->pa) |
ATTR_DEFAULT | ATTR_S1_XN | ATTR_KERN_GP |
- ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK);
+ ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | contig | L2_BLOCK);
}
MPASS(state->va == (state->pa - dmap_phys_base + DMAP_MIN_ADDRESS));
}
@@ -1664,6 +1682,20 @@ pmap_init(void)
vm_initialized = 1;
}
+static SYSCTL_NODE(_vm_pmap, OID_AUTO, l1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+ "L1 (1GB/64GB) page mapping counters");
+
+static COUNTER_U64_DEFINE_EARLY(pmap_l1_demotions);
+SYSCTL_COUNTER_U64(_vm_pmap_l1, OID_AUTO, demotions, CTLFLAG_RD,
+ &pmap_l1_demotions, "L1 (1GB/64GB) page demotions");
+
+static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2c, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+ "L2C (32MB/1GB) page mapping counters");
+
+static COUNTER_U64_DEFINE_EARLY(pmap_l2c_demotions);
+SYSCTL_COUNTER_U64(_vm_pmap_l2c, OID_AUTO, demotions, CTLFLAG_RD,
+ &pmap_l2c_demotions, "L2C (32MB/1GB) page demotions");
+
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"2MB page mapping counters");
@@ -1684,15 +1716,23 @@ SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, promotions, CTLFLAG_RD,
&pmap_l2_promotions, 0, "2MB page promotions");
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l3c, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
- "64KB page mapping counters");
+ "L3C (64KB/2MB) page mapping counters");
+
+static COUNTER_U64_DEFINE_EARLY(pmap_l3c_demotions);
+SYSCTL_COUNTER_U64(_vm_pmap_l3c, OID_AUTO, demotions, CTLFLAG_RD,
+ &pmap_l3c_demotions, "L3C (64KB/2MB) page demotions");
-static u_long pmap_l3c_demotions;
-SYSCTL_ULONG(_vm_pmap_l3c, OID_AUTO, demotions, CTLFLAG_RD,
- &pmap_l3c_demotions, 0, "64KB page demotions");
+static COUNTER_U64_DEFINE_EARLY(pmap_l3c_mappings);
+SYSCTL_COUNTER_U64(_vm_pmap_l3c, OID_AUTO, mappings, CTLFLAG_RD,
+ &pmap_l3c_mappings, "L3C (64KB/2MB) page mappings");
-static u_long pmap_l3c_mappings;
-SYSCTL_ULONG(_vm_pmap_l3c, OID_AUTO, mappings, CTLFLAG_RD,
- &pmap_l3c_mappings, 0, "64KB page mappings");
+static COUNTER_U64_DEFINE_EARLY(pmap_l3c_p_failures);
+SYSCTL_COUNTER_U64(_vm_pmap_l3c, OID_AUTO, p_failures, CTLFLAG_RD,
+ &pmap_l3c_p_failures, "L3C (64KB/2MB) page promotion failures");
+
+static COUNTER_U64_DEFINE_EARLY(pmap_l3c_promotions);
+SYSCTL_COUNTER_U64(_vm_pmap_l3c, OID_AUTO, promotions, CTLFLAG_RD,
+ &pmap_l3c_promotions, "L3C (64KB/2MB) page promotions");
/*
* If the given value for "final_only" is false, then any cached intermediate-
@@ -1760,12 +1800,12 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va, bool final_only)
}
/*
- * Invalidates any cached final- and optionally intermediate-level TLB entries
- * for the specified virtual address range in the given virtual address space.
+ * Use stride L{1,2}_SIZE when invalidating the TLB entries for L{1,2}_BLOCK
+ * mappings. Otherwise, use stride L3_SIZE.
*/
static __inline void
-pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
- bool final_only)
+pmap_s1_invalidate_strided(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
+ vm_offset_t stride, bool final_only)
{
uint64_t end, r, start;
@@ -1775,19 +1815,30 @@ pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
if (pmap == kernel_pmap) {
start = TLBI_VA(sva);
end = TLBI_VA(eva);
- for (r = start; r < end; r += TLBI_VA_L3_INCR)
+ for (r = start; r < end; r += TLBI_VA(stride))
pmap_s1_invalidate_kernel(r, final_only);
} else {
start = end = ASID_TO_OPERAND(COOKIE_TO_ASID(pmap->pm_cookie));
start |= TLBI_VA(sva);
end |= TLBI_VA(eva);
- for (r = start; r < end; r += TLBI_VA_L3_INCR)
+ for (r = start; r < end; r += TLBI_VA(stride))
pmap_s1_invalidate_user(r, final_only);
}
dsb(ish);
isb();
}
+/*
+ * Invalidates any cached final- and optionally intermediate-level TLB entries
+ * for the specified virtual address range in the given virtual address space.
+ */
+static __inline void
+pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
+ bool final_only)
+{
+ pmap_s1_invalidate_strided(pmap, sva, eva, L3_SIZE, final_only);
+}
+
static __inline void
pmap_s2_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
bool final_only)
@@ -2087,7 +2138,7 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode)
*/
if ((va & L2_OFFSET) == 0 && size >= L2_SIZE &&
(pa & L2_OFFSET) == 0 && vm_initialized) {
- mpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(pde)));
+ mpte = PTE_TO_VM_PAGE(pmap_load(pde));
KASSERT(pmap_every_pte_zero(VM_PAGE_TO_PHYS(mpte)),
("pmap_kenter: Unexpected mapping"));
PMAP_LOCK(kernel_pmap);
@@ -2271,7 +2322,7 @@ void
pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count)
{
pd_entry_t *pde;
- pt_entry_t attr, old_l3e, pa, *pte;
+ pt_entry_t attr, old_l3e, *pte;
vm_offset_t va;
vm_page_t m;
int i, lvl;
@@ -2286,11 +2337,10 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count)
("pmap_qenter: Invalid level %d", lvl));
m = ma[i];
- pa = VM_PAGE_TO_PHYS(m);
attr = ATTR_DEFAULT | ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_S1_XN |
ATTR_KERN_GP | ATTR_S1_IDX(m->md.pv_memattr) | L3_PAGE;
pte = pmap_l2_to_l3(pde, va);
- old_l3e |= pmap_load_store(pte, PHYS_TO_PTE(pa) | attr);
+ old_l3e |= pmap_load_store(pte, VM_PAGE_TO_PTE(m) | attr);
va += L3_SIZE;
}
@@ -2403,7 +2453,7 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free)
l1 = pmap_l1(pmap, va);
tl1 = pmap_load(l1);
- l2pg = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tl1));
+ l2pg = PTE_TO_VM_PAGE(tl1);
pmap_unwire_l3(pmap, va, l2pg, free);
} else if (m->pindex < (NUL2E + NUL1E)) {
/* We just released an l2, unhold the matching l1 */
@@ -2412,7 +2462,7 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free)
l0 = pmap_l0(pmap, va);
tl0 = pmap_load(l0);
- l1pg = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tl0));
+ l1pg = PTE_TO_VM_PAGE(tl0);
pmap_unwire_l3(pmap, va, l1pg, free);
}
pmap_invalidate_page(pmap, va, false);
@@ -2439,7 +2489,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t va, pd_entry_t ptepde,
if (ADDR_IS_KERNEL(va))
return (0);
KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0"));
- mpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(ptepde));
+ mpte = PTE_TO_VM_PAGE(ptepde);
return (pmap_unwire_l3(pmap, va, mpte, free));
}
@@ -2602,7 +2652,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
l0p = &pmap->pm_l0[l0index];
KASSERT((pmap_load(l0p) & ATTR_DESCR_VALID) == 0,
("%s: L0 entry %#lx is valid", __func__, pmap_load(l0p)));
- l0e = PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) | L0_TABLE;
+ l0e = VM_PAGE_TO_PTE(m) | L0_TABLE;
/*
* Mark all kernel memory as not accessible from userspace
@@ -2634,7 +2684,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
return (NULL);
}
} else {
- l1pg = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tl0));
+ l1pg = PTE_TO_VM_PAGE(tl0);
l1pg->ref_count++;
}
@@ -2642,7 +2692,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
l1 = &l1[ptepindex & Ln_ADDR_MASK];
KASSERT((pmap_load(l1) & ATTR_DESCR_VALID) == 0,
("%s: L1 entry %#lx is valid", __func__, pmap_load(l1)));
- pmap_store(l1, PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) | L1_TABLE);
+ pmap_store(l1, VM_PAGE_TO_PTE(m) | L1_TABLE);
} else {
vm_pindex_t l0index, l1index;
pd_entry_t *l0, *l1, *l2;
@@ -2677,7 +2727,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
return (NULL);
}
} else {
- l2pg = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tl1));
+ l2pg = PTE_TO_VM_PAGE(tl1);
l2pg->ref_count++;
}
}
@@ -2686,7 +2736,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
l2 = &l2[ptepindex & Ln_ADDR_MASK];
KASSERT((pmap_load(l2) & ATTR_DESCR_VALID) == 0,
("%s: L2 entry %#lx is valid", __func__, pmap_load(l2)));
- pmap_store(l2, PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) | L2_TABLE);
+ pmap_store(l2, VM_PAGE_TO_PTE(m) | L2_TABLE);
}
pmap_resident_count_inc(pmap, 1);
@@ -2711,7 +2761,7 @@ retry:
l2 = pmap_l1_to_l2(l1, va);
if (!ADDR_IS_KERNEL(va)) {
/* Add a reference to the L2 page. */
- l2pg = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l1)));
+ l2pg = PTE_TO_VM_PAGE(pmap_load(l1));
l2pg->ref_count++;
} else
l2pg = NULL;
@@ -2780,7 +2830,7 @@ retry:
case 2:
tpde = pmap_load(pde);
if (tpde != 0) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tpde));
+ m = PTE_TO_VM_PAGE(tpde);
m->ref_count++;
return (m);
}
@@ -2899,7 +2949,6 @@ SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_MPSAFE,
void
pmap_growkernel(vm_offset_t addr)
{
- vm_paddr_t paddr;
vm_page_t nkpg;
pd_entry_t *l0, *l1, *l2;
@@ -2927,8 +2976,7 @@ pmap_growkernel(vm_offset_t addr)
nkpg->pindex = kernel_vm_end >> L1_SHIFT;
/* See the dmb() in _pmap_alloc_l3(). */
dmb(ishst);
- paddr = VM_PAGE_TO_PHYS(nkpg);
- pmap_store(l1, PHYS_TO_PTE(paddr) | L1_TABLE);
+ pmap_store(l1, VM_PAGE_TO_PTE(nkpg) | L1_TABLE);
continue; /* try again */
}
l2 = pmap_l1_to_l2(l1, kernel_vm_end);
@@ -2948,8 +2996,7 @@ pmap_growkernel(vm_offset_t addr)
nkpg->pindex = kernel_vm_end >> L2_SHIFT;
/* See the dmb() in _pmap_alloc_l3(). */
dmb(ishst);
- paddr = VM_PAGE_TO_PHYS(nkpg);
- pmap_store(l2, PHYS_TO_PTE(paddr) | L2_TABLE);
+ pmap_store(l2, VM_PAGE_TO_PTE(nkpg) | L2_TABLE);
kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET;
if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) {
@@ -3102,7 +3149,7 @@ reclaim_pv_chunk_domain(pmap_t locked_pmap, struct rwlock **lockp, int domain)
if ((tpte & ATTR_CONTIGUOUS) != 0)
(void)pmap_demote_l3c(pmap, pte, va);
tpte = pmap_load_clear(pte);
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(tpte));
+ m = PTE_TO_VM_PAGE(tpte);
if (pmap_pte_dirty(pmap, tpte))
vm_page_dirty(m);
if ((tpte & ATTR_AF) != 0) {
@@ -3682,7 +3729,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva,
pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE;
pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE);
if (old_l2 & ATTR_SW_MANAGED) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(old_l2));
+ m = PTE_TO_VM_PAGE(old_l2);
pvh = page_to_pvh(m);
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m);
pmap_pvh_free(pvh, pmap, sva);
@@ -3734,7 +3781,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t va,
pmap->pm_stats.wired_count -= 1;
pmap_resident_count_dec(pmap, 1);
if (old_l3 & ATTR_SW_MANAGED) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(old_l3));
+ m = PTE_TO_VM_PAGE(old_l3);
if (pmap_pte_dirty(pmap, old_l3))
vm_page_dirty(m);
if (old_l3 & ATTR_AF)
@@ -3793,7 +3840,7 @@ pmap_remove_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va, vm_offset_t *vap,
pmap->pm_stats.wired_count -= L3C_ENTRIES;
pmap_resident_count_dec(pmap, L3C_ENTRIES);
if ((first_l3e & ATTR_SW_MANAGED) != 0) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(first_l3e));
+ m = PTE_TO_VM_PAGE(first_l3e);
new_lock = VM_PAGE_TO_PV_LIST_LOCK(m);
if (new_lock != *lockp) {
if (*lockp != NULL) {
@@ -3862,7 +3909,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva,
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
KASSERT(rounddown2(sva, L2_SIZE) + L2_SIZE == roundup2(eva, L2_SIZE),
("pmap_remove_l3_range: range crosses an L3 page table boundary"));
- l3pg = !ADDR_IS_KERNEL(sva) ? PHYS_TO_VM_PAGE(PTE_TO_PHYS(l2e)) : NULL;
+ l3pg = !ADDR_IS_KERNEL(sva) ? PTE_TO_VM_PAGE(l2e) : NULL;
va = eva;
for (l3 = pmap_l2_to_l3(&l2e, sva); sva != eva; l3++, sva += L3_SIZE) {
old_l3 = pmap_load(l3);
@@ -3899,7 +3946,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva,
pmap->pm_stats.wired_count--;
pmap_resident_count_dec(pmap, 1);
if ((old_l3 & ATTR_SW_MANAGED) != 0) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(old_l3));
+ m = PTE_TO_VM_PAGE(old_l3);
if (pmap_pte_dirty(pmap, old_l3))
vm_page_dirty(m);
if ((old_l3 & ATTR_AF) != 0)
@@ -4212,7 +4259,7 @@ pmap_protect_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pt_entry_t mask,
if ((old_l2 & ATTR_SW_MANAGED) != 0 &&
(nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 &&
pmap_pte_dirty(pmap, old_l2)) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(old_l2));
+ m = PTE_TO_VM_PAGE(old_l2);
for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++)
vm_page_dirty(mt);
}
@@ -4263,7 +4310,7 @@ pmap_mask_set_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va,
if ((l3e & ATTR_SW_MANAGED) != 0 &&
(nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 &&
dirty) {
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l3p)));
+ m = PTE_TO_VM_PAGE(pmap_load(l3p));
for (mt = m; mt < &m[L3C_ENTRIES]; mt++)
vm_page_dirty(mt);
}
@@ -4397,7 +4444,7 @@ pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t m
if ((l3 & ATTR_SW_MANAGED) != 0 &&
(nbits & ATTR_S1_AP(ATTR_S1_AP_RO)) != 0 &&
pmap_pte_dirty(pmap, l3))
- vm_page_dirty(PHYS_TO_VM_PAGE(PTE_TO_PHYS(l3)));
+ vm_page_dirty(PTE_TO_VM_PAGE(l3));
if (va == va_next)
va = sva;
@@ -4514,7 +4561,6 @@ static void
pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte,
vm_offset_t va, vm_size_t size)
{
- pd_entry_t *lip, *ptep_end;
register_t intr;
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
@@ -4522,11 +4568,6 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte,
if ((newpte & ATTR_SW_NO_PROMOTE) != 0)
panic("%s: Updating non-promote pte", __func__);
- if (size == L3C_SIZE)
- ptep_end = ptep + L3C_ENTRIES;
- else
- ptep_end = ptep + 1;
-
/*
* Ensure we don't get switched out with the page table in an
* inconsistent state. We also need to ensure no interrupts fire
@@ -4539,8 +4580,7 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte,
* unchanged, so that a lockless, concurrent pmap_kextract() can still
* lookup the physical address.
*/
- for (lip = ptep; lip < ptep_end; lip++)
- pmap_clear_bits(lip, ATTR_DESCR_VALID);
+ pmap_clear_bits(ptep, ATTR_DESCR_VALID);
/*
* When promoting, the L{1,2}_TABLE entry that is being replaced might
@@ -4550,9 +4590,49 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte,
pmap_s1_invalidate_range(pmap, va, va + size, false);
/* Create the new mapping */
+ pmap_store(ptep, newpte);
+ dsb(ishst);
+
+ intr_restore(intr);
+}
+
+/*
+ * Performs a break-before-make update of an ATTR_CONTIGUOUS mapping.
+ */
+static void
+pmap_update_strided(pmap_t pmap, pd_entry_t *ptep, pd_entry_t *ptep_end,
+ pd_entry_t newpte, vm_offset_t va, vm_offset_t stride, vm_size_t size)
+{
+ pd_entry_t *lip;
+ register_t intr;
+
+ PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+
+ if ((newpte & ATTR_SW_NO_PROMOTE) != 0)
+ panic("%s: Updating non-promote pte", __func__);
+
+ /*
+ * Ensure we don't get switched out with the page table in an
+ * inconsistent state. We also need to ensure no interrupts fire
+ * as they may make use of an address we are about to invalidate.
+ */
+ intr = intr_disable();
+
+ /*
+ * Clear the old mapping's valid bits, but leave the rest of each
+ * entry unchanged, so that a lockless, concurrent pmap_kextract() can
+ * still lookup the physical address.
+ */
+ for (lip = ptep; lip < ptep_end; lip++)
+ pmap_clear_bits(lip, ATTR_DESCR_VALID);
+
+ /* Only final entries are changing. */
+ pmap_s1_invalidate_strided(pmap, va, va + size, stride, true);
+
+ /* Create the new mapping. */
for (lip = ptep; lip < ptep_end; lip++) {
pmap_store(lip, newpte);
- newpte += PAGE_SIZE;
+ newpte += stride;
}
dsb(ishst);
@@ -4725,7 +4805,7 @@ setl3:
* destroyed by pmap_remove_l3().
*/
if (mpte == NULL)
- mpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2)));
+ mpte = PTE_TO_VM_PAGE(pmap_load(l2));
KASSERT(mpte >= vm_page_array &&
mpte < &vm_page_array[vm_page_array_size],
("pmap_promote_l2: page table page is out of range"));
@@ -4749,6 +4829,131 @@ setl3:
pmap);
return (true);
}
+
+/*
+ * Tries to promote an aligned, contiguous set of base page mappings to a
+ * single L3C page mapping. For promotion to occur, two conditions must be
+ * met: (1) the base page mappings must map aligned, contiguous physical
+ * memory and (2) the base page mappings must have identical characteristics
+ * except for the accessed flag.
+ */
+static bool
+pmap_promote_l3c(pmap_t pmap, pd_entry_t *l3p, vm_offset_t va)
+{
+ pd_entry_t all_l3e_AF, firstl3c, *l3, oldl3, pa;
+
+ PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+
+ /*
+ * Currently, this function only supports promotion on stage 1 pmaps
+ * because it tests stage 1 specific fields and performs a break-
+ * before-make sequence that is incorrect for stage 2 pmaps.
+ */
+ if (pmap->pm_stage != PM_STAGE1 || !pmap_ps_enabled(pmap))
+ return (false);
+
+ /*
+ * Compute the address of the first L3 entry in the superpage
+ * candidate.
+ */
+ l3p = (pt_entry_t *)((uintptr_t)l3p & ~((L3C_ENTRIES *
+ sizeof(pt_entry_t)) - 1));
+
+ firstl3c = pmap_load(l3p);
+
+ /*
+ * Examine the first L3 entry. Abort if this L3E is ineligible for
+ * promotion...
+ */
+ if ((firstl3c & ATTR_SW_NO_PROMOTE) != 0)
+ return (false);
+ /* ...is not properly aligned... */
+ if ((PTE_TO_PHYS(firstl3c) & L3C_OFFSET) != 0 ||
+ (firstl3c & ATTR_DESCR_MASK) != L3_PAGE) { /* ...or is invalid. */
+ counter_u64_add(pmap_l3c_p_failures, 1);
+ CTR2(KTR_PMAP, "pmap_promote_l3c: failure for va %#lx"
+ " in pmap %p", va, pmap);
+ return (false);
+ }
+
+ /*
+ * If the first L3 entry is a clean read-write mapping, convert it
+ * to a read-only mapping. See pmap_promote_l2() for the rationale.
+ */
+set_first:
+ if ((firstl3c & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) ==
+ (ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM)) {
+ /*
+ * When the mapping is clean, i.e., ATTR_S1_AP_RO is set,
+ * ATTR_SW_DBM can be cleared without a TLB invalidation.
+ */
+ if (!atomic_fcmpset_64(l3p, &firstl3c, firstl3c & ~ATTR_SW_DBM))
+ goto set_first;
+ firstl3c &= ~ATTR_SW_DBM;
+ CTR2(KTR_PMAP, "pmap_promote_l3c: protect for va %#lx"
+ " in pmap %p", va & ~L3C_OFFSET, pmap);
+ }
+
+ /*
+ * Check that the rest of the L3 entries are compatible with the first,
+ * and convert clean read-write mappings to read-only mappings.
+ */
+ all_l3e_AF = firstl3c & ATTR_AF;
+ pa = (PTE_TO_PHYS(firstl3c) | (firstl3c & ATTR_DESCR_MASK)) +
+ L3C_SIZE - PAGE_SIZE;
+ for (l3 = l3p + L3C_ENTRIES - 1; l3 > l3p; l3--) {
+ oldl3 = pmap_load(l3);
+ if ((PTE_TO_PHYS(oldl3) | (oldl3 & ATTR_DESCR_MASK)) != pa) {
+ counter_u64_add(pmap_l3c_p_failures, 1);
+ CTR2(KTR_PMAP, "pmap_promote_l3c: failure for va %#lx"
+ " in pmap %p", va, pmap);
+ return (false);
+ }
+set_l3:
+ if ((oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) ==
+ (ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM)) {
+ /*
+ * When the mapping is clean, i.e., ATTR_S1_AP_RO is
+ * set, ATTR_SW_DBM can be cleared without a TLB
+ * invalidation.
+ */
+ if (!atomic_fcmpset_64(l3, &oldl3, oldl3 &
+ ~ATTR_SW_DBM))
+ goto set_l3;
+ oldl3 &= ~ATTR_SW_DBM;
+ CTR2(KTR_PMAP, "pmap_promote_l3c: protect for va %#lx"
+ " in pmap %p", (oldl3 & ~ATTR_MASK & L3C_OFFSET) |
+ (va & ~L3C_OFFSET), pmap);
+ }
+ if ((oldl3 & ATTR_PROMOTE) != (firstl3c & ATTR_PROMOTE)) {
+ counter_u64_add(pmap_l3c_p_failures, 1);
+ CTR2(KTR_PMAP, "pmap_promote_l3c: failure for va %#lx"
+ " in pmap %p", va, pmap);
+ return (false);
+ }
+ all_l3e_AF &= oldl3;
+ pa -= PAGE_SIZE;
+ }
+
+ /*
+ * Unless all PTEs have ATTR_AF set, clear it from the superpage
+ * mapping, so that promotions triggered by speculative mappings,
+ * such as pmap_enter_quick(), don't automatically mark the
+ * underlying pages as referenced.
+ */
+ firstl3c &= ~ATTR_AF | all_l3e_AF;
+
+ /*
+ * Remake the mappings with the contiguous bit set.
+ */
+ pmap_update_strided(pmap, l3p, l3p + L3C_ENTRIES, firstl3c |
+ ATTR_CONTIGUOUS, va & ~L3C_OFFSET, L3_SIZE, L3C_SIZE);
+
+ counter_u64_add(pmap_l3c_promotions, 1);
+ CTR2(KTR_PMAP, "pmap_promote_l3c: success for va %#lx in pmap %p", va,
+ pmap);
+ return (true);
+}
#endif /* VM_NRESERVLEVEL > 0 */
static int
@@ -4790,8 +4995,7 @@ restart:
KASSERT(l1p != NULL, ("va %#lx lost l1 entry", va));
origpte = pmap_load(l1p);
if ((origpte & ATTR_DESCR_VALID) == 0) {
- mp = PHYS_TO_VM_PAGE(
- PTE_TO_PHYS(pmap_load(l0p)));
+ mp = PTE_TO_VM_PAGE(pmap_load(l0p));
mp->ref_count++;
}
}
@@ -4820,8 +5024,7 @@ restart:
l1p = pmap_l1(pmap, va);
origpte = pmap_load(l2p);
if ((origpte & ATTR_DESCR_VALID) == 0) {
- mp = PHYS_TO_VM_PAGE(
- PTE_TO_PHYS(pmap_load(l1p)));
+ mp = PTE_TO_VM_PAGE(pmap_load(l1p));
mp->ref_count++;
}
}
@@ -4956,7 +5159,7 @@ retry:
if (pde != NULL && lvl == 2) {
l3 = pmap_l2_to_l3(pde, va);
if (!ADDR_IS_KERNEL(va) && mpte == NULL) {
- mpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(pde)));
+ mpte = PTE_TO_VM_PAGE(pmap_load(pde));
mpte->ref_count++;
}
goto havel3;
@@ -4966,8 +5169,7 @@ retry:
(l3 = pmap_demote_l2_locked(pmap, l2, va, &lock)) != NULL) {
l3 = &l3[pmap_l3_index(va)];
if (!ADDR_IS_KERNEL(va)) {
- mpte = PHYS_TO_VM_PAGE(
- PTE_TO_PHYS(pmap_load(l2)));
+ mpte = PTE_TO_VM_PAGE(pmap_load(l2));
mpte->ref_count++;
}
goto havel3;
@@ -5161,11 +5363,18 @@ validate:
#if VM_NRESERVLEVEL > 0
/*
- * If both the page table page and the reservation are fully
- * populated, then attempt promotion.
+ * First, attempt L3C promotion, if the virtual and physical addresses
+ * are aligned with each other and an underlying reservation has the
+ * neighboring L3 pages allocated. The first condition is simply an
+ * optimization that recognizes some eventual promotion failures early
+ * at a lower run-time cost. Then, if both the page table page and
+ * the reservation are fully populated, attempt L2 promotion.
*/
- if ((mpte == NULL || mpte->ref_count == NL3PG) &&
+ if ((va & L3C_OFFSET) == (pa & L3C_OFFSET) &&
(m->flags & PG_FICTITIOUS) == 0 &&
+ vm_reserv_is_populated(m, L3C_ENTRIES) &&
+ pmap_promote_l3c(pmap, l3, va) &&
+ (mpte == NULL || mpte->ref_count == NL3PG) &&
vm_reserv_level_iffullpop(m) == 0)
(void)pmap_promote_l2(pmap, pde, va, mpte, &lock);
#endif
@@ -5195,7 +5404,7 @@ pmap_enter_l2_rx(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
KASSERT(ADDR_IS_CANONICAL(va),
("%s: Address not in canonical form: %lx", __func__, va));
- new_l2 = (pd_entry_t)(PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) | ATTR_DEFAULT |
+ new_l2 = (pd_entry_t)(VM_PAGE_TO_PTE(m) | ATTR_DEFAULT |
ATTR_S1_IDX(m->md.pv_memattr) | ATTR_S1_AP(ATTR_S1_AP_RO) |
L2_BLOCK);
new_l2 |= pmap_pte_bti(pmap, va);
@@ -5324,7 +5533,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags,
* an invalidation at all levels after clearing
* the L2_TABLE entry.
*/
- mt = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2)));
+ mt = PTE_TO_VM_PAGE(pmap_load(l2));
if (pmap_insert_pt_page(pmap, mt, false, false))
panic("pmap_enter_l2: trie insert failed");
pmap_clear(l2);
@@ -5423,7 +5632,7 @@ pmap_enter_l3c_rx(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *ml3p,
KASSERT(ADDR_IS_CANONICAL(va),
("%s: Address not in canonical form: %lx", __func__, va));
- l3e = PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) | ATTR_DEFAULT |
+ l3e = VM_PAGE_TO_PTE(m) | ATTR_DEFAULT |
ATTR_S1_IDX(m->md.pv_memattr) | ATTR_S1_AP(ATTR_S1_AP_RO) |
ATTR_CONTIGUOUS | L3_PAGE;
l3e |= pmap_pte_bti(pmap, va);
@@ -5492,9 +5701,8 @@ retry:
l3p = pmap_demote_l2_locked(pmap, l2p,
va, lockp);
if (l3p != NULL) {
- *ml3p = PHYS_TO_VM_PAGE(
- PTE_TO_PHYS(pmap_load(
- l2p)));
+ *ml3p = PTE_TO_VM_PAGE(
+ pmap_load(l2p));
(*ml3p)->ref_count +=
L3C_ENTRIES;
goto have_l3p;
@@ -5508,8 +5716,7 @@ retry:
* count. Otherwise, we attempt to allocate it.
*/
if (lvl == 2 && pmap_load(pde) != 0) {
- *ml3p = PHYS_TO_VM_PAGE(PTE_TO_PHYS(
- pmap_load(pde)));
+ *ml3p = PTE_TO_VM_PAGE(pmap_load(pde));
(*ml3p)->ref_count += L3C_ENTRIES;
} else {
*ml3p = _pmap_alloc_l3(pmap, l2pindex, (flags &
@@ -5528,6 +5735,19 @@ retry:
}
}
l3p = (pt_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*ml3p));
+
+have_l3p:
+ /*
+ * If bti is not the same for the whole L3C range, return
+ * failure and let vm_fault() cope. Check after L3 allocation,
+ * since it could sleep.
+ */
+ if (!pmap_bti_same(pmap, va, va + L3C_SIZE)) {
+ (*ml3p)->ref_count -= L3C_ENTRIES - 1;
+ pmap_abort_ptp(pmap, va, *ml3p);
+ *ml3p = NULL;
+ return (KERN_PROTECTION_FAILURE);
+ }
} else {
*ml3p = NULL;
@@ -5550,23 +5770,9 @@ retry:
pmap_load(pde)));
}
}
-have_l3p:
l3p = &l3p[pmap_l3_index(va)];
/*
- * If bti is not the same for the whole L3C range, return failure
- * and let vm_fault() cope. Check after L3 allocation, since
- * it could sleep.
- */
- if (!pmap_bti_same(pmap, va, va + L3C_SIZE)) {
- KASSERT(*ml3p != NULL, ("pmap_enter_l3c: missing L3 PTP"));
- (*ml3p)->ref_count -= L3C_ENTRIES - 1;
- pmap_abort_ptp(pmap, va, *ml3p);
- *ml3p = NULL;
- return (KERN_PROTECTION_FAILURE);
- }
-
- /*
* If there are existing mappings, either abort or remove them.
*/
if ((flags & PMAP_ENTER_NOREPLACE) != 0) {
@@ -5630,7 +5836,7 @@ have_l3p:
}
dsb(ishst);
- atomic_add_long(&pmap_l3c_mappings, 1);
+ counter_u64_add(pmap_l3c_mappings, 1);
CTR2(KTR_PMAP, "pmap_enter_l3c: success for va %#lx in pmap %p",
va, pmap);
return (KERN_SUCCESS);
@@ -5715,7 +5921,6 @@ static vm_page_t
pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp)
{
- pd_entry_t *pde;
pt_entry_t *l1, *l2, *l3, l3_val;
vm_paddr_t pa;
int lvl;
@@ -5762,8 +5967,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
if ((pmap_load(l2) & ATTR_DESCR_MASK) ==
L2_BLOCK)
return (NULL);
- mpte = PHYS_TO_VM_PAGE(
- PTE_TO_PHYS(pmap_load(l2)));
+ mpte = PTE_TO_VM_PAGE(pmap_load(l2));
mpte->ref_count++;
} else {
mpte = _pmap_alloc_l3(pmap, l2pindex,
@@ -5781,13 +5985,13 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
l3 = &l3[pmap_l3_index(va)];
} else {
mpte = NULL;
- pde = pmap_pde(kernel_pmap, va, &lvl);
- KASSERT(pde != NULL,
+ l2 = pmap_pde(kernel_pmap, va, &lvl);
+ KASSERT(l2 != NULL,
("pmap_enter_quick_locked: Invalid page entry, va: 0x%lx",
va));
KASSERT(lvl == 2,
("pmap_enter_quick_locked: Invalid level %d", lvl));
- l3 = pmap_l2_to_l3(pde, va);
+ l3 = pmap_l2_to_l3(l2, va);
}
/*
@@ -6022,8 +6226,7 @@ pmap_copy_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va, pt_entry_t l3e,
return (false);
}
- if (!pmap_pv_insert_l3c(pmap, va, PHYS_TO_VM_PAGE(PTE_TO_PHYS(l3e)),
- lockp)) {
+ if (!pmap_pv_insert_l3c(pmap, va, PTE_TO_VM_PAGE(l3e), lockp)) {
if (ml3 != NULL)
pmap_abort_ptp(pmap, va, ml3);
return (false);
@@ -6042,7 +6245,7 @@ pmap_copy_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va, pt_entry_t l3e,
l3e += L3_SIZE;
}
pmap_resident_count_inc(pmap, L3C_ENTRIES);
- atomic_add_long(&pmap_l3c_mappings, 1);
+ counter_u64_add(pmap_l3c_mappings, 1);
CTR2(KTR_PMAP, "pmap_copy_l3c: success for va %#lx in pmap %p",
va, pmap);
return (true);
@@ -6112,8 +6315,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
l1 = pmap_l1(dst_pmap, addr);
} else {
l0 = pmap_l0(dst_pmap, addr);
- dst_m = PHYS_TO_VM_PAGE(
- PTE_TO_PHYS(pmap_load(l0)));
+ dst_m = PTE_TO_VM_PAGE(pmap_load(l0));
dst_m->ref_count++;
}
KASSERT(pmap_load(l1) == 0,
@@ -6168,7 +6370,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
}
KASSERT((srcptepaddr & ATTR_DESCR_MASK) == L2_TABLE,
("pmap_copy: invalid L2 entry"));
- srcmpte = PHYS_TO_VM_PAGE(PTE_TO_PHYS(srcptepaddr));
+ srcmpte = PTE_TO_VM_PAGE(srcptepaddr);
KASSERT(srcmpte->ref_count > 0,
("pmap_copy: source page table page is unused"));
if (va_next > end_addr)
@@ -6205,7 +6407,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len,
src_pte += L3C_ENTRIES - 1;
} else if (pmap_load(dst_pte) == 0 &&
pmap_try_insert_pv_entry(dst_pmap, addr,
- PHYS_TO_VM_PAGE(PTE_TO_PHYS(ptetemp)), &lock)) {
+ PTE_TO_VM_PAGE(ptetemp), &lock)) {
/*
* Clear the wired, contiguous, modified, and
* accessed bits from the destination PTE.
@@ -7219,7 +7421,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice)
* can be avoided by making the page
* dirty now.
*/
- m = PHYS_TO_VM_PAGE(PTE_TO_PHYS(oldl3));
+ m = PTE_TO_VM_PAGE(oldl3);
vm_page_dirty(m);
}
if ((oldl3 & ATTR_CONTIGUOUS) != 0) {
@@ -7714,8 +7916,9 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot,
MPASS((pmap_load(ptep) & ATTR_SW_NO_PROMOTE) == 0);
/*
- * Split the entry to an level 3 table, then
- * set the new attribute.
+ * Find the entry and demote it if the requested change
+ * only applies to part of the address range mapped by
+ * the entry.
*/
switch (lvl) {
default:
@@ -7734,6 +7937,16 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot,
ptep = pmap_l1_to_l2(ptep, tmpva);
/* FALLTHROUGH */
case 2:
+ if ((pmap_load(ptep) & ATTR_CONTIGUOUS) != 0) {
+ if ((tmpva & L2C_OFFSET) == 0 &&
+ (base + size - tmpva) >= L2C_SIZE) {
+ pte_size = L2C_SIZE;
+ break;
+ }
+ if (!pmap_demote_l2c(kernel_pmap, ptep,
+ tmpva))
+ return (EINVAL);
+ }
if ((tmpva & L2_OFFSET) == 0 &&
(base + size - tmpva) >= L2_SIZE) {
pte_size = L2_SIZE;
@@ -7765,8 +7978,26 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot,
pte &= ~mask;
pte |= bits;
- pmap_update_entry(kernel_pmap, ptep, pte, tmpva,
- pte_size);
+ switch (pte_size) {
+ case L2C_SIZE:
+ pmap_update_strided(kernel_pmap, ptep, ptep +
+ L2C_ENTRIES, pte, tmpva, L2_SIZE, L2C_SIZE);
+ break;
+ case L3C_SIZE:
+ pmap_update_strided(kernel_pmap, ptep, ptep +
+ L3C_ENTRIES, pte, tmpva, L3_SIZE, L3C_SIZE);
+ break;
+ default:
+ /*
+ * We are updating a single block or page entry,
+ * so regardless of pte_size pass PAGE_SIZE in
+ * order that a single TLB invalidation is
+ * performed.
+ */
+ pmap_update_entry(kernel_pmap, ptep, pte, tmpva,
+ PAGE_SIZE);
+ break;
+ }
pa = PTE_TO_PHYS(pte);
if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(pa)) {
@@ -7841,13 +8072,14 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va)
newl2 = oldl1 & ATTR_MASK;
/* Create the new entries */
+ newl2 |= ATTR_CONTIGUOUS;
for (i = 0; i < Ln_ENTRIES; i++) {
l2[i] = newl2 | phys;
phys += L2_SIZE;
}
- KASSERT(l2[0] == ((oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK),
- ("Invalid l2 page (%lx != %lx)", l2[0],
- (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK));
+ KASSERT(l2[0] == (ATTR_CONTIGUOUS | (oldl1 & ~ATTR_DESCR_MASK) |
+ L2_BLOCK), ("Invalid l2 page (%lx != %lx)", l2[0],
+ ATTR_CONTIGUOUS | (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK));
if (tmpl1 != 0) {
pmap_kenter(tmpl1, PAGE_SIZE,
@@ -7858,6 +8090,7 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va)
pmap_update_entry(pmap, l1, l2phys | L1_TABLE, va, PAGE_SIZE);
+ counter_u64_add(pmap_l1_demotions, 1);
fail:
if (tmpl1 != 0) {
pmap_kremove(tmpl1);
@@ -8099,6 +8332,96 @@ pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va)
}
/*
+ * Demote an L2C superpage mapping to L2C_ENTRIES L2 block mappings.
+ */
+static bool
+pmap_demote_l2c(pmap_t pmap, pt_entry_t *l2p, vm_offset_t va)
+{
+ pd_entry_t *l2c_end, *l2c_start, l2e, mask, nbits, *tl2p;
+ vm_offset_t tmpl3;
+ register_t intr;
+
+ PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+ PMAP_ASSERT_STAGE1(pmap);
+ l2c_start = (pd_entry_t *)((uintptr_t)l2p & ~((L2C_ENTRIES *
+ sizeof(pd_entry_t)) - 1));
+ l2c_end = l2c_start + L2C_ENTRIES;
+ tmpl3 = 0;
+ if ((va & ~L2C_OFFSET) < (vm_offset_t)l2c_end &&
+ (vm_offset_t)l2c_start < (va & ~L2C_OFFSET) + L2C_SIZE) {
+ tmpl3 = kva_alloc(PAGE_SIZE);
+ if (tmpl3 == 0)
+ return (false);
+ pmap_kenter(tmpl3, PAGE_SIZE,
+ DMAP_TO_PHYS((vm_offset_t)l2c_start) & ~L3_OFFSET,
+ VM_MEMATTR_WRITE_BACK);
+ l2c_start = (pd_entry_t *)(tmpl3 +
+ ((vm_offset_t)l2c_start & PAGE_MASK));
+ l2c_end = (pd_entry_t *)(tmpl3 +
+ ((vm_offset_t)l2c_end & PAGE_MASK));
+ }
+ mask = 0;
+ nbits = ATTR_DESCR_VALID;
+ intr = intr_disable();
+
+ /*
+ * Break the mappings.
+ */
+ for (tl2p = l2c_start; tl2p < l2c_end; tl2p++) {
+ /*
+ * Clear the mapping's contiguous and valid bits, but leave
+ * the rest of the entry unchanged, so that a lockless,
+ * concurrent pmap_kextract() can still lookup the physical
+ * address.
+ */
+ l2e = pmap_load(tl2p);
+ KASSERT((l2e & ATTR_CONTIGUOUS) != 0,
+ ("pmap_demote_l2c: missing ATTR_CONTIGUOUS"));
+ KASSERT((l2e & (ATTR_SW_DBM | ATTR_S1_AP_RW_BIT)) !=
+ (ATTR_SW_DBM | ATTR_S1_AP(ATTR_S1_AP_RO)),
+ ("pmap_demote_l2c: missing ATTR_S1_AP_RW"));
+ while (!atomic_fcmpset_64(tl2p, &l2e, l2e & ~(ATTR_CONTIGUOUS |
+ ATTR_DESCR_VALID)))
+ cpu_spinwait();
+
+ /*
+ * Hardware accessed and dirty bit maintenance might only
+ * update a single L2 entry, so we must combine the accessed
+ * and dirty bits from this entire set of contiguous L2
+ * entries.
+ */
+ if ((l2e & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) ==
+ (ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_SW_DBM))
+ mask = ATTR_S1_AP_RW_BIT;
+ nbits |= l2e & ATTR_AF;
+ }
+ if ((nbits & ATTR_AF) != 0) {
+ pmap_s1_invalidate_strided(pmap, va & ~L2C_OFFSET, (va +
+ L2C_SIZE) & ~L2C_OFFSET, L2_SIZE, true);
+ }
+
+ /*
+ * Remake the mappings, updating the accessed and dirty bits.
+ */
+ for (tl2p = l2c_start; tl2p < l2c_end; tl2p++) {
+ l2e = pmap_load(tl2p);
+ while (!atomic_fcmpset_64(tl2p, &l2e, (l2e & ~mask) | nbits))
+ cpu_spinwait();
+ }
+ dsb(ishst);
+
+ intr_restore(intr);
+ if (tmpl3 != 0) {
+ pmap_kremove(tmpl3);
+ kva_free(tmpl3, PAGE_SIZE);
+ }
+ counter_u64_add(pmap_l2c_demotions, 1);
+ CTR2(KTR_PMAP, "pmap_demote_l2c: success for va %#lx in pmap %p",
+ va, pmap);
+ return (true);
+}
+
+/*
* Demote a L3C superpage mapping to L3C_ENTRIES 4KB page mappings.
*/
static bool
@@ -8181,7 +8504,7 @@ pmap_demote_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va)
pmap_kremove(tmpl3);
kva_free(tmpl3, PAGE_SIZE);
}
- atomic_add_long(&pmap_l3c_demotions, 1);
+ counter_u64_add(pmap_l3c_demotions, 1);
CTR2(KTR_PMAP, "pmap_demote_l3c: success for va %#lx in pmap %p",
va, pmap);
return (true);
@@ -9150,18 +9473,17 @@ pmap_san_enter(vm_offset_t va)
MPASS(l1 != NULL);
if ((pmap_load(l1) & ATTR_DESCR_VALID) == 0) {
m = pmap_san_enter_alloc_l3();
- pmap_store(l1, PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) | L1_TABLE);
+ pmap_store(l1, VM_PAGE_TO_PTE(m) | L1_TABLE);
}
l2 = pmap_l1_to_l2(l1, va);
if ((pmap_load(l2) & ATTR_DESCR_VALID) == 0) {
m = pmap_san_enter_alloc_l2();
if (m != NULL) {
- pmap_store(l2, PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) |
+ pmap_store(l2, VM_PAGE_TO_PTE(m) |
PMAP_SAN_PTE_BITS | L2_BLOCK);
} else {
m = pmap_san_enter_alloc_l3();
- pmap_store(l2, PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) |
- L2_TABLE);
+ pmap_store(l2, VM_PAGE_TO_PTE(m) | L2_TABLE);
}
dmb(ishst);
}
@@ -9171,8 +9493,7 @@ pmap_san_enter(vm_offset_t va)
if ((pmap_load(l3) & ATTR_DESCR_VALID) != 0)
return;
m = pmap_san_enter_alloc_l3();
- pmap_store(l3, PHYS_TO_PTE(VM_PAGE_TO_PHYS(m)) |
- PMAP_SAN_PTE_BITS | L3_PAGE);
+ pmap_store(l3, VM_PAGE_TO_PTE(m) | PMAP_SAN_PTE_BITS | L3_PAGE);
dmb(ishst);
}
#endif /* KASAN || KMSAN */
@@ -9187,6 +9508,7 @@ struct pmap_kernel_map_range {
int l3pages;
int l3contig;
int l2blocks;
+ int l2contig;
int l1blocks;
};
@@ -9225,15 +9547,15 @@ sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_map_range *range,
break;
}
- sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c%c %6s %d %d %d %d\n",
+ sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c%c %6s %d %d %d %d %d\n",
range->sva, eva,
(range->attrs & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP_RW ? 'w' : '-',
(range->attrs & ATTR_S1_PXN) != 0 ? '-' : 'x',
(range->attrs & ATTR_S1_UXN) != 0 ? '-' : 'X',
(range->attrs & ATTR_S1_AP(ATTR_S1_AP_USER)) != 0 ? 'u' : 's',
(range->attrs & ATTR_S1_GP) != 0 ? 'g' : '-',
- mode, range->l1blocks, range->l2blocks, range->l3contig,
- range->l3pages);
+ mode, range->l1blocks, range->l2contig, range->l2blocks,
+ range->l3contig, range->l3pages);
/* Reset to sentinel value. */
range->sva = 0xfffffffffffffffful;
@@ -9398,7 +9720,12 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS)
if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) {
sysctl_kmaps_check(sb, &range, sva,
l0e, l1e, l2e, 0);
- range.l2blocks++;
+ if ((l2e & ATTR_CONTIGUOUS) != 0)
+ range.l2contig +=
+ k % L2C_ENTRIES == 0 ?
+ 1 : 0;
+ else
+ range.l2blocks++;
sva += L2_SIZE;
continue;
}
diff --git a/sys/arm64/arm64/ptrauth.c b/sys/arm64/arm64/ptrauth.c
index 40f9c86d9468..b5f9fad1dc95 100644
--- a/sys/arm64/arm64/ptrauth.c
+++ b/sys/arm64/arm64/ptrauth.c
@@ -169,13 +169,11 @@ ptrauth_thread_alloc(struct thread *td)
* Load the userspace keys. We can't use WRITE_SPECIALREG as we need
* to set the architecture extension.
*/
-#define LOAD_KEY(space, name) \
-__asm __volatile( \
- ".arch_extension pauth \n" \
- "msr "#name"keylo_el1, %0 \n" \
- "msr "#name"keyhi_el1, %1 \n" \
- ".arch_extension nopauth \n" \
- :: "r"(td->td_md.md_ptrauth_##space.name.pa_key_lo), \
+#define LOAD_KEY(space, name, reg) \
+__asm __volatile( \
+ "msr "__XSTRING(MRS_REG_ALT_NAME(reg ## KeyLo_EL1))", %0 \n" \
+ "msr "__XSTRING(MRS_REG_ALT_NAME(reg ## KeyHi_EL1))", %1 \n" \
+ :: "r"(td->td_md.md_ptrauth_##space.name.pa_key_lo), \
"r"(td->td_md.md_ptrauth_##space.name.pa_key_hi))
void
@@ -187,7 +185,7 @@ ptrauth_thread0(struct thread *td)
/* TODO: Generate a random number here */
memset(&td->td_md.md_ptrauth_kern, 0,
sizeof(td->td_md.md_ptrauth_kern));
- LOAD_KEY(kern, apia);
+ LOAD_KEY(kern, apia, APIA);
/*
* No isb as this is called before ptrauth_start so can rely on
* the instruction barrier there.
@@ -240,8 +238,8 @@ ptrauth_mp_start(uint64_t cpu)
__asm __volatile(
".arch_extension pauth \n"
- "msr apiakeylo_el1, %0 \n"
- "msr apiakeyhi_el1, %1 \n"
+ "msr "__XSTRING(APIAKeyLo_EL1_REG)", %0 \n"
+ "msr "__XSTRING(APIAKeyHi_EL1_REG)", %1 \n"
".arch_extension nopauth \n"
:: "r"(start_key.pa_key_lo), "r"(start_key.pa_key_hi));
@@ -257,7 +255,7 @@ struct thread *
ptrauth_switch(struct thread *td)
{
if (enable_ptrauth) {
- LOAD_KEY(kern, apia);
+ LOAD_KEY(kern, apia, APIA);
isb();
}
@@ -271,7 +269,7 @@ ptrauth_exit_el0(struct thread *td)
if (!enable_ptrauth)
return;
- LOAD_KEY(kern, apia);
+ LOAD_KEY(kern, apia, APIA);
isb();
}
@@ -282,11 +280,11 @@ ptrauth_enter_el0(struct thread *td)
if (!enable_ptrauth)
return;
- LOAD_KEY(user, apia);
- LOAD_KEY(user, apib);
- LOAD_KEY(user, apda);
- LOAD_KEY(user, apdb);
- LOAD_KEY(user, apga);
+ LOAD_KEY(user, apia, APIA);
+ LOAD_KEY(user, apib, APIB);
+ LOAD_KEY(user, apda, APDA);
+ LOAD_KEY(user, apdb, APDB);
+ LOAD_KEY(user, apga, APGA);
/*
* No isb as this is called from the exception handler so can rely
* on the eret instruction to be the needed context synchronizing event.
diff --git a/sys/arm64/arm64/uio_machdep.c b/sys/arm64/arm64/uio_machdep.c
index c42aee94506e..1c12940419cc 100644
--- a/sys/arm64/arm64/uio_machdep.c
+++ b/sys/arm64/arm64/uio_machdep.c
@@ -95,18 +95,26 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error)
goto out;
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/arm64/arm64/uma_machdep.c b/sys/arm64/arm64/uma_machdep.c
deleted file mode 100644
index f942248d4dcd..000000000000
--- a/sys/arm64/arm64/uma_machdep.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/vm_page.h>
-#include <vm/vm_phys.h>
-#include <vm/vm_dumpset.h>
-#include <vm/uma.h>
-#include <vm/uma_int.h>
-#include <machine/machdep.h>
-
-void *
-uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
- int wait)
-{
- vm_page_t m;
- vm_paddr_t pa;
- void *va;
-
- *flags = UMA_SLAB_PRIV;
- m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) |
- VM_ALLOC_WIRED);
- if (m == NULL)
- return (NULL);
- pa = m->phys_addr;
- if ((wait & M_NODUMP) == 0)
- dump_add_page(pa);
- va = (void *)PHYS_TO_DMAP(pa);
- return (va);
-}
-
-void
-uma_small_free(void *mem, vm_size_t size, u_int8_t flags)
-{
- vm_page_t m;
- vm_paddr_t pa;
-
- pa = DMAP_TO_PHYS((vm_offset_t)mem);
- dump_drop_page(pa);
- m = PHYS_TO_VM_PAGE(pa);
- vm_page_unwire_noq(m);
- vm_page_free(m);
-}
diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES
index 3e8499c872b9..b3bf2fedd5f7 100644
--- a/sys/arm64/conf/NOTES
+++ b/sys/arm64/conf/NOTES
@@ -240,6 +240,8 @@ nooptions COMPAT_FREEBSD10
# arm64 supports 32-bit FreeBSD/arm binaries (armv[67] ABIs)
options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm
+options IOMMU # ARM64 SMMU/IOMMU
+
#####################################################################
# ZFS support
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
index 9391b1e2c1b7..7bdb28aad1e5 100644
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -77,6 +77,86 @@
#define UL(x) UINT64_C(x)
+/* APDAKeyHi_EL1 */
+#define APDAKeyHi_EL1_REG MRS_REG_ALT_NAME(APDAKeyHi_EL1)
+#define APDAKeyHi_EL1_op0 3
+#define APDAKeyHi_EL1_op1 0
+#define APDAKeyHi_EL1_CRn 2
+#define APDAKeyHi_EL1_CRm 2
+#define APDAKeyHi_EL1_op2 1
+
+/* APDAKeyLo_EL1 */
+#define APDAKeyLo_EL1_REG MRS_REG_ALT_NAME(APDAKeyLo_EL1)
+#define APDAKeyLo_EL1_op0 3
+#define APDAKeyLo_EL1_op1 0
+#define APDAKeyLo_EL1_CRn 2
+#define APDAKeyLo_EL1_CRm 2
+#define APDAKeyLo_EL1_op2 0
+
+/* APDBKeyHi_EL1 */
+#define APDBKeyHi_EL1_REG MRS_REG_ALT_NAME(APDBKeyHi_EL1)
+#define APDBKeyHi_EL1_op0 3
+#define APDBKeyHi_EL1_op1 0
+#define APDBKeyHi_EL1_CRn 2
+#define APDBKeyHi_EL1_CRm 2
+#define APDBKeyHi_EL1_op2 3
+
+/* APDBKeyLo_EL1 */
+#define APDBKeyLo_EL1_REG MRS_REG_ALT_NAME(APDBKeyLo_EL1)
+#define APDBKeyLo_EL1_op0 3
+#define APDBKeyLo_EL1_op1 0
+#define APDBKeyLo_EL1_CRn 2
+#define APDBKeyLo_EL1_CRm 2
+#define APDBKeyLo_EL1_op2 2
+
+/* APGAKeyHi_EL1 */
+#define APGAKeyHi_EL1_REG MRS_REG_ALT_NAME(APGAKeyHi_EL1)
+#define APGAKeyHi_EL1_op0 3
+#define APGAKeyHi_EL1_op1 0
+#define APGAKeyHi_EL1_CRn 2
+#define APGAKeyHi_EL1_CRm 3
+#define APGAKeyHi_EL1_op2 1
+
+/* APGAKeyLo_EL1 */
+#define APGAKeyLo_EL1_REG MRS_REG_ALT_NAME(APGAKeyLo_EL1)
+#define APGAKeyLo_EL1_op0 3
+#define APGAKeyLo_EL1_op1 0
+#define APGAKeyLo_EL1_CRn 2
+#define APGAKeyLo_EL1_CRm 3
+#define APGAKeyLo_EL1_op2 0
+
+/* APIAKeyHi_EL1 */
+#define APIAKeyHi_EL1_REG MRS_REG_ALT_NAME(APIAKeyHi_EL1)
+#define APIAKeyHi_EL1_op0 3
+#define APIAKeyHi_EL1_op1 0
+#define APIAKeyHi_EL1_CRn 2
+#define APIAKeyHi_EL1_CRm 1
+#define APIAKeyHi_EL1_op2 1
+
+/* APIAKeyLo_EL1 */
+#define APIAKeyLo_EL1_REG MRS_REG_ALT_NAME(APIAKeyLo_EL1)
+#define APIAKeyLo_EL1_op0 3
+#define APIAKeyLo_EL1_op1 0
+#define APIAKeyLo_EL1_CRn 2
+#define APIAKeyLo_EL1_CRm 1
+#define APIAKeyLo_EL1_op2 0
+
+/* APIBKeyHi_EL1 */
+#define APIBKeyHi_EL1_REG MRS_REG_ALT_NAME(APIBKeyHi_EL1)
+#define APIBKeyHi_EL1_op0 3
+#define APIBKeyHi_EL1_op1 0
+#define APIBKeyHi_EL1_CRn 2
+#define APIBKeyHi_EL1_CRm 1
+#define APIBKeyHi_EL1_op2 3
+
+/* APIBKeyLo_EL1 */
+#define APIBKeyLo_EL1_REG MRS_REG_ALT_NAME(APIBKeyLo_EL1)
+#define APIBKeyLo_EL1_op0 3
+#define APIBKeyLo_EL1_op1 0
+#define APIBKeyLo_EL1_CRn 2
+#define APIBKeyLo_EL1_CRm 1
+#define APIBKeyLo_EL1_op2 2
+
/* CCSIDR_EL1 - Cache Size ID Register */
#define CCSIDR_NumSets_MASK 0x0FFFE000
#define CCSIDR_NumSets64_MASK 0x00FFFFFF00000000
@@ -138,6 +218,15 @@
#define CNTPCT_EL0_CRm 0
#define CNTPCT_EL0_op2 1
+/* CONTEXTIDR_EL1 - Context ID register */
+#define CONTEXTIDR_EL1 MRS_REG(CONTEXTIDR_EL1)
+#define CONTEXTIDR_EL1_REG MRS_REG_ALT_NAME(CONTEXTIDR_EL1)
+#define CONTEXTIDR_EL1_op0 3
+#define CONTEXTIDR_EL1_op1 0
+#define CONTEXTIDR_EL1_CRn 13
+#define CONTEXTIDR_EL1_CRm 0
+#define CONTEXTIDR_EL1_op2 1
+
/* CPACR_EL1 */
#define CPACR_ZEN_MASK (0x3 << 16)
#define CPACR_ZEN_TRAP_ALL1 (0x0 << 16) /* Traps from EL0 and EL1 */
@@ -491,6 +580,7 @@
/* ID_AA64AFR0_EL1 */
#define ID_AA64AFR0_EL1 MRS_REG(ID_AA64AFR0_EL1)
+#define ID_AA64AFR0_EL1_REG MRS_REG_ALT_NAME(ID_AA64AFR0_EL1)
#define ID_AA64AFR0_EL1_op0 3
#define ID_AA64AFR0_EL1_op1 0
#define ID_AA64AFR0_EL1_CRn 0
@@ -499,6 +589,7 @@
/* ID_AA64AFR1_EL1 */
#define ID_AA64AFR1_EL1 MRS_REG(ID_AA64AFR1_EL1)
+#define ID_AA64AFR1_EL1_REG MRS_REG_ALT_NAME(ID_AA64AFR1_EL1)
#define ID_AA64AFR1_EL1_op0 3
#define ID_AA64AFR1_EL1_op1 0
#define ID_AA64AFR1_EL1_CRn 0
@@ -507,6 +598,7 @@
/* ID_AA64DFR0_EL1 */
#define ID_AA64DFR0_EL1 MRS_REG(ID_AA64DFR0_EL1)
+#define ID_AA64DFR0_EL1_REG MRS_REG_ALT_NAME(ID_AA64DFR0_EL1)
#define ID_AA64DFR0_EL1_op0 3
#define ID_AA64DFR0_EL1_op1 0
#define ID_AA64DFR0_EL1_CRn 0
@@ -596,6 +688,7 @@
/* ID_AA64DFR1_EL1 */
#define ID_AA64DFR1_EL1 MRS_REG(ID_AA64DFR1_EL1)
+#define ID_AA64DFR1_EL1_REG MRS_REG_ALT_NAME(ID_AA64DFR1_EL1)
#define ID_AA64DFR1_EL1_op0 3
#define ID_AA64DFR1_EL1_op1 0
#define ID_AA64DFR1_EL1_CRn 0
@@ -604,6 +697,7 @@
/* ID_AA64ISAR0_EL1 */
#define ID_AA64ISAR0_EL1 MRS_REG(ID_AA64ISAR0_EL1)
+#define ID_AA64ISAR0_EL1_REG MRS_REG_ALT_NAME(ID_AA64ISAR0_EL1)
#define ID_AA64ISAR0_EL1_op0 3
#define ID_AA64ISAR0_EL1_op1 0
#define ID_AA64ISAR0_EL1_CRn 0
@@ -690,6 +784,7 @@
/* ID_AA64ISAR1_EL1 */
#define ID_AA64ISAR1_EL1 MRS_REG(ID_AA64ISAR1_EL1)
+#define ID_AA64ISAR1_EL1_REG MRS_REG_ALT_NAME(ID_AA64ISAR1_EL1)
#define ID_AA64ISAR1_EL1_op0 3
#define ID_AA64ISAR1_EL1_op1 0
#define ID_AA64ISAR1_EL1_CRn 0
@@ -791,6 +886,7 @@
/* ID_AA64ISAR2_EL1 */
#define ID_AA64ISAR2_EL1 MRS_REG(ID_AA64ISAR2_EL1)
+#define ID_AA64ISAR2_EL1_REG MRS_REG_ALT_NAME(ID_AA64ISAR2_EL1)
#define ID_AA64ISAR2_EL1_op0 3
#define ID_AA64ISAR2_EL1_op1 0
#define ID_AA64ISAR2_EL1_CRn 0
@@ -838,6 +934,7 @@
/* ID_AA64MMFR0_EL1 */
#define ID_AA64MMFR0_EL1 MRS_REG(ID_AA64MMFR0_EL1)
+#define ID_AA64MMFR0_EL1_REG MRS_REG_ALT_NAME(ID_AA64MMFR0_EL1)
#define ID_AA64MMFR0_EL1_op0 3
#define ID_AA64MMFR0_EL1_op1 0
#define ID_AA64MMFR0_EL1_CRn 0
@@ -929,6 +1026,7 @@
/* ID_AA64MMFR1_EL1 */
#define ID_AA64MMFR1_EL1 MRS_REG(ID_AA64MMFR1_EL1)
+#define ID_AA64MMFR1_EL1_REG MRS_REG_ALT_NAME(ID_AA64MMFR1_EL1)
#define ID_AA64MMFR1_EL1_op0 3
#define ID_AA64MMFR1_EL1_op1 0
#define ID_AA64MMFR1_EL1_CRn 0
@@ -1016,6 +1114,7 @@
/* ID_AA64MMFR2_EL1 */
#define ID_AA64MMFR2_EL1 MRS_REG(ID_AA64MMFR2_EL1)
+#define ID_AA64MMFR2_EL1_REG MRS_REG_ALT_NAME(ID_AA64MMFR2_EL1)
#define ID_AA64MMFR2_EL1_op0 3
#define ID_AA64MMFR2_EL1_op1 0
#define ID_AA64MMFR2_EL1_CRn 0
@@ -1102,6 +1201,7 @@
/* ID_AA64MMFR3_EL1 */
#define ID_AA64MMFR3_EL1 MRS_REG(ID_AA64MMFR3_EL1)
+#define ID_AA64MMFR3_EL1_REG MRS_REG_ALT_NAME(ID_AA64MMFR3_EL1)
#define ID_AA64MMFR3_EL1_op0 3
#define ID_AA64MMFR3_EL1_op1 0
#define ID_AA64MMFR3_EL1_CRn 0
@@ -1130,6 +1230,7 @@
/* ID_AA64MMFR4_EL1 */
#define ID_AA64MMFR4_EL1 MRS_REG(ID_AA64MMFR4_EL1)
+#define ID_AA64MMFR4_EL1_REG MRS_REG_ALT_NAME(ID_AA64MMFR4_EL1)
#define ID_AA64MMFR4_EL1_op0 3
#define ID_AA64MMFR4_EL1_op1 0
#define ID_AA64MMFR4_EL1_CRn 0
@@ -1138,6 +1239,7 @@
/* ID_AA64PFR0_EL1 */
#define ID_AA64PFR0_EL1 MRS_REG(ID_AA64PFR0_EL1)
+#define ID_AA64PFR0_EL1_REG MRS_REG_ALT_NAME(ID_AA64PFR0_EL1)
#define ID_AA64PFR0_EL1_op0 3
#define ID_AA64PFR0_EL1_op1 0
#define ID_AA64PFR0_EL1_CRn 0
@@ -1236,6 +1338,7 @@
/* ID_AA64PFR1_EL1 */
#define ID_AA64PFR1_EL1 MRS_REG(ID_AA64PFR1_EL1)
+#define ID_AA64PFR1_EL1_REG MRS_REG_ALT_NAME(ID_AA64PFR1_EL1)
#define ID_AA64PFR1_EL1_op0 3
#define ID_AA64PFR1_EL1_op1 0
#define ID_AA64PFR1_EL1_CRn 0
@@ -1294,6 +1397,7 @@
/* ID_AA64PFR2_EL1 */
#define ID_AA64PFR2_EL1 MRS_REG(ID_AA64PFR2_EL1)
+#define ID_AA64PFR2_EL1_REG MRS_REG_ALT_NAME(ID_AA64PFR2_EL1)
#define ID_AA64PFR2_EL1_op0 3
#define ID_AA64PFR2_EL1_op1 0
#define ID_AA64PFR2_EL1_CRn 0
@@ -1621,11 +1725,12 @@
/* PMBIDR_EL1 */
#define PMBIDR_EL1 MRS_REG(PMBIDR_EL1)
-#define PMBIDR_EL1_op0 0x3
-#define PMBIDR_EL1_op1 0x0
-#define PMBIDR_EL1_CRn 0x9
-#define PMBIDR_EL1_CRm 0xa
-#define PMBIDR_EL1_op2 0x7
+#define PMBIDR_EL1_REG MRS_REG_ALT_NAME(PMBIDR_EL1)
+#define PMBIDR_EL1_op0 3
+#define PMBIDR_EL1_op1 0
+#define PMBIDR_EL1_CRn 9
+#define PMBIDR_EL1_CRm 10
+#define PMBIDR_EL1_op2 7
#define PMBIDR_Align_SHIFT 0
#define PMBIDR_Align_MASK (UL(0xf) << PMBIDR_Align_SHIFT)
#define PMBIDR_P_SHIFT 4
@@ -1635,11 +1740,12 @@
/* PMBLIMITR_EL1 */
#define PMBLIMITR_EL1 MRS_REG(PMBLIMITR_EL1)
-#define PMBLIMITR_EL1_op0 0x3
-#define PMBLIMITR_EL1_op1 0x0
-#define PMBLIMITR_EL1_CRn 0x9
-#define PMBLIMITR_EL1_CRm 0xa
-#define PMBLIMITR_EL1_op2 0x0
+#define PMBLIMITR_EL1_REG MRS_REG_ALT_NAME(PMBLIMITR_EL1)
+#define PMBLIMITR_EL1_op0 3
+#define PMBLIMITR_EL1_op1 0
+#define PMBLIMITR_EL1_CRn 9
+#define PMBLIMITR_EL1_CRm 10
+#define PMBLIMITR_EL1_op2 0
#define PMBLIMITR_E_SHIFT 0
#define PMBLIMITR_E (UL(0x1) << PMBLIMITR_E_SHIFT)
#define PMBLIMITR_FM_SHIFT 1
@@ -1652,24 +1758,28 @@
/* PMBPTR_EL1 */
#define PMBPTR_EL1 MRS_REG(PMBPTR_EL1)
-#define PMBPTR_EL1_op0 0x3
-#define PMBPTR_EL1_op1 0x0
-#define PMBPTR_EL1_CRn 0x9
-#define PMBPTR_EL1_CRm 0xa
-#define PMBPTR_EL1_op2 0x1
+#define PMBPTR_EL1_REG MRS_REG_ALT_NAME(PMBPTR_EL1)
+#define PMBPTR_EL1_op0 3
+#define PMBPTR_EL1_op1 0
+#define PMBPTR_EL1_CRn 9
+#define PMBPTR_EL1_CRm 10
+#define PMBPTR_EL1_op2 1
#define PMBPTR_PTR_SHIFT 0
#define PMBPTR_PTR_MASK \
(UL(0xffffffffffffffff) << PMBPTR_PTR_SHIFT)
/* PMBSR_EL1 */
#define PMBSR_EL1 MRS_REG(PMBSR_EL1)
-#define PMBSR_EL1_op0 0x3
-#define PMBSR_EL1_op1 0x0
-#define PMBSR_EL1_CRn 0x9
-#define PMBSR_EL1_CRm 0xa
-#define PMBSR_EL1_op2 0x3
+#define PMBSR_EL1_REG MRS_REG_ALT_NAME(PMBSR_EL1)
+#define PMBSR_EL1_op0 3
+#define PMBSR_EL1_op1 0
+#define PMBSR_EL1_CRn 9
+#define PMBSR_EL1_CRm 10
+#define PMBSR_EL1_op2 3
#define PMBSR_MSS_SHIFT 0
#define PMBSR_MSS_MASK (UL(0xffff) << PMBSR_MSS_SHIFT)
+#define PMBSR_MSS_BSC_MASK (UL(0x3f) << PMBSR_MSS_SHIFT)
+#define PMBSR_MSS_FSC_MASK (UL(0x3f) << PMBSR_MSS_SHIFT)
#define PMBSR_COLL_SHIFT 16
#define PMBSR_COLL (UL(0x1) << PMBSR_COLL_SHIFT)
#define PMBSR_S_SHIFT 17
@@ -1833,11 +1943,12 @@
/* PMSCR_EL1 */
#define PMSCR_EL1 MRS_REG(PMSCR_EL1)
-#define PMSCR_EL1_op0 0x3
-#define PMSCR_EL1_op1 0x0
-#define PMSCR_EL1_CRn 0x9
-#define PMSCR_EL1_CRm 0x9
-#define PMSCR_EL1_op2 0x0
+#define PMSCR_EL1_REG MRS_REG_ALT_NAME(PMSCR_EL1)
+#define PMSCR_EL1_op0 3
+#define PMSCR_EL1_op1 0
+#define PMSCR_EL1_CRn 9
+#define PMSCR_EL1_CRm 9
+#define PMSCR_EL1_op2 0
#define PMSCR_E0SPE_SHIFT 0
#define PMSCR_E0SPE (UL(0x1) << PMSCR_E0SPE_SHIFT)
#define PMSCR_E1SPE_SHIFT 1
@@ -1862,19 +1973,21 @@
/* PMSEVFR_EL1 */
#define PMSEVFR_EL1 MRS_REG(PMSEVFR_EL1)
-#define PMSEVFR_EL1_op0 0x3
-#define PMSEVFR_EL1_op1 0x0
-#define PMSEVFR_EL1_CRn 0x9
-#define PMSEVFR_EL1_CRm 0x9
-#define PMSEVFR_EL1_op2 0x5
+#define PMSEVFR_EL1_REG MRS_REG_ALT_NAME(PMSEVFR_EL1)
+#define PMSEVFR_EL1_op0 3
+#define PMSEVFR_EL1_op1 0
+#define PMSEVFR_EL1_CRn 9
+#define PMSEVFR_EL1_CRm 9
+#define PMSEVFR_EL1_op2 5
/* PMSFCR_EL1 */
#define PMSFCR_EL1 MRS_REG(PMSFCR_EL1)
-#define PMSFCR_EL1_op0 0x3
-#define PMSFCR_EL1_op1 0x0
-#define PMSFCR_EL1_CRn 0x9
-#define PMSFCR_EL1_CRm 0x9
-#define PMSFCR_EL1_op2 0x4
+#define PMSFCR_EL1_REG MRS_REG_ALT_NAME(PMSFCR_EL1)
+#define PMSFCR_EL1_op0 3
+#define PMSFCR_EL1_op1 0
+#define PMSFCR_EL1_CRn 9
+#define PMSFCR_EL1_CRm 9
+#define PMSFCR_EL1_op2 4
#define PMSFCR_FE_SHIFT 0
#define PMSFCR_FE (UL(0x1) << PMSFCR_FE_SHIFT)
#define PMSFCR_FT_SHIFT 1
@@ -1892,11 +2005,12 @@
/* PMSICR_EL1 */
#define PMSICR_EL1 MRS_REG(PMSICR_EL1)
-#define PMSICR_EL1_op0 0x3
-#define PMSICR_EL1_op1 0x0
-#define PMSICR_EL1_CRn 0x9
-#define PMSICR_EL1_CRm 0x9
-#define PMSICR_EL1_op2 0x2
+#define PMSICR_EL1_REG MRS_REG_ALT_NAME(PMSICR_EL1)
+#define PMSICR_EL1_op0 3
+#define PMSICR_EL1_op1 0
+#define PMSICR_EL1_CRn 9
+#define PMSICR_EL1_CRm 9
+#define PMSICR_EL1_op2 2
#define PMSICR_COUNT_SHIFT 0
#define PMSICR_COUNT_MASK (UL(0xffffffff) << PMSICR_COUNT_SHIFT)
#define PMSICR_ECOUNT_SHIFT 56
@@ -1904,11 +2018,12 @@
/* PMSIDR_EL1 */
#define PMSIDR_EL1 MRS_REG(PMSIDR_EL1)
-#define PMSIDR_EL1_op0 0x3
-#define PMSIDR_EL1_op1 0x0
-#define PMSIDR_EL1_CRn 0x9
-#define PMSIDR_EL1_CRm 0x9
-#define PMSIDR_EL1_op2 0x7
+#define PMSIDR_EL1_REG MRS_REG_ALT_NAME(PMSIDR_EL1)
+#define PMSIDR_EL1_op0 3
+#define PMSIDR_EL1_op1 0
+#define PMSIDR_EL1_CRn 9
+#define PMSIDR_EL1_CRm 9
+#define PMSIDR_EL1_op2 7
#define PMSIDR_FE_SHIFT 0
#define PMSIDR_FE (UL(0x1) << PMSIDR_FE_SHIFT)
#define PMSIDR_FT_SHIFT 1
@@ -1936,11 +2051,12 @@
/* PMSIRR_EL1 */
#define PMSIRR_EL1 MRS_REG(PMSIRR_EL1)
-#define PMSIRR_EL1_op0 0x3
-#define PMSIRR_EL1_op1 0x0
-#define PMSIRR_EL1_CRn 0x9
-#define PMSIRR_EL1_CRm 0x9
-#define PMSIRR_EL1_op2 0x3
+#define PMSIRR_EL1_REG MRS_REG_ALT_NAME(PMSIRR_EL1)
+#define PMSIRR_EL1_op0 3
+#define PMSIRR_EL1_op1 0
+#define PMSIRR_EL1_CRn 9
+#define PMSIRR_EL1_CRm 9
+#define PMSIRR_EL1_op2 3
#define PMSIRR_RND_SHIFT 0
#define PMSIRR_RND (UL(0x1) << PMSIRR_RND_SHIFT)
#define PMSIRR_INTERVAL_SHIFT 8
@@ -1948,21 +2064,23 @@
/* PMSLATFR_EL1 */
#define PMSLATFR_EL1 MRS_REG(PMSLATFR_EL1)
-#define PMSLATFR_EL1_op0 0x3
-#define PMSLATFR_EL1_op1 0x0
-#define PMSLATFR_EL1_CRn 0x9
-#define PMSLATFR_EL1_CRm 0x9
-#define PMSLATFR_EL1_op2 0x6
+#define PMSLATFR_EL1_REG MRS_REG_ALT_NAME(PMSLATFR_EL1)
+#define PMSLATFR_EL1_op0 3
+#define PMSLATFR_EL1_op1 0
+#define PMSLATFR_EL1_CRn 9
+#define PMSLATFR_EL1_CRm 9
+#define PMSLATFR_EL1_op2 6
#define PMSLATFR_MINLAT_SHIFT 0
#define PMSLATFR_MINLAT_MASK (UL(0xfff) << PMSLATFR_MINLAT_SHIFT)
/* PMSNEVFR_EL1 */
#define PMSNEVFR_EL1 MRS_REG(PMSNEVFR_EL1)
-#define PMSNEVFR_EL1_op0 0x3
-#define PMSNEVFR_EL1_op1 0x0
-#define PMSNEVFR_EL1_CRn 0x9
-#define PMSNEVFR_EL1_CRm 0x9
-#define PMSNEVFR_EL1_op2 0x1
+#define PMSNEVFR_EL1_REG MRS_REG_ALT_NAME(PMSNEVFR_EL1)
+#define PMSNEVFR_EL1_op0 3
+#define PMSNEVFR_EL1_op1 0
+#define PMSNEVFR_EL1_CRn 9
+#define PMSNEVFR_EL1_CRm 9
+#define PMSNEVFR_EL1_op2 1
/* PMSWINC_EL0 */
#define PMSWINC_EL0 MRS_REG(PMSWINC_EL0)
@@ -2113,99 +2231,99 @@
/* TCR_EL1 - Translation Control Register */
/* Bits 63:59 are reserved */
#define TCR_TCMA1_SHIFT 58
-#define TCR_TCMA1 (1UL << TCR_TCMA1_SHIFT)
+#define TCR_TCMA1 (UL(1) << TCR_TCMA1_SHIFT)
#define TCR_TCMA0_SHIFT 57
-#define TCR_TCMA0 (1UL << TCR_TCMA0_SHIFT)
+#define TCR_TCMA0 (UL(1) << TCR_TCMA0_SHIFT)
#define TCR_E0PD1_SHIFT 56
-#define TCR_E0PD1 (1UL << TCR_E0PD1_SHIFT)
+#define TCR_E0PD1 (UL(1) << TCR_E0PD1_SHIFT)
#define TCR_E0PD0_SHIFT 55
-#define TCR_E0PD0 (1UL << TCR_E0PD0_SHIFT)
+#define TCR_E0PD0 (UL(1) << TCR_E0PD0_SHIFT)
#define TCR_NFD1_SHIFT 54
-#define TCR_NFD1 (1UL << TCR_NFD1_SHIFT)
+#define TCR_NFD1 (UL(1) << TCR_NFD1_SHIFT)
#define TCR_NFD0_SHIFT 53
-#define TCR_NFD0 (1UL << TCR_NFD0_SHIFT)
+#define TCR_NFD0 (UL(1) << TCR_NFD0_SHIFT)
#define TCR_TBID1_SHIFT 52
-#define TCR_TBID1 (1UL << TCR_TBID1_SHIFT)
+#define TCR_TBID1 (UL(1) << TCR_TBID1_SHIFT)
#define TCR_TBID0_SHIFT 51
-#define TCR_TBID0 (1UL << TCR_TBID0_SHIFT)
+#define TCR_TBID0 (UL(1) << TCR_TBID0_SHIFT)
#define TCR_HWU162_SHIFT 50
-#define TCR_HWU162 (1UL << TCR_HWU162_SHIFT)
+#define TCR_HWU162 (UL(1) << TCR_HWU162_SHIFT)
#define TCR_HWU161_SHIFT 49
-#define TCR_HWU161 (1UL << TCR_HWU161_SHIFT)
+#define TCR_HWU161 (UL(1) << TCR_HWU161_SHIFT)
#define TCR_HWU160_SHIFT 48
-#define TCR_HWU160 (1UL << TCR_HWU160_SHIFT)
+#define TCR_HWU160 (UL(1) << TCR_HWU160_SHIFT)
#define TCR_HWU159_SHIFT 47
-#define TCR_HWU159 (1UL << TCR_HWU159_SHIFT)
+#define TCR_HWU159 (UL(1) << TCR_HWU159_SHIFT)
#define TCR_HWU1 \
(TCR_HWU159 | TCR_HWU160 | TCR_HWU161 | TCR_HWU162)
#define TCR_HWU062_SHIFT 46
-#define TCR_HWU062 (1UL << TCR_HWU062_SHIFT)
+#define TCR_HWU062 (UL(1) << TCR_HWU062_SHIFT)
#define TCR_HWU061_SHIFT 45
-#define TCR_HWU061 (1UL << TCR_HWU061_SHIFT)
+#define TCR_HWU061 (UL(1) << TCR_HWU061_SHIFT)
#define TCR_HWU060_SHIFT 44
-#define TCR_HWU060 (1UL << TCR_HWU060_SHIFT)
+#define TCR_HWU060 (UL(1) << TCR_HWU060_SHIFT)
#define TCR_HWU059_SHIFT 43
-#define TCR_HWU059 (1UL << TCR_HWU059_SHIFT)
+#define TCR_HWU059 (UL(1) << TCR_HWU059_SHIFT)
#define TCR_HWU0 \
(TCR_HWU059 | TCR_HWU060 | TCR_HWU061 | TCR_HWU062)
#define TCR_HPD1_SHIFT 42
-#define TCR_HPD1 (1UL << TCR_HPD1_SHIFT)
+#define TCR_HPD1 (UL(1) << TCR_HPD1_SHIFT)
#define TCR_HPD0_SHIFT 41
-#define TCR_HPD0 (1UL << TCR_HPD0_SHIFT)
+#define TCR_HPD0 (UL(1) << TCR_HPD0_SHIFT)
#define TCR_HD_SHIFT 40
-#define TCR_HD (1UL << TCR_HD_SHIFT)
+#define TCR_HD (UL(1) << TCR_HD_SHIFT)
#define TCR_HA_SHIFT 39
-#define TCR_HA (1UL << TCR_HA_SHIFT)
+#define TCR_HA (UL(1) << TCR_HA_SHIFT)
#define TCR_TBI1_SHIFT 38
-#define TCR_TBI1 (1UL << TCR_TBI1_SHIFT)
+#define TCR_TBI1 (UL(1) << TCR_TBI1_SHIFT)
#define TCR_TBI0_SHIFT 37
-#define TCR_TBI0 (1UL << TCR_TBI0_SHIFT)
+#define TCR_TBI0 (UL(1) << TCR_TBI0_SHIFT)
#define TCR_ASID_SHIFT 36
#define TCR_ASID_WIDTH 1
-#define TCR_ASID_16 (1UL << TCR_ASID_SHIFT)
+#define TCR_ASID_16 (UL(1) << TCR_ASID_SHIFT)
/* Bit 35 is reserved */
#define TCR_IPS_SHIFT 32
#define TCR_IPS_WIDTH 3
-#define TCR_IPS_32BIT (0UL << TCR_IPS_SHIFT)
-#define TCR_IPS_36BIT (1UL << TCR_IPS_SHIFT)
-#define TCR_IPS_40BIT (2UL << TCR_IPS_SHIFT)
-#define TCR_IPS_42BIT (3UL << TCR_IPS_SHIFT)
-#define TCR_IPS_44BIT (4UL << TCR_IPS_SHIFT)
-#define TCR_IPS_48BIT (5UL << TCR_IPS_SHIFT)
+#define TCR_IPS_32BIT (UL(0) << TCR_IPS_SHIFT)
+#define TCR_IPS_36BIT (UL(1) << TCR_IPS_SHIFT)
+#define TCR_IPS_40BIT (UL(2) << TCR_IPS_SHIFT)
+#define TCR_IPS_42BIT (UL(3) << TCR_IPS_SHIFT)
+#define TCR_IPS_44BIT (UL(4) << TCR_IPS_SHIFT)
+#define TCR_IPS_48BIT (UL(5) << TCR_IPS_SHIFT)
#define TCR_TG1_SHIFT 30
-#define TCR_TG1_MASK (3UL << TCR_TG1_SHIFT)
-#define TCR_TG1_16K (1UL << TCR_TG1_SHIFT)
-#define TCR_TG1_4K (2UL << TCR_TG1_SHIFT)
-#define TCR_TG1_64K (3UL << TCR_TG1_SHIFT)
+#define TCR_TG1_MASK (UL(3) << TCR_TG1_SHIFT)
+#define TCR_TG1_16K (UL(1) << TCR_TG1_SHIFT)
+#define TCR_TG1_4K (UL(2) << TCR_TG1_SHIFT)
+#define TCR_TG1_64K (UL(3) << TCR_TG1_SHIFT)
#define TCR_SH1_SHIFT 28
-#define TCR_SH1_IS (3UL << TCR_SH1_SHIFT)
+#define TCR_SH1_IS (UL(3) << TCR_SH1_SHIFT)
#define TCR_ORGN1_SHIFT 26
-#define TCR_ORGN1_WBWA (1UL << TCR_ORGN1_SHIFT)
+#define TCR_ORGN1_WBWA (UL(1) << TCR_ORGN1_SHIFT)
#define TCR_IRGN1_SHIFT 24
-#define TCR_IRGN1_WBWA (1UL << TCR_IRGN1_SHIFT)
+#define TCR_IRGN1_WBWA (UL(1) << TCR_IRGN1_SHIFT)
#define TCR_EPD1_SHIFT 23
-#define TCR_EPD1 (1UL << TCR_EPD1_SHIFT)
+#define TCR_EPD1 (UL(1) << TCR_EPD1_SHIFT)
#define TCR_A1_SHIFT 22
-#define TCR_A1 (0x1UL << TCR_A1_SHIFT)
+#define TCR_A1 (UL(1) << TCR_A1_SHIFT)
#define TCR_T1SZ_SHIFT 16
-#define TCR_T1SZ_MASK (0x3fUL << TCR_T1SZ_SHIFT)
+#define TCR_T1SZ_MASK (UL(0x3f) << TCR_T1SZ_SHIFT)
#define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT)
#define TCR_TG0_SHIFT 14
-#define TCR_TG0_MASK (3UL << TCR_TG0_SHIFT)
-#define TCR_TG0_4K (0UL << TCR_TG0_SHIFT)
-#define TCR_TG0_64K (1UL << TCR_TG0_SHIFT)
-#define TCR_TG0_16K (2UL << TCR_TG0_SHIFT)
+#define TCR_TG0_MASK (UL(3) << TCR_TG0_SHIFT)
+#define TCR_TG0_4K (UL(0) << TCR_TG0_SHIFT)
+#define TCR_TG0_64K (UL(1) << TCR_TG0_SHIFT)
+#define TCR_TG0_16K (UL(2) << TCR_TG0_SHIFT)
#define TCR_SH0_SHIFT 12
-#define TCR_SH0_IS (3UL << TCR_SH0_SHIFT)
+#define TCR_SH0_IS (UL(3) << TCR_SH0_SHIFT)
#define TCR_ORGN0_SHIFT 10
-#define TCR_ORGN0_WBWA (1UL << TCR_ORGN0_SHIFT)
+#define TCR_ORGN0_WBWA (UL(1) << TCR_ORGN0_SHIFT)
#define TCR_IRGN0_SHIFT 8
-#define TCR_IRGN0_WBWA (1UL << TCR_IRGN0_SHIFT)
+#define TCR_IRGN0_WBWA (UL(1) << TCR_IRGN0_SHIFT)
#define TCR_EPD0_SHIFT 7
-#define TCR_EPD0 (1UL << TCR_EPD0_SHIFT)
+#define TCR_EPD0 (UL(1) << TCR_EPD0_SHIFT)
/* Bit 6 is reserved */
#define TCR_T0SZ_SHIFT 0
-#define TCR_T0SZ_MASK (0x3fUL << TCR_T0SZ_SHIFT)
+#define TCR_T0SZ_MASK (UL(0x3f) << TCR_T0SZ_SHIFT)
#define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT)
#define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x))
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
index 8f5a9e3dbd3c..91ed3634c6d8 100644
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -42,8 +42,10 @@
#ifndef _MACHINE_CPU_H_
#define _MACHINE_CPU_H_
+#if !defined(__ASSEMBLER__)
#include <machine/atomic.h>
#include <machine/frame.h>
+#endif
#include <machine/armreg.h>
#define TRAPF_PC(tfp) ((tfp)->tf_elr)
@@ -198,6 +200,7 @@
#define CPU_MATCH_ERRATA_CAVIUM_THUNDERX_1_1 0
#endif
+#if !defined(__ASSEMBLER__)
extern char btext[];
extern char etext[];
@@ -268,6 +271,7 @@ ADDRESS_TRANSLATE_FUNC(s1e0w)
ADDRESS_TRANSLATE_FUNC(s1e1r)
ADDRESS_TRANSLATE_FUNC(s1e1w)
+#endif /* !__ASSEMBLER__ */
#endif
#endif /* !_MACHINE_CPU_H_ */
diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h
index d69924080610..d604f705e596 100644
--- a/sys/arm64/include/pmap.h
+++ b/sys/arm64/include/pmap.h
@@ -71,16 +71,6 @@ struct md_page {
vm_memattr_t pv_memattr;
};
-/*
- * This structure is used to hold a virtual<->physical address
- * association and is used mostly by bootstrap code
- */
-struct pv_addr {
- SLIST_ENTRY(pv_addr) pv_list;
- vm_offset_t pv_va;
- vm_paddr_t pv_pa;
-};
-
enum pmap_stage {
PM_INVALID,
PM_STAGE1,
diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h
index 56eede01d776..1f36655a45e2 100644
--- a/sys/arm64/include/pte.h
+++ b/sys/arm64/include/pte.h
@@ -198,13 +198,18 @@ typedef uint64_t pt_entry_t; /* page table entry */
* can be coalesced into a single TLB entry
*/
#if PAGE_SIZE == PAGE_SIZE_4K
+#define L2C_ENTRIES 16
#define L3C_ENTRIES 16
#elif PAGE_SIZE == PAGE_SIZE_16K
+#define L2C_ENTRIES 32
#define L3C_ENTRIES 128
#else
#error Unsupported page size
#endif
+#define L2C_SIZE (L2C_ENTRIES * L2_SIZE)
+#define L2C_OFFSET (L2C_SIZE - 1)
+
#define L3C_SIZE (L3C_ENTRIES * L3_SIZE)
#define L3C_OFFSET (L3C_SIZE - 1)
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h
index 83c55913f56e..0e93e4026d4a 100644
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -293,7 +293,7 @@
#endif
#if !defined(KASAN) && !defined(KMSAN)
-#define UMA_MD_SMALL_ALLOC
+#define UMA_USE_DMAP
#endif
#ifndef LOCORE
@@ -301,7 +301,6 @@
extern vm_paddr_t dmap_phys_base;
extern vm_paddr_t dmap_phys_max;
extern vm_offset_t dmap_max_addr;
-extern vm_offset_t vm_max_kernel_address;
#endif
@@ -318,6 +317,7 @@ extern vm_offset_t vm_max_kernel_address;
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#endif /* !_MACHINE_VMPARAM_H_ */
diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c
index cb2b86c9dc41..b765763e3a60 100644
--- a/sys/arm64/iommu/iommu.c
+++ b/sys/arm64/iommu/iommu.c
@@ -172,7 +172,6 @@ iommu_tag_init(struct iommu_domain *iodom, struct bus_dma_tag_iommu *t)
maxaddr = MIN(iodom->end, BUS_SPACE_MAXADDR);
- t->common.ref_count = 0;
t->common.impl = &bus_dma_iommu_impl;
t->common.alignment = 1;
t->common.boundary = 0;
diff --git a/sys/arm64/iommu/iommu_pmap.c b/sys/arm64/iommu/iommu_pmap.c
index d356a92c4d66..8a0ea641e231 100644
--- a/sys/arm64/iommu/iommu_pmap.c
+++ b/sys/arm64/iommu/iommu_pmap.c
@@ -632,8 +632,8 @@ retry:
l1p = smmu_pmap_l1(pmap, va);
l2p = smmu_pmap_l2(pmap, va);
- cpu_dcache_wb_range((vm_offset_t)l1p, sizeof(pd_entry_t));
- cpu_dcache_wb_range((vm_offset_t)l2p, sizeof(pd_entry_t));
+ cpu_dcache_wb_range(l1p, sizeof(pd_entry_t));
+ cpu_dcache_wb_range(l2p, sizeof(pd_entry_t));
goto retry;
}
@@ -644,7 +644,7 @@ retry:
/* New mapping */
smmu_pmap_store(l3, new_l3);
- cpu_dcache_wb_range((vm_offset_t)l3, sizeof(pt_entry_t));
+ cpu_dcache_wb_range(l3, sizeof(pt_entry_t));
smmu_pmap_resident_count_inc(pmap, 1);
dsb(ishst);
@@ -681,7 +681,7 @@ pmap_gpu_remove(struct smmu_pmap *pmap, vm_offset_t va)
smmu_pmap_resident_count_dec(pmap, 1);
smmu_pmap_clear(pte);
- cpu_dcache_wb_range((vm_offset_t)pte, sizeof(pt_entry_t));
+ cpu_dcache_wb_range(pte, sizeof(pt_entry_t));
rc = KERN_SUCCESS;
out:
diff --git a/sys/arm64/linux/linux_dummy_machdep.c b/sys/arm64/linux/linux_dummy_machdep.c
index a7a7795f573d..5ff6bfafe2d6 100644
--- a/sys/arm64/linux/linux_dummy_machdep.c
+++ b/sys/arm64/linux/linux_dummy_machdep.c
@@ -42,10 +42,4 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
* Before adding new stubs to this file, please check if a stub can be added to
* the machine-independent code in sys/compat/linux/linux_dummy.c.
*/
-DUMMY(mq_open);
-DUMMY(mq_unlink);
-DUMMY(mq_timedsend);
-DUMMY(mq_timedreceive);
-DUMMY(mq_notify);
-DUMMY(mq_getsetattr);
DUMMY(kexec_file_load);
diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h
index 1a5335af05b1..ae3d8569df58 100644
--- a/sys/arm64/linux/linux_proto.h
+++ b/sys/arm64/linux/linux_proto.h
@@ -459,7 +459,7 @@ struct linux_delete_module_args {
};
struct linux_timer_create_args {
char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)];
- char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)];
+ char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)];
char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)];
};
struct linux_timer_gettime_args {
@@ -701,7 +701,7 @@ struct linux_mq_timedreceive_args {
};
struct linux_mq_notify_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
- char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)];
+ char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)];
};
struct linux_mq_getsetattr_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c
index 151d46238d1c..73b3bf107486 100644
--- a/sys/arm64/linux/linux_systrace_args.c
+++ b/sys/arm64/linux/linux_systrace_args.c
@@ -848,7 +848,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 107: {
struct linux_timer_create_args *p = params;
iarg[a++] = p->clock_id; /* clockid_t */
- uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */
+ uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */
uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */
*n_args = 3;
break;
@@ -1445,7 +1445,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 184: {
struct linux_mq_notify_args *p = params;
iarg[a++] = p->mqd; /* l_mqd_t */
- uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */
+ uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */
*n_args = 2;
break;
}
@@ -3848,7 +3848,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "clockid_t";
break;
case 1:
- p = "userland struct sigevent *";
+ p = "userland struct l_sigevent *";
break;
case 2:
p = "userland l_timer_t *";
@@ -4792,7 +4792,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mqd_t";
break;
case 1:
- p = "userland const struct l_timespec *";
+ p = "userland const struct l_sigevent *";
break;
default:
break;
diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master
index 61c7499d57b3..79c04c398e00 100644
--- a/sys/arm64/linux/syscalls.master
+++ b/sys/arm64/linux/syscalls.master
@@ -661,7 +661,7 @@
107 AUE_NULL STD {
int linux_timer_create(
clockid_t clock_id,
- struct sigevent *evp,
+ struct l_sigevent *evp,
l_timer_t *timerid
);
}
@@ -1107,7 +1107,7 @@
184 AUE_NULL STD {
int linux_mq_notify(
l_mqd_t mqd,
- const struct l_timespec *abs_timeout
+ const struct l_sigevent *sevp
);
}
185 AUE_NULL STD {
diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c
index 6a7ae95d4e8a..a86392f16624 100644
--- a/sys/arm64/rockchip/rk_gpio.c
+++ b/sys/arm64/rockchip/rk_gpio.c
@@ -76,7 +76,7 @@ enum gpio_regs {
GPIO_INTR_EDGE_RISING | GPIO_INTR_EDGE_FALLING | \
GPIO_INTR_LEVEL_HIGH | GPIO_INTR_LEVEL_LOW)
-#define GPIO_FLAGS_PINCTRL GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN
+#define GPIO_FLAGS_PINCTRL (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)
#define RK_GPIO_MAX_PINS 32
struct pin_cached {
diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c
index 2685e5869b4f..a2cc63448f19 100644
--- a/sys/arm64/vmm/vmm.c
+++ b/sys/arm64/vmm/vmm.c
@@ -1716,6 +1716,54 @@ vm_handle_paging(struct vcpu *vcpu, bool *retu)
return (0);
}
+static int
+vm_handle_suspend(struct vcpu *vcpu, bool *retu)
+{
+ struct vm *vm = vcpu->vm;
+ int error, i;
+ struct thread *td;
+
+ error = 0;
+ td = curthread;
+
+ CPU_SET_ATOMIC(vcpu->vcpuid, &vm->suspended_cpus);
+
+ /*
+ * Wait until all 'active_cpus' have suspended themselves.
+ *
+ * Since a VM may be suspended at any time including when one or
+ * more vcpus are doing a rendezvous we need to call the rendezvous
+ * handler while we are waiting to prevent a deadlock.
+ */
+ vcpu_lock(vcpu);
+ while (error == 0) {
+ if (CPU_CMP(&vm->suspended_cpus, &vm->active_cpus) == 0)
+ break;
+
+ vcpu_require_state_locked(vcpu, VCPU_SLEEPING);
+ msleep_spin(vcpu, &vcpu->mtx, "vmsusp", hz);
+ vcpu_require_state_locked(vcpu, VCPU_FROZEN);
+ if (td_ast_pending(td, TDA_SUSPEND)) {
+ vcpu_unlock(vcpu);
+ error = thread_check_susp(td, false);
+ vcpu_lock(vcpu);
+ }
+ }
+ vcpu_unlock(vcpu);
+
+ /*
+ * Wakeup the other sleeping vcpus and return to userspace.
+ */
+ for (i = 0; i < vm->maxcpus; i++) {
+ if (CPU_ISSET(i, &vm->suspended_cpus)) {
+ vcpu_notify_event(vm_vcpu(vm, i));
+ }
+ }
+
+ *retu = true;
+ return (error);
+}
+
int
vm_run(struct vcpu *vcpu)
{
@@ -1788,6 +1836,11 @@ restart:
error = vm_handle_paging(vcpu, &retu);
break;
+ case VM_EXITCODE_SUSPENDED:
+ vcpu->nextpc = vme->pc;
+ error = vm_handle_suspend(vcpu, &retu);
+ break;
+
default:
/* Handle in userland */
vcpu->nextpc = vme->pc;
diff --git a/sys/arm64/vmm/vmm_dev.c b/sys/arm64/vmm/vmm_dev.c
index 9f405384f2b3..946c6760f7c1 100644
--- a/sys/arm64/vmm/vmm_dev.c
+++ b/sys/arm64/vmm/vmm_dev.c
@@ -102,10 +102,7 @@ vmm_priv_check(struct ucred *ucred)
static int
vcpu_lock_one(struct vcpu *vcpu)
{
- int error;
-
- error = vcpu_set_state(vcpu, VCPU_FROZEN, true);
- return (error);
+ return (vcpu_set_state(vcpu, VCPU_FROZEN, true));
}
static void
@@ -252,8 +249,10 @@ vmmdev_rw(struct cdev *cdev, struct uio *uio, int flags)
return (error);
}
+CTASSERT(sizeof(((struct vm_memseg *)0)->name) >= VM_MAX_SUFFIXLEN + 1);
+
static int
-get_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg)
+get_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg, size_t len)
{
struct devmem_softc *dsc;
int error;
@@ -270,17 +269,16 @@ get_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg)
}
KASSERT(dsc != NULL, ("%s: devmem segment %d not found",
__func__, mseg->segid));
- error = copystr(dsc->name, mseg->name, sizeof(mseg->name),
- NULL);
+ error = copystr(dsc->name, mseg->name, len, NULL);
} else {
- bzero(mseg->name, sizeof(mseg->name));
+ bzero(mseg->name, len);
}
return (error);
}
static int
-alloc_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg)
+alloc_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg, size_t len)
{
char *name;
int error;
@@ -296,8 +294,8 @@ alloc_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg)
*/
if (VM_MEMSEG_NAME(mseg)) {
sysmem = false;
- name = malloc(sizeof(mseg->name), M_VMMDEV, M_WAITOK);
- error = copystr(mseg->name, name, sizeof(mseg->name), NULL);
+ name = malloc(len, M_VMMDEV, M_WAITOK);
+ error = copystr(mseg->name, name, len, NULL);
if (error)
goto done;
}
@@ -545,10 +543,12 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag,
error = vm_munmap_memseg(sc->vm, mu->gpa, mu->len);
break;
case VM_ALLOC_MEMSEG:
- error = alloc_memseg(sc, (struct vm_memseg *)data);
+ error = alloc_memseg(sc, (struct vm_memseg *)data,
+ sizeof(((struct vm_memseg *)0)->name));
break;
case VM_GET_MEMSEG:
- error = get_memseg(sc, (struct vm_memseg *)data);
+ error = get_memseg(sc, (struct vm_memseg *)data,
+ sizeof(((struct vm_memseg *)0)->name));
break;
case VM_GET_REGISTER:
vmreg = (struct vm_register *)data;
@@ -994,7 +994,8 @@ devmem_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t len,
if (seglen >= last)
vm_object_reference(*objp);
else
- error = 0;
+ error = EINVAL;
+
vm_unlock_memsegs(dsc->sc->vm);
return (error);
}
diff --git a/sys/arm64/vmm/vmm_hyp_el2.S b/sys/arm64/vmm/vmm_hyp_el2.S
index 7b49d3144dff..7012e238c9c8 100644
--- a/sys/arm64/vmm/vmm_hyp_el2.S
+++ b/sys/arm64/vmm/vmm_hyp_el2.S
@@ -30,7 +30,7 @@
#include <machine/param.h>
- .rodata
+ .section .rodata
.align PAGE_SHIFT
.globl vmm_hyp_code
vmm_hyp_code:
diff --git a/sys/arm64/vmm/vmm_hyp_exception.S b/sys/arm64/vmm/vmm_hyp_exception.S
index 0e8b31ae8b12..9a9dc6901f40 100644
--- a/sys/arm64/vmm/vmm_hyp_exception.S
+++ b/sys/arm64/vmm/vmm_hyp_exception.S
@@ -332,7 +332,7 @@ LENTRY(handle_el2_el1_irq64)
2:
ldr x9, [sp], #16
ret
-LEND(handle_el2_el1_irq)
+LEND(handle_el2_el1_irq64)
LENTRY(handle_el2_el1_fiq64)
do_world_switch_to_host
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index d4a591943307..6e008cfc8d22 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -2518,7 +2518,16 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
error = ada_zone_cmd(periph, start_ccb, bp, &queue_ccb);
if ((error != 0)
|| (queue_ccb == 0)) {
+ /*
+ * g_io_deliver will recurisvely call start
+ * routine for ENOMEM, so drop the periph
+ * lock to allow that recursion.
+ */
+ if (error == ENOMEM)
+ cam_periph_unlock(periph);
biofinish(bp, NULL, error);
+ if (error == ENOMEM)
+ cam_periph_lock(periph);
xpt_release_ccb(start_ccb);
return;
}
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index 66b374008aa5..15e136e8a072 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -297,9 +297,10 @@ typedef enum {
XPORT_SRP, /* SCSI RDMA Protocol */
XPORT_NVME, /* NVMe over PCIe */
XPORT_MMCSD, /* MMC, SD, SDIO card */
+ XPORT_NVMF, /* NVMe over Fabrics */
} cam_xport;
-#define XPORT_IS_NVME(t) ((t) == XPORT_NVME)
+#define XPORT_IS_NVME(t) ((t) == XPORT_NVME || (t) == XPORT_NVMF)
#define XPORT_IS_ATA(t) ((t) == XPORT_ATA || (t) == XPORT_SATA)
#define XPORT_IS_SCSI(t) ((t) != XPORT_UNKNOWN && \
(t) != XPORT_UNSPECIFIED && \
@@ -653,6 +654,12 @@ struct ccb_pathinq_settings_nvme {
_Static_assert(sizeof(struct ccb_pathinq_settings_nvme) == 64,
"ccb_pathinq_settings_nvme too big");
+struct ccb_pathinq_settings_nvmf {
+ uint32_t nsid; /* Namespace ID for this path */
+ uint8_t trtype;
+ char dev_name[NVME_DEV_NAME_LEN]; /* nvme controller dev name for this device */
+};
+
#define PATHINQ_SETTINGS_SIZE 128
struct ccb_pathinq {
@@ -684,6 +691,7 @@ struct ccb_pathinq {
struct ccb_pathinq_settings_fc fc;
struct ccb_pathinq_settings_sas sas;
struct ccb_pathinq_settings_nvme nvme;
+ struct ccb_pathinq_settings_nvmf nvmf;
char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE];
} xport_specific;
u_int maxio; /* Max supported I/O size, in bytes. */
@@ -1050,6 +1058,13 @@ struct ccb_trans_settings_nvme
uint8_t max_speed; /* PCIe generation for each lane */
};
+struct ccb_trans_settings_nvmf
+{
+ u_int valid; /* Which fields to honor */
+#define CTS_NVMF_VALID_TRTYPE 0x01
+ uint8_t trtype;
+};
+
#include <cam/mmc/mmc_bus.h>
struct ccb_trans_settings_mmc {
struct mmc_ios ios;
@@ -1122,6 +1137,7 @@ struct ccb_trans_settings {
struct ccb_trans_settings_pata ata;
struct ccb_trans_settings_sata sata;
struct ccb_trans_settings_nvme nvme;
+ struct ccb_trans_settings_nvmf nvmf;
} xport_specific;
};
diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c
index b83ab9699425..471e6c355d69 100644
--- a/sys/cam/cam_iosched.c
+++ b/sys/cam/cam_iosched.c
@@ -1070,7 +1070,12 @@ cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stat
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
&ios->latencies, 0,
cam_iosched_sysctl_latencies, "A",
- "Array of power of 2 latency from 1ms to 1.024s");
+ "Array of latencies, a geometric progresson from\n"
+ "kern.cam.iosched.bucket_base_us with a ratio of\n"
+ "kern.cam.iosched.bucket_ration / 100 from one to\n"
+ "the next. By default 20 steps from 20us to 10.485s\n"
+ "by doubling.");
+
}
static void
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 5230a2694544..fac65e155890 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -83,6 +83,7 @@
#include <cam/ctl/ctl_ha.h>
#include <cam/ctl/ctl_private.h>
#include <cam/ctl/ctl_debug.h>
+#include <cam/ctl/ctl_nvme_all.h>
#include <cam/ctl/ctl_scsi_all.h>
#include <cam/ctl/ctl_error.h>
@@ -447,6 +448,8 @@ static int ctl_scsiio_lun_check(struct ctl_lun *lun,
static void ctl_failover_lun(union ctl_io *io);
static void ctl_scsiio_precheck(struct ctl_scsiio *ctsio);
static int ctl_scsiio(struct ctl_scsiio *ctsio);
+static void ctl_nvmeio_precheck(struct ctl_nvmeio *ctnio);
+static int ctl_nvmeio(struct ctl_nvmeio *ctnio);
static int ctl_target_reset(union ctl_io *io);
static void ctl_do_lun_reset(struct ctl_lun *lun, uint32_t initidx,
@@ -528,6 +531,38 @@ static moduledata_t ctl_moduledata = {
DECLARE_MODULE(ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD);
MODULE_VERSION(ctl, 1);
+static void
+ctl_be_move_done(union ctl_io *io, bool samethr)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.be_move_done(io, samethr);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.be_move_done(io, samethr);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static void
+ctl_continue_io(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.io_cont(io);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.io_cont(io);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
static struct ctl_frontend ha_frontend =
{
.name = "ha",
@@ -585,6 +620,8 @@ ctl_ha_datamove(union ctl_io *io)
uint32_t sg_entries_sent;
int do_sg_copy, i, j;
+ CTL_IO_ASSERT(io, SCSI);
+
memset(&msg.dt, 0, sizeof(msg.dt));
msg.hdr.msg_type = CTL_MSG_DATAMOVE;
msg.hdr.original_sc = io->io_hdr.remote_io;
@@ -601,32 +638,32 @@ ctl_ha_datamove(union ctl_io *io)
* us to get more than CTL_HA_MAX_SG_ENTRIES S/G entries,
* then we need to break this up into multiple transfers.
*/
- if (io->scsiio.kern_sg_entries == 0) {
+ if (ctl_kern_sg_entries(io) == 0) {
msg.dt.kern_sg_entries = 1;
#if 0
if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) {
- msg.dt.sg_list[0].addr = io->scsiio.kern_data_ptr;
+ msg.dt.sg_list[0].addr = ctl_kern_data_ptr(io);
} else {
/* XXX KDM use busdma here! */
msg.dt.sg_list[0].addr =
- (void *)vtophys(io->scsiio.kern_data_ptr);
+ (void *)vtophys(ctl_kern_data_ptr(io));
}
#else
KASSERT((io->io_hdr.flags & CTL_FLAG_BUS_ADDR) == 0,
("HA does not support BUS_ADDR"));
- msg.dt.sg_list[0].addr = io->scsiio.kern_data_ptr;
+ msg.dt.sg_list[0].addr = ctl_kern_data_ptr(io);
#endif
- msg.dt.sg_list[0].len = io->scsiio.kern_data_len;
+ msg.dt.sg_list[0].len = ctl_kern_data_len(io);
do_sg_copy = 0;
} else {
- msg.dt.kern_sg_entries = io->scsiio.kern_sg_entries;
+ msg.dt.kern_sg_entries = ctl_kern_sg_entries(io);
do_sg_copy = 1;
}
- msg.dt.kern_data_len = io->scsiio.kern_data_len;
- msg.dt.kern_total_len = io->scsiio.kern_total_len;
- msg.dt.kern_data_resid = io->scsiio.kern_data_resid;
- msg.dt.kern_rel_offset = io->scsiio.kern_rel_offset;
+ msg.dt.kern_data_len = ctl_kern_data_len(io);
+ msg.dt.kern_total_len = ctl_kern_total_len(io);
+ msg.dt.kern_data_resid = ctl_kern_data_resid(io);
+ msg.dt.kern_rel_offset = ctl_kern_rel_offset(io);
msg.dt.sg_sequence = 0;
/*
@@ -640,7 +677,7 @@ ctl_ha_datamove(union ctl_io *io)
sizeof(msg.dt.sg_list[0])),
msg.dt.kern_sg_entries - sg_entries_sent);
if (do_sg_copy != 0) {
- sgl = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr;
+ sgl = (struct ctl_sg_entry *)ctl_kern_data_ptr(io);
for (i = sg_entries_sent, j = 0;
i < msg.dt.cur_sg_entries; i++, j++) {
#if 0
@@ -1496,6 +1533,8 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_event event, int param)
/* XXX KDM do something here */
break;
}
+ CTL_IO_ASSERT(io, SCSI);
+
io->io_hdr.msg_type = CTL_MSG_DATAMOVE;
io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE;
/*
@@ -1569,6 +1608,8 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_event event, int param)
* back to the initiator.
*/
io = msg->hdr.serializing_sc;
+ CTL_IO_ASSERT(io, SCSI);
+
io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE;
io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG;
io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE;
@@ -2410,6 +2451,8 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
union ctl_io *io = (union ctl_io *)ioh;
struct ctl_ooa_entry *entry;
+ CTL_IO_ASSERT(io, SCSI);
+
/*
* If we've got more than we can fit, just count the
* remaining entries.
@@ -3174,6 +3217,23 @@ ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
retval = fe->ioctl(dev, cmd, addr, flag, td);
break;
}
+ case CTL_NVMF: {
+ struct ctl_nvmf *cn;
+ struct ctl_frontend *fe;
+
+ cn = (struct ctl_nvmf *)addr;
+
+ fe = ctl_frontend_find("nvmf");
+ if (fe == NULL) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Frontend \"nvmf\" not found.");
+ break;
+ }
+
+ retval = fe->ioctl(dev, cmd, addr, flag, td);
+ break;
+ }
case CTL_PORT_REQ: {
struct ctl_req *req;
struct ctl_frontend *fe;
@@ -4913,6 +4973,91 @@ ctl_lun_capacity_changed(struct ctl_be_lun *be_lun)
}
}
+void
+ctl_lun_nsdata_ids(struct ctl_be_lun *be_lun,
+ struct nvme_namespace_data *nsdata)
+{
+ struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun;
+ struct scsi_vpd_id_descriptor *idd;
+
+ if (lun->lun_devid == NULL)
+ return;
+
+ idd = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *)
+ lun->lun_devid->data, lun->lun_devid->len, scsi_devid_is_lun_naa);
+ if (idd != NULL) {
+ if (idd->length == 16) {
+ memcpy(nsdata->nguid, idd->identifier, 16);
+ return;
+ }
+ if (idd->length == 8) {
+ memcpy(nsdata->eui64, idd->identifier, 8);
+ return;
+ }
+ }
+
+ idd = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *)
+ lun->lun_devid->data, lun->lun_devid->len, scsi_devid_is_lun_eui64);
+ if (idd != NULL) {
+ if (idd->length == 8) {
+ memcpy(nsdata->eui64, idd->identifier, 8);
+ return;
+ }
+ }
+}
+
+void
+ctl_lun_nvme_ids(struct ctl_be_lun *be_lun, void *data)
+{
+ struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun;
+ struct scsi_vpd_id_descriptor *naa, *eui64, *uuid;
+ char *p;
+
+ memset(data, 0, 4096);
+
+ if (lun->lun_devid == NULL)
+ return;
+
+ naa = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *)
+ lun->lun_devid->data, lun->lun_devid->len, scsi_devid_is_lun_naa);
+ eui64 = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *)
+ lun->lun_devid->data, lun->lun_devid->len, scsi_devid_is_lun_eui64);
+ uuid = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *)
+ lun->lun_devid->data, lun->lun_devid->len, scsi_devid_is_lun_uuid);
+
+ p = data;
+
+ /* EUI64 */
+ if ((naa != NULL && naa->length == 8) || eui64 != NULL) {
+ *p++ = 1;
+ *p++ = 8;
+ p += 2;
+ if (naa != NULL && naa->length == 8)
+ memcpy(p, naa->identifier, 8);
+ else
+ memcpy(p, eui64->identifier, 8);
+ p += 8;
+ }
+
+ /* NGUID */
+ if (naa != NULL && naa->length == 16) {
+ *p++ = 1;
+ *p++ = 16;
+ p += 2;
+ memcpy(p, naa->identifier, 16);
+ p += 16;
+ }
+
+ /* UUID */
+ if (uuid != NULL) {
+ *p++ = 1;
+ *p++ = uuid->length;
+ p += 2;
+ memcpy(p, uuid->identifier, uuid->length);
+ p += uuid->length;
+ }
+}
+
/*
* Backend "memory move is complete" callback for requests that never
* make it down to say RAIDCore's configuration code.
@@ -4923,8 +5068,6 @@ ctl_config_move_done(union ctl_io *io, bool samethr)
int retval;
CTL_DEBUG_PRINT(("ctl_config_move_done\n"));
- KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
- ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type));
if (ctl_debug & CTL_DEBUG_CDB_DATA)
ctl_data_print(io);
@@ -4938,7 +5081,7 @@ ctl_config_move_done(union ctl_io *io, bool samethr)
* we'll need to know how to clean them up here as well.
*/
if (io->io_hdr.flags & CTL_FLAG_ALLOCATED)
- free(io->scsiio.kern_data_ptr, M_CTL);
+ free(ctl_kern_data_ptr(io), M_CTL);
ctl_done(io);
retval = CTL_RETVAL_COMPLETE;
} else {
@@ -4959,7 +5102,17 @@ ctl_config_move_done(union ctl_io *io, bool samethr)
* XXX KDM call ctl_scsiio() again for now, and check flag
* bits to see whether we're allocated or not.
*/
- retval = ctl_scsiio(&io->scsiio);
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ retval = ctl_scsiio(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ retval = ctl_nvmeio(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
}
return (retval);
}
@@ -4983,7 +5136,7 @@ ctl_data_submit_done(union ctl_io *io)
(io->io_hdr.flags & CTL_FLAG_ABORT) == 0 &&
((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE ||
(io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) {
- io->scsiio.io_cont(io);
+ ctl_continue_io(io);
return;
}
ctl_done(io);
@@ -5010,7 +5163,7 @@ ctl_config_write_done(union ctl_io *io)
(io->io_hdr.flags & CTL_FLAG_ABORT) == 0 &&
((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE ||
(io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) {
- io->scsiio.io_cont(io);
+ ctl_continue_io(io);
return;
}
/*
@@ -5019,7 +5172,7 @@ ctl_config_write_done(union ctl_io *io)
* no data, like start/stop unit, we need to check here.
*/
if (io->io_hdr.flags & CTL_FLAG_ALLOCATED)
- buf = io->scsiio.kern_data_ptr;
+ buf = ctl_kern_data_ptr(io);
else
buf = NULL;
ctl_done(io);
@@ -5039,7 +5192,7 @@ ctl_config_read_done(union ctl_io *io)
((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE &&
(io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
if (io->io_hdr.flags & CTL_FLAG_ALLOCATED)
- buf = io->scsiio.kern_data_ptr;
+ buf = ctl_kern_data_ptr(io);
else
buf = NULL;
ctl_done(io);
@@ -5054,7 +5207,7 @@ ctl_config_read_done(union ctl_io *io)
* the I/O just yet.
*/
if (io->io_hdr.flags & CTL_FLAG_IO_CONT) {
- io->scsiio.io_cont(io);
+ ctl_continue_io(io);
return;
}
@@ -5512,6 +5665,8 @@ ctl_write_same_cont(union ctl_io *io)
struct ctl_lba_len_flags *lbalen;
int retval;
+ CTL_IO_ASSERT(io, SCSI);
+
ctsio = &io->scsiio;
ctsio->io_hdr.status = CTL_STATUS_NONE;
lbalen = (struct ctl_lba_len_flags *)
@@ -5857,6 +6012,8 @@ ctl_do_mode_select(union ctl_io *io)
uint16_t *len_left, *len_used;
int retval, i;
+ CTL_IO_ASSERT(io, SCSI);
+
ctsio = &io->scsiio;
page_index = NULL;
page_len = 0;
@@ -8770,6 +8927,8 @@ ctl_cnw_cont(union ctl_io *io)
struct ctl_lba_len_flags *lbalen;
int retval;
+ CTL_IO_ASSERT(io, SCSI);
+
ctsio = &io->scsiio;
ctsio->io_hdr.status = CTL_STATUS_NONE;
ctsio->io_hdr.flags &= ~CTL_FLAG_IO_CONT;
@@ -10554,14 +10713,732 @@ ctl_read_toc(struct ctl_scsiio *ctsio)
}
/*
+ * For NVMe commands, parse the LBA and length.
+ */
+static bool
+ctl_nvme_get_lba_len(struct ctl_nvmeio *ctnio, uint64_t *lba, uint32_t *len)
+{
+ CTL_IO_ASSERT(ctnio, NVME);
+
+ switch (ctnio->cmd.opc) {
+ case NVME_OPC_WRITE:
+ case NVME_OPC_READ:
+ case NVME_OPC_WRITE_UNCORRECTABLE:
+ case NVME_OPC_COMPARE:
+ case NVME_OPC_WRITE_ZEROES:
+ case NVME_OPC_VERIFY:
+ *lba = (uint64_t)le32toh(ctnio->cmd.cdw11) << 32 |
+ le32toh(ctnio->cmd.cdw10);
+ *len = (le32toh(ctnio->cmd.cdw12) & 0xffff) + 1;
+ return (true);
+ default:
+ *lba = 0;
+ *len = 0;
+ return (false);
+ }
+}
+
+static bool
+ctl_nvme_fua(struct ctl_nvmeio *ctnio)
+{
+ return ((le32toh(ctnio->cmd.cdw12) & (1U << 30)) != 0);
+}
+
+int
+ctl_nvme_identify(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ size_t len;
+ int retval;
+ uint8_t cns;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_identify\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME_ADMIN);
+ MPASS(ctnio->cmd.opc == NVME_OPC_IDENTIFY);
+
+ /*
+ * The data buffer for Identify is always 4096 bytes, see
+ * 5.51.1 in NVMe base specification 1.4.
+ */
+ len = 4096;
+
+ ctnio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK);
+ ctnio->kern_data_len = len;
+ ctnio->kern_total_len = len;
+ ctnio->kern_rel_offset = 0;
+ ctnio->kern_sg_entries = 0;
+
+ ctl_nvme_set_success(ctnio);
+ ctnio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctnio->be_move_done = ctl_config_move_done;
+
+ /*
+ * If we don't have a LUN, return an empty result for CNS == 0.
+ */
+ if (lun == NULL) {
+ cns = le32toh(ctnio->cmd.cdw10) & 0xff;
+ switch (cns) {
+ case 0:
+ memset(ctnio->kern_data_ptr, 0, len);
+ ctl_datamove((union ctl_io *)ctnio);
+ break;
+ default:
+ ctl_nvme_set_invalid_field(ctnio);
+ break;
+ }
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ retval = lun->backend->config_read((union ctl_io *)ctnio);
+ return (retval);
+}
+
+int
+ctl_nvme_flush(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_flush\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_FLUSH);
+
+ /*
+ * NVMe flushes always flush the entire namespace, not an LBA
+ * range.
+ */
+ retval = lun->backend->config_write((union ctl_io *)ctnio);
+
+ return (retval);
+}
+
+int
+ctl_nvme_read_write(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ struct ctl_lba_len_flags *lbalen;
+ uint64_t lba;
+ uint32_t num_blocks;
+ int flags, retval;
+ bool isread;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_read_write: command: %#x\n",
+ ctnio->cmd.opc));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_WRITE ||
+ ctnio->cmd.opc == NVME_OPC_READ);
+
+ flags = 0;
+ isread = ctnio->cmd.opc == NVME_OPC_READ;
+ ctl_nvme_get_lba_len(ctnio, &lba, &num_blocks);
+
+ /*
+ * The first check is to make sure we're in bounds, the second
+ * check is to catch wrap-around problems. If the lba + num blocks
+ * is less than the lba, then we've wrapped around and the block
+ * range is invalid anyway.
+ */
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_nvme_set_lba_out_of_range(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Set FUA and/or DPO if caches are disabled.
+ *
+ * For a read this may not be quite correct for the block
+ * backend as any earlier writes to the LBA range should be
+ * flushed to backing store as part of the read.
+ */
+ if (ctl_nvme_fua(ctnio)) {
+ flags |= CTL_LLF_FUA;
+ if (isread)
+ flags |= CTL_LLF_DPO;
+ }
+
+ lbalen = (struct ctl_lba_len_flags *)
+ &ctnio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
+ lbalen->lba = lba;
+ lbalen->len = num_blocks;
+ lbalen->flags = (isread ? CTL_LLF_READ : CTL_LLF_WRITE) | flags;
+
+ ctnio->kern_total_len = num_blocks * lun->be_lun->blocksize;
+ ctnio->kern_rel_offset = 0;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_read_write: calling data_submit()\n"));
+
+ retval = lun->backend->data_submit((union ctl_io *)ctnio);
+ return (retval);
+}
+
+int
+ctl_nvme_write_uncorrectable(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ struct ctl_lba_len_flags *lbalen;
+ uint64_t lba;
+ uint32_t num_blocks;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_write_uncorrectable\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_WRITE_UNCORRECTABLE);
+
+ ctl_nvme_get_lba_len(ctnio, &lba, &num_blocks);
+
+ /*
+ * The first check is to make sure we're in bounds, the second
+ * check is to catch wrap-around problems. If the lba + num blocks
+ * is less than the lba, then we've wrapped around and the block
+ * range is invalid anyway.
+ */
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_nvme_set_lba_out_of_range(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lbalen = (struct ctl_lba_len_flags *)
+ &ctnio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
+ lbalen->lba = lba;
+ lbalen->len = num_blocks;
+ lbalen->flags = 0;
+ retval = lun->backend->config_write((union ctl_io *)ctnio);
+
+ return (retval);
+}
+
+int
+ctl_nvme_compare(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ struct ctl_lba_len_flags *lbalen;
+ uint64_t lba;
+ uint32_t num_blocks;
+ int flags;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_compare\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_COMPARE);
+
+ flags = 0;
+ ctl_nvme_get_lba_len(ctnio, &lba, &num_blocks);
+ if (ctl_nvme_fua(ctnio))
+ flags |= CTL_LLF_FUA;
+
+ /*
+ * The first check is to make sure we're in bounds, the second
+ * check is to catch wrap-around problems. If the lba + num blocks
+ * is less than the lba, then we've wrapped around and the block
+ * range is invalid anyway.
+ */
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_nvme_set_lba_out_of_range(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lbalen = (struct ctl_lba_len_flags *)
+ &ctnio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
+ lbalen->lba = lba;
+ lbalen->len = num_blocks;
+ lbalen->flags = CTL_LLF_COMPARE | flags;
+ ctnio->kern_total_len = num_blocks * lun->be_lun->blocksize;
+ ctnio->kern_rel_offset = 0;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_compare: calling data_submit()\n"));
+ retval = lun->backend->data_submit((union ctl_io *)ctnio);
+ return (retval);
+}
+
+int
+ctl_nvme_write_zeroes(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ struct ctl_lba_len_flags *lbalen;
+ uint64_t lba;
+ uint32_t num_blocks;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_write_zeroes\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_WRITE_ZEROES);
+
+ ctl_nvme_get_lba_len(ctnio, &lba, &num_blocks);
+
+ /*
+ * The first check is to make sure we're in bounds, the second
+ * check is to catch wrap-around problems. If the lba + num blocks
+ * is less than the lba, then we've wrapped around and the block
+ * range is invalid anyway.
+ */
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_nvme_set_lba_out_of_range(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lbalen = (struct ctl_lba_len_flags *)
+ &ctnio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
+ lbalen->lba = lba;
+ lbalen->len = num_blocks;
+ lbalen->flags = 0;
+ retval = lun->backend->config_write((union ctl_io *)ctnio);
+
+ return (retval);
+}
+
+int
+ctl_nvme_dataset_management(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ struct nvme_dsm_range *r;
+ uint64_t lba;
+ uint32_t len, num_blocks;
+ u_int i, ranges;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_dataset_management\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_DATASET_MANAGEMENT);
+
+ ranges = le32toh(ctnio->cmd.cdw10) & 0xff;
+ len = ranges * sizeof(struct nvme_dsm_range);
+
+ /*
+ * If we've got a kernel request that hasn't been malloced yet,
+ * malloc it and tell the caller the data buffer is here.
+ */
+ if ((ctnio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) {
+ ctnio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK);
+ ctnio->kern_data_len = len;
+ ctnio->kern_total_len = len;
+ ctnio->kern_rel_offset = 0;
+ ctnio->kern_sg_entries = 0;
+ ctnio->io_hdr.flags |= CTL_FLAG_ALLOCATED;
+ ctnio->be_move_done = ctl_config_move_done;
+ ctl_datamove((union ctl_io *)ctnio);
+
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * Require a flat buffer of the correct size.
+ */
+ if (ctnio->kern_sg_entries > 0 ||
+ ctnio->kern_total_len - ctnio->kern_data_resid != len)
+ return (CTL_RETVAL_ERROR);
+
+ /*
+ * Verify that none of the ranges are out of bounds.
+ */
+ r = (struct nvme_dsm_range *)ctnio->kern_data_ptr;
+ for (i = 0; i < ranges; i++) {
+ lba = le64toh(r[i].starting_lba);
+ num_blocks = le32toh(r[i].length);
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_nvme_set_lba_out_of_range(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ }
+
+ CTL_DEBUG_PRINT(("ctl_nvme_dataset_management: calling config_write()\n"));
+ retval = lun->backend->config_write((union ctl_io *)ctnio);
+ return (retval);
+}
+
+int
+ctl_nvme_verify(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_lun *lun = CTL_LUN(ctnio);
+ struct ctl_lba_len_flags *lbalen;
+ uint64_t lba;
+ uint32_t num_blocks;
+ int flags;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_verify\n"));
+
+ CTL_IO_ASSERT(ctnio, NVME);
+ MPASS(ctnio->cmd.opc == NVME_OPC_VERIFY);
+
+ flags = 0;
+ ctl_nvme_get_lba_len(ctnio, &lba, &num_blocks);
+ if (ctl_nvme_fua(ctnio))
+ flags |= CTL_LLF_FUA;
+
+ /*
+ * The first check is to make sure we're in bounds, the second
+ * check is to catch wrap-around problems. If the lba + num blocks
+ * is less than the lba, then we've wrapped around and the block
+ * range is invalid anyway.
+ */
+ if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
+ || ((lba + num_blocks) < lba)) {
+ ctl_nvme_set_lba_out_of_range(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ lbalen = (struct ctl_lba_len_flags *)
+ &ctnio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
+ lbalen->lba = lba;
+ lbalen->len = num_blocks;
+ lbalen->flags = CTL_LLF_VERIFY | flags;
+ ctnio->kern_total_len = 0;
+ ctnio->kern_rel_offset = 0;
+
+ CTL_DEBUG_PRINT(("ctl_nvme_verify: calling data_submit()\n"));
+ retval = lun->backend->data_submit((union ctl_io *)ctnio);
+ return (retval);
+}
+
+static const struct ctl_nvme_cmd_entry *
+ctl_nvme_get_cmd_entry(struct ctl_nvmeio *ctnio)
+{
+ const struct ctl_nvme_cmd_entry *entry;
+
+ switch (ctnio->io_hdr.io_type) {
+ case CTL_IO_NVME:
+ entry = &nvme_nvm_cmd_table[ctnio->cmd.opc];
+ break;
+ case CTL_IO_NVME_ADMIN:
+ entry = &nvme_admin_cmd_table[ctnio->cmd.opc];
+ break;
+ default:
+ __assert_unreachable();
+ }
+ return (entry);
+}
+
+static const struct ctl_nvme_cmd_entry *
+ctl_nvme_validate_command(struct ctl_nvmeio *ctnio)
+{
+ const struct ctl_nvme_cmd_entry *entry;
+
+ entry = ctl_nvme_get_cmd_entry(ctnio);
+ if (entry->execute == NULL) {
+ ctl_nvme_set_invalid_opcode(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (NULL);
+ }
+
+ /* Validate fused commands. */
+ switch (NVMEV(NVME_CMD_FUSE, ctnio->cmd.fuse)) {
+ case NVME_FUSE_NORMAL:
+ break;
+ case NVME_FUSE_FIRST:
+ if (ctnio->io_hdr.io_type != CTL_IO_NVME ||
+ ctnio->cmd.opc != NVME_OPC_COMPARE) {
+ ctl_nvme_set_invalid_field(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (NULL);
+ }
+ break;
+ case NVME_FUSE_SECOND:
+ if (ctnio->io_hdr.io_type != CTL_IO_NVME ||
+ ctnio->cmd.opc != NVME_OPC_COMPARE) {
+ ctl_nvme_set_invalid_field(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (NULL);
+ }
+ break;
+ default:
+ ctl_nvme_set_invalid_field(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return (NULL);
+ }
+
+ return (entry);
+}
+
+/*
+ * This is a simpler version of ctl_scsiio_lun_check that fails
+ * requests on a LUN without active media.
+ *
+ * Returns true if the command has been completed with an error.
+ */
+static bool
+ctl_nvmeio_lun_check(struct ctl_lun *lun,
+ const struct ctl_nvme_cmd_entry *entry, struct ctl_nvmeio *ctnio)
+{
+ mtx_assert(&lun->lun_lock, MA_OWNED);
+
+ if ((entry->flags & CTL_CMD_FLAG_OK_ON_NO_MEDIA) == 0) {
+ if ((lun->flags & (CTL_LUN_EJECTED | CTL_LUN_NO_MEDIA |
+ CTL_LUN_STOPPED)) != 0) {
+ ctl_nvme_set_namespace_not_ready(ctnio);
+ return (true);
+ }
+ }
+
+ return (false);
+}
+
+/*
+ * Check for blockage against the OOA (Order Of Arrival) queue.
+ * Assumptions:
+ * - pending_io is generally either incoming, or on the blocked queue
+ * - starting I/O is the I/O we want to start the check with.
+ */
+static ctl_action
+ctl_nvme_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
+ union ctl_io **starting_io, union ctl_io **aborted_io)
+{
+ union ctl_io *ooa_io = *starting_io;
+
+ CTL_IO_ASSERT(pending_io, NVME, NVME_ADMIN);
+
+ mtx_assert(&lun->lun_lock, MA_OWNED);
+
+ *aborted_io = NULL;
+
+ /*
+ * Aborted commands are not going to be executed and may even
+ * not report completion, so we don't care about their order.
+ * Let them complete ASAP to clean the OOA queue.
+ */
+ if (__predict_false(pending_io->io_hdr.flags & CTL_FLAG_ABORT))
+ return (CTL_ACTION_PASS);
+
+ /*
+ * NVMe has rather simple command ordering requirements. In
+ * particular, there is no requirement on the controller to
+ * enforce a specific order for overlapping LBAs. The only
+ * constraint is that fused operations (Compare and Write),
+ * must be completed as a unit.
+ *
+ * To support fused operations, the following strategy is used:
+ * - the first half of a fused command is not enqueued to rtr
+ * until the second half is enqueued
+ * - the second half of a fused command blocks on the first
+ * half of a fuse command
+ * - subsequent commands block on the second half of the
+ * fused command
+ */
+
+ /*
+ * Is the previously submitted command the first half of a
+ * fused operation?
+ */
+ if (ooa_io != NULL &&
+ NVMEV(NVME_CMD_FUSE, ooa_io->nvmeio.cmd.fuse) == NVME_FUSE_FIRST) {
+ /*
+ * If this is the second half, enqueue the first half
+ * and block the second half on the first half.
+ */
+ if (NVMEV(NVME_CMD_FUSE, pending_io->nvmeio.cmd.fuse) ==
+ NVME_FUSE_SECOND) {
+ /*
+ * XXX: Do we need to wait for other rtr requests
+ * to drain so this is truly atomic?
+ */
+ return (CTL_ACTION_FUSED);
+ }
+
+ /* Abort the first half. */
+ ctl_nvme_set_missing_fused_command(&ooa_io->nvmeio);
+ *aborted_io = ooa_io;
+ } else {
+ switch (NVMEV(NVME_CMD_FUSE, pending_io->nvmeio.cmd.fuse)) {
+ case NVME_FUSE_FIRST:
+ /* First half, wait for the second half. */
+ return (CTL_ACTION_SKIP);
+ case NVME_FUSE_SECOND:
+ /* Second half without a matching first half, abort. */
+ ctl_nvme_set_missing_fused_command(&pending_io->nvmeio);
+ *aborted_io = pending_io;
+ return (CTL_ACTION_SKIP);
+ }
+ }
+
+ /*
+ * Scan the OOA queue looking for the most recent second half
+ * of a fused op.
+ */
+ for (; ooa_io != NULL;
+ ooa_io = (union ctl_io *)LIST_NEXT(&ooa_io->io_hdr, ooa_links)) {
+ if (NVMEV(NVME_CMD_FUSE, ooa_io->nvmeio.cmd.fuse) ==
+ NVME_FUSE_SECOND) {
+ *starting_io = ooa_io;
+ return (CTL_ACTION_BLOCK);
+ }
+ }
+
+ *starting_io = NULL;
+ return (CTL_ACTION_PASS);
+}
+
+static void
+ctl_nvmeio_precheck(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_softc *softc = CTL_SOFTC(ctnio);
+ struct ctl_lun *lun;
+ const struct ctl_nvme_cmd_entry *entry;
+ union ctl_io *bio, *aborted_io;
+ uint32_t targ_lun;
+
+ lun = NULL;
+ targ_lun = ctnio->io_hdr.nexus.targ_mapped_lun;
+ if (targ_lun < ctl_max_luns)
+ lun = softc->ctl_luns[targ_lun];
+ if (lun != NULL) {
+ /*
+ * If the LUN is invalid, pretend that it doesn't exist.
+ * It will go away as soon as all pending I/O has been
+ * completed.
+ */
+ mtx_lock(&lun->lun_lock);
+ if (lun->flags & CTL_LUN_DISABLED) {
+ mtx_unlock(&lun->lun_lock);
+ lun = NULL;
+ }
+ }
+ CTL_LUN(ctnio) = lun;
+ if (lun != NULL) {
+ CTL_BACKEND_LUN(ctnio) = lun->be_lun;
+
+ /*
+ * Every I/O goes into the OOA queue for a particular LUN,
+ * and stays there until completion.
+ */
+#ifdef CTL_TIME_IO
+ if (LIST_EMPTY(&lun->ooa_queue))
+ lun->idle_time += getsbinuptime() - lun->last_busy;
+#endif
+ LIST_INSERT_HEAD(&lun->ooa_queue, &ctnio->io_hdr, ooa_links);
+ }
+
+ /* Get command entry and return error if it is unsupported. */
+ entry = ctl_nvme_validate_command(ctnio);
+ if (entry == NULL) {
+ if (lun)
+ mtx_unlock(&lun->lun_lock);
+ return;
+ }
+
+ ctnio->io_hdr.flags &= ~CTL_FLAG_DATA_MASK;
+ ctnio->io_hdr.flags |= entry->flags & CTL_FLAG_DATA_MASK;
+
+ /* All NVMe commands other than IDENTIFY require a LUN. */
+ if (lun == NULL) {
+ if (entry->flags & CTL_CMD_FLAG_OK_ON_NO_LUN) {
+ ctnio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ ctl_enqueue_rtr((union ctl_io *)ctnio);
+ return;
+ }
+
+ ctl_nvme_set_invalid_namespace(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ CTL_DEBUG_PRINT(("ctl_nvmeio_precheck: bailing out due to invalid LUN\n"));
+ return;
+ } else {
+ /*
+ * NVMe namespaces can only be backed by T_DIRECT LUNs.
+ */
+ if (lun->be_lun->lun_type != T_DIRECT) {
+ mtx_unlock(&lun->lun_lock);
+ ctl_nvme_set_invalid_namespace(ctnio);
+ ctl_done((union ctl_io *)ctnio);
+ return;
+ }
+ }
+
+ if (ctl_nvmeio_lun_check(lun, entry, ctnio) != 0) {
+ mtx_unlock(&lun->lun_lock);
+ ctl_done((union ctl_io *)ctnio);
+ return;
+ }
+
+ bio = (union ctl_io *)LIST_NEXT(&ctnio->io_hdr, ooa_links);
+ switch (ctl_nvme_check_ooa(lun, (union ctl_io *)ctnio, &bio,
+ &aborted_io)) {
+ case CTL_ACTION_PASS:
+ ctnio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ mtx_unlock(&lun->lun_lock);
+ ctl_enqueue_rtr((union ctl_io *)ctnio);
+ break;
+ case CTL_ACTION_FUSED:
+ /* Block the second half on the first half. */
+ ctnio->io_hdr.blocker = bio;
+ TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctnio->io_hdr,
+ blocked_links);
+
+ /* Pass the first half. */
+ bio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ mtx_unlock(&lun->lun_lock);
+ ctl_enqueue_rtr(bio);
+ break;
+ case CTL_ACTION_SKIP:
+ mtx_unlock(&lun->lun_lock);
+ break;
+ case CTL_ACTION_BLOCK:
+ ctnio->io_hdr.blocker = bio;
+ TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctnio->io_hdr,
+ blocked_links);
+ mtx_unlock(&lun->lun_lock);
+ break;
+ default:
+ __assert_unreachable();
+ }
+ if (aborted_io != NULL)
+ ctl_done(aborted_io);
+}
+
+static int
+ctl_nvmeio(struct ctl_nvmeio *ctnio)
+{
+ const struct ctl_nvme_cmd_entry *entry;
+ int retval;
+
+ CTL_DEBUG_PRINT(("ctl_nvmeio %s opc=%02X\n",
+ ctnio->io_hdr.io_type == CTL_IO_NVME ? "nvm" : "admin",
+ ctnio->cmd.opc));
+
+ entry = ctl_nvme_get_cmd_entry(ctnio);
+ MPASS(entry != NULL);
+
+ /*
+ * If this I/O has been aborted, just send it straight to
+ * ctl_done() without executing it.
+ */
+ if (ctnio->io_hdr.flags & CTL_FLAG_ABORT) {
+ ctl_done((union ctl_io *)ctnio);
+ return (CTL_RETVAL_COMPLETE);
+ }
+
+ /*
+ * All the checks should have been handled by ctl_nvmeio_precheck().
+ * We should be clear now to just execute the I/O.
+ */
+ retval = entry->execute(ctnio);
+
+ return (retval);
+}
+
+/*
* For known CDB types, parse the LBA and length.
*/
static int
ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len)
{
- KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
- ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type));
+ CTL_IO_ASSERT(io, SCSI);
switch (io->scsiio.cdb[0]) {
case COMPARE_AND_WRITE: {
@@ -10741,8 +11618,7 @@ ctl_extent_check_unmap(union ctl_io *io, uint64_t lba2, uint64_t len2)
uint64_t lba;
uint32_t len;
- KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
- ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type));
+ CTL_IO_ASSERT(io, SCSI);
/* If not UNMAP -- go other way. */
if (io->scsiio.cdb[0] != UNMAP)
@@ -10812,6 +11688,8 @@ static ctl_action
ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io,
const uint8_t *serialize_row, union ctl_io *ooa_io)
{
+ CTL_IO_ASSERT(pending_io, SCSI);
+ CTL_IO_ASSERT(ooa_io, SCSI);
/*
* The initiator attempted multiple untagged commands at the same
@@ -10920,6 +11798,8 @@ ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
const uint8_t *serialize_row;
ctl_action action;
+ CTL_IO_ASSERT(pending_io, SCSI);
+
mtx_assert(&lun->lun_lock, MA_OWNED);
/*
@@ -10969,7 +11849,7 @@ ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
* we know for sure that the blocker I/O does no longer count.
*/
static void
-ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip)
+ctl_scsi_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip)
{
struct ctl_softc *softc = lun->ctl_softc;
union ctl_io *bio, *obio;
@@ -10977,6 +11857,8 @@ ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip)
union ctl_ha_msg msg_info;
ctl_action action;
+ CTL_IO_ASSERT(io, SCSI);
+
mtx_assert(&lun->lun_lock, MA_OWNED);
if (io->io_hdr.blocker == NULL)
@@ -11062,6 +11944,72 @@ error:
}
}
+static void
+ctl_nvme_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip)
+{
+ union ctl_io *bio;
+ const struct ctl_nvme_cmd_entry *entry;
+
+ CTL_IO_ASSERT(io, NVME, NVME_ADMIN);
+
+ mtx_assert(&lun->lun_lock, MA_OWNED);
+
+ if (io->io_hdr.blocker == NULL)
+ return;
+
+ /*
+ * If this is the second half of a fused operation, it should
+ * be the only io on the blocked list. If the first half
+ * failed, complete the second half with an appropriate error.
+ */
+ bio = io->io_hdr.blocker;
+ if (NVMEV(NVME_CMD_FUSE, io->nvmeio.cmd.fuse) == NVME_FUSE_SECOND) {
+ MPASS(io ==
+ (union ctl_io *)TAILQ_FIRST(&bio->io_hdr.blocked_queue));
+ MPASS(TAILQ_NEXT(&io->io_hdr, blocked_links) == NULL);
+
+ TAILQ_REMOVE(&bio->io_hdr.blocked_queue, &io->io_hdr,
+ blocked_links);
+ if (bio->io_hdr.status != CTL_SUCCESS) {
+ ctl_nvme_set_failed_fused_command(&io->nvmeio);
+ ctl_done(io);
+ return;
+ }
+ } else {
+ /*
+ * This must be a command that was blocked on the
+ * second half of a fused operation.
+ */
+ MPASS(NVMEV(NVME_CMD_FUSE, bio->nvmeio.cmd.fuse) ==
+ NVME_FUSE_SECOND);
+ TAILQ_REMOVE(&bio->io_hdr.blocked_queue, &io->io_hdr,
+ blocked_links);
+ }
+
+ entry = ctl_nvme_get_cmd_entry(&io->nvmeio);
+ if (ctl_nvmeio_lun_check(lun, entry, &io->nvmeio) != 0) {
+ ctl_done(io);
+ return;
+ }
+
+ io->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
+ ctl_enqueue_rtr(io);
+}
+
+static void
+ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (ctl_scsi_try_unblock_io(lun, io, skip));
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (ctl_nvme_try_unblock_io(lun, io, skip));
+ default:
+ __assert_unreachable();
+ }
+}
+
/*
* Try to unblock I/Os blocked by the specified I/O.
*
@@ -11217,6 +12165,8 @@ bailout:
static void
ctl_failover_io(union ctl_io *io, int have_lock)
{
+ CTL_IO_ASSERT(io, SCSI);
+
ctl_set_busy(&io->scsiio);
ctl_done(io);
}
@@ -11773,6 +12723,7 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id,
*/
LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) {
union ctl_io *xio = (union ctl_io *)xioh;
+
if ((targ_port == UINT32_MAX ||
targ_port == xioh->nexus.targ_port) &&
(init_id == UINT32_MAX ||
@@ -11784,6 +12735,7 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id,
if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) {
union ctl_ha_msg msg_info;
+ CTL_IO_ASSERT(xio, SCSI);
msg_info.hdr.nexus = xioh->nexus;
msg_info.task.task_action = CTL_TASK_ABORT_TASK;
msg_info.task.tag_num = xio->scsiio.tag_num;
@@ -11924,6 +12876,8 @@ ctl_abort_task(union ctl_io *io)
*/
LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) {
union ctl_io *xio = (union ctl_io *)xioh;
+
+ CTL_IO_ASSERT(xio, SCSI);
if ((xioh->nexus.targ_port != io->io_hdr.nexus.targ_port)
|| (xioh->nexus.initid != io->io_hdr.nexus.initid)
|| (xioh->flags & CTL_FLAG_ABORT))
@@ -11995,6 +12949,8 @@ ctl_query_task(union ctl_io *io, int task_set)
mtx_unlock(&softc->ctl_lock);
LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) {
union ctl_io *xio = (union ctl_io *)xioh;
+
+ CTL_IO_ASSERT(xio, SCSI);
if ((xioh->nexus.targ_port != io->io_hdr.nexus.targ_port)
|| (xioh->nexus.initid != io->io_hdr.nexus.initid)
|| (xioh->flags & CTL_FLAG_ABORT))
@@ -12108,6 +13064,8 @@ ctl_handle_isc(union ctl_io *io)
const struct ctl_cmd_entry *entry;
uint32_t targ_lun;
+ CTL_IO_ASSERT(io, SCSI);
+
targ_lun = io->io_hdr.nexus.targ_mapped_lun;
switch (io->io_hdr.msg_type) {
case CTL_MSG_SERIALIZE:
@@ -12243,6 +13201,8 @@ ctl_inject_error(struct ctl_lun *lun, union ctl_io *io)
{
struct ctl_error_desc *desc, *desc2;
+ CTL_IO_ASSERT(io, SCSI);
+
mtx_assert(&lun->lun_lock, MA_OWNED);
STAILQ_FOREACH_SAFE(desc, &lun->error_list, links, desc2) {
@@ -12321,12 +13281,7 @@ ctl_datamove_done_process(union ctl_io *io)
{
#ifdef CTL_TIME_IO
struct bintime cur_bt;
-#endif
- KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
- ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type));
-
-#ifdef CTL_TIME_IO
getbinuptime(&cur_bt);
bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt);
bintime_add(&io->io_hdr.dma_bt, &cur_bt);
@@ -12336,13 +13291,36 @@ ctl_datamove_done_process(union ctl_io *io)
if ((io->io_hdr.port_status != 0) &&
((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE ||
(io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) {
- ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1,
- /*retry_count*/ io->io_hdr.port_status);
- } else if (io->scsiio.kern_data_resid != 0 &&
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1,
+ /*retry_count*/ io->io_hdr.port_status);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ if (io->io_hdr.flags & CTL_FLAG_ABORT)
+ ctl_nvme_set_command_aborted(&io->nvmeio);
+ else
+ ctl_nvme_set_data_transfer_error(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+ } else if (ctl_kern_data_resid(io) != 0 &&
(io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT &&
((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE ||
(io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) {
- ctl_set_invalid_field_ciu(&io->scsiio);
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_invalid_field_ciu(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ ctl_nvme_set_data_transfer_error(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
} else if (ctl_debug & CTL_DEBUG_CDB_DATA)
ctl_data_print(io);
}
@@ -12352,7 +13330,7 @@ ctl_datamove_done(union ctl_io *io, bool samethr)
{
ctl_datamove_done_process(io);
- io->scsiio.be_move_done(io, samethr);
+ ctl_be_move_done(io, samethr);
}
void
@@ -12365,7 +13343,7 @@ ctl_datamove(union ctl_io *io)
CTL_DEBUG_PRINT(("ctl_datamove\n"));
/* No data transferred yet. Frontend must update this when done. */
- io->scsiio.kern_data_resid = io->scsiio.kern_data_len;
+ ctl_set_kern_data_resid(io, ctl_kern_data_len(io));
#ifdef CTL_TIME_IO
getbinuptime(&io->io_hdr.dma_start_bt);
@@ -12398,20 +13376,33 @@ ctl_datamove(union ctl_io *io)
* the data move.
*/
if (io->io_hdr.flags & CTL_FLAG_ABORT) {
- printf("ctl_datamove: tag 0x%jx on (%u:%u:%u) aborted\n",
- io->scsiio.tag_num, io->io_hdr.nexus.initid,
- io->io_hdr.nexus.targ_port,
- io->io_hdr.nexus.targ_lun);
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ printf("ctl_datamove: tag 0x%jx on (%u:%u:%u) aborted\n",
+ io->scsiio.tag_num, io->io_hdr.nexus.initid,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_lun);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ printf("ctl_datamove: CID 0x%x on (%u:%u:%u) aborted\n",
+ le16toh(io->nvmeio.cmd.cid),
+ io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_lun);
+ break;
+ default:
+ __assert_unreachable();
+ }
io->io_hdr.port_status = 31337;
ctl_datamove_done_process(io);
- io->scsiio.be_move_done(io, true);
+ ctl_be_move_done(io, true);
return;
}
/* Don't confuse frontend with zero length data move. */
- if (io->scsiio.kern_data_len == 0) {
+ if (ctl_kern_data_len(io) == 0) {
ctl_datamove_done_process(io);
- io->scsiio.be_move_done(io, true);
+ ctl_be_move_done(io, true);
return;
}
@@ -12427,6 +13418,8 @@ ctl_send_datamove_done(union ctl_io *io, int have_lock)
struct bintime cur_bt;
#endif
+ CTL_IO_ASSERT(io, SCSI);
+
memset(&msg, 0, sizeof(msg));
msg.hdr.msg_type = CTL_MSG_DATAMOVE_DONE;
msg.hdr.original_sc = io;
@@ -12469,6 +13462,7 @@ ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq)
uint32_t i;
io = rq->context;
+ CTL_IO_ASSERT(io, SCSI);
if (rq->ret != CTL_HA_STATUS_SUCCESS) {
printf("%s: ISC DMA write failed with error %d", __func__,
@@ -12513,6 +13507,8 @@ ctl_datamove_remote_write(union ctl_io *io)
int retval;
void (*fe_datamove)(union ctl_io *io);
+ CTL_IO_ASSERT(io, SCSI);
+
/*
* - Get the data from the host/HBA into local memory.
* - DMA memory from the local controller to the remote controller.
@@ -12541,6 +13537,8 @@ ctl_datamove_remote_dm_read_cb(union ctl_io *io, bool samethr)
{
uint32_t i;
+ CTL_IO_ASSERT(io, SCSI);
+
for (i = 0; i < io->scsiio.kern_sg_entries; i++)
free(CTL_LSGLT(io)[i].addr, M_CTL);
free(CTL_RSGL(io), M_CTL);
@@ -12563,6 +13561,7 @@ ctl_datamove_remote_read_cb(struct ctl_ha_dt_req *rq)
void (*fe_datamove)(union ctl_io *io);
io = rq->context;
+ CTL_IO_ASSERT(io, SCSI);
if (rq->ret != CTL_HA_STATUS_SUCCESS) {
printf("%s: ISC DMA read failed with error %d\n", __func__,
@@ -12597,6 +13596,8 @@ ctl_datamove_remote_sgl_setup(union ctl_io *io)
int retval;
int i;
+ CTL_IO_ASSERT(io, SCSI);
+
retval = 0;
local_sglist = CTL_LSGL(io);
len_to_go = io->scsiio.kern_data_len;
@@ -12634,6 +13635,8 @@ ctl_datamove_remote_xfer(union ctl_io *io, unsigned command,
rq = ctl_dt_req_alloc();
+ CTL_IO_ASSERT(io, SCSI);
+
/*
* If we failed to allocate the request, and if the DMA didn't fail
* anyway, set busy status. This is just a resource allocation
@@ -12767,7 +13770,7 @@ ctl_datamove_remote_read(union ctl_io *io)
* datamove done message, or call the callback with an
* error if there is a problem.
*/
- for (i = 0; i < io->scsiio.kern_sg_entries; i++)
+ for (i = 0; i < ctl_kern_sg_entries(io); i++)
free(CTL_LSGLT(io)[i].addr, M_CTL);
free(CTL_RSGL(io), M_CTL);
CTL_RSGL(io) = NULL;
@@ -12785,6 +13788,7 @@ ctl_datamove_remote_read(union ctl_io *io)
static void
ctl_datamove_remote(union ctl_io *io)
{
+ CTL_IO_ASSERT(io, SCSI);
mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED);
@@ -12837,7 +13841,7 @@ ctl_process_done(union ctl_io *io)
char path_str[64];
struct sbuf sb;
- ctl_scsi_path_string(io, path_str, sizeof(path_str));
+ ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str));
sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN);
ctl_io_sbuf(io, &sb);
@@ -12851,6 +13855,8 @@ ctl_process_done(union ctl_io *io)
switch (io->io_hdr.io_type) {
case CTL_IO_SCSI:
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
break;
case CTL_IO_TASK:
if (ctl_debug & CTL_DEBUG_INFO)
@@ -12881,6 +13887,8 @@ ctl_process_done(union ctl_io *io)
uint8_t mrie = lun->MODE_IE.mrie;
uint8_t per = ((lun->MODE_RWER.byte3 & SMS_RWER_PER) ||
(lun->MODE_VER.byte3 & SMS_VER_PER));
+
+ CTL_IO_ASSERT(io, SCSI);
if (((mrie == SIEP_MRIE_REC_COND && per) ||
mrie == SIEP_MRIE_REC_UNCOND ||
mrie == SIEP_MRIE_NO_SENSE) &&
@@ -12914,7 +13922,9 @@ ctl_process_done(union ctl_io *io)
* XXX KDM should we also track I/O latency?
*/
if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS &&
- io->io_hdr.io_type == CTL_IO_SCSI) {
+ (io->io_hdr.io_type == CTL_IO_SCSI ||
+ io->io_hdr.io_type == CTL_IO_NVME ||
+ io->io_hdr.io_type == CTL_IO_NVME_ADMIN)) {
int type;
#ifdef CTL_TIME_IO
struct bintime bt;
@@ -12931,7 +13941,7 @@ ctl_process_done(union ctl_io *io)
else
type = CTL_STATS_NO_IO;
- lun->stats.bytes[type] += io->scsiio.kern_total_len;
+ lun->stats.bytes[type] += ctl_kern_total_len(io);
lun->stats.operations[type] ++;
lun->stats.dmas[type] += io->io_hdr.num_dmas;
#ifdef CTL_TIME_IO
@@ -12940,7 +13950,7 @@ ctl_process_done(union ctl_io *io)
#endif
mtx_lock(&port->port_lock);
- port->stats.bytes[type] += io->scsiio.kern_total_len;
+ port->stats.bytes[type] += ctl_kern_total_len(io);
port->stats.operations[type] ++;
port->stats.dmas[type] += io->io_hdr.num_dmas;
#ifdef CTL_TIME_IO
@@ -12984,8 +13994,19 @@ bailout:
* properly. The FETD is responsible for freeing the I/O and doing
* whatever it needs to do to clean up its state.
*/
- if (io->io_hdr.flags & CTL_FLAG_ABORT)
- ctl_set_task_aborted(&io->scsiio);
+ if (io->io_hdr.flags & CTL_FLAG_ABORT) {
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_task_aborted(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ ctl_nvme_set_command_aborted(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+ }
/*
* If enabled, print command error status.
@@ -13027,6 +14048,7 @@ ctl_queue_sense(union ctl_io *io)
uint32_t initidx, p, targ_lun;
CTL_DEBUG_PRINT(("ctl_queue_sense\n"));
+ CTL_IO_ASSERT(io, SCSI);
targ_lun = ctl_lun_map_from_port(port, io->io_hdr.nexus.targ_lun);
@@ -13074,7 +14096,22 @@ ctl_queue(union ctl_io *io)
{
struct ctl_port *port = CTL_PORT(io);
- CTL_DEBUG_PRINT(("ctl_queue cdb[0]=%02X\n", io->scsiio.cdb[0]));
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ case CTL_IO_TASK:
+ CTL_DEBUG_PRINT(("ctl_queue cdb[0]=%02X\n", io->scsiio.cdb[0]));
+ break;
+ case CTL_IO_NVME:
+ CTL_DEBUG_PRINT(("ctl_queue nvme nvm cmd=%02X\n",
+ io->nvmeio.cmd.opc));
+ break;
+ case CTL_IO_NVME_ADMIN:
+ CTL_DEBUG_PRINT(("ctl_queue nvme admin cmd=%02X\n",
+ io->nvmeio.cmd.opc));
+ break;
+ default:
+ break;
+ }
#ifdef CTL_TIME_IO
io->io_hdr.start_time = time_uptime;
@@ -13088,6 +14125,8 @@ ctl_queue(union ctl_io *io)
switch (io->io_hdr.io_type) {
case CTL_IO_SCSI:
case CTL_IO_TASK:
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
if (ctl_debug & CTL_DEBUG_CDB)
ctl_io_print(io);
ctl_enqueue_incoming(io);
@@ -13127,6 +14166,12 @@ ctl_run(union ctl_io *io)
ctl_io_print(io);
ctl_run_task(io);
break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ if (ctl_debug & CTL_DEBUG_CDB)
+ ctl_io_print(io);
+ ctl_nvmeio_precheck(&io->nvmeio);
+ break;
default:
printf("ctl_run: unknown I/O type %d\n", io->io_hdr.io_type);
return (EINVAL);
@@ -13170,22 +14215,54 @@ ctl_done(union ctl_io *io)
*/
#if 0
if (io->io_hdr.flags & CTL_FLAG_ALREADY_DONE) {
- printf("%s: type %d msg %d cdb %x iptl: "
- "%u:%u:%u tag 0x%04x "
- "flag %#x status %x\n",
- __func__,
- io->io_hdr.io_type,
- io->io_hdr.msg_type,
- io->scsiio.cdb[0],
- io->io_hdr.nexus.initid,
- io->io_hdr.nexus.targ_port,
- io->io_hdr.nexus.targ_lun,
- (io->io_hdr.io_type ==
- CTL_IO_TASK) ?
- io->taskio.tag_num :
- io->scsiio.tag_num,
- io->io_hdr.flags,
- io->io_hdr.status);
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ case CTL_IO_TASK:
+ printf("%s: type %d msg %d cdb %x iptl: "
+ "%u:%u:%u tag 0x%04lx "
+ "flag %#x status %x\n",
+ __func__,
+ io->io_hdr.io_type,
+ io->io_hdr.msg_type,
+ io->scsiio.cdb[0],
+ io->io_hdr.nexus.initid,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_lun,
+ (io->io_hdr.io_type == CTL_IO_TASK) ?
+ io->taskio.tag_num :
+ io->scsiio.tag_num,
+ io->io_hdr.flags,
+ io->io_hdr.status);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ printf("%s: type %d msg %d opc %x iptl: "
+ "%u:%u:%u cid 0x%04x "
+ "flag %#x status %x\n",
+ __func__,
+ io->io_hdr.io_type,
+ io->io_hdr.msg_type,
+ io->nvmeio.cmd.opc,
+ io->io_hdr.nexus.initid,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_lun,
+ io->nvmeio.cmd.cid,
+ io->io_hdr.flags,
+ io->io_hdr.status);
+ break;
+ default:
+ printf("%s: type %d msg %d iptl: "
+ "%u:%u:%u flag %#x status %x\n",
+ __func__,
+ io->io_hdr.io_type,
+ io->io_hdr.msg_type,
+ io->io_hdr.nexus.initid,
+ io->io_hdr.nexus.targ_port,
+ io->io_hdr.nexus.targ_lun,
+ io->io_hdr.flags,
+ io->io_hdr.status);
+ break;
+ }
} else
io->io_hdr.flags |= CTL_FLAG_ALREADY_DONE;
#endif
@@ -13264,19 +14341,41 @@ ctl_work_thread(void *arg)
if (io != NULL) {
STAILQ_REMOVE_HEAD(&thr->incoming_queue, links);
mtx_unlock(&thr->queue_lock);
- if (io->io_hdr.io_type == CTL_IO_TASK)
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_TASK:
ctl_run_task(io);
- else
+ break;
+ case CTL_IO_SCSI:
ctl_scsiio_precheck(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ ctl_nvmeio_precheck(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
continue;
}
io = (union ctl_io *)STAILQ_FIRST(&thr->rtr_queue);
if (io != NULL) {
STAILQ_REMOVE_HEAD(&thr->rtr_queue, links);
mtx_unlock(&thr->queue_lock);
- retval = ctl_scsiio(&io->scsiio);
- if (retval != CTL_RETVAL_COMPLETE)
- CTL_DEBUG_PRINT(("ctl_scsiio failed\n"));
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ retval = ctl_scsiio(&io->scsiio);
+ if (retval != CTL_RETVAL_COMPLETE)
+ CTL_DEBUG_PRINT(("ctl_scsiio failed\n"));
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ retval = ctl_nvmeio(&io->nvmeio);
+ if (retval != CTL_RETVAL_COMPLETE)
+ CTL_DEBUG_PRINT(("ctl_nvmeio failed\n"));
+ break;
+ default:
+ __assert_unreachable();
+ }
continue;
}
diff --git a/sys/cam/ctl/ctl.h b/sys/cam/ctl/ctl.h
index a211e249b2dc..4b0ae45d6699 100644
--- a/sys/cam/ctl/ctl.h
+++ b/sys/cam/ctl/ctl.h
@@ -55,6 +55,7 @@ typedef enum {
CTL_PORT_ISCSI = 0x10,
CTL_PORT_SAS = 0x20,
CTL_PORT_UMASS = 0x40,
+ CTL_PORT_NVMF = 0x80,
CTL_PORT_ALL = 0xff,
CTL_PORT_ISC = 0x100 // FC port for inter-shelf communication
} ctl_port_type;
diff --git a/sys/cam/ctl/ctl_backend.h b/sys/cam/ctl/ctl_backend.h
index 6ebf104fb0d2..f3d65c34f2ac 100644
--- a/sys/cam/ctl/ctl_backend.h
+++ b/sys/cam/ctl/ctl_backend.h
@@ -242,6 +242,17 @@ int ctl_lun_secondary(struct ctl_be_lun *be_lun);
*/
void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun);
+/*
+ * Populate unique ID fields in NVMe namespace data for a LUN.
+ */
+void ctl_lun_nsdata_ids(struct ctl_be_lun *be_lun,
+ struct nvme_namespace_data *nsdata);
+
+/*
+ * Populate the NVMe namespace identification descriptor list for a LUN.
+ */
+void ctl_lun_nvme_ids(struct ctl_be_lun *be_lun, void *data);
+
#endif /* _KERNEL */
#endif /* _CTL_BACKEND_H_ */
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index 7381202e2c54..55a5ce0d047a 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -119,6 +119,7 @@
((struct ctl_ptr_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_BACKEND])
#define ARGS(io) \
((struct ctl_lba_len_flags *)&(io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN])
+#define DSM_RANGE(io) ((io)->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].integer)
SDT_PROVIDER_DEFINE(cbb);
@@ -390,6 +391,39 @@ ctl_complete_beio(struct ctl_be_block_io *beio)
}
}
+static void
+ctl_be_block_io_error(union ctl_io *io, int bio_cmd, uint16_t retry_count)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ if (bio_cmd == BIO_FLUSH) {
+ /* XXX KDM is there is a better error here? */
+ ctl_set_internal_failure(&io->scsiio,
+ /*sks_valid*/ 1,
+ retry_count);
+ } else {
+ ctl_set_medium_error(&io->scsiio, bio_cmd == BIO_READ);
+ }
+ break;
+ case CTL_IO_NVME:
+ switch (bio_cmd) {
+ case BIO_FLUSH:
+ case BIO_WRITE:
+ ctl_nvme_set_write_fault(&io->nvmeio);
+ break;
+ case BIO_READ:
+ ctl_nvme_set_unrecoverable_read_error(&io->nvmeio);
+ break;
+ default:
+ ctl_nvme_set_internal_error(&io->nvmeio);
+ break;
+ }
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
static size_t
cmp(uint8_t *a, uint8_t *b, size_t size)
{
@@ -408,7 +442,6 @@ ctl_be_block_compare(union ctl_io *io)
struct ctl_be_block_io *beio;
uint64_t off, res;
int i;
- uint8_t info[8];
beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
off = 0;
@@ -421,15 +454,9 @@ ctl_be_block_compare(union ctl_io *io)
break;
}
if (i < beio->num_segs) {
- scsi_u64to8b(off, info);
- ctl_set_sense(&io->scsiio, /*current_error*/ 1,
- /*sense_key*/ SSD_KEY_MISCOMPARE,
- /*asc*/ 0x1D, /*ascq*/ 0x00,
- /*type*/ SSD_ELEM_INFO,
- /*size*/ sizeof(info), /*data*/ &info,
- /*type*/ SSD_ELEM_NONE);
+ ctl_io_set_compare_failure(io, off);
} else
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
}
static int
@@ -442,7 +469,7 @@ ctl_be_block_move_done(union ctl_io *io, bool samethr)
beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
DPRINTF("entered\n");
- io->scsiio.kern_rel_offset += io->scsiio.kern_data_len;
+ ctl_add_kern_rel_offset(io, ctl_kern_data_len(io));
/*
* We set status at this point for read and compare commands.
@@ -451,7 +478,7 @@ ctl_be_block_move_done(union ctl_io *io, bool samethr)
(io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) {
lbalen = ARGS(io);
if (lbalen->flags & CTL_LLF_READ) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
} else if (lbalen->flags & CTL_LLF_COMPARE) {
/* We have two data blocks ready for comparison. */
ctl_be_block_compare(io);
@@ -545,19 +572,14 @@ ctl_be_block_biodone(struct bio *bio)
error = beio->first_error;
if (error != 0) {
if (error == EOPNOTSUPP) {
- ctl_set_invalid_opcode(&io->scsiio);
+ ctl_io_set_invalid_opcode(io);
} else if (error == ENOSPC || error == EDQUOT) {
- ctl_set_space_alloc_fail(&io->scsiio);
+ ctl_io_set_space_alloc_fail(io);
} else if (error == EROFS || error == EACCES) {
- ctl_set_hw_write_protected(&io->scsiio);
- } else if (beio->bio_cmd == BIO_FLUSH) {
- /* XXX KDM is there is a better error here? */
- ctl_set_internal_failure(&io->scsiio,
- /*sks_valid*/ 1,
- /*retry_count*/ 0xbad2);
+ ctl_io_set_hw_write_protected(io);
} else {
- ctl_set_medium_error(&io->scsiio,
- beio->bio_cmd == BIO_READ);
+ ctl_be_block_io_error(io, beio->bio_cmd,
+ /*retry_count*/ 0xbad2);
}
ctl_complete_beio(beio);
return;
@@ -571,12 +593,12 @@ ctl_be_block_biodone(struct bio *bio)
|| (beio->bio_cmd == BIO_FLUSH)
|| (beio->bio_cmd == BIO_DELETE)
|| (ARGS(io)->flags & CTL_LLF_VERIFY)) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
ctl_complete_beio(beio);
} else {
if ((ARGS(io)->flags & CTL_LLF_READ) &&
beio->beio_cont == NULL) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
if (cbe_lun->serseq >= CTL_LUN_SERSEQ_SOFT)
ctl_serseq_done(io);
}
@@ -614,12 +636,10 @@ ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun,
mtx_unlock(&be_lun->io_lock);
if (error == 0)
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
else {
- /* XXX KDM is there is a better error here? */
- ctl_set_internal_failure(&io->scsiio,
- /*sks_valid*/ 1,
- /*retry_count*/ 0xbad1);
+ ctl_be_block_io_error(io, BIO_FLUSH,
+ /*retry_count*/ 0xbad1);
}
ctl_complete_beio(beio);
@@ -704,7 +724,7 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
SDT_PROBE0(cbb, , read, file_done);
if (error == 0 && xuio.uio_resid > 0) {
/*
- * If we red less then requested (EOF), then
+ * If we read less then requested (EOF), then
* we should clean the rest of the buffer.
*/
s = beio->io_len - xuio.uio_resid;
@@ -759,12 +779,11 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
*/
if (error != 0) {
if (error == ENOSPC || error == EDQUOT) {
- ctl_set_space_alloc_fail(&io->scsiio);
+ ctl_io_set_space_alloc_fail(io);
} else if (error == EROFS || error == EACCES) {
- ctl_set_hw_write_protected(&io->scsiio);
+ ctl_io_set_hw_write_protected(io);
} else {
- ctl_set_medium_error(&io->scsiio,
- beio->bio_cmd == BIO_READ);
+ ctl_be_block_io_error(io, beio->bio_cmd, 0);
}
ctl_complete_beio(beio);
return;
@@ -776,12 +795,12 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
*/
if ((beio->bio_cmd == BIO_WRITE) ||
(ARGS(io)->flags & CTL_LLF_VERIFY)) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
ctl_complete_beio(beio);
} else {
if ((ARGS(io)->flags & CTL_LLF_READ) &&
beio->beio_cont == NULL) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
if (cbe_lun->serseq > CTL_LUN_SERSEQ_SOFT)
ctl_serseq_done(io);
}
@@ -801,6 +820,8 @@ ctl_be_block_gls_file(struct ctl_be_block_lun *be_lun,
DPRINTF("entered\n");
+ CTL_IO_ASSERT(io, SCSI);
+
off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize;
vn_lock(be_lun->vn, LK_SHARED | LK_RETRY);
error = VOP_IOCTL(be_lun->vn, FIOSEEKHOLE, &off,
@@ -918,18 +939,18 @@ ctl_be_block_unmap_file(struct ctl_be_block_lun *be_lun,
*/
switch (error) {
case 0:
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
break;
case ENOSPC:
case EDQUOT:
- ctl_set_space_alloc_fail(&io->scsiio);
+ ctl_io_set_space_alloc_fail(io);
break;
case EROFS:
case EACCES:
- ctl_set_hw_write_protected(&io->scsiio);
+ ctl_io_set_hw_write_protected(io);
break;
default:
- ctl_set_medium_error(&io->scsiio, false);
+ ctl_be_block_io_error(io, BIO_DELETE, 0);
}
ctl_complete_beio(beio);
}
@@ -1008,12 +1029,11 @@ ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun,
*/
if (error != 0) {
if (error == ENOSPC || error == EDQUOT) {
- ctl_set_space_alloc_fail(&io->scsiio);
+ ctl_io_set_space_alloc_fail(io);
} else if (error == EROFS || error == EACCES) {
- ctl_set_hw_write_protected(&io->scsiio);
+ ctl_io_set_hw_write_protected(io);
} else {
- ctl_set_medium_error(&io->scsiio,
- beio->bio_cmd == BIO_READ);
+ ctl_be_block_io_error(io, beio->bio_cmd, 0);
}
ctl_complete_beio(beio);
return;
@@ -1025,12 +1045,12 @@ ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun,
*/
if ((beio->bio_cmd == BIO_WRITE) ||
(ARGS(io)->flags & CTL_LLF_VERIFY)) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
ctl_complete_beio(beio);
} else {
if ((ARGS(io)->flags & CTL_LLF_READ) &&
beio->beio_cont == NULL) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
if (cbe_lun->serseq > CTL_LUN_SERSEQ_SOFT)
ctl_serseq_done(io);
}
@@ -1052,6 +1072,8 @@ ctl_be_block_gls_zvol(struct ctl_be_block_lun *be_lun,
DPRINTF("entered\n");
+ CTL_IO_ASSERT(io, SCSI);
+
csw = devvn_refthread(be_lun->vn, &dev, &ref);
if (csw == NULL) {
status = 0; /* unknown up to the end */
@@ -1307,6 +1329,39 @@ ctl_be_block_getattr_dev(struct ctl_be_block_lun *be_lun, const char *attrname)
}
static void
+ctl_be_block_namespace_data(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun;
+ struct nvme_namespace_data *nsdata;
+
+ nsdata = (struct nvme_namespace_data *)io->nvmeio.kern_data_ptr;
+ memset(nsdata, 0, sizeof(*nsdata));
+ nsdata->nsze = htole64(be_lun->size_blocks);
+ nsdata->ncap = nsdata->nsze;
+ nsdata->nuse = nsdata->nsze;
+ nsdata->nlbaf = 1 - 1;
+ nsdata->dlfeat = NVMEM(NVME_NS_DATA_DLFEAT_DWZ) |
+ NVMEF(NVME_NS_DATA_DLFEAT_READ, NVME_NS_DATA_DLFEAT_READ_00);
+ nsdata->flbas = NVMEF(NVME_NS_DATA_FLBAS_FORMAT, 0);
+ nsdata->lbaf[0] = NVMEF(NVME_NS_DATA_LBAF_LBADS,
+ ffs(cbe_lun->blocksize) - 1);
+
+ ctl_lun_nsdata_ids(cbe_lun, nsdata);
+ ctl_config_read_done(io);
+}
+
+static void
+ctl_be_block_nvme_ids(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun;
+
+ ctl_lun_nvme_ids(cbe_lun, io->nvmeio.kern_data_ptr);
+ ctl_config_read_done(io);
+}
+
+static void
ctl_be_block_cw_dispatch_sync(struct ctl_be_block_lun *be_lun,
union ctl_io *io)
{
@@ -1359,6 +1414,8 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun,
DPRINTF("entered\n");
+ CTL_IO_ASSERT(io, SCSI);
+
beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
lbalen = ARGS(io);
@@ -1449,13 +1506,15 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun,
static void
ctl_be_block_cw_dispatch_unmap(struct ctl_be_block_lun *be_lun,
- union ctl_io *io)
+ union ctl_io *io)
{
struct ctl_be_block_io *beio;
struct ctl_ptr_len_flags *ptrlen;
DPRINTF("entered\n");
+ CTL_IO_ASSERT(io, SCSI);
+
beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
ptrlen = (struct ctl_ptr_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
@@ -1480,7 +1539,187 @@ ctl_be_block_cw_dispatch_unmap(struct ctl_be_block_lun *be_lun,
}
static void
-ctl_be_block_cr_done(struct ctl_be_block_io *beio)
+ctl_be_block_cw_dispatch_flush(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_block_io *beio;
+
+ DPRINTF("entered\n");
+ beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
+
+ beio->io_len = be_lun->size_bytes;
+ beio->io_offset = 0;
+ beio->io_arg = 1;
+ beio->bio_cmd = BIO_FLUSH;
+ beio->ds_trans_type = DEVSTAT_NO_DATA;
+ DPRINTF("FLUSH\n");
+ be_lun->lun_flush(be_lun, beio);
+}
+
+static void
+ctl_be_block_cw_dispatch_wu(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun;
+ struct ctl_be_block_io *beio;
+ struct ctl_lba_len_flags *lbalen;
+
+ CTL_IO_ASSERT(io, NVME);
+
+ beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
+ lbalen = ARGS(io);
+
+ /*
+ * XXX: Not quite right as reads will return zeroes rather
+ * than failing.
+ */
+ beio->io_offset = lbalen->lba * cbe_lun->blocksize;
+ beio->io_len = (uint64_t)lbalen->len * cbe_lun->blocksize;
+ beio->bio_cmd = BIO_DELETE;
+ beio->ds_trans_type = DEVSTAT_FREE;
+
+ be_lun->unmap(be_lun, beio);
+}
+
+static void
+ctl_be_block_cw_dispatch_wz(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_block_softc *softc = be_lun->softc;
+ struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun;
+ struct ctl_be_block_io *beio;
+ struct ctl_lba_len_flags *lbalen;
+ uint64_t len_left, lba;
+ uint32_t pb, pbo, adj;
+ int i, seglen;
+
+ DPRINTF("entered\n");
+
+ CTL_IO_ASSERT(io, NVME);
+
+ beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
+ lbalen = ARGS(io);
+
+ if ((le32toh(io->nvmeio.cmd.cdw12) & (1U << 25)) != 0 &&
+ be_lun->unmap != NULL) {
+ beio->io_offset = lbalen->lba * cbe_lun->blocksize;
+ beio->io_len = (uint64_t)lbalen->len * cbe_lun->blocksize;
+ beio->bio_cmd = BIO_DELETE;
+ beio->ds_trans_type = DEVSTAT_FREE;
+
+ be_lun->unmap(be_lun, beio);
+ return;
+ }
+
+ beio->bio_cmd = BIO_WRITE;
+ beio->ds_trans_type = DEVSTAT_WRITE;
+
+ DPRINTF("WRITE ZEROES at LBA %jx len %u\n",
+ (uintmax_t)lbalen->lba, lbalen->len);
+
+ pb = cbe_lun->blocksize << be_lun->cbe_lun.pblockexp;
+ if (be_lun->cbe_lun.pblockoff > 0)
+ pbo = pb - cbe_lun->blocksize * be_lun->cbe_lun.pblockoff;
+ else
+ pbo = 0;
+ len_left = (uint64_t)lbalen->len * cbe_lun->blocksize;
+ for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) {
+ /*
+ * Setup the S/G entry for this chunk.
+ */
+ seglen = MIN(CTLBLK_MAX_SEG, len_left);
+ if (pb > cbe_lun->blocksize) {
+ adj = ((lbalen->lba + lba) * cbe_lun->blocksize +
+ seglen - pbo) % pb;
+ if (seglen > adj)
+ seglen -= adj;
+ else
+ seglen -= seglen % cbe_lun->blocksize;
+ } else
+ seglen -= seglen % cbe_lun->blocksize;
+ ctl_alloc_seg(softc, &beio->sg_segs[i], seglen);
+
+ DPRINTF("segment %d addr %p len %zd\n", i,
+ beio->sg_segs[i].addr, beio->sg_segs[i].len);
+
+ beio->num_segs++;
+ len_left -= seglen;
+
+ memset(beio->sg_segs[i].addr, 0, seglen);
+ lba += seglen / cbe_lun->blocksize;
+ }
+
+ beio->io_offset = lbalen->lba * cbe_lun->blocksize;
+ beio->io_len = lba * cbe_lun->blocksize;
+
+ /* We can not do all in one run. Correct and schedule rerun. */
+ if (len_left > 0) {
+ lbalen->lba += lba;
+ lbalen->len -= lba;
+ beio->beio_cont = ctl_be_block_cw_done_ws;
+ }
+
+ be_lun->dispatch(be_lun, beio);
+}
+
+static void
+ctl_be_block_cw_dispatch_dsm(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun;
+ struct ctl_be_block_io *beio;
+ struct nvme_dsm_range *r;
+ uint64_t lba;
+ uint32_t num_blocks;
+ u_int i, ranges;
+
+ CTL_IO_ASSERT(io, NVME);
+
+ beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
+
+ if (be_lun->unmap == NULL) {
+ ctl_free_beio(beio);
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+ return;
+ }
+
+ ranges = le32toh(io->nvmeio.cmd.cdw10) & 0xff;
+ r = (struct nvme_dsm_range *)io->nvmeio.kern_data_ptr;
+
+ /* Find the next range to delete. */
+ for (i = DSM_RANGE(io); i < ranges; i++) {
+ if ((le32toh(r[i].attributes) & (1U << 2)) != 0)
+ break;
+ }
+
+ /* If no range to delete, complete the operation. */
+ if (i == ranges) {
+ ctl_free_beio(beio);
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+ return;
+ }
+
+ /* If this is not the last range, request a rerun after this range. */
+ if (i + 1 < ranges) {
+ DSM_RANGE(io) = i + 1;
+ beio->beio_cont = ctl_be_block_cw_done_ws;
+ }
+
+ lba = le64toh(r[i].starting_lba);
+ num_blocks = le32toh(r[i].length);
+
+ beio->io_offset = lba * cbe_lun->blocksize;
+ beio->io_len = (uint64_t)num_blocks * cbe_lun->blocksize;
+ beio->bio_cmd = BIO_DELETE;
+ beio->ds_trans_type = DEVSTAT_FREE;
+
+ be_lun->unmap(be_lun, beio);
+}
+
+static void
+ctl_be_block_scsi_cr_done(struct ctl_be_block_io *beio)
{
union ctl_io *io;
@@ -1490,8 +1729,8 @@ ctl_be_block_cr_done(struct ctl_be_block_io *beio)
}
static void
-ctl_be_block_cr_dispatch(struct ctl_be_block_lun *be_lun,
- union ctl_io *io)
+ctl_be_block_scsi_cr_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
{
struct ctl_be_block_io *beio;
struct ctl_be_block_softc *softc;
@@ -1502,7 +1741,7 @@ ctl_be_block_cr_dispatch(struct ctl_be_block_lun *be_lun,
beio = ctl_alloc_beio(softc);
beio->io = io;
beio->lun = be_lun;
- beio->beio_cont = ctl_be_block_cr_done;
+ beio->beio_cont = ctl_be_block_scsi_cr_done;
PRIV(io)->ptr = (void *)beio;
switch (io->scsiio.cdb[0]) {
@@ -1514,7 +1753,7 @@ ctl_be_block_cr_dispatch(struct ctl_be_block_lun *be_lun,
if (be_lun->get_lba_status)
be_lun->get_lba_status(be_lun, beio);
else
- ctl_be_block_cr_done(beio);
+ ctl_be_block_scsi_cr_done(beio);
break;
default:
panic("Unhandled CDB type %#x", io->scsiio.cdb[0]);
@@ -1523,6 +1762,45 @@ ctl_be_block_cr_dispatch(struct ctl_be_block_lun *be_lun,
}
static void
+ctl_be_block_nvme_cr_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ uint8_t cns;
+
+ DPRINTF("entered\n");
+
+ MPASS(io->nvmeio.cmd.opc == NVME_OPC_IDENTIFY);
+
+ cns = le32toh(io->nvmeio.cmd.cdw10) & 0xff;
+ switch (cns) {
+ case 0:
+ ctl_be_block_namespace_data(be_lun, io);
+ break;
+ case 3:
+ ctl_be_block_nvme_ids(be_lun, io);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static void
+ctl_be_block_cr_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_be_block_scsi_cr_dispatch(be_lun, io);
+ break;
+ case CTL_IO_NVME_ADMIN:
+ ctl_be_block_nvme_cr_dispatch(be_lun, io);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static void
ctl_be_block_cw_done(struct ctl_be_block_io *beio)
{
union ctl_io *io;
@@ -1533,19 +1811,15 @@ ctl_be_block_cw_done(struct ctl_be_block_io *beio)
}
static void
-ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
- union ctl_io *io)
+ctl_be_block_scsi_cw_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
{
struct ctl_be_block_io *beio;
- struct ctl_be_block_softc *softc;
DPRINTF("entered\n");
- softc = be_lun->softc;
- beio = ctl_alloc_beio(softc);
- beio->io = io;
- beio->lun = be_lun;
- beio->beio_cont = ctl_be_block_cw_done;
+ beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
+
switch (io->scsiio.tag_type) {
case CTL_TAG_ORDERED:
beio->ds_tag_type = DEVSTAT_TAG_ORDERED;
@@ -1560,7 +1834,6 @@ ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
beio->ds_tag_type = DEVSTAT_TAG_SIMPLE;
break;
}
- PRIV(io)->ptr = (void *)beio;
switch (io->scsiio.cdb[0]) {
case SYNCHRONIZE_CACHE:
@@ -1580,6 +1853,61 @@ ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
}
}
+static void
+ctl_be_block_nvme_cw_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_block_io *beio;
+
+ DPRINTF("entered\n");
+
+ beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
+ beio->ds_tag_type = DEVSTAT_TAG_SIMPLE;
+
+ switch (io->nvmeio.cmd.opc) {
+ case NVME_OPC_FLUSH:
+ ctl_be_block_cw_dispatch_flush(be_lun, io);
+ break;
+ case NVME_OPC_WRITE_UNCORRECTABLE:
+ ctl_be_block_cw_dispatch_wu(be_lun, io);
+ break;
+ case NVME_OPC_WRITE_ZEROES:
+ ctl_be_block_cw_dispatch_wz(be_lun, io);
+ break;
+ case NVME_OPC_DATASET_MANAGEMENT:
+ ctl_be_block_cw_dispatch_dsm(be_lun, io);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static void
+ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun,
+ union ctl_io *io)
+{
+ struct ctl_be_block_io *beio;
+ struct ctl_be_block_softc *softc;
+
+ softc = be_lun->softc;
+ beio = ctl_alloc_beio(softc);
+ beio->io = io;
+ beio->lun = be_lun;
+ beio->beio_cont = ctl_be_block_cw_done;
+ PRIV(io)->ptr = (void *)beio;
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_be_block_scsi_cw_dispatch(be_lun, io);
+ break;
+ case CTL_IO_NVME:
+ ctl_be_block_nvme_cw_dispatch(be_lun, io);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
SDT_PROBE_DEFINE1(cbb, , read, start, "uint64_t");
SDT_PROBE_DEFINE1(cbb, , write, start, "uint64_t");
SDT_PROBE_DEFINE1(cbb, , read, alloc_done, "uint64_t");
@@ -1639,19 +1967,28 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun,
bptrlen = PRIV(io);
bptrlen->ptr = (void *)beio;
- switch (io->scsiio.tag_type) {
- case CTL_TAG_ORDERED:
- beio->ds_tag_type = DEVSTAT_TAG_ORDERED;
- break;
- case CTL_TAG_HEAD_OF_QUEUE:
- beio->ds_tag_type = DEVSTAT_TAG_HEAD;
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ switch (io->scsiio.tag_type) {
+ case CTL_TAG_ORDERED:
+ beio->ds_tag_type = DEVSTAT_TAG_ORDERED;
+ break;
+ case CTL_TAG_HEAD_OF_QUEUE:
+ beio->ds_tag_type = DEVSTAT_TAG_HEAD;
+ break;
+ case CTL_TAG_UNTAGGED:
+ case CTL_TAG_SIMPLE:
+ case CTL_TAG_ACA:
+ default:
+ beio->ds_tag_type = DEVSTAT_TAG_SIMPLE;
+ break;
+ }
break;
- case CTL_TAG_UNTAGGED:
- case CTL_TAG_SIMPLE:
- case CTL_TAG_ACA:
- default:
+ case CTL_IO_NVME:
beio->ds_tag_type = DEVSTAT_TAG_SIMPLE;
break;
+ default:
+ __assert_unreachable();
}
if (lbalen->flags & CTL_LLF_WRITE) {
@@ -1700,16 +2037,16 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun,
}
if (bptrlen->len < lbalen->len)
beio->beio_cont = ctl_be_block_next;
- io->scsiio.be_move_done = ctl_be_block_move_done;
+ ctl_set_be_move_done(io, ctl_be_block_move_done);
/* For compare we have separate S/G lists for read and datamove. */
if (beio->two_sglists)
- io->scsiio.kern_data_ptr = (uint8_t *)&beio->sg_segs[CTLBLK_HALF_SEGS];
+ ctl_set_kern_data_ptr(io, &beio->sg_segs[CTLBLK_HALF_SEGS]);
else
- io->scsiio.kern_data_ptr = (uint8_t *)beio->sg_segs;
- io->scsiio.kern_data_len = beio->io_len;
- io->scsiio.kern_sg_entries = beio->num_segs;
- io->scsiio.kern_data_ref = ctl_refcnt_beio;
- io->scsiio.kern_data_arg = beio;
+ ctl_set_kern_data_ptr(io, beio->sg_segs);
+ ctl_set_kern_data_len(io, beio->io_len);
+ ctl_set_kern_sg_entries(io, beio->num_segs);
+ ctl_set_kern_data_ref(io, ctl_refcnt_beio);
+ ctl_set_kern_data_arg(io, beio);
io->io_hdr.flags |= CTL_FLAG_ALLOCATED;
/*
@@ -1749,7 +2086,7 @@ ctl_be_block_worker(void *context, int pending)
mtx_unlock(&be_lun->queue_lock);
beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) {
- ctl_set_busy(&io->scsiio);
+ ctl_io_set_busy(io);
ctl_complete_beio(beio);
continue;
}
@@ -1762,7 +2099,7 @@ ctl_be_block_worker(void *context, int pending)
STAILQ_REMOVE_HEAD(&be_lun->config_write_queue, links);
mtx_unlock(&be_lun->queue_lock);
if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) {
- ctl_set_busy(&io->scsiio);
+ ctl_io_set_busy(io);
ctl_config_write_done(io);
continue;
}
@@ -1775,7 +2112,7 @@ ctl_be_block_worker(void *context, int pending)
STAILQ_REMOVE_HEAD(&be_lun->config_read_queue, links);
mtx_unlock(&be_lun->queue_lock);
if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) {
- ctl_set_busy(&io->scsiio);
+ ctl_io_set_busy(io);
ctl_config_read_done(io);
continue;
}
@@ -1788,7 +2125,7 @@ ctl_be_block_worker(void *context, int pending)
STAILQ_REMOVE_HEAD(&be_lun->input_queue, links);
mtx_unlock(&be_lun->queue_lock);
if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) {
- ctl_set_busy(&io->scsiio);
+ ctl_io_set_busy(io);
ctl_data_submit_done(io);
continue;
}
@@ -1819,8 +2156,7 @@ ctl_be_block_submit(union ctl_io *io)
be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io);
- KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
- ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type));
+ CTL_IO_ASSERT(io, SCSI, NVME);
PRIV(io)->len = 0;
@@ -2695,7 +3031,7 @@ ctl_be_block_lun_shutdown(struct ctl_be_lun *cbe_lun)
}
static int
-ctl_be_block_config_write(union ctl_io *io)
+ctl_be_block_scsi_config_write(union ctl_io *io)
{
struct ctl_be_block_lun *be_lun;
struct ctl_be_lun *cbe_lun;
@@ -2780,7 +3116,50 @@ ctl_be_block_config_write(union ctl_io *io)
}
static int
-ctl_be_block_config_read(union ctl_io *io)
+ctl_be_block_nvme_config_write(union ctl_io *io)
+{
+ struct ctl_be_block_lun *be_lun;
+
+ DPRINTF("entered\n");
+
+ be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io);
+
+ switch (io->nvmeio.cmd.opc) {
+ case NVME_OPC_DATASET_MANAGEMENT:
+ DSM_RANGE(io) = 0;
+ /* FALLTHROUGH */
+ case NVME_OPC_FLUSH:
+ case NVME_OPC_WRITE_UNCORRECTABLE:
+ case NVME_OPC_WRITE_ZEROES:
+ mtx_lock(&be_lun->queue_lock);
+ STAILQ_INSERT_TAIL(&be_lun->config_write_queue, &io->io_hdr,
+ links);
+ mtx_unlock(&be_lun->queue_lock);
+ taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task);
+ break;
+ default:
+ ctl_nvme_set_invalid_opcode(&io->nvmeio);
+ ctl_config_write_done(io);
+ break;
+ }
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_be_block_config_write(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (ctl_be_block_scsi_config_write(io));
+ case CTL_IO_NVME:
+ return (ctl_be_block_nvme_config_write(io));
+ default:
+ __assert_unreachable();
+ }
+}
+
+static int
+ctl_be_block_scsi_config_read(union ctl_io *io)
{
struct ctl_be_block_lun *be_lun;
int retval = 0;
@@ -2821,6 +3200,59 @@ ctl_be_block_config_read(union ctl_io *io)
}
static int
+ctl_be_block_nvme_config_read(union ctl_io *io)
+{
+ struct ctl_be_block_lun *be_lun;
+
+ DPRINTF("entered\n");
+
+ be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io);
+
+ switch (io->nvmeio.cmd.opc) {
+ case NVME_OPC_IDENTIFY:
+ {
+ uint8_t cns;
+
+ cns = le32toh(io->nvmeio.cmd.cdw10) & 0xff;
+ switch (cns) {
+ case 0:
+ case 3:
+ mtx_lock(&be_lun->queue_lock);
+ STAILQ_INSERT_TAIL(&be_lun->config_read_queue,
+ &io->io_hdr, links);
+ mtx_unlock(&be_lun->queue_lock);
+ taskqueue_enqueue(be_lun->io_taskqueue,
+ &be_lun->io_task);
+ return (CTL_RETVAL_QUEUED);
+ default:
+ ctl_nvme_set_invalid_field(&io->nvmeio);
+ ctl_config_read_done(io);
+ break;
+ }
+ break;
+ }
+ default:
+ ctl_nvme_set_invalid_opcode(&io->nvmeio);
+ ctl_config_read_done(io);
+ break;
+ }
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_be_block_config_read(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (ctl_be_block_scsi_config_read(io));
+ case CTL_IO_NVME_ADMIN:
+ return (ctl_be_block_nvme_config_read(io));
+ default:
+ __assert_unreachable();
+ }
+}
+
+static int
ctl_be_block_lun_info(struct ctl_be_lun *cbe_lun, struct sbuf *sb)
{
struct ctl_be_block_lun *lun = (struct ctl_be_block_lun *)cbe_lun;
diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c
index ecb0caae89b1..49ed05f54a58 100644
--- a/sys/cam/ctl/ctl_backend_ramdisk.c
+++ b/sys/cam/ctl/ctl_backend_ramdisk.c
@@ -365,11 +365,10 @@ ctl_backend_ramdisk_cmp(union ctl_io *io)
struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun;
uint8_t *page;
- uint8_t info[8];
uint64_t lba;
u_int lbaoff, lbas, res, off;
- lbas = io->scsiio.kern_data_len / cbe_lun->blocksize;
+ lbas = ctl_kern_data_len(io) / cbe_lun->blocksize;
lba = ARGS(io)->lba + PRIV(io)->len - lbas;
off = 0;
for (; lbas > 0; lbas--, lba++) {
@@ -377,7 +376,7 @@ ctl_backend_ramdisk_cmp(union ctl_io *io)
lba >> cbe_lun->pblockexp, GP_READ);
lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp);
page += lbaoff * cbe_lun->blocksize;
- res = cmp(io->scsiio.kern_data_ptr + off, page,
+ res = cmp(ctl_kern_data_ptr(io) + off, page,
cbe_lun->blocksize);
off += res;
if (res < cbe_lun->blocksize)
@@ -385,14 +384,8 @@ ctl_backend_ramdisk_cmp(union ctl_io *io)
}
free(io->scsiio.kern_data_ptr, M_RAMDISK);
if (lbas > 0) {
- off += io->scsiio.kern_rel_offset - io->scsiio.kern_data_len;
- scsi_u64to8b(off, info);
- ctl_set_sense(&io->scsiio, /*current_error*/ 1,
- /*sense_key*/ SSD_KEY_MISCOMPARE,
- /*asc*/ 0x1D, /*ascq*/ 0x00,
- /*type*/ SSD_ELEM_INFO,
- /*size*/ sizeof(info), /*data*/ &info,
- /*type*/ SSD_ELEM_NONE);
+ off += ctl_kern_rel_offset(io) - ctl_kern_data_len(io);
+ ctl_io_set_compare_failure(io, off);
return (1);
}
return (0);
@@ -405,9 +398,9 @@ ctl_backend_ramdisk_move_done(union ctl_io *io, bool samethr)
(struct ctl_be_ramdisk_lun *)CTL_BACKEND_LUN(io);
CTL_DEBUG_PRINT(("ctl_backend_ramdisk_move_done\n"));
- if (io->scsiio.kern_sg_entries > 0)
- free(io->scsiio.kern_data_ptr, M_RAMDISK);
- io->scsiio.kern_rel_offset += io->scsiio.kern_data_len;
+ if (ctl_kern_sg_entries(io) > 0)
+ free(ctl_kern_data_ptr(io), M_RAMDISK);
+ ctl_add_kern_rel_offset(io, ctl_kern_data_len(io));
if ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0 &&
(io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) {
if (ARGS(io)->flags & CTL_LLF_COMPARE) {
@@ -424,7 +417,7 @@ ctl_backend_ramdisk_move_done(union ctl_io *io, bool samethr)
&be_lun->io_task);
return (0);
}
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
}
done:
ctl_data_submit_done(io);
@@ -441,10 +434,10 @@ ctl_backend_ramdisk_compare(union ctl_io *io)
lbas = MIN(lbas, 131072 / cbe_lun->blocksize);
len = lbas * cbe_lun->blocksize;
- io->scsiio.be_move_done = ctl_backend_ramdisk_move_done;
- io->scsiio.kern_data_ptr = malloc(len, M_RAMDISK, M_WAITOK);
- io->scsiio.kern_data_len = len;
- io->scsiio.kern_sg_entries = 0;
+ ctl_set_be_move_done(io, ctl_backend_ramdisk_move_done);
+ ctl_set_kern_data_ptr(io, malloc(len, M_RAMDISK, M_WAITOK));
+ ctl_set_kern_data_len(io, len);
+ ctl_set_kern_sg_entries(io, 0);
io->io_hdr.flags |= CTL_FLAG_ALLOCATED;
PRIV(io)->len += lbas;
ctl_datamove(io);
@@ -469,17 +462,17 @@ ctl_backend_ramdisk_rw(union ctl_io *io)
off = lbaoff * cbe_lun->blocksize;
op = (ARGS(io)->flags & CTL_LLF_WRITE) ? GP_WRITE : GP_READ;
if (sgs > 1) {
- io->scsiio.kern_data_ptr = malloc(sizeof(struct ctl_sg_entry) *
- sgs, M_RAMDISK, M_WAITOK);
- sg_entries = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr;
+ sg_entries = malloc(sizeof(struct ctl_sg_entry) * sgs,
+ M_RAMDISK, M_WAITOK);
+ ctl_set_kern_data_ptr(io, sg_entries);
len = lbas * cbe_lun->blocksize;
for (i = 0; i < sgs; i++) {
page = ctl_backend_ramdisk_getpage(be_lun,
(lba >> cbe_lun->pblockexp) + i, op);
if (page == P_UNMAPPED || page == P_ANCHORED) {
- free(io->scsiio.kern_data_ptr, M_RAMDISK);
+ free(sg_entries, M_RAMDISK);
nospc:
- ctl_set_space_alloc_fail(&io->scsiio);
+ ctl_io_set_space_alloc_fail(io);
ctl_data_submit_done(io);
return;
}
@@ -494,17 +487,17 @@ nospc:
if (page == P_UNMAPPED || page == P_ANCHORED)
goto nospc;
sgs = 0;
- io->scsiio.kern_data_ptr = page + off;
+ ctl_set_kern_data_ptr(io, page + off);
}
- io->scsiio.be_move_done = ctl_backend_ramdisk_move_done;
- io->scsiio.kern_data_len = lbas * cbe_lun->blocksize;
- io->scsiio.kern_sg_entries = sgs;
+ ctl_set_be_move_done(io, ctl_backend_ramdisk_move_done);
+ ctl_set_kern_data_len(io, lbas * cbe_lun->blocksize);
+ ctl_set_kern_sg_entries(io, sgs);
io->io_hdr.flags |= CTL_FLAG_ALLOCATED;
PRIV(io)->len += lbas;
if ((ARGS(io)->flags & CTL_LLF_READ) &&
ARGS(io)->len <= PRIV(io)->len) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
if (cbe_lun->serseq >= CTL_LUN_SERSEQ_SOFT)
ctl_serseq_done(io);
}
@@ -517,7 +510,7 @@ ctl_backend_ramdisk_submit(union ctl_io *io)
struct ctl_lba_len_flags *lbalen = ARGS(io);
if (lbalen->flags & CTL_LLF_VERIFY) {
- ctl_set_success(&io->scsiio);
+ ctl_io_set_success(io);
ctl_data_submit_done(io);
return (CTL_RETVAL_COMPLETE);
}
@@ -585,7 +578,7 @@ ctl_backend_ramdisk_gls(union ctl_io *io)
}
static int
-ctl_backend_ramdisk_config_read(union ctl_io *io)
+ctl_backend_ramdisk_scsi_config_read(union ctl_io *io)
{
int retval = 0;
@@ -613,6 +606,89 @@ ctl_backend_ramdisk_config_read(union ctl_io *io)
return (retval);
}
+static int
+ramdisk_namespace_data(union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
+ struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun;
+ struct nvme_namespace_data *nsdata;
+
+ if (io->nvmeio.kern_data_len != sizeof(struct nvme_namespace_data) ||
+ io->nvmeio.kern_sg_entries != 0)
+ return (CTL_RETVAL_ERROR);
+
+ nsdata = (struct nvme_namespace_data *)io->nvmeio.kern_data_ptr;
+ memset(nsdata, 0, sizeof(*nsdata));
+ nsdata->nsze = htole64(be_lun->size_blocks);
+ nsdata->ncap = htole64(be_lun->cap_bytes / cbe_lun->blocksize);
+ nsdata->nuse = htole64(be_lun->cap_used / cbe_lun->blocksize);
+ nsdata->nsfeat = NVMEM(NVME_NS_DATA_NSFEAT_THIN_PROV) |
+ NVMEM(NVME_NS_DATA_NSFEAT_DEALLOC);
+ nsdata->nlbaf = 1 - 1;
+ nsdata->dlfeat = NVMEM(NVME_NS_DATA_DLFEAT_DWZ) |
+ NVMEF(NVME_NS_DATA_DLFEAT_READ, NVME_NS_DATA_DLFEAT_READ_00);
+ nsdata->flbas = NVMEF(NVME_NS_DATA_FLBAS_FORMAT, 0);
+ nsdata->lbaf[0] = NVMEF(NVME_NS_DATA_LBAF_LBADS,
+ ffs(cbe_lun->blocksize) - 1);
+
+ ctl_lun_nsdata_ids(cbe_lun, nsdata);
+ ctl_config_read_done(io);
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ramdisk_nvme_ids(union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
+
+ if (io->nvmeio.kern_data_len != 4096 || io->nvmeio.kern_sg_entries != 0)
+ return (CTL_RETVAL_ERROR);
+
+ ctl_lun_nvme_ids(cbe_lun, io->nvmeio.kern_data_ptr);
+ ctl_config_read_done(io);
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_backend_ramdisk_nvme_config_read(union ctl_io *io)
+{
+ switch (io->nvmeio.cmd.opc) {
+ case NVME_OPC_IDENTIFY:
+ {
+ uint8_t cns;
+
+ cns = le32toh(io->nvmeio.cmd.cdw10) & 0xff;
+ switch (cns) {
+ case 0:
+ return (ramdisk_namespace_data(io));
+ case 3:
+ return (ramdisk_nvme_ids(io));
+ default:
+ ctl_nvme_set_invalid_field(&io->nvmeio);
+ ctl_config_read_done(io);
+ return (CTL_RETVAL_COMPLETE);
+ }
+ }
+ default:
+ ctl_nvme_set_invalid_opcode(&io->nvmeio);
+ ctl_config_read_done(io);
+ return (CTL_RETVAL_COMPLETE);
+ }
+}
+
+static int
+ctl_backend_ramdisk_config_read(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (ctl_backend_ramdisk_scsi_config_read(io));
+ case CTL_IO_NVME_ADMIN:
+ return (ctl_backend_ramdisk_nvme_config_read(io));
+ default:
+ __assert_unreachable();
+ }
+}
+
static void
ctl_backend_ramdisk_delete(struct ctl_be_lun *cbe_lun, off_t lba, off_t len,
int anchor)
@@ -665,6 +741,8 @@ ctl_backend_ramdisk_ws(union ctl_io *io)
uint64_t lba;
u_int lbaoff, lbas;
+ CTL_IO_ASSERT(io, SCSI);
+
if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR | SWS_NDOB)) {
ctl_set_invalid_field(&io->scsiio,
/*sks_valid*/ 1,
@@ -713,6 +791,8 @@ ctl_backend_ramdisk_unmap(union ctl_io *io)
struct ctl_ptr_len_flags *ptrlen = (struct ctl_ptr_len_flags *)ARGS(io);
struct scsi_unmap_desc *buf, *end;
+ CTL_IO_ASSERT(io, SCSI);
+
if ((ptrlen->flags & ~SU_ANCHOR) != 0) {
ctl_set_invalid_field(&io->scsiio,
/*sks_valid*/ 0,
@@ -737,7 +817,7 @@ ctl_backend_ramdisk_unmap(union ctl_io *io)
}
static int
-ctl_backend_ramdisk_config_write(union ctl_io *io)
+ctl_backend_ramdisk_scsi_config_write(union ctl_io *io)
{
struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
int retval = 0;
@@ -792,6 +872,122 @@ ctl_backend_ramdisk_config_write(union ctl_io *io)
return (retval);
}
+static void
+ctl_backend_ramdisk_wu(union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
+ struct ctl_lba_len_flags *lbalen = ARGS(io);
+
+ CTL_IO_ASSERT(io, NVME);
+
+ /*
+ * XXX: Not quite right as reads will return zeroes rather
+ * than failing.
+ */
+ ctl_backend_ramdisk_delete(cbe_lun, lbalen->lba, lbalen->len, 1);
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+}
+
+static void
+ctl_backend_ramdisk_wz(union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
+ struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun;
+ struct ctl_lba_len_flags *lbalen = ARGS(io);
+ uint8_t *page;
+ uint64_t lba;
+ u_int lbaoff, lbas;
+
+ CTL_IO_ASSERT(io, NVME);
+
+ if ((le32toh(io->nvmeio.cmd.cdw12) & (1U << 25)) != 0) {
+ ctl_backend_ramdisk_delete(cbe_lun, lbalen->lba, lbalen->len,
+ 0);
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+ return;
+ }
+
+ for (lba = lbalen->lba, lbas = lbalen->len; lbas > 0; lba++, lbas--) {
+ page = ctl_backend_ramdisk_getpage(be_lun,
+ lba >> cbe_lun->pblockexp, GP_WRITE);
+ if (page == P_UNMAPPED || page == P_ANCHORED) {
+ ctl_nvme_set_space_alloc_fail(&io->nvmeio);
+ ctl_data_submit_done(io);
+ return;
+ }
+ lbaoff = lba & ~(UINT_MAX << cbe_lun->pblockexp);
+ page += lbaoff * cbe_lun->blocksize;
+ memset(page, 0, cbe_lun->blocksize);
+ }
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+}
+
+static void
+ctl_backend_ramdisk_dsm(union ctl_io *io)
+{
+ struct ctl_be_lun *cbe_lun = CTL_BACKEND_LUN(io);
+ struct nvme_dsm_range *r;
+ uint64_t lba;
+ uint32_t num_blocks;
+ u_int i, ranges;
+
+ CTL_IO_ASSERT(io, NVME);
+
+ ranges = le32toh(io->nvmeio.cmd.cdw10) & 0xff;
+ r = (struct nvme_dsm_range *)io->nvmeio.kern_data_ptr;
+ for (i = 0; i < ranges; i++) {
+ lba = le64toh(r[i].starting_lba);
+ num_blocks = le32toh(r[i].length);
+ if ((le32toh(r[i].attributes) & (1U << 2)) != 0)
+ ctl_backend_ramdisk_delete(cbe_lun, lba, num_blocks, 0);
+ }
+
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+}
+
+static int
+ctl_backend_ramdisk_nvme_config_write(union ctl_io *io)
+{
+ switch (io->nvmeio.cmd.opc) {
+ case NVME_OPC_FLUSH:
+ /* We have no cache to flush. */
+ ctl_nvme_set_success(&io->nvmeio);
+ ctl_config_write_done(io);
+ break;
+ case NVME_OPC_WRITE_UNCORRECTABLE:
+ ctl_backend_ramdisk_wu(io);
+ break;
+ case NVME_OPC_WRITE_ZEROES:
+ ctl_backend_ramdisk_wz(io);
+ break;
+ case NVME_OPC_DATASET_MANAGEMENT:
+ ctl_backend_ramdisk_dsm(io);
+ break;
+ default:
+ ctl_nvme_set_invalid_opcode(&io->nvmeio);
+ ctl_config_write_done(io);
+ break;
+ }
+ return (CTL_RETVAL_COMPLETE);
+}
+
+static int
+ctl_backend_ramdisk_config_write(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (ctl_backend_ramdisk_scsi_config_write(io));
+ case CTL_IO_NVME:
+ return (ctl_backend_ramdisk_nvme_config_write(io));
+ default:
+ __assert_unreachable();
+ }
+}
+
static uint64_t
ctl_backend_ramdisk_lun_attr(struct ctl_be_lun *cbe_lun, const char *attrname)
{
diff --git a/sys/cam/ctl/ctl_cmd_table.c b/sys/cam/ctl/ctl_cmd_table.c
index a62c5e8c1e81..28d937edd7dc 100644
--- a/sys/cam/ctl/ctl_cmd_table.c
+++ b/sys/cam/ctl/ctl_cmd_table.c
@@ -1228,7 +1228,7 @@ const struct ctl_cmd_entry ctl_cmd_table[256] =
CTL_CMD_FLAG_ALLOW_ON_PR_RESV |
CTL_FLAG_DATA_IN,
CTL_LUN_PAT_NONE,
- 10, {0x02, 0x01, 0, 0, 0, 0xff, 0xff, 0xff, 0x07}},
+ 10, {0xe1, 0, 0, 0x7e, 0, 0, 0xff, 0xff, 0x07}},
/* 4B PAUSE/RESUME */
{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
diff --git a/sys/cam/ctl/ctl_error.c b/sys/cam/ctl/ctl_error.c
index a17095c91ac5..d07541a1a986 100644
--- a/sys/cam/ctl/ctl_error.c
+++ b/sys/cam/ctl/ctl_error.c
@@ -990,3 +990,222 @@ ctl_set_success(struct ctl_scsiio *ctsio)
ctsio->sense_len = 0;
ctsio->io_hdr.status = CTL_SUCCESS;
}
+
+void
+ctl_nvme_set_error(struct ctl_nvmeio *ctnio, uint8_t sc_type,
+ uint8_t sc_status)
+{
+ uint16_t status;
+
+ memset(&ctnio->cpl, 0, sizeof(ctnio->cpl));
+ status = NVMEF(NVME_STATUS_SCT, sc_type) |
+ NVMEF(NVME_STATUS_SC, sc_status);
+ ctnio->cpl.status = htole16(status);
+ ctnio->io_hdr.status = CTL_NVME_ERROR;
+}
+
+void
+ctl_nvme_set_generic_error(struct ctl_nvmeio *ctnio, uint8_t sc_status)
+{
+ ctl_nvme_set_error(ctnio, NVME_SCT_GENERIC, sc_status);
+}
+
+void
+ctl_nvme_set_invalid_opcode(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_INVALID_OPCODE);
+}
+
+void
+ctl_nvme_set_invalid_field(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_INVALID_FIELD);
+}
+
+void
+ctl_nvme_set_data_transfer_error(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_DATA_TRANSFER_ERROR);
+}
+
+void
+ctl_nvme_set_internal_error(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_INTERNAL_DEVICE_ERROR);
+}
+
+void
+ctl_nvme_set_invalid_namespace(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+}
+
+void
+ctl_nvme_set_command_aborted(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_COMMAND_ABORTED_BY_HOST);
+}
+
+void
+ctl_nvme_set_failed_fused_command(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_ABORTED_FAILED_FUSED);
+}
+
+void
+ctl_nvme_set_missing_fused_command(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_ABORTED_MISSING_FUSED);
+}
+
+void
+ctl_nvme_set_namespace_is_write_protected(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_NAMESPACE_IS_WRITE_PROTECTED);
+}
+
+void
+ctl_nvme_set_lba_out_of_range(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_LBA_OUT_OF_RANGE);
+}
+
+void
+ctl_nvme_set_namespace_not_ready(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_generic_error(ctnio, NVME_SC_NAMESPACE_NOT_READY);
+}
+
+void
+ctl_nvme_set_write_fault(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_error(ctnio, NVME_SCT_MEDIA_ERROR,
+ NVME_SC_WRITE_FAULTS);
+}
+
+void
+ctl_nvme_set_unrecoverable_read_error(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_error(ctnio, NVME_SCT_MEDIA_ERROR,
+ NVME_SC_UNRECOVERED_READ_ERROR);
+}
+
+void
+ctl_nvme_set_compare_failure(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_error(ctnio, NVME_SCT_MEDIA_ERROR,
+ NVME_SC_COMPARE_FAILURE);
+}
+
+void
+ctl_nvme_set_space_alloc_fail(struct ctl_nvmeio *ctnio)
+{
+ ctl_nvme_set_error(ctnio, NVME_SCT_MEDIA_ERROR,
+ NVME_SC_DEALLOCATED_OR_UNWRITTEN);
+}
+
+void
+ctl_nvme_set_success(struct ctl_nvmeio *ctnio)
+{
+ memset(&ctnio->cpl, 0, sizeof(ctnio->cpl));
+ ctnio->io_hdr.status = CTL_SUCCESS;
+}
+
+void
+ctl_io_set_invalid_opcode(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_invalid_opcode(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ ctl_nvme_set_invalid_opcode(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+void
+ctl_io_set_hw_write_protected(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_hw_write_protected(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ ctl_nvme_set_namespace_is_write_protected(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+void
+ctl_io_set_busy(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_busy(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ ctl_nvme_set_namespace_not_ready(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+void
+ctl_io_set_compare_failure(union ctl_io *io, uint64_t offset)
+{
+ uint8_t info[8];
+
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ scsi_u64to8b(offset, info);
+ ctl_set_sense(&io->scsiio, /*current_error*/ 1,
+ /*sense_key*/ SSD_KEY_MISCOMPARE,
+ /*asc*/ 0x1D, /*ascq*/ 0x00,
+ /*type*/ SSD_ELEM_INFO,
+ /*size*/ sizeof(info), /*data*/ &info,
+ /*type*/ SSD_ELEM_NONE);
+ break;
+ case CTL_IO_NVME:
+ ctl_nvme_set_compare_failure(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+void
+ctl_io_set_space_alloc_fail(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_space_alloc_fail(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ ctl_nvme_set_space_alloc_fail(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+void
+ctl_io_set_success(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ ctl_set_success(&io->scsiio);
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ ctl_nvme_set_success(&io->nvmeio);
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
diff --git a/sys/cam/ctl/ctl_error.h b/sys/cam/ctl/ctl_error.h
index 6628f63db345..fb2113bef048 100644
--- a/sys/cam/ctl/ctl_error.h
+++ b/sys/cam/ctl/ctl_error.h
@@ -96,4 +96,31 @@ void ctl_set_hw_write_protected(struct ctl_scsiio *ctsio);
void ctl_set_space_alloc_fail(struct ctl_scsiio *ctsio);
void ctl_set_success(struct ctl_scsiio *ctsio);
+void ctl_nvme_set_error(struct ctl_nvmeio *ctnio, uint8_t sc_type,
+ uint8_t sc_status);
+void ctl_nvme_set_generic_error(struct ctl_nvmeio *ctnio, uint8_t sc_status);
+void ctl_nvme_set_invalid_opcode(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_invalid_field(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_data_transfer_error(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_internal_error(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_invalid_namespace(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_command_aborted(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_failed_fused_command(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_missing_fused_command(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_namespace_is_write_protected(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_lba_out_of_range(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_namespace_not_ready(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_write_fault(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_unrecoverable_read_error(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_compare_failure(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_space_alloc_fail(struct ctl_nvmeio *ctnio);
+void ctl_nvme_set_success(struct ctl_nvmeio *ctnio);
+
+void ctl_io_set_invalid_opcode(union ctl_io *io);
+void ctl_io_set_hw_write_protected(union ctl_io *io);
+void ctl_io_set_busy(union ctl_io *io);
+void ctl_io_set_compare_failure(union ctl_io *io, uint64_t offset);
+void ctl_io_set_space_alloc_fail(union ctl_io *io);
+void ctl_io_set_success(union ctl_io *io);
+
#endif /* _CTL_ERROR_H_ */
diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c
index 695006ed99e1..e94708028ee4 100644
--- a/sys/cam/ctl/ctl_ha.c
+++ b/sys/cam/ctl/ctl_ha.c
@@ -164,17 +164,17 @@ ctl_ha_close(struct ha_softc *softc)
report = 1;
}
if (so) {
- SOCKBUF_LOCK(&so->so_rcv);
+ SOCK_RECVBUF_LOCK(so);
soupcall_clear(so, SO_RCV);
while (softc->ha_receiving) {
wakeup(&softc->ha_receiving);
- msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv),
+ msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so),
0, "ha_rx exit", 0);
}
- SOCKBUF_UNLOCK(&so->so_rcv);
- SOCKBUF_LOCK(&so->so_snd);
+ SOCK_RECVBUF_UNLOCK(so);
+ SOCK_SENDBUF_LOCK(so);
soupcall_clear(so, SO_SND);
- SOCKBUF_UNLOCK(&so->so_snd);
+ SOCK_SENDBUF_UNLOCK(so);
softc->ha_so = NULL;
if (softc->ha_connect)
pause("reconnect", hz / 2);
@@ -218,7 +218,7 @@ ctl_ha_rx_thread(void *arg)
next = wire_hdr.length;
else
next = sizeof(wire_hdr);
- SOCKBUF_LOCK(&so->so_rcv);
+ SOCK_RECVBUF_LOCK(so);
while (sbavail(&so->so_rcv) < next || softc->ha_disconnect) {
if (softc->ha_connected == 0 || softc->ha_disconnect ||
so->so_error ||
@@ -226,10 +226,10 @@ ctl_ha_rx_thread(void *arg)
goto errout;
}
so->so_rcv.sb_lowat = next;
- msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv),
+ msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so),
0, "-", 0);
}
- SOCKBUF_UNLOCK(&so->so_rcv);
+ SOCK_RECVBUF_UNLOCK(so);
if (wire_hdr.length == 0) {
iov.iov_base = &wire_hdr;
@@ -246,7 +246,7 @@ ctl_ha_rx_thread(void *arg)
if (error != 0) {
printf("%s: header receive error %d\n",
__func__, error);
- SOCKBUF_LOCK(&so->so_rcv);
+ SOCK_RECVBUF_LOCK(so);
goto errout;
}
} else {
@@ -259,7 +259,7 @@ ctl_ha_rx_thread(void *arg)
errout:
softc->ha_receiving = 0;
wakeup(&softc->ha_receiving);
- SOCKBUF_UNLOCK(&so->so_rcv);
+ SOCK_RECVBUF_UNLOCK(so);
ctl_ha_conn_wake(softc);
kthread_exit();
}
@@ -280,13 +280,13 @@ ctl_ha_send(struct ha_softc *softc)
break;
}
}
- SOCKBUF_LOCK(&so->so_snd);
+ SOCK_SENDBUF_LOCK(so);
if (sbspace(&so->so_snd) < softc->ha_sending->m_pkthdr.len) {
so->so_snd.sb_lowat = softc->ha_sending->m_pkthdr.len;
- SOCKBUF_UNLOCK(&so->so_snd);
+ SOCK_SENDBUF_UNLOCK(so);
break;
}
- SOCKBUF_UNLOCK(&so->so_snd);
+ SOCK_SENDBUF_UNLOCK(so);
error = sosend(softc->ha_so, NULL, NULL, softc->ha_sending,
NULL, MSG_DONTWAIT, curthread);
softc->ha_sending = NULL;
@@ -309,14 +309,14 @@ ctl_ha_sock_setup(struct ha_softc *softc)
if (error)
printf("%s: soreserve failed %d\n", __func__, error);
- SOCKBUF_LOCK(&so->so_rcv);
+ SOCK_RECVBUF_LOCK(so);
so->so_rcv.sb_lowat = sizeof(struct ha_msg_wire);
soupcall_set(so, SO_RCV, ctl_ha_rupcall, softc);
- SOCKBUF_UNLOCK(&so->so_rcv);
- SOCKBUF_LOCK(&so->so_snd);
+ SOCK_RECVBUF_UNLOCK(so);
+ SOCK_SENDBUF_LOCK(so);
so->so_snd.sb_lowat = sizeof(struct ha_msg_wire);
soupcall_set(so, SO_SND, ctl_ha_supcall, softc);
- SOCKBUF_UNLOCK(&so->so_snd);
+ SOCK_SENDBUF_UNLOCK(so);
bzero(&opt, sizeof(struct sockopt));
opt.sopt_dir = SOPT_SET;
diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h
index aa7a9c35c876..6ce3970a0500 100644
--- a/sys/cam/ctl/ctl_io.h
+++ b/sys/cam/ctl/ctl_io.h
@@ -47,6 +47,7 @@
#include <sys/queue.h>
#include <cam/scsi/scsi_all.h>
+#include <dev/nvme/nvme.h>
#define CTL_MAX_CDBLEN 32
/*
@@ -74,6 +75,7 @@ typedef enum {
CTL_SEL_TIMEOUT, /* Selection timeout, shouldn't happen here */
CTL_ERROR, /* General CTL error XXX expand on this? */
CTL_SCSI_ERROR, /* SCSI error, look at status byte/sense data */
+ CTL_NVME_ERROR, /* NVMe error, look at NVMe completion */
CTL_CMD_ABORTED, /* Command aborted, don't return status */
CTL_STATUS_MASK = 0xfff,/* Mask off any status flags */
CTL_AUTOSENSE = 0x1000 /* Autosense performed */
@@ -192,6 +194,8 @@ typedef enum {
CTL_IO_NONE,
CTL_IO_SCSI,
CTL_IO_TASK,
+ CTL_IO_NVME,
+ CTL_IO_NVME_ADMIN,
} ctl_io_type;
struct ctl_nexus {
@@ -263,6 +267,8 @@ typedef enum {
union ctl_io;
typedef void (*ctl_ref)(void *arg, int diff);
+typedef int (*ctl_be_move_done_t)(union ctl_io *io, bool samethr);
+typedef int (*ctl_io_cont)(union ctl_io *io);
/*
* SCSI passthrough I/O structure for the CAM Target Layer. Note
@@ -334,8 +340,8 @@ struct ctl_scsiio {
ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/
uint8_t cdb_len; /* CDB length */
uint8_t cdb[CTL_MAX_CDBLEN]; /* CDB */
- int (*be_move_done)(union ctl_io *io, bool samethr); /* called by fe */
- int (*io_cont)(union ctl_io *io); /* to continue processing */
+ ctl_be_move_done_t be_move_done; /* called by fe */
+ ctl_io_cont io_cont; /* to continue processing */
ctl_ref kern_data_ref; /* Method to reference/release data */
void *kern_data_arg; /* Opaque argument for kern_data_ref() */
};
@@ -381,6 +387,72 @@ struct ctl_taskio {
};
/*
+ * NVME passthrough I/O structure for the CAM Target Layer. Note that
+ * this structure is used for both I/O and admin commands.
+ *
+ * Note: Make sure the io_hdr is *always* the first element in this
+ * structure.
+ */
+struct ctl_nvmeio {
+ struct ctl_io_hdr io_hdr; /* common to all I/O types */
+
+ /*
+ * The ext_* fields are generally intended for frontend use; CTL itself
+ * doesn't modify or use them.
+ */
+ uint32_t ext_sg_entries; /* 0 = no S/G list, > 0 = num entries */
+ uint8_t *ext_data_ptr; /* data buffer or S/G list */
+ uint32_t ext_data_len; /* Data transfer length */
+ uint32_t ext_data_filled; /* Amount of data filled so far */
+
+ /*
+ * The number of scatter/gather entries in the list pointed to
+ * by kern_data_ptr. 0 means there is no list, just a data pointer.
+ */
+ uint32_t kern_sg_entries;
+
+ /*
+ * The data pointer or a pointer to the scatter/gather list.
+ */
+ uint8_t *kern_data_ptr;
+
+ /*
+ * Length of the data buffer or scatter/gather list. It's also
+ * the length of this particular piece of the data transfer,
+ * ie. number of bytes expected to be transferred by the current
+ * invocation of frontend's datamove() callback. It's always
+ * less than or equal to kern_total_len.
+ */
+ uint32_t kern_data_len;
+
+ /*
+ * Total length of data to be transferred during this particular
+ * NVMe command, as decoded from the NVMe SQE.
+ */
+ uint32_t kern_total_len;
+
+ /*
+ * Amount of data left after the current data transfer.
+ */
+ uint32_t kern_data_resid;
+
+ /*
+ * Byte offset of this transfer, equal to the amount of data
+ * already transferred for this NVMe command during previous
+ * datamove() invocations.
+ */
+ uint32_t kern_rel_offset;
+
+ struct nvme_command cmd; /* SQE */
+ struct nvme_completion cpl; /* CQE */
+ bool success_sent; /* datamove already sent CQE */
+ ctl_be_move_done_t be_move_done; /* called by fe */
+ ctl_io_cont io_cont; /* to continue processing */
+ ctl_ref kern_data_ref; /* Method to reference/release data */
+ void *kern_data_arg; /* Opaque argument for kern_data_ref() */
+};
+
+/*
* HA link messages.
*/
#define CTL_HA_VERSION 4
@@ -588,10 +660,286 @@ union ctl_io {
struct ctl_io_hdr io_hdr; /* common to all I/O types */
struct ctl_scsiio scsiio; /* Normal SCSI commands */
struct ctl_taskio taskio; /* SCSI task management/reset */
+ struct ctl_nvmeio nvmeio; /* Normal and admin NVMe commands */
struct ctl_prio presio; /* update per. res info on other SC */
};
#ifdef _KERNEL
+#define _CTL_IO_ASSERT_1(io, _1) \
+ KASSERT((io)->io_hdr.io_type == CTL_IO_##_1, \
+ ("%s: unexpected I/O type %x", __func__, (io)->io_hdr.io_type))
+
+#define _CTL_IO_ASSERT_2(io, _1, _2) \
+ KASSERT((io)->io_hdr.io_type == CTL_IO_##_1 || \
+ (io)->io_hdr.io_type == CTL_IO_##_2, \
+ ("%s: unexpected I/O type %x", __func__, (io)->io_hdr.io_type))
+
+#define _CTL_IO_ASSERT_MACRO(io, _1, _2, NAME, ...) \
+ NAME
+
+#define CTL_IO_ASSERT(...) \
+ _CTL_IO_ASSERT_MACRO(__VA_ARGS__, _CTL_IO_ASSERT_2, \
+ _CTL_IO_ASSERT_1)(__VA_ARGS__)
+
+static __inline uint32_t
+ctl_kern_sg_entries(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (io->scsiio.kern_sg_entries);
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (io->nvmeio.kern_sg_entries);
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline uint8_t *
+ctl_kern_data_ptr(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (io->scsiio.kern_data_ptr);
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (io->nvmeio.kern_data_ptr);
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline uint32_t
+ctl_kern_data_len(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (io->scsiio.kern_data_len);
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (io->nvmeio.kern_data_len);
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline uint32_t
+ctl_kern_total_len(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (io->scsiio.kern_total_len);
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (io->nvmeio.kern_total_len);
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline uint32_t
+ctl_kern_data_resid(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (io->scsiio.kern_data_resid);
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (io->nvmeio.kern_data_resid);
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline uint32_t
+ctl_kern_rel_offset(union ctl_io *io)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ return (io->scsiio.kern_rel_offset);
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ return (io->nvmeio.kern_rel_offset);
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_add_kern_rel_offset(union ctl_io *io, uint32_t offset)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_rel_offset += offset;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_rel_offset += offset;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_sg_entries(union ctl_io *io, uint32_t kern_sg_entries)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_sg_entries = kern_sg_entries;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_sg_entries = kern_sg_entries;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_data_ptr(union ctl_io *io, void *kern_data_ptr)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_data_ptr = kern_data_ptr;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_data_ptr = kern_data_ptr;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_data_len(union ctl_io *io, uint32_t kern_data_len)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_data_len = kern_data_len;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_data_len = kern_data_len;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_total_len(union ctl_io *io, uint32_t kern_total_len)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_total_len = kern_total_len;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_total_len = kern_total_len;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_data_resid(union ctl_io *io, uint32_t kern_data_resid)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_data_resid = kern_data_resid;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_data_resid = kern_data_resid;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_rel_offset(union ctl_io *io, uint32_t kern_rel_offset)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_rel_offset = kern_rel_offset;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_rel_offset = kern_rel_offset;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_be_move_done(union ctl_io *io, ctl_be_move_done_t be_move_done)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.be_move_done = be_move_done;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.be_move_done = be_move_done;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_io_cont(union ctl_io *io, ctl_io_cont io_cont)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.io_cont = io_cont;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.io_cont = io_cont;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_data_ref(union ctl_io *io, ctl_ref kern_data_ref)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_data_ref = kern_data_ref;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_data_ref = kern_data_ref;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
+
+static __inline void
+ctl_set_kern_data_arg(union ctl_io *io, void *kern_data_arg)
+{
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ io->scsiio.kern_data_arg = kern_data_arg;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ io->nvmeio.kern_data_arg = kern_data_arg;
+ break;
+ default:
+ __assert_unreachable();
+ }
+}
union ctl_io *ctl_alloc_io(void *pool_ref);
union ctl_io *ctl_alloc_io_nowait(void *pool_ref);
diff --git a/sys/cam/ctl/ctl_ioctl.h b/sys/cam/ctl/ctl_ioctl.h
index 9fef169c300c..326e4c931f93 100644
--- a/sys/cam/ctl/ctl_ioctl.h
+++ b/sys/cam/ctl/ctl_ioctl.h
@@ -48,6 +48,8 @@
#include <sys/ioccom.h>
#include <sys/nv.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_proto.h>
#define CTL_DEFAULT_DEV "/dev/cam/ctl"
/*
@@ -761,6 +763,65 @@ struct ctl_lun_map {
uint32_t lun;
};
+/*
+ * NVMe over Fabrics status
+ *
+ * OK: Request completed successfully.
+ *
+ * ERROR: An error occurred, look at the error string for a
+ * description of the error.
+ */
+typedef enum {
+ CTL_NVMF_OK,
+ CTL_NVMF_ERROR,
+ CTL_NVMF_LIST_NEED_MORE_SPACE,
+ CTL_NVMF_ASSOCIATION_NOT_FOUND
+} ctl_nvmf_status;
+
+typedef enum {
+ CTL_NVMF_HANDOFF,
+ CTL_NVMF_LIST,
+ CTL_NVMF_TERMINATE
+} ctl_nvmf_type;
+
+struct ctl_nvmf_list_params {
+ uint32_t alloc_len; /* passed to kernel */
+ char *conn_xml; /* filled in kernel */
+ uint32_t fill_len; /* passed to userland */
+ int spare[4];
+};
+
+struct ctl_nvmf_terminate_params {
+ int cntlid; /* passed to kernel */
+ char hostnqn[NVME_NQN_FIELD_SIZE];
+ /* passed to kernel */
+ int all; /* passed to kernel */
+ int spare[4];
+};
+
+union ctl_nvmf_data {
+ struct nvmf_handoff_controller_qpair handoff;
+ struct ctl_nvmf_list_params list;
+ struct ctl_nvmf_terminate_params terminate;
+};
+
+/*
+ * NVMe over Fabrics interface
+ *
+ * status: The status of the request. See above for the
+ * description of the values of this field.
+ *
+ * error_str: If the status indicates an error, this string will
+ * be filled in to describe the error.
+ */
+struct ctl_nvmf {
+ ctl_nvmf_type type; /* passed to kernel */
+ union ctl_nvmf_data data; /* passed to kernel */
+ ctl_nvmf_status status; /* passed to userland */
+ char error_str[CTL_ERROR_STR_LEN];
+ /* passed to userland */
+};
+
#define CTL_IO _IOWR(CTL_MINOR, 0x00, union ctl_io)
#define CTL_ENABLE_PORT _IOW(CTL_MINOR, 0x04, struct ctl_port_entry)
#define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry)
@@ -778,6 +839,7 @@ struct ctl_lun_map {
#define CTL_LUN_MAP _IOW(CTL_MINOR, 0x28, struct ctl_lun_map)
#define CTL_GET_LUN_STATS _IOWR(CTL_MINOR, 0x29, struct ctl_get_io_stats)
#define CTL_GET_PORT_STATS _IOWR(CTL_MINOR, 0x2a, struct ctl_get_io_stats)
+#define CTL_NVMF _IOWR(CTL_MINOR, 0x2b, struct ctl_nvmf)
#endif /* _CTL_IOCTL_H_ */
diff --git a/sys/cam/ctl/ctl_nvme_all.c b/sys/cam/ctl/ctl_nvme_all.c
new file mode 100644
index 000000000000..739efadf5614
--- /dev/null
+++ b/sys/cam/ctl/ctl_nvme_all.c
@@ -0,0 +1,244 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2012-2014 Intel Corporation
+ * All rights reserved.
+ *
+ * Copyright (c) 2023 Chelsio Communications, Inc.
+ */
+
+#include <sys/types.h>
+#include <sys/sbuf.h>
+#ifndef _KERNEL
+#include <sys/time.h>
+#include <stdio.h>
+#endif
+
+#include <dev/nvme/nvme.h>
+
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_nvme_all.h>
+
+/* XXX: This duplicates lists in nvme_qpair.c. */
+
+#define OPC_ENTRY(x) [NVME_OPC_ ## x] = #x
+
+static const char *admin_opcode[256] = {
+ OPC_ENTRY(DELETE_IO_SQ),
+ OPC_ENTRY(CREATE_IO_SQ),
+ OPC_ENTRY(GET_LOG_PAGE),
+ OPC_ENTRY(DELETE_IO_CQ),
+ OPC_ENTRY(CREATE_IO_CQ),
+ OPC_ENTRY(IDENTIFY),
+ OPC_ENTRY(ABORT),
+ OPC_ENTRY(SET_FEATURES),
+ OPC_ENTRY(GET_FEATURES),
+ OPC_ENTRY(ASYNC_EVENT_REQUEST),
+ OPC_ENTRY(NAMESPACE_MANAGEMENT),
+ OPC_ENTRY(FIRMWARE_ACTIVATE),
+ OPC_ENTRY(FIRMWARE_IMAGE_DOWNLOAD),
+ OPC_ENTRY(DEVICE_SELF_TEST),
+ OPC_ENTRY(NAMESPACE_ATTACHMENT),
+ OPC_ENTRY(KEEP_ALIVE),
+ OPC_ENTRY(DIRECTIVE_SEND),
+ OPC_ENTRY(DIRECTIVE_RECEIVE),
+ OPC_ENTRY(VIRTUALIZATION_MANAGEMENT),
+ OPC_ENTRY(NVME_MI_SEND),
+ OPC_ENTRY(NVME_MI_RECEIVE),
+ OPC_ENTRY(CAPACITY_MANAGEMENT),
+ OPC_ENTRY(LOCKDOWN),
+ OPC_ENTRY(DOORBELL_BUFFER_CONFIG),
+ OPC_ENTRY(FABRICS_COMMANDS),
+ OPC_ENTRY(FORMAT_NVM),
+ OPC_ENTRY(SECURITY_SEND),
+ OPC_ENTRY(SECURITY_RECEIVE),
+ OPC_ENTRY(SANITIZE),
+ OPC_ENTRY(GET_LBA_STATUS),
+};
+
+static const char *nvm_opcode[256] = {
+ OPC_ENTRY(FLUSH),
+ OPC_ENTRY(WRITE),
+ OPC_ENTRY(READ),
+ OPC_ENTRY(WRITE_UNCORRECTABLE),
+ OPC_ENTRY(COMPARE),
+ OPC_ENTRY(WRITE_ZEROES),
+ OPC_ENTRY(DATASET_MANAGEMENT),
+ OPC_ENTRY(VERIFY),
+ OPC_ENTRY(RESERVATION_REGISTER),
+ OPC_ENTRY(RESERVATION_REPORT),
+ OPC_ENTRY(RESERVATION_ACQUIRE),
+ OPC_ENTRY(RESERVATION_RELEASE),
+ OPC_ENTRY(COPY),
+};
+
+void
+ctl_nvme_command_string(struct ctl_nvmeio *ctnio, struct sbuf *sb)
+{
+ const char *s, *type;
+
+ if (ctnio->io_hdr.io_type == CTL_IO_NVME_ADMIN) {
+ s = admin_opcode[ctnio->cmd.opc];
+ type = "ADMIN";
+ } else {
+ s = nvm_opcode[ctnio->cmd.opc];
+ type = "NVM";
+ }
+ if (s == NULL)
+ sbuf_printf(sb, "%s:0x%02x", type, ctnio->cmd.opc);
+ else
+ sbuf_printf(sb, "%s", s);
+}
+
+#define SC_ENTRY(x) [NVME_SC_ ## x] = #x
+
+static const char *generic_status[256] = {
+ SC_ENTRY(SUCCESS),
+ SC_ENTRY(INVALID_OPCODE),
+ SC_ENTRY(INVALID_FIELD),
+ SC_ENTRY(COMMAND_ID_CONFLICT),
+ SC_ENTRY(DATA_TRANSFER_ERROR),
+ SC_ENTRY(ABORTED_POWER_LOSS),
+ SC_ENTRY(INTERNAL_DEVICE_ERROR),
+ SC_ENTRY(ABORTED_BY_REQUEST),
+ SC_ENTRY(ABORTED_SQ_DELETION),
+ SC_ENTRY(ABORTED_FAILED_FUSED),
+ SC_ENTRY(ABORTED_MISSING_FUSED),
+ SC_ENTRY(INVALID_NAMESPACE_OR_FORMAT),
+ SC_ENTRY(COMMAND_SEQUENCE_ERROR),
+ SC_ENTRY(INVALID_SGL_SEGMENT_DESCR),
+ SC_ENTRY(INVALID_NUMBER_OF_SGL_DESCR),
+ SC_ENTRY(DATA_SGL_LENGTH_INVALID),
+ SC_ENTRY(METADATA_SGL_LENGTH_INVALID),
+ SC_ENTRY(SGL_DESCRIPTOR_TYPE_INVALID),
+ SC_ENTRY(INVALID_USE_OF_CMB),
+ SC_ENTRY(PRP_OFFET_INVALID),
+ SC_ENTRY(ATOMIC_WRITE_UNIT_EXCEEDED),
+ SC_ENTRY(OPERATION_DENIED),
+ SC_ENTRY(SGL_OFFSET_INVALID),
+ SC_ENTRY(HOST_ID_INCONSISTENT_FORMAT),
+ SC_ENTRY(KEEP_ALIVE_TIMEOUT_EXPIRED),
+ SC_ENTRY(KEEP_ALIVE_TIMEOUT_INVALID),
+ SC_ENTRY(ABORTED_DUE_TO_PREEMPT),
+ SC_ENTRY(SANITIZE_FAILED),
+ SC_ENTRY(SANITIZE_IN_PROGRESS),
+ SC_ENTRY(SGL_DATA_BLOCK_GRAN_INVALID),
+ SC_ENTRY(NOT_SUPPORTED_IN_CMB),
+ SC_ENTRY(NAMESPACE_IS_WRITE_PROTECTED),
+ SC_ENTRY(COMMAND_INTERRUPTED),
+ SC_ENTRY(TRANSIENT_TRANSPORT_ERROR),
+
+ SC_ENTRY(LBA_OUT_OF_RANGE),
+ SC_ENTRY(CAPACITY_EXCEEDED),
+ SC_ENTRY(NAMESPACE_NOT_READY),
+ SC_ENTRY(RESERVATION_CONFLICT),
+ SC_ENTRY(FORMAT_IN_PROGRESS),
+};
+
+static const char *command_specific_status[256] = {
+ SC_ENTRY(COMPLETION_QUEUE_INVALID),
+ SC_ENTRY(INVALID_QUEUE_IDENTIFIER),
+ SC_ENTRY(MAXIMUM_QUEUE_SIZE_EXCEEDED),
+ SC_ENTRY(ABORT_COMMAND_LIMIT_EXCEEDED),
+ SC_ENTRY(ASYNC_EVENT_REQUEST_LIMIT_EXCEEDED),
+ SC_ENTRY(INVALID_FIRMWARE_SLOT),
+ SC_ENTRY(INVALID_FIRMWARE_IMAGE),
+ SC_ENTRY(INVALID_INTERRUPT_VECTOR),
+ SC_ENTRY(INVALID_LOG_PAGE),
+ SC_ENTRY(INVALID_FORMAT),
+ SC_ENTRY(FIRMWARE_REQUIRES_RESET),
+ SC_ENTRY(INVALID_QUEUE_DELETION),
+ SC_ENTRY(FEATURE_NOT_SAVEABLE),
+ SC_ENTRY(FEATURE_NOT_CHANGEABLE),
+ SC_ENTRY(FEATURE_NOT_NS_SPECIFIC),
+ SC_ENTRY(FW_ACT_REQUIRES_NVMS_RESET),
+ SC_ENTRY(FW_ACT_REQUIRES_RESET),
+ SC_ENTRY(FW_ACT_REQUIRES_TIME),
+ SC_ENTRY(FW_ACT_PROHIBITED),
+ SC_ENTRY(OVERLAPPING_RANGE),
+ SC_ENTRY(NS_INSUFFICIENT_CAPACITY),
+ SC_ENTRY(NS_ID_UNAVAILABLE),
+ SC_ENTRY(NS_ALREADY_ATTACHED),
+ SC_ENTRY(NS_IS_PRIVATE),
+ SC_ENTRY(NS_NOT_ATTACHED),
+ SC_ENTRY(THIN_PROV_NOT_SUPPORTED),
+ SC_ENTRY(CTRLR_LIST_INVALID),
+ SC_ENTRY(SELF_TEST_IN_PROGRESS),
+ SC_ENTRY(BOOT_PART_WRITE_PROHIB),
+ SC_ENTRY(INVALID_CTRLR_ID),
+ SC_ENTRY(INVALID_SEC_CTRLR_STATE),
+ SC_ENTRY(INVALID_NUM_OF_CTRLR_RESRC),
+ SC_ENTRY(INVALID_RESOURCE_ID),
+ SC_ENTRY(SANITIZE_PROHIBITED_WPMRE),
+ SC_ENTRY(ANA_GROUP_ID_INVALID),
+ SC_ENTRY(ANA_ATTACH_FAILED),
+
+ SC_ENTRY(CONFLICTING_ATTRIBUTES),
+ SC_ENTRY(INVALID_PROTECTION_INFO),
+ SC_ENTRY(ATTEMPTED_WRITE_TO_RO_PAGE),
+};
+
+static const char *media_error_status[256] = {
+ SC_ENTRY(WRITE_FAULTS),
+ SC_ENTRY(UNRECOVERED_READ_ERROR),
+ SC_ENTRY(GUARD_CHECK_ERROR),
+ SC_ENTRY(APPLICATION_TAG_CHECK_ERROR),
+ SC_ENTRY(REFERENCE_TAG_CHECK_ERROR),
+ SC_ENTRY(COMPARE_FAILURE),
+ SC_ENTRY(ACCESS_DENIED),
+ SC_ENTRY(DEALLOCATED_OR_UNWRITTEN),
+};
+
+static const char *path_related_status[256] = {
+ SC_ENTRY(INTERNAL_PATH_ERROR),
+ SC_ENTRY(ASYMMETRIC_ACCESS_PERSISTENT_LOSS),
+ SC_ENTRY(ASYMMETRIC_ACCESS_INACCESSIBLE),
+ SC_ENTRY(ASYMMETRIC_ACCESS_TRANSITION),
+ SC_ENTRY(CONTROLLER_PATHING_ERROR),
+ SC_ENTRY(HOST_PATHING_ERROR),
+ SC_ENTRY(COMMAND_ABORTED_BY_HOST),
+};
+
+void
+ctl_nvme_status_string(struct ctl_nvmeio *ctnio, struct sbuf *sb)
+{
+ const char *s, *type;
+ uint16_t status;
+
+ status = le16toh(ctnio->cpl.status);
+ switch (NVME_STATUS_GET_SCT(status)) {
+ case NVME_SCT_GENERIC:
+ s = generic_status[NVME_STATUS_GET_SC(status)];
+ type = "GENERIC";
+ break;
+ case NVME_SCT_COMMAND_SPECIFIC:
+ s = command_specific_status[NVME_STATUS_GET_SC(status)];
+ type = "COMMAND SPECIFIC";
+ break;
+ case NVME_SCT_MEDIA_ERROR:
+ s = media_error_status[NVME_STATUS_GET_SC(status)];
+ type = "MEDIA ERROR";
+ break;
+ case NVME_SCT_PATH_RELATED:
+ s = path_related_status[NVME_STATUS_GET_SC(status)];
+ type = "PATH RELATED";
+ break;
+ case NVME_SCT_VENDOR_SPECIFIC:
+ s = NULL;
+ type = "VENDOR SPECIFIC";
+ break;
+ default:
+ s = "RESERVED";
+ type = NULL;
+ break;
+ }
+
+ if (s == NULL)
+ sbuf_printf(sb, "%s:0x%02x", type, NVME_STATUS_GET_SC(status));
+ else
+ sbuf_printf(sb, "%s", s);
+ if (NVME_STATUS_GET_M(status) != 0)
+ sbuf_printf(sb, " M");
+ if (NVME_STATUS_GET_DNR(status) != 0)
+ sbuf_printf(sb, " DNR");
+}
diff --git a/sys/cam/ctl/ctl_nvme_all.h b/sys/cam/ctl/ctl_nvme_all.h
new file mode 100644
index 000000000000..df0bf585c3ae
--- /dev/null
+++ b/sys/cam/ctl/ctl_nvme_all.h
@@ -0,0 +1,17 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023 Chelsio Communications, Inc.
+ */
+
+#ifndef __CTL_NVME_ALL_H__
+#define __CTL_NVME_ALL_H__
+
+__BEGIN_DECLS
+
+void ctl_nvme_command_string(struct ctl_nvmeio *ctnio, struct sbuf *sb);
+void ctl_nvme_status_string(struct ctl_nvmeio *ctnio, struct sbuf *sb);
+
+__END_DECLS
+
+#endif /* !__CTL_NVME_ALL_H__ */
diff --git a/sys/cam/ctl/ctl_nvme_cmd_table.c b/sys/cam/ctl/ctl_nvme_cmd_table.c
new file mode 100644
index 000000000000..39e60de62b7f
--- /dev/null
+++ b/sys/cam/ctl/ctl_nvme_cmd_table.c
@@ -0,0 +1,35 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023 Chelsio Communications, Inc.
+ */
+
+#include <dev/nvme/nvme.h>
+
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_ha.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_ioctl.h>
+#include <cam/ctl/ctl_private.h>
+
+/* Administrative Command Set (CTL_IO_NVME_ADMIN). */
+const struct ctl_nvme_cmd_entry nvme_admin_cmd_table[256] =
+{
+ [NVME_OPC_IDENTIFY] = { ctl_nvme_identify, CTL_FLAG_DATA_IN |
+ CTL_CMD_FLAG_OK_ON_NO_LUN },
+};
+
+/* NVM Command Set (CTL_IO_NVME). */
+const struct ctl_nvme_cmd_entry nvme_nvm_cmd_table[256] =
+{
+ [NVME_OPC_FLUSH] = { ctl_nvme_flush, CTL_FLAG_DATA_NONE },
+ [NVME_OPC_WRITE] = { ctl_nvme_read_write, CTL_FLAG_DATA_OUT },
+ [NVME_OPC_READ] = { ctl_nvme_read_write, CTL_FLAG_DATA_IN },
+ [NVME_OPC_WRITE_UNCORRECTABLE] = { ctl_nvme_write_uncorrectable,
+ CTL_FLAG_DATA_NONE },
+ [NVME_OPC_COMPARE] = { ctl_nvme_compare, CTL_FLAG_DATA_OUT },
+ [NVME_OPC_WRITE_ZEROES] = { ctl_nvme_write_zeroes, CTL_FLAG_DATA_NONE },
+ [NVME_OPC_DATASET_MANAGEMENT] = { ctl_nvme_dataset_management,
+ CTL_FLAG_DATA_OUT },
+ [NVME_OPC_VERIFY] = { ctl_nvme_verify, CTL_FLAG_DATA_NONE },
+};
diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h
index 9dfe979bcb7f..cd7e499c60a6 100644
--- a/sys/cam/ctl/ctl_private.h
+++ b/sys/cam/ctl/ctl_private.h
@@ -78,7 +78,8 @@ typedef enum {
CTL_ACTION_SKIP,
CTL_ACTION_BLOCK,
CTL_ACTION_OVERLAP,
- CTL_ACTION_OVERLAP_TAG
+ CTL_ACTION_OVERLAP_TAG,
+ CTL_ACTION_FUSED,
} ctl_action;
/*
@@ -139,6 +140,12 @@ struct ctl_cmd_entry {
* after the opcode byte. */
};
+/* Only data flags are currently used for NVMe commands. */
+struct ctl_nvme_cmd_entry {
+ int (*execute)(struct ctl_nvmeio *);
+ ctl_io_flags flags;
+};
+
typedef enum {
CTL_LUN_NONE = 0x000,
CTL_LUN_CONTROL = 0x001,
@@ -412,6 +419,8 @@ struct ctl_softc {
#ifdef _KERNEL
extern const struct ctl_cmd_entry ctl_cmd_table[256];
+extern const struct ctl_nvme_cmd_entry nvme_admin_cmd_table[256];
+extern const struct ctl_nvme_cmd_entry nvme_nvm_cmd_table[256];
uint32_t ctl_get_initindex(struct ctl_nexus *nexus);
int ctl_lun_map_init(struct ctl_port *port);
@@ -459,6 +468,15 @@ int ctl_report_supported_tmf(struct ctl_scsiio *ctsio);
int ctl_report_timestamp(struct ctl_scsiio *ctsio);
int ctl_get_lba_status(struct ctl_scsiio *ctsio);
+int ctl_nvme_identify(struct ctl_nvmeio *ctnio);
+int ctl_nvme_flush(struct ctl_nvmeio *ctnio);
+int ctl_nvme_read_write(struct ctl_nvmeio *ctnio);
+int ctl_nvme_write_uncorrectable(struct ctl_nvmeio *ctnio);
+int ctl_nvme_compare(struct ctl_nvmeio *ctnio);
+int ctl_nvme_write_zeroes(struct ctl_nvmeio *ctnio);
+int ctl_nvme_dataset_management(struct ctl_nvmeio *ctnio);
+int ctl_nvme_verify(struct ctl_nvmeio *ctnio);
+
void ctl_tpc_init(struct ctl_softc *softc);
void ctl_tpc_shutdown(struct ctl_softc *softc);
void ctl_tpc_lun_init(struct ctl_lun *lun);
diff --git a/sys/cam/ctl/ctl_scsi_all.c b/sys/cam/ctl/ctl_scsi_all.c
index 5c55907cb27c..84fa5656fb5f 100644
--- a/sys/cam/ctl/ctl_scsi_all.c
+++ b/sys/cam/ctl/ctl_scsi_all.c
@@ -109,12 +109,12 @@ ctl_scsi_command_string(struct ctl_scsiio *ctsio,
}
void
-ctl_scsi_path_string(union ctl_io *io, char *path_str, int len)
+ctl_scsi_path_string(struct ctl_io_hdr *hdr, char *path_str, int len)
{
snprintf(path_str, len, "(%u:%u:%u/%u): ",
- io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port,
- io->io_hdr.nexus.targ_lun, io->io_hdr.nexus.targ_mapped_lun);
+ hdr->nexus.initid, hdr->nexus.targ_port,
+ hdr->nexus.targ_lun, hdr->nexus.targ_mapped_lun);
}
/*
@@ -130,7 +130,7 @@ ctl_scsi_sense_sbuf(struct ctl_scsiio *ctsio,
if ((ctsio == NULL) || (sb == NULL))
return(-1);
- ctl_scsi_path_string((union ctl_io *)ctsio, path_str, sizeof(path_str));
+ ctl_scsi_path_string(&ctsio->io_hdr, path_str, sizeof(path_str));
if (flags & SSS_FLAG_PRINT_COMMAND) {
sbuf_cat(sb, path_str);
diff --git a/sys/cam/ctl/ctl_scsi_all.h b/sys/cam/ctl/ctl_scsi_all.h
index 5e99acddf01c..ebf69c967978 100644
--- a/sys/cam/ctl/ctl_scsi_all.h
+++ b/sys/cam/ctl/ctl_scsi_all.h
@@ -43,7 +43,7 @@ int ctl_scsi_command_string(struct ctl_scsiio *ctsio,
int ctl_scsi_sense_sbuf(struct ctl_scsiio *ctsio,
struct scsi_inquiry_data *inq_data, struct sbuf *sb,
scsi_sense_string_flags flags);
-void ctl_scsi_path_string(union ctl_io *io, char *path_str, int strlen);
+void ctl_scsi_path_string(struct ctl_io_hdr *hdr, char *path_str, int strlen);
char *ctl_scsi_sense_string(struct ctl_scsiio *ctsio,
struct scsi_inquiry_data *inq_data, char *str,
int str_len);
diff --git a/sys/cam/ctl/ctl_util.c b/sys/cam/ctl/ctl_util.c
index 76f4aff6bb3d..3174c3c7cf40 100644
--- a/sys/cam/ctl/ctl_util.c
+++ b/sys/cam/ctl/ctl_util.c
@@ -56,6 +56,7 @@
#include <sys/callout.h>
#include <cam/scsi/scsi_all.h>
#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_nvme_all.h>
#include <cam/ctl/ctl_scsi_all.h>
#include <cam/ctl/ctl_util.h>
@@ -731,7 +732,7 @@ ctl_io_sbuf(union ctl_io *io, struct sbuf *sb)
const char *task_desc;
char path_str[64];
- ctl_scsi_path_string(io, path_str, sizeof(path_str));
+ ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str));
switch (io->io_hdr.io_type) {
case CTL_IO_SCSI:
@@ -759,6 +760,12 @@ ctl_io_sbuf(union ctl_io *io, struct sbuf *sb)
break;
}
break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ sbuf_cat(sb, path_str);
+ ctl_nvme_command_string(&io->nvmeio, sb);
+ sbuf_printf(sb, " CID: 0x%x\n", le16toh(io->nvmeio.cmd.cid));
+ break;
default:
break;
}
@@ -784,7 +791,7 @@ ctl_io_error_sbuf(union ctl_io *io, struct scsi_inquiry_data *inq_data,
}
}
- ctl_scsi_path_string(io, path_str, sizeof(path_str));
+ ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str));
sbuf_cat(sb, path_str);
if (status_desc == NULL)
@@ -793,15 +800,29 @@ ctl_io_error_sbuf(union ctl_io *io, struct scsi_inquiry_data *inq_data,
else
sbuf_printf(sb, "CTL Status: %s\n", status_desc->description);
- if ((io->io_hdr.io_type == CTL_IO_SCSI)
- && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR)) {
- sbuf_cat(sb, path_str);
- sbuf_printf(sb, "SCSI Status: %s\n",
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SCSI_ERROR) {
+ sbuf_cat(sb, path_str);
+ sbuf_printf(sb, "SCSI Status: %s\n",
ctl_scsi_status_string(&io->scsiio));
- if (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)
- ctl_scsi_sense_sbuf(&io->scsiio, inq_data,
- sb, SSS_FLAG_NONE);
+ if (io->scsiio.scsi_status == SCSI_STATUS_CHECK_COND)
+ ctl_scsi_sense_sbuf(&io->scsiio, inq_data,
+ sb, SSS_FLAG_NONE);
+ }
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_NVME_ERROR) {
+ sbuf_cat(sb, path_str);
+ sbuf_printf(sb, "NVMe Status: ");
+ ctl_nvme_status_string(&io->nvmeio, sb);
+ sbuf_printf(sb, "\n");
+ }
+ break;
+ default:
+ break;
}
}
@@ -853,24 +874,34 @@ ctl_data_print(union ctl_io *io)
char str[128];
char path_str[64];
struct sbuf sb;
+ uintmax_t tag_num;
int i, j, len;
- if (io->io_hdr.io_type != CTL_IO_SCSI)
+ switch (io->io_hdr.io_type) {
+ case CTL_IO_SCSI:
+ tag_num = io->scsiio.tag_num;
+ break;
+ case CTL_IO_NVME:
+ case CTL_IO_NVME_ADMIN:
+ tag_num = le16toh(io->nvmeio.cmd.cid);
+ break;
+ default:
return;
+ }
if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR)
return;
- if (io->scsiio.kern_sg_entries > 0) /* XXX: Implement */
+ if (ctl_kern_sg_entries(io) > 0) /* XXX: Implement */
return;
- ctl_scsi_path_string(io, path_str, sizeof(path_str));
- len = min(io->scsiio.kern_data_len, 4096);
+ ctl_scsi_path_string(&io->io_hdr, path_str, sizeof(path_str));
+ len = min(ctl_kern_data_len(io), 4096);
for (i = 0; i < len; ) {
sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN);
sbuf_cat(&sb, path_str);
- sbuf_printf(&sb, " %#jx:%04x:", io->scsiio.tag_num, i);
+ sbuf_printf(&sb, " %#jx:%04x:", tag_num, i);
for (j = 0; j < 16 && i < len; i++, j++) {
if (j == 8)
sbuf_cat(&sb, " ");
- sbuf_printf(&sb, " %02x", io->scsiio.kern_data_ptr[i]);
+ sbuf_printf(&sb, " %02x", ctl_kern_data_ptr(io)[i]);
}
sbuf_cat(&sb, "\n");
sbuf_finish(&sb);
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
index 93cb4d71b6a5..68f1cabf6d07 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -1908,8 +1908,7 @@ ctlfe_datamove(union ctl_io *io)
struct cam_periph *periph;
struct ctlfe_lun_softc *softc;
- KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
- ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type));
+ CTL_IO_ASSERT(io, SCSI);
io->scsiio.ext_data_filled = 0;
ccb = PRIV_CCB(io);
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
index 3f6cf8702870..41c552e2780a 100644
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -1077,7 +1077,17 @@ ndastart(struct cam_periph *periph, union ccb *start_ccb)
trim = malloc(sizeof(*trim), M_NVMEDA, M_ZERO | M_NOWAIT);
if (trim == NULL) {
+ /*
+ * We have to drop the periph lock when
+ * returning ENOMEM. g_io_deliver treats these
+ * request differently and will recursively call
+ * the start routine which causes us to get into
+ * ndastrategy with the periph lock held,
+ * leading to a panic when its acquired again.
+ */
+ cam_periph_unlock(periph);
biofinish(bp, NULL, ENOMEM);
+ cam_periph_lock(periph);
xpt_release_ccb(start_ccb);
ndaschedule(periph);
return;
diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c
index 86127aca7b0f..d2cb6ff11fd4 100644
--- a/sys/cam/nvme/nvme_xpt.c
+++ b/sys/cam/nvme/nvme_xpt.c
@@ -175,6 +175,7 @@ static struct xpt_xport nvme_xport_ ## x = { \
CAM_XPT_XPORT(nvme_xport_ ## x);
NVME_XPT_XPORT(nvme, NVME);
+NVME_XPT_XPORT(nvmf, NVMF);
#undef NVME_XPT_XPORT
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 9b3d706d6168..59745231bca5 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -3455,10 +3455,19 @@ more:
queue_ccb = 0;
- error = da_zone_cmd(periph, start_ccb, bp,&queue_ccb);
+ error = da_zone_cmd(periph, start_ccb, bp, &queue_ccb);
if ((error != 0)
|| (queue_ccb == 0)) {
+ /*
+ * g_io_deliver will recurisvely call start
+ * routine for ENOMEM, so drop the periph
+ * lock to allow that recursion.
+ */
+ if (error == ENOMEM)
+ cam_periph_unlock(periph);
biofinish(bp, NULL, error);
+ if (error == ENOMEM)
+ cam_periph_lock(periph);
xpt_release_ccb(start_ccb);
return;
}
@@ -4208,6 +4217,9 @@ da_delete_trim(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
da_default_timeout * 1000);
ccb->ccb_h.ccb_state = DA_CCB_DELETE;
ccb->ccb_h.flags |= CAM_UNLOCKED;
+ softc->trim_count++;
+ softc->trim_ranges += ranges;
+ softc->trim_lbas += block_count;
cam_iosched_submit_trim(softc->cam_iosched);
}
@@ -4268,6 +4280,9 @@ da_delete_ws(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
da_default_timeout * 1000);
ccb->ccb_h.ccb_state = DA_CCB_DELETE;
ccb->ccb_h.flags |= CAM_UNLOCKED;
+ softc->trim_count++;
+ softc->trim_ranges++;
+ softc->trim_lbas += count;
cam_iosched_submit_trim(softc->cam_iosched);
}
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index 13d80c695169..54b07374bbce 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -127,7 +127,7 @@ struct sysent freebsd32_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 63 = obsolete ogetkerninfo */
{ compat(0,getpagesize), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 64 = old getpagesize */
{ .sy_narg = AS(msync_args), .sy_call = (sy_call_t *)sys_msync, .sy_auevent = AUE_MSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 65 = msync */
- { .sy_narg = 0, .sy_call = (sy_call_t *)sys_vfork, .sy_auevent = AUE_VFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = vfork */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_vfork, .sy_auevent = AUE_VFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 66 = vfork */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 67 = obsolete vread */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 68 = obsolete vwrite */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 69 = obsolete sbrk */
@@ -312,7 +312,7 @@ struct sysent freebsd32_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 248 = ntp_gettime */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */
{ .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */
- { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */
+ { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */
{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_issetugid, .sy_auevent = AUE_ISSETUGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 253 = issetugid */
{ .sy_narg = AS(lchown_args), .sy_call = (sy_call_t *)sys_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = lchown */
diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c
index e63c31cee1d7..2cede0ef213f 100644
--- a/sys/compat/lindebugfs/lindebugfs.c
+++ b/sys/compat/lindebugfs/lindebugfs.c
@@ -136,19 +136,28 @@ debugfs_fill(PFS_FILL_ARGS)
}
rc = -ENODEV;
- if (uio->uio_rw == UIO_READ && d->dm_fops->read) {
- rc = -ENOMEM;
- buf = (char *) malloc(sb->s_size, M_DFSINT, M_ZERO | M_NOWAIT);
- if (buf != NULL) {
- rc = d->dm_fops->read(&lf, buf, sb->s_size, &off);
- if (rc > 0)
- sbuf_bcpy(sb, buf, strlen(buf));
-
- free(buf, M_DFSINT);
+ switch (uio->uio_rw) {
+ case UIO_READ:
+ if (d->dm_fops->read != NULL) {
+ rc = -ENOMEM;
+ buf = malloc(sb->s_size, M_DFSINT, M_ZERO | M_NOWAIT);
+ if (buf != NULL) {
+ rc = d->dm_fops->read(&lf, buf, sb->s_size,
+ &off);
+ if (rc > 0)
+ sbuf_bcpy(sb, buf, strlen(buf));
+
+ free(buf, M_DFSINT);
+ }
}
- } else if (uio->uio_rw == UIO_WRITE && d->dm_fops->write) {
- sbuf_finish(sb);
- rc = d->dm_fops->write(&lf, sbuf_data(sb), sbuf_len(sb), &off);
+ break;
+ case UIO_WRITE:
+ if (d->dm_fops->write != NULL) {
+ sbuf_finish(sb);
+ rc = d->dm_fops->write(&lf, sbuf_data(sb), sbuf_len(sb),
+ &off);
+ }
+ break;
}
if (d->dm_fops->release)
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index 391d5f679ee5..c5b6ec9b32c1 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -2093,6 +2093,225 @@ linprocfs_domax_map_cnt(PFS_FILL_ARGS)
}
/*
+ * Filler function for proc/sysvipc/msg
+ */
+static int
+linprocfs_dosysvipc_msg(PFS_FILL_ARGS)
+{
+ struct msqid_kernel *msqids;
+ size_t id, size;
+ int error;
+
+ sbuf_printf(sb,
+ "%10s %10s %4s %10s %10s %5s %5s %5s %5s %5s %5s %10s %10s %10s\n",
+ "key", "msqid", "perms", "cbytes", "qnum", "lspid", "lrpid",
+ "uid", "gid", "cuid", "cgid", "stime", "rtime", "ctime");
+
+ error = kern_get_msqids(curthread, &msqids, &size);
+ if (error != 0)
+ return (error);
+
+ for (id = 0; id < size; id++) {
+ if (msqids[id].u.msg_qbytes == 0)
+ continue;
+ sbuf_printf(sb,
+ "%10d %10zu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n",
+ (int)msqids[id].u.msg_perm.key,
+ IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm),
+ msqids[id].u.msg_perm.mode,
+ msqids[id].u.msg_cbytes,
+ msqids[id].u.msg_qnum,
+ msqids[id].u.msg_lspid,
+ msqids[id].u.msg_lrpid,
+ msqids[id].u.msg_perm.uid,
+ msqids[id].u.msg_perm.gid,
+ msqids[id].u.msg_perm.cuid,
+ msqids[id].u.msg_perm.cgid,
+ (intmax_t)msqids[id].u.msg_stime,
+ (intmax_t)msqids[id].u.msg_rtime,
+ (intmax_t)msqids[id].u.msg_ctime);
+ }
+
+ free(msqids, M_TEMP);
+ return (0);
+}
+
+/*
+ * Filler function for proc/sysvipc/sem
+ */
+static int
+linprocfs_dosysvipc_sem(PFS_FILL_ARGS)
+{
+ struct semid_kernel *semids;
+ size_t id, size;
+ int error;
+
+ sbuf_printf(sb, "%10s %10s %4s %10s %5s %5s %5s %5s %10s %10s\n",
+ "key", "semid", "perms", "nsems", "uid", "gid", "cuid", "cgid",
+ "otime", "ctime");
+
+ error = kern_get_sema(curthread, &semids, &size);
+ if (error != 0)
+ return (error);
+
+ for (id = 0; id < size; id++) {
+ if ((semids[id].u.sem_perm.mode & SEM_ALLOC) == 0)
+ continue;
+ sbuf_printf(sb,
+ "%10d %10zu %4o %10u %5u %5u %5u %5u %jd %jd\n",
+ (int)semids[id].u.sem_perm.key,
+ IXSEQ_TO_IPCID(id, semids[id].u.sem_perm),
+ semids[id].u.sem_perm.mode,
+ semids[id].u.sem_nsems,
+ semids[id].u.sem_perm.uid,
+ semids[id].u.sem_perm.gid,
+ semids[id].u.sem_perm.cuid,
+ semids[id].u.sem_perm.cgid,
+ (intmax_t)semids[id].u.sem_otime,
+ (intmax_t)semids[id].u.sem_ctime);
+ }
+
+ free(semids, M_TEMP);
+ return (0);
+}
+
+/*
+ * Filler function for proc/sysvipc/shm
+ */
+static int
+linprocfs_dosysvipc_shm(PFS_FILL_ARGS)
+{
+ struct shmid_kernel *shmids;
+ size_t id, size;
+ int error;
+
+ sbuf_printf(sb,
+ "%10s %10s %s %21s %5s %5s %5s %5s %5s %5s %5s %10s %10s %10s %21s %21s\n",
+ "key", "shmid", "perms", "size", "cpid", "lpid", "nattch", "uid",
+ "gid", "cuid", "cgid", "atime", "dtime", "ctime", "rss", "swap");
+
+ error = kern_get_shmsegs(curthread, &shmids, &size);
+ if (error != 0)
+ return (error);
+
+ for (id = 0; id < size; id++) {
+ if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0)
+ continue;
+ sbuf_printf(sb,
+ "%10d %10zu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n",
+ (int)shmids[id].u.shm_perm.key,
+ IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm),
+ shmids[id].u.shm_perm.mode,
+ shmids[id].u.shm_segsz,
+ shmids[id].u.shm_cpid,
+ shmids[id].u.shm_lpid,
+ shmids[id].u.shm_nattch,
+ shmids[id].u.shm_perm.uid,
+ shmids[id].u.shm_perm.gid,
+ shmids[id].u.shm_perm.cuid,
+ shmids[id].u.shm_perm.cgid,
+ (intmax_t)shmids[id].u.shm_atime,
+ (intmax_t)shmids[id].u.shm_dtime,
+ (intmax_t)shmids[id].u.shm_ctime,
+ 0, 0); /* XXX rss & swp are not supported */
+ }
+
+ free(shmids, M_TEMP);
+ return (0);
+}
+
+/*
+ * Filler function for proc/sys/fs/mqueue/msg_default
+ */
+static int
+linprocfs_domqueue_msg_default(PFS_FILL_ARGS)
+{
+ int res, error;
+ size_t size = sizeof(res);
+
+ error = kernel_sysctlbyname(curthread, "kern.mqueue.default_maxmsg",
+ &res, &size, NULL, 0, 0, 0);
+ if (error != 0)
+ return (error);
+
+ sbuf_printf(sb, "%d\n", res);
+ return (0);
+}
+
+/*
+ * Filler function for proc/sys/fs/mqueue/msgsize_default
+ */
+static int
+linprocfs_domqueue_msgsize_default(PFS_FILL_ARGS)
+{
+ int res, error;
+ size_t size = sizeof(res);
+
+ error = kernel_sysctlbyname(curthread, "kern.mqueue.default_msgsize",
+ &res, &size, NULL, 0, 0, 0);
+ if (error != 0)
+ return (error);
+
+ sbuf_printf(sb, "%d\n", res);
+ return (0);
+
+}
+
+/*
+ * Filler function for proc/sys/fs/mqueue/msg_max
+ */
+static int
+linprocfs_domqueue_msg_max(PFS_FILL_ARGS)
+{
+ int res, error;
+ size_t size = sizeof(res);
+
+ error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmsg",
+ &res, &size, NULL, 0, 0, 0);
+ if (error != 0)
+ return (error);
+
+ sbuf_printf(sb, "%d\n", res);
+ return (0);
+}
+
+/*
+ * Filler function for proc/sys/fs/mqueue/msgsize_max
+ */
+static int
+linprocfs_domqueue_msgsize_max(PFS_FILL_ARGS)
+{
+ int res, error;
+ size_t size = sizeof(res);
+
+ error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmsgsize",
+ &res, &size, NULL, 0, 0, 0);
+ if (error != 0)
+ return (error);
+
+ sbuf_printf(sb, "%d\n", res);
+ return (0);
+}
+
+/*
+ * Filler function for proc/sys/fs/mqueue/queues_max
+ */
+static int
+linprocfs_domqueue_queues_max(PFS_FILL_ARGS)
+{
+ int res, error;
+ size_t size = sizeof(res);
+
+ error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmq",
+ &res, &size, NULL, 0, 0, 0);
+ if (error != 0)
+ return (error);
+
+ sbuf_printf(sb, "%d\n", res);
+ return (0);
+}
+
+/*
* Constructor
*/
static int
@@ -2241,6 +2460,31 @@ linprocfs_init(PFS_INIT_ARGS)
pfs_create_file(dir, "max_map_count", &linprocfs_domax_map_cnt,
NULL, NULL, NULL, PFS_RD);
+ /* /proc/sysvipc/... */
+ dir = pfs_create_dir(root, "sysvipc", NULL, NULL, NULL, 0);
+ pfs_create_file(dir, "msg", &linprocfs_dosysvipc_msg,
+ NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "sem", &linprocfs_dosysvipc_sem,
+ NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "shm", &linprocfs_dosysvipc_shm,
+ NULL, NULL, NULL, PFS_RD);
+
+ /* /proc/sys/fs/... */
+ dir = pfs_create_dir(sys, "fs", NULL, NULL, NULL, 0);
+
+ /* /proc/sys/fs/mqueue/... */
+ dir = pfs_create_dir(dir, "mqueue", NULL, NULL, NULL, 0);
+ pfs_create_file(dir, "msg_default", &linprocfs_domqueue_msg_default,
+ NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "msgsize_default", &linprocfs_domqueue_msgsize_default,
+ NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "msg_max", &linprocfs_domqueue_msg_max,
+ NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "msgsize_max", &linprocfs_domqueue_msgsize_max,
+ NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "queues_max", &linprocfs_domqueue_queues_max,
+ NULL, NULL, NULL, PFS_RD);
+
return (0);
}
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 1279490ae8be..5f510004c684 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -104,7 +104,7 @@ linux_creat(struct thread *td, struct linux_creat_args *args)
}
#endif
-static int
+int
linux_common_openflags(int l_flags)
{
int bsd_flags;
diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h
index ce9feca154ed..2e56942b0f40 100644
--- a/sys/compat/linux/linux_file.h
+++ b/sys/compat/linux/linux_file.h
@@ -197,6 +197,7 @@ struct l_file_handle {
};
int linux_enobufs2eagain(struct thread *, int, int);
+int linux_common_openflags(int);
#endif
/*
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index cb62b0e70c0d..aa6c3923067f 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -36,6 +36,7 @@
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/msgbuf.h>
+#include <sys/mqueue.h>
#include <sys/mutex.h>
#include <sys/poll.h>
#include <sys/priv.h>
@@ -1125,16 +1126,16 @@ linux_getgroups(struct thread *td, struct linux_getgroups_args *args)
}
static bool
-linux_get_dummy_limit(l_uint resource, struct rlimit *rlim)
+linux_get_dummy_limit(struct thread *td, l_uint resource, struct rlimit *rlim)
{
+ ssize_t size;
+ int res, error;
if (linux_dummy_rlimits == 0)
return (false);
switch (resource) {
case LINUX_RLIMIT_LOCKS:
- case LINUX_RLIMIT_SIGPENDING:
- case LINUX_RLIMIT_MSGQUEUE:
case LINUX_RLIMIT_RTTIME:
rlim->rlim_cur = LINUX_RLIM_INFINITY;
rlim->rlim_max = LINUX_RLIM_INFINITY;
@@ -1144,6 +1145,23 @@ linux_get_dummy_limit(l_uint resource, struct rlimit *rlim)
rlim->rlim_cur = 0;
rlim->rlim_max = 0;
return (true);
+ case LINUX_RLIMIT_SIGPENDING:
+ error = kernel_sysctlbyname(td,
+ "kern.sigqueue.max_pending_per_proc",
+ &res, &size, 0, 0, 0, 0);
+ if (error != 0)
+ return (false);
+ rlim->rlim_cur = res;
+ rlim->rlim_max = res;
+ return (true);
+ case LINUX_RLIMIT_MSGQUEUE:
+ error = kernel_sysctlbyname(td,
+ "kern.ipc.msgmnb", &res, &size, 0, 0, 0, 0);
+ if (error != 0)
+ return (false);
+ rlim->rlim_cur = res;
+ rlim->rlim_max = res;
+ return (true);
default:
return (false);
}
@@ -1181,7 +1199,7 @@ linux_old_getrlimit(struct thread *td, struct linux_old_getrlimit_args *args)
struct rlimit bsd_rlim;
u_int which;
- if (linux_get_dummy_limit(args->resource, &bsd_rlim)) {
+ if (linux_get_dummy_limit(td, args->resource, &bsd_rlim)) {
rlim.rlim_cur = bsd_rlim.rlim_cur;
rlim.rlim_max = bsd_rlim.rlim_max;
return (copyout(&rlim, args->rlim, sizeof(rlim)));
@@ -1222,7 +1240,7 @@ linux_getrlimit(struct thread *td, struct linux_getrlimit_args *args)
struct rlimit bsd_rlim;
u_int which;
- if (linux_get_dummy_limit(args->resource, &bsd_rlim)) {
+ if (linux_get_dummy_limit(td, args->resource, &bsd_rlim)) {
rlim.rlim_cur = bsd_rlim.rlim_cur;
rlim.rlim_max = bsd_rlim.rlim_max;
return (copyout(&rlim, args->rlim, sizeof(rlim)));
@@ -2009,7 +2027,7 @@ linux_prlimit64(struct thread *td, struct linux_prlimit64_args *args)
int error;
if (args->new == NULL && args->old != NULL) {
- if (linux_get_dummy_limit(args->resource, &rlim)) {
+ if (linux_get_dummy_limit(td, args->resource, &rlim)) {
lrlim.rlim_cur = rlim.rlim_cur;
lrlim.rlim_max = rlim.rlim_max;
return (copyout(&lrlim, args->old, sizeof(lrlim)));
@@ -2946,3 +2964,124 @@ linux_ioprio_set(struct thread *td, struct linux_ioprio_set_args *args)
}
return (error);
}
+
+/* The only flag is O_NONBLOCK */
+#define B2L_MQ_FLAGS(bflags) ((bflags) != 0 ? LINUX_O_NONBLOCK : 0)
+#define L2B_MQ_FLAGS(lflags) ((lflags) != 0 ? O_NONBLOCK : 0)
+
+int
+linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
+{
+ struct mq_attr attr;
+ int error, flags;
+
+ flags = linux_common_openflags(args->oflag);
+ if ((flags & O_ACCMODE) == O_ACCMODE || (flags & O_EXEC) != 0)
+ return (EINVAL);
+ flags = FFLAGS(flags);
+ if ((flags & O_CREAT) != 0 && args->attr != NULL) {
+ error = copyin(args->attr, &attr, sizeof(attr));
+ if (error != 0)
+ return (error);
+ attr.mq_flags = L2B_MQ_FLAGS(attr.mq_flags);
+ }
+
+ return (kern_kmq_open(td, args->name, flags, args->mode,
+ args->attr != NULL ? &attr : NULL));
+}
+
+int
+linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
+{
+ struct kmq_unlink_args bsd_args = {
+ .path = PTRIN(args->name)
+ };
+
+ return (sys_kmq_unlink(td, &bsd_args));
+}
+
+int
+linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
+{
+ struct timespec ts, *abs_timeout;
+ int error;
+
+ if (args->abs_timeout == NULL)
+ abs_timeout = NULL;
+ else {
+ error = linux_get_timespec(&ts, args->abs_timeout);
+ if (error != 0)
+ return (error);
+ abs_timeout = &ts;
+ }
+
+ return (kern_kmq_timedsend(td, args->mqd, PTRIN(args->msg_ptr),
+ args->msg_len, args->msg_prio, abs_timeout));
+}
+
+int
+linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
+{
+ struct timespec ts, *abs_timeout;
+ int error;
+
+ if (args->abs_timeout == NULL)
+ abs_timeout = NULL;
+ else {
+ error = linux_get_timespec(&ts, args->abs_timeout);
+ if (error != 0)
+ return (error);
+ abs_timeout = &ts;
+ }
+
+ return (kern_kmq_timedreceive(td, args->mqd, PTRIN(args->msg_ptr),
+ args->msg_len, args->msg_prio, abs_timeout));
+}
+
+int
+linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
+{
+ struct sigevent ev, *evp;
+ struct l_sigevent l_ev;
+ int error;
+
+ if (args->sevp == NULL)
+ evp = NULL;
+ else {
+ error = copyin(args->sevp, &l_ev, sizeof(l_ev));
+ if (error != 0)
+ return (error);
+ error = linux_convert_l_sigevent(&l_ev, &ev);
+ if (error != 0)
+ return (error);
+ evp = &ev;
+ }
+
+ return (kern_kmq_notify(td, args->mqd, evp));
+}
+
+int
+linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
+{
+ struct mq_attr attr, oattr;
+ int error;
+
+ if (args->attr != NULL) {
+ error = copyin(args->attr, &attr, sizeof(attr));
+ if (error != 0)
+ return (error);
+ attr.mq_flags = L2B_MQ_FLAGS(attr.mq_flags);
+ }
+
+ error = kern_kmq_setattr(td, args->mqd, args->attr != NULL ? &attr : NULL,
+ &oattr);
+ if (error == 0 && args->oattr != NULL) {
+ oattr.mq_flags = B2L_MQ_FLAGS(oattr.mq_flags);
+ bzero(oattr.__reserved, sizeof(oattr.__reserved));
+ error = copyout(&oattr, args->oattr, sizeof(oattr));
+ }
+
+ return (error);
+}
+
+MODULE_DEPEND(linux, mqueuefs, 1, 1, 1);
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 36cffc979802..15431bf3127c 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -2468,7 +2468,7 @@ sendfile_fallback(struct thread *td, struct file *fp, l_int out,
out_offset = 0;
flags = FOF_OFFSET | FOF_NOUPDATE;
- bufsz = min(count, MAXPHYS);
+ bufsz = min(count, maxphys);
buf = malloc(bufsz, M_LINUX, M_WAITOK);
bytes_sent = 0;
while (bytes_sent < count) {
diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c
index 65c64a7ba563..97341c051af7 100644
--- a/sys/compat/linux/linux_sysctl.c
+++ b/sys/compat/linux/linux_sysctl.c
@@ -74,7 +74,7 @@ LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, unsupported_sysctl, "char *");
#ifdef LINUX_LEGACY_SYSCALLS
static int
-handle_string(struct l___sysctl_args *la, char *value)
+handle_string(struct l___sysctl_args *la, const char *value)
{
int error;
diff --git a/sys/compat/linux/linux_time.h b/sys/compat/linux/linux_time.h
index d99684db1cbf..bb23105f4f23 100644
--- a/sys/compat/linux/linux_time.h
+++ b/sys/compat/linux/linux_time.h
@@ -137,6 +137,7 @@ int linux_to_native_itimerspec64(struct itimerspec *,
struct l_itimerspec64 *);
#endif
+int linux_convert_l_sigevent(const struct l_sigevent *l_sig, struct sigevent *sig);
int linux_to_native_timerflags(int *, int);
#endif /* _LINUX_TIME_H */
diff --git a/sys/compat/linux/linux_timer.c b/sys/compat/linux/linux_timer.c
index 2188006ec38f..ed9133359302 100644
--- a/sys/compat/linux/linux_timer.c
+++ b/sys/compat/linux/linux_timer.c
@@ -43,8 +43,8 @@
#endif
#include <compat/linux/linux_time.h>
-static int
-linux_convert_l_sigevent(struct l_sigevent *l_sig, struct sigevent *sig)
+int
+linux_convert_l_sigevent(const struct l_sigevent *l_sig, struct sigevent *sig)
{
CP(*l_sig, *sig, sigev_notify);
diff --git a/sys/compat/linuxkpi/common/include/asm/set_memory.h b/sys/compat/linuxkpi/common/include/asm/set_memory.h
index 69f659001c60..1019aaf264a0 100644
--- a/sys/compat/linuxkpi/common/include/asm/set_memory.h
+++ b/sys/compat/linuxkpi/common/include/asm/set_memory.h
@@ -34,26 +34,20 @@
static inline int
set_memory_uc(unsigned long addr, int numpages)
{
- vm_offset_t va;
vm_size_t len;
- va = PHYS_TO_DMAP(addr);
- len = numpages << PAGE_SHIFT;
-
- return (-pmap_change_attr(va, len, VM_MEMATTR_UNCACHEABLE));
+ len = (vm_size_t)numpages << PAGE_SHIFT;
+ return (-pmap_change_attr(addr, len, VM_MEMATTR_UNCACHEABLE));
}
static inline int
set_memory_wc(unsigned long addr, int numpages)
{
#ifdef VM_MEMATTR_WRITE_COMBINING
- vm_offset_t va;
vm_size_t len;
- va = PHYS_TO_DMAP(addr);
- len = numpages << PAGE_SHIFT;
-
- return (-pmap_change_attr(va, len, VM_MEMATTR_WRITE_COMBINING));
+ len = (vm_size_t)numpages << PAGE_SHIFT;
+ return (-pmap_change_attr(addr, len, VM_MEMATTR_WRITE_COMBINING));
#else
return (set_memory_uc(addr, numpages));
#endif
@@ -62,13 +56,10 @@ set_memory_wc(unsigned long addr, int numpages)
static inline int
set_memory_wb(unsigned long addr, int numpages)
{
- vm_offset_t va;
vm_size_t len;
- va = PHYS_TO_DMAP(addr);
- len = numpages << PAGE_SHIFT;
-
- return (-pmap_change_attr(va, len, VM_MEMATTR_WRITE_BACK));
+ len = (vm_size_t)numpages << PAGE_SHIFT;
+ return (-pmap_change_attr(addr, len, VM_MEMATTR_WRITE_BACK));
}
static inline int
diff --git a/sys/compat/linuxkpi/common/include/linux/aperture.h b/sys/compat/linuxkpi/common/include/linux/aperture.h
new file mode 100644
index 000000000000..e0387ed0225d
--- /dev/null
+++ b/sys/compat/linuxkpi/common/include/linux/aperture.h
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef _LINUX_APERTURE_H_
+#define _LINUX_APERTURE_H_
+
+#include <linux/types.h>
+
+#define CONFIG_APERTURE_HELPERS
+
+struct pci_dev;
+struct platform_device;
+
+#if defined(CONFIG_APERTURE_HELPERS)
+int devm_aperture_acquire_for_platform_device(struct platform_device *pdev,
+ resource_size_t base,
+ resource_size_t size);
+
+int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size,
+ bool primary, const char *name);
+
+int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name);
+#else
+static inline int devm_aperture_acquire_for_platform_device(struct platform_device *pdev,
+ resource_size_t base,
+ resource_size_t size)
+{
+ return 0;
+}
+
+static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size,
+ bool primary, const char *name)
+{
+ return 0;
+}
+
+static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name)
+{
+ return 0;
+}
+#endif
+
+/**
+ * aperture_remove_all_conflicting_devices - remove all existing framebuffers
+ * @primary: also kick vga16fb if present; only relevant for VGA devices
+ * @name: a descriptive name of the requesting driver
+ *
+ * This function removes all graphics device drivers. Use this function on systems
+ * that can have their framebuffer located anywhere in memory.
+ *
+ * Returns:
+ * 0 on success, or a negative errno code otherwise
+ */
+static inline int aperture_remove_all_conflicting_devices(bool primary, const char *name)
+{
+ return aperture_remove_conflicting_devices(0, (resource_size_t)-1, primary, name);
+}
+
+#endif
diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h
index a2020d247489..8a91b0663f37 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitfield.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2020 The FreeBSD Foundation
+ * Copyright (c) 2020-2024 The FreeBSD Foundation
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
@@ -131,6 +131,10 @@ _uX_replace_bits(8)
#define FIELD_PREP(_mask, _value) \
(((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask))
+/* Likely would need extra sanity checks compared to FIELD_PREP()? */
+#define FIELD_PREP_CONST(_mask, _value) \
+ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask))
+
#define FIELD_GET(_mask, _value) \
((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask)))
diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h
index d5f9a0ae7a47..dfd9816da8be 100644
--- a/sys/compat/linuxkpi/common/include/linux/interrupt.h
+++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h
@@ -133,7 +133,7 @@ irq_set_affinity_hint(int vector, const cpumask_t *mask)
int error;
if (mask != NULL)
- error = intr_setaffinity(vector, CPU_WHICH_IRQ, __DECONST(cpumask_t *, mask));
+ error = intr_setaffinity(vector, CPU_WHICH_IRQ, mask);
else
error = intr_setaffinity(vector, CPU_WHICH_IRQ, cpuset_root);
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index bce70ed0cb8d..164347dbc4e7 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -541,30 +541,29 @@ void lkpi_arch_phys_wc_del(int);
#define arch_phys_wc_index(x) \
(((x) < __MTRR_ID_BASE) ? -1 : ((x) - __MTRR_ID_BASE))
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__) || defined(__powerpc__) || defined(__riscv)
static inline int
arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size)
{
+#if defined(__amd64__)
vm_offset_t va;
va = PHYS_TO_DMAP(start);
-
-#ifdef VM_MEMATTR_WRITE_COMBINING
return (-pmap_change_attr(va, size, VM_MEMATTR_WRITE_COMBINING));
#else
- return (-pmap_change_attr(va, size, VM_MEMATTR_UNCACHEABLE));
+ return (0);
#endif
}
static inline void
arch_io_free_memtype_wc(resource_size_t start, resource_size_t size)
{
+#if defined(__amd64__)
vm_offset_t va;
va = PHYS_TO_DMAP(start);
pmap_change_attr(va, size, VM_MEMATTR_WRITE_BACK);
-}
#endif
+}
#endif /* _LINUXKPI_LINUX_IO_H_ */
diff --git a/sys/compat/linuxkpi/common/include/linux/kref.h b/sys/compat/linuxkpi/common/include/linux/kref.h
index 47d61c9ee316..b2fba468f7df 100644
--- a/sys/compat/linuxkpi/common/include/linux/kref.h
+++ b/sys/compat/linuxkpi/common/include/linux/kref.h
@@ -41,8 +41,7 @@
#include <asm/atomic.h>
struct kref {
- /* XXX In Linux this is a refcount_t */
- atomic_t refcount;
+ refcount_t refcount;
};
static inline void
diff --git a/sys/compat/linuxkpi/common/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h
index 9d98ef7cf3db..079dacf8df6c 100644
--- a/sys/compat/linuxkpi/common/include/linux/module.h
+++ b/sys/compat/linuxkpi/common/include/linux/module.h
@@ -32,6 +32,8 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/module.h>
+#include <sys/queue.h>
+#include <sys/linker.h>
#include <linux/list.h>
#include <linux/compiler.h>
@@ -51,7 +53,26 @@
#define MODULE_SUPPORTED_DEVICE(name)
#define MODULE_IMPORT_NS(_name)
+/*
+ * THIS_MODULE is used to differentiate modules on Linux. We currently
+ * completely stub out any Linux struct module usage, but THIS_MODULE is still
+ * used to populate the "owner" fields of various drivers. Even though we
+ * don't actually dereference these "owner" fields they are still used by
+ * drivers to check if devices/dmabufs/etc come from different modules. For
+ * example, during DRM GEM import some drivers check if the dmabuf's owner
+ * matches the dev's owner. If they match because they are both NULL drivers
+ * may incorrectly think two resources come from the same module.
+ *
+ * To handle this we specify an undefined symbol __this_linker_file, which
+ * will get special treatment from the linker when resolving. This will
+ * populate the usages of __this_linker_file with the linker_file_t of the
+ * module.
+ */
+#ifdef KLD_MODULE
+#define THIS_MODULE ((struct module *)&__this_linker_file)
+#else
#define THIS_MODULE ((struct module *)0)
+#endif
#define __MODULE_STRING(x) __stringify(x)
diff --git a/sys/compat/linuxkpi/common/include/linux/refcount.h b/sys/compat/linuxkpi/common/include/linux/refcount.h
index 61947485945d..02a7eda3f4a9 100644
--- a/sys/compat/linuxkpi/common/include/linux/refcount.h
+++ b/sys/compat/linuxkpi/common/include/linux/refcount.h
@@ -31,58 +31,51 @@
#include <linux/atomic.h>
-struct refcount_linux {
- atomic_t value;
-};
-typedef struct refcount_linux refcount_t;
+typedef atomic_t refcount_t;
static inline void
refcount_set(refcount_t *ref, unsigned int i)
{
- atomic_set(&ref->value, i);
+ atomic_set(ref, i);
}
static inline void
refcount_inc(refcount_t *ref)
{
- atomic_inc(&ref->value);
+ atomic_inc(ref);
}
static inline bool
refcount_inc_not_zero(refcount_t *ref)
{
- return (atomic_inc_not_zero(&ref->value));
+ return (atomic_inc_not_zero(ref));
}
static inline void
refcount_dec(refcount_t *ref)
{
- atomic_dec(&ref->value);
+ atomic_dec(ref);
}
static inline unsigned int
refcount_read(refcount_t *ref)
{
- return atomic_read(&ref->value);
+ return atomic_read(ref);
}
static inline bool
refcount_dec_and_lock_irqsave(refcount_t *ref, spinlock_t *lock,
unsigned long *flags)
{
- if (atomic_dec_and_test(&ref->value) == true) {
+ if (atomic_dec_and_test(ref) == true) {
spin_lock_irqsave(lock, flags);
return (true);
}
return (false);
}
-/*
- * struct kref uses atomic_t and not refcount_t so
- * we differ from Linux here.
- */
static inline bool
-refcount_dec_and_test(atomic_t *r)
+refcount_dec_and_test(refcount_t *r)
{
return (atomic_dec_and_test(r));
diff --git a/sys/compat/linuxkpi/common/include/linux/rwlock.h b/sys/compat/linuxkpi/common/include/linux/rwlock.h
index 8c1ee36ac4de..3030ec89ff1e 100644
--- a/sys/compat/linuxkpi/common/include/linux/rwlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/rwlock.h
@@ -34,14 +34,12 @@
#include <sys/rwlock.h>
#include <sys/libkern.h>
-typedef struct {
- struct rwlock rw;
-} rwlock_t;
+typedef struct rwlock rwlock_t;
-#define read_lock(_l) rw_rlock(&(_l)->rw)
-#define write_lock(_l) rw_wlock(&(_l)->rw)
-#define read_unlock(_l) rw_runlock(&(_l)->rw)
-#define write_unlock(_l) rw_wunlock(&(_l)->rw)
+#define read_lock(_l) rw_rlock(_l)
+#define write_lock(_l) rw_wlock(_l)
+#define read_unlock(_l) rw_runlock(_l)
+#define write_unlock(_l) rw_wunlock(_l)
#define read_lock_irq(lock) read_lock((lock))
#define read_unlock_irq(lock) read_unlock((lock))
#define write_lock_irq(lock) write_lock((lock))
@@ -54,13 +52,6 @@ typedef struct {
do { read_unlock(lock); } while (0)
#define write_unlock_irqrestore(lock, flags) \
do { write_unlock(lock); } while (0)
-
-static inline void
-rwlock_init(rwlock_t *lock)
-{
-
- memset(&lock->rw, 0, sizeof(lock->rw));
- rw_init_flags(&lock->rw, "lnxrw", RW_NOWITNESS);
-}
+#define rwlock_init(_l) rw_init_flags(_l, "lnxrw", RW_NOWITNESS | RW_NEW)
#endif /* _LINUXKPI_LINUX_RWLOCK_H_ */
diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h
index 4bc1e2a2d431..2992e41c9c02 100644
--- a/sys/compat/linuxkpi/common/include/linux/spinlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h
@@ -41,9 +41,7 @@
#include <linux/bottom_half.h>
#include <linux/lockdep.h>
-typedef struct {
- struct mtx m;
-} spinlock_t;
+typedef struct mtx spinlock_t;
/*
* By defining CONFIG_SPIN_SKIP LinuxKPI spinlocks and asserts will be
@@ -59,7 +57,7 @@ typedef struct {
#define spin_lock(_l) do { \
if (SPIN_SKIP()) \
break; \
- mtx_lock(&(_l)->m); \
+ mtx_lock(_l); \
local_bh_disable(); \
} while (0)
@@ -76,7 +74,7 @@ typedef struct {
if (SPIN_SKIP()) \
break; \
local_bh_enable(); \
- mtx_unlock(&(_l)->m); \
+ mtx_unlock(_l); \
} while (0)
#define spin_unlock_bh(_l) do { \
@@ -93,7 +91,7 @@ typedef struct {
if (SPIN_SKIP()) { \
__ret = 1; \
} else { \
- __ret = mtx_trylock(&(_l)->m); \
+ __ret = mtx_trylock(_l); \
if (likely(__ret != 0)) \
local_bh_disable(); \
} \
@@ -111,7 +109,7 @@ typedef struct {
#define spin_lock_nested(_l, _n) do { \
if (SPIN_SKIP()) \
break; \
- mtx_lock_flags(&(_l)->m, MTX_DUPOK); \
+ mtx_lock_flags(_l, MTX_DUPOK); \
local_bh_disable(); \
} while (0)
@@ -141,31 +139,19 @@ typedef struct {
#define _spin_lock_name(...) __spin_lock_name(__VA_ARGS__)
#define spin_lock_name(name) _spin_lock_name(name, __FILE__, __LINE__)
-#define spin_lock_init(lock) linux_spin_lock_init(lock, spin_lock_name("lnxspin"))
+#define spin_lock_init(lock) mtx_init(lock, spin_lock_name("lnxspin"), \
+ NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW)
-static inline void
-linux_spin_lock_init(spinlock_t *lock, const char *name)
-{
-
- memset(lock, 0, sizeof(*lock));
- mtx_init(&lock->m, name, NULL, MTX_DEF | MTX_NOWITNESS);
-}
-
-static inline void
-spin_lock_destroy(spinlock_t *lock)
-{
-
- mtx_destroy(&lock->m);
-}
+#define spin_lock_destroy(_l) mtx_destroy(_l)
#define DEFINE_SPINLOCK(lock) \
spinlock_t lock; \
- MTX_SYSINIT(lock, &(lock).m, spin_lock_name("lnxspin"), MTX_DEF)
+ MTX_SYSINIT(lock, &lock, spin_lock_name("lnxspin"), MTX_DEF)
#define assert_spin_locked(_l) do { \
if (SPIN_SKIP()) \
break; \
- mtx_assert(&(_l)->m, MA_OWNED); \
+ mtx_assert(_l, MA_OWNED); \
} while (0)
#define atomic_dec_and_lock_irqsave(cnt, lock, flags) \
diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h
index 9e1818a38594..32470312b78b 100644
--- a/sys/compat/linuxkpi/common/include/linux/string.h
+++ b/sys/compat/linuxkpi/common/include/linux/string.h
@@ -98,6 +98,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp)
return (dst);
}
+/* See slab.h for kvmalloc/kvfree(). */
+static inline void *
+kvmemdup(const void *src, size_t len, gfp_t gfp)
+{
+ void *dst;
+
+ dst = kvmalloc(len, gfp);
+ if (dst != NULL)
+ memcpy(dst, src, len);
+ return (dst);
+}
+
static inline char *
strndup_user(const char __user *ustr, long n)
{
diff --git a/sys/compat/linuxkpi/common/include/linux/wait.h b/sys/compat/linuxkpi/common/include/linux/wait.h
index d50003d44955..b815050b6faa 100644
--- a/sys/compat/linuxkpi/common/include/linux/wait.h
+++ b/sys/compat/linuxkpi/common/include/linux/wait.h
@@ -113,7 +113,7 @@ extern wait_queue_func_t default_wake_function;
MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
#define init_waitqueue_head(wqh) do { \
- mtx_init(&(wqh)->lock.m, spin_lock_name("wqhead"), \
+ mtx_init(&(wqh)->lock, spin_lock_name("wqhead"), \
NULL, MTX_DEF | MTX_NEW | MTX_NOWITNESS); \
INIT_LIST_HEAD(&(wqh)->task_list); \
} while (0)
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index fc9d7829dae3..6a477ae5c32a 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif)
(_link = rcu_dereference((_vif)->link_conf[_linkid])) )
#define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \
- for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \
+ for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \
if ( ((_vif)->active_links == 0 /* no MLO */ || \
((_vif)->active_links & BIT(_linkid)) != 0) && \
(_linksta = link_sta_dereference_protected((_sta), (_linkid))) )
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index d598e9af0050..03b36e6526bd 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -993,33 +993,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new)
}
}
-static void
+static enum ieee80211_bss_changed
lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
struct lkpi_hw *lhw)
{
+ enum ieee80211_bss_changed changed;
+
+ changed = 0;
sta->aid = 0;
if (vif->cfg.assoc) {
- struct ieee80211_hw *hw;
- enum ieee80211_bss_changed changed;
lhw->update_mc = true;
lkpi_update_mcast_filter(lhw->ic, true);
- changed = 0;
vif->cfg.assoc = false;
vif->cfg.aid = 0;
changed |= BSS_CHANGED_ASSOC;
- /*
- * This will remove the sta from firmware for iwlwifi.
- * So confusing that they use state and flags and ... ^%$%#%$^.
- */
IMPROVE();
- hw = LHW_TO_HW(lhw);
- lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf,
- changed);
- lkpi_hw_conf_idle(hw, true);
+ /*
+ * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with
+ * assoc = false right away here will remove the sta from
+ * firmware for iwlwifi.
+ * We no longer do this but only return the BSS_CHNAGED value.
+ * The caller is responsible for removing the sta gong to
+ * IEEE80211_STA_NOTEXIST and then executing the
+ * bss_info_changed() update.
+ * See lkpi_sta_run_to_init() for more detailed comment.
+ */
}
+
+ return (changed);
}
static void
@@ -1074,7 +1078,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
{
struct linuxkpi_ieee80211_channel *chan;
struct lkpi_chanctx *lchanctx;
- struct ieee80211_chanctx_conf *conf;
+ struct ieee80211_chanctx_conf *chanctx_conf;
struct lkpi_hw *lhw;
struct ieee80211_hw *hw;
struct lkpi_vif *lvif;
@@ -1140,54 +1144,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
/* Add chanctx (or if exists, change it). */
if (vif->chanctx_conf != NULL) {
- conf = vif->chanctx_conf;
- lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf);
+ chanctx_conf = vif->chanctx_conf;
+ lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf);
IMPROVE("diff changes for changed, working on live copy, rcu");
} else {
/* Keep separate alloc as in Linux this is rcu managed? */
lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size,
M_LKPI80211, M_WAITOK | M_ZERO);
- conf = &lchanctx->conf;
+ chanctx_conf = &lchanctx->chanctx_conf;
}
- conf->rx_chains_dynamic = 1;
- conf->rx_chains_static = 1;
- conf->radar_enabled =
+ chanctx_conf->rx_chains_dynamic = 1;
+ chanctx_conf->rx_chains_static = 1;
+ chanctx_conf->radar_enabled =
(chan->flags & IEEE80211_CHAN_RADAR) ? true : false;
- conf->def.chan = chan;
- conf->def.width = NL80211_CHAN_WIDTH_20_NOHT;
- conf->def.center_freq1 = chan->center_freq;
- conf->def.center_freq2 = 0;
+ chanctx_conf->def.chan = chan;
+ chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT;
+ chanctx_conf->def.center_freq1 = chan->center_freq;
+ chanctx_conf->def.center_freq2 = 0;
IMPROVE("Check vht_cap from band not just chan?");
KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC,
("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan));
#ifdef LKPI_80211_HT
if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) {
if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) {
- conf->def.width = NL80211_CHAN_WIDTH_40;
+ chanctx_conf->def.width = NL80211_CHAN_WIDTH_40;
} else
- conf->def.width = NL80211_CHAN_WIDTH_20;
+ chanctx_conf->def.width = NL80211_CHAN_WIDTH_20;
}
#endif
#ifdef LKPI_80211_VHT
if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) {
#ifdef __notyet__
if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) {
- conf->def.width = NL80211_CHAN_WIDTH_80P80;
- conf->def.center_freq2 = 0; /* XXX */
+ chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80;
+ chanctx_conf->def.center_freq2 = 0; /* XXX */
} else
#endif
if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan))
- conf->def.width = NL80211_CHAN_WIDTH_160;
+ chanctx_conf->def.width = NL80211_CHAN_WIDTH_160;
else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan))
- conf->def.width = NL80211_CHAN_WIDTH_80;
+ chanctx_conf->def.width = NL80211_CHAN_WIDTH_80;
}
#endif
/* Responder ... */
- conf->min_def.chan = chan;
- conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT;
- conf->min_def.center_freq1 = chan->center_freq;
- conf->min_def.center_freq2 = 0;
+ chanctx_conf->min_def.chan = chan;
+ chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT;
+ chanctx_conf->min_def.center_freq1 = chan->center_freq;
+ chanctx_conf->min_def.center_freq2 = 0;
IMPROVE("currently 20_NOHT min_def only");
/* Set bss info (bss_info_changed). */
@@ -1213,14 +1217,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
changed |= IEEE80211_CHANCTX_CHANGE_RADAR;
changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS;
changed |= IEEE80211_CHANCTX_CHANGE_WIDTH;
- lkpi_80211_mo_change_chanctx(hw, conf, changed);
+ lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed);
} else {
- error = lkpi_80211_mo_add_chanctx(hw, conf);
+ error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf);
if (error == 0 || error == EOPNOTSUPP) {
- vif->bss_conf.chandef.chan = conf->def.chan;
- vif->bss_conf.chandef.width = conf->def.width;
+ vif->bss_conf.chandef.chan = chanctx_conf->def.chan;
+ vif->bss_conf.chandef.width = chanctx_conf->def.width;
vif->bss_conf.chandef.center_freq1 =
- conf->def.center_freq1;
+ chanctx_conf->def.center_freq1;
#ifdef LKPI_80211_HT
if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) {
/* Note: it is 10 not 20. */
@@ -1231,26 +1235,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
}
#endif
vif->bss_conf.chandef.center_freq2 =
- conf->def.center_freq2;
+ chanctx_conf->def.center_freq2;
} else {
ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx "
"failed: %d\n", __func__, __LINE__, error);
goto out;
}
- vif->bss_conf.chanctx_conf = conf;
+ vif->bss_conf.chanctx_conf = chanctx_conf;
/* Assign vif chanctx. */
if (error == 0)
error = lkpi_80211_mo_assign_vif_chanctx(hw, vif,
- &vif->bss_conf, conf);
+ &vif->bss_conf, chanctx_conf);
if (error == EOPNOTSUPP)
error = 0;
if (error != 0) {
ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx "
"failed: %d\n", __func__, __LINE__, error);
- lkpi_80211_mo_remove_chanctx(hw, conf);
- lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf);
+ lkpi_80211_mo_remove_chanctx(hw, chanctx_conf);
+ lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf);
free(lchanctx, M_LKPI80211);
goto out;
}
@@ -1452,16 +1456,18 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int
/* Take the chan ctx down. */
if (vif->chanctx_conf != NULL) {
struct lkpi_chanctx *lchanctx;
- struct ieee80211_chanctx_conf *conf;
+ struct ieee80211_chanctx_conf *chanctx_conf;
- conf = vif->chanctx_conf;
+ chanctx_conf = vif->chanctx_conf;
/* Remove vif context. */
lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf);
/* NB: vif->chanctx_conf is NULL now. */
+ lkpi_hw_conf_idle(hw, true);
+
/* Remove chan ctx. */
- lkpi_80211_mo_remove_chanctx(hw, conf);
- lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf);
+ lkpi_80211_mo_remove_chanctx(hw, chanctx_conf);
+ lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf);
free(lchanctx, M_LKPI80211);
}
@@ -1742,16 +1748,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i
goto out;
}
- lkpi_lsta_dump(lsta, ni, __func__, __LINE__);
+ /* See comment in lkpi_sta_run_to_init(). */
+ bss_changed = 0;
+ bss_changed |= lkpi_disassoc(sta, vif, lhw);
- /* Update bss info (bss_info_changed) (assoc, aid, ..). */
- /*
- * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST
- * as otherwise drivers (iwlwifi at least) will silently not remove
- * the sta from the firmware and when we will add a new one trigger
- * a fw assert.
- */
- lkpi_disassoc(sta, vif, lhw);
+ lkpi_lsta_dump(lsta, ni, __func__, __LINE__);
/* Adjust sta and change state (from NONE) to NOTEXIST. */
KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni));
@@ -1768,7 +1769,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i
lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */
IMPROVE("Any bss_info changes to announce?");
- bss_changed = 0;
vif->bss_conf.qos = 0;
bss_changed |= BSS_CHANGED_QOS;
vif->cfg.ssid_len = 0;
@@ -1794,16 +1794,18 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i
/* Take the chan ctx down. */
if (vif->chanctx_conf != NULL) {
struct lkpi_chanctx *lchanctx;
- struct ieee80211_chanctx_conf *conf;
+ struct ieee80211_chanctx_conf *chanctx_conf;
- conf = vif->chanctx_conf;
+ chanctx_conf = vif->chanctx_conf;
/* Remove vif context. */
lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf);
/* NB: vif->chanctx_conf is NULL now. */
+ lkpi_hw_conf_idle(hw, true);
+
/* Remove chan ctx. */
- lkpi_80211_mo_remove_chanctx(hw, conf);
- lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf);
+ lkpi_80211_mo_remove_chanctx(hw, chanctx_conf);
+ lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf);
free(lchanctx, M_LKPI80211);
}
@@ -2289,14 +2291,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int
goto out;
}
- lkpi_lsta_dump(lsta, ni, __func__, __LINE__);
-
- /* Update bss info (bss_info_changed) (assoc, aid, ..). */
+ bss_changed = 0;
/*
+ * Start updating bss info (bss_info_changed) (assoc, aid, ..).
+ *
* One would expect this to happen when going off AUTHORIZED.
- * See comment there; removes the sta from fw.
+ * See comment there; removes the sta from fw if not careful
+ * (bss_info_changed() change is executed right away).
+ *
+ * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST
+ * as otherwise drivers (iwlwifi at least) will silently not remove
+ * the sta from the firmware and when we will add a new one trigger
+ * a fw assert.
+ *
+ * The order which works best so far avoiding early removal or silent
+ * non-removal seems to be (for iwlwifi::mld-mac80211.c cases;
+ * the iwlwifi:mac80211.c case still to be tested):
+ * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here)
+ * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST
+ * (removes the sta given assoc is false)
+ * 3) add the remaining BSS_CHANGED changes and call bss_info_changed()
+ * 4) call unassign_vif_chanctx
+ * 5) call lkpi_hw_conf_idle
+ * 6) call remove_chanctx
*/
- lkpi_disassoc(sta, vif, lhw);
+ bss_changed |= lkpi_disassoc(sta, vif, lhw);
+
+ lkpi_lsta_dump(lsta, ni, __func__, __LINE__);
/* Adjust sta and change state (from NONE) to NOTEXIST. */
KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni));
@@ -2310,15 +2331,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int
goto out;
}
+ lkpi_lsta_remove(lsta, lvif);
+
lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */
IMPROVE("Any bss_info changes to announce?");
- bss_changed = 0;
vif->bss_conf.qos = 0;
bss_changed |= BSS_CHANGED_QOS;
vif->cfg.ssid_len = 0;
memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid));
bss_changed |= BSS_CHANGED_BSSID;
+ vif->bss_conf.use_short_preamble = false;
+ vif->bss_conf.qos = false;
+ /* XXX BSS_CHANGED_???? */
lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed);
LKPI_80211_LVIF_LOCK(lvif);
@@ -2326,7 +2351,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int
lvif->lvif_bss = NULL;
lvif->lvif_bss_synched = false;
LKPI_80211_LVIF_UNLOCK(lvif);
- lkpi_lsta_remove(lsta, lvif);
/*
* The very last release the reference on the ni for the ni/lsta on
* lvif->lvif_bss. Upon return from this both ni and lsta are invalid
@@ -2339,16 +2363,18 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int
/* Take the chan ctx down. */
if (vif->chanctx_conf != NULL) {
struct lkpi_chanctx *lchanctx;
- struct ieee80211_chanctx_conf *conf;
+ struct ieee80211_chanctx_conf *chanctx_conf;
- conf = vif->chanctx_conf;
+ chanctx_conf = vif->chanctx_conf;
/* Remove vif context. */
lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf);
/* NB: vif->chanctx_conf is NULL now. */
+ lkpi_hw_conf_idle(hw, true);
+
/* Remove chan ctx. */
- lkpi_80211_mo_remove_chanctx(hw, conf);
- lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf);
+ lkpi_80211_mo_remove_chanctx(hw, chanctx_conf);
+ lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf);
free(lchanctx, M_LKPI80211);
}
@@ -3743,7 +3769,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m)
ltxq->txq.tid, ac, skb->priority, skb->qmap);
#endif
LKPI_80211_LTXQ_UNLOCK(ltxq);
+ LKPI_80211_LHW_LOCK(lhw);
lkpi_80211_mo_wake_tx_queue(hw, &ltxq->txq);
+ LKPI_80211_LHW_UNLOCK(lhw);
return;
ops_tx:
@@ -3756,7 +3784,9 @@ ops_tx:
#endif
memset(&control, 0, sizeof(control));
control.sta = sta;
+ LKPI_80211_LHW_LOCK(lhw);
lkpi_80211_mo_tx(hw, &control, skb);
+ LKPI_80211_LHW_UNLOCK(lhw);
}
static void
@@ -4744,7 +4774,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw,
if (!lchanctx->added_to_drv)
continue;
- iterfunc(hw, &lchanctx->conf, arg);
+ iterfunc(hw, &lchanctx->chanctx_conf, arg);
}
LKPI_80211_LHW_LVIF_UNLOCK(lhw);
}
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h
index b0156a5ade3f..a48cf719c693 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.h
+++ b/sys/compat/linuxkpi/common/src/linux_80211.h
@@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */
struct lkpi_chanctx {
bool added_to_drv; /* Managed by MO */
- struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE);
+ struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE);
};
#define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \
- (&(_lchanctx)->conf)
+ (&(_lchanctx)->chanctx_conf)
#define CHANCTX_CONF_TO_LCHANCTX(_conf) \
- container_of(_conf, struct lkpi_chanctx, conf)
+ container_of(_conf, struct lkpi_chanctx, chanctx_conf)
struct lkpi_wiphy {
const struct cfg80211_ops *ops;
diff --git a/sys/compat/linuxkpi/common/src/linux_aperture.c b/sys/compat/linuxkpi/common/src/linux_aperture.c
new file mode 100644
index 000000000000..15a56839fa9c
--- /dev/null
+++ b/sys/compat/linuxkpi/common/src/linux_aperture.c
@@ -0,0 +1,365 @@
+// SPDX-License-Identifier: MIT
+
+#include <linux/aperture.h>
+#include <linux/device.h>
+#include <linux/list.h>
+#include <linux/mutex.h>
+#include <linux/pci.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/sysfb.h>
+#include <linux/types.h>
+#include <linux/vgaarb.h>
+
+#include <video/vga.h>
+
+/**
+ * DOC: overview
+ *
+ * A graphics device might be supported by different drivers, but only one
+ * driver can be active at any given time. Many systems load a generic
+ * graphics drivers, such as EFI-GOP or VESA, early during the boot process.
+ * During later boot stages, they replace the generic driver with a dedicated,
+ * hardware-specific driver. To take over the device the dedicated driver
+ * first has to remove the generic driver. Aperture functions manage
+ * ownership of framebuffer memory and hand-over between drivers.
+ *
+ * Graphics drivers should call aperture_remove_conflicting_devices()
+ * at the top of their probe function. The function removes any generic
+ * driver that is currently associated with the given framebuffer memory.
+ * An example for a graphics device on the platform bus is shown below.
+ *
+ * .. code-block:: c
+ *
+ * static int example_probe(struct platform_device *pdev)
+ * {
+ * struct resource *mem;
+ * resource_size_t base, size;
+ * int ret;
+ *
+ * mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ * if (!mem)
+ * return -ENODEV;
+ * base = mem->start;
+ * size = resource_size(mem);
+ *
+ * ret = aperture_remove_conflicting_devices(base, size, false, "example");
+ * if (ret)
+ * return ret;
+ *
+ * // Initialize the hardware
+ * ...
+ *
+ * return 0;
+ * }
+ *
+ * static const struct platform_driver example_driver = {
+ * .probe = example_probe,
+ * ...
+ * };
+ *
+ * The given example reads the platform device's I/O-memory range from the
+ * device instance. An active framebuffer will be located within this range.
+ * The call to aperture_remove_conflicting_devices() releases drivers that
+ * have previously claimed ownership of the range and are currently driving
+ * output on the framebuffer. If successful, the new driver can take over
+ * the device.
+ *
+ * While the given example uses a platform device, the aperture helpers work
+ * with every bus that has an addressable framebuffer. In the case of PCI,
+ * device drivers can also call aperture_remove_conflicting_pci_devices() and
+ * let the function detect the apertures automatically. Device drivers without
+ * knowledge of the framebuffer's location can call
+ * aperture_remove_all_conflicting_devices(), which removes all known devices.
+ *
+ * Drivers that are susceptible to being removed by other drivers, such as
+ * generic EFI or VESA drivers, have to register themselves as owners of their
+ * framebuffer apertures. Ownership of the framebuffer memory is achieved
+ * by calling devm_aperture_acquire_for_platform_device(). If successful, the
+ * driveris the owner of the framebuffer range. The function fails if the
+ * framebuffer is already owned by another driver. See below for an example.
+ *
+ * .. code-block:: c
+ *
+ * static int generic_probe(struct platform_device *pdev)
+ * {
+ * struct resource *mem;
+ * resource_size_t base, size;
+ *
+ * mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ * if (!mem)
+ * return -ENODEV;
+ * base = mem->start;
+ * size = resource_size(mem);
+ *
+ * ret = devm_aperture_acquire_for_platform_device(pdev, base, size);
+ * if (ret)
+ * return ret;
+ *
+ * // Initialize the hardware
+ * ...
+ *
+ * return 0;
+ * }
+ *
+ * static int generic_remove(struct platform_device *)
+ * {
+ * // Hot-unplug the device
+ * ...
+ *
+ * return 0;
+ * }
+ *
+ * static const struct platform_driver generic_driver = {
+ * .probe = generic_probe,
+ * .remove = generic_remove,
+ * ...
+ * };
+ *
+ * The similar to the previous example, the generic driver claims ownership
+ * of the framebuffer memory from its probe function. This will fail if the
+ * memory range, or parts of it, is already owned by another driver.
+ *
+ * If successful, the generic driver is now subject to forced removal by
+ * another driver. This only works for platform drivers that support hot
+ * unplugging. When a driver calls aperture_remove_conflicting_devices()
+ * et al for the registered framebuffer range, the aperture helpers call
+ * platform_device_unregister() and the generic driver unloads itself. The
+ * generic driver also has to provide a remove function to make this work.
+ * Once hot unplugged fro mhardware, it may not access the device's
+ * registers, framebuffer memory, ROM, etc afterwards.
+ */
+
+struct aperture_range {
+ struct device *dev;
+ resource_size_t base;
+ resource_size_t size;
+ struct list_head lh;
+ void (*detach)(struct device *dev);
+};
+
+static LIST_HEAD(apertures);
+static DEFINE_MUTEX(apertures_lock);
+
+static bool overlap(resource_size_t base1, resource_size_t end1,
+ resource_size_t base2, resource_size_t end2)
+{
+ return (base1 < end2) && (end1 > base2);
+}
+
+static void devm_aperture_acquire_release(void *data)
+{
+ struct aperture_range *ap = data;
+ bool detached = !ap->dev;
+
+ if (detached)
+ return;
+
+ mutex_lock(&apertures_lock);
+ list_del(&ap->lh);
+ mutex_unlock(&apertures_lock);
+}
+
+static int devm_aperture_acquire(struct device *dev,
+ resource_size_t base, resource_size_t size,
+ void (*detach)(struct device *))
+{
+ size_t end = base + size;
+ struct list_head *pos;
+ struct aperture_range *ap;
+
+ mutex_lock(&apertures_lock);
+
+ list_for_each(pos, &apertures) {
+ ap = container_of(pos, struct aperture_range, lh);
+ if (overlap(base, end, ap->base, ap->base + ap->size)) {
+ mutex_unlock(&apertures_lock);
+ return -EBUSY;
+ }
+ }
+
+ ap = devm_kzalloc(dev, sizeof(*ap), GFP_KERNEL);
+ if (!ap) {
+ mutex_unlock(&apertures_lock);
+ return -ENOMEM;
+ }
+
+ ap->dev = dev;
+ ap->base = base;
+ ap->size = size;
+ ap->detach = detach;
+ INIT_LIST_HEAD(&ap->lh);
+
+ list_add(&ap->lh, &apertures);
+
+ mutex_unlock(&apertures_lock);
+
+ return devm_add_action_or_reset(dev, devm_aperture_acquire_release, ap);
+}
+
+static void aperture_detach_platform_device(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+
+ /*
+ * Remove the device from the device hierarchy. This is the right thing
+ * to do for firmware-based DRM drivers, such as EFI, VESA or VGA. After
+ * the new driver takes over the hardware, the firmware device's state
+ * will be lost.
+ *
+ * For non-platform devices, a new callback would be required.
+ *
+ * If the aperture helpers ever need to handle native drivers, this call
+ * would only have to unplug the DRM device, so that the hardware device
+ * stays around after detachment.
+ */
+ platform_device_unregister(pdev);
+}
+
+/**
+ * devm_aperture_acquire_for_platform_device - Acquires ownership of an aperture
+ * on behalf of a platform device.
+ * @pdev: the platform device to own the aperture
+ * @base: the aperture's byte offset in physical memory
+ * @size: the aperture size in bytes
+ *
+ * Installs the given device as the new owner of the aperture. The function
+ * expects the aperture to be provided by a platform device. If another
+ * driver takes over ownership of the aperture, aperture helpers will then
+ * unregister the platform device automatically. All acquired apertures are
+ * released automatically when the underlying device goes away.
+ *
+ * The function fails if the aperture, or parts of it, is currently
+ * owned by another device. To evict current owners, callers should use
+ * remove_conflicting_devices() et al. before calling this function.
+ *
+ * Returns:
+ * 0 on success, or a negative errno value otherwise.
+ */
+int devm_aperture_acquire_for_platform_device(struct platform_device *pdev,
+ resource_size_t base,
+ resource_size_t size)
+{
+ return devm_aperture_acquire(&pdev->dev, base, size, aperture_detach_platform_device);
+}
+EXPORT_SYMBOL(devm_aperture_acquire_for_platform_device);
+
+static void aperture_detach_devices(resource_size_t base, resource_size_t size)
+{
+ resource_size_t end = base + size;
+ struct list_head *pos, *n;
+
+ mutex_lock(&apertures_lock);
+
+ list_for_each_safe(pos, n, &apertures) {
+ struct aperture_range *ap = container_of(pos, struct aperture_range, lh);
+ struct device *dev = ap->dev;
+
+ if (WARN_ON_ONCE(!dev))
+ continue;
+
+ if (!overlap(base, end, ap->base, ap->base + ap->size))
+ continue;
+
+ ap->dev = NULL; /* detach from device */
+ list_del(&ap->lh);
+
+ ap->detach(dev);
+ }
+
+ mutex_unlock(&apertures_lock);
+}
+
+/**
+ * aperture_remove_conflicting_devices - remove devices in the given range
+ * @base: the aperture's base address in physical memory
+ * @size: aperture size in bytes
+ * @primary: also kick vga16fb if present; only relevant for VGA devices
+ * @name: a descriptive name of the requesting driver
+ *
+ * This function removes devices that own apertures within @base and @size.
+ *
+ * Returns:
+ * 0 on success, or a negative errno code otherwise
+ */
+int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size,
+ bool primary, const char *name)
+{
+ /*
+ * If a driver asked to unregister a platform device registered by
+ * sysfb, then can be assumed that this is a driver for a display
+ * that is set up by the system firmware and has a generic driver.
+ *
+ * Drivers for devices that don't have a generic driver will never
+ * ask for this, so let's assume that a real driver for the display
+ * was already probed and prevent sysfb to register devices later.
+ */
+#ifdef __linux__
+ sysfb_disable();
+#endif
+
+ aperture_detach_devices(base, size);
+
+ /*
+ * If this is the primary adapter, there could be a VGA device
+ * that consumes the VGA framebuffer I/O range. Remove this device
+ * as well.
+ */
+ if (primary)
+ aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE);
+
+ return 0;
+}
+EXPORT_SYMBOL(aperture_remove_conflicting_devices);
+
+/**
+ * aperture_remove_conflicting_pci_devices - remove existing framebuffers for PCI devices
+ * @pdev: PCI device
+ * @name: a descriptive name of the requesting driver
+ *
+ * This function removes devices that own apertures within any of @pdev's
+ * memory bars. The function assumes that PCI device with shadowed ROM
+ * drives a primary display and therefore kicks out vga16fb as well.
+ *
+ * Returns:
+ * 0 on success, or a negative errno code otherwise
+ */
+int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name)
+{
+ bool primary = false;
+ resource_size_t base, size;
+ int bar, ret;
+
+#ifdef CONFIG_X86
+#ifdef __linux__
+ primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW;
+#elif defined(__FreeBSD__)
+ primary = NULL;
+#endif
+#endif
+
+ for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) {
+ if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))
+ continue;
+
+ base = pci_resource_start(pdev, bar);
+ size = pci_resource_len(pdev, bar);
+ ret = aperture_remove_conflicting_devices(base, size, primary, name);
+ if (ret)
+ return ret;
+ }
+
+ /*
+ * WARNING: Apparently we must kick fbdev drivers before vgacon,
+ * otherwise the vga fbdev driver falls over.
+ */
+#ifdef __linux__
+ ret = vga_remove_vgacon(pdev);
+ if (ret)
+ return ret;
+#endif
+
+ return 0;
+
+}
+EXPORT_SYMBOL(aperture_remove_conflicting_pci_devices);
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index a6eb7bb17e16..4c639c1f8459 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -382,9 +382,9 @@ linux_kq_assert_lock(void *arg, int what)
spinlock_t *s = arg;
if (what == LA_LOCKED)
- mtx_assert(&s->m, MA_OWNED);
+ mtx_assert(s, MA_OWNED);
else
- mtx_assert(&s->m, MA_NOTOWNED);
+ mtx_assert(s, MA_NOTOWNED);
#endif
}
@@ -1094,7 +1094,7 @@ linux_file_kqfilter_read_event(struct knote *kn, long hint)
{
struct linux_file *filp = kn->kn_hook;
- mtx_assert(&filp->f_kqlock.m, MA_OWNED);
+ mtx_assert(&filp->f_kqlock, MA_OWNED);
return ((filp->f_kqflags & LINUX_KQ_FLAG_NEED_READ) ? 1 : 0);
}
@@ -1104,7 +1104,7 @@ linux_file_kqfilter_write_event(struct knote *kn, long hint)
{
struct linux_file *filp = kn->kn_hook;
- mtx_assert(&filp->f_kqlock.m, MA_OWNED);
+ mtx_assert(&filp->f_kqlock, MA_OWNED);
return ((filp->f_kqflags & LINUX_KQ_FLAG_NEED_WRITE) ? 1 : 0);
}
diff --git a/sys/compat/linuxkpi/common/src/linux_hdmi.c b/sys/compat/linuxkpi/common/src/linux_hdmi.c
index ec4ac7568c7c..947be761dfa4 100644
--- a/sys/compat/linuxkpi/common/src/linux_hdmi.c
+++ b/sys/compat/linuxkpi/common/src/linux_hdmi.c
@@ -21,12 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#ifdef __FreeBSD__
-
-#include <sys/param.h>
-#include <sys/module.h>
-#endif
-
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/errno.h>
@@ -1915,7 +1909,3 @@ int hdmi_infoframe_unpack(union hdmi_infoframe *frame,
return ret;
}
EXPORT_SYMBOL(hdmi_infoframe_unpack);
-
-
-MODULE_VERSION(linuxkpi_hdmi, 1);
-MODULE_DEPEND(linuxkpi_hdmi, linuxkpi, 1, 1, 1);
diff --git a/sys/compat/linuxkpi/common/src/linux_idr.c b/sys/compat/linuxkpi/common/src/linux_idr.c
index dc64da0d7cf5..583e2c237198 100644
--- a/sys/compat/linuxkpi/common/src/linux_idr.c
+++ b/sys/compat/linuxkpi/common/src/linux_idr.c
@@ -69,7 +69,7 @@ idr_preload_dequeue_locked(struct linux_idr_cache *lic)
struct idr_layer *retval;
/* check if wrong thread is trying to dequeue */
- if (mtx_owned(&lic->lock.m) == 0)
+ if (mtx_owned(&lic->lock) == 0)
return (NULL);
retval = lic->head;
diff --git a/sys/compat/linuxkpi/common/src/linuxkpi_hdmikmod.c b/sys/compat/linuxkpi/common/src/linuxkpi_hdmikmod.c
new file mode 100644
index 000000000000..b0d4c013a6f3
--- /dev/null
+++ b/sys/compat/linuxkpi/common/src/linuxkpi_hdmikmod.c
@@ -0,0 +1,7 @@
+/* Public domain. */
+
+#include <sys/param.h>
+#include <sys/module.h>
+
+MODULE_VERSION(linuxkpi_hdmi, 1);
+MODULE_DEPEND(linuxkpi_hdmi, linuxkpi, 1, 1, 1);
diff --git a/sys/compat/linuxkpi/common/src/linuxkpi_videokmod.c b/sys/compat/linuxkpi/common/src/linuxkpi_videokmod.c
new file mode 100644
index 000000000000..8881adc0d657
--- /dev/null
+++ b/sys/compat/linuxkpi/common/src/linuxkpi_videokmod.c
@@ -0,0 +1,7 @@
+/* Public domain. */
+
+#include <sys/param.h>
+#include <sys/module.h>
+
+MODULE_VERSION(linuxkpi_video, 1);
+MODULE_DEPEND(linuxkpi_video, linuxkpi, 1, 1, 1);
diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64
index 1505b6c2a45b..52f0f9052db3 100644
--- a/sys/conf/Makefile.arm64
+++ b/sys/conf/Makefile.arm64
@@ -30,7 +30,8 @@ CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\"
PERTHREAD_SSP_ENABLED!= grep PERTHREAD_SSP opt_global.h || true ; echo
.if !empty(PERTHREAD_SSP_ENABLED)
-. if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000
+. if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000) || \
+ ${COMPILER_TYPE} == "gcc"
ARM64_SSP_CFLAGS = -mstack-protector-guard=sysreg
ARM64_SSP_CFLAGS += -mstack-protector-guard-reg=sp_el0
ARM64_SSP_CFLAGS += -mstack-protector-guard-offset=0
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 216a96c2073c..bcaac1c85899 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -1029,6 +1029,7 @@ device wg
# TCP_BLACKBOX enables enhanced TCP event logging.
#
# TCP_HHOOK enables the hhook(9) framework hooks for the TCP stack.
+# SOCKET_HHOOK enables the hhook(9) framework hooks for socket operations.
#
# ROUTE_MPATH provides support for multipath routing.
#
@@ -1050,6 +1051,7 @@ options PF_DEFAULT_TO_DROP #drop everything by default
options TCPPCAP
options TCP_BLACKBOX
options TCP_HHOOK
+options SOCKET_HHOOK
options ROUTE_MPATH
# The MBUF_STRESS_TEST option enables options which create
@@ -1676,11 +1678,17 @@ device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
# NVM Express
#
# nvme: PCI-express NVM Express host controllers
+# nvmf: NVM Express over Fabrics host
+# nvmft: NVM Express over Fabrics CAM Target Layer frontend
+# nvmf_tcp: TCP transport for NVM Express over Fabrics
# nda: CAM NVMe disk driver
# nvd: non-CAM NVMe disk driver
-device nvme # base NVMe driver
+device nvme # PCI-express NVMe host driver
options NVME_USE_NVD=1 # Use nvd(4) instead of the CAM nda(4) driver
+device nvmf # NVMeoF host driver
+device nvmft # NVMeoF ctl(4) frontend
+device nvmf_tcp # NVMeoF TCP transport
device nda # NVMe direct access devices (aka disks)
device nvd # expose NVMe namespaces as disks, depends on nvme
@@ -2085,6 +2093,7 @@ device sound
# snd_fm801: Forte Media FM801 PCI.
# snd_hda: Intel High Definition Audio (Controller) and
# compatible.
+# snd_hdsp: RME HDSP 9632 and HDSP 9652
# snd_hdspe: RME HDSPe AIO and RayDAT.
# snd_ich: Intel ICH AC'97 and some more audio controllers
# embedded in a chipset, for example nVidia
@@ -2112,6 +2121,7 @@ device snd_envy24ht
device snd_es137x
device snd_fm801
device snd_hda
+device snd_hdsp
device snd_hdspe
device snd_ich
device snd_maestro3
diff --git a/sys/conf/files b/sys/conf/files
index 29c02a503027..56c92f51947f 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -19,7 +19,7 @@ bhnd_nvram_map_data.h optional bhnd \
no-obj no-implicit-rule before-depend \
clean "bhnd_nvram_map_data.h"
fdt_static_dtb.h optional fdt fdt_dtb_static \
- compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \
+ compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.OBJDIR}'" \
dependency "${FDT_DTS_FILE:T:R}.dtb" \
no-obj no-implicit-rule before-depend \
clean "fdt_static_dtb.h"
@@ -108,6 +108,8 @@ cam/ctl/ctl_frontend_cam_sim.c optional ctl
cam/ctl/ctl_frontend_ioctl.c optional ctl
cam/ctl/ctl_frontend_iscsi.c optional ctl cfiscsi
cam/ctl/ctl_ha.c optional ctl
+cam/ctl/ctl_nvme_all.c optional ctl
+cam/ctl/ctl_nvme_cmd_table.c optional ctl
cam/ctl/ctl_scsi_all.c optional ctl
cam/ctl/ctl_tpc.c optional ctl
cam/ctl/ctl_tpc_local.c optional ctl
@@ -701,15 +703,15 @@ crypto/openssl/ossl_sha1.c optional ossl
crypto/openssl/ossl_sha256.c optional ossl
crypto/openssl/ossl_sha512.c optional ossl
crypto/rc4/rc4.c optional netgraph_mppc_encryption
-crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | geom_bde | \
+crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | \
!random_loadable | wlan_ccmp
-crypto/rijndael/rijndael-api-fst.c optional ekcd | geom_bde | !random_loadable
+crypto/rijndael/rijndael-api-fst.c optional ekcd | !random_loadable
crypto/rijndael/rijndael-api.c optional crypto | wlan_ccmp
crypto/sha1.c optional carp | crypto | ether | \
netgraph_mppc_encryption | sctp
-crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | \
+crypto/sha2/sha256c.c optional crypto | ekcd | \
!random_loadable | sctp | zfs
-crypto/sha2/sha512c.c optional crypto | geom_bde | zfs
+crypto/sha2/sha512c.c optional crypto | zfs
crypto/skein/skein.c optional crypto | zfs
crypto/skein/skein_block.c optional crypto | zfs
crypto/siphash/siphash.c optional inet | inet6 | wg
@@ -2533,6 +2535,19 @@ dev/nvme/nvme_test.c optional nvme
dev/nvme/nvme_util.c optional nvme
dev/nvmem/nvmem.c optional nvmem fdt
dev/nvmem/nvmem_if.m optional nvmem
+dev/nvmf/controller/ctl_frontend_nvmf.c optional nvmft
+dev/nvmf/controller/nvmft_controller.c optional nvmft
+dev/nvmf/controller/nvmft_subr.c optional nvmft
+dev/nvmf/controller/nvmft_qpair.c optional nvmft
+dev/nvmf/host/nvmf.c optional nvmf
+dev/nvmf/host/nvmf_aer.c optional nvmf
+dev/nvmf/host/nvmf_cmd.c optional nvmf
+dev/nvmf/host/nvmf_ctldev.c optional nvmf
+dev/nvmf/host/nvmf_ns.c optional nvmf
+dev/nvmf/host/nvmf_qpair.c optional nvmf
+dev/nvmf/host/nvmf_sim.c optional nvmf
+dev/nvmf/nvmf_tcp.c optional nvmf_tcp
+dev/nvmf/nvmf_transport.c optional nvmf | optional nvmft
dev/oce/oce_hw.c optional oce pci
dev/oce/oce_if.c optional oce pci
dev/oce/oce_mbox.c optional oce pci
@@ -3072,7 +3087,6 @@ dev/smc/if_smc.c optional smc
dev/smc/if_smc_acpi.c optional smc acpi
dev/smc/if_smc_fdt.c optional smc fdt
dev/snp/snp.c optional snp
-dev/sound/unit.c optional sound
dev/sound/pci/als4000.c optional snd_als4000 pci
dev/sound/pci/atiixp.c optional snd_atiixp pci
dev/sound/pci/cmi.c optional snd_cmi pci
@@ -3101,6 +3115,8 @@ dev/sound/pci/hda/hdaa_patches.c optional snd_hda pci
dev/sound/pci/hda/hdac.c optional snd_hda pci
dev/sound/pci/hda/hdac_if.m optional snd_hda pci
dev/sound/pci/hda/hdacc.c optional snd_hda pci
+dev/sound/pci/hdsp.c optional snd_hdsp pci
+dev/sound/pci/hdsp-pcm.c optional snd_hdsp pci
dev/sound/pci/hdspe.c optional snd_hdspe pci
dev/sound/pci/hdspe-pcm.c optional snd_hdspe pci
dev/sound/pcm/ac97.c optional sound
@@ -3180,6 +3196,13 @@ dev/syscons/warp/warp_saver.c optional warp_saver
dev/tcp_log/tcp_log_dev.c optional tcp_blackbox inet | tcp_blackbox inet6
dev/tdfx/tdfx_pci.c optional tdfx pci
dev/ti/if_ti.c optional ti pci
+dev/tpm/tpm20.c optional tpm
+dev/tpm/tpm_bus.c optional tpm acpi
+dev/tpm/tpm_if.m optional tpm
+dev/tpm/tpm_spibus.c optional tpm spibus fdt
+dev/tpm/tpm_tis_acpi.c optional tpm acpi
+dev/tpm/tpm_tis_core.c optional tpm
+dev/tpm/tpm_tis_spibus.c optional tpm spibus fdt
dev/tws/tws.c optional tws
dev/tws/tws_cam.c optional tws
dev/tws/tws_hdm.c optional tws
@@ -3609,10 +3632,6 @@ gdb/gdb_cons.c optional gdb
gdb/gdb_main.c optional gdb
gdb/gdb_packet.c optional gdb
gdb/netgdb.c optional ddb debugnet gdb netgdb inet
-geom/bde/g_bde.c optional geom_bde
-geom/bde/g_bde_crypt.c optional geom_bde
-geom/bde/g_bde_lock.c optional geom_bde
-geom/bde/g_bde_work.c optional geom_bde
geom/cache/g_cache.c optional geom_cache
geom/concat/g_concat.c optional geom_concat
geom/eli/g_eli.c optional geom_eli
@@ -3649,6 +3668,7 @@ geom/label/g_label_ntfs.c optional geom_label
geom/label/g_label_ufs.c optional geom_label
geom/label/g_label_gpt.c optional geom_label | geom_label_gpt
geom/label/g_label_disk_ident.c optional geom_label
+geom/label/g_label_swaplinux.c optional geom_label
geom/linux_lvm/g_linux_lvm.c optional geom_linux_lvm
geom/mirror/g_mirror.c optional geom_mirror
geom/mirror/g_mirror_ctl.c optional geom_mirror
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 6322837c887b..add27418ce08 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -92,7 +92,6 @@ amd64/amd64/support.S standard
amd64/amd64/sys_machdep.c standard
amd64/amd64/trap.c standard
amd64/amd64/uio_machdep.c standard
-amd64/amd64/uma_machdep.c standard
amd64/amd64/vm_machdep.c standard
amd64/pci/pci_cfgreg.c optional pci
cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}"
@@ -372,9 +371,7 @@ dev/smartpqi/smartpqi_sis.c optional smartpqi
dev/smartpqi/smartpqi_tag.c optional smartpqi
dev/sume/if_sume.c optional sume
dev/syscons/apm/apm_saver.c optional apm_saver apm
-dev/tpm/tpm20.c optional tpm
dev/tpm/tpm_crb.c optional tpm acpi
-dev/tpm/tpm_tis.c optional tpm acpi
dev/tpm/tpm_acpi.c optional tpm acpi
dev/tpm/tpm_isa.c optional tpm isa
dev/p2sb/p2sb.c optional p2sb pci
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index c7468b577dd8..8139a7af8ed3 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -78,7 +78,6 @@ arm64/arm64/swtch.S standard
arm64/arm64/sys_machdep.c standard
arm64/arm64/trap.c standard
arm64/arm64/uio_machdep.c standard
-arm64/arm64/uma_machdep.c standard
arm64/arm64/undefined.c standard
arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \
compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*}"
@@ -275,7 +274,7 @@ dev/firmware/arm/scmi_clk.c optional fdt scmi
dev/firmware/arm/scmi_if.m optional fdt scmi
dev/firmware/arm/scmi_mailbox.c optional fdt scmi
dev/firmware/arm/scmi_smc.c optional fdt scmi
-dev/firmware/arm/scmi_virtio.c optional fdt scmi
+dev/firmware/arm/scmi_virtio.c optional fdt scmi virtio
dev/firmware/arm/scmi_shmem.c optional fdt scmi
dev/gpio/pl061.c optional pl061 gpio
diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv
index be7ae2b40a08..49c8ddd0c516 100644
--- a/sys/conf/files.riscv
+++ b/sys/conf/files.riscv
@@ -67,7 +67,6 @@ riscv/riscv/sys_machdep.c standard
riscv/riscv/trap.c standard
riscv/riscv/timer.c standard
riscv/riscv/uio_machdep.c standard
-riscv/riscv/uma_machdep.c standard
riscv/riscv/unwind.c optional ddb | kdtrace_hooks | stack
riscv/riscv/vm_machdep.c standard
diff --git a/sys/conf/files.x86 b/sys/conf/files.x86
index ce31c42215be..de698e82c823 100644
--- a/sys/conf/files.x86
+++ b/sys/conf/files.x86
@@ -352,6 +352,7 @@ x86/iommu/intel_intrmap.c optional acpi iommu pci
x86/iommu/intel_qi.c optional acpi iommu pci
x86/iommu/intel_quirks.c optional acpi iommu pci
x86/iommu/intel_utils.c optional acpi iommu pci
+x86/iommu/iommu_utils.c optional acpi iommu pci
x86/isa/atrtc.c standard
x86/isa/clock.c standard
x86/isa/isa.c optional isa
@@ -380,6 +381,7 @@ x86/x86/stack_machdep.c optional ddb | stack
x86/x86/tsc.c standard
x86/x86/ucode.c standard
x86/x86/ucode_subr.c standard
+x86/x86/vmware_guestrpc.c optional vmware_guestrpc
x86/x86/delay.c standard
x86/xen/hvm.c optional xenhvm
x86/xen/xen_apic.c optional xenhvm smp
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 5cc0ff70c3e2..ed186619434d 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -71,6 +71,8 @@ KMODLOAD?= /sbin/kldload
KMODUNLOAD?= /sbin/kldunload
KMODISLOADED?= /sbin/kldstat -q -n
OBJCOPY?= objcopy
+XARGS?= xargs
+XARGS_J?= -J
.include "kmod.opts.mk"
.include <bsd.sysdir.mk>
@@ -275,12 +277,12 @@ ${FULLPROG}: ${OBJS} ${BLOB_OBJS}
grep -v '^#' < ${EXPORT_SYMS} > export_syms
.endif
${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \
- export_syms | xargs -J% ${OBJCOPY} % ${.TARGET}
+ export_syms | ${XARGS} ${XARGS_J} % ${OBJCOPY} % ${.TARGET}
.endif
.endif # defined(EXPORT_SYMS)
.if defined(PREFIX_SYMS)
${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \
- ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET}
+ ${.TARGET} /dev/null | ${XARGS} ${XARGS_J} % ${OBJCOPY} % ${.TARGET}
.endif
.if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no
${OBJCOPY} --strip-debug ${.TARGET}
diff --git a/sys/conf/options b/sys/conf/options
index fcab21ad7e78..d9bc981232c4 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -208,6 +208,7 @@ SCHED_STATS opt_sched.h
SCHED_ULE opt_sched.h
SLEEPQUEUE_PROFILING
SLHCI_DEBUG opt_slhci.h
+SOCKET_HHOOK opt_global.h
STACK opt_stack.h
SUIDDIR
MSGMNB opt_sysvipc.h
@@ -241,7 +242,6 @@ TCP_RACK opt_inet.h
# algorithm that uses "normal" behaviour with SACK's to detect
# a possible attack. It is strictly experimental at this point.
#
-TCP_SAD_DETECTION opt_inet.h
TURNSTILE_PROFILING
UMTX_PROFILING
UMTX_CHAINS opt_global.h
diff --git a/sys/contrib/device-tree/Bindings/.yamllint b/sys/contrib/device-tree/Bindings/.yamllint
index 4abe9f0a1d46..fea5231e1320 100644
--- a/sys/contrib/device-tree/Bindings/.yamllint
+++ b/sys/contrib/device-tree/Bindings/.yamllint
@@ -1,6 +1,11 @@
extends: relaxed
rules:
+ quoted-strings:
+ required: only-when-needed
+ extra-allowed:
+ - '[$^,[]'
+ - '^/$'
line-length:
# 80 chars should be enough, but don't fail if a line is longer
max: 110
diff --git a/sys/contrib/device-tree/Bindings/Makefile b/sys/contrib/device-tree/Bindings/Makefile
index 8b395893bd85..129cf698fa8a 100644
--- a/sys/contrib/device-tree/Bindings/Makefile
+++ b/sys/contrib/device-tree/Bindings/Makefile
@@ -6,7 +6,7 @@ DT_MK_SCHEMA ?= dt-mk-schema
DT_SCHEMA_LINT = $(shell which yamllint || \
echo "warning: python package 'yamllint' not installed, skipping" >&2)
-DT_SCHEMA_MIN_VERSION = 2022.3
+DT_SCHEMA_MIN_VERSION = 2023.9
PHONY += check_dtschema_version
check_dtschema_version:
@@ -28,7 +28,10 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
-name 'processed-schema*' \)
-find_cmd = $(find_all_cmd) | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))"
+find_cmd = $(find_all_cmd) | \
+ sed 's|^$(srctree)/||' | \
+ grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
+ sed 's|^|$(srctree)/|'
CHK_DT_DOCS := $(shell $(find_cmd))
quiet_cmd_yamllint = LINT $(src)
diff --git a/sys/contrib/device-tree/Bindings/arm/amd,pensando.yaml b/sys/contrib/device-tree/Bindings/arm/amd,pensando.yaml
new file mode 100644
index 000000000000..e5c2591834a8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/arm/amd,pensando.yaml
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/amd,pensando.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AMD Pensando SoC Platforms
+
+maintainers:
+ - Brad Larson <blarson@amd.com>
+
+properties:
+ $nodename:
+ const: "/"
+ compatible:
+ oneOf:
+
+ - description: Boards with Pensando Elba SoC
+ items:
+ - enum:
+ - amd,pensando-elba-ortano
+ - const: amd,pensando-elba
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/arm/amlogic.yaml b/sys/contrib/device-tree/Bindings/arm/amlogic.yaml
index 08d59842655c..caab7ceeda45 100644
--- a/sys/contrib/device-tree/Bindings/arm/amlogic.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/amlogic.yaml
@@ -155,6 +155,7 @@ properties:
- enum:
- bananapi,bpi-m2s
- khadas,vim3
+ - libretech,aml-a311d-cc
- radxa,zero2
- const: amlogic,a311d
- const: amlogic,g12b
@@ -196,6 +197,7 @@ properties:
- hardkernel,odroid-hc4
- haochuangyi,h96-max
- khadas,vim3l
+ - libretech,aml-s905d3-cc
- seirobotics,sei610
- const: amlogic,sm1
@@ -203,6 +205,7 @@ properties:
items:
- enum:
- amlogic,ad401
+ - amlogic,ad402
- const: amlogic,a1
- description: Boards with the Amlogic C3 C302X/C308L SoC
@@ -218,6 +221,14 @@ properties:
- amlogic,aq222
- const: amlogic,s4
+ - description: Boards with the Amlogic T7 A311D2 SoC
+ items:
+ - enum:
+ - amlogic,an400
+ - khadas,vim4
+ - const: amlogic,a311d2
+ - const: amlogic,t7
+
additionalProperties: true
...
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,coresight-cti.yaml b/sys/contrib/device-tree/Bindings/arm/arm,coresight-cti.yaml
index d6c84b6e7fe6..2d5545a2b49c 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,coresight-cti.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,coresight-cti.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright 2019 Linaro Ltd.
%YAML 1.2
---
@@ -92,11 +92,8 @@ properties:
maxItems: 1
cpu:
- $ref: /schemas/types.yaml#/definitions/phandle
description:
- Handle to cpu this device is associated with. This must appear in the
- base cti node if compatible string arm,coresight-cti-v8-arch is used,
- or may appear in a trig-conns child node when appropriate.
+ Handle to cpu this CTI is associated with.
power-domains:
maxItems: 1
@@ -113,12 +110,12 @@ properties:
description:
defines a phandle reference to an associated CoreSight trace device.
When the associated trace device is enabled, then the respective CTI
- will be enabled. Use in a trig-conns node, or in CTI base node when
- compatible string arm,coresight-cti-v8-arch used. If the associated
- device has not been registered then the node name will be stored as
- the connection name for later resolution. If the associated device is
- not a CoreSight device or not registered then the node name will remain
- the connection name and automatic enabling will not occur.
+ will be enabled. Use in CTI base node when compatible string
+ arm,coresight-cti-v8-arch used. If the associated device has not been
+ registered then the node name will be stored as the connection name for
+ later resolution. If the associated device is not a CoreSight device or
+ not registered then the node name will remain the connection name and
+ automatic enabling will not occur.
# size cells and address cells required if trig-conns node present.
"#size-cells":
@@ -130,6 +127,8 @@ properties:
patternProperties:
'^trig-conns@([0-9]+)$':
type: object
+ additionalProperties: false
+
description:
A trigger connections child node which describes the trigger signals
between this CTI and another hardware device. This device may be a CPU,
@@ -141,6 +140,21 @@ patternProperties:
reg:
maxItems: 1
+ cpu:
+ description:
+ Handle to cpu this trigger connection is associated with.
+
+ arm,cs-dev-assoc:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ defines a phandle reference to an associated CoreSight trace device.
+ When the associated trace device is enabled, then the respective CTI
+ will be enabled. If the associated device has not been registered
+ then the node name will be stored as the connection name for later
+ resolution. If the associated device is not a CoreSight device or
+ not registered then the node name will remain the connection name
+ and automatic enabling will not occur.
+
arm,trig-in-sigs:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-sink.yaml b/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-sink.yaml
index cb78cfa56702..c960c8e0a9a5 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-sink.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-sink.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/arm,coresight-dummy-sink.yaml#
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-source.yaml b/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-source.yaml
index 5fedaed49a1f..6745b4cc8f1c 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-source.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,coresight-dummy-source.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/arm,coresight-dummy-source.yaml#
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,embedded-trace-extension.yaml b/sys/contrib/device-tree/Bindings/arm/arm,embedded-trace-extension.yaml
index 108460627d9a..f725e6940993 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,embedded-trace-extension.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,embedded-trace-extension.yaml
@@ -1,9 +1,9 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright 2021, Arm Ltd
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/arm,embedded-trace-extension.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/arm,embedded-trace-extension.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM Embedded Trace Extensions
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,integrator.yaml b/sys/contrib/device-tree/Bindings/arm/arm,integrator.yaml
index 98ff5698ae1f..1bdbd1b7ee38 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,integrator.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,integrator.yaml
@@ -40,45 +40,6 @@ properties:
items:
- const: arm,integrator-sp
- core-module@10000000:
- type: object
- description: the root node in the Integrator platforms must contain
- a core module child node. They are always at physical address
- 0x10000000 in all the Integrator variants.
- properties:
- compatible:
- items:
- - const: arm,core-module-integrator
- - const: syscon
- - const: simple-mfd
- reg:
- maxItems: 1
-
- required:
- - compatible
- - reg
-
-patternProperties:
- "^syscon@[0-9a-f]+$":
- description: All Integrator boards must provide a system controller as a
- node in the root of the device tree.
- type: object
- properties:
- compatible:
- items:
- - enum:
- - arm,integrator-ap-syscon
- - arm,integrator-cp-syscon
- - arm,integrator-sp-syscon
- - const: syscon
- reg:
- maxItems: 1
-
- required:
- - compatible
- - reg
-
-
required:
- compatible
- core-module@10000000
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,realview.yaml b/sys/contrib/device-tree/Bindings/arm/arm,realview.yaml
index 8d3ed2e4ed31..d1bdee98f9af 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,realview.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,realview.yaml
@@ -75,43 +75,6 @@ properties:
type: object
description: All RealView boards must provide a syscon system controller
node inside the soc node.
- properties:
- compatible:
- oneOf:
- - items:
- - const: arm,realview-eb11mp-revb-syscon
- - const: arm,realview-eb-syscon
- - const: syscon
- - const: simple-mfd
- - items:
- - const: arm,realview-eb11mp-revc-syscon
- - const: arm,realview-eb-syscon
- - const: syscon
- - const: simple-mfd
- - items:
- - const: arm,realview-eb-syscon
- - const: syscon
- - const: simple-mfd
- - items:
- - const: arm,realview-pb1176-syscon
- - const: syscon
- - const: simple-mfd
- - items:
- - const: arm,realview-pb11mp-syscon
- - const: syscon
- - const: simple-mfd
- - items:
- - const: arm,realview-pba8-syscon
- - const: syscon
- - const: simple-mfd
- - items:
- - const: arm,realview-pbx-syscon
- - const: syscon
- - const: simple-mfd
-
- required:
- - compatible
- - reg
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,trace-buffer-extension.yaml b/sys/contrib/device-tree/Bindings/arm/arm,trace-buffer-extension.yaml
index b1322658063a..87128e7b7d28 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,trace-buffer-extension.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,trace-buffer-extension.yaml
@@ -1,9 +1,9 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright 2021, Arm Ltd
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/arm,trace-buffer-extension.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/arm,trace-buffer-extension.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM Trace Buffer Extensions
@@ -19,7 +19,8 @@ description: |
properties:
$nodename:
- const: "trbe"
+ const: trbe
+
compatible:
items:
- const: arm,trace-buffer-extension
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,versatile-sysreg.yaml b/sys/contrib/device-tree/Bindings/arm/arm,versatile-sysreg.yaml
index 491eef1e1b10..3b060c36b90c 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,versatile-sysreg.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,versatile-sysreg.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/arm,versatile-sysreg.yaml#
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,versatile.yaml b/sys/contrib/device-tree/Bindings/arm/arm,versatile.yaml
index 13e52ba92060..7a3caf6af200 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,versatile.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,versatile.yaml
@@ -14,6 +14,14 @@ description: |+
with various pluggable interface boards, in essence the Versatile PB version
is a superset of the Versatile AB version.
+ The root node in the Versatile platforms must contain a core module child
+ node. They are always at physical address 0x10000000 in all the Versatile
+ variants.
+
+ When fitted with the IB2 Interface Board, the Versatile AB will present an
+ optional system controller node which controls the extra peripherals on the
+ interface board.
+
properties:
$nodename:
const: '/'
@@ -32,38 +40,6 @@ properties:
items:
- const: arm,versatile-pb
- core-module@10000000:
- type: object
- description: the root node in the Versatile platforms must contain
- a core module child node. They are always at physical address
- 0x10000000 in all the Versatile variants.
- properties:
- compatible:
- items:
- - const: arm,core-module-versatile
- - const: syscon
- - const: simple-mfd
- reg:
- maxItems: 1
-
- required:
- - compatible
- - reg
-
-patternProperties:
- "^syscon@[0-9a-f]+$":
- type: object
- description: When fitted with the IB2 Interface Board, the Versatile
- AB will present an optional system controller node which controls the
- extra peripherals on the interface board.
- properties:
- compatible:
- contains:
- const: arm,versatile-ib2-syscon
- required:
- - compatible
- - reg
-
required:
- compatible
- core-module@10000000
diff --git a/sys/contrib/device-tree/Bindings/arm/arm,vexpress-juno.yaml b/sys/contrib/device-tree/Bindings/arm/arm,vexpress-juno.yaml
index cdd65881fcdd..8dd6b6446394 100644
--- a/sys/contrib/device-tree/Bindings/arm/arm,vexpress-juno.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/arm,vexpress-juno.yaml
@@ -143,7 +143,7 @@ patternProperties:
"simple-bus". If the compatible is placed in the "motherboard-bus" node,
it is stricter and always has two compatibles.
type: object
- $ref: '/schemas/simple-bus.yaml'
+ $ref: /schemas/simple-bus.yaml
unevaluatedProperties: false
properties:
diff --git a/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed,sbc.yaml b/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed,sbc.yaml
index c72aab706484..b8c5cacb09bd 100644
--- a/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed,sbc.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed,sbc.yaml
@@ -2,8 +2,8 @@
# Copyright 2021 Joel Stanley, IBM Corp.
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/aspeed/aspeed,sbc.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/aspeed/aspeed,sbc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ASPEED Secure Boot Controller
diff --git a/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed.yaml b/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed.yaml
index e0eff4c05879..749ee54a3ff8 100644
--- a/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/aspeed/aspeed.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/aspeed/aspeed.yaml#
@@ -79,9 +79,12 @@ properties:
- facebook,elbert-bmc
- facebook,fuji-bmc
- facebook,greatlakes-bmc
+ - facebook,minerva-cmc
+ - facebook,yosemite4-bmc
- ibm,everest-bmc
- ibm,rainier-bmc
- ibm,tacoma-bmc
+ - inventec,starscream-bmc
- inventec,transformer-bmc
- jabil,rbp-bmc
- qcom,dc-scm-v1-bmc
diff --git a/sys/contrib/device-tree/Bindings/arm/atmel-at91.yaml b/sys/contrib/device-tree/Bindings/arm/atmel-at91.yaml
index dfb8fd089197..89d75fbb1de4 100644
--- a/sys/contrib/device-tree/Bindings/arm/atmel-at91.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/atmel-at91.yaml
@@ -79,6 +79,13 @@ properties:
- const: atmel,sama5d2
- const: atmel,sama5
+ - description: Microchip SAMA5D29 Curiosity
+ items:
+ - const: microchip,sama5d29-curiosity
+ - const: atmel,sama5d29
+ - const: atmel,sama5d2
+ - const: atmel,sama5
+
- items:
- const: atmel,sama5d27
- const: atmel,sama5d2
diff --git a/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm4708.yaml b/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm4708.yaml
index 5c3ac97e8728..4cc4e6754681 100644
--- a/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm4708.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm4708.yaml
@@ -66,6 +66,7 @@ properties:
- description: BCM47094 based boards
items:
- enum:
+ - asus,rt-ac3100
- asus,rt-ac88u
- dlink,dir-885l
- dlink,dir-890l
diff --git a/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm53573.yaml b/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm53573.yaml
new file mode 100644
index 000000000000..81b9a4a641c1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/arm/bcm/brcm,bcm53573.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/bcm/brcm,bcm53573.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM53573 SoCs family
+
+description:
+ Broadcom BCM53573 / BCM47189 Wi-Fi SoCs derived from Northstar.
+
+maintainers:
+ - Rafał Miłecki <rafal@milecki.pl>
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: BCM53573 based boards
+ items:
+ - enum:
+ - tenda,ac6-v1
+ - tenda,w15e-v1
+ - const: brcm,bcm53573
+
+ - description: BCM47189 based boards
+ items:
+ - enum:
+ - brcm,bcm947189acdbmr
+ - luxul,xap-810-v1
+ - luxul,xap-1440-v1
+ - tenda,ac9
+ - const: brcm,bcm47189
+ - const: brcm,bcm53573
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/arm/calxeda/l2ecc.yaml b/sys/contrib/device-tree/Bindings/arm/calxeda/l2ecc.yaml
index a9fe01238a88..76b65ea149b6 100644
--- a/sys/contrib/device-tree/Bindings/arm/calxeda/l2ecc.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/calxeda/l2ecc.yaml
@@ -16,7 +16,7 @@ maintainers:
properties:
compatible:
- const: "calxeda,hb-sregs-l2-ecc"
+ const: calxeda,hb-sregs-l2-ecc
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/arm/cpus.yaml b/sys/contrib/device-tree/Bindings/arm/cpus.yaml
index 9e6a45eea4e5..cc5a21b47e26 100644
--- a/sys/contrib/device-tree/Bindings/arm/cpus.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/cpus.yaml
@@ -143,8 +143,10 @@ properties:
- arm,cortex-a78ae
- arm,cortex-a78c
- arm,cortex-a510
+ - arm,cortex-a520
- arm,cortex-a710
- arm,cortex-a715
+ - arm,cortex-a720
- arm,cortex-m0
- arm,cortex-m0+
- arm,cortex-m1
@@ -158,6 +160,7 @@ properties:
- arm,cortex-x1c
- arm,cortex-x2
- arm,cortex-x3
+ - arm,cortex-x4
- arm,neoverse-e1
- arm,neoverse-n1
- arm,neoverse-n2
@@ -187,6 +190,7 @@ properties:
- qcom,kryo280
- qcom,kryo360
- qcom,kryo385
+ - qcom,kryo465
- qcom,kryo468
- qcom,kryo485
- qcom,kryo560
@@ -194,6 +198,7 @@ properties:
- qcom,kryo660
- qcom,kryo685
- qcom,kryo780
+ - qcom,oryon
- qcom,scorpion
enable-method:
@@ -305,7 +310,9 @@ properties:
power-domains property.
For PSCI based platforms, the name corresponding to the index of the PSCI
- PM domain provider, must be "psci".
+ PM domain provider, must be "psci". For SCMI based platforms, the name
+ corresponding to the index of an SCMI performance domain provider, must be
+ "perf".
qcom,saw:
$ref: /schemas/types.yaml#/definitions/phandle
diff --git a/sys/contrib/device-tree/Bindings/arm/firmware/tlm,trusted-foundations.yaml b/sys/contrib/device-tree/Bindings/arm/firmware/tlm,trusted-foundations.yaml
index 9d1857c0aa07..e3980b659f63 100644
--- a/sys/contrib/device-tree/Bindings/arm/firmware/tlm,trusted-foundations.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/firmware/tlm,trusted-foundations.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/firmware/tlm,trusted-foundations.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/firmware/tlm,trusted-foundations.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Trusted Foundations
diff --git a/sys/contrib/device-tree/Bindings/arm/fsl.yaml b/sys/contrib/device-tree/Bindings/arm/fsl.yaml
index 2510eaa8906d..228dcc5c7d6f 100644
--- a/sys/contrib/device-tree/Bindings/arm/fsl.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/fsl.yaml
@@ -25,8 +25,11 @@ properties:
- description: i.MX23 based Boards
items:
- enum:
+ - creative,x-fi3
- fsl,imx23-evk
+ - fsl,stmp378x-devb
- olimex,imx23-olinuxino
+ - sandisk,sansa_fuze_plus
- const: fsl,imx23
- description: i.MX25 Product Development Kit
@@ -385,6 +388,12 @@ properties:
- const: toradex,apalis_imx6q
- const: fsl,imx6q
+ - description: i.MX6Q Variscite VAR-SOM-MX6 Boards
+ items:
+ - const: variscite,mx6customboard
+ - const: variscite,var-som-imx6q
+ - const: fsl,imx6q
+
- description: TQ-Systems TQMa6Q SoM (variant A) on MBa6x
items:
- const: tq,imx6q-mba6x-a
@@ -909,6 +918,7 @@ properties:
- fsl,imx8mm-evk # i.MX8MM EVK Board
- fsl,imx8mm-evkb # i.MX8MM EVKB Board
- gateworks,imx8mm-gw7904
+ - gateworks,imx8mm-gw7905-0x # i.MX8MM Gateworks Board
- gw,imx8mm-gw71xx-0x # i.MX8MM Gateworks Development Kit
- gw,imx8mm-gw72xx-0x # i.MX8MM Gateworks Development Kit
- gw,imx8mm-gw73xx-0x # i.MX8MM Gateworks Development Kit
@@ -957,6 +967,7 @@ properties:
- menlo,mx8menlo # Verdin iMX8M Mini Module on i.MX8MM Menlo board
- toradex,verdin-imx8mm-nonwifi-dahlia # Verdin iMX8M Mini Module on Dahlia
- toradex,verdin-imx8mm-nonwifi-dev # Verdin iMX8M Mini Module on Verdin Development Board
+ - toradex,verdin-imx8mm-nonwifi-mallow # Verdin iMX8M Mini Module on Mallow
- toradex,verdin-imx8mm-nonwifi-yavia # Verdin iMX8M Mini Module on Yavia
- const: toradex,verdin-imx8mm-nonwifi # Verdin iMX8M Mini Module without Wi-Fi / BT
- const: toradex,verdin-imx8mm # Verdin iMX8M Mini Module
@@ -967,6 +978,7 @@ properties:
- enum:
- toradex,verdin-imx8mm-wifi-dahlia # Verdin iMX8M Mini Wi-Fi / BT Module on Dahlia
- toradex,verdin-imx8mm-wifi-dev # Verdin iMX8M Mini Wi-Fi / BT M. on Verdin Development B.
+ - toradex,verdin-imx8mm-wifi-mallow # Verdin iMX8M Mini Wi-Fi / BT Module on Mallow
- toradex,verdin-imx8mm-wifi-yavia # Verdin iMX8M Mini Wi-Fi / BT Module on Yavia
- const: toradex,verdin-imx8mm-wifi # Verdin iMX8M Mini Wi-Fi / BT Module
- const: toradex,verdin-imx8mm # Verdin iMX8M Mini Module
@@ -974,7 +986,9 @@ properties:
- description: PHYTEC phyCORE-i.MX8MM SoM based boards
items:
- - const: phytec,imx8mm-phyboard-polis-rdk # phyBOARD-Polis RDK
+ - enum:
+ - phytec,imx8mm-phyboard-polis-rdk # phyBOARD-Polis RDK
+ - phytec,imx8mm-phygate-tauri-l # phyGATE-Tauri-L Gateway
- const: phytec,imx8mm-phycore-som # phyCORE-i.MX8MM SoM
- const: fsl,imx8mm
@@ -1010,7 +1024,10 @@ properties:
- description: Variscite VAR-SOM-MX8MN based boards
items:
- - const: variscite,var-som-mx8mn-symphony
+ - enum:
+ - dimonoff,gateway-evk # i.MX8MN Dimonoff Gateway EVK Board
+ - rve,rve-gateway # i.MX8MN RVE Gateway Board
+ - variscite,var-som-mx8mn-symphony
- const: variscite,var-som-mx8mn
- const: fsl,imx8mn
@@ -1031,10 +1048,14 @@ properties:
- beacon,imx8mp-beacon-kit # i.MX8MP Beacon Development Kit
- dmo,imx8mp-data-modul-edm-sbc # i.MX8MP eDM SBC
- fsl,imx8mp-evk # i.MX8MP EVK Board
+ - gateworks,imx8mp-gw71xx-2x # i.MX8MP Gateworks Board
+ - gateworks,imx8mp-gw72xx-2x # i.MX8MP Gateworks Board
+ - gateworks,imx8mp-gw73xx-2x # i.MX8MP Gateworks Board
- gateworks,imx8mp-gw74xx # i.MX8MP Gateworks Board
- gateworks,imx8mp-gw7905-2x # i.MX8MP Gateworks Board
- - polyhex,imx8mp-debix # Polyhex Debix boards
- - polyhex,imx8mp-debix-model-a # Polyhex Debix Model A Board
+ - skov,imx8mp-skov-revb-hdmi # SKOV i.MX8MP climate control without panel
+ - skov,imx8mp-skov-revb-lt6 # SKOV i.MX8MP climate control with 7” panel
+ - skov,imx8mp-skov-revb-mi1010ait-1cp1 # SKOV i.MX8MP climate control with 10.1" panel
- toradex,verdin-imx8mp # Verdin iMX8M Plus Modules
- toradex,verdin-imx8mp-nonwifi # Verdin iMX8M Plus Modules without Wi-Fi / BT
- toradex,verdin-imx8mp-wifi # Verdin iMX8M Plus Wi-Fi / BT Modules
@@ -1068,11 +1089,26 @@ properties:
- const: phytec,imx8mp-phycore-som # phyCORE-i.MX8MP SoM
- const: fsl,imx8mp
+ - description: Polyhex DEBIX i.MX8MP based SBCs
+ items:
+ - enum:
+ - polyhex,imx8mp-debix-model-a # Polyhex Debix Model A Board
+ - const: polyhex,imx8mp-debix # Polyhex i.MX8MP Debix SBCs
+ - const: fsl,imx8mp
+
+ - description: Polyhex DEBIX i.MX8MP SOM A based boards
+ items:
+ - enum:
+ - polyhex,imx8mp-debix-som-a-bmb-08 # Polyhex Debix SOM A on SOM A I/O board
+ - const: polyhex,imx8mp-debix-som-a # Polyhex Debix SOM A
+ - const: fsl,imx8mp
+
- description: Toradex Boards with Verdin iMX8M Plus Modules
items:
- enum:
- toradex,verdin-imx8mp-nonwifi-dahlia # Verdin iMX8M Plus Module on Dahlia
- toradex,verdin-imx8mp-nonwifi-dev # Verdin iMX8M Plus Module on Verdin Development Board
+ - toradex,verdin-imx8mp-nonwifi-mallow # Verdin iMX8M Plus Module on Mallow
- toradex,verdin-imx8mp-nonwifi-yavia # Verdin iMX8M Plus Module on Yavia
- const: toradex,verdin-imx8mp-nonwifi # Verdin iMX8M Plus Module without Wi-Fi / BT
- const: toradex,verdin-imx8mp # Verdin iMX8M Plus Module
@@ -1083,6 +1119,7 @@ properties:
- enum:
- toradex,verdin-imx8mp-wifi-dahlia # Verdin iMX8M Plus Wi-Fi / BT Module on Dahlia
- toradex,verdin-imx8mp-wifi-dev # Verdin iMX8M Plus Wi-Fi / BT M. on Verdin Development B.
+ - toradex,verdin-imx8mp-wifi-mallow # Verdin iMX8M Plus Wi-Fi / BT Module on Mallow
- toradex,verdin-imx8mp-wifi-yavia # Verdin iMX8M Plus Wi-Fi / BT Module on Yavia
- const: toradex,verdin-imx8mp-wifi # Verdin iMX8M Plus Wi-Fi / BT Module
- const: toradex,verdin-imx8mp # Verdin iMX8M Plus Module
@@ -1220,11 +1257,30 @@ properties:
- const: fsl,imxrt1170
- description:
+ TQMa93xxLA and TQMa93xxCA are two series of feature compatible SOM
+ using NXP i.MX93 SOC in 11x11 mm package.
+ TQMa93xxLA is designed to be soldered on different carrier boards.
+ TQMa93xxCA is a compatible variant using board to board connectors.
+ All SOM and CPU variants use the same device tree hence only one
+ compatible is needed. Bootloader disables all features not present
+ in the assembled SOC.
+ MBa93xxCA mainboard can be used as starterkit for the SOM
+ soldered on an adapter board or for the connector variant
+ MBa93xxLA mainboard is a single board computer using the solderable
+ SOM variant
+ items:
+ - enum:
+ - tq,imx93-tqma9352-mba93xxca # TQ-Systems GmbH i.MX93 TQMa93xxCA/LA SOM on MBa93xxCA
+ - tq,imx93-tqma9352-mba93xxla # TQ-Systems GmbH i.MX93 TQMa93xxLA SOM on MBa93xxLA SBC
+ - const: tq,imx93-tqma9352 # TQ-Systems GmbH i.MX93 TQMa93xxCA/LA SOM
+ - const: fsl,imx93
+
+ - description:
Freescale Vybrid Platform Device Tree Bindings
- For the Vybrid SoC familiy all variants with DDR controller are supported,
+ For the Vybrid SoC family all variants with DDR controller are supported,
which is the VF5xx and VF6xx series. Out of historical reasons, in most
- places the kernel uses vf610 to refer to the whole familiy.
+ places the kernel uses vf610 to refer to the whole family.
The compatible string "fsl,vf610m4" is used for the secondary Cortex-M4
core support.
items:
@@ -1289,6 +1345,16 @@ properties:
- fsl,ls1021a-twr
- const: fsl,ls1021a
+ - description:
+ TQ-Systems TQMLS102xA is a series of socketable SOM featuring
+ LS102x system-on-chip variants. MBLS102xA mainboard can be used as
+ starterkit.
+ items:
+ - enum:
+ - tq,ls1021a-tqmls1021a-mbls102xa
+ - const: tq,ls1021a-tqmls1021a
+ - const: fsl,ls1021a
+
- description: LS1028A based Boards
items:
- enum:
@@ -1344,6 +1410,13 @@ properties:
- fsl,ls1043a-qds
- const: fsl,ls1043a
+ - description: TQ-Systems LS1043A based Boards
+ items:
+ - enum:
+ - tq,ls1043a-tqmls1043a-mbls10xxa
+ - const: tq,ls1043a-tqmls1043a
+ - const: fsl,ls1043a
+
- description: LS1046A based Boards
items:
- enum:
@@ -1352,6 +1425,13 @@ properties:
- fsl,ls1046a-rdb
- const: fsl,ls1046a
+ - description: TQ-Systems LS1046A based Boards
+ items:
+ - enum:
+ - tq,ls1046a-tqmls1046a-mbls10xxa
+ - const: tq,ls1046a-tqmls1046a
+ - const: fsl,ls1046a
+
- description: LS1088A based Boards
items:
- enum:
@@ -1359,6 +1439,13 @@ properties:
- fsl,ls1088a-rdb
- const: fsl,ls1088a
+ - description: TQ-Systems LS1088A based Boards
+ items:
+ - enum:
+ - tq,ls1088a-tqmls1088a-mbls10xxa
+ - const: tq,ls1088a-tqmls1088a
+ - const: fsl,ls1088a
+
- description: LS2080A based Boards
items:
- enum:
@@ -1384,7 +1471,7 @@ properties:
- fsl,lx2162a-qds
- const: fsl,lx2160a
- - description: SolidRun LX2160A based Boards
+ - description: SolidRun LX2160A CEX-7 based Boards
items:
- enum:
- solidrun,clearfog-cx
@@ -1392,6 +1479,23 @@ properties:
- const: solidrun,lx2160a-cex7
- const: fsl,lx2160a
+ - description: SolidRun LX2162A SoM based Boards
+ items:
+ - enum:
+ - solidrun,lx2162a-clearfog
+ - const: solidrun,lx2162a-som
+ - const: fsl,lx2160a
+
+ - description:
+ TQ-Systems TQMLX2160A is a series of socketable SOM featuring
+ LX2160A system-on-chip variants. MBLX2160A mainboard can be used a
+ starterkit.
+ items:
+ - enum:
+ - tq,lx2160a-tqmlx2160a-mblx2160a
+ - const: tq,lx2160a-tqmlx2160a
+ - const: fsl,lx2160a
+
- description: S32G2 based Boards
items:
- enum:
diff --git a/sys/contrib/device-tree/Bindings/arm/google.yaml b/sys/contrib/device-tree/Bindings/arm/google.yaml
new file mode 100644
index 000000000000..e20b5c9b16bc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/arm/google.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/google.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google Tensor platforms
+
+maintainers:
+ - Peter Griffin <peter.griffin@linaro.org>
+
+description: |
+ ARM platforms using SoCs designed by Google branded "Tensor" used in Pixel
+ devices.
+
+ Currently upstream this is devices using "gs101" SoC which is found in Pixel
+ 6, Pixel 6 Pro and Pixel 6a.
+
+ Google have a few different names for the SoC:
+ - Marketing name ("Tensor")
+ - Codename ("Whitechapel")
+ - SoC ID ("gs101")
+ - Die ID ("S5P9845")
+
+ Likewise there are a couple of names for the actual device
+ - Marketing name ("Pixel 6")
+ - Codename ("Oriole")
+
+ Devicetrees should use the lowercased SoC ID and lowercased board codename,
+ e.g. gs101 and gs101-oriole.
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: Google Pixel 6 / Oriole
+ items:
+ - enum:
+ - google,gs101-oriole
+ - const: google,gs101
+
+ # Bootloader requires empty ect node to be present
+ ect:
+ type: object
+ additionalProperties: false
+
+required:
+ - ect
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/cpuctrl.yaml b/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/cpuctrl.yaml
index 528dad4cde3c..4fc208d3995e 100644
--- a/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/cpuctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/cpuctrl.yaml
@@ -29,6 +29,26 @@ properties:
ranges: true
+patternProperties:
+ "^clock@[0-9a-f]+$":
+ type: object
+ additionalProperties: false
+
+ properties:
+ compatible:
+ const: hisilicon,hix5hd2-clock
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+
+ required:
+ - compatible
+ - reg
+ - "#clock-cells"
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/sysctrl.yaml b/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/sysctrl.yaml
index 5a53d433b6f0..7a221e1c09df 100644
--- a/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/sysctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/hisilicon/controller/sysctrl.yaml
@@ -82,6 +82,23 @@ properties:
ranges: true
+patternProperties:
+ '^clock@':
+ type: object
+ additionalProperties: false
+
+ properties:
+ compatible:
+ enum:
+ - hisilicon,hi3620-clock
+ - hisilicon,hi3620-mmc-clock
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/arm/intel,socfpga.yaml b/sys/contrib/device-tree/Bindings/arm/intel,socfpga.yaml
index 4b4dcf551eb6..2ee0c740eb56 100644
--- a/sys/contrib/device-tree/Bindings/arm/intel,socfpga.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/intel,socfpga.yaml
@@ -21,6 +21,11 @@ properties:
- intel,socfpga-agilex-n6000
- intel,socfpga-agilex-socdk
- const: intel,socfpga-agilex
+ - description: Agilex5 boards
+ items:
+ - enum:
+ - intel,socfpga-agilex5-socdk
+ - const: intel,socfpga-agilex5
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/arm/intel-ixp4xx.yaml b/sys/contrib/device-tree/Bindings/arm/intel-ixp4xx.yaml
index 553dcbc70e35..d60792b1d995 100644
--- a/sys/contrib/device-tree/Bindings/arm/intel-ixp4xx.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/intel-ixp4xx.yaml
@@ -16,12 +16,28 @@ properties:
oneOf:
- items:
- enum:
+ - adieng,coyote
+ - arcom,vulcan
+ - dlink,dsm-g600-a
+ - freecom,fsg-3
+ - gateway,7001
+ - gateworks,gw2348
+ - goramo,multilink-router
+ - intel,ixdp425
+ - intel,ixdpg425
+ - iom,nas-100d
- linksys,nslu2
+ - netgear,wg302v1
+ - netgear,wg302v2
+ - usr,8200
- welltech,epbx100
+ - linksys,wrv54g
+ - gemtek,gtwx5715
- const: intel,ixp42x
- items:
- enum:
- gateworks,gw2358
+ - intel,kixrp435
- const: intel,ixp43x
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/arm/keystone/ti,k3-sci-common.yaml b/sys/contrib/device-tree/Bindings/arm/keystone/ti,k3-sci-common.yaml
index ff378d5cbd32..4a323e8c785d 100644
--- a/sys/contrib/device-tree/Bindings/arm/keystone/ti,k3-sci-common.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/keystone/ti,k3-sci-common.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/keystone/ti,k3-sci-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/arm/keystone/ti,sci.yaml b/sys/contrib/device-tree/Bindings/arm/keystone/ti,sci.yaml
index 86b59de7707e..c24ad0968f3e 100644
--- a/sys/contrib/device-tree/Bindings/arm/keystone/ti,sci.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/keystone/ti,sci.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/keystone/ti,sci.yaml#
diff --git a/sys/contrib/device-tree/Bindings/arm/marvell/armada-7k-8k.yaml b/sys/contrib/device-tree/Bindings/arm/marvell/armada-7k-8k.yaml
index 52d78521e412..16d2e132d3d1 100644
--- a/sys/contrib/device-tree/Bindings/arm/marvell/armada-7k-8k.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/marvell/armada-7k-8k.yaml
@@ -60,4 +60,26 @@ properties:
- const: marvell,armada-ap807-quad
- const: marvell,armada-ap807
+ - description:
+ Alleycat5X (98DX35xx) Reference Design as COM Express Carrier plus
+ Armada CN9130 COM Express CPU module
+ items:
+ - const: marvell,cn9130-ac5x-carrier
+ - const: marvell,rd-ac5x-carrier
+ - const: marvell,cn9130-cpu-module
+ - const: marvell,cn9130
+ - const: marvell,armada-ap807-quad
+ - const: marvell,armada-ap807
+
+ - description:
+ Alleycat5X (98DX35xx) Reference Design as COM Express Carrier plus
+ Armada CN9131 COM Express CPU module
+ items:
+ - const: marvell,cn9131-ac5x-carrier
+ - const: marvell,rd-ac5x-carrier
+ - const: marvell,cn9131-cpu-module
+ - const: marvell,cn9131
+ - const: marvell,armada-ap807-quad
+ - const: marvell,armada-ap807
+
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/arm/marvell/cp110-system-controller.txt b/sys/contrib/device-tree/Bindings/arm/marvell/cp110-system-controller.txt
index d84105c7c935..9d5d70c98058 100644
--- a/sys/contrib/device-tree/Bindings/arm/marvell/cp110-system-controller.txt
+++ b/sys/contrib/device-tree/Bindings/arm/marvell/cp110-system-controller.txt
@@ -21,13 +21,13 @@ The Device Tree node representing this System Controller 0 provides a
number of clocks:
- a set of core clocks
- - a set of gatable clocks
+ - a set of gateable clocks
Those clocks can be referenced by other Device Tree nodes using two
cells:
- The first cell must be 0 or 1. 0 for the core clocks and 1 for the
- gatable clocks.
- - The second cell identifies the particular core clock or gatable
+ gateable clocks.
+ - The second cell identifies the particular core clock or gateable
clocks.
The following clocks are available:
@@ -38,7 +38,7 @@ The following clocks are available:
- 0 3 Core
- 0 4 NAND core
- 0 5 SDIO core
- - Gatable clocks
+ - Gateable clocks
- 1 0 Audio
- 1 1 Comm Unit
- 1 2 NAND
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek.yaml b/sys/contrib/device-tree/Bindings/arm/mediatek.yaml
index ae12b1cab9fb..6f2f64ae76fc 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek.yaml
@@ -133,11 +133,22 @@ properties:
- enum:
- mediatek,mt8183-evb
- const: mediatek,mt8183
+ - description: Google Hayato rev5
+ items:
+ - const: google,hayato-rev5-sku2
+ - const: google,hayato-sku2
+ - const: google,hayato
+ - const: mediatek,mt8192
- description: Google Hayato
items:
- const: google,hayato-rev1
- const: google,hayato
- const: mediatek,mt8192
+ - description: Google Spherion rev4 (Acer Chromebook 514)
+ items:
+ - const: google,spherion-rev4
+ - const: google,spherion
+ - const: mediatek,mt8192
- description: Google Spherion (Acer Chromebook 514)
items:
- const: google,spherion-rev3
@@ -165,6 +176,10 @@ properties:
- const: mediatek,mt8186
- items:
- enum:
+ - mediatek,mt8188-evb
+ - const: mediatek,mt8188
+ - items:
+ - enum:
- mediatek,mt8192-evb
- const: mediatek,mt8192
- items:
@@ -224,6 +239,13 @@ properties:
items:
- const: google,kappa
- const: mediatek,mt8183
+ - description: Google Katsu (ASUS Chromebook Detachable CZ1)
+ items:
+ - enum:
+ - google,katsu-sku32
+ - google,katsu-sku38
+ - const: google,katsu
+ - const: mediatek,mt8183
- description: Google Kodama (Lenovo 10e Chromebook Tablet)
items:
- enum:
@@ -233,6 +255,20 @@ properties:
- google,kodama-sku32
- const: google,kodama
- const: mediatek,mt8183
+ - description: Google Makomo (Lenovo 100e Chromebook 2nd Gen MTK 2)
+ items:
+ - enum:
+ - google,makomo-sku0
+ - google,makomo-sku1
+ - const: google,makomo
+ - const: mediatek,mt8183
+ - description: Google Pico (Acer Chromebook Spin 311)
+ items:
+ - enum:
+ - google,pico-sku1
+ - google,pico-sku2
+ - const: google,pico
+ - const: mediatek,mt8183
- description: Google Willow (Acer Chromebook 311 C722/C722T)
items:
- enum:
@@ -250,6 +286,11 @@ properties:
- const: mediatek,mt8365
- items:
- enum:
+ - mediatek,mt8395-evk
+ - const: mediatek,mt8395
+ - const: mediatek,mt8195
+ - items:
+ - enum:
- mediatek,mt8516-pumpkin
- const: mediatek,mt8516
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,audsys.yaml b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,audsys.yaml
new file mode 100644
index 000000000000..45d4a6620041
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,audsys.yaml
@@ -0,0 +1,153 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mediatek/mediatek,audsys.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek AUDSYS controller
+
+maintainers:
+ - Eugen Hristev <eugen.hristev@collabora.com>
+
+description:
+ The MediaTek AUDSYS controller provides various clocks to the system.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - mediatek,mt2701-audsys
+ - mediatek,mt6765-audsys
+ - mediatek,mt6779-audsys
+ - mediatek,mt7622-audsys
+ - mediatek,mt8167-audsys
+ - mediatek,mt8173-audsys
+ - mediatek,mt8183-audsys
+ - mediatek,mt8186-audsys
+ - mediatek,mt8192-audsys
+ - mediatek,mt8516-audsys
+ - const: syscon
+ - items:
+ # Special case for mt7623 for backward compatibility
+ - const: mediatek,mt7623-audsys
+ - const: mediatek,mt2701-audsys
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+ audio-controller:
+ $ref: /schemas/sound/mediatek,mt2701-audio.yaml#
+ type: object
+
+required:
+ - compatible
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/power/mt2701-power.h>
+ #include <dt-bindings/clock/mt2701-clk.h>
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ audsys: clock-controller@11220000 {
+ compatible = "mediatek,mt7622-audsys", "syscon";
+ reg = <0 0x11220000 0 0x2000>;
+ #clock-cells = <1>;
+
+ afe: audio-controller {
+ compatible = "mediatek,mt2701-audio";
+ interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "afe", "asys";
+ power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
+
+ clocks = <&infracfg CLK_INFRA_AUDIO>,
+ <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+ <&topckgen CLK_TOP_AUD_48K_TIMING>,
+ <&topckgen CLK_TOP_AUD_44K_TIMING>,
+ <&topckgen CLK_TOP_AUD_K1_SRC_SEL>,
+ <&topckgen CLK_TOP_AUD_K2_SRC_SEL>,
+ <&topckgen CLK_TOP_AUD_K3_SRC_SEL>,
+ <&topckgen CLK_TOP_AUD_K4_SRC_SEL>,
+ <&topckgen CLK_TOP_AUD_K1_SRC_DIV>,
+ <&topckgen CLK_TOP_AUD_K2_SRC_DIV>,
+ <&topckgen CLK_TOP_AUD_K3_SRC_DIV>,
+ <&topckgen CLK_TOP_AUD_K4_SRC_DIV>,
+ <&topckgen CLK_TOP_AUD_I2S1_MCLK>,
+ <&topckgen CLK_TOP_AUD_I2S2_MCLK>,
+ <&topckgen CLK_TOP_AUD_I2S3_MCLK>,
+ <&topckgen CLK_TOP_AUD_I2S4_MCLK>,
+ <&audsys CLK_AUD_I2SO1>,
+ <&audsys CLK_AUD_I2SO2>,
+ <&audsys CLK_AUD_I2SO3>,
+ <&audsys CLK_AUD_I2SO4>,
+ <&audsys CLK_AUD_I2SIN1>,
+ <&audsys CLK_AUD_I2SIN2>,
+ <&audsys CLK_AUD_I2SIN3>,
+ <&audsys CLK_AUD_I2SIN4>,
+ <&audsys CLK_AUD_ASRCO1>,
+ <&audsys CLK_AUD_ASRCO2>,
+ <&audsys CLK_AUD_ASRCO3>,
+ <&audsys CLK_AUD_ASRCO4>,
+ <&audsys CLK_AUD_AFE>,
+ <&audsys CLK_AUD_AFE_CONN>,
+ <&audsys CLK_AUD_A1SYS>,
+ <&audsys CLK_AUD_A2SYS>,
+ <&audsys CLK_AUD_AFE_MRGIF>;
+
+ clock-names = "infra_sys_audio_clk",
+ "top_audio_mux1_sel",
+ "top_audio_mux2_sel",
+ "top_audio_a1sys_hp",
+ "top_audio_a2sys_hp",
+ "i2s0_src_sel",
+ "i2s1_src_sel",
+ "i2s2_src_sel",
+ "i2s3_src_sel",
+ "i2s0_src_div",
+ "i2s1_src_div",
+ "i2s2_src_div",
+ "i2s3_src_div",
+ "i2s0_mclk_en",
+ "i2s1_mclk_en",
+ "i2s2_mclk_en",
+ "i2s3_mclk_en",
+ "i2so0_hop_ck",
+ "i2so1_hop_ck",
+ "i2so2_hop_ck",
+ "i2so3_hop_ck",
+ "i2si0_hop_ck",
+ "i2si1_hop_ck",
+ "i2si2_hop_ck",
+ "i2si3_hop_ck",
+ "asrc0_out_ck",
+ "asrc1_out_ck",
+ "asrc2_out_ck",
+ "asrc3_out_ck",
+ "audio_afe_pd",
+ "audio_afe_conn_pd",
+ "audio_a1sys_pd",
+ "audio_a2sys_pd",
+ "audio_mrgif_pd";
+
+ assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX1_DIV>,
+ <&topckgen CLK_TOP_AUD_MUX2_DIV>;
+ assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
+ <&topckgen CLK_TOP_AUD2PLL_90M>;
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,infracfg.yaml b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,infracfg.yaml
index ea98043c6ba3..230b5188a88d 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,infracfg.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,infracfg.yaml
@@ -30,6 +30,7 @@ properties:
- mediatek,mt7629-infracfg
- mediatek,mt7981-infracfg
- mediatek,mt7986-infracfg
+ - mediatek,mt7988-infracfg
- mediatek,mt8135-infracfg
- mediatek,mt8167-infracfg
- mediatek,mt8173-infracfg
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mipi0a.txt b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mipi0a.txt
index 8be5978f388d..1c671943ce4d 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mipi0a.txt
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mipi0a.txt
@@ -16,7 +16,7 @@ The available clocks are defined in dt-bindings/clock/mt*-clk.h.
The mipi0a controller also uses the common power domain from
Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
-The available power doamins are defined in dt-bindings/power/mt*-power.h.
+The available power domains are defined in dt-bindings/power/mt*-power.h.
Example:
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mmsys.yaml b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mmsys.yaml
index 536f5a5ebd24..b3c6888c1457 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mmsys.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mmsys.yaml
@@ -32,6 +32,9 @@ properties:
- mediatek,mt8183-mmsys
- mediatek,mt8186-mmsys
- mediatek,mt8188-vdosys0
+ - mediatek,mt8188-vdosys1
+ - mediatek,mt8188-vppsys0
+ - mediatek,mt8188-vppsys1
- mediatek,mt8192-mmsys
- mediatek,mt8195-vdosys1
- mediatek,mt8195-vppsys0
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml
index 28ded09d72e3..e7720caf31b3 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml
@@ -22,6 +22,7 @@ properties:
- mediatek,mt7622-wed
- mediatek,mt7981-wed
- mediatek,mt7986-wed
+ - mediatek,mt7988-wed
- const: syscon
reg:
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,pericfg.yaml b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,pericfg.yaml
index 26158d0d72f3..33c94c491828 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,pericfg.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,pericfg.yaml
@@ -28,6 +28,7 @@ properties:
- mediatek,mt8173-pericfg
- mediatek,mt8183-pericfg
- mediatek,mt8186-pericfg
+ - mediatek,mt8188-pericfg
- mediatek,mt8195-pericfg
- mediatek,mt8516-pericfg
- const: syscon
diff --git a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,vcodecsys.txt b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,vcodecsys.txt
index c877bcc1a5c5..f090147b7f1e 100644
--- a/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,vcodecsys.txt
+++ b/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,vcodecsys.txt
@@ -15,7 +15,7 @@ The available clocks are defined in dt-bindings/clock/mt*-clk.h.
The vcodecsys controller also uses the common power domain from
Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
-The available power doamins are defined in dt-bindings/power/mt*-power.h.
+The available power domains are defined in dt-bindings/power/mt*-power.h.
Example:
diff --git a/sys/contrib/device-tree/Bindings/arm/mstar/mstar,l3bridge.yaml b/sys/contrib/device-tree/Bindings/arm/mstar/mstar,l3bridge.yaml
index 6816bd68f9cf..a8ac4a2d672d 100644
--- a/sys/contrib/device-tree/Bindings/arm/mstar/mstar,l3bridge.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mstar/mstar,l3bridge.yaml
@@ -2,8 +2,8 @@
# Copyright 2020 thingy.jp.
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/mstar/mstar,l3bridge.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/mstar/mstar,l3bridge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MStar/SigmaStar Armv7 SoC l3bridge
diff --git a/sys/contrib/device-tree/Bindings/arm/mstar/mstar,smpctrl.yaml b/sys/contrib/device-tree/Bindings/arm/mstar/mstar,smpctrl.yaml
index 599c65980f5d..5739848000b1 100644
--- a/sys/contrib/device-tree/Bindings/arm/mstar/mstar,smpctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/mstar/mstar,smpctrl.yaml
@@ -2,8 +2,8 @@
# Copyright 2020 thingy.jp.
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/mstar/mstar,smpctrl.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/mstar/mstar,smpctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MStar/SigmaStar Armv7 SoC SMP control registers
diff --git a/sys/contrib/device-tree/Bindings/arm/omap/ctrl.txt b/sys/contrib/device-tree/Bindings/arm/omap/ctrl.txt
index f35b77920786..0ce6665df4a2 100644
--- a/sys/contrib/device-tree/Bindings/arm/omap/ctrl.txt
+++ b/sys/contrib/device-tree/Bindings/arm/omap/ctrl.txt
@@ -8,7 +8,7 @@ control module driver itself.
See [2] for documentation about clock/clockdomain nodes.
-[1] Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
+[1] Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml
[2] Documentation/devicetree/bindings/clock/ti/*
Required properties:
diff --git a/sys/contrib/device-tree/Bindings/arm/omap/omap.txt b/sys/contrib/device-tree/Bindings/arm/omap/omap.txt
index fa8b31660cad..c863ec07cbbb 100644
--- a/sys/contrib/device-tree/Bindings/arm/omap/omap.txt
+++ b/sys/contrib/device-tree/Bindings/arm/omap/omap.txt
@@ -41,14 +41,6 @@ SoC Type (optional):
SoC Families:
-- OMAP2 generic - defaults to OMAP2420
- compatible = "ti,omap2"
-- OMAP3 generic
- compatible = "ti,omap3"
-- OMAP4 generic - defaults to OMAP4430
- compatible = "ti,omap4"
-- OMAP5 generic - defaults to OMAP5430
- compatible = "ti,omap5"
- DRA7 generic - defaults to DRA742
compatible = "ti,dra7"
- AM33x generic
@@ -58,32 +50,6 @@ SoC Families:
SoCs:
-- OMAP2420
- compatible = "ti,omap2420", "ti,omap2"
-- OMAP2430
- compatible = "ti,omap2430", "ti,omap2"
-
-- OMAP3430
- compatible = "ti,omap3430", "ti,omap3"
- legacy: "ti,omap34xx" - please do not use any more
-- AM3517
- compatible = "ti,am3517", "ti,omap3"
-- OMAP3630
- compatible = "ti,omap3630", "ti,omap3"
- legacy: "ti,omap36xx" - please do not use any more
-- AM335x
- compatible = "ti,am33xx"
-
-- OMAP4430
- compatible = "ti,omap4430", "ti,omap4"
-- OMAP4460
- compatible = "ti,omap4460", "ti,omap4"
-
-- OMAP5430
- compatible = "ti,omap5430", "ti,omap5"
-- OMAP5432
- compatible = "ti,omap5432", "ti,omap5"
-
- DRA762
compatible = "ti,dra762", "ti,dra7"
@@ -116,65 +82,6 @@ SoCs:
Boards (incomplete list of examples):
-- OMAP3 BeagleBoard : Low cost community board
- compatible = "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
-
-- OMAP3 BeagleBoard A to B4 : Early BeagleBoard revisions A to B4 with a timer quirk
- compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
-
-- OMAP3 Tobi with Overo : Commercial expansion board with daughter board
- compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3430", "ti,omap3"
-
-- OMAP4 SDP : Software Development Board
- compatible = "ti,omap4-sdp", "ti,omap4430", "ti,omap4"
-
-- OMAP4 PandaBoard : Low cost community board
- compatible = "ti,omap4-panda", "ti,omap4430", "ti,omap4"
-
-- OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board
- compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4";
-
-- OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
- compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
-
-- OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen
- compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
-
-- OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
- compatible = "ti,omap3-evm", "ti,omap3630", "ti,omap3"
-
-- AM335X EVM : Software Development Board for AM335x
- compatible = "ti,am335x-evm", "ti,am33xx"
-
-- AM335X Bone : Low cost community board
- compatible = "ti,am335x-bone", "ti,am33xx"
-
-- AM3359 ICEv2 : Low cost Industrial Communication Engine EVM.
- compatible = "ti,am3359-icev2", "ti,am33xx"
-
-- AM335X OrionLXm : Substation Automation Platform
- compatible = "novatech,am335x-lxm", "ti,am33xx"
-
-- AM335X phyBOARD-WEGA: Single Board Computer dev kit
- compatible = "phytec,am335x-wega", "phytec,am335x-phycore-som", "ti,am33xx"
-
-- AM335X CM-T335 : System On Module, built around the Sitara AM3352/4
- compatible = "compulab,cm-t335", "ti,am33xx"
-
-- AM335X SBC-T335 : single board computer, built around the Sitara AM3352/4
- compatible = "compulab,sbc-t335", "compulab,cm-t335", "ti,am33xx"
-
-- AM335X phyCORE-AM335x: Development kit
- compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx"
-
-- AM335x phyBOARD-REGOR: Single Board Computer
- compatible = "phytec,am335x-regor", "phytec,am335x-phycore-som", "ti,am33xx"
-
-- AM335X UC-8100-ME-T: Communication-centric industrial computing platform
- compatible = "moxa,uc-8100-me-t", "ti,am33xx";
-
-- OMAP5 EVM : Evaluation Module
- compatible = "ti,omap5-evm", "ti,omap5"
- AM437x CM-T43
compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
@@ -217,9 +124,3 @@ Boards (incomplete list of examples):
- DRA718 EVM: Software Development Board for DRA718
compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
-
-- DM3730 Logic PD Torpedo + Wireless: Commercial System on Module with WiFi and Bluetooth
- compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3"
-
-- DM3730 Logic PD SOM-LV: Commercial System on Module with WiFi and Bluetooth
- compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3"
diff --git a/sys/contrib/device-tree/Bindings/arm/pmu.yaml b/sys/contrib/device-tree/Bindings/arm/pmu.yaml
index e14358bf0b9c..99b5e9530707 100644
--- a/sys/contrib/device-tree/Bindings/arm/pmu.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/pmu.yaml
@@ -49,9 +49,14 @@ properties:
- arm,cortex-a77-pmu
- arm,cortex-a78-pmu
- arm,cortex-a510-pmu
+ - arm,cortex-a520-pmu
- arm,cortex-a710-pmu
+ - arm,cortex-a715-pmu
+ - arm,cortex-a720-pmu
- arm,cortex-x1-pmu
- arm,cortex-x2-pmu
+ - arm,cortex-x3-pmu
+ - arm,cortex-x4-pmu
- arm,neoverse-e1-pmu
- arm,neoverse-n1-pmu
- arm,neoverse-n2-pmu
diff --git a/sys/contrib/device-tree/Bindings/arm/psci.yaml b/sys/contrib/device-tree/Bindings/arm/psci.yaml
index 0c5381e081bd..cbb012e217ab 100644
--- a/sys/contrib/device-tree/Bindings/arm/psci.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/psci.yaml
@@ -101,6 +101,7 @@ properties:
patternProperties:
"^power-domain-":
$ref: /schemas/power/power-domain.yaml#
+ unevaluatedProperties: false
type: object
description: |
diff --git a/sys/contrib/device-tree/Bindings/arm/qcom,coresight-remote-etm.yaml b/sys/contrib/device-tree/Bindings/arm/qcom,coresight-remote-etm.yaml
new file mode 100644
index 000000000000..4fd5752978cd
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/arm/qcom,coresight-remote-etm.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-remote-etm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Coresight Remote ETM(Embedded Trace Macrocell)
+
+maintainers:
+ - Jinlong Mao <quic_jinlmao@quicinc.com>
+ - Tao Zhang <quic_taozha@quicinc.com>
+
+description:
+ Support for ETM trace collection on remote processor using coresight
+ framework. Enabling this will allow turning on ETM tracing on remote
+ processor like modem processor via sysfs and collecting the trace
+ via coresight TMC sinks.
+
+properties:
+ compatible:
+ const: qcom,coresight-remote-etm
+
+ out-ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ additionalProperties: false
+
+ properties:
+ port:
+ description: Output connection to the CoreSight Trace bus.
+ $ref: /schemas/graph.yaml#/properties/port
+
+required:
+ - compatible
+ - out-ports
+
+additionalProperties: false
+
+examples:
+ - |
+ etm {
+ compatible = "qcom,coresight-remote-etm";
+
+ out-ports {
+ port {
+ modem_etm0_out_funnel_modem: endpoint {
+ remote-endpoint = <&funnel_modem_in_modem_etm0>;
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpda.yaml b/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpda.yaml
index 2ec9b5b24d73..ea3c5db6b52d 100644
--- a/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpda.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpda.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
%YAML 1.2
---
diff --git a/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpdm.yaml b/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpdm.yaml
index 5c08342664ea..61ddc3b5b247 100644
--- a/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpdm.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpdm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
%YAML 1.2
---
@@ -44,6 +44,23 @@ properties:
minItems: 1
maxItems: 2
+ qcom,dsb-element-size:
+ description:
+ Specifies the DSB(Discrete Single Bit) element size supported by
+ the monitor. The associated aggregator will read this size before it
+ is enabled. DSB element size currently only supports 32-bit and 64-bit.
+ $ref: /schemas/types.yaml#/definitions/uint8
+ enum: [32, 64]
+
+ qcom,dsb-msrs-num:
+ description:
+ Specifies the number of DSB(Discrete Single Bit) MSR(mux select register)
+ registers supported by the monitor. If this property is not configured
+ or set to 0, it means this DSB TPDM doesn't support MSR.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 32
+
clocks:
maxItems: 1
@@ -77,6 +94,9 @@ examples:
compatible = "qcom,coresight-tpdm", "arm,primecell";
reg = <0x0684c000 0x1000>;
+ qcom,dsb-element-size = /bits/ 8 <32>;
+ qcom,dsb-msrs-num = <16>;
+
clocks = <&aoss_qmp>;
clock-names = "apb_pclk";
diff --git a/sys/contrib/device-tree/Bindings/arm/qcom-soc.yaml b/sys/contrib/device-tree/Bindings/arm/qcom-soc.yaml
index e333ec4a9c5f..d0751a572af3 100644
--- a/sys/contrib/device-tree/Bindings/arm/qcom-soc.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/qcom-soc.yaml
@@ -23,7 +23,7 @@ description: |
select:
properties:
compatible:
- pattern: "^qcom,.*(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
+ pattern: "^qcom,.*(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1e)[0-9]+.*$"
required:
- compatible
@@ -31,17 +31,17 @@ properties:
compatible:
oneOf:
# Preferred naming style for compatibles of SoC components:
- - pattern: "^qcom,(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+-.*$"
+ - pattern: "^qcom,(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1e)[0-9]+(pro)?-.*$"
- pattern: "^qcom,(sa|sc)8[0-9]+[a-z][a-z]?-.*$"
# Legacy namings - variations of existing patterns/compatibles are OK,
# but do not add completely new entries to these:
- - pattern: "^qcom,[ak]pss-wdt-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
- - pattern: "^qcom,gcc-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
- - pattern: "^qcom,mmcc-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
- - pattern: "^qcom,pcie-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
- - pattern: "^qcom,rpm-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
- - pattern: "^qcom,scm-(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+.*$"
+ - pattern: "^qcom,[ak]pss-wdt-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$"
+ - pattern: "^qcom,gcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$"
+ - pattern: "^qcom,mmcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$"
+ - pattern: "^qcom,pcie-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1e)[0-9]+.*$"
+ - pattern: "^qcom,rpm-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$"
+ - pattern: "^qcom,scm-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1e)[0-9]+.*$"
- enum:
- qcom,dsi-ctrl-6g-qcm2290
- qcom,gpucc-sdm630
diff --git a/sys/contrib/device-tree/Bindings/arm/qcom.yaml b/sys/contrib/device-tree/Bindings/arm/qcom.yaml
index 450f616774e0..1a5fb889a444 100644
--- a/sys/contrib/device-tree/Bindings/arm/qcom.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/qcom.yaml
@@ -30,6 +30,7 @@ description: |
apq8084
apq8096
ipq4018
+ ipq5018
ipq5332
ipq6018
ipq8074
@@ -49,6 +50,7 @@ description: |
msm8998
qcs404
qcm2290
+ qcm6490
qdu1000
qrb2210
qrb4210
@@ -72,39 +74,31 @@ description: |
sdx65
sdx75
sm4250
+ sm4450
sm6115
sm6115p
sm6125
sm6350
sm6375
+ sm7125
sm7225
sm8150
sm8250
sm8350
sm8450
sm8550
+ sm8650
+ x1e80100
The 'board' element must be one of the following strings:
adp
- ap-al02-c2
- ap-al02-c6
- ap-al02-c7
- ap-al02-c8
- ap-al02-c9
- ap-mi01.2
- ap-mi01.3
- ap-mi01.6
- ap-mi01.9
cdp
- cp01-c1
dragonboard
- hk01
- hk10-c1
- hk10-c2
idp
liquid
mtp
+ qcp
qrd
rb2
ride
@@ -133,7 +127,7 @@ description: |
There are many devices in the list below that run the standard ChromeOS
bootloader setup and use the open source depthcharge bootloader to boot the
OS. These devices do not use the scheme described above. For details, see:
- https://docs.kernel.org/arm/google/chromebook-boot-flow.html
+ https://docs.kernel.org/arch/arm/google/chromebook-boot-flow.html
properties:
$nodename:
@@ -181,11 +175,26 @@ properties:
- items:
- enum:
+ - microsoft,dempsey
+ - microsoft,makepeace
+ - microsoft,moneypenny
- samsung,s3ve3g
- const: qcom,msm8226
- items:
- enum:
+ - htc,memul
+ - microsoft,superman-lte
+ - microsoft,tesla
+ - motorola,peregrine
+ - const: qcom,msm8926
+ - const: qcom,msm8226
+
+ - items:
+ - enum:
+ - huawei,kiwi
+ - longcheer,l9100
+ - samsung,a7
- sony,kanuti-tulip
- square,apq8039-t2
- const: qcom,msm8939
@@ -341,6 +350,11 @@ properties:
- items:
- enum:
+ - qcom,ipq5018-rdp432-c2
+ - const: qcom,ipq5018
+
+ - items:
+ - enum:
- qcom,ipq5332-ap-mi01.2
- qcom,ipq5332-ap-mi01.3
- qcom,ipq5332-ap-mi01.6
@@ -382,6 +396,13 @@ properties:
- const: qcom,qrb2210
- const: qcom,qcm2290
+ - items:
+ - enum:
+ - fairphone,fp5
+ - qcom,qcm6490-idp
+ - qcom,qcs6490-rb3gen2
+ - const: qcom,qcm6490
+
- description: Qualcomm Technologies, Inc. Distributed Unit 1000 platform
items:
- enum:
@@ -470,6 +491,11 @@ properties:
- const: google,lazor-rev8
- const: qcom,sc7180
+ - description: Acer Chromebook Spin 513 (rev9)
+ items:
+ - const: google,lazor-rev9
+ - const: qcom,sc7180
+
- description: Acer Chromebook Spin 513 (newest rev)
items:
- const: google,lazor
@@ -491,6 +517,11 @@ properties:
- const: google,lazor-rev8-sku2
- const: qcom,sc7180
+ - description: Acer Chromebook Spin 513 with KB Backlight (rev9)
+ items:
+ - const: google,lazor-rev9-sku2
+ - const: qcom,sc7180
+
- description: Acer Chromebook Spin 513 with KB Backlight (newest rev)
items:
- const: google,lazor-sku2
@@ -512,9 +543,16 @@ properties:
- const: google,lazor-rev8-sku0
- const: qcom,sc7180
+ - description: Acer Chromebook Spin 513 with LTE (rev9)
+ items:
+ - const: google,lazor-rev9-sku0
+ - const: google,lazor-rev9-sku10
+ - const: qcom,sc7180
+
- description: Acer Chromebook Spin 513 with LTE (newest rev)
items:
- const: google,lazor-sku0
+ - const: google,lazor-sku10
- const: qcom,sc7180
- description: Acer Chromebook 511 (rev4 - rev8)
@@ -526,9 +564,16 @@ properties:
- const: google,lazor-rev8-sku4
- const: qcom,sc7180
+ - description: Acer Chromebook 511 (rev9)
+ items:
+ - const: google,lazor-rev9-sku4
+ - const: google,lazor-rev9-sku15
+ - const: qcom,sc7180
+
- description: Acer Chromebook 511 (newest rev)
items:
- const: google,lazor-sku4
+ - const: google,lazor-sku15
- const: qcom,sc7180
- description: Acer Chromebook 511 without Touchscreen (rev4)
@@ -545,9 +590,16 @@ properties:
- const: google,lazor-rev8-sku6
- const: qcom,sc7180
+ - description: Acer Chromebook 511 without Touchscreen (rev9)
+ items:
+ - const: google,lazor-rev9-sku6
+ - const: google,lazor-rev9-sku18
+ - const: qcom,sc7180
+
- description: Acer Chromebook 511 without Touchscreen (newest rev)
items:
- const: google,lazor-sku6
+ - const: google,lazor-sku18
- const: qcom,sc7180
- description: Google Mrbland with AUO panel (rev0)
@@ -904,6 +956,11 @@ properties:
- items:
- enum:
+ - qcom,sm4450-qrd
+ - const: qcom,sm4450
+
+ - items:
+ - enum:
- fxtec,pro1x
- const: qcom,sm6115
@@ -931,6 +988,11 @@ properties:
- items:
- enum:
+ - xiaomi,joyeuse
+ - const: qcom,sm7125
+
+ - items:
+ - enum:
- fairphone,fp4
- const: qcom,sm7225
@@ -951,6 +1013,7 @@ properties:
- sony,pdx203-generic
- sony,pdx206-generic
- xiaomi,elish
+ - xiaomi,pipa
- const: qcom,sm8250
- items:
@@ -976,6 +1039,18 @@ properties:
- qcom,sm8550-qrd
- const: qcom,sm8550
+ - items:
+ - enum:
+ - qcom,sm8650-mtp
+ - qcom,sm8650-qrd
+ - const: qcom,sm8650
+
+ - items:
+ - enum:
+ - qcom,x1e80100-crd
+ - qcom,x1e80100-qcp
+ - const: qcom,x1e80100
+
# Board compatibles go above
qcom,msm-id:
@@ -1072,6 +1147,7 @@ allOf:
- qcom,sm6115
- qcom,sm6125
- qcom,sm6350
+ - qcom,sm7125
- qcom,sm7225
- qcom,sm8150
- qcom,sm8250
diff --git a/sys/contrib/device-tree/Bindings/arm/rockchip.yaml b/sys/contrib/device-tree/Bindings/arm/rockchip.yaml
index ecdb72a519cb..5cf5cbef2cf5 100644
--- a/sys/contrib/device-tree/Bindings/arm/rockchip.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/rockchip.yaml
@@ -30,9 +30,11 @@ properties:
- const: amarula,vyasa-rk3288
- const: rockchip,rk3288
- - description: Anbernic RG351M
+ - description: Anbernic RK3326 Handheld Gaming Console
items:
- - const: anbernic,rg351m
+ - enum:
+ - anbernic,rg351m
+ - anbernic,rg351v
- const: rockchip,rk3326
- description: Anbernic RG353P
@@ -95,22 +97,30 @@ properties:
- const: chipspark,rayeager-px2
- const: rockchip,rk3066a
+ - description: Cool Pi Compute Module 5(CM5) EVB
+ items:
+ - enum:
+ - coolpi,pi-cm5-evb
+ - const: coolpi,pi-cm5
+ - const: rockchip,rk3588
+
+ - description: Cool Pi 4 Model B
+ items:
+ - const: coolpi,pi-4b
+ - const: rockchip,rk3588s
+
- description: Edgeble Neural Compute Module 2(Neu2) SoM based boards
items:
- const: edgeble,neural-compute-module-2-io # Edgeble Neural Compute Module 2 IO Board
- const: edgeble,neural-compute-module-2 # Edgeble Neural Compute Module 2 SoM
- const: rockchip,rv1126
- - description: Edgeble Neural Compute Module 6(Neu6) Model A SoM based boards
- items:
- - const: edgeble,neural-compute-module-6a-io # Edgeble Neural Compute Module 6A IO Board
- - const: edgeble,neural-compute-module-6a # Edgeble Neural Compute Module 6A SoM
- - const: rockchip,rk3588
-
- - description: Edgeble Neural Compute Module 6(Neu6) Model B SoM based boards
+ - description: Edgeble Neural Compute Module 6(Neu6) SoM based boards
items:
- - const: edgeble,neural-compute-module-6b-io # Edgeble Neural Compute Module 6B IO Board
- - const: edgeble,neural-compute-module-6b # Edgeble Neural Compute Module 6B SoM
+ - const: edgeble,neural-compute-module-6a-io # Edgeble NCM6A-IO Board
+ - enum:
+ - edgeble,neural-compute-module-6a # Edgeble Neural Compute Module 6A SoM
+ - edgeble,neural-compute-module-6b # Edgeble Neural Compute Module 6B SoM
- const: rockchip,rk3588
- description: Elgin RV1108 R1
@@ -196,6 +206,11 @@ properties:
- const: firefly,rk3566-roc-pc
- const: rockchip,rk3566
+ - description: Firefly Station P2
+ items:
+ - const: firefly,rk3568-roc-pc
+ - const: rockchip,rk3568
+
- description: FriendlyElec NanoPi R2 series boards
items:
- enum:
@@ -222,11 +237,21 @@ properties:
- friendlyarm,nanopi-r5s
- const: rockchip,rk3568
+ - description: FriendlyElec NanoPC T6
+ items:
+ - const: friendlyarm,nanopc-t6
+ - const: rockchip,rk3588
+
- description: GeekBuying GeekBox
items:
- const: geekbuying,geekbox
- const: rockchip,rk3368
+ - description: Geniatech XPI-3128
+ items:
+ - const: geniatech,xpi-3128
+ - const: rockchip,rk3128
+
- description: Google Bob (Asus Chromebook Flip C101PA)
items:
- const: google,bob-rev13
@@ -650,6 +675,11 @@ properties:
- pine64,quartz64-b
- const: rockchip,rk3566
+ - description: Pine64 QuartzPro64
+ items:
+ - const: pine64,quartzpro64
+ - const: rockchip,rk3588
+
- description: Pine64 SoQuartz SoM
items:
- enum:
@@ -659,6 +689,14 @@ properties:
- const: pine64,soquartz
- const: rockchip,rk3566
+ - description: Powkiddy RK3566 Handheld Gaming Console
+ items:
+ - enum:
+ - powkiddy,rgb30
+ - powkiddy,rk2023
+ - powkiddy,x55
+ - const: rockchip,rk3566
+
- description: Radxa Compute Module 3(CM3)
items:
- enum:
@@ -694,6 +732,11 @@ properties:
- const: radxa,rock-4c-plus
- const: rockchip,rk3399
+ - description: Radxa ROCK 4SE
+ items:
+ - const: radxa,rock-4se
+ - const: rockchip,rk3399
+
- description: Radxa ROCK Pi E
items:
- const: radxa,rockpi-e
@@ -850,11 +893,26 @@ properties:
- const: tsd,rk3399-puma-haikou
- const: rockchip,rk3399
+ - description: Theobroma Systems RK3588-SBC Jaguar
+ items:
+ - const: tsd,rk3588-jaguar
+ - const: rockchip,rk3588
+
- description: Tronsmart Orion R68 Meta
items:
- const: tronsmart,orion-r68-meta
- const: rockchip,rk3368
+ - description: Turing RK1
+ items:
+ - const: turing,rk1
+ - const: rockchip,rk3588
+
+ - description: Xunlong Orange Pi 5 Plus
+ items:
+ - const: xunlong,orangepi-5-plus
+ - const: rockchip,rk3588
+
- description: Xunlong Orange Pi R1 Plus / LTS
items:
- enum:
@@ -862,6 +920,11 @@ properties:
- xunlong,orangepi-r1-plus-lts
- const: rockchip,rk3328
+ - description: Xunlong Orange Pi 5
+ items:
+ - const: xunlong,orangepi-5
+ - const: rockchip,rk3588s
+
- description: Zkmagic A95X Z2
items:
- const: zkmagic,a95x-z2
@@ -882,6 +945,13 @@ properties:
- const: rockchip,rk3568-bpi-r2pro
- const: rockchip,rk3568
+ - description: Sonoff iHost Smart Home Hub
+ items:
+ - const: itead,sonoff-ihost
+ - enum:
+ - rockchip,rv1126
+ - rockchip,rv1109
+
additionalProperties: true
...
diff --git a/sys/contrib/device-tree/Bindings/arm/samsung/samsung-boards.yaml b/sys/contrib/device-tree/Bindings/arm/samsung/samsung-boards.yaml
index e3ffd8159ab6..01dcbd8aa703 100644
--- a/sys/contrib/device-tree/Bindings/arm/samsung/samsung-boards.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/samsung/samsung-boards.yaml
@@ -230,6 +230,12 @@ properties:
- samsung,exynosautov9-sadk # Samsung Exynos Auto v9 SADK
- const: samsung,exynosautov9
+ - description: Exynos Auto v920 based boards
+ items:
+ - enum:
+ - samsung,exynosautov920-sadk # Samsung Exynos Auto v920 SADK
+ - const: samsung,exynosautov920
+
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/arm/sprd/sprd.yaml b/sys/contrib/device-tree/Bindings/arm/sprd/sprd.yaml
index eaa67b8e0d6c..40fc3c8b9dce 100644
--- a/sys/contrib/device-tree/Bindings/arm/sprd/sprd.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/sprd/sprd.yaml
@@ -35,6 +35,11 @@ properties:
- sprd,ums512-1h10
- const: sprd,ums512
+ - items:
+ - enum:
+ - sprd,ums9620-2h10
+ - const: sprd,ums9620
+
additionalProperties: true
...
diff --git a/sys/contrib/device-tree/Bindings/arm/sti.yaml b/sys/contrib/device-tree/Bindings/arm/sti.yaml
index 3ca054c64377..842def3e3f2b 100644
--- a/sys/contrib/device-tree/Bindings/arm/sti.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/sti.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/sti.yaml#
@@ -13,13 +13,20 @@ properties:
$nodename:
const: '/'
compatible:
- items:
- - enum:
- - st,stih415
- - st,stih416
- - st,stih407
- - st,stih410
- - st,stih418
+ oneOf:
+ - items:
+ - const: st,stih407-b2120
+ - const: st,stih407
+ - items:
+ - enum:
+ - st,stih410-b2120
+ - st,stih410-b2260
+ - const: st,stih410
+ - items:
+ - enum:
+ - st,stih418-b2199
+ - st,stih418-b2264
+ - const: st,stih418
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/arm/stm32/st,mlahb.yaml b/sys/contrib/device-tree/Bindings/arm/stm32/st,mlahb.yaml
index 2297ad3f4774..d2dce238ff5d 100644
--- a/sys/contrib/device-tree/Bindings/arm/stm32/st,mlahb.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/stm32/st,mlahb.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/stm32/st,mlahb.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/stm32/st,mlahb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 ML-AHB interconnect
diff --git a/sys/contrib/device-tree/Bindings/arm/stm32/st,stm32-syscon.yaml b/sys/contrib/device-tree/Bindings/arm/stm32/st,stm32-syscon.yaml
index b63ff591ef8f..d083d8ad48b7 100644
--- a/sys/contrib/device-tree/Bindings/arm/stm32/st,stm32-syscon.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/stm32/st,stm32-syscon.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/arm/stm32/st,stm32-syscon.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/arm/stm32/st,stm32-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 Platforms System Controller
diff --git a/sys/contrib/device-tree/Bindings/arm/stm32/stm32.yaml b/sys/contrib/device-tree/Bindings/arm/stm32/stm32.yaml
index 4466b455bffa..bc2f43330ae4 100644
--- a/sys/contrib/device-tree/Bindings/arm/stm32/stm32.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/stm32/stm32.yaml
@@ -82,29 +82,19 @@ properties:
- shiratech,stm32mp157a-iot-box # IoT Box
- shiratech,stm32mp157a-stinger96 # Stinger96
- st,stm32mp157c-ed1
+ - st,stm32mp157c-ed1-scmi
- st,stm32mp157a-dk1
+ - st,stm32mp157a-dk1-scmi
- st,stm32mp157c-dk2
+ - st,stm32mp157c-dk2-scmi
- const: st,stm32mp157
- items:
- - const: st,stm32mp157a-dk1-scmi
- - const: st,stm32mp157a-dk1
- - const: st,stm32mp157
- - items:
- - const: st,stm32mp157c-dk2-scmi
- - const: st,stm32mp157c-dk2
- - const: st,stm32mp157
- - items:
- - const: st,stm32mp157c-ed1-scmi
- - const: st,stm32mp157c-ed1
- - const: st,stm32mp157
- - items:
- const: st,stm32mp157c-ev1
- const: st,stm32mp157c-ed1
- const: st,stm32mp157
- items:
- const: st,stm32mp157c-ev1-scmi
- - const: st,stm32mp157c-ev1
- const: st,stm32mp157c-ed1
- const: st,stm32mp157
@@ -143,7 +133,10 @@ properties:
- description: Octavo OSD32MP15x System-in-Package based boards
items:
- enum:
- - lxa,stm32mp157c-mc1 # Linux Automation MC-1
+ - lxa,stm32mp157c-mc1 # Linux Automation MC-1
+ - lxa,stm32mp157c-tac-gen1 # Linux Automation TAC (Generation 1)
+ - lxa,stm32mp157c-tac-gen2 # Linux Automation TAC (Generation 2)
+ - oct,stm32mp157c-osd32-red # Octavo OSD32MP1 RED board
- const: oct,stm32mp15xx-osd32
- enum:
- st,stm32mp157
diff --git a/sys/contrib/device-tree/Bindings/arm/sunxi.yaml b/sys/contrib/device-tree/Bindings/arm/sunxi.yaml
index ee8fdd2da869..a9d8e85565b8 100644
--- a/sys/contrib/device-tree/Bindings/arm/sunxi.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/sunxi.yaml
@@ -51,6 +51,11 @@ properties:
- const: allwinner,parrot
- const: allwinner,sun8i-a33
+ - description: Anbernic RG-Nano
+ items:
+ - const: anbernic,rg-nano
+ - const: allwinner,sun8i-v3s
+
- description: Amarula A64 Relic
items:
- const: amarula,a64-relic
@@ -151,6 +156,17 @@ properties:
- const: roofull,beelink-x2
- const: allwinner,sun8i-h3
+ - description: BigTreeTech Manta M4/8P
+ items:
+ - const: bigtreetech,cb1-manta
+ - const: bigtreetech,cb1
+ - const: allwinner,sun50i-h616
+
+ - description: BigTreeTech Pi
+ items:
+ - const: bigtreetech,pi
+ - const: allwinner,sun50i-h616
+
- description: Chuwi V7 CW0825
items:
- const: chuwi,v7-cw0825
@@ -541,13 +557,13 @@ properties:
- const: msi,primo81
- const: allwinner,sun6i-a31s
- - description: Emlid Neutis N5 Developper Board
+ - description: Emlid Neutis N5 Developer Board
items:
- const: emlid,neutis-n5-devboard
- const: emlid,neutis-n5
- const: allwinner,sun50i-h5
- - description: Emlid Neutis N5H3 Developper Board
+ - description: Emlid Neutis N5H3 Developer Board
items:
- const: emlid,neutis-n5h3-devboard
- const: emlid,neutis-n5h3
@@ -852,6 +868,11 @@ properties:
- const: topwise,a721
- const: allwinner,sun4i-a10
+ - description: Transpeed 8K618-T
+ items:
+ - const: transpeed,8k618-t
+ - const: allwinner,sun50i-h618
+
- description: Utoo P66
items:
- const: utoo,p66
@@ -997,4 +1018,14 @@ properties:
- const: xunlong,orangepi-zero2
- const: allwinner,sun50i-h616
+ - description: Xunlong OrangePi Zero 2W
+ items:
+ - const: xunlong,orangepi-zero2w
+ - const: allwinner,sun50i-h618
+
+ - description: Xunlong OrangePi Zero 3
+ items:
+ - const: xunlong,orangepi-zero3
+ - const: allwinner,sun50i-h618
+
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/arm/ti/k3.yaml b/sys/contrib/device-tree/Bindings/arm/ti/k3.yaml
index 577eee95c893..c6506bccfe88 100644
--- a/sys/contrib/device-tree/Bindings/arm/ti/k3.yaml
+++ b/sys/contrib/device-tree/Bindings/arm/ti/k3.yaml
@@ -25,6 +25,12 @@ properties:
- ti,am62a7-sk
- const: ti,am62a7
+ - description: K3 AM62P5 SoC and Boards
+ items:
+ - enum:
+ - ti,am62p5-sk
+ - const: ti,am62p5
+
- description: K3 AM625 SoC PHYTEC phyBOARD-Lyra
items:
- const: phytec,am625-phyboard-lyra-rdk
@@ -44,6 +50,7 @@ properties:
- enum:
- toradex,verdin-am62-nonwifi-dahlia # Verdin AM62 Module on Dahlia
- toradex,verdin-am62-nonwifi-dev # Verdin AM62 Module on Verdin Development Board
+ - toradex,verdin-am62-nonwifi-mallow # Verdin AM62 Module on Mallow
- toradex,verdin-am62-nonwifi-yavia # Verdin AM62 Module on Yavia
- const: toradex,verdin-am62-nonwifi # Verdin AM62 Module without Wi-Fi / BT
- const: toradex,verdin-am62 # Verdin AM62 Module
@@ -54,6 +61,7 @@ properties:
- enum:
- toradex,verdin-am62-wifi-dahlia # Verdin AM62 Wi-Fi / BT Module on Dahlia
- toradex,verdin-am62-wifi-dev # Verdin AM62 Wi-Fi / BT M. on Verdin Development B.
+ - toradex,verdin-am62-wifi-mallow # Verdin AM62 Wi-Fi / BT Module on Mallow
- toradex,verdin-am62-wifi-yavia # Verdin AM62 Wi-Fi / BT Module on Yavia
- const: toradex,verdin-am62-wifi # Verdin AM62 Wi-Fi / BT Module
- const: toradex,verdin-am62 # Verdin AM62 Module
@@ -72,6 +80,13 @@ properties:
- const: phytec,am64-phycore-som
- const: ti,am642
+ - description: K3 AM642 SoC on TQ-Systems TQMaX4XxL SoM
+ items:
+ - enum:
+ - tq,am642-tqma6442l-mbax4xxl # MBaX4XxL base board
+ - const: tq,am642-tqma6442l
+ - const: ti,am642
+
- description: K3 AM654 SoC
items:
- enum:
diff --git a/sys/contrib/device-tree/Bindings/arm/ti/omap.yaml b/sys/contrib/device-tree/Bindings/arm/ti/omap.yaml
new file mode 100644
index 000000000000..93e04a109a12
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/arm/ti/omap.yaml
@@ -0,0 +1,178 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/ti/omap.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OMAP SoC architecture
+
+maintainers:
+ - Tony Lindgren <tony@atomide.com>
+
+description: Platforms based on Texas Instruments OMAP SoC architecture.
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+
+ - description: TI OMAP2420 SoC based platforms
+ items:
+ - enum:
+ - nokia,n800
+ - nokia,n810
+ - nokia,n810-wimax
+ - ti,omap2420-h4
+ - const: ti,omap2420
+ - const: ti,omap2
+
+ - description: TI OMAP2430 SoC based platforms
+ items:
+ - enum:
+ - ti,omap2430-sdp # TI OMAP2430 SDP
+ - const: ti,omap2430
+ - const: ti,omap2
+
+ - description: TI OMAP3430 SoC based platforms
+ items:
+ - enum:
+ - compulab,omap3-cm-t3530
+ - logicpd,dm3730-som-lv-devkit # LogicPD Zoom OMAP35xx SOM-LV Development Kit
+ - logicpd,dm3730-torpedo-devkit # LogicPD Zoom OMAP35xx Torpedo Development Kit
+ - nokia,omap3-n900
+ - openpandora,omap3-pandora-600mhz
+ - ti,omap3430-sdp
+ - ti,omap3-beagle
+ - ti,omap3-evm # TI OMAP35XX EVM (TMDSEVM3530)
+ - ti,omap3-ldp # TI OMAP3430 LDP (Zoom1 Labrador)
+ - timll,omap3-devkit8000
+ - const: ti,omap3430
+ - const: ti,omap3
+
+ - description: Early BeagleBoard revisions A to B4 with a timer quirk
+ items:
+ - const: ti,omap3-beagle-ab4
+ - const: ti,omap3-beagle
+ - const: ti,omap3430
+ - const: ti,omap3
+
+ - description: Gumstix Overo TI OMAP 3430/3630 boards + expansion boards
+ items:
+ - enum:
+ - gumstix,omap3-overo-alto35
+ - gumstix,omap3-overo-chestnut43
+ - gumstix,omap3-overo-gallop43
+ - gumstix,omap3-overo-palo35
+ - gumstix,omap3-overo-palo43
+ - gumstix,omap3-overo-summit
+ - gumstix,omap3-overo-tobi
+ - gumstix,omap3-overo-tobiduo
+ - const: gumstix,omap3-overo
+ - enum:
+ - ti,omap3430
+ - ti,omap3630
+
+ - description: TI OMAP3630 SoC based platforms
+ items:
+ - enum:
+ - amazon,omap3-echo # Amazon Echo (first generation)
+ - compulab,omap3-cm-t3730
+ - goldelico,gta04
+ - lg,omap3-sniper # LG Optimus Black
+ - logicpd,dm3730-som-lv-devkit # LogicPD Zoom DM3730 SOM-LV Development Kit
+ - logicpd,dm3730-torpedo-devkit # LogicPD Zoom DM3730 Torpedo + Wireless Development Kit
+ - nokia,omap3-n9
+ - nokia,omap3-n950
+ - openpandora,omap3-pandora-1ghz
+ - ti,omap3-beagle-xm
+ - ti,omap3-evm-37xx # TI OMAP37XX EVM (TMDSEVM3730)
+ - ti,omap3-zoom3
+ - const: ti,omap3630
+ - const: ti,omap3
+
+ - description: TI AM35 SoC based platforms
+ items:
+ - enum:
+ - compulab,omap3-sbc-t3517 # CompuLab SBC-T3517 with CM-T3517
+ - teejet,mt_ventoux
+ - ti,am3517-craneboard # TI AM3517 CraneBoard (TMDSEVM3517)
+ - ti,am3517-evm # TI AM3517 EVM (AM3517/05 TMDSEVM3517)
+ - const: ti,am3517
+ - const: ti,omap3
+
+ - description: TI AM33 based platform
+ items:
+ - enum:
+ - compulab,cm-t335
+ - moxa,uc-8100-me-t
+ - novatech,am335x-lxm
+ - ti,am335x-bone
+ - ti,am335x-evm
+ - ti,am3359-icev2
+ - const: ti,am33xx
+
+ - description: Compulab board variants based on TI AM33
+ items:
+ - enum:
+ - compulab,sbc-t335
+ - const: compulab,cm-t335
+ - const: ti,am33xx
+
+ - description: Phytec boards based on TI AM33
+ items:
+ - enum:
+ - phytec,am335x-wega
+ - phytec,am335x-pcm-953
+ - phytec,am335x-regor
+ - const: phytec,am335x-phycore-som
+ - const: ti,am33xx
+
+ - description: TI OMAP4430 SoC based platforms
+ items:
+ - enum:
+ - amazon,omap4-kc1 # Amazon Kindle Fire (first generation)
+ - motorola,droid4 # Motorola Droid 4 XT894
+ - motorola,droid-bionic # Motorola Droid Bionic XT875
+ - motorola,xyboard-mz609
+ - motorola,xyboard-mz617
+ - ti,omap4-panda
+ - ti,omap4-sdp
+ - const: ti,omap4430
+ - const: ti,omap4
+
+ - description: OMAP4 DuoVero with Parlor expansion board/daughter board
+ items:
+ - const: gumstix,omap4-duovero-parlor
+ - const: gumstix,omap4-duovero
+ - const: ti,omap4430
+ - const: ti,omap4
+
+ - description: TI OMAP4460 SoC based platforms
+ items:
+ - enum:
+ - epson,embt2ws # Epson Moverio BT-200
+ - ti,omap4-panda-es
+ - const: ti,omap4460
+ - const: ti,omap4
+
+ - description: VAR-OM44 boards
+ items:
+ - enum:
+ - variscite,var-dvk-om44
+ - variscite,var-stk-om44
+ - const: variscite,var-som-om44
+ - const: ti,omap4460
+ - const: ti,omap4
+
+ - description: TI OMAP5 SoC based platforms
+ items:
+ - enum:
+ - compulab,omap5-cm-t54
+ - isee,omap5-igep0050
+ - ti,omap5-uevm
+ - const: ti,omap5
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/ata/ceva,ahci-1v84.yaml b/sys/contrib/device-tree/Bindings/ata/ceva,ahci-1v84.yaml
index b29ce598f9aa..9952e0ef7767 100644
--- a/sys/contrib/device-tree/Bindings/ata/ceva,ahci-1v84.yaml
+++ b/sys/contrib/device-tree/Bindings/ata/ceva,ahci-1v84.yaml
@@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Ceva AHCI SATA Controller
maintainers:
- - Piyush Mehta <piyush.mehta@amd.com>
+ - Mubin Sayyed <mubin.sayyed@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
description: |
The Ceva SATA controller mostly conforms to the AHCI interface with some
diff --git a/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml b/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml
index 3c7a2425f3e6..a17297cbefcb 100644
--- a/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml
+++ b/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml
@@ -151,7 +151,7 @@ allOf:
- interconnects
- power-domains
-additionalProperties: true
+additionalProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/ata/pata-common.yaml b/sys/contrib/device-tree/Bindings/ata/pata-common.yaml
index 2412894a255d..4e867dd4d402 100644
--- a/sys/contrib/device-tree/Bindings/ata/pata-common.yaml
+++ b/sys/contrib/device-tree/Bindings/ata/pata-common.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
This document defines device tree properties common to most Parallel
ATA (PATA, also known as IDE) AT attachment storage devices.
- It doesn't constitue a device tree binding specification by itself but is
+ It doesn't constitute a device tree binding specification by itself but is
meant to be referenced by device tree bindings.
The PATA (IDE) controller-specific device tree bindings are responsible for
@@ -38,6 +38,7 @@ patternProperties:
ID number 0 and the slave drive will have ID number 1. The PATA port
nodes will be named "ide-port".
type: object
+ additionalProperties: false
properties:
reg:
diff --git a/sys/contrib/device-tree/Bindings/auxdisplay/hit,hd44780.yaml b/sys/contrib/device-tree/Bindings/auxdisplay/hit,hd44780.yaml
index fde07e4b119d..406a922a714e 100644
--- a/sys/contrib/device-tree/Bindings/auxdisplay/hit,hd44780.yaml
+++ b/sys/contrib/device-tree/Bindings/auxdisplay/hit,hd44780.yaml
@@ -113,7 +113,7 @@ examples:
hd44780 {
compatible = "hit,hd44780";
display-height-chars = <2>;
- display-width-chars = <16>;
+ display-width-chars = <16>;
data-gpios = <&pcf8574 4 0>,
<&pcf8574 5 0>,
<&pcf8574 6 0>,
diff --git a/sys/contrib/device-tree/Bindings/bus/brcm,gisb-arb.yaml b/sys/contrib/device-tree/Bindings/bus/brcm,gisb-arb.yaml
index b23c3001991e..3aaefdbe361e 100644
--- a/sys/contrib/device-tree/Bindings/bus/brcm,gisb-arb.yaml
+++ b/sys/contrib/device-tree/Bindings/bus/brcm,gisb-arb.yaml
@@ -43,7 +43,7 @@ properties:
brcm,gisb-arb-master-names:
$ref: /schemas/types.yaml#/definitions/string-array
description: >
- String list of the litteral name of the GISB masters. Should match the
+ String list of the literal name of the GISB masters. Should match the
number of bits set in brcm,gisb-master-mask and the order in which they
appear from MSB to LSB.
diff --git a/sys/contrib/device-tree/Bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml b/sys/contrib/device-tree/Bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml
index b568d0ce438d..7e1ffc551046 100644
--- a/sys/contrib/device-tree/Bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml
+++ b/sys/contrib/device-tree/Bindings/bus/fsl,imx8qxp-pixel-link-msi-bus.yaml
@@ -73,9 +73,6 @@ patternProperties:
"^.*@[0-9a-f]+$":
description: Devices attached to the bus
type: object
- properties:
- reg:
- maxItems: 1
required:
- reg
diff --git a/sys/contrib/device-tree/Bindings/bus/nvidia,tegra210-aconnect.yaml b/sys/contrib/device-tree/Bindings/bus/nvidia,tegra210-aconnect.yaml
index 4157e885c6e7..26362c9006e2 100644
--- a/sys/contrib/device-tree/Bindings/bus/nvidia,tegra210-aconnect.yaml
+++ b/sys/contrib/device-tree/Bindings/bus/nvidia,tegra210-aconnect.yaml
@@ -7,10 +7,10 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra ACONNECT Bus
description: |
- The Tegra ACONNECT bus is an AXI switch which is used to connnect various
+ The Tegra ACONNECT bus is an AXI switch which is used to connect various
components inside the Audio Processing Engine (APE). All CPU accesses to
the APE subsystem go through the ACONNECT via an APB to AXI wrapper. All
- devices accessed via the ACONNNECT are described by child-nodes.
+ devices accessed via the ACONNECT are described by child-nodes.
maintainers:
- Jon Hunter <jonathanh@nvidia.com>
diff --git a/sys/contrib/device-tree/Bindings/bus/qcom,ssbi.yaml b/sys/contrib/device-tree/Bindings/bus/qcom,ssbi.yaml
new file mode 100644
index 000000000000..693cfa9696b5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/bus/qcom,ssbi.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/qcom,ssbi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Single-wire Serial Bus Interface (SSBI)
+
+description:
+ Some Qualcomm MSM devices contain a point-to-point serial bus used to
+ communicate with a limited range of devices (mostly power management
+ chips).
+
+maintainers:
+ - Andy Gross <agross@kernel.org>
+ - Bjorn Andersson <andersson@kernel.org>
+
+properties:
+ compatible:
+ const: qcom,ssbi
+
+ reg:
+ maxItems: 1
+
+ qcom,controller-type:
+ description:
+ Indicates the SSBI bus variant the controller should use to talk
+ with the slave device. The type chosen is determined by the attached
+ slave.
+ enum:
+ - ssbi
+ - ssbi2
+ - pmic-arbiter
+
+ pmic:
+ $ref: /schemas/mfd/qcom-pm8xxx.yaml#
+
+required:
+ - compatible
+ - reg
+ - qcom,controller-type
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ ssbi@c00000 {
+ compatible = "qcom,ssbi";
+ reg = <0x00c00000 0x1000>;
+ qcom,controller-type = "pmic-arbiter";
+
+ pmic {
+ compatible = "qcom,pm8821";
+ interrupt-parent = <&msmgpio>;
+ interrupts = <76 IRQ_TYPE_LEVEL_LOW>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/cache/andestech,ax45mp-cache.yaml b/sys/contrib/device-tree/Bindings/cache/andestech,ax45mp-cache.yaml
new file mode 100644
index 000000000000..d2cbe49f4e15
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/cache/andestech,ax45mp-cache.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (C) 2023 Renesas Electronics Corp.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cache/andestech,ax45mp-cache.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andestech AX45MP L2 Cache Controller
+
+maintainers:
+ - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+
+description:
+ A level-2 cache (L2C) is used to improve the system performance by providing
+ a large amount of cache line entries and reasonable access delays. The L2C
+ is shared between cores, and a non-inclusive non-exclusive policy is used.
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - andestech,ax45mp-cache
+
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - const: andestech,ax45mp-cache
+ - const: cache
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ cache-line-size:
+ const: 64
+
+ cache-level:
+ const: 2
+
+ cache-sets:
+ const: 1024
+
+ cache-size:
+ enum: [131072, 262144, 524288, 1048576, 2097152]
+
+ cache-unified: true
+
+ next-level-cache: true
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - cache-line-size
+ - cache-level
+ - cache-sets
+ - cache-size
+ - cache-unified
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ cache-controller@13400000 {
+ compatible = "andestech,ax45mp-cache", "cache";
+ reg = <0x13400000 0x100000>;
+ interrupts = <508 IRQ_TYPE_LEVEL_HIGH>;
+ cache-line-size = <64>;
+ cache-level = <2>;
+ cache-sets = <1024>;
+ cache-size = <262144>;
+ cache-unified;
+ };
diff --git a/sys/contrib/device-tree/Bindings/cache/qcom,llcc.yaml b/sys/contrib/device-tree/Bindings/cache/qcom,llcc.yaml
index 44892aa589fd..07ccbda4a0ab 100644
--- a/sys/contrib/device-tree/Bindings/cache/qcom,llcc.yaml
+++ b/sys/contrib/device-tree/Bindings/cache/qcom,llcc.yaml
@@ -20,6 +20,7 @@ description: |
properties:
compatible:
enum:
+ - qcom,qdu1000-llcc
- qcom,sc7180-llcc
- qcom,sc7280-llcc
- qcom,sc8180x-llcc
@@ -32,6 +33,8 @@ properties:
- qcom,sm8350-llcc
- qcom,sm8450-llcc
- qcom,sm8550-llcc
+ - qcom,sm8650-llcc
+ - qcom,x1e80100-llcc
reg:
minItems: 2
@@ -44,6 +47,14 @@ properties:
interrupts:
maxItems: 1
+ nvmem-cells:
+ items:
+ - description: Reference to an nvmem node for multi channel DDR
+
+ nvmem-cell-names:
+ items:
+ - const: multi-chan-ddr
+
required:
- compatible
- reg
@@ -55,6 +66,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,qdu1000-llcc
- qcom,sc7180-llcc
- qcom,sm6350-llcc
then:
@@ -94,6 +106,7 @@ allOf:
enum:
- qcom,sc8180x-llcc
- qcom,sc8280xp-llcc
+ - qcom,x1e80100-llcc
then:
properties:
reg:
diff --git a/sys/contrib/device-tree/Bindings/cache/sifive,ccache0.yaml b/sys/contrib/device-tree/Bindings/cache/sifive,ccache0.yaml
index 8a6a78e1a7ab..7e8cebe21584 100644
--- a/sys/contrib/device-tree/Bindings/cache/sifive,ccache0.yaml
+++ b/sys/contrib/device-tree/Bindings/cache/sifive,ccache0.yaml
@@ -38,7 +38,9 @@ properties:
- sifive,fu740-c000-ccache
- const: cache
- items:
- - const: starfive,jh7110-ccache
+ - enum:
+ - starfive,jh7100-ccache
+ - starfive,jh7110-ccache
- const: sifive,ccache0
- const: cache
- items:
@@ -88,6 +90,7 @@ allOf:
contains:
enum:
- sifive,fu740-c000-ccache
+ - starfive,jh7100-ccache
- starfive,jh7110-ccache
- microchip,mpfs-ccache
@@ -111,6 +114,7 @@ allOf:
contains:
enum:
- sifive,fu740-c000-ccache
+ - starfive,jh7100-ccache
- starfive,jh7110-ccache
then:
diff --git a/sys/contrib/device-tree/Bindings/chrome/google,cros-ec-typec.yaml b/sys/contrib/device-tree/Bindings/chrome/google,cros-ec-typec.yaml
index 3b0548c34791..9f9816fbecbc 100644
--- a/sys/contrib/device-tree/Bindings/chrome/google,cros-ec-typec.yaml
+++ b/sys/contrib/device-tree/Bindings/chrome/google,cros-ec-typec.yaml
@@ -29,10 +29,8 @@ properties:
patternProperties:
'^connector@[0-9a-f]+$':
$ref: /schemas/connector/usb-connector.yaml#
- unevaluatedProperties: false
- properties:
- reg:
- maxItems: 1
+ required:
+ - reg
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/clock/allwinner,sun4i-a10-osc-clk.yaml b/sys/contrib/device-tree/Bindings/clock/allwinner,sun4i-a10-osc-clk.yaml
index 52a7b6e7124c..0052bf1e8a6b 100644
--- a/sys/contrib/device-tree/Bindings/clock/allwinner,sun4i-a10-osc-clk.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/allwinner,sun4i-a10-osc-clk.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/clock/allwinner,sun4i-a10-osc-clk.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Allwinner A10 Gatable Oscillator Clock
+title: Allwinner A10 Gateable Oscillator Clock
maintainers:
- Chen-Yu Tsai <wens@csie.org>
diff --git a/sys/contrib/device-tree/Bindings/clock/alphascale,acc.txt b/sys/contrib/device-tree/Bindings/clock/alphascale,acc.txt
index b3205b21c9d0..c9fb9324c634 100644
--- a/sys/contrib/device-tree/Bindings/clock/alphascale,acc.txt
+++ b/sys/contrib/device-tree/Bindings/clock/alphascale,acc.txt
@@ -1,7 +1,7 @@
Alphascale Clock Controller
-The ACC (Alphascale Clock Controller) is responsible of choising proper
-clock source, setting deviders and clock gates.
+The ACC (Alphascale Clock Controller) is responsible for choosing proper
+clock source, setting dividers and clock gates.
Required properties for the ACC node:
- compatible: must be "alphascale,asm9260-clock-controller"
diff --git a/sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-aoclkc.yaml b/sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-aoclkc.yaml
new file mode 100644
index 000000000000..628e5dd33dd4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-aoclkc.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-aoclkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Always-On Clock Controller
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - amlogic,meson-gxbb-aoclkc
+ - amlogic,meson-gxl-aoclkc
+ - amlogic,meson-gxm-aoclkc
+ - amlogic,meson-axg-aoclkc
+ - const: amlogic,meson-gx-aoclkc
+ - enum:
+ - amlogic,meson-axg-aoclkc
+ - amlogic,meson-g12a-aoclkc
+
+ clocks:
+ minItems: 2
+ maxItems: 5
+
+ clock-names:
+ minItems: 2
+ items:
+ - const: xtal
+ - const: mpeg-clk
+ - const: ext-32k-0
+ - const: ext-32k-1
+ - const: ext-32k-2
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - '#clock-cells'
+ - '#reset-cells'
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ enum:
+ - amlogic,meson-g12a-aoclkc
+
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 3
+
+ clock-names:
+ minItems: 2
+ maxItems: 3
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - amlogic,meson-gxl-aoclkc
+ - amlogic,meson-gxm-aoclkc
+ - amlogic,meson-axg-aoclkc
+
+ then:
+ properties:
+ clocks:
+ maxItems: 2
+
+ clock-names:
+ maxItems: 2
+
+additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-clkc.yaml b/sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-clkc.yaml
new file mode 100644
index 000000000000..63246f1cb539
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/amlogic,gxbb-clkc.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Clock Controller
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+ compatible:
+ enum:
+ - amlogic,gxbb-clkc
+ - amlogic,gxl-clkc
+ - amlogic,axg-clkc
+ - amlogic,g12a-clkc
+ - amlogic,g12b-clkc
+ - amlogic,sm1-clkc
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: xtal
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - '#clock-cells'
+
+additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/clock/amlogic,s4-peripherals-clkc.yaml b/sys/contrib/device-tree/Bindings/clock/amlogic,s4-peripherals-clkc.yaml
new file mode 100644
index 000000000000..c229e4f0c1d9
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/amlogic,s4-peripherals-clkc.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022-2023 Amlogic, Inc. All rights reserved
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,s4-peripherals-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic S4 Peripherals Clock Controller
+
+maintainers:
+ - Yu Tu <yu.tu@amlogic.com>
+
+properties:
+ compatible:
+ const: amlogic,s4-peripherals-clkc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ minItems: 14
+ items:
+ - description: input fixed pll div2
+ - description: input fixed pll div2p5
+ - description: input fixed pll div3
+ - description: input fixed pll div4
+ - description: input fixed pll div5
+ - description: input fixed pll div7
+ - description: input hifi pll
+ - description: input gp0 pll
+ - description: input mpll0
+ - description: input mpll1
+ - description: input mpll2
+ - description: input mpll3
+ - description: input hdmi pll
+ - description: input oscillator (usually at 24MHz)
+ - description: input external 32kHz reference (optional)
+
+ clock-names:
+ minItems: 14
+ items:
+ - const: fclk_div2
+ - const: fclk_div2p5
+ - const: fclk_div3
+ - const: fclk_div4
+ - const: fclk_div5
+ - const: fclk_div7
+ - const: hifi_pll
+ - const: gp0_pll
+ - const: mpll0
+ - const: mpll1
+ - const: mpll2
+ - const: mpll3
+ - const: hdmi_pll
+ - const: xtal
+ - const: ext_32k
+
+ "#clock-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
+
+ clkc_periphs: clock-controller@fe000000 {
+ compatible = "amlogic,s4-peripherals-clkc";
+ reg = <0xfe000000 0x49c>;
+ clocks = <&clkc_pll 3>,
+ <&clkc_pll 13>,
+ <&clkc_pll 5>,
+ <&clkc_pll 7>,
+ <&clkc_pll 9>,
+ <&clkc_pll 11>,
+ <&clkc_pll 17>,
+ <&clkc_pll 15>,
+ <&clkc_pll 25>,
+ <&clkc_pll 27>,
+ <&clkc_pll 29>,
+ <&clkc_pll 31>,
+ <&clkc_pll 20>,
+ <&xtal>;
+ clock-names = "fclk_div2", "fclk_div2p5", "fclk_div3", "fclk_div4",
+ "fclk_div5", "fclk_div7", "hifi_pll", "gp0_pll",
+ "mpll0", "mpll1", "mpll2", "mpll3", "hdmi_pll", "xtal";
+ #clock-cells = <1>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/amlogic,s4-pll-clkc.yaml b/sys/contrib/device-tree/Bindings/clock/amlogic,s4-pll-clkc.yaml
new file mode 100644
index 000000000000..d8932ec26ca8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/amlogic,s4-pll-clkc.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022-2023 Amlogic, Inc. All rights reserved
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,s4-pll-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic S4 PLL Clock Controller
+
+maintainers:
+ - Yu Tu <yu.tu@amlogic.com>
+
+properties:
+ compatible:
+ const: amlogic,s4-pll-clkc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: xtal
+
+ "#clock-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ clkc_pll: clock-controller@fe008000 {
+ compatible = "amlogic,s4-pll-clkc";
+ reg = <0xfe008000 0x1e8>;
+ clocks = <&xtal>;
+ clock-names = "xtal";
+ #clock-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/baikal,bt1-ccu-pll.yaml b/sys/contrib/device-tree/Bindings/clock/baikal,bt1-ccu-pll.yaml
index 624984d51c10..7f8d98226437 100644
--- a/sys/contrib/device-tree/Bindings/clock/baikal,bt1-ccu-pll.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/baikal,bt1-ccu-pll.yaml
@@ -125,7 +125,7 @@ examples:
clk25m: clock-oscillator-25m {
compatible = "fixed-clock";
#clock-cells = <0>;
- clock-frequency = <25000000>;
+ clock-frequency = <25000000>;
clock-output-names = "clk25m";
};
...
diff --git a/sys/contrib/device-tree/Bindings/clock/brcm,kona-ccu.yaml b/sys/contrib/device-tree/Bindings/clock/brcm,kona-ccu.yaml
new file mode 100644
index 000000000000..e5656950b3bd
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/brcm,kona-ccu.yaml
@@ -0,0 +1,181 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/brcm,kona-ccu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Kona family clock control units (CCU)
+
+maintainers:
+ - Florian Fainelli <florian.fainelli@broadcom.com>
+ - Ray Jui <rjui@broadcom.com>
+ - Scott Branden <sbranden@broadcom.com>
+
+description: |
+ Broadcom "Kona" style clock control unit (CCU) is a clock provider that
+ manages a set of clock signals.
+
+ All available clock IDs are defined in
+ - include/dt-bindings/clock/bcm281xx.h for BCM281XX family
+ - include/dt-bindings/clock/bcm21664.h for BCM21664 family
+
+properties:
+ compatible:
+ enum:
+ - brcm,bcm11351-aon-ccu
+ - brcm,bcm11351-hub-ccu
+ - brcm,bcm11351-master-ccu
+ - brcm,bcm11351-root-ccu
+ - brcm,bcm11351-slave-ccu
+ - brcm,bcm21664-aon-ccu
+ - brcm,bcm21664-master-ccu
+ - brcm,bcm21664-root-ccu
+ - brcm,bcm21664-slave-ccu
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+ clock-output-names:
+ minItems: 1
+ maxItems: 10
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+ - clock-output-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm11351-aon-ccu
+ then:
+ properties:
+ clock-output-names:
+ items:
+ - const: hub_timer
+ - const: pmu_bsc
+ - const: pmu_bsc_var
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm11351-hub-ccu
+ then:
+ properties:
+ clock-output-names:
+ const: tmon_1m
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm11351-master-ccu
+ then:
+ properties:
+ clock-output-names:
+ items:
+ - const: sdio1
+ - const: sdio2
+ - const: sdio3
+ - const: sdio4
+ - const: usb_ic
+ - const: hsic2_48m
+ - const: hsic2_12m
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm11351-root-ccu
+ - brcm,bcm21664-root-ccu
+ then:
+ properties:
+ clock-output-names:
+ const: frac_1m
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm11351-slave-ccu
+ then:
+ properties:
+ clock-output-names:
+ items:
+ - const: uartb
+ - const: uartb2
+ - const: uartb3
+ - const: uartb4
+ - const: ssp0
+ - const: ssp2
+ - const: bsc1
+ - const: bsc2
+ - const: bsc3
+ - const: pwm
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm21664-aon-ccu
+ then:
+ properties:
+ clock-output-names:
+ const: hub_timer
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm21664-master-ccu
+ then:
+ properties:
+ clock-output-names:
+ items:
+ - const: sdio1
+ - const: sdio2
+ - const: sdio3
+ - const: sdio4
+ - const: sdio1_sleep
+ - const: sdio2_sleep
+ - const: sdio3_sleep
+ - const: sdio4_sleep
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm21664-slave-ccu
+ then:
+ properties:
+ clock-output-names:
+ items:
+ - const: uartb
+ - const: uartb2
+ - const: uartb3
+ - const: bsc1
+ - const: bsc2
+ - const: bsc3
+ - const: bsc4
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@3e011000 {
+ compatible = "brcm,bcm11351-slave-ccu";
+ reg = <0x3e011000 0x0f00>;
+ #clock-cells = <1>;
+ clock-output-names = "uartb",
+ "uartb2",
+ "uartb3",
+ "uartb4",
+ "ssp0",
+ "ssp2",
+ "bsc1",
+ "bsc2",
+ "bsc3",
+ "pwm";
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/fsl,imx8-acm.yaml b/sys/contrib/device-tree/Bindings/clock/fsl,imx8-acm.yaml
new file mode 100644
index 000000000000..07b9d21719c4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/fsl,imx8-acm.yaml
@@ -0,0 +1,282 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/fsl,imx8-acm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX8 Audio Clock Mux
+
+maintainers:
+ - Shengjiu Wang <shengjiu.wang@nxp.com>
+
+description: |
+ NXP i.MX8 Audio Clock Mux is dedicated clock muxing IP
+ used to control Audio related clock on the SoC.
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx8dxl-acm
+ - fsl,imx8qm-acm
+ - fsl,imx8qxp-acm
+
+ reg:
+ maxItems: 1
+
+ power-domains:
+ minItems: 13
+ maxItems: 21
+
+ '#clock-cells':
+ const: 1
+ description:
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8-clock.h
+ for the full list of i.MX8 ACM clock IDs.
+
+ clocks:
+ minItems: 13
+ maxItems: 27
+
+ clock-names:
+ minItems: 13
+ maxItems: 27
+
+required:
+ - compatible
+ - reg
+ - power-domains
+ - '#clock-cells'
+ - clocks
+ - clock-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx8qxp-acm
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: power domain of IMX_SC_R_AUDIO_CLK_0
+ - description: power domain of IMX_SC_R_AUDIO_CLK_1
+ - description: power domain of IMX_SC_R_MCLK_OUT_0
+ - description: power domain of IMX_SC_R_MCLK_OUT_1
+ - description: power domain of IMX_SC_R_AUDIO_PLL_0
+ - description: power domain of IMX_SC_R_AUDIO_PLL_1
+ - description: power domain of IMX_SC_R_ASRC_0
+ - description: power domain of IMX_SC_R_ASRC_1
+ - description: power domain of IMX_SC_R_ESAI_0
+ - description: power domain of IMX_SC_R_SAI_0
+ - description: power domain of IMX_SC_R_SAI_1
+ - description: power domain of IMX_SC_R_SAI_2
+ - description: power domain of IMX_SC_R_SAI_3
+ - description: power domain of IMX_SC_R_SAI_4
+ - description: power domain of IMX_SC_R_SAI_5
+ - description: power domain of IMX_SC_R_SPDIF_0
+ - description: power domain of IMX_SC_R_MQS_0
+
+ clocks:
+ minItems: 18
+ maxItems: 18
+
+ clock-names:
+ items:
+ - const: aud_rec_clk0_lpcg_clk
+ - const: aud_rec_clk1_lpcg_clk
+ - const: aud_pll_div_clk0_lpcg_clk
+ - const: aud_pll_div_clk1_lpcg_clk
+ - const: ext_aud_mclk0
+ - const: ext_aud_mclk1
+ - const: esai0_rx_clk
+ - const: esai0_rx_hf_clk
+ - const: esai0_tx_clk
+ - const: esai0_tx_hf_clk
+ - const: spdif0_rx
+ - const: sai0_rx_bclk
+ - const: sai0_tx_bclk
+ - const: sai1_rx_bclk
+ - const: sai1_tx_bclk
+ - const: sai2_rx_bclk
+ - const: sai3_rx_bclk
+ - const: sai4_rx_bclk
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx8qm-acm
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: power domain of IMX_SC_R_AUDIO_CLK_0
+ - description: power domain of IMX_SC_R_AUDIO_CLK_1
+ - description: power domain of IMX_SC_R_MCLK_OUT_0
+ - description: power domain of IMX_SC_R_MCLK_OUT_1
+ - description: power domain of IMX_SC_R_AUDIO_PLL_0
+ - description: power domain of IMX_SC_R_AUDIO_PLL_1
+ - description: power domain of IMX_SC_R_ASRC_0
+ - description: power domain of IMX_SC_R_ASRC_1
+ - description: power domain of IMX_SC_R_ESAI_0
+ - description: power domain of IMX_SC_R_ESAI_1
+ - description: power domain of IMX_SC_R_SAI_0
+ - description: power domain of IMX_SC_R_SAI_1
+ - description: power domain of IMX_SC_R_SAI_2
+ - description: power domain of IMX_SC_R_SAI_3
+ - description: power domain of IMX_SC_R_SAI_4
+ - description: power domain of IMX_SC_R_SAI_5
+ - description: power domain of IMX_SC_R_SAI_6
+ - description: power domain of IMX_SC_R_SAI_7
+ - description: power domain of IMX_SC_R_SPDIF_0
+ - description: power domain of IMX_SC_R_SPDIF_1
+ - description: power domain of IMX_SC_R_MQS_0
+
+ clocks:
+ minItems: 27
+ maxItems: 27
+
+ clock-names:
+ items:
+ - const: aud_rec_clk0_lpcg_clk
+ - const: aud_rec_clk1_lpcg_clk
+ - const: aud_pll_div_clk0_lpcg_clk
+ - const: aud_pll_div_clk1_lpcg_clk
+ - const: mlb_clk
+ - const: hdmi_rx_mclk
+ - const: ext_aud_mclk0
+ - const: ext_aud_mclk1
+ - const: esai0_rx_clk
+ - const: esai0_rx_hf_clk
+ - const: esai0_tx_clk
+ - const: esai0_tx_hf_clk
+ - const: esai1_rx_clk
+ - const: esai1_rx_hf_clk
+ - const: esai1_tx_clk
+ - const: esai1_tx_hf_clk
+ - const: spdif0_rx
+ - const: spdif1_rx
+ - const: sai0_rx_bclk
+ - const: sai0_tx_bclk
+ - const: sai1_rx_bclk
+ - const: sai1_tx_bclk
+ - const: sai2_rx_bclk
+ - const: sai3_rx_bclk
+ - const: sai4_rx_bclk
+ - const: sai5_tx_bclk
+ - const: sai6_rx_bclk
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx8dxl-acm
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: power domain of IMX_SC_R_AUDIO_CLK_0
+ - description: power domain of IMX_SC_R_AUDIO_CLK_1
+ - description: power domain of IMX_SC_R_MCLK_OUT_0
+ - description: power domain of IMX_SC_R_MCLK_OUT_1
+ - description: power domain of IMX_SC_R_AUDIO_PLL_0
+ - description: power domain of IMX_SC_R_AUDIO_PLL_1
+ - description: power domain of IMX_SC_R_ASRC_0
+ - description: power domain of IMX_SC_R_SAI_0
+ - description: power domain of IMX_SC_R_SAI_1
+ - description: power domain of IMX_SC_R_SAI_2
+ - description: power domain of IMX_SC_R_SAI_3
+ - description: power domain of IMX_SC_R_SPDIF_0
+ - description: power domain of IMX_SC_R_MQS_0
+
+ clocks:
+ minItems: 13
+ maxItems: 13
+
+ clock-names:
+ items:
+ - const: aud_rec_clk0_lpcg_clk
+ - const: aud_rec_clk1_lpcg_clk
+ - const: aud_pll_div_clk0_lpcg_clk
+ - const: aud_pll_div_clk1_lpcg_clk
+ - const: ext_aud_mclk0
+ - const: ext_aud_mclk1
+ - const: spdif0_rx
+ - const: sai0_rx_bclk
+ - const: sai0_tx_bclk
+ - const: sai1_rx_bclk
+ - const: sai1_tx_bclk
+ - const: sai2_rx_bclk
+ - const: sai3_rx_bclk
+
+additionalProperties: false
+
+examples:
+ # Clock Control Module node:
+ - |
+ #include <dt-bindings/clock/imx8-lpcg.h>
+ #include <dt-bindings/firmware/imx/rsrc.h>
+
+ clock-controller@59e00000 {
+ compatible = "fsl,imx8qxp-acm";
+ reg = <0x59e00000 0x1d0000>;
+ #clock-cells = <1>;
+ power-domains = <&pd IMX_SC_R_AUDIO_CLK_0>,
+ <&pd IMX_SC_R_AUDIO_CLK_1>,
+ <&pd IMX_SC_R_MCLK_OUT_0>,
+ <&pd IMX_SC_R_MCLK_OUT_1>,
+ <&pd IMX_SC_R_AUDIO_PLL_0>,
+ <&pd IMX_SC_R_AUDIO_PLL_1>,
+ <&pd IMX_SC_R_ASRC_0>,
+ <&pd IMX_SC_R_ASRC_1>,
+ <&pd IMX_SC_R_ESAI_0>,
+ <&pd IMX_SC_R_SAI_0>,
+ <&pd IMX_SC_R_SAI_1>,
+ <&pd IMX_SC_R_SAI_2>,
+ <&pd IMX_SC_R_SAI_3>,
+ <&pd IMX_SC_R_SAI_4>,
+ <&pd IMX_SC_R_SAI_5>,
+ <&pd IMX_SC_R_SPDIF_0>,
+ <&pd IMX_SC_R_MQS_0>;
+ clocks = <&aud_rec0_lpcg IMX_LPCG_CLK_0>,
+ <&aud_rec1_lpcg IMX_LPCG_CLK_0>,
+ <&aud_pll_div0_lpcg IMX_LPCG_CLK_0>,
+ <&aud_pll_div1_lpcg IMX_LPCG_CLK_0>,
+ <&clk_ext_aud_mclk0>,
+ <&clk_ext_aud_mclk1>,
+ <&clk_esai0_rx_clk>,
+ <&clk_esai0_rx_hf_clk>,
+ <&clk_esai0_tx_clk>,
+ <&clk_esai0_tx_hf_clk>,
+ <&clk_spdif0_rx>,
+ <&clk_sai0_rx_bclk>,
+ <&clk_sai0_tx_bclk>,
+ <&clk_sai1_rx_bclk>,
+ <&clk_sai1_tx_bclk>,
+ <&clk_sai2_rx_bclk>,
+ <&clk_sai3_rx_bclk>,
+ <&clk_sai4_rx_bclk>;
+ clock-names = "aud_rec_clk0_lpcg_clk",
+ "aud_rec_clk1_lpcg_clk",
+ "aud_pll_div_clk0_lpcg_clk",
+ "aud_pll_div_clk1_lpcg_clk",
+ "ext_aud_mclk0",
+ "ext_aud_mclk1",
+ "esai0_rx_clk",
+ "esai0_rx_hf_clk",
+ "esai0_tx_clk",
+ "esai0_tx_hf_clk",
+ "spdif0_rx",
+ "sai0_rx_bclk",
+ "sai0_tx_bclk",
+ "sai1_rx_bclk",
+ "sai1_tx_bclk",
+ "sai2_rx_bclk",
+ "sai3_rx_bclk",
+ "sai4_rx_bclk";
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/fsl,imx93-anatop.yaml b/sys/contrib/device-tree/Bindings/clock/fsl,imx93-anatop.yaml
new file mode 100644
index 000000000000..8a3b2476419a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/fsl,imx93-anatop.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/fsl,imx93-anatop.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX93 ANATOP Clock Module
+
+maintainers:
+ - Peng Fan <peng.fan@nxp.com>
+
+description: |
+ NXP i.MX93 ANATOP module which contains PLL and OSC to Clock Controller
+ Module.
+
+properties:
+ compatible:
+ items:
+ - const: fsl,imx93-anatop
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@44480000 {
+ compatible = "fsl,imx93-anatop";
+ reg = <0x44480000 0x2000>;
+ #clock-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/google,gs101-clock.yaml b/sys/contrib/device-tree/Bindings/clock/google,gs101-clock.yaml
new file mode 100644
index 000000000000..ca7fdada3ff2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/google,gs101-clock.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/google,gs101-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google GS101 SoC clock controller
+
+maintainers:
+ - Peter Griffin <peter.griffin@linaro.org>
+
+description: |
+ Google GS101 clock controller is comprised of several CMU units, generating
+ clocks for different domains. Those CMU units are modeled as separate device
+ tree nodes, and might depend on each other. The root clock in that clock tree
+ is OSCCLK (24.576 MHz). That external clock must be defined as a fixed-rate
+ clock in dts.
+
+ CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
+ dividers; all other leaf clocks (other CMUs) are usually derived from CMU_TOP.
+
+ Each clock is assigned an identifier and client nodes can use this identifier
+ to specify the clock which they consume. All clocks available for usage
+ in clock consumer nodes are defined as preprocessor macros in
+ 'dt-bindings/clock/gs101.h' header.
+
+properties:
+ compatible:
+ enum:
+ - google,gs101-cmu-top
+ - google,gs101-cmu-apm
+ - google,gs101-cmu-misc
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ maxItems: 2
+
+ "#clock-cells":
+ const: 1
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - "#clock-cells"
+ - clocks
+ - clock-names
+ - reg
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - google,gs101-cmu-top
+ - google,gs101-cmu-apm
+ then:
+ properties:
+ clocks:
+ items:
+ - description: External reference clock (24.576 MHz)
+
+ clock-names:
+ items:
+ - const: oscclk
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: google,gs101-cmu-misc
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Misc bus clock (from CMU_TOP)
+ - description: Misc sss clock (from CMU_TOP)
+
+ clock-names:
+ items:
+ - const: bus
+ - const: sss
+
+additionalProperties: false
+
+examples:
+ # Clock controller node for CMU_TOP
+ - |
+ #include <dt-bindings/clock/google,gs101.h>
+
+ cmu_top: clock-controller@1e080000 {
+ compatible = "google,gs101-cmu-top";
+ reg = <0x1e080000 0x8000>;
+ #clock-cells = <1>;
+ clocks = <&ext_24_5m>;
+ clock-names = "oscclk";
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/intel,agilex5-clkmgr.yaml b/sys/contrib/device-tree/Bindings/clock/intel,agilex5-clkmgr.yaml
new file mode 100644
index 000000000000..d120b0da7f3d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/intel,agilex5-clkmgr.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/intel,agilex5-clkmgr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel SoCFPGA Agilex5 clock manager
+
+maintainers:
+ - Dinh Nguyen <dinguyen@kernel.org>
+
+description:
+ The Intel Agilex5 Clock Manager is an integrated clock controller, which
+ generates and supplies clock to all the modules.
+
+properties:
+ compatible:
+ const: intel,agilex5-clkmgr
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clkmgr: clock-controller@10d10000 {
+ compatible = "intel,agilex5-clkmgr";
+ reg = <0x10d10000 0x1000>;
+ #clock-cells = <1>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/keystone-pll.txt b/sys/contrib/device-tree/Bindings/clock/keystone-pll.txt
index 47570d207215..9a3fbc665606 100644
--- a/sys/contrib/device-tree/Bindings/clock/keystone-pll.txt
+++ b/sys/contrib/device-tree/Bindings/clock/keystone-pll.txt
@@ -14,7 +14,7 @@ Required properties:
- #clock-cells : from common clock binding; shall be set to 0.
- compatible : shall be "ti,keystone,main-pll-clock" or "ti,keystone,pll-clock"
- clocks : parent clock phandle
-- reg - pll control0 and pll multipler registers
+- reg - pll control0 and pll multiplier registers
- reg-names : control, multiplier and post-divider. The multiplier and
post-divider registers are applicable only for main pll clock
- fixed-postdiv : fixed post divider value. If absent, use clkod register bits
diff --git a/sys/contrib/device-tree/Bindings/clock/lpc1850-ccu.txt b/sys/contrib/device-tree/Bindings/clock/lpc1850-ccu.txt
index fa97c12014ac..8cf8f0ecdd16 100644
--- a/sys/contrib/device-tree/Bindings/clock/lpc1850-ccu.txt
+++ b/sys/contrib/device-tree/Bindings/clock/lpc1850-ccu.txt
@@ -68,7 +68,7 @@ soc {
"base_ssp0_clk", "base_sdio_clk";
};
- /* A user of CCU brach clocks */
+ /* A user of CCU branch clocks */
uart1: serial@40082000 {
...
clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>;
diff --git a/sys/contrib/device-tree/Bindings/clock/lpc1850-creg-clk.txt b/sys/contrib/device-tree/Bindings/clock/lpc1850-creg-clk.txt
index 6f1c7b4e4d2c..b6b2547a3d17 100644
--- a/sys/contrib/device-tree/Bindings/clock/lpc1850-creg-clk.txt
+++ b/sys/contrib/device-tree/Bindings/clock/lpc1850-creg-clk.txt
@@ -5,8 +5,8 @@ control registers for two low speed clocks. One of the clocks is a
32 kHz oscillator driver with power up/down and clock gating. Next
is a fixed divider that creates a 1 kHz clock from the 32 kHz osc.
-These clocks are used by the RTC and the Event Router peripherials.
-The 32 kHz can also be routed to other peripherials to enable low
+These clocks are used by the RTC and the Event Router peripherals.
+The 32 kHz can also be routed to other peripherals to enable low
power modes.
This binding uses the common clock binding:
diff --git a/sys/contrib/device-tree/Bindings/clock/maxim,max9485.txt b/sys/contrib/device-tree/Bindings/clock/maxim,max9485.txt
index 61bec1100a94..b8f5c3bbf12b 100644
--- a/sys/contrib/device-tree/Bindings/clock/maxim,max9485.txt
+++ b/sys/contrib/device-tree/Bindings/clock/maxim,max9485.txt
@@ -12,7 +12,7 @@ requests.
Required properties:
- compatible: "maxim,max9485"
-- clocks: Input clock, must provice 27.000 MHz
+- clocks: Input clock, must provide 27.000 MHz
- clock-names: Must be set to "xclk"
- #clock-cells: From common clock binding; shall be set to 1
diff --git a/sys/contrib/device-tree/Bindings/clock/mediatek,apmixedsys.yaml b/sys/contrib/device-tree/Bindings/clock/mediatek,apmixedsys.yaml
index 372c1d744bc2..685535846cbb 100644
--- a/sys/contrib/device-tree/Bindings/clock/mediatek,apmixedsys.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/mediatek,apmixedsys.yaml
@@ -22,6 +22,7 @@ properties:
- mediatek,mt7622-apmixedsys
- mediatek,mt7981-apmixedsys
- mediatek,mt7986-apmixedsys
+ - mediatek,mt7988-apmixedsys
- mediatek,mt8135-apmixedsys
- mediatek,mt8173-apmixedsys
- mediatek,mt8516-apmixedsys
diff --git a/sys/contrib/device-tree/Bindings/clock/mediatek,ethsys.yaml b/sys/contrib/device-tree/Bindings/clock/mediatek,ethsys.yaml
new file mode 100644
index 000000000000..f9cddacc2eae
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/mediatek,ethsys.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/mediatek,ethsys.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek ethsys controller
+
+description:
+ The available clocks are defined in dt-bindings/clock/mt*-clk.h.
+
+maintainers:
+ - James Liao <jamesjj.liao@mediatek.com>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - mediatek,mt2701-ethsys
+ - mediatek,mt7622-ethsys
+ - mediatek,mt7629-ethsys
+ - mediatek,mt7981-ethsys
+ - mediatek,mt7986-ethsys
+ - mediatek,mt7988-ethsys
+ - const: syscon
+ - items:
+ - const: mediatek,mt7623-ethsys
+ - const: mediatek,mt2701-ethsys
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+
+ "#reset-cells":
+ const: 1
+
+required:
+ - reg
+ - "#clock-cells"
+ - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@1b000000 {
+ compatible = "mediatek,mt2701-ethsys", "syscon";
+ reg = <0x1b000000 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-ethwarp.yaml b/sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-ethwarp.yaml
new file mode 100644
index 000000000000..e32a0251ff6a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-ethwarp.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/mediatek,mt7988-ethwarp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT7988 ethwarp Controller
+
+maintainers:
+ - Daniel Golle <daniel@makrotopia.org>
+
+description:
+ The Mediatek MT7988 ethwarp controller provides clocks and resets for the
+ Ethernet related subsystems found the MT7988 SoC.
+ The clock values can be found in <dt-bindings/clock/mt*-clk.h>.
+
+properties:
+ compatible:
+ items:
+ - const: mediatek,mt7988-ethwarp
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+ - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/reset/ti-syscon.h>
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ clock-controller@15031000 {
+ compatible = "mediatek,mt7988-ethwarp";
+ reg = <0 0x15031000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-xfi-pll.yaml b/sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-xfi-pll.yaml
new file mode 100644
index 000000000000..192f1451f0af
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/mediatek,mt7988-xfi-pll.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/mediatek,mt7988-xfi-pll.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT7988 XFI PLL Clock Controller
+
+maintainers:
+ - Daniel Golle <daniel@makrotopia.org>
+
+description:
+ The MediaTek XFI PLL controller provides the 156.25MHz clock for the
+ Ethernet SerDes PHY from the 40MHz top_xtal clock.
+
+properties:
+ compatible:
+ const: mediatek,mt7988-xfi-pll
+
+ reg:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - resets
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ clock-controller@11f40000 {
+ compatible = "mediatek,mt7988-xfi-pll";
+ reg = <0 0x11f40000 0 0x1000>;
+ resets = <&watchdog 16>;
+ #clock-cells = <1>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/mediatek,mt8188-clock.yaml b/sys/contrib/device-tree/Bindings/clock/mediatek,mt8188-clock.yaml
index d7214d97b2ba..860570320545 100644
--- a/sys/contrib/device-tree/Bindings/clock/mediatek,mt8188-clock.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/mediatek,mt8188-clock.yaml
@@ -43,8 +43,6 @@ properties:
- mediatek,mt8188-vdecsys
- mediatek,mt8188-vdecsys-soc
- mediatek,mt8188-vencsys
- - mediatek,mt8188-vppsys0
- - mediatek,mt8188-vppsys1
- mediatek,mt8188-wpesys
- mediatek,mt8188-wpesys-vpp0
diff --git a/sys/contrib/device-tree/Bindings/clock/mediatek,topckgen.yaml b/sys/contrib/device-tree/Bindings/clock/mediatek,topckgen.yaml
index 6d087ded7437..bdf3b55bd56f 100644
--- a/sys/contrib/device-tree/Bindings/clock/mediatek,topckgen.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/mediatek,topckgen.yaml
@@ -37,6 +37,8 @@ properties:
- mediatek,mt7629-topckgen
- mediatek,mt7981-topckgen
- mediatek,mt7986-topckgen
+ - mediatek,mt7988-mcusys
+ - mediatek,mt7988-topckgen
- mediatek,mt8167-topckgen
- mediatek,mt8183-topckgen
- const: syscon
diff --git a/sys/contrib/device-tree/Bindings/clock/nvidia,tegra124-car.yaml b/sys/contrib/device-tree/Bindings/clock/nvidia,tegra124-car.yaml
index 1b2181f6d440..a9ba21144a56 100644
--- a/sys/contrib/device-tree/Bindings/clock/nvidia,tegra124-car.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/nvidia,tegra124-car.yaml
@@ -27,7 +27,9 @@ description: |
properties:
compatible:
- const: nvidia,tegra124-car
+ enum:
+ - nvidia,tegra124-car
+ - nvidia,tegra132-car
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,a53pll.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,a53pll.yaml
index 9436266828af..5ca927a8b1d5 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,a53pll.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,a53pll.yaml
@@ -16,6 +16,7 @@ description:
properties:
compatible:
enum:
+ - qcom,ipq5018-a53pll
- qcom,ipq5332-a53pll
- qcom,ipq6018-a53pll
- qcom,ipq8074-a53pll
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,camcc-sm8250.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,camcc-sm8250.yaml
index 426335a2841c..3fd3dc1069fb 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,camcc-sm8250.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,camcc-sm8250.yaml
@@ -15,6 +15,9 @@ description: |
See also:: include/dt-bindings/clock/qcom,camcc-sm8250.h
+allOf:
+ - $ref: qcom,gcc.yaml#
+
properties:
compatible:
const: qcom,sm8250-camcc
@@ -33,15 +36,6 @@ properties:
- const: bi_tcxo_ao
- const: sleep_clk
- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
power-domains:
items:
- description: MMCX power domain
@@ -56,14 +50,10 @@ properties:
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- - '#power-domain-cells'
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm6125.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm6125.yaml
index 8a210c4c5f82..0a3ef7fd03fa 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm6125.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm6125.yaml
@@ -29,6 +29,7 @@ properties:
- description: Link clock from DP PHY
- description: VCO DIV clock from DP PHY
- description: AHB config clock from GCC
+ - description: GPLL0 div source from GCC
clock-names:
items:
@@ -39,6 +40,7 @@ properties:
- const: dp_phy_pll_link_clk
- const: dp_phy_pll_vco_div_clk
- const: cfg_ahb_clk
+ - const: gcc_disp_gpll0_div_clk_src
'#clock-cells':
const: 1
@@ -46,6 +48,16 @@ properties:
'#power-domain-cells':
const: 1
+ power-domains:
+ description:
+ A phandle and PM domain specifier for the CX power domain.
+ maxItems: 1
+
+ required-opps:
+ description:
+ A phandle to an OPP node describing the power domain's performance point.
+ maxItems: 1
+
reg:
maxItems: 1
@@ -63,23 +75,31 @@ examples:
- |
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/clock/qcom,gcc-sm6125.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
clock-controller@5f00000 {
compatible = "qcom,sm6125-dispcc";
reg = <0x5f00000 0x20000>;
+
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
<&dsi0_phy 0>,
<&dsi0_phy 1>,
<&dsi1_phy 1>,
<&dp_phy 0>,
<&dp_phy 1>,
- <&gcc GCC_DISP_AHB_CLK>;
+ <&gcc GCC_DISP_AHB_CLK>,
+ <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>;
clock-names = "bi_tcxo",
"dsi0_phy_pll_out_byteclk",
"dsi0_phy_pll_out_dsiclk",
"dsi1_phy_pll_out_dsiclk",
"dp_phy_pll_link_clk",
"dp_phy_pll_vco_div_clk",
- "cfg_ahb_clk";
+ "cfg_ahb_clk",
+ "gcc_disp_gpll0_div_clk_src";
+
+ required-opps = <&rpmhpd_opp_ret>;
+ power-domains = <&rpmpd SM6125_VDDCX>;
+
#clock-cells = <1>;
#power-domain-cells = <1>;
};
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm8x50.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm8x50.yaml
index d6774db257f0..59cc88a52f6b 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm8x50.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,dispcc-sm8x50.yaml
@@ -82,7 +82,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@af00000 {
compatible = "qcom,sm8250-dispcc";
reg = <0x0af00000 0x10000>;
@@ -103,7 +103,7 @@ examples:
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
};
...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-apq8064.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-apq8064.yaml
index 09cd7a786871..19211176ee0b 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-apq8064.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-apq8064.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on APQ8064/MSM8960
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq4019.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq4019.yaml
index 6ebaef2288fa..fb3957d485f9 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq4019.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq4019.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on IPQ4019
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
- Robert Marko <robert.markoo@sartura.hr>
description: |
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq6018.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq6018.yaml
new file mode 100644
index 000000000000..af5d883cfdc8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq6018.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on IPQ6018
+
+maintainers:
+ - Stephen Boyd <sboyd@kernel.org>
+ - Taniya Das <quic_tdas@quicinc.com>
+ - Robert Marko <robimarko@gmail.com>
+
+description: |
+ Qualcomm global clock control module provides the clocks, resets and power
+ domains on IPQ6018.
+
+ See also::
+ include/dt-bindings/clock/qcom,gcc-ipq6018.h
+ include/dt-bindings/reset/qcom,gcc-ipq6018.h
+
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+properties:
+ compatible:
+ const: qcom,gcc-ipq6018
+
+ clocks:
+ items:
+ - description: board XO clock
+ - description: sleep clock
+
+ clock-names:
+ items:
+ - const: xo
+ - const: sleep_clk
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ clock-controller@1800000 {
+ compatible = "qcom,gcc-ipq6018";
+ reg = <0x01800000 0x80000>;
+ clocks = <&xo>, <&sleep_clk>;
+ clock-names = "xo", "sleep_clk";
+ #clock-cells = <1>;
+ #power-domain-cells = <1>;
+ #reset-cells = <1>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq8074.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq8074.yaml
index deef398a9872..2d44ddc45aab 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq8074.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-ipq8074.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on IPQ8074
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
@@ -27,11 +27,15 @@ properties:
items:
- description: board XO clock
- description: sleep clock
+ - description: Gen3 QMP PCIe PHY PIPE clock
+ - description: Gen2 QMP PCIe PHY PIPE clock
clock-names:
items:
- const: xo
- const: sleep_clk
+ - const: pcie0_pipe
+ - const: pcie1_pipe
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8976.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8976.yaml
index d2186e25f55f..62d6f1fe1228 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8976.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8976.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on MSM8976
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8996.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8996.yaml
index f77036ace31b..97523cc1ecfb 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8996.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8996.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on MSM8996
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module which provides the clocks, resets and
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8998.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8998.yaml
index 3c9729050d6f..58f7fb22c5c4 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8998.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-msm8998.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on MSM8998
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-other.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-other.yaml
index ba969e7a57bf..7d05f0f63cef 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-other.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-other.yaml
@@ -8,19 +8,15 @@ title: Qualcomm Global Clock & Reset Controller
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
domains.
See also::
- include/dt-bindings/clock/qcom,gcc-ipq6018.h
- include/dt-bindings/reset/qcom,gcc-ipq6018.h
include/dt-bindings/clock/qcom,gcc-msm8953.h
include/dt-bindings/clock/qcom,gcc-mdm9607.h
- include/dt-bindings/clock/qcom,gcc-mdm9615.h
- include/dt-bindings/reset/qcom,gcc-mdm9615.h
allOf:
- $ref: qcom,gcc.yaml#
@@ -28,9 +24,7 @@ allOf:
properties:
compatible:
enum:
- - qcom,gcc-ipq6018
- qcom,gcc-mdm9607
- - qcom,gcc-mdm9615
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-qcs404.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-qcs404.yaml
index b2256f81b265..7bc6c57e4d11 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-qcs404.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-qcs404.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on QCS404
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7180.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7180.yaml
index 8bf9b6f49550..7aae21a76690 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7180.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7180.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SC7180
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7280.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7280.yaml
index ff0b18bbb0fc..c4ca08d9ad5a 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7280.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sc7280.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on SC7280
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml
index 68e1b7822fe0..0595da0e8a42 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SDM670 and SDM845
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8150.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8150.yaml
index 3ea0ff37a4cb..58ccb7df847c 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8150.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8150.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SM8150
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8250.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8250.yaml
index ead6665b9a45..5d77c092be5b 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8250.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8250.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller on SM8250
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm global clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8450.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8450.yaml
index 9a31981fbeb2..75259f468d54 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8450.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc-sm8450.yaml
@@ -25,7 +25,7 @@ properties:
- description: Sleep clock source
- description: PCIE 0 Pipe clock source (Optional clock)
- description: PCIE 1 Pipe clock source (Optional clock)
- - description: PCIE 1 Phy Auxillary clock source (Optional clock)
+ - description: PCIE 1 Phy Auxiliary clock source (Optional clock)
- description: UFS Phy Rx symbol 0 clock source (Optional clock)
- description: UFS Phy Rx symbol 1 clock source (Optional clock)
- description: UFS Phy Tx symbol 0 clock source (Optional clock)
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gcc.yaml
index 7129fbcf2b6c..788825105f24 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gcc.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Global Clock & Reset Controller Common Properties
maintainers:
- Stephen Boyd <sboyd@kernel.org>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Common bindings for Qualcomm global clock control module providing the
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,gpucc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,gpucc.yaml
index a00216b3b15a..f369fa34e00c 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,gpucc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,gpucc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Graphics Clock & Reset Controller
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm graphics clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,hfpll.txt b/sys/contrib/device-tree/Bindings/clock/qcom,hfpll.txt
index ec02a024424c..5769cbbe76be 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,hfpll.txt
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,hfpll.txt
@@ -12,6 +12,9 @@ PROPERTIES
"qcom,hfpll-apq8064", "qcom,hfpll"
"qcom,hfpll-msm8974", "qcom,hfpll"
"qcom,hfpll-msm8960", "qcom,hfpll"
+ "qcom,msm8976-hfpll-a53", "qcom,hfpll"
+ "qcom,msm8976-hfpll-a72", "qcom,hfpll"
+ "qcom,msm8976-hfpll-cci", "qcom,hfpll"
- reg:
Usage: required
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,ipq5018-gcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,ipq5018-gcc.yaml
new file mode 100644
index 000000000000..ef84a0c95f7e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,ipq5018-gcc.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,ipq5018-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on IPQ5018
+
+maintainers:
+ - Sricharan Ramabadhran <quic_srichara@quicinc.com>
+
+description: |
+ Qualcomm global clock control module provides the clocks, resets and power
+ domains on IPQ5018
+
+ See also::
+ include/dt-bindings/clock/qcom,ipq5018-gcc.h
+ include/dt-bindings/reset/qcom,ipq5018-gcc.h
+
+properties:
+ compatible:
+ const: qcom,gcc-ipq5018
+
+ clocks:
+ items:
+ - description: Board XO source
+ - description: Sleep clock source
+ - description: PCIE20 PHY0 pipe clock source
+ - description: PCIE20 PHY1 pipe clock source
+ - description: USB3 PHY pipe clock source
+ - description: GEPHY RX clock source
+ - description: GEPHY TX clock source
+ - description: UNIPHY RX clock source
+ - description: UNIPHY TX clk source
+
+required:
+ - compatible
+ - clocks
+
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ clock-controller@1800000 {
+ compatible = "qcom,gcc-ipq5018";
+ reg = <0x01800000 0x80000>;
+ clocks = <&xo_board_clk>,
+ <&sleep_clk>,
+ <&pcie20_phy0_pipe_clk>,
+ <&pcie20_phy1_pipe_clk>,
+ <&usb3_phy0_pipe_clk>,
+ <&gephy_rx_clk>,
+ <&gephy_tx_clk>,
+ <&uniphy_rx_clk>,
+ <&uniphy_tx_clk>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,kpss-acc-v1.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,kpss-acc-v1.yaml
index a466e4e8aacd..57632757d4e6 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,kpss-acc-v1.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,kpss-acc-v1.yaml
@@ -14,7 +14,7 @@ description:
There is one ACC register region per CPU within the KPSS remapped region as
well as an alias register region that remaps accesses to the ACC associated
with the CPU accessing the region. ACC v1 is currently used as a
- clock-controller for enabling the cpu and hanling the aux clocks.
+ clock-controller for enabling the cpu and handling the aux clocks.
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,lcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,lcc.yaml
index 8c783823e93c..55985e562a34 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,lcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,lcc.yaml
@@ -76,6 +76,40 @@ allOf:
- clocks
- clock-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,lcc-mdm9615
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Board CXO source
+ - description: PLL 4 Vote clock
+ - description: MI2S codec clock
+ - description: Mic I2S codec clock
+ - description: Mic I2S spare clock
+ - description: Speaker I2S codec clock
+ - description: Speaker I2S spare clock
+ - description: PCM codec clock
+
+ clock-names:
+ items:
+ - const: cxo
+ - const: pll4_vote
+ - const: mi2s_codec_clk
+ - const: codec_i2s_mic_codec_clk
+ - const: spare_i2s_mic_codec_clk
+ - const: codec_i2s_spkr_codec_clk
+ - const: spare_i2s_spkr_codec_clk
+ - const: pcm_codec_clk
+
+ required:
+ - clocks
+ - clock-names
+
examples:
- |
clock-controller@28000000 {
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,mmcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,mmcc.yaml
index 422f5776a771..aa35a40648ba 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,mmcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,mmcc.yaml
@@ -8,7 +8,7 @@ title: Qualcomm Multimedia Clock & Reset Controller
maintainers:
- Jeffrey Hugo <quic_jhugo@quicinc.com>
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm multimedia clock control module provides the clocks, resets and
@@ -297,6 +297,7 @@ allOf:
- description: HDMI phy PLL clock
- description: DisplayPort phy PLL link clock
- description: DisplayPort phy PLL vco clock
+ - description: Global PLL 0 DIV clock
clock-names:
items:
@@ -309,6 +310,7 @@ allOf:
- const: hdmipll
- const: dplink
- const: dpvco
+ - const: gpll0_div
- if:
properties:
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,msm8996-cbf.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,msm8996-cbf.yaml
index 3ffe69d8cdd5..0dfbd8c4d465 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,msm8996-cbf.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,msm8996-cbf.yaml
@@ -15,7 +15,9 @@ description: >
properties:
compatible:
- const: qcom,msm8996-cbf
+ enum:
+ - qcom,msm8996-cbf
+ - qcom,msm8996pro-cbf
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,msm8998-gpucc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,msm8998-gpucc.yaml
index 2d8897991663..7b271ae210a3 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,msm8998-gpucc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,msm8998-gpucc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Graphics Clock & Reset Controller on MSM8998
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm graphics clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-ecpricc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-ecpricc.yaml
new file mode 100644
index 000000000000..fd21df0e7697
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-ecpricc.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,qdu1000-ecpricc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm ECPRI Clock & Reset Controller for QDU1000 and QRU1000
+
+maintainers:
+ - Taniya Das <quic_tdas@quicinc.com>
+ - Imran Shaik <quic_imrashai@quicinc.com>
+
+description: |
+ Qualcomm ECPRI Specification V2.0 Common Public Radio Interface clock control
+ module which supports the clocks, resets on QDU1000 and QRU1000
+
+ See also:: include/dt-bindings/clock/qcom,qdu1000-ecpricc.h
+
+properties:
+ compatible:
+ enum:
+ - qcom,qdu1000-ecpricc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Board XO source
+ - description: GPLL0 source from GCC
+ - description: GPLL1 source from GCC
+ - description: GPLL2 source from GCC
+ - description: GPLL3 source from GCC
+ - description: GPLL4 source from GCC
+ - description: GPLL5 source from GCC
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - '#clock-cells'
+ - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,qdu1000-gcc.h>
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ clock-controller@280000 {
+ compatible = "qcom,qdu1000-ecpricc";
+ reg = <0x00280000 0x31c00>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_ECPRI_CC_GPLL0_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL1_EVEN_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL2_EVEN_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL3_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL4_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL5_EVEN_CLK_SRC>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-gcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-gcc.yaml
index 767a9d03aa32..d712b1a87e25 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-gcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,qdu1000-gcc.yaml
@@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller for QDU1000 and QRU1000
maintainers:
- - Melody Olvera <quic_molvera@quicinc.com>
+ - Taniya Das <quic_tdas@quicinc.com>
+ - Imran Shaik <quic_imrashai@quicinc.com>
description: |
Qualcomm global clock control module which supports the clocks, resets and
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,rpmhcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,rpmhcc.yaml
index 267cf8c26823..ca857942ed6c 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,rpmhcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,rpmhcc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Technologies, Inc. RPMh Clocks
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Resource Power Manager Hardened (RPMh) manages shared resources on
@@ -28,12 +28,15 @@ properties:
- qcom,sdx55-rpmh-clk
- qcom,sdx65-rpmh-clk
- qcom,sdx75-rpmh-clk
+ - qcom,sm4450-rpmh-clk
- qcom,sm6350-rpmh-clk
- qcom,sm8150-rpmh-clk
- qcom,sm8250-rpmh-clk
- qcom,sm8350-rpmh-clk
- qcom,sm8450-rpmh-clk
- qcom,sm8550-rpmh-clk
+ - qcom,sm8650-rpmh-clk
+ - qcom,x1e80100-rpmh-clk
clocks:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-camcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-camcc.yaml
index 098c8acf4bad..c7fe6400ea13 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-camcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-camcc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Camera Clock & Reset Controller on SC7180
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm camera clock control module provides the clocks, resets and power
@@ -15,6 +15,9 @@ description: |
See also:: include/dt-bindings/clock/qcom,camcc-sc7180.h
+allOf:
+ - $ref: qcom,gcc.yaml#
+
properties:
compatible:
const: qcom,sc7180-camcc
@@ -31,28 +34,15 @@ properties:
- const: iface
- const: xo
- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
reg:
maxItems: 1
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- - '#power-domain-cells'
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-dispcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-dispcc.yaml
index 95ad16d0abc3..1c9ce300a435 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-dispcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-dispcc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Display Clock & Reset Controller on SC7180
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm display clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-lpasscorecc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-lpasscorecc.yaml
index f297694ef8b8..fdfb389083c1 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-lpasscorecc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-lpasscorecc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm LPASS Core Clock Controller on SC7180
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm LPASS core clock control module provides the clocks and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-mss.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-mss.yaml
index 1e856a8a996e..873a2f918bac 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-mss.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7180-mss.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Modem Clock Controller on SC7180
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm modem clock control module provides the clocks on SC7180.
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-camcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-camcc.yaml
index b60adbad4590..dcef8de3a905 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-camcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-camcc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Camera Clock & Reset Controller on SC7280
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm camera clock control module provides the clocks, resets and
@@ -15,6 +15,9 @@ description: |
See also:: include/dt-bindings/clock/qcom,camcc-sc7280.h
+allOf:
+ - $ref: qcom,gcc.yaml#
+
properties:
compatible:
const: qcom,sc7280-camcc
@@ -31,28 +34,15 @@ properties:
- const: bi_tcxo_ao
- const: sleep_clk
- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
reg:
maxItems: 1
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- - '#power-domain-cells'
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-dispcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-dispcc.yaml
index cfe6594a0a6b..c42b0ef61385 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-dispcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-dispcc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Display Clock & Reset Controller on SC7280
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm display clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscc.yaml
index 97c6bd96e0cb..f44c5c130d2d 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm LPASS Core Clock Controller on SC7280
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm LPASS core clock control module provides the clocks and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscorecc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscorecc.yaml
index 447cdc447a0c..deee5423d66e 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscorecc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sc7280-lpasscorecc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm LPASS Core & Audio Clock Controller on SC7280
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm LPASS core and audio clock control module provides the clocks and
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-camcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-camcc.yaml
index 91d1f7918037..810b852ae371 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-camcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-camcc.yaml
@@ -15,6 +15,9 @@ description: |
See also:: include/dt-bindings/clock/qcom,camcc-sm845.h
+allOf:
+ - $ref: qcom,gcc.yaml#
+
properties:
compatible:
const: qcom,sdm845-camcc
@@ -27,28 +30,15 @@ properties:
items:
- const: bi_tcxo
- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
reg:
maxItems: 1
required:
- compatible
- - reg
- clocks
- clock-names
- - '#clock-cells'
- - '#reset-cells'
- - '#power-domain-cells'
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-dispcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-dispcc.yaml
index 76b53ce64e40..719844d7ea11 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-dispcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sdm845-dispcc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Display Clock & Reset Controller on SDM845
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm display clock control module provides the clocks, resets and power
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm4450-gcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm4450-gcc.yaml
new file mode 100644
index 000000000000..5953c8d92436
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm4450-gcc.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sm4450-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on SM4450
+
+maintainers:
+ - Ajit Pandey <quic_ajipan@quicinc.com>
+ - Taniya Das <quic_tdas@quicinc.com>
+
+description: |
+ Qualcomm global clock control module provides the clocks, resets and power
+ domains on SM4450
+
+ See also:: include/dt-bindings/clock/qcom,sm4450-gcc.h
+
+properties:
+ compatible:
+ const: qcom,sm4450-gcc
+
+ clocks:
+ items:
+ - description: Board XO source
+ - description: Sleep clock source
+ - description: UFS Phy Rx symbol 0 clock source
+ - description: UFS Phy Rx symbol 1 clock source
+ - description: UFS Phy Tx symbol 0 clock source
+ - description: USB3 Phy wrapper pipe clock source
+
+required:
+ - compatible
+ - clocks
+
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ clock-controller@100000 {
+ compatible = "qcom,sm4450-gcc";
+ reg = <0x00100000 0x001f4200>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>, <&sleep_clk>,
+ <&ufs_mem_phy 0>, <&ufs_mem_phy 1>,
+ <&ufs_mem_phy 2>, <&usb_1_qmpphy>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8350-videocc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8350-videocc.yaml
index 23505c8c3dbd..46d1d91e3a01 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8350-videocc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8350-videocc.yaml
@@ -19,7 +19,9 @@ description: |
properties:
compatible:
- const: qcom,sm8350-videocc
+ enum:
+ - qcom,sc8280xp-videocc
+ - qcom,sm8350-videocc
clocks:
items:
@@ -51,7 +53,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@abf0000 {
compatible = "qcom,sm8350-videocc";
@@ -59,7 +61,7 @@ examples:
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-camcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-camcc.yaml
index 87ae74166807..48986460f994 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-camcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-camcc.yaml
@@ -13,11 +13,20 @@ description: |
Qualcomm camera clock control module provides the clocks, resets and power
domains on SM8450.
- See also:: include/dt-bindings/clock/qcom,sm8450-camcc.h
+ See also::
+ include/dt-bindings/clock/qcom,sm8450-camcc.h
+ include/dt-bindings/clock/qcom,sm8550-camcc.h
+ include/dt-bindings/clock/qcom,sc8280xp-camcc.h
+
+allOf:
+ - $ref: qcom,gcc.yaml#
properties:
compatible:
- const: qcom,sm8450-camcc
+ enum:
+ - qcom,sc8280xp-camcc
+ - qcom,sm8450-camcc
+ - qcom,sm8550-camcc
clocks:
items:
@@ -36,35 +45,22 @@ properties:
description:
A phandle to an OPP node describing required MMCX performance point.
- '#clock-cells':
- const: 1
-
- '#reset-cells':
- const: 1
-
- '#power-domain-cells':
- const: 1
-
reg:
maxItems: 1
required:
- compatible
- - reg
- clocks
- power-domains
- required-opps
- - '#clock-cells'
- - '#reset-cells'
- - '#power-domain-cells'
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-sm8450.h>
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@ade0000 {
compatible = "qcom,sm8450-camcc";
reg = <0xade0000 0x20000>;
@@ -72,7 +68,7 @@ examples:
<&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-dispcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-dispcc.yaml
index 1dd1f696dcd3..2f22310b08a9 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-dispcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-dispcc.yaml
@@ -76,7 +76,7 @@ examples:
- |
#include <dt-bindings/clock/qcom,gcc-sm8450.h>
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@af00000 {
compatible = "qcom,sm8450-dispcc";
reg = <0x0af00000 0x10000>;
@@ -91,7 +91,7 @@ examples:
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
};
...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-gpucc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-gpucc.yaml
index 2320be920a5f..1a384e8532a5 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-gpucc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-gpucc.yaml
@@ -17,12 +17,14 @@ description: |
include/dt-bindings/clock/qcom,sm8450-gpucc.h
include/dt-bindings/clock/qcom,sm8550-gpucc.h
include/dt-bindings/reset/qcom,sm8450-gpucc.h
+ include/dt-bindings/reset/qcom,sm8650-gpucc.h
properties:
compatible:
enum:
- qcom,sm8450-gpucc
- qcom,sm8550-gpucc
+ - qcom,sm8650-gpucc
clocks:
items:
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-videocc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-videocc.yaml
index f1c6dd50f184..bad8f019a8d3 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-videocc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8450-videocc.yaml
@@ -64,13 +64,13 @@ examples:
- |
#include <dt-bindings/clock/qcom,gcc-sm8450.h>
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
videocc: clock-controller@aaf0000 {
compatible = "qcom,sm8450-videocc";
reg = <0x0aaf0000 0x10000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_VIDEO_AHB_CLK>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-dispcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-dispcc.yaml
index ab25f7cbaa2e..c129f8c16b50 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-dispcc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-dispcc.yaml
@@ -76,7 +76,7 @@ examples:
- |
#include <dt-bindings/clock/qcom,sm8550-gcc.h>
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@af00000 {
compatible = "qcom,sm8550-dispcc";
reg = <0x0af00000 0x10000>;
@@ -99,7 +99,7 @@ examples:
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
};
...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-tcsr.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-tcsr.yaml
index 1bf1a41fd89c..af16b05eac96 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-tcsr.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8550-tcsr.yaml
@@ -13,12 +13,16 @@ description: |
Qualcomm TCSR clock control module provides the clocks, resets and
power domains on SM8550
- See also:: include/dt-bindings/clock/qcom,sm8550-tcsr.h
+ See also:
+ - include/dt-bindings/clock/qcom,sm8550-tcsr.h
+ - include/dt-bindings/clock/qcom,sm8650-tcsr.h
properties:
compatible:
items:
- - const: qcom,sm8550-tcsr
+ - enum:
+ - qcom,sm8550-tcsr
+ - qcom,sm8650-tcsr
- const: syscon
clocks:
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8650-dispcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8650-dispcc.yaml
new file mode 100644
index 000000000000..5e0c45c380f5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8650-dispcc.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sm8650-dispcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Display Clock & Reset Controller for SM8650
+
+maintainers:
+ - Bjorn Andersson <andersson@kernel.org>
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+description: |
+ Qualcomm display clock control module provides the clocks, resets and power
+ domains on SM8650.
+
+ See also:: include/dt-bindings/clock/qcom,sm8650-dispcc.h
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm8650-dispcc
+
+ clocks:
+ items:
+ - description: Board XO source
+ - description: Board Always On XO source
+ - description: Display's AHB clock
+ - description: sleep clock
+ - description: Byte clock from DSI PHY0
+ - description: Pixel clock from DSI PHY0
+ - description: Byte clock from DSI PHY1
+ - description: Pixel clock from DSI PHY1
+ - description: Link clock from DP PHY0
+ - description: VCO DIV clock from DP PHY0
+ - description: Link clock from DP PHY1
+ - description: VCO DIV clock from DP PHY1
+ - description: Link clock from DP PHY2
+ - description: VCO DIV clock from DP PHY2
+ - description: Link clock from DP PHY3
+ - description: VCO DIV clock from DP PHY3
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+ '#power-domain-cells':
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ power-domains:
+ description:
+ A phandle and PM domain specifier for the MMCX power domain.
+ maxItems: 1
+
+ required-opps:
+ description:
+ A phandle to an OPP node describing required MMCX performance point.
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - '#clock-cells'
+ - '#reset-cells'
+ - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,sm8650-gcc.h>
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+ clock-controller@af00000 {
+ compatible = "qcom,sm8650-dispcc";
+ reg = <0x0af00000 0x10000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&rpmhcc RPMH_CXO_CLK_A>,
+ <&gcc GCC_DISP_AHB_CLK>,
+ <&sleep_clk>,
+ <&dsi0_phy 0>,
+ <&dsi0_phy 1>,
+ <&dsi1_phy 0>,
+ <&dsi1_phy 1>,
+ <&dp0_phy 0>,
+ <&dp0_phy 1>,
+ <&dp1_phy 0>,
+ <&dp1_phy 1>,
+ <&dp2_phy 0>,
+ <&dp2_phy 1>,
+ <&dp3_phy 0>,
+ <&dp3_phy 1>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,sm8650-gcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,sm8650-gcc.yaml
new file mode 100644
index 000000000000..b54761cc8674
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,sm8650-gcc.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sm8650-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on SM8650
+
+maintainers:
+ - Bjorn Andersson <andersson@kernel.org>
+
+description: |
+ Qualcomm global clock control module provides the clocks, resets and power
+ domains on SM8650
+
+ See also:: include/dt-bindings/clock/qcom,sm8650-gcc.h
+
+properties:
+ compatible:
+ const: qcom,sm8650-gcc
+
+ clocks:
+ items:
+ - description: Board XO source
+ - description: Board Always On XO source
+ - description: Sleep clock source
+ - description: PCIE 0 Pipe clock source
+ - description: PCIE 1 Pipe clock source
+ - description: PCIE 1 Phy Auxiliary clock source
+ - description: UFS Phy Rx symbol 0 clock source
+ - description: UFS Phy Rx symbol 1 clock source
+ - description: UFS Phy Tx symbol 0 clock source
+ - description: USB3 Phy wrapper pipe clock source
+
+required:
+ - compatible
+ - clocks
+
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ clock-controller@100000 {
+ compatible = "qcom,sm8650-gcc";
+ reg = <0x00100000 0x001f4200>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&rpmhcc RPMH_CXO_CLK_A>,
+ <&sleep_clk>,
+ <&pcie0_phy>,
+ <&pcie1_phy>,
+ <&pcie_1_phy_aux_clk>,
+ <&ufs_mem_phy 0>,
+ <&ufs_mem_phy 1>,
+ <&ufs_mem_phy 2>,
+ <&usb_1_qmpphy>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,videocc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,videocc.yaml
index 2b07146161b4..6999e36ace1b 100644
--- a/sys/contrib/device-tree/Bindings/clock/qcom,videocc.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,videocc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Video Clock & Reset Controller
maintainers:
- - Taniya Das <tdas@codeaurora.org>
+ - Taniya Das <quic_tdas@quicinc.com>
description: |
Qualcomm video clock control module provides the clocks, resets and power
@@ -124,7 +124,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@ab00000 {
compatible = "qcom,sdm845-videocc";
reg = <0x0ab00000 0x10000>;
@@ -133,7 +133,7 @@ examples:
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
};
...
diff --git a/sys/contrib/device-tree/Bindings/clock/qcom,x1e80100-gcc.yaml b/sys/contrib/device-tree/Bindings/clock/qcom,x1e80100-gcc.yaml
new file mode 100644
index 000000000000..14a796dbf8bc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/qcom,x1e80100-gcc.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,x1e80100-gcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Global Clock & Reset Controller on X1E80100
+
+maintainers:
+ - Rajendra Nayak <quic_rjendra@quicinc.com>
+
+description: |
+ Qualcomm global clock control module provides the clocks, resets and power
+ domains on X1E80100
+
+ See also:: include/dt-bindings/clock/qcom,x1e80100-gcc.h
+
+properties:
+ compatible:
+ const: qcom,x1e80100-gcc
+
+ clocks:
+ items:
+ - description: Board XO source
+ - description: Sleep clock source
+ - description: PCIe 3 pipe clock
+ - description: PCIe 4 pipe clock
+ - description: PCIe 5 pipe clock
+ - description: PCIe 6a pipe clock
+ - description: PCIe 6b pipe clock
+ - description: USB QMP Phy 0 clock source
+ - description: USB QMP Phy 1 clock source
+ - description: USB QMP Phy 2 clock source
+
+ power-domains:
+ description:
+ A phandle and PM domain specifier for the CX power domain.
+ maxItems: 1
+
+required:
+ - compatible
+ - clocks
+ - power-domains
+
+allOf:
+ - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+ clock-controller@100000 {
+ compatible = "qcom,x1e80100-gcc";
+ reg = <0x00100000 0x200000>;
+ clocks = <&bi_tcxo_div2>,
+ <&sleep_clk>,
+ <&pcie3_phy>,
+ <&pcie4_phy>,
+ <&pcie5_phy>,
+ <&pcie6a_phy>,
+ <&pcie6b_phy>,
+ <&usb_1_ss0_qmpphy 0>,
+ <&usb_1_ss1_qmpphy 1>,
+ <&usb_1_ss2_qmpphy 2>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/renesas,5p35023.yaml b/sys/contrib/device-tree/Bindings/clock/renesas,5p35023.yaml
new file mode 100644
index 000000000000..42b6f80613f3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/renesas,5p35023.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/renesas,5p35023.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas 5p35023 VersaClock 3 programmable I2C clock generator
+
+maintainers:
+ - Biju Das <biju.das.jz@bp.renesas.com>
+
+description: |
+ The 5P35023 is a VersaClock programmable clock generator and
+ is designed for low-power, consumer, and high-performance PCI
+ express applications. The 5P35023 device is a three PLL
+ architecture design, and each PLL is individually programmable
+ and allowing for up to 6 unique frequency outputs.
+
+ An internal OTP memory allows the user to store the configuration
+ in the device. After power up, the user can change the device register
+ settings through the I2C interface when I2C mode is selected.
+
+ The driver can read a full register map from the DT, and will use that
+ register map to initialize the attached part (via I2C) when the system
+ boots. Any configuration not supported by the common clock framework
+ must be done via the full register map, including optimized settings.
+
+ Link to datasheet:
+ https://www.renesas.com/us/en/products/clocks-timing/clock-generation/programmable-clocks/5p35023-versaclock-3s-programmable-clock-generator
+
+properties:
+ compatible:
+ enum:
+ - renesas,5p35023
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ description:
+ The index in the assigned-clocks is mapped to the output clock as below
+ 0 - REF, 1 - SE1, 2 - SE2, 3 - SE3, 4 - DIFF1, 5 - DIFF2.
+ const: 1
+
+ clocks:
+ maxItems: 1
+
+ renesas,settings:
+ description: Optional, complete register map of the device.
+ Optimized settings for the device must be provided in full
+ and are written during initialization.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ maxItems: 37
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ versa3: clock-generator@68 {
+ compatible = "renesas,5p35023";
+ reg = <0x68>;
+ #clock-cells = <1>;
+
+ clocks = <&x1>;
+
+ renesas,settings = [
+ 80 00 11 19 4c 02 23 7f 83 19 08 a9 5f 25 24 bf
+ 00 14 7a e1 00 00 00 00 01 55 59 bb 3f 30 90 b6
+ 80 b0 45 c4 95
+ ];
+
+ assigned-clocks = <&versa3 0>, <&versa3 1>,
+ <&versa3 2>, <&versa3 3>,
+ <&versa3 4>, <&versa3 5>;
+ assigned-clock-rates = <24000000>, <11289600>,
+ <11289600>, <12000000>,
+ <25000000>, <12288000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/renesas,9series.yaml b/sys/contrib/device-tree/Bindings/clock/renesas,9series.yaml
index 3afdebdb52ad..af6319697b1c 100644
--- a/sys/contrib/device-tree/Bindings/clock/renesas,9series.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/renesas,9series.yaml
@@ -21,6 +21,15 @@ description: |
1 -- DIF1
2 -- DIF2
3 -- DIF3
+ - 9FGV0841:
+ 0 -- DIF0
+ 1 -- DIF1
+ 2 -- DIF2
+ 3 -- DIF3
+ 4 -- DIF4
+ 5 -- DIF5
+ 6 -- DIF6
+ 7 -- DIF7
maintainers:
- Marek Vasut <marex@denx.de>
@@ -30,6 +39,7 @@ properties:
enum:
- renesas,9fgv0241
- renesas,9fgv0441
+ - renesas,9fgv0841
reg:
description: I2C device address
diff --git a/sys/contrib/device-tree/Bindings/clock/renesas,rzg2l-cpg.yaml b/sys/contrib/device-tree/Bindings/clock/renesas,rzg2l-cpg.yaml
index fe2fba18ae84..80a8c7114c31 100644
--- a/sys/contrib/device-tree/Bindings/clock/renesas,rzg2l-cpg.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/renesas,rzg2l-cpg.yaml
@@ -27,6 +27,7 @@ properties:
- renesas,r9a07g043-cpg # RZ/G2UL{Type-1,Type-2} and RZ/Five
- renesas,r9a07g044-cpg # RZ/G2{L,LC}
- renesas,r9a07g054-cpg # RZ/V2L
+ - renesas,r9a08g045-cpg # RZ/G3S
- renesas,r9a09g011-cpg # RZ/V2M
reg:
diff --git a/sys/contrib/device-tree/Bindings/clock/silabs,si5351.yaml b/sys/contrib/device-tree/Bindings/clock/silabs,si5351.yaml
new file mode 100644
index 000000000000..d3e0ec29993b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/silabs,si5351.yaml
@@ -0,0 +1,265 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/silabs,si5351.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Labs Si5351A/B/C programmable I2C clock generators
+
+description: |
+ The Silicon Labs Si5351A/B/C are programmable I2C clock generators with up to
+ 8 outputs. Si5351A also has a reduced pin-count package (10-MSOP) where only 3
+ output clocks are accessible. The internal structure of the clock generators
+ can be found in [1].
+
+ [1] Si5351A/B/C Data Sheet
+ https://www.skyworksinc.com/-/media/Skyworks/SL/documents/public/data-sheets/Si5351-B.pdf
+
+maintainers:
+ - Alvin Šipraga <alsi@bang-olufsen.dk>
+
+properties:
+ compatible:
+ enum:
+ - silabs,si5351a # Si5351A, 20-QFN package
+ - silabs,si5351a-msop # Si5351A, 10-MSOP package
+ - silabs,si5351b # Si5351B, 20-QFN package
+ - silabs,si5351c # Si5351C, 20-QFN package
+
+ reg:
+ enum:
+ - 0x60
+ - 0x61
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ "#clock-cells":
+ const: 1
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: xtal
+ - const: clkin
+
+ silabs,pll-source:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ description: |
+ A list of cell pairs containing a PLL index and its source. Allows to
+ overwrite clock source of the internal PLLs.
+ items:
+ items:
+ - description: PLL A (0) or PLL B (1)
+ enum: [ 0, 1 ]
+ - description: PLL source, XTAL (0) or CLKIN (1, Si5351C only).
+ enum: [ 0, 1 ]
+
+ silabs,pll-reset-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ minItems: 1
+ maxItems: 2
+ description: A list of cell pairs containing a PLL index and its reset mode.
+ items:
+ items:
+ - description: PLL A (0) or PLL B (1)
+ enum: [ 0, 1 ]
+ - description: |
+ Reset mode for the PLL. Mode can be one of:
+
+ 0 - reset whenever PLL rate is adjusted (default mode)
+ 1 - do not reset when PLL rate is adjusted
+
+ In mode 1, the PLL is only reset if the silabs,pll-reset is
+ specified in one of the clock output child nodes that also sources
+ the PLL. This mode may be preferable if output clocks are expected
+ to be adjusted without glitches.
+ enum: [ 0, 1 ]
+
+patternProperties:
+ "^clkout@[0-7]$":
+ type: object
+
+ additionalProperties: false
+
+ properties:
+ reg:
+ description: Clock output number.
+
+ clock-frequency: true
+
+ silabs,clock-source:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Source clock of the this output's divider stage.
+
+ 0 - use multisynth N for this output, where N is the output number
+ 1 - use either multisynth 0 (if output number is 0-3) or multisynth 4
+ (otherwise) for this output
+ 2 - use XTAL for this output
+ 3 - use CLKIN for this output (Si5351C only)
+
+ silabs,drive-strength:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 2, 4, 6, 8 ]
+ description: Output drive strength in mA.
+
+ silabs,multisynth-source:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description:
+ Source PLL A (0) or B (1) for the corresponding multisynth divider.
+
+ silabs,pll-master:
+ type: boolean
+ description: |
+ The frequency of the source PLL is allowed to be changed by the
+ multisynth when setting the rate of this clock output.
+
+ silabs,pll-reset:
+ type: boolean
+ description: Reset the source PLL when enabling this clock output.
+
+ silabs,disable-state:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ Clock output disable state. The state can be one of:
+
+ 0 - clock output is driven LOW when disabled
+ 1 - clock output is driven HIGH when disabled
+ 2 - clock output is FLOATING (HIGH-Z) when disabled
+ 3 - clock output is never disabled
+
+ allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: silabs,si5351a-msop
+ then:
+ properties:
+ reg:
+ maximum: 2
+ else:
+ properties:
+ reg:
+ maximum: 7
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: silabs,si5351c
+ then:
+ properties:
+ silabs,clock-source:
+ enum: [ 0, 1, 2, 3 ]
+ else:
+ properties:
+ silabs,clock-source:
+ enum: [ 0, 1, 2 ]
+
+ required:
+ - reg
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - silabs,si5351a
+ - silabs,si5351a-msop
+ - silabs,si5351b
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ maxItems: 1
+
+required:
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+ - "#clock-cells"
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ clock-generator@60 {
+ compatible = "silabs,si5351a-msop";
+ reg = <0x60>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #clock-cells = <1>;
+
+ /* Connect XTAL input to 25MHz reference */
+ clocks = <&ref25>;
+ clock-names = "xtal";
+
+ /* Use XTAL input as source of PLL0 and PLL1 */
+ silabs,pll-source = <0 0>, <1 0>;
+
+ /* Don't reset PLL1 on rate adjustment */
+ silabs,pll-reset-mode = <1 1>;
+
+ /*
+ * Overwrite CLK0 configuration with:
+ * - 8 mA output drive strength
+ * - PLL0 as clock source of multisynth 0
+ * - Multisynth 0 as clock source of output divider
+ * - Multisynth 0 can change PLL0
+ * - Set initial clock frequency of 74.25MHz
+ */
+ clkout@0 {
+ reg = <0>;
+ silabs,drive-strength = <8>;
+ silabs,multisynth-source = <0>;
+ silabs,clock-source = <0>;
+ silabs,pll-master;
+ clock-frequency = <74250000>;
+ };
+
+ /*
+ * Overwrite CLK1 configuration with:
+ * - 4 mA output drive strength
+ * - PLL1 as clock source of multisynth 1
+ * - Multisynth 1 as clock source of output divider
+ * - Multisynth 1 can change PLL1
+ * - Reset PLL1 when enabling this clock output
+ */
+ clkout@1 {
+ reg = <1>;
+ silabs,drive-strength = <4>;
+ silabs,multisynth-source = <1>;
+ silabs,clock-source = <0>;
+ silabs,pll-master;
+ silabs,pll-reset;
+ };
+
+ /*
+ * Overwrite CLK2 configuration with:
+ * - XTAL as clock source of output divider
+ */
+ clkout@2 {
+ reg = <2>;
+ silabs,clock-source = <2>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/sophgo,cv1800-clk.yaml b/sys/contrib/device-tree/Bindings/clock/sophgo,cv1800-clk.yaml
new file mode 100644
index 000000000000..c1dc24673c0d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/sophgo,cv1800-clk.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/sophgo,cv1800-clk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo CV1800 Series Clock Controller
+
+maintainers:
+ - Inochi Amaoto <inochiama@outlook.com>
+
+properties:
+ compatible:
+ enum:
+ - sophgo,cv1800-clk
+ - sophgo,cv1810-clk
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+ description:
+ See <dt-bindings/clock/sophgo,cv1800.h> for valid indices.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@3002000 {
+ compatible = "sophgo,cv1800-clk";
+ reg = <0x03002000 0x1000>;
+ clocks = <&osc>;
+ #clock-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/sprd,sc9863a-clk.yaml b/sys/contrib/device-tree/Bindings/clock/sprd,sc9863a-clk.yaml
index 1703e305e6d8..a0658056c330 100644
--- a/sys/contrib/device-tree/Bindings/clock/sprd,sc9863a-clk.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/sprd,sc9863a-clk.yaml
@@ -66,7 +66,7 @@ then:
else:
description: |
Other SC9863a clock nodes should be the child of a syscon node in
- which compatible string shoule be:
+ which compatible string should be:
"sprd,sc9863a-glbregs", "syscon", "simple-mfd"
The 'reg' property for the clock node is also required if there is a sub
diff --git a/sys/contrib/device-tree/Bindings/clock/st,stm32mp25-rcc.yaml b/sys/contrib/device-tree/Bindings/clock/st,stm32mp25-rcc.yaml
new file mode 100644
index 000000000000..7732e79a42b9
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/st,stm32mp25-rcc.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/st,stm32mp25-rcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STM32MP25 Reset Clock Controller
+
+maintainers:
+ - Gabriel Fernandez <gabriel.fernandez@foss.st.com>
+
+description: |
+ The RCC hardware block is both a reset and a clock controller.
+ RCC makes also power management (resume/supend).
+
+ See also::
+ include/dt-bindings/clock/st,stm32mp25-rcc.h
+ include/dt-bindings/reset/st,stm32mp25-rcc.h
+
+properties:
+ compatible:
+ enum:
+ - st,stm32mp25-rcc
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+ clocks:
+ items:
+ - description: CK_SCMI_HSE High Speed External oscillator (8 to 48 MHz)
+ - description: CK_SCMI_HSI High Speed Internal oscillator (~ 64 MHz)
+ - description: CK_SCMI_MSI Low Power Internal oscillator (~ 4 MHz or ~ 16 MHz)
+ - description: CK_SCMI_LSE Low Speed External oscillator (32 KHz)
+ - description: CK_SCMI_LSI Low Speed Internal oscillator (~ 32 KHz)
+
+ clock-names:
+ items:
+ - const: hse
+ - const: hsi
+ - const: msi
+ - const: lse
+ - const: lsi
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+ - '#reset-cells'
+ - clocks
+ - clock-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/st,stm32mp25-rcc.h>
+
+ rcc: clock-controller@44200000 {
+ compatible = "st,stm32mp25-rcc";
+ reg = <0x44200000 0x10000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ clock-names = "hse", "hsi", "msi", "lse", "lsi";
+ clocks = <&scmi_clk CK_SCMI_HSE>,
+ <&scmi_clk CK_SCMI_HSI>,
+ <&scmi_clk CK_SCMI_MSI>,
+ <&scmi_clk CK_SCMI_LSE>,
+ <&scmi_clk CK_SCMI_LSI>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-ispcrg.yaml b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-ispcrg.yaml
new file mode 100644
index 000000000000..3b8b85be5cd0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-ispcrg.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/starfive,jh7110-ispcrg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 Image-Signal-Process Clock and Reset Generator
+
+maintainers:
+ - Xingyu Wu <xingyu.wu@starfivetech.com>
+
+properties:
+ compatible:
+ const: starfive,jh7110-ispcrg
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: ISP Top core
+ - description: ISP Top Axi
+ - description: NOC ISP Bus
+ - description: external DVP
+
+ clock-names:
+ items:
+ - const: isp_top_core
+ - const: isp_top_axi
+ - const: noc_bus_isp_axi
+ - const: dvp_clk
+
+ resets:
+ items:
+ - description: ISP Top core
+ - description: ISP Top Axi
+ - description: NOC ISP Bus
+
+ '#clock-cells':
+ const: 1
+ description:
+ See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
+
+ '#reset-cells':
+ const: 1
+ description:
+ See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
+
+ power-domains:
+ maxItems: 1
+ description:
+ ISP domain power
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - '#clock-cells'
+ - '#reset-cells'
+ - power-domains
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/starfive,jh7110-crg.h>
+ #include <dt-bindings/power/starfive,jh7110-pmu.h>
+ #include <dt-bindings/reset/starfive,jh7110-crg.h>
+
+ ispcrg: clock-controller@19810000 {
+ compatible = "starfive,jh7110-ispcrg";
+ reg = <0x19810000 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_ISP_TOP_CORE>,
+ <&syscrg JH7110_SYSCLK_ISP_TOP_AXI>,
+ <&syscrg JH7110_SYSCLK_NOC_BUS_ISP_AXI>,
+ <&dvp_clk>;
+ clock-names = "isp_top_core", "isp_top_axi",
+ "noc_bus_isp_axi", "dvp_clk";
+ resets = <&syscrg JH7110_SYSRST_ISP_TOP>,
+ <&syscrg JH7110_SYSRST_ISP_TOP_AXI>,
+ <&syscrg JH7110_SYSRST_NOC_BUS_ISP_AXI>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ power-domains = <&pwrc JH7110_PD_ISP>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-pll.yaml b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-pll.yaml
new file mode 100644
index 000000000000..be8300ce86d0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-pll.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 PLL Clock Generator
+
+description:
+ These PLLs are high speed, low jitter frequency synthesizers in the JH7110.
+ Each PLL works in integer mode or fraction mode, with configuration
+ registers in the sys syscon. So the PLLs node should be a child of
+ SYS-SYSCON node.
+ The formula for calculating frequency is
+ Fvco = Fref * (NI + NF) / M / Q1
+
+maintainers:
+ - Xingyu Wu <xingyu.wu@starfivetech.com>
+
+properties:
+ compatible:
+ const: starfive,jh7110-pll
+
+ clocks:
+ maxItems: 1
+ description: Main Oscillator (24 MHz)
+
+ '#clock-cells':
+ const: 1
+ description:
+ See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
+
+required:
+ - compatible
+ - clocks
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller {
+ compatible = "starfive,jh7110-pll";
+ clocks = <&osc>;
+ #clock-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-stgcrg.yaml b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-stgcrg.yaml
new file mode 100644
index 000000000000..b64ccd84200a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-stgcrg.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/starfive,jh7110-stgcrg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 System-Top-Group Clock and Reset Generator
+
+maintainers:
+ - Xingyu Wu <xingyu.wu@starfivetech.com>
+
+properties:
+ compatible:
+ const: starfive,jh7110-stgcrg
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Main Oscillator (24 MHz)
+ - description: HIFI4 core
+ - description: STG AXI/AHB
+ - description: USB (125 MHz)
+ - description: CPU Bus
+ - description: HIFI4 Axi
+ - description: NOC STG Bus
+ - description: APB Bus
+
+ clock-names:
+ items:
+ - const: osc
+ - const: hifi4_core
+ - const: stg_axiahb
+ - const: usb_125m
+ - const: cpu_bus
+ - const: hifi4_axi
+ - const: nocstg_bus
+ - const: apb_bus
+
+ '#clock-cells':
+ const: 1
+ description:
+ See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
+
+ '#reset-cells':
+ const: 1
+ description:
+ See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - '#clock-cells'
+ - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/starfive,jh7110-crg.h>
+
+ stgcrg: clock-controller@10230000 {
+ compatible = "starfive,jh7110-stgcrg";
+ reg = <0x10230000 0x10000>;
+ clocks = <&osc>,
+ <&syscrg JH7110_SYSCLK_HIFI4_CORE>,
+ <&syscrg JH7110_SYSCLK_STG_AXIAHB>,
+ <&syscrg JH7110_SYSCLK_USB_125M>,
+ <&syscrg JH7110_SYSCLK_CPU_BUS>,
+ <&syscrg JH7110_SYSCLK_HIFI4_AXI>,
+ <&syscrg JH7110_SYSCLK_NOCSTG_BUS>,
+ <&syscrg JH7110_SYSCLK_APB_BUS>;
+ clock-names = "osc", "hifi4_core",
+ "stg_axiahb", "usb_125m",
+ "cpu_bus", "hifi4_axi",
+ "nocstg_bus", "apb_bus";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-syscrg.yaml b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-syscrg.yaml
index 84373ae31644..5ba0a885aa80 100644
--- a/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-syscrg.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-syscrg.yaml
@@ -27,6 +27,9 @@ properties:
- description: External I2S RX left/right channel clock
- description: External TDM clock
- description: External audio master clock
+ - description: PLL0
+ - description: PLL1
+ - description: PLL2
- items:
- description: Main Oscillator (24 MHz)
@@ -38,6 +41,9 @@ properties:
- description: External I2S RX left/right channel clock
- description: External TDM clock
- description: External audio master clock
+ - description: PLL0
+ - description: PLL1
+ - description: PLL2
clock-names:
oneOf:
@@ -52,6 +58,9 @@ properties:
- const: i2srx_lrck_ext
- const: tdm_ext
- const: mclk_ext
+ - const: pll0_out
+ - const: pll1_out
+ - const: pll2_out
- items:
- const: osc
@@ -63,6 +72,9 @@ properties:
- const: i2srx_lrck_ext
- const: tdm_ext
- const: mclk_ext
+ - const: pll0_out
+ - const: pll1_out
+ - const: pll2_out
'#clock-cells':
const: 1
@@ -93,12 +105,14 @@ examples:
<&gmac1_rgmii_rxin>,
<&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
<&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
- <&tdm_ext>, <&mclk_ext>;
+ <&tdm_ext>, <&mclk_ext>,
+ <&pllclk 0>, <&pllclk 1>, <&pllclk 2>;
clock-names = "osc", "gmac1_rmii_refin",
"gmac1_rgmii_rxin",
"i2stx_bclk_ext", "i2stx_lrck_ext",
"i2srx_bclk_ext", "i2srx_lrck_ext",
- "tdm_ext", "mclk_ext";
+ "tdm_ext", "mclk_ext",
+ "pll0_out", "pll1_out", "pll2_out";
#clock-cells = <1>;
#reset-cells = <1>;
};
diff --git a/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-voutcrg.yaml b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-voutcrg.yaml
new file mode 100644
index 000000000000..af77bd8c86b1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/clock/starfive,jh7110-voutcrg.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/starfive,jh7110-voutcrg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 Video-Output Clock and Reset Generator
+
+maintainers:
+ - Xingyu Wu <xingyu.wu@starfivetech.com>
+
+properties:
+ compatible:
+ const: starfive,jh7110-voutcrg
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Vout Top core
+ - description: Vout Top Ahb
+ - description: Vout Top Axi
+ - description: Vout Top HDMI MCLK
+ - description: I2STX0 BCLK
+ - description: external HDMI pixel
+
+ clock-names:
+ items:
+ - const: vout_src
+ - const: vout_top_ahb
+ - const: vout_top_axi
+ - const: vout_top_hdmitx0_mclk
+ - const: i2stx0_bclk
+ - const: hdmitx0_pixelclk
+
+ resets:
+ maxItems: 1
+ description: Vout Top core
+
+ '#clock-cells':
+ const: 1
+ description:
+ See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
+
+ '#reset-cells':
+ const: 1
+ description:
+ See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
+
+ power-domains:
+ maxItems: 1
+ description:
+ Vout domain power
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - '#clock-cells'
+ - '#reset-cells'
+ - power-domains
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/starfive,jh7110-crg.h>
+ #include <dt-bindings/power/starfive,jh7110-pmu.h>
+ #include <dt-bindings/reset/starfive,jh7110-crg.h>
+
+ voutcrg: clock-controller@295C0000 {
+ compatible = "starfive,jh7110-voutcrg";
+ reg = <0x295C0000 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
+ <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
+ <&hdmitx0_pixelclk>;
+ clock-names = "vout_src", "vout_top_ahb",
+ "vout_top_axi", "vout_top_hdmitx0_mclk",
+ "i2stx0_bclk", "hdmitx0_pixelclk";
+ resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ power-domains = <&pwrc JH7110_PD_VOUT>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/clock/ti,cdce925.yaml b/sys/contrib/device-tree/Bindings/clock/ti,cdce925.yaml
index a4ec8dd5ddf1..95c1c6f8b755 100644
--- a/sys/contrib/device-tree/Bindings/clock/ti,cdce925.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/ti,cdce925.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/ti,cdce925.yaml#
diff --git a/sys/contrib/device-tree/Bindings/clock/ti,sci-clk.yaml b/sys/contrib/device-tree/Bindings/clock/ti,sci-clk.yaml
index 63d976341696..0a9d6a4c4b66 100644
--- a/sys/contrib/device-tree/Bindings/clock/ti,sci-clk.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/ti,sci-clk.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/ti,sci-clk.yaml#
diff --git a/sys/contrib/device-tree/Bindings/clock/ti/mux.txt b/sys/contrib/device-tree/Bindings/clock/ti/mux.txt
index e17425a58621..b33f641f1043 100644
--- a/sys/contrib/device-tree/Bindings/clock/ti/mux.txt
+++ b/sys/contrib/device-tree/Bindings/clock/ti/mux.txt
@@ -8,7 +8,7 @@ parents, one of which can be selected as output. This clock does not
gate or adjust the parent rate via a divider or multiplier.
By default the "clocks" property lists the parents in the same order
-as they are programmed into the regster. E.g:
+as they are programmed into the register. E.g:
clocks = <&foo_clock>, <&bar_clock>, <&baz_clock>;
diff --git a/sys/contrib/device-tree/Bindings/clock/vf610-clock.txt b/sys/contrib/device-tree/Bindings/clock/vf610-clock.txt
index 63f9f1ac3439..109ffa3a5b66 100644
--- a/sys/contrib/device-tree/Bindings/clock/vf610-clock.txt
+++ b/sys/contrib/device-tree/Bindings/clock/vf610-clock.txt
@@ -9,7 +9,7 @@ Optional properties:
- clocks: list of clock identifiers which are external input clocks to the
given clock controller. Please refer the next section to find
the input clocks for a given controller.
-- clock-names: list of names of clocks which are exteral input clocks to the
+- clock-names: list of names of clocks which are external input clocks to the
given clock controller.
Input clocks for top clock controller:
diff --git a/sys/contrib/device-tree/Bindings/clock/xlnx,clocking-wizard.yaml b/sys/contrib/device-tree/Bindings/clock/xlnx,clocking-wizard.yaml
index 02bd556bd91a..9d5324dc1027 100644
--- a/sys/contrib/device-tree/Bindings/clock/xlnx,clocking-wizard.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/xlnx,clocking-wizard.yaml
@@ -20,6 +20,7 @@ properties:
- xlnx,clocking-wizard
- xlnx,clocking-wizard-v5.2
- xlnx,clocking-wizard-v6.0
+ - xlnx,versal-clk-wizard
reg:
diff --git a/sys/contrib/device-tree/Bindings/clock/xlnx,versal-clk.yaml b/sys/contrib/device-tree/Bindings/clock/xlnx,versal-clk.yaml
index 5cbb34d0b61b..bef109d163a8 100644
--- a/sys/contrib/device-tree/Bindings/clock/xlnx,versal-clk.yaml
+++ b/sys/contrib/device-tree/Bindings/clock/xlnx,versal-clk.yaml
@@ -14,11 +14,16 @@ description: |
reads required input clock frequencies from the devicetree and acts as clock
provider for all clock consumers of PS clocks.
-select: false
-
properties:
compatible:
- const: xlnx,versal-clk
+ oneOf:
+ - enum:
+ - xlnx,versal-clk
+ - xlnx,zynqmp-clk
+ - items:
+ - enum:
+ - xlnx,versal-net-clk
+ - const: xlnx,versal-clk
"#clock-cells":
const: 1
@@ -26,16 +31,12 @@ properties:
clocks:
description: List of clock specifiers which are external input
clocks to the given clock controller.
- items:
- - description: reference clock
- - description: alternate reference clock
- - description: alternate reference clock for programmable logic
+ minItems: 2
+ maxItems: 8
clock-names:
- items:
- - const: ref
- - const: alt_ref
- - const: pl_alt_ref
+ minItems: 2
+ maxItems: 8
required:
- compatible
@@ -45,6 +46,80 @@ required:
additionalProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - xlnx,versal-clk
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: reference clock
+ - description: alternate reference clock for programmable logic
+
+ clock-names:
+ items:
+ - const: ref
+ - const: pl_alt_ref
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - xlnx,versal-net-clk
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: reference clock
+ - description: alternate reference clock for programmable logic
+ - description: alternate reference clock
+
+ clock-names:
+ items:
+ - const: ref
+ - const: pl_alt_ref
+ - const: alt_ref
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - xlnx,zynqmp-clk
+
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ items:
+ - description: PS reference clock
+ - description: reference clock for video system
+ - description: alternative PS reference clock
+ - description: auxiliary reference clock
+ - description: transceiver reference clock
+ - description: (E)MIO clock source (Optional clock)
+ - description: GEM emio clock (Optional clock)
+ - description: Watchdog external clock (Optional clock)
+
+ clock-names:
+ minItems: 5
+ items:
+ - const: pss_ref_clk
+ - const: video_clk
+ - const: pss_alt_ref_clk
+ - const: aux_ref_clk
+ - const: gt_crx_ref_clk
+ - pattern: "^mio_clk[00-77]+.*$"
+ - pattern: "gem[0-3]+_emio_clk.*$"
+ - pattern: "swdt[0-1]+_ext_clk.*$"
+
examples:
- |
firmware {
@@ -54,9 +129,18 @@ examples:
versal_clk: clock-controller {
#clock-cells = <1>;
compatible = "xlnx,versal-clk";
- clocks = <&ref>, <&alt_ref>, <&pl_alt_ref>;
- clock-names = "ref", "alt_ref", "pl_alt_ref";
+ clocks = <&ref>, <&pl_alt_ref>;
+ clock-names = "ref", "pl_alt_ref";
};
};
};
+
+ clock-controller {
+ #clock-cells = <1>;
+ compatible = "xlnx,zynqmp-clk";
+ clocks = <&pss_ref_clk>, <&video_clk>, <&pss_alt_ref_clk>,
+ <&aux_ref_clk>, <&gt_crx_ref_clk>;
+ clock-names = "pss_ref_clk", "video_clk", "pss_alt_ref_clk",
+ "aux_ref_clk", "gt_crx_ref_clk";
+ };
...
diff --git a/sys/contrib/device-tree/Bindings/connector/usb-connector.yaml b/sys/contrib/device-tree/Bindings/connector/usb-connector.yaml
index 1c4d3eb87763..fb216ce68bb3 100644
--- a/sys/contrib/device-tree/Bindings/connector/usb-connector.yaml
+++ b/sys/contrib/device-tree/Bindings/connector/usb-connector.yaml
@@ -30,6 +30,9 @@ properties:
- const: samsung,usb-connector-11pin
- const: usb-b-connector
+ reg:
+ maxItems: 1
+
label:
description: Symbolic name for the connector.
@@ -63,7 +66,6 @@ properties:
Particularly, if use an output GPIO to control a VBUS regulator, should
model it as a regulator. See bindings/regulator/fixed-regulator.yaml
- # The following are optional properties for "usb-c-connector".
power-role:
description: Determines the power role that the Type C connector will
support. "dual" refers to Dual Role Port (DRP).
@@ -116,30 +118,6 @@ properties:
# The following are optional properties for "usb-c-connector" with power
# delivery support.
- source-pdos:
- description: An array of u32 with each entry providing supported power
- source data object(PDO), the detailed bit definitions of PDO can be found
- in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2
- Source_Capabilities Message, the order of each entry(PDO) should follow
- the PD spec chapter 6.4.1. Required for power source and power dual role.
- User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()
- defined in dt-bindings/usb/pd.h.
- minItems: 1
- maxItems: 7
- $ref: /schemas/types.yaml#/definitions/uint32-array
-
- sink-pdos:
- description: An array of u32 with each entry providing supported power sink
- data object(PDO), the detailed bit definitions of PDO can be found in
- "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3
- Sink Capabilities Message, the order of each entry(PDO) should follow the
- PD spec chapter 6.4.1. Required for power sink and power dual role. User
- can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined
- in dt-bindings/usb/pd.h.
- minItems: 1
- maxItems: 7
- $ref: /schemas/types.yaml#/definitions/uint32-array
-
sink-vdos:
description: An array of u32 with each entry, a Vendor Defined Message Object (VDO),
providing additional information corresponding to the product, the detailed bit
@@ -163,10 +141,43 @@ properties:
maxItems: 6
$ref: /schemas/types.yaml#/definitions/uint32-array
- op-sink-microwatt:
- description: Sink required operating power in microwatt, if source can't
- offer the power, Capability Mismatch is set. Required for power sink and
- power dual role.
+ accessory-mode-audio:
+ type: boolean
+ description: Whether the device supports Audio Adapter Accessory Mode. This
+ is only necessary if there are no other means to discover supported
+ alternative modes (e.g. through the UCSI firmware interface).
+
+ accessory-mode-debug:
+ type: boolean
+ description: Whether the device supports Debug Accessory Mode. This
+ is only necessary if there are no other means to discover supported
+ alternative modes (e.g. through the UCSI firmware interface).
+
+ altmodes:
+ type: object
+ description: List of Alternative Modes supported by the schematics on the
+ particular device. This is only necessary if there are no other means to
+ discover supported alternative modes (e.g. through the UCSI firmware
+ interface).
+
+ additionalProperties: false
+
+ patternProperties:
+ "^(displayport)$":
+ type: object
+ description:
+ A single USB-C Alternative Mode as supported by the USB-C connector logic.
+
+ additionalProperties: false
+
+ properties:
+ svid:
+ $ref: /schemas/types.yaml#/definitions/uint16
+ description: Unique value assigned by USB-IF to the Vendor / AltMode.
+ enum: [ 0xff01 ]
+ vdo:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: VDO returned by Discover Modes USB PD command.
port:
$ref: /schemas/graph.yaml#/properties/port
@@ -224,18 +235,67 @@ properties:
state as defined in 7.4.2 Sink Electrical Parameters of USB Power Delivery Specification
Revision 3.0, Version 1.2. When the property is set, the port requests pSnkStby(2.5W -
5V@500mA) upon entering SNK_DISCOVERY(instead of 3A or the 1.5A, Rp current advertised, during
- SNK_DISCOVERY) and the actual currrent limit after reception of PS_Ready for PD link or during
+ SNK_DISCOVERY) and the actual current limit after reception of PS_Ready for PD link or during
SNK_READY for non-pd link.
type: boolean
+ capabilities:
+ description: A child node to contain all the selectable USB Power Delivery capabilities.
+ type: object
+
+ patternProperties:
+ "^caps-[0-9]+$":
+ description: Child nodes under "capabilities" node. Each node contains a selectable USB
+ Power Delivery capability.
+ type: object
+ $ref: "#/$defs/capabilities"
+ unevaluatedProperties: false
+
+ additionalProperties: false
+
dependencies:
- sink-vdos-v1: [ 'sink-vdos' ]
- sink-vdos: [ 'sink-vdos-v1' ]
+ sink-vdos-v1: [ sink-vdos ]
+ sink-vdos: [ sink-vdos-v1 ]
required:
- compatible
+$defs:
+ capabilities:
+ type: object
+
+ properties:
+ source-pdos:
+ description: An array of u32 with each entry providing supported power
+ source data object(PDO), the detailed bit definitions of PDO can be found
+ in "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.2
+ Source_Capabilities Message, the order of each entry(PDO) should follow
+ the PD spec chapter 6.4.1. Required for power source and power dual role.
+ User can specify the source PDO array via PDO_FIXED/BATT/VAR/PPS_APDO()
+ defined in dt-bindings/usb/pd.h.
+ minItems: 1
+ maxItems: 7
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ sink-pdos:
+ description: An array of u32 with each entry providing supported power sink
+ data object(PDO), the detailed bit definitions of PDO can be found in
+ "Universal Serial Bus Power Delivery Specification" chapter 6.4.1.3
+ Sink Capabilities Message, the order of each entry(PDO) should follow the
+ PD spec chapter 6.4.1. Required for power sink and power dual role. User
+ can specify the sink PDO array via PDO_FIXED/BATT/VAR/PPS_APDO() defined
+ in dt-bindings/usb/pd.h.
+ minItems: 1
+ maxItems: 7
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ op-sink-microwatt:
+ description: Sink required operating power in microwatt, if source can't
+ offer the power, Capability Mismatch is set. Required for power sink and
+ power dual role.
+
allOf:
+ - $ref: "#/$defs/capabilities"
- if:
properties:
compatible:
@@ -264,7 +324,7 @@ anyOf:
- typec-power-opmode
- new-source-frs-typec-current
-additionalProperties: true
+unevaluatedProperties: false
examples:
# Micro-USB connector with HS lines routed via controller (MUIC).
@@ -286,6 +346,13 @@ examples:
compatible = "usb-c-connector";
label = "USB-C";
+ altmodes {
+ displayport {
+ svid = /bits/ 16 <0xff01>;
+ vdo = <0x00001c46>;
+ };
+ };
+
ports {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/cpu/idle-states.yaml b/sys/contrib/device-tree/Bindings/cpu/idle-states.yaml
index b3a5356f9916..239480ef7c30 100644
--- a/sys/contrib/device-tree/Bindings/cpu/idle-states.yaml
+++ b/sys/contrib/device-tree/Bindings/cpu/idle-states.yaml
@@ -243,7 +243,64 @@ description: |+
just supports idle_standby, an idle-states node is not required.
===========================================
- 6 - References
+ 6 - Qualcomm specific STATES
+ ===========================================
+
+ Idle states have different enter/exit latency and residency values.
+ The idle states supported by the QCOM SoC are defined as -
+
+ * Standby
+ * Retention
+ * Standalone Power Collapse (Standalone PC or SPC)
+ * Power Collapse (PC)
+
+ Standby: Standby does a little more in addition to architectural clock gating.
+ When the WFI instruction is executed the ARM core would gate its internal
+ clocks. In addition to gating the clocks, QCOM cpus use this instruction as a
+ trigger to execute the SPM state machine. The SPM state machine waits for the
+ interrupt to trigger the core back in to active. This triggers the cache
+ hierarchy to enter standby states, when all cpus are idle. An interrupt brings
+ the SPM state machine out of its wait, the next step is to ensure that the
+ cache hierarchy is also out of standby, and then the cpu is allowed to resume
+ execution. This state is defined as a generic ARM WFI state by the ARM cpuidle
+ driver and is not defined in the DT. The SPM state machine should be
+ configured to execute this state by default and after executing every other
+ state below.
+
+ Retention: Retention is a low power state where the core is clock gated and
+ the memory and the registers associated with the core are retained. The
+ voltage may be reduced to the minimum value needed to keep the processor
+ registers active. The SPM should be configured to execute the retention
+ sequence and would wait for interrupt, before restoring the cpu to execution
+ state. Retention may have a slightly higher latency than Standby.
+
+ Standalone PC: A cpu can power down and warmboot if there is a sufficient time
+ between the time it enters idle and the next known wake up. SPC mode is used
+ to indicate a core entering a power down state without consulting any other
+ cpu or the system resources. This helps save power only on that core. The SPM
+ sequence for this idle state is programmed to power down the supply to the
+ core, wait for the interrupt, restore power to the core, and ensure the
+ system state including cache hierarchy is ready before allowing core to
+ resume. Applying power and resetting the core causes the core to warmboot
+ back into Elevation Level (EL) which trampolines the control back to the
+ kernel. Entering a power down state for the cpu, needs to be done by trapping
+ into a EL. Failing to do so, would result in a crash enforced by the warm boot
+ code in the EL for the SoC. On SoCs with write-back L1 cache, the cache has to
+ be flushed in s/w, before powering down the core.
+
+ Power Collapse: This state is similar to the SPC mode, but distinguishes
+ itself in that the cpu acknowledges and permits the SoC to enter deeper sleep
+ modes. In a hierarchical power domain SoC, this means L2 and other caches can
+ be flushed, system bus, clocks - lowered, and SoC main XO clock gated and
+ voltages reduced, provided all cpus enter this state. Since the span of low
+ power modes possible at this state is vast, the exit latency and the residency
+ of this low power mode would be considered high even though at a cpu level,
+ this essentially is cpu power down. The SPM in this state also may handshake
+ with the Resource power manager (RPM) processor in the SoC to indicate a
+ complete application processor subsystem shut down.
+
+ ===========================================
+ 7 - References
===========================================
[1] ARM Linux Kernel documentation - CPUs bindings
@@ -301,9 +358,16 @@ patternProperties:
properties:
compatible:
- enum:
- - arm,idle-state
- - riscv,idle-state
+ oneOf:
+ - items:
+ - enum:
+ - qcom,idle-state-ret
+ - qcom,idle-state-spc
+ - qcom,idle-state-pc
+ - const: arm,idle-state
+ - enum:
+ - arm,idle-state
+ - riscv,idle-state
arm,psci-suspend-param:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -852,4 +916,13 @@ examples:
};
};
+ // Example 4 - Qualcomm SPC
+ idle-states {
+ cpu_spc: cpu-spc {
+ compatible = "qcom,idle-state-spc", "arm,idle-state";
+ entry-latency-us = <150>;
+ exit-latency-us = <200>;
+ min-residency-us = <2000>;
+ };
+ };
...
diff --git a/sys/contrib/device-tree/Bindings/cpu/nvidia,tegra186-ccplex-cluster.yaml b/sys/contrib/device-tree/Bindings/cpu/nvidia,tegra186-ccplex-cluster.yaml
new file mode 100644
index 000000000000..16a448974561
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/cpu/nvidia,tegra186-ccplex-cluster.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cpu/nvidia,tegra186-ccplex-cluster.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra186 CCPLEX Cluster
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ const: nvidia,tegra186-ccplex-cluster
+
+ reg:
+ maxItems: 1
+
+ nvidia,bpmp:
+ description: phandle to the BPMP used to query CPU frequency tables
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - nvidia,bpmp
+
+examples:
+ - |
+ ccplex@e000000 {
+ compatible = "nvidia,tegra186-ccplex-cluster";
+ reg = <0x0e000000 0x400000>;
+ nvidia,bpmp = <&bpmp>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/cpufreq/cpufreq-qcom-hw.yaml b/sys/contrib/device-tree/Bindings/cpufreq/cpufreq-qcom-hw.yaml
index a6b3bb8fdf33..56fc71d6a081 100644
--- a/sys/contrib/device-tree/Bindings/cpufreq/cpufreq-qcom-hw.yaml
+++ b/sys/contrib/device-tree/Bindings/cpufreq/cpufreq-qcom-hw.yaml
@@ -23,6 +23,7 @@ properties:
- enum:
- qcom,qcm2290-cpufreq-hw
- qcom,sc7180-cpufreq-hw
+ - qcom,sdm670-cpufreq-hw
- qcom,sdm845-cpufreq-hw
- qcom,sm6115-cpufreq-hw
- qcom,sm6350-cpufreq-hw
@@ -36,11 +37,13 @@ properties:
- qcom,sa8775p-cpufreq-epss
- qcom,sc7280-cpufreq-epss
- qcom,sc8280xp-cpufreq-epss
+ - qcom,sdx75-cpufreq-epss
- qcom,sm6375-cpufreq-epss
- qcom,sm8250-cpufreq-epss
- qcom,sm8350-cpufreq-epss
- qcom,sm8450-cpufreq-epss
- qcom,sm8550-cpufreq-epss
+ - qcom,sm8650-cpufreq-epss
- const: qcom,cpufreq-epss
reg:
@@ -49,6 +52,7 @@ properties:
- description: Frequency domain 0 register region
- description: Frequency domain 1 register region
- description: Frequency domain 2 register region
+ - description: Frequency domain 3 register region
reg-names:
minItems: 1
@@ -56,6 +60,7 @@ properties:
- const: freq-domain0
- const: freq-domain1
- const: freq-domain2
+ - const: freq-domain3
clocks:
items:
@@ -69,7 +74,7 @@ properties:
interrupts:
minItems: 1
- maxItems: 3
+ maxItems: 4
interrupt-names:
minItems: 1
@@ -77,6 +82,7 @@ properties:
- const: dcvsh-irq-0
- const: dcvsh-irq-1
- const: dcvsh-irq-2
+ - const: dcvsh-irq-3
'#freq-domain-cells':
const: 1
@@ -125,6 +131,7 @@ allOf:
- qcom,qdu1000-cpufreq-epss
- qcom,sc7180-cpufreq-hw
- qcom,sc8280xp-cpufreq-epss
+ - qcom,sdm670-cpufreq-hw
- qcom,sdm845-cpufreq-hw
- qcom,sm6115-cpufreq-hw
- qcom,sm6350-cpufreq-hw
diff --git a/sys/contrib/device-tree/Bindings/cpufreq/qcom-cpufreq-nvmem.yaml b/sys/contrib/device-tree/Bindings/cpufreq/qcom-cpufreq-nvmem.yaml
index 7e1bb992ce90..547265b8b118 100644
--- a/sys/contrib/device-tree/Bindings/cpufreq/qcom-cpufreq-nvmem.yaml
+++ b/sys/contrib/device-tree/Bindings/cpufreq/qcom-cpufreq-nvmem.yaml
@@ -27,8 +27,12 @@ select:
enum:
- qcom,apq8064
- qcom,apq8096
+ - qcom,ipq5332
+ - qcom,ipq6018
- qcom,ipq8064
- qcom,ipq8074
+ - qcom,ipq9574
+ - qcom,msm8909
- qcom,msm8939
- qcom,msm8960
- qcom,msm8974
@@ -43,7 +47,9 @@ patternProperties:
- if:
properties:
compatible:
- const: operating-points-v2-kryo-cpu
+ enum:
+ - operating-points-v2-krait-cpu
+ - operating-points-v2-kryo-cpu
then:
$ref: /schemas/opp/opp-v2-kryo-cpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/crypto/fsl-imx-sahara.yaml b/sys/contrib/device-tree/Bindings/crypto/fsl-imx-sahara.yaml
index d531f3af3ea4..41df80bcdcd9 100644
--- a/sys/contrib/device-tree/Bindings/crypto/fsl-imx-sahara.yaml
+++ b/sys/contrib/device-tree/Bindings/crypto/fsl-imx-sahara.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/crypto/fsl-imx-sahara.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Freescale SAHARA Cryptographic Accelerator included in some i.MX chips
+title: Freescale SAHARA Cryptographic Accelerator
maintainers:
- Steffen Trumtrar <s.trumtrar@pengutronix.de>
@@ -19,19 +19,56 @@ properties:
maxItems: 1
interrupts:
- maxItems: 1
+ items:
+ - description: SAHARA Interrupt for Host 0
+ - description: SAHARA Interrupt for Host 1
+ minItems: 1
+
+ clocks:
+ items:
+ - description: Sahara IPG clock
+ - description: Sahara AHB clock
+
+ clock-names:
+ items:
+ - const: ipg
+ - const: ahb
required:
- compatible
- reg
- interrupts
+ - clocks
+ - clock-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx53-sahara
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
additionalProperties: false
examples:
- |
+ #include <dt-bindings/clock/imx27-clock.h>
+
crypto@10025000 {
compatible = "fsl,imx27-sahara";
- reg = < 0x10025000 0x800>;
+ reg = <0x10025000 0x800>;
interrupts = <75>;
+ clocks = <&clks IMX27_CLK_SAHARA_IPG_GATE>,
+ <&clks IMX27_CLK_SAHARA_AHB_GATE>;
+ clock-names = "ipg", "ahb";
};
diff --git a/sys/contrib/device-tree/Bindings/crypto/inside-secure,safexcel.yaml b/sys/contrib/device-tree/Bindings/crypto/inside-secure,safexcel.yaml
new file mode 100644
index 000000000000..ef07258d16c1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/crypto/inside-secure,safexcel.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Inside Secure SafeXcel cryptographic engine
+
+maintainers:
+ - Antoine Tenart <atenart@kernel.org>
+
+properties:
+ compatible:
+ oneOf:
+ - const: inside-secure,safexcel-eip197b
+ - const: inside-secure,safexcel-eip197d
+ - const: inside-secure,safexcel-eip97ies
+ - const: inside-secure,safexcel-eip197
+ description: Equivalent of inside-secure,safexcel-eip197b
+ deprecated: true
+ - const: inside-secure,safexcel-eip97
+ description: Equivalent of inside-secure,safexcel-eip97ies
+ deprecated: true
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 6
+
+ interrupt-names:
+ items:
+ - const: ring0
+ - const: ring1
+ - const: ring2
+ - const: ring3
+ - const: eip
+ - const: mem
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: core
+ - const: reg
+
+required:
+ - reg
+ - interrupts
+ - interrupt-names
+
+allOf:
+ - if:
+ properties:
+ clocks:
+ minItems: 2
+ then:
+ properties:
+ clock-names:
+ minItems: 2
+ required:
+ - clock-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ crypto@800000 {
+ compatible = "inside-secure,safexcel-eip197b";
+ reg = <0x800000 0x200000>;
+ interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "ring0", "ring1", "ring2", "ring3", "eip", "mem";
+ clocks = <&cpm_syscon0 1 26>;
+ clock-names = "core";
+ };
diff --git a/sys/contrib/device-tree/Bindings/crypto/qcom,inline-crypto-engine.yaml b/sys/contrib/device-tree/Bindings/crypto/qcom,inline-crypto-engine.yaml
index 92e1d76e29ee..09e43157cc71 100644
--- a/sys/contrib/device-tree/Bindings/crypto/qcom,inline-crypto-engine.yaml
+++ b/sys/contrib/device-tree/Bindings/crypto/qcom,inline-crypto-engine.yaml
@@ -13,7 +13,10 @@ properties:
compatible:
items:
- enum:
+ - qcom,sa8775p-inline-crypto-engine
+ - qcom,sm8450-inline-crypto-engine
- qcom,sm8550-inline-crypto-engine
+ - qcom,sm8650-inline-crypto-engine
- const: qcom,inline-crypto-engine
reg:
diff --git a/sys/contrib/device-tree/Bindings/crypto/qcom,prng.yaml b/sys/contrib/device-tree/Bindings/crypto/qcom,prng.yaml
index bb42f4588b40..89c88004b41b 100644
--- a/sys/contrib/device-tree/Bindings/crypto/qcom,prng.yaml
+++ b/sys/contrib/device-tree/Bindings/crypto/qcom,prng.yaml
@@ -11,9 +11,18 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,prng # 8916 etc.
- - qcom,prng-ee # 8996 and later using EE
+ oneOf:
+ - enum:
+ - qcom,prng # 8916 etc.
+ - qcom,prng-ee # 8996 and later using EE
+ - items:
+ - enum:
+ - qcom,sa8775p-trng
+ - qcom,sc7280-trng
+ - qcom,sm8450-trng
+ - qcom,sm8550-trng
+ - qcom,sm8650-trng
+ - const: qcom,trng
reg:
maxItems: 1
@@ -28,8 +37,18 @@ properties:
required:
- compatible
- reg
- - clocks
- - clock-names
+
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: qcom,trng
+ then:
+ required:
+ - clocks
+ - clock-names
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/crypto/qcom-qce.yaml b/sys/contrib/device-tree/Bindings/crypto/qcom-qce.yaml
index bb828068c3b8..a48bd381063a 100644
--- a/sys/contrib/device-tree/Bindings/crypto/qcom-qce.yaml
+++ b/sys/contrib/device-tree/Bindings/crypto/qcom-qce.yaml
@@ -34,6 +34,7 @@ properties:
- enum:
- qcom,ipq6018-qce
- qcom,ipq8074-qce
+ - qcom,ipq9574-qce
- qcom,msm8996-qce
- qcom,qcm2290-qce
- qcom,sdm845-qce
@@ -43,10 +44,12 @@ properties:
- items:
- enum:
+ - qcom,sc7280-qce
- qcom,sm8250-qce
- qcom,sm8350-qce
- qcom,sm8450-qce
- qcom,sm8550-qce
+ - qcom,sm8650-qce
- const: qcom,sm8150-qce
- const: qcom,qce
@@ -95,6 +98,7 @@ allOf:
- qcom,crypto-v5.4
- qcom,ipq6018-qce
- qcom,ipq8074-qce
+ - qcom,ipq9574-qce
- qcom,msm8996-qce
- qcom,sdm845-qce
then:
@@ -128,6 +132,17 @@ allOf:
- clocks
- clock-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8150-qce
+ then:
+ properties:
+ clocks: false
+ clock-names: false
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/crypto/st,stm32-hash.yaml b/sys/contrib/device-tree/Bindings/crypto/st,stm32-hash.yaml
index b767ec72a999..ac480765cde0 100644
--- a/sys/contrib/device-tree/Bindings/crypto/st,stm32-hash.yaml
+++ b/sys/contrib/device-tree/Bindings/crypto/st,stm32-hash.yaml
@@ -20,6 +20,7 @@ properties:
- stericsson,ux500-hash
- st,stm32f456-hash
- st,stm32f756-hash
+ - st,stm32mp13-hash
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/crypto/ti,sa2ul.yaml b/sys/contrib/device-tree/Bindings/crypto/ti,sa2ul.yaml
index 77ec8bc70bf7..ff10a0838ad6 100644
--- a/sys/contrib/device-tree/Bindings/crypto/ti,sa2ul.yaml
+++ b/sys/contrib/device-tree/Bindings/crypto/ti,sa2ul.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto/ti,sa2ul.yaml#
@@ -66,10 +66,22 @@ patternProperties:
required:
- compatible
- reg
- - power-domains
- dmas
- dma-names
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ti,am62-sa3ul
+ then:
+ properties:
+ power-domains: false
+ else:
+ required:
+ - power-domains
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/devfreq/event/rockchip,dfi.yaml b/sys/contrib/device-tree/Bindings/devfreq/event/rockchip,dfi.yaml
new file mode 100644
index 000000000000..50d3fabe958d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/devfreq/event/rockchip,dfi.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/devfreq/event/rockchip,dfi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip DFI
+
+maintainers:
+ - Sascha Hauer <s.hauer@pengutronix.de>
+
+properties:
+ compatible:
+ enum:
+ - rockchip,rk3399-dfi
+ - rockchip,rk3568-dfi
+ - rockchip,rk3588-dfi
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: pclk_ddr_mon
+
+ interrupts:
+ minItems: 1
+ maxItems: 4
+
+ reg:
+ maxItems: 1
+
+ rockchip,pmu:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the syscon managing the "PMU general register files".
+
+required:
+ - compatible
+ - interrupts
+ - reg
+
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,rk3399-dfi
+
+then:
+ required:
+ - clocks
+ - clock-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/rk3308-cru.h>
+
+ bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ dfi: dfi@ff630000 {
+ compatible = "rockchip,rk3399-dfi";
+ reg = <0x00 0xff630000 0x00 0x4000>;
+ interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
+ rockchip,pmu = <&pmugrf>;
+ clocks = <&cru PCLK_DDR_MON>;
+ clock-names = "pclk_ddr_mon";
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/devfreq/event/samsung,exynos-ppmu.yaml b/sys/contrib/device-tree/Bindings/devfreq/event/samsung,exynos-ppmu.yaml
index e300df4b47f3..d27dcb2fef12 100644
--- a/sys/contrib/device-tree/Bindings/devfreq/event/samsung,exynos-ppmu.yaml
+++ b/sys/contrib/device-tree/Bindings/devfreq/event/samsung,exynos-ppmu.yaml
@@ -18,7 +18,7 @@ description: |
each IP (DMC, CPU, RIGHTBUS, LEFTBUS, CAM interface, LCD, G3D, MFC). The
Exynos PPMU driver uses the devfreq-event class to provide event data to
various devfreq devices. The devfreq devices would use the event data when
- derterming the current state of each IP.
+ determining the current state of each IP.
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/display/atmel/hlcdc-dc.txt b/sys/contrib/device-tree/Bindings/display/atmel/hlcdc-dc.txt
index 0398aec488ac..923aea25344c 100644
--- a/sys/contrib/device-tree/Bindings/display/atmel/hlcdc-dc.txt
+++ b/sys/contrib/device-tree/Bindings/display/atmel/hlcdc-dc.txt
@@ -12,7 +12,7 @@ Required properties:
Required children nodes:
Children nodes are encoding available output ports and their connections
- to external devices using the OF graph reprensentation (see ../graph.txt).
+ to external devices using the OF graph representation (see ../graph.txt).
At least one port node is required.
Optional properties in grandchild nodes:
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/adi,adv7533.yaml b/sys/contrib/device-tree/Bindings/display/bridge/adi,adv7533.yaml
index 987aa83c2649..df20a3c9c744 100644
--- a/sys/contrib/device-tree/Bindings/display/bridge/adi,adv7533.yaml
+++ b/sys/contrib/device-tree/Bindings/display/bridge/adi,adv7533.yaml
@@ -9,6 +9,9 @@ title: Analog Devices ADV7533/35 HDMI Encoders
maintainers:
- Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+allOf:
+ - $ref: /schemas/sound/dai-common.yaml#
+
description: |
The ADV7533 and ADV7535 are HDMI audio and video transmitters
compatible with HDMI 1.4 and DVI 1.0. They support color space
@@ -89,6 +92,9 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 1, 2, 3, 4 ]
+ "#sound-dai-cells":
+ const: 0
+
ports:
description:
The ADV7533/35 has two video ports and one audio port.
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/analogix,anx7814.yaml b/sys/contrib/device-tree/Bindings/display/bridge/analogix,anx7814.yaml
index 4a5e5d9d6f90..4509c496731b 100644
--- a/sys/contrib/device-tree/Bindings/display/bridge/analogix,anx7814.yaml
+++ b/sys/contrib/device-tree/Bindings/display/bridge/analogix,anx7814.yaml
@@ -17,6 +17,7 @@ properties:
- analogix,anx7808
- analogix,anx7812
- analogix,anx7814
+ - analogix,anx7816
- analogix,anx7818
reg:
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/fsl,imx93-mipi-dsi.yaml b/sys/contrib/device-tree/Bindings/display/bridge/fsl,imx93-mipi-dsi.yaml
new file mode 100644
index 000000000000..d6e51d0cf546
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/bridge/fsl,imx93-mipi-dsi.yaml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/fsl,imx93-mipi-dsi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX93 specific extensions to Synopsys Designware MIPI DSI
+
+maintainers:
+ - Liu Ying <victor.liu@nxp.com>
+
+description: |
+ There is a Synopsys Designware MIPI DSI Host Controller and a Synopsys
+ Designware MIPI DPHY embedded in Freescale i.MX93 SoC. Some configurations
+ and extensions to them are controlled by i.MX93 media blk-ctrl.
+
+allOf:
+ - $ref: snps,dw-mipi-dsi.yaml#
+
+properties:
+ compatible:
+ const: fsl,imx93-mipi-dsi
+
+ clocks:
+ items:
+ - description: apb clock
+ - description: pixel clock
+ - description: PHY configuration clock
+ - description: PHY reference clock
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: pix
+ - const: phy_cfg
+ - const: phy_ref
+
+ interrupts:
+ maxItems: 1
+
+ fsl,media-blk-ctrl:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ i.MX93 media blk-ctrl, as a syscon, controls pixel component bit map
+ configurations from LCDIF display controller to the MIPI DSI host
+ controller and MIPI DPHY PLL related configurations through PLL SoC
+ interface.
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - interrupts
+ - fsl,media-blk-ctrl
+ - power-domains
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/imx93-clock.h>
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/fsl,imx93-power.h>
+
+ dsi@4ae10000 {
+ compatible = "fsl,imx93-mipi-dsi";
+ reg = <0x4ae10000 0x10000>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_MIPI_DSI_GATE>,
+ <&clk IMX93_CLK_MEDIA_DISP_PIX>,
+ <&clk IMX93_CLK_MIPI_PHY_CFG>,
+ <&clk IMX93_CLK_24M>;
+ clock-names = "pclk", "pix", "phy_cfg", "phy_ref";
+ fsl,media-blk-ctrl = <&media_blk_ctrl>;
+ power-domains = <&media_blk_ctrl IMX93_MEDIABLK_PD_MIPI_DSI>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "raydium,rm67191";
+ reg = <0>;
+ reset-gpios = <&adp5585gpio 6 GPIO_ACTIVE_LOW>;
+ dsi-lanes = <4>;
+ video-mode = <2>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dsi_to_lcdif: endpoint {
+ remote-endpoint = <&lcdif_to_dsi>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/lontium,lt8912b.yaml b/sys/contrib/device-tree/Bindings/display/bridge/lontium,lt8912b.yaml
index f201ae4af4fb..2cef25215798 100644
--- a/sys/contrib/device-tree/Bindings/display/bridge/lontium,lt8912b.yaml
+++ b/sys/contrib/device-tree/Bindings/display/bridge/lontium,lt8912b.yaml
@@ -55,6 +55,27 @@ properties:
- port@0
- port@1
+ vcchdmipll-supply:
+ description: A 1.8V supply that powers the HDMI PLL.
+
+ vcchdmitx-supply:
+ description: A 1.8V supply that powers the HDMI TX part.
+
+ vcclvdspll-supply:
+ description: A 1.8V supply that powers the LVDS PLL.
+
+ vcclvdstx-supply:
+ description: A 1.8V supply that powers the LVDS TX part.
+
+ vccmipirx-supply:
+ description: A 1.8V supply that powers the MIPI RX part.
+
+ vccsysclk-supply:
+ description: A 1.8V supply that powers the SYSCLK.
+
+ vdd-supply:
+ description: A 1.8V supply that powers the digital part.
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/nxp,tda998x.yaml b/sys/contrib/device-tree/Bindings/display/bridge/nxp,tda998x.yaml
index 21d995f29a1e..b8e9cf6ce4e6 100644
--- a/sys/contrib/device-tree/Bindings/display/bridge/nxp,tda998x.yaml
+++ b/sys/contrib/device-tree/Bindings/display/bridge/nxp,tda998x.yaml
@@ -29,19 +29,22 @@ properties:
audio-ports:
description:
- Array of 8-bit values, 2 values per DAI (Documentation/sound/soc/dai.rst).
+ Array of 2 values per DAI (Documentation/sound/soc/dai.rst).
The implementation allows one or two DAIs.
If two DAIs are defined, they must be of different type.
$ref: /schemas/types.yaml#/definitions/uint32-matrix
+ minItems: 1
+ maxItems: 2
items:
- minItems: 1
items:
- description: |
The first value defines the DAI type: TDA998x_SPDIF or TDA998x_I2S
(see include/dt-bindings/display/tda998x.h).
+ enum: [ 1, 2 ]
- description:
The second value defines the tda998x AP_ENA reg content when the
DAI in question is used.
+ maximum: 0xff
'#sound-dai-cells':
enum: [ 0, 1 ]
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/snps,dw-mipi-dsi.yaml b/sys/contrib/device-tree/Bindings/display/bridge/snps,dw-mipi-dsi.yaml
index 0b51c64f141a..8747b95ec20d 100644
--- a/sys/contrib/device-tree/Bindings/display/bridge/snps,dw-mipi-dsi.yaml
+++ b/sys/contrib/device-tree/Bindings/display/bridge/snps,dw-mipi-dsi.yaml
@@ -11,7 +11,7 @@ maintainers:
description: |
This document defines device tree properties for the Synopsys DesignWare MIPI
- DSI host controller. It doesn't constitue a device tree binding specification
+ DSI host controller. It doesn't constitute a device tree binding specification
by itself but is meant to be referenced by platform-specific device tree
bindings.
diff --git a/sys/contrib/device-tree/Bindings/display/bridge/toshiba,tc358767.yaml b/sys/contrib/device-tree/Bindings/display/bridge/toshiba,tc358767.yaml
index 0521261b04a9..ae894d996d21 100644
--- a/sys/contrib/device-tree/Bindings/display/bridge/toshiba,tc358767.yaml
+++ b/sys/contrib/device-tree/Bindings/display/bridge/toshiba,tc358767.yaml
@@ -49,6 +49,9 @@ properties:
description: |
OF device-tree gpio specification for RSTX pin(active low system reset)
+ interrupts:
+ maxItems: 1
+
toshiba,hpd-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
diff --git a/sys/contrib/device-tree/Bindings/display/cirrus,clps711x-fb.txt b/sys/contrib/device-tree/Bindings/display/cirrus,clps711x-fb.txt
index 0ab5f0663611..84c75f849891 100644
--- a/sys/contrib/device-tree/Bindings/display/cirrus,clps711x-fb.txt
+++ b/sys/contrib/device-tree/Bindings/display/cirrus,clps711x-fb.txt
@@ -1,4 +1,4 @@
-* Currus Logic CLPS711X Framebuffer
+* Cirrus Logic CLPS711X Framebuffer
Required properties:
- compatible: Shall contain "cirrus,ep7209-fb".
diff --git a/sys/contrib/device-tree/Bindings/display/fsl,lcdif.yaml b/sys/contrib/device-tree/Bindings/display/fsl,lcdif.yaml
index fc11ab5fc465..1c2be8d6f633 100644
--- a/sys/contrib/device-tree/Bindings/display/fsl,lcdif.yaml
+++ b/sys/contrib/device-tree/Bindings/display/fsl,lcdif.yaml
@@ -51,7 +51,10 @@ properties:
minItems: 1
interrupts:
- maxItems: 1
+ items:
+ - description: LCDIF DMA interrupt
+ - description: LCDIF Error interrupt
+ minItems: 1
power-domains:
maxItems: 1
@@ -131,6 +134,21 @@ allOf:
then:
required:
- power-domains
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx23-lcdif
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/display/ilitek,ili9486.yaml b/sys/contrib/device-tree/Bindings/display/ilitek,ili9486.yaml
index 1f8f2182e2f1..9cc1fd0751cd 100644
--- a/sys/contrib/device-tree/Bindings/display/ilitek,ili9486.yaml
+++ b/sys/contrib/device-tree/Bindings/display/ilitek,ili9486.yaml
@@ -50,10 +50,6 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
- backlight: backlight {
- compatible = "gpio-backlight";
- gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
- };
spi {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/imx/fsl,imx6-hdmi.yaml b/sys/contrib/device-tree/Bindings/display/imx/fsl,imx6-hdmi.yaml
index af7fe9c4d196..7979cf07f119 100644
--- a/sys/contrib/device-tree/Bindings/display/imx/fsl,imx6-hdmi.yaml
+++ b/sys/contrib/device-tree/Bindings/display/imx/fsl,imx6-hdmi.yaml
@@ -87,7 +87,7 @@ required:
- interrupts
- ports
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/display/lvds-data-mapping.yaml b/sys/contrib/device-tree/Bindings/display/lvds-data-mapping.yaml
new file mode 100644
index 000000000000..d68982fe2e9b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/lvds-data-mapping.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/lvds-data-mapping.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LVDS Data Mapping
+
+maintainers:
+ - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
+ - Thierry Reding <thierry.reding@gmail.com>
+
+description: |
+ LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A. Multiple
+ incompatible data link layers have been used over time to transmit image data
+ to LVDS devices. This bindings supports devices compatible with the following
+ specifications.
+
+ [JEIDA] "Digital Interface Standards for Monitor", JEIDA-59-1999, February
+ 1999 (Version 1.0), Japan Electronic Industry Development Association (JEIDA)
+ [LDI] "Open LVDS Display Interface", May 1999 (Version 0.95), National
+ Semiconductor
+ [VESA] "VESA Notebook Panel Standard", October 2007 (Version 1.0), Video
+ Electronics Standards Association (VESA)
+
+ Device compatible with those specifications have been marketed under the
+ FPD-Link and FlatLink brands.
+
+properties:
+ data-mapping:
+ enum:
+ - jeida-18
+ - jeida-24
+ - vesa-24
+ description: |
+ The color signals mapping order.
+
+ LVDS data mappings are defined as follows.
+
+ - "jeida-18" - 18-bit data mapping compatible with the [JEIDA], [LDI] and
+ [VESA] specifications. Data are transferred as follows on 3 LVDS lanes.
+
+ Slot 0 1 2 3 4 5 6
+ ________________ _________________
+ Clock \_______________________/
+ ______ ______ ______ ______ ______ ______ ______
+ DATA0 ><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__><
+ DATA1 ><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__><
+ DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__><
+
+ - "jeida-24" - 24-bit data mapping compatible with the [DSIM] and [LDI]
+ specifications. Data are transferred as follows on 4 LVDS lanes.
+
+ Slot 0 1 2 3 4 5 6
+ ________________ _________________
+ Clock \_______________________/
+ ______ ______ ______ ______ ______ ______ ______
+ DATA0 ><__G2__><__R7__><__R6__><__R5__><__R4__><__R3__><__R2__><
+ DATA1 ><__B3__><__B2__><__G7__><__G6__><__G5__><__G4__><__G3__><
+ DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B7__><__B6__><__B5__><__B4__><
+ DATA3 ><_CTL3_><__B1__><__B0__><__G1__><__G0__><__R1__><__R0__><
+
+ - "vesa-24" - 24-bit data mapping compatible with the [VESA] specification.
+ Data are transferred as follows on 4 LVDS lanes.
+
+ Slot 0 1 2 3 4 5 6
+ ________________ _________________
+ Clock \_______________________/
+ ______ ______ ______ ______ ______ ______ ______
+ DATA0 ><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__><
+ DATA1 ><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__><
+ DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__><
+ DATA3 ><_CTL3_><__B7__><__B6__><__G7__><__G6__><__R7__><__R6__><
+
+ Control signals are mapped as follows.
+
+ CTL0: HSync
+ CTL1: VSync
+ CTL2: Data Enable
+ CTL3: 0
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/display/lvds.yaml b/sys/contrib/device-tree/Bindings/display/lvds.yaml
index 7cd2ce7e9c33..224db4932011 100644
--- a/sys/contrib/device-tree/Bindings/display/lvds.yaml
+++ b/sys/contrib/device-tree/Bindings/display/lvds.yaml
@@ -6,83 +6,24 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: LVDS Display Common Properties
+allOf:
+ - $ref: lvds-data-mapping.yaml#
+
maintainers:
- Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
- Thierry Reding <thierry.reding@gmail.com>
-description: |+
- LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A. Multiple
- incompatible data link layers have been used over time to transmit image data
- to LVDS devices. This bindings supports devices compatible with the following
- specifications.
-
- [JEIDA] "Digital Interface Standards for Monitor", JEIDA-59-1999, February
- 1999 (Version 1.0), Japan Electronic Industry Development Association (JEIDA)
- [LDI] "Open LVDS Display Interface", May 1999 (Version 0.95), National
- Semiconductor
- [VESA] "VESA Notebook Panel Standard", October 2007 (Version 1.0), Video
- Electronics Standards Association (VESA)
-
- Device compatible with those specifications have been marketed under the
- FPD-Link and FlatLink brands.
+description:
+ This binding extends the data mapping defined in lvds-data-mapping.yaml.
+ It supports reversing the bit order on the formats defined there in order
+ to accomodate for even more specialized data formats, since a variety of
+ data formats and layouts is used to drive LVDS displays.
properties:
- data-mapping:
- enum:
- - jeida-18
- - jeida-24
- - vesa-24
- description: |
- The color signals mapping order.
-
- LVDS data mappings are defined as follows.
-
- - "jeida-18" - 18-bit data mapping compatible with the [JEIDA], [LDI] and
- [VESA] specifications. Data are transferred as follows on 3 LVDS lanes.
-
- Slot 0 1 2 3 4 5 6
- ________________ _________________
- Clock \_______________________/
- ______ ______ ______ ______ ______ ______ ______
- DATA0 ><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__><
- DATA1 ><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__><
- DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__><
-
- - "jeida-24" - 24-bit data mapping compatible with the [DSIM] and [LDI]
- specifications. Data are transferred as follows on 4 LVDS lanes.
-
- Slot 0 1 2 3 4 5 6
- ________________ _________________
- Clock \_______________________/
- ______ ______ ______ ______ ______ ______ ______
- DATA0 ><__G2__><__R7__><__R6__><__R5__><__R4__><__R3__><__R2__><
- DATA1 ><__B3__><__B2__><__G7__><__G6__><__G5__><__G4__><__G3__><
- DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B7__><__B6__><__B5__><__B4__><
- DATA3 ><_CTL3_><__B1__><__B0__><__G1__><__G0__><__R1__><__R0__><
-
- - "vesa-24" - 24-bit data mapping compatible with the [VESA] specification.
- Data are transferred as follows on 4 LVDS lanes.
-
- Slot 0 1 2 3 4 5 6
- ________________ _________________
- Clock \_______________________/
- ______ ______ ______ ______ ______ ______ ______
- DATA0 ><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__><
- DATA1 ><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__><
- DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__><
- DATA3 ><_CTL3_><__B7__><__B6__><__G7__><__G6__><__R7__><__R6__><
-
- Control signals are mapped as follows.
-
- CTL0: HSync
- CTL1: VSync
- CTL2: Data Enable
- CTL3: 0
-
data-mirror:
type: boolean
description:
- If set, reverse the bit order described in the data mappings below on all
+ If set, reverse the bit order described in the data mappings on all
data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,aal.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,aal.yaml
index 7fd42c8fdc32..b4c28e96dd55 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,aal.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,aal.yaml
@@ -24,6 +24,7 @@ properties:
- enum:
- mediatek,mt8173-disp-aal
- mediatek,mt8183-disp-aal
+ - mediatek,mt8195-mdp3-aal
- items:
- enum:
- mediatek,mt2712-disp-aal
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,color.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,color.yaml
index f21e44092043..b886ca0d89ea 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,color.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,color.yaml
@@ -26,6 +26,7 @@ properties:
- mediatek,mt2701-disp-color
- mediatek,mt8167-disp-color
- mediatek,mt8173-disp-color
+ - mediatek,mt8195-mdp3-color
- items:
- enum:
- mediatek,mt7623-disp-color
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dp.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dp.yaml
index ff781f2174a0..2aef1eb32e11 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dp.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dp.yaml
@@ -21,6 +21,8 @@ description: |
properties:
compatible:
enum:
+ - mediatek,mt8188-dp-tx
+ - mediatek,mt8188-edp-tx
- mediatek,mt8195-dp-tx
- mediatek,mt8195-edp-tx
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dsi.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dsi.yaml
index 12441b937684..8611319bed2e 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dsi.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,dsi.yaml
@@ -10,7 +10,6 @@ maintainers:
- Chun-Kuang Hu <chunkuang.hu@kernel.org>
- Philipp Zabel <p.zabel@pengutronix.de>
- Jitao Shi <jitao.shi@mediatek.com>
- - Xinlei Lee <xinlei.lee@mediatek.com>
description: |
The MediaTek DSI function block is a sink of the display subsystem and can
@@ -30,10 +29,15 @@ properties:
- mediatek,mt8173-dsi
- mediatek,mt8183-dsi
- mediatek,mt8186-dsi
+ - mediatek,mt8188-dsi
- items:
- enum:
- mediatek,mt6795-dsi
- const: mediatek,mt8173-dsi
+ - items:
+ - enum:
+ - mediatek,mt8195-dsi
+ - const: mediatek,mt8183-dsi
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ethdr.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ethdr.yaml
index 801fa66ae615..677882348ede 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ethdr.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ethdr.yaml
@@ -23,7 +23,11 @@ description:
properties:
compatible:
- const: mediatek,mt8195-disp-ethdr
+ oneOf:
+ - const: mediatek,mt8195-disp-ethdr
+ - items:
+ - const: mediatek,mt8188-disp-ethdr
+ - const: mediatek,mt8195-disp-ethdr
reg:
maxItems: 7
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,merge.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,merge.yaml
index eead5cb8636e..dae839279950 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,merge.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,merge.yaml
@@ -24,9 +24,13 @@ properties:
- enum:
- mediatek,mt8173-disp-merge
- mediatek,mt8195-disp-merge
+ - mediatek,mt8195-mdp3-merge
- items:
- const: mediatek,mt6795-disp-merge
- const: mediatek,mt8173-disp-merge
+ - items:
+ - const: mediatek,mt8188-disp-merge
+ - const: mediatek,mt8195-disp-merge
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ovl.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ovl.yaml
index 3e1069b00b56..c471a181d125 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ovl.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,ovl.yaml
@@ -26,6 +26,7 @@ properties:
- mediatek,mt8173-disp-ovl
- mediatek,mt8183-disp-ovl
- mediatek,mt8192-disp-ovl
+ - mediatek,mt8195-mdp3-ovl
- items:
- enum:
- mediatek,mt7623-disp-ovl
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,padding.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,padding.yaml
new file mode 100644
index 000000000000..be07bbdc54e3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,padding.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/mediatek/mediatek,padding.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Display Padding
+
+maintainers:
+ - Chun-Kuang Hu <chunkuang.hu@kernel.org>
+ - Philipp Zabel <p.zabel@pengutronix.de>
+
+description:
+ Padding provides ability to add pixels to width and height of a layer with
+ specified colors. Due to hardware design, Mixer in VDOSYS1 requires
+ width of a layer to be 2-pixel-align, or 4-pixel-align when ETHDR is enabled,
+ we need Padding to deal with odd width.
+ Please notice that even if the Padding is in bypass mode, settings in
+ register must be cleared to 0, or undefined behaviors could happen.
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8188-disp-padding
+ - mediatek,mt8195-mdp3-padding
+
+ reg:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Padding's clocks
+
+ mediatek,gce-client-reg:
+ description:
+ GCE (Global Command Engine) is a multi-core micro processor that helps
+ its clients to execute commands without interrupting CPU. This property
+ describes GCE client's information that is composed by 4 fields.
+ 1. Phandle of the GCE (there may be several GCE processors)
+ 2. Sub-system ID defined in the dt-binding like a user ID
+ (Please refer to include/dt-bindings/gce/<chip>-gce.h)
+ 3. Offset from base address of the subsys you are at
+ 4. Size of the register the client needs
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: Phandle of the GCE
+ - description: Subsys ID defined in the dt-binding
+ - description: Offset from base address of the subsys
+ - description: Size of register
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - power-domains
+ - clocks
+ - mediatek,gce-client-reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/mediatek,mt8188-clk.h>
+ #include <dt-bindings/power/mediatek,mt8188-power.h>
+ #include <dt-bindings/gce/mt8195-gce.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ padding0: padding@1c11d000 {
+ compatible = "mediatek,mt8188-disp-padding";
+ reg = <0 0x1c11d000 0 0x1000>;
+ clocks = <&vdosys1 CLK_VDO1_PADDING0>;
+ power-domains = <&spm MT8188_POWER_DOMAIN_VDOSYS1>;
+ mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0xd000 0x1000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,split.yaml b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,split.yaml
index a8a5c9608598..e4affc854f3d 100644
--- a/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,split.yaml
+++ b/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,split.yaml
@@ -23,6 +23,7 @@ properties:
oneOf:
- enum:
- mediatek,mt8173-disp-split
+ - mediatek,mt8195-mdp3-split
- items:
- const: mediatek,mt6795-disp-split
- const: mediatek,mt8173-disp-split
@@ -38,6 +39,21 @@ properties:
the power controller specified by phandle. See
Documentation/devicetree/bindings/power/power-domain.yaml for details.
+ mediatek,gce-client-reg:
+ description:
+ The register of display function block to be set by gce. There are 4 arguments,
+ such as gce node, subsys id, offset and register size. The subsys id that is
+ mapping to the register of display function blocks is defined in the gce header
+ include/dt-bindings/gce/<chip>-gce.h of each chips.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: phandle of GCE
+ - description: GCE subsys id
+ - description: register offset
+ - description: register size
+ maxItems: 1
+
clocks:
items:
- description: SPLIT Clock
@@ -48,6 +64,17 @@ required:
- power-domains
- clocks
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8195-mdp3-split
+
+ then:
+ required:
+ - mediatek,gce-client-reg
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dp-controller.yaml b/sys/contrib/device-tree/Bindings/display/msm/dp-controller.yaml
index 7a7cf3fb3e6d..ae53cbfb2193 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dp-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dp-controller.yaml
@@ -26,8 +26,11 @@ properties:
- qcom,sc8280xp-edp
- qcom,sdm845-dp
- qcom,sm8350-dp
+ - qcom,sm8650-dp
- items:
- enum:
+ - qcom,sm8150-dp
+ - qcom,sm8250-dp
- qcom,sm8450-dp
- qcom,sm8550-dp
- const: qcom,sm8350-dp
@@ -79,7 +82,8 @@ properties:
operating-points-v2: true
- opp-table: true
+ opp-table:
+ type: object
power-domains:
maxItems: 1
@@ -112,6 +116,7 @@ properties:
port@1:
$ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
description: Output endpoint of the controller
properties:
endpoint:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-controller-main.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-controller-main.yaml
index 01848bdd5873..4219936eda5a 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-controller-main.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-controller-main.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-controller-main.yaml#
@@ -25,8 +25,10 @@ properties:
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm660-dsi-ctrl
+ - qcom,sdm670-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm6115-dsi-ctrl
+ - qcom,sm6125-dsi-ctrl
- qcom,sm6350-dsi-ctrl
- qcom,sm6375-dsi-ctrl
- qcom,sm8150-dsi-ctrl
@@ -34,6 +36,7 @@ properties:
- qcom,sm8350-dsi-ctrl
- qcom,sm8450-dsi-ctrl
- qcom,sm8550-dsi-ctrl
+ - qcom,sm8650-dsi-ctrl
- const: qcom,mdss-dsi-ctrl
- enum:
- qcom,dsi-ctrl-6g-qcm2290
@@ -166,6 +169,10 @@ properties:
description:
Phandle to vdd regulator device node
+ refgen-supply:
+ description:
+ Phandle to REFGEN regulator device node
+
vcca-supply:
description:
Phandle to vdd regulator device node
@@ -301,6 +308,7 @@ allOf:
contains:
enum:
- qcom,msm8998-dsi-ctrl
+ - qcom,sm6125-dsi-ctrl
- qcom,sm6350-dsi-ctrl
then:
properties:
@@ -327,6 +335,7 @@ allOf:
- qcom,sm8350-dsi-ctrl
- qcom,sm8450-dsi-ctrl
- qcom,sm8550-dsi-ctrl
+ - qcom,sm8650-dsi-ctrl
then:
properties:
clocks:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-10nm.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-10nm.yaml
index e6b00d7387ce..69d13867b7cf 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-10nm.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-10nm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-phy-10nm.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-14nm.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-14nm.yaml
index a43e11d3b00d..52bbe132e6da 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-14nm.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-14nm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-phy-14nm.yaml#
@@ -19,6 +19,7 @@ properties:
- qcom,dsi-phy-14nm-2290
- qcom,dsi-phy-14nm-660
- qcom,dsi-phy-14nm-8953
+ - qcom,sm6125-dsi-phy-14nm
reg:
items:
@@ -35,6 +36,16 @@ properties:
vcca-supply:
description: Phandle to vcca regulator device node.
+ power-domains:
+ description:
+ A phandle and PM domain specifier for an optional power domain.
+ maxItems: 1
+
+ required-opps:
+ description:
+ A phandle to an OPP node describing the power domain's performance point.
+ maxItems: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-20nm.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-20nm.yaml
index 9c1f9140c731..7e6687cb002b 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-20nm.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-20nm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-phy-20nm.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-28nm.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-28nm.yaml
index 62fb3e484eb2..288d8babb76a 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-28nm.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-28nm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-phy-28nm.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-7nm.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-7nm.yaml
index 8e9031bbde73..7e764eac3ef3 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-7nm.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-7nm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-phy-7nm.yaml#
@@ -22,6 +22,7 @@ properties:
- qcom,sm8350-dsi-phy-5nm
- qcom,sm8450-dsi-phy-5nm
- qcom,sm8550-dsi-phy-4nm
+ - qcom,sm8650-dsi-phy-4nm
reg:
items:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-common.yaml b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-common.yaml
index 0f6f08890e7e..6b57ce41c95f 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-common.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/dsi-phy-common.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/dsi-phy-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/gmu.yaml b/sys/contrib/device-tree/Bindings/display/msm/gmu.yaml
index d65926b4f054..4e1c25b42908 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/gmu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/gmu.yaml
@@ -21,7 +21,7 @@ properties:
compatible:
oneOf:
- items:
- - pattern: '^qcom,adreno-gmu-6[0-9][0-9]\.[0-9]$'
+ - pattern: '^qcom,adreno-gmu-[67][0-9][0-9]\.[0-9]$'
- const: qcom,adreno-gmu
- const: qcom,adreno-gmu-wrapper
@@ -64,6 +64,10 @@ properties:
iommus:
maxItems: 1
+ qcom,qmp:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: Reference to the AOSS side-channel message RAM
+
operating-points-v2: true
opp-table:
@@ -217,6 +221,47 @@ allOf:
properties:
compatible:
contains:
+ enum:
+ - qcom,adreno-gmu-730.1
+ - qcom,adreno-gmu-740.1
+ then:
+ properties:
+ reg:
+ items:
+ - description: Core GMU registers
+ - description: Resource controller registers
+ - description: GMU PDC registers
+ reg-names:
+ items:
+ - const: gmu
+ - const: rscc
+ - const: gmu_pdc
+ clocks:
+ items:
+ - description: GPU AHB clock
+ - description: GMU clock
+ - description: GPU CX clock
+ - description: GPU AXI clock
+ - description: GPU MEMNOC clock
+ - description: GMU HUB clock
+ - description: GPUSS DEMET clock
+ clock-names:
+ items:
+ - const: ahb
+ - const: gmu
+ - const: cxo
+ - const: axi
+ - const: memnoc
+ - const: hub
+ - const: demet
+
+ required:
+ - qcom,qmp
+
+ - if:
+ properties:
+ compatible:
+ contains:
const: qcom,adreno-gmu-wrapper
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/gpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/gpu.yaml
index 58ca8912a8c3..b019db954793 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/gpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/gpu.yaml
@@ -15,9 +15,15 @@ properties:
oneOf:
- description: |
The driver is parsing the compat string for Adreno to
+ figure out the chip-id.
+ items:
+ - pattern: '^qcom,adreno-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$'
+ - const: qcom,adreno
+ - description: |
+ The driver is parsing the compat string for Adreno to
figure out the gpu-id and patch level.
items:
- - pattern: '^qcom,adreno-[3-6][0-9][0-9]\.[0-9]$'
+ - pattern: '^qcom,adreno-[3-7][0-9][0-9]\.[0-9]$'
- const: qcom,adreno
- description: |
The driver is parsing the compat string for Imageon to
@@ -197,7 +203,7 @@ allOf:
properties:
compatible:
contains:
- pattern: '^qcom,adreno-6[0-9][0-9]\.[0-9]$'
+ pattern: '^qcom,adreno-[67][0-9][0-9]\.[0-9]$'
then: # Starting with A6xx, the clocks are usually defined in the GMU node
properties:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/mdss-common.yaml b/sys/contrib/device-tree/Bindings/display/msm/mdss-common.yaml
index ccd7d6417523..c6305a6e0334 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/mdss-common.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/mdss-common.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/mdss-common.yaml#
@@ -61,22 +61,38 @@ properties:
ranges: true
+ # This is not a perfect description, but it's impossible to discern and match
+ # the entries like we do with interconnect-names
interconnects:
minItems: 1
items:
- description: Interconnect path from mdp0 (or a single mdp) port to the data bus
- description: Interconnect path from mdp1 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
interconnect-names:
- minItems: 1
- items:
- - const: mdp0-mem
- - const: mdp1-mem
+ oneOf:
+ - minItems: 1
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
+
+ - minItems: 2
+ items:
+ - const: mdp0-mem
+ - const: mdp1-mem
+ - const: cpu-cfg
resets:
items:
- description: MDSS_CORE reset
+ memory-region:
+ maxItems: 1
+ description:
+ Phandle to a node describing a reserved framebuffer memory region.
+ For example, the splash memory region set up by the bootloader.
+
required:
- reg
- reg-names
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,mdp5.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,mdp5.yaml
index 2fe032d0e8f8..91c774f106ce 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,mdp5.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,mdp5.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,mdss.yaml
index db9f07c6142d..0999ea07f47b 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,mdss.yaml#
@@ -11,7 +11,7 @@ maintainers:
- Rob Clark <robdclark@gmail.com>
description:
- This is the bindings documentation for the Mobile Display Subsytem(MDSS) that
+ This is the bindings documentation for the Mobile Display Subsystem(MDSS) that
encapsulates sub-blocks like MDP5, DSI, HDMI, eDP, etc.
properties:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-dpu.yaml
index 8d3cd46260fb..d5a64c8a921f 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,msm8998-dpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-mdss.yaml
index 3c2b6ed98a56..2d9edab5a30d 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,msm8998-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,msm8998-mdss.yaml#
@@ -38,12 +38,16 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,msm8998-dpu
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -52,6 +56,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-10nm-8998
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-dpu.yaml
index 414f4e7ebdf1..be6cd8adb3b6 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,qcm2290-dpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-mdss.yaml
index 2995b84b2cd4..f0cdb5422688 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,qcm2290-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,qcm2290-mdss.yaml#
@@ -36,26 +36,38 @@ properties:
maxItems: 2
interconnects:
- maxItems: 1
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
interconnect-names:
- maxItems: 1
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,qcm2290-dpu
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
- const: qcom,dsi-ctrl-6g-qcm2290
+ items:
+ - const: qcom,qcm2290-dsi-ctrl
+ - const: qcom,mdss-dsi-ctrl
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-14nm-2290
@@ -90,8 +102,10 @@ examples:
interrupt-controller;
#interrupt-cells = <1>;
- interconnects = <&mmrt_virt MASTER_MDP0 &bimc SLAVE_EBI1>;
- interconnect-names = "mdp0-mem";
+ interconnects = <&mmrt_virt MASTER_MDP0 &bimc SLAVE_EBI1>,
+ <&bimc MASTER_APPSS_PROC &config_noc SLAVE_DISPLAY_CFG>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
iommus = <&apps_smmu 0x420 0x2>,
<&apps_smmu 0x421 0x0>;
@@ -130,7 +144,8 @@ examples:
};
dsi@5e94000 {
- compatible = "qcom,dsi-ctrl-6g-qcm2290";
+ compatible = "qcom,qcm2290-dsi-ctrl",
+ "qcom,mdss-dsi-ctrl";
reg = <0x05e94000 0x400>;
reg-names = "dsi_ctrl";
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-dpu.yaml
index 630b11480496..8137618237ce 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sc7180-dpu.yaml#
@@ -15,6 +15,7 @@ properties:
compatible:
enum:
- qcom,sc7180-dpu
+ - qcom,sm6125-dpu
- qcom,sm6350-dpu
- qcom,sm6375-dpu
@@ -63,7 +64,9 @@ allOf:
- if:
properties:
compatible:
- const: qcom,sm6375-dpu
+ enum:
+ - qcom,sm6375-dpu
+ - qcom,sm6125-dpu
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-mdss.yaml
index 42ef06edddc4..7a0555b15ddf 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7180-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sc7180-mdss.yaml#
@@ -36,26 +36,36 @@ properties:
maxItems: 1
interconnects:
- maxItems: 1
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
interconnect-names:
- maxItems: 1
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sc7180-dpu
"^displayport-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sc7180-dp
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -64,6 +74,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-10nm
@@ -98,8 +110,10 @@ examples:
interrupt-controller;
#interrupt-cells = <1>;
- interconnects = <&mmss_noc MASTER_MDP0 &mc_virt SLAVE_EBI1>;
- interconnect-names = "mdp0-mem";
+ interconnects = <&mmss_noc MASTER_MDP0 &mc_virt SLAVE_EBI1>,
+ <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_DISPLAY_CFG>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
iommus = <&apps_smmu 0x800 0x2>;
ranges;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-dpu.yaml
index 26dc073bd19a..b0fbe86219d1 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sc7280-dpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-mdss.yaml
index 078e1d1a7d2f..2947f27e0585 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc7280-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sc7280-mdss.yaml#
@@ -36,26 +36,36 @@ properties:
maxItems: 1
interconnects:
- maxItems: 1
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
interconnect-names:
- maxItems: 1
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sc7280-dpu
"^displayport-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sc7280-dp
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -64,12 +74,16 @@ patternProperties:
"^edp@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sc7280-edp
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
enum:
@@ -108,8 +122,10 @@ examples:
interrupt-controller;
#interrupt-cells = <1>;
- interconnects = <&mmss_noc MASTER_MDP0 &mc_virt SLAVE_EBI1>;
- interconnect-names = "mdp0-mem";
+ interconnects = <&mmss_noc MASTER_MDP0 &mc_virt SLAVE_EBI1>,
+ <&gem_noc MASTER_APPSS_PROC &cnoc2 SLAVE_DISPLAY_CFG>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
iommus = <&apps_smmu 0x900 0x402>;
ranges;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-dpu.yaml
index f2c8e16cf067..d19e3bec4600 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sc8280xp-dpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-mdss.yaml
index c239544bc37f..af79406e1604 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sc8280xp-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sc8280xp-mdss.yaml#
@@ -34,12 +34,16 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sc8280xp-dpu
"^displayport-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
enum:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm670-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm670-mdss.yaml
new file mode 100644
index 000000000000..7dc269322b8e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm670-mdss.yaml
@@ -0,0 +1,292 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,sdm670-mdss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SDM670 Display MDSS
+
+maintainers:
+ - Richard Acayan <mailingradian@gmail.com>
+
+description:
+ SDM670 MSM Mobile Display Subsystem (MDSS), which encapsulates sub-blocks
+ like DPU display controller, DSI and DP interfaces etc.
+
+$ref: /schemas/display/msm/mdss-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,sdm670-mdss
+
+ clocks:
+ items:
+ - description: Display AHB clock from gcc
+ - description: Display core clock
+
+ clock-names:
+ items:
+ - const: iface
+ - const: core
+
+ iommus:
+ maxItems: 2
+
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ maxItems: 2
+
+patternProperties:
+ "^display-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: qcom,sdm670-dpu
+
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: qcom,sdm670-dp
+
+ "^dsi@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ contains:
+ const: qcom,sdm670-dsi-ctrl
+
+ "^phy@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: qcom,dsi-phy-10nm
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,dispcc-sdm845.h>
+ #include <dt-bindings/clock/qcom,gcc-sdm845.h>
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/interconnect/qcom,sdm670-rpmh.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
+ display-subsystem@ae00000 {
+ compatible = "qcom,sdm670-mdss";
+ reg = <0x0ae00000 0x1000>;
+ reg-names = "mdss";
+ power-domains = <&dispcc MDSS_GDSC>;
+
+ clocks = <&gcc GCC_DISP_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface", "core";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interconnects = <&mmss_noc MASTER_MDP_PORT0 0 &mem_noc SLAVE_EBI_CH0 0>,
+ <&mmss_noc MASTER_MDP_PORT1 0 &mem_noc SLAVE_EBI_CH0 0>;
+ interconnect-names = "mdp0-mem", "mdp1-mem";
+
+ iommus = <&apps_smmu 0x880 0x8>,
+ <&apps_smmu 0xc80 0x8>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ display-controller@ae01000 {
+ compatible = "qcom,sdm670-dpu";
+ reg = <0x0ae01000 0x8f000>,
+ <0x0aeb0000 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ clocks = <&gcc GCC_DISP_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "gcc-bus", "iface", "bus", "core", "vsync";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+ power-domains = <&rpmhpd SDM670_CX>;
+ operating-points-v2 = <&mdp_opp_table>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpu_intf2_out: endpoint {
+ remote-endpoint = <&mdss_dsi1_in>;
+ };
+ };
+ };
+ };
+
+ dsi@ae94000 {
+ compatible = "qcom,sdm670-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0ae94000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmhpd SDM670_CX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@ae94400 {
+ compatible = "qcom,dsi-phy-10nm";
+ reg = <0x0ae94400 0x200>,
+ <0x0ae94600 0x280>,
+ <0x0ae94a00 0x1e0>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "ref";
+ vdds-supply = <&vreg_dsi_phy>;
+ };
+
+ dsi@ae96000 {
+ compatible = "qcom,sdm670-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0ae96000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <5>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>;
+ assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmhpd SDM670_CX>;
+
+ phys = <&dsi1_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi1_in: endpoint {
+ remote-endpoint = <&dpu_intf2_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi1_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi1_phy: phy@ae96400 {
+ compatible = "qcom,dsi-phy-10nm";
+ reg = <0x0ae96400 0x200>,
+ <0x0ae96600 0x280>,
+ <0x0ae96a00 0x10e>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "ref";
+ vdds-supply = <&vreg_dsi_phy>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-dpu.yaml
index 0f7765d832e7..dc11fd421a27 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sdm845-dpu.yaml#
@@ -13,7 +13,9 @@ $ref: /schemas/display/msm/dpu-common.yaml#
properties:
compatible:
- const: qcom,sdm845-dpu
+ enum:
+ - qcom,sdm670-dpu
+ - qcom,sdm845-dpu
reg:
items:
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-mdss.yaml
index 6ecb00920d7f..6e8b69e5ec62 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sdm845-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sdm845-mdss.yaml#
@@ -42,18 +42,24 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sdm845-dpu
"^displayport-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sdm845-dp
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -62,6 +68,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-10nm
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-dpu.yaml
index bf62c2f5325a..510eb6c19364 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm6115-dpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-mdss.yaml
index b9f83088f370..309de1953c88 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6115-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm6115-mdss.yaml#
@@ -29,15 +29,29 @@ properties:
iommus:
maxItems: 2
+ interconnects:
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
+
+ interconnect-names:
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
+
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm6115-dpu
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
oneOf:
@@ -50,6 +64,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-14nm-2290
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6125-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6125-mdss.yaml
new file mode 100644
index 000000000000..3deb9dc81c9c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6125-mdss.yaml
@@ -0,0 +1,223 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,sm6125-mdss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM6125 Display MDSS
+
+maintainers:
+ - Marijn Suijten <marijn.suijten@somainline.org>
+
+description:
+ SM6125 MSM Mobile Display Subsystem (MDSS), which encapsulates sub-blocks
+ like DPU display controller, DSI and DP interfaces etc.
+
+$ref: /schemas/display/msm/mdss-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,sm6125-mdss
+
+ clocks:
+ items:
+ - description: Display AHB clock from gcc
+ - description: Display AHB clock
+ - description: Display core clock
+
+ clock-names:
+ items:
+ - const: iface
+ - const: ahb
+ - const: core
+
+ iommus:
+ maxItems: 1
+
+ interconnects:
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
+
+ interconnect-names:
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
+
+patternProperties:
+ "^display-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: qcom,sm6125-dpu
+
+ "^dsi@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ items:
+ - const: qcom,sm6125-dsi-ctrl
+ - const: qcom,mdss-dsi-ctrl
+
+ "^phy@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: qcom,sm6125-dsi-phy-14nm
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,dispcc-sm6125.h>
+ #include <dt-bindings/clock/qcom,gcc-sm6125.h>
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
+ display-subsystem@5e00000 {
+ compatible = "qcom,sm6125-mdss";
+ reg = <0x05e00000 0x1000>;
+ reg-names = "mdss";
+
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ clocks = <&gcc GCC_DISP_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface",
+ "ahb",
+ "core";
+
+ power-domains = <&dispcc MDSS_GDSC>;
+
+ iommus = <&apps_smmu 0x400 0x0>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ display-controller@5e01000 {
+ compatible = "qcom,sm6125-dpu";
+ reg = <0x05e01000 0x83208>,
+ <0x05eb0000 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_ROT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>,
+ <&gcc GCC_DISP_THROTTLE_CORE_CLK>;
+ clock-names = "bus",
+ "iface",
+ "rot",
+ "lut",
+ "core",
+ "vsync",
+ "throttle";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmpd SM6125_VDDCX>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+ };
+ };
+
+ dsi@5e94000 {
+ compatible = "qcom,sm6125-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x05e94000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmpd SM6125_VDDCX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+ };
+
+ phy@5e94400 {
+ compatible = "qcom,sm6125-dsi-phy-14nm";
+ reg = <0x05e94400 0x100>,
+ <0x05e94500 0x300>,
+ <0x05e94800 0x188>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface",
+ "ref";
+
+ required-opps = <&rpmpd_opp_nom>;
+ power-domains = <&rpmpd SM6125_VDDMX>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6350-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6350-mdss.yaml
index ed0ad194d4ce..c9ba1fae8042 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6350-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6350-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm6350-mdss.yaml#
@@ -35,20 +35,28 @@ properties:
maxItems: 1
interconnects:
- maxItems: 2
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
interconnect-names:
- maxItems: 2
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm6350-dpu
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -57,6 +65,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-10nm
@@ -131,13 +141,6 @@ examples:
remote-endpoint = <&dsi0_in>;
};
};
-
- port@1 {
- reg = <1>;
- dpu_intf2_out: endpoint {
- remote-endpoint = <&dsi1_in>;
- };
- };
};
};
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6375-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6375-mdss.yaml
index 76369a4f7c4d..8e8a288d318c 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6375-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm6375-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm6375-mdss.yaml#
@@ -35,20 +35,28 @@ properties:
maxItems: 1
interconnects:
- maxItems: 2
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
interconnect-names:
- maxItems: 2
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm6375-dpu
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -57,6 +65,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm6375-dsi-phy-7nm
@@ -132,13 +142,6 @@ examples:
remote-endpoint = <&dsi0_in>;
};
};
-
- port@1 {
- reg = <1>;
- dpu_intf2_out: endpoint {
- remote-endpoint = <&dsi1_in>;
- };
- };
};
};
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-dpu.yaml
index 2b3f3fe9bdf7..13146b3f053c 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8150-dpu.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-mdss.yaml
index 5182e958e069..c0d6a4fdff97 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8150-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8150-mdss.yaml#
@@ -47,12 +47,16 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8150-dpu
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -61,9 +65,11 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
- const: qcom,dsi-phy-7nm
+ const: qcom,dsi-phy-7nm-8150
unevaluatedProperties: false
@@ -241,7 +247,7 @@ examples:
};
dsi0_phy: phy@ae94400 {
- compatible = "qcom,dsi-phy-7nm";
+ compatible = "qcom,dsi-phy-7nm-8150";
reg = <0x0ae94400 0x200>,
<0x0ae94600 0x280>,
<0x0ae94900 0x260>;
@@ -312,7 +318,7 @@ examples:
};
dsi1_phy: phy@ae96400 {
- compatible = "qcom,dsi-phy-7nm";
+ compatible = "qcom,dsi-phy-7nm-8150";
reg = <0x0ae96400 0x200>,
<0x0ae96600 0x280>,
<0x0ae96900 0x260>;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-dpu.yaml
index 687c8c170cd4..ffa5047e901f 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8250-dpu.yaml#
@@ -54,7 +54,7 @@ examples:
#include <dt-bindings/clock/qcom,gcc-sm8250.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8250.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-controller@ae01000 {
compatible = "qcom,sm8250-dpu";
@@ -72,7 +72,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-mdss.yaml
index 368d3db0ce96..51368cda7b2f 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8250-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8250-mdss.yaml#
@@ -46,12 +46,26 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8250-dpu
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ items:
+ - const: qcom,sm8250-dp
+ - const: qcom,sm8350-dp
+
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -60,6 +74,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,dsi-phy-7nm
@@ -76,7 +92,7 @@ examples:
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8250.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-subsystem@ae00000 {
compatible = "qcom,sm8250-mdss";
@@ -121,7 +137,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
@@ -196,7 +212,7 @@ examples:
assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&dsi0_phy>;
phy-names = "dsi";
@@ -286,7 +302,7 @@ examples:
assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&dsi1_phy>;
phy-names = "dsi";
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-dpu.yaml
index 120500395c9a..96ef2d9c3512 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8350-dpu.yaml#
@@ -51,7 +51,7 @@ examples:
#include <dt-bindings/clock/qcom,gcc-sm8350.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8350.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-controller@ae01000 {
compatible = "qcom,sm8350-dpu";
@@ -76,7 +76,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-mdss.yaml
index 79a226e4cc6a..163fc83c1e80 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8350-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8350-mdss.yaml#
@@ -48,12 +48,24 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8350-dpu
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: qcom,sm8350-dp
+
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -62,6 +74,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8350-dsi-phy-5nm
@@ -75,7 +89,7 @@ examples:
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8350.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-subsystem@ae00000 {
compatible = "qcom,sm8350-mdss";
@@ -128,7 +142,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
@@ -197,7 +211,7 @@ examples:
<&mdss_dsi0_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi0_phy>;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-dpu.yaml
index 0d17ece1c453..2a5d3daed0e1 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8450-dpu.yaml#
@@ -58,7 +58,7 @@ examples:
#include <dt-bindings/clock/qcom,gcc-sm8450.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8450.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-controller@ae01000 {
compatible = "qcom,sm8450-dpu";
@@ -83,7 +83,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-mdss.yaml
index f26eb5643aed..747a2e9665f4 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8450-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8450-mdss.yaml#
@@ -30,20 +30,34 @@ properties:
maxItems: 1
interconnects:
- maxItems: 2
+ maxItems: 3
interconnect-names:
- maxItems: 2
+ maxItems: 3
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8450-dpu
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ items:
+ - const: qcom,sm8450-dp
+ - const: qcom,sm8350-dp
+
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -52,6 +66,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8450-dsi-phy-5nm
@@ -68,16 +84,19 @@ examples:
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8450.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-subsystem@ae00000 {
compatible = "qcom,sm8450-mdss";
reg = <0x0ae00000 0x1000>;
reg-names = "mdss";
- interconnects = <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>,
- <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>;
- interconnect-names = "mdp0-mem", "mdp1-mem";
+ interconnects = <&mmss_noc MASTER_MDP_DISP &mc_virt SLAVE_EBI1_DISP>,
+ <&mmss_noc MASTER_MDP_DISP &mc_virt SLAVE_EBI1_DISP>,
+ <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_DISPLAY_CFG>;
+ interconnect-names = "mdp0-mem",
+ "mdp1-mem",
+ "cpu-cfg";
resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
@@ -122,7 +141,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
@@ -202,7 +221,7 @@ examples:
assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&dsi0_phy>;
phy-names = "dsi";
@@ -297,7 +316,7 @@ examples:
assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&dsi1_phy>;
phy-names = "dsi";
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-dpu.yaml
index ff58a747bb6f..16a541fca66f 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-dpu.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-dpu.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8550-dpu.yaml#
@@ -57,7 +57,7 @@ examples:
#include <dt-bindings/clock/qcom,sm8550-dispcc.h>
#include <dt-bindings/clock/qcom,sm8550-gcc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-controller@ae01000 {
compatible = "qcom,sm8550-dpu";
@@ -82,7 +82,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-mdss.yaml
index 887be33ba108..1ea50a2c7c8e 100644
--- a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-mdss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8550-mdss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/msm/qcom,sm8550-mdss.yaml#
@@ -38,12 +38,26 @@ properties:
patternProperties:
"^display-controller@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8550-dpu
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ items:
+ - const: qcom,sm8550-dp
+ - const: qcom,sm8350-dp
+
"^dsi@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
items:
@@ -52,6 +66,8 @@ patternProperties:
"^phy@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
const: qcom,sm8550-dsi-phy-4nm
@@ -68,7 +84,7 @@ examples:
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8550-rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
display-subsystem@ae00000 {
compatible = "qcom,sm8550-mdss";
@@ -122,7 +138,7 @@ examples:
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
@@ -197,7 +213,7 @@ examples:
assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&dsi0_phy>;
phy-names = "dsi";
@@ -286,7 +302,7 @@ examples:
assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&dsi1_phy>;
phy-names = "dsi";
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-dpu.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-dpu.yaml
new file mode 100644
index 000000000000..a01d15a03317
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-dpu.yaml
@@ -0,0 +1,127 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,sm8650-dpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM8650 Display DPU
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+$ref: /schemas/display/msm/dpu-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,sm8650-dpu
+
+ reg:
+ items:
+ - description: Address offset and size for mdp register set
+ - description: Address offset and size for vbif register set
+
+ reg-names:
+ items:
+ - const: mdp
+ - const: vbif
+
+ clocks:
+ items:
+ - description: Display hf axi
+ - description: Display MDSS ahb
+ - description: Display lut
+ - description: Display core
+ - description: Display vsync
+
+ clock-names:
+ items:
+ - const: nrt_bus
+ - const: iface
+ - const: lut
+ - const: core
+ - const: vsync
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+
+ display-controller@ae01000 {
+ compatible = "qcom,sm8650-dpu";
+ reg = <0x0ae01000 0x8f000>,
+ <0x0aeb0000 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ clocks = <&gcc_axi_clk>,
+ <&dispcc_ahb_clk>,
+ <&dispcc_mdp_lut_clk>,
+ <&dispcc_mdp_clk>,
+ <&dispcc_vsync_clk>;
+ clock-names = "nrt_bus",
+ "iface",
+ "lut",
+ "core",
+ "vsync";
+
+ assigned-clocks = <&dispcc_vsync_clk>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&dsi0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpu_intf2_out: endpoint {
+ remote-endpoint = <&dsi1_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-325000000 {
+ opp-hz = /bits/ 64 <325000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-375000000 {
+ opp-hz = /bits/ 64 <375000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-514000000 {
+ opp-hz = /bits/ 64 <514000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-mdss.yaml b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-mdss.yaml
new file mode 100644
index 000000000000..bd11119dc93d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/msm/qcom,sm8650-mdss.yaml
@@ -0,0 +1,328 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,sm8650-mdss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM8650 Display MDSS
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+description:
+ SM8650 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like
+ DPU display controller, DSI and DP interfaces etc.
+
+$ref: /schemas/display/msm/mdss-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,sm8650-mdss
+
+ clocks:
+ items:
+ - description: Display AHB
+ - description: Display hf AXI
+ - description: Display core
+
+ iommus:
+ maxItems: 1
+
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ maxItems: 2
+
+patternProperties:
+ "^display-controller@[0-9a-f]+$":
+ type: object
+ properties:
+ compatible:
+ const: qcom,sm8650-dpu
+
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ properties:
+ compatible:
+ const: qcom,sm8650-dp
+
+ "^dsi@[0-9a-f]+$":
+ type: object
+ properties:
+ compatible:
+ items:
+ - const: qcom,sm8650-dsi-ctrl
+ - const: qcom,mdss-dsi-ctrl
+
+ "^phy@[0-9a-f]+$":
+ type: object
+ properties:
+ compatible:
+ const: qcom,sm8650-dsi-phy-4nm
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+
+ display-subsystem@ae00000 {
+ compatible = "qcom,sm8650-mdss";
+ reg = <0x0ae00000 0x1000>;
+ reg-names = "mdss";
+
+ resets = <&dispcc_core_bcr>;
+
+ power-domains = <&dispcc_gdsc>;
+
+ clocks = <&gcc_ahb_clk>,
+ <&gcc_axi_clk>,
+ <&dispcc_mdp_clk>;
+ clock-names = "bus", "nrt_bus", "core";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ iommus = <&apps_smmu 0x1c00 0x2>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ display-controller@ae01000 {
+ compatible = "qcom,sm8650-dpu";
+ reg = <0x0ae01000 0x8f000>,
+ <0x0aeb0000 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ clocks = <&gcc_axi_clk>,
+ <&dispcc_ahb_clk>,
+ <&dispcc_mdp_lut_clk>,
+ <&dispcc_mdp_clk>,
+ <&dispcc_mdp_vsync_clk>;
+ clock-names = "nrt_bus",
+ "iface",
+ "lut",
+ "core",
+ "vsync";
+
+ assigned-clocks = <&dispcc_mdp_vsync_clk>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&dsi0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpu_intf2_out: endpoint {
+ remote-endpoint = <&dsi1_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-325000000 {
+ opp-hz = /bits/ 64 <325000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-375000000 {
+ opp-hz = /bits/ 64 <375000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-514000000 {
+ opp-hz = /bits/ 64 <514000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
+ dsi@ae94000 {
+ compatible = "qcom,sm8650-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0ae94000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispc_byte_clk>,
+ <&dispcc_intf_clk>,
+ <&dispcc_pclk>,
+ <&dispcc_esc_clk>,
+ <&dispcc_ahb_clk>,
+ <&gcc_bus_clk>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc_byte_clk>,
+ <&dispcc_pclk>;
+ assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ phys = <&dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsi0_out: endpoint {
+ };
+ };
+ };
+
+ dsi_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-187500000 {
+ opp-hz = /bits/ 64 <187500000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-358000000 {
+ opp-hz = /bits/ 64 <358000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+ };
+ };
+
+ dsi0_phy: phy@ae94400 {
+ compatible = "qcom,sm8650-dsi-phy-4nm";
+ reg = <0x0ae95000 0x200>,
+ <0x0ae95200 0x280>,
+ <0x0ae95500 0x400>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc_iface_clk>,
+ <&rpmhcc_ref_clk>;
+ clock-names = "iface", "ref";
+ };
+
+ dsi@ae96000 {
+ compatible = "qcom,sm8650-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0ae96000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <5>;
+
+ clocks = <&dispc_byte_clk>,
+ <&dispcc_intf_clk>,
+ <&dispcc_pclk>,
+ <&dispcc_esc_clk>,
+ <&dispcc_ahb_clk>,
+ <&gcc_bus_clk>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc_byte_clk>,
+ <&dispcc_pclk>;
+ assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ phys = <&dsi1_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsi1_in: endpoint {
+ remote-endpoint = <&dpu_intf2_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsi1_out: endpoint {
+ };
+ };
+ };
+ };
+
+ dsi1_phy: phy@ae96400 {
+ compatible = "qcom,sm8650-dsi-phy-4nm";
+ reg = <0x0ae97000 0x200>,
+ <0x0ae97200 0x280>,
+ <0x0ae97500 0x400>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc_iface_clk>,
+ <&rpmhcc_ref_clk>;
+ clock-names = "iface", "ref";
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/advantech,idk-2121wr.yaml b/sys/contrib/device-tree/Bindings/display/panel/advantech,idk-2121wr.yaml
index 67682fe77f10..2e8dbdb5a3d5 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/advantech,idk-2121wr.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/advantech,idk-2121wr.yaml
@@ -19,6 +19,9 @@ description: |
second port, therefore the ports must be marked accordingly (with either
dual-lvds-odd-pixels or dual-lvds-even-pixels).
+allOf:
+ - $ref: panel-common.yaml#
+
properties:
compatible:
items:
diff --git a/sys/contrib/device-tree/Bindings/display/panel/fascontek,fs035vg158.yaml b/sys/contrib/device-tree/Bindings/display/panel/fascontek,fs035vg158.yaml
new file mode 100644
index 000000000000..d13c4bd26de4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/fascontek,fs035vg158.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/fascontek,fs035vg158.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Fascontek FS035VG158 3.5" (640x480 pixels) 24-bit IPS LCD panel
+
+maintainers:
+ - John Watts <contact@jookia.org>
+
+allOf:
+ - $ref: panel-common.yaml#
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ const: fascontek,fs035vg158
+
+ spi-3wire: true
+
+required:
+ - compatible
+ - reg
+ - port
+ - power-supply
+ - reset-gpios
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ panel@0 {
+ compatible = "fascontek,fs035vg158";
+ reg = <0>;
+
+ spi-3wire;
+ spi-max-frequency = <3125000>;
+
+ reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
+
+ backlight = <&backlight>;
+ power-supply = <&vcc>;
+
+ port {
+ panel_input: endpoint {
+ remote-endpoint = <&panel_output>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/panel/himax,hx8394.yaml b/sys/contrib/device-tree/Bindings/display/panel/himax,hx8394.yaml
index 1b2a1baa26f9..916bb7f94206 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/himax,hx8394.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/himax,hx8394.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/himax,hx8394.yaml#
@@ -23,6 +23,7 @@ properties:
items:
- enum:
- hannstar,hsd060bhw4
+ - powkiddy,x55-panel
- const: himax,hx8394
reg: true
@@ -31,6 +32,8 @@ properties:
backlight: true
+ rotation: true
+
port: true
vcc-supply:
diff --git a/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9163.yaml b/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9163.yaml
index 90e323e19edb..3cabbba86581 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9163.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9163.yaml
@@ -48,10 +48,6 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
- backlight: backlight {
- compatible = "gpio-backlight";
- gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
- };
spi {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9805.yaml b/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9805.yaml
new file mode 100644
index 000000000000..f4f91f93f490
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9805.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/ilitek,ili9805.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ilitek ILI9805 based MIPI-DSI panels
+
+maintainers:
+ - Michael Trimarchi <michael@amarulasolutions.com>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - giantplus,gpm1790a0
+ - tianma,tm041xdhg01
+ - const: ilitek,ili9805
+
+ avdd-supply: true
+ dvdd-supply: true
+ reg: true
+
+required:
+ - compatible
+ - avdd-supply
+ - dvdd-supply
+ - reg
+ - reset-gpios
+ - port
+ - backlight
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "giantplus,gpm1790a0", "ilitek,ili9805";
+ reg = <0>;
+ avdd-supply = <&avdd_display>;
+ dvdd-supply = <&dvdd_display>;
+ reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL05 */
+ backlight = <&backlight>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mipi_dsi_out>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9881c.yaml b/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9881c.yaml
index c5d1df680858..b1e624be3e33 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9881c.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/ilitek,ili9881c.yaml
@@ -16,8 +16,10 @@ properties:
compatible:
items:
- enum:
+ - ampire,am8001280g
- bananapi,lhr050h41
- feixin,k101-im2byl02
+ - tdo,tl050hdv35
- wanchanglong,w552946aba
- const: ilitek,ili9881c
diff --git a/sys/contrib/device-tree/Bindings/display/panel/jdi,lpm102a188a.yaml b/sys/contrib/device-tree/Bindings/display/panel/jdi,lpm102a188a.yaml
new file mode 100644
index 000000000000..2f4d27a309a7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/jdi,lpm102a188a.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/jdi,lpm102a188a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: JDI LPM102A188A 2560x1800 10.2" DSI Panel
+
+maintainers:
+ - Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
+
+description: |
+ This panel requires a dual-channel DSI host to operate. It supports two modes:
+ - left-right: each channel drives the left or right half of the screen
+ - even-odd: each channel drives the even or odd lines of the screen
+
+ Each of the DSI channels controls a separate DSI peripheral. The peripheral
+ driven by the first link (DSI-LINK1) is considered the primary peripheral
+ and controls the device. The 'link2' property contains a phandle to the
+ peripheral driven by the second link (DSI-LINK2).
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ const: jdi,lpm102a188a
+
+ reg: true
+ enable-gpios: true
+ reset-gpios: true
+ power-supply: true
+ backlight: true
+
+ ddi-supply:
+ description: The regulator that provides IOVCC (1.8V).
+
+ link2:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: |
+ phandle to the DSI peripheral on the secondary link. Note that the
+ presence of this property marks the containing node as DSI-LINK1.
+
+required:
+ - compatible
+ - reg
+
+if:
+ required:
+ - link2
+then:
+ required:
+ - power-supply
+ - ddi-supply
+ - enable-gpios
+ - reset-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/gpio/tegra-gpio.h>
+
+ dsia: dsi@54300000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0x54300000 0x0 0x00040000>;
+
+ link2: panel@0 {
+ compatible = "jdi,lpm102a188a";
+ reg = <0>;
+ };
+ };
+
+ dsib: dsi@54400000{
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0x54400000 0x0 0x00040000>;
+ nvidia,ganged-mode = <&dsia>;
+
+ link1: panel@0 {
+ compatible = "jdi,lpm102a188a";
+ reg = <0>;
+ power-supply = <&pplcd_vdd>;
+ ddi-supply = <&pp1800_lcdio>;
+ enable-gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
+ link2 = <&link2>;
+ backlight = <&backlight>;
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk035c5444t.yaml b/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk035c5444t.yaml
index ebdca5f5a001..7a55961e1a3d 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk035c5444t.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk035c5444t.yaml
@@ -18,16 +18,12 @@ properties:
compatible:
const: leadtek,ltk035c5444t
- backlight: true
- port: true
- power-supply: true
- reg: true
- reset-gpios: true
-
spi-3wire: true
required:
- compatible
+ - reg
+ - port
- power-supply
- reset-gpios
diff --git a/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk050h3146w.yaml b/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk050h3146w.yaml
index 3f6efbb942da..a40ab887ada7 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk050h3146w.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/leadtek,ltk050h3146w.yaml
@@ -17,6 +17,7 @@ properties:
enum:
- leadtek,ltk050h3146w
- leadtek,ltk050h3146w-a2
+ - leadtek,ltk050h3148w
reg: true
backlight: true
reset-gpios: true
diff --git a/sys/contrib/device-tree/Bindings/display/panel/mantix,mlaf057we51-x.yaml b/sys/contrib/device-tree/Bindings/display/panel/mantix,mlaf057we51-x.yaml
index a4b8569ab81c..74ff772973d6 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/mantix,mlaf057we51-x.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/mantix,mlaf057we51-x.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/mantix,mlaf057we51-x.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/panel/newvision,nv3051d.yaml b/sys/contrib/device-tree/Bindings/display/panel/newvision,nv3051d.yaml
index 116c1b6030a2..7a634fbc465e 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/newvision,nv3051d.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/newvision,nv3051d.yaml
@@ -7,9 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: NewVision NV3051D based LCD panel
description: |
- The NewVision NV3051D is a driver chip used to drive DSI panels. For now,
- this driver only supports the 640x480 panels found in the Anbernic RG353
- based devices.
+ The NewVision NV3051D is a driver chip used to drive DSI panels.
maintainers:
- Chris Morgan <macromorgan@hotmail.com>
@@ -21,8 +19,9 @@ properties:
compatible:
items:
- enum:
+ - anbernic,rg351v-panel
- anbernic,rg353p-panel
- - anbernic,rg353v-panel
+ - powkiddy,rk2023-panel
- const: newvision,nv3051d
reg: true
diff --git a/sys/contrib/device-tree/Bindings/display/panel/olimex,lcd-olinuxino.yaml b/sys/contrib/device-tree/Bindings/display/panel/olimex,lcd-olinuxino.yaml
index 9f97598efdfa..72463795e4c6 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/olimex,lcd-olinuxino.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/olimex,lcd-olinuxino.yaml
@@ -20,7 +20,7 @@ description: |
The panel itself contains:
- AT24C16C EEPROM holding panel identification and timing requirements
- AR1021 resistive touch screen controller (optional)
- - FT5x6 capacitive touch screnn controller (optional)
+ - FT5x6 capacitive touch screen controller (optional)
- GT911/GT928 capacitive touch screen controller (optional)
The above chips share same I2C bus. The EEPROM is factory preprogrammed with
diff --git a/sys/contrib/device-tree/Bindings/display/panel/orisetech,otm8009a.yaml b/sys/contrib/device-tree/Bindings/display/panel/orisetech,otm8009a.yaml
index ad7d3575190e..1e4f140f48b8 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/orisetech,otm8009a.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/orisetech,otm8009a.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/orisetech,otm8009a.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-common.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-common.yaml
index 5b38dc89cb21..0a57a31f4f3d 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/panel-common.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-common.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
This document defines device tree properties common to several classes of
- display panels. It doesn't constitue a device tree binding specification by
+ display panels. It doesn't constitute a device tree binding specification by
itself but is meant to be referenced by device tree bindings.
When referenced from panel device tree bindings the properties defined in this
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-dsi-cm.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-dsi-cm.yaml
index 4a36aa64c716..f8dc9929e833 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/panel-dsi-cm.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-dsi-cm.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/panel-dsi-cm.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-lvds.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-lvds.yaml
index 929fe046d1e7..9f1016551e0b 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/panel-lvds.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-lvds.yaml
@@ -40,6 +40,12 @@ properties:
items:
- enum:
- auo,b101ew05
+ # Chunghwa Picture Tubes Ltd. 7" WXGA (800x1280) TFT LCD LVDS panel
+ - chunghwa,claa070wp03xg
+ # HannStar Display Corp. HSD101PWW2 10.1" WXGA (1280x800) LVDS panel
+ - hannstar,hsd101pww2
+ # Hydis Technologies 7" WXGA (800x1280) TFT LCD LVDS panel
+ - hydis,hv070wx2-1e0
- tbs,a711-panel
- const: panel-lvds
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-mipi-dbi-spi.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-mipi-dbi-spi.yaml
index 2f0238b770eb..e808215cb39e 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/panel-mipi-dbi-spi.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-mipi-dbi-spi.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/panel-mipi-dbi-spi.yaml#
@@ -66,6 +66,7 @@ properties:
compatible:
items:
- enum:
+ - saef,sftc154b
- sainsmart18
- shineworld,lh133k
- const: panel-mipi-dbi-spi
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-simple-dsi.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-simple-dsi.yaml
index 90c04cff8281..f9160d7bac3c 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/panel-simple-dsi.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-simple-dsi.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/panel-simple-dsi.yaml#
@@ -42,6 +42,8 @@ properties:
- lg,acx467akm-7
# LG Corporation 7" WXGA TFT LCD panel
- lg,ld070wx3-sl01
+ # LG Corporation 5" HD TFT LCD panel
+ - lg,lh500wx1-sd03
# One Stop Displays OSD101T2587-53TS 10.1" 1920x1200 panel
- osddisplays,osd101t2587-53ts
# Panasonic 10" WUXGA TFT LCD panel
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-simple-lvds-dual-ports.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-simple-lvds-dual-ports.yaml
new file mode 100644
index 000000000000..716ece5f3978
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-simple-lvds-dual-ports.yaml
@@ -0,0 +1,120 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/panel-simple-lvds-dual-ports.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple LVDS panels with one power supply and dual LVDS ports
+
+maintainers:
+ - Liu Ying <victor.liu@nxp.com>
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Sam Ravnborg <sam@ravnborg.org>
+
+description: |
+ This binding file is a collection of the LVDS panels that
+ has dual LVDS ports and requires only a single power-supply.
+ The first port receives odd pixels, and the second port receives even pixels.
+ There are optionally a backlight and an enable GPIO.
+ The panel may use an OF graph binding for the association to the display,
+ or it may be a direct child node of the display.
+
+ If the panel is more advanced a dedicated binding file is required.
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+
+ compatible:
+ enum:
+ # compatible must be listed in alphabetical order, ordered by compatible.
+ # The description in the comment is mandatory for each compatible.
+
+ # AU Optronics Corporation 13.3" FHD (1920x1080) TFT LCD panel
+ - auo,g133han01
+ # AU Optronics Corporation 15.6" FHD (1920x1080) TFT LCD panel
+ - auo,g156han04
+ # AU Optronics Corporation 18.5" FHD (1920x1080) TFT LCD panel
+ - auo,g185han01
+ # AU Optronics Corporation 19.0" (1280x1024) TFT LCD panel
+ - auo,g190ean01
+ # Kaohsiung Opto-Electronics Inc. 10.1" WUXGA (1920 x 1200) LVDS TFT LCD panel
+ - koe,tx26d202vm0bwa
+ # NLT Technologies, Ltd. 15.6" FHD (1920x1080) LVDS TFT LCD panel
+ - nlt,nl192108ac18-02d
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: The first sink port.
+
+ properties:
+ dual-lvds-odd-pixels:
+ type: boolean
+ description: The first sink port for odd pixels.
+
+ required:
+ - dual-lvds-odd-pixels
+
+ port@1:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: The second sink port.
+
+ properties:
+ dual-lvds-even-pixels:
+ type: boolean
+ description: The second sink port for even pixels.
+
+ required:
+ - dual-lvds-even-pixels
+
+ required:
+ - port@0
+ - port@1
+
+ backlight: true
+ enable-gpios: true
+ power-supply: true
+
+additionalProperties: false
+
+required:
+ - compatible
+ - ports
+ - power-supply
+
+examples:
+ - |
+ panel: panel-lvds {
+ compatible = "koe,tx26d202vm0bwa";
+ power-supply = <&vdd_lcd_reg>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ dual-lvds-odd-pixels;
+ reg = <0>;
+
+ panel_lvds0_in: endpoint {
+ remote-endpoint = <&lvds0_out>;
+ };
+ };
+
+ port@1 {
+ dual-lvds-even-pixels;
+ reg = <1>;
+
+ panel_lvds1_in: endpoint {
+ remote-endpoint = <&lvds1_out>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/panel/panel-simple.yaml b/sys/contrib/device-tree/Bindings/display/panel/panel-simple.yaml
index 1d4936fc5182..634a10c6f2dd 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/panel-simple.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/panel-simple.yaml
@@ -21,9 +21,9 @@ description: |
allOf:
- $ref: panel-common.yaml#
+ - $ref: ../lvds-data-mapping.yaml#
properties:
-
compatible:
enum:
# compatible must be listed in alphabetical order, ordered by compatible.
@@ -65,20 +65,16 @@ properties:
- auo,g104sn02
# AU Optronics Corporation 12.1" (1280x800) TFT LCD panel
- auo,g121ean01
- # AU Optronics Corporation 13.3" FHD (1920x1080) TFT LCD panel
- - auo,g133han01
# AU Optronics Corporation 15.6" (1366x768) TFT LCD panel
- auo,g156xtn01
- # AU Optronics Corporation 18.5" FHD (1920x1080) TFT LCD panel
- - auo,g185han01
- # AU Optronics Corporation 19.0" (1280x1024) TFT LCD panel
- - auo,g190ean01
# AU Optronics Corporation 31.5" FHD (1920x1080) TFT LCD panel
- auo,p320hvn03
# AU Optronics Corporation 21.5" FHD (1920x1080) color TFT LCD panel
- auo,t215hvn01
# Shanghai AVIC Optoelectronics 7" 1024x600 color TFT-LCD panel
- avic,tm070ddh03
+ # BOE BP101WX1-100 10.1" WXGA (1280x800) LVDS panel
+ - boe,bp101wx1-100
# BOE EV121WXM-N10-1850 12.1" WXGA (1280x800) TFT LCD panel
- boe,ev121wxm-n10-1850
# BOE HV070WSA-100 7.01" WSVGA TFT LCD panel
@@ -103,8 +99,6 @@ properties:
- cdtech,s070wv95-ct16
# Chefree CH101OLHLWH-002 10.1" (1280x800) color TFT LCD panel
- chefree,ch101olhlwh-002
- # Chunghwa Picture Tubes Ltd. 7" WXGA TFT LCD panel
- - chunghwa,claa070wp03xg
# Chunghwa Picture Tubes Ltd. 10.1" WXGA TFT LCD panel
- chunghwa,claa101wa01a
# Chunghwa Picture Tubes Ltd. 10.1" WXGA TFT LCD panel
@@ -152,6 +146,8 @@ properties:
- edt,etmv570g2dhu
# E Ink VB3300-KCA
- eink,vb3300-kca
+ # Evervision Electronics Co. Ltd. VGG644804 5.7" VGA TFT LCD Panel
+ - evervision,vgg644804
# Evervision Electronics Co. Ltd. VGG804821 5.0" WVGA TFT LCD Panel
- evervision,vgg804821
# Foxlink Group 5" WVGA TFT LCD panel
@@ -168,8 +164,6 @@ properties:
- hannstar,hsd070pww1
# HannStar Display Corp. HSD100PXN1 10.1" XGA LVDS panel
- hannstar,hsd100pxn1
- # HannStar Display Corp. HSD101PWW2 10.1" WXGA (1280x800) LVDS panel
- - hannstar,hsd101pww2
# Hitachi Ltd. Corporation 9" WVGA (800x480) TFT LCD panel
- hit,tx23d38vm0caa
# InfoVision Optoelectronics M133NWF4 R0 13.3" FHD (1920x1080) TFT LCD panel
@@ -196,6 +190,8 @@ properties:
- innolux,n116bge
# InnoLux 13.3" FHD (1920x1080) eDP TFT LCD panel
- innolux,n125hce-gn1
+ # InnoLux 15.6" FHD (1920x1080) TFT LCD panel
+ - innolux,g156hce-l01
# InnoLux 15.6" WXGA TFT LCD panel
- innolux,n156bge-l21
# Innolux P120ZDG-BF1 12.02 inch eDP 2K display panel
@@ -206,8 +202,6 @@ properties:
- kingdisplay,kd116n21-30nv-a010
# Kaohsiung Opto-Electronics Inc. 5.7" QVGA (320 x 240) TFT LCD panel
- koe,tx14d24vm1bpa
- # Kaohsiung Opto-Electronics Inc. 10.1" WUXGA (1920 x 1200) LVDS TFT LCD panel
- - koe,tx26d202vm0bwa
# Kaohsiung Opto-Electronics. TX31D200VM0BAA 12.3" HSXGA LVDS panel
- koe,tx31d200vm0baa
# Kyocera Corporation 7" WVGA (800x480) transmissive color TFT
@@ -218,8 +212,6 @@ properties:
- lemaker,bl035-rgb-002
# LG 7" (800x480 pixels) TFT LCD panel
- lg,lb070wv8
- # LG Corporation 5" HD TFT LCD panel
- - lg,lh500wx1-sd03
# LG LP079QX1-SP0V 7.9" (1536x2048 pixels) TFT LCD panel
- lg,lp079qx1-sp0v
# LG 9.7" (2048x1536 pixels) TFT LCD panel
@@ -240,6 +232,8 @@ properties:
- logictechno,lttd800480070-l6wh-rt
# Mitsubishi "AA070MC01 7.0" WVGA TFT LCD panel
- mitsubishi,aa070mc01-ca1
+ # Mitsubishi AA084XE01 8.4" XGA TFT LCD panel
+ - mitsubishi,aa084xe01
# Multi-Inno Technology Co.,Ltd MI0700S4T-6 7" 800x480 TFT Resistive Touch Module
- multi-inno,mi0700s4t-6
# Multi-Inno Technology Co.,Ltd MI0800FT-9 8" 800x600 TFT Resistive Touch Module
@@ -256,8 +250,6 @@ properties:
- neweast,wjfh116008a
# Newhaven Display International 480 x 272 TFT LCD panel
- newhaven,nhd-4.3-480272ef-atxl
- # NLT Technologies, Ltd. 15.6" FHD (1920x1080) LVDS TFT LCD panel
- - nlt,nl192108ac18-02d
# New Vision Display 7.0" 800 RGB x 480 TFT LCD panel
- nvd,9128
# OKAYA Electric America, Inc. RS800480T-7X0GP 7" WVGA LCD panel
@@ -359,6 +351,17 @@ properties:
power-supply: true
no-hpd: true
hpd-gpios: true
+ data-mapping: true
+
+if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: innolux,g101ice-l01
+then:
+ properties:
+ data-mapping: false
additionalProperties: false
@@ -378,3 +381,16 @@ examples:
};
};
};
+ - |
+ panel_lvds: panel-lvds {
+ compatible = "innolux,g101ice-l01";
+ power-supply = <&vcc_lcd_reg>;
+
+ data-mapping = "jeida-24";
+
+ port {
+ panel_in_lvds: endpoint {
+ remote-endpoint = <&ltdc_out_lvds>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/panel/raydium,rm68200.yaml b/sys/contrib/device-tree/Bindings/display/panel/raydium,rm68200.yaml
index e8ce2315631a..46fe1014ebc4 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/raydium,rm68200.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/raydium,rm68200.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/raydium,rm68200.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/panel/raydium,rm692e5.yaml b/sys/contrib/device-tree/Bindings/display/panel/raydium,rm692e5.yaml
new file mode 100644
index 000000000000..f436ba6738ca
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/raydium,rm692e5.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/raydium,rm692e5.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Raydium RM692E5 based DSI display panels
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description:
+ The Raydium RM692E5 is a generic DSI Panel IC used to control
+ AMOLED panels.
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: fairphone,fp5-rm692e5-boe
+ - const: raydium,rm692e5
+
+ dvdd-supply:
+ description: Digital voltage rail
+
+ vci-supply:
+ description: Analog voltage rail
+
+ vddio-supply:
+ description: I/O voltage rail
+
+ reg: true
+ port: true
+
+required:
+ - compatible
+ - reg
+ - reset-gpios
+ - dvdd-supply
+ - vci-supply
+ - vddio-supply
+ - port
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "fairphone,fp5-rm692e5-boe", "raydium,rm692e5";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
+ dvdd-supply = <&vreg_oled_vci>;
+ vci-supply = <&vreg_l12c>;
+ vddio-supply = <&vreg_oled_dvdd>;
+
+ port {
+ panel_in_0: endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/rocktech,jh057n00900.yaml b/sys/contrib/device-tree/Bindings/display/panel/rocktech,jh057n00900.yaml
index 150e81090af2..97cccd8a8479 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/rocktech,jh057n00900.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/rocktech,jh057n00900.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/rocktech,jh057n00900.yaml#
@@ -22,6 +22,8 @@ properties:
enum:
# Anberic RG353V-V2 5.0" 640x480 TFT LCD panel
- anbernic,rg353v-panel-v2
+ # Powkiddy RGB30 3.0" 720x720 TFT LCD panel
+ - powkiddy,rgb30-panel
# Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
- rocktech,jh057n00900
# Xingbangda XBD599 5.99" 720x1440 TFT LCD panel
diff --git a/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7701.yaml b/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7701.yaml
index 4dc0cd4a6a77..b348f5bf0a98 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7701.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7701.yaml
@@ -27,6 +27,7 @@ properties:
compatible:
items:
- enum:
+ - anbernic,rg-arc-panel
- densitron,dmt028vghmcmi-1a
- elida,kd50t048a
- techstar,ts8550b
diff --git a/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7789v.yaml b/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7789v.yaml
index fa6556363cca..ef162b51d010 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7789v.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/sitronix,st7789v.yaml
@@ -15,17 +15,26 @@ allOf:
properties:
compatible:
- const: sitronix,st7789v
+ enum:
+ - edt,et028013dma
+ - inanbo,t28cp45tn89-v17
+ - jasonic,jt240mhqs-hwt-ek-e3
+ - sitronix,st7789v
reg: true
reset-gpios: true
power-supply: true
backlight: true
port: true
+ rotation: true
spi-cpha: true
spi-cpol: true
+ spi-rx-bus-width:
+ minimum: 0
+ maximum: 1
+
dc-gpios:
maxItems: 1
description: DCX pin, Display data/command selection pin in parallel interface
@@ -33,7 +42,6 @@ properties:
required:
- compatible
- reg
- - reset-gpios
- power-supply
unevaluatedProperties: false
@@ -52,6 +60,7 @@ examples:
reset-gpios = <&pio 6 11 GPIO_ACTIVE_LOW>;
backlight = <&pwm_bl>;
power-supply = <&power>;
+ rotation = <180>;
spi-max-frequency = <100000>;
spi-cpol;
spi-cpha;
diff --git a/sys/contrib/device-tree/Bindings/display/panel/startek,kd070fhfid015.yaml b/sys/contrib/device-tree/Bindings/display/panel/startek,kd070fhfid015.yaml
new file mode 100644
index 000000000000..d817f998cddc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/startek,kd070fhfid015.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/startek,kd070fhfid015.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Startek Electronic Technology Co. kd070fhfid015 7 inch TFT LCD panel
+
+maintainers:
+ - Alexandre Mergnat <amergnat@baylibre.com>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ const: startek,kd070fhfid015
+
+ enable-gpios: true
+
+ iovcc-supply:
+ description: Reference to the regulator powering the panel IO pins.
+
+ reg:
+ maxItems: 1
+ description: DSI virtual channel
+
+ reset-gpios: true
+
+ port: true
+
+ power-supply: true
+
+additionalProperties: false
+
+required:
+ - compatible
+ - enable-gpios
+ - iovcc-supply
+ - reg
+ - reset-gpios
+ - port
+ - power-supply
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "startek,kd070fhfid015";
+ reg = <0>;
+ enable-gpios = <&pio 67 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
+ iovcc-supply = <&mt6357_vsim1_reg>;
+ power-supply = <&vsys_lcm_reg>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/synaptics,r63353.yaml b/sys/contrib/device-tree/Bindings/display/panel/synaptics,r63353.yaml
new file mode 100644
index 000000000000..e5617d125567
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/synaptics,r63353.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/synaptics,r63353.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics R63353 based MIPI-DSI panels
+
+maintainers:
+ - Michael Trimarchi <michael@amarulasolutions.com>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - sharp,ls068b3sx02
+ - const: syna,r63353
+
+ avdd-supply: true
+ dvdd-supply: true
+ reg: true
+
+required:
+ - compatible
+ - avdd-supply
+ - dvdd-supply
+ - reg
+ - reset-gpios
+ - port
+ - backlight
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "sharp,ls068b3sx02", "syna,r63353";
+ reg = <0>;
+ avdd-supply = <&avdd_display>;
+ dvdd-supply = <&dvdd_display>;
+ reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL05 */
+ backlight = <&backlight>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mipi_dsi_out>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/visionox,r66451.yaml b/sys/contrib/device-tree/Bindings/display/panel/visionox,r66451.yaml
new file mode 100644
index 000000000000..6ba323683921
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/panel/visionox,r66451.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/visionox,r66451.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Visionox R66451 AMOLED DSI Panel
+
+maintainers:
+ - Jessica Zhang <quic_jesszhan@quicinc.com>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ const: visionox,r66451
+
+ reg:
+ maxItems: 1
+ description: DSI virtual channel
+
+ vddio-supply: true
+ vdd-supply: true
+ port: true
+ reset-gpios: true
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - vddio-supply
+ - vdd-supply
+ - reset-gpios
+ - port
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ panel@0 {
+ compatible = "visionox,r66451";
+ reg = <0>;
+ vddio-supply = <&vreg_l12c_1p8>;
+ vdd-supply = <&vreg_l13c_3p0>;
+
+ reset-gpios = <&tlmm 24 GPIO_ACTIVE_LOW>;
+
+ port {
+ panel0_in: endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/display/panel/visionox,rm69299.yaml b/sys/contrib/device-tree/Bindings/display/panel/visionox,rm69299.yaml
index 444ac2a4772d..fa745a6f4456 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/visionox,rm69299.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/visionox,rm69299.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/visionox,rm69299.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/panel/visionox,vtdr6130.yaml b/sys/contrib/device-tree/Bindings/display/panel/visionox,vtdr6130.yaml
index 84562a5b710a..d5a8295106c1 100644
--- a/sys/contrib/device-tree/Bindings/display/panel/visionox,vtdr6130.yaml
+++ b/sys/contrib/device-tree/Bindings/display/panel/visionox,vtdr6130.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/visionox,vtdr6130.yaml#
diff --git a/sys/contrib/device-tree/Bindings/display/renesas,shmobile-lcdc.yaml b/sys/contrib/device-tree/Bindings/display/renesas,shmobile-lcdc.yaml
new file mode 100644
index 000000000000..9816c4cacc7d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/renesas,shmobile-lcdc.yaml
@@ -0,0 +1,130 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/renesas,shmobile-lcdc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas SH-Mobile LCD Controller (LCDC)
+
+maintainers:
+ - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
+ - Geert Uytterhoeven <geert+renesas@glider.be>
+
+properties:
+ compatible:
+ enum:
+ - renesas,r8a7740-lcdc # R-Mobile A1
+ - renesas,sh73a0-lcdc # SH-Mobile AG5
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ maxItems: 5
+ description:
+ Only the functional clock is mandatory.
+ Some of the optional clocks are model-dependent (e.g. "video" (a.k.a.
+ "vou" or "dv_clk") is available on R-Mobile A1 only).
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: fck
+ - enum: [ media, lclk, hdmi, video ]
+ - enum: [ media, lclk, hdmi, video ]
+ - enum: [ media, lclk, hdmi, video ]
+ - enum: [ media, lclk, hdmi, video ]
+
+ power-domains:
+ maxItems: 1
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: LCD port (R-Mobile A1 and SH-Mobile AG5)
+ unevaluatedProperties: false
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: HDMI port (R-Mobile A1 LCDC1 and SH-Mobile AG5)
+ unevaluatedProperties: false
+
+ port@2:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: MIPI-DSI port (SH-Mobile AG5)
+ unevaluatedProperties: false
+
+ required:
+ - port@0
+
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - power-domains
+ - ports
+
+additionalProperties: false
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r8a7740-lcdc
+ then:
+ properties:
+ ports:
+ properties:
+ port@2: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,sh73a0-lcdc
+ then:
+ properties:
+ ports:
+ required:
+ - port@1
+ - port@2
+
+examples:
+ - |
+ #include <dt-bindings/clock/r8a7740-clock.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ lcd-controller@fe940000 {
+ compatible = "renesas,r8a7740-lcdc";
+ reg = <0xfe940000 0x4000>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
+ <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
+ <&vou_clk>;
+ clock-names = "fck", "media", "lclk", "video";
+ power-domains = <&pd_a4lc>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lcdc0_rgb: endpoint {
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml
index 8e8a40879140..ccf79e738fa1 100644
--- a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml
+++ b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml
@@ -18,6 +18,7 @@ properties:
- rockchip,rk3288-mipi-dsi
- rockchip,rk3399-mipi-dsi
- rockchip,rk3568-mipi-dsi
+ - rockchip,rv1126-mipi-dsi
- const: snps,dw-mipi-dsi
interrupts:
@@ -77,6 +78,7 @@ allOf:
enum:
- rockchip,px30-mipi-dsi
- rockchip,rk3568-mipi-dsi
+ - rockchip,rv1126-mipi-dsi
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,inno-hdmi.yaml b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,inno-hdmi.yaml
new file mode 100644
index 000000000000..be78dcfa1c76
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip,inno-hdmi.yaml
@@ -0,0 +1,139 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/rockchip/rockchip,inno-hdmi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Innosilicon HDMI controller
+
+maintainers:
+ - Sandy Huang <hjc@rock-chips.com>
+ - Heiko Stuebner <heiko@sntech.de>
+
+properties:
+ compatible:
+ enum:
+ - rockchip,rk3036-inno-hdmi
+ - rockchip,rk3128-inno-hdmi
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ items:
+ - description: The HDMI controller main clock
+ - description: The HDMI PHY reference clock
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: pclk
+ - const: ref
+
+ power-domains:
+ maxItems: 1
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Port node with one endpoint connected to a vop node.
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Port node with one endpoint connected to a hdmi-connector node.
+
+ required:
+ - port@0
+ - port@1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - pinctrl-0
+ - pinctrl-names
+ - ports
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3036-inno-hdmi
+
+ then:
+ properties:
+ power-domains: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3128-inno-hdmi
+
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ clock-names:
+ minItems: 2
+ required:
+ - power-domains
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/rk3036-cru.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/pinctrl/rockchip.h>
+ hdmi: hdmi@20034000 {
+ compatible = "rockchip,rk3036-inno-hdmi";
+ reg = <0x20034000 0x4000>;
+ interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru PCLK_HDMI>;
+ clock-names = "pclk";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_ctl>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hdmi_in: port@0 {
+ reg = <0>;
+ hdmi_in_vop: endpoint {
+ remote-endpoint = <&vop_out_hdmi>;
+ };
+ };
+
+ hdmi_out: port@1 {
+ reg = <1>;
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+ };
+ };
+ };
+
+ pinctrl {
+ hdmi {
+ hdmi_ctl: hdmi-ctl {
+ rockchip,pins = <1 RK_PB0 1 &pcfg_pull_none>,
+ <1 RK_PB1 1 &pcfg_pull_none>,
+ <1 RK_PB2 1 &pcfg_pull_none>,
+ <1 RK_PB3 1 &pcfg_pull_none>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop.yaml b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop.yaml
index df61cb5f5c54..b339b7e708c6 100644
--- a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop.yaml
+++ b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop.yaml
@@ -31,6 +31,7 @@ properties:
- rockchip,rk3368-vop
- rockchip,rk3399-vop-big
- rockchip,rk3399-vop-lit
+ - rockchip,rv1126-vop
reg:
minItems: 1
diff --git a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop2.yaml b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop2.yaml
index fba45091d909..2531726af306 100644
--- a/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop2.yaml
+++ b/sys/contrib/device-tree/Bindings/display/rockchip/rockchip-vop2.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/rockchip/rockchip-vop2.yaml#
@@ -8,8 +8,8 @@ title: Rockchip SoC display controller (VOP2)
description:
VOP2 (Video Output Processor v2) is the display controller for the Rockchip
- series of SoCs which transfers the image data from a video memory
- buffer to an external LCD interface.
+ series of SoCs which transfers the image data from a video memory buffer to
+ an external LCD interface.
maintainers:
- Sandy Huang <hjc@rock-chips.com>
@@ -20,6 +20,7 @@ properties:
enum:
- rockchip,rk3566-vop
- rockchip,rk3568-vop
+ - rockchip,rk3588-vop
reg:
items:
@@ -27,8 +28,8 @@ properties:
Must contain one entry corresponding to the base address and length
of the register space.
- description:
- Can optionally contain a second entry corresponding to
- the CRTC gamma LUT address.
+ Can optionally contain a second entry corresponding to the CRTC gamma
+ LUT address.
reg-names:
items:
@@ -41,45 +42,63 @@ properties:
The VOP interrupt is shared by several interrupt sources, such as
frame start (VSYNC), line flag and other status interrupts.
+ # See compatible-specific constraints below.
clocks:
+ minItems: 5
items:
- - description: Clock for ddr buffer transfer.
- - description: Clock for the ahb bus to R/W the phy regs.
+ - description: Clock for ddr buffer transfer via axi.
+ - description: Clock for the ahb bus to R/W the regs.
- description: Pixel clock for video port 0.
- description: Pixel clock for video port 1.
- description: Pixel clock for video port 2.
+ - description: Pixel clock for video port 3.
+ - description: Peripheral(vop grf/dsi) clock.
clock-names:
+ minItems: 5
items:
- const: aclk
- const: hclk
- const: dclk_vp0
- const: dclk_vp1
- const: dclk_vp2
+ - const: dclk_vp3
+ - const: pclk_vop
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
description:
- Phandle to GRF regs used for misc control
+ Phandle to GRF regs used for control the polarity of dclk/hsync/vsync of DPI,
+ also used for query vop memory bisr enable status, etc.
+
+ rockchip,vo1-grf:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to VO GRF regs used for control the polarity of dclk/hsync/vsync of hdmi
+ on rk3588.
+
+ rockchip,vop-grf:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to VOP GRF regs used for control data path between vopr and hdmi/edp.
+
+ rockchip,pmu:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to PMU GRF used for query vop memory bisr status on rk3588.
ports:
$ref: /schemas/graph.yaml#/properties/ports
- properties:
- port@0:
+ patternProperties:
+ "^port@[0-3]$":
$ref: /schemas/graph.yaml#/properties/port
- description:
- Output endpoint of VP0
+ description: Output endpoint of VP0/1/2/3.
- port@1:
- $ref: /schemas/graph.yaml#/properties/port
- description:
- Output endpoint of VP1
+ required:
+ - port@0
- port@2:
- $ref: /schemas/graph.yaml#/properties/port
- description:
- Output endpoint of VP2
+ unevaluatedProperties: false
iommus:
maxItems: 1
@@ -96,6 +115,49 @@ required:
- clock-names
- ports
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3588-vop
+ then:
+ properties:
+ clocks:
+ minItems: 7
+ clock-names:
+ minItems: 7
+
+ ports:
+ required:
+ - port@0
+ - port@1
+ - port@2
+ - port@3
+
+ required:
+ - rockchip,grf
+ - rockchip,vo1-grf
+ - rockchip,vop-grf
+ - rockchip,pmu
+
+ else:
+ properties:
+ rockchip,vo1-grf: false
+ rockchip,vop-grf: false
+ rockchip,pmu: false
+
+ clocks:
+ maxItems: 5
+ clock-names:
+ maxItems: 5
+
+ ports:
+ required:
+ - port@0
+ - port@1
+ - port@2
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/display/samsung/samsung,exynos-mixer.yaml b/sys/contrib/device-tree/Bindings/display/samsung/samsung,exynos-mixer.yaml
index 25d53fde92e1..597c9cc6a312 100644
--- a/sys/contrib/device-tree/Bindings/display/samsung/samsung,exynos-mixer.yaml
+++ b/sys/contrib/device-tree/Bindings/display/samsung/samsung,exynos-mixer.yaml
@@ -85,7 +85,7 @@ allOf:
clocks:
minItems: 6
maxItems: 6
- regs:
+ reg:
minItems: 2
maxItems: 2
@@ -99,7 +99,7 @@ allOf:
clocks:
minItems: 4
maxItems: 4
- regs:
+ reg:
minItems: 2
maxItems: 2
@@ -116,7 +116,7 @@ allOf:
clocks:
minItems: 3
maxItems: 3
- regs:
+ reg:
minItems: 1
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/display/sitronix,st7735r.yaml b/sys/contrib/device-tree/Bindings/display/sitronix,st7735r.yaml
index 621f27148419..3b0ebc0db8e0 100644
--- a/sys/contrib/device-tree/Bindings/display/sitronix,st7735r.yaml
+++ b/sys/contrib/device-tree/Bindings/display/sitronix,st7735r.yaml
@@ -54,11 +54,6 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
- backlight: backlight {
- compatible = "gpio-backlight";
- gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
- };
-
spi {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/display/solomon,ssd-common.yaml b/sys/contrib/device-tree/Bindings/display/solomon,ssd-common.yaml
new file mode 100644
index 000000000000..3e6998481a75
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/solomon,ssd-common.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/solomon,ssd-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common properties for Solomon OLED Display Controllers
+
+maintainers:
+ - Javier Martinez Canillas <javierm@redhat.com>
+
+properties:
+ reg:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ # Only required for SPI
+ dc-gpios:
+ description:
+ GPIO connected to the controller's D/C# (Data/Command) pin,
+ that is needed for 4-wire SPI to tell the controller if the
+ data sent is for a command register or the display data RAM
+ maxItems: 1
+
+ solomon,height:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Height in pixel of the screen driven by the controller.
+ The default value is controller-dependent.
+
+ solomon,width:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Width in pixel of the screen driven by the controller.
+ The default value is controller-dependent.
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/display/solomon,ssd1307fb.yaml b/sys/contrib/device-tree/Bindings/display/solomon,ssd1307fb.yaml
index 94bb5ef567c6..3afbb52d1b7f 100644
--- a/sys/contrib/device-tree/Bindings/display/solomon,ssd1307fb.yaml
+++ b/sys/contrib/device-tree/Bindings/display/solomon,ssd1307fb.yaml
@@ -27,38 +27,12 @@ properties:
- solomon,ssd1307
- solomon,ssd1309
- reg:
- maxItems: 1
-
pwms:
maxItems: 1
- reset-gpios:
- maxItems: 1
-
- # Only required for SPI
- dc-gpios:
- description:
- GPIO connected to the controller's D/C# (Data/Command) pin,
- that is needed for 4-wire SPI to tell the controller if the
- data sent is for a command register or the display data RAM
- maxItems: 1
-
vbat-supply:
description: The supply for VBAT
- solomon,height:
- $ref: /schemas/types.yaml#/definitions/uint32
- default: 16
- description:
- Height in pixel of the screen driven by the controller
-
- solomon,width:
- $ref: /schemas/types.yaml#/definitions/uint32
- default: 96
- description:
- Width in pixel of the screen driven by the controller
-
solomon,page-offset:
$ref: /schemas/types.yaml#/definitions/uint32
default: 1
@@ -148,7 +122,7 @@ required:
- reg
allOf:
- - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - $ref: solomon,ssd-common.yaml#
- if:
properties:
@@ -157,6 +131,10 @@ allOf:
const: sinowealth,sh1106
then:
properties:
+ width:
+ default: 132
+ height:
+ default: 64
solomon,dclk-div:
default: 1
solomon,dclk-frq:
@@ -171,6 +149,10 @@ allOf:
- solomon,ssd1305
then:
properties:
+ width:
+ default: 132
+ height:
+ default: 64
solomon,dclk-div:
default: 1
solomon,dclk-frq:
@@ -185,6 +167,10 @@ allOf:
- solomon,ssd1306
then:
properties:
+ width:
+ default: 128
+ height:
+ default: 64
solomon,dclk-div:
default: 1
solomon,dclk-frq:
@@ -199,6 +185,10 @@ allOf:
- solomon,ssd1307
then:
properties:
+ width:
+ default: 128
+ height:
+ default: 39
solomon,dclk-div:
default: 2
solomon,dclk-frq:
@@ -215,6 +205,10 @@ allOf:
- solomon,ssd1309
then:
properties:
+ width:
+ default: 128
+ height:
+ default: 64
solomon,dclk-div:
default: 1
solomon,dclk-frq:
diff --git a/sys/contrib/device-tree/Bindings/display/solomon,ssd132x.yaml b/sys/contrib/device-tree/Bindings/display/solomon,ssd132x.yaml
new file mode 100644
index 000000000000..37975ee61c5a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/display/solomon,ssd132x.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/solomon,ssd132x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Solomon SSD132x OLED Display Controllers
+
+maintainers:
+ - Javier Martinez Canillas <javierm@redhat.com>
+
+properties:
+ compatible:
+ enum:
+ - solomon,ssd1322
+ - solomon,ssd1325
+ - solomon,ssd1327
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: solomon,ssd-common.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: solomon,ssd1322
+ then:
+ properties:
+ width:
+ default: 480
+ height:
+ default: 128
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: solomon,ssd1325
+ then:
+ properties:
+ width:
+ default: 128
+ height:
+ default: 80
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: solomon,ssd1327
+ then:
+ properties:
+ width:
+ default: 128
+ height:
+ default: 128
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ oled@3c {
+ compatible = "solomon,ssd1327";
+ reg = <0x3c>;
+ reset-gpios = <&gpio2 7>;
+ };
+
+ };
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ oled@0 {
+ compatible = "solomon,ssd1327";
+ reg = <0x0>;
+ reset-gpios = <&gpio2 7>;
+ dc-gpios = <&gpio2 8>;
+ spi-max-frequency = <10000000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/display/tegra/nvidia,tegra124-sor.yaml b/sys/contrib/device-tree/Bindings/display/tegra/nvidia,tegra124-sor.yaml
index 70f0e45c71d6..6f2e22471965 100644
--- a/sys/contrib/device-tree/Bindings/display/tegra/nvidia,tegra124-sor.yaml
+++ b/sys/contrib/device-tree/Bindings/display/tegra/nvidia,tegra124-sor.yaml
@@ -97,7 +97,7 @@ properties:
# optional when driving an eDP output
nvidia,dpaux:
- description: phandle to a DispayPort AUX interface
+ description: phandle to a DisplayPort AUX interface
$ref: /schemas/types.yaml#/definitions/phandle
allOf:
diff --git a/sys/contrib/device-tree/Bindings/display/ti/ti,am65x-dss.yaml b/sys/contrib/device-tree/Bindings/display/ti/ti,am65x-dss.yaml
index b6b402f16161..b6767ef0d24d 100644
--- a/sys/contrib/device-tree/Bindings/display/ti/ti,am65x-dss.yaml
+++ b/sys/contrib/device-tree/Bindings/display/ti/ti,am65x-dss.yaml
@@ -12,14 +12,19 @@ maintainers:
- Tomi Valkeinen <tomi.valkeinen@ti.com>
description: |
- The AM65x TI Keystone Display SubSystem with two output ports and
- two video planes. The first video port supports OLDI and the second
- supports DPI format. The fist plane is full video plane with all
- features and the second is a "lite plane" without scaling support.
+ The AM625 and AM65x TI Keystone Display SubSystem with two output
+ ports and two video planes. In AM65x DSS, the first video port
+ supports 1 OLDI TX and in AM625 DSS, the first video port output is
+ internally routed to 2 OLDI TXes. The second video port supports DPI
+ format. The first plane is full video plane with all features and the
+ second is a "lite plane" without scaling support.
properties:
compatible:
- const: ti,am65x-dss
+ enum:
+ - ti,am625-dss
+ - ti,am62a7,dss
+ - ti,am65x-dss
reg:
description:
@@ -80,7 +85,10 @@ properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description:
- The DSS OLDI output port node form video port 1
+ For AM65x DSS, the OLDI output port node from video port 1.
+ For AM625 DSS, the internal DPI output port node from video
+ port 1.
+ For AM62A7 DSS, the port is tied off inside the SoC.
port@1:
$ref: /schemas/graph.yaml#/properties/port
@@ -102,6 +110,18 @@ properties:
Input memory (from main memory to dispc) bandwidth limit in
bytes per second
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ti,am62a7-dss
+ then:
+ properties:
+ ports:
+ properties:
+ port@0: false
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/dma/atmel-xdma.txt b/sys/contrib/device-tree/Bindings/dma/atmel-xdma.txt
index 510b7f25ba24..76d649b3a25d 100644
--- a/sys/contrib/device-tree/Bindings/dma/atmel-xdma.txt
+++ b/sys/contrib/device-tree/Bindings/dma/atmel-xdma.txt
@@ -3,7 +3,8 @@
* XDMA Controller
Required properties:
- compatible: Should be "atmel,sama5d4-dma", "microchip,sam9x60-dma" or
- "microchip,sama7g5-dma".
+ "microchip,sama7g5-dma" or
+ "microchip,sam9x7-dma", "atmel,sama5d4-dma".
- reg: Should contain DMA registers location and length.
- interrupts: Should contain DMA interrupt.
- #dma-cells: Must be <1>, used to represent the number of integer cells in
diff --git a/sys/contrib/device-tree/Bindings/dma/brcm,bcm2835-dma.yaml b/sys/contrib/device-tree/Bindings/dma/brcm,bcm2835-dma.yaml
new file mode 100644
index 000000000000..c9b9a5490826
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/dma/brcm,bcm2835-dma.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/brcm,bcm2835-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM2835 DMA controller
+
+maintainers:
+ - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+description:
+ The BCM2835 DMA controller has 16 channels in total. Only the lower
+ 13 channels have an associated IRQ. Some arbitrary channels are used by the
+ VideoCore firmware (1,3,6,7 in the current firmware version). The channels
+ 0, 2 and 3 have special functionality and should not be used by the driver.
+
+allOf:
+ - $ref: dma-controller.yaml#
+
+properties:
+ compatible:
+ const: brcm,bcm2835-dma
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ description:
+ Should contain the DMA interrupts associated to the DMA channels in
+ ascending order.
+ minItems: 1
+ maxItems: 16
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 16
+
+ '#dma-cells':
+ description: The single cell represents the DREQ number.
+ const: 1
+
+ brcm,dma-channel-mask:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Bitmask of available DMA channels in ascending order that are
+ not reserved by firmware and are available to the
+ kernel. i.e. first channel corresponds to LSB.
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - "#dma-cells"
+ - brcm,dma-channel-mask
+
+examples:
+ - |
+ dma-controller@7e007000 {
+ compatible = "brcm,bcm2835-dma";
+ reg = <0x7e007000 0xf00>;
+ interrupts = <1 16>,
+ <1 17>,
+ <1 18>,
+ <1 19>,
+ <1 20>,
+ <1 21>,
+ <1 22>,
+ <1 23>,
+ <1 24>,
+ <1 25>,
+ <1 26>,
+ /* dma channel 11-14 share one irq */
+ <1 27>,
+ <1 27>,
+ <1 27>,
+ <1 27>,
+ /* unused shared irq for all channels */
+ <1 28>;
+ interrupt-names = "dma0",
+ "dma1",
+ "dma2",
+ "dma3",
+ "dma4",
+ "dma5",
+ "dma6",
+ "dma7",
+ "dma8",
+ "dma9",
+ "dma10",
+ "dma11",
+ "dma12",
+ "dma13",
+ "dma14",
+ "dma-shared-all";
+ #dma-cells = <1>;
+ brcm,dma-channel-mask = <0x7f35>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/dma/dma-controller.yaml b/sys/contrib/device-tree/Bindings/dma/dma-controller.yaml
index 04d150d4d15d..e6afca558c2d 100644
--- a/sys/contrib/device-tree/Bindings/dma/dma-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/dma-controller.yaml
@@ -19,19 +19,4 @@ properties:
additionalProperties: true
-examples:
- - |
- dma: dma-controller@48000000 {
- compatible = "ti,omap-sdma";
- reg = <0x48000000 0x1000>;
- interrupts = <0 12 0x4>,
- <0 13 0x4>,
- <0 14 0x4>,
- <0 15 0x4>;
- #dma-cells = <1>;
- dma-channels = <32>;
- dma-requests = <127>;
- dma-channel-mask = <0xfffe>;
- };
-
...
diff --git a/sys/contrib/device-tree/Bindings/dma/dma-router.yaml b/sys/contrib/device-tree/Bindings/dma/dma-router.yaml
index 346fe0fa4460..5ad2febc581e 100644
--- a/sys/contrib/device-tree/Bindings/dma/dma-router.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/dma-router.yaml
@@ -40,15 +40,4 @@ required:
additionalProperties: true
-examples:
- - |
- sdma_xbar: dma-router@4a002b78 {
- compatible = "ti,dra7-dma-crossbar";
- reg = <0x4a002b78 0xfc>;
- #dma-cells = <1>;
- dma-requests = <205>;
- ti,dma-safe-map = <0>;
- dma-masters = <&sdma>;
- };
-
...
diff --git a/sys/contrib/device-tree/Bindings/dma/fsl,edma.yaml b/sys/contrib/device-tree/Bindings/dma/fsl,edma.yaml
index 5fd8fc604261..437db0c62339 100644
--- a/sys/contrib/device-tree/Bindings/dma/fsl,edma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/fsl,edma.yaml
@@ -21,32 +21,41 @@ properties:
- enum:
- fsl,vf610-edma
- fsl,imx7ulp-edma
+ - fsl,imx8qm-adma
+ - fsl,imx8qm-edma
+ - fsl,imx93-edma3
+ - fsl,imx93-edma4
- items:
- const: fsl,ls1028a-edma
- const: fsl,vf610-edma
reg:
- minItems: 2
+ minItems: 1
maxItems: 3
interrupts:
- minItems: 2
- maxItems: 17
+ minItems: 1
+ maxItems: 64
interrupt-names:
- minItems: 2
- maxItems: 17
+ minItems: 1
+ maxItems: 64
"#dma-cells":
- const: 2
+ enum:
+ - 2
+ - 3
dma-channels:
- const: 32
+ minItems: 1
+ maxItems: 64
clocks:
+ minItems: 1
maxItems: 2
clock-names:
+ minItems: 1
maxItems: 2
big-endian:
@@ -69,21 +78,52 @@ allOf:
properties:
compatible:
contains:
+ enum:
+ - fsl,imx8qm-adma
+ - fsl,imx8qm-edma
+ - fsl,imx93-edma3
+ - fsl,imx93-edma4
+ then:
+ properties:
+ "#dma-cells":
+ const: 3
+ # It is not necessary to write the interrupt name for each channel.
+ # instead, you can simply maintain the sequential IRQ numbers as
+ # defined for the DMA channels.
+ interrupt-names: false
+ clock-names:
+ items:
+ - const: dma
+ clocks:
+ maxItems: 1
+
+ - if:
+ properties:
+ compatible:
+ contains:
const: fsl,vf610-edma
then:
properties:
+ clocks:
+ minItems: 2
clock-names:
items:
- const: dmamux0
- const: dmamux1
interrupts:
+ minItems: 2
maxItems: 2
interrupt-names:
items:
- const: edma-tx
- const: edma-err
reg:
+ minItems: 2
maxItems: 3
+ "#dma-cells":
+ const: 2
+ dma-channels:
+ const: 32
- if:
properties:
@@ -92,14 +132,22 @@ allOf:
const: fsl,imx7ulp-edma
then:
properties:
+ clock:
+ minItems: 2
clock-names:
items:
- const: dma
- const: dmamux0
interrupts:
+ minItems: 2
maxItems: 17
reg:
+ minItems: 2
maxItems: 2
+ "#dma-cells":
+ const: 2
+ dma-channels:
+ const: 32
unevaluatedProperties: false
@@ -153,3 +201,47 @@ examples:
clock-names = "dma", "dmamux0";
clocks = <&pcc2 IMX7ULP_CLK_DMA1>, <&pcc2 IMX7ULP_CLK_DMA_MUX1>;
};
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/imx93-clock.h>
+
+ dma-controller@44000000 {
+ compatible = "fsl,imx93-edma3";
+ reg = <0x44000000 0x200000>;
+ #dma-cells = <3>;
+ dma-channels = <31>;
+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_EDMA1_GATE>;
+ clock-names = "dma";
+ };
diff --git a/sys/contrib/device-tree/Bindings/dma/ingenic,dma.yaml b/sys/contrib/device-tree/Bindings/dma/ingenic,dma.yaml
index 37400496e086..d9cca3006e73 100644
--- a/sys/contrib/device-tree/Bindings/dma/ingenic,dma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/ingenic,dma.yaml
@@ -68,7 +68,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description: >
Bitmask of channels to reserve for devices that need a specific
- channel. These channels will only be assigned when explicitely
+ channel. These channels will only be assigned when explicitly
requested by a client. The primary use for this is channels 0 and
1, which can be configured to have special behaviour for NAND/BCH
when using programmable firmware.
diff --git a/sys/contrib/device-tree/Bindings/dma/loongson,ls2x-apbdma.yaml b/sys/contrib/device-tree/Bindings/dma/loongson,ls2x-apbdma.yaml
new file mode 100644
index 000000000000..6a1b49a49a64
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/dma/loongson,ls2x-apbdma.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/loongson,ls2x-apbdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson LS2X APB DMA controller
+
+description:
+ The Loongson LS2X APB DMA controller is used for transferring data
+ between system memory and the peripherals on the APB bus.
+
+maintainers:
+ - Binbin Zhou <zhoubinbin@loongson.cn>
+
+allOf:
+ - $ref: dma-controller.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - const: loongson,ls2k1000-apbdma
+ - items:
+ - const: loongson,ls2k0500-apbdma
+ - const: loongson,ls2k1000-apbdma
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ '#dma-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - '#dma-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/clock/loongson,ls2k-clk.h>
+
+ dma-controller@1fe00c00 {
+ compatible = "loongson,ls2k1000-apbdma";
+ reg = <0x1fe00c00 0x8>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk LOONGSON2_APB_CLK>;
+ #dma-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/dma/nvidia,tegra20-apbdma.txt b/sys/contrib/device-tree/Bindings/dma/nvidia,tegra20-apbdma.txt
index c6908e7c42cc..447fb44e7abe 100644
--- a/sys/contrib/device-tree/Bindings/dma/nvidia,tegra20-apbdma.txt
+++ b/sys/contrib/device-tree/Bindings/dma/nvidia,tegra20-apbdma.txt
@@ -2,7 +2,7 @@
Required properties:
- compatible: Should be "nvidia,<chip>-apbdma"
-- reg: Should contain DMA registers location and length. This shuld include
+- reg: Should contain DMA registers location and length. This should include
all of the per-channel registers.
- interrupts: Should contain all of the per-channel DMA interrupts.
- clocks: Must contain one entry, for the module clock.
diff --git a/sys/contrib/device-tree/Bindings/dma/nvidia,tegra210-adma.yaml b/sys/contrib/device-tree/Bindings/dma/nvidia,tegra210-adma.yaml
index 4003dbe94940..877147e95ecc 100644
--- a/sys/contrib/device-tree/Bindings/dma/nvidia,tegra210-adma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/nvidia,tegra210-adma.yaml
@@ -53,6 +53,9 @@ properties:
ADMA_CHn_CTRL register.
const: 1
+ dma-channel-mask:
+ maxItems: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/dma/qcom,bam-dma.yaml b/sys/contrib/device-tree/Bindings/dma/qcom,bam-dma.yaml
index f1ddcf672261..3ad0d9b1fbc5 100644
--- a/sys/contrib/device-tree/Bindings/dma/qcom,bam-dma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/qcom,bam-dma.yaml
@@ -15,13 +15,19 @@ allOf:
properties:
compatible:
- enum:
- # APQ8064, IPQ8064 and MSM8960
- - qcom,bam-v1.3.0
- # MSM8974, APQ8074 and APQ8084
- - qcom,bam-v1.4.0
- # MSM8916 and SDM845
- - qcom,bam-v1.7.0
+ oneOf:
+ - enum:
+ # APQ8064, IPQ8064 and MSM8960
+ - qcom,bam-v1.3.0
+ # MSM8974, APQ8074 and APQ8084
+ - qcom,bam-v1.4.0
+ # MSM8916, SDM630
+ - qcom,bam-v1.7.0
+ - items:
+ - enum:
+ # SDM845, SM6115, SM8150, SM8250 and QCM2290
+ - qcom,bam-v1.7.4
+ - const: qcom,bam-v1.7.0
clocks:
maxItems: 1
@@ -38,7 +44,7 @@ properties:
iommus:
minItems: 1
- maxItems: 4
+ maxItems: 6
num-channels:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -48,7 +54,7 @@ properties:
qcom,controlled-remotely:
type: boolean
description:
- Indicates that the bam is controlled by remote proccessor i.e. execution
+ Indicates that the bam is controlled by remote processor i.e. execution
environment.
qcom,ee:
@@ -81,6 +87,15 @@ required:
- qcom,ee
- reg
+anyOf:
+ - required:
+ - qcom,powered-remotely
+ - required:
+ - qcom,controlled-remotely
+ - required:
+ - clocks
+ - clock-names
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml b/sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml
index f61145c91b6d..deb64cb9ca3e 100644
--- a/sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml
@@ -32,6 +32,8 @@ properties:
- qcom,sm8350-gpi-dma
- qcom,sm8450-gpi-dma
- qcom,sm8550-gpi-dma
+ - qcom,sm8650-gpi-dma
+ - qcom,x1e80100-gpi-dma
- const: qcom,sm6350-gpi-dma
- items:
- enum:
@@ -69,6 +71,8 @@ properties:
dma-channel-mask:
maxItems: 1
+ dma-coherent: true
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/dma/renesas,rz-dmac.yaml b/sys/contrib/device-tree/Bindings/dma/renesas,rz-dmac.yaml
index c284abc6784a..a42b6a26a6d3 100644
--- a/sys/contrib/device-tree/Bindings/dma/renesas,rz-dmac.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/renesas,rz-dmac.yaml
@@ -16,7 +16,7 @@ properties:
compatible:
items:
- enum:
- - renesas,r9a07g043-dmac # RZ/G2UL
+ - renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five
- renesas,r9a07g044-dmac # RZ/G2{L,LC}
- renesas,r9a07g054-dmac # RZ/V2L
- const: renesas,rz-dmac
diff --git a/sys/contrib/device-tree/Bindings/dma/sifive,fu540-c000-pdma.yaml b/sys/contrib/device-tree/Bindings/dma/sifive,fu540-c000-pdma.yaml
index a1af0b906365..3b22183a1a37 100644
--- a/sys/contrib/device-tree/Bindings/dma/sifive,fu540-c000-pdma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/sifive,fu540-c000-pdma.yaml
@@ -29,6 +29,7 @@ properties:
compatible:
items:
- enum:
+ - microchip,mpfs-pdma
- sifive,fu540-c000-pdma
- const: sifive,pdma0
description:
diff --git a/sys/contrib/device-tree/Bindings/dma/stericsson,dma40.yaml b/sys/contrib/device-tree/Bindings/dma/stericsson,dma40.yaml
index 1e5752b19a49..7b94d24d5ef4 100644
--- a/sys/contrib/device-tree/Bindings/dma/stericsson,dma40.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/stericsson,dma40.yaml
@@ -148,7 +148,7 @@ properties:
memcpy-channels:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Array of u32 elements indicating which channels on the DMA
- engine are elegible for memcpy transfers
+ engine are eligible for memcpy transfers
required:
- "#dma-cells"
diff --git a/sys/contrib/device-tree/Bindings/dma/ti/k3-bcdma.yaml b/sys/contrib/device-tree/Bindings/dma/ti/k3-bcdma.yaml
index 4ca300a42a99..27b8e1636560 100644
--- a/sys/contrib/device-tree/Bindings/dma/ti/k3-bcdma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/ti/k3-bcdma.yaml
@@ -37,11 +37,11 @@ properties:
reg:
minItems: 3
- maxItems: 5
+ maxItems: 9
reg-names:
minItems: 3
- maxItems: 5
+ maxItems: 9
"#dma-cells":
const: 3
@@ -141,7 +141,10 @@ allOf:
ti,sci-rm-range-tchan: false
reg:
- maxItems: 3
+ items:
+ - description: BCDMA Control /Status Registers region
+ - description: RX Channel Realtime Registers region
+ - description: Ring Realtime Registers region
reg-names:
items:
@@ -161,14 +164,29 @@ allOf:
properties:
reg:
minItems: 5
+ items:
+ - description: BCDMA Control /Status Registers region
+ - description: Block Copy Channel Realtime Registers region
+ - description: RX Channel Realtime Registers region
+ - description: TX Channel Realtime Registers region
+ - description: Ring Realtime Registers region
+ - description: Ring Configuration Registers region
+ - description: TX Channel Configuration Registers region
+ - description: RX Channel Configuration Registers region
+ - description: Block Copy Channel Configuration Registers region
reg-names:
+ minItems: 5
items:
- const: gcfg
- const: bchanrt
- const: rchanrt
- const: tchanrt
- const: ringrt
+ - const: ring
+ - const: tchan
+ - const: rchan
+ - const: bchan
required:
- ti,sci-rm-range-bchan
@@ -184,7 +202,11 @@ allOf:
ti,sci-rm-range-bchan: false
reg:
- maxItems: 4
+ items:
+ - description: BCDMA Control /Status Registers region
+ - description: RX Channel Realtime Registers region
+ - description: TX Channel Realtime Registers region
+ - description: Ring Realtime Registers region
reg-names:
items:
@@ -220,8 +242,13 @@ examples:
<0x0 0x4c000000 0x0 0x20000>,
<0x0 0x4a820000 0x0 0x20000>,
<0x0 0x4aa40000 0x0 0x20000>,
- <0x0 0x4bc00000 0x0 0x100000>;
- reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
+ <0x0 0x4bc00000 0x0 0x100000>,
+ <0x0 0x48600000 0x0 0x8000>,
+ <0x0 0x484a4000 0x0 0x2000>,
+ <0x0 0x484c2000 0x0 0x2000>,
+ <0x0 0x48420000 0x0 0x2000>;
+ reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "bchan";
msi-parent = <&inta_main_dmss>;
#dma-cells = <3>;
diff --git a/sys/contrib/device-tree/Bindings/dma/ti/k3-pktdma.yaml b/sys/contrib/device-tree/Bindings/dma/ti/k3-pktdma.yaml
index a69f62f854d8..11e064c02994 100644
--- a/sys/contrib/device-tree/Bindings/dma/ti/k3-pktdma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/ti/k3-pktdma.yaml
@@ -45,14 +45,28 @@ properties:
The second cell is the ASEL value for the channel
reg:
- maxItems: 4
+ minItems: 4
+ items:
+ - description: Packet DMA Control /Status Registers region
+ - description: RX Channel Realtime Registers region
+ - description: TX Channel Realtime Registers region
+ - description: Ring Realtime Registers region
+ - description: Ring Configuration Registers region
+ - description: TX Configuration Registers region
+ - description: RX Configuration Registers region
+ - description: RX Flow Configuration Registers region
reg-names:
+ minItems: 4
items:
- const: gcfg
- const: rchanrt
- const: tchanrt
- const: ringrt
+ - const: ring
+ - const: tchan
+ - const: rchan
+ - const: rflow
msi-parent: true
@@ -136,8 +150,14 @@ examples:
reg = <0x0 0x485c0000 0x0 0x100>,
<0x0 0x4a800000 0x0 0x20000>,
<0x0 0x4aa00000 0x0 0x40000>,
- <0x0 0x4b800000 0x0 0x400000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+ <0x0 0x4b800000 0x0 0x400000>,
+ <0x0 0x485e0000 0x0 0x20000>,
+ <0x0 0x484a0000 0x0 0x4000>,
+ <0x0 0x484c0000 0x0 0x2000>,
+ <0x0 0x48430000 0x0 0x4000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "rflow";
+
msi-parent = <&inta_main_dmss>;
#dma-cells = <2>;
diff --git a/sys/contrib/device-tree/Bindings/dma/ti/k3-udma.yaml b/sys/contrib/device-tree/Bindings/dma/ti/k3-udma.yaml
index 22f6c5e2f7f4..b18cf2bfdb5b 100644
--- a/sys/contrib/device-tree/Bindings/dma/ti/k3-udma.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/ti/k3-udma.yaml
@@ -69,13 +69,24 @@ properties:
- ti,j721e-navss-mcu-udmap
reg:
- maxItems: 3
+ minItems: 3
+ items:
+ - description: UDMA-P Control /Status Registers region
+ - description: RX Channel Realtime Registers region
+ - description: TX Channel Realtime Registers region
+ - description: TX Configuration Registers region
+ - description: RX Configuration Registers region
+ - description: RX Flow Configuration Registers region
reg-names:
+ minItems: 3
items:
- const: gcfg
- const: rchanrt
- const: tchanrt
+ - const: tchan
+ - const: rchan
+ - const: rflow
msi-parent: true
@@ -158,8 +169,11 @@ examples:
compatible = "ti,am654-navss-main-udmap";
reg = <0x0 0x31150000 0x0 0x100>,
<0x0 0x34000000 0x0 0x100000>,
- <0x0 0x35000000 0x0 0x100000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ <0x0 0x35000000 0x0 0x100000>,
+ <0x0 0x30b00000 0x0 0x20000>,
+ <0x0 0x30c00000 0x0 0x8000>,
+ <0x0 0x30d00000 0x0 0x4000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "tchan", "rchan", "rflow";
#dma-cells = <1>;
ti,ringacc = <&ringacc>;
diff --git a/sys/contrib/device-tree/Bindings/dma/xilinx/xilinx_dma.txt b/sys/contrib/device-tree/Bindings/dma/xilinx/xilinx_dma.txt
index d1700a5c36bf..590d1948f202 100644
--- a/sys/contrib/device-tree/Bindings/dma/xilinx/xilinx_dma.txt
+++ b/sys/contrib/device-tree/Bindings/dma/xilinx/xilinx_dma.txt
@@ -49,6 +49,12 @@ Optional properties for AXI DMA and MCDMA:
register as configured in h/w. Takes values {8...26}. If the property
is missing or invalid then the default value 23 is used. This is the
maximum value that is supported by all IP versions.
+
+Optional properties for AXI DMA:
+- xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP.
+- xlnx,irq-delay: Tells the interrupt delay timeout value. Valid range is from
+ 0-255. Setting this value to zero disables the delay timer interrupt.
+ 1 timeout interval = 125 * clock period of SG clock.
Optional properties for VDMA:
- xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
It takes following values:
diff --git a/sys/contrib/device-tree/Bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml b/sys/contrib/device-tree/Bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml
index 23ada8f87526..769ce23aaac2 100644
--- a/sys/contrib/device-tree/Bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml
+++ b/sys/contrib/device-tree/Bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml
@@ -13,6 +13,8 @@ description: |
maintainers:
- Michael Tretter <m.tretter@pengutronix.de>
+ - Harini Katakam <harini.katakam@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
allOf:
- $ref: ../dma-controller.yaml#
@@ -65,6 +67,7 @@ required:
- interrupts
- clocks
- clock-names
+ - xlnx,bus-width
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/dts-coding-style.rst b/sys/contrib/device-tree/Bindings/dts-coding-style.rst
new file mode 100644
index 000000000000..a9bdd2b59dca
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/dts-coding-style.rst
@@ -0,0 +1,196 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=====================================
+Devicetree Sources (DTS) Coding Style
+=====================================
+
+When writing Devicetree Sources (DTS) please observe below guidelines. They
+should be considered complementary to any rules expressed already in
+the Devicetree Specification and the dtc compiler (including W=1 and W=2
+builds).
+
+Individual architectures and subarchitectures can define additional rules,
+making the coding style stricter.
+
+Naming and Valid Characters
+---------------------------
+
+The Devicetree Specification allows a broad range of characters in node
+and property names, but this coding style narrows the range down to achieve
+better code readability.
+
+1. Node and property names can use only the following characters:
+
+ * Lowercase characters: [a-z]
+ * Digits: [0-9]
+ * Dash: -
+
+2. Labels can use only the following characters:
+
+ * Lowercase characters: [a-z]
+ * Digits: [0-9]
+ * Underscore: _
+
+3. Unless a bus defines differently, unit addresses shall use lowercase
+ hexadecimal digits, without leading zeros (padding).
+
+4. Hex values in properties, e.g. "reg", shall use lowercase hex. The address
+ part can be padded with leading zeros.
+
+Example::
+
+ gpi_dma2: dma-controller@a00000 {
+ compatible = "qcom,sm8550-gpi-dma", "qcom,sm6350-gpi-dma";
+ reg = <0x0 0x00a00000 0x0 0x60000>;
+ }
+
+Order of Nodes
+--------------
+
+1. Nodes on any bus, thus using unit addresses for children, shall be
+ ordered by unit address in ascending order.
+ Alternatively for some subarchitectures, nodes of the same type can be
+ grouped together, e.g. all I2C controllers one after another even if this
+ breaks unit address ordering.
+
+2. Nodes without unit addresses shall be ordered alpha-numerically by the node
+ name. For a few node types, they can be ordered by the main property, e.g.
+ pin configuration states ordered by value of "pins" property.
+
+3. When extending nodes in the board DTS via &label, the entries shall be
+ ordered either alpha-numerically or by keeping the order from DTSI, where
+ the choice depends on the subarchitecture.
+
+The above-described ordering rules are easy to enforce during review, reduce
+chances of conflicts for simultaneous additions of new nodes to a file and help
+in navigating through the DTS source.
+
+Example::
+
+ /* SoC DTSI */
+
+ / {
+ cpus {
+ /* ... */
+ };
+
+ psci {
+ /* ... */
+ };
+
+ soc@0 {
+ dma: dma-controller@10000 {
+ /* ... */
+ };
+
+ clk: clock-controller@80000 {
+ /* ... */
+ };
+ };
+ };
+
+ /* Board DTS - alphabetical order */
+
+ &clk {
+ /* ... */
+ };
+
+ &dma {
+ /* ... */
+ };
+
+ /* Board DTS - alternative order, keep as DTSI */
+
+ &dma {
+ /* ... */
+ };
+
+ &clk {
+ /* ... */
+ };
+
+Order of Properties in Device Node
+----------------------------------
+
+The following order of properties in device nodes is preferred:
+
+1. "compatible"
+2. "reg"
+3. "ranges"
+4. Standard/common properties (defined by common bindings, e.g. without
+ vendor-prefixes)
+5. Vendor-specific properties
+6. "status" (if applicable)
+7. Child nodes, where each node is preceded with a blank line
+
+The "status" property is by default "okay", thus it can be omitted.
+
+The above-described ordering follows this approach:
+
+1. Most important properties start the node: compatible then bus addressing to
+ match unit address.
+2. Each node will have common properties in similar place.
+3. Status is the last information to annotate that device node is or is not
+ finished (board resources are needed).
+
+Example::
+
+ /* SoC DTSI */
+
+ device_node: device-class@6789abc {
+ compatible = "vendor,device";
+ reg = <0x0 0x06789abc 0x0 0xa123>;
+ ranges = <0x0 0x0 0x06789abc 0x1000>;
+ #dma-cells = <1>;
+ clocks = <&clock_controller 0>, <&clock_controller 1>;
+ clock-names = "bus", "host";
+ vendor,custom-property = <2>;
+ status = "disabled";
+
+ child_node: child-class@100 {
+ reg = <0x100 0x200>;
+ /* ... */
+ };
+ };
+
+ /* Board DTS */
+
+ &device_node {
+ vdd-supply = <&board_vreg1>;
+ status = "okay";
+ }
+
+Indentation
+-----------
+
+1. Use indentation according to Documentation/process/coding-style.rst.
+2. Each entry in arrays with multiple cells, e.g. "reg" with two IO addresses,
+ shall be enclosed in <>.
+3. For arrays spanning across lines, it is preferred to align the continued
+ entries with opening < from the first line.
+
+Example::
+
+ thermal-sensor@c271000 {
+ compatible = "qcom,sm8550-tsens", "qcom,tsens-v2";
+ reg = <0x0 0x0c271000 0x0 0x1000>,
+ <0x0 0x0c222000 0x0 0x1000>;
+ };
+
+Organizing DTSI and DTS
+-----------------------
+
+The DTSI and DTS files shall be organized in a way representing the common,
+reusable parts of hardware. Typically, this means organizing DTSI and DTS files
+into several files:
+
+1. DTSI with contents of the entire SoC, without nodes for hardware not present
+ on the SoC.
+2. If applicable: DTSI with common or re-usable parts of the hardware, e.g.
+ entire System-on-Module.
+3. DTS representing the board.
+
+Hardware components that are present on the board shall be placed in the
+board DTS, not in the SoC or SoM DTSI. A partial exception is a common
+external reference SoC input clock, which could be coded as a fixed-clock in
+the SoC DTSI with its frequency provided by each board DTS.
diff --git a/sys/contrib/device-tree/Bindings/eeprom/at24.yaml b/sys/contrib/device-tree/Bindings/eeprom/at24.yaml
index 84af0d5f52aa..1812ef31d5f1 100644
--- a/sys/contrib/device-tree/Bindings/eeprom/at24.yaml
+++ b/sys/contrib/device-tree/Bindings/eeprom/at24.yaml
@@ -2,8 +2,8 @@
# Copyright 2019 BayLibre SAS
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/eeprom/at24.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/eeprom/at24.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: I2C EEPROMs compatible with Atmel's AT24
@@ -12,6 +12,7 @@ maintainers:
allOf:
- $ref: /schemas/nvmem/nvmem.yaml
+ - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml
select:
properties:
@@ -68,10 +69,14 @@ properties:
- items:
pattern: c32$
- items:
+ pattern: c32d-wl$
+ - items:
pattern: cs32$
- items:
pattern: c64$
- items:
+ pattern: c64d-wl$
+ - items:
pattern: cs64$
- items:
pattern: c128$
@@ -102,6 +107,9 @@ properties:
# These are special cases that don't conform to the above pattern.
# Each requires a standard at24 model as fallback.
- items:
+ - const: belling,bl24c16a
+ - const: atmel,24c16
+ - items:
- enum:
- rohm,br24g01
- rohm,br24t01
@@ -115,6 +123,7 @@ properties:
- enum:
- onnn,cat24c04
- onnn,cat24c05
+ - rohm,br24g04
- const: atmel,24c04
- items:
- const: renesas,r1ex24016
diff --git a/sys/contrib/device-tree/Bindings/eeprom/at25.yaml b/sys/contrib/device-tree/Bindings/eeprom/at25.yaml
index 0e31bb36ebb1..1715b0c9feea 100644
--- a/sys/contrib/device-tree/Bindings/eeprom/at25.yaml
+++ b/sys/contrib/device-tree/Bindings/eeprom/at25.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/eeprom/at25.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/eeprom/at25.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SPI EEPROMs or FRAMs compatible with Atmel's AT25
diff --git a/sys/contrib/device-tree/Bindings/extcon/maxim,max77843.yaml b/sys/contrib/device-tree/Bindings/extcon/maxim,max77843.yaml
index 128960545640..55800fb0221d 100644
--- a/sys/contrib/device-tree/Bindings/extcon/maxim,max77843.yaml
+++ b/sys/contrib/device-tree/Bindings/extcon/maxim,max77843.yaml
@@ -23,6 +23,7 @@ properties:
connector:
$ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
ports:
$ref: /schemas/graph.yaml#/properties/ports
diff --git a/sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml b/sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml
index 2c8cf6aab19a..6b80518cbf62 100644
--- a/sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml
+++ b/sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Technologies, Inc. PM8941 USB ID Extcon device
maintainers:
- - Guru Das Srinagesh <gurus@codeaurora.org>
+ - Guru Das Srinagesh <quic_gurus@quicinc.com>
description: |
Some Qualcomm PMICs have a "misc" module that can be used to detect when
diff --git a/sys/contrib/device-tree/Bindings/extcon/siliconmitus,sm5502-muic.yaml b/sys/contrib/device-tree/Bindings/extcon/siliconmitus,sm5502-muic.yaml
index 7a224b2f0977..7ef2d9bef72d 100644
--- a/sys/contrib/device-tree/Bindings/extcon/siliconmitus,sm5502-muic.yaml
+++ b/sys/contrib/device-tree/Bindings/extcon/siliconmitus,sm5502-muic.yaml
@@ -27,6 +27,10 @@ properties:
description: I2C slave address of the device. Usually 0x25 for SM5502
and SM5703, 0x14 for SM5504.
+ connector:
+ $ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
+
interrupts:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/firmware/arm,scmi.yaml b/sys/contrib/device-tree/Bindings/firmware/arm,scmi.yaml
index b138f3d23df8..4591523b51a0 100644
--- a/sys/contrib/device-tree/Bindings/firmware/arm,scmi.yaml
+++ b/sys/contrib/device-tree/Bindings/firmware/arm,scmi.yaml
@@ -38,6 +38,9 @@ properties:
with shmem address(4KB-page, offset) as parameters
items:
- const: arm,scmi-smc-param
+ - description: SCMI compliant firmware with Qualcomm SMC/HVC transport
+ items:
+ - const: qcom,scmi-smc
- description: SCMI compliant firmware with SCMI Virtio transport.
The virtio transport only supports a single device.
items:
@@ -149,8 +152,15 @@ properties:
'#clock-cells':
const: 1
- required:
- - '#clock-cells'
+ '#power-domain-cells':
+ const: 1
+
+ oneOf:
+ - required:
+ - '#clock-cells'
+
+ - required:
+ - '#power-domain-cells'
protocol@14:
$ref: '#/$defs/protocol-node'
@@ -306,6 +316,7 @@ else:
enum:
- arm,scmi-smc
- arm,scmi-smc-param
+ - qcom,scmi-smc
then:
required:
- arm,smc-id
diff --git a/sys/contrib/device-tree/Bindings/firmware/intel,ixp4xx-network-processing-engine.yaml b/sys/contrib/device-tree/Bindings/firmware/intel,ixp4xx-network-processing-engine.yaml
index 9a785bbaafb7..e6bed7d93e2d 100644
--- a/sys/contrib/device-tree/Bindings/firmware/intel,ixp4xx-network-processing-engine.yaml
+++ b/sys/contrib/device-tree/Bindings/firmware/intel,ixp4xx-network-processing-engine.yaml
@@ -2,8 +2,8 @@
# Copyright 2019 Linaro Ltd.
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/firmware/intel,ixp4xx-network-processing-engine.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/firmware/intel,ixp4xx-network-processing-engine.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel IXP4xx Network Processing Engine
diff --git a/sys/contrib/device-tree/Bindings/firmware/nvidia,tegra186-bpmp.yaml b/sys/contrib/device-tree/Bindings/firmware/nvidia,tegra186-bpmp.yaml
index 833c07f1685c..c43d17f6e96b 100644
--- a/sys/contrib/device-tree/Bindings/firmware/nvidia,tegra186-bpmp.yaml
+++ b/sys/contrib/device-tree/Bindings/firmware/nvidia,tegra186-bpmp.yaml
@@ -57,8 +57,11 @@ description: |
"#address-cells" or "#size-cells" property.
The shared memory area for the IPC TX and RX between CPU and BPMP are
- predefined and work on top of sysram, which is an SRAM inside the
- chip. See ".../sram/sram.yaml" for the bindings.
+ predefined and work on top of either sysram, which is an SRAM inside the
+ chip, or in normal SDRAM.
+ See ".../sram/sram.yaml" for the bindings for the SRAM case.
+ See "../reserved-memory/nvidia,tegra264-bpmp-shmem.yaml" for bindings for
+ the SDRAM case.
properties:
compatible:
@@ -81,6 +84,11 @@ properties:
minItems: 2
maxItems: 2
+ memory-region:
+ description: phandle to reserved memory region used for IPC between
+ CPU-NS and BPMP.
+ maxItems: 1
+
"#clock-cells":
const: 1
@@ -115,10 +123,15 @@ properties:
additionalProperties: false
+oneOf:
+ - required:
+ - memory-region
+ - required:
+ - shmem
+
required:
- compatible
- mboxes
- - shmem
- "#clock-cells"
- "#power-domain-cells"
- "#reset-cells"
@@ -165,8 +178,7 @@ examples:
<&mc TEGRA186_MEMORY_CLIENT_BPMPDMAW &emc>;
interconnect-names = "read", "write", "dma-mem", "dma-write";
iommus = <&smmu TEGRA186_SID_BPMP>;
- mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB
- TEGRA_HSP_DB_MASTER_BPMP>;
+ mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
#clock-cells = <1>;
#power-domain-cells = <1>;
@@ -184,3 +196,20 @@ examples:
#thermal-sensor-cells = <1>;
};
};
+
+ - |
+ #include <dt-bindings/mailbox/tegra186-hsp.h>
+
+ bpmp {
+ compatible = "nvidia,tegra186-bpmp";
+ interconnects = <&mc TEGRA186_MEMORY_CLIENT_BPMPR &emc>,
+ <&mc TEGRA186_MEMORY_CLIENT_BPMPW &emc>,
+ <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAR &emc>,
+ <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAW &emc>;
+ interconnect-names = "read", "write", "dma-mem", "dma-write";
+ mboxes = <&hsp_top1 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
+ memory-region = <&dram_cpu_bpmp_mail>;
+ #clock-cells = <1>;
+ #power-domain-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/firmware/qcom,scm.yaml b/sys/contrib/device-tree/Bindings/firmware/qcom,scm.yaml
index bdbee58a542b..47d3d2d52acd 100644
--- a/sys/contrib/device-tree/Bindings/firmware/qcom,scm.yaml
+++ b/sys/contrib/device-tree/Bindings/firmware/qcom,scm.yaml
@@ -24,6 +24,7 @@ properties:
- qcom,scm-apq8064
- qcom,scm-apq8084
- qcom,scm-ipq4019
+ - qcom,scm-ipq5018
- qcom,scm-ipq5332
- qcom,scm-ipq6018
- qcom,scm-ipq806x
@@ -56,12 +57,15 @@ properties:
- qcom,scm-sm6125
- qcom,scm-sm6350
- qcom,scm-sm6375
+ - qcom,scm-sm7150
- qcom,scm-sm8150
- qcom,scm-sm8250
- qcom,scm-sm8350
- qcom,scm-sm8450
- qcom,scm-sm8550
+ - qcom,scm-sm8650
- qcom,scm-qcs404
+ - qcom,scm-x1e80100
- const: qcom,scm
clocks:
@@ -89,6 +93,14 @@ properties:
protocol to handle sleeping SCM calls.
maxItems: 1
+ qcom,sdi-enabled:
+ description:
+ Indicates that the SDI (Secure Debug Image) has been enabled by TZ
+ by default and it needs to be disabled.
+ If not disabled WDT assertion or reboot will cause the board to hang
+ in the debug mode.
+ type: boolean
+
qcom,dload-mode:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
@@ -168,20 +180,6 @@ allOf:
minItems: 3
maxItems: 3
- # Interconnects
- - if:
- not:
- properties:
- compatible:
- contains:
- enum:
- - qcom,scm-qdu1000
- - qcom,scm-sm8450
- - qcom,scm-sm8550
- then:
- properties:
- interconnects: false
-
# Interrupts
- if:
not:
@@ -191,6 +189,7 @@ allOf:
enum:
- qcom,scm-sm8450
- qcom,scm-sm8550
+ - qcom,scm-sm8650
then:
properties:
interrupts: false
diff --git a/sys/contrib/device-tree/Bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml b/sys/contrib/device-tree/Bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml
index 910bebe6cfa8..8e584857ddd4 100644
--- a/sys/contrib/device-tree/Bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml
+++ b/sys/contrib/device-tree/Bindings/firmware/xilinx/xlnx,zynqmp-firmware.yaml
@@ -38,6 +38,9 @@ properties:
- smc
- hvc
+ "#power-domain-cells":
+ const: 1
+
versal_fpga:
$ref: /schemas/fpga/xlnx,versal-fpga.yaml#
description: Compatible of the FPGA device.
@@ -66,6 +69,17 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/power/xlnx-zynqmp-power.h>
+ firmware {
+ zynqmp_firmware: zynqmp-firmware {
+ #power-domain-cells = <1>;
+ };
+ };
+
+ sata {
+ power-domains = <&zynqmp_firmware PD_SATA>;
+ };
+
versal-firmware {
compatible = "xlnx,versal-firmware";
method = "smc";
@@ -81,8 +95,8 @@ examples:
versal_clk: clock-controller {
#clock-cells = <1>;
compatible = "xlnx,versal-clk";
- clocks = <&ref>, <&alt_ref>, <&pl_alt_ref>;
- clock-names = "ref", "alt_ref", "pl_alt_ref";
+ clocks = <&ref>, <&pl_alt_ref>;
+ clock-names = "ref", "pl_alt_ref";
};
};
diff --git a/sys/contrib/device-tree/Bindings/fpga/altr,freeze-bridge-controller.yaml b/sys/contrib/device-tree/Bindings/fpga/altr,freeze-bridge-controller.yaml
new file mode 100644
index 000000000000..fccffeebb256
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/fpga/altr,freeze-bridge-controller.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fpga/altr,freeze-bridge-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera Freeze Bridge Controller
+
+description:
+ The Altera Freeze Bridge Controller manages one or more freeze bridges.
+ The controller can freeze/disable the bridges which prevents signal
+ changes from passing through the bridge. The controller can also
+ unfreeze/enable the bridges which allows traffic to pass through the bridge
+ normally.
+
+maintainers:
+ - Xu Yilun <yilun.xu@intel.com>
+
+allOf:
+ - $ref: fpga-bridge.yaml#
+
+properties:
+ compatible:
+ const: altr,freeze-bridge-controller
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ fpga-bridge@100000450 {
+ compatible = "altr,freeze-bridge-controller";
+ reg = <0x1000 0x10>;
+ bridge-enable = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/fpga/altr,socfpga-fpga2sdram-bridge.yaml b/sys/contrib/device-tree/Bindings/fpga/altr,socfpga-fpga2sdram-bridge.yaml
new file mode 100644
index 000000000000..22b58453c5ff
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/fpga/altr,socfpga-fpga2sdram-bridge.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fpga/altr,socfpga-fpga2sdram-bridge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera FPGA To SDRAM Bridge
+
+maintainers:
+ - Xu Yilun <yilun.xu@intel.com>
+
+allOf:
+ - $ref: fpga-bridge.yaml#
+
+properties:
+ compatible:
+ const: altr,socfpga-fpga2sdram-bridge
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ fpga-bridge@ffc25080 {
+ compatible = "altr,socfpga-fpga2sdram-bridge";
+ reg = <0xffc25080 0x4>;
+ bridge-enable = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml b/sys/contrib/device-tree/Bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml
new file mode 100644
index 000000000000..d19c6660d6c9
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fpga/altr,socfpga-hps2fpga-bridge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera FPGA/HPS Bridge
+
+maintainers:
+ - Xu Yilun <yilun.xu@intel.com>
+
+allOf:
+ - $ref: fpga-bridge.yaml#
+
+properties:
+ compatible:
+ enum:
+ - altr,socfpga-lwhps2fpga-bridge
+ - altr,socfpga-hps2fpga-bridge
+ - altr,socfpga-fpga2hps-bridge
+
+ reg:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/reset/altr,rst-mgr.h>
+
+ fpga-bridge@ff400000 {
+ compatible = "altr,socfpga-lwhps2fpga-bridge";
+ reg = <0xff400000 0x100000>;
+ bridge-enable = <0>;
+ clocks = <&l4_main_clk>;
+ resets = <&rst LWHPS2FPGA_RESET>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/fpga/fpga-bridge.yaml b/sys/contrib/device-tree/Bindings/fpga/fpga-bridge.yaml
new file mode 100644
index 000000000000..1ccb2aa18726
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/fpga/fpga-bridge.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fpga/fpga-bridge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: FPGA Bridge
+
+maintainers:
+ - Michal Simek <michal.simek@amd.com>
+
+properties:
+ $nodename:
+ pattern: "^fpga-bridge(@.*|-([0-9]|[1-9][0-9]+))?$"
+
+ bridge-enable:
+ description: |
+ 0 if driver should disable bridge at startup
+ 1 if driver should enable bridge at startup
+ Default is to leave bridge in current state.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+
+additionalProperties: true
+
+examples:
+ - |
+ fpga-bridge {
+ bridge-enable = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/fpga/fpga-region.txt b/sys/contrib/device-tree/Bindings/fpga/fpga-region.txt
index 6694ef29a267..528df8a0e6d8 100644
--- a/sys/contrib/device-tree/Bindings/fpga/fpga-region.txt
+++ b/sys/contrib/device-tree/Bindings/fpga/fpga-region.txt
@@ -63,7 +63,7 @@ FPGA Bridge
will be disabled.
* During Partial Reconfiguration of a specific region, that region's bridge
will be used to gate the busses. Traffic to other regions is not affected.
- * In some implementations, the FPGA Manager transparantly handles gating the
+ * In some implementations, the FPGA Manager transparently handles gating the
buses, eliminating the need to show the hardware FPGA bridges in the
device tree.
* An FPGA image may create a set of reprogrammable regions, each having its
@@ -466,7 +466,7 @@ It is beyond the scope of this document to fully describe all the FPGA design
constraints required to make partial reconfiguration work[1] [2] [3], but a few
deserve quick mention.
-A persona must have boundary connections that line up with those of the partion
+A persona must have boundary connections that line up with those of the partition
or region it is designed to go into.
During programming, transactions through those connections must be stopped and
diff --git a/sys/contrib/device-tree/Bindings/fpga/xlnx,pr-decoupler.yaml b/sys/contrib/device-tree/Bindings/fpga/xlnx,pr-decoupler.yaml
index a7d4b8e59e19..5bf731f9d99a 100644
--- a/sys/contrib/device-tree/Bindings/fpga/xlnx,pr-decoupler.yaml
+++ b/sys/contrib/device-tree/Bindings/fpga/xlnx,pr-decoupler.yaml
@@ -9,6 +9,9 @@ title: Xilinx LogiCORE Partial Reconfig Decoupler/AXI shutdown manager Softcore
maintainers:
- Nava kishore Manne <nava.kishore.manne@amd.com>
+allOf:
+ - $ref: fpga-bridge.yaml#
+
description: |
The Xilinx LogiCORE Partial Reconfig(PR) Decoupler manages one or more
decouplers/fpga bridges. The controller can decouple/disable the bridges
@@ -51,7 +54,7 @@ required:
- clocks
- clock-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/fsi/ibm,i2cr-fsi-master.yaml b/sys/contrib/device-tree/Bindings/fsi/ibm,i2cr-fsi-master.yaml
new file mode 100644
index 000000000000..442cecdc57cb
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/fsi/ibm,i2cr-fsi-master.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/fsi/ibm,i2cr-fsi-master.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM I2C Responder virtual FSI master
+
+maintainers:
+ - Eddie James <eajames@linux.ibm.com>
+
+description: |
+ The I2C Responder (I2CR) is a an I2C device that's connected to an FSI CFAM
+ (see fsi.txt). The I2CR translates I2C bus operations to FSI CFAM reads and
+ writes or SCOM operations, thereby acting as an FSI master.
+
+properties:
+ compatible:
+ enum:
+ - ibm,i2cr-fsi-master
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/gnss/u-blox,neo-6m.yaml b/sys/contrib/device-tree/Bindings/gnss/u-blox,neo-6m.yaml
index 4835a280b3bf..cd80668182b6 100644
--- a/sys/contrib/device-tree/Bindings/gnss/u-blox,neo-6m.yaml
+++ b/sys/contrib/device-tree/Bindings/gnss/u-blox,neo-6m.yaml
@@ -28,6 +28,9 @@ properties:
port or the USB host-controller port to which this device is attached,
depending on the bus used. Required for the DDC, SPI or USB busses.
+ reset-gpios:
+ maxItems: 1
+
vcc-supply:
description: >
Main voltage regulator
@@ -49,10 +52,13 @@ unevaluatedProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
+
serial {
gnss {
compatible = "u-blox,neo-8";
v-bckp-supply = <&gnss_v_bckp_reg>;
vcc-supply = <&gnss_vcc_reg>;
+ reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/gpio/adi,ds4520-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/adi,ds4520-gpio.yaml
new file mode 100644
index 000000000000..25b3198c4d3e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/gpio/adi,ds4520-gpio.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/adi,ds4520-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DS4520 I2C GPIO expander
+
+maintainers:
+ - Okan Sahin <okan.sahin@analog.com>
+
+properties:
+ compatible:
+ enum:
+ - adi,ds4520-gpio
+
+ reg:
+ maxItems: 1
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ ngpios:
+ minimum: 1
+ maximum: 9
+
+required:
+ - compatible
+ - reg
+ - gpio-controller
+ - "#gpio-cells"
+ - ngpios
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gpio@50 {
+ compatible = "adi,ds4520-gpio";
+ reg = <0x50>;
+ ngpios = <9>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/gpio/brcm,brcmstb-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/brcm,brcmstb-gpio.yaml
index 4a896ff7edc5..a1e71c974e79 100644
--- a/sys/contrib/device-tree/Bindings/gpio/brcm,brcmstb-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/brcm,brcmstb-gpio.yaml
@@ -72,7 +72,7 @@ required:
- reg
- gpio-controller
- "#gpio-cells"
- - "brcm,gpio-bank-widths"
+ - brcm,gpio-bank-widths
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/gpio/brcm,kona-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/brcm,kona-gpio.yaml
new file mode 100644
index 000000000000..296fdd6b8f38
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/gpio/brcm,kona-gpio.yaml
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/brcm,kona-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Kona family GPIO controller
+
+description:
+ The Broadcom GPIO Controller IP can be configured prior to synthesis to
+ support up to 8 banks of 32 GPIOs where each bank has its own IRQ. The
+ GPIO controller only supports edge, not level, triggering of interrupts.
+
+maintainers:
+ - Ray Jui <rjui@broadcom.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - brcm,bcm11351-gpio
+ - brcm,bcm21664-gpio
+ - brcm,bcm23550-gpio
+ - const: brcm,kona-gpio
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 4
+ maxItems: 6
+ description:
+ The interrupt outputs from the controller. There is one GPIO interrupt
+ per GPIO bank. The number of interrupts listed depends on the number of
+ GPIO banks on the SoC. The interrupts must be ordered by bank, starting
+ with bank 0. There is always a 1:1 mapping between banks and IRQs.
+
+ '#gpio-cells':
+ const: 2
+
+ '#interrupt-cells':
+ const: 2
+
+ gpio-controller: true
+
+ interrupt-controller: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#gpio-cells'
+ - '#interrupt-cells'
+ - gpio-controller
+ - interrupt-controller
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm11351-gpio
+ then:
+ properties:
+ interrupts:
+ minItems: 6
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm21664-gpio
+ - brcm,bcm23550-gpio
+ then:
+ properties:
+ interrupts:
+ maxItems: 4
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ gpio@35003000 {
+ compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio";
+ reg = <0x35003000 0x800>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ interrupt-controller;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/gpio/fsl-imx-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/fsl-imx-gpio.yaml
index ae18603697d7..918776d16ef3 100644
--- a/sys/contrib/device-tree/Bindings/gpio/fsl-imx-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/fsl-imx-gpio.yaml
@@ -19,10 +19,18 @@ properties:
- fsl,imx35-gpio
- fsl,imx7d-gpio
- items:
+ - enum:
+ - fsl,imx27-gpio
+ - const: fsl,imx21-gpio
+ - items:
- const: fsl,imx35-gpio
- const: fsl,imx31-gpio
- items:
- enum:
+ - fsl,imx25-gpio
+ - const: fsl,imx35-gpio
+ - items:
+ - enum:
- fsl,imx50-gpio
- fsl,imx51-gpio
- fsl,imx53-gpio
@@ -32,10 +40,12 @@ properties:
- fsl,imx6sx-gpio
- fsl,imx6ul-gpio
- fsl,imx7d-gpio
+ - fsl,imx8dxl-gpio
- fsl,imx8mm-gpio
- fsl,imx8mn-gpio
- fsl,imx8mp-gpio
- fsl,imx8mq-gpio
+ - fsl,imx8qm-gpio
- fsl,imx8qxp-gpio
- fsl,imxrt1050-gpio
- fsl,imxrt1170-gpio
diff --git a/sys/contrib/device-tree/Bindings/gpio/gpio-pca95xx.yaml b/sys/contrib/device-tree/Bindings/gpio/gpio-pca95xx.yaml
index fa116148ee90..99febb8ea1b6 100644
--- a/sys/contrib/device-tree/Bindings/gpio/gpio-pca95xx.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/gpio-pca95xx.yaml
@@ -66,6 +66,7 @@ properties:
- ti,tca6408
- ti,tca6416
- ti,tca6424
+ - ti,tca9538
- ti,tca9539
- ti,tca9554
diff --git a/sys/contrib/device-tree/Bindings/gpio/gpio-vf610.yaml b/sys/contrib/device-tree/Bindings/gpio/gpio-vf610.yaml
index 7c2d152e8617..a27f92950257 100644
--- a/sys/contrib/device-tree/Bindings/gpio/gpio-vf610.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/gpio-vf610.yaml
@@ -20,6 +20,7 @@ description: |
properties:
compatible:
oneOf:
+ - const: fsl,imx8ulp-gpio
- const: fsl,vf610-gpio
- items:
- const: fsl,imx7ulp-gpio
@@ -27,16 +28,18 @@ properties:
- items:
- enum:
- fsl,imx93-gpio
- - fsl,imx8ulp-gpio
- - const: fsl,imx7ulp-gpio
+ - fsl,imx95-gpio
+ - const: fsl,imx8ulp-gpio
reg:
- description: The first reg tuple represents the PORT module, the second tuple
- represents the GPIO module.
+ minItems: 1
maxItems: 2
interrupts:
- maxItems: 1
+ items:
+ - description: GPIO Trustzone non-secure interrupt number
+ - description: GPIO Trustzone secure interrupt number
+ minItems: 1
interrupt-controller: true
@@ -59,7 +62,8 @@ properties:
- const: port
gpio-ranges:
- maxItems: 1
+ minItems: 1
+ maxItems: 4
patternProperties:
"^.+-hog(-[0-9]+)?$":
@@ -77,6 +81,30 @@ required:
- "#gpio-cells"
- gpio-controller
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,vf610-gpio
+ - fsl,imx7ulp-gpio
+ then:
+ properties:
+ interrupts:
+ maxItems: 1
+ reg:
+ items:
+ - description: PORT register base address
+ - description: GPIO register base address
+ else:
+ properties:
+ interrupts:
+ minItems: 2
+ reg:
+ items:
+ - description: GPIO register base address
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/gpio/gpio-xgene-sb.txt b/sys/contrib/device-tree/Bindings/gpio/gpio-xgene-sb.txt
index e90fb987e25f..7ddf292db144 100644
--- a/sys/contrib/device-tree/Bindings/gpio/gpio-xgene-sb.txt
+++ b/sys/contrib/device-tree/Bindings/gpio/gpio-xgene-sb.txt
@@ -27,7 +27,7 @@ Required properties:
- gpio-controller: Marks the device node as a GPIO controller.
- interrupts: The EXT_INT_0 parent interrupt resource must be listed first.
- interrupt-cells: Should be two.
- - first cell is 0-N coresponding for EXT_INT_0 to EXT_INT_N.
+ - first cell is 0-N corresponding for EXT_INT_0 to EXT_INT_N.
- second cell is used to specify flags.
- interrupt-controller: Marks the device node as an interrupt controller.
- apm,nr-gpios: Optional, specify number of gpios pin.
diff --git a/sys/contrib/device-tree/Bindings/gpio/intel,ixp4xx-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/intel,ixp4xx-gpio.yaml
new file mode 100644
index 000000000000..bfcb1f364c3a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/gpio/intel,ixp4xx-gpio.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/intel,ixp4xx-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel IXP4xx XScale Networking Processors GPIO Controller
+
+description: |
+ This GPIO controller is found in the Intel IXP4xx
+ processors. It supports 16 GPIO lines.
+ The interrupt portions of the GPIO controller is hierarchical.
+ The synchronous edge detector is part of the GPIO block, but the
+ actual enabling/disabling of the interrupt line is done in the
+ main IXP4xx interrupt controller which has a 1-to-1 mapping for
+ the first 12 GPIO lines to 12 system interrupts.
+ The remaining 4 GPIO lines can not be used for receiving
+ interrupts.
+ The interrupt parent of this GPIO controller must be the
+ IXP4xx interrupt controller.
+ GPIO 14 and 15 can be used as clock outputs rather than GPIO,
+ and this can be enabled by a special flag.
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+ compatible:
+ const: intel,ixp4xx-gpio
+
+ reg:
+ maxItems: 1
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ intel,ixp4xx-gpio14-clkout:
+ description: If defined, enables clock output on GPIO 14
+ instead of GPIO.
+ type: boolean
+
+ intel,ixp4xx-gpio15-clkout:
+ description: If defined, enables clock output on GPIO 15
+ instead of GPIO.
+ type: boolean
+
+required:
+ - compatible
+ - reg
+ - "#gpio-cells"
+ - interrupt-controller
+ - "#interrupt-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ gpio@c8004000 {
+ compatible = "intel,ixp4xx-gpio";
+ reg = <0xc8004000 0x1000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/gpio/loongson,ls-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/loongson,ls-gpio.yaml
index fb86e8ce6349..cf3b1b270aa8 100644
--- a/sys/contrib/device-tree/Bindings/gpio/loongson,ls-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/loongson,ls-gpio.yaml
@@ -11,9 +11,22 @@ maintainers:
properties:
compatible:
- enum:
- - loongson,ls2k-gpio
- - loongson,ls7a-gpio
+ oneOf:
+ - enum:
+ - loongson,ls2k-gpio
+ - loongson,ls2k0500-gpio0
+ - loongson,ls2k0500-gpio1
+ - loongson,ls2k2000-gpio0
+ - loongson,ls2k2000-gpio1
+ - loongson,ls2k2000-gpio2
+ - loongson,ls3a5000-gpio
+ - loongson,ls7a-gpio
+ - items:
+ - const: loongson,ls2k1000-gpio
+ - const: loongson,ls2k-gpio
+ - items:
+ - const: loongson,ls7a1000-gpio
+ - const: loongson,ls7a-gpio
reg:
maxItems: 1
@@ -49,7 +62,7 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio@1fe00500 {
- compatible = "loongson,ls2k-gpio";
+ compatible = "loongson,ls2k1000-gpio", "loongson,ls2k-gpio";
reg = <0x1fe00500 0x38>;
ngpios = <64>;
#gpio-cells = <2>;
diff --git a/sys/contrib/device-tree/Bindings/gpio/nuvoton,sgpio.yaml b/sys/contrib/device-tree/Bindings/gpio/nuvoton,sgpio.yaml
new file mode 100644
index 000000000000..9e32e54aeb24
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/gpio/nuvoton,sgpio.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/nuvoton,sgpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton SGPIO controller
+
+maintainers:
+ - Jim LIU <JJLIU0@nuvoton.com>
+
+description: |
+ This SGPIO controller is for NUVOTON NPCM7xx and NPCM8xx SoC and detailed
+ information is in the NPCM7XX/8XX SERIAL I/O EXPANSION INTERFACE section.
+ Nuvoton NPCM7xx SGPIO module is combines a serial to parallel IC (HC595)
+ and a parallel to serial IC (HC165).
+ Clock is a division of the APB3 clock.
+ This interface has 4 pins (D_out , D_in, S_CLK, LDSH).
+ NPCM7xx/NPCM8xx have two sgpio modules. Each module can support up
+ to 64 output pins, and up to 64 input pins, the pin is only for GPI or GPO.
+ GPIO pins can be programmed to support the following options
+ - Support interrupt option for each input port and various interrupt
+ sensitivity options (level-high, level-low, edge-high, edge-low)
+ - ngpios is number of nuvoton,input-ngpios GPIO lines and nuvoton,output-ngpios GPIO lines.
+ nuvoton,input-ngpios GPIO lines is only for GPI.
+ nuvoton,output-ngpios GPIO lines is only for GPO.
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-sgpio
+ - nuvoton,npcm845-sgpio
+
+ reg:
+ maxItems: 1
+
+ gpio-controller: true
+
+ '#gpio-cells':
+ const: 2
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ nuvoton,input-ngpios:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The numbers of GPIO's exposed. GPIO lines are only for GPI.
+ minimum: 0
+ maximum: 64
+
+ nuvoton,output-ngpios:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The numbers of GPIO's exposed. GPIO lines are only for GPO.
+ minimum: 0
+ maximum: 64
+
+required:
+ - compatible
+ - reg
+ - gpio-controller
+ - '#gpio-cells'
+ - interrupts
+ - nuvoton,input-ngpios
+ - nuvoton,output-ngpios
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ gpio8: gpio@101000 {
+ compatible = "nuvoton,npcm750-sgpio";
+ reg = <0x101000 0x200>;
+ clocks = <&clk NPCM7XX_CLK_APB3>;
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ nuvoton,input-ngpios = <64>;
+ nuvoton,output-ngpios = <64>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/gpio/realtek,rtd-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/realtek,rtd-gpio.yaml
new file mode 100644
index 000000000000..dd768db37a98
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/gpio/realtek,rtd-gpio.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/realtek,rtd-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC GPIO controller
+
+maintainers:
+ - Tzuyi Chang <tychang@realtek.com>
+
+description:
+ The GPIO controller is designed for the Realtek DHC (Digital Home Center)
+ RTD series SoC family, which are high-definition media processor SoCs.
+
+properties:
+ compatible:
+ enum:
+ - realtek,rtd1295-misc-gpio
+ - realtek,rtd1295-iso-gpio
+ - realtek,rtd1315e-iso-gpio
+ - realtek,rtd1319-iso-gpio
+ - realtek,rtd1319d-iso-gpio
+ - realtek,rtd1395-iso-gpio
+ - realtek,rtd1619-iso-gpio
+ - realtek,rtd1619b-iso-gpio
+
+ reg:
+ items:
+ - description: GPIO controller registers
+ - description: GPIO interrupt registers
+
+ interrupts:
+ items:
+ - description: Interrupt number of the assert GPIO interrupt, which is
+ triggered when there is a rising edge.
+ - description: Interrupt number of the deassert GPIO interrupt, which is
+ triggered when there is a falling edge.
+
+ gpio-ranges: true
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - gpio-ranges
+ - gpio-controller
+ - "#gpio-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ gpio@100 {
+ compatible = "realtek,rtd1319d-iso-gpio";
+ reg = <0x100 0x100>,
+ <0x0 0xb0>;
+ interrupt-parent = <&iso_irq_mux>;
+ interrupts = <19>, <20>;
+ gpio-ranges = <&pinctrl 0 0 82>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/gpio/rockchip,gpio-bank.yaml b/sys/contrib/device-tree/Bindings/gpio/rockchip,gpio-bank.yaml
index affd823c881d..d76987ce8e50 100644
--- a/sys/contrib/device-tree/Bindings/gpio/rockchip,gpio-bank.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/rockchip,gpio-bank.yaml
@@ -41,6 +41,13 @@ properties:
"#interrupt-cells":
const: 2
+patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+
+ required:
+ - gpio-hog
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/gpio/snps,dw-apb-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/snps,dw-apb-gpio.yaml
index b391cc1b4590..ab2afc0e4153 100644
--- a/sys/contrib/device-tree/Bindings/gpio/snps,dw-apb-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/snps,dw-apb-gpio.yaml
@@ -9,7 +9,7 @@ title: Synopsys DesignWare APB GPIO controller
description: |
Synopsys DesignWare GPIO controllers have a configurable number of ports,
each of which are intended to be represented as child nodes with the generic
- GPIO-controller properties as desribed in this bindings file.
+ GPIO-controller properties as described in this bindings file.
maintainers:
- Hoan Tran <hoan@os.amperecomputing.com>
@@ -61,6 +61,12 @@ patternProperties:
'#gpio-cells':
const: 2
+ gpio-line-names:
+ minItems: 1
+ maxItems: 32
+
+ gpio-ranges: true
+
ngpios:
default: 32
minimum: 1
diff --git a/sys/contrib/device-tree/Bindings/gpio/st,stmpe-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/st,stmpe-gpio.yaml
index 22c0cae73425..4555f1644a4d 100644
--- a/sys/contrib/device-tree/Bindings/gpio/st,stmpe-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/st,stmpe-gpio.yaml
@@ -28,6 +28,10 @@ properties:
gpio-controller: true
+ gpio-line-names:
+ minItems: 1
+ maxItems: 24
+
interrupt-controller: true
st,norequest-mask:
diff --git a/sys/contrib/device-tree/Bindings/gpio/ti,omap-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/ti,omap-gpio.yaml
index bd721c839059..7b75d2f92f1b 100644
--- a/sys/contrib/device-tree/Bindings/gpio/ti,omap-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/ti,omap-gpio.yaml
@@ -58,14 +58,14 @@ properties:
deprecated: true
description:
Name of the hwmod associated with the GPIO. Needed on some legacy OMAP
- SoCs which have not been converted to the ti,sysc interconnect hierarachy.
+ SoCs which have not been converted to the ti,sysc interconnect hierarchy.
ti,no-reset-on-init:
$ref: /schemas/types.yaml#/definitions/flag
deprecated: true
description:
Do not reset on init. Used with ti,hwmods on some legacy OMAP SoCs which
- have not been converted to the ti,sysc interconnect hierarachy.
+ have not been converted to the ti,sysc interconnect hierarchy.
patternProperties:
"^(.+-hog(-[0-9]+)?)$":
diff --git a/sys/contrib/device-tree/Bindings/gpio/x-powers,axp209-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/x-powers,axp209-gpio.yaml
index 1638cfe90f1c..5eeb29bcdd21 100644
--- a/sys/contrib/device-tree/Bindings/gpio/x-powers,axp209-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/x-powers,axp209-gpio.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/gpio/x-powers,axp209-gpio.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/gpio/x-powers,axp209-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: X-Powers AXP209 GPIO
diff --git a/sys/contrib/device-tree/Bindings/gpio/xlnx,gpio-xilinx.yaml b/sys/contrib/device-tree/Bindings/gpio/xlnx,gpio-xilinx.yaml
index c1060e5fcef3..d3d8a2e143ed 100644
--- a/sys/contrib/device-tree/Bindings/gpio/xlnx,gpio-xilinx.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/xlnx,gpio-xilinx.yaml
@@ -126,7 +126,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
- gpio@e000a000 {
+ gpio@a0020000 {
compatible = "xlnx,xps-gpio-1.00.a";
reg = <0xa0020000 0x10000>;
#gpio-cells = <2>;
diff --git a/sys/contrib/device-tree/Bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml b/sys/contrib/device-tree/Bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml
index 18e61aff2185..bb93baa88879 100644
--- a/sys/contrib/device-tree/Bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/xlnx,zynqmp-gpio-modepin.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/gpio/xlnx,zynqmp-gpio-modepin.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ZynqMP Mode Pin GPIO controller
@@ -12,7 +12,8 @@ description:
PS_MODE). Every pin can be configured as input/output.
maintainers:
- - Piyush Mehta <piyush.mehta@amd.com>
+ - Mubin Sayyed <mubin.sayyed@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
properties:
compatible:
@@ -23,6 +24,8 @@ properties:
"#gpio-cells":
const: 2
+ label: true
+
required:
- compatible
- gpio-controller
@@ -37,6 +40,7 @@ examples:
compatible = "xlnx,zynqmp-gpio-modepin";
gpio-controller;
#gpio-cells = <2>;
+ label = "modepin";
};
};
diff --git a/sys/contrib/device-tree/Bindings/gpio/xylon,logicvc-gpio.yaml b/sys/contrib/device-tree/Bindings/gpio/xylon,logicvc-gpio.yaml
index a36aec27069c..59c79a6943ec 100644
--- a/sys/contrib/device-tree/Bindings/gpio/xylon,logicvc-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/gpio/xylon,logicvc-gpio.yaml
@@ -2,8 +2,8 @@
# Copyright 2019 Bootlin
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/gpio/xylon,logicvc-gpio.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/gpio/xylon,logicvc-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xylon LogiCVC GPIO controller
diff --git a/sys/contrib/device-tree/Bindings/gpu/arm,mali-midgard.yaml b/sys/contrib/device-tree/Bindings/gpu/arm,mali-midgard.yaml
index ca02baba5526..0801da33a385 100644
--- a/sys/contrib/device-tree/Bindings/gpu/arm,mali-midgard.yaml
+++ b/sys/contrib/device-tree/Bindings/gpu/arm,mali-midgard.yaml
@@ -42,6 +42,11 @@ properties:
- const: arm,mali-t760
- items:
- enum:
+ - samsung,exynos7-mali
+ - const: samsung,exynos5433-mali
+ - const: arm,mali-t760
+ - items:
+ - enum:
- rockchip,rk3399-mali
- const: arm,mali-t860
diff --git a/sys/contrib/device-tree/Bindings/gpu/arm,mali-utgard.yaml b/sys/contrib/device-tree/Bindings/gpu/arm,mali-utgard.yaml
index 0fae1ef013be..abd4aa335fbc 100644
--- a/sys/contrib/device-tree/Bindings/gpu/arm,mali-utgard.yaml
+++ b/sys/contrib/device-tree/Bindings/gpu/arm,mali-utgard.yaml
@@ -29,6 +29,7 @@ properties:
- allwinner,sun50i-a64-mali
- rockchip,rk3036-mali
- rockchip,rk3066-mali
+ - rockchip,rk3128-mali
- rockchip,rk3188-mali
- rockchip,rk3228-mali
- samsung,exynos4210-mali
diff --git a/sys/contrib/device-tree/Bindings/gpu/brcm,bcm-v3d.yaml b/sys/contrib/device-tree/Bindings/gpu/brcm,bcm-v3d.yaml
index dae55b8a267b..dc078ceeca9a 100644
--- a/sys/contrib/device-tree/Bindings/gpu/brcm,bcm-v3d.yaml
+++ b/sys/contrib/device-tree/Bindings/gpu/brcm,bcm-v3d.yaml
@@ -17,6 +17,7 @@ properties:
compatible:
enum:
- brcm,2711-v3d
+ - brcm,2712-v3d
- brcm,7268-v3d
- brcm,7278-v3d
diff --git a/sys/contrib/device-tree/Bindings/gpu/img,powervr.yaml b/sys/contrib/device-tree/Bindings/gpu/img,powervr.yaml
new file mode 100644
index 000000000000..a13298f1a182
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/gpu/img,powervr.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 Imagination Technologies Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpu/img,powervr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Imagination Technologies PowerVR and IMG GPU
+
+maintainers:
+ - Frank Binns <frank.binns@imgtec.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - ti,am62-gpu
+ - const: img,img-axe # IMG AXE GPU model/revision is fully discoverable
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ maxItems: 3
+
+ clock-names:
+ items:
+ - const: core
+ - const: mem
+ - const: sys
+ minItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+additionalProperties: false
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ti,am62-gpu
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+ gpu@fd00000 {
+ compatible = "ti,am62-gpu", "img,img-axe";
+ reg = <0x0fd00000 0x20000>;
+ clocks = <&k3_clks 187 0>;
+ clock-names = "core";
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 187 TI_SCI_PD_EXCLUSIVE>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/gpu/samsung-g2d.yaml b/sys/contrib/device-tree/Bindings/gpu/samsung-g2d.yaml
index e7daae862578..132aaa49597b 100644
--- a/sys/contrib/device-tree/Bindings/gpu/samsung-g2d.yaml
+++ b/sys/contrib/device-tree/Bindings/gpu/samsung-g2d.yaml
@@ -22,36 +22,20 @@ properties:
interrupts:
maxItems: 1
- clocks: {}
- clock-names: {}
- iommus: {}
- power-domains: {}
-
-if:
- properties:
- compatible:
- contains:
- const: samsung,exynos5250-g2d
-
-then:
- properties:
- clocks:
- items:
- - description: fimg2d clock
- clock-names:
- items:
- - const: fimg2d
-
-else:
- properties:
- clocks:
- items:
- - description: sclk_fimg2d clock
- - description: fimg2d clock
- clock-names:
- items:
- - const: sclk_fimg2d
- - const: fimg2d
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ maxItems: 2
+
+ iommus:
+ minItems: 1
+ maxItems: 2
+
+ power-domains:
+ maxItems: 1
required:
- compatible
@@ -60,6 +44,33 @@ required:
- clocks
- clock-names
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynos5250-g2d
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: fimg2d clock
+ clock-names:
+ items:
+ - const: fimg2d
+
+ else:
+ properties:
+ clocks:
+ items:
+ - description: sclk_fimg2d clock
+ - description: fimg2d clock
+ clock-names:
+ items:
+ - const: sclk_fimg2d
+ - const: fimg2d
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/gpu/samsung-rotator.yaml b/sys/contrib/device-tree/Bindings/gpu/samsung-rotator.yaml
index d60626ffb28e..18bf44e06e8f 100644
--- a/sys/contrib/device-tree/Bindings/gpu/samsung-rotator.yaml
+++ b/sys/contrib/device-tree/Bindings/gpu/samsung-rotator.yaml
@@ -12,10 +12,11 @@ maintainers:
properties:
compatible:
enum:
- - "samsung,s5pv210-rotator"
- - "samsung,exynos4210-rotator"
- - "samsung,exynos4212-rotator"
- - "samsung,exynos5250-rotator"
+ - samsung,s5pv210-rotator
+ - samsung,exynos4210-rotator
+ - samsung,exynos4212-rotator
+ - samsung,exynos5250-rotator
+
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/gpu/samsung-scaler.yaml b/sys/contrib/device-tree/Bindings/gpu/samsung-scaler.yaml
index 5317ac64426a..9fb530e65d0e 100644
--- a/sys/contrib/device-tree/Bindings/gpu/samsung-scaler.yaml
+++ b/sys/contrib/device-tree/Bindings/gpu/samsung-scaler.yaml
@@ -21,40 +21,20 @@ properties:
interrupts:
maxItems: 1
- clocks: {}
- clock-names: {}
- iommus: {}
- power-domains: {}
-
-if:
- properties:
- compatible:
- contains:
- const: samsung,exynos5420-scaler
-
-then:
- properties:
- clocks:
- items:
- - description: mscl clock
-
- clock-names:
- items:
- - const: mscl
-
-else:
- properties:
- clocks:
- items:
- - description: pclk clock
- - description: aclk clock
- - description: aclk_xiu clock
-
- clock-names:
- items:
- - const: pclk
- - const: aclk
- - const: aclk_xiu
+ clocks:
+ minItems: 1
+ maxItems: 3
+
+ clock-names:
+ minItems: 1
+ maxItems: 3
+
+ iommus:
+ minItems: 1
+ maxItems: 2
+
+ power-domains:
+ maxItems: 1
required:
- compatible
@@ -63,6 +43,39 @@ required:
- clocks
- clock-names
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynos5420-scaler
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: mscl clock
+ clock-names:
+ items:
+ - const: mscl
+ iommus:
+ minItems: 2
+
+ else:
+ properties:
+ clocks:
+ items:
+ - description: pclk clock
+ - description: aclk clock
+ - description: aclk_xiu clock
+ clock-names:
+ items:
+ - const: pclk
+ - const: aclk
+ - const: aclk_xiu
+ iommus:
+ maxItems: 1
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/hwinfo/samsung,exynos-chipid.yaml b/sys/contrib/device-tree/Bindings/hwinfo/samsung,exynos-chipid.yaml
index 95cbdcb56efe..780ccb5ee9b4 100644
--- a/sys/contrib/device-tree/Bindings/hwinfo/samsung,exynos-chipid.yaml
+++ b/sys/contrib/device-tree/Bindings/hwinfo/samsung,exynos-chipid.yaml
@@ -11,9 +11,21 @@ maintainers:
properties:
compatible:
- enum:
- - samsung,exynos4210-chipid
- - samsung,exynos850-chipid
+ oneOf:
+ - enum:
+ - samsung,exynos4210-chipid
+ - samsung,exynos850-chipid
+ - items:
+ - enum:
+ - samsung,exynos5433-chipid
+ - samsung,exynos7-chipid
+ - const: samsung,exynos4210-chipid
+ - items:
+ - enum:
+ - samsung,exynos7885-chipid
+ - samsung,exynosautov9-chipid
+ - samsung,exynosautov920-chipid
+ - const: samsung,exynos850-chipid
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml b/sys/contrib/device-tree/Bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
index 38478dad8b25..584cce3211c0 100644
--- a/sys/contrib/device-tree/Bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
+++ b/sys/contrib/device-tree/Bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwlock/allwinner,sun6i-a31-hwspinlock.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwlock/ti,omap-hwspinlock.yaml b/sys/contrib/device-tree/Bindings/hwlock/ti,omap-hwspinlock.yaml
index 0a955c7b9706..5ba60d532fcd 100644
--- a/sys/contrib/device-tree/Bindings/hwlock/ti,omap-hwspinlock.yaml
+++ b/sys/contrib/device-tree/Bindings/hwlock/ti,omap-hwspinlock.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwlock/ti,omap-hwspinlock.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/adi,adm1177.yaml b/sys/contrib/device-tree/Bindings/hwmon/adi,adm1177.yaml
index ca2b47320689..2e45364d0543 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/adi,adm1177.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/adi,adm1177.yaml
@@ -27,7 +27,7 @@ properties:
shunt-resistor-micro-ohms:
description:
- The value of curent sense resistor in microohms. If not provided,
+ The value of current sense resistor in microohms. If not provided,
the current reading and overcurrent alert is disabled.
adi,shutdown-threshold-microamp:
diff --git a/sys/contrib/device-tree/Bindings/hwmon/adi,axi-fan-control.yaml b/sys/contrib/device-tree/Bindings/hwmon/adi,axi-fan-control.yaml
index 0cf3ed6212a6..6751f9b643b4 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/adi,axi-fan-control.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/adi,axi-fan-control.yaml
@@ -11,7 +11,7 @@ maintainers:
- Nuno Sá <nuno.sa@analog.com>
description: |+
- Bindings for the Analog Devices AXI FAN Control driver. Spefications of the
+ Bindings for the Analog Devices AXI FAN Control driver. Specifications of the
core can be found in:
https://wiki.analog.com/resources/fpga/docs/axi_fan_control
diff --git a/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2991.yaml b/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2991.yaml
new file mode 100644
index 000000000000..011e5b65c79c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2991.yaml
@@ -0,0 +1,128 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/adi,ltc2991.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices LTC2991 Octal I2C Voltage, Current and Temperature Monitor
+
+maintainers:
+ - Antoniu Miclaus <antoniu.miclaus@analog.com>
+
+description: |
+ The LTC2991 is used to monitor system temperatures, voltages and currents.
+ Through the I2C serial interface, the eight monitors can individually measure
+ supply voltages and can be paired for differential measurements of current
+ sense resistors or temperature sensing transistors.
+
+ Datasheet:
+ https://www.analog.com/en/products/ltc2991.html
+
+properties:
+ compatible:
+ const: adi,ltc2991
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ vcc-supply: true
+
+patternProperties:
+ "^channel@[0-3]$":
+ type: object
+ description:
+ Represents the differential/temperature channels.
+
+ properties:
+ reg:
+ description:
+ The channel number. LTC2991 can monitor 4 currents/temperatures.
+ items:
+ minimum: 0
+ maximum: 3
+
+ shunt-resistor-micro-ohms:
+ description:
+ The value of curent sense resistor in micro ohms. Pin configuration is
+ set for differential input pair.
+
+ adi,temperature-enable:
+ description:
+ Enables temperature readings. Pin configuration is set for remote
+ diode temperature measurement.
+ type: boolean
+
+ required:
+ - reg
+
+ allOf:
+ - if:
+ required:
+ - shunt-resistor-micro-ohms
+ then:
+ properties:
+ adi,temperature-enable: false
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - vcc-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hwmon@48 {
+ compatible = "adi,ltc2991";
+ reg = <0x48>;
+ vcc-supply = <&vcc>;
+ };
+ };
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hwmon@48 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "adi,ltc2991";
+ reg = <0x48>;
+ vcc-supply = <&vcc>;
+
+ channel@0 {
+ reg = <0x0>;
+ shunt-resistor-micro-ohms = <100000>;
+ };
+
+ channel@1 {
+ reg = <0x1>;
+ shunt-resistor-micro-ohms = <100000>;
+ };
+
+ channel@2 {
+ reg = <0x2>;
+ adi,temperature-enable;
+ };
+
+ channel@3 {
+ reg = <0x3>;
+ adi,temperature-enable;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2992.yaml b/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2992.yaml
index b39c632956e8..0ad12d245656 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2992.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/adi,ltc2992.yaml
@@ -46,7 +46,7 @@ patternProperties:
shunt-resistor-micro-ohms:
description:
- The value of curent sense resistor in microohms.
+ The value of current sense resistor in microohms.
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/hwmon/adi,max31827.yaml b/sys/contrib/device-tree/Bindings/hwmon/adi,max31827.yaml
index 2dc8b07b4d3b..f60e06ab7d0a 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/adi,max31827.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/adi,max31827.yaml
@@ -32,6 +32,68 @@ properties:
Must have values in the interval (1.6V; 3.6V) in order for the device to
function correctly.
+ adi,comp-int:
+ description:
+ If present interrupt mode is used. If not present comparator mode is used
+ (default).
+ type: boolean
+
+ adi,alarm-pol:
+ description:
+ Sets the alarms active state.
+ - 0 = active low
+ - 1 = active high
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ adi,fault-q:
+ description:
+ Select how many consecutive temperature faults must occur before
+ overtemperature or undertemperature faults are indicated in the
+ corresponding status bits.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2, 4, 8]
+
+ adi,timeout-enable:
+ description:
+ Enables timeout. Bus timeout resets the I2C-compatible interface when SCL
+ is low for more than 30ms (nominal).
+ type: boolean
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,max31829
+
+ then:
+ properties:
+ adi,alarm-pol:
+ default: 1
+
+ else:
+ properties:
+ adi,alarm-pol:
+ default: 0
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,max31827
+
+ then:
+ properties:
+ adi,fault-q:
+ default: 1
+
+ else:
+ properties:
+ adi,fault-q:
+ default: 4
+
+
required:
- compatible
- reg
@@ -49,6 +111,10 @@ examples:
compatible = "adi,max31827";
reg = <0x42>;
vref-supply = <&reg_vdd>;
+ adi,comp-int;
+ adi,alarm-pol = <0>;
+ adi,fault-q = <1>;
+ adi,timeout-enable;
};
};
...
diff --git a/sys/contrib/device-tree/Bindings/hwmon/aspeed-pwm-tacho.txt b/sys/contrib/device-tree/Bindings/hwmon/aspeed-pwm-tacho.txt
index 3ac02988a1a5..8645cd3b867a 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/aspeed-pwm-tacho.txt
+++ b/sys/contrib/device-tree/Bindings/hwmon/aspeed-pwm-tacho.txt
@@ -45,7 +45,7 @@ Required properties for each child node:
- aspeed,fan-tach-ch : should specify the Fan tach input channel.
integer value in the range 0 through 15, with 0 indicating
Fan tach channel 0 and 15 indicating Fan tach channel 15.
- Atleast one Fan tach input channel is required.
+ At least one Fan tach input channel is required.
Examples:
diff --git a/sys/contrib/device-tree/Bindings/hwmon/gpio-fan.yaml b/sys/contrib/device-tree/Bindings/hwmon/gpio-fan.yaml
new file mode 100644
index 000000000000..7f30cfc87350
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/hwmon/gpio-fan.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/gpio-fan.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Fan connected to GPIO lines
+
+maintainers:
+ - Rob Herring <robh@kernel.org>
+
+properties:
+ compatible:
+ const: gpio-fan
+
+ gpios:
+ description: |
+ Specifies the pins that map to bits in the control value,
+ ordered MSB-->LSB.
+ minItems: 1
+ maxItems: 7
+
+ alarm-gpios:
+ maxItems: 1
+
+ gpio-fan,speed-map:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ minItems: 2
+ maxItems: 127
+ items:
+ items:
+ - description: fan speed in RPMs
+ - description: control value
+ description: |
+ A mapping of possible fan RPM speeds and the
+ control value that should be set to achieve them. This array
+ must have the RPM values in ascending order.
+
+ '#cooling-cells':
+ const: 2
+
+required:
+ - compatible
+ - gpios
+ - gpio-fan,speed-map
+
+additionalProperties: false
+
+examples:
+ - |
+ gpio-fan {
+ compatible = "gpio-fan";
+ gpios = <&gpio2 14 1
+ &gpio2 13 1>;
+ gpio-fan,speed-map = < 0 0>,
+ <3000 1>,
+ <6000 2>;
+ alarm-gpios = <&gpio2 15 1>;
+ #cooling-cells = <2>; /* min followed by max */
+ };
diff --git a/sys/contrib/device-tree/Bindings/hwmon/iio-hwmon.yaml b/sys/contrib/device-tree/Bindings/hwmon/iio-hwmon.yaml
index c54b5986b365..be5c7d4579bb 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/iio-hwmon.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/iio-hwmon.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/hwmon/iio-hwmon.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/hwmon/iio-hwmon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ADC-attached Hardware Sensor
@@ -19,7 +19,7 @@ properties:
io-channels:
minItems: 1
- maxItems: 8 # Should be enough
+ maxItems: 51 # Should be enough
description: >
List of phandles to ADC channels to read the monitoring values
diff --git a/sys/contrib/device-tree/Bindings/hwmon/jedec,jc42.yaml b/sys/contrib/device-tree/Bindings/hwmon/jedec,jc42.yaml
index 0e49b3901161..bf3332153ad8 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/jedec,jc42.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/jedec,jc42.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/jedec,jc42.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4151.yaml b/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4151.yaml
index b1a4c235376e..e62aff670478 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4151.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4151.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/lltc,ltc4151.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4286.yaml b/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4286.yaml
new file mode 100644
index 000000000000..98ca163d3486
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/hwmon/lltc,ltc4286.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/lltc,ltc4286.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LTC4286 power monitors
+
+maintainers:
+ - Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com>
+
+properties:
+ compatible:
+ enum:
+ - lltc,ltc4286
+ - lltc,ltc4287
+
+ reg:
+ maxItems: 1
+
+ adi,vrange-low-enable:
+ description:
+ This property is a bool parameter to represent the
+ voltage range is 25.6 volts or 102.4 volts for this chip.
+ The default is 102.4 volts.
+ type: boolean
+
+ shunt-resistor-micro-ohms:
+ description:
+ Resistor value micro-ohms.
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ power-monitor@40 {
+ compatible = "lltc,ltc4286";
+ reg = <0x40>;
+ adi,vrange-low-enable;
+ shunt-resistor-micro-ohms = <300>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/hwmon/lm75.yaml b/sys/contrib/device-tree/Bindings/hwmon/lm75.yaml
index 8226e3b5d028..ed269e428a3d 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/lm75.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/lm75.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/lm75.yaml#
@@ -14,6 +14,7 @@ properties:
compatible:
enum:
- adi,adt75
+ - ams,as6200
- atmel,at30ts74
- dallas,ds1775
- dallas,ds75
@@ -48,10 +49,28 @@ properties:
vs-supply:
description: phandle to the regulator that provides the +VS supply
+ interrupts:
+ maxItems: 1
+
required:
- compatible
- reg
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ams,as6200
+ - ti,tmp100
+ - ti,tmp101
+ - ti,tmp112
+ then:
+ properties:
+ interrupts: false
+
additionalProperties: false
examples:
@@ -66,3 +85,17 @@ examples:
vs-supply = <&vs>;
};
};
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ temperature-sensor@48 {
+ compatible = "ams,as6200";
+ reg = <0x48>;
+ vs-supply = <&vs>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/hwmon/lm87.txt b/sys/contrib/device-tree/Bindings/hwmon/lm87.txt
index e1b79903f204..758ff398b67b 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/lm87.txt
+++ b/sys/contrib/device-tree/Bindings/hwmon/lm87.txt
@@ -18,7 +18,7 @@ optional properties:
in7. Otherwise the pin is set as FAN2 input.
- vcc-supply: a Phandle for the regulator supplying power, can be
- cofigured to measure 5.0V power supply. Default is 3.3V.
+ configured to measure 5.0V power supply. Default is 3.3V.
Example:
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ltq-cputemp.txt b/sys/contrib/device-tree/Bindings/hwmon/ltq-cputemp.txt
index 33fd00a987c7..473b34c876dd 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/ltq-cputemp.txt
+++ b/sys/contrib/device-tree/Bindings/hwmon/ltq-cputemp.txt
@@ -1,4 +1,4 @@
-Lantiq cpu temperatur sensor
+Lantiq cpu temperature sensor
Requires node properties:
- compatible value :
diff --git a/sys/contrib/device-tree/Bindings/hwmon/microchip,mcp3021.yaml b/sys/contrib/device-tree/Bindings/hwmon/microchip,mcp3021.yaml
index 028d6e570131..f5e104c1b0d0 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/microchip,mcp3021.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/microchip,mcp3021.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/microchip,mcp3021.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/moortec,mr75203.yaml b/sys/contrib/device-tree/Bindings/hwmon/moortec,mr75203.yaml
index bd67cfee6d19..56db2292f062 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/moortec,mr75203.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/moortec,mr75203.yaml
@@ -42,7 +42,7 @@ properties:
reg:
items:
- description: PVT common registers
- - description: PVT temprature sensor registers
+ - description: PVT temperature sensor registers
- description: PVT process detector registers
- description: PVT voltage monitor registers
diff --git a/sys/contrib/device-tree/Bindings/hwmon/national,lm90.yaml b/sys/contrib/device-tree/Bindings/hwmon/national,lm90.yaml
index 7b9d48d6d6da..6e59c8fdef30 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/national,lm90.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/national,lm90.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/national,lm90.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/npcm750-pwm-fan.txt b/sys/contrib/device-tree/Bindings/hwmon/npcm750-pwm-fan.txt
index 28f43e929f6d..18095ba87a5a 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/npcm750-pwm-fan.txt
+++ b/sys/contrib/device-tree/Bindings/hwmon/npcm750-pwm-fan.txt
@@ -1,12 +1,16 @@
-Nuvoton NPCM7xx PWM and Fan Tacho controller device
+Nuvoton NPCM PWM and Fan Tacho controller device
The Nuvoton BMC NPCM7XX supports 8 Pulse-width modulation (PWM)
controller outputs and 16 Fan tachometer controller inputs.
+The Nuvoton BMC NPCM8XX supports 12 Pulse-width modulation (PWM)
+controller outputs and 16 Fan tachometer controller inputs.
+
Required properties for pwm-fan node
- #address-cells : should be 1.
- #size-cells : should be 0.
- compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX.
+ : "nuvoton,npcm845-pwm-fan" for Arbel NPCM8XX.
- reg : specifies physical base address and size of the registers.
- reg-names : must contain:
* "pwm" for the PWM registers.
@@ -23,7 +27,7 @@ Required properties for pwm-fan node
fan subnode format:
===================
Under fan subnode can be upto 8 child nodes, each child node representing a fan.
-Each fan subnode must have one PWM channel and atleast one Fan tach channel.
+Each fan subnode must have one PWM channel and at least one Fan tach channel.
For PWM channel can be configured cooling-levels to create cooling device.
Cooling device could be bound to a thermal zone for the thermal control.
diff --git a/sys/contrib/device-tree/Bindings/hwmon/nxp,mc34vr500.yaml b/sys/contrib/device-tree/Bindings/hwmon/nxp,mc34vr500.yaml
index 306f67315835..48d654e52114 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/nxp,mc34vr500.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/nxp,mc34vr500.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/nxp,mc34vr500.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/pmbus/infineon,tda38640.yaml b/sys/contrib/device-tree/Bindings/hwmon/pmbus/infineon,tda38640.yaml
new file mode 100644
index 000000000000..ded1c115764b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/hwmon/pmbus/infineon,tda38640.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/pmbus/infineon,tda38640.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Infineon TDA38640 Synchronous Buck Regulator with SVID and I2C
+
+maintainers:
+ - Naresh Solanki <naresh.solanki@9elements.com>
+
+description: |
+ The Infineon TDA38640 is a 40A Single-voltage Synchronous Buck
+ Regulator with SVID and I2C designed for Industrial use.
+
+ Datasheet: https://www.infineon.com/dgdl/Infineon-TDA38640-0000-DataSheet-v02_04-EN.pdf?fileId=8ac78c8c80027ecd018042f2337f00c9
+
+properties:
+ compatible:
+ enum:
+ - infineon,tda38640
+
+ reg:
+ maxItems: 1
+
+ infineon,en-pin-fixed-level:
+ description:
+ Indicates that the chip EN pin is at fixed level or left
+ unconnected(has internal pull-down).
+ type: boolean
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tda38640@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/hwmon/sensirion,sht15.yaml b/sys/contrib/device-tree/Bindings/hwmon/sensirion,sht15.yaml
index 80df7182ea28..14ac783c9a5f 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/sensirion,sht15.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/sensirion,sht15.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/sensirion,sht15.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/sensirion,shtc1.yaml b/sys/contrib/device-tree/Bindings/hwmon/sensirion,shtc1.yaml
index 159238efa9ed..3d14d5fc96c5 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/sensirion,shtc1.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/sensirion,shtc1.yaml
@@ -13,7 +13,7 @@ description: |
The SHTC1, SHTW1 and SHTC3 are digital humidity and temperature sensors
designed especially for battery-driven high-volume consumer electronics
applications.
- For further information refere to Documentation/hwmon/shtc1.rst
+ For further information refer to Documentation/hwmon/shtc1.rst
This binding document describes the binding for the hardware monitor
portion of the driver.
diff --git a/sys/contrib/device-tree/Bindings/hwmon/starfive,jh71x0-temp.yaml b/sys/contrib/device-tree/Bindings/hwmon/starfive,jh71x0-temp.yaml
index f5b34528928d..733cba780186 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/starfive,jh71x0-temp.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/starfive,jh71x0-temp.yaml
@@ -27,8 +27,8 @@ properties:
clock-names:
items:
- - const: "sense"
- - const: "bus"
+ - const: sense
+ - const: bus
'#thermal-sensor-cells':
const: 0
@@ -39,8 +39,8 @@ properties:
reset-names:
items:
- - const: "sense"
- - const: "bus"
+ - const: sense
+ - const: bus
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ti,ina2xx.yaml b/sys/contrib/device-tree/Bindings/hwmon/ti,ina2xx.yaml
index 8648877d2d01..378d1f6aeeb3 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/ti,ina2xx.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/ti,ina2xx.yaml
@@ -26,6 +26,7 @@ properties:
- ti,ina226
- ti,ina230
- ti,ina231
+ - ti,ina237
- ti,ina238
reg:
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ti,ina3221.yaml b/sys/contrib/device-tree/Bindings/hwmon/ti,ina3221.yaml
new file mode 100644
index 000000000000..5f10f1207d69
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/hwmon/ti,ina3221.yaml
@@ -0,0 +1,121 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/ti,ina3221.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments INA3221 Current and Voltage Monitor
+
+maintainers:
+ - Jean Delvare <jdelvare@suse.com>
+ - Guenter Roeck <linux@roeck-us.net>
+
+properties:
+ compatible:
+ const: ti,ina3221
+
+ reg:
+ maxItems: 1
+
+ ti,single-shot:
+ description: |
+ This chip has two power modes: single-shot (chip takes one measurement
+ and then shuts itself down) and continuous (chip takes continuous
+ measurements). The continuous mode is more reliable and suitable for
+ hardware monitor type device, but the single-shot mode is more power-
+ friendly and useful for battery-powered device which cares power
+ consumptions while still needs some measurements occasionally.
+
+ If this property is present, the single-shot mode will be used, instead
+ of the default continuous one for monitoring.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ "#address-cells":
+ description: Required only if a child node is present.
+ const: 1
+
+ "#size-cells":
+ description: Required only if a child node is present.
+ const: 0
+
+patternProperties:
+ "^input@[0-2]$":
+ description: The node contains optional child nodes for three channels.
+ Each child node describes the information of input source. Input channels
+ default to enabled in the chip. Unless channels are explicitly disabled
+ in device-tree, input channels will be enabled.
+ type: object
+ additionalProperties: false
+ properties:
+ reg:
+ description: Must be 0, 1 and 2, corresponding to the IN1, IN2 or IN3
+ ports of the INA3221, respectively.
+ enum: [ 0, 1, 2 ]
+
+ label:
+ description: name of the input source
+
+ shunt-resistor-micro-ohms:
+ description: shunt resistor value in micro-Ohm
+
+ ti,summation-disable:
+ description: |
+ The INA3221 has a critical alert pin that can be controlled by the
+ summation control function. This function adds the single
+ shunt-voltage conversions for the desired channels in order to
+ compare the combined sum to the programmed limit. The Shunt-Voltage
+ Sum Limit register contains the programmed value that is compared
+ to the value in the Shunt-Voltage Sum register in order to
+ determine if the total summed limit is exceeded. If the
+ shunt-voltage sum limit value is exceeded, the critical alert pin
+ is asserted.
+
+ For the summation limit to have a meaningful value, it is necessary
+ to use the same shunt-resistor value on all enabled channels. If
+ this is not the case or if a channel should not be used for
+ triggering the critical alert pin, then this property can be used
+ exclude specific channels from the summation control function.
+ type: boolean
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ power-sensor@40 {
+ compatible = "ti,ina3221";
+ reg = <0x40>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ input@0 {
+ reg = <0x0>;
+ /*
+ * Input channels are enabled by default in the device and so
+ * to disable, must be explicitly disabled in device-tree.
+ */
+ status = "disabled";
+ };
+
+ input@1 {
+ reg = <0x1>;
+ shunt-resistor-micro-ohms = <5000>;
+ };
+
+ input@2 {
+ reg = <0x2>;
+ label = "VDD_5V";
+ shunt-resistor-micro-ohms = <5000>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ti,tmp102.yaml b/sys/contrib/device-tree/Bindings/hwmon/ti,tmp102.yaml
index c5a889e3e27b..7e5b62a0215d 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/ti,tmp102.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/ti,tmp102.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/ti,tmp102.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ti,tmp108.yaml b/sys/contrib/device-tree/Bindings/hwmon/ti,tmp108.yaml
index dcbc6fbc3b48..8b5307c875ff 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/ti,tmp108.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/ti,tmp108.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/ti,tmp108.yaml#
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ti,tmp513.yaml b/sys/contrib/device-tree/Bindings/hwmon/ti,tmp513.yaml
index fde5225ce012..cdd1489e0c54 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/ti,tmp513.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/ti,tmp513.yaml
@@ -33,7 +33,7 @@ properties:
shunt-resistor-micro-ohms:
description: |
- If 0, the calibration process will be skiped and the current and power
+ If 0, the calibration process will be skipped and the current and power
measurement engine will not work. Temperature and voltage measurement
will continue to work. The shunt value also need to respect:
rshunt <= pga-gain * 40 * 1000 * 1000.
diff --git a/sys/contrib/device-tree/Bindings/hwmon/ti,tps23861.yaml b/sys/contrib/device-tree/Bindings/hwmon/ti,tps23861.yaml
index bce68a326919..ebc8d466c1aa 100644
--- a/sys/contrib/device-tree/Bindings/hwmon/ti,tps23861.yaml
+++ b/sys/contrib/device-tree/Bindings/hwmon/ti,tps23861.yaml
@@ -26,7 +26,7 @@ properties:
maxItems: 1
shunt-resistor-micro-ohms:
- description: The value of curent sense resistor in microohms.
+ description: The value of current sense resistor in microohms.
default: 255000
minimum: 250000
maximum: 255000
diff --git a/sys/contrib/device-tree/Bindings/i2c/cdns,i2c-r1p10.yaml b/sys/contrib/device-tree/Bindings/i2c/cdns,i2c-r1p10.yaml
index ff57c5416ebc..9f1d35ce1fe8 100644
--- a/sys/contrib/device-tree/Bindings/i2c/cdns,i2c-r1p10.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/cdns,i2c-r1p10.yaml
@@ -48,6 +48,9 @@ properties:
default: 16
enum: [2, 4, 8, 16, 32, 64, 128, 256]
+ power-domains:
+ maxItems: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-arb-gpio-challenge.yaml b/sys/contrib/device-tree/Bindings/i2c/i2c-arb-gpio-challenge.yaml
new file mode 100644
index 000000000000..b618b5a3433a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-arb-gpio-challenge.yaml
@@ -0,0 +1,135 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-arb-gpio-challenge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism
+
+maintainers:
+ - Doug Anderson <dianders@chromium.org>
+ - Peter Rosin <peda@axentia.se>
+
+description: |
+ This uses GPIO lines and a challenge & response mechanism to arbitrate who is
+ the master of an I2C bus in a multimaster situation.
+
+ In many cases using GPIOs to arbitrate is not needed and a design can use the
+ standard I2C multi-master rules. Using GPIOs is generally useful in the case
+ where there is a device on the bus that has errata and/or bugs that makes
+ standard multimaster mode not feasible.
+
+ Note that this scheme works well enough but has some downsides:
+ * It is nonstandard (not using standard I2C multimaster)
+ * Having two masters on a bus in general makes it relatively hard to debug
+ problems (hard to tell if i2c issues were caused by one master, another,
+ or some device on the bus).
+
+ Algorithm:
+ All masters on the bus have a 'bus claim' line which is an output that the
+ others can see. These are all active low with pull-ups enabled. We'll
+ describe these lines as:
+ * OUR_CLAIM: output from us signaling to other hosts that we want the bus
+ * THEIR_CLAIMS: output from others signaling that they want the bus
+
+ The basic algorithm is to assert your line when you want the bus, then make
+ sure that the other side doesn't want it also. A detailed explanation is
+ best done with an example.
+
+ Let's say we want to claim the bus. We:
+ 1. Assert OUR_CLAIM.
+ 2. Waits a little bit for the other sides to notice (slew time, say 10
+ microseconds).
+ 3. Check THEIR_CLAIMS. If none are asserted then the we have the bus and we
+ are done.
+ 4. Otherwise, wait for a few milliseconds and see if THEIR_CLAIMS are released.
+ 5. If not, back off, release the claim and wait for a few more milliseconds.
+ 6. Go back to 1 (until retry time has expired).
+
+properties:
+ compatible:
+ const: i2c-arb-gpio-challenge
+
+ i2c-parent:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The I2C bus that this multiplexer's master-side port is connected to.
+
+ our-claim-gpios:
+ maxItems: 1
+ description:
+ The GPIO that we use to claim the bus.
+
+ slew-delay-us:
+ default: 10
+ description:
+ Time to wait for a GPIO to go high.
+
+ their-claim-gpios:
+ minItems: 1
+ maxItems: 8
+ description:
+ The GPIOs that the other sides use to claim the bus. Note that some
+ implementations may only support a single other master.
+
+ wait-free-us:
+ default: 50000
+ description:
+ We'll give up after this many microseconds.
+
+ wait-retry-us:
+ default: 3000
+ description:
+ We'll attempt another claim after this many microseconds.
+
+ i2c-arb:
+ type: object
+ $ref: /schemas/i2c/i2c-controller.yaml
+ unevaluatedProperties: false
+ description:
+ I2C arbitration bus node.
+
+required:
+ - compatible
+ - i2c-arb
+ - our-claim-gpios
+ - their-claim-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c-arbitrator {
+ compatible = "i2c-arb-gpio-challenge";
+ i2c-parent = <&i2c_4>;
+
+ our-claim-gpios = <&gpf0 3 GPIO_ACTIVE_LOW>;
+ their-claim-gpios = <&gpe0 4 GPIO_ACTIVE_LOW>;
+ slew-delay-us = <10>;
+ wait-retry-us = <3000>;
+ wait-free-us = <50000>;
+
+ i2c-arb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sbs-battery@b {
+ compatible = "sbs,sbs-battery";
+ reg = <0xb>;
+ sbs,poll-retry-count = <1>;
+ };
+
+ embedded-controller@1e {
+ compatible = "google,cros-ec-i2c";
+ reg = <0x1e>;
+ interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&gpx1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ec_irq>;
+ wakeup-source;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-atr.yaml b/sys/contrib/device-tree/Bindings/i2c/i2c-atr.yaml
new file mode 100644
index 000000000000..1939ab339bfc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-atr.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-atr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common i2c address translator properties
+
+maintainers:
+ - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+
+description:
+ An I2C Address Translator (ATR) is a device with an I2C slave parent
+ ("upstream") port and N I2C master child ("downstream") ports, and
+ forwards transactions from upstream to the appropriate downstream port
+ with a modified slave address. The address used on the parent bus is
+ called the "alias" and is (potentially) different from the physical
+ slave address of the child bus. Address translation is done by the
+ hardware.
+
+properties:
+ i2c-alias-pool:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ I2C alias pool is a pool of I2C addresses on the main I2C bus that can be
+ used to access the remote peripherals on the serializer's I2C bus. The
+ addresses must be available, not used by any other peripheral. Each
+ remote peripheral is assigned an alias from the pool, and transactions to
+ that address will be forwarded to the remote peripheral, with the address
+ translated to the remote peripheral's real address. This property is not
+ needed if there are no I2C addressable remote peripherals.
+
+additionalProperties: true
+...
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-demux-pinctrl.yaml b/sys/contrib/device-tree/Bindings/i2c/i2c-demux-pinctrl.yaml
new file mode 100644
index 000000000000..2c08f2a7cf1e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-demux-pinctrl.yaml
@@ -0,0 +1,172 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-demux-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pinctrl-based I2C Bus Demultiplexer
+
+maintainers:
+ - Wolfram Sang <wsa+renesas@sang-engineering.com>
+
+description: |
+ This binding describes an I2C bus demultiplexer that uses pin multiplexing to
+ route the I2C signals, and represents the pin multiplexing configuration
+ using the pinctrl device tree bindings. This may be used to select one I2C
+ IP core at runtime which may have a better feature set for a given task than
+ another I2C IP core on the SoC. The most simple example is to fall back to
+ GPIO bitbanging if your current runtime configuration hits an errata of the
+ internal IP core.
+
+ +-------------------------------+
+ | SoC |
+ | | +-----+ +-----+
+ | +------------+ | | dev | | dev |
+ | |I2C IP Core1|--\ | +-----+ +-----+
+ | +------------+ \-------+ | | |
+ | |Pinctrl|--|------+--------+
+ | +------------+ +-------+ |
+ | |I2C IP Core2|--/ |
+ | +------------+ |
+ | |
+ +-------------------------------+
+
+allOf:
+ - $ref: i2c-mux.yaml
+ - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+ compatible:
+ const: i2c-demux-pinctrl
+
+ i2c-parent:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ List of phandles of I2C masters available for selection. The first one
+ will be used as default.
+
+ i2c-bus-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ The name of this bus. Also needed as pinctrl-name for the I2C parents.
+
+required:
+ - compatible
+ - i2c-parent
+ - i2c-bus-name
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ gpioi2c2: i2c-9 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "i2c-gpio";
+ scl-gpios = <&gpio5 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio5 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <5>;
+
+ // The I2C controller must have its status "disabled". The I2C bus
+ // demultiplexer will enable it at runtime when needed.
+ status = "disabled";
+ };
+
+ iic2: i2c@e6520000 {
+ reg = <0xe6520000 0x425>;
+ pinctrl-0 = <&iic2_pins>;
+ // The pinctrl property for the parent I2C controller needs a pinctrl
+ // state with the same name as i2c-bus-name in the I2C bus demultiplexer
+ // node, not "default"!
+ pinctrl-names = "i2c-hdmi";
+
+ clock-frequency = <100000>;
+
+ // The I2C controller must have its status "disabled". The I2C bus
+ // demultiplexer will enable it at runtime when needed.
+ status = "disabled";
+ };
+
+ i2c2: i2c@e6530000 {
+ reg = <0 0xe6530000 0 0x40>;
+ pinctrl-0 = <&i2c2_pins>;
+ // The pinctrl property for the parent I2C controller needs a pinctrl
+ // state with the same name as i2c-bus-name in the I2C bus demultiplexer
+ // node, not "default"!
+ pinctrl-names = "i2c-hdmi";
+
+ clock-frequency = <100000>;
+
+ // The I2C controller must have its status "disabled". The I2C bus
+ // demultiplexer will enable it at runtime when needed.
+ status = "disabled";
+ };
+
+ // Example for a bus to be demuxed. It contains various I2C clients for
+ // HDMI, so the bus is named "i2c-hdmi":
+ i2chdmi: i2c-mux3 {
+ compatible = "i2c-demux-pinctrl";
+ i2c-parent = <&iic2>, <&i2c2>, <&gpioi2c2>;
+ i2c-bus-name = "i2c-hdmi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ak4643: codec@12 {
+ compatible = "asahi-kasei,ak4643";
+ #sound-dai-cells = <0>;
+ reg = <0x12>;
+ };
+
+ composite-in@20 {
+ compatible = "adi,adv7180";
+ reg = <0x20>;
+
+ port {
+ adv7180: endpoint {
+ bus-width = <8>;
+ remote-endpoint = <&vin1ep0>;
+ };
+ };
+ };
+
+ hdmi@39 {
+ compatible = "adi,adv7511w";
+ reg = <0x39>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&cec_clock>;
+ clock-names = "cec";
+
+ avdd-supply = <&fixedregulator1v8>;
+ dvdd-supply = <&fixedregulator1v8>;
+ pvdd-supply = <&fixedregulator1v8>;
+ dvdd-3v-supply = <&fixedregulator3v3>;
+ bgvdd-supply = <&fixedregulator1v8>;
+
+ adi,input-depth = <8>;
+ adi,input-colorspace = "rgb";
+ adi,input-clock = "1x";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ adv7511_in: endpoint {
+ remote-endpoint = <&lvds0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ adv7511_out: endpoint {
+ remote-endpoint = <&hdmi_con_out>;
+ };
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-exynos5.yaml b/sys/contrib/device-tree/Bindings/i2c/i2c-exynos5.yaml
index 3e52a0db6c41..df9c57bca2a8 100644
--- a/sys/contrib/device-tree/Bindings/i2c/i2c-exynos5.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-exynos5.yaml
@@ -25,7 +25,16 @@ properties:
- samsung,exynos5250-hsi2c # Exynos5250 and Exynos5420
- samsung,exynos5260-hsi2c # Exynos5260
- samsung,exynos7-hsi2c # Exynos7
- - samsung,exynosautov9-hsi2c # ExynosAutoV9 and Exynos850
+ - samsung,exynosautov9-hsi2c
+ - items:
+ - enum:
+ - samsung,exynos5433-hsi2c
+ - tesla,fsd-hsi2c
+ - const: samsung,exynos7-hsi2c
+ - items:
+ - enum:
+ - samsung,exynos850-hsi2c
+ - const: samsung,exynosautov9-hsi2c
- const: samsung,exynos5-hsi2c # Exynos5250 and Exynos5420
deprecated: true
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-mux-pca954x.yaml b/sys/contrib/device-tree/Bindings/i2c/i2c-mux-pca954x.yaml
index 9f1726d0356b..2d7bb998b0e9 100644
--- a/sys/contrib/device-tree/Bindings/i2c/i2c-mux-pca954x.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-mux-pca954x.yaml
@@ -4,21 +4,29 @@
$id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: NXP PCA954x I2C bus switch
+title: NXP PCA954x I2C and compatible bus switches
maintainers:
- Laurent Pinchart <laurent.pinchart@ideasonboard.com>
description:
- The binding supports NXP PCA954x and PCA984x I2C mux/switch devices.
-
-allOf:
- - $ref: /schemas/i2c/i2c-mux.yaml#
+ The NXP PCA954x and compatible devices are I2C bus
+ multiplexer/switches that share the same functionality
+ and register layout.
+ The devices usually have 4 or 8 child buses, which are
+ attached to the parent bus by using the SMBus "Send Byte"
+ command.
properties:
compatible:
oneOf:
- enum:
+ - maxim,max7356
+ - maxim,max7357
+ - maxim,max7358
+ - maxim,max7367
+ - maxim,max7368
+ - maxim,max7369
- nxp,pca9540
- nxp,pca9542
- nxp,pca9543
@@ -59,10 +67,34 @@ properties:
description: if present, overrides i2c-mux-idle-disconnect
$ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
+ vdd-supply:
+ description: A voltage regulator supplying power to the chip. On PCA9846
+ the regulator supplies power to VDD2 (core logic) and optionally to VDD1.
+
required:
- compatible
- reg
+allOf:
+ - $ref: /schemas/i2c/i2c-mux.yaml#
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - maxim,max7367
+ - maxim,max7369
+ - nxp,pca9542
+ - nxp,pca9543
+ - nxp,pca9544
+ - nxp,pca9545
+ then:
+ properties:
+ interrupts: false
+ "#interrupt-cells": false
+ interrupt-controller: false
+
unevaluatedProperties: false
examples:
@@ -74,11 +106,13 @@ examples:
#size-cells = <0>;
i2c-mux@74 {
- compatible = "nxp,pca9548";
+ compatible = "nxp,pca9545";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x74>;
+ vdd-supply = <&p3v3>;
+
interrupt-parent = <&ipic>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-mxs.yaml b/sys/contrib/device-tree/Bindings/i2c/i2c-mxs.yaml
index 21ae7bce038e..171a41407241 100644
--- a/sys/contrib/device-tree/Bindings/i2c/i2c-mxs.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-mxs.yaml
@@ -9,6 +9,9 @@ title: Freescale MXS Inter IC (I2C) Controller
maintainers:
- Shawn Guo <shawnguo@kernel.org>
+allOf:
+ - $ref: /schemas/i2c/i2c-controller.yaml#
+
properties:
compatible:
enum:
@@ -37,7 +40,7 @@ required:
- dmas
- dma-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/i2c/i2c-sprd.txt b/sys/contrib/device-tree/Bindings/i2c/i2c-sprd.txt
index 60b7cda15dd2..7b6b3b8d0d11 100644
--- a/sys/contrib/device-tree/Bindings/i2c/i2c-sprd.txt
+++ b/sys/contrib/device-tree/Bindings/i2c/i2c-sprd.txt
@@ -10,7 +10,7 @@ Required properties:
"source" for I2C source (parent) clock,
"enable" for I2C module enable clock.
- clocks: Should contain a clock specifier for each entry in clock-names.
-- clock-frequency: Constains desired I2C bus clock frequency in Hz.
+- clock-frequency: Contains desired I2C bus clock frequency in Hz.
- #address-cells: Should be 1 to describe address cells for I2C device address.
- #size-cells: Should be 0 means no size cell for I2C device address.
diff --git a/sys/contrib/device-tree/Bindings/i2c/nxp,pca9541.yaml b/sys/contrib/device-tree/Bindings/i2c/nxp,pca9541.yaml
new file mode 100644
index 000000000000..b65c25c1a435
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/i2c/nxp,pca9541.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/nxp,pca9541.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCA9541 I2C bus master selector
+
+maintainers:
+ - Peter Rosin <peda@axentia.se>
+
+properties:
+ compatible:
+ const: nxp,pca9541
+
+ reg:
+ maxItems: 1
+
+ i2c-arb:
+ type: object
+ $ref: /schemas/i2c/i2c-controller.yaml
+ unevaluatedProperties: false
+ description:
+ I2C arbitration bus node.
+
+required:
+ - compatible
+ - reg
+ - i2c-arb
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c-arbitrator@74 {
+ compatible = "nxp,pca9541";
+ reg = <0x74>;
+
+ i2c-arb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@54 {
+ compatible = "atmel,24c08";
+ reg = <0x54>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/i2c/qcom,i2c-cci.yaml b/sys/contrib/device-tree/Bindings/i2c/qcom,i2c-cci.yaml
index ec79b7270437..8386cfe21532 100644
--- a/sys/contrib/device-tree/Bindings/i2c/qcom,i2c-cci.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/qcom,i2c-cci.yaml
@@ -25,6 +25,7 @@ properties:
- items:
- enum:
+ - qcom,sc7280-cci
- qcom,sdm845-cci
- qcom,sm6350-cci
- qcom,sm8250-cci
@@ -159,6 +160,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,sc7280-cci
- qcom,sm8250-cci
- qcom,sm8450-cci
then:
@@ -269,6 +271,7 @@ examples:
port {
ov7251_ep: endpoint {
data-lanes = <0 1>;
+ link-frequencies = /bits/ 64 <240000000 319200000>;
remote-endpoint = <&csiphy3_ep>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/i2c/samsung,s3c2410-i2c.yaml b/sys/contrib/device-tree/Bindings/i2c/samsung,s3c2410-i2c.yaml
index b204e35e4f8d..1303502cf265 100644
--- a/sys/contrib/device-tree/Bindings/i2c/samsung,s3c2410-i2c.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/samsung,s3c2410-i2c.yaml
@@ -11,14 +11,20 @@ maintainers:
properties:
compatible:
- enum:
- - samsung,s3c2410-i2c
- - samsung,s3c2440-i2c
- # For s3c2440-like I2C used inside HDMIPHY block found on several SoCs:
- - samsung,s3c2440-hdmiphy-i2c
- # For s3c2440-like I2C used as a host to SATA PHY controller on an
- # internal bus:
- - samsung,exynos5-sata-phy-i2c
+ oneOf:
+ - enum:
+ - samsung,s3c2410-i2c
+ - samsung,s3c2440-i2c
+ # For s3c2440-like I2C used inside HDMIPHY block found on several SoCs:
+ - samsung,s3c2440-hdmiphy-i2c
+ # For s3c2440-like I2C used as a host to SATA PHY controller on an
+ # internal bus:
+ - samsung,exynos5-sata-phy-i2c
+ - items:
+ - enum:
+ - samsung,exynos7885-i2c
+ - samsung,exynos850-i2c
+ - const: samsung,s3c2440-i2c
'#address-cells':
const: 1
diff --git a/sys/contrib/device-tree/Bindings/i2c/st,stm32-i2c.yaml b/sys/contrib/device-tree/Bindings/i2c/st,stm32-i2c.yaml
index 94b75d9f66cd..1b31b87c1800 100644
--- a/sys/contrib/device-tree/Bindings/i2c/st,stm32-i2c.yaml
+++ b/sys/contrib/device-tree/Bindings/i2c/st,stm32-i2c.yaml
@@ -19,6 +19,7 @@ allOf:
- st,stm32f7-i2c
- st,stm32mp13-i2c
- st,stm32mp15-i2c
+ - st,stm32mp25-i2c
then:
properties:
i2c-scl-rising-time-ns:
@@ -41,6 +42,30 @@ allOf:
clock-frequency:
enum: [100000, 400000]
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,stm32f4-i2c
+ - st,stm32f7-i2c
+ - st,stm32mp13-i2c
+ - st,stm32mp15-i2c
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+
+ interrupt-names:
+ minItems: 2
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ maxItems: 1
+
properties:
compatible:
enum:
@@ -48,6 +73,7 @@ properties:
- st,stm32f7-i2c
- st,stm32mp13-i2c
- st,stm32mp15-i2c
+ - st,stm32mp25-i2c
reg:
maxItems: 1
@@ -56,11 +82,13 @@ properties:
items:
- description: interrupt ID for I2C event
- description: interrupt ID for I2C error
+ minItems: 1
interrupt-names:
items:
- const: event
- const: error
+ minItems: 1
resets:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/i3c/i3c.yaml b/sys/contrib/device-tree/Bindings/i3c/i3c.yaml
index fdb4212149e7..c816e295d565 100644
--- a/sys/contrib/device-tree/Bindings/i3c/i3c.yaml
+++ b/sys/contrib/device-tree/Bindings/i3c/i3c.yaml
@@ -55,6 +55,12 @@ properties:
May not be supported by all controllers.
+ mctp-controller:
+ type: boolean
+ description: |
+ Indicates that the system is accessible via this bus as an endpoint for
+ MCTP over I3C transport.
+
required:
- "#address-cells"
- "#size-cells"
@@ -119,12 +125,12 @@ patternProperties:
minimum: 0
maximum: 0x7f
- description: |
- First half of the Provisional ID (following the PID
+ First half of the Provisioned ID (following the PID
definition provided by the I3C specification).
Contains the manufacturer ID left-shifted by 1.
- description: |
- Second half of the Provisional ID (following the PID
+ Second half of the Provisioned ID (following the PID
definition provided by the I3C specification).
Contains the ORing of the part ID left-shifted by 16,
@@ -135,9 +141,10 @@ patternProperties:
minimum: 0x1
maximum: 0xff
description: |
- Dynamic address to be assigned to this device. This property is only
- valid if the I3C device has a static address (first cell of the reg
- property != 0).
+ Dynamic address to be assigned to this device. In case static address is
+ present (first cell of the reg property != 0), this address is assigned
+ through SETDASA. If static address is not present, this address is assigned
+ through SETNEWDA after assigning a temporary address via ENTDAA.
required:
- reg
@@ -163,12 +170,18 @@ examples:
pagesize = <0x8>;
};
- /* I3C device with a static I2C address. */
+ /* I3C device with a static I2C address and assigned address. */
thermal_sensor: sensor@68,39200144004 {
reg = <0x68 0x392 0x144004>;
assigned-address = <0xa>;
};
+ /* I3C device with only assigned address. */
+ pressure_sensor: sensor@0,39200124004 {
+ reg = <0x0 0x392 0x124000>;
+ assigned-address = <0xc>;
+ };
+
/*
* I3C device without a static I2C address but requiring
* resources described in the DT.
diff --git a/sys/contrib/device-tree/Bindings/i3c/mipi-i3c-hci.yaml b/sys/contrib/device-tree/Bindings/i3c/mipi-i3c-hci.yaml
index c002afdbfc7c..5dda8cb44cdb 100644
--- a/sys/contrib/device-tree/Bindings/i3c/mipi-i3c-hci.yaml
+++ b/sys/contrib/device-tree/Bindings/i3c/mipi-i3c-hci.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/i3c/mipi-i3c-hci.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/i3c/mipi-i3c-hci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MIPI I3C HCI
diff --git a/sys/contrib/device-tree/Bindings/iio/accel/fsl,mma7455.yaml b/sys/contrib/device-tree/Bindings/iio/accel/fsl,mma7455.yaml
index c8659c5eba2a..cb31e75ba680 100644
--- a/sys/contrib/device-tree/Bindings/iio/accel/fsl,mma7455.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/accel/fsl,mma7455.yaml
@@ -36,8 +36,8 @@ properties:
maxItems: 2
items:
enum:
- - "INT1"
- - "INT2"
+ - INT1
+ - INT2
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/iio/accel/kionix,kx022a.yaml b/sys/contrib/device-tree/Bindings/iio/accel/kionix,kx022a.yaml
index 986df1a6ff0a..66ea894dbe55 100644
--- a/sys/contrib/device-tree/Bindings/iio/accel/kionix,kx022a.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/accel/kionix,kx022a.yaml
@@ -4,19 +4,23 @@
$id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: ROHM/Kionix KX022A Accelerometer
+title: ROHM/Kionix KX022A, KX132-1211 and KX132ACR-LBZ Accelerometers
maintainers:
- Matti Vaittinen <mazziesaccount@gmail.com>
description: |
- KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges,
- output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering.
- KX022A can be accessed either via I2C or SPI.
+ KX022A, KX132ACR-LBZ and KX132-1211 are 3-axis accelerometers supporting
+ +/- 2G, 4G, 8G and 16G ranges, variable output data-rates and a
+ hardware-fifo buffering. These accelerometers can be accessed either
+ via I2C or SPI.
properties:
compatible:
- const: kionix,kx022a
+ enum:
+ - kionix,kx022a
+ - kionix,kx132-1211
+ - rohm,kx132acr-lbz
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7091r5.yaml b/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7091r5.yaml
index ce7ba634643c..ddec9747436c 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7091r5.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7091r5.yaml
@@ -4,36 +4,92 @@
$id: http://devicetree.org/schemas/iio/adc/adi,ad7091r5.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Analog Devices AD7091R5 4-Channel 12-Bit ADC
+title: Analog Devices AD7091R-2/-4/-5/-8 Multi-Channel 12-Bit ADCs
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
+ - Marcelo Schmitt <marcelo.schmitt@analog.com>
description: |
- Analog Devices AD7091R5 4-Channel 12-Bit ADC
+ Analog Devices AD7091R5 4-Channel 12-Bit ADC supporting I2C interface
https://www.analog.com/media/en/technical-documentation/data-sheets/ad7091r-5.pdf
+ Analog Devices AD7091R-2/AD7091R-4/AD7091R-8 2-/4-/8-Channel 12-Bit ADCs
+ supporting SPI interface
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD7091R-2_7091R-4_7091R-8.pdf
properties:
compatible:
enum:
+ - adi,ad7091r2
+ - adi,ad7091r4
- adi,ad7091r5
+ - adi,ad7091r8
reg:
maxItems: 1
+ vdd-supply:
+ description:
+ Provide VDD power to the sensor (VDD range is from 2.7V to 5.25V).
+
+ vdrive-supply:
+ description:
+ Determines the voltage level at which the interface logic will operate.
+ The V_drive voltage range is from 1.8V to 5.25V and must not exceed VDD by
+ more than 0.3V.
+
vref-supply:
description:
Phandle to the vref power supply
- interrupts:
+ convst-gpios:
+ description:
+ GPIO connected to the CONVST pin.
+ This logic input is used to initiate conversions on the analog
+ input channels.
maxItems: 1
+ reset-gpios:
+ maxItems: 1
+
+ interrupts:
+ description:
+ Interrupt for signaling when conversion results exceed the high limit for
+ ADC readings or fall below the low limit for them. Interrupt source must
+ be attached to ALERT/BUSY/GPO0 pin.
+ maxItems: 1
required:
- compatible
- reg
-additionalProperties: false
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+ # AD7091R-2 does not have ALERT/BUSY/GPO pin
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad7091r2
+ then:
+ properties:
+ interrupts: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad7091r2
+ - adi,ad7091r4
+ - adi,ad7091r8
+ then:
+ required:
+ - convst-gpios
+
+unevaluatedProperties: false
examples:
- |
@@ -51,4 +107,22 @@ examples:
interrupt-parent = <&gpio>;
};
};
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@0 {
+ compatible = "adi,ad7091r8";
+ reg = <0x0>;
+ spi-max-frequency = <1000000>;
+ vref-supply = <&adc_vref>;
+ convst-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ interrupts = <22 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio>;
+ };
+ };
...
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7292.yaml b/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7292.yaml
index 7cc4ddc4e9b7..2aa1f4b063eb 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7292.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7292.yaml
@@ -61,7 +61,7 @@ patternProperties:
required:
- reg
- additionalProperties: true
+ additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7780.yaml b/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7780.yaml
index 5fcc8dd012f1..be2616ff9af6 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7780.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7780.yaml
@@ -80,9 +80,9 @@ examples:
compatible = "adi,ad7780";
reg = <0>;
- avdd-supply = <&vdd_supply>;
- powerdown-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- adi,gain-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ avdd-supply = <&vdd_supply>;
+ powerdown-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ adi,gain-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
adi,filter-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
new file mode 100644
index 000000000000..7ef46c90ebc8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/allwinner,sun20i-d1-gpadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner D1 General Purpose ADC
+
+maintainers:
+ - Maksim Kiselev <bigunclemax@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - allwinner,sun20i-d1-gpadc
+
+ "#io-channel-cells":
+ const: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ clocks:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reg:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+patternProperties:
+ "^channel@[0-9a-f]+$":
+ $ref: adc.yaml
+ type: object
+ description:
+ Represents the internal channels of the ADC.
+
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 15
+
+ required:
+ - reg
+
+ unevaluatedProperties: false
+
+required:
+ - "#io-channel-cells"
+ - clocks
+ - compatible
+ - interrupts
+ - reg
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/sun20i-d1-ccu.h>
+ #include <dt-bindings/reset/sun20i-d1-ccu.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ gpadc: adc@2009000 {
+ compatible = "allwinner,sun20i-d1-gpadc";
+ reg = <0x2009000 0x400>;
+ clocks = <&ccu CLK_BUS_GPADC>;
+ resets = <&ccu RST_BUS_GPADC>;
+ interrupts = <73 IRQ_TYPE_LEVEL_HIGH>;
+ #io-channel-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ reg = <0>;
+ };
+
+ channel@1 {
+ reg = <1>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/atmel,sama9260-adc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/atmel,sama9260-adc.yaml
index e6a1f915b542..1f30a8569187 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/atmel,sama9260-adc.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/atmel,sama9260-adc.yaml
@@ -56,8 +56,8 @@ properties:
String corresponding to an identifier from atmel,adc-res-names property.
If not specified, the highest resolution will be used.
enum:
- - "lowres"
- - "highres"
+ - lowres
+ - highres
atmel,adc-sleep-mode:
$ref: /schemas/types.yaml#/definitions/flag
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/lltc,ltc2497.yaml b/sys/contrib/device-tree/Bindings/iio/adc/lltc,ltc2497.yaml
index 875f394576c2..5cc6a9684077 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/lltc,ltc2497.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/lltc,ltc2497.yaml
@@ -4,21 +4,31 @@
$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2497.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Linear Technology / Analog Devices LTC2497 ADC
+title: Linear Technology / Analog Devices LTC2497 and LTC2309 ADC
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
+ - Liam Beguin <liambeguin@gmail.com>
description: |
- 16bit ADC supporting up to 16 single ended or 8 differential inputs.
- I2C interface.
+ LTC2309:
+ low noise, low power, 8-channel, 12-bit successive approximation ADC with an
+ I2C compatible serial interface.
- https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
- https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/2309fd.pdf
+
+ LTC2497:
+ LTC2499:
+ 16bit ADC supporting up to 16 single ended or 8 differential inputs.
+ I2C interface.
+
+ https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
properties:
compatible:
enum:
+ - lltc,ltc2309
- lltc,ltc2497
- lltc,ltc2499
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/maxim,max34408.yaml b/sys/contrib/device-tree/Bindings/iio/adc/maxim,max34408.yaml
new file mode 100644
index 000000000000..4cba856e8d47
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/adc/maxim,max34408.yaml
@@ -0,0 +1,139 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/maxim,max34408.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX34408/MAX34409 current monitors with overcurrent control
+
+maintainers:
+ - Ivan Mikhaylov <fr0st61te@gmail.com>
+
+description: |
+ The MAX34408/MAX34409 are two- and four-channel current monitors that are
+ configured and monitored with a standard I2C/SMBus serial interface. Each
+ unidirectional current sensor offers precision high-side operation with a
+ low full-scale sense voltage. The devices automatically sequence through
+ two or four channels and collect the current-sense samples and average them
+ to reduce the effect of impulse noise. The raw ADC samples are compared to
+ user-programmable digital thresholds to indicate overcurrent conditions.
+ Overcurrent conditions trigger a hardware output to provide an immediate
+ indication to shut down any necessary external circuitry.
+
+ Specifications about the devices can be found at:
+ https://www.analog.com/media/en/technical-documentation/data-sheets/MAX34408-MAX34409.pdf
+
+properties:
+ compatible:
+ enum:
+ - maxim,max34408
+ - maxim,max34409
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ powerdown-gpios:
+ description:
+ Shutdown Output. Open-drain output. This output transitions to high impedance
+ when any of the digital comparator thresholds are exceeded as long as the ENA
+ pin is high.
+ maxItems: 1
+
+ powerdown-status-gpios:
+ description:
+ SHTDN Enable Input. CMOS digital input. Connect to GND to clear the latch and
+ unconditionally deassert (force low) the SHTDN output and reset the shutdown
+ delay. Connect to VDD to enable normal latch operation of the SHTDN output.
+ maxItems: 1
+
+ vdd-supply: true
+
+patternProperties:
+ "^channel@[0-3]$":
+ $ref: adc.yaml
+ type: object
+ description:
+ Represents the internal channels of the ADC.
+
+ properties:
+ reg:
+ items:
+ - minimum: 0
+ maximum: 3
+
+ maxim,rsense-val-micro-ohms:
+ description:
+ Adjust the Rsense value to monitor higher or lower current levels for
+ input.
+ enum: [250, 500, 1000, 5000, 10000, 50000, 100000, 200000, 500000]
+ default: 1000
+
+ required:
+ - reg
+ - maxim,rsense-val-micro-ohms
+
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: maxim,max34408
+ then:
+ patternProperties:
+ "^channel@[2-3]$": false
+ "^channel@[0-1]$":
+ properties:
+ reg:
+ maximum: 1
+ else:
+ patternProperties:
+ "^channel@[0-3]$":
+ properties:
+ reg:
+ maximum: 3
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@1e {
+ compatible = "maxim,max34409";
+ reg = <0x1e>;
+ powerdown-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ powerdown-status-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ reg = <0x0>;
+ maxim,rsense-val-micro-ohms = <5000>;
+ };
+
+ channel@1 {
+ reg = <0x1>;
+ maxim,rsense-val-micro-ohms = <10000>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3564.yaml b/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3564.yaml
new file mode 100644
index 000000000000..675319276197
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3564.yaml
@@ -0,0 +1,205 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/microchip,mcp3564.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP346X and MCP356X ADC Family
+
+maintainers:
+ - Marius Cristea <marius.cristea@microchip.com>
+
+description: |
+ Bindings for the Microchip family of 153.6 ksps, Low-Noise 16/24-Bit
+ Delta-Sigma ADCs with an SPI interface. Datasheet can be found here:
+ Datasheet for MCP3561, MCP3562, MCP3564 can be found here:
+ https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP3561-2-4-Family-Data-Sheet-DS20006181C.pdf
+ Datasheet for MCP3561R, MCP3562R, MCP3564R can be found here:
+ https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3561_2_4R-Data-Sheet-DS200006391C.pdf
+ Datasheet for MCP3461, MCP3462, MCP3464 can be found here:
+ https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4-Two-Four-Eight-Channel-153.6-ksps-Low-Noise-16-Bit-Delta-Sigma-ADC-Data-Sheet-20006180D.pdf
+ Datasheet for MCP3461R, MCP3462R, MCP3464R can be found here:
+ https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4R-Family-Data-Sheet-DS20006404C.pdf
+
+properties:
+ compatible:
+ enum:
+ - microchip,mcp3461
+ - microchip,mcp3462
+ - microchip,mcp3464
+ - microchip,mcp3461r
+ - microchip,mcp3462r
+ - microchip,mcp3464r
+ - microchip,mcp3561
+ - microchip,mcp3562
+ - microchip,mcp3564
+ - microchip,mcp3561r
+ - microchip,mcp3562r
+ - microchip,mcp3564r
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 20000000
+
+ spi-cpha: true
+
+ spi-cpol: true
+
+ vdd-supply: true
+
+ avdd-supply: true
+
+ clocks:
+ description:
+ Phandle and clock identifier for external sampling clock.
+ If not specified, the internal crystal oscillator will be used.
+ maxItems: 1
+
+ interrupts:
+ description: IRQ line of the ADC
+ maxItems: 1
+
+ drive-open-drain:
+ description:
+ Whether to drive the IRQ signal as push-pull (default) or open-drain. Note
+ that the device requires this pin to become "high", otherwise it will stop
+ converting.
+ type: boolean
+
+ vref-supply:
+ description:
+ Some devices have a specific reference voltage supplied on a different
+ pin to the other supplies. Needed to be able to establish channel scaling
+ unless there is also an internal reference available (e.g. mcp3564r). In
+ case of "r" devices (e. g. mcp3564r), if it does not exists the internal
+ reference will be used.
+
+ microchip,hw-device-address:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 3
+ description:
+ The address is set on a per-device basis by fuses in the factory,
+ configured on request. If not requested, the fuses are set for 0x1.
+ The device address is part of the device markings to avoid
+ potential confusion. This address is coded on two bits, so four possible
+ addresses are available when multiple devices are present on the same
+ SPI bus with only one Chip Select line for all devices.
+ Each device communication starts by a CS falling edge, followed by the
+ clocking of the device address (BITS[7:6] - top two bits of COMMAND BYTE
+ which is first one on the wire).
+
+ "#io-channel-cells":
+ const: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^channel@([0-9]|([1-7][0-9]))$":
+ $ref: adc.yaml
+ type: object
+ unevaluatedProperties: false
+ description: Represents the external channels which are connected to the ADC.
+
+ properties:
+ reg:
+ description: The channel number in single-ended and differential mode.
+ minimum: 0
+ maximum: 79
+
+ required:
+ - reg
+
+dependencies:
+ spi-cpol: [ spi-cpha ]
+ spi-cpha: [ spi-cpol ]
+
+required:
+ - compatible
+ - reg
+ - microchip,hw-device-address
+ - spi-max-frequency
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - # External vref, no internal reference
+ if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,mcp3461
+ - microchip,mcp3462
+ - microchip,mcp3464
+ - microchip,mcp3561
+ - microchip,mcp3562
+ - microchip,mcp3564
+ then:
+ required:
+ - vref-supply
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@0 {
+ compatible = "microchip,mcp3564r";
+ reg = <0>;
+ vref-supply = <&vref_reg>;
+ spi-cpha;
+ spi-cpol;
+ spi-max-frequency = <10000000>;
+ microchip,hw-device-address = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ /* CH0 to AGND */
+ reg = <0>;
+ label = "CH0";
+ };
+
+ channel@1 {
+ /* CH1 to AGND */
+ reg = <1>;
+ label = "CH1";
+ };
+
+ /* diff-channels */
+ channel@11 {
+ reg = <11>;
+
+ /* CN0, CN1 */
+ diff-channels = <0 1>;
+ label = "CH0_CH1";
+ };
+
+ channel@22 {
+ reg = <0x22>;
+
+ /* CN1, CN2 */
+ diff-channels = <1 2>;
+ label = "CH1_CH3";
+ };
+
+ channel@23 {
+ reg = <0x23>;
+
+ /* CN1, CN3 */
+ diff-channels = <1 3>;
+ label = "CH1_CH3";
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3911.yaml b/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3911.yaml
index f7b3fde4115a..06951ec5f5da 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3911.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/microchip,mcp3911.yaml
@@ -18,7 +18,13 @@ description: |
properties:
compatible:
enum:
+ - microchip,mcp3910
- microchip,mcp3911
+ - microchip,mcp3912
+ - microchip,mcp3913
+ - microchip,mcp3914
+ - microchip,mcp3918
+ - microchip,mcp3919
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-iadc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-iadc.yaml
index 73def67fbe01..5ed893ef5c18 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-iadc.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-iadc.yaml
@@ -25,7 +25,7 @@ properties:
- const: qcom,spmi-iadc
reg:
- description: IADC base address and length in the SPMI PMIC register map
+ description: IADC base address in the SPMI PMIC register map
maxItems: 1
qcom,external-resistor-micro-ohms:
@@ -50,15 +50,17 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- spmi {
+
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
- pmic_iadc: adc@3600 {
+
+ adc@3600 {
compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
reg = <0x3600>;
interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
qcom,external-resistor-micro-ohms = <10000>;
- #io-channel-cells = <1>;
+ #io-channel-cells = <1>;
};
};
...
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-rradc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-rradc.yaml
index b3a626389870..f39bc92c2b99 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-rradc.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-rradc.yaml
@@ -43,9 +43,9 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- pmic_rradc: adc@4500 {
+ adc@4500 {
compatible = "qcom,pmi8998-rradc";
reg = <0x4500>;
- #io-channel-cells = <1>;
+ #io-channel-cells = <1>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-vadc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-vadc.yaml
index ad7d6fc49de5..40fa0710f1f0 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-vadc.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/qcom,spmi-vadc.yaml
@@ -236,11 +236,11 @@ additionalProperties: false
examples:
- |
- spmi {
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
- /* VADC node */
- pmic_vadc: adc@3100 {
+
+ adc@3100 {
compatible = "qcom,spmi-vadc";
reg = <0x3100>;
interrupts = <0x0 0x31 0x0 0x1>;
@@ -281,9 +281,10 @@ examples:
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spmi {
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
+
adc@3100 {
reg = <0x3100>;
compatible = "qcom,spmi-adc7";
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/samsung,exynos-adc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/samsung,exynos-adc.yaml
index 582d0a03b814..4e40f6bed5db 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/samsung,exynos-adc.yaml
@@ -11,18 +11,23 @@ maintainers:
properties:
compatible:
- enum:
- - samsung,exynos-adc-v1 # Exynos5250
- - samsung,exynos-adc-v2
- - samsung,exynos3250-adc
- - samsung,exynos4212-adc # Exynos4212 and Exynos4412
- - samsung,exynos7-adc
- - samsung,s3c2410-adc
- - samsung,s3c2416-adc
- - samsung,s3c2440-adc
- - samsung,s3c2443-adc
- - samsung,s3c6410-adc
- - samsung,s5pv210-adc
+ oneOf:
+ - enum:
+ - samsung,exynos-adc-v1 # Exynos5250
+ - samsung,exynos-adc-v2
+ - samsung,exynos3250-adc
+ - samsung,exynos4212-adc # Exynos4212 and Exynos4412
+ - samsung,exynos7-adc
+ - samsung,s3c2410-adc
+ - samsung,s3c2416-adc
+ - samsung,s3c2440-adc
+ - samsung,s3c2443-adc
+ - samsung,s3c6410-adc
+ - samsung,s5pv210-adc
+ - items:
+ - enum:
+ - samsung,exynos5433-adc
+ - const: samsung,exynos7-adc
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/ti,ads1015.yaml b/sys/contrib/device-tree/Bindings/iio/adc/ti,ads1015.yaml
index 2127d639a768..d605999ffe28 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/ti,ads1015.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/ti,ads1015.yaml
@@ -23,6 +23,9 @@ properties:
reg:
maxItems: 1
+ interrupts:
+ maxItems: 1
+
"#address-cells":
const: 1
@@ -78,9 +81,9 @@ patternProperties:
ti,datarate:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
- maximum: 6
+ maximum: 7
description: |
- Data acquisition rate in samples per second
+ Data acquisition rate in samples per second for ADS1015, TLA2024
0: 128
1: 250
2: 490
@@ -88,6 +91,17 @@ patternProperties:
4: 1600 (default)
5: 2400
6: 3300
+ 7: 3300
+
+ Data acquisition rate in samples per second for ADS1115
+ 0: 8
+ 1: 16
+ 2: 32
+ 3: 64
+ 4: 128 (default)
+ 5: 250
+ 6: 475
+ 7: 860
required:
- reg
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/ti,palmas-gpadc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/ti,palmas-gpadc.yaml
index 720c16a108d4..f94057d8f605 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/ti,palmas-gpadc.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/ti,palmas-gpadc.yaml
@@ -67,19 +67,4 @@ required:
- compatible
- "#io-channel-cells"
-examples:
- - |
- #include <dt-bindings/clock/mt8183-clk.h>
- pmic {
- compatible = "ti,twl6035-pmic", "ti,palmas-pmic";
- adc {
- compatible = "ti,palmas-gpadc";
- interrupts = <18 0>,
- <16 0>,
- <17 0>;
- #io-channel-cells = <1>;
- ti,channel0-current-microamp = <5>;
- ti,channel3-current-microamp = <10>;
- };
- };
...
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/ti,twl6030-gpadc.yaml b/sys/contrib/device-tree/Bindings/iio/adc/ti,twl6030-gpadc.yaml
new file mode 100644
index 000000000000..e779a8986e0b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/adc/ti,twl6030-gpadc.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,twl6030-gpadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPADC subsystem in the TWL6030 power module
+
+maintainers:
+ - Andreas Kemnade <andreas@kemnade.info>
+
+description:
+ The GPADC subsystem in the TWL603X consists of a 10-bit ADC
+ combined with a 15-input analog multiplexer in the TWL6030 resp. a
+ 19-input analog muliplexer in the TWL6032.
+
+properties:
+ compatible:
+ enum:
+ - ti,twl6030-gpadc
+ - ti,twl6032-gpadc
+
+ interrupts:
+ maxItems: 1
+
+ "#io-channel-cells":
+ const: 1
+
+required:
+ - compatible
+ - interrupts
+ - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ gpadc {
+ compatible = "ti,twl6030-gpadc";
+ interrupts = <3>;
+ #io-channel-cells = <1>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/iio/adc/xlnx,zynqmp-ams.yaml b/sys/contrib/device-tree/Bindings/iio/adc/xlnx,zynqmp-ams.yaml
index be93c109d6ac..8cbad7e792b6 100644
--- a/sys/contrib/device-tree/Bindings/iio/adc/xlnx,zynqmp-ams.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/adc/xlnx,zynqmp-ams.yaml
@@ -57,7 +57,7 @@ description: |
|27 |FPD Internal voltage measurement, VCC_PSINTFP (supply5). |Voltage
|28 |PS Auxiliary voltage measurement (supply6). |Voltage
|29 |PL VCCADC voltage measurement (vccams). |Voltage
- |30 |Differential analog input signal voltage measurment. |Voltage
+ |30 |Differential analog input signal voltage measurement. |Voltage
|31 |VUser0 voltage measurement (supply7). |Voltage
|32 |VUser1 voltage measurement (supply8). |Voltage
|33 |VUser2 voltage measurement (supply9). |Voltage
diff --git a/sys/contrib/device-tree/Bindings/iio/addac/adi,ad74115.yaml b/sys/contrib/device-tree/Bindings/iio/addac/adi,ad74115.yaml
index 2594fa192f93..2a04906531fb 100644
--- a/sys/contrib/device-tree/Bindings/iio/addac/adi,ad74115.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/addac/adi,ad74115.yaml
@@ -32,7 +32,8 @@ properties:
spi-cpol: true
- reset-gpios: true
+ reset-gpios:
+ maxItems: 1
interrupts:
minItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/amplifiers/adi,hmc425a.yaml b/sys/contrib/device-tree/Bindings/iio/amplifiers/adi,hmc425a.yaml
index 9fda56fa49c3..67de9d4e3a1d 100644
--- a/sys/contrib/device-tree/Bindings/iio/amplifiers/adi,hmc425a.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/amplifiers/adi,hmc425a.yaml
@@ -4,20 +4,30 @@
$id: http://devicetree.org/schemas/iio/amplifiers/adi,hmc425a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: HMC425A 6-bit Digital Step Attenuator
+title: Analog Devices HMC425A and similar Digital Step Attenuators
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
description: |
- Digital Step Attenuator IIO device with gpio interface.
+ Digital Step Attenuator IIO devices with gpio interface.
+ Offer various frequency and attenuation ranges.
+ ADRF5750 2 dB LSB, 4-Bit, Silicon Digital Attenuator, 10 MHz to 60 GHz
+ https://www.analog.com/media/en/technical-documentation/data-sheets/adrf5740.pdf
+
HMC425A 0.5 dB LSB GaAs MMIC 6-BIT DIGITAL POSITIVE CONTROL ATTENUATOR, 2.2 - 8.0 GHz
- https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf
+
+ HMC540S 1 dB LSB Silicon MMIC 4-Bit Digital Positive Control Attenuator, 0.1 - 8 GHz
+ https://www.analog.com/media/en/technical-documentation/data-sheets/hmc540s.pdf
+
properties:
compatible:
enum:
+ - adi,adrf5740
- adi,hmc425a
+ - adi,hmc540s
vcc-supply: true
diff --git a/sys/contrib/device-tree/Bindings/iio/cdc/adi,ad7150.yaml b/sys/contrib/device-tree/Bindings/iio/cdc/adi,ad7150.yaml
index 2155d3f5666c..3d7074fd17be 100644
--- a/sys/contrib/device-tree/Bindings/iio/cdc/adi,ad7150.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/cdc/adi,ad7150.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/iio/cdc/adi,ad7150.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Analog device AD7150 and similar capacitance to digital convertors.
+title: Analog device AD7150 and similar capacitance to digital converters.
maintainers:
- Jonathan Cameron <jic23@kernel.org>
diff --git a/sys/contrib/device-tree/Bindings/iio/chemical/aosong,ags02ma.yaml b/sys/contrib/device-tree/Bindings/iio/chemical/aosong,ags02ma.yaml
new file mode 100644
index 000000000000..35e7b094e878
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/chemical/aosong,ags02ma.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/chemical/aosong,ags02ma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Aosong AGS02MA VOC Sensor
+
+description: |
+ AGS02MA is an TVOC (Total Volatile Organic Compounds) i2c sensor with default
+ address of 0x1a.
+
+ Datasheet:
+ https://asairsensors.com/wp-content/uploads/2021/09/AGS02MA.pdf
+
+maintainers:
+ - Anshul Dalal <anshulusr@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - aosong,ags02ma
+
+ reg:
+ maxItems: 1
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ voc-sensor@1a {
+ compatible = "aosong,ags02ma";
+ reg = <0x1a>;
+ vdd-supply = <&vdd_regulator>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/common.yaml b/sys/contrib/device-tree/Bindings/iio/common.yaml
index f845b41d74c4..b3a10af86d76 100644
--- a/sys/contrib/device-tree/Bindings/iio/common.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/common.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
This document defines device tree properties common to several iio
- sensors. It doesn't constitue a device tree binding specification by itself but
+ sensors. It doesn't constitute a device tree binding specification by itself but
is meant to be referenced by device tree bindings.
When referenced from sensor tree bindings the properties defined in this
diff --git a/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5758.yaml b/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5758.yaml
index 4e508bfcc9d8..5121685337b5 100644
--- a/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5758.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5758.yaml
@@ -78,7 +78,8 @@ properties:
- const: -1000
- const: 22000
- reset-gpios: true
+ reset-gpios:
+ maxItems: 1
adi,dc-dc-ilim-microamp:
enum: [150000, 200000, 250000, 300000, 350000, 400000]
diff --git a/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5791.yaml b/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5791.yaml
index 3a84739736f6..c81285d84db7 100644
--- a/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5791.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/dac/adi,ad5791.yaml
@@ -26,6 +26,11 @@ properties:
vdd-supply: true
vss-supply: true
+ adi,rbuf-gain2-en:
+ description: Specify to allow an external amplifier to be connected in a
+ gain of two configuration.
+ type: boolean
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4728.yaml b/sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4728.yaml
new file mode 100644
index 000000000000..99831d7f1c16
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4728.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4728.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP4728 DAC
+
+maintainers:
+ - Andrea Collamati <andrea.collamati@gmail.com>
+
+description: |
+ MCP4728 is a quad channel, 12-bit voltage output
+ Digital-to-Analog Converter with non-volatile
+ memory and I2C compatible Serial Interface.
+ https://www.microchip.com/en-us/product/mcp4728
+
+properties:
+ compatible:
+ const: microchip,mcp4728
+
+ reg:
+ maxItems: 1
+
+ vdd-supply:
+ description: |
+ Provides both power and acts as the reference supply on the MCP4728
+ when Internal Vref is not selected.
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dac@60 {
+ compatible = "microchip,mcp4728";
+ reg = <0x60>;
+ vdd-supply = <&vdac_vdd>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4821.yaml b/sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4821.yaml
new file mode 100644
index 000000000000..0dc577c33918
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/dac/microchip,mcp4821.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4821.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP4821 and similar DACs
+
+description: |
+ Supports MCP48x1 (single channel) and MCP48x2 (dual channel) series of DACs.
+ Device supports simplex communication over SPI in Mode 0 and Mode 3.
+
+ +---------+--------------+-------------+
+ | Device | Resolution | Channels |
+ |---------|--------------|-------------|
+ | MCP4801 | 8-bit | 1 |
+ | MCP4802 | 8-bit | 2 |
+ | MCP4811 | 10-bit | 1 |
+ | MCP4812 | 10-bit | 2 |
+ | MCP4821 | 12-bit | 1 |
+ | MCP4822 | 12-bit | 2 |
+ +---------+--------------+-------------+
+
+ Datasheet:
+ MCP48x1: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf
+ MCP48x2: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf
+
+maintainers:
+ - Anshul Dalal <anshulusr@gmail.com>
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - microchip,mcp4801
+ - microchip,mcp4802
+ - microchip,mcp4811
+ - microchip,mcp4812
+ - microchip,mcp4821
+ - microchip,mcp4822
+
+ reg:
+ maxItems: 1
+
+ vdd-supply: true
+
+ ldac-gpios:
+ description: |
+ Active Low LDAC (Latch DAC Input) pin used to update the DAC output.
+ maxItems: 1
+
+ powerdown-gpios:
+ description: |
+ Active Low SHDN pin used to enter the shutdown mode.
+ maxItems: 1
+
+ spi-cpha: true
+ spi-cpol: true
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dac@0 {
+ compatible = "microchip,mcp4821";
+ reg = <0>;
+ vdd-supply = <&vdd_regulator>;
+ ldac-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ powerdown-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ spi-cpha;
+ spi-cpol;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1013.yaml b/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1013.yaml
index fc813bcb6532..f2eb2287ed9e 100644
--- a/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1013.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1013.yaml
@@ -39,6 +39,46 @@ properties:
description:
Analog voltage regulator.
+ vcc-drv-supply:
+ description:
+ RF Driver voltage regulator.
+
+ vcc2-drv-supply:
+ description:
+ RF predriver voltage regulator.
+
+ vcc-vva-supply:
+ description:
+ VVA Control Circuit voltage regulator.
+
+ vcc-amp1-supply:
+ description:
+ RF Amplifier 1 voltage regulator.
+
+ vcc-amp2-supply:
+ description:
+ RF Amplifier 2 voltage regulator.
+
+ vcc-env-supply:
+ description:
+ Envelope Detector voltage regulator.
+
+ vcc-bg-supply:
+ description:
+ Mixer Chip Band Gap Circuit voltage regulator.
+
+ vcc-bg2-supply:
+ description:
+ VGA Chip Band Gap Circuit voltage regulator.
+
+ vcc-mixer-supply:
+ description:
+ Mixer voltage regulator.
+
+ vcc-quad-supply:
+ description:
+ Quadruppler voltage regulator.
+
adi,detector-enable:
description:
Enable the Envelope Detector available at output pins VENV_P and
@@ -69,6 +109,16 @@ required:
- clocks
- clock-names
- vcm-supply
+ - vcc-drv-supply
+ - vcc2-drv-supply
+ - vcc-vva-supply
+ - vcc-amp1-supply
+ - vcc-amp2-supply
+ - vcc-env-supply
+ - vcc-bg-supply
+ - vcc-bg2-supply
+ - vcc-mixer-supply
+ - vcc-quad-supply
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
@@ -87,6 +137,16 @@ examples:
clocks = <&admv1013_lo>;
clock-names = "lo_in";
vcm-supply = <&vcm>;
+ vcc-drv-supply = <&vcc_drv>;
+ vcc2-drv-supply = <&vcc2_drv>;
+ vcc-vva-supply = <&vcc_vva>;
+ vcc-amp1-supply = <&vcc_amp1>;
+ vcc-amp2-supply = <&vcc_amp2>;
+ vcc-env-supply = <&vcc_env>;
+ vcc-bg-supply = <&vcc_bg>;
+ vcc-bg2-supply = <&vcc_bg2>;
+ vcc-mixer-supply = <&vcc_mixer>;
+ vcc-quad-supply = <&vcc_quad>;
adi,quad-se-mode = "diff";
adi,detector-enable;
};
diff --git a/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1014.yaml b/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1014.yaml
index ab86daa2c56e..39cc63a11762 100644
--- a/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1014.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/frequency/adi,admv1014.yaml
@@ -33,7 +33,7 @@ properties:
items:
- const: lo_in
description:
- External clock that provides the Local Oscilator input.
+ External clock that provides the Local Oscillator input.
vcm-supply:
description:
@@ -103,6 +103,14 @@ required:
- clocks
- clock-names
- vcm-supply
+ - vcc-if-bb-supply
+ - vcc-vga-supply
+ - vcc-vva-supply
+ - vcc-lna-3p3-supply
+ - vcc-lna-1p5-supply
+ - vcc-bg-supply
+ - vcc-quad-supply
+ - vcc-mixer-supply
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
diff --git a/sys/contrib/device-tree/Bindings/iio/health/ti,afe4403.yaml b/sys/contrib/device-tree/Bindings/iio/health/ti,afe4403.yaml
index b9b5beac33b2..5b6cde86b5a5 100644
--- a/sys/contrib/device-tree/Bindings/iio/health/ti,afe4403.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/health/ti,afe4403.yaml
@@ -23,7 +23,8 @@ properties:
maxItems: 1
description: Connected to ADC_RDY pin.
- reset-gpios: true
+ reset-gpios:
+ maxItems: 1
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/iio/health/ti,afe4404.yaml b/sys/contrib/device-tree/Bindings/iio/health/ti,afe4404.yaml
index 2958c4ca75b4..167d10bd60af 100644
--- a/sys/contrib/device-tree/Bindings/iio/health/ti,afe4404.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/health/ti,afe4404.yaml
@@ -23,7 +23,8 @@ properties:
maxItems: 1
description: Connected to ADC_RDY pin.
- reset-gpios: true
+ reset-gpios:
+ maxItems: 1
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc2010.yaml b/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc2010.yaml
index a2bc1fa92da0..79e75a8675cb 100644
--- a/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc2010.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc2010.yaml
@@ -10,7 +10,7 @@ maintainers:
- Eugene Zaikonnikov <ez@norophonic.com>
description: |
- Relative humidity and tempereature sensors on I2C bus
+ Relative humidity and temperature sensors on I2C bus
Datasheets are available at:
http://www.ti.com/product/HDC2010/datasheet
diff --git a/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc3020.yaml b/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc3020.yaml
new file mode 100644
index 000000000000..7f6d0f9edc75
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/humidity/ti,hdc3020.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/humidity/ti,hdc3020.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HDC3020/HDC3021/HDC3022 humidity and temperature iio sensors
+
+maintainers:
+ - Li peiyu <579lpy@gmail.com>
+ - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+description:
+ https://www.ti.com/lit/ds/symlink/hdc3020.pdf
+
+ The HDC302x is an integrated capacitive based relative humidity (RH)
+ and temperature sensor.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - ti,hdc3021
+ - ti,hdc3022
+ - const: ti,hdc3020
+ - const: ti,hdc3020
+
+ interrupts:
+ maxItems: 1
+
+ vdd-supply: true
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ humidity-sensor@47 {
+ compatible = "ti,hdc3021", "ti,hdc3020";
+ reg = <0x47>;
+ vdd-supply = <&vcc_3v3>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16460.yaml b/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16460.yaml
index 4e43c80e5119..4cacc9948726 100644
--- a/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16460.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16460.yaml
@@ -25,6 +25,10 @@ properties:
spi-cpol: true
+ spi-cs-inactive-delay-ns:
+ minimum: 16000
+ default: 16000
+
interrupts:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16475.yaml b/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16475.yaml
index c73533c54588..9b7ad609f7db 100644
--- a/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16475.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16475.yaml
@@ -47,6 +47,10 @@ properties:
spi-max-frequency:
maximum: 2000000
+ spi-cs-inactive-delay-ns:
+ minimum: 16000
+ default: 16000
+
interrupts:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/imu/bosch,bmi323.yaml b/sys/contrib/device-tree/Bindings/iio/imu/bosch,bmi323.yaml
new file mode 100644
index 000000000000..64ef26e19669
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/imu/bosch,bmi323.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/imu/bosch,bmi323.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bosch BMI323 6-Axis IMU
+
+maintainers:
+ - Jagath Jog J <jagathjog1996@gmail.com>
+
+description:
+ BMI323 is a 6-axis inertial measurement unit that supports acceleration and
+ gyroscopic measurements with hardware fifo buffering. Sensor also provides
+ events information such as motion, steps, orientation, single and double
+ tap detection.
+
+properties:
+ compatible:
+ const: bosch,bmi323
+
+ reg:
+ maxItems: 1
+
+ vdd-supply: true
+ vddio-supply: true
+
+ interrupts:
+ minItems: 1
+ maxItems: 2
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 2
+ items:
+ enum:
+ - INT1
+ - INT2
+
+ drive-open-drain:
+ description:
+ set if the specified interrupt pin should be configured as
+ open drain. If not set, defaults to push-pull.
+
+ mount-matrix:
+ description:
+ an optional 3x3 mounting rotation matrix.
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+ - vddio-supply
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ // Example for I2C
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ imu@68 {
+ compatible = "bosch,bmi323";
+ reg = <0x68>;
+ vddio-supply = <&vddio>;
+ vdd-supply = <&vdd>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "INT1";
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml b/sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml
index 1db6952ddca5..297b8a1a7ffb 100644
--- a/sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml
@@ -48,6 +48,11 @@ properties:
mount-matrix: true
+ invensense,level-shifter:
+ type: boolean
+ description: |
+ From ancient platform data struct: false: VLogic, true: VDD
+
i2c-gate:
$ref: /schemas/i2c/i2c-controller.yaml
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/iio/imu/st,lsm6dsx.yaml b/sys/contrib/device-tree/Bindings/iio/imu/st,lsm6dsx.yaml
index ee8724ad33ab..28b667a9cb76 100644
--- a/sys/contrib/device-tree/Bindings/iio/imu/st,lsm6dsx.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/imu/st,lsm6dsx.yaml
@@ -93,6 +93,9 @@ properties:
wakeup-source:
$ref: /schemas/types.yaml#/definitions/flag
+ mount-matrix:
+ description: an optional 3x3 mounting rotation matrix
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/iio/light/liteon,ltr390.yaml b/sys/contrib/device-tree/Bindings/iio/light/liteon,ltr390.yaml
new file mode 100644
index 000000000000..5d98ef2af74d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/light/liteon,ltr390.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/liteon,ltr390.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lite-On LTR390 ALS and UV Sensor
+
+description: |
+ The Lite-On LTR390 is an ALS (Ambient Light Sensor) and a UV sensor in a
+ single package with i2c address of 0x53.
+
+ Datasheet:
+ https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf
+
+maintainers:
+ - Anshul Dalal <anshulusr@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - liteon,ltr390
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+ description: |
+ Level interrupt pin with open drain output.
+ The sensor pulls this pin low when the measured reading is greater than
+ some configured threshold.
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ light-sensor@53 {
+ compatible = "liteon,ltr390";
+ reg = <0x53>;
+ interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <&vdd_regulator>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/light/rohm,bu27010.yaml b/sys/contrib/device-tree/Bindings/iio/light/rohm,bu27010.yaml
new file mode 100644
index 000000000000..bed42d5d0d94
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/light/rohm,bu27010.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/rohm,bu27010.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ROHM BU27010 color sensor
+
+maintainers:
+ - Matti Vaittinen <mazziesaccount@gmail.com>
+
+description: |
+ The ROHM BU27010 is a sensor with 6 photodiodes (red, green, blue, clear,
+ IR and flickering detection) with five configurable channels. Red, green
+ and flickering detection being always available and two out of the rest
+ three (blue, clear, IR) can be selected to be simultaneously measured.
+ Typical application is adjusting LCD/OLED backlight of TVs, mobile phones
+ and tablet PCs.
+
+properties:
+ compatible:
+ const: rohm,bu27010
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ light-sensor@38 {
+ compatible = "rohm,bu27010";
+ reg = <0x38>;
+ vdd-supply = <&vdd>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/light/vishay,veml6075.yaml b/sys/contrib/device-tree/Bindings/iio/light/vishay,veml6075.yaml
new file mode 100644
index 000000000000..abee04cd126e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/light/vishay,veml6075.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/vishay,veml6075.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Vishay VEML6075 UVA and UVB sensor
+
+maintainers:
+ - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+properties:
+ compatible:
+ const: vishay,veml6075
+
+ reg:
+ maxItems: 1
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ uv-sensor@10 {
+ compatible = "vishay,veml6075";
+ reg = <0x10>;
+ vdd-supply = <&vdd_reg>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,hsc030pa.yaml b/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,hsc030pa.yaml
new file mode 100644
index 000000000000..65a24ed67b3c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,hsc030pa.yaml
@@ -0,0 +1,142 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/pressure/honeywell,hsc030pa.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Honeywell TruStability HSC and SSC pressure sensor series
+
+description: |
+ support for Honeywell TruStability HSC and SSC digital pressure sensor
+ series.
+
+ These sensors have either an I2C, an SPI or an analog interface. Only the
+ digital versions are supported by this driver.
+
+ There are 118 models with different pressure ranges available in each family.
+ The vendor calls them "HSC series" and "SSC series". All of them have an
+ identical programming model but differ in pressure range, unit and transfer
+ function.
+
+ To support different models one needs to specify the pressure range as well
+ as the transfer function. Pressure range can either be provided via
+ pressure-triplet (directly extracted from the part number) or in case it's
+ a custom chip via numerical range limits converted to pascals.
+
+ The transfer function defines the ranges of raw conversion values delivered
+ by the sensor. pmin-pascal and pmax-pascal corespond to the minimum and
+ maximum pressure that can be measured.
+
+ Please note that in case of an SPI-based sensor, the clock signal should not
+ exceed 800kHz and the MOSI signal is not required.
+
+ Specifications about the devices can be found at:
+ https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf
+ https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-ssc-series/documents/sps-siot-trustability-ssc-series-standard-accuracy-board-mount-pressure-sensors-50099533-a-en-ciid-151134.pdf
+
+maintainers:
+ - Petre Rodan <petre.rodan@subdimension.ro>
+
+properties:
+ compatible:
+ const: honeywell,hsc030pa
+
+ reg:
+ maxItems: 1
+
+ honeywell,transfer-function:
+ description: |
+ Transfer function which defines the range of valid values delivered by
+ the sensor.
+ 0 - A, 10% to 90% of 2^14
+ 1 - B, 5% to 95% of 2^14
+ 2 - C, 5% to 85% of 2^14
+ 3 - F, 4% to 94% of 2^14
+ enum: [0, 1, 2, 3]
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ honeywell,pressure-triplet:
+ description: |
+ Case-sensitive five character string that defines pressure range, unit
+ and type as part of the device nomenclature. In the unlikely case of a
+ custom chip, set to "NA" and provide pmin-pascal and pmax-pascal.
+ enum: [001BA, 1.6BA, 2.5BA, 004BA, 006BA, 010BA, 1.6MD, 2.5MD, 004MD,
+ 006MD, 010MD, 016MD, 025MD, 040MD, 060MD, 100MD, 160MD, 250MD,
+ 400MD, 600MD, 001BD, 1.6BD, 2.5BD, 004BD, 2.5MG, 004MG, 006MG,
+ 010MG, 016MG, 025MG, 040MG, 060MG, 100MG, 160MG, 250MG, 400MG,
+ 600MG, 001BG, 1.6BG, 2.5BG, 004BG, 006BG, 010BG, 100KA, 160KA,
+ 250KA, 400KA, 600KA, 001GA, 160LD, 250LD, 400LD, 600LD, 001KD,
+ 1.6KD, 2.5KD, 004KD, 006KD, 010KD, 016KD, 025KD, 040KD, 060KD,
+ 100KD, 160KD, 250KD, 400KD, 250LG, 400LG, 600LG, 001KG, 1.6KG,
+ 2.5KG, 004KG, 006KG, 010KG, 016KG, 025KG, 040KG, 060KG, 100KG,
+ 160KG, 250KG, 400KG, 600KG, 001GG, 015PA, 030PA, 060PA, 100PA,
+ 150PA, 0.5ND, 001ND, 002ND, 004ND, 005ND, 010ND, 020ND, 030ND,
+ 001PD, 005PD, 015PD, 030PD, 060PD, 001NG, 002NG, 004NG, 005NG,
+ 010NG, 020NG, 030NG, 001PG, 005PG, 015PG, 030PG, 060PG, 100PG,
+ 150PG, NA]
+ $ref: /schemas/types.yaml#/definitions/string
+
+ honeywell,pmin-pascal:
+ description: |
+ Minimum pressure value the sensor can measure in pascal.
+ To be specified only if honeywell,pressure-triplet is set to "NA".
+
+ honeywell,pmax-pascal:
+ description: |
+ Maximum pressure value the sensor can measure in pascal.
+ To be specified only if honeywell,pressure-triplet is set to "NA".
+
+ vdd-supply:
+ description:
+ Provide VDD power to the sensor (either 3.3V or 5V depending on the chip)
+
+ spi-max-frequency:
+ maximum: 800000
+
+required:
+ - compatible
+ - reg
+ - honeywell,transfer-function
+ - honeywell,pressure-triplet
+
+additionalProperties: false
+
+dependentSchemas:
+ honeywell,pmin-pascal:
+ properties:
+ honeywell,pressure-triplet:
+ const: NA
+ honeywell,pmax-pascal:
+ properties:
+ honeywell,pressure-triplet:
+ const: NA
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pressure@28 {
+ compatible = "honeywell,hsc030pa";
+ reg = <0x28>;
+ honeywell,transfer-function = <0>;
+ honeywell,pressure-triplet = "030PA";
+ };
+ };
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pressure@0 {
+ compatible = "honeywell,hsc030pa";
+ reg = <0>;
+ spi-max-frequency = <800000>;
+ honeywell,transfer-function = <0>;
+ honeywell,pressure-triplet = "NA";
+ honeywell,pmin-pascal = <0>;
+ honeywell,pmax-pascal = <200000>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,mprls0025pa.yaml b/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,mprls0025pa.yaml
index c0a923febf13..d9e903fbfd99 100644
--- a/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,mprls0025pa.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/pressure/honeywell,mprls0025pa.yaml
@@ -47,18 +47,16 @@ properties:
reset-gpios:
description:
Optional GPIO for resetting the device.
- If not present the device is not resetted during the probe.
+ If not present the device is not reset during the probe.
maxItems: 1
honeywell,pmin-pascal:
description:
Minimum pressure value the sensor can measure in pascal.
- $ref: /schemas/types.yaml#/definitions/uint32
honeywell,pmax-pascal:
description:
Maximum pressure value the sensor can measure in pascal.
- $ref: /schemas/types.yaml#/definitions/uint32
honeywell,transfer-function:
description: |
diff --git a/sys/contrib/device-tree/Bindings/iio/pressure/rohm,bm1390.yaml b/sys/contrib/device-tree/Bindings/iio/pressure/rohm,bm1390.yaml
new file mode 100644
index 000000000000..7c4ca6322bf8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/pressure/rohm,bm1390.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/pressure/rohm,bm1390.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ROHM BM1390 pressure sensor
+
+maintainers:
+ - Matti Vaittinen <mazziesaccount@gmail.com>
+
+description:
+ BM1390GLV-Z is a pressure sensor which performs internal temperature
+ compensation for the MEMS. Pressure range is from 300 hPa to 1300 hPa
+ and sample averaging and IIR filtering is built in. Temperature
+ measurement is also supported.
+
+properties:
+ compatible:
+ const: rohm,bm1390glv-z
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pressure-sensor@5d {
+ compatible = "rohm,bm1390glv-z";
+ reg = <0x5d>;
+
+ interrupt-parent = <&gpio1>;
+ interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+
+ vdd-supply = <&vdd>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/proximity/ams,as3935.yaml b/sys/contrib/device-tree/Bindings/iio/proximity/ams,as3935.yaml
index c999994e19e3..9567993ce480 100644
--- a/sys/contrib/device-tree/Bindings/iio/proximity/ams,as3935.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/proximity/ams,as3935.yaml
@@ -10,7 +10,7 @@ maintainers:
- Matt Ranostay <matt.ranostay@konsulko.com>
description:
- This lightening distance sensor uses an I2C or SPI interface. The
+ This lightning distance sensor uses an I2C or SPI interface. The
binding currently only covers the SPI option.
properties:
diff --git a/sys/contrib/device-tree/Bindings/iio/proximity/murata,irsd200.yaml b/sys/contrib/device-tree/Bindings/iio/proximity/murata,irsd200.yaml
new file mode 100644
index 000000000000..67f5389ece67
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/proximity/murata,irsd200.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/proximity/murata,irsd200.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Murata IRS-D200 PIR sensor
+
+maintainers:
+ - Waqar Hameed <waqar.hameed@axis.com>
+
+description:
+ PIR sensor for human detection.
+
+properties:
+ compatible:
+ const: murata,irsd200
+
+ reg:
+ items:
+ - enum:
+ - 0x48
+ - 0x49
+ description: |
+ When the AD pin is connected to GND, the slave address is 0x48.
+ When the AD pin is connected to VDD, the slave address is 0x49.
+
+ interrupts:
+ maxItems: 1
+ description:
+ Type should be IRQ_TYPE_EDGE_RISING.
+
+ vdd-supply:
+ description:
+ 3.3 V supply voltage.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ proximity@48 {
+ compatible = "murata,irsd200";
+ reg = <0x48>;
+ interrupts = <24 IRQ_TYPE_EDGE_RISING>;
+ vdd-supply = <&regulator_3v3>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9310.yaml b/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9310.yaml
index 5de0bb2180e6..775555d147bf 100644
--- a/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9310.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9310.yaml
@@ -15,6 +15,9 @@ description: |
Specifications about the devices can be found at:
https://www.semtech.com/products/smart-sensing/sar-sensors/sx9310
+allOf:
+ - $ref: /schemas/iio/iio.yaml#
+
properties:
compatible:
enum:
@@ -102,7 +105,7 @@ required:
- reg
- "#io-channel-cells"
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9324.yaml b/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9324.yaml
index b3aa2ebf9661..48f221463166 100644
--- a/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9324.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9324.yaml
@@ -13,6 +13,9 @@ maintainers:
description: |
Semtech's SX9324 proximity sensor.
+allOf:
+ - $ref: /schemas/iio/iio.yaml#
+
properties:
compatible:
const: semtech,sx9324
@@ -167,7 +170,7 @@ required:
- reg
- "#io-channel-cells"
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/iio/resolver/adi,ad2s1210.yaml b/sys/contrib/device-tree/Bindings/iio/resolver/adi,ad2s1210.yaml
new file mode 100644
index 000000000000..8980b3cd8337
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/resolver/adi,ad2s1210.yaml
@@ -0,0 +1,177 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/resolver/adi,ad2s1210.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD2S1210 Resolver-to-Digital Converter
+
+maintainers:
+ - Michael Hennerich <michael.hennerich@analog.com>
+
+description: |
+ The AD2S1210 is a complete 10-bit to 16-bit resolution tracking
+ resolver-to-digital converter, integrating an on-board programmable
+ sinusoidal oscillator that provides sine wave excitation for
+ resolvers.
+
+ The AD2S1210 allows the user to read the angular position or the
+ angular velocity data directly from the parallel outputs or through
+ the serial interface.
+
+ The mode of operation of the communication channel (parallel or serial) is
+ selected by the A0 and A1 input pins. In normal mode, data is latched by
+ toggling the SAMPLE line and can then be read directly. In configuration mode,
+ data is read or written using a register access scheme (address byte with
+ read/write flag and data byte).
+
+ A1 A0 Result
+ 0 0 Normal mode - position output
+ 0 1 Normal mode - velocity output
+ 1 0 Reserved
+ 1 1 Configuration mode
+
+ In normal mode, the resolution of the digital output is selected using
+ the RES0 and RES1 input pins. In configuration mode, the resolution is
+ selected by setting the RES0 and RES1 bits in the control register.
+
+ RES1 RES0 Resolution (Bits)
+ 0 0 10
+ 0 1 12
+ 1 0 14
+ 1 1 16
+
+ Note on SPI connections: The CS line on the AD2S1210 should hard-wired to
+ logic low and the WR/FSYNC line on the AD2S1210 should be connected to the
+ SPI CSn output of the SPI controller.
+
+ Datasheet:
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad2s1210.pdf
+
+properties:
+ compatible:
+ const: adi,ad2s1210
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 25000000
+
+ spi-cpha: true
+
+ avdd-supply:
+ description:
+ A 4.75 to 5.25 V regulator that powers the Analog Supply Voltage (AVDD)
+ pin.
+
+ dvdd-supply:
+ description:
+ A 4.75 to 5.25 V regulator that powers the Digital Supply Voltage (DVDD)
+ pin.
+
+ vdrive-supply:
+ description:
+ A 2.3 to 5.25 V regulator that powers the Logic Power Supply Input
+ (VDrive) pin.
+
+ clocks:
+ maxItems: 1
+ description: External oscillator clock (CLKIN).
+
+ reset-gpios:
+ description:
+ GPIO connected to the /RESET pin. As the line needs to be low for the
+ reset to be active, it should be configured as GPIO_ACTIVE_LOW.
+ maxItems: 1
+
+ sample-gpios:
+ description:
+ GPIO connected to the /SAMPLE pin. As the line needs to be low to trigger
+ a sample, it should be configured as GPIO_ACTIVE_LOW.
+ maxItems: 1
+
+ mode-gpios:
+ description:
+ GPIO lines connected to the A0 and A1 pins. These pins select the data
+ transfer mode.
+ minItems: 2
+ maxItems: 2
+
+ resolution-gpios:
+ description:
+ GPIO lines connected to the RES0 and RES1 pins. These pins select the
+ resolution of the digital output. If omitted, it is assumed that the
+ RES0 and RES1 pins are hard-wired to match the assigned-resolution-bits
+ property.
+ minItems: 2
+ maxItems: 2
+
+ fault-gpios:
+ description:
+ GPIO lines connected to the LOT and DOS pins. These pins combined indicate
+ the type of fault present, if any. As these pins a pulled low to indicate
+ a fault condition, they should be configured as GPIO_ACTIVE_LOW.
+ minItems: 2
+ maxItems: 2
+
+ adi,fixed-mode:
+ description:
+ This is used to indicate the selected mode if A0 and A1 are hard-wired
+ instead of connected to GPIOS (i.e. mode-gpios is omitted).
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [config, velocity, position]
+
+ assigned-resolution-bits:
+ description:
+ Resolution of the digital output required by the application. This
+ determines the precision of the angle and/or the maximum speed that can
+ be measured. If resolution-gpios is omitted, it is assumed that RES0 and
+ RES1 are hard-wired to match this value.
+ enum: [10, 12, 14, 16]
+
+required:
+ - compatible
+ - reg
+ - spi-cpha
+ - avdd-supply
+ - dvdd-supply
+ - vdrive-supply
+ - clocks
+ - sample-gpios
+ - assigned-resolution-bits
+
+oneOf:
+ - required:
+ - mode-gpios
+ - required:
+ - adi,fixed-mode
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resolver@0 {
+ compatible = "adi,ad2s1210";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ spi-cpha;
+ avdd-supply = <&avdd_regulator>;
+ dvdd-supply = <&dvdd_regulator>;
+ vdrive-supply = <&vdrive_regulator>;
+ clocks = <&ext_osc>;
+ sample-gpios = <&gpio0 90 GPIO_ACTIVE_LOW>;
+ mode-gpios = <&gpio0 86 0>, <&gpio0 87 0>;
+ resolution-gpios = <&gpio0 88 0>, <&gpio0 89 0>;
+ assigned-resolution-bits = <16>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/iio/st,st-sensors.yaml b/sys/contrib/device-tree/Bindings/iio/st,st-sensors.yaml
index e450821a741d..fff7e3d83a02 100644
--- a/sys/contrib/device-tree/Bindings/iio/st,st-sensors.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/st,st-sensors.yaml
@@ -97,7 +97,7 @@ properties:
interrupts:
description: interrupt line(s) connected to the DRDY line(s) and/or the
- Intertial interrupt lines INT1 and INT2 if these exist. This means up to
+ Inertial interrupt lines INT1 and INT2 if these exist. This means up to
three interrupts, and the DRDY must be the first one if it exists on
the package. The trigger edge of the interrupts is sometimes software
configurable in the hardware so the operating system should parse this
diff --git a/sys/contrib/device-tree/Bindings/iio/temperature/melexis,mlx90632.yaml b/sys/contrib/device-tree/Bindings/iio/temperature/melexis,mlx90632.yaml
index 4a55e7f25ae7..03bb5d4fa8b5 100644
--- a/sys/contrib/device-tree/Bindings/iio/temperature/melexis,mlx90632.yaml
+++ b/sys/contrib/device-tree/Bindings/iio/temperature/melexis,mlx90632.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/iio/temperature/melexis,mlx90632.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Melexis MLX90632 contactless Infra Red temperature sensor
+title: Melexis MLX90632 and MLX90635 contactless Infra Red temperature sensor
maintainers:
- Crt Mori <cmo@melexis.com>
@@ -27,9 +27,24 @@ description: |
Since measured object emissivity effects Infra Red energy emitted,
emissivity should be set before requesting the object temperature.
+ https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90635
+
+ MLX90635 is most suitable for consumer applications where
+ measured object temperature is in range between -20 to 100 degrees
+ Celsius with relative error of measurement 2 degree Celsius in
+ object temperature range for industrial applications, while just 0.2
+ degree Celsius for human body measurement applications. Since it can
+ operate and measure ambient temperature in range of -20 to 85 degrees
+ Celsius it is suitable also for outdoor use.
+
+ Since measured object emissivity effects Infra Red energy emitted,
+ emissivity should be set before requesting the object temperature.
+
properties:
compatible:
- const: melexis,mlx90632
+ enum:
+ - melexis,mlx90632
+ - melexis,mlx90635
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/iio/temperature/microchip,mcp9600.yaml b/sys/contrib/device-tree/Bindings/iio/temperature/microchip,mcp9600.yaml
new file mode 100644
index 000000000000..d2cafa38a544
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/iio/temperature/microchip,mcp9600.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9600.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP9600 thermocouple EMF converter
+
+maintainers:
+ - Andrew Hepp <andrew.hepp@ahepp.dev>
+
+description:
+ https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdf
+
+properties:
+ compatible:
+ const: microchip,mcp9600
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ maxItems: 6
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 6
+ items:
+ enum:
+ - open-circuit
+ - short-circuit
+ - alert1
+ - alert2
+ - alert3
+ - alert4
+
+ thermocouple-type:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Type of thermocouple (THERMOCOUPLE_TYPE_K if omitted).
+ Use defines in dt-bindings/iio/temperature/thermocouple.h.
+ Supported types are B, E, J, K, N, R, S, T.
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/iio/temperature/thermocouple.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ temperature-sensor@60 {
+ compatible = "microchip,mcp9600";
+ reg = <0x60>;
+ interrupt-parent = <&gpio>;
+ interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "open-circuit";
+ thermocouple-type = <THERMOCOUPLE_TYPE_K>;
+ vdd-supply = <&vdd>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/index.rst b/sys/contrib/device-tree/Bindings/index.rst
index d9002a3a0abb..cc1fbdc05657 100644
--- a/sys/contrib/device-tree/Bindings/index.rst
+++ b/sys/contrib/device-tree/Bindings/index.rst
@@ -4,6 +4,7 @@
:maxdepth: 1
ABI
+ dts-coding-style
writing-bindings
writing-schema
submitting-patches
diff --git a/sys/contrib/device-tree/Bindings/input/adafruit,seesaw-gamepad.yaml b/sys/contrib/device-tree/Bindings/input/adafruit,seesaw-gamepad.yaml
new file mode 100644
index 000000000000..5e86f6de6978
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/adafruit,seesaw-gamepad.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/adafruit,seesaw-gamepad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Adafruit Mini I2C Gamepad with seesaw
+
+maintainers:
+ - Anshul Dalal <anshulusr@gmail.com>
+
+description: |
+ Adafruit Mini I2C Gamepad
+
+ +-----------------------------+
+ | ___ |
+ | / \ (X) |
+ | | S | __ __ (Y) (A) |
+ | \___/ |ST| |SE| (B) |
+ | |
+ +-----------------------------+
+
+ S -> 10-bit precision bidirectional analog joystick
+ ST -> Start
+ SE -> Select
+ X, A, B, Y -> Digital action buttons
+
+ Datasheet: https://cdn-learn.adafruit.com/downloads/pdf/gamepad-qt.pdf
+ Product page: https://www.adafruit.com/product/5743
+ Arduino Driver: https://github.com/adafruit/Adafruit_Seesaw
+
+properties:
+ compatible:
+ const: adafruit,seesaw-gamepad
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+ description:
+ The gamepad's IRQ pin triggers a rising edge if interrupts are enabled.
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ joystick@50 {
+ compatible = "adafruit,seesaw-gamepad";
+ interrupts = <18 IRQ_TYPE_EDGE_RISING>;
+ reg = <0x50>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/input/azoteq,iqs7222.yaml b/sys/contrib/device-tree/Bindings/input/azoteq,iqs7222.yaml
index 9ddba7f2e7aa..5b1769c19b17 100644
--- a/sys/contrib/device-tree/Bindings/input/azoteq,iqs7222.yaml
+++ b/sys/contrib/device-tree/Bindings/input/azoteq,iqs7222.yaml
@@ -4,14 +4,14 @@
$id: http://devicetree.org/schemas/input/azoteq,iqs7222.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Azoteq IQS7222A/B/C Capacitive Touch Controller
+title: Azoteq IQS7222A/B/C/D Capacitive Touch Controller
maintainers:
- Jeff LaBundy <jeff@labundy.com>
description: |
- The Azoteq IQS7222A, IQS7222B and IQS7222C are multichannel capacitive touch
- controllers that feature additional sensing capabilities.
+ The Azoteq IQS7222A, IQS7222B, IQS7222C and IQS7222D are multichannel
+ capacitive touch controllers that feature additional sensing capabilities.
Link to datasheets: https://www.azoteq.com/
@@ -21,6 +21,7 @@ properties:
- azoteq,iqs7222a
- azoteq,iqs7222b
- azoteq,iqs7222c
+ - azoteq,iqs7222d
reg:
maxItems: 1
@@ -173,6 +174,152 @@ properties:
maximum: 3000
description: Specifies the report rate (in ms) during ultra-low-power mode.
+ touchscreen-size-x: true
+ touchscreen-size-y: true
+ touchscreen-inverted-x: true
+ touchscreen-inverted-y: true
+ touchscreen-swapped-x-y: true
+
+ trackpad:
+ type: object
+ description: Represents all channels associated with the trackpad.
+
+ properties:
+ azoteq,channel-select:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 12
+ items:
+ minimum: 0
+ maximum: 13
+ description:
+ Specifies the order of the channels that participate in the trackpad.
+ Specify 255 to omit a given channel for the purpose of mapping a non-
+ rectangular trackpad.
+
+ azoteq,num-rows:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 12
+ description: Specifies the number of rows that comprise the trackpad.
+
+ azoteq,num-cols:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 12
+ description: Specifies the number of columns that comprise the trackpad.
+
+ azoteq,top-speed:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ multipleOf: 4
+ minimum: 0
+ maximum: 1020
+ description:
+ Specifies the speed (in coordinates traveled per conversion) after
+ which coordinate filtering is no longer applied.
+
+ azoteq,bottom-speed:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description:
+ Specifies the speed (in coordinates traveled per conversion) after
+ which coordinate filtering is linearly reduced.
+
+ azoteq,use-prox:
+ type: boolean
+ description:
+ Directs the trackpad to respond to the proximity states of the
+ selected channels instead of their corresponding touch states.
+ Note the trackpad cannot report granular coordinates during a
+ state of proximity.
+
+ patternProperties:
+ "^azoteq,lower-cal-(x|y)$":
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's lower starting points.
+
+ "^azoteq,upper-cal-(x|y)$":
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's upper starting points.
+
+ "^event-(press|tap|(swipe|flick)-(x|y)-(pos|neg))$":
+ type: object
+ $ref: input.yaml#
+ description:
+ Represents a press or gesture event reported by the trackpad. Specify
+ 'linux,code' under the press event to report absolute coordinates.
+
+ properties:
+ linux,code: true
+
+ azoteq,gesture-angle-tighten:
+ type: boolean
+ description:
+ Limits the tangent of the gesture angle to 0.5 (axial gestures
+ only). If specified in one direction, the effect is applied in
+ either direction.
+
+ azoteq,gesture-max-ms:
+ multipleOf: 16
+ minimum: 0
+ maximum: 4080
+ description:
+ Specifies the length of time (in ms) within which a tap, swipe
+ or flick gesture must be completed in order to be acknowledged
+ by the device. The number specified for any one swipe or flick
+ gesture applies to all other swipe or flick gestures.
+
+ azoteq,gesture-min-ms:
+ multipleOf: 16
+ minimum: 0
+ maximum: 4080
+ description:
+ Specifies the length of time (in ms) for which a tap gesture must
+ be held in order to be acknowledged by the device.
+
+ azoteq,gesture-dist:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description:
+ Specifies the distance (in coordinates) across which a swipe or
+ flick gesture must travel in order to be acknowledged by the
+ device. The number specified for any one swipe or flick gesture
+ applies to all remaining swipe or flick gestures.
+
+ For tap gestures, this property specifies the distance from the
+ original point of contact across which the contact is permitted
+ to travel before the gesture is rejected by the device.
+
+ azoteq,gpio-select:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 3
+ items:
+ minimum: 0
+ maximum: 2
+ description: |
+ Specifies one or more GPIO mapped to the event as follows:
+ 0: GPIO0
+ 1: GPIO3
+ 2: GPIO4
+
+ Note that although multiple events can be mapped to a single
+ GPIO, they must all be of the same type (proximity, touch or
+ trackpad gesture).
+
+ additionalProperties: false
+
+ required:
+ - azoteq,channel-select
+
+ additionalProperties: false
+
patternProperties:
"^cycle-[0-9]$":
type: object
@@ -288,6 +435,10 @@ patternProperties:
Activates the reference channel in response to proximity events
instead of touch events.
+ azoteq,counts-filt-enable:
+ type: boolean
+ description: Applies counts filtering to the channel.
+
azoteq,ati-band:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
@@ -432,12 +583,12 @@ patternProperties:
description: |
Specifies one or more GPIO mapped to the event as follows:
0: GPIO0
- 1: GPIO3 (IQS7222C only)
- 2: GPIO4 (IQS7222C only)
+ 1: GPIO3
+ 2: GPIO4
Note that although multiple events can be mapped to a single
GPIO, they must all be of the same type (proximity, touch or
- slider gesture).
+ slider/trackpad gesture).
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -521,16 +672,16 @@ patternProperties:
minimum: 0
maximum: 65535
description:
- Specifies the speed of movement after which coordinate filtering is
- no longer applied.
+ Specifies the speed (in coordinates traveled per conversion) after
+ which coordinate filtering is no longer applied.
azoteq,bottom-speed:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description:
- Specifies the speed of movement after which coordinate filtering is
- linearly reduced.
+ Specifies the speed (in coordinates traveled per conversion) after
+ which coordinate filtering is linearly reduced.
azoteq,bottom-beta:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -595,10 +746,10 @@ patternProperties:
minimum: 0
maximum: 4080
description:
- Specifies the distance across which a swipe or flick gesture must
- travel in order to be acknowledged by the device. The number spec-
- ified for any one swipe or flick gesture applies to all remaining
- swipe or flick gestures.
+ Specifies the distance (in coordinates) across which a swipe or
+ flick gesture must travel in order to be acknowledged by the
+ device. The number specified for any one swipe or flick gesture
+ applies to all remaining swipe or flick gestures.
azoteq,gpio-select:
$ref: /schemas/types.yaml#/definitions/uint32-array
@@ -610,8 +761,8 @@ patternProperties:
description: |
Specifies one or more GPIO mapped to the event as follows:
0: GPIO0
- 1: GPIO3 (IQS7222C only)
- 2: GPIO4 (IQS7222C only)
+ 1: GPIO3
+ 2: GPIO4
Note that although multiple events can be mapped to a single
GPIO, they must all be of the same type (proximity, touch or
@@ -629,8 +780,8 @@ patternProperties:
description: |
Represents a GPIO mapped to one or more events as follows:
gpio-0: GPIO0
- gpio-1: GPIO3 (IQS7222C only)
- gpio-2: GPIO4 (IQS7222C only)
+ gpio-1: GPIO3
+ gpio-2: GPIO4
allOf:
- $ref: ../pinctrl/pincfg-node.yaml#
@@ -641,11 +792,53 @@ patternProperties:
additionalProperties: false
allOf:
+ - $ref: touchscreen/touchscreen.yaml#
+
- if:
properties:
compatible:
contains:
- const: azoteq,iqs7222b
+ enum:
+ - azoteq,iqs7222a
+ - azoteq,iqs7222b
+ - azoteq,iqs7222c
+
+ then:
+ properties:
+ touchscreen-size-x: false
+ touchscreen-size-y: false
+ touchscreen-inverted-x: false
+ touchscreen-inverted-y: false
+ touchscreen-swapped-x-y: false
+
+ trackpad: false
+
+ patternProperties:
+ "^channel-([0-9]|1[0-9])$":
+ properties:
+ azoteq,counts-filt-enable: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - azoteq,iqs7222b
+ - azoteq,iqs7222c
+
+ then:
+ patternProperties:
+ "^channel-([0-9]|1[0-9])$":
+ properties:
+ azoteq,ulp-allow: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - azoteq,iqs7222b
+ - azoteq,iqs7222d
then:
patternProperties:
@@ -657,13 +850,22 @@ allOf:
properties:
azoteq,ref-select: false
+ "^slider-[0-1]$": false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: azoteq,iqs7222b
+
+ then:
+ patternProperties:
+ "^channel-([0-9]|1[0-9])$":
patternProperties:
"^event-(prox|touch)$":
properties:
azoteq,gpio-select: false
- "^slider-[0-1]$": false
-
"^gpio-[0-2]$": false
- if:
@@ -704,10 +906,6 @@ allOf:
else:
patternProperties:
- "^channel-([0-9]|1[0-9])$":
- properties:
- azoteq,ulp-allow: false
-
"^slider-[0-1]$":
patternProperties:
"^event-(press|tap|(swipe|flick)-(pos|neg))$":
diff --git a/sys/contrib/device-tree/Bindings/input/elan,ekth3000.yaml b/sys/contrib/device-tree/Bindings/input/elan,ekth3000.yaml
index 2a9bb6ace021..24dc2d69613f 100644
--- a/sys/contrib/device-tree/Bindings/input/elan,ekth3000.yaml
+++ b/sys/contrib/device-tree/Bindings/input/elan,ekth3000.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/elan,ekth3000.yaml#
diff --git a/sys/contrib/device-tree/Bindings/input/elan,ekth6915.yaml b/sys/contrib/device-tree/Bindings/input/elan,ekth6915.yaml
index 05e6f2df604c..dc4ac41f2441 100644
--- a/sys/contrib/device-tree/Bindings/input/elan,ekth6915.yaml
+++ b/sys/contrib/device-tree/Bindings/input/elan,ekth6915.yaml
@@ -13,10 +13,14 @@ description:
Supports the Elan eKTH6915 touchscreen controller.
This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
+allOf:
+ - $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
properties:
compatible:
- items:
- - const: elan,ekth6915
+ enum:
+ - elan,ekth6915
+ - ilitek,ili2901
reg:
const: 0x10
@@ -24,6 +28,8 @@ properties:
interrupts:
maxItems: 1
+ panel: true
+
reset-gpios:
description: Reset GPIO; not all touchscreens using eKTH6915 hook this up.
diff --git a/sys/contrib/device-tree/Bindings/input/fsl,scu-key.yaml b/sys/contrib/device-tree/Bindings/input/fsl,scu-key.yaml
index e5a3c355ee1f..29921aab9d97 100644
--- a/sys/contrib/device-tree/Bindings/input/fsl,scu-key.yaml
+++ b/sys/contrib/device-tree/Bindings/input/fsl,scu-key.yaml
@@ -24,6 +24,8 @@ properties:
linux,keycodes:
maxItems: 1
+ wakeup-source: true
+
required:
- compatible
- linux,keycodes
diff --git a/sys/contrib/device-tree/Bindings/input/goodix,gt7375p.yaml b/sys/contrib/device-tree/Bindings/input/goodix,gt7375p.yaml
index 1edad1da1196..358cb8275bf1 100644
--- a/sys/contrib/device-tree/Bindings/input/goodix,gt7375p.yaml
+++ b/sys/contrib/device-tree/Bindings/input/goodix,gt7375p.yaml
@@ -14,6 +14,9 @@ description:
This touchscreen uses the i2c-hid protocol but has some non-standard
power sequencing required.
+allOf:
+ - $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
properties:
compatible:
oneOf:
@@ -30,6 +33,8 @@ properties:
interrupts:
maxItems: 1
+ panel: true
+
reset-gpios:
true
diff --git a/sys/contrib/device-tree/Bindings/input/gpio-keys.yaml b/sys/contrib/device-tree/Bindings/input/gpio-keys.yaml
index 159cd9d9fe57..cc78c2152921 100644
--- a/sys/contrib/device-tree/Bindings/input/gpio-keys.yaml
+++ b/sys/contrib/device-tree/Bindings/input/gpio-keys.yaml
@@ -31,7 +31,23 @@ patternProperties:
maxItems: 1
interrupts:
- maxItems: 1
+ oneOf:
+ - items:
+ - description: Optional key interrupt or wakeup interrupt
+ - items:
+ - description: Key interrupt
+ - description: Wakeup interrupt
+
+ interrupt-names:
+ description:
+ Optional interrupt names, can be used to specify a separate dedicated
+ wake-up interrupt in addition to the gpio irq
+ oneOf:
+ - items:
+ - enum: [ irq, wakeup ]
+ - items:
+ - const: irq
+ - const: wakeup
label:
description: Descriptive name of the key.
@@ -97,6 +113,20 @@ patternProperties:
- required:
- gpios
+ allOf:
+ - if:
+ properties:
+ interrupts:
+ minItems: 2
+ required:
+ - interrupts
+ then:
+ properties:
+ interrupt-names:
+ minItems: 2
+ required:
+ - interrupt-names
+
dependencies:
wakeup-event-action: [ wakeup-source ]
linux,input-value: [ gpios ]
@@ -137,6 +167,15 @@ examples:
linux,code = <108>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
};
+
+ key-wakeup {
+ label = "GPIO Key WAKEUP";
+ linux,code = <143>;
+ interrupts-extended = <&intc 2 IRQ_TYPE_EDGE_FALLING>,
+ <&intc_wakeup 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "irq", "wakeup";
+ wakeup-source;
+ };
};
...
diff --git a/sys/contrib/device-tree/Bindings/input/gpio-mouse.yaml b/sys/contrib/device-tree/Bindings/input/gpio-mouse.yaml
new file mode 100644
index 000000000000..3928ec6aff1d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/gpio-mouse.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/gpio-mouse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO attached mouse
+
+description: |
+ This simply uses standard GPIO handles to define a simple mouse connected
+ to 5-7 GPIO lines.
+
+maintainers:
+ - Anshul Dalal <anshulusr@gmail.com>
+
+properties:
+ compatible:
+ const: gpio-mouse
+
+ scan-interval-ms:
+ maxItems: 1
+
+ up-gpios:
+ maxItems: 1
+
+ down-gpios:
+ maxItems: 1
+
+ left-gpios:
+ maxItems: 1
+
+ right-gpios:
+ maxItems: 1
+
+ button-left-gpios:
+ maxItems: 1
+
+ button-middle-gpios:
+ maxItems: 1
+
+ button-right-gpios:
+ maxItems: 1
+
+required:
+ - compatible
+ - scan-interval-ms
+ - up-gpios
+ - down-gpios
+ - left-gpios
+ - right-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ gpio-mouse {
+ compatible = "gpio-mouse";
+ scan-interval-ms = <50>;
+ up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+ button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+ button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+ button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/input/hid-over-i2c.yaml b/sys/contrib/device-tree/Bindings/input/hid-over-i2c.yaml
index 7156b08f7645..138caad96a29 100644
--- a/sys/contrib/device-tree/Bindings/input/hid-over-i2c.yaml
+++ b/sys/contrib/device-tree/Bindings/input/hid-over-i2c.yaml
@@ -44,6 +44,8 @@ properties:
description: HID descriptor address
$ref: /schemas/types.yaml#/definitions/uint32
+ panel: true
+
post-power-on-delay-ms:
description: Time required by the device after enabling its regulators
or powering it on, before it is ready for communication.
diff --git a/sys/contrib/device-tree/Bindings/input/ilitek,ili9882t.yaml b/sys/contrib/device-tree/Bindings/input/ilitek,ili9882t.yaml
new file mode 100644
index 000000000000..c5d9e0e919f9
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/ilitek,ili9882t.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ilitek,ili9882t.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ilitek ili9882t touchscreen controller
+
+maintainers:
+ - Cong Yang <yangcong5@huaqin.corp-partner.google.com>
+
+description:
+ Supports the Ilitek ili9882t touchscreen controller.
+ This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
+
+allOf:
+ - $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
+properties:
+ compatible:
+ const: ilitek,ili9882t
+
+ reg:
+ const: 0x41
+
+ interrupts:
+ maxItems: 1
+
+ panel: true
+
+ reset-gpios:
+ maxItems: 1
+ description: Reset GPIO.
+
+ vccio-supply:
+ description: The 1.8V supply to the touchscreen.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - panel
+ - vccio-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen: touchscreen@41 {
+ compatible = "ilitek,ili9882t";
+ reg = <0x41>;
+
+ interrupt-parent = <&pio>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+
+ panel = <&panel>;
+ reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
+ vccio-supply = <&mt6366_vio18_reg>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/input/iqs269a.yaml b/sys/contrib/device-tree/Bindings/input/iqs269a.yaml
index 3c430d38594f..2c3f693b8982 100644
--- a/sys/contrib/device-tree/Bindings/input/iqs269a.yaml
+++ b/sys/contrib/device-tree/Bindings/input/iqs269a.yaml
@@ -9,6 +9,9 @@ title: Azoteq IQS269A Capacitive Touch Controller
maintainers:
- Jeff LaBundy <jeff@labundy.com>
+allOf:
+ - $ref: input.yaml#
+
description: |
The Azoteq IQS269A is an 8-channel capacitive touch controller that features
additional Hall-effect and inductive sensing capabilities.
@@ -17,7 +20,10 @@ description: |
properties:
compatible:
- const: azoteq,iqs269a
+ enum:
+ - azoteq,iqs269a
+ - azoteq,iqs269a-00
+ - azoteq,iqs269a-d0
reg:
maxItems: 1
@@ -204,6 +210,73 @@ properties:
default: 1
description: Specifies the slider coordinate filter strength.
+ azoteq,touch-hold-ms:
+ multipleOf: 256
+ minimum: 256
+ maximum: 65280
+ default: 5120
+ description:
+ Specifies the length of time (in ms) for which the channel selected by
+ 'azoteq,gpio3-select' must be held in a state of touch in order for an
+ approximately 60-ms pulse to be asserted on the GPIO4 pin.
+
+ linux,keycodes:
+ minItems: 1
+ maxItems: 8
+ description: |
+ Specifies the numeric keycodes associated with each available gesture in
+ the following order (enter 0 for unused gestures):
+ 0: Slider 0 tap
+ 1: Slider 0 hold
+ 2: Slider 0 positive flick or swipe
+ 3: Slider 0 negative flick or swipe
+ 4: Slider 1 tap
+ 5: Slider 1 hold
+ 6: Slider 1 positive flick or swipe
+ 7: Slider 1 negative flick or swipe
+
+ azoteq,gesture-swipe:
+ type: boolean
+ description:
+ Directs the device to interpret axial gestures as a swipe (finger remains
+ on slider) instead of a flick (finger leaves slider).
+
+ azoteq,timeout-tap-ms:
+ multipleOf: 16
+ minimum: 0
+ maximum: 4080
+ default: 400
+ description:
+ Specifies the length of time (in ms) within which a slider touch must be
+ released in order to be interpreted as a tap. Default and maximum values
+ as well as step size are reduced by a factor of 4 with device version 2.
+
+ azoteq,timeout-swipe-ms:
+ multipleOf: 16
+ minimum: 0
+ maximum: 4080
+ default: 2000
+ description:
+ Specifies the length of time (in ms) within which an axial gesture must be
+ completed in order to be interpreted as a flick or swipe. Default and max-
+ imum values as well as step size are reduced by a factor of 4 with device
+ version 2.
+
+ azoteq,thresh-swipe:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ default: 128
+ description:
+ Specifies the number of points across which an axial gesture must travel
+ in order to be interpreted as a flick or swipe.
+
+dependencies:
+ azoteq,gesture-swipe: ["linux,keycodes"]
+ azoteq,timeout-tap-ms: ["linux,keycodes"]
+ azoteq,timeout-swipe-ms: ["linux,keycodes"]
+ azoteq,thresh-swipe: ["linux,keycodes"]
+
patternProperties:
"^channel@[0-7]$":
type: object
@@ -454,6 +527,21 @@ patternProperties:
additionalProperties: false
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - azoteq,iqs269a-d0
+then:
+ patternProperties:
+ "^channel@[0-7]$":
+ properties:
+ azoteq,slider1-select: false
+else:
+ properties:
+ azoteq,touch-hold-ms: false
+
required:
- compatible
- reg
@@ -484,6 +572,14 @@ examples:
azoteq,hall-enable;
azoteq,suspend-mode = <2>;
+ linux,keycodes = <KEY_PLAYPAUSE>,
+ <KEY_STOPCD>,
+ <KEY_NEXTSONG>,
+ <KEY_PREVIOUSSONG>;
+
+ azoteq,timeout-tap-ms = <400>;
+ azoteq,timeout-swipe-ms = <800>;
+
channel@0 {
reg = <0x0>;
diff --git a/sys/contrib/device-tree/Bindings/input/mediatek,pmic-keys.yaml b/sys/contrib/device-tree/Bindings/input/mediatek,pmic-keys.yaml
index e34c9e78d38d..70567d92c746 100644
--- a/sys/contrib/device-tree/Bindings/input/mediatek,pmic-keys.yaml
+++ b/sys/contrib/device-tree/Bindings/input/mediatek,pmic-keys.yaml
@@ -90,26 +90,4 @@ required:
unevaluatedProperties: false
-examples:
- - |
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
-
- pmic {
- compatible = "mediatek,mt6397";
-
- keys {
- compatible = "mediatek,mt6397-keys";
- mediatek,long-press-mode = <1>;
- power-off-time-sec = <0>;
-
- key-power {
- linux,keycodes = <KEY_POWER>;
- wakeup-source;
- };
-
- key-home {
- linux,keycodes = <KEY_VOLUMEDOWN>;
- };
- };
- };
+...
diff --git a/sys/contrib/device-tree/Bindings/input/microchip,cap11xx.yaml b/sys/contrib/device-tree/Bindings/input/microchip,cap11xx.yaml
index 5b5d4f7d3482..7ade03f1b32b 100644
--- a/sys/contrib/device-tree/Bindings/input/microchip,cap11xx.yaml
+++ b/sys/contrib/device-tree/Bindings/input/microchip,cap11xx.yaml
@@ -45,13 +45,13 @@ properties:
Enables the Linux input system's autorepeat feature on the input device.
linux,keycodes:
- minItems: 6
- maxItems: 6
+ minItems: 3
+ maxItems: 8
description: |
Specifies an array of numeric keycode values to
be used for the channels. If this property is
omitted, KEY_A, KEY_B, etc are used as defaults.
- The array must have exactly six entries.
+ The number of entries must correspond to the number of channels.
microchip,sensor-gain:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -70,6 +70,59 @@ properties:
open drain. This property allows using the active
high push-pull output.
+ microchip,sensitivity-delta-sense:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 32
+ enum: [1, 2, 4, 8, 16, 32, 64, 128]
+ description:
+ Controls the sensitivity multiplier of a touch detection.
+ Higher value means more sensitive settings.
+ At the more sensitive settings, touches are detected for a smaller delta
+ capacitance corresponding to a "lighter" touch.
+
+ microchip,signal-guard:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 3
+ maxItems: 8
+ items:
+ enum: [0, 1]
+ description: |
+ 0 - off
+ 1 - on
+ The signal guard isolates the signal from virtual grounds.
+ If enabled then the behavior of the channel is changed to signal guard.
+ The number of entries must correspond to the number of channels.
+
+ microchip,input-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 3
+ maxItems: 8
+ items:
+ minimum: 0
+ maximum: 127
+ description:
+ Specifies the delta threshold that is used to determine if a touch has
+ been detected. A higher value means a larger difference in capacitance
+ is required for a touch to be registered, making the touch sensor less
+ sensitive.
+ The number of entries must correspond to the number of channels.
+
+ microchip,calib-sensitivity:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 3
+ maxItems: 8
+ items:
+ enum: [1, 2, 4]
+ description: |
+ Specifies an array of numeric values that controls the gain
+ used by the calibration routine to enable sensor inputs
+ to be more sensitive for proximity detection.
+ Gain is based on touch pad capacitance range
+ 1 - 5-50pF
+ 2 - 0-25pF
+ 4 - 0-12.5pF
+ The number of entries must correspond to the number of channels.
+
patternProperties:
"^led@[0-7]$":
type: object
@@ -99,10 +152,29 @@ allOf:
contains:
enum:
- microchip,cap1106
+ - microchip,cap1203
+ - microchip,cap1206
+ - microchip,cap1293
+ - microchip,cap1298
then:
patternProperties:
"^led@[0-7]$": false
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,cap1106
+ - microchip,cap1126
+ - microchip,cap1188
+ - microchip,cap1203
+ - microchip,cap1206
+ then:
+ properties:
+ microchip,signal-guard: false
+ microchip,calib-sensitivity: false
+
required:
- compatible
- interrupts
@@ -122,6 +194,8 @@ examples:
reg = <0x28>;
autorepeat;
microchip,sensor-gain = <2>;
+ microchip,sensitivity-delta-sense = <16>;
+ microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>;
linux,keycodes = <103>, /* KEY_UP */
<106>, /* KEY_RIGHT */
diff --git a/sys/contrib/device-tree/Bindings/input/qcom,pm8921-keypad.yaml b/sys/contrib/device-tree/Bindings/input/qcom,pm8921-keypad.yaml
new file mode 100644
index 000000000000..88764adcd696
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/qcom,pm8921-keypad.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/qcom,pm8921-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm PM8921 PMIC KeyPad
+
+maintainers:
+ - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+
+allOf:
+ - $ref: input.yaml#
+ - $ref: matrix-keymap.yaml#
+
+properties:
+ compatible:
+ enum:
+ - qcom,pm8058-keypad
+ - qcom,pm8921-keypad
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ items:
+ - description: key sense
+ - description: key stuck
+
+ wakeup-source:
+ type: boolean
+ description: use any event on keypad as wakeup event
+
+ linux,keypad-wakeup:
+ type: boolean
+ deprecated: true
+ description: legacy version of the wakeup-source property
+
+ debounce:
+ description:
+ Time in microseconds that key must be pressed or
+ released for state change interrupt to trigger.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ scan-delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: time in microseconds to pause between successive scans of the
+ matrix array
+
+ row-hold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: time in nanoseconds to pause between scans of each row in the
+ matrix array.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - linux,keymap
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ keypad@148 {
+ compatible = "qcom,pm8921-keypad";
+ reg = <0x148>;
+ interrupt-parent = <&pmicintc>;
+ interrupts = <74 IRQ_TYPE_EDGE_RISING>, <75 IRQ_TYPE_EDGE_RISING>;
+ linux,keymap = <
+ MATRIX_KEY(0, 0, KEY_VOLUMEUP)
+ MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
+ MATRIX_KEY(0, 3, KEY_CAMERA)
+ >;
+ keypad,num-rows = <1>;
+ keypad,num-columns = <5>;
+ debounce = <15>;
+ scan-delay = <32>;
+ row-hold = <91500>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/input/sprd,sc27xx-vibrator.yaml b/sys/contrib/device-tree/Bindings/input/sprd,sc27xx-vibrator.yaml
index a401a0bfcbec..4c8d303ff93c 100644
--- a/sys/contrib/device-tree/Bindings/input/sprd,sc27xx-vibrator.yaml
+++ b/sys/contrib/device-tree/Bindings/input/sprd,sc27xx-vibrator.yaml
@@ -28,21 +28,4 @@ required:
additionalProperties: false
-examples:
- - |
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- sc2731_pmic: pmic@0 {
- compatible = "sprd,sc2731";
- reg = <0 0>;
- spi-max-frequency = <26000000>;
- interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- vibrator@eb4 {
- compatible = "sprd,sc2731-vibrator";
- reg = <0xeb4>;
- };
- };
+...
diff --git a/sys/contrib/device-tree/Bindings/input/syna,rmi4.yaml b/sys/contrib/device-tree/Bindings/input/syna,rmi4.yaml
new file mode 100644
index 000000000000..b522c8d3ce0d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/syna,rmi4.yaml
@@ -0,0 +1,273 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/syna,rmi4.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics RMI4 compliant devices
+
+maintainers:
+ - Jason A. Donenfeld <Jason@zx2c4.com>
+ - Matthias Schiffer <matthias.schiffer@ew.tq-group.com
+ - Vincent Huang <vincent.huang@tw.synaptics.com>
+
+description: |
+ The Synaptics RMI4 (Register Mapped Interface 4) core is able to support RMI4
+ devices using different transports (I2C, SPI) and different functions (e.g.
+ Function 1, 2D sensors using Function 11 or 12).
+
+properties:
+ compatible:
+ enum:
+ - syna,rmi4-i2c
+ - syna,rmi4-spi
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+ description: Active low signal
+
+ spi-cpha: true
+ spi-cpol: true
+
+ syna,reset-delay-ms:
+ description:
+ Delay to wait after resetting the device.
+
+ syna,startup-delay-ms:
+ description:
+ Delay to wait after powering on the device.
+
+ vdd-supply: true
+ vio-supply: true
+
+ rmi4-f01@1:
+ type: object
+ additionalProperties: false
+ description:
+ Function 1
+
+ properties:
+ reg:
+ maxItems: 1
+
+ syna,nosleep-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
+ description:
+ If set the device will run at full power without sleeping. nosleep
+ has 3 modes, 0 will not change the default setting, 1 will disable
+ nosleep (allow sleeping), and 2 will enable nosleep (disabling
+ sleep).
+
+ syna,wakeup-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Defines the amplitude of the disturbance to the background
+ capacitance that will cause the device to wake from dozing.
+
+ syna,doze-holdoff-ms:
+ description:
+ The delay to wait after the last finger lift and the first doze
+ cycle.
+
+ syna,doze-interval-ms:
+ description:
+ The time period that the device sleeps between finger activity.
+
+ required:
+ - reg
+
+patternProperties:
+ "^rmi4-f1[12]@1[12]$":
+ type: object
+ unevaluatedProperties: false
+ $ref: /schemas/input/touchscreen/touchscreen.yaml#
+ description:
+ RMI4 Function 11 and Function 12 are for 2D touch position sensing.
+
+ properties:
+ reg:
+ maxItems: 1
+
+ syna,clip-x-low:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Minimum value for X.
+
+ syna,clip-y-low:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Minimum value for Y.
+
+ syna,clip-x-high:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Maximum value for X.
+
+ syna,clip-y-high:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Maximum value for Y.
+
+ syna,offset-x:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Add an offset to X.
+
+ syna,offset-y:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Add an offset to Y.
+
+ syna,delta-x-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Minimum distance on the X axis required to generate an interrupt in
+ reduced reporting mode.
+
+ syna,delta-y-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Minimum distance on the Y axis required to generate an interrupt in
+ reduced reporting mode.
+
+ syna,sensor-type:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2]
+ description: |
+ Sensor type: 1 for touchscreen 2 for touchpad.
+
+ syna,disable-report-mask:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Mask for disabling posiiton reporting. Used to disable reporing
+ absolute position data.
+
+ syna,rezero-wait-ms:
+ description:
+ Time to wait after issuing a rezero command.
+
+ required:
+ - reg
+
+ "^rmi4-f[0-9a-f]+@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ description:
+ Other functions, not documented yet.
+
+ properties:
+ reg:
+ maxItems: 1
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: syna,rmi4-i2c
+ then:
+ properties:
+ spi-rx-delay-us: false
+ spi-tx-delay-us: false
+ else:
+ properties:
+ syna,reset-delay-ms: false
+ syna,startup-delay-ms: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@20 {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x20>;
+ interrupt-parent = <&gpx1>;
+ interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
+
+ syna,startup-delay-ms = <100>;
+ vdd-supply = <&tsp_vdd>;
+ vio-supply = <&ldo32_reg>;
+
+ pinctrl-0 = <&touch_irq>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rmi4-f01@1 {
+ reg = <0x1>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f12@12 {
+ reg = <0x12>;
+ syna,sensor-type = <1>;
+ };
+
+ rmi4-f1a@1a {
+ reg = <0x1a>;
+ };
+ };
+ };
+
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@0 {
+ compatible = "syna,rmi4-spi";
+ reg = <0x0>;
+ interrupt-parent = <&gpx1>;
+ interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
+
+ spi-max-frequency = <4000000>;
+ spi-rx-delay-us = <30>;
+ spi-cpha;
+ spi-cpol;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rmi4-f01@1 {
+ reg = <0x1>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f11@11 {
+ reg = <0x11>;
+ touchscreen-inverted-y;
+ syna,sensor-type = <2>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/input/ti,drv266x.yaml b/sys/contrib/device-tree/Bindings/input/ti,drv266x.yaml
new file mode 100644
index 000000000000..da1818824373
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/ti,drv266x.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ti,drv266x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments - drv266x Haptics driver
+
+description: |
+ Product Page:
+ http://www.ti.com/product/drv2665
+ http://www.ti.com/product/drv2667
+
+maintainers:
+ - Anshul Dalal <anshulusr@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - ti,drv2665
+ - ti,drv2667
+
+ reg:
+ maxItems: 1
+
+ vbat-supply:
+ description: Required supply regulator
+
+required:
+ - compatible
+ - reg
+ - vbat-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ haptics@59 {
+ compatible = "ti,drv2667";
+ reg = <0x59>;
+ vbat-supply = <&vbat>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/azoteq,iqs7211.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/azoteq,iqs7211.yaml
new file mode 100644
index 000000000000..8cf371b99f19
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/azoteq,iqs7211.yaml
@@ -0,0 +1,769 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/azoteq,iqs7211.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Azoteq IQS7210A/7211A/E Trackpad/Touchscreen Controller
+
+maintainers:
+ - Jeff LaBundy <jeff@labundy.com>
+
+description: |
+ The Azoteq IQS7210A, IQS7211A and IQS7211E trackpad and touchscreen control-
+ lers employ projected-capacitance sensing and can track two contacts.
+
+ Link to datasheets: https://www.azoteq.com/
+
+properties:
+ compatible:
+ enum:
+ - azoteq,iqs7210a
+ - azoteq,iqs7211a
+ - azoteq,iqs7211e
+
+ reg:
+ maxItems: 1
+
+ irq-gpios:
+ maxItems: 1
+ description:
+ Specifies the GPIO connected to the device's active-low RDY output. The
+ pin doubles as the IQS7211E's active-low MCLR input, in which case this
+ GPIO must be configured as open-drain.
+
+ reset-gpios:
+ maxItems: 1
+ description:
+ Specifies the GPIO connected to the device's active-low MCLR input. The
+ device is temporarily held in hardware reset prior to initialization if
+ this property is present.
+
+ azoteq,forced-comms:
+ type: boolean
+ description:
+ Enables forced communication; to be used with host adapters that cannot
+ tolerate clock stretching.
+
+ azoteq,forced-comms-default:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description:
+ Indicates if the device's OTP memory enables (1) or disables (0) forced
+ communication by default. Specifying this property can expedite startup
+ time if the default value is known.
+
+ If this property is not specified, communication is not initiated until
+ the device asserts its RDY pin shortly after exiting hardware reset. At
+ that point, forced communication is either enabled or disabled based on
+ the presence or absence of the 'azoteq,forced-comms' property.
+
+ azoteq,rate-active-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the report rate (in ms) during active mode.
+
+ azoteq,rate-touch-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the report rate (in ms) during idle-touch mode.
+
+ azoteq,rate-idle-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the report rate (in ms) during idle mode.
+
+ azoteq,rate-lp1-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the report rate (in ms) during low-power mode 1.
+
+ azoteq,rate-lp2-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the report rate (in ms) during low-power mode 2.
+
+ azoteq,timeout-active-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 65535000
+ description:
+ Specifies the length of time (in ms) to wait for an event before moving
+ from active mode to idle or idle-touch modes.
+
+ azoteq,timeout-touch-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 65535000
+ description:
+ Specifies the length of time (in ms) to wait for an event before moving
+ from idle-touch mode to idle mode.
+
+ azoteq,timeout-idle-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 65535000
+ description:
+ Specifies the length of time (in ms) to wait for an event before moving
+ from idle mode to low-power mode 1.
+
+ azoteq,timeout-lp1-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 65535000
+ description:
+ Specifies the length of time (in ms) to wait for an event before moving
+ from low-power mode 1 to low-power mode 2.
+
+ azoteq,timeout-lp2-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 60000
+ description:
+ Specifies the rate (in ms) at which the trackpad reference values
+ are updated during low-power modes 1 and 2.
+
+ azoteq,timeout-ati-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 60000
+ description:
+ Specifies the delay (in ms) before the automatic tuning implementation
+ (ATI) is retried in the event it fails to complete.
+
+ azoteq,timeout-comms-ms:
+ minimum: 0
+ maximum: 65535
+ description:
+ Specifies the delay (in ms) before a communication window is closed.
+
+ azoteq,timeout-press-ms:
+ multipleOf: 1000
+ minimum: 0
+ maximum: 60000
+ description:
+ Specifies the length of time (in ms) to wait before automatically
+ releasing a press event. Specify zero to allow the press state to
+ persist indefinitely.
+
+ azoteq,fosc-freq:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description: |
+ Specifies the device's core clock frequency as follows:
+ 0: 14 MHz
+ 1: 18 MHz
+
+ azoteq,fosc-trim:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 15
+ description: Specifies the device's core clock frequency trim.
+
+ azoteq,num-contacts:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 2
+ default: 0
+ description: Specifies the number of contacts reported by the device.
+
+ azoteq,contact-split:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the contact (finger) split factor.
+
+ azoteq,trim-x:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the horizontal trim width.
+
+ azoteq,trim-y:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the vertical trim height.
+
+ trackpad:
+ type: object
+ description: Represents all channels associated with the trackpad.
+
+ properties:
+ azoteq,rx-enable:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 8
+ items:
+ minimum: 0
+ maximum: 7
+ description:
+ Specifies the order of the CRx pin(s) associated with the trackpad.
+
+ azoteq,tx-enable:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 12
+ items:
+ minimum: 0
+ maximum: 11
+ description:
+ Specifies the order of the CTx pin(s) associated with the trackpad.
+
+ azoteq,channel-select:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 36
+ items:
+ minimum: 0
+ maximum: 255
+ description: |
+ Specifies the channels mapped to each cycle in the following order:
+ Cycle 0, slot 0
+ Cycle 0, slot 1
+ Cycle 1, slot 0
+ Cycle 1, slot 1
+ ...and so on. Specify 255 to disable a given slot.
+
+ azoteq,ati-frac-div-fine:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the trackpad's ATI fine fractional divider.
+
+ azoteq,ati-frac-mult-coarse:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 15
+ description: Specifies the trackpad's ATI coarse fractional multiplier.
+
+ azoteq,ati-frac-div-coarse:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the trackpad's ATI coarse fractional divider.
+
+ azoteq,ati-comp-div:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the trackpad's ATI compensation divider.
+
+ azoteq,ati-target:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description: Specifies the trackpad's ATI target.
+
+ azoteq,touch-enter:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's touch entrance factor.
+
+ azoteq,touch-exit:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's touch exit factor.
+
+ azoteq,thresh:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's stationary touch threshold.
+
+ azoteq,conv-period:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's conversion period.
+
+ azoteq,conv-frac:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the trackpad's conversion frequency fraction.
+
+ patternProperties:
+ "^event-(tap(-double|-triple)?|hold|palm|swipe-(x|y)-(pos|neg)(-hold)?)$":
+ type: object
+ $ref: ../input.yaml#
+ description:
+ Represents a gesture event reported by the trackpad. In the case of
+ axial gestures, the duration or distance specified in one direction
+ applies to both directions along the same axis.
+
+ properties:
+ linux,code: true
+
+ azoteq,gesture-max-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the maximum duration of tap/swipe gestures.
+
+ azoteq,gesture-mid-ms:
+ minimum: 0
+ maximum: 65535
+ description:
+ Specifies the maximum duration between subsequent tap gestures
+ (IQS7211E only).
+
+ azoteq,gesture-min-ms:
+ minimum: 0
+ maximum: 65535
+ description: Specifies the minimum duration of hold gestures.
+
+ azoteq,gesture-dist:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description:
+ Specifies the minimum (swipe) or maximum (tap and hold) distance
+ a finger may travel to be considered a gesture.
+
+ azoteq,gesture-dist-rep:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description:
+ Specifies the minimum distance a finger must travel to elicit a
+ repeated swipe gesture (IQS7211E only).
+
+ azoteq,gesture-angle:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 75
+ description:
+ Specifies the maximum angle (in degrees) a finger may travel to
+ be considered a swipe gesture.
+
+ azoteq,thresh:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 42
+ description: Specifies the palm gesture threshold (IQS7211E only).
+
+ additionalProperties: false
+
+ dependencies:
+ azoteq,rx-enable: ["azoteq,tx-enable"]
+ azoteq,tx-enable: ["azoteq,rx-enable"]
+ azoteq,channel-select: ["azoteq,rx-enable"]
+
+ additionalProperties: false
+
+ alp:
+ type: object
+ $ref: ../input.yaml#
+ description: Represents the alternate low-power channel (ALP).
+
+ properties:
+ azoteq,rx-enable:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 8
+ items:
+ minimum: 0
+ maximum: 7
+ description:
+ Specifies the CRx pin(s) associated with the ALP in no particular
+ order.
+
+ azoteq,tx-enable:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 12
+ items:
+ minimum: 0
+ maximum: 11
+ description:
+ Specifies the CTx pin(s) associated with the ALP in no particular
+ order.
+
+ azoteq,ati-frac-div-fine:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the ALP's ATI fine fractional divider.
+
+ azoteq,ati-frac-mult-coarse:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 15
+ description: Specifies the ALP's ATI coarse fractional multiplier.
+
+ azoteq,ati-frac-div-coarse:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the ALP's ATI coarse fractional divider.
+
+ azoteq,ati-comp-div:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the ALP's ATI compensation divider.
+
+ azoteq,ati-target:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description: Specifies the ALP's ATI target.
+
+ azoteq,ati-base:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ multipleOf: 8
+ minimum: 0
+ maximum: 255
+ description: Specifies the ALP's ATI base.
+
+ azoteq,ati-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description: |
+ Specifies the ALP's ATI mode as follows:
+ 0: Partial
+ 1: Full
+
+ azoteq,sense-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description: |
+ Specifies the ALP's sensing mode as follows:
+ 0: Self capacitive
+ 1: Mutual capacitive
+
+ azoteq,debounce-enter:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the ALP's debounce entrance factor.
+
+ azoteq,debounce-exit:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the ALP's debounce exit factor.
+
+ azoteq,thresh:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description: Specifies the ALP's proximity or touch threshold.
+
+ azoteq,conv-period:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the ALP's conversion period.
+
+ azoteq,conv-frac:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the ALP's conversion frequency fraction.
+
+ linux,code: true
+
+ additionalProperties: false
+
+ button:
+ type: object
+ description: Represents the inductive or capacitive button.
+
+ properties:
+ azoteq,ati-frac-div-fine:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the button's ATI fine fractional divider.
+
+ azoteq,ati-frac-mult-coarse:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 15
+ description: Specifies the button's ATI coarse fractional multiplier.
+
+ azoteq,ati-frac-div-coarse:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the button's ATI coarse fractional divider.
+
+ azoteq,ati-comp-div:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 31
+ description: Specifies the button's ATI compensation divider.
+
+ azoteq,ati-target:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description: Specifies the button's ATI target.
+
+ azoteq,ati-base:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ multipleOf: 8
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's ATI base.
+
+ azoteq,ati-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description: |
+ Specifies the button's ATI mode as follows:
+ 0: Partial
+ 1: Full
+
+ azoteq,sense-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
+ description: |
+ Specifies the button's sensing mode as follows:
+ 0: Self capacitive
+ 1: Mutual capacitive
+ 2: Inductive
+
+ azoteq,touch-enter:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's touch entrance factor.
+
+ azoteq,touch-exit:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's touch exit factor.
+
+ azoteq,debounce-enter:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's debounce entrance factor.
+
+ azoteq,debounce-exit:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's debounce exit factor.
+
+ azoteq,thresh:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 65535
+ description: Specifies the button's proximity threshold.
+
+ azoteq,conv-period:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's conversion period.
+
+ azoteq,conv-frac:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ description: Specifies the button's conversion frequency fraction.
+
+ patternProperties:
+ "^event-(prox|touch)$":
+ type: object
+ $ref: ../input.yaml#
+ description:
+ Represents a proximity or touch event reported by the button.
+
+ properties:
+ linux,code: true
+
+ additionalProperties: false
+
+ additionalProperties: false
+
+ wakeup-source: true
+
+ touchscreen-size-x: true
+ touchscreen-size-y: true
+ touchscreen-inverted-x: true
+ touchscreen-inverted-y: true
+ touchscreen-swapped-x-y: true
+
+dependencies:
+ touchscreen-size-x: ["azoteq,num-contacts"]
+ touchscreen-size-y: ["azoteq,num-contacts"]
+ touchscreen-inverted-x: ["azoteq,num-contacts"]
+ touchscreen-inverted-y: ["azoteq,num-contacts"]
+ touchscreen-swapped-x-y: ["azoteq,num-contacts"]
+
+required:
+ - compatible
+ - reg
+ - irq-gpios
+
+additionalProperties: false
+
+allOf:
+ - $ref: touchscreen.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: azoteq,iqs7210a
+
+ then:
+ properties:
+ alp:
+ properties:
+ azoteq,rx-enable:
+ maxItems: 4
+ items:
+ minimum: 4
+
+ else:
+ properties:
+ azoteq,timeout-press-ms: false
+
+ alp:
+ properties:
+ azoteq,ati-mode: false
+
+ button: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: azoteq,iqs7211e
+
+ then:
+ properties:
+ reset-gpios: false
+
+ trackpad:
+ properties:
+ azoteq,tx-enable:
+ maxItems: 13
+ items:
+ maximum: 12
+
+ alp:
+ properties:
+ azoteq,tx-enable:
+ maxItems: 13
+ items:
+ maximum: 12
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touch@56 {
+ compatible = "azoteq,iqs7210a";
+ reg = <0x56>;
+ irq-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio 17 (GPIO_ACTIVE_LOW |
+ GPIO_PUSH_PULL)>;
+ azoteq,num-contacts = <2>;
+
+ trackpad {
+ azoteq,rx-enable = <6>, <5>, <4>, <3>, <2>;
+ azoteq,tx-enable = <1>, <7>, <8>, <9>, <10>;
+ };
+
+ button {
+ azoteq,sense-mode = <2>;
+ azoteq,touch-enter = <40>;
+ azoteq,touch-exit = <36>;
+
+ event-touch {
+ linux,code = <KEY_HOME>;
+ };
+ };
+
+ alp {
+ azoteq,sense-mode = <1>;
+ linux,code = <KEY_POWER>;
+ };
+ };
+ };
+
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touch@56 {
+ compatible = "azoteq,iqs7211e";
+ reg = <0x56>;
+ irq-gpios = <&gpio 4 (GPIO_ACTIVE_LOW |
+ GPIO_OPEN_DRAIN)>;
+
+ trackpad {
+ event-tap {
+ linux,code = <KEY_PLAYPAUSE>;
+ };
+
+ event-tap-double {
+ linux,code = <KEY_SHUFFLE>;
+ };
+
+ event-tap-triple {
+ linux,code = <KEY_AGAIN>;
+ };
+
+ event-hold {
+ linux,code = <KEY_STOP>;
+ };
+
+ event-palm {
+ linux,code = <KEY_EXIT>;
+ };
+
+ event-swipe-x-pos {
+ linux,code = <KEY_REWIND>;
+ };
+
+ event-swipe-x-pos-hold {
+ linux,code = <KEY_PREVIOUS>;
+ };
+
+ event-swipe-x-neg {
+ linux,code = <KEY_FASTFORWARD>;
+ };
+
+ event-swipe-x-neg-hold {
+ linux,code = <KEY_NEXT>;
+ };
+
+ event-swipe-y-pos {
+ linux,code = <KEY_VOLUMEUP>;
+ };
+
+ event-swipe-y-pos-hold {
+ linux,code = <KEY_MUTE>;
+ };
+
+ event-swipe-y-neg {
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+
+ event-swipe-y-neg-hold {
+ linux,code = <KEY_MUTE>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/cypress,tt21000.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/cypress,tt21000.yaml
index 4080422a9eb5..037e5d3c447f 100644
--- a/sys/contrib/device-tree/Bindings/input/touchscreen/cypress,tt21000.yaml
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/cypress,tt21000.yaml
@@ -34,6 +34,9 @@ properties:
vdd-supply:
description: Regulator for voltage.
+ vddio-supply:
+ description: Optional Regulator for I/O voltage.
+
reset-gpios:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/edt-ft5x06.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/edt-ft5x06.yaml
index ef4c841387bd..f2808cb4d99d 100644
--- a/sys/contrib/device-tree/Bindings/input/touchscreen/edt-ft5x06.yaml
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/edt-ft5x06.yaml
@@ -93,6 +93,12 @@ properties:
minimum: 1
maximum: 255
+ threshold:
+ description: Allows setting the "click"-threshold in the range from 0 to 255.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-fuzz-x: true
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/eeti,exc3000.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/eeti,exc3000.yaml
index 007adbc89c14..9dc25d30a0a8 100644
--- a/sys/contrib/device-tree/Bindings/input/touchscreen/eeti,exc3000.yaml
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/eeti,exc3000.yaml
@@ -24,6 +24,8 @@ properties:
maxItems: 1
reset-gpios:
maxItems: 1
+ vdd-supply:
+ description: Power supply regulator for the chip
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-inverted-x: true
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/melfas,mms114.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/melfas,mms114.yaml
index fdd02898e249..07f9dd6b1c9c 100644
--- a/sys/contrib/device-tree/Bindings/input/touchscreen/melfas,mms114.yaml
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/melfas,mms114.yaml
@@ -52,6 +52,11 @@ properties:
touchscreen-swapped-x-y: true
touchscreen-max-pressure: true
+ linux,keycodes:
+ description: Keycodes for the touch keys
+ minItems: 1
+ maxItems: 15
+
additionalProperties: false
required:
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/neonode,zforce.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/neonode,zforce.yaml
new file mode 100644
index 000000000000..c2ee89b76ea1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/neonode,zforce.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Neonode infrared touchscreen controller
+
+maintainers:
+ - Heiko Stuebner <heiko@sntech.de>
+
+allOf:
+ - $ref: touchscreen.yaml#
+
+properties:
+ compatible:
+ const: neonode,zforce
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ irq-gpios:
+ maxItems: 1
+
+ x-size:
+ deprecated: true
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ y-size:
+ deprecated: true
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ vdd-supply: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - reset-gpios
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@50 {
+ compatible = "neonode,zforce";
+ reg = <0x50>;
+ interrupts = <2 0>;
+ vdd-supply = <&reg_zforce_vdd>;
+
+ reset-gpios = <&gpio5 9 0>; /* RST */
+ irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
+
+ touchscreen-min-x = <0>;
+ touchscreen-size-x = <800>;
+ touchscreen-min-y = <0>;
+ touchscreen-size-y = <600>;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/samsung,s6sy761.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/samsung,s6sy761.yaml
new file mode 100644
index 000000000000..1ffd17af3c53
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/samsung,s6sy761.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/samsung,s6sy761.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S6SY761 touchscreen controller
+
+maintainers:
+ - Andi Shyti <andi.shyti@kernel.org>
+
+allOf:
+ - $ref: touchscreen.yaml#
+
+properties:
+ compatible:
+ const: samsung,s6sy761
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ avdd-supply: true
+ vdd-supply: true
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - avdd-supply
+ - vdd-supply
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@48 {
+ compatible = "samsung,s6sy761";
+ reg = <0x48>;
+ interrupt-parent = <&gpa1>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+ avdd-supply = <&ldo30_reg>;
+ vdd-supply = <&ldo31_reg>;
+ touchscreen-size-x = <4096>;
+ touchscreen-size-y = <4096>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/touchscreen.yaml b/sys/contrib/device-tree/Bindings/input/touchscreen/touchscreen.yaml
index 895592da9626..431c13335c40 100644
--- a/sys/contrib/device-tree/Bindings/input/touchscreen/touchscreen.yaml
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/touchscreen.yaml
@@ -10,6 +10,13 @@ maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
properties:
+ panel:
+ description: If this touchscreen is integrally connected to a panel, this
+ is a reference to that panel. The presence of this reference indicates
+ that the touchscreen should be power sequenced together with the panel
+ and that they may share power and/or reset signals.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
touchscreen-min-x:
description: minimum x coordinate reported
$ref: /schemas/types.yaml#/definitions/uint32
diff --git a/sys/contrib/device-tree/Bindings/input/touchscreen/tsc2007.txt b/sys/contrib/device-tree/Bindings/input/touchscreen/tsc2007.txt
index ed00f61b8c08..210486a3fb11 100644
--- a/sys/contrib/device-tree/Bindings/input/touchscreen/tsc2007.txt
+++ b/sys/contrib/device-tree/Bindings/input/touchscreen/tsc2007.txt
@@ -6,7 +6,7 @@ Required properties:
- ti,x-plate-ohms: X-plate resistance in ohms.
Optional properties:
-- gpios: the interrupt gpio the chip is connected to (trough the penirq pin).
+- gpios: the interrupt gpio the chip is connected to (through the penirq pin).
The penirq pin goes to low when the panel is touched.
(see GPIO binding[1] for more details).
- interrupts: (gpio) interrupt to which the chip is connected
diff --git a/sys/contrib/device-tree/Bindings/input/twl4030-pwrbutton.txt b/sys/contrib/device-tree/Bindings/input/twl4030-pwrbutton.txt
index f5021214edec..6c201a2ba8ac 100644
--- a/sys/contrib/device-tree/Bindings/input/twl4030-pwrbutton.txt
+++ b/sys/contrib/device-tree/Bindings/input/twl4030-pwrbutton.txt
@@ -1,7 +1,7 @@
Texas Instruments TWL family (twl4030) pwrbutton module
This module is part of the TWL4030. For more details about the whole
-chip see Documentation/devicetree/bindings/mfd/twl-family.txt.
+chip see Documentation/devicetree/bindings/mfd/ti,twl.yaml.
This module provides a simple power button event via an Interrupt.
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8939.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8939.yaml
new file mode 100644
index 000000000000..fd15ab5014fb
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8939.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,msm8939.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm MSM8939 Network-On-Chip interconnect
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+ The Qualcomm MSM8939 interconnect providers support adjusting the
+ bandwidth requirements between the various NoC fabrics.
+
+allOf:
+ - $ref: qcom,rpm-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - qcom,msm8939-bimc
+ - qcom,msm8939-pcnoc
+ - qcom,msm8939-snoc
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ '^interconnect-[a-z0-9\-]+$':
+ type: object
+ $ref: qcom,rpm-common.yaml#
+ description:
+ The interconnect providers do not have a separate QoS register space,
+ but share parent's space.
+
+ allOf:
+ - $ref: qcom,rpm-common.yaml#
+
+ properties:
+ compatible:
+ const: qcom,msm8939-snoc-mm
+
+ required:
+ - compatible
+
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+
+ snoc: interconnect@580000 {
+ compatible = "qcom,msm8939-snoc";
+ reg = <0x00580000 0x14000>;
+ #interconnect-cells = <1>;
+ };
+
+ bimc: interconnect@400000 {
+ compatible = "qcom,msm8939-bimc";
+ reg = <0x00400000 0x62000>;
+ #interconnect-cells = <1>;
+
+ snoc_mm: interconnect-snoc {
+ compatible = "qcom,msm8939-snoc-mm";
+ #interconnect-cells = <1>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8996.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8996.yaml
new file mode 100644
index 000000000000..e3f964aaad1b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8996.yaml
@@ -0,0 +1,126 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,msm8996.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm MSM8996 Network-On-Chip interconnect
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+ The Qualcomm MSM8996 interconnect providers support adjusting the
+ bandwidth requirements between the various NoC fabrics.
+
+properties:
+ compatible:
+ enum:
+ - qcom,msm8996-a0noc
+ - qcom,msm8996-a1noc
+ - qcom,msm8996-a2noc
+ - qcom,msm8996-bimc
+ - qcom,msm8996-cnoc
+ - qcom,msm8996-mnoc
+ - qcom,msm8996-pnoc
+ - qcom,msm8996-snoc
+
+ reg:
+ maxItems: 1
+
+ clock-names:
+ minItems: 1
+ maxItems: 3
+
+ clocks:
+ minItems: 1
+ maxItems: 3
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+allOf:
+ - $ref: qcom,rpm-common.yaml#
+ - if:
+ properties:
+ compatible:
+ const: qcom,msm8996-a0noc
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Aggregate0 System NoC AXI Clock.
+ - description: Aggregate0 Config NoC AHB Clock.
+ - description: Aggregate0 NoC MPU Clock.
+
+ clock-names:
+ items:
+ - const: aggre0_snoc_axi
+ - const: aggre0_cnoc_ahb
+ - const: aggre0_noc_mpu_cfg
+
+ required:
+ - power-domains
+
+ - if:
+ properties:
+ compatible:
+ const: qcom,msm8996-mnoc
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: CPU-NoC High-performance Bus Clock.
+
+ clock-names:
+ const: iface
+
+ - if:
+ properties:
+ compatible:
+ const: qcom,msm8996-a2noc
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Aggregate2 NoC UFS AXI Clock
+ - description: UFS AXI Clock
+
+ clock-names:
+ items:
+ - const: aggre2_ufs_axi
+ - const: ufs_axi
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-msm8996.h>
+ #include <dt-bindings/clock/qcom,mmcc-msm8996.h>
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+
+ bimc: interconnect@408000 {
+ compatible = "qcom,msm8996-bimc";
+ reg = <0x00408000 0x5a000>;
+ #interconnect-cells = <1>;
+ };
+
+ a0noc: interconnect@543000 {
+ compatible = "qcom,msm8996-a0noc";
+ reg = <0x00543000 0x6000>;
+ #interconnect-cells = <1>;
+ clocks = <&gcc GCC_AGGRE0_SNOC_AXI_CLK>,
+ <&gcc GCC_AGGRE0_CNOC_AHB_CLK>,
+ <&gcc GCC_AGGRE0_NOC_MPU_CFG_AHB_CLK>;
+ clock-names = "aggre0_snoc_axi",
+ "aggre0_cnoc_ahb",
+ "aggre0_noc_mpu_cfg";
+ power-domains = <&gcc AGGRE0_NOC_GDSC>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8998-bwmon.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8998-bwmon.yaml
index 5d17bdcfdf70..05067e197abe 100644
--- a/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8998-bwmon.yaml
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,msm8998-bwmon.yaml
@@ -25,15 +25,25 @@ properties:
- const: qcom,msm8998-bwmon # BWMON v4
- items:
- enum:
+ - qcom,qcm2290-cpu-bwmon
+ - qcom,sc7180-cpu-bwmon
- qcom,sc7280-cpu-bwmon
- qcom,sc8280xp-cpu-bwmon
- qcom,sdm845-cpu-bwmon
+ - qcom,sm6115-cpu-bwmon
+ - qcom,sm6350-llcc-bwmon
+ - qcom,sm8250-cpu-bwmon
- qcom,sm8550-cpu-bwmon
+ - qcom,sm8650-cpu-bwmon
- const: qcom,sdm845-bwmon # BWMON v4, unified register space
- items:
- enum:
+ - qcom,sc7180-llcc-bwmon
- qcom,sc8280xp-llcc-bwmon
+ - qcom,sm6350-cpu-bwmon
+ - qcom,sm8250-llcc-bwmon
- qcom,sm8550-llcc-bwmon
+ - qcom,sm8650-llcc-bwmon
- const: qcom,sc7280-llcc-bwmon
- const: qcom,sc7280-llcc-bwmon # BWMON v5
- const: qcom,sdm845-llcc-bwmon # BWMON v5
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,osm-l3.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,osm-l3.yaml
index 9d0a98d77ae9..21dae0b92819 100644
--- a/sys/contrib/device-tree/Bindings/interconnect/qcom,osm-l3.yaml
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,osm-l3.yaml
@@ -21,6 +21,7 @@ properties:
- enum:
- qcom,sc7180-osm-l3
- qcom,sc8180x-osm-l3
+ - qcom,sdm670-osm-l3
- qcom,sdm845-osm-l3
- qcom,sm6350-osm-l3
- qcom,sm8150-osm-l3
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,qcm2290.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,qcm2290.yaml
index f65a2fe846de..b6c15314c5c5 100644
--- a/sys/contrib/device-tree/Bindings/interconnect/qcom,qcm2290.yaml
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,qcm2290.yaml
@@ -13,6 +13,9 @@ description: |
The Qualcomm QCM2290 interconnect providers support adjusting the
bandwidth requirements between the various NoC fabrics.
+allOf:
+ - $ref: qcom,rpm-common.yaml#
+
properties:
reg:
maxItems: 1
@@ -23,19 +26,6 @@ properties:
- qcom,qcm2290-cnoc
- qcom,qcm2290-snoc
- '#interconnect-cells':
- const: 1
-
- clock-names:
- items:
- - const: bus
- - const: bus_a
-
- clocks:
- items:
- - description: Bus Clock
- - description: Bus A Clock
-
# Child node's properties
patternProperties:
'^interconnect-[a-z0-9]+$':
@@ -44,6 +34,9 @@ patternProperties:
The interconnect providers do not have a separate QoS register space,
but share parent's space.
+ allOf:
+ - $ref: qcom,rpm-common.yaml#
+
properties:
compatible:
enum:
@@ -51,35 +44,16 @@ patternProperties:
- qcom,qcm2290-mmrt-virt
- qcom,qcm2290-mmnrt-virt
- '#interconnect-cells':
- const: 1
-
- clock-names:
- items:
- - const: bus
- - const: bus_a
-
- clocks:
- items:
- - description: Bus Clock
- - description: Bus A Clock
-
required:
- compatible
- - '#interconnect-cells'
- - clock-names
- - clocks
- additionalProperties: false
+ unevaluatedProperties: false
required:
- compatible
- reg
- - '#interconnect-cells'
- - clock-names
- - clocks
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
@@ -89,32 +63,20 @@ examples:
compatible = "qcom,qcm2290-snoc";
reg = <0x01880000 0x60200>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
qup_virt: interconnect-qup {
compatible = "qcom,qcm2290-qup-virt";
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_QUP_CLK>,
- <&rpmcc RPM_SMD_QUP_A_CLK>;
};
mmnrt_virt: interconnect-mmnrt {
compatible = "qcom,qcm2290-mmnrt-virt";
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_MMNRT_CLK>,
- <&rpmcc RPM_SMD_MMNRT_A_CLK>;
};
mmrt_virt: interconnect-mmrt {
compatible = "qcom,qcm2290-mmrt-virt";
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_MMRT_CLK>,
- <&rpmcc RPM_SMD_MMRT_A_CLK>;
};
};
@@ -122,16 +84,10 @@ examples:
compatible = "qcom,qcm2290-cnoc";
reg = <0x01900000 0x8200>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
- <&rpmcc RPM_SMD_CNOC_A_CLK>;
};
bimc: interconnect@4480000 {
compatible = "qcom,qcm2290-bimc";
reg = <0x04480000 0x80000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
};
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm-common.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm-common.yaml
new file mode 100644
index 000000000000..1ea52b091609
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm-common.yaml
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,rpm-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPMh Network-On-Chip Interconnect
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description:
+ RPM interconnect providers support for managing system bandwidth requirements
+ through manual requests based on either predefined values or as indicated by
+ the bus monitor hardware. Each provider node represents a NoC bus master,
+ driven by a dedicated clock source.
+
+properties:
+ '#interconnect-cells':
+ oneOf:
+ - const: 2
+ - const: 1
+ deprecated: true
+
+required:
+ - '#interconnect-cells'
+
+additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm.yaml
index 4f95d512012a..08c1c6b9d7cf 100644
--- a/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm.yaml
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,rpm.yaml
@@ -7,13 +7,16 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm RPM Network-On-Chip Interconnect
maintainers:
- - Georgi Djakov <georgi.djakov@linaro.org>
+ - Georgi Djakov <djakov@kernel.org>
description: |
RPM interconnect providers support system bandwidth requirements through
RPM processor. The provider is able to communicate with the RPM through
the RPM shared memory device.
+allOf:
+ - $ref: qcom,rpm-common.yaml#
+
properties:
reg:
maxItems: 1
@@ -23,259 +26,22 @@ properties:
- qcom,msm8916-bimc
- qcom,msm8916-pcnoc
- qcom,msm8916-snoc
- - qcom,msm8939-bimc
- - qcom,msm8939-pcnoc
- - qcom,msm8939-snoc
- - qcom,msm8996-a0noc
- - qcom,msm8996-a1noc
- - qcom,msm8996-a2noc
- - qcom,msm8996-bimc
- - qcom,msm8996-cnoc
- - qcom,msm8996-mnoc
- - qcom,msm8996-pnoc
- - qcom,msm8996-snoc
- qcom,qcs404-bimc
- qcom,qcs404-pcnoc
- qcom,qcs404-snoc
- - qcom,sdm660-a2noc
- - qcom,sdm660-bimc
- - qcom,sdm660-cnoc
- - qcom,sdm660-gnoc
- - qcom,sdm660-mnoc
- - qcom,sdm660-snoc
-
- '#interconnect-cells':
- description: |
- Value: <1> is one cell in an interconnect specifier for the
- interconnect node id, <2> requires the interconnect node id and an
- extra path tag.
- enum: [ 1, 2 ]
-
- clocks:
- minItems: 2
- maxItems: 7
-
- clock-names:
- minItems: 2
- maxItems: 7
-
- power-domains:
- maxItems: 1
-
-# Child node's properties
-patternProperties:
- '^interconnect-[a-z0-9]+$':
- type: object
- additionalProperties: false
- description:
- snoc-mm is a child of snoc, sharing snoc's register address space.
-
- properties:
- compatible:
- enum:
- - qcom,msm8939-snoc-mm
-
- '#interconnect-cells':
- const: 1
-
- clock-names:
- items:
- - const: bus
- - const: bus_a
-
- clocks:
- items:
- - description: Bus Clock
- - description: Bus A Clock
-
- required:
- - compatible
- - '#interconnect-cells'
- - clock-names
- - clocks
required:
- compatible
- reg
- - '#interconnect-cells'
- - clock-names
- - clocks
-
-additionalProperties: false
-
-allOf:
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8916-bimc
- - qcom,msm8916-pcnoc
- - qcom,msm8916-snoc
- - qcom,msm8939-bimc
- - qcom,msm8939-pcnoc
- - qcom,msm8939-snoc
- - qcom,msm8996-a1noc
- - qcom,msm8996-bimc
- - qcom,msm8996-cnoc
- - qcom,msm8996-pnoc
- - qcom,msm8996-snoc
- - qcom,qcs404-bimc
- - qcom,qcs404-pcnoc
- - qcom,qcs404-snoc
- - qcom,sdm660-bimc
- - qcom,sdm660-cnoc
- - qcom,sdm660-gnoc
- - qcom,sdm660-snoc
-
- then:
- properties:
- clock-names:
- items:
- - const: bus
- - const: bus_a
-
- clocks:
- items:
- - description: Bus Clock
- - description: Bus A Clock
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8996-mnoc
- - qcom,sdm660-mnoc
-
- then:
- properties:
- clock-names:
- items:
- - const: bus
- - const: bus_a
- - const: iface
-
- clocks:
- items:
- - description: Bus Clock.
- - description: Bus A Clock.
- - description: CPU-NoC High-performance Bus Clock.
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8996-a0noc
-
- then:
- properties:
- clock-names:
- items:
- - const: aggre0_snoc_axi
- - const: aggre0_cnoc_ahb
- - const: aggre0_noc_mpu_cfg
-
- clocks:
- items:
- - description: Aggregate0 System NoC AXI Clock.
- - description: Aggregate0 Config NoC AHB Clock.
- - description: Aggregate0 NoC MPU Clock.
-
- required:
- - power-domains
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8996-a2noc
-
- then:
- properties:
- clock-names:
- items:
- - const: bus
- - const: bus_a
- - const: aggre2_ufs_axi
- - const: ufs_axi
-
- clocks:
- items:
- - description: Bus Clock
- - description: Bus A Clock
- - description: Aggregate2 NoC UFS AXI Clock
- - description: UFS AXI Clock
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sdm660-a2noc
-
- then:
- properties:
- clock-names:
- items:
- - const: bus
- - const: bus_a
- - const: ipa
- - const: ufs_axi
- - const: aggre2_ufs_axi
- - const: aggre2_usb3_axi
- - const: cfg_noc_usb2_axi
-
- clocks:
- items:
- - description: Bus Clock.
- - description: Bus A Clock.
- - description: IPA Clock.
- - description: UFS AXI Clock.
- - description: Aggregate2 UFS AXI Clock.
- - description: Aggregate2 USB3 AXI Clock.
- - description: Config NoC USB2 AXI Clock.
-
- - if:
- not:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8939-snoc
- then:
- patternProperties:
- '^interconnect-[a-z0-9]+$': false
+unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmcc.h>
bimc: interconnect@400000 {
- compatible = "qcom,msm8916-bimc";
- reg = <0x00400000 0x62000>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
- };
-
- pcnoc: interconnect@500000 {
- compatible = "qcom,msm8916-pcnoc";
- reg = <0x00500000 0x11000>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_PCNOC_CLK>,
- <&rpmcc RPM_SMD_PCNOC_A_CLK>;
- };
-
- snoc: interconnect@580000 {
- compatible = "qcom,msm8916-snoc";
- reg = <0x00580000 0x14000>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
+ compatible = "qcom,msm8916-bimc";
+ reg = <0x00400000 0x62000>;
+ #interconnect-cells = <1>;
};
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,rpmh.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,rpmh.yaml
index 4d93ad415e0b..74ab080249ff 100644
--- a/sys/contrib/device-tree/Bindings/interconnect/qcom,rpmh.yaml
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,rpmh.yaml
@@ -18,9 +18,6 @@ description: |
least one RPMh device child node pertaining to their RSC and each provider
can map to multiple RPMh resources.
-allOf:
- - $ref: qcom,rpmh-common.yaml#
-
properties:
reg:
maxItems: 1
@@ -91,6 +88,7 @@ properties:
- qcom,sm8250-mc-virt
- qcom,sm8250-mmss-noc
- qcom,sm8250-npu-noc
+ - qcom,sm8250-qup-virt
- qcom,sm8250-system-noc
- qcom,sm8350-aggre1-noc
- qcom,sm8350-aggre2-noc
@@ -107,7 +105,20 @@ properties:
required:
- compatible
- - reg
+
+allOf:
+ - $ref: qcom,rpmh-common.yaml#
+ - if:
+ not:
+ properties:
+ compatible:
+ enum:
+ - qcom,sdx65-mc-virt
+ - qcom,sm8250-qup-virt
+ then:
+ required:
+ - reg
+
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,sdm660.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,sdm660.yaml
index bcd41e491f1d..8f6bc6399626 100644
--- a/sys/contrib/device-tree/Bindings/interconnect/qcom,sdm660.yaml
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,sdm660.yaml
@@ -7,16 +7,13 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm SDM660 Network-On-Chip interconnect
maintainers:
- - AngeloGioacchino Del Regno <kholk11@gmail.com>
+ - Konrad Dybcio <konradybcio@kernel.org>
description: |
The Qualcomm SDM660 interconnect providers support adjusting the
bandwidth requirements between the various NoC fabrics.
properties:
- reg:
- maxItems: 1
-
compatible:
enum:
- qcom,sdm660-a2noc
@@ -26,160 +23,86 @@ properties:
- qcom,sdm660-mnoc
- qcom,sdm660-snoc
- '#interconnect-cells':
- const: 1
+ reg:
+ maxItems: 1
- clocks:
+ clock-names:
minItems: 1
- maxItems: 7
+ maxItems: 5
- clock-names:
+ clocks:
minItems: 1
- maxItems: 7
+ maxItems: 5
required:
- compatible
- reg
- - '#interconnect-cells'
- - clock-names
- - clocks
-additionalProperties: false
+unevaluatedProperties: false
allOf:
+ - $ref: qcom,rpm-common.yaml#
- if:
properties:
compatible:
- contains:
- enum:
- - qcom,sdm660-mnoc
+ const: qcom,sdm660-mnoc
+
then:
properties:
clocks:
items:
- - description: Bus Clock.
- - description: Bus A Clock.
- description: CPU-NoC High-performance Bus Clock.
+
clock-names:
- items:
- - const: bus
- - const: bus_a
- - const: iface
+ const: iface
- if:
properties:
compatible:
- contains:
- enum:
- - qcom,sdm660-a2noc
+ const: qcom,sdm660-a2noc
+
then:
properties:
clocks:
items:
- - description: Bus Clock.
- - description: Bus A Clock.
- description: IPA Clock.
- description: UFS AXI Clock.
- description: Aggregate2 UFS AXI Clock.
- description: Aggregate2 USB3 AXI Clock.
- description: Config NoC USB2 AXI Clock.
+
clock-names:
items:
- - const: bus
- - const: bus_a
- const: ipa
- const: ufs_axi
- const: aggre2_ufs_axi
- const: aggre2_usb3_axi
- const: cfg_noc_usb2_axi
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sdm660-bimc
- - qcom,sdm660-cnoc
- - qcom,sdm660-gnoc
- - qcom,sdm660-snoc
- then:
- properties:
- clocks:
- items:
- - description: Bus Clock.
- - description: Bus A Clock.
- clock-names:
- items:
- - const: bus
- - const: bus_a
-
examples:
- |
- #include <dt-bindings/clock/qcom,rpmcc.h>
- #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
- #include <dt-bindings/clock/qcom,gcc-sdm660.h>
-
- bimc: interconnect@1008000 {
- compatible = "qcom,sdm660-bimc";
- reg = <0x01008000 0x78000>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
- };
-
- cnoc: interconnect@1500000 {
- compatible = "qcom,sdm660-cnoc";
- reg = <0x01500000 0x10000>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
- <&rpmcc RPM_SMD_CNOC_A_CLK>;
- };
-
- snoc: interconnect@1626000 {
- compatible = "qcom,sdm660-snoc";
- reg = <0x01626000 0x7090>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
- };
-
- a2noc: interconnect@1704000 {
- compatible = "qcom,sdm660-a2noc";
- reg = <0x01704000 0xc100>;
- #interconnect-cells = <1>;
- clock-names = "bus",
- "bus_a",
- "ipa",
- "ufs_axi",
- "aggre2_ufs_axi",
- "aggre2_usb3_axi",
- "cfg_noc_usb2_axi";
- clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
- <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
- <&rpmcc RPM_SMD_IPA_CLK>,
- <&gcc GCC_UFS_AXI_CLK>,
- <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
- <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
- <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
- };
-
- mnoc: interconnect@1745000 {
- compatible = "qcom,sdm660-mnoc";
- reg = <0x01745000 0xa010>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a", "iface";
- clocks = <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK>,
- <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK_A>,
- <&mmcc AHB_CLK_SRC>;
- };
-
- gnoc: interconnect@17900000 {
- compatible = "qcom,sdm660-gnoc";
- reg = <0x17900000 0xe000>;
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&xo_board>, <&xo_board>;
- };
+ #include <dt-bindings/clock/qcom,gcc-sdm660.h>
+ #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+
+ bimc: interconnect@1008000 {
+ compatible = "qcom,sdm660-bimc";
+ reg = <0x01008000 0x78000>;
+ #interconnect-cells = <1>;
+ };
+
+ a2noc: interconnect@1704000 {
+ compatible = "qcom,sdm660-a2noc";
+ reg = <0x01704000 0xc100>;
+ #interconnect-cells = <1>;
+ clocks = <&rpmcc RPM_SMD_IPA_CLK>,
+ <&gcc GCC_UFS_AXI_CLK>,
+ <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
+ <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
+ <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
+ clock-names = "ipa",
+ "ufs_axi",
+ "aggre2_ufs_axi",
+ "aggre2_usb3_axi",
+ "cfg_noc_usb2_axi";
+ };
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,sdx75-rpmh.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,sdx75-rpmh.yaml
new file mode 100644
index 000000000000..71cf7e252bfc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,sdx75-rpmh.yaml
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,sdx75-rpmh.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPMh Network-On-Chip Interconnect on SDX75
+
+maintainers:
+ - Rohit Agarwal <quic_rohiagar@quicinc.com>
+
+description:
+ RPMh interconnect providers support system bandwidth requirements through
+ RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
+ able to communicate with the BCM through the Resource State Coordinator (RSC)
+ associated with each execution environment. Provider nodes must point to at
+ least one RPMh device child node pertaining to their RSC and each provider
+ can map to multiple RPMh resources.
+
+properties:
+ compatible:
+ enum:
+ - qcom,sdx75-clk-virt
+ - qcom,sdx75-dc-noc
+ - qcom,sdx75-gem-noc
+ - qcom,sdx75-mc-virt
+ - qcom,sdx75-pcie-anoc
+ - qcom,sdx75-system-noc
+
+ '#interconnect-cells': true
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+
+allOf:
+ - $ref: qcom,rpmh-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sdx75-clk-virt
+ - qcom,sdx75-mc-virt
+ then:
+ properties:
+ reg: false
+ else:
+ required:
+ - reg
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sdx75-clk-virt
+ then:
+ properties:
+ clocks:
+ items:
+ - description: RPMH CC QPIC Clock
+ required:
+ - clocks
+ else:
+ properties:
+ clocks: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+
+ clk_virt: interconnect-0 {
+ compatible = "qcom,sdx75-clk-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ clocks = <&rpmhcc RPMH_QPIC_CLK>;
+ };
+
+ system_noc: interconnect@1640000 {
+ compatible = "qcom,sdx75-system-noc";
+ reg = <0x1640000 0x4b400>;
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,sm6115.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,sm6115.yaml
new file mode 100644
index 000000000000..14b1a0b08e73
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,sm6115.yaml
@@ -0,0 +1,152 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,sm6115.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM6115 Network-On-Chip interconnect
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description:
+ The Qualcomm SM6115 interconnect providers support adjusting the
+ bandwidth requirements between the various NoC fabrics.
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm6115-bimc
+ - qcom,sm6115-cnoc
+ - qcom,sm6115-snoc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ maxItems: 4
+
+ clock-names:
+ minItems: 1
+ maxItems: 4
+
+# Child node's properties
+patternProperties:
+ '^interconnect-[a-z0-9]+$':
+ type: object
+ description:
+ The interconnect providers do not have a separate QoS register space,
+ but share parent's space.
+
+ $ref: qcom,rpm-common.yaml#
+
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6115-clk-virt
+ - qcom,sm6115-mmrt-virt
+ - qcom,sm6115-mmnrt-virt
+
+ required:
+ - compatible
+
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: qcom,rpm-common.yaml#
+ - if:
+ properties:
+ compatible:
+ const: qcom,sm6115-cnoc
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: USB-NoC AXI clock
+
+ clock-names:
+ items:
+ - const: usb_axi
+
+ - if:
+ properties:
+ compatible:
+ const: qcom,sm6115-snoc
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: CPU-NoC AXI clock.
+ - description: UFS-NoC AXI clock.
+ - description: USB-NoC AXI clock.
+ - description: IPA clock.
+
+ clock-names:
+ items:
+ - const: cpu_axi
+ - const: ufs_axi
+ - const: usb_axi
+ - const: ipa
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6115-bimc
+ - qcom,sm6115-clk-virt
+ - qcom,sm6115-mmrt-virt
+ - qcom,sm6115-mmnrt-virt
+
+ then:
+ properties:
+ clocks: false
+ clock-names: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-sm6115.h>
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+
+ snoc: interconnect@1880000 {
+ compatible = "qcom,sm6115-snoc";
+ reg = <0x01880000 0x60200>;
+ clocks = <&gcc GCC_SYS_NOC_CPUSS_AHB_CLK>,
+ <&gcc GCC_SYS_NOC_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_SYS_NOC_USB3_PRIM_AXI_CLK>,
+ <&rpmcc RPM_SMD_IPA_CLK>;
+ clock-names = "cpu_axi",
+ "ufs_axi",
+ "usb_axi",
+ "ipa";
+ #interconnect-cells = <1>;
+
+ qup_virt: interconnect-clk {
+ compatible = "qcom,sm6115-clk-virt";
+ #interconnect-cells = <1>;
+ };
+
+ mmnrt_virt: interconnect-mmnrt {
+ compatible = "qcom,sm6115-mmnrt-virt";
+ #interconnect-cells = <1>;
+ };
+
+ mmrt_virt: interconnect-mmrt {
+ compatible = "qcom,sm6115-mmrt-virt";
+ #interconnect-cells = <1>;
+ };
+ };
+
+ cnoc: interconnect@1900000 {
+ compatible = "qcom,sm6115-cnoc";
+ reg = <0x01900000 0x8200>;
+ #interconnect-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,sm8650-rpmh.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,sm8650-rpmh.yaml
new file mode 100644
index 000000000000..f9322de7cd61
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,sm8650-rpmh.yaml
@@ -0,0 +1,136 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,sm8650-rpmh.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPMh Network-On-Chip Interconnect on SM8650
+
+maintainers:
+ - Abel Vesa <abel.vesa@linaro.org>
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+description: |
+ RPMh interconnect providers support system bandwidth requirements through
+ RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
+ able to communicate with the BCM through the Resource State Coordinator (RSC)
+ associated with each execution environment. Provider nodes must point to at
+ least one RPMh device child node pertaining to their RSC and each provider
+ can map to multiple RPMh resources.
+
+ See also:: include/dt-bindings/interconnect/qcom,sm8650-rpmh.h
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm8650-aggre1-noc
+ - qcom,sm8650-aggre2-noc
+ - qcom,sm8650-clk-virt
+ - qcom,sm8650-cnoc-main
+ - qcom,sm8650-config-noc
+ - qcom,sm8650-gem-noc
+ - qcom,sm8650-lpass-ag-noc
+ - qcom,sm8650-lpass-lpiaon-noc
+ - qcom,sm8650-lpass-lpicx-noc
+ - qcom,sm8650-mc-virt
+ - qcom,sm8650-mmss-noc
+ - qcom,sm8650-nsp-noc
+ - qcom,sm8650-pcie-anoc
+ - qcom,sm8650-system-noc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+required:
+ - compatible
+
+allOf:
+ - $ref: qcom,rpmh-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8650-clk-virt
+ - qcom,sm8650-mc-virt
+ then:
+ properties:
+ reg: false
+ else:
+ required:
+ - reg
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8650-pcie-anoc
+ then:
+ properties:
+ clocks:
+ items:
+ - description: aggre-NOC PCIe AXI clock
+ - description: cfg-NOC PCIe a-NOC AHB clock
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8650-aggre1-noc
+ then:
+ properties:
+ clocks:
+ items:
+ - description: aggre UFS PHY AXI clock
+ - description: aggre USB3 PRIM AXI clock
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8650-aggre2-noc
+ then:
+ properties:
+ clocks:
+ items:
+ - description: RPMH CC IPA clock
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8650-aggre1-noc
+ - qcom,sm8650-aggre2-noc
+ - qcom,sm8650-pcie-anoc
+ then:
+ required:
+ - clocks
+ else:
+ properties:
+ clocks: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ clk_virt: interconnect-0 {
+ compatible = "qcom,sm8650-clk-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ aggre1_noc: interconnect@16e0000 {
+ compatible = "qcom,sm8650-aggre1-noc";
+ reg = <0x016e0000 0x14400>;
+ #interconnect-cells = <2>;
+ clocks = <&gcc_phy_axi_clk>, <&gcc_prim_axi_clk>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/interconnect/qcom,x1e80100-rpmh.yaml b/sys/contrib/device-tree/Bindings/interconnect/qcom,x1e80100-rpmh.yaml
new file mode 100644
index 000000000000..08b0210e0e59
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interconnect/qcom,x1e80100-rpmh.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,x1e80100-rpmh.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPMh Network-On-Chip Interconnect on X1E80100
+
+maintainers:
+ - Rajendra Nayak <quic_rjendra@quicinc.com>
+ - Abel Vesa <abel.vesa@linaro.org>
+
+description: |
+ RPMh interconnect providers support system bandwidth requirements through
+ RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider is
+ able to communicate with the BCM through the Resource State Coordinator (RSC)
+ associated with each execution environment. Provider nodes must point to at
+ least one RPMh device child node pertaining to their RSC and each provider
+ can map to multiple RPMh resources.
+
+ See also:: include/dt-bindings/interconnect/qcom,x1e80100-rpmh.h
+
+properties:
+ compatible:
+ enum:
+ - qcom,x1e80100-aggre1-noc
+ - qcom,x1e80100-aggre2-noc
+ - qcom,x1e80100-clk-virt
+ - qcom,x1e80100-cnoc-cfg
+ - qcom,x1e80100-cnoc-main
+ - qcom,x1e80100-gem-noc
+ - qcom,x1e80100-lpass-ag-noc
+ - qcom,x1e80100-lpass-lpiaon-noc
+ - qcom,x1e80100-lpass-lpicx-noc
+ - qcom,x1e80100-mc-virt
+ - qcom,x1e80100-mmss-noc
+ - qcom,x1e80100-nsp-noc
+ - qcom,x1e80100-pcie-center-anoc
+ - qcom,x1e80100-pcie-north-anoc
+ - qcom,x1e80100-pcie-south-anoc
+ - qcom,x1e80100-system-noc
+ - qcom,x1e80100-usb-center-anoc
+ - qcom,x1e80100-usb-north-anoc
+ - qcom,x1e80100-usb-south-anoc
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+
+allOf:
+ - $ref: qcom,rpmh-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,x1e80100-clk-virt
+ - qcom,x1e80100-mc-virt
+ then:
+ properties:
+ reg: false
+ else:
+ required:
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ clk_virt: interconnect-0 {
+ compatible = "qcom,x1e80100-clk-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ aggre1_noc: interconnect@16e0000 {
+ compatible = "qcom,x1e80100-aggre1-noc";
+ reg = <0x016e0000 0x14400>;
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
index e84e4f33b358..3d06db98e978 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml
@@ -35,6 +35,7 @@ properties:
- amlogic,meson-sm1-gpio-intc
- amlogic,meson-a1-gpio-intc
- amlogic,meson-s4-gpio-intc
+ - amlogic,c3-gpio-intc
- const: amlogic,meson-gpio-intc
reg:
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/arm,gic-v3.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/arm,gic-v3.yaml
index 39e64c7f6360..0f4a062c9d6f 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/arm,gic-v3.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/arm,gic-v3.yaml
@@ -49,7 +49,7 @@ properties:
The 2nd cell contains the interrupt number for the interrupt type.
SPI interrupts are in the range [0-987]. PPI interrupts are in the
- range [0-15]. Extented SPI interrupts are in the range [0-1023].
+ range [0-15]. Extended SPI interrupts are in the range [0-1023].
Extended PPI interrupts are in the range [0-127].
The 3rd cell is the flags, encoded as follows:
@@ -106,6 +106,12 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 4096
+ dma-noncoherent:
+ description:
+ Present if the GIC redistributors permit programming shareability
+ and cacheability attributes but are connected to a non-coherent
+ downstream interconnect.
+
msi-controller:
description:
Only present if the Message Based Interrupt functionality is
@@ -193,6 +199,12 @@ patternProperties:
compatible:
const: arm,gic-v3-its
+ dma-noncoherent:
+ description:
+ Present if the GIC ITS permits programming shareability and
+ cacheability attributes but is connected to a non-coherent
+ downstream interconnect.
+
msi-controller: true
"#msi-cells":
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/arm,versatile-fpga-irq.txt b/sys/contrib/device-tree/Bindings/interrupt-controller/arm,versatile-fpga-irq.txt
index 2a1d16bdf834..ea939f54c5eb 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/arm,versatile-fpga-irq.txt
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/arm,versatile-fpga-irq.txt
@@ -6,7 +6,7 @@ controllers are OR:ed together and fed to the CPU tile's IRQ input. Each
instance can handle up to 32 interrupts.
Required properties:
-- compatible: "arm,versatile-fpga-irq" or "oxsemi,ox810se-rps-irq"
+- compatible: "arm,versatile-fpga-irq"
- interrupt-controller: Identifies the node as an interrupt controller
- #interrupt-cells: The number of cells to define the interrupts. Must be 1
as the FPGA IRQ controller has no configuration options for interrupt
@@ -19,6 +19,8 @@ Required properties:
the system till not make it possible for devices to request these
interrupts.
+The "oxsemi,ox810se-rps-irq" compatible is deprecated.
+
Example:
pic: pic@14000000 {
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt b/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
index 0f1af5a1c12e..bdd173056f72 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
@@ -70,7 +70,7 @@ Bank 1:
25: DMA9
26: DMA10
27: DMA11-14 - shared interrupt for DMA 11 to 14
-28: DMAALL - triggers on all dma interrupts (including chanel 15)
+28: DMAALL - triggers on all dma interrupts (including channel 15)
29: AUX
30: ARM
31: VPUDMA
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm7120-l2-intc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm7120-l2-intc.yaml
index c680de1cbd56..786f2426399b 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm7120-l2-intc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/brcm,bcm7120-l2-intc.yaml
@@ -59,7 +59,7 @@ description: >
..
31 ........................ X
- The BCM3380 Level 1 / Level 2 interrrupt controller shows up in various forms
+ The BCM3380 Level 1 / Level 2 interrupt controller shows up in various forms
on many BCM338x/BCM63xx chipsets. It has the following properties:
- outputs a single interrupt signal to its interrupt controller parent
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/loongson,liointc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/loongson,liointc.yaml
index 00b570c82903..60441f0c5d72 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/loongson,liointc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/loongson,liointc.yaml
@@ -11,8 +11,13 @@ maintainers:
description: |
This interrupt controller is found in the Loongson-3 family of chips and
- Loongson-2K1000 chip, as the primary package interrupt controller which
+ Loongson-2K series chips, as the primary package interrupt controller which
can route local I/O interrupt to interrupt lines of cores.
+ Be aware of the following points.
+ 1.The Loongson-2K0500 is a single core CPU;
+ 2.The Loongson-2K0500/2K1000 has 64 device interrupt sources as inputs, so we
+ need to define two nodes in dts{i} to describe the "0-31" and "32-61" interrupt
+ sources respectively.
allOf:
- $ref: /schemas/interrupt-controller.yaml#
@@ -33,6 +38,7 @@ properties:
- const: main
- const: isr0
- const: isr1
+ minItems: 2
interrupt-controller: true
@@ -45,11 +51,9 @@ properties:
interrupt-names:
description: List of names for the parent interrupts.
items:
- - const: int0
- - const: int1
- - const: int2
- - const: int3
+ pattern: int[0-3]
minItems: 1
+ maxItems: 4
'#interrupt-cells':
const: 2
@@ -69,6 +73,7 @@ required:
- compatible
- reg
- interrupts
+ - interrupt-names
- interrupt-controller
- '#interrupt-cells'
- loongson,parent_int_map
@@ -86,7 +91,8 @@ if:
then:
properties:
reg:
- minItems: 3
+ minItems: 2
+ maxItems: 3
required:
- reg-names
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,mpm.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,mpm.yaml
index 509d20c091af..ebb40c48950a 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,mpm.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,mpm.yaml
@@ -29,6 +29,12 @@ properties:
maxItems: 1
description:
Specifies the base address and size of vMPM registers in RPM MSG RAM.
+ deprecated: true
+
+ qcom,rpm-msg-ram:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the APSS MPM slice of the RPM Message RAM
interrupts:
maxItems: 1
@@ -62,35 +68,51 @@ properties:
- description: MPM pin number
- description: GIC SPI number for the MPM pin
+ '#power-domain-cells':
+ const: 0
+
required:
- compatible
- - reg
- interrupts
- mboxes
- interrupt-controller
- '#interrupt-cells'
- qcom,mpm-pin-count
- qcom,mpm-pin-map
+ - qcom,rpm-msg-ram
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
- mpm: interrupt-controller@45f01b8 {
- compatible = "qcom,mpm";
- interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
- reg = <0x45f01b8 0x1000>;
- mboxes = <&apcs_glb 1>;
- interrupt-controller;
- #interrupt-cells = <2>;
- interrupt-parent = <&intc>;
- qcom,mpm-pin-count = <96>;
- qcom,mpm-pin-map = <2 275>,
- <5 296>,
- <12 422>,
- <24 79>,
- <86 183>,
- <90 260>,
- <91 260>;
+
+ remoteproc-rpm {
+ compatible = "qcom,msm8998-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+ };
+
+ mpm: interrupt-controller {
+ compatible = "qcom,mpm";
+ qcom,rpm-msg-ram = <&apss_mpm>;
+ interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
+ mboxes = <&apcs_glb 1>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&intc>;
+ qcom,mpm-pin-count = <96>;
+ qcom,mpm-pin-map = <2 275>,
+ <5 296>,
+ <12 422>,
+ <24 79>,
+ <86 183>,
+ <91 260>;
+ #power-domain-cells = <0>;
+ };
};
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.yaml
index a106ba6e810b..4bdc8321904b 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/qcom,pdc.yaml
@@ -31,14 +31,20 @@ properties:
- qcom,sc7180-pdc
- qcom,sc7280-pdc
- qcom,sc8280xp-pdc
+ - qcom,sdm670-pdc
- qcom,sdm845-pdc
- qcom,sdx55-pdc
- qcom,sdx65-pdc
+ - qcom,sdx75-pdc
+ - qcom,sm4450-pdc
- qcom,sm6350-pdc
- qcom,sm8150-pdc
- qcom,sm8250-pdc
- qcom,sm8350-pdc
- qcom,sm8450-pdc
+ - qcom,sm8550-pdc
+ - qcom,sm8650-pdc
+ - qcom,x1e80100-pdc
- const: qcom,pdc
reg:
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,irqc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,irqc.yaml
index 95033cb514fb..b417341fc8ae 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,irqc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,irqc.yaml
@@ -37,6 +37,7 @@ properties:
- renesas,intc-ex-r8a77990 # R-Car E3
- renesas,intc-ex-r8a77995 # R-Car D3
- renesas,intc-ex-r8a779a0 # R-Car V3U
+ - renesas,intc-ex-r8a779f0 # R-Car S4-8
- renesas,intc-ex-r8a779g0 # R-Car V4H
- const: renesas,irqc
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,rzg2l-irqc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,rzg2l-irqc.yaml
index 33b90e975e33..d3b5aec0a3f7 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,rzg2l-irqc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/renesas,rzg2l-irqc.yaml
@@ -19,20 +19,20 @@ description: |
- NMI edge select (NMI is not treated as NMI exception and supports fall edge and
stand-up edge detection interrupts)
-allOf:
- - $ref: /schemas/interrupt-controller.yaml#
-
properties:
compatible:
items:
- enum:
+ - renesas,r9a07g043u-irqc # RZ/G2UL
- renesas,r9a07g044-irqc # RZ/G2{L,LC}
- renesas,r9a07g054-irqc # RZ/V2L
+ - renesas,r9a08g045-irqc # RZ/G3S
- const: renesas,rzg2l-irqc
'#interrupt-cells':
- description: The first cell should contain external interrupt number (IRQ0-7) and the
- second cell is used to specify the flag.
+ description: The first cell should contain a macro RZG2L_{NMI,IRQX} included in the
+ include/dt-bindings/interrupt-controller/irqc-rzg2l.h and the second
+ cell is used to specify the flag.
const: 2
'#address-cells':
@@ -44,7 +44,96 @@ properties:
maxItems: 1
interrupts:
- maxItems: 41
+ minItems: 41
+ items:
+ - description: NMI interrupt
+ - description: IRQ0 interrupt
+ - description: IRQ1 interrupt
+ - description: IRQ2 interrupt
+ - description: IRQ3 interrupt
+ - description: IRQ4 interrupt
+ - description: IRQ5 interrupt
+ - description: IRQ6 interrupt
+ - description: IRQ7 interrupt
+ - description: GPIO interrupt, TINT0
+ - description: GPIO interrupt, TINT1
+ - description: GPIO interrupt, TINT2
+ - description: GPIO interrupt, TINT3
+ - description: GPIO interrupt, TINT4
+ - description: GPIO interrupt, TINT5
+ - description: GPIO interrupt, TINT6
+ - description: GPIO interrupt, TINT7
+ - description: GPIO interrupt, TINT8
+ - description: GPIO interrupt, TINT9
+ - description: GPIO interrupt, TINT10
+ - description: GPIO interrupt, TINT11
+ - description: GPIO interrupt, TINT12
+ - description: GPIO interrupt, TINT13
+ - description: GPIO interrupt, TINT14
+ - description: GPIO interrupt, TINT15
+ - description: GPIO interrupt, TINT16
+ - description: GPIO interrupt, TINT17
+ - description: GPIO interrupt, TINT18
+ - description: GPIO interrupt, TINT19
+ - description: GPIO interrupt, TINT20
+ - description: GPIO interrupt, TINT21
+ - description: GPIO interrupt, TINT22
+ - description: GPIO interrupt, TINT23
+ - description: GPIO interrupt, TINT24
+ - description: GPIO interrupt, TINT25
+ - description: GPIO interrupt, TINT26
+ - description: GPIO interrupt, TINT27
+ - description: GPIO interrupt, TINT28
+ - description: GPIO interrupt, TINT29
+ - description: GPIO interrupt, TINT30
+ - description: GPIO interrupt, TINT31
+ - description: Bus error interrupt
+
+ interrupt-names:
+ minItems: 41
+ items:
+ - const: nmi
+ - const: irq0
+ - const: irq1
+ - const: irq2
+ - const: irq3
+ - const: irq4
+ - const: irq5
+ - const: irq6
+ - const: irq7
+ - const: tint0
+ - const: tint1
+ - const: tint2
+ - const: tint3
+ - const: tint4
+ - const: tint5
+ - const: tint6
+ - const: tint7
+ - const: tint8
+ - const: tint9
+ - const: tint10
+ - const: tint11
+ - const: tint12
+ - const: tint13
+ - const: tint14
+ - const: tint15
+ - const: tint16
+ - const: tint17
+ - const: tint18
+ - const: tint19
+ - const: tint20
+ - const: tint21
+ - const: tint22
+ - const: tint23
+ - const: tint24
+ - const: tint25
+ - const: tint26
+ - const: tint27
+ - const: tint28
+ - const: tint29
+ - const: tint30
+ - const: tint31
+ - const: bus-err
clocks:
maxItems: 2
@@ -72,6 +161,25 @@ required:
- power-domains
- resets
+allOf:
+ - $ref: /schemas/interrupt-controller.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a07g043u-irqc
+ - renesas,r9a08g045-irqc
+ then:
+ properties:
+ interrupts:
+ minItems: 42
+ interrupt-names:
+ minItems: 42
+ required:
+ - interrupt-names
+
unevaluatedProperties: false
examples:
@@ -80,55 +188,66 @@ examples:
#include <dt-bindings/clock/r9a07g044-cpg.h>
irqc: interrupt-controller@110a0000 {
- compatible = "renesas,r9a07g044-irqc", "renesas,rzg2l-irqc";
- reg = <0x110a0000 0x10000>;
- #interrupt-cells = <2>;
- #address-cells = <0>;
- interrupt-controller;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 449 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 450 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 451 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 452 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 453 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 454 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 455 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 463 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 474 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 475 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cpg CPG_MOD R9A07G044_IA55_CLK>,
- <&cpg CPG_MOD R9A07G044_IA55_PCLK>;
- clock-names = "clk", "pclk";
- power-domains = <&cpg>;
- resets = <&cpg R9A07G044_IA55_RESETN>;
+ compatible = "renesas,r9a07g044-irqc", "renesas,rzg2l-irqc";
+ reg = <0x110a0000 0x10000>;
+ #interrupt-cells = <2>;
+ #address-cells = <0>;
+ interrupt-controller;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 449 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 450 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 451 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 452 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 453 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 454 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 455 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 463 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 474 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 475 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "nmi",
+ "irq0", "irq1", "irq2", "irq3",
+ "irq4", "irq5", "irq6", "irq7",
+ "tint0", "tint1", "tint2", "tint3",
+ "tint4", "tint5", "tint6", "tint7",
+ "tint8", "tint9", "tint10", "tint11",
+ "tint12", "tint13", "tint14", "tint15",
+ "tint16", "tint17", "tint18", "tint19",
+ "tint20", "tint21", "tint22", "tint23",
+ "tint24", "tint25", "tint26", "tint27",
+ "tint28", "tint29", "tint30", "tint31";
+ clocks = <&cpg CPG_MOD R9A07G044_IA55_CLK>,
+ <&cpg CPG_MOD R9A07G044_IA55_PCLK>;
+ clock-names = "clk", "pclk";
+ power-domains = <&cpg>;
+ resets = <&cpg R9A07G044_IA55_RESETN>;
};
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/sifive,plic-1.0.0.yaml
index dc1f28e55266..709b2211276b 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/sifive,plic-1.0.0.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/sifive,plic-1.0.0.yaml
@@ -65,6 +65,9 @@ properties:
- items:
- enum:
- allwinner,sun20i-d1-plic
+ - sophgo,cv1800b-plic
+ - sophgo,cv1812h-plic
+ - sophgo,sg2042-plic
- thead,th1520-plic
- const: thead,c900-plic
- items:
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/st,stih407-irq-syscfg.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
new file mode 100644
index 000000000000..e44e4e5708a7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/st,stih407-irq-syscfg.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/st,stih407-irq-syscfg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STi System Configuration Controlled IRQs
+
+maintainers:
+ - Patrice Chotard <patrice.chotard@foss.st.com>
+
+description:
+ On STi based systems; External, CTI (Core Sight), PMU (Performance
+ Management), and PL310 L2 Cache IRQs are controlled using System
+ Configuration registers. This device is used to unmask them prior to use.
+
+properties:
+ compatible:
+ const: st,stih407-irq-syscfg
+
+ st,syscfg:
+ description: Phandle to Cortex-A9 IRQ system config registers
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ st,irq-device:
+ description: Array of IRQs to enable.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: Enable the IRQ of the channel one.
+ - description: Enable the IRQ of the channel two.
+
+ st,fiq-device:
+ description: Array of FIQs to enable.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: Enable the IRQ of the channel one.
+ - description: Enable the IRQ of the channel two.
+
+ st,invert-ext:
+ description: External IRQs can be inverted at will. This property inverts
+ these three IRQs using bitwise logic, each one being encoded respectively
+ on the first, second and fourth bit.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 1, 2, 3, 4, 5, 6 ]
+
+required:
+ - compatible
+ - st,syscfg
+ - st,irq-device
+ - st,fiq-device
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq-st.h>
+ irq-syscfg {
+ compatible = "st,stih407-irq-syscfg";
+ st,syscfg = <&syscfg_cpu>;
+ st,irq-device = <ST_IRQ_SYSCFG_PMU_0>,
+ <ST_IRQ_SYSCFG_PMU_1>;
+ st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>,
+ <ST_IRQ_SYSCFG_DISABLED>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/thead,c900-aclint-mswi.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/thead,c900-aclint-mswi.yaml
new file mode 100644
index 000000000000..065f2544b63b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/thead,c900-aclint-mswi.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/thead,c900-aclint-mswi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo sg2042 CLINT Machine-level Software Interrupt Device
+
+maintainers:
+ - Inochi Amaoto <inochiama@outlook.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - sophgo,sg2042-aclint-mswi
+ - const: thead,c900-aclint-mswi
+
+ reg:
+ maxItems: 1
+
+ interrupts-extended:
+ minItems: 1
+ maxItems: 4095
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts-extended
+
+examples:
+ - |
+ interrupt-controller@94000000 {
+ compatible = "sophgo,sg2042-aclint-mswi", "thead,c900-aclint-mswi";
+ interrupts-extended = <&cpu1intc 3>,
+ <&cpu2intc 3>,
+ <&cpu3intc 3>,
+ <&cpu4intc 3>;
+ reg = <0x94000000 0x00010000>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/interrupt-controller/ti,pruss-intc.yaml b/sys/contrib/device-tree/Bindings/interrupt-controller/ti,pruss-intc.yaml
index 65523d9459d8..3cd5a1822e14 100644
--- a/sys/contrib/device-tree/Bindings/interrupt-controller/ti,pruss-intc.yaml
+++ b/sys/contrib/device-tree/Bindings/interrupt-controller/ti,pruss-intc.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/ti,pruss-intc.yaml#
diff --git a/sys/contrib/device-tree/Bindings/iommu/apple,dart.yaml b/sys/contrib/device-tree/Bindings/iommu/apple,dart.yaml
index 903edf85d72e..7adb1de455a5 100644
--- a/sys/contrib/device-tree/Bindings/iommu/apple,dart.yaml
+++ b/sys/contrib/device-tree/Bindings/iommu/apple,dart.yaml
@@ -24,6 +24,7 @@ properties:
compatible:
enum:
- apple,t8103-dart
+ - apple,t8103-usb4-dart
- apple,t8110-dart
- apple,t6000-dart
diff --git a/sys/contrib/device-tree/Bindings/iommu/arm,smmu.yaml b/sys/contrib/device-tree/Bindings/iommu/arm,smmu.yaml
index 3a31a979709b..a4042ae24770 100644
--- a/sys/contrib/device-tree/Bindings/iommu/arm,smmu.yaml
+++ b/sys/contrib/device-tree/Bindings/iommu/arm,smmu.yaml
@@ -56,6 +56,8 @@ properties:
- qcom,sm8350-smmu-500
- qcom,sm8450-smmu-500
- qcom,sm8550-smmu-500
+ - qcom,sm8650-smmu-500
+ - qcom,x1e80100-smmu-500
- const: qcom,smmu-500
- const: arm,mmu-500
@@ -89,6 +91,8 @@ properties:
- qcom,sm8150-smmu-500
- qcom,sm8250-smmu-500
- qcom,sm8350-smmu-500
+ - qcom,sm8450-smmu-500
+ - qcom,sm8550-smmu-500
- const: qcom,adreno-smmu
- const: qcom,smmu-500
- const: arm,mmu-500
@@ -110,6 +114,7 @@ properties:
- qcom,sdm630-smmu-v2
- qcom,sdm845-smmu-v2
- qcom,sm6350-smmu-v2
+ - qcom,sm7150-smmu-v2
- const: qcom,adreno-smmu
- const: qcom,smmu-v2
- description: Qcom Adreno GPUs on Google Cheza platform
@@ -271,6 +276,47 @@ allOf:
enum:
- qcom,msm8998-smmu-v2
- qcom,sdm630-smmu-v2
+ then:
+ anyOf:
+ - properties:
+ clock-names:
+ items:
+ - const: bus
+ clocks:
+ items:
+ - description: bus clock required for downstream bus access and for
+ the smmu ptw
+ - properties:
+ clock-names:
+ items:
+ - const: iface
+ - const: mem
+ - const: mem_iface
+ clocks:
+ items:
+ - description: interface clock required to access smmu's registers
+ through the TCU's programming interface.
+ - description: bus clock required for memory access
+ - description: bus clock required for GPU memory access
+ - properties:
+ clock-names:
+ items:
+ - const: iface-mm
+ - const: iface-smmu
+ - const: bus-smmu
+ clocks:
+ items:
+ - description: interface clock required to access mnoc's registers
+ through the TCU's programming interface.
+ - description: interface clock required to access smmu's registers
+ through the TCU's programming interface.
+ - description: bus clock required for the smmu ptw
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,sm6375-smmu-v2
then:
anyOf:
@@ -368,6 +414,7 @@ allOf:
contains:
enum:
- qcom,sm6350-smmu-v2
+ - qcom,sm7150-smmu-v2
- qcom,sm8150-smmu-500
- qcom,sm8250-smmu-500
then:
@@ -391,6 +438,30 @@ allOf:
compatible:
items:
- enum:
+ - qcom,sm8350-smmu-500
+ - const: qcom,adreno-smmu
+ - const: qcom,smmu-500
+ - const: arm,mmu-500
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: bus
+ - const: iface
+ - const: ahb
+ - const: hlos1_vote_gpu_smmu
+ - const: cx_gmu
+ - const: hub_cx_int
+ - const: hub_aon
+ clocks:
+ minItems: 7
+ maxItems: 7
+
+ - if:
+ properties:
+ compatible:
+ items:
+ - enum:
- qcom,sm6115-smmu-500
- qcom,sm6125-smmu-500
- const: qcom,adreno-smmu
@@ -410,6 +481,50 @@ allOf:
- description: Voter clock required for HLOS SMMU access
- description: Interface clock required for register access
+ - if:
+ properties:
+ compatible:
+ const: qcom,sm8450-smmu-500
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: gmu
+ - const: hub
+ - const: hlos
+ - const: bus
+ - const: iface
+ - const: ahb
+
+ clocks:
+ items:
+ - description: GMU clock
+ - description: GPU HUB clock
+ - description: HLOS vote clock
+ - description: GPU memory bus clock
+ - description: GPU SNoC bus clock
+ - description: GPU AHB clock
+
+ - if:
+ properties:
+ compatible:
+ const: qcom,sm8550-smmu-500
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: hlos
+ - const: bus
+ - const: iface
+ - const: ahb
+
+ clocks:
+ items:
+ - description: HLOS vote clock
+ - description: GPU memory bus clock
+ - description: GPU SNoC bus clock
+ - description: GPU AHB clock
+
# Disallow clocks for all other platforms with specific compatibles
- if:
properties:
@@ -429,9 +544,8 @@ allOf:
- qcom,sdx65-smmu-500
- qcom,sm6350-smmu-500
- qcom,sm6375-smmu-500
- - qcom,sm8350-smmu-500
- - qcom,sm8450-smmu-500
- - qcom,sm8550-smmu-500
+ - qcom,sm8650-smmu-500
+ - qcom,x1e80100-smmu-500
then:
properties:
clock-names: false
diff --git a/sys/contrib/device-tree/Bindings/iommu/mediatek,iommu.yaml b/sys/contrib/device-tree/Bindings/iommu/mediatek,iommu.yaml
index 5b6395bc10e0..ea6b0f5f24de 100644
--- a/sys/contrib/device-tree/Bindings/iommu/mediatek,iommu.yaml
+++ b/sys/contrib/device-tree/Bindings/iommu/mediatek,iommu.yaml
@@ -78,6 +78,9 @@ properties:
- mediatek,mt8173-m4u # generation two
- mediatek,mt8183-m4u # generation two
- mediatek,mt8186-iommu-mm # generation two
+ - mediatek,mt8188-iommu-vdo # generation two
+ - mediatek,mt8188-iommu-vpp # generation two
+ - mediatek,mt8188-iommu-infra # generation two
- mediatek,mt8192-m4u # generation two
- mediatek,mt8195-iommu-vdo # generation two
- mediatek,mt8195-iommu-vpp # generation two
@@ -123,6 +126,7 @@ properties:
description: |
This is the mtk_m4u_id according to the HW. Specifies the mtk_m4u_id as
defined in
+ dt-binding/memory/mediatek,mt8188-memory-port.h for mt8188,
dt-binding/memory/mt2701-larb-port.h for mt2701 and mt7623,
dt-binding/memory/mt2712-larb-port.h for mt2712,
dt-binding/memory/mt6779-larb-port.h for mt6779,
@@ -155,6 +159,8 @@ allOf:
- mediatek,mt6795-m4u
- mediatek,mt8173-m4u
- mediatek,mt8186-iommu-mm
+ - mediatek,mt8188-iommu-vdo
+ - mediatek,mt8188-iommu-vpp
- mediatek,mt8192-m4u
- mediatek,mt8195-iommu-vdo
- mediatek,mt8195-iommu-vpp
@@ -168,6 +174,8 @@ allOf:
compatible:
enum:
- mediatek,mt8186-iommu-mm
+ - mediatek,mt8188-iommu-vdo
+ - mediatek,mt8188-iommu-vpp
- mediatek,mt8192-m4u
- mediatek,mt8195-iommu-vdo
- mediatek,mt8195-iommu-vpp
@@ -194,7 +202,9 @@ allOf:
properties:
compatible:
contains:
- const: mediatek,mt8195-iommu-infra
+ enum:
+ - mediatek,mt8188-iommu-infra
+ - mediatek,mt8195-iommu-infra
then:
required:
diff --git a/sys/contrib/device-tree/Bindings/iommu/qcom,iommu.yaml b/sys/contrib/device-tree/Bindings/iommu/qcom,iommu.yaml
index d9fabdf930d9..a74eb899c381 100644
--- a/sys/contrib/device-tree/Bindings/iommu/qcom,iommu.yaml
+++ b/sys/contrib/device-tree/Bindings/iommu/qcom,iommu.yaml
@@ -17,11 +17,16 @@ description: |
properties:
compatible:
- items:
- - enum:
- - qcom,msm8916-iommu
- - qcom,msm8953-iommu
- - const: qcom,msm-iommu-v1
+ oneOf:
+ - items:
+ - enum:
+ - qcom,msm8916-iommu
+ - qcom,msm8953-iommu
+ - const: qcom,msm-iommu-v1
+ - items:
+ - enum:
+ - qcom,msm8976-iommu
+ - const: qcom,msm-iommu-v2
clocks:
items:
@@ -64,6 +69,8 @@ patternProperties:
enum:
- qcom,msm-iommu-v1-ns
- qcom,msm-iommu-v1-sec
+ - qcom,msm-iommu-v2-ns
+ - qcom,msm-iommu-v2-sec
interrupts:
maxItems: 1
@@ -71,6 +78,11 @@ patternProperties:
reg:
maxItems: 1
+ qcom,ctx-asid:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The ASID number associated to the context bank.
+
required:
- compatible
- interrupts
diff --git a/sys/contrib/device-tree/Bindings/iommu/rockchip,iommu.yaml b/sys/contrib/device-tree/Bindings/iommu/rockchip,iommu.yaml
index ba9124f721f1..621dde0e45d8 100644
--- a/sys/contrib/device-tree/Bindings/iommu/rockchip,iommu.yaml
+++ b/sys/contrib/device-tree/Bindings/iommu/rockchip,iommu.yaml
@@ -19,9 +19,14 @@ description: |+
properties:
compatible:
- enum:
- - rockchip,iommu
- - rockchip,rk3568-iommu
+ oneOf:
+ - enum:
+ - rockchip,iommu
+ - rockchip,rk3568-iommu
+ - items:
+ - enum:
+ - rockchip,rk3588-iommu
+ - const: rockchip,rk3568-iommu
reg:
items:
diff --git a/sys/contrib/device-tree/Bindings/iommu/xen,grant-dma.yaml b/sys/contrib/device-tree/Bindings/iommu/xen,grant-dma.yaml
index be1539d234f9..3528b81daa25 100644
--- a/sys/contrib/device-tree/Bindings/iommu/xen,grant-dma.yaml
+++ b/sys/contrib/device-tree/Bindings/iommu/xen,grant-dma.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iommu/xen,grant-dma.yaml#
diff --git a/sys/contrib/device-tree/Bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml b/sys/contrib/device-tree/Bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml
index 4ff6fabfcb30..129e32c4c774 100644
--- a/sys/contrib/device-tree/Bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml
+++ b/sys/contrib/device-tree/Bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml
@@ -41,7 +41,7 @@ properties:
- description: STR register
aspeed,lpc-io-reg:
- $ref: '/schemas/types.yaml#/definitions/uint32-array'
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 2
description: |
@@ -50,7 +50,7 @@ properties:
status address may be optionally provided.
aspeed,lpc-interrupts:
- $ref: "/schemas/types.yaml#/definitions/uint32-array"
+ $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2
maxItems: 2
description: |
@@ -63,12 +63,12 @@ properties:
kcs_chan:
deprecated: true
- $ref: '/schemas/types.yaml#/definitions/uint32'
+ $ref: /schemas/types.yaml#/definitions/uint32
description: The LPC channel number in the controller
kcs_addr:
deprecated: true
- $ref: '/schemas/types.yaml#/definitions/uint32'
+ $ref: /schemas/types.yaml#/definitions/uint32
description: The host CPU IO map address
required:
diff --git a/sys/contrib/device-tree/Bindings/ipmi/ipmi-ipmb.yaml b/sys/contrib/device-tree/Bindings/ipmi/ipmi-ipmb.yaml
index 3f25cdb4e99b..52647bff31af 100644
--- a/sys/contrib/device-tree/Bindings/ipmi/ipmi-ipmb.yaml
+++ b/sys/contrib/device-tree/Bindings/ipmi/ipmi-ipmb.yaml
@@ -18,7 +18,7 @@ properties:
device_type:
items:
- - const: "ipmi"
+ - const: ipmi
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/ipmi/ipmi-smic.yaml b/sys/contrib/device-tree/Bindings/ipmi/ipmi-smic.yaml
index c1b4bf95ef99..4bffa3d86128 100644
--- a/sys/contrib/device-tree/Bindings/ipmi/ipmi-smic.yaml
+++ b/sys/contrib/device-tree/Bindings/ipmi/ipmi-smic.yaml
@@ -20,7 +20,7 @@ properties:
device_type:
items:
- - const: "ipmi"
+ - const: ipmi
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/leds/allwinner,sun50i-a100-ledc.yaml b/sys/contrib/device-tree/Bindings/leds/allwinner,sun50i-a100-ledc.yaml
new file mode 100644
index 000000000000..760cb336dccb
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/leds/allwinner,sun50i-a100-ledc.yaml
@@ -0,0 +1,137 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/allwinner,sun50i-a100-ledc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A100 LED Controller
+
+maintainers:
+ - Samuel Holland <samuel@sholland.org>
+
+description:
+ The LED controller found in Allwinner sunxi SoCs uses a one-wire serial
+ interface to drive up to 1024 RGB LEDs.
+
+properties:
+ compatible:
+ oneOf:
+ - const: allwinner,sun50i-a100-ledc
+ - items:
+ - enum:
+ - allwinner,sun20i-d1-ledc
+ - allwinner,sun50i-r329-ledc
+ - const: allwinner,sun50i-a100-ledc
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Bus clock
+ - description: Module clock
+
+ clock-names:
+ items:
+ - const: bus
+ - const: mod
+
+ resets:
+ maxItems: 1
+
+ dmas:
+ maxItems: 1
+ description: TX DMA channel
+
+ dma-names:
+ const: tx
+
+ allwinner,pixel-format:
+ description: Pixel format (subpixel transmission order), default is "grb"
+ enum:
+ - bgr
+ - brg
+ - gbr
+ - grb
+ - rbg
+ - rgb
+
+ allwinner,t0h-ns:
+ default: 336
+ description: Length of high pulse when transmitting a "0" bit
+
+ allwinner,t0l-ns:
+ default: 840
+ description: Length of low pulse when transmitting a "0" bit
+
+ allwinner,t1h-ns:
+ default: 882
+ description: Length of high pulse when transmitting a "1" bit
+
+ allwinner,t1l-ns:
+ default: 294
+ description: Length of low pulse when transmitting a "1" bit
+
+ allwinner,treset-ns:
+ default: 300000
+ description: Minimum delay between transmission frames
+
+patternProperties:
+ "^multi-led@[0-9a-f]+$":
+ type: object
+ $ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
+ properties:
+ reg:
+ minimum: 0
+ maximum: 1023
+ description: Index of the LED in the series (must be contiguous)
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/leds/common.h>
+
+ ledc: led-controller@2008000 {
+ compatible = "allwinner,sun20i-d1-ledc",
+ "allwinner,sun50i-a100-ledc";
+ reg = <0x2008000 0x400>;
+ interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu 12>, <&ccu 34>;
+ clock-names = "bus", "mod";
+ resets = <&ccu 12>;
+ dmas = <&dma 42>;
+ dma-names = "tx";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ multi-led@0 {
+ reg = <0x0>;
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_INDICATOR;
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/leds/awinic,aw200xx.yaml b/sys/contrib/device-tree/Bindings/leds/awinic,aw200xx.yaml
index feb5febaf361..54d6d1f08e24 100644
--- a/sys/contrib/device-tree/Bindings/leds/awinic,aw200xx.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/awinic,aw200xx.yaml
@@ -10,15 +10,19 @@ maintainers:
- Martin Kurbanov <mmkurbanov@sberdevices.ru>
description: |
- This controller is present on AW20036/AW20054/AW20072.
- It is a 3x12/6x9/6x12 matrix LED programmed via
- an I2C interface, up to 36/54/72 LEDs or 12/18/24 RGBs,
- 3 pattern controllers for auto breathing or group dimming control.
+ It is a matrix LED driver programmed via an I2C interface. Devices have
+ a set of individually controlled leds and support 3 pattern controllers
+ for auto breathing or group dimming control. Supported devices:
+ - AW20036 (3x12) 36 LEDs
+ - AW20054 (6x9) 54 LEDs
+ - AW20072 (6x12) 72 LEDs
+ - AW20108 (9x12) 108 LEDs
For more product information please see the link below:
aw20036 - https://www.awinic.com/en/productDetail/AW20036QNR#tech-docs
aw20054 - https://www.awinic.com/en/productDetail/AW20054QNR#tech-docs
aw20072 - https://www.awinic.com/en/productDetail/AW20072QNR#tech-docs
+ aw20108 - https://www.awinic.com/en/productDetail/AW20108QNR#tech-docs
properties:
compatible:
@@ -26,6 +30,7 @@ properties:
- awinic,aw20036
- awinic,aw20054
- awinic,aw20072
+ - awinic,aw20108
reg:
maxItems: 1
@@ -36,13 +41,11 @@ properties:
"#size-cells":
const: 0
- awinic,display-rows:
- $ref: /schemas/types.yaml#/definitions/uint32
- description:
- Leds matrix size
+ enable-gpios:
+ maxItems: 1
patternProperties:
- "^led@[0-9a-f]$":
+ "^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
@@ -60,16 +63,11 @@ patternProperties:
since the chip has a single global setting.
The maximum output current of each LED is calculated by the
following formula:
- IMAXled = 160000 * (592 / 600.5) * (1 / display-rows)
+ IMAXled = 160000 * (592 / 600.5) * (1 / max-current-switch-number)
And the minimum output current formula:
- IMINled = 3300 * (592 / 600.5) * (1 / display-rows)
-
-required:
- - compatible
- - reg
- - "#address-cells"
- - "#size-cells"
- - awinic,display-rows
+ IMINled = 3300 * (592 / 600.5) * (1 / max-current-switch-number)
+ where max-current-switch-number is determinated by led configuration
+ and depends on how leds are physically connected to the led driver.
allOf:
- if:
@@ -78,18 +76,67 @@ allOf:
contains:
const: awinic,aw20036
then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 36
+
+ - if:
properties:
- awinic,display-rows:
- enum: [1, 2, 3]
- else:
+ compatible:
+ contains:
+ const: awinic,aw20054
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 54
+
+ - if:
properties:
- awinic,display-rows:
- enum: [1, 2, 3, 4, 5, 6, 7]
+ compatible:
+ contains:
+ const: awinic,aw20072
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 72
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: awinic,aw20108
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 108
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
additionalProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
@@ -101,7 +148,7 @@ examples:
reg = <0x3a>;
#address-cells = <1>;
#size-cells = <0>;
- awinic,display-rows = <3>;
+ enable-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
led@0 {
reg = <0x0>;
diff --git a/sys/contrib/device-tree/Bindings/leds/backlight/common.yaml b/sys/contrib/device-tree/Bindings/leds/backlight/common.yaml
index 3b60afbab68b..e0983e44934c 100644
--- a/sys/contrib/device-tree/Bindings/leds/backlight/common.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/backlight/common.yaml
@@ -33,4 +33,21 @@ properties:
due to restrictions in a specific system, such as mounting conditions.
$ref: /schemas/types.yaml#/definitions/uint32
+ brightness-levels:
+ description:
+ Array of distinct brightness levels. The levels must be in the range
+ accepted by the underlying LED device. Typically these are in the range
+ from 0 to 255, but any range starting at 0 will do, as long as they are
+ accepted by the LED.
+ The 0 value means a 0% of brightness (darkest/off), while the last value
+ in the array represents a full 100% brightness (brightest).
+ If this array is not provided, the driver default mapping is used.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ default-brightness-level:
+ description:
+ The default brightness level (index into the array defined by the
+ "brightness-levels" property).
+ $ref: /schemas/types.yaml#/definitions/uint32
+
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/leds/backlight/led-backlight.yaml b/sys/contrib/device-tree/Bindings/leds/backlight/led-backlight.yaml
index d7b78198abc2..f5554da6bc6c 100644
--- a/sys/contrib/device-tree/Bindings/leds/backlight/led-backlight.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/backlight/led-backlight.yaml
@@ -16,6 +16,9 @@ description:
can also be used to describe a backlight device controlled by the output of
a LED driver.
+allOf:
+ - $ref: common.yaml#
+
properties:
compatible:
const: led-backlight
@@ -26,25 +29,11 @@ properties:
items:
maxItems: 1
- brightness-levels:
- description:
- Array of distinct brightness levels. The levels must be in the range
- accepted by the underlying LED devices. This is used to translate a
- backlight brightness level into a LED brightness level. If it is not
- provided, the identity mapping is used.
- $ref: /schemas/types.yaml#/definitions/uint32-array
-
- default-brightness-level:
- description:
- The default brightness level (index into the array defined by the
- "brightness-levels" property).
- $ref: /schemas/types.yaml#/definitions/uint32
-
required:
- compatible
- leds
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/leds/backlight/mediatek,mt6370-backlight.yaml b/sys/contrib/device-tree/Bindings/leds/backlight/mediatek,mt6370-backlight.yaml
index 5533b6562d92..16fc98e71233 100644
--- a/sys/contrib/device-tree/Bindings/leds/backlight/mediatek,mt6370-backlight.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/backlight/mediatek,mt6370-backlight.yaml
@@ -66,7 +66,7 @@ properties:
mediatek,bled-ocp-shutdown:
description: |
- Enable the backlight shutdown when OCP level triggerred.
+ Enable the backlight shutdown when OCP level triggered.
type: boolean
mediatek,bled-ocp-microamp:
diff --git a/sys/contrib/device-tree/Bindings/leds/backlight/mps,mp3309c.yaml b/sys/contrib/device-tree/Bindings/leds/backlight/mps,mp3309c.yaml
new file mode 100644
index 000000000000..527a37368ed7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/leds/backlight/mps,mp3309c.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/backlight/mps,mp3309c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MPS MP3309C backlight
+
+maintainers:
+ - Flavio Suligoi <f.suligoi@asem.it>
+
+description: |
+ The Monolithic Power (MPS) MP3309C is a WLED step-up converter, featuring a
+ programmable switching frequency to optimize efficiency.
+ It supports two different dimming modes:
+
+ - analog mode, via I2C commands, as default mode (32 dimming levels)
+ - PWM controlled mode (optional)
+
+ The datasheet is available at:
+ https://www.monolithicpower.com/en/mp3309c.html
+
+allOf:
+ - $ref: common.yaml#
+
+properties:
+ compatible:
+ const: mps,mp3309c
+
+ reg:
+ maxItems: 1
+
+ pwms:
+ description: if present, the backlight is controlled in PWM mode.
+ maxItems: 1
+
+ enable-gpios:
+ description: GPIO used to enable the backlight in "analog-i2c" dimming mode.
+ maxItems: 1
+
+ mps,overvoltage-protection-microvolt:
+ description: Overvoltage protection (13.5V, 24V or 35.5V).
+ enum: [ 13500000, 24000000, 35500000 ]
+ default: 35500000
+
+ mps,no-sync-mode:
+ description: disable synchronous rectification mode
+ type: boolean
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Backlight with PWM control */
+ backlight_pwm: backlight@17 {
+ compatible = "mps,mp3309c";
+ reg = <0x17>;
+ pwms = <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9 */
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness = <6>;
+ mps,overvoltage-protection-microvolt = <24000000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/leds/backlight/pwm-backlight.yaml b/sys/contrib/device-tree/Bindings/leds/backlight/pwm-backlight.yaml
index 535690288990..b71f6454a4ac 100644
--- a/sys/contrib/device-tree/Bindings/leds/backlight/pwm-backlight.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/backlight/pwm-backlight.yaml
@@ -11,6 +11,9 @@ maintainers:
- Daniel Thompson <daniel.thompson@linaro.org>
- Jingoo Han <jingoohan1@gmail.com>
+allOf:
+ - $ref: common.yaml#
+
properties:
compatible:
const: pwm-backlight
@@ -39,21 +42,6 @@ properties:
Delay in ms between disabling the backlight using GPIO and setting PWM
value to 0.
- brightness-levels:
- description:
- Array of distinct brightness levels. Typically these are in the range
- from 0 to 255, but any range starting at 0 will do. The actual brightness
- level (PWM duty cycle) will be interpolated from these values. 0 means a
- 0% duty cycle (darkest/off), while the last value in the array represents
- a 100% duty cycle (brightest).
- $ref: /schemas/types.yaml#/definitions/uint32-array
-
- default-brightness-level:
- description:
- The default brightness level (index into the array defined by the
- "brightness-levels" property).
- $ref: /schemas/types.yaml#/definitions/uint32
-
num-interpolated-steps:
description:
Number of interpolated steps between each value of brightness-levels
@@ -69,7 +57,7 @@ required:
- compatible
- pwms
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/leds/common.yaml b/sys/contrib/device-tree/Bindings/leds/common.yaml
index 58b492d00246..55a8d1385e21 100644
--- a/sys/contrib/device-tree/Bindings/leds/common.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/common.yaml
@@ -43,7 +43,7 @@ properties:
LED_COLOR_ID available, add a new one.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
- maximum: 9
+ maximum: 14
function-enumerator:
description:
@@ -83,8 +83,7 @@ properties:
- enum:
# LED will act as a back-light, controlled by the framebuffer system
- backlight
- # LED will turn on (but for leds-gpio see "default-state" property in
- # Documentation/devicetree/bindings/leds/leds-gpio.yaml)
+ # LED will turn on (see also "default-state" property)
- default-on
# LED "double" flashes at a load average based rate
- heartbeat
@@ -158,6 +157,18 @@ properties:
For flash LED controllers with configurable current this property is
mandatory for the LEDs in the non-flash modes (e.g. torch or indicator).
+ max-brightness:
+ description:
+ Normally, the maximum brightness is determined by the hardware, and this
+ property is not required. This property is used to set a software limit.
+ It could happen that an LED is made so bright that it gets damaged or
+ causes damage due to restrictions in a specific system, such as mounting
+ conditions.
+ Note that this flag is mainly used for PWM-LEDs, where it is not possible
+ to map brightness to current. Drivers for other controllers should use
+ led-max-microamp.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
panic-indicator:
description:
This property specifies that the LED should be used, if at all possible,
@@ -180,6 +191,8 @@ properties:
each of them having its own LED assigned (assuming they are not
hardwired). In such cases this property should contain phandle(s) of
related source device(s).
+ Another example is a GPIO line that will be monitored and mirror the
+ state of the line (with or without inversion flags) to the LED.
In many cases LED can be related to more than one device (e.g. one USB LED
vs. multiple USB ports). Each source should be represented by a node in
the device tree and be referenced by a phandle and a set of phandle
diff --git a/sys/contrib/device-tree/Bindings/leds/irled/pwm-ir-tx.yaml b/sys/contrib/device-tree/Bindings/leds/irled/pwm-ir-tx.yaml
index f2a6fa140f38..7526e3149f72 100644
--- a/sys/contrib/device-tree/Bindings/leds/irled/pwm-ir-tx.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/irled/pwm-ir-tx.yaml
@@ -15,7 +15,10 @@ description:
properties:
compatible:
- const: pwm-ir-tx
+ oneOf:
+ - const: pwm-ir-tx
+ - const: nokia,n900-ir
+ deprecated: true
pwms:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/leds/kinetic,ktd202x.yaml b/sys/contrib/device-tree/Bindings/leds/kinetic,ktd202x.yaml
new file mode 100644
index 000000000000..832c030a5acf
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/leds/kinetic,ktd202x.yaml
@@ -0,0 +1,171 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/kinetic,ktd202x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Kinetic KTD2026/7 RGB/White LED Driver
+
+maintainers:
+ - André Apitzsch <git@apitzsch.eu>
+
+description: |
+ The KTD2026/7 is a RGB/White LED driver with I2C interface.
+
+ The data sheet can be found at:
+ https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf
+
+properties:
+ compatible:
+ enum:
+ - kinetic,ktd2026
+ - kinetic,ktd2027
+
+ reg:
+ maxItems: 1
+
+ vin-supply:
+ description: Regulator providing power to the "VIN" pin.
+
+ vio-supply:
+ description: Regulator providing power for pull-up of the I/O lines.
+ Note that this regulator does not directly connect to KTD2026, but is
+ needed for the correct operation of the status ("ST") and I2C lines.
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ multi-led:
+ type: object
+ $ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ patternProperties:
+ "^led@[0-3]$":
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ description: Index of the LED.
+ minimum: 0
+ maximum: 3
+
+ required:
+ - reg
+ - color
+
+ required:
+ - "#address-cells"
+ - "#size-cells"
+
+patternProperties:
+ "^led@[0-3]$":
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ description: Index of the LED.
+ minimum: 0
+ maximum: 3
+
+ required:
+ - reg
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@30 {
+ compatible = "kinetic,ktd2026";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vin-supply = <&pm8916_l17>;
+ vio-supply = <&pm8916_l6>;
+
+ led@0 {
+ reg = <0>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <1>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@2 {
+ reg = <2>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@30 {
+ compatible = "kinetic,ktd2026";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vin-supply = <&pm8916_l17>;
+ vio-supply = <&pm8916_l6>;
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/leds/leds-aw2013.yaml b/sys/contrib/device-tree/Bindings/leds/leds-aw2013.yaml
index 08f3e1cfc1b1..26238446f2bd 100644
--- a/sys/contrib/device-tree/Bindings/leds/leds-aw2013.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/leds-aw2013.yaml
@@ -20,9 +20,20 @@ properties:
reg:
maxItems: 1
+ interrupts:
+ maxItems: 1
+ description: Open-drain, low active interrupt pin "INTN".
+ Used to report completion of operations (power up, LED breath effects).
+
vcc-supply:
description: Regulator providing power to the "VCC" pin.
+ vio-supply:
+ description: Regulator providing power for pull-up of the I/O lines.
+ "VIO1" in the typical application circuit example of the datasheet.
+ Note that this regulator does not directly connect to AW2013, but is
+ needed for the correct operation of the interrupt and I2C lines.
+
"#address-cells":
const: 1
@@ -52,6 +63,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
i2c {
@@ -61,6 +73,7 @@ examples:
led-controller@45 {
compatible = "awinic,aw2013";
reg = <0x45>;
+ interrupts = <42 IRQ_TYPE_LEVEL_LOW>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/leds/leds-group-multicolor.yaml b/sys/contrib/device-tree/Bindings/leds/leds-group-multicolor.yaml
new file mode 100644
index 000000000000..8ed059a5a724
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/leds/leds-group-multicolor.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-group-multicolor.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Multi-color LED built with monochromatic LEDs
+
+maintainers:
+ - Jean-Jacques Hiblot <jjhiblot@traphandler.com>
+
+description: |
+ This driver combines several monochromatic LEDs into one multi-color
+ LED using the multicolor LED class.
+
+properties:
+ compatible:
+ const: leds-group-multicolor
+
+ leds:
+ description:
+ An aray of monochromatic leds
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+required:
+ - leds
+
+allOf:
+ - $ref: leds-class-multicolor.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+
+ monochromatic-leds {
+ compatible = "gpio-leds";
+
+ led0: led-0 {
+ gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led1: led-1 {
+ gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led2: led-2 {
+ gpios = <&mcu_pio 2 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+
+ multi-led {
+ compatible = "leds-group-multicolor";
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_INDICATOR;
+ leds = <&led0>, <&led1>, <&led2>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/leds/leds-lp55xx.yaml b/sys/contrib/device-tree/Bindings/leds/leds-lp55xx.yaml
index 058be1fedbc8..e9d4514d0166 100644
--- a/sys/contrib/device-tree/Bindings/leds/leds-lp55xx.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/leds-lp55xx.yaml
@@ -106,7 +106,7 @@ patternProperties:
max-cur:
$ref: /schemas/types.yaml#/definitions/uint8
- description: Maximun current at each LED channel.
+ description: Maximum current at each LED channel.
reg:
maximum: 8
@@ -129,7 +129,7 @@ patternProperties:
max-cur:
$ref: /schemas/types.yaml#/definitions/uint8
- description: Maximun current at each LED channel.
+ description: Maximum current at each LED channel.
reg:
description: |
diff --git a/sys/contrib/device-tree/Bindings/leds/leds-qcom-lpg.yaml b/sys/contrib/device-tree/Bindings/leds/leds-qcom-lpg.yaml
index e6f1999cb22f..ea84ad426df1 100644
--- a/sys/contrib/device-tree/Bindings/leds/leds-qcom-lpg.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/leds-qcom-lpg.yaml
@@ -56,7 +56,7 @@ properties:
description: >
A list of integer pairs, where each pair represent the dtest line the
particular channel should be connected to and the flags denoting how the
- value should be outputed, as defined in the datasheet. The number of
+ value should be outputted, as defined in the datasheet. The number of
pairs should be the same as the number of channels.
items:
items:
diff --git a/sys/contrib/device-tree/Bindings/leds/nxp,pca953x.yaml b/sys/contrib/device-tree/Bindings/leds/nxp,pca953x.yaml
index edf6f55df685..9610bca57dd5 100644
--- a/sys/contrib/device-tree/Bindings/leds/nxp,pca953x.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/nxp,pca953x.yaml
@@ -29,6 +29,10 @@ properties:
gpio-controller: true
+ gpio-line-names:
+ minItems: 1
+ maxItems: 16
+
'#gpio-cells':
const: 2
diff --git a/sys/contrib/device-tree/Bindings/leds/nxp,pca995x.yaml b/sys/contrib/device-tree/Bindings/leds/nxp,pca995x.yaml
new file mode 100644
index 000000000000..654915c1f687
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/leds/nxp,pca995x.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/nxp,pca995x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCA995x LED controllers
+
+maintainers:
+ - Isai Gaspar <isaiezequiel.gaspar@nxp.com>
+ - Marek Vasut <marex@denx.de>
+
+description:
+ The NXP PCA9952/PCA9955B are programmable LED controllers connected via I2C
+ that can drive 16 separate lines. Each of them can be individually switched
+ on and off, and brightness can be controlled via individual PWM.
+
+ Datasheets are available at
+ https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf
+ https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf
+
+properties:
+ compatible:
+ enum:
+ - nxp,pca9952
+ - nxp,pca9955b
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^led@[0-9a-f]+$":
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ minimum: 0
+ maximum: 15
+
+ required:
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@1 {
+ compatible = "nxp,pca9955b";
+ reg = <0x01>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0x0>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_POWER;
+ };
+
+ led@2 {
+ reg = <0x2>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_STATUS;
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/leds/panasonic,an30259a.yaml b/sys/contrib/device-tree/Bindings/leds/panasonic,an30259a.yaml
new file mode 100644
index 000000000000..e918dceea082
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/leds/panasonic,an30259a.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/panasonic,an30259a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Panasonic AN30259A 3-channel LED controller
+
+maintainers:
+ - Iskren Chernev <me@iskren.info>
+
+description:
+ The AN30259A is a LED controller capable of driving three LEDs independently.
+ It supports constant current output and sloping current output modes. The chip
+ is connected over I2C.
+
+properties:
+ compatible:
+ const: panasonic,an30259a
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^led@[1-3]$":
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ enum: [ 1, 2, 3 ]
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@30 {
+ compatible = "panasonic,an30259a";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ linux,default-trigger = "heartbeat";
+ function = LED_FUNCTION_INDICATOR;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@2 {
+ reg = <2>;
+ function = LED_FUNCTION_INDICATOR;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@3 {
+ reg = <3>;
+ function = LED_FUNCTION_INDICATOR;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/leds/qcom,spmi-flash-led.yaml b/sys/contrib/device-tree/Bindings/leds/qcom,spmi-flash-led.yaml
index a8736fd5a539..1ba607685f5f 100644
--- a/sys/contrib/device-tree/Bindings/leds/qcom,spmi-flash-led.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/qcom,spmi-flash-led.yaml
@@ -89,9 +89,11 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
- spmi {
+
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
+
led-controller@ee00 {
compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
reg = <0xee00>;
diff --git a/sys/contrib/device-tree/Bindings/leds/register-bit-led.yaml b/sys/contrib/device-tree/Bindings/leds/register-bit-led.yaml
index ed26ec19ecbd..20930d327ae9 100644
--- a/sys/contrib/device-tree/Bindings/leds/register-bit-led.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/register-bit-led.yaml
@@ -60,7 +60,7 @@ examples:
- |
syscon@10000000 {
- compatible = "arm,realview-pb1176-syscon", "syscon";
+ compatible = "arm,realview-pb1176-syscon", "syscon", "simple-mfd";
reg = <0x10000000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/leds/rohm,bd2606mvv.yaml b/sys/contrib/device-tree/Bindings/leds/rohm,bd2606mvv.yaml
index 14700a2e5fea..44dd91aa239d 100644
--- a/sys/contrib/device-tree/Bindings/leds/rohm,bd2606mvv.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/rohm,bd2606mvv.yaml
@@ -35,7 +35,7 @@ properties:
description: GPIO pin to enable/disable the device.
patternProperties:
- "^led@[0-6]$":
+ "^led@[0-5]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
@@ -43,7 +43,7 @@ patternProperties:
properties:
reg:
minimum: 0
- maximum: 6
+ maximum: 5
required:
- reg
diff --git a/sys/contrib/device-tree/Bindings/leds/rohm,bd71828-leds.yaml b/sys/contrib/device-tree/Bindings/leds/rohm,bd71828-leds.yaml
index 58f0d94c6d71..b7a3ef76cbf4 100644
--- a/sys/contrib/device-tree/Bindings/leds/rohm,bd71828-leds.yaml
+++ b/sys/contrib/device-tree/Bindings/leds/rohm,bd71828-leds.yaml
@@ -18,8 +18,6 @@ description: |
The device has two LED outputs referred as GRNLED and AMBLED in data-sheet.
-select: false
-
properties:
compatible:
const: rohm,bd71828-leds
diff --git a/sys/contrib/device-tree/Bindings/loongarch/cpus.yaml b/sys/contrib/device-tree/Bindings/loongarch/cpus.yaml
new file mode 100644
index 000000000000..f175872995e1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/loongarch/cpus.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/loongarch/cpus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LoongArch CPUs
+
+maintainers:
+ - Binbin Zhou <zhoubinbin@loongson.cn>
+
+description:
+ This document describes the list of LoongArch CPU cores that support FDT,
+ it describe the layout of CPUs in a system through the "cpus" node.
+
+allOf:
+ - $ref: /schemas/cpu.yaml#
+
+properties:
+ compatible:
+ enum:
+ - loongson,la264
+ - loongson,la364
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/loongson,ls2k-clk.h>
+
+ cpus {
+ #size-cells = <0>;
+ #address-cells = <1>;
+
+ cpu@0 {
+ compatible = "loongson,la264";
+ device_type = "cpu";
+ reg = <0>;
+ clocks = <&clk LOONGSON2_NODE_CLK>;
+ };
+
+ cpu@1 {
+ compatible = "loongson,la264";
+ device_type = "cpu";
+ reg = <1>;
+ clocks = <&clk LOONGSON2_NODE_CLK>;
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/loongarch/loongson.yaml b/sys/contrib/device-tree/Bindings/loongarch/loongson.yaml
new file mode 100644
index 000000000000..e1a4a97b7576
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/loongarch/loongson.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/loongarch/loongson.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson SoC-based boards
+
+maintainers:
+ - Binbin Zhou <zhoubinbin@loongson.cn>
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: Loongson-2K0500 processor based boards
+ items:
+ - const: loongson,ls2k0500-ref
+ - const: loongson,ls2k0500
+
+ - description: Loongson-2K1000 processor based boards
+ items:
+ - const: loongson,ls2k1000-ref
+ - const: loongson,ls2k1000
+
+ - description: Loongson-2K2000 processor based boards
+ items:
+ - const: loongson,ls2k2000-ref
+ - const: loongson,ls2k2000
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/mailbox/brcm,iproc-flexrm-mbox.txt b/sys/contrib/device-tree/Bindings/mailbox/brcm,iproc-flexrm-mbox.txt
index 752ae6b00d26..c80065a1eb97 100644
--- a/sys/contrib/device-tree/Bindings/mailbox/brcm,iproc-flexrm-mbox.txt
+++ b/sys/contrib/device-tree/Bindings/mailbox/brcm,iproc-flexrm-mbox.txt
@@ -29,7 +29,7 @@ Required properties:
where N is the value specified by 2nd cell above. If FlexRM
does not get required number of completion messages in time
specified by this cell then it will inject one MSI interrupt
- to CPU provided atleast one completion message is available.
+ to CPU provided at least one completion message is available.
Optional properties:
--------------------
diff --git a/sys/contrib/device-tree/Bindings/mailbox/fsl,mu.yaml b/sys/contrib/device-tree/Bindings/mailbox/fsl,mu.yaml
index 191c1ce15009..12e7a7d536a3 100644
--- a/sys/contrib/device-tree/Bindings/mailbox/fsl,mu.yaml
+++ b/sys/contrib/device-tree/Bindings/mailbox/fsl,mu.yaml
@@ -72,9 +72,9 @@ properties:
type : Channel type
channel : Channel number
- This MU support 5 type of unidirectional channels, each type
+ This MU support 6 type of unidirectional channels, each type
has 4 channels except RST channel which only has 1 channel.
- A total of 17 channels. Following types are
+ A total of 21 channels. Following types are
supported:
0 - TX channel with 32bit transmit register and IRQ transmit
acknowledgment support.
@@ -82,6 +82,7 @@ properties:
2 - TX doorbell channel. Without own register and no ACK support.
3 - RX doorbell channel.
4 - RST channel
+ 5 - Tx doorbell channel. With S/W ACK from the other side.
const: 2
clocks:
diff --git a/sys/contrib/device-tree/Bindings/mailbox/qcom,apcs-kpss-global.yaml b/sys/contrib/device-tree/Bindings/mailbox/qcom,apcs-kpss-global.yaml
index d2e25ff6db7f..79eb523b8436 100644
--- a/sys/contrib/device-tree/Bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/sys/contrib/device-tree/Bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -25,6 +25,24 @@ properties:
- const: qcom,ipq6018-apcs-apps-global
- items:
- enum:
+ - qcom,qcs404-apcs-apps-global
+ - const: qcom,msm8916-apcs-kpss-global
+ - const: syscon
+ - items:
+ - enum:
+ - qcom,msm8976-apcs-kpss-global
+ - const: qcom,msm8994-apcs-kpss-global
+ - const: syscon
+ - items:
+ - enum:
+ - qcom,msm8998-apcs-hmss-global
+ - qcom,sdm660-apcs-hmss-global
+ - qcom,sm4250-apcs-hmss-global
+ - qcom,sm6115-apcs-hmss-global
+ - qcom,sm6125-apcs-hmss-global
+ - const: qcom,msm8994-apcs-kpss-global
+ - items:
+ - enum:
- qcom,sc7180-apss-shared
- qcom,sc8180x-apss-shared
- qcom,sm8150-apss-shared
@@ -34,22 +52,14 @@ properties:
- qcom,msm8916-apcs-kpss-global
- qcom,msm8939-apcs-kpss-global
- qcom,msm8953-apcs-kpss-global
- - qcom,msm8976-apcs-kpss-global
- qcom,msm8994-apcs-kpss-global
- - qcom,qcs404-apcs-apps-global
- qcom,sdx55-apcs-gcc
- const: syscon
- enum:
- qcom,ipq6018-apcs-apps-global
- - qcom,ipq8074-apcs-apps-global
- qcom,msm8996-apcs-hmss-global
- - qcom,msm8998-apcs-hmss-global
- qcom,qcm2290-apcs-hmss-global
- - qcom,sdm660-apcs-hmss-global
- qcom,sdm845-apss-shared
- - qcom,sm4250-apcs-hmss-global
- - qcom,sm6115-apcs-hmss-global
- - qcom,sm6125-apcs-hmss-global
reg:
maxItems: 1
@@ -80,20 +90,38 @@ allOf:
- if:
properties:
compatible:
- enum:
- - qcom,msm8916-apcs-kpss-global
- - qcom,msm8939-apcs-kpss-global
- - qcom,qcs404-apcs-apps-global
+ contains:
+ enum:
+ - qcom,msm8916-apcs-kpss-global
+ then:
+ properties:
+ clocks:
+ items:
+ - description: primary pll parent of the clock driver
+ - description: auxiliary parent
+ clock-names:
+ items:
+ - const: pll
+ - const: aux
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8939-apcs-kpss-global
then:
properties:
clocks:
items:
- description: primary pll parent of the clock driver
- description: auxiliary parent
+ - description: reference clock
clock-names:
items:
- const: pll
- const: aux
+ - const: ref
- if:
properties:
@@ -113,6 +141,7 @@ allOf:
- const: ref
- const: pll
- const: aux
+
- if:
properties:
compatible:
@@ -125,26 +154,22 @@ allOf:
items:
- description: primary pll parent of the clock driver
- description: XO clock
+ - description: GCC GPLL0 clock source
clock-names:
items:
- const: pll
- const: xo
+ - const: gpll0
- if:
properties:
compatible:
enum:
- qcom,msm8953-apcs-kpss-global
- - qcom,msm8976-apcs-kpss-global
- qcom,msm8994-apcs-kpss-global
- qcom,msm8996-apcs-hmss-global
- - qcom,msm8998-apcs-hmss-global
- qcom,qcm2290-apcs-hmss-global
- - qcom,sdm660-apcs-hmss-global
- qcom,sdm845-apss-shared
- - qcom,sm4250-apcs-hmss-global
- - qcom,sm6115-apcs-hmss-global
- - qcom,sm6125-apcs-hmss-global
then:
properties:
clocks: false
@@ -190,7 +215,8 @@ examples:
#define GCC_APSS_AHB_CLK_SRC 1
#define GCC_GPLL0_AO_OUT_MAIN 123
apcs: mailbox@b011000 {
- compatible = "qcom,qcs404-apcs-apps-global", "syscon";
+ compatible = "qcom,qcs404-apcs-apps-global",
+ "qcom,msm8916-apcs-kpss-global", "syscon";
reg = <0x0b011000 0x1000>;
#mbox-cells = <1>;
clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
diff --git a/sys/contrib/device-tree/Bindings/mailbox/qcom-ipcc.yaml b/sys/contrib/device-tree/Bindings/mailbox/qcom-ipcc.yaml
index cc6f66eccc84..8f004868aad9 100644
--- a/sys/contrib/device-tree/Bindings/mailbox/qcom-ipcc.yaml
+++ b/sys/contrib/device-tree/Bindings/mailbox/qcom-ipcc.yaml
@@ -34,6 +34,8 @@ properties:
- qcom,sm8350-ipcc
- qcom,sm8450-ipcc
- qcom,sm8550-ipcc
+ - qcom,sm8650-ipcc
+ - qcom,x1e80100-ipcc
- const: qcom,ipcc
reg:
diff --git a/sys/contrib/device-tree/Bindings/mailbox/ti,omap-mailbox.yaml b/sys/contrib/device-tree/Bindings/mailbox/ti,omap-mailbox.yaml
index d433e496ec6e..1a2001e58880 100644
--- a/sys/contrib/device-tree/Bindings/mailbox/ti,omap-mailbox.yaml
+++ b/sys/contrib/device-tree/Bindings/mailbox/ti,omap-mailbox.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mailbox/ti,omap-mailbox.yaml#
@@ -159,7 +159,7 @@ properties:
a corresponding sysc interconnect node.
This property is only needed on some legacy OMAP SoCs which have not
- yet been converted to the ti,sysc interconnect hierarachy, but is
+ yet been converted to the ti,sysc interconnect hierarchy, but is
otherwise considered obsolete.
patternProperties:
diff --git a/sys/contrib/device-tree/Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml b/sys/contrib/device-tree/Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
index aeaddbf574b0..fe83b5cb1278 100644
--- a/sys/contrib/device-tree/Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
+++ b/sys/contrib/device-tree/Bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
@@ -37,7 +37,9 @@ maintainers:
properties:
compatible:
- const: xlnx,zynqmp-ipi-mailbox
+ enum:
+ - xlnx,zynqmp-ipi-mailbox
+ - xlnx,versal-ipi-mailbox
method:
description: |
@@ -58,6 +60,12 @@ properties:
'#size-cells':
const: 2
+ reg:
+ maxItems: 2
+
+ reg-names:
+ maxItems: 2
+
xlnx,ipi-id:
description: |
Remote Xilinx IPI agent ID of which the mailbox is connected to.
@@ -74,6 +82,20 @@ patternProperties:
type: object # DT nodes are json objects
additionalProperties: false
properties:
+
+ compatible:
+ enum:
+ - xlnx,zynqmp-ipi-dest-mailbox
+ - xlnx,versal-ipi-dest-mailbox
+
+ reg:
+ minItems: 1
+ maxItems: 4
+
+ reg-names:
+ minItems: 1
+ maxItems: 4
+
xlnx,ipi-id:
description:
Remote Xilinx IPI agent ID of which the mailbox is connected to.
@@ -84,22 +106,44 @@ patternProperties:
description:
It contains tx(0) or rx(1) channel IPI id number.
- reg:
- maxItems: 4
-
- reg-names:
- items:
- - const: local_request_region
- - const: local_response_region
- - const: remote_request_region
- - const: remote_response_region
+ allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - xlnx,zynqmp-ipi-dest-mailbox
+ then:
+ properties:
+ reg:
+ maxItems: 4
+
+ reg-names:
+ items:
+ - const: local_request_region
+ - const: local_response_region
+ - const: remote_request_region
+ - const: remote_response_region
+ else:
+ properties:
+ reg:
+ minItems: 1
+ items:
+ - description: Remote IPI agent control register region
+ - description: Remote IPI agent optional message buffers
+
+ reg-names:
+ minItems: 1
+ items:
+ - const: ctrl
+ - const: msg
required:
+ - compatible
- reg
- reg-names
- "#mbox-cells"
-
-additionalProperties: false
+ - xlnx,ipi-id
required:
- compatible
@@ -108,6 +152,36 @@ required:
- '#size-cells'
- xlnx,ipi-id
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - xlnx,zynqmp-ipi-mailbox
+ then:
+ properties:
+ reg: false
+ reg-names: false
+
+ else:
+ properties:
+ reg:
+ items:
+ - description: Host IPI agent control register region
+ - description: Host IPI agent optional message buffers
+
+ reg-names:
+ items:
+ - const: ctrl
+ - const: msg
+
+ required:
+ - reg
+ - reg-names
+
+additionalProperties: false
+
examples:
- |
#include<dt-bindings/interrupt-controller/arm-gic.h>
@@ -124,6 +198,7 @@ examples:
ranges;
mailbox: mailbox@ff9905c0 {
+ compatible = "xlnx,zynqmp-ipi-dest-mailbox";
reg = <0x0 0xff9905c0 0x0 0x20>,
<0x0 0xff9905e0 0x0 0x20>,
<0x0 0xff990e80 0x0 0x20>,
@@ -138,4 +213,41 @@ examples:
};
};
+ - |
+ #include<dt-bindings/interrupt-controller/arm-gic.h>
+
+ bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ mailbox@ff300000 {
+ compatible = "xlnx,versal-ipi-mailbox";
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ reg = <0x0 0xff300000 0x0 0x1000>,
+ <0x0 0xff990000 0x0 0x1ff>;
+ reg-names = "ctrl", "msg";
+ xlnx,ipi-id = <0>;
+ ranges;
+
+ /* buffered IPI */
+ mailbox@ff340000 {
+ compatible = "xlnx,versal-ipi-dest-mailbox";
+ reg = <0x0 0xff340000 0x0 0x1000>,
+ <0x0 0xff990400 0x0 0x1ff>;
+ reg-names = "ctrl", "msg";
+ #mbox-cells = <1>;
+ xlnx,ipi-id = <4>;
+ };
+
+ /* bufferless IPI */
+ mailbox@ff370000 {
+ compatible = "xlnx,versal-ipi-dest-mailbox";
+ reg = <0x0 0xff370000 0x0 0x1000>;
+ reg-names = "ctrl";
+ #mbox-cells = <1>;
+ xlnx,ipi-id = <7>;
+ };
+ };
+ };
...
diff --git a/sys/contrib/device-tree/Bindings/media/amlogic,meson6-ir.yaml b/sys/contrib/device-tree/Bindings/media/amlogic,meson6-ir.yaml
index 3f9fa92703bb..0f95fe8dd9ac 100644
--- a/sys/contrib/device-tree/Bindings/media/amlogic,meson6-ir.yaml
+++ b/sys/contrib/device-tree/Bindings/media/amlogic,meson6-ir.yaml
@@ -19,6 +19,7 @@ properties:
- amlogic,meson6-ir
- amlogic,meson8b-ir
- amlogic,meson-gxbb-ir
+ - amlogic,meson-s4-ir
- items:
- const: amlogic,meson-gx-ir
- const: amlogic,meson-gxbb-ir
diff --git a/sys/contrib/device-tree/Bindings/media/amphion,vpu.yaml b/sys/contrib/device-tree/Bindings/media/amphion,vpu.yaml
index a9d80eaeeeb6..c0d83d755239 100644
--- a/sys/contrib/device-tree/Bindings/media/amphion,vpu.yaml
+++ b/sys/contrib/device-tree/Bindings/media/amphion,vpu.yaml
@@ -47,7 +47,7 @@ patternProperties:
$ref: ../mailbox/fsl,mu.yaml#
- "^vpu_core@[0-9a-f]+$":
+ "^vpu-core@[0-9a-f]+$":
description:
Each core correspond a decoder or encoder, need to configure them
separately. NXP i.MX8QM SoC has one decoder and two encoder, i.MX8QXP SoC
@@ -143,7 +143,7 @@ examples:
power-domains = <&pd IMX_SC_R_VPU_MU_2>;
};
- vpu_core0: vpu_core@2d080000 {
+ vpu_core0: vpu-core@2d080000 {
compatible = "nxp,imx8q-vpu-decoder";
reg = <0x2d080000 0x10000>;
power-domains = <&pd IMX_SC_R_VPU_DEC_0>;
@@ -154,7 +154,7 @@ examples:
memory-region = <&decoder_boot>, <&decoder_rpc>;
};
- vpu_core1: vpu_core@2d090000 {
+ vpu_core1: vpu-core@2d090000 {
compatible = "nxp,imx8q-vpu-encoder";
reg = <0x2d090000 0x10000>;
power-domains = <&pd IMX_SC_R_VPU_ENC_0>;
@@ -165,7 +165,7 @@ examples:
memory-region = <&encoder1_boot>, <&encoder1_rpc>;
};
- vpu_core2: vpu_core@2d0a0000 {
+ vpu_core2: vpu-core@2d0a0000 {
reg = <0x2d0a0000 0x10000>;
compatible = "nxp,imx8q-vpu-encoder";
power-domains = <&pd IMX_SC_R_VPU_ENC_1>;
diff --git a/sys/contrib/device-tree/Bindings/media/cdns,csi2rx.yaml b/sys/contrib/device-tree/Bindings/media/cdns,csi2rx.yaml
new file mode 100644
index 000000000000..2008a47c0580
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/cdns,csi2rx.yaml
@@ -0,0 +1,202 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/cdns,csi2rx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cadence MIPI-CSI2 RX controller
+
+maintainers:
+ - Maxime Ripard <mripard@kernel.org>
+
+description:
+ The Cadence MIPI-CSI2 RX controller is a CSI-2 bridge supporting up to 4 CSI
+ lanes in input, and 4 different pixel streams in output.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - starfive,jh7110-csi2rx
+ - ti,j721e-csi2rx
+ - const: cdns,csi2rx
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: CSI2Rx system clock
+ - description: Gated Register bank clock for APB interface
+ - description: pixel Clock for Stream interface 0
+ - description: pixel Clock for Stream interface 1
+ - description: pixel Clock for Stream interface 2
+ - description: pixel Clock for Stream interface 3
+
+ clock-names:
+ items:
+ - const: sys_clk
+ - const: p_clk
+ - const: pixel_if0_clk
+ - const: pixel_if1_clk
+ - const: pixel_if2_clk
+ - const: pixel_if3_clk
+
+ resets:
+ items:
+ - description: CSI2Rx system reset
+ - description: Gated Register bank reset for APB interface
+ - description: pixel reset for Stream interface 0
+ - description: pixel reset for Stream interface 1
+ - description: pixel reset for Stream interface 2
+ - description: pixel reset for Stream interface 3
+
+ reset-names:
+ items:
+ - const: sys
+ - const: reg_bank
+ - const: pixel_if0
+ - const: pixel_if1
+ - const: pixel_if2
+ - const: pixel_if3
+
+ phys:
+ maxItems: 1
+ description: MIPI D-PHY
+
+ phy-names:
+ items:
+ - const: dphy
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description:
+ Input port node, single endpoint describing the CSI-2 transmitter.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-type:
+ const: 4
+
+ clock-lanes:
+ const: 0
+
+ data-lanes:
+ minItems: 1
+ maxItems: 4
+ items:
+ maximum: 4
+
+ required:
+ - data-lanes
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Stream 0 Output port node
+
+ port@2:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Stream 1 Output port node
+
+ port@3:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Stream 2 Output port node
+
+ port@4:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Stream 3 Output port node
+
+ required:
+ - port@0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - ports
+
+additionalProperties: false
+
+examples:
+ - |
+ csi@d060000 {
+ compatible = "starfive,jh7110-csi2rx", "cdns,csi2rx";
+ reg = <0x0d060000 0x1000>;
+ clocks = <&byteclock 7>, <&byteclock 6>,
+ <&coreclock 8>, <&coreclock 9>,
+ <&coreclock 10>, <&coreclock 11>;
+ clock-names = "sys_clk", "p_clk",
+ "pixel_if0_clk", "pixel_if1_clk",
+ "pixel_if2_clk", "pixel_if3_clk";
+ resets = <&bytereset 9>, <&bytereset 4>,
+ <&corereset 5>, <&corereset 6>,
+ <&corereset 7>, <&corereset 8>;
+ reset-names = "sys", "reg_bank",
+ "pixel_if0", "pixel_if1",
+ "pixel_if2", "pixel_if3";
+ phys = <&csi_phy>;
+ phy-names = "dphy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ csi2rx_in_sensor: endpoint {
+ remote-endpoint = <&sensor_out_csi2rx>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ csi2rx_out_grabber0: endpoint {
+ remote-endpoint = <&grabber0_in_csi2rx>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ csi2rx_out_grabber1: endpoint {
+ remote-endpoint = <&grabber1_in_csi2rx>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ csi2rx_out_grabber2: endpoint {
+ remote-endpoint = <&grabber2_in_csi2rx>;
+ };
+ };
+
+ port@4 {
+ reg = <4>;
+
+ csi2rx_out_grabber3: endpoint {
+ remote-endpoint = <&grabber3_in_csi2rx>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/media/cec/nvidia,tegra114-cec.yaml b/sys/contrib/device-tree/Bindings/media/cec/nvidia,tegra114-cec.yaml
index 369c48fd9bf9..a6b73498bc21 100644
--- a/sys/contrib/device-tree/Bindings/media/cec/nvidia,tegra114-cec.yaml
+++ b/sys/contrib/device-tree/Bindings/media/cec/nvidia,tegra114-cec.yaml
@@ -53,6 +53,5 @@ examples:
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_CEC>;
clock-names = "cec";
- status = "disabled";
hdmi-phandle = <&hdmi>;
};
diff --git a/sys/contrib/device-tree/Bindings/media/cnm,wave521c.yaml b/sys/contrib/device-tree/Bindings/media/cnm,wave521c.yaml
new file mode 100644
index 000000000000..6a11c1d11fb5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/cnm,wave521c.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/cnm,wave521c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Chips&Media Wave 5 Series multi-standard codec IP
+
+maintainers:
+ - Nas Chung <nas.chung@chipsnmedia.com>
+ - Jackson Lee <jackson.lee@chipsnmedia.com>
+
+description:
+ The Chips&Media WAVE codec IP is a multi format video encoder/decoder
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - ti,j721s2-wave521c
+ - const: cnm,wave521c
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: VCODEC clock
+
+ interrupts:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ sram:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The VPU uses the SRAM to store some of the reference data instead of
+ storing it on DMA memory. It is mainly used for the purpose of reducing
+ bandwidth.
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ vpu: video-codec@12345678 {
+ compatible = "ti,j721s2-wave521c", "cnm,wave521c";
+ reg = <0x12345678 0x1000>;
+ clocks = <&clks 42>;
+ interrupts = <42>;
+ sram = <&sram>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/alliedvision,alvium-csi2.yaml b/sys/contrib/device-tree/Bindings/media/i2c/alliedvision,alvium-csi2.yaml
new file mode 100644
index 000000000000..d3329e991d16
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/alliedvision,alvium-csi2.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allied Vision Alvium Camera
+
+maintainers:
+ - Tommaso Merciai <tomm.merciai@gmail.com>
+ - Martin Hecht <martin.hecht@avnet.eu>
+
+allOf:
+ - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+ compatible:
+ const: alliedvision,alvium-csi2
+
+ reg:
+ maxItems: 1
+
+ vcc-ext-in-supply:
+ description: |
+ The regulator that supplies power to the VCC_EXT_IN pins.
+
+ port:
+ description: Digital Output Port
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ additionalProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ link-frequencies: true
+
+ data-lanes:
+ minItems: 1
+ items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
+
+ required:
+ - data-lanes
+ - link-frequencies
+
+required:
+ - compatible
+ - reg
+ - vcc-ext-in-supply
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ alvium: camera@3c {
+ compatible = "alliedvision,alvium-csi2";
+ reg = <0x3c>;
+ vcc-ext-in-supply = <&reg_vcc_ext_in>;
+
+ port {
+ alvium_out: endpoint {
+ remote-endpoint = <&mipi_csi_0_in>;
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <681250000>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/asahi-kasei,ak7375.yaml b/sys/contrib/device-tree/Bindings/media/i2c/asahi-kasei,ak7375.yaml
index 22a810fc7222..fe312cc6a873 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/asahi-kasei,ak7375.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/asahi-kasei,ak7375.yaml
@@ -15,7 +15,9 @@ description:
properties:
compatible:
- const: asahi-kasei,ak7375
+ enum:
+ - asahi-kasei,ak7345
+ - asahi-kasei,ak7375
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc0308.yaml b/sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc0308.yaml
new file mode 100644
index 000000000000..f81e7daed67b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc0308.yaml
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc0308.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Galaxycore GC0308 and GC0309 Image Sensors
+
+maintainers:
+ - Sebastian Reichel <sre@kernel.org>
+
+description: |
+ The GalaxyCore GC0308 (1/6.5") and GC0309 (1/9") are 640x480 VGA sensors
+ programmable through an I2C interface and connected via parallel bus.
+ They include an ISP capable of auto exposure and auto white balance.
+
+allOf:
+ - $ref: ../video-interface-devices.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - const: galaxycore,gc0308
+ - items:
+ - const: galaxycore,gc0309
+ - const: galaxycore,gc0308
+
+ reg:
+ const: 0x21
+
+ clocks:
+ description: Reference to the xclk clock.
+ maxItems: 1
+
+ reset-gpios:
+ description: GPIO descriptor for the reset pin.
+ maxItems: 1
+
+ powerdown-gpios:
+ description: GPIO descriptor for the powerdown pin.
+ maxItems: 1
+
+ vdd28-supply:
+ description: 2.8V supply
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ description: |
+ Video output port.
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-width: true
+ data-shift: true
+ hsync-active: true
+ vsync-active: true
+ data-active: true
+ pclk-sample: true
+
+ required:
+ - bus-width
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - powerdown-gpios
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ camera-sensor@21 {
+ compatible = "galaxycore,gc0308";
+ reg = <0x21>;
+ clocks = <&camera_clk>;
+ powerdown-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ vdd28-supply = <&vdd28>;
+
+ port {
+ gc0308_ep: endpoint {
+ remote-endpoint = <&parallel_from_gc0308>;
+ bus-width = <8>;
+ data-shift = <2>; /* lines 9:2 are used */
+ hsync-active = <1>; /* active high */
+ vsync-active = <1>; /* active high */
+ data-active = <1>; /* active high */
+ pclk-sample = <1>; /* sample on rising edge */
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc2145.yaml b/sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc2145.yaml
new file mode 100644
index 000000000000..1726ecca4c77
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/galaxycore,gc2145.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc2145.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Galaxy Core 1/5'' UXGA CMOS Image Sensor
+
+maintainers:
+ - Alain Volmat <alain.volmat@foss.st.com>
+
+description:
+ The Galaxy Core GC2145 is a 2 Megapixel CMOS image sensor, for mobile
+ phone camera applications and digital camera products. GC2145 incorporates a
+ 1616V x 1232H active pixel array, on-chip 10-bit ADC, and image signal
+ processor allowing AE/AWB/interpolation/de-noise/color-conversion and
+ gamma correction. Bayer RGB, RGB565 and YCbCr 4:2:2 can be provided by the
+ sensor. It is programmable through an I2C interface. Image data is sent
+ either through a parallel interface or through MIPI CSI-2.
+
+allOf:
+ - $ref: ../video-interface-devices.yaml#
+
+properties:
+ compatible:
+ const: galaxycore,gc2145
+
+ reg:
+ const: 0x3c
+
+ clocks:
+ maxItems: 1
+
+ powerdown-gpios:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ iovdd-supply:
+ description: Power Supply for I/O circuits (1.7 - 3V).
+
+ avdd-supply:
+ description: Power for analog circuit/sensor array (2.7 - 3V).
+
+ dvdd-supply:
+ description: Power for digital core (1.7 - 1.9V).
+
+ orientation: true
+
+ rotation: true
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ link-frequencies: true
+
+ required:
+ - link-frequencies
+
+ required:
+ - endpoint
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - powerdown-gpios
+ - reset-gpios
+ - iovdd-supply
+ - avdd-supply
+ - dvdd-supply
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ camera@3c {
+ compatible = "galaxycore,gc2145";
+ reg = <0x3c>;
+ clocks = <&clk_ext_camera>;
+ iovdd-supply = <&scmi_v3v3_sw>;
+ avdd-supply = <&scmi_v3v3_sw>;
+ dvdd-supply = <&scmi_v3v3_sw>;
+ powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
+ reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
+
+ port {
+ endpoint {
+ remote-endpoint = <&mipid02_0>;
+ data-lanes = <1 2>;
+ link-frequencies = /bits/ 64 <120000000 192000000 240000000>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/hynix,hi846.yaml b/sys/contrib/device-tree/Bindings/media/i2c/hynix,hi846.yaml
index 1e2df8cf2937..60f19e1152b3 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/hynix,hi846.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/hynix,hi846.yaml
@@ -14,6 +14,9 @@ description: |-
interface and CCI (I2C compatible) control bus. The output format
is raw Bayer.
+allOf:
+ - $ref: /schemas/media/video-interface-devices.yaml#
+
properties:
compatible:
const: hynix,hi846
@@ -86,7 +89,7 @@ required:
- vddd-supply
- port
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
@@ -109,6 +112,8 @@ examples:
vddio-supply = <&reg_camera_vddio>;
reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
shutdown-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
+ orientation = <0>;
+ rotation = <0>;
port {
camera_out: endpoint {
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/onnn,mt9m114.yaml b/sys/contrib/device-tree/Bindings/media/i2c/onnn,mt9m114.yaml
new file mode 100644
index 000000000000..f6b87892068a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/onnn,mt9m114.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/onnn,mt9m114.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: onsemi 1/6-inch 720p CMOS Digital Image Sensor
+
+maintainers:
+ - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+
+description: |-
+ The onsemi MT9M114 is a 1/6-inch 720p (1.26 Mp) CMOS digital image sensor
+ with an active pixel-array size of 1296H x 976V. It is programmable through
+ an I2C interface and outputs image data over a 8-bit parallel or 1-lane MIPI
+ CSI-2 connection.
+
+properties:
+ compatible:
+ const: onnn,mt9m114
+
+ reg:
+ description: I2C device address
+ enum:
+ - 0x48
+ - 0x5d
+
+ clocks:
+ description: EXTCLK clock signal
+ maxItems: 1
+
+ vdd-supply:
+ description:
+ Core digital voltage supply, 1.8V
+
+ vddio-supply:
+ description:
+ I/O digital voltage supply, 1.8V or 2.8V
+
+ vaa-supply:
+ description:
+ Analog voltage supply, 2.8V
+
+ reset-gpios:
+ description: |-
+ Reference to the GPIO connected to the RESET_BAR pin, if any (active
+ low).
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ additionalProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ additionalProperties: false
+
+ properties:
+ bus-type:
+ enum: [4, 5, 6]
+
+ link-frequencies: true
+ remote-endpoint: true
+
+ # The number and mapping of lanes (for CSI-2), and the bus width and
+ # signal polarities (for parallel and BT.656) are fixed and must not
+ # be specified.
+
+ required:
+ - bus-type
+ - link-frequencies
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - vdd-supply
+ - vddio-supply
+ - vaa-supply
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/media/video-interfaces.h>
+
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sensor@48 {
+ compatible = "onnn,mt9m114";
+ reg = <0x48>;
+
+ clocks = <&clk24m 0>;
+
+ reset-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
+
+ vddio-supply = <&reg_cam_1v8>;
+ vdd-supply = <&reg_cam_1v8>;
+ vaa-supply = <&reg_2p8v>;
+
+ port {
+ endpoint {
+ bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+ link-frequencies = /bits/ 64 <384000000>;
+ remote-endpoint = <&mipi_csi_in>;
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ov8856.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ov8856.yaml
index 57f5e48fd8e0..816dac9c6f60 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/ov8856.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ov8856.yaml
@@ -67,19 +67,17 @@ properties:
properties:
data-lanes:
- description: |-
- The driver only supports four-lane operation.
- items:
- - const: 1
- - const: 2
- - const: 3
- - const: 4
-
- link-frequencies:
- description: Frequencies listed are driver, not h/w limitations.
- maxItems: 2
- items:
- enum: [ 360000000, 180000000 ]
+ oneOf:
+ - items:
+ - const: 1
+ - items:
+ - const: 1
+ - const: 2
+ - items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
required:
- link-frequencies
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov02a10.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov02a10.yaml
index 763cebe03dc2..67c1c291327b 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov02a10.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov02a10.yaml
@@ -68,12 +68,6 @@ properties:
marked GPIO_ACTIVE_LOW.
maxItems: 1
- rotation:
- enum:
- - 0 # Sensor Mounted Upright
- - 180 # Sensor Mounted Upside Down
- default: 0
-
port:
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false
@@ -114,7 +108,7 @@ required:
- reset-gpios
- port
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov4689.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov4689.yaml
index 50579c947f3c..d96199031b66 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov4689.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov4689.yaml
@@ -52,10 +52,6 @@ properties:
description:
GPIO connected to the reset pin (active low)
- orientation: true
-
- rotation: true
-
port:
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false
@@ -95,7 +91,7 @@ required:
- dvdd-supply
- port
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5640.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5640.yaml
index a621032f9bd0..2c5e69356658 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5640.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5640.yaml
@@ -44,11 +44,6 @@ properties:
description: >
Reference to the GPIO connected to the reset pin, if any.
- rotation:
- enum:
- - 0
- - 180
-
port:
description: Digital Output Port
$ref: /schemas/graph.yaml#/$defs/port-base
@@ -85,7 +80,7 @@ required:
- DOVDD-supply
- port
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5642.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5642.yaml
new file mode 100644
index 000000000000..01f8b2b3fd17
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5642.yaml
@@ -0,0 +1,141 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ovti,ov5642.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OmniVision OV5642 Image Sensor
+
+maintainers:
+ - Fabio Estevam <festevam@gmail.com>
+
+allOf:
+ - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+ compatible:
+ const: ovti,ov5642
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: XCLK Input Clock
+
+ AVDD-supply:
+ description: Analog voltage supply, 2.8V.
+
+ DVDD-supply:
+ description: Digital core voltage supply, 1.5V.
+
+ DOVDD-supply:
+ description: Digital I/O voltage supply, 1.8V.
+
+ powerdown-gpios:
+ maxItems: 1
+ description: Reference to the GPIO connected to the powerdown pin, if any.
+
+ reset-gpios:
+ maxItems: 1
+ description: Reference to the GPIO connected to the reset pin, if any.
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ description: |
+ Video output port.
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-type:
+ enum: [5, 6]
+
+ bus-width:
+ enum: [8, 10]
+ default: 10
+
+ data-shift:
+ enum: [0, 2]
+ default: 0
+
+ hsync-active:
+ enum: [0, 1]
+ default: 1
+
+ vsync-active:
+ enum: [0, 1]
+ default: 1
+
+ pclk-sample:
+ enum: [0, 1]
+ default: 1
+
+ allOf:
+ - if:
+ properties:
+ bus-type:
+ const: 6
+ then:
+ properties:
+ hsync-active: false
+ vsync-active: false
+
+ - if:
+ properties:
+ bus-width:
+ const: 10
+ then:
+ properties:
+ data-shift:
+ const: 0
+
+ required:
+ - bus-type
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/media/video-interfaces.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ camera@3c {
+ compatible = "ovti,ov5642";
+ reg = <0x3c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ov5642>;
+ clocks = <&clk_ext_camera>;
+ DOVDD-supply = <&vgen4_reg>;
+ AVDD-supply = <&vgen3_reg>;
+ DVDD-supply = <&vgen2_reg>;
+ powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
+
+ port {
+ ov5642_to_parallel: endpoint {
+ bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
+ remote-endpoint = <&parallel_from_ov5642>;
+ bus-width = <8>;
+ data-shift = <2>; /* lines 9:2 are used */
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <1>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5693.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5693.yaml
index 359dc08440a8..3368b3bd8ef2 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5693.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov5693.yaml
@@ -5,26 +5,41 @@
$id: http://devicetree.org/schemas/media/i2c/ovti,ov5693.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Omnivision OV5693 CMOS Sensor
+title: Omnivision OV5693/OV5695 CMOS Sensors
maintainers:
- - Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
+ - Tommaso Merciai <tomm.merciai@gmail.com>
description: |
- The Omnivision OV5693 is a high performance, 1/4-inch, 5 megapixel, CMOS
- image sensor that delivers 2592x1944 at 30fps. It provides full-frame,
+ The Omnivision OV5693/OV5695 are high performance, 1/4-inch, 5 megapixel, CMOS
+ image sensors that deliver 2592x1944 at 30fps. It provides full-frame,
sub-sampled, and windowed 10-bit MIPI images in various formats via the
Serial Camera Control Bus (SCCB) interface.
- OV5693 is controlled via I2C and two-wire Serial Camera Control Bus (SCCB).
- The sensor output is available via CSI-2 serial data output (up to 2-lane).
+ OV5693/OV5695 are controlled via I2C and two-wire Serial Camera Control Bus
+ (SCCB). The sensor output is available via CSI-2 serial data output (up to
+ 2-lane).
allOf:
- $ref: /schemas/media/video-interface-devices.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ovti,ov5693
+ then:
+ properties:
+ port:
+ properties:
+ endpoint:
+ required:
+ - link-frequencies
properties:
compatible:
- const: ovti,ov5693
+ enum:
+ - ovti,ov5693
+ - ovti,ov5695
reg:
maxItems: 1
@@ -34,6 +49,9 @@ properties:
System input clock (aka XVCLK). From 6 to 27 MHz.
maxItems: 1
+ clock-names:
+ const: xvclk
+
dovdd-supply:
description:
Digital I/O voltage supply, 1.8V.
@@ -72,7 +90,6 @@ properties:
required:
- data-lanes
- - link-frequencies
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov64a40.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov64a40.yaml
new file mode 100644
index 000000000000..2b6143aff391
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov64a40.yaml
@@ -0,0 +1,103 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ovti,ov64a40.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OmniVision OV64A40 Image Sensor
+
+maintainers:
+ - Jacopo Mondi <jacopo.mondi@ideasonboard.com>
+
+allOf:
+ - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+ compatible:
+ const: ovti,ov64a40
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ avdd-supply:
+ description: Analog voltage supply, 2.8 volts
+
+ dvdd-supply:
+ description: Digital core voltage supply, 1.1 volts
+
+ dovdd-supply:
+ description: Digital I/O voltage supply, 1.8 volts
+
+ powerdown-gpios:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ additionalProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ additionalProperties: false
+
+ properties:
+ bus-type:
+ enum:
+ - 1 # MIPI CSI-2 C-PHY
+ - 4 # MIPI CSI-2 D-PHY
+ data-lanes: true
+ link-frequencies: true
+ clock-noncontinuous: true
+ remote-endpoint: true
+
+ required:
+ - bus-type
+ - data-lanes
+ - link-frequencies
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - port
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ camera@36 {
+ compatible = "ovti,ov64a40";
+ reg = <0x36>;
+ clocks = <&camera_clk>;
+ dovdd-supply = <&vgen4_reg>;
+ avdd-supply = <&vgen3_reg>;
+ dvdd-supply = <&vgen2_reg>;
+ powerdown-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+ rotation = <180>;
+ orientation = <2>;
+
+ port {
+ endpoint {
+ remote-endpoint = <&mipi_csi2_in>;
+ bus-type = <4>;
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <456000000>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov7251.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov7251.yaml
new file mode 100644
index 000000000000..2e5187acbbb8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ovti,ov7251.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ovti,ov7251.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OmniVision OV7251 Image Sensor
+
+description:
+ The Omnivision OV7251 is a 1/7.5-Inch CMOS active pixel digital image sensor
+ with an active array size of 640H x 480V. It is programmable through a serial
+ I2C interface.
+
+maintainers:
+ - Todor Tomov <todor.too@gmail.com>
+
+properties:
+ compatible:
+ const: ovti,ov7251
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: XCLK Input Clock
+
+ clock-names:
+ const: xclk
+
+ clock-frequency:
+ description: Frequency of the xclk clock in Hz.
+
+ vdda-supply:
+ description: Analog voltage supply, 2.8 volts
+
+ vddd-supply:
+ description: Digital core voltage supply, 1.2 volts
+
+ vdddo-supply:
+ description: Digital I/O voltage supply, 1.8 volts
+
+ enable-gpios:
+ maxItems: 1
+ description:
+ Reference to the GPIO connected to the XSHUTDOWN pin, if any. Polarity
+ is GPIO_ACTIVE_HIGH.
+
+ port:
+ description: Digital Output Port
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ additionalProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ clock-lanes:
+ maximum: 1
+
+ data-lanes:
+ maxItems: 1
+
+ link-frequencies: true
+
+ required:
+ - data-lanes
+ - link-frequencies
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - vdddo-supply
+ - vdda-supply
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ camera@3c {
+ compatible = "ovti,ov7251";
+ reg = <0x3c>;
+ clocks = <&clks 1>;
+ clock-frequency = <24000000>;
+ vdddo-supply = <&ov7251_vdddo_1v8>;
+ vdda-supply = <&ov7251_vdda_2v8>;
+ vddd-supply = <&ov7251_vddd_1v5>;
+ enable-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
+
+ port {
+ ov7251_ep: endpoint {
+ remote-endpoint = <&csi0_ep>;
+ clock-lanes = <1>;
+ data-lanes = <0>;
+ link-frequencies = /bits/ 64 <240000000 319200000>;
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/sony,imx214.yaml b/sys/contrib/device-tree/Bindings/media/i2c/sony,imx214.yaml
index e2470dd5920c..60903da84e1f 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/sony,imx214.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/sony,imx214.yaml
@@ -91,7 +91,7 @@ required:
- vddd-supply
- port
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/sony,imx335.yaml b/sys/contrib/device-tree/Bindings/media/i2c/sony,imx335.yaml
index a167dcdb3a32..106c36ee966d 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/sony,imx335.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/sony,imx335.yaml
@@ -32,6 +32,15 @@ properties:
description: Clock frequency from 6 to 27 MHz, 37.125MHz, 74.25MHz
maxItems: 1
+ avdd-supply:
+ description: Analog power supply (2.9V)
+
+ ovdd-supply:
+ description: Interface power supply (1.8V)
+
+ dvdd-supply:
+ description: Digital power supply (1.2V)
+
reset-gpios:
description: Reference to the GPIO connected to the XCLR pin, if any.
maxItems: 1
@@ -79,6 +88,10 @@ examples:
assigned-clock-parents = <&imx335_clk_parent>;
assigned-clock-rates = <24000000>;
+ avdd-supply = <&camera_vdda_2v9>;
+ ovdd-supply = <&camera_vddo_1v8>;
+ dvdd-supply = <&camera_vddd_1v2>;
+
port {
imx335: endpoint {
remote-endpoint = <&cam>;
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/sony,imx415.yaml b/sys/contrib/device-tree/Bindings/media/i2c/sony,imx415.yaml
index ffccf5f3c9e3..9a00dab2e8a3 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/sony,imx415.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/sony,imx415.yaml
@@ -44,16 +44,9 @@ properties:
description: Sensor reset (XCLR) GPIO
maxItems: 1
- flash-leds: true
-
- lens-focus: true
-
- orientation: true
-
- rotation: true
-
port:
$ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
properties:
endpoint:
@@ -88,7 +81,7 @@ required:
- ovdd-supply
- port
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/st,st-mipid02.yaml b/sys/contrib/device-tree/Bindings/media/i2c/st,st-mipid02.yaml
index 19a39d753aad..b68141264c0e 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/st,st-mipid02.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/st,st-mipid02.yaml
@@ -143,7 +143,6 @@ examples:
mipid02: csi2rx@14 {
compatible = "st,st-mipid02";
reg = <0x14>;
- status = "okay";
clocks = <&clk_ext_camera_12>;
clock-names = "xclk";
VDDE-supply = <&vdd>;
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/techwell,tw9900.yaml b/sys/contrib/device-tree/Bindings/media/i2c/techwell,tw9900.yaml
new file mode 100644
index 000000000000..e37317f81072
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/techwell,tw9900.yaml
@@ -0,0 +1,137 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/techwell,tw9900.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Techwell TW9900 NTSC/PAL video decoder
+
+maintainers:
+ - Mehdi Djait <mehdi.djait@bootlin.com>
+
+description:
+ The tw9900 is a multi-standard video decoder, supporting NTSC, PAL standards
+ with auto-detection features.
+
+properties:
+ compatible:
+ const: techwell,tw9900
+
+ reg:
+ maxItems: 1
+
+ vdd-supply:
+ description: VDD power supply
+
+ reset-gpios:
+ description: GPIO descriptor for the RESET input pin
+ maxItems: 1
+
+ powerdown-gpios:
+ description: GPIO descriptor for the POWERDOWN input pin
+ maxItems: 1
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ description: Analog input port
+
+ properties:
+ endpoint@0:
+ $ref: /schemas/graph.yaml#/properties/endpoint
+ description: CVBS over MUX0
+
+ endpoint@1:
+ $ref: /schemas/graph.yaml#/properties/endpoint
+ description: CVBS over MUX1
+
+ endpoint@2:
+ $ref: /schemas/graph.yaml#/properties/endpoint
+ description: Chroma over CIN0 and Y over MUX0
+
+ endpoint@3:
+ $ref: /schemas/graph.yaml#/properties/endpoint
+ description: Chroma over CIN0 and Y over MUX1
+
+ oneOf:
+ - required:
+ - endpoint@0
+ - required:
+ - endpoint@1
+ - required:
+ - endpoint@2
+ - required:
+ - endpoint@3
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Video port for the decoder output.
+
+
+ required:
+ - port@0
+ - port@1
+
+required:
+ - compatible
+ - ports
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/display/sdtv-standards.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ composite_connector {
+ compatible = "composite-video-connector";
+ label = "tv";
+ sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
+
+ port {
+ composite_to_tw9900: endpoint {
+ remote-endpoint = <&tw9900_to_composite>;
+ };
+ };
+ };
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ video-decoder@44 {
+ compatible = "techwell,tw9900";
+ reg = <0x44>;
+
+ vdd-supply = <&tw9900_supply>;
+ reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ reg = <0>;
+ tw9900_to_composite: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&composite_to_tw9900>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ endpoint {
+ remote-endpoint = <&cif_in>;
+ };
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/thine,thp7312.yaml b/sys/contrib/device-tree/Bindings/media/i2c/thine,thp7312.yaml
new file mode 100644
index 000000000000..1978fbb77a6c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/thine,thp7312.yaml
@@ -0,0 +1,224 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 Ideas on Board
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/thine,thp7312.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: THine THP7312
+
+maintainers:
+ - Paul Elder <paul.elder@@ideasonboard.com>
+
+description:
+ The THP7312 is a standalone ISP controlled over i2c, and is capable of
+ various image processing and correction functions, including 3A control. It
+ can be connected to CMOS image sensors from various vendors, supporting both
+ MIPI CSI-2 and parallel interfaces. It can also output on either MIPI CSI-2
+ or parallel. The hardware is capable of transmitting and receiving MIPI
+ interlaved data strams with data types or multiple virtual channel
+ identifiers.
+
+allOf:
+ - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+ compatible:
+ const: thine,thp7312
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description: CLKI clock input
+
+ thine,boot-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 1
+ default: 1
+ description:
+ Boot mode of the THP7312, reflecting the value of the BOOT[0] pin strap.
+ 0 is for the SPI/2-wire slave boot, 1 is for the SPI master boot (from
+ external flash ROM).
+
+ reset-gpios:
+ maxItems: 1
+ description:
+ Reference to the GPIO connected to the RESET_N pin, if any.
+ Must be released (set high) after all supplies are applied.
+
+ vddcore-supply:
+ description:
+ 1.2V supply for core, PLL, MIPI rx and MIPI tx.
+
+ vhtermrx-supply:
+ description:
+ Supply for input (RX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.
+
+ vddtx-supply:
+ description:
+ Supply for output (TX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.
+
+ vddhost-supply:
+ description:
+ Supply for host interface. 1.8V, 2.8V, or 3.3V.
+
+ vddcmos-supply:
+ description:
+ Supply for sensor interface. 1.8V, 2.8V, or 3.3V.
+
+ vddgpio-0-supply:
+ description:
+ Supply for GPIO_0. 1.8V, 2.8V, or 3.3V.
+
+ vddgpio-1-supply:
+ description:
+ Supply for GPIO_1. 1.8V, 2.8V, or 3.3V.
+
+ orientation: true
+ rotation: true
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ additionalProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-type:
+ const: 4 # CSI-2 D-PHY
+
+ data-lanes:
+ description:
+ This property is for lane reordering between the THP7312 and the
+ SoC. The sensor supports either two-lane, or four-lane operation.
+ If this property is omitted four-lane operation is assumed. For
+ two-lane operation the property must be set to <1 2>.
+ minItems: 2
+ maxItems: 4
+ items:
+ maximum: 4
+
+ sensors:
+ type: object
+ description: List of connected sensors
+
+ properties:
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ patternProperties:
+ "^sensor@[01]$":
+ type: object
+ description:
+ Sensors connected to the first and second input, with one node per
+ sensor.
+
+ properties:
+ thine,model:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Model of the connected sensors. Must be a valid compatible string.
+
+ reg:
+ description: THP7312 input port number
+ items:
+ - maximum: 1
+
+ data-lanes:
+ $ref: /schemas/media/video-interfaces.yaml#/properties/data-lanes
+ items:
+ maxItems: 4
+ description:
+ This property is for lane reordering between the THP7312 and the imaging
+ sensor that it is connected to.
+
+ required:
+ - reg
+ - data-lanes
+
+ additionalProperties: false
+
+ required:
+ - "#address-cells"
+ - "#size-cells"
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - reset-gpios
+ - clocks
+ - vddcore-supply
+ - vhtermrx-supply
+ - vddtx-supply
+ - vddhost-supply
+ - vddcmos-supply
+ - vddgpio-0-supply
+ - vddgpio-1-supply
+ - sensors
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/media/video-interfaces.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ camera@61 {
+ compatible = "thine,thp7312";
+ reg = <0x61>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam1_pins_default>;
+
+ reset-gpios = <&pio 119 GPIO_ACTIVE_LOW>;
+ clocks = <&camera61_clk>;
+
+ vddcore-supply = <&vsys_v4p2>;
+ vhtermrx-supply = <&vsys_v4p2>;
+ vddtx-supply = <&vsys_v4p2>;
+ vddhost-supply = <&vsys_v4p2>;
+ vddcmos-supply = <&vsys_v4p2>;
+ vddgpio-0-supply = <&vsys_v4p2>;
+ vddgpio-1-supply = <&vsys_v4p2>;
+
+ orientation = <0>;
+ rotation = <0>;
+
+ sensors {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sensor@0 {
+ thine,model = "sony,imx258";
+ reg = <0>;
+
+ data-lanes = <4 1 3 2>;
+ };
+ };
+
+ port {
+ thp7312_2_endpoint: endpoint {
+ remote-endpoint = <&mipi_thp7312_2>;
+ bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+ data-lanes = <4 2 1 3>;
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub913.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub913.yaml
new file mode 100644
index 000000000000..f6612bb0f667
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub913.yaml
@@ -0,0 +1,133 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ti,ds90ub913.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DS90UB913 FPD-Link III Serializer
+
+maintainers:
+ - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+
+description:
+ The TI DS90UB913 is an FPD-Link III video serializer for parallel video.
+
+properties:
+ compatible:
+ enum:
+ - ti,ds90ub913a-q1
+
+ '#gpio-cells':
+ const: 2
+ description:
+ First cell is the GPO pin number, second cell is the flags. The GPO pin
+ number must be in range of [0, 3]. Note that GPOs 2 and 3 are not
+ available in external oscillator mode.
+
+ gpio-controller: true
+
+ clocks:
+ maxItems: 1
+ description:
+ Reference clock connected to the CLKIN pin.
+
+ clock-names:
+ items:
+ - const: clkin
+
+ '#clock-cells':
+ const: 0
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: Parallel input port
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - pclk-sample
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ unevaluatedProperties: false
+ description: FPD-Link III output port
+
+ required:
+ - port@0
+ - port@1
+
+ i2c:
+ $ref: /schemas/i2c/i2c-controller.yaml#
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - '#gpio-cells'
+ - gpio-controller
+ - '#clock-cells'
+ - ports
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ serializer {
+ compatible = "ti,ds90ub913a-q1";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ clocks = <&clk_cam_48M>;
+ clock-names = "clkin";
+
+ #clock-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ub913_in: endpoint {
+ remote-endpoint = <&sensor_out>;
+ pclk-sample = <1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ endpoint {
+ remote-endpoint = <&deser_fpd_in>;
+ };
+ };
+ };
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sensor@48 {
+ compatible = "aptina,mt9v111";
+ reg = <0x48>;
+
+ clocks = <&fixed_clock>;
+
+ port {
+ sensor_out: endpoint {
+ remote-endpoint = <&ub913_in>;
+ };
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub953.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub953.yaml
new file mode 100644
index 000000000000..2030366994d1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub953.yaml
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ti,ds90ub953.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DS90UB953 FPD-Link III Serializer
+
+maintainers:
+ - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+
+description:
+ The TI DS90UB953 is an FPD-Link III video serializer for MIPI CSI-2.
+
+properties:
+ compatible:
+ enum:
+ - ti,ds90ub953-q1
+ - ti,ds90ub971-q1
+
+ '#gpio-cells':
+ const: 2
+ description:
+ First cell is the GPIO pin number, second cell is the flags. The GPIO pin
+ number must be in range of [0, 3].
+
+ gpio-controller: true
+
+ clocks:
+ maxItems: 1
+ description:
+ Reference clock connected to the CLKIN pin.
+
+ clock-names:
+ items:
+ - const: clkin
+
+ '#clock-cells':
+ const: 0
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: CSI-2 input port
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - data-lanes
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ unevaluatedProperties: false
+ description: FPD-Link III output port
+
+ required:
+ - port@0
+ - port@1
+
+ i2c:
+ $ref: /schemas/i2c/i2c-controller.yaml#
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - '#gpio-cells'
+ - gpio-controller
+ - '#clock-cells'
+ - ports
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ serializer {
+ compatible = "ti,ds90ub953-q1";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ #clock-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ub953_in: endpoint {
+ clock-lanes = <0>;
+ data-lanes = <1 2 3 4>;
+ remote-endpoint = <&sensor_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ endpoint {
+ remote-endpoint = <&deser_fpd_in>;
+ };
+ };
+ };
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sensor@1a {
+ compatible = "sony,imx274";
+ reg = <0x1a>;
+
+ reset-gpios = <&serializer 0 GPIO_ACTIVE_LOW>;
+
+ clocks = <&serializer>;
+ clock-names = "inck";
+
+ port {
+ sensor_out: endpoint {
+ remote-endpoint = <&ub953_in>;
+ };
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub960.yaml b/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub960.yaml
new file mode 100644
index 000000000000..0b71e6f911a8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/i2c/ti,ds90ub960.yaml
@@ -0,0 +1,428 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ti,ds90ub960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DS90UB9XX Family FPD-Link Deserializer Hubs
+
+maintainers:
+ - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+
+description:
+ The TI DS90UB9XX devices are FPD-Link video deserializers with I2C and GPIO
+ forwarding.
+
+allOf:
+ - $ref: /schemas/i2c/i2c-atr.yaml#
+
+properties:
+ compatible:
+ enum:
+ - ti,ds90ub960-q1
+ - ti,ds90ub9702-q1
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description:
+ Reference clock connected to the REFCLK pin.
+
+ clock-names:
+ items:
+ - const: refclk
+
+ powerdown-gpios:
+ maxItems: 1
+ description:
+ Specifier for the GPIO connected to the PDB pin.
+
+ i2c-alias-pool:
+ minItems: 1
+ maxItems: 32
+
+ links:
+ type: object
+ additionalProperties: false
+
+ properties:
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ ti,manual-strobe:
+ type: boolean
+ description:
+ Enable manual strobe position and EQ level
+
+ patternProperties:
+ '^link@[0-3]$':
+ type: object
+ additionalProperties: false
+ properties:
+ reg:
+ description: The link number
+ maxItems: 1
+
+ i2c-alias:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The I2C address used for the serializer. Transactions to this
+ address on the I2C bus where the deserializer resides are
+ forwarded to the serializer.
+
+ ti,rx-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # RAW10
+ - 1 # RAW12 HF
+ - 2 # RAW12 LF
+ - 3 # CSI2 SYNC
+ - 4 # CSI2 NON-SYNC
+ description:
+ FPD-Link Input Mode. This should reflect the hardware and the
+ default mode of the connected device.
+
+ ti,cdr-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # FPD-Link III
+ - 1 # FPD-Link IV
+ description:
+ FPD-Link CDR Mode. This should reflect the hardware and the
+ default mode of the connected device.
+
+ ti,strobe-pos:
+ $ref: /schemas/types.yaml#/definitions/int32
+ minimum: -13
+ maximum: 13
+ description: Manual strobe position
+
+ ti,eq-level:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 14
+ description: Manual EQ level
+
+ serializer:
+ type: object
+ description: FPD-Link Serializer node
+
+ required:
+ - reg
+ - i2c-alias
+ - ti,rx-mode
+ - serializer
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: FPD-Link input 0
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+ description:
+ Endpoint for FPD-Link port. If the RX mode for this port is RAW,
+ hsync-active and vsync-active must be defined.
+
+ port@1:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: FPD-Link input 1
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+ description:
+ Endpoint for FPD-Link port. If the RX mode for this port is RAW,
+ hsync-active and vsync-active must be defined.
+
+ port@2:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: FPD-Link input 2
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+ description:
+ Endpoint for FPD-Link port. If the RX mode for this port is RAW,
+ hsync-active and vsync-active must be defined.
+
+ port@3:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: FPD-Link input 3
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+ description:
+ Endpoint for FPD-Link port. If the RX mode for this port is RAW,
+ hsync-active and vsync-active must be defined.
+
+ port@4:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: CSI-2 Output 0
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ minItems: 1
+ maxItems: 4
+ link-frequencies:
+ maxItems: 1
+
+ required:
+ - data-lanes
+ - link-frequencies
+
+ port@5:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: CSI-2 Output 1
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ minItems: 1
+ maxItems: 4
+ link-frequencies:
+ maxItems: 1
+
+ required:
+ - data-lanes
+ - link-frequencies
+
+ required:
+ - port@0
+ - port@1
+ - port@2
+ - port@3
+ - port@4
+ - port@5
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - ports
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ clock-frequency = <400000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ deser@3d {
+ compatible = "ti,ds90ub960-q1";
+ reg = <0x3d>;
+
+ clock-names = "refclk";
+ clocks = <&fixed_clock>;
+
+ powerdown-gpios = <&pca9555 7 GPIO_ACTIVE_LOW>;
+
+ i2c-alias-pool = <0x4a 0x4b 0x4c 0x4d 0x4e 0x4f>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Port 0, Camera 0 */
+ port@0 {
+ reg = <0>;
+
+ ub960_fpd3_1_in: endpoint {
+ remote-endpoint = <&ub953_1_out>;
+ };
+ };
+
+ /* Port 1, Camera 1 */
+ port@1 {
+ reg = <1>;
+
+ ub960_fpd3_2_in: endpoint {
+ remote-endpoint = <&ub913_2_out>;
+ hsync-active = <0>;
+ vsync-active = <1>;
+ };
+ };
+
+ /* Port 2, unconnected */
+ port@2 {
+ reg = <2>;
+ };
+
+ /* Port 3, unconnected */
+ port@3 {
+ reg = <3>;
+ };
+
+ /* Port 4, CSI-2 TX */
+ port@4 {
+ reg = <4>;
+ ds90ub960_0_csi_out: endpoint {
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <800000000>;
+ remote-endpoint = <&csi2_phy0>;
+ };
+ };
+
+ /* Port 5, unconnected */
+ port@5 {
+ reg = <5>;
+ };
+ };
+
+ links {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Link 0 has DS90UB953 serializer and IMX274 sensor */
+
+ link@0 {
+ reg = <0>;
+ i2c-alias = <0x44>;
+
+ ti,rx-mode = <3>;
+
+ serializer1: serializer {
+ compatible = "ti,ds90ub953-q1";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ #clock-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ub953_1_in: endpoint {
+ data-lanes = <1 2 3 4>;
+ remote-endpoint = <&sensor_1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ ub953_1_out: endpoint {
+ remote-endpoint = <&ub960_fpd3_1_in>;
+ };
+ };
+ };
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sensor@1a {
+ compatible = "sony,imx274";
+ reg = <0x1a>;
+
+ reset-gpios = <&serializer1 0 GPIO_ACTIVE_LOW>;
+
+ port {
+ sensor_1_out: endpoint {
+ remote-endpoint = <&ub953_1_in>;
+ };
+ };
+ };
+ };
+ };
+ }; /* End of link@0 */
+
+ /* Link 1 has DS90UB913 serializer and MT9V111 sensor */
+
+ link@1 {
+ reg = <1>;
+ i2c-alias = <0x45>;
+
+ ti,rx-mode = <0>;
+
+ serializer2: serializer {
+ compatible = "ti,ds90ub913a-q1";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ clocks = <&clk_cam_48M>;
+ clock-names = "clkin";
+
+ #clock-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ub913_2_in: endpoint {
+ remote-endpoint = <&sensor_2_out>;
+ pclk-sample = <1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ ub913_2_out: endpoint {
+ remote-endpoint = <&ub960_fpd3_2_in>;
+ };
+ };
+ };
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sensor@48 {
+ compatible = "aptina,mt9v111";
+ reg = <0x48>;
+
+ clocks = <&serializer2>;
+
+ port {
+ sensor_2_out: endpoint {
+ remote-endpoint = <&ub913_2_in>;
+ };
+ };
+ };
+ };
+ };
+ }; /* End of link@1 */
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/toshiba,tc358746.yaml b/sys/contrib/device-tree/Bindings/media/i2c/toshiba,tc358746.yaml
index b8ba85a2416c..1c476b635b69 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/toshiba,tc358746.yaml
+++ b/sys/contrib/device-tree/Bindings/media/i2c/toshiba,tc358746.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |-
The Toshiba TC358746 converts a parallel video stream into a MIPI CSI-2
stream. The direction can be either parallel-in -> csi-out or csi-in ->
- parallel-out The chip is programmable trough I2C and SPI but the SPI
+ parallel-out The chip is programmable through I2C and SPI but the SPI
interface is only supported in parallel-in -> csi-out mode.
Note that the current device tree bindings only support the
@@ -69,6 +69,7 @@ properties:
properties:
port@0:
$ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
description: Input port
properties:
@@ -89,6 +90,7 @@ properties:
port@1:
$ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
description: Output port
properties:
diff --git a/sys/contrib/device-tree/Bindings/media/i2c/tvp5150.txt b/sys/contrib/device-tree/Bindings/media/i2c/tvp5150.txt
index 719b2995dc17..94b908ace53c 100644
--- a/sys/contrib/device-tree/Bindings/media/i2c/tvp5150.txt
+++ b/sys/contrib/device-tree/Bindings/media/i2c/tvp5150.txt
@@ -53,7 +53,7 @@ Optional Connector Properties:
==============================
- sdtv-standards: Set the possible signals to which the hardware tries to lock
- instead of using the autodetection mechnism. Please look at
+ instead of using the autodetection mechanism. Please look at
[1] for more information.
[1] Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml.
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-fg.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-fg.yaml
new file mode 100644
index 000000000000..03f31b009085
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-fg.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/mediatek,mdp3-fg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Media Data Path 3 Film Grain
+
+maintainers:
+ - Matthias Brugger <matthias.bgg@gmail.com>
+ - Moudy Ho <moudy.ho@mediatek.com>
+
+description:
+ Film Grain (FG) is a Media Data Path 3 (MDP3) component used to add
+ the film grain according to the AOMedia Video 1 (AV1) standard.
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8195-mdp3-fg
+
+ reg:
+ maxItems: 1
+
+ mediatek,gce-client-reg:
+ description:
+ The register of display function block to be set by gce. There are 4 arguments,
+ such as gce node, subsys id, offset and register size. The subsys id that is
+ mapping to the register of display function blocks is defined in the gce header
+ include/dt-bindings/gce/<chip>-gce.h of each chips.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: phandle of GCE
+ - description: GCE subsys id
+ - description: register offset
+ - description: register size
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - mediatek,gce-client-reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt8195-clk.h>
+ #include <dt-bindings/gce/mt8195-gce.h>
+
+ display@14002000 {
+ compatible = "mediatek,mt8195-mdp3-fg";
+ reg = <0x14002000 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x2000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_FG>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-hdr.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-hdr.yaml
new file mode 100644
index 000000000000..d4609bba6578
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-hdr.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/mediatek,mdp3-hdr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Media Data Path 3 HDR
+
+maintainers:
+ - Matthias Brugger <matthias.bgg@gmail.com>
+ - Moudy Ho <moudy.ho@mediatek.com>
+
+description:
+ A Media Data Path 3 (MDP3) component used to perform conversion from
+ High Dynamic Range (HDR) to Standard Dynamic Range (SDR).
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8195-mdp3-hdr
+
+ reg:
+ maxItems: 1
+
+ mediatek,gce-client-reg:
+ description:
+ The register of display function block to be set by gce. There are 4 arguments,
+ such as gce node, subsys id, offset and register size. The subsys id that is
+ mapping to the register of display function blocks is defined in the gce header
+ include/dt-bindings/gce/<chip>-gce.h of each chips.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: phandle of GCE
+ - description: GCE subsys id
+ - description: register offset
+ - description: register size
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - mediatek,gce-client-reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt8195-clk.h>
+ #include <dt-bindings/gce/mt8195-gce.h>
+
+ display@14004000 {
+ compatible = "mediatek,mt8195-mdp3-hdr";
+ reg = <0x14004000 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x4000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_HDR>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rdma.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rdma.yaml
index 7032c7e15039..59db8306485b 100644
--- a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rdma.yaml
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rdma.yaml
@@ -20,8 +20,14 @@ description: |
properties:
compatible:
- items:
- - const: mediatek,mt8183-mdp3-rdma
+ oneOf:
+ - enum:
+ - mediatek,mt8183-mdp3-rdma
+ - mediatek,mt8195-mdp3-rdma
+ - mediatek,mt8195-vdo1-rdma
+ - items:
+ - const: mediatek,mt8188-vdo1-rdma
+ - const: mediatek,mt8195-vdo1-rdma
reg:
maxItems: 1
@@ -45,6 +51,14 @@ properties:
include/dt-bindings/gce/<chip>-gce.h of each chips.
$ref: /schemas/types.yaml#/definitions/uint32-array
+ mediatek,scp:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the System Control Processor (SCP) used for initializing
+ and stopping the MDP3, for sending frame data locations to the MDP3's
+ VPU and to install Inter-Processor Interrupt handlers to control
+ processing states.
+
power-domains:
maxItems: 1
@@ -52,6 +66,7 @@ properties:
items:
- description: RDMA clock
- description: RSZ clock
+ minItems: 1
iommus:
maxItems: 1
@@ -60,16 +75,72 @@ properties:
items:
- description: used for 1st data pipe from RDMA
- description: used for 2nd data pipe from RDMA
+ - description: used for 3rd data pipe from RDMA
+ - description: used for 4th data pipe from RDMA
+ - description: used for the data pipe from SPLIT
+ minItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ '#dma-cells':
+ const: 1
required:
- compatible
- reg
- mediatek,gce-client-reg
- - mediatek,gce-events
- power-domains
- clocks
- iommus
- - mboxes
+ - '#dma-cells'
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8183-mdp3-rdma
+
+ then:
+ properties:
+ clocks:
+ minItems: 2
+
+ mboxes:
+ minItems: 2
+
+ required:
+ - mboxes
+ - mediatek,gce-events
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8195-mdp3-rdma
+
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+
+ mboxes:
+ minItems: 5
+
+ required:
+ - mediatek,gce-events
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8195-vdo1-rdma
+
+ then:
+ properties:
+ clocks:
+ maxItems: 1
additionalProperties: false
@@ -80,16 +151,17 @@ examples:
#include <dt-bindings/power/mt8183-power.h>
#include <dt-bindings/memory/mt8183-larb-port.h>
- mdp3_rdma0: mdp3-rdma0@14001000 {
- compatible = "mediatek,mt8183-mdp3-rdma";
- reg = <0x14001000 0x1000>;
- mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>;
- mediatek,gce-events = <CMDQ_EVENT_MDP_RDMA0_SOF>,
- <CMDQ_EVENT_MDP_RDMA0_EOF>;
- power-domains = <&spm MT8183_POWER_DOMAIN_DISP>;
- clocks = <&mmsys CLK_MM_MDP_RDMA0>,
- <&mmsys CLK_MM_MDP_RSZ1>;
- iommus = <&iommu>;
- mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST>,
- <&gce 21 CMDQ_THR_PRIO_LOWEST>;
+ dma-controller@14001000 {
+ compatible = "mediatek,mt8183-mdp3-rdma";
+ reg = <0x14001000 0x1000>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_MDP_RDMA0_SOF>,
+ <CMDQ_EVENT_MDP_RDMA0_EOF>;
+ power-domains = <&spm MT8183_POWER_DOMAIN_DISP>;
+ clocks = <&mmsys CLK_MM_MDP_RDMA0>,
+ <&mmsys CLK_MM_MDP_RSZ1>;
+ iommus = <&iommu>;
+ mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST>,
+ <&gce 21 CMDQ_THR_PRIO_LOWEST>;
+ #dma-cells = <1>;
};
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rsz.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rsz.yaml
index 78f9de6192ef..f5676bec4326 100644
--- a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rsz.yaml
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-rsz.yaml
@@ -15,9 +15,13 @@ description: |
properties:
compatible:
- items:
+ oneOf:
- enum:
- mediatek,mt8183-mdp3-rsz
+ - items:
+ - enum:
+ - mediatek,mt8195-mdp3-rsz
+ - const: mediatek,mt8183-mdp3-rsz
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-stitch.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-stitch.yaml
new file mode 100644
index 000000000000..d815bea29154
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-stitch.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/mediatek,mdp3-stitch.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Media Data Path 3 STITCH
+
+maintainers:
+ - Matthias Brugger <matthias.bgg@gmail.com>
+ - Moudy Ho <moudy.ho@mediatek.com>
+
+description:
+ One of Media Data Path 3 (MDP3) components used to combine multiple video frame
+ with overlapping fields of view to produce a segmented panorame.
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8195-mdp3-stitch
+
+ reg:
+ maxItems: 1
+
+ mediatek,gce-client-reg:
+ description:
+ The register of display function block to be set by gce. There are 4 arguments,
+ such as gce node, subsys id, offset and register size. The subsys id that is
+ mapping to the register of display function blocks is defined in the gce header
+ include/dt-bindings/gce/<chip>-gce.h of each chips.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: phandle of GCE
+ - description: GCE subsys id
+ - description: register offset
+ - description: register size
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - mediatek,gce-client-reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt8195-clk.h>
+ #include <dt-bindings/gce/mt8195-gce.h>
+
+ display@14003000 {
+ compatible = "mediatek,mt8195-mdp3-stitch";
+ reg = <0x14003000 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x3000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_STITCH>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tcc.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tcc.yaml
new file mode 100644
index 000000000000..14ea556d4f82
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tcc.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/mediatek,mdp3-tcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Media Data Path 3 Tone Curve Conversion
+
+maintainers:
+ - Matthias Brugger <matthias.bgg@gmail.com>
+
+description:
+ Tone Curve Conversion (TCC) is one of Media Profile Path 3 (MDP3) components.
+ It is used to handle the tone mapping of various gamma curves in order to
+ achieve HDR10 effects. This helps adapt the content to the color and
+ brightness range that standard display devices typically support.
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8195-mdp3-tcc
+
+ reg:
+ maxItems: 1
+
+ mediatek,gce-client-reg:
+ description:
+ The register of display function block to be set by gce. There are 4 arguments,
+ such as gce node, subsys id, offset and register size. The subsys id that is
+ mapping to the register of display function blocks is defined in the gce header
+ include/dt-bindings/gce/<chip>-gce.h of each chips.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: phandle of GCE
+ - description: GCE subsys id
+ - description: register offset
+ - description: register size
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - mediatek,gce-client-reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt8195-clk.h>
+ #include <dt-bindings/gce/mt8195-gce.h>
+
+ display@1400b000 {
+ compatible = "mediatek,mt8195-mdp3-tcc";
+ reg = <0x1400b000 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0xb000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_TCC>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tdshp.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tdshp.yaml
new file mode 100644
index 000000000000..8ab7f2d8e148
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-tdshp.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/mediatek,mdp3-tdshp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Media Data Path 3 Two-Dimensional Sharpness
+
+maintainers:
+ - Matthias Brugger <matthias.bgg@gmail.com>
+ - Moudy Ho <moudy.ho@mediatek.com>
+
+description:
+ Two-Dimensional Sharpness (TDSHP) is a Media Profile Path 3 (MDP3) component
+ used to perform image edge sharpening and enhance vividness and contrast.
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt8195-mdp3-tdshp
+
+ reg:
+ maxItems: 1
+
+ mediatek,gce-client-reg:
+ description:
+ The register of display function block to be set by gce. There are 4 arguments,
+ such as gce node, subsys id, offset and register size. The subsys id that is
+ mapping to the register of display function blocks is defined in the gce header
+ include/dt-bindings/gce/<chip>-gce.h of each chips.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ items:
+ - description: phandle of GCE
+ - description: GCE subsys id
+ - description: register offset
+ - description: register size
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - mediatek,gce-client-reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/mt8195-clk.h>
+ #include <dt-bindings/gce/mt8195-gce.h>
+
+ display@14007000 {
+ compatible = "mediatek,mt8195-mdp3-tdshp";
+ reg = <0x14007000 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x7000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_TDSHP>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-wrot.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-wrot.yaml
index 0baa77198fa2..53a679338402 100644
--- a/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-wrot.yaml
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,mdp3-wrot.yaml
@@ -15,9 +15,13 @@ description: |
properties:
compatible:
- items:
+ oneOf:
- enum:
- mediatek,mt8183-mdp3-wrot
+ - items:
+ - enum:
+ - mediatek,mt8195-mdp3-wrot
+ - const: mediatek,mt8183-mdp3-wrot
reg:
maxItems: 1
@@ -50,6 +54,9 @@ properties:
iommus:
maxItems: 1
+ '#dma-cells':
+ const: 1
+
required:
- compatible
- reg
@@ -58,6 +65,7 @@ required:
- power-domains
- clocks
- iommus
+ - '#dma-cells'
additionalProperties: false
@@ -68,13 +76,14 @@ examples:
#include <dt-bindings/power/mt8183-power.h>
#include <dt-bindings/memory/mt8183-larb-port.h>
- mdp3_wrot0: mdp3-wrot0@14005000 {
- compatible = "mediatek,mt8183-mdp3-wrot";
- reg = <0x14005000 0x1000>;
- mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x5000 0x1000>;
- mediatek,gce-events = <CMDQ_EVENT_MDP_WROT0_SOF>,
- <CMDQ_EVENT_MDP_WROT0_EOF>;
- power-domains = <&spm MT8183_POWER_DOMAIN_DISP>;
- clocks = <&mmsys CLK_MM_MDP_WROT0>;
- iommus = <&iommu>;
+ dma-controller@14005000 {
+ compatible = "mediatek,mt8183-mdp3-wrot";
+ reg = <0x14005000 0x1000>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x5000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_MDP_WROT0_SOF>,
+ <CMDQ_EVENT_MDP_WROT0_EOF>;
+ power-domains = <&spm MT8183_POWER_DOMAIN_DISP>;
+ clocks = <&mmsys CLK_MM_MDP_WROT0>;
+ iommus = <&iommu>;
+ #dma-cells = <1>;
};
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-decoder.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-decoder.yaml
index fad59b486d5d..b401c67e3ba0 100644
--- a/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-decoder.yaml
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-decoder.yaml
@@ -21,24 +21,33 @@ properties:
- mediatek,mt8183-vcodec-dec
reg:
- maxItems: 12
+ minItems: 11
+ maxItems: 11
+
+ reg-names:
+ items:
+ - const: misc
+ - const: ld
+ - const: top
+ - const: cm
+ - const: ad
+ - const: av
+ - const: pp
+ - const: hwd
+ - const: hwq
+ - const: hwb
+ - const: hwg
interrupts:
maxItems: 1
clocks:
+ minItems: 1
maxItems: 8
clock-names:
- items:
- - const: vcodecpll
- - const: univpll_d2
- - const: clk_cci400_sel
- - const: vdec_sel
- - const: vdecpll
- - const: vencpll
- - const: venc_lt_sel
- - const: vdec_bus_clk_src
+ minItems: 1
+ maxItems: 8
assigned-clocks: true
@@ -66,6 +75,10 @@ properties:
description:
Describes point to scp.
+ mediatek,vdecsys:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: Phandle to the vdecsys syscon node.
+
required:
- compatible
- reg
@@ -73,8 +86,7 @@ required:
- clocks
- clock-names
- iommus
- - assigned-clocks
- - assigned-clock-parents
+ - mediatek,vdecsys
allOf:
- if:
@@ -88,6 +100,15 @@ allOf:
required:
- mediatek,scp
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: vdec
+
- if:
properties:
compatible:
@@ -99,6 +120,22 @@ allOf:
required:
- mediatek,vpu
+ properties:
+ clocks:
+ minItems: 8
+ maxItems: 8
+
+ clock-names:
+ items:
+ - const: vcodecpll
+ - const: univpll_d2
+ - const: clk_cci400_sel
+ - const: vdec_sel
+ - const: vdecpll
+ - const: vencpll
+ - const: venc_lt_sel
+ - const: vdec_bus_clk_src
+
additionalProperties: false
examples:
@@ -109,10 +146,9 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/power/mt8173-power.h>
- vcodec_dec: vcodec@16000000 {
+ vcodec_dec: vcodec@16020000 {
compatible = "mediatek,mt8173-vcodec-dec";
- reg = <0x16000000 0x100>, /*VDEC_SYS*/
- <0x16020000 0x1000>, /*VDEC_MISC*/
+ reg = <0x16020000 0x1000>, /*VDEC_MISC*/
<0x16021000 0x800>, /*VDEC_LD*/
<0x16021800 0x800>, /*VDEC_TOP*/
<0x16022000 0x1000>, /*VDEC_CM*/
@@ -133,6 +169,7 @@ examples:
<&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
<&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
mediatek,vpu = <&vpu>;
+ mediatek,vdecsys = <&vdecsys>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
<&topckgen CLK_TOP_UNIVPLL_D2>,
diff --git a/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-subdev-decoder.yaml b/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-subdev-decoder.yaml
index dca9b0c5e106..a500a585c692 100644
--- a/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-subdev-decoder.yaml
+++ b/sys/contrib/device-tree/Bindings/media/mediatek,vcodec-subdev-decoder.yaml
@@ -36,7 +36,7 @@ description: |
controls the information of each hardware independent which include clk/power/irq.
There are two workqueues in parent device: lat workqueue and core workqueue. They are used
- to lat and core hardware deocder. Lat workqueue need to get input bitstream and lat buffer,
+ to lat and core hardware decoder. Lat workqueue need to get input bitstream and lat buffer,
then enable lat to decode, writing the result to lat buffer, dislabe hardware when lat decode
done. Core workqueue need to get lat buffer and output buffer, then enable core to decode,
writing the result to output buffer, disable hardware when core decode done. These two
diff --git a/sys/contrib/device-tree/Bindings/media/nuvoton,npcm-ece.yaml b/sys/contrib/device-tree/Bindings/media/nuvoton,npcm-ece.yaml
new file mode 100644
index 000000000000..b47468e54504
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/nuvoton,npcm-ece.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/nuvoton,npcm-ece.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NPCM Encoding Compression Engine
+
+maintainers:
+ - Joseph Liu <kwliu@nuvoton.com>
+ - Marvin Lin <kflin@nuvoton.com>
+
+description: |
+ Video Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs.
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-ece
+ - nuvoton,npcm845-ece
+
+ reg:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/reset/nuvoton,npcm7xx-reset.h>
+
+ ece: video-codec@f0820000 {
+ compatible = "nuvoton,npcm750-ece";
+ reg = <0xf0820000 0x2000>;
+ resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_ECE>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/nuvoton,npcm-vcd.yaml b/sys/contrib/device-tree/Bindings/media/nuvoton,npcm-vcd.yaml
new file mode 100644
index 000000000000..c885f559d2e5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/nuvoton,npcm-vcd.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/nuvoton,npcm-vcd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NPCM Video Capture/Differentiation Engine
+
+maintainers:
+ - Joseph Liu <kwliu@nuvoton.com>
+ - Marvin Lin <kflin@nuvoton.com>
+
+description: |
+ Video Capture/Differentiation Engine (VCD) present on Nuvoton NPCM SoCs.
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-vcd
+ - nuvoton,npcm845-vcd
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ nuvoton,sysgcr:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle to access GCR (Global Control Register) registers.
+
+ nuvoton,sysgfxi:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle to access GFXI (Graphics Core Information) registers.
+
+ nuvoton,ece:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle to access ECE (Encoding Compression Engine) registers.
+
+ memory-region:
+ maxItems: 1
+ description:
+ CMA pool to use for buffers allocation instead of the default CMA pool.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - resets
+ - nuvoton,sysgcr
+ - nuvoton,sysgfxi
+ - nuvoton,ece
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/reset/nuvoton,npcm7xx-reset.h>
+
+ vcd: vcd@f0810000 {
+ compatible = "nuvoton,npcm750-vcd";
+ reg = <0xf0810000 0x10000>;
+ interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_VCD>;
+ nuvoton,sysgcr = <&gcr>;
+ nuvoton,sysgfxi = <&gfxi>;
+ nuvoton,ece = <&ece>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/nxp,imx7-csi.yaml b/sys/contrib/device-tree/Bindings/media/nxp,imx7-csi.yaml
index 358019e85d90..326284e151f6 100644
--- a/sys/contrib/device-tree/Bindings/media/nxp,imx7-csi.yaml
+++ b/sys/contrib/device-tree/Bindings/media/nxp,imx7-csi.yaml
@@ -59,7 +59,6 @@ allOf:
compatible:
contains:
enum:
- - fsl,imx8mq-csi
- fsl,imx8mm-csi
then:
required:
diff --git a/sys/contrib/device-tree/Bindings/media/nxp,imx8-isi.yaml b/sys/contrib/device-tree/Bindings/media/nxp,imx8-isi.yaml
index 6038b9b5ab36..e4665469a86c 100644
--- a/sys/contrib/device-tree/Bindings/media/nxp,imx8-isi.yaml
+++ b/sys/contrib/device-tree/Bindings/media/nxp,imx8-isi.yaml
@@ -21,6 +21,7 @@ properties:
enum:
- fsl,imx8mn-isi
- fsl,imx8mp-isi
+ - fsl,imx93-isi
reg:
maxItems: 1
@@ -72,7 +73,9 @@ allOf:
properties:
compatible:
contains:
- const: fsl,imx8mn-isi
+ enum:
+ - fsl,imx8mn-isi
+ - fsl,imx93-isi
then:
properties:
interrupts:
diff --git a/sys/contrib/device-tree/Bindings/media/qcom,msm8916-venus.yaml b/sys/contrib/device-tree/Bindings/media/qcom,msm8916-venus.yaml
index 2350bf4b370e..9410f13ca97c 100644
--- a/sys/contrib/device-tree/Bindings/media/qcom,msm8916-venus.yaml
+++ b/sys/contrib/device-tree/Bindings/media/qcom,msm8916-venus.yaml
@@ -40,7 +40,7 @@ properties:
properties:
compatible:
- const: "venus-decoder"
+ const: venus-decoder
required:
- compatible
@@ -52,7 +52,7 @@ properties:
properties:
compatible:
- const: "venus-encoder"
+ const: venus-encoder
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/media/qcom,sdm845-venus-v2.yaml b/sys/contrib/device-tree/Bindings/media/qcom,sdm845-venus-v2.yaml
index d5f80976f4cf..6228fd2b3246 100644
--- a/sys/contrib/device-tree/Bindings/media/qcom,sdm845-venus-v2.yaml
+++ b/sys/contrib/device-tree/Bindings/media/qcom,sdm845-venus-v2.yaml
@@ -48,6 +48,14 @@ properties:
iommus:
maxItems: 2
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ items:
+ - const: video-mem
+ - const: cpu-cfg
+
operating-points-v2: true
opp-table:
type: object
diff --git a/sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml b/sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml
index 7915dcd2d99f..f66033ae8b59 100644
--- a/sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml
+++ b/sys/contrib/device-tree/Bindings/media/qcom,sm8250-venus.yaml
@@ -106,7 +106,7 @@ examples:
#include <dt-bindings/clock/qcom,videocc-sm8250.h>
#include <dt-bindings/interconnect/qcom,sm8250.h>
#include <dt-bindings/clock/qcom,gcc-sm8250.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
venus: video-codec@aa00000 {
compatible = "qcom,sm8250-venus";
@@ -114,7 +114,7 @@ examples:
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&videocc MVS0C_GDSC>,
<&videocc MVS0_GDSC>,
- <&rpmhpd SM8250_MX>;
+ <&rpmhpd RPMHPD_MX>;
power-domain-names = "venus", "vcodec0", "mx";
clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
diff --git a/sys/contrib/device-tree/Bindings/media/renesas,vin.yaml b/sys/contrib/device-tree/Bindings/media/renesas,vin.yaml
index 324703bfb1bd..5539d0f8e74d 100644
--- a/sys/contrib/device-tree/Bindings/media/renesas,vin.yaml
+++ b/sys/contrib/device-tree/Bindings/media/renesas,vin.yaml
@@ -95,7 +95,7 @@ properties:
synchronization is selected.
default: 1
- field-active-even: true
+ field-even-active: true
bus-width: true
@@ -144,7 +144,7 @@ properties:
synchronization is selected.
default: 1
- field-active-even: true
+ field-even-active: true
bus-width: true
diff --git a/sys/contrib/device-tree/Bindings/media/rockchip-isp1.yaml b/sys/contrib/device-tree/Bindings/media/rockchip-isp1.yaml
index 0bad7e640148..afcaa427d48b 100644
--- a/sys/contrib/device-tree/Bindings/media/rockchip-isp1.yaml
+++ b/sys/contrib/device-tree/Bindings/media/rockchip-isp1.yaml
@@ -90,15 +90,16 @@ properties:
description: connection point for input on the parallel interface
properties:
- bus-type:
- enum: [5, 6]
-
endpoint:
$ref: video-interfaces.yaml#
unevaluatedProperties: false
- required:
- - bus-type
+ properties:
+ bus-type:
+ enum: [5, 6]
+
+ required:
+ - bus-type
anyOf:
- required:
@@ -199,6 +200,7 @@ examples:
wcam: camera@36 {
compatible = "ovti,ov5695";
reg = <0x36>;
+ clocks = <&cru SCLK_TESTCLKOUT1>;
port {
wcam_out: endpoint {
diff --git a/sys/contrib/device-tree/Bindings/media/rockchip-vpu.yaml b/sys/contrib/device-tree/Bindings/media/rockchip-vpu.yaml
index 772ec3283bc6..c57e1f488895 100644
--- a/sys/contrib/device-tree/Bindings/media/rockchip-vpu.yaml
+++ b/sys/contrib/device-tree/Bindings/media/rockchip-vpu.yaml
@@ -68,6 +68,13 @@ properties:
iommus:
maxItems: 1
+ resets:
+ items:
+ - description: AXI reset line
+ - description: AXI bus interface unit reset line
+ - description: APB reset line
+ - description: APB bus interface unit reset line
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/media/samsung,exynos4212-fimc-is.yaml b/sys/contrib/device-tree/Bindings/media/samsung,exynos4212-fimc-is.yaml
index 3691cd4962b2..3a5ff3f47060 100644
--- a/sys/contrib/device-tree/Bindings/media/samsung,exynos4212-fimc-is.yaml
+++ b/sys/contrib/device-tree/Bindings/media/samsung,exynos4212-fimc-is.yaml
@@ -75,13 +75,20 @@ properties:
power-domains:
maxItems: 1
+ samsung,pmu-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Power Management Unit (PMU) system controller interface, used to
+ power/start the ISP.
+
patternProperties:
"^pmu@[0-9a-f]+$":
type: object
additionalProperties: false
+ deprecated: true
description:
Node representing the SoC's Power Management Unit (duplicated with the
- correct PMU node in the SoC).
+ correct PMU node in the SoC). Deprecated, use samsung,pmu-syscon.
properties:
reg:
@@ -131,6 +138,7 @@ required:
- clock-names
- interrupts
- ranges
+ - samsung,pmu-syscon
- '#size-cells'
additionalProperties: false
@@ -179,15 +187,12 @@ examples:
<&sysmmu_fimc_fd>, <&sysmmu_fimc_mcuctl>;
iommu-names = "isp", "drc", "fd", "mcuctl";
power-domains = <&pd_isp>;
+ samsung,pmu-syscon = <&pmu_system_controller>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
- pmu@10020000 {
- reg = <0x10020000 0x3000>;
- };
-
i2c-isp@12140000 {
compatible = "samsung,exynos4212-i2c-isp";
reg = <0x12140000 0x100>;
diff --git a/sys/contrib/device-tree/Bindings/media/samsung,fimc.yaml b/sys/contrib/device-tree/Bindings/media/samsung,fimc.yaml
index 79ff6d83a9fd..7808d61f1fa3 100644
--- a/sys/contrib/device-tree/Bindings/media/samsung,fimc.yaml
+++ b/sys/contrib/device-tree/Bindings/media/samsung,fimc.yaml
@@ -57,6 +57,7 @@ properties:
patternProperties:
"^port@[01]$":
$ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
description:
Camera A and camera B inputs.
@@ -117,7 +118,7 @@ examples:
#clock-cells = <1>;
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0x0 0x0 0x18000000>;
+ ranges = <0x0 0x0 0xba1000>;
clocks = <&clock CLK_SCLK_CAM0>, <&clock CLK_SCLK_CAM1>,
<&clock CLK_PIXELASYNCM0>, <&clock CLK_PIXELASYNCM1>;
@@ -132,9 +133,9 @@ examples:
pinctrl-0 = <&cam_port_a_clk_active &cam_port_b_clk_active>;
pinctrl-names = "default";
- fimc@11800000 {
+ fimc@0 {
compatible = "samsung,exynos4212-fimc";
- reg = <0x11800000 0x1000>;
+ reg = <0x00000000 0x1000>;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_FIMC0>,
<&clock CLK_SCLK_FIMC0>;
@@ -151,9 +152,9 @@ examples:
/* ... FIMC 1-3 */
- csis@11880000 {
+ csis@80000 {
compatible = "samsung,exynos4210-csis";
- reg = <0x11880000 0x4000>;
+ reg = <0x00080000 0x4000>;
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_CSIS0>,
<&clock CLK_SCLK_CSIS0>;
@@ -186,9 +187,9 @@ examples:
/* ... CSIS 1 */
- fimc-lite@12390000 {
+ fimc-lite@b90000 {
compatible = "samsung,exynos4212-fimc-lite";
- reg = <0x12390000 0x1000>;
+ reg = <0xb90000 0x1000>;
interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&pd_isp>;
clocks = <&isp_clock CLK_ISP_FIMC_LITE0>;
@@ -198,9 +199,9 @@ examples:
/* ... FIMC-LITE 1 */
- fimc-is@12000000 {
+ fimc-is@800000 {
compatible = "samsung,exynos4212-fimc-is";
- reg = <0x12000000 0x260000>;
+ reg = <0x00800000 0x260000>;
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&isp_clock CLK_ISP_FIMC_LITE0>,
@@ -236,18 +237,15 @@ examples:
<&sysmmu_fimc_fd>, <&sysmmu_fimc_mcuctl>;
iommu-names = "isp", "drc", "fd", "mcuctl";
power-domains = <&pd_isp>;
+ samsung,pmu-syscon = <&pmu_system_controller>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
- pmu@10020000 {
- reg = <0x10020000 0x3000>;
- };
-
- i2c-isp@12140000 {
+ i2c-isp@940000 {
compatible = "samsung,exynos4212-i2c-isp";
- reg = <0x12140000 0x100>;
+ reg = <0x00940000 0x100>;
clocks = <&isp_clock CLK_ISP_I2C1_ISP>;
clock-names = "i2c_isp";
pinctrl-0 = <&fimc_is_i2c1>;
diff --git a/sys/contrib/device-tree/Bindings/media/samsung,s5p-mfc.yaml b/sys/contrib/device-tree/Bindings/media/samsung,s5p-mfc.yaml
index 084b44582a43..b46cc780703c 100644
--- a/sys/contrib/device-tree/Bindings/media/samsung,s5p-mfc.yaml
+++ b/sys/contrib/device-tree/Bindings/media/samsung,s5p-mfc.yaml
@@ -24,6 +24,7 @@ properties:
- samsung,mfc-v7 # Exynos5420
- samsung,mfc-v8 # Exynos5800
- samsung,mfc-v10 # Exynos7880
+ - tesla,fsd-mfc # Tesla FSD
- items:
- enum:
- samsung,exynos3250-mfc # Exynos3250
@@ -49,7 +50,9 @@ properties:
iommu-names:
minItems: 1
- maxItems: 2
+ items:
+ - const: left
+ - const: right
power-domains:
maxItems: 1
@@ -84,7 +87,7 @@ allOf:
- const: sclk_mfc
iommus:
maxItems: 1
- iommus-names: false
+ iommu-names: false
- if:
properties:
@@ -102,11 +105,9 @@ allOf:
- const: aclk
- const: aclk_xiu
iommus:
- maxItems: 2
- iommus-names:
- items:
- - const: left
- - const: right
+ minItems: 2
+ iommu-names:
+ minItems: 2
- if:
properties:
@@ -123,11 +124,9 @@ allOf:
- const: mfc
- const: sclk_mfc
iommus:
- maxItems: 2
- iommus-names:
- items:
- - const: left
- - const: right
+ minItems: 2
+ iommu-names:
+ minItems: 2
- if:
properties:
@@ -144,11 +143,9 @@ allOf:
items:
- const: mfc
iommus:
- maxItems: 2
- iommus-names:
- items:
- - const: left
- - const: right
+ minItems: 2
+ iommu-names:
+ minItems: 2
- if:
properties:
@@ -161,9 +158,23 @@ allOf:
clocks:
minItems: 1
maxItems: 2
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - tesla,fsd-mfc
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ items:
+ - const: mfc
iommus:
- minItems: 1
maxItems: 2
+ iommus-names: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/media/st,stm32-dcmipp.yaml b/sys/contrib/device-tree/Bindings/media/st,stm32-dcmipp.yaml
new file mode 100644
index 000000000000..87731f3ce7bd
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/st,stm32-dcmipp.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/st,stm32-dcmipp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 DCMIPP Digital Camera Memory Interface Pixel Processor
+
+maintainers:
+ - Hugues Fruchet <hugues.fruchet@foss.st.com>
+ - Alain Volmat <alain.volmat@foss.st.com>
+
+properties:
+ compatible:
+ const: st,stm32mp13-dcmipp
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description:
+ DCMIPP supports a single port node with parallel bus.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-type:
+ enum: [5, 6]
+ default: 5
+
+ bus-width:
+ enum: [8, 10, 12, 14]
+ default: 8
+
+ pclk-sample: true
+ hsync-active: true
+ vsync-active: true
+
+ required:
+ - pclk-sample
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - resets
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/stm32mp13-clks.h>
+ #include <dt-bindings/reset/stm32mp13-resets.h>
+ dcmipp@5a000000 {
+ compatible = "st,stm32mp13-dcmipp";
+ reg = <0x5a000000 0x400>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rcc DCMIPP_R>;
+ clocks = <&rcc DCMIPP_K>;
+
+ port {
+ endpoint {
+ remote-endpoint = <&mipid02_2>;
+ bus-width = <8>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <0>;
+ };
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/media/starfive,jh7110-camss.yaml b/sys/contrib/device-tree/Bindings/media/starfive,jh7110-camss.yaml
new file mode 100644
index 000000000000..c66586d90fa2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/starfive,jh7110-camss.yaml
@@ -0,0 +1,180 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/starfive,jh7110-camss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Starfive SoC CAMSS ISP
+
+maintainers:
+ - Jack Zhu <jack.zhu@starfivetech.com>
+ - Changhuang Liang <changhuang.liang@starfivetech.com>
+
+description:
+ The Starfive CAMSS ISP is a Camera interface for Starfive JH7110 SoC. It
+ consists of a VIN controller (Video In Controller, a top-level control unit)
+ and an ISP.
+
+properties:
+ compatible:
+ const: starfive,jh7110-camss
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: syscon
+ - const: isp
+
+ clocks:
+ maxItems: 7
+
+ clock-names:
+ items:
+ - const: apb_func
+ - const: wrapper_clk_c
+ - const: dvp_inv
+ - const: axiwr
+ - const: mipi_rx0_pxl
+ - const: ispcore_2x
+ - const: isp_axi
+
+ resets:
+ maxItems: 6
+
+ reset-names:
+ items:
+ - const: wrapper_p
+ - const: wrapper_c
+ - const: axird
+ - const: axiwr
+ - const: isp_top_n
+ - const: isp_top_axi
+
+ power-domains:
+ items:
+ - description: JH7110 ISP Power Domain Switch Controller.
+
+ interrupts:
+ maxItems: 4
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: Input port for receiving DVP data.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ bus-type:
+ enum: [5, 6]
+
+ bus-width:
+ enum: [8, 10, 12]
+
+ data-shift:
+ enum: [0, 2]
+ default: 0
+
+ hsync-active:
+ enum: [0, 1]
+ default: 1
+
+ vsync-active:
+ enum: [0, 1]
+ default: 1
+
+ required:
+ - bus-type
+ - bus-width
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Input port for receiving CSI data.
+
+ required:
+ - port@0
+ - port@1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - power-domains
+ - interrupts
+ - ports
+
+additionalProperties: false
+
+examples:
+ - |
+ isp@19840000 {
+ compatible = "starfive,jh7110-camss";
+ reg = <0x19840000 0x10000>,
+ <0x19870000 0x30000>;
+ reg-names = "syscon", "isp";
+ clocks = <&ispcrg 0>,
+ <&ispcrg 13>,
+ <&ispcrg 2>,
+ <&ispcrg 12>,
+ <&ispcrg 1>,
+ <&syscrg 51>,
+ <&syscrg 52>;
+ clock-names = "apb_func",
+ "wrapper_clk_c",
+ "dvp_inv",
+ "axiwr",
+ "mipi_rx0_pxl",
+ "ispcore_2x",
+ "isp_axi";
+ resets = <&ispcrg 0>,
+ <&ispcrg 1>,
+ <&ispcrg 10>,
+ <&ispcrg 11>,
+ <&syscrg 41>,
+ <&syscrg 42>;
+ reset-names = "wrapper_p",
+ "wrapper_c",
+ "axird",
+ "axiwr",
+ "isp_top_n",
+ "isp_top_axi";
+ power-domains = <&pwrc 5>;
+ interrupts = <92>, <87>, <88>, <90>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ vin_from_sc2235: endpoint {
+ remote-endpoint = <&sc2235_to_vin>;
+ bus-type = <5>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>;
+ vsync-active = <0>;
+ pclk-sample = <1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ vin_from_csi2rx: endpoint {
+ remote-endpoint = <&csi2rx_to_vin>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/ti,j721e-csi2rx-shim.yaml b/sys/contrib/device-tree/Bindings/media/ti,j721e-csi2rx-shim.yaml
new file mode 100644
index 000000000000..f762fdc05e4d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/media/ti,j721e-csi2rx-shim.yaml
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/ti,j721e-csi2rx-shim.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI J721E CSI2RX Shim
+
+description: |
+ The TI J721E CSI2RX Shim is a wrapper around Cadence CSI2RX bridge that
+ enables sending captured frames to memory over PSI-L DMA. In the J721E
+ Technical Reference Manual (SPRUIL1B) it is referred to as "SHIM" under the
+ CSI_RX_IF section.
+
+maintainers:
+ - Jai Luthra <j-luthra@ti.com>
+
+properties:
+ compatible:
+ const: ti,j721e-csi2rx-shim
+
+ dmas:
+ maxItems: 1
+
+ dma-names:
+ items:
+ - const: rx0
+
+ reg:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ ranges: true
+
+ "#address-cells": true
+
+ "#size-cells": true
+
+patternProperties:
+ "^csi-bridge@":
+ type: object
+ description: CSI2 bridge node.
+ $ref: cdns,csi2rx.yaml#
+
+required:
+ - compatible
+ - reg
+ - dmas
+ - dma-names
+ - power-domains
+ - ranges
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+ ti_csi2rx0: ticsi2rx@4500000 {
+ compatible = "ti,j721e-csi2rx-shim";
+ dmas = <&main_udmap 0x4940>;
+ dma-names = "rx0";
+ reg = <0x4500000 0x1000>;
+ power-domains = <&k3_pds 26 TI_SCI_PD_EXCLUSIVE>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ cdns_csi2rx: csi-bridge@4504000 {
+ compatible = "ti,j721e-csi2rx", "cdns,csi2rx";
+ reg = <0x4504000 0x1000>;
+ clocks = <&k3_clks 26 2>, <&k3_clks 26 0>, <&k3_clks 26 2>,
+ <&k3_clks 26 2>, <&k3_clks 26 3>, <&k3_clks 26 3>;
+ clock-names = "sys_clk", "p_clk", "pixel_if0_clk",
+ "pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk";
+ phys = <&dphy0>;
+ phy-names = "dphy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi2_0: port@0 {
+
+ reg = <0>;
+
+ csi2rx0_in_sensor: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/media/video-interfaces.yaml b/sys/contrib/device-tree/Bindings/media/video-interfaces.yaml
index a211d49dc2ac..26e3e7d7c67b 100644
--- a/sys/contrib/device-tree/Bindings/media/video-interfaces.yaml
+++ b/sys/contrib/device-tree/Bindings/media/video-interfaces.yaml
@@ -160,6 +160,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
+ uniqueItems: true
items:
# Assume up to 9 physical lane indices
maximum: 8
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/ingenic,nemc.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/ingenic,nemc.yaml
index a02724221ff3..ee74a362f4ca 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/ingenic,nemc.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/ingenic,nemc.yaml
@@ -39,6 +39,8 @@ properties:
patternProperties:
".*@[0-9]+$":
type: object
+ $ref: mc-peripheral-props.yaml#
+ additionalProperties: true
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/mc-peripheral-props.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/mc-peripheral-props.yaml
index 5acfcad12bb7..8d9dae15ade0 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/mc-peripheral-props.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/mc-peripheral-props.yaml
@@ -34,6 +34,8 @@ required:
# The controller specific properties go here.
allOf:
- $ref: st,stm32-fmc2-ebi-props.yaml#
+ - $ref: ingenic,nemc-peripherals.yaml#
- $ref: intel,ixp4xx-expansion-peripheral-props.yaml#
+ - $ref: ti,gpmc-child.yaml#
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml
index aee7f6cf1300..2381660b324c 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml
@@ -67,7 +67,7 @@ properties:
minimum: 0
maximum: 31
description: the hardware id of this larb. It's only required when this
- hardward id is not consecutive from its M4U point of view.
+ hardware id is not consecutive from its M4U point of view.
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/renesas,rpc-if.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/renesas,rpc-if.yaml
index 56e62cd0b36a..25f3bb9890ae 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/renesas,rpc-if.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/renesas,rpc-if.yaml
@@ -80,6 +80,8 @@ properties:
patternProperties:
"flash@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
compatible:
contains:
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/rockchip,rk3399-dmc.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/rockchip,rk3399-dmc.yaml
index fb4920397d08..1f58ee99be28 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/rockchip,rk3399-dmc.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/rockchip,rk3399-dmc.yaml
@@ -18,7 +18,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Node to get DDR loading. Refer to
- Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.
+ Documentation/devicetree/bindings/devfreq/event/rockchip,dfi.yaml.
clocks:
maxItems: 1
@@ -152,7 +152,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description:
When the DRAM type is DDR3, this parameter defines the phy side CA line
- (incluing command line, address line and clock line) drive strength.
+ (including command line, address line and clock line) drive strength.
default: 40
rockchip,phy_ddr3_dq_drv:
@@ -305,7 +305,7 @@ properties:
description:
Defines the self-refresh power down idle period in which memories are
placed into self-refresh power down mode if bus is idle for
- srpd_lite_idle nanoseonds. This parameter is for LPDDR4 only.
+ srpd_lite_idle nanoseconds. This parameter is for LPDDR4 only.
rockchip,standby-idle-ns:
description:
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/ti,gpmc.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/ti,gpmc.yaml
index b049837ee669..c7a8a041da50 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/ti,gpmc.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/ti,gpmc.yaml
@@ -130,7 +130,7 @@ patternProperties:
bus. The device can be a NAND chip, SRAM device, NOR device
or an ASIC.
$ref: ti,gpmc-child.yaml
-
+ additionalProperties: true
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,versal-ddrmc-edac.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,versal-ddrmc-edac.yaml
new file mode 100644
index 000000000000..12f8e9f350bc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,versal-ddrmc-edac.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/xlnx,versal-ddrmc-edac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx Versal DDRMC (Integrated DDR Memory Controller)
+
+maintainers:
+ - Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
+ - Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
+
+description:
+ The integrated DDR Memory Controllers (DDRMCs) support both DDR4 and LPDDR4/
+ 4X memory interfaces. Versal DDR memory controller has an optional ECC support
+ which correct single bit ECC errors and detect double bit ECC errors.
+
+properties:
+ compatible:
+ const: xlnx,versal-ddrmc
+
+ reg:
+ items:
+ - description: DDR Memory Controller registers
+ - description: NOC registers corresponding to DDR Memory Controller
+
+ reg-names:
+ items:
+ - const: base
+ - const: noc
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ memory-controller@f6150000 {
+ compatible = "xlnx,versal-ddrmc";
+ reg = <0x0 0xf6150000 0x0 0x2000>, <0x0 0xf6070000 0x0 0x20000>;
+ reg-names = "base", "noc";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,zynq-ddrc-a05.yaml b/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,zynq-ddrc-a05.yaml
index 75143db51411..b74ad9a3305c 100644
--- a/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,zynq-ddrc-a05.yaml
+++ b/sys/contrib/device-tree/Bindings/memory-controllers/xlnx,zynq-ddrc-a05.yaml
@@ -12,7 +12,7 @@ maintainers:
description:
The Zynq DDR ECC controller has an optional ECC support in half-bus width
- (16-bit) configuration. It is cappable of correcting single bit ECC errors
+ (16-bit) configuration. It is capable of correcting single bit ECC errors
and detecting double bit ECC errors.
properties:
diff --git a/sys/contrib/device-tree/Bindings/mfd/allwinner,sun6i-a31-prcm.yaml b/sys/contrib/device-tree/Bindings/mfd/allwinner,sun6i-a31-prcm.yaml
index cf94176fe1eb..8789e3639ff7 100644
--- a/sys/contrib/device-tree/Bindings/mfd/allwinner,sun6i-a31-prcm.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/allwinner,sun6i-a31-prcm.yaml
@@ -34,6 +34,9 @@ patternProperties:
- allwinner,sun6i-a31-clock-reset
- fixed-factor-clock
+ required:
+ - compatible
+
allOf:
- if:
properties:
@@ -55,25 +58,17 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 2
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -85,25 +80,17 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -119,9 +106,6 @@ patternProperties:
offset of the bit controlling this particular gate in
the register.
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
@@ -129,16 +113,11 @@ patternProperties:
minItems: 1
maxItems: 32
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -150,9 +129,6 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 4
description: >
@@ -162,16 +138,11 @@ patternProperties:
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -183,16 +154,8 @@ patternProperties:
"#reset-cells":
const: 1
- # Already checked in the main schema
- compatible: true
-
- phandle: true
-
required:
- "#reset-cells"
- - compatible
-
- additionalProperties: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/mfd/allwinner,sun8i-a23-prcm.yaml b/sys/contrib/device-tree/Bindings/mfd/allwinner,sun8i-a23-prcm.yaml
index 16c80a7eec49..e51f85519911 100644
--- a/sys/contrib/device-tree/Bindings/mfd/allwinner,sun8i-a23-prcm.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/allwinner,sun8i-a23-prcm.yaml
@@ -57,25 +57,17 @@ patternProperties:
"#clock-cells":
const: 0
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
clock-output-names:
maxItems: 1
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -91,9 +83,6 @@ patternProperties:
offset of the bit controlling this particular gate in
the register.
- # Already checked in the main schema
- compatible: true
-
clocks:
maxItems: 1
@@ -101,16 +90,11 @@ patternProperties:
minItems: 1
maxItems: 32
- phandle: true
-
required:
- "#clock-cells"
- - compatible
- clocks
- clock-output-names
- additionalProperties: false
-
- if:
properties:
compatible:
@@ -122,34 +106,8 @@ patternProperties:
"#reset-cells":
const: 1
- # Already checked in the main schema
- compatible: true
-
- phandle: true
-
required:
- "#reset-cells"
- - compatible
-
- additionalProperties: false
-
- - if:
- properties:
- compatible:
- contains:
- const: allwinner,sun8i-a23-codec-analog
-
- then:
- properties:
- # Already checked in the main schema
- compatible: true
-
- phandle: true
-
- required:
- - compatible
-
- additionalProperties: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/mfd/ams,as3711.yaml b/sys/contrib/device-tree/Bindings/mfd/ams,as3711.yaml
new file mode 100644
index 000000000000..ad8649cbb2cc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mfd/ams,as3711.yaml
@@ -0,0 +1,223 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ams,as3711.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Austria MicroSystems AS3711 Quad Buck High Current PMIC with Charger
+
+maintainers:
+ - Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
+
+description:
+ AS3711 is an I2C PMIC from Austria MicroSystems with multiple DC/DC and LDO
+ power supplies, a battery charger and an RTC. So far only bindings for the
+ two step-up DC/DC converters are defined.
+
+properties:
+ compatible:
+ const: ams,as3711
+
+ reg:
+ maxItems: 1
+
+ backlight:
+ description:
+ Step-up converter configuration, to be used as a backlight source
+ type: object
+ additionalProperties: false
+ properties:
+ compatible:
+ const: ams,as3711-bl
+
+ su1-dev:
+ description: Framebuffer phandle for the first step-up converter
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ su1-max-uA:
+ description: Maximum current for the first step-up converter
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ su2-dev:
+ description: Framebuffer phandle for the second step-up converter
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ su2-max-uA:
+ description: Maximum current for the second step-up converter
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ su2-feedback-voltage:
+ description: Second step-up converter uses voltage feedback
+ type: boolean
+
+ su2-feedback-curr1:
+ description:
+ Second step-up converter uses CURR1 input for current feedback
+ type: boolean
+
+ su2-feedback-curr2:
+ description:
+ Second step-up converter uses CURR2 input for current feedback
+ type: boolean
+
+ su2-feedback-curr3:
+ description:
+ Second step-up converter uses CURR3 input for current feedback
+ type: boolean
+
+ su2-feedback-curr-auto:
+ description:
+ Second step-up converter uses automatic current feedback selection
+ type: boolean
+
+ su2-fbprot-lx-sd4:
+ description:
+ Second step-up converter uses LX_SD4 for over-voltage protection
+ type: boolean
+
+ su2-fbprot-gpio2:
+ description:
+ Second step-up converter uses GPIO2 for over-voltage protection
+ type: boolean
+
+ su2-fbprot-gpio3:
+ description:
+ Second step-up converter uses GPIO3 for over-voltage protection
+ type: boolean
+
+ su2-fbprot-gpio4:
+ description:
+ Second step-up converter uses GPIO4 for over-voltage protection
+ type: boolean
+
+ su2-auto-curr1:
+ description:
+ Second step-up converter uses CURR1 input for automatic current
+ feedback
+ type: boolean
+
+ su2-auto-curr2:
+ description:
+ Second step-up converter uses CURR2 input for automatic current
+ feedback
+ type: boolean
+
+ su2-auto-curr3:
+ description:
+ Second step-up converter uses CURR3 input for automatic current
+ feedback
+ type: boolean
+
+ required:
+ - compatible
+
+ dependentRequired:
+ # To use the SU1 converter as a backlight source the following two
+ # properties must be provided:
+ su1-dev: [ su1-max-uA ]
+ su1-max-uA: [ su1-dev ]
+
+ # To use the SU2 converter as a backlight source the following two
+ # properties must be provided:
+ su2-dev: [ su2-max-uA ]
+ su2-max-uA: [ su2-dev ]
+
+ su2-feedback-voltage: [ su2-dev ]
+ su2-feedback-curr1: [ su2-dev ]
+ su2-feedback-curr2: [ su2-dev ]
+ su2-feedback-curr3: [ su2-dev ]
+ su2-feedback-curr-auto: [ su2-dev ]
+ su2-fbprot-lx-sd4: [ su2-dev ]
+ su2-fbprot-gpio2: [ su2-dev ]
+ su2-fbprot-gpio3: [ su2-dev ]
+ su2-fbprot-gpio4: [ su2-dev ]
+ su2-auto-curr1: [ su2-feedback-curr-auto ]
+ su2-auto-curr2: [ su2-feedback-curr-auto ]
+ su2-auto-curr3: [ su2-feedback-curr-auto ]
+
+ dependentSchemas:
+ su2-dev:
+ allOf:
+ - oneOf:
+ - required:
+ - su2-feedback-voltage
+ - required:
+ - su2-feedback-curr1
+ - required:
+ - su2-feedback-curr2
+ - required:
+ - su2-feedback-curr3
+ - required:
+ - su2-feedback-curr-auto
+ - oneOf:
+ - required:
+ - su2-fbprot-lx-sd4
+ - required:
+ - su2-fbprot-gpio2
+ - required:
+ - su2-fbprot-gpio3
+ - required:
+ - su2-fbprot-gpio4
+
+ su2-feedback-curr-auto:
+ anyOf:
+ - required:
+ - su2-auto-curr1
+ - required:
+ - su2-auto-curr2
+ - required:
+ - su2-auto-curr3
+
+ regulators:
+ description: Other DC/DC and LDO supplies
+ type: object
+ unevaluatedProperties: false
+ patternProperties:
+ "^(sd[1-4]|ldo[1-8])$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@40 {
+ compatible = "ams,as3711";
+ reg = <0x40>;
+
+ regulators {
+ sd4 {
+ regulator-name = "1.215V";
+ regulator-min-microvolt = <1215000>;
+ regulator-max-microvolt = <1235000>;
+ };
+ ldo2 {
+ regulator-name = "2.8V CPU";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+
+ backlight {
+ compatible = "ams,as3711-bl";
+ su2-dev = <&lcdc>;
+ su2-max-uA = <36000>;
+ su2-feedback-curr-auto;
+ su2-fbprot-gpio4;
+ su2-auto-curr1;
+ su2-auto-curr2;
+ su2-auto-curr3;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/mfd/arm,dev-platforms-syscon.yaml b/sys/contrib/device-tree/Bindings/mfd/arm,dev-platforms-syscon.yaml
new file mode 100644
index 000000000000..46b164ae0831
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mfd/arm,dev-platforms-syscon.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/arm,dev-platforms-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Arm Ltd Developer Platforms System Controllers
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+description:
+ The Arm Ltd Integrator, Realview, and Versatile families of developer
+ platforms are contain various system controller blocks. Often these blocks
+ are part of a daughterboard or motherboard module.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - arm,integrator-ap-syscon
+ - arm,integrator-cp-syscon
+ - arm,integrator-sp-syscon
+ - arm,im-pd1-syscon
+ - const: syscon
+ - items:
+ - enum:
+ - arm,core-module-integrator
+ - arm,integrator-ap-syscon
+ - arm,integrator-cp-syscon
+ - arm,integrator-sp-syscon
+ - arm,realview-eb-syscon
+ - arm,realview-pb1176-syscon
+ - arm,realview-pb11mp-syscon
+ - arm,realview-pba8-syscon
+ - arm,realview-pbx-syscon
+ - arm,versatile-ib2-syscon
+ - const: syscon
+ - const: simple-mfd
+ - items:
+ - enum:
+ - arm,realview-eb11mp-revb-syscon
+ - arm,realview-eb11mp-revc-syscon
+ - const: arm,realview-eb-syscon
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ ranges: true
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties:
+ type: object
+
+...
diff --git a/sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.yaml b/sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.yaml
index 750996d9a175..5dfe77aca167 100644
--- a/sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.yaml
@@ -27,7 +27,7 @@ description:
as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART
management and bus snoop configuration.
- * A set of SuperIO[3] scratch registers enableing implementation of e.g. custom
+ * A set of SuperIO[3] scratch registers enabling implementation of e.g. custom
hardware management protocols for handover between the host and baseboard
management controller.
diff --git a/sys/contrib/device-tree/Bindings/mfd/atmel-flexcom.txt b/sys/contrib/device-tree/Bindings/mfd/atmel-flexcom.txt
index 9d837535637b..af692e8833a5 100644
--- a/sys/contrib/device-tree/Bindings/mfd/atmel-flexcom.txt
+++ b/sys/contrib/device-tree/Bindings/mfd/atmel-flexcom.txt
@@ -6,6 +6,7 @@ at boot time according to the device tree.
Required properties:
- compatible: Should be "atmel,sama5d2-flexcom"
+ or "microchip,sam9x7-flexcom", "atmel,sama5d2-flexcom"
- reg: Should be the offset/length value for Flexcom dedicated
I/O registers (without USART, TWI or SPI registers).
- clocks: Should be the Flexcom peripheral clock from PMC.
diff --git a/sys/contrib/device-tree/Bindings/mfd/atmel-gpbr.txt b/sys/contrib/device-tree/Bindings/mfd/atmel-gpbr.txt
index e8c525569f10..3c989d1760a2 100644
--- a/sys/contrib/device-tree/Bindings/mfd/atmel-gpbr.txt
+++ b/sys/contrib/device-tree/Bindings/mfd/atmel-gpbr.txt
@@ -6,6 +6,7 @@ Required properties:
- compatible: Should be one of the following:
"atmel,at91sam9260-gpbr", "syscon"
"microchip,sam9x60-gpbr", "syscon"
+ "microchip,sam9x7-gpbr", "microchip,sam9x60-gpbr", "syscon"
- reg: contains offset/length value of the GPBR memory
region.
diff --git a/sys/contrib/device-tree/Bindings/mfd/atmel-hlcdc.txt b/sys/contrib/device-tree/Bindings/mfd/atmel-hlcdc.txt
index 5f8880cc757e..7de696eefaed 100644
--- a/sys/contrib/device-tree/Bindings/mfd/atmel-hlcdc.txt
+++ b/sys/contrib/device-tree/Bindings/mfd/atmel-hlcdc.txt
@@ -8,6 +8,7 @@ Required properties:
"atmel,sama5d3-hlcdc"
"atmel,sama5d4-hlcdc"
"microchip,sam9x60-hlcdc"
+ "microchip,sam9x75-xlcdc"
- reg: base address and size of the HLCDC device registers.
- clock-names: the name of the 3 clocks requested by the HLCDC device.
Should contain "periph_clk", "sys_clk" and "slow_clk".
diff --git a/sys/contrib/device-tree/Bindings/mfd/atmel-matrix.txt b/sys/contrib/device-tree/Bindings/mfd/atmel-matrix.txt
index 89d05c64fb01..6e5f83614e83 100644
--- a/sys/contrib/device-tree/Bindings/mfd/atmel-matrix.txt
+++ b/sys/contrib/device-tree/Bindings/mfd/atmel-matrix.txt
@@ -14,6 +14,7 @@ Required properties:
"atmel,at91sam9x5-matrix", "syscon"
"atmel,sama5d3-matrix", "syscon"
"microchip,sam9x60-matrix", "syscon"
+ "microchip,sam9x7-matrix", "atmel,at91sam9x5-matrix", "syscon"
- reg: Contains offset/length value of the Bus Matrix
memory region.
diff --git a/sys/contrib/device-tree/Bindings/mfd/atmel-smc.txt b/sys/contrib/device-tree/Bindings/mfd/atmel-smc.txt
index 5696d9fcb5dc..fd62add38a79 100644
--- a/sys/contrib/device-tree/Bindings/mfd/atmel-smc.txt
+++ b/sys/contrib/device-tree/Bindings/mfd/atmel-smc.txt
@@ -10,6 +10,7 @@ Required properties:
"atmel,sama5d3-smc", "syscon"
"atmel,sama5d2-smc", "syscon"
"microchip,sam9x60-smc", "syscon"
+ "microchip,sam9x7-smc", "atmel,at91sam9260-smc", "syscon"
- reg: Contains offset/length value of the SMC memory
region.
diff --git a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml
index 9f9a14af875e..cb480162f967 100644
--- a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml
@@ -35,7 +35,7 @@ patternProperties:
"^gpio@[0-9a-f]+$":
# Child node
type: object
- $ref: "../gpio/brcm,bcm63xx-gpio.yaml"
+ $ref: /schemas/gpio/brcm,bcm63xx-gpio.yaml
description:
GPIO controller for the SoC GPIOs. This child node definition
should follow the bindings specified in
@@ -44,7 +44,7 @@ patternProperties:
"^pinctrl@[0-9a-f]+$":
# Child node
type: object
- $ref: "../pinctrl/brcm,bcm6318-pinctrl.yaml"
+ $ref: /schemas/pinctrl/brcm,bcm6318-pinctrl.yaml
description:
Pin controller for the SoC pins. This child node definition
should follow the bindings specified in
diff --git a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml
index 803277dd2725..9c2a04829da5 100644
--- a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml
@@ -35,7 +35,7 @@ patternProperties:
"^gpio@[0-9a-f]+$":
# Child node
type: object
- $ref: "../gpio/brcm,bcm63xx-gpio.yaml"
+ $ref: /schemas/gpio/brcm,bcm63xx-gpio.yaml
description:
GPIO controller for the SoC GPIOs. This child node definition
should follow the bindings specified in
@@ -44,7 +44,7 @@ patternProperties:
"^pinctrl@[0-9a-f]+$":
# Child node
type: object
- $ref: "../pinctrl/brcm,bcm63268-pinctrl.yaml"
+ $ref: /schemas/pinctrl/brcm,bcm63268-pinctrl.yaml
description:
Pin controller for the SoC pins. This child node definition
should follow the bindings specified in
@@ -148,47 +148,47 @@ examples:
pinctrl_nand: nand-pins {
function = "nand";
- group = "nand_grp";
+ pins = "nand_grp";
};
pinctrl_gpio35_alt: gpio35_alt-pins {
function = "gpio35_alt";
- pin = "gpio35";
+ pins = "gpio35";
};
pinctrl_dectpd: dectpd-pins {
function = "dectpd";
- group = "dectpd_grp";
+ pins = "dectpd_grp";
};
pinctrl_vdsl_phy_override_0: vdsl_phy_override_0-pins {
function = "vdsl_phy_override_0";
- group = "vdsl_phy_override_0_grp";
+ pins = "vdsl_phy_override_0_grp";
};
pinctrl_vdsl_phy_override_1: vdsl_phy_override_1-pins {
function = "vdsl_phy_override_1";
- group = "vdsl_phy_override_1_grp";
+ pins = "vdsl_phy_override_1_grp";
};
pinctrl_vdsl_phy_override_2: vdsl_phy_override_2-pins {
function = "vdsl_phy_override_2";
- group = "vdsl_phy_override_2_grp";
+ pins = "vdsl_phy_override_2_grp";
};
pinctrl_vdsl_phy_override_3: vdsl_phy_override_3-pins {
function = "vdsl_phy_override_3";
- group = "vdsl_phy_override_3_grp";
+ pins = "vdsl_phy_override_3_grp";
};
pinctrl_dsl_gpio8: dsl_gpio8-pins {
function = "dsl_gpio8";
- group = "dsl_gpio8";
+ pins = "dsl_gpio8";
};
pinctrl_dsl_gpio9: dsl_gpio9-pins {
function = "dsl_gpio9";
- group = "dsl_gpio9";
+ pins = "dsl_gpio9";
};
};
};
diff --git a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml
index b9a6856ce970..5f48209ed40f 100644
--- a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml
@@ -35,7 +35,7 @@ patternProperties:
"^gpio@[0-9a-f]+$":
# Child node
type: object
- $ref: "../gpio/brcm,bcm63xx-gpio.yaml"
+ $ref: /schemas/gpio/brcm,bcm63xx-gpio.yaml
description:
GPIO controller for the SoC GPIOs. This child node definition
should follow the bindings specified in
@@ -44,7 +44,7 @@ patternProperties:
"^pinctrl@[0-9a-f]+$":
# Child node
type: object
- $ref: "../pinctrl/brcm,bcm6328-pinctrl.yaml"
+ $ref: /schemas/pinctrl/brcm,bcm6328-pinctrl.yaml
description:
Pin controller for the SoC pins. This child node definition
should follow the bindings specified in
diff --git a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml
index 4651fe4dde07..f1f4629565d9 100644
--- a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml
@@ -35,7 +35,7 @@ patternProperties:
"^gpio@[0-9a-f]+$":
# Child node
type: object
- $ref: "../gpio/brcm,bcm63xx-gpio.yaml"
+ $ref: /schemas/gpio/brcm,bcm63xx-gpio.yaml
description:
GPIO controller for the SoC GPIOs. This child node definition
should follow the bindings specified in
@@ -44,7 +44,7 @@ patternProperties:
"^pinctrl@[0-9a-f]+$":
# Child node
type: object
- $ref: "../pinctrl/brcm,bcm6358-pinctrl.yaml"
+ $ref: /schemas/pinctrl/brcm,bcm6358-pinctrl.yaml
description:
Pin controller for the SoC pins. This child node definition
should follow the bindings specified in
diff --git a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml
index 0330b621fd38..c2941638c8f2 100644
--- a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml
@@ -35,7 +35,7 @@ patternProperties:
"^gpio@[0-9a-f]+$":
# Child node
type: object
- $ref: "../gpio/brcm,bcm63xx-gpio.yaml"
+ $ref: /schemas/gpio/brcm,bcm63xx-gpio.yaml
description:
GPIO controller for the SoC GPIOs. This child node definition
should follow the bindings specified in
@@ -44,7 +44,7 @@ patternProperties:
"^pinctrl@[0-9a-f]+$":
# Child node
type: object
- $ref: "../pinctrl/brcm,bcm6362-pinctrl.yaml"
+ $ref: /schemas/pinctrl/brcm,bcm6362-pinctrl.yaml
description:
Pin controller for the SoC pins. This child node definition
should follow the bindings specified in
@@ -230,7 +230,7 @@ examples:
pinctrl_nand: nand-pins {
function = "nand";
- group = "nand_grp";
+ pins = "nand_grp";
};
};
};
diff --git a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml
index 82d3e4415bda..44e77d77d314 100644
--- a/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml
@@ -35,7 +35,7 @@ patternProperties:
"^gpio@[0-9a-f]+$":
# Child node
type: object
- $ref: "../gpio/brcm,bcm63xx-gpio.yaml"
+ $ref: /schemas/gpio/brcm,bcm63xx-gpio.yaml
description:
GPIO controller for the SoC GPIOs. This child node definition
should follow the bindings specified in
@@ -44,7 +44,7 @@ patternProperties:
"^pinctrl@[0-9a-f]+$":
# Child node
type: object
- $ref: "../pinctrl/brcm,bcm6368-pinctrl.yaml"
+ $ref: /schemas/pinctrl/brcm,bcm6368-pinctrl.yaml
description:
Pin controller for the SoC pins. This child node definition
should follow the bindings specified in
@@ -240,7 +240,7 @@ examples:
pinctrl_uart1: uart1-pins {
function = "uart1";
- group = "uart1_grp";
+ pins = "uart1_grp";
};
};
};
diff --git a/sys/contrib/device-tree/Bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml b/sys/contrib/device-tree/Bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
index bdff5b653453..6a824351834e 100644
--- a/sys/contrib/device-tree/Bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
@@ -17,7 +17,7 @@ description: |
node.
The SPMI controller part is provided by
- Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
+ Documentation/devicetree/bindings/spmi/hisilicon,hisi-spmi-controller.yaml
properties:
$nodename:
@@ -42,13 +42,6 @@ properties:
additionalProperties: false
- properties:
- '#address-cells':
- const: 1
-
- '#size-cells':
- const: 0
-
patternProperties:
'^ldo[0-9]+$':
type: object
@@ -66,72 +59,75 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/spmi/spmi.h>
- pmic: pmic@0 {
- compatible = "hisilicon,hi6421v600-spmi";
- reg = <0 0>;
-
- #interrupt-cells = <2>;
- interrupt-controller;
- interrupt-parent = <&gpio28>;
- interrupts = <0 0>;
-
- regulators {
- #address-cells = <1>;
+ spmi {
+ #address-cells = <2>;
#size-cells = <0>;
- ldo3: ldo3 {
- regulator-name = "ldo3";
- regulator-min-microvolt = <1500000>;
- regulator-max-microvolt = <2000000>;
- regulator-boot-on;
- };
-
- ldo4: ldo4 {
- regulator-name = "ldo4";
- regulator-min-microvolt = <1725000>;
- regulator-max-microvolt = <1900000>;
- regulator-boot-on;
- };
-
- ldo9: ldo9 {
- regulator-name = "ldo9";
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- };
-
- ldo15: ldo15 {
- regulator-name = "ldo15";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- regulator-always-on;
- };
-
- ldo16: ldo16 {
- regulator-name = "ldo16";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- regulator-boot-on;
- };
-
- ldo17: ldo17 {
- regulator-name = "ldo17";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <3300000>;
- };
-
- ldo33: ldo33 {
- regulator-name = "ldo33";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- };
-
- ldo34: ldo34 {
- regulator-name = "ldo34";
- regulator-min-microvolt = <2600000>;
- regulator-max-microvolt = <3300000>;
+ pmic@0 {
+ compatible = "hisilicon,hi6421v600-spmi";
+ reg = <0 SPMI_USID>;
+
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ interrupt-parent = <&gpio28>;
+ interrupts = <0 0>;
+
+ regulators {
+ ldo3 {
+ regulator-name = "ldo3";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-boot-on;
+ };
+
+ ldo4 {
+ regulator-name = "ldo4";
+ regulator-min-microvolt = <1725000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-boot-on;
+ };
+
+ ldo9 {
+ regulator-name = "ldo9";
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ };
+
+ ldo15 {
+ regulator-name = "ldo15";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-always-on;
+ };
+
+ ldo16 {
+ regulator-name = "ldo16";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-boot-on;
+ };
+
+ ldo17 {
+ regulator-name = "ldo17";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ ldo33 {
+ regulator-name = "ldo33";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ };
+
+ ldo34 {
+ regulator-name = "ldo34";
+ regulator-min-microvolt = <2600000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ };
};
- };
};
diff --git a/sys/contrib/device-tree/Bindings/mfd/maxim,max5970.yaml b/sys/contrib/device-tree/Bindings/mfd/maxim,max5970.yaml
index da67742c5aa9..0da5cae3852e 100644
--- a/sys/contrib/device-tree/Bindings/mfd/maxim,max5970.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/maxim,max5970.yaml
@@ -45,8 +45,13 @@ properties:
patternProperties:
"^led@[0-3]$":
$ref: /schemas/leds/common.yaml#
+ unevaluatedProperties: false
type: object
+ properties:
+ reg:
+ maximum: 3
+
additionalProperties: false
vss1-supply:
diff --git a/sys/contrib/device-tree/Bindings/mfd/maxim,max77693.yaml b/sys/contrib/device-tree/Bindings/mfd/maxim,max77693.yaml
index 1b06a77ec798..6a6f222b868f 100644
--- a/sys/contrib/device-tree/Bindings/mfd/maxim,max77693.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/maxim,max77693.yaml
@@ -37,6 +37,7 @@ properties:
max77693-muic:
type: object
additionalProperties: false
+ deprecated: true
properties:
compatible:
@@ -45,6 +46,21 @@ properties:
required:
- compatible
+ muic:
+ type: object
+ additionalProperties: false
+
+ properties:
+ compatible:
+ const: maxim,max77693-muic
+
+ connector:
+ $ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - compatible
+
motor-driver:
type: object
additionalProperties: false
@@ -107,6 +123,38 @@ examples:
};
};
+ muic {
+ compatible = "maxim,max77693-muic";
+
+ connector {
+ compatible = "samsung,usb-connector-11pin",
+ "usb-b-connector";
+ label = "micro-USB";
+ type = "micro";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ muic_to_usb: endpoint {
+ remote-endpoint = <&usb_to_muic>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ muic_to_mhl: endpoint {
+ remote-endpoint = <&mhl_to_muic>;
+ };
+ };
+ };
+ };
+ };
+
motor-driver {
compatible = "maxim,max77693-haptic";
haptic-supply = <&ldo26_reg>;
diff --git a/sys/contrib/device-tree/Bindings/mfd/maxim,max8925.yaml b/sys/contrib/device-tree/Bindings/mfd/maxim,max8925.yaml
new file mode 100644
index 000000000000..86dd810851ab
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mfd/maxim,max8925.yaml
@@ -0,0 +1,145 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/maxim,max8925.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MAX8925 PMIC from Maxim Integrated.
+
+maintainers:
+ - Lee Jones <lee@kernel.org>
+
+properties:
+ compatible:
+ const: maxim,max8925
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 1
+ description:
+ The cell is the IRQ number
+
+ maxim,tsc-irq:
+ description: second interrupt from max8925
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ regulators:
+ type: object
+
+ patternProperties:
+ "^SDV[1-3]$|^LDO[1-9]$|^LDO1[0-9]$|^LDO20$":
+ description: regulator configuration for SDV1-3 and LDO1-20
+ $ref: /schemas/regulator/regulator.yaml
+ unevaluatedProperties: false
+
+ additionalProperties: false
+
+ backlight:
+ type: object
+ properties:
+ maxim,max8925-dual-string:
+ description: set to 1 to support dual string
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+
+ additionalProperties: false
+
+ charger:
+ type: object
+ properties:
+ batt-detect:
+ description: set to 1 if battery detection via ID pin is supported
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+
+ topoff-threshold:
+ description: charging current in topoff mode, configures bits 5-6 in CHG_CNTL1
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 3
+ default: 0
+
+ fast-charge:
+ description: set charging current in fast mode, configures bits 0-3 in CHG_CNTL1
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+ default: 0
+
+ no-temp-support:
+ description: set to 1 if temperature sensing is not supported
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+
+ no-insert-detect:
+ description: set to 1 if AC detection is not supported
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-controller
+ - "#interrupt-cells"
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@3c {
+ compatible = "maxim,max8925";
+ reg = <0x3c>;
+ interrupts = <1>;
+ interrupt-parent = <&intcmux4>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ maxim,tsc-irq = <0>;
+
+ regulators {
+ SDV1 {
+ regulator-min-microvolt = <637500>;
+ regulator-max-microvolt = <1425000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO1 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <3900000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+
+ backlight {
+ maxim,max8925-dual-string = <0>;
+ };
+
+ charger {
+ batt-detect = <0>;
+ topoff-threshold = <1>;
+ fast-charge = <7>;
+ no-temp-support = <0>;
+ no-insert-detect = <0>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/mfd/maxim,max8998.yaml b/sys/contrib/device-tree/Bindings/mfd/maxim,max8998.yaml
new file mode 100644
index 000000000000..f3c3f64fd012
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mfd/maxim,max8998.yaml
@@ -0,0 +1,324 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/maxim,max8998.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX8998, National/TI LP3974 Power Management IC
+
+maintainers:
+ - Krzysztof Kozlowski <krzk@kernel.org>
+
+description:
+ The Maxim MAX8998 is a Power Management IC which includes voltage/current
+ regulators, real time clock, battery charging controller and several other
+ sub-blocks. It is interfaced using an I2C interface. Each sub-block is
+ addressed by the host system using different i2c slave address.
+
+properties:
+ compatible:
+ enum:
+ - maxim,max8998
+ - national,lp3974
+ - ti,lp3974
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: Main interrupt
+ - description: Power-on/-off interrupt
+
+ max8998,pmic-buck1-dvs-gpios:
+ maxItems: 2
+ description:
+ Two host gpios used for buck1 DVS.
+
+ max8998,pmic-buck2-dvs-gpio:
+ maxItems: 1
+ description:
+ Host gpio used for buck2 DVS.
+
+ max8998,pmic-buck1-default-dvs-idx:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3]
+ default: 0
+ description:
+ Default voltage setting selected from the possible 4 options selectable
+ by the DVS gpios.
+
+ max8998,pmic-buck2-default-dvs-idx:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+ description:
+ Default voltage setting selected from the possible 2 options selectable
+ by the DVS GPIOs.
+
+ max8998,pmic-buck-voltage-lock:
+ type: boolean
+ description:
+ If present, disallows changing of preprogrammed buck DVS voltages.
+
+ max8998,pmic-buck1-dvs-voltage:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ maxItems: 4
+ description:
+ Four voltage values in microvolts for buck1 regulator that can be
+ selected using DVS GPIO.
+
+ max8998,pmic-buck2-dvs-voltage:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ maxItems: 2
+ description:
+ Two voltage values in microvolts for buck2 regulator that can be
+ selected using DVS GPIO.
+
+ regulators:
+ type: object
+ additionalProperties: false
+
+ properties:
+ CHARGER:
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ CHARGER is main battery charger current control, wrongly represented
+ as regulator.
+
+ properties:
+ regulator-min-microamp:
+ minimum: 90000
+ maximum: 800000
+
+ regulator-max-microamp:
+ minimum: 90000
+ maximum: 800000
+
+ regulator-min-microvolt: false
+ regulator-max-microvolt: false
+
+ required:
+ - regulator-name
+
+ patternProperties:
+ "^(LDO([2-9]|1[0-7])|BUCK[1-4])$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - regulator-name
+
+ "^(EN32KHz-AP|EN32KHz-CP|ENVICHG|ESAFEOUT[12])$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+ description: |
+ EN32KHz-AP and EN32KHz-CP are 32768 Hz clocks, wrongly represented as
+ regulators.
+ ENVICHG is a Battery Charging Current Monitor Output.
+
+ properties:
+ regulator-min-microvolt: false
+ regulator-max-microvolt: false
+
+ required:
+ - regulator-name
+
+dependencies:
+ max8998,pmic-buck1-dvs-gpios: [ "max8998,pmic-buck1-dvs-voltage" ]
+ max8998,pmic-buck2-dvs-gpio: [ "max8998,pmic-buck2-dvs-voltage" ]
+
+required:
+ - compatible
+ - reg
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@66 {
+ compatible = "national,lp3974";
+ reg = <0x66>;
+ interrupts-extended = <&gpx0 7 IRQ_TYPE_LEVEL_LOW>,
+ <&gpx2 7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lp3974_irq>;
+
+ max8998,pmic-buck1-default-dvs-idx = <0>;
+ max8998,pmic-buck1-dvs-gpios = <&gpx0 5 GPIO_ACTIVE_HIGH>,
+ <&gpx0 6 GPIO_ACTIVE_HIGH>;
+ max8998,pmic-buck1-dvs-voltage = <1100000>, <1000000>,
+ <1100000>, <1000000>;
+ max8998,pmic-buck2-default-dvs-idx = <0>;
+ max8998,pmic-buck2-dvs-gpio = <&gpe2 0 GPIO_ACTIVE_HIGH>;
+ max8998,pmic-buck2-dvs-voltage = <1200000>, <1100000>;
+
+ regulators {
+ LDO2 {
+ regulator-name = "VALIVE_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ };
+
+ LDO3 {
+ regulator-name = "VUSB+MIPI_1.1V";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ };
+
+ LDO4 {
+ regulator-name = "VADC_3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ LDO5 {
+ regulator-name = "VTF_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ LDO6 {
+ regulator-name = "LDO6";
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ };
+
+ LDO7 {
+ regulator-name = "VLCD+VMIPI_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ LDO8 {
+ regulator-name = "VUSB+VDAC_3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ LDO9 {
+ regulator-name = "VCC_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ };
+
+ LDO10 {
+ regulator-name = "VPLL_1.1V";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO11 {
+ regulator-name = "CAM_AF_3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ LDO12 {
+ regulator-name = "PS_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ LDO13 {
+ regulator-name = "VHIC_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ LDO14 {
+ regulator-name = "CAM_I_HOST_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ LDO15 {
+ regulator-name = "CAM_S_DIG+FM33_CORE_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ LDO16 {
+ regulator-name = "CAM_S_ANA_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ LDO17 {
+ regulator-name = "VCC_3.0V_LCD";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ BUCK1 {
+ regulator-name = "VINT_1.1V";
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ BUCK2 {
+ regulator-name = "VG3D_1.1V";
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-boot-on;
+ };
+
+ BUCK3 {
+ regulator-name = "VCC_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ BUCK4 {
+ regulator-name = "VMEM_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ };
+
+ EN32KHz-AP {
+ regulator-name = "32KHz AP";
+ regulator-always-on;
+ };
+
+ EN32KHz-CP {
+ regulator-name = "32KHz CP";
+ };
+
+ ENVICHG {
+ regulator-name = "VICHG";
+ };
+
+ ESAFEOUT1 {
+ regulator-name = "SAFEOUT1";
+ };
+
+ ESAFEOUT2 {
+ regulator-name = "SAFEOUT2";
+ regulator-boot-on;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/mfd/mediatek,mt6357.yaml b/sys/contrib/device-tree/Bindings/mfd/mediatek,mt6357.yaml
index fc2a53148e1c..37423c2e0fdf 100644
--- a/sys/contrib/device-tree/Bindings/mfd/mediatek,mt6357.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/mediatek,mt6357.yaml
@@ -40,6 +40,7 @@ properties:
regulators:
type: object
$ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
+ unevaluatedProperties: false
description:
List of MT6357 BUCKs and LDOs regulators.
@@ -59,6 +60,7 @@ properties:
keys:
type: object
$ref: /schemas/input/mediatek,pmic-keys.yaml
+ unevaluatedProperties: false
description:
MT6357 power and home keys.
diff --git a/sys/contrib/device-tree/Bindings/mfd/mt6397.txt b/sys/contrib/device-tree/Bindings/mfd/mt6397.txt
index 294693a8906c..10540aa7afa1 100644
--- a/sys/contrib/device-tree/Bindings/mfd/mt6397.txt
+++ b/sys/contrib/device-tree/Bindings/mfd/mt6397.txt
@@ -22,8 +22,9 @@ compatible:
"mediatek,mt6323" for PMIC MT6323
"mediatek,mt6331" for PMIC MT6331 and MT6332
"mediatek,mt6357" for PMIC MT6357
- "mediatek,mt6358" for PMIC MT6358 and MT6366
+ "mediatek,mt6358" for PMIC MT6358
"mediatek,mt6359" for PMIC MT6359
+ "mediatek,mt6366", "mediatek,mt6358" for PMIC MT6366
"mediatek,mt6397" for PMIC MT6397
Optional subnodes:
@@ -40,6 +41,7 @@ Optional subnodes:
- compatible: "mediatek,mt6323-regulator"
see ../regulator/mt6323-regulator.txt
- compatible: "mediatek,mt6358-regulator"
+ - compatible: "mediatek,mt6366-regulator", "mediatek-mt6358-regulator"
see ../regulator/mt6358-regulator.txt
- compatible: "mediatek,mt6397-regulator"
see ../regulator/mt6397-regulator.txt
diff --git a/sys/contrib/device-tree/Bindings/mfd/qcom,pm8008.yaml b/sys/contrib/device-tree/Bindings/mfd/qcom,pm8008.yaml
index e6a2387d8650..0c75d8bde568 100644
--- a/sys/contrib/device-tree/Bindings/mfd/qcom,pm8008.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/qcom,pm8008.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Technologies, Inc. PM8008 PMIC
maintainers:
- - Guru Das Srinagesh <gurus@codeaurora.org>
+ - Guru Das Srinagesh <quic_gurus@quicinc.com>
description: |
Qualcomm Technologies, Inc. PM8008 is a dedicated camera PMIC that integrates
@@ -99,10 +99,12 @@ examples:
- |
#include <dt-bindings/mfd/qcom-pm8008.h>
#include <dt-bindings/interrupt-controller/irq.h>
- qupv3_se13_i2c {
+
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
- pm8008i@8 {
+
+ pmic@8 {
compatible = "qcom,pm8008";
reg = <0x8>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/mfd/qcom,spmi-pmic.yaml b/sys/contrib/device-tree/Bindings/mfd/qcom,spmi-pmic.yaml
index 8b9a2008a354..8103fb61a16c 100644
--- a/sys/contrib/device-tree/Bindings/mfd/qcom,spmi-pmic.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/qcom,spmi-pmic.yaml
@@ -41,6 +41,7 @@ properties:
- qcom,pm660
- qcom,pm660l
- qcom,pm7250b
+ - qcom,pm7550ba
- qcom,pm7325
- qcom,pm8004
- qcom,pm8005
@@ -57,6 +58,7 @@ properties:
- qcom,pm8350
- qcom,pm8350b
- qcom,pm8350c
+ - qcom,pm8450
- qcom,pm8550
- qcom,pm8550b
- qcom,pm8550ve
@@ -64,12 +66,15 @@ properties:
- qcom,pm8841
- qcom,pm8909
- qcom,pm8916
+ - qcom,pm8937
- qcom,pm8941
- qcom,pm8950
- qcom,pm8953
- qcom,pm8994
- qcom,pm8998
- qcom,pma8084
+ - qcom,pmc8180
+ - qcom,pmc8180c
- qcom,pmd9635
- qcom,pmi632
- qcom,pmi8950
@@ -88,6 +93,7 @@ properties:
- qcom,pms405
- qcom,pmx55
- qcom,pmx65
+ - qcom,pmx75
- qcom,smb2351
- const: qcom,spmi-pmic
@@ -127,11 +133,17 @@ patternProperties:
"^audio-codec@[0-9a-f]+$":
type: object
- additionalProperties: true # FIXME qcom,pm8916-wcd-analog-codec binding not converted yet
+ $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#
+
+ "^battery@[0-9a-f]+$":
+ type: object
+ oneOf:
+ - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml#
"^charger@[0-9a-f]+$":
type: object
oneOf:
+ - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml#
- $ref: /schemas/power/supply/qcom,pm8941-charger.yaml#
- $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml#
- $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#
@@ -164,6 +176,10 @@ patternProperties:
type: object
$ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#
+ "^typec@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/usb/qcom,pmic-typec.yaml#
+
"^usb-detect@[0-9a-f]+$":
type: object
$ref: /schemas/extcon/qcom,pm8941-misc.yaml#
@@ -230,13 +246,13 @@ examples:
interrupt-controller;
#interrupt-cells = <4>;
- pmi8998_lsid0: pmic@2 {
+ pmic@2 {
compatible = "qcom,pmi8998", "qcom,spmi-pmic";
reg = <0x2 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
- pmi8998_gpio: gpio@c000 {
+ gpio@c000 {
compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
@@ -321,7 +337,7 @@ examples:
};
};
- pm6150_gpio: gpio@c000 {
+ gpio@c000 {
compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
diff --git a/sys/contrib/device-tree/Bindings/mfd/qcom,tcsr.yaml b/sys/contrib/device-tree/Bindings/mfd/qcom,tcsr.yaml
index 5ad9d5deaaf8..798705ab6a46 100644
--- a/sys/contrib/device-tree/Bindings/mfd/qcom,tcsr.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/qcom,tcsr.yaml
@@ -27,7 +27,10 @@ properties:
- qcom,sdm845-tcsr
- qcom,sdx55-tcsr
- qcom,sdx65-tcsr
+ - qcom,sm4450-tcsr
- qcom,sm8150-tcsr
+ - qcom,sm8250-tcsr
+ - qcom,sm8350-tcsr
- qcom,sm8450-tcsr
- qcom,tcsr-apq8064
- qcom,tcsr-apq8084
diff --git a/sys/contrib/device-tree/Bindings/mfd/qcom-pm8xxx.yaml b/sys/contrib/device-tree/Bindings/mfd/qcom-pm8xxx.yaml
index 9c51c1b19067..7fe3875a5996 100644
--- a/sys/contrib/device-tree/Bindings/mfd/qcom-pm8xxx.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/qcom-pm8xxx.yaml
@@ -43,13 +43,37 @@ properties:
interrupt-controller: true
patternProperties:
+ "gpio@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml#
+
+ "keypad@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/input/qcom,pm8921-keypad.yaml#
+
"led@[0-9a-f]+$":
type: object
$ref: /schemas/leds/qcom,pm8058-led.yaml#
+ "mpps@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml#
+
+ "pwrkey@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/input/qcom,pm8921-pwrkey.yaml#
+
"rtc@[0-9a-f]+$":
type: object
- $ref: ../rtc/qcom-pm8xxx-rtc.yaml
+ $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
+
+ "vibrator@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/input/qcom,pm8xxx-vib.yaml#
+
+ "xoadc@[0-9a-f]+$":
+ type: object
+ $ref: /schemas/iio/adc/qcom,pm8018-adc.yaml#
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk805.yaml b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk805.yaml
index 4992f71b6fc3..44f8188360dd 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk805.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk805.yaml
@@ -42,9 +42,12 @@ properties:
rockchip,system-power-controller:
type: boolean
+ deprecated: true
description:
Telling whether or not this PMIC is controlling the system power.
+ system-power-controller: true
+
wakeup-source:
type: boolean
description:
@@ -80,6 +83,7 @@ properties:
"^(DCDC_REG[1-4]|LDO_REG[1-3])$":
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
unevaluatedProperties: false
allOf:
diff --git a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk806.yaml b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk806.yaml
index cf2500f2e9a0..3c2b06629b75 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk806.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk806.yaml
@@ -29,6 +29,8 @@ properties:
'#gpio-cells':
const: 2
+ system-power-controller: true
+
vcc1-supply:
description:
The input supply for dcdc-reg1.
diff --git a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk808.yaml b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk808.yaml
index f5908fa01a61..d2ac6fbd5ce6 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk808.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk808.yaml
@@ -37,9 +37,12 @@ properties:
rockchip,system-power-controller:
type: boolean
+ deprecated: true
description:
Telling whether or not this PMIC is controlling the system power.
+ system-power-controller: true
+
wakeup-source:
type: boolean
description:
@@ -107,6 +110,7 @@ properties:
"^(DCDC_REG[1-4]|LDO_REG[1-8]|SWITCH_REG[1-2])$":
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
unevaluatedProperties: false
required:
diff --git a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk809.yaml b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk809.yaml
index 7fb849ac74a7..839c0521f1e5 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk809.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk809.yaml
@@ -37,9 +37,12 @@ properties:
rockchip,system-power-controller:
type: boolean
+ deprecated: true
description:
Telling whether or not this PMIC is controlling the system power.
+ system-power-controller: true
+
wakeup-source:
type: boolean
description:
@@ -86,7 +89,8 @@ properties:
patternProperties:
"^(LDO_REG[1-9]|DCDC_REG[1-5]|SWITCH_REG[1-2])$":
type: object
- $ref: ../regulator/regulator.yaml#
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
unevaluatedProperties: false
allOf:
diff --git a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk817.yaml b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk817.yaml
index 269fb85b2027..92b1592e8942 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk817.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk817.yaml
@@ -38,9 +38,12 @@ properties:
rockchip,system-power-controller:
type: boolean
+ deprecated: true
description:
Telling whether or not this PMIC is controlling the system power.
+ system-power-controller: true
+
wakeup-source:
type: boolean
description:
diff --git a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk818.yaml b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk818.yaml
index b57c4b005cf4..fd4b9de364aa 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rockchip,rk818.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rockchip,rk818.yaml
@@ -37,9 +37,12 @@ properties:
rockchip,system-power-controller:
type: boolean
+ deprecated: true
description:
Telling whether or not this PMIC is controlling the system power.
+ system-power-controller: true
+
wakeup-source:
type: boolean
description:
@@ -99,6 +102,7 @@ properties:
"^(DCDC_REG[1-4]|DCDC_BOOST|LDO_REG[1-9]|SWITCH_REG|HDMI_SWITCH|OTG_SWITCH)$":
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
unevaluatedProperties: false
required:
diff --git a/sys/contrib/device-tree/Bindings/mfd/rohm,bd71847-pmic.yaml b/sys/contrib/device-tree/Bindings/mfd/rohm,bd71847-pmic.yaml
index 7ab7b2c7f3e6..d783cc4e4e86 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rohm,bd71847-pmic.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rohm,bd71847-pmic.yaml
@@ -130,7 +130,6 @@ dependencies:
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml b/sys/contrib/device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml
index 10f207a38178..b7b323b1a4f2 100644
--- a/sys/contrib/device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml
@@ -34,7 +34,7 @@ properties:
BD9576 and BD9573 VOUT1 regulator enable state can be individually
controlled by a GPIO. This is dictated by state of vout1-en pin during
the PMIC startup. If vout1-en is LOW during PMIC startup then the VOUT1
- enable sate is controlled via this pin. Set this property if vout1-en
+ enable state is controlled via this pin. Set this property if vout1-en
is wired to be down at PMIC start-up.
type: boolean
@@ -61,7 +61,7 @@ properties:
rohm,hw-timeout-ms:
maxItems: 2
description:
- Watchog timeout in milliseconds. If single value is given it is
+ Watchdog timeout in milliseconds. If single value is given it is
the maximum timeout. Eg. if pinging watchdog is not done within this time
limit the watchdog will be triggered. If two values are given watchdog
is configured in "window mode". Then first value is limit for short-ping
diff --git a/sys/contrib/device-tree/Bindings/mfd/samsung,exynos5433-lpass.yaml b/sys/contrib/device-tree/Bindings/mfd/samsung,exynos5433-lpass.yaml
index b97b06848729..f154103f32cc 100644
--- a/sys/contrib/device-tree/Bindings/mfd/samsung,exynos5433-lpass.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/samsung,exynos5433-lpass.yaml
@@ -85,7 +85,7 @@ examples:
};
i2s@11440000 {
- compatible = "samsung,exynos7-i2s";
+ compatible = "samsung,exynos5433-i2s", "samsung,exynos7-i2s";
reg = <0x11440000 0x100>;
dmas = <&adma 0>, <&adma 2>;
dma-names = "tx", "rx";
diff --git a/sys/contrib/device-tree/Bindings/mfd/sprd,ums512-glbreg.yaml b/sys/contrib/device-tree/Bindings/mfd/sprd,ums512-glbreg.yaml
index 996bd4a17ca3..a750fa23d7e7 100644
--- a/sys/contrib/device-tree/Bindings/mfd/sprd,ums512-glbreg.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/sprd,ums512-glbreg.yaml
@@ -19,7 +19,9 @@ description:
properties:
compatible:
items:
- - const: sprd,ums512-glbregs
+ - enum:
+ - sprd,ums512-glbregs
+ - sprd,ums9620-glbregs
- const: syscon
- const: simple-mfd
diff --git a/sys/contrib/device-tree/Bindings/mfd/st,stmpe.yaml b/sys/contrib/device-tree/Bindings/mfd/st,stmpe.yaml
new file mode 100644
index 000000000000..b77cc3f3075d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mfd/st,stmpe.yaml
@@ -0,0 +1,297 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/st,stmpe.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectonics Port Expander (STMPE)
+
+description: STMicroelectronics Port Expander (STMPE) is a series of slow
+ bus controllers for various expanded peripherals such as GPIO, keypad,
+ touchscreen, ADC, PWM or rotator. It can contain one or several different
+ peripherals connected to SPI or I2C.
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - st,stmpe601
+ - st,stmpe801
+ - st,stmpe811
+ - st,stmpe1600
+ - st,stmpe1601
+ - st,stmpe2401
+ - st,stmpe2403
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ vcc-supply: true
+
+ vio-supply: true
+
+ reset-gpios:
+ maxItems: 1
+
+ wakeup-source: true
+
+ st,autosleep-timeout:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 4, 16, 32, 64, 128, 256, 512, 1024 ]
+ description: Time idle before going to automatic sleep to save power
+
+ st,sample-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6 ]
+ description: |
+ Sample time per iteration
+ 0 = 36 clock ticks
+ 1 = 44 clock ticks
+ 2 = 56 clock ticks
+ 3 = 64 clock ticks
+ 4 = 80 clock ticks - recommended
+ 5 = 96 clock ticks
+ 6 = 124 clock ticks
+
+ st,mod-12b:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: ADC bit mode 0 = 10bit ADC, 1 = 12bit ADC
+
+ st,ref-sel:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: ADC reference source 0 = internal, 1 = external
+
+ st,adc-freq:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ ADC clock speed
+ 0 = 1.625 MHz
+ 1 = 3.25 MHz
+ 2, 3 = 6.5 MHz
+
+ adc:
+ type: object
+ $ref: /schemas/iio/adc/st,stmpe-adc.yaml#
+
+ gpio:
+ type: object
+ $ref: /schemas/gpio/st,stmpe-gpio.yaml#
+
+ keyboard-controller:
+ type: object
+ $ref: /schemas/input/matrix-keymap.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-keypad
+
+ debounce-interval:
+ description: Debouncing interval in milliseconds
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ st,no-autorepeat:
+ description: If present, the keys will not autorepeat when pressed
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ st,scan-count:
+ description: Scanning cycles elapsed before key data is updated
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ required:
+ - compatible
+ - linux,keymap
+
+ pwm:
+ type: object
+ $ref: /schemas/pwm/pwm.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-pwm
+
+ "#pwm-cells":
+ const: 2
+
+ touchscreen:
+ type: object
+ $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-ts
+
+ st,ave-ctrl:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ Sample average control
+ 0 = 1 sample
+ 1 = 2 samples
+ 2 = 4 samples
+ 3 = 8 samples
+
+ st,touch-det-delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: |
+ Touch detection delay
+ 0 = 10 us
+ 1 = 50 us
+ 2 = 100 us
+ 3 = 500 us - recommended
+ 4 = 1 ms
+ 5 = 5 ms
+ 6 = 10 ms
+ 7 = 50 ms
+
+ st,settling:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: |
+ Panel driver settling time
+ 0 = 10 us
+ 1 = 100 us
+ 2 = 500 us - recommended
+ 3 = 1 ms
+ 4 = 5 ms
+ 5 = 10 ms
+ 6 = 50 ms
+ 7 = 100 ms
+
+ st,fraction-z:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: Length of the fractional part in z, recommended is 7
+ (fraction-z ([0..7]) = Count of the fractional part)
+
+ st,i-drive:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: |
+ current limit value of the touchscreen drivers
+ 0 = 20 mA (typical 35 mA max)
+ 1 = 50 mA (typical 80 mA max)
+
+ required:
+ - compatible
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/input/input.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port-expander@43 {
+ compatible = "st,stmpe2401";
+ reg = <0x43>;
+ reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio>;
+ vcc-supply = <&db8500_vsmps2_reg>;
+ vio-supply = <&db8500_vsmps2_reg>;
+ wakeup-source;
+ st,autosleep-timeout = <1024>;
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ st,norequest-mask = <0xf0f002>;
+ };
+
+ keyboard-controller {
+ compatible = "st,stmpe-keypad";
+ debounce-interval = <64>;
+ st,scan-count = <8>;
+ st,no-autorepeat;
+ keypad,num-rows = <8>;
+ keypad,num-columns = <8>;
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x00, KEY_1)
+ MATRIX_KEY(0x00, 0x01, KEY_2)
+ MATRIX_KEY(0x00, 0x02, KEY_3)
+ MATRIX_KEY(0x00, 0x03, KEY_4)
+ MATRIX_KEY(0x00, 0x04, KEY_5)
+ MATRIX_KEY(0x00, 0x05, KEY_6)
+ MATRIX_KEY(0x00, 0x06, KEY_7)
+ MATRIX_KEY(0x00, 0x07, KEY_8)
+ MATRIX_KEY(0x00, 0x08, KEY_9)
+ MATRIX_KEY(0x00, 0x09, KEY_0)
+ >;
+ };
+
+ pwm {
+ compatible = "st,stmpe-pwm";
+ #pwm-cells = <2>;
+ };
+ };
+
+ port-expander@41 {
+ compatible = "st,stmpe811";
+ reg = <0x41>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio>;
+ st,adc-freq = <1>;
+ st,mod-12b = <1>;
+ st,ref-sel = <0>;
+ st,sample-time = <4>;
+
+ adc {
+ compatible = "st,stmpe-adc";
+ st,norequest-mask = <0x0f>;
+ #io-channel-cells = <1>;
+ };
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pwm {
+ compatible = "st,stmpe-pwm";
+ #pwm-cells = <2>;
+ };
+
+ touchscreen {
+ compatible = "st,stmpe-ts";
+ st,ave-ctrl = <3>;
+ st,touch-det-delay = <5>;
+ st,settling = <3>;
+ st,fraction-z = <7>;
+ st,i-drive = <1>;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/mfd/st,stpmic1.yaml b/sys/contrib/device-tree/Bindings/mfd/st,stpmic1.yaml
index 97c61097f9e2..b17ebeb0a42f 100644
--- a/sys/contrib/device-tree/Bindings/mfd/st,stpmic1.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/st,stpmic1.yaml
@@ -106,6 +106,7 @@ properties:
const: st,stpmic1-regulators
ldo3:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -128,6 +129,7 @@ properties:
additionalProperties: false
ldo4:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -142,11 +144,14 @@ properties:
regulator-name: true
regulator-boot-on: true
regulator-always-on: true
+ regulator-min-microvolt: true
+ regulator-max-microvolt: true
regulator-over-current-protection: true
additionalProperties: false
vref_ddr:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -165,6 +170,7 @@ properties:
additionalProperties: false
boost:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -187,10 +193,8 @@ properties:
"^(buck[1-4]|ldo[1-6]|vref_ddr|boost|pwr_sw[1-2])-supply$":
description: STPMIC1 voltage regulators supplies
- "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
- $ref: ../regulator/regulator.yaml
-
"^ldo[1-2,5-6]$":
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -213,6 +217,7 @@ properties:
additionalProperties: false
"^buck[1-4]$":
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -237,6 +242,7 @@ properties:
additionalProperties: false
"^pwr_sw[1-2]$":
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
diff --git a/sys/contrib/device-tree/Bindings/mfd/stericsson,ab8500.yaml b/sys/contrib/device-tree/Bindings/mfd/stericsson,ab8500.yaml
index 6c8d42f27fe8..94f9767a927d 100644
--- a/sys/contrib/device-tree/Bindings/mfd/stericsson,ab8500.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/stericsson,ab8500.yaml
@@ -313,7 +313,7 @@ properties:
- const: audioclk
stericsson,earpeice-cmv:
- description: Earpeice voltage
+ description: Earpiece voltage
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 950, 1100, 1270, 1580 ]
@@ -337,39 +337,39 @@ properties:
with power.
ab8500_ldo_aux1:
- description: The voltage for the auxilary LDO regulator 1
+ description: The voltage for the auxiliary LDO regulator 1
type: object
$ref: ../regulator/regulator.yaml#
unevaluatedProperties: false
ab8500_ldo_aux2:
- description: The voltage for the auxilary LDO regulator 2
+ description: The voltage for the auxiliary LDO regulator 2
type: object
$ref: ../regulator/regulator.yaml#
unevaluatedProperties: false
ab8500_ldo_aux3:
- description: The voltage for the auxilary LDO regulator 3
+ description: The voltage for the auxiliary LDO regulator 3
type: object
$ref: ../regulator/regulator.yaml#
unevaluatedProperties: false
ab8500_ldo_aux4:
- description: The voltage for the auxilary LDO regulator 4
+ description: The voltage for the auxiliary LDO regulator 4
only present on AB8505
type: object
$ref: ../regulator/regulator.yaml#
unevaluatedProperties: false
ab8500_ldo_aux5:
- description: The voltage for the auxilary LDO regulator 5
+ description: The voltage for the auxiliary LDO regulator 5
only present on AB8505
type: object
$ref: ../regulator/regulator.yaml#
unevaluatedProperties: false
ab8500_ldo_aux6:
- description: The voltage for the auxilary LDO regulator 6
+ description: The voltage for the auxiliary LDO regulator 6
only present on AB8505
type: object
$ref: ../regulator/regulator.yaml#
@@ -378,7 +378,7 @@ properties:
# There is never any AUX7 regulator which is confusing
ab8500_ldo_aux8:
- description: The voltage for the auxilary LDO regulator 8
+ description: The voltage for the auxiliary LDO regulator 8
only present on AB8505
type: object
$ref: ../regulator/regulator.yaml#
diff --git a/sys/contrib/device-tree/Bindings/mfd/stericsson,db8500-prcmu.yaml b/sys/contrib/device-tree/Bindings/mfd/stericsson,db8500-prcmu.yaml
index 1d4d88f7e82d..cb2a42caabb5 100644
--- a/sys/contrib/device-tree/Bindings/mfd/stericsson,db8500-prcmu.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/stericsson,db8500-prcmu.yaml
@@ -72,44 +72,52 @@ properties:
main voltage domain for the chip.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_varm:
- description: The voltage for the ARM Cortex A-9 CPU.
+ description: The voltage for the ARM Cortex-A9 CPU.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_vmodem:
description: The voltage for the modem subsystem.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_vpll:
description: The voltage for the phase locked loop clocks.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_vsmps1:
description: Also known as VIO12, is a step-down voltage regulator
for 1.2V I/O. SMPS means System Management Power Source.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_vsmps2:
description: Also known as VIO18, is a step-down voltage regulator
for 1.8V I/O. SMPS means System Management Power Source.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_vsmps3:
description: This is a step-down voltage regulator
for 0.87 thru 1.875V I/O. SMPS means System Management Power Source.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_vrf1:
- description: RF transciever voltage regulator.
+ description: RF transceiver voltage regulator.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sva_mmdsp:
description: Smart Video Accelerator (SVA) multimedia DSP (MMDSP)
@@ -117,18 +125,21 @@ properties:
for video encoding and decoding.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sva_mmdsp_ret:
description: Smart Video Accelerator (SVA) multimedia DSP (MMDSP)
voltage regulator for retention mode.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sva_pipe:
description: Smart Video Accelerator (SVA) multimedia DSP (MMDSP)
voltage regulator for the data pipe.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sia_mmdsp:
description: Smart Image Accelerator (SIA) multimedia DSP (MMDSP)
@@ -136,18 +147,21 @@ properties:
for image encoding and decoding.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sia_mmdsp_ret:
description: Smart Image Accelerator (SIA) multimedia DSP (MMDSP)
voltage regulator for retention mode.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sia_pipe:
description: Smart Image Accelerator (SIA) multimedia DSP (MMDSP)
voltage regulator for the data pipe.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_sga:
description: Smart Graphics Accelerator (SGA) voltage regulator.
@@ -155,6 +169,7 @@ properties:
accelerator block.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_b2r2_mcde:
description: Blit Blend Rotate and Rescale (B2R2), and Multi-Channel
@@ -162,28 +177,33 @@ properties:
blocks.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_esram12:
description: Embedded Static RAM (ESRAM) 1 and 2 voltage regulator.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_esram12_ret:
description: Embedded Static RAM (ESRAM) 1 and 2 voltage regulator for
retention mode.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_esram34:
description: Embedded Static RAM (ESRAM) 3 and 4 voltage regulator.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
db8500_esram34_ret:
description: Embedded Static RAM (ESRAM) 3 and 4 voltage regulator for
retention mode.
type: object
$ref: ../regulator/regulator.yaml#
+ unevaluatedProperties: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/mfd/syscon.yaml b/sys/contrib/device-tree/Bindings/mfd/syscon.yaml
index 8103154bbb52..084b5c2a2a3c 100644
--- a/sys/contrib/device-tree/Bindings/mfd/syscon.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/syscon.yaml
@@ -49,6 +49,8 @@ properties:
- hisilicon,peri-subctrl
- hpe,gxp-sysreg
- intel,lgm-syscon
+ - loongson,ls1b-syscon
+ - loongson,ls1c-syscon
- marvell,armada-3700-usb2-host-misc
- mediatek,mt8135-pctl-a-syscfg
- mediatek,mt8135-pctl-b-syscfg
@@ -61,6 +63,7 @@ properties:
- rockchip,px30-qos
- rockchip,rk3036-qos
- rockchip,rk3066-qos
+ - rockchip,rk3128-qos
- rockchip,rk3228-qos
- rockchip,rk3288-qos
- rockchip,rk3368-qos
@@ -69,6 +72,7 @@ properties:
- rockchip,rk3588-qos
- rockchip,rv1126-qos
- starfive,jh7100-sysmain
+ - ti,am654-dss-oldi-io-ctrl
- const: syscon
diff --git a/sys/contrib/device-tree/Bindings/mfd/ti,am3359-tscadc.yaml b/sys/contrib/device-tree/Bindings/mfd/ti,am3359-tscadc.yaml
index 23a63265be3c..70b5dfce07d2 100644
--- a/sys/contrib/device-tree/Bindings/mfd/ti,am3359-tscadc.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/ti,am3359-tscadc.yaml
@@ -61,8 +61,6 @@ required:
- interrupts
- clocks
- clock-names
- - dmas
- - dma-names
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/mfd/ti,lp87524-q1.yaml b/sys/contrib/device-tree/Bindings/mfd/ti,lp87524-q1.yaml
index f6cac4b1079c..ae149eb8593d 100644
--- a/sys/contrib/device-tree/Bindings/mfd/ti,lp87524-q1.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/ti,lp87524-q1.yaml
@@ -37,6 +37,7 @@ properties:
"^buck[0123]$":
type: object
$ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
required:
- buck0
diff --git a/sys/contrib/device-tree/Bindings/mfd/ti,lp87561-q1.yaml b/sys/contrib/device-tree/Bindings/mfd/ti,lp87561-q1.yaml
index dc5a29b5ef7d..5167d6eb904a 100644
--- a/sys/contrib/device-tree/Bindings/mfd/ti,lp87561-q1.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/ti,lp87561-q1.yaml
@@ -41,6 +41,7 @@ properties:
buck3210:
type: object
$ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
required:
- buck3210
diff --git a/sys/contrib/device-tree/Bindings/mfd/ti,lp87565-q1.yaml b/sys/contrib/device-tree/Bindings/mfd/ti,lp87565-q1.yaml
index 012d25111054..eca430edf608 100644
--- a/sys/contrib/device-tree/Bindings/mfd/ti,lp87565-q1.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/ti,lp87565-q1.yaml
@@ -47,6 +47,7 @@ properties:
"^buck(10|23)$":
type: object
$ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
required:
- buck10
diff --git a/sys/contrib/device-tree/Bindings/mfd/ti,twl.yaml b/sys/contrib/device-tree/Bindings/mfd/ti,twl.yaml
new file mode 100644
index 000000000000..c04d57ba22b4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mfd/ti,twl.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,twl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TWL family
+
+maintainers:
+ - Andreas Kemnade <andreas@kemnade.info>
+
+description: |
+ The TWLs are Integrated Power Management Chips.
+ Some version might contain much more analog function like
+ USB transceiver or Audio amplifier.
+ These chips are connected to an i2c bus.
+
+properties:
+ compatible:
+ description:
+ TWL4030 for integrated power-management/audio CODEC device used in OMAP3
+ based boards
+ TWL6030/32 for integrated power-management used in OMAP4 based boards
+ enum:
+ - ti,twl4030
+ - ti,twl6030
+ - ti,twl6032
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 1
+
+ "#clock-cells":
+ const: 1
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-controller
+ - "#interrupt-cells"
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@48 {
+ compatible = "ti,twl6030";
+ reg = <0x48>;
+ interrupts = <39>; /* IRQ_SYS_1N cascaded to gic */
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ };
+ };
+
diff --git a/sys/contrib/device-tree/Bindings/mfd/x-powers,axp152.yaml b/sys/contrib/device-tree/Bindings/mfd/x-powers,axp152.yaml
index 9ad55746133b..06f1779835a1 100644
--- a/sys/contrib/device-tree/Bindings/mfd/x-powers,axp152.yaml
+++ b/sys/contrib/device-tree/Bindings/mfd/x-powers,axp152.yaml
@@ -67,7 +67,10 @@ allOf:
properties:
compatible:
contains:
- const: x-powers,axp305
+ enum:
+ - x-powers,axp15060
+ - x-powers,axp305
+ - x-powers,axp313a
then:
required:
diff --git a/sys/contrib/device-tree/Bindings/mips/loongson/ls2k-reset.yaml b/sys/contrib/device-tree/Bindings/mips/loongson/ls2k-reset.yaml
index 20b5836efd90..358ac8cd4d1d 100644
--- a/sys/contrib/device-tree/Bindings/mips/loongson/ls2k-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/mips/loongson/ls2k-reset.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/mips/loongson/ls2k-reset.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/mips/loongson/ls2k-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Loongson 2K1000 PM Controller
diff --git a/sys/contrib/device-tree/Bindings/mips/loongson/rs780e-acpi.yaml b/sys/contrib/device-tree/Bindings/mips/loongson/rs780e-acpi.yaml
index 7c0f9022202c..3e3a3705e879 100644
--- a/sys/contrib/device-tree/Bindings/mips/loongson/rs780e-acpi.yaml
+++ b/sys/contrib/device-tree/Bindings/mips/loongson/rs780e-acpi.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/mips/loongson/rs780e-acpi.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/mips/loongson/rs780e-acpi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Loongson RS780E PCH ACPI Controller
diff --git a/sys/contrib/device-tree/Bindings/misc/fsl,dpaa2-console.yaml b/sys/contrib/device-tree/Bindings/misc/fsl,dpaa2-console.yaml
index 8cc951feb7df..59b83ea5e05e 100644
--- a/sys/contrib/device-tree/Bindings/misc/fsl,dpaa2-console.yaml
+++ b/sys/contrib/device-tree/Bindings/misc/fsl,dpaa2-console.yaml
@@ -12,7 +12,7 @@ maintainers:
properties:
compatible:
- const: "fsl,dpaa2-console"
+ const: fsl,dpaa2-console
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/misc/intel,ixp4xx-ahb-queue-manager.yaml b/sys/contrib/device-tree/Bindings/misc/intel,ixp4xx-ahb-queue-manager.yaml
index 38ab0499102d..36a9dbdf3f03 100644
--- a/sys/contrib/device-tree/Bindings/misc/intel,ixp4xx-ahb-queue-manager.yaml
+++ b/sys/contrib/device-tree/Bindings/misc/intel,ixp4xx-ahb-queue-manager.yaml
@@ -2,8 +2,8 @@
# Copyright 2019 Linaro Ltd.
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/misc/intel,ixp4xx-ahb-queue-manager.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/misc/intel,ixp4xx-ahb-queue-manager.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel IXP4xx AHB Queue Manager
diff --git a/sys/contrib/device-tree/Bindings/mmc/arasan,sdhci.yaml b/sys/contrib/device-tree/Bindings/mmc/arasan,sdhci.yaml
index a6c19a6cc99e..9075add020bf 100644
--- a/sys/contrib/device-tree/Bindings/mmc/arasan,sdhci.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/arasan,sdhci.yaml
@@ -160,6 +160,12 @@ properties:
description:
The MIO bank number in which the command and data lines are configured.
+ iommus:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
dependencies:
'#clock-cells': [ clock-output-names ]
@@ -220,8 +226,8 @@ examples:
interrupt-parent = <&gic>;
interrupts = <0 48 4>;
reg = <0xff160000 0x1000>;
- clocks = <&clk200>, <&clk200>;
- clock-names = "clk_xin", "clk_ahb";
+ clocks = <&clk200>, <&clk200>, <&clk1200>;
+ clock-names = "clk_xin", "clk_ahb", "gate";
clock-output-names = "clk_out_sd0", "clk_in_sd0";
#clock-cells = <1>;
clk-phase-sd-hs = <63>, <72>;
@@ -233,8 +239,8 @@ examples:
interrupt-parent = <&gic>;
interrupts = <0 126 4>;
reg = <0xf1040000 0x10000>;
- clocks = <&clk200>, <&clk200>;
- clock-names = "clk_xin", "clk_ahb";
+ clocks = <&clk200>, <&clk200>, <&clk1200>;
+ clock-names = "clk_xin", "clk_ahb", "gate";
clock-output-names = "clk_out_sd0", "clk_in_sd0";
#clock-cells = <1>;
clk-phase-sd-hs = <132>, <60>;
diff --git a/sys/contrib/device-tree/Bindings/mmc/arm,pl18x.yaml b/sys/contrib/device-tree/Bindings/mmc/arm,pl18x.yaml
index 2459a55ed540..940b12688167 100644
--- a/sys/contrib/device-tree/Bindings/mmc/arm,pl18x.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/arm,pl18x.yaml
@@ -203,7 +203,7 @@ examples:
bus-width = <4>;
cap-sd-highspeed;
cap-mmc-highspeed;
- cd-gpios = <&gpio2 31 0x4>;
+ cd-gpios = <&gpio2 31 0x4>;
st,sig-dir-dat0;
st,sig-dir-dat2;
st,sig-dir-cmd;
diff --git a/sys/contrib/device-tree/Bindings/mmc/brcm,sdhci-brcmstb.yaml b/sys/contrib/device-tree/Bindings/mmc/brcm,sdhci-brcmstb.yaml
index c028039bc477..cbd3d6c6c77f 100644
--- a/sys/contrib/device-tree/Bindings/mmc/brcm,sdhci-brcmstb.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/brcm,sdhci-brcmstb.yaml
@@ -20,10 +20,8 @@ properties:
- const: brcm,sdhci-brcmstb
- items:
- enum:
+ - brcm,bcm74165b0-sdhci
- brcm,bcm7445-sdhci
- - const: brcm,sdhci-brcmstb
- - items:
- - enum:
- brcm,bcm7425-sdhci
- const: brcm,sdhci-brcmstb
diff --git a/sys/contrib/device-tree/Bindings/mmc/marvell,xenon-sdhci.yaml b/sys/contrib/device-tree/Bindings/mmc/marvell,xenon-sdhci.yaml
index 3ee758886558..cfe6237716f4 100644
--- a/sys/contrib/device-tree/Bindings/mmc/marvell,xenon-sdhci.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/marvell,xenon-sdhci.yaml
@@ -27,7 +27,9 @@ properties:
- marvell,armada-ap806-sdhci
- items:
- - const: marvell,armada-ap807-sdhci
+ - enum:
+ - marvell,armada-ap807-sdhci
+ - marvell,ac5-sdhci
- const: marvell,armada-ap806-sdhci
- items:
@@ -71,8 +73,8 @@ properties:
marvell,xenon-phy-type:
$ref: /schemas/types.yaml#/definitions/string
enum:
- - "emmc 5.1 phy"
- - "emmc 5.0 phy"
+ - emmc 5.1 phy
+ - emmc 5.0 phy
description: |
Xenon support multiple types of PHYs. To select eMMC 5.1 PHY, set:
marvell,xenon-phy-type = "emmc 5.1 phy" eMMC 5.1 PHY is the default
diff --git a/sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml b/sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml
index 86c73fd825fd..58ae298cd2fc 100644
--- a/sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml
@@ -269,7 +269,7 @@ properties:
post-power-on-delay-ms:
description:
It was invented for MMC pwrseq-simple which could be referred to
- mmc-pwrseq-simple.txt. But now it\'s reused as a tunable delay
+ mmc-pwrseq-simple.yaml. But now it\'s reused as a tunable delay
waiting for I/O signalling and card power supply to be stable,
regardless of whether pwrseq-simple is used. Default to 10ms if
no available.
diff --git a/sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml b/sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml
index 46eefdd19a2c..c532ec92d2d9 100644
--- a/sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml
@@ -91,16 +91,6 @@ properties:
should switch dat1 pin to GPIO mode.
maxItems: 1
- assigned-clocks:
- description:
- PLL of the source clock.
- maxItems: 1
-
- assigned-clock-parents:
- description:
- parent of source clock, used for HS400 mode to get 400Mhz source clock.
- maxItems: 1
-
hs400-ds-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description:
@@ -155,6 +145,15 @@ properties:
minimum: 0
maximum: 7
+ mediatek,tuning-step:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Some SoCs need extend tuning step for better delay value to avoid CRC issue.
+ If not present, default tuning step is 32. For eMMC and SD, this can yield
+ satisfactory calibration results in most cases.
+ enum: [32, 64]
+ default: 32
+
resets:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/mmc/npcm,sdhci.yaml b/sys/contrib/device-tree/Bindings/mmc/npcm,sdhci.yaml
new file mode 100644
index 000000000000..196fdbfa16ed
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mmc/npcm,sdhci.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/npcm,sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NPCM SDHCI Controller
+
+maintainers:
+ - Tomer Maimon <tmaimon77@gmail.com>
+
+allOf:
+ - $ref: mmc-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-sdhci
+ - nuvoton,npcm845-sdhci
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ mmc@f0840000 {
+ compatible = "nuvoton,npcm750-sdhci";
+ reg = <0xf0840000 0x200>;
+ interrupts = <0 27 4>;
+ clocks = <&clk 4>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/mmc/pxa-mmc.txt b/sys/contrib/device-tree/Bindings/mmc/pxa-mmc.txt
index 5f5c2bec2b8c..66a78eae4dc9 100644
--- a/sys/contrib/device-tree/Bindings/mmc/pxa-mmc.txt
+++ b/sys/contrib/device-tree/Bindings/mmc/pxa-mmc.txt
@@ -9,7 +9,7 @@ Required properties:
Optional properties:
- marvell,detect-delay-ms: sets the detection delay timeout in ms.
-In addition to the properties described in this docuent, the details
+In addition to the properties described in this document, the details
described in mmc.txt are supported.
Examples:
diff --git a/sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml b/sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml
index 7756a8687eaf..f7a4c6bc70f6 100644
--- a/sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml
@@ -56,9 +56,10 @@ properties:
- renesas,sdhi-r8a77980 # R-Car V3H
- renesas,sdhi-r8a77990 # R-Car E3
- renesas,sdhi-r8a77995 # R-Car D3
- - renesas,sdhi-r9a07g043 # RZ/G2UL
+ - renesas,sdhi-r9a07g043 # RZ/G2UL and RZ/Five
- renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
- renesas,sdhi-r9a07g054 # RZ/V2L
+ - renesas,sdhi-r9a08g045 # RZ/G3S
- renesas,sdhi-r9a09g011 # RZ/V2M
- const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
- items:
@@ -122,6 +123,7 @@ allOf:
- renesas,sdhi-r9a07g043
- renesas,sdhi-r9a07g044
- renesas,sdhi-r9a07g054
+ - renesas,sdhi-r9a08g045
- renesas,sdhi-r9a09g011
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/mmc/samsung,exynos-dw-mshc.yaml b/sys/contrib/device-tree/Bindings/mmc/samsung,exynos-dw-mshc.yaml
index 6ee78a38bd74..5fe65795f796 100644
--- a/sys/contrib/device-tree/Bindings/mmc/samsung,exynos-dw-mshc.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/samsung,exynos-dw-mshc.yaml
@@ -14,15 +14,22 @@ maintainers:
properties:
compatible:
- enum:
- - samsung,exynos4210-dw-mshc
- - samsung,exynos4412-dw-mshc
- - samsung,exynos5250-dw-mshc
- - samsung,exynos5420-dw-mshc
- - samsung,exynos5420-dw-mshc-smu
- - samsung,exynos7-dw-mshc
- - samsung,exynos7-dw-mshc-smu
- - axis,artpec8-dw-mshc
+ oneOf:
+ - enum:
+ - axis,artpec8-dw-mshc
+ - samsung,exynos4210-dw-mshc
+ - samsung,exynos4412-dw-mshc
+ - samsung,exynos5250-dw-mshc
+ - samsung,exynos5420-dw-mshc
+ - samsung,exynos5420-dw-mshc-smu
+ - samsung,exynos7-dw-mshc
+ - samsung,exynos7-dw-mshc-smu
+ - items:
+ - enum:
+ - samsung,exynos5433-dw-mshc-smu
+ - samsung,exynos7885-dw-mshc-smu
+ - samsung,exynos850-dw-mshc-smu
+ - const: samsung,exynos7-dw-mshc-smu
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/mmc/sdhci-atmel.txt b/sys/contrib/device-tree/Bindings/mmc/sdhci-atmel.txt
index 69edfd4d3922..a9fb0a91245f 100644
--- a/sys/contrib/device-tree/Bindings/mmc/sdhci-atmel.txt
+++ b/sys/contrib/device-tree/Bindings/mmc/sdhci-atmel.txt
@@ -5,11 +5,13 @@ Documentation/devicetree/bindings/mmc/mmc.txt and the properties used by the
sdhci-of-at91 driver.
Required properties:
-- compatible: Must be "atmel,sama5d2-sdhci" or "microchip,sam9x60-sdhci".
+- compatible: Must be "atmel,sama5d2-sdhci" or "microchip,sam9x60-sdhci"
+ or "microchip,sam9x7-sdhci", "microchip,sam9x60-sdhci".
- clocks: Phandlers to the clocks.
- clock-names: Must be "hclock", "multclk", "baseclk" for
"atmel,sama5d2-sdhci".
Must be "hclock", "multclk" for "microchip,sam9x60-sdhci".
+ Must be "hclock", "multclk" for "microchip,sam9x7-sdhci".
Optional properties:
- assigned-clocks: The same with "multclk".
diff --git a/sys/contrib/device-tree/Bindings/mmc/sdhci-msm.yaml b/sys/contrib/device-tree/Bindings/mmc/sdhci-msm.yaml
index 6da28e630577..c24c537f62b1 100644
--- a/sys/contrib/device-tree/Bindings/mmc/sdhci-msm.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/sdhci-msm.yaml
@@ -22,6 +22,8 @@ properties:
- items:
- enum:
- qcom,apq8084-sdhci
+ - qcom,ipq4019-sdhci
+ - qcom,ipq8074-sdhci
- qcom,msm8226-sdhci
- qcom,msm8953-sdhci
- qcom,msm8974-sdhci
@@ -58,6 +60,7 @@ properties:
- qcom,sm8350-sdhci
- qcom,sm8450-sdhci
- qcom,sm8550-sdhci
+ - qcom,sm8650-sdhci
- const: qcom,sdhci-msm-v5 # for sdcc version 5.0
reg:
@@ -69,7 +72,7 @@ properties:
maxItems: 4
clocks:
- minItems: 3
+ minItems: 2
items:
- description: Main peripheral bus clock, PCLK/HCLK - AHB Bus clock
- description: SDC MMC clock, MCLK
@@ -85,10 +88,10 @@ properties:
- const: iface
- const: core
- const: xo
- - const: ice
- - const: bus
- - const: cal
- - const: sleep
+ - enum: [ice, bus, cal, sleep]
+ - enum: [ice, bus, cal, sleep]
+ - enum: [ice, bus, cal, sleep]
+ - enum: [ice, bus, cal, sleep]
dma-coherent: true
@@ -215,7 +218,7 @@ examples:
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-sm8250.h>
#include <dt-bindings/clock/qcom,rpmh.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
sdhc_2: mmc@8804000 {
compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5";
@@ -232,7 +235,7 @@ examples:
iommus = <&apps_smmu 0x4a0 0x0>;
qcom,dll-config = <0x0007642c>;
qcom,ddr-config = <0x80040868>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&sdhc2_opp_table>;
diff --git a/sys/contrib/device-tree/Bindings/mmc/sdhci-pxa.yaml b/sys/contrib/device-tree/Bindings/mmc/sdhci-pxa.yaml
index 09455f9fa8de..4869ddef36fd 100644
--- a/sys/contrib/device-tree/Bindings/mmc/sdhci-pxa.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/sdhci-pxa.yaml
@@ -18,7 +18,7 @@ allOf:
const: marvell,armada-380-sdhci
then:
properties:
- regs:
+ reg:
minItems: 3
reg-names:
minItems: 3
@@ -26,7 +26,7 @@ allOf:
- reg-names
else:
properties:
- regs:
+ reg:
maxItems: 1
reg-names:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/mmc/snps,dwcmshc-sdhci.yaml b/sys/contrib/device-tree/Bindings/mmc/snps,dwcmshc-sdhci.yaml
index a43eb837f8da..42804d955293 100644
--- a/sys/contrib/device-tree/Bindings/mmc/snps,dwcmshc-sdhci.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/snps,dwcmshc-sdhci.yaml
@@ -19,6 +19,7 @@ properties:
- rockchip,rk3568-dwcmshc
- rockchip,rk3588-dwcmshc
- snps,dwcmshc-sdhci
+ - thead,th1520-dwcmshc
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/mmc/starfive,jh7110-mmc.yaml b/sys/contrib/device-tree/Bindings/mmc/starfive,jh7110-mmc.yaml
index 51e1b04e799f..553a75195c2e 100644
--- a/sys/contrib/device-tree/Bindings/mmc/starfive,jh7110-mmc.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/starfive,jh7110-mmc.yaml
@@ -55,7 +55,6 @@ required:
- clocks
- clock-names
- interrupts
- - starfive,sysreg
unevaluatedProperties: false
@@ -73,5 +72,4 @@ examples:
fifo-depth = <32>;
fifo-watermark-aligned;
data-addr = <0>;
- starfive,sysreg = <&sys_syscon 0x14 0x1a 0x7c000000>;
};
diff --git a/sys/contrib/device-tree/Bindings/mmc/synopsys-dw-mshc.yaml b/sys/contrib/device-tree/Bindings/mmc/synopsys-dw-mshc.yaml
index b13b5166d20a..a6292777e376 100644
--- a/sys/contrib/device-tree/Bindings/mmc/synopsys-dw-mshc.yaml
+++ b/sys/contrib/device-tree/Bindings/mmc/synopsys-dw-mshc.yaml
@@ -35,6 +35,9 @@ properties:
- const: biu
- const: ciu
+ iommus:
+ maxItems: 1
+
altr,sysmgr-syscon:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
@@ -62,6 +65,7 @@ allOf:
altr,sysmgr-syscon: true
else:
properties:
+ iommus: false
altr,sysmgr-syscon: false
required:
diff --git a/sys/contrib/device-tree/Bindings/mmc/ti-omap-hsmmc.txt b/sys/contrib/device-tree/Bindings/mmc/ti-omap-hsmmc.txt
index 57d077c0b7c1..7a0e9dcdc444 100644
--- a/sys/contrib/device-tree/Bindings/mmc/ti-omap-hsmmc.txt
+++ b/sys/contrib/device-tree/Bindings/mmc/ti-omap-hsmmc.txt
@@ -95,7 +95,7 @@ while in suspend.
| card | -- CIRQ --> | hsmmc | -- IRQ --> | CPU |
------ ------- -----
-In suspend the fclk is off and the module is disfunctional. Even register reads
+In suspend the fclk is off and the module is dysfunctional. Even register reads
will fail. A small logic in the host will request fclk restore, when an
external event is detected. Once the clock is restored, the host detects the
event normally. Since am33xx doesn't have this line it never wakes from
diff --git a/sys/contrib/device-tree/Bindings/mtd/amlogic,meson-nand.yaml b/sys/contrib/device-tree/Bindings/mtd/amlogic,meson-nand.yaml
index 787ef488dd5b..57b6957c8415 100644
--- a/sys/contrib/device-tree/Bindings/mtd/amlogic,meson-nand.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/amlogic,meson-nand.yaml
@@ -50,7 +50,7 @@ patternProperties:
const: hw
nand-ecc-step-size:
- const: 1024
+ enum: [512, 1024]
nand-ecc-strength:
enum: [8, 16, 24, 30, 40, 50, 60]
@@ -66,6 +66,10 @@ patternProperties:
unevaluatedProperties: false
+ dependencies:
+ nand-ecc-strength: [nand-ecc-step-size]
+ nand-ecc-step-size: [nand-ecc-strength]
+
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/mtd/jedec,spi-nor.yaml b/sys/contrib/device-tree/Bindings/mtd/jedec,spi-nor.yaml
index 89959e5c47ba..58f0cea160ef 100644
--- a/sys/contrib/device-tree/Bindings/mtd/jedec,spi-nor.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/jedec,spi-nor.yaml
@@ -43,8 +43,10 @@ properties:
- const: jedec,spi-nor
- const: jedec,spi-nor
description:
- Must also include "jedec,spi-nor" for any SPI NOR flash that can be
- identified by the JEDEC READ ID opcode (0x9F).
+ SPI NOR flashes compatible with the JEDEC SFDP standard or which may be
+ identified with the READ ID opcode (0x9F) do not deserve a specific
+ compatible. They should instead only be matched against the generic
+ "jedec,spi-nor" compatible.
reg:
minItems: 1
@@ -70,6 +72,21 @@ properties:
be used on such systems, to denote the absence of a reliable reset
mechanism.
+ no-wp:
+ type: boolean
+ description:
+ The status register write disable (SRWD) bit in status register, combined
+ with the WP# signal, provides hardware data protection for the device. When
+ the SRWD bit is set to 1, and the WP# signal is either driven LOW or hard
+ strapped to LOW, the status register nonvolatile bits become read-only and
+ the WRITE STATUS REGISTER operation will not execute. The only way to exit
+ this hardware-protected mode is to drive WP# HIGH. If the WP# signal of the
+ flash device is not connected or is wrongly tied to GND (that includes internal
+ pull-downs) then status register permanently becomes read-only as the SRWD bit
+ cannot be reset. This boolean flag can be used on such systems to avoid setting
+ the SRWD bit while writing the status register. WP# signal hard strapped to GND
+ can be a valid use case.
+
reset-gpios:
description:
A GPIO line connected to the RESET (active low) signal of the device.
diff --git a/sys/contrib/device-tree/Bindings/mtd/marvell,nand-controller.yaml b/sys/contrib/device-tree/Bindings/mtd/marvell,nand-controller.yaml
index a10729bb1840..1ecea848e8b9 100644
--- a/sys/contrib/device-tree/Bindings/mtd/marvell,nand-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/marvell,nand-controller.yaml
@@ -16,6 +16,7 @@ properties:
- const: marvell,armada-8k-nand-controller
- const: marvell,armada370-nand-controller
- enum:
+ - marvell,ac5-nand-controller
- marvell,armada370-nand-controller
- marvell,pxa3xx-nand-controller
- description: legacy bindings
diff --git a/sys/contrib/device-tree/Bindings/mtd/microchip,mchp48l640.yaml b/sys/contrib/device-tree/Bindings/mtd/microchip,mchp48l640.yaml
index 00882892f47e..0ff32bd00bf6 100644
--- a/sys/contrib/device-tree/Bindings/mtd/microchip,mchp48l640.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/microchip,mchp48l640.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/mtd/microchip,mchp48l640.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/mtd/microchip,mchp48l640.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip 48l640 (and similar) serial EERAM
diff --git a/sys/contrib/device-tree/Bindings/mtd/mtd.yaml b/sys/contrib/device-tree/Bindings/mtd/mtd.yaml
index b82ca03e969c..f322290ee516 100644
--- a/sys/contrib/device-tree/Bindings/mtd/mtd.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/mtd.yaml
@@ -43,7 +43,12 @@ patternProperties:
deprecated: true
"^otp(-[0-9]+)?$":
- $ref: ../nvmem/nvmem.yaml#
+ type: object
+
+ allOf:
+ - $ref: ../nvmem/nvmem.yaml#
+ - $ref: ../nvmem/nvmem-deprecated-cells.yaml#
+
unevaluatedProperties: false
description: |
diff --git a/sys/contrib/device-tree/Bindings/mtd/nand-controller.yaml b/sys/contrib/device-tree/Bindings/mtd/nand-controller.yaml
index 83a4fe4cc29d..28167c0cf271 100644
--- a/sys/contrib/device-tree/Bindings/mtd/nand-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/nand-controller.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mtd/nand-controller.yaml#
diff --git a/sys/contrib/device-tree/Bindings/mtd/partitions/fixed-partitions.yaml b/sys/contrib/device-tree/Bindings/mtd/partitions/fixed-partitions.yaml
index 331e564f29dc..058253d6d889 100644
--- a/sys/contrib/device-tree/Bindings/mtd/partitions/fixed-partitions.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/partitions/fixed-partitions.yaml
@@ -29,6 +29,24 @@ properties:
"#size-cells": true
+ compression:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: |
+ Compression algorithm used to store the data in this partition, chosen
+ from a list of well-known algorithms.
+
+ The contents are compressed using this algorithm.
+
+ enum:
+ - none
+ - bzip2
+ - gzip
+ - lzop
+ - lz4
+ - lzma
+ - xz
+ - zstd
+
patternProperties:
"@[0-9a-f]+$":
$ref: partition.yaml#
@@ -64,6 +82,7 @@ examples:
uimage@100000 {
reg = <0x0100000 0x200000>;
+ compress = "lzma";
};
};
diff --git a/sys/contrib/device-tree/Bindings/mtd/partitions/nvmem-cells.yaml b/sys/contrib/device-tree/Bindings/mtd/partitions/nvmem-cells.yaml
index 5474d63268dc..9518281007af 100644
--- a/sys/contrib/device-tree/Bindings/mtd/partitions/nvmem-cells.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/partitions/nvmem-cells.yaml
@@ -19,6 +19,7 @@ maintainers:
allOf:
- $ref: /schemas/mtd/partitions/partition.yaml#
- $ref: /schemas/nvmem/nvmem.yaml#
+ - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/mtd/partitions/seama.yaml b/sys/contrib/device-tree/Bindings/mtd/partitions/seama.yaml
new file mode 100644
index 000000000000..4c1cbf43e81a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/mtd/partitions/seama.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Seattle Image Partitions
+
+description: The SEAttle iMAge (SEAMA) partition is a type of partition
+ used for NAND flash devices. This type of flash image is found in some
+ D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
+ DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
+ (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
+ does not have children defined in the device tree, they need to be
+ detected by software.
+
+allOf:
+ - $ref: partition.yaml#
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+ compatible:
+ const: seama
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ compatible = "seama";
+ reg = <0x0 0x800000>;
+ label = "firmware";
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/mtd/partitions/u-boot.yaml b/sys/contrib/device-tree/Bindings/mtd/partitions/u-boot.yaml
index 3c56efe48efd..327fa872c001 100644
--- a/sys/contrib/device-tree/Bindings/mtd/partitions/u-boot.yaml
+++ b/sys/contrib/device-tree/Bindings/mtd/partitions/u-boot.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: U-Boot bootloader partition
description: |
- U-Boot is a bootlodaer commonly used in embedded devices. It's almost always
+ U-Boot is a bootloader commonly used in embedded devices. It's almost always
located on some kind of flash device.
Device configuration is stored as a set of environment variables that are
diff --git a/sys/contrib/device-tree/Bindings/net/allwinner,sun8i-a83t-emac.yaml b/sys/contrib/device-tree/Bindings/net/allwinner,sun8i-a83t-emac.yaml
index 4bfac9186886..7fe0352dff0f 100644
--- a/sys/contrib/device-tree/Bindings/net/allwinner,sun8i-a83t-emac.yaml
+++ b/sys/contrib/device-tree/Bindings/net/allwinner,sun8i-a83t-emac.yaml
@@ -158,6 +158,8 @@ allOf:
patternProperties:
"^ethernet-phy@[0-9a-f]$":
type: object
+ $ref: ethernet-phy.yaml#
+ unevaluatedProperties: false
description:
Integrated PHY node
diff --git a/sys/contrib/device-tree/Bindings/net/bluetooth/qualcomm-bluetooth.yaml b/sys/contrib/device-tree/Bindings/net/bluetooth/qualcomm-bluetooth.yaml
index 56cbb42b5aea..eba2f3026ab0 100644
--- a/sys/contrib/device-tree/Bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/sys/contrib/device-tree/Bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -19,12 +19,14 @@ properties:
- qcom,qca2066-bt
- qcom,qca6174-bt
- qcom,qca9377-bt
+ - qcom,wcn3988-bt
- qcom,wcn3990-bt
- qcom,wcn3991-bt
- qcom,wcn3998-bt
- qcom,qca6390-bt
- qcom,wcn6750-bt
- qcom,wcn6855-bt
+ - qcom,wcn7850-bt
enable-gpios:
maxItems: 1
@@ -57,6 +59,9 @@ properties:
vddaon-supply:
description: VDD_AON supply regulator handle
+ vdddig-supply:
+ description: VDD_DIG supply regulator handle
+
vddbtcxmx-supply:
description: VDD_BT_CXMX supply regulator handle
@@ -72,6 +77,9 @@ properties:
vddrfa1p2-supply:
description: VDD_RFA_1P2 supply regulator handle
+ vddrfa1p9-supply:
+ description: VDD_RFA_1P9 supply regulator handle
+
vddrfa2p2-supply:
description: VDD_RFA_2P2 supply regulator handle
@@ -111,6 +119,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,wcn3988-bt
- qcom,wcn3990-bt
- qcom,wcn3991-bt
- qcom,wcn3998-bt
@@ -155,6 +164,22 @@ allOf:
- vddrfa0p8-supply
- vddrfa1p2-supply
- vddrfa1p7-supply
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,wcn7850-bt
+ then:
+ required:
+ - enable-gpios
+ - swctrl-gpios
+ - vddio-supply
+ - vddaon-supply
+ - vdddig-supply
+ - vddrfa0p8-supply
+ - vddrfa1p2-supply
+ - vddrfa1p9-supply
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/net/brcm,asp-v2.0.yaml b/sys/contrib/device-tree/Bindings/net/brcm,asp-v2.0.yaml
new file mode 100644
index 000000000000..75d8138298fb
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/brcm,asp-v2.0.yaml
@@ -0,0 +1,155 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/brcm,asp-v2.0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom ASP 2.0 Ethernet controller
+
+maintainers:
+ - Justin Chen <justin.chen@broadcom.com>
+ - Florian Fainelli <florian.fainelli@broadcom.com>
+
+description: Broadcom Ethernet controller first introduced with 72165
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - brcm,bcm74165-asp
+ - const: brcm,asp-v2.1
+ - items:
+ - enum:
+ - brcm,bcm72165-asp
+ - const: brcm,asp-v2.0
+
+ "#address-cells":
+ const: 1
+ "#size-cells":
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ ranges: true
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: RX/TX interrupt
+ - description: Port 0 Wake-on-LAN
+ - description: Port 1 Wake-on-LAN
+
+ clocks:
+ maxItems: 1
+
+ ethernet-ports:
+ type: object
+ properties:
+ "#address-cells":
+ const: 1
+ "#size-cells":
+ const: 0
+
+ patternProperties:
+ "^port@[0-9a-f]+$":
+ type: object
+
+ $ref: ethernet-controller.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ maxItems: 1
+ description: Port number
+
+ brcm,channel:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ ASP Channel Number
+
+ The depacketizer channel that consumes packets from
+ the unimac/port.
+
+ required:
+ - reg
+ - brcm,channel
+
+ additionalProperties: false
+
+patternProperties:
+ "^mdio@[0-9a-f]+$":
+ type: object
+ $ref: brcm,unimac-mdio.yaml
+
+ description:
+ ASP internal UniMAC MDIO bus
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - ranges
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ ethernet@9c00000 {
+ compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0";
+ reg = <0x9c00000 0x1fff14>;
+ interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+ ranges = <0x0 0x9c00000 0x1fff14>;
+ clocks = <&scmi 14>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ mdio@c614 {
+ compatible = "brcm,asp-v2.0-mdio";
+ reg = <0xc614 0x8>;
+ reg-names = "mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy0: ethernet-phy@1 {
+ reg = <1>;
+ };
+ };
+
+ mdio@ce14 {
+ compatible = "brcm,asp-v2.0-mdio";
+ reg = <0xce14 0x8>;
+ reg-names = "mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy1: ethernet-phy@1 {
+ reg = <1>;
+ };
+ };
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ brcm,channel = <8>;
+ phy-mode = "rgmii";
+ phy-handle = <&phy0>;
+ };
+
+ port@1 {
+ reg = <1>;
+ brcm,channel = <9>;
+ phy-mode = "rgmii";
+ phy-handle = <&phy1>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/brcm,bcm7445-switch-v4.0.txt b/sys/contrib/device-tree/Bindings/net/brcm,bcm7445-switch-v4.0.txt
index d0935d2afef8..284cddb3118e 100644
--- a/sys/contrib/device-tree/Bindings/net/brcm,bcm7445-switch-v4.0.txt
+++ b/sys/contrib/device-tree/Bindings/net/brcm,bcm7445-switch-v4.0.txt
@@ -1,4 +1,4 @@
-* Broadcom Starfighter 2 integrated swich
+* Broadcom Starfighter 2 integrated switch
See dsa/brcm,bcm7445-switch-v4.0.yaml for the documentation.
diff --git a/sys/contrib/device-tree/Bindings/net/brcm,unimac-mdio.yaml b/sys/contrib/device-tree/Bindings/net/brcm,unimac-mdio.yaml
index 0be426ee1e44..6684810fcbf0 100644
--- a/sys/contrib/device-tree/Bindings/net/brcm,unimac-mdio.yaml
+++ b/sys/contrib/device-tree/Bindings/net/brcm,unimac-mdio.yaml
@@ -22,6 +22,8 @@ properties:
- brcm,genet-mdio-v3
- brcm,genet-mdio-v4
- brcm,genet-mdio-v5
+ - brcm,asp-v2.0-mdio
+ - brcm,asp-v2.1-mdio
- brcm,unimac-mdio
reg:
diff --git a/sys/contrib/device-tree/Bindings/net/can/allwinner,sun4i-a10-can.yaml b/sys/contrib/device-tree/Bindings/net/can/allwinner,sun4i-a10-can.yaml
index 9c494957a07a..e42ea28d6ab4 100644
--- a/sys/contrib/device-tree/Bindings/net/can/allwinner,sun4i-a10-can.yaml
+++ b/sys/contrib/device-tree/Bindings/net/can/allwinner,sun4i-a10-can.yaml
@@ -21,6 +21,7 @@ properties:
- const: allwinner,sun4i-a10-can
- const: allwinner,sun4i-a10-can
- const: allwinner,sun8i-r40-can
+ - const: allwinner,sun20i-d1-can
reg:
maxItems: 1
@@ -37,8 +38,9 @@ properties:
if:
properties:
compatible:
- contains:
- const: allwinner,sun8i-r40-can
+ enum:
+ - allwinner,sun8i-r40-can
+ - allwinner,sun20i-d1-can
then:
required:
diff --git a/sys/contrib/device-tree/Bindings/net/can/bosch,m_can.yaml b/sys/contrib/device-tree/Bindings/net/can/bosch,m_can.yaml
index 67879aab623b..f9ffb963d6b1 100644
--- a/sys/contrib/device-tree/Bindings/net/can/bosch,m_can.yaml
+++ b/sys/contrib/device-tree/Bindings/net/can/bosch,m_can.yaml
@@ -122,16 +122,15 @@ required:
- compatible
- reg
- reg-names
- - interrupts
- - interrupt-names
- clocks
- clock-names
- bosch,mram-cfg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
+ // Example with interrupts
#include <dt-bindings/clock/imx6sx-clock.h>
can@20e8000 {
compatible = "bosch,m_can";
@@ -149,4 +148,21 @@ examples:
};
};
+ - |
+ // Example with timer polling
+ #include <dt-bindings/clock/imx6sx-clock.h>
+ can@20e8000 {
+ compatible = "bosch,m_can";
+ reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;
+ reg-names = "m_can", "message_ram";
+ clocks = <&clks IMX6SX_CLK_CANFD>,
+ <&clks IMX6SX_CLK_CANFD>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;
+
+ can-transceiver {
+ max-bitrate = <5000000>;
+ };
+ };
+
...
diff --git a/sys/contrib/device-tree/Bindings/net/can/cc770.txt b/sys/contrib/device-tree/Bindings/net/can/cc770.txt
index 77027bf6460a..042200cf4419 100644
--- a/sys/contrib/device-tree/Bindings/net/can/cc770.txt
+++ b/sys/contrib/device-tree/Bindings/net/can/cc770.txt
@@ -26,7 +26,7 @@ Optional properties:
will be disabled.
- bosch,slew-rate : slew rate of the CLKOUT signal. If not specified,
- a resonable value will be calculated.
+ a reasonable value will be calculated.
- bosch,disconnect-rx0-input : see data sheet.
diff --git a/sys/contrib/device-tree/Bindings/net/can/tcan4x5x.txt b/sys/contrib/device-tree/Bindings/net/can/tcan4x5x.txt
index e3501bfa22e9..170e23f0610d 100644
--- a/sys/contrib/device-tree/Bindings/net/can/tcan4x5x.txt
+++ b/sys/contrib/device-tree/Bindings/net/can/tcan4x5x.txt
@@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller
This file provides device node information for the TCAN4x5x interface contains.
Required properties:
- - compatible: "ti,tcan4x5x"
+ - compatible:
+ "ti,tcan4552", "ti,tcan4x5x"
+ "ti,tcan4553", "ti,tcan4x5x" or
+ "ti,tcan4x5x"
- reg: 0
- #address-cells: 1
- #size-cells: 0
@@ -21,8 +24,10 @@ Optional properties:
- reset-gpios: Hardwired output GPIO. If not defined then software
reset.
- device-state-gpios: Input GPIO that indicates if the device is in
- a sleep state or if the device is active.
- - device-wake-gpios: Wake up GPIO to wake up the TCAN device.
+ a sleep state or if the device is active. Not
+ available with tcan4552/4553.
+ - device-wake-gpios: Wake up GPIO to wake up the TCAN device. Not
+ available with tcan4552/4553.
Example:
tcan4x5x: tcan4x5x@0 {
diff --git a/sys/contrib/device-tree/Bindings/net/can/xilinx,can.yaml b/sys/contrib/device-tree/Bindings/net/can/xilinx,can.yaml
index 897d2cbda45b..64d57c343e6f 100644
--- a/sys/contrib/device-tree/Bindings/net/can/xilinx,can.yaml
+++ b/sys/contrib/device-tree/Bindings/net/can/xilinx,can.yaml
@@ -46,6 +46,9 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description: CAN Tx mailbox buffer count (CAN FD)
+ resets:
+ maxItems: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/net/davicom,dm9000.yaml b/sys/contrib/device-tree/Bindings/net/davicom,dm9000.yaml
new file mode 100644
index 000000000000..66a7c6eec767
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/davicom,dm9000.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/davicom,dm9000.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Davicom DM9000 Fast Ethernet Controller
+
+maintainers:
+ - Paul Cercueil <paul@crapouillou.net>
+
+properties:
+ compatible:
+ const: davicom,dm9000
+
+ reg:
+ items:
+ - description: Address registers
+ - description: Data registers
+
+ interrupts:
+ maxItems: 1
+
+ davicom,no-eeprom:
+ type: boolean
+ description: Configuration EEPROM is not available
+
+ davicom,ext-phy:
+ type: boolean
+ description: Use external PHY
+
+ reset-gpios:
+ maxItems: 1
+
+ vcc-supply: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+allOf:
+ - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
+ - $ref: /schemas/net/ethernet-controller.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ ethernet@a8000000 {
+ compatible = "davicom,dm9000";
+ reg = <0xa8000000 0x2>, <0xa8000002 0x2>;
+ interrupt-parent = <&gph1>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+ local-mac-address = [00 00 de ad be ef];
+ davicom,no-eeprom;
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml b/sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml
index c745407f2f68..f21bdd0f408d 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/net/dsa/brcm,sf2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Broadcom Starfighter 2 integrated swich
+title: Broadcom Starfighter 2 integrated switch
maintainers:
- Florian Fainelli <f.fainelli@gmail.com>
@@ -78,6 +78,7 @@ properties:
ports:
type: object
+ additionalProperties: true
patternProperties:
'^port@[0-9a-f]$':
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml b/sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml
index 8d971813bab6..2abd036578d1 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml
@@ -36,23 +36,20 @@ additionalProperties: true
$defs:
ethernet-ports:
description: A DSA switch without any extra port properties
- $ref: '#/'
+ $ref: '#'
patternProperties:
"^(ethernet-)?ports$":
- type: object
- additionalProperties: false
-
- properties:
- '#address-cells':
- const: 1
- '#size-cells':
- const: 0
-
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-9a-f]+$":
description: Ethernet switch ports
$ref: dsa-port.yaml#
unevaluatedProperties: false
+oneOf:
+ - required:
+ - ports
+ - required:
+ - ethernet-ports
+
...
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6060.yaml b/sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6060.yaml
new file mode 100644
index 000000000000..4f1adf00431a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6060.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6060.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MV88E6060 DSA switch
+
+maintainers:
+ - Andrew Lunn <andrew@lunn.ch>
+
+description:
+ The Marvell MV88E6060 switch has been produced and sold by Marvell
+ since at least 2008. The switch has one pin ADDR4 that controls the
+ MDIO address of the switch to be 0x10 or 0x00, and on the MDIO bus
+ connected to the switch, the PHYs inside the switch appear as
+ independent devices on address 0x00-0x04 or 0x10-0x14, so in difference
+ from many other DSA switches this switch does not have an internal
+ MDIO bus for the PHY devices.
+
+properties:
+ compatible:
+ const: marvell,mv88e6060
+ description:
+ The MV88E6060 is the oldest Marvell DSA switch product, and
+ as such a bit limited in features compared to later hardware.
+
+ reg:
+ maxItems: 1
+
+ reset-gpios:
+ description:
+ GPIO to be used to reset the whole device
+ maxItems: 1
+
+allOf:
+ - $ref: dsa.yaml#/$defs/ethernet-ports
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-switch@16 {
+ compatible = "marvell,mv88e6060";
+ reg = <16>;
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-port@0 {
+ reg = <0>;
+ label = "lan1";
+ };
+ ethernet-port@1 {
+ reg = <1>;
+ label = "lan2";
+ };
+ ethernet-port@2 {
+ reg = <2>;
+ label = "lan3";
+ };
+ ethernet-port@3 {
+ reg = <3>;
+ label = "lan4";
+ };
+ ethernet-port@5 {
+ reg = <5>;
+ phy-mode = "rev-mii";
+ ethernet = <&ethc>;
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6xxx.yaml b/sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6xxx.yaml
new file mode 100644
index 000000000000..19f15bdd1c97
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/dsa/marvell,mv88e6xxx.yaml
@@ -0,0 +1,337 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MV88E6xxx DSA switch family
+
+maintainers:
+ - Andrew Lunn <andrew@lunn.ch>
+
+description:
+ The Marvell MV88E6xxx switch series has been produced and sold
+ by Marvell since at least 2008. The switch has a few compatibles which
+ just indicate the base address of the switch, then operating systems
+ can investigate switch ID registers to find out which actual version
+ of the switch it is dealing with.
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - marvell,mv88e6085
+ - marvell,mv88e6190
+ - marvell,mv88e6250
+ description: |
+ marvell,mv88e6085: This switch uses base address 0x10.
+ This switch and its siblings will be autodetected from
+ ID registers found in the switch, so only "marvell,mv88e6085" should be
+ specified. This includes the following list of MV88Exxxx switches:
+ 6085, 6095, 6097, 6123, 6131, 6141, 6161, 6165, 6171, 6172, 6175, 6176,
+ 6185, 6240, 6320, 6321, 6341, 6350, 6351, 6352
+ marvell,mv88e6190: This switch uses base address 0x00.
+ This switch and its siblings will be autodetected from
+ ID registers found in the switch, so only "marvell,mv88e6190" should be
+ specified. This includes the following list of MV88Exxxx switches:
+ 6190, 6190X, 6191, 6290, 6361, 6390, 6390X
+ marvell,mv88e6250: This switch uses base address 0x08 or 0x18.
+ This switch and its siblings will be autodetected from
+ ID registers found in the switch, so only "marvell,mv88e6250" should be
+ specified. This includes the following list of MV88Exxxx switches:
+ 6220, 6250
+ - items:
+ - const: marvell,turris-mox-mv88e6085
+ - const: marvell,mv88e6085
+ - items:
+ - const: marvell,turris-mox-mv88e6190
+ - const: marvell,mv88e6190
+
+ reg:
+ maxItems: 1
+
+ eeprom-length:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Set to the length of an EEPROM connected to the switch. Must be
+ set if the switch can not detect the presence and/or size of a connected
+ EEPROM, otherwise optional.
+
+ reset-gpios:
+ description:
+ GPIO to be used to reset the whole device
+ maxItems: 1
+
+ interrupts:
+ description: The switch provides an external interrupt line, but it is
+ not always used by target systems.
+ maxItems: 1
+
+ interrupt-controller:
+ description: The switch has an internal interrupt controller used by
+ the different sub-blocks.
+
+ '#interrupt-cells':
+ description: The internal interrupt controller only supports triggering
+ on active high level interrupts so the second cell must alway be set to
+ IRQ_TYPE_LEVEL_HIGH.
+ const: 2
+
+ mdio:
+ $ref: /schemas/net/mdio.yaml#
+ unevaluatedProperties: false
+ description: Marvell MV88E6xxx switches have an varying combination of
+ internal and external MDIO buses, in some cases a combined bus that
+ can be used both internally and externally. This node is for the
+ primary bus, used internally and sometimes also externally.
+
+ mdio-external:
+ $ref: /schemas/net/mdio.yaml#
+ unevaluatedProperties: false
+ description: Marvell MV88E6xxx switches that have a separate external
+ MDIO bus use this port to access external components on the MDIO bus.
+
+ properties:
+ compatible:
+ const: marvell,mv88e6xxx-mdio-external
+
+ required:
+ - compatible
+
+allOf:
+ - $ref: dsa.yaml#/$defs/ethernet-ports
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-switch@0 {
+ compatible = "marvell,mv88e6085";
+ reg = <0>;
+ reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sw_phy0: ethernet-phy@0 {
+ reg = <0x0>;
+ };
+
+ sw_phy1: ethernet-phy@1 {
+ reg = <0x1>;
+ };
+
+ sw_phy2: ethernet-phy@2 {
+ reg = <0x2>;
+ };
+
+ sw_phy3: ethernet-phy@3 {
+ reg = <0x3>;
+ };
+ };
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-port@0 {
+ reg = <0>;
+ label = "lan4";
+ phy-handle = <&sw_phy0>;
+ phy-mode = "internal";
+ };
+
+ ethernet-port@1 {
+ reg = <1>;
+ label = "lan3";
+ phy-handle = <&sw_phy1>;
+ phy-mode = "internal";
+ };
+
+ ethernet-port@2 {
+ reg = <2>;
+ label = "lan2";
+ phy-handle = <&sw_phy2>;
+ phy-mode = "internal";
+ };
+
+ ethernet-port@3 {
+ reg = <3>;
+ label = "lan1";
+ phy-handle = <&sw_phy3>;
+ phy-mode = "internal";
+ };
+
+ ethernet-port@5 {
+ reg = <5>;
+ ethernet = <&fec>;
+ phy-mode = "rgmii-id";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-switch@0 {
+ compatible = "marvell,mv88e6190";
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ interrupt-parent = <&gpio1>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&switch_interrupt_pins>;
+ pinctrl-names = "default";
+ reg = <0>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch0phy1: ethernet-phy@1 {
+ reg = <0x1>;
+ };
+
+ switch0phy2: ethernet-phy@2 {
+ reg = <0x2>;
+ };
+
+ switch0phy3: ethernet-phy@3 {
+ reg = <0x3>;
+ };
+
+ switch0phy4: ethernet-phy@4 {
+ reg = <0x4>;
+ };
+
+ switch0phy5: ethernet-phy@5 {
+ reg = <0x5>;
+ };
+
+ switch0phy6: ethernet-phy@6 {
+ reg = <0x6>;
+ };
+
+ switch0phy7: ethernet-phy@7 {
+ reg = <0x7>;
+ };
+
+ switch0phy8: ethernet-phy@8 {
+ reg = <0x8>;
+ };
+ };
+
+ mdio-external {
+ compatible = "marvell,mv88e6xxx-mdio-external";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy1: ethernet-phy@b {
+ reg = <0xb>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ };
+
+ phy2: ethernet-phy@c {
+ reg = <0xc>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ };
+ };
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-port@0 {
+ ethernet = <&eth0>;
+ phy-mode = "rgmii";
+ reg = <0>;
+
+ fixed-link {
+ full-duplex;
+ pause;
+ speed = <1000>;
+ };
+ };
+
+ ethernet-port@1 {
+ label = "lan1";
+ phy-handle = <&switch0phy1>;
+ reg = <1>;
+ };
+
+ ethernet-port@2 {
+ label = "lan2";
+ phy-handle = <&switch0phy2>;
+ reg = <2>;
+ };
+
+ ethernet-port@3 {
+ label = "lan3";
+ phy-handle = <&switch0phy3>;
+ reg = <3>;
+ };
+
+ ethernet-port@4 {
+ label = "lan4";
+ phy-handle = <&switch0phy4>;
+ reg = <4>;
+ };
+
+ ethernet-port@5 {
+ label = "lan5";
+ phy-handle = <&switch0phy5>;
+ reg = <5>;
+ };
+
+ ethernet-port@6 {
+ label = "lan6";
+ phy-handle = <&switch0phy6>;
+ reg = <6>;
+ };
+
+ ethernet-port@7 {
+ label = "lan7";
+ phy-handle = <&switch0phy7>;
+ reg = <7>;
+ };
+
+ ethernet-port@8 {
+ label = "lan8";
+ phy-handle = <&switch0phy8>;
+ reg = <8>;
+ };
+
+ ethernet-port@9 {
+ /* 88X3310P external phy */
+ label = "lan9";
+ phy-handle = <&phy1>;
+ phy-mode = "xaui";
+ reg = <9>;
+ };
+
+ ethernet-port@a {
+ /* 88X3310P external phy */
+ label = "lan10";
+ phy-handle = <&phy2>;
+ phy-mode = "xaui";
+ reg = <0xa>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/marvell.txt b/sys/contrib/device-tree/Bindings/net/dsa/marvell.txt
index 33726134f5c9..6ec0c181b6db 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/marvell.txt
+++ b/sys/contrib/device-tree/Bindings/net/dsa/marvell.txt
@@ -20,7 +20,7 @@ which is at a different MDIO base address in different switch families.
6171, 6172, 6175, 6176, 6185, 6240, 6320, 6321,
6341, 6350, 6351, 6352
- "marvell,mv88e6190" : Switch has base address 0x00. Use with models:
- 6163, 6190, 6190X, 6191, 6290, 6390, 6390X
+ 6190, 6190X, 6191, 6290, 6361, 6390, 6390X
- "marvell,mv88e6250" : Switch has base address 0x08 or 0x18. Use with model:
6220, 6250
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/mediatek,mt7530.yaml b/sys/contrib/device-tree/Bindings/net/dsa/mediatek,mt7530.yaml
index e532c6b795f4..1c2444121e60 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/mediatek,mt7530.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/mediatek,mt7530.yaml
@@ -60,7 +60,7 @@ description: |
Check out example 6.
- - Port 5 can be wired to an external phy. Port 5 becomes a DSA slave.
+ - Port 5 can be wired to an external phy. Port 5 becomes a DSA user port.
For the multi-chip module MT7530, the external phy must be wired TX to TX
to gmac1 of the SoC for this to work. Ubiquiti EdgeRouter X SFP is wired
@@ -154,10 +154,12 @@ properties:
patternProperties:
"^(ethernet-)?ports$":
type: object
+ additionalProperties: true
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-6]$":
type: object
+ additionalProperties: true
properties:
reg:
@@ -184,7 +186,7 @@ $defs:
patternProperties:
"^(ethernet-)?ports$":
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-6]$":
if:
required: [ ethernet ]
then:
@@ -210,7 +212,7 @@ $defs:
patternProperties:
"^(ethernet-)?ports$":
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-6]$":
if:
required: [ ethernet ]
then:
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml b/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml
index e51be1ac0362..c963dc09e8e1 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/microchip,ksz.yaml
@@ -11,7 +11,6 @@ maintainers:
- Woojung Huh <Woojung.Huh@microchip.com>
allOf:
- - $ref: dsa.yaml#/$defs/ethernet-ports
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
@@ -38,6 +37,8 @@ properties:
Should be a gpio specifier for a reset line.
maxItems: 1
+ wakeup-source: true
+
microchip,synclko-125:
$ref: /schemas/types.yaml#/definitions/flag
description:
@@ -49,10 +50,66 @@ properties:
Set if the output SYNCLKO clock should be disabled. Do not mix with
microchip,synclko-125.
+ microchip,io-drive-strength-microamp:
+ description:
+ IO Pad Drive Strength
+ enum: [8000, 16000]
+ default: 16000
+
+ microchip,hi-drive-strength-microamp:
+ description:
+ High Speed Drive Strength. Controls drive strength of GMII / RGMII /
+ MII / RMII (except TX_CLK/REFCLKI, COL and CRS) and CLKO_25_125 lines.
+ enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000]
+ default: 24000
+
+ microchip,lo-drive-strength-microamp:
+ description:
+ Low Speed Drive Strength. Controls drive strength of TX_CLK / REFCLKI,
+ COL, CRS, LEDs, PME_N, NTRP_N, SDO and SDI/SDA/MDIO lines.
+ enum: [2000, 4000, 8000, 12000, 16000, 20000, 24000, 28000]
+ default: 8000
+
+ interrupts:
+ maxItems: 1
+
required:
- compatible
- reg
+if:
+ not:
+ properties:
+ compatible:
+ enum:
+ - microchip,ksz8863
+ - microchip,ksz8873
+then:
+ $ref: dsa.yaml#/$defs/ethernet-ports
+else:
+ patternProperties:
+ "^(ethernet-)?ports$":
+ patternProperties:
+ "^(ethernet-)?port@[0-2]$":
+ $ref: dsa-port.yaml#
+ unevaluatedProperties: false
+ properties:
+ microchip,rmii-clk-internal:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ When ksz88x3 is acting as clock provier (via REFCLKO) it
+ can select between internal and external RMII reference
+ clock. Internal reference clock means that the clock for
+ the RMII of ksz88x3 is provided by the ksz88x3 internally
+ and the REFCLKI pin is unconnected. For the external
+ reference clock, the clock needs to be fed back to ksz88x3
+ via REFCLKI.
+ If microchip,rmii-clk-internal is set, ksz88x3 will provide
+ rmii reference clock internally, otherwise reference clock
+ should be provided externally.
+ dependencies:
+ microchip,rmii-clk-internal: [ethernet]
+
unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/microchip,lan937x.yaml b/sys/contrib/device-tree/Bindings/net/dsa/microchip,lan937x.yaml
index 8d7e878b84dc..9973d64f15a7 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/microchip,lan937x.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/microchip,lan937x.yaml
@@ -37,8 +37,9 @@ properties:
patternProperties:
"^(ethernet-)?ports$":
+ additionalProperties: true
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-7]$":
allOf:
- if:
properties:
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/nxp,sja1105.yaml b/sys/contrib/device-tree/Bindings/net/dsa/nxp,sja1105.yaml
index 4d5f5cc6d031..9432565f4f5d 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/nxp,sja1105.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/nxp,sja1105.yaml
@@ -43,6 +43,7 @@ properties:
# PHY 1.
mdios:
type: object
+ additionalProperties: false
properties:
'#address-cells':
@@ -74,8 +75,9 @@ properties:
patternProperties:
"^(ethernet-)?ports$":
+ additionalProperties: true
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-9]$":
allOf:
- if:
properties:
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/qca8k.yaml b/sys/contrib/device-tree/Bindings/net/dsa/qca8k.yaml
index df64eebebe18..167398ab253a 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/qca8k.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/qca8k.yaml
@@ -73,6 +73,7 @@ $ref: dsa.yaml#
patternProperties:
"^(ethernet-)?ports$":
type: object
+ additionalProperties: true
patternProperties:
"^(ethernet-)?port@[0-6]$":
type: object
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/realtek.yaml b/sys/contrib/device-tree/Bindings/net/dsa/realtek.yaml
index cfd69c2604ea..cce692f57b08 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/realtek.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/realtek.yaml
@@ -68,6 +68,8 @@ properties:
interrupt-controller:
type: object
+ additionalProperties: false
+
description: |
This defines an interrupt controller with an IRQ line (typically
a GPIO) that will demultiplex and handle the interrupt from the single
diff --git a/sys/contrib/device-tree/Bindings/net/dsa/renesas,rzn1-a5psw.yaml b/sys/contrib/device-tree/Bindings/net/dsa/renesas,rzn1-a5psw.yaml
index 833d2f68daa1..ea285ef3e64f 100644
--- a/sys/contrib/device-tree/Bindings/net/dsa/renesas,rzn1-a5psw.yaml
+++ b/sys/contrib/device-tree/Bindings/net/dsa/renesas,rzn1-a5psw.yaml
@@ -61,17 +61,11 @@ properties:
ethernet-ports:
type: object
- properties:
- '#address-cells':
- const: 1
- '#size-cells':
- const: 0
-
+ additionalProperties: true
patternProperties:
"^(ethernet-)?port@[0-4]$":
type: object
- description: Ethernet switch ports
-
+ additionalProperties: true
properties:
pcs-handle:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/net/engleder,tsnep.yaml b/sys/contrib/device-tree/Bindings/net/engleder,tsnep.yaml
index 82a5d7927ca4..34fd24ff6a71 100644
--- a/sys/contrib/device-tree/Bindings/net/engleder,tsnep.yaml
+++ b/sys/contrib/device-tree/Bindings/net/engleder,tsnep.yaml
@@ -63,6 +63,7 @@ properties:
mdio:
type: object
$ref: mdio.yaml#
+ unevaluatedProperties: false
description: optional node for embedded MDIO controller
required:
diff --git a/sys/contrib/device-tree/Bindings/net/ethernet-controller.yaml b/sys/contrib/device-tree/Bindings/net/ethernet-controller.yaml
index 6b0d359367da..d14d123ad7a0 100644
--- a/sys/contrib/device-tree/Bindings/net/ethernet-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/net/ethernet-controller.yaml
@@ -66,6 +66,7 @@ properties:
- mii
- gmii
- sgmii
+ - psgmii
- qsgmii
- qusgmii
- tbi
@@ -274,12 +275,12 @@ allOf:
properties:
rx-internal-delay-ps:
description:
- RGMII Receive Clock Delay defined in pico seconds.This is used for
+ RGMII Receive Clock Delay defined in pico seconds. This is used for
controllers that have configurable RX internal delays. If this
property is present then the MAC applies the RX delay.
tx-internal-delay-ps:
description:
- RGMII Transmit Clock Delay defined in pico seconds.This is used for
+ RGMII Transmit Clock Delay defined in pico seconds. This is used for
controllers that have configurable TX internal delays. If this
property is present then the MAC applies the TX delay.
diff --git a/sys/contrib/device-tree/Bindings/net/ethernet-phy.yaml b/sys/contrib/device-tree/Bindings/net/ethernet-phy.yaml
index c1241c8a3b77..8fb2a6ee7e5b 100644
--- a/sys/contrib/device-tree/Bindings/net/ethernet-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/net/ethernet-phy.yaml
@@ -110,7 +110,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/flag
description:
If set, indicates that PHY will disable swap of the
- TX/RX lanes. This property allows the PHY to work correcly after
+ TX/RX lanes. This property allows the PHY to work correctly after
e.g. wrong bootstrap configuration caused by issues in PCB
layout design.
diff --git a/sys/contrib/device-tree/Bindings/net/ethernet-switch.yaml b/sys/contrib/device-tree/Bindings/net/ethernet-switch.yaml
index f1b9075dc7fb..b3b7e1a1b127 100644
--- a/sys/contrib/device-tree/Bindings/net/ethernet-switch.yaml
+++ b/sys/contrib/device-tree/Bindings/net/ethernet-switch.yaml
@@ -20,9 +20,26 @@ description:
select: false
-properties:
- $nodename:
- pattern: "^(ethernet-)?switch(@.*)?$"
+allOf:
+ # This condition is here to satisfy the case where certain device
+ # nodes have to preserve non-standard names because of
+ # backward-compatibility with boot loaders inspecting certain
+ # node names.
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - marvell,turris-mox-mv88e6085
+ - marvell,turris-mox-mv88e6190
+ then:
+ properties:
+ $nodename:
+ pattern: "switch[0-3]@[0-3]+$"
+ else:
+ properties:
+ $nodename:
+ pattern: "^(ethernet-)?switch(@.*)?$"
patternProperties:
"^(ethernet-)?ports$":
@@ -36,7 +53,7 @@ patternProperties:
const: 0
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
+ "^(ethernet-)?port@[0-9a-f]+$":
type: object
description: Ethernet switch ports
@@ -53,14 +70,16 @@ oneOf:
additionalProperties: true
$defs:
- base:
+ ethernet-ports:
description: An ethernet switch without any extra port properties
$ref: '#'
patternProperties:
- "^(ethernet-)?port@[0-9]+$":
- description: Ethernet switch ports
- $ref: ethernet-switch-port.yaml#
- unevaluatedProperties: false
+ "^(ethernet-)?ports$":
+ patternProperties:
+ "^(ethernet-)?port@[0-9a-f]+$":
+ description: Ethernet switch ports
+ $ref: ethernet-switch-port.yaml#
+ unevaluatedProperties: false
...
diff --git a/sys/contrib/device-tree/Bindings/net/faraday,ftgmac100.yaml b/sys/contrib/device-tree/Bindings/net/faraday,ftgmac100.yaml
new file mode 100644
index 000000000000..9bcbacb6640d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/faraday,ftgmac100.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/faraday,ftgmac100.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Faraday Technology FTGMAC100 gigabit ethernet controller
+
+allOf:
+ - $ref: ethernet-controller.yaml#
+
+maintainers:
+ - Po-Yu Chuang <ratbert@faraday-tech.com>
+
+properties:
+ compatible:
+ oneOf:
+ - const: faraday,ftgmac100
+ - items:
+ - enum:
+ - aspeed,ast2400-mac
+ - aspeed,ast2500-mac
+ - aspeed,ast2600-mac
+ - const: faraday,ftgmac100
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ items:
+ - description: MAC IP clock
+ - description: RMII RCLK gate for AST2500/2600
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: MACCLK
+ - const: RCLK
+
+ phy-mode:
+ enum:
+ - rgmii
+ - rmii
+
+ phy-handle: true
+
+ use-ncsi:
+ description:
+ Use the NC-SI stack instead of an MDIO PHY. Currently assumes
+ rmii (100bT) but kept as a separate property in case NC-SI grows support
+ for a gigabit link.
+ type: boolean
+
+ no-hw-checksum:
+ description:
+ Used to disable HW checksum support. Here for backward
+ compatibility as the driver now should have correct defaults based on
+ the SoC.
+ type: boolean
+ deprecated: true
+
+ mdio:
+ $ref: /schemas/net/mdio.yaml#
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ ethernet@1e660000 {
+ compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";
+ reg = <0x1e660000 0x180>;
+ interrupts = <2>;
+ use-ncsi;
+ };
+
+ ethernet@1e680000 {
+ compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";
+ reg = <0x1e680000 0x180>;
+ interrupts = <2>;
+
+ phy-handle = <&phy>;
+ phy-mode = "rgmii";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/fsl,fec.yaml b/sys/contrib/device-tree/Bindings/net/fsl,fec.yaml
index b494e009326e..8948a11c994e 100644
--- a/sys/contrib/device-tree/Bindings/net/fsl,fec.yaml
+++ b/sys/contrib/device-tree/Bindings/net/fsl,fec.yaml
@@ -59,6 +59,7 @@ properties:
- const: fsl,imx6sx-fec
- items:
- enum:
+ - fsl,imx8dxl-fec
- fsl,imx8qxp-fec
- const: fsl,imx8qm-fec
- const: fsl,imx6sx-fec
diff --git a/sys/contrib/device-tree/Bindings/net/lantiq,pef2256.yaml b/sys/contrib/device-tree/Bindings/net/lantiq,pef2256.yaml
new file mode 100644
index 000000000000..7da8370e2468
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/lantiq,pef2256.yaml
@@ -0,0 +1,213 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/lantiq,pef2256.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lantiq PEF2256
+
+maintainers:
+ - Herve Codina <herve.codina@bootlin.com>
+
+description:
+ The Lantiq PEF2256, also known as Infineon PEF2256 or FALC56, is a framer and
+ line interface component designed to fulfill all required interfacing between
+ an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus.
+
+properties:
+ compatible:
+ items:
+ - const: lantiq,pef2256
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Master Clock
+ - description: System Clock Receive
+ - description: System Clock Transmit
+
+ clock-names:
+ items:
+ - const: mclk
+ - const: sclkr
+ - const: sclkx
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ description:
+ GPIO used to reset the device.
+ maxItems: 1
+
+ pinctrl:
+ $ref: /schemas/pinctrl/pinctrl.yaml#
+ additionalProperties: false
+
+ patternProperties:
+ '-pins$':
+ type: object
+ $ref: /schemas/pinctrl/pinmux-node.yaml#
+ additionalProperties: false
+
+ properties:
+ pins:
+ enum: [ RPA, RPB, RPC, RPD, XPA, XPB, XPC, XPD ]
+
+ function:
+ enum: [ SYPR, RFM, RFMB, RSIGM, RSIG, DLR, FREEZE, RFSP, LOS,
+ SYPX, XFMS, XSIG, TCLK, XMFB, XSIGM, DLX, XCLK, XLT,
+ GPI, GPOH, GPOL ]
+
+ required:
+ - pins
+ - function
+
+ lantiq,data-rate-bps:
+ enum: [2048000, 4096000, 8192000, 16384000]
+ default: 2048000
+ description:
+ Data rate (bit per seconds) on the system highway.
+
+ lantiq,clock-falling-edge:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Data is sent on falling edge of the clock (and received on the rising
+ edge). If 'clock-falling-edge' is not present, data is sent on the
+ rising edge (and received on the falling edge).
+
+ lantiq,channel-phase:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3, 4, 5, 6, 7]
+ default: 0
+ description: |
+ The pef2256 delivers a full frame (32 8-bit time-slots in E1 and 24 8-bit
+ time-slots 8 8-bit signaling in E1/J1) every 125us. This lead to a data
+ rate of 2048000 bit/s. When lantiq,data-rate-bps is more than 2048000
+ bit/s, the data (all 32 8-bit) present in the frame are interleave with
+ unused time-slots. The lantiq,channel-phase property allows to set the
+ correct alignment of the interleave mechanism.
+ For instance, suppose lantiq,data-rate-bps = 8192000 (ie 4*2048000), and
+ lantiq,channel-phase = 2, the interleave schema with unused time-slots
+ (nu) and used time-slots (XX) for TSi is
+ nu nu XX nu nu nu XX nu nu nu XX nu
+ <-- TSi --> <- TSi+1 -> <- TSi+2 ->
+ With lantiq,data-rate-bps = 8192000, and lantiq,channel-phase = 1, the
+ interleave schema is
+ nu XX nu nu nu XX nu nu nu XX nu nu
+ <-- TSi --> <- TSi+1 -> <- TSi+2 ->
+ With lantiq,data-rate-bps = 4096000 (ie 2*2048000), and
+ lantiq,channel-phase = 1, the interleave schema is
+ nu XX nu XX nu XX
+ <-- TSi --> <- TSi+1 -> <- TSi+2 ->
+
+patternProperties:
+ '^codec(-([0-9]|[1-2][0-9]|3[0-1]))?$':
+ type: object
+ $ref: /schemas/sound/dai-common.yaml
+ unevaluatedProperties: false
+ description:
+ Codec provided by the pef2256. This codec allows to use some of the PCM
+ system highway time-slots as audio channels to transport audio data over
+ the E1/T1/J1 lines.
+ The time-slots used by the codec must be set and so, the properties
+ 'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and
+ 'dai-tdm-slot-rx-mask' must be present in the sound card node for
+ sub-nodes that involve the codec. The codec uses 8-bit time-slots.
+ 'dai-tdm-tdm-slot-with' must be set to 8.
+ The tx and rx masks define the pef2256 time-slots assigned to the codec.
+
+ properties:
+ compatible:
+ const: lantiq,pef2256-codec
+
+ '#sound-dai-cells':
+ const: 0
+
+ required:
+ - compatible
+ - '#sound-dai-cells'
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ pef2256: framer@2000000 {
+ compatible = "lantiq,pef2256";
+ reg = <0x2000000 0x100>;
+ interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&intc>;
+ clocks = <&clk_mclk>, <&clk_sclkr>, <&clk_sclkx>;
+ clock-names = "mclk", "sclkr", "sclkx";
+ reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ lantiq,data-rate-bps = <4096000>;
+
+ pinctrl {
+ pef2256_rpa_sypr: rpa-pins {
+ pins = "RPA";
+ function = "SYPR";
+ };
+ pef2256_xpa_sypx: xpa-pins {
+ pins = "XPA";
+ function = "SYPX";
+ };
+ };
+
+ pef2256_codec0: codec-0 {
+ compatible = "lantiq,pef2256-codec";
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "PEF2256_0";
+ };
+
+ pef2256_codec1: codec-1 {
+ compatible = "lantiq,pef2256-codec";
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "PEF2256_1";
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ simple-audio-card,dai-link@0 { /* CPU DAI1 - pef2256 codec 1 */
+ reg = <0>;
+ cpu {
+ sound-dai = <&cpu_dai1>;
+ };
+ codec {
+ sound-dai = <&pef2256_codec0>;
+ dai-tdm-slot-num = <4>;
+ dai-tdm-slot-width = <8>;
+ /* TS 1, 2, 3, 4 */
+ dai-tdm-slot-tx-mask = <0 1 1 1 1>;
+ dai-tdm-slot-rx-mask = <0 1 1 1 1>;
+ };
+ };
+ simple-audio-card,dai-link@1 { /* CPU DAI2 - pef2256 codec 2 */
+ reg = <1>;
+ cpu {
+ sound-dai = <&cpu_dai2>;
+ };
+ codec {
+ sound-dai = <&pef2256_codec1>;
+ dai-tdm-slot-num = <4>;
+ dai-tdm-slot-width = <8>;
+ /* TS 5, 6, 7, 8 */
+ dai-tdm-slot-tx-mask = <0 0 0 0 0 1 1 1 1>;
+ dai-tdm-slot-rx-mask = <0 0 0 0 0 1 1 1 1>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/loongson,ls1b-gmac.yaml b/sys/contrib/device-tree/Bindings/net/loongson,ls1b-gmac.yaml
new file mode 100644
index 000000000000..c4f3224bad38
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/loongson,ls1b-gmac.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/loongson,ls1b-gmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson-1B Gigabit Ethernet MAC Controller
+
+maintainers:
+ - Keguang Zhang <keguang.zhang@gmail.com>
+
+description: |
+ Loongson-1B Gigabit Ethernet MAC Controller is based on
+ Synopsys DesignWare MAC (version 3.50a).
+
+ Main features
+ - Dual 10/100/1000Mbps GMAC controllers
+ - Full-duplex operation (IEEE 802.3x flow control automatic transmission)
+ - Half-duplex operation (CSMA/CD Protocol and back-pressure support)
+ - RX Checksum Offload
+ - TX Checksum insertion
+ - MII interface
+ - RGMII interface
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - loongson,ls1b-gmac
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - loongson,ls1b-gmac
+ - const: snps,dwmac-3.50a
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: stmmaceth
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ items:
+ - const: macirq
+
+ loongson,ls1-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the syscon containing some extra configurations
+ including PHY interface mode.
+
+ phy-mode:
+ enum:
+ - mii
+ - rgmii-id
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+ - interrupt-names
+ - loongson,ls1-syscon
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/loongson,ls1x-clk.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ gmac0: ethernet@1fe10000 {
+ compatible = "loongson,ls1b-gmac", "snps,dwmac-3.50a";
+ reg = <0x1fe10000 0x10000>;
+
+ clocks = <&clkc LS1X_CLKID_AHB>;
+ clock-names = "stmmaceth";
+
+ interrupt-parent = <&intc1>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+
+ loongson,ls1-syscon = <&syscon>;
+
+ phy-handle = <&phy0>;
+ phy-mode = "mii";
+ snps,pbl = <1>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+
+ phy0: ethernet-phy@0 {
+ reg = <0x0>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/loongson,ls1c-emac.yaml b/sys/contrib/device-tree/Bindings/net/loongson,ls1c-emac.yaml
new file mode 100644
index 000000000000..99001b940b83
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/loongson,ls1c-emac.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/loongson,ls1c-emac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson-1C Ethernet MAC Controller
+
+maintainers:
+ - Keguang Zhang <keguang.zhang@gmail.com>
+
+description: |
+ Loongson-1C Ethernet MAC Controller is based on
+ Synopsys DesignWare MAC (version 3.50a).
+
+ Main features
+ - 10/100Mbps
+ - Full-duplex operation (IEEE 802.3x flow control automatic transmission)
+ - Half-duplex operation (CSMA/CD Protocol and back-pressure support)
+ - IEEE 802.1Q VLAN tag detection for reception frames
+ - MII interface
+ - RMII interface
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - loongson,ls1c-emac
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - loongson,ls1c-emac
+ - const: snps,dwmac-3.50a
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: stmmaceth
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ items:
+ - const: macirq
+
+ loongson,ls1-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the syscon containing some extra configurations
+ including PHY interface mode.
+
+ phy-mode:
+ enum:
+ - mii
+ - rmii
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+ - interrupt-names
+ - loongson,ls1-syscon
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/loongson,ls1x-clk.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ emac: ethernet@1fe10000 {
+ compatible = "loongson,ls1c-emac", "snps,dwmac-3.50a";
+ reg = <0x1fe10000 0x10000>;
+
+ clocks = <&clkc LS1X_CLKID_AHB>;
+ clock-names = "stmmaceth";
+
+ interrupt-parent = <&intc1>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+
+ loongson,ls1-syscon = <&syscon>;
+
+ phy-handle = <&phy0>;
+ phy-mode = "mii";
+ snps,pbl = <1>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+
+ phy0: ethernet-phy@13 {
+ reg = <0x13>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/marvell,aquantia.yaml b/sys/contrib/device-tree/Bindings/net/marvell,aquantia.yaml
new file mode 100644
index 000000000000..9854fab4c4db
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/marvell,aquantia.yaml
@@ -0,0 +1,116 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/marvell,aquantia.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Aquantia Ethernet PHY
+
+maintainers:
+ - Christian Marangi <ansuelsmth@gmail.com>
+
+description: |
+ Marvell Aquantia Ethernet PHY require a firmware to be loaded to actually
+ work.
+
+ This can be done and is implemented by OEM in 3 different way:
+ - Attached SPI flash directly to the PHY with the firmware. The PHY
+ will self load the firmware in the presence of this configuration.
+ - Read from a dedicated partition on system NAND declared in an
+ NVMEM cell, and loaded to the PHY using its mailbox interface.
+ - Manually provided firmware loaded from a file in the filesystem.
+
+allOf:
+ - $ref: ethernet-phy.yaml#
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ethernet-phy-id03a1.b445
+ - ethernet-phy-id03a1.b460
+ - ethernet-phy-id03a1.b4a2
+ - ethernet-phy-id03a1.b4d0
+ - ethernet-phy-id03a1.b4e0
+ - ethernet-phy-id03a1.b5c2
+ - ethernet-phy-id03a1.b4b0
+ - ethernet-phy-id03a1.b662
+ - ethernet-phy-id03a1.b712
+ - ethernet-phy-id31c3.1c12
+ required:
+ - compatible
+
+properties:
+ reg:
+ maxItems: 1
+
+ firmware-name:
+ description: specify the name of PHY firmware to load
+
+ nvmem-cells:
+ description: phandle to the firmware nvmem cell
+ maxItems: 1
+
+ nvmem-cell-names:
+ const: firmware
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-phy@0 {
+ compatible = "ethernet-phy-id31c3.1c12",
+ "ethernet-phy-ieee802.3-c45";
+
+ reg = <0>;
+ firmware-name = "AQR-G4_v5.4.C-AQR_CIG_WF-1945_0x8_ID44776_VER1630.cld";
+ };
+
+ ethernet-phy@1 {
+ compatible = "ethernet-phy-id31c3.1c12",
+ "ethernet-phy-ieee802.3-c45";
+
+ reg = <1>;
+ nvmem-cells = <&aqr_fw>;
+ nvmem-cell-names = "firmware";
+ };
+ };
+
+ flash {
+ compatible = "jedec,spi-nor";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* ... */
+
+ partition@650000 {
+ compatible = "nvmem-cells";
+ label = "0:ethphyfw";
+ reg = <0x650000 0x80000>;
+ read-only;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aqr_fw: aqr_fw@0 {
+ reg = <0x0 0x5f42a>;
+ };
+ };
+
+ /* ... */
+
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/marvell,mvusb.yaml b/sys/contrib/device-tree/Bindings/net/marvell,mvusb.yaml
index 3a3325168048..ab838c1ffeed 100644
--- a/sys/contrib/device-tree/Bindings/net/marvell,mvusb.yaml
+++ b/sys/contrib/device-tree/Bindings/net/marvell,mvusb.yaml
@@ -50,11 +50,14 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- switch@0 {
+ ethernet-switch@0 {
compatible = "marvell,mv88e6190";
reg = <0x0>;
- ports {
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
/* Port definitions */
};
diff --git a/sys/contrib/device-tree/Bindings/net/marvell,orion-mdio.yaml b/sys/contrib/device-tree/Bindings/net/marvell,orion-mdio.yaml
index e35da8b01dc2..73429855d584 100644
--- a/sys/contrib/device-tree/Bindings/net/marvell,orion-mdio.yaml
+++ b/sys/contrib/device-tree/Bindings/net/marvell,orion-mdio.yaml
@@ -39,28 +39,6 @@ required:
allOf:
- $ref: mdio.yaml#
- - if:
- required:
- - interrupts
-
- then:
- properties:
- reg:
- items:
- - items:
- - $ref: /schemas/types.yaml#/definitions/cell
- - const: 0x84
-
- else:
- properties:
- reg:
- items:
- - items:
- - $ref: /schemas/types.yaml#/definitions/cell
- - enum:
- - 0x4
- - 0x10
-
unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/net/marvell,prestera.yaml b/sys/contrib/device-tree/Bindings/net/marvell,prestera.yaml
index 5ea8b73663a5..16ff892f7bbd 100644
--- a/sys/contrib/device-tree/Bindings/net/marvell,prestera.yaml
+++ b/sys/contrib/device-tree/Bindings/net/marvell,prestera.yaml
@@ -78,8 +78,8 @@ examples:
pcie@0 {
#address-cells = <3>;
#size-cells = <2>;
- ranges = <0x0 0x0 0x0 0x0 0x0 0x0>;
- reg = <0x0 0x0 0x0 0x0 0x0 0x0>;
+ ranges = <0x02000000 0x0 0x100000 0x10000000 0x0 0x0>;
+ reg = <0x0 0x1000>;
device_type = "pci";
switch@0,0 {
diff --git a/sys/contrib/device-tree/Bindings/net/mediatek,net.yaml b/sys/contrib/device-tree/Bindings/net/mediatek,net.yaml
index 31cc0c412805..e74502a0afe8 100644
--- a/sys/contrib/device-tree/Bindings/net/mediatek,net.yaml
+++ b/sys/contrib/device-tree/Bindings/net/mediatek,net.yaml
@@ -19,10 +19,12 @@ properties:
enum:
- mediatek,mt2701-eth
- mediatek,mt7623-eth
+ - mediatek,mt7621-eth
- mediatek,mt7622-eth
- mediatek,mt7629-eth
- mediatek,mt7981-eth
- mediatek,mt7986-eth
+ - mediatek,mt7988-eth
- ralink,rt5350-eth
reg:
@@ -32,7 +34,7 @@ properties:
clock-names: true
interrupts:
- minItems: 3
+ minItems: 1
maxItems: 4
power-domains:
@@ -60,6 +62,12 @@ properties:
Phandle to the mediatek hifsys controller used to provide various clocks
and reset to the system.
+ mediatek,infracfg:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the syscon node that handles the path from GMAC to
+ PHY variants.
+
mediatek,sgmiisys:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 1
@@ -121,6 +129,8 @@ allOf:
- const: gp1
- const: gp2
+ mediatek,infracfg: false
+
mediatek,pctl:
$ref: /schemas/types.yaml#/definitions/phandle
description:
@@ -135,6 +145,32 @@ allOf:
properties:
compatible:
contains:
+ enum:
+ - mediatek,mt7621-eth
+ then:
+ properties:
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 2
+ maxItems: 2
+
+ clock-names:
+ items:
+ - const: ethif
+ - const: fe
+
+ mediatek,infracfg: false
+
+ mediatek,wed: false
+
+ mediatek,wed-pcie: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
const: mediatek,mt7622-eth
then:
properties:
@@ -159,6 +195,8 @@ allOf:
- const: sgmii_ck
- const: eth2pll
+ mediatek,infracfg: false
+
mediatek,sgmiisys:
minItems: 1
maxItems: 1
@@ -204,12 +242,6 @@ allOf:
- const: sgmii_ck
- const: eth2pll
- mediatek,infracfg:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
- Phandle to the syscon node that handles the path from GMAC to
- PHY variants.
-
mediatek,sgmiisys:
minItems: 2
maxItems: 2
@@ -250,6 +282,8 @@ allOf:
- const: netsys0
- const: netsys1
+ mediatek,infracfg: false
+
mediatek,sgmiisys:
minItems: 2
maxItems: 2
@@ -286,6 +320,67 @@ allOf:
- const: netsys0
- const: netsys1
+ mediatek,infracfg: false
+
+ mediatek,sgmiisys:
+ minItems: 2
+ maxItems: 2
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7988-eth
+ then:
+ properties:
+ interrupts:
+ minItems: 4
+
+ clocks:
+ minItems: 34
+ maxItems: 34
+
+ clock-names:
+ items:
+ - const: crypto
+ - const: fe
+ - const: gp2
+ - const: gp1
+ - const: gp3
+ - const: ethwarp_wocpu2
+ - const: ethwarp_wocpu1
+ - const: ethwarp_wocpu0
+ - const: esw
+ - const: netsys0
+ - const: netsys1
+ - const: sgmii_tx250m
+ - const: sgmii_rx250m
+ - const: sgmii2_tx250m
+ - const: sgmii2_rx250m
+ - const: top_usxgmii0_sel
+ - const: top_usxgmii1_sel
+ - const: top_sgm0_sel
+ - const: top_sgm1_sel
+ - const: top_xfi_phy0_xtal_sel
+ - const: top_xfi_phy1_xtal_sel
+ - const: top_eth_gmii_sel
+ - const: top_eth_refck_50m_sel
+ - const: top_eth_sys_200m_sel
+ - const: top_eth_sys_sel
+ - const: top_eth_xgmii_sel
+ - const: top_eth_mii_sel
+ - const: top_netsys_sel
+ - const: top_netsys_500m_sel
+ - const: top_netsys_pao_2x_sel
+ - const: top_netsys_sync_250m_sel
+ - const: top_netsys_ppefb_250m_sel
+ - const: top_netsys_warp_sel
+ - const: wocpu1
+ - const: wocpu0
+ - const: xgp1
+ - const: xgp2
+ - const: xgp3
+
mediatek,sgmiisys:
minItems: 2
maxItems: 2
diff --git a/sys/contrib/device-tree/Bindings/net/mediatek-dwmac.yaml b/sys/contrib/device-tree/Bindings/net/mediatek-dwmac.yaml
index 5aa320c8af5a..ed9d845f6008 100644
--- a/sys/contrib/device-tree/Bindings/net/mediatek-dwmac.yaml
+++ b/sys/contrib/device-tree/Bindings/net/mediatek-dwmac.yaml
@@ -129,7 +129,7 @@ properties:
type: boolean
description:
If present, indicates that MAC supports WOL(Wake-On-LAN), and MAC WOL will be enabled.
- Otherwise, PHY WOL is perferred.
+ Otherwise, PHY WOL is preferred.
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/net/microchip,lan95xx.yaml b/sys/contrib/device-tree/Bindings/net/microchip,lan95xx.yaml
index 0b97e14d947f..accff93d38f8 100644
--- a/sys/contrib/device-tree/Bindings/net/microchip,lan95xx.yaml
+++ b/sys/contrib/device-tree/Bindings/net/microchip,lan95xx.yaml
@@ -33,7 +33,7 @@ properties:
- usb424,9906 # SMSC9505A USB Ethernet Device (HAL)
- usb424,9907 # SMSC9500 USB Ethernet Device (Alternate ID)
- usb424,9908 # SMSC9500A USB Ethernet Device (Alternate ID)
- - usb424,9909 # SMSC9512/9514 USB Hub & Ethernet Devic. ID)
+ - usb424,9909 # SMSC9512/9514 USB Hub & Ethernet Device ID)
- usb424,9e00 # SMSC9500A USB Ethernet Device
- usb424,9e01 # SMSC9505A USB Ethernet Device
- usb424,9e08 # SMSC LAN89530 USB Ethernet Device
@@ -44,6 +44,8 @@ properties:
local-mac-address: true
mac-address: true
+ nvmem-cells: true
+ nvmem-cell-names: true
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/net/motorcomm,yt8xxx.yaml b/sys/contrib/device-tree/Bindings/net/motorcomm,yt8xxx.yaml
index 157e3bbcaf6f..26688e2302ea 100644
--- a/sys/contrib/device-tree/Bindings/net/motorcomm,yt8xxx.yaml
+++ b/sys/contrib/device-tree/Bindings/net/motorcomm,yt8xxx.yaml
@@ -52,6 +52,40 @@ properties:
for a timer.
type: boolean
+ motorcomm,rx-clk-drv-microamp:
+ description: |
+ drive strength of rx_clk rgmii pad.
+ The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can
+ be configured with hardware pull-up resistors to match the SOC voltage
+ (usually 1.8V).
+ The software can read the registers to obtain the LDO voltage and configure
+ the legal drive strength(curren).
+ =====================================================
+ | voltage | current Available (uA) |
+ | 1.8v | 1200 2100 2700 2910 3110 3600 3970 4350 |
+ | 3.3v | 3070 4080 4370 4680 5020 5450 5740 6140 |
+ =====================================================
+ enum: [ 1200, 2100, 2700, 2910, 3070, 3110, 3600, 3970,
+ 4080, 4350, 4370, 4680, 5020, 5450, 5740, 6140 ]
+ default: 2910
+
+ motorcomm,rx-data-drv-microamp:
+ description: |
+ drive strength of rx_data/rx_ctl rgmii pad.
+ The YT8531 RGMII LDO voltage supports 1.8V/3.3V, and the LDO voltage can
+ be configured with hardware pull-up resistors to match the SOC voltage
+ (usually 1.8V).
+ The software can read the registers to obtain the LDO voltage and configure
+ the legal drive strength(curren).
+ =====================================================
+ | voltage | current Available (uA) |
+ | 1.8v | 1200 2100 2700 2910 3110 3600 3970 4350 |
+ | 3.3v | 3070 4080 4370 4680 5020 5450 5740 6140 |
+ =====================================================
+ enum: [ 1200, 2100, 2700, 2910, 3070, 3110, 3600, 3970,
+ 4080, 4350, 4370, 4680, 5020, 5450, 5740, 6140 ]
+ default: 2910
+
motorcomm,tx-clk-adj-enabled:
description: |
This configuration is mainly to adapt to VF2 with JH7110 SoC.
diff --git a/sys/contrib/device-tree/Bindings/net/mscc,vsc7514-switch.yaml b/sys/contrib/device-tree/Bindings/net/mscc,vsc7514-switch.yaml
index 8ee2c7d7ff42..86a9c3fc76c8 100644
--- a/sys/contrib/device-tree/Bindings/net/mscc,vsc7514-switch.yaml
+++ b/sys/contrib/device-tree/Bindings/net/mscc,vsc7514-switch.yaml
@@ -24,7 +24,7 @@ allOf:
compatible:
const: mscc,vsc7514-switch
then:
- $ref: ethernet-switch.yaml#
+ $ref: ethernet-switch.yaml#/$defs/ethernet-ports
required:
- interrupts
- interrupt-names
@@ -33,28 +33,18 @@ allOf:
minItems: 21
reg-names:
minItems: 21
- ethernet-ports:
- patternProperties:
- "^port@[0-9a-f]+$":
- $ref: ethernet-switch-port.yaml#
- unevaluatedProperties: false
- if:
properties:
compatible:
const: mscc,vsc7512-switch
then:
- $ref: /schemas/net/dsa/dsa.yaml#
+ $ref: /schemas/net/dsa/dsa.yaml#/$defs/ethernet-ports
properties:
reg:
maxItems: 20
reg-names:
maxItems: 20
- ethernet-ports:
- patternProperties:
- "^port@[0-9a-f]+$":
- $ref: /schemas/net/dsa/dsa-port.yaml#
- unevaluatedProperties: false
properties:
compatible:
@@ -185,7 +175,7 @@ examples:
};
# VSC7512 (DSA)
- |
- ethernet-switch@1{
+ ethernet-switch@1 {
compatible = "mscc,vsc7512-switch";
reg = <0x71010000 0x10000>,
<0x71030000 0x10000>,
@@ -212,22 +202,22 @@ examples:
"port7", "port8", "port9", "port10", "qsys",
"ana", "s0", "s1", "s2";
- ethernet-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
- ethernet = <&mac_sw>;
- phy-handle = <&phy0>;
- phy-mode = "internal";
- };
- port@1 {
- reg = <1>;
- phy-handle = <&phy1>;
- phy-mode = "internal";
- };
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ ethernet = <&mac_sw>;
+ phy-handle = <&phy0>;
+ phy-mode = "internal";
+ };
+ port@1 {
+ reg = <1>;
+ phy-handle = <&phy1>;
+ phy-mode = "internal";
};
};
+ };
...
diff --git a/sys/contrib/device-tree/Bindings/net/nfc/marvell,nci.yaml b/sys/contrib/device-tree/Bindings/net/nfc/marvell,nci.yaml
index 8e9a95f24c80..89663fdd3eba 100644
--- a/sys/contrib/device-tree/Bindings/net/nfc/marvell,nci.yaml
+++ b/sys/contrib/device-tree/Bindings/net/nfc/marvell,nci.yaml
@@ -37,13 +37,13 @@ properties:
type: boolean
description: |
For I2C type of connection. Specifies that the chip read event shall be
- trigged on falling edge.
+ triggered on falling edge.
i2c-int-rising:
type: boolean
description: |
For I2C type of connection. Specifies that the chip read event shall be
- trigged on rising edge.
+ triggered on rising edge.
break-control:
type: boolean
diff --git a/sys/contrib/device-tree/Bindings/net/nxp,tja11xx.yaml b/sys/contrib/device-tree/Bindings/net/nxp,tja11xx.yaml
index ab8867e6939b..85bfa45f5122 100644
--- a/sys/contrib/device-tree/Bindings/net/nxp,tja11xx.yaml
+++ b/sys/contrib/device-tree/Bindings/net/nxp,tja11xx.yaml
@@ -20,6 +20,7 @@ allOf:
patternProperties:
"^ethernet-phy@[0-9a-f]+$":
type: object
+ additionalProperties: false
description: |
Some packages have multiple PHYs. Secondary PHY should be defines as
subnode of the first (parent) PHY.
diff --git a/sys/contrib/device-tree/Bindings/net/pcs/mediatek,sgmiisys.yaml b/sys/contrib/device-tree/Bindings/net/pcs/mediatek,sgmiisys.yaml
index 66a95191bd77..1bacc0eeff75 100644
--- a/sys/contrib/device-tree/Bindings/net/pcs/mediatek,sgmiisys.yaml
+++ b/sys/contrib/device-tree/Bindings/net/pcs/mediatek,sgmiisys.yaml
@@ -15,15 +15,22 @@ description:
properties:
compatible:
- items:
- - enum:
- - mediatek,mt7622-sgmiisys
- - mediatek,mt7629-sgmiisys
- - mediatek,mt7981-sgmiisys_0
- - mediatek,mt7981-sgmiisys_1
- - mediatek,mt7986-sgmiisys_0
- - mediatek,mt7986-sgmiisys_1
- - const: syscon
+ oneOf:
+ - items:
+ - enum:
+ - mediatek,mt7622-sgmiisys
+ - mediatek,mt7629-sgmiisys
+ - mediatek,mt7981-sgmiisys_0
+ - mediatek,mt7981-sgmiisys_1
+ - mediatek,mt7986-sgmiisys_0
+ - mediatek,mt7986-sgmiisys_1
+ - const: syscon
+ - items:
+ - enum:
+ - mediatek,mt7988-sgmiisys0
+ - mediatek,mt7988-sgmiisys1
+ - const: simple-mfd
+ - const: syscon
reg:
maxItems: 1
@@ -35,11 +42,51 @@ properties:
description: Invert polarity of the SGMII data lanes
type: boolean
+ pcs:
+ type: object
+ description: MediaTek LynxI HSGMII PCS
+ properties:
+ compatible:
+ const: mediatek,mt7988-sgmii
+
+ clocks:
+ maxItems: 3
+
+ clock-names:
+ items:
+ - const: sgmii_sel
+ - const: sgmii_tx
+ - const: sgmii_rx
+
+ required:
+ - compatible
+ - clocks
+ - clock-names
+
+ additionalProperties: false
+
required:
- compatible
- reg
- '#clock-cells'
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt7988-sgmiisys0
+ - mediatek,mt7988-sgmiisys1
+
+ then:
+ required:
+ - pcs
+
+ else:
+ properties:
+ pcs: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/net/qca,ar803x.yaml b/sys/contrib/device-tree/Bindings/net/qca,ar803x.yaml
index 161d28919316..3acd09f0da86 100644
--- a/sys/contrib/device-tree/Bindings/net/qca,ar803x.yaml
+++ b/sys/contrib/device-tree/Bindings/net/qca,ar803x.yaml
@@ -75,6 +75,7 @@ properties:
description:
Initial data for the VDDIO regulator. Set this to 1.5V or 1.8V.
$ref: /schemas/regulator/regulator.yaml
+ unevaluatedProperties: false
vddh-regulator:
type: object
@@ -82,6 +83,7 @@ properties:
Dummy subnode to model the external connection of the PHY VDDH
regulator to VDDIO.
$ref: /schemas/regulator/regulator.yaml
+ unevaluatedProperties: false
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml b/sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml
index 2d5e4ffb2f9e..c30218684cfe 100644
--- a/sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml
+++ b/sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml
@@ -43,15 +43,21 @@ description:
properties:
compatible:
- enum:
- - qcom,msm8998-ipa
- - qcom,sc7180-ipa
- - qcom,sc7280-ipa
- - qcom,sdm845-ipa
- - qcom,sdx55-ipa
- - qcom,sdx65-ipa
- - qcom,sm6350-ipa
- - qcom,sm8350-ipa
+ oneOf:
+ - enum:
+ - qcom,msm8998-ipa
+ - qcom,sc7180-ipa
+ - qcom,sc7280-ipa
+ - qcom,sdm845-ipa
+ - qcom,sdx55-ipa
+ - qcom,sdx65-ipa
+ - qcom,sm6350-ipa
+ - qcom,sm8350-ipa
+ - qcom,sm8550-ipa
+ - items:
+ - enum:
+ - qcom,sm8650-ipa
+ - const: qcom,sm8550-ipa
reg:
items:
diff --git a/sys/contrib/device-tree/Bindings/net/renesas,ether.yaml b/sys/contrib/device-tree/Bindings/net/renesas,ether.yaml
index 06b38c9bc6ec..29355ab98569 100644
--- a/sys/contrib/device-tree/Bindings/net/renesas,ether.yaml
+++ b/sys/contrib/device-tree/Bindings/net/renesas,ether.yaml
@@ -81,9 +81,8 @@ properties:
active-high
patternProperties:
- "^ethernet-phy@[0-9a-f]$":
+ "@[0-9a-f]$":
type: object
- $ref: ethernet-phy.yaml#
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/net/renesas,etheravb.yaml b/sys/contrib/device-tree/Bindings/net/renesas,etheravb.yaml
index 3f41294f5997..890f7858d0dc 100644
--- a/sys/contrib/device-tree/Bindings/net/renesas,etheravb.yaml
+++ b/sys/contrib/device-tree/Bindings/net/renesas,etheravb.yaml
@@ -55,9 +55,10 @@ properties:
- items:
- enum:
- - renesas,r9a07g043-gbeth # RZ/G2UL
+ - renesas,r9a07g043-gbeth # RZ/G2UL and RZ/Five
- renesas,r9a07g044-gbeth # RZ/G2{L,LC}
- renesas,r9a07g054-gbeth # RZ/V2L
+ - renesas,r9a08g045-gbeth # RZ/G3S
- const: renesas,rzg2l-gbeth # RZ/{G2L,G2UL,V2L} family
reg: true
@@ -109,9 +110,8 @@ properties:
enum: [0, 2000]
patternProperties:
- "^ethernet-phy@[0-9a-f]$":
+ "@[0-9a-f]$":
type: object
- $ref: ethernet-phy.yaml#
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/net/renesas,ethertsn.yaml b/sys/contrib/device-tree/Bindings/net/renesas,ethertsn.yaml
new file mode 100644
index 000000000000..ea35d19be829
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/renesas,ethertsn.yaml
@@ -0,0 +1,135 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/renesas,ethertsn.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas Ethernet TSN End-station
+
+maintainers:
+ - Niklas Söderlund <niklas.soderlund@ragnatech.se>
+
+description:
+ The RTSN device provides Ethernet network using a 10 Mbps, 100 Mbps, or 1
+ Gbps full-duplex link via MII/GMII/RMII/RGMII. Depending on the connected PHY.
+
+allOf:
+ - $ref: ethernet-controller.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - renesas,r8a779g0-ethertsn # R-Car V4H
+ - const: renesas,rcar-gen4-ethertsn
+
+ reg:
+ items:
+ - description: TSN End Station target
+ - description: generalized Precision Time Protocol target
+
+ reg-names:
+ items:
+ - const: tsnes
+ - const: gptp
+
+ interrupts:
+ items:
+ - description: TX data interrupt
+ - description: RX data interrupt
+
+ interrupt-names:
+ items:
+ - const: tx
+ - const: rx
+
+ clocks:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ phy-mode:
+ contains:
+ enum:
+ - mii
+ - rgmii
+
+ phy-handle:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Specifies a reference to a node representing a PHY device.
+
+ rx-internal-delay-ps:
+ enum: [0, 1800]
+ default: 0
+
+ tx-internal-delay-ps:
+ enum: [0, 2000]
+ default: 0
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+patternProperties:
+ "^ethernet-phy@[0-9a-f]$":
+ type: object
+ $ref: ethernet-phy.yaml#
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - interrupt-names
+ - clocks
+ - power-domains
+ - resets
+ - phy-mode
+ - phy-handle
+ - '#address-cells'
+ - '#size-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/r8a779g0-sysc.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ tsn0: ethernet@e6460000 {
+ compatible = "renesas,r8a779g0-ethertsn", "renesas,rcar-gen4-ethertsn";
+ reg = <0xe6460000 0x7000>,
+ <0xe6449000 0x500>;
+ reg-names = "tsnes", "gptp";
+ interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+ clocks = <&cpg CPG_MOD 2723>;
+ power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+ resets = <&cpg 2723>;
+
+ phy-mode = "rgmii";
+ tx-internal-delay-ps = <2000>;
+ phy-handle = <&phy3>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy3: ethernet-phy@3 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <0>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/rockchip-dwmac.yaml b/sys/contrib/device-tree/Bindings/net/rockchip-dwmac.yaml
index 7f324c6da915..70bbc4220e2a 100644
--- a/sys/contrib/device-tree/Bindings/net/rockchip-dwmac.yaml
+++ b/sys/contrib/device-tree/Bindings/net/rockchip-dwmac.yaml
@@ -80,6 +80,7 @@ properties:
"output" means GMAC provides the reference clock.
$ref: /schemas/types.yaml#/definitions/string
enum: [input, output]
+ default: input
rockchip,grf:
description: The phandle of the syscon node for the general register file.
diff --git a/sys/contrib/device-tree/Bindings/net/samsung-sxgbe.txt b/sys/contrib/device-tree/Bindings/net/samsung-sxgbe.txt
index 2cff6d8a585a..b9381b761a27 100644
--- a/sys/contrib/device-tree/Bindings/net/samsung-sxgbe.txt
+++ b/sys/contrib/device-tree/Bindings/net/samsung-sxgbe.txt
@@ -5,10 +5,10 @@ Required properties:
- reg: Address and length of the register set for the device
- interrupts: Should contain the SXGBE interrupts
These interrupts are ordered by fixed and follows variable
- trasmit DMA interrupts, receive DMA interrupts and lpi interrupt.
+ transmit DMA interrupts, receive DMA interrupts and lpi interrupt.
index 0 - this is fixed common interrupt of SXGBE and it is always
available.
- index 1 to 25 - 8 variable trasmit interrupts, variable 16 receive interrupts
+ index 1 to 25 - 8 variable transmit interrupts, variable 16 receive interrupts
and 1 optional lpi interrupt.
- phy-mode: String, operation mode of the PHY interface.
Supported values are: "sgmii", "xgmii".
diff --git a/sys/contrib/device-tree/Bindings/net/sff,sfp.yaml b/sys/contrib/device-tree/Bindings/net/sff,sfp.yaml
index 973e478a399d..bf6cbc7c2ba3 100644
--- a/sys/contrib/device-tree/Bindings/net/sff,sfp.yaml
+++ b/sys/contrib/device-tree/Bindings/net/sff,sfp.yaml
@@ -120,7 +120,7 @@ examples:
pinctrl-names = "default";
pinctrl-0 = <&cps_sfpp0_pins>;
tx-disable-gpios = <&cps_gpio1 29 GPIO_ACTIVE_HIGH>;
- tx-fault-gpios = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;
};
mdio {
diff --git a/sys/contrib/device-tree/Bindings/net/snps,dwc-qos-ethernet.txt b/sys/contrib/device-tree/Bindings/net/snps,dwc-qos-ethernet.txt
index ad3c6e109ce1..bb0224a3e826 100644
--- a/sys/contrib/device-tree/Bindings/net/snps,dwc-qos-ethernet.txt
+++ b/sys/contrib/device-tree/Bindings/net/snps,dwc-qos-ethernet.txt
@@ -110,7 +110,7 @@ Optional properties:
It depends on the SoC configuration.
- snps,read-requests: Number of read requests that the AXI port can issue.
It depends on the SoC configuration.
-- snps,burst-map: Bitmap of allowed AXI burst lengts, with the LSB
+- snps,burst-map: Bitmap of allowed AXI burst lengths, with the LSB
representing 4, then 8 etc.
- snps,txpbl: DMA Programmable burst length for the TX DMA
- snps,rxpbl: DMA Programmable burst length for the RX DMA
diff --git a/sys/contrib/device-tree/Bindings/net/snps,dwmac.yaml b/sys/contrib/device-tree/Bindings/net/snps,dwmac.yaml
index ddf9522a5dc2..5c2769dc689a 100644
--- a/sys/contrib/device-tree/Bindings/net/snps,dwmac.yaml
+++ b/sys/contrib/device-tree/Bindings/net/snps,dwmac.yaml
@@ -394,6 +394,11 @@ properties:
When a PFC frame is received with priorities matching the bitmask,
the queue is blocked from transmitting for the pause time specified
in the PFC frame.
+
+ snps,coe-unsupported:
+ type: boolean
+ description: TX checksum offload is unsupported by the TX queue.
+
allOf:
- if:
required:
diff --git a/sys/contrib/device-tree/Bindings/net/sti-dwmac.txt b/sys/contrib/device-tree/Bindings/net/sti-dwmac.txt
index 42cd075456ab..e16287c06e5e 100644
--- a/sys/contrib/device-tree/Bindings/net/sti-dwmac.txt
+++ b/sys/contrib/device-tree/Bindings/net/sti-dwmac.txt
@@ -21,7 +21,7 @@ Optional properties:
MAC can generate it.
- st,tx-retime-src: This specifies which clk is wired up to the mac for
retimeing tx lines. This is totally board dependent and can take one of the
- posssible values from "txclk", "clk_125" or "clkgen".
+ possible values from "txclk", "clk_125" or "clkgen".
If not passed, the internal clock will be used by default.
- sti-ethclk: this is the phy clock.
- sti-clkconf: this is an extra sysconfig register, available in new SoCs,
diff --git a/sys/contrib/device-tree/Bindings/net/ti,cc1352p7.yaml b/sys/contrib/device-tree/Bindings/net/ti,cc1352p7.yaml
new file mode 100644
index 000000000000..3dde10de4630
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/ti,cc1352p7.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,cc1352p7.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Simplelink CC1352P7 wireless MCU
+
+description:
+ The CC1352P7 MCU can be connected via SPI or UART.
+
+maintainers:
+ - Ayush Singh <ayushdevel1325@gmail.com>
+
+properties:
+ compatible:
+ const: ti,cc1352p7
+
+ clocks:
+ items:
+ - description: high-frequency main system (MCU and peripherals) clock
+ - description: low-frequency system clock
+
+ clock-names:
+ items:
+ - const: sclk_hf
+ - const: sclk_lf
+
+ reset-gpios:
+ maxItems: 1
+
+ vdds-supply: true
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ serial {
+ mcu {
+ compatible = "ti,cc1352p7";
+ clocks = <&sclk_hf 0>, <&sclk_lf 25>;
+ clock-names = "sclk_hf", "sclk_lf";
+ reset-gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+ vdds-supply = <&vdds>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/ti,cpsw-switch.yaml b/sys/contrib/device-tree/Bindings/net/ti,cpsw-switch.yaml
index b04ac4966608..f07ae3173b03 100644
--- a/sys/contrib/device-tree/Bindings/net/ti,cpsw-switch.yaml
+++ b/sys/contrib/device-tree/Bindings/net/ti,cpsw-switch.yaml
@@ -86,7 +86,7 @@ properties:
const: 0
patternProperties:
- "^port@[0-9]+$":
+ "^port@[12]$":
type: object
description: CPSW external ports
diff --git a/sys/contrib/device-tree/Bindings/net/ti,icss-iep.yaml b/sys/contrib/device-tree/Bindings/net/ti,icss-iep.yaml
new file mode 100644
index 000000000000..f5c22d6dcaee
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/ti,icss-iep.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,icss-iep.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ICSS Industrial Ethernet Peripheral (IEP) module
+
+maintainers:
+ - Md Danish Anwar <danishanwar@ti.com>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - ti,am642-icss-iep
+ - ti,j721e-icss-iep
+ - const: ti,am654-icss-iep
+
+ - const: ti,am654-icss-iep
+
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description: phandle to the IEP source clock
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ /* AM65x */
+ icssg0_iep0: iep@2e000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2e000 0x1000>;
+ clocks = <&icssg0_iepclk_mux>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/ti,icssg-prueth.yaml b/sys/contrib/device-tree/Bindings/net/ti,icssg-prueth.yaml
new file mode 100644
index 000000000000..229c8f32019f
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/ti,icssg-prueth.yaml
@@ -0,0 +1,201 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,icssg-prueth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ICSSG PRUSS Ethernet
+
+maintainers:
+ - Md Danish Anwar <danishanwar@ti.com>
+
+description:
+ Ethernet based on the Programmable Real-Time Unit and Industrial
+ Communication Subsystem.
+
+allOf:
+ - $ref: /schemas/remoteproc/ti,pru-consumer.yaml#
+
+properties:
+ compatible:
+ enum:
+ - ti,am642-icssg-prueth # for AM64x SoC family
+ - ti,am654-icssg-prueth # for AM65x SoC family
+
+ sram:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ phandle to MSMC SRAM node
+
+ dmas:
+ maxItems: 10
+
+ dma-names:
+ items:
+ - const: tx0-0
+ - const: tx0-1
+ - const: tx0-2
+ - const: tx0-3
+ - const: tx1-0
+ - const: tx1-1
+ - const: tx1-2
+ - const: tx1-3
+ - const: rx0
+ - const: rx1
+
+ ti,mii-g-rt:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ phandle to MII_G_RT module's syscon regmap.
+
+ ti,mii-rt:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ phandle to MII_RT module's syscon regmap
+
+ ti,iep:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ maxItems: 2
+ items:
+ maxItems: 1
+ description:
+ phandle to IEP (Industrial Ethernet Peripheral) for ICSSG
+
+ interrupts:
+ maxItems: 2
+ description:
+ Interrupt specifiers to TX timestamp IRQ.
+
+ interrupt-names:
+ items:
+ - const: tx_ts0
+ - const: tx_ts1
+
+ ethernet-ports:
+ type: object
+ additionalProperties: false
+
+ properties:
+ '#address-cells':
+ const: 1
+ '#size-cells':
+ const: 0
+
+ patternProperties:
+ ^port@[0-1]$:
+ type: object
+ description: ICSSG PRUETH external ports
+ $ref: ethernet-controller.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ items:
+ - enum: [0, 1]
+ description: ICSSG PRUETH port number
+
+ interrupts:
+ maxItems: 1
+
+ ti,syscon-rgmii-delay:
+ items:
+ - items:
+ - description: phandle to system controller node
+ - description: The offset to ICSSG control register
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ phandle to system controller node and register offset
+ to ICSSG control register for RGMII transmit delay
+
+ ti,half-duplex-capable:
+ type: boolean
+ description:
+ Indicates that the PHY output pin COL is routed to ICSSG GPIO pin
+ (PRGx_PRU0/1_GPIO10) as input so that the ICSSG MII port is
+ capable of half duplex operations.
+
+ required:
+ - reg
+ anyOf:
+ - required:
+ - port@0
+ - required:
+ - port@1
+
+required:
+ - compatible
+ - sram
+ - dmas
+ - dma-names
+ - ethernet-ports
+ - ti,mii-g-rt
+ - interrupts
+ - interrupt-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ /* Example k3-am654 base board SR2.0, dual-emac */
+ pruss2_eth: ethernet {
+ compatible = "ti,am654-icssg-prueth";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg2_rgmii_pins_default>;
+ sram = <&msmc_ram>;
+
+ ti,prus = <&pru2_0>, <&rtu2_0>, <&tx_pru2_0>,
+ <&pru2_1>, <&rtu2_1>, <&tx_pru2_1>;
+ firmware-name = "ti-pruss/am65x-pru0-prueth-fw.elf",
+ "ti-pruss/am65x-rtu0-prueth-fw.elf",
+ "ti-pruss/am65x-txpru0-prueth-fw.elf",
+ "ti-pruss/am65x-pru1-prueth-fw.elf",
+ "ti-pruss/am65x-rtu1-prueth-fw.elf",
+ "ti-pruss/am65x-txpru1-prueth-fw.elf";
+ ti,pruss-gp-mux-sel = <2>, /* MII mode */
+ <2>,
+ <2>,
+ <2>, /* MII mode */
+ <2>,
+ <2>;
+ dmas = <&main_udmap 0xc300>, /* egress slice 0 */
+ <&main_udmap 0xc301>, /* egress slice 0 */
+ <&main_udmap 0xc302>, /* egress slice 0 */
+ <&main_udmap 0xc303>, /* egress slice 0 */
+ <&main_udmap 0xc304>, /* egress slice 1 */
+ <&main_udmap 0xc305>, /* egress slice 1 */
+ <&main_udmap 0xc306>, /* egress slice 1 */
+ <&main_udmap 0xc307>, /* egress slice 1 */
+ <&main_udmap 0x4300>, /* ingress slice 0 */
+ <&main_udmap 0x4301>; /* ingress slice 1 */
+ dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
+ "tx1-0", "tx1-1", "tx1-2", "tx1-3",
+ "rx0", "rx1";
+ ti,mii-g-rt = <&icssg2_mii_g_rt>;
+ ti,iep = <&icssg2_iep0>, <&icssg2_iep1>;
+ interrupt-parent = <&icssg2_intc>;
+ interrupts = <24 0 2>, <25 1 3>;
+ interrupt-names = "tx_ts0", "tx_ts1";
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pruss2_emac0: port@0 {
+ reg = <0>;
+ phy-handle = <&pruss2_eth0_phy>;
+ phy-mode = "rgmii-id";
+ interrupts-extended = <&icssg2_intc 24>;
+ ti,syscon-rgmii-delay = <&scm_conf 0x4120>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+
+ pruss2_emac1: port@1 {
+ reg = <1>;
+ phy-handle = <&pruss2_eth1_phy>;
+ phy-mode = "rgmii-id";
+ interrupts-extended = <&icssg2_intc 25>;
+ ti,syscon-rgmii-delay = <&scm_conf 0x4124>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/net/wireless/mediatek,mt76.yaml b/sys/contrib/device-tree/Bindings/net/wireless/mediatek,mt76.yaml
index 67b63f119f64..252207adbc54 100644
--- a/sys/contrib/device-tree/Bindings/net/wireless/mediatek,mt76.yaml
+++ b/sys/contrib/device-tree/Bindings/net/wireless/mediatek,mt76.yaml
@@ -28,6 +28,7 @@ properties:
- mediatek,mt76
- mediatek,mt7628-wmac
- mediatek,mt7622-wmac
+ - mediatek,mt7981-wmac
- mediatek,mt7986-wmac
reg:
@@ -71,6 +72,14 @@ properties:
ieee80211-freq-limit: true
+ nvmem-cells:
+ items:
+ - description: NVMEM cell with EEPROM
+
+ nvmem-cell-names:
+ items:
+ - const: eeprom
+
mediatek,eeprom-data:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
@@ -84,6 +93,7 @@ properties:
- description: offset containing EEPROM data
description:
Phandle to a MTD partition + offset containing EEPROM data
+ deprecated: true
big-endian:
$ref: /schemas/types.yaml#/definitions/flag
@@ -258,7 +268,8 @@ examples:
interrupt-parent = <&cpuintc>;
interrupts = <6>;
- mediatek,mtd-eeprom = <&factory 0x0>;
+ nvmem-cells = <&eeprom>;
+ nvmem-cell-names = "eeprom";
};
- |
diff --git a/sys/contrib/device-tree/Bindings/net/xlnx,axi-ethernet.yaml b/sys/contrib/device-tree/Bindings/net/xlnx,axi-ethernet.yaml
index 1d33d80af11c..bbe89ea9590c 100644
--- a/sys/contrib/device-tree/Bindings/net/xlnx,axi-ethernet.yaml
+++ b/sys/contrib/device-tree/Bindings/net/xlnx,axi-ethernet.yaml
@@ -122,6 +122,20 @@ properties:
and "phy-handle" should point to an external PHY if exists.
maxItems: 1
+ dmas:
+ minItems: 2
+ maxItems: 32
+ description: TX and RX DMA channel phandle
+
+ dma-names:
+ items:
+ pattern: "^[tr]x_chan([0-9]|1[0-5])$"
+ description:
+ Should be "tx_chan0", "tx_chan1" ... "tx_chan15" for DMA Tx channel
+ Should be "rx_chan0", "rx_chan1" ... "rx_chan15" for DMA Rx channel
+ minItems: 2
+ maxItems: 32
+
required:
- compatible
- interrupts
@@ -143,6 +157,8 @@ examples:
clocks = <&axi_clk>, <&axi_clk>, <&pl_enet_ref_clk>, <&mgt_clk>;
phy-mode = "mii";
reg = <0x40c00000 0x40000>,<0x50c00000 0x40000>;
+ dmas = <&xilinx_dma 0>, <&xilinx_dma 1>;
+ dma-names = "tx_chan0", "rx_chan0";
xlnx,rxcsum = <0x2>;
xlnx,rxmem = <0x800>;
xlnx,txcsum = <0x2>;
diff --git a/sys/contrib/device-tree/Bindings/net/xlnx,gmii-to-rgmii.yaml b/sys/contrib/device-tree/Bindings/net/xlnx,gmii-to-rgmii.yaml
new file mode 100644
index 000000000000..0f781dac6717
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/net/xlnx,gmii-to-rgmii.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/xlnx,gmii-to-rgmii.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx GMII to RGMII Converter
+
+maintainers:
+ - Harini Katakam <harini.katakam@amd.com>
+
+description:
+ The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media
+ Independent Interface (RGMII) core provides the RGMII between RGMII-compliant
+ ethernet physical media devices (PHY) and the Gigabit Ethernet controller.
+ This core can be used in all three modes of operation(10/100/1000 Mb/s).
+ The Management Data Input/Output (MDIO) interface is used to configure the
+ speed of operation. This core can switch dynamically between the three
+ different speed modes by configuring the converter register through mdio write.
+ The core cannot function without an external phy connected to it.
+
+properties:
+ compatible:
+ const: xlnx,gmii-to-rgmii-1.0
+
+ reg:
+ minimum: 0
+ maximum: 31
+ description: The ID number for the phy.
+
+ phy-handle:
+ $ref: ethernet-controller.yaml#/properties/phy-handle
+
+required:
+ - compatible
+ - reg
+ - phy-handle
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy: ethernet-phy@0 {
+ reg = <0>;
+ };
+ gmiitorgmii@8 {
+ compatible = "xlnx,gmii-to-rgmii-1.0";
+ reg = <8>;
+ phy-handle = <&phy>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/nios2/nios2.txt b/sys/contrib/device-tree/Bindings/nios2/nios2.txt
index b95e831bcba3..3e9cabe667b3 100644
--- a/sys/contrib/device-tree/Bindings/nios2/nios2.txt
+++ b/sys/contrib/device-tree/Bindings/nios2/nios2.txt
@@ -23,7 +23,7 @@ Required properties:
- altr,tlb-num-ways: Specifies the number of set-associativity ways in the TLB.
- altr,tlb-num-entries: Specifies the number of entries in the TLB.
- altr,tlb-ptr-sz: Specifies size of TLB pointer.
-- altr,has-mul: Specifies CPU hardware multipy support, should be 1.
+- altr,has-mul: Specifies CPU hardware multiply support, should be 1.
- altr,has-mmu: Specifies CPU support MMU support, should be 1.
- altr,has-initda: Specifies CPU support initda instruction, should be 1.
- altr,reset-addr: Specifies CPU reset address
diff --git a/sys/contrib/device-tree/Bindings/nvmem/allwinner,sun4i-a10-sid.yaml b/sys/contrib/device-tree/Bindings/nvmem/allwinner,sun4i-a10-sid.yaml
index 296001e7f498..4424c3c5e75c 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/allwinner,sun4i-a10-sid.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/allwinner,sun4i-a10-sid.yaml
@@ -12,6 +12,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
@@ -23,7 +24,9 @@ properties:
- const: allwinner,sun20i-d1-sid
- const: allwinner,sun50i-a64-sid
- items:
- - const: allwinner,sun50i-a100-sid
+ - enum:
+ - allwinner,sun50i-a100-sid
+ - allwinner,sun50i-h616-sid
- const: allwinner,sun50i-a64-sid
- const: allwinner,sun50i-h5-sid
- const: allwinner,sun50i-h6-sid
diff --git a/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson-gxbb-efuse.yaml b/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson-gxbb-efuse.yaml
index e49c2754ff55..9801fe6f91b5 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson-gxbb-efuse.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson-gxbb-efuse.yaml
@@ -11,6 +11,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson6-efuse.yaml b/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson6-efuse.yaml
index 84b3dfd21e09..b5cf740f96fa 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson6-efuse.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/amlogic,meson6-efuse.yaml
@@ -12,6 +12,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/apple,efuses.yaml b/sys/contrib/device-tree/Bindings/nvmem/apple,efuses.yaml
index e0860b6b85f3..d3abdafdbca0 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/apple,efuses.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/apple,efuses.yaml
@@ -16,6 +16,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/fsl,t1023-sfp.yaml b/sys/contrib/device-tree/Bindings/nvmem/fsl,t1023-sfp.yaml
new file mode 100644
index 000000000000..df826b40d8ca
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/nvmem/fsl,t1023-sfp.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/fsl,t1023-sfp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP QorIQ eFuse support
+
+maintainers:
+ - Richard Alpe <richard@bit42.se>
+
+description:
+ Read support for the eFuses (SFP) on NXP QorIQ series SoC's.
+
+allOf:
+ - $ref: nvmem.yaml#
+
+properties:
+ compatible:
+ const: fsl,t1023-sfp
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ efuse@e8000 {
+ compatible = "fsl,t1023-sfp";
+ reg = <0xe8000 0x1000>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/nvmem/imx-ocotp.yaml b/sys/contrib/device-tree/Bindings/nvmem/imx-ocotp.yaml
index 99e60d713dac..be1314454bec 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/imx-ocotp.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/imx-ocotp.yaml
@@ -16,6 +16,7 @@ description: |
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-cell.yaml b/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-cell.yaml
index e698098450e1..ac2381e66027 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-cell.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-cell.yaml
@@ -11,6 +11,15 @@ maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
properties:
+ compatible:
+ oneOf:
+ - const: mac-base
+ description: >
+ Cell with base MAC address to be used for calculating extra relative
+ addresses.
+ It can be stored in a plain binary format (cell length 6) or as an
+ ASCII text like "00:11:22:33:44:55" (cell length 17).
+
reg:
maxItems: 1
@@ -25,6 +34,23 @@ properties:
description:
Size in bit within the address range specified by reg.
+allOf:
+ - if:
+ required: [ compatible ]
+ then:
+ if:
+ properties:
+ compatible:
+ contains:
+ const: mac-base
+ then:
+ properties:
+ "#nvmem-cell-cells":
+ description: The first argument is a MAC address offset.
+ const: 1
+ required:
+ - "#nvmem-cell-cells"
+
required:
- reg
diff --git a/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-layout.yaml b/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-layout.yaml
index c271537d0714..9bd34bd5af30 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-layout.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/layouts/fixed-layout.yaml
@@ -44,6 +44,18 @@ examples:
#address-cells = <1>;
#size-cells = <1>;
+ mac@100 {
+ compatible = "mac-base";
+ reg = <0x100 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
+ mac@110 {
+ compatible = "mac-base";
+ reg = <0x110 0x11>;
+ #nvmem-cell-cells = <1>;
+ };
+
calibration@4000 {
reg = <0x4000 0x100>;
};
diff --git a/sys/contrib/device-tree/Bindings/nvmem/layouts/onie,tlv-layout.yaml b/sys/contrib/device-tree/Bindings/nvmem/layouts/onie,tlv-layout.yaml
index 714a6538cc7c..ee8ac322332d 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/layouts/onie,tlv-layout.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/layouts/onie,tlv-layout.yaml
@@ -14,7 +14,7 @@ description:
infrastructure shall provide a non-volatile memory with a table whose the
content is well specified and gives many information about the manufacturer
(name, country of manufacture, etc) as well as device caracteristics (serial
- number, hardware version, mac addresses, etc). The underlaying device type
+ number, hardware version, mac addresses, etc). The underlying device type
(flash, EEPROM,...) is not specified. The exact location of each value is also
dynamic and should be discovered at run time because it depends on the
parameters the manufacturer decided to embed.
diff --git a/sys/contrib/device-tree/Bindings/nvmem/mediatek,efuse.yaml b/sys/contrib/device-tree/Bindings/nvmem/mediatek,efuse.yaml
index 7ec2988b597e..cf5f9e22bb7e 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/mediatek,efuse.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/mediatek,efuse.yaml
@@ -16,6 +16,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
$nodename:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/microchip,sama7g5-otpc.yaml b/sys/contrib/device-tree/Bindings/nvmem/microchip,sama7g5-otpc.yaml
index a296d348adb4..cc25f2927682 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/microchip,sama7g5-otpc.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/microchip,sama7g5-otpc.yaml
@@ -16,6 +16,7 @@ description: |
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/mxs-ocotp.yaml b/sys/contrib/device-tree/Bindings/nvmem/mxs-ocotp.yaml
index a9b822aeaa7e..d9287be89877 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/mxs-ocotp.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/mxs-ocotp.yaml
@@ -11,12 +11,15 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
- enum:
- - fsl,imx23-ocotp
- - fsl,imx28-ocotp
+ items:
+ - enum:
+ - fsl,imx23-ocotp
+ - fsl,imx28-ocotp
+ - const: fsl,ocotp
reg:
maxItems: 1
@@ -34,7 +37,7 @@ unevaluatedProperties: false
examples:
- |
ocotp: efuse@8002c000 {
- compatible = "fsl,imx28-ocotp";
+ compatible = "fsl,imx28-ocotp", "fsl,ocotp";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x8002c000 0x2000>;
diff --git a/sys/contrib/device-tree/Bindings/nvmem/nvmem-deprecated-cells.yaml b/sys/contrib/device-tree/Bindings/nvmem/nvmem-deprecated-cells.yaml
new file mode 100644
index 000000000000..951af28bbfb3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/nvmem/nvmem-deprecated-cells.yaml
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/nvmem-deprecated-cells.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVMEM old syntax for fixed cells
+
+maintainers:
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+ Before introducing NVMEM layouts all NVMEM (fixed) cells were defined
+ as direct device subnodes. That syntax was replaced by "fixed-layout"
+ and is deprecated now. No new bindings should use it.
+
+patternProperties:
+ "@[0-9a-f]+(,[0-7])?$":
+ type: object
+ allOf:
+ - $ref: layouts/fixed-cell.yaml
+ - properties:
+ compatible: false
+ deprecated: true
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml b/sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml
index 980244100690..4fd015d402ce 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml
@@ -46,12 +46,6 @@ properties:
container may reference more advanced (dynamic) layout
parsers.
-patternProperties:
- "@[0-9a-f]+(,[0-7])?$":
- type: object
- $ref: layouts/fixed-cell.yaml
- deprecated: true
-
additionalProperties: true
examples:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/qcom,qfprom.yaml b/sys/contrib/device-tree/Bindings/nvmem/qcom,qfprom.yaml
index 6cd4682a167d..8c8f05d9eaf1 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/qcom,qfprom.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/qcom,qfprom.yaml
@@ -11,6 +11,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
@@ -23,11 +24,13 @@ properties:
- qcom,ipq8064-qfprom
- qcom,ipq8074-qfprom
- qcom,ipq9574-qfprom
+ - qcom,msm8226-qfprom
- qcom,msm8916-qfprom
- qcom,msm8974-qfprom
- qcom,msm8976-qfprom
- qcom,msm8996-qfprom
- qcom,msm8998-qfprom
+ - qcom,qcm2290-qfprom
- qcom,qcs404-qfprom
- qcom,sc7180-qfprom
- qcom,sc7280-qfprom
diff --git a/sys/contrib/device-tree/Bindings/nvmem/qcom,sec-qfprom.yaml b/sys/contrib/device-tree/Bindings/nvmem/qcom,sec-qfprom.yaml
new file mode 100644
index 000000000000..2ada2099946d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/nvmem/qcom,sec-qfprom.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/qcom,sec-qfprom.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies Inc, Secure QFPROM Efuse
+
+maintainers:
+ - Komal Bajaj <quic_kbajaj@quicinc.com>
+
+description:
+ For some of the Qualcomm SoC's, it is possible that the qfprom region is
+ protected from non-secure access. In such situations, the OS have to use
+ secure calls to read the region.
+
+allOf:
+ - $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - qcom,qdu1000-sec-qfprom
+ - const: qcom,sec-qfprom
+
+ reg:
+ items:
+ - description: The secure qfprom corrected region.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ efuse@221c8000 {
+ compatible = "qcom,qdu1000-sec-qfprom", "qcom,sec-qfprom";
+ reg = <0 0x221c8000 0 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ multi_chan_ddr: multi-chan-ddr@12b {
+ reg = <0x12b 0x1>;
+ bits = <0 2>;
+ };
+ };
+ };
+
diff --git a/sys/contrib/device-tree/Bindings/nvmem/qcom,spmi-sdam.yaml b/sys/contrib/device-tree/Bindings/nvmem/qcom,spmi-sdam.yaml
index cd980def97b8..068bedf5dbc9 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/qcom,spmi-sdam.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/qcom,spmi-sdam.yaml
@@ -16,6 +16,7 @@ description: |
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/rockchip,otp.yaml b/sys/contrib/device-tree/Bindings/nvmem/rockchip,otp.yaml
index 9c6eff788928..a44d44b32809 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/rockchip,otp.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/rockchip,otp.yaml
@@ -49,6 +49,7 @@ required:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
- if:
properties:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/rockchip-efuse.yaml b/sys/contrib/device-tree/Bindings/nvmem/rockchip-efuse.yaml
index c5403e149080..b80fd8d1ae5b 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/rockchip-efuse.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/rockchip-efuse.yaml
@@ -11,6 +11,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/socionext,uniphier-efuse.yaml b/sys/contrib/device-tree/Bindings/nvmem/socionext,uniphier-efuse.yaml
index efccc5aacbe0..e27cbae2d63a 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/socionext,uniphier-efuse.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/socionext,uniphier-efuse.yaml
@@ -12,6 +12,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/st,stm32-romem.yaml b/sys/contrib/device-tree/Bindings/nvmem/st,stm32-romem.yaml
index a69de3e92282..92bfe25f0571 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/st,stm32-romem.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/st,stm32-romem.yaml
@@ -24,6 +24,7 @@ properties:
- st,stm32f4-otp
- st,stm32mp13-bsec
- st,stm32mp15-bsec
+ - st,stm32mp25-bsec
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/nvmem/sunplus,sp7021-ocotp.yaml b/sys/contrib/device-tree/Bindings/nvmem/sunplus,sp7021-ocotp.yaml
index da3f1de7d281..af97eeb8316c 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/sunplus,sp7021-ocotp.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/sunplus,sp7021-ocotp.yaml
@@ -12,6 +12,7 @@ maintainers:
allOf:
- $ref: nvmem.yaml#
+ - $ref: nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/nvmem/u-boot,env.yaml b/sys/contrib/device-tree/Bindings/nvmem/u-boot,env.yaml
index 36d97fb87865..9c36afc7084b 100644
--- a/sys/contrib/device-tree/Bindings/nvmem/u-boot,env.yaml
+++ b/sys/contrib/device-tree/Bindings/nvmem/u-boot,env.yaml
@@ -51,6 +51,8 @@ properties:
ethaddr:
type: object
description: Ethernet interfaces base MAC address.
+ additionalProperties: false
+
properties:
"#nvmem-cell-cells":
description: The first argument is a MAC address offset.
diff --git a/sys/contrib/device-tree/Bindings/opp/operating-points-v2-ti-cpu.yaml b/sys/contrib/device-tree/Bindings/opp/operating-points-v2-ti-cpu.yaml
new file mode 100644
index 000000000000..02d1d2c17129
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/opp/operating-points-v2-ti-cpu.yaml
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/operating-points-v2-ti-cpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI CPU OPP (Operating Performance Points)
+
+description:
+ TI SoCs, like those in the AM335x, AM437x, AM57xx, AM62x, and DRA7xx
+ families, the CPU frequencies subset and the voltage value of each
+ OPP vary based on the silicon variant used. The data sheet sections
+ corresponding to "Operating Performance Points" describe the frequency
+ and voltage values based on device type and speed bin information
+ blown in corresponding eFuse bits as referred to by the Technical
+ Reference Manual.
+
+ This document extends the operating-points-v2 binding by providing
+ the hardware description for the scheme mentioned above.
+
+maintainers:
+ - Nishanth Menon <nm@ti.com>
+
+allOf:
+ - $ref: opp-v2-base.yaml#
+
+properties:
+ compatible:
+ const: operating-points-v2-ti-cpu
+
+ syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: |
+ points to syscon node representing the control module
+ register space of the SoC.
+
+ opp-shared: true
+
+patternProperties:
+ '^opp(-?[0-9]+)*$':
+ type: object
+ additionalProperties: false
+
+ properties:
+ clock-latency-ns: true
+ opp-hz: true
+ opp-microvolt: true
+ opp-supported-hw: true
+ opp-suspend: true
+ turbo-mode: true
+
+ required:
+ - opp-hz
+ - opp-supported-hw
+
+required:
+ - compatible
+ - syscon
+
+additionalProperties: false
+
+examples:
+ - |
+ opp-table {
+ compatible = "operating-points-v2-ti-cpu";
+ syscon = <&scm_conf>;
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ opp-microvolt = <1100000 1078000 1122000>;
+ opp-supported-hw = <0x06 0x0020>;
+ opp-suspend;
+ };
+
+ opp-500000000 {
+ opp-hz = /bits/ 64 <500000000>;
+ opp-microvolt = <1100000 1078000 1122000>;
+ opp-supported-hw = <0x01 0xFFFF>;
+ };
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <1100000 1078000 1122000>;
+ opp-supported-hw = <0x06 0x0040>;
+ };
+
+ opp-1000000000 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-microvolt = <1325000 1298500 1351500>;
+ opp-supported-hw = <0x04 0x0200>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/opp/opp-v2-base.yaml b/sys/contrib/device-tree/Bindings/opp/opp-v2-base.yaml
index 47e6f36b7637..e2f8f7af3cf4 100644
--- a/sys/contrib/device-tree/Bindings/opp/opp-v2-base.yaml
+++ b/sys/contrib/device-tree/Bindings/opp/opp-v2-base.yaml
@@ -56,7 +56,7 @@ patternProperties:
need to be configured and that is left for the implementation
specific binding.
minItems: 1
- maxItems: 16
+ maxItems: 32
items:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/opp/opp-v2-kryo-cpu.yaml b/sys/contrib/device-tree/Bindings/opp/opp-v2-kryo-cpu.yaml
index bbbad31ae4ca..fd04d060c1de 100644
--- a/sys/contrib/device-tree/Bindings/opp/opp-v2-kryo-cpu.yaml
+++ b/sys/contrib/device-tree/Bindings/opp/opp-v2-kryo-cpu.yaml
@@ -26,7 +26,9 @@ description: |
properties:
compatible:
- const: operating-points-v2-kryo-cpu
+ enum:
+ - operating-points-v2-krait-cpu
+ - operating-points-v2-kryo-cpu
nvmem-cells:
description: |
@@ -47,6 +49,8 @@ patternProperties:
opp-microvolt: true
+ opp-peak-kBps: true
+
opp-supported-hw:
description: |
A single 32 bit bitmap value, representing compatible HW.
@@ -63,14 +67,22 @@ patternProperties:
5: MSM8996SG, speedbin 1
6: MSM8996SG, speedbin 2
7-31: unused
- enum: [0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
- 0x9, 0xd, 0xe, 0xf,
- 0x10, 0x20, 0x30, 0x70]
+
+ Bitmap for IPQ806x SoC:
+ 0: IPQ8062
+ 1: IPQ8064/IPQ8066/IPQ8068
+ 2: IPQ8065/IPQ8069
+ 3-31: unused
+
+ Other platforms use bits directly corresponding to speedbin index.
clock-latency-ns: true
required-opps: true
+ patternProperties:
+ '^opp-microvolt-speed[0-9]+-pvs[0-9]+$': true
+
required:
- opp-hz
@@ -256,6 +268,22 @@ examples:
};
};
+ /* Dummy opp table to give example for named opp-microvolt */
+ opp-table-2 {
+ compatible = "operating-points-v2-krait-cpu";
+ nvmem-cells = <&speedbin_efuse>;
+
+ opp-384000000 {
+ opp-hz = /bits/ 64 <384000000>;
+ opp-microvolt-speed0-pvs0 = <1000000 950000 1050000>;
+ opp-microvolt-speed0-pvs1 = <925000 878750 971250>;
+ opp-microvolt-speed0-pvs2 = <875000 831250 918750>;
+ opp-microvolt-speed0-pvs3 = <800000 760000 840000>;
+ opp-supported-hw = <0x7>;
+ clock-latency-ns = <100000>;
+ };
+ };
+
smem {
compatible = "qcom,smem";
memory-region = <&smem_mem>;
diff --git a/sys/contrib/device-tree/Bindings/opp/ti,omap-opp-supply.yaml b/sys/contrib/device-tree/Bindings/opp/ti,omap-opp-supply.yaml
new file mode 100644
index 000000000000..693f22539606
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/opp/ti,omap-opp-supply.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/ti,omap-opp-supply.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OMAP compatible OPP supply
+
+description:
+ OMAP5, DRA7, and AM57 families of SoCs have Class 0 AVS eFuse
+ registers, which contain OPP-specific voltage information tailored
+ for the specific device. This binding provides the information
+ needed to describe such a hardware values and relate them to program
+ the primary regulator during an OPP transition.
+
+ Also, some supplies may have an associated vbb-supply, an Adaptive
+ Body Bias regulator, which must transition in a specific sequence
+ w.r.t the vdd-supply and clk when making an OPP transition. By
+ supplying two regulators to the device that will undergo OPP
+ transitions, we can use the multi-regulator support implemented by
+ the OPP core to describe both regulators the platform needs. The
+ OPP core binding Documentation/devicetree/bindings/opp/opp-v2.yaml
+ provides further information (refer to Example 4 Handling multiple
+ regulators).
+
+maintainers:
+ - Nishanth Menon <nm@ti.com>
+
+properties:
+ $nodename:
+ pattern: '^opp-supply(@[0-9a-f]+)?$'
+
+ compatible:
+ oneOf:
+ - description: Basic OPP supply controlling VDD and VBB
+ const: ti,omap-opp-supply
+ - description: OMAP5+ optimized voltages in efuse(Class 0) VDD along with
+ VBB.
+ const: ti,omap5-opp-supply
+ - description: OMAP5+ optimized voltages in efuse(class0) VDD but no VBB
+ const: ti,omap5-core-opp-supply
+
+ reg:
+ maxItems: 1
+
+ ti,absolute-max-voltage-uv:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Absolute maximum voltage for the OPP supply in micro-volts.
+ minimum: 750000
+ maximum: 1500000
+
+ ti,efuse-settings:
+ description: An array of u32 tuple items providing information about
+ optimized efuse configuration.
+ minItems: 1
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ items:
+ items:
+ - description: Reference voltage in micro-volts (OPP Voltage)
+ minimum: 750000
+ maximum: 1500000
+ multipleOf: 10000
+ - description: efuse offset where the optimized voltage is located
+ multipleOf: 4
+ maximum: 256
+
+required:
+ - compatible
+ - ti,absolute-max-voltage-uv
+
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: ti,omap-opp-supply
+ then:
+ required:
+ - reg
+ - ti,efuse-settings
+
+additionalProperties: false
+
+examples:
+ - |
+ opp-supply {
+ compatible = "ti,omap-opp-supply";
+ ti,absolute-max-voltage-uv = <1375000>;
+ };
+ - |
+ opp-supply@4a003b20 {
+ compatible = "ti,omap5-opp-supply";
+ reg = <0x4a003b20 0x8>;
+ ti,efuse-settings =
+ /* uV offset */
+ <1060000 0x0>,
+ <1160000 0x4>,
+ <1210000 0x8>;
+ ti,absolute-max-voltage-uv = <1500000>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/pci/brcm,iproc-pcie.yaml b/sys/contrib/device-tree/Bindings/pci/brcm,iproc-pcie.yaml
index 0972868735fc..0e07ab61a48d 100644
--- a/sys/contrib/device-tree/Bindings/pci/brcm,iproc-pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/brcm,iproc-pcie.yaml
@@ -12,7 +12,6 @@ maintainers:
allOf:
- $ref: /schemas/pci/pci-bus.yaml#
- - $ref: /schemas/interrupt-controller/msi-controller.yaml#
properties:
compatible:
@@ -34,13 +33,6 @@ properties:
description: >
Base address and length of the PCIe controller I/O register space
- interrupt-map: true
-
- interrupt-map-mask: true
-
- "#interrupt-cells":
- const: 1
-
ranges:
minItems: 1
maxItems: 2
@@ -54,16 +46,8 @@ properties:
items:
- const: pcie-phy
- bus-range: true
-
dma-coherent: true
- "#address-cells": true
-
- "#size-cells": true
-
- device_type: true
-
brcm,pcie-ob:
type: boolean
description: >
@@ -78,20 +62,24 @@ properties:
msi:
type: object
+ $ref: /schemas/interrupt-controller/msi-controller.yaml#
+ unevaluatedProperties: false
+
properties:
compatible:
items:
- const: brcm,iproc-msi
- msi-parent: true
+ interrupts:
+ maxItems: 4
- msi-controller: true
+ brcm,pcie-msi-inten:
+ type: boolean
+ description:
+ Needs to be present for some older iProc platforms that require the
+ interrupt enable registers to be set explicitly to enable MSI
- brcm,pcie-msi-inten:
- type: boolean
- description: >
- Needs to be present for some older iProc platforms that require the
- interrupt enable registers to be set explicitly to enable MSI
+ msi-parent: true
dependencies:
brcm,pcie-ob-axi-offset: ["brcm,pcie-ob"]
@@ -117,68 +105,69 @@ unevaluatedProperties: false
examples:
- |
- #include <dt-bindings/interrupt-controller/arm-gic.h>
-
- bus {
- #address-cells = <1>;
- #size-cells = <1>;
- pcie0: pcie@18012000 {
- compatible = "brcm,iproc-pcie";
- reg = <0x18012000 0x1000>;
-
- #interrupt-cells = <1>;
- interrupt-map-mask = <0 0 0 0>;
- interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
-
- linux,pci-domain = <0>;
-
- bus-range = <0x00 0xff>;
-
- #address-cells = <3>;
- #size-cells = <2>;
- device_type = "pci";
- ranges = <0x81000000 0 0 0x28000000 0 0x00010000>,
- <0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
-
- phys = <&phy 0 5>;
- phy-names = "pcie-phy";
-
- brcm,pcie-ob;
- brcm,pcie-ob-axi-offset = <0x00000000>;
-
- msi-parent = <&msi0>;
-
- /* iProc event queue based MSI */
- msi0: msi {
- compatible = "brcm,iproc-msi";
- msi-controller;
- interrupt-parent = <&gic>;
- interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
- <GIC_SPI 97 IRQ_TYPE_NONE>,
- <GIC_SPI 98 IRQ_TYPE_NONE>,
- <GIC_SPI 99 IRQ_TYPE_NONE>;
- };
- };
-
- pcie1: pcie@18013000 {
- compatible = "brcm,iproc-pcie";
- reg = <0x18013000 0x1000>;
-
- #interrupt-cells = <1>;
- interrupt-map-mask = <0 0 0 0>;
- interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
-
- linux,pci-domain = <1>;
-
- bus-range = <0x00 0xff>;
-
- #address-cells = <3>;
- #size-cells = <2>;
- device_type = "pci";
- ranges = <0x81000000 0 0 0x48000000 0 0x00010000>,
- <0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
-
- phys = <&phy 1 6>;
- phy-names = "pcie-phy";
- };
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ gic: interrupt-controller {
+ interrupt-controller;
+ #interrupt-cells = <3>;
+ };
+
+ pcie@18012000 {
+ compatible = "brcm,iproc-pcie";
+ reg = <0x18012000 0x1000>;
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0>;
+ interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
+
+ linux,pci-domain = <0>;
+
+ bus-range = <0x00 0xff>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ ranges = <0x81000000 0 0 0x28000000 0 0x00010000>,
+ <0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
+
+ phys = <&phy 0 5>;
+ phy-names = "pcie-phy";
+
+ brcm,pcie-ob;
+ brcm,pcie-ob-axi-offset = <0x00000000>;
+
+ msi-parent = <&msi0>;
+
+ /* iProc event queue based MSI */
+ msi0: msi {
+ compatible = "brcm,iproc-msi";
+ msi-controller;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
+ <GIC_SPI 97 IRQ_TYPE_NONE>,
+ <GIC_SPI 98 IRQ_TYPE_NONE>,
+ <GIC_SPI 99 IRQ_TYPE_NONE>;
+ };
+ };
+ - |
+ pcie@18013000 {
+ compatible = "brcm,iproc-pcie";
+ reg = <0x18013000 0x1000>;
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0>;
+ interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
+
+ linux,pci-domain = <1>;
+
+ bus-range = <0x00 0xff>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ ranges = <0x81000000 0 0 0x48000000 0 0x00010000>,
+ <0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
+
+ phys = <&phy 1 6>;
+ phy-names = "pcie-phy";
};
diff --git a/sys/contrib/device-tree/Bindings/pci/brcm,stb-pcie.yaml b/sys/contrib/device-tree/Bindings/pci/brcm,stb-pcie.yaml
index 7e15aae7d69e..22491f7f8852 100644
--- a/sys/contrib/device-tree/Bindings/pci/brcm,stb-pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/brcm,stb-pcie.yaml
@@ -64,6 +64,24 @@ properties:
aspm-no-l0s: true
+ brcm,clkreq-mode:
+ description: A string that determines the operating
+ clkreq mode of the PCIe RC HW with respect to controlling the refclk
+ signal. There are three different modes -- "safe", which drives the
+ refclk signal unconditionally and will work for all devices but does
+ not provide any power savings; "no-l1ss" -- which provides Clock
+ Power Management, L0s, and L1, but cannot provide L1 substate (L1SS)
+ power savings. If the downstream device connected to the RC is L1SS
+ capable AND the OS enables L1SS, all PCIe traffic may abruptly halt,
+ potentially hanging the system; "default" -- which provides L0s, L1,
+ and L1SS, but not compliant to provide Clock Power Management;
+ specifically, may not be able to meet the T_CLRon max timing of 400ns
+ as specified in "Dynamic Clock Control", section 3.2.5.2.2 PCI
+ Express Mini CEM 2.1 specification. This situation is atypical and
+ should happen only with older devices.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [ safe, no-l1ss, default ]
+
brcm,scb-sizes:
description: u64 giving the 64bit PCIe memory
viewport size of a memory controller. There may be up to
diff --git a/sys/contrib/device-tree/Bindings/pci/qcom,pcie-ep.yaml b/sys/contrib/device-tree/Bindings/pci/qcom,pcie-ep.yaml
index 811112255d7d..a223ce029cab 100644
--- a/sys/contrib/device-tree/Bindings/pci/qcom,pcie-ep.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/qcom,pcie-ep.yaml
@@ -11,10 +11,13 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,sdx55-pcie-ep
- - qcom,sdx65-pcie-ep
- - qcom,sm8450-pcie-ep
+ oneOf:
+ - enum:
+ - qcom,sdx55-pcie-ep
+ - qcom,sm8450-pcie-ep
+ - items:
+ - const: qcom,sdx65-pcie-ep
+ - const: qcom,sdx55-pcie-ep
reg:
items:
@@ -71,6 +74,14 @@ properties:
description: GPIO used as WAKE# output signal
maxItems: 1
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ items:
+ - const: pcie-mem
+ - const: cpu-pcie
+
resets:
maxItems: 1
@@ -98,6 +109,8 @@ required:
- interrupts
- interrupt-names
- reset-gpios
+ - interconnects
+ - interconnect-names
- resets
- reset-names
- power-domains
@@ -110,7 +123,6 @@ allOf:
contains:
enum:
- qcom,sdx55-pcie-ep
- - qcom,sdx65-pcie-ep
then:
properties:
clocks:
@@ -167,7 +179,9 @@ examples:
- |
#include <dt-bindings/clock/qcom,gcc-sdx55.h>
#include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interconnect/qcom,sdx55.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+
pcie_ep: pcie-ep@1c00000 {
compatible = "qcom,sdx55-pcie-ep";
reg = <0x01c00000 0x3000>,
@@ -194,6 +208,9 @@ examples:
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "global", "doorbell";
+ interconnects = <&system_noc MASTER_PCIE &mc_virt SLAVE_EBI_CH0>,
+ <&mem_noc MASTER_AMPSS_M0 &system_noc SLAVE_PCIE_0>;
+ interconnect-names = "pcie-mem", "cpu-pcie";
reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
resets = <&gcc GCC_PCIE_BCR>;
diff --git a/sys/contrib/device-tree/Bindings/pci/qcom,pcie.yaml b/sys/contrib/device-tree/Bindings/pci/qcom,pcie.yaml
index 81971be4e554..a93ab3b54066 100644
--- a/sys/contrib/device-tree/Bindings/pci/qcom,pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/qcom,pcie.yaml
@@ -29,6 +29,7 @@ properties:
- qcom,pcie-msm8996
- qcom,pcie-qcs404
- qcom,pcie-sa8540p
+ - qcom,pcie-sa8775p
- qcom,pcie-sc7280
- qcom,pcie-sc8180x
- qcom,pcie-sc8280xp
@@ -41,6 +42,10 @@ properties:
- qcom,pcie-sm8450-pcie1
- qcom,pcie-sm8550
- items:
+ - enum:
+ - qcom,pcie-sm8650
+ - const: qcom,pcie-sm8550
+ - items:
- const: qcom,pcie-msm8998
- const: qcom,pcie-msm8996
@@ -61,7 +66,8 @@ properties:
maxItems: 8
iommu-map:
- maxItems: 2
+ minItems: 1
+ maxItems: 16
# Common definitions for clocks, clock-names and reset.
# Platform constraints are described later.
@@ -87,7 +93,7 @@ properties:
minItems: 1
maxItems: 12
- resets-names:
+ reset-names:
minItems: 1
maxItems: 12
@@ -211,6 +217,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pcie-sa8775p
- qcom,pcie-sc7280
- qcom,pcie-sc8180x
- qcom,pcie-sc8280xp
@@ -481,6 +488,33 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pcie-sc8180x
+ then:
+ properties:
+ clocks:
+ minItems: 8
+ maxItems: 8
+ clock-names:
+ items:
+ - const: pipe # PIPE clock
+ - const: aux # Auxiliary clock
+ - const: cfg # Configuration clock
+ - const: bus_master # Master AXI clock
+ - const: bus_slave # Slave AXI clock
+ - const: slave_q2a # Slave Q2A clock
+ - const: ref # REFERENCE clock
+ - const: tbu # PCIe TBU clock
+ resets:
+ maxItems: 1
+ reset-names:
+ items:
+ - const: pci # PCIe core reset
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pcie-sdm845
then:
oneOf:
@@ -524,8 +558,33 @@ allOf:
compatible:
contains:
enum:
- - qcom,pcie-sc8180x
- qcom,pcie-sm8150
+ then:
+ properties:
+ clocks:
+ minItems: 8
+ maxItems: 8
+ clock-names:
+ items:
+ - const: pipe # PIPE clock
+ - const: aux # Auxiliary clock
+ - const: cfg # Configuration clock
+ - const: bus_master # Master AXI clock
+ - const: bus_slave # Slave AXI clock
+ - const: slave_q2a # Slave Q2A clock
+ - const: tbu # PCIe TBU clock
+ - const: ref # REFERENCE clock
+ resets:
+ maxItems: 1
+ reset-names:
+ items:
+ - const: pci # PCIe core reset
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pcie-sm8250
then:
oneOf:
@@ -748,7 +807,32 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pcie-sa8775p
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ maxItems: 5
+ clock-names:
+ items:
+ - const: aux # Auxiliary clock
+ - const: cfg # Configuration clock
+ - const: bus_master # Master AXI clock
+ - const: bus_slave # Slave AXI clock
+ - const: slave_q2a # Slave Q2A clock
+ resets:
+ maxItems: 1
+ reset-names:
+ items:
+ - const: pci # PCIe core reset
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pcie-sa8540p
+ - qcom,pcie-sa8775p
- qcom,pcie-sc8280xp
then:
required:
@@ -790,6 +874,7 @@ allOf:
contains:
enum:
- qcom,pcie-msm8996
+ - qcom,pcie-sa8775p
- qcom,pcie-sc7280
- qcom,pcie-sc8180x
- qcom,pcie-sdm845
diff --git a/sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-ep.yaml b/sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-ep.yaml
new file mode 100644
index 000000000000..fe38f62da066
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-ep.yaml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022-2023 Renesas Electronics Corp.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/rcar-gen4-pci-ep.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car Gen4 PCIe Endpoint
+
+maintainers:
+ - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+
+allOf:
+ - $ref: snps,dw-pcie-ep.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: renesas,r8a779f0-pcie-ep # R-Car S4-8
+ - const: renesas,rcar-gen4-pcie-ep # R-Car Gen4
+
+ reg:
+ maxItems: 7
+
+ reg-names:
+ items:
+ - const: dbi
+ - const: dbi2
+ - const: atu
+ - const: dma
+ - const: app
+ - const: phy
+ - const: addr_space
+
+ interrupts:
+ maxItems: 3
+
+ interrupt-names:
+ items:
+ - const: dma
+ - const: sft_ce
+ - const: app
+
+ clocks:
+ maxItems: 2
+
+ clock-names:
+ items:
+ - const: core
+ - const: ref
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ items:
+ - const: pwr
+
+ max-link-speed:
+ maximum: 4
+
+ num-lanes:
+ maximum: 4
+
+ max-functions:
+ maximum: 2
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - interrupt-names
+ - clocks
+ - clock-names
+ - power-domains
+ - resets
+ - reset-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r8a779f0-cpg-mssr.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/r8a779f0-sysc.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ pcie0_ep: pcie-ep@e65d0000 {
+ compatible = "renesas,r8a779f0-pcie-ep", "renesas,rcar-gen4-pcie-ep";
+ reg = <0 0xe65d0000 0 0x2000>, <0 0xe65d2000 0 0x1000>,
+ <0 0xe65d3000 0 0x2000>, <0 0xe65d5000 0 0x1200>,
+ <0 0xe65d6200 0 0x0e00>, <0 0xe65d7000 0 0x0400>,
+ <0 0xfe000000 0 0x400000>;
+ reg-names = "dbi", "dbi2", "atu", "dma", "app", "phy", "addr_space";
+ interrupts = <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dma", "sft_ce", "app";
+ clocks = <&cpg CPG_MOD 624>, <&pcie0_clkref>;
+ clock-names = "core", "ref";
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ resets = <&cpg 624>;
+ reset-names = "pwr";
+ max-link-speed = <4>;
+ num-lanes = <2>;
+ max-functions = /bits/ 8 <2>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-host.yaml b/sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-host.yaml
new file mode 100644
index 000000000000..ffb34339b637
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pci/rcar-gen4-pci-host.yaml
@@ -0,0 +1,127 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022-2023 Renesas Electronics Corp.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/rcar-gen4-pci-host.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car Gen4 PCIe Host
+
+maintainers:
+ - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+
+allOf:
+ - $ref: snps,dw-pcie.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: renesas,r8a779f0-pcie # R-Car S4-8
+ - const: renesas,rcar-gen4-pcie # R-Car Gen4
+
+ reg:
+ maxItems: 7
+
+ reg-names:
+ items:
+ - const: dbi
+ - const: dbi2
+ - const: atu
+ - const: dma
+ - const: app
+ - const: phy
+ - const: config
+
+ interrupts:
+ maxItems: 4
+
+ interrupt-names:
+ items:
+ - const: msi
+ - const: dma
+ - const: sft_ce
+ - const: app
+
+ clocks:
+ maxItems: 2
+
+ clock-names:
+ items:
+ - const: core
+ - const: ref
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ items:
+ - const: pwr
+
+ max-link-speed:
+ maximum: 4
+
+ num-lanes:
+ maximum: 4
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - interrupt-names
+ - clocks
+ - clock-names
+ - power-domains
+ - resets
+ - reset-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r8a779f0-cpg-mssr.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/r8a779f0-sysc.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ pcie: pcie@e65d0000 {
+ compatible = "renesas,r8a779f0-pcie", "renesas,rcar-gen4-pcie";
+ reg = <0 0xe65d0000 0 0x1000>, <0 0xe65d2000 0 0x0800>,
+ <0 0xe65d3000 0 0x2000>, <0 0xe65d5000 0 0x1200>,
+ <0 0xe65d6200 0 0x0e00>, <0 0xe65d7000 0 0x0400>,
+ <0 0xfe000000 0 0x400000>;
+ reg-names = "dbi", "dbi2", "atu", "dma", "app", "phy", "config";
+ interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi", "dma", "sft_ce", "app";
+ clocks = <&cpg CPG_MOD 624>, <&pcie0_clkref>;
+ clock-names = "core", "ref";
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ resets = <&cpg 624>;
+ reset-names = "pwr";
+ max-link-speed = <4>;
+ num-lanes = <2>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ bus-range = <0x00 0xff>;
+ device_type = "pci";
+ ranges = <0x01000000 0 0x00000000 0 0xfe000000 0 0x00400000>,
+ <0x02000000 0 0x30000000 0 0x30000000 0 0x10000000>;
+ dma-ranges = <0x42000000 0 0x00000000 0 0x00000000 1 0x00000000>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>;
+ snps,enable-cdm-check;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pci/rcar-pci-host.yaml b/sys/contrib/device-tree/Bindings/pci/rcar-pci-host.yaml
index 8fdfbc763d70..b6a7cb32f61e 100644
--- a/sys/contrib/device-tree/Bindings/pci/rcar-pci-host.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/rcar-pci-host.yaml
@@ -68,6 +68,15 @@ properties:
phy-names:
const: pcie
+ vpcie1v5-supply:
+ description: The 1.5v regulator to use for PCIe.
+
+ vpcie3v3-supply:
+ description: The 3.3v regulator to use for PCIe.
+
+ vpcie12v-supply:
+ description: The 12v regulator to use for PCIe.
+
required:
- compatible
- reg
@@ -121,5 +130,7 @@ examples:
clock-names = "pcie", "pcie_bus";
power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
resets = <&cpg 319>;
+ vpcie3v3-supply = <&pcie_3v3>;
+ vpcie12v-supply = <&pcie_12v>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/pci/rockchip-dw-pcie.yaml b/sys/contrib/device-tree/Bindings/pci/rockchip-dw-pcie.yaml
index a4f61ced5e88..5f719218c472 100644
--- a/sys/contrib/device-tree/Bindings/pci/rockchip-dw-pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/rockchip-dw-pcie.yaml
@@ -49,6 +49,7 @@ properties:
- description: APB clock for PCIe
- description: Auxiliary clock for PCIe
- description: PIPE clock
+ - description: Reference clock for PCIe
clock-names:
minItems: 5
@@ -59,6 +60,62 @@ properties:
- const: pclk
- const: aux
- const: pipe
+ - const: ref
+
+ interrupts:
+ items:
+ - description:
+ Combined system interrupt, which is used to signal the following
+ interrupts - phy_link_up, dll_link_up, link_req_rst_not, hp_pme,
+ hp, hp_msi, link_auto_bw, link_auto_bw_msi, bw_mgt, bw_mgt_msi,
+ edma_wr, edma_rd, dpa_sub_upd, rbar_update, link_eq_req, ep_elbi_app
+ - description:
+ Combined PM interrupt, which is used to signal the following
+ interrupts - linkst_in_l1sub, linkst_in_l1, linkst_in_l2,
+ linkst_in_l0s, linkst_out_l1sub, linkst_out_l1, linkst_out_l2,
+ linkst_out_l0s, pm_dstate_update
+ - description:
+ Combined message interrupt, which is used to signal the following
+ interrupts - ven_msg, unlock_msg, ltr_msg, cfg_pme, cfg_pme_msi,
+ pm_pme, pm_to_ack, pm_turnoff, obff_idle, obff_obff, obff_cpu_active
+ - description:
+ Combined legacy interrupt, which is used to signal the following
+ interrupts - inta, intb, intc, intd
+ - description:
+ Combined error interrupt, which is used to signal the following
+ interrupts - aer_rc_err, aer_rc_err_msi, rx_cpl_timeout,
+ tx_cpl_timeout, cor_err_sent, nf_err_sent, f_err_sent, cor_err_rx,
+ nf_err_rx, f_err_rx, radm_qoverflow
+
+ interrupt-names:
+ items:
+ - const: sys
+ - const: pmc
+ - const: msg
+ - const: legacy
+ - const: err
+
+ legacy-interrupt-controller:
+ description: Interrupt controller node for handling legacy PCI interrupts.
+ type: object
+ additionalProperties: false
+ properties:
+ "#address-cells":
+ const: 0
+
+ "#interrupt-cells":
+ const: 1
+
+ interrupt-controller: true
+
+ interrupts:
+ items:
+ - description: combined legacy interrupt
+ required:
+ - "#address-cells"
+ - "#interrupt-cells"
+ - interrupt-controller
+ - interrupts
msi-map: true
@@ -108,6 +165,7 @@ unevaluatedProperties: false
examples:
- |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
bus {
#address-cells = <2>;
@@ -127,6 +185,12 @@ examples:
"aclk_dbi", "pclk",
"aux";
device_type = "pci";
+ interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
linux,pci-domain = <2>;
max-link-speed = <2>;
msi-map = <0x2000 &its 0x2000 0x1000>;
@@ -140,6 +204,14 @@ examples:
reset-names = "pipe";
#address-cells = <3>;
#size-cells = <2>;
+
+ legacy-interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 72 IRQ_TYPE_EDGE_RISING>;
+ };
};
};
...
diff --git a/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-common.yaml b/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-common.yaml
index d87e13496834..dc05761c5cf9 100644
--- a/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-common.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-common.yaml
@@ -33,11 +33,11 @@ properties:
specific for each activated function, while the rest of the sub-spaces
are common for all of them (if there are more than one).
minItems: 2
- maxItems: 6
+ maxItems: 7
reg-names:
minItems: 2
- maxItems: 6
+ maxItems: 7
interrupts:
description:
diff --git a/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-ep.yaml b/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-ep.yaml
index 8fc2151691a4..bbdb01d22848 100644
--- a/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-ep.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie-ep.yaml
@@ -33,11 +33,11 @@ properties:
normal controller functioning. iATU memory IO region is also required
if the space is unrolled (IP-core version >= 4.80a).
minItems: 2
- maxItems: 5
+ maxItems: 7
reg-names:
minItems: 2
- maxItems: 5
+ maxItems: 7
items:
oneOf:
- description:
diff --git a/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie.yaml b/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie.yaml
index 1a83f0f65f19..022055edbf9e 100644
--- a/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/snps,dw-pcie.yaml
@@ -25,6 +25,15 @@ select:
allOf:
- $ref: /schemas/pci/pci-bus.yaml#
- $ref: /schemas/pci/snps,dw-pcie-common.yaml#
+ - if:
+ not:
+ required:
+ - msi-map
+ then:
+ properties:
+ interrupt-names:
+ contains:
+ const: msi
properties:
reg:
@@ -33,11 +42,11 @@ properties:
are required for the normal controller work. iATU memory IO region is
also required if the space is unrolled (IP-core version >= 4.80a).
minItems: 2
- maxItems: 5
+ maxItems: 7
reg-names:
minItems: 2
- maxItems: 5
+ maxItems: 7
items:
oneOf:
- description:
@@ -188,14 +197,15 @@ properties:
Link Control register).
const: bw_mg
- description:
+ Combined Legacy A/B/C/D interrupt signal. See "^int(a|b|c|d)$" for
+ details.
+ const: legacy
+ - description:
Vendor-specific IRQ names. Consider using the generic names above
for new bindings.
oneOf:
- description: See native "app" IRQ for details
- enum: [ intr ]
- allOf:
- - contains:
- const: msi
+ enum: [ intr, sys, pmc, msg, err ]
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-ep.yaml b/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-ep.yaml
index 62292185fe2e..97f2579ea908 100644
--- a/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-ep.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-ep.yaml
@@ -10,13 +10,11 @@ title: TI J721E PCI EP (PCIe Wrapper)
maintainers:
- Kishon Vijay Abraham I <kishon@ti.com>
-allOf:
- - $ref: cdns-pcie-ep.yaml#
-
properties:
compatible:
oneOf:
- const: ti,j721e-pcie-ep
+ - const: ti,j784s4-pcie-ep
- description: PCIe EP controller in AM64
items:
- const: ti,am64-pcie-ep
@@ -65,6 +63,41 @@ properties:
items:
- const: link_state
+allOf:
+ - $ref: cdns-pcie-ep.yaml#
+ - if:
+ properties:
+ compatible:
+ enum:
+ - ti,am64-pcie-ep
+ then:
+ properties:
+ num-lanes:
+ const: 1
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - ti,j7200-pcie-ep
+ - ti,j721e-pcie-ep
+ then:
+ properties:
+ num-lanes:
+ minimum: 1
+ maximum: 2
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - ti,j784s4-pcie-ep
+ then:
+ properties:
+ num-lanes:
+ minimum: 1
+ maximum: 4
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-host.yaml b/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-host.yaml
index a2c5eaea57f5..b7a534cef24d 100644
--- a/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-host.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/ti,j721e-pci-host.yaml
@@ -10,13 +10,11 @@ title: TI J721E PCI Host (PCIe Wrapper)
maintainers:
- Kishon Vijay Abraham I <kishon@ti.com>
-allOf:
- - $ref: cdns-pcie-host.yaml#
-
properties:
compatible:
oneOf:
- const: ti,j721e-pcie-host
+ - const: ti,j784s4-pcie-host
- description: PCIe controller in AM64
items:
- const: ti,am64-pcie-host
@@ -94,6 +92,41 @@ properties:
interrupts:
maxItems: 1
+allOf:
+ - $ref: cdns-pcie-host.yaml#
+ - if:
+ properties:
+ compatible:
+ enum:
+ - ti,am64-pcie-host
+ then:
+ properties:
+ num-lanes:
+ const: 1
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - ti,j7200-pcie-host
+ - ti,j721e-pcie-host
+ then:
+ properties:
+ num-lanes:
+ minimum: 1
+ maximum: 2
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - ti,j784s4-pcie-host
+ then:
+ properties:
+ num-lanes:
+ minimum: 1
+ maximum: 4
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/pci/toshiba,visconti-pcie.yaml b/sys/contrib/device-tree/Bindings/pci/toshiba,visconti-pcie.yaml
index 53da2edd7c9a..120e3bb1e545 100644
--- a/sys/contrib/device-tree/Bindings/pci/toshiba,visconti-pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/toshiba,visconti-pcie.yaml
@@ -83,7 +83,7 @@ examples:
<0x0 0x28050000 0x0 0x00010000>,
<0x0 0x24200000 0x0 0x00002000>,
<0x0 0x24162000 0x0 0x00001000>;
- reg-names = "dbi", "config", "ulreg", "smu", "mpu";
+ reg-names = "dbi", "config", "ulreg", "smu", "mpu";
device_type = "pci";
bus-range = <0x00 0xff>;
num-lanes = <2>;
diff --git a/sys/contrib/device-tree/Bindings/pci/xlnx,nwl-pcie.yaml b/sys/contrib/device-tree/Bindings/pci/xlnx,nwl-pcie.yaml
index 897602559b37..426f90a47f35 100644
--- a/sys/contrib/device-tree/Bindings/pci/xlnx,nwl-pcie.yaml
+++ b/sys/contrib/device-tree/Bindings/pci/xlnx,nwl-pcie.yaml
@@ -118,7 +118,7 @@ examples:
compatible = "xlnx,nwl-pcie-2.11";
reg = <0x0 0xfd0e0000 0x0 0x1000>,
<0x0 0xfd480000 0x0 0x1000>,
- <0x80 0x00000000 0x0 0x1000000>;
+ <0x80 0x00000000 0x0 0x10000000>;
reg-names = "breg", "pcireg", "cfg";
ranges = <0x02000000 0x0 0xe0000000 0x0 0xe0000000 0x0 0x10000000>,
<0x43000000 0x00000006 0x0 0x00000006 0x0 0x00000002 0x0>;
diff --git a/sys/contrib/device-tree/Bindings/pci/xlnx,xdma-host.yaml b/sys/contrib/device-tree/Bindings/pci/xlnx,xdma-host.yaml
new file mode 100644
index 000000000000..0aa00b8e49b3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pci/xlnx,xdma-host.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/xlnx,xdma-host.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx XDMA PL PCIe Root Port Bridge
+
+maintainers:
+ - Thippeswamy Havalige <thippeswamy.havalige@amd.com>
+
+allOf:
+ - $ref: /schemas/pci/pci-bus.yaml#
+
+properties:
+ compatible:
+ const: xlnx,xdma-host-3.00
+
+ reg:
+ maxItems: 1
+
+ ranges:
+ maxItems: 2
+
+ interrupts:
+ items:
+ - description: interrupt asserted when miscellaneous interrupt is received.
+ - description: msi0 interrupt asserted when an MSI is received.
+ - description: msi1 interrupt asserted when an MSI is received.
+
+ interrupt-names:
+ items:
+ - const: misc
+ - const: msi0
+ - const: msi1
+
+ interrupt-map-mask:
+ items:
+ - const: 0
+ - const: 0
+ - const: 0
+ - const: 7
+
+ interrupt-map:
+ maxItems: 4
+
+ "#interrupt-cells":
+ const: 1
+
+ interrupt-controller:
+ description: identifies the node as an interrupt controller
+ type: object
+ properties:
+ interrupt-controller: true
+
+ "#address-cells":
+ const: 0
+
+ "#interrupt-cells":
+ const: 1
+
+ required:
+ - interrupt-controller
+ - "#address-cells"
+ - "#interrupt-cells"
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - ranges
+ - interrupts
+ - interrupt-map
+ - interrupt-map-mask
+ - "#interrupt-cells"
+ - interrupt-controller
+
+unevaluatedProperties: false
+
+examples:
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ pcie@a0000000 {
+ compatible = "xlnx,xdma-host-3.00";
+ reg = <0x0 0xa0000000 0x0 0x10000000>;
+ ranges = <0x2000000 0x0 0xb0000000 0x0 0xb0000000 0x0 0x1000000>,
+ <0x43000000 0x5 0x0 0x5 0x0 0x0 0x1000000>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ #interrupt-cells = <1>;
+ device_type = "pci";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "misc", "msi0", "msi1";
+ interrupt-map-mask = <0x0 0x0 0x0 0x7>;
+ interrupt-map = <0 0 0 1 &pcie_intc_0 0>,
+ <0 0 0 2 &pcie_intc_0 1>,
+ <0 0 0 3 &pcie_intc_0 2>,
+ <0 0 0 4 &pcie_intc_0 3>;
+ pcie_intc_0: interrupt-controller {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/peci/nuvoton,npcm-peci.yaml b/sys/contrib/device-tree/Bindings/peci/nuvoton,npcm-peci.yaml
new file mode 100644
index 000000000000..087e02a9ade3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/peci/nuvoton,npcm-peci.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/peci/nuvoton,npcm-peci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton PECI Bus
+
+maintainers:
+ - Tomer Maimon <tmaimon77@gmail.com>
+
+allOf:
+ - $ref: peci-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-peci
+ - nuvoton,npcm845-peci
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ description:
+ Clock source for PECI controller. Should reference the APB clock.
+ maxItems: 1
+
+ cmd-timeout-ms:
+ minimum: 1
+ maximum: 1000
+ default: 1000
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ peci-controller@f0100000 {
+ compatible = "nuvoton,npcm750-peci";
+ reg = <0xf0100000 0x200>;
+ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk NPCM7XX_CLK_APB3>;
+ cmd-timeout-ms = <1000>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/perf/fsl-imx-ddr.yaml b/sys/contrib/device-tree/Bindings/perf/fsl-imx-ddr.yaml
index e9fad4b3de68..6c96a4204e5d 100644
--- a/sys/contrib/device-tree/Bindings/perf/fsl-imx-ddr.yaml
+++ b/sys/contrib/device-tree/Bindings/perf/fsl-imx-ddr.yaml
@@ -27,6 +27,9 @@ properties:
- fsl,imx8mq-ddr-pmu
- fsl,imx8mp-ddr-pmu
- const: fsl,imx8m-ddr-pmu
+ - items:
+ - const: fsl,imx8dxl-ddr-pmu
+ - const: fsl,imx8-ddr-pmu
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/perf/riscv,pmu.yaml b/sys/contrib/device-tree/Bindings/perf/riscv,pmu.yaml
index c8448de2f2a0..d01c677ad3c7 100644
--- a/sys/contrib/device-tree/Bindings/perf/riscv,pmu.yaml
+++ b/sys/contrib/device-tree/Bindings/perf/riscv,pmu.yaml
@@ -90,7 +90,7 @@ properties:
bitmap of all MHPMCOUNTERx that can monitor the range of events
dependencies:
- "riscv,event-to-mhpmevent": [ "riscv,event-to-mhpmcounters" ]
+ riscv,event-to-mhpmevent: [ "riscv,event-to-mhpmcounters" ]
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml b/sys/contrib/device-tree/Bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
index c8c83acfb871..81c2654b7e57 100644
--- a/sys/contrib/device-tree/Bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
@@ -16,20 +16,8 @@ properties:
"#phy-cells":
const: 0
- reg:
- maxItems: 1
-
required:
- compatible
- - reg
- "#phy-cells"
additionalProperties: false
-
-examples:
- - |
- phy@0 {
- compatible = "amlogic,g12a-mipi-dphy-analog";
- reg = <0x0 0xc>;
- #phy-cells = <0>;
- };
diff --git a/sys/contrib/device-tree/Bindings/phy/amlogic,meson-axg-mipi-pcie-analog.yaml b/sys/contrib/device-tree/Bindings/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
index 009a39808318..70def36e5688 100644
--- a/sys/contrib/device-tree/Bindings/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
@@ -9,16 +9,6 @@ title: Amlogic AXG shared MIPI/PCIE analog PHY
maintainers:
- Remi Pommarel <repk@triplefau.lt>
-description: |+
- The Everything-Else Power Domains node should be the child of a syscon
- node with the required property:
-
- - compatible: Should be the following:
- "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
-
- Refer to the bindings described in
- Documentation/devicetree/bindings/mfd/syscon.yaml
-
properties:
compatible:
const: amlogic,axg-mipi-pcie-analog-phy
@@ -31,10 +21,3 @@ required:
- "#phy-cells"
additionalProperties: false
-
-examples:
- - |
- mpphy: phy {
- compatible = "amlogic,axg-mipi-pcie-analog-phy";
- #phy-cells = <0>;
- };
diff --git a/sys/contrib/device-tree/Bindings/phy/marvell,pxa1928-usb-phy.yaml b/sys/contrib/device-tree/Bindings/phy/marvell,pxa1928-usb-phy.yaml
new file mode 100644
index 000000000000..be33f036cda8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/marvell,pxa1928-usb-phy.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/marvell,pxa1928-usb-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell PXA1928 USB/HSIC PHY
+
+maintainers:
+ - Duje Mihanović <duje.mihanovic@skole.hr>
+
+properties:
+ compatible:
+ enum:
+ - marvell,pxa1928-usb-phy
+ - marvell,pxa1928-hsic-phy
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ '#phy-cells':
+ const: 0
+
+ resets:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - '#phy-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/marvell,pxa1928.h>
+
+ usbphy: phy@7000 {
+ compatible = "marvell,pxa1928-usb-phy";
+ reg = <0x7000 0xe0>;
+ clocks = <&apmu PXA1928_CLK_USB>;
+ #phy-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/mediatek,dsi-phy.yaml b/sys/contrib/device-tree/Bindings/phy/mediatek,dsi-phy.yaml
index a63b20dfa4a5..f6e494d0d89b 100644
--- a/sys/contrib/device-tree/Bindings/phy/mediatek,dsi-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/mediatek,dsi-phy.yaml
@@ -30,6 +30,8 @@ properties:
- const: mediatek,mt8173-mipi-tx
- items:
- enum:
+ - mediatek,mt8188-mipi-tx
+ - mediatek,mt8195-mipi-tx
- mediatek,mt8365-mipi-tx
- const: mediatek,mt8183-mipi-tx
- const: mediatek,mt2701-mipi-tx
diff --git a/sys/contrib/device-tree/Bindings/phy/mediatek,mt7621-pci-phy.yaml b/sys/contrib/device-tree/Bindings/phy/mediatek,mt7621-pci-phy.yaml
index b35c4d256e40..99eac888ae03 100644
--- a/sys/contrib/device-tree/Bindings/phy/mediatek,mt7621-pci-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/mediatek,mt7621-pci-phy.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/mediatek,mt7621-pci-phy.yaml#
diff --git a/sys/contrib/device-tree/Bindings/phy/mediatek,mt7628-usbphy.yaml b/sys/contrib/device-tree/Bindings/phy/mediatek,mt7628-usbphy.yaml
new file mode 100644
index 000000000000..ce2c228e3216
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/mediatek,mt7628-usbphy.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/mediatek,mt7628-usbphy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek/Ralink USB PHY
+
+maintainers:
+ - Sergio Paracuellos <sergio.paracuellos@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt7620-usbphy
+ - mediatek,mt7628-usbphy
+ - ralink,rt3352-usbphy
+
+ reg:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+ ralink,sysctl:
+ description:
+ phandle to a ralink syscon register region.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ resets:
+ items:
+ - description: USB Host reset controller
+ - description: USB Device reset controller
+
+ reset-names:
+ items:
+ - const: host
+ - const: device
+
+required:
+ - compatible
+ - "#phy-cells"
+ - ralink,sysctl
+ - resets
+ - reset-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7628-usbphy
+ then:
+ required:
+ - reg
+ else:
+ properties:
+ reg: false
+
+additionalProperties: false
+
+examples:
+ - |
+ phy@10120000 {
+ compatible = "mediatek,mt7628-usbphy";
+ reg = <0x10120000 0x1000>;
+ #phy-cells = <0>;
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22>,
+ <&rstctrl 25>;
+ reset-names = "host", "device";
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/phy/mediatek,tphy.yaml b/sys/contrib/device-tree/Bindings/phy/mediatek,tphy.yaml
index 230a17f24966..acba0720125d 100644
--- a/sys/contrib/device-tree/Bindings/phy/mediatek,tphy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/mediatek,tphy.yaml
@@ -64,7 +64,7 @@ description: |
properties:
$nodename:
- pattern: "^t-phy@[0-9a-f]+$"
+ pattern: "^t-phy(@[0-9a-f]+)?$"
compatible:
oneOf:
@@ -235,6 +235,15 @@ patternProperties:
Specify the flag to enable BC1.2 if support it
type: boolean
+ mediatek,force-mode:
+ description:
+ The force mode is used to manually switch the shared phy mode between
+ USB3 and PCIe, when USB3 phy type is selected by the consumer, and
+ force-mode is set, will cause phy's power and pipe toggled and force
+ phy as USB3 mode which switched from default PCIe mode. But perfer to
+ use the property "mediatek,syscon-type" for newer SoCs that support it.
+ type: boolean
+
mediatek,syscon-type:
$ref: /schemas/types.yaml#/definitions/phandle-array
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/phy/nvidia,tegra210-xusb-padctl.yaml b/sys/contrib/device-tree/Bindings/phy/nvidia,tegra210-xusb-padctl.yaml
index d16bd6e47f90..e9237c58ce45 100644
--- a/sys/contrib/device-tree/Bindings/phy/nvidia,tegra210-xusb-padctl.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/nvidia,tegra210-xusb-padctl.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/nvidia,tegra210-xusb-padctl.yaml#
diff --git a/sys/contrib/device-tree/Bindings/phy/phy-hisi-inno-usb2.txt b/sys/contrib/device-tree/Bindings/phy/phy-hisi-inno-usb2.txt
index 0d70c8341095..104953e849e7 100644
--- a/sys/contrib/device-tree/Bindings/phy/phy-hisi-inno-usb2.txt
+++ b/sys/contrib/device-tree/Bindings/phy/phy-hisi-inno-usb2.txt
@@ -14,7 +14,7 @@ Required properties:
- #size-cells: Must be 0.
The INNO USB2 PHY device should be a child node of peripheral controller that
-contains the PHY configuration register, and each device suppports up to 2 PHY
+contains the PHY configuration register, and each device supports up to 2 PHY
ports which are represented as child nodes of INNO USB2 PHY device.
Required properties for PHY port node:
diff --git a/sys/contrib/device-tree/Bindings/phy/pistachio-usb-phy.txt b/sys/contrib/device-tree/Bindings/phy/pistachio-usb-phy.txt
index afbc7e24a3de..c7970c07ee32 100644
--- a/sys/contrib/device-tree/Bindings/phy/pistachio-usb-phy.txt
+++ b/sys/contrib/device-tree/Bindings/phy/pistachio-usb-phy.txt
@@ -8,7 +8,7 @@ Required properties:
- clocks: Must contain an entry for each entry in clock-names.
See ../clock/clock-bindings.txt for details.
- clock-names: Must include "usb_phy".
- - img,cr-top: Must constain a phandle to the CR_TOP syscon node.
+ - img,cr-top: Must contain a phandle to the CR_TOP syscon node.
- img,refclk: Indicates the reference clock source for the USB PHY.
See <dt-bindings/phy/phy-pistachio-usb.h> for a list of valid values.
diff --git a/sys/contrib/device-tree/Bindings/phy/pxa1928-usb-phy.txt b/sys/contrib/device-tree/Bindings/phy/pxa1928-usb-phy.txt
index 660a13ca90b3..da94426aa694 100644
--- a/sys/contrib/device-tree/Bindings/phy/pxa1928-usb-phy.txt
+++ b/sys/contrib/device-tree/Bindings/phy/pxa1928-usb-phy.txt
@@ -4,7 +4,7 @@ Required properties:
- compatible: "marvell,pxa1928-usb-phy" or "marvell,pxa1928-hsic-phy"
- reg: base address and length of the registers
- clocks - A single clock. From common clock binding.
-- #phys-cells: should be 0. From commmon phy binding.
+- #phys-cells: should be 0. From common phy binding.
- resets: reference to the reset controller
Example:
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,ipq5332-usb-hsphy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,ipq5332-usb-hsphy.yaml
new file mode 100644
index 000000000000..e77576d06c0e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,ipq5332-usb-hsphy.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,ipq5332-usb-hsphy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: M31 USB PHY
+
+maintainers:
+ - Sricharan Ramabadhran <quic_srichara@quicinc.com>
+ - Varadarajan Narayanan <quic_varada@quicinc.com>
+
+description:
+ USB M31 PHY (https://www.m31tech.com) found in Qualcomm
+ IPQ5018, IPQ5332 SoCs.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - qcom,ipq5018-usb-hsphy
+ - qcom,ipq5332-usb-hsphy
+
+ "#phy-cells":
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: cfg_ahb
+
+ resets:
+ maxItems: 1
+
+ vdd-supply:
+ description:
+ Phandle to 5V regulator supply to PHY digital circuit.
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,ipq5332-gcc.h>
+ usb-phy@7b000 {
+ compatible = "qcom,ipq5332-usb-hsphy";
+ reg = <0x0007b000 0x12c>;
+
+ clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>;
+ clock-names = "cfg_ahb";
+
+ #phy-cells = <0>;
+
+ resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
+
+ vdd-supply = <&regulator_fixed_5p0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml
index 3d42ee3901a1..634cec5d57ea 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml
@@ -13,287 +13,79 @@ description:
QMP PHY controller supports physical layer functionality for a number of
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
- Note that these bindings are for SoCs up to SC8180X. For newer SoCs, see
- qcom,sc8280xp-qmp-pcie-phy.yaml.
-
properties:
compatible:
enum:
- qcom,ipq6018-qmp-pcie-phy
- qcom,ipq8074-qmp-gen3-pcie-phy
- qcom,ipq8074-qmp-pcie-phy
- - qcom,msm8998-qmp-pcie-phy
- - qcom,sc8180x-qmp-pcie-phy
- - qcom,sdm845-qhp-pcie-phy
- - qcom,sdm845-qmp-pcie-phy
- - qcom,sdx55-qmp-pcie-phy
- - qcom,sm8250-qmp-gen3x1-pcie-phy
- - qcom,sm8250-qmp-gen3x2-pcie-phy
- - qcom,sm8250-qmp-modem-pcie-phy
- - qcom,sm8450-qmp-gen3x1-pcie-phy
- - qcom,sm8450-qmp-gen4x2-pcie-phy
reg:
items:
- description: serdes
- "#address-cells":
- enum: [ 1, 2 ]
-
- "#size-cells":
- enum: [ 1, 2 ]
-
- ranges: true
-
clocks:
- minItems: 2
- maxItems: 4
+ maxItems: 3
clock-names:
- minItems: 2
- maxItems: 4
+ items:
+ - const: aux
+ - const: cfg_ahb
+ - const: pipe
resets:
- minItems: 1
maxItems: 2
reset-names:
- minItems: 1
- maxItems: 2
-
- vdda-phy-supply: true
-
- vdda-pll-supply: true
-
- vddp-ref-clk-supply: true
-
-patternProperties:
- "^phy@[0-9a-f]+$":
- type: object
- description: single PHY-provider child node
- properties:
- reg:
- minItems: 3
- maxItems: 6
-
- clocks:
- items:
- - description: PIPE clock
-
- clock-names:
- deprecated: true
- items:
- - const: pipe0
-
- "#clock-cells":
- const: 0
-
- clock-output-names:
- maxItems: 1
+ items:
+ - const: phy
+ - const: common
- "#phy-cells":
- const: 0
+ "#clock-cells":
+ const: 0
- required:
- - reg
- - clocks
- - "#clock-cells"
- - clock-output-names
- - "#phy-cells"
+ clock-output-names:
+ maxItems: 1
- additionalProperties: false
+ "#phy-cells":
+ const: 0
required:
- compatible
- reg
- - "#address-cells"
- - "#size-cells"
- - ranges
- clocks
- clock-names
- resets
- reset-names
+ - "#clock-cells"
+ - clock-output-names
+ - "#phy-cells"
additionalProperties: false
-allOf:
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,msm8998-qmp-pcie-phy
- then:
- properties:
- clocks:
- maxItems: 3
- clock-names:
- items:
- - const: aux
- - const: cfg_ahb
- - const: ref
- resets:
- maxItems: 2
- reset-names:
- items:
- - const: phy
- - const: common
- required:
- - vdda-phy-supply
- - vdda-pll-supply
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,ipq6018-qmp-pcie-phy
- - qcom,ipq8074-qmp-gen3-pcie-phy
- - qcom,ipq8074-qmp-pcie-phy
- then:
- properties:
- clocks:
- maxItems: 2
- clock-names:
- items:
- - const: aux
- - const: cfg_ahb
- resets:
- maxItems: 2
- reset-names:
- items:
- - const: phy
- - const: common
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sc8180x-qmp-pcie-phy
- - qcom,sdm845-qhp-pcie-phy
- - qcom,sdm845-qmp-pcie-phy
- - qcom,sdx55-qmp-pcie-phy
- - qcom,sm8250-qmp-gen3x1-pcie-phy
- - qcom,sm8250-qmp-gen3x2-pcie-phy
- - qcom,sm8250-qmp-modem-pcie-phy
- - qcom,sm8450-qmp-gen3x1-pcie-phy
- - qcom,sm8450-qmp-gen4x2-pcie-phy
- then:
- properties:
- clocks:
- maxItems: 4
- clock-names:
- items:
- - const: aux
- - const: cfg_ahb
- - const: ref
- - const: refgen
- resets:
- maxItems: 1
- reset-names:
- items:
- - const: phy
- required:
- - vdda-phy-supply
- - vdda-pll-supply
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sc8180x-qmp-pcie-phy
- - qcom,sm8250-qmp-gen3x2-pcie-phy
- - qcom,sm8250-qmp-modem-pcie-phy
- - qcom,sm8450-qmp-gen4x2-pcie-phy
- then:
- patternProperties:
- "^phy@[0-9a-f]+$":
- properties:
- reg:
- items:
- - description: TX lane 1
- - description: RX lane 1
- - description: PCS
- - description: TX lane 2
- - description: RX lane 2
- - description: PCS_MISC
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sdm845-qmp-pcie-phy
- - qcom,sdx55-qmp-pcie-phy
- - qcom,sm8250-qmp-gen3x1-pcie-phy
- - qcom,sm8450-qmp-gen3x1-pcie-phy
- then:
- patternProperties:
- "^phy@[0-9a-f]+$":
- properties:
- reg:
- items:
- - description: TX
- - description: RX
- - description: PCS
- - description: PCS_MISC
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,ipq6018-qmp-pcie-phy
- - qcom,ipq8074-qmp-pcie-phy
- - qcom,msm8998-qmp-pcie-phy
- - qcom,sdm845-qhp-pcie-phy
- then:
- patternProperties:
- "^phy@[0-9a-f]+$":
- properties:
- reg:
- items:
- - description: TX
- - description: RX
- - description: PCS
-
examples:
- |
- #include <dt-bindings/clock/qcom,gcc-sm8250.h>
- phy-wrapper@1c0e000 {
- compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy";
- reg = <0x01c0e000 0x1c0>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0x0 0x01c0e000 0x1000>;
-
- clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
- <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
- <&gcc GCC_PCIE_WIGIG_CLKREF_EN>,
- <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
-
- resets = <&gcc GCC_PCIE_1_PHY_BCR>;
- reset-names = "phy";
+ #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+ #include <dt-bindings/reset/qcom,gcc-ipq6018.h>
- vdda-phy-supply = <&vreg_l10c_0p88>;
- vdda-pll-supply = <&vreg_l6b_1p2>;
+ phy@84000 {
+ compatible = "qcom,ipq6018-qmp-pcie-phy";
+ reg = <0x00084000 0x1000>;
- phy@200 {
- reg = <0x200 0x170>,
- <0x400 0x200>,
- <0xa00 0x1f0>,
- <0x600 0x170>,
- <0x800 0x200>,
- <0xe00 0xf4>;
+ clocks = <&gcc GCC_PCIE0_AUX_CLK>,
+ <&gcc GCC_PCIE0_AHB_CLK>,
+ <&gcc GCC_PCIE0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "pipe";
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-output-names = "gcc_pcie0_pipe_clk_src";
+ #clock-cells = <0>;
- #clock-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
+ #phy-cells = <0>;
- #phy-cells = <0>;
- };
+ resets = <&gcc GCC_PCIE0_PHY_BCR>,
+ <&gcc GCC_PCIE0PHY_PHY_BCR>;
+ reset-names = "phy",
+ "common";
};
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml
index 4c96dab5b9e3..827109d37041 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml
@@ -23,25 +23,16 @@ properties:
- qcom,ipq8074-qmp-usb3-phy
- qcom,msm8996-qmp-usb3-phy
- qcom,msm8998-qmp-usb3-phy
- - qcom,sc7180-qmp-usb3-phy
- - qcom,sc8180x-qmp-usb3-phy
- - qcom,sdm845-qmp-usb3-phy
- qcom,sdm845-qmp-usb3-uni-phy
- qcom,sdx55-qmp-usb3-uni-phy
- qcom,sdx65-qmp-usb3-uni-phy
- - qcom,sm8150-qmp-usb3-phy
- qcom,sm8150-qmp-usb3-uni-phy
- - qcom,sm8250-qmp-usb3-phy
- qcom,sm8250-qmp-usb3-uni-phy
- - qcom,sm8350-qmp-usb3-phy
- qcom,sm8350-qmp-usb3-uni-phy
- - qcom,sm8450-qmp-usb3-phy
reg:
- minItems: 1
items:
- description: serdes
- - description: DP_COM
"#address-cells":
enum: [ 1, 2 ]
@@ -131,28 +122,6 @@ allOf:
compatible:
contains:
enum:
- - qcom,sc7180-qmp-usb3-phy
- then:
- properties:
- clocks:
- maxItems: 4
- clock-names:
- items:
- - const: aux
- - const: cfg_ahb
- - const: ref
- - const: com_aux
- resets:
- maxItems: 1
- reset-names:
- items:
- - const: phy
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- qcom,sdm845-qmp-usb3-uni-phy
then:
properties:
@@ -202,7 +171,6 @@ allOf:
compatible:
contains:
enum:
- - qcom,sm8150-qmp-usb3-phy
- qcom,sm8150-qmp-usb3-uni-phy
- qcom,sm8250-qmp-usb3-uni-phy
- qcom,sm8350-qmp-usb3-uni-phy
@@ -228,51 +196,6 @@ allOf:
compatible:
contains:
enum:
- - qcom,sm8250-qmp-usb3-phy
- - qcom,sm8350-qmp-usb3-phy
- then:
- properties:
- clocks:
- maxItems: 3
- clock-names:
- items:
- - const: aux
- - const: ref_clk_src
- - const: com_aux
- resets:
- maxItems: 2
- reset-names:
- items:
- - const: phy
- - const: common
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sdm845-qmp-usb3-phy
- - qcom,sm8150-qmp-usb3-phy
- - qcom,sm8350-qmp-usb3-phy
- - qcom,sm8450-qmp-usb3-phy
- then:
- patternProperties:
- "^phy@[0-9a-f]+$":
- properties:
- reg:
- items:
- - description: TX lane 1
- - description: RX lane 1
- - description: PCS
- - description: TX lane 2
- - description: RX lane 2
- - description: PCS_MISC
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- qcom,msm8998-qmp-usb3-phy
then:
patternProperties:
@@ -293,12 +216,9 @@ allOf:
enum:
- qcom,ipq6018-qmp-usb3-phy
- qcom,ipq8074-qmp-usb3-phy
- - qcom,sc7180-qmp-usb3-phy
- - qcom,sc8180x-qmp-usb3-phy
- qcom,sdx55-qmp-usb3-uni-phy
- qcom,sdx65-qmp-usb3-uni-phy
- qcom,sm8150-qmp-usb3-uni-phy
- - qcom,sm8250-qmp-usb3-phy
then:
patternProperties:
"^phy@[0-9a-f]+$":
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,msm8998-qmp-pcie-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,msm8998-qmp-pcie-phy.yaml
new file mode 100644
index 000000000000..d05eef0e1ccd
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,msm8998-qmp-pcie-phy.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,msm8998-qmp-pcie-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QMP PHY controller (PCIe, MSM8998)
+
+maintainers:
+ - Vinod Koul <vkoul@kernel.org>
+
+description:
+ The QMP PHY controller supports physical layer functionality for a number of
+ controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+ compatible:
+ const: qcom,msm8998-qmp-pcie-phy
+
+ reg:
+ items:
+ - description: serdes
+
+ clocks:
+ maxItems: 4
+
+ clock-names:
+ items:
+ - const: aux
+ - const: cfg_ahb
+ - const: ref
+ - const: pipe
+
+ resets:
+ maxItems: 2
+
+ reset-names:
+ items:
+ - const: phy
+ - const: common
+
+ vdda-phy-supply: true
+
+ vdda-pll-supply: true
+
+ "#clock-cells":
+ const: 0
+
+ clock-output-names:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - vdda-phy-supply
+ - vdda-pll-supply
+ - "#clock-cells"
+ - clock-output-names
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-msm8998.h>
+
+ phy@1c18000 {
+ compatible = "qcom,msm8998-qmp-pcie-phy";
+ reg = <0x01c06000 0x1000>;
+
+ clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
+ <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_CLKREF_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "pipe";
+
+ clock-output-names = "pcie_0_pipe_clk_src";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
+
+ resets = <&gcc GCC_PCIE_0_PHY_BCR>, <&gcc GCC_PCIE_PHY_BCR>;
+ reset-names = "phy", "common";
+
+ vdda-phy-supply = <&vreg_l1a_0p875>;
+ vdda-pll-supply = <&vreg_l2a_1p2>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
index a0407fc79563..6c03f2d5fca3 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
@@ -16,13 +16,28 @@ description:
properties:
compatible:
enum:
+ - qcom,sa8775p-qmp-gen4x2-pcie-phy
+ - qcom,sa8775p-qmp-gen4x4-pcie-phy
+ - qcom,sc8180x-qmp-pcie-phy
- qcom,sc8280xp-qmp-gen3x1-pcie-phy
- qcom,sc8280xp-qmp-gen3x2-pcie-phy
- qcom,sc8280xp-qmp-gen3x4-pcie-phy
+ - qcom,sdm845-qhp-pcie-phy
+ - qcom,sdm845-qmp-pcie-phy
+ - qcom,sdx55-qmp-pcie-phy
- qcom,sdx65-qmp-gen4x2-pcie-phy
+ - qcom,sm8150-qmp-gen3x1-pcie-phy
+ - qcom,sm8150-qmp-gen3x2-pcie-phy
+ - qcom,sm8250-qmp-gen3x1-pcie-phy
+ - qcom,sm8250-qmp-gen3x2-pcie-phy
+ - qcom,sm8250-qmp-modem-pcie-phy
- qcom,sm8350-qmp-gen3x1-pcie-phy
+ - qcom,sm8450-qmp-gen3x1-pcie-phy
+ - qcom,sm8450-qmp-gen4x2-pcie-phy
- qcom,sm8550-qmp-gen3x2-pcie-phy
- qcom,sm8550-qmp-gen4x2-pcie-phy
+ - qcom,sm8650-qmp-gen3x2-pcie-phy
+ - qcom,sm8650-qmp-gen4x2-pcie-phy
reg:
minItems: 1
@@ -30,7 +45,7 @@ properties:
clocks:
minItems: 5
- maxItems: 6
+ maxItems: 7
clock-names:
minItems: 5
@@ -38,9 +53,10 @@ properties:
- const: aux
- const: cfg_ahb
- const: ref
- - const: rchng
+ - enum: [rchng, refgen]
- const: pipe
- const: pipediv2
+ - const: phy_aux
power-domains:
maxItems: 1
@@ -84,7 +100,6 @@ required:
- reg
- clocks
- clock-names
- - power-domains
- resets
- reset-names
- vdda-phy-supply
@@ -120,16 +135,38 @@ allOf:
compatible:
contains:
enum:
+ - qcom,sc8180x-qmp-pcie-phy
+ - qcom,sdm845-qhp-pcie-phy
+ - qcom,sdm845-qmp-pcie-phy
+ - qcom,sdx55-qmp-pcie-phy
+ - qcom,sm8150-qmp-gen3x1-pcie-phy
+ - qcom,sm8150-qmp-gen3x2-pcie-phy
+ - qcom,sm8250-qmp-gen3x1-pcie-phy
+ - qcom,sm8250-qmp-gen3x2-pcie-phy
+ - qcom,sm8250-qmp-modem-pcie-phy
- qcom,sm8350-qmp-gen3x1-pcie-phy
+ - qcom,sm8450-qmp-gen3x1-pcie-phy
+ - qcom,sm8450-qmp-gen3x2-pcie-phy
- qcom,sm8550-qmp-gen3x2-pcie-phy
- qcom,sm8550-qmp-gen4x2-pcie-phy
+ - qcom,sm8650-qmp-gen3x2-pcie-phy
+ - qcom,sm8650-qmp-gen4x2-pcie-phy
then:
properties:
clocks:
maxItems: 5
clock-names:
maxItems: 5
- else:
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sc8280xp-qmp-gen3x1-pcie-phy
+ - qcom,sc8280xp-qmp-gen3x2-pcie-phy
+ - qcom,sc8280xp-qmp-gen3x4-pcie-phy
+ then:
properties:
clocks:
minItems: 6
@@ -141,7 +178,22 @@ allOf:
compatible:
contains:
enum:
+ - qcom,sa8775p-qmp-gen4x2-pcie-phy
+ - qcom,sa8775p-qmp-gen4x4-pcie-phy
+ then:
+ properties:
+ clocks:
+ minItems: 7
+ clock-names:
+ minItems: 7
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,sm8550-qmp-gen4x2-pcie-phy
+ - qcom,sm8650-qmp-gen4x2-pcie-phy
then:
properties:
resets:
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
index a1897a7606df..8474eef8d0ff 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
@@ -16,21 +16,33 @@ description:
properties:
compatible:
enum:
+ - qcom,msm8996-qmp-ufs-phy
+ - qcom,msm8998-qmp-ufs-phy
- qcom,sa8775p-qmp-ufs-phy
+ - qcom,sc7280-qmp-ufs-phy
+ - qcom,sc8180x-qmp-ufs-phy
- qcom,sc8280xp-qmp-ufs-phy
+ - qcom,sdm845-qmp-ufs-phy
+ - qcom,sm6115-qmp-ufs-phy
- qcom,sm6125-qmp-ufs-phy
+ - qcom,sm6350-qmp-ufs-phy
- qcom,sm7150-qmp-ufs-phy
+ - qcom,sm8150-qmp-ufs-phy
+ - qcom,sm8250-qmp-ufs-phy
+ - qcom,sm8350-qmp-ufs-phy
+ - qcom,sm8450-qmp-ufs-phy
- qcom,sm8550-qmp-ufs-phy
+ - qcom,sm8650-qmp-ufs-phy
reg:
maxItems: 1
clocks:
- minItems: 2
+ minItems: 1
maxItems: 3
clock-names:
- minItems: 2
+ minItems: 1
items:
- const: ref
- const: ref_aux
@@ -75,19 +87,53 @@ allOf:
contains:
enum:
- qcom,sa8775p-qmp-ufs-phy
+ - qcom,sc7280-qmp-ufs-phy
+ - qcom,sm8450-qmp-ufs-phy
then:
properties:
clocks:
minItems: 3
clock-names:
minItems: 3
- else:
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8998-qmp-ufs-phy
+ - qcom,sc8180x-qmp-ufs-phy
+ - qcom,sc8280xp-qmp-ufs-phy
+ - qcom,sdm845-qmp-ufs-phy
+ - qcom,sm6115-qmp-ufs-phy
+ - qcom,sm6125-qmp-ufs-phy
+ - qcom,sm6350-qmp-ufs-phy
+ - qcom,sm7150-qmp-ufs-phy
+ - qcom,sm8150-qmp-ufs-phy
+ - qcom,sm8250-qmp-ufs-phy
+ - qcom,sm8350-qmp-ufs-phy
+ - qcom,sm8550-qmp-ufs-phy
+ - qcom,sm8650-qmp-ufs-phy
+ then:
properties:
clocks:
maxItems: 2
clock-names:
maxItems: 2
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8996-qmp-ufs-phy
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ maxItems: 1
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml
index f99fbbcd68fb..15d82c67f157 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml
@@ -16,20 +16,35 @@ description:
properties:
compatible:
enum:
+ - qcom,ipq6018-qmp-usb3-phy
+ - qcom,ipq8074-qmp-usb3-phy
- qcom,ipq9574-qmp-usb3-phy
+ - qcom,msm8996-qmp-usb3-phy
+ - qcom,msm8998-qmp-usb3-phy
- qcom,qcm2290-qmp-usb3-phy
- qcom,sa8775p-qmp-usb3-uni-phy
- qcom,sc8280xp-qmp-usb3-uni-phy
+ - qcom,sdm845-qmp-usb3-uni-phy
+ - qcom,sdx55-qmp-usb3-uni-phy
+ - qcom,sdx65-qmp-usb3-uni-phy
+ - qcom,sdx75-qmp-usb3-uni-phy
- qcom,sm6115-qmp-usb3-phy
+ - qcom,sm8150-qmp-usb3-uni-phy
+ - qcom,sm8250-qmp-usb3-uni-phy
+ - qcom,sm8350-qmp-usb3-uni-phy
+ - qcom,x1e80100-qmp-usb3-uni-phy
+
reg:
maxItems: 1
clocks:
- maxItems: 4
+ minItems: 4
+ maxItems: 5
clock-names:
- maxItems: 4
+ minItems: 4
+ maxItems: 5
power-domains:
maxItems: 1
@@ -74,9 +89,18 @@ allOf:
compatible:
contains:
enum:
+ - qcom,ipq6018-qmp-usb3-phy
+ - qcom,ipq8074-qmp-usb3-phy
- qcom,ipq9574-qmp-usb3-phy
+ - qcom,msm8996-qmp-usb3-phy
+ - qcom,msm8998-qmp-usb3-phy
+ - qcom,sdx55-qmp-usb3-uni-phy
+ - qcom,sdx65-qmp-usb3-uni-phy
+ - qcom,sdx75-qmp-usb3-uni-phy
then:
properties:
+ clocks:
+ maxItems: 4
clock-names:
items:
- const: aux
@@ -109,6 +133,10 @@ allOf:
enum:
- qcom,sa8775p-qmp-usb3-uni-phy
- qcom,sc8280xp-qmp-usb3-uni-phy
+ - qcom,sm8150-qmp-usb3-uni-phy
+ - qcom,sm8250-qmp-usb3-uni-phy
+ - qcom,sm8350-qmp-usb3-uni-phy
+ - qcom,x1e80100-qmp-usb3-uni-phy
then:
properties:
clocks:
@@ -119,6 +147,34 @@ allOf:
- const: ref
- const: com_aux
- const: pipe
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sdm845-qmp-usb3-uni-phy
+ then:
+ properties:
+ clocks:
+ maxItems: 5
+ clock-names:
+ items:
+ - const: aux
+ - const: cfg_ahb
+ - const: ref
+ - const: com_aux
+ - const: pipe
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sa8775p-qmp-usb3-uni-phy
+ - qcom,sc8280xp-qmp-usb3-uni-phy
+ - qcom,x1e80100-qmp-usb3-uni-phy
+ then:
required:
- power-domains
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
index ef1c02d8ac88..2d0d7e9e6431 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
@@ -16,24 +16,35 @@ description:
properties:
compatible:
enum:
+ - qcom,sc7180-qmp-usb3-dp-phy
+ - qcom,sc7280-qmp-usb3-dp-phy
+ - qcom,sc8180x-qmp-usb3-dp-phy
- qcom,sc8280xp-qmp-usb43dp-phy
+ - qcom,sdm845-qmp-usb3-dp-phy
- qcom,sm6350-qmp-usb3-dp-phy
+ - qcom,sm8150-qmp-usb3-dp-phy
+ - qcom,sm8250-qmp-usb3-dp-phy
- qcom,sm8350-qmp-usb3-dp-phy
- qcom,sm8450-qmp-usb3-dp-phy
- qcom,sm8550-qmp-usb3-dp-phy
+ - qcom,sm8650-qmp-usb3-dp-phy
+ - qcom,x1e80100-qmp-usb3-dp-phy
reg:
maxItems: 1
clocks:
- maxItems: 4
+ minItems: 4
+ maxItems: 5
clock-names:
+ minItems: 4
items:
- const: aux
- const: ref
- const: com_aux
- const: usb3_pipe
+ - const: cfg_ahb
power-domains:
maxItems: 1
@@ -53,12 +64,12 @@ properties:
"#clock-cells":
const: 1
description:
- See include/dt-bindings/dt-bindings/phy/phy-qcom-qmp.h
+ See include/dt-bindings/phy/phy-qcom-qmp.h
"#phy-cells":
const: 1
description:
- See include/dt-bindings/dt-bindings/phy/phy-qcom-qmp.h
+ See include/dt-bindings/phy/phy-qcom-qmp.h
orientation-switch:
description:
@@ -85,7 +96,6 @@ required:
- reg
- clocks
- clock-names
- - power-domains
- resets
- reset-names
- vdda-phy-supply
@@ -93,6 +103,42 @@ required:
- "#clock-cells"
- "#phy-cells"
+allOf:
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sc7180-qmp-usb3-dp-phy
+ - qcom,sdm845-qmp-usb3-dp-phy
+ then:
+ properties:
+ clocks:
+ maxItems: 5
+ clock-names:
+ maxItems: 5
+ else:
+ properties:
+ clocks:
+ maxItems: 4
+ clock-names:
+ maxItems: 4
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sc8280xp-qmp-usb43dp-phy
+ - qcom,sm6350-qmp-usb3-dp-phy
+ - qcom,sm8550-qmp-usb3-dp-phy
+ - qcom,sm8650-qmp-usb3-dp-phy
+ - qcom,x1e80100-qmp-usb3-dp-phy
+ then:
+ required:
+ - power-domains
+ else:
+ properties:
+ power-domains: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-phy.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-phy.yaml
index c53bab107b6d..b82f7f5731ed 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-phy.yaml
@@ -14,7 +14,14 @@ description:
properties:
compatible:
- const: qcom,sm8550-snps-eusb2-phy
+ oneOf:
+ - items:
+ - enum:
+ - qcom,sdx75-snps-eusb2-phy
+ - qcom,sm8650-snps-eusb2-phy
+ - qcom,x1e80100-snps-eusb2-phy
+ - const: qcom,sm8550-snps-eusb2-phy
+ - const: qcom,sm8550-snps-eusb2-phy
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-repeater.yaml b/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-repeater.yaml
index 083fda530b48..24c733c10e0e 100644
--- a/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-repeater.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/qcom,snps-eusb2-repeater.yaml
@@ -15,7 +15,12 @@ description:
properties:
compatible:
- const: qcom,pm8550b-eusb2-repeater
+ oneOf:
+ - items:
+ - enum:
+ - qcom,pm7550ba-eusb2-repeater
+ - const: qcom,pm8550b-eusb2-repeater
+ - const: qcom,pm8550b-eusb2-repeater
reg:
maxItems: 1
@@ -27,6 +32,27 @@ properties:
vdd3-supply: true
+ qcom,tune-usb2-disc-thres:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: High-Speed disconnect threshold
+ minimum: 0
+ maximum: 7
+ default: 0
+
+ qcom,tune-usb2-amplitude:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: High-Speed trasmit amplitude
+ minimum: 0
+ maximum: 15
+ default: 8
+
+ qcom,tune-usb2-preem:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: High-Speed TX pre-emphasis tuning
+ minimum: 0
+ maximum: 7
+ default: 5
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/phy/realtek,usb2phy.yaml b/sys/contrib/device-tree/Bindings/phy/realtek,usb2phy.yaml
new file mode 100644
index 000000000000..9911ada39ee7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/realtek,usb2phy.yaml
@@ -0,0 +1,175 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/realtek,usb2phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC SoCs USB 2.0 PHY
+
+maintainers:
+ - Stanley Chang <stanley_chang@realtek.com>
+
+description: |
+ Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs.
+ The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs
+ support multiple XHCI controllers. One PHY device node maps to one XHCI
+ controller.
+
+ RTD1295/RTD1619 SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on some
+ controllers.
+ XHCI controller#0 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+
+ RTD1395 SoCs USB
+ The USB architecture includes two XHCI controllers.
+ The controller#0 has one USB 2.0 PHY. The controller#1 includes two USB 2.0
+ PHY.
+ XHCI controller#0 -- usb2phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ |- phy#1
+
+ RTD1319/RTD1619b SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#2.
+ XHCI controller#0 -- usb2phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+
+ RTD1319d SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each xhci maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#0.
+ XHCI controller#0 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+
+ RTD1312c/RTD1315e SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each XHCI maps to one USB 2.0 PHY.
+ XHCI controller#0 -- usb2phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+
+properties:
+ compatible:
+ enum:
+ - realtek,rtd1295-usb2phy
+ - realtek,rtd1312c-usb2phy
+ - realtek,rtd1315e-usb2phy
+ - realtek,rtd1319-usb2phy
+ - realtek,rtd1319d-usb2phy
+ - realtek,rtd1395-usb2phy
+ - realtek,rtd1395-usb2phy-2port
+ - realtek,rtd1619-usb2phy
+ - realtek,rtd1619b-usb2phy
+
+ reg:
+ items:
+ - description: PHY data registers
+ - description: PHY control registers
+
+ "#phy-cells":
+ const: 0
+
+ nvmem-cells:
+ maxItems: 2
+ description:
+ Phandles to nvmem cell that contains the trimming data.
+ If unspecified, default value is used.
+
+ nvmem-cell-names:
+ items:
+ - const: usb-dc-cal
+ - const: usb-dc-dis
+ description:
+ The following names, which correspond to each nvmem-cells.
+ usb-dc-cal is the driving level for each phy specified via efuse.
+ usb-dc-dis is the disconnection level for each phy specified via efuse.
+
+ realtek,inverse-hstx-sync-clock:
+ description:
+ For one of the phys of RTD1619b SoC, the synchronous clock of the
+ high-speed tx must be inverted.
+ type: boolean
+
+ realtek,driving-level:
+ description:
+ Control the magnitude of High speed Dp/Dm output swing (mV).
+ For a different board or port, the original magnitude maybe not meet
+ the specification. In this situation we can adjust the value to meet
+ the specification.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 8
+ minimum: 0
+ maximum: 31
+
+ realtek,driving-level-compensate:
+ description:
+ For RTD1315e SoC, the driving level can be adjusted by reading the
+ efuse table. This property provides drive compensation.
+ If the magnitude of High speed Dp/Dm output swing still not meet the
+ specification, then we can set this value to meet the specification.
+ $ref: /schemas/types.yaml#/definitions/int32
+ default: 0
+ minimum: -8
+ maximum: 8
+
+ realtek,disconnection-compensate:
+ description:
+ This adjusts the disconnection level compensation for the different
+ boards with different disconnection level.
+ $ref: /schemas/types.yaml#/definitions/int32
+ default: 0
+ minimum: -8
+ maximum: 8
+
+required:
+ - compatible
+ - reg
+ - "#phy-cells"
+
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - realtek,rtd1619b-usb2phy
+ then:
+ properties:
+ realtek,inverse-hstx-sync-clock: false
+
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - realtek,rtd1315e-usb2phy
+ then:
+ properties:
+ realtek,driving-level-compensate: false
+
+additionalProperties: false
+
+examples:
+ - |
+ usb-phy@13214 {
+ compatible = "realtek,rtd1619b-usb2phy";
+ reg = <0x13214 0x4>, <0x28280 0x4>;
+ #phy-cells = <0>;
+ nvmem-cells = <&otp_usb_port0_dc_cal>, <&otp_usb_port0_dc_dis>;
+ nvmem-cell-names = "usb-dc-cal", "usb-dc-dis";
+
+ realtek,inverse-hstx-sync-clock;
+ realtek,driving-level = <0xa>;
+ realtek,disconnection-compensate = <(-1)>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/realtek,usb3phy.yaml b/sys/contrib/device-tree/Bindings/phy/realtek,usb3phy.yaml
new file mode 100644
index 000000000000..dfe2bb4e59e7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/realtek,usb3phy.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/realtek,usb3phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC SoCs USB 3.0 PHY
+
+maintainers:
+ - Stanley Chang <stanley_chang@realtek.com>
+
+description: |
+ Realtek USB 3.0 PHY support the digital home center (DHC) RTD series SoCs.
+ The USB 3.0 PHY driver is designed to support the XHCI controller. The SoCs
+ support multiple XHCI controllers. One PHY device node maps to one XHCI
+ controller.
+
+ RTD1295/RTD1619 SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on some
+ controllers.
+ XHCI controller#0 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+
+ RTD1319/RTD1619b SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#2.
+ XHCI controller#0 -- usb2phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+
+ RTD1319d SoCs USB
+ The USB architecture includes three XHCI controllers.
+ Each xhci maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#0.
+ XHCI controller#0 -- usb2phy -- phy#0
+ |- usb3phy -- phy#0
+ XHCI controller#1 -- usb2phy -- phy#0
+ XHCI controller#2 -- usb2phy -- phy#0
+
+properties:
+ compatible:
+ enum:
+ - realtek,rtd1295-usb3phy
+ - realtek,rtd1319-usb3phy
+ - realtek,rtd1319d-usb3phy
+ - realtek,rtd1619-usb3phy
+ - realtek,rtd1619b-usb3phy
+
+ reg:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+ nvmem-cells:
+ maxItems: 1
+ description: A phandle to the tx lfps swing trim data provided by
+ a nvmem device, if unspecified, default values shall be used.
+
+ nvmem-cell-names:
+ items:
+ - const: usb_u3_tx_lfps_swing_trim
+
+ realtek,amplitude-control-coarse-tuning:
+ description:
+ This adjusts the signal amplitude for normal operation and beacon LFPS.
+ This value is a parameter for coarse tuning.
+ For different boards, if the default value is inappropriate, this
+ property can be assigned to adjust.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 255
+ minimum: 0
+ maximum: 255
+
+ realtek,amplitude-control-fine-tuning:
+ description:
+ This adjusts the signal amplitude for normal operation and beacon LFPS.
+ This value is used for fine-tuning parameters.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 65535
+ minimum: 0
+ maximum: 65535
+
+required:
+ - compatible
+ - reg
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ usb-phy@13e10 {
+ compatible = "realtek,rtd1319d-usb3phy";
+ reg = <0x13e10 0x4>;
+ #phy-cells = <0>;
+
+ nvmem-cells = <&otp_usb_u3_tx_lfps_swing_trim>;
+ nvmem-cell-names = "usb_u3_tx_lfps_swing_trim";
+
+ realtek,amplitude-control-coarse-tuning = <0x77>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/rockchip,inno-usb2phy.yaml b/sys/contrib/device-tree/Bindings/phy/rockchip,inno-usb2phy.yaml
index 0d6b8c28be07..5254413137c6 100644
--- a/sys/contrib/device-tree/Bindings/phy/rockchip,inno-usb2phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/rockchip,inno-usb2phy.yaml
@@ -20,6 +20,7 @@ properties:
- rockchip,rk3366-usb2phy
- rockchip,rk3399-usb2phy
- rockchip,rk3568-usb2phy
+ - rockchip,rk3588-usb2phy
- rockchip,rv1108-usb2phy
reg:
@@ -56,6 +57,14 @@ properties:
description: Muxed interrupt for both ports
maxItems: 1
+ resets:
+ maxItems: 2
+
+ reset-names:
+ items:
+ - const: phy
+ - const: apb
+
rockchip,usbgrf:
$ref: /schemas/types.yaml#/definitions/phandle
description:
@@ -120,15 +129,21 @@ required:
- reg
- clock-output-names
- "#clock-cells"
- - host-port
- - otg-port
+
+anyOf:
+ - required:
+ - otg-port
+ - required:
+ - host-port
allOf:
- if:
properties:
compatible:
contains:
- const: rockchip,rk3568-usb2phy
+ enum:
+ - rockchip,rk3568-usb2phy
+ - rockchip,rk3588-usb2phy
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/phy/rockchip,pcie3-phy.yaml b/sys/contrib/device-tree/Bindings/phy/rockchip,pcie3-phy.yaml
index 9f2d8d2cc7a5..c4fbffcde6e4 100644
--- a/sys/contrib/device-tree/Bindings/phy/rockchip,pcie3-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/rockchip,pcie3-phy.yaml
@@ -13,19 +13,18 @@ properties:
compatible:
enum:
- rockchip,rk3568-pcie3-phy
+ - rockchip,rk3588-pcie3-phy
reg:
maxItems: 1
clocks:
- minItems: 3
+ minItems: 1
maxItems: 3
clock-names:
- items:
- - const: refclk_m
- - const: refclk_n
- - const: pclk
+ minItems: 1
+ maxItems: 3
data-lanes:
description: which lanes (by position) should be mapped to which
@@ -61,6 +60,30 @@ required:
- rockchip,phy-grf
- "#phy-cells"
+allOf:
+ - if:
+ properties:
+ compatible:
+ enum:
+ - rockchip,rk3588-pcie3-phy
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ items:
+ - const: pclk
+ else:
+ properties:
+ clocks:
+ minItems: 3
+
+ clock-names:
+ items:
+ - const: refclk_m
+ - const: refclk_n
+ - const: pclk
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/phy/rockchip,px30-dsi-dphy.yaml b/sys/contrib/device-tree/Bindings/phy/rockchip,px30-dsi-dphy.yaml
index 5c35e5ceec0b..46e64fa293d5 100644
--- a/sys/contrib/device-tree/Bindings/phy/rockchip,px30-dsi-dphy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/rockchip,px30-dsi-dphy.yaml
@@ -19,6 +19,7 @@ properties:
- rockchip,rk3128-dsi-dphy
- rockchip,rk3368-dsi-dphy
- rockchip,rk3568-dsi-dphy
+ - rockchip,rv1126-dsi-dphy
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/phy/rockchip-inno-csi-dphy.yaml b/sys/contrib/device-tree/Bindings/phy/rockchip-inno-csi-dphy.yaml
index 0e6505e9da50..5ac994b3c0aa 100644
--- a/sys/contrib/device-tree/Bindings/phy/rockchip-inno-csi-dphy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/rockchip-inno-csi-dphy.yaml
@@ -10,7 +10,7 @@ maintainers:
- Heiko Stuebner <heiko@sntech.de>
description: |
- The Rockchip SoC has a MIPI CSI D-PHY based on an Innosilicon IP wich
+ The Rockchip SoC has a MIPI CSI D-PHY based on an Innosilicon IP which
connects to the ISP1 (Image Signal Processing unit v1.0) for CSI cameras.
properties:
diff --git a/sys/contrib/device-tree/Bindings/phy/samsung,usb3-drd-phy.yaml b/sys/contrib/device-tree/Bindings/phy/samsung,usb3-drd-phy.yaml
index 5ba55f9f20cc..452e584d9812 100644
--- a/sys/contrib/device-tree/Bindings/phy/samsung,usb3-drd-phy.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/samsung,usb3-drd-phy.yaml
@@ -29,6 +29,7 @@ properties:
- samsung,exynos5420-usbdrd-phy
- samsung,exynos5433-usbdrd-phy
- samsung,exynos7-usbdrd-phy
+ - samsung,exynos850-usbdrd-phy
clocks:
minItems: 2
diff --git a/sys/contrib/device-tree/Bindings/phy/st,stih407-usb2-phy.yaml b/sys/contrib/device-tree/Bindings/phy/st,stih407-usb2-phy.yaml
new file mode 100644
index 000000000000..e45cdd98aab2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/st,stih407-usb2-phy.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/st,stih407-usb2-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STiH407 USB PHY controller
+
+maintainers:
+ - Patrice Chotard <patrice.chotard@foss.st.com>
+
+description:
+ The USB picoPHY device is the PHY for both USB2 and USB3 host controllers
+ (when controlling usb2/1.1 devices) available on STiH407 SoC family from
+ STMicroelectronics.
+
+properties:
+ compatible:
+ const: st,stih407-usb2-phy
+
+ st,syscfg:
+ description: Phandle to the syscfg bank
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to syscfg
+ - description: phyparam register offset
+ - description: phyctrl register offset
+
+ resets:
+ items:
+ - description: Phandle and reset specifier pair for the whole phy.
+ - description: Phandle and reset specifier pair for the port.
+
+ reset-names:
+ items:
+ - const: global
+ - const: port
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - st,syscfg
+ - resets
+ - reset-names
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/reset/stih407-resets.h>
+ usb-phy {
+ compatible = "st,stih407-usb2-phy";
+ #phy-cells = <0>;
+ st,syscfg = <&syscfg_core 0x100 0xf4>;
+ resets = <&softreset STIH407_PICOPHY_SOFTRESET>,
+ <&picophyreset STIH407_PICOPHY0_RESET>;
+ reset-names = "global", "port";
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-dphy-rx.yaml b/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-dphy-rx.yaml
new file mode 100644
index 000000000000..7224cde6fce0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-dphy-rx.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/starfive,jh7110-dphy-rx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive SoC JH7110 MIPI D-PHY Rx Controller
+
+maintainers:
+ - Jack Zhu <jack.zhu@starfivetech.com>
+ - Changhuang Liang <changhuang.liang@starfivetech.com>
+
+description:
+ StarFive SoCs contain a MIPI CSI D-PHY based on M31 IP, used to
+ transfer CSI camera data.
+
+properties:
+ compatible:
+ const: starfive,jh7110-dphy-rx
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: config clock
+ - description: reference clock
+ - description: escape mode transmit clock
+
+ clock-names:
+ items:
+ - const: cfg
+ - const: ref
+ - const: tx
+
+ resets:
+ items:
+ - description: DPHY_HW reset
+ - description: DPHY_B09_ALWAYS_ON reset
+
+ power-domains:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - power-domains
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ phy@19820000 {
+ compatible = "starfive,jh7110-dphy-rx";
+ reg = <0x19820000 0x10000>;
+ clocks = <&ispcrg 3>,
+ <&ispcrg 4>,
+ <&ispcrg 5>;
+ clock-names = "cfg", "ref", "tx";
+ resets = <&ispcrg 2>,
+ <&ispcrg 3>;
+ power-domains = <&aon_syscon 1>;
+ #phy-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-pcie-phy.yaml b/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-pcie-phy.yaml
new file mode 100644
index 000000000000..2e83a6164cd1
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-pcie-phy.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/starfive,jh7110-pcie-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 PCIe 2.0 PHY
+
+maintainers:
+ - Minda Chen <minda.chen@starfivetech.com>
+
+properties:
+ compatible:
+ const: starfive,jh7110-pcie-phy
+
+ reg:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+ starfive,sys-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to System Register Controller sys_syscon node.
+ - description: PHY connect offset of SYS_SYSCONSAIF__SYSCFG register for USB PHY.
+ description:
+ The phandle to System Register Controller syscon node and the PHY connect offset
+ of SYS_SYSCONSAIF__SYSCFG register. Connect PHY to USB3 controller.
+
+ starfive,stg-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to System Register Controller stg_syscon node.
+ - description: PHY mode offset of STG_SYSCONSAIF__SYSCFG register.
+ - description: PHY enable for USB offset of STG_SYSCONSAIF__SYSCFG register.
+ description:
+ The phandle to System Register Controller syscon node and the offset
+ of STG_SYSCONSAIF__SYSCFG register for PCIe PHY. Total 2 regsisters offset.
+
+required:
+ - compatible
+ - reg
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ phy@10210000 {
+ compatible = "starfive,jh7110-pcie-phy";
+ reg = <0x10210000 0x10000>;
+ #phy-cells = <0>;
+ starfive,sys-syscon = <&sys_syscon 0x18>;
+ starfive,stg-syscon = <&stg_syscon 0x148 0x1f4>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-usb-phy.yaml b/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-usb-phy.yaml
new file mode 100644
index 000000000000..269e9f9f12b6
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/phy/starfive,jh7110-usb-phy.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/starfive,jh7110-usb-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 USB 2.0 PHY
+
+maintainers:
+ - Minda Chen <minda.chen@starfivetech.com>
+
+properties:
+ compatible:
+ const: starfive,jh7110-usb-phy
+
+ reg:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+ clocks:
+ items:
+ - description: PHY 125m
+ - description: app 125m
+
+ clock-names:
+ items:
+ - const: 125m
+ - const: app_125m
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ phy@10200000 {
+ compatible = "starfive,jh7110-usb-phy";
+ reg = <0x10200000 0x10000>;
+ clocks = <&syscrg 95>,
+ <&stgcrg 6>;
+ clock-names = "125m", "app_125m";
+ #phy-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml b/sys/contrib/device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml
index 9ea30eaba314..3f16ff14484d 100644
--- a/sys/contrib/device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml
+++ b/sys/contrib/device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml
@@ -59,7 +59,7 @@ properties:
description:
GPIO to signal Type-C cable orientation for lane swap.
If GPIO is active, lane 0 and lane 1 of SERDES will be swapped to
- achieve the funtionality of an external type-C plug flip mux.
+ achieve the functionality of an external type-C plug flip mux.
typec-dir-debounce-ms:
minimum: 100
diff --git a/sys/contrib/device-tree/Bindings/phy/ti-phy.txt b/sys/contrib/device-tree/Bindings/phy/ti-phy.txt
index 60c9d0ac75e6..7c7936b89f2c 100644
--- a/sys/contrib/device-tree/Bindings/phy/ti-phy.txt
+++ b/sys/contrib/device-tree/Bindings/phy/ti-phy.txt
@@ -62,7 +62,7 @@ Deprecated properties:
- ctrl-module : phandle of the control module used by PHY driver to power on
the PHY.
-Recommended properies:
+Recommended properties:
- syscon-phy-power : phandle/offset pair. Phandle to the system control
module and the register offset to power on/off the PHY.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
index 467016cbb037..450240570314 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
@@ -97,7 +97,7 @@ patternProperties:
# It's pretty scary, but the basic idea is that:
# - One node name can start with either s- or r- for PRCM nodes,
# - Then, the name itself can be any repetition of <string>- (to
- # accomodate with nodes like uart4-rts-cts-pins), where each
+ # accommodate with nodes like uart4-rts-cts-pins), where each
# string can be either starting with 'p' but in a string longer
# than 3, or something that doesn't start with 'p',
# - Then, the bank name is optional and will be between pa and pg,
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml
index 99080c9eaac3..c7df4cd34197 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml
@@ -15,6 +15,8 @@ allOf:
properties:
compatible:
enum:
+ - amlogic,c3-periphs-pinctrl
+ - amlogic,t7-periphs-pinctrl
- amlogic,meson-a1-periphs-pinctrl
- amlogic,meson-s4-periphs-pinctrl
@@ -36,6 +38,10 @@ patternProperties:
- const: mux
- const: gpio
+ gpio-line-names:
+ minItems: 62 # A1
+ maxItems: 82 # S4
+
unevaluatedProperties:
type: object
$ref: amlogic,meson-pinctrl-common.yaml#/$defs/meson-pins
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-common.yaml b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-common.yaml
index a7b29ef0bab6..e707c222a07f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-common.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-common.yaml
@@ -41,6 +41,13 @@ $defs:
gpio-ranges:
maxItems: 1
+ patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+
+ required:
+ - gpio-hog
+
required:
- reg
- reg-names
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-aobus.yaml b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-aobus.yaml
index 7c9c94ec5b7b..0942ea60c6cd 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-aobus.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-aobus.yaml
@@ -36,6 +36,9 @@ patternProperties:
- const: ds
- const: gpio
+ gpio-line-names:
+ maxItems: 15
+
unevaluatedProperties:
type: object
$ref: amlogic,meson-pinctrl-common.yaml#/$defs/meson-pins
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-periphs.yaml b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-periphs.yaml
index 4bcb8b60420f..e3c8bde30559 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-periphs.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson-pinctrl-g12a-periphs.yaml
@@ -38,6 +38,9 @@ patternProperties:
- const: mux
- const: ds
+ gpio-line-names:
+ maxItems: 85
+
unevaluatedProperties:
type: object
$ref: amlogic,meson-pinctrl-common.yaml#/$defs/meson-pins
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-aobus.yaml b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-aobus.yaml
index 32d99c9b6afc..c1b03147e8ec 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-aobus.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-aobus.yaml
@@ -44,6 +44,10 @@ patternProperties:
- const: pull
- const: gpio
+ gpio-line-names:
+ minItems: 11 # GXL
+ maxItems: 16 # Meson8
+
unevaluatedProperties:
type: object
$ref: amlogic,meson-pinctrl-common.yaml#/$defs/meson-pins
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-cbus.yaml b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-cbus.yaml
index d0441051f34a..4ec85b8248fa 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-cbus.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/amlogic,meson8-pinctrl-cbus.yaml
@@ -45,6 +45,10 @@ patternProperties:
- const: pull-enable
- const: gpio
+ gpio-line-names:
+ minItems: 86 # AXG
+ maxItems: 120 # Meson8
+
unevaluatedProperties:
type: object
$ref: amlogic,meson-pinctrl-common.yaml#/$defs/meson-pins
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
index bef85c25cdef..37c0a74c7c01 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
@@ -25,30 +25,32 @@ properties:
reg:
maxItems: 2
-patternProperties:
- '^.*$':
- if:
- type: object
- then:
- patternProperties:
- "^function|groups$":
- $ref: /schemas/types.yaml#/definitions/string
- enum: [ ACPI, ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
- ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, DDCCLK, DDCDAT,
- EXTRST, FLACK, FLBUSY, FLWP, GPID, GPID0, GPID2, GPID4, GPID6, GPIE0,
- GPIE2, GPIE4, GPIE6, I2C10, I2C11, I2C12, I2C13, I2C14, I2C3, I2C4,
- I2C5, I2C6, I2C7, I2C8, I2C9, LPCPD, LPCPME, LPCRST, LPCSMI, MAC1LINK,
- MAC2LINK, MDIO1, MDIO2, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2,
- NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4,
- NDTS4, NRI1, NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, OSCCLK, PWM0,
- PWM1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, RGMII1, RGMII2, RMII1,
- RMII2, ROM16, ROM8, ROMCS1, ROMCS2, ROMCS3, ROMCS4, RXD1, RXD2, RXD3,
- RXD4, SALT1, SALT2, SALT3, SALT4, SD1, SD2, SGPMCK, SGPMI, SGPMLD,
- SGPMO, SGPSCK, SGPSI0, SGPSI1, SGPSLD, SIOONCTRL, SIOPBI, SIOPBO,
- SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1DEBUG, SPI1PASSTHRU,
- SPICS1, TIMER3, TIMER4, TIMER5, TIMER6, TIMER7, TIMER8, TXD1, TXD2,
- TXD3, TXD4, UART6, USB11D1, USB11H2, USB2D1, USB2H1, USBCKI, VGABIOS_ROM,
- VGAHS, VGAVS, VPI18, VPI24, VPI30, VPO12, VPO24, WDTRST1, WDTRST2]
+additionalProperties:
+ $ref: pinmux-node.yaml#
+ additionalProperties: false
+
+ properties:
+ pins: true
+ bias-disable: true
+
+ patternProperties:
+ "^function|groups$":
+ enum: [ ACPI, ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
+ ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, DDCCLK, DDCDAT,
+ EXTRST, FLACK, FLBUSY, FLWP, GPID, GPID0, GPID2, GPID4, GPID6, GPIE0,
+ GPIE2, GPIE4, GPIE6, I2C10, I2C11, I2C12, I2C13, I2C14, I2C3, I2C4,
+ I2C5, I2C6, I2C7, I2C8, I2C9, LPCPD, LPCPME, LPCRST, LPCSMI, MAC1LINK,
+ MAC2LINK, MDIO1, MDIO2, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2,
+ NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4,
+ NDTS4, NRI1, NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, OSCCLK, PWM0,
+ PWM1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, RGMII1, RGMII2, RMII1,
+ RMII2, ROM16, ROM8, ROMCS1, ROMCS2, ROMCS3, ROMCS4, RXD1, RXD2, RXD3,
+ RXD4, SALT1, SALT2, SALT3, SALT4, SD1, SD2, SGPMCK, SGPMI, SGPMLD,
+ SGPMO, SGPSCK, SGPSI0, SGPSI1, SGPSLD, SIOONCTRL, SIOPBI, SIOPBO,
+ SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1DEBUG, SPI1PASSTHRU,
+ SPICS1, TIMER3, TIMER4, TIMER5, TIMER6, TIMER7, TIMER8, TXD1, TXD2,
+ TXD3, TXD4, UART6, USB11D1, USB11H2, USB2D1, USB2H1, USBCKI, VGABIOS_ROM,
+ VGAHS, VGAVS, VPI18, VPI24, VPI30, VPO12, VPO24, WDTRST1, WDTRST2]
allOf:
- $ref: pinctrl.yaml#
@@ -56,8 +58,6 @@ allOf:
required:
- compatible
-additionalProperties: false
-
examples:
- |
syscon: scu@1e6e2000 {
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
index 14c391f16899..863da5d80826 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
@@ -37,32 +37,34 @@ properties:
0: compatible with "aspeed,ast2500-gfx", "syscon"
1: compatible with "aspeed,ast2500-lhc", "syscon"
-patternProperties:
- '^.*$':
- if:
- type: object
- then:
- patternProperties:
- "^function|groups$":
- $ref: /schemas/types.yaml#/definitions/string
- enum: [ ACPI, ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
- ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, DDCCLK, DDCDAT,
- ESPI, FWSPICS1, FWSPICS2, GPID0, GPID2, GPID4, GPID6, GPIE0, GPIE2,
- GPIE4, GPIE6, I2C10, I2C11, I2C12, I2C13, I2C14, I2C3, I2C4, I2C5,
- I2C6, I2C7, I2C8, I2C9, LAD0, LAD1, LAD2, LAD3, LCLK, LFRAME, LPCHC,
- LPCPD, LPCPLUS, LPCPME, LPCRST, LPCSMI, LSIRQ, MAC1LINK, MAC2LINK,
- MDIO1, MDIO2, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4,
- NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2,
- NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4, OSCCLK, PEWAKE, PNOR, PWM0,
- PWM1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, RGMII1, RGMII2, RMII1,
- RMII2, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12, SALT13,
- SALT14, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8, SALT9, SCL1,
- SCL2, SD1, SD2, SDA1, SDA2, SGPS1, SGPS2, SIOONCTRL, SIOPBI, SIOPBO,
- SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1CS1, SPI1DEBUG,
- SPI1PASSTHRU, SPI2CK, SPI2CS0, SPI2CS1, SPI2MISO, SPI2MOSI, TIMER3,
- TIMER4, TIMER5, TIMER6, TIMER7, TIMER8, TXD1, TXD2, TXD3, TXD4, UART6,
- USB11BHID, USB2AD, USB2AH, USB2BD, USB2BH, USBCKI, VGABIOSROM, VGAHS,
- VGAVS, VPI24, VPO, WDTRST1, WDTRST2]
+additionalProperties:
+ $ref: pinmux-node.yaml#
+ additionalProperties: false
+
+ properties:
+ pins: true
+ bias-disable: true
+
+ patternProperties:
+ "^function|groups$":
+ enum: [ ACPI, ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
+ ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, DDCCLK, DDCDAT,
+ ESPI, FWSPICS1, FWSPICS2, GPID0, GPID2, GPID4, GPID6, GPIE0, GPIE2,
+ GPIE4, GPIE6, I2C10, I2C11, I2C12, I2C13, I2C14, I2C3, I2C4, I2C5,
+ I2C6, I2C7, I2C8, I2C9, LAD0, LAD1, LAD2, LAD3, LCLK, LFRAME, LPCHC,
+ LPCPD, LPCPLUS, LPCPME, LPCRST, LPCSMI, LSIRQ, MAC1LINK, MAC2LINK,
+ MDIO1, MDIO2, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4,
+ NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2,
+ NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4, OSCCLK, PEWAKE, PNOR, PWM0,
+ PWM1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, RGMII1, RGMII2, RMII1,
+ RMII2, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12, SALT13,
+ SALT14, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8, SALT9, SCL1,
+ SCL2, SD1, SD2, SDA1, SDA2, SGPS1, SGPS2, SIOONCTRL, SIOPBI, SIOPBO,
+ SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1CS1, SPI1DEBUG,
+ SPI1PASSTHRU, SPI2CK, SPI2CS0, SPI2CS1, SPI2MISO, SPI2MOSI, TIMER3,
+ TIMER4, TIMER5, TIMER6, TIMER7, TIMER8, TXD1, TXD2, TXD3, TXD4, UART6,
+ USB11BHID, USB2AD, USB2AH, USB2BD, USB2BH, USBCKI, VGABIOSROM, VGAHS,
+ VGAVS, VPI24, VPO, WDTRST1, WDTRST2]
allOf:
- $ref: pinctrl.yaml#
@@ -71,8 +73,6 @@ required:
- compatible
- aspeed,external-nodes
-additionalProperties: false
-
examples:
- |
#include <dt-bindings/clock/aspeed-clock.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml
index 859a1889dc1e..612464aef98b 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml
@@ -23,65 +23,65 @@ properties:
compatible:
const: aspeed,ast2600-pinctrl
-patternProperties:
- '^.*$':
- if:
- type: object
- then:
- properties:
- function:
- $ref: /schemas/types.yaml#/definitions/string
- enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, ADC2,
- ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMC, ESPI, ESPIALT,
- FSI1, FSI2, FWQSPI, FWSPIABR, FWSPID, FWSPIWP, GPIT0, GPIT1, GPIT2, GPIT3,
- GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1, GPIU2, GPIU3, GPIU4, GPIU5,
- GPIU6, GPIU7, I2C1, I2C10, I2C11, I2C12, I2C13, I2C14, I2C15, I2C16,
- I2C2, I2C3, I2C4, I2C5, I2C6, I2C7, I2C8, I2C9, I3C3, I3C4, I3C5,
- I3C6, JTAGM, LHPD, LHSIRQ, LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ,
- MACLINK1, MACLINK2, MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4,
- NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2,
- NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4,
- NRTS1, NRTS2, NRTS3, NRTS4, OSCCLK, PEWAKE, PWM0, PWM1, PWM10, PWM11,
- PWM12, PWM13, PWM14, PWM15, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, PWM8,
- PWM9, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, RMII4,
- RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12, SALT13, SALT14,
- SALT15, SALT16, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8,
- SALT9, SD1, SD2, SGPM1, SGPM2, SGPS1, SGPS2, SIOONCTRL, SIOPBI, SIOPBO,
- SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, SPI1WP, SPI2,
- SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11, TACH12, TACH13, TACH14,
- TACH15, TACH2, TACH3, TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0,
- THRU1, THRU2, THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12,
- UART13, UART6, UART7, UART8, UART9, USBAD, USBADP, USB2AH, USB2AHP,
- USB2BD, USB2BH, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, WDTRST4 ]
-
- groups:
- $ref: /schemas/types.yaml#/definitions/string
- enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, ADC2,
- ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMCG1, EMMCG4,
- EMMCG8, ESPI, ESPIALT, FSI1, FSI2, FWQSPI, FWSPIABR, FWSPID, FWSPIWP,
- GPIT0, GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1,
- GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, HVI3C3, HVI3C4, I2C1, I2C10,
- I2C11, I2C12, I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, I2C4, I2C5,
- I2C6, I2C7, I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ,
- LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2, MACLINK3,
- MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2, NCTS3, NCTS4,
- NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2,
- NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4,
- OSCCLK, PEWAKE, PWM0, PWM1, PWM10G0, PWM10G1, PWM11G0, PWM11G1, PWM12G0,
- PWM12G1, PWM13G0, PWM13G1, PWM14G0, PWM14G1, PWM15G0, PWM15G1, PWM2,
- PWM3, PWM4, PWM5, PWM6, PWM7, PWM8G0, PWM8G1, PWM9G0, PWM9G1, QSPI1,
- QSPI2, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, RMII4,
- RXD1, RXD2, RXD3, RXD4, SALT1, SALT10G0, SALT10G1, SALT11G0, SALT11G1,
- SALT12G0, SALT12G1, SALT13G0, SALT13G1, SALT14G0, SALT14G1, SALT15G0,
- SALT15G1, SALT16G0, SALT16G1, SALT2, SALT3, SALT4, SALT5, SALT6,
- SALT7, SALT8, SALT9G0, SALT9G1, SD1, SD2, SD3, SGPM1, SGPM2, SGPS1, SGPS2,
- SIOONCTRL, SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1,
- SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11,
- TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, TACH4, TACH5, TACH6,
- TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, THRU3, TXD1, TXD2, TXD3,
- TXD4, UART10, UART11, UART12G0, UART12G1, UART13G0, UART13G1, UART6,
- UART7, UART8, UART9, USBA, USBB, VB, VGAHS, VGAVS, WDTRST1, WDTRST2,
- WDTRST3, WDTRST4]
+additionalProperties:
+ $ref: pinmux-node.yaml#
+ additionalProperties: false
+
+ properties:
+ function:
+ enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, ADC2,
+ ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMC, ESPI, ESPIALT,
+ FSI1, FSI2, FWQSPI, FWSPIABR, FWSPID, FWSPIWP, GPIT0, GPIT1, GPIT2, GPIT3,
+ GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1, GPIU2, GPIU3, GPIU4, GPIU5,
+ GPIU6, GPIU7, I2C1, I2C10, I2C11, I2C12, I2C13, I2C14, I2C15, I2C16,
+ I2C2, I2C3, I2C4, I2C5, I2C6, I2C7, I2C8, I2C9, I3C3, I3C4, I3C5,
+ I3C6, JTAGM, LHPD, LHSIRQ, LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ,
+ MACLINK1, MACLINK2, MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4,
+ NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2,
+ NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4,
+ NRTS1, NRTS2, NRTS3, NRTS4, OSCCLK, PEWAKE, PWM0, PWM1, PWM10, PWM11,
+ PWM12, PWM13, PWM14, PWM15, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, PWM8,
+ PWM9, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, RMII4,
+ RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12, SALT13, SALT14,
+ SALT15, SALT16, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8,
+ SALT9, SD1, SD2, SGPM1, SGPM2, SGPS1, SGPS2, SIOONCTRL, SIOPBI, SIOPBO,
+ SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, SPI1WP, SPI2,
+ SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11, TACH12, TACH13, TACH14,
+ TACH15, TACH2, TACH3, TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0,
+ THRU1, THRU2, THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12,
+ UART13, UART6, UART7, UART8, UART9, USBAD, USBADP, USB2AH, USB2AHP,
+ USB2BD, USB2BH, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, WDTRST4 ]
+
+ groups:
+ enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, ADC2,
+ ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMCG1, EMMCG4,
+ EMMCG8, ESPI, ESPIALT, FSI1, FSI2, FWQSPI, FWSPIABR, FWSPID, FWSPIWP,
+ GPIT0, GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1,
+ GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, HVI3C3, HVI3C4, I2C1, I2C10,
+ I2C11, I2C12, I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, I2C4, I2C5,
+ I2C6, I2C7, I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ,
+ LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2, MACLINK3,
+ MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2, NCTS3, NCTS4,
+ NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2,
+ NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4,
+ OSCCLK, PEWAKE, PWM0, PWM1, PWM10G0, PWM10G1, PWM11G0, PWM11G1, PWM12G0,
+ PWM12G1, PWM13G0, PWM13G1, PWM14G0, PWM14G1, PWM15G0, PWM15G1, PWM2,
+ PWM3, PWM4, PWM5, PWM6, PWM7, PWM8G0, PWM8G1, PWM9G0, PWM9G1, QSPI1,
+ QSPI2, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, RMII4,
+ RXD1, RXD2, RXD3, RXD4, SALT1, SALT10G0, SALT10G1, SALT11G0, SALT11G1,
+ SALT12G0, SALT12G1, SALT13G0, SALT13G1, SALT14G0, SALT14G1, SALT15G0,
+ SALT15G1, SALT16G0, SALT16G1, SALT2, SALT3, SALT4, SALT5, SALT6,
+ SALT7, SALT8, SALT9G0, SALT9G1, SD1, SD2, SD3, SGPM1, SGPM2, SGPS1, SGPS2,
+ SIOONCTRL, SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1,
+ SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11,
+ TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, TACH4, TACH5, TACH6,
+ TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, THRU3, TXD1, TXD2, TXD3,
+ TXD4, UART10, UART11, UART12G0, UART12G1, UART13G0, UART13G1, UART6,
+ UART7, UART8, UART9, USBA, USBB, VB, VGAHS, VGAVS, WDTRST1, WDTRST2,
+ WDTRST3, WDTRST4]
+
+ pins: true
+ bias-disable: true
allOf:
- $ref: pinctrl.yaml#
@@ -89,8 +89,6 @@ allOf:
required:
- compatible
-additionalProperties: false
-
examples:
- |
syscon: scu@1e6e2000 {
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm11351-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm11351-pinctrl.yaml
new file mode 100644
index 000000000000..90c275295199
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm11351-pinctrl.yaml
@@ -0,0 +1,259 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/brcm,bcm11351-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM281xx pin controller
+
+maintainers:
+ - Florian Fainelli <florian.fainelli@broadcom.com>
+ - Ray Jui <rjui@broadcom.com>
+ - Scott Branden <sbranden@broadcom.com>
+
+allOf:
+ - $ref: pinctrl.yaml#
+
+properties:
+ compatible:
+ const: brcm,bcm11351-pinctrl
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ '-pins$':
+ type: object
+ additionalProperties: false
+
+ patternProperties:
+ '-grp[0-9]$':
+ type: object
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ Specifies the name(s) of one or more pins to be configured by
+ this node.
+ items:
+ enum: [ adcsync, bat_rm, bsc1_scl, bsc1_sda, bsc2_scl, bsc2_sda,
+ classgpwr, clk_cx8, clkout_0, clkout_1, clkout_2,
+ clkout_3, clkreq_in_0, clkreq_in_1, cws_sys_req1,
+ cws_sys_req2, cws_sys_req3, digmic1_clk, digmic1_dq,
+ digmic2_clk, digmic2_dq, gpen13, gpen14, gpen15, gpio00,
+ gpio01, gpio02, gpio03, gpio04, gpio05, gpio06, gpio07,
+ gpio08, gpio09, gpio10, gpio11, gpio12, gpio13, gpio14,
+ gps_pablank, gps_tmark, hdmi_scl, hdmi_sda, ic_dm, ic_dp,
+ kp_col_ip_0, kp_col_ip_1, kp_col_ip_2, kp_col_ip_3,
+ kp_row_op_0, kp_row_op_1, kp_row_op_2, kp_row_op_3,
+ lcd_b_0, lcd_b_1, lcd_b_2, lcd_b_3, lcd_b_4, lcd_b_5,
+ lcd_b_6, lcd_b_7, lcd_g_0, lcd_g_1, lcd_g_2, lcd_g_3,
+ lcd_g_4, lcd_g_5, lcd_g_6, lcd_g_7, lcd_hsync, lcd_oe,
+ lcd_pclk, lcd_r_0, lcd_r_1, lcd_r_2, lcd_r_3, lcd_r_4,
+ lcd_r_5, lcd_r_6, lcd_r_7, lcd_vsync, mdmgpio0, mdmgpio1,
+ mdmgpio2, mdmgpio3, mdmgpio4, mdmgpio5, mdmgpio6,
+ mdmgpio7, mdmgpio8, mphi_data_0, mphi_data_1, mphi_data_2,
+ mphi_data_3, mphi_data_4, mphi_data_5, mphi_data_6,
+ mphi_data_7, mphi_data_8, mphi_data_9, mphi_data_10,
+ mphi_data_11, mphi_data_12, mphi_data_13, mphi_data_14,
+ mphi_data_15, mphi_ha0, mphi_hat0, mphi_hat1, mphi_hce0_n,
+ mphi_hce1_n, mphi_hrd_n, mphi_hwr_n, mphi_run0, mphi_run1,
+ mtx_scan_clk, mtx_scan_data, nand_ad_0, nand_ad_1,
+ nand_ad_2, nand_ad_3, nand_ad_4, nand_ad_5, nand_ad_6,
+ nand_ad_7, nand_ale, nand_cen_0, nand_cen_1, nand_cle,
+ nand_oen, nand_rdy_0, nand_rdy_1, nand_wen, nand_wp, pc1,
+ pc2, pmu_int, pmu_scl, pmu_sda, rfst2g_mtsloten3g,
+ rgmii_0_rx_ctl, rgmii_0_rxc, rgmii_0_rxd_0, rgmii_0_rxd_1,
+ rgmii_0_rxd_2, rgmii_0_rxd_3, rgmii_0_tx_ctl, rgmii_0_txc,
+ rgmii_0_txd_0, rgmii_0_txd_1, rgmii_0_txd_2,
+ rgmii_0_txd_3, rgmii_1_rx_ctl, rgmii_1_rxc, rgmii_1_rxd_0,
+ rgmii_1_rxd_1, rgmii_1_rxd_2, rgmii_1_rxd_3,
+ rgmii_1_tx_ctl, rgmii_1_txc, rgmii_1_txd_0, rgmii_1_txd_1,
+ rgmii_1_txd_2, rgmii_1_txd_3, rgmii_gpio_0, rgmii_gpio_1,
+ rgmii_gpio_2, rgmii_gpio_3, rtxdata2g_txdata3g1,
+ rtxen2g_txdata3g2, rxdata3g0, rxdata3g1, rxdata3g2,
+ sdio1_clk, sdio1_cmd, sdio1_data_0, sdio1_data_1,
+ sdio1_data_2, sdio1_data_3, sdio4_clk, sdio4_cmd,
+ sdio4_data_0, sdio4_data_1, sdio4_data_2, sdio4_data_3,
+ sim_clk, sim_data, sim_det, sim_resetn, sim2_clk,
+ sim2_data, sim2_det, sim2_resetn, sri_c, sri_d, sri_e,
+ ssp_extclk, ssp0_clk, ssp0_fs, ssp0_rxd, ssp0_txd,
+ ssp2_clk, ssp2_fs_0, ssp2_fs_1, ssp2_fs_2, ssp2_fs_3,
+ ssp2_rxd_0, ssp2_rxd_1, ssp2_txd_0, ssp2_txd_1, ssp3_clk,
+ ssp3_fs, ssp3_rxd, ssp3_txd, ssp4_clk, ssp4_fs, ssp4_rxd,
+ ssp4_txd, ssp5_clk, ssp5_fs, ssp5_rxd, ssp5_txd, ssp6_clk,
+ ssp6_fs, ssp6_rxd, ssp6_txd, stat_1, stat_2, sysclken,
+ traceclk, tracedt00, tracedt01, tracedt02, tracedt03,
+ tracedt04, tracedt05, tracedt06, tracedt07, tracedt08
+ tracedt09, tracedt10, tracedt11, tracedt12, tracedt13
+ tracedt14, tracedt15, txdata3g0, txpwrind, uartb1_ucts,
+ uartb1_urts, uartb1_urxd, uartb1_utxd, uartb2_urxd,
+ uartb2_utxd, uartb3_ucts, uartb3_urts, uartb3_urxd,
+ uartb3_utxd, uartb4_ucts, uartb4_urts, uartb4_urxd,
+ uartb4_utxd, vc_cam1_scl, vc_cam1_sda, vc_cam2_scl,
+ vc_cam2_sda, vc_cam3_scl, vc_cam3_sda ]
+
+ function:
+ description:
+ Specifies the pin mux selection.
+ enum: [ alt1, alt2, alt3, alt4 ]
+
+ slew-rate:
+ description: |
+ Meaning depends on configured pin mux:
+ *_scl or *_sda:
+ 0: Standard (100 kbps) & Fast (400 kbps) mode
+ 1: Highspeed (3.4 Mbps) mode
+ ic_dm or ic_dp:
+ 0: normal slew rate
+ 1: fast slew rate
+ Otherwise:
+ 0: fast slew rate
+ 1: normal slew rate
+
+ bias-disable: true
+ input-disable: true
+ input-enable: true
+
+ required:
+ - pins
+
+ allOf:
+ - $ref: pincfg-node.yaml#
+
+ # Optional properties for standard pins
+ - if:
+ properties:
+ pins:
+ contains:
+ enum: [ adcsync, bat_rm, classgpwr, clk_cx8, clkout_0,
+ clkout_1, clkout_2, clkout_3, clkreq_in_0,
+ clkreq_in_1, cws_sys_req1, cws_sys_req2,
+ cws_sys_req3, digmic1_clk, digmic1_dq, digmic2_clk,
+ digmic2_dq, gpen13, gpen14, gpen15, gpio00, gpio01,
+ gpio02, gpio03, gpio04, gpio05, gpio06, gpio07,
+ gpio08, gpio09, gpio10, gpio11, gpio12, gpio13,
+ gpio14, gps_pablank, gps_tmark, ic_dm, ic_dp,
+ kp_col_ip_0, kp_col_ip_1, kp_col_ip_2, kp_col_ip_3,
+ kp_row_op_0, kp_row_op_1, kp_row_op_2, kp_row_op_3,
+ lcd_b_0, lcd_b_1, lcd_b_2, lcd_b_3, lcd_b_4, lcd_b_5,
+ lcd_b_6, lcd_b_7, lcd_g_0, lcd_g_1, lcd_g_2, lcd_g_3,
+ lcd_g_4, lcd_g_5, lcd_g_6, lcd_g_7, lcd_hsync,
+ lcd_oe, lcd_pclk, lcd_r_0, lcd_r_1, lcd_r_2,
+ lcd_r_3, lcd_r_4, lcd_r_5, lcd_r_6, lcd_r_7,
+ lcd_vsync, mdmgpio0, mdmgpio1, mdmgpio2, mdmgpio3,
+ mdmgpio4, mdmgpio5, mdmgpio6, mdmgpio7, mdmgpio8,
+ mphi_data_0, mphi_data_1, mphi_data_2, mphi_data_3,
+ mphi_data_4, mphi_data_5, mphi_data_6, mphi_data_7,
+ mphi_data_8, mphi_data_9, mphi_data_10,
+ mphi_data_11, mphi_data_12, mphi_data_13,
+ mphi_data_14, mphi_data_15, mphi_ha0, mphi_hat0,
+ mphi_hat1, mphi_hce0_n, mphi_hce1_n, mphi_hrd_n,
+ mphi_hwr_n, mphi_run0, mphi_run1, mtx_scan_clk,
+ mtx_scan_data, nand_ad_0, nand_ad_1, nand_ad_2,
+ nand_ad_3, nand_ad_4, nand_ad_5, nand_ad_6,
+ nand_ad_7, nand_ale, nand_cen_0, nand_cen_1,
+ nand_cle, nand_oen, nand_rdy_0, nand_rdy_1,
+ nand_wen, nand_wp, pc1, pc2, pmu_int,
+ rfst2g_mtsloten3g, rgmii_0_rx_ctl, rgmii_0_rxc,
+ rgmii_0_rxd_0, rgmii_0_rxd_1, rgmii_0_rxd_2,
+ rgmii_0_rxd_3, rgmii_0_tx_ctl, rgmii_0_txc,
+ rgmii_0_txd_0, rgmii_0_txd_1, rgmii_0_txd_2,
+ rgmii_0_txd_3, rgmii_1_rx_ctl, rgmii_1_rxc,
+ rgmii_1_rxd_0, rgmii_1_rxd_1, rgmii_1_rxd_2,
+ rgmii_1_rxd_3, rgmii_1_tx_ctl, rgmii_1_txc,
+ rgmii_1_txd_0, rgmii_1_txd_1, rgmii_1_txd_2,
+ rgmii_1_txd_3, rgmii_gpio_0, rgmii_gpio_1,
+ rgmii_gpio_2, rgmii_gpio_3, rtxdata2g_txdata3g1,
+ rtxen2g_txdata3g2, rxdata3g0, rxdata3g1, rxdata3g2,
+ sdio1_clk, sdio1_cmd, sdio1_data_0, sdio1_data_1,
+ sdio1_data_2, sdio1_data_3, sdio4_clk, sdio4_cmd,
+ sdio4_data_0, sdio4_data_1, sdio4_data_2,
+ sdio4_data_3, sim_clk, sim_data, sim_det,
+ sim_resetn, sim2_clk, sim2_data, sim2_det,
+ sim2_resetn, sri_c, sri_d, sri_e, ssp_extclk,
+ ssp0_clk, ssp0_fs, ssp0_rxd, ssp0_txd, ssp2_clk,
+ ssp2_fs_0, ssp2_fs_1, ssp2_fs_2, ssp2_fs_3,
+ ssp2_rxd_0, ssp2_rxd_1, ssp2_txd_0, ssp2_txd_1,
+ ssp3_clk, ssp3_fs, ssp3_rxd, ssp3_txd, ssp4_clk,
+ ssp4_fs, ssp4_rxd, ssp4_txd, ssp5_clk, ssp5_fs,
+ ssp5_rxd, ssp5_txd, ssp6_clk, ssp6_fs, ssp6_rxd,
+ ssp6_txd, stat_1, stat_2, sysclken, traceclk,
+ tracedt00, tracedt01, tracedt02, tracedt03,
+ tracedt04, tracedt05, tracedt06, tracedt07,
+ tracedt08, tracedt09, tracedt10, tracedt11,
+ tracedt12, tracedt13, tracedt14, tracedt15,
+ txdata3g0, txpwrind, uartb1_ucts, uartb1_urts,
+ uartb1_urxd, uartb1_utxd, uartb2_urxd, uartb2_utxd,
+ uartb3_ucts, uartb3_urts, uartb3_urxd, uartb3_utxd,
+ uartb4_ucts, uartb4_urts, uartb4_urxd, uartb4_utxd ]
+ then:
+ properties:
+ drive-strength:
+ enum: [ 2, 4, 6, 8, 10, 12, 14, 16 ]
+
+ bias-disable: true
+ bias-pull-up: true
+ bias-pull-down: true
+ input-schmitt-enable: true
+ input-schmitt-disable: true
+
+ # Optional properties for I2C pins
+ - if:
+ properties:
+ pins:
+ contains:
+ enum: [ bsc1_scl, bsc1_sda, bsc2_scl, bsc2_sda, pmu_scl,
+ pmu_sda, vc_cam1_scl, vc_cam1_sda, vc_cam2_scl,
+ vc_cam2_sda, vc_cam3_scl, vc_cam3_sda ]
+ then:
+ properties:
+ bias-pull-up:
+ description:
+ There are 3 pull-up resistors (1.2k, 1.8k, 2.7k) available
+ in parallel for I2C pins.
+ enum: [ 568, 720, 831, 1080, 1200, 1800, 2700 ]
+
+ bias-disable: true
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ pinctrl@35004800 {
+ compatible = "brcm,bcm11351-pinctrl";
+ reg = <0x35004800 0x430>;
+
+ dev-a-active-pins {
+ /* group node defining 1 standard pin */
+ std-grp0 {
+ pins = "gpio00";
+ function = "alt1";
+ input-schmitt-enable;
+ bias-disable;
+ slew-rate = <1>;
+ drive-strength = <4>;
+ };
+
+ /* group node defining 2 I2C pins */
+ i2c-grp0 {
+ pins = "bsc1_scl", "bsc1_sda";
+ function = "alt2";
+ bias-pull-up = <720>;
+ input-enable;
+ };
+
+ /* group node defining 2 HDMI pins */
+ hdmi-grp0 {
+ pins = "hdmi_scl", "hdmi_sda";
+ function = "alt3";
+ slew-rate = <1>;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml
index 4478a76171f7..62890a0aead1 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml
@@ -24,6 +24,7 @@ patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#
+ additionalProperties: false
properties:
function:
@@ -37,6 +38,10 @@ patternProperties:
enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7,
gpio8, gpio9, gpio10, gpio11, gpio12, gpio13, gpio40 ]
+ patternProperties:
+ '-pins$':
+ $ref: '#/patternProperties/-pins$'
+
allOf:
- $ref: pinctrl.yaml#
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml
index 73e1caa7c011..7cc0e1650835 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml
@@ -24,6 +24,7 @@ patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#
+ unevaluatedProperties: false
properties:
function:
@@ -36,11 +37,15 @@ patternProperties:
pins:
enum: [ gpio0, gpio1, gpio16, gpio17, gpio8, gpio9, gpio18, gpio19,
- gpio22, gpio23, gpio30, gpio31, nand_grp, gpio35
+ gpio22, gpio23, gpio30, gpio31, nand_grp, gpio35,
dectpd_grp, vdsl_phy_override_0_grp,
vdsl_phy_override_1_grp, vdsl_phy_override_2_grp,
vdsl_phy_override_3_grp, dsl_gpio8, dsl_gpio9 ]
+ patternProperties:
+ '-pins$':
+ $ref: '#/patternProperties/-pins$'
+
allOf:
- $ref: pinctrl.yaml#
@@ -122,46 +127,46 @@ examples:
pinctrl_nand: nand-pins {
function = "nand";
- group = "nand_grp";
+ pins = "nand_grp";
};
pinctrl_gpio35_alt: gpio35_alt-pins {
function = "gpio35_alt";
- pin = "gpio35";
+ pins = "gpio35";
};
pinctrl_dectpd: dectpd-pins {
function = "dectpd";
- group = "dectpd_grp";
+ pins = "dectpd_grp";
};
pinctrl_vdsl_phy_override_0: vdsl_phy_override_0-pins {
function = "vdsl_phy_override_0";
- group = "vdsl_phy_override_0_grp";
+ pins = "vdsl_phy_override_0_grp";
};
pinctrl_vdsl_phy_override_1: vdsl_phy_override_1-pins {
function = "vdsl_phy_override_1";
- group = "vdsl_phy_override_1_grp";
+ pins = "vdsl_phy_override_1_grp";
};
pinctrl_vdsl_phy_override_2: vdsl_phy_override_2-pins {
function = "vdsl_phy_override_2";
- group = "vdsl_phy_override_2_grp";
+ pins = "vdsl_phy_override_2_grp";
};
pinctrl_vdsl_phy_override_3: vdsl_phy_override_3-pins {
function = "vdsl_phy_override_3";
- group = "vdsl_phy_override_3_grp";
+ pins = "vdsl_phy_override_3_grp";
};
pinctrl_dsl_gpio8: dsl_gpio8-pins {
function = "dsl_gpio8";
- group = "dsl_gpio8";
+ pins = "dsl_gpio8";
};
pinctrl_dsl_gpio9: dsl_gpio9-pins {
function = "dsl_gpio9";
- group = "dsl_gpio9";
+ pins = "dsl_gpio9";
};
};
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml
index 2750ba42aeb8..f57bb34c3130 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml
@@ -24,6 +24,7 @@ patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#
+ unevaluatedProperties: false
properties:
function:
@@ -36,6 +37,10 @@ patternProperties:
gpio20, gpio25, gpio26, gpio27, gpio28, hsspi_cs1,
usb_port1 ]
+ patternProperties:
+ '-pins$':
+ $ref: '#/patternProperties/-pins$'
+
allOf:
- $ref: pinctrl.yaml#
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml
index 2f6c540498bc..ce6fc5380c52 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml
@@ -24,15 +24,16 @@ patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#
+ unevaluatedProperties: false
properties:
function:
enum: [ ebi_cs, uart1, serial_led, legacy_led, led, spi_cs, utopia,
pwm_syn_clk, sys_irq ]
- pins:
+ groups:
enum: [ ebi_cs_grp, uart1_grp, serial_led_grp, legacy_led_grp,
- led_grp, spi_cs_grp, utopia_grp, pwm_syn_clk, sys_irq_grp ]
+ led_grp, spi_cs_grp, utopia_grp, pwm_syn_clk_grp, sys_irq_grp ]
allOf:
- $ref: pinctrl.yaml#
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml
index b3044f805753..5f7ed7d3dd49 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml
@@ -24,6 +24,7 @@ patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#
+ unevaluatedProperties: false
properties:
function:
@@ -41,6 +42,10 @@ patternProperties:
gpio15, gpio16, gpio17, gpio18, gpio19, gpio20, gpio21,
gpio22, gpio23, gpio24, gpio25, gpio26, gpio27, nand_grp ]
+ patternProperties:
+ '-pins$':
+ $ref: '#/patternProperties/-pins$'
+
allOf:
- $ref: pinctrl.yaml#
@@ -204,6 +209,6 @@ examples:
pinctrl_nand: nand-pins {
function = "nand";
- group = "nand_grp";
+ pins = "nand_grp";
};
};
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml
index 3236871827df..d549e945505b 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml
@@ -24,6 +24,7 @@ patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#
+ unevaluatedProperties: false
properties:
function:
@@ -42,6 +43,10 @@ patternProperties:
gpio24, gpio25, gpio26, gpio27, gpio28, gpio29, gpio30,
gpio31, uart1_grp ]
+ patternProperties:
+ '-pins$':
+ $ref: '#/patternProperties/-pins$'
+
allOf:
- $ref: pinctrl.yaml#
@@ -215,6 +220,6 @@ examples:
pinctrl_uart1: uart1-pins {
function = "uart1";
- group = "uart1_grp";
+ pins = "uart1_grp";
};
};
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/canaan,k210-fpioa.yaml b/sys/contrib/device-tree/Bindings/pinctrl/canaan,k210-fpioa.yaml
index 739a08f00467..beb769e887c7 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/canaan,k210-fpioa.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/canaan,k210-fpioa.yaml
@@ -11,7 +11,7 @@ maintainers:
description:
The Canaan Kendryte K210 SoC Fully Programmable IO Array (FPIOA)
- controller allows assiging any of 256 possible functions to any of
+ controller allows assigning any of 256 possible functions to any of
48 IO pins of the SoC. Pin function configuration is performed on
a per-pin basis.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/cypress,cy8c95x0.yaml b/sys/contrib/device-tree/Bindings/pinctrl/cypress,cy8c95x0.yaml
index 222d57541b65..7f30ec2f1e54 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/cypress,cy8c95x0.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/cypress,cy8c95x0.yaml
@@ -51,6 +51,10 @@ properties:
description:
Optional power supply.
+ reset-gpios:
+ description: GPIO connected to the XRES pin
+ maxItems: 1
+
patternProperties:
'-pins$':
type: object
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/ingenic,pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/ingenic,pinctrl.yaml
index 35723966b70a..890961826c6f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/ingenic,pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/ingenic,pinctrl.yaml
@@ -135,7 +135,6 @@ additionalProperties:
- $ref: pinmux-node.yaml#
properties:
- phandle: true
function: true
groups: true
pins: true
@@ -147,8 +146,6 @@ additionalProperties:
additionalProperties: false
- type: object
- properties:
- phandle: true
additionalProperties:
type: object
allOf:
@@ -156,7 +153,6 @@ additionalProperties:
- $ref: pinmux-node.yaml#
properties:
- phandle: true
function: true
groups: true
pins: true
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6779-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
index 7f0e2d6cd6d9..3bbc00df5548 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
@@ -159,7 +159,7 @@ patternProperties:
mediatek,pull-up-adv:
description: |
- Pull up setings for 2 pull resistors, R0 and R1. User can
+ Pull up settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as
below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6795-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6795-pinctrl.yaml
index 601d86aecdd4..68e91c05f122 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6795-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt6795-pinctrl.yaml
@@ -130,7 +130,7 @@ patternProperties:
mediatek,pull-up-adv:
description: |
- Pull up setings for 2 pull resistors, R0 and R1. User can
+ Pull up settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as
below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7981-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7981-pinctrl.yaml
index 10717cee9058..74d52a741f6f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7981-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7981-pinctrl.yaml
@@ -386,7 +386,7 @@ patternProperties:
mediatek,pull-up-adv:
description: |
Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
- Pull up setings for 2 pull resistors, R0 and R1. Valid arguments
+ Pull up settings for 2 pull resistors, R0 and R1. Valid arguments
are described as below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
@@ -398,7 +398,7 @@ patternProperties:
mediatek,pull-down-adv:
description: |
Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
- Pull down setings for 2 pull resistors, R0 and R1. Valid arguments
+ Pull down settings for 2 pull resistors, R0 and R1. Valid arguments
are described as below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7986-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
index 0f615ada290a..5ad65135fe1c 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
@@ -332,7 +332,7 @@ patternProperties:
mediatek,pull-up-adv:
description: |
Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
- Pull up setings for 2 pull resistors, R0 and R1. Valid arguments
+ Pull up settings for 2 pull resistors, R0 and R1. Valid arguments
are described as below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
@@ -344,7 +344,7 @@ patternProperties:
mediatek,pull-down-adv:
description: |
Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
- Pull down setings for 2 pull resistors, R0 and R1. Valid arguments
+ Pull down settings for 2 pull resistors, R0 and R1. Valid arguments
are described as below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8183-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
index ff24cf29eea7..8507bd15f243 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
@@ -143,7 +143,7 @@ patternProperties:
mediatek,pull-up-adv:
description: |
- Pull up setings for 2 pull resistors, R0 and R1. User can
+ Pull up settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as
below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8365-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
index 61b33b5416f5..7b43e7857281 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt8365-pinctrl.yaml
@@ -149,7 +149,7 @@ patternProperties:
deprecated: true
description: |
DEPRECATED: Please use bias-pull-up instead.
- Pull up setings for 2 pull resistors, R0 and R1. User can
+ Pull up settings for 2 pull resistors, R0 and R1. User can
configure those special pins. Valid arguments are described as
below:
0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
new file mode 100644
index 000000000000..3e8472898800
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
@@ -0,0 +1,217 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/nuvoton,npcm845-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NPCM845 Pin Controller and GPIO
+
+maintainers:
+ - Tomer Maimon <tmaimon77@gmail.com>
+
+description:
+ The Nuvoton BMC NPCM8XX Pin Controller multi-function routed through
+ the multiplexing block, Each pin supports GPIO functionality (GPIOx)
+ and multiple functions that directly connect the pin to different
+ hardware blocks.
+
+properties:
+ compatible:
+ const: nuvoton,npcm845-pinctrl
+
+ ranges:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ nuvoton,sysgcr:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: a phandle to access GCR registers.
+
+patternProperties:
+ '^gpio@':
+ type: object
+ additionalProperties: false
+
+ description:
+ Eight GPIO banks that each contain 32 GPIOs.
+
+ properties:
+ gpio-controller: true
+
+ '#gpio-cells':
+ const: 2
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ gpio-ranges:
+ maxItems: 1
+
+ required:
+ - gpio-controller
+ - '#gpio-cells'
+ - reg
+ - interrupts
+ - gpio-ranges
+
+ '-mux$':
+ $ref: pinmux-node.yaml#
+
+ properties:
+ groups:
+ description:
+ One or more groups of pins to mux to a certain function
+ items:
+ enum: [ iox1, iox2, smb1d, smb2d, lkgpo1, lkgpo2, ioxh, gspi,
+ smb5b, smb5c, lkgpo0, pspi, jm1, jm2, smb4den, smb4b,
+ smb4c, smb15, smb16, smb17, smb18, smb19, smb20, smb21,
+ smb22, smb23, smb23b, smb4d, smb14, smb5, smb4, smb3,
+ spi0cs1, spi0cs2, spi0cs3, spi1cs0, spi1cs1, spi1cs2,
+ spi1cs3, spi1cs23, smb3c, smb3b, bmcuart0a, uart1, jtag2,
+ bmcuart1, uart2, sg1mdio, bmcuart0b, r1err, r1md, r1oen,
+ r2oen, rmii3, r3oen, smb3d, fanin0, fanin1, fanin2, fanin3,
+ fanin4, fanin5, fanin6, fanin7, fanin8, fanin9, fanin10,
+ fanin11, fanin12, fanin13, fanin14, fanin15, pwm0, pwm1, pwm2,
+ pwm3, r2, r2err, r2md, r3rxer, ga20kbc, smb5d, lpc, espi, rg2,
+ ddr, i3c0, i3c1, i3c2, i3c3, i3c4, i3c5, smb0, smb1, smb2,
+ smb2c, smb2b, smb1c, smb1b, smb8, smb9, smb10, smb11, sd1,
+ sd1pwr, pwm4, pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11,
+ mmc8, mmc, mmcwp, mmccd, mmcrst, clkout, serirq, lpcclk,
+ scipme, smi, smb6, smb7, spi1, faninx, r1, spi3, spi3cs1,
+ spi3quad, spi3cs2, spi3cs3, nprd_smi, smb0b, smb0c, smb0den,
+ smb0d, ddc, rg2mdio, wdog1, wdog2, smb12, smb13, spix,
+ spixcs1, clkreq, hgpio0, hgpio1, hgpio2, hgpio3, hgpio4,
+ hgpio5, hgpio6, hgpio7 ]
+
+ function:
+ description:
+ The function that a group of pins is muxed to
+ enum: [ iox1, iox2, smb1d, smb2d, lkgpo1, lkgpo2, ioxh, gspi,
+ smb5b, smb5c, lkgpo0, pspi, jm1, jm2, smb4den, smb4b,
+ smb4c, smb15, smb16, smb17, smb18, smb19, smb20, smb21,
+ smb22, smb23, smb23b, smb4d, smb14, smb5, smb4, smb3,
+ spi0cs1, spi0cs2, spi0cs3, spi1cs0, spi1cs1, spi1cs2,
+ spi1cs3, spi1cs23, smb3c, smb3b, bmcuart0a, uart1, jtag2,
+ bmcuart1, uart2, sg1mdio, bmcuart0b, r1err, r1md, r1oen,
+ r2oen, rmii3, r3oen, smb3d, fanin0, fanin1, fanin2, fanin3,
+ fanin4, fanin5, fanin6, fanin7, fanin8, fanin9, fanin10,
+ fanin11, fanin12, fanin13, fanin14, fanin15, pwm0, pwm1, pwm2,
+ pwm3, r2, r2err, r2md, r3rxer, ga20kbc, smb5d, lpc, espi, rg2,
+ ddr, i3c0, i3c1, i3c2, i3c3, i3c4, i3c5, smb0, smb1, smb2,
+ smb2c, smb2b, smb1c, smb1b, smb8, smb9, smb10, smb11, sd1,
+ sd1pwr, pwm4, pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11,
+ mmc8, mmc, mmcwp, mmccd, mmcrst, clkout, serirq, lpcclk,
+ scipme, smi, smb6, smb7, spi1, faninx, r1, spi3, spi3cs1,
+ spi3quad, spi3cs2, spi3cs3, nprd_smi, smb0b, smb0c, smb0den,
+ smb0d, ddc, rg2mdio, wdog1, wdog2, smb12, smb13, spix,
+ spixcs1, clkreq, hgpio0, hgpio1, hgpio2, hgpio3, hgpio4,
+ hgpio5, hgpio6, hgpio7 ]
+
+ dependencies:
+ groups: [ function ]
+ function: [ groups ]
+
+ additionalProperties: false
+
+ '^pin':
+ $ref: pincfg-node.yaml#
+
+ properties:
+ pins:
+ description:
+ A list of pins to configure in certain ways, such as enabling
+ debouncing
+ items:
+ pattern: '^GPIO([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-6])'
+
+ bias-disable: true
+
+ bias-pull-up: true
+
+ bias-pull-down: true
+
+ input-enable: true
+
+ output-low: true
+
+ output-high: true
+
+ drive-push-pull: true
+
+ drive-open-drain: true
+
+ input-debounce:
+ description:
+ Debouncing periods in microseconds, one period per interrupt
+ bank found in the controller
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 4
+
+ slew-rate:
+ description: |
+ 0: Low rate
+ 1: High rate
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ drive-strength:
+ enum: [ 0, 1, 2, 4, 8, 12 ]
+
+ additionalProperties: false
+
+allOf:
+ - $ref: pinctrl.yaml#
+
+required:
+ - compatible
+ - ranges
+ - '#address-cells'
+ - '#size-cells'
+ - nuvoton,sysgcr
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ pinctrl: pinctrl@f0010000 {
+ compatible = "nuvoton,npcm845-pinctrl";
+ ranges = <0x0 0x0 0xf0010000 0x8000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nuvoton,sysgcr = <&gcr>;
+
+ gpio0: gpio@0 {
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x0 0xb0>;
+ interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 0 32>;
+ };
+
+ fanin0_pin: fanin0-mux {
+ groups = "fanin0";
+ function = "fanin0";
+ };
+
+ pin34_slew: pin34-slew {
+ pins = "GPIO34/I3C4_SDA";
+ bias-disable;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra114-pinmux.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra114-pinmux.yaml
index 065dedb3573a..1690c0ef553a 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra114-pinmux.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra114-pinmux.yaml
@@ -22,8 +22,6 @@ properties:
patternProperties:
"^pinmux(-[a-z0-9-_]+)?$":
type: object
- properties:
- phandle: true
# pin groups
additionalProperties:
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra124-pinmux.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra124-pinmux.yaml
index f924652bef0d..9b7368bd3862 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra124-pinmux.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra124-pinmux.yaml
@@ -32,8 +32,6 @@ properties:
patternProperties:
"^pinmux(-[a-z0-9-_]+)?$":
type: object
- properties:
- phandle: true
# pin groups
additionalProperties:
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra194-pinmux.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra194-pinmux.yaml
index 60a4bdf01bf2..87b6f4f42f25 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra194-pinmux.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra194-pinmux.yaml
@@ -23,8 +23,6 @@ properties:
patternProperties:
"^pinmux(-[a-z0-9-_]+)?$":
type: object
- properties:
- phandle: true
# pin groups
additionalProperties:
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra20-pinmux.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra20-pinmux.yaml
index 432ea40209a8..63cd743a30e0 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra20-pinmux.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra20-pinmux.yaml
@@ -24,8 +24,6 @@ properties:
patternProperties:
"^pinmux(-[a-z0-9-_]+)?$":
type: object
- properties:
- phandle: true
# pin groups
additionalProperties:
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra210-pinmux.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra210-pinmux.yaml
index 28ae2e6d0cbc..e99387a6da5e 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra210-pinmux.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra210-pinmux.yaml
@@ -22,8 +22,6 @@ properties:
patternProperties:
"^pinmux(-[a-z0-9-_]+)?$":
type: object
- properties:
- phandle: true
# pin groups
additionalProperties:
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra30-pinmux.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra30-pinmux.yaml
index c0eda7848767..36c8f3301a8f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra30-pinmux.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nvidia,tegra30-pinmux.yaml
@@ -22,8 +22,6 @@ properties:
patternProperties:
"^pinmux(-[a-z0-9-_]+)?$":
type: object
- properties:
- phandle: true
# pin groups
additionalProperties:
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml
index d49aafd8c5f4..a24286e4def6 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml
@@ -9,7 +9,7 @@ title: NXP S32G2 pin controller
maintainers:
- Ghennadi Procopciuc <Ghennadi.Procopciuc@oss.nxp.com>
- - Chester Lin <clin@suse.com>
+ - Chester Lin <chester62515@gmail.com>
description: |
S32G2 pinmux is implemented in SIUL2 (System Integration Unit Lite2),
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-max77620.txt b/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-max77620.txt
index 511fc234558b..28fbca180068 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-max77620.txt
+++ b/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-max77620.txt
@@ -38,7 +38,7 @@ Valid values for function properties are:
gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
reference-out
-Theres is also customised properties for the GPIO1, GPIO2 and GPIO3. These
+There are also customised properties for the GPIO1, GPIO2 and GPIO3. These
customised properties are required to configure FPS configuration parameters
of these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
detail of Flexible Power Sequence (FPS).
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-rk805.txt b/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-rk805.txt
index 939cb5b6ffea..6ad49e51c72e 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-rk805.txt
+++ b/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-rk805.txt
@@ -40,7 +40,7 @@ on default.
Valid values for function properties are: gpio.
-Theres is also not customised properties for any GPIO.
+There are also not customised properties for any GPIO.
Example:
--------
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-single.yaml b/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-single.yaml
new file mode 100644
index 000000000000..c11495524dd2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/pinctrl-single.yaml
@@ -0,0 +1,208 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/pinctrl-single.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic Pin Controller with a Single Register for One or More Pins
+
+maintainers:
+ - Tony Lindgren <tony@atomide.com>
+
+description:
+ Some pin controller devices use a single register for one or more pins. The
+ range of pin control registers can vary from one to many for each controller
+ instance. Some SoCs from Altera, Broadcom, HiSilicon, Ralink, and TI have this
+ kind of pin controller instances.
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - pinctrl-single
+ - pinconf-single
+ - items:
+ - enum:
+ - ti,am437-padconf
+ - ti,am654-padconf
+ - ti,dra7-padconf
+ - ti,omap2420-padconf
+ - ti,omap2430-padconf
+ - ti,omap3-padconf
+ - ti,omap4-padconf
+ - ti,omap5-padconf
+ - ti,j7200-padconf
+ - const: pinctrl-single
+
+ reg:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ '#pinctrl-cells':
+ description:
+ Number of cells. Usually 2, consisting of register offset, pin configuration
+ value, and pinmux mode. Some controllers may use 1 for just offset and value.
+ enum: [ 1, 2 ]
+
+ pinctrl-single,bit-per-mux:
+ description: Optional flag to indicate register controls more than one pin
+ type: boolean
+
+ pinctrl-single,function-mask:
+ description: Mask of the allowed register bits
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ pinctrl-single,function-off:
+ description: Optional function off mode for disabled state
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ pinctrl-single,register-width:
+ description: Width of pin specific bits in the register
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 8, 16, 32 ]
+
+ pinctrl-single,gpio-range:
+ description: Optional list of pin base, nr pins & gpio function
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle of a gpio-range node
+ - description: pin base
+ - description: number of pins
+ - description: gpio function
+
+ '#gpio-range-cells':
+ description: No longer needed, may exist in older files for gpio-ranges
+ deprecated: true
+ const: 3
+
+ gpio-range:
+ description: Optional node for gpio range cells
+ type: object
+ additionalProperties: false
+ properties:
+ '#pinctrl-single,gpio-range-cells':
+ description: Number of gpio range cells
+ const: 3
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+patternProperties:
+ '-pins(-[0-9]+)?$|-pin$':
+ description:
+ Pin group node name using naming ending in -pins followed by an optional
+ instance number
+ type: object
+ additionalProperties: false
+
+ properties:
+ pinctrl-single,pins:
+ description:
+ Array of pins as described in pinmux-node.yaml for pinctrl-pin-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ pinctrl-single,bits:
+ description: Register bit configuration for pinctrl-single,bit-per-mux
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: register offset
+ - description: value
+ - description: pin bitmask in the register
+
+ pinctrl-single,bias-pullup:
+ description: Optional bias pull up configuration
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: input
+ - description: enabled pull up bits
+ - description: disabled pull up bits
+ - description: bias pull up mask
+
+ pinctrl-single,bias-pulldown:
+ description: Optional bias pull down configuration
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: input
+ - description: enabled pull down bits
+ - description: disabled pull down bits
+ - description: bias pull down mask
+
+ pinctrl-single,drive-strength:
+ description: Optional drive strength configuration
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: drive strength current
+ - description: drive strength mask
+
+ pinctrl-single,input-schmitt:
+ description: Optional input schmitt configuration
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: input
+ - description: enable bits
+ - description: disable bits
+ - description: input schmitt mask
+
+ pinctrl-single,low-power-mode:
+ description: Optional low power mode configuration
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: low power mode value
+ - description: low power mode mask
+
+ pinctrl-single,slew-rate:
+ description: Optional slew rate configuration
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ items:
+ - description: slew rate
+ - description: slew rate mask
+
+allOf:
+ - $ref: pinctrl.yaml#
+
+required:
+ - compatible
+ - reg
+ - pinctrl-single,register-width
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pinmux@4a100040 {
+ compatible = "pinctrl-single";
+ reg = <0x4a100040 0x0196>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #pinctrl-cells = <2>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ pinctrl-single,register-width = <16>;
+ pinctrl-single,function-mask = <0xffff>;
+ pinctrl-single,gpio-range = <&range 0 3 0>;
+ range: gpio-range {
+ #pinctrl-single,gpio-range-cells = <3>;
+ };
+
+ uart2-pins {
+ pinctrl-single,pins =
+ <0xd8 0x118>,
+ <0xda 0>,
+ <0xdc 0x118>,
+ <0xde 0>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5018-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5018-tlmm.yaml
index fad0118fd521..23300606547c 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5018-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5018-tlmm.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 24
@@ -95,7 +88,10 @@ required:
- compatible
- reg
-additionalProperties: false
+allOf:
+ - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5332-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5332-tlmm.yaml
index 3d3086ae1ba6..e571cd64418f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5332-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq5332-tlmm.yaml
@@ -26,13 +26,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 27
@@ -100,7 +93,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
index 7c3e5e043f07..ed00fbaec11b 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
@@ -22,12 +22,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
-
patternProperties:
"-state$":
oneOf:
@@ -100,7 +94,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq8074-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq8074-pinctrl.yaml
index e053fbd588b5..6f90dbbdbdcc 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq8074-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq8074-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 35
@@ -103,7 +96,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq9574-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq9574-tlmm.yaml
index e5e9962b2174..bca903b5da6d 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq9574-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,ipq9574-tlmm.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 33
@@ -97,7 +90,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,lpass-lpi-common.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,lpass-lpi-common.yaml
new file mode 100644
index 000000000000..3b5045730471
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,lpass-lpi-common.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,lpass-lpi-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SoC LPASS LPI TLMM Common Properties
+
+maintainers:
+ - Bjorn Andersson <andersson@kernel.org>
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+ - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+description:
+ Common properties for the Top Level Mode Multiplexer pin controllers in the
+ Low Power Audio SubSystem (LPASS) Low Power Island (LPI) of Qualcomm SoCs.
+
+properties:
+ gpio-controller: true
+
+ "#gpio-cells":
+ description:
+ Specifying the pin number and flags, as defined in
+ include/dt-bindings/gpio/gpio.h
+ const: 2
+
+ gpio-ranges:
+ maxItems: 1
+
+required:
+ - gpio-controller
+ - "#gpio-cells"
+ - gpio-ranges
+
+allOf:
+ - $ref: pinctrl.yaml#
+
+additionalProperties: true
+
+$defs:
+ qcom-tlmm-state:
+ properties:
+ drive-strength:
+ enum: [2, 4, 6, 8, 10, 12, 14, 16]
+ default: 2
+ description:
+ Selects the drive strength for the specified pins, in mA.
+
+ slew-rate:
+ enum: [0, 1, 2, 3]
+ default: 0
+ description: |
+ 0: No adjustments
+ 1: Higher Slew rate (faster edges)
+ 2: Lower Slew rate (slower edges)
+ 3: Reserved (No adjustments)
+
+ bias-bus-hold: true
+ bias-pull-down: true
+ bias-pull-up: true
+ bias-disable: true
+ input-enable: true
+ output-high: true
+ output-low: true
+
+ required:
+ - pins
+ - function
+
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ additionalProperties: true
+
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9607-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9607-tlmm.yaml
index 2aedb7e7bc8b..bd3cbb44c99a 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9607-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9607-tlmm.yaml
@@ -25,25 +25,14 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
patternProperties:
"-state$":
oneOf:
- $ref: "#/$defs/qcom-mdm9607-tlmm-state"
- - patternProperties:
+ - additionalProperties: false
+ patternProperties:
".*":
$ref: "#/$defs/qcom-mdm9607-tlmm-state"
@@ -109,6 +98,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9615-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
index 5885aee95c98..299e0b4b0ab4 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
@@ -23,18 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- '#interrupt-cells': true
- gpio-controller: true
- '#gpio-cells': true
- gpio-ranges: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
-
patternProperties:
"-state$":
oneOf:
@@ -74,6 +62,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8226-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8226-pinctrl.yaml
index 9efb76509580..68d3fa2105b8 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8226-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8226-pinctrl.yaml
@@ -23,12 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
-
gpio-reserved-ranges:
maxItems: 1
@@ -67,8 +61,8 @@ $defs:
Specify the alternative function to be configured for the specified
pins. Functions are only valid for gpio pins.
enum: [ gpio, cci_i2c0, blsp_uim1, blsp_uim2, blsp_uim3, blsp_uim5,
- blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_spi1,
- blsp_spi2, blsp_spi3, blsp_spi5, blsp_uart1, blsp_uart2,
+ blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_i2c6,
+ blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi5, blsp_uart1, blsp_uart2,
blsp_uart3, blsp_uart4, blsp_uart5, cam_mclk0, cam_mclk1,
gp0_clk, gp1_clk, sdc3, wlan ]
@@ -82,7 +76,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8660-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8660-pinctrl.yaml
index a05971611780..61f5be21f30c 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8660-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8660-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 86
@@ -92,7 +85,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8909-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8909-tlmm.yaml
index 5095e86fe9a2..295dd5fcf4c3 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8909-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8909-tlmm.yaml
@@ -25,19 +25,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
patternProperties:
"-state$":
@@ -108,6 +96,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-pinctrl.yaml
index 063d004967bb..904af87f9eaf 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 61
@@ -114,7 +107,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8953-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8953-pinctrl.yaml
index 798aac9e6e31..8a3a962f6c00 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8953-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8953-pinctrl.yaml
@@ -22,12 +22,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges: true
- "#gpio-cells": true
- gpio-ranges: true
patternProperties:
"-state$":
@@ -117,7 +112,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8960-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8960-pinctrl.yaml
index 9172b50f7a98..46618740bd31 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8960-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8960-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 76
@@ -108,7 +101,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-pinctrl.yaml
index 8a3be65c51ed..840fdaabde12 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 73
@@ -124,7 +117,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8976-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8976-pinctrl.yaml
index ca95de0b87a6..d4391c194ff7 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8976-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8976-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 73
@@ -104,7 +97,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8994-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8994-pinctrl.yaml
index 41525ecfa8e3..fa90981db40b 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8994-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8994-pinctrl.yaml
@@ -25,13 +25,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 73
@@ -114,7 +107,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8996-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8996-pinctrl.yaml
index 59d406b60957..c5010c175b23 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8996-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8996-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 75
@@ -133,7 +126,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8998-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8998-pinctrl.yaml
index bd6d7caf499a..bcaa231adaf7 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8998-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8998-pinctrl.yaml
@@ -23,13 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 75
@@ -118,7 +111,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml
index 8aaf50181cef..3f8ad07c7cfd 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -26,6 +26,7 @@ properties:
- qcom,pm6350-gpio
- qcom,pm7250b-gpio
- qcom,pm7325-gpio
+ - qcom,pm7550ba-gpio
- qcom,pm8005-gpio
- qcom,pm8008-gpio
- qcom,pm8018-gpio
@@ -53,6 +54,8 @@ properties:
- qcom,pm8994-gpio
- qcom,pm8998-gpio
- qcom,pma8084-gpio
+ - qcom,pmc8180-gpio
+ - qcom,pmc8180c-gpio
- qcom,pmi632-gpio
- qcom,pmi8950-gpio
- qcom,pmi8994-gpio
@@ -68,6 +71,7 @@ properties:
- qcom,pms405-gpio
- qcom,pmx55-gpio
- qcom,pmx65-gpio
+ - qcom,pmx75-gpio
- enum:
- qcom,spmi-gpio
@@ -172,6 +176,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pm7550ba-gpio
- qcom,pm8226-gpio
- qcom,pm8350b-gpio
- qcom,pm8550ve-gpio
@@ -301,6 +306,7 @@ allOf:
contains:
enum:
- qcom,pmx65-gpio
+ - qcom,pmx75-gpio
then:
properties:
gpio-line-names:
@@ -413,6 +419,7 @@ $defs:
- gpio1-gpio9 for pm6350
- gpio1-gpio12 for pm7250b
- gpio1-gpio10 for pm7325
+ - gpio1-gpio8 for pm7550ba
- gpio1-gpio4 for pm8005
- gpio1-gpio2 for pm8008
- gpio1-gpio6 for pm8018
@@ -456,6 +463,7 @@ $defs:
- gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10
and gpio11)
- gpio1-gpio16 for pmx65
+ - gpio1-gpio16 for pmx75
items:
pattern: "^gpio([0-9]+)$"
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-mpp.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-mpp.yaml
index 80f960671857..fe717d8d4798 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-mpp.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,pmic-mpp.yaml
@@ -158,34 +158,40 @@ examples:
- |
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
- pm8841_mpp: mpps@a000 {
- compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
- reg = <0xa000 0>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8841_mpp 0 0 4>;
- gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
- "BT_LED_CTRL", "GPIO-F";
- interrupt-controller;
- #interrupt-cells = <2>;
-
- pinctrl-names = "default";
- pinctrl-0 = <&pm8841_default>;
-
- mpp1-state {
- pins = "mpp1";
- function = "digital";
- input-enable;
- power-source = <PM8841_MPP_S3>;
- };
-
- default-state {
- gpio-pins {
- pins = "mpp1", "mpp2", "mpp3", "mpp4";
- function = "digital";
- input-enable;
- power-source = <PM8841_MPP_S3>;
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8841_mpp: mpps@a000 {
+ compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8841_mpp 0 0 4>;
+ gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
+ "BT_LED_CTRL", "GPIO-F";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pm8841_default>;
+
+ mpp1-state {
+ pins = "mpp1";
+ function = "digital";
+ input-enable;
+ power-source = <PM8841_MPP_S3>;
+ };
+
+ default-state {
+ gpio-pins {
+ pins = "mpp1", "mpp2", "mpp3", "mpp4";
+ function = "digital";
+ input-enable;
+ power-source = <PM8841_MPP_S3>;
+ };
+ };
};
- };
};
...
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcm2290-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcm2290-tlmm.yaml
index c323f6d495a4..e123beb33aef 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcm2290-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcm2290-tlmm.yaml
@@ -22,13 +22,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -92,7 +85,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcs404-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcs404-pinctrl.yaml
index b1b9cd319e50..4009501b3414 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcs404-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcs404-pinctrl.yaml
@@ -29,13 +29,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 60
@@ -130,7 +123,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,qdu1000-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,qdu1000-tlmm.yaml
index 237cac4f6ce1..88afeae530c6 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,qdu1000-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,qdu1000-tlmm.yaml
@@ -23,10 +23,8 @@ properties:
reg:
maxItems: 1
- interrupts: true
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
+ interrupts:
+ maxItems: 1
gpio-reserved-ranges:
minItems: 1
@@ -35,10 +33,6 @@ properties:
gpio-line-names:
maxItems: 151
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -101,7 +95,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sa8775p-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sa8775p-tlmm.yaml
index e119a226a4b1..e9abbf2c0689 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sa8775p-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sa8775p-tlmm.yaml
@@ -22,12 +22,8 @@ properties:
reg:
maxItems: 1
- interrupts: true
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
+ interrupts:
+ maxItems: 1
gpio-reserved-ranges:
minItems: 1
@@ -36,12 +32,6 @@ properties:
gpio-line-names:
maxItems: 148
-required:
- - compatible
- - reg
-
-additionalProperties: false
-
patternProperties:
"-state$":
oneOf:
@@ -107,6 +97,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7180-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7180-pinctrl.yaml
index 573e459b1c44..5606f2136ad1 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7180-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7180-pinctrl.yaml
@@ -29,13 +29,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 60
@@ -112,7 +105,7 @@ required:
- reg
- reg-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
index fa51fa9536f7..08801cc4e476 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml
@@ -17,24 +17,9 @@ properties:
compatible:
const: qcom,sc7280-lpass-lpi-pinctrl
- qcom,adsp-bypass-mode:
- description:
- Tells ADSP is in bypass mode.
- type: boolean
-
reg:
maxItems: 2
- gpio-controller: true
-
- "#gpio-cells":
- description: Specifying the pin number and flags, as defined in
- include/dt-bindings/gpio/gpio.h
- const: 2
-
- gpio-ranges:
- maxItems: 1
-
patternProperties:
"-state$":
oneOf:
@@ -50,7 +35,8 @@ $defs:
description:
Pinctrl node's client devices use subnodes for desired pin configuration.
Client device subnodes use below standard properties.
- $ref: /schemas/pinctrl/pincfg-node.yaml
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
properties:
pins:
@@ -73,42 +59,14 @@ $defs:
Specify the alternative function to be configured for the specified
pins.
- drive-strength:
- enum: [2, 4, 6, 8, 10, 12, 14, 16]
- default: 2
- description:
- Selects the drive strength for the specified pins, in mA.
-
- slew-rate:
- enum: [0, 1, 2, 3]
- default: 0
- description: |
- 0: No adjustments
- 1: Higher Slew rate (faster edges)
- 2: Lower Slew rate (slower edges)
- 3: Reserved (No adjustments)
-
- bias-pull-down: true
- bias-pull-up: true
- bias-bus-hold: true
- bias-disable: true
- output-high: true
- output-low: true
-
- required:
- - pins
- - function
-
- additionalProperties: false
-
required:
- compatible
- reg
- - gpio-controller
- - "#gpio-cells"
- - gpio-ranges
-additionalProperties: false
+allOf:
+ - $ref: qcom,lpass-lpi-common.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-pinctrl.yaml
index 368d44ff5468..5329fe2a4397 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc7280-pinctrl.yaml
@@ -23,29 +23,13 @@ properties:
description: Specifies the TLMM summary IRQ
maxItems: 1
- interrupt-controller: true
-
- '#interrupt-cells':
- description:
- Specifies the PIN numbers and Flags, as defined in defined in
- include/dt-bindings/interrupt-controller/irq.h
- const: 2
-
- gpio-controller: true
-
- '#gpio-cells':
- description: Specifying the pin number and flags, as defined in
- include/dt-bindings/gpio/gpio.h
- const: 2
-
- gpio-ranges:
- maxItems: 1
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 88
gpio-line-names:
maxItems: 175
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -120,14 +104,8 @@ allOf:
required:
- compatible
- reg
- - interrupts
- - interrupt-controller
- - '#interrupt-cells'
- - gpio-controller
- - '#gpio-cells'
- - gpio-ranges
-
-additionalProperties: false
+
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-tlmm.yaml
index b086a5184235..c122bb849f0f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-tlmm.yaml
@@ -31,20 +31,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- '#interrupt-cells': true
- gpio-controller: true
gpio-reserved-ranges: true
- '#gpio-cells': true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
- - reg-names
-
-additionalProperties: false
patternProperties:
"-state$":
@@ -106,6 +93,13 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+ - reg-names
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml
index a9167dac9ab5..240e6d45cc95 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml
@@ -32,16 +32,6 @@ properties:
- const: core
- const: audio
- gpio-controller: true
-
- "#gpio-cells":
- description: Specifying the pin number and flags, as defined in
- include/dt-bindings/gpio/gpio.h
- const: 2
-
- gpio-ranges:
- maxItems: 1
-
patternProperties:
"-state$":
oneOf:
@@ -57,7 +47,8 @@ $defs:
description:
Pinctrl node's client devices use subnodes for desired pin configuration.
Client device subnodes use below standard properties.
- $ref: /schemas/pinctrl/pincfg-node.yaml
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
properties:
pins:
@@ -79,48 +70,16 @@ $defs:
Specify the alternative function to be configured for the specified
pins.
- drive-strength:
- enum: [2, 4, 6, 8, 10, 12, 14, 16]
- default: 2
- description:
- Selects the drive strength for the specified pins, in mA.
-
- slew-rate:
- enum: [0, 1, 2, 3]
- default: 0
- description: |
- 0: No adjustments
- 1: Higher Slew rate (faster edges)
- 2: Lower Slew rate (slower edges)
- 3: Reserved (No adjustments)
-
- bias-bus-hold: true
- bias-pull-down: true
- bias-pull-up: true
- bias-disable: true
- input-enable: true
- output-high: true
- output-low: true
-
- required:
- - pins
- - function
-
- additionalProperties: false
-
allOf:
- - $ref: pinctrl.yaml#
+ - $ref: qcom,lpass-lpi-common.yaml#
required:
- compatible
- reg
- clocks
- clock-names
- - gpio-controller
- - "#gpio-cells"
- - gpio-ranges
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-tlmm.yaml
index 4bd6d7977d3e..ed344deaf8b9 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-tlmm.yaml
@@ -25,19 +25,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
patternProperties:
"-state$":
@@ -108,6 +96,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm630-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm630-pinctrl.yaml
index 508e0633b253..a00cb43df144 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm630-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm630-pinctrl.yaml
@@ -34,10 +34,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 57
@@ -45,10 +41,6 @@ properties:
gpio-line-names:
maxItems: 114
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -130,7 +122,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm670-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm670-tlmm.yaml
index 84a15f77e710..b56e717aa28e 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm670-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm670-tlmm.yaml
@@ -25,23 +25,10 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges:
minItems: 1
maxItems: 75
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
-
patternProperties:
"-state$":
oneOf:
@@ -98,6 +85,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm845-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm845-pinctrl.yaml
index d301881ddfa8..dfe5616b9b85 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm845-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdm845-pinctrl.yaml
@@ -26,10 +26,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 75
@@ -37,10 +33,6 @@ properties:
gpio-line-names:
maxItems: 150
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -110,7 +102,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx55-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx55-pinctrl.yaml
index 67af99dd8f14..edbcff92bbf9 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx55-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx55-pinctrl.yaml
@@ -23,12 +23,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
-
gpio-reserved-ranges:
maxItems: 1
@@ -102,7 +96,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx65-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx65-tlmm.yaml
index 27319782d94b..a31b638c456d 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx65-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx65-tlmm.yaml
@@ -22,12 +22,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
-
gpio-reserved-ranges:
maxItems: 1
@@ -122,7 +116,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx75-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx75-tlmm.yaml
index 7cb96aa75b08..cb1d978d02c9 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx75-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sdx75-tlmm.yaml
@@ -22,10 +22,8 @@ properties:
reg:
maxItems: 1
- interrupts: true
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
+ interrupts:
+ maxItems: 1
gpio-reserved-ranges:
minItems: 1
@@ -34,10 +32,6 @@ properties:
gpio-line-names:
maxItems: 133
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -100,7 +94,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm4450-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm4450-tlmm.yaml
new file mode 100644
index 000000000000..bb08ca5a1509
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm4450-tlmm.yaml
@@ -0,0 +1,151 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,sm4450-tlmm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. SM4450 TLMM block
+
+maintainers:
+ - Tengfei Fan <quic_tengfan@quicinc.com>
+
+description:
+ Top Level Mode Multiplexer pin controller in Qualcomm SM4450 SoC.
+
+allOf:
+ - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,sm4450-pinctrl
+
+ reg:
+ maxItems: 1
+
+ interrupts: true
+ interrupt-controller: true
+ "#interrupt-cells": true
+ gpio-controller: true
+
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 68
+
+ gpio-line-names:
+ maxItems: 136
+
+ "#gpio-cells": true
+ gpio-ranges: true
+ wakeup-parent: true
+
+patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/qcom-sm4450-tlmm-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/qcom-sm4450-tlmm-state"
+ additionalProperties: false
+
+$defs:
+ qcom-sm4450-tlmm-state:
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+ $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ List of gpio pins affected by the properties specified in this
+ subnode.
+ items:
+ oneOf:
+ - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-2][0-9]|13[0-5])$"
+ - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
+ minItems: 1
+ maxItems: 36
+
+ function:
+ description:
+ Specify the alternative function to be configured for the specified
+ pins.
+ enum: [ gpio, atest_char, atest_char0, atest_char1, atest_char2,
+ atest_char3, atest_usb0, atest_usb00, atest_usb01, atest_usb02,
+ atest_usb03, audio_ref, cam_mclk, cci_async, cci_i2c,
+ cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4,
+ cmu_rng0, cmu_rng1, cmu_rng2, cmu_rng3, coex_uart1, cri_trng,
+ cri_trng0, cri_trng1, dbg_out, ddr_bist, ddr_pxi0, ddr_pxi1,
+ dp0_hot, gcc_gp1, gcc_gp2, gcc_gp3, host2wlan_sol, ibi_i3c,
+ jitter_bist, mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2,
+ mdp_vsync3, mi2s0_data0, mi2s0_data1, mi2s0_sck, mi2s0_ws,
+ mi2s2_data0, mi2s2_data1, mi2s2_sck, mi2s2_ws, mi2s_mclk0,
+ mi2s_mclk1, nav_gpio0, nav_gpio1, nav_gpio2, pcie0_clk,
+ phase_flag0, phase_flag1, phase_flag10, phase_flag11,
+ phase_flag12, phase_flag13, phase_flag14, phase_flag15,
+ phase_flag16, phase_flag17, phase_flag18, phase_flag19,
+ phase_flag2, phase_flag20, phase_flag21, phase_flag22,
+ phase_flag23, phase_flag24, phase_flag25, phase_flag26,
+ phase_flag27, phase_flag28, phase_flag29, phase_flag3,
+ phase_flag30, phase_flag31, phase_flag4, phase_flag5,
+ phase_flag6, phase_flag7, phase_flag8, phase_flag9,
+ pll_bist, pll_clk, prng_rosc0, prng_rosc1, prng_rosc2,
+ prng_rosc3, qdss_cti, qdss_gpio, qdss_gpio0, qdss_gpio1,
+ qdss_gpio10, qdss_gpio11, qdss_gpio12, qdss_gpio13, qdss_gpio14,
+ qdss_gpio15, qdss_gpio2, qdss_gpio3, qdss_gpio4, qdss_gpio5,
+ qdss_gpio6, qdss_gpio7, qdss_gpio8, qdss_gpio9, qlink0_enable,
+ qlink0_request, qlink0_wmss, qlink1_enable, qlink1_request,
+ qlink1_wmss, qlink2_enable, qlink2_request, qlink2_wmss,
+ qup0_se0, qup0_se1, qup0_se2, qup0_se3, qup0_se4, qup0_se5,
+ qup0_se6, qup0_se7, qup1_se0, qup1_se1, qup1_se2, qup1_se3,
+ qup1_se4, qup1_se5, qup1_se6, sd_write, tb_trig, tgu_ch0,
+ tgu_ch1, tgu_ch2, tgu_ch3, tmess_prng0, tmess_prng1,
+ tmess_prng2, tmess_prng3, tsense_pwm1, tsense_pwm2, uim0_clk,
+ uim0_data, uim0_present, uim0_reset, uim1_clk, uim1_data,
+ uim1_present, uim1_reset, usb0_hs, usb0_phy, vfr_0, vfr_1,
+ vsense_trigger ]
+
+ required:
+ - pins
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ tlmm: pinctrl@f100000 {
+ compatible = "qcom,sm4450-tlmm";
+ reg = <0x0f100000 0x300000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&tlmm 0 0 137>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+
+ gpio-wo-state {
+ pins = "gpio1";
+ function = "gpio";
+ };
+
+ uart-w-state {
+ rx-pins {
+ pins = "gpio23";
+ function = "qup1_se2";
+ bias-pull-up;
+ };
+
+ tx-pins {
+ pins = "gpio22";
+ function = "qup1_se2";
+ bias-disable;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml
new file mode 100644
index 000000000000..f4cf2ce86fcd
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM6115 SoC LPASS LPI TLMM
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description:
+ Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem
+ (LPASS) Low Power Island (LPI) of Qualcomm SM6115 SoC.
+
+properties:
+ compatible:
+ const: qcom,sm6115-lpass-lpi-pinctrl
+
+ reg:
+ items:
+ - description: LPASS LPI TLMM Control and Status registers
+ - description: LPASS LPI MCC registers
+
+ clocks:
+ items:
+ - description: LPASS Audio voting clock
+
+ clock-names:
+ items:
+ - const: audio
+
+patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/qcom-sm6115-lpass-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/qcom-sm6115-lpass-state"
+ additionalProperties: false
+
+$defs:
+ qcom-sm6115-lpass-state:
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ List of gpio pins affected by the properties specified in this
+ subnode.
+ items:
+ pattern: "^gpio([0-9]|1[0-8])$"
+
+ function:
+ enum: [ dmic01_clk, dmic01_data, dmic23_clk, dmic23_data, gpio, i2s1_clk,
+ i2s1_data, i2s1_ws, i2s2_clk, i2s2_data, i2s2_ws, i2s3_clk,
+ i2s3_data, i2s3_ws, qua_mi2s_data, qua_mi2s_sclk, qua_mi2s_ws,
+ swr_rx_clk, swr_rx_data, swr_tx_clk, swr_tx_data, wsa_mclk ]
+ description:
+ Specify the alternative function to be configured for the specified
+ pins.
+
+
+allOf:
+ - $ref: qcom,lpass-lpi-common.yaml#
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/sound/qcom,q6afe.h>
+
+ lpass_tlmm: pinctrl@a7c0000 {
+ compatible = "qcom,sm6115-lpass-lpi-pinctrl";
+ reg = <0x0a7c0000 0x20000>,
+ <0x0a950000 0x10000>;
+ clocks = <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "audio";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&lpass_tlmm 0 0 19>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-tlmm.yaml
index 871df54f69a2..7f36f9b93333 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6115-tlmm.yaml
@@ -29,13 +29,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
gpio-reserved-ranges: true
- wakeup-parent: true
patternProperties:
"-state$":
@@ -97,7 +91,7 @@ required:
- reg
- reg-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6125-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6125-tlmm.yaml
index 8d77707b02b9..ddeaeaa9a450 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6125-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6125-tlmm.yaml
@@ -30,20 +30,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
- - reg-names
-
-additionalProperties: false
patternProperties:
"-state$":
@@ -105,6 +92,13 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+ - reg-names
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6350-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6350-tlmm.yaml
index 27af379cf791..a4771f87d936 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6350-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6350-tlmm.yaml
@@ -26,10 +26,6 @@ properties:
minItems: 9
maxItems: 9
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 78
@@ -37,16 +33,6 @@ properties:
gpio-line-names:
maxItems: 156
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
-
patternProperties:
"-state$":
oneOf:
@@ -112,6 +98,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6375-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6375-tlmm.yaml
index 6e02ba24825f..047f82863f9b 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6375-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6375-tlmm.yaml
@@ -25,19 +25,7 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
gpio-reserved-ranges: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
patternProperties:
"-state$":
@@ -113,6 +101,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm7150-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm7150-tlmm.yaml
index ede0f3acad9c..7f23f939ad32 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm7150-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm7150-tlmm.yaml
@@ -32,13 +32,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 60
@@ -111,7 +104,7 @@ required:
- reg
- reg-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8150-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8150-pinctrl.yaml
index c6439626464e..bdb7ed4be026 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8150-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8150-pinctrl.yaml
@@ -30,13 +30,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 88
@@ -113,7 +106,7 @@ required:
- reg
- reg-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml
index 4b4be7efc150..750c996c10a7 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml
@@ -30,16 +30,6 @@ properties:
- const: core
- const: audio
- gpio-controller: true
-
- "#gpio-cells":
- description: Specifying the pin number and flags, as defined in
- include/dt-bindings/gpio/gpio.h
- const: 2
-
- gpio-ranges:
- maxItems: 1
-
patternProperties:
"-state$":
oneOf:
@@ -55,7 +45,8 @@ $defs:
description:
Pinctrl node's client devices use subnodes for desired pin configuration.
Client device subnodes use below standard properties.
- $ref: /schemas/pinctrl/pincfg-node.yaml
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
properties:
pins:
@@ -78,48 +69,16 @@ $defs:
Specify the alternative function to be configured for the specified
pins.
- drive-strength:
- enum: [2, 4, 6, 8, 10, 12, 14, 16]
- default: 2
- description:
- Selects the drive strength for the specified pins, in mA.
-
- slew-rate:
- enum: [0, 1, 2, 3]
- default: 0
- description: |
- 0: No adjustments
- 1: Higher Slew rate (faster edges)
- 2: Lower Slew rate (slower edges)
- 3: Reserved (No adjustments)
-
- bias-pull-down: true
- bias-pull-up: true
- bias-bus-hold: true
- bias-disable: true
- input-enable: true
- output-high: true
- output-low: true
-
- required:
- - pins
- - function
-
- additionalProperties: false
-
allOf:
- - $ref: pinctrl.yaml#
+ - $ref: qcom,lpass-lpi-common.yaml#
required:
- compatible
- reg
- clocks
- clock-names
- - gpio-controller
- - "#gpio-cells"
- - gpio-ranges
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-pinctrl.yaml
index 021c54708524..b5d04347c064 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-pinctrl.yaml
@@ -28,13 +28,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 90
@@ -106,7 +99,7 @@ required:
- reg
- reg-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-lpass-lpi-pinctrl.yaml
new file mode 100644
index 000000000000..9d782f910b31
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-lpass-lpi-pinctrl.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,sm8350-lpass-lpi-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM8350 SoC LPASS LPI TLMM
+
+maintainers:
+ - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description:
+ Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem
+ (LPASS) Low Power Island (LPI) of Qualcomm SM8350 SoC.
+
+properties:
+ compatible:
+ const: qcom,sm8350-lpass-lpi-pinctrl
+
+ reg:
+ items:
+ - description: LPASS LPI TLMM Control and Status registers
+ - description: LPASS LPI MCC registers
+
+ clocks:
+ items:
+ - description: LPASS Core voting clock
+ - description: LPASS Audio voting clock
+
+ clock-names:
+ items:
+ - const: core
+ - const: audio
+
+patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/qcom-sm8350-lpass-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/qcom-sm8350-lpass-state"
+ additionalProperties: false
+
+$defs:
+ qcom-sm8350-lpass-state:
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ List of gpio pins affected by the properties specified in this
+ subnode.
+ items:
+ pattern: "^gpio([0-9]|1[0-9]|2[0-2])$"
+
+ function:
+ enum: [ dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, dmic3_clk,
+ dmic3_data, dmic4_clk, dmic4_data, ext_mclk1_a, ext_mclk1_b,
+ ext_mclk1_c, ext_mclk1_d, ext_mclk1_e, gpio, i2s0_clk,
+ i2s0_data, i2s0_ws, i2s1_clk, i2s1_data, i2s1_ws, i2s2_clk,
+ i2s2_data, i2s2_ws, i2s3_clk, i2s3_data, i2s3_ws, i2s4_clk,
+ i2s4_data, i2s4_ws, slimbus_clk, slimbus_data, swr_rx_clk,
+ swr_rx_data, swr_tx_clk, swr_tx_data, wsa_swr_clk,
+ wsa_swr_data, wsa2_swr_clk, wsa2_swr_data ]
+ description:
+ Specify the alternative function to be configured for the specified
+ pins.
+
+allOf:
+ - $ref: qcom,lpass-lpi-common.yaml#
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/sound/qcom,q6afe.h>
+
+ lpass_tlmm: pinctrl@33c0000 {
+ compatible = "qcom,sm8350-lpass-lpi-pinctrl";
+ reg = <0x033c0000 0x20000>,
+ <0x03550000 0x10000>;
+
+ clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "core", "audio";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&lpass_tlmm 0 0 15>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-tlmm.yaml
index 6e8f41ff0a76..ec5e09611d81 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8350-tlmm.yaml
@@ -25,10 +25,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 102
@@ -36,16 +32,6 @@ properties:
gpio-line-names:
maxItems: 203
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
-
patternProperties:
"-state$":
oneOf:
@@ -108,6 +94,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml
index 1eefa9aa6a86..e7565592da86 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml
@@ -32,16 +32,6 @@ properties:
- const: core
- const: audio
- gpio-controller: true
-
- "#gpio-cells":
- description: Specifying the pin number and flags, as defined in
- include/dt-bindings/gpio/gpio.h
- const: 2
-
- gpio-ranges:
- maxItems: 1
-
patternProperties:
"-state$":
oneOf:
@@ -57,7 +47,8 @@ $defs:
description:
Pinctrl node's client devices use subnodes for desired pin configuration.
Client device subnodes use below standard properties.
- $ref: /schemas/pinctrl/pincfg-node.yaml
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
properties:
pins:
@@ -81,48 +72,16 @@ $defs:
Specify the alternative function to be configured for the specified
pins.
- drive-strength:
- enum: [2, 4, 6, 8, 10, 12, 14, 16]
- default: 2
- description:
- Selects the drive strength for the specified pins, in mA.
-
- slew-rate:
- enum: [0, 1, 2, 3]
- default: 0
- description: |
- 0: No adjustments
- 1: Higher Slew rate (faster edges)
- 2: Lower Slew rate (slower edges)
- 3: Reserved (No adjustments)
-
- bias-bus-hold: true
- bias-pull-down: true
- bias-pull-up: true
- bias-disable: true
- input-enable: true
- output-high: true
- output-low: true
-
- required:
- - pins
- - function
-
- additionalProperties: false
-
allOf:
- - $ref: pinctrl.yaml#
+ - $ref: qcom,lpass-lpi-common.yaml#
required:
- compatible
- reg
- clocks
- clock-names
- - gpio-controller
- - "#gpio-cells"
- - gpio-ranges
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-tlmm.yaml
index 5163fe3f5365..16fd2c5e2339 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8450-tlmm.yaml
@@ -25,10 +25,6 @@ properties:
interrupts:
maxItems: 1
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
-
gpio-reserved-ranges:
minItems: 1
maxItems: 105
@@ -36,16 +32,6 @@ properties:
gpio-line-names:
maxItems: 210
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
-required:
- - compatible
- - reg
-
-additionalProperties: false
-
patternProperties:
"-state$":
oneOf:
@@ -107,6 +93,12 @@ $defs:
required:
- pins
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml
index ef9743246849..bf4a72facae1 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml
@@ -16,7 +16,11 @@ description:
properties:
compatible:
- const: qcom,sm8550-lpass-lpi-pinctrl
+ oneOf:
+ - const: qcom,sm8550-lpass-lpi-pinctrl
+ - items:
+ - const: qcom,x1e80100-lpass-lpi-pinctrl
+ - const: qcom,sm8550-lpass-lpi-pinctrl
reg:
items:
@@ -33,16 +37,6 @@ properties:
- const: core
- const: audio
- gpio-controller: true
-
- "#gpio-cells":
- description: Specifying the pin number and flags, as defined in
- include/dt-bindings/gpio/gpio.h
- const: 2
-
- gpio-ranges:
- maxItems: 1
-
patternProperties:
"-state$":
oneOf:
@@ -58,7 +52,8 @@ $defs:
description:
Pinctrl node's client devices use subnodes for desired pin configuration.
Client device subnodes use below standard properties.
- $ref: /schemas/pinctrl/pincfg-node.yaml
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
properties:
pins:
@@ -81,48 +76,16 @@ $defs:
Specify the alternative function to be configured for the specified
pins.
- drive-strength:
- enum: [2, 4, 6, 8, 10, 12, 14, 16]
- default: 2
- description:
- Selects the drive strength for the specified pins, in mA.
-
- slew-rate:
- enum: [0, 1, 2, 3]
- default: 0
- description: |
- 0: No adjustments
- 1: Higher Slew rate (faster edges)
- 2: Lower Slew rate (slower edges)
- 3: Reserved (No adjustments)
-
- bias-bus-hold: true
- bias-pull-down: true
- bias-pull-up: true
- bias-disable: true
- input-enable: true
- output-high: true
- output-low: true
-
- required:
- - pins
- - function
-
- additionalProperties: false
-
allOf:
- - $ref: pinctrl.yaml#
+ - $ref: qcom,lpass-lpi-common.yaml#
required:
- compatible
- reg
- clocks
- clock-names
- - gpio-controller
- - "#gpio-cells"
- - gpio-ranges
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-tlmm.yaml
index f789c7753a92..c2ae79df424f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-tlmm.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8550-tlmm.yaml
@@ -22,10 +22,8 @@ properties:
reg:
maxItems: 1
- interrupts: true
- interrupt-controller: true
- "#interrupt-cells": true
- gpio-controller: true
+ interrupts:
+ maxItems: 1
gpio-reserved-ranges:
minItems: 1
@@ -34,10 +32,6 @@ properties:
gpio-line-names:
maxItems: 210
- "#gpio-cells": true
- gpio-ranges: true
- wakeup-parent: true
-
patternProperties:
"-state$":
oneOf:
@@ -117,7 +111,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-lpass-lpi-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-lpass-lpi-pinctrl.yaml
new file mode 100644
index 000000000000..db7214362301
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-lpass-lpi-pinctrl.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,sm8650-lpass-lpi-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM8650 SoC LPASS LPI TLMM
+
+maintainers:
+ - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description:
+ Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem
+ (LPASS) Low Power Island (LPI) of Qualcomm SM8650 SoC.
+
+properties:
+ compatible:
+ const: qcom,sm8650-lpass-lpi-pinctrl
+
+ reg:
+ items:
+ - description: LPASS LPI TLMM Control and Status registers
+
+ clocks:
+ items:
+ - description: LPASS Core voting clock
+ - description: LPASS Audio voting clock
+
+ clock-names:
+ items:
+ - const: core
+ - const: audio
+
+patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/qcom-sm8650-lpass-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/qcom-sm8650-lpass-state"
+ additionalProperties: false
+
+$defs:
+ qcom-sm8650-lpass-state:
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+ $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ List of gpio pins affected by the properties specified in this
+ subnode.
+ items:
+ pattern: "^gpio([0-9]|1[0-9]|2[0-2])$"
+
+ function:
+ enum: [ dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, dmic3_clk,
+ dmic3_data, dmic4_clk, dmic4_data, ext_mclk1_a, ext_mclk1_b,
+ ext_mclk1_c, ext_mclk1_d, ext_mclk1_e, gpio, i2s0_clk,
+ i2s0_data, i2s0_ws, i2s1_clk, i2s1_data, i2s1_ws, i2s2_clk,
+ i2s2_data, i2s2_ws, i2s3_clk, i2s3_data, i2s3_ws, i2s4_clk,
+ i2s4_data, i2s4_ws, qca_swr_clk, qca_swr_data, slimbus_clk,
+ slimbus_data, swr_rx_clk, swr_rx_data, swr_tx_clk, swr_tx_data,
+ wsa_swr_clk, wsa_swr_data, wsa2_swr_clk, wsa2_swr_data ]
+ description:
+ Specify the alternative function to be configured for the specified
+ pins.
+
+allOf:
+ - $ref: qcom,lpass-lpi-common.yaml#
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
+
+ lpass_tlmm: pinctrl@6e80000 {
+ compatible = "qcom,sm8650-lpass-lpi-pinctrl";
+ reg = <0x06e80000 0x20000>;
+
+ clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "core", "audio";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&lpass_tlmm 0 0 23>;
+
+ tx-swr-sleep-clk-state {
+ pins = "gpio0";
+ function = "swr_tx_clk";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-tlmm.yaml
new file mode 100644
index 000000000000..c0a06abf851d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8650-tlmm.yaml
@@ -0,0 +1,141 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,sm8650-tlmm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. SM8650 TLMM block
+
+maintainers:
+ - Bjorn Andersson <andersson@kernel.org>
+
+description:
+ Top Level Mode Multiplexer pin controller in Qualcomm SM8650 SoC.
+
+allOf:
+ - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,sm8650-tlmm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 105
+
+ gpio-line-names:
+ maxItems: 210
+
+patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/qcom-sm8650-tlmm-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/qcom-sm8650-tlmm-state"
+ additionalProperties: false
+
+$defs:
+ qcom-sm8650-tlmm-state:
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+ $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ List of gpio pins affected by the properties specified in this
+ subnode.
+ items:
+ oneOf:
+ - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|20[0-9])$"
+ - enum: [ ufs_reset, sdc2_clk, sdc2_cmd, sdc2_data ]
+ minItems: 1
+ maxItems: 36
+
+ function:
+ description:
+ Specify the alternative function to be configured for the specified
+ pins.
+ enum: [ gpio, aoss_cti, atest_char, atest_usb, audio_ext_mclk0,
+ audio_ext_mclk1, audio_ref_clk, cam_aon_mclk2, cam_aon_mclk4,
+ cam_mclk, cci_async_in, cci_i2c_scl, cci_i2c_sda, cci_timer,
+ cmu_rng, coex_uart1_rx, coex_uart1_tx, coex_uart2_rx,
+ coex_uart2_tx, cri_trng, dbg_out_clk, ddr_bist_complete,
+ ddr_bist_fail, ddr_bist_start, ddr_bist_stop, ddr_pxi0,
+ ddr_pxi1, ddr_pxi2, ddr_pxi3, do_not, dp_hot, gcc_gp1,
+ gcc_gp2, gcc_gp3, gnss_adc0, gnss_adc1, i2chub0_se0,
+ i2chub0_se1, i2chub0_se2, i2chub0_se3, i2chub0_se4,
+ i2chub0_se5, i2chub0_se6, i2chub0_se7, i2chub0_se8,
+ i2chub0_se9, i2s0_data0, i2s0_data1, i2s0_sck, i2s0_ws,
+ i2s1_data0, i2s1_data1, i2s1_sck, i2s1_ws, ibi_i3c,
+ jitter_bist, mdp_vsync, mdp_vsync0_out, mdp_vsync1_out,
+ mdp_vsync2_out, mdp_vsync3_out, mdp_vsync_e, nav_gpio0,
+ nav_gpio1, nav_gpio2, nav_gpio3, pcie0_clk_req_n,
+ pcie1_clk_req_n, phase_flag, pll_bist_sync, pll_clk_aux,
+ prng_rosc0, prng_rosc1, prng_rosc2, prng_rosc3, qdss_cti,
+ qdss_gpio, qlink_big_enable, qlink_big_request,
+ qlink_little_enable, qlink_little_request, qlink_wmss,
+ qspi0, qspi1, qspi2, qspi3, qspi_clk, qspi_cs, qup1_se0,
+ qup1_se1, qup1_se2, qup1_se3, qup1_se4, qup1_se5, qup1_se6,
+ qup1_se7, qup2_se0, qup2_se1, qup2_se2, qup2_se3, qup2_se4,
+ qup2_se5, qup2_se6, qup2_se7, sd_write_protect, sdc40, sdc41,
+ sdc42, sdc43, sdc4_clk, sdc4_cmd, tb_trig_sdc2, tb_trig_sdc4,
+ tgu_ch0_trigout, tgu_ch1_trigout, tgu_ch2_trigout,
+ tgu_ch3_trigout, tmess_prng0, tmess_prng1, tmess_prng2,
+ tmess_prng3, tsense_pwm1, tsense_pwm2, tsense_pwm3, uim0_clk,
+ uim0_data, uim0_present, uim0_reset, uim1_clk, uim1_data,
+ uim1_present, uim1_reset, usb1_hs, usb_phy, vfr_0, vfr_1,
+ vsense_trigger_mirnat ]
+
+ required:
+ - pins
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ tlmm: pinctrl@f100000 {
+ compatible = "qcom,sm8650-tlmm";
+ reg = <0x0f100000 0x300000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&tlmm 0 0 211>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+
+ gpio-wo-state {
+ pins = "gpio1";
+ function = "gpio";
+ };
+
+ uart-w-state {
+ rx-pins {
+ pins = "gpio60";
+ function = "qup1_se7";
+ bias-pull-up;
+ };
+
+ tx-pins {
+ pins = "gpio61";
+ function = "qup1_se7";
+ bias-disable;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/qcom,x1e80100-tlmm.yaml b/sys/contrib/device-tree/Bindings/pinctrl/qcom,x1e80100-tlmm.yaml
new file mode 100644
index 000000000000..a1333e0743a9
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/qcom,x1e80100-tlmm.yaml
@@ -0,0 +1,137 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,x1e80100-tlmm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. X1E80100 TLMM block
+
+maintainers:
+ - Rajendra Nayak <quic_rjendra@quicinc.com>
+
+description:
+ Top Level Mode Multiplexer pin controller in Qualcomm X1E80100 SoC.
+
+allOf:
+ - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,x1e80100-tlmm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 119
+
+ gpio-line-names:
+ maxItems: 238
+
+patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/qcom-x1e80100-tlmm-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/qcom-x1e80100-tlmm-state"
+ additionalProperties: false
+
+$defs:
+ qcom-x1e80100-tlmm-state:
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+ $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
+ unevaluatedProperties: false
+
+ properties:
+ pins:
+ description:
+ List of gpio pins affected by the properties specified in this
+ subnode.
+ items:
+ oneOf:
+ - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-2][0-9]|23[0-7])$"
+ - enum: [ ufs_reset, sdc2_clk, sdc2_cmd, sdc2_data ]
+ minItems: 1
+ maxItems: 36
+
+ function:
+ description:
+ Specify the alternative function to be configured for the specified
+ pins.
+ enum: [ aon_cci, aoss_cti, atest_char, atest_char0,
+ atest_char1, atest_char2, atest_char3, atest_usb,
+ audio_ext, audio_ref, cam_aon, cam_mclk, cci_async,
+ cci_i2c, cci_timer0, cci_timer1, cci_timer2, cci_timer3,
+ cci_timer4, cmu_rng0, cmu_rng1, cmu_rng2, cmu_rng3,
+ cri_trng, dbg_out, ddr_bist, ddr_pxi0, ddr_pxi1,
+ ddr_pxi2, ddr_pxi3, ddr_pxi4, ddr_pxi5, ddr_pxi6, ddr_pxi7,
+ edp0_hot, edp0_lcd, edp1_hot, edp1_lcd, eusb0_ac, eusb1_ac,
+ eusb2_ac, eusb3_ac, eusb5_ac, eusb6_ac, gcc_gp1, gcc_gp2,
+ gcc_gp3, gpio, i2s0_data0, i2s0_data1, i2s0_sck, i2s0_ws, i2s1_data0,
+ i2s1_data1, i2s1_sck, i2s1_ws, ibi_i3c, jitter_bist, mdp_vsync0,
+ mdp_vsync1, mdp_vsync2, mdp_vsync3, mdp_vsync4, mdp_vsync5,
+ mdp_vsync6, mdp_vsync7, mdp_vsync8, pcie3_clk, pcie4_clk,
+ pcie5_clk, pcie6a_clk, pcie6b_clk, phase_flag, pll_bist, pll_clk,
+ prng_rosc0, prng_rosc1, prng_rosc2, prng_rosc3, qdss_cti,
+ qdss_gpio, qspi00, qspi01, qspi02, qspi03, qspi0_clk, qspi0_cs0,
+ qspi0_cs1, qup0_se0, qup0_se1, qup0_se2, qup0_se3, qup0_se4,
+ qup0_se5, qup0_se6, qup0_se7, qup1_se0, qup1_se1, qup1_se2, qup1_se3,
+ qup1_se4, qup1_se5, qup1_se6, qup1_se7, qup2_se0, qup2_se1, qup2_se2,
+ qup2_se3, qup2_se4, qup2_se5, qup2_se6, qup2_se7, sd_write, sdc4_clk,
+ sdc4_cmd, sdc4_data0, sdc4_data1, sdc4_data2, sdc4_data3, sys_throttle,
+ tb_trig, tgu_ch0, tgu_ch1, tgu_ch2, tgu_ch3, tgu_ch4, tgu_ch5,
+ tgu_ch6, tgu_ch7, tmess_prng0, tmess_prng1, tmess_prng2, tmess_prng3,
+ tsense_pwm1, tsense_pwm2, sense_pwm3, tsense_pwm4, usb0_dp, usb0_phy,
+ usb0_sbrx, usb0_sbtx, usb1_dp, usb1_phy, usb1_sbrx, usb1_sbtx,
+ usb2_dp, usb2_phy, usb2_sbrx, usb2_sbtx, vsense_trigger ]
+
+ required:
+ - pins
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ tlmm: pinctrl@f100000 {
+ compatible = "qcom,x1e80100-tlmm";
+ reg = <0x0f100000 0xf00000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&tlmm 0 0 239>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+
+ gpio-wo-state {
+ pins = "gpio1";
+ function = "gpio";
+ };
+
+ uart-w-state {
+ rx-pins {
+ pins = "gpio26";
+ function = "qup2_se7";
+ bias-pull-up;
+ };
+
+ tx-pins {
+ pins = "gpio27";
+ function = "qup2_se7";
+ bias-disable;
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml
new file mode 100644
index 000000000000..fc6c65fea73b
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml
@@ -0,0 +1,188 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1315e-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC RTD1315E Pin Controller
+
+maintainers:
+ - TY Chang <tychang@realtek.com>
+
+description:
+ The Realtek DHC RTD1315E is a high-definition media processor SoC. The
+ RTD1315E pin controller is used to control pin function, pull up/down
+ resistor, drive strength, schmitt trigger and power source.
+
+properties:
+ compatible:
+ const: realtek,rtd1315e-pinctrl
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ '-pins$':
+ type: object
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ pins:
+ items:
+ enum: [ gpio_0, gpio_1, emmc_rst_n, emmc_dd_sb, emmc_clk, emmc_cmd,
+ gpio_6, gpio_7, gpio_8, gpio_9, gpio_10, gpio_11, gpio_12,
+ gpio_13, gpio_14, gpio_15, gpio_16, gpio_17, gpio_18, gpio_19,
+ gpio_20, emmc_data_0, emmc_data_1, emmc_data_2, usb_cc2, gpio_25,
+ gpio_26, gpio_27, gpio_28, gpio_29, gpio_30, gpio_31, gpio_32,
+ gpio_33, gpio_34, gpio_35, hif_data, hif_en, hif_rdy, hif_clk,
+ gpio_dummy_40, gpio_dummy_41, gpio_dummy_42, gpio_dummy_43,
+ gpio_dummy_44, gpio_dummy_45, gpio_46, gpio_47, gpio_48, gpio_49,
+ gpio_50, usb_cc1, emmc_data_3, emmc_data_4, ir_rx, ur0_rx, ur0_tx,
+ gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_dummy_63,
+ gpio_dummy_64, gpio_dummy_65, gpio_66, gpio_67, gpio_68, gpio_69,
+ gpio_70, gpio_71, gpio_72, gpio_dummy_73, emmc_data_5, emmc_data_6,
+ emmc_data_7, gpio_dummy_77, gpio_78, gpio_79, gpio_80, gpio_81,
+ ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en,
+ ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc,
+ dmic_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc, tdm_ai_loc,
+ ai_loc, spdif_loc, hif_en_loc, scan_switch, wd_rset, boot_sel,
+ reset_n, testmode ]
+
+ function:
+ enum: [ gpio, nf, emmc, ao, gspi_loc0, gspi_loc1, uart0, uart1,
+ uart2_loc0, uart2_loc1, i2c0, i2c1, i2c4, i2c5, pcie1,
+ etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1, pwm1_loc0,
+ pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0, pwm3_loc1,
+ spdif_optical_loc0, spdif_optical_loc1, usb_cc1, usb_cc2,
+ sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1, tdm_ai_loc0,
+ tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0,
+ vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1, vtc_tdm_loc0,
+ vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1,
+ ir_rx, uart2_disable, gspi_disable, hi_width_disable,
+ hi_width_1bit, sf_disable, sf_enable, scpu_ejtag_loc0,
+ scpu_ejtag_loc1, scpu_ejtag_loc2, scpu_ejtag_loc3,
+ acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2,
+ vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2,
+ aucpu_ejtag_loc0, aucpu_ejtag_loc1, aucpu_ejtag_loc2,
+ gpu_ejtag, iso_tristate, dbg_out0, dbg_out1, standby_dbg,
+ spdif, arm_trace_debug_disable, arm_trace_debug_enable,
+ aucpu_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable,
+ scpu_ejtag_disable, vtc_dmic_loc_disable, vtc_tdm_disable,
+ vtc_i2si_disable, tdm_ai_disable, ai_disable, spdif_disable,
+ hif_disable, hif_enable, test_loop, pmic_pwrup ]
+
+ drive-strength:
+ enum: [4, 8]
+
+ bias-pull-down: true
+
+ bias-pull-up: true
+
+ bias-disable: true
+
+ input-schmitt-enable: true
+
+ input-schmitt-disable: true
+
+ drive-push-pull: true
+
+ power-source:
+ description: |
+ Valid arguments are described as below:
+ 0: power supply of 1.8V
+ 1: power supply of 3.3V
+ enum: [0, 1]
+
+ realtek,drive-strength-p:
+ description: |
+ Some of pins can be driven using the P-MOS and N-MOS transistor to
+ achieve finer adjustments. The block-diagram representation is as
+ follows:
+ VDD
+ |
+ ||--+
+ +-----o|| P-MOS-FET
+ | ||--+
+ IN --+ +----- out
+ | ||--+
+ +------|| N-MOS-FET
+ ||--+
+ |
+ GND
+ The driving strength of the P-MOS/N-MOS transistors impacts the
+ waveform's rise/fall times. Greater driving strength results in
+ shorter rise/fall times. Each P-MOS and N-MOS transistor offers
+ 8 configurable levels (0 to 7), with higher values indicating
+ greater driving strength, contributing to achieving the desired
+ speed.
+
+ The realtek,drive-strength-p is used to control the driving strength
+ of the P-MOS output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ realtek,drive-strength-n:
+ description: |
+ Similar to the realtek,drive-strength-p, the realtek,drive-strength-n
+ is used to control the driving strength of the N-MOS output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ realtek,duty-cycle:
+ description: |
+ An integer describing the level to adjust output duty cycle, controlling
+ the proportion of positive and negative waveforms in nanoseconds.
+ Valid arguments are described as below:
+ 0: 0ns
+ 2: + 0.25ns
+ 3: + 0.5ns
+ 4: -0.25ns
+ 5: -0.5ns
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 2, 3, 4, 5 ]
+
+ required:
+ - pins
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ pinctrl@4e000 {
+ compatible = "realtek,rtd1315e-pinctrl";
+ reg = <0x4e000 0x130>;
+
+ emmc-hs200-pins {
+ pins = "emmc_clk",
+ "emmc_cmd",
+ "emmc_data_0",
+ "emmc_data_1",
+ "emmc_data_2",
+ "emmc_data_3",
+ "emmc_data_4",
+ "emmc_data_5",
+ "emmc_data_6",
+ "emmc_data_7";
+ function = "emmc";
+ realtek,drive-strength-p = <0x2>;
+ realtek,drive-strength-n = <0x2>;
+ };
+
+ i2c-0-pins {
+ pins = "gpio_12",
+ "gpio_13";
+ function = "i2c0";
+ drive-strength = <4>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml
new file mode 100644
index 000000000000..f07361d60acd
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml
@@ -0,0 +1,187 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1319d-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC RTD1319D Pin Controller
+
+maintainers:
+ - TY Chang <tychang@realtek.com>
+
+description:
+ The Realtek DHC RTD1319D is a high-definition media processor SoC. The
+ RTD1319D pin controller is used to control pin function, pull up/down
+ resistor, drive strength, schmitt trigger and power source.
+
+properties:
+ compatible:
+ const: realtek,rtd1319d-pinctrl
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ '-pins$':
+ type: object
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ pins:
+ items:
+ enum: [ gpio_0, gpio_1, gpio_2, gpio_3, gpio_4, gpio_5, gpio_6, gpio_7,
+ gpio_8, gpio_9, gpio_10, gpio_11, gpio_12, gpio_13, gpio_14,
+ gpio_15, gpio_16, gpio_17, gpio_18, gpio_19, gpio_20, gpio_21,
+ gpio_22, gpio_23, usb_cc2, gpio_25, gpio_26, gpio_27, gpio_28,
+ gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35,
+ hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41, gpio_42,
+ gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48, gpio_49,
+ gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx, ur0_tx,
+ gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_63,
+ gpio_64, emmc_rst_n, emmc_dd_sb, emmc_clk, emmc_cmd, emmc_data_0,
+ emmc_data_1, emmc_data_2, emmc_data_3, emmc_data_4, emmc_data_5,
+ emmc_data_6, emmc_data_7, dummy, gpio_78, gpio_79, gpio_80,
+ gpio_81, ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en,
+ ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc,
+ dmic_loc, ejtag_secpu_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc,
+ tdm_ai_loc, ai_loc, spdif_loc, hif_en_loc, sc0_loc, sc1_loc,
+ scan_switch, wd_rset, boot_sel, reset_n, testmode ]
+
+ function:
+ enum: [ gpio, nf, emmc, tp0, tp1, sc0, sc0_data0, sc0_data1, sc0_data2,
+ sc1, sc1_data0, sc1_data1, sc1_data2, ao, gspi_loc0, gspi_loc1,
+ uart0, uart1, uart2_loc0, uart2_loc1, i2c0, i2c1, i2c3, i2c4,
+ i2c5, pcie1, sdio, etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1,
+ pwm1_loc0, pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0, pwm3_loc1,
+ qam_agc_if0, qam_agc_if1, spdif_optical_loc0, spdif_optical_loc1,
+ usb_cc1, usb_cc2, vfd, sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1,
+ tdm_ai_loc0, tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0,
+ vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1, vtc_tdm_loc0,
+ vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, ir_rx,
+ uart2_disable, gspi_disable, hi_width_disable, hi_width_1bit,
+ sf_disable, sf_enable, scpu_ejtag_loc0, scpu_ejtag_loc1,
+ scpu_ejtag_loc2, acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2,
+ vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2, secpu_ejtag_loc0,
+ secpu_ejtag_loc1, secpu_ejtag_loc2, aucpu_ejtag_loc0, aucpu_ejtag_loc1,
+ aucpu_ejtag_loc2, iso_tristate, dbg_out0, dbg_out1, standby_dbg,
+ spdif, arm_trace_debug_disable, arm_trace_debug_enable,
+ aucpu_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable,
+ scpu_ejtag_disable, secpu_ejtag_disable, vtc_dmic_loc_disable,
+ vtc_tdm_disable, vtc_i2si_disable, tdm_ai_disable, ai_disable,
+ spdif_disable, hif_disable, hif_enable, test_loop, pmic_pwrup ]
+
+ drive-strength:
+ enum: [4, 8]
+
+ bias-pull-down: true
+
+ bias-pull-up: true
+
+ bias-disable: true
+
+ input-schmitt-enable: true
+
+ input-schmitt-disable: true
+
+ drive-push-pull: true
+
+ power-source:
+ description: |
+ Valid arguments are described as below:
+ 0: power supply of 1.8V
+ 1: power supply of 3.3V
+ enum: [0, 1]
+
+ realtek,drive-strength-p:
+ description: |
+ Some of pins can be driven using the P-MOS and N-MOS transistor to
+ achieve finer adjustments. The block-diagram representation is as
+ follows:
+ VDD
+ |
+ ||--+
+ +-----o|| P-MOS-FET
+ | ||--+
+ IN --+ +----- out
+ | ||--+
+ +------|| N-MOS-FET
+ ||--+
+ |
+ GND
+ The driving strength of the P-MOS/N-MOS transistors impacts the
+ waveform's rise/fall times. Greater driving strength results in
+ shorter rise/fall times. Each P-MOS and N-MOS transistor offers
+ 8 configurable levels (0 to 7), with higher values indicating
+ greater driving strength, contributing to achieving the desired
+ speed.
+
+ The realtek,drive-strength-p is used to control the driving strength
+ of the P-MOS output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ realtek,drive-strength-n:
+ description: |
+ Similar to the realtek,drive-strength-p, the realtek,drive-strength-n
+ is used to control the driving strength of the N-MOS output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ realtek,duty-cycle:
+ description: |
+ An integer describing the level to adjust output duty cycle, controlling
+ the proportion of positive and negative waveforms in nanoseconds.
+ Valid arguments are described as below:
+ 0: 0ns
+ 2: + 0.25ns
+ 3: + 0.5ns
+ 4: -0.25ns
+ 5: -0.5ns
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 2, 3, 4, 5 ]
+
+ required:
+ - pins
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ pinctrl@4e000 {
+ compatible = "realtek,rtd1319d-pinctrl";
+ reg = <0x4e000 0x130>;
+
+ emmc-hs200-pins {
+ pins = "emmc_clk",
+ "emmc_cmd",
+ "emmc_data_0",
+ "emmc_data_1",
+ "emmc_data_2",
+ "emmc_data_3",
+ "emmc_data_4",
+ "emmc_data_5",
+ "emmc_data_6",
+ "emmc_data_7";
+ function = "emmc";
+ realtek,drive-strength-p = <0x2>;
+ realtek,drive-strength-n = <0x2>;
+ };
+
+ i2c-0-pins {
+ pins = "gpio_12",
+ "gpio_13";
+ function = "i2c0";
+ drive-strength = <4>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml
new file mode 100644
index 000000000000..671e4ec84624
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml
@@ -0,0 +1,186 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1619b-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC RTD1619B Pin Controller
+
+maintainers:
+ - TY Chang <tychang@realtek.com>
+
+description:
+ The Realtek DHC RTD1619B is a high-definition media processor SoC. The
+ RTD1619B pin controller is used to control pin function, pull up/down
+ resistor, drive strength, schmitt trigger and power source.
+
+properties:
+ compatible:
+ const: realtek,rtd1619b-pinctrl
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ '-pins$':
+ type: object
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ pins:
+ items:
+ enum: [ gpio_0, gpio_1, gpio_2, gpio_3, gpio_4, gpio_5, gpio_6, gpio_7,
+ gpio_8, gpio_9, gpio_10, gpio_11, gpio_12, gpio_13, gpio_14,
+ gpio_15, gpio_16, gpio_17, gpio_18, gpio_19, gpio_20, gpio_21,
+ gpio_22, gpio_23, usb_cc2, gpio_25, gpio_26, gpio_27, gpio_28,
+ gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35,
+ hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41, gpio_42,
+ gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48, gpio_49,
+ gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx, ur0_tx,
+ gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_63,
+ gpio_64, gpio_65, gpio_66, gpio_67, gpio_68, gpio_69, gpio_70,
+ gpio_71, gpio_72, gpio_73, gpio_74, gpio_75, gpio_76, emmc_cmd,
+ spi_ce_n, spi_sck, spi_so, spi_si, emmc_rst_n, emmc_dd_sb,
+ emmc_clk, emmc_data_0, emmc_data_1, emmc_data_2, emmc_data_3,
+ emmc_data_4, emmc_data_5, emmc_data_6, emmc_data_7, ur2_loc,
+ gspi_loc, sdio_loc, hi_loc, hi_width, sf_en, arm_trace_dbg_en,
+ pwm_01_open_drain_en_loc0, pwm_23_open_drain_en_loc0,
+ pwm_01_open_drain_en_loc1, pwm_23_open_drain_en_loc1,
+ ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, dmic_loc,
+ iso_gspi_loc, ejtag_ve3_loc, ejtag_aucpu0_loc, ejtag_aucpu1_loc ]
+
+ function:
+ enum: [ gpio, nf, nf_spi, spi, pmic, spdif, spdif_coaxial, spdif_optical_loc0,
+ spdif_optical_loc1, emmc_spi, emmc, sc1, uart0, uart1, uart2_loc0, uart2_loc1,
+ gspi_loc1, iso_gspi_loc1, i2c0, i2c1, i2c3, i2c4, i2c5, pwm0, pwm1, pwm2,
+ pwm3, etn_led, etn_phy, etn_clk, sc0, vfd, gspi_loc0, iso_gspi_loc0, pcie1,
+ pcie2, sd, sdio_loc0, sdio_loc1, hi, hi_m, dc_fan, pll_test_loc0, pll_test_loc1,
+ usb_cc1, usb_cc2, ir_rx, tdm_ai_loc0, tdm_ai_loc1, dmic_loc0, dmic_loc1,
+ ai_loc0, ai_loc1, tp0, tp1, ao, uart2_disable, gspi_disable, sdio_disable,
+ hi_loc_disable, hi_loc0, hi_width_disable, hi_width_1bit, vtc_i2si_loc0,
+ vtc_tdm_loc0, vtc_dmic_loc0, vtc_i2si_loc1, vtc_tdm_loc1, vtc_dmic_loc1,
+ vtc_i2so, ve3_ejtag_loc0, aucpu0_ejtag_loc0, aucpu1_ejtag_loc0, ve3_ejtag_loc1,
+ aucpu0_ejtag_loc1, aucpu1_ejtag_loc1, ve3_ejtag_loc2, aucpu0_ejtag_loc2,
+ aucpu1_ejtag_loc2, scpu_ejtag_loc0, acpu_ejtag_loc0, vcpu_ejtag_loc0,
+ scpu_ejtag_loc1, acpu_ejtag_loc1, vcpu_ejtag_loc1, scpu_ejtag_loc2,
+ acpu_ejtag_loc2, vcpu_ejtag_loc2, ve3_ejtag_disable, aucpu0_ejtag_disable,
+ aucpu1_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable,
+ scpu_ejtag_disable, iso_gspi_disable, sf_disable, sf_enable,
+ arm_trace_debug_disable, arm_trace_debug_enable, pwm_normal, pwm_open_drain,
+ standby_dbg, test_loop_dis ]
+
+ drive-strength:
+ enum: [4, 8]
+
+ bias-pull-down: true
+
+ bias-pull-up: true
+
+ bias-disable: true
+
+ input-schmitt-enable: true
+
+ input-schmitt-disable: true
+
+ drive-push-pull: true
+
+ power-source:
+ description: |
+ Valid arguments are described as below:
+ 0: power supply of 1.8V
+ 1: power supply of 3.3V
+ enum: [0, 1]
+
+ realtek,drive-strength-p:
+ description: |
+ Some of pins can be driven using the P-MOS and N-MOS transistor to
+ achieve finer adjustments. The block-diagram representation is as
+ follows:
+ VDD
+ |
+ ||--+
+ +-----o|| P-MOS-FET
+ | ||--+
+ IN --+ +----- out
+ | ||--+
+ +------|| N-MOS-FET
+ ||--+
+ |
+ GND
+ The driving strength of the P-MOS/N-MOS transistors impacts the
+ waveform's rise/fall times. Greater driving strength results in
+ shorter rise/fall times. Each P-MOS and N-MOS transistor offers
+ 8 configurable levels (0 to 7), with higher values indicating
+ greater driving strength, contributing to achieving the desired
+ speed.
+
+ The realtek,drive-strength-p is used to control the driving strength
+ of the P-MOS output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ realtek,drive-strength-n:
+ description: |
+ Similar to the realtek,drive-strength-p, the realtek,drive-strength-n
+ is used to control the driving strength of the N-MOS output.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ realtek,duty-cycle:
+ description: |
+ An integer describing the level to adjust output duty cycle, controlling
+ the proportion of positive and negative waveforms in nanoseconds.
+ Valid arguments are described as below:
+ 0: 0ns
+ 2: + 0.25ns
+ 3: + 0.5ns
+ 4: -0.25ns
+ 5: -0.5ns
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 2, 3, 4, 5 ]
+
+ required:
+ - pins
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ pinctrl@4e000 {
+ compatible = "realtek,rtd1619b-pinctrl";
+ reg = <0x4e000 0x130>;
+
+ emmc-hs200-pins {
+ pins = "emmc_clk",
+ "emmc_cmd",
+ "emmc_data_0",
+ "emmc_data_1",
+ "emmc_data_2",
+ "emmc_data_3",
+ "emmc_data_4",
+ "emmc_data_5",
+ "emmc_data_6",
+ "emmc_data_7";
+ function = "emmc";
+ realtek,drive-strength-p = <0x2>;
+ realtek,drive-strength-n = <0x2>;
+ };
+
+ i2c-0-pins {
+ pins = "gpio_12",
+ "gpio_13";
+ function = "i2c0";
+ drive-strength = <4>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/renesas,pfc.yaml b/sys/contrib/device-tree/Bindings/pinctrl/renesas,pfc.yaml
index 0fc3c0f52c19..181cd1676c0a 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/renesas,pfc.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/renesas,pfc.yaml
@@ -107,7 +107,6 @@ additionalProperties:
Client device subnodes use below standard properties.
properties:
- phandle: true
function: true
groups: true
pins: true
@@ -127,9 +126,6 @@ additionalProperties:
additionalProperties: false
- type: object
- properties:
- phandle: true
-
additionalProperties:
$ref: "#/additionalProperties/anyOf/0"
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza1-ports.yaml b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza1-ports.yaml
index 83800fcf0ce4..2bd7d47d0fdb 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza1-ports.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza1-ports.yaml
@@ -108,7 +108,6 @@ additionalProperties:
Integers values in "pinmux" argument list are assembled as:
((PORT * 16 + PIN) | MUX_FUNC << 16)
- phandle: true
input-enable: true
output-enable: true
@@ -118,9 +117,6 @@ additionalProperties:
additionalProperties: false
- type: object
- properties:
- phandle: true
-
additionalProperties:
$ref: "#/additionalProperties/anyOf/0"
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza2-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza2-pinctrl.yaml
index 37173a64fed2..8b8e4e1a000f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza2-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rza2-pinctrl.yaml
@@ -20,7 +20,7 @@ description:
properties:
compatible:
- const: "renesas,r7s9210-pinctrl" # RZ/A2M
+ const: renesas,r7s9210-pinctrl # RZ/A2M
reg:
maxItems: 1
@@ -37,40 +37,37 @@ properties:
gpio-ranges:
maxItems: 1
-patternProperties:
- "^.*$":
- if:
- type: object
- then:
- allOf:
- - $ref: pincfg-node.yaml#
- - $ref: pinmux-node.yaml#
- description:
- The child nodes of the pin controller designate pins to be used for
- specific peripheral functions or as GPIO.
+additionalProperties:
+ type: object
+
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
- A pin multiplexing sub-node describes how to configure a set of
- (or a single) pin in some desired alternate function mode.
- The values for the pinmux properties are a combination of port name,
- pin number and the desired function index. Use the RZA2_PINMUX macro
- located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
- define these.
- For assigning GPIO pins, use the macro RZA2_PIN also in
- to express the desired port pin.
+ description:
+ The child nodes of the pin controller designate pins to be used for
+ specific peripheral functions or as GPIO.
- properties:
- phandle: true
+ A pin multiplexing sub-node describes how to configure a set of
+ (or a single) pin in some desired alternate function mode.
+ The values for the pinmux properties are a combination of port name,
+ pin number and the desired function index. Use the RZA2_PINMUX macro
+ located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
+ define these.
+ For assigning GPIO pins, use the macro RZA2_PIN also in
+ to express the desired port pin.
- pinmux:
- description:
- Values are constructed from GPIO port number, pin number, and
- alternate function configuration number using the RZA2_PINMUX()
- helper macro in r7s9210-pinctrl.h.
+ properties:
+ pinmux:
+ description:
+ Values are constructed from GPIO port number, pin number, and
+ alternate function configuration number using the RZA2_PINMUX()
+ helper macro in r7s9210-pinctrl.h.
- required:
- - pinmux
+ required:
+ - pinmux
- additionalProperties: false
+ additionalProperties: false
allOf:
- $ref: pinctrl.yaml#
@@ -82,8 +79,6 @@ required:
- '#gpio-cells'
- gpio-ranges
-additionalProperties: false
-
examples:
- |
#include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
index 9ce1a07fc015..d476de82e5c3 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
@@ -25,6 +25,7 @@ properties:
- enum:
- renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five
- renesas,r9a07g044-pinctrl # RZ/G2{L,LC}
+ - renesas,r9a08g045-pinctrl # RZ/G3S
- items:
- enum:
@@ -73,17 +74,32 @@ properties:
additionalProperties:
anyOf:
- type: object
+ additionalProperties: false
allOf:
- $ref: pincfg-node.yaml#
- $ref: pinmux-node.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a08g045-pinctrl
+ then:
+ properties:
+ drive-strength: false
+ output-impedance-ohms: false
+ slew-rate: false
+ else:
+ properties:
+ drive-strength-microamp: false
+
description:
Pin controller client devices use pin configuration subnodes (children
and grandchildren) for desired pin configuration.
Client device subnodes use below standard properties.
properties:
- phandle: true
pinmux:
description:
Values are constructed from GPIO port number, pin number, and
@@ -92,6 +108,10 @@ additionalProperties:
pins: true
drive-strength:
enum: [ 2, 4, 8, 12 ]
+ drive-strength-microamp:
+ enum: [ 1900, 2200, 4000, 4400, 4500, 4700, 5200, 5300, 5700,
+ 5800, 6000, 6050, 6100, 6550, 6800, 7000, 8000, 9000,
+ 10000 ]
output-impedance-ohms:
enum: [ 33, 50, 66, 100 ]
power-source:
@@ -106,9 +126,6 @@ additionalProperties:
line-name: true
- type: object
- properties:
- phandle: true
-
additionalProperties:
$ref: "#/additionalProperties/anyOf/0"
@@ -168,17 +185,17 @@ examples:
sd1_mux {
pinmux = <RZG2L_PORT_PINMUX(19, 0, 1)>, /* CD */
<RZG2L_PORT_PINMUX(19, 1, 1)>; /* WP */
- power-source = <3300>;
+ power-source = <3300>;
};
sd1_data {
pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
- power-source = <3300>;
+ power-source = <3300>;
};
sd1_ctrl {
pins = "SD1_CLK", "SD1_CMD";
- power-source = <3300>;
+ power-source = <3300>;
};
};
};
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml
index 19d4d2facfb4..816688580e33 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml
@@ -74,7 +74,6 @@ additionalProperties:
offset by 10. Additional identifiers are provided to specify the
MDIO source peripheral.
- phandle: true
bias-disable: true
bias-pull-up:
description: Pull up the pin with 50 kOhm
@@ -91,9 +90,6 @@ additionalProperties:
$ref: "#/additionalProperties/anyOf/0"
- type: object
- properties:
- phandle: true
-
additionalProperties:
$ref: "#/additionalProperties/anyOf/0"
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzv2m-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzv2m-pinctrl.yaml
index c87161f2954f..5fa5d31f8866 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzv2m-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzv2m-pinctrl.yaml
@@ -53,6 +53,7 @@ properties:
additionalProperties:
anyOf:
- type: object
+ additionalProperties: false
allOf:
- $ref: pincfg-node.yaml#
- $ref: pinmux-node.yaml#
@@ -63,7 +64,6 @@ additionalProperties:
Client device subnodes use below standard properties.
properties:
- phandle: true
pinmux:
description:
Values are constructed from GPIO port number, pin number, and
@@ -87,9 +87,6 @@ additionalProperties:
line-name: true
- type: object
- properties:
- phandle: true
-
additionalProperties:
$ref: "#/additionalProperties/anyOf/0"
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/rockchip,pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/rockchip,pinctrl.yaml
index 10c335efe619..20e806dce1ec 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/rockchip,pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/rockchip,pinctrl.yaml
@@ -115,6 +115,8 @@ additionalProperties:
type: object
additionalProperties:
type: object
+ additionalProperties: false
+
properties:
rockchip,pins:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml b/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
index 1de91a51234d..4dfb49b0e07f 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
@@ -28,15 +28,27 @@ description: |
properties:
compatible:
- enum:
- - samsung,s3c2410-wakeup-eint
- - samsung,s3c2412-wakeup-eint
- - samsung,s3c64xx-wakeup-eint
- - samsung,s5pv210-wakeup-eint
- - samsung,exynos4210-wakeup-eint
- - samsung,exynos7-wakeup-eint
- - samsung,exynos850-wakeup-eint
- - samsung,exynosautov9-wakeup-eint
+ oneOf:
+ - enum:
+ - samsung,s3c2410-wakeup-eint
+ - samsung,s3c2412-wakeup-eint
+ - samsung,s3c64xx-wakeup-eint
+ - samsung,s5pv210-wakeup-eint
+ - samsung,exynos4210-wakeup-eint
+ - samsung,exynos7-wakeup-eint
+ - samsung,exynosautov920-wakeup-eint
+ - items:
+ - enum:
+ - samsung,exynos5433-wakeup-eint
+ - samsung,exynos7885-wakeup-eint
+ - samsung,exynos850-wakeup-eint
+ - const: samsung,exynos7-wakeup-eint
+ - items:
+ - enum:
+ - google,gs101-wakeup-eint
+ - samsung,exynosautov9-wakeup-eint
+ - const: samsung,exynos850-wakeup-eint
+ - const: samsung,exynos7-wakeup-eint
interrupts:
description:
@@ -79,11 +91,14 @@ allOf:
- if:
properties:
compatible:
- contains:
- enum:
- - samsung,s5pv210-wakeup-eint
- - samsung,exynos4210-wakeup-eint
- - samsung,exynos7-wakeup-eint
+ # Match without "contains", to skip newer variants which are still
+ # compatible with samsung,exynos7-wakeup-eint
+ enum:
+ - samsung,s5pv210-wakeup-eint
+ - samsung,exynos4210-wakeup-eint
+ - samsung,exynos5433-wakeup-eint
+ - samsung,exynos7-wakeup-eint
+ - samsung,exynos7885-wakeup-eint
then:
properties:
interrupts:
@@ -98,7 +113,7 @@ allOf:
contains:
enum:
- samsung,exynos850-wakeup-eint
- - samsung,exynosautov9-wakeup-eint
+ - samsung,exynosautov920-wakeup-eint
then:
properties:
interrupts: false
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl.yaml
index 26614621774a..118549c25976 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/samsung,pinctrl.yaml
@@ -35,6 +35,7 @@ properties:
compatible:
enum:
+ - google,gs101-pinctrl
- samsung,s3c2412-pinctrl
- samsung,s3c2416-pinctrl
- samsung,s3c2440-pinctrl
@@ -53,6 +54,7 @@ properties:
- samsung,exynos7885-pinctrl
- samsung,exynos850-pinctrl
- samsung,exynosautov9-pinctrl
+ - samsung,exynosautov920-pinctrl
- tesla,fsd-pinctrl
interrupts:
@@ -313,7 +315,8 @@ examples:
pinctrl-0 = <&initial_alive>;
wakeup-interrupt-controller {
- compatible = "samsung,exynos7-wakeup-eint";
+ compatible = "samsung,exynos5433-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
};
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/socionext,uniphier-pinctrl.yaml
index a6f34df82e90..880da721a927 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/socionext,uniphier-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/socionext,uniphier-pinctrl.yaml
@@ -32,7 +32,6 @@ additionalProperties:
- $ref: pinmux-node.yaml#
properties:
- phandle: true
function: true
groups: true
pins: true
@@ -49,7 +48,6 @@ additionalProperties:
- $ref: pinmux-node.yaml#
properties:
- phandle: true
function: true
groups: true
pins: true
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/sprd,pinctrl.txt b/sys/contrib/device-tree/Bindings/pinctrl/sprd,pinctrl.txt
index b1cea7a3a071..779b8ef0f6e6 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/sprd,pinctrl.txt
+++ b/sys/contrib/device-tree/Bindings/pinctrl/sprd,pinctrl.txt
@@ -8,7 +8,7 @@ to configure for some global common configuration, such as domain
pad driving level, system control select and so on ("domain pad
driving level": One pin can output 3.0v or 1.8v, depending on the
related domain pad driving selection, if the related domain pad
-slect 3.0v, then the pin can output 3.0v. "system control" is used
+select 3.0v, then the pin can output 3.0v. "system control" is used
to choose one function (like: UART0) for which system, since we
have several systems (AP/CP/CM4) on one SoC.).
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/st,stm32-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/st,stm32-pinctrl.yaml
index 2120ef71a78d..e1eb45a9eda4 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/st,stm32-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/st,stm32-pinctrl.yaml
@@ -48,7 +48,8 @@ properties:
description: Phandle+args to the syscon node which includes IRQ mux selection.
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- - items:
+ - minItems: 2
+ items:
- description: syscon node which includes IRQ mux selection
- description: The offset of the IRQ mux selection register
- description: The field mask of IRQ mux, needed if different of 0xf
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynq-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynq-pinctrl.yaml
index b85f9e36ce4b..d2676f92ef5b 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynq-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynq-pinctrl.yaml
@@ -39,7 +39,7 @@ properties:
phandle to the SLCR.
patternProperties:
- '^(.*-)?(default|gpio)$':
+ '^(.*-)?(default|gpio-grp)$':
type: object
patternProperties:
'^mux':
diff --git a/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml b/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
index 24ad0614e61b..f13d315b5d5e 100644
--- a/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
@@ -31,7 +31,7 @@ properties:
const: xlnx,zynqmp-pinctrl
patternProperties:
- '^(.*-)?(default|gpio)$':
+ '^(.*-)?(default|gpio-grp)$':
type: object
patternProperties:
'^mux':
@@ -273,6 +273,10 @@ patternProperties:
slew-rate:
enum: [0, 1]
+ output-enable:
+ description:
+ This will internally disable the tri-state for MIO pins.
+
drive-strength:
description:
Selects the drive strength for MIO pins, in mA.
diff --git a/sys/contrib/device-tree/Bindings/pmem/pmem-region.txt b/sys/contrib/device-tree/Bindings/pmem/pmem-region.txt
index 5cfa4f016a00..cd79975e85ec 100644
--- a/sys/contrib/device-tree/Bindings/pmem/pmem-region.txt
+++ b/sys/contrib/device-tree/Bindings/pmem/pmem-region.txt
@@ -19,7 +19,7 @@ Required properties:
- compatible = "pmem-region"
- reg = <base, size>;
- The reg property should specificy an address range that is
+ The reg property should specify an address range that is
translatable to a system physical address range. This address
range should be mappable as normal system memory would be
(i.e cacheable).
@@ -30,7 +30,7 @@ Required properties:
node implies no special relationship between the two ranges.
Optional properties:
- - Any relevant NUMA assocativity properties for the target platform.
+ - Any relevant NUMA associativity properties for the target platform.
- volatile; This property indicates that this region is actually
backed by non-persistent memory. This lets the OS know that it
diff --git a/sys/contrib/device-tree/Bindings/power/amlogic,meson-sec-pwrc.yaml b/sys/contrib/device-tree/Bindings/power/amlogic,meson-sec-pwrc.yaml
index eab21bb2050a..dab3d92bc273 100644
--- a/sys/contrib/device-tree/Bindings/power/amlogic,meson-sec-pwrc.yaml
+++ b/sys/contrib/device-tree/Bindings/power/amlogic,meson-sec-pwrc.yaml
@@ -12,7 +12,7 @@ maintainers:
- Jianxin Pan <jianxin.pan@amlogic.com>
description: |+
- Secure Power Domains used in Meson A1/C1/S4 SoCs, and should be the child node
+ Secure Power Domains used in Meson A1/C1/S4 & C3/T7 SoCs, and should be the child node
of secure-monitor.
properties:
@@ -20,6 +20,8 @@ properties:
enum:
- amlogic,meson-a1-pwrc
- amlogic,meson-s4-pwrc
+ - amlogic,c3-pwrc
+ - amlogic,t7-pwrc
"#power-domain-cells":
const: 1
diff --git a/sys/contrib/device-tree/Bindings/power/fsl,scu-pd.yaml b/sys/contrib/device-tree/Bindings/power/fsl,scu-pd.yaml
index 407b7cfec783..7a0f1a400868 100644
--- a/sys/contrib/device-tree/Bindings/power/fsl,scu-pd.yaml
+++ b/sys/contrib/device-tree/Bindings/power/fsl,scu-pd.yaml
@@ -20,6 +20,7 @@ properties:
compatible:
items:
- enum:
+ - fsl,imx8dl-scu-pd
- fsl,imx8qm-scu-pd
- fsl,imx8qxp-scu-pd
- const: fsl,scu-pd
diff --git a/sys/contrib/device-tree/Bindings/power/mediatek,power-controller.yaml b/sys/contrib/device-tree/Bindings/power/mediatek,power-controller.yaml
index c9acef80f452..8985e2df8a56 100644
--- a/sys/contrib/device-tree/Bindings/power/mediatek,power-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/power/mediatek,power-controller.yaml
@@ -31,6 +31,7 @@ properties:
- mediatek,mt8188-power-controller
- mediatek,mt8192-power-controller
- mediatek,mt8195-power-controller
+ - mediatek,mt8365-power-controller
'#power-domain-cells':
const: 1
@@ -88,6 +89,7 @@ $defs:
"include/dt-bindings/power/mediatek,mt8188-power.h" - for MT8188 type power domain.
"include/dt-bindings/power/mt8192-power.h" - for MT8192 type power domain.
"include/dt-bindings/power/mt8195-power.h" - for MT8195 type power domain.
+ "include/dt-bindings/power/mediatek,mt8365-power.h" - for MT8365 type power domain.
maxItems: 1
clocks:
@@ -115,6 +117,10 @@ $defs:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the INFRACFG register range.
+ mediatek,infracfg-nao:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle to the device containing the INFRACFG-NAO register range.
+
mediatek,smi:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the SMI register range.
diff --git a/sys/contrib/device-tree/Bindings/power/power-domain.yaml b/sys/contrib/device-tree/Bindings/power/power-domain.yaml
index d1235e562041..8fdb529d560b 100644
--- a/sys/contrib/device-tree/Bindings/power/power-domain.yaml
+++ b/sys/contrib/device-tree/Bindings/power/power-domain.yaml
@@ -13,8 +13,9 @@ maintainers:
description: |+
System on chip designs are often divided into multiple PM domains that can be
- used for power gating of selected IP blocks for power saving by reduced leakage
- current.
+ used for power gating of selected IP blocks for power saving by reduced
+ leakage current. Moreover, in some cases the similar PM domains may also be
+ capable of scaling performance for a group of IP blocks.
This device tree binding can be used to bind PM domain consumer devices with
their PM domains provided by PM domain providers. A PM domain provider can be
@@ -25,7 +26,7 @@ description: |+
properties:
$nodename:
- pattern: "^(power-controller|power-domain)([@-].*)?$"
+ pattern: "^(power-controller|power-domain|performance-domain)([@-].*)?$"
domain-idle-states:
$ref: /schemas/types.yaml#/definitions/phandle-array
@@ -44,11 +45,11 @@ properties:
operating-points-v2:
description:
- Phandles to the OPP tables of power domains provided by a power domain
- provider. If the provider provides a single power domain only or all
- the power domains provided by the provider have identical OPP tables,
- then this shall contain a single phandle. Refer to ../opp/opp-v2-base.yaml
- for more information.
+ Phandles to the OPP tables of power domains that are capable of scaling
+ performance, provided by a power domain provider. If the provider provides
+ a single power domain only or all the power domains provided by the
+ provider have identical OPP tables, then this shall contain a single
+ phandle. Refer to ../opp/opp-v2-base.yaml for more information.
"#power-domain-cells":
description:
diff --git a/sys/contrib/device-tree/Bindings/power/qcom,rpmpd.yaml b/sys/contrib/device-tree/Bindings/power/qcom,rpmpd.yaml
index f9c211a9a938..2ff246cf8b81 100644
--- a/sys/contrib/device-tree/Bindings/power/qcom,rpmpd.yaml
+++ b/sys/contrib/device-tree/Bindings/power/qcom,rpmpd.yaml
@@ -15,41 +15,52 @@ description:
properties:
compatible:
- enum:
- - qcom,mdm9607-rpmpd
- - qcom,msm8226-rpmpd
- - qcom,msm8909-rpmpd
- - qcom,msm8916-rpmpd
- - qcom,msm8939-rpmpd
- - qcom,msm8953-rpmpd
- - qcom,msm8976-rpmpd
- - qcom,msm8994-rpmpd
- - qcom,msm8996-rpmpd
- - qcom,msm8998-rpmpd
- - qcom,qcm2290-rpmpd
- - qcom,qcs404-rpmpd
- - qcom,qdu1000-rpmhpd
- - qcom,sa8155p-rpmhpd
- - qcom,sa8540p-rpmhpd
- - qcom,sa8775p-rpmhpd
- - qcom,sdm660-rpmpd
- - qcom,sc7180-rpmhpd
- - qcom,sc7280-rpmhpd
- - qcom,sc8180x-rpmhpd
- - qcom,sc8280xp-rpmhpd
- - qcom,sdm670-rpmhpd
- - qcom,sdm845-rpmhpd
- - qcom,sdx55-rpmhpd
- - qcom,sdx65-rpmhpd
- - qcom,sm6115-rpmpd
- - qcom,sm6125-rpmpd
- - qcom,sm6350-rpmhpd
- - qcom,sm6375-rpmpd
- - qcom,sm8150-rpmhpd
- - qcom,sm8250-rpmhpd
- - qcom,sm8350-rpmhpd
- - qcom,sm8450-rpmhpd
- - qcom,sm8550-rpmhpd
+ oneOf:
+ - enum:
+ - qcom,mdm9607-rpmpd
+ - qcom,msm8226-rpmpd
+ - qcom,msm8909-rpmpd
+ - qcom,msm8916-rpmpd
+ - qcom,msm8917-rpmpd
+ - qcom,msm8939-rpmpd
+ - qcom,msm8953-rpmpd
+ - qcom,msm8976-rpmpd
+ - qcom,msm8994-rpmpd
+ - qcom,msm8996-rpmpd
+ - qcom,msm8998-rpmpd
+ - qcom,qcm2290-rpmpd
+ - qcom,qcs404-rpmpd
+ - qcom,qdu1000-rpmhpd
+ - qcom,qm215-rpmpd
+ - qcom,sa8155p-rpmhpd
+ - qcom,sa8540p-rpmhpd
+ - qcom,sa8775p-rpmhpd
+ - qcom,sc7180-rpmhpd
+ - qcom,sc7280-rpmhpd
+ - qcom,sc8180x-rpmhpd
+ - qcom,sc8280xp-rpmhpd
+ - qcom,sdm660-rpmpd
+ - qcom,sdm670-rpmhpd
+ - qcom,sdm845-rpmhpd
+ - qcom,sdx55-rpmhpd
+ - qcom,sdx65-rpmhpd
+ - qcom,sdx75-rpmhpd
+ - qcom,sm6115-rpmpd
+ - qcom,sm6125-rpmpd
+ - qcom,sm6350-rpmhpd
+ - qcom,sm6375-rpmpd
+ - qcom,sm7150-rpmhpd
+ - qcom,sm8150-rpmhpd
+ - qcom,sm8250-rpmhpd
+ - qcom,sm8350-rpmhpd
+ - qcom,sm8450-rpmhpd
+ - qcom,sm8550-rpmhpd
+ - qcom,sm8650-rpmhpd
+ - qcom,x1e80100-rpmhpd
+ - items:
+ - enum:
+ - qcom,msm8937-rpmpd
+ - const: qcom,msm8917-rpmpd
'#power-domain-cells':
const: 1
diff --git a/sys/contrib/device-tree/Bindings/power/renesas,sysc-rmobile.yaml b/sys/contrib/device-tree/Bindings/power/renesas,sysc-rmobile.yaml
index 559718997de7..fba6914ec40d 100644
--- a/sys/contrib/device-tree/Bindings/power/renesas,sysc-rmobile.yaml
+++ b/sys/contrib/device-tree/Bindings/power/renesas,sysc-rmobile.yaml
@@ -58,7 +58,7 @@ $defs:
pd-node:
type: object
description:
- PM domain node representing a PM domain. This node hould be named by
+ PM domain node representing a PM domain. This node should be named by
the real power area name, and thus its name should be unique.
properties:
diff --git a/sys/contrib/device-tree/Bindings/power/reset/gpio-poweroff.yaml b/sys/contrib/device-tree/Bindings/power/reset/gpio-poweroff.yaml
index 45d66c775115..a4b437fce37c 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/gpio-poweroff.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/gpio-poweroff.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/gpio-poweroff.yaml#
@@ -18,6 +18,9 @@ description: >
Finally the operating system assumes the power off failed if
the system is still running after waiting some time (timeout-ms).
+allOf:
+ - $ref: restart-handler.yaml#
+
properties:
compatible:
const: gpio-poweroff
@@ -40,6 +43,9 @@ properties:
default: 100
description: Delay to wait after driving gpio inactive
+ priority:
+ default: 0
+
timeout-ms:
default: 3000
description: Time to wait before assuming the power off sequence failed.
diff --git a/sys/contrib/device-tree/Bindings/power/reset/gpio-restart.yaml b/sys/contrib/device-tree/Bindings/power/reset/gpio-restart.yaml
index d3d18e0f5db3..53535de0d41c 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/gpio-restart.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/gpio-restart.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/gpio-restart.yaml#
diff --git a/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml b/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml
index 14a262bcbf7c..627f8a6078c2 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml
@@ -28,17 +28,15 @@ properties:
items:
- const: reboot-mode
-patternProperties:
- "^mode-.+":
- $ref: /schemas/types.yaml#/definitions/uint32
- description: Vendor-specific mode value written to the mode register
+allOf:
+ - $ref: reboot-mode.yaml#
required:
- compatible
- nvmem-cells
- nvmem-cell-names
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml b/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml
index 5e460128b0d1..fc8105a7b9b2 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml
@@ -111,21 +111,24 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/spmi/spmi.h>
- spmi_bus: spmi@c440000 {
+
+ spmi@c440000 {
reg = <0x0c440000 0x1100>;
#address-cells = <2>;
#size-cells = <0>;
- pmk8350: pmic@0 {
+
+ pmic@0 {
reg = <0x0 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
- pmk8350_pon: pon_hlos@1300 {
- reg = <0x1300>;
+
+ pon@800 {
compatible = "qcom,pm8998-pon";
+ reg = <0x800>;
pwrkey {
compatible = "qcom,pm8941-pwrkey";
- interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >;
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_POWER>;
diff --git a/sys/contrib/device-tree/Bindings/power/reset/restart-handler.yaml b/sys/contrib/device-tree/Bindings/power/reset/restart-handler.yaml
index f2ffdd29d52a..965a834a3dbe 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/restart-handler.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/restart-handler.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/restart-handler.yaml#
diff --git a/sys/contrib/device-tree/Bindings/power/reset/syscon-poweroff.yaml b/sys/contrib/device-tree/Bindings/power/reset/syscon-poweroff.yaml
index 3412fe7e1e80..d342b113fca2 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/syscon-poweroff.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/syscon-poweroff.yaml
@@ -15,6 +15,9 @@ description: |+
defined by the register map pointed by syscon reference plus the offset
with the value and mask defined in the poweroff node.
Default will be little endian mode, 32 bit access only.
+ The SYSCON register map is normally retrieved from the parental dt-node. So
+ the SYSCON poweroff node should be represented as a sub-node of a "syscon",
+ "simple-mfd" node.
properties:
compatible:
@@ -30,7 +33,10 @@ properties:
regmap:
$ref: /schemas/types.yaml#/definitions/phandle
- description: Phandle to the register map node.
+ deprecated: true
+ description:
+ Phandle to the register map node. This property is deprecated in favor of
+ the syscon-poweroff node being a child of a system controller node.
value:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -38,7 +44,6 @@ properties:
required:
- compatible
- - regmap
- offset
additionalProperties: false
@@ -56,7 +61,6 @@ examples:
- |
poweroff {
compatible = "syscon-poweroff";
- regmap = <&regmapnode>;
offset = <0x0>;
mask = <0x7a>;
};
diff --git a/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml b/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml
index 9b1ffceefe3d..b6acff199cde 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/syscon-reboot-mode.yaml
@@ -29,12 +29,10 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description: Offset in the register map for the mode register (in bytes)
-patternProperties:
- "^mode-.+":
- $ref: /schemas/types.yaml#/definitions/uint32
- description: Vendor-specific mode value written to the mode register
+allOf:
+ - $ref: reboot-mode.yaml#
-additionalProperties: false
+unevaluatedProperties: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml b/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml
index 45792e216981..799831636194 100644
--- a/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml
+++ b/sys/contrib/device-tree/Bindings/power/reset/xlnx,zynqmp-power.yaml
@@ -57,7 +57,7 @@ examples:
firmware {
zynqmp-firmware {
- zynqmp-power {
+ power-management {
compatible = "xlnx,zynqmp-power";
interrupts = <0 35 4>;
};
@@ -70,7 +70,7 @@ examples:
firmware {
zynqmp-firmware {
- zynqmp-power {
+ power-management {
compatible = "xlnx,zynqmp-power";
interrupt-parent = <&gic>;
interrupts = <0 35 4>;
diff --git a/sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml b/sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml
index d3ebc9de8c0b..131b7e57d22f 100644
--- a/sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml
+++ b/sys/contrib/device-tree/Bindings/power/supply/bq24190.yaml
@@ -20,6 +20,7 @@ properties:
- ti,bq24192
- ti,bq24192i
- ti,bq24196
+ - ti,bq24296
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/power/supply/bq256xx.yaml b/sys/contrib/device-tree/Bindings/power/supply/bq256xx.yaml
index 4fe9c3705265..a76afe3ca299 100644
--- a/sys/contrib/device-tree/Bindings/power/supply/bq256xx.yaml
+++ b/sys/contrib/device-tree/Bindings/power/supply/bq256xx.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2020 Texas Instruments Incorporated
%YAML 1.2
---
diff --git a/sys/contrib/device-tree/Bindings/power/supply/maxim,max17040.yaml b/sys/contrib/device-tree/Bindings/power/supply/maxim,max17040.yaml
index 2627cd3eed83..377cbb2c2c1f 100644
--- a/sys/contrib/device-tree/Bindings/power/supply/maxim,max17040.yaml
+++ b/sys/contrib/device-tree/Bindings/power/supply/maxim,max17040.yaml
@@ -55,6 +55,14 @@ properties:
interrupts:
maxItems: 1
+ io-channels:
+ items:
+ - description: battery temperature
+
+ io-channel-names:
+ items:
+ - const: temp
+
wakeup-source:
type: boolean
description: |
@@ -95,3 +103,26 @@ examples:
wakeup-source;
};
};
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fuel-gauge@36 {
+ compatible = "maxim,max17043";
+ reg = <0x36>;
+
+ interrupt-parent = <&gpio>;
+ interrupts = <144 IRQ_TYPE_EDGE_FALLING>;
+
+ monitored-battery = <&battery>;
+ power-supplies = <&charger>;
+
+ io-channels = <&adc 8>;
+ io-channel-names = "temp";
+
+ maxim,alert-low-soc-level = <10>;
+ wakeup-source;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/power/supply/mitsumi,mm8013.yaml b/sys/contrib/device-tree/Bindings/power/supply/mitsumi,mm8013.yaml
new file mode 100644
index 000000000000..6865640cbdfa
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/power/supply/mitsumi,mm8013.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/mitsumi,mm8013.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mitsumi MM8013 fuel gauge
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+allOf:
+ - $ref: power-supply.yaml#
+
+properties:
+ compatible:
+ const: mitsumi,mm8013
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fuel-gauge@55 {
+ compatible = "mitsumi,mm8013";
+ reg = <0x55>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-bms-vm.yaml b/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-bms-vm.yaml
new file mode 100644
index 000000000000..ad764e69ab57
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-bms-vm.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/qcom,pm8916-bms-vm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Voltage Mode BMS
+
+maintainers:
+ - Nikita Travkin <nikita@trvn.ru>
+
+description:
+ Voltage Mode BMS is a hardware block found in some Qualcomm PMICs
+ such as pm8916. This block performs battery voltage monitoring.
+
+allOf:
+ - $ref: power-supply.yaml#
+
+properties:
+ compatible:
+ const: qcom,pm8916-bms-vm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ items:
+ - description: BMS FSM left S3 mode
+ - description: BMS FSM entered S2 mode
+ - description: OCV measured in S3 mode
+ - description: OCV below threshold
+ - description: FIFO update done
+ - description: BMS FSM switched state
+
+ interrupt-names:
+ items:
+ - const: cv_leave
+ - const: cv_enter
+ - const: ocv_good
+ - const: ocv_thr
+ - const: fifo
+ - const: state_chg
+
+ monitored-battery: true
+
+ power-supplies: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+ - monitored-battery
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ battery@4000 {
+ compatible = "qcom,pm8916-bms-vm";
+ reg = <0x4000>;
+ interrupts = <0x0 0x40 0 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 1 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 2 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 3 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 4 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 5 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "cv_leave",
+ "cv_enter",
+ "ocv_good",
+ "ocv_thr",
+ "fifo",
+ "state_chg";
+
+ monitored-battery = <&battery>;
+ power-supplies = <&pm8916_charger>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-lbc.yaml b/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-lbc.yaml
new file mode 100644
index 000000000000..cdf14e5ed119
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/power/supply/qcom,pm8916-lbc.yaml
@@ -0,0 +1,128 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/qcom,pm8916-lbc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Linear Battery Charger
+
+maintainers:
+ - Nikita Travkin <nikita@trvn.ru>
+
+description:
+ Linear Battery Charger hardware block, found in some Qualcomm PMICs
+ such as pm8916. Implements a simple, autonomous CC/CV charger.
+
+allOf:
+ - $ref: power-supply.yaml#
+
+properties:
+ compatible:
+ const: qcom,pm8916-lbc
+
+ reg:
+ items:
+ - description: Charger
+ - description: Battery
+ - description: USB
+ - description: MISC
+
+ reg-names:
+ items:
+ - const: chgr
+ - const: bat_if
+ - const: usb
+ - const: misc
+
+ interrupts:
+ items:
+ - description: Battery detection
+ - description: Fast charging
+ - description: Charging failed
+ - description: Charging done
+ - description: Battery present
+ - description: Battery temperature OK
+ - description: USB coarse detection
+ - description: USB IN valid
+ - description: Charger gone
+ - description: Overtemperature
+
+ interrupt-names:
+ items:
+ - const: vbat_det
+ - const: fast_chg
+ - const: chg_fail
+ - const: chg_done
+ - const: bat_pres
+ - const: temp_ok
+ - const: coarse_det
+ - const: usb_vbus
+ - const: chg_gone
+ - const: overtemp
+
+ qcom,fast-charge-safe-voltage:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 4000000
+ maximum: 4775000
+ description:
+ Maximum safe battery voltage in uV; May be pre-set by bootloader,
+ in which case, setting this will harmlessly fail.
+
+ qcom,fast-charge-safe-current:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 90000
+ maximum: 1440000
+ description:
+ Maximum safe battery charge current in uA; May be pre-set by
+ bootloader, in which case setting this will harmlessly fail.
+
+ monitored-battery: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+ - qcom,fast-charge-safe-voltage
+ - qcom,fast-charge-safe-current
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ charger@1000 {
+ compatible = "qcom,pm8916-lbc";
+ reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>;
+ reg-names = "chgr", "bat_if", "usb", "misc";
+
+ interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "vbat_det",
+ "fast_chg",
+ "chg_fail",
+ "chg_done",
+ "bat_pres",
+ "temp_ok",
+ "coarse_det",
+ "usb_vbus",
+ "chg_gone",
+ "overtemp";
+ monitored-battery = <&battery>;
+
+ qcom,fast-charge-safe-current = <900000>;
+ qcom,fast-charge-safe-voltage = <4300000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/power/supply/richtek,rt9455.yaml b/sys/contrib/device-tree/Bindings/power/supply/richtek,rt9455.yaml
index 07e38be39f1b..89f9603499b4 100644
--- a/sys/contrib/device-tree/Bindings/power/supply/richtek,rt9455.yaml
+++ b/sys/contrib/device-tree/Bindings/power/supply/richtek,rt9455.yaml
@@ -79,10 +79,10 @@ examples:
interrupt-parent = <&gpio1>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
- richtek,output-charge-current = <500000>;
- richtek,end-of-charge-percentage = <10>;
- richtek,battery-regulation-voltage = <4200000>;
- richtek,boost-output-voltage = <5050000>;
+ richtek,output-charge-current = <500000>;
+ richtek,end-of-charge-percentage = <10>;
+ richtek,battery-regulation-voltage = <4200000>;
+ richtek,boost-output-voltage = <5050000>;
richtek,min-input-voltage-regulation = <4500000>;
richtek,avg-input-current-regulation = <500000>;
diff --git a/sys/contrib/device-tree/Bindings/power/supply/sbs,sbs-manager.yaml b/sys/contrib/device-tree/Bindings/power/supply/sbs,sbs-manager.yaml
index 99f506d6b0a0..2e21846463ba 100644
--- a/sys/contrib/device-tree/Bindings/power/supply/sbs,sbs-manager.yaml
+++ b/sys/contrib/device-tree/Bindings/power/supply/sbs,sbs-manager.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/power/supply/sbs,sbs-manager.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: SBS compliant manger
+title: SBS compliant manager
maintainers:
- Sebastian Reichel <sre@kernel.org>
@@ -47,6 +47,12 @@ patternProperties:
"^i2c@[1-4]$":
type: object
$ref: /schemas/i2c/i2c-controller.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ minimum: 1
+ maximum: 4
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/power/wakeup-source.txt b/sys/contrib/device-tree/Bindings/power/wakeup-source.txt
index 697333a56d5e..75bc20b95688 100644
--- a/sys/contrib/device-tree/Bindings/power/wakeup-source.txt
+++ b/sys/contrib/device-tree/Bindings/power/wakeup-source.txt
@@ -3,16 +3,20 @@ Specifying wakeup capability for devices
Any device nodes
----------------
-Nodes that describe devices which has wakeup capability must contain an
+Nodes that describe devices which have wakeup capability may contain a
"wakeup-source" boolean property.
-Also, if device is marked as a wakeup source, then all the primary
-interrupt(s) can be used as wakeup interrupt(s).
+If the device is marked as a wakeup-source, interrupt wake capability depends
+on the device specific "interrupt-names" property. If no interrupts are labeled
+as wake capable, then it is up to the device to determine which interrupts can
+wake the system.
-However if the devices have dedicated interrupt as the wakeup source
-then they need to specify/identify the same using device specific
-interrupt name. In such cases only that interrupt can be used as wakeup
-interrupt.
+However if a device has a dedicated interrupt as the wakeup source, then it
+needs to specify/identify it using a device specific interrupt name. In such
+cases only that interrupt can be used as a wakeup interrupt.
+
+While various legacy interrupt names exist, new devices should use "wakeup" as
+the canonical interrupt name.
List of legacy properties and respective binding document
---------------------------------------------------------
diff --git a/sys/contrib/device-tree/Bindings/powerpc/fsl/cpus.txt b/sys/contrib/device-tree/Bindings/powerpc/fsl/cpus.txt
index 801c66069121..4787db8de23f 100644
--- a/sys/contrib/device-tree/Bindings/powerpc/fsl/cpus.txt
+++ b/sys/contrib/device-tree/Bindings/powerpc/fsl/cpus.txt
@@ -28,6 +28,6 @@ PROPERTIES
Snoop ID Port Mapping registers, which are part of the CoreNet
Coherency fabric (CCF), provide a CoreNet Coherency Subdomain
ID/CoreNet Snoop ID to cpu mapping functions. Certain bits from
- these registers should be set if the coresponding CPU should be
+ these registers should be set if the corresponding CPU should be
snooped. This property defines a bitmask which selects the bit
that should be set if this cpu should be snooped.
diff --git a/sys/contrib/device-tree/Bindings/powerpc/fsl/dcsr.txt b/sys/contrib/device-tree/Bindings/powerpc/fsl/dcsr.txt
index 4b01e1afafda..62744afb5b75 100644
--- a/sys/contrib/device-tree/Bindings/powerpc/fsl/dcsr.txt
+++ b/sys/contrib/device-tree/Bindings/powerpc/fsl/dcsr.txt
@@ -185,10 +185,10 @@ PROPERTIES
with distinct functionality.
The first register range describes the CoreNet Debug Controller
- functionalty to perform transaction and transaction attribute matches.
+ functionality to perform transaction and transaction attribute matches.
The second register range describes the CoreNet Debug Controller
- functionalty to trigger event notifications and debug traces.
+ functionality to trigger event notifications and debug traces.
EXAMPLE
dcsr-corenet {
diff --git a/sys/contrib/device-tree/Bindings/powerpc/fsl/raideng.txt b/sys/contrib/device-tree/Bindings/powerpc/fsl/raideng.txt
index 4ad29b9ac2ac..ea902bc5873d 100644
--- a/sys/contrib/device-tree/Bindings/powerpc/fsl/raideng.txt
+++ b/sys/contrib/device-tree/Bindings/powerpc/fsl/raideng.txt
@@ -60,7 +60,7 @@ Optional property:
- fsl,liodn: Specifies the LIODN to be used for Job Ring. This
property is normally set by firmware. Value
is of 12-bits which is the LIODN number for this JR.
- This property is used by the IOMMU (PAMU) to distinquish
+ This property is used by the IOMMU (PAMU) to distinguish
transactions from this JR and than be able to do address
translation & protection accordingly.
diff --git a/sys/contrib/device-tree/Bindings/powerpc/nintendo/gamecube.txt b/sys/contrib/device-tree/Bindings/powerpc/nintendo/gamecube.txt
index b558585b1aaf..3826bd1219d1 100644
--- a/sys/contrib/device-tree/Bindings/powerpc/nintendo/gamecube.txt
+++ b/sys/contrib/device-tree/Bindings/powerpc/nintendo/gamecube.txt
@@ -42,7 +42,7 @@ Nintendo GameCube device tree
- compatible : should be "nintendo,flipper-pic"
-1.c) The Digital Signal Procesor (DSP) node
+1.c) The Digital Signal Processor (DSP) node
Represents the digital signal processor interface, designed to offload
audio related tasks.
diff --git a/sys/contrib/device-tree/Bindings/powerpc/nintendo/wii.txt b/sys/contrib/device-tree/Bindings/powerpc/nintendo/wii.txt
index 3ff6ebbb4998..6f69a9dfe198 100644
--- a/sys/contrib/device-tree/Bindings/powerpc/nintendo/wii.txt
+++ b/sys/contrib/device-tree/Bindings/powerpc/nintendo/wii.txt
@@ -53,7 +53,7 @@ Nintendo Wii device tree
- compatible : should be "nintendo,flipper-pic"
- interrupt-controller
-1.c) The Digital Signal Procesor (DSP) node
+1.c) The Digital Signal Processor (DSP) node
Represents the digital signal processor interface, designed to offload
audio related tasks.
diff --git a/sys/contrib/device-tree/Bindings/pps/pps-gpio.yaml b/sys/contrib/device-tree/Bindings/pps/pps-gpio.yaml
new file mode 100644
index 000000000000..fd4adfa8d2d4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pps/pps-gpio.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pps/pps-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PPS Signal via GPIO
+
+maintainers:
+ - Fabio Estevam <festevam@gmail.com>
+
+properties:
+ compatible:
+ const: pps-gpio
+
+ gpios:
+ description: The GPIO that provides the PPS signal.
+ maxItems: 1
+
+ echo-gpios:
+ description: The GPIO that provides the PPS ECHO signal.
+ maxItems: 1
+
+ echo-active-ms:
+ description: Duration in ms of the active portion of the echo pulse.
+
+ assert-falling-edge:
+ description: Indicates a falling edge assert, when present. Rising edge if absent.
+ type: boolean
+
+required:
+ - compatible
+ - gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ pps {
+ compatible = "pps-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pps>;
+ gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+ assert-falling-edge;
+ echo-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+ echo-active-ms = <100>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/pwm/brcm,kona-pwm.yaml b/sys/contrib/device-tree/Bindings/pwm/brcm,kona-pwm.yaml
new file mode 100644
index 000000000000..e86c8053b366
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pwm/brcm,kona-pwm.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/brcm,kona-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Kona family PWM controller
+
+description:
+ This controller has 6 channels.
+
+maintainers:
+ - Florian Fainelli <f.fainelli@gmail.com>
+
+allOf:
+ - $ref: pwm.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - brcm,bcm11351-pwm
+ - const: brcm,kona-pwm
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ '#pwm-cells':
+ const: 3
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/bcm281xx.h>
+
+ pwm@3e01a000 {
+ compatible = "brcm,bcm11351-pwm", "brcm,kona-pwm";
+ reg = <0x3e01a000 0xcc>;
+ clocks = <&slave_ccu BCM281XX_SLAVE_CCU_PWM>;
+ #pwm-cells = <3>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/pwm/imx-pwm.yaml b/sys/contrib/device-tree/Bindings/pwm/imx-pwm.yaml
index c01dff3b7f84..a84a240a61dc 100644
--- a/sys/contrib/device-tree/Bindings/pwm/imx-pwm.yaml
+++ b/sys/contrib/device-tree/Bindings/pwm/imx-pwm.yaml
@@ -14,12 +14,10 @@ allOf:
properties:
"#pwm-cells":
- description: |
- Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
- in this directory for a description of the cells format.
- enum:
- - 2
- - 3
+ description:
+ The only third cell flag supported by this binding is
+ PWM_POLARITY_INVERTED. fsl,imx1-pwm does not support this flags.
+ const: 3
compatible:
oneOf:
diff --git a/sys/contrib/device-tree/Bindings/pwm/mediatek,pwm-disp.yaml b/sys/contrib/device-tree/Bindings/pwm/mediatek,pwm-disp.yaml
index 153e146df7d4..afcdeed4e88a 100644
--- a/sys/contrib/device-tree/Bindings/pwm/mediatek,pwm-disp.yaml
+++ b/sys/contrib/device-tree/Bindings/pwm/mediatek,pwm-disp.yaml
@@ -8,7 +8,6 @@ title: MediaTek DISP_PWM Controller
maintainers:
- Jitao Shi <jitao.shi@mediatek.com>
- - Xinlei Lee <xinlei.lee@mediatek.com>
allOf:
- $ref: pwm.yaml#
diff --git a/sys/contrib/device-tree/Bindings/pwm/mxs-pwm.yaml b/sys/contrib/device-tree/Bindings/pwm/mxs-pwm.yaml
index 6ffbed204c25..8f50e23ca8c9 100644
--- a/sys/contrib/device-tree/Bindings/pwm/mxs-pwm.yaml
+++ b/sys/contrib/device-tree/Bindings/pwm/mxs-pwm.yaml
@@ -15,12 +15,19 @@ allOf:
properties:
compatible:
- enum:
- - fsl,imx23-pwm
+ oneOf:
+ - const: fsl,imx23-pwm
+ - items:
+ - enum:
+ - fsl,imx28-pwm
+ - const: fsl,imx23-pwm
reg:
maxItems: 1
+ clocks:
+ maxItems: 1
+
"#pwm-cells":
const: 3
@@ -31,6 +38,7 @@ properties:
required:
- compatible
- reg
+ - clocks
- fsl,pwm-number
additionalProperties: false
@@ -40,6 +48,7 @@ examples:
pwm@80064000 {
compatible = "fsl,imx23-pwm";
reg = <0x80064000 0x2000>;
+ clocks = <&clks 30>;
#pwm-cells = <3>;
fsl,pwm-number = <8>;
};
diff --git a/sys/contrib/device-tree/Bindings/pwm/pwm-rockchip.yaml b/sys/contrib/device-tree/Bindings/pwm/pwm-rockchip.yaml
index f2d1dc7e7b3f..65bfb492b3a4 100644
--- a/sys/contrib/device-tree/Bindings/pwm/pwm-rockchip.yaml
+++ b/sys/contrib/device-tree/Bindings/pwm/pwm-rockchip.yaml
@@ -32,6 +32,7 @@ properties:
- rockchip,rk3308-pwm
- rockchip,rk3568-pwm
- rockchip,rk3588-pwm
+ - rockchip,rv1126-pwm
- const: rockchip,rk3328-pwm
reg:
diff --git a/sys/contrib/device-tree/Bindings/pwm/pwm-samsung.yaml b/sys/contrib/device-tree/Bindings/pwm/pwm-samsung.yaml
index fe603fb1b2cc..17a2b927af33 100644
--- a/sys/contrib/device-tree/Bindings/pwm/pwm-samsung.yaml
+++ b/sys/contrib/device-tree/Bindings/pwm/pwm-samsung.yaml
@@ -20,12 +20,21 @@ description: |+
properties:
compatible:
- enum:
- - samsung,s3c2410-pwm # 16-bit, S3C24xx
- - samsung,s3c6400-pwm # 32-bit, S3C64xx
- - samsung,s5p6440-pwm # 32-bit, S5P64x0
- - samsung,s5pc100-pwm # 32-bit, S5PC100, S5PV210, Exynos4210 rev0 SoCs
- - samsung,exynos4210-pwm # 32-bit, Exynos
+ oneOf:
+ - enum:
+ - samsung,s3c2410-pwm # 16-bit, S3C24xx
+ - samsung,s3c6400-pwm # 32-bit, S3C64xx
+ - samsung,s5p6440-pwm # 32-bit, S5P64x0
+ - samsung,s5pc100-pwm # 32-bit, S5PC100, S5PV210, Exynos4210 rev0 SoCs
+ - samsung,exynos4210-pwm # 32-bit, Exynos
+ - items:
+ - enum:
+ - samsung,exynos5433-pwm
+ - samsung,exynos7-pwm
+ - samsung,exynosautov9-pwm
+ - samsung,exynosautov920-pwm
+ - tesla,fsd-pwm
+ - const: samsung,exynos4210-pwm
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/pwm/snps,dw-apb-timers-pwm2.yaml b/sys/contrib/device-tree/Bindings/pwm/snps,dw-apb-timers-pwm2.yaml
index 9aabdb373afa..4d0b5964443d 100644
--- a/sys/contrib/device-tree/Bindings/pwm/snps,dw-apb-timers-pwm2.yaml
+++ b/sys/contrib/device-tree/Bindings/pwm/snps,dw-apb-timers-pwm2.yaml
@@ -18,7 +18,7 @@ description:
The IP block has a version register so this can be used for detection
instead of having to encode the IP version number in the device tree
- comaptible.
+ compatible.
allOf:
- $ref: pwm.yaml#
diff --git a/sys/contrib/device-tree/Bindings/pwm/ti,omap-dmtimer-pwm.yaml b/sys/contrib/device-tree/Bindings/pwm/ti,omap-dmtimer-pwm.yaml
new file mode 100644
index 000000000000..1e8e094aad74
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/pwm/ti,omap-dmtimer-pwm.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/ti,omap-dmtimer-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI dual mode timer PWM controller
+
+maintainers:
+ - Tony Lindgren <tony@atomide.com>
+
+description:
+ TI dual mode timer instances have an IO pin for PWM capability
+
+allOf:
+ - $ref: pwm.yaml#
+
+properties:
+ compatible:
+ const: ti,omap-dmtimer-pwm
+
+ "#pwm-cells":
+ const: 3
+
+ ti,timers:
+ description: Timer instance phandle for the PWM
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ ti,prescaler:
+ description: |
+ Legacy clock prescaler for timer. The timer counter is prescaled
+ with 2^n where n is the prescaler.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ deprecated: true
+
+ ti,clock-source:
+ description: |
+ Legacy clock for timer, please use assigned-clocks instead.
+ 0x00 - high-frequency system clock (timer_sys_ck)
+ 0x01 - 32-kHz always-on clock (timer_32k_ck)
+ 0x02 - external clock (timer_ext_ck, OMAP2 only)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2 ]
+ deprecated: true
+
+required:
+ - compatible
+ - ti,timers
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ pwm9: pwm {
+ compatible = "ti,omap-dmtimer-pwm";
+ ti,timers = <&timer9>;
+ #pwm-cells = <3>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/regulator/active-semi,act8846.yaml b/sys/contrib/device-tree/Bindings/regulator/active-semi,act8846.yaml
index 3725348bb235..02f45b5834d0 100644
--- a/sys/contrib/device-tree/Bindings/regulator/active-semi,act8846.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/active-semi,act8846.yaml
@@ -28,75 +28,37 @@ properties:
the VSEL pin is assumed to be low.
type: boolean
- regulators:
- type: object
- additionalProperties: false
+ inl1-supply:
+ description: Handle to the INL1 input supply (REG5-7)
- properties:
- REG1:
- type: object
- $ref: /schemas/regulator/regulator.yaml#
- unevaluatedProperties: false
+ inl2-supply:
+ description: Handle to the INL2 input supply (REG8-9)
- properties:
- vp1-supply:
- description: Handle to the VP1 input supply
+ inl3-supply:
+ description: Handle to the INL3 input supply (REG10-12)
- REG2:
- type: object
- $ref: /schemas/regulator/regulator.yaml#
- unevaluatedProperties: false
+ vp1-supply:
+ description: Handle to the VP1 input supply (REG1)
- properties:
- vp2-supply:
- description: Handle to the VP2 input supply
+ vp2-supply:
+ description: Handle to the VP2 input supply (REG2)
- REG3:
- type: object
- $ref: /schemas/regulator/regulator.yaml#
- unevaluatedProperties: false
+ vp3-supply:
+ description: Handle to the VP3 input supply (REG3)
- properties:
- vp3-supply:
- description: Handle to the VP3 input supply
-
- REG4:
- type: object
- $ref: /schemas/regulator/regulator.yaml#
- unevaluatedProperties: false
+ vp4-supply:
+ description: Handle to the VP4 input supply (REG4)
- properties:
- vp4-supply:
- description: Handle to the VP4 input supply
+ regulators:
+ type: object
+ additionalProperties: false
patternProperties:
- "^REG[5-7]$":
+ "^REG([1-9]|1[0-2])$":
type: object
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
- properties:
- inl1-supply:
- description: Handle to the INL1 input supply
-
- "^REG[8-9]$":
- type: object
- $ref: /schemas/regulator/regulator.yaml#
- unevaluatedProperties: false
-
- properties:
- inl2-supply:
- description: Handle to the INL2 input supply
-
- "^REG1[0-2]$":
- type: object
- $ref: /schemas/regulator/regulator.yaml#
- unevaluatedProperties: false
-
- properties:
- inl3-supply:
- description: Handle to the INL3 input supply
-
additionalProperties: false
required:
diff --git a/sys/contrib/device-tree/Bindings/regulator/adi,max77503-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/adi,max77503-regulator.yaml
new file mode 100644
index 000000000000..aa581e550be2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/adi,max77503-regulator.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (c) 2023 Analog Devices, Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/adi,max77503-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX77503 Buck Converter
+
+maintainers:
+ - Gokhan Celik <Gokhan.Celik@analog.com>
+
+description: |
+ The Analog Devices MAX77503 is a single channel 14V input, 1.5A
+ high-efficiency buck converter. This converter has 94% efficiency
+ for 2-Cell/3-Cell battery applications.
+
+allOf:
+ - $ref: regulator.yaml#
+
+properties:
+ compatible:
+ enum:
+ - adi,max77503
+
+ reg:
+ description: I2C address of the device
+ items:
+ - enum: [0x1e, 0x24, 0x37]
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ regulator@1e {
+ compatible = "adi,max77503";
+ reg = <0x1e>;
+
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <5000000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/regulator/adi,max77857.yaml b/sys/contrib/device-tree/Bindings/regulator/adi,max77857.yaml
new file mode 100644
index 000000000000..d1fa74aca721
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/adi,max77857.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2022 Analog Devices Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/adi,max77857.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX77857 Buck-Boost Converter
+
+maintainers:
+ - Ibrahim Tilki <Ibrahim.Tilki@analog.com>
+ - Okan Sahin <Okan.Sahin@analog.com>
+
+description: Analog Devices MAX77857 Buck-Boost Converter
+
+properties:
+ compatible:
+ enum:
+ - adi,max77831
+ - adi,max77857
+ - adi,max77859
+ - adi,max77859a
+
+ reg:
+ description: I2C address of the device
+ items:
+ - enum: [0x66, 0x67, 0x6E, 0x6F]
+
+ interrupts:
+ maxItems: 1
+
+ adi,switch-frequency-hz:
+ description: Switching frequency of the Buck-Boost converter in Hz.
+ items:
+ - enum: [1200000, 1500000, 1800000, 2100000]
+
+ adi,rtop-ohms:
+ description: Top feedback resistor value in ohms for external feedback.
+ minimum: 150000
+ maximum: 330000
+
+ adi,rbot-ohms:
+ description: Bottom feedback resistor value in ohms for external feedback.
+
+dependencies:
+ adi,rtop-ohms: [ 'adi,rbot-ohms' ]
+ adi,rbot-ohms: [ 'adi,rtop-ohms' ]
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: regulator.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,max77831
+
+ then:
+ properties:
+ adi,switch-frequency-hz:
+ items:
+ enum: [1200000, 1500000, 1800000]
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ regulator@66 {
+ reg = <0x66>;
+ compatible = "adi,max77857";
+ interrupt-parent = <&gpio>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+
+ adi,rtop-ohms = <312000>;
+ adi,rbot-ohms = <12000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/regulator/awinic,aw37503.yaml b/sys/contrib/device-tree/Bindings/regulator/awinic,aw37503.yaml
new file mode 100644
index 000000000000..c92a881ed60e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/awinic,aw37503.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/awinic,aw37503.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic AW37503 Voltage Regulator
+
+maintainers:
+ - Alec Li <like@awinic.com>
+
+description:
+ The AW37503 are dual voltage regulator, designed to support positive/negative
+ supply for driving TFT-LCD panels. It support software-configurable output
+ switching and monitoring. The output voltages can be programmed via an I2C
+ compatible interface.
+
+properties:
+ compatible:
+ const: awinic,aw37503
+
+ reg:
+ maxItems: 1
+
+patternProperties:
+ "^out[pn]$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for single regulator.
+
+ properties:
+ enable-gpios:
+ maxItems: 1
+ description:
+ GPIO specifier to enable the GPIO control (on/off) for regulator.
+
+ required:
+ - regulator-name
+
+required:
+ - compatible
+ - reg
+ - outp
+ - outn
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ regulator@3e {
+ compatible = "awinic,aw37503";
+ reg = <0x3e>;
+
+ outp {
+ regulator-name = "outp";
+ regulator-boot-on;
+ regulator-always-on;
+ enable-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ };
+
+ outn {
+ regulator-name = "outn";
+ regulator-boot-on;
+ regulator-always-on;
+ enable-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ };
+ };
+ };
+...
+
diff --git a/sys/contrib/device-tree/Bindings/regulator/dlg,da9121.yaml b/sys/contrib/device-tree/Bindings/regulator/dlg,da9121.yaml
index dc626517c2ad..13b3f75f8e5e 100644
--- a/sys/contrib/device-tree/Bindings/regulator/dlg,da9121.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/dlg,da9121.yaml
@@ -95,11 +95,6 @@ properties:
Properties for a single BUCK regulator
properties:
- regulator-name:
- pattern: "^BUCK([1-2])$"
- description: |
- BUCK2 present in DA9122, DA9220, DA9131, DA9132 only
-
regulator-initial-mode:
enum: [ 0, 1, 2, 3 ]
description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
@@ -122,6 +117,23 @@ required:
- reg
- regulators
+allOf:
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ enum:
+ - dlg,da9122
+ - dlg,da9131
+ - dlg,da9132
+ - dlg,da9220
+ then:
+ properties:
+ regulators:
+ properties:
+ buck2: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/regulator/dlg,da9210.yaml b/sys/contrib/device-tree/Bindings/regulator/dlg,da9210.yaml
new file mode 100644
index 000000000000..81f23de36de4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/dlg,da9210.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/dlg,da9210.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dialog Semiconductor DA9210 Multi-Phase 12A DC-DC Buck Converter
+
+maintainers:
+ - Support Opensource <support.opensource@diasemi.com>
+
+allOf:
+ - $ref: regulator.yaml#
+
+properties:
+ compatible:
+ const: dlg,da9210
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ regulator@68 {
+ compatible = "dlg,da9210";
+ reg = <0x68>;
+
+ interrupt-parent = <&irqc0>;
+ interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1570000>;
+ regulator-min-microamp = <1600000>;
+ regulator-max-microamp = <4600000>;
+ regulator-boot-on;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/regulator/dlg,slg51000.yaml b/sys/contrib/device-tree/Bindings/regulator/dlg,slg51000.yaml
new file mode 100644
index 000000000000..bad140418e49
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/dlg,slg51000.yaml
@@ -0,0 +1,132 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/dlg,slg51000.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dialog Semiconductor SLG51000 Voltage Regulator
+
+maintainers:
+ - Eric Jeong <eric.jeong.opensource@diasemi.com>
+ - Support Opensource <support.opensource@diasemi.com>
+
+properties:
+ compatible:
+ const: dlg,slg51000
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ dlg,cs-gpios:
+ maxItems: 1
+ description:
+ GPIO for chip select
+
+ vin3-supply:
+ description:
+ Input supply for ldo3, required if regulator is enabled
+
+ vin4-supply:
+ description:
+ Input supply for ldo4, required if regulator is enabled
+
+ vin5-supply:
+ description:
+ Input supply for ldo5, required if regulator is enabled
+
+ vin6-supply:
+ description:
+ Input supply for ldo6, required if regulator is enabled
+
+ vin7-supply:
+ description:
+ Input supply for ldo7, required if regulator is enabled
+
+ regulators:
+ type: object
+ additionalProperties: false
+
+ patternProperties:
+ "^ldo[1-7]$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ enable-gpios:
+ maxItems: 1
+
+ required:
+ - regulator-name
+
+required:
+ - compatible
+ - reg
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/regulator/dlg,da9121-regulator.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@75 {
+ compatible = "dlg,slg51000";
+ reg = <0x75>;
+ dlg,cs-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+ vin5-supply = <&vreg_s1f_1p2>;
+ vin6-supply = <&vreg_s1f_1p2>;
+
+ regulators {
+ ldo1 {
+ regulator-name = "slg51000_b_ldo1";
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ ldo2 {
+ regulator-name = "slg51000_b_ldo2";
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ ldo3 {
+ regulator-name = "slg51000_b_ldo3";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+
+ ldo4 {
+ regulator-name = "slg51000_b_ldo4";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+
+ ldo5 {
+ regulator-name = "slg51000_b_ldo5";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ ldo6 {
+ regulator-name = "slg51000_b_ldo6";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ ldo7 {
+ regulator-name = "slg51000_b_ldo7";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/regulator/fixed-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/fixed-regulator.yaml
index ac0281b1cceb..9ff9abf2691a 100644
--- a/sys/contrib/device-tree/Bindings/regulator/fixed-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/fixed-regulator.yaml
@@ -100,6 +100,13 @@ properties:
vin-supply:
description: Input supply phandle.
+ interrupts:
+ maxItems: 1
+ description:
+ Interrupt signaling a critical under-voltage event.
+
+ system-critical-regulator: true
+
required:
- compatible
- regulator-name
diff --git a/sys/contrib/device-tree/Bindings/regulator/maxim,max20086.yaml b/sys/contrib/device-tree/Bindings/regulator/maxim,max20086.yaml
index 05f72391185e..7394c0a339c5 100644
--- a/sys/contrib/device-tree/Bindings/regulator/maxim,max20086.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/maxim,max20086.yaml
@@ -43,6 +43,7 @@ properties:
"^OUT[1-4]$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/regulator/maxim,max77826.yaml b/sys/contrib/device-tree/Bindings/regulator/maxim,max77826.yaml
index 78c0b63243f7..6d6bbfbd26d4 100644
--- a/sys/contrib/device-tree/Bindings/regulator/maxim,max77826.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/maxim,max77826.yaml
@@ -30,10 +30,12 @@ properties:
"^LDO([1-9]|1[0-5])$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
"^BUCK|BUCKBOOST$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/regulator/mediatek,mt6358-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/mediatek,mt6358-regulator.yaml
new file mode 100644
index 000000000000..c50402fcba72
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/mediatek,mt6358-regulator.yaml
@@ -0,0 +1,250 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mediatek,mt6358-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT6358 Regulator
+
+maintainers:
+ - Zhiyong Tao <zhiyong.tao@mediatek.com>
+
+description:
+ Regulator node of the PMIC. This node should under the PMIC's device node.
+ All voltage regulators provided by the PMIC are described as sub-nodes of
+ this node.
+
+properties:
+ compatible:
+ oneOf:
+ - const: mediatek,mt6358-regulator
+ - items:
+ - const: mediatek,mt6366-regulator
+ - const: mediatek,mt6358-regulator
+
+ vsys-ldo1-supply:
+ description: Supply for LDOs vfe28, vxo22, vcn28, vaux18, vaud28, vsim1, vusb, vbif28
+ vsys-ldo2-supply:
+ description: Supply for LDOs vldo28 (MT6358 only), vio28, vmc, vmch, vsim2
+ vsys-ldo3-supply:
+ description: Supply for LDOs vcn33, vcama[12] (MT6358 only), vemc, vibr
+ vsys-vcore-supply:
+ description: Supply for buck regulator vcore
+ vsys-vdram1-supply:
+ description: Supply for buck regulator vdram1
+ vsys-vgpu-supply:
+ description: Supply for buck regulator vgpu
+ vsys-vmodem-supply:
+ description: Supply for buck regulator vmodem
+ vsys-vpa-supply:
+ description: Supply for buck regulator vpa
+ vsys-vproc11-supply:
+ description: Supply for buck regulator vproc11
+ vsys-vproc12-supply:
+ description: Supply for buck regulator vproc12
+ vsys-vs1-supply:
+ description: Supply for buck regulator vs1
+ vsys-vs2-supply:
+ description: Supply for buck regulator vs2
+ vs1-ldo1-supply:
+ description:
+ Supply for LDOs vrf18, vefuse, vcn18, vcamio (MT6358 only), vio18, vm18 (MT6366 only)
+ vs2-ldo1-supply:
+ description: Supply for LDOs vdram2, vmddr (MT6366 only)
+ vs2-ldo2-supply:
+ description: Supply for LDOs vrf12, va12
+ vs2-ldo3-supply:
+ description:
+ Supply for LDOs vsram-core (MT6366 only), vsram-gpu, vsram-others, vsram-proc11, vsram-proc12
+ vs2-ldo4-supply:
+ description: Supply for LDO vcamd
+
+patternProperties:
+ "^(buck_)?v(core|dram1|gpu|modem|pa|proc1[12]|s[12])$":
+ description: Buck regulators
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes:
+ description: |
+ Buck regulatpr operating modes allowed. Valid values below.
+ Users should use the macros from dt-bindings/regulator/mediatek,mt6397-regulator.h
+ 0 (MT6397_BUCK_MODE_AUTO): Auto PFM/PWM mode
+ 1 (MT6397_BUCK_MODE_FORCE_PWM): Forced PWM mode
+ items:
+ enum: [0, 1]
+ unevaluatedProperties: false
+
+ "^(ldo_)?v(a|rf)12$":
+ description: LDOs with fixed 1.2V output and 0~100/10mV tuning
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+ "^(ldo_)?v((aux|cn|io|rf)18|camio)$":
+ description:
+ LDOs with fixed 1.8V output and 0~100/10mV tuning (vcn18 on MT6366 has variable output)
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+ "^(ldo_)?vxo22$":
+ description: LDOs with fixed 2.2V output and 0~100/10mV tuning
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+ "^(ldo_)?v(aud|bif|cn|fe|io)28$":
+ description: LDOs with fixed 2.8V output and 0~100/10mV tuning
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+ "^(ldo_)?vusb$":
+ description: LDOs with fixed 3.0V output and 0~100/10mV tuning
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+ "^(ldo_)?vsram[_-](core|gpu|others|proc1[12])$":
+ description: LDOs with variable output
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+ "^(ldo_)?v(cama[12]|camd|cn33|dram2|efuse|emc|ibr|ldo28|m18|mc|mch|mddr|sim[12])$":
+ description: LDOs with variable output and 0~100/10mV tuning
+ type: object
+ $ref: regulator.yaml#
+ properties:
+ regulator-allowed-modes: false
+ unevaluatedProperties: false
+
+required:
+ - compatible
+
+additionalProperties: false
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ const: mediatek,mt6358-regulator
+ then:
+ patternProperties:
+ # Old regulator node name scheme (with prefix and underscores) only
+ # ([^y-] is used to avoid matching -supply
+ "^(?<!buck_)(?<!ldo_)v.*[^y-](?!-supply)$": false
+ "^ldo_vsram-": false
+ # vsram_core regulator doesn't exist on MT6358
+ "^ldo_vsram[-_]core$": false
+
+ properties:
+ # vm18 and vmddr regulators don't exist on MT6358
+ ldo_vm18: false
+ ldo_vmddr: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt6366-regulator
+ then:
+ patternProperties:
+ # Prefer cleaned up regulator node names
+ "^(buck|ldo)_": false
+ # Don't allow underscores
+ "^vsram_": false
+ # vcam* regulators don't exist on MT6366
+ "^vcam": false
+
+ properties:
+ # vldo28 regulator doesn't exist on MT6366
+ vldo28: false
+ # vs2_ldo4 supply pin doesn't exist on MT6366
+ vs2-ldo4-supply: false
+
+examples:
+ - |
+ #include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
+
+ regulator {
+ compatible = "mediatek,mt6358-regulator";
+
+ buck_vgpu {
+ regulator-name = "vgpu";
+ regulator-min-microvolt = <625000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
+ MT6397_BUCK_MODE_FORCE_PWM>;
+ };
+
+ ldo_vsram_gpu {
+ regulator-name = "vsram_gpu";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
+
+ regulator {
+ compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator";
+
+ vdram1 {
+ regulator-name = "pp1125_emi_vdd2";
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
+ MT6397_BUCK_MODE_FORCE_PWM>;
+ regulator-always-on;
+ };
+
+ vproc11 {
+ regulator-name = "ppvar_dvdd_proc_bc_mt6366";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO
+ MT6397_BUCK_MODE_FORCE_PWM>;
+ regulator-always-on;
+ };
+
+ vmddr {
+ regulator-name = "pm0750_emi_vmddr";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <750000>;
+ regulator-enable-ramp-delay = <325>;
+ regulator-always-on;
+ };
+
+ vsram-proc11 {
+ regulator-name = "pp0900_dvdd_sram_bc";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1120000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/regulator/mps,mp5416.yaml b/sys/contrib/device-tree/Bindings/regulator/mps,mp5416.yaml
index 2e720d152890..f825ee9efd81 100644
--- a/sys/contrib/device-tree/Bindings/regulator/mps,mp5416.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/mps,mp5416.yaml
@@ -29,10 +29,12 @@ properties:
patternProperties:
"^buck[1-4]$":
$ref: regulator.yaml#
+ unevaluatedProperties: false
type: object
"^ldo[1-4]$":
$ref: regulator.yaml#
+ unevaluatedProperties: false
type: object
additionalProperties: false
@@ -60,8 +62,8 @@ examples:
regulator-name = "buck1";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <2187500>;
- regulator-min-microamp = <3800000>;
- regulator-max-microamp = <6800000>;
+ regulator-min-microamp = <3800000>;
+ regulator-max-microamp = <6800000>;
regulator-boot-on;
};
diff --git a/sys/contrib/device-tree/Bindings/regulator/mps,mpq2286.yaml b/sys/contrib/device-tree/Bindings/regulator/mps,mpq2286.yaml
new file mode 100644
index 000000000000..1296f9b30862
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/mps,mpq2286.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mps,mpq2286.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Monolithic Power System MPQ2286 PMIC
+
+maintainers:
+ - Saravanan Sekar <saravanan@linumiz.com>
+
+properties:
+ compatible:
+ enum:
+ - mps,mpq2286
+
+ reg:
+ maxItems: 1
+
+ regulators:
+ type: object
+
+ properties:
+ buck:
+ type: object
+ $ref: regulator.yaml#
+
+ unevaluatedProperties: false
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@3 {
+ compatible = "mps,mpq2286";
+ reg = <0x3>;
+
+ regulators {
+ buck {
+ regulator-name = "buck";
+ regulator-min-microvolt = <1600000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/regulator/mps,mpq7920.yaml b/sys/contrib/device-tree/Bindings/regulator/mps,mpq7920.yaml
index f3fcfc8be72f..0d34af98403f 100644
--- a/sys/contrib/device-tree/Bindings/regulator/mps,mpq7920.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/mps,mpq7920.yaml
@@ -21,7 +21,6 @@ properties:
regulators:
type: object
- $ref: regulator.yaml#
description: |
list of regulators provided by this controller, must be named
@@ -39,11 +38,13 @@ properties:
ldortc:
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
patternProperties:
"^ldo[1-4]$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
"^buck[1-4]$":
type: object
@@ -97,8 +98,8 @@ examples:
regulator-name = "buck1";
regulator-min-microvolt = <400000>;
regulator-max-microvolt = <3587500>;
- regulator-min-microamp = <460000>;
- regulator-max-microamp = <7600000>;
+ regulator-min-microamp = <460000>;
+ regulator-max-microamp = <7600000>;
regulator-boot-on;
mps,buck-ovp-disable;
mps,buck-phase-delay = /bits/ 8 <2>;
diff --git a/sys/contrib/device-tree/Bindings/regulator/onnn,fan53880.yaml b/sys/contrib/device-tree/Bindings/regulator/onnn,fan53880.yaml
index eb61e04ef852..b5181719daa1 100644
--- a/sys/contrib/device-tree/Bindings/regulator/onnn,fan53880.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/onnn,fan53880.yaml
@@ -48,10 +48,12 @@ properties:
"^LDO[1-4]$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
"^BUCK|BOOST$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/regulator/pfuze100.yaml b/sys/contrib/device-tree/Bindings/regulator/pfuze100.yaml
index e384e4953f0a..0eda44752cdd 100644
--- a/sys/contrib/device-tree/Bindings/regulator/pfuze100.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/pfuze100.yaml
@@ -68,18 +68,22 @@ properties:
"^sw([1-4]|[1-4][a-c]|[1-4][a-c][a-c])$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
"^vgen[1-6]$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
"^vldo[1-4]$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
"^(vsnvs|vref|vrefddr|swbst|coin|v33|vccsd)$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/regulator/qcom,rpm-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/qcom,rpm-regulator.yaml
index 8a08698e3484..b4eb4001eb3d 100644
--- a/sys/contrib/device-tree/Bindings/regulator/qcom,rpm-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/qcom,rpm-regulator.yaml
@@ -49,7 +49,7 @@ patternProperties:
".*-supply$":
description: Input supply phandle(s) for this node
- "^((s|l|lvs)[0-9]*)|(s[1-2][a-b])|(ncp)|(mvs)|(usb-switch)|(hdmi-switch)$":
+ "^((s|l|lvs)[0-9]*|s[1-2][a-b]|ncp|mvs|usb-switch|hdmi-switch)$":
description: List of regulators and its properties
$ref: regulator.yaml#
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/regulator/qcom,rpmh-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/qcom,rpmh-regulator.yaml
index b9498504ad79..27c6d5152413 100644
--- a/sys/contrib/device-tree/Bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/qcom,rpmh-regulator.yaml
@@ -42,6 +42,7 @@ description: |
For PM7325, smps1 - smps8, ldo1 - ldo19
For PM8005, smps1 - smps4
For PM8009, smps1 - smps2, ldo1 - ldo7
+ For PM8010, ldo1 - ldo7
For PM8150, smps1 - smps10, ldo1 - ldo18
For PM8150L, smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
For PM8350, smps1 - smps12, ldo1 - ldo10
@@ -50,9 +51,11 @@ description: |
For PM8550, smps1 - smps6, ldo1 - ldo17, bob1 - bob2
For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
For PMI8998, bob
+ For PMC8380, smps1 - smps8, ldo1 - lodo3
For PMR735A, smps1 - smps3, ldo1 - ldo7
For PMX55, smps1 - smps7, ldo1 - ldo16
For PMX65, smps1 - smps8, ldo1 - ldo21
+ For PMX75, smps1 - smps10, ldo1 - ldo21
properties:
compatible:
@@ -66,6 +69,7 @@ properties:
- qcom,pm8005-rpmh-regulators
- qcom,pm8009-rpmh-regulators
- qcom,pm8009-1-rpmh-regulators
+ - qcom,pm8010-rpmh-regulators
- qcom,pm8150-rpmh-regulators
- qcom,pm8150l-rpmh-regulators
- qcom,pm8350-rpmh-regulators
@@ -77,6 +81,7 @@ properties:
- qcom,pm8998-rpmh-regulators
- qcom,pmc8180-rpmh-regulators
- qcom,pmc8180c-rpmh-regulators
+ - qcom,pmc8380-rpmh-regulators
- qcom,pmg1110-rpmh-regulators
- qcom,pmi8998-rpmh-regulators
- qcom,pmm8155au-rpmh-regulators
@@ -84,13 +89,14 @@ properties:
- qcom,pmr735a-rpmh-regulators
- qcom,pmx55-rpmh-regulators
- qcom,pmx65-rpmh-regulators
+ - qcom,pmx75-rpmh-regulators
qcom,pmic-id:
description: |
RPMh resource name suffix used for the regulators found
on this PMIC.
$ref: /schemas/types.yaml#/definitions/string
- enum: [a, b, c, d, e, f, g, h, k]
+ enum: [a, b, c, d, e, f, g, h, i, j, k, l, m, n]
qcom,always-wait-for-ack:
description: |
@@ -109,6 +115,7 @@ properties:
bob:
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description: BOB regulator node.
dependencies:
regulator-allow-set-load: [ regulator-allowed-modes ]
@@ -117,6 +124,7 @@ patternProperties:
"^(smps|ldo|lvs|bob)[0-9]+$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description: smps/ldo regulator nodes(s).
dependencies:
regulator-allow-set-load: [ regulator-allowed-modes ]
@@ -236,6 +244,18 @@ allOf:
properties:
compatible:
enum:
+ - qcom,pm8010-rpmh-regulators
+ then:
+ properties:
+ vdd-l1-l2-supply: true
+ vdd-l3-l4-supply: true
+ patternProperties:
+ "^vdd-l[5-7]-supply$": true
+
+ - if:
+ properties:
+ compatible:
+ enum:
- qcom,pm8150-rpmh-regulators
- qcom,pmc8180-rpmh-regulators
- qcom,pmm8155au-rpmh-regulators
@@ -364,6 +384,16 @@ allOf:
properties:
compatible:
enum:
+ - qcom,pmc8380-rpmh-regulators
+ then:
+ patternProperties:
+ "^vdd-l[1-3]-supply$": true
+ "^vdd-s[1-8]-supply$": true
+
+ - if:
+ properties:
+ compatible:
+ enum:
- qcom,pmg1110-rpmh-regulators
then:
properties:
@@ -424,10 +454,28 @@ allOf:
vdd-l11-l13-supply: true
patternProperties:
"^vdd-l[1347]-supply$": true
- "^vdd-l1[0245789]-supply$": true
+ "^vdd-l1[024579]-supply$": true
"^vdd-l2[01]-supply$": true
"^vdd-s[1-8]-supply$": true
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,pmx75-rpmh-regulators
+ then:
+ properties:
+ vdd-l2-l18-supply: true
+ vdd-l4-l16-supply: true
+ vdd-l5-l6-supply: true
+ vdd-l8-l9-supply: true
+ vdd-l11-l13-supply: true
+ vdd-l20-l21-supply: true
+ patternProperties:
+ "^vdd-l[137]-supply$": true
+ "^vdd-l1[024579]-supply$": true
+ "^vdd-s([1-9]|10)-supply$": true
+
unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/regulator/qcom,sdm845-refgen-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/qcom,sdm845-refgen-regulator.yaml
new file mode 100644
index 000000000000..f02f97d4fdd2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/qcom,sdm845-refgen-regulator.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/qcom,sdm845-refgen-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. REFGEN Regulator
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description:
+ The REFGEN (reference voltage generator) regulator provides reference
+ voltage for on-chip IPs (like PHYs) on some Qualcomm SoCs.
+
+allOf:
+ - $ref: regulator.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - qcom,sc7180-refgen-regulator
+ - qcom,sc8180x-refgen-regulator
+ - qcom,sm8150-refgen-regulator
+ - const: qcom,sdm845-refgen-regulator
+
+ - items:
+ - enum:
+ - qcom,sc7280-refgen-regulator
+ - qcom,sc8280xp-refgen-regulator
+ - qcom,sm6350-refgen-regulator
+ - qcom,sm6375-refgen-regulator
+ - qcom,sm8350-refgen-regulator
+ - const: qcom,sm8250-refgen-regulator
+
+ - enum:
+ - qcom,sdm845-refgen-regulator
+ - qcom,sm8250-refgen-regulator
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ regulator@162f000 {
+ compatible = "qcom,sm8250-refgen-regulator";
+ reg = <0x0162f000 0x84>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/regulator/qcom,smd-rpm-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/qcom,smd-rpm-regulator.yaml
index a8ca8e0b27f8..f2fd2df68a9e 100644
--- a/sys/contrib/device-tree/Bindings/regulator/qcom,smd-rpm-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/qcom,smd-rpm-regulator.yaml
@@ -47,6 +47,9 @@ description:
For pm8916, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13, l14, l15, l16, l17, l18
+ For pm8937, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10,
+ l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23
+
For pm8941, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2,
lvs3, 5vs1, 5vs2
@@ -92,6 +95,7 @@ properties:
- qcom,rpm-pm8841-regulators
- qcom,rpm-pm8909-regulators
- qcom,rpm-pm8916-regulators
+ - qcom,rpm-pm8937-regulators
- qcom,rpm-pm8941-regulators
- qcom,rpm-pm8950-regulators
- qcom,rpm-pm8953-regulators
@@ -110,6 +114,7 @@ patternProperties:
"^((s|l|lvs|5vs)[0-9]*)|(boost-bypass)|(bob)$":
description: List of regulators and its properties
$ref: regulator.yaml#
+ unevaluatedProperties: false
additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/regulator/qcom,spmi-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/qcom,spmi-regulator.yaml
index bdf34c2de96b..aea849e8eadf 100644
--- a/sys/contrib/device-tree/Bindings/regulator/qcom,spmi-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/qcom,spmi-regulator.yaml
@@ -17,12 +17,16 @@ properties:
- qcom,pm660l-regulators
- qcom,pm8004-regulators
- qcom,pm8005-regulators
+ - qcom,pm8019-regulators
- qcom,pm8226-regulators
- qcom,pm8841-regulators
+ - qcom,pm8909-regulators
- qcom,pm8916-regulators
+ - qcom,pm8937-regulators
- qcom,pm8941-regulators
- qcom,pm8950-regulators
- qcom,pm8994-regulators
+ - qcom,pma8084-regulators
- qcom,pmi8994-regulators
- qcom,pmp8074-regulators
- qcom,pms405-regulators
@@ -32,7 +36,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
patternProperties:
- "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$":
+ "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-4])$":
description: List of regulators and its properties
type: object
$ref: regulator.yaml#
@@ -181,6 +185,25 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pm8019-regulators
+ then:
+ properties:
+ vdd_l1-supply: true
+ vdd_l2_l3-supply: true
+ vdd_l4_l5_l6-supply: true
+ vdd_l7_l8_l11-supply: true
+ vdd_l9-supply: true
+ vdd_l10-supply: true
+ vdd_l12-supply: true
+ vdd_l13_l14-supply: true
+ patternProperties:
+ "^vdd_s[1-4]-supply$": true
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pm8226-regulators
then:
properties:
@@ -211,6 +234,24 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pm8909-regulators
+ then:
+ properties:
+ vdd_s1-supply: true
+ vdd_s2-supply: true
+ vdd_l1-supply: true
+ vdd_l2_l5-supply: true
+ vdd_l3_l6_l10-supply: true
+ vdd_l4_l7-supply: true
+ vdd_l8_l11_l15_l18-supply: true
+ vdd_l9_l12_l14_l17-supply: true
+ vdd_l13-supply: true
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pm8916-regulators
then:
properties:
@@ -256,6 +297,24 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pm8937-regulators
+ then:
+ properties:
+ vdd_l1_l19-supply: true
+ vdd_l20_l21-supply: true
+ vdd_l2_l23-supply: true
+ vdd_l3-supply: true
+ vdd_l4_l5_l6_l7_l16-supply: true
+ vdd_l8_l11_l12_l17_l22-supply: true
+ vdd_l9_l10_l13_l14_l15_l18-supply: true
+ patternProperties:
+ "^vdd_s[1-6]-supply$": true
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pm8950-regulators
then:
properties:
@@ -300,6 +359,32 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pma8084-regulators
+ then:
+ properties:
+ vdd_l1_l11-supply: true
+ vdd_l2_l3_l4_l27-supply: true
+ vdd_l5_l7-supply: true
+ vdd_l6_l12_l14_l15_l26-supply: true
+ vdd_l8-supply: true
+ vdd_l9_l10_l13_l20_l23_l24-supply: true
+ vdd_l16_l25-supply: true
+ vdd_l17-supply: true
+ vdd_l18-supply: true
+ vdd_l19-supply: true
+ vdd_l21-supply: true
+ vdd_l22-supply: true
+ vdd_lvs1_2-supply: true
+ vdd_lvs3_4-supply: true
+ vdd_5vs1-supply: true
+ patternProperties:
+ "^vdd_s([1-9]|1[0-2])-supply$": true
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
- qcom,pmi8994-regulators
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/regulator/qcom,usb-vbus-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/qcom,usb-vbus-regulator.yaml
index 89c564dfa5db..534f87e98716 100644
--- a/sys/contrib/device-tree/Bindings/regulator/qcom,usb-vbus-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/qcom,usb-vbus-regulator.yaml
@@ -36,10 +36,11 @@ unevaluatedProperties: false
examples:
- |
- pm8150b {
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
- pm8150b_vbus: usb-vbus-regulator@1100 {
+
+ usb-vbus-regulator@1100 {
compatible = "qcom,pm8150b-vbus-reg";
reg = <0x1100>;
regulator-min-microamp = <500000>;
diff --git a/sys/contrib/device-tree/Bindings/regulator/regulator-max77620.txt b/sys/contrib/device-tree/Bindings/regulator/regulator-max77620.txt
index 1c4bfe786736..bcf788897e44 100644
--- a/sys/contrib/device-tree/Bindings/regulator/regulator-max77620.txt
+++ b/sys/contrib/device-tree/Bindings/regulator/regulator-max77620.txt
@@ -35,7 +35,7 @@ information for that regulator. The definition for each of these
nodes is defined using the standard binding for regulators found at
<Documentation/devicetree/bindings/regulator/regulator.txt>.
-Theres are also additional properties for SD/LDOs. These additional properties
+There are also additional properties for SD/LDOs. These additional properties
are required to configure FPS configuration parameters for SDs and LDOs.
Please refer <devicetree/bindings/mfd/max77620.txt> for more detail of Flexible
Power Sequence (FPS).
diff --git a/sys/contrib/device-tree/Bindings/regulator/regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/regulator.yaml
index e158c2d3d3f9..1ef380d1515e 100644
--- a/sys/contrib/device-tree/Bindings/regulator/regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/regulator.yaml
@@ -114,6 +114,11 @@ properties:
description: Enable pull down resistor when the regulator is disabled.
type: boolean
+ system-critical-regulator:
+ description: Set if the regulator is critical to system stability or
+ functionality.
+ type: boolean
+
regulator-over-current-protection:
description: Enable over current protection.
type: boolean
@@ -126,7 +131,7 @@ properties:
regulator-oc-error-microamp:
description: Set over current error limit. This is a limit where part of
- the hardware propably is malfunctional and damage prevention is requested.
+ the hardware probably is malfunctional and damage prevention is requested.
Zero can be passed to disable error detection and value '1' indicates
that detection should be enabled but limit setting can be omitted.
@@ -146,7 +151,7 @@ properties:
regulator-ov-error-microvolt:
description: Set over voltage error limit. This is a limit where part of
- the hardware propably is malfunctional and damage prevention is requested
+ the hardware probably is malfunctional and damage prevention is requested
Zero can be passed to disable error detection and value '1' indicates
that detection should be enabled but limit setting can be omitted. Limit
is given as microvolt offset from voltage set to regulator.
@@ -168,7 +173,7 @@ properties:
regulator-uv-error-microvolt:
description: Set under voltage error limit. This is a limit where part of
- the hardware propably is malfunctional and damage prevention is requested
+ the hardware probably is malfunctional and damage prevention is requested
Zero can be passed to disable error detection and value '1' indicates
that detection should be enabled but limit setting can be omitted. Limit
is given as microvolt offset from voltage set to regulator.
@@ -181,6 +186,14 @@ properties:
be enabled but limit setting can be omitted. Limit is given as microvolt
offset from voltage set to regulator.
+ regulator-uv-less-critical-window-ms:
+ description: Specifies the time window (in milliseconds) following a
+ critical under-voltage event during which the system can continue to
+ operate safely while performing less critical operations. This property
+ provides a defined duration before a more severe reaction to the
+ under-voltage event is needed, allowing for certain non-urgent actions to
+ be carried out in preparation for potential power loss.
+
regulator-temp-protection-kelvin:
description: Set over temperature protection limit. This is a limit where
hardware performs emergency shutdown. Zero can be passed to disable
@@ -189,7 +202,7 @@ properties:
regulator-temp-error-kelvin:
description: Set over temperature error limit. This is a limit where part of
- the hardware propably is malfunctional and damage prevention is requested
+ the hardware probably is malfunctional and damage prevention is requested
Zero can be passed to disable error detection and value '1' indicates
that detection should be enabled but limit setting can be omitted.
diff --git a/sys/contrib/device-tree/Bindings/regulator/richtek,rt4831-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/richtek,rt4831-regulator.yaml
index d9c23333e157..cd06e957b9db 100644
--- a/sys/contrib/device-tree/Bindings/regulator/richtek,rt4831-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/richtek,rt4831-regulator.yaml
@@ -29,6 +29,7 @@ patternProperties:
"^DSV(LCM|P|N)$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description:
Properties for single Display Bias Voltage regulator.
diff --git a/sys/contrib/device-tree/Bindings/regulator/richtek,rt5190a-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/richtek,rt5190a-regulator.yaml
index edb411be0390..89341fdaa3af 100644
--- a/sys/contrib/device-tree/Bindings/regulator/richtek,rt5190a-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/richtek,rt5190a-regulator.yaml
@@ -11,7 +11,7 @@ maintainers:
description: |
The RT5190A integrates 1 channel buck controller, 3 channels high efficiency
- synchronous buck converters, 1 LDO, I2C control interface and peripherial
+ synchronous buck converters, 1 LDO, I2C control interface and peripheral
logical control.
It also supports mute AC OFF depop sound and quick setting storage while
diff --git a/sys/contrib/device-tree/Bindings/regulator/richtek,rt5739.yaml b/sys/contrib/device-tree/Bindings/regulator/richtek,rt5739.yaml
index 358297dd3fb7..e95e046e9ed6 100644
--- a/sys/contrib/device-tree/Bindings/regulator/richtek,rt5739.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/richtek,rt5739.yaml
@@ -21,6 +21,7 @@ allOf:
properties:
compatible:
enum:
+ - richtek,rt5733
- richtek,rt5739
reg:
diff --git a/sys/contrib/device-tree/Bindings/regulator/richtek,rtmv20-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/richtek,rtmv20-regulator.yaml
index 446ec5127d1f..fec3d396ca50 100644
--- a/sys/contrib/device-tree/Bindings/regulator/richtek,rtmv20-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/richtek,rtmv20-regulator.yaml
@@ -121,6 +121,7 @@ properties:
description: load switch current regulator description.
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/regulator/richtek,rtq2208.yaml b/sys/contrib/device-tree/Bindings/regulator/richtek,rtq2208.yaml
new file mode 100644
index 000000000000..609c06615bdc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/regulator/richtek,rtq2208.yaml
@@ -0,0 +1,197 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/richtek,rtq2208.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RTQ2208 SubPMIC Regulator
+
+maintainers:
+ - Alina Yu <alina_yu@richtek.com>
+
+description: |
+ RTQ2208 is a highly integrated power converter that offers functional safety dual
+ multi-configurable synchronous buck converters and two LDOs.
+
+ Bucks support "regulator-allowed-modes" and "regulator-mode". The former defines the permitted
+ switching operation in normal mode; the latter defines the operation in suspend to RAM mode.
+
+ No matter the RTQ2208 is configured to normal or suspend to RAM mode, there are two switching
+ operation modes for all buck rails, automatic power saving mode (Auto mode) and forced continuous
+ conduction mode (FCCM).
+
+ The definition of modes is in the datasheet which is available in below link
+ and their meaning is::
+ 0 - Auto mode for power saving, which reducing the switching frequency at light load condition
+ to maintain high frequency.
+ 1 - FCCM to meet the strict voltage regulation accuracy, which keeping constant switching frequency.
+
+ Datasheet will be available soon at
+ https://www.richtek.com/assets/Products
+
+properties:
+ compatible:
+ enum:
+ - richtek,rtq2208
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ richtek,mtp-sel-high:
+ type: boolean
+ description:
+ vout register selection based on this boolean value.
+ false - Using DVS0 register setting to adjust vout
+ true - Using DVS1 register setting to adjust vout
+
+ regulators:
+ type: object
+ additionalProperties: false
+
+ patternProperties:
+ "^buck-[a-h]$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ description for buck-[a-h] regulator.
+
+ properties:
+ regulator-allowed-modes:
+ description:
+ two buck modes in different switching accuracy.
+ 0 - Auto mode
+ 1 - FCCM
+ items:
+ enum: [0, 1]
+
+ "^ldo[1-2]$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ regulator description for ldo[1-2].
+
+required:
+ - compatible
+ - reg
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@10 {
+ compatible = "richtek,rtq2208";
+ reg = <0x10>;
+ interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
+ richtek,mtp-sel-high;
+
+ regulators {
+ buck-a {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-b {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-c {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-d {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-e {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-f {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-g {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ buck-h {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <2050000>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-mode = <1>;
+ };
+ };
+ ldo1 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+ ldo2 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/regulator/richtek,rtq6752-regulator.yaml b/sys/contrib/device-tree/Bindings/regulator/richtek,rtq6752-regulator.yaml
index e6e5a9a7d940..ef62c618de67 100644
--- a/sys/contrib/device-tree/Bindings/regulator/richtek,rtq6752-regulator.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/richtek,rtq6752-regulator.yaml
@@ -35,6 +35,7 @@ properties:
"^(p|n)avdd$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description: |
regulator description for pavdd and navdd.
diff --git a/sys/contrib/device-tree/Bindings/regulator/st,stm32mp1-pwr-reg.yaml b/sys/contrib/device-tree/Bindings/regulator/st,stm32mp1-pwr-reg.yaml
index 7d53cfa2c288..c9586d277f41 100644
--- a/sys/contrib/device-tree/Bindings/regulator/st,stm32mp1-pwr-reg.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/st,stm32mp1-pwr-reg.yaml
@@ -25,8 +25,8 @@ properties:
patternProperties:
"^(reg11|reg18|usb33)$":
type: object
-
$ref: regulator.yaml#
+ unevaluatedProperties: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/regulator/vctrl.txt b/sys/contrib/device-tree/Bindings/regulator/vctrl.txt
index 601328d7fdbb..e940377cfd69 100644
--- a/sys/contrib/device-tree/Bindings/regulator/vctrl.txt
+++ b/sys/contrib/device-tree/Bindings/regulator/vctrl.txt
@@ -21,7 +21,7 @@ Optional properties:
margin from the expected value for a given control
voltage. On larger voltage decreases this can occur
undesiredly since the output voltage does not adjust
- inmediately to changes in the control voltage. To
+ immediately to changes in the control voltage. To
avoid this situation the vctrl driver breaks down
larger voltage decreases into multiple steps, where
each step is within the OVP threshold.
diff --git a/sys/contrib/device-tree/Bindings/regulator/wlf,arizona.yaml b/sys/contrib/device-tree/Bindings/regulator/wlf,arizona.yaml
index 011819c10988..11e378648b3f 100644
--- a/sys/contrib/device-tree/Bindings/regulator/wlf,arizona.yaml
+++ b/sys/contrib/device-tree/Bindings/regulator/wlf,arizona.yaml
@@ -29,11 +29,13 @@ properties:
Initial data for the LDO1 regulator.
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
micvdd:
description:
Initial data for the MICVDD regulator.
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/fsl,imx-rproc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/fsl,imx-rproc.yaml
index 0c3910f152d1..df36e29d974c 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/fsl,imx-rproc.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/fsl,imx-rproc.yaml
@@ -20,7 +20,9 @@ properties:
- fsl,imx7ulp-cm4
- fsl,imx8mm-cm4
- fsl,imx8mn-cm7
+ - fsl,imx8mn-cm7-mmio
- fsl,imx8mp-cm7
+ - fsl,imx8mp-cm7-mmio
- fsl,imx8mq-cm4
- fsl,imx8qm-cm4
- fsl,imx8qxp-cm4
@@ -70,6 +72,11 @@ properties:
description:
Specify CPU entry address for SCU enabled processor.
+ fsl,iomuxc-gpr:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to IOMUXC GPR block which provide access to CM7 CPUWAIT bit.
+
fsl,resource-id:
$ref: /schemas/types.yaml#/definitions/uint32
description:
@@ -79,6 +86,19 @@ properties:
required:
- compatible
+allOf:
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ enum:
+ - fsl,imx8mn-cm7-mmio
+ - fsl,imx8mp-cm7-mmio
+ then:
+ properties:
+ fsl,iomuxc-gpr: false
+
additionalProperties: false
examples:
@@ -93,10 +113,10 @@ examples:
};
imx7d-cm4 {
- compatible = "fsl,imx7d-cm4";
- memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>;
- syscon = <&src>;
- clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>;
+ compatible = "fsl,imx7d-cm4";
+ memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>;
+ syscon = <&src>;
+ clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>;
};
- |
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/mtk,scp.yaml b/sys/contrib/device-tree/Bindings/remoteproc/mtk,scp.yaml
index 895415772d1d..09102dda4942 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/mtk,scp.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/mtk,scp.yaml
@@ -21,6 +21,7 @@ properties:
- mediatek,mt8188-scp
- mediatek,mt8192-scp
- mediatek,mt8195-scp
+ - mediatek,mt8195-scp-dual
reg:
description:
@@ -31,10 +32,7 @@ properties:
reg-names:
minItems: 2
- items:
- - const: sram
- - const: cfg
- - const: l1tcm
+ maxItems: 3
clocks:
description:
@@ -58,6 +56,93 @@ properties:
memory-region:
maxItems: 1
+ cros-ec-rpmsg:
+ $ref: /schemas/mfd/google,cros-ec.yaml
+ description:
+ This subnode represents the rpmsg device. The properties
+ of this node are defined by the individual bindings for
+ the rpmsg devices.
+
+ required:
+ - mediatek,rpmsg-name
+
+ unevaluatedProperties: false
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ ranges:
+ description:
+ Standard ranges definition providing address translations for
+ local SCP SRAM address spaces to bus addresses.
+
+patternProperties:
+ "^scp@[a-f0-9]+$":
+ type: object
+ description:
+ The MediaTek SCP integrated to SoC might be a multi-core version.
+ The other cores are represented as child nodes of the boot core.
+ There are some integration differences for the IP like the usage of
+ address translator for translating SoC bus addresses into address space
+ for the processor.
+
+ Each SCP core has own cache memory. The SRAM and L1TCM are shared by
+ cores. The power of cache, SRAM and L1TCM power should be enabled
+ before booting SCP cores. The size of cache, SRAM, and L1TCM are varied
+ on differnt SoCs.
+
+ The SCP cores do not use an MMU, but has a set of registers to
+ control the translations between 32-bit CPU addresses into system bus
+ addresses. Cache and memory access settings are provided through a
+ Memory Protection Unit (MPU), programmable only from the SCP.
+
+ properties:
+ compatible:
+ enum:
+ - mediatek,scp-core
+
+ reg:
+ description: The base address and size of SRAM.
+ maxItems: 1
+
+ reg-names:
+ const: sram
+
+ interrupts:
+ maxItems: 1
+
+ firmware-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ If present, name (or relative path) of the file within the
+ firmware search path containing the firmware image used when
+ initializing sub cores of multi-core SCP.
+
+ memory-region:
+ maxItems: 1
+
+ cros-ec-rpmsg:
+ $ref: /schemas/mfd/google,cros-ec.yaml
+ description:
+ This subnode represents the rpmsg device. The properties
+ of this node are defined by the individual bindings for
+ the rpmsg devices.
+
+ required:
+ - mediatek,rpmsg-name
+
+ unevaluatedProperties: false
+
+ required:
+ - compatible
+ - reg
+ - reg-names
+
+ additionalProperties: false
+
required:
- compatible
- reg
@@ -87,23 +172,39 @@ allOf:
reg:
maxItems: 2
reg-names:
+ items:
+ - const: sram
+ - const: cfg
+ - if:
+ properties:
+ compatible:
+ enum:
+ - mediatek,mt8192-scp
+ - mediatek,mt8195-scp
+ then:
+ properties:
+ reg:
+ maxItems: 3
+ reg-names:
+ items:
+ - const: sram
+ - const: cfg
+ - const: l1tcm
+ - if:
+ properties:
+ compatible:
+ enum:
+ - mediatek,mt8195-scp-dual
+ then:
+ properties:
+ reg:
maxItems: 2
+ reg-names:
+ items:
+ - const: cfg
+ - const: l1tcm
-additionalProperties:
- type: object
- description:
- Subnodes of the SCP represent rpmsg devices. The names of the devices
- are not important. The properties of these nodes are defined by the
- individual bindings for the rpmsg devices.
- properties:
- mediatek,rpmsg-name:
- $ref: /schemas/types.yaml#/definitions/string-array
- description:
- Contains the name for the rpmsg device. Used to match
- the subnode to rpmsg device announced by SCP.
-
- required:
- - mediatek,rpmsg-name
+additionalProperties: false
examples:
- |
@@ -118,7 +219,42 @@ examples:
clocks = <&infracfg CLK_INFRA_SCPSYS>;
clock-names = "main";
- cros_ec {
+ cros-ec-rpmsg {
+ compatible = "google,cros-ec-rpmsg";
mediatek,rpmsg-name = "cros-ec-rpmsg";
};
};
+
+ - |
+ scp@10500000 {
+ compatible = "mediatek,mt8195-scp-dual";
+ reg = <0x10720000 0xe0000>,
+ <0x10700000 0x8000>;
+ reg-names = "cfg", "l1tcm";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x10500000 0x100000>;
+
+ scp@0 {
+ compatible = "mediatek,scp-core";
+ reg = <0x0 0xa0000>;
+ reg-names = "sram";
+
+ cros-ec-rpmsg {
+ compatible = "google,cros-ec-rpmsg";
+ mediatek,rpmsg-name = "cros-ec-rpmsg";
+ };
+ };
+
+ scp@a0000 {
+ compatible = "mediatek,scp-core";
+ reg = <0xa0000 0x20000>;
+ reg-names = "sram";
+
+ cros-ec-rpmsg {
+ compatible = "google,cros-ec-rpmsg";
+ mediatek,rpmsg-name = "cros-ec-rpmsg";
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,adsp.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,adsp.yaml
index 643ee787a81f..661c2b425da3 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,adsp.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,adsp.yaml
@@ -26,6 +26,7 @@ properties:
- qcom,sdm660-adsp-pas
- qcom,sdm845-adsp-pas
- qcom,sdm845-cdsp-pas
+ - qcom,sdm845-slpi-pas
reg:
maxItems: 1
@@ -44,8 +45,13 @@ properties:
maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
+ firmware-name:
+ maxItems: 1
+ description: Firmware name for the Hexagon core
+
required:
- compatible
+ - memory-region
unevaluatedProperties: false
@@ -60,9 +66,12 @@ allOf:
- qcom,msm8953-adsp-pil
- qcom,msm8974-adsp-pil
- qcom,msm8996-adsp-pil
+ - qcom,msm8996-slpi-pil
- qcom,msm8998-adsp-pas
+ - qcom,msm8998-slpi-pas
- qcom,sdm845-adsp-pas
- qcom,sdm845-cdsp-pas
+ - qcom,sdm845-slpi-pas
then:
properties:
clocks:
@@ -77,24 +86,6 @@ allOf:
compatible:
contains:
enum:
- - qcom,msm8996-slpi-pil
- - qcom,msm8998-slpi-pas
- then:
- properties:
- clocks:
- items:
- - description: XO clock
- - description: AGGRE2 clock
- clock-names:
- items:
- - const: xo
- - const: aggre2
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- qcom,msm8226-adsp-pil
- qcom,msm8953-adsp-pil
- qcom,msm8974-adsp-pil
@@ -104,6 +95,7 @@ allOf:
- qcom,msm8998-slpi-pas
- qcom,sdm845-adsp-pas
- qcom,sdm845-cdsp-pas
+ - qcom,sdm845-slpi-pas
then:
properties:
interrupts:
@@ -160,6 +152,22 @@ allOf:
- if:
properties:
compatible:
+ enum:
+ - qcom,sdm845-slpi-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: LCX power domain
+ - description: LMX power domain
+ power-domain-names:
+ items:
+ - const: lcx
+ - const: lmx
+
+ - if:
+ properties:
+ compatible:
contains:
enum:
- qcom,msm8226-adsp-pil
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-edge.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-edge.yaml
index 7b43ad3daa56..e78a89c9ec41 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-edge.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-edge.yaml
@@ -14,9 +14,6 @@ description:
related to the remote processor.
properties:
- $nodename:
- const: glink-edge
-
apr:
$ref: /schemas/soc/qcom/qcom,apr.yaml#
required:
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-rpm-edge.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-rpm-edge.yaml
index f5a044e20c4e..884158bccd50 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-rpm-edge.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,glink-rpm-edge.yaml
@@ -84,7 +84,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
- rpm-glink {
+ glink-edge {
compatible = "qcom,glink-rpm";
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
mboxes = <&apcs_glb 0>;
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,msm8996-mss-pil.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,msm8996-mss-pil.yaml
index c1ac6ca1e759..971734085d51 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,msm8996-mss-pil.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,msm8996-mss-pil.yaml
@@ -19,6 +19,7 @@ properties:
enum:
- qcom,msm8996-mss-pil
- qcom,msm8998-mss-pil
+ - qcom,sdm660-mss-pil
- qcom,sdm845-mss-pil
reg:
@@ -215,13 +216,11 @@ allOf:
- description: GCC MSS IFACE clock
- description: GCC MSS BUS clock
- description: GCC MSS MEM clock
- - description: RPMH XO clock
+ - description: RPM XO clock
- description: GCC MSS GPLL0 clock
- description: GCC MSS SNOC_AXI clock
- description: GCC MSS MNOC_AXI clock
- - description: RPMH PNOC clock
- - description: GCC MSS PRNG clock
- - description: RPMH QDSS clock
+ - description: RPM QDSS clock
clock-names:
items:
- const: iface
@@ -231,7 +230,6 @@ allOf:
- const: gpll0_mss
- const: snoc_axi
- const: mnoc_axi
- - const: pnoc
- const: qdss
glink-edge: false
required:
@@ -245,7 +243,9 @@ allOf:
- if:
properties:
compatible:
- const: qcom,msm8998-mss-pil
+ enum:
+ - qcom,msm8998-mss-pil
+ - qcom,sdm660-mss-pil
then:
properties:
clocks:
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,pas-common.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,pas-common.yaml
index 171ef85de193..63a82e7a8bf8 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,pas-common.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,pas-common.yaml
@@ -82,7 +82,6 @@ required:
- clock-names
- interrupts
- interrupt-names
- - memory-region
- qcom,smem-states
- qcom,smem-state-names
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,qcs404-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,qcs404-pas.yaml
index 5efa0e5c0439..eb868a7ff4cd 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,qcs404-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,qcs404-pas.yaml
@@ -42,7 +42,7 @@ properties:
smd-edge: false
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
firmware-name:
@@ -52,6 +52,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,rpm-proc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,rpm-proc.yaml
new file mode 100644
index 000000000000..7afafde17a38
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,rpm-proc.yaml
@@ -0,0 +1,171 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/remoteproc/qcom,rpm-proc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Resource Power Manager (RPM) Processor/Subsystem
+
+maintainers:
+ - Bjorn Andersson <andersson@kernel.org>
+ - Konrad Dybcio <konrad.dybcio@linaro.org>
+ - Stephan Gerhold <stephan@gerhold.net>
+
+description: |
+ Resource Power Manager (RPM) subsystem found in various Qualcomm platforms:
+
+ +--------------------------------------------+
+ | RPM subsystem (qcom,rpm-proc) |
+ | |
+ reset | +---------------+ +-----+ +-----+ |
+ --------->| | | MPM | | CPR | ... |
+ IPC interrupts | | ARM Cortex-M3 |--- +-----+ +-----+ |
+ ----------------->| | | | | |
+ | +---------------+ |---------------------- |
+ | +---------------+ | |
+ | | Code RAM |--| +------------------+ |
+ | +---------------+ | | | |
+ | +---------------+ |--| Message RAM | |
+ | | Data RAM |--| | | |
+ | +---------------+ | +------------------+ |
+ +--------------------|-----------------------+
+ v
+ NoC
+
+ The firmware running on the processor inside the RPM subsystem allows each
+ component in the system to vote for state of the system resources, such as
+ clocks, regulators and bus frequencies. It implements multiple separate
+ communication interfaces that are described in subnodes, e.g. SMD and MPM:
+
+ +------------------------------+
+ | ARM Cortex-M3 |
+ | | +------------------------------+
+ | +--------------------------+ | | Message RAM |
+ | | RPM firmware | | | |
+ IPC IRQ 0 | | +----------------------+ | | | +--------------------------+ |
+ -------------->| SMD server |<------->| SMD data structures | |
+ | | | +--------------+ | | | | | +--------------+ | |
+ | | | | rpm_requests | ... | | | | | | rpm_requests | ... | |
+ | | | +--------------+ | | | | | +--------------+ | |
+ IPC IRQ 1 | | +----------------------+ | | | +--------------------------+ |
+ -------------->| MPM virtualization |<--------| MPM register copy (vMPM) | |
+ | | +----------------------+ | | | +--------------------------+ |
+ | | ... | | | | ... |
+ | +--------------------|-----+ | +------------------------------+
+ +----------------------|-------+
+ v
+ +--------------+
+ | MPM Hardware |
+ +--------------+
+
+ The services provided by the firmware are only available after the firmware
+ has been loaded and the processor has been released from reset. Usually this
+ happens early in the boot process before the operating system is started.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - qcom,apq8084-rpm-proc
+ - qcom,ipq6018-rpm-proc
+ - qcom,ipq9574-rpm-proc
+ - qcom,mdm9607-rpm-proc
+ - qcom,msm8226-rpm-proc
+ - qcom,msm8610-rpm-proc
+ - qcom,msm8909-rpm-proc
+ - qcom,msm8916-rpm-proc
+ - qcom,msm8917-rpm-proc
+ - qcom,msm8936-rpm-proc
+ - qcom,msm8937-rpm-proc
+ - qcom,msm8952-rpm-proc
+ - qcom,msm8953-rpm-proc
+ - qcom,msm8974-rpm-proc
+ - qcom,msm8976-rpm-proc
+ - qcom,msm8994-rpm-proc
+ - qcom,msm8996-rpm-proc
+ - qcom,msm8998-rpm-proc
+ - qcom,qcm2290-rpm-proc
+ - qcom,qcs404-rpm-proc
+ - qcom,sdm660-rpm-proc
+ - qcom,sm6115-rpm-proc
+ - qcom,sm6125-rpm-proc
+ - qcom,sm6375-rpm-proc
+ - const: qcom,rpm-proc
+
+ smd-edge:
+ $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
+ description:
+ Qualcomm Shared Memory subnode which represents communication edge,
+ channels and devices related to the RPM subsystem.
+
+ glink-edge:
+ $ref: /schemas/remoteproc/qcom,glink-rpm-edge.yaml#
+ description:
+ Qualcomm G-Link subnode which represents communication edge,
+ channels and devices related to the RPM subsystem.
+
+ interrupt-controller:
+ type: object
+ $ref: /schemas/interrupt-controller/qcom,mpm.yaml#
+ description:
+ MSM Power Manager (MPM) interrupt controller that monitors interrupts
+ when the system is asleep.
+
+ master-stats:
+ $ref: /schemas/soc/qcom/qcom,rpm-master-stats.yaml#
+ description:
+ Subsystem-level low-power mode statistics provided by RPM.
+
+required:
+ - compatible
+
+oneOf:
+ - required:
+ - smd-edge
+ - required:
+ - glink-edge
+
+additionalProperties: false
+
+examples:
+ # SMD
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ remoteproc {
+ compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc";
+
+ smd-edge {
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,ipc = <&apcs 8 0>;
+ qcom,smd-edge = <15>;
+
+ rpm-requests {
+ compatible = "qcom,rpm-msm8916";
+ qcom,smd-channels = "rpm_requests";
+ /* ... */
+ };
+ };
+ };
+ # GLINK
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ remoteproc {
+ compatible = "qcom,qcm2290-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+ interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm-requests {
+ compatible = "qcom,rpm-qcm2290";
+ qcom,glink-channels = "rpm_requests";
+ /* ... */
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc7180-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc7180-pas.yaml
index 5cefd2c58593..c054b84fdcd5 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc7180-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc7180-pas.yaml
@@ -16,8 +16,12 @@ description:
properties:
compatible:
enum:
+ - qcom,sc7180-adsp-pas
- qcom,sc7180-mpss-pas
+ - qcom,sc7280-adsp-pas
+ - qcom,sc7280-cdsp-pas
- qcom,sc7280-mpss-pas
+ - qcom,sc7280-wpss-pas
reg:
maxItems: 1
@@ -30,28 +34,8 @@ properties:
items:
- const: xo
- interrupts:
- minItems: 6
-
- interrupt-names:
- minItems: 6
-
- power-domains:
- minItems: 2
- items:
- - description: CX power domain
- - description: MX power domain
- - description: MSS power domain
-
- power-domain-names:
- minItems: 2
- items:
- - const: cx
- - const: mx
- - const: mss
-
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
qcom,qmp:
@@ -67,6 +51,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
@@ -74,19 +59,87 @@ allOf:
properties:
compatible:
enum:
+ - qcom,sc7180-adsp-pas
+ then:
+ properties:
+ interrupts:
+ maxItems: 5
+ interrupt-names:
+ maxItems: 5
+ else:
+ properties:
+ interrupts:
+ minItems: 6
+ interrupt-names:
+ minItems: 6
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sc7180-adsp-pas
+ - qcom,sc7280-adsp-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: LCX power domain
+ - description: LMX power domain
+ power-domain-names:
+ items:
+ - const: lcx
+ - const: lmx
+
+ - if:
+ properties:
+ compatible:
+ enum:
- qcom,sc7180-mpss-pas
then:
properties:
power-domains:
- minItems: 3
+ items:
+ - description: CX power domain
+ - description: MX power domain
+ - description: MSS power domain
power-domain-names:
- minItems: 3
- else:
+ items:
+ - const: cx
+ - const: mx
+ - const: mss
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sc7280-mpss-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: CX power domain
+ - description: MSS power domain
+ power-domain-names:
+ items:
+ - const: cx
+ - const: mss
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sc7280-cdsp-pas
+ - qcom,sc7280-wpss-pas
+ then:
properties:
power-domains:
- maxItems: 2
+ items:
+ - description: CX power domain
+ - description: MX power domain
power-domain-names:
- maxItems: 2
+ items:
+ - const: cx
+ - const: mx
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8180x-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8180x-pas.yaml
index c1f8dd8d0e4c..4744a37b2b5d 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8180x-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8180x-pas.yaml
@@ -38,7 +38,7 @@ properties:
smd-edge: false
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
firmware-name:
@@ -48,6 +48,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8280xp-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8280xp-pas.yaml
index f6fbc531dc28..96d53baf6e00 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8280xp-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sc8280xp-pas.yaml
@@ -38,7 +38,7 @@ properties:
smd-edge: false
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
firmware-name:
@@ -48,6 +48,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sdx55-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sdx55-pas.yaml
index c66e298462c7..5d463272165f 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sdx55-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sdx55-pas.yaml
@@ -46,7 +46,7 @@ properties:
- const: mss
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
qcom,qmp:
@@ -62,6 +62,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6115-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6115-pas.yaml
index f5d1fa9f45f1..028287235912 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6115-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6115-pas.yaml
@@ -15,10 +15,19 @@ description:
properties:
compatible:
- enum:
- - qcom,sm6115-adsp-pas
- - qcom,sm6115-cdsp-pas
- - qcom,sm6115-mpss-pas
+ oneOf:
+ - enum:
+ - qcom,sm6115-adsp-pas
+ - qcom,sm6115-cdsp-pas
+ - qcom,sm6115-mpss-pas
+
+ - items:
+ - const: qcom,qcm2290-adsp-pas
+ - const: qcom,sm6115-adsp-pas
+
+ - items:
+ - const: qcom,qcm2290-mpss-pas
+ - const: qcom,sm6115-mpss-pas
reg:
maxItems: 1
@@ -32,7 +41,7 @@ properties:
- const: xo
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
smd-edge: false
@@ -44,15 +53,17 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
- if:
properties:
compatible:
- enum:
- - qcom,sm6115-adsp-pas
- - qcom,sm6115-cdsp-pas
+ contains:
+ enum:
+ - qcom,sm6115-adsp-pas
+ - qcom,sm6115-cdsp-pas
then:
properties:
interrupts:
@@ -69,9 +80,10 @@ allOf:
- if:
properties:
compatible:
- enum:
- - qcom,sm6115-cdsp-pas
- - qcom,sm6115-mpss-pas
+ contains:
+ enum:
+ - qcom,sm6115-cdsp-pas
+ - qcom,sm6115-mpss-pas
then:
properties:
power-domains:
@@ -84,8 +96,9 @@ allOf:
- if:
properties:
compatible:
- enum:
- - qcom,sm6115-adsp-pas
+ contains:
+ enum:
+ - qcom,sm6115-adsp-pas
then:
properties:
power-domains:
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6350-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6350-pas.yaml
index fee02fa800b5..f7e40fb166da 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6350-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6350-pas.yaml
@@ -36,7 +36,7 @@ properties:
description: Reference to the AOSS side-channel message RAM.
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
smd-edge: false
@@ -48,6 +48,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6375-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6375-pas.yaml
new file mode 100644
index 000000000000..3e4a03eb4532
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm6375-pas.yaml
@@ -0,0 +1,145 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/remoteproc/qcom,sm6375-pas.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM6375 Peripheral Authentication Service
+
+maintainers:
+ - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+
+description:
+ Qualcomm SM6375 SoC Peripheral Authentication Service loads and boots
+ firmware on the Qualcomm DSP Hexagon cores.
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm6375-adsp-pas
+ - qcom,sm6375-cdsp-pas
+ - qcom,sm6375-mpss-pas
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: XO clock
+
+ clock-names:
+ items:
+ - const: xo
+
+ memory-region:
+ maxItems: 1
+ description: Reference to the reserved-memory for the Hexagon core
+
+ firmware-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: Firmware name for the Hexagon core
+
+ smd-edge: false
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: /schemas/remoteproc/qcom,pas-common.yaml#
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6375-adsp-pas
+ - qcom,sm6375-cdsp-pas
+ then:
+ properties:
+ interrupts:
+ maxItems: 5
+ interrupt-names:
+ maxItems: 5
+ else:
+ properties:
+ interrupts:
+ minItems: 6
+ interrupt-names:
+ minItems: 6
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6375-adsp-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: LCX power domain
+ - description: LMX power domain
+ power-domain-names:
+ items:
+ - const: lcx
+ - const: lmx
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6375-cdsp-pas
+ - qcom,sm6375-mpss-pas
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: CX power domain
+ power-domain-names:
+ items:
+ - const: cx
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmcc.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/mailbox/qcom-ipcc.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
+ remoteproc_adsp: remoteproc@a400000 {
+ compatible = "qcom,sm6375-adsp-pas";
+ reg = <0x0a400000 0x100>;
+
+ interrupts-extended = <&intc GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
+ <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog", "fatal", "ready",
+ "handover", "stop-ack";
+
+ clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "xo";
+
+ power-domains = <&rpmpd SM6375_VDD_LPI_CX>,
+ <&rpmpd SM6375_VDD_LPI_MX>;
+ power-domain-names = "lcx", "lmx";
+
+ memory-region = <&pil_adsp_mem>;
+
+ qcom,smem-states = <&smp2p_adsp_out 0>;
+ qcom,smem-state-names = "stop";
+
+ glink-edge {
+ interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+ mboxes = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ label = "lpass";
+ qcom,remote-pid = <2>;
+
+ /* ... */
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8150-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8150-pas.yaml
index 2c085ac2c3fb..238c6e5e67c5 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8150-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8150-pas.yaml
@@ -40,7 +40,7 @@ properties:
description: Reference to the AOSS side-channel message RAM.
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
smd-edge: false
@@ -52,6 +52,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8350-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8350-pas.yaml
index af24f9a3cdf1..53cea8e53a31 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8350-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8350-pas.yaml
@@ -43,7 +43,7 @@ properties:
smd-edge: false
memory-region:
- minItems: 1
+ maxItems: 1
description: Reference to the reserved-memory for the Hexagon core
firmware-name:
@@ -53,6 +53,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
@@ -139,7 +140,7 @@ examples:
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
- #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
remoteproc@30000000 {
compatible = "qcom,sm8450-adsp-pas";
@@ -160,8 +161,8 @@ examples:
memory-region = <&adsp_mem>;
- power-domains = <&rpmhpd SM8450_LCX>,
- <&rpmhpd SM8450_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
qcom,qmp = <&aoss_qmp>;
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8550-pas.yaml b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8550-pas.yaml
index fe216aa531ed..58120829fb06 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8550-pas.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/qcom,sm8550-pas.yaml
@@ -53,6 +53,7 @@ properties:
required:
- compatible
- reg
+ - memory-region
allOf:
- $ref: /schemas/remoteproc/qcom,pas-common.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/renesas,rcar-rproc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/renesas,rcar-rproc.yaml
index 4bea679a0f61..5c280117dc93 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/renesas,rcar-rproc.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/renesas,rcar-rproc.yaml
@@ -31,7 +31,7 @@ properties:
remoteproc device. This is variable and describes the memories shared with
the remote processor (e.g. remoteproc firmware and carveouts, rpmsg
vrings, ...).
- (see ../reserved-memory/reserved-memory.yaml)
+ (see reserved-memory/reserved-memory.yaml in dtschema project)
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-dsp-rproc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-dsp-rproc.yaml
index f16e90380df1..9768db8663eb 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-dsp-rproc.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-dsp-rproc.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/ti,k3-dsp-rproc.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-r5f-rproc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-r5f-rproc.yaml
index fcc3db97fe8f..a492f74a8608 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-r5f-rproc.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/ti,k3-r5f-rproc.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/ti,k3-r5f-rproc.yaml#
@@ -102,7 +102,7 @@ patternProperties:
caches. Each of the TCMs can be enabled or disabled independently and
either of them can be configured to appear at that R5F's address 0x0.
- The cores do not use an MMU, but has a Region Address Translater
+ The cores do not use an MMU, but has a Region Address Translator
(RAT) module that is accessible only from the R5Fs for providing
translations between 32-bit CPU addresses into larger system bus
addresses. Cache and memory access settings are provided through a
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/ti,omap-remoteproc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/ti,omap-remoteproc.yaml
index 1fdc2741c36e..94eb2033e79c 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/ti,omap-remoteproc.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/ti,omap-remoteproc.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/ti,omap-remoteproc.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-consumer.yaml b/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-consumer.yaml
index 35f0bb38f7b2..2811334515d1 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-consumer.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-consumer.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/ti,pru-consumer.yaml#
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-rproc.yaml b/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-rproc.yaml
index cd55d80137f7..faf16cf14085 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-rproc.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/ti,pru-rproc.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/ti,pru-rproc.yaml#
@@ -66,6 +66,17 @@ properties:
Should contain the name of the default firmware image
file located on the firmware search path.
+ interrupts:
+ maxItems: 1
+ description:
+ Interrupt specifiers enable the virtio/rpmsg communication between MPU
+ and the PRU/RTU cores. For the values of the interrupt cells please refer
+ to interrupt-controller/ti,pruss-intc.yaml schema.
+
+ interrupt-names:
+ items:
+ - const: vring
+
if:
properties:
compatible:
@@ -171,6 +182,9 @@ examples:
<0x22400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-pru0_0-fw";
+ interrupt-parent = <&icssg0_intc>;
+ interrupts = <16 2 2>;
+ interrupt-names = "vring";
};
rtu0_0: rtu@4000 {
@@ -180,6 +194,9 @@ examples:
<0x23400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-rtu0_0-fw";
+ interrupt-parent = <&icssg0_intc>;
+ interrupts = <20 4 4>;
+ interrupt-names = "vring";
};
tx_pru0_0: txpru@a000 {
@@ -198,6 +215,9 @@ examples:
<0x24400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-pru0_1-fw";
+ interrupt-parent = <&icssg0_intc>;
+ interrupts = <18 3 3>;
+ interrupt-names = "vring";
};
rtu0_1: rtu@6000 {
@@ -207,6 +227,9 @@ examples:
<0x23c00 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-rtu0_1-fw";
+ interrupt-parent = <&icssg0_intc>;
+ interrupts = <22 5 5>;
+ interrupt-names = "vring";
};
tx_pru0_1: txpru@c000 {
diff --git a/sys/contrib/device-tree/Bindings/remoteproc/xlnx,zynqmp-r5fss.yaml b/sys/contrib/device-tree/Bindings/remoteproc/xlnx,zynqmp-r5fss.yaml
index 9f677367dd9f..78aac69f1060 100644
--- a/sys/contrib/device-tree/Bindings/remoteproc/xlnx,zynqmp-r5fss.yaml
+++ b/sys/contrib/device-tree/Bindings/remoteproc/xlnx,zynqmp-r5fss.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/xlnx,zynqmp-r5fss.yaml#
diff --git a/sys/contrib/device-tree/Bindings/reserved-memory/nvidia,tegra264-bpmp-shmem.yaml b/sys/contrib/device-tree/Bindings/reserved-memory/nvidia,tegra264-bpmp-shmem.yaml
new file mode 100644
index 000000000000..f9b2f0fdc282
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/reserved-memory/nvidia,tegra264-bpmp-shmem.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reserved-memory/nvidia,tegra264-bpmp-shmem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Tegra CPU-NS - BPMP IPC reserved memory
+
+maintainers:
+ - Peter De Schrijver <pdeschrijver@nvidia.com>
+
+description: |
+ Define a memory region used for communication between CPU-NS and BPMP.
+ Typically this node is created by the bootloader as the physical address
+ has to be known to both CPU-NS and BPMP for correct IPC operation.
+ The memory region is defined using a child node under /reserved-memory.
+ The sub-node is named shmem@<address>.
+
+allOf:
+ - $ref: reserved-memory.yaml
+
+properties:
+ compatible:
+ const: nvidia,tegra264-bpmp-shmem
+
+ reg:
+ description: The physical address and size of the shared SDRAM region
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - no-map
+
+examples:
+ - |
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dram_cpu_bpmp_mail: shmem@f1be0000 {
+ compatible = "nvidia,tegra264-bpmp-shmem";
+ reg = <0x0 0xf1be0000 0x0 0x2000>;
+ no-map;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/reserved-memory/qcom,rmtfs-mem.yaml b/sys/contrib/device-tree/Bindings/reserved-memory/qcom,rmtfs-mem.yaml
index bab982f00485..46407e9c1d4f 100644
--- a/sys/contrib/device-tree/Bindings/reserved-memory/qcom,rmtfs-mem.yaml
+++ b/sys/contrib/device-tree/Bindings/reserved-memory/qcom,rmtfs-mem.yaml
@@ -26,6 +26,17 @@ properties:
description: >
identifier of the client to use this region for buffers
+ qcom,use-guard-pages:
+ type: boolean
+ description: >
+ Indicates that the firmware, or hardware, does not gracefully handle
+ memory protection of this region when placed adjacent to other protected
+ memory regions, and that padding around the used portion of the memory
+ region is necessary.
+
+ When this is set, the first and last page should be left unused, and the
+ effective size of the region will thereby shrink with two pages.
+
qcom,vmid:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: >
diff --git a/sys/contrib/device-tree/Bindings/reserved-memory/reserved-memory.txt b/sys/contrib/device-tree/Bindings/reserved-memory/reserved-memory.txt
index 1810701a8509..8ce72996d500 100644
--- a/sys/contrib/device-tree/Bindings/reserved-memory/reserved-memory.txt
+++ b/sys/contrib/device-tree/Bindings/reserved-memory/reserved-memory.txt
@@ -1 +1 @@
-This file has been moved to reserved-memory.yaml.
+This file has been moved to reserved-memory.yaml in the dtschema repository.
diff --git a/sys/contrib/device-tree/Bindings/reset/altr,rst-mgr.yaml b/sys/contrib/device-tree/Bindings/reset/altr,rst-mgr.yaml
index 4379cec6b35a..761c70cf9ddf 100644
--- a/sys/contrib/device-tree/Bindings/reset/altr,rst-mgr.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/altr,rst-mgr.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera SOCFPGA Reset Manager
maintainers:
- - Dinh Nguyen <dinguyen@altera.com>
+ - Dinh Nguyen <dinguyen@kernel.org>
properties:
compatible:
@@ -32,9 +32,17 @@ properties:
required:
- compatible
- reg
- - altr,modrst-offset
- '#reset-cells'
+if:
+ properties:
+ compatible:
+ contains:
+ const: altr,stratix10-rst-mgr
+then:
+ properties:
+ altr,modrst-offset: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/reset/amlogic,meson-reset.yaml b/sys/contrib/device-tree/Bindings/reset/amlogic,meson-reset.yaml
index d3fdee89d4f8..f0c6c0df0ce3 100644
--- a/sys/contrib/device-tree/Bindings/reset/amlogic,meson-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/amlogic,meson-reset.yaml
@@ -18,6 +18,7 @@ properties:
- amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs
- amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs
- amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs
+ - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/reset/fsl,imx-src.yaml b/sys/contrib/device-tree/Bindings/reset/fsl,imx-src.yaml
index b11ac533f914..f5ec1d54aa51 100644
--- a/sys/contrib/device-tree/Bindings/reset/fsl,imx-src.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/fsl,imx-src.yaml
@@ -28,28 +28,17 @@ description: |
properties:
compatible:
oneOf:
- - const: "fsl,imx51-src"
+ - const: fsl,imx51-src
- items:
- - const: "fsl,imx50-src"
- - const: "fsl,imx51-src"
- - items:
- - const: "fsl,imx53-src"
- - const: "fsl,imx51-src"
- - items:
- - const: "fsl,imx6q-src"
- - const: "fsl,imx51-src"
- - items:
- - const: "fsl,imx6sx-src"
- - const: "fsl,imx51-src"
- - items:
- - const: "fsl,imx6sl-src"
- - const: "fsl,imx51-src"
- - items:
- - const: "fsl,imx6ul-src"
- - const: "fsl,imx51-src"
- - items:
- - const: "fsl,imx6sll-src"
- - const: "fsl,imx51-src"
+ - enum:
+ - fsl,imx50-src
+ - fsl,imx53-src
+ - fsl,imx6q-src
+ - fsl,imx6sx-src
+ - fsl,imx6sl-src
+ - fsl,imx6ul-src
+ - fsl,imx6sll-src
+ - const: fsl,imx51-src
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/reset/hisilicon,hi3660-reset.yaml b/sys/contrib/device-tree/Bindings/reset/hisilicon,hi3660-reset.yaml
index cdfcf32c53fa..e4de002d6903 100644
--- a/sys/contrib/device-tree/Bindings/reset/hisilicon,hi3660-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/hisilicon,hi3660-reset.yaml
@@ -50,32 +50,9 @@ additionalProperties: false
examples:
- |
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- #include <dt-bindings/clock/hi3660-clock.h>
-
- iomcu: iomcu@ffd7e000 {
- compatible = "hisilicon,hi3660-iomcu", "syscon";
- reg = <0xffd7e000 0x1000>;
- };
-
- iomcu_rst: iomcu_rst_controller {
+ iomcu_rst_controller {
compatible = "hisilicon,hi3660-reset";
hisilicon,rst-syscon = <&iomcu>;
#reset-cells = <2>;
};
-
- /* Specifying reset lines connected to IP modules */
- i2c@ffd71000 {
- compatible = "snps,designware-i2c";
- reg = <0xffd71000 0x1000>;
- interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- clock-frequency = <400000>;
- clocks = <&crg_ctrl HI3660_CLK_GATE_I2C0>;
- resets = <&iomcu_rst 0x20 3>;
- pinctrl-names = "default";
- pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
- };
...
diff --git a/sys/contrib/device-tree/Bindings/reset/qcom,aoss-reset.yaml b/sys/contrib/device-tree/Bindings/reset/qcom,aoss-reset.yaml
index d92e2b3cc83f..24beb712b56d 100644
--- a/sys/contrib/device-tree/Bindings/reset/qcom,aoss-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/qcom,aoss-reset.yaml
@@ -18,17 +18,17 @@ properties:
oneOf:
- description: on SC7180 SoCs the following compatibles must be specified
items:
- - const: "qcom,sc7180-aoss-cc"
- - const: "qcom,sdm845-aoss-cc"
+ - const: qcom,sc7180-aoss-cc
+ - const: qcom,sdm845-aoss-cc
- description: on SC7280 SoCs the following compatibles must be specified
items:
- - const: "qcom,sc7280-aoss-cc"
- - const: "qcom,sdm845-aoss-cc"
+ - const: qcom,sc7280-aoss-cc
+ - const: qcom,sdm845-aoss-cc
- description: on SDM845 SoCs the following compatibles must be specified
items:
- - const: "qcom,sdm845-aoss-cc"
+ - const: qcom,sdm845-aoss-cc
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/reset/qcom,pdc-global.yaml b/sys/contrib/device-tree/Bindings/reset/qcom,pdc-global.yaml
index ca5d79332189..f514363aa474 100644
--- a/sys/contrib/device-tree/Bindings/reset/qcom,pdc-global.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/qcom,pdc-global.yaml
@@ -18,16 +18,16 @@ properties:
oneOf:
- description: on SC7180 SoCs the following compatibles must be specified
items:
- - const: "qcom,sc7180-pdc-global"
- - const: "qcom,sdm845-pdc-global"
+ - const: qcom,sc7180-pdc-global
+ - const: qcom,sdm845-pdc-global
- description: on SC7280 SoCs the following compatibles must be specified
items:
- - const: "qcom,sc7280-pdc-global"
+ - const: qcom,sc7280-pdc-global
- description: on SDM845 SoCs the following compatibles must be specified
items:
- - const: "qcom,sdm845-pdc-global"
+ - const: qcom,sdm845-pdc-global
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml b/sys/contrib/device-tree/Bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
index 731b8ce01525..03c18611e42d 100644
--- a/sys/contrib/device-tree/Bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
@@ -17,7 +17,7 @@ properties:
compatible:
items:
- enum:
- - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL
+ - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL and RZ/Five
- renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC}
- renesas,r9a07g054-usbphy-ctrl # RZ/V2L
- const: renesas,rzg2l-usbphy-ctrl
diff --git a/sys/contrib/device-tree/Bindings/reset/ti,sci-reset.yaml b/sys/contrib/device-tree/Bindings/reset/ti,sci-reset.yaml
index dcf9206e12be..e10eb98eddad 100644
--- a/sys/contrib/device-tree/Bindings/reset/ti,sci-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/ti,sci-reset.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/reset/ti,sci-reset.yaml#
diff --git a/sys/contrib/device-tree/Bindings/reset/ti,tps380x-reset.yaml b/sys/contrib/device-tree/Bindings/reset/ti,tps380x-reset.yaml
index f436f2cf1df7..6063784f0352 100644
--- a/sys/contrib/device-tree/Bindings/reset/ti,tps380x-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/ti,tps380x-reset.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/reset/ti,tps380x-reset.yaml#
diff --git a/sys/contrib/device-tree/Bindings/reset/ti-syscon-reset.txt b/sys/contrib/device-tree/Bindings/reset/ti-syscon-reset.txt
index 86945502ccb5..61a0ff33e89f 100644
--- a/sys/contrib/device-tree/Bindings/reset/ti-syscon-reset.txt
+++ b/sys/contrib/device-tree/Bindings/reset/ti-syscon-reset.txt
@@ -43,7 +43,7 @@ Required properties:
Cell #6 : bit position of the reset in the
reset status register
Cell #7 : Flags used to control reset behavior,
- availible flags defined in the DT include
+ available flags defined in the DT include
file <dt-bindings/reset/ti-syscon.h>
SysCon Reset Consumer Nodes
diff --git a/sys/contrib/device-tree/Bindings/reset/xlnx,zynqmp-reset.yaml b/sys/contrib/device-tree/Bindings/reset/xlnx,zynqmp-reset.yaml
index 0d50f6a54af3..1f1b42dde94d 100644
--- a/sys/contrib/device-tree/Bindings/reset/xlnx,zynqmp-reset.yaml
+++ b/sys/contrib/device-tree/Bindings/reset/xlnx,zynqmp-reset.yaml
@@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Zynq UltraScale+ MPSoC and Versal reset
maintainers:
- - Piyush Mehta <piyush.mehta@amd.com>
+ - Mubin Sayyed <mubin.sayyed@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
description: |
The Zynq UltraScale+ MPSoC and Versal has several different resets.
@@ -32,6 +33,7 @@ properties:
enum:
- xlnx,zynqmp-reset
- xlnx,versal-reset
+ - xlnx,versal-net-reset
"#reset-cells":
const: 1
diff --git a/sys/contrib/device-tree/Bindings/riscv/cpus.yaml b/sys/contrib/device-tree/Bindings/riscv/cpus.yaml
index 38c0b5213736..9d8670c00e3b 100644
--- a/sys/contrib/device-tree/Bindings/riscv/cpus.yaml
+++ b/sys/contrib/device-tree/Bindings/riscv/cpus.yaml
@@ -32,6 +32,7 @@ properties:
oneOf:
- items:
- enum:
+ - amd,mbv32
- andestech,ax45mp
- canaan,k210
- sifive,bullet0
@@ -47,6 +48,7 @@ properties:
- sifive,u74-mc
- thead,c906
- thead,c910
+ - thead,c920
- const: riscv
- items:
- enum:
@@ -61,8 +63,8 @@ properties:
mmu-type:
description:
- Identifies the MMU address translation mode used on this
- hart. These values originate from the RISC-V Privileged
+ Identifies the largest MMU address translation mode supported by
+ this hart. These values originate from the RISC-V Privileged
Specification document, available from
https://riscv.org/specifications/
$ref: /schemas/types.yaml#/definitions/string
@@ -78,6 +80,11 @@ properties:
description:
The blocksize in bytes for the Zicbom cache operations.
+ riscv,cbop-block-size:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The blocksize in bytes for the Zicbop cache operations.
+
riscv,cboz-block-size:
$ref: /schemas/types.yaml#/definitions/uint32
description:
@@ -91,6 +98,7 @@ properties:
interrupt-controller:
type: object
+ additionalProperties: false
description: Describes the CPU's local interrupt controller
properties:
diff --git a/sys/contrib/device-tree/Bindings/riscv/extensions.yaml b/sys/contrib/device-tree/Bindings/riscv/extensions.yaml
index cc1f546fdbdc..63d81dc895e5 100644
--- a/sys/contrib/device-tree/Bindings/riscv/extensions.yaml
+++ b/sys/contrib/device-tree/Bindings/riscv/extensions.yaml
@@ -48,7 +48,7 @@ properties:
insensitive, letters in the riscv,isa string must be all
lowercase.
$ref: /schemas/types.yaml#/definitions/string
- pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[a-z])+)?(?:_[hsxz](?:[a-z])+)*$
+ pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[0-9a-z])+)?(?:_[hsxz](?:[0-9a-z])+)*$
deprecated: true
riscv,isa-base:
@@ -128,6 +128,12 @@ properties:
changes to interrupts as frozen at commit ccbddab ("Merge pull
request #42 from riscv/jhauser-2023-RC4") of riscv-aia.
+ - const: smstateen
+ description: |
+ The standard Smstateen extension for controlling access to CSRs
+ added by other RISC-V extensions in H/S/VS/U/VU modes and as
+ ratified at commit a28bfae (Ratified (#7)) of riscv-state-enable.
+
- const: ssaia
description: |
The standard Ssaia supervisor-level extension for the advanced
@@ -165,6 +171,12 @@ properties:
memory types as ratified in the 20191213 version of the privileged
ISA specification.
+ - const: zacas
+ description: |
+ The Zacas extension for Atomic Compare-and-Swap (CAS) instructions
+ is supported as ratified at commit 5059e0ca641c ("update to
+ ratified") of the riscv-zacas.
+
- const: zba
description: |
The standard Zba bit-manipulation extension for address generation
@@ -184,12 +196,111 @@ properties:
multiplication as ratified at commit 6d33919 ("Merge pull request
#158 from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
+ - const: zbkb
+ description:
+ The standard Zbkb bitmanip instructions for cryptography as ratified
+ in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zbkc
+ description:
+ The standard Zbkc carry-less multiply instructions as ratified
+ in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zbkx
+ description:
+ The standard Zbkx crossbar permutation instructions as ratified
+ in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
- const: zbs
description: |
The standard Zbs bit-manipulation extension for single-bit
instructions as ratified at commit 6d33919 ("Merge pull request #158
from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
+ - const: zfa
+ description:
+ The standard Zfa extension for additional floating point
+ instructions, as ratified in commit 056b6ff ("Zfa is ratified") of
+ riscv-isa-manual.
+
+ - const: zfh
+ description:
+ The standard Zfh extension for 16-bit half-precision binary
+ floating-point instructions, as ratified in commit 64074bc ("Update
+ version numbers for Zfh/Zfinx") of riscv-isa-manual.
+
+ - const: zfhmin
+ description:
+ The standard Zfhmin extension which provides minimal support for
+ 16-bit half-precision binary floating-point instructions, as ratified
+ in commit 64074bc ("Update version numbers for Zfh/Zfinx") of
+ riscv-isa-manual.
+
+ - const: zk
+ description:
+ The standard Zk Standard Scalar cryptography extension as ratified
+ in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zkn
+ description:
+ The standard Zkn NIST algorithm suite extensions as ratified in
+ version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zknd
+ description: |
+ The standard Zknd for NIST suite: AES decryption instructions as
+ ratified in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zkne
+ description: |
+ The standard Zkne for NIST suite: AES encryption instructions as
+ ratified in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zknh
+ description: |
+ The standard Zknh for NIST suite: hash function instructions as
+ ratified in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zkr
+ description:
+ The standard Zkr entropy source extension as ratified in version
+ 1.0 of RISC-V Cryptography Extensions Volume I specification.
+ This string being present means that the CSR associated to this
+ extension is accessible at the privilege level to which that
+ device-tree has been provided.
+
+ - const: zks
+ description:
+ The standard Zks ShangMi algorithm suite extensions as ratified in
+ version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
+ - const: zksed
+ description: |
+ The standard Zksed for ShangMi suite: SM4 block cipher instructions
+ as ratified in version 1.0 of RISC-V Cryptography Extensions
+ Volume I specification.
+
+ - const: zksh
+ description: |
+ The standard Zksh for ShangMi suite: SM3 hash function instructions
+ as ratified in version 1.0 of RISC-V Cryptography Extensions
+ Volume I specification.
+
+ - const: zkt
+ description:
+ The standard Zkt for data independent execution latency as ratified
+ in version 1.0 of RISC-V Cryptography Extensions Volume I
+ specification.
+
- const: zicbom
description:
The standard Zicbom extension for base cache management operations as
@@ -212,6 +323,12 @@ properties:
ratified in the 20191213 version of the unprivileged ISA
specification.
+ - const: zicond
+ description:
+ The standard Zicond extension for conditional arithmetic and
+ conditional-select/move operations as ratified in commit 95cf1f9
+ ("Add changes requested by Ved during signoff") of riscv-zicond.
+
- const: zicsr
description: |
The standard Zicsr extension for control and status register
@@ -234,6 +351,12 @@ properties:
The standard Zihintpause extension for pause hints, as ratified in
commit d8ab5c7 ("Zihintpause is ratified") of the riscv-isa-manual.
+ - const: zihintntl
+ description:
+ The standard Zihintntl extension for non-temporal locality hints, as
+ ratified in commit 0dc91f5 ("Zihintntl is ratified") of the
+ riscv-isa-manual.
+
- const: zihpm
description:
The standard Zihpm extension for hardware performance counters, as
@@ -246,5 +369,113 @@ properties:
in commit 2e5236 ("Ztso is now ratified.") of the
riscv-isa-manual.
+ - const: zvbb
+ description:
+ The standard Zvbb extension for vectored basic bit-manipulation
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvbc
+ description:
+ The standard Zvbc extension for vectored carryless multiplication
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvfh
+ description:
+ The standard Zvfh extension for vectored half-precision
+ floating-point instructions, as ratified in commit e2ccd05
+ ("Remove draft warnings from Zvfh[min]") of riscv-v-spec.
+
+ - const: zvfhmin
+ description:
+ The standard Zvfhmin extension for vectored minimal half-precision
+ floating-point instructions, as ratified in commit e2ccd05
+ ("Remove draft warnings from Zvfh[min]") of riscv-v-spec.
+
+ - const: zvkb
+ description:
+ The standard Zvkb extension for vector cryptography bit-manipulation
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvkg
+ description:
+ The standard Zvkg extension for vector GCM/GMAC instructions, as
+ ratified in commit 56ed795 ("Update riscv-crypto-spec-vector.adoc")
+ of riscv-crypto.
+
+ - const: zvkn
+ description:
+ The standard Zvkn extension for NIST algorithm suite instructions, as
+ ratified in commit 56ed795 ("Update riscv-crypto-spec-vector.adoc")
+ of riscv-crypto.
+
+ - const: zvknc
+ description:
+ The standard Zvknc extension for NIST algorithm suite with carryless
+ multiply instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvkned
+ description:
+ The standard Zvkned extension for Vector AES block cipher
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvkng
+ description:
+ The standard Zvkng extension for NIST algorithm suite with GCM
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvknha
+ description: |
+ The standard Zvknha extension for NIST suite: vector SHA-2 secure,
+ hash (SHA-256 only) instructions, as ratified in commit
+ 56ed795 ("Update riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvknhb
+ description: |
+ The standard Zvknhb extension for NIST suite: vector SHA-2 secure,
+ hash (SHA-256 and SHA-512) instructions, as ratified in commit
+ 56ed795 ("Update riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvks
+ description:
+ The standard Zvks extension for ShangMi algorithm suite
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvksc
+ description:
+ The standard Zvksc extension for ShangMi algorithm suite with
+ carryless multiplication instructions, as ratified in commit 56ed795
+ ("Update riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvksed
+ description: |
+ The standard Zvksed extension for ShangMi suite: SM4 block cipher
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvksh
+ description: |
+ The standard Zvksh extension for ShangMi suite: SM3 secure hash
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvksg
+ description:
+ The standard Zvksg extension for ShangMi algorithm suite with GCM
+ instructions, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
+ - const: zvkt
+ description:
+ The standard Zvkt extension for vector data-independent execution
+ latency, as ratified in commit 56ed795 ("Update
+ riscv-crypto-spec-vector.adoc") of riscv-crypto.
+
additionalProperties: true
...
diff --git a/sys/contrib/device-tree/Bindings/riscv/sophgo.yaml b/sys/contrib/device-tree/Bindings/riscv/sophgo.yaml
new file mode 100644
index 000000000000..9bc813dad098
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/riscv/sophgo.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/riscv/sophgo.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo SoC-based boards
+
+maintainers:
+ - Chao Wei <chao.wei@sophgo.com>
+ - Chen Wang <unicorn_wang@outlook.com>
+
+description:
+ Sophgo SoC-based boards
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - milkv,duo
+ - const: sophgo,cv1800b
+ - items:
+ - enum:
+ - sophgo,huashan-pi
+ - const: sophgo,cv1812h
+ - items:
+ - enum:
+ - milkv,pioneer
+ - const: sophgo,sg2042
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/riscv/thead.yaml b/sys/contrib/device-tree/Bindings/riscv/thead.yaml
index e62f6821372e..301912dcd290 100644
--- a/sys/contrib/device-tree/Bindings/riscv/thead.yaml
+++ b/sys/contrib/device-tree/Bindings/riscv/thead.yaml
@@ -17,6 +17,10 @@ properties:
const: '/'
compatible:
oneOf:
+ - description: BeagleV Ahead single board computer
+ items:
+ - const: beagle,beaglev-ahead
+ - const: thead,th1520
- description: Sipeed Lichee Pi 4A board for the Sipeed Lichee Module 4A
items:
- enum:
diff --git a/sys/contrib/device-tree/Bindings/rng/amlogic,meson-rng.yaml b/sys/contrib/device-tree/Bindings/rng/amlogic,meson-rng.yaml
index 457a6e43d810..afa52af442a7 100644
--- a/sys/contrib/device-tree/Bindings/rng/amlogic,meson-rng.yaml
+++ b/sys/contrib/device-tree/Bindings/rng/amlogic,meson-rng.yaml
@@ -14,6 +14,7 @@ properties:
compatible:
enum:
- amlogic,meson-rng
+ - amlogic,meson-s4-rng
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/rng/omap_rng.yaml b/sys/contrib/device-tree/Bindings/rng/omap_rng.yaml
index ccf54fae8302..c0ac4f68ea54 100644
--- a/sys/contrib/device-tree/Bindings/rng/omap_rng.yaml
+++ b/sys/contrib/device-tree/Bindings/rng/omap_rng.yaml
@@ -30,8 +30,8 @@ properties:
clocks:
minItems: 1
items:
- - description: EIP150 gatable clock
- - description: Main gatable clock
+ - description: EIP150 gateable clock
+ - description: Main gateable clock
clock-names:
minItems: 1
diff --git a/sys/contrib/device-tree/Bindings/rng/st,stm32-rng.yaml b/sys/contrib/device-tree/Bindings/rng/st,stm32-rng.yaml
index 187b172d0cca..717f6b321f88 100644
--- a/sys/contrib/device-tree/Bindings/rng/st,stm32-rng.yaml
+++ b/sys/contrib/device-tree/Bindings/rng/st,stm32-rng.yaml
@@ -15,7 +15,9 @@ maintainers:
properties:
compatible:
- const: st,stm32-rng
+ enum:
+ - st,stm32-rng
+ - st,stm32mp13-rng
reg:
maxItems: 1
@@ -30,11 +32,27 @@ properties:
type: boolean
description: If set enable the clock detection management
+ st,rng-lock-conf:
+ type: boolean
+ description: If set, the RNG configuration in RNG_CR, RNG_HTCR and
+ RNG_NSCR will be locked.
+
required:
- compatible
- reg
- clocks
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,stm32-rng
+ then:
+ properties:
+ st,rng-lock-conf: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/rng/starfive,jh7110-trng.yaml b/sys/contrib/device-tree/Bindings/rng/starfive,jh7110-trng.yaml
index 2b76ce25acc4..4639247e9e51 100644
--- a/sys/contrib/device-tree/Bindings/rng/starfive,jh7110-trng.yaml
+++ b/sys/contrib/device-tree/Bindings/rng/starfive,jh7110-trng.yaml
@@ -11,7 +11,11 @@ maintainers:
properties:
compatible:
- const: starfive,jh7110-trng
+ oneOf:
+ - items:
+ - const: starfive,jh8100-trng
+ - const: starfive,jh7110-trng
+ - const: starfive,jh7110-trng
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/rtc/adi,max31335.yaml b/sys/contrib/device-tree/Bindings/rtc/adi,max31335.yaml
new file mode 100644
index 000000000000..0125cf6727cc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/adi,max31335.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/adi,max31335.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX31335 RTC
+
+maintainers:
+ - Antoniu Miclaus <antoniu.miclaus@analog.com>
+
+description:
+ Analog Devices MAX31335 I2C RTC ±2ppm Automotive Real-Time Clock with
+ Integrated MEMS Resonator.
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: adi,max31335
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ "#clock-cells":
+ description:
+ RTC can be used as a clock source through its clock output pin.
+ const: 0
+
+ adi,tc-diode:
+ description:
+ Select the diode configuration for the trickle charger.
+ schottky - Schottky diode in series.
+ standard+schottky - standard diode + Schottky diode in series.
+ enum: [schottky, standard+schottky]
+
+ trickle-resistor-ohms:
+ description:
+ Selected resistor for trickle charger. Should be specified if trickle
+ charger should be enabled.
+ enum: [3000, 6000, 11000]
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@68 {
+ compatible = "adi,max31335";
+ reg = <0x68>;
+ pinctrl-0 = <&rtc_nint_pins>;
+ interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>;
+ aux-voltage-chargeable = <1>;
+ trickle-resistor-ohms = <6000>;
+ adi,tc-diode = "schottky";
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/rtc/amlogic,meson6-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/amlogic,meson6-rtc.yaml
index 8bf7d3a9be98..3a4551253e3e 100644
--- a/sys/contrib/device-tree/Bindings/rtc/amlogic,meson6-rtc.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/amlogic,meson6-rtc.yaml
@@ -13,6 +13,7 @@ maintainers:
allOf:
- $ref: rtc.yaml#
- $ref: /schemas/nvmem/nvmem.yaml#
+ - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml#
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/rtc/atmel,at91rm9200-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/atmel,at91rm9200-rtc.yaml
index 4d2bef15fb7a..c8bb2eef442d 100644
--- a/sys/contrib/device-tree/Bindings/rtc/atmel,at91rm9200-rtc.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/atmel,at91rm9200-rtc.yaml
@@ -14,13 +14,17 @@ maintainers:
properties:
compatible:
- enum:
- - atmel,at91rm9200-rtc
- - atmel,at91sam9x5-rtc
- - atmel,sama5d4-rtc
- - atmel,sama5d2-rtc
- - microchip,sam9x60-rtc
- - microchip,sama7g5-rtc
+ oneOf:
+ - enum:
+ - atmel,at91rm9200-rtc
+ - atmel,at91sam9x5-rtc
+ - atmel,sama5d4-rtc
+ - atmel,sama5d2-rtc
+ - microchip,sam9x60-rtc
+ - microchip,sama7g5-rtc
+ - items:
+ - const: microchip,sam9x7-rtc
+ - const: microchip,sam9x60-rtc
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/rtc/cirrus,ep9301-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/cirrus,ep9301-rtc.yaml
new file mode 100644
index 000000000000..a95f6af2b1c0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/cirrus,ep9301-rtc.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/cirrus,ep9301-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus EP93xx Real Time Clock controller
+
+maintainers:
+ - Hartley Sweeten <hsweeten@visionengravers.com>
+ - Alexander Sverdlin <alexander.sverdlin@gmail.com>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - const: cirrus,ep9301-rtc
+ - items:
+ - enum:
+ - cirrus,ep9302-rtc
+ - cirrus,ep9307-rtc
+ - cirrus,ep9312-rtc
+ - cirrus,ep9315-rtc
+ - const: cirrus,ep9301-rtc
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ rtc@80920000 {
+ compatible = "cirrus,ep9301-rtc";
+ reg = <0x80920000 0x100>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/rtc/epson,rtc7301.yaml b/sys/contrib/device-tree/Bindings/rtc/epson,rtc7301.yaml
new file mode 100644
index 000000000000..bdb5cadb31cc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/epson,rtc7301.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/epson,rtc7301.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Epson Toyocom RTC-7301SF/DG
+
+description:
+ The only difference between the two variants is the packaging.
+ The DG variant is a DIL package, and the SF variant is a flat
+ package.
+
+maintainers:
+ - Akinobu Mita <akinobu.mita@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - epson,rtc7301dg
+ - epson,rtc7301sf
+
+ reg:
+ maxItems: 1
+
+ reg-io-width:
+ description:
+ The size (in bytes) of the IO accesses that should be performed
+ on the device.
+ enum: [1, 4]
+ default: 4
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ rtc: rtc@44a00000 {
+ compatible = "epson,rtc7301dg";
+ reg = <0x44a00000 0x10000>;
+ reg-io-width = <4>;
+ interrupt-parent = <&axi_intc_0>;
+ interrupts = <3 2>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/rtc/epson,rx8900.yaml b/sys/contrib/device-tree/Bindings/rtc/epson,rx8900.yaml
index 1df7c45d95c1..b770149c5fd6 100644
--- a/sys/contrib/device-tree/Bindings/rtc/epson,rx8900.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/epson,rx8900.yaml
@@ -29,6 +29,8 @@ properties:
trickle-diode-disable: true
+ wakeup-source: true
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/rtc/intersil,isl12022.yaml b/sys/contrib/device-tree/Bindings/rtc/intersil,isl12022.yaml
new file mode 100644
index 000000000000..c2d1441ef273
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/intersil,isl12022.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/intersil,isl12022.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil ISL12022 Real-time Clock
+
+maintainers:
+ - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+properties:
+ compatible:
+ const: isil,isl12022
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 0
+
+ isil,battery-trip-levels-microvolt:
+ description:
+ The battery voltages at which the first alarm and second alarm
+ should trigger (normally ~85% and ~75% of nominal V_BAT).
+ items:
+ - enum: [2125000, 2295000, 2550000, 2805000, 3060000, 4250000, 4675000]
+ - enum: [1875000, 2025000, 2250000, 2475000, 2700000, 3750000, 4125000]
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: rtc.yaml#
+ # If #clock-cells is present, interrupts must not be present
+ - if:
+ required:
+ - '#clock-cells'
+ then:
+ properties:
+ interrupts: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6f {
+ compatible = "isil,isl12022";
+ reg = <0x6f>;
+ interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>;
+ isil,battery-trip-levels-microvolt = <2550000>, <2250000>;
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/rtc/microcrystal,rv3032.yaml b/sys/contrib/device-tree/Bindings/rtc/microcrystal,rv3032.yaml
index 27a9de10f0af..7680089d1d92 100644
--- a/sys/contrib/device-tree/Bindings/rtc/microcrystal,rv3032.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/microcrystal,rv3032.yaml
@@ -38,6 +38,8 @@ properties:
- 3000
- 4400
+ wakeup-source: true
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/rtc/mstar,ssd202d-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/mstar,ssd202d-rtc.yaml
new file mode 100644
index 000000000000..4c1f22ef5a2c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/mstar,ssd202d-rtc.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/mstar,ssd202d-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mstar SSD202D Real Time Clock
+
+maintainers:
+ - Daniel Palmer <daniel@0x0f.com>
+ - Romain Perier <romain.perier@gmail.com>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ enum:
+ - mstar,ssd202d-rtc
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ rtc@6800 {
+ compatible = "mstar,ssd202d-rtc";
+ reg = <0x6800 0x200>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/rtc/nuvoton,ma35d1-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/nuvoton,ma35d1-rtc.yaml
new file mode 100644
index 000000000000..5e4ade803eed
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/nuvoton,ma35d1-rtc.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nuvoton,ma35d1-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton MA35D1 Real Time Clock
+
+maintainers:
+ - Min-Jen Chen <mjchen@nuvoton.com>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,ma35d1-rtc
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
+ rtc@40410000 {
+ compatible = "nuvoton,ma35d1-rtc";
+ reg = <0x40410000 0x200>;
+ interrupts = <GIC_SPI 5 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clk RTC_GATE>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2123.yaml b/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2123.yaml
new file mode 100644
index 000000000000..96e377a4d1bc
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2123.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nxp,pcf2123.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCF2123 SPI Real Time Clock
+
+maintainers:
+ - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ enum:
+ - nxp,pcf2123
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@3 {
+ compatible = "nxp,pcf2123";
+ reg = <3>;
+ interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_LOW>;
+ spi-cs-high;
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2127.yaml b/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2127.yaml
index bcb230027622..2d9fe5a75b06 100644
--- a/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2127.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/nxp,pcf2127.yaml
@@ -18,6 +18,7 @@ properties:
- nxp,pca2129
- nxp,pcf2127
- nxp,pcf2129
+ - nxp,pcf2131
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/rtc/nxp,pcf8523.yaml b/sys/contrib/device-tree/Bindings/rtc/nxp,pcf8523.yaml
new file mode 100644
index 000000000000..d11c8bc16bc0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/nxp,pcf8523.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nxp,pcf8523.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCF8523 Real Time Clock
+
+maintainers:
+ - Sam Ravnborg <sam@ravnborg.org>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: nxp,pcf8523
+
+ reg:
+ maxItems: 1
+
+ quartz-load-femtofarads:
+ description:
+ The capacitive load of the crystal, expressed in femto Farad (fF).
+ enum: [ 7000, 12500 ]
+ default: 12500
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@68 {
+ compatible = "nxp,pcf8523";
+ reg = <0x68>;
+ quartz-load-femtofarads = <7000>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml
index b95a69cc9ae0..d274bb7a534b 100644
--- a/sys/contrib/device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml
@@ -61,27 +61,27 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
- spmi_bus: spmi@c440000 {
- reg = <0x0c440000 0x1100>;
- #address-cells = <2>;
- #size-cells = <0>;
- pmicintc: pmic@0 {
- reg = <0x0 SPMI_USID>;
- compatible = "qcom,pm8921";
- interrupts = <104 8>;
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
+
+ spmi {
+ #address-cells = <2>;
#size-cells = <0>;
- pm8921_rtc: rtc@11d {
- compatible = "qcom,pm8921-rtc";
- reg = <0x11d>;
- interrupts = <0x27 0>;
- nvmem-cells = <&rtc_offset>;
- nvmem-cell-names = "offset";
+ pmic@0 {
+ compatible = "qcom,pm8941", "qcom,spmi-pmic";
+ reg = <0x0 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>, <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+ nvmem-cells = <&rtc_offset>;
+ nvmem-cell-names = "offset";
+ };
};
- };
};
...
diff --git a/sys/contrib/device-tree/Bindings/rtc/rtc-cmos.txt b/sys/contrib/device-tree/Bindings/rtc/rtc-cmos.txt
index b94b35f3600b..7d7b5f6bda65 100644
--- a/sys/contrib/device-tree/Bindings/rtc/rtc-cmos.txt
+++ b/sys/contrib/device-tree/Bindings/rtc/rtc-cmos.txt
@@ -10,7 +10,7 @@ Optional properties:
- ctrl-reg : Contains the initial value of the control register also
called "Register B".
- freq-reg : Contains the initial value of the frequency register also
- called "Regsiter A".
+ called "Register A".
"Register A" and "B" are usually initialized by the firmware (BIOS for
instance). If this is not done, it can be performed by the driver.
diff --git a/sys/contrib/device-tree/Bindings/rtc/s3c-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/s3c-rtc.yaml
index d51b236939bf..bf4e11d6dffb 100644
--- a/sys/contrib/device-tree/Bindings/rtc/s3c-rtc.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/s3c-rtc.yaml
@@ -17,6 +17,11 @@ properties:
- samsung,s3c2416-rtc
- samsung,s3c2443-rtc
- samsung,s3c6410-rtc
+ - items:
+ - enum:
+ - samsung,exynos7-rtc
+ - samsung,exynos850-rtc
+ - const: samsung,s3c6410-rtc
- const: samsung,exynos3250-rtc
deprecated: true
diff --git a/sys/contrib/device-tree/Bindings/rtc/st,m48t86.yaml b/sys/contrib/device-tree/Bindings/rtc/st,m48t86.yaml
new file mode 100644
index 000000000000..e3e12fa23380
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/rtc/st,m48t86.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/st,m48t86.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST M48T86 / Dallas DS12887 RTC with SRAM
+
+maintainers:
+ - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+allOf:
+ - $ref: rtc.yaml
+
+properties:
+ compatible:
+ enum:
+ - st,m48t86
+
+ reg:
+ items:
+ - description: index register
+ - description: data register
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ rtc@10800000 {
+ compatible = "st,m48t86";
+ reg = <0x10800000 0x1>, <0x11700000 0x1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/rtc/trivial-rtc.yaml b/sys/contrib/device-tree/Bindings/rtc/trivial-rtc.yaml
index 9af77f21bb7f..c9e3c5262c21 100644
--- a/sys/contrib/device-tree/Bindings/rtc/trivial-rtc.yaml
+++ b/sys/contrib/device-tree/Bindings/rtc/trivial-rtc.yaml
@@ -45,8 +45,8 @@ properties:
- isil,isl1208
# Intersil ISL1218 Low Power RTC with Battery Backed SRAM
- isil,isl1218
- # Intersil ISL12022 Real-time Clock
- - isil,isl12022
+ # SPI-BUS INTERFACE REAL TIME CLOCK MODULE
+ - maxim,mcp795
# Real Time Clock Module with I2C-Bus
- microcrystal,rv3029
# Real Time Clock
diff --git a/sys/contrib/device-tree/Bindings/serial/amlogic,meson-uart.yaml b/sys/contrib/device-tree/Bindings/serial/amlogic,meson-uart.yaml
index 01ec45b3b406..2e189e548327 100644
--- a/sys/contrib/device-tree/Bindings/serial/amlogic,meson-uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/amlogic,meson-uart.yaml
@@ -33,6 +33,7 @@ properties:
- amlogic,meson8b-uart
- amlogic,meson-gx-uart
- amlogic,meson-s4-uart
+ - amlogic,meson-a1-uart
- const: amlogic,meson-ao-uart
- description: Always-on power domain UART controller on G12A SoCs
items:
@@ -46,10 +47,15 @@ properties:
- amlogic,meson8b-uart
- amlogic,meson-gx-uart
- amlogic,meson-s4-uart
+ - amlogic,meson-a1-uart
- description: Everything-Else power domain UART controller on G12A SoCs
items:
- const: amlogic,meson-g12a-uart
- const: amlogic,meson-gx-uart
+ - description: UART controller on S4 compatible SoCs
+ items:
+ - const: amlogic,t7-uart
+ - const: amlogic,meson-s4-uart
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/serial/arm,dcc.yaml b/sys/contrib/device-tree/Bindings/serial/arm,dcc.yaml
new file mode 100644
index 000000000000..fd0589356617
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/serial/arm,dcc.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/arm,dcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM DCC (Data communication channel) serial emulation
+
+maintainers:
+ - Michal Simek <michal.simek@amd.com>
+
+description: |
+ ARM DCC (Data communication channel) serial emulation interface available
+ via JTAG can be also used as one of serial line tightly coupled with every
+ ARM CPU available in the system.
+
+properties:
+ compatible:
+ const: arm,dcc
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ serial {
+ compatible = "arm,dcc";
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/esp,esp32-acm.yaml b/sys/contrib/device-tree/Bindings/serial/esp,esp32-acm.yaml
new file mode 100644
index 000000000000..77fbb2c72171
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/serial/esp,esp32-acm.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/esp,esp32-acm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ESP32S3 ACM gadget controller
+
+maintainers:
+ - Max Filippov <jcmvbkbc@gmail.com>
+
+description:
+ Fixed function USB CDC-ACM gadget controller of the Espressif ESP32S3 SoC.
+
+allOf:
+ - $ref: serial.yaml#
+
+properties:
+ compatible:
+ const: esp,esp32s3-acm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ serial@60038000 {
+ compatible = "esp,esp32s3-acm";
+ reg = <0x60038000 0x1000>;
+ interrupts = <96 3 0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/esp,esp32-uart.yaml b/sys/contrib/device-tree/Bindings/serial/esp,esp32-uart.yaml
new file mode 100644
index 000000000000..2a80ca997a0c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/serial/esp,esp32-uart.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/esp,esp32-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ESP32xx UART controllers
+
+maintainers:
+ - Max Filippov <jcmvbkbc@gmail.com>
+
+description:
+ ESP32 UART controller is a part of the ESP32 SoC.
+ ESP32S3 UART controller is a part of the ESP32S3 SoC.
+ Both SoCs are produced by Espressif Systems Co. Ltd.
+
+allOf:
+ - $ref: serial.yaml#
+
+properties:
+ compatible:
+ enum:
+ - esp,esp32-uart
+ - esp,esp32s3-uart
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ serial@60000000 {
+ compatible = "esp,esp32s3-uart";
+ reg = <0x60000000 0x80>;
+ interrupts = <27 1 0>;
+ clocks = <&serial_clk>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/fsl,s32-linflexuart.yaml b/sys/contrib/device-tree/Bindings/serial/fsl,s32-linflexuart.yaml
index 920539926d7e..7a105551fa6a 100644
--- a/sys/contrib/device-tree/Bindings/serial/fsl,s32-linflexuart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/fsl,s32-linflexuart.yaml
@@ -13,7 +13,7 @@ description: |
https://www.nxp.com/webapp/Download?colCode=S32V234RM.
maintainers:
- - Chester Lin <clin@suse.com>
+ - Chester Lin <chester62515@gmail.com>
allOf:
- $ref: serial.yaml#
diff --git a/sys/contrib/device-tree/Bindings/serial/fsl-imx-uart.yaml b/sys/contrib/device-tree/Bindings/serial/fsl-imx-uart.yaml
index 40414247d61a..9c6dc16f88a6 100644
--- a/sys/contrib/device-tree/Bindings/serial/fsl-imx-uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/fsl-imx-uart.yaml
@@ -9,10 +9,6 @@ title: Freescale i.MX Universal Asynchronous Receiver/Transmitter (UART)
maintainers:
- Fabio Estevam <festevam@gmail.com>
-allOf:
- - $ref: serial.yaml#
- - $ref: rs485.yaml#
-
properties:
compatible:
oneOf:
@@ -68,7 +64,13 @@ properties:
- const: tx
interrupts:
- maxItems: 1
+ items:
+ - description: UART RX Interrupt
+ - description: UART TX Interrupt
+ - description: UART RTS Interrupt
+ minItems: 1
+
+ wakeup-source: true
fsl,dte-mode:
$ref: /schemas/types.yaml#/definitions/flag
@@ -108,6 +110,25 @@ required:
- clock-names
- interrupts
+allOf:
+ - $ref: serial.yaml#
+ - $ref: rs485.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx1-uart
+ then:
+ properties:
+ interrupts:
+ minItems: 3
+ maxItems: 3
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+
unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/serial/fsl-lpuart.yaml b/sys/contrib/device-tree/Bindings/serial/fsl-lpuart.yaml
index 93062403276b..3a5b59f5d3e3 100644
--- a/sys/contrib/device-tree/Bindings/serial/fsl-lpuart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/fsl-lpuart.yaml
@@ -25,11 +25,15 @@ properties:
- fsl,imxrt1050-lpuart
- items:
- enum:
- - fsl,imx93-lpuart
- fsl,imx8ulp-lpuart
- const: fsl,imx7ulp-lpuart
- items:
- enum:
+ - fsl,imx93-lpuart
+ - const: fsl,imx8ulp-lpuart
+ - const: fsl,imx7ulp-lpuart
+ - items:
+ - enum:
- fsl,imx8qm-lpuart
- fsl,imx8dxl-lpuart
- const: fsl,imx8qxp-lpuart
diff --git a/sys/contrib/device-tree/Bindings/serial/fsl-mxs-auart.yaml b/sys/contrib/device-tree/Bindings/serial/fsl-mxs-auart.yaml
index 6a400a5e6fc7..da032effffe6 100644
--- a/sys/contrib/device-tree/Bindings/serial/fsl-mxs-auart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/fsl-mxs-auart.yaml
@@ -14,10 +14,13 @@ allOf:
properties:
compatible:
- enum:
- - fsl,imx23-auart
- - fsl,imx28-auart
- - alphascale,asm9260-auart
+ oneOf:
+ - const: fsl,imx23-auart
+ - const: alphascale,asm9260-auart
+ - items:
+ - enum:
+ - fsl,imx28-auart
+ - const: fsl,imx23-auart
reg:
maxItems: 1
@@ -82,7 +85,7 @@ examples:
};
auart0: serial@8006a000 {
- compatible = "fsl,imx28-auart";
+ compatible = "fsl,imx28-auart", "fsl,imx23-auart";
reg = <0x8006a000 0x2000>;
interrupts = <112>;
dmas = <&dma_apbx 8>, <&dma_apbx 9>;
diff --git a/sys/contrib/device-tree/Bindings/serial/maxim,max310x.yaml b/sys/contrib/device-tree/Bindings/serial/maxim,max310x.yaml
new file mode 100644
index 000000000000..889eeaca64a0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/serial/maxim,max310x.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/maxim,max310x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX310X Advanced Universal Asynchronous Receiver-Transmitter (UART)
+
+maintainers:
+ - Hugo Villeneuve <hvilleneuve@dimonoff.com>
+
+properties:
+ compatible:
+ enum:
+ - maxim,max3107
+ - maxim,max3108
+ - maxim,max3109
+ - maxim,max14830
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ enum:
+ - xtal # External crystal
+ - osc # External clock source
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-line-names:
+ minItems: 1
+ maxItems: 16
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - $ref: /schemas/serial/serial.yaml#
+ - $ref: /schemas/serial/rs485.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ serial@2c {
+ compatible = "maxim,max3107";
+ reg = <0x2c>;
+ clocks = <&xtal4m>;
+ clock-names = "xtal";
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/nvidia,tegra20-hsuart.yaml b/sys/contrib/device-tree/Bindings/serial/nvidia,tegra20-hsuart.yaml
new file mode 100644
index 000000000000..a5d67563cd53
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/serial/nvidia,tegra20-hsuart.yaml
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/nvidia,tegra20-hsuart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra20/Tegra30 high speed (DMA based) UART controller driver
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - nvidia,tegra20-hsuart
+ - nvidia,tegra30-hsuart
+ - nvidia,tegra186-hsuart
+ - nvidia,tegra194-hsuart
+ - items:
+ - const: nvidia,tegra124-hsuart
+ - const: nvidia,tegra30-hsuart
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: module clock
+
+ resets:
+ items:
+ - description: module reset
+
+ reset-names:
+ items:
+ - const: serial
+
+ dmas:
+ items:
+ - description: DMA channel used for reception
+ - description: DMA channel used for transmission
+
+ dma-names:
+ items:
+ - const: rx
+ - const: tx
+
+ nvidia,enable-modem-interrupt:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Enable modem interrupts. Should be enable only if all 8 lines of UART controller
+ are pinmuxed.
+
+ nvidia,adjust-baud-rates:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ description: |
+ List of entries providing percentage of baud rate adjustment within a range. Each entry
+ contains a set of 3 values: range low/high and adjusted rate. When the baud rate set on the
+ controller falls within the range mentioned in this field, the baud rate will be adjusted by
+ percentage mentioned here.
+
+ Example: <9600 115200 200>
+
+ Increase baud rate by 2% when set baud rate falls within range 9600 to 115200.
+
+ Standard UART devices are expected to have tolerance for baud rate error by -4 to +4 %. All
+ Tegra devices till Tegra210 had this support. However, Tegra186 chip has a known hardware
+ issue. UART RX baud rate tolerance level is 0% to +4% in 1-stop config. Otherwise, the
+ received data will have corruption/invalid framing errors. Parker errata suggests adjusting
+ baud rate to be higher than the deviations observed in TX.
+
+ TX deviation of connected device can be captured over scope (or noted from its spec) for
+ valid range and Tegra baud rate has to be set above actual TX baud rate observed. To do this
+ we use nvidia,adjust-baud-rates.
+
+ As an example, consider there is deviation observed in TX for baud rates as listed below. 0
+ to 9600 has 1% deviation 9600 to 115200 2% deviation. This slight deviation is expcted and
+ Tegra UART is expected to handle it. Due to the issue stated above, baud rate on Tegra UART
+ should be set equal to or above deviation observed for avoiding frame errors. Property
+ should be set like this:
+
+ nvidia,adjust-baud-rates = <0 9600 100>,
+ <9600 115200 200>;
+ items:
+ items:
+ - description: range lower bound
+ - description: range upper bound
+ - description: adjustment (in permyriad, i.e. 0.01%)
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - resets
+ - reset-names
+ - dmas
+ - dma-names
+
+allOf:
+ - $ref: serial.yaml
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra30-car.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ serial@70006000 {
+ compatible = "nvidia,tegra30-hsuart";
+ reg = <0x70006000 0x40>;
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+ nvidia,enable-modem-interrupt;
+ clocks = <&tegra_car TEGRA30_CLK_UARTA>;
+ resets = <&tegra_car 6>;
+ reset-names = "serial";
+ dmas = <&apbdma 8>, <&apbdma 8>;
+ dma-names = "rx", "tx";
+ nvidia,adjust-baud-rates = <1000000 4000000 136>; /* 1.36% shift */
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.txt b/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.txt
index 0fa8e3e43bf8..1a7e4bff0456 100644
--- a/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.txt
+++ b/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.txt
@@ -23,6 +23,9 @@ Optional properties:
1 = active low.
- irda-mode-ports: An array that lists the indices of the port that
should operate in IrDA mode.
+- nxp,modem-control-line-ports: An array that lists the indices of the port that
+ should have shared GPIO lines configured as
+ modem control lines.
Example:
sc16is750: sc16is750@51 {
@@ -35,6 +38,26 @@ Example:
#gpio-cells = <2>;
};
+ sc16is752: sc16is752@53 {
+ compatible = "nxp,sc16is752";
+ reg = <0x53>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
+ gpio-controller; /* Port 0 as GPIOs */
+ #gpio-cells = <2>;
+ };
+
+ sc16is752: sc16is752@54 {
+ compatible = "nxp,sc16is752";
+ reg = <0x54>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
+ };
+
* spi as bus
Required properties:
@@ -59,6 +82,9 @@ Optional properties:
1 = active low.
- irda-mode-ports: An array that lists the indices of the port that
should operate in IrDA mode.
+- nxp,modem-control-line-ports: An array that lists the indices of the port that
+ should have shared GPIO lines configured as
+ modem control lines.
Example:
sc16is750: sc16is750@0 {
@@ -70,3 +96,23 @@ Example:
gpio-controller;
#gpio-cells = <2>;
};
+
+ sc16is752: sc16is752@1 {
+ compatible = "nxp,sc16is752";
+ reg = <1>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
+ gpio-controller; /* Port 0 as GPIOs */
+ #gpio-cells = <2>;
+ };
+
+ sc16is752: sc16is752@2 {
+ compatible = "nxp,sc16is752";
+ reg = <2>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.yaml b/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.yaml
new file mode 100644
index 000000000000..5dec15b7e7c3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/serial/nxp,sc16is7xx.yaml
@@ -0,0 +1,127 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/nxp,sc16is7xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP SC16IS7xx Advanced Universal Asynchronous Receiver-Transmitter (UART)
+
+maintainers:
+ - Hugo Villeneuve <hvilleneuve@dimonoff.com>
+
+properties:
+ compatible:
+ enum:
+ - nxp,sc16is740
+ - nxp,sc16is741
+ - nxp,sc16is750
+ - nxp,sc16is752
+ - nxp,sc16is760
+ - nxp,sc16is762
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-frequency:
+ description:
+ When there is no clock provider visible to the platform, this
+ is the source crystal or external clock frequency for the IC in Hz.
+ minimum: 1
+ maximum: 80000000
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-line-names:
+ minItems: 1
+ maxItems: 8
+
+ irda-mode-ports:
+ description: |
+ An array that lists the indices of the port that should operate in IrDA
+ mode:
+ 0: port A
+ 1: port B
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 2
+ items:
+ minimum: 0
+ maximum: 1
+
+ nxp,modem-control-line-ports:
+ description: |
+ An array that lists the indices of the port that should have shared GPIO
+ lines configured as modem control lines:
+ 0: port A
+ 1: port B
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 2
+ items:
+ minimum: 0
+ maximum: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - $ref: /schemas/serial/serial.yaml#
+ - $ref: /schemas/serial/rs485.yaml#
+
+oneOf:
+ - required:
+ - clocks
+ - required:
+ - clock-frequency
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ serial@51 {
+ compatible = "nxp,sc16is750";
+ reg = <0x51>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ serial@53 {
+ compatible = "nxp,sc16is752";
+ reg = <0x53>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
+ gpio-controller; /* Port 0 as GPIOs */
+ #gpio-cells = <2>;
+ };
+
+ serial@54 {
+ compatible = "nxp,sc16is752";
+ reg = <0x54>;
+ clocks = <&clk20m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/serial/qcom,msm-uart.yaml b/sys/contrib/device-tree/Bindings/serial/qcom,msm-uart.yaml
index a052aaef21f4..ea6abfe2d95e 100644
--- a/sys/contrib/device-tree/Bindings/serial/qcom,msm-uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/qcom,msm-uart.yaml
@@ -40,11 +40,11 @@ required:
- interrupts
- reg
-unevaluatedProperties: false
-
allOf:
- $ref: /schemas/serial/serial.yaml#
+unevaluatedProperties: false
+
examples:
- |
serial@a9c00000 {
diff --git a/sys/contrib/device-tree/Bindings/serial/qcom,msm-uartdm.yaml b/sys/contrib/device-tree/Bindings/serial/qcom,msm-uartdm.yaml
index 484b9a51f6a9..e0fa363ad7e2 100644
--- a/sys/contrib/device-tree/Bindings/serial/qcom,msm-uartdm.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/qcom,msm-uartdm.yaml
@@ -48,9 +48,17 @@ properties:
- const: tx
- const: rx
+ interconnects:
+ maxItems: 1
+
interrupts:
maxItems: 1
+ operating-points-v2: true
+
+ power-domains:
+ maxItems: 1
+
qcom,rx-crci:
$ref: /schemas/types.yaml#/definitions/uint32
description:
@@ -78,8 +86,6 @@ required:
- interrupts
- reg
-unevaluatedProperties: false
-
allOf:
- $ref: /schemas/serial/serial.yaml#
@@ -97,9 +103,13 @@ allOf:
reg:
maxItems: 1
+unevaluatedProperties: false
+
examples:
- |
+ #include <dt-bindings/interconnect/qcom,msm8996.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
serial@f991e000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
@@ -109,4 +119,7 @@ examples:
clock-names = "core", "iface";
dmas = <&dma0 0>, <&dma0 1>;
dma-names = "tx", "rx";
+ power-domains = <&rpmpd MSM8996_VDDCX>;
+ operating-points-v2 = <&uart_opp_table>;
+ interconnects = <&pnoc MASTER_BLSP_1 &bimc SLAVE_EBI_CH0>;
};
diff --git a/sys/contrib/device-tree/Bindings/serial/renesas,em-uart.yaml b/sys/contrib/device-tree/Bindings/serial/renesas,em-uart.yaml
index 3fc2601f1338..89f1eb0f2c5a 100644
--- a/sys/contrib/device-tree/Bindings/serial/renesas,em-uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/renesas,em-uart.yaml
@@ -38,6 +38,13 @@ properties:
- const: sclk
- const: pclk
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
allOf:
- $ref: serial.yaml#
@@ -53,13 +60,6 @@ allOf:
clock-names:
minItems: 2
-required:
- - compatible
- - reg
- - interrupts
- - clocks
- - clock-names
-
unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/serial/renesas,hscif.yaml b/sys/contrib/device-tree/Bindings/serial/renesas,hscif.yaml
index 1c7f1276aed6..2046e2dc0a3d 100644
--- a/sys/contrib/device-tree/Bindings/serial/renesas,hscif.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/renesas,hscif.yaml
@@ -111,8 +111,6 @@ required:
- clock-names
- power-domains
-unevaluatedProperties: false
-
if:
properties:
compatible:
@@ -125,6 +123,8 @@ then:
required:
- resets
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/clock/r8a7795-cpg-mssr.h>
diff --git a/sys/contrib/device-tree/Bindings/serial/renesas,sci.yaml b/sys/contrib/device-tree/Bindings/serial/renesas,sci.yaml
index 9f7305200c47..64d3db6e54e5 100644
--- a/sys/contrib/device-tree/Bindings/serial/renesas,sci.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/renesas,sci.yaml
@@ -17,7 +17,7 @@ properties:
oneOf:
- items:
- enum:
- - renesas,r9a07g043-sci # RZ/G2UL
+ - renesas,r9a07g043-sci # RZ/G2UL and RZ/Five
- renesas,r9a07g044-sci # RZ/G2{L,LC}
- renesas,r9a07g054-sci # RZ/V2L
- const: renesas,sci # generic SCI compatible UART
diff --git a/sys/contrib/device-tree/Bindings/serial/renesas,scif.yaml b/sys/contrib/device-tree/Bindings/serial/renesas,scif.yaml
index 99030fc18c45..4610a5bd580c 100644
--- a/sys/contrib/device-tree/Bindings/serial/renesas,scif.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/renesas,scif.yaml
@@ -79,6 +79,7 @@ properties:
- enum:
- renesas,scif-r9a07g043 # RZ/G2UL and RZ/Five
- renesas,scif-r9a07g054 # RZ/V2L
+ - renesas,scif-r9a08g045 # RZ/G3S
- const: renesas,scif-r9a07g044 # RZ/G2{L,LC} fallback
reg:
diff --git a/sys/contrib/device-tree/Bindings/serial/renesas,scifa.yaml b/sys/contrib/device-tree/Bindings/serial/renesas,scifa.yaml
index 499507678cdf..c98657cf4666 100644
--- a/sys/contrib/device-tree/Bindings/serial/renesas,scifa.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/renesas,scifa.yaml
@@ -77,8 +77,6 @@ required:
- clock-names
- power-domains
-unevaluatedProperties: false
-
if:
properties:
compatible:
@@ -89,6 +87,8 @@ then:
required:
- resets
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
diff --git a/sys/contrib/device-tree/Bindings/serial/renesas,scifb.yaml b/sys/contrib/device-tree/Bindings/serial/renesas,scifb.yaml
index 810d8a991fdd..fb695b3111ac 100644
--- a/sys/contrib/device-tree/Bindings/serial/renesas,scifb.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/renesas,scifb.yaml
@@ -77,8 +77,6 @@ required:
- clock-names
- power-domains
-unevaluatedProperties: false
-
if:
properties:
compatible:
@@ -89,6 +87,8 @@ then:
required:
- resets
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/clock/r8a7740-clock.h>
diff --git a/sys/contrib/device-tree/Bindings/serial/rs485.yaml b/sys/contrib/device-tree/Bindings/serial/rs485.yaml
index 303a443d9e29..9418fd66a8e9 100644
--- a/sys/contrib/device-tree/Bindings/serial/rs485.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/rs485.yaml
@@ -29,6 +29,10 @@ properties:
default: 0
maximum: 100
+ rs485-rts-active-high:
+ description: drive RTS high when sending (this is the default).
+ $ref: /schemas/types.yaml#/definitions/flag
+
rs485-rts-active-low:
description: drive RTS low when sending (default is high).
$ref: /schemas/types.yaml#/definitions/flag
diff --git a/sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml b/sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml
index 8bd88d5cbb11..133259ed3a34 100644
--- a/sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml
@@ -18,20 +18,29 @@ description: |+
properties:
compatible:
oneOf:
- - items:
- - const: samsung,exynosautov9-uart
- - const: samsung,exynos850-uart
- enum:
- apple,s5l-uart
- axis,artpec8-uart
- - samsung,s3c2410-uart
- - samsung,s3c2412-uart
- - samsung,s3c2440-uart
+ - google,gs101-uart
- samsung,s3c6400-uart
- samsung,s5pv210-uart
- samsung,exynos4210-uart
- samsung,exynos5433-uart
- samsung,exynos850-uart
+ - items:
+ - enum:
+ - samsung,exynos7-uart
+ - tesla,fsd-uart
+ - const: samsung,exynos4210-uart
+ - items:
+ - enum:
+ - samsung,exynos7885-uart
+ - const: samsung,exynos5433-uart
+ - items:
+ - enum:
+ - samsung,exynosautov9-uart
+ - samsung,exynosautov920-uart
+ - const: samsung,exynos850-uart
reg:
maxItems: 1
@@ -86,8 +95,6 @@ required:
- interrupts
- reg
-unevaluatedProperties: false
-
allOf:
- $ref: serial.yaml#
@@ -96,7 +103,6 @@ allOf:
compatible:
contains:
enum:
- - samsung,s3c2410-uart
- samsung,s5pv210-uart
then:
properties:
@@ -128,6 +134,18 @@ allOf:
- const: uart
- const: clk_uart_baud0
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - google,gs101-uart
+ then:
+ required:
+ - samsung,uart-fifosize
+
+unevaluatedProperties: false
+
examples:
- |
#include <dt-bindings/clock/samsung,s3c64xx-clock.h>
diff --git a/sys/contrib/device-tree/Bindings/serial/serial.yaml b/sys/contrib/device-tree/Bindings/serial/serial.yaml
index ea277560a596..65804ca274ae 100644
--- a/sys/contrib/device-tree/Bindings/serial/serial.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/serial.yaml
@@ -87,16 +87,8 @@ properties:
description:
TX FIFO threshold configuration (in bytes).
-if:
- required:
- - uart-has-rtscts
-then:
- properties:
- cts-gpios: false
- rts-gpios: false
-
patternProperties:
- "^bluetooth|gnss|gps|mcu$":
+ "^(bluetooth|bluetooth-gnss|gnss|gps|mcu)$":
if:
type: object
then:
@@ -136,6 +128,14 @@ patternProperties:
required:
- compatible
+if:
+ required:
+ - uart-has-rtscts
+then:
+ properties:
+ cts-gpios: false
+ rts-gpios: false
+
additionalProperties: true
examples:
diff --git a/sys/contrib/device-tree/Bindings/serial/snps-dw-apb-uart.yaml b/sys/contrib/device-tree/Bindings/serial/snps-dw-apb-uart.yaml
index 3862411c77b5..1001d2a6ace8 100644
--- a/sys/contrib/device-tree/Bindings/serial/snps-dw-apb-uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/snps-dw-apb-uart.yaml
@@ -11,6 +11,7 @@ maintainers:
allOf:
- $ref: serial.yaml#
+ - $ref: rs485.yaml#
properties:
compatible:
@@ -117,7 +118,6 @@ properties:
required:
- compatible
- reg
- - interrupts
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/serial/sprd-uart.yaml b/sys/contrib/device-tree/Bindings/serial/sprd-uart.yaml
index 28ff77aa86c8..f4dbb6dc2b6e 100644
--- a/sys/contrib/device-tree/Bindings/serial/sprd-uart.yaml
+++ b/sys/contrib/device-tree/Bindings/serial/sprd-uart.yaml
@@ -20,6 +20,7 @@ properties:
- sprd,sc9860-uart
- sprd,sc9863a-uart
- sprd,ums512-uart
+ - sprd,ums9620-uart
- const: sprd,sc9836-uart
- const: sprd,sc9836-uart
diff --git a/sys/contrib/device-tree/Bindings/serial/st-asc.txt b/sys/contrib/device-tree/Bindings/serial/st-asc.txt
index 75d877f5968f..a1b9b6f3490a 100644
--- a/sys/contrib/device-tree/Bindings/serial/st-asc.txt
+++ b/sys/contrib/device-tree/Bindings/serial/st-asc.txt
@@ -8,7 +8,7 @@ Required properties:
Optional properties:
- st,hw-flow-ctrl bool flag to enable hardware flow control.
-- st,force-m1 bool flat to force asc to be in Mode-1 recommeded
+- st,force-m1 bool flat to force asc to be in Mode-1 recommended
for high bit rates (above 19.2K)
Example:
serial@fe440000{
diff --git a/sys/contrib/device-tree/Bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/sys/contrib/device-tree/Bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
new file mode 100644
index 000000000000..c6bce40946d4
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
@@ -0,0 +1,193 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson System Control registers
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - amlogic,meson-gx-hhi-sysctrl
+ - amlogic,meson-gx-ao-sysctrl
+ - amlogic,meson-axg-hhi-sysctrl
+ - amlogic,meson-axg-ao-sysctrl
+ - const: simple-mfd
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ clock-controller:
+ type: object
+
+ power-controller:
+ $ref: /schemas/power/amlogic,meson-ee-pwrc.yaml
+
+ pinctrl:
+ type: object
+
+ phy:
+ type: object
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ enum:
+ - amlogic,meson-gx-hhi-sysctrl
+ - amlogic,meson-axg-hhi-sysctrl
+ then:
+ properties:
+ clock-controller:
+ $ref: /schemas/clock/amlogic,gxbb-clkc.yaml#
+
+ required:
+ - power-controller
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - amlogic,meson-gx-ao-sysctrl
+ - amlogic,meson-axg-ao-sysctrl
+ then:
+ properties:
+ clock-controller:
+ $ref: /schemas/clock/amlogic,gxbb-aoclkc.yaml#
+
+ power-controller: false
+ phy: false
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - amlogic,meson-gx-hhi-sysctrl
+ then:
+ properties:
+ phy: false
+
+ - if:
+ properties:
+ compatible:
+ enum:
+ - amlogic,meson-axg-hhi-sysctrl
+ then:
+ properties:
+ phy:
+ oneOf:
+ - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
+ - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
+
+required:
+ - compatible
+ - reg
+ - clock-controller
+
+additionalProperties: false
+
+examples:
+ - |
+ bus@c883c000 {
+ compatible = "simple-bus";
+ reg = <0xc883c000 0x2000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0xc883c000 0x2000>;
+
+ sysctrl: system-controller@0 {
+ compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
+ reg = <0 0x400>;
+
+ clock-controller {
+ compatible = "amlogic,gxbb-clkc";
+ #clock-cells = <1>;
+ clocks = <&xtal>;
+ clock-names = "xtal";
+ };
+
+ power-controller {
+ compatible = "amlogic,meson-gxbb-pwrc";
+ #power-domain-cells = <1>;
+ amlogic,ao-sysctrl = <&sysctrl_AO>;
+
+ resets = <&reset_viu>,
+ <&reset_venc>,
+ <&reset_vcbus>,
+ <&reset_bt656>,
+ <&reset_dvin>,
+ <&reset_rdma>,
+ <&reset_venci>,
+ <&reset_vencp>,
+ <&reset_vdac>,
+ <&reset_vdi6>,
+ <&reset_vencl>,
+ <&reset_vid_lock>;
+ reset-names = "viu", "venc", "vcbus", "bt656", "dvin",
+ "rdma", "venci", "vencp", "vdac", "vdi6",
+ "vencl", "vid_lock";
+ clocks = <&clk_vpu>, <&clk_vapb>;
+ clock-names = "vpu", "vapb";
+ };
+ };
+ };
+
+ bus@c8100000 {
+ compatible = "simple-bus";
+ reg = <0xc8100000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0xc8100000 0x100000>;
+
+ sysctrl_AO: system-controller@0 {
+ compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
+ reg = <0 0x100>;
+
+ clock-controller {
+ compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ clocks = <&xtal>, <&clk81>;
+ clock-names = "xtal", "mpeg-clk";
+ };
+ };
+ };
+
+ - |
+ system-controller@ff63c000 {
+ compatible = "amlogic,meson-axg-hhi-sysctrl", "simple-mfd", "syscon";
+ reg = <0xff63c000 0x400>;
+
+ clock-controller {
+ compatible = "amlogic,axg-clkc";
+ #clock-cells = <1>;
+ clocks = <&xtal>;
+ clock-names = "xtal";
+ };
+
+ power-controller {
+ compatible = "amlogic,meson-axg-pwrc";
+ #power-domain-cells = <1>;
+ amlogic,ao-sysctrl = <&sysctrl_AO>;
+
+ resets = <&reset_viu>,
+ <&reset_venc>,
+ <&reset_vcbus>,
+ <&reset_vencl>,
+ <&reset_vid_lock>;
+ reset-names = "viu", "venc", "vcbus", "vencl", "vid_lock";
+ clocks = <&clk_vpu>, <&clk_vapb>;
+ clock-names = "vpu", "vapb";
+ };
+
+ phy {
+ compatible = "amlogic,axg-mipi-pcie-analog-phy";
+ #phy-cells = <0>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/aspeed/uart-routing.yaml b/sys/contrib/device-tree/Bindings/soc/aspeed/uart-routing.yaml
index 6876407124dc..51aaf34acb32 100644
--- a/sys/contrib/device-tree/Bindings/soc/aspeed/uart-routing.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/aspeed/uart-routing.yaml
@@ -3,8 +3,8 @@
# # Copyright (c) 2021 Aspeed Technology Inc.
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/soc/aspeed/uart-routing.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/soc/aspeed/uart-routing.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Aspeed UART Routing Controller
diff --git a/sys/contrib/device-tree/Bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml b/sys/contrib/device-tree/Bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml
index ec888f48cac8..e802e25923aa 100644
--- a/sys/contrib/device-tree/Bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml
@@ -64,6 +64,7 @@ patternProperties:
description:
A channel managed by this controller
type: object
+ additionalProperties: false
properties:
reg:
@@ -100,6 +101,32 @@ patternProperties:
Channel assigned Rx time-slots within the Rx time-slots routed by the
TSA to this cell.
+ compatible:
+ items:
+ - enum:
+ - fsl,mpc885-scc-qmc-hdlc
+ - fsl,mpc866-scc-qmc-hdlc
+ - const: fsl,cpm1-scc-qmc-hdlc
+ - const: fsl,qmc-hdlc
+
+ fsl,framer:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ phandle to the framer node. The framer is in charge of an E1/T1 line
+ interface connected to the TDM bus. It can be used to get the E1/T1 line
+ status such as link up/down.
+
+ allOf:
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ const: fsl,qmc-hdlc
+ then:
+ properties:
+ fsl,framer: false
+
required:
- reg
- fsl,tx-ts-mask
@@ -137,7 +164,7 @@ examples:
channel@16 {
/* Ch16 : First 4 even TS from all routed from TSA */
reg = <16>;
- fsl,mode = "transparent";
+ fsl,operational-mode = "transparent";
fsl,reverse-data;
fsl,tx-ts-mask = <0x00000000 0x000000aa>;
fsl,rx-ts-mask = <0x00000000 0x000000aa>;
@@ -146,7 +173,7 @@ examples:
channel@17 {
/* Ch17 : First 4 odd TS from all routed from TSA */
reg = <17>;
- fsl,mode = "transparent";
+ fsl,operational-mode = "transparent";
fsl,reverse-data;
fsl,tx-ts-mask = <0x00000000 0x00000055>;
fsl,rx-ts-mask = <0x00000000 0x00000055>;
@@ -154,9 +181,13 @@ examples:
channel@19 {
/* Ch19 : 8 TS (TS 8..15) from all routed from TSA */
+ compatible = "fsl,mpc885-scc-qmc-hdlc",
+ "fsl,cpm1-scc-qmc-hdlc",
+ "fsl,qmc-hdlc";
reg = <19>;
- fsl,mode = "hdlc";
+ fsl,operational-mode = "hdlc";
fsl,tx-ts-mask = <0x00000000 0x0000ff00>;
fsl,rx-ts-mask = <0x00000000 0x0000ff00>;
+ fsl,framer = <&framer>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/soc/intel/intel,hps-copy-engine.yaml b/sys/contrib/device-tree/Bindings/soc/intel/intel,hps-copy-engine.yaml
index 8634865015cd..ceb81646fe75 100644
--- a/sys/contrib/device-tree/Bindings/soc/intel/intel,hps-copy-engine.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/intel/intel,hps-copy-engine.yaml
@@ -2,8 +2,8 @@
# Copyright (C) 2022, Intel Corporation
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/soc/intel/intel,hps-copy-engine.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/soc/intel/intel,hps-copy-engine.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel HPS Copy Engine
diff --git a/sys/contrib/device-tree/Bindings/soc/litex/litex,soc-controller.yaml b/sys/contrib/device-tree/Bindings/soc/litex/litex,soc-controller.yaml
index ecae9fa8561b..a64406ca17b5 100644
--- a/sys/contrib/device-tree/Bindings/soc/litex/litex,soc-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/litex/litex,soc-controller.yaml
@@ -2,8 +2,8 @@
# Copyright 2020 Antmicro <www.antmicro.com>
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/soc/litex/litex,soc-controller.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/soc/litex/litex,soc-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LiteX SoC Controller driver
diff --git a/sys/contrib/device-tree/Bindings/soc/loongson/loongson,ls2k-pmc.yaml b/sys/contrib/device-tree/Bindings/soc/loongson/loongson,ls2k-pmc.yaml
new file mode 100644
index 000000000000..510f6cb0f084
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/loongson/loongson,ls2k-pmc.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson-2 Power Manager controller
+
+maintainers:
+ - Yinbo Zhu <zhuyinbo@loongson.cn>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: loongson,ls2k0500-pmc
+ - const: syscon
+ - items:
+ - enum:
+ - loongson,ls2k1000-pmc
+ - loongson,ls2k2000-pmc
+ - const: loongson,ls2k0500-pmc
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ loongson,suspend-address:
+ $ref: /schemas/types.yaml#/definitions/uint64
+ description:
+ The "loongson,suspend-address" is a deep sleep state (Suspend To
+ RAM) firmware entry address which was jumped from kernel and it's
+ value was dependent on specific platform firmware code. In
+ addition, the PM need according to it to indicate that current
+ SoC whether support Suspend To RAM.
+
+ syscon-poweroff:
+ $ref: /schemas/power/reset/syscon-poweroff.yaml#
+ type: object
+ description:
+ Node for power off method
+
+ syscon-reboot:
+ $ref: /schemas/power/reset/syscon-reboot.yaml#
+ type: object
+ description:
+ Node for reboot method
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ power-management@1fe27000 {
+ compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
+ reg = <0x1fe27000 0x58>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+ loongson,suspend-address = <0x0 0x1c000500>;
+
+ syscon-reboot {
+ compatible = "syscon-reboot";
+ offset = <0x30>;
+ mask = <0x1>;
+ };
+
+ syscon-poweroff {
+ compatible = "syscon-poweroff";
+ regmap = <&pmc>;
+ offset = <0x14>;
+ mask = <0x3c00>;
+ value = <0x3c00>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,mt7986-wo-ccif.yaml b/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,mt7986-wo-ccif.yaml
index 8e6ba2ec8a43..3b212f26abc5 100644
--- a/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,mt7986-wo-ccif.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,mt7986-wo-ccif.yaml
@@ -12,7 +12,7 @@ maintainers:
description:
The MediaTek wo-ccif provides a configuration interface for WED WO
- controller used to perfrom offload rx packet processing (e.g. 802.11
+ controller used to perform offload rx packet processing (e.g. 802.11
aggregation packet reordering or rx header translation) on MT7986 soc.
properties:
@@ -20,6 +20,7 @@ properties:
items:
- enum:
- mediatek,mt7986-wo-ccif
+ - mediatek,mt7988-wo-ccif
- const: syscon
reg:
diff --git a/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,pwrap.yaml b/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,pwrap.yaml
index a06ac2177444..4737e5f45d54 100644
--- a/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,pwrap.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,pwrap.yaml
@@ -41,7 +41,6 @@ properties:
- mediatek,mt8173-pwrap
- mediatek,mt8183-pwrap
- mediatek,mt8186-pwrap
- - mediatek,mt8188-pwrap
- mediatek,mt8195-pwrap
- mediatek,mt8365-pwrap
- mediatek,mt8516-pwrap
@@ -50,6 +49,11 @@ properties:
- mediatek,mt8186-pwrap
- mediatek,mt8195-pwrap
- const: syscon
+ - items:
+ - enum:
+ - mediatek,mt8188-pwrap
+ - const: mediatek,mt8195-pwrap
+ - const: syscon
reg:
minItems: 1
diff --git a/sys/contrib/device-tree/Bindings/soc/mediatek/mtk-svs.yaml b/sys/contrib/device-tree/Bindings/soc/mediatek/mtk-svs.yaml
index f21eb907ee90..742b91d1d28e 100644
--- a/sys/contrib/device-tree/Bindings/soc/mediatek/mtk-svs.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/mediatek/mtk-svs.yaml
@@ -22,7 +22,10 @@ properties:
compatible:
enum:
- mediatek,mt8183-svs
+ - mediatek,mt8186-svs
+ - mediatek,mt8188-svs
- mediatek,mt8192-svs
+ - mediatek,mt8195-svs
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/soc/microchip/microchip,mpfs-sys-controller.yaml b/sys/contrib/device-tree/Bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
index 04ffee3a7c59..a3fa04f3a1bd 100644
--- a/sys/contrib/device-tree/Bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/microchip/microchip,mpfs-sys-controller.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
PolarFire SoC devices include a microcontroller acting as the system controller,
which provides "services" to the main processor and to the FPGA fabric. These
- services include hardware rng, reprogramming of the FPGA and verfification of the
+ services include hardware rng, reprogramming of the FPGA and verification of the
eNVM contents etc. More information on these services can be found online, at
https://onlinedocs.microchip.com/pr/GUID-1409CF11-8EF9-4C24-A94E-70979A688632-en-US-1/index.html
@@ -26,6 +26,16 @@ properties:
compatible:
const: microchip,mpfs-sys-controller
+ microchip,bitstream-flash:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ The SPI flash connected to the system controller's QSPI controller.
+ The system controller may retrieve FPGA bitstreams from this flash to
+ perform In-Application Programming (IAP) or during device initialisation
+ for Auto Update. The MSS and system controller have separate QSPI
+ controllers and this flash is connected to both. Software running in the
+ MSS can write bitstreams to the flash.
+
required:
- compatible
- mboxes
diff --git a/sys/contrib/device-tree/Bindings/soc/nuvoton/nuvoton,gfxi.yaml b/sys/contrib/device-tree/Bindings/soc/nuvoton/nuvoton,gfxi.yaml
new file mode 100644
index 000000000000..0222a43977ab
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/nuvoton/nuvoton,gfxi.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/nuvoton/nuvoton,gfxi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Graphics Core Information block in Nuvoton SoCs
+
+maintainers:
+ - Joseph Liu <kwliu@nuvoton.com>
+ - Marvin Lin <kflin@nuvoton.com>
+
+description:
+ The Graphics Core Information (GFXI) are a block of registers in Nuvoton SoCs
+ that analyzes Graphics core behavior and provides information in registers.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - nuvoton,npcm750-gfxi
+ - nuvoton,npcm845-gfxi
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ gfxi: gfxi@e000 {
+ compatible = "nuvoton,npcm750-gfxi", "syscon";
+ reg = <0xe000 0x100>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,aoss-qmp.yaml b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,aoss-qmp.yaml
index 9dc8e48c8af4..b4478f417edc 100644
--- a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,aoss-qmp.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,aoss-qmp.yaml
@@ -38,6 +38,8 @@ properties:
- qcom,sm8350-aoss-qmp
- qcom,sm8450-aoss-qmp
- qcom,sm8550-aoss-qmp
+ - qcom,sm8650-aoss-qmp
+ - qcom,x1e80100-aoss-qmp
- const: qcom,aoss-qmp
reg:
@@ -77,7 +79,7 @@ patternProperties:
description:
The AOSS side channel also provides the controls for three cooling devices,
these are expressed as subnodes of the QMP node. The name of the node is
- used to identify the resource and must therefor be "cx", "mx" or "ebi".
+ used to identify the resource and must therefore be "cx", "mx" or "ebi".
properties:
"#cooling-cells":
diff --git a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,geni-se.yaml b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,geni-se.yaml
index 8a4b7ba3aaf6..7b031ef09669 100644
--- a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,geni-se.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,geni-se.yaml
@@ -52,6 +52,8 @@ properties:
iommus:
maxItems: 1
+ dma-coherent: true
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,pmic-glink.yaml b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,pmic-glink.yaml
index 6440dc801387..61df97ffe1e4 100644
--- a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,pmic-glink.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,pmic-glink.yaml
@@ -20,14 +20,20 @@ description:
properties:
compatible:
- items:
- - enum:
- - qcom,sc8180x-pmic-glink
- - qcom,sc8280xp-pmic-glink
- - qcom,sm8350-pmic-glink
- - qcom,sm8450-pmic-glink
- - qcom,sm8550-pmic-glink
- - const: qcom,pmic-glink
+ oneOf:
+ - items:
+ - enum:
+ - qcom,sc8180x-pmic-glink
+ - qcom,sc8280xp-pmic-glink
+ - qcom,sm8350-pmic-glink
+ - qcom,sm8450-pmic-glink
+ - qcom,sm8550-pmic-glink
+ - const: qcom,pmic-glink
+ - items:
+ - enum:
+ - qcom,sm8650-pmic-glink
+ - const: qcom,sm8550-pmic-glink
+ - const: qcom,pmic-glink
'#address-cells':
const: 1
@@ -35,21 +41,34 @@ properties:
'#size-cells':
const: 0
+ orientation-gpios:
+ description: Array of input gpios for the Type-C connector orientation indication.
+ The GPIO indication is used to detect the orientation of the Type-C connector.
+ The array should contain a gpio entry for each PMIC Glink connector, in reg order.
+ It is defined that GPIO active level means "CC2" or Reversed/Flipped orientation.
+
patternProperties:
'^connector@\d$':
$ref: /schemas/connector/usb-connector.yaml#
-
- properties:
- reg: true
-
required:
- reg
- unevaluatedProperties: false
-
required:
- compatible
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8450-pmic-glink
+ - qcom,sm8550-pmic-glink
+ then:
+ properties:
+ orientation-gpios: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd-rpm.yaml b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd-rpm.yaml
index 65c02a7fef80..2fa725b8af5d 100644
--- a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd-rpm.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd-rpm.yaml
@@ -34,22 +34,27 @@ properties:
- qcom,rpm-apq8084
- qcom,rpm-ipq6018
- qcom,rpm-ipq9574
+ - qcom,rpm-mdm9607
- qcom,rpm-msm8226
+ - qcom,rpm-msm8610
- qcom,rpm-msm8909
- qcom,rpm-msm8916
+ - qcom,rpm-msm8917
- qcom,rpm-msm8936
+ - qcom,rpm-msm8937
+ - qcom,rpm-msm8952
- qcom,rpm-msm8953
- qcom,rpm-msm8974
- qcom,rpm-msm8976
- qcom,rpm-msm8994
- qcom,rpm-msm8996
- qcom,rpm-msm8998
+ - qcom,rpm-qcm2290
+ - qcom,rpm-qcs404
- qcom,rpm-sdm660
- qcom,rpm-sm6115
- qcom,rpm-sm6125
- qcom,rpm-sm6375
- - qcom,rpm-qcm2290
- - qcom,rpm-qcs404
clock-controller:
$ref: /schemas/clock/qcom,rpmcc.yaml#
@@ -81,12 +86,18 @@ if:
contains:
enum:
- qcom,rpm-apq8084
+ - qcom,rpm-mdm9607
- qcom,rpm-msm8226
+ - qcom,rpm-msm8610
+ - qcom,rpm-msm8909
- qcom,rpm-msm8916
+ - qcom,rpm-msm8917
- qcom,rpm-msm8936
+ - qcom,rpm-msm8937
+ - qcom,rpm-msm8952
+ - qcom,rpm-msm8953
- qcom,rpm-msm8974
- qcom,rpm-msm8976
- - qcom,rpm-msm8953
- qcom,rpm-msm8994
then:
properties:
@@ -109,10 +120,10 @@ examples:
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
- smd {
- compatible = "qcom,smd";
+ remoteproc {
+ compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc";
- rpm {
+ smd-edge {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs 8 0>;
qcom,smd-edge = <15>;
diff --git a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd.yaml b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd.yaml
index 063e595c12f7..4819ce90d206 100644
--- a/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd.yaml
@@ -15,6 +15,12 @@ description:
The Qualcomm Shared Memory Driver is a FIFO based communication channel for
sending data between the various subsystems in Qualcomm platforms.
+ Using the top-level SMD node is deprecated. Instead, the SMD edges are defined
+ directly below the device node representing the respective remote subsystem
+ or remote processor.
+
+deprecated: true
+
properties:
compatible:
const: qcom,smd
@@ -37,6 +43,7 @@ examples:
# The following example represents a smd node, with one edge representing the
# "rpm" subsystem. For the "rpm" subsystem we have a device tied to the
# "rpm_request" channel.
+ # NOTE: This is deprecated, represent the RPM using "qcom,rpm-proc" instead.
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/sys/contrib/device-tree/Bindings/soc/qcom/qcom-stats.yaml b/sys/contrib/device-tree/Bindings/soc/qcom/qcom-stats.yaml
index 96a7f1822022..686a7ef2f48a 100644
--- a/sys/contrib/device-tree/Bindings/soc/qcom/qcom-stats.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/qcom/qcom-stats.yaml
@@ -31,10 +31,24 @@ properties:
reg:
maxItems: 1
+ qcom,qmp:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: Reference to the AOSS side-channel message RAM
+
required:
- compatible
- reg
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ const: qcom,rpmh-stats
+ then:
+ properties:
+ qcom,qmp: false
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/soc/renesas/renesas,rzg2l-sysc.yaml b/sys/contrib/device-tree/Bindings/soc/renesas/renesas,rzg2l-sysc.yaml
index 398663d21ab1..4386b2c3fa4d 100644
--- a/sys/contrib/device-tree/Bindings/soc/renesas/renesas,rzg2l-sysc.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/renesas/renesas,rzg2l-sysc.yaml
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/soc/renesas/renesas,rzg2l-sysc.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/soc/renesas/renesas,rzg2l-sysc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas RZ/{G2L,V2L} System Controller (SYSC)
@@ -23,6 +23,7 @@ properties:
- renesas,r9a07g043-sysc # RZ/G2UL and RZ/Five
- renesas,r9a07g044-sysc # RZ/G2{L,LC}
- renesas,r9a07g054-sysc # RZ/V2L
+ - renesas,r9a08g045-sysc # RZ/G3S
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/soc/renesas/renesas.yaml b/sys/contrib/device-tree/Bindings/soc/renesas/renesas.yaml
index 53b95f348f8e..16ca3ff7b1ae 100644
--- a/sys/contrib/device-tree/Bindings/soc/renesas/renesas.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/renesas/renesas.yaml
@@ -302,7 +302,7 @@ properties:
- description: R-Car E3 (R8A77990)
items:
- enum:
- - renesas,ebisu # Ebisu (RTP0RC77990SEB0010S)
+ - renesas,ebisu # Ebisu (RTP0RC77990SEB0010S), Ebisu-4D (RTP0RC77990SEB0020S)
- const: renesas,r8a77990
- description: R-Car D3 (R8A77995)
@@ -335,6 +335,13 @@ properties:
- const: renesas,spider-cpu
- const: renesas,r8a779f0
+ - description: R-Car S4-8 (R8A779F4)
+ items:
+ - enum:
+ - renesas,s4sk # R-Car S4 Starter Kit board (Y-ASK-RCAR-S4-1000BASE-T#WS12)
+ - const: renesas,r8a779f4
+ - const: renesas,r8a779f0
+
- description: R-Car V4H (R8A779G0)
items:
- enum:
@@ -474,6 +481,25 @@ properties:
- renesas,rzv2mevk2 # RZ/V2M Eval Board v2.0
- const: renesas,r9a09g011
+ - description: RZ/G3S (R9A08G045)
+ items:
+ - enum:
+ - renesas,r9a08g045s33 # PCIe support
+ - const: renesas,r9a08g045
+
+ - description: RZ/G3S SMARC Module (SoM)
+ items:
+ - const: renesas,rzg3s-smarcm # RZ/G3S SMARC Module (SoM)
+ - const: renesas,r9a08g045s33 # PCIe support
+ - const: renesas,r9a08g045
+
+ - description: RZ SMARC Carrier-II Evaluation Kit
+ items:
+ - const: renesas,smarc2-evk # RZ SMARC Carrier-II EVK
+ - const: renesas,rzg3s-smarcm # RZ/G3S SMARC SoM
+ - const: renesas,r9a08g045s33 # PCIe support
+ - const: renesas,r9a08g045
+
additionalProperties: true
...
diff --git a/sys/contrib/device-tree/Bindings/soc/rockchip/grf.yaml b/sys/contrib/device-tree/Bindings/soc/rockchip/grf.yaml
index e4fa6a07b4fa..9793ea6f0fe6 100644
--- a/sys/contrib/device-tree/Bindings/soc/rockchip/grf.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/rockchip/grf.yaml
@@ -28,6 +28,8 @@ properties:
- rockchip,rk3588-sys-grf
- rockchip,rk3588-pcie3-phy-grf
- rockchip,rk3588-pcie3-pipe-grf
+ - rockchip,rk3588-vo-grf
+ - rockchip,rk3588-vop-grf
- rockchip,rv1108-usbgrf
- const: syscon
- items:
@@ -233,6 +235,7 @@ allOf:
- rockchip,rk3399-grf
- rockchip,rk3399-pmugrf
- rockchip,rk3568-pmugrf
+ - rockchip,rk3588-pmugrf
- rockchip,rv1108-grf
- rockchip,rv1108-pmugrf
diff --git a/sys/contrib/device-tree/Bindings/soc/samsung/exynos-pmu.yaml b/sys/contrib/device-tree/Bindings/soc/samsung/exynos-pmu.yaml
index e1d716df5dfa..15fcd8f1d8bc 100644
--- a/sys/contrib/device-tree/Bindings/soc/samsung/exynos-pmu.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/samsung/exynos-pmu.yaml
@@ -15,6 +15,7 @@ select:
compatible:
contains:
enum:
+ - google,gs101-pmu
- samsung,exynos3250-pmu
- samsung,exynos4210-pmu
- samsung,exynos4212-pmu
@@ -35,6 +36,7 @@ properties:
oneOf:
- items:
- enum:
+ - google,gs101-pmu
- samsung,exynos3250-pmu
- samsung,exynos4210-pmu
- samsung,exynos4212-pmu
@@ -50,6 +52,14 @@ properties:
- const: syscon
- items:
- enum:
+ - samsung,exynos7885-pmu
+ - samsung,exynosautov9-pmu
+ - samsung,exynosautov920-pmu
+ - tesla,fsd-pmu
+ - const: samsung,exynos7-pmu
+ - const: syscon
+ - items:
+ - enum:
- samsung,exynos3250-pmu
- samsung,exynos4210-pmu
- samsung,exynos4212-pmu
diff --git a/sys/contrib/device-tree/Bindings/soc/samsung/exynos-usi.yaml b/sys/contrib/device-tree/Bindings/soc/samsung/exynos-usi.yaml
index a6836904a4f8..8b478d6cdc30 100644
--- a/sys/contrib/device-tree/Bindings/soc/samsung/exynos-usi.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/samsung/exynos-usi.yaml
@@ -24,7 +24,10 @@ properties:
compatible:
oneOf:
- items:
- - const: samsung,exynosautov9-usi
+ - enum:
+ - google,gs101-usi
+ - samsung,exynosautov9-usi
+ - samsung,exynosautov920-usi
- const: samsung,exynos850-usi
- enum:
- samsung,exynos850-usi
@@ -155,7 +158,7 @@ examples:
};
hsi2c_0: i2c@13820000 {
- compatible = "samsung,exynosautov9-hsi2c";
+ compatible = "samsung,exynos850-hsi2c", "samsung,exynosautov9-hsi2c";
reg = <0x13820000 0xc0>;
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/Bindings/soc/samsung/samsung,exynos-sysreg.yaml b/sys/contrib/device-tree/Bindings/soc/samsung/samsung,exynos-sysreg.yaml
index 163e912e9cad..1794e3799f21 100644
--- a/sys/contrib/device-tree/Bindings/soc/samsung/samsung,exynos-sysreg.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/samsung/samsung,exynos-sysreg.yaml
@@ -14,9 +14,14 @@ properties:
oneOf:
- items:
- enum:
+ - google,gs101-apm-sysreg
+ - google,gs101-peric0-sysreg
+ - google,gs101-peric1-sysreg
- samsung,exynos3-sysreg
- samsung,exynos4-sysreg
- samsung,exynos5-sysreg
+ - samsung,exynosautov920-peric0-sysreg
+ - samsung,exynosautov920-peric1-sysreg
- tesla,fsd-cam-sysreg
- tesla,fsd-fsys0-sysreg
- tesla,fsd-fsys1-sysreg
diff --git a/sys/contrib/device-tree/Bindings/soc/starfive/starfive,jh7110-syscon.yaml b/sys/contrib/device-tree/Bindings/soc/starfive/starfive,jh7110-syscon.yaml
new file mode 100644
index 000000000000..0039319e91fe
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/starfive/starfive,jh7110-syscon.yaml
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+ - William Qiu <william.qiu@starfivetech.com>
+
+description:
+ The StarFive JH7110 SoC system controller provides register information such
+ as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: starfive,jh7110-sys-syscon
+ - const: syscon
+ - const: simple-mfd
+ - items:
+ - enum:
+ - starfive,jh7110-aon-syscon
+ - starfive,jh7110-stg-syscon
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ clock-controller:
+ $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+ type: object
+
+ "#power-domain-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-sys-syscon
+ then:
+ required:
+ - clock-controller
+ else:
+ properties:
+ clock-controller: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-aon-syscon
+ then:
+ required:
+ - "#power-domain-cells"
+ else:
+ properties:
+ "#power-domain-cells": false
+
+additionalProperties: false
+
+examples:
+ - |
+ syscon@10240000 {
+ compatible = "starfive,jh7110-stg-syscon", "syscon";
+ reg = <0x10240000 0x1000>;
+ };
+
+ syscon@13030000 {
+ compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
+ reg = <0x13030000 0x1000>;
+
+ clock-controller {
+ compatible = "starfive,jh7110-pll";
+ clocks = <&osc>;
+ #clock-cells = <1>;
+ };
+ };
+
+ syscon@17010000 {
+ compatible = "starfive,jh7110-aon-syscon", "syscon";
+ reg = <0x17010000 0x1000>;
+ #power-domain-cells = <1>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/soc/sti/st,sti-syscon.yaml b/sys/contrib/device-tree/Bindings/soc/sti/st,sti-syscon.yaml
new file mode 100644
index 000000000000..5f97d9ff17fb
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/sti/st,sti-syscon.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/sti/st,sti-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STi platform sysconfig
+
+maintainers:
+ - Patrice Chotard <patrice.chotard@foss.st.com>
+
+description: |
+ Binding for the various sysconfig nodes used within the STi
+ platform device-tree to point to some common configuration
+ registers used by other nodes.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - st,stih407-core-syscfg
+ - st,stih407-flash-syscfg
+ - st,stih407-front-syscfg
+ - st,stih407-lpm-syscfg
+ - st,stih407-rear-syscfg
+ - st,stih407-sbc-reg-syscfg
+ - st,stih407-sbc-syscfg
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ syscfg_sbc: syscon@9620000 {
+ compatible = "st,stih407-sbc-syscfg", "syscon";
+ reg = <0x9620000 0x1000>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,nvec.yaml b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,nvec.yaml
new file mode 100644
index 000000000000..d5261ce3a619
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,nvec.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/tegra/nvidia,nvec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA compliant embedded controller
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ const: nvidia,nvec
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ items:
+ - description: divider clock
+ - description: fast clock
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: div-clk
+ - const: fast-clk
+
+ resets:
+ items:
+ - description: module reset
+
+ reset-names:
+ items:
+ - const: i2c
+
+ clock-frequency: true
+
+ request-gpios:
+ description: phandle to the GPIO used for EC request
+
+ slave-addr:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: I2C address of the slave controller
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - clock-frequency
+ - request-gpios
+ - slave-addr
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra20-car.h>
+ #include <dt-bindings/gpio/tegra-gpio.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ i2c@7000c500 {
+ compatible = "nvidia,nvec";
+ reg = <0x7000c500 0x100>;
+ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+ clock-frequency = <80000>;
+ request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+ slave-addr = <138>;
+ clocks = <&tegra_car TEGRA20_CLK_I2C3>,
+ <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
+ clock-names = "div-clk", "fast-clk";
+ resets = <&tegra_car 67>;
+ reset-names = "i2c";
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-ahb.yaml b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-ahb.yaml
new file mode 100644
index 000000000000..2f7269a26b8e
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-ahb.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/tegra/nvidia,tegra20-ahb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+title: NVIDIA Tegra AHB
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - nvidia,tegra20-ahb
+ - nvidia,tegra30-ahb
+ - items:
+ - enum:
+ - nvidia,tegra114-ahb
+ - nvidia,tegra124-ahb
+ - nvidia,tegra210-ahb
+ - const: nvidia,tegra30-ahb
+
+ reg:
+ maxItems: 1
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ ahb@6000c004 {
+ compatible = "nvidia,tegra20-ahb";
+ reg = <0x6000c004 0x10c>; /* AHB Arbitration + Gizmo Controller */
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-flowctrl.yaml b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-flowctrl.yaml
new file mode 100644
index 000000000000..705544b7f98f
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-flowctrl.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/tegra/nvidia,tegra20-flowctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra Flow Controller
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - nvidia,tegra20-flowctrl
+ - nvidia,tegra30-flowctrl
+ - nvidia,tegra114-flowctrl
+ - nvidia,tegra124-flowctrl
+ - nvidia,tegra210-flowctrl
+
+ - items:
+ - const: nvidia,tegra132-flowctrl
+ - const: nvidia,tegra124-flowctrl
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ flow-controller@60007000 {
+ compatible = "nvidia,tegra20-flowctrl";
+ reg = <0x60007000 0x1000>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-pmc.yaml b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-pmc.yaml
new file mode 100644
index 000000000000..b86f6f53ca95
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/tegra/nvidia,tegra20-pmc.yaml
@@ -0,0 +1,416 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/tegra/nvidia,tegra20-pmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Tegra Power Management Controller (PMC)
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jonathan Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ enum:
+ - nvidia,tegra20-pmc
+ - nvidia,tegra30-pmc
+ - nvidia,tegra114-pmc
+ - nvidia,tegra124-pmc
+ - nvidia,tegra210-pmc
+
+ reg:
+ maxItems: 1
+
+ clock-names:
+ items:
+ # Tegra clock of the same name
+ - const: pclk
+ # 32 KHz clock input
+ - const: clk32k_in
+
+ clocks:
+ maxItems: 2
+
+ '#clock-cells':
+ const: 1
+ description: |
+ Tegra PMC has clk_out_1, clk_out_2, and clk_out_3. PMC also has blink
+ control which allows 32Khz clock output to Tegra blink pad.
+
+ Consumer of PMC clock should specify the desired clock by having the
+ clock ID in its "clocks" phandle cell with PMC clock provider. See
+ include/dt-bindings/soc/tegra-pmc.h for the list of Tegra PMC clock IDs.
+
+ '#interrupt-cells':
+ const: 2
+ description: Specifies number of cells needed to encode an interrupt
+ source.
+
+ interrupt-controller: true
+
+ nvidia,invert-interrupt:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Inverts the PMU interrupt signal. The PMU is an external Power
+ Management Unit, whose interrupt output signal is fed into the PMC. This
+ signal is optionally inverted, and then fed into the ARM GIC. The PMC is
+ not involved in the detection or handling of this interrupt signal,
+ merely its inversion.
+
+ nvidia,core-power-req-active-high:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: core power request active-high
+
+ nvidia,sys-clock-req-active-high:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: system clock request active-high
+
+ nvidia,combined-power-req:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: combined power request for CPU and core
+
+ nvidia,cpu-pwr-good-en:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: CPU power good signal from external PMIC to PMC is enabled
+
+ nvidia,suspend-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: the suspend mode that the platform should use
+ oneOf:
+ - description: LP0, CPU + Core voltage off and DRAM in self-refresh
+ const: 0
+ - description: LP1, CPU voltage off and DRAM in self-refresh
+ const: 1
+ - description: LP2, CPU voltage off
+ const: 2
+
+ nvidia,cpu-pwr-good-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: CPU power good time in microseconds
+
+ nvidia,cpu-pwr-off-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: CPU power off time in microseconds
+
+ nvidia,core-pwr-good-time:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: core power good time in microseconds
+ items:
+ - description: oscillator stable time
+ - description: power stable time
+
+ nvidia,core-pwr-off-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: core power off time in microseconds
+
+ nvidia,lp0-vec:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ Starting address and length of LP0 vector. The LP0 vector contains the
+ warm boot code that is executed by AVP when resuming from the LP0 state.
+ The AVP (Audio-Video Processor) is an ARM7 processor and always being
+ the first boot processor when chip is power on or resume from deep sleep
+ mode. When the system is resumed from the deep sleep mode, the warm boot
+ code will restore some PLLs, clocks and then brings up CPU0 for resuming
+ the system.
+ items:
+ - description: starting address of LP0 vector
+ - description: length of LP0 vector
+
+ core-supply:
+ description: phandle to voltage regulator connected to the SoC core power
+ rail
+
+ core-domain:
+ type: object
+ description: The vast majority of hardware blocks of Tegra SoC belong to a
+ core power domain, which has a dedicated voltage rail that powers the
+ blocks.
+ additionalProperties: false
+ properties:
+ operating-points-v2:
+ description: Should contain level, voltages and opp-supported-hw
+ property. The supported-hw is a bitfield indicating SoC speedo or
+ process ID mask.
+
+ "#power-domain-cells":
+ const: 0
+
+ required:
+ - operating-points-v2
+ - "#power-domain-cells"
+
+ i2c-thermtrip:
+ type: object
+ description: On Tegra30, Tegra114 and Tegra124 if i2c-thermtrip subnode
+ exists, hardware-triggered thermal reset will be enabled.
+ additionalProperties: false
+ properties:
+ nvidia,i2c-controller-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: ID of I2C controller to send poweroff command to PMU.
+ Valid values are described in section 9.2.148 "APBDEV_PMC_SCRATCH53_0"
+ of the Tegra K1 Technical Reference Manual.
+
+ nvidia,bus-addr:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: bus address of the PMU on the I2C bus
+
+ nvidia,reg-addr:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: PMU I2C register address to issue poweroff command
+
+ nvidia,reg-data:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: power-off command to write to PMU
+
+ nvidia,pinmux-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Pinmux used by the hardware when issuing power-off command.
+ Defaults to 0. Valid values are described in section 12.5.2 "Pinmux
+ Support" of the Tegra4 Technical Reference Manual.
+
+ required:
+ - nvidia,i2c-controller-id
+ - nvidia,bus-addr
+ - nvidia,reg-addr
+ - nvidia,reg-data
+
+ powergates:
+ type: object
+ additionalProperties: false
+ description: |
+ This node contains a hierarchy of power domain nodes, which should match
+ the powergates on the Tegra SoC. Each powergate node represents a power-
+ domain on the Tegra SoC that can be power-gated by the Tegra PMC.
+
+ Hardware blocks belonging to a power domain should contain "power-domains"
+ property that is a phandle pointing to corresponding powergate node.
+
+ The name of the powergate node should be one of the below. Note that not
+ every powergate is applicable to all Tegra devices and the following list
+ shows which powergates are applicable to which devices.
+
+ Please refer to Tegra TRM for mode details on the powergate nodes to use
+ for each power-gate block inside Tegra.
+
+ Name Description Devices Applicable
+ --------------------------------------------------------------
+ 3d 3D Graphics Tegra20/114/124/210
+ 3d0 3D Graphics 0 Tegra30
+ 3d1 3D Graphics 1 Tegra30
+ aud Audio Tegra210
+ dfd Debug Tegra210
+ dis Display A Tegra114/124/210
+ disb Display B Tegra114/124/210
+ heg 2D Graphics Tegra30/114/124/210
+ iram Internal RAM Tegra124/210
+ mpe MPEG Encode All
+ nvdec NVIDIA Video Decode Engine Tegra210
+ nvjpg NVIDIA JPEG Engine Tegra210
+ pcie PCIE Tegra20/30/124/210
+ sata SATA Tegra30/124/210
+ sor Display interfaces Tegra124/210
+ ve2 Video Encode Engine 2 Tegra210
+ venc Video Encode Engine All
+ vdec Video Decode Engine Tegra20/30/114/124
+ vic Video Imaging Compositor Tegra124/210
+ xusba USB Partition A Tegra114/124/210
+ xusbb USB Partition B Tegra114/124/210
+ xusbc USB Partition C Tegra114/124/210
+
+ patternProperties:
+ "^[a-z0-9]+$":
+ type: object
+ additionalProperties: false
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 10
+
+ resets:
+ minItems: 1
+ maxItems: 8
+
+ power-domains:
+ maxItems: 1
+
+ '#power-domain-cells':
+ const: 0
+ description: Must be 0.
+
+ required:
+ - clocks
+ - resets
+ - '#power-domain-cells'
+
+ pinmux:
+ type: object
+ additionalProperties:
+ type: object
+ description: |
+ This is a pad configuration node. On Tegra SoCs a pad is a set of pins
+ which are configured as a group. The pin grouping is a fixed attribute
+ of the hardware. The PMC can be used to set pad power state and
+ signaling voltage. A pad can be either in active or power down mode.
+ The support for power state and signaling voltage configuration varies
+ depending on the pad in question. 3.3V and 1.8V signaling voltages are
+ supported on pins where software controllable signaling voltage
+ switching is available.
+
+ The pad configuration state nodes are placed under the pmc node and
+ they are referred to by the pinctrl client properties. For more
+ information see:
+
+ Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+
+ The pad name should be used as the value of the pins property in pin
+ configuration nodes.
+
+ The following pads are present on Tegra124 and Tegra132:
+
+ audio, bb, cam, comp, csia, csb, cse, dsi, dsib, dsic, dsid, hdmi,
+ hsic, hv, lvds, mipi-bias, nand, pex-bias, pex-clk1, pex-clk2,
+ pex-cntrl, sdmmc1, sdmmc3, sdmmc4, sys_ddc, uart, usb0, usb1, usb2,
+ usb_bias
+
+ The following pads are present on Tegra210:
+
+ audio, audio-hv, cam, csia, csib, csic, csid, csie, csif, dbg,
+ debug-nonao, dmic, dp, dsi, dsib, dsic, dsid, emmc, emmc2, gpio,
+ hdmi, hsic, lvds, mipi-bias, pex-bias, pex-clk1, pex-clk2, pex-cntrl,
+ sdmmc1, sdmmc3, spi, spi-hv, uart, usb0, usb1, usb2, usb3, usb-bias
+ additionalProperties: false
+ properties:
+ pins:
+ $ref: /schemas/types.yaml#/definitions/string-array
+ description: Must contain name of the pad(s) to be configured.
+
+ low-power-enable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Configure the pad into power down mode.
+
+ low-power-disable:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Configure the pad into active mode.
+
+ power-source:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or
+ TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages. The
+ values are defined in:
+
+ include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h
+
+ Power state can be configured on all Tegra124 and Tegra132 pads.
+ None of the Tegra124 or Tegra132 pads support signaling voltage
+ switching. All of the listed Tegra210 pads except pex-cntrl support
+ power state configuration. Signaling voltage switching is supported
+ on the following Tegra210 pads:
+
+ audio, audio-hv, cam, dbg, dmic, gpio, pex-cntrl, sdmmc1, sdmmc3,
+ spi, spi-hv, uart
+
+ required:
+ - pins
+
+required:
+ - compatible
+ - reg
+ - clock-names
+ - clocks
+ - '#clock-cells'
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: nvidia,tegra124-pmc
+ then:
+ properties:
+ pinmux:
+ additionalProperties:
+ type: object
+ properties:
+ pins:
+ items:
+ enum: [ audio, bb, cam, comp, csia, csb, cse, dsi, dsib,
+ dsic, dsid, hdmi, hsic, hv, lvds, mipi-bias, nand,
+ pex-bias, pex-clk1, pex-clk2, pex-cntrl, sdmmc1,
+ sdmmc3, sdmmc4, sys_ddc, uart, usb0, usb1, usb2,
+ usb_bias ]
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: nvidia,tegra210-pmc
+ then:
+ properties:
+ pinmux:
+ additionalProperties:
+ type: object
+ properties:
+ pins:
+ items:
+ enum: [ audio, audio-hv, cam, csia, csib, csic, csid, csie,
+ csif, dbg, debug-nonao, dmic, dp, dsi, dsib, dsic,
+ dsid, emmc, emmc2, gpio, hdmi, hsic, lvds, mipi-bias,
+ pex-bias, pex-clk1, pex-clk2, pex-cntrl, sdmmc1,
+ sdmmc3, spi, spi-hv, uart, usb0, usb1, usb2, usb3,
+ usb-bias ]
+
+additionalProperties: false
+
+dependencies:
+ "nvidia,suspend-mode": ["nvidia,core-pwr-off-time", "nvidia,cpu-pwr-off-time"]
+ "nvidia,core-pwr-off-time": ["nvidia,core-pwr-good-time"]
+ "nvidia,cpu-pwr-off-time": ["nvidia,cpu-pwr-good-time"]
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra210-car.h>
+ #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
+ #include <dt-bindings/soc/tegra-pmc.h>
+
+ pmc@7000e400 {
+ compatible = "nvidia,tegra210-pmc";
+ reg = <0x7000e400 0x400>;
+ core-supply = <&regulator>;
+ clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
+ clock-names = "pclk", "clk32k_in";
+ #clock-cells = <1>;
+
+ nvidia,invert-interrupt;
+ nvidia,suspend-mode = <0>;
+ nvidia,cpu-pwr-good-time = <0>;
+ nvidia,cpu-pwr-off-time = <0>;
+ nvidia,core-pwr-good-time = <4587 3876>;
+ nvidia,core-pwr-off-time = <39065>;
+ nvidia,core-power-req-active-high;
+ nvidia,sys-clock-req-active-high;
+
+ pd_core: core-domain {
+ operating-points-v2 = <&core_opp_table>;
+ #power-domain-cells = <0>;
+ };
+
+ powergates {
+ pd_audio: aud {
+ clocks = <&tegra_car TEGRA210_CLK_APE>,
+ <&tegra_car TEGRA210_CLK_APB2APE>;
+ resets = <&tegra_car 198>;
+ power-domains = <&pd_core>;
+ #power-domain-cells = <0>;
+ };
+
+ pd_xusbss: xusba {
+ clocks = <&tegra_car TEGRA210_CLK_XUSB_SS>;
+ resets = <&tegra_car TEGRA210_CLK_XUSB_SS>;
+ power-domains = <&pd_core>;
+ #power-domain-cells = <0>;
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/soc/ti/k3-ringacc.yaml b/sys/contrib/device-tree/Bindings/soc/ti/k3-ringacc.yaml
index 22cf9002fee7..158186610c53 100644
--- a/sys/contrib/device-tree/Bindings/soc/ti/k3-ringacc.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/ti/k3-ringacc.yaml
@@ -2,8 +2,8 @@
# Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/soc/ti/k3-ringacc.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/soc/ti/k3-ringacc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments K3 NavigatorSS Ring Accelerator
@@ -34,18 +34,22 @@ properties:
- const: ti,am654-navss-ringacc
reg:
+ minItems: 4
items:
- description: real time registers regions
- description: fifos registers regions
- description: proxy gcfg registers regions
- description: proxy target registers regions
+ - description: configuration registers region
reg-names:
+ minItems: 4
items:
- const: rt
- const: fifos
- const: proxy_gcfg
- const: proxy_target
+ - const: cfg
msi-parent: true
@@ -80,8 +84,9 @@ examples:
reg = <0x0 0x3c000000 0x0 0x400000>,
<0x0 0x38000000 0x0 0x400000>,
<0x0 0x31120000 0x0 0x100>,
- <0x0 0x33000000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ <0x0 0x33000000 0x0 0x40000>,
+ <0x0 0x31080000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <818>;
ti,sci-rm-range-gp-rings = <0x2>; /* GP ring range */
ti,sci = <&dmsc>;
diff --git a/sys/contrib/device-tree/Bindings/soc/ti/sci-pm-domain.yaml b/sys/contrib/device-tree/Bindings/soc/ti/sci-pm-domain.yaml
index 5df7688a1e1c..a750035d6234 100644
--- a/sys/contrib/device-tree/Bindings/soc/ti/sci-pm-domain.yaml
+++ b/sys/contrib/device-tree/Bindings/soc/ti/sci-pm-domain.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/ti/sci-pm-domain.yaml#
diff --git a/sys/contrib/device-tree/Bindings/soc/xilinx/xilinx.yaml b/sys/contrib/device-tree/Bindings/soc/xilinx/xilinx.yaml
new file mode 100644
index 000000000000..d4c0fe1fe435
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/soc/xilinx/xilinx.yaml
@@ -0,0 +1,142 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/xilinx/xilinx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx Zynq Platforms
+
+maintainers:
+ - Michal Simek <michal.simek@amd.com>
+
+description: |
+ Xilinx boards with Zynq-7000 SOC or Zynq UltraScale+ MPSoC
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - adapteva,parallella
+ - digilent,zynq-zybo
+ - digilent,zynq-zybo-z7
+ - ebang,ebaz4205
+ - myir,zynq-zturn-v5
+ - myir,zynq-zturn
+ - xlnx,zynq-cc108
+ - xlnx,zynq-zc702
+ - xlnx,zynq-zc706
+ - xlnx,zynq-zc770-xm010
+ - xlnx,zynq-zc770-xm011
+ - xlnx,zynq-zc770-xm012
+ - xlnx,zynq-zc770-xm013
+ - const: xlnx,zynq-7000
+
+ - items:
+ - const: avnet,zynq-microzed
+ - const: xlnx,zynq-microzed
+ - const: xlnx,zynq-7000
+
+ - items:
+ - const: avnet,zynq-zed
+ - const: xlnx,zynq-zed
+ - const: xlnx,zynq-7000
+
+ - items:
+ - enum:
+ - xlnx,zynqmp-zc1751
+ - const: xlnx,zynqmp
+
+ - description: Xilinx internal board zc1232
+ items:
+ - const: xlnx,zynqmp-zc1232-revA
+ - const: xlnx,zynqmp-zc1232
+ - const: xlnx,zynqmp
+
+ - description: Xilinx internal board zc1254
+ items:
+ - const: xlnx,zynqmp-zc1254-revA
+ - const: xlnx,zynqmp-zc1254
+ - const: xlnx,zynqmp
+
+ - description: Xilinx evaluation board zcu1275
+ items:
+ - const: xlnx,zynqmp-zcu1275-revA
+ - const: xlnx,zynqmp-zcu1275
+ - const: xlnx,zynqmp
+
+ - description: Xilinx 96boards compatible board zcu100
+ items:
+ - const: xlnx,zynqmp-zcu100-revC
+ - const: xlnx,zynqmp-zcu100
+ - const: xlnx,zynqmp
+
+ - description: Xilinx 96boards compatible board Ultra96
+ items:
+ - const: avnet,ultra96-rev1
+ - const: avnet,ultra96
+ - const: xlnx,zynqmp-zcu100-revC
+ - const: xlnx,zynqmp-zcu100
+ - const: xlnx,zynqmp
+
+ - description: Xilinx evaluation board zcu102
+ items:
+ - enum:
+ - xlnx,zynqmp-zcu102-revA
+ - xlnx,zynqmp-zcu102-revB
+ - xlnx,zynqmp-zcu102-rev1.0
+ - xlnx,zynqmp-zcu102-rev1.1
+ - const: xlnx,zynqmp-zcu102
+ - const: xlnx,zynqmp
+
+ - description: Xilinx evaluation board zcu104
+ items:
+ - enum:
+ - xlnx,zynqmp-zcu104-revA
+ - xlnx,zynqmp-zcu104-revC
+ - xlnx,zynqmp-zcu104-rev1.0
+ - const: xlnx,zynqmp-zcu104
+ - const: xlnx,zynqmp
+
+ - description: Xilinx evaluation board zcu106
+ items:
+ - enum:
+ - xlnx,zynqmp-zcu106-revA
+ - xlnx,zynqmp-zcu106-rev1.0
+ - const: xlnx,zynqmp-zcu106
+ - const: xlnx,zynqmp
+
+ - description: Xilinx evaluation board zcu111
+ items:
+ - enum:
+ - xlnx,zynqmp-zcu111-revA
+ - xlnx,zynqmp-zcu111-rev1.0
+ - const: xlnx,zynqmp-zcu111
+ - const: xlnx,zynqmp
+
+ - description: Xilinx Kria SOMs
+ items:
+ - const: xlnx,zynqmp-sm-k26-rev1
+ - const: xlnx,zynqmp-sm-k26-revB
+ - const: xlnx,zynqmp-sm-k26-revA
+ - const: xlnx,zynqmp-sm-k26
+ - const: xlnx,zynqmp
+
+ - description: Xilinx Kria SOMs (starter)
+ items:
+ - const: xlnx,zynqmp-smk-k26-rev1
+ - const: xlnx,zynqmp-smk-k26-revB
+ - const: xlnx,zynqmp-smk-k26-revA
+ - const: xlnx,zynqmp-smk-k26
+ - const: xlnx,zynqmp
+
+ - description: AMD MicroBlaze V (QEMU)
+ items:
+ - const: qemu,mbv
+ - const: amd,mbv
+
+additionalProperties: true
+
+...
diff --git a/sys/contrib/device-tree/Bindings/sound/adi,max98363.yaml b/sys/contrib/device-tree/Bindings/sound/adi,max98363.yaml
index a844b63f3930..c388cda56011 100644
--- a/sys/contrib/device-tree/Bindings/sound/adi,max98363.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/adi,max98363.yaml
@@ -39,7 +39,7 @@ unevaluatedProperties: false
examples:
- |
- soundwire-controller@3250000 {
+ soundwire@3250000 {
#address-cells = <2>;
#size-cells = <0>;
reg = <0x3250000 0x2000>;
diff --git a/sys/contrib/device-tree/Bindings/sound/allwinner,sun4i-a10-spdif.yaml b/sys/contrib/device-tree/Bindings/sound/allwinner,sun4i-a10-spdif.yaml
index 8108c564dd78..aa32dc950e72 100644
--- a/sys/contrib/device-tree/Bindings/sound/allwinner,sun4i-a10-spdif.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/allwinner,sun4i-a10-spdif.yaml
@@ -22,6 +22,7 @@ properties:
- const: allwinner,sun6i-a31-spdif
- const: allwinner,sun8i-h3-spdif
- const: allwinner,sun50i-h6-spdif
+ - const: allwinner,sun50i-h616-spdif
- items:
- const: allwinner,sun8i-a83t-spdif
- const: allwinner,sun8i-h3-spdif
@@ -62,6 +63,8 @@ allOf:
enum:
- allwinner,sun6i-a31-spdif
- allwinner,sun8i-h3-spdif
+ - allwinner,sun50i-h6-spdif
+ - allwinner,sun50i-h616-spdif
then:
required:
@@ -73,7 +76,7 @@ allOf:
contains:
enum:
- allwinner,sun8i-h3-spdif
- - allwinner,sun50i-h6-spdif
+ - allwinner,sun50i-h616-spdif
then:
properties:
diff --git a/sys/contrib/device-tree/Bindings/sound/amlogic,axg-sound-card.yaml b/sys/contrib/device-tree/Bindings/sound/amlogic,axg-sound-card.yaml
index bf1234550343..5db718e4d0e7 100644
--- a/sys/contrib/device-tree/Bindings/sound/amlogic,axg-sound-card.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/amlogic,axg-sound-card.yaml
@@ -9,6 +9,9 @@ title: Amlogic AXG sound card
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
const: amlogic,axg-sound-card
@@ -17,23 +20,12 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: list of auxiliary devices
- audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- description:
- A list of the connections between audio components. Each entry is a
- pair of strings, the first being the connection's sink, the second
- being the connection's source.
-
audio-widgets:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
A list off component DAPM widget. Each entry is a pair of strings,
the first being the widget type, the second being the widget name
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
-
patternProperties:
"^dai-link-[0-9]+$":
type: object
@@ -108,7 +100,6 @@ patternProperties:
- sound-dai
required:
- - model
- dai-link-0
unevaluatedProperties: false
diff --git a/sys/contrib/device-tree/Bindings/sound/amlogic,gx-sound-card.yaml b/sys/contrib/device-tree/Bindings/sound/amlogic,gx-sound-card.yaml
index b358fd601ed3..d4277d342e69 100644
--- a/sys/contrib/device-tree/Bindings/sound/amlogic,gx-sound-card.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/amlogic,gx-sound-card.yaml
@@ -9,6 +9,9 @@ title: Amlogic GX sound card
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
items:
@@ -18,14 +21,6 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: list of auxiliary devices
- audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- minItems: 2
- description: |-
- A list of the connections between audio components. Each entry is a
- pair of strings, the first being the connection's sink, the second
- being the connection's source.
-
audio-widgets:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
minItems: 2
@@ -33,10 +28,6 @@ properties:
A list off component DAPM widget. Each entry is a pair of strings,
the first being the widget type, the second being the widget name
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
-
patternProperties:
"^dai-link-[0-9]+$":
type: object
@@ -86,7 +77,7 @@ required:
- model
- dai-link-0
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/sound/audio-graph-port.yaml b/sys/contrib/device-tree/Bindings/sound/audio-graph-port.yaml
index fa9f9a853365..b13c08de505e 100644
--- a/sys/contrib/device-tree/Bindings/sound/audio-graph-port.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/audio-graph-port.yaml
@@ -13,19 +13,23 @@ select: false
definitions:
port-base:
- $ref: /schemas/graph.yaml#/$defs/port-base
+ allOf:
+ - $ref: /schemas/graph.yaml#/$defs/port-base
+ - $ref: /schemas/sound/dai-params.yaml#
properties:
- convert-rate:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-rate
- convert-channels:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-channels
- convert-sample-format:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-format
mclk-fs:
$ref: simple-card.yaml#/definitions/mclk-fs
+ playback-only:
+ description: port connection used only for playback
+ $ref: /schemas/types.yaml#/definitions/flag
+ capture-only:
+ description: port connection used only for capture
+ $ref: /schemas/types.yaml#/definitions/flag
endpoint-base:
- $ref: /schemas/graph.yaml#/$defs/endpoint-base
+ allOf:
+ - $ref: /schemas/graph.yaml#/$defs/endpoint-base
+ - $ref: /schemas/sound/dai-params.yaml#
properties:
mclk-fs:
$ref: simple-card.yaml#/definitions/mclk-fs
@@ -68,12 +72,6 @@ definitions:
- pdm
- msb
- lsb
- convert-rate:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-rate
- convert-channels:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-channels
- convert-sample-format:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-format
dai-tdm-slot-num:
description: Number of slots in use.
diff --git a/sys/contrib/device-tree/Bindings/sound/audio-graph.yaml b/sys/contrib/device-tree/Bindings/sound/audio-graph.yaml
index ed31e04ff6a6..71f52f7e55f6 100644
--- a/sys/contrib/device-tree/Bindings/sound/audio-graph.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/audio-graph.yaml
@@ -9,6 +9,9 @@ title: Audio Graph
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+allOf:
+ - $ref: /schemas/sound/dai-params.yaml#
+
properties:
dais:
$ref: /schemas/types.yaml#/definitions/phandle-array
@@ -30,12 +33,6 @@ properties:
widget ("Microphone", "Line", "Headphone", "Speaker"), the
second being the machine specific name for the widget.
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
- convert-rate:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-rate
- convert-channels:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-channels
- convert-sample-format:
- $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-format
pa-gpios:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/sound/audio-iio-aux.yaml b/sys/contrib/device-tree/Bindings/sound/audio-iio-aux.yaml
new file mode 100644
index 000000000000..d3cc1ea4a175
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/audio-iio-aux.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/audio-iio-aux.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Audio IIO auxiliary
+
+maintainers:
+ - Herve Codina <herve.codina@bootlin.com>
+
+description:
+ Auxiliary device based on Industrial I/O device channels
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: audio-iio-aux
+
+ io-channels:
+ description:
+ Industrial I/O device channels used
+
+ io-channel-names:
+ description:
+ Industrial I/O channel names related to io-channels.
+ These names are used to provides sound controls, widgets and routes names.
+
+ snd-control-invert-range:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ A list of 0/1 flags defining whether or not the related channel is
+ inverted
+ items:
+ enum: [0, 1]
+ default: 0
+ description: |
+ Invert the sound control value compared to the IIO channel raw value.
+ - 1: The related sound control value is inverted meaning that the
+ minimum sound control value correspond to the maximum IIO channel
+ raw value and the maximum sound control value correspond to the
+ minimum IIO channel raw value.
+ - 0: The related sound control value is not inverted meaning that the
+ minimum (resp maximum) sound control value correspond to the
+ minimum (resp maximum) IIO channel raw value.
+
+required:
+ - compatible
+ - io-channels
+ - io-channel-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ iio-aux {
+ compatible = "audio-iio-aux";
+ io-channels = <&iio 0>, <&iio 1>, <&iio 2>, <&iio 3>;
+ io-channel-names = "CH0", "CH1", "CH2", "CH3";
+ /* Invert CH1 and CH2 */
+ snd-control-invert-range = <0 1 1 0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/awinic,aw87390.yaml b/sys/contrib/device-tree/Bindings/sound/awinic,aw87390.yaml
new file mode 100644
index 000000000000..ba9d8767c5d5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/awinic,aw87390.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/awinic,aw87390.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic Aw87390 Audio Amplifier
+
+maintainers:
+ - Weidong Wang <wangweidong.a@awinic.com>
+
+description:
+ The awinic aw87390 is specifically designed to improve
+ the musical output dynamic range, enhance the overall
+ sound quallity, which is a new high efficiency, low
+ noise, constant large volume, 6th Smart K audio amplifier.
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: awinic,aw87390
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+ awinic,audio-channel:
+ description:
+ It is used to distinguish multiple PA devices, so that different
+ configurations can be loaded to different PA devices
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+required:
+ - compatible
+ - reg
+ - "#sound-dai-cells"
+ - awinic,audio-channel
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ audio-codec@58 {
+ compatible = "awinic,aw87390";
+ reg = <0x58>;
+ #sound-dai-cells = <0>;
+ awinic,audio-channel = <0>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/awinic,aw88395.yaml b/sys/contrib/device-tree/Bindings/sound/awinic,aw88395.yaml
index 35eef7d818a2..ac5f2e0f42cb 100644
--- a/sys/contrib/device-tree/Bindings/sound/awinic,aw88395.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/awinic,aw88395.yaml
@@ -14,12 +14,12 @@ description:
digital Smart K audio amplifier with an integrated 10.25V
smart boost convert.
-allOf:
- - $ref: dai-common.yaml#
-
properties:
compatible:
- const: awinic,aw88395
+ enum:
+ - awinic,aw88395
+ - awinic,aw88261
+ - awinic,aw88399
reg:
maxItems: 1
@@ -30,11 +30,36 @@ properties:
reset-gpios:
maxItems: 1
+ awinic,audio-channel:
+ description:
+ It is used to distinguish multiple PA devices, so that different
+ configurations can be loaded to different PA devices
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+
+ awinic,sync-flag:
+ description:
+ Flag bit used to keep the phase synchronized in the case of multiple PA
+ $ref: /schemas/types.yaml#/definitions/flag
+
required:
- compatible
- reg
- '#sound-dai-cells'
- - reset-gpios
+ - awinic,audio-channel
+
+allOf:
+ - $ref: dai-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - awinic,aw88261
+ then:
+ properties:
+ reset-gpios: false
unevaluatedProperties: false
@@ -49,5 +74,7 @@ examples:
reg = <0x34>;
#sound-dai-cells = <0>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ awinic,audio-channel = <0>;
+ awinic,sync-flag;
};
};
diff --git a/sys/contrib/device-tree/Bindings/sound/axentia,tse850-pcm5142.txt b/sys/contrib/device-tree/Bindings/sound/axentia,tse850-pcm5142.txt
index 9d049d4bfd58..b6cc5f6f78c2 100644
--- a/sys/contrib/device-tree/Bindings/sound/axentia,tse850-pcm5142.txt
+++ b/sys/contrib/device-tree/Bindings/sound/axentia,tse850-pcm5142.txt
@@ -29,7 +29,7 @@ The schematics explaining the gpios are as follows:
IN2 +---o--+------------+--o---+ OUT2
loop2 relays
-The 'loop1' gpio pin controlls two relays, which are either in loop position,
+The 'loop1' gpio pin controls two relays, which are either in loop position,
meaning that input and output are directly connected, or they are in mixer
position, meaning that the signal is passed through the 'Sum' mixer. Similarly
for 'loop2'.
diff --git a/sys/contrib/device-tree/Bindings/sound/cirrus,cs42l43.yaml b/sys/contrib/device-tree/Bindings/sound/cirrus,cs42l43.yaml
new file mode 100644
index 000000000000..7f9d8c7a635a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/cirrus,cs42l43.yaml
@@ -0,0 +1,313 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/cirrus,cs42l43.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic CS42L43 Audio CODEC
+
+maintainers:
+ - patches@opensource.cirrus.com
+
+description: |
+ The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
+ (Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
+ for portable applications. It provides a high dynamic range, stereo
+ DAC for headphone output, two integrated Class D amplifiers for
+ loudspeakers, and two ADCs for wired headset microphone input or
+ stereo line input. PDM inputs are provided for digital microphones.
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - cirrus,cs42l43
+
+ reg:
+ maxItems: 1
+
+ vdd-p-supply:
+ description:
+ Power supply for the high voltage interface.
+
+ vdd-a-supply:
+ description:
+ Power supply for internal analog circuits.
+
+ vdd-d-supply:
+ description:
+ Power supply for internal digital circuits. Can be internally supplied.
+
+ vdd-io-supply:
+ description:
+ Power supply for external interface and internal digital logic.
+
+ vdd-cp-supply:
+ description:
+ Power supply for the amplifier 3 and 4 charge pump.
+
+ vdd-amp-supply:
+ description:
+ Power supply for amplifier 1 and 2.
+
+ reset-gpios:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ interrupts:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 1
+
+ clocks:
+ items:
+ - description: Synchronous audio clock provided on mclk_in.
+
+ clock-names:
+ const: mclk
+
+ cirrus,bias-low:
+ type: boolean
+ description:
+ Select a 1.8V headset micbias rather than 2.8V.
+
+ cirrus,bias-sense-microamp:
+ description:
+ Current at which the headset micbias sense clamp will engage, 0 to
+ disable.
+ enum: [ 0, 14, 24, 43, 52, 61, 71, 90, 99 ]
+ default: 14
+
+ cirrus,bias-ramp-ms:
+ description:
+ Time in milliseconds the hardware allows for the headset micbias to
+ ramp up.
+ enum: [ 10, 40, 90, 170 ]
+ default: 170
+
+ cirrus,detect-us:
+ description:
+ Time in microseconds the type detection will run for. Long values will
+ cause more audible effects, but give more accurate detection.
+ enum: [ 20, 100, 1000, 10000, 50000, 75000, 100000, 200000 ]
+ default: 1000
+
+ cirrus,button-automute:
+ type: boolean
+ description:
+ Enable the hardware automuting of decimator 1 when a headset button is
+ pressed.
+
+ cirrus,buttons-ohms:
+ description:
+ Impedance in Ohms for each headset button, these should be listed in
+ ascending order.
+ minItems: 1
+ maxItems: 6
+
+ cirrus,tip-debounce-ms:
+ description:
+ Software debounce on tip sense triggering in milliseconds.
+ default: 0
+
+ cirrus,tip-invert:
+ type: boolean
+ description:
+ Indicates tip detect polarity, inverted implies open-circuit whilst the
+ jack is inserted.
+
+ cirrus,tip-disable-pullup:
+ type: boolean
+ description:
+ Indicates if the internal pullup on the tip detect should be disabled.
+
+ cirrus,tip-fall-db-ms:
+ description:
+ Time in milliseconds a falling edge on the tip detect should be hardware
+ debounced for. Note the falling edge is considered after the invert.
+ enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
+ default: 500
+
+ cirrus,tip-rise-db-ms:
+ description:
+ Time in milliseconds a rising edge on the tip detect should be hardware
+ debounced for. Note the rising edge is considered after the invert.
+ enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
+ default: 500
+
+ cirrus,use-ring-sense:
+ type: boolean
+ description:
+ Indicates if the ring sense should be used.
+
+ cirrus,ring-invert:
+ type: boolean
+ description:
+ Indicates ring detect polarity, inverted implies open-circuit whilst the
+ jack is inserted.
+
+ cirrus,ring-disable-pullup:
+ type: boolean
+ description:
+ Indicates if the internal pullup on the ring detect should be disabled.
+
+ cirrus,ring-fall-db-ms:
+ description:
+ Time in milliseconds a falling edge on the ring detect should be hardware
+ debounced for. Note the falling edge is considered after the invert.
+ enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
+ default: 500
+
+ cirrus,ring-rise-db-ms:
+ description:
+ Time in milliseconds a rising edge on the ring detect should be hardware
+ debounced for. Note the rising edge is considered after the invert.
+ enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
+ default: 500
+
+ pinctrl:
+ type: object
+ $ref: /schemas/pinctrl/pinctrl.yaml#
+ additionalProperties: false
+
+ properties:
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-ranges:
+ items:
+ - description: A phandle to the CODEC pinctrl node
+ minimum: 0
+ - const: 0
+ - const: 0
+ - const: 3
+
+ patternProperties:
+ "-state$":
+ oneOf:
+ - $ref: "#/$defs/cirrus-cs42l43-state"
+ - patternProperties:
+ "-pins$":
+ $ref: "#/$defs/cirrus-cs42l43-state"
+ additionalProperties: false
+
+ spi:
+ type: object
+ $ref: /schemas/spi/spi-controller.yaml#
+ unevaluatedProperties: false
+
+$defs:
+ cirrus-cs42l43-state:
+ type: object
+
+ allOf:
+ - $ref: /schemas/pinctrl/pincfg-node.yaml#
+ - $ref: /schemas/pinctrl/pinmux-node.yaml#
+
+ oneOf:
+ - required: [ groups ]
+ - required: [ pins ]
+
+ additionalProperties: false
+
+ properties:
+ groups:
+ enum: [ gpio1, gpio2, gpio3, asp, pdmout2, pdmout1, i2c, spi ]
+
+ pins:
+ enum: [ gpio1, gpio2, gpio3,
+ asp_dout, asp_fsync, asp_bclk,
+ pdmout2_clk, pdmout2_data, pdmout1_clk, pdmout1_data,
+ i2c_sda, i2c_scl,
+ spi_miso, spi_sck, spi_ssb ]
+
+ function:
+ enum: [ gpio, spdif, irq, mic-shutter, spk-shutter ]
+
+ drive-strength:
+ description: Set drive strength in mA
+ enum: [ 1, 2, 4, 8, 9, 10, 12, 16 ]
+
+ input-debounce:
+ description: Set input debounce in uS
+ enum: [ 0, 85 ]
+
+required:
+ - compatible
+ - reg
+ - vdd-p-supply
+ - vdd-a-supply
+ - vdd-io-supply
+ - vdd-cp-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cs42l43: codec@1a {
+ compatible = "cirrus,cs42l43";
+ reg = <0x1a>;
+
+ vdd-p-supply = <&vdd5v0>;
+ vdd-a-supply = <&vdd1v8>;
+ vdd-io-supply = <&vdd1v8>;
+ vdd-cp-supply = <&vdd1v8>;
+ vdd-amp-supply = <&vdd5v0>;
+
+ reset-gpios = <&gpio 0>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gpio>;
+ interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
+
+ #sound-dai-cells = <1>;
+
+ clocks = <&clks 0>;
+ clock-names = "mclk";
+
+ cs42l43_pins: pinctrl {
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&cs42l43_pins 0 0 3>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinsettings>;
+
+ pinsettings: default-state {
+ shutter-pins {
+ groups = "gpio3";
+ function = "mic-shutter";
+ };
+ };
+ };
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cs-gpios = <&cs42l43_pins 1 0>;
+
+ sensor@0 {
+ compatible = "bosch,bme680";
+ reg = <0>;
+ spi-max-frequency = <1400000>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/cs35l35.txt b/sys/contrib/device-tree/Bindings/sound/cs35l35.txt
index 7915897f8a81..e84f30c5c39b 100644
--- a/sys/contrib/device-tree/Bindings/sound/cs35l35.txt
+++ b/sys/contrib/device-tree/Bindings/sound/cs35l35.txt
@@ -110,7 +110,7 @@ Optional Monitor Signal Format sub-node:
See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet
- -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formating
+ -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formatting
on the I2S Port. Each of the 3 8 bit values in the array contain the settings
for depth, location, and frame.
diff --git a/sys/contrib/device-tree/Bindings/sound/cs35l36.txt b/sys/contrib/device-tree/Bindings/sound/cs35l36.txt
index 912bd162b477..d34117b8558e 100644
--- a/sys/contrib/device-tree/Bindings/sound/cs35l36.txt
+++ b/sys/contrib/device-tree/Bindings/sound/cs35l36.txt
@@ -33,7 +33,7 @@ Optional properties:
one amplifier in the system. If more than one it is best to Hi-Z the ASP
port to prevent bus contention on the output signal
- - cirrus,boost-ctl-select : Boost conerter control source selection.
+ - cirrus,boost-ctl-select : Boost converter control source selection.
Selects the source of the BST_CTL target VBST voltage for the boost
converter to generate.
0x00 - Control Port Value
diff --git a/sys/contrib/device-tree/Bindings/sound/cs53l30.txt b/sys/contrib/device-tree/Bindings/sound/cs53l30.txt
index 4dbfb8274cd9..dc256adb35a2 100644
--- a/sys/contrib/device-tree/Bindings/sound/cs53l30.txt
+++ b/sys/contrib/device-tree/Bindings/sound/cs53l30.txt
@@ -30,7 +30,7 @@ Optional properties:
* frame using two different ways:
* 1) Normal I2S mode on two data pins -- each SDOUT
* carries 2-channel data in the same time.
- * 2) TDM mode on one signle data pin -- SDOUT1 carries
+ * 2) TDM mode on one single data pin -- SDOUT1 carries
* 4-channel data per frame.
Example:
diff --git a/sys/contrib/device-tree/Bindings/sound/dai-params.yaml b/sys/contrib/device-tree/Bindings/sound/dai-params.yaml
index f5fb71f9b603..cd8508175564 100644
--- a/sys/contrib/device-tree/Bindings/sound/dai-params.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/dai-params.yaml
@@ -11,15 +11,14 @@ maintainers:
select: false
-$defs:
-
- dai-channels:
+properties:
+ convert-channels:
description: Number of audio channels used by DAI
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 32
- dai-sample-format:
+ convert-sample-format:
description: Audio sample format used by DAI
$ref: /schemas/types.yaml#/definitions/string
enum:
@@ -29,12 +28,10 @@ $defs:
- s24_3le
- s32_le
- dai-sample-rate:
+ convert-rate:
description: Audio sample rate used by DAI
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 8000
maximum: 192000
-properties: {}
-
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/sound/dialog,da7219.yaml b/sys/contrib/device-tree/Bindings/sound/dialog,da7219.yaml
index bb5af48ab1e1..19137abdba3e 100644
--- a/sys/contrib/device-tree/Bindings/sound/dialog,da7219.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/dialog,da7219.yaml
@@ -74,7 +74,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
dlg,mic-amp-in-sel:
- enum: ["diff", "se_p", "se_n"]
+ enum: [diff, se_p, se_n]
description:
Mic input source type.
@@ -89,6 +89,7 @@ properties:
da7219_aad:
type: object
+ additionalProperties: false
description:
Configuration of advanced accessory detection.
properties:
@@ -123,7 +124,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
dlg,jack-ins-det-pty:
- enum: ["low", "high"]
+ enum: [low, high]
description:
Polarity for jack insertion detection.
$ref: /schemas/types.yaml#/definitions/string
diff --git a/sys/contrib/device-tree/Bindings/sound/everest,es8328.yaml b/sys/contrib/device-tree/Bindings/sound/everest,es8328.yaml
new file mode 100644
index 000000000000..a0f4670fa38c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/everest,es8328.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/everest,es8328.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Everest ES8328 audio CODEC
+
+description:
+ Everest Audio Codec, which can be connected via I2C or SPI.
+ Pins on the device (for linking into audio routes) are
+ * LOUT1
+ * LOUT2
+ * ROUT1
+ * ROUT2
+ * LINPUT1
+ * RINPUT1
+ * LINPUT2
+ * RINPUT2
+ * Mic Bias
+
+maintainers:
+ - David Yang <yangxiaohua@everest-semi.com>
+
+properties:
+ compatible:
+ enum:
+ - everest,es8328
+ - everest,es8388
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+ clocks:
+ items:
+ - description: A 22.5792 or 11.2896 MHz clock
+
+ DVDD-supply:
+ description: Regulator providing digital core supply voltage 1.8 - 3.6V
+
+ AVDD-supply:
+ description: Regulator providing analog supply voltage 3.3V
+
+ PVDD-supply:
+ description: Regulator providing digital IO supply voltage 1.8 - 3.6V
+
+ HPVDD-supply:
+ description: Regulator providing analog output voltage 3.3V
+
+required:
+ - compatible
+ - clocks
+ - DVDD-supply
+ - AVDD-supply
+ - PVDD-supply
+ - HPVDD-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ es8328: codec@11 {
+ compatible = "everest,es8328";
+ reg = <0x11>;
+ AVDD-supply = <&reg_3p3v>;
+ DVDD-supply = <&reg_3p3v>;
+ HPVDD-supply = <&reg_3p3v>;
+ PVDD-supply = <&reg_3p3v>;
+ clocks = <&clks 169>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,easrc.yaml b/sys/contrib/device-tree/Bindings/sound/fsl,easrc.yaml
index bdde68a1059c..a680d7aff237 100644
--- a/sys/contrib/device-tree/Bindings/sound/fsl,easrc.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,easrc.yaml
@@ -14,7 +14,13 @@ properties:
pattern: "^easrc@.*"
compatible:
- const: fsl,imx8mn-easrc
+ oneOf:
+ - enum:
+ - fsl,imx8mn-easrc
+ - items:
+ - enum:
+ - fsl,imx8mp-easrc
+ - const: fsl,imx8mn-easrc
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,esai.txt b/sys/contrib/device-tree/Bindings/sound/fsl,esai.txt
index 0a2480aeecf0..90112ca1ff42 100644
--- a/sys/contrib/device-tree/Bindings/sound/fsl,esai.txt
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,esai.txt
@@ -44,7 +44,7 @@ Required properties:
- fsl,esai-synchronous: This is a boolean property. If present, indicating
that ESAI would work in the synchronous mode, which
means all the settings for Receiving would be
- duplicated from Transmition related registers.
+ duplicated from Transmission related registers.
Optional properties:
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,micfil.yaml b/sys/contrib/device-tree/Bindings/sound/fsl,micfil.yaml
index 4b99a18c79a0..b7e605835639 100644
--- a/sys/contrib/device-tree/Bindings/sound/fsl,micfil.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,micfil.yaml
@@ -56,6 +56,9 @@ properties:
- const: clkext3
minItems: 2
+ "#sound-dai-cells":
+ const: 0
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,mqs.yaml b/sys/contrib/device-tree/Bindings/sound/fsl,mqs.yaml
new file mode 100644
index 000000000000..8b33353a80ca
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,mqs.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,mqs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP Medium Quality Sound (MQS)
+
+maintainers:
+ - Shengjiu Wang <shengjiu.wang@nxp.com>
+ - Chancel Liu <chancel.liu@nxp.com>
+
+description: |
+ Medium quality sound (MQS) is used to generate medium quality audio
+ via a standard GPIO in the pinmux, allowing the user to connect
+ stereo speakers or headphones to a power amplifier without an
+ additional DAC chip.
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx6sx-mqs
+ - fsl,imx8qm-mqs
+ - fsl,imx8qxp-mqs
+ - fsl,imx93-mqs
+
+ clocks:
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ maxItems: 2
+
+ gpr:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: The phandle to the General Purpose Register (GPR) node
+
+ reg:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx8qm-mqs
+ - fsl,imx8qxp-mqs
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Master clock
+ - description: Clock for register access
+ clock-names:
+ items:
+ - const: mclk
+ - const: core
+ required:
+ - reg
+ - power-domains
+ else:
+ properties:
+ clocks:
+ items:
+ - description: Master clock
+ clock-names:
+ items:
+ - const: mclk
+ required:
+ - gpr
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/imx6sx-clock.h>
+ mqs0: mqs {
+ compatible = "fsl,imx6sx-mqs";
+ gpr = <&gpr>;
+ clocks = <&clks IMX6SX_CLK_SAI1>;
+ clock-names = "mclk";
+ };
+
+ - |
+ #include <dt-bindings/firmware/imx/rsrc.h>
+ mqs1: mqs@59850000 {
+ compatible = "fsl,imx8qm-mqs";
+ reg = <0x59850000 0x10000>;
+ clocks = <&mqs0_lpcg 0>, <&mqs0_lpcg 1>;
+ clock-names = "mclk", "core";
+ power-domains = <&pd IMX_SC_R_MQS_0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,qmc-audio.yaml b/sys/contrib/device-tree/Bindings/sound/fsl,qmc-audio.yaml
index ff5cd9241941..b522ed7dcc51 100644
--- a/sys/contrib/device-tree/Bindings/sound/fsl,qmc-audio.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,qmc-audio.yaml
@@ -33,6 +33,7 @@ patternProperties:
description:
A DAI managed by this controller
type: object
+ additionalProperties: false
properties:
reg:
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,rpmsg.yaml b/sys/contrib/device-tree/Bindings/sound/fsl,rpmsg.yaml
index e847611a85f7..188f38baddec 100644
--- a/sys/contrib/device-tree/Bindings/sound/fsl,rpmsg.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,rpmsg.yaml
@@ -17,6 +17,9 @@ description: |
such as SAI, MICFIL, .etc through building rpmsg channels between
Cortex-A and Cortex-M.
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
enum:
@@ -25,10 +28,7 @@ properties:
- fsl,imx8mm-rpmsg-audio
- fsl,imx8mp-rpmsg-audio
- fsl,imx8ulp-rpmsg-audio
-
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
+ - fsl,imx93-rpmsg-audio
clocks:
items:
@@ -65,13 +65,6 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle to a node of audio codec
- audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- description: |
- A list of the connections between audio components. Each entry is a
- pair of strings, the first being the connection's sink, the second
- being the connection's source.
-
fsl,enable-lpa:
$ref: /schemas/types.yaml#/definitions/flag
description: enable low power audio path.
@@ -100,9 +93,8 @@ properties:
required:
- compatible
- - model
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/sound/fsl,xcvr.yaml b/sys/contrib/device-tree/Bindings/sound/fsl,xcvr.yaml
index 799b362ba498..0eb0c1ba8710 100644
--- a/sys/contrib/device-tree/Bindings/sound/fsl,xcvr.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/fsl,xcvr.yaml
@@ -38,7 +38,10 @@ properties:
- const: txfifo
interrupts:
- maxItems: 1
+ items:
+ - description: WAKEUPMIX Audio XCVR Interrupt 1
+ - description: WAKEUPMIX Audio XCVR Interrupt 2
+ minItems: 1
clocks:
items:
@@ -78,6 +81,23 @@ required:
- dma-names
- resets
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx93-xcvr
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/sound/google,sc7180-trogdor.yaml b/sys/contrib/device-tree/Bindings/sound/google,sc7180-trogdor.yaml
index ba5b7728cf33..bac940553965 100644
--- a/sys/contrib/device-tree/Bindings/sound/google,sc7180-trogdor.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/google,sc7180-trogdor.yaml
@@ -13,23 +13,15 @@ maintainers:
description:
This binding describes the SC7180 sound card which uses LPASS for audio.
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
enum:
- google,sc7180-trogdor
- google,sc7180-coachz
- audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- description:
- A list of the connections between audio components. Each entry is a
- pair of strings, the first being the connection's sink, the second
- being the connection's source.
-
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
-
"#address-cells":
const: 1
@@ -86,11 +78,10 @@ patternProperties:
required:
- compatible
- - model
- "#address-cells"
- "#size-cells"
-additionalProperties: false
+unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/sound/google,sc7280-herobrine.yaml b/sys/contrib/device-tree/Bindings/sound/google,sc7280-herobrine.yaml
index 0b1a01a4c14e..cdcd7c6f21eb 100644
--- a/sys/contrib/device-tree/Bindings/sound/google,sc7280-herobrine.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/google,sc7280-herobrine.yaml
@@ -7,28 +7,19 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Google SC7280-Herobrine ASoC sound card driver
maintainers:
- - Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
- Judy Hsiao <judyhsiao@chromium.org>
description:
This binding describes the SC7280 sound card which uses LPASS for audio.
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
enum:
- google,sc7280-herobrine
- audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- description:
- A list of the connections between audio components. Each entry is a
- pair of strings, the first being the connection's sink, the second
- being the connection's source.
-
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
-
"#address-cells":
const: 1
@@ -97,11 +88,10 @@ patternProperties:
required:
- compatible
- - model
- "#address-cells"
- "#size-cells"
-additionalProperties: false
+unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/sound/imx-audio-card.yaml b/sys/contrib/device-tree/Bindings/sound/imx-audio-card.yaml
index b6f5d486600e..f7ad5ea2491e 100644
--- a/sys/contrib/device-tree/Bindings/sound/imx-audio-card.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/imx-audio-card.yaml
@@ -9,23 +9,14 @@ title: NXP i.MX audio sound card.
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
enum:
- fsl,imx-audio-card
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
-
- audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
- description:
- A list of the connections between audio components. Each entry is a
- pair of strings, the first being the connection's sink, the second
- being the connection's source. Valid names could be power supplies,
- MicBias of codec and the jacks on the board.
-
patternProperties:
".*-dai-link$":
description:
@@ -84,9 +75,8 @@ patternProperties:
required:
- compatible
- - model
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/sound/maxim,max98925.yaml b/sys/contrib/device-tree/Bindings/sound/maxim,max98925.yaml
new file mode 100644
index 000000000000..32fd86204a7a
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/maxim,max98925.yaml
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/maxim,max98925.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim Integrated MAX98925/MAX98926/MAX98927 speaker amplifier
+
+maintainers:
+ - Ryan Lee <ryans.lee@maximintegrated.com>
+
+properties:
+ compatible:
+ enum:
+ - maxim,max98925
+ - maxim,max98926
+ - maxim,max98927
+
+ reg:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ '#sound-dai-cells':
+ const: 0
+
+ vmon-slot-no:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 30
+ default: 0
+ description:
+ Slot number used to send voltage information or in inteleave mode this
+ will be used as interleave slot.
+
+ imon-slot-no:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 30
+ default: 0
+ description:
+ Slot number used to send current information.
+
+ maxim,interleave-mode:
+ type: boolean
+ description:
+ When using two MAX9892X in a system it is possible to create ADC data
+ that will overflow the frame size. When enabled, the Digital Audio
+ Interleave mode provides a means to output VMON and IMON data from two
+ devices on a single DOUT line when running smaller frames sizes such as
+ 32 BCLKS per LRCLK or 48 BCLKS per LRCLK.
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: dai-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - maxim,max98927
+ then:
+ properties:
+ vmon-slot-no:
+ minimum: 0
+ maximum: 15
+
+ imon-slot-no:
+ minimum: 0
+ maximum: 15
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ #include <dt-bindings/gpio/gpio.h>
+ audio-codec@3a {
+ compatible = "maxim,max98927";
+ reg = <0x3a>;
+ #sound-dai-cells = <0>;
+
+ pinctrl-0 = <&speaker_default>;
+ pinctrl-names = "default";
+
+ reset-gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
+
+ vmon-slot-no = <1>;
+ imon-slot-no = <0>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/mediatek,mt2701-audio.yaml b/sys/contrib/device-tree/Bindings/sound/mediatek,mt2701-audio.yaml
new file mode 100644
index 000000000000..45382c4d86aa
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/mediatek,mt2701-audio.yaml
@@ -0,0 +1,116 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt2701-audio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Audio Front End (AFE) PCM controller for mt2701
+
+description:
+ The AFE PCM node must be a subnode of the MediaTek audsys device tree node.
+
+maintainers:
+ - Eugen Hristev <eugen.hristev@collabora.com>
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt2701-audio
+ - mediatek,mt7622-audio
+
+ interrupts:
+ items:
+ - description: AFE interrupt
+ - description: ASYS interrupt
+
+ interrupt-names:
+ items:
+ - const: afe
+ - const: asys
+
+ power-domains:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: audio infra sys clock
+ - description: top audio mux 1
+ - description: top audio mux 2
+ - description: top audio sys a1 clock
+ - description: top audio sys a2 clock
+ - description: i2s0 source selection
+ - description: i2s1 source selection
+ - description: i2s2 source selection
+ - description: i2s3 source selection
+ - description: i2s0 source divider
+ - description: i2s1 source divider
+ - description: i2s2 source divider
+ - description: i2s3 source divider
+ - description: i2s0 master clock
+ - description: i2s1 master clock
+ - description: i2s2 master clock
+ - description: i2s3 master clock
+ - description: i2so0 hopping clock
+ - description: i2so1 hopping clock
+ - description: i2so2 hopping clock
+ - description: i2so3 hopping clock
+ - description: i2si0 hopping clock
+ - description: i2si1 hopping clock
+ - description: i2si2 hopping clock
+ - description: i2si3 hopping clock
+ - description: asrc0 output clock
+ - description: asrc1 output clock
+ - description: asrc2 output clock
+ - description: asrc3 output clock
+ - description: audio front end pd clock
+ - description: audio front end conn pd clock
+ - description: top audio a1 sys pd
+ - description: top audio a2 sys pd
+ - description: audio merge interface pd
+
+ clock-names:
+ items:
+ - const: infra_sys_audio_clk
+ - const: top_audio_mux1_sel
+ - const: top_audio_mux2_sel
+ - const: top_audio_a1sys_hp
+ - const: top_audio_a2sys_hp
+ - const: i2s0_src_sel
+ - const: i2s1_src_sel
+ - const: i2s2_src_sel
+ - const: i2s3_src_sel
+ - const: i2s0_src_div
+ - const: i2s1_src_div
+ - const: i2s2_src_div
+ - const: i2s3_src_div
+ - const: i2s0_mclk_en
+ - const: i2s1_mclk_en
+ - const: i2s2_mclk_en
+ - const: i2s3_mclk_en
+ - const: i2so0_hop_ck
+ - const: i2so1_hop_ck
+ - const: i2so2_hop_ck
+ - const: i2so3_hop_ck
+ - const: i2si0_hop_ck
+ - const: i2si1_hop_ck
+ - const: i2si2_hop_ck
+ - const: i2si3_hop_ck
+ - const: asrc0_out_ck
+ - const: asrc1_out_ck
+ - const: asrc2_out_ck
+ - const: asrc3_out_ck
+ - const: audio_afe_pd
+ - const: audio_afe_conn_pd
+ - const: audio_a1sys_pd
+ - const: audio_a2sys_pd
+ - const: audio_mrgif_pd
+
+required:
+ - compatible
+ - interrupts
+ - interrupt-names
+ - power-domains
+ - clocks
+ - clock-names
+
+additionalProperties: false
diff --git a/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-afe.yaml b/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-afe.yaml
new file mode 100644
index 000000000000..398efdfe00f5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-afe.yaml
@@ -0,0 +1,160 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt7986-afe.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek AFE PCM controller for MT7986
+
+maintainers:
+ - Maso Huang <maso.huang@mediatek.com>
+
+properties:
+ compatible:
+ oneOf:
+ - const: mediatek,mt7986-afe
+ - items:
+ - enum:
+ - mediatek,mt7981-afe
+ - mediatek,mt7988-afe
+ - const: mediatek,mt7986-afe
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 5
+ items:
+ - description: audio bus clock
+ - description: audio 26M clock
+ - description: audio intbus clock
+ - description: audio hopping clock
+ - description: audio pll clock
+ - description: mux for pcm_mck
+ - description: audio i2s/pcm mck
+
+ clock-names:
+ minItems: 5
+ items:
+ - const: bus_ck
+ - const: 26m_ck
+ - const: l_ck
+ - const: aud_ck
+ - const: eg2_ck
+ - const: sel
+ - const: i2s_m
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7986-afe
+ then:
+ properties:
+ clocks:
+ items:
+ - description: audio bus clock
+ - description: audio 26M clock
+ - description: audio intbus clock
+ - description: audio hopping clock
+ - description: audio pll clock
+ clock-names:
+ items:
+ - const: bus_ck
+ - const: 26m_ck
+ - const: l_ck
+ - const: aud_ck
+ - const: eg2_ck
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7981-afe
+ then:
+ properties:
+ clocks:
+ items:
+ - description: audio bus clock
+ - description: audio 26M clock
+ - description: audio intbus clock
+ - description: audio hopping clock
+ - description: audio pll clock
+ - description: mux for pcm_mck
+ clock-names:
+ items:
+ - const: bus_ck
+ - const: 26m_ck
+ - const: l_ck
+ - const: aud_ck
+ - const: eg2_ck
+ - const: sel
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt7988-afe
+ then:
+ properties:
+ clocks:
+ items:
+ - description: audio bus clock
+ - description: audio 26M clock
+ - description: audio intbus clock
+ - description: audio hopping clock
+ - description: audio pll clock
+ - description: mux for pcm_mck
+ - description: audio i2s/pcm mck
+ clock-names:
+ items:
+ - const: bus_ck
+ - const: 26m_ck
+ - const: l_ck
+ - const: aud_ck
+ - const: eg2_ck
+ - const: sel
+ - const: i2s_m
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/clock/mt7986-clk.h>
+
+ afe@11210000 {
+ compatible = "mediatek,mt7986-afe";
+ reg = <0x11210000 0x9000>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&infracfg_ao CLK_INFRA_AUD_BUS_CK>,
+ <&infracfg_ao CLK_INFRA_AUD_26M_CK>,
+ <&infracfg_ao CLK_INFRA_AUD_L_CK>,
+ <&infracfg_ao CLK_INFRA_AUD_AUD_CK>,
+ <&infracfg_ao CLK_INFRA_AUD_EG2_CK>;
+ clock-names = "bus_ck",
+ "26m_ck",
+ "l_ck",
+ "aud_ck",
+ "eg2_ck";
+ assigned-clocks = <&topckgen CLK_TOP_A1SYS_SEL>,
+ <&topckgen CLK_TOP_AUD_L_SEL>,
+ <&topckgen CLK_TOP_A_TUNER_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_APLL2_D4>,
+ <&apmixedsys CLK_APMIXED_APLL2>,
+ <&topckgen CLK_TOP_APLL2_D4>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-wm8960.yaml b/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-wm8960.yaml
new file mode 100644
index 000000000000..09247ceea3f7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-wm8960.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt7986-wm8960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT7986 sound card with WM8960 codec
+
+maintainers:
+ - Maso Huang <maso.huang@mediatek.com>
+
+allOf:
+ - $ref: sound-card-common.yaml#
+
+properties:
+ compatible:
+ const: mediatek,mt7986-wm8960-sound
+
+ platform:
+ type: object
+ additionalProperties: false
+ properties:
+ sound-dai:
+ description: The phandle of MT7986 platform.
+ maxItems: 1
+ required:
+ - sound-dai
+
+ codec:
+ type: object
+ additionalProperties: false
+ properties:
+ sound-dai:
+ description: The phandle of wm8960 codec.
+ maxItems: 1
+ required:
+ - sound-dai
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - audio-routing
+ - platform
+ - codec
+
+examples:
+ - |
+ sound {
+ compatible = "mediatek,mt7986-wm8960-sound";
+ model = "mt7986-wm8960";
+ audio-routing =
+ "Headphone", "HP_L",
+ "Headphone", "HP_R",
+ "LINPUT1", "AMIC",
+ "RINPUT1", "AMIC";
+
+ platform {
+ sound-dai = <&afe>;
+ };
+
+ codec {
+ sound-dai = <&wm8960>;
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-afe.yaml b/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-afe.yaml
index e6cb711ece77..77af276ed2a2 100644
--- a/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-afe.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-afe.yaml
@@ -25,6 +25,12 @@ properties:
reset-names:
const: audiosys
+ memory-region:
+ maxItems: 1
+ description: |
+ Shared memory region for AFE memif. A "shared-dma-pool".
+ See dtschema reserved-memory/shared-dma-pool.yaml for details.
+
mediatek,topckgen:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the mediatek topckgen controller
@@ -135,7 +141,7 @@ patternProperties:
maxItems: 16
description:
This is a list of channel IDs which should be disabled.
- By default, all data received from ETDM pins will be outputed to
+ By default, all data received from ETDM pins will be outputted to
memory. etdm in supports disable_out in direct mode(w/o interconn),
so user can disable the specified channels by the property.
uniqueItems: true
@@ -176,6 +182,7 @@ examples:
interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
resets = <&watchdog 14>;
reset-names = "audiosys";
+ memory-region = <&snd_dma_mem_reserved>;
mediatek,topckgen = <&topckgen>;
mediatek,infracfg = <&infracfg_ao>;
power-domains = <&spm 13>; //MT8188_POWER_DOMAIN_AUDIO
diff --git a/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-mt6359.yaml b/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-mt6359.yaml
index 05e532b5d50a..f94ad0715e32 100644
--- a/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-mt6359.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/mediatek,mt8188-mt6359.yaml
@@ -9,23 +9,21 @@ title: MediaTek MT8188 ASoC sound card
maintainers:
- Trevor Wu <trevor.wu@mediatek.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
enum:
+ - mediatek,mt8188-es8326
- mediatek,mt8188-mt6359-evb
- mediatek,mt8188-nau8825
-
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: User specified audio sound card name
+ - mediatek,mt8188-rt5682s
audio-routing:
- $ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
- A list of the connections between audio components. Each entry is a
- sink/source pair of strings. Valid names could be the input or output
- widgets of audio components, power supplies, MicBias of codec and the
- software switch.
+ Valid names could be the input or output widgets of audio components,
+ power supplies, MicBias of codec and the software switch.
mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle
@@ -86,7 +84,7 @@ patternProperties:
required:
- link-name
-additionalProperties: false
+unevaluatedProperties: false
required:
- compatible
@@ -96,6 +94,7 @@ examples:
- |
sound {
compatible = "mediatek,mt8188-mt6359-evb";
+ model = "MT6359-EVB";
mediatek,platform = <&afe>;
pinctrl-names = "default";
pinctrl-0 = <&aud_pins_default>;
diff --git a/sys/contrib/device-tree/Bindings/sound/mt2701-afe-pcm.txt b/sys/contrib/device-tree/Bindings/sound/mt2701-afe-pcm.txt
index 560762e0a168..f548e6a58240 100644
--- a/sys/contrib/device-tree/Bindings/sound/mt2701-afe-pcm.txt
+++ b/sys/contrib/device-tree/Bindings/sound/mt2701-afe-pcm.txt
@@ -1,7 +1,7 @@
Mediatek AFE PCM controller for mt2701
Required properties:
-- compatible: should be one of the followings.
+- compatible: should be one of the following.
- "mediatek,mt2701-audio"
- "mediatek,mt7622-audio"
- interrupts: should contain AFE and ASYS interrupts
diff --git a/sys/contrib/device-tree/Bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml b/sys/contrib/device-tree/Bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
index d80083df03eb..bdf7b0960533 100644
--- a/sys/contrib/device-tree/Bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
@@ -17,6 +17,7 @@ properties:
enum:
- mediatek,mt8186-mt6366-rt1019-rt5682s-sound
- mediatek,mt8186-mt6366-rt5682s-max98360-sound
+ - mediatek,mt8186-mt6366-rt5650-sound
mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle
diff --git a/sys/contrib/device-tree/Bindings/sound/mt8195-afe-pcm.yaml b/sys/contrib/device-tree/Bindings/sound/mt8195-afe-pcm.yaml
index d5adf07d46e0..5c8dba2b3a81 100644
--- a/sys/contrib/device-tree/Bindings/sound/mt8195-afe-pcm.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/mt8195-afe-pcm.yaml
@@ -111,7 +111,7 @@ patternProperties:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
etdm modules can share the same external clock pin. Specify
- which etdm clock source is required by this etdm in moudule.
+ which etdm clock source is required by this etdm in module.
enum:
- 0 # etdm1_in
- 1 # etdm2_in
@@ -122,7 +122,7 @@ patternProperties:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
etdm modules can share the same external clock pin. Specify
- which etdm clock source is required by this etdm out moudule.
+ which etdm clock source is required by this etdm out module.
enum:
- 0 # etdm1_in
- 1 # etdm2_in
diff --git a/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8821.yaml b/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8821.yaml
new file mode 100644
index 000000000000..054b53954ac3
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8821.yaml
@@ -0,0 +1,141 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/nuvoton,nau8821.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NAU88L21 audio codec
+
+maintainers:
+ - Seven Lee <wtli@nuvoton.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: nuvoton,nau8821
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ nuvoton,jkdet-enable:
+ description: Enable jack detection via JKDET pin.
+ type: boolean
+
+ nuvoton,jkdet-pull-enable:
+ description: Enable JKDET pin pull. If set - pin pull enabled,
+ otherwise pin in high impedance state.
+ type: boolean
+
+ nuvoton,jkdet-pull-up:
+ description: Pull-up JKDET pin. If set then JKDET pin is pull up,
+ otherwise pull down.
+ type: boolean
+
+ nuvoton,key-enable:
+ description: handles key press detection.
+ type: boolean
+
+ nuvoton,jkdet-polarity:
+ description: JKDET pin polarity.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # active high
+ - 1 # active low
+ default: 1
+
+ nuvoton,micbias-voltage:
+ description: MICBIAS output level select.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # VDDA
+ - 1 # VDDA * 1
+ - 2 # VDDA * 1.1
+ - 3 # VDDA * 1.2
+ - 4 # VDDA * 1.3
+ - 5 # VDDA * 1.4
+ - 6 # VDDA * 1.53
+ - 7 # VDDA * 1.53
+ default: 6
+
+ nuvoton,vref-impedance:
+ description: VMID Tie-off impedance select.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # open
+ - 1 # 25KOhms
+ - 2 # 125KOhms
+ - 3 # 2.5KOhms
+ default: 2
+
+ nuvoton,jack-insert-debounce:
+ description: number from 0 to 7 that sets debounce time to 2^(n+2)ms.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 7
+ default: 7
+
+ nuvoton,jack-eject-debounce:
+ description: number from 0 to 7 that sets debounce time to 2^(n+2)ms.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 7
+ default: 0
+
+ nuvoton,dmic-clk-threshold:
+ description: DMIC clock speed expected value. Unit is Hz.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 3072000
+
+ nuvoton,dmic-slew-rate:
+ description: The range 0 to 7 represents the speed of DMIC slew rate.
+ The lowest value 0 means the slowest rate and the highest value
+ 7 means the fastest rate.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 7
+ default: 0
+
+ nuvoton,left-input-single-end:
+ description: Enable left input with single-ended settings if set.
+ For the headset mic application, the single-ended control is
+ just limited to the left adc for design demand.
+ type: boolean
+
+ '#sound-dai-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ codec@1b {
+ compatible = "nuvoton,nau8821";
+ reg = <0x1b>;
+ interrupt-parent = <&gpio>;
+ interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
+ nuvoton,jkdet-enable;
+ nuvoton,jkdet-pull-enable;
+ nuvoton,jkdet-pull-up;
+ nuvoton,key-enable;
+ nuvoton,left-input-single-end;
+ nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
+ nuvoton,micbias-voltage = <6>;
+ nuvoton,vref-impedance = <2>;
+ nuvoton,jack-insert-debounce = <7>;
+ nuvoton,jack-eject-debounce = <0>;
+ nuvoton,dmic-clk-threshold = <3072000>;
+ nuvoton,dmic-slew-rate = <0>;
+ #sound-dai-cells = <0>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8822.yaml b/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8822.yaml
index 65105402a53d..cb8182bbc491 100644
--- a/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8822.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/nuvoton,nau8822.yaml
@@ -21,6 +21,15 @@ properties:
reg:
maxItems: 1
+ "#sound-dai-cells":
+ const: 0
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: mclk
+
nuvoton,spk-btl:
description:
If set, configure the two loudspeaker outputs as a Bridge Tied Load output
@@ -31,6 +40,9 @@ required:
- compatible
- reg
+allOf:
+ - $ref: dai-common.yaml#
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-max9808x.yaml b/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-max9808x.yaml
index fc89dbd6bf24..241d20f3aad0 100644
--- a/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-max9808x.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-max9808x.yaml
@@ -35,12 +35,12 @@ properties:
items:
enum:
# Board Connectors
- - "Int Spk"
- - "Headphone Jack"
- - "Earpiece"
- - "Headset Mic"
- - "Internal Mic 1"
- - "Internal Mic 2"
+ - Int Spk
+ - Headphone Jack
+ - Earpiece
+ - Headset Mic
+ - Internal Mic 1
+ - Internal Mic 2
# CODEC Pins
- HPL
@@ -64,7 +64,7 @@ examples:
#include <dt-bindings/clock/tegra30-car.h>
#include <dt-bindings/soc/tegra-pmc.h>
sound {
- compatible = "lge,tegra-audio-max98089-p895",
+ compatible = "lg,tegra-audio-max98089-p895",
"nvidia,tegra-audio-max98089";
nvidia,model = "LG Optimus Vu MAX98089";
diff --git a/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-rt5631.yaml b/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-rt5631.yaml
index a04487002e88..0c8067c3b056 100644
--- a/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-rt5631.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/nvidia,tegra-audio-rt5631.yaml
@@ -31,10 +31,10 @@ properties:
items:
enum:
# Board Connectors
- - "Int Spk"
- - "Headphone Jack"
- - "Mic Jack"
- - "Int Mic"
+ - Int Spk
+ - Headphone Jack
+ - Mic Jack
+ - Int Mic
# CODEC Pins
- MIC1
diff --git a/sys/contrib/device-tree/Bindings/sound/nxp,tfa9879.yaml b/sys/contrib/device-tree/Bindings/sound/nxp,tfa9879.yaml
new file mode 100644
index 000000000000..df26248573ad
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/nxp,tfa9879.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/nxp,tfa9879.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP TFA9879 class-D audio amplifier
+
+maintainers:
+ - Peter Rosin <peda@axentia.se>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: nxp,tfa9879
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - '#sound-dai-cells'
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ amplifier@6c {
+ compatible = "nxp,tfa9879";
+ reg = <0x6c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c1>;
+ #sound-dai-cells = <0>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/option,gtm601.yaml b/sys/contrib/device-tree/Bindings/sound/option,gtm601.yaml
new file mode 100644
index 000000000000..ff813d97fc59
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/option,gtm601.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/option,gtm601.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GTM601 UMTS modem audio interface CODEC
+
+maintainers:
+ - kernel@puri.sm
+
+description: >
+ This device has no configuration interface. The sample rate and channels are
+ based on the compatible string
+
+properties:
+ compatible:
+ oneOf:
+ - description: Broadmobi BM818 (48Khz stereo)
+ items:
+ - const: broadmobi,bm818
+ - const: option,gtm601
+ - description: GTM601 (8kHz mono)
+ const: option,gtm601
+
+ '#sound-dai-cells':
+ const: 0
+
+required:
+ - compatible
+
+allOf:
+ - $ref: dai-common.yaml#
+
+additionalProperties: false
+
+examples:
+ - |
+ codec {
+ compatible = "option,gtm601";
+ #sound-dai-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/pcm512x.txt b/sys/contrib/device-tree/Bindings/sound/pcm512x.txt
index 3aae3b41bd8e..77006a4aec4a 100644
--- a/sys/contrib/device-tree/Bindings/sound/pcm512x.txt
+++ b/sys/contrib/device-tree/Bindings/sound/pcm512x.txt
@@ -1,12 +1,12 @@
-PCM512x audio CODECs
+PCM512x and TAS575x audio CODECs/amplifiers
These devices support both I2C and SPI (configured with pin strapping
-on the board).
+on the board). The TAS575x devices only support I2C.
Required properties:
- - compatible : One of "ti,pcm5121", "ti,pcm5122", "ti,pcm5141" or
- "ti,pcm5142"
+ - compatible : One of "ti,pcm5121", "ti,pcm5122", "ti,pcm5141",
+ "ti,pcm5142", "ti,tas5754" or "ti,tas5756"
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
@@ -25,6 +25,7 @@ Optional properties:
through <6>. The device will be configured for clock input on the
given pll-in pin and PLL output on the given pll-out pin. An
external connection from the pll-out pin to the SCLK pin is assumed.
+ Caution: the TAS-desvices only support gpios 1,2 and 3
Examples:
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-rx-macro.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-rx-macro.yaml
index ec4b0ac8ad68..b8540b30741e 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-rx-macro.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-rx-macro.yaml
@@ -11,12 +11,18 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,sc7280-lpass-rx-macro
- - qcom,sm8250-lpass-rx-macro
- - qcom,sm8450-lpass-rx-macro
- - qcom,sm8550-lpass-rx-macro
- - qcom,sc8280xp-lpass-rx-macro
+ oneOf:
+ - enum:
+ - qcom,sc7280-lpass-rx-macro
+ - qcom,sm8250-lpass-rx-macro
+ - qcom,sm8450-lpass-rx-macro
+ - qcom,sm8550-lpass-rx-macro
+ - qcom,sc8280xp-lpass-rx-macro
+ - items:
+ - enum:
+ - qcom,sm8650-lpass-rx-macro
+ - qcom,x1e80100-lpass-rx-macro
+ - const: qcom,sm8550-lpass-rx-macro
reg:
maxItems: 1
@@ -96,8 +102,9 @@ allOf:
- if:
properties:
compatible:
- enum:
- - qcom,sm8550-lpass-rx-macro
+ contains:
+ enum:
+ - qcom,sm8550-lpass-rx-macro
then:
properties:
clocks:
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-tx-macro.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-tx-macro.yaml
index 4156981fe02b..3e2ae16c6aba 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-tx-macro.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-tx-macro.yaml
@@ -11,12 +11,19 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,sc7280-lpass-tx-macro
- - qcom,sm8250-lpass-tx-macro
- - qcom,sm8450-lpass-tx-macro
- - qcom,sm8550-lpass-tx-macro
- - qcom,sc8280xp-lpass-tx-macro
+ oneOf:
+ - enum:
+ - qcom,sc7280-lpass-tx-macro
+ - qcom,sm6115-lpass-tx-macro
+ - qcom,sm8250-lpass-tx-macro
+ - qcom,sm8450-lpass-tx-macro
+ - qcom,sm8550-lpass-tx-macro
+ - qcom,sc8280xp-lpass-tx-macro
+ - items:
+ - enum:
+ - qcom,sm8650-lpass-tx-macro
+ - qcom,x1e80100-lpass-tx-macro
+ - const: qcom,sm8550-lpass-tx-macro
reg:
maxItems: 1
@@ -101,7 +108,25 @@ allOf:
properties:
compatible:
enum:
- - qcom,sm8550-lpass-tx-macro
+ - qcom,sm6115-lpass-tx-macro
+ then:
+ properties:
+ clocks:
+ minItems: 4
+ maxItems: 4
+ clock-names:
+ items:
+ - const: mclk
+ - const: npl
+ - const: dcodec
+ - const: fsgen
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm8550-lpass-tx-macro
then:
properties:
clocks:
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-va-macro.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-va-macro.yaml
index 4a56108c444b..6b483fa3c428 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-va-macro.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-va-macro.yaml
@@ -11,12 +11,18 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,sc7280-lpass-va-macro
- - qcom,sm8250-lpass-va-macro
- - qcom,sm8450-lpass-va-macro
- - qcom,sm8550-lpass-va-macro
- - qcom,sc8280xp-lpass-va-macro
+ oneOf:
+ - enum:
+ - qcom,sc7280-lpass-va-macro
+ - qcom,sm8250-lpass-va-macro
+ - qcom,sm8450-lpass-va-macro
+ - qcom,sm8550-lpass-va-macro
+ - qcom,sc8280xp-lpass-va-macro
+ - items:
+ - enum:
+ - qcom,sm8650-lpass-va-macro
+ - qcom,x1e80100-lpass-va-macro
+ - const: qcom,sm8550-lpass-va-macro
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-wsa-macro.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-wsa-macro.yaml
index eea7609d1b33..06b5f7be3608 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,lpass-wsa-macro.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,lpass-wsa-macro.yaml
@@ -11,12 +11,18 @@ maintainers:
properties:
compatible:
- enum:
- - qcom,sc7280-lpass-wsa-macro
- - qcom,sm8250-lpass-wsa-macro
- - qcom,sm8450-lpass-wsa-macro
- - qcom,sm8550-lpass-wsa-macro
- - qcom,sc8280xp-lpass-wsa-macro
+ oneOf:
+ - enum:
+ - qcom,sc7280-lpass-wsa-macro
+ - qcom,sm8250-lpass-wsa-macro
+ - qcom,sm8450-lpass-wsa-macro
+ - qcom,sm8550-lpass-wsa-macro
+ - qcom,sc8280xp-lpass-wsa-macro
+ - items:
+ - enum:
+ - qcom,sm8650-lpass-wsa-macro
+ - qcom,x1e80100-lpass-wsa-macro
+ - const: qcom,sm8550-lpass-wsa-macro
reg:
maxItems: 1
@@ -94,8 +100,9 @@ allOf:
- if:
properties:
compatible:
- enum:
- - qcom,sm8550-lpass-wsa-macro
+ contains:
+ enum:
+ - qcom,sm8550-lpass-wsa-macro
then:
properties:
clocks:
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,pm8916-wcd-analog-codec.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,pm8916-wcd-analog-codec.yaml
new file mode 100644
index 000000000000..94e7a1860977
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,pm8916-wcd-analog-codec.yaml
@@ -0,0 +1,153 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm PM8916 WCD Analog Audio Codec
+
+maintainers:
+ - Konrad Dybcio <konradybcio@kernel.org>
+
+description:
+ The analog WCD audio codec found on Qualcomm PM8916 PMIC.
+
+properties:
+ compatible:
+ const: qcom,pm8916-wcd-analog-codec
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 14
+
+ interrupt-names:
+ items:
+ - const: cdc_spk_cnp_int
+ - const: cdc_spk_clip_int
+ - const: cdc_spk_ocp_int
+ - const: mbhc_ins_rem_det1
+ - const: mbhc_but_rel_det
+ - const: mbhc_but_press_det
+ - const: mbhc_ins_rem_det
+ - const: mbhc_switch_int
+ - const: cdc_ear_ocp_int
+ - const: cdc_hphr_ocp_int
+ - const: cdc_hphl_ocp_det
+ - const: cdc_ear_cnp_int
+ - const: cdc_hphr_cnp_int
+ - const: cdc_hphl_cnp_int
+
+ vdd-cdc-io-supply:
+ description: 1.8V buck supply
+
+ vdd-cdc-tx-rx-cx-supply:
+ description: 1.8V SIDO buck supply
+
+ vdd-micbias-supply:
+ description: micbias supply
+
+ qcom,mbhc-vthreshold-low:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ Array of 5 threshold voltages in mV for 5-button detection on
+ headset when MBHC is powered by an internal current source.
+ minItems: 5
+ maxItems: 5
+
+ qcom,mbhc-vthreshold-high:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ Array of 5 threshold voltages in mV for 5-button detection on
+ headset when MBHC is powered from micbias.
+ minItems: 5
+ maxItems: 5
+
+ qcom,micbias-lvl:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Voltage (mV) for Mic Bias
+
+ qcom,hphl-jack-type-normally-open:
+ type: boolean
+ description:
+ True if the HPHL pin on the jack is NO (Normally Open), false if it's
+ NC (Normally Closed).
+
+ qcom,gnd-jack-type-normally-open:
+ type: boolean
+ description:
+ True if the GND pin on the jack is NO (Normally Open), false if it's
+ NC (Normally Closed).
+
+ qcom,micbias1-ext-cap:
+ type: boolean
+ description:
+ True if micbias1 has an external capacitor.
+
+ qcom,micbias2-ext-cap:
+ type: boolean
+ description:
+ True if micbias2 has an external capacitor.
+
+ "#sound-dai-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/spmi/spmi.h>
+
+ pmic@1 {
+ compatible = "qcom,pm8916", "qcom,spmi-pmic";
+ reg = <0x1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ audio-codec@f000 {
+ compatible = "qcom,pm8916-wcd-analog-codec";
+ reg = <0xf000>;
+ qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
+ qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
+ interrupt-parent = <&spmi_bus>;
+ interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
+ interrupt-names = "cdc_spk_cnp_int",
+ "cdc_spk_clip_int",
+ "cdc_spk_ocp_int",
+ "mbhc_ins_rem_det1",
+ "mbhc_but_rel_det",
+ "mbhc_but_press_det",
+ "mbhc_ins_rem_det",
+ "mbhc_switch_int",
+ "cdc_ear_ocp_int",
+ "cdc_hphr_ocp_int",
+ "cdc_hphl_ocp_det",
+ "cdc_ear_cnp_int",
+ "cdc_hphr_cnp_int",
+ "cdc_hphl_cnp_int";
+ vdd-cdc-io-supply = <&pm8916_l5>;
+ vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
+ vdd-micbias-supply = <&pm8916_l13>;
+ #sound-dai-cells = <1>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml
index 262de7a60a73..6f419747273e 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml
@@ -21,14 +21,21 @@ properties:
- lenovo,yoga-c630-sndcard
- qcom,db845c-sndcard
- const: qcom,sdm845-sndcard
+ - items:
+ - enum:
+ - qcom,sm8550-sndcard
+ - qcom,sm8650-sndcard
+ - const: qcom,sm8450-sndcard
- enum:
- qcom,apq8016-sbc-sndcard
- qcom,msm8916-qdsp6-sndcard
- qcom,qrb5165-rb5-sndcard
+ - qcom,sc7180-qdsp6-sndcard
- qcom,sc8280xp-sndcard
- qcom,sdm845-sndcard
- qcom,sm8250-sndcard
- qcom,sm8450-sndcard
+ - qcom,x1e80100-sndcard
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,wcd934x.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,wcd934x.yaml
index 4df59f3b7b01..beb0ff0245b0 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,wcd934x.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,wcd934x.yaml
@@ -201,9 +201,9 @@ examples:
- |
codec@1,0{
compatible = "slim217,250";
- reg = <1 0>;
+ reg = <1 0>;
reset-gpios = <&tlmm 64 0>;
- slim-ifc-dev = <&wcd9340_ifd>;
+ slim-ifc-dev = <&wcd9340_ifd>;
#sound-dai-cells = <1>;
interrupt-parent = <&tlmm>;
interrupts = <54 4>;
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x-sdw.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x-sdw.yaml
index b430dd3e1841..7b31bf93f1a1 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x-sdw.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x-sdw.yaml
@@ -51,7 +51,7 @@ examples:
reg = <0x03210000 0x2000>;
wcd938x_rx: codec@0,4 {
compatible = "sdw20217010d00";
- reg = <0 4>;
+ reg = <0 4>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
@@ -62,7 +62,7 @@ examples:
reg = <0x03230000 0x2000>;
wcd938x_tx: codec@0,3 {
compatible = "sdw20217010d00";
- reg = <0 3>;
+ reg = <0 3>;
qcom,tx-port-mapping = <2 3 4 5>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x.yaml
index 018565793a3e..adbfa67f88ed 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x.yaml
@@ -137,7 +137,7 @@ examples:
reg = <0x03210000 0x2000>;
wcd938x_rx: codec@0,4 {
compatible = "sdw20217010d00";
- reg = <0 4>;
+ reg = <0 4>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
@@ -148,7 +148,7 @@ examples:
reg = <0x03230000 0x2000>;
wcd938x_tx: codec@0,3 {
compatible = "sdw20217010d00";
- reg = <0 3>;
+ reg = <0 3>;
qcom,tx-port-mapping = <2 3 4 5>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,wsa883x.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,wsa883x.yaml
index ba572a7f4f3c..8e462cdf0018 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,wsa883x.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,wsa883x.yaml
@@ -52,7 +52,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
- soundwire-controller@3250000 {
+ soundwire@3250000 {
#address-cells = <2>;
#size-cells = <0>;
reg = <0x3250000 0x2000>;
diff --git a/sys/contrib/device-tree/Bindings/sound/qcom,wsa8840.yaml b/sys/contrib/device-tree/Bindings/sound/qcom,wsa8840.yaml
index e6723c9e312a..d717017b0fdb 100644
--- a/sys/contrib/device-tree/Bindings/sound/qcom,wsa8840.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/qcom,wsa8840.yaml
@@ -48,7 +48,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
- soundwire-controller {
+ soundwire {
#address-cells = <2>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/sound/realtek,rt5616.yaml b/sys/contrib/device-tree/Bindings/sound/realtek,rt5616.yaml
new file mode 100644
index 000000000000..248320804e5f
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/realtek,rt5616.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/realtek,rt5616.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek rt5616 ALSA SoC audio codec driver
+
+description: |
+ Pins on the device (for linking into audio routes) for RT5616:
+
+ * IN1P
+ * IN2P
+ * IN2N
+ * LOUTL
+ * LOUTR
+ * HPOL
+ * HPOR
+
+maintainers:
+ - Bard Liao <bardliao@realtek.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: realtek,rt5616
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ audio-codec@1b {
+ compatible = "realtek,rt5616";
+ reg = <0x1b>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.txt b/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.txt
index b731f16aea84..dfd768b1ad7d 100644
--- a/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.txt
+++ b/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.txt
@@ -94,7 +94,7 @@ see "Example: simple sound card for Asynchronous mode"
[xx]ch [yy]ch
------> [CTU] -------->
-CTU can convert [xx]ch to [yy]ch, or exchange outputed channel.
+CTU can convert [xx]ch to [yy]ch, or exchange outputted channel.
CTU conversion needs matrix settings.
For more detail information, see below
diff --git a/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.yaml b/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.yaml
index 8a821dec9526..0d7a6b576d88 100644
--- a/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/renesas,rsnd.yaml
@@ -77,6 +77,12 @@ properties:
it must be 1 if your system has audio_clkout0/1/2/3
enum: [0, 1]
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
clock-frequency:
description: for audio_clkout0/1/2/3
@@ -103,23 +109,7 @@ properties:
description: List of necessary clock names.
# details are defined below
- ports:
- $ref: audio-graph-port.yaml#/definitions/port-base
- unevaluatedProperties: false
- patternProperties:
- '^port(@[0-9a-f]+)?$':
- $ref: audio-graph-port.yaml#/definitions/port-base
- unevaluatedProperties: false
- patternProperties:
- "^endpoint(@[0-9a-f]+)?":
- $ref: audio-graph-port.yaml#/definitions/endpoint-base
- properties:
- playback:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- capture:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- unevaluatedProperties: false
-
+ # ports is below
port:
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
@@ -248,8 +238,9 @@ properties:
- interrupts
additionalProperties: false
+patternProperties:
# For DAI base
- rcar_sound,dai:
+ 'rcar_sound,dai(@[0-9a-f]+)?$':
description: DAI subnode.
type: object
patternProperties:
@@ -269,6 +260,13 @@ properties:
- capture
additionalProperties: false
+ 'ports(@[0-9a-f]+)?$':
+ $ref: audio-graph-port.yaml#/definitions/port-base
+ unevaluatedProperties: false
+ patternProperties:
+ '^port(@[0-9a-f]+)?$':
+ $ref: "#/properties/port"
+
required:
- compatible
- reg
@@ -499,19 +497,19 @@ examples:
rcar_sound,dai {
dai0 {
playback = <&ssi5>, <&src5>;
- capture = <&ssi6>;
+ capture = <&ssi6>;
};
dai1 {
playback = <&ssi3>;
};
dai2 {
- capture = <&ssi4>;
+ capture = <&ssi4>;
};
dai3 {
playback = <&ssi7>;
};
dai4 {
- capture = <&ssi8>;
+ capture = <&ssi8>;
};
};
@@ -525,7 +523,7 @@ examples:
frame-master = <&rsnd_endpoint0>;
playback = <&ssi0>, <&src0>, <&dvc0>;
- capture = <&ssi1>, <&src1>, <&dvc1>;
+ capture = <&ssi1>, <&src1>, <&dvc1>;
};
};
};
diff --git a/sys/contrib/device-tree/Bindings/sound/renesas,rz-ssi.yaml b/sys/contrib/device-tree/Bindings/sound/renesas,rz-ssi.yaml
index 3b5ae45eee4a..8b9695f5decc 100644
--- a/sys/contrib/device-tree/Bindings/sound/renesas,rz-ssi.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/renesas,rz-ssi.yaml
@@ -16,7 +16,7 @@ properties:
compatible:
items:
- enum:
- - renesas,r9a07g043-ssi # RZ/G2UL
+ - renesas,r9a07g043-ssi # RZ/G2UL and RZ/Five
- renesas,r9a07g044-ssi # RZ/G2{L,LC}
- renesas,r9a07g054-ssi # RZ/V2L
- const: renesas,rz-ssi
diff --git a/sys/contrib/device-tree/Bindings/sound/richtek,rtq9128.yaml b/sys/contrib/device-tree/Bindings/sound/richtek,rtq9128.yaml
new file mode 100644
index 000000000000..d54686a19ab7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/richtek,rtq9128.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/richtek,rtq9128.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RTQ9128 Automative Audio Power Amplifier
+
+maintainers:
+ - ChiYuan Huang <cy_huang@richtek.com>
+
+description:
+ The RTQ9128 is a ultra-low output noise, high-efficiency, four-channel
+ class-D audio power amplifier and delivering 4x75W into 4OHm at 10%
+ THD+N from a 25V supply in automotive applications.
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - richtek,rtq9128
+
+ reg:
+ maxItems: 1
+
+ enable-gpios:
+ maxItems: 1
+
+ richtek,tdm-input-data2-select:
+ type: boolean
+ description:
+ By default, if TDM mode is used, TDM data input will select 'DATA1' pin
+ as the data source. This option will configure TDM data input source from
+ 'DATA1' to 'DATA2' pin.
+
+ '#sound-dai-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - '#sound-dai-cells'
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ speaker@1a {
+ compatible = "richtek,rtq9128";
+ reg = <0x1a>;
+ enable-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/rockchip,rk3288-hdmi-analog.txt b/sys/contrib/device-tree/Bindings/sound/rockchip,rk3288-hdmi-analog.txt
index e5430d1d34e4..73577ac1b89c 100644
--- a/sys/contrib/device-tree/Bindings/sound/rockchip,rk3288-hdmi-analog.txt
+++ b/sys/contrib/device-tree/Bindings/sound/rockchip,rk3288-hdmi-analog.txt
@@ -12,7 +12,7 @@ Required properties:
source. For this driver the first string should always be
"Analog".
-Optionnal properties:
+Optional properties:
- rockchip,hp-en-gpios = The phandle of the GPIO that power up/down the
headphone (when the analog output is an headphone).
- rockchip,hp-det-gpios = The phandle of the GPIO that detects the headphone
diff --git a/sys/contrib/device-tree/Bindings/sound/rockchip-spdif.yaml b/sys/contrib/device-tree/Bindings/sound/rockchip-spdif.yaml
index 4f51b2fa82db..c3c989ef2a2c 100644
--- a/sys/contrib/device-tree/Bindings/sound/rockchip-spdif.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/rockchip-spdif.yaml
@@ -26,6 +26,7 @@ properties:
- const: rockchip,rk3568-spdif
- items:
- enum:
+ - rockchip,rk3128-spdif
- rockchip,rk3188-spdif
- rockchip,rk3288-spdif
- rockchip,rk3308-spdif
diff --git a/sys/contrib/device-tree/Bindings/sound/rt5663.txt b/sys/contrib/device-tree/Bindings/sound/rt5663.txt
index 2a55e9133408..24a6dab28f25 100644
--- a/sys/contrib/device-tree/Bindings/sound/rt5663.txt
+++ b/sys/contrib/device-tree/Bindings/sound/rt5663.txt
@@ -28,7 +28,7 @@ Optional properties:
If the value is 0, it means the impedance sensing is not supported.
- "realtek,impedance_sensing_table"
The matrix rows of the impedance sensing table are consisted by impedance
- minimum, impedance maximun, volume, DC offset w/o and w/ mic of each L and
+ minimum, impedance maximum, volume, DC offset w/o and w/ mic of each L and
R channel accordingly. Example is shown as following.
< 0 300 7 0xffd160 0xffd1c0 0xff8a10 0xff8ab0
301 65535 4 0xffe470 0xffe470 0xffb8e0 0xffb8e0>
diff --git a/sys/contrib/device-tree/Bindings/sound/samsung,aries-wm8994.yaml b/sys/contrib/device-tree/Bindings/sound/samsung,aries-wm8994.yaml
index 447e013f6e17..5ea0819a261a 100644
--- a/sys/contrib/device-tree/Bindings/sound/samsung,aries-wm8994.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/samsung,aries-wm8994.yaml
@@ -9,6 +9,9 @@ title: Samsung Aries audio complex with WM8994 codec
maintainers:
- Jonathan Bakker <xc-racer2@live.ca>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
enum:
@@ -17,10 +20,6 @@ properties:
# Without FM radio and modem slave
- samsung,fascinate4g-wm8994
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: The user-visible name of this sound complex.
-
cpu:
type: object
additionalProperties: false
@@ -46,6 +45,7 @@ properties:
samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ deprecated: true
description: |
List of the connections between audio
components; each entry is a pair of strings, the first being the
@@ -56,6 +56,7 @@ properties:
or FM In
For samsung,fascinate4g-wm8994: HP, SPK, RCV, LINE, Main Mic,
or HeadsetMic
+ Deprecated, use audio-routing.
extcon:
description: Extcon phandle for dock detection
@@ -87,10 +88,9 @@ properties:
required:
- compatible
- - model
- cpu
- codec
- - samsung,audio-routing
+ - audio-routing
- extcon
- main-micbias-supply
- headset-micbias-supply
@@ -98,7 +98,7 @@ required:
- headset-detect-gpios
- headset-key-gpios
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
@@ -121,7 +121,7 @@ examples:
headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
- samsung,audio-routing =
+ audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
diff --git a/sys/contrib/device-tree/Bindings/sound/samsung,midas-audio.yaml b/sys/contrib/device-tree/Bindings/sound/samsung,midas-audio.yaml
index 31095913e330..6ec80f529d84 100644
--- a/sys/contrib/device-tree/Bindings/sound/samsung,midas-audio.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/samsung,midas-audio.yaml
@@ -9,14 +9,13 @@ title: Samsung Midas audio complex with WM1811 codec
maintainers:
- Sylwester Nawrocki <s.nawrocki@samsung.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
const: samsung,midas-audio
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: The user-visible name of this sound complex.
-
cpu:
type: object
additionalProperties: false
@@ -38,6 +37,7 @@ properties:
- sound-dai
samsung,audio-routing:
+ deprecated: true
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description: |
List of the connections between audio components; each entry is
@@ -45,6 +45,7 @@ properties:
being the connection's source; valid names for sources and sinks are
the WM1811's pins (as documented in its binding), and the jacks
on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
+ Deprecated, use audio-routing.
mic-bias-supply:
description: Supply for the micbias on the Main microphone
@@ -62,14 +63,13 @@ properties:
required:
- compatible
- - model
- cpu
- codec
- - samsung,audio-routing
+ - audio-routing
- mic-bias-supply
- submic-bias-supply
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
@@ -84,7 +84,7 @@ examples:
mic-bias-supply = <&mic_bias_reg>;
submic-bias-supply = <&submic_bias_reg>;
- samsung,audio-routing =
+ audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
diff --git a/sys/contrib/device-tree/Bindings/sound/samsung,odroid.yaml b/sys/contrib/device-tree/Bindings/sound/samsung,odroid.yaml
index c6751c40e63f..b77284e3e26a 100644
--- a/sys/contrib/device-tree/Bindings/sound/samsung,odroid.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/samsung,odroid.yaml
@@ -10,6 +10,9 @@ maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
- Sylwester Nawrocki <s.nawrocki@samsung.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
oneOf:
@@ -24,10 +27,6 @@ properties:
- const: samsung,odroid-xu4-audio
deprecated: true
- model:
- $ref: /schemas/types.yaml#/definitions/string
- description: The user-visible name of this sound complex.
-
assigned-clock-parents: true
assigned-clock-rates: true
assigned-clocks: true
@@ -52,6 +51,7 @@ properties:
samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ deprecated: true
description: |
List of the connections between audio
components; each entry is a pair of strings, the first being the
@@ -61,6 +61,7 @@ properties:
For Odroid X2: "Headphone Jack", "Mic Jack", "DMIC"
For Odroid U3, XU3: "Headphone Jack", "Speakers"
For Odroid XU4: no entries
+ Deprecated, use audio-routing.
samsung,audio-widgets:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
@@ -70,18 +71,17 @@ properties:
required:
- compatible
- - model
- cpu
- codec
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
sound {
compatible = "hardkernel,odroid-xu3-audio";
model = "Odroid-XU3";
- samsung,audio-routing =
+ audio-routing =
"Headphone Jack", "HPL",
"Headphone Jack", "HPR",
"IN1", "Mic Jack",
diff --git a/sys/contrib/device-tree/Bindings/sound/samsung,tm2.yaml b/sys/contrib/device-tree/Bindings/sound/samsung,tm2.yaml
index 491e08019c04..760592599143 100644
--- a/sys/contrib/device-tree/Bindings/sound/samsung,tm2.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/samsung,tm2.yaml
@@ -10,6 +10,9 @@ maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
- Sylwester Nawrocki <s.nawrocki@samsung.com>
+allOf:
+ - $ref: sound-card-common.yaml#
+
properties:
compatible:
const: samsung,tm2-audio
@@ -32,6 +35,8 @@ properties:
being the connection's source; valid names for sources and sinks are the
WM5110's and MAX98504's pins and the jacks on the board: HP, SPK, Main
Mic, Sub Mic, Third Mic, Headset Mic.
+ Deprecated, use audio-routing.
+ deprecated: true
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
i2s-controller:
@@ -44,20 +49,15 @@ properties:
mic-bias-gpios:
description: GPIO pin that enables the Main Mic bias regulator.
- model:
- description: The user-visible name of this sound complex.
- $ref: /schemas/types.yaml#/definitions/string
-
required:
- compatible
- audio-amplifier
- audio-codec
- - samsung,audio-routing
+ - audio-routing
- i2s-controller
- mic-bias-gpios
- - model
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
@@ -70,7 +70,7 @@ examples:
audio-amplifier = <&max98504>;
mic-bias-gpios = <&gpr3 2 GPIO_ACTIVE_HIGH>;
model = "wm5110";
- samsung,audio-routing = "HP", "HPOUT1L",
+ audio-routing = "HP", "HPOUT1L",
"HP", "HPOUT1R",
"SPK", "SPKOUT",
"SPKOUT", "HPOUT2L",
diff --git a/sys/contrib/device-tree/Bindings/sound/samsung-i2s.yaml b/sys/contrib/device-tree/Bindings/sound/samsung-i2s.yaml
index 30b3b6e9824b..f45f73b5056d 100644
--- a/sys/contrib/device-tree/Bindings/sound/samsung-i2s.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/samsung-i2s.yaml
@@ -44,13 +44,18 @@ properties:
frequencies supported by Exynos7 I2S and 7.1 channel TDM support
for playback and capture TDM (Time division multiplexing) to allow
transfer of multiple channel audio data on single data line.
- enum:
- - samsung,s3c6410-i2s
- - samsung,s5pv210-i2s
- - samsung,exynos5420-i2s
- - samsung,exynos7-i2s
- - samsung,exynos7-i2s1
- - tesla,fsd-i2s
+ oneOf:
+ - enum:
+ - samsung,s3c6410-i2s
+ - samsung,s5pv210-i2s
+ - samsung,exynos5420-i2s
+ - samsung,exynos7-i2s
+ - samsung,exynos7-i2s1
+ - tesla,fsd-i2s
+ - items:
+ - enum:
+ - samsung,exynos5433-i2s
+ - const: samsung,exynos7-i2s
'#address-cells':
const: 1
diff --git a/sys/contrib/device-tree/Bindings/sound/serial-midi.yaml b/sys/contrib/device-tree/Bindings/sound/serial-midi.yaml
index 4afc29376efc..f6a807329a5a 100644
--- a/sys/contrib/device-tree/Bindings/sound/serial-midi.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/serial-midi.yaml
@@ -20,7 +20,7 @@ description:
parent serial device. If the standard MIDI baud of 31.25 kBaud is needed
(as would be the case if interfacing with arbitrary external MIDI devices),
configure the clocks of the parent serial device so that a requested baud of 38.4 kBaud
- resuts in the standard MIDI baud rate, and set the 'current-speed' property to 38400 (default)
+ results in the standard MIDI baud rate, and set the 'current-speed' property to 38400 (default)
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/sound/simple-card.yaml b/sys/contrib/device-tree/Bindings/sound/simple-card.yaml
index b05e05c81cc4..59ac2d1d1ccf 100644
--- a/sys/contrib/device-tree/Bindings/sound/simple-card.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/simple-card.yaml
@@ -148,6 +148,15 @@ definitions:
required:
- sound-dai
+ additional-devs:
+ type: object
+ description:
+ Additional devices used by the simple audio card.
+ patternProperties:
+ '^iio-aux(-.+)?$':
+ type: object
+ $ref: audio-iio-aux.yaml#
+
properties:
compatible:
contains:
@@ -187,6 +196,8 @@ properties:
$ref: "#/definitions/mclk-fs"
simple-audio-card,aux-devs:
$ref: "#/definitions/aux-devs"
+ simple-audio-card,additional-devs:
+ $ref: "#/definitions/additional-devs"
simple-audio-card,convert-rate:
$ref: "#/definitions/convert-rate"
simple-audio-card,convert-channels:
@@ -360,6 +371,48 @@ examples:
};
# --------------------
+# route audio to/from a codec through an amplifier
+# designed with a potentiometer driven by IIO:
+# --------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,aux-devs = <&amp_in>, <&amp_out>;
+ simple-audio-card,routing =
+ "CODEC LEFTIN", "AMP_IN LEFT OUT",
+ "CODEC RIGHTIN", "AMP_IN RIGHT OUT",
+ "AMP_OUT LEFT IN", "CODEC LEFTOUT",
+ "AMP_OUT RIGHT IN", "CODEC RIGHTOUT";
+
+ simple-audio-card,additional-devs {
+ amp_out: iio-aux-out {
+ compatible = "audio-iio-aux";
+ io-channels = <&pot_out 0>, <&pot_out 1>;
+ io-channel-names = "LEFT", "RIGHT";
+ snd-control-invert-range = <1 1>;
+ sound-name-prefix = "AMP_OUT";
+ };
+
+ amp_in: iio_aux-in {
+ compatible = "audio-iio-aux";
+ io-channels = <&pot_in 0>, <&pot_in 1>;
+ io-channel-names = "LEFT", "RIGHT";
+ sound-name-prefix = "AMP_IN";
+ };
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&cpu>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&codec>;
+ clocks = <&clocks>;
+ };
+ };
+
+# --------------------
# Sampling Rate Conversion
# --------------------
- |
diff --git a/sys/contrib/device-tree/Bindings/sound/snps,designware-i2s.yaml b/sys/contrib/device-tree/Bindings/sound/snps,designware-i2s.yaml
index a970fd264b21..a48d040b0a4f 100644
--- a/sys/contrib/device-tree/Bindings/sound/snps,designware-i2s.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/snps,designware-i2s.yaml
@@ -17,6 +17,9 @@ properties:
- const: snps,designware-i2s
- enum:
- snps,designware-i2s
+ - starfive,jh7110-i2stx0
+ - starfive,jh7110-i2stx1
+ - starfive,jh7110-i2srx
reg:
maxItems: 1
@@ -29,15 +32,36 @@ properties:
maxItems: 1
clocks:
- description: Sampling rate reference clock
- maxItems: 1
+ items:
+ - description: Sampling rate reference clock
+ - description: APB clock
+ - description: Audio master clock
+ - description: Inner audio master clock source
+ - description: External audio master clock source
+ - description: Bit clock
+ - description: Left/right channel clock
+ - description: External bit clock
+ - description: External left/right channel clock
+ minItems: 1
clock-names:
- const: i2sclk
+ items:
+ - const: i2sclk
+ - const: apb
+ - const: mclk
+ - const: mclk_inner
+ - const: mclk_ext
+ - const: bclk
+ - const: lrck
+ - const: bclk_ext
+ - const: lrck_ext
+ minItems: 1
resets:
items:
- description: Optional controller resets
+ - description: controller reset of Sampling rate
+ minItems: 1
dmas:
items:
@@ -51,6 +75,17 @@ properties:
- const: rx
minItems: 1
+ starfive,syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to System Register Controller sys_syscon node.
+ - description: I2S-rx enabled control offset of SYS_SYSCONSAIF__SYSCFG register.
+ - description: I2S-rx enabled control mask
+ description:
+ The phandle to System Register Controller syscon node and the I2S-rx(ADC)
+ enabled control offset and mask of SYS_SYSCONSAIF__SYSCFG register.
+
allOf:
- $ref: dai-common.yaml#
- if:
@@ -66,6 +101,73 @@ allOf:
properties:
"#sound-dai-cells":
const: 0
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: snps,designware-i2s
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ maxItems: 1
+ resets:
+ maxItems: 1
+ else:
+ properties:
+ resets:
+ minItems: 2
+ maxItems: 2
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-i2stx0
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ maxItems: 5
+ clock-names:
+ minItems: 5
+ maxItems: 5
+ required:
+ - resets
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-i2stx1
+ then:
+ properties:
+ clocks:
+ minItems: 9
+ maxItems: 9
+ clock-names:
+ minItems: 9
+ maxItems: 9
+ required:
+ - resets
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-i2srx
+ then:
+ properties:
+ clocks:
+ minItems: 9
+ maxItems: 9
+ clock-names:
+ minItems: 9
+ maxItems: 9
+ required:
+ - resets
+ - starfive,syscon
+ else:
+ properties:
+ starfive,syscon: false
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/sound/sound-card-common.yaml b/sys/contrib/device-tree/Bindings/sound/sound-card-common.yaml
new file mode 100644
index 000000000000..721950f65748
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/sound-card-common.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/sound-card-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Board Sound Card Common Properties
+
+maintainers:
+ - Mark Brown <broonie@kernel.org>
+
+properties:
+ audio-routing:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ description: |
+ A list of the connections between audio components. Each entry is a
+ pair of strings, the first being the connection's sink, the second
+ being the connection's source.
+
+ ignore-suspend-widgets:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ description: |
+ A list of audio sound widgets which are marked ignoring system suspend.
+ Paths between these endpoints are still active over suspend of the main
+ application processor that the current operating system is running.
+
+ model:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: User specified audio sound card name
+
+required:
+ - model
+
+additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/sound/sprd-pcm.txt b/sys/contrib/device-tree/Bindings/sound/sprd-pcm.txt
index 4b23e84b2e57..fbbcade2181d 100644
--- a/sys/contrib/device-tree/Bindings/sound/sprd-pcm.txt
+++ b/sys/contrib/device-tree/Bindings/sound/sprd-pcm.txt
@@ -1,4 +1,4 @@
-* Spreadtrum DMA platfrom bindings
+* Spreadtrum DMA platform bindings
Required properties:
- compatible: Should be "sprd,pcm-platform".
diff --git a/sys/contrib/device-tree/Bindings/sound/st,stm32-sai.yaml b/sys/contrib/device-tree/Bindings/sound/st,stm32-sai.yaml
index 56d206f97a96..59df8a832310 100644
--- a/sys/contrib/device-tree/Bindings/sound/st,stm32-sai.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/st,stm32-sai.yaml
@@ -63,7 +63,7 @@ patternProperties:
additionalProperties: false
description:
Two subnodes corresponding to SAI sub-block instances A et B
- can be defined. Subnode can be omitted for unsused sub-block.
+ can be defined. Subnode can be omitted for unused sub-block.
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/sound/starfive,jh7110-pwmdac.yaml b/sys/contrib/device-tree/Bindings/sound/starfive,jh7110-pwmdac.yaml
new file mode 100644
index 000000000000..e2b4db6aa2fb
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/starfive,jh7110-pwmdac.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/starfive,jh7110-pwmdac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 PWM-DAC Controller
+
+description:
+ The PWM-DAC Controller uses PWM square wave generators plus RC filters to
+ form a DAC for audio play in StarFive JH7110 SoC. This audio play controller
+ supports 16 bit audio format, up to 48K sampling frequency, up to left and
+ right dual channels.
+
+maintainers:
+ - Hal Feng <hal.feng@starfivetech.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: starfive,jh7110-pwmdac
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: PWMDAC APB
+ - description: PWMDAC CORE
+
+ clock-names:
+ items:
+ - const: apb
+ - const: core
+
+ resets:
+ maxItems: 1
+ description: PWMDAC APB
+
+ dmas:
+ maxItems: 1
+ description: TX DMA Channel
+
+ dma-names:
+ const: tx
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - dmas
+ - dma-names
+ - "#sound-dai-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ pwmdac@100b0000 {
+ compatible = "starfive,jh7110-pwmdac";
+ reg = <0x100b0000 0x1000>;
+ clocks = <&syscrg 157>,
+ <&syscrg 158>;
+ clock-names = "apb", "core";
+ resets = <&syscrg 96>;
+ dmas = <&dma 22>;
+ dma-names = "tx";
+ #sound-dai-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/tas2562.yaml b/sys/contrib/device-tree/Bindings/sound/tas2562.yaml
index f01c0dde0cf7..d28c102c0ce7 100644
--- a/sys/contrib/device-tree/Bindings/sound/tas2562.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/tas2562.yaml
@@ -18,7 +18,6 @@ description: |
Specifications about the audio amplifier can be found at:
https://www.ti.com/lit/gpn/tas2562
- https://www.ti.com/lit/gpn/tas2563
https://www.ti.com/lit/gpn/tas2564
https://www.ti.com/lit/gpn/tas2110
@@ -29,7 +28,6 @@ properties:
compatible:
enum:
- ti,tas2562
- - ti,tas2563
- ti,tas2564
- ti,tas2110
diff --git a/sys/contrib/device-tree/Bindings/sound/tas5805m.yaml b/sys/contrib/device-tree/Bindings/sound/tas5805m.yaml
index 63edf52f061c..12c41974274e 100644
--- a/sys/contrib/device-tree/Bindings/sound/tas5805m.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/tas5805m.yaml
@@ -37,6 +37,8 @@ properties:
generated from TI's PPC3 tool.
$ref: /schemas/types.yaml#/definitions/string
+additionalProperties: false
+
examples:
- |
i2c {
@@ -52,5 +54,4 @@ examples:
ti,dsp-config-name = "mono_pbtl_48khz";
};
};
-
-additionalProperties: true
+...
diff --git a/sys/contrib/device-tree/Bindings/sound/ti,j721e-cpb-ivi-audio.yaml b/sys/contrib/device-tree/Bindings/sound/ti,j721e-cpb-ivi-audio.yaml
index 859d369c71e2..5b2874a80a4d 100644
--- a/sys/contrib/device-tree/Bindings/sound/ti,j721e-cpb-ivi-audio.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/ti,j721e-cpb-ivi-audio.yaml
@@ -13,7 +13,7 @@ maintainers:
description: |
The Infotainment board plugs into the Common Processor Board, the support of the
- extension board is extending the CPB audio support, decribed in:
+ extension board is extending the CPB audio support, described in:
sound/ti,j721e-cpb-audio.txt
The audio support on the Infotainment Expansion Board consists of McASP0
diff --git a/sys/contrib/device-tree/Bindings/sound/ti,pcm3168a.yaml b/sys/contrib/device-tree/Bindings/sound/ti,pcm3168a.yaml
index b6a4360ab845..0b4f003989a4 100644
--- a/sys/contrib/device-tree/Bindings/sound/ti,pcm3168a.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/ti,pcm3168a.yaml
@@ -60,6 +60,7 @@ properties:
ports:
$ref: audio-graph-port.yaml#/definitions/port-base
+ unevaluatedProperties: false
properties:
port@0:
$ref: audio-graph-port.yaml#
diff --git a/sys/contrib/device-tree/Bindings/sound/ti,tas2781.yaml b/sys/contrib/device-tree/Bindings/sound/ti,tas2781.yaml
index 8d60e4e236d6..976238689249 100644
--- a/sys/contrib/device-tree/Bindings/sound/ti,tas2781.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/ti,tas2781.yaml
@@ -5,36 +5,46 @@
$id: http://devicetree.org/schemas/sound/ti,tas2781.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Texas Instruments TAS2781 SmartAMP
+title: Texas Instruments TAS2563/TAS2781 SmartAMP
maintainers:
- Shenghao Ding <shenghao-ding@ti.com>
-description:
- The TAS2781 is a mono, digital input Class-D audio amplifier
- optimized for efficiently driving high peak power into small
- loudspeakers. An integrated on-chip DSP supports Texas Instruments
- Smart Amp speaker protection algorithm. The integrated speaker
- voltage and current sense provides for real time
+description: |
+ The TAS2563/TAS2781 is a mono, digital input Class-D audio
+ amplifier optimized for efficiently driving high peak power into
+ small loudspeakers. An integrated on-chip DSP supports Texas
+ Instruments Smart Amp speaker protection algorithm. The
+ integrated speaker voltage and current sense provides for real time
monitoring of loudspeaker behavior.
-allOf:
- - $ref: dai-common.yaml#
+ Specifications about the audio amplifier can be found at:
+ https://www.ti.com/lit/gpn/tas2563
+ https://www.ti.com/lit/gpn/tas2781
properties:
compatible:
- enum:
- - ti,tas2781
+ description: |
+ ti,tas2563: 6.1-W Boosted Class-D Audio Amplifier With Integrated
+ DSP and IV Sense, 16/20/24/32bit stereo I2S or multichannel TDM.
+
+ ti,tas2781: 24-V Class-D Amplifier with Real Time Integrated Speaker
+ Protection and Audio Processing, 16/20/24/32bit stereo I2S or
+ multichannel TDM.
+ oneOf:
+ - items:
+ - enum:
+ - ti,tas2563
+ - const: ti,tas2781
+ - enum:
+ - ti,tas2781
reg:
description:
- I2C address, in multiple tas2781s case, all the i2c address
- aggreate as one Audio Device to support multiple audio slots.
+ I2C address, in multiple-AMP case, all the i2c address
+ aggregate as one Audio Device to support multiple audio slots.
maxItems: 8
minItems: 1
- items:
- minimum: 0x38
- maximum: 0x3f
reset-gpios:
maxItems: 1
@@ -49,6 +59,44 @@ required:
- compatible
- reg
+allOf:
+ - $ref: dai-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,tas2563
+ then:
+ properties:
+ reg:
+ description:
+ I2C address, in multiple-AMP case, all the i2c address
+ aggregate as one Audio Device to support multiple audio slots.
+ maxItems: 4
+ minItems: 1
+ items:
+ minimum: 0x4c
+ maximum: 0x4f
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - ti,tas2781
+ then:
+ properties:
+ reg:
+ description:
+ I2C address, in multiple-AMP case, all the i2c address
+ aggregate as one Audio Device to support multiple audio slots.
+ maxItems: 8
+ minItems: 1
+ items:
+ minimum: 0x38
+ maximum: 0x3f
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/sound/ti,tlv320aic32x4.yaml b/sys/contrib/device-tree/Bindings/sound/ti,tlv320aic32x4.yaml
index a7cc9aa34468..4783e6dbb5c4 100644
--- a/sys/contrib/device-tree/Bindings/sound/ti,tlv320aic32x4.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/ti,tlv320aic32x4.yaml
@@ -90,7 +90,7 @@ examples:
ldoin-supply = <&reg_3v3>;
clocks = <&clks 201>;
clock-names = "mclk";
- aic32x4-gpio-func= <
+ aic32x4-gpio-func = <
0xff /* AIC32X4_MFPX_DEFAULT_VALUE */
0xff /* AIC32X4_MFPX_DEFAULT_VALUE */
0x04 /* MFP3 AIC32X4_MFP3_GPIO_ENABLED */
diff --git a/sys/contrib/device-tree/Bindings/sound/tlv320adcx140.yaml b/sys/contrib/device-tree/Bindings/sound/tlv320adcx140.yaml
index c16e1760cf85..f3274bcc4c05 100644
--- a/sys/contrib/device-tree/Bindings/sound/tlv320adcx140.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/tlv320adcx140.yaml
@@ -32,7 +32,7 @@ properties:
reg:
maxItems: 1
description: |
- I2C addresss of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
+ I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
reset-gpios:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/sound/wlf,wm8904.yaml b/sys/contrib/device-tree/Bindings/sound/wlf,wm8904.yaml
new file mode 100644
index 000000000000..329260cf0fa0
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/sound/wlf,wm8904.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/wlf,wm8904.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Wolfson WM8904/WM8912 audio codecs
+
+maintainers:
+ - patches@opensource.cirrus.com
+
+description: |
+ Pins on the device (for linking into audio routes):
+ IN1L, IN1R, IN2L, IN2R, IN3L, IN3R, HPOUTL, HPOUTR, LINEOUTL, LINEOUTR,
+ MICBIAS
+
+properties:
+ compatible:
+ enum:
+ - wlf,wm8904
+ - wlf,wm8912
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: mclk
+
+ AVDD-supply: true
+ CPVDD-supply: true
+ DBVDD-supply: true
+ DCVDD-supply: true
+ MICVDD-supply: true
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - AVDD-supply
+ - CPVDD-supply
+ - DBVDD-supply
+ - DCVDD-supply
+ - MICVDD-supply
+
+allOf:
+ - $ref: dai-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ codec@1a {
+ compatible = "wlf,wm8904";
+ reg = <0x1a>;
+ clocks = <&pck0>;
+ clock-names = "mclk";
+ AVDD-supply = <&reg_1p8v>;
+ CPVDD-supply = <&reg_1p8v>;
+ DBVDD-supply = <&reg_1p8v>;
+ DCVDD-supply = <&reg_1p8v>;
+ MICVDD-supply = <&reg_1p8v>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/sound/wlf,wm8960.yaml b/sys/contrib/device-tree/Bindings/sound/wlf,wm8960.yaml
index ee8eba7f0104..62e62c335d07 100644
--- a/sys/contrib/device-tree/Bindings/sound/wlf,wm8960.yaml
+++ b/sys/contrib/device-tree/Bindings/sound/wlf,wm8960.yaml
@@ -26,6 +26,21 @@ properties:
'#sound-dai-cells':
const: 0
+ AVDD-supply:
+ description: Analogue supply.
+
+ DBVDD-supply:
+ description: Digital Buffer Supply.
+
+ DCVDD-supply:
+ description: Digital Core Supply.
+
+ SPKVDD1-supply:
+ description: Supply for speaker drivers 1.
+
+ SPKVDD2-supply:
+ description: Supply for speaker drivers 2.
+
wlf,capless:
type: boolean
description:
@@ -84,5 +99,10 @@ examples:
wlf,hp-cfg = <3 2 3>;
wlf,gpio-cfg = <1 3>;
wlf,shared-lrclk;
+ DCVDD-supply = <&reg_audio>;
+ DBVDD-supply = <&reg_audio>;
+ AVDD-supply = <&reg_audio>;
+ SPKVDD1-supply = <&reg_audio>;
+ SPKVDD2-supply = <&reg_audio>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/sound/wm8782.txt b/sys/contrib/device-tree/Bindings/sound/wm8782.txt
index 256cdec6ec4d..1a28f3280972 100644
--- a/sys/contrib/device-tree/Bindings/sound/wm8782.txt
+++ b/sys/contrib/device-tree/Bindings/sound/wm8782.txt
@@ -8,10 +8,17 @@ Required properties:
- Vdda-supply : phandle to a regulator for the analog power supply (2.7V - 5.5V)
- Vdd-supply : phandle to a regulator for the digital power supply (2.7V - 3.6V)
+Optional properties:
+
+ - wlf,fsampen:
+ FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
+ Defaults to 0 if left unspecified.
+
Example:
wm8782: stereo-adc {
compatible = "wlf,wm8782";
Vdda-supply = <&vdda_supply>;
Vdd-supply = <&vdd_supply>;
+ wlf,fsampen = <2>; /* 192KHz */
};
diff --git a/sys/contrib/device-tree/Bindings/soundwire/qcom,soundwire.yaml b/sys/contrib/device-tree/Bindings/soundwire/qcom,soundwire.yaml
index fb44b89a754e..3591c8c49bfe 100644
--- a/sys/contrib/device-tree/Bindings/soundwire/qcom,soundwire.yaml
+++ b/sys/contrib/device-tree/Bindings/soundwire/qcom,soundwire.yaml
@@ -159,7 +159,7 @@ properties:
qcom,ports-hstart:
$ref: /schemas/types.yaml#/definitions/uint8-array
description:
- Identifying lowerst numbered coloum in SoundWire Frame,
+ Identifying lowerst numbered column in SoundWire Frame,
i.e. left edge of the Transport sub-frame for each port.
Out ports followed by In ports.
Value of 0xff indicates that this option is not implemented
@@ -176,7 +176,7 @@ properties:
qcom,ports-hstop:
$ref: /schemas/types.yaml#/definitions/uint8-array
description:
- Identifying highest numbered coloum in SoundWire Frame,
+ Identifying highest numbered column in SoundWire Frame,
i.e. the right edge of the Transport
sub-frame for each port. Out ports followed by In ports.
Value of 0xff indicates that this option is not implemented
@@ -209,17 +209,6 @@ properties:
label:
maxItems: 1
-patternProperties:
- "^.*@[0-9a-f],[0-9a-f]$":
- type: object
- additionalProperties: true
- description:
- Child nodes for a standalone audio codec or speaker amplifier IC.
- It has RX and TX Soundwire secondary devices.
- properties:
- compatible:
- pattern: "^sdw[0-9a-f]{1}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{2}$"
-
required:
- compatible
- reg
@@ -240,7 +229,10 @@ oneOf:
- required:
- qcom,ports-sinterval
-additionalProperties: false
+allOf:
+ - $ref: soundwire-controller.yaml#
+
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/spi/adi,axi-spi-engine.yaml b/sys/contrib/device-tree/Bindings/spi/adi,axi-spi-engine.yaml
new file mode 100644
index 000000000000..d48faa42d025
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/adi,axi-spi-engine.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/adi,axi-spi-engine.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AXI SPI Engine Controller
+
+description: |
+ The AXI SPI Engine controller is part of the SPI Engine framework[1] and
+ allows memory mapped access to the SPI Engine control bus. This allows it
+ to be used as a general purpose software driven SPI controller as well as
+ some optional advanced acceleration and offloading capabilities.
+
+ [1] https://wiki.analog.com/resources/fpga/peripherals/spi_engine
+
+maintainers:
+ - Michael Hennerich <Michael.Hennerich@analog.com>
+ - Nuno Sá <nuno.sa@analog.com>
+
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+
+properties:
+ compatible:
+ const: adi,axi-spi-engine-1.00.a
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: The AXI interconnect clock.
+ - description: The SPI controller clock.
+
+ clock-names:
+ items:
+ - const: s_axi_aclk
+ - const: spi_clk
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi@44a00000 {
+ compatible = "adi,axi-spi-engine-1.00.a";
+ reg = <0x44a00000 0x1000>;
+ interrupts = <0 56 4>;
+ clocks = <&clkc 15>, <&clkc 15>;
+ clock-names = "s_axi_aclk", "spi_clk";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* SPI devices */
+ };
diff --git a/sys/contrib/device-tree/Bindings/spi/allwinner,sun4i-a10-spi.yaml b/sys/contrib/device-tree/Bindings/spi/allwinner,sun4i-a10-spi.yaml
index a6f34bdd1d3c..e1ab3f523ad6 100644
--- a/sys/contrib/device-tree/Bindings/spi/allwinner,sun4i-a10-spi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/allwinner,sun4i-a10-spi.yaml
@@ -46,6 +46,8 @@ properties:
patternProperties:
"^.*@[0-9a-f]+":
type: object
+ additionalProperties: true
+
properties:
reg:
items:
diff --git a/sys/contrib/device-tree/Bindings/spi/allwinner,sun6i-a31-spi.yaml b/sys/contrib/device-tree/Bindings/spi/allwinner,sun6i-a31-spi.yaml
index 28b8ace63044..3b47b68b92cb 100644
--- a/sys/contrib/device-tree/Bindings/spi/allwinner,sun6i-a31-spi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/allwinner,sun6i-a31-spi.yaml
@@ -68,6 +68,8 @@ properties:
patternProperties:
"^.*@[0-9a-f]+":
type: object
+ additionalProperties: true
+
properties:
reg:
items:
diff --git a/sys/contrib/device-tree/Bindings/spi/arm,pl022-peripheral-props.yaml b/sys/contrib/device-tree/Bindings/spi/arm,pl022-peripheral-props.yaml
new file mode 100644
index 000000000000..bb8b6863b109
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/arm,pl022-peripheral-props.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/arm,pl022-peripheral-props.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Peripheral-specific properties for Arm PL022 SPI controller
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+select: false
+
+properties:
+ pl022,interface:
+ description: SPI interface type
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # SPI
+ - 1 # Texas Instruments Synchronous Serial Frame Format
+ - 2 # Microwire (Half Duplex)
+
+ pl022,com-mode:
+ description: Specifies the transfer mode
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # interrupt mode
+ - 1 # polling mode
+ - 2 # DMA mode
+ default: 1
+
+ pl022,rx-level-trig:
+ description: Rx FIFO watermark level
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 4
+
+ pl022,tx-level-trig:
+ description: Tx FIFO watermark level
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 4
+
+ pl022,ctrl-len:
+ description: Microwire interface - Control length
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0x03
+ maximum: 0x1f
+
+ pl022,wait-state:
+ description: Microwire interface - Wait state
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+ pl022,duplex:
+ description: Microwire interface - Full/Half duplex
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+
+additionalProperties: true
+...
diff --git a/sys/contrib/device-tree/Bindings/spi/brcm,bcm2835-aux-spi.txt b/sys/contrib/device-tree/Bindings/spi/brcm,bcm2835-aux-spi.txt
index 9887b0724759..d7668f41b03b 100644
--- a/sys/contrib/device-tree/Bindings/spi/brcm,bcm2835-aux-spi.txt
+++ b/sys/contrib/device-tree/Bindings/spi/brcm,bcm2835-aux-spi.txt
@@ -1,4 +1,4 @@
-Broadcom BCM2835 auxiliar SPI1/2 controller
+Broadcom BCM2835 auxiliary SPI1/2 controller
The BCM2835 contains two forms of SPI master controller, one known simply as
SPI0, and the other known as the "Universal SPI Master"; part of the
@@ -9,7 +9,7 @@ Required properties:
- reg: Should contain register location and length for the spi block
- interrupts: Should contain shared interrupt of the aux block
- clocks: The clock feeding the SPI controller - needs to
- point to the auxiliar clock driver of the bcm2835,
+ point to the auxiliary clock driver of the bcm2835,
as this clock will enable the output gate for the specific
clock.
- cs-gpios: the cs-gpios (native cs is NOT supported)
diff --git a/sys/contrib/device-tree/Bindings/spi/brcm,bcm63xx-spi.yaml b/sys/contrib/device-tree/Bindings/spi/brcm,bcm63xx-spi.yaml
new file mode 100644
index 000000000000..fa03cdd68e70
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/brcm,bcm63xx-spi.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/brcm,bcm63xx-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM6348/BCM6358 SPI controller
+
+maintainers:
+ - Jonas Gorski <jonas.gorski@gmail.com>
+
+description: |
+ Broadcom "Low Speed" SPI controller found in many older MIPS based Broadband
+ SoCs.
+
+ This controller has a limitation that can not keep the chip select line active
+ between the SPI transfers within the same SPI message. This can terminate the
+ transaction to some SPI devices prematurely. The issue can be worked around by
+ the controller's prepend mode.
+
+allOf:
+ - $ref: spi-controller.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - brcm,bcm6368-spi
+ - brcm,bcm6362-spi
+ - brcm,bcm63268-spi
+ - const: brcm,bcm6358-spi
+ - enum:
+ - brcm,bcm6348-spi
+ - brcm,bcm6358-spi
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: SPI master reference clock
+
+ clock-names:
+ items:
+ - const: spi
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi@10000800 {
+ compatible = "brcm,bcm6368-spi", "brcm,bcm6358-spi";
+ reg = <0x10000800 0x70c>;
+ interrupts = <1>;
+ clocks = <&clkctl 9>;
+ clock-names = "spi";
+ num-cs = <5>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/spi/brcm,spi-bcm-qspi.yaml b/sys/contrib/device-tree/Bindings/spi/brcm,spi-bcm-qspi.yaml
index 28222aae3077..45975f40d943 100644
--- a/sys/contrib/device-tree/Bindings/spi/brcm,spi-bcm-qspi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/brcm,spi-bcm-qspi.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
The Broadcom SPI controller is a SPI master found on various SOCs, including
- BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consits
+ BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consists
of:
MSPI : SPI master controller can read and write to a SPI slave device
BSPI : Broadcom SPI in combination with the MSPI hw IP provides acceleration
@@ -20,7 +20,7 @@ description: |
io with 3-byte and 4-byte addressing support.
Supported Broadcom SoCs have one instance of MSPI+BSPI controller IP.
- MSPI master can be used wihout BSPI. BRCMSTB SoCs have an additional instance
+ MSPI master can be used without BSPI. BRCMSTB SoCs have an additional instance
of a MSPI master without the BSPI to use with non flash slave devices that
use SPI protocol.
diff --git a/sys/contrib/device-tree/Bindings/spi/cdns,qspi-nor.yaml b/sys/contrib/device-tree/Bindings/spi/cdns,qspi-nor.yaml
index 4f15f9a0cc34..cca81f89e252 100644
--- a/sys/contrib/device-tree/Bindings/spi/cdns,qspi-nor.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/cdns,qspi-nor.yaml
@@ -86,7 +86,17 @@ properties:
maxItems: 1
clocks:
- maxItems: 1
+ minItems: 1
+ maxItems: 3
+
+ clock-names:
+ oneOf:
+ - items:
+ - const: ref
+ - items:
+ - const: ref
+ - const: ahb
+ - const: apb
cdns,fifo-depth:
description:
diff --git a/sys/contrib/device-tree/Bindings/spi/fsl-imx-cspi.yaml b/sys/contrib/device-tree/Bindings/spi/fsl-imx-cspi.yaml
index 2f593c7225e5..14cac0e6e0a1 100644
--- a/sys/contrib/device-tree/Bindings/spi/fsl-imx-cspi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/fsl-imx-cspi.yaml
@@ -23,6 +23,13 @@ properties:
- const: fsl,imx51-ecspi
- const: fsl,imx53-ecspi
- items:
+ - enum:
+ - fsl,imx25-cspi
+ - fsl,imx50-cspi
+ - fsl,imx51-cspi
+ - fsl,imx53-cspi
+ - const: fsl,imx35-cspi
+ - items:
- const: fsl,imx8mp-ecspi
- const: fsl,imx6ul-ecspi
- items:
diff --git a/sys/contrib/device-tree/Bindings/spi/loongson,ls2k-spi.yaml b/sys/contrib/device-tree/Bindings/spi/loongson,ls2k-spi.yaml
new file mode 100644
index 000000000000..de9d32feadf5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/loongson,ls2k-spi.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/loongson,ls2k-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson SPI controller
+
+maintainers:
+ - Yinbo Zhu <zhuyinbo@loongson.cn>
+
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - loongson,ls2k1000-spi
+ - items:
+ - enum:
+ - loongson,ls2k0500-spi
+ - const: loongson,ls2k1000-spi
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi0: spi@1fff0220{
+ compatible = "loongson,ls2k1000-spi";
+ reg = <0x1fff0220 0x10>;
+ clocks = <&clk 17>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/spi/nvidia,tegra114-spi.yaml b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra114-spi.yaml
new file mode 100644
index 000000000000..58222ffa53d7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra114-spi.yaml
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/nvidia,tegra114-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra114 SPI controller
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ oneOf:
+ - const: nvidia,tegra114-spi
+ - items:
+ - enum:
+ - nvidia,tegra210-spi
+ - nvidia,tegra124-spi
+ - const: nvidia,tegra114-spi
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: SPI module clock
+
+ clock-names:
+ items:
+ - const: spi
+
+ resets:
+ items:
+ - description: SPI module reset
+
+ reset-names:
+ items:
+ - const: spi
+
+ dmas:
+ items:
+ - description: DMA channel for the reception FIFO
+ - description: DMA channel for the transmission FIFO
+
+ dma-names:
+ items:
+ - const: rx
+ - const: tx
+
+ spi-max-frequency:
+ description: Maximum SPI clocking speed of the controller in Hz.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+allOf:
+ - $ref: spi-controller.yaml
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - dmas
+ - dma-names
+
+examples:
+ - |
+ spi@7000d600 {
+ compatible = "nvidia,tegra114-spi";
+ reg = <0x7000d600 0x200>;
+ interrupts = <0 82 0x04>;
+ clocks = <&tegra_car 44>;
+ clock-names = "spi";
+ resets = <&tegra_car 44>;
+ reset-names = "spi";
+ dmas = <&apbdma 16>, <&apbdma 16>;
+ dma-names = "rx", "tx";
+
+ spi-max-frequency = <25000000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ nvidia,rx-clk-tap-delay = <0>;
+ nvidia,tx-clk-tap-delay = <16>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-sflash.yaml b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-sflash.yaml
new file mode 100644
index 000000000000..e245bad85a25
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-sflash.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/nvidia,tegra20-sflash.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra20 SFLASH controller
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ const: nvidia,tegra20-sflash
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: module clock
+
+ resets:
+ items:
+ - description: module reset
+
+ reset-names:
+ items:
+ - const: spi
+
+ dmas:
+ items:
+ - description: DMA channel used for reception
+ - description: DMA channel used for transmission
+
+ dma-names:
+ items:
+ - const: rx
+ - const: tx
+
+ spi-max-frequency:
+ description: Maximum SPI clocking speed of the controller in Hz.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+allOf:
+ - $ref: spi-controller.yaml
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - resets
+ - reset-names
+ - dmas
+ - dma-names
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra20-car.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ spi@7000c380 {
+ compatible = "nvidia,tegra20-sflash";
+ reg = <0x7000c380 0x80>;
+ interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+ spi-max-frequency = <25000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA20_CLK_SPI>;
+ resets = <&tegra_car 43>;
+ reset-names = "spi";
+ dmas = <&apbdma 11>, <&apbdma 11>;
+ dma-names = "rx", "tx";
+ };
diff --git a/sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-slink.yaml b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-slink.yaml
new file mode 100644
index 000000000000..291c25ec015d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra20-slink.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/nvidia,tegra20-slink.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra20/30 SLINK controller
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+properties:
+ compatible:
+ enum:
+ - nvidia,tegra20-slink
+ - nvidia,tegra30-slink
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: module clock
+
+ resets:
+ items:
+ - description: module reset
+
+ reset-names:
+ items:
+ - const: spi
+
+ dmas:
+ items:
+ - description: DMA channel used for reception
+ - description: DMA channel used for transmission
+
+ dma-names:
+ items:
+ - const: rx
+ - const: tx
+
+ operating-points-v2:
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ power-domains:
+ items:
+ - description: phandle to the core power domain
+
+ spi-max-frequency:
+ description: Maximum SPI clocking speed of the controller in Hz.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+allOf:
+ - $ref: spi-controller.yaml
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - resets
+ - reset-names
+ - dmas
+ - dma-names
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra20-car.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ spi@7000d600 {
+ compatible = "nvidia,tegra20-slink";
+ reg = <0x7000d600 0x200>;
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+ spi-max-frequency = <25000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&tegra_car TEGRA20_CLK_SBC2>;
+ resets = <&tegra_car 44>;
+ reset-names = "spi";
+ dmas = <&apbdma 16>, <&apbdma 16>;
+ dma-names = "rx", "tx";
+ };
diff --git a/sys/contrib/device-tree/Bindings/spi/nvidia,tegra210-quad.yaml b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra210-quad.yaml
index 9ae1611175f2..48e97e240265 100644
--- a/sys/contrib/device-tree/Bindings/spi/nvidia,tegra210-quad.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/nvidia,tegra210-quad.yaml
@@ -50,6 +50,7 @@ properties:
patternProperties:
"@[0-9a-f]+$":
type: object
+ additionalProperties: true
properties:
spi-rx-bus-width:
diff --git a/sys/contrib/device-tree/Bindings/spi/omap-spi.yaml b/sys/contrib/device-tree/Bindings/spi/omap-spi.yaml
index 352affa4b7f8..ff4d361707bd 100644
--- a/sys/contrib/device-tree/Bindings/spi/omap-spi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/omap-spi.yaml
@@ -68,7 +68,7 @@ properties:
dma-names:
description:
List of DMA request names. These strings correspond 1:1 with
- the DMA sepecifiers listed in dmas. The string names is to be
+ the DMA specifiers listed in dmas. The string names is to be
"rxN" and "txN" for RX and TX requests, respectively. Where N
is the chip select number.
minItems: 1
diff --git a/sys/contrib/device-tree/Bindings/spi/qcom,spi-qup.yaml b/sys/contrib/device-tree/Bindings/spi/qcom,spi-qup.yaml
index 93f14dd01afc..88be13268962 100644
--- a/sys/contrib/device-tree/Bindings/spi/qcom,spi-qup.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/qcom,spi-qup.yaml
@@ -44,9 +44,17 @@ properties:
- const: tx
- const: rx
+ interconnects:
+ maxItems: 1
+
interrupts:
maxItems: 1
+ operating-points-v2: true
+
+ power-domains:
+ maxItems: 1
+
reg:
maxItems: 1
@@ -62,7 +70,9 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-msm8996.h>
+ #include <dt-bindings/interconnect/qcom,msm8996.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
spi@7575000 {
compatible = "qcom,spi-qup-v2.2.1";
@@ -76,6 +86,9 @@ examples:
pinctrl-1 = <&blsp1_spi1_sleep>;
dmas = <&blsp1_dma 12>, <&blsp1_dma 13>;
dma-names = "tx", "rx";
+ power-domains = <&rpmpd MSM8996_VDDCX>;
+ operating-points-v2 = <&spi_opp_table>;
+ interconnects = <&pnoc MASTER_BLSP_1 &bimc SLAVE_EBI_CH0>;
#address-cells = <1>;
#size-cells = <0>;
};
diff --git a/sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml b/sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml
index 4d8ec69214c9..0ef3f8421986 100644
--- a/sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml
@@ -21,7 +21,7 @@ properties:
- enum:
- renesas,rspi-r7s72100 # RZ/A1H
- renesas,rspi-r7s9210 # RZ/A2
- - renesas,r9a07g043-rspi # RZ/G2UL
+ - renesas,r9a07g043-rspi # RZ/G2UL and RZ/Five
- renesas,r9a07g044-rspi # RZ/G2{L,LC}
- renesas,r9a07g054-rspi # RZ/V2L
- const: renesas,rspi-rz
diff --git a/sys/contrib/device-tree/Bindings/spi/renesas,rzv2m-csi.yaml b/sys/contrib/device-tree/Bindings/spi/renesas,rzv2m-csi.yaml
index e59183e53690..bed829837df1 100644
--- a/sys/contrib/device-tree/Bindings/spi/renesas,rzv2m-csi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/renesas,rzv2m-csi.yaml
@@ -39,6 +39,12 @@ properties:
power-domains:
maxItems: 1
+ renesas,csi-no-ss:
+ type: boolean
+ description:
+ The CSI Slave Selection (SS) pin won't be used to enable transmission and
+ reception. Only available when in target mode.
+
required:
- compatible
- reg
@@ -50,6 +56,9 @@ required:
- '#address-cells'
- '#size-cells'
+dependencies:
+ renesas,csi-no-ss: [ spi-slave ]
+
unevaluatedProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/spi/rockchip-sfc.yaml b/sys/contrib/device-tree/Bindings/spi/rockchip-sfc.yaml
index 339fb39529f3..ac1503de0478 100644
--- a/sys/contrib/device-tree/Bindings/spi/rockchip-sfc.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/rockchip-sfc.yaml
@@ -47,6 +47,8 @@ properties:
patternProperties:
"^flash@[0-3]$":
type: object
+ additionalProperties: true
+
properties:
reg:
minimum: 0
diff --git a/sys/contrib/device-tree/Bindings/spi/snps,dw-apb-ssi.yaml b/sys/contrib/device-tree/Bindings/spi/snps,dw-apb-ssi.yaml
index a47cb144b09f..fde3776a558b 100644
--- a/sys/contrib/device-tree/Bindings/spi/snps,dw-apb-ssi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/snps,dw-apb-ssi.yaml
@@ -72,8 +72,6 @@ properties:
- const: snps,dw-apb-ssi
- description: Intel Keem Bay SPI Controller
const: intel,keembay-ssi
- - description: Intel Thunder Bay SPI Controller
- const: intel,thunderbay-ssi
- description: Intel Mount Evans Integrated Management Complex SPI Controller
const: intel,mountevans-imc-ssi
- description: AMD Pensando Elba SoC SPI Controller
@@ -160,6 +158,8 @@ properties:
patternProperties:
"^.*@[0-9a-f]+$":
type: object
+ additionalProperties: true
+
properties:
reg:
minimum: 0
diff --git a/sys/contrib/device-tree/Bindings/spi/spi-cadence.yaml b/sys/contrib/device-tree/Bindings/spi/spi-cadence.yaml
index b7552739b554..d4b61b0e8301 100644
--- a/sys/contrib/device-tree/Bindings/spi/spi-cadence.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/spi-cadence.yaml
@@ -49,6 +49,12 @@ properties:
enum: [ 0, 1 ]
default: 0
+ power-domains:
+ maxItems: 1
+
+ label:
+ description: Descriptive name of the SPI controller.
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/spi/spi-fsl-lpspi.yaml b/sys/contrib/device-tree/Bindings/spi/spi-fsl-lpspi.yaml
index e91425012319..727c5346b8ce 100644
--- a/sys/contrib/device-tree/Bindings/spi/spi-fsl-lpspi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/spi-fsl-lpspi.yaml
@@ -63,6 +63,9 @@ properties:
maximum: 2
default: 1
+ power-domains:
+ maxItems: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/spi/spi-nxp-fspi.yaml b/sys/contrib/device-tree/Bindings/spi/spi-nxp-fspi.yaml
index a813c971ecf6..7fd591145480 100644
--- a/sys/contrib/device-tree/Bindings/spi/spi-nxp-fspi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/spi-nxp-fspi.yaml
@@ -45,6 +45,9 @@ properties:
- const: fspi_en
- const: fspi
+ power-domains:
+ maxItems: 1
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/spi/spi-peripheral-props.yaml b/sys/contrib/device-tree/Bindings/spi/spi-peripheral-props.yaml
index 782a014b63a7..15938f81fdce 100644
--- a/sys/contrib/device-tree/Bindings/spi/spi-peripheral-props.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/spi-peripheral-props.yaml
@@ -113,8 +113,14 @@ properties:
minItems: 2
maxItems: 4
+ st,spi-midi-ns:
+ description: |
+ Only for STM32H7, (Master Inter-Data Idleness) minimum time
+ delay in nanoseconds inserted between two consecutive data frames.
+
# The controller specific properties go here.
allOf:
+ - $ref: arm,pl022-peripheral-props.yaml#
- $ref: cdns,qspi-nor-peripheral-props.yaml#
- $ref: samsung,spi-peripheral-props.yaml#
- $ref: nvidia,tegra210-quad-peripheral-props.yaml#
diff --git a/sys/contrib/device-tree/Bindings/spi/spi-pl022.yaml b/sys/contrib/device-tree/Bindings/spi/spi-pl022.yaml
index 91e540a92faf..7f174b7d0a26 100644
--- a/sys/contrib/device-tree/Bindings/spi/spi-pl022.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/spi-pl022.yaml
@@ -11,6 +11,7 @@ maintainers:
allOf:
- $ref: spi-controller.yaml#
+ - $ref: /schemas/arm/primecell.yaml#
# We need a select here so we don't match all nodes with 'arm,primecell'
select:
@@ -73,57 +74,6 @@ properties:
resets:
maxItems: 1
-patternProperties:
- "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-f]+$":
- type: object
- # SPI slave nodes must be children of the SPI master node and can
- # contain the following properties.
- properties:
- pl022,interface:
- description: SPI interface type
- $ref: /schemas/types.yaml#/definitions/uint32
- enum:
- - 0 # SPI
- - 1 # Texas Instruments Synchronous Serial Frame Format
- - 2 # Microwire (Half Duplex)
-
- pl022,com-mode:
- description: Specifies the transfer mode
- $ref: /schemas/types.yaml#/definitions/uint32
- enum:
- - 0 # interrupt mode
- - 1 # polling mode
- - 2 # DMA mode
- default: 1
-
- pl022,rx-level-trig:
- description: Rx FIFO watermark level
- $ref: /schemas/types.yaml#/definitions/uint32
- minimum: 0
- maximum: 4
-
- pl022,tx-level-trig:
- description: Tx FIFO watermark level
- $ref: /schemas/types.yaml#/definitions/uint32
- minimum: 0
- maximum: 4
-
- pl022,ctrl-len:
- description: Microwire interface - Control length
- $ref: /schemas/types.yaml#/definitions/uint32
- minimum: 0x03
- maximum: 0x1f
-
- pl022,wait-state:
- description: Microwire interface - Wait state
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
- pl022,duplex:
- description: Microwire interface - Full/Half duplex
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1]
-
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml b/sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml
index 9ca1a843c820..4bd9aeb81208 100644
--- a/sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml
+++ b/sys/contrib/device-tree/Bindings/spi/st,stm32-spi.yaml
@@ -18,21 +18,14 @@ maintainers:
allOf:
- $ref: spi-controller.yaml#
- - if:
- properties:
- compatible:
- contains:
- const: st,stm32f4-spi
-
- then:
- properties:
- st,spi-midi-ns: false
properties:
compatible:
enum:
- st,stm32f4-spi
+ - st,stm32f7-spi
- st,stm32h7-spi
+ - st,stm32mp25-spi
reg:
maxItems: 1
@@ -59,17 +52,6 @@ properties:
- const: rx
- const: tx
-patternProperties:
- "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-f]+$":
- type: object
- # SPI slave nodes must be children of the SPI master node and can
- # contain the following properties.
- properties:
- st,spi-midi-ns:
- description: |
- Only for STM32H7, (Master Inter-Data Idleness) minimum time
- delay in nanoseconds inserted between two consecutive data frames.
-
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/sram/qcom,ocmem.yaml b/sys/contrib/device-tree/Bindings/sram/qcom,ocmem.yaml
index 4bbf6db0b6bd..61c784ef7b51 100644
--- a/sys/contrib/device-tree/Bindings/sram/qcom,ocmem.yaml
+++ b/sys/contrib/device-tree/Bindings/sram/qcom,ocmem.yaml
@@ -15,7 +15,9 @@ description: |
properties:
compatible:
- const: qcom,msm8974-ocmem
+ enum:
+ - qcom,msm8226-ocmem # v1.1.0
+ - qcom,msm8974-ocmem # v1.4.0
reg:
items:
@@ -28,11 +30,13 @@ properties:
- const: mem
clocks:
+ minItems: 1
items:
- description: Core clock
- description: Interface clock
clock-names:
+ minItems: 1
items:
- const: core
- const: iface
@@ -58,6 +62,26 @@ required:
additionalProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8974-ocmem
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ clock-names:
+ minItems: 2
+ else:
+ properties:
+ clocks:
+ minItems: 1
+ clock-names:
+ minItems: 1
+
patternProperties:
"-sram@[0-9a-f]+$":
type: object
diff --git a/sys/contrib/device-tree/Bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/sys/contrib/device-tree/Bindings/thermal/allwinner,sun8i-a83t-ths.yaml
index fbd4212285e2..9b2272a9ec15 100644
--- a/sys/contrib/device-tree/Bindings/thermal/allwinner,sun8i-a83t-ths.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/allwinner,sun8i-a83t-ths.yaml
@@ -16,6 +16,7 @@ properties:
- allwinner,sun8i-a83t-ths
- allwinner,sun8i-h3-ths
- allwinner,sun8i-r40-ths
+ - allwinner,sun20i-d1-ths
- allwinner,sun50i-a64-ths
- allwinner,sun50i-a100-ths
- allwinner,sun50i-h5-ths
@@ -61,6 +62,7 @@ allOf:
compatible:
contains:
enum:
+ - allwinner,sun20i-d1-ths
- allwinner,sun50i-a100-ths
- allwinner,sun50i-h6-ths
@@ -84,7 +86,9 @@ allOf:
properties:
compatible:
contains:
- const: allwinner,sun8i-h3-ths
+ enum:
+ - allwinner,sun8i-h3-ths
+ - allwinner,sun20i-d1-ths
then:
properties:
@@ -103,6 +107,7 @@ allOf:
enum:
- allwinner,sun8i-h3-ths
- allwinner,sun8i-r40-ths
+ - allwinner,sun20i-d1-ths
- allwinner,sun50i-a64-ths
- allwinner,sun50i-a100-ths
- allwinner,sun50i-h5-ths
diff --git a/sys/contrib/device-tree/Bindings/thermal/fsl,scu-thermal.yaml b/sys/contrib/device-tree/Bindings/thermal/fsl,scu-thermal.yaml
index 3721c8c8ec64..e02d04d4f71e 100644
--- a/sys/contrib/device-tree/Bindings/thermal/fsl,scu-thermal.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/fsl,scu-thermal.yaml
@@ -18,7 +18,9 @@ allOf:
properties:
compatible:
items:
- - const: fsl,imx8qxp-sc-thermal
+ - enum:
+ - fsl,imx8dxl-sc-thermal
+ - fsl,imx8qxp-sc-thermal
- const: fsl,imx-sc-thermal
'#thermal-sensor-cells':
diff --git a/sys/contrib/device-tree/Bindings/thermal/imx-thermal.yaml b/sys/contrib/device-tree/Bindings/thermal/imx-thermal.yaml
index 3aecea77869f..808d987bd8d1 100644
--- a/sys/contrib/device-tree/Bindings/thermal/imx-thermal.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/imx-thermal.yaml
@@ -60,6 +60,9 @@ properties:
clocks:
maxItems: 1
+ "#thermal-sensor-cells":
+ const: 0
+
required:
- compatible
- interrupts
@@ -67,6 +70,9 @@ required:
- nvmem-cells
- nvmem-cell-names
+allOf:
+ - $ref: thermal-sensor.yaml#
+
additionalProperties: false
examples:
@@ -104,5 +110,6 @@ examples:
nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
nvmem-cell-names = "calib", "temp_grade";
clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
+ #thermal-sensor-cells = <0>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/thermal/loongson,ls2k-thermal.yaml b/sys/contrib/device-tree/Bindings/thermal/loongson,ls2k-thermal.yaml
new file mode 100644
index 000000000000..b634f57cd011
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/thermal/loongson,ls2k-thermal.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/loongson,ls2k-thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Thermal sensors on Loongson-2 SoCs
+
+maintainers:
+ - zhanghongchen <zhanghongchen@loongson.cn>
+ - Yinbo Zhu <zhuyinbo@loongson.cn>
+
+allOf:
+ - $ref: /schemas/thermal/thermal-sensor.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - loongson,ls2k1000-thermal
+ - items:
+ - enum:
+ - loongson,ls2k2000-thermal
+ - const: loongson,ls2k1000-thermal
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ '#thermal-sensor-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - '#thermal-sensor-cells'
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ thermal: thermal-sensor@1fe01500 {
+ compatible = "loongson,ls2k1000-thermal";
+ reg = <0x1fe01500 0x30>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ #thermal-sensor-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/thermal/mediatek,lvts-thermal.yaml b/sys/contrib/device-tree/Bindings/thermal/mediatek,lvts-thermal.yaml
index fe9ae4c425c0..e6665af52ee6 100644
--- a/sys/contrib/device-tree/Bindings/thermal/mediatek,lvts-thermal.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/mediatek,lvts-thermal.yaml
@@ -18,6 +18,7 @@ description: |
properties:
compatible:
enum:
+ - mediatek,mt7988-lvts-ap
- mediatek,mt8192-lvts-ap
- mediatek,mt8192-lvts-mcu
- mediatek,mt8195-lvts-ap
diff --git a/sys/contrib/device-tree/Bindings/thermal/mediatek,thermal.yaml b/sys/contrib/device-tree/Bindings/thermal/mediatek,thermal.yaml
new file mode 100644
index 000000000000..d96a2e32bd8f
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/thermal/mediatek,thermal.yaml
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/mediatek,thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek thermal controller for on-SoC temperatures
+
+maintainers:
+ - Sascha Hauer <s.hauer@pengutronix.de>
+
+description:
+ This device does not have its own ADC, instead it directly controls the AUXADC
+ via AHB bus accesses. For this reason it needs phandles to the AUXADC. Also it
+ controls a mux in the apmixedsys register space via AHB bus accesses, so a
+ phandle to the APMIXEDSYS is also needed.
+
+allOf:
+ - $ref: thermal-sensor.yaml#
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt2701-thermal
+ - mediatek,mt2712-thermal
+ - mediatek,mt7622-thermal
+ - mediatek,mt7981-thermal
+ - mediatek,mt7986-thermal
+ - mediatek,mt8173-thermal
+ - mediatek,mt8183-thermal
+ - mediatek,mt8365-thermal
+ - mediatek,mt8516-thermal
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Main clock needed for register access
+ - description: The AUXADC clock
+
+ clock-names:
+ items:
+ - const: therm
+ - const: auxadc
+
+ mediatek,auxadc:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: A phandle to the AUXADC which the thermal controller uses
+
+ mediatek,apmixedsys:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: A phandle to the APMIXEDSYS controller
+
+ resets:
+ description: Reset controller controlling the thermal controller
+
+ nvmem-cells:
+ items:
+ - description:
+ NVMEM cell with EEPROMA phandle to the calibration data provided by an
+ NVMEM device. If unspecified default values shall be used.
+
+ nvmem-cell-names:
+ items:
+ - const: calibration-data
+
+required:
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - mediatek,auxadc
+ - mediatek,apmixedsys
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/clock/mt8173-clk.h>
+ #include <dt-bindings/reset/mt8173-resets.h>
+
+ thermal@1100b000 {
+ compatible = "mediatek,mt8173-thermal";
+ reg = <0x1100b000 0x1000>;
+ interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
+ clock-names = "therm", "auxadc";
+ resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
+ mediatek,auxadc = <&auxadc>;
+ mediatek,apmixedsys = <&apmixedsys>;
+ nvmem-cells = <&thermal_calibration_data>;
+ nvmem-cell-names = "calibration-data";
+ #thermal-sensor-cells = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/thermal/nvidia,tegra124-soctherm.yaml b/sys/contrib/device-tree/Bindings/thermal/nvidia,tegra124-soctherm.yaml
new file mode 100644
index 000000000000..b0237d236021
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/thermal/nvidia,tegra124-soctherm.yaml
@@ -0,0 +1,385 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/nvidia,tegra124-soctherm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra124 SOCTHERM Thermal Management System
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Jon Hunter <jonathanh@nvidia.com>
+
+description: The SOCTHERM IP block contains thermal sensors, support for
+ polled or interrupt-based thermal monitoring, CPU and GPU throttling based
+ on temperature trip points, and handling external overcurrent notifications.
+ It is also used to manage emergency shutdown in an overheating situation.
+
+properties:
+ compatible:
+ enum:
+ - nvidia,tegra124-soctherm
+ - nvidia,tegra132-soctherm
+ - nvidia,tegra210-soctherm
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ maxItems: 2
+
+ interrupts:
+ items:
+ - description: module interrupt
+ - description: EDP interrupt
+
+ interrupt-names:
+ items:
+ - const: thermal
+ - const: edp
+
+ clocks:
+ items:
+ - description: thermal sensor clock
+ - description: module clock
+
+ clock-names:
+ items:
+ - const: tsensor
+ - const: soctherm
+
+ resets:
+ items:
+ - description: module reset
+
+ reset-names:
+ items:
+ - const: soctherm
+
+ "#thermal-sensor-cells":
+ const: 1
+
+ throttle-cfgs:
+ $ref: thermal-cooling-devices.yaml
+ description: A sub-node which is a container of configuration for each
+ hardware throttle events. These events can be set as cooling devices.
+ Throttle event sub-nodes must be named as "light" or "heavy".
+ unevaluatedProperties: false
+ patternProperties:
+ "^(light|heavy|oc1)$":
+ type: object
+ additionalProperties: false
+
+ properties:
+ "#cooling-cells":
+ const: 2
+
+ nvidia,priority:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 100
+ description: Each throttles has its own throttle settings, so the
+ SW need to set priorities for various throttle, the HW arbiter
+ can select the final throttle settings. Bigger value indicates
+ higher priority, In general, higher priority translates to lower
+ target frequency. SW needs to ensure that critical thermal
+ alarms are given higher priority, and ensure that there is no
+ race if priority of two vectors is set to the same value.
+
+ nvidia,cpu-throt-percent:
+ description: This property is for Tegra124 and Tegra210. It is the
+ throttling depth of pulse skippers, it's the percentage
+ throttling.
+ minimum: 0
+ maximum: 100
+
+ nvidia,cpu-throt-level:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: This property is only for Tegra132, it is the level
+ of pulse skippers, which used to throttle clock frequencies. It
+ indicates cpu clock throttling depth, and the depth can be
+ programmed.
+ enum:
+ # none (TEGRA_SOCTHERM_THROT_LEVEL_NONE)
+ - 0
+ # low (TEGRA_SOCTHERM_THROT_LEVEL_LOW)
+ - 1
+ # medium (TEGRA_SOCTHERM_THROT_LEVEL_MED)
+ - 2
+ # high (TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
+ - 3
+
+ nvidia,gpu-throt-level:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: This property is for Tegra124 and Tegra210. It is the
+ level of pulse skippers, which used to throttle clock
+ frequencies. It indicates gpu clock throttling depth and can be
+ programmed to any of the following values which represent a
+ throttling percentage.
+ enum:
+ # none (0%, TEGRA_SOCTHERM_THROT_LEVEL_NONE)
+ - 0
+ # low (50%, TEGRA_SOCTHERM_THROT_LEVEL_LOW)
+ - 1
+ # medium (75%, TEGRA_SOCTHERM_THROT_LEVEL_MED)
+ - 2
+ # high (85%, TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
+ - 3
+
+ # optional
+ # Tegra210 specific and valid only for OCx throttle events
+ nvidia,count-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Specifies the number of OC events that are required
+ for triggering an interrupt. Interrupts are not triggered if the
+ property is missing. A value of 0 will interrupt on every OC
+ alarm.
+
+ nvidia,polarity-active-low:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: Configures the polarity of the OC alaram signal. If
+ present, this means assert low, otherwise assert high.
+
+ nvidia,alarm-filter:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Number of clocks to filter event. When the filter
+ expires (which means the OC event has not occurred for a long
+ time), the counter is cleared and filter is rearmed.
+ default: 0
+
+ nvidia,throttle-period-us:
+ description: Specifies the number of microseconds for which
+ throttling is engaged after the OC event is deasserted.
+ default: 0
+
+ # optional
+ nvidia,thermtrips:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ description: |
+ When present, this property specifies the temperature at which the
+ SOCTHERM hardware will assert the thermal trigger signal to the Power
+ Management IC, which can be configured to reset or shutdown the device.
+ It is an array of pairs where each pair represents a tsensor ID followed
+ by a temperature in milli Celcius. In the absence of this property the
+ critical trip point will be used for thermtrip temperature.
+
+ Note:
+ - the "critical" type trip points will be used to set the temperature at
+ which the SOCTHERM hardware will assert a thermal trigger if the
+ "nvidia,thermtrips" property is missing. When the thermtrips property
+ is present, the breach of a critical trip point is reported back to
+ the thermal framework to implement software shutdown.
+
+ - the "hot" type trip points will be set to SOCTHERM hardware as the
+ throttle temperature. Once the temperature of this thermal zone is
+ higher than it, it will trigger the HW throttle event.
+ items:
+ items:
+ - description: sensor ID
+ oneOf:
+ - description: CPU sensor
+ const: 0
+ - description: MEM sensor
+ const: 1
+ - description: GPU sensor
+ const: 2
+ - description: PLLX sensor
+ const: 3
+ - description: temperature threshold (in millidegree Celsius)
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+ - interrupt-names
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - "#thermal-sensor-cells"
+
+allOf:
+ - $ref: thermal-sensor.yaml
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - nvidia,tegra124-soctherm
+ - nvidia,tegra210-soctherm
+ then:
+ properties:
+ reg:
+ items:
+ - description: SOCTHERM register set
+ - description: clock and reset controller registers
+
+ reg-names:
+ items:
+ - const: soctherm-reg
+ - const: car-reg
+
+ else:
+ properties:
+ reg:
+ items:
+ - description: SOCTHERM register set
+ - description: CCROC registers
+
+ reg-names:
+ items:
+ - const: soctherm-reg
+ - const: ccroc-reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra124-car.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/thermal/tegra124-soctherm.h>
+
+ soctherm@700e2000 {
+ compatible = "nvidia,tegra124-soctherm";
+ reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */
+ <0x60006000 0x400>; /* CAR reg_base */
+ reg-names = "soctherm-reg", "car-reg";
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "thermal", "edp";
+ clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
+ <&tegra_car TEGRA124_CLK_SOC_THERM>;
+ clock-names = "tsensor", "soctherm";
+ resets = <&tegra_car 78>;
+ reset-names = "soctherm";
+
+ #thermal-sensor-cells = <1>;
+
+ nvidia,thermtrips = <TEGRA124_SOCTHERM_SENSOR_CPU 102500>,
+ <TEGRA124_SOCTHERM_SENSOR_GPU 103000>;
+
+ throttle-cfgs {
+ /*
+ * When the "heavy" cooling device triggered,
+ * the HW will skip cpu clock's pulse in 85% depth,
+ * skip gpu clock's pulse in 85% level
+ */
+ heavy {
+ nvidia,priority = <100>;
+ nvidia,cpu-throt-percent = <85>;
+ nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
+
+ #cooling-cells = <2>;
+ };
+
+ /*
+ * When the "light" cooling device triggered,
+ * the HW will skip cpu clock's pulse in 50% depth,
+ * skip gpu clock's pulse in 50% level
+ */
+ light {
+ nvidia,priority = <80>;
+ nvidia,cpu-throt-percent = <50>;
+ nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_LOW>;
+
+ #cooling-cells = <2>;
+ };
+
+ /*
+ * If these two devices are triggered in same time, the HW throttle
+ * arbiter will select the highest priority as the final throttle
+ * settings to skip cpu pulse.
+ */
+
+ oc1 {
+ nvidia,priority = <50>;
+ nvidia,polarity-active-low;
+ nvidia,count-threshold = <100>;
+ nvidia,alarm-filter = <5100000>;
+ nvidia,throttle-period-us = <0>;
+ nvidia,cpu-throt-percent = <75>;
+ nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
+ };
+ };
+ };
+
+ # referring to Tegra132's "reg", "reg-names" and "throttle-cfgs"
+ - |
+ thermal-sensor@700e2000 {
+ compatible = "nvidia,tegra132-soctherm";
+ reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */
+ <0x70040000 0x200>; /* CCROC reg_base */
+ reg-names = "soctherm-reg", "ccroc-reg";
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "thermal", "edp";
+ clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
+ <&tegra_car TEGRA124_CLK_SOC_THERM>;
+ clock-names = "tsensor", "soctherm";
+ resets = <&tegra_car 78>;
+ reset-names = "soctherm";
+ #thermal-sensor-cells = <1>;
+
+ throttle-cfgs {
+ /*
+ * When the "heavy" cooling device triggered,
+ * the HW will skip cpu clock's pulse in HIGH level
+ */
+ heavy {
+ nvidia,priority = <100>;
+ nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
+
+ #cooling-cells = <2>;
+ };
+
+ /*
+ * When the "light" cooling device triggered,
+ * the HW will skip cpu clock's pulse in MED level
+ */
+ light {
+ nvidia,priority = <80>;
+ nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
+
+ #cooling-cells = <2>;
+ };
+
+ /*
+ * If these two devices are triggered in same time, the HW throttle
+ * arbiter will select the highest priority as the final throttle
+ * settings to skip cpu pulse.
+ */
+ };
+ };
+
+ # referring to thermal sensors
+ - |
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <1000>;
+ polling-delay = <1000>;
+
+ thermal-sensors = <&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
+
+ trips {
+ cpu_shutdown_trip: shutdown-trip {
+ temperature = <102500>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+
+ cpu_throttle_trip: throttle-trip {
+ temperature = <100000>;
+ hysteresis = <1000>;
+ type = "hot";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_throttle_trip>;
+ cooling-device = <&throttle_heavy 1 1>;
+ };
+ };
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/thermal/qcom-lmh.yaml b/sys/contrib/device-tree/Bindings/thermal/qcom-lmh.yaml
index 92762efc2120..5ff72ce5c887 100644
--- a/sys/contrib/device-tree/Bindings/thermal/qcom-lmh.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/qcom-lmh.yaml
@@ -8,7 +8,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Limits Management Hardware(LMh)
maintainers:
- - Thara Gopinath <thara.gopinath@linaro.org>
+ - Thara Gopinath <thara.gopinath@gmail.com>
description:
Limits Management Hardware(LMh) is a hardware infrastructure on some
diff --git a/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm-hc.yaml b/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm-hc.yaml
index 01253d58bf9f..7541e27704ca 100644
--- a/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm-hc.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm-hc.yaml
@@ -114,12 +114,14 @@ examples:
- |
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spmi_bus {
+
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
+
pm8998_adc: adc@3100 {
- reg = <0x3100>;
compatible = "qcom,spmi-adc-rev2";
+ reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
@@ -130,7 +132,7 @@ examples:
};
};
- pm8998_adc_tm: adc-tm@3400 {
+ adc-tm@3400 {
compatible = "qcom,spmi-adc-tm-hc";
reg = <0x3400>;
interrupts = <0x2 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
diff --git a/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm5.yaml b/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm5.yaml
index 3c81def03c84..d9d2657287cb 100644
--- a/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm5.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-adc-tm5.yaml
@@ -167,12 +167,14 @@ examples:
- |
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spmi_bus {
+
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
+
pm8150b_adc: adc@3100 {
- reg = <0x3100>;
compatible = "qcom,spmi-adc5";
+ reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
@@ -186,7 +188,7 @@ examples:
};
};
- pm8150b_adc_tm: adc-tm@3500 {
+ adc-tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
@@ -207,12 +209,14 @@ examples:
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spmi_bus {
+
+ pmic {
#address-cells = <1>;
#size-cells = <0>;
+
pmk8350_vadc: adc@3100 {
- reg = <0x3100>;
compatible = "qcom,spmi-adc7";
+ reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
@@ -233,7 +237,7 @@ examples:
};
};
- pmk8350_adc_tm: adc-tm@3400 {
+ adc-tm@3400 {
compatible = "qcom,spmi-adc-tm5-gen2";
reg = <0x3400>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
diff --git a/sys/contrib/device-tree/Bindings/thermal/qcom-tsens.yaml b/sys/contrib/device-tree/Bindings/thermal/qcom-tsens.yaml
index 27e9e16e6455..99d9c526c0b6 100644
--- a/sys/contrib/device-tree/Bindings/thermal/qcom-tsens.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/qcom-tsens.yaml
@@ -51,6 +51,7 @@ properties:
- qcom,msm8996-tsens
- qcom,msm8998-tsens
- qcom,qcm2290-tsens
+ - qcom,sa8775p-tsens
- qcom,sc7180-tsens
- qcom,sc7280-tsens
- qcom,sc8180x-tsens
@@ -65,6 +66,7 @@ properties:
- qcom,sm8350-tsens
- qcom,sm8450-tsens
- qcom,sm8550-tsens
+ - qcom,sm8650-tsens
- const: qcom,tsens-v2
- description: v2 of TSENS with combined interrupt
diff --git a/sys/contrib/device-tree/Bindings/thermal/thermal-zones.yaml b/sys/contrib/device-tree/Bindings/thermal/thermal-zones.yaml
index 4f3acdc4dec0..dbd52620d293 100644
--- a/sys/contrib/device-tree/Bindings/thermal/thermal-zones.yaml
+++ b/sys/contrib/device-tree/Bindings/thermal/thermal-zones.yaml
@@ -8,7 +8,7 @@ $schema: http://devicetree.org/meta-schemas/base.yaml#
title: Thermal zone
maintainers:
- - Amit Kucheria <amitk@kernel.org>
+ - Daniel Lezcano <daniel.lezcano@linaro.org>
description: |
Thermal management is achieved in devicetree by describing the sensor hardware
@@ -75,6 +75,22 @@ patternProperties:
framework and assumes that the thermal sensors in this zone
support interrupts.
+ critical-action:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: |
+ The action the OS should perform after the critical temperature is reached.
+ By default the system will shutdown as a safe action to prevent damage
+ to the hardware, if the property is not set.
+ The shutdown action should be always the default and preferred one.
+ Choose 'reboot' with care, as the hardware may be in thermal stress,
+ thus leading to infinite reboots that may cause damage to the hardware.
+ Make sure the firmware/bootloader will act as the last resort and take
+ over the thermal control.
+
+ enum:
+ - shutdown
+ - reboot
+
thermal-sensors:
$ref: /schemas/types.yaml#/definitions/phandle-array
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/timer/cirrus,ep9301-timer.yaml b/sys/contrib/device-tree/Bindings/timer/cirrus,ep9301-timer.yaml
new file mode 100644
index 000000000000..e463e11e259d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/timer/cirrus,ep9301-timer.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/cirrus,ep9301-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic EP93xx timer
+
+maintainers:
+ - Alexander Sverdlin <alexander.sverdlin@gmail.com>
+ - Nikita Shubin <nikita.shubin@maquefel.me>
+
+properties:
+ compatible:
+ oneOf:
+ - const: cirrus,ep9301-timer
+ - items:
+ - enum:
+ - cirrus,ep9302-timer
+ - cirrus,ep9307-timer
+ - cirrus,ep9312-timer
+ - cirrus,ep9315-timer
+ - const: cirrus,ep9301-timer
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ timer@80810000 {
+ compatible = "cirrus,ep9301-timer";
+ reg = <0x80810000 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <19>;
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/timer/fsl,imxgpt.yaml b/sys/contrib/device-tree/Bindings/timer/fsl,imxgpt.yaml
index dbe1267af06a..e2607377cbae 100644
--- a/sys/contrib/device-tree/Bindings/timer/fsl,imxgpt.yaml
+++ b/sys/contrib/device-tree/Bindings/timer/fsl,imxgpt.yaml
@@ -36,7 +36,9 @@ properties:
- fsl,imxrt1170-gpt
- const: fsl,imx6dl-gpt
- items:
- - const: fsl,imx6ul-gpt
+ - enum:
+ - fsl,imx6ul-gpt
+ - fsl,imx7d-gpt
- const: fsl,imx6sx-gpt
reg:
@@ -46,14 +48,18 @@ properties:
maxItems: 1
clocks:
+ minItems: 2
items:
- description: SoC GPT ipg clock
- description: SoC GPT per clock
+ - description: SoC GPT osc per clock
clock-names:
+ minItems: 2
items:
- const: ipg
- const: per
+ - const: osc_per
required:
- compatible
@@ -62,6 +68,29 @@ required:
- clocks
- clock-names
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx6dl-gpt
+ - fsl,imx6q-gpt
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 3
+ clock-names:
+ minItems: 2
+ maxItems: 3
+ else:
+ properties:
+ clocks:
+ maxItems: 2
+ clock-names:
+ maxItems: 2
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/timer/ingenic,tcu.yaml b/sys/contrib/device-tree/Bindings/timer/ingenic,tcu.yaml
index 2d14610888a7..585b5f5217c4 100644
--- a/sys/contrib/device-tree/Bindings/timer/ingenic,tcu.yaml
+++ b/sys/contrib/device-tree/Bindings/timer/ingenic,tcu.yaml
@@ -8,7 +8,7 @@ title: Ingenic SoCs Timer/Counter Unit (TCU)
description: |
For a description of the TCU hardware and drivers, have a look at
- Documentation/mips/ingenic-tcu.rst.
+ Documentation/arch/mips/ingenic-tcu.rst.
maintainers:
- Paul Cercueil <paul@crapouillou.net>
diff --git a/sys/contrib/device-tree/Bindings/timer/renesas,rz-mtu3.yaml b/sys/contrib/device-tree/Bindings/timer/renesas,rz-mtu3.yaml
index bffdab0b0185..3931054b42fb 100644
--- a/sys/contrib/device-tree/Bindings/timer/renesas,rz-mtu3.yaml
+++ b/sys/contrib/device-tree/Bindings/timer/renesas,rz-mtu3.yaml
@@ -11,8 +11,8 @@ maintainers:
description: |
This hardware block consists of eight 16-bit timer channels and one
- 32- bit timer channel. It supports the following specifications:
- - Pulse input/output: 28 lines max.
+ 32-bit timer channel. It supports the following specifications:
+ - Pulse input/output: 28 lines max
- Pulse input 3 lines
- Count clock 11 clocks for each channel (14 clocks for MTU0, 12 clocks
for MTU2, and 10 clocks for MTU5, four clocks for MTU1-MTU2 combination
@@ -23,11 +23,11 @@ description: |
- Input capture function (noise filter setting available)
- Counter-clearing operation
- Simultaneous writing to multiple timer counters (TCNT)
- (excluding MTU8).
+ (excluding MTU8)
- Simultaneous clearing on compare match or input capture
- (excluding MTU8).
+ (excluding MTU8)
- Simultaneous input and output to registers in synchronization with
- counter operations (excluding MTU8).
+ counter operations (excluding MTU8)
- Up to 12-phase PWM output in combination with synchronous operation
(excluding MTU8)
- [MTU0 MTU3, MTU4, MTU6, MTU7, and MTU8]
@@ -40,26 +40,26 @@ description: |
- [MTU3, MTU4, MTU6, and MTU7]
- Through interlocked operation of MTU3/4 and MTU6/7, the positive and
negative signals in six phases (12 phases in total) can be output in
- complementary PWM and reset-synchronized PWM operation.
+ complementary PWM and reset-synchronized PWM operation
- In complementary PWM mode, values can be transferred from buffer
registers to temporary registers at crests and troughs of the timer-
counter values or when the buffer registers (TGRD registers in MTU4
- and MTU7) are written to.
- - Double-buffering selectable in complementary PWM mode.
+ and MTU7) are written to
+ - Double-buffering selectable in complementary PWM mode
- [MTU3 and MTU4]
- Through interlocking with MTU0, a mode for driving AC synchronous
motors (brushless DC motors) by using complementary PWM output and
reset-synchronized PWM output is settable and allows the selection
- of two types of waveform output (chopping or level).
+ of two types of waveform output (chopping or level)
- [MTU5]
- - Capable of operation as a dead-time compensation counter.
+ - Capable of operation as a dead-time compensation counter
- [MTU0/MTU5, MTU1, MTU2, and MTU8]
- 32-bit phase counting mode specifiable by combining MTU1 and MTU2 and
- through interlocked operation with MTU0/MTU5 and MTU8.
+ through interlocked operation with MTU0/MTU5 and MTU8
- Interrupt-skipping function
- In complementary PWM mode, interrupts on crests and troughs of counter
values and triggers to start conversion by the A/D converter can be
- skipped.
+ skipped
- Interrupt sources: 43 sources.
- Buffer operation:
- Automatic transfer of register data (transfer from the buffer
@@ -68,9 +68,9 @@ description: |
- A/D converter start triggers can be generated
- A/D converter start request delaying function enables A/D converter
to be started with any desired timing and to be synchronized with
- PWM output.
+ PWM output
- Low power consumption function
- - The MTU3a can be placed in the module-stop state.
+ - The MTU3a can be placed in the module-stop state
There are two phase counting modes. 16-bit phase counting mode in which
MTU1 and MTU2 operate independently, and cascade connection 32-bit phase
@@ -109,6 +109,7 @@ properties:
compatible:
items:
- enum:
+ - renesas,r9a07g043-mtu3 # RZ/{G2UL,Five}
- renesas,r9a07g044-mtu3 # RZ/G2{L,LC}
- renesas,r9a07g054-mtu3 # RZ/V2L
- const: renesas,rz-mtu3
@@ -169,27 +170,27 @@ properties:
- const: tgib0
- const: tgic0
- const: tgid0
- - const: tgiv0
+ - const: tciv0
- const: tgie0
- const: tgif0
- const: tgia1
- const: tgib1
- - const: tgiv1
- - const: tgiu1
+ - const: tciv1
+ - const: tciu1
- const: tgia2
- const: tgib2
- - const: tgiv2
- - const: tgiu2
+ - const: tciv2
+ - const: tciu2
- const: tgia3
- const: tgib3
- const: tgic3
- const: tgid3
- - const: tgiv3
+ - const: tciv3
- const: tgia4
- const: tgib4
- const: tgic4
- const: tgid4
- - const: tgiv4
+ - const: tciv4
- const: tgiu5
- const: tgiv5
- const: tgiw5
@@ -197,18 +198,18 @@ properties:
- const: tgib6
- const: tgic6
- const: tgid6
- - const: tgiv6
+ - const: tciv6
- const: tgia7
- const: tgib7
- const: tgic7
- const: tgid7
- - const: tgiv7
+ - const: tciv7
- const: tgia8
- const: tgib8
- const: tgic8
- const: tgid8
- - const: tgiv8
- - const: tgiu8
+ - const: tciv8
+ - const: tciu8
clocks:
maxItems: 1
@@ -285,16 +286,16 @@ examples:
<GIC_SPI 211 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 212 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 213 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0", "tgiv0", "tgie0",
+ interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0", "tciv0", "tgie0",
"tgif0",
- "tgia1", "tgib1", "tgiv1", "tgiu1",
- "tgia2", "tgib2", "tgiv2", "tgiu2",
- "tgia3", "tgib3", "tgic3", "tgid3", "tgiv3",
- "tgia4", "tgib4", "tgic4", "tgid4", "tgiv4",
+ "tgia1", "tgib1", "tciv1", "tciu1",
+ "tgia2", "tgib2", "tciv2", "tciu2",
+ "tgia3", "tgib3", "tgic3", "tgid3", "tciv3",
+ "tgia4", "tgib4", "tgic4", "tgid4", "tciv4",
"tgiu5", "tgiv5", "tgiw5",
- "tgia6", "tgib6", "tgic6", "tgid6", "tgiv6",
- "tgia7", "tgib7", "tgic7", "tgid7", "tgiv7",
- "tgia8", "tgib8", "tgic8", "tgid8", "tgiv8", "tgiu8";
+ "tgia6", "tgib6", "tgic6", "tgid6", "tciv6",
+ "tgia7", "tgib7", "tgic7", "tgid7", "tciv7",
+ "tgia8", "tgib8", "tgic8", "tgid8", "tciv8", "tciu8";
clocks = <&cpg CPG_MOD R9A07G044_MTU_X_MCK_MTU3>;
power-domains = <&cpg>;
resets = <&cpg R9A07G044_MTU_X_PRESET_MTU3>;
diff --git a/sys/contrib/device-tree/Bindings/timer/sifive,clint.yaml b/sys/contrib/device-tree/Bindings/timer/sifive,clint.yaml
index a0185e15a42f..fced6f2d8ecb 100644
--- a/sys/contrib/device-tree/Bindings/timer/sifive,clint.yaml
+++ b/sys/contrib/device-tree/Bindings/timer/sifive,clint.yaml
@@ -33,10 +33,13 @@ properties:
- sifive,fu540-c000-clint # SiFive FU540
- starfive,jh7100-clint # StarFive JH7100
- starfive,jh7110-clint # StarFive JH7110
+ - starfive,jh8100-clint # StarFive JH8100
- const: sifive,clint0 # SiFive CLINT v0 IP block
- items:
- enum:
- allwinner,sun20i-d1-clint
+ - sophgo,cv1800b-clint
+ - sophgo,cv1812h-clint
- thead,th1520-clint
- const: thead,c900-clint
- items:
diff --git a/sys/contrib/device-tree/Bindings/timer/snps,arc-timer.txt b/sys/contrib/device-tree/Bindings/timer/snps,arc-timer.txt
index 147ef3e74452..b02ab0af10ce 100644
--- a/sys/contrib/device-tree/Bindings/timer/snps,arc-timer.txt
+++ b/sys/contrib/device-tree/Bindings/timer/snps,arc-timer.txt
@@ -1,7 +1,7 @@
Synopsys ARC Local Timer with Interrupt Capabilities
- Found on all ARC CPUs (ARC700/ARCHS)
- Can be optionally programmed to interrupt on Limit
-- Two idential copies TIMER0 and TIMER1 exist in ARC cores and historically
+- Two identical copies TIMER0 and TIMER1 exist in ARC cores and historically
TIMER0 used as clockevent provider (true for all ARC cores)
TIMER1 used for clocksource (mandatory for ARC700, optional for ARC HS)
diff --git a/sys/contrib/device-tree/Bindings/timer/thead,c900-aclint-mtimer.yaml b/sys/contrib/device-tree/Bindings/timer/thead,c900-aclint-mtimer.yaml
new file mode 100644
index 000000000000..2e92bcdeb423
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/timer/thead,c900-aclint-mtimer.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/thead,c900-aclint-mtimer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo CLINT Timer
+
+maintainers:
+ - Inochi Amaoto <inochiama@outlook.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - sophgo,sg2042-aclint-mtimer
+ - const: thead,c900-aclint-mtimer
+
+ reg:
+ items:
+ - description: MTIMECMP Registers
+
+ reg-names:
+ items:
+ - const: mtimecmp
+
+ interrupts-extended:
+ minItems: 1
+ maxItems: 4095
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts-extended
+
+examples:
+ - |
+ timer@ac000000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ interrupts-extended = <&cpu1intc 7>,
+ <&cpu2intc 7>,
+ <&cpu3intc 7>,
+ <&cpu4intc 7>;
+ reg = <0xac000000 0x00010000>;
+ reg-names = "mtimecmp";
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/tpm/google,cr50.yaml b/sys/contrib/device-tree/Bindings/tpm/google,cr50.yaml
new file mode 100644
index 000000000000..9302e12e9fc7
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/google,cr50.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/google,cr50.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google Security Chip H1 (running Cr50 firmware)
+
+maintainers:
+ - Andrey Pronin <apronin@chromium.org>
+
+description: |
+ Google has designed a family of security chips called "Titan".
+ One member is the H1 built into Chromebooks and running Cr50 firmware:
+ https://www.osfc.io/2018/talks/google-secure-microcontroller-and-ccd-closed-case-debugging/
+
+ The chip provides several functions, including TPM 2.0 like functionality.
+ It communicates over SPI or I²C using the FIFO protocol described in the
+ TCG PC Client Platform TPM Profile Specification for TPM 2.0 (PTP), sec 6:
+ https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
+
+properties:
+ compatible:
+ const: google,cr50
+
+allOf:
+ - $ref: tpm-common.yaml#
+
+anyOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - $ref: tcg,tpm-tis-i2c.yaml#/properties/reg
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@0 {
+ reg = <0>;
+ compatible = "google,cr50";
+ spi-max-frequency = <800000>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@50 {
+ compatible = "google,cr50";
+ reg = <0x50>;
+ interrupts-extended = <&pio 88 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cr50_int>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/tpm/ibm,vtpm.yaml b/sys/contrib/device-tree/Bindings/tpm/ibm,vtpm.yaml
new file mode 100644
index 000000000000..50a3fd31241c
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/ibm,vtpm.yaml
@@ -0,0 +1,104 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/ibm,vtpm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM Virtual Trusted Platform Module (vTPM)
+
+maintainers:
+ - Nayna Jain <nayna@linux.ibm.com>
+
+description: |
+ Virtual TPM is used on IBM POWER7+ and POWER8 systems running POWERVM.
+ It is supported through the adjunct partition with firmware release 740
+ or higher. With vTPM support, each lpar is able to have its own vTPM
+ without the physical TPM hardware. The TPM functionality is provided by
+ communicating with the vTPM adjunct partition through Hypervisor calls
+ (Hcalls) and Command/Response Queue (CRQ) commands.
+
+properties:
+ compatible:
+ enum:
+ - IBM,vtpm
+ - IBM,vtpm20
+
+ device_type:
+ description:
+ type of virtual device
+ enum:
+ - IBM,vtpm
+ - IBM,vtpm20
+
+ reg:
+ maxItems: 1
+
+ 'ibm,#dma-address-cells':
+ description:
+ number of cells that are used to encode the physical address field of
+ dma-window properties
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ 'ibm,#dma-size-cells':
+ description:
+ number of cells that are used to encode the size field of
+ dma-window properties
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ ibm,my-dma-window:
+ description:
+ DMA window associated with this virtual I/O Adapter
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 5
+ maxItems: 5
+
+ ibm,my-drc-index:
+ description:
+ integer index for the connector between the device and its parent;
+ present only if Dynamic Reconfiguration (DR) Connector is enabled
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ ibm,loc-code:
+ description:
+ unique and persistent location code associated with this virtual
+ I/O Adapter
+ $ref: /schemas/types.yaml#/definitions/string
+
+required:
+ - compatible
+ - device_type
+ - reg
+ - interrupts
+ - ibm,#dma-address-cells
+ - ibm,#dma-size-cells
+ - ibm,my-dma-window
+ - ibm,my-drc-index
+ - ibm,loc-code
+ - linux,sml-base
+ - linux,sml-size
+
+allOf:
+ - $ref: tpm-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@30000003 {
+ compatible = "IBM,vtpm";
+ device_type = "IBM,vtpm";
+ reg = <0x30000003>;
+ interrupts = <0xa0003 0x0>;
+ ibm,#dma-address-cells = <0x2>;
+ ibm,#dma-size-cells = <0x2>;
+ ibm,my-dma-window = <0x10000003 0x0 0x0 0x0 0x10000000>;
+ ibm,my-drc-index = <0x30000003>;
+ ibm,loc-code = "U8286.41A.10082DV-V3-C3";
+ linux,sml-base = <0xc60e 0x0>;
+ linux,sml-size = <0xbce10200>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/tpm/microsoft,ftpm.yaml b/sys/contrib/device-tree/Bindings/tpm/microsoft,ftpm.yaml
new file mode 100644
index 000000000000..fdb81968f03d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/microsoft,ftpm.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/microsoft,ftpm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microsoft firmware-based Trusted Platform Module (fTPM)
+
+maintainers:
+ - Thirupathaiah Annapureddy <thiruan@microsoft.com>
+ - Sasha Levin <sashal@kernel.org>
+
+description: |
+ Commodity CPU architectures, such as ARM and Intel CPUs, have started to
+ offer trusted computing features in their CPUs aimed at displacing dedicated
+ trusted hardware. Unfortunately, these CPU architectures raise serious
+ challenges to building trusted systems because they omit providing secure
+ resources outside the CPU perimeter.
+
+ Microsoft's firmware-based TPM 2.0 (fTPM) leverages ARM TrustZone to overcome
+ these challenges and provide software with security guarantees similar to
+ those of dedicated trusted hardware.
+
+ https://www.microsoft.com/en-us/research/publication/ftpm-software-implementation-tpm-chip/
+ https://github.com/Microsoft/ms-tpm-20-ref/tree/main/Samples/ARM32-FirmwareTPM
+
+properties:
+ compatible:
+ const: microsoft,ftpm
+
+required:
+ - compatible
+ - linux,sml-base
+ - linux,sml-size
+
+allOf:
+ - $ref: tpm-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ tpm {
+ compatible = "microsoft,ftpm";
+ linux,sml-base = <0x0 0xc0000000>;
+ linux,sml-size = <0x10000>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-i2c.yaml b/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-i2c.yaml
new file mode 100644
index 000000000000..3ab4434b7352
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-i2c.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: I²C-attached Trusted Platform Module conforming to TCG TIS specification
+
+maintainers:
+ - Lukas Wunner <lukas@wunner.de>
+
+description: |
+ The Trusted Computing Group (TCG) has defined a multi-vendor standard
+ for accessing a TPM chip. It can be transported over various buses,
+ one of them being I²C. The standard is named:
+ TCG PC Client Specific TPM Interface Specification (TIS)
+ https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
+
+ The I²C interface was not originally part of the standard, but added
+ in 2017 with a separate document:
+ TCG PC Client Platform TPM Profile Specification for TPM 2.0 (PTP)
+ https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
+
+ Recent TPM 2.0 chips conform to this generic interface, others use a
+ vendor-specific I²C interface.
+
+properties:
+ compatible:
+ oneOf:
+ - description: Generic TPM 2.0 chips conforming to TCG PTP interface
+ items:
+ - enum:
+ - infineon,slb9673
+ - nuvoton,npct75x
+ - const: tcg,tpm-tis-i2c
+
+ - description: TPM 1.2 and 2.0 chips with vendor-specific I²C interface
+ items:
+ - enum:
+ - atmel,at97sc3204t # TPM 1.2
+ - infineon,slb9635tt # TPM 1.2 (maximum 100 kHz)
+ - infineon,slb9645tt # TPM 1.2 (maximum 400 kHz)
+ - infineon,tpm_i2c_infineon # TPM 1.2
+ - nuvoton,npct501 # TPM 1.2
+ - nuvoton,npct601 # TPM 2.0
+ - st,st33zp24-i2c # TPM 2.0
+ - winbond,wpct301 # TPM 1.2
+
+ reg:
+ description: address of TPM on the I²C bus
+
+allOf:
+ - $ref: tpm-common.yaml#
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@57 {
+ label = "tpm";
+ compatible = "nuvoton,npct601";
+ reg = <0x57>;
+ linux,sml-base = <0x7f 0xfd450000>;
+ linux,sml-size = <0x10000>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@13 {
+ reg = <0x13>;
+ compatible = "st,st33zp24-i2c";
+ interrupt-parent = <&gpio5>;
+ interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
+ lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-mmio.yaml b/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-mmio.yaml
new file mode 100644
index 000000000000..87bce0692129
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/tcg,tpm-tis-mmio.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-mmio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MMIO-accessed Trusted Platform Module conforming to TCG TIS specification
+
+maintainers:
+ - Lukas Wunner <lukas@wunner.de>
+
+description: |
+ The Trusted Computing Group (TCG) has defined a multi-vendor standard
+ for accessing a TPM chip. It can be transported over various buses,
+ one of them being LPC (via MMIO). The standard is named:
+ TCG PC Client Specific TPM Interface Specification (TIS)
+ https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - at97sc3201
+ - atmel,at97sc3204
+ - socionext,synquacer-tpm-mmio
+ - const: tcg,tpm-tis-mmio
+
+ reg:
+ description:
+ location and length of the MMIO registers, length should be
+ at least 0x5000 bytes
+
+allOf:
+ - $ref: tpm-common.yaml#
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ tpm@90000 {
+ compatible = "atmel,at97sc3204", "tcg,tpm-tis-mmio";
+ reg = <0x90000 0x5000>;
+ interrupt-parent = <&EIC0>;
+ interrupts = <1 2>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/tpm/tcg,tpm_tis-spi.yaml b/sys/contrib/device-tree/Bindings/tpm/tcg,tpm_tis-spi.yaml
new file mode 100644
index 000000000000..c3413b47ac3d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/tcg,tpm_tis-spi.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SPI-attached Trusted Platform Module conforming to TCG TIS specification
+
+maintainers:
+ - Lukas Wunner <lukas@wunner.de>
+
+description: |
+ The Trusted Computing Group (TCG) has defined a multi-vendor standard
+ for accessing a TPM chip. It can be transported over various buses,
+ one of them being SPI. The standard is named:
+ TCG PC Client Specific TPM Interface Specification (TIS)
+ https://trustedcomputinggroup.org/resource/pc-client-work-group-pc-client-specific-tpm-interface-specification-tis/
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - infineon,slb9670
+ - st,st33htpm-spi
+ - st,st33zp24-spi
+ - const: tcg,tpm_tis-spi
+
+allOf:
+ - $ref: tpm-common.yaml#
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: st,st33zp24-spi
+ then:
+ properties:
+ spi-max-frequency:
+ maximum: 10000000
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@0 {
+ reg = <0>;
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+ spi-max-frequency = <10000000>;
+ };
+ };
+
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tpm@0 {
+ reg = <0>;
+ compatible = "st,st33zp24-spi", "tcg,tpm_tis-spi";
+ spi-max-frequency = <10000000>;
+ interrupt-parent = <&gpio5>;
+ interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
+ lpcpd-gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/tpm/tpm-common.yaml b/sys/contrib/device-tree/Bindings/tpm/tpm-common.yaml
new file mode 100644
index 000000000000..3c1241b2a43f
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/tpm/tpm-common.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/tpm/tpm-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Trusted Platform Module common properties
+
+maintainers:
+ - Lukas Wunner <lukas@wunner.de>
+
+properties:
+ $nodename:
+ pattern: '^tpm(@[0-9a-f]+)?$'
+
+ interrupts:
+ description: indicates command completion
+ maxItems: 1
+
+ label:
+ description: human readable string describing the device, e.g. "tpm"
+
+ linux,sml-base:
+ description:
+ base address of reserved memory allocated for firmware event log
+ $ref: /schemas/types.yaml#/definitions/uint64
+
+ linux,sml-size:
+ description:
+ size of reserved memory allocated for firmware event log
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ memory-region:
+ description: reserved memory allocated for firmware event log
+ maxItems: 1
+
+ powered-while-suspended:
+ description:
+ present when the TPM is left powered on between suspend and resume
+ (makes the suspend/resume callbacks do nothing)
+ type: boolean
+
+ resets:
+ description: Reset controller to reset the TPM
+ maxItems: 1
+
+ reset-gpios:
+ description: Output GPIO pin to reset the TPM
+ maxItems: 1
+
+# must always have both linux,sml-base and linux,sml-size
+dependentRequired:
+ linux,sml-base: ['linux,sml-size']
+ linux,sml-size: ['linux,sml-base']
+
+# must only have either memory-region or linux,sml-base
+# as well as either resets or reset-gpios
+dependentSchemas:
+ memory-region:
+ properties:
+ linux,sml-base: false
+ linux,sml-base:
+ properties:
+ memory-region: false
+ resets:
+ properties:
+ reset-gpios: false
+ reset-gpios:
+ properties:
+ resets: false
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ pattern: '^st,st33zp24'
+ then:
+ properties:
+ lpcpd-gpios:
+ description:
+ Output GPIO pin used for ST33ZP24 power management of D1/D2 state.
+ If set, power must be present when the platform is going into
+ sleep/hibernate mode.
+ maxItems: 1
+
+additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/trivial-devices.yaml b/sys/contrib/device-tree/Bindings/trivial-devices.yaml
index ba2bfb547909..79dcd92c4a43 100644
--- a/sys/contrib/device-tree/Bindings/trivial-devices.yaml
+++ b/sys/contrib/device-tree/Bindings/trivial-devices.yaml
@@ -49,8 +49,6 @@ properties:
- ams,iaq-core
# i2c serial eeprom (24cxx)
- at,24c08
- # i2c trusted platform module (TPM)
- - atmel,at97sc3204t
# ATSHA204 - i2c h/w symmetric crypto module
- atmel,atsha204
# ATSHA204A - i2c h/w symmetric crypto module
@@ -117,10 +115,20 @@ properties:
- fsl,mpl3115
# MPR121: Proximity Capacitive Touch Sensor Controller
- fsl,mpr121
+ # Monolithic Power Systems Inc. multi-phase controller mp2856
+ - mps,mp2856
+ # Monolithic Power Systems Inc. multi-phase controller mp2857
+ - mps,mp2857
# Monolithic Power Systems Inc. multi-phase controller mp2888
- mps,mp2888
+ # Monolithic Power Systems Inc. multi-phase controller mp2971
+ - mps,mp2971
+ # Monolithic Power Systems Inc. multi-phase controller mp2973
+ - mps,mp2973
# Monolithic Power Systems Inc. multi-phase controller mp2975
- mps,mp2975
+ # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5990
+ - mps,mp5990
# Honeywell Humidicon HIH-6130 humidity/temperature sensor
- honeywell,hi6130
# IBM Common Form Factor Power Supply Versions (all versions)
@@ -141,14 +149,6 @@ properties:
- infineon,ir38263
# Infineon IRPS5401 Voltage Regulator (PMIC)
- infineon,irps5401
- # Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz)
- - infineon,slb9635tt
- # Infineon SLB9645 I2C TPM (new protocol, max 400khz)
- - infineon,slb9645tt
- # Infineon SLB9673 I2C TPM 2.0
- - infineon,slb9673
- # Infineon TDA38640 Voltage Regulator
- - infineon,tda38640
# Infineon TLV493D-A1B6 I2C 3D Magnetic Sensor
- infineon,tlv493d-a1b6
# Infineon Multi-phase Digital VR Controller xdpe11280
@@ -177,6 +177,8 @@ properties:
- isil,isl29030
# Intersil ISL68137 Digital Output Configurable PWM Controller
- isil,isl68137
+ # Intersil ISL76682 Ambient Light Sensor
+ - isil,isl76682
# Linear Technology LTC2488
- lineartechnology,ltc2488
# 5 Bit Programmable, Pulse-Width Modulator
@@ -193,13 +195,13 @@ properties:
- maxim,max1237
# Temperature Sensor, I2C interface
- maxim,max1619
- # 10-bit 10 kOhm linear programable voltage divider
+ # 10-bit 10 kOhm linear programmable voltage divider
- maxim,max5481
- # 10-bit 50 kOhm linear programable voltage divider
+ # 10-bit 50 kOhm linear programmable voltage divider
- maxim,max5482
- # 10-bit 10 kOhm linear programable variable resistor
+ # 10-bit 10 kOhm linear programmable variable resistor
- maxim,max5483
- # 10-bit 50 kOhm linear programable variable resistor
+ # 10-bit 50 kOhm linear programmable variable resistor
- maxim,max5484
# PECI-to-I2C translator for PECI-to-SMBus/I2C protocol conversion
- maxim,max6621
@@ -228,7 +230,7 @@ properties:
# MEMSIC magnetometer
- memsic,mmc35240
# MEMSIC 3-axis accelerometer
- - memsic,mx4005
+ - memsic,mxc4005
# MEMSIC 2-axis 8-bit digital accelerometer
- memsic,mxc6225
# MEMSIC 2-axis 8-bit digital accelerometer
@@ -291,8 +293,6 @@ properties:
- miramems,da311
# Temperature sensor with integrated fan control
- national,lm63
- # I2C TEMP SENSOR
- - national,lm75
# Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
- national,lm80
# Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
@@ -301,20 +301,16 @@ properties:
- national,lm85
# I2C ±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator
- national,lm92
- # i2c trusted platform module (TPM)
- - nuvoton,npct501
- # i2c trusted platform module (TPM2)
- - nuvoton,npct601
# Nuvoton Temperature Sensor
- nuvoton,w83773g
# OKI ML86V7667 video decoder
- oki,ml86v7667
- # OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus
- - ovti,ov5642
# 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
- plx,pex8648
# Pulsedlight LIDAR range-finding sensor
- pulsedlight,lidar-lite-v2
+ # Renesas HS3001 Temperature and Relative Humidity Sensors
+ - renesas,hs3001
# Renesas ISL29501 time-of-flight sensor
- renesas,isl29501
# Rohm DH2228FV
@@ -344,11 +340,11 @@ properties:
# Silicon Labs SI3210 Programmable CMOS SLIC/CODEC with SPI interface
- silabs,si3210
# Relative Humidity and Temperature Sensors
+ - silabs,si7005
+ # Relative Humidity and Temperature Sensors
- silabs,si7020
# Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
- skyworks,sky81452
- # Socionext SynQuacer TPM MMIO module
- - socionext,synquacer-tpm-mmio
# SparkFun Qwiic Joystick (COM-15168) with i2c interface
- sparkfun,qwiic-joystick
# i2c serial eeprom (24cxx)
@@ -403,8 +399,6 @@ properties:
- winbond,w83793
# Vicor Corporation Digital Supervisor
- vicor,pli1209bc
- # i2c trusted platform module (TPM)
- - winbond,wpct301
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/ufs/qcom,ufs.yaml b/sys/contrib/device-tree/Bindings/ufs/qcom,ufs.yaml
index bdfa86a0cc98..10c146424baa 100644
--- a/sys/contrib/device-tree/Bindings/ufs/qcom,ufs.yaml
+++ b/sys/contrib/device-tree/Bindings/ufs/qcom,ufs.yaml
@@ -27,14 +27,17 @@ properties:
- qcom,msm8996-ufshc
- qcom,msm8998-ufshc
- qcom,sa8775p-ufshc
+ - qcom,sc7280-ufshc
- qcom,sc8280xp-ufshc
- qcom,sdm845-ufshc
+ - qcom,sm6115-ufshc
- qcom,sm6350-ufshc
- qcom,sm8150-ufshc
- qcom,sm8250-ufshc
- qcom,sm8350-ufshc
- qcom,sm8450-ufshc
- qcom,sm8550-ufshc
+ - qcom,sm8650-ufshc
- const: qcom,ufshc
- const: jedec,ufs-2.0
@@ -79,6 +82,11 @@ properties:
minItems: 1
maxItems: 2
+ reg-names:
+ items:
+ - const: std
+ - const: ice
+
required-opps:
maxItems: 1
@@ -111,11 +119,13 @@ allOf:
enum:
- qcom,msm8998-ufshc
- qcom,sa8775p-ufshc
+ - qcom,sc7280-ufshc
- qcom,sc8280xp-ufshc
- qcom,sm8250-ufshc
- qcom,sm8350-ufshc
- qcom,sm8450-ufshc
- qcom,sm8550-ufshc
+ - qcom,sm8650-ufshc
then:
properties:
clocks:
@@ -134,6 +144,8 @@ allOf:
reg:
minItems: 1
maxItems: 1
+ reg-names:
+ maxItems: 1
- if:
properties:
@@ -162,6 +174,10 @@ allOf:
reg:
minItems: 2
maxItems: 2
+ reg-names:
+ minItems: 2
+ required:
+ - reg-names
- if:
properties:
@@ -190,6 +206,37 @@ allOf:
reg:
minItems: 1
maxItems: 1
+ reg-names:
+ maxItems: 1
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm6115-ufshc
+ then:
+ properties:
+ clocks:
+ minItems: 8
+ maxItems: 8
+ clock-names:
+ items:
+ - const: core_clk
+ - const: bus_aggr_clk
+ - const: iface_clk
+ - const: core_clk_unipro
+ - const: ref_clk
+ - const: tx_lane0_sync_clk
+ - const: rx_lane0_sync_clk
+ - const: ice_core_clk
+ reg:
+ minItems: 2
+ maxItems: 2
+ reg-names:
+ minItems: 2
+ required:
+ - reg-names
# TODO: define clock bindings for qcom,msm8994-ufshc
@@ -274,5 +321,6 @@ examples:
<0 0>,
<0 0>,
<0 0>;
+ qcom,ice = <&ice>;
};
};
diff --git a/sys/contrib/device-tree/Bindings/ufs/samsung,exynos-ufs.yaml b/sys/contrib/device-tree/Bindings/ufs/samsung,exynos-ufs.yaml
index 88cc1e3a0c88..b2b509b3944d 100644
--- a/sys/contrib/device-tree/Bindings/ufs/samsung,exynos-ufs.yaml
+++ b/sys/contrib/device-tree/Bindings/ufs/samsung,exynos-ufs.yaml
@@ -55,9 +55,12 @@ properties:
samsung,sysreg:
$ref: /schemas/types.yaml#/definitions/phandle-array
- description: Should be phandle/offset pair. The phandle to the syscon node
- which indicates the FSYSx sysreg interface and the offset of
- the control register for UFS io coherency setting.
+ items:
+ - items:
+ - description: phandle to FSYSx sysreg node
+ - description: offset of the control register for UFS io coherency setting
+ description:
+ Phandle and offset to the FSYSx sysreg for UFS io coherency setting.
dma-coherent: true
diff --git a/sys/contrib/device-tree/Bindings/ufs/ufs-common.yaml b/sys/contrib/device-tree/Bindings/ufs/ufs-common.yaml
index 47a4e9e1a775..31fe7f30ff5b 100644
--- a/sys/contrib/device-tree/Bindings/ufs/ufs-common.yaml
+++ b/sys/contrib/device-tree/Bindings/ufs/ufs-common.yaml
@@ -20,11 +20,25 @@ properties:
items:
- description: Minimum frequency for given clock in Hz
- description: Maximum frequency for given clock in Hz
+ deprecated: true
description: |
+ Preferred is operating-points-v2.
+
Array of <min max> operating frequencies in Hz stored in the same order
- as the clocks property. If this property is not defined or a value in the
- array is "0" then it is assumed that the frequency is set by the parent
- clock or a fixed rate clock source.
+ as the clocks property. If either this property or operating-points-v2 is
+ not defined or a value in the array is "0" then it is assumed that the
+ frequency is set by the parent clock or a fixed rate clock source.
+
+ operating-points-v2:
+ description:
+ Preferred over freq-table-hz.
+ If present, each OPP must contain array of frequencies stored in the same
+ order for each clock. If clock frequency in the array is "0" then it is
+ assumed that the frequency is set by the parent clock or a fixed rate
+ clock source.
+
+ opp-table:
+ type: object
interrupts:
maxItems: 1
@@ -73,10 +87,27 @@ properties:
description:
Specifies max. load that can be drawn from VCCQ2 supply.
+ msi-parent: true
+
dependencies:
- freq-table-hz: [ 'clocks' ]
+ freq-table-hz: [ clocks ]
+ operating-points-v2: [ clocks, clock-names ]
required:
- interrupts
+allOf:
+ - if:
+ required:
+ - freq-table-hz
+ then:
+ properties:
+ operating-points-v2: false
+ - if:
+ required:
+ - operating-points-v2
+ then:
+ properties:
+ freq-table-hz: false
+
additionalProperties: true
diff --git a/sys/contrib/device-tree/Bindings/usb/ci-hdrc-usb2.yaml b/sys/contrib/device-tree/Bindings/usb/ci-hdrc-usb2.yaml
index 782402800d4a..b7e664f7395b 100644
--- a/sys/contrib/device-tree/Bindings/usb/ci-hdrc-usb2.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/ci-hdrc-usb2.yaml
@@ -15,7 +15,9 @@ properties:
oneOf:
- enum:
- chipidea,usb2
+ - fsl,imx27-usb
- lsi,zevio-usb
+ - nuvoton,npcm750-udc
- nvidia,tegra20-ehci
- nvidia,tegra20-udc
- nvidia,tegra30-ehci
@@ -34,6 +36,7 @@ properties:
- fsl,imx23-usb
- fsl,imx25-usb
- fsl,imx28-usb
+ - fsl,imx35-usb
- fsl,imx50-usb
- fsl,imx51-usb
- fsl,imx53-usb
@@ -65,6 +68,10 @@ properties:
- items:
- const: xlnx,zynq-usb-2.20a
- const: chipidea,usb2
+ - items:
+ - enum:
+ - nuvoton,npcm845-udc
+ - const: nuvoton,npcm750-udc
reg:
minItems: 1
@@ -76,11 +83,11 @@ properties:
clocks:
minItems: 1
- maxItems: 2
+ maxItems: 3
clock-names:
minItems: 1
- maxItems: 2
+ maxItems: 3
dr_mode: true
@@ -167,7 +174,7 @@ properties:
at RTL is 0, so this property only affects siTD.
If this property is not set, the max packet size is 1023 bytes, and
- if the total of packet size for pervious transactions are more than
+ if the total of packet size for previous transactions are more than
256 bytes, it can't accept any transactions within this frame. The
use case is single transaction, but higher frame rate.
@@ -292,6 +299,18 @@ properties:
minimum: 0x0
maximum: 0xf
+ fsl,picophy-rise-fall-time-adjust:
+ description:
+ HS Transmitter Rise/Fall Time Adjustment. Adjust the rise/fall times
+ of the high-speed transmitter waveform. It has no unit. The rise/fall
+ time will be increased or decreased by a certain percentage relative
+ to design default time. (0:-10%; 1:design default; 2:+15%; 3:+20%)
+ Details can refer to TXRISETUNE0 bit of USBNC_n_PHY_CFG1.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 3
+ default: 1
+
usb-phy:
description: phandle for the PHY device. Use "phys" instead.
$ref: /schemas/types.yaml#/definitions/phandle
@@ -375,6 +394,7 @@ allOf:
enum:
- chipidea,usb2
- lsi,zevio-usb
+ - nuvoton,npcm750-udc
- nvidia,tegra20-udc
- nvidia,tegra30-udc
- nvidia,tegra114-udc
diff --git a/sys/contrib/device-tree/Bindings/usb/cypress,cypd4226.yaml b/sys/contrib/device-tree/Bindings/usb/cypress,cypd4226.yaml
index 75eec4a9a020..89fc9a434d05 100644
--- a/sys/contrib/device-tree/Bindings/usb/cypress,cypd4226.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/cypress,cypd4226.yaml
@@ -43,10 +43,8 @@ properties:
patternProperties:
'^connector@[01]$':
$ref: /schemas/connector/usb-connector.yaml#
- unevaluatedProperties: false
- properties:
- reg:
- maxItems: 1
+ required:
+ - reg
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/usb/cypress,hx3.yaml b/sys/contrib/device-tree/Bindings/usb/cypress,hx3.yaml
new file mode 100644
index 000000000000..47add0d85fb8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/usb/cypress,hx3.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress HX3 USB 3.0 hub controller family
+
+maintainers:
+ - Benjamin Bara <benjamin.bara@skidata.com>
+
+allOf:
+ - $ref: usb-device.yaml#
+
+properties:
+ compatible:
+ enum:
+ - usb4b4,6504
+ - usb4b4,6506
+
+ reg: true
+
+ reset-gpios:
+ items:
+ - description: GPIO specifier for RESETN pin.
+
+ vdd-supply:
+ description:
+ 1V2 power supply (VDD_EFUSE, AVDD12, DVDD12).
+
+ vdd2-supply:
+ description:
+ 3V3 power supply (AVDD33, VDD_IO).
+
+ peer-hub:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ phandle to the peer hub on the controller.
+
+required:
+ - compatible
+ - reg
+ - peer-hub
+ - vdd-supply
+ - vdd2-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ usb {
+ dr_mode = "host";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* 2.0 hub on port 1 */
+ hub_2_0: hub@1 {
+ compatible = "usb4b4,6504";
+ reg = <1>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&reg_1v2_usb>;
+ vdd2-supply = <&reg_3v3_usb>;
+ };
+
+ /* 3.0 hub on port 2 */
+ hub_3_0: hub@2 {
+ compatible = "usb4b4,6506";
+ reg = <2>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&reg_1v2_usb>;
+ vdd2-supply = <&reg_3v3_usb>;
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/usb/dwc3-xilinx.yaml b/sys/contrib/device-tree/Bindings/usb/dwc3-xilinx.yaml
index bb373eb025a5..00f87a558c7d 100644
--- a/sys/contrib/device-tree/Bindings/usb/dwc3-xilinx.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/dwc3-xilinx.yaml
@@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx SuperSpeed DWC3 USB SoC controller
maintainers:
- - Piyush Mehta <piyush.mehta@amd.com>
+ - Mubin Sayyed <mubin.sayyed@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/usb/fcs,fsa4480.yaml b/sys/contrib/device-tree/Bindings/usb/fcs,fsa4480.yaml
index f6e7a5c1ff0b..f9410eb76a62 100644
--- a/sys/contrib/device-tree/Bindings/usb/fcs,fsa4480.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/fcs,fsa4480.yaml
@@ -11,8 +11,12 @@ maintainers:
properties:
compatible:
- enum:
- - fcs,fsa4480
+ oneOf:
+ - const: fcs,fsa4480
+ - items:
+ - enum:
+ - ocs,ocp96011
+ - const: fcs,fsa4480
reg:
maxItems: 1
@@ -32,10 +36,43 @@ properties:
type: boolean
port:
- $ref: /schemas/graph.yaml#/properties/port
+ $ref: /schemas/graph.yaml#/$defs/port-base
description:
A port node to link the FSA4480 to a TypeC controller for the purpose of
handling altmode muxing and orientation switching.
+ unevaluatedProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/graph.yaml#/$defs/endpoint-base
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ Specifies how the AUX+/- lines are connected to SBU1/2.
+ oneOf:
+ - items:
+ - const: 0
+ - const: 1
+ description: |
+ Default AUX/SBU layout (FSA4480)
+ - AUX+ connected to SBU2
+ - AUX- connected to SBU1
+ Default AUX/SBU layout (OCP96011)
+ - AUX+ connected to SBU1
+ - AUX- connected to SBU2
+ - items:
+ - const: 1
+ - const: 0
+ description: |
+ Swapped AUX/SBU layout (FSA4480)
+ - AUX+ connected to SBU1
+ - AUX- connected to SBU2
+ Swapped AUX/SBU layout (OCP96011)
+ - AUX+ connected to SBU2
+ - AUX- connected to SBU1
required:
- compatible
diff --git a/sys/contrib/device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml b/sys/contrib/device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml
index 3fb4feb6d3d9..9ea1e4cd0709 100644
--- a/sys/contrib/device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml
@@ -52,7 +52,7 @@ properties:
fsl,permanently-attached:
type: boolean
description:
- Indicates if the device atached to a downstream port is
+ Indicates if the device attached to a downstream port is
permanently attached.
fsl,disable-port-power-control:
diff --git a/sys/contrib/device-tree/Bindings/usb/generic-ehci.yaml b/sys/contrib/device-tree/Bindings/usb/generic-ehci.yaml
index b956bb5fada7..87986c45be88 100644
--- a/sys/contrib/device-tree/Bindings/usb/generic-ehci.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/generic-ehci.yaml
@@ -38,6 +38,7 @@ properties:
- allwinner,sun8i-a83t-ehci
- allwinner,sun8i-h3-ehci
- allwinner,sun8i-r40-ehci
+ - allwinner,sun8i-v3s-ehci
- allwinner,sun9i-a80-ehci
- allwinner,sun20i-d1-ehci
- aspeed,ast2400-ehci
@@ -67,6 +68,7 @@ properties:
- const: generic-ehci
- items:
- enum:
+ - atmel,at91sam9g45-ehci
- cavium,octeon-6335-ehci
- ibm,usb-ehci-440epx
- ibm,usb-ehci-460ex
diff --git a/sys/contrib/device-tree/Bindings/usb/generic-ohci.yaml b/sys/contrib/device-tree/Bindings/usb/generic-ohci.yaml
index be268e23ca79..b9576015736b 100644
--- a/sys/contrib/device-tree/Bindings/usb/generic-ohci.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/generic-ohci.yaml
@@ -25,6 +25,7 @@ properties:
- allwinner,sun8i-a83t-ohci
- allwinner,sun8i-h3-ohci
- allwinner,sun8i-r40-ohci
+ - allwinner,sun8i-v3s-ohci
- allwinner,sun9i-a80-ohci
- allwinner,sun20i-d1-ohci
- brcm,bcm3384-ohci
diff --git a/sys/contrib/device-tree/Bindings/usb/generic-xhci.yaml b/sys/contrib/device-tree/Bindings/usb/generic-xhci.yaml
index 594ebb3ee432..6ceafa4af292 100644
--- a/sys/contrib/device-tree/Bindings/usb/generic-xhci.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/generic-xhci.yaml
@@ -9,9 +9,6 @@ title: USB xHCI Controller
maintainers:
- Mathias Nyman <mathias.nyman@intel.com>
-allOf:
- - $ref: usb-xhci.yaml#
-
properties:
compatible:
oneOf:
@@ -25,6 +22,11 @@ properties:
- marvell,armada-380-xhci
- marvell,armada-8k-xhci
- const: generic-xhci
+ - description: Broadcom SoCs with power domains
+ items:
+ - enum:
+ - brcm,bcm2711-xhci
+ - const: brcm,xhci-brcm-v2
- description: Broadcom STB SoCs with xHCI
enum:
- brcm,xhci-brcm-v2
@@ -49,6 +51,9 @@ properties:
- const: core
- const: reg
+ power-domains:
+ maxItems: 1
+
unevaluatedProperties: false
required:
@@ -56,6 +61,20 @@ required:
- reg
- interrupts
+allOf:
+ - $ref: usb-xhci.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm2711-xhci
+ then:
+ required:
+ - power-domains
+ else:
+ properties:
+ power-domains: false
+
examples:
- |
usb@f0931000 {
diff --git a/sys/contrib/device-tree/Bindings/usb/genesys,gl850g.yaml b/sys/contrib/device-tree/Bindings/usb/genesys,gl850g.yaml
index cc4cf92b70d1..37cf5249e526 100644
--- a/sys/contrib/device-tree/Bindings/usb/genesys,gl850g.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/genesys,gl850g.yaml
@@ -1,10 +1,10 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Genesys Logic GL850G USB 2.0 hub controller
+title: Genesys Logic USB hub controller
maintainers:
- Icenowy Zheng <uwu@icenowy.me>
@@ -17,6 +17,8 @@ properties:
enum:
- usb5e3,608
- usb5e3,610
+ - usb5e3,620
+ - usb5e3,626
reg: true
@@ -27,6 +29,11 @@ properties:
description:
the regulator that provides 3.3V core power to the hub.
+ peer-hub:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ phandle to the peer hub on the controller.
+
required:
- compatible
- reg
diff --git a/sys/contrib/device-tree/Bindings/usb/gpio-sbu-mux.yaml b/sys/contrib/device-tree/Bindings/usb/gpio-sbu-mux.yaml
index f196beb826d8..d3b2b666ec2a 100644
--- a/sys/contrib/device-tree/Bindings/usb/gpio-sbu-mux.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/gpio-sbu-mux.yaml
@@ -19,6 +19,7 @@ properties:
compatible:
items:
- enum:
+ - nxp,cbdtu02043
- onnn,fsusb43l10x
- pericom,pi3usb102
- const: gpio-sbu-mux
@@ -50,7 +51,6 @@ required:
- compatible
- enable-gpios
- select-gpios
- - mode-switch
- orientation-switch
- port
diff --git a/sys/contrib/device-tree/Bindings/usb/mediatek,mtk-xhci.yaml b/sys/contrib/device-tree/Bindings/usb/mediatek,mtk-xhci.yaml
index e9644e333d78..924fd3d748a8 100644
--- a/sys/contrib/device-tree/Bindings/usb/mediatek,mtk-xhci.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/mediatek,mtk-xhci.yaml
@@ -124,6 +124,17 @@ properties:
defined in the xHCI spec on MTK's controller.
default: 5000
+ rx-fifo-depth:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ It is a quirk used to work around Gen1 isoc-in endpoint transfer issue
+ that still send out unexpected ACK after device finishes the burst
+ transfer with a short packet and cause an exception, specially on a 4K
+ camera device, it happens on controller before about IPM v1.6.0;
+ the side-effect is that it may cause performance drop about 10%,
+ including bulk transfer, prefer to use 3k here. The size is in bytes.
+ enum: [1024, 2048, 3072, 4096]
+
# the following properties are only used for case 1
wakeup-source:
description: enable USB remote wakeup, see power/wakeup-source.txt
diff --git a/sys/contrib/device-tree/Bindings/usb/microchip,usb5744.yaml b/sys/contrib/device-tree/Bindings/usb/microchip,usb5744.yaml
index ff3a1707ef57..445183d9d6db 100644
--- a/sys/contrib/device-tree/Bindings/usb/microchip,usb5744.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/microchip,usb5744.yaml
@@ -16,8 +16,9 @@ description:
USB 2.0 traffic.
maintainers:
- - Piyush Mehta <piyush.mehta@amd.com>
- Michal Simek <michal.simek@amd.com>
+ - Mubin Sayyed <mubin.sayyed@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
properties:
compatible:
@@ -36,7 +37,11 @@ properties:
vdd-supply:
description:
- VDD power supply to the hub
+ 3V3 power supply to the hub
+
+ vdd2-supply:
+ description:
+ 1V2 power supply to the hub
peer-hub:
$ref: /schemas/types.yaml#/definitions/phandle
@@ -62,6 +67,7 @@ allOf:
properties:
reset-gpios: false
vdd-supply: false
+ vdd2-supply: false
peer-hub: false
i2c-bus: false
else:
diff --git a/sys/contrib/device-tree/Bindings/usb/msm-hsusb.txt b/sys/contrib/device-tree/Bindings/usb/msm-hsusb.txt
index 8654a3ec23e4..afc30e98b123 100644
--- a/sys/contrib/device-tree/Bindings/usb/msm-hsusb.txt
+++ b/sys/contrib/device-tree/Bindings/usb/msm-hsusb.txt
@@ -53,7 +53,7 @@ Optional properties:
- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
- switch-gpio: A phandle + gpio-specifier pair. Some boards are using Dual
- SPDT USB Switch, witch is cotrolled by GPIO to de/multiplex
+ SPDT USB Switch, witch is controlled by GPIO to de/multiplex
D+/D- USB lines between connectors.
- qcom,phy-init-sequence: PHY configuration sequence values. This is related to Device
diff --git a/sys/contrib/device-tree/Bindings/usb/nxp,ptn36502.yaml b/sys/contrib/device-tree/Bindings/usb/nxp,ptn36502.yaml
new file mode 100644
index 000000000000..eee548ac1abe
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/usb/nxp,ptn36502.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/nxp,ptn36502.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PTN36502 Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo redriver
+
+maintainers:
+ - Luca Weiss <luca.weiss@fairphone.com>
+
+properties:
+ compatible:
+ enum:
+ - nxp,ptn36502
+
+ reg:
+ maxItems: 1
+
+ vdd18-supply:
+ description: Power supply for VDD18 pin
+
+ retimer-switch:
+ description: Flag the port as possible handle of SuperSpeed signals retiming
+ type: boolean
+
+ orientation-switch:
+ description: Flag the port as possible handler of orientation switching
+ type: boolean
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Super Speed (SS) Output endpoint to the Type-C connector
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Super Speed (SS) Input endpoint from the Super-Speed PHY
+
+ port@2:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Sideband Use (SBU) AUX lines endpoint to the Type-C connector for the purpose of
+ handling altmode muxing and orientation switching.
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ typec-mux@1a {
+ compatible = "nxp,ptn36502";
+ reg = <0x1a>;
+
+ vdd18-supply = <&usb_redrive_1v8>;
+
+ retimer-switch;
+ orientation-switch;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ usb_con_ss: endpoint {
+ remote-endpoint = <&typec_con_ss>;
+ };
+ };
+ port@1 {
+ reg = <1>;
+ phy_con_ss: endpoint {
+ remote-endpoint = <&usb_phy_ss>;
+ };
+ };
+ port@2 {
+ reg = <2>;
+ usb_con_sbu: endpoint {
+ remote-endpoint = <&typec_dp_aux>;
+ };
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/usb/nxp,ptn5110.yaml b/sys/contrib/device-tree/Bindings/usb/nxp,ptn5110.yaml
index 28eb25ecba74..eaedb4cc6b6c 100644
--- a/sys/contrib/device-tree/Bindings/usb/nxp,ptn5110.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/nxp,ptn5110.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/usb/nxp,ptn5110.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: NXP PTN5110 Typec Port Cotroller
+title: NXP PTN5110 Type-C Port Controller
maintainers:
- Li Jun <jun.li@nxp.com>
diff --git a/sys/contrib/device-tree/Bindings/usb/qcom,dwc3.yaml b/sys/contrib/device-tree/Bindings/usb/qcom,dwc3.yaml
index ae24dac78d9a..63d150b216c5 100644
--- a/sys/contrib/device-tree/Bindings/usb/qcom,dwc3.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/qcom,dwc3.yaml
@@ -14,6 +14,8 @@ properties:
items:
- enum:
- qcom,ipq4019-dwc3
+ - qcom,ipq5018-dwc3
+ - qcom,ipq5332-dwc3
- qcom,ipq6018-dwc3
- qcom,ipq8064-dwc3
- qcom,ipq8074-dwc3
@@ -33,6 +35,7 @@ properties:
- qcom,sdm845-dwc3
- qcom,sdx55-dwc3
- qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
- qcom,sm4250-dwc3
- qcom,sm6115-dwc3
- qcom,sm6125-dwc3
@@ -43,6 +46,8 @@ properties:
- qcom,sm8350-dwc3
- qcom,sm8450-dwc3
- qcom,sm8550-dwc3
+ - qcom,sm8650-dwc3
+ - qcom,x1e80100-dwc3
- const: qcom,dwc3
reg:
@@ -82,15 +87,6 @@ properties:
minItems: 1
maxItems: 9
- assigned-clocks:
- items:
- - description: Phandle and clock specifier of MOCK_UTMI_CLK.
- - description: Phandle and clock specifoer of MASTER_CLK.
-
- assigned-clock-rates:
- items:
- - description: Must be 19.2MHz (19200000).
- - description: Must be >= 60 MHz in HS mode, >= 125 MHz in SS mode.
resets:
maxItems: 1
@@ -103,12 +99,29 @@ properties:
- const: apps-usb
interrupts:
- minItems: 1
- maxItems: 4
+ description: |
+ Different types of interrupts are used based on HS PHY used on target:
+ - pwr_event: Used for wakeup based on other power events.
+ - hs_phY_irq: Apart from DP/DM/QUSB2 PHY interrupts, there is
+ hs_phy_irq which is not triggered by default and its
+ functionality is mutually exclusive to that of
+ {dp/dm}_hs_phy_irq and qusb2_phy_irq.
+ - qusb2_phy: SoCs with QUSB2 PHY do not have separate DP/DM IRQs and
+ expose only a single IRQ whose behavior can be modified
+ by the QUSB2PHY_INTR_CTRL register. The required DPSE/
+ DMSE configuration is done in QUSB2PHY_INTR_CTRL register
+ of PHY address space.
+ - {dp/dm}_hs_phy_irq: These IRQ's directly reflect changes on the DP/
+ DM pads of the SoC. These are used for wakeup
+ only on SoCs with non-QUSB2 targets with
+ exception of SDM670/SDM845/SM6350.
+ - ss_phy_irq: Used for remote wakeup in Super Speed mode of operation.
+ minItems: 2
+ maxItems: 5
interrupt-names:
- minItems: 1
- maxItems: 4
+ minItems: 2
+ maxItems: 5
qcom,select-utmi-as-pipe-clk:
description:
@@ -188,6 +201,8 @@ allOf:
- qcom,sdm670-dwc3
- qcom,sdm845-dwc3
- qcom,sdx55-dwc3
+ - qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
- qcom,sm6350-dwc3
then:
properties:
@@ -246,6 +261,8 @@ allOf:
compatible:
contains:
enum:
+ - qcom,ipq5018-dwc3
+ - qcom,ipq5332-dwc3
- qcom,msm8994-dwc3
- qcom,qcs404-dwc3
then:
@@ -265,6 +282,7 @@ allOf:
contains:
enum:
- qcom,sc8280xp-dwc3
+ - qcom,x1e80100-dwc3
then:
properties:
clocks:
@@ -290,15 +308,21 @@ allOf:
then:
properties:
clocks:
- minItems: 6
+ minItems: 4
+ maxItems: 5
clock-names:
- items:
- - const: cfg_noc
- - const: core
- - const: iface
- - const: sleep
- - const: mock_utmi
- - const: bus
+ oneOf:
+ - items:
+ - const: cfg_noc
+ - const: core
+ - const: iface
+ - const: sleep
+ - const: mock_utmi
+ - items:
+ - const: cfg_noc
+ - const: core
+ - const: sleep
+ - const: mock_utmi
- if:
properties:
@@ -312,6 +336,7 @@ allOf:
- qcom,sm8250-dwc3
- qcom,sm8450-dwc3
- qcom,sm8550-dwc3
+ - qcom,sm8650-dwc3
then:
properties:
clocks:
@@ -351,58 +376,20 @@ allOf:
compatible:
contains:
enum:
- - qcom,ipq4019-dwc3
+ - qcom,ipq5018-dwc3
- qcom,ipq6018-dwc3
- - qcom,ipq8064-dwc3
- qcom,ipq8074-dwc3
- - qcom,msm8994-dwc3
- - qcom,qcs404-dwc3
- - qcom,sc7180-dwc3
- - qcom,sdm670-dwc3
- - qcom,sdm845-dwc3
- - qcom,sdx55-dwc3
- - qcom,sdx65-dwc3
- - qcom,sm4250-dwc3
- - qcom,sm6125-dwc3
- - qcom,sm6350-dwc3
- - qcom,sm8150-dwc3
- - qcom,sm8250-dwc3
- - qcom,sm8350-dwc3
- - qcom,sm8450-dwc3
- - qcom,sm8550-dwc3
- then:
- properties:
- interrupts:
- items:
- - description: The interrupt that is asserted
- when a wakeup event is received on USB2 bus.
- - description: The interrupt that is asserted
- when a wakeup event is received on USB3 bus.
- - description: Wakeup event on DM line.
- - description: Wakeup event on DP line.
- interrupt-names:
- items:
- - const: hs_phy_irq
- - const: ss_phy_irq
- - const: dm_hs_phy_irq
- - const: dp_hs_phy_irq
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- qcom,msm8953-dwc3
- - qcom,msm8996-dwc3
- qcom,msm8998-dwc3
- - qcom,sm6115-dwc3
then:
properties:
interrupts:
- maxItems: 2
+ minItems: 2
+ maxItems: 3
interrupt-names:
items:
- - const: hs_phy_irq
+ - const: pwr_event
+ - const: qusb2_phy
- const: ss_phy_irq
- if:
@@ -410,35 +397,21 @@ allOf:
compatible:
contains:
enum:
+ - qcom,msm8996-dwc3
+ - qcom,qcs404-dwc3
- qcom,sdm660-dwc3
- then:
- properties:
- interrupts:
- minItems: 1
- maxItems: 2
- interrupt-names:
- minItems: 1
- items:
- - const: hs_phy_irq
- - const: ss_phy_irq
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - qcom,sc7280-dwc3
+ - qcom,sm6115-dwc3
+ - qcom,sm6125-dwc3
then:
properties:
interrupts:
minItems: 3
maxItems: 4
interrupt-names:
- minItems: 3
items:
+ - const: pwr_event
+ - const: qusb2_phy
- const: hs_phy_irq
- - const: dp_hs_phy_irq
- - const: dm_hs_phy_irq
- const: ss_phy_irq
- if:
@@ -446,7 +419,8 @@ allOf:
compatible:
contains:
enum:
- - qcom,sc8280xp-dwc3
+ - qcom,ipq5332-dwc3
+ - qcom,x1e80100-dwc3
then:
properties:
interrupts:
@@ -463,16 +437,35 @@ allOf:
compatible:
contains:
enum:
+ - qcom,ipq4019-dwc3
+ - qcom,ipq8064-dwc3
+ - qcom,msm8994-dwc3
- qcom,sa8775p-dwc3
+ - qcom,sc7180-dwc3
+ - qcom,sc7280-dwc3
+ - qcom,sc8280xp-dwc3
+ - qcom,sdm670-dwc3
+ - qcom,sdm845-dwc3
+ - qcom,sdx55-dwc3
+ - qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
+ - qcom,sm4250-dwc3
+ - qcom,sm6350-dwc3
+ - qcom,sm8150-dwc3
+ - qcom,sm8250-dwc3
+ - qcom,sm8350-dwc3
+ - qcom,sm8450-dwc3
+ - qcom,sm8550-dwc3
+ - qcom,sm8650-dwc3
then:
properties:
interrupts:
- minItems: 3
- maxItems: 4
+ minItems: 4
+ maxItems: 5
interrupt-names:
- minItems: 3
items:
- const: pwr_event
+ - const: hs_phy_irq
- const: dp_hs_phy_irq
- const: dm_hs_phy_irq
- const: ss_phy_irq
@@ -510,12 +503,13 @@ examples:
<&gcc GCC_USB30_PRIM_MASTER_CLK>;
assigned-clock-rates = <19200000>, <150000000>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 488 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 489 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "hs_phy_irq", "ss_phy_irq",
- "dm_hs_phy_irq", "dp_hs_phy_irq";
+ interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 489 IRQ_TYPE_EDGE_BOTH>,
+ <GIC_SPI 488 IRQ_TYPE_EDGE_BOTH>,
+ <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "pwr_event", "hs_phy_irq",
+ "dp_hs_phy_irq", "dm_hs_phy_irq", "ss_phy_irq";
power-domains = <&gcc USB30_PRIM_GDSC>;
diff --git a/sys/contrib/device-tree/Bindings/usb/qcom,wcd939x-usbss.yaml b/sys/contrib/device-tree/Bindings/usb/qcom,wcd939x-usbss.yaml
new file mode 100644
index 000000000000..7ddfd3313a18
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/usb/qcom,wcd939x-usbss.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/qcom,wcd939x-usbss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm WCD9380/WCD9385 USB SubSystem Altmode/Analog Audio Switch
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+description:
+ Qualcomm WCD9390/WCD9395 is a standalone Hi-Fi audio codec IC with a
+ functionally separate USB SubSystem for Altmode/Analog Audio Switch
+ accessible over an I2C interface.
+ The Audio Headphone and Microphone data path between the Codec and the
+ USB-C Mux subsystems are external to the IC, thus requiring DT port-endpoint
+ graph description to handle USB-C altmode & orientation switching for Audio
+ Accessory Mode.
+
+properties:
+ compatible:
+ oneOf:
+ - const: qcom,wcd9390-usbss
+ - items:
+ - const: qcom,wcd9395-usbss
+ - const: qcom,wcd9390-usbss
+
+ reg:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+
+ vdd-supply:
+ description: USBSS VDD power supply
+
+ mode-switch:
+ description: Flag the port as possible handle of altmode switching
+ type: boolean
+
+ orientation-switch:
+ description: Flag the port as possible handler of orientation switching
+ type: boolean
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ A port node to link the WCD939x USB SubSystem to a TypeC controller for the
+ purpose of handling altmode muxing and orientation switching.
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ A port node to link the WCD939x USB SubSystem to the Codec SubSystem for the
+ purpose of handling USB-C Audio Accessory Mode muxing and orientation switching.
+
+required:
+ - compatible
+ - reg
+ - ports
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ typec-mux@42 {
+ compatible = "qcom,wcd9390-usbss";
+ reg = <0x42>;
+
+ vdd-supply = <&vreg_bob>;
+
+ mode-switch;
+ orientation-switch;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ wcd9390_usbss_sbu: endpoint {
+ remote-endpoint = <&typec_sbu>;
+ };
+ };
+ port@1 {
+ reg = <1>;
+ wcd9390_usbss_codec: endpoint {
+ remote-endpoint = <&wcd9390_codec_usbss>;
+ };
+ };
+ };
+ };
+ };
+...
diff --git a/sys/contrib/device-tree/Bindings/usb/realtek,rtd-dwc3.yaml b/sys/contrib/device-tree/Bindings/usb/realtek,rtd-dwc3.yaml
new file mode 100644
index 000000000000..345d0132d4a5
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/usb/realtek,rtd-dwc3.yaml
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/realtek,rtd-dwc3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DWC3 USB SoC Controller Glue
+
+maintainers:
+ - Stanley Chang <stanley_chang@realtek.com>
+
+description:
+ The Realtek DHC SoC embeds a DWC3 USB IP Core configured for USB 2.0
+ and USB 3.0 in host or dual-role mode.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - realtek,rtd1295-dwc3
+ - realtek,rtd1315e-dwc3
+ - realtek,rtd1319-dwc3
+ - realtek,rtd1319d-dwc3
+ - realtek,rtd1395-dwc3
+ - realtek,rtd1619-dwc3
+ - realtek,rtd1619b-dwc3
+ - const: realtek,rtd-dwc3
+
+ reg:
+ items:
+ - description: Address and length of register set for wrapper of dwc3 core.
+ - description: Address and length of register set for pm control.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ ranges: true
+
+patternProperties:
+ "^usb@[0-9a-f]+$":
+ $ref: snps,dwc3.yaml#
+ description: Required child node
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+ - ranges
+
+additionalProperties: false
+
+examples:
+ - |
+ usb@98013e00 {
+ compatible = "realtek,rtd1319d-dwc3", "realtek,rtd-dwc3";
+ reg = <0x98013e00 0x140>, <0x98013f60 0x4>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ usb@98050000 {
+ compatible = "snps,dwc3";
+ reg = <0x98050000 0x9000>;
+ interrupts = <0 94 4>;
+ phys = <&usb2phy &usb3phy>;
+ phy-names = "usb2-phy", "usb3-phy";
+ dr_mode = "otg";
+ usb-role-switch;
+ role-switch-default-mode = "host";
+ snps,dis_u2_susphy_quirk;
+ snps,parkmode-disable-ss-quirk;
+ snps,parkmode-disable-hs-quirk;
+ maximum-speed = "high-speed";
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/usb/realtek,rtd-type-c.yaml b/sys/contrib/device-tree/Bindings/usb/realtek,rtd-type-c.yaml
new file mode 100644
index 000000000000..6142b0b5b534
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/usb/realtek,rtd-type-c.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2023 Realtek Semiconductor Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/realtek,rtd-type-c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC RTD SoCs USB Type-C Connector detection
+
+maintainers:
+ - Stanley Chang <stanley_chang@realtek.com>
+
+description:
+ Realtek digital home center (DHC) RTD series SoCs include a type c module.
+ This module is able to detect the state of type c connector.
+
+properties:
+ compatible:
+ enum:
+ - realtek,rtd1295-type-c
+ - realtek,rtd1312c-type-c
+ - realtek,rtd1315e-type-c
+ - realtek,rtd1319-type-c
+ - realtek,rtd1319d-type-c
+ - realtek,rtd1395-type-c
+ - realtek,rtd1619-type-c
+ - realtek,rtd1619b-type-c
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ nvmem-cell-names:
+ items:
+ - const: usb-cal
+
+ nvmem-cells:
+ maxItems: 1
+ description:
+ The phandle to nvmem cell that contains the trimming data.
+ The type c parameter trimming data specified via efuse.
+ If unspecified, default value is used.
+
+ realtek,rd-ctrl-gpios:
+ description: The gpio node to control external Rd on board.
+ maxItems: 1
+
+ connector:
+ $ref: /schemas/connector/usb-connector.yaml#
+ description: Properties for usb c connector.
+ type: object
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ type-c@7220 {
+ compatible = "realtek,rtd1619b-type-c";
+ reg = <0x7220 0x20>;
+ interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_cc1_pins>, <&usb_cc2_pins>;
+ nvmem-cells = <&otp_usb_cal>;
+ nvmem-cell-names = "usb-cal";
+
+ connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ data-role = "dual";
+ power-role = "dual";
+ };
+ };
diff --git a/sys/contrib/device-tree/Bindings/usb/realtek,rts5411.yaml b/sys/contrib/device-tree/Bindings/usb/realtek,rts5411.yaml
index 9309f003cd07..f0784d2e86da 100644
--- a/sys/contrib/device-tree/Bindings/usb/realtek,rts5411.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/realtek,rts5411.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/realtek,rts5411.yaml#
diff --git a/sys/contrib/device-tree/Bindings/usb/renesas,usbhs.yaml b/sys/contrib/device-tree/Bindings/usb/renesas,usbhs.yaml
index bad55dfb2fa0..40ada78f2328 100644
--- a/sys/contrib/device-tree/Bindings/usb/renesas,usbhs.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/renesas,usbhs.yaml
@@ -19,7 +19,7 @@ properties:
- items:
- enum:
- renesas,usbhs-r7s9210 # RZ/A2
- - renesas,usbhs-r9a07g043 # RZ/G2UL
+ - renesas,usbhs-r9a07g043 # RZ/G2UL and RZ/Five
- renesas,usbhs-r9a07g044 # RZ/G2{L,LC}
- renesas,usbhs-r9a07g054 # RZ/V2L
- const: renesas,rza2-usbhs
diff --git a/sys/contrib/device-tree/Bindings/usb/richtek,rt1719.yaml b/sys/contrib/device-tree/Bindings/usb/richtek,rt1719.yaml
index 4ced2f68e2a9..07bec1fe6ebf 100644
--- a/sys/contrib/device-tree/Bindings/usb/richtek,rt1719.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/richtek,rt1719.yaml
@@ -10,7 +10,7 @@ maintainers:
- ChiYuan Huang <cy_huang@richtek.com>
description: |
- The RT1719 is a sink-only USB Type-C contoller that complies with the latest
+ The RT1719 is a sink-only USB Type-C controller that complies with the latest
USB Type-C and PD standards. It does the USB Type-C detection including attach
and orientation. It integrates the physical layer of the USB BMC power
delivery protocol to allow up to 100W of power. The BMC PD block enables full
diff --git a/sys/contrib/device-tree/Bindings/usb/rockchip,dwc3.yaml b/sys/contrib/device-tree/Bindings/usb/rockchip,dwc3.yaml
index 291844c8f3e1..c4924113f9bd 100644
--- a/sys/contrib/device-tree/Bindings/usb/rockchip,dwc3.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/rockchip,dwc3.yaml
@@ -15,14 +15,11 @@ description:
Phy documentation is provided in the following places.
USB2.0 PHY
- Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml
+ Documentation/devicetree/bindings/phy/rockchip,inno-usb2phy.yaml
Type-C PHY
Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt
-allOf:
- - $ref: snps,dwc3.yaml#
-
select:
properties:
compatible:
@@ -30,6 +27,7 @@ select:
enum:
- rockchip,rk3328-dwc3
- rockchip,rk3568-dwc3
+ - rockchip,rk3588-dwc3
required:
- compatible
@@ -39,6 +37,7 @@ properties:
- enum:
- rockchip,rk3328-dwc3
- rockchip,rk3568-dwc3
+ - rockchip,rk3588-dwc3
- const: snps,dwc3
reg:
@@ -58,7 +57,9 @@ properties:
Master/Core clock, must to be >= 62.5 MHz for SS
operation and >= 30MHz for HS operation
- description:
- Controller grf clock
+ Controller grf clock OR UTMI clock
+ - description:
+ PIPE clock
clock-names:
minItems: 3
@@ -66,7 +67,10 @@ properties:
- const: ref_clk
- const: suspend_clk
- const: bus_clk
- - const: grf_clk
+ - enum:
+ - grf_clk
+ - utmi
+ - const: pipe
power-domains:
maxItems: 1
@@ -86,6 +90,52 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: snps,dwc3.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3328-dwc3
+ then:
+ properties:
+ clocks:
+ minItems: 3
+ maxItems: 4
+ clock-names:
+ minItems: 3
+ items:
+ - const: ref_clk
+ - const: suspend_clk
+ - const: bus_clk
+ - const: grf_clk
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3568-dwc3
+ then:
+ properties:
+ clocks:
+ maxItems: 3
+ clock-names:
+ maxItems: 3
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3588-dwc3
+ then:
+ properties:
+ clock-names:
+ minItems: 3
+ items:
+ - const: ref_clk
+ - const: suspend_clk
+ - const: bus_clk
+ - const: utmi
+ - const: pipe
+
examples:
- |
#include <dt-bindings/clock/rk3328-cru.h>
diff --git a/sys/contrib/device-tree/Bindings/usb/samsung,exynos-dwc3.yaml b/sys/contrib/device-tree/Bindings/usb/samsung,exynos-dwc3.yaml
index 42ceaf13cd5d..1ade99e85ba8 100644
--- a/sys/contrib/device-tree/Bindings/usb/samsung,exynos-dwc3.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/samsung,exynos-dwc3.yaml
@@ -15,6 +15,7 @@ properties:
- samsung,exynos5250-dwusb3
- samsung,exynos5433-dwusb3
- samsung,exynos7-dwusb3
+ - samsung,exynos850-dwusb3
'#address-cells':
const: 1
@@ -72,7 +73,7 @@ allOf:
properties:
compatible:
contains:
- const: samsung,exynos54333-dwusb3
+ const: samsung,exynos5433-dwusb3
then:
properties:
clocks:
@@ -82,8 +83,8 @@ allOf:
items:
- const: aclk
- const: susp_clk
- - const: pipe_pclk
- const: phyclk
+ - const: pipe_pclk
- if:
properties:
@@ -101,6 +102,21 @@ allOf:
- const: usbdrd30_susp_clk
- const: usbdrd30_axius_clk
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynos850-dwusb3
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ items:
+ - const: bus_early
+ - const: ref
+
additionalProperties: false
examples:
diff --git a/sys/contrib/device-tree/Bindings/usb/snps,dwc3.yaml b/sys/contrib/device-tree/Bindings/usb/snps,dwc3.yaml
index a696f23730d3..203a1eb66691 100644
--- a/sys/contrib/device-tree/Bindings/usb/snps,dwc3.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/snps,dwc3.yaml
@@ -310,6 +310,62 @@ properties:
maximum: 62
deprecated: true
+ snps,rx-thr-num-pkt:
+ description:
+ USB RX packet threshold count. In host mode, this field specifies
+ the space that must be available in the RX FIFO before the core can
+ start the corresponding USB RX transaction (burst).
+ In device mode, this field specifies the space that must be
+ available in the RX FIFO before the core can send ERDY for a
+ flow-controlled endpoint. It is only used for SuperSpeed.
+ The valid values for this field are from 1 to 15. (DWC3 SuperSpeed
+ USB 3.0 Controller Databook)
+ $ref: /schemas/types.yaml#/definitions/uint8
+ minimum: 1
+ maximum: 15
+
+ snps,rx-max-burst:
+ description:
+ Max USB RX burst size. In host mode, this field specifies the
+ Maximum Bulk IN burst the DWC_usb3 core can perform. When the system
+ bus is slower than the USB, RX FIFO can overrun during a long burst.
+ You can program a smaller value to this field to limit the RX burst
+ size that the core can perform. It only applies to SS Bulk,
+ Isochronous, and Interrupt IN endpoints in the host mode.
+ In device mode, this field specifies the NUMP value that is sent in
+ ERDY for an OUT endpoint.
+ The valid values for this field are from 1 to 16. (DWC3 SuperSpeed
+ USB 3.0 Controller Databook)
+ $ref: /schemas/types.yaml#/definitions/uint8
+ minimum: 1
+ maximum: 16
+
+ snps,tx-thr-num-pkt:
+ description:
+ USB TX packet threshold count. This field specifies the number of
+ packets that must be in the TXFIFO before the core can start
+ transmission for the corresponding USB transaction (burst).
+ This count is valid in both host and device modes. It is only used
+ for SuperSpeed operation.
+ Valid values are from 1 to 15. (DWC3 SuperSpeed USB 3.0 Controller
+ Databook)
+ $ref: /schemas/types.yaml#/definitions/uint8
+ minimum: 1
+ maximum: 15
+
+ snps,tx-max-burst:
+ description:
+ Max USB TX burst size. When the system bus is slower than the USB,
+ TX FIFO can underrun during a long burst. Program a smaller value
+ to this field to limit the TX burst size that the core can execute.
+ In Host mode, it only applies to SS Bulk, Isochronous, and Interrupt
+ OUT endpoints. This value is not used in device mode.
+ Valid values are from 1 to 16. (DWC3 SuperSpeed USB 3.0 Controller
+ Databook)
+ $ref: /schemas/types.yaml#/definitions/uint8
+ minimum: 1
+ maximum: 16
+
snps,rx-thr-num-pkt-prd:
description:
Periodic ESS RX packet threshold count (host mode only). Set this and
@@ -376,6 +432,10 @@ properties:
items:
enum: [1, 4, 8, 16, 32, 64, 128, 256]
+ num-hc-interrupters:
+ maximum: 8
+ default: 1
+
port:
$ref: /schemas/graph.yaml#/properties/port
description:
diff --git a/sys/contrib/device-tree/Bindings/usb/ti,tps6598x.yaml b/sys/contrib/device-tree/Bindings/usb/ti,tps6598x.yaml
index 5497a60cddbc..1745e28b3110 100644
--- a/sys/contrib/device-tree/Bindings/usb/ti,tps6598x.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/ti,tps6598x.yaml
@@ -20,7 +20,26 @@ properties:
enum:
- ti,tps6598x
- apple,cd321x
+ - ti,tps25750
+
reg:
+ minItems: 1
+ items:
+ - description: main PD controller address
+ - description: |
+ I2C slave address field in PBMs input data
+ which is used as the device address when writing the
+ patch for TPS25750.
+ The patch address can be any value except 0x00, 0x20,
+ 0x21, 0x22, and 0x23
+
+ reg-names:
+ items:
+ - const: main
+ - const: patch-address
+
+ reset-gpios:
+ description: GPIO used for the HRESET pin.
maxItems: 1
wakeup-source: true
@@ -32,14 +51,50 @@ properties:
items:
- const: irq
+ connector:
+ $ref: /schemas/connector/usb-connector.yaml#
+
+ firmware-name:
+ description: |
+ Should contain the name of the default patch binary
+ file located on the firmware search path which is
+ used to switch the controller into APP mode.
+ This is used when tps25750 doesn't have an EEPROM
+ connected to it.
+ maxItems: 1
+
required:
- compatible
- reg
-additionalProperties: true
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: ti,tps25750
+ then:
+ properties:
+ reg:
+ maxItems: 2
+
+ connector:
+ required:
+ - data-role
+
+ required:
+ - connector
+ - reg-names
+ else:
+ properties:
+ reg:
+ maxItems: 1
+
+additionalProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
@@ -56,6 +111,7 @@ examples:
pinctrl-names = "default";
pinctrl-0 = <&typec_pins>;
+ reset-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
typec_con: connector {
compatible = "usb-c-connector";
@@ -68,4 +124,36 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ typec@21 {
+ compatible = "ti,tps25750";
+ reg = <0x21>, <0x0f>;
+ reg-names = "main", "patch-address";
+
+ interrupt-parent = <&msmgpio>;
+ interrupts = <100 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "irq";
+ firmware-name = "tps25750.bin";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&typec_pins>;
+
+ typec_con0: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ data-role = "dual";
+ port {
+ typec_ep0: endpoint {
+ remote-endpoint = <&otg_ep>;
+ };
+ };
+ };
+ };
+ };
...
diff --git a/sys/contrib/device-tree/Bindings/usb/ti,usb8041.yaml b/sys/contrib/device-tree/Bindings/usb/ti,usb8041.yaml
index 88ea6c952c66..c2e29bd61e11 100644
--- a/sys/contrib/device-tree/Bindings/usb/ti,usb8041.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/ti,usb8041.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/ti,usb8041.yaml#
diff --git a/sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml b/sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml
index 692dd60e3f73..45a19d4928af 100644
--- a/sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml
@@ -41,7 +41,7 @@ examples:
- |
usb {
phys = <&usb2_phy1>, <&usb3_phy1>;
- phy-names = "usb";
+ phy-names = "usb2", "usb3";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml b/sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml
index 180a261c3e8f..4238ae896ef6 100644
--- a/sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml
@@ -29,6 +29,12 @@ properties:
description: Interrupt moderation interval
default: 5000
+ num-hc-interrupters:
+ description: Maximum number of interrupters to allocate
+ $ref: /schemas/types.yaml#/definitions/uint16
+ minimum: 1
+ maximum: 1024
+
additionalProperties: true
examples:
diff --git a/sys/contrib/device-tree/Bindings/usb/vialab,vl817.yaml b/sys/contrib/device-tree/Bindings/usb/vialab,vl817.yaml
index 23a13e1d5c7a..c815010ba9c2 100644
--- a/sys/contrib/device-tree/Bindings/usb/vialab,vl817.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/vialab,vl817.yaml
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/vialab,vl817.yaml#
@@ -37,7 +37,6 @@ properties:
required:
- compatible
- reg
- - reset-gpios
- vdd-supply
- peer-hub
diff --git a/sys/contrib/device-tree/Bindings/usb/xlnx,usb2.yaml b/sys/contrib/device-tree/Bindings/usb/xlnx,usb2.yaml
index 868dffe314bc..a7f75fe36665 100644
--- a/sys/contrib/device-tree/Bindings/usb/xlnx,usb2.yaml
+++ b/sys/contrib/device-tree/Bindings/usb/xlnx,usb2.yaml
@@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx udc controller
maintainers:
- - Piyush Mehta <piyush.mehta@amd.com>
+ - Mubin Sayyed <mubin.sayyed@amd.com>
+ - Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
properties:
compatible:
diff --git a/sys/contrib/device-tree/Bindings/vendor-prefixes.yaml b/sys/contrib/device-tree/Bindings/vendor-prefixes.yaml
index af60bf1a6664..1a0dc04f1db4 100644
--- a/sys/contrib/device-tree/Bindings/vendor-prefixes.yaml
+++ b/sys/contrib/device-tree/Bindings/vendor-prefixes.yaml
@@ -59,6 +59,8 @@ patternProperties:
description: AD Holdings Plc.
"^adi,.*":
description: Analog Devices, Inc.
+ "^adieng,.*":
+ description: ADI Engineering, Inc.
"^advantech,.*":
description: Advantech Corporation
"^aeroflexgaisler,.*":
@@ -77,6 +79,8 @@ patternProperties:
description: ALFA Network Inc.
"^allegro,.*":
description: Allegro DVT
+ "^alliedvision,.*":
+ description: Allied Vision Technologies GmbH
"^allo,.*":
description: Allo.com
"^allwinner,.*":
@@ -117,6 +121,8 @@ patternProperties:
description: Andes Technology Corporation
"^anvo,.*":
description: Anvo-Systems Dresden GmbH
+ "^aosong,.*":
+ description: Guangzhou Aosong Electronic Co., Ltd.
"^apm,.*":
description: Applied Micro Circuits Corporation (APM)
"^apple,.*":
@@ -127,6 +133,8 @@ patternProperties:
description: Arasan Chip Systems
"^archermind,.*":
description: ArcherMind Technology (Nanjing) Co., Ltd.
+ "^arcom,.*":
+ description: Arcom Controllers
"^arctic,.*":
description: Arctic Sand
"^arcx,.*":
@@ -190,8 +198,12 @@ patternProperties:
description: Compass Electronics Group, LLC
"^beagle,.*":
description: BeagleBoard.org Foundation
+ "^belling,.*":
+ description: Shanghai Belling Co., Ltd.
"^bhf,.*":
description: Beckhoff Automation GmbH & Co. KG
+ "^bigtreetech,.*":
+ description: Shenzhen BigTree Tech Co., LTD
"^bitmain,.*":
description: Bitmain Technologies
"^blutek,.*":
@@ -286,6 +298,8 @@ patternProperties:
description: CompuLab Ltd.
"^congatec,.*":
description: congatec GmbH
+ "^coolpi,.*":
+ description: cool-pi.com
"^coreriver,.*":
description: CORERIVER Semiconductor Co.,Ltd.
"^corpro,.*":
@@ -344,6 +358,8 @@ patternProperties:
description: Digi International Inc.
"^digilent,.*":
description: Diglent, Inc.
+ "^dimonoff,.*":
+ description: Dimonoff inc.
"^diodes,.*":
description: Diodes, Inc.
"^dioo,.*":
@@ -466,6 +482,8 @@ patternProperties:
description: Fairphone B.V.
"^faraday,.*":
description: Faraday Technology Corporation
+ "^fascontek,.*":
+ description: Fascontek
"^fastrax,.*":
description: Fastrax Oy
"^fcs,.*":
@@ -482,6 +500,8 @@ patternProperties:
description: FocalTech Systems Co.,Ltd
"^forlinx,.*":
description: Baoding Forlinx Embedded Technology Co., Ltd.
+ "^freecom,.*":
+ description: Freecom Gmbh
"^frida,.*":
description: Shenzhen Frida LCD Co., Ltd.
"^friendlyarm,.*":
@@ -492,8 +512,12 @@ patternProperties:
description: Fujitsu Ltd.
"^fxtec,.*":
description: FX Technology Ltd.
+ "^galaxycore,.*":
+ description: GalaxyCore Inc.
"^gardena,.*":
description: GARDENA GmbH
+ "^gateway,.*":
+ description: Gateway Communications
"^gateworks,.*":
description: Gateworks Corporation
"^gcw,.*":
@@ -508,6 +532,8 @@ patternProperties:
description: GE Fanuc Intelligent Platforms Embedded Systems, Inc.
"^gemei,.*":
description: Gemei Digital Technology Co., Ltd.
+ "^gemtek,.*":
+ description: Gemtek Technology Co., Ltd.
"^genesys,.*":
description: Genesys Logic, Inc.
"^geniatech,.*":
@@ -528,6 +554,8 @@ patternProperties:
description: Shenzhen Huiding Technology Co., Ltd.
"^google,.*":
description: Google, Inc.
+ "^goramo,.*":
+ description: Goramo Gorecki
"^gplus,.*":
description: GPLUS
"^grinn,.*":
@@ -581,6 +609,8 @@ patternProperties:
description: Hewlett Packard Enterprise
"^hsg,.*":
description: HannStar Display Co.
+ "^htc,.*":
+ description: HTC Corporation
"^huawei,.*":
description: Huawei Technologies Co., Ltd.
"^hugsun,.*":
@@ -617,6 +647,8 @@ patternProperties:
description: Imagination Technologies Ltd.
"^imi,.*":
description: Integrated Micro-Electronics Inc.
+ "^inanbo,.*":
+ description: Shenzhen INANBO Electronic Technology Co., Ltd.
"^incircuit,.*":
description: In-Circuit GmbH
"^indiedroid,.*":
@@ -675,6 +707,8 @@ patternProperties:
description: iWave Systems Technologies Pvt. Ltd.
"^jadard,.*":
description: Jadard Technology Inc.
+ "^jasonic,.*":
+ description: Jasonic Technology Ltd.
"^jdi,.*":
description: Japan Display Inc.
"^jedec,.*":
@@ -799,6 +833,8 @@ patternProperties:
description: Mantix Display Technology Co.,Ltd.
"^mapleboard,.*":
description: Mapleboard.org
+ "^marantec,.*":
+ description: Marantec electronics GmbH
"^marvell,.*":
description: Marvell Technology Group Ltd.
"^maxbotix,.*":
@@ -857,6 +893,8 @@ patternProperties:
description: MikroElektronika d.o.o.
"^mikrotik,.*":
description: MikroTik
+ "^milkv,.*":
+ description: MilkV Technology Co., Ltd
"^miniand,.*":
description: Miniand Tech
"^minix,.*":
@@ -865,6 +903,8 @@ patternProperties:
description: MiraMEMS Sensing Technology Co., Ltd.
"^mitsubishi,.*":
description: Mitsubishi Electric Corporation
+ "^mitsumi,.*":
+ description: Mitsumi Electric Co., Ltd.
"^mixel,.*":
description: Mixel, Inc.
"^miyoo,.*":
@@ -1075,6 +1115,8 @@ patternProperties:
description: Powertip Tech. Corp.
"^powervr,.*":
description: PowerVR (deprecated, use img)
+ "^powkiddy,.*":
+ description: Powkiddy
"^primux,.*":
description: Primux Trading, S.L.
"^probox2,.*":
@@ -1151,6 +1193,10 @@ patternProperties:
description: Shenzhen Roofull Technology Co, Ltd
"^roseapplepi,.*":
description: RoseapplePi.org
+ "^rve,.*":
+ description: Recharge Véhicule Électrique (RVE) inc.
+ "^saef,.*":
+ description: Saef Technology Limited
"^samsung,.*":
description: Samsung Semiconductor
"^samtec,.*":
@@ -1251,6 +1297,8 @@ patternProperties:
description: Skyworks Solutions, Inc.
"^smartlabs,.*":
description: SmartLabs LLC
+ "^smi,.*":
+ description: Silicon Motion Technology Corporation
"^smsc,.*":
description: Standard Microsystems Corporation
"^snps,.*":
@@ -1265,6 +1313,8 @@ patternProperties:
description: Solomon Systech Limited
"^sony,.*":
description: Sony Corporation
+ "^sophgo,.*":
+ description: Sophgo Technology Inc.
"^sourceparts,.*":
description: Source Parts Inc.
"^spansion,.*":
@@ -1349,6 +1399,8 @@ patternProperties:
description: Technologic Systems
"^techstar,.*":
description: Shenzhen Techstar Electronics Co., Ltd.
+ "^techwell,.*":
+ description: Techwell, Inc.
"^teejet,.*":
description: TeeJet
"^teltonika,.*":
@@ -1402,6 +1454,8 @@ patternProperties:
description: TPO
"^tq,.*":
description: TQ-Systems GmbH
+ "^transpeed,.*":
+ description: Transpeed
"^traverse,.*":
description: Traverse Technologies Australia Pty Ltd
"^tronfy,.*":
@@ -1412,6 +1466,8 @@ patternProperties:
description: Truly Semiconductors Limited
"^tsd,.*":
description: Theobroma Systems Design und Consulting GmbH
+ "^turing,.*":
+ description: Turing Machines, Inc.
"^tyan,.*":
description: Tyan Computer Corporation
"^u-blox,.*":
@@ -1436,6 +1492,8 @@ patternProperties:
description: United Radiant Technology Corporation
"^usi,.*":
description: Universal Scientific Industrial Co., Ltd.
+ "^usr,.*":
+ description: U.S. Robotics Corporation
"^utoo,.*":
description: Aigo Digital Technology Co., Ltd.
"^v3,.*":
diff --git a/sys/contrib/device-tree/Bindings/w1/amd,axi-1wire-host.yaml b/sys/contrib/device-tree/Bindings/w1/amd,axi-1wire-host.yaml
new file mode 100644
index 000000000000..ef70fa2c0c5d
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/w1/amd,axi-1wire-host.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/w1/amd,axi-1wire-host.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AMD AXI 1-wire bus host for programmable logic
+
+maintainers:
+ - Kris Chaplin <kris.chaplin@amd.com>
+
+properties:
+ compatible:
+ const: amd,axi-1wire-host
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ onewire@a0000000 {
+ compatible = "amd,axi-1wire-host";
+ reg = <0xa0000000 0x10000>;
+ clocks = <&zynqmp_clk 0x47>;
+ interrupts = <GIC_SPI 0x59 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
index 274519fc24fd..64c8f7393809 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
@@ -6,13 +6,13 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A10 Watchdog
-allOf:
- - $ref: watchdog.yaml#
-
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Maxime Ripard <mripard@kernel.org>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
oneOf:
diff --git a/sys/contrib/device-tree/Bindings/watchdog/alphascale,asm9260-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/alphascale,asm9260-wdt.yaml
index fea84f5b7e6d..6425fe51d20c 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/alphascale,asm9260-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/alphascale,asm9260-wdt.yaml
@@ -6,12 +6,12 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Alphascale asm9260 Watchdog timer
-allOf:
- - $ref: watchdog.yaml#
-
maintainers:
- Oleksij Rempel <linux@rempel-privat.de>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
const: alphascale,asm9260-wdt
diff --git a/sys/contrib/device-tree/Bindings/watchdog/amlogic,meson-gxbb-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
index f5cc7aa1b93b..69845ec32e81 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
@@ -15,8 +15,15 @@ allOf:
properties:
compatible:
- enum:
- - amlogic,meson-gxbb-wdt
+ oneOf:
+ - enum:
+ - amlogic,meson-gxbb-wdt
+ - amlogic,t7-wdt
+ - items:
+ - enum:
+ - amlogic,c3-wdt
+ - amlogic,s4-wdt
+ - const: amlogic,t7-wdt
reg:
maxItems: 1
diff --git a/sys/contrib/device-tree/Bindings/watchdog/apple,wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/apple,wdt.yaml
index 929681127df0..21872e15916c 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/apple,wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/apple,wdt.yaml
@@ -6,12 +6,12 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple SoC Watchdog
-allOf:
- - $ref: watchdog.yaml#
-
maintainers:
- Sven Peter <sven@svenpeter.dev>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
items:
diff --git a/sys/contrib/device-tree/Bindings/watchdog/arm-smc-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/arm-smc-wdt.yaml
index b5573852ef5a..8e9d0b7e8244 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/arm-smc-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/arm-smc-wdt.yaml
@@ -6,12 +6,12 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM Secure Monitor Call based watchdog
-allOf:
- - $ref: watchdog.yaml#
-
maintainers:
- Julius Werner <jwerner@chromium.org>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
enum:
diff --git a/sys/contrib/device-tree/Bindings/watchdog/aspeed-wdt.txt b/sys/contrib/device-tree/Bindings/watchdog/aspeed-wdt.txt
index a8197632d6d2..3208adb3e52e 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/aspeed-wdt.txt
+++ b/sys/contrib/device-tree/Bindings/watchdog/aspeed-wdt.txt
@@ -47,7 +47,15 @@ Optional properties for AST2500-compatible watchdogs:
is configured as push-pull, then set the pulse
polarity to active-high. The default is active-low.
-Example:
+Optional properties for AST2500- and AST2600-compatible watchdogs:
+ - aspeed,reset-mask: A bitmask indicating which peripherals will be reset if
+ the watchdog timer expires. On AST2500 this should be a
+ single word defined using the AST2500_WDT_RESET_* macros;
+ on AST2600 this should be a two-word array with the first
+ word defined using the AST2600_WDT_RESET1_* macros and the
+ second word defined using the AST2600_WDT_RESET2_* macros.
+
+Examples:
wdt1: watchdog@1e785000 {
compatible = "aspeed,ast2400-wdt";
@@ -55,3 +63,11 @@ Example:
aspeed,reset-type = "system";
aspeed,external-signal;
};
+
+ #include <dt-bindings/watchdog/aspeed-wdt.h>
+ wdt2: watchdog@1e785040 {
+ compatible = "aspeed,ast2600-wdt";
+ reg = <0x1e785040 0x40>;
+ aspeed,reset-mask = <AST2600_WDT_RESET1_DEFAULT
+ (AST2600_WDT_RESET2_DEFAULT & ~AST2600_WDT_RESET2_LPC)>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/atmel,at91rm9200-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/atmel,at91rm9200-wdt.yaml
new file mode 100644
index 000000000000..7af3571d89f2
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/atmel,at91rm9200-wdt.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/atmel,at91rm9200-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel AT91RM9200 System Timer Watchdog
+
+maintainers:
+ - Nicolas Ferre <nicolas.ferre@microchip.com>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ const: atmel,at91rm9200-wdt
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@fffffd00 {
+ compatible = "atmel,at91rm9200-wdt";
+ reg = <0xfffffd00 0x10>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/brcm,bcm7038-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/brcm,bcm7038-wdt.yaml
index 526ff908d134..e898167ef628 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/brcm,bcm7038-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/brcm,bcm7038-wdt.yaml
@@ -6,14 +6,14 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: BCM63xx and BCM7038 watchdog timer
-allOf:
- - $ref: watchdog.yaml#
-
maintainers:
- Florian Fainelli <f.fainelli@gmail.com>
- Justin Chen <justinpopo6@gmail.com>
- Rafał Miłecki <rafal@milecki.pl>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
enum:
@@ -29,11 +29,11 @@ properties:
The clock running the watchdog. If no clock is found the driver will
default to 27000000 Hz.
-unevaluatedProperties: false
-
required:
- reg
+unevaluatedProperties: false
+
examples:
- |
watchdog@f040a7e8 {
diff --git a/sys/contrib/device-tree/Bindings/watchdog/cnxt,cx92755-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/cnxt,cx92755-wdt.yaml
new file mode 100644
index 000000000000..13236ee61f6f
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/cnxt,cx92755-wdt.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/cnxt,cx92755-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Conexant Digicolor SoCs Watchdog timer
+
+description: |
+ The watchdog functionality in Conexant Digicolor SoCs relies on the so called
+ "Agent Communication" block. This block includes the eight programmable system
+ timer counters. The first timer (called "Timer A") is the only one that can be
+ used as watchdog.
+
+maintainers:
+ - Baruch Siach <baruch@tkos.co.il>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ const: cnxt,cx92755-wdt
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@f0000fc0 {
+ compatible = "cnxt,cx92755-wdt";
+ reg = <0xf0000fc0 0x8>;
+ clocks = <&main_clk>;
+ timeout-sec = <15>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/dlg,da9062-watchdog.yaml b/sys/contrib/device-tree/Bindings/watchdog/dlg,da9062-watchdog.yaml
new file mode 100644
index 000000000000..c8f698120597
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/dlg,da9062-watchdog.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/dlg,da9062-watchdog.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dialog Semiconductor DA906{1,2,3} Watchdog Timer
+
+maintainers:
+ - Steve Twiss <stwiss.opensource@diasemi.com>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - dlg,da9062-watchdog
+ - dlg,da9063-watchdog
+ - items:
+ - const: dlg,da9061-watchdog
+ - const: dlg,da9062-watchdog
+
+ dlg,use-sw-pm:
+ type: boolean
+ description:
+ Add this property to disable the watchdog during suspend.
+ Only use this option if you can't use the watchdog automatic suspend
+ function during a suspend (see register CONTROL_B).
+
+ dlg,wdt-sd:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description:
+ Set what happens on watchdog timeout. If this bit is set the
+ watchdog timeout triggers SHUTDOWN, if cleared the watchdog triggers
+ POWERDOWN. Can be 0 or 1. Only use this option if you want to change the
+ default chip's OTP setting for WATCHDOG_SD bit. If this property is NOT
+ set the WATCHDOG_SD bit and on timeout watchdog behavior will match the
+ chip's OTP settings.
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog {
+ compatible = "dlg,da9062-watchdog";
+ dlg,use-sw-pm;
+ dlg,wdt-sd = <1>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/fsl,scu-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/fsl,scu-wdt.yaml
index 47701248cd8d..8b7aa922249b 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/fsl,scu-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/fsl,scu-wdt.yaml
@@ -18,7 +18,9 @@ allOf:
properties:
compatible:
items:
- - const: fsl,imx8qxp-sc-wdt
+ - enum:
+ - fsl,imx8dxl-sc-wdt
+ - fsl,imx8qxp-sc-wdt
- const: fsl,imx-sc-wdt
required:
diff --git a/sys/contrib/device-tree/Bindings/watchdog/fsl-imx7ulp-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/fsl-imx7ulp-wdt.yaml
index 4b7ed1355701..9c50766bf690 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/fsl-imx7ulp-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/fsl-imx7ulp-wdt.yaml
@@ -30,6 +30,11 @@ properties:
clocks:
maxItems: 1
+ fsl,ext-reset-output:
+ description:
+ When set, wdog can generate external reset from the wdog_any pin.
+ type: boolean
+
required:
- compatible
- interrupts
diff --git a/sys/contrib/device-tree/Bindings/watchdog/intel,keembay-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/intel,keembay-wdt.yaml
index 1437ff8a122f..8231dde2bfa6 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/intel,keembay-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/intel,keembay-wdt.yaml
@@ -9,6 +9,9 @@ title: Intel Keem Bay SoC non-secure Watchdog Timer
maintainers:
- Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
enum:
@@ -37,7 +40,7 @@ required:
- interrupt-names
- clocks
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/sys/contrib/device-tree/Bindings/watchdog/marvell,cn10624-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/marvell,cn10624-wdt.yaml
new file mode 100644
index 000000000000..1b583f232e53
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/marvell,cn10624-wdt.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/marvell,cn10624-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Global Timer (GTI) system watchdog
+
+maintainers:
+ - Bharat Bhushan <bbhushan2@marvell.com>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - marvell,cn9670-wdt
+ - marvell,cn10624-wdt
+
+ - items:
+ - enum:
+ - marvell,cn9880-wdt
+ - marvell,cnf9535-wdt
+ - const: marvell,cn9670-wdt
+
+ - items:
+ - enum:
+ - marvell,cn10308-wdt
+ - marvell,cnf10518-wdt
+ - const: marvell,cn10624-wdt
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: refclk
+
+ marvell,wdt-timer-index:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 63
+ description:
+ An SoC have many timers (up to 64), firmware can reserve one or more timer
+ for some other use case and configures one of the global timer as watchdog
+ timer. Firmware will update this field with the timer number configured
+ as watchdog timer.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ watchdog@802000040000 {
+ compatible = "marvell,cn9670-wdt";
+ reg = <0x00008020 0x00040000 0x00000000 0x00020000>;
+ interrupts = <GIC_SPI 38 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&sclk>;
+ clock-names = "refclk";
+ marvell,wdt-timer-index = <63>;
+ };
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/watchdog/maxim,max63xx.yaml b/sys/contrib/device-tree/Bindings/watchdog/maxim,max63xx.yaml
index 1a6490c43d89..442c21f12a3b 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/maxim,max63xx.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/maxim,max63xx.yaml
@@ -6,14 +6,14 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim 63xx Watchdog Timers
-allOf:
- - $ref: watchdog.yaml#
- - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
-
maintainers:
- Marc Zyngier <maz@kernel.org>
- Linus Walleij <linus.walleij@linaro.org>
+allOf:
+ - $ref: watchdog.yaml#
+ - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
+
properties:
compatible:
enum:
diff --git a/sys/contrib/device-tree/Bindings/watchdog/mediatek,mtk-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/mediatek,mtk-wdt.yaml
index cc502838bc39..8d2520241e37 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/mediatek,mtk-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/mediatek,mtk-wdt.yaml
@@ -25,6 +25,7 @@ properties:
- mediatek,mt6735-wdt
- mediatek,mt6795-wdt
- mediatek,mt7986-wdt
+ - mediatek,mt7988-wdt
- mediatek,mt8183-wdt
- mediatek,mt8186-wdt
- mediatek,mt8188-wdt
diff --git a/sys/contrib/device-tree/Bindings/watchdog/nxp,pnx4008-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/nxp,pnx4008-wdt.yaml
new file mode 100644
index 000000000000..35ef940cbabe
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/nxp,pnx4008-wdt.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/nxp,pnx4008-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PNX watchdog timer
+
+maintainers:
+ - Roland Stigge <stigge@antcom.de>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ const: nxp,pnx4008-wdt
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@4003c000 {
+ compatible = "nxp,pnx4008-wdt";
+ reg = <0x4003c000 0x1000>;
+ timeout-sec = <10>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/qca,ar7130-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/qca,ar7130-wdt.yaml
new file mode 100644
index 000000000000..82040ca10eda
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/qca,ar7130-wdt.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/qca,ar7130-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Atheros AR7130 Watchdog Timer (WDT) Controller
+
+maintainers:
+ - Gabor Juhos <juhosg@openwrt.org>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ const: qca,ar7130-wdt
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@18060008 {
+ compatible = "qca,ar7130-wdt";
+ reg = <0x18060008 0x8>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/qcom,pm8916-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/qcom,pm8916-wdt.yaml
index 568eb8480fc3..dc6af204e8af 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/qcom,pm8916-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/qcom,pm8916-wdt.yaml
@@ -30,22 +30,27 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
- pmic@0 {
- compatible = "qcom,pm8916", "qcom,spmi-pmic";
- reg = <0x0 SPMI_USID>;
- #address-cells = <1>;
+ spmi {
+ #address-cells = <2>;
#size-cells = <0>;
- pon@800 {
- compatible = "qcom,pm8916-pon";
- reg = <0x800>;
- mode-bootloader = <0x2>;
- mode-recovery = <0x1>;
-
- watchdog {
- compatible = "qcom,pm8916-wdt";
- interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>;
- timeout-sec = <60>;
+ pmic@0 {
+ compatible = "qcom,pm8916", "qcom,spmi-pmic";
+ reg = <0x0 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pon@800 {
+ compatible = "qcom,pm8916-pon";
+ reg = <0x800>;
+ mode-bootloader = <0x2>;
+ mode-recovery = <0x1>;
+
+ watchdog {
+ compatible = "qcom,pm8916-wdt";
+ interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>;
+ timeout-sec = <60>;
+ };
};
};
};
diff --git a/sys/contrib/device-tree/Bindings/watchdog/qcom-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/qcom-wdt.yaml
index 6d0fe6abd06a..a4f35c598cdb 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/qcom-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/qcom-wdt.yaml
@@ -18,8 +18,11 @@ properties:
- items:
- enum:
- qcom,kpss-wdt-ipq4019
+ - qcom,apss-wdt-ipq5018
- qcom,apss-wdt-ipq5332
- qcom,apss-wdt-ipq9574
+ - qcom,apss-wdt-msm8226
+ - qcom,apss-wdt-msm8974
- qcom,apss-wdt-msm8994
- qcom,apss-wdt-qcm2290
- qcom,apss-wdt-qcs404
@@ -120,7 +123,7 @@ examples:
compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
reg = <0x17c10000 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
timeout-sec = <10>;
};
diff --git a/sys/contrib/device-tree/Bindings/watchdog/realtek,rtd1295-watchdog.yaml b/sys/contrib/device-tree/Bindings/watchdog/realtek,rtd1295-watchdog.yaml
new file mode 100644
index 000000000000..2a0ea1696317
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/realtek,rtd1295-watchdog.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/realtek,rtd1295-watchdog.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTD1295 Watchdog
+
+maintainers:
+ - Andreas Färber <afaerber@suse.de>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ const: realtek,rtd1295-watchdog
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@98007680 {
+ compatible = "realtek,rtd1295-watchdog";
+ reg = <0x98007680 0x100>;
+ clocks = <&osc27M>;
+ };
diff --git a/sys/contrib/device-tree/Bindings/watchdog/samsung-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/samsung-wdt.yaml
index 8fb6656ba0c2..77a5ddd0426e 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/samsung-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/samsung-wdt.yaml
@@ -16,14 +16,20 @@ description: |+
properties:
compatible:
- enum:
- - samsung,s3c2410-wdt # for S3C2410
- - samsung,s3c6410-wdt # for S3C6410, S5PV210 and Exynos4
- - samsung,exynos5250-wdt # for Exynos5250
- - samsung,exynos5420-wdt # for Exynos5420
- - samsung,exynos7-wdt # for Exynos7
- - samsung,exynos850-wdt # for Exynos850
- - samsung,exynosautov9-wdt # for Exynosautov9
+ oneOf:
+ - enum:
+ - google,gs101-wdt # for Google gs101
+ - samsung,s3c2410-wdt # for S3C2410
+ - samsung,s3c6410-wdt # for S3C6410, S5PV210 and Exynos4
+ - samsung,exynos5250-wdt # for Exynos5250
+ - samsung,exynos5420-wdt # for Exynos5420
+ - samsung,exynos7-wdt # for Exynos7
+ - samsung,exynos850-wdt # for Exynos850
+ - samsung,exynosautov9-wdt # for Exynosautov9
+ - items:
+ - enum:
+ - tesla,fsd-wdt
+ - const: samsung,exynos7-wdt
reg:
maxItems: 1
@@ -42,13 +48,14 @@ properties:
samsung,cluster-index:
$ref: /schemas/types.yaml#/definitions/uint32
description:
- Index of CPU cluster on which watchdog is running (in case of Exynos850)
+ Index of CPU cluster on which watchdog is running (in case of Exynos850
+ or Google gs101).
samsung,syscon-phandle:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to the PMU system controller node (in case of Exynos5250,
- Exynos5420, Exynos7 and Exynos850).
+ Exynos5420, Exynos7, Exynos850 and gs101).
required:
- compatible
@@ -64,6 +71,7 @@ allOf:
compatible:
contains:
enum:
+ - google,gs101-wdt
- samsung,exynos5250-wdt
- samsung,exynos5420-wdt
- samsung,exynos7-wdt
@@ -77,6 +85,7 @@ allOf:
compatible:
contains:
enum:
+ - google,gs101-wdt
- samsung,exynos850-wdt
- samsung,exynosautov9-wdt
then:
diff --git a/sys/contrib/device-tree/Bindings/watchdog/snps,dw-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/snps,dw-wdt.yaml
index 76eceeddd150..c7aab0418a32 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/snps,dw-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/snps,dw-wdt.yaml
@@ -6,12 +6,12 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Synopsys Designware Watchdog Timer
-allOf:
- - $ref: watchdog.yaml#
-
maintainers:
- Jamie Iles <jamie@jamieiles.com>
+allOf:
+ - $ref: watchdog.yaml#
+
properties:
compatible:
oneOf:
@@ -73,13 +73,13 @@ properties:
minItems: 16
maxItems: 16
-unevaluatedProperties: false
-
required:
- compatible
- reg
- clocks
+unevaluatedProperties: false
+
examples:
- |
watchdog@ffd02000 {
diff --git a/sys/contrib/device-tree/Bindings/watchdog/technologic,ts7200-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/technologic,ts7200-wdt.yaml
new file mode 100644
index 000000000000..7e4bfef152f8
--- /dev/null
+++ b/sys/contrib/device-tree/Bindings/watchdog/technologic,ts7200-wdt.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/technologic,ts7200-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Technologic Systems TS-72xx based SBCs watchdog
+
+maintainers:
+ - Nikita Shubin <nikita.shubin@maquefel.me>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - const: technologic,ts7200-wdt
+ - items:
+ - enum:
+ - technologic,ts7300-wdt
+ - technologic,ts7260-wdt
+ - technologic,ts7250-wdt
+ - const: technologic,ts7200-wdt
+
+ reg:
+ items:
+ - description: control register
+ - description: feed register
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@23800000 {
+ compatible = "technologic,ts7200-wdt";
+ reg = <0x23800000 0x01>, <0x23c00000 0x01>;
+ timeout-sec = <30>;
+ };
+
+...
diff --git a/sys/contrib/device-tree/Bindings/watchdog/ti,rti-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/ti,rti-wdt.yaml
index fc553211e42d..62ddc284a524 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/ti,rti-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/ti,rti-wdt.yaml
@@ -34,6 +34,20 @@ properties:
power-domains:
maxItems: 1
+ memory-region:
+ maxItems: 1
+ description:
+ Contains the watchdog reserved memory. It is optional.
+ In the reserved memory, the specified values, which are
+ PON_REASON_SOF_NUM(0xBBBBCCCC), PON_REASON_MAGIC_NUM(0xDDDDDDDD),
+ and PON_REASON_EOF_NUM(0xCCCCBBBB), are pre-stored at the first
+ 3 * 4 bytes to tell that last boot was caused by watchdog reset.
+ Once the PON reason is captured by driver(rti_wdt.c), the driver
+ is supposed to wipe the whole memory region. Surely, if this
+ property is set, at least 12 bytes reserved memory starting from
+ specific memory address(0xa220000) should be set. More please
+ refer to example.
+
required:
- compatible
- reg
@@ -47,7 +61,18 @@ examples:
/*
* RTI WDT in main domain on J721e SoC. Assigned clocks are used to
* select the source clock for the watchdog, forcing it to tick with
- * a 32kHz clock in this case.
+ * a 32kHz clock in this case. Add a reserved memory(optional) to keep
+ * the watchdog reset cause persistent, which was be written in 12 bytes
+ * starting from 0xa2200000 by RTI Watchdog Firmware, then make it
+ * possible to get watchdog reset cause in driver.
+ *
+ * Reserved memory should be defined as follows:
+ * reserved-memory {
+ * wdt_reset_memory_region: wdt-memory@a2200000 {
+ * reg = <0x00 0xa2200000 0x00 0x1000>;
+ * no-map;
+ * };
+ * }
*/
#include <dt-bindings/soc/ti,sci_pm_domain.h>
@@ -58,4 +83,5 @@ examples:
power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
assigned-clocks = <&k3_clks 252 1>;
assigned-clock-parents = <&k3_clks 252 5>;
+ memory-region = <&wdt_reset_memory_region>;
};
diff --git a/sys/contrib/device-tree/Bindings/watchdog/toshiba,visconti-wdt.yaml b/sys/contrib/device-tree/Bindings/watchdog/toshiba,visconti-wdt.yaml
index 51d03d5b08ad..3e9fd49d935e 100644
--- a/sys/contrib/device-tree/Bindings/watchdog/toshiba,visconti-wdt.yaml
+++ b/sys/contrib/device-tree/Bindings/watchdog/toshiba,visconti-wdt.yaml
@@ -2,8 +2,8 @@
# Copyright 2020 Toshiba Electronic Devices & Storage Corporation
%YAML 1.2
---
-$id: "http://devicetree.org/schemas/watchdog/toshiba,visconti-wdt.yaml#"
-$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+$id: http://devicetree.org/schemas/watchdog/toshiba,visconti-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Toshiba Visconti SoCs PIUWDT Watchdog timer
diff --git a/sys/contrib/device-tree/Bindings/writing-schema.rst b/sys/contrib/device-tree/Bindings/writing-schema.rst
index 4a381d20f2b4..0a6cf19a1459 100644
--- a/sys/contrib/device-tree/Bindings/writing-schema.rst
+++ b/sys/contrib/device-tree/Bindings/writing-schema.rst
@@ -159,11 +159,14 @@ It is possible to run both in a single command::
make dt_binding_check dtbs_check
It is also possible to run checks with a subset of matching schema files by
-setting the ``DT_SCHEMA_FILES`` variable to a specific schema file or pattern.
+setting the ``DT_SCHEMA_FILES`` variable to 1 or more specific schema files or
+patterns (partial match of a fixed string). Each file or pattern should be
+separated by ':'.
::
make dt_binding_check DT_SCHEMA_FILES=trivial-devices.yaml
+ make dt_binding_check DT_SCHEMA_FILES=trivial-devices.yaml:rtc.yaml
make dt_binding_check DT_SCHEMA_FILES=/gpio/
make dtbs_check DT_SCHEMA_FILES=trivial-devices.yaml
diff --git a/sys/contrib/device-tree/include/dt-bindings/arm/qcom,ids.h b/sys/contrib/device-tree/include/dt-bindings/arm/qcom,ids.h
index bcbe9ee2cdaf..51e0f6059410 100644
--- a/sys/contrib/device-tree/include/dt-bindings/arm/qcom,ids.h
+++ b/sys/contrib/device-tree/include/dt-bindings/arm/qcom,ids.h
@@ -193,6 +193,7 @@
#define QCOM_ID_SDA439 363
#define QCOM_ID_SDA429 364
#define QCOM_ID_SM7150 365
+#define QCOM_ID_SM7150P 366
#define QCOM_ID_IPQ8070 375
#define QCOM_ID_IPQ8071 376
#define QCOM_ID_QM215 386
@@ -203,6 +204,9 @@
#define QCOM_ID_SM6125 394
#define QCOM_ID_IPQ8070A 395
#define QCOM_ID_IPQ8071A 396
+#define QCOM_ID_IPQ8172 397
+#define QCOM_ID_IPQ8173 398
+#define QCOM_ID_IPQ8174 399
#define QCOM_ID_IPQ6018 402
#define QCOM_ID_IPQ6028 403
#define QCOM_ID_SDM429W 416
@@ -215,6 +219,7 @@
#define QCOM_ID_SDA429W 437
#define QCOM_ID_SM8350 439
#define QCOM_ID_QCM2290 441
+#define QCOM_ID_SM7125 443
#define QCOM_ID_SM6115 444
#define QCOM_ID_IPQ5010 446
#define QCOM_ID_IPQ5018 447
@@ -232,6 +237,7 @@
#define QCOM_ID_SM8450_3 482
#define QCOM_ID_SC7280 487
#define QCOM_ID_SC7180P 495
+#define QCOM_ID_QCM6490 497
#define QCOM_ID_IPQ5000 503
#define QCOM_ID_IPQ0509 504
#define QCOM_ID_IPQ0518 505
@@ -249,8 +255,9 @@
#define QCOM_ID_SA8775P 534
#define QCOM_ID_QRU1000 539
#define QCOM_ID_QDU1000 545
+#define QCOM_ID_SM8650 557
+#define QCOM_ID_SM4450 568
#define QCOM_ID_QDU1010 587
-#define QCOM_ID_IPQ5019 569
#define QCOM_ID_QRU1032 588
#define QCOM_ID_QRU1052 589
#define QCOM_ID_QRU1062 590
diff --git a/sys/contrib/device-tree/include/dt-bindings/ata/ahci.h b/sys/contrib/device-tree/include/dt-bindings/ata/ahci.h
index 77997b35612c..b3f3b7cf9af8 100644
--- a/sys/contrib/device-tree/include/dt-bindings/ata/ahci.h
+++ b/sys/contrib/device-tree/include/dt-bindings/ata/ahci.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause */
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
/*
* This header provides constants for most AHCI bindings.
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-peripherals-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-peripherals-clkc.h
index ff2730f398a6..06f198ee7623 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-peripherals-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-peripherals-clkc.h
@@ -10,6 +10,7 @@
#ifndef __A1_PERIPHERALS_CLKC_H
#define __A1_PERIPHERALS_CLKC_H
+#define CLKID_XTAL_IN 0
#define CLKID_FIXPLL_IN 1
#define CLKID_USB_PHY_IN 2
#define CLKID_USB_CTRL_IN 3
@@ -70,6 +71,8 @@
#define CLKID_CPU_CTRL 58
#define CLKID_ROM 59
#define CLKID_PROC_I2C 60
+#define CLKID_DSPA_SEL 61
+#define CLKID_DSPB_SEL 62
#define CLKID_DSPA_EN 63
#define CLKID_DSPA_EN_NIC 64
#define CLKID_DSPB_EN 65
@@ -81,6 +84,7 @@
#define CLKID_12M 71
#define CLKID_FCLK_DIV2_DIVN 72
#define CLKID_GEN 73
+#define CLKID_SARADC_SEL 74
#define CLKID_SARADC 75
#define CLKID_PWM_A 76
#define CLKID_PWM_B 77
@@ -95,21 +99,70 @@
#define CLKID_SD_EMMC 86
#define CLKID_PSRAM 87
#define CLKID_DMC 88
+#define CLKID_SYS_A_SEL 89
+#define CLKID_SYS_A_DIV 90
+#define CLKID_SYS_A 91
+#define CLKID_SYS_B_SEL 92
+#define CLKID_SYS_B_DIV 93
+#define CLKID_SYS_B 94
#define CLKID_DSPA_A_SEL 95
+#define CLKID_DSPA_A_DIV 96
+#define CLKID_DSPA_A 97
#define CLKID_DSPA_B_SEL 98
+#define CLKID_DSPA_B_DIV 99
+#define CLKID_DSPA_B 100
#define CLKID_DSPB_A_SEL 101
+#define CLKID_DSPB_A_DIV 102
+#define CLKID_DSPB_A 103
#define CLKID_DSPB_B_SEL 104
+#define CLKID_DSPB_B_DIV 105
+#define CLKID_DSPB_B 106
+#define CLKID_RTC_32K_IN 107
+#define CLKID_RTC_32K_DIV 108
+#define CLKID_RTC_32K_XTAL 109
+#define CLKID_RTC_32K_SEL 110
+#define CLKID_CECB_32K_IN 111
+#define CLKID_CECB_32K_DIV 112
#define CLKID_CECB_32K_SEL_PRE 113
#define CLKID_CECB_32K_SEL 114
+#define CLKID_CECA_32K_IN 115
+#define CLKID_CECA_32K_DIV 116
#define CLKID_CECA_32K_SEL_PRE 117
#define CLKID_CECA_32K_SEL 118
+#define CLKID_DIV2_PRE 119
+#define CLKID_24M_DIV2 120
#define CLKID_GEN_SEL 121
+#define CLKID_GEN_DIV 122
+#define CLKID_SARADC_DIV 123
#define CLKID_PWM_A_SEL 124
+#define CLKID_PWM_A_DIV 125
#define CLKID_PWM_B_SEL 126
+#define CLKID_PWM_B_DIV 127
#define CLKID_PWM_C_SEL 128
+#define CLKID_PWM_C_DIV 129
#define CLKID_PWM_D_SEL 130
+#define CLKID_PWM_D_DIV 131
#define CLKID_PWM_E_SEL 132
+#define CLKID_PWM_E_DIV 133
#define CLKID_PWM_F_SEL 134
+#define CLKID_PWM_F_DIV 135
+#define CLKID_SPICC_SEL 136
+#define CLKID_SPICC_DIV 137
+#define CLKID_SPICC_SEL2 138
+#define CLKID_TS_DIV 139
+#define CLKID_SPIFC_SEL 140
+#define CLKID_SPIFC_DIV 141
+#define CLKID_SPIFC_SEL2 142
+#define CLKID_USB_BUS_SEL 143
+#define CLKID_USB_BUS_DIV 144
+#define CLKID_SD_EMMC_SEL 145
+#define CLKID_SD_EMMC_DIV 146
#define CLKID_SD_EMMC_SEL2 147
+#define CLKID_PSRAM_SEL 148
+#define CLKID_PSRAM_DIV 149
+#define CLKID_PSRAM_SEL2 150
+#define CLKID_DMC_SEL 151
+#define CLKID_DMC_DIV 152
+#define CLKID_DMC_SEL2 153
#endif /* __A1_PERIPHERALS_CLKC_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-pll-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-pll-clkc.h
index 01fb8164ac29..2b660c0f2c9f 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-pll-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,a1-pll-clkc.h
@@ -10,7 +10,12 @@
#ifndef __A1_PLL_CLKC_H
#define __A1_PLL_CLKC_H
+#define CLKID_FIXED_PLL_DCO 0
#define CLKID_FIXED_PLL 1
+#define CLKID_FCLK_DIV2_DIV 2
+#define CLKID_FCLK_DIV3_DIV 3
+#define CLKID_FCLK_DIV5_DIV 4
+#define CLKID_FCLK_DIV7_DIV 5
#define CLKID_FCLK_DIV2 6
#define CLKID_FCLK_DIV3 7
#define CLKID_FCLK_DIV5 8
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h
new file mode 100644
index 000000000000..861a331963ac
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-peripherals-clkc.h
@@ -0,0 +1,236 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2022-2023 Amlogic, Inc. All rights reserved.
+ * Author: Yu Tu <yu.tu@amlogic.com>
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_AMLOGIC_S4_PERIPHERALS_CLKC_H
+#define _DT_BINDINGS_CLOCK_AMLOGIC_S4_PERIPHERALS_CLKC_H
+
+#define CLKID_RTC_32K_CLKIN 0
+#define CLKID_RTC_32K_DIV 1
+#define CLKID_RTC_32K_SEL 2
+#define CLKID_RTC_32K_XATL 3
+#define CLKID_RTC 4
+#define CLKID_SYS_CLK_B_SEL 5
+#define CLKID_SYS_CLK_B_DIV 6
+#define CLKID_SYS_CLK_B 7
+#define CLKID_SYS_CLK_A_SEL 8
+#define CLKID_SYS_CLK_A_DIV 9
+#define CLKID_SYS_CLK_A 10
+#define CLKID_SYS 11
+#define CLKID_CECA_32K_CLKIN 12
+#define CLKID_CECA_32K_DIV 13
+#define CLKID_CECA_32K_SEL_PRE 14
+#define CLKID_CECA_32K_SEL 15
+#define CLKID_CECA_32K_CLKOUT 16
+#define CLKID_CECB_32K_CLKIN 17
+#define CLKID_CECB_32K_DIV 18
+#define CLKID_CECB_32K_SEL_PRE 19
+#define CLKID_CECB_32K_SEL 20
+#define CLKID_CECB_32K_CLKOUT 21
+#define CLKID_SC_CLK_SEL 22
+#define CLKID_SC_CLK_DIV 23
+#define CLKID_SC 24
+#define CLKID_12_24M 25
+#define CLKID_12M_CLK_DIV 26
+#define CLKID_12_24M_CLK_SEL 27
+#define CLKID_VID_PLL_DIV 28
+#define CLKID_VID_PLL_SEL 29
+#define CLKID_VID_PLL 30
+#define CLKID_VCLK_SEL 31
+#define CLKID_VCLK2_SEL 32
+#define CLKID_VCLK_INPUT 33
+#define CLKID_VCLK2_INPUT 34
+#define CLKID_VCLK_DIV 35
+#define CLKID_VCLK2_DIV 36
+#define CLKID_VCLK 37
+#define CLKID_VCLK2 38
+#define CLKID_VCLK_DIV1 39
+#define CLKID_VCLK_DIV2_EN 40
+#define CLKID_VCLK_DIV4_EN 41
+#define CLKID_VCLK_DIV6_EN 42
+#define CLKID_VCLK_DIV12_EN 43
+#define CLKID_VCLK2_DIV1 44
+#define CLKID_VCLK2_DIV2_EN 45
+#define CLKID_VCLK2_DIV4_EN 46
+#define CLKID_VCLK2_DIV6_EN 47
+#define CLKID_VCLK2_DIV12_EN 48
+#define CLKID_VCLK_DIV2 49
+#define CLKID_VCLK_DIV4 50
+#define CLKID_VCLK_DIV6 51
+#define CLKID_VCLK_DIV12 52
+#define CLKID_VCLK2_DIV2 53
+#define CLKID_VCLK2_DIV4 54
+#define CLKID_VCLK2_DIV6 55
+#define CLKID_VCLK2_DIV12 56
+#define CLKID_CTS_ENCI_SEL 57
+#define CLKID_CTS_ENCP_SEL 58
+#define CLKID_CTS_VDAC_SEL 59
+#define CLKID_HDMI_TX_SEL 60
+#define CLKID_CTS_ENCI 61
+#define CLKID_CTS_ENCP 62
+#define CLKID_CTS_VDAC 63
+#define CLKID_HDMI_TX 64
+#define CLKID_HDMI_SEL 65
+#define CLKID_HDMI_DIV 66
+#define CLKID_HDMI 67
+#define CLKID_TS_CLK_DIV 68
+#define CLKID_TS 69
+#define CLKID_MALI_0_SEL 70
+#define CLKID_MALI_0_DIV 71
+#define CLKID_MALI_0 72
+#define CLKID_MALI_1_SEL 73
+#define CLKID_MALI_1_DIV 74
+#define CLKID_MALI_1 75
+#define CLKID_MALI_SEL 76
+#define CLKID_VDEC_P0_SEL 77
+#define CLKID_VDEC_P0_DIV 78
+#define CLKID_VDEC_P0 79
+#define CLKID_VDEC_P1_SEL 80
+#define CLKID_VDEC_P1_DIV 81
+#define CLKID_VDEC_P1 82
+#define CLKID_VDEC_SEL 83
+#define CLKID_HEVCF_P0_SEL 84
+#define CLKID_HEVCF_P0_DIV 85
+#define CLKID_HEVCF_P0 86
+#define CLKID_HEVCF_P1_SEL 87
+#define CLKID_HEVCF_P1_DIV 88
+#define CLKID_HEVCF_P1 89
+#define CLKID_HEVCF_SEL 90
+#define CLKID_VPU_0_SEL 91
+#define CLKID_VPU_0_DIV 92
+#define CLKID_VPU_0 93
+#define CLKID_VPU_1_SEL 94
+#define CLKID_VPU_1_DIV 95
+#define CLKID_VPU_1 96
+#define CLKID_VPU 97
+#define CLKID_VPU_CLKB_TMP_SEL 98
+#define CLKID_VPU_CLKB_TMP_DIV 99
+#define CLKID_VPU_CLKB_TMP 100
+#define CLKID_VPU_CLKB_DIV 101
+#define CLKID_VPU_CLKB 102
+#define CLKID_VPU_CLKC_P0_SEL 103
+#define CLKID_VPU_CLKC_P0_DIV 104
+#define CLKID_VPU_CLKC_P0 105
+#define CLKID_VPU_CLKC_P1_SEL 106
+#define CLKID_VPU_CLKC_P1_DIV 107
+#define CLKID_VPU_CLKC_P1 108
+#define CLKID_VPU_CLKC_SEL 109
+#define CLKID_VAPB_0_SEL 110
+#define CLKID_VAPB_0_DIV 111
+#define CLKID_VAPB_0 112
+#define CLKID_VAPB_1_SEL 113
+#define CLKID_VAPB_1_DIV 114
+#define CLKID_VAPB_1 115
+#define CLKID_VAPB 116
+#define CLKID_GE2D 117
+#define CLKID_VDIN_MEAS_SEL 118
+#define CLKID_VDIN_MEAS_DIV 119
+#define CLKID_VDIN_MEAS 120
+#define CLKID_SD_EMMC_C_CLK_SEL 121
+#define CLKID_SD_EMMC_C_CLK_DIV 122
+#define CLKID_SD_EMMC_C 123
+#define CLKID_SD_EMMC_A_CLK_SEL 124
+#define CLKID_SD_EMMC_A_CLK_DIV 125
+#define CLKID_SD_EMMC_A 126
+#define CLKID_SD_EMMC_B_CLK_SEL 127
+#define CLKID_SD_EMMC_B_CLK_DIV 128
+#define CLKID_SD_EMMC_B 129
+#define CLKID_SPICC0_SEL 130
+#define CLKID_SPICC0_DIV 131
+#define CLKID_SPICC0_EN 132
+#define CLKID_PWM_A_SEL 133
+#define CLKID_PWM_A_DIV 134
+#define CLKID_PWM_A 135
+#define CLKID_PWM_B_SEL 136
+#define CLKID_PWM_B_DIV 137
+#define CLKID_PWM_B 138
+#define CLKID_PWM_C_SEL 139
+#define CLKID_PWM_C_DIV 140
+#define CLKID_PWM_C 141
+#define CLKID_PWM_D_SEL 142
+#define CLKID_PWM_D_DIV 143
+#define CLKID_PWM_D 144
+#define CLKID_PWM_E_SEL 145
+#define CLKID_PWM_E_DIV 146
+#define CLKID_PWM_E 147
+#define CLKID_PWM_F_SEL 148
+#define CLKID_PWM_F_DIV 149
+#define CLKID_PWM_F 150
+#define CLKID_PWM_G_SEL 151
+#define CLKID_PWM_G_DIV 152
+#define CLKID_PWM_G 153
+#define CLKID_PWM_H_SEL 154
+#define CLKID_PWM_H_DIV 155
+#define CLKID_PWM_H 156
+#define CLKID_PWM_I_SEL 157
+#define CLKID_PWM_I_DIV 158
+#define CLKID_PWM_I 159
+#define CLKID_PWM_J_SEL 160
+#define CLKID_PWM_J_DIV 161
+#define CLKID_PWM_J 162
+#define CLKID_SARADC_SEL 163
+#define CLKID_SARADC_DIV 164
+#define CLKID_SARADC 165
+#define CLKID_GEN_SEL 166
+#define CLKID_GEN_DIV 167
+#define CLKID_GEN 168
+#define CLKID_DDR 169
+#define CLKID_DOS 170
+#define CLKID_ETHPHY 171
+#define CLKID_MALI 172
+#define CLKID_AOCPU 173
+#define CLKID_AUCPU 174
+#define CLKID_CEC 175
+#define CLKID_SDEMMC_A 176
+#define CLKID_SDEMMC_B 177
+#define CLKID_NAND 178
+#define CLKID_SMARTCARD 179
+#define CLKID_ACODEC 180
+#define CLKID_SPIFC 181
+#define CLKID_MSR 182
+#define CLKID_IR_CTRL 183
+#define CLKID_AUDIO 184
+#define CLKID_ETH 185
+#define CLKID_UART_A 186
+#define CLKID_UART_B 187
+#define CLKID_UART_C 188
+#define CLKID_UART_D 189
+#define CLKID_UART_E 190
+#define CLKID_AIFIFO 191
+#define CLKID_TS_DDR 192
+#define CLKID_TS_PLL 193
+#define CLKID_G2D 194
+#define CLKID_SPICC0 195
+#define CLKID_SPICC1 196
+#define CLKID_USB 197
+#define CLKID_I2C_M_A 198
+#define CLKID_I2C_M_B 199
+#define CLKID_I2C_M_C 200
+#define CLKID_I2C_M_D 201
+#define CLKID_I2C_M_E 202
+#define CLKID_HDMITX_APB 203
+#define CLKID_I2C_S_A 204
+#define CLKID_USB1_TO_DDR 205
+#define CLKID_HDCP22 206
+#define CLKID_MMC_APB 207
+#define CLKID_RSA 208
+#define CLKID_CPU_DEBUG 209
+#define CLKID_VPU_INTR 210
+#define CLKID_DEMOD 211
+#define CLKID_SAR_ADC 212
+#define CLKID_GIC 213
+#define CLKID_PWM_AB 214
+#define CLKID_PWM_CD 215
+#define CLKID_PWM_EF 216
+#define CLKID_PWM_GH 217
+#define CLKID_PWM_IJ 218
+#define CLKID_HDCP22_ESMCLK_SEL 219
+#define CLKID_HDCP22_ESMCLK_DIV 220
+#define CLKID_HDCP22_ESMCLK 221
+#define CLKID_HDCP22_SKPCLK_SEL 222
+#define CLKID_HDCP22_SKPCLK_DIV 223
+#define CLKID_HDCP22_SKPCLK 224
+
+#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_S4_PERIPHERALS_CLKC_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-pll-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-pll-clkc.h
new file mode 100644
index 000000000000..af9f110f8b62
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/amlogic,s4-pll-clkc.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2022-2023 Amlogic, Inc. All rights reserved.
+ * Author: Yu Tu <yu.tu@amlogic.com>
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H
+#define _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H
+
+#define CLKID_FIXED_PLL_DCO 0
+#define CLKID_FIXED_PLL 1
+#define CLKID_FCLK_DIV2_DIV 2
+#define CLKID_FCLK_DIV2 3
+#define CLKID_FCLK_DIV3_DIV 4
+#define CLKID_FCLK_DIV3 5
+#define CLKID_FCLK_DIV4_DIV 6
+#define CLKID_FCLK_DIV4 7
+#define CLKID_FCLK_DIV5_DIV 8
+#define CLKID_FCLK_DIV5 9
+#define CLKID_FCLK_DIV7_DIV 10
+#define CLKID_FCLK_DIV7 11
+#define CLKID_FCLK_DIV2P5_DIV 12
+#define CLKID_FCLK_DIV2P5 13
+#define CLKID_GP0_PLL_DCO 14
+#define CLKID_GP0_PLL 15
+#define CLKID_HIFI_PLL_DCO 16
+#define CLKID_HIFI_PLL 17
+#define CLKID_HDMI_PLL_DCO 18
+#define CLKID_HDMI_PLL_OD 19
+#define CLKID_HDMI_PLL 20
+#define CLKID_MPLL_50M_DIV 21
+#define CLKID_MPLL_50M 22
+#define CLKID_MPLL_PREDIV 23
+#define CLKID_MPLL0_DIV 24
+#define CLKID_MPLL0 25
+#define CLKID_MPLL1_DIV 26
+#define CLKID_MPLL1 27
+#define CLKID_MPLL2_DIV 28
+#define CLKID_MPLL2 29
+#define CLKID_MPLL3_DIV 30
+#define CLKID_MPLL3 31
+
+#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/ast2600-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/ast2600-clock.h
index e149eee61588..712782177c90 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/ast2600-clock.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/ast2600-clock.h
@@ -90,7 +90,19 @@
/* Only list resets here that are not part of a clock gate + reset pair */
#define ASPEED_RESET_ADC 55
#define ASPEED_RESET_JTAG_MASTER2 54
+
+#define ASPEED_RESET_MAC4 53
+#define ASPEED_RESET_MAC3 52
+
+#define ASPEED_RESET_I3C5 45
+#define ASPEED_RESET_I3C4 44
+#define ASPEED_RESET_I3C3 43
+#define ASPEED_RESET_I3C2 42
+#define ASPEED_RESET_I3C1 41
+#define ASPEED_RESET_I3C0 40
+#define ASPEED_RESET_I3C 39
#define ASPEED_RESET_I3C_DMA 39
+
#define ASPEED_RESET_PWM 37
#define ASPEED_RESET_PECI 36
#define ASPEED_RESET_MII 35
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/axg-audio-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/axg-audio-clkc.h
index f561f5c5ef8f..08c82c22fa5f 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/axg-audio-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/axg-audio-clkc.h
@@ -37,6 +37,26 @@
#define AUD_CLKID_SPDIFIN_CLK 56
#define AUD_CLKID_PDM_DCLK 57
#define AUD_CLKID_PDM_SYSCLK 58
+#define AUD_CLKID_MST_A_MCLK_SEL 59
+#define AUD_CLKID_MST_B_MCLK_SEL 60
+#define AUD_CLKID_MST_C_MCLK_SEL 61
+#define AUD_CLKID_MST_D_MCLK_SEL 62
+#define AUD_CLKID_MST_E_MCLK_SEL 63
+#define AUD_CLKID_MST_F_MCLK_SEL 64
+#define AUD_CLKID_MST_A_MCLK_DIV 65
+#define AUD_CLKID_MST_B_MCLK_DIV 66
+#define AUD_CLKID_MST_C_MCLK_DIV 67
+#define AUD_CLKID_MST_D_MCLK_DIV 68
+#define AUD_CLKID_MST_E_MCLK_DIV 69
+#define AUD_CLKID_MST_F_MCLK_DIV 70
+#define AUD_CLKID_SPDIFOUT_CLK_SEL 71
+#define AUD_CLKID_SPDIFOUT_CLK_DIV 72
+#define AUD_CLKID_SPDIFIN_CLK_SEL 73
+#define AUD_CLKID_SPDIFIN_CLK_DIV 74
+#define AUD_CLKID_PDM_DCLK_SEL 75
+#define AUD_CLKID_PDM_DCLK_DIV 76
+#define AUD_CLKID_PDM_SYSCLK_SEL 77
+#define AUD_CLKID_PDM_SYSCLK_DIV 78
#define AUD_CLKID_MST_A_SCLK 79
#define AUD_CLKID_MST_B_SCLK 80
#define AUD_CLKID_MST_C_SCLK 81
@@ -49,6 +69,30 @@
#define AUD_CLKID_MST_D_LRCLK 89
#define AUD_CLKID_MST_E_LRCLK 90
#define AUD_CLKID_MST_F_LRCLK 91
+#define AUD_CLKID_MST_A_SCLK_PRE_EN 92
+#define AUD_CLKID_MST_B_SCLK_PRE_EN 93
+#define AUD_CLKID_MST_C_SCLK_PRE_EN 94
+#define AUD_CLKID_MST_D_SCLK_PRE_EN 95
+#define AUD_CLKID_MST_E_SCLK_PRE_EN 96
+#define AUD_CLKID_MST_F_SCLK_PRE_EN 97
+#define AUD_CLKID_MST_A_SCLK_DIV 98
+#define AUD_CLKID_MST_B_SCLK_DIV 99
+#define AUD_CLKID_MST_C_SCLK_DIV 100
+#define AUD_CLKID_MST_D_SCLK_DIV 101
+#define AUD_CLKID_MST_E_SCLK_DIV 102
+#define AUD_CLKID_MST_F_SCLK_DIV 103
+#define AUD_CLKID_MST_A_SCLK_POST_EN 104
+#define AUD_CLKID_MST_B_SCLK_POST_EN 105
+#define AUD_CLKID_MST_C_SCLK_POST_EN 106
+#define AUD_CLKID_MST_D_SCLK_POST_EN 107
+#define AUD_CLKID_MST_E_SCLK_POST_EN 108
+#define AUD_CLKID_MST_F_SCLK_POST_EN 109
+#define AUD_CLKID_MST_A_LRCLK_DIV 110
+#define AUD_CLKID_MST_B_LRCLK_DIV 111
+#define AUD_CLKID_MST_C_LRCLK_DIV 112
+#define AUD_CLKID_MST_D_LRCLK_DIV 113
+#define AUD_CLKID_MST_E_LRCLK_DIV 114
+#define AUD_CLKID_MST_F_LRCLK_DIV 115
#define AUD_CLKID_TDMIN_A_SCLK_SEL 116
#define AUD_CLKID_TDMIN_B_SCLK_SEL 117
#define AUD_CLKID_TDMIN_C_SCLK_SEL 118
@@ -70,8 +114,24 @@
#define AUD_CLKID_TDMOUT_A_LRCLK 134
#define AUD_CLKID_TDMOUT_B_LRCLK 135
#define AUD_CLKID_TDMOUT_C_LRCLK 136
+#define AUD_CLKID_TDMIN_A_SCLK_PRE_EN 137
+#define AUD_CLKID_TDMIN_B_SCLK_PRE_EN 138
+#define AUD_CLKID_TDMIN_C_SCLK_PRE_EN 139
+#define AUD_CLKID_TDMIN_LB_SCLK_PRE_EN 140
+#define AUD_CLKID_TDMOUT_A_SCLK_PRE_EN 141
+#define AUD_CLKID_TDMOUT_B_SCLK_PRE_EN 142
+#define AUD_CLKID_TDMOUT_C_SCLK_PRE_EN 143
+#define AUD_CLKID_TDMIN_A_SCLK_POST_EN 144
+#define AUD_CLKID_TDMIN_B_SCLK_POST_EN 145
+#define AUD_CLKID_TDMIN_C_SCLK_POST_EN 146
+#define AUD_CLKID_TDMIN_LB_SCLK_POST_EN 147
+#define AUD_CLKID_TDMOUT_A_SCLK_POST_EN 148
+#define AUD_CLKID_TDMOUT_B_SCLK_POST_EN 149
+#define AUD_CLKID_TDMOUT_C_SCLK_POST_EN 150
#define AUD_CLKID_SPDIFOUT_B 151
#define AUD_CLKID_SPDIFOUT_B_CLK 152
+#define AUD_CLKID_SPDIFOUT_B_CLK_SEL 153
+#define AUD_CLKID_SPDIFOUT_B_CLK_DIV 154
#define AUD_CLKID_TDM_MCLK_PAD0 155
#define AUD_CLKID_TDM_MCLK_PAD1 156
#define AUD_CLKID_TDM_LRCLK_PAD0 157
@@ -90,5 +150,10 @@
#define AUD_CLKID_FRDDR_D 170
#define AUD_CLKID_TODDR_D 171
#define AUD_CLKID_LOOPBACK_B 172
+#define AUD_CLKID_CLK81_EN 173
+#define AUD_CLKID_SYSCLK_A_DIV 174
+#define AUD_CLKID_SYSCLK_B_DIV 175
+#define AUD_CLKID_SYSCLK_A_EN 176
+#define AUD_CLKID_SYSCLK_B_EN 177
#endif /* __AXG_AUDIO_CLKC_BINDINGS_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/axg-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/axg-clkc.h
index 93752ea107e3..442162822b88 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/axg-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/axg-clkc.h
@@ -16,6 +16,8 @@
#define CLKID_FCLK_DIV5 5
#define CLKID_FCLK_DIV7 6
#define CLKID_GP0_PLL 7
+#define CLKID_MPEG_SEL 8
+#define CLKID_MPEG_DIV 9
#define CLKID_CLK81 10
#define CLKID_MPLL0 11
#define CLKID_MPLL1 12
@@ -67,23 +69,66 @@
#define CLKID_AO_I2C 58
#define CLKID_SD_EMMC_B_CLK0 59
#define CLKID_SD_EMMC_C_CLK0 60
+#define CLKID_SD_EMMC_B_CLK0_SEL 61
+#define CLKID_SD_EMMC_B_CLK0_DIV 62
+#define CLKID_SD_EMMC_C_CLK0_SEL 63
+#define CLKID_SD_EMMC_C_CLK0_DIV 64
+#define CLKID_MPLL0_DIV 65
+#define CLKID_MPLL1_DIV 66
+#define CLKID_MPLL2_DIV 67
+#define CLKID_MPLL3_DIV 68
#define CLKID_HIFI_PLL 69
+#define CLKID_MPLL_PREDIV 70
+#define CLKID_FCLK_DIV2_DIV 71
+#define CLKID_FCLK_DIV3_DIV 72
+#define CLKID_FCLK_DIV4_DIV 73
+#define CLKID_FCLK_DIV5_DIV 74
+#define CLKID_FCLK_DIV7_DIV 75
+#define CLKID_PCIE_PLL 76
+#define CLKID_PCIE_MUX 77
+#define CLKID_PCIE_REF 78
#define CLKID_PCIE_CML_EN0 79
#define CLKID_PCIE_CML_EN1 80
+#define CLKID_GEN_CLK_SEL 82
+#define CLKID_GEN_CLK_DIV 83
#define CLKID_GEN_CLK 84
+#define CLKID_SYS_PLL_DCO 85
+#define CLKID_FIXED_PLL_DCO 86
+#define CLKID_GP0_PLL_DCO 87
+#define CLKID_HIFI_PLL_DCO 88
+#define CLKID_PCIE_PLL_DCO 89
+#define CLKID_PCIE_PLL_OD 90
+#define CLKID_VPU_0_DIV 91
#define CLKID_VPU_0_SEL 92
#define CLKID_VPU_0 93
+#define CLKID_VPU_1_DIV 94
#define CLKID_VPU_1_SEL 95
#define CLKID_VPU_1 96
#define CLKID_VPU 97
+#define CLKID_VAPB_0_DIV 98
#define CLKID_VAPB_0_SEL 99
#define CLKID_VAPB_0 100
+#define CLKID_VAPB_1_DIV 101
#define CLKID_VAPB_1_SEL 102
#define CLKID_VAPB_1 103
#define CLKID_VAPB_SEL 104
#define CLKID_VAPB 105
#define CLKID_VCLK 106
#define CLKID_VCLK2 107
+#define CLKID_VCLK_SEL 108
+#define CLKID_VCLK2_SEL 109
+#define CLKID_VCLK_INPUT 110
+#define CLKID_VCLK2_INPUT 111
+#define CLKID_VCLK_DIV 112
+#define CLKID_VCLK2_DIV 113
+#define CLKID_VCLK_DIV2_EN 114
+#define CLKID_VCLK_DIV4_EN 115
+#define CLKID_VCLK_DIV6_EN 116
+#define CLKID_VCLK_DIV12_EN 117
+#define CLKID_VCLK2_DIV2_EN 118
+#define CLKID_VCLK2_DIV4_EN 119
+#define CLKID_VCLK2_DIV6_EN 120
+#define CLKID_VCLK2_DIV12_EN 121
#define CLKID_VCLK_DIV1 122
#define CLKID_VCLK_DIV2 123
#define CLKID_VCLK_DIV4 124
@@ -94,7 +139,10 @@
#define CLKID_VCLK2_DIV4 129
#define CLKID_VCLK2_DIV6 130
#define CLKID_VCLK2_DIV12 131
+#define CLKID_CTS_ENCL_SEL 132
#define CLKID_CTS_ENCL 133
+#define CLKID_VDIN_MEAS_SEL 134
+#define CLKID_VDIN_MEAS_DIV 135
#define CLKID_VDIN_MEAS 136
#endif /* __AXG_CLKC_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos3250.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos3250.h
index fe8214017b46..cc7268151843 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos3250.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos3250.h
@@ -257,12 +257,6 @@
#define CLK_SCLK_MMC2 249
/*
- * Total number of clocks of main CMU.
- * NOTE: Must be equal to last clock ID increased by one.
- */
-#define CLK_NR_CLKS 250
-
-/*
* CMU DMC
*/
@@ -284,12 +278,6 @@
#define CLK_DIV_DMCD 20
/*
- * Total number of clocks of main CMU.
- * NOTE: Must be equal to last clock ID increased by one.
- */
-#define NR_CLKS_DMC 21
-
-/*
* CMU ISP
*/
@@ -344,10 +332,4 @@
#define CLK_ASYNCAXIM 46
#define CLK_SCLK_MPWM_ISP 47
-/*
- * Total number of clocks of CMU_ISP.
- * NOTE: Must be equal to last clock ID increased by one.
- */
-#define NR_CLKS_ISP 48
-
#endif /* _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos4.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos4.h
index acbfbab875ec..4ebff79ed9e2 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos4.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos4.h
@@ -239,9 +239,6 @@
#define CLK_DIV_GDR 460
#define CLK_DIV_CORE2 461
-/* must be greater than maximal clock id */
-#define CLK_NR_CLKS 462
-
/* Exynos4x12 ISP clocks */
#define CLK_ISP_FIMC_ISP 1
#define CLK_ISP_FIMC_DRC 2
@@ -275,6 +272,4 @@
#define CLK_ISP_DIV_MCUISP0 29
#define CLK_ISP_DIV_MCUISP1 30
-#define CLK_NR_ISP_CLKS 31
-
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_4_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5250.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5250.h
index 4680da7357d3..2337c028bbe1 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5250.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5250.h
@@ -177,7 +177,4 @@
#define CLK_MOUT_MPLL 1029
#define CLK_MOUT_VPLLSRC 1030
-/* must be greater than maximal clock id */
-#define CLK_NR_CLKS 1031
-
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_5250_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5260-clk.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5260-clk.h
index 98a58cbd81b2..dfde40ea40f0 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5260-clk.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5260-clk.h
@@ -137,8 +137,6 @@
#define PHYCLK_USBHOST20_PHY_CLK48MOHCI 122
#define PHYCLK_USBDRD30_UDRD30_PIPE_PCLK 123
#define PHYCLK_USBDRD30_UDRD30_PHYCLOCK 124
-#define TOP_NR_CLK 125
-
/* List Of Clocks For CMU_EGL */
@@ -153,8 +151,6 @@
#define EGL_DOUT_ACLK_EGL 9
#define EGL_DOUT_EGL2 10
#define EGL_DOUT_EGL1 11
-#define EGL_NR_CLK 12
-
/* List Of Clocks For CMU_KFC */
@@ -168,8 +164,6 @@
#define KFC_DOUT_KFC_ATCLK 8
#define KFC_DOUT_KFC2 9
#define KFC_DOUT_KFC1 10
-#define KFC_NR_CLK 11
-
/* List Of Clocks For CMU_MIF */
@@ -200,8 +194,6 @@
#define MIF_CLK_INTMEM 25
#define MIF_SCLK_LPDDR3PHY_WRAP_U1 26
#define MIF_SCLK_LPDDR3PHY_WRAP_U0 27
-#define MIF_NR_CLK 28
-
/* List Of Clocks For CMU_G3D */
@@ -211,8 +203,6 @@
#define G3D_DOUT_ACLK_G3D 4
#define G3D_CLK_G3D_HPM 5
#define G3D_CLK_G3D 6
-#define G3D_NR_CLK 7
-
/* List Of Clocks For CMU_AUD */
@@ -231,8 +221,6 @@
#define AUD_SCLK_AUD_UART 13
#define AUD_SCLK_PCM 14
#define AUD_SCLK_I2S 15
-#define AUD_NR_CLK 16
-
/* List Of Clocks For CMU_MFC */
@@ -241,8 +229,6 @@
#define MFC_CLK_MFC 3
#define MFC_CLK_SMMU2_MFCM1 4
#define MFC_CLK_SMMU2_MFCM0 5
-#define MFC_NR_CLK 6
-
/* List Of Clocks For CMU_GSCL */
@@ -272,8 +258,6 @@
#define GSCL_CLK_SMMU3_MSCL1 24
#define GSCL_SCLK_CSIS1_WRAP 25
#define GSCL_SCLK_CSIS0_WRAP 26
-#define GSCL_NR_CLK 27
-
/* List Of Clocks For CMU_FSYS */
@@ -295,8 +279,6 @@
#define FSYS_CLK_SMMU_RTIC 16
#define FSYS_PHYCLK_USBDRD30 17
#define FSYS_PHYCLK_USBHOST20 18
-#define FSYS_NR_CLK 19
-
/* List Of Clocks For CMU_PERI */
@@ -366,8 +348,6 @@
#define PERI_SCLK_SPDIF 64
#define PERI_SCLK_I2S 65
#define PERI_SCLK_PCM1 66
-#define PERI_NR_CLK 67
-
/* List Of Clocks For CMU_DISP */
@@ -406,8 +386,6 @@
#define DISP_CLK_DP 33
#define DISP_SCLK_PIXEL 34
#define DISP_MOUT_HDMI_PHY_PIXEL_USER 35
-#define DISP_NR_CLK 36
-
/* List Of Clocks For CMU_G2D */
@@ -423,8 +401,6 @@
#define G2D_CLK_SMMU_SSS 10
#define G2D_CLK_SMMU_MDMA 11
#define G2D_CLK_SMMU3_G2D 12
-#define G2D_NR_CLK 13
-
/* List Of Clocks For CMU_ISP */
@@ -461,6 +437,5 @@
#define ISP_SCLK_SPI0_EXT 31
#define ISP_SCLK_SPI1_EXT 32
#define ISP_SCLK_UART_EXT 33
-#define ISP_NR_CLK 34
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5410.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5410.h
index 86c2ad56c5ef..7a1a93f8df6c 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5410.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5410.h
@@ -61,6 +61,4 @@
#define CLK_USBD301 367
#define CLK_SSS 471
-#define CLK_NR_CLKS 512
-
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_5410_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5420.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5420.h
index 9fffc6ceaadd..73e82527a9e9 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5420.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5420.h
@@ -271,7 +271,4 @@
#define CLK_DOUT_PCLK_DREX0 798
#define CLK_DOUT_PCLK_DREX1 799
-/* must be greater than maximal clock id */
-#define CLK_NR_CLKS 800
-
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_5420_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5433.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5433.h
index 25ffa53573a5..d12c1a963fa1 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos5433.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos5433.h
@@ -188,8 +188,6 @@
#define CLK_SCLK_ISP_SPI0_CAM1 252
#define CLK_SCLK_HDMI_SPDIF_DISP 253
-#define TOP_NR_CLK 254
-
/* CMU_CPIF */
#define CLK_FOUT_MPHY_PLL 1
@@ -200,8 +198,6 @@
#define CLK_SCLK_MPHY_PLL 11
#define CLK_SCLK_UFS_MPHY 11
-#define CPIF_NR_CLK 12
-
/* CMU_MIF */
#define CLK_FOUT_MEM0_PLL 1
#define CLK_FOUT_MEM1_PLL 2
@@ -396,8 +392,6 @@
#define CLK_SCLK_BUS_PLL_APOLLO 199
#define CLK_SCLK_BUS_PLL_ATLAS 200
-#define MIF_NR_CLK 201
-
/* CMU_PERIC */
#define CLK_PCLK_SPI2 1
#define CLK_PCLK_SPI1 2
@@ -468,8 +462,6 @@
#define CLK_DIV_SCLK_SCI 70
#define CLK_DIV_SCLK_SC_IN 71
-#define PERIC_NR_CLK 72
-
/* CMU_PERIS */
#define CLK_PCLK_HPM_APBIF 1
#define CLK_PCLK_TMU1_APBIF 2
@@ -513,8 +505,6 @@
#define CLK_SCLK_ANTIRBK_CNT 40
#define CLK_SCLK_OTP_CON 41
-#define PERIS_NR_CLK 42
-
/* CMU_FSYS */
#define CLK_MOUT_ACLK_FSYS_200_USER 1
#define CLK_MOUT_SCLK_MMC2_USER 2
@@ -621,8 +611,6 @@
#define CLK_SCLK_USBDRD30 114
#define CLK_PCIE 115
-#define FSYS_NR_CLK 116
-
/* CMU_G2D */
#define CLK_MUX_ACLK_G2D_266_USER 1
#define CLK_MUX_ACLK_G2D_400_USER 2
@@ -653,8 +641,6 @@
#define CLK_PCLK_G2D 25
#define CLK_PCLK_SMMU_G2D 26
-#define G2D_NR_CLK 27
-
/* CMU_DISP */
#define CLK_FOUT_DISP_PLL 1
@@ -771,8 +757,6 @@
#define CLK_PHYCLK_MIPIDPHY0_BITCLKDIV8_PHY 114
#define CLK_PHYCLK_MIPIDPHY0_RXCLKESC0_PHY 115
-#define DISP_NR_CLK 116
-
/* CMU_AUD */
#define CLK_MOUT_AUD_PLL_USER 1
#define CLK_MOUT_SCLK_AUD_PCM 2
@@ -824,8 +808,6 @@
#define CLK_SCLK_I2S_BCLK 46
#define CLK_SCLK_AUD_I2S 47
-#define AUD_NR_CLK 48
-
/* CMU_BUS{0|1|2} */
#define CLK_DIV_PCLK_BUS_133 1
@@ -840,8 +822,6 @@
#define CLK_ACLK_BUS2BEND_400 9 /* Only CMU_BUS2 */
#define CLK_ACLK_BUS2RTND_400 10 /* Only CMU_BUS2 */
-#define BUSx_NR_CLK 11
-
/* CMU_G3D */
#define CLK_FOUT_G3D_PLL 1
@@ -865,8 +845,6 @@
#define CLK_PCLK_SYSREG_G3D 18
#define CLK_SCLK_HPM_G3D 19
-#define G3D_NR_CLK 20
-
/* CMU_GSCL */
#define CLK_MOUT_ACLK_GSCL_111_USER 1
#define CLK_MOUT_ACLK_GSCL_333_USER 2
@@ -898,8 +876,6 @@
#define CLK_PCLK_SMMU_GSCL1 27
#define CLK_PCLK_SMMU_GSCL2 28
-#define GSCL_NR_CLK 29
-
/* CMU_APOLLO */
#define CLK_FOUT_APOLLO_PLL 1
@@ -935,8 +911,6 @@
#define CLK_SCLK_HPM_APOLLO 29
#define CLK_SCLK_APOLLO 30
-#define APOLLO_NR_CLK 31
-
/* CMU_ATLAS */
#define CLK_FOUT_ATLAS_PLL 1
@@ -981,8 +955,6 @@
#define CLK_ATCLK 38
#define CLK_SCLK_ATLAS 39
-#define ATLAS_NR_CLK 40
-
/* CMU_MSCL */
#define CLK_MOUT_SCLK_JPEG_USER 1
#define CLK_MOUT_ACLK_MSCL_400_USER 2
@@ -1016,8 +988,6 @@
#define CLK_PCLK_SMMU_JPEG 28
#define CLK_SCLK_JPEG 29
-#define MSCL_NR_CLK 30
-
/* CMU_MFC */
#define CLK_MOUT_ACLK_MFC_400_USER 1
@@ -1040,8 +1010,6 @@
#define CLK_PCLK_SMMU_MFC_1 17
#define CLK_PCLK_SMMU_MFC_0 18
-#define MFC_NR_CLK 19
-
/* CMU_HEVC */
#define CLK_MOUT_ACLK_HEVC_400_USER 1
@@ -1064,8 +1032,6 @@
#define CLK_PCLK_SMMU_HEVC_1 17
#define CLK_PCLK_SMMU_HEVC_0 18
-#define HEVC_NR_CLK 19
-
/* CMU_ISP */
#define CLK_MOUT_ACLK_ISP_DIS_400_USER 1
#define CLK_MOUT_ACLK_ISP_400_USER 2
@@ -1147,8 +1113,6 @@
#define CLK_SCLK_PIXELASYNCS_ISPC 76
#define CLK_SCLK_PIXELASYNCM_ISPC 77
-#define ISP_NR_CLK 78
-
/* CMU_CAM0 */
#define CLK_PHYCLK_RXBYTEECLKHS0_S4_PHY 1
#define CLK_PHYCLK_RXBYTEECLKHS0_S2A_PHY 2
@@ -1285,8 +1249,6 @@
#define CLK_SCLK_PIXELASYNCM_LITE_C_INIT 132
#define CLK_SCLK_PIXELASYNCS_LITE_C_INIT 133
-#define CAM0_NR_CLK 134
-
/* CMU_CAM1 */
#define CLK_PHYCLK_RXBYTEECLKHS0_S2B 1
@@ -1404,12 +1366,8 @@
#define CLK_ATCLK_ISP 111
#define CLK_SCLK_ISP_CA5 112
-#define CAM1_NR_CLK 113
-
/* CMU_IMEM */
#define CLK_ACLK_SLIMSSS 2
#define CLK_PCLK_SLIMSSS 35
-#define IMEM_NR_CLK 36
-
#endif /* _DT_BINDINGS_CLOCK_EXYNOS5433_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos7885.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos7885.h
index 8256e7430b63..255e3aa94323 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos7885.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos7885.h
@@ -69,7 +69,6 @@
#define CLK_GOUT_FSYS_MMC_EMBD 58
#define CLK_GOUT_FSYS_MMC_SDIO 59
#define CLK_GOUT_FSYS_USB30DRD 60
-#define TOP_NR_CLK 61
/* CMU_CORE */
#define CLK_MOUT_CORE_BUS_USER 1
@@ -86,7 +85,6 @@
#define CLK_GOUT_TREX_P_CORE_CCLK_P_CORE 12
#define CLK_GOUT_TREX_P_CORE_PCLK 13
#define CLK_GOUT_TREX_P_CORE_PCLK_P_CORE 14
-#define CORE_NR_CLK 15
/* CMU_PERI */
#define CLK_MOUT_PERI_BUS_USER 1
@@ -132,7 +130,6 @@
#define CLK_GOUT_SYSREG_PERI_PCLK 41
#define CLK_GOUT_WDT0_PCLK 42
#define CLK_GOUT_WDT1_PCLK 43
-#define PERI_NR_CLK 44
/* CMU_FSYS */
#define CLK_MOUT_FSYS_BUS_USER 1
@@ -146,6 +143,5 @@
#define CLK_GOUT_MMC_EMBD_SDCLKIN 8
#define CLK_GOUT_MMC_SDIO_ACLK 9
#define CLK_GOUT_MMC_SDIO_SDCLKIN 10
-#define FSYS_NR_CLK 11
#endif /* _DT_BINDINGS_CLOCK_EXYNOS_7885_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/exynos850.h b/sys/contrib/device-tree/include/dt-bindings/clock/exynos850.h
index afacba338c91..3090e09c9a55 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/exynos850.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/exynos850.h
@@ -88,7 +88,6 @@
#define CLK_MOUT_G3D_SWITCH 76
#define CLK_GOUT_G3D_SWITCH 77
#define CLK_DOUT_G3D_SWITCH 78
-#define TOP_NR_CLK 79
/* CMU_APM */
#define CLK_RCO_I3C_PMIC 1
@@ -115,7 +114,6 @@
#define CLK_GOUT_GPIO_ALIVE_PCLK 22
#define CLK_GOUT_PMU_ALIVE_PCLK 23
#define CLK_GOUT_SYSREG_APM_PCLK 24
-#define APM_NR_CLK 25
/* CMU_AUD */
#define CLK_DOUT_AUD_AUDIF 1
@@ -179,7 +177,6 @@
#define IOCLK_AUDIOCDCLK6 59
#define TICK_USB 60
#define CLK_GOUT_AUD_CMU_AUD_PCLK 61
-#define AUD_NR_CLK 62
/* CMU_CMGP */
#define CLK_RCO_CMGP 1
@@ -197,7 +194,6 @@
#define CLK_GOUT_CMGP_USI1_IPCLK 13
#define CLK_GOUT_CMGP_USI1_PCLK 14
#define CLK_GOUT_SYSREG_CMGP_PCLK 15
-#define CMGP_NR_CLK 16
/* CMU_G3D */
#define CLK_FOUT_G3D_PLL 1
@@ -212,7 +208,6 @@
#define CLK_GOUT_G3D_BUSD_CLK 10
#define CLK_GOUT_G3D_BUSP_CLK 11
#define CLK_GOUT_G3D_SYSREG_PCLK 12
-#define G3D_NR_CLK 13
/* CMU_HSI */
#define CLK_MOUT_HSI_BUS_USER 1
@@ -231,7 +226,6 @@
#define CLK_GOUT_HSI_PPMU_ACLK 14
#define CLK_GOUT_HSI_PPMU_PCLK 15
#define CLK_GOUT_HSI_CMU_HSI_PCLK 16
-#define HSI_NR_CLK 17
/* CMU_IS */
#define CLK_MOUT_IS_BUS_USER 1
@@ -257,7 +251,6 @@
#define CLK_GOUT_IS_SYSMMU_IS0_CLK 21
#define CLK_GOUT_IS_SYSMMU_IS1_CLK 22
#define CLK_GOUT_IS_SYSREG_PCLK 23
-#define IS_NR_CLK 24
/* CMU_MFCMSCL */
#define CLK_MOUT_MFCMSCL_MFC_USER 1
@@ -275,7 +268,6 @@
#define CLK_GOUT_MFCMSCL_PPMU_PCLK 13
#define CLK_GOUT_MFCMSCL_SYSMMU_CLK 14
#define CLK_GOUT_MFCMSCL_SYSREG_PCLK 15
-#define MFCMSCL_NR_CLK 16
/* CMU_PERI */
#define CLK_MOUT_PERI_BUS_USER 1
@@ -312,7 +304,6 @@
#define CLK_GOUT_UART_PCLK 32
#define CLK_GOUT_WDT0_PCLK 33
#define CLK_GOUT_WDT1_PCLK 34
-#define PERI_NR_CLK 35
/* CMU_CORE */
#define CLK_MOUT_CORE_BUS_USER 1
@@ -329,7 +320,6 @@
#define CLK_GOUT_SSS_PCLK 12
#define CLK_GOUT_GPIO_CORE_PCLK 13
#define CLK_GOUT_SYSREG_CORE_PCLK 14
-#define CORE_NR_CLK 15
/* CMU_DPU */
#define CLK_MOUT_DPU_USER 1
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/g12a-aoclkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/g12a-aoclkc.h
index e916e49ff288..8fe7712fb12d 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/g12a-aoclkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/g12a-aoclkc.h
@@ -26,10 +26,17 @@
#define CLKID_AO_M4_FCLK 13
#define CLKID_AO_M4_HCLK 14
#define CLKID_AO_CLK81 15
+#define CLKID_AO_SAR_ADC_DIV 17
#define CLKID_AO_SAR_ADC_SEL 16
#define CLKID_AO_SAR_ADC_CLK 18
#define CLKID_AO_CTS_OSCIN 19
+#define CLKID_AO_32K_PRE 20
+#define CLKID_AO_32K_DIV 21
+#define CLKID_AO_32K_SEL 22
#define CLKID_AO_32K 23
+#define CLKID_AO_CEC_PRE 24
+#define CLKID_AO_CEC_DIV 25
+#define CLKID_AO_CEC_SEL 26
#define CLKID_AO_CEC 27
#define CLKID_AO_CTS_RTC_OSCIN 28
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/g12a-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/g12a-clkc.h
index a93b58c5e18e..fd09819da2ec 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/g12a-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/g12a-clkc.h
@@ -16,6 +16,8 @@
#define CLKID_FCLK_DIV5 5
#define CLKID_FCLK_DIV7 6
#define CLKID_GP0_PLL 7
+#define CLKID_MPEG_SEL 8
+#define CLKID_MPEG_DIV 9
#define CLKID_CLK81 10
#define CLKID_MPLL0 11
#define CLKID_MPLL1 12
@@ -69,7 +71,23 @@
#define CLKID_SD_EMMC_A_CLK0 60
#define CLKID_SD_EMMC_B_CLK0 61
#define CLKID_SD_EMMC_C_CLK0 62
+#define CLKID_SD_EMMC_A_CLK0_SEL 63
+#define CLKID_SD_EMMC_A_CLK0_DIV 64
+#define CLKID_SD_EMMC_B_CLK0_SEL 65
+#define CLKID_SD_EMMC_B_CLK0_DIV 66
+#define CLKID_SD_EMMC_C_CLK0_SEL 67
+#define CLKID_SD_EMMC_C_CLK0_DIV 68
+#define CLKID_MPLL0_DIV 69
+#define CLKID_MPLL1_DIV 70
+#define CLKID_MPLL2_DIV 71
+#define CLKID_MPLL3_DIV 72
+#define CLKID_MPLL_PREDIV 73
#define CLKID_HIFI_PLL 74
+#define CLKID_FCLK_DIV2_DIV 75
+#define CLKID_FCLK_DIV3_DIV 76
+#define CLKID_FCLK_DIV4_DIV 77
+#define CLKID_FCLK_DIV5_DIV 78
+#define CLKID_FCLK_DIV7_DIV 79
#define CLKID_VCLK2_VENCI0 80
#define CLKID_VCLK2_VENCI1 81
#define CLKID_VCLK2_VENCP0 82
@@ -90,26 +108,54 @@
#define CLKID_VCLK2_VENCL 97
#define CLKID_VCLK2_OTHER1 98
#define CLKID_FCLK_DIV2P5 99
+#define CLKID_FCLK_DIV2P5_DIV 100
+#define CLKID_FIXED_PLL_DCO 101
+#define CLKID_SYS_PLL_DCO 102
+#define CLKID_GP0_PLL_DCO 103
+#define CLKID_HIFI_PLL_DCO 104
#define CLKID_DMA 105
#define CLKID_EFUSE 106
#define CLKID_ROM_BOOT 107
#define CLKID_RESET_SEC 108
#define CLKID_SEC_AHB_APB3 109
#define CLKID_VPU_0_SEL 110
+#define CLKID_VPU_0_DIV 111
#define CLKID_VPU_0 112
#define CLKID_VPU_1_SEL 113
+#define CLKID_VPU_1_DIV 114
#define CLKID_VPU_1 115
#define CLKID_VPU 116
#define CLKID_VAPB_0_SEL 117
+#define CLKID_VAPB_0_DIV 118
#define CLKID_VAPB_0 119
#define CLKID_VAPB_1_SEL 120
+#define CLKID_VAPB_1_DIV 121
#define CLKID_VAPB_1 122
#define CLKID_VAPB_SEL 123
#define CLKID_VAPB 124
+#define CLKID_HDMI_PLL_DCO 125
+#define CLKID_HDMI_PLL_OD 126
+#define CLKID_HDMI_PLL_OD2 127
#define CLKID_HDMI_PLL 128
#define CLKID_VID_PLL 129
+#define CLKID_VID_PLL_SEL 130
+#define CLKID_VID_PLL_DIV 131
+#define CLKID_VCLK_SEL 132
+#define CLKID_VCLK2_SEL 133
+#define CLKID_VCLK_INPUT 134
+#define CLKID_VCLK2_INPUT 135
+#define CLKID_VCLK_DIV 136
+#define CLKID_VCLK2_DIV 137
#define CLKID_VCLK 138
#define CLKID_VCLK2 139
+#define CLKID_VCLK_DIV2_EN 140
+#define CLKID_VCLK_DIV4_EN 141
+#define CLKID_VCLK_DIV6_EN 142
+#define CLKID_VCLK_DIV12_EN 143
+#define CLKID_VCLK2_DIV2_EN 144
+#define CLKID_VCLK2_DIV4_EN 145
+#define CLKID_VCLK2_DIV6_EN 146
+#define CLKID_VCLK2_DIV12_EN 147
#define CLKID_VCLK_DIV1 148
#define CLKID_VCLK_DIV2 149
#define CLKID_VCLK_DIV4 150
@@ -120,34 +166,126 @@
#define CLKID_VCLK2_DIV4 155
#define CLKID_VCLK2_DIV6 156
#define CLKID_VCLK2_DIV12 157
+#define CLKID_CTS_ENCI_SEL 158
+#define CLKID_CTS_ENCP_SEL 159
+#define CLKID_CTS_VDAC_SEL 160
+#define CLKID_HDMI_TX_SEL 161
#define CLKID_CTS_ENCI 162
#define CLKID_CTS_ENCP 163
#define CLKID_CTS_VDAC 164
#define CLKID_HDMI_TX 165
+#define CLKID_HDMI_SEL 166
+#define CLKID_HDMI_DIV 167
#define CLKID_HDMI 168
#define CLKID_MALI_0_SEL 169
+#define CLKID_MALI_0_DIV 170
#define CLKID_MALI_0 171
#define CLKID_MALI_1_SEL 172
+#define CLKID_MALI_1_DIV 173
#define CLKID_MALI_1 174
#define CLKID_MALI 175
+#define CLKID_MPLL_50M_DIV 176
#define CLKID_MPLL_50M 177
+#define CLKID_SYS_PLL_DIV16_EN 178
+#define CLKID_SYS_PLL_DIV16 179
+#define CLKID_CPU_CLK_DYN0_SEL 180
+#define CLKID_CPU_CLK_DYN0_DIV 181
+#define CLKID_CPU_CLK_DYN0 182
+#define CLKID_CPU_CLK_DYN1_SEL 183
+#define CLKID_CPU_CLK_DYN1_DIV 184
+#define CLKID_CPU_CLK_DYN1 185
+#define CLKID_CPU_CLK_DYN 186
#define CLKID_CPU_CLK 187
+#define CLKID_CPU_CLK_DIV16_EN 188
+#define CLKID_CPU_CLK_DIV16 189
+#define CLKID_CPU_CLK_APB_DIV 190
+#define CLKID_CPU_CLK_APB 191
+#define CLKID_CPU_CLK_ATB_DIV 192
+#define CLKID_CPU_CLK_ATB 193
+#define CLKID_CPU_CLK_AXI_DIV 194
+#define CLKID_CPU_CLK_AXI 195
+#define CLKID_CPU_CLK_TRACE_DIV 196
+#define CLKID_CPU_CLK_TRACE 197
+#define CLKID_PCIE_PLL_DCO 198
+#define CLKID_PCIE_PLL_DCO_DIV2 199
+#define CLKID_PCIE_PLL_OD 200
#define CLKID_PCIE_PLL 201
+#define CLKID_VDEC_1_SEL 202
+#define CLKID_VDEC_1_DIV 203
#define CLKID_VDEC_1 204
+#define CLKID_VDEC_HEVC_SEL 205
+#define CLKID_VDEC_HEVC_DIV 206
#define CLKID_VDEC_HEVC 207
+#define CLKID_VDEC_HEVCF_SEL 208
+#define CLKID_VDEC_HEVCF_DIV 209
#define CLKID_VDEC_HEVCF 210
+#define CLKID_TS_DIV 211
#define CLKID_TS 212
+#define CLKID_SYS1_PLL_DCO 213
+#define CLKID_SYS1_PLL 214
+#define CLKID_SYS1_PLL_DIV16_EN 215
+#define CLKID_SYS1_PLL_DIV16 216
+#define CLKID_CPUB_CLK_DYN0_SEL 217
+#define CLKID_CPUB_CLK_DYN0_DIV 218
+#define CLKID_CPUB_CLK_DYN0 219
+#define CLKID_CPUB_CLK_DYN1_SEL 220
+#define CLKID_CPUB_CLK_DYN1_DIV 221
+#define CLKID_CPUB_CLK_DYN1 222
+#define CLKID_CPUB_CLK_DYN 223
#define CLKID_CPUB_CLK 224
+#define CLKID_CPUB_CLK_DIV16_EN 225
+#define CLKID_CPUB_CLK_DIV16 226
+#define CLKID_CPUB_CLK_DIV2 227
+#define CLKID_CPUB_CLK_DIV3 228
+#define CLKID_CPUB_CLK_DIV4 229
+#define CLKID_CPUB_CLK_DIV5 230
+#define CLKID_CPUB_CLK_DIV6 231
+#define CLKID_CPUB_CLK_DIV7 232
+#define CLKID_CPUB_CLK_DIV8 233
+#define CLKID_CPUB_CLK_APB_SEL 234
+#define CLKID_CPUB_CLK_APB 235
+#define CLKID_CPUB_CLK_ATB_SEL 236
+#define CLKID_CPUB_CLK_ATB 237
+#define CLKID_CPUB_CLK_AXI_SEL 238
+#define CLKID_CPUB_CLK_AXI 239
+#define CLKID_CPUB_CLK_TRACE_SEL 240
+#define CLKID_CPUB_CLK_TRACE 241
+#define CLKID_GP1_PLL_DCO 242
#define CLKID_GP1_PLL 243
+#define CLKID_DSU_CLK_DYN0_SEL 244
+#define CLKID_DSU_CLK_DYN0_DIV 245
+#define CLKID_DSU_CLK_DYN0 246
+#define CLKID_DSU_CLK_DYN1_SEL 247
+#define CLKID_DSU_CLK_DYN1_DIV 248
+#define CLKID_DSU_CLK_DYN1 249
+#define CLKID_DSU_CLK_DYN 250
+#define CLKID_DSU_CLK_FINAL 251
#define CLKID_DSU_CLK 252
#define CLKID_CPU1_CLK 253
#define CLKID_CPU2_CLK 254
#define CLKID_CPU3_CLK 255
+#define CLKID_SPICC0_SCLK_SEL 256
+#define CLKID_SPICC0_SCLK_DIV 257
#define CLKID_SPICC0_SCLK 258
+#define CLKID_SPICC1_SCLK_SEL 259
+#define CLKID_SPICC1_SCLK_DIV 260
#define CLKID_SPICC1_SCLK 261
+#define CLKID_NNA_AXI_CLK_SEL 262
+#define CLKID_NNA_AXI_CLK_DIV 263
#define CLKID_NNA_AXI_CLK 264
+#define CLKID_NNA_CORE_CLK_SEL 265
+#define CLKID_NNA_CORE_CLK_DIV 266
#define CLKID_NNA_CORE_CLK 267
+#define CLKID_MIPI_DSI_PXCLK_DIV 268
#define CLKID_MIPI_DSI_PXCLK_SEL 269
#define CLKID_MIPI_DSI_PXCLK 270
+#define CLKID_CTS_ENCL 271
+#define CLKID_CTS_ENCL_SEL 272
+#define CLKID_MIPI_ISP_DIV 273
+#define CLKID_MIPI_ISP_SEL 274
+#define CLKID_MIPI_ISP 275
+#define CLKID_MIPI_ISP_GATE 276
+#define CLKID_MIPI_ISP_CSI_PHY0 277
+#define CLKID_MIPI_ISP_CSI_PHY1 278
#endif /* __G12A_CLKC_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/google,gs101.h b/sys/contrib/device-tree/include/dt-bindings/clock/google,gs101.h
new file mode 100644
index 000000000000..21adec22387c
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/google,gs101.h
@@ -0,0 +1,392 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2023 Linaro Ltd.
+ * Author: Peter Griffin <peter.griffin@linaro.org>
+ *
+ * Device Tree binding constants for Google gs101 clock controller.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_GOOGLE_GS101_H
+#define _DT_BINDINGS_CLOCK_GOOGLE_GS101_H
+
+/* CMU_TOP PLL */
+#define CLK_FOUT_SHARED0_PLL 1
+#define CLK_FOUT_SHARED1_PLL 2
+#define CLK_FOUT_SHARED2_PLL 3
+#define CLK_FOUT_SHARED3_PLL 4
+#define CLK_FOUT_SPARE_PLL 5
+
+/* CMU_TOP MUX */
+#define CLK_MOUT_PLL_SHARED0 6
+#define CLK_MOUT_PLL_SHARED1 7
+#define CLK_MOUT_PLL_SHARED2 8
+#define CLK_MOUT_PLL_SHARED3 9
+#define CLK_MOUT_PLL_SPARE 10
+#define CLK_MOUT_CMU_BO_BUS 11
+#define CLK_MOUT_CMU_BUS0_BUS 12
+#define CLK_MOUT_CMU_BUS1_BUS 13
+#define CLK_MOUT_CMU_BUS2_BUS 14
+#define CLK_MOUT_CMU_CIS_CLK0 15
+#define CLK_MOUT_CMU_CIS_CLK1 16
+#define CLK_MOUT_CMU_CIS_CLK2 17
+#define CLK_MOUT_CMU_CIS_CLK3 18
+#define CLK_MOUT_CMU_CIS_CLK4 19
+#define CLK_MOUT_CMU_CIS_CLK5 20
+#define CLK_MOUT_CMU_CIS_CLK6 21
+#define CLK_MOUT_CMU_CIS_CLK7 22
+#define CLK_MOUT_CMU_CMU_BOOST 23
+#define CLK_MOUT_CMU_BOOST_OPTION1 24
+#define CLK_MOUT_CMU_CORE_BUS 25
+#define CLK_MOUT_CMU_CPUCL0_DBG 26
+#define CLK_MOUT_CMU_CPUCL0_SWITCH 27
+#define CLK_MOUT_CMU_CPUCL1_SWITCH 28
+#define CLK_MOUT_CMU_CPUCL2_SWITCH 29
+#define CLK_MOUT_CMU_CSIS_BUS 30
+#define CLK_MOUT_CMU_DISP_BUS 31
+#define CLK_MOUT_CMU_DNS_BUS 32
+#define CLK_MOUT_CMU_DPU_BUS 33
+#define CLK_MOUT_CMU_EH_BUS 34
+#define CLK_MOUT_CMU_G2D_G2D 35
+#define CLK_MOUT_CMU_G2D_MSCL 36
+#define CLK_MOUT_CMU_G3AA_G3AA 37
+#define CLK_MOUT_CMU_G3D_BUSD 38
+#define CLK_MOUT_CMU_G3D_GLB 39
+#define CLK_MOUT_CMU_G3D_SWITCH 40
+#define CLK_MOUT_CMU_GDC_GDC0 41
+#define CLK_MOUT_CMU_GDC_GDC1 42
+#define CLK_MOUT_CMU_GDC_SCSC 43
+#define CLK_MOUT_CMU_HPM 44
+#define CLK_MOUT_CMU_HSI0_BUS 45
+#define CLK_MOUT_CMU_HSI0_DPGTC 46
+#define CLK_MOUT_CMU_HSI0_USB31DRD 47
+#define CLK_MOUT_CMU_HSI0_USBDPDBG 48
+#define CLK_MOUT_CMU_HSI1_BUS 49
+#define CLK_MOUT_CMU_HSI1_PCIE 50
+#define CLK_MOUT_CMU_HSI2_BUS 51
+#define CLK_MOUT_CMU_HSI2_MMC_CARD 52
+#define CLK_MOUT_CMU_HSI2_PCIE 53
+#define CLK_MOUT_CMU_HSI2_UFS_EMBD 54
+#define CLK_MOUT_CMU_IPP_BUS 55
+#define CLK_MOUT_CMU_ITP_BUS 56
+#define CLK_MOUT_CMU_MCSC_ITSC 57
+#define CLK_MOUT_CMU_MCSC_MCSC 58
+#define CLK_MOUT_CMU_MFC_MFC 59
+#define CLK_MOUT_CMU_MIF_BUSP 60
+#define CLK_MOUT_CMU_MIF_SWITCH 61
+#define CLK_MOUT_CMU_MISC_BUS 62
+#define CLK_MOUT_CMU_MISC_SSS 63
+#define CLK_MOUT_CMU_PDP_BUS 64
+#define CLK_MOUT_CMU_PDP_VRA 65
+#define CLK_MOUT_CMU_PERIC0_BUS 66
+#define CLK_MOUT_CMU_PERIC0_IP 67
+#define CLK_MOUT_CMU_PERIC1_BUS 68
+#define CLK_MOUT_CMU_PERIC1_IP 69
+#define CLK_MOUT_CMU_TNR_BUS 70
+#define CLK_MOUT_CMU_TOP_BOOST_OPTION1 71
+#define CLK_MOUT_CMU_TOP_CMUREF 72
+#define CLK_MOUT_CMU_TPU_BUS 73
+#define CLK_MOUT_CMU_TPU_TPU 74
+#define CLK_MOUT_CMU_TPU_TPUCTL 75
+#define CLK_MOUT_CMU_TPU_UART 76
+#define CLK_MOUT_CMU_CMUREF 77
+
+/* CMU_TOP Dividers */
+#define CLK_DOUT_CMU_BO_BUS 78
+#define CLK_DOUT_CMU_BUS0_BUS 79
+#define CLK_DOUT_CMU_BUS1_BUS 80
+#define CLK_DOUT_CMU_BUS2_BUS 81
+#define CLK_DOUT_CMU_CIS_CLK0 82
+#define CLK_DOUT_CMU_CIS_CLK1 83
+#define CLK_DOUT_CMU_CIS_CLK2 84
+#define CLK_DOUT_CMU_CIS_CLK3 85
+#define CLK_DOUT_CMU_CIS_CLK4 86
+#define CLK_DOUT_CMU_CIS_CLK5 87
+#define CLK_DOUT_CMU_CIS_CLK6 88
+#define CLK_DOUT_CMU_CIS_CLK7 89
+#define CLK_DOUT_CMU_CORE_BUS 90
+#define CLK_DOUT_CMU_CPUCL0_DBG 91
+#define CLK_DOUT_CMU_CPUCL0_SWITCH 92
+#define CLK_DOUT_CMU_CPUCL1_SWITCH 93
+#define CLK_DOUT_CMU_CPUCL2_SWITCH 94
+#define CLK_DOUT_CMU_CSIS_BUS 95
+#define CLK_DOUT_CMU_DISP_BUS 96
+#define CLK_DOUT_CMU_DNS_BUS 97
+#define CLK_DOUT_CMU_DPU_BUS 98
+#define CLK_DOUT_CMU_EH_BUS 99
+#define CLK_DOUT_CMU_G2D_G2D 100
+#define CLK_DOUT_CMU_G2D_MSCL 101
+#define CLK_DOUT_CMU_G3AA_G3AA 102
+#define CLK_DOUT_CMU_G3D_BUSD 103
+#define CLK_DOUT_CMU_G3D_GLB 104
+#define CLK_DOUT_CMU_G3D_SWITCH 105
+#define CLK_DOUT_CMU_GDC_GDC0 106
+#define CLK_DOUT_CMU_GDC_GDC1 107
+#define CLK_DOUT_CMU_GDC_SCSC 108
+#define CLK_DOUT_CMU_CMU_HPM 109
+#define CLK_DOUT_CMU_HSI0_BUS 110
+#define CLK_DOUT_CMU_HSI0_DPGTC 111
+#define CLK_DOUT_CMU_HSI0_USB31DRD 112
+#define CLK_DOUT_CMU_HSI0_USBDPDBG 113
+#define CLK_DOUT_CMU_HSI1_BUS 114
+#define CLK_DOUT_CMU_HSI1_PCIE 115
+#define CLK_DOUT_CMU_HSI2_BUS 116
+#define CLK_DOUT_CMU_HSI2_MMC_CARD 117
+#define CLK_DOUT_CMU_HSI2_PCIE 118
+#define CLK_DOUT_CMU_HSI2_UFS_EMBD 119
+#define CLK_DOUT_CMU_IPP_BUS 120
+#define CLK_DOUT_CMU_ITP_BUS 121
+#define CLK_DOUT_CMU_MCSC_ITSC 122
+#define CLK_DOUT_CMU_MCSC_MCSC 123
+#define CLK_DOUT_CMU_MFC_MFC 124
+#define CLK_DOUT_CMU_MIF_BUSP 125
+#define CLK_DOUT_CMU_MISC_BUS 126
+#define CLK_DOUT_CMU_MISC_SSS 127
+#define CLK_DOUT_CMU_OTP 128
+#define CLK_DOUT_CMU_PDP_BUS 129
+#define CLK_DOUT_CMU_PDP_VRA 130
+#define CLK_DOUT_CMU_PERIC0_BUS 131
+#define CLK_DOUT_CMU_PERIC0_IP 132
+#define CLK_DOUT_CMU_PERIC1_BUS 133
+#define CLK_DOUT_CMU_PERIC1_IP 134
+#define CLK_DOUT_CMU_TNR_BUS 135
+#define CLK_DOUT_CMU_TPU_BUS 136
+#define CLK_DOUT_CMU_TPU_TPU 137
+#define CLK_DOUT_CMU_TPU_TPUCTL 138
+#define CLK_DOUT_CMU_TPU_UART 139
+#define CLK_DOUT_CMU_CMU_BOOST 140
+#define CLK_DOUT_CMU_CMU_CMUREF 141
+#define CLK_DOUT_CMU_SHARED0_DIV2 142
+#define CLK_DOUT_CMU_SHARED0_DIV3 143
+#define CLK_DOUT_CMU_SHARED0_DIV4 144
+#define CLK_DOUT_CMU_SHARED0_DIV5 145
+#define CLK_DOUT_CMU_SHARED1_DIV2 146
+#define CLK_DOUT_CMU_SHARED1_DIV3 147
+#define CLK_DOUT_CMU_SHARED1_DIV4 148
+#define CLK_DOUT_CMU_SHARED2_DIV2 149
+#define CLK_DOUT_CMU_SHARED3_DIV2 150
+
+/* CMU_TOP Gates */
+#define CLK_GOUT_CMU_BUS0_BOOST 151
+#define CLK_GOUT_CMU_BUS1_BOOST 152
+#define CLK_GOUT_CMU_BUS2_BOOST 153
+#define CLK_GOUT_CMU_CORE_BOOST 154
+#define CLK_GOUT_CMU_CPUCL0_BOOST 155
+#define CLK_GOUT_CMU_CPUCL1_BOOST 156
+#define CLK_GOUT_CMU_CPUCL2_BOOST 157
+#define CLK_GOUT_CMU_MIF_BOOST 158
+#define CLK_GOUT_CMU_MIF_SWITCH 159
+#define CLK_GOUT_CMU_BO_BUS 160
+#define CLK_GOUT_CMU_BUS0_BUS 161
+#define CLK_GOUT_CMU_BUS1_BUS 162
+#define CLK_GOUT_CMU_BUS2_BUS 163
+#define CLK_GOUT_CMU_CIS_CLK0 164
+#define CLK_GOUT_CMU_CIS_CLK1 165
+#define CLK_GOUT_CMU_CIS_CLK2 166
+#define CLK_GOUT_CMU_CIS_CLK3 167
+#define CLK_GOUT_CMU_CIS_CLK4 168
+#define CLK_GOUT_CMU_CIS_CLK5 169
+#define CLK_GOUT_CMU_CIS_CLK6 170
+#define CLK_GOUT_CMU_CIS_CLK7 171
+#define CLK_GOUT_CMU_CMU_BOOST 172
+#define CLK_GOUT_CMU_CORE_BUS 173
+#define CLK_GOUT_CMU_CPUCL0_DBG 174
+#define CLK_GOUT_CMU_CPUCL0_SWITCH 175
+#define CLK_GOUT_CMU_CPUCL1_SWITCH 176
+#define CLK_GOUT_CMU_CPUCL2_SWITCH 177
+#define CLK_GOUT_CMU_CSIS_BUS 178
+#define CLK_GOUT_CMU_DISP_BUS 179
+#define CLK_GOUT_CMU_DNS_BUS 180
+#define CLK_GOUT_CMU_DPU_BUS 181
+#define CLK_GOUT_CMU_EH_BUS 182
+#define CLK_GOUT_CMU_G2D_G2D 183
+#define CLK_GOUT_CMU_G2D_MSCL 184
+#define CLK_GOUT_CMU_G3AA_G3AA 185
+#define CLK_GOUT_CMU_G3D_BUSD 186
+#define CLK_GOUT_CMU_G3D_GLB 187
+#define CLK_GOUT_CMU_G3D_SWITCH 188
+#define CLK_GOUT_CMU_GDC_GDC0 189
+#define CLK_GOUT_CMU_GDC_GDC1 190
+#define CLK_GOUT_CMU_GDC_SCSC 191
+#define CLK_GOUT_CMU_HPM 192
+#define CLK_GOUT_CMU_HSI0_BUS 193
+#define CLK_GOUT_CMU_HSI0_DPGTC 194
+#define CLK_GOUT_CMU_HSI0_USB31DRD 195
+#define CLK_GOUT_CMU_HSI0_USBDPDBG 196
+#define CLK_GOUT_CMU_HSI1_BUS 197
+#define CLK_GOUT_CMU_HSI1_PCIE 198
+#define CLK_GOUT_CMU_HSI2_BUS 199
+#define CLK_GOUT_CMU_HSI2_MMC_CARD 200
+#define CLK_GOUT_CMU_HSI2_PCIE 201
+#define CLK_GOUT_CMU_HSI2_UFS_EMBD 202
+#define CLK_GOUT_CMU_IPP_BUS 203
+#define CLK_GOUT_CMU_ITP_BUS 204
+#define CLK_GOUT_CMU_MCSC_ITSC 205
+#define CLK_GOUT_CMU_MCSC_MCSC 206
+#define CLK_GOUT_CMU_MFC_MFC 207
+#define CLK_GOUT_CMU_MIF_BUSP 208
+#define CLK_GOUT_CMU_MISC_BUS 209
+#define CLK_GOUT_CMU_MISC_SSS 210
+#define CLK_GOUT_CMU_PDP_BUS 211
+#define CLK_GOUT_CMU_PDP_VRA 212
+#define CLK_GOUT_CMU_G3AA 213
+#define CLK_GOUT_CMU_PERIC0_BUS 214
+#define CLK_GOUT_CMU_PERIC0_IP 215
+#define CLK_GOUT_CMU_PERIC1_BUS 216
+#define CLK_GOUT_CMU_PERIC1_IP 217
+#define CLK_GOUT_CMU_TNR_BUS 218
+#define CLK_GOUT_CMU_TOP_CMUREF 219
+#define CLK_GOUT_CMU_TPU_BUS 220
+#define CLK_GOUT_CMU_TPU_TPU 221
+#define CLK_GOUT_CMU_TPU_TPUCTL 222
+#define CLK_GOUT_CMU_TPU_UART 223
+
+/* CMU_APM */
+#define CLK_MOUT_APM_FUNC 1
+#define CLK_MOUT_APM_FUNCSRC 2
+#define CLK_DOUT_APM_BOOST 3
+#define CLK_DOUT_APM_USI0_UART 4
+#define CLK_DOUT_APM_USI0_USI 5
+#define CLK_DOUT_APM_USI1_UART 6
+#define CLK_GOUT_APM_APM_CMU_APM_PCLK 7
+#define CLK_GOUT_BUS0_BOOST_OPTION1 8
+#define CLK_GOUT_CMU_BOOST_OPTION1 9
+#define CLK_GOUT_CORE_BOOST_OPTION1 10
+#define CLK_GOUT_APM_FUNC 11
+#define CLK_GOUT_APM_APBIF_GPIO_ALIVE_PCLK 12
+#define CLK_GOUT_APM_APBIF_GPIO_FAR_ALIVE_PCLK 13
+#define CLK_GOUT_APM_APBIF_PMU_ALIVE_PCLK 14
+#define CLK_GOUT_APM_APBIF_RTC_PCLK 15
+#define CLK_GOUT_APM_APBIF_TRTC_PCLK 16
+#define CLK_GOUT_APM_APM_USI0_UART_IPCLK 17
+#define CLK_GOUT_APM_APM_USI0_UART_PCLK 18
+#define CLK_GOUT_APM_APM_USI0_USI_IPCLK 19
+#define CLK_GOUT_APM_APM_USI0_USI_PCLK 20
+#define CLK_GOUT_APM_APM_USI1_UART_IPCLK 21
+#define CLK_GOUT_APM_APM_USI1_UART_PCLK 22
+#define CLK_GOUT_APM_D_TZPC_APM_PCLK 23
+#define CLK_GOUT_APM_GPC_APM_PCLK 24
+#define CLK_GOUT_APM_GREBEINTEGRATION_HCLK 25
+#define CLK_GOUT_APM_INTMEM_ACLK 26
+#define CLK_GOUT_APM_INTMEM_PCLK 27
+#define CLK_GOUT_APM_LHM_AXI_G_SWD_I_CLK 28
+#define CLK_GOUT_APM_LHM_AXI_P_AOCAPM_I_CLK 29
+#define CLK_GOUT_APM_LHM_AXI_P_APM_I_CLK 30
+#define CLK_GOUT_APM_LHS_AXI_D_APM_I_CLK 31
+#define CLK_GOUT_APM_LHS_AXI_G_DBGCORE_I_CLK 32
+#define CLK_GOUT_APM_LHS_AXI_G_SCAN2DRAM_I_CLK 33
+#define CLK_GOUT_APM_MAILBOX_APM_AOC_PCLK 34
+#define CLK_GOUT_APM_MAILBOX_APM_AP_PCLK 35
+#define CLK_GOUT_APM_MAILBOX_APM_GSA_PCLK 36
+#define CLK_GOUT_APM_MAILBOX_APM_SWD_PCLK 37
+#define CLK_GOUT_APM_MAILBOX_APM_TPU_PCLK 38
+#define CLK_GOUT_APM_MAILBOX_AP_AOC_PCLK 39
+#define CLK_GOUT_APM_MAILBOX_AP_DBGCORE_PCLK 40
+#define CLK_GOUT_APM_PMU_INTR_GEN_PCLK 41
+#define CLK_GOUT_APM_ROM_CRC32_HOST_ACLK 42
+#define CLK_GOUT_APM_ROM_CRC32_HOST_PCLK 43
+#define CLK_GOUT_APM_CLK_APM_BUS_CLK 44
+#define CLK_GOUT_APM_CLK_APM_USI0_UART_CLK 45
+#define CLK_GOUT_APM_CLK_APM_USI0_USI_CLK 46
+#define CLK_GOUT_APM_CLK_APM_USI1_UART_CLK 47
+#define CLK_GOUT_APM_SPEEDY_APM_PCLK 48
+#define CLK_GOUT_APM_SPEEDY_SUB_APM_PCLK 49
+#define CLK_GOUT_APM_SSMT_D_APM_ACLK 50
+#define CLK_GOUT_APM_SSMT_D_APM_PCLK 51
+#define CLK_GOUT_APM_SSMT_G_DBGCORE_ACLK 52
+#define CLK_GOUT_APM_SSMT_G_DBGCORE_PCLK 53
+#define CLK_GOUT_APM_SS_DBGCORE_SS_DBGCORE_HCLK 54
+#define CLK_GOUT_APM_SYSMMU_D_APM_CLK_S2 55
+#define CLK_GOUT_APM_SYSREG_APM_PCLK 56
+#define CLK_GOUT_APM_UASC_APM_ACLK 57
+#define CLK_GOUT_APM_UASC_APM_PCLK 58
+#define CLK_GOUT_APM_UASC_DBGCORE_ACLK 59
+#define CLK_GOUT_APM_UASC_DBGCORE_PCLK 60
+#define CLK_GOUT_APM_UASC_G_SWD_ACLK 61
+#define CLK_GOUT_APM_UASC_G_SWD_PCLK 62
+#define CLK_GOUT_APM_UASC_P_AOCAPM_ACLK 63
+#define CLK_GOUT_APM_UASC_P_AOCAPM_PCLK 64
+#define CLK_GOUT_APM_UASC_P_APM_ACLK 65
+#define CLK_GOUT_APM_UASC_P_APM_PCLK 66
+#define CLK_GOUT_APM_WDT_APM_PCLK 67
+#define CLK_GOUT_APM_XIU_DP_APM_ACLK 68
+#define CLK_APM_PLL_DIV2_APM 69
+#define CLK_APM_PLL_DIV4_APM 70
+#define CLK_APM_PLL_DIV16_APM 71
+
+/* CMU_MISC */
+#define CLK_MOUT_MISC_BUS_USER 1
+#define CLK_MOUT_MISC_SSS_USER 2
+#define CLK_MOUT_MISC_GIC 3
+#define CLK_DOUT_MISC_BUSP 4
+#define CLK_DOUT_MISC_GIC 5
+#define CLK_GOUT_MISC_MISC_CMU_MISC_PCLK 6
+#define CLK_GOUT_MISC_OTP_CON_BIRA_I_OSCCLK 7
+#define CLK_GOUT_MISC_OTP_CON_BISR_I_OSCCLK 8
+#define CLK_GOUT_MISC_OTP_CON_TOP_I_OSCCLK 9
+#define CLK_GOUT_MISC_CLK_MISC_OSCCLK_CLK 10
+#define CLK_GOUT_MISC_ADM_AHB_SSS_HCLKM 11
+#define CLK_GOUT_MISC_AD_APB_DIT_PCLKM 12
+#define CLK_GOUT_MISC_AD_APB_PUF_PCLKM 13
+#define CLK_GOUT_MISC_DIT_ICLKL2A 14
+#define CLK_GOUT_MISC_D_TZPC_MISC_PCLK 15
+#define CLK_GOUT_MISC_GIC_GICCLK 16
+#define CLK_GOUT_MISC_GPC_MISC_PCLK 17
+#define CLK_GOUT_MISC_LHM_AST_ICC_CPUGIC_I_CLK 18
+#define CLK_GOUT_MISC_LHM_AXI_D_SSS_I_CLK 19
+#define CLK_GOUT_MISC_LHM_AXI_P_GIC_I_CLK 20
+#define CLK_GOUT_MISC_LHM_AXI_P_MISC_I_CLK 21
+#define CLK_GOUT_MISC_LHS_ACEL_D_MISC_I_CLK 22
+#define CLK_GOUT_MISC_LHS_AST_IRI_GICCPU_I_CLK 23
+#define CLK_GOUT_MISC_LHS_AXI_D_SSS_I_CLK 24
+#define CLK_GOUT_MISC_MCT_PCLK 25
+#define CLK_GOUT_MISC_OTP_CON_BIRA_PCLK 26
+#define CLK_GOUT_MISC_OTP_CON_BISR_PCLK 27
+#define CLK_GOUT_MISC_OTP_CON_TOP_PCLK 28
+#define CLK_GOUT_MISC_PDMA_ACLK 29
+#define CLK_GOUT_MISC_PPMU_DMA_ACLK 30
+#define CLK_GOUT_MISC_PPMU_MISC_ACLK 31
+#define CLK_GOUT_MISC_PPMU_MISC_PCLK 32
+#define CLK_GOUT_MISC_PUF_I_CLK 33
+#define CLK_GOUT_MISC_QE_DIT_ACLK 34
+#define CLK_GOUT_MISC_QE_DIT_PCLK 35
+#define CLK_GOUT_MISC_QE_PDMA_ACLK 36
+#define CLK_GOUT_MISC_QE_PDMA_PCLK 37
+#define CLK_GOUT_MISC_QE_PPMU_DMA_ACLK 38
+#define CLK_GOUT_MISC_QE_PPMU_DMA_PCLK 39
+#define CLK_GOUT_MISC_QE_RTIC_ACLK 40
+#define CLK_GOUT_MISC_QE_RTIC_PCLK 41
+#define CLK_GOUT_MISC_QE_SPDMA_ACLK 42
+#define CLK_GOUT_MISC_QE_SPDMA_PCLK 43
+#define CLK_GOUT_MISC_QE_SSS_ACLK 44
+#define CLK_GOUT_MISC_QE_SSS_PCLK 45
+#define CLK_GOUT_MISC_CLK_MISC_BUSD_CLK 46
+#define CLK_GOUT_MISC_CLK_MISC_BUSP_CLK 47
+#define CLK_GOUT_MISC_CLK_MISC_GIC_CLK 48
+#define CLK_GOUT_MISC_CLK_MISC_SSS_CLK 49
+#define CLK_GOUT_MISC_RTIC_I_ACLK 50
+#define CLK_GOUT_MISC_RTIC_I_PCLK 51
+#define CLK_GOUT_MISC_SPDMA_ACLK 52
+#define CLK_GOUT_MISC_SSMT_DIT_ACLK 53
+#define CLK_GOUT_MISC_SSMT_DIT_PCLK 54
+#define CLK_GOUT_MISC_SSMT_PDMA_ACLK 55
+#define CLK_GOUT_MISC_SSMT_PDMA_PCLK 56
+#define CLK_GOUT_MISC_SSMT_PPMU_DMA_ACLK 57
+#define CLK_GOUT_MISC_SSMT_PPMU_DMA_PCLK 58
+#define CLK_GOUT_MISC_SSMT_RTIC_ACLK 59
+#define CLK_GOUT_MISC_SSMT_RTIC_PCLK 60
+#define CLK_GOUT_MISC_SSMT_SPDMA_ACLK 61
+#define CLK_GOUT_MISC_SSMT_SPDMA_PCLK 62
+#define CLK_GOUT_MISC_SSMT_SSS_ACLK 63
+#define CLK_GOUT_MISC_SSMT_SSS_PCLK 64
+#define CLK_GOUT_MISC_SSS_I_ACLK 65
+#define CLK_GOUT_MISC_SSS_I_PCLK 66
+#define CLK_GOUT_MISC_SYSMMU_MISC_CLK_S2 67
+#define CLK_GOUT_MISC_SYSMMU_SSS_CLK_S1 68
+#define CLK_GOUT_MISC_SYSREG_MISC_PCLK 69
+#define CLK_GOUT_MISC_TMU_SUB_PCLK 70
+#define CLK_GOUT_MISC_TMU_TOP_PCLK 71
+#define CLK_GOUT_MISC_WDT_CLUSTER0_PCLK 72
+#define CLK_GOUT_MISC_WDT_CLUSTER1_PCLK 73
+#define CLK_GOUT_MISC_XIU_D_MISC_ACLK 74
+
+#endif /* _DT_BINDINGS_CLOCK_GOOGLE_GS101_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/gxbb-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/gxbb-clkc.h
index 4073eb7a9da1..c0ce5e9c4151 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/gxbb-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/gxbb-clkc.h
@@ -15,6 +15,8 @@
#define CLKID_FCLK_DIV5 7
#define CLKID_FCLK_DIV7 8
#define CLKID_GP0_PLL 9
+#define CLKID_MPEG_SEL 10
+#define CLKID_MPEG_DIV 11
#define CLKID_CLK81 12
#define CLKID_MPLL0 13
#define CLKID_MPLL1 14
@@ -102,35 +104,92 @@
#define CLKID_SD_EMMC_C 96
#define CLKID_SAR_ADC_CLK 97
#define CLKID_SAR_ADC_SEL 98
+#define CLKID_SAR_ADC_DIV 99
#define CLKID_MALI_0_SEL 100
+#define CLKID_MALI_0_DIV 101
#define CLKID_MALI_0 102
#define CLKID_MALI_1_SEL 103
+#define CLKID_MALI_1_DIV 104
#define CLKID_MALI_1 105
#define CLKID_MALI 106
#define CLKID_CTS_AMCLK 107
+#define CLKID_CTS_AMCLK_SEL 108
+#define CLKID_CTS_AMCLK_DIV 109
#define CLKID_CTS_MCLK_I958 110
+#define CLKID_CTS_MCLK_I958_SEL 111
+#define CLKID_CTS_MCLK_I958_DIV 112
#define CLKID_CTS_I958 113
#define CLKID_32K_CLK 114
+#define CLKID_32K_CLK_SEL 115
+#define CLKID_32K_CLK_DIV 116
+#define CLKID_SD_EMMC_A_CLK0_SEL 117
+#define CLKID_SD_EMMC_A_CLK0_DIV 118
#define CLKID_SD_EMMC_A_CLK0 119
+#define CLKID_SD_EMMC_B_CLK0_SEL 120
+#define CLKID_SD_EMMC_B_CLK0_DIV 121
#define CLKID_SD_EMMC_B_CLK0 122
+#define CLKID_SD_EMMC_C_CLK0_SEL 123
+#define CLKID_SD_EMMC_C_CLK0_DIV 124
#define CLKID_SD_EMMC_C_CLK0 125
#define CLKID_VPU_0_SEL 126
+#define CLKID_VPU_0_DIV 127
#define CLKID_VPU_0 128
#define CLKID_VPU_1_SEL 129
+#define CLKID_VPU_1_DIV 130
#define CLKID_VPU_1 131
#define CLKID_VPU 132
#define CLKID_VAPB_0_SEL 133
+#define CLKID_VAPB_0_DIV 134
#define CLKID_VAPB_0 135
#define CLKID_VAPB_1_SEL 136
+#define CLKID_VAPB_1_DIV 137
#define CLKID_VAPB_1 138
#define CLKID_VAPB_SEL 139
#define CLKID_VAPB 140
+#define CLKID_HDMI_PLL_PRE_MULT 141
+#define CLKID_MPLL0_DIV 142
+#define CLKID_MPLL1_DIV 143
+#define CLKID_MPLL2_DIV 144
+#define CLKID_MPLL_PREDIV 145
+#define CLKID_FCLK_DIV2_DIV 146
+#define CLKID_FCLK_DIV3_DIV 147
+#define CLKID_FCLK_DIV4_DIV 148
+#define CLKID_FCLK_DIV5_DIV 149
+#define CLKID_FCLK_DIV7_DIV 150
+#define CLKID_VDEC_1_SEL 151
+#define CLKID_VDEC_1_DIV 152
#define CLKID_VDEC_1 153
+#define CLKID_VDEC_HEVC_SEL 154
+#define CLKID_VDEC_HEVC_DIV 155
#define CLKID_VDEC_HEVC 156
+#define CLKID_GEN_CLK_SEL 157
+#define CLKID_GEN_CLK_DIV 158
#define CLKID_GEN_CLK 159
+#define CLKID_FIXED_PLL_DCO 160
+#define CLKID_HDMI_PLL_DCO 161
+#define CLKID_HDMI_PLL_OD 162
+#define CLKID_HDMI_PLL_OD2 163
+#define CLKID_SYS_PLL_DCO 164
+#define CLKID_GP0_PLL_DCO 165
#define CLKID_VID_PLL 166
+#define CLKID_VID_PLL_SEL 167
+#define CLKID_VID_PLL_DIV 168
+#define CLKID_VCLK_SEL 169
+#define CLKID_VCLK2_SEL 170
+#define CLKID_VCLK_INPUT 171
+#define CLKID_VCLK2_INPUT 172
+#define CLKID_VCLK_DIV 173
+#define CLKID_VCLK2_DIV 174
#define CLKID_VCLK 175
#define CLKID_VCLK2 176
+#define CLKID_VCLK_DIV2_EN 177
+#define CLKID_VCLK_DIV4_EN 178
+#define CLKID_VCLK_DIV6_EN 179
+#define CLKID_VCLK_DIV12_EN 180
+#define CLKID_VCLK2_DIV2_EN 181
+#define CLKID_VCLK2_DIV4_EN 182
+#define CLKID_VCLK2_DIV6_EN 183
+#define CLKID_VCLK2_DIV12_EN 184
#define CLKID_VCLK_DIV1 185
#define CLKID_VCLK_DIV2 186
#define CLKID_VCLK_DIV4 187
@@ -141,10 +200,16 @@
#define CLKID_VCLK2_DIV4 192
#define CLKID_VCLK2_DIV6 193
#define CLKID_VCLK2_DIV12 194
+#define CLKID_CTS_ENCI_SEL 195
+#define CLKID_CTS_ENCP_SEL 196
+#define CLKID_CTS_VDAC_SEL 197
+#define CLKID_HDMI_TX_SEL 198
#define CLKID_CTS_ENCI 199
#define CLKID_CTS_ENCP 200
#define CLKID_CTS_VDAC 201
#define CLKID_HDMI_TX 202
+#define CLKID_HDMI_SEL 203
+#define CLKID_HDMI_DIV 204
#define CLKID_HDMI 205
#define CLKID_ACODEC 206
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/hi3559av100-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/hi3559av100-clock.h
index 5fe7689010a0..a4f0e997546c 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/hi3559av100-clock.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/hi3559av100-clock.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */
+/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause */
/*
* Copyright (c) 2019-2020, Huawei Tech. Co., Ltd.
*
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/imx8-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/imx8-clock.h
index 2e60ce4d2622..2242ff54fc5e 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/imx8-clock.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/imx8-clock.h
@@ -164,4 +164,32 @@
#define IMX_ADMA_LPCG_CLK_END 45
+#define IMX_ADMA_ACM_AUD_CLK0_SEL 0
+#define IMX_ADMA_ACM_AUD_CLK1_SEL 1
+#define IMX_ADMA_ACM_MCLKOUT0_SEL 2
+#define IMX_ADMA_ACM_MCLKOUT1_SEL 3
+#define IMX_ADMA_ACM_ESAI0_MCLK_SEL 4
+#define IMX_ADMA_ACM_ESAI1_MCLK_SEL 5
+#define IMX_ADMA_ACM_GPT0_MUX_CLK_SEL 6
+#define IMX_ADMA_ACM_GPT1_MUX_CLK_SEL 7
+#define IMX_ADMA_ACM_GPT2_MUX_CLK_SEL 8
+#define IMX_ADMA_ACM_GPT3_MUX_CLK_SEL 9
+#define IMX_ADMA_ACM_GPT4_MUX_CLK_SEL 10
+#define IMX_ADMA_ACM_GPT5_MUX_CLK_SEL 11
+#define IMX_ADMA_ACM_SAI0_MCLK_SEL 12
+#define IMX_ADMA_ACM_SAI1_MCLK_SEL 13
+#define IMX_ADMA_ACM_SAI2_MCLK_SEL 14
+#define IMX_ADMA_ACM_SAI3_MCLK_SEL 15
+#define IMX_ADMA_ACM_SAI4_MCLK_SEL 16
+#define IMX_ADMA_ACM_SAI5_MCLK_SEL 17
+#define IMX_ADMA_ACM_SAI6_MCLK_SEL 18
+#define IMX_ADMA_ACM_SAI7_MCLK_SEL 19
+#define IMX_ADMA_ACM_SPDIF0_TX_CLK_SEL 20
+#define IMX_ADMA_ACM_SPDIF1_TX_CLK_SEL 21
+#define IMX_ADMA_ACM_MQS_TX_CLK_SEL 22
+#define IMX_ADMA_ACM_ASRC0_MUX_CLK_SEL 23
+#define IMX_ADMA_ACM_ASRC1_MUX_CLK_SEL 24
+
+#define IMX_ADMA_ACM_CLK_END 25
+
#endif /* __DT_BINDINGS_CLOCK_IMX_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/imx8mp-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/imx8mp-clock.h
index 3f28ce685f41..7da4243984b2 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/imx8mp-clock.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/imx8mp-clock.h
@@ -130,7 +130,7 @@
#define IMX8MP_CLK_SAI1 123
#define IMX8MP_CLK_SAI2 124
#define IMX8MP_CLK_SAI3 125
-#define IMX8MP_CLK_SAI4 126
+/* #define IMX8MP_CLK_SAI4 126 */
#define IMX8MP_CLK_SAI5 127
#define IMX8MP_CLK_SAI6 128
#define IMX8MP_CLK_ENET_QOS 129
@@ -376,7 +376,6 @@
#define IMX8MP_CLK_AUDIOMIX_MU2_ROOT 36
#define IMX8MP_CLK_AUDIOMIX_MU3_ROOT 37
#define IMX8MP_CLK_AUDIOMIX_EARC_PHY 38
-#define IMX8MP_CLK_AUDIOMIX_PDM_ROOT 39
#define IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1_SEL 40
#define IMX8MP_CLK_AUDIOMIX_SAI1_MCLK2_SEL 41
#define IMX8MP_CLK_AUDIOMIX_SAI2_MCLK1_SEL 42
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/imx93-clock.h b/sys/contrib/device-tree/include/dt-bindings/clock/imx93-clock.h
index 35a1f62053a5..787c9e74dc96 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/imx93-clock.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/imx93-clock.h
@@ -203,6 +203,7 @@
#define IMX93_CLK_ARM_PLL 198
#define IMX93_CLK_A55_SEL 199
#define IMX93_CLK_A55_CORE 200
-#define IMX93_CLK_END 201
+#define IMX93_CLK_PDM_IPG 201
+#define IMX93_CLK_END 202
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/intel,agilex5-clkmgr.h b/sys/contrib/device-tree/include/dt-bindings/clock/intel,agilex5-clkmgr.h
new file mode 100644
index 000000000000..2f3a23b31c5c
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/intel,agilex5-clkmgr.h
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/*
+ * Copyright (C) 2023, Intel Corporation
+ */
+
+#ifndef __DT_BINDINGS_INTEL_AGILEX5_CLKMGR_H
+#define __DT_BINDINGS_INTEL_AGILEX5_CLKMGR_H
+
+/* fixed rate clocks */
+#define AGILEX5_OSC1 0
+#define AGILEX5_CB_INTOSC_HS_DIV2_CLK 1
+#define AGILEX5_CB_INTOSC_LS_CLK 2
+#define AGILEX5_F2S_FREE_CLK 3
+
+/* PLL clocks */
+#define AGILEX5_MAIN_PLL_CLK 4
+#define AGILEX5_MAIN_PLL_C0_CLK 5
+#define AGILEX5_MAIN_PLL_C1_CLK 6
+#define AGILEX5_MAIN_PLL_C2_CLK 7
+#define AGILEX5_MAIN_PLL_C3_CLK 8
+#define AGILEX5_PERIPH_PLL_CLK 9
+#define AGILEX5_PERIPH_PLL_C0_CLK 10
+#define AGILEX5_PERIPH_PLL_C1_CLK 11
+#define AGILEX5_PERIPH_PLL_C2_CLK 12
+#define AGILEX5_PERIPH_PLL_C3_CLK 13
+#define AGILEX5_CORE0_FREE_CLK 14
+#define AGILEX5_CORE1_FREE_CLK 15
+#define AGILEX5_CORE2_FREE_CLK 16
+#define AGILEX5_CORE3_FREE_CLK 17
+#define AGILEX5_DSU_FREE_CLK 18
+#define AGILEX5_BOOT_CLK 19
+
+/* fixed factor clocks */
+#define AGILEX5_L3_MAIN_FREE_CLK 20
+#define AGILEX5_NOC_FREE_CLK 21
+#define AGILEX5_S2F_USR0_CLK 22
+#define AGILEX5_NOC_CLK 23
+#define AGILEX5_EMAC_A_FREE_CLK 24
+#define AGILEX5_EMAC_B_FREE_CLK 25
+#define AGILEX5_EMAC_PTP_FREE_CLK 26
+#define AGILEX5_GPIO_DB_FREE_CLK 27
+#define AGILEX5_S2F_USER0_FREE_CLK 28
+#define AGILEX5_S2F_USER1_FREE_CLK 29
+#define AGILEX5_PSI_REF_FREE_CLK 30
+#define AGILEX5_USB31_FREE_CLK 31
+
+/* Gate clocks */
+#define AGILEX5_CORE0_CLK 32
+#define AGILEX5_CORE1_CLK 33
+#define AGILEX5_CORE2_CLK 34
+#define AGILEX5_CORE3_CLK 35
+#define AGILEX5_MPU_CLK 36
+#define AGILEX5_MPU_PERIPH_CLK 37
+#define AGILEX5_MPU_CCU_CLK 38
+#define AGILEX5_L4_MAIN_CLK 39
+#define AGILEX5_L4_MP_CLK 40
+#define AGILEX5_L4_SYS_FREE_CLK 41
+#define AGILEX5_L4_SP_CLK 42
+#define AGILEX5_CS_AT_CLK 43
+#define AGILEX5_CS_TRACE_CLK 44
+#define AGILEX5_CS_PDBG_CLK 45
+#define AGILEX5_EMAC1_CLK 47
+#define AGILEX5_EMAC2_CLK 48
+#define AGILEX5_EMAC_PTP_CLK 49
+#define AGILEX5_GPIO_DB_CLK 50
+#define AGILEX5_S2F_USER0_CLK 51
+#define AGILEX5_S2F_USER1_CLK 52
+#define AGILEX5_PSI_REF_CLK 53
+#define AGILEX5_USB31_SUSPEND_CLK 54
+#define AGILEX5_EMAC0_CLK 46
+#define AGILEX5_USB31_BUS_CLK_EARLY 55
+#define AGILEX5_USB2OTG_HCLK 56
+#define AGILEX5_SPIM_0_CLK 57
+#define AGILEX5_SPIM_1_CLK 58
+#define AGILEX5_SPIS_0_CLK 59
+#define AGILEX5_SPIS_1_CLK 60
+#define AGILEX5_DMA_CORE_CLK 61
+#define AGILEX5_DMA_HS_CLK 62
+#define AGILEX5_I3C_0_CORE_CLK 63
+#define AGILEX5_I3C_1_CORE_CLK 64
+#define AGILEX5_I2C_0_PCLK 65
+#define AGILEX5_I2C_1_PCLK 66
+#define AGILEX5_I2C_EMAC0_PCLK 67
+#define AGILEX5_I2C_EMAC1_PCLK 68
+#define AGILEX5_I2C_EMAC2_PCLK 69
+#define AGILEX5_UART_0_PCLK 70
+#define AGILEX5_UART_1_PCLK 71
+#define AGILEX5_SPTIMER_0_PCLK 72
+#define AGILEX5_SPTIMER_1_PCLK 73
+#define AGILEX5_DFI_CLK 74
+#define AGILEX5_NAND_NF_CLK 75
+#define AGILEX5_NAND_BCH_CLK 76
+#define AGILEX5_SDMMC_SDPHY_REG_CLK 77
+#define AGILEX5_SDMCLK 78
+#define AGILEX5_SOFTPHY_REG_PCLK 79
+#define AGILEX5_SOFTPHY_PHY_CLK 80
+#define AGILEX5_SOFTPHY_CTRL_CLK 81
+#define AGILEX5_NUM_CLKS 82
+
+#endif /* __DT_BINDINGS_INTEL_AGILEX5_CLKMGR_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2-audio.h b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2-audio.h
index 20664776f497..9653e04dedc3 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2-audio.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2-audio.h
@@ -6,5 +6,4 @@
#define MMP2_CLK_AUDIO_SSPA0 1
#define MMP2_CLK_AUDIO_SSPA1 2
-#define MMP2_CLK_AUDIO_NR_CLKS 3
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2.h b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2.h
index f0819d66b230..88c2d716476f 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,mmp2.h
@@ -91,5 +91,4 @@
#define MMP3_CLK_SDH4 126
#define MMP2_CLK_AUDIO 127
-#define MMP2_NR_CLKS 200
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa168.h b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa168.h
index c92d969ae941..d1bb59187e1d 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa168.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa168.h
@@ -63,5 +63,4 @@
#define PXA168_CLK_SDH01_AXI 111
#define PXA168_CLK_SDH23_AXI 112
-#define PXA168_NR_CLKS 200
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa1928.h b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa1928.h
index 5dca4820297f..0c708d3d3314 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa1928.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa1928.h
@@ -36,7 +36,6 @@
#define PXA1928_CLK_THSENS_CPU 0x26
#define PXA1928_CLK_THSENS_VPU 0x27
#define PXA1928_CLK_THSENS_GC 0x28
-#define PXA1928_APBC_NR_CLKS 0x30
/* axi peripherals */
@@ -53,6 +52,4 @@
#define PXA1928_CLK_GC3D 0x5d
#define PXA1928_CLK_GC2D 0x5f
-#define PXA1928_APMU_NR_CLKS 0x60
-
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa910.h b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa910.h
index c9018ab354d0..6caa231de0c1 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa910.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/marvell,pxa910.h
@@ -55,5 +55,4 @@
#define PXA910_CLK_CCIC0_PHY 108
#define PXA910_CLK_CCIC0_SPHY 109
-#define PXA910_NR_CLKS 200
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/mediatek,mt7988-clk.h b/sys/contrib/device-tree/include/dt-bindings/clock/mediatek,mt7988-clk.h
new file mode 100644
index 000000000000..63376e40f14d
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/mediatek,mt7988-clk.h
@@ -0,0 +1,280 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023 MediaTek Inc.
+ * Author: Sam Shih <sam.shih@mediatek.com>
+ * Author: Xiufeng Li <Xiufeng.Li@mediatek.com>
+ */
+
+#ifndef _DT_BINDINGS_CLK_MT7988_H
+#define _DT_BINDINGS_CLK_MT7988_H
+
+/* APMIXEDSYS */
+
+#define CLK_APMIXED_NETSYSPLL 0
+#define CLK_APMIXED_MPLL 1
+#define CLK_APMIXED_MMPLL 2
+#define CLK_APMIXED_APLL2 3
+#define CLK_APMIXED_NET1PLL 4
+#define CLK_APMIXED_NET2PLL 5
+#define CLK_APMIXED_WEDMCUPLL 6
+#define CLK_APMIXED_SGMPLL 7
+#define CLK_APMIXED_ARM_B 8
+#define CLK_APMIXED_CCIPLL2_B 9
+#define CLK_APMIXED_USXGMIIPLL 10
+#define CLK_APMIXED_MSDCPLL 11
+
+/* TOPCKGEN */
+
+#define CLK_TOP_XTAL 0
+#define CLK_TOP_XTAL_D2 1
+#define CLK_TOP_RTC_32K 2
+#define CLK_TOP_RTC_32P7K 3
+#define CLK_TOP_MPLL_D2 4
+#define CLK_TOP_MPLL_D3_D2 5
+#define CLK_TOP_MPLL_D4 6
+#define CLK_TOP_MPLL_D8 7
+#define CLK_TOP_MPLL_D8_D2 8
+#define CLK_TOP_MMPLL_D2 9
+#define CLK_TOP_MMPLL_D3_D5 10
+#define CLK_TOP_MMPLL_D4 11
+#define CLK_TOP_MMPLL_D6_D2 12
+#define CLK_TOP_MMPLL_D8 13
+#define CLK_TOP_APLL2_D4 14
+#define CLK_TOP_NET1PLL_D4 15
+#define CLK_TOP_NET1PLL_D5 16
+#define CLK_TOP_NET1PLL_D5_D2 17
+#define CLK_TOP_NET1PLL_D5_D4 18
+#define CLK_TOP_NET1PLL_D8 19
+#define CLK_TOP_NET1PLL_D8_D2 20
+#define CLK_TOP_NET1PLL_D8_D4 21
+#define CLK_TOP_NET1PLL_D8_D8 22
+#define CLK_TOP_NET1PLL_D8_D16 23
+#define CLK_TOP_NET2PLL_D2 24
+#define CLK_TOP_NET2PLL_D4 25
+#define CLK_TOP_NET2PLL_D4_D4 26
+#define CLK_TOP_NET2PLL_D4_D8 27
+#define CLK_TOP_NET2PLL_D6 28
+#define CLK_TOP_NET2PLL_D8 29
+#define CLK_TOP_NETSYS_SEL 30
+#define CLK_TOP_NETSYS_500M_SEL 31
+#define CLK_TOP_NETSYS_2X_SEL 32
+#define CLK_TOP_NETSYS_GSW_SEL 33
+#define CLK_TOP_ETH_GMII_SEL 34
+#define CLK_TOP_NETSYS_MCU_SEL 35
+#define CLK_TOP_NETSYS_PAO_2X_SEL 36
+#define CLK_TOP_EIP197_SEL 37
+#define CLK_TOP_AXI_INFRA_SEL 38
+#define CLK_TOP_UART_SEL 39
+#define CLK_TOP_EMMC_250M_SEL 40
+#define CLK_TOP_EMMC_400M_SEL 41
+#define CLK_TOP_SPI_SEL 42
+#define CLK_TOP_SPIM_MST_SEL 43
+#define CLK_TOP_NFI1X_SEL 44
+#define CLK_TOP_SPINFI_SEL 45
+#define CLK_TOP_PWM_SEL 46
+#define CLK_TOP_I2C_SEL 47
+#define CLK_TOP_PCIE_MBIST_250M_SEL 48
+#define CLK_TOP_PEXTP_TL_SEL 49
+#define CLK_TOP_PEXTP_TL_P1_SEL 50
+#define CLK_TOP_PEXTP_TL_P2_SEL 51
+#define CLK_TOP_PEXTP_TL_P3_SEL 52
+#define CLK_TOP_USB_SYS_SEL 53
+#define CLK_TOP_USB_SYS_P1_SEL 54
+#define CLK_TOP_USB_XHCI_SEL 55
+#define CLK_TOP_USB_XHCI_P1_SEL 56
+#define CLK_TOP_USB_FRMCNT_SEL 57
+#define CLK_TOP_USB_FRMCNT_P1_SEL 58
+#define CLK_TOP_AUD_SEL 59
+#define CLK_TOP_A1SYS_SEL 60
+#define CLK_TOP_AUD_L_SEL 61
+#define CLK_TOP_A_TUNER_SEL 62
+#define CLK_TOP_SSPXTP_SEL 63
+#define CLK_TOP_USB_PHY_SEL 64
+#define CLK_TOP_USXGMII_SBUS_0_SEL 65
+#define CLK_TOP_USXGMII_SBUS_1_SEL 66
+#define CLK_TOP_SGM_0_SEL 67
+#define CLK_TOP_SGM_SBUS_0_SEL 68
+#define CLK_TOP_SGM_1_SEL 69
+#define CLK_TOP_SGM_SBUS_1_SEL 70
+#define CLK_TOP_XFI_PHY_0_XTAL_SEL 71
+#define CLK_TOP_XFI_PHY_1_XTAL_SEL 72
+#define CLK_TOP_SYSAXI_SEL 73
+#define CLK_TOP_SYSAPB_SEL 74
+#define CLK_TOP_ETH_REFCK_50M_SEL 75
+#define CLK_TOP_ETH_SYS_200M_SEL 76
+#define CLK_TOP_ETH_SYS_SEL 77
+#define CLK_TOP_ETH_XGMII_SEL 78
+#define CLK_TOP_BUS_TOPS_SEL 79
+#define CLK_TOP_NPU_TOPS_SEL 80
+#define CLK_TOP_DRAMC_SEL 81
+#define CLK_TOP_DRAMC_MD32_SEL 82
+#define CLK_TOP_INFRA_F26M_SEL 83
+#define CLK_TOP_PEXTP_P0_SEL 84
+#define CLK_TOP_PEXTP_P1_SEL 85
+#define CLK_TOP_PEXTP_P2_SEL 86
+#define CLK_TOP_PEXTP_P3_SEL 87
+#define CLK_TOP_DA_XTP_GLB_P0_SEL 88
+#define CLK_TOP_DA_XTP_GLB_P1_SEL 89
+#define CLK_TOP_DA_XTP_GLB_P2_SEL 90
+#define CLK_TOP_DA_XTP_GLB_P3_SEL 91
+#define CLK_TOP_CKM_SEL 92
+#define CLK_TOP_DA_SEL 93
+#define CLK_TOP_PEXTP_SEL 94
+#define CLK_TOP_TOPS_P2_26M_SEL 95
+#define CLK_TOP_MCUSYS_BACKUP_625M_SEL 96
+#define CLK_TOP_NETSYS_SYNC_250M_SEL 97
+#define CLK_TOP_MACSEC_SEL 98
+#define CLK_TOP_NETSYS_TOPS_400M_SEL 99
+#define CLK_TOP_NETSYS_PPEFB_250M_SEL 100
+#define CLK_TOP_NETSYS_WARP_SEL 101
+#define CLK_TOP_ETH_MII_SEL 102
+#define CLK_TOP_NPU_SEL 103
+#define CLK_TOP_AUD_I2S_M 104
+
+/* MCUSYS */
+
+#define CLK_MCU_BUS_DIV_SEL 0
+#define CLK_MCU_ARM_DIV_SEL 1
+
+/* INFRACFG_AO */
+
+#define CLK_INFRA_MUX_UART0_SEL 0
+#define CLK_INFRA_MUX_UART1_SEL 1
+#define CLK_INFRA_MUX_UART2_SEL 2
+#define CLK_INFRA_MUX_SPI0_SEL 3
+#define CLK_INFRA_MUX_SPI1_SEL 4
+#define CLK_INFRA_MUX_SPI2_SEL 5
+#define CLK_INFRA_PWM_SEL 6
+#define CLK_INFRA_PWM_CK1_SEL 7
+#define CLK_INFRA_PWM_CK2_SEL 8
+#define CLK_INFRA_PWM_CK3_SEL 9
+#define CLK_INFRA_PWM_CK4_SEL 10
+#define CLK_INFRA_PWM_CK5_SEL 11
+#define CLK_INFRA_PWM_CK6_SEL 12
+#define CLK_INFRA_PWM_CK7_SEL 13
+#define CLK_INFRA_PWM_CK8_SEL 14
+#define CLK_INFRA_PCIE_GFMUX_TL_O_P0_SEL 15
+#define CLK_INFRA_PCIE_GFMUX_TL_O_P1_SEL 16
+#define CLK_INFRA_PCIE_GFMUX_TL_O_P2_SEL 17
+#define CLK_INFRA_PCIE_GFMUX_TL_O_P3_SEL 18
+
+/* INFRACFG */
+
+#define CLK_INFRA_PCIE_PERI_26M_CK_P0 19
+#define CLK_INFRA_PCIE_PERI_26M_CK_P1 20
+#define CLK_INFRA_PCIE_PERI_26M_CK_P2 21
+#define CLK_INFRA_PCIE_PERI_26M_CK_P3 22
+#define CLK_INFRA_66M_GPT_BCK 23
+#define CLK_INFRA_66M_PWM_HCK 24
+#define CLK_INFRA_66M_PWM_BCK 25
+#define CLK_INFRA_66M_PWM_CK1 26
+#define CLK_INFRA_66M_PWM_CK2 27
+#define CLK_INFRA_66M_PWM_CK3 28
+#define CLK_INFRA_66M_PWM_CK4 29
+#define CLK_INFRA_66M_PWM_CK5 30
+#define CLK_INFRA_66M_PWM_CK6 31
+#define CLK_INFRA_66M_PWM_CK7 32
+#define CLK_INFRA_66M_PWM_CK8 33
+#define CLK_INFRA_133M_CQDMA_BCK 34
+#define CLK_INFRA_66M_AUD_SLV_BCK 35
+#define CLK_INFRA_AUD_26M 36
+#define CLK_INFRA_AUD_L 37
+#define CLK_INFRA_AUD_AUD 38
+#define CLK_INFRA_AUD_EG2 39
+#define CLK_INFRA_DRAMC_F26M 40
+#define CLK_INFRA_133M_DBG_ACKM 41
+#define CLK_INFRA_66M_AP_DMA_BCK 42
+#define CLK_INFRA_66M_SEJ_BCK 43
+#define CLK_INFRA_PRE_CK_SEJ_F13M 44
+#define CLK_INFRA_26M_THERM_SYSTEM 45
+#define CLK_INFRA_I2C_BCK 46
+#define CLK_INFRA_52M_UART0_CK 47
+#define CLK_INFRA_52M_UART1_CK 48
+#define CLK_INFRA_52M_UART2_CK 49
+#define CLK_INFRA_NFI 50
+#define CLK_INFRA_SPINFI 51
+#define CLK_INFRA_66M_NFI_HCK 52
+#define CLK_INFRA_104M_SPI0 53
+#define CLK_INFRA_104M_SPI1 54
+#define CLK_INFRA_104M_SPI2_BCK 55
+#define CLK_INFRA_66M_SPI0_HCK 56
+#define CLK_INFRA_66M_SPI1_HCK 57
+#define CLK_INFRA_66M_SPI2_HCK 58
+#define CLK_INFRA_66M_FLASHIF_AXI 59
+#define CLK_INFRA_RTC 60
+#define CLK_INFRA_26M_ADC_BCK 61
+#define CLK_INFRA_RC_ADC 62
+#define CLK_INFRA_MSDC400 63
+#define CLK_INFRA_MSDC2_HCK 64
+#define CLK_INFRA_133M_MSDC_0_HCK 65
+#define CLK_INFRA_66M_MSDC_0_HCK 66
+#define CLK_INFRA_133M_CPUM_BCK 67
+#define CLK_INFRA_BIST2FPC 68
+#define CLK_INFRA_I2C_X16W_MCK_CK_P1 69
+#define CLK_INFRA_I2C_X16W_PCK_CK_P1 70
+#define CLK_INFRA_133M_USB_HCK 71
+#define CLK_INFRA_133M_USB_HCK_CK_P1 72
+#define CLK_INFRA_66M_USB_HCK 73
+#define CLK_INFRA_66M_USB_HCK_CK_P1 74
+#define CLK_INFRA_USB_SYS 75
+#define CLK_INFRA_USB_SYS_CK_P1 76
+#define CLK_INFRA_USB_REF 77
+#define CLK_INFRA_USB_CK_P1 78
+#define CLK_INFRA_USB_FRMCNT 79
+#define CLK_INFRA_USB_FRMCNT_CK_P1 80
+#define CLK_INFRA_USB_PIPE 81
+#define CLK_INFRA_USB_PIPE_CK_P1 82
+#define CLK_INFRA_USB_UTMI 83
+#define CLK_INFRA_USB_UTMI_CK_P1 84
+#define CLK_INFRA_USB_XHCI 85
+#define CLK_INFRA_USB_XHCI_CK_P1 86
+#define CLK_INFRA_PCIE_GFMUX_TL_P0 87
+#define CLK_INFRA_PCIE_GFMUX_TL_P1 88
+#define CLK_INFRA_PCIE_GFMUX_TL_P2 89
+#define CLK_INFRA_PCIE_GFMUX_TL_P3 90
+#define CLK_INFRA_PCIE_PIPE_P0 91
+#define CLK_INFRA_PCIE_PIPE_P1 92
+#define CLK_INFRA_PCIE_PIPE_P2 93
+#define CLK_INFRA_PCIE_PIPE_P3 94
+#define CLK_INFRA_133M_PCIE_CK_P0 95
+#define CLK_INFRA_133M_PCIE_CK_P1 96
+#define CLK_INFRA_133M_PCIE_CK_P2 97
+#define CLK_INFRA_133M_PCIE_CK_P3 98
+
+/* ETHDMA */
+
+#define CLK_ETHDMA_XGP1_EN 0
+#define CLK_ETHDMA_XGP2_EN 1
+#define CLK_ETHDMA_XGP3_EN 2
+#define CLK_ETHDMA_FE_EN 3
+#define CLK_ETHDMA_GP2_EN 4
+#define CLK_ETHDMA_GP1_EN 5
+#define CLK_ETHDMA_GP3_EN 6
+#define CLK_ETHDMA_ESW_EN 7
+#define CLK_ETHDMA_CRYPT0_EN 8
+#define CLK_ETHDMA_NR_CLK 9
+
+/* SGMIISYS_0 */
+
+#define CLK_SGM0_TX_EN 0
+#define CLK_SGM0_RX_EN 1
+#define CLK_SGMII0_NR_CLK 2
+
+/* SGMIISYS_1 */
+
+#define CLK_SGM1_TX_EN 0
+#define CLK_SGM1_RX_EN 1
+#define CLK_SGMII1_NR_CLK 2
+
+/* ETHWARP */
+
+#define CLK_ETHWARP_WOCPU2_EN 0
+#define CLK_ETHWARP_WOCPU1_EN 1
+#define CLK_ETHWARP_WOCPU0_EN 2
+#define CLK_ETHWARP_NR_CLK 3
+
+/* XFIPLL */
+#define CLK_XFIPLL_PLL 0
+#define CLK_XFIPLL_PLL_EN 1
+
+#endif /* _DT_BINDINGS_CLK_MT7988_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/meson8b-clkc.h b/sys/contrib/device-tree/include/dt-bindings/clock/meson8b-clkc.h
index 78aa07fd7cc0..385bf243c56c 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/meson8b-clkc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/meson8b-clkc.h
@@ -100,29 +100,126 @@
#define CLKID_MPLL0 93
#define CLKID_MPLL1 94
#define CLKID_MPLL2 95
+#define CLKID_MPLL0_DIV 96
+#define CLKID_MPLL1_DIV 97
+#define CLKID_MPLL2_DIV 98
+#define CLKID_CPU_IN_SEL 99
+#define CLKID_CPU_IN_DIV2 100
+#define CLKID_CPU_IN_DIV3 101
+#define CLKID_CPU_SCALE_DIV 102
+#define CLKID_CPU_SCALE_OUT_SEL 103
+#define CLKID_MPLL_PREDIV 104
+#define CLKID_FCLK_DIV2_DIV 105
+#define CLKID_FCLK_DIV3_DIV 106
+#define CLKID_FCLK_DIV4_DIV 107
+#define CLKID_FCLK_DIV5_DIV 108
+#define CLKID_FCLK_DIV7_DIV 109
+#define CLKID_NAND_SEL 110
+#define CLKID_NAND_DIV 111
#define CLKID_NAND_CLK 112
+#define CLKID_PLL_FIXED_DCO 113
+#define CLKID_HDMI_PLL_DCO 114
+#define CLKID_PLL_SYS_DCO 115
+#define CLKID_CPU_CLK_DIV2 116
+#define CLKID_CPU_CLK_DIV3 117
+#define CLKID_CPU_CLK_DIV4 118
+#define CLKID_CPU_CLK_DIV5 119
+#define CLKID_CPU_CLK_DIV6 120
+#define CLKID_CPU_CLK_DIV7 121
+#define CLKID_CPU_CLK_DIV8 122
+#define CLKID_APB_SEL 123
#define CLKID_APB 124
+#define CLKID_PERIPH_SEL 125
#define CLKID_PERIPH 126
+#define CLKID_AXI_SEL 127
#define CLKID_AXI 128
#define CLKID_L2_DRAM 130
+#define CLKID_L2_DRAM_SEL 129
+#define CLKID_HDMI_PLL_LVDS_OUT 131
#define CLKID_HDMI_PLL_HDMI_OUT 132
+#define CLKID_VID_PLL_IN_SEL 133
+#define CLKID_VID_PLL_IN_EN 134
+#define CLKID_VID_PLL_PRE_DIV 135
+#define CLKID_VID_PLL_POST_DIV 136
#define CLKID_VID_PLL_FINAL_DIV 137
#define CLKID_VCLK_IN_SEL 138
+#define CLKID_VCLK_IN_EN 139
+#define CLKID_VCLK_DIV1 140
+#define CLKID_VCLK_DIV2_DIV 141
+#define CLKID_VCLK_DIV2 142
+#define CLKID_VCLK_DIV4_DIV 143
+#define CLKID_VCLK_DIV4 144
+#define CLKID_VCLK_DIV6_DIV 145
+#define CLKID_VCLK_DIV6 146
+#define CLKID_VCLK_DIV12_DIV 147
+#define CLKID_VCLK_DIV12 148
#define CLKID_VCLK2_IN_SEL 149
+#define CLKID_VCLK2_IN_EN 150
+#define CLKID_VCLK2_DIV1 151
+#define CLKID_VCLK2_DIV2_DIV 152
+#define CLKID_VCLK2_DIV2 153
+#define CLKID_VCLK2_DIV4_DIV 154
+#define CLKID_VCLK2_DIV4 155
+#define CLKID_VCLK2_DIV6_DIV 156
+#define CLKID_VCLK2_DIV6 157
+#define CLKID_VCLK2_DIV12_DIV 158
+#define CLKID_VCLK2_DIV12 159
+#define CLKID_CTS_ENCT_SEL 160
#define CLKID_CTS_ENCT 161
+#define CLKID_CTS_ENCP_SEL 162
#define CLKID_CTS_ENCP 163
+#define CLKID_CTS_ENCI_SEL 164
#define CLKID_CTS_ENCI 165
+#define CLKID_HDMI_TX_PIXEL_SEL 166
#define CLKID_HDMI_TX_PIXEL 167
+#define CLKID_CTS_ENCL_SEL 168
#define CLKID_CTS_ENCL 169
+#define CLKID_CTS_VDAC0_SEL 170
#define CLKID_CTS_VDAC0 171
+#define CLKID_HDMI_SYS_SEL 172
+#define CLKID_HDMI_SYS_DIV 173
#define CLKID_HDMI_SYS 174
+#define CLKID_MALI_0_SEL 175
+#define CLKID_MALI_0_DIV 176
+#define CLKID_MALI_0 177
+#define CLKID_MALI_1_SEL 178
+#define CLKID_MALI_1_DIV 179
+#define CLKID_MALI_1 180
+#define CLKID_GP_PLL_DCO 181
+#define CLKID_GP_PLL 182
+#define CLKID_VPU_0_SEL 183
+#define CLKID_VPU_0_DIV 184
+#define CLKID_VPU_0 185
+#define CLKID_VPU_1_SEL 186
+#define CLKID_VPU_1_DIV 187
+#define CLKID_VPU_1 189
#define CLKID_VPU 190
+#define CLKID_VDEC_1_SEL 191
+#define CLKID_VDEC_1_1_DIV 192
+#define CLKID_VDEC_1_1 193
+#define CLKID_VDEC_1_2_DIV 194
+#define CLKID_VDEC_1_2 195
#define CLKID_VDEC_1 196
+#define CLKID_VDEC_HCODEC_SEL 197
+#define CLKID_VDEC_HCODEC_DIV 198
#define CLKID_VDEC_HCODEC 199
+#define CLKID_VDEC_2_SEL 200
+#define CLKID_VDEC_2_DIV 201
#define CLKID_VDEC_2 202
+#define CLKID_VDEC_HEVC_SEL 203
+#define CLKID_VDEC_HEVC_DIV 204
+#define CLKID_VDEC_HEVC_EN 205
#define CLKID_VDEC_HEVC 206
+#define CLKID_CTS_AMCLK_SEL 207
+#define CLKID_CTS_AMCLK_DIV 208
#define CLKID_CTS_AMCLK 209
+#define CLKID_CTS_MCLK_I958_SEL 210
+#define CLKID_CTS_MCLK_I958_DIV 211
#define CLKID_CTS_MCLK_I958 212
#define CLKID_CTS_I958 213
+#define CLKID_VCLK_EN 214
+#define CLKID_VCLK2_EN 215
+#define CLKID_VID_PLL_LVDS_EN 216
+#define CLKID_HDMI_PLL_DCO_IN 217
#endif /* __MESON8B_CLKC_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq4019.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq4019.h
index 7e8a7be6dcda..fa0587857547 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq4019.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq4019.h
@@ -165,5 +165,11 @@
#define GCC_QDSS_BCR 69
#define GCC_MPM_BCR 70
#define GCC_SPDM_BCR 71
+#define ESS_MAC1_ARES 72
+#define ESS_MAC2_ARES 73
+#define ESS_MAC3_ARES 74
+#define ESS_MAC4_ARES 75
+#define ESS_MAC5_ARES 76
+#define ESS_PSGMII_ARES 77
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq5018.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq5018.h
new file mode 100644
index 000000000000..f3de2fdfeea1
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-ipq5018.h
@@ -0,0 +1,183 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_IPQ_GCC_5018_H
+#define _DT_BINDINGS_CLOCK_IPQ_GCC_5018_H
+
+#define GPLL0_MAIN 0
+#define GPLL0 1
+#define GPLL2_MAIN 2
+#define GPLL2 3
+#define GPLL4_MAIN 4
+#define GPLL4 5
+#define UBI32_PLL_MAIN 6
+#define UBI32_PLL 7
+#define ADSS_PWM_CLK_SRC 8
+#define BLSP1_QUP1_I2C_APPS_CLK_SRC 9
+#define BLSP1_QUP1_SPI_APPS_CLK_SRC 10
+#define BLSP1_QUP2_I2C_APPS_CLK_SRC 11
+#define BLSP1_QUP2_SPI_APPS_CLK_SRC 12
+#define BLSP1_QUP3_I2C_APPS_CLK_SRC 13
+#define BLSP1_QUP3_SPI_APPS_CLK_SRC 14
+#define BLSP1_UART1_APPS_CLK_SRC 15
+#define BLSP1_UART2_APPS_CLK_SRC 16
+#define CRYPTO_CLK_SRC 17
+#define GCC_ADSS_PWM_CLK 18
+#define GCC_BLSP1_AHB_CLK 19
+#define GCC_BLSP1_QUP1_I2C_APPS_CLK 20
+#define GCC_BLSP1_QUP1_SPI_APPS_CLK 21
+#define GCC_BLSP1_QUP2_I2C_APPS_CLK 22
+#define GCC_BLSP1_QUP2_SPI_APPS_CLK 23
+#define GCC_BLSP1_QUP3_I2C_APPS_CLK 24
+#define GCC_BLSP1_QUP3_SPI_APPS_CLK 25
+#define GCC_BLSP1_UART1_APPS_CLK 26
+#define GCC_BLSP1_UART2_APPS_CLK 27
+#define GCC_BTSS_LPO_CLK 28
+#define GCC_CMN_BLK_AHB_CLK 29
+#define GCC_CMN_BLK_SYS_CLK 30
+#define GCC_CRYPTO_AHB_CLK 31
+#define GCC_CRYPTO_AXI_CLK 32
+#define GCC_CRYPTO_CLK 33
+#define GCC_CRYPTO_PPE_CLK 34
+#define GCC_DCC_CLK 35
+#define GCC_GEPHY_RX_CLK 36
+#define GCC_GEPHY_TX_CLK 37
+#define GCC_GMAC0_CFG_CLK 38
+#define GCC_GMAC0_PTP_CLK 39
+#define GCC_GMAC0_RX_CLK 40
+#define GCC_GMAC0_SYS_CLK 41
+#define GCC_GMAC0_TX_CLK 42
+#define GCC_GMAC1_CFG_CLK 43
+#define GCC_GMAC1_PTP_CLK 44
+#define GCC_GMAC1_RX_CLK 45
+#define GCC_GMAC1_SYS_CLK 46
+#define GCC_GMAC1_TX_CLK 47
+#define GCC_GP1_CLK 48
+#define GCC_GP2_CLK 49
+#define GCC_GP3_CLK 50
+#define GCC_LPASS_CORE_AXIM_CLK 51
+#define GCC_LPASS_SWAY_CLK 52
+#define GCC_MDIO0_AHB_CLK 53
+#define GCC_MDIO1_AHB_CLK 54
+#define GCC_PCIE0_AHB_CLK 55
+#define GCC_PCIE0_AUX_CLK 56
+#define GCC_PCIE0_AXI_M_CLK 57
+#define GCC_PCIE0_AXI_S_BRIDGE_CLK 58
+#define GCC_PCIE0_AXI_S_CLK 59
+#define GCC_PCIE0_PIPE_CLK 60
+#define GCC_PCIE1_AHB_CLK 61
+#define GCC_PCIE1_AUX_CLK 62
+#define GCC_PCIE1_AXI_M_CLK 63
+#define GCC_PCIE1_AXI_S_BRIDGE_CLK 64
+#define GCC_PCIE1_AXI_S_CLK 65
+#define GCC_PCIE1_PIPE_CLK 66
+#define GCC_PRNG_AHB_CLK 67
+#define GCC_Q6_AXIM_CLK 68
+#define GCC_Q6_AXIM2_CLK 69
+#define GCC_Q6_AXIS_CLK 70
+#define GCC_Q6_AHB_CLK 71
+#define GCC_Q6_AHB_S_CLK 72
+#define GCC_Q6_TSCTR_1TO2_CLK 73
+#define GCC_Q6SS_ATBM_CLK 74
+#define GCC_Q6SS_PCLKDBG_CLK 75
+#define GCC_Q6SS_TRIG_CLK 76
+#define GCC_QDSS_AT_CLK 77
+#define GCC_QDSS_CFG_AHB_CLK 78
+#define GCC_QDSS_DAP_AHB_CLK 79
+#define GCC_QDSS_DAP_CLK 80
+#define GCC_QDSS_ETR_USB_CLK 81
+#define GCC_QDSS_EUD_AT_CLK 82
+#define GCC_QDSS_STM_CLK 83
+#define GCC_QDSS_TRACECLKIN_CLK 84
+#define GCC_QDSS_TSCTR_DIV8_CLK 85
+#define GCC_QPIC_AHB_CLK 86
+#define GCC_QPIC_CLK 87
+#define GCC_QPIC_IO_MACRO_CLK 88
+#define GCC_SDCC1_AHB_CLK 89
+#define GCC_SDCC1_APPS_CLK 90
+#define GCC_SLEEP_CLK_SRC 91
+#define GCC_SNOC_GMAC0_AHB_CLK 92
+#define GCC_SNOC_GMAC0_AXI_CLK 93
+#define GCC_SNOC_GMAC1_AHB_CLK 94
+#define GCC_SNOC_GMAC1_AXI_CLK 95
+#define GCC_SNOC_LPASS_AXIM_CLK 96
+#define GCC_SNOC_LPASS_SWAY_CLK 97
+#define GCC_SNOC_UBI0_AXI_CLK 98
+#define GCC_SYS_NOC_PCIE0_AXI_CLK 99
+#define GCC_SYS_NOC_PCIE1_AXI_CLK 100
+#define GCC_SYS_NOC_QDSS_STM_AXI_CLK 101
+#define GCC_SYS_NOC_USB0_AXI_CLK 102
+#define GCC_SYS_NOC_WCSS_AHB_CLK 103
+#define GCC_UBI0_AXI_CLK 104
+#define GCC_UBI0_CFG_CLK 105
+#define GCC_UBI0_CORE_CLK 106
+#define GCC_UBI0_DBG_CLK 107
+#define GCC_UBI0_NC_AXI_CLK 108
+#define GCC_UBI0_UTCM_CLK 109
+#define GCC_UNIPHY_AHB_CLK 110
+#define GCC_UNIPHY_RX_CLK 111
+#define GCC_UNIPHY_SYS_CLK 112
+#define GCC_UNIPHY_TX_CLK 113
+#define GCC_USB0_AUX_CLK 114
+#define GCC_USB0_EUD_AT_CLK 115
+#define GCC_USB0_LFPS_CLK 116
+#define GCC_USB0_MASTER_CLK 117
+#define GCC_USB0_MOCK_UTMI_CLK 118
+#define GCC_USB0_PHY_CFG_AHB_CLK 119
+#define GCC_USB0_SLEEP_CLK 120
+#define GCC_WCSS_ACMT_CLK 121
+#define GCC_WCSS_AHB_S_CLK 122
+#define GCC_WCSS_AXI_M_CLK 123
+#define GCC_WCSS_AXI_S_CLK 124
+#define GCC_WCSS_DBG_IFC_APB_BDG_CLK 125
+#define GCC_WCSS_DBG_IFC_APB_CLK 126
+#define GCC_WCSS_DBG_IFC_ATB_BDG_CLK 127
+#define GCC_WCSS_DBG_IFC_ATB_CLK 128
+#define GCC_WCSS_DBG_IFC_DAPBUS_BDG_CLK 129
+#define GCC_WCSS_DBG_IFC_DAPBUS_CLK 130
+#define GCC_WCSS_DBG_IFC_NTS_BDG_CLK 131
+#define GCC_WCSS_DBG_IFC_NTS_CLK 132
+#define GCC_WCSS_ECAHB_CLK 133
+#define GCC_XO_CLK 134
+#define GCC_XO_CLK_SRC 135
+#define GMAC0_RX_CLK_SRC 136
+#define GMAC0_TX_CLK_SRC 137
+#define GMAC1_RX_CLK_SRC 138
+#define GMAC1_TX_CLK_SRC 139
+#define GMAC_CLK_SRC 140
+#define GP1_CLK_SRC 141
+#define GP2_CLK_SRC 142
+#define GP3_CLK_SRC 143
+#define LPASS_AXIM_CLK_SRC 144
+#define LPASS_SWAY_CLK_SRC 145
+#define PCIE0_AUX_CLK_SRC 146
+#define PCIE0_AXI_CLK_SRC 147
+#define PCIE1_AUX_CLK_SRC 148
+#define PCIE1_AXI_CLK_SRC 149
+#define PCNOC_BFDCD_CLK_SRC 150
+#define Q6_AXI_CLK_SRC 151
+#define QDSS_AT_CLK_SRC 152
+#define QDSS_STM_CLK_SRC 153
+#define QDSS_TSCTR_CLK_SRC 154
+#define QDSS_TRACECLKIN_CLK_SRC 155
+#define QPIC_IO_MACRO_CLK_SRC 156
+#define SDCC1_APPS_CLK_SRC 157
+#define SYSTEM_NOC_BFDCD_CLK_SRC 158
+#define UBI0_AXI_CLK_SRC 159
+#define UBI0_CORE_CLK_SRC 160
+#define USB0_AUX_CLK_SRC 161
+#define USB0_LFPS_CLK_SRC 162
+#define USB0_MASTER_CLK_SRC 163
+#define USB0_MOCK_UTMI_CLK_SRC 164
+#define WCSS_AHB_CLK_SRC 165
+#define PCIE0_PIPE_CLK_SRC 166
+#define PCIE1_PIPE_CLK_SRC 167
+#define USB0_PIPE_CLK_SRC 168
+#define GCC_USB0_PIPE_CLK 169
+#define GMAC0_RX_DIV_CLK_SRC 170
+#define GMAC0_TX_DIV_CLK_SRC 171
+#define GMAC1_RX_DIV_CLK_SRC 172
+#define GMAC1_TX_DIV_CLK_SRC 173
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8917.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8917.h
index a371b1adc896..4b421e7414b5 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8917.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8917.h
@@ -169,6 +169,7 @@
#define VFE0_CLK_SRC 162
#define VFE1_CLK_SRC 163
#define VSYNC_CLK_SRC 164
+#define GPLL0_SLEEP_CLK_SRC 165
/* GCC block resets */
#define GCC_CAMSS_MICRO_BCR 0
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8939.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8939.h
index 2d545ed0d35a..9a9bc55b49af 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8939.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8939.h
@@ -193,6 +193,12 @@
#define GCC_VENUS0_CORE1_VCODEC0_CLK 184
#define GCC_OXILI_TIMER_CLK 185
#define SYSTEM_MM_NOC_BFDCD_CLK_SRC 186
+#define CSI2_CLK_SRC 187
+#define GCC_CAMSS_CSI2_AHB_CLK 188
+#define GCC_CAMSS_CSI2_CLK 189
+#define GCC_CAMSS_CSI2PHY_CLK 190
+#define GCC_CAMSS_CSI2PIX_CLK 191
+#define GCC_CAMSS_CSI2RDI_CLK 192
/* Indexes for GDSCs */
#define BIMC_GDSC 0
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8998.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8998.h
index 1badb4f9c58f..b5456a64d421 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8998.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-msm8998.h
@@ -190,6 +190,9 @@
#define AGGRE2_SNOC_NORTH_AXI 181
#define SSC_XO 182
#define SSC_CNOC_AHBS_CLK 183
+#define GCC_MMSS_GPLL0_DIV_CLK 184
+#define GCC_GPU_GPLL0_DIV_CLK 185
+#define GCC_GPU_GPLL0_CLK 186
#define PCIE_0_GDSC 0
#define UFS_GDSC 1
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-sc8280xp.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-sc8280xp.h
index 721105ea4fad..845491591784 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-sc8280xp.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,gcc-sc8280xp.h
@@ -494,5 +494,15 @@
#define USB30_SEC_GDSC 11
#define EMAC_0_GDSC 12
#define EMAC_1_GDSC 13
+#define USB4_1_GDSC 14
+#define USB4_GDSC 15
+#define HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC 16
+#define HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC 17
+#define HLOS1_VOTE_MMNOC_MMU_TBU_SF0_GDSC 18
+#define HLOS1_VOTE_MMNOC_MMU_TBU_SF1_GDSC 19
+#define HLOS1_VOTE_TURING_MMU_TBU0_GDSC 20
+#define HLOS1_VOTE_TURING_MMU_TBU1_GDSC 21
+#define HLOS1_VOTE_TURING_MMU_TBU2_GDSC 22
+#define HLOS1_VOTE_TURING_MMU_TBU3_GDSC 23
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,ipq9574-gcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,ipq9574-gcc.h
index b32a7aa65349..08fd3a37acaa 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,ipq9574-gcc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,ipq9574-gcc.h
@@ -214,4 +214,6 @@
#define GCC_CRYPTO_CLK 205
#define GCC_CRYPTO_AXI_CLK 206
#define GCC_CRYPTO_AHB_CLK 207
+#define GCC_USB0_PIPE_CLK 208
+#define GCC_USB0_SLEEP_CLK 209
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,mmcc-msm8974.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,mmcc-msm8974.h
index a62cb0629a7a..743ee60632eb 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,mmcc-msm8974.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,mmcc-msm8974.h
@@ -121,7 +121,6 @@
#define MMSS_MMSSNOC_BTO_AHB_CLK 112
#define MMSS_MMSSNOC_AXI_CLK 113
#define MMSS_S0_AXI_CLK 114
-#define OCMEMCX_AHB_CLK 115
#define OCMEMCX_OCMEMNOC_CLK 116
#define OXILI_OCMEMGX_CLK 117
#define OCMEMNOC_CLK 118
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-ecpricc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-ecpricc.h
new file mode 100644
index 000000000000..731e404a2ce6
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-ecpricc.h
@@ -0,0 +1,147 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_ECPRI_CC_QDU1000_H
+#define _DT_BINDINGS_CLK_QCOM_ECPRI_CC_QDU1000_H
+
+/* ECPRI_CC clocks */
+#define ECPRI_CC_PLL0 0
+#define ECPRI_CC_PLL1 1
+#define ECPRI_CC_ECPRI_CG_CLK 2
+#define ECPRI_CC_ECPRI_CLK_SRC 3
+#define ECPRI_CC_ECPRI_DMA_CLK 4
+#define ECPRI_CC_ECPRI_DMA_CLK_SRC 5
+#define ECPRI_CC_ECPRI_DMA_NOC_CLK 6
+#define ECPRI_CC_ECPRI_FAST_CLK 7
+#define ECPRI_CC_ECPRI_FAST_CLK_SRC 8
+#define ECPRI_CC_ECPRI_FAST_DIV2_CLK 9
+#define ECPRI_CC_ECPRI_FAST_DIV2_CLK_SRC 10
+#define ECPRI_CC_ECPRI_FAST_DIV2_NOC_CLK 11
+#define ECPRI_CC_ECPRI_FR_CLK 12
+#define ECPRI_CC_ECPRI_ORAN_CLK_SRC 13
+#define ECPRI_CC_ECPRI_ORAN_DIV2_CLK 14
+#define ECPRI_CC_ETH_100G_C2C0_HM_FF_CLK_SRC 15
+#define ECPRI_CC_ETH_100G_C2C0_UDP_FIFO_CLK 16
+#define ECPRI_CC_ETH_100G_C2C1_UDP_FIFO_CLK 17
+#define ECPRI_CC_ETH_100G_C2C_0_HM_FF_0_CLK 18
+#define ECPRI_CC_ETH_100G_C2C_0_HM_FF_1_CLK 19
+#define ECPRI_CC_ETH_100G_C2C_HM_FF_0_DIV_CLK_SRC 20
+#define ECPRI_CC_ETH_100G_C2C_HM_FF_1_DIV_CLK_SRC 21
+#define ECPRI_CC_ETH_100G_C2C_HM_MACSEC_CLK 22
+#define ECPRI_CC_ETH_100G_C2C_HM_MACSEC_CLK_SRC 23
+#define ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_0_CLK 24
+#define ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_0_DIV_CLK_SRC 25
+#define ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_1_CLK 26
+#define ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_1_DIV_CLK_SRC 27
+#define ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_CLK_SRC 28
+#define ECPRI_CC_ETH_100G_DBG_C2C_UDP_FIFO_CLK 29
+#define ECPRI_CC_ETH_100G_FH0_HM_FF_CLK_SRC 30
+#define ECPRI_CC_ETH_100G_FH0_MACSEC_CLK_SRC 31
+#define ECPRI_CC_ETH_100G_FH1_HM_FF_CLK_SRC 32
+#define ECPRI_CC_ETH_100G_FH1_MACSEC_CLK_SRC 33
+#define ECPRI_CC_ETH_100G_FH2_HM_FF_CLK_SRC 34
+#define ECPRI_CC_ETH_100G_FH2_MACSEC_CLK_SRC 35
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_0_CLK 36
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_0_DIV_CLK_SRC 37
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_1_CLK 38
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_1_DIV_CLK_SRC 39
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_2_CLK 40
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_2_DIV_CLK_SRC 41
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_3_CLK 42
+#define ECPRI_CC_ETH_100G_FH_0_HM_FF_3_DIV_CLK_SRC 43
+#define ECPRI_CC_ETH_100G_FH_0_UDP_FIFO_CLK 44
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_0_CLK 45
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_0_DIV_CLK_SRC 46
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_1_CLK 47
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_1_DIV_CLK_SRC 48
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_2_CLK 49
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_2_DIV_CLK_SRC 50
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_3_CLK 51
+#define ECPRI_CC_ETH_100G_FH_1_HM_FF_3_DIV_CLK_SRC 52
+#define ECPRI_CC_ETH_100G_FH_1_UDP_FIFO_CLK 53
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_0_CLK 54
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_0_DIV_CLK_SRC 55
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_1_CLK 56
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_1_DIV_CLK_SRC 57
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_2_CLK 58
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_2_DIV_CLK_SRC 59
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_3_CLK 60
+#define ECPRI_CC_ETH_100G_FH_2_HM_FF_3_DIV_CLK_SRC 61
+#define ECPRI_CC_ETH_100G_FH_2_UDP_FIFO_CLK 62
+#define ECPRI_CC_ETH_100G_FH_MACSEC_0_CLK 63
+#define ECPRI_CC_ETH_100G_FH_MACSEC_1_CLK 64
+#define ECPRI_CC_ETH_100G_FH_MACSEC_2_CLK 65
+#define ECPRI_CC_ETH_100G_MAC_C2C_HM_REF_CLK 66
+#define ECPRI_CC_ETH_100G_MAC_C2C_HM_REF_CLK_SRC 67
+#define ECPRI_CC_ETH_100G_MAC_DBG_C2C_HM_REF_CLK 68
+#define ECPRI_CC_ETH_100G_MAC_DBG_C2C_HM_REF_CLK_SRC 69
+#define ECPRI_CC_ETH_100G_MAC_FH0_HM_REF_CLK 70
+#define ECPRI_CC_ETH_100G_MAC_FH0_HM_REF_CLK_SRC 71
+#define ECPRI_CC_ETH_100G_MAC_FH1_HM_REF_CLK 72
+#define ECPRI_CC_ETH_100G_MAC_FH1_HM_REF_CLK_SRC 73
+#define ECPRI_CC_ETH_100G_MAC_FH2_HM_REF_CLK 74
+#define ECPRI_CC_ETH_100G_MAC_FH2_HM_REF_CLK_SRC 75
+#define ECPRI_CC_ETH_DBG_NFAPI_AXI_CLK 76
+#define ECPRI_CC_ETH_DBG_NOC_AXI_CLK 77
+#define ECPRI_CC_ETH_PHY_0_OCK_SRAM_CLK 78
+#define ECPRI_CC_ETH_PHY_1_OCK_SRAM_CLK 79
+#define ECPRI_CC_ETH_PHY_2_OCK_SRAM_CLK 80
+#define ECPRI_CC_ETH_PHY_3_OCK_SRAM_CLK 81
+#define ECPRI_CC_ETH_PHY_4_OCK_SRAM_CLK 82
+#define ECPRI_CC_MSS_EMAC_CLK 83
+#define ECPRI_CC_MSS_EMAC_CLK_SRC 84
+#define ECPRI_CC_MSS_ORAN_CLK 85
+#define ECPRI_CC_PHY0_LANE0_RX_CLK 86
+#define ECPRI_CC_PHY0_LANE0_TX_CLK 87
+#define ECPRI_CC_PHY0_LANE1_RX_CLK 88
+#define ECPRI_CC_PHY0_LANE1_TX_CLK 89
+#define ECPRI_CC_PHY0_LANE2_RX_CLK 90
+#define ECPRI_CC_PHY0_LANE2_TX_CLK 91
+#define ECPRI_CC_PHY0_LANE3_RX_CLK 92
+#define ECPRI_CC_PHY0_LANE3_TX_CLK 93
+#define ECPRI_CC_PHY1_LANE0_RX_CLK 94
+#define ECPRI_CC_PHY1_LANE0_TX_CLK 95
+#define ECPRI_CC_PHY1_LANE1_RX_CLK 96
+#define ECPRI_CC_PHY1_LANE1_TX_CLK 97
+#define ECPRI_CC_PHY1_LANE2_RX_CLK 98
+#define ECPRI_CC_PHY1_LANE2_TX_CLK 99
+#define ECPRI_CC_PHY1_LANE3_RX_CLK 100
+#define ECPRI_CC_PHY1_LANE3_TX_CLK 101
+#define ECPRI_CC_PHY2_LANE0_RX_CLK 102
+#define ECPRI_CC_PHY2_LANE0_TX_CLK 103
+#define ECPRI_CC_PHY2_LANE1_RX_CLK 104
+#define ECPRI_CC_PHY2_LANE1_TX_CLK 105
+#define ECPRI_CC_PHY2_LANE2_RX_CLK 106
+#define ECPRI_CC_PHY2_LANE2_TX_CLK 107
+#define ECPRI_CC_PHY2_LANE3_RX_CLK 108
+#define ECPRI_CC_PHY2_LANE3_TX_CLK 109
+#define ECPRI_CC_PHY3_LANE0_RX_CLK 110
+#define ECPRI_CC_PHY3_LANE0_TX_CLK 111
+#define ECPRI_CC_PHY3_LANE1_RX_CLK 112
+#define ECPRI_CC_PHY3_LANE1_TX_CLK 113
+#define ECPRI_CC_PHY3_LANE2_RX_CLK 114
+#define ECPRI_CC_PHY3_LANE2_TX_CLK 115
+#define ECPRI_CC_PHY3_LANE3_RX_CLK 116
+#define ECPRI_CC_PHY3_LANE3_TX_CLK 117
+#define ECPRI_CC_PHY4_LANE0_RX_CLK 118
+#define ECPRI_CC_PHY4_LANE0_TX_CLK 119
+#define ECPRI_CC_PHY4_LANE1_RX_CLK 120
+#define ECPRI_CC_PHY4_LANE1_TX_CLK 121
+#define ECPRI_CC_PHY4_LANE2_RX_CLK 122
+#define ECPRI_CC_PHY4_LANE2_TX_CLK 123
+#define ECPRI_CC_PHY4_LANE3_RX_CLK 124
+#define ECPRI_CC_PHY4_LANE3_TX_CLK 125
+
+/* ECPRI_CC resets */
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ECPRI_SS_BCR 0
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_C2C_BCR 1
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_FH0_BCR 2
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_FH1_BCR 3
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_FH2_BCR 4
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_WRAPPER_TOP_BCR 5
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_MODEM_BCR 6
+#define ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_NOC_BCR 7
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-gcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-gcc.h
index ddbc6b825e80..2fd36cbfddbb 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-gcc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,qdu1000-gcc.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
/*
- * Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _DT_BINDINGS_CLK_QCOM_GCC_QDU1000_H
@@ -138,6 +138,8 @@
#define GCC_AGGRE_NOC_ECPRI_GSI_CLK 128
#define GCC_PCIE_0_PIPE_CLK_SRC 129
#define GCC_PCIE_0_PHY_AUX_CLK_SRC 130
+#define GCC_GPLL1_OUT_EVEN 131
+#define GCC_DDRSS_ECPRI_GSI_CLK 132
/* GCC resets */
#define GCC_ECPRI_CC_BCR 0
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sc8280xp-camcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sc8280xp-camcc.h
new file mode 100644
index 000000000000..ea5ec73c8c6a
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sc8280xp-camcc.h
@@ -0,0 +1,179 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Ltd.
+ */
+
+#ifndef __DT_BINDINGS_CLK_QCOM_CAMCC_SC8280XP_H__
+#define __DT_BINDINGS_CLK_QCOM_CAMCC_SC8280XP_H__
+
+/* CAMCC clocks */
+#define CAMCC_PLL0 0
+#define CAMCC_PLL0_OUT_EVEN 1
+#define CAMCC_PLL0_OUT_ODD 2
+#define CAMCC_PLL1 3
+#define CAMCC_PLL1_OUT_EVEN 4
+#define CAMCC_PLL2 5
+#define CAMCC_PLL3 6
+#define CAMCC_PLL3_OUT_EVEN 7
+#define CAMCC_PLL4 8
+#define CAMCC_PLL4_OUT_EVEN 9
+#define CAMCC_PLL5 10
+#define CAMCC_PLL5_OUT_EVEN 11
+#define CAMCC_PLL6 12
+#define CAMCC_PLL6_OUT_EVEN 13
+#define CAMCC_PLL7 14
+#define CAMCC_PLL7_OUT_EVEN 15
+#define CAMCC_PLL7_OUT_ODD 16
+#define CAMCC_BPS_AHB_CLK 17
+#define CAMCC_BPS_AREG_CLK 18
+#define CAMCC_BPS_AXI_CLK 19
+#define CAMCC_BPS_CLK 20
+#define CAMCC_BPS_CLK_SRC 21
+#define CAMCC_CAMNOC_AXI_CLK 22
+#define CAMCC_CAMNOC_AXI_CLK_SRC 23
+#define CAMCC_CAMNOC_DCD_XO_CLK 24
+#define CAMCC_CCI_0_CLK 25
+#define CAMCC_CCI_0_CLK_SRC 26
+#define CAMCC_CCI_1_CLK 27
+#define CAMCC_CCI_1_CLK_SRC 28
+#define CAMCC_CCI_2_CLK 29
+#define CAMCC_CCI_2_CLK_SRC 30
+#define CAMCC_CCI_3_CLK 31
+#define CAMCC_CCI_3_CLK_SRC 32
+#define CAMCC_CORE_AHB_CLK 33
+#define CAMCC_CPAS_AHB_CLK 34
+#define CAMCC_CPHY_RX_CLK_SRC 35
+#define CAMCC_CSI0PHYTIMER_CLK 36
+#define CAMCC_CSI0PHYTIMER_CLK_SRC 37
+#define CAMCC_CSI1PHYTIMER_CLK 38
+#define CAMCC_CSI1PHYTIMER_CLK_SRC 39
+#define CAMCC_CSI2PHYTIMER_CLK 40
+#define CAMCC_CSI2PHYTIMER_CLK_SRC 41
+#define CAMCC_CSI3PHYTIMER_CLK 42
+#define CAMCC_CSI3PHYTIMER_CLK_SRC 43
+#define CAMCC_CSIPHY0_CLK 44
+#define CAMCC_CSIPHY1_CLK 45
+#define CAMCC_CSIPHY2_CLK 46
+#define CAMCC_CSIPHY3_CLK 47
+#define CAMCC_FAST_AHB_CLK_SRC 48
+#define CAMCC_GDSC_CLK 49
+#define CAMCC_ICP_AHB_CLK 50
+#define CAMCC_ICP_CLK 51
+#define CAMCC_ICP_CLK_SRC 52
+#define CAMCC_IFE_0_AXI_CLK 53
+#define CAMCC_IFE_0_CLK 54
+#define CAMCC_IFE_0_CLK_SRC 55
+#define CAMCC_IFE_0_CPHY_RX_CLK 56
+#define CAMCC_IFE_0_CSID_CLK 57
+#define CAMCC_IFE_0_CSID_CLK_SRC 58
+#define CAMCC_IFE_0_DSP_CLK 59
+#define CAMCC_IFE_1_AXI_CLK 60
+#define CAMCC_IFE_1_CLK 61
+#define CAMCC_IFE_1_CLK_SRC 62
+#define CAMCC_IFE_1_CPHY_RX_CLK 63
+#define CAMCC_IFE_1_CSID_CLK 64
+#define CAMCC_IFE_1_CSID_CLK_SRC 65
+#define CAMCC_IFE_1_DSP_CLK 66
+#define CAMCC_IFE_2_AXI_CLK 67
+#define CAMCC_IFE_2_CLK 68
+#define CAMCC_IFE_2_CLK_SRC 69
+#define CAMCC_IFE_2_CPHY_RX_CLK 70
+#define CAMCC_IFE_2_CSID_CLK 71
+#define CAMCC_IFE_2_CSID_CLK_SRC 72
+#define CAMCC_IFE_2_DSP_CLK 73
+#define CAMCC_IFE_3_AXI_CLK 74
+#define CAMCC_IFE_3_CLK 75
+#define CAMCC_IFE_3_CLK_SRC 76
+#define CAMCC_IFE_3_CPHY_RX_CLK 77
+#define CAMCC_IFE_3_CSID_CLK 78
+#define CAMCC_IFE_3_CSID_CLK_SRC 79
+#define CAMCC_IFE_3_DSP_CLK 80
+#define CAMCC_IFE_LITE_0_CLK 81
+#define CAMCC_IFE_LITE_0_CLK_SRC 82
+#define CAMCC_IFE_LITE_0_CPHY_RX_CLK 83
+#define CAMCC_IFE_LITE_0_CSID_CLK 84
+#define CAMCC_IFE_LITE_0_CSID_CLK_SRC 85
+#define CAMCC_IFE_LITE_1_CLK 86
+#define CAMCC_IFE_LITE_1_CLK_SRC 87
+#define CAMCC_IFE_LITE_1_CPHY_RX_CLK 88
+#define CAMCC_IFE_LITE_1_CSID_CLK 89
+#define CAMCC_IFE_LITE_1_CSID_CLK_SRC 90
+#define CAMCC_IFE_LITE_2_CLK 91
+#define CAMCC_IFE_LITE_2_CLK_SRC 92
+#define CAMCC_IFE_LITE_2_CPHY_RX_CLK 93
+#define CAMCC_IFE_LITE_2_CSID_CLK 94
+#define CAMCC_IFE_LITE_2_CSID_CLK_SRC 95
+#define CAMCC_IFE_LITE_3_CLK 96
+#define CAMCC_IFE_LITE_3_CLK_SRC 97
+#define CAMCC_IFE_LITE_3_CPHY_RX_CLK 98
+#define CAMCC_IFE_LITE_3_CSID_CLK 99
+#define CAMCC_IFE_LITE_3_CSID_CLK_SRC 100
+#define CAMCC_IPE_0_AHB_CLK 101
+#define CAMCC_IPE_0_AREG_CLK 102
+#define CAMCC_IPE_0_AXI_CLK 103
+#define CAMCC_IPE_0_CLK 104
+#define CAMCC_IPE_0_CLK_SRC 105
+#define CAMCC_IPE_1_AHB_CLK 106
+#define CAMCC_IPE_1_AREG_CLK 107
+#define CAMCC_IPE_1_AXI_CLK 108
+#define CAMCC_IPE_1_CLK 109
+#define CAMCC_JPEG_CLK 110
+#define CAMCC_JPEG_CLK_SRC 111
+#define CAMCC_LRME_CLK 112
+#define CAMCC_LRME_CLK_SRC 113
+#define CAMCC_MCLK0_CLK 114
+#define CAMCC_MCLK0_CLK_SRC 115
+#define CAMCC_MCLK1_CLK 116
+#define CAMCC_MCLK1_CLK_SRC 117
+#define CAMCC_MCLK2_CLK 118
+#define CAMCC_MCLK2_CLK_SRC 119
+#define CAMCC_MCLK3_CLK 120
+#define CAMCC_MCLK3_CLK_SRC 121
+#define CAMCC_MCLK4_CLK 122
+#define CAMCC_MCLK4_CLK_SRC 123
+#define CAMCC_MCLK5_CLK 124
+#define CAMCC_MCLK5_CLK_SRC 125
+#define CAMCC_MCLK6_CLK 126
+#define CAMCC_MCLK6_CLK_SRC 127
+#define CAMCC_MCLK7_CLK 128
+#define CAMCC_MCLK7_CLK_SRC 129
+#define CAMCC_SLEEP_CLK 130
+#define CAMCC_SLEEP_CLK_SRC 131
+#define CAMCC_SLOW_AHB_CLK_SRC 132
+#define CAMCC_XO_CLK_SRC 133
+
+/* CAMCC resets */
+#define CAMCC_BPS_BCR 0
+#define CAMCC_CAMNOC_BCR 1
+#define CAMCC_CCI_BCR 2
+#define CAMCC_CPAS_BCR 3
+#define CAMCC_CSI0PHY_BCR 4
+#define CAMCC_CSI1PHY_BCR 5
+#define CAMCC_CSI2PHY_BCR 6
+#define CAMCC_CSI3PHY_BCR 7
+#define CAMCC_ICP_BCR 8
+#define CAMCC_IFE_0_BCR 9
+#define CAMCC_IFE_1_BCR 10
+#define CAMCC_IFE_2_BCR 11
+#define CAMCC_IFE_3_BCR 12
+#define CAMCC_IFE_LITE_0_BCR 13
+#define CAMCC_IFE_LITE_1_BCR 14
+#define CAMCC_IFE_LITE_2_BCR 15
+#define CAMCC_IFE_LITE_3_BCR 16
+#define CAMCC_IPE_0_BCR 17
+#define CAMCC_IPE_1_BCR 18
+#define CAMCC_JPEG_BCR 19
+#define CAMCC_LRME_BCR 20
+
+/* CAMCC GDSCRs */
+#define BPS_GDSC 0
+#define IFE_0_GDSC 1
+#define IFE_1_GDSC 2
+#define IFE_2_GDSC 3
+#define IFE_3_GDSC 4
+#define IPE_0_GDSC 5
+#define IPE_1_GDSC 6
+#define TITAN_TOP_GDSC 7
+
+#endif /* __DT_BINDINGS_CLK_QCOM_CAMCC_SC8280XP_H__ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm4450-gcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm4450-gcc.h
new file mode 100644
index 000000000000..c18e47a86f40
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm4450-gcc.h
@@ -0,0 +1,197 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_GCC_SM4450_H
+#define _DT_BINDINGS_CLK_QCOM_GCC_SM4450_H
+
+/* GCC clocks */
+#define GCC_AGGRE_NOC_PCIE_0_AXI_CLK 0
+#define GCC_AGGRE_UFS_PHY_AXI_CLK 1
+#define GCC_AGGRE_UFS_PHY_AXI_HW_CTL_CLK 2
+#define GCC_AGGRE_USB3_PRIM_AXI_CLK 3
+#define GCC_BOOT_ROM_AHB_CLK 4
+#define GCC_CAMERA_AHB_CLK 5
+#define GCC_CAMERA_HF_AXI_CLK 6
+#define GCC_CAMERA_SF_AXI_CLK 7
+#define GCC_CAMERA_SLEEP_CLK 8
+#define GCC_CAMERA_XO_CLK 9
+#define GCC_CFG_NOC_PCIE_ANOC_AHB_CLK 10
+#define GCC_CFG_NOC_USB3_PRIM_AXI_CLK 11
+#define GCC_DDRSS_GPU_AXI_CLK 12
+#define GCC_DDRSS_PCIE_SF_TBU_CLK 13
+#define GCC_DISP_AHB_CLK 14
+#define GCC_DISP_HF_AXI_CLK 15
+#define GCC_DISP_XO_CLK 16
+#define GCC_EUSB3_0_CLKREF_EN 17
+#define GCC_GP1_CLK 18
+#define GCC_GP1_CLK_SRC 19
+#define GCC_GP2_CLK 20
+#define GCC_GP2_CLK_SRC 21
+#define GCC_GP3_CLK 22
+#define GCC_GP3_CLK_SRC 23
+#define GCC_GPLL0 24
+#define GCC_GPLL0_OUT_EVEN 25
+#define GCC_GPLL0_OUT_ODD 26
+#define GCC_GPLL1 27
+#define GCC_GPLL3 28
+#define GCC_GPLL4 29
+#define GCC_GPLL9 30
+#define GCC_GPLL10 31
+#define GCC_GPU_CFG_AHB_CLK 32
+#define GCC_GPU_GPLL0_CLK_SRC 33
+#define GCC_GPU_GPLL0_DIV_CLK_SRC 34
+#define GCC_GPU_MEMNOC_GFX_CLK 35
+#define GCC_GPU_SNOC_DVM_GFX_CLK 36
+#define GCC_HLOS1_VOTE_AGGRE_NOC_MMU_AUDIO_TBU_CLK 37
+#define GCC_HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_CLK 38
+#define GCC_HLOS1_VOTE_AGGRE_NOC_MMU_TBU1_CLK 39
+#define GCC_HLOS1_VOTE_AGGRE_NOC_MMU_TBU2_CLK 40
+#define GCC_HLOS1_VOTE_MMNOC_MMU_TBU_HF0_CLK 41
+#define GCC_HLOS1_VOTE_MMNOC_MMU_TBU_HF1_CLK 42
+#define GCC_HLOS1_VOTE_MMNOC_MMU_TBU_SF0_CLK 43
+#define GCC_HLOS1_VOTE_MMU_TCU_CLK 44
+#define GCC_PCIE_0_AUX_CLK 45
+#define GCC_PCIE_0_AUX_CLK_SRC 46
+#define GCC_PCIE_0_CFG_AHB_CLK 47
+#define GCC_PCIE_0_CLKREF_EN 48
+#define GCC_PCIE_0_MSTR_AXI_CLK 49
+#define GCC_PCIE_0_PHY_RCHNG_CLK 50
+#define GCC_PCIE_0_PHY_RCHNG_CLK_SRC 51
+#define GCC_PCIE_0_PIPE_CLK 52
+#define GCC_PCIE_0_PIPE_CLK_SRC 53
+#define GCC_PCIE_0_PIPE_DIV2_CLK 54
+#define GCC_PCIE_0_PIPE_DIV2_CLK_SRC 55
+#define GCC_PCIE_0_SLV_AXI_CLK 56
+#define GCC_PCIE_0_SLV_Q2A_AXI_CLK 57
+#define GCC_PDM2_CLK 58
+#define GCC_PDM2_CLK_SRC 59
+#define GCC_PDM_AHB_CLK 60
+#define GCC_PDM_XO4_CLK 61
+#define GCC_QMIP_CAMERA_NRT_AHB_CLK 62
+#define GCC_QMIP_CAMERA_RT_AHB_CLK 63
+#define GCC_QMIP_DISP_AHB_CLK 64
+#define GCC_QMIP_GPU_AHB_CLK 65
+#define GCC_QMIP_PCIE_AHB_CLK 66
+#define GCC_QMIP_VIDEO_VCODEC_AHB_CLK 67
+#define GCC_QUPV3_WRAP0_CORE_2X_CLK 68
+#define GCC_QUPV3_WRAP0_CORE_CLK 69
+#define GCC_QUPV3_WRAP0_S0_CLK 70
+#define GCC_QUPV3_WRAP0_S0_CLK_SRC 71
+#define GCC_QUPV3_WRAP0_S1_CLK 72
+#define GCC_QUPV3_WRAP0_S1_CLK_SRC 73
+#define GCC_QUPV3_WRAP0_S2_CLK 74
+#define GCC_QUPV3_WRAP0_S2_CLK_SRC 75
+#define GCC_QUPV3_WRAP0_S3_CLK 76
+#define GCC_QUPV3_WRAP0_S3_CLK_SRC 77
+#define GCC_QUPV3_WRAP0_S4_CLK 78
+#define GCC_QUPV3_WRAP0_S4_CLK_SRC 79
+#define GCC_QUPV3_WRAP1_CORE_2X_CLK 80
+#define GCC_QUPV3_WRAP1_CORE_CLK 81
+#define GCC_QUPV3_WRAP1_S0_CLK 82
+#define GCC_QUPV3_WRAP1_S0_CLK_SRC 83
+#define GCC_QUPV3_WRAP1_S1_CLK 84
+#define GCC_QUPV3_WRAP1_S1_CLK_SRC 85
+#define GCC_QUPV3_WRAP1_S2_CLK 86
+#define GCC_QUPV3_WRAP1_S2_CLK_SRC 87
+#define GCC_QUPV3_WRAP1_S3_CLK 88
+#define GCC_QUPV3_WRAP1_S3_CLK_SRC 89
+#define GCC_QUPV3_WRAP1_S4_CLK 90
+#define GCC_QUPV3_WRAP1_S4_CLK_SRC 91
+#define GCC_QUPV3_WRAP_0_M_AHB_CLK 92
+#define GCC_QUPV3_WRAP_0_S_AHB_CLK 93
+#define GCC_QUPV3_WRAP_1_M_AHB_CLK 94
+#define GCC_QUPV3_WRAP_1_S_AHB_CLK 95
+#define GCC_SDCC1_AHB_CLK 96
+#define GCC_SDCC1_APPS_CLK 97
+#define GCC_SDCC1_APPS_CLK_SRC 98
+#define GCC_SDCC1_ICE_CORE_CLK 99
+#define GCC_SDCC1_ICE_CORE_CLK_SRC 100
+#define GCC_SDCC2_AHB_CLK 101
+#define GCC_SDCC2_APPS_CLK 102
+#define GCC_SDCC2_APPS_CLK_SRC 103
+#define GCC_UFS_0_CLKREF_EN 104
+#define GCC_UFS_PAD_CLKREF_EN 105
+#define GCC_UFS_PHY_AHB_CLK 106
+#define GCC_UFS_PHY_AXI_CLK 107
+#define GCC_UFS_PHY_AXI_CLK_SRC 108
+#define GCC_UFS_PHY_AXI_HW_CTL_CLK 109
+#define GCC_UFS_PHY_ICE_CORE_CLK 110
+#define GCC_UFS_PHY_ICE_CORE_CLK_SRC 111
+#define GCC_UFS_PHY_ICE_CORE_HW_CTL_CLK 112
+#define GCC_UFS_PHY_PHY_AUX_CLK 113
+#define GCC_UFS_PHY_PHY_AUX_CLK_SRC 114
+#define GCC_UFS_PHY_PHY_AUX_HW_CTL_CLK 115
+#define GCC_UFS_PHY_RX_SYMBOL_0_CLK 116
+#define GCC_UFS_PHY_RX_SYMBOL_0_CLK_SRC 117
+#define GCC_UFS_PHY_RX_SYMBOL_1_CLK 118
+#define GCC_UFS_PHY_RX_SYMBOL_1_CLK_SRC 119
+#define GCC_UFS_PHY_TX_SYMBOL_0_CLK 120
+#define GCC_UFS_PHY_TX_SYMBOL_0_CLK_SRC 121
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK 122
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC 123
+#define GCC_UFS_PHY_UNIPRO_CORE_HW_CTL_CLK 124
+#define GCC_USB30_PRIM_MASTER_CLK 125
+#define GCC_USB30_PRIM_MASTER_CLK_SRC 126
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK 127
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC 128
+#define GCC_USB30_PRIM_MOCK_UTMI_POSTDIV_CLK_SRC 129
+#define GCC_USB30_PRIM_SLEEP_CLK 130
+#define GCC_USB3_0_CLKREF_EN 131
+#define GCC_USB3_PRIM_PHY_AUX_CLK 132
+#define GCC_USB3_PRIM_PHY_AUX_CLK_SRC 133
+#define GCC_USB3_PRIM_PHY_COM_AUX_CLK 134
+#define GCC_USB3_PRIM_PHY_PIPE_CLK 135
+#define GCC_USB3_PRIM_PHY_PIPE_CLK_SRC 136
+#define GCC_VCODEC0_AXI_CLK 137
+#define GCC_VENUS_CTL_AXI_CLK 138
+#define GCC_VIDEO_AHB_CLK 139
+#define GCC_VIDEO_THROTTLE_CORE_CLK 140
+#define GCC_VIDEO_VCODEC0_SYS_CLK 141
+#define GCC_VIDEO_VENUS_CLK_SRC 142
+#define GCC_VIDEO_VENUS_CTL_CLK 143
+#define GCC_VIDEO_XO_CLK 144
+
+/* GCC power domains */
+#define GCC_PCIE_0_GDSC 0
+#define GCC_UFS_PHY_GDSC 1
+#define GCC_USB30_PRIM_GDSC 2
+#define GCC_VCODEC0_GDSC 3
+#define GCC_VENUS_GDSC 4
+
+/* GCC resets */
+#define GCC_CAMERA_BCR 0
+#define GCC_DISPLAY_BCR 1
+#define GCC_GPU_BCR 2
+#define GCC_PCIE_0_BCR 3
+#define GCC_PCIE_0_LINK_DOWN_BCR 4
+#define GCC_PCIE_0_NOCSR_COM_PHY_BCR 5
+#define GCC_PCIE_0_PHY_BCR 6
+#define GCC_PCIE_0_PHY_NOCSR_COM_PHY_BCR 7
+#define GCC_PCIE_PHY_BCR 8
+#define GCC_PCIE_PHY_CFG_AHB_BCR 9
+#define GCC_PCIE_PHY_COM_BCR 10
+#define GCC_PDM_BCR 11
+#define GCC_QUPV3_WRAPPER_0_BCR 12
+#define GCC_QUPV3_WRAPPER_1_BCR 13
+#define GCC_QUSB2PHY_PRIM_BCR 14
+#define GCC_QUSB2PHY_SEC_BCR 15
+#define GCC_SDCC1_BCR 16
+#define GCC_SDCC2_BCR 17
+#define GCC_UFS_PHY_BCR 18
+#define GCC_USB30_PRIM_BCR 19
+#define GCC_USB3_DP_PHY_PRIM_BCR 20
+#define GCC_USB3_DP_PHY_SEC_BCR 21
+#define GCC_USB3_PHY_PRIM_BCR 22
+#define GCC_USB3_PHY_SEC_BCR 23
+#define GCC_USB3PHY_PHY_PRIM_BCR 24
+#define GCC_USB3PHY_PHY_SEC_BCR 25
+#define GCC_VCODEC0_BCR 26
+#define GCC_VENUS_BCR 27
+#define GCC_VIDEO_BCR 28
+#define GCC_VIDEO_VENUS_BCR 29
+#define GCC_VENUS_CTL_AXI_CLK_ARES 30
+#define GCC_VIDEO_VENUS_CTL_CLK_ARES 31
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8550-camcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8550-camcc.h
new file mode 100644
index 000000000000..a2a256691c2b
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8550-camcc.h
@@ -0,0 +1,187 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_CAM_CC_SM8550_H
+#define _DT_BINDINGS_CLK_QCOM_CAM_CC_SM8550_H
+
+/* CAM_CC clocks */
+#define CAM_CC_BPS_AHB_CLK 0
+#define CAM_CC_BPS_CLK 1
+#define CAM_CC_BPS_CLK_SRC 2
+#define CAM_CC_BPS_FAST_AHB_CLK 3
+#define CAM_CC_CAMNOC_AXI_CLK 4
+#define CAM_CC_CAMNOC_AXI_CLK_SRC 5
+#define CAM_CC_CAMNOC_DCD_XO_CLK 6
+#define CAM_CC_CAMNOC_XO_CLK 7
+#define CAM_CC_CCI_0_CLK 8
+#define CAM_CC_CCI_0_CLK_SRC 9
+#define CAM_CC_CCI_1_CLK 10
+#define CAM_CC_CCI_1_CLK_SRC 11
+#define CAM_CC_CCI_2_CLK 12
+#define CAM_CC_CCI_2_CLK_SRC 13
+#define CAM_CC_CORE_AHB_CLK 14
+#define CAM_CC_CPAS_AHB_CLK 15
+#define CAM_CC_CPAS_BPS_CLK 16
+#define CAM_CC_CPAS_CRE_CLK 17
+#define CAM_CC_CPAS_FAST_AHB_CLK 18
+#define CAM_CC_CPAS_IFE_0_CLK 19
+#define CAM_CC_CPAS_IFE_1_CLK 20
+#define CAM_CC_CPAS_IFE_2_CLK 21
+#define CAM_CC_CPAS_IFE_LITE_CLK 22
+#define CAM_CC_CPAS_IPE_NPS_CLK 23
+#define CAM_CC_CPAS_SBI_CLK 24
+#define CAM_CC_CPAS_SFE_0_CLK 25
+#define CAM_CC_CPAS_SFE_1_CLK 26
+#define CAM_CC_CPHY_RX_CLK_SRC 27
+#define CAM_CC_CRE_AHB_CLK 28
+#define CAM_CC_CRE_CLK 29
+#define CAM_CC_CRE_CLK_SRC 30
+#define CAM_CC_CSI0PHYTIMER_CLK 31
+#define CAM_CC_CSI0PHYTIMER_CLK_SRC 32
+#define CAM_CC_CSI1PHYTIMER_CLK 33
+#define CAM_CC_CSI1PHYTIMER_CLK_SRC 34
+#define CAM_CC_CSI2PHYTIMER_CLK 35
+#define CAM_CC_CSI2PHYTIMER_CLK_SRC 36
+#define CAM_CC_CSI3PHYTIMER_CLK 37
+#define CAM_CC_CSI3PHYTIMER_CLK_SRC 38
+#define CAM_CC_CSI4PHYTIMER_CLK 39
+#define CAM_CC_CSI4PHYTIMER_CLK_SRC 40
+#define CAM_CC_CSI5PHYTIMER_CLK 41
+#define CAM_CC_CSI5PHYTIMER_CLK_SRC 42
+#define CAM_CC_CSI6PHYTIMER_CLK 43
+#define CAM_CC_CSI6PHYTIMER_CLK_SRC 44
+#define CAM_CC_CSI7PHYTIMER_CLK 45
+#define CAM_CC_CSI7PHYTIMER_CLK_SRC 46
+#define CAM_CC_CSID_CLK 47
+#define CAM_CC_CSID_CLK_SRC 48
+#define CAM_CC_CSID_CSIPHY_RX_CLK 49
+#define CAM_CC_CSIPHY0_CLK 50
+#define CAM_CC_CSIPHY1_CLK 51
+#define CAM_CC_CSIPHY2_CLK 52
+#define CAM_CC_CSIPHY3_CLK 53
+#define CAM_CC_CSIPHY4_CLK 54
+#define CAM_CC_CSIPHY5_CLK 55
+#define CAM_CC_CSIPHY6_CLK 56
+#define CAM_CC_CSIPHY7_CLK 57
+#define CAM_CC_DRV_AHB_CLK 58
+#define CAM_CC_DRV_XO_CLK 59
+#define CAM_CC_FAST_AHB_CLK_SRC 60
+#define CAM_CC_GDSC_CLK 61
+#define CAM_CC_ICP_AHB_CLK 62
+#define CAM_CC_ICP_CLK 63
+#define CAM_CC_ICP_CLK_SRC 64
+#define CAM_CC_IFE_0_CLK 65
+#define CAM_CC_IFE_0_CLK_SRC 66
+#define CAM_CC_IFE_0_DSP_CLK 67
+#define CAM_CC_IFE_0_DSP_CLK_SRC 68
+#define CAM_CC_IFE_0_FAST_AHB_CLK 69
+#define CAM_CC_IFE_1_CLK 70
+#define CAM_CC_IFE_1_CLK_SRC 71
+#define CAM_CC_IFE_1_DSP_CLK 72
+#define CAM_CC_IFE_1_DSP_CLK_SRC 73
+#define CAM_CC_IFE_1_FAST_AHB_CLK 74
+#define CAM_CC_IFE_2_CLK 75
+#define CAM_CC_IFE_2_CLK_SRC 76
+#define CAM_CC_IFE_2_DSP_CLK 77
+#define CAM_CC_IFE_2_DSP_CLK_SRC 78
+#define CAM_CC_IFE_2_FAST_AHB_CLK 79
+#define CAM_CC_IFE_LITE_AHB_CLK 80
+#define CAM_CC_IFE_LITE_CLK 81
+#define CAM_CC_IFE_LITE_CLK_SRC 82
+#define CAM_CC_IFE_LITE_CPHY_RX_CLK 83
+#define CAM_CC_IFE_LITE_CSID_CLK 84
+#define CAM_CC_IFE_LITE_CSID_CLK_SRC 85
+#define CAM_CC_IPE_NPS_AHB_CLK 86
+#define CAM_CC_IPE_NPS_CLK 87
+#define CAM_CC_IPE_NPS_CLK_SRC 88
+#define CAM_CC_IPE_NPS_FAST_AHB_CLK 89
+#define CAM_CC_IPE_PPS_CLK 90
+#define CAM_CC_IPE_PPS_FAST_AHB_CLK 91
+#define CAM_CC_JPEG_1_CLK 92
+#define CAM_CC_JPEG_CLK 93
+#define CAM_CC_JPEG_CLK_SRC 94
+#define CAM_CC_MCLK0_CLK 95
+#define CAM_CC_MCLK0_CLK_SRC 96
+#define CAM_CC_MCLK1_CLK 97
+#define CAM_CC_MCLK1_CLK_SRC 98
+#define CAM_CC_MCLK2_CLK 99
+#define CAM_CC_MCLK2_CLK_SRC 100
+#define CAM_CC_MCLK3_CLK 101
+#define CAM_CC_MCLK3_CLK_SRC 102
+#define CAM_CC_MCLK4_CLK 103
+#define CAM_CC_MCLK4_CLK_SRC 104
+#define CAM_CC_MCLK5_CLK 105
+#define CAM_CC_MCLK5_CLK_SRC 106
+#define CAM_CC_MCLK6_CLK 107
+#define CAM_CC_MCLK6_CLK_SRC 108
+#define CAM_CC_MCLK7_CLK 109
+#define CAM_CC_MCLK7_CLK_SRC 110
+#define CAM_CC_PLL0 111
+#define CAM_CC_PLL0_OUT_EVEN 112
+#define CAM_CC_PLL0_OUT_ODD 113
+#define CAM_CC_PLL1 114
+#define CAM_CC_PLL1_OUT_EVEN 115
+#define CAM_CC_PLL2 116
+#define CAM_CC_PLL3 117
+#define CAM_CC_PLL3_OUT_EVEN 118
+#define CAM_CC_PLL4 119
+#define CAM_CC_PLL4_OUT_EVEN 120
+#define CAM_CC_PLL5 121
+#define CAM_CC_PLL5_OUT_EVEN 122
+#define CAM_CC_PLL6 123
+#define CAM_CC_PLL6_OUT_EVEN 124
+#define CAM_CC_PLL7 125
+#define CAM_CC_PLL7_OUT_EVEN 126
+#define CAM_CC_PLL8 127
+#define CAM_CC_PLL8_OUT_EVEN 128
+#define CAM_CC_PLL9 129
+#define CAM_CC_PLL9_OUT_EVEN 130
+#define CAM_CC_PLL10 131
+#define CAM_CC_PLL10_OUT_EVEN 132
+#define CAM_CC_PLL11 133
+#define CAM_CC_PLL11_OUT_EVEN 134
+#define CAM_CC_PLL12 135
+#define CAM_CC_PLL12_OUT_EVEN 136
+#define CAM_CC_QDSS_DEBUG_CLK 137
+#define CAM_CC_QDSS_DEBUG_CLK_SRC 138
+#define CAM_CC_QDSS_DEBUG_XO_CLK 139
+#define CAM_CC_SBI_CLK 140
+#define CAM_CC_SBI_FAST_AHB_CLK 141
+#define CAM_CC_SFE_0_CLK 142
+#define CAM_CC_SFE_0_CLK_SRC 143
+#define CAM_CC_SFE_0_FAST_AHB_CLK 144
+#define CAM_CC_SFE_1_CLK 145
+#define CAM_CC_SFE_1_CLK_SRC 146
+#define CAM_CC_SFE_1_FAST_AHB_CLK 147
+#define CAM_CC_SLEEP_CLK 148
+#define CAM_CC_SLEEP_CLK_SRC 149
+#define CAM_CC_SLOW_AHB_CLK_SRC 150
+#define CAM_CC_XO_CLK_SRC 151
+
+/* CAM_CC power domains */
+#define CAM_CC_BPS_GDSC 0
+#define CAM_CC_IFE_0_GDSC 1
+#define CAM_CC_IFE_1_GDSC 2
+#define CAM_CC_IFE_2_GDSC 3
+#define CAM_CC_IPE_0_GDSC 4
+#define CAM_CC_SBI_GDSC 5
+#define CAM_CC_SFE_0_GDSC 6
+#define CAM_CC_SFE_1_GDSC 7
+#define CAM_CC_TITAN_TOP_GDSC 8
+
+/* CAM_CC resets */
+#define CAM_CC_BPS_BCR 0
+#define CAM_CC_DRV_BCR 1
+#define CAM_CC_ICP_BCR 2
+#define CAM_CC_IFE_0_BCR 3
+#define CAM_CC_IFE_1_BCR 4
+#define CAM_CC_IFE_2_BCR 5
+#define CAM_CC_IPE_0_BCR 6
+#define CAM_CC_QDSS_DEBUG_BCR 7
+#define CAM_CC_SBI_BCR 8
+#define CAM_CC_SFE_0_BCR 9
+#define CAM_CC_SFE_1_BCR 10
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-dispcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-dispcc.h
new file mode 100644
index 000000000000..b0a668b395a5
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-dispcc.h
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved
+ * Copyright (c) 2023, Linaro Ltd.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_SM8650_DISP_CC_H
+#define _DT_BINDINGS_CLK_QCOM_SM8650_DISP_CC_H
+
+/* DISP_CC clocks */
+#define DISP_CC_MDSS_ACCU_CLK 0
+#define DISP_CC_MDSS_AHB1_CLK 1
+#define DISP_CC_MDSS_AHB_CLK 2
+#define DISP_CC_MDSS_AHB_CLK_SRC 3
+#define DISP_CC_MDSS_BYTE0_CLK 4
+#define DISP_CC_MDSS_BYTE0_CLK_SRC 5
+#define DISP_CC_MDSS_BYTE0_DIV_CLK_SRC 6
+#define DISP_CC_MDSS_BYTE0_INTF_CLK 7
+#define DISP_CC_MDSS_BYTE1_CLK 8
+#define DISP_CC_MDSS_BYTE1_CLK_SRC 9
+#define DISP_CC_MDSS_BYTE1_DIV_CLK_SRC 10
+#define DISP_CC_MDSS_BYTE1_INTF_CLK 11
+#define DISP_CC_MDSS_DPTX0_AUX_CLK 12
+#define DISP_CC_MDSS_DPTX0_AUX_CLK_SRC 13
+#define DISP_CC_MDSS_DPTX0_CRYPTO_CLK 14
+#define DISP_CC_MDSS_DPTX0_LINK_CLK 15
+#define DISP_CC_MDSS_DPTX0_LINK_CLK_SRC 16
+#define DISP_CC_MDSS_DPTX0_LINK_DIV_CLK_SRC 17
+#define DISP_CC_MDSS_DPTX0_LINK_INTF_CLK 18
+#define DISP_CC_MDSS_DPTX0_PIXEL0_CLK 19
+#define DISP_CC_MDSS_DPTX0_PIXEL0_CLK_SRC 20
+#define DISP_CC_MDSS_DPTX0_PIXEL1_CLK 21
+#define DISP_CC_MDSS_DPTX0_PIXEL1_CLK_SRC 22
+#define DISP_CC_MDSS_DPTX0_USB_ROUTER_LINK_INTF_CLK 23
+#define DISP_CC_MDSS_DPTX1_AUX_CLK 24
+#define DISP_CC_MDSS_DPTX1_AUX_CLK_SRC 25
+#define DISP_CC_MDSS_DPTX1_CRYPTO_CLK 26
+#define DISP_CC_MDSS_DPTX1_LINK_CLK 27
+#define DISP_CC_MDSS_DPTX1_LINK_CLK_SRC 28
+#define DISP_CC_MDSS_DPTX1_LINK_DIV_CLK_SRC 29
+#define DISP_CC_MDSS_DPTX1_LINK_INTF_CLK 30
+#define DISP_CC_MDSS_DPTX1_PIXEL0_CLK 31
+#define DISP_CC_MDSS_DPTX1_PIXEL0_CLK_SRC 32
+#define DISP_CC_MDSS_DPTX1_PIXEL1_CLK 33
+#define DISP_CC_MDSS_DPTX1_PIXEL1_CLK_SRC 34
+#define DISP_CC_MDSS_DPTX1_USB_ROUTER_LINK_INTF_CLK 35
+#define DISP_CC_MDSS_DPTX2_AUX_CLK 36
+#define DISP_CC_MDSS_DPTX2_AUX_CLK_SRC 37
+#define DISP_CC_MDSS_DPTX2_CRYPTO_CLK 38
+#define DISP_CC_MDSS_DPTX2_LINK_CLK 39
+#define DISP_CC_MDSS_DPTX2_LINK_CLK_SRC 40
+#define DISP_CC_MDSS_DPTX2_LINK_DIV_CLK_SRC 41
+#define DISP_CC_MDSS_DPTX2_LINK_INTF_CLK 42
+#define DISP_CC_MDSS_DPTX2_PIXEL0_CLK 43
+#define DISP_CC_MDSS_DPTX2_PIXEL0_CLK_SRC 44
+#define DISP_CC_MDSS_DPTX2_PIXEL1_CLK 45
+#define DISP_CC_MDSS_DPTX2_PIXEL1_CLK_SRC 46
+#define DISP_CC_MDSS_DPTX3_AUX_CLK 47
+#define DISP_CC_MDSS_DPTX3_AUX_CLK_SRC 48
+#define DISP_CC_MDSS_DPTX3_CRYPTO_CLK 49
+#define DISP_CC_MDSS_DPTX3_LINK_CLK 50
+#define DISP_CC_MDSS_DPTX3_LINK_CLK_SRC 51
+#define DISP_CC_MDSS_DPTX3_LINK_DIV_CLK_SRC 52
+#define DISP_CC_MDSS_DPTX3_LINK_INTF_CLK 53
+#define DISP_CC_MDSS_DPTX3_PIXEL0_CLK 54
+#define DISP_CC_MDSS_DPTX3_PIXEL0_CLK_SRC 55
+#define DISP_CC_MDSS_ESC0_CLK 56
+#define DISP_CC_MDSS_ESC0_CLK_SRC 57
+#define DISP_CC_MDSS_ESC1_CLK 58
+#define DISP_CC_MDSS_ESC1_CLK_SRC 59
+#define DISP_CC_MDSS_MDP1_CLK 60
+#define DISP_CC_MDSS_MDP_CLK 61
+#define DISP_CC_MDSS_MDP_CLK_SRC 62
+#define DISP_CC_MDSS_MDP_LUT1_CLK 63
+#define DISP_CC_MDSS_MDP_LUT_CLK 64
+#define DISP_CC_MDSS_NON_GDSC_AHB_CLK 65
+#define DISP_CC_MDSS_PCLK0_CLK 66
+#define DISP_CC_MDSS_PCLK0_CLK_SRC 67
+#define DISP_CC_MDSS_PCLK1_CLK 68
+#define DISP_CC_MDSS_PCLK1_CLK_SRC 69
+#define DISP_CC_MDSS_RSCC_AHB_CLK 70
+#define DISP_CC_MDSS_RSCC_VSYNC_CLK 71
+#define DISP_CC_MDSS_VSYNC1_CLK 72
+#define DISP_CC_MDSS_VSYNC_CLK 73
+#define DISP_CC_MDSS_VSYNC_CLK_SRC 74
+#define DISP_CC_PLL0 75
+#define DISP_CC_PLL1 76
+#define DISP_CC_SLEEP_CLK 77
+#define DISP_CC_SLEEP_CLK_SRC 78
+#define DISP_CC_XO_CLK 79
+#define DISP_CC_XO_CLK_SRC 80
+
+/* DISP_CC resets */
+#define DISP_CC_MDSS_CORE_BCR 0
+#define DISP_CC_MDSS_CORE_INT2_BCR 1
+#define DISP_CC_MDSS_RSCC_BCR 2
+
+/* DISP_CC GDSCR */
+#define MDSS_GDSC 0
+#define MDSS_INT2_GDSC 1
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gcc.h
new file mode 100644
index 000000000000..0c543ba46079
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gcc.h
@@ -0,0 +1,254 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_GCC_SM8650_H
+#define _DT_BINDINGS_CLK_QCOM_GCC_SM8650_H
+
+/* GCC clocks */
+#define GCC_AGGRE_NOC_PCIE_AXI_CLK 0
+#define GCC_AGGRE_UFS_PHY_AXI_CLK 1
+#define GCC_AGGRE_UFS_PHY_AXI_HW_CTL_CLK 2
+#define GCC_AGGRE_USB3_PRIM_AXI_CLK 3
+#define GCC_BOOT_ROM_AHB_CLK 4
+#define GCC_CAMERA_AHB_CLK 5
+#define GCC_CAMERA_HF_AXI_CLK 6
+#define GCC_CAMERA_SF_AXI_CLK 7
+#define GCC_CAMERA_XO_CLK 8
+#define GCC_CFG_NOC_PCIE_ANOC_AHB_CLK 9
+#define GCC_CFG_NOC_USB3_PRIM_AXI_CLK 10
+#define GCC_CNOC_PCIE_SF_AXI_CLK 11
+#define GCC_DDRSS_GPU_AXI_CLK 12
+#define GCC_DDRSS_PCIE_SF_QTB_CLK 13
+#define GCC_DISP_AHB_CLK 14
+#define GCC_DISP_HF_AXI_CLK 15
+#define GCC_DISP_XO_CLK 16
+#define GCC_GP1_CLK 17
+#define GCC_GP1_CLK_SRC 18
+#define GCC_GP2_CLK 19
+#define GCC_GP2_CLK_SRC 20
+#define GCC_GP3_CLK 21
+#define GCC_GP3_CLK_SRC 22
+#define GCC_GPLL0 23
+#define GCC_GPLL0_OUT_EVEN 24
+#define GCC_GPLL1 25
+#define GCC_GPLL3 26
+#define GCC_GPLL4 27
+#define GCC_GPLL6 28
+#define GCC_GPLL7 29
+#define GCC_GPLL9 30
+#define GCC_GPU_CFG_AHB_CLK 31
+#define GCC_GPU_GPLL0_CLK_SRC 32
+#define GCC_GPU_GPLL0_DIV_CLK_SRC 33
+#define GCC_GPU_MEMNOC_GFX_CLK 34
+#define GCC_GPU_SNOC_DVM_GFX_CLK 35
+#define GCC_PCIE_0_AUX_CLK 36
+#define GCC_PCIE_0_AUX_CLK_SRC 37
+#define GCC_PCIE_0_CFG_AHB_CLK 38
+#define GCC_PCIE_0_MSTR_AXI_CLK 39
+#define GCC_PCIE_0_PHY_RCHNG_CLK 40
+#define GCC_PCIE_0_PHY_RCHNG_CLK_SRC 41
+#define GCC_PCIE_0_PIPE_CLK 42
+#define GCC_PCIE_0_PIPE_CLK_SRC 43
+#define GCC_PCIE_0_SLV_AXI_CLK 44
+#define GCC_PCIE_0_SLV_Q2A_AXI_CLK 45
+#define GCC_PCIE_1_AUX_CLK 46
+#define GCC_PCIE_1_AUX_CLK_SRC 47
+#define GCC_PCIE_1_CFG_AHB_CLK 48
+#define GCC_PCIE_1_MSTR_AXI_CLK 49
+#define GCC_PCIE_1_PHY_AUX_CLK 50
+#define GCC_PCIE_1_PHY_AUX_CLK_SRC 51
+#define GCC_PCIE_1_PHY_RCHNG_CLK 52
+#define GCC_PCIE_1_PHY_RCHNG_CLK_SRC 53
+#define GCC_PCIE_1_PIPE_CLK 54
+#define GCC_PCIE_1_PIPE_CLK_SRC 55
+#define GCC_PCIE_1_SLV_AXI_CLK 56
+#define GCC_PCIE_1_SLV_Q2A_AXI_CLK 57
+#define GCC_PDM2_CLK 58
+#define GCC_PDM2_CLK_SRC 59
+#define GCC_PDM_AHB_CLK 60
+#define GCC_PDM_XO4_CLK 61
+#define GCC_QMIP_CAMERA_NRT_AHB_CLK 62
+#define GCC_QMIP_CAMERA_RT_AHB_CLK 63
+#define GCC_QMIP_DISP_AHB_CLK 64
+#define GCC_QMIP_GPU_AHB_CLK 65
+#define GCC_QMIP_PCIE_AHB_CLK 66
+#define GCC_QMIP_VIDEO_CV_CPU_AHB_CLK 67
+#define GCC_QMIP_VIDEO_CVP_AHB_CLK 68
+#define GCC_QMIP_VIDEO_V_CPU_AHB_CLK 69
+#define GCC_QMIP_VIDEO_VCODEC_AHB_CLK 70
+#define GCC_QUPV3_I2C_CORE_CLK 71
+#define GCC_QUPV3_I2C_S0_CLK 72
+#define GCC_QUPV3_I2C_S0_CLK_SRC 73
+#define GCC_QUPV3_I2C_S1_CLK 74
+#define GCC_QUPV3_I2C_S1_CLK_SRC 75
+#define GCC_QUPV3_I2C_S2_CLK 76
+#define GCC_QUPV3_I2C_S2_CLK_SRC 77
+#define GCC_QUPV3_I2C_S3_CLK 78
+#define GCC_QUPV3_I2C_S3_CLK_SRC 79
+#define GCC_QUPV3_I2C_S4_CLK 80
+#define GCC_QUPV3_I2C_S4_CLK_SRC 81
+#define GCC_QUPV3_I2C_S5_CLK 82
+#define GCC_QUPV3_I2C_S5_CLK_SRC 83
+#define GCC_QUPV3_I2C_S6_CLK 84
+#define GCC_QUPV3_I2C_S6_CLK_SRC 85
+#define GCC_QUPV3_I2C_S7_CLK 86
+#define GCC_QUPV3_I2C_S7_CLK_SRC 87
+#define GCC_QUPV3_I2C_S8_CLK 88
+#define GCC_QUPV3_I2C_S8_CLK_SRC 89
+#define GCC_QUPV3_I2C_S9_CLK 90
+#define GCC_QUPV3_I2C_S9_CLK_SRC 91
+#define GCC_QUPV3_I2C_S_AHB_CLK 92
+#define GCC_QUPV3_WRAP1_CORE_2X_CLK 93
+#define GCC_QUPV3_WRAP1_CORE_CLK 94
+#define GCC_QUPV3_WRAP1_QSPI_REF_CLK 95
+#define GCC_QUPV3_WRAP1_QSPI_REF_CLK_SRC 96
+#define GCC_QUPV3_WRAP1_S0_CLK 97
+#define GCC_QUPV3_WRAP1_S0_CLK_SRC 98
+#define GCC_QUPV3_WRAP1_S1_CLK 99
+#define GCC_QUPV3_WRAP1_S1_CLK_SRC 100
+#define GCC_QUPV3_WRAP1_S2_CLK 101
+#define GCC_QUPV3_WRAP1_S2_CLK_SRC 102
+#define GCC_QUPV3_WRAP1_S3_CLK 103
+#define GCC_QUPV3_WRAP1_S3_CLK_SRC 104
+#define GCC_QUPV3_WRAP1_S4_CLK 105
+#define GCC_QUPV3_WRAP1_S4_CLK_SRC 106
+#define GCC_QUPV3_WRAP1_S5_CLK 107
+#define GCC_QUPV3_WRAP1_S5_CLK_SRC 108
+#define GCC_QUPV3_WRAP1_S6_CLK 109
+#define GCC_QUPV3_WRAP1_S6_CLK_SRC 110
+#define GCC_QUPV3_WRAP1_S7_CLK 111
+#define GCC_QUPV3_WRAP1_S7_CLK_SRC 112
+#define GCC_QUPV3_WRAP2_CORE_2X_CLK 113
+#define GCC_QUPV3_WRAP2_CORE_CLK 114
+#define GCC_QUPV3_WRAP2_IBI_CTRL_0_CLK_SRC 115
+#define GCC_QUPV3_WRAP2_IBI_CTRL_2_CLK 116
+#define GCC_QUPV3_WRAP2_IBI_CTRL_3_CLK 117
+#define GCC_QUPV3_WRAP2_S0_CLK 118
+#define GCC_QUPV3_WRAP2_S0_CLK_SRC 119
+#define GCC_QUPV3_WRAP2_S1_CLK 120
+#define GCC_QUPV3_WRAP2_S1_CLK_SRC 121
+#define GCC_QUPV3_WRAP2_S2_CLK 122
+#define GCC_QUPV3_WRAP2_S2_CLK_SRC 123
+#define GCC_QUPV3_WRAP2_S3_CLK 124
+#define GCC_QUPV3_WRAP2_S3_CLK_SRC 125
+#define GCC_QUPV3_WRAP2_S4_CLK 126
+#define GCC_QUPV3_WRAP2_S4_CLK_SRC 127
+#define GCC_QUPV3_WRAP2_S5_CLK 128
+#define GCC_QUPV3_WRAP2_S5_CLK_SRC 129
+#define GCC_QUPV3_WRAP2_S6_CLK 130
+#define GCC_QUPV3_WRAP2_S6_CLK_SRC 131
+#define GCC_QUPV3_WRAP2_S7_CLK 132
+#define GCC_QUPV3_WRAP2_S7_CLK_SRC 133
+#define GCC_QUPV3_WRAP3_CORE_2X_CLK 134
+#define GCC_QUPV3_WRAP3_CORE_CLK 135
+#define GCC_QUPV3_WRAP3_QSPI_REF_CLK 136
+#define GCC_QUPV3_WRAP3_QSPI_REF_CLK_SRC 137
+#define GCC_QUPV3_WRAP3_S0_CLK 138
+#define GCC_QUPV3_WRAP3_S0_CLK_SRC 139
+#define GCC_QUPV3_WRAP_1_M_AHB_CLK 140
+#define GCC_QUPV3_WRAP_1_S_AHB_CLK 141
+#define GCC_QUPV3_WRAP_2_IBI_2_AHB_CLK 142
+#define GCC_QUPV3_WRAP_2_IBI_3_AHB_CLK 143
+#define GCC_QUPV3_WRAP_2_M_AHB_CLK 144
+#define GCC_QUPV3_WRAP_2_S_AHB_CLK 145
+#define GCC_QUPV3_WRAP_3_M_AHB_CLK 146
+#define GCC_QUPV3_WRAP_3_S_AHB_CLK 147
+#define GCC_SDCC2_AHB_CLK 148
+#define GCC_SDCC2_APPS_CLK 149
+#define GCC_SDCC2_APPS_CLK_SRC 150
+#define GCC_SDCC4_AHB_CLK 151
+#define GCC_SDCC4_APPS_CLK 152
+#define GCC_SDCC4_APPS_CLK_SRC 153
+#define GCC_UFS_PHY_AHB_CLK 154
+#define GCC_UFS_PHY_AXI_CLK 155
+#define GCC_UFS_PHY_AXI_CLK_SRC 156
+#define GCC_UFS_PHY_AXI_HW_CTL_CLK 157
+#define GCC_UFS_PHY_ICE_CORE_CLK 158
+#define GCC_UFS_PHY_ICE_CORE_CLK_SRC 159
+#define GCC_UFS_PHY_ICE_CORE_HW_CTL_CLK 160
+#define GCC_UFS_PHY_PHY_AUX_CLK 161
+#define GCC_UFS_PHY_PHY_AUX_CLK_SRC 162
+#define GCC_UFS_PHY_PHY_AUX_HW_CTL_CLK 163
+#define GCC_UFS_PHY_RX_SYMBOL_0_CLK 164
+#define GCC_UFS_PHY_RX_SYMBOL_0_CLK_SRC 165
+#define GCC_UFS_PHY_RX_SYMBOL_1_CLK 166
+#define GCC_UFS_PHY_RX_SYMBOL_1_CLK_SRC 167
+#define GCC_UFS_PHY_TX_SYMBOL_0_CLK 168
+#define GCC_UFS_PHY_TX_SYMBOL_0_CLK_SRC 169
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK 170
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC 171
+#define GCC_UFS_PHY_UNIPRO_CORE_HW_CTL_CLK 172
+#define GCC_USB30_PRIM_MASTER_CLK 173
+#define GCC_USB30_PRIM_MASTER_CLK_SRC 174
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK 175
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC 176
+#define GCC_USB30_PRIM_MOCK_UTMI_POSTDIV_CLK_SRC 177
+#define GCC_USB30_PRIM_SLEEP_CLK 178
+#define GCC_USB3_PRIM_PHY_AUX_CLK 179
+#define GCC_USB3_PRIM_PHY_AUX_CLK_SRC 180
+#define GCC_USB3_PRIM_PHY_COM_AUX_CLK 181
+#define GCC_USB3_PRIM_PHY_PIPE_CLK 182
+#define GCC_USB3_PRIM_PHY_PIPE_CLK_SRC 183
+#define GCC_VIDEO_AHB_CLK 184
+#define GCC_VIDEO_AXI0_CLK 185
+#define GCC_VIDEO_AXI1_CLK 186
+#define GCC_VIDEO_XO_CLK 187
+#define GCC_GPLL0_AO 188
+#define GCC_GPLL0_OUT_EVEN_AO 189
+#define GCC_GPLL1_AO 190
+#define GCC_GPLL3_AO 191
+#define GCC_GPLL4_AO 192
+#define GCC_GPLL6_AO 193
+
+/* GCC resets */
+#define GCC_CAMERA_BCR 0
+#define GCC_DISPLAY_BCR 1
+#define GCC_GPU_BCR 2
+#define GCC_PCIE_0_BCR 3
+#define GCC_PCIE_0_LINK_DOWN_BCR 4
+#define GCC_PCIE_0_NOCSR_COM_PHY_BCR 5
+#define GCC_PCIE_0_PHY_BCR 6
+#define GCC_PCIE_0_PHY_NOCSR_COM_PHY_BCR 7
+#define GCC_PCIE_1_BCR 8
+#define GCC_PCIE_1_LINK_DOWN_BCR 9
+#define GCC_PCIE_1_NOCSR_COM_PHY_BCR 10
+#define GCC_PCIE_1_PHY_BCR 11
+#define GCC_PCIE_1_PHY_NOCSR_COM_PHY_BCR 12
+#define GCC_PCIE_PHY_BCR 13
+#define GCC_PCIE_PHY_CFG_AHB_BCR 14
+#define GCC_PCIE_PHY_COM_BCR 15
+#define GCC_PDM_BCR 16
+#define GCC_QUPV3_WRAPPER_1_BCR 17
+#define GCC_QUPV3_WRAPPER_2_BCR 18
+#define GCC_QUPV3_WRAPPER_3_BCR 19
+#define GCC_QUPV3_WRAPPER_I2C_BCR 20
+#define GCC_QUSB2PHY_PRIM_BCR 21
+#define GCC_QUSB2PHY_SEC_BCR 22
+#define GCC_SDCC2_BCR 23
+#define GCC_SDCC4_BCR 24
+#define GCC_UFS_PHY_BCR 25
+#define GCC_USB30_PRIM_BCR 26
+#define GCC_USB3_DP_PHY_PRIM_BCR 27
+#define GCC_USB3_DP_PHY_SEC_BCR 28
+#define GCC_USB3_PHY_PRIM_BCR 29
+#define GCC_USB3_PHY_SEC_BCR 30
+#define GCC_USB3PHY_PHY_PRIM_BCR 31
+#define GCC_USB3PHY_PHY_SEC_BCR 32
+#define GCC_VIDEO_AXI0_CLK_ARES 33
+#define GCC_VIDEO_AXI1_CLK_ARES 34
+#define GCC_VIDEO_BCR 35
+
+/* GCC power domains */
+#define PCIE_0_GDSC 0
+#define PCIE_0_PHY_GDSC 1
+#define PCIE_1_GDSC 2
+#define PCIE_1_PHY_GDSC 3
+#define UFS_PHY_GDSC 4
+#define UFS_MEM_PHY_GDSC 5
+#define USB30_PRIM_GDSC 6
+#define USB3_PHY_GDSC 7
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gpucc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gpucc.h
new file mode 100644
index 000000000000..d0dc457cfe75
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-gpucc.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_SM8650_H
+#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SM8650_H
+
+/* GPU_CC clocks */
+#define GPU_CC_AHB_CLK 0
+#define GPU_CC_CRC_AHB_CLK 1
+#define GPU_CC_CX_ACCU_SHIFT_CLK 2
+#define GPU_CC_CX_FF_CLK 3
+#define GPU_CC_CX_GMU_CLK 4
+#define GPU_CC_CXO_AON_CLK 5
+#define GPU_CC_CXO_CLK 6
+#define GPU_CC_DEMET_CLK 7
+#define GPU_CC_DPM_CLK 8
+#define GPU_CC_FF_CLK_SRC 9
+#define GPU_CC_FREQ_MEASURE_CLK 10
+#define GPU_CC_GMU_CLK_SRC 11
+#define GPU_CC_GX_ACCU_SHIFT_CLK 12
+#define GPU_CC_GX_FF_CLK 13
+#define GPU_CC_GX_GFX3D_CLK 14
+#define GPU_CC_GX_GFX3D_RDVM_CLK 15
+#define GPU_CC_GX_GMU_CLK 16
+#define GPU_CC_GX_VSENSE_CLK 17
+#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK 18
+#define GPU_CC_HUB_AON_CLK 19
+#define GPU_CC_HUB_CLK_SRC 20
+#define GPU_CC_HUB_CX_INT_CLK 21
+#define GPU_CC_HUB_DIV_CLK_SRC 22
+#define GPU_CC_MEMNOC_GFX_CLK 23
+#define GPU_CC_PLL0 24
+#define GPU_CC_PLL1 25
+#define GPU_CC_SLEEP_CLK 26
+
+/* GDSCs */
+#define GPU_GX_GDSC 0
+#define GPU_CX_GDSC 1
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-tcsr.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-tcsr.h
new file mode 100644
index 000000000000..b2c72d492f1f
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,sm8650-tcsr.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_TCSR_CC_SM8650_H
+#define _DT_BINDINGS_CLK_QCOM_TCSR_CC_SM8650_H
+
+/* TCSR CC clocks */
+#define TCSR_PCIE_0_CLKREF_EN 0
+#define TCSR_PCIE_1_CLKREF_EN 1
+#define TCSR_UFS_CLKREF_EN 2
+#define TCSR_UFS_PAD_CLKREF_EN 3
+#define TCSR_USB2_CLKREF_EN 4
+#define TCSR_USB3_CLKREF_EN 5
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,videocc-sm8150.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,videocc-sm8150.h
index e24ee840cfdb..c557b78dc572 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,videocc-sm8150.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,videocc-sm8150.h
@@ -16,6 +16,10 @@
/* VIDEO_CC Resets */
#define VIDEO_CC_MVSC_CORE_CLK_BCR 0
+#define VIDEO_CC_INTERFACE_BCR 1
+#define VIDEO_CC_MVS0_BCR 2
+#define VIDEO_CC_MVS1_BCR 3
+#define VIDEO_CC_MVSC_BCR 4
/* VIDEO_CC GDSCRs */
#define VENUS_GDSC 0
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/qcom,x1e80100-gcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,x1e80100-gcc.h
new file mode 100644
index 000000000000..24ba9e2a5cf6
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/qcom,x1e80100-gcc.h
@@ -0,0 +1,485 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_GCC_X1E80100_H
+#define _DT_BINDINGS_CLK_QCOM_GCC_X1E80100_H
+
+/* GCC clocks */
+#define GCC_AGGRE_NOC_USB_NORTH_AXI_CLK 0
+#define GCC_AGGRE_NOC_USB_SOUTH_AXI_CLK 1
+#define GCC_AGGRE_UFS_PHY_AXI_CLK 2
+#define GCC_AGGRE_USB2_PRIM_AXI_CLK 3
+#define GCC_AGGRE_USB3_MP_AXI_CLK 4
+#define GCC_AGGRE_USB3_PRIM_AXI_CLK 5
+#define GCC_AGGRE_USB3_SEC_AXI_CLK 6
+#define GCC_AGGRE_USB3_TERT_AXI_CLK 7
+#define GCC_AGGRE_USB4_0_AXI_CLK 8
+#define GCC_AGGRE_USB4_1_AXI_CLK 9
+#define GCC_AGGRE_USB4_2_AXI_CLK 10
+#define GCC_AGGRE_USB_NOC_AXI_CLK 11
+#define GCC_AV1E_AHB_CLK 12
+#define GCC_AV1E_AXI_CLK 13
+#define GCC_AV1E_XO_CLK 14
+#define GCC_BOOT_ROM_AHB_CLK 15
+#define GCC_CAMERA_AHB_CLK 16
+#define GCC_CAMERA_HF_AXI_CLK 17
+#define GCC_CAMERA_SF_AXI_CLK 18
+#define GCC_CAMERA_XO_CLK 19
+#define GCC_CFG_NOC_PCIE_ANOC_AHB_CLK 20
+#define GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK 21
+#define GCC_CFG_NOC_PCIE_ANOC_SOUTH_AHB_CLK 22
+#define GCC_CFG_NOC_USB2_PRIM_AXI_CLK 23
+#define GCC_CFG_NOC_USB3_MP_AXI_CLK 24
+#define GCC_CFG_NOC_USB3_PRIM_AXI_CLK 25
+#define GCC_CFG_NOC_USB3_SEC_AXI_CLK 26
+#define GCC_CFG_NOC_USB3_TERT_AXI_CLK 27
+#define GCC_CFG_NOC_USB_ANOC_AHB_CLK 28
+#define GCC_CFG_NOC_USB_ANOC_NORTH_AHB_CLK 29
+#define GCC_CFG_NOC_USB_ANOC_SOUTH_AHB_CLK 30
+#define GCC_CNOC_PCIE1_TUNNEL_CLK 31
+#define GCC_CNOC_PCIE2_TUNNEL_CLK 32
+#define GCC_CNOC_PCIE_NORTH_SF_AXI_CLK 33
+#define GCC_CNOC_PCIE_SOUTH_SF_AXI_CLK 34
+#define GCC_CNOC_PCIE_TUNNEL_CLK 35
+#define GCC_DDRSS_GPU_AXI_CLK 36
+#define GCC_DISP_AHB_CLK 37
+#define GCC_DISP_HF_AXI_CLK 38
+#define GCC_DISP_XO_CLK 39
+#define GCC_GP1_CLK 40
+#define GCC_GP1_CLK_SRC 41
+#define GCC_GP2_CLK 42
+#define GCC_GP2_CLK_SRC 43
+#define GCC_GP3_CLK 44
+#define GCC_GP3_CLK_SRC 45
+#define GCC_GPLL0 46
+#define GCC_GPLL0_OUT_EVEN 47
+#define GCC_GPLL4 48
+#define GCC_GPLL7 49
+#define GCC_GPLL8 50
+#define GCC_GPLL9 51
+#define GCC_GPU_CFG_AHB_CLK 52
+#define GCC_GPU_GPLL0_CPH_CLK_SRC 53
+#define GCC_GPU_GPLL0_DIV_CPH_CLK_SRC 54
+#define GCC_GPU_MEMNOC_GFX_CLK 55
+#define GCC_GPU_SNOC_DVM_GFX_CLK 56
+#define GCC_PCIE0_PHY_RCHNG_CLK 57
+#define GCC_PCIE1_PHY_RCHNG_CLK 58
+#define GCC_PCIE2_PHY_RCHNG_CLK 59
+#define GCC_PCIE_0_AUX_CLK 60
+#define GCC_PCIE_0_AUX_CLK_SRC 61
+#define GCC_PCIE_0_CFG_AHB_CLK 62
+#define GCC_PCIE_0_MSTR_AXI_CLK 63
+#define GCC_PCIE_0_PHY_RCHNG_CLK_SRC 64
+#define GCC_PCIE_0_PIPE_CLK 65
+#define GCC_PCIE_0_SLV_AXI_CLK 66
+#define GCC_PCIE_0_SLV_Q2A_AXI_CLK 67
+#define GCC_PCIE_1_AUX_CLK 68
+#define GCC_PCIE_1_AUX_CLK_SRC 69
+#define GCC_PCIE_1_CFG_AHB_CLK 70
+#define GCC_PCIE_1_MSTR_AXI_CLK 71
+#define GCC_PCIE_1_PHY_RCHNG_CLK_SRC 72
+#define GCC_PCIE_1_PIPE_CLK 73
+#define GCC_PCIE_1_SLV_AXI_CLK 74
+#define GCC_PCIE_1_SLV_Q2A_AXI_CLK 75
+#define GCC_PCIE_2_AUX_CLK 76
+#define GCC_PCIE_2_AUX_CLK_SRC 77
+#define GCC_PCIE_2_CFG_AHB_CLK 78
+#define GCC_PCIE_2_MSTR_AXI_CLK 79
+#define GCC_PCIE_2_PHY_RCHNG_CLK_SRC 80
+#define GCC_PCIE_2_PIPE_CLK 81
+#define GCC_PCIE_2_SLV_AXI_CLK 82
+#define GCC_PCIE_2_SLV_Q2A_AXI_CLK 83
+#define GCC_PCIE_3_AUX_CLK 84
+#define GCC_PCIE_3_AUX_CLK_SRC 85
+#define GCC_PCIE_3_CFG_AHB_CLK 86
+#define GCC_PCIE_3_MSTR_AXI_CLK 87
+#define GCC_PCIE_3_PHY_AUX_CLK 88
+#define GCC_PCIE_3_PHY_RCHNG_CLK 89
+#define GCC_PCIE_3_PHY_RCHNG_CLK_SRC 90
+#define GCC_PCIE_3_PIPE_CLK 91
+#define GCC_PCIE_3_PIPE_DIV_CLK_SRC 92
+#define GCC_PCIE_3_PIPEDIV2_CLK 93
+#define GCC_PCIE_3_SLV_AXI_CLK 94
+#define GCC_PCIE_3_SLV_Q2A_AXI_CLK 95
+#define GCC_PCIE_4_AUX_CLK 96
+#define GCC_PCIE_4_AUX_CLK_SRC 97
+#define GCC_PCIE_4_CFG_AHB_CLK 98
+#define GCC_PCIE_4_MSTR_AXI_CLK 99
+#define GCC_PCIE_4_PHY_RCHNG_CLK 100
+#define GCC_PCIE_4_PHY_RCHNG_CLK_SRC 101
+#define GCC_PCIE_4_PIPE_CLK 102
+#define GCC_PCIE_4_PIPE_DIV_CLK_SRC 103
+#define GCC_PCIE_4_PIPEDIV2_CLK 104
+#define GCC_PCIE_4_SLV_AXI_CLK 105
+#define GCC_PCIE_4_SLV_Q2A_AXI_CLK 106
+#define GCC_PCIE_5_AUX_CLK 107
+#define GCC_PCIE_5_AUX_CLK_SRC 108
+#define GCC_PCIE_5_CFG_AHB_CLK 109
+#define GCC_PCIE_5_MSTR_AXI_CLK 110
+#define GCC_PCIE_5_PHY_RCHNG_CLK 111
+#define GCC_PCIE_5_PHY_RCHNG_CLK_SRC 112
+#define GCC_PCIE_5_PIPE_CLK 113
+#define GCC_PCIE_5_PIPE_DIV_CLK_SRC 114
+#define GCC_PCIE_5_PIPEDIV2_CLK 115
+#define GCC_PCIE_5_SLV_AXI_CLK 116
+#define GCC_PCIE_5_SLV_Q2A_AXI_CLK 117
+#define GCC_PCIE_6A_AUX_CLK 118
+#define GCC_PCIE_6A_AUX_CLK_SRC 119
+#define GCC_PCIE_6A_CFG_AHB_CLK 120
+#define GCC_PCIE_6A_MSTR_AXI_CLK 121
+#define GCC_PCIE_6A_PHY_AUX_CLK 122
+#define GCC_PCIE_6A_PHY_RCHNG_CLK 123
+#define GCC_PCIE_6A_PHY_RCHNG_CLK_SRC 124
+#define GCC_PCIE_6A_PIPE_CLK 125
+#define GCC_PCIE_6A_PIPE_DIV_CLK_SRC 126
+#define GCC_PCIE_6A_PIPEDIV2_CLK 127
+#define GCC_PCIE_6A_SLV_AXI_CLK 128
+#define GCC_PCIE_6A_SLV_Q2A_AXI_CLK 129
+#define GCC_PCIE_6B_AUX_CLK 130
+#define GCC_PCIE_6B_AUX_CLK_SRC 131
+#define GCC_PCIE_6B_CFG_AHB_CLK 132
+#define GCC_PCIE_6B_MSTR_AXI_CLK 133
+#define GCC_PCIE_6B_PHY_AUX_CLK 134
+#define GCC_PCIE_6B_PHY_RCHNG_CLK 135
+#define GCC_PCIE_6B_PHY_RCHNG_CLK_SRC 136
+#define GCC_PCIE_6B_PIPE_CLK 137
+#define GCC_PCIE_6B_PIPE_DIV_CLK_SRC 138
+#define GCC_PCIE_6B_PIPEDIV2_CLK 139
+#define GCC_PCIE_6B_SLV_AXI_CLK 140
+#define GCC_PCIE_6B_SLV_Q2A_AXI_CLK 141
+#define GCC_PCIE_RSCC_AHB_CLK 142
+#define GCC_PCIE_RSCC_XO_CLK 143
+#define GCC_PCIE_RSCC_XO_CLK_SRC 144
+#define GCC_PDM2_CLK 145
+#define GCC_PDM2_CLK_SRC 146
+#define GCC_PDM_AHB_CLK 147
+#define GCC_PDM_XO4_CLK 148
+#define GCC_QMIP_AV1E_AHB_CLK 149
+#define GCC_QMIP_CAMERA_NRT_AHB_CLK 150
+#define GCC_QMIP_CAMERA_RT_AHB_CLK 151
+#define GCC_QMIP_DISP_AHB_CLK 152
+#define GCC_QMIP_GPU_AHB_CLK 153
+#define GCC_QMIP_VIDEO_CV_CPU_AHB_CLK 154
+#define GCC_QMIP_VIDEO_CVP_AHB_CLK 155
+#define GCC_QMIP_VIDEO_V_CPU_AHB_CLK 156
+#define GCC_QMIP_VIDEO_VCODEC_AHB_CLK 157
+#define GCC_QUPV3_WRAP0_CORE_2X_CLK 158
+#define GCC_QUPV3_WRAP0_CORE_CLK 159
+#define GCC_QUPV3_WRAP0_QSPI_S2_CLK 160
+#define GCC_QUPV3_WRAP0_QSPI_S3_CLK 161
+#define GCC_QUPV3_WRAP0_S0_CLK 162
+#define GCC_QUPV3_WRAP0_S0_CLK_SRC 163
+#define GCC_QUPV3_WRAP0_S1_CLK 164
+#define GCC_QUPV3_WRAP0_S1_CLK_SRC 165
+#define GCC_QUPV3_WRAP0_S2_CLK 166
+#define GCC_QUPV3_WRAP0_S2_CLK_SRC 167
+#define GCC_QUPV3_WRAP0_S2_DIV_CLK_SRC 168
+#define GCC_QUPV3_WRAP0_S3_CLK 169
+#define GCC_QUPV3_WRAP0_S3_CLK_SRC 170
+#define GCC_QUPV3_WRAP0_S3_DIV_CLK_SRC 171
+#define GCC_QUPV3_WRAP0_S4_CLK 172
+#define GCC_QUPV3_WRAP0_S4_CLK_SRC 173
+#define GCC_QUPV3_WRAP0_S5_CLK 174
+#define GCC_QUPV3_WRAP0_S5_CLK_SRC 175
+#define GCC_QUPV3_WRAP0_S6_CLK 176
+#define GCC_QUPV3_WRAP0_S6_CLK_SRC 177
+#define GCC_QUPV3_WRAP0_S7_CLK 178
+#define GCC_QUPV3_WRAP0_S7_CLK_SRC 179
+#define GCC_QUPV3_WRAP1_CORE_2X_CLK 180
+#define GCC_QUPV3_WRAP1_CORE_CLK 181
+#define GCC_QUPV3_WRAP1_QSPI_S2_CLK 182
+#define GCC_QUPV3_WRAP1_QSPI_S3_CLK 183
+#define GCC_QUPV3_WRAP1_S0_CLK 184
+#define GCC_QUPV3_WRAP1_S0_CLK_SRC 185
+#define GCC_QUPV3_WRAP1_S1_CLK 186
+#define GCC_QUPV3_WRAP1_S1_CLK_SRC 187
+#define GCC_QUPV3_WRAP1_S2_CLK 188
+#define GCC_QUPV3_WRAP1_S2_CLK_SRC 189
+#define GCC_QUPV3_WRAP1_S2_DIV_CLK_SRC 190
+#define GCC_QUPV3_WRAP1_S3_CLK 191
+#define GCC_QUPV3_WRAP1_S3_CLK_SRC 192
+#define GCC_QUPV3_WRAP1_S3_DIV_CLK_SRC 193
+#define GCC_QUPV3_WRAP1_S4_CLK 194
+#define GCC_QUPV3_WRAP1_S4_CLK_SRC 195
+#define GCC_QUPV3_WRAP1_S5_CLK 196
+#define GCC_QUPV3_WRAP1_S5_CLK_SRC 197
+#define GCC_QUPV3_WRAP1_S6_CLK 198
+#define GCC_QUPV3_WRAP1_S6_CLK_SRC 199
+#define GCC_QUPV3_WRAP1_S7_CLK 200
+#define GCC_QUPV3_WRAP1_S7_CLK_SRC 201
+#define GCC_QUPV3_WRAP2_CORE_2X_CLK 202
+#define GCC_QUPV3_WRAP2_CORE_CLK 203
+#define GCC_QUPV3_WRAP2_QSPI_S2_CLK 204
+#define GCC_QUPV3_WRAP2_QSPI_S3_CLK 205
+#define GCC_QUPV3_WRAP2_S0_CLK 206
+#define GCC_QUPV3_WRAP2_S0_CLK_SRC 207
+#define GCC_QUPV3_WRAP2_S1_CLK 208
+#define GCC_QUPV3_WRAP2_S1_CLK_SRC 209
+#define GCC_QUPV3_WRAP2_S2_CLK 210
+#define GCC_QUPV3_WRAP2_S2_CLK_SRC 211
+#define GCC_QUPV3_WRAP2_S2_DIV_CLK_SRC 212
+#define GCC_QUPV3_WRAP2_S3_CLK 213
+#define GCC_QUPV3_WRAP2_S3_CLK_SRC 214
+#define GCC_QUPV3_WRAP2_S3_DIV_CLK_SRC 215
+#define GCC_QUPV3_WRAP2_S4_CLK 216
+#define GCC_QUPV3_WRAP2_S4_CLK_SRC 217
+#define GCC_QUPV3_WRAP2_S5_CLK 218
+#define GCC_QUPV3_WRAP2_S5_CLK_SRC 219
+#define GCC_QUPV3_WRAP2_S6_CLK 220
+#define GCC_QUPV3_WRAP2_S6_CLK_SRC 221
+#define GCC_QUPV3_WRAP2_S7_CLK 222
+#define GCC_QUPV3_WRAP2_S7_CLK_SRC 223
+#define GCC_QUPV3_WRAP_0_M_AHB_CLK 224
+#define GCC_QUPV3_WRAP_0_S_AHB_CLK 225
+#define GCC_QUPV3_WRAP_1_M_AHB_CLK 226
+#define GCC_QUPV3_WRAP_1_S_AHB_CLK 227
+#define GCC_QUPV3_WRAP_2_M_AHB_CLK 228
+#define GCC_QUPV3_WRAP_2_S_AHB_CLK 229
+#define GCC_SDCC2_AHB_CLK 230
+#define GCC_SDCC2_APPS_CLK 231
+#define GCC_SDCC2_APPS_CLK_SRC 232
+#define GCC_SDCC4_AHB_CLK 233
+#define GCC_SDCC4_APPS_CLK 234
+#define GCC_SDCC4_APPS_CLK_SRC 235
+#define GCC_SYS_NOC_USB_AXI_CLK 236
+#define GCC_UFS_PHY_AHB_CLK 237
+#define GCC_UFS_PHY_AXI_CLK 238
+#define GCC_UFS_PHY_AXI_CLK_SRC 239
+#define GCC_UFS_PHY_ICE_CORE_CLK 240
+#define GCC_UFS_PHY_ICE_CORE_CLK_SRC 241
+#define GCC_UFS_PHY_PHY_AUX_CLK 242
+#define GCC_UFS_PHY_PHY_AUX_CLK_SRC 243
+#define GCC_UFS_PHY_RX_SYMBOL_0_CLK 244
+#define GCC_UFS_PHY_RX_SYMBOL_1_CLK 245
+#define GCC_UFS_PHY_TX_SYMBOL_0_CLK 246
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK 247
+#define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC 248
+#define GCC_USB20_MASTER_CLK 249
+#define GCC_USB20_MASTER_CLK_SRC 250
+#define GCC_USB20_MOCK_UTMI_CLK 251
+#define GCC_USB20_MOCK_UTMI_CLK_SRC 252
+#define GCC_USB20_MOCK_UTMI_POSTDIV_CLK_SRC 253
+#define GCC_USB20_SLEEP_CLK 254
+#define GCC_USB30_MP_MASTER_CLK 255
+#define GCC_USB30_MP_MASTER_CLK_SRC 256
+#define GCC_USB30_MP_MOCK_UTMI_CLK 257
+#define GCC_USB30_MP_MOCK_UTMI_CLK_SRC 258
+#define GCC_USB30_MP_MOCK_UTMI_POSTDIV_CLK_SRC 259
+#define GCC_USB30_MP_SLEEP_CLK 260
+#define GCC_USB30_PRIM_MASTER_CLK 261
+#define GCC_USB30_PRIM_MASTER_CLK_SRC 262
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK 263
+#define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC 264
+#define GCC_USB30_PRIM_MOCK_UTMI_POSTDIV_CLK_SRC 265
+#define GCC_USB30_PRIM_SLEEP_CLK 266
+#define GCC_USB30_SEC_MASTER_CLK 267
+#define GCC_USB30_SEC_MASTER_CLK_SRC 268
+#define GCC_USB30_SEC_MOCK_UTMI_CLK 269
+#define GCC_USB30_SEC_MOCK_UTMI_CLK_SRC 270
+#define GCC_USB30_SEC_MOCK_UTMI_POSTDIV_CLK_SRC 271
+#define GCC_USB30_SEC_SLEEP_CLK 272
+#define GCC_USB30_TERT_MASTER_CLK 273
+#define GCC_USB30_TERT_MASTER_CLK_SRC 274
+#define GCC_USB30_TERT_MOCK_UTMI_CLK 275
+#define GCC_USB30_TERT_MOCK_UTMI_CLK_SRC 276
+#define GCC_USB30_TERT_MOCK_UTMI_POSTDIV_CLK_SRC 277
+#define GCC_USB30_TERT_SLEEP_CLK 278
+#define GCC_USB3_MP_PHY_AUX_CLK 279
+#define GCC_USB3_MP_PHY_AUX_CLK_SRC 280
+#define GCC_USB3_MP_PHY_COM_AUX_CLK 281
+#define GCC_USB3_MP_PHY_PIPE_0_CLK 282
+#define GCC_USB3_MP_PHY_PIPE_1_CLK 283
+#define GCC_USB3_PRIM_PHY_AUX_CLK 284
+#define GCC_USB3_PRIM_PHY_AUX_CLK_SRC 285
+#define GCC_USB3_PRIM_PHY_COM_AUX_CLK 286
+#define GCC_USB3_PRIM_PHY_PIPE_CLK 287
+#define GCC_USB3_SEC_PHY_AUX_CLK 288
+#define GCC_USB3_SEC_PHY_AUX_CLK_SRC 289
+#define GCC_USB3_SEC_PHY_COM_AUX_CLK 290
+#define GCC_USB3_SEC_PHY_PIPE_CLK 291
+#define GCC_USB3_TERT_PHY_AUX_CLK 292
+#define GCC_USB3_TERT_PHY_AUX_CLK_SRC 293
+#define GCC_USB3_TERT_PHY_COM_AUX_CLK 294
+#define GCC_USB3_TERT_PHY_PIPE_CLK 295
+#define GCC_USB4_0_CFG_AHB_CLK 296
+#define GCC_USB4_0_DP0_CLK 297
+#define GCC_USB4_0_DP1_CLK 298
+#define GCC_USB4_0_MASTER_CLK 299
+#define GCC_USB4_0_MASTER_CLK_SRC 300
+#define GCC_USB4_0_PHY_P2RR2P_PIPE_CLK 301
+#define GCC_USB4_0_PHY_PCIE_PIPE_CLK 302
+#define GCC_USB4_0_PHY_PCIE_PIPE_CLK_SRC 303
+#define GCC_USB4_0_PHY_RX0_CLK 304
+#define GCC_USB4_0_PHY_RX1_CLK 305
+#define GCC_USB4_0_PHY_USB_PIPE_CLK 306
+#define GCC_USB4_0_SB_IF_CLK 307
+#define GCC_USB4_0_SB_IF_CLK_SRC 308
+#define GCC_USB4_0_SYS_CLK 309
+#define GCC_USB4_0_TMU_CLK 310
+#define GCC_USB4_0_TMU_CLK_SRC 311
+#define GCC_USB4_1_CFG_AHB_CLK 312
+#define GCC_USB4_1_DP0_CLK 313
+#define GCC_USB4_1_DP1_CLK 314
+#define GCC_USB4_1_MASTER_CLK 315
+#define GCC_USB4_1_MASTER_CLK_SRC 316
+#define GCC_USB4_1_PHY_P2RR2P_PIPE_CLK 317
+#define GCC_USB4_1_PHY_PCIE_PIPE_CLK 318
+#define GCC_USB4_1_PHY_PCIE_PIPE_CLK_SRC 319
+#define GCC_USB4_1_PHY_RX0_CLK 320
+#define GCC_USB4_1_PHY_RX1_CLK 321
+#define GCC_USB4_1_PHY_USB_PIPE_CLK 322
+#define GCC_USB4_1_SB_IF_CLK 323
+#define GCC_USB4_1_SB_IF_CLK_SRC 324
+#define GCC_USB4_1_SYS_CLK 325
+#define GCC_USB4_1_TMU_CLK 326
+#define GCC_USB4_1_TMU_CLK_SRC 327
+#define GCC_USB4_2_CFG_AHB_CLK 328
+#define GCC_USB4_2_DP0_CLK 329
+#define GCC_USB4_2_DP1_CLK 330
+#define GCC_USB4_2_MASTER_CLK 331
+#define GCC_USB4_2_MASTER_CLK_SRC 332
+#define GCC_USB4_2_PHY_P2RR2P_PIPE_CLK 333
+#define GCC_USB4_2_PHY_PCIE_PIPE_CLK 334
+#define GCC_USB4_2_PHY_PCIE_PIPE_CLK_SRC 335
+#define GCC_USB4_2_PHY_RX0_CLK 336
+#define GCC_USB4_2_PHY_RX1_CLK 337
+#define GCC_USB4_2_PHY_USB_PIPE_CLK 338
+#define GCC_USB4_2_SB_IF_CLK 339
+#define GCC_USB4_2_SB_IF_CLK_SRC 340
+#define GCC_USB4_2_SYS_CLK 341
+#define GCC_USB4_2_TMU_CLK 342
+#define GCC_USB4_2_TMU_CLK_SRC 343
+#define GCC_VIDEO_AHB_CLK 344
+#define GCC_VIDEO_AXI0_CLK 345
+#define GCC_VIDEO_AXI1_CLK 346
+#define GCC_VIDEO_XO_CLK 347
+#define GCC_PCIE_3_PIPE_CLK_SRC 348
+#define GCC_PCIE_4_PIPE_CLK_SRC 349
+#define GCC_PCIE_5_PIPE_CLK_SRC 350
+#define GCC_PCIE_6A_PIPE_CLK_SRC 351
+#define GCC_PCIE_6B_PIPE_CLK_SRC 352
+#define GCC_USB3_PRIM_PHY_PIPE_CLK_SRC 353
+#define GCC_USB3_SEC_PHY_PIPE_CLK_SRC 354
+#define GCC_USB3_TERT_PHY_PIPE_CLK_SRC 355
+
+/* GCC power domains */
+#define GCC_PCIE_0_TUNNEL_GDSC 0
+#define GCC_PCIE_1_TUNNEL_GDSC 1
+#define GCC_PCIE_2_TUNNEL_GDSC 2
+#define GCC_PCIE_3_GDSC 3
+#define GCC_PCIE_3_PHY_GDSC 4
+#define GCC_PCIE_4_GDSC 5
+#define GCC_PCIE_4_PHY_GDSC 6
+#define GCC_PCIE_5_GDSC 7
+#define GCC_PCIE_5_PHY_GDSC 8
+#define GCC_PCIE_6_PHY_GDSC 9
+#define GCC_PCIE_6A_GDSC 10
+#define GCC_PCIE_6B_GDSC 11
+#define GCC_UFS_MEM_PHY_GDSC 12
+#define GCC_UFS_PHY_GDSC 13
+#define GCC_USB20_PRIM_GDSC 14
+#define GCC_USB30_MP_GDSC 15
+#define GCC_USB30_PRIM_GDSC 16
+#define GCC_USB30_SEC_GDSC 17
+#define GCC_USB30_TERT_GDSC 18
+#define GCC_USB3_MP_SS0_PHY_GDSC 19
+#define GCC_USB3_MP_SS1_PHY_GDSC 20
+#define GCC_USB4_0_GDSC 21
+#define GCC_USB4_1_GDSC 22
+#define GCC_USB4_2_GDSC 23
+#define GCC_USB_0_PHY_GDSC 24
+#define GCC_USB_1_PHY_GDSC 25
+#define GCC_USB_2_PHY_GDSC 26
+
+/* GCC resets */
+#define GCC_AV1E_BCR 0
+#define GCC_CAMERA_BCR 1
+#define GCC_DISPLAY_BCR 2
+#define GCC_GPU_BCR 3
+#define GCC_PCIE_0_LINK_DOWN_BCR 4
+#define GCC_PCIE_0_NOCSR_COM_PHY_BCR 5
+#define GCC_PCIE_0_PHY_BCR 6
+#define GCC_PCIE_0_PHY_NOCSR_COM_PHY_BCR 7
+#define GCC_PCIE_0_TUNNEL_BCR 8
+#define GCC_PCIE_1_LINK_DOWN_BCR 9
+#define GCC_PCIE_1_NOCSR_COM_PHY_BCR 10
+#define GCC_PCIE_1_PHY_BCR 11
+#define GCC_PCIE_1_PHY_NOCSR_COM_PHY_BCR 12
+#define GCC_PCIE_1_TUNNEL_BCR 13
+#define GCC_PCIE_2_LINK_DOWN_BCR 14
+#define GCC_PCIE_2_NOCSR_COM_PHY_BCR 15
+#define GCC_PCIE_2_PHY_BCR 16
+#define GCC_PCIE_2_PHY_NOCSR_COM_PHY_BCR 17
+#define GCC_PCIE_2_TUNNEL_BCR 18
+#define GCC_PCIE_3_BCR 19
+#define GCC_PCIE_3_LINK_DOWN_BCR 20
+#define GCC_PCIE_3_NOCSR_COM_PHY_BCR 21
+#define GCC_PCIE_3_PHY_BCR 22
+#define GCC_PCIE_3_PHY_NOCSR_COM_PHY_BCR 23
+#define GCC_PCIE_4_BCR 24
+#define GCC_PCIE_4_LINK_DOWN_BCR 25
+#define GCC_PCIE_4_NOCSR_COM_PHY_BCR 26
+#define GCC_PCIE_4_PHY_BCR 27
+#define GCC_PCIE_4_PHY_NOCSR_COM_PHY_BCR 28
+#define GCC_PCIE_5_BCR 29
+#define GCC_PCIE_5_LINK_DOWN_BCR 30
+#define GCC_PCIE_5_NOCSR_COM_PHY_BCR 31
+#define GCC_PCIE_5_PHY_BCR 32
+#define GCC_PCIE_5_PHY_NOCSR_COM_PHY_BCR 33
+#define GCC_PCIE_6A_BCR 34
+#define GCC_PCIE_6A_LINK_DOWN_BCR 35
+#define GCC_PCIE_6A_NOCSR_COM_PHY_BCR 36
+#define GCC_PCIE_6A_PHY_BCR 37
+#define GCC_PCIE_6A_PHY_NOCSR_COM_PHY_BCR 38
+#define GCC_PCIE_6B_BCR 39
+#define GCC_PCIE_6B_LINK_DOWN_BCR 40
+#define GCC_PCIE_6B_NOCSR_COM_PHY_BCR 41
+#define GCC_PCIE_6B_PHY_BCR 42
+#define GCC_PCIE_6B_PHY_NOCSR_COM_PHY_BCR 43
+#define GCC_PCIE_PHY_BCR 44
+#define GCC_PCIE_PHY_CFG_AHB_BCR 45
+#define GCC_PCIE_PHY_COM_BCR 46
+#define GCC_PCIE_RSCC_BCR 47
+#define GCC_PDM_BCR 48
+#define GCC_QUPV3_WRAPPER_0_BCR 49
+#define GCC_QUPV3_WRAPPER_1_BCR 50
+#define GCC_QUPV3_WRAPPER_2_BCR 51
+#define GCC_QUSB2PHY_HS0_MP_BCR 52
+#define GCC_QUSB2PHY_HS1_MP_BCR 53
+#define GCC_QUSB2PHY_PRIM_BCR 54
+#define GCC_QUSB2PHY_SEC_BCR 55
+#define GCC_QUSB2PHY_TERT_BCR 56
+#define GCC_QUSB2PHY_USB20_HS_BCR 57
+#define GCC_SDCC2_BCR 58
+#define GCC_SDCC4_BCR 59
+#define GCC_UFS_PHY_BCR 60
+#define GCC_USB20_PRIM_BCR 61
+#define GCC_USB30_MP_BCR 62
+#define GCC_USB30_PRIM_BCR 63
+#define GCC_USB30_SEC_BCR 64
+#define GCC_USB30_TERT_BCR 65
+#define GCC_USB3_MP_SS0_PHY_BCR 66
+#define GCC_USB3_MP_SS1_PHY_BCR 67
+#define GCC_USB3_PHY_PRIM_BCR 68
+#define GCC_USB3_PHY_SEC_BCR 69
+#define GCC_USB3_PHY_TERT_BCR 70
+#define GCC_USB3_UNIPHY_MP0_BCR 71
+#define GCC_USB3_UNIPHY_MP1_BCR 72
+#define GCC_USB3PHY_PHY_PRIM_BCR 73
+#define GCC_USB3PHY_PHY_SEC_BCR 74
+#define GCC_USB3PHY_PHY_TERT_BCR 75
+#define GCC_USB3UNIPHY_PHY_MP0_BCR 76
+#define GCC_USB3UNIPHY_PHY_MP1_BCR 77
+#define GCC_USB4_0_BCR 78
+#define GCC_USB4_0_DP0_PHY_PRIM_BCR 79
+#define GCC_USB4_1_DP0_PHY_SEC_BCR 80
+#define GCC_USB4_2_DP0_PHY_TERT_BCR 81
+#define GCC_USB4_1_BCR 82
+#define GCC_USB4_2_BCR 83
+#define GCC_USB_0_PHY_BCR 84
+#define GCC_USB_1_PHY_BCR 85
+#define GCC_USB_2_PHY_BCR 86
+#define GCC_VIDEO_BCR 87
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/r8a779f0-cpg-mssr.h b/sys/contrib/device-tree/include/dt-bindings/clock/r8a779f0-cpg-mssr.h
index f2ae1c6a82dd..c34be5624954 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/r8a779f0-cpg-mssr.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/r8a779f0-cpg-mssr.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
/*
* Copyright (C) 2021 Renesas Electronics Corp.
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/r9a08g045-cpg.h b/sys/contrib/device-tree/include/dt-bindings/clock/r9a08g045-cpg.h
new file mode 100644
index 000000000000..410725b778a8
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/r9a08g045-cpg.h
@@ -0,0 +1,242 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R9A08G045_CPG_H__
+#define __DT_BINDINGS_CLOCK_R9A08G045_CPG_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* R9A08G045 CPG Core Clocks */
+#define R9A08G045_CLK_I 0
+#define R9A08G045_CLK_I2 1
+#define R9A08G045_CLK_I3 2
+#define R9A08G045_CLK_S0 3
+#define R9A08G045_CLK_SPI0 4
+#define R9A08G045_CLK_SPI1 5
+#define R9A08G045_CLK_SD0 6
+#define R9A08G045_CLK_SD1 7
+#define R9A08G045_CLK_SD2 8
+#define R9A08G045_CLK_M0 9
+#define R9A08G045_CLK_HP 10
+#define R9A08G045_CLK_TSU 11
+#define R9A08G045_CLK_ZT 12
+#define R9A08G045_CLK_P0 13
+#define R9A08G045_CLK_P1 14
+#define R9A08G045_CLK_P2 15
+#define R9A08G045_CLK_P3 16
+#define R9A08G045_CLK_P4 17
+#define R9A08G045_CLK_P5 18
+#define R9A08G045_CLK_AT 19
+#define R9A08G045_CLK_OC0 20
+#define R9A08G045_CLK_OC1 21
+#define R9A08G045_OSCCLK 22
+#define R9A08G045_OSCCLK2 23
+#define R9A08G045_SWD 24
+
+/* R9A08G045 Module Clocks */
+#define R9A08G045_OCTA_ACLK 0
+#define R9A08G045_OCTA_MCLK 1
+#define R9A08G045_CA55_SCLK 2
+#define R9A08G045_CA55_PCLK 3
+#define R9A08G045_CA55_ATCLK 4
+#define R9A08G045_CA55_GICCLK 5
+#define R9A08G045_CA55_PERICLK 6
+#define R9A08G045_CA55_ACLK 7
+#define R9A08G045_CA55_TSCLK 8
+#define R9A08G045_SRAM_ACPU_ACLK0 9
+#define R9A08G045_SRAM_ACPU_ACLK1 10
+#define R9A08G045_SRAM_ACPU_ACLK2 11
+#define R9A08G045_GIC600_GICCLK 12
+#define R9A08G045_IA55_CLK 13
+#define R9A08G045_IA55_PCLK 14
+#define R9A08G045_MHU_PCLK 15
+#define R9A08G045_SYC_CNT_CLK 16
+#define R9A08G045_DMAC_ACLK 17
+#define R9A08G045_DMAC_PCLK 18
+#define R9A08G045_OSTM0_PCLK 19
+#define R9A08G045_OSTM1_PCLK 20
+#define R9A08G045_OSTM2_PCLK 21
+#define R9A08G045_OSTM3_PCLK 22
+#define R9A08G045_OSTM4_PCLK 23
+#define R9A08G045_OSTM5_PCLK 24
+#define R9A08G045_OSTM6_PCLK 25
+#define R9A08G045_OSTM7_PCLK 26
+#define R9A08G045_MTU_X_MCK_MTU3 27
+#define R9A08G045_POE3_CLKM_POE 28
+#define R9A08G045_GPT_PCLK 29
+#define R9A08G045_POEG_A_CLKP 30
+#define R9A08G045_POEG_B_CLKP 31
+#define R9A08G045_POEG_C_CLKP 32
+#define R9A08G045_POEG_D_CLKP 33
+#define R9A08G045_WDT0_PCLK 34
+#define R9A08G045_WDT0_CLK 35
+#define R9A08G045_WDT1_PCLK 36
+#define R9A08G045_WDT1_CLK 37
+#define R9A08G045_WDT2_PCLK 38
+#define R9A08G045_WDT2_CLK 39
+#define R9A08G045_SPI_HCLK 40
+#define R9A08G045_SPI_ACLK 41
+#define R9A08G045_SPI_CLK 42
+#define R9A08G045_SPI_CLKX2 43
+#define R9A08G045_SDHI0_IMCLK 44
+#define R9A08G045_SDHI0_IMCLK2 45
+#define R9A08G045_SDHI0_CLK_HS 46
+#define R9A08G045_SDHI0_ACLK 47
+#define R9A08G045_SDHI1_IMCLK 48
+#define R9A08G045_SDHI1_IMCLK2 49
+#define R9A08G045_SDHI1_CLK_HS 50
+#define R9A08G045_SDHI1_ACLK 51
+#define R9A08G045_SDHI2_IMCLK 52
+#define R9A08G045_SDHI2_IMCLK2 53
+#define R9A08G045_SDHI2_CLK_HS 54
+#define R9A08G045_SDHI2_ACLK 55
+#define R9A08G045_SSI0_PCLK2 56
+#define R9A08G045_SSI0_PCLK_SFR 57
+#define R9A08G045_SSI1_PCLK2 58
+#define R9A08G045_SSI1_PCLK_SFR 59
+#define R9A08G045_SSI2_PCLK2 60
+#define R9A08G045_SSI2_PCLK_SFR 61
+#define R9A08G045_SSI3_PCLK2 62
+#define R9A08G045_SSI3_PCLK_SFR 63
+#define R9A08G045_SRC_CLKP 64
+#define R9A08G045_USB_U2H0_HCLK 65
+#define R9A08G045_USB_U2H1_HCLK 66
+#define R9A08G045_USB_U2P_EXR_CPUCLK 67
+#define R9A08G045_USB_PCLK 68
+#define R9A08G045_ETH0_CLK_AXI 69
+#define R9A08G045_ETH0_CLK_CHI 70
+#define R9A08G045_ETH0_REFCLK 71
+#define R9A08G045_ETH1_CLK_AXI 72
+#define R9A08G045_ETH1_CLK_CHI 73
+#define R9A08G045_ETH1_REFCLK 74
+#define R9A08G045_I2C0_PCLK 75
+#define R9A08G045_I2C1_PCLK 76
+#define R9A08G045_I2C2_PCLK 77
+#define R9A08G045_I2C3_PCLK 78
+#define R9A08G045_SCIF0_CLK_PCK 79
+#define R9A08G045_SCIF1_CLK_PCK 80
+#define R9A08G045_SCIF2_CLK_PCK 81
+#define R9A08G045_SCIF3_CLK_PCK 82
+#define R9A08G045_SCIF4_CLK_PCK 83
+#define R9A08G045_SCIF5_CLK_PCK 84
+#define R9A08G045_SCI0_CLKP 85
+#define R9A08G045_SCI1_CLKP 86
+#define R9A08G045_IRDA_CLKP 87
+#define R9A08G045_RSPI0_CLKB 88
+#define R9A08G045_RSPI1_CLKB 89
+#define R9A08G045_RSPI2_CLKB 90
+#define R9A08G045_RSPI3_CLKB 91
+#define R9A08G045_RSPI4_CLKB 92
+#define R9A08G045_CANFD_PCLK 93
+#define R9A08G045_CANFD_CLK_RAM 94
+#define R9A08G045_GPIO_HCLK 95
+#define R9A08G045_ADC_ADCLK 96
+#define R9A08G045_ADC_PCLK 97
+#define R9A08G045_TSU_PCLK 98
+#define R9A08G045_PDM_PCLK 99
+#define R9A08G045_PDM_CCLK 100
+#define R9A08G045_PCI_ACLK 101
+#define R9A08G045_PCI_CLKL1PM 102
+#define R9A08G045_SPDIF_PCLK 103
+#define R9A08G045_I3C_PCLK 104
+#define R9A08G045_I3C_TCLK 105
+#define R9A08G045_VBAT_BCLK 106
+
+/* R9A08G045 Resets */
+#define R9A08G045_CA55_RST_1_0 0
+#define R9A08G045_CA55_RST_3_0 1
+#define R9A08G045_CA55_RST_4 2
+#define R9A08G045_CA55_RST_5 3
+#define R9A08G045_CA55_RST_6 4
+#define R9A08G045_CA55_RST_7 5
+#define R9A08G045_CA55_RST_8 6
+#define R9A08G045_CA55_RST_9 7
+#define R9A08G045_CA55_RST_10 8
+#define R9A08G045_CA55_RST_11 9
+#define R9A08G045_CA55_RST_12 10
+#define R9A08G045_SRAM_ACPU_ARESETN0 11
+#define R9A08G045_SRAM_ACPU_ARESETN1 12
+#define R9A08G045_SRAM_ACPU_ARESETN2 13
+#define R9A08G045_GIC600_GICRESET_N 14
+#define R9A08G045_GIC600_DBG_GICRESET_N 15
+#define R9A08G045_IA55_RESETN 16
+#define R9A08G045_MHU_RESETN 17
+#define R9A08G045_DMAC_ARESETN 18
+#define R9A08G045_DMAC_RST_ASYNC 19
+#define R9A08G045_SYC_RESETN 20
+#define R9A08G045_OSTM0_PRESETZ 21
+#define R9A08G045_OSTM1_PRESETZ 22
+#define R9A08G045_OSTM2_PRESETZ 23
+#define R9A08G045_OSTM3_PRESETZ 24
+#define R9A08G045_OSTM4_PRESETZ 25
+#define R9A08G045_OSTM5_PRESETZ 26
+#define R9A08G045_OSTM6_PRESETZ 27
+#define R9A08G045_OSTM7_PRESETZ 28
+#define R9A08G045_MTU_X_PRESET_MTU3 29
+#define R9A08G045_POE3_RST_M_REG 30
+#define R9A08G045_GPT_RST_C 31
+#define R9A08G045_POEG_A_RST 32
+#define R9A08G045_POEG_B_RST 33
+#define R9A08G045_POEG_C_RST 34
+#define R9A08G045_POEG_D_RST 35
+#define R9A08G045_WDT0_PRESETN 36
+#define R9A08G045_WDT1_PRESETN 37
+#define R9A08G045_WDT2_PRESETN 38
+#define R9A08G045_SPI_HRESETN 39
+#define R9A08G045_SPI_ARESETN 40
+#define R9A08G045_SDHI0_IXRST 41
+#define R9A08G045_SDHI1_IXRST 42
+#define R9A08G045_SDHI2_IXRST 43
+#define R9A08G045_SSI0_RST_M2_REG 44
+#define R9A08G045_SSI1_RST_M2_REG 45
+#define R9A08G045_SSI2_RST_M2_REG 46
+#define R9A08G045_SSI3_RST_M2_REG 47
+#define R9A08G045_SRC_RST 48
+#define R9A08G045_USB_U2H0_HRESETN 49
+#define R9A08G045_USB_U2H1_HRESETN 50
+#define R9A08G045_USB_U2P_EXL_SYSRST 51
+#define R9A08G045_USB_PRESETN 52
+#define R9A08G045_ETH0_RST_HW_N 53
+#define R9A08G045_ETH1_RST_HW_N 54
+#define R9A08G045_I2C0_MRST 55
+#define R9A08G045_I2C1_MRST 56
+#define R9A08G045_I2C2_MRST 57
+#define R9A08G045_I2C3_MRST 58
+#define R9A08G045_SCIF0_RST_SYSTEM_N 59
+#define R9A08G045_SCIF1_RST_SYSTEM_N 60
+#define R9A08G045_SCIF2_RST_SYSTEM_N 61
+#define R9A08G045_SCIF3_RST_SYSTEM_N 62
+#define R9A08G045_SCIF4_RST_SYSTEM_N 63
+#define R9A08G045_SCIF5_RST_SYSTEM_N 64
+#define R9A08G045_SCI0_RST 65
+#define R9A08G045_SCI1_RST 66
+#define R9A08G045_IRDA_RST 67
+#define R9A08G045_RSPI0_RST 68
+#define R9A08G045_RSPI1_RST 69
+#define R9A08G045_RSPI2_RST 70
+#define R9A08G045_RSPI3_RST 71
+#define R9A08G045_RSPI4_RST 72
+#define R9A08G045_CANFD_RSTP_N 73
+#define R9A08G045_CANFD_RSTC_N 74
+#define R9A08G045_GPIO_RSTN 75
+#define R9A08G045_GPIO_PORT_RESETN 76
+#define R9A08G045_GPIO_SPARE_RESETN 77
+#define R9A08G045_ADC_PRESETN 78
+#define R9A08G045_ADC_ADRST_N 79
+#define R9A08G045_TSU_PRESETN 80
+#define R9A08G045_OCTA_ARESETN 81
+#define R9A08G045_PDM0_PRESETNT 82
+#define R9A08G045_PCI_ARESETN 83
+#define R9A08G045_PCI_RST_B 84
+#define R9A08G045_PCI_RST_GP_B 85
+#define R9A08G045_PCI_RST_PS_B 86
+#define R9A08G045_PCI_RST_RSM_B 87
+#define R9A08G045_PCI_RST_CFG_B 88
+#define R9A08G045_PCI_RST_LOAD_B 89
+#define R9A08G045_SPDIF_RST 90
+#define R9A08G045_I3C_TRESETN 91
+#define R9A08G045_I3C_PRESETN 92
+#define R9A08G045_VBAT_BRESETN 93
+
+#endif /* __DT_BINDINGS_CLOCK_R9A08G045_CPG_H__ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/rockchip,rk3588-cru.h b/sys/contrib/device-tree/include/dt-bindings/clock/rockchip,rk3588-cru.h
index b5616bca7b44..5790b1391201 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/rockchip,rk3588-cru.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/rockchip,rk3588-cru.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
/*
* Copyright (c) 2021 Rockchip Electronics Co. Ltd.
* Copyright (c) 2022 Collabora Ltd.
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/samsung,exynosautov9.h b/sys/contrib/device-tree/include/dt-bindings/clock/samsung,exynosautov9.h
index 42133af6d6b9..3065375c2d8b 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/samsung,exynosautov9.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/samsung,exynosautov9.h
@@ -166,16 +166,12 @@
#define GOUT_CLKCMU_PERIC1_IP 248
#define GOUT_CLKCMU_PERIS_BUS 249
-#define TOP_NR_CLK 250
-
/* CMU_BUSMC */
#define CLK_MOUT_BUSMC_BUS_USER 1
#define CLK_DOUT_BUSMC_BUSP 2
#define CLK_GOUT_BUSMC_PDMA0_PCLK 3
#define CLK_GOUT_BUSMC_SPDMA_PCLK 4
-#define BUSMC_NR_CLK 5
-
/* CMU_CORE */
#define CLK_MOUT_CORE_BUS_USER 1
#define CLK_DOUT_CORE_BUSP 2
@@ -183,8 +179,6 @@
#define CLK_GOUT_CORE_CCI_PCLK 4
#define CLK_GOUT_CORE_CMU_CORE_PCLK 5
-#define CORE_NR_CLK 6
-
/* CMU_FSYS0 */
#define CLK_MOUT_FSYS0_BUS_USER 1
#define CLK_MOUT_FSYS0_PCIE_USER 2
@@ -226,8 +220,6 @@
#define CLK_GOUT_FSYS0_PCIE_GEN3A_4L_CLK 35
#define CLK_GOUT_FSYS0_PCIE_GEN3B_4L_CLK 36
-#define FSYS0_NR_CLK 37
-
/* CMU_FSYS1 */
#define FOUT_MMC_PLL 1
@@ -251,8 +243,6 @@
#define CLK_GOUT_FSYS1_USB30_0_ACLK 17
#define CLK_GOUT_FSYS1_USB30_1_ACLK 18
-#define FSYS1_NR_CLK 19
-
/* CMU_FSYS2 */
#define CLK_MOUT_FSYS2_BUS_USER 1
#define CLK_MOUT_FSYS2_UFS_EMBD_USER 2
@@ -262,8 +252,6 @@
#define CLK_GOUT_FSYS2_UFS_EMBD1_ACLK 6
#define CLK_GOUT_FSYS2_UFS_EMBD1_UNIPRO 7
-#define FSYS2_NR_CLK 8
-
/* CMU_PERIC0 */
#define CLK_MOUT_PERIC0_BUS_USER 1
#define CLK_MOUT_PERIC0_IP_USER 2
@@ -308,8 +296,6 @@
#define CLK_GOUT_PERIC0_PCLK_10 42
#define CLK_GOUT_PERIC0_PCLK_11 43
-#define PERIC0_NR_CLK 44
-
/* CMU_PERIC1 */
#define CLK_MOUT_PERIC1_BUS_USER 1
#define CLK_MOUT_PERIC1_IP_USER 2
@@ -354,14 +340,10 @@
#define CLK_GOUT_PERIC1_PCLK_10 42
#define CLK_GOUT_PERIC1_PCLK_11 43
-#define PERIC1_NR_CLK 44
-
/* CMU_PERIS */
#define CLK_MOUT_PERIS_BUS_USER 1
#define CLK_GOUT_SYSREG_PERIS_PCLK 2
#define CLK_GOUT_WDT_CLUSTER0 3
#define CLK_GOUT_WDT_CLUSTER1 4
-#define PERIS_NR_CLK 5
-
#endif /* _DT_BINDINGS_CLOCK_EXYNOSAUTOV9_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sophgo,cv1800.h b/sys/contrib/device-tree/include/dt-bindings/clock/sophgo,cv1800.h
new file mode 100644
index 000000000000..cfbeca25a650
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sophgo,cv1800.h
@@ -0,0 +1,176 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/*
+ * Copyright (C) 2023 Sophgo Ltd.
+ */
+
+#ifndef __DT_BINDINGS_SOPHGO_CV1800_CLK_H__
+#define __DT_BINDINGS_SOPHGO_CV1800_CLK_H__
+
+#define CLK_MPLL 0
+#define CLK_TPLL 1
+#define CLK_FPLL 2
+#define CLK_MIPIMPLL 3
+#define CLK_A0PLL 4
+#define CLK_DISPPLL 5
+#define CLK_CAM0PLL 6
+#define CLK_CAM1PLL 7
+
+#define CLK_MIPIMPLL_D3 8
+#define CLK_CAM0PLL_D2 9
+#define CLK_CAM0PLL_D3 10
+
+#define CLK_TPU 11
+#define CLK_TPU_FAB 12
+#define CLK_AHB_ROM 13
+#define CLK_DDR_AXI_REG 14
+#define CLK_RTC_25M 15
+#define CLK_SRC_RTC_SYS_0 16
+#define CLK_TEMPSEN 17
+#define CLK_SARADC 18
+#define CLK_EFUSE 19
+#define CLK_APB_EFUSE 20
+#define CLK_DEBUG 21
+#define CLK_AP_DEBUG 22
+#define CLK_XTAL_MISC 23
+#define CLK_AXI4_EMMC 24
+#define CLK_EMMC 25
+#define CLK_EMMC_100K 26
+#define CLK_AXI4_SD0 27
+#define CLK_SD0 28
+#define CLK_SD0_100K 29
+#define CLK_AXI4_SD1 30
+#define CLK_SD1 31
+#define CLK_SD1_100K 32
+#define CLK_SPI_NAND 33
+#define CLK_ETH0_500M 34
+#define CLK_AXI4_ETH0 35
+#define CLK_ETH1_500M 36
+#define CLK_AXI4_ETH1 37
+#define CLK_APB_GPIO 38
+#define CLK_APB_GPIO_INTR 39
+#define CLK_GPIO_DB 40
+#define CLK_AHB_SF 41
+#define CLK_AHB_SF1 42
+#define CLK_A24M 43
+#define CLK_AUDSRC 44
+#define CLK_APB_AUDSRC 45
+#define CLK_SDMA_AXI 46
+#define CLK_SDMA_AUD0 47
+#define CLK_SDMA_AUD1 48
+#define CLK_SDMA_AUD2 49
+#define CLK_SDMA_AUD3 50
+#define CLK_I2C 51
+#define CLK_APB_I2C 52
+#define CLK_APB_I2C0 53
+#define CLK_APB_I2C1 54
+#define CLK_APB_I2C2 55
+#define CLK_APB_I2C3 56
+#define CLK_APB_I2C4 57
+#define CLK_APB_WDT 58
+#define CLK_PWM_SRC 59
+#define CLK_PWM 60
+#define CLK_SPI 61
+#define CLK_APB_SPI0 62
+#define CLK_APB_SPI1 63
+#define CLK_APB_SPI2 64
+#define CLK_APB_SPI3 65
+#define CLK_1M 66
+#define CLK_CAM0_200 67
+#define CLK_PM 68
+#define CLK_TIMER0 69
+#define CLK_TIMER1 70
+#define CLK_TIMER2 71
+#define CLK_TIMER3 72
+#define CLK_TIMER4 73
+#define CLK_TIMER5 74
+#define CLK_TIMER6 75
+#define CLK_TIMER7 76
+#define CLK_UART0 77
+#define CLK_APB_UART0 78
+#define CLK_UART1 79
+#define CLK_APB_UART1 80
+#define CLK_UART2 81
+#define CLK_APB_UART2 82
+#define CLK_UART3 83
+#define CLK_APB_UART3 84
+#define CLK_UART4 85
+#define CLK_APB_UART4 86
+#define CLK_APB_I2S0 87
+#define CLK_APB_I2S1 88
+#define CLK_APB_I2S2 89
+#define CLK_APB_I2S3 90
+#define CLK_AXI4_USB 91
+#define CLK_APB_USB 92
+#define CLK_USB_125M 93
+#define CLK_USB_33K 94
+#define CLK_USB_12M 95
+#define CLK_AXI4 96
+#define CLK_AXI6 97
+#define CLK_DSI_ESC 98
+#define CLK_AXI_VIP 99
+#define CLK_SRC_VIP_SYS_0 100
+#define CLK_SRC_VIP_SYS_1 101
+#define CLK_SRC_VIP_SYS_2 102
+#define CLK_SRC_VIP_SYS_3 103
+#define CLK_SRC_VIP_SYS_4 104
+#define CLK_CSI_BE_VIP 105
+#define CLK_CSI_MAC0_VIP 106
+#define CLK_CSI_MAC1_VIP 107
+#define CLK_CSI_MAC2_VIP 108
+#define CLK_CSI0_RX_VIP 109
+#define CLK_CSI1_RX_VIP 110
+#define CLK_ISP_TOP_VIP 111
+#define CLK_IMG_D_VIP 112
+#define CLK_IMG_V_VIP 113
+#define CLK_SC_TOP_VIP 114
+#define CLK_SC_D_VIP 115
+#define CLK_SC_V1_VIP 116
+#define CLK_SC_V2_VIP 117
+#define CLK_SC_V3_VIP 118
+#define CLK_DWA_VIP 119
+#define CLK_BT_VIP 120
+#define CLK_DISP_VIP 121
+#define CLK_DSI_MAC_VIP 122
+#define CLK_LVDS0_VIP 123
+#define CLK_LVDS1_VIP 124
+#define CLK_PAD_VI_VIP 125
+#define CLK_PAD_VI1_VIP 126
+#define CLK_PAD_VI2_VIP 127
+#define CLK_CFG_REG_VIP 128
+#define CLK_VIP_IP0 129
+#define CLK_VIP_IP1 130
+#define CLK_VIP_IP2 131
+#define CLK_VIP_IP3 132
+#define CLK_IVE_VIP 133
+#define CLK_RAW_VIP 134
+#define CLK_OSDC_VIP 135
+#define CLK_CAM0_VIP 136
+#define CLK_AXI_VIDEO_CODEC 137
+#define CLK_VC_SRC0 138
+#define CLK_VC_SRC1 139
+#define CLK_VC_SRC2 140
+#define CLK_H264C 141
+#define CLK_APB_H264C 142
+#define CLK_H265C 143
+#define CLK_APB_H265C 144
+#define CLK_JPEG 145
+#define CLK_APB_JPEG 146
+#define CLK_CAM0 147
+#define CLK_CAM1 148
+#define CLK_WGN 149
+#define CLK_WGN0 150
+#define CLK_WGN1 151
+#define CLK_WGN2 152
+#define CLK_KEYSCAN 153
+#define CLK_CFG_REG_VC 154
+#define CLK_C906_0 155
+#define CLK_C906_1 156
+#define CLK_A53 157
+#define CLK_CPU_AXI0 158
+#define CLK_CPU_GIC 159
+#define CLK_XTAL_AP 160
+
+// Only for CV181x
+#define CLK_DISP_SRC_VIP 161
+
+#endif /* __DT_BINDINGS_SOPHGO_CV1800_CLK_H__ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/st,stm32mp25-rcc.h b/sys/contrib/device-tree/include/dt-bindings/clock/st,stm32mp25-rcc.h
new file mode 100644
index 000000000000..b6cf05ad4be6
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/st,stm32mp25-rcc.h
@@ -0,0 +1,492 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/*
+ * Copyright (C) STMicroelectronics 2023 - All Rights Reserved
+ * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
+ */
+
+#ifndef _DT_BINDINGS_STM32MP25_CLKS_H_
+#define _DT_BINDINGS_STM32MP25_CLKS_H_
+
+/* INTERNAL/EXTERNAL OSCILLATORS */
+#define HSI_CK 0
+#define HSE_CK 1
+#define MSI_CK 2
+#define LSI_CK 3
+#define LSE_CK 4
+#define I2S_CK 5
+#define RTC_CK 6
+#define SPDIF_CK_SYMB 7
+
+/* PLL CLOCKS */
+#define PLL1_CK 8
+#define PLL2_CK 9
+#define PLL3_CK 10
+#define PLL4_CK 11
+#define PLL5_CK 12
+#define PLL6_CK 13
+#define PLL7_CK 14
+#define PLL8_CK 15
+
+#define CK_CPU1 16
+
+/* APB DIV CLOCKS */
+#define CK_ICN_APB1 17
+#define CK_ICN_APB2 18
+#define CK_ICN_APB3 19
+#define CK_ICN_APB4 20
+#define CK_ICN_APBDBG 21
+
+/* GLOBAL TIMER */
+#define TIMG1_CK 22
+#define TIMG2_CK 23
+
+/* FLEXGEN CLOCKS */
+#define CK_ICN_HS_MCU 24
+#define CK_ICN_SDMMC 25
+#define CK_ICN_DDR 26
+#define CK_ICN_DISPLAY 27
+#define CK_ICN_HSL 28
+#define CK_ICN_NIC 29
+#define CK_ICN_VID 30
+#define CK_FLEXGEN_07 31
+#define CK_FLEXGEN_08 32
+#define CK_FLEXGEN_09 33
+#define CK_FLEXGEN_10 34
+#define CK_FLEXGEN_11 35
+#define CK_FLEXGEN_12 36
+#define CK_FLEXGEN_13 37
+#define CK_FLEXGEN_14 38
+#define CK_FLEXGEN_15 39
+#define CK_FLEXGEN_16 40
+#define CK_FLEXGEN_17 41
+#define CK_FLEXGEN_18 42
+#define CK_FLEXGEN_19 43
+#define CK_FLEXGEN_20 44
+#define CK_FLEXGEN_21 45
+#define CK_FLEXGEN_22 46
+#define CK_FLEXGEN_23 47
+#define CK_FLEXGEN_24 48
+#define CK_FLEXGEN_25 49
+#define CK_FLEXGEN_26 50
+#define CK_FLEXGEN_27 51
+#define CK_FLEXGEN_28 52
+#define CK_FLEXGEN_29 53
+#define CK_FLEXGEN_30 54
+#define CK_FLEXGEN_31 55
+#define CK_FLEXGEN_32 56
+#define CK_FLEXGEN_33 57
+#define CK_FLEXGEN_34 58
+#define CK_FLEXGEN_35 59
+#define CK_FLEXGEN_36 60
+#define CK_FLEXGEN_37 61
+#define CK_FLEXGEN_38 62
+#define CK_FLEXGEN_39 63
+#define CK_FLEXGEN_40 64
+#define CK_FLEXGEN_41 65
+#define CK_FLEXGEN_42 66
+#define CK_FLEXGEN_43 67
+#define CK_FLEXGEN_44 68
+#define CK_FLEXGEN_45 69
+#define CK_FLEXGEN_46 70
+#define CK_FLEXGEN_47 71
+#define CK_FLEXGEN_48 72
+#define CK_FLEXGEN_49 73
+#define CK_FLEXGEN_50 74
+#define CK_FLEXGEN_51 75
+#define CK_FLEXGEN_52 76
+#define CK_FLEXGEN_53 77
+#define CK_FLEXGEN_54 78
+#define CK_FLEXGEN_55 79
+#define CK_FLEXGEN_56 80
+#define CK_FLEXGEN_57 81
+#define CK_FLEXGEN_58 82
+#define CK_FLEXGEN_59 83
+#define CK_FLEXGEN_60 84
+#define CK_FLEXGEN_61 85
+#define CK_FLEXGEN_62 86
+#define CK_FLEXGEN_63 87
+
+/* LOW SPEED MCU CLOCK */
+#define CK_ICN_LS_MCU 88
+
+#define CK_BUS_STM500 89
+#define CK_BUS_FMC 90
+#define CK_BUS_GPU 91
+#define CK_BUS_ETH1 92
+#define CK_BUS_ETH2 93
+#define CK_BUS_PCIE 94
+#define CK_BUS_DDRPHYC 95
+#define CK_BUS_SYSCPU1 96
+#define CK_BUS_ETHSW 97
+#define CK_BUS_HPDMA1 98
+#define CK_BUS_HPDMA2 99
+#define CK_BUS_HPDMA3 100
+#define CK_BUS_ADC12 101
+#define CK_BUS_ADC3 102
+#define CK_BUS_IPCC1 103
+#define CK_BUS_CCI 104
+#define CK_BUS_CRC 105
+#define CK_BUS_MDF1 106
+#define CK_BUS_OSPIIOM 107
+#define CK_BUS_BKPSRAM 108
+#define CK_BUS_HASH 109
+#define CK_BUS_RNG 110
+#define CK_BUS_CRYP1 111
+#define CK_BUS_CRYP2 112
+#define CK_BUS_SAES 113
+#define CK_BUS_PKA 114
+#define CK_BUS_GPIOA 115
+#define CK_BUS_GPIOB 116
+#define CK_BUS_GPIOC 117
+#define CK_BUS_GPIOD 118
+#define CK_BUS_GPIOE 119
+#define CK_BUS_GPIOF 120
+#define CK_BUS_GPIOG 121
+#define CK_BUS_GPIOH 122
+#define CK_BUS_GPIOI 123
+#define CK_BUS_GPIOJ 124
+#define CK_BUS_GPIOK 125
+#define CK_BUS_LPSRAM1 126
+#define CK_BUS_LPSRAM2 127
+#define CK_BUS_LPSRAM3 128
+#define CK_BUS_GPIOZ 129
+#define CK_BUS_LPDMA 130
+#define CK_BUS_HSEM 131
+#define CK_BUS_IPCC2 132
+#define CK_BUS_RTC 133
+#define CK_BUS_SPI8 134
+#define CK_BUS_LPUART1 135
+#define CK_BUS_I2C8 136
+#define CK_BUS_LPTIM3 137
+#define CK_BUS_LPTIM4 138
+#define CK_BUS_LPTIM5 139
+#define CK_BUS_IWDG5 140
+#define CK_BUS_WWDG2 141
+#define CK_BUS_I3C4 142
+#define CK_BUS_TIM2 143
+#define CK_BUS_TIM3 144
+#define CK_BUS_TIM4 145
+#define CK_BUS_TIM5 146
+#define CK_BUS_TIM6 147
+#define CK_BUS_TIM7 148
+#define CK_BUS_TIM10 149
+#define CK_BUS_TIM11 150
+#define CK_BUS_TIM12 151
+#define CK_BUS_TIM13 152
+#define CK_BUS_TIM14 153
+#define CK_BUS_LPTIM1 154
+#define CK_BUS_LPTIM2 155
+#define CK_BUS_SPI2 156
+#define CK_BUS_SPI3 157
+#define CK_BUS_SPDIFRX 158
+#define CK_BUS_USART2 159
+#define CK_BUS_USART3 160
+#define CK_BUS_UART4 161
+#define CK_BUS_UART5 162
+#define CK_BUS_I2C1 163
+#define CK_BUS_I2C2 164
+#define CK_BUS_I2C3 165
+#define CK_BUS_I2C4 166
+#define CK_BUS_I2C5 167
+#define CK_BUS_I2C6 168
+#define CK_BUS_I2C7 169
+#define CK_BUS_I3C1 170
+#define CK_BUS_I3C2 171
+#define CK_BUS_I3C3 172
+#define CK_BUS_TIM1 173
+#define CK_BUS_TIM8 174
+#define CK_BUS_TIM15 175
+#define CK_BUS_TIM16 176
+#define CK_BUS_TIM17 177
+#define CK_BUS_TIM20 178
+#define CK_BUS_SAI1 179
+#define CK_BUS_SAI2 180
+#define CK_BUS_SAI3 181
+#define CK_BUS_SAI4 182
+#define CK_BUS_USART1 183
+#define CK_BUS_USART6 184
+#define CK_BUS_UART7 185
+#define CK_BUS_UART8 186
+#define CK_BUS_UART9 187
+#define CK_BUS_FDCAN 188
+#define CK_BUS_SPI1 189
+#define CK_BUS_SPI4 190
+#define CK_BUS_SPI5 191
+#define CK_BUS_SPI6 192
+#define CK_BUS_SPI7 193
+#define CK_BUS_BSEC 194
+#define CK_BUS_IWDG1 195
+#define CK_BUS_IWDG2 196
+#define CK_BUS_IWDG3 197
+#define CK_BUS_IWDG4 198
+#define CK_BUS_WWDG1 199
+#define CK_BUS_VREF 200
+#define CK_BUS_DTS 201
+#define CK_BUS_SERC 202
+#define CK_BUS_HDP 203
+#define CK_BUS_IS2M 204
+#define CK_BUS_DSI 205
+#define CK_BUS_LTDC 206
+#define CK_BUS_CSI 207
+#define CK_BUS_DCMIPP 208
+#define CK_BUS_DDRC 209
+#define CK_BUS_DDRCFG 210
+#define CK_BUS_GICV2M 211
+#define CK_BUS_USBTC 212
+#define CK_BUS_USB3PCIEPHY 214
+#define CK_BUS_STGEN 215
+#define CK_BUS_VDEC 216
+#define CK_BUS_VENC 217
+#define CK_SYSDBG 218
+#define CK_KER_TIM2 219
+#define CK_KER_TIM3 220
+#define CK_KER_TIM4 221
+#define CK_KER_TIM5 222
+#define CK_KER_TIM6 223
+#define CK_KER_TIM7 224
+#define CK_KER_TIM10 225
+#define CK_KER_TIM11 226
+#define CK_KER_TIM12 227
+#define CK_KER_TIM13 228
+#define CK_KER_TIM14 229
+#define CK_KER_TIM1 230
+#define CK_KER_TIM8 231
+#define CK_KER_TIM15 232
+#define CK_KER_TIM16 233
+#define CK_KER_TIM17 234
+#define CK_KER_TIM20 235
+#define CK_BUS_SYSRAM 236
+#define CK_BUS_VDERAM 237
+#define CK_BUS_RETRAM 238
+#define CK_BUS_OSPI1 239
+#define CK_BUS_OSPI2 240
+#define CK_BUS_OTFD1 241
+#define CK_BUS_OTFD2 242
+#define CK_BUS_SRAM1 243
+#define CK_BUS_SRAM2 244
+#define CK_BUS_SDMMC1 245
+#define CK_BUS_SDMMC2 246
+#define CK_BUS_SDMMC3 247
+#define CK_BUS_DDR 248
+#define CK_BUS_RISAF4 249
+#define CK_BUS_USB2OHCI 250
+#define CK_BUS_USB2EHCI 251
+#define CK_BUS_USB3DR 252
+#define CK_KER_LPTIM1 253
+#define CK_KER_LPTIM2 254
+#define CK_KER_USART2 255
+#define CK_KER_UART4 256
+#define CK_KER_USART3 257
+#define CK_KER_UART5 258
+#define CK_KER_SPI2 259
+#define CK_KER_SPI3 260
+#define CK_KER_SPDIFRX 261
+#define CK_KER_I2C1 262
+#define CK_KER_I2C2 263
+#define CK_KER_I3C1 264
+#define CK_KER_I3C2 265
+#define CK_KER_I2C3 266
+#define CK_KER_I2C5 267
+#define CK_KER_I3C3 268
+#define CK_KER_I2C4 269
+#define CK_KER_I2C6 270
+#define CK_KER_I2C7 271
+#define CK_KER_SPI1 272
+#define CK_KER_SPI4 273
+#define CK_KER_SPI5 274
+#define CK_KER_SPI6 275
+#define CK_KER_SPI7 276
+#define CK_KER_USART1 277
+#define CK_KER_USART6 278
+#define CK_KER_UART7 279
+#define CK_KER_UART8 280
+#define CK_KER_UART9 281
+#define CK_KER_MDF1 282
+#define CK_KER_SAI1 283
+#define CK_KER_SAI2 284
+#define CK_KER_SAI3 285
+#define CK_KER_SAI4 286
+#define CK_KER_FDCAN 287
+#define CK_KER_DSIBLANE 288
+#define CK_KER_DSIPHY 289
+#define CK_KER_CSI 290
+#define CK_KER_CSITXESC 291
+#define CK_KER_CSIPHY 292
+#define CK_KER_LVDSPHY 293
+#define CK_KER_STGEN 294
+#define CK_KER_USB3PCIEPHY 295
+#define CK_KER_USB2PHY2EN 296
+#define CK_KER_I3C4 297
+#define CK_KER_SPI8 298
+#define CK_KER_I2C8 299
+#define CK_KER_LPUART1 300
+#define CK_KER_LPTIM3 301
+#define CK_KER_LPTIM4 302
+#define CK_KER_LPTIM5 303
+#define CK_KER_TSDBG 304
+#define CK_KER_TPIU 305
+#define CK_BUS_ETR 306
+#define CK_BUS_SYSATB 307
+#define CK_KER_ADC12 308
+#define CK_KER_ADC3 309
+#define CK_KER_OSPI1 310
+#define CK_KER_OSPI2 311
+#define CK_KER_FMC 312
+#define CK_KER_SDMMC1 313
+#define CK_KER_SDMMC2 314
+#define CK_KER_SDMMC3 315
+#define CK_KER_ETH1 316
+#define CK_KER_ETH2 317
+#define CK_KER_ETH1PTP 318
+#define CK_KER_ETH2PTP 319
+#define CK_KER_USB2PHY1 320
+#define CK_KER_USB2PHY2 321
+#define CK_KER_ETHSW 322
+#define CK_KER_ETHSWREF 323
+#define CK_MCO1 324
+#define CK_MCO2 325
+#define CK_KER_DTS 326
+#define CK_ETH1_RX 327
+#define CK_ETH1_TX 328
+#define CK_ETH1_MAC 329
+#define CK_ETH2_RX 330
+#define CK_ETH2_TX 331
+#define CK_ETH2_MAC 332
+#define CK_ETH1_STP 333
+#define CK_ETH2_STP 334
+#define CK_KER_USBTC 335
+#define CK_BUS_ADF1 336
+#define CK_KER_ADF1 337
+#define CK_BUS_LVDS 338
+#define CK_KER_LTDC 339
+#define CK_KER_GPU 340
+#define CK_BUS_ETHSWACMCFG 341
+#define CK_BUS_ETHSWACMMSG 342
+#define HSE_DIV2_CK 343
+
+#define STM32MP25_LAST_CLK 344
+
+#define CK_SCMI_ICN_HS_MCU 0
+#define CK_SCMI_ICN_SDMMC 1
+#define CK_SCMI_ICN_DDR 2
+#define CK_SCMI_ICN_DISPLAY 3
+#define CK_SCMI_ICN_HSL 4
+#define CK_SCMI_ICN_NIC 5
+#define CK_SCMI_ICN_VID 6
+#define CK_SCMI_FLEXGEN_07 7
+#define CK_SCMI_FLEXGEN_08 8
+#define CK_SCMI_FLEXGEN_09 9
+#define CK_SCMI_FLEXGEN_10 10
+#define CK_SCMI_FLEXGEN_11 11
+#define CK_SCMI_FLEXGEN_12 12
+#define CK_SCMI_FLEXGEN_13 13
+#define CK_SCMI_FLEXGEN_14 14
+#define CK_SCMI_FLEXGEN_15 15
+#define CK_SCMI_FLEXGEN_16 16
+#define CK_SCMI_FLEXGEN_17 17
+#define CK_SCMI_FLEXGEN_18 18
+#define CK_SCMI_FLEXGEN_19 19
+#define CK_SCMI_FLEXGEN_20 20
+#define CK_SCMI_FLEXGEN_21 21
+#define CK_SCMI_FLEXGEN_22 22
+#define CK_SCMI_FLEXGEN_23 23
+#define CK_SCMI_FLEXGEN_24 24
+#define CK_SCMI_FLEXGEN_25 25
+#define CK_SCMI_FLEXGEN_26 26
+#define CK_SCMI_FLEXGEN_27 27
+#define CK_SCMI_FLEXGEN_28 28
+#define CK_SCMI_FLEXGEN_29 29
+#define CK_SCMI_FLEXGEN_30 30
+#define CK_SCMI_FLEXGEN_31 31
+#define CK_SCMI_FLEXGEN_32 32
+#define CK_SCMI_FLEXGEN_33 33
+#define CK_SCMI_FLEXGEN_34 34
+#define CK_SCMI_FLEXGEN_35 35
+#define CK_SCMI_FLEXGEN_36 36
+#define CK_SCMI_FLEXGEN_37 37
+#define CK_SCMI_FLEXGEN_38 38
+#define CK_SCMI_FLEXGEN_39 39
+#define CK_SCMI_FLEXGEN_40 40
+#define CK_SCMI_FLEXGEN_41 41
+#define CK_SCMI_FLEXGEN_42 42
+#define CK_SCMI_FLEXGEN_43 43
+#define CK_SCMI_FLEXGEN_44 44
+#define CK_SCMI_FLEXGEN_45 45
+#define CK_SCMI_FLEXGEN_46 46
+#define CK_SCMI_FLEXGEN_47 47
+#define CK_SCMI_FLEXGEN_48 48
+#define CK_SCMI_FLEXGEN_49 49
+#define CK_SCMI_FLEXGEN_50 50
+#define CK_SCMI_FLEXGEN_51 51
+#define CK_SCMI_FLEXGEN_52 52
+#define CK_SCMI_FLEXGEN_53 53
+#define CK_SCMI_FLEXGEN_54 54
+#define CK_SCMI_FLEXGEN_55 55
+#define CK_SCMI_FLEXGEN_56 56
+#define CK_SCMI_FLEXGEN_57 57
+#define CK_SCMI_FLEXGEN_58 58
+#define CK_SCMI_FLEXGEN_59 59
+#define CK_SCMI_FLEXGEN_60 60
+#define CK_SCMI_FLEXGEN_61 61
+#define CK_SCMI_FLEXGEN_62 62
+#define CK_SCMI_FLEXGEN_63 63
+#define CK_SCMI_ICN_LS_MCU 64
+#define CK_SCMI_HSE 65
+#define CK_SCMI_LSE 66
+#define CK_SCMI_HSI 67
+#define CK_SCMI_LSI 68
+#define CK_SCMI_MSI 69
+#define CK_SCMI_HSE_DIV2 70
+#define CK_SCMI_CPU1 71
+#define CK_SCMI_SYSCPU1 72
+#define CK_SCMI_PLL2 73
+#define CK_SCMI_PLL3 74
+#define CK_SCMI_RTC 75
+#define CK_SCMI_RTCCK 76
+#define CK_SCMI_ICN_APB1 77
+#define CK_SCMI_ICN_APB2 78
+#define CK_SCMI_ICN_APB3 79
+#define CK_SCMI_ICN_APB4 80
+#define CK_SCMI_ICN_APBDBG 81
+#define CK_SCMI_TIMG1 82
+#define CK_SCMI_TIMG2 83
+#define CK_SCMI_BKPSRAM 84
+#define CK_SCMI_BSEC 85
+#define CK_SCMI_ETR 87
+#define CK_SCMI_FMC 88
+#define CK_SCMI_GPIOA 89
+#define CK_SCMI_GPIOB 90
+#define CK_SCMI_GPIOC 91
+#define CK_SCMI_GPIOD 92
+#define CK_SCMI_GPIOE 93
+#define CK_SCMI_GPIOF 94
+#define CK_SCMI_GPIOG 95
+#define CK_SCMI_GPIOH 96
+#define CK_SCMI_GPIOI 97
+#define CK_SCMI_GPIOJ 98
+#define CK_SCMI_GPIOK 99
+#define CK_SCMI_GPIOZ 100
+#define CK_SCMI_HPDMA1 101
+#define CK_SCMI_HPDMA2 102
+#define CK_SCMI_HPDMA3 103
+#define CK_SCMI_HSEM 104
+#define CK_SCMI_IPCC1 105
+#define CK_SCMI_IPCC2 106
+#define CK_SCMI_LPDMA 107
+#define CK_SCMI_RETRAM 108
+#define CK_SCMI_SRAM1 109
+#define CK_SCMI_SRAM2 110
+#define CK_SCMI_LPSRAM1 111
+#define CK_SCMI_LPSRAM2 112
+#define CK_SCMI_LPSRAM3 113
+#define CK_SCMI_VDERAM 114
+#define CK_SCMI_SYSRAM 115
+#define CK_SCMI_OSPI1 116
+#define CK_SCMI_OSPI2 117
+#define CK_SCMI_TPIU 118
+#define CK_SCMI_SYSDBG 119
+#define CK_SCMI_SYSATB 120
+#define CK_SCMI_TSDBG 121
+#define CK_SCMI_STM500 122
+
+#endif /* _DT_BINDINGS_STM32MP25_CLKS_H_ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/starfive,jh7110-crg.h b/sys/contrib/device-tree/include/dt-bindings/clock/starfive,jh7110-crg.h
index 06257bfd9ac1..467ccab3bfaa 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/starfive,jh7110-crg.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/starfive,jh7110-crg.h
@@ -1,11 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Copyright 2022 Emil Renner Berthing <kernel@esmil.dk>
+ * Copyright 2022 StarFive Technology Co., Ltd.
*/
#ifndef __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
#define __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
+/* PLL clocks */
+#define JH7110_PLLCLK_PLL0_OUT 0
+#define JH7110_PLLCLK_PLL1_OUT 1
+#define JH7110_PLLCLK_PLL2_OUT 2
+#define JH7110_PLLCLK_END 3
+
/* SYSCRG clocks */
#define JH7110_SYSCLK_CPU_ROOT 0
#define JH7110_SYSCLK_CPU_CORE 1
@@ -218,4 +225,77 @@
#define JH7110_AONCLK_END 14
+/* STGCRG clocks */
+#define JH7110_STGCLK_HIFI4_CLK_CORE 0
+#define JH7110_STGCLK_USB0_APB 1
+#define JH7110_STGCLK_USB0_UTMI_APB 2
+#define JH7110_STGCLK_USB0_AXI 3
+#define JH7110_STGCLK_USB0_LPM 4
+#define JH7110_STGCLK_USB0_STB 5
+#define JH7110_STGCLK_USB0_APP_125 6
+#define JH7110_STGCLK_USB0_REFCLK 7
+#define JH7110_STGCLK_PCIE0_AXI_MST0 8
+#define JH7110_STGCLK_PCIE0_APB 9
+#define JH7110_STGCLK_PCIE0_TL 10
+#define JH7110_STGCLK_PCIE1_AXI_MST0 11
+#define JH7110_STGCLK_PCIE1_APB 12
+#define JH7110_STGCLK_PCIE1_TL 13
+#define JH7110_STGCLK_PCIE_SLV_MAIN 14
+#define JH7110_STGCLK_SEC_AHB 15
+#define JH7110_STGCLK_SEC_MISC_AHB 16
+#define JH7110_STGCLK_GRP0_MAIN 17
+#define JH7110_STGCLK_GRP0_BUS 18
+#define JH7110_STGCLK_GRP0_STG 19
+#define JH7110_STGCLK_GRP1_MAIN 20
+#define JH7110_STGCLK_GRP1_BUS 21
+#define JH7110_STGCLK_GRP1_STG 22
+#define JH7110_STGCLK_GRP1_HIFI 23
+#define JH7110_STGCLK_E2_RTC 24
+#define JH7110_STGCLK_E2_CORE 25
+#define JH7110_STGCLK_E2_DBG 26
+#define JH7110_STGCLK_DMA1P_AXI 27
+#define JH7110_STGCLK_DMA1P_AHB 28
+
+#define JH7110_STGCLK_END 29
+
+/* ISPCRG clocks */
+#define JH7110_ISPCLK_DOM4_APB_FUNC 0
+#define JH7110_ISPCLK_MIPI_RX0_PXL 1
+#define JH7110_ISPCLK_DVP_INV 2
+#define JH7110_ISPCLK_M31DPHY_CFG_IN 3
+#define JH7110_ISPCLK_M31DPHY_REF_IN 4
+#define JH7110_ISPCLK_M31DPHY_TX_ESC_LAN0 5
+#define JH7110_ISPCLK_VIN_APB 6
+#define JH7110_ISPCLK_VIN_SYS 7
+#define JH7110_ISPCLK_VIN_PIXEL_IF0 8
+#define JH7110_ISPCLK_VIN_PIXEL_IF1 9
+#define JH7110_ISPCLK_VIN_PIXEL_IF2 10
+#define JH7110_ISPCLK_VIN_PIXEL_IF3 11
+#define JH7110_ISPCLK_VIN_P_AXI_WR 12
+#define JH7110_ISPCLK_ISPV2_TOP_WRAPPER_C 13
+
+#define JH7110_ISPCLK_END 14
+
+/* VOUTCRG clocks */
+#define JH7110_VOUTCLK_APB 0
+#define JH7110_VOUTCLK_DC8200_PIX 1
+#define JH7110_VOUTCLK_DSI_SYS 2
+#define JH7110_VOUTCLK_TX_ESC 3
+#define JH7110_VOUTCLK_DC8200_AXI 4
+#define JH7110_VOUTCLK_DC8200_CORE 5
+#define JH7110_VOUTCLK_DC8200_AHB 6
+#define JH7110_VOUTCLK_DC8200_PIX0 7
+#define JH7110_VOUTCLK_DC8200_PIX1 8
+#define JH7110_VOUTCLK_DOM_VOUT_TOP_LCD 9
+#define JH7110_VOUTCLK_DSITX_APB 10
+#define JH7110_VOUTCLK_DSITX_SYS 11
+#define JH7110_VOUTCLK_DSITX_DPI 12
+#define JH7110_VOUTCLK_DSITX_TXESC 13
+#define JH7110_VOUTCLK_MIPITX_DPHY_TXESC 14
+#define JH7110_VOUTCLK_HDMI_TX_MCLK 15
+#define JH7110_VOUTCLK_HDMI_TX_BCLK 16
+#define JH7110_VOUTCLK_HDMI_TX_SYS 17
+
+#define JH7110_VOUTCLK_END 18
+
#endif /* __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/stm32mp1-clks.h b/sys/contrib/device-tree/include/dt-bindings/clock/stm32mp1-clks.h
index 25e8cfd43459..0a5324bcdbda 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/stm32mp1-clks.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/stm32mp1-clks.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
* Copyright (C) STMicroelectronics 2018 - All Rights Reserved
* Author: Gabriel Fernandez <gabriel.fernandez@st.com> for STMicroelectronics.
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-ccu.h b/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-ccu.h
index e143b9929763..fdbfb404f92a 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2020 huangzhenwei@allwinnertech.com
* Copyright (C) 2021 Samuel Holland <samuel@sholland.org>
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-r-ccu.h b/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-r-ccu.h
index 4c2697fd32b0..f95c170711e5 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-r-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sun20i-d1-r-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2021 Samuel Holland <samuel@sholland.org>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-a100-ccu.h b/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-a100-ccu.h
index 28dc36e1a232..06a2031d466b 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-a100-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-a100-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2020 Yangtao Li <frank@allwinnertech.com>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h6-ccu.h b/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h6-ccu.h
index a1545cd60e75..ef9123d81937 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h6-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h6-ccu.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h616-ccu.h b/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h616-ccu.h
index 1191aca53ac6..6f8f01e67628 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h616-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sun50i-h616-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2020 Arm Ltd.
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/clock/sun6i-rtc.h b/sys/contrib/device-tree/include/dt-bindings/clock/sun6i-rtc.h
index c845493e4d37..3bd3aa3d57ce 100644
--- a/sys/contrib/device-tree/include/dt-bindings/clock/sun6i-rtc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/clock/sun6i-rtc.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
#ifndef _DT_BINDINGS_CLK_SUN6I_RTC_H_
#define _DT_BINDINGS_CLK_SUN6I_RTC_H_
diff --git a/sys/contrib/device-tree/include/dt-bindings/display/sdtv-standards.h b/sys/contrib/device-tree/include/dt-bindings/display/sdtv-standards.h
index fbc1a3db2ea7..8249a2b47b79 100644
--- a/sys/contrib/device-tree/include/dt-bindings/display/sdtv-standards.h
+++ b/sys/contrib/device-tree/include/dt-bindings/display/sdtv-standards.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only or X11 */
+/* SPDX-License-Identifier: GPL-2.0-only OR X11 */
/*
* Copyright 2019 Pengutronix, Marco Felsch <kernel@pengutronix.de>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/dma/fsl-edma.h b/sys/contrib/device-tree/include/dt-bindings/dma/fsl-edma.h
new file mode 100644
index 000000000000..fd11478cfe9c
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/dma/fsl-edma.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+
+#ifndef _FSL_EDMA_DT_BINDING_H_
+#define _FSL_EDMA_DT_BINDING_H_
+
+/* Receive Channel */
+#define FSL_EDMA_RX 0x1
+
+/* iMX8 audio remote DMA */
+#define FSL_EDMA_REMOTE 0x2
+
+/* FIFO is continue memory region */
+#define FSL_EDMA_MULTI_FIFO 0x4
+
+/* Channel need stick to even channel */
+#define FSL_EDMA_EVEN_CH 0x8
+
+/* Channel need stick to odd channel */
+#define FSL_EDMA_ODD_CH 0x10
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/firmware/qcom,scm.h b/sys/contrib/device-tree/include/dt-bindings/firmware/qcom,scm.h
index d1dc09e72923..6de8b08e1e79 100644
--- a/sys/contrib/device-tree/include/dt-bindings/firmware/qcom,scm.h
+++ b/sys/contrib/device-tree/include/dt-bindings/firmware/qcom,scm.h
@@ -2,17 +2,38 @@
/*
* Copyright (c) 2010-2015, 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (C) 2015 Linaro Ltd.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _DT_BINDINGS_FIRMWARE_QCOM_SCM_H
#define _DT_BINDINGS_FIRMWARE_QCOM_SCM_H
+#define QCOM_SCM_VMID_TZ 0x1
#define QCOM_SCM_VMID_HLOS 0x3
#define QCOM_SCM_VMID_SSC_Q6 0x5
#define QCOM_SCM_VMID_ADSP_Q6 0x6
+#define QCOM_SCM_VMID_CP_TOUCH 0x8
+#define QCOM_SCM_VMID_CP_BITSTREAM 0x9
+#define QCOM_SCM_VMID_CP_PIXEL 0xA
+#define QCOM_SCM_VMID_CP_NON_PIXEL 0xB
+#define QCOM_SCM_VMID_CP_CAMERA 0xD
+#define QCOM_SCM_VMID_HLOS_FREE 0xE
#define QCOM_SCM_VMID_MSS_MSA 0xF
+#define QCOM_SCM_VMID_MSS_NONMSA 0x10
+#define QCOM_SCM_VMID_CP_SEC_DISPLAY 0x11
+#define QCOM_SCM_VMID_CP_APP 0x12
+#define QCOM_SCM_VMID_LPASS 0x16
#define QCOM_SCM_VMID_WLAN 0x18
#define QCOM_SCM_VMID_WLAN_CE 0x19
+#define QCOM_SCM_VMID_CP_SPSS_SP 0x1A
+#define QCOM_SCM_VMID_CP_CAMERA_PREVIEW 0x1D
+#define QCOM_SCM_VMID_CDSP 0x1E
+#define QCOM_SCM_VMID_CP_SPSS_SP_SHARED 0x22
+#define QCOM_SCM_VMID_CP_SPSS_HLOS_SHARED 0x24
+#define QCOM_SCM_VMID_ADSP_HEAP 0x25
+#define QCOM_SCM_VMID_CP_CDSP 0x2A
#define QCOM_SCM_VMID_NAV 0x2B
+#define QCOM_SCM_VMID_TVM 0x2D
+#define QCOM_SCM_VMID_OEMVM 0x31
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h b/sys/contrib/device-tree/include/dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h
new file mode 100644
index 000000000000..4e16d31a71c9
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h
@@ -0,0 +1,179 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
+ * Author: Huqiang Qin <huqiang.qin@amlogic.com>
+ */
+
+#ifndef _DT_BINDINGS_AMLOGIC_T7_GPIO_H
+#define _DT_BINDINGS_AMLOGIC_T7_GPIO_H
+
+#define GPIOB_0 0
+#define GPIOB_1 1
+#define GPIOB_2 2
+#define GPIOB_3 3
+#define GPIOB_4 4
+#define GPIOB_5 5
+#define GPIOB_6 6
+#define GPIOB_7 7
+#define GPIOB_8 8
+#define GPIOB_9 9
+#define GPIOB_10 10
+#define GPIOB_11 11
+#define GPIOB_12 12
+
+#define GPIOC_0 13
+#define GPIOC_1 14
+#define GPIOC_2 15
+#define GPIOC_3 16
+#define GPIOC_4 17
+#define GPIOC_5 18
+#define GPIOC_6 19
+
+#define GPIOX_0 20
+#define GPIOX_1 21
+#define GPIOX_2 22
+#define GPIOX_3 23
+#define GPIOX_4 24
+#define GPIOX_5 25
+#define GPIOX_6 26
+#define GPIOX_7 27
+#define GPIOX_8 28
+#define GPIOX_9 29
+#define GPIOX_10 30
+#define GPIOX_11 31
+#define GPIOX_12 32
+#define GPIOX_13 33
+#define GPIOX_14 34
+#define GPIOX_15 35
+#define GPIOX_16 36
+#define GPIOX_17 37
+#define GPIOX_18 38
+#define GPIOX_19 39
+
+#define GPIOW_0 40
+#define GPIOW_1 41
+#define GPIOW_2 42
+#define GPIOW_3 43
+#define GPIOW_4 44
+#define GPIOW_5 45
+#define GPIOW_6 46
+#define GPIOW_7 47
+#define GPIOW_8 48
+#define GPIOW_9 49
+#define GPIOW_10 50
+#define GPIOW_11 51
+#define GPIOW_12 52
+#define GPIOW_13 53
+#define GPIOW_14 54
+#define GPIOW_15 55
+#define GPIOW_16 56
+
+#define GPIOD_0 57
+#define GPIOD_1 58
+#define GPIOD_2 59
+#define GPIOD_3 60
+#define GPIOD_4 61
+#define GPIOD_5 62
+#define GPIOD_6 63
+#define GPIOD_7 64
+#define GPIOD_8 65
+#define GPIOD_9 66
+#define GPIOD_10 67
+#define GPIOD_11 68
+#define GPIOD_12 69
+
+#define GPIOE_0 70
+#define GPIOE_1 71
+#define GPIOE_2 72
+#define GPIOE_3 73
+#define GPIOE_4 74
+#define GPIOE_5 75
+#define GPIOE_6 76
+
+#define GPIOZ_0 77
+#define GPIOZ_1 78
+#define GPIOZ_2 79
+#define GPIOZ_3 80
+#define GPIOZ_4 81
+#define GPIOZ_5 82
+#define GPIOZ_6 83
+#define GPIOZ_7 84
+#define GPIOZ_8 85
+#define GPIOZ_9 86
+#define GPIOZ_10 87
+#define GPIOZ_11 88
+#define GPIOZ_12 89
+#define GPIOZ_13 90
+
+#define GPIOT_0 91
+#define GPIOT_1 92
+#define GPIOT_2 93
+#define GPIOT_3 94
+#define GPIOT_4 95
+#define GPIOT_5 96
+#define GPIOT_6 97
+#define GPIOT_7 98
+#define GPIOT_8 99
+#define GPIOT_9 100
+#define GPIOT_10 101
+#define GPIOT_11 102
+#define GPIOT_12 103
+#define GPIOT_13 104
+#define GPIOT_14 105
+#define GPIOT_15 106
+#define GPIOT_16 107
+#define GPIOT_17 108
+#define GPIOT_18 109
+#define GPIOT_19 110
+#define GPIOT_20 111
+#define GPIOT_21 112
+#define GPIOT_22 113
+#define GPIOT_23 114
+
+#define GPIOM_0 115
+#define GPIOM_1 116
+#define GPIOM_2 117
+#define GPIOM_3 118
+#define GPIOM_4 119
+#define GPIOM_5 120
+#define GPIOM_6 121
+#define GPIOM_7 122
+#define GPIOM_8 123
+#define GPIOM_9 124
+#define GPIOM_10 125
+#define GPIOM_11 126
+#define GPIOM_12 127
+#define GPIOM_13 128
+
+#define GPIOY_0 129
+#define GPIOY_1 130
+#define GPIOY_2 131
+#define GPIOY_3 132
+#define GPIOY_4 133
+#define GPIOY_5 134
+#define GPIOY_6 135
+#define GPIOY_7 136
+#define GPIOY_8 137
+#define GPIOY_9 138
+#define GPIOY_10 139
+#define GPIOY_11 140
+#define GPIOY_12 141
+#define GPIOY_13 142
+#define GPIOY_14 143
+#define GPIOY_15 144
+#define GPIOY_16 145
+#define GPIOY_17 146
+#define GPIOY_18 147
+
+#define GPIOH_0 148
+#define GPIOH_1 149
+#define GPIOH_2 150
+#define GPIOH_3 151
+#define GPIOH_4 152
+#define GPIOH_5 153
+#define GPIOH_6 154
+#define GPIOH_7 155
+
+#define GPIO_TEST_N 156
+
+#endif /* _DT_BINDINGS_AMLOGIC_T7_GPIO_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/gpio/amlogic-c3-gpio.h b/sys/contrib/device-tree/include/dt-bindings/gpio/amlogic-c3-gpio.h
new file mode 100644
index 000000000000..75c8da6f505f
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/gpio/amlogic-c3-gpio.h
@@ -0,0 +1,72 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2021 Amlogic, Inc. All rights reserved.
+ * Author: Huqiang Qin <huqiang.qin@amlogic.com>
+ */
+
+#ifndef _DT_BINDINGS_AMLOGIC_C3_GPIO_H
+#define _DT_BINDINGS_AMLOGIC_C3_GPIO_H
+
+#define GPIOE_0 0
+#define GPIOE_1 1
+#define GPIOE_2 2
+#define GPIOE_3 3
+#define GPIOE_4 4
+
+#define GPIOB_0 5
+#define GPIOB_1 6
+#define GPIOB_2 7
+#define GPIOB_3 8
+#define GPIOB_4 9
+#define GPIOB_5 10
+#define GPIOB_6 11
+#define GPIOB_7 12
+#define GPIOB_8 13
+#define GPIOB_9 14
+#define GPIOB_10 15
+#define GPIOB_11 16
+#define GPIOB_12 17
+#define GPIOB_13 18
+#define GPIOB_14 19
+
+#define GPIOC_0 20
+#define GPIOC_1 21
+#define GPIOC_2 22
+#define GPIOC_3 23
+#define GPIOC_4 24
+#define GPIOC_5 25
+#define GPIOC_6 26
+
+#define GPIOX_0 27
+#define GPIOX_1 28
+#define GPIOX_2 29
+#define GPIOX_3 30
+#define GPIOX_4 31
+#define GPIOX_5 32
+#define GPIOX_6 33
+#define GPIOX_7 34
+#define GPIOX_8 35
+#define GPIOX_9 36
+#define GPIOX_10 37
+#define GPIOX_11 38
+#define GPIOX_12 39
+#define GPIOX_13 40
+
+#define GPIOD_0 41
+#define GPIOD_1 42
+#define GPIOD_2 43
+#define GPIOD_3 44
+#define GPIOD_4 45
+#define GPIOD_5 46
+#define GPIOD_6 47
+
+#define GPIOA_0 48
+#define GPIOA_1 49
+#define GPIOA_2 50
+#define GPIOA_3 51
+#define GPIOA_4 52
+#define GPIOA_5 53
+
+#define GPIO_TEST_N 54
+
+#endif /* _DT_BINDINGS_AMLOGIC_C3_GPIO_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/gpio/meson-g12a-gpio.h b/sys/contrib/device-tree/include/dt-bindings/gpio/meson-g12a-gpio.h
index f7bd69350d18..fa7bb0bbf010 100644
--- a/sys/contrib/device-tree/include/dt-bindings/gpio/meson-g12a-gpio.h
+++ b/sys/contrib/device-tree/include/dt-bindings/gpio/meson-g12a-gpio.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2018 Amlogic, Inc. All rights reserved.
* Author: Xingyu Chen <xingyu.chen@amlogic.com>
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm7325.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm7325.h
new file mode 100644
index 000000000000..96908014e09e
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm7325.h
@@ -0,0 +1,69 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM7325_H
+#define _DT_BINDINGS_QCOM_SPMI_VADC_PM7325_H
+
+#ifndef PM7325_SID
+#define PM7325_SID 1
+#endif
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
+/* ADC channels for PM7325_ADC for PMIC7 */
+#define PM7325_ADC7_REF_GND (PM7325_SID << 8 | ADC7_REF_GND)
+#define PM7325_ADC7_1P25VREF (PM7325_SID << 8 | ADC7_1P25VREF)
+#define PM7325_ADC7_VREF_VADC (PM7325_SID << 8 | ADC7_VREF_VADC)
+#define PM7325_ADC7_DIE_TEMP (PM7325_SID << 8 | ADC7_DIE_TEMP)
+
+#define PM7325_ADC7_AMUX_THM1 (PM7325_SID << 8 | ADC7_AMUX_THM1)
+#define PM7325_ADC7_AMUX_THM2 (PM7325_SID << 8 | ADC7_AMUX_THM2)
+#define PM7325_ADC7_AMUX_THM3 (PM7325_SID << 8 | ADC7_AMUX_THM3)
+#define PM7325_ADC7_AMUX_THM4 (PM7325_SID << 8 | ADC7_AMUX_THM4)
+#define PM7325_ADC7_AMUX_THM5 (PM7325_SID << 8 | ADC7_AMUX_THM5)
+#define PM7325_ADC7_GPIO1 (PM7325_SID << 8 | ADC7_GPIO1)
+#define PM7325_ADC7_GPIO2 (PM7325_SID << 8 | ADC7_GPIO2)
+#define PM7325_ADC7_GPIO3 (PM7325_SID << 8 | ADC7_GPIO3)
+#define PM7325_ADC7_GPIO4 (PM7325_SID << 8 | ADC7_GPIO4)
+
+/* 30k pull-up1 */
+#define PM7325_ADC7_AMUX_THM1_30K_PU (PM7325_SID << 8 | ADC7_AMUX_THM1_30K_PU)
+#define PM7325_ADC7_AMUX_THM2_30K_PU (PM7325_SID << 8 | ADC7_AMUX_THM2_30K_PU)
+#define PM7325_ADC7_AMUX_THM3_30K_PU (PM7325_SID << 8 | ADC7_AMUX_THM3_30K_PU)
+#define PM7325_ADC7_AMUX_THM4_30K_PU (PM7325_SID << 8 | ADC7_AMUX_THM4_30K_PU)
+#define PM7325_ADC7_AMUX_THM5_30K_PU (PM7325_SID << 8 | ADC7_AMUX_THM5_30K_PU)
+#define PM7325_ADC7_GPIO1_30K_PU (PM7325_SID << 8 | ADC7_GPIO1_30K_PU)
+#define PM7325_ADC7_GPIO2_30K_PU (PM7325_SID << 8 | ADC7_GPIO2_30K_PU)
+#define PM7325_ADC7_GPIO3_30K_PU (PM7325_SID << 8 | ADC7_GPIO3_30K_PU)
+#define PM7325_ADC7_GPIO4_30K_PU (PM7325_SID << 8 | ADC7_GPIO4_30K_PU)
+
+/* 100k pull-up2 */
+#define PM7325_ADC7_AMUX_THM1_100K_PU (PM7325_SID << 8 | ADC7_AMUX_THM1_100K_PU)
+#define PM7325_ADC7_AMUX_THM2_100K_PU (PM7325_SID << 8 | ADC7_AMUX_THM2_100K_PU)
+#define PM7325_ADC7_AMUX_THM3_100K_PU (PM7325_SID << 8 | ADC7_AMUX_THM3_100K_PU)
+#define PM7325_ADC7_AMUX_THM4_100K_PU (PM7325_SID << 8 | ADC7_AMUX_THM4_100K_PU)
+#define PM7325_ADC7_AMUX_THM5_100K_PU (PM7325_SID << 8 | ADC7_AMUX_THM5_100K_PU)
+#define PM7325_ADC7_GPIO1_100K_PU (PM7325_SID << 8 | ADC7_GPIO1_100K_PU)
+#define PM7325_ADC7_GPIO2_100K_PU (PM7325_SID << 8 | ADC7_GPIO2_100K_PU)
+#define PM7325_ADC7_GPIO3_100K_PU (PM7325_SID << 8 | ADC7_GPIO3_100K_PU)
+#define PM7325_ADC7_GPIO4_100K_PU (PM7325_SID << 8 | ADC7_GPIO4_100K_PU)
+
+/* 400k pull-up3 */
+#define PM7325_ADC7_AMUX_THM1_400K_PU (PM7325_SID << 8 | ADC7_AMUX_THM1_400K_PU)
+#define PM7325_ADC7_AMUX_THM2_400K_PU (PM7325_SID << 8 | ADC7_AMUX_THM2_400K_PU)
+#define PM7325_ADC7_AMUX_THM3_400K_PU (PM7325_SID << 8 | ADC7_AMUX_THM3_400K_PU)
+#define PM7325_ADC7_AMUX_THM4_400K_PU (PM7325_SID << 8 | ADC7_AMUX_THM4_400K_PU)
+#define PM7325_ADC7_AMUX_THM5_400K_PU (PM7325_SID << 8 | ADC7_AMUX_THM5_400K_PU)
+#define PM7325_ADC7_GPIO1_400K_PU (PM7325_SID << 8 | ADC7_GPIO1_400K_PU)
+#define PM7325_ADC7_GPIO2_400K_PU (PM7325_SID << 8 | ADC7_GPIO2_400K_PU)
+#define PM7325_ADC7_GPIO3_400K_PU (PM7325_SID << 8 | ADC7_GPIO3_400K_PU)
+#define PM7325_ADC7_GPIO4_400K_PU (PM7325_SID << 8 | ADC7_GPIO4_400K_PU)
+
+/* 1/3 Divider */
+#define PM7325_ADC7_GPIO4_DIV3 (PM7325_SID << 8 | ADC7_GPIO4_DIV3)
+
+#define PM7325_ADC7_VPH_PWR (PM7325_SID << 8 | ADC7_VPH_PWR)
+
+#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM7325_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h
index 09fd169ad18e..5d98f7d48a1e 100644
--- a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h
@@ -6,58 +6,60 @@
#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H
#define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
/* ADC channels for PM8350_ADC for PMIC7 */
-#define PM8350_ADC7_REF_GND(sid) ((sid) << 8 | 0x0)
-#define PM8350_ADC7_1P25VREF(sid) ((sid) << 8 | 0x01)
-#define PM8350_ADC7_VREF_VADC(sid) ((sid) << 8 | 0x02)
-#define PM8350_ADC7_DIE_TEMP(sid) ((sid) << 8 | 0x03)
-
-#define PM8350_ADC7_AMUX_THM1(sid) ((sid) << 8 | 0x04)
-#define PM8350_ADC7_AMUX_THM2(sid) ((sid) << 8 | 0x05)
-#define PM8350_ADC7_AMUX_THM3(sid) ((sid) << 8 | 0x06)
-#define PM8350_ADC7_AMUX_THM4(sid) ((sid) << 8 | 0x07)
-#define PM8350_ADC7_AMUX_THM5(sid) ((sid) << 8 | 0x08)
-#define PM8350_ADC7_GPIO1(sid) ((sid) << 8 | 0x0a)
-#define PM8350_ADC7_GPIO2(sid) ((sid) << 8 | 0x0b)
-#define PM8350_ADC7_GPIO3(sid) ((sid) << 8 | 0x0c)
-#define PM8350_ADC7_GPIO4(sid) ((sid) << 8 | 0x0d)
+#define PM8350_ADC7_REF_GND(sid) ((sid) << 8 | ADC7_REF_GND)
+#define PM8350_ADC7_1P25VREF(sid) ((sid) << 8 | ADC7_1P25VREF)
+#define PM8350_ADC7_VREF_VADC(sid) ((sid) << 8 | ADC7_VREF_VADC)
+#define PM8350_ADC7_DIE_TEMP(sid) ((sid) << 8 | ADC7_DIE_TEMP)
+
+#define PM8350_ADC7_AMUX_THM1(sid) ((sid) << 8 | ADC7_AMUX_THM1)
+#define PM8350_ADC7_AMUX_THM2(sid) ((sid) << 8 | ADC7_AMUX_THM2)
+#define PM8350_ADC7_AMUX_THM3(sid) ((sid) << 8 | ADC7_AMUX_THM3)
+#define PM8350_ADC7_AMUX_THM4(sid) ((sid) << 8 | ADC7_AMUX_THM4)
+#define PM8350_ADC7_AMUX_THM5(sid) ((sid) << 8 | ADC7_AMUX_THM5)
+#define PM8350_ADC7_GPIO1(sid) ((sid) << 8 | ADC7_GPIO1)
+#define PM8350_ADC7_GPIO2(sid) ((sid) << 8 | ADC7_GPIO2)
+#define PM8350_ADC7_GPIO3(sid) ((sid) << 8 | ADC7_GPIO3)
+#define PM8350_ADC7_GPIO4(sid) ((sid) << 8 | ADC7_GPIO4)
/* 30k pull-up1 */
-#define PM8350_ADC7_AMUX_THM1_30K_PU(sid) ((sid) << 8 | 0x24)
-#define PM8350_ADC7_AMUX_THM2_30K_PU(sid) ((sid) << 8 | 0x25)
-#define PM8350_ADC7_AMUX_THM3_30K_PU(sid) ((sid) << 8 | 0x26)
-#define PM8350_ADC7_AMUX_THM4_30K_PU(sid) ((sid) << 8 | 0x27)
-#define PM8350_ADC7_AMUX_THM5_30K_PU(sid) ((sid) << 8 | 0x28)
-#define PM8350_ADC7_GPIO1_30K_PU(sid) ((sid) << 8 | 0x2a)
-#define PM8350_ADC7_GPIO2_30K_PU(sid) ((sid) << 8 | 0x2b)
-#define PM8350_ADC7_GPIO3_30K_PU(sid) ((sid) << 8 | 0x2c)
-#define PM8350_ADC7_GPIO4_30K_PU(sid) ((sid) << 8 | 0x2d)
+#define PM8350_ADC7_AMUX_THM1_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM1_30K_PU)
+#define PM8350_ADC7_AMUX_THM2_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM2_30K_PU)
+#define PM8350_ADC7_AMUX_THM3_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM3_30K_PU)
+#define PM8350_ADC7_AMUX_THM4_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM4_30K_PU)
+#define PM8350_ADC7_AMUX_THM5_30K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM5_30K_PU)
+#define PM8350_ADC7_GPIO1_30K_PU(sid) ((sid) << 8 | ADC7_GPIO1_30K_PU)
+#define PM8350_ADC7_GPIO2_30K_PU(sid) ((sid) << 8 | ADC7_GPIO2_30K_PU)
+#define PM8350_ADC7_GPIO3_30K_PU(sid) ((sid) << 8 | ADC7_GPIO3_30K_PU)
+#define PM8350_ADC7_GPIO4_30K_PU(sid) ((sid) << 8 | ADC7_GPIO4_30K_PU)
/* 100k pull-up2 */
-#define PM8350_ADC7_AMUX_THM1_100K_PU(sid) ((sid) << 8 | 0x44)
-#define PM8350_ADC7_AMUX_THM2_100K_PU(sid) ((sid) << 8 | 0x45)
-#define PM8350_ADC7_AMUX_THM3_100K_PU(sid) ((sid) << 8 | 0x46)
-#define PM8350_ADC7_AMUX_THM4_100K_PU(sid) ((sid) << 8 | 0x47)
-#define PM8350_ADC7_AMUX_THM5_100K_PU(sid) ((sid) << 8 | 0x48)
-#define PM8350_ADC7_GPIO1_100K_PU(sid) ((sid) << 8 | 0x4a)
-#define PM8350_ADC7_GPIO2_100K_PU(sid) ((sid) << 8 | 0x4b)
-#define PM8350_ADC7_GPIO3_100K_PU(sid) ((sid) << 8 | 0x4c)
-#define PM8350_ADC7_GPIO4_100K_PU(sid) ((sid) << 8 | 0x4d)
+#define PM8350_ADC7_AMUX_THM1_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM1_100K_PU)
+#define PM8350_ADC7_AMUX_THM2_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM2_100K_PU)
+#define PM8350_ADC7_AMUX_THM3_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM3_100K_PU)
+#define PM8350_ADC7_AMUX_THM4_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM4_100K_PU)
+#define PM8350_ADC7_AMUX_THM5_100K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM5_100K_PU)
+#define PM8350_ADC7_GPIO1_100K_PU(sid) ((sid) << 8 | ADC7_GPIO1_100K_PU)
+#define PM8350_ADC7_GPIO2_100K_PU(sid) ((sid) << 8 | ADC7_GPIO2_100K_PU)
+#define PM8350_ADC7_GPIO3_100K_PU(sid) ((sid) << 8 | ADC7_GPIO3_100K_PU)
+#define PM8350_ADC7_GPIO4_100K_PU(sid) ((sid) << 8 | ADC7_GPIO4_100K_PU)
/* 400k pull-up3 */
-#define PM8350_ADC7_AMUX_THM1_400K_PU(sid) ((sid) << 8 | 0x64)
-#define PM8350_ADC7_AMUX_THM2_400K_PU(sid) ((sid) << 8 | 0x65)
-#define PM8350_ADC7_AMUX_THM3_400K_PU(sid) ((sid) << 8 | 0x66)
-#define PM8350_ADC7_AMUX_THM4_400K_PU(sid) ((sid) << 8 | 0x67)
-#define PM8350_ADC7_AMUX_THM5_400K_PU(sid) ((sid) << 8 | 0x68)
-#define PM8350_ADC7_GPIO1_400K_PU(sid) ((sid) << 8 | 0x6a)
-#define PM8350_ADC7_GPIO2_400K_PU(sid) ((sid) << 8 | 0x6b)
-#define PM8350_ADC7_GPIO3_400K_PU(sid) ((sid) << 8 | 0x6c)
-#define PM8350_ADC7_GPIO4_400K_PU(sid) ((sid) << 8 | 0x6d)
+#define PM8350_ADC7_AMUX_THM1_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM1_400K_PU)
+#define PM8350_ADC7_AMUX_THM2_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM2_400K_PU)
+#define PM8350_ADC7_AMUX_THM3_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM3_400K_PU)
+#define PM8350_ADC7_AMUX_THM4_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM4_400K_PU)
+#define PM8350_ADC7_AMUX_THM5_400K_PU(sid) ((sid) << 8 | ADC7_AMUX_THM5_400K_PU)
+#define PM8350_ADC7_GPIO1_400K_PU(sid) ((sid) << 8 | ADC7_GPIO1_400K_PU)
+#define PM8350_ADC7_GPIO2_400K_PU(sid) ((sid) << 8 | ADC7_GPIO2_400K_PU)
+#define PM8350_ADC7_GPIO3_400K_PU(sid) ((sid) << 8 | ADC7_GPIO3_400K_PU)
+#define PM8350_ADC7_GPIO4_400K_PU(sid) ((sid) << 8 | ADC7_GPIO4_400K_PU)
/* 1/3 Divider */
-#define PM8350_ADC7_GPIO4_DIV3(sid) ((sid) << 8 | 0x8d)
+#define PM8350_ADC7_GPIO4_DIV3(sid) ((sid) << 8 | ADC7_GPIO4_DIV3)
-#define PM8350_ADC7_VPH_PWR(sid) ((sid) << 8 | 0x8e)
+#define PM8350_ADC7_VPH_PWR(sid) ((sid) << 8 | ADC7_VPH_PWR)
#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350b.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350b.h
index dc2497c27e16..57c7977666d3 100644
--- a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350b.h
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pm8350b.h
@@ -10,79 +10,81 @@
#define PM8350B_SID 3
#endif
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
/* ADC channels for PM8350B_ADC for PMIC7 */
-#define PM8350B_ADC7_REF_GND (PM8350B_SID << 8 | 0x0)
-#define PM8350B_ADC7_1P25VREF (PM8350B_SID << 8 | 0x01)
-#define PM8350B_ADC7_VREF_VADC (PM8350B_SID << 8 | 0x02)
-#define PM8350B_ADC7_DIE_TEMP (PM8350B_SID << 8 | 0x03)
+#define PM8350B_ADC7_REF_GND (PM8350B_SID << 8 | ADC7_REF_GND)
+#define PM8350B_ADC7_1P25VREF (PM8350B_SID << 8 | ADC7_1P25VREF)
+#define PM8350B_ADC7_VREF_VADC (PM8350B_SID << 8 | ADC7_VREF_VADC)
+#define PM8350B_ADC7_DIE_TEMP (PM8350B_SID << 8 | ADC7_DIE_TEMP)
-#define PM8350B_ADC7_AMUX_THM1 (PM8350B_SID << 8 | 0x04)
-#define PM8350B_ADC7_AMUX_THM2 (PM8350B_SID << 8 | 0x05)
-#define PM8350B_ADC7_AMUX_THM3 (PM8350B_SID << 8 | 0x06)
-#define PM8350B_ADC7_AMUX_THM4 (PM8350B_SID << 8 | 0x07)
-#define PM8350B_ADC7_AMUX_THM5 (PM8350B_SID << 8 | 0x08)
-#define PM8350B_ADC7_AMUX_THM6 (PM8350B_SID << 8 | 0x09)
-#define PM8350B_ADC7_GPIO1 (PM8350B_SID << 8 | 0x0a)
-#define PM8350B_ADC7_GPIO2 (PM8350B_SID << 8 | 0x0b)
-#define PM8350B_ADC7_GPIO3 (PM8350B_SID << 8 | 0x0c)
-#define PM8350B_ADC7_GPIO4 (PM8350B_SID << 8 | 0x0d)
+#define PM8350B_ADC7_AMUX_THM1 (PM8350B_SID << 8 | ADC7_AMUX_THM1)
+#define PM8350B_ADC7_AMUX_THM2 (PM8350B_SID << 8 | ADC7_AMUX_THM2)
+#define PM8350B_ADC7_AMUX_THM3 (PM8350B_SID << 8 | ADC7_AMUX_THM3)
+#define PM8350B_ADC7_AMUX_THM4 (PM8350B_SID << 8 | ADC7_AMUX_THM4)
+#define PM8350B_ADC7_AMUX_THM5 (PM8350B_SID << 8 | ADC7_AMUX_THM5)
+#define PM8350B_ADC7_AMUX_THM6 (PM8350B_SID << 8 | ADC7_AMUX_THM6)
+#define PM8350B_ADC7_GPIO1 (PM8350B_SID << 8 | ADC7_GPIO1)
+#define PM8350B_ADC7_GPIO2 (PM8350B_SID << 8 | ADC7_GPIO2)
+#define PM8350B_ADC7_GPIO3 (PM8350B_SID << 8 | ADC7_GPIO3)
+#define PM8350B_ADC7_GPIO4 (PM8350B_SID << 8 | ADC7_GPIO4)
-#define PM8350B_ADC7_CHG_TEMP (PM8350B_SID << 8 | 0x10)
-#define PM8350B_ADC7_USB_IN_V_16 (PM8350B_SID << 8 | 0x11)
-#define PM8350B_ADC7_VDC_16 (PM8350B_SID << 8 | 0x12)
-#define PM8350B_ADC7_CC1_ID (PM8350B_SID << 8 | 0x13)
-#define PM8350B_ADC7_VREF_BAT_THERM (PM8350B_SID << 8 | 0x15)
-#define PM8350B_ADC7_IIN_FB (PM8350B_SID << 8 | 0x17)
+#define PM8350B_ADC7_CHG_TEMP (PM8350B_SID << 8 | ADC7_CHG_TEMP)
+#define PM8350B_ADC7_USB_IN_V_16 (PM8350B_SID << 8 | ADC7_USB_IN_V_16)
+#define PM8350B_ADC7_VDC_16 (PM8350B_SID << 8 | ADC7_VDC_16)
+#define PM8350B_ADC7_CC1_ID (PM8350B_SID << 8 | ADC7_CC1_ID)
+#define PM8350B_ADC7_VREF_BAT_THERM (PM8350B_SID << 8 | ADC7_VREF_BAT_THERM)
+#define PM8350B_ADC7_IIN_FB (PM8350B_SID << 8 | ADC7_IIN_FB)
/* 30k pull-up1 */
-#define PM8350B_ADC7_AMUX_THM1_30K_PU (PM8350B_SID << 8 | 0x24)
-#define PM8350B_ADC7_AMUX_THM2_30K_PU (PM8350B_SID << 8 | 0x25)
-#define PM8350B_ADC7_AMUX_THM3_30K_PU (PM8350B_SID << 8 | 0x26)
-#define PM8350B_ADC7_AMUX_THM4_30K_PU (PM8350B_SID << 8 | 0x27)
-#define PM8350B_ADC7_AMUX_THM5_30K_PU (PM8350B_SID << 8 | 0x28)
-#define PM8350B_ADC7_AMUX_THM6_30K_PU (PM8350B_SID << 8 | 0x29)
-#define PM8350B_ADC7_GPIO1_30K_PU (PM8350B_SID << 8 | 0x2a)
-#define PM8350B_ADC7_GPIO2_30K_PU (PM8350B_SID << 8 | 0x2b)
-#define PM8350B_ADC7_GPIO3_30K_PU (PM8350B_SID << 8 | 0x2c)
-#define PM8350B_ADC7_GPIO4_30K_PU (PM8350B_SID << 8 | 0x2d)
-#define PM8350B_ADC7_CC1_ID_30K_PU (PM8350B_SID << 8 | 0x33)
+#define PM8350B_ADC7_AMUX_THM1_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM1_30K_PU)
+#define PM8350B_ADC7_AMUX_THM2_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM2_30K_PU)
+#define PM8350B_ADC7_AMUX_THM3_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM3_30K_PU)
+#define PM8350B_ADC7_AMUX_THM4_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM4_30K_PU)
+#define PM8350B_ADC7_AMUX_THM5_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM5_30K_PU)
+#define PM8350B_ADC7_AMUX_THM6_30K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM6_30K_PU)
+#define PM8350B_ADC7_GPIO1_30K_PU (PM8350B_SID << 8 | ADC7_GPIO1_30K_PU)
+#define PM8350B_ADC7_GPIO2_30K_PU (PM8350B_SID << 8 | ADC7_GPIO2_30K_PU)
+#define PM8350B_ADC7_GPIO3_30K_PU (PM8350B_SID << 8 | ADC7_GPIO3_30K_PU)
+#define PM8350B_ADC7_GPIO4_30K_PU (PM8350B_SID << 8 | ADC7_GPIO4_30K_PU)
+#define PM8350B_ADC7_CC1_ID_30K_PU (PM8350B_SID << 8 | ADC7_CC1_ID_30K_PU)
/* 100k pull-up2 */
-#define PM8350B_ADC7_AMUX_THM1_100K_PU (PM8350B_SID << 8 | 0x44)
-#define PM8350B_ADC7_AMUX_THM2_100K_PU (PM8350B_SID << 8 | 0x45)
-#define PM8350B_ADC7_AMUX_THM3_100K_PU (PM8350B_SID << 8 | 0x46)
-#define PM8350B_ADC7_AMUX_THM4_100K_PU (PM8350B_SID << 8 | 0x47)
-#define PM8350B_ADC7_AMUX_THM5_100K_PU (PM8350B_SID << 8 | 0x48)
-#define PM8350B_ADC7_AMUX_THM6_100K_PU (PM8350B_SID << 8 | 0x49)
-#define PM8350B_ADC7_GPIO1_100K_PU (PM8350B_SID << 8 | 0x4a)
-#define PM8350B_ADC7_GPIO2_100K_PU (PM8350B_SID << 8 | 0x4b)
-#define PM8350B_ADC7_GPIO3_100K_PU (PM8350B_SID << 8 | 0x4c)
-#define PM8350B_ADC7_GPIO4_100K_PU (PM8350B_SID << 8 | 0x4d)
-#define PM8350B_ADC7_CC1_ID_100K_PU (PM8350B_SID << 8 | 0x53)
+#define PM8350B_ADC7_AMUX_THM1_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM1_100K_PU)
+#define PM8350B_ADC7_AMUX_THM2_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM2_100K_PU)
+#define PM8350B_ADC7_AMUX_THM3_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM3_100K_PU)
+#define PM8350B_ADC7_AMUX_THM4_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM4_100K_PU)
+#define PM8350B_ADC7_AMUX_THM5_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM5_100K_PU)
+#define PM8350B_ADC7_AMUX_THM6_100K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM6_100K_PU)
+#define PM8350B_ADC7_GPIO1_100K_PU (PM8350B_SID << 8 | ADC7_GPIO1_100K_PU)
+#define PM8350B_ADC7_GPIO2_100K_PU (PM8350B_SID << 8 | ADC7_GPIO2_100K_PU)
+#define PM8350B_ADC7_GPIO3_100K_PU (PM8350B_SID << 8 | ADC7_GPIO3_100K_PU)
+#define PM8350B_ADC7_GPIO4_100K_PU (PM8350B_SID << 8 | ADC7_GPIO4_100K_PU)
+#define PM8350B_ADC7_CC1_ID_100K_PU (PM8350B_SID << 8 | ADC7_CC1_ID_100K_PU)
/* 400k pull-up3 */
-#define PM8350B_ADC7_AMUX_THM1_400K_PU (PM8350B_SID << 8 | 0x64)
-#define PM8350B_ADC7_AMUX_THM2_400K_PU (PM8350B_SID << 8 | 0x65)
-#define PM8350B_ADC7_AMUX_THM3_400K_PU (PM8350B_SID << 8 | 0x66)
-#define PM8350B_ADC7_AMUX_THM4_400K_PU (PM8350B_SID << 8 | 0x67)
-#define PM8350B_ADC7_AMUX_THM5_400K_PU (PM8350B_SID << 8 | 0x68)
-#define PM8350B_ADC7_AMUX_THM6_400K_PU (PM8350B_SID << 8 | 0x69)
-#define PM8350B_ADC7_GPIO1_400K_PU (PM8350B_SID << 8 | 0x6a)
-#define PM8350B_ADC7_GPIO2_400K_PU (PM8350B_SID << 8 | 0x6b)
-#define PM8350B_ADC7_GPIO3_400K_PU (PM8350B_SID << 8 | 0x6c)
-#define PM8350B_ADC7_GPIO4_400K_PU (PM8350B_SID << 8 | 0x6d)
-#define PM8350B_ADC7_CC1_ID_400K_PU (PM8350B_SID << 8 | 0x73)
+#define PM8350B_ADC7_AMUX_THM1_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM1_400K_PU)
+#define PM8350B_ADC7_AMUX_THM2_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM2_400K_PU)
+#define PM8350B_ADC7_AMUX_THM3_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM3_400K_PU)
+#define PM8350B_ADC7_AMUX_THM4_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM4_400K_PU)
+#define PM8350B_ADC7_AMUX_THM5_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM5_400K_PU)
+#define PM8350B_ADC7_AMUX_THM6_400K_PU (PM8350B_SID << 8 | ADC7_AMUX_THM6_400K_PU)
+#define PM8350B_ADC7_GPIO1_400K_PU (PM8350B_SID << 8 | ADC7_GPIO1_400K_PU)
+#define PM8350B_ADC7_GPIO2_400K_PU (PM8350B_SID << 8 | ADC7_GPIO2_400K_PU)
+#define PM8350B_ADC7_GPIO3_400K_PU (PM8350B_SID << 8 | ADC7_GPIO3_400K_PU)
+#define PM8350B_ADC7_GPIO4_400K_PU (PM8350B_SID << 8 | ADC7_GPIO4_400K_PU)
+#define PM8350B_ADC7_CC1_ID_400K_PU (PM8350B_SID << 8 | ADC7_CC1_ID_400K_PU)
/* 1/3 Divider */
-#define PM8350B_ADC7_GPIO1_DIV3 (PM8350B_SID << 8 | 0x8a)
-#define PM8350B_ADC7_GPIO2_DIV3 (PM8350B_SID << 8 | 0x8b)
-#define PM8350B_ADC7_GPIO3_DIV3 (PM8350B_SID << 8 | 0x8c)
-#define PM8350B_ADC7_GPIO4_DIV3 (PM8350B_SID << 8 | 0x8d)
+#define PM8350B_ADC7_GPIO1_DIV3 (PM8350B_SID << 8 | ADC7_GPIO1_DIV3)
+#define PM8350B_ADC7_GPIO2_DIV3 (PM8350B_SID << 8 | ADC7_GPIO2_DIV3)
+#define PM8350B_ADC7_GPIO3_DIV3 (PM8350B_SID << 8 | ADC7_GPIO3_DIV3)
+#define PM8350B_ADC7_GPIO4_DIV3 (PM8350B_SID << 8 | ADC7_GPIO4_DIV3)
-#define PM8350B_ADC7_VPH_PWR (PM8350B_SID << 8 | 0x8e)
-#define PM8350B_ADC7_VBAT_SNS (PM8350B_SID << 8 | 0x8f)
+#define PM8350B_ADC7_VPH_PWR (PM8350B_SID << 8 | ADC7_VPH_PWR)
+#define PM8350B_ADC7_VBAT_SNS (PM8350B_SID << 8 | ADC7_VBAT_SNS)
-#define PM8350B_ADC7_SBUx (PM8350B_SID << 8 | 0x94)
-#define PM8350B_ADC7_VBAT_2S_MID (PM8350B_SID << 8 | 0x96)
+#define PM8350B_ADC7_SBUx (PM8350B_SID << 8 | ADC7_SBU)
+#define PM8350B_ADC7_VBAT_2S_MID (PM8350B_SID << 8 | ADC7_VBAT_2S_MID)
#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350B_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h
index 6c296870e95b..3d1a41a22cef 100644
--- a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h
@@ -10,37 +10,39 @@
#define PMK8350_SID 0
#endif
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
/* ADC channels for PMK8350_ADC for PMIC7 */
-#define PMK8350_ADC7_REF_GND (PMK8350_SID << 8 | 0x0)
-#define PMK8350_ADC7_1P25VREF (PMK8350_SID << 8 | 0x01)
-#define PMK8350_ADC7_VREF_VADC (PMK8350_SID << 8 | 0x02)
-#define PMK8350_ADC7_DIE_TEMP (PMK8350_SID << 8 | 0x03)
+#define PMK8350_ADC7_REF_GND (PMK8350_SID << 8 | ADC7_REF_GND)
+#define PMK8350_ADC7_1P25VREF (PMK8350_SID << 8 | ADC7_1P25VREF)
+#define PMK8350_ADC7_VREF_VADC (PMK8350_SID << 8 | ADC7_VREF_VADC)
+#define PMK8350_ADC7_DIE_TEMP (PMK8350_SID << 8 | ADC7_DIE_TEMP)
-#define PMK8350_ADC7_AMUX_THM1 (PMK8350_SID << 8 | 0x04)
-#define PMK8350_ADC7_AMUX_THM2 (PMK8350_SID << 8 | 0x05)
-#define PMK8350_ADC7_AMUX_THM3 (PMK8350_SID << 8 | 0x06)
-#define PMK8350_ADC7_AMUX_THM4 (PMK8350_SID << 8 | 0x07)
-#define PMK8350_ADC7_AMUX_THM5 (PMK8350_SID << 8 | 0x08)
+#define PMK8350_ADC7_AMUX_THM1 (PMK8350_SID << 8 | ADC7_AMUX_THM1)
+#define PMK8350_ADC7_AMUX_THM2 (PMK8350_SID << 8 | ADC7_AMUX_THM2)
+#define PMK8350_ADC7_AMUX_THM3 (PMK8350_SID << 8 | ADC7_AMUX_THM3)
+#define PMK8350_ADC7_AMUX_THM4 (PMK8350_SID << 8 | ADC7_AMUX_THM4)
+#define PMK8350_ADC7_AMUX_THM5 (PMK8350_SID << 8 | ADC7_AMUX_THM5)
/* 30k pull-up1 */
-#define PMK8350_ADC7_AMUX_THM1_30K_PU (PMK8350_SID << 8 | 0x24)
-#define PMK8350_ADC7_AMUX_THM2_30K_PU (PMK8350_SID << 8 | 0x25)
-#define PMK8350_ADC7_AMUX_THM3_30K_PU (PMK8350_SID << 8 | 0x26)
-#define PMK8350_ADC7_AMUX_THM4_30K_PU (PMK8350_SID << 8 | 0x27)
-#define PMK8350_ADC7_AMUX_THM5_30K_PU (PMK8350_SID << 8 | 0x28)
+#define PMK8350_ADC7_AMUX_THM1_30K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM1_30K_PU)
+#define PMK8350_ADC7_AMUX_THM2_30K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM2_30K_PU)
+#define PMK8350_ADC7_AMUX_THM3_30K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM3_30K_PU)
+#define PMK8350_ADC7_AMUX_THM4_30K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM4_30K_PU)
+#define PMK8350_ADC7_AMUX_THM5_30K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM5_30K_PU)
/* 100k pull-up2 */
-#define PMK8350_ADC7_AMUX_THM1_100K_PU (PMK8350_SID << 8 | 0x44)
-#define PMK8350_ADC7_AMUX_THM2_100K_PU (PMK8350_SID << 8 | 0x45)
-#define PMK8350_ADC7_AMUX_THM3_100K_PU (PMK8350_SID << 8 | 0x46)
-#define PMK8350_ADC7_AMUX_THM4_100K_PU (PMK8350_SID << 8 | 0x47)
-#define PMK8350_ADC7_AMUX_THM5_100K_PU (PMK8350_SID << 8 | 0x48)
+#define PMK8350_ADC7_AMUX_THM1_100K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM1_100K_PU)
+#define PMK8350_ADC7_AMUX_THM2_100K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM2_100K_PU)
+#define PMK8350_ADC7_AMUX_THM3_100K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM3_100K_PU)
+#define PMK8350_ADC7_AMUX_THM4_100K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM4_100K_PU)
+#define PMK8350_ADC7_AMUX_THM5_100K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM5_100K_PU)
/* 400k pull-up3 */
-#define PMK8350_ADC7_AMUX_THM1_400K_PU (PMK8350_SID << 8 | 0x64)
-#define PMK8350_ADC7_AMUX_THM2_400K_PU (PMK8350_SID << 8 | 0x65)
-#define PMK8350_ADC7_AMUX_THM3_400K_PU (PMK8350_SID << 8 | 0x66)
-#define PMK8350_ADC7_AMUX_THM4_400K_PU (PMK8350_SID << 8 | 0x67)
-#define PMK8350_ADC7_AMUX_THM5_400K_PU (PMK8350_SID << 8 | 0x68)
+#define PMK8350_ADC7_AMUX_THM1_400K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM1_400K_PU)
+#define PMK8350_ADC7_AMUX_THM2_400K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM2_400K_PU)
+#define PMK8350_ADC7_AMUX_THM3_400K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM3_400K_PU)
+#define PMK8350_ADC7_AMUX_THM4_400K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM4_400K_PU)
+#define PMK8350_ADC7_AMUX_THM5_400K_PU (PMK8350_SID << 8 | ADC7_AMUX_THM5_400K_PU)
#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735a.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735a.h
index d6df1b19e5ff..c5adfa82b20d 100644
--- a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735a.h
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735a.h
@@ -10,19 +10,21 @@
#define PMR735A_SID 4
#endif
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
/* ADC channels for PMR735A_ADC for PMIC7 */
-#define PMR735A_ADC7_REF_GND (PMR735A_SID << 8 | 0x0)
-#define PMR735A_ADC7_1P25VREF (PMR735A_SID << 8 | 0x01)
-#define PMR735A_ADC7_VREF_VADC (PMR735A_SID << 8 | 0x02)
-#define PMR735A_ADC7_DIE_TEMP (PMR735A_SID << 8 | 0x03)
+#define PMR735A_ADC7_REF_GND (PMR735A_SID << 8 | ADC7_REF_GND)
+#define PMR735A_ADC7_1P25VREF (PMR735A_SID << 8 | ADC7_1P25VREF)
+#define PMR735A_ADC7_VREF_VADC (PMR735A_SID << 8 | ADC7_VREF_VADC)
+#define PMR735A_ADC7_DIE_TEMP (PMR735A_SID << 8 | ADC7_DIE_TEMP)
-#define PMR735A_ADC7_GPIO1 (PMR735A_SID << 8 | 0x0a)
-#define PMR735A_ADC7_GPIO2 (PMR735A_SID << 8 | 0x0b)
-#define PMR735A_ADC7_GPIO3 (PMR735A_SID << 8 | 0x0c)
+#define PMR735A_ADC7_GPIO1 (PMR735A_SID << 8 | ADC7_GPIO1)
+#define PMR735A_ADC7_GPIO2 (PMR735A_SID << 8 | ADC7_GPIO2)
+#define PMR735A_ADC7_GPIO3 (PMR735A_SID << 8 | ADC7_GPIO3)
/* 100k pull-up2 */
-#define PMR735A_ADC7_GPIO1_100K_PU (PMR735A_SID << 8 | 0x4a)
-#define PMR735A_ADC7_GPIO2_100K_PU (PMR735A_SID << 8 | 0x4b)
-#define PMR735A_ADC7_GPIO3_100K_PU (PMR735A_SID << 8 | 0x4c)
+#define PMR735A_ADC7_GPIO1_100K_PU (PMR735A_SID << 8 | ADC7_GPIO1_100K_PU)
+#define PMR735A_ADC7_GPIO2_100K_PU (PMR735A_SID << 8 | ADC7_GPIO2_100K_PU)
+#define PMR735A_ADC7_GPIO3_100K_PU (PMR735A_SID << 8 | ADC7_GPIO3_100K_PU)
#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PMR735A_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735b.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735b.h
index 8da0e7dab315..fdb8dd9ae541 100644
--- a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735b.h
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-pmr735b.h
@@ -10,19 +10,21 @@
#define PMR735B_SID 5
#endif
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
/* ADC channels for PMR735B_ADC for PMIC7 */
-#define PMR735B_ADC7_REF_GND (PMR735B_SID << 8 | 0x0)
-#define PMR735B_ADC7_1P25VREF (PMR735B_SID << 8 | 0x01)
-#define PMR735B_ADC7_VREF_VADC (PMR735B_SID << 8 | 0x02)
-#define PMR735B_ADC7_DIE_TEMP (PMR735B_SID << 8 | 0x03)
+#define PMR735B_ADC7_REF_GND (PMR735B_SID << 8 | ADC7_REF_GND)
+#define PMR735B_ADC7_1P25VREF (PMR735B_SID << 8 | ADC7_1P25VREF)
+#define PMR735B_ADC7_VREF_VADC (PMR735B_SID << 8 | ADC7_VREF_VADC)
+#define PMR735B_ADC7_DIE_TEMP (PMR735B_SID << 8 | ADC7_DIE_TEMP)
-#define PMR735B_ADC7_GPIO1 (PMR735B_SID << 8 | 0x0a)
-#define PMR735B_ADC7_GPIO2 (PMR735B_SID << 8 | 0x0b)
-#define PMR735B_ADC7_GPIO3 (PMR735B_SID << 8 | 0x0c)
+#define PMR735B_ADC7_GPIO1 (PMR735B_SID << 8 | ADC7_GPIO1)
+#define PMR735B_ADC7_GPIO2 (PMR735B_SID << 8 | ADC7_GPIO2)
+#define PMR735B_ADC7_GPIO3 (PMR735B_SID << 8 | ADC7_GPIO3)
/* 100k pull-up2 */
-#define PMR735B_ADC7_GPIO1_100K_PU (PMR735B_SID << 8 | 0x4a)
-#define PMR735B_ADC7_GPIO2_100K_PU (PMR735B_SID << 8 | 0x4b)
-#define PMR735B_ADC7_GPIO3_100K_PU (PMR735B_SID << 8 | 0x4c)
+#define PMR735B_ADC7_GPIO1_100K_PU (PMR735B_SID << 8 | ADC7_GPIO1_100K_PU)
+#define PMR735B_ADC7_GPIO2_100K_PU (PMR735B_SID << 8 | ADC7_GPIO2_100K_PU)
+#define PMR735B_ADC7_GPIO3_100K_PU (PMR735B_SID << 8 | ADC7_GPIO3_100K_PU)
#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PMR735B_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
new file mode 100644
index 000000000000..c0680d1285cf
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
+/*
+ * Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
+#define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
+#define SMB139x_1_ADC7_SMB_TEMP (SMB139x_1_SID << 8 | ADC7_SMB_TEMP)
+#define SMB139x_1_ADC7_ICHG_SMB (SMB139x_1_SID << 8 | ADC7_ICHG_SMB)
+#define SMB139x_1_ADC7_IIN_SMB (SMB139x_1_SID << 8 | ADC7_IIN_SMB)
+
+#define SMB139x_2_ADC7_SMB_TEMP (SMB139x_2_SID << 8 | ADC7_SMB_TEMP)
+#define SMB139x_2_ADC7_ICHG_SMB (SMB139x_2_SID << 8 | ADC7_ICHG_SMB)
+#define SMB139x_2_ADC7_IIN_SMB (SMB139x_2_SID << 8 | ADC7_IIN_SMB)
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-vadc.h b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-vadc.h
index 08adfe25964c..ef07ecd4d585 100644
--- a/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-vadc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/iio/qcom,spmi-vadc.h
@@ -239,12 +239,15 @@
#define ADC7_GPIO3 0x0c
#define ADC7_GPIO4 0x0d
+#define ADC7_SMB_TEMP 0x06
#define ADC7_CHG_TEMP 0x10
#define ADC7_USB_IN_V_16 0x11
#define ADC7_VDC_16 0x12
#define ADC7_CC1_ID 0x13
#define ADC7_VREF_BAT_THERM 0x15
#define ADC7_IIN_FB 0x17
+#define ADC7_ICHG_SMB 0x18
+#define ADC7_IIN_SMB 0x19
/* 30k pull-up1 */
#define ADC7_AMUX_THM1_30K_PU 0x24
diff --git a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,rpm-icc.h b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,rpm-icc.h
new file mode 100644
index 000000000000..2cd56f91e5c5
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,rpm-icc.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_RPM_ICC_H
+#define __DT_BINDINGS_INTERCONNECT_QCOM_RPM_ICC_H
+
+#define RPM_ACTIVE_TAG (1 << 0)
+#define RPM_SLEEP_TAG (1 << 1)
+#define RPM_ALWAYS_TAG (RPM_ACTIVE_TAG | RPM_SLEEP_TAG)
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sdx75.h b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sdx75.h
new file mode 100644
index 000000000000..e903f5f3dd8f
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sdx75.h
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_SDX75_H
+#define __DT_BINDINGS_INTERCONNECT_QCOM_SDX75_H
+
+#define MASTER_QPIC_CORE 0
+#define MASTER_QUP_CORE_0 1
+#define SLAVE_QPIC_CORE 2
+#define SLAVE_QUP_CORE_0 3
+
+#define MASTER_LLCC 0
+#define SLAVE_EBI1 1
+
+#define MASTER_CNOC_DC_NOC 0
+#define SLAVE_LAGG_CFG 1
+#define SLAVE_MCCC_MASTER 2
+#define SLAVE_GEM_NOC_CFG 3
+#define SLAVE_SNOOP_BWMON 4
+
+#define MASTER_SYS_TCU 0
+#define MASTER_APPSS_PROC 1
+#define MASTER_GEM_NOC_CFG 2
+#define MASTER_MSS_PROC 3
+#define MASTER_ANOC_PCIE_GEM_NOC 4
+#define MASTER_SNOC_SF_MEM_NOC 5
+#define MASTER_GIC 6
+#define MASTER_IPA_PCIE 7
+#define SLAVE_GEM_NOC_CNOC 8
+#define SLAVE_LLCC 9
+#define SLAVE_MEM_NOC_PCIE_SNOC 10
+#define SLAVE_SERVICE_GEM_NOC 11
+
+#define MASTER_PCIE_0 0
+#define MASTER_PCIE_1 1
+#define MASTER_PCIE_2 2
+#define SLAVE_ANOC_PCIE_GEM_NOC 3
+
+#define MASTER_AUDIO 0
+#define MASTER_GIC_AHB 1
+#define MASTER_PCIE_RSCC 2
+#define MASTER_QDSS_BAM 3
+#define MASTER_QPIC 4
+#define MASTER_QUP_0 5
+#define MASTER_ANOC_SNOC 6
+#define MASTER_GEM_NOC_CNOC 7
+#define MASTER_GEM_NOC_PCIE_SNOC 8
+#define MASTER_SNOC_CFG 9
+#define MASTER_PCIE_ANOC_CFG 10
+#define MASTER_CRYPTO 11
+#define MASTER_IPA 12
+#define MASTER_MVMSS 13
+#define MASTER_EMAC_0 14
+#define MASTER_EMAC_1 15
+#define MASTER_QDSS_ETR 16
+#define MASTER_QDSS_ETR_1 17
+#define MASTER_SDCC_1 18
+#define MASTER_SDCC_4 19
+#define MASTER_USB3_0 20
+#define SLAVE_ETH0_CFG 21
+#define SLAVE_ETH1_CFG 22
+#define SLAVE_AUDIO 23
+#define SLAVE_CLK_CTL 24
+#define SLAVE_CRYPTO_0_CFG 25
+#define SLAVE_IMEM_CFG 26
+#define SLAVE_IPA_CFG 27
+#define SLAVE_IPC_ROUTER_CFG 28
+#define SLAVE_CNOC_MSS 29
+#define SLAVE_ICBDI_MVMSS_CFG 30
+#define SLAVE_PCIE_0_CFG 31
+#define SLAVE_PCIE_1_CFG 32
+#define SLAVE_PCIE_2_CFG 33
+#define SLAVE_PCIE_RSC_CFG 34
+#define SLAVE_PDM 35
+#define SLAVE_PRNG 36
+#define SLAVE_QDSS_CFG 37
+#define SLAVE_QPIC 38
+#define SLAVE_QUP_0 39
+#define SLAVE_SDCC_1 40
+#define SLAVE_SDCC_4 41
+#define SLAVE_SPMI_VGI_COEX 42
+#define SLAVE_TCSR 43
+#define SLAVE_TLMM 44
+#define SLAVE_USB3 45
+#define SLAVE_USB3_PHY_CFG 46
+#define SLAVE_A1NOC_CFG 47
+#define SLAVE_DDRSS_CFG 48
+#define SLAVE_SNOC_GEM_NOC_SF 49
+#define SLAVE_SNOC_CFG 50
+#define SLAVE_PCIE_ANOC_CFG 51
+#define SLAVE_IMEM 52
+#define SLAVE_SERVICE_PCIE_ANOC 53
+#define SLAVE_SERVICE_SNOC 54
+#define SLAVE_PCIE_0 55
+#define SLAVE_PCIE_1 56
+#define SLAVE_PCIE_2 57
+#define SLAVE_QDSS_STM 58
+#define SLAVE_TCU 59
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm6115.h b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm6115.h
new file mode 100644
index 000000000000..21090e585f05
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm6115.h
@@ -0,0 +1,111 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/*
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_SM6115_H
+#define __DT_BINDINGS_INTERCONNECT_QCOM_SM6115_H
+
+/* BIMC */
+#define MASTER_AMPSS_M0 0
+#define MASTER_SNOC_BIMC_RT 1
+#define MASTER_SNOC_BIMC_NRT 2
+#define SNOC_BIMC_MAS 3
+#define MASTER_GRAPHICS_3D 4
+#define MASTER_TCU_0 5
+#define SLAVE_EBI_CH0 6
+#define BIMC_SNOC_SLV 7
+
+/* CNOC */
+#define SNOC_CNOC_MAS 0
+#define MASTER_QDSS_DAP 1
+#define SLAVE_AHB2PHY_USB 2
+#define SLAVE_APSS_THROTTLE_CFG 3
+#define SLAVE_BIMC_CFG 4
+#define SLAVE_BOOT_ROM 5
+#define SLAVE_CAMERA_NRT_THROTTLE_CFG 6
+#define SLAVE_CAMERA_RT_THROTTLE_CFG 7
+#define SLAVE_CAMERA_CFG 8
+#define SLAVE_CLK_CTL 9
+#define SLAVE_RBCPR_CX_CFG 10
+#define SLAVE_RBCPR_MX_CFG 11
+#define SLAVE_CRYPTO_0_CFG 12
+#define SLAVE_DCC_CFG 13
+#define SLAVE_DDR_PHY_CFG 14
+#define SLAVE_DDR_SS_CFG 15
+#define SLAVE_DISPLAY_CFG 16
+#define SLAVE_DISPLAY_THROTTLE_CFG 17
+#define SLAVE_GPU_CFG 18
+#define SLAVE_GPU_THROTTLE_CFG 19
+#define SLAVE_HWKM_CORE 20
+#define SLAVE_IMEM_CFG 21
+#define SLAVE_IPA_CFG 22
+#define SLAVE_LPASS 23
+#define SLAVE_MAPSS 24
+#define SLAVE_MDSP_MPU_CFG 25
+#define SLAVE_MESSAGE_RAM 26
+#define SLAVE_CNOC_MSS 27
+#define SLAVE_PDM 28
+#define SLAVE_PIMEM_CFG 29
+#define SLAVE_PKA_CORE 30
+#define SLAVE_PMIC_ARB 31
+#define SLAVE_QDSS_CFG 32
+#define SLAVE_QM_CFG 33
+#define SLAVE_QM_MPU_CFG 34
+#define SLAVE_QPIC 35
+#define SLAVE_QUP_0 36
+#define SLAVE_RPM 37
+#define SLAVE_SDCC_1 38
+#define SLAVE_SDCC_2 39
+#define SLAVE_SECURITY 40
+#define SLAVE_SNOC_CFG 41
+#define SLAVE_TCSR 42
+#define SLAVE_TLMM 43
+#define SLAVE_USB3 44
+#define SLAVE_VENUS_CFG 45
+#define SLAVE_VENUS_THROTTLE_CFG 46
+#define SLAVE_VSENSE_CTRL_CFG 47
+#define SLAVE_SERVICE_CNOC 48
+
+/* SNOC */
+#define MASTER_CRYPTO_CORE0 0
+#define MASTER_SNOC_CFG 1
+#define MASTER_TIC 2
+#define MASTER_ANOC_SNOC 3
+#define BIMC_SNOC_MAS 4
+#define MASTER_PIMEM 5
+#define MASTER_QDSS_BAM 6
+#define MASTER_QPIC 7
+#define MASTER_QUP_0 8
+#define MASTER_IPA 9
+#define MASTER_QDSS_ETR 10
+#define MASTER_SDCC_1 11
+#define MASTER_SDCC_2 12
+#define MASTER_USB3 13
+#define SLAVE_APPSS 14
+#define SNOC_CNOC_SLV 15
+#define SLAVE_OCIMEM 16
+#define SLAVE_PIMEM 17
+#define SNOC_BIMC_SLV 18
+#define SLAVE_SERVICE_SNOC 19
+#define SLAVE_QDSS_STM 20
+#define SLAVE_TCU 21
+#define SLAVE_ANOC_SNOC 22
+
+/* CLK Virtual */
+#define MASTER_QUP_CORE_0 0
+#define SLAVE_QUP_CORE_0 1
+
+/* MMRT Virtual */
+#define MASTER_CAMNOC_HF 0
+#define MASTER_MDP_PORT0 1
+#define SLAVE_SNOC_BIMC_RT 2
+
+/* MMNRT Virtual */
+#define MASTER_CAMNOC_SF 0
+#define MASTER_VIDEO_P0 1
+#define MASTER_VIDEO_PROC 2
+#define SLAVE_SNOC_BIMC_NRT 3
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8250.h b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8250.h
index a4af5cc19271..2a656c02df4b 100644
--- a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8250.h
+++ b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8250.h
@@ -166,4 +166,11 @@
#define SLAVE_QDSS_STM 17
#define SLAVE_TCU 18
+#define MASTER_QUP_CORE_0 0
+#define MASTER_QUP_CORE_1 1
+#define MASTER_QUP_CORE_2 2
+#define SLAVE_QUP_CORE_0 3
+#define SLAVE_QUP_CORE_1 4
+#define SLAVE_QUP_CORE_2 5
+
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8650-rpmh.h b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8650-rpmh.h
new file mode 100644
index 000000000000..6c1eaf04e241
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,sm8650-rpmh.h
@@ -0,0 +1,154 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_SM8650_H
+#define __DT_BINDINGS_INTERCONNECT_QCOM_SM8650_H
+
+#define MASTER_QSPI_0 0
+#define MASTER_QUP_1 1
+#define MASTER_QUP_3 2
+#define MASTER_SDCC_4 3
+#define MASTER_UFS_MEM 4
+#define MASTER_USB3_0 5
+#define SLAVE_A1NOC_SNOC 6
+
+#define MASTER_QDSS_BAM 0
+#define MASTER_QUP_2 1
+#define MASTER_CRYPTO 2
+#define MASTER_IPA 3
+#define MASTER_SP 4
+#define MASTER_QDSS_ETR 5
+#define MASTER_QDSS_ETR_1 6
+#define MASTER_SDCC_2 7
+#define SLAVE_A2NOC_SNOC 8
+
+#define MASTER_QUP_CORE_0 0
+#define MASTER_QUP_CORE_1 1
+#define MASTER_QUP_CORE_2 2
+#define SLAVE_QUP_CORE_0 3
+#define SLAVE_QUP_CORE_1 4
+#define SLAVE_QUP_CORE_2 5
+
+#define MASTER_CNOC_CFG 0
+#define SLAVE_AHB2PHY_SOUTH 1
+#define SLAVE_AHB2PHY_NORTH 2
+#define SLAVE_CAMERA_CFG 3
+#define SLAVE_CLK_CTL 4
+#define SLAVE_RBCPR_CX_CFG 5
+#define SLAVE_CPR_HMX 6
+#define SLAVE_RBCPR_MMCX_CFG 7
+#define SLAVE_RBCPR_MXA_CFG 8
+#define SLAVE_RBCPR_MXC_CFG 9
+#define SLAVE_CPR_NSPCX 10
+#define SLAVE_CRYPTO_0_CFG 11
+#define SLAVE_CX_RDPM 12
+#define SLAVE_DISPLAY_CFG 13
+#define SLAVE_GFX3D_CFG 14
+#define SLAVE_I2C 15
+#define SLAVE_I3C_IBI0_CFG 16
+#define SLAVE_I3C_IBI1_CFG 17
+#define SLAVE_IMEM_CFG 18
+#define SLAVE_CNOC_MSS 19
+#define SLAVE_MX_2_RDPM 20
+#define SLAVE_MX_RDPM 21
+#define SLAVE_PCIE_0_CFG 22
+#define SLAVE_PCIE_1_CFG 23
+#define SLAVE_PCIE_RSCC 24
+#define SLAVE_PDM 25
+#define SLAVE_PRNG 26
+#define SLAVE_QDSS_CFG 27
+#define SLAVE_QSPI_0 28
+#define SLAVE_QUP_3 29
+#define SLAVE_QUP_1 30
+#define SLAVE_QUP_2 31
+#define SLAVE_SDCC_2 32
+#define SLAVE_SDCC_4 33
+#define SLAVE_SPSS_CFG 34
+#define SLAVE_TCSR 35
+#define SLAVE_TLMM 36
+#define SLAVE_UFS_MEM_CFG 37
+#define SLAVE_USB3_0 38
+#define SLAVE_VENUS_CFG 39
+#define SLAVE_VSENSE_CTRL_CFG 40
+#define SLAVE_CNOC_MNOC_CFG 41
+#define SLAVE_NSP_QTB_CFG 42
+#define SLAVE_PCIE_ANOC_CFG 43
+#define SLAVE_SERVICE_CNOC_CFG 44
+#define SLAVE_QDSS_STM 45
+#define SLAVE_TCU 46
+
+#define MASTER_GEM_NOC_CNOC 0
+#define MASTER_GEM_NOC_PCIE_SNOC 1
+#define SLAVE_AOSS 2
+#define SLAVE_IPA_CFG 3
+#define SLAVE_IPC_ROUTER_CFG 4
+#define SLAVE_TME_CFG 5
+#define SLAVE_APPSS 6
+#define SLAVE_CNOC_CFG 7
+#define SLAVE_DDRSS_CFG 8
+#define SLAVE_IMEM 9
+#define SLAVE_SERVICE_CNOC 10
+#define SLAVE_PCIE_0 11
+#define SLAVE_PCIE_1 12
+
+#define MASTER_GPU_TCU 0
+#define MASTER_SYS_TCU 1
+#define MASTER_UBWC_P_TCU 2
+#define MASTER_APPSS_PROC 3
+#define MASTER_GFX3D 4
+#define MASTER_LPASS_GEM_NOC 5
+#define MASTER_MSS_PROC 6
+#define MASTER_MNOC_HF_MEM_NOC 7
+#define MASTER_MNOC_SF_MEM_NOC 8
+#define MASTER_COMPUTE_NOC 9
+#define MASTER_ANOC_PCIE_GEM_NOC 10
+#define MASTER_SNOC_SF_MEM_NOC 11
+#define MASTER_UBWC_P 12
+#define MASTER_GIC 13
+#define SLAVE_GEM_NOC_CNOC 14
+#define SLAVE_LLCC 15
+#define SLAVE_MEM_NOC_PCIE_SNOC 16
+
+#define MASTER_LPIAON_NOC 0
+#define SLAVE_LPASS_GEM_NOC 1
+
+#define MASTER_LPASS_LPINOC 0
+#define SLAVE_LPIAON_NOC_LPASS_AG_NOC 1
+
+#define MASTER_LPASS_PROC 0
+#define SLAVE_LPICX_NOC_LPIAON_NOC 1
+
+#define MASTER_LLCC 0
+#define SLAVE_EBI1 1
+
+#define MASTER_CAMNOC_HF 0
+#define MASTER_CAMNOC_ICP 1
+#define MASTER_CAMNOC_SF 2
+#define MASTER_MDP 3
+#define MASTER_CDSP_HCP 4
+#define MASTER_VIDEO 5
+#define MASTER_VIDEO_CV_PROC 6
+#define MASTER_VIDEO_PROC 7
+#define MASTER_VIDEO_V_PROC 8
+#define MASTER_CNOC_MNOC_CFG 9
+#define SLAVE_MNOC_HF_MEM_NOC 10
+#define SLAVE_MNOC_SF_MEM_NOC 11
+#define SLAVE_SERVICE_MNOC 12
+
+#define MASTER_CDSP_PROC 0
+#define SLAVE_CDSP_MEM_NOC 1
+
+#define MASTER_PCIE_ANOC_CFG 0
+#define MASTER_PCIE_0 1
+#define MASTER_PCIE_1 2
+#define SLAVE_ANOC_PCIE_GEM_NOC 3
+#define SLAVE_SERVICE_PCIE_ANOC 4
+
+#define MASTER_A1NOC_SNOC 0
+#define MASTER_A2NOC_SNOC 1
+#define SLAVE_SNOC_GEM_NOC_SF 2
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,x1e80100-rpmh.h b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,x1e80100-rpmh.h
new file mode 100644
index 000000000000..a38c3472698a
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/interconnect/qcom,x1e80100-rpmh.h
@@ -0,0 +1,207 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_X1E80100_H
+#define __DT_BINDINGS_INTERCONNECT_QCOM_X1E80100_H
+
+#define MASTER_QSPI_0 0
+#define MASTER_QUP_1 1
+#define MASTER_SDCC_4 2
+#define MASTER_UFS_MEM 3
+#define SLAVE_A1NOC_SNOC 4
+
+#define MASTER_QUP_0 0
+#define MASTER_QUP_2 1
+#define MASTER_CRYPTO 2
+#define MASTER_SP 3
+#define MASTER_QDSS_ETR 4
+#define MASTER_QDSS_ETR_1 5
+#define MASTER_SDCC_2 6
+#define SLAVE_A2NOC_SNOC 7
+
+#define MASTER_DDR_PERF_MODE 0
+#define MASTER_QUP_CORE_0 1
+#define MASTER_QUP_CORE_1 2
+#define MASTER_QUP_CORE_2 3
+#define SLAVE_DDR_PERF_MODE 4
+#define SLAVE_QUP_CORE_0 5
+#define SLAVE_QUP_CORE_1 6
+#define SLAVE_QUP_CORE_2 7
+
+#define MASTER_CNOC_CFG 0
+#define SLAVE_AHB2PHY_SOUTH 1
+#define SLAVE_AHB2PHY_NORTH 2
+#define SLAVE_AHB2PHY_2 3
+#define SLAVE_AV1_ENC_CFG 4
+#define SLAVE_CAMERA_CFG 5
+#define SLAVE_CLK_CTL 6
+#define SLAVE_CRYPTO_0_CFG 7
+#define SLAVE_DISPLAY_CFG 8
+#define SLAVE_GFX3D_CFG 9
+#define SLAVE_IMEM_CFG 10
+#define SLAVE_IPC_ROUTER_CFG 11
+#define SLAVE_PCIE_0_CFG 12
+#define SLAVE_PCIE_1_CFG 13
+#define SLAVE_PCIE_2_CFG 14
+#define SLAVE_PCIE_3_CFG 15
+#define SLAVE_PCIE_4_CFG 16
+#define SLAVE_PCIE_5_CFG 17
+#define SLAVE_PCIE_6A_CFG 18
+#define SLAVE_PCIE_6B_CFG 19
+#define SLAVE_PCIE_RSC_CFG 20
+#define SLAVE_PDM 21
+#define SLAVE_PRNG 22
+#define SLAVE_QDSS_CFG 23
+#define SLAVE_QSPI_0 24
+#define SLAVE_QUP_0 25
+#define SLAVE_QUP_1 26
+#define SLAVE_QUP_2 27
+#define SLAVE_SDCC_2 28
+#define SLAVE_SDCC_4 29
+#define SLAVE_SMMUV3_CFG 30
+#define SLAVE_TCSR 31
+#define SLAVE_TLMM 32
+#define SLAVE_UFS_MEM_CFG 33
+#define SLAVE_USB2 34
+#define SLAVE_USB3_0 35
+#define SLAVE_USB3_1 36
+#define SLAVE_USB3_2 37
+#define SLAVE_USB3_MP 38
+#define SLAVE_USB4_0 39
+#define SLAVE_USB4_1 40
+#define SLAVE_USB4_2 41
+#define SLAVE_VENUS_CFG 42
+#define SLAVE_LPASS_QTB_CFG 43
+#define SLAVE_CNOC_MNOC_CFG 44
+#define SLAVE_NSP_QTB_CFG 45
+#define SLAVE_QDSS_STM 46
+#define SLAVE_TCU 47
+
+#define MASTER_GEM_NOC_CNOC 0
+#define MASTER_GEM_NOC_PCIE_SNOC 1
+#define SLAVE_AOSS 2
+#define SLAVE_TME_CFG 3
+#define SLAVE_APPSS 4
+#define SLAVE_CNOC_CFG 5
+#define SLAVE_BOOT_IMEM 6
+#define SLAVE_IMEM 7
+#define SLAVE_PCIE_0 8
+#define SLAVE_PCIE_1 9
+#define SLAVE_PCIE_2 10
+#define SLAVE_PCIE_3 11
+#define SLAVE_PCIE_4 12
+#define SLAVE_PCIE_5 13
+#define SLAVE_PCIE_6A 14
+#define SLAVE_PCIE_6B 15
+
+#define MASTER_GPU_TCU 0
+#define MASTER_PCIE_TCU 1
+#define MASTER_SYS_TCU 2
+#define MASTER_APPSS_PROC 3
+#define MASTER_GFX3D 4
+#define MASTER_LPASS_GEM_NOC 5
+#define MASTER_MNOC_HF_MEM_NOC 6
+#define MASTER_MNOC_SF_MEM_NOC 7
+#define MASTER_COMPUTE_NOC 8
+#define MASTER_ANOC_PCIE_GEM_NOC 9
+#define MASTER_SNOC_SF_MEM_NOC 10
+#define MASTER_GIC2 11
+#define SLAVE_GEM_NOC_CNOC 12
+#define SLAVE_LLCC 13
+#define SLAVE_MEM_NOC_PCIE_SNOC 14
+#define MASTER_MNOC_HF_MEM_NOC_DISP 15
+#define MASTER_ANOC_PCIE_GEM_NOC_DISP 16
+#define SLAVE_LLCC_DISP 17
+#define MASTER_ANOC_PCIE_GEM_NOC_PCIE 18
+#define SLAVE_LLCC_PCIE 19
+
+#define MASTER_LPIAON_NOC 0
+#define SLAVE_LPASS_GEM_NOC 1
+
+#define MASTER_LPASS_LPINOC 0
+#define SLAVE_LPIAON_NOC_LPASS_AG_NOC 1
+
+#define MASTER_LPASS_PROC 0
+#define SLAVE_LPICX_NOC_LPIAON_NOC 1
+
+#define MASTER_LLCC 0
+#define SLAVE_EBI1 1
+#define MASTER_LLCC_DISP 2
+#define SLAVE_EBI1_DISP 3
+#define MASTER_LLCC_PCIE 4
+#define SLAVE_EBI1_PCIE 5
+
+#define MASTER_AV1_ENC 0
+#define MASTER_CAMNOC_HF 1
+#define MASTER_CAMNOC_ICP 2
+#define MASTER_CAMNOC_SF 3
+#define MASTER_EVA 4
+#define MASTER_MDP 5
+#define MASTER_VIDEO 6
+#define MASTER_VIDEO_CV_PROC 7
+#define MASTER_VIDEO_V_PROC 8
+#define MASTER_CNOC_MNOC_CFG 9
+#define SLAVE_MNOC_HF_MEM_NOC 10
+#define SLAVE_MNOC_SF_MEM_NOC 11
+#define SLAVE_SERVICE_MNOC 12
+#define MASTER_MDP_DISP 13
+#define SLAVE_MNOC_HF_MEM_NOC_DISP 14
+
+#define MASTER_CDSP_PROC 0
+#define SLAVE_CDSP_MEM_NOC 1
+
+#define MASTER_PCIE_NORTH 0
+#define MASTER_PCIE_SOUTH 1
+#define SLAVE_ANOC_PCIE_GEM_NOC 2
+#define MASTER_PCIE_NORTH_PCIE 3
+#define MASTER_PCIE_SOUTH_PCIE 4
+#define SLAVE_ANOC_PCIE_GEM_NOC_PCIE 5
+
+#define MASTER_PCIE_3 0
+#define MASTER_PCIE_4 1
+#define MASTER_PCIE_5 2
+#define SLAVE_PCIE_NORTH 3
+#define MASTER_PCIE_3_PCIE 4
+#define MASTER_PCIE_4_PCIE 5
+#define MASTER_PCIE_5_PCIE 6
+#define SLAVE_PCIE_NORTH_PCIE 7
+
+#define MASTER_PCIE_0 0
+#define MASTER_PCIE_1 1
+#define MASTER_PCIE_2 2
+#define MASTER_PCIE_6A 3
+#define MASTER_PCIE_6B 4
+#define SLAVE_PCIE_SOUTH 5
+#define MASTER_PCIE_0_PCIE 6
+#define MASTER_PCIE_1_PCIE 7
+#define MASTER_PCIE_2_PCIE 8
+#define MASTER_PCIE_6A_PCIE 9
+#define MASTER_PCIE_6B_PCIE 10
+#define SLAVE_PCIE_SOUTH_PCIE 11
+
+#define MASTER_A1NOC_SNOC 0
+#define MASTER_A2NOC_SNOC 1
+#define MASTER_GIC1 2
+#define MASTER_USB_NOC_SNOC 3
+#define SLAVE_SNOC_GEM_NOC_SF 4
+
+#define MASTER_AGGRE_USB_NORTH 0
+#define MASTER_AGGRE_USB_SOUTH 1
+#define SLAVE_USB_NOC_SNOC 2
+
+#define MASTER_USB2 0
+#define MASTER_USB3_MP 1
+#define SLAVE_AGGRE_USB_NORTH 2
+
+#define MASTER_USB3_0 0
+#define MASTER_USB3_1 1
+#define MASTER_USB3_2 2
+#define MASTER_USB4_0 3
+#define MASTER_USB4_1 4
+#define MASTER_USB4_2 5
+#define SLAVE_AGGRE_USB_SOUTH 6
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h b/sys/contrib/device-tree/include/dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h
new file mode 100644
index 000000000000..bd415cb7b669
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h
@@ -0,0 +1,126 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
+ * Author: Huqiang Qin <huqiang.qin@amlogic.com>
+ */
+
+#ifndef _DT_BINDINGS_IRQ_MESON_G12A_GPIO_H
+#define _DT_BINDINGS_IRQ_MESON_G12A_GPIO_H
+
+/* IRQID[11:0] - GPIOAO[11:0] */
+#define IRQID_GPIOAO_0 0
+#define IRQID_GPIOAO_1 1
+#define IRQID_GPIOAO_2 2
+#define IRQID_GPIOAO_3 3
+#define IRQID_GPIOAO_4 4
+#define IRQID_GPIOAO_5 5
+#define IRQID_GPIOAO_6 6
+#define IRQID_GPIOAO_7 7
+#define IRQID_GPIOAO_8 8
+#define IRQID_GPIOAO_9 9
+#define IRQID_GPIOAO_10 10
+#define IRQID_GPIOAO_11 11
+
+/* IRQID[27:12] - GPIOZ[15:0] */
+#define IRQID_GPIOZ_0 12
+#define IRQID_GPIOZ_1 13
+#define IRQID_GPIOZ_2 14
+#define IRQID_GPIOZ_3 15
+#define IRQID_GPIOZ_4 16
+#define IRQID_GPIOZ_5 17
+#define IRQID_GPIOZ_6 18
+#define IRQID_GPIOZ_7 19
+#define IRQID_GPIOZ_8 20
+#define IRQID_GPIOZ_9 21
+#define IRQID_GPIOZ_10 22
+#define IRQID_GPIOZ_11 23
+#define IRQID_GPIOZ_12 24
+#define IRQID_GPIOZ_13 25
+#define IRQID_GPIOZ_14 26
+#define IRQID_GPIOZ_15 27
+
+/* IRQID[36:28] - GPIOH[8:0] */
+#define IRQID_GPIOH_0 28
+#define IRQID_GPIOH_1 29
+#define IRQID_GPIOH_2 30
+#define IRQID_GPIOH_3 31
+#define IRQID_GPIOH_4 32
+#define IRQID_GPIOH_5 33
+#define IRQID_GPIOH_6 34
+#define IRQID_GPIOH_7 35
+#define IRQID_GPIOH_8 36
+
+/* IRQID[52:37] - BOOT[15:0] */
+#define IRQID_BOOT_0 37
+#define IRQID_BOOT_1 38
+#define IRQID_BOOT_2 39
+#define IRQID_BOOT_3 40
+#define IRQID_BOOT_4 41
+#define IRQID_BOOT_5 42
+#define IRQID_BOOT_6 43
+#define IRQID_BOOT_7 44
+#define IRQID_BOOT_8 45
+#define IRQID_BOOT_9 46
+#define IRQID_BOOT_10 47
+#define IRQID_BOOT_11 48
+#define IRQID_BOOT_12 49
+#define IRQID_BOOT_13 50
+#define IRQID_BOOT_14 51
+#define IRQID_BOOT_15 52
+
+/* IRQID[60:53] - GPIOC[7:0] */
+#define IRQID_GPIOC_0 53
+#define IRQID_GPIOC_1 54
+#define IRQID_GPIOC_2 55
+#define IRQID_GPIOC_3 56
+#define IRQID_GPIOC_4 57
+#define IRQID_GPIOC_5 58
+#define IRQID_GPIOC_6 59
+#define IRQID_GPIOC_7 60
+
+/* IRQID[76:61] - GPIOA[15:0] */
+#define IRQID_GPIOA_0 61
+#define IRQID_GPIOA_1 62
+#define IRQID_GPIOA_2 63
+#define IRQID_GPIOA_3 64
+#define IRQID_GPIOA_4 65
+#define IRQID_GPIOA_5 66
+#define IRQID_GPIOA_6 67
+#define IRQID_GPIOA_7 68
+#define IRQID_GPIOA_8 69
+#define IRQID_GPIOA_9 70
+#define IRQID_GPIOA_10 71
+#define IRQID_GPIOA_11 72
+#define IRQID_GPIOA_12 73
+#define IRQID_GPIOA_13 74
+#define IRQID_GPIOA_14 75
+#define IRQID_GPIOA_15 76
+
+/* IRQID[96:77] - GPIOX[19:0] */
+#define IRQID_GPIOX_0 77
+#define IRQID_GPIOX_1 78
+#define IRQID_GPIOX_2 79
+#define IRQID_GPIOX_3 80
+#define IRQID_GPIOX_4 81
+#define IRQID_GPIOX_5 82
+#define IRQID_GPIOX_6 83
+#define IRQID_GPIOX_7 84
+#define IRQID_GPIOX_8 85
+#define IRQID_GPIOX_9 86
+#define IRQID_GPIOX_10 87
+#define IRQID_GPIOX_11 88
+#define IRQID_GPIOX_12 89
+#define IRQID_GPIOX_13 90
+#define IRQID_GPIOX_14 91
+#define IRQID_GPIOX_15 92
+#define IRQID_GPIOX_16 93
+#define IRQID_GPIOX_17 94
+#define IRQID_GPIOX_18 95
+#define IRQID_GPIOX_19 96
+
+/* IRQID[99:97] - GPIOE[2:0] */
+#define IRQID_GPIOE_0 97
+#define IRQID_GPIOE_1 98
+#define IRQID_GPIOE_2 99
+
+#endif /* _DT_BINDINGS_IRQ_MESON_G12A_GPIO_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/memory/mediatek,mt8188-memory-port.h b/sys/contrib/device-tree/include/dt-bindings/memory/mediatek,mt8188-memory-port.h
new file mode 100644
index 000000000000..337ab11262af
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/memory/mediatek,mt8188-memory-port.h
@@ -0,0 +1,489 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2022 MediaTek Inc.
+ * Author: Chengci Xu <chengci.xu@mediatek.com>
+ */
+#ifndef _DT_BINDINGS_MEMORY_MEDIATEK_MT8188_LARB_PORT_H_
+#define _DT_BINDINGS_MEMORY_MEDIATEK_MT8188_LARB_PORT_H_
+
+#include <dt-bindings/memory/mtk-memory-port.h>
+
+/*
+ * MM IOMMU larbs:
+ * From below, for example larb11 has larb11a/larb11b/larb11c,
+ * the index of larb is not in order. So we reindexed these larbs from a
+ * software view.
+ */
+#define SMI_L0_ID 0
+#define SMI_L1_ID 1
+#define SMI_L2_ID 2
+#define SMI_L3_ID 3
+#define SMI_L4_ID 4
+#define SMI_L5_ID 5
+#define SMI_L6_ID 6
+#define SMI_L7_ID 7
+#define SMI_L9_ID 8
+#define SMI_L10_ID 9
+#define SMI_L11A_ID 10
+#define SMI_L11B_ID 11
+#define SMI_L11C_ID 12
+#define SMI_L12_ID 13
+#define SMI_L13_ID 14
+#define SMI_L14_ID 15
+#define SMI_L15_ID 16
+#define SMI_L16A_ID 17
+#define SMI_L16B_ID 18
+#define SMI_L17A_ID 19
+#define SMI_L17B_ID 20
+#define SMI_L19_ID 21
+#define SMI_L21_ID 22
+#define SMI_L23_ID 23
+#define SMI_L27_ID 24
+#define SMI_L28_ID 25
+
+/*
+ * MM IOMMU supports 16GB dma address. We separate it to four ranges:
+ * 0 ~ 4G; 4G ~ 8G; 8G ~ 12G; 12G ~ 16G, we could adjust these masters
+ * locate in anyone region. BUT:
+ * a) Make sure all the ports inside a larb are in one range.
+ * b) The iova of any master can NOT cross the 4G/8G/12G boundary.
+ *
+ * This is the suggested mapping in this SoC:
+ *
+ * modules dma-address-region larbs-ports
+ * disp 0 ~ 4G larb0/1/2/3
+ * vcodec 4G ~ 8G larb19(21)[1]/21(22)/23
+ * cam/mdp 8G ~ 12G the other larbs.
+ * N/A 12G ~ 16G
+ * CCU0 0x24000_0000 ~ 0x243ff_ffff larb27(24): port 0/1
+ * CCU1 0x24400_0000 ~ 0x247ff_ffff larb27(24): port 2/3
+ *
+ * This SoC have two MM IOMMU HWs, this is the connected information:
+ * iommu-vdo: larb0/2/5/9/10/11A/11C/13/16B/17B/19/21
+ * iommu-vpp: larb1/3/4/6/7/11B/12/14/15/16A/17A/23/27
+ *
+ * [1]: This is larb19, but the index is 21 from the SW view.
+ */
+
+/* MM IOMMU ports */
+/* LARB 0 -- VDO-0 */
+#define M4U_PORT_L0_DISP_RDMA1 MTK_M4U_ID(SMI_L0_ID, 0)
+#define M4U_PORT_L0_DISP_WDMA0 MTK_M4U_ID(SMI_L0_ID, 1)
+#define M4U_PORT_L0_DISP_OVL0_RDMA0 MTK_M4U_ID(SMI_L0_ID, 2)
+#define M4U_PORT_L0_DISP_OVL0_RDMA1 MTK_M4U_ID(SMI_L0_ID, 3)
+#define M4U_PORT_L0_DISP_OVL0_HDR MTK_M4U_ID(SMI_L0_ID, 4)
+#define M4U_PORT_L0_DISP_POSTMASK0 MTK_M4U_ID(SMI_L0_ID, 5)
+#define M4U_PORT_L0_DISP_FAKE_ENG0 MTK_M4U_ID(SMI_L0_ID, 6)
+
+/* LARB 1 -- VD0-0 */
+#define M4U_PORT_L1_DISP_RDMA0 MTK_M4U_ID(SMI_L1_ID, 0)
+#define M4U_PORT_L1_DISP_WDMA1 MTK_M4U_ID(SMI_L1_ID, 1)
+#define M4U_PORT_L1_DISP_OVL1_RDMA0 MTK_M4U_ID(SMI_L1_ID, 2)
+#define M4U_PORT_L1_DISP_OVL1_RDMA1 MTK_M4U_ID(SMI_L1_ID, 3)
+#define M4U_PORT_L1_DISP_OVL1_HDR MTK_M4U_ID(SMI_L1_ID, 4)
+#define M4U_PORT_L1_DISP_WROT0 MTK_M4U_ID(SMI_L1_ID, 5)
+#define M4U_PORT_L1_DISP_FAKE_ENG1 MTK_M4U_ID(SMI_L1_ID, 6)
+
+/* LARB 2 -- VDO-1 */
+#define M4U_PORT_L2_MDP_RDMA0 MTK_M4U_ID(SMI_L2_ID, 0)
+#define M4U_PORT_L2_MDP_RDMA2 MTK_M4U_ID(SMI_L2_ID, 1)
+#define M4U_PORT_L2_MDP_RDMA4 MTK_M4U_ID(SMI_L2_ID, 2)
+#define M4U_PORT_L2_MDP_RDMA6 MTK_M4U_ID(SMI_L2_ID, 3)
+#define M4U_PORT_L2_DISP_FAKE1 MTK_M4U_ID(SMI_L2_ID, 4)
+
+/* LARB 3 -- VDO-1 */
+#define M4U_PORT_L3_MDP_RDMA1 MTK_M4U_ID(SMI_L3_ID, 0)
+#define M4U_PORT_L3_MDP_RDMA3 MTK_M4U_ID(SMI_L3_ID, 1)
+#define M4U_PORT_L3_MDP_RDMA5 MTK_M4U_ID(SMI_L3_ID, 2)
+#define M4U_PORT_L3_MDP_RDMA7 MTK_M4U_ID(SMI_L3_ID, 3)
+#define M4U_PORT_L3_HDR_DS_SMI MTK_M4U_ID(SMI_L3_ID, 4)
+#define M4U_PORT_L3_HDR_ADL_SMI MTK_M4U_ID(SMI_L3_ID, 5)
+#define M4U_PORT_L3_DISP_FAKE1 MTK_M4U_ID(SMI_L3_ID, 6)
+
+/* LARB 4 -- VPP-0 */
+#define M4U_PORT_L4_MDP_RDMA MTK_M4U_ID(SMI_L4_ID, 0)
+#define M4U_PORT_L4_MDP_FG MTK_M4U_ID(SMI_L4_ID, 1)
+#define M4U_PORT_L4_MDP_OVL MTK_M4U_ID(SMI_L4_ID, 2)
+#define M4U_PORT_L4_MDP_WROT MTK_M4U_ID(SMI_L4_ID, 3)
+#define M4U_PORT_L4_FAKE_ENG MTK_M4U_ID(SMI_L4_ID, 4)
+#define M4U_PORT_L4_DISP_RDMA MTK_M4U_ID(SMI_L4_ID, 5)
+#define M4U_PORT_L4_DISP_WDMA MTK_M4U_ID(SMI_L4_ID, 6)
+
+/* LARB 5 -- VPP-1 */
+#define M4U_PORT_L5_SVPP1_MDP_RDMA MTK_M4U_ID(SMI_L5_ID, 0)
+#define M4U_PORT_L5_SVPP1_MDP_FG MTK_M4U_ID(SMI_L5_ID, 1)
+#define M4U_PORT_L5_SVPP1_MDP_OVL MTK_M4U_ID(SMI_L5_ID, 2)
+#define M4U_PORT_L5_SVPP1_MDP_WROT MTK_M4U_ID(SMI_L5_ID, 3)
+#define M4U_PORT_L5_SVPP2_MDP_RDMA MTK_M4U_ID(SMI_L5_ID, 4)
+#define M4U_PORT_L5_SVPP2_MDP_FG MTK_M4U_ID(SMI_L5_ID, 5)
+#define M4U_PORT_L5_SVPP2_MDP_WROT MTK_M4U_ID(SMI_L5_ID, 6)
+#define M4U_PORT_L5_LARB5_FAKE_ENG MTK_M4U_ID(SMI_L5_ID, 7)
+
+/* LARB 6 -- VPP-1 */
+#define M4U_PORT_L6_SVPP3_MDP_RDMA MTK_M4U_ID(SMI_L6_ID, 0)
+#define M4U_PORT_L6_SVPP3_MDP_FG MTK_M4U_ID(SMI_L6_ID, 1)
+#define M4U_PORT_L6_SVPP3_MDP_WROT MTK_M4U_ID(SMI_L6_ID, 2)
+#define M4U_PORT_L6_LARB6_FAKE_ENG MTK_M4U_ID(SMI_L6_ID, 3)
+
+/* LARB 7 -- WPE */
+#define M4U_PORT_L7_WPE_RDMA_0 MTK_M4U_ID(SMI_L7_ID, 0)
+#define M4U_PORT_L7_WPE_RDMA_1 MTK_M4U_ID(SMI_L7_ID, 1)
+#define M4U_PORT_L7_WPE_WDMA_0 MTK_M4U_ID(SMI_L7_ID, 2)
+
+/* LARB 9 -- IMG-M */
+#define M4U_PORT_L9_IMGI_T1_A MTK_M4U_ID(SMI_L9_ID, 0)
+#define M4U_PORT_L9_UFDI_T1_A MTK_M4U_ID(SMI_L9_ID, 1)
+#define M4U_PORT_L9_IMGBI_T1_A MTK_M4U_ID(SMI_L9_ID, 2)
+#define M4U_PORT_L9_IMGCI_T1_A MTK_M4U_ID(SMI_L9_ID, 3)
+#define M4U_PORT_L9_SMTI_T1_A MTK_M4U_ID(SMI_L9_ID, 4)
+#define M4U_PORT_L9_SMTI_T4_A MTK_M4U_ID(SMI_L9_ID, 5)
+#define M4U_PORT_L9_TNCSTI_T1_A MTK_M4U_ID(SMI_L9_ID, 6)
+#define M4U_PORT_L9_TNCSTI_T4_A MTK_M4U_ID(SMI_L9_ID, 7)
+#define M4U_PORT_L9_YUVO_T1_A MTK_M4U_ID(SMI_L9_ID, 8)
+#define M4U_PORT_L9_YUVBO_T1_A MTK_M4U_ID(SMI_L9_ID, 9)
+#define M4U_PORT_L9_YUVCO_T1_A MTK_M4U_ID(SMI_L9_ID, 10)
+#define M4U_PORT_L9_TIMGO_T1_A MTK_M4U_ID(SMI_L9_ID, 11)
+#define M4U_PORT_L9_YUVO_T2_A MTK_M4U_ID(SMI_L9_ID, 12)
+#define M4U_PORT_L9_YUVO_T5_A MTK_M4U_ID(SMI_L9_ID, 13)
+#define M4U_PORT_L9_IMGI_T1_B MTK_M4U_ID(SMI_L9_ID, 14)
+#define M4U_PORT_L9_IMGBI_T1_B MTK_M4U_ID(SMI_L9_ID, 15)
+#define M4U_PORT_L9_IMGCI_T1_B MTK_M4U_ID(SMI_L9_ID, 16)
+#define M4U_PORT_L9_SMTI_T4_B MTK_M4U_ID(SMI_L9_ID, 17)
+#define M4U_PORT_L9_TNCSO_T1_A MTK_M4U_ID(SMI_L9_ID, 18)
+#define M4U_PORT_L9_SMTO_T1_A MTK_M4U_ID(SMI_L9_ID, 19)
+#define M4U_PORT_L9_SMTO_T4_A MTK_M4U_ID(SMI_L9_ID, 20)
+#define M4U_PORT_L9_TNCSTO_T1_A MTK_M4U_ID(SMI_L9_ID, 21)
+#define M4U_PORT_L9_YUVO_T2_B MTK_M4U_ID(SMI_L9_ID, 22)
+#define M4U_PORT_L9_YUVO_T5_B MTK_M4U_ID(SMI_L9_ID, 23)
+#define M4U_PORT_L9_SMTO_T4_B MTK_M4U_ID(SMI_L9_ID, 24)
+
+/* LARB 10 -- IMG-D */
+#define M4U_PORT_L10_IMGI_D1 MTK_M4U_ID(SMI_L10_ID, 0)
+#define M4U_PORT_L10_IMGBI_D1 MTK_M4U_ID(SMI_L10_ID, 1)
+#define M4U_PORT_L10_IMGCI_D1 MTK_M4U_ID(SMI_L10_ID, 2)
+#define M4U_PORT_L10_IMGDI_D1 MTK_M4U_ID(SMI_L10_ID, 3)
+#define M4U_PORT_L10_DEPI_D1 MTK_M4U_ID(SMI_L10_ID, 4)
+#define M4U_PORT_L10_DMGI_D1 MTK_M4U_ID(SMI_L10_ID, 5)
+#define M4U_PORT_L10_SMTI_D1 MTK_M4U_ID(SMI_L10_ID, 6)
+#define M4U_PORT_L10_RECI_D1 MTK_M4U_ID(SMI_L10_ID, 7)
+#define M4U_PORT_L10_RECI_D1_N MTK_M4U_ID(SMI_L10_ID, 8)
+#define M4U_PORT_L10_TNRWI_D1 MTK_M4U_ID(SMI_L10_ID, 9)
+#define M4U_PORT_L10_TNRCI_D1 MTK_M4U_ID(SMI_L10_ID, 10)
+#define M4U_PORT_L10_TNRCI_D1_N MTK_M4U_ID(SMI_L10_ID, 11)
+#define M4U_PORT_L10_IMG4O_D1 MTK_M4U_ID(SMI_L10_ID, 12)
+#define M4U_PORT_L10_IMG4BO_D1 MTK_M4U_ID(SMI_L10_ID, 13)
+#define M4U_PORT_L10_SMTI_D8 MTK_M4U_ID(SMI_L10_ID, 14)
+#define M4U_PORT_L10_SMTO_D1 MTK_M4U_ID(SMI_L10_ID, 15)
+#define M4U_PORT_L10_TNRMO_D1 MTK_M4U_ID(SMI_L10_ID, 16)
+#define M4U_PORT_L10_TNRMO_D1_N MTK_M4U_ID(SMI_L10_ID, 17)
+#define M4U_PORT_L10_SMTO_D8 MTK_M4U_ID(SMI_L10_ID, 18)
+#define M4U_PORT_L10_DBGO_D1 MTK_M4U_ID(SMI_L10_ID, 19)
+
+/* LARB 11A -- IMG-D */
+#define M4U_PORT_L11A_WPE_RDMA_0 MTK_M4U_ID(SMI_L11A_ID, 0)
+#define M4U_PORT_L11A_WPE_RDMA_1 MTK_M4U_ID(SMI_L11A_ID, 1)
+#define M4U_PORT_L11A_WPE_RDMA_4P_0 MTK_M4U_ID(SMI_L11A_ID, 2)
+#define M4U_PORT_L11A_WPE_RDMA_4P_1 MTK_M4U_ID(SMI_L11A_ID, 3)
+#define M4U_PORT_L11A_WPE_CQ0 MTK_M4U_ID(SMI_L11A_ID, 4)
+#define M4U_PORT_L11A_WPE_CQ1 MTK_M4U_ID(SMI_L11A_ID, 5)
+#define M4U_PORT_L11A_PIMGI_P1 MTK_M4U_ID(SMI_L11A_ID, 6)
+#define M4U_PORT_L11A_PIMGBI_P1 MTK_M4U_ID(SMI_L11A_ID, 7)
+#define M4U_PORT_L11A_PIMGCI_P1 MTK_M4U_ID(SMI_L11A_ID, 8)
+#define M4U_PORT_L11A_IMGI_T1_C MTK_M4U_ID(SMI_L11A_ID, 9)
+#define M4U_PORT_L11A_IMGBI_T1_C MTK_M4U_ID(SMI_L11A_ID, 10)
+#define M4U_PORT_L11A_IMGCI_T1_C MTK_M4U_ID(SMI_L11A_ID, 11)
+#define M4U_PORT_L11A_SMTI_T1_C MTK_M4U_ID(SMI_L11A_ID, 12)
+#define M4U_PORT_L11A_SMTI_T4_C MTK_M4U_ID(SMI_L11A_ID, 13)
+#define M4U_PORT_L11A_SMTI_T6_C MTK_M4U_ID(SMI_L11A_ID, 14)
+#define M4U_PORT_L11A_YUVO_T1_C MTK_M4U_ID(SMI_L11A_ID, 15)
+#define M4U_PORT_L11A_YUVBO_T1_C MTK_M4U_ID(SMI_L11A_ID, 16)
+#define M4U_PORT_L11A_YUVCO_T1_C MTK_M4U_ID(SMI_L11A_ID, 17)
+#define M4U_PORT_L11A_WPE_WDMA_0 MTK_M4U_ID(SMI_L11A_ID, 18)
+#define M4U_PORT_L11A_WPE_WDMA_4P_0 MTK_M4U_ID(SMI_L11A_ID, 19)
+#define M4U_PORT_L11A_WROT_P1 MTK_M4U_ID(SMI_L11A_ID, 20)
+#define M4U_PORT_L11A_TCCSO_P1 MTK_M4U_ID(SMI_L11A_ID, 21)
+#define M4U_PORT_L11A_TCCSI_P1 MTK_M4U_ID(SMI_L11A_ID, 22)
+#define M4U_PORT_L11A_TIMGO_T1_C MTK_M4U_ID(SMI_L11A_ID, 23)
+#define M4U_PORT_L11A_YUVO_T2_C MTK_M4U_ID(SMI_L11A_ID, 24)
+#define M4U_PORT_L11A_YUVO_T5_C MTK_M4U_ID(SMI_L11A_ID, 25)
+#define M4U_PORT_L11A_SMTO_T1_C MTK_M4U_ID(SMI_L11A_ID, 26)
+#define M4U_PORT_L11A_SMTO_T4_C MTK_M4U_ID(SMI_L11A_ID, 27)
+#define M4U_PORT_L11A_SMTO_T6_C MTK_M4U_ID(SMI_L11A_ID, 28)
+#define M4U_PORT_L11A_DBGO_T1_C MTK_M4U_ID(SMI_L11A_ID, 29)
+
+/* LARB 11B -- IMG-D */
+#define M4U_PORT_L11B_WPE_RDMA_0 MTK_M4U_ID(SMI_L11B_ID, 0)
+#define M4U_PORT_L11B_WPE_RDMA_1 MTK_M4U_ID(SMI_L11B_ID, 1)
+#define M4U_PORT_L11B_WPE_RDMA_4P_0 MTK_M4U_ID(SMI_L11B_ID, 2)
+#define M4U_PORT_L11B_WPE_RDMA_4P_1 MTK_M4U_ID(SMI_L11B_ID, 3)
+#define M4U_PORT_L11B_WPE_CQ0 MTK_M4U_ID(SMI_L11B_ID, 4)
+#define M4U_PORT_L11B_WPE_CQ1 MTK_M4U_ID(SMI_L11B_ID, 5)
+#define M4U_PORT_L11B_PIMGI_P1 MTK_M4U_ID(SMI_L11B_ID, 6)
+#define M4U_PORT_L11B_PIMGBI_P1 MTK_M4U_ID(SMI_L11B_ID, 7)
+#define M4U_PORT_L11B_PIMGCI_P1 MTK_M4U_ID(SMI_L11B_ID, 8)
+#define M4U_PORT_L11B_IMGI_T1_C MTK_M4U_ID(SMI_L11B_ID, 9)
+#define M4U_PORT_L11B_IMGBI_T1_C MTK_M4U_ID(SMI_L11B_ID, 10)
+#define M4U_PORT_L11B_IMGCI_T1_C MTK_M4U_ID(SMI_L11B_ID, 11)
+#define M4U_PORT_L11B_SMTI_T1_C MTK_M4U_ID(SMI_L11B_ID, 12)
+#define M4U_PORT_L11B_SMTI_T4_C MTK_M4U_ID(SMI_L11B_ID, 13)
+#define M4U_PORT_L11B_SMTI_T6_C MTK_M4U_ID(SMI_L11B_ID, 14)
+#define M4U_PORT_L11B_YUVO_T1_C MTK_M4U_ID(SMI_L11B_ID, 15)
+#define M4U_PORT_L11B_YUVBO_T1_C MTK_M4U_ID(SMI_L11B_ID, 16)
+#define M4U_PORT_L11B_YUVCO_T1_C MTK_M4U_ID(SMI_L11B_ID, 17)
+#define M4U_PORT_L11B_WPE_WDMA_0 MTK_M4U_ID(SMI_L11B_ID, 18)
+#define M4U_PORT_L11B_WPE_WDMA_4P_0 MTK_M4U_ID(SMI_L11B_ID, 19)
+#define M4U_PORT_L11B_WROT_P1 MTK_M4U_ID(SMI_L11B_ID, 20)
+#define M4U_PORT_L11B_TCCSO_P1 MTK_M4U_ID(SMI_L11B_ID, 21)
+#define M4U_PORT_L11B_TCCSI_P1 MTK_M4U_ID(SMI_L11B_ID, 22)
+#define M4U_PORT_L11B_TIMGO_T1_C MTK_M4U_ID(SMI_L11B_ID, 23)
+#define M4U_PORT_L11B_YUVO_T2_C MTK_M4U_ID(SMI_L11B_ID, 24)
+#define M4U_PORT_L11B_YUVO_T5_C MTK_M4U_ID(SMI_L11B_ID, 25)
+#define M4U_PORT_L11B_SMTO_T1_C MTK_M4U_ID(SMI_L11B_ID, 26)
+#define M4U_PORT_L11B_SMTO_T4_C MTK_M4U_ID(SMI_L11B_ID, 27)
+#define M4U_PORT_L11B_SMTO_T6_C MTK_M4U_ID(SMI_L11B_ID, 28)
+#define M4U_PORT_L11B_DBGO_T1_C MTK_M4U_ID(SMI_L11B_ID, 29)
+
+/* LARB 11C -- IMG-D */
+#define M4U_PORT_L11C_WPE_RDMA_0 MTK_M4U_ID(SMI_L11C_ID, 0)
+#define M4U_PORT_L11C_WPE_RDMA_1 MTK_M4U_ID(SMI_L11C_ID, 1)
+#define M4U_PORT_L11C_WPE_RDMA_4P_0 MTK_M4U_ID(SMI_L11C_ID, 2)
+#define M4U_PORT_L11C_WPE_RDMA_4P_1 MTK_M4U_ID(SMI_L11C_ID, 3)
+#define M4U_PORT_L11C_WPE_CQ0 MTK_M4U_ID(SMI_L11C_ID, 4)
+#define M4U_PORT_L11C_WPE_CQ1 MTK_M4U_ID(SMI_L11C_ID, 5)
+#define M4U_PORT_L11C_PIMGI_P1 MTK_M4U_ID(SMI_L11C_ID, 6)
+#define M4U_PORT_L11C_PIMGBI_P1 MTK_M4U_ID(SMI_L11C_ID, 7)
+#define M4U_PORT_L11C_PIMGCI_P1 MTK_M4U_ID(SMI_L11C_ID, 8)
+#define M4U_PORT_L11C_IMGI_T1_C MTK_M4U_ID(SMI_L11C_ID, 9)
+#define M4U_PORT_L11C_IMGBI_T1_C MTK_M4U_ID(SMI_L11C_ID, 10)
+#define M4U_PORT_L11C_IMGCI_T1_C MTK_M4U_ID(SMI_L11C_ID, 11)
+#define M4U_PORT_L11C_SMTI_T1_C MTK_M4U_ID(SMI_L11C_ID, 12)
+#define M4U_PORT_L11C_SMTI_T4_C MTK_M4U_ID(SMI_L11C_ID, 13)
+#define M4U_PORT_L11C_SMTI_T6_C MTK_M4U_ID(SMI_L11C_ID, 14)
+#define M4U_PORT_L11C_YUVO_T1_C MTK_M4U_ID(SMI_L11C_ID, 15)
+#define M4U_PORT_L11C_YUVBO_T1_C MTK_M4U_ID(SMI_L11C_ID, 16)
+#define M4U_PORT_L11C_YUVCO_T1_C MTK_M4U_ID(SMI_L11C_ID, 17)
+#define M4U_PORT_L11C_WPE_WDMA_0 MTK_M4U_ID(SMI_L11C_ID, 18)
+#define M4U_PORT_L11C_WPE_WDMA_4P_0 MTK_M4U_ID(SMI_L11C_ID, 19)
+#define M4U_PORT_L11C_WROT_P1 MTK_M4U_ID(SMI_L11C_ID, 20)
+#define M4U_PORT_L11C_TCCSO_P1 MTK_M4U_ID(SMI_L11C_ID, 21)
+#define M4U_PORT_L11C_TCCSI_P1 MTK_M4U_ID(SMI_L11C_ID, 22)
+#define M4U_PORT_L11C_TIMGO_T1_C MTK_M4U_ID(SMI_L11C_ID, 23)
+#define M4U_PORT_L11C_YUVO_T2_C MTK_M4U_ID(SMI_L11C_ID, 24)
+#define M4U_PORT_L11C_YUVO_T5_C MTK_M4U_ID(SMI_L11C_ID, 25)
+#define M4U_PORT_L11C_SMTO_T1_C MTK_M4U_ID(SMI_L11C_ID, 26)
+#define M4U_PORT_L11C_SMTO_T4_C MTK_M4U_ID(SMI_L11C_ID, 27)
+#define M4U_PORT_L11C_SMTO_T6_C MTK_M4U_ID(SMI_L11C_ID, 28)
+#define M4U_PORT_L11C_DBGO_T1_C MTK_M4U_ID(SMI_L11C_ID, 29)
+
+/* LARB 12 -- IPE */
+#define M4U_PORT_L12_FDVT_RDA_0 MTK_M4U_ID(SMI_L12_ID, 0)
+#define M4U_PORT_L12_FDVT_RDB_0 MTK_M4U_ID(SMI_L12_ID, 1)
+#define M4U_PORT_L12_FDVT_WRA_0 MTK_M4U_ID(SMI_L12_ID, 2)
+#define M4U_PORT_L12_FDVT_WRB_0 MTK_M4U_ID(SMI_L12_ID, 3)
+#define M4U_PORT_L12_ME_RDMA MTK_M4U_ID(SMI_L12_ID, 4)
+#define M4U_PORT_L12_ME_WDMA MTK_M4U_ID(SMI_L12_ID, 5)
+#define M4U_PORT_L12_DVS_RDMA MTK_M4U_ID(SMI_L12_ID, 6)
+#define M4U_PORT_L12_DVS_WDMA MTK_M4U_ID(SMI_L12_ID, 7)
+#define M4U_PORT_L12_DVP_RDMA MTK_M4U_ID(SMI_L12_ID, 8)
+#define M4U_PORT_L12_DVP_WDMA MTK_M4U_ID(SMI_L12_ID, 9)
+#define M4U_PORT_L12_FDVT_2ND_RDA_0 MTK_M4U_ID(SMI_L12_ID, 10)
+#define M4U_PORT_L12_FDVT_2ND_RDB_0 MTK_M4U_ID(SMI_L12_ID, 11)
+#define M4U_PORT_L12_FDVT_2ND_WRA_0 MTK_M4U_ID(SMI_L12_ID, 12)
+#define M4U_PORT_L12_FDVT_2ND_WRB_0 MTK_M4U_ID(SMI_L12_ID, 13)
+#define M4U_PORT_L12_DHZEI_E1 MTK_M4U_ID(SMI_L12_ID, 14)
+#define M4U_PORT_L12_DHZEO_E1 MTK_M4U_ID(SMI_L12_ID, 15)
+
+/* LARB 13 -- CAM-1 */
+#define M4U_PORT_L13_CAMSV_CQI_E1 MTK_M4U_ID(SMI_L13_ID, 0)
+#define M4U_PORT_L13_CAMSV_CQI_E2 MTK_M4U_ID(SMI_L13_ID, 1)
+#define M4U_PORT_L13_GCAMSV_A_IMGO_1 MTK_M4U_ID(SMI_L13_ID, 2)
+#define M4U_PORT_L13_GCAMSV_C_IMGO_1 MTK_M4U_ID(SMI_L13_ID, 3)
+#define M4U_PORT_L13_GCAMSV_A_IMGO_2 MTK_M4U_ID(SMI_L13_ID, 4)
+#define M4U_PORT_L13_GCAMSV_C_IMGO_2 MTK_M4U_ID(SMI_L13_ID, 5)
+#define M4U_PORT_L13_PDAI_A_0 MTK_M4U_ID(SMI_L13_ID, 6)
+#define M4U_PORT_L13_PDAI_A_1 MTK_M4U_ID(SMI_L13_ID, 7)
+#define M4U_PORT_L13_CAMSV_CQI_B_E1 MTK_M4U_ID(SMI_L13_ID, 8)
+#define M4U_PORT_L13_CAMSV_CQI_B_E2 MTK_M4U_ID(SMI_L13_ID, 9)
+#define M4U_PORT_L13_CAMSV_CQI_C_E1 MTK_M4U_ID(SMI_L13_ID, 10)
+#define M4U_PORT_L13_CAMSV_CQI_C_E2 MTK_M4U_ID(SMI_L13_ID, 11)
+#define M4U_PORT_L13_GCAMSV_E_IMGO_1 MTK_M4U_ID(SMI_L13_ID, 12)
+#define M4U_PORT_L13_GCAMSV_E_IMGO_2 MTK_M4U_ID(SMI_L13_ID, 13)
+#define M4U_PORT_L13_GCAMSV_A_UFEO_1 MTK_M4U_ID(SMI_L13_ID, 14)
+#define M4U_PORT_L13_GCAMSV_C_UFEO_1 MTK_M4U_ID(SMI_L13_ID, 15)
+#define M4U_PORT_L13_GCAMSV_A_UFEO_2 MTK_M4U_ID(SMI_L13_ID, 16)
+#define M4U_PORT_L13_GCAMSV_C_UFEO_2 MTK_M4U_ID(SMI_L13_ID, 17)
+#define M4U_PORT_L13_GCAMSV_E_UFEO_1 MTK_M4U_ID(SMI_L13_ID, 18)
+#define M4U_PORT_L13_GCAMSV_E_UFEO_2 MTK_M4U_ID(SMI_L13_ID, 19)
+#define M4U_PORT_L13_GCAMSV_G_IMGO_1 MTK_M4U_ID(SMI_L13_ID, 20)
+#define M4U_PORT_L13_GCAMSV_G_IMGO_2 MTK_M4U_ID(SMI_L13_ID, 21)
+#define M4U_PORT_L13_PDAO_A MTK_M4U_ID(SMI_L13_ID, 22)
+#define M4U_PORT_L13_PDAO_C MTK_M4U_ID(SMI_L13_ID, 23)
+
+/* LARB 14 -- CAM-1 */
+#define M4U_PORT_L14_GCAMSV_B_IMGO_1 MTK_M4U_ID(SMI_L14_ID, 0)
+#define M4U_PORT_L14_GCAMSV_B_IMGO_2 MTK_M4U_ID(SMI_L14_ID, 1)
+#define M4U_PORT_L14_SCAMSV_A_IMGO_1 MTK_M4U_ID(SMI_L14_ID, 2)
+#define M4U_PORT_L14_SCAMSV_A_IMGO_2 MTK_M4U_ID(SMI_L14_ID, 3)
+#define M4U_PORT_L14_SCAMSV_B_IMGO_1 MTK_M4U_ID(SMI_L14_ID, 4)
+#define M4U_PORT_L14_SCAMSV_B_IMGO_2 MTK_M4U_ID(SMI_L14_ID, 5)
+#define M4U_PORT_L14_PDAI_B_0 MTK_M4U_ID(SMI_L14_ID, 6)
+#define M4U_PORT_L14_PDAI_B_1 MTK_M4U_ID(SMI_L14_ID, 7)
+#define M4U_PORT_L14_GCAMSV_D_IMGO_1 MTK_M4U_ID(SMI_L14_ID, 8)
+#define M4U_PORT_L14_GCAMSV_D_IMGO_2 MTK_M4U_ID(SMI_L14_ID, 9)
+#define M4U_PORT_L14_GCAMSV_F_IMGO_1 MTK_M4U_ID(SMI_L14_ID, 10)
+#define M4U_PORT_L14_GCAMSV_F_IMGO_2 MTK_M4U_ID(SMI_L14_ID, 11)
+#define M4U_PORT_L14_GCAMSV_H_IMGO_1 MTK_M4U_ID(SMI_L14_ID, 12)
+#define M4U_PORT_L14_GCAMSV_H_IMGO_2 MTK_M4U_ID(SMI_L14_ID, 13)
+#define M4U_PORT_L14_GCAMSV_B_UFEO_1 MTK_M4U_ID(SMI_L14_ID, 14)
+#define M4U_PORT_L14_GCAMSV_B_UFEO_2 MTK_M4U_ID(SMI_L14_ID, 15)
+#define M4U_PORT_L14_GCAMSV_D_UFEO_1 MTK_M4U_ID(SMI_L14_ID, 16)
+#define M4U_PORT_L14_GCAMSV_D_UFEO_2 MTK_M4U_ID(SMI_L14_ID, 17)
+#define M4U_PORT_L14_PDAO_B MTK_M4U_ID(SMI_L14_ID, 18)
+#define M4U_PORT_L14_IPUI MTK_M4U_ID(SMI_L14_ID, 19)
+#define M4U_PORT_L14_IPUO MTK_M4U_ID(SMI_L14_ID, 20)
+#define M4U_PORT_L14_IPU3O MTK_M4U_ID(SMI_L14_ID, 21)
+#define M4U_PORT_L14_FAKE MTK_M4U_ID(SMI_L14_ID, 22)
+
+/* LARB 15 -- IMG-D */
+#define M4U_PORT_L15_VIPI_D1 MTK_M4U_ID(SMI_L15_ID, 0)
+#define M4U_PORT_L15_VIPBI_D1 MTK_M4U_ID(SMI_L15_ID, 1)
+#define M4U_PORT_L15_SMTI_D6 MTK_M4U_ID(SMI_L15_ID, 2)
+#define M4U_PORT_L15_TNCSTI_D1 MTK_M4U_ID(SMI_L15_ID, 3)
+#define M4U_PORT_L15_TNCSTI_D4 MTK_M4U_ID(SMI_L15_ID, 4)
+#define M4U_PORT_L15_SMTI_D4 MTK_M4U_ID(SMI_L15_ID, 5)
+#define M4U_PORT_L15_IMG3O_D1 MTK_M4U_ID(SMI_L15_ID, 6)
+#define M4U_PORT_L15_IMG3BO_D1 MTK_M4U_ID(SMI_L15_ID, 7)
+#define M4U_PORT_L15_IMG3CO_D1 MTK_M4U_ID(SMI_L15_ID, 8)
+#define M4U_PORT_L15_IMG2O_D1 MTK_M4U_ID(SMI_L15_ID, 9)
+#define M4U_PORT_L15_SMTI_D9 MTK_M4U_ID(SMI_L15_ID, 10)
+#define M4U_PORT_L15_SMTO_D4 MTK_M4U_ID(SMI_L15_ID, 11)
+#define M4U_PORT_L15_FEO_D1 MTK_M4U_ID(SMI_L15_ID, 12)
+#define M4U_PORT_L15_TNCSO_D1 MTK_M4U_ID(SMI_L15_ID, 13)
+#define M4U_PORT_L15_TNCSTO_D1 MTK_M4U_ID(SMI_L15_ID, 14)
+#define M4U_PORT_L15_SMTO_D6 MTK_M4U_ID(SMI_L15_ID, 15)
+#define M4U_PORT_L15_SMTO_D9 MTK_M4U_ID(SMI_L15_ID, 16)
+#define M4U_PORT_L15_TNCO_D1 MTK_M4U_ID(SMI_L15_ID, 17)
+#define M4U_PORT_L15_TNCO_D1_N MTK_M4U_ID(SMI_L15_ID, 18)
+
+/* LARB 16A -- CAM */
+#define M4U_PORT_L16A_IMGO_R1 MTK_M4U_ID(SMI_L16A_ID, 0)
+#define M4U_PORT_L16A_CQI_R1 MTK_M4U_ID(SMI_L16A_ID, 1)
+#define M4U_PORT_L16A_CQI_R2 MTK_M4U_ID(SMI_L16A_ID, 2)
+#define M4U_PORT_L16A_BPCI_R1 MTK_M4U_ID(SMI_L16A_ID, 3)
+#define M4U_PORT_L16A_LSCI_R1 MTK_M4U_ID(SMI_L16A_ID, 4)
+#define M4U_PORT_L16A_RAWI_R2 MTK_M4U_ID(SMI_L16A_ID, 5)
+#define M4U_PORT_L16A_RAWI_R3 MTK_M4U_ID(SMI_L16A_ID, 6)
+#define M4U_PORT_L16A_UFDI_R2 MTK_M4U_ID(SMI_L16A_ID, 7)
+#define M4U_PORT_L16A_UFDI_R3 MTK_M4U_ID(SMI_L16A_ID, 8)
+#define M4U_PORT_L16A_RAWI_R4 MTK_M4U_ID(SMI_L16A_ID, 9)
+#define M4U_PORT_L16A_RAWI_R5 MTK_M4U_ID(SMI_L16A_ID, 10)
+#define M4U_PORT_L16A_AAI_R1 MTK_M4U_ID(SMI_L16A_ID, 11)
+#define M4U_PORT_L16A_UFDI_R5 MTK_M4U_ID(SMI_L16A_ID, 12)
+#define M4U_PORT_L16A_FHO_R1 MTK_M4U_ID(SMI_L16A_ID, 13)
+#define M4U_PORT_L16A_AAO_R1 MTK_M4U_ID(SMI_L16A_ID, 14)
+#define M4U_PORT_L16A_TSFSO_R1 MTK_M4U_ID(SMI_L16A_ID, 15)
+#define M4U_PORT_L16A_FLKO_R1 MTK_M4U_ID(SMI_L16A_ID, 16)
+
+/* LARB 16B -- CAM */
+#define M4U_PORT_L16B_IMGO_R1 MTK_M4U_ID(SMI_L16B_ID, 0)
+#define M4U_PORT_L16B_CQI_R1 MTK_M4U_ID(SMI_L16B_ID, 1)
+#define M4U_PORT_L16B_CQI_R2 MTK_M4U_ID(SMI_L16B_ID, 2)
+#define M4U_PORT_L16B_BPCI_R1 MTK_M4U_ID(SMI_L16B_ID, 3)
+#define M4U_PORT_L16B_LSCI_R1 MTK_M4U_ID(SMI_L16B_ID, 4)
+#define M4U_PORT_L16B_RAWI_R2 MTK_M4U_ID(SMI_L16B_ID, 5)
+#define M4U_PORT_L16B_RAWI_R3 MTK_M4U_ID(SMI_L16B_ID, 6)
+#define M4U_PORT_L16B_UFDI_R2 MTK_M4U_ID(SMI_L16B_ID, 7)
+#define M4U_PORT_L16B_UFDI_R3 MTK_M4U_ID(SMI_L16B_ID, 8)
+#define M4U_PORT_L16B_RAWI_R4 MTK_M4U_ID(SMI_L16B_ID, 9)
+#define M4U_PORT_L16B_RAWI_R5 MTK_M4U_ID(SMI_L16B_ID, 10)
+#define M4U_PORT_L16B_AAI_R1 MTK_M4U_ID(SMI_L16B_ID, 11)
+#define M4U_PORT_L16B_UFDI_R5 MTK_M4U_ID(SMI_L16B_ID, 12)
+#define M4U_PORT_L16B_FHO_R1 MTK_M4U_ID(SMI_L16B_ID, 13)
+#define M4U_PORT_L16B_AAO_R1 MTK_M4U_ID(SMI_L16B_ID, 14)
+#define M4U_PORT_L16B_TSFSO_R1 MTK_M4U_ID(SMI_L16B_ID, 15)
+#define M4U_PORT_L16B_FLKO_R1 MTK_M4U_ID(SMI_L16B_ID, 16)
+
+/* LARB 17A -- CAM */
+#define M4U_PORT_L17A_YUVO_R1 MTK_M4U_ID(SMI_L17A_ID, 0)
+#define M4U_PORT_L17A_YUVO_R3 MTK_M4U_ID(SMI_L17A_ID, 1)
+#define M4U_PORT_L17A_YUVCO_R1 MTK_M4U_ID(SMI_L17A_ID, 2)
+#define M4U_PORT_L17A_YUVO_R2 MTK_M4U_ID(SMI_L17A_ID, 3)
+#define M4U_PORT_L17A_RZH1N2TO_R1 MTK_M4U_ID(SMI_L17A_ID, 4)
+#define M4U_PORT_L17A_DRZS4NO_R1 MTK_M4U_ID(SMI_L17A_ID, 5)
+#define M4U_PORT_L17A_TNCSO_R1 MTK_M4U_ID(SMI_L17A_ID, 6)
+
+/* LARB 17B -- CAM */
+#define M4U_PORT_L17B_YUVO_R1 MTK_M4U_ID(SMI_L17B_ID, 0)
+#define M4U_PORT_L17B_YUVO_R3 MTK_M4U_ID(SMI_L17B_ID, 1)
+#define M4U_PORT_L17B_YUVCO_R1 MTK_M4U_ID(SMI_L17B_ID, 2)
+#define M4U_PORT_L17B_YUVO_R2 MTK_M4U_ID(SMI_L17B_ID, 3)
+#define M4U_PORT_L17B_RZH1N2TO_R1 MTK_M4U_ID(SMI_L17B_ID, 4)
+#define M4U_PORT_L17B_DRZS4NO_R1 MTK_M4U_ID(SMI_L17B_ID, 5)
+#define M4U_PORT_L17B_TNCSO_R1 MTK_M4U_ID(SMI_L17B_ID, 6)
+
+/* LARB 19 -- VENC */
+#define M4U_PORT_L19_VENC_RCPU MTK_M4U_ID(SMI_L19_ID, 0)
+#define M4U_PORT_L19_VENC_REC MTK_M4U_ID(SMI_L19_ID, 1)
+#define M4U_PORT_L19_VENC_BSDMA MTK_M4U_ID(SMI_L19_ID, 2)
+#define M4U_PORT_L19_VENC_SV_COMV MTK_M4U_ID(SMI_L19_ID, 3)
+#define M4U_PORT_L19_VENC_RD_COMV MTK_M4U_ID(SMI_L19_ID, 4)
+#define M4U_PORT_L19_VENC_NBM_RDMA MTK_M4U_ID(SMI_L19_ID, 5)
+#define M4U_PORT_L19_VENC_NBM_RDMA_LITE MTK_M4U_ID(SMI_L19_ID, 6)
+#define M4U_PORT_L19_JPGENC_Y_RDMA MTK_M4U_ID(SMI_L19_ID, 7)
+#define M4U_PORT_L19_JPGENC_C_RDMA MTK_M4U_ID(SMI_L19_ID, 8)
+#define M4U_PORT_L19_JPGENC_Q_TABLE MTK_M4U_ID(SMI_L19_ID, 9)
+#define M4U_PORT_L19_VENC_SUB_W_LUMA MTK_M4U_ID(SMI_L19_ID, 10)
+#define M4U_PORT_L19_VENC_FCS_NBM_RDMA MTK_M4U_ID(SMI_L19_ID, 11)
+#define M4U_PORT_L19_JPGENC_BSDMA MTK_M4U_ID(SMI_L19_ID, 12)
+#define M4U_PORT_L19_JPGDEC_WDMA_0 MTK_M4U_ID(SMI_L19_ID, 13)
+#define M4U_PORT_L19_JPGDEC_BSDMA_0 MTK_M4U_ID(SMI_L19_ID, 14)
+#define M4U_PORT_L19_VENC_NBM_WDMA MTK_M4U_ID(SMI_L19_ID, 15)
+#define M4U_PORT_L19_VENC_NBM_WDMA_LITE MTK_M4U_ID(SMI_L19_ID, 16)
+#define M4U_PORT_L19_VENC_FCS_NBM_WDMA MTK_M4U_ID(SMI_L19_ID, 17)
+#define M4U_PORT_L19_JPGDEC_WDMA_1 MTK_M4U_ID(SMI_L19_ID, 18)
+#define M4U_PORT_L19_JPGDEC_BSDMA_1 MTK_M4U_ID(SMI_L19_ID, 19)
+#define M4U_PORT_L19_JPGDEC_HUFF_OFFSET_1 MTK_M4U_ID(SMI_L19_ID, 20)
+#define M4U_PORT_L19_JPGDEC_HUFF_OFFSET_0 MTK_M4U_ID(SMI_L19_ID, 21)
+#define M4U_PORT_L19_VENC_CUR_LUMA MTK_M4U_ID(SMI_L19_ID, 22)
+#define M4U_PORT_L19_VENC_CUR_CHROMA MTK_M4U_ID(SMI_L19_ID, 23)
+#define M4U_PORT_L19_VENC_REF_LUMA MTK_M4U_ID(SMI_L19_ID, 24)
+#define M4U_PORT_L19_VENC_REF_CHROMA MTK_M4U_ID(SMI_L19_ID, 25)
+#define M4U_PORT_L19_VENC_SUB_R_LUMA MTK_M4U_ID(SMI_L19_ID, 26)
+
+/* LARB 21 -- VDEC-CORE0 */
+#define M4U_PORT_L21_HW_VDEC_MC_EXT MTK_M4U_ID(SMI_L21_ID, 0)
+#define M4U_PORT_L21_HW_VDEC_UFO_EXT MTK_M4U_ID(SMI_L21_ID, 1)
+#define M4U_PORT_L21_HW_VDEC_PP_EXT MTK_M4U_ID(SMI_L21_ID, 2)
+#define M4U_PORT_L21_HW_VDEC_PRED_RD_EXT MTK_M4U_ID(SMI_L21_ID, 3)
+#define M4U_PORT_L21_HW_VDEC_PRED_WR_EXT MTK_M4U_ID(SMI_L21_ID, 4)
+#define M4U_PORT_L21_HW_VDEC_PPWRAP_EXT MTK_M4U_ID(SMI_L21_ID, 5)
+#define M4U_PORT_L21_HW_VDEC_TILE_EXT MTK_M4U_ID(SMI_L21_ID, 6)
+#define M4U_PORT_L21_HW_VDEC_VLD_EXT MTK_M4U_ID(SMI_L21_ID, 7)
+#define M4U_PORT_L21_HW_VDEC_VLD2_EXT MTK_M4U_ID(SMI_L21_ID, 8)
+#define M4U_PORT_L21_HW_VDEC_AVC_MV_EXT MTK_M4U_ID(SMI_L21_ID, 9)
+#define M4U_PORT_L21_HW_VDEC_UFO_EXT_C MTK_M4U_ID(SMI_L21_ID, 10)
+
+/* LARB 23 -- VDEC-SOC */
+#define M4U_PORT_L23_HW_VDEC_LAT0_VLD_EXT MTK_M4U_ID(SMI_L23_ID, 0)
+#define M4U_PORT_L23_HW_VDEC_LAT0_VLD2_EXT MTK_M4U_ID(SMI_L23_ID, 1)
+#define M4U_PORT_L23_HW_VDEC_LAT0_AVC_MV_EXT MTK_M4U_ID(SMI_L23_ID, 2)
+#define M4U_PORT_L23_HW_VDEC_LAT0_PRED_RD_EXT MTK_M4U_ID(SMI_L23_ID, 3)
+#define M4U_PORT_L23_HW_VDEC_LAT0_TILE_EXT MTK_M4U_ID(SMI_L23_ID, 4)
+#define M4U_PORT_L23_HW_VDEC_LAT0_WDMA_EXT MTK_M4U_ID(SMI_L23_ID, 5)
+#define M4U_PORT_L23_HW_VDEC_UFO_ENC_EXT MTK_M4U_ID(SMI_L23_ID, 6)
+#define M4U_PORT_L23_HW_VDEC_UFO_ENC_EXT_C MTK_M4U_ID(SMI_L23_ID, 7)
+#define M4U_PORT_L23_HW_VDEC_MC_EXT_C MTK_M4U_ID(SMI_L23_ID, 8)
+
+/* LARB 27 -- CCU */
+#define M4U_PORT_L27_CCUI MTK_M4U_ID(SMI_L27_ID, 0)
+#define M4U_PORT_L27_CCUO MTK_M4U_ID(SMI_L27_ID, 1)
+#define M4U_PORT_L27_CCUI2 MTK_M4U_ID(SMI_L27_ID, 2)
+#define M4U_PORT_L27_CCUO2 MTK_M4U_ID(SMI_L27_ID, 3)
+
+/* LARB 28 -- AXI-CCU */
+#define M4U_PORT_L28_CCU_AXI_0 MTK_M4U_ID(SMI_L28_ID, 0)
+
+/* infra/peri */
+#define IFR_IOMMU_PORT_PCIE_0 MTK_IFAIOMMU_PERI_ID(0)
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/mux/ti-serdes.h b/sys/contrib/device-tree/include/dt-bindings/mux/ti-serdes.h
index 669ca2d6abce..b0b1091aad6d 100644
--- a/sys/contrib/device-tree/include/dt-bindings/mux/ti-serdes.h
+++ b/sys/contrib/device-tree/include/dt-bindings/mux/ti-serdes.h
@@ -6,6 +6,14 @@
#ifndef _DT_BINDINGS_MUX_TI_SERDES
#define _DT_BINDINGS_MUX_TI_SERDES
+/*
+ * These bindings are deprecated, because they do not match the actual
+ * concept of bindings but rather contain pure constants values used only
+ * in DTS board files.
+ * Instead include the header in the DTS source directory.
+ */
+#warning "These bindings are deprecated. Instead, use the header in the DTS source directory."
+
/* J721E */
#define J721E_SERDES0_LANE0_QSGMII_LANE1 0x0
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/amlogic,c3-pwrc.h b/sys/contrib/device-tree/include/dt-bindings/power/amlogic,c3-pwrc.h
new file mode 100644
index 000000000000..1d98a25b08a4
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/power/amlogic,c3-pwrc.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/*
+ * Copyright (c) 2023 Amlogic, Inc.
+ * Author: hongyu chen1 <hongyu.chen1@amlogic.com>
+ */
+#ifndef _DT_BINDINGS_AMLOGIC_C3_POWER_H
+#define _DT_BINDINGS_AMLOGIC_C3_POWER_H
+
+#define PWRC_C3_NNA_ID 0
+#define PWRC_C3_AUDIO_ID 1
+#define PWRC_C3_RESV_SEC_ID 2
+#define PWRC_C3_SDIOA_ID 3
+#define PWRC_C3_EMMC_ID 4
+#define PWRC_C3_USB_COMB_ID 5
+#define PWRC_C3_SDCARD_ID 6
+#define PWRC_C3_ETH_ID 7
+#define PWRC_C3_RESV0_ID 8
+#define PWRC_C3_GE2D_ID 9
+#define PWRC_C3_CVE_ID 10
+#define PWRC_C3_GDC_WRAP_ID 11
+#define PWRC_C3_ISP_TOP_ID 12
+#define PWRC_C3_MIPI_ISP_WRAP_ID 13
+#define PWRC_C3_VCODEC_ID 14
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/amlogic,t7-pwrc.h b/sys/contrib/device-tree/include/dt-bindings/power/amlogic,t7-pwrc.h
new file mode 100644
index 000000000000..1f1f2739cc26
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/power/amlogic,t7-pwrc.h
@@ -0,0 +1,63 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2023 Amlogic, Inc.
+ * Author: Hongyu Chen <hongyu.chen1@amlogic.com>
+ */
+#ifndef _DT_BINDINGS_AMLOGIC_T7_POWER_H
+#define _DT_BINDINGS_AMLOGIC_T7_POWER_H
+
+#define PWRC_T7_DSPA_ID 0
+#define PWRC_T7_DSPB_ID 1
+#define PWRC_T7_DOS_HCODEC_ID 2
+#define PWRC_T7_DOS_HEVC_ID 3
+#define PWRC_T7_DOS_VDEC_ID 4
+#define PWRC_T7_DOS_WAVE_ID 5
+#define PWRC_T7_VPU_HDMI_ID 6
+#define PWRC_T7_USB_COMB_ID 7
+#define PWRC_T7_PCIE_ID 8
+#define PWRC_T7_GE2D_ID 9
+#define PWRC_T7_SRAMA_ID 10
+#define PWRC_T7_SRAMB_ID 11
+#define PWRC_T7_HDMIRX_ID 12
+#define PWRC_T7_VI_CLK1_ID 13
+#define PWRC_T7_VI_CLK2_ID 14
+#define PWRC_T7_ETH_ID 15
+#define PWRC_T7_ISP_ID 16
+#define PWRC_T7_MIPI_ISP_ID 17
+#define PWRC_T7_GDC_ID 18
+#define PWRC_T7_CVE_ID 18
+#define PWRC_T7_DEWARP_ID 19
+#define PWRC_T7_SDIO_A_ID 20
+#define PWRC_T7_SDIO_B_ID 21
+#define PWRC_T7_EMMC_ID 22
+#define PWRC_T7_MALI_SC0_ID 23
+#define PWRC_T7_MALI_SC1_ID 24
+#define PWRC_T7_MALI_SC2_ID 25
+#define PWRC_T7_MALI_SC3_ID 26
+#define PWRC_T7_MALI_TOP_ID 27
+#define PWRC_T7_NNA_CORE0_ID 28
+#define PWRC_T7_NNA_CORE1_ID 29
+#define PWRC_T7_NNA_CORE2_ID 30
+#define PWRC_T7_NNA_CORE3_ID 31
+#define PWRC_T7_NNA_TOP_ID 32
+#define PWRC_T7_DDR0_ID 33
+#define PWRC_T7_DDR1_ID 34
+#define PWRC_T7_DMC0_ID 35
+#define PWRC_T7_DMC1_ID 36
+#define PWRC_T7_NOC_ID 37
+#define PWRC_T7_NIC2_ID 38
+#define PWRC_T7_NIC3_ID 39
+#define PWRC_T7_CCI_ID 40
+#define PWRC_T7_MIPI_DSI0_ID 41
+#define PWRC_T7_SPICC0_ID 42
+#define PWRC_T7_SPICC1_ID 43
+#define PWRC_T7_SPICC2_ID 44
+#define PWRC_T7_SPICC3_ID 45
+#define PWRC_T7_SPICC4_ID 46
+#define PWRC_T7_SPICC5_ID 47
+#define PWRC_T7_EDP0_ID 48
+#define PWRC_T7_EDP1_ID 49
+#define PWRC_T7_MIPI_DSI1_ID 50
+#define PWRC_T7_AUDIO_ID 51
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/mediatek,mt8365-power.h b/sys/contrib/device-tree/include/dt-bindings/power/mediatek,mt8365-power.h
new file mode 100644
index 000000000000..e6cfd0ec7871
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/power/mediatek,mt8365-power.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (c) 2022 MediaTek Inc.
+ */
+
+#ifndef _DT_BINDINGS_POWER_MT8365_POWER_H
+#define _DT_BINDINGS_POWER_MT8365_POWER_H
+
+#define MT8365_POWER_DOMAIN_MM 0
+#define MT8365_POWER_DOMAIN_CONN 1
+#define MT8365_POWER_DOMAIN_MFG 2
+#define MT8365_POWER_DOMAIN_AUDIO 3
+#define MT8365_POWER_DOMAIN_CAM 4
+#define MT8365_POWER_DOMAIN_DSP 5
+#define MT8365_POWER_DOMAIN_VDEC 6
+#define MT8365_POWER_DOMAIN_VENC 7
+#define MT8365_POWER_DOMAIN_APU 8
+
+#endif /* _DT_BINDINGS_POWER_MT8365_POWER_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson-a1-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson-a1-power.h
index 6cf50bfb8ccf..724c370d6853 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson-a1-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson-a1-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Amlogic, Inc.
* Author: Jianxin Pan <jianxin.pan@amlogic.com>
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson-axg-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson-axg-power.h
index e5243884b249..ace0e468ce21 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson-axg-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson-axg-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2020 BayLibre, SAS
* Author: Neil Armstrong <narmstrong@baylibre.com>
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson-g12a-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson-g12a-power.h
index 93b03bdd60b7..01fd0ac4dd08 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson-g12a-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson-g12a-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 BayLibre, SAS
* Author: Neil Armstrong <narmstrong@baylibre.com>
@@ -10,5 +10,6 @@
#define PWRC_G12A_VPU_ID 0
#define PWRC_G12A_ETH_ID 1
#define PWRC_G12A_NNA_ID 2
+#define PWRC_G12A_ISP_ID 3
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson-gxbb-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson-gxbb-power.h
index 1262dac696c0..8d0b32b6c02c 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson-gxbb-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson-gxbb-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 BayLibre, SAS
* Author: Neil Armstrong <narmstrong@baylibre.com>
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson-s4-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson-s4-power.h
index 462dd2cb938b..f210a524a592 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson-s4-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson-s4-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2021 Amlogic, Inc.
* Author: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson-sm1-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson-sm1-power.h
index a020ab00c134..d78e710dbfff 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson-sm1-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson-sm1-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 BayLibre, SAS
* Author: Neil Armstrong <narmstrong@baylibre.com>
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/meson8-power.h b/sys/contrib/device-tree/include/dt-bindings/power/meson8-power.h
index dd8b2ddb82a7..7a55ba2cd22e 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/meson8-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/meson8-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/qcom,rpmhpd.h b/sys/contrib/device-tree/include/dt-bindings/power/qcom,rpmhpd.h
new file mode 100644
index 000000000000..e54ffa361451
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/power/qcom,rpmhpd.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_POWER_QCOM_RPMHPD_H
+#define _DT_BINDINGS_POWER_QCOM_RPMHPD_H
+
+/* Generic RPMH Power Domain Indexes */
+#define RPMHPD_CX 0
+#define RPMHPD_CX_AO 1
+#define RPMHPD_EBI 2
+#define RPMHPD_GFX 3
+#define RPMHPD_LCX 4
+#define RPMHPD_LMX 5
+#define RPMHPD_MMCX 6
+#define RPMHPD_MMCX_AO 7
+#define RPMHPD_MX 8
+#define RPMHPD_MX_AO 9
+#define RPMHPD_MXC 10
+#define RPMHPD_MXC_AO 11
+#define RPMHPD_MSS 12
+#define RPMHPD_NSP 13
+#define RPMHPD_NSP0 14
+#define RPMHPD_NSP1 15
+#define RPMHPD_QPHY 16
+#define RPMHPD_DDR 17
+#define RPMHPD_XO 18
+#define RPMHPD_NSP2 19
+#define RPMHPD_GMXC 20
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/qcom-rpmpd.h b/sys/contrib/device-tree/include/dt-bindings/power/qcom-rpmpd.h
index 83be996cb5eb..7f4e2983a4c5 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/qcom-rpmpd.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/qcom-rpmpd.h
@@ -278,6 +278,27 @@
#define MSM8909_VDDMX MSM8916_VDDMX
#define MSM8909_VDDMX_AO MSM8916_VDDMX_AO
+/* MSM8917 Power Domain Indexes */
+#define MSM8917_VDDCX 0
+#define MSM8917_VDDCX_AO 1
+#define MSM8917_VDDCX_VFL 2
+#define MSM8917_VDDMX 3
+#define MSM8917_VDDMX_AO 4
+
+/* MSM8937 Power Domain Indexes */
+#define MSM8937_VDDCX MSM8917_VDDCX
+#define MSM8937_VDDCX_AO MSM8917_VDDCX_AO
+#define MSM8937_VDDCX_VFL MSM8917_VDDCX_VFL
+#define MSM8937_VDDMX MSM8917_VDDMX
+#define MSM8937_VDDMX_AO MSM8917_VDDMX_AO
+
+/* QM215 Power Domain Indexes */
+#define QM215_VDDCX MSM8917_VDDCX
+#define QM215_VDDCX_AO MSM8917_VDDCX_AO
+#define QM215_VDDCX_VFL MSM8917_VDDCX_VFL
+#define QM215_VDDMX MSM8917_VDDMX
+#define QM215_VDDMX_AO MSM8917_VDDMX_AO
+
/* MSM8953 Power Domain Indexes */
#define MSM8953_VDDMD 0
#define MSM8953_VDDMD_AO 1
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/r8a779f0-sysc.h b/sys/contrib/device-tree/include/dt-bindings/power/r8a779f0-sysc.h
index 0ec8ad727ed9..cde1536e9ed0 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/r8a779f0-sysc.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/r8a779f0-sysc.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
/*
* Copyright (C) 2021 Renesas Electronics Corp.
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/rk3588-power.h b/sys/contrib/device-tree/include/dt-bindings/power/rk3588-power.h
index 1b92fec013cb..6b91a50cc6d6 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/rk3588-power.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/rk3588-power.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
#ifndef __DT_BINDINGS_POWER_RK3588_POWER_H__
#define __DT_BINDINGS_POWER_RK3588_POWER_H__
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/starfive,jh7110-pmu.h b/sys/contrib/device-tree/include/dt-bindings/power/starfive,jh7110-pmu.h
index 132bfe401fc8..7b4f24927dee 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/starfive,jh7110-pmu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/starfive,jh7110-pmu.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/*
- * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022-2023 StarFive Technology Co., Ltd.
* Author: Walker Chen <walker.chen@starfivetech.com>
*/
#ifndef __DT_BINDINGS_POWER_JH7110_POWER_H__
@@ -14,4 +14,8 @@
#define JH7110_PD_ISP 5
#define JH7110_PD_VENC 6
+/* AON Power Domain */
+#define JH7110_AON_PD_DPHY_TX 0
+#define JH7110_AON_PD_DPHY_RX 1
+
#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/power/summit,smb347-charger.h b/sys/contrib/device-tree/include/dt-bindings/power/summit,smb347-charger.h
index 3205699b5e41..14f2f9cf2020 100644
--- a/sys/contrib/device-tree/include/dt-bindings/power/summit,smb347-charger.h
+++ b/sys/contrib/device-tree/include/dt-bindings/power/summit,smb347-charger.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0-or-later or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) */
/*
* Author: David Heidelberg <david@ixit.cz>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/regulator/st,stm32mp13-regulator.h b/sys/contrib/device-tree/include/dt-bindings/regulator/st,stm32mp13-regulator.h
new file mode 100644
index 000000000000..b3a974dfc585
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/regulator/st,stm32mp13-regulator.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2022, STMicroelectronics - All Rights Reserved
+ */
+
+#ifndef __DT_BINDINGS_REGULATOR_ST_STM32MP13_REGULATOR_H
+#define __DT_BINDINGS_REGULATOR_ST_STM32MP13_REGULATOR_H
+
+/* SCMI voltage domains identifiers */
+
+/* SOC Internal regulators */
+#define VOLTD_SCMI_REG11 0
+#define VOLTD_SCMI_REG18 1
+#define VOLTD_SCMI_USB33 2
+#define VOLTD_SCMI_SDMMC1_IO 3
+#define VOLTD_SCMI_SDMMC2_IO 4
+#define VOLTD_SCMI_VREFBUF 5
+
+/* STPMIC1 regulators */
+#define VOLTD_SCMI_STPMIC1_BUCK1 6
+#define VOLTD_SCMI_STPMIC1_BUCK2 7
+#define VOLTD_SCMI_STPMIC1_BUCK3 8
+#define VOLTD_SCMI_STPMIC1_BUCK4 9
+#define VOLTD_SCMI_STPMIC1_LDO1 10
+#define VOLTD_SCMI_STPMIC1_LDO2 11
+#define VOLTD_SCMI_STPMIC1_LDO3 12
+#define VOLTD_SCMI_STPMIC1_LDO4 13
+#define VOLTD_SCMI_STPMIC1_LDO5 14
+#define VOLTD_SCMI_STPMIC1_LDO6 15
+#define VOLTD_SCMI_STPMIC1_VREFDDR 16
+#define VOLTD_SCMI_STPMIC1_BOOST 17
+#define VOLTD_SCMI_STPMIC1_PWR_SW1 18
+#define VOLTD_SCMI_STPMIC1_PWR_SW2 19
+
+/* External regulators */
+#define VOLTD_SCMI_REGU0 20
+#define VOLTD_SCMI_REGU1 21
+#define VOLTD_SCMI_REGU2 22
+#define VOLTD_SCMI_REGU3 23
+#define VOLTD_SCMI_REGU4 24
+
+#endif /*__DT_BINDINGS_REGULATOR_ST_STM32MP13_REGULATOR_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/altr,rst-mgr-s10.h b/sys/contrib/device-tree/include/dt-bindings/reset/altr,rst-mgr-s10.h
index 70ea3a09dbe1..04c4d0c6fd34 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/altr,rst-mgr-s10.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/altr,rst-mgr-s10.h
@@ -63,12 +63,15 @@
#define I2C2_RESET 74
#define I2C3_RESET 75
#define I2C4_RESET 76
-/* 77-79 is empty */
+#define I3C0_RESET 77
+#define I3C1_RESET 78
+/* 79 is empty */
#define UART0_RESET 80
#define UART1_RESET 81
/* 82-87 is empty */
#define GPIO0_RESET 88
#define GPIO1_RESET 89
+#define WATCHDOG4_RESET 90
/* BRGMODRST */
#define SOC2FPGA_RESET 96
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/amlogic,c3-reset.h b/sys/contrib/device-tree/include/dt-bindings/reset/amlogic,c3-reset.h
new file mode 100644
index 000000000000..d9127863f603
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/amlogic,c3-reset.h
@@ -0,0 +1,119 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_AMLOGIC_C3_RESET_H
+#define _DT_BINDINGS_AMLOGIC_C3_RESET_H
+
+/* RESET0 */
+/* 0-3 */
+#define RESET_USBCTRL 4
+/* 5-7 */
+#define RESET_USBPHY20 8
+/* 9 */
+#define RESET_USB2DRD 10
+#define RESET_MIPI_DSI_HOST 11
+#define RESET_MIPI_DSI_PHY 12
+/* 13-20 */
+#define RESET_GE2D 21
+#define RESET_DWAP 22
+/* 23-31 */
+
+/* RESET1 */
+#define RESET_AUDIO 32
+/* 33-34 */
+#define RESET_DDRAPB 35
+#define RESET_DDR 36
+#define RESET_DOS_CAPB3 37
+#define RESET_DOS 38
+/* 39-46 */
+#define RESET_NNA 47
+#define RESET_ETHERNET 48
+#define RESET_ISP 49
+#define RESET_VC9000E_APB 50
+#define RESET_VC9000E_A 51
+/* 52 */
+#define RESET_VC9000E_CORE 53
+/* 54-63 */
+
+/* RESET2 */
+#define RESET_ABUS_ARB 64
+#define RESET_IRCTRL 65
+/* 66 */
+#define RESET_TEMP_PII 67
+/* 68-72 */
+#define RESET_SPICC_0 73
+#define RESET_SPICC_1 74
+#define RESET_RSA 75
+
+/* 76-79 */
+#define RESET_MSR_CLK 80
+#define RESET_SPIFC 81
+#define RESET_SAR_ADC 82
+/* 83-87 */
+#define RESET_ACODEC 88
+/* 89-90 */
+#define RESET_WATCHDOG 91
+/* 92-95 */
+
+/* RESET3 */
+#define RESET_ISP_NIC_GPV 96
+#define RESET_ISP_NIC_MAIN 97
+#define RESET_ISP_NIC_VCLK 98
+#define RESET_ISP_NIC_VOUT 99
+#define RESET_ISP_NIC_ALL 100
+#define RESET_VOUT 101
+#define RESET_VOUT_VENC 102
+/* 103 */
+#define RESET_CVE_NIC_GPV 104
+#define RESET_CVE_NIC_MAIN 105
+#define RESET_CVE_NIC_GE2D 106
+#define RESET_CVE_NIC_DW 106
+#define RESET_CVE_NIC_CVE 108
+#define RESET_CVE_NIC_ALL 109
+#define RESET_CVE 110
+/* 112-127 */
+
+/* RESET4 */
+#define RESET_RTC 128
+#define RESET_PWM_AB 129
+#define RESET_PWM_CD 130
+#define RESET_PWM_EF 131
+#define RESET_PWM_GH 132
+#define RESET_PWM_IJ 133
+#define RESET_PWM_KL 134
+#define RESET_PWM_MN 135
+/* 136-137 */
+#define RESET_UART_A 138
+#define RESET_UART_B 139
+#define RESET_UART_C 140
+#define RESET_UART_D 141
+#define RESET_UART_E 142
+#define RESET_UART_F 143
+#define RESET_I2C_S_A 144
+#define RESET_I2C_M_A 145
+#define RESET_I2C_M_B 146
+#define RESET_I2C_M_C 147
+#define RESET_I2C_M_D 148
+/* 149-151 */
+#define RESET_SD_EMMC_A 152
+#define RESET_SD_EMMC_B 153
+#define RESET_SD_EMMC_C 154
+
+/* RESET5 */
+/* 160-172 */
+#define RESET_BRG_NIC_NNA 173
+#define RESET_BRG_MUX_NIC_MAIN 174
+#define RESET_BRG_AO_NIC_ALL 175
+/* 176-183 */
+#define RESET_BRG_NIC_VAPB 184
+#define RESET_BRG_NIC_SDIO_B 185
+#define RESET_BRG_NIC_SDIO_A 186
+#define RESET_BRG_NIC_EMMC 187
+#define RESET_BRG_NIC_DSU 188
+#define RESET_BRG_NIC_SYSCLK 189
+#define RESET_BRG_NIC_MAIN 190
+#define RESET_BRG_NIC_ALL 191
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/mediatek,mt7988-resets.h b/sys/contrib/device-tree/include/dt-bindings/reset/mediatek,mt7988-resets.h
new file mode 100644
index 000000000000..493301971367
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/mediatek,mt7988-resets.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023 Daniel Golle <daniel@makrotopia.org>
+ * Author: Daniel Golle <daniel@makrotopia.org>
+ */
+
+#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT7988
+#define _DT_BINDINGS_RESET_CONTROLLER_MT7988
+
+/* ETHWARP resets */
+#define MT7988_ETHWARP_RST_SWITCH 0
+
+#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7988 */
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/mt8188-resets.h b/sys/contrib/device-tree/include/dt-bindings/reset/mt8188-resets.h
index ba9a5e9b8899..5a58c54e7d20 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/mt8188-resets.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/mt8188-resets.h
@@ -38,4 +38,79 @@
#define MT8188_INFRA_RST1_THERMAL_CTRL_RST 1
#define MT8188_INFRA_RST3_PTP_CTRL_RST 2
+#define MT8188_VDO0_RST_DISP_OVL0 0
+#define MT8188_VDO0_RST_FAKE_ENG0 1
+#define MT8188_VDO0_RST_DISP_CCORR0 2
+#define MT8188_VDO0_RST_DISP_MUTEX0 3
+#define MT8188_VDO0_RST_DISP_GAMMA0 4
+#define MT8188_VDO0_RST_DISP_DITHER0 5
+#define MT8188_VDO0_RST_DISP_WDMA0 6
+#define MT8188_VDO0_RST_DISP_RDMA0 7
+#define MT8188_VDO0_RST_DSI0 8
+#define MT8188_VDO0_RST_DSI1 9
+#define MT8188_VDO0_RST_DSC_WRAP0 10
+#define MT8188_VDO0_RST_VPP_MERGE0 11
+#define MT8188_VDO0_RST_DP_INTF0 12
+#define MT8188_VDO0_RST_DISP_AAL0 13
+#define MT8188_VDO0_RST_INLINEROT0 14
+#define MT8188_VDO0_RST_APB_BUS 15
+#define MT8188_VDO0_RST_DISP_COLOR0 16
+#define MT8188_VDO0_RST_MDP_WROT0 17
+#define MT8188_VDO0_RST_DISP_RSZ0 18
+
+#define MT8188_VDO1_RST_SMI_LARB2 0
+#define MT8188_VDO1_RST_SMI_LARB3 1
+#define MT8188_VDO1_RST_GALS 2
+#define MT8188_VDO1_RST_FAKE_ENG0 3
+#define MT8188_VDO1_RST_FAKE_ENG1 4
+#define MT8188_VDO1_RST_MDP_RDMA0 5
+#define MT8188_VDO1_RST_MDP_RDMA1 6
+#define MT8188_VDO1_RST_MDP_RDMA2 7
+#define MT8188_VDO1_RST_MDP_RDMA3 8
+#define MT8188_VDO1_RST_VPP_MERGE0 9
+#define MT8188_VDO1_RST_VPP_MERGE1 10
+#define MT8188_VDO1_RST_VPP_MERGE2 11
+#define MT8188_VDO1_RST_VPP_MERGE3 12
+#define MT8188_VDO1_RST_VPP_MERGE4 13
+#define MT8188_VDO1_RST_VPP2_TO_VDO1_DL_ASYNC 14
+#define MT8188_VDO1_RST_VPP3_TO_VDO1_DL_ASYNC 15
+#define MT8188_VDO1_RST_DISP_MUTEX 16
+#define MT8188_VDO1_RST_MDP_RDMA4 17
+#define MT8188_VDO1_RST_MDP_RDMA5 18
+#define MT8188_VDO1_RST_MDP_RDMA6 19
+#define MT8188_VDO1_RST_MDP_RDMA7 20
+#define MT8188_VDO1_RST_DP_INTF1_MMCK 21
+#define MT8188_VDO1_RST_DPI0_MM_CK 22
+#define MT8188_VDO1_RST_DPI1_MM_CK 23
+#define MT8188_VDO1_RST_MERGE0_DL_ASYNC 24
+#define MT8188_VDO1_RST_MERGE1_DL_ASYNC 25
+#define MT8188_VDO1_RST_MERGE2_DL_ASYNC 26
+#define MT8188_VDO1_RST_MERGE3_DL_ASYNC 27
+#define MT8188_VDO1_RST_MERGE4_DL_ASYNC 28
+#define MT8188_VDO1_RST_VDO0_DSC_TO_VDO1_DL_ASYNC 29
+#define MT8188_VDO1_RST_VDO0_MERGE_TO_VDO1_DL_ASYNC 30
+#define MT8188_VDO1_RST_PADDING0 31
+#define MT8188_VDO1_RST_PADDING1 32
+#define MT8188_VDO1_RST_PADDING2 33
+#define MT8188_VDO1_RST_PADDING3 34
+#define MT8188_VDO1_RST_PADDING4 35
+#define MT8188_VDO1_RST_PADDING5 36
+#define MT8188_VDO1_RST_PADDING6 37
+#define MT8188_VDO1_RST_PADDING7 38
+#define MT8188_VDO1_RST_DISP_RSZ0 39
+#define MT8188_VDO1_RST_DISP_RSZ1 40
+#define MT8188_VDO1_RST_DISP_RSZ2 41
+#define MT8188_VDO1_RST_DISP_RSZ3 42
+#define MT8188_VDO1_RST_HDR_VDO_FE0 43
+#define MT8188_VDO1_RST_HDR_GFX_FE0 44
+#define MT8188_VDO1_RST_HDR_VDO_BE 45
+#define MT8188_VDO1_RST_HDR_VDO_FE1 46
+#define MT8188_VDO1_RST_HDR_GFX_FE1 47
+#define MT8188_VDO1_RST_DISP_MIXER 48
+#define MT8188_VDO1_RST_HDR_VDO_FE0_DL_ASYNC 49
+#define MT8188_VDO1_RST_HDR_VDO_FE1_DL_ASYNC 50
+#define MT8188_VDO1_RST_HDR_GFX_FE0_DL_ASYNC 51
+#define MT8188_VDO1_RST_HDR_GFX_FE1_DL_ASYNC 52
+#define MT8188_VDO1_RST_HDR_VDO_BE_DL_ASYNC 53
+
#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8188 */
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/qcom,gcc-ipq5018.h b/sys/contrib/device-tree/include/dt-bindings/reset/qcom,gcc-ipq5018.h
new file mode 100644
index 000000000000..8f03c92fc23b
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/qcom,gcc-ipq5018.h
@@ -0,0 +1,122 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_RESET_IPQ_GCC_5018_H
+#define _DT_BINDINGS_RESET_IPQ_GCC_5018_H
+
+#define GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR 0
+#define GCC_BLSP1_BCR 1
+#define GCC_BLSP1_QUP1_BCR 2
+#define GCC_BLSP1_QUP2_BCR 3
+#define GCC_BLSP1_QUP3_BCR 4
+#define GCC_BLSP1_UART1_BCR 5
+#define GCC_BLSP1_UART2_BCR 6
+#define GCC_BOOT_ROM_BCR 7
+#define GCC_BTSS_BCR 8
+#define GCC_CMN_BLK_BCR 9
+#define GCC_CMN_LDO_BCR 10
+#define GCC_CE_BCR 11
+#define GCC_CRYPTO_BCR 12
+#define GCC_DCC_BCR 13
+#define GCC_DCD_BCR 14
+#define GCC_DDRSS_BCR 15
+#define GCC_EDPD_BCR 16
+#define GCC_GEPHY_BCR 17
+#define GCC_GEPHY_MDC_SW_ARES 18
+#define GCC_GEPHY_DSP_HW_ARES 19
+#define GCC_GEPHY_RX_ARES 20
+#define GCC_GEPHY_TX_ARES 21
+#define GCC_GMAC0_BCR 22
+#define GCC_GMAC0_CFG_ARES 23
+#define GCC_GMAC0_SYS_ARES 24
+#define GCC_GMAC1_BCR 25
+#define GCC_GMAC1_CFG_ARES 26
+#define GCC_GMAC1_SYS_ARES 27
+#define GCC_IMEM_BCR 28
+#define GCC_LPASS_BCR 29
+#define GCC_MDIO0_BCR 30
+#define GCC_MDIO1_BCR 31
+#define GCC_MPM_BCR 32
+#define GCC_PCIE0_BCR 33
+#define GCC_PCIE0_LINK_DOWN_BCR 34
+#define GCC_PCIE0_PHY_BCR 35
+#define GCC_PCIE0PHY_PHY_BCR 36
+#define GCC_PCIE0_PIPE_ARES 37
+#define GCC_PCIE0_SLEEP_ARES 38
+#define GCC_PCIE0_CORE_STICKY_ARES 39
+#define GCC_PCIE0_AXI_MASTER_ARES 40
+#define GCC_PCIE0_AXI_SLAVE_ARES 41
+#define GCC_PCIE0_AHB_ARES 42
+#define GCC_PCIE0_AXI_MASTER_STICKY_ARES 43
+#define GCC_PCIE0_AXI_SLAVE_STICKY_ARES 44
+#define GCC_PCIE1_BCR 45
+#define GCC_PCIE1_LINK_DOWN_BCR 46
+#define GCC_PCIE1_PHY_BCR 47
+#define GCC_PCIE1PHY_PHY_BCR 48
+#define GCC_PCIE1_PIPE_ARES 49
+#define GCC_PCIE1_SLEEP_ARES 50
+#define GCC_PCIE1_CORE_STICKY_ARES 51
+#define GCC_PCIE1_AXI_MASTER_ARES 52
+#define GCC_PCIE1_AXI_SLAVE_ARES 53
+#define GCC_PCIE1_AHB_ARES 54
+#define GCC_PCIE1_AXI_MASTER_STICKY_ARES 55
+#define GCC_PCIE1_AXI_SLAVE_STICKY_ARES 56
+#define GCC_PCNOC_BCR 57
+#define GCC_PCNOC_BUS_TIMEOUT0_BCR 58
+#define GCC_PCNOC_BUS_TIMEOUT1_BCR 59
+#define GCC_PCNOC_BUS_TIMEOUT2_BCR 60
+#define GCC_PCNOC_BUS_TIMEOUT3_BCR 61
+#define GCC_PCNOC_BUS_TIMEOUT4_BCR 62
+#define GCC_PCNOC_BUS_TIMEOUT5_BCR 63
+#define GCC_PCNOC_BUS_TIMEOUT6_BCR 64
+#define GCC_PCNOC_BUS_TIMEOUT7_BCR 65
+#define GCC_PCNOC_BUS_TIMEOUT8_BCR 66
+#define GCC_PCNOC_BUS_TIMEOUT9_BCR 67
+#define GCC_PCNOC_BUS_TIMEOUT10_BCR 68
+#define GCC_PCNOC_BUS_TIMEOUT11_BCR 69
+#define GCC_PRNG_BCR 70
+#define GCC_Q6SS_DBG_ARES 71
+#define GCC_Q6_AHB_S_ARES 72
+#define GCC_Q6_AHB_ARES 73
+#define GCC_Q6_AXIM2_ARES 74
+#define GCC_Q6_AXIM_ARES 75
+#define GCC_Q6_AXIS_ARES 76
+#define GCC_QDSS_BCR 77
+#define GCC_QPIC_BCR 78
+#define GCC_QUSB2_0_PHY_BCR 79
+#define GCC_SDCC1_BCR 80
+#define GCC_SEC_CTRL_BCR 81
+#define GCC_SPDM_BCR 82
+#define GCC_SYSTEM_NOC_BCR 83
+#define GCC_TCSR_BCR 84
+#define GCC_TLMM_BCR 85
+#define GCC_UBI0_AXI_ARES 86
+#define GCC_UBI0_AHB_ARES 87
+#define GCC_UBI0_NC_AXI_ARES 88
+#define GCC_UBI0_DBG_ARES 89
+#define GCC_UBI0_UTCM_ARES 90
+#define GCC_UBI0_CORE_ARES 91
+#define GCC_UBI32_BCR 92
+#define GCC_UNIPHY_BCR 93
+#define GCC_UNIPHY_AHB_ARES 94
+#define GCC_UNIPHY_SYS_ARES 95
+#define GCC_UNIPHY_RX_ARES 96
+#define GCC_UNIPHY_TX_ARES 97
+#define GCC_USB0_BCR 98
+#define GCC_USB0_PHY_BCR 99
+#define GCC_WCSS_BCR 100
+#define GCC_WCSS_DBG_ARES 101
+#define GCC_WCSS_ECAHB_ARES 102
+#define GCC_WCSS_ACMT_ARES 103
+#define GCC_WCSS_DBG_BDG_ARES 104
+#define GCC_WCSS_AHB_S_ARES 105
+#define GCC_WCSS_AXI_M_ARES 106
+#define GCC_WCSS_AXI_S_ARES 107
+#define GCC_WCSS_Q6_BCR 108
+#define GCC_WCSSAON_RESET 109
+#define GCC_UNIPHY_SOFT_RESET 110
+#define GCC_GEPHY_MISC_ARES 111
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/qcom,sm8650-gpucc.h b/sys/contrib/device-tree/include/dt-bindings/reset/qcom,sm8650-gpucc.h
new file mode 100644
index 000000000000..f021a6cccc66
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/qcom,sm8650-gpucc.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#ifndef _DT_BINDINGS_RESET_QCOM_GPU_CC_SM8650_H
+#define _DT_BINDINGS_RESET_QCOM_GPU_CC_SM8650_H
+
+#define GPUCC_GPU_CC_ACD_BCR 0
+#define GPUCC_GPU_CC_CX_BCR 1
+#define GPUCC_GPU_CC_FAST_HUB_BCR 2
+#define GPUCC_GPU_CC_FF_BCR 3
+#define GPUCC_GPU_CC_GFX3D_AON_BCR 4
+#define GPUCC_GPU_CC_GMU_BCR 5
+#define GPUCC_GPU_CC_GX_BCR 6
+#define GPUCC_GPU_CC_XO_BCR 7
+#define GPUCC_GPU_CC_GX_ACD_IROOT_BCR 8
+
+#endif
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/rockchip,rk3588-cru.h b/sys/contrib/device-tree/include/dt-bindings/reset/rockchip,rk3588-cru.h
index 738e56aead93..d4264db2a07f 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/rockchip,rk3588-cru.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/rockchip,rk3588-cru.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
/*
* Copyright (c) 2021 Rockchip Electronics Co. Ltd.
* Copyright (c) 2022 Collabora Ltd.
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/st,stm32mp25-rcc.h b/sys/contrib/device-tree/include/dt-bindings/reset/st,stm32mp25-rcc.h
new file mode 100644
index 000000000000..d5615930bcc8
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/st,stm32mp25-rcc.h
@@ -0,0 +1,167 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/*
+ * Copyright (C) STMicroelectronics 2023 - All Rights Reserved
+ * Author(s): Gabriel Fernandez <gabriel.fernandez@foss.st.com>
+ */
+
+#ifndef _DT_BINDINGS_STM32MP25_RESET_H_
+#define _DT_BINDINGS_STM32MP25_RESET_H_
+
+#define TIM1_R 0
+#define TIM2_R 1
+#define TIM3_R 2
+#define TIM4_R 3
+#define TIM5_R 4
+#define TIM6_R 5
+#define TIM7_R 6
+#define TIM8_R 7
+#define TIM10_R 8
+#define TIM11_R 9
+#define TIM12_R 10
+#define TIM13_R 11
+#define TIM14_R 12
+#define TIM15_R 13
+#define TIM16_R 14
+#define TIM17_R 15
+#define TIM20_R 16
+#define LPTIM1_R 17
+#define LPTIM2_R 18
+#define LPTIM3_R 19
+#define LPTIM4_R 20
+#define LPTIM5_R 21
+#define SPI1_R 22
+#define SPI2_R 23
+#define SPI3_R 24
+#define SPI4_R 25
+#define SPI5_R 26
+#define SPI6_R 27
+#define SPI7_R 28
+#define SPI8_R 29
+#define SPDIFRX_R 30
+#define USART1_R 31
+#define USART2_R 32
+#define USART3_R 33
+#define UART4_R 34
+#define UART5_R 35
+#define USART6_R 36
+#define UART7_R 37
+#define UART8_R 38
+#define UART9_R 39
+#define LPUART1_R 40
+#define IS2M_R 41
+#define I2C1_R 42
+#define I2C2_R 43
+#define I2C3_R 44
+#define I2C4_R 45
+#define I2C5_R 46
+#define I2C6_R 47
+#define I2C7_R 48
+#define I2C8_R 49
+#define SAI1_R 50
+#define SAI2_R 51
+#define SAI3_R 52
+#define SAI4_R 53
+#define MDF1_R 54
+#define MDF2_R 55
+#define FDCAN_R 56
+#define HDP_R 57
+#define ADC12_R 58
+#define ADC3_R 59
+#define ETH1_R 60
+#define ETH2_R 61
+#define USB2_R 62
+#define USB2PHY1_R 63
+#define USB2PHY2_R 64
+#define USB3DR_R 65
+#define USB3PCIEPHY_R 66
+#define USBTC_R 67
+#define ETHSW_R 68
+#define SDMMC1_R 69
+#define SDMMC1DLL_R 70
+#define SDMMC2_R 71
+#define SDMMC2DLL_R 72
+#define SDMMC3_R 73
+#define SDMMC3DLL_R 74
+#define GPU_R 75
+#define LTDC_R 76
+#define DSI_R 77
+#define LVDS_R 78
+#define CSI_R 79
+#define DCMIPP_R 80
+#define CCI_R 81
+#define VDEC_R 82
+#define VENC_R 83
+#define WWDG1_R 84
+#define WWDG2_R 85
+#define VREF_R 86
+#define DTS_R 87
+#define CRC_R 88
+#define SERC_R 89
+#define OSPIIOM_R 90
+#define I3C1_R 91
+#define I3C2_R 92
+#define I3C3_R 93
+#define I3C4_R 94
+#define IWDG2_KER_R 95
+#define IWDG4_KER_R 96
+#define RNG_R 97
+#define PKA_R 98
+#define SAES_R 99
+#define HASH_R 100
+#define CRYP1_R 101
+#define CRYP2_R 102
+#define PCIE_R 103
+#define OSPI1_R 104
+#define OSPI1DLL_R 105
+#define OSPI2_R 106
+#define OSPI2DLL_R 107
+#define FMC_R 108
+#define DBG_R 109
+#define GPIOA_R 110
+#define GPIOB_R 111
+#define GPIOC_R 112
+#define GPIOD_R 113
+#define GPIOE_R 114
+#define GPIOF_R 115
+#define GPIOG_R 116
+#define GPIOH_R 117
+#define GPIOI_R 118
+#define GPIOJ_R 119
+#define GPIOK_R 120
+#define GPIOZ_R 121
+#define HPDMA1_R 122
+#define HPDMA2_R 123
+#define HPDMA3_R 124
+#define LPDMA_R 125
+#define HSEM_R 126
+#define IPCC1_R 127
+#define IPCC2_R 128
+#define C2_HOLDBOOT_R 129
+#define C1_HOLDBOOT_R 130
+#define C1_R 131
+#define C1P1POR_R 132
+#define C1P1_R 133
+#define C2_R 134
+#define C3_R 135
+#define SYS_R 136
+#define VSW_R 137
+#define C1MS_R 138
+#define DDRCP_R 139
+#define DDRCAPB_R 140
+#define DDRPHYCAPB_R 141
+#define DDRCFG_R 142
+#define DDR_R 143
+
+#define STM32MP25_LAST_RESET 144
+
+#define RST_SCMI_C1_R 0
+#define RST_SCMI_C2_R 1
+#define RST_SCMI_C1_HOLDBOOT_R 2
+#define RST_SCMI_C2_HOLDBOOT_R 3
+#define RST_SCMI_FMC 4
+#define RST_SCMI_OSPI1 5
+#define RST_SCMI_OSPI1DLL 6
+#define RST_SCMI_OSPI2 7
+#define RST_SCMI_OSPI2DLL 8
+
+#endif /* _DT_BINDINGS_STM32MP25_RESET_H_ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/starfive,jh7110-crg.h b/sys/contrib/device-tree/include/dt-bindings/reset/starfive,jh7110-crg.h
index d78e38690ceb..eaf4a0d84f6a 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/starfive,jh7110-crg.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/starfive,jh7110-crg.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
*/
#ifndef __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__
@@ -151,4 +152,63 @@
#define JH7110_AONRST_END 8
+/* STGCRG resets */
+#define JH7110_STGRST_SYSCON 0
+#define JH7110_STGRST_HIFI4_CORE 1
+#define JH7110_STGRST_HIFI4_AXI 2
+#define JH7110_STGRST_SEC_AHB 3
+#define JH7110_STGRST_E24_CORE 4
+#define JH7110_STGRST_DMA1P_AXI 5
+#define JH7110_STGRST_DMA1P_AHB 6
+#define JH7110_STGRST_USB0_AXI 7
+#define JH7110_STGRST_USB0_APB 8
+#define JH7110_STGRST_USB0_UTMI_APB 9
+#define JH7110_STGRST_USB0_PWRUP 10
+#define JH7110_STGRST_PCIE0_AXI_MST0 11
+#define JH7110_STGRST_PCIE0_AXI_SLV0 12
+#define JH7110_STGRST_PCIE0_AXI_SLV 13
+#define JH7110_STGRST_PCIE0_BRG 14
+#define JH7110_STGRST_PCIE0_CORE 15
+#define JH7110_STGRST_PCIE0_APB 16
+#define JH7110_STGRST_PCIE1_AXI_MST0 17
+#define JH7110_STGRST_PCIE1_AXI_SLV0 18
+#define JH7110_STGRST_PCIE1_AXI_SLV 19
+#define JH7110_STGRST_PCIE1_BRG 20
+#define JH7110_STGRST_PCIE1_CORE 21
+#define JH7110_STGRST_PCIE1_APB 22
+
+#define JH7110_STGRST_END 23
+
+/* ISPCRG resets */
+#define JH7110_ISPRST_ISPV2_TOP_WRAPPER_P 0
+#define JH7110_ISPRST_ISPV2_TOP_WRAPPER_C 1
+#define JH7110_ISPRST_M31DPHY_HW 2
+#define JH7110_ISPRST_M31DPHY_B09_AON 3
+#define JH7110_ISPRST_VIN_APB 4
+#define JH7110_ISPRST_VIN_PIXEL_IF0 5
+#define JH7110_ISPRST_VIN_PIXEL_IF1 6
+#define JH7110_ISPRST_VIN_PIXEL_IF2 7
+#define JH7110_ISPRST_VIN_PIXEL_IF3 8
+#define JH7110_ISPRST_VIN_SYS 9
+#define JH7110_ISPRST_VIN_P_AXI_RD 10
+#define JH7110_ISPRST_VIN_P_AXI_WR 11
+
+#define JH7110_ISPRST_END 12
+
+/* VOUTCRG resets */
+#define JH7110_VOUTRST_DC8200_AXI 0
+#define JH7110_VOUTRST_DC8200_AHB 1
+#define JH7110_VOUTRST_DC8200_CORE 2
+#define JH7110_VOUTRST_DSITX_DPI 3
+#define JH7110_VOUTRST_DSITX_APB 4
+#define JH7110_VOUTRST_DSITX_RXESC 5
+#define JH7110_VOUTRST_DSITX_SYS 6
+#define JH7110_VOUTRST_DSITX_TXBYTEHS 7
+#define JH7110_VOUTRST_DSITX_TXESC 8
+#define JH7110_VOUTRST_HDMI_TX_HDMI 9
+#define JH7110_VOUTRST_MIPITX_DPHY_SYS 10
+#define JH7110_VOUTRST_MIPITX_DPHY_TXBYTEHS 11
+
+#define JH7110_VOUTRST_END 12
+
#endif /* __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__ */
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/stm32mp1-resets.h b/sys/contrib/device-tree/include/dt-bindings/reset/stm32mp1-resets.h
index 4ffa7c3612e6..9071f139649f 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/stm32mp1-resets.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/stm32mp1-resets.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
* Copyright (C) STMicroelectronics 2018 - All Rights Reserved
* Author: Gabriel Fernandez <gabriel.fernandez@st.com> for STMicroelectronics.
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-ccu.h
index f8001cf50bf1..79e52aca5912 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2020 huangzhenwei@allwinnertech.com
* Copyright (C) 2021 Samuel Holland <samuel@sholland.org>
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-r-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-r-ccu.h
index d93d6423d283..e20babc990af 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-r-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun20i-d1-r-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2021 Samuel Holland <samuel@sholland.org>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-ccu.h
index 55c0ada99885..d13764bc1860 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2020 Yangtao Li <frank@allwinnertech.com>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-r-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-r-ccu.h
index 737bf6f66626..1e7c4431f03c 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-r-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-a100-r-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2020 Yangtao Li <frank@allwinnertech.com>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-ccu.h
index 81106f455097..d038ddfa4818 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-ccu.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-r-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-r-ccu.h
index 7950e799c76d..d541ade884fc 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-r-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h6-r-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h616-ccu.h b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h616-ccu.h
index cb6285a8d128..1bd8bb0a11be 100644
--- a/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h616-ccu.h
+++ b/sys/contrib/device-tree/include/dt-bindings/reset/sun50i-h616-ccu.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (C) 2020 Arm Ltd.
*/
diff --git a/sys/contrib/device-tree/include/dt-bindings/soc/rockchip,vop2.h b/sys/contrib/device-tree/include/dt-bindings/soc/rockchip,vop2.h
index 6e66a802b96a..668f199df9f0 100644
--- a/sys/contrib/device-tree/include/dt-bindings/soc/rockchip,vop2.h
+++ b/sys/contrib/device-tree/include/dt-bindings/soc/rockchip,vop2.h
@@ -10,5 +10,9 @@
#define ROCKCHIP_VOP2_EP_LVDS0 5
#define ROCKCHIP_VOP2_EP_MIPI1 6
#define ROCKCHIP_VOP2_EP_LVDS1 7
+#define ROCKCHIP_VOP2_EP_HDMI1 8
+#define ROCKCHIP_VOP2_EP_EDP1 9
+#define ROCKCHIP_VOP2_EP_DP0 10
+#define ROCKCHIP_VOP2_EP_DP1 11
#endif /* __DT_BINDINGS_ROCKCHIP_VOP2_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/sys/contrib/device-tree/include/dt-bindings/thermal/mediatek,lvts-thermal.h
index 8fa5a46675c4..997e2f55128a 100644
--- a/sys/contrib/device-tree/include/dt-bindings/thermal/mediatek,lvts-thermal.h
+++ b/sys/contrib/device-tree/include/dt-bindings/thermal/mediatek,lvts-thermal.h
@@ -7,6 +7,15 @@
#ifndef __MEDIATEK_LVTS_DT_H
#define __MEDIATEK_LVTS_DT_H
+#define MT7988_CPU_0 0
+#define MT7988_CPU_1 1
+#define MT7988_ETH2P5G_0 2
+#define MT7988_ETH2P5G_1 3
+#define MT7988_TOPS_0 4
+#define MT7988_TOPS_1 5
+#define MT7988_ETHWARP_0 6
+#define MT7988_ETHWARP_1 7
+
#define MT8195_MCU_BIG_CPU0 0
#define MT8195_MCU_BIG_CPU1 1
#define MT8195_MCU_BIG_CPU2 2
@@ -26,4 +35,23 @@
#define MT8195_AP_CAM0 15
#define MT8195_AP_CAM1 16
+#define MT8192_MCU_BIG_CPU0 0
+#define MT8192_MCU_BIG_CPU1 1
+#define MT8192_MCU_BIG_CPU2 2
+#define MT8192_MCU_BIG_CPU3 3
+#define MT8192_MCU_LITTLE_CPU0 4
+#define MT8192_MCU_LITTLE_CPU1 5
+#define MT8192_MCU_LITTLE_CPU2 6
+#define MT8192_MCU_LITTLE_CPU3 7
+
+#define MT8192_AP_VPU0 8
+#define MT8192_AP_VPU1 9
+#define MT8192_AP_GPU0 10
+#define MT8192_AP_GPU1 11
+#define MT8192_AP_INFRA 12
+#define MT8192_AP_CAM 13
+#define MT8192_AP_MD0 14
+#define MT8192_AP_MD1 15
+#define MT8192_AP_MD2 16
+
#endif /* __MEDIATEK_LVTS_DT_H */
diff --git a/sys/contrib/device-tree/include/dt-bindings/watchdog/aspeed-wdt.h b/sys/contrib/device-tree/include/dt-bindings/watchdog/aspeed-wdt.h
new file mode 100644
index 000000000000..7ae6d84b2bd9
--- /dev/null
+++ b/sys/contrib/device-tree/include/dt-bindings/watchdog/aspeed-wdt.h
@@ -0,0 +1,92 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef DT_BINDINGS_ASPEED_WDT_H
+#define DT_BINDINGS_ASPEED_WDT_H
+
+#define AST2500_WDT_RESET_CPU (1 << 0)
+#define AST2500_WDT_RESET_COPROC (1 << 1)
+#define AST2500_WDT_RESET_SDRAM (1 << 2)
+#define AST2500_WDT_RESET_AHB (1 << 3)
+#define AST2500_WDT_RESET_I2C (1 << 4)
+#define AST2500_WDT_RESET_MAC0 (1 << 5)
+#define AST2500_WDT_RESET_MAC1 (1 << 6)
+#define AST2500_WDT_RESET_GRAPHICS (1 << 7)
+#define AST2500_WDT_RESET_USB2_HOST_HUB (1 << 8)
+#define AST2500_WDT_RESET_USB_HOST (1 << 9)
+#define AST2500_WDT_RESET_HID_EHCI (1 << 10)
+#define AST2500_WDT_RESET_VIDEO (1 << 11)
+#define AST2500_WDT_RESET_HAC (1 << 12)
+#define AST2500_WDT_RESET_LPC (1 << 13)
+#define AST2500_WDT_RESET_SDIO (1 << 14)
+#define AST2500_WDT_RESET_MIC (1 << 15)
+#define AST2500_WDT_RESET_CRT (1 << 16)
+#define AST2500_WDT_RESET_PWM (1 << 17)
+#define AST2500_WDT_RESET_PECI (1 << 18)
+#define AST2500_WDT_RESET_JTAG (1 << 19)
+#define AST2500_WDT_RESET_ADC (1 << 20)
+#define AST2500_WDT_RESET_GPIO (1 << 21)
+#define AST2500_WDT_RESET_MCTP (1 << 22)
+#define AST2500_WDT_RESET_XDMA (1 << 23)
+#define AST2500_WDT_RESET_SPI (1 << 24)
+#define AST2500_WDT_RESET_SOC_MISC (1 << 25)
+
+#define AST2500_WDT_RESET_DEFAULT 0x023ffff3
+
+#define AST2600_WDT_RESET1_CPU (1 << 0)
+#define AST2600_WDT_RESET1_SDRAM (1 << 1)
+#define AST2600_WDT_RESET1_AHB (1 << 2)
+#define AST2600_WDT_RESET1_SLI (1 << 3)
+#define AST2600_WDT_RESET1_SOC_MISC0 (1 << 4)
+#define AST2600_WDT_RESET1_COPROC (1 << 5)
+#define AST2600_WDT_RESET1_USB_A (1 << 6)
+#define AST2600_WDT_RESET1_USB_B (1 << 7)
+#define AST2600_WDT_RESET1_UHCI (1 << 8)
+#define AST2600_WDT_RESET1_GRAPHICS (1 << 9)
+#define AST2600_WDT_RESET1_CRT (1 << 10)
+#define AST2600_WDT_RESET1_VIDEO (1 << 11)
+#define AST2600_WDT_RESET1_HAC (1 << 12)
+#define AST2600_WDT_RESET1_DP (1 << 13)
+#define AST2600_WDT_RESET1_DP_MCU (1 << 14)
+#define AST2600_WDT_RESET1_GP_MCU (1 << 15)
+#define AST2600_WDT_RESET1_MAC0 (1 << 16)
+#define AST2600_WDT_RESET1_MAC1 (1 << 17)
+#define AST2600_WDT_RESET1_SDIO0 (1 << 18)
+#define AST2600_WDT_RESET1_JTAG0 (1 << 19)
+#define AST2600_WDT_RESET1_MCTP0 (1 << 20)
+#define AST2600_WDT_RESET1_MCTP1 (1 << 21)
+#define AST2600_WDT_RESET1_XDMA0 (1 << 22)
+#define AST2600_WDT_RESET1_XDMA1 (1 << 23)
+#define AST2600_WDT_RESET1_GPIO0 (1 << 24)
+#define AST2600_WDT_RESET1_RVAS (1 << 25)
+
+#define AST2600_WDT_RESET1_DEFAULT 0x030f1ff1
+
+#define AST2600_WDT_RESET2_CPU (1 << 0)
+#define AST2600_WDT_RESET2_SPI (1 << 1)
+#define AST2600_WDT_RESET2_AHB2 (1 << 2)
+#define AST2600_WDT_RESET2_SLI2 (1 << 3)
+#define AST2600_WDT_RESET2_SOC_MISC1 (1 << 4)
+#define AST2600_WDT_RESET2_MAC2 (1 << 5)
+#define AST2600_WDT_RESET2_MAC3 (1 << 6)
+#define AST2600_WDT_RESET2_SDIO1 (1 << 7)
+#define AST2600_WDT_RESET2_JTAG1 (1 << 8)
+#define AST2600_WDT_RESET2_GPIO1 (1 << 9)
+#define AST2600_WDT_RESET2_MDIO (1 << 10)
+#define AST2600_WDT_RESET2_LPC (1 << 11)
+#define AST2600_WDT_RESET2_PECI (1 << 12)
+#define AST2600_WDT_RESET2_PWM (1 << 13)
+#define AST2600_WDT_RESET2_ADC (1 << 14)
+#define AST2600_WDT_RESET2_FSI (1 << 15)
+#define AST2600_WDT_RESET2_I2C (1 << 16)
+#define AST2600_WDT_RESET2_I3C_GLOBAL (1 << 17)
+#define AST2600_WDT_RESET2_I3C0 (1 << 18)
+#define AST2600_WDT_RESET2_I3C1 (1 << 19)
+#define AST2600_WDT_RESET2_I3C2 (1 << 20)
+#define AST2600_WDT_RESET2_I3C3 (1 << 21)
+#define AST2600_WDT_RESET2_I3C4 (1 << 22)
+#define AST2600_WDT_RESET2_I3C5 (1 << 23)
+#define AST2600_WDT_RESET2_ESPI (1 << 26)
+
+#define AST2600_WDT_RESET2_DEFAULT 0x03fffff1
+
+#endif
diff --git a/sys/contrib/device-tree/src/arm/allwinner/sun8i-r40.dtsi b/sys/contrib/device-tree/src/arm/allwinner/sun8i-r40.dtsi
index 4ef26d8f5340..a5b1f1e3900d 100644
--- a/sys/contrib/device-tree/src/arm/allwinner/sun8i-r40.dtsi
+++ b/sys/contrib/device-tree/src/arm/allwinner/sun8i-r40.dtsi
@@ -338,6 +338,8 @@
resets = <&ccu RST_BUS_VE>;
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
allwinner,sram = <&ve_sram 1>;
+ interconnects = <&mbus 4>;
+ interconnect-names = "dma-mem";
};
mmc0: mmc@1c0f000 {
diff --git a/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s-mangopi-mq-r-t113.dts b/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s-mangopi-mq-r-t113.dts
index 94e24b5926dd..8b3a75383816 100644
--- a/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s-mangopi-mq-r-t113.dts
+++ b/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s-mangopi-mq-r-t113.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Arm Ltd.
#include <dt-bindings/interrupt-controller/irq.h>
diff --git a/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s.dtsi b/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s.dtsi
index 804aa197a24f..c7181308ae6f 100644
--- a/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s.dtsi
+++ b/sys/contrib/device-tree/src/arm/allwinner/sun8i-t113s.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Arm Ltd.
#define SOC_PERIPHERAL_IRQ(nr) GIC_SPI nr
diff --git a/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s-anbernic-rg-nano.dts b/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s-anbernic-rg-nano.dts
new file mode 100644
index 000000000000..f34dfdf1566d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s-anbernic-rg-nano.dts
@@ -0,0 +1,276 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include <dt-bindings/input/linux-event-codes.h>
+#include "sun8i-v3s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+/ {
+ model = "Anbernic RG Nano";
+ compatible = "anbernic,rg-nano", "allwinner,sun8i-v3s";
+
+ aliases {
+ rtc0 = &pcf8563;
+ rtc1 = &rtc;
+ serial0 = &uart0;
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ brightness-levels = <0 1 2 3 8 14 21 32 46 60 80 100>;
+ default-brightness-level = <11>;
+ power-supply = <&reg_vcc5v0>;
+ pwms = <&pwm 0 40000 1>;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ button-a {
+ gpios = <&gpio_expander 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-A";
+ linux,code = <BTN_EAST>;
+ };
+
+ button-b {
+ gpios = <&gpio_expander 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-B";
+ linux,code = <BTN_SOUTH>;
+ };
+
+ button-down {
+ gpios = <&gpio_expander 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "DPAD-DOWN";
+ linux,code = <BTN_DPAD_DOWN>;
+ };
+
+ button-left {
+ gpios = <&gpio_expander 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "DPAD-LEFT";
+ linux,code = <BTN_DPAD_LEFT>;
+ };
+
+ button-right {
+ gpios = <&gpio_expander 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "DPAD-RIGHT";
+ linux,code = <BTN_DPAD_RIGHT>;
+ };
+
+ button-se {
+ gpios = <&gpio_expander 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-SELECT";
+ linux,code = <BTN_SELECT>;
+ };
+
+ button-st {
+ gpios = <&gpio_expander 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-START";
+ linux,code = <BTN_START>;
+ };
+
+ button-tl {
+ gpios = <&gpio_expander 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-L";
+ linux,code = <BTN_TL>;
+ };
+
+ button-tr {
+ gpios = <&gpio_expander 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-R";
+ linux,code = <BTN_TR>;
+ };
+
+ button-up {
+ gpios = <&gpio_expander 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "DPAD-UP";
+ linux,code = <BTN_DPAD_UP>;
+ };
+
+ button-x {
+ gpios = <&gpio_expander 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-X";
+ linux,code = <BTN_NORTH>;
+ };
+
+ button-y {
+ gpios = <&gpio_expander 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ label = "BTN-Y";
+ linux,code = <BTN_WEST>;
+ };
+ };
+};
+
+&codec {
+ allwinner,audio-routing = "Speaker", "HP",
+ "MIC1", "Mic",
+ "Mic", "HBIAS";
+ allwinner,pa-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PF6 */
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ gpio_expander: gpio@20 {
+ compatible = "nxp,pcal6416";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ interrupt-parent = <&pio>;
+ interrupts = <1 3 IRQ_TYPE_EDGE_BOTH>; /* PB3/EINT3 */
+ vcc-supply = <&reg_vcc3v3>;
+ };
+
+ axp209: pmic@34 {
+ reg = <0x34>;
+ interrupt-parent = <&pio>;
+ interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5/EINT5 */
+ };
+
+ pcf8563: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+};
+
+#include "axp209.dtsi"
+
+&battery_power_supply {
+ status = "okay";
+};
+
+&mmc0 {
+ broken-cd;
+ bus-width = <4>;
+ disable-wp;
+ vmmc-supply = <&reg_vcc3v3>;
+ vqmmc-supply = <&reg_vcc3v3>;
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pio {
+ vcc-pb-supply = <&reg_vcc3v3>;
+ vcc-pc-supply = <&reg_vcc3v3>;
+ vcc-pf-supply = <&reg_vcc3v3>;
+ vcc-pg-supply = <&reg_vcc3v3>;
+
+ spi0_no_miso_pins: spi0-no-miso-pins {
+ pins = "PC1", "PC2", "PC3";
+ function = "spi0";
+ };
+};
+
+&pwm {
+ pinctrl-0 = <&pwm0_pin>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+/* DCDC2 wired into vdd-cpu, vdd-sys, and vdd-ephy. */
+&reg_dcdc2 {
+ regulator-always-on;
+ regulator-max-microvolt = <1250000>;
+ regulator-min-microvolt = <1250000>;
+ regulator-name = "vdd-cpu";
+};
+
+/* DCDC3 wired into every 3.3v input that isn't the RTC. */
+&reg_dcdc3 {
+ regulator-always-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "vcc-io";
+};
+
+/* LDO1 wired into RTC, voltage is hard-wired at 3.3v. */
+&reg_ldo1 {
+ regulator-always-on;
+ regulator-name = "vcc-rtc";
+};
+
+/* LDO2 wired into VCC-PLL and audio codec. */
+&reg_ldo2 {
+ regulator-always-on;
+ regulator-max-microvolt = <3000000>;
+ regulator-min-microvolt = <3000000>;
+ regulator-name = "vcc-pll";
+};
+
+/* LDO3, LDO4, and LDO5 unused. */
+&reg_ldo3 {
+ status = "disabled";
+};
+
+&reg_ldo4 {
+ status = "disabled";
+};
+
+/* RTC uses internal oscillator */
+&rtc {
+ /delete-property/ clocks;
+};
+
+&spi0 {
+ pinctrl-0 = <&spi0_no_miso_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ display@0 {
+ compatible = "saef,sftc154b", "panel-mipi-dbi-spi";
+ reg = <0>;
+ backlight = <&backlight>;
+ dc-gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>; /* PC0 */
+ reset-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2 */
+ spi-max-frequency = <100000000>;
+
+ height-mm = <39>;
+ width-mm = <39>;
+
+ /* Set hb-porch to compensate for non-visible area */
+ panel-timing {
+ hactive = <240>;
+ vactive = <240>;
+ hback-porch = <80>;
+ vback-porch = <0>;
+ clock-frequency = <0>;
+ hfront-porch = <0>;
+ hsync-len = <0>;
+ vfront-porch = <0>;
+ vsync-len = <0>;
+ };
+ };
+};
+
+&uart0 {
+ pinctrl-0 = <&uart0_pb_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_power_supply {
+ status = "okay";
+};
+
+&usbphy {
+ usb0_id_det-gpios = <&pio 6 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PG5 */
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s.dtsi b/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s.dtsi
index 3b9a282c2746..e8a04476b776 100644
--- a/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s.dtsi
+++ b/sys/contrib/device-tree/src/arm/allwinner/sun8i-v3s.dtsi
@@ -319,6 +319,29 @@
#phy-cells = <1>;
};
+ ehci: usb@1c1a000 {
+ compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci";
+ reg = <0x01c1a000 0x100>;
+ interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
+ resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci: usb@1c1a400 {
+ compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci";
+ reg = <0x01c1a400 0x100>;
+ interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_USB_OHCI0>;
+ resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
ccu: clock@1c20000 {
compatible = "allwinner,sun8i-v3s-ccu";
reg = <0x01c20000 0x400>;
@@ -414,6 +437,18 @@
bias-pull-up;
};
+ /omit-if-no-ref/
+ pwm0_pin: pwm0-pin {
+ pins = "PB4";
+ function = "pwm0";
+ };
+
+ /omit-if-no-ref/
+ pwm1_pin: pwm1-pin {
+ pins = "PB5";
+ function = "pwm1";
+ };
+
spi0_pins: spi0-pins {
pins = "PC0", "PC1", "PC2", "PC3";
function = "spi0";
diff --git a/sys/contrib/device-tree/src/arm/allwinner/sunxi-d1s-t113-mangopi-mq-r.dtsi b/sys/contrib/device-tree/src/arm/allwinner/sunxi-d1s-t113-mangopi-mq-r.dtsi
index e9bc749488bb..a415c4a78a70 100644
--- a/sys/contrib/device-tree/src/arm/allwinner/sunxi-d1s-t113-mangopi-mq-r.dtsi
+++ b/sys/contrib/device-tree/src/arm/allwinner/sunxi-d1s-t113-mangopi-mq-r.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Arm Ltd.
/*
* Common peripherals and configurations for MangoPi MQ-R boards.
diff --git a/sys/contrib/device-tree/src/arm/amazon/alpine.dtsi b/sys/contrib/device-tree/src/arm/amazon/alpine.dtsi
index ff68dfb4eb78..90bd12feac01 100644
--- a/sys/contrib/device-tree/src/arm/amazon/alpine.dtsi
+++ b/sys/contrib/device-tree/src/arm/amazon/alpine.dtsi
@@ -167,7 +167,6 @@
msix: msix@fbe00000 {
compatible = "al,alpine-msix";
reg = <0x0 0xfbe00000 0x0 0x100000>;
- interrupt-controller;
msi-controller;
al,msi-base-spi = <96>;
al,msi-num-spis = <64>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtjade.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtjade.dts
index 0a51d2e32fab..8ab5f301f926 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtjade.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtjade.dts
@@ -760,49 +760,63 @@
&gpio {
gpio-line-names =
- /*A0-A7*/ "","","","S0_BMC_SPECIAL_BOOT","","","","",
- /*B0-B7*/ "BMC_SELECT_EEPROM","","","",
- "POWER_BUTTON","","","",
+ /*A0-A7*/ "","","","host0-special-boot","","","","",
+ /*B0-B7*/ "i2c-backup-sel","","","",
+ "power-button","presence-cpu0","","",
/*C0-C7*/ "","","","","","","","",
/*D0-D7*/ "","","","","","","","",
/*E0-E7*/ "","","","","","","","",
- /*F0-F7*/ "","","BMC_SYS_PSON_L","S0_DDR_SAVE","PGOOD",
- "S1_DDR_SAVE","","",
- /*G0-G7*/ "host0-ready","SHD_REQ_L","","S0_OVERTEMP_L","","",
- "","",
- /*H0-H7*/ "","","","","PSU1_VIN_GOOD","PSU2_VIN_GOOD","","",
- /*I0-I7*/ "PSU1_PRESENT","PSU2_PRESENT","S1_BMC_SPECIAL_BOOT",
- "","","","","",
- /*J0-J7*/ "S0_HIGHTEMP_L","S0_FAULT_L","S0_SCP_AUTH_FAIL_L","",
- "","","","",
+ /*F0-F7*/ "ps0-pgood","ps1-pgood","power-chassis-control","s0-ddr-save",
+ "power-chassis-good", "s1-ddr-save","","",
+ /*G0-G7*/ "host0-ready","host0-shd-req-n","host0-shd-ack-n",
+ "s0-overtemp-n","","","","",
+ /*H0-H7*/ "uart1-mode1","uart2-mode1","uart3-mode1","uart4-mode1",
+ "ps0-vin-good","ps1-vin-good","","i2c6-reset-n",
+ /*I0-I7*/ "presence-ps0","presence-ps1","s1-special-boot","","","","","",
+ /*J0-J7*/ "s0-hightemp-n","s0-fault-alert","s0-sys-auth-failure-n",
+ "host0-reboot-ack-n","","","","",
/*K0-K7*/ "","","","","","","","",
- /*L0-L7*/ "","","","BMC_SYSRESET_L","SPI_AUTH_FAIL_L","","","",
- /*M0-M7*/ "","","","","","","","",
+ /*L0-L7*/ "","","","host0-sysreset-n","s0-spi-auth-fail-n","","","",
+ /*M0-M7*/ "","","","","s0-i2c9-alert-n","s1-i2c9-alert-n","","",
/*N0-N7*/ "","","","","","","","",
/*O0-O7*/ "","","","","","","","",
/*P0-P7*/ "","","","","","","","",
- /*Q0-Q7*/ "","","","","","UID_BUTTON","","",
- /*R0-R7*/ "","","BMC_EXT_HIGHTEMP_L","OCP_AUX_PWREN",
- "OCP_MAIN_PWREN","RESET_BUTTON","","",
- /*S0-S7*/ "","","","","rtc-battery-voltage-read-enable","","","",
+ /*Q0-Q7*/ "","","","","","identify-button","led-identify","",
+ /*R0-R7*/ "","","ext-hightemp-n","","ocp-main-pwren","reset-button","","",
+ /*S0-S7*/ "s0-vr-hot-n","s1-vr-hot-n","","",
+ "rtc-battery-voltage-read-enable","vr-pmbus-sel-n","","",
/*T0-T7*/ "","","","","","","","",
/*U0-U7*/ "","","","","","","","",
/*V0-V7*/ "","","","","","","","",
/*W0-W7*/ "","","","","","","","",
/*X0-X7*/ "","","","","","","","",
- /*Y0-Y7*/ "","","","","","","","",
- /*Z0-Z7*/ "S0_BMC_PLIMIT","S1_FAULT_L","S1_FW_BOOT_OK","","",
- "S1_SCP_AUTH_FAIL_L","S1_OVERTEMP_L","",
+ /*Y0-Y7*/ "","","","bmc-vga-en-n","","","","",
+ /*Z0-Z7*/ "s0-plimit","s1-fault-alert","s1-fw-boot-ok","s0-rtc-lock","",
+ "s1-sys-auth-failure-n","s1-overtemp-n","",
/*AA0-AA7*/ "","","","","","","","",
- /*AB0-AB7*/ "S1_HIGHTEMP_L","S1_BMC_PLIMIT","S0_BMC_DDR_ADDR",
- "S1_BMC_DDR_ADR","","","","",
- /*AC0-AC7*/ "SYS_PWR_GD","","","","","BMC_READY","SLAVE_PRESENT_L",
- "BMC_OCP_PG";
+ /*AB0-AB7*/ "s1-hightemp-n","s1-plimit","s0-ddr-addr","s1-ddr-addr","","",
+ "","",
+ /*AC0-AC7*/ "sys-pwr-gd","","spi0-program-sel","spi0-backup-sel","bmc-ok",
+ "","presence-cpu1","ocp-pgood";
i2c4-o-en-hog {
gpio-hog;
gpios = <ASPEED_GPIO(Y, 2) GPIO_ACTIVE_HIGH>;
output-high;
- line-name = "BMC_I2C4_O_EN";
+ line-name = "i2c4-o-en";
+ };
+
+ ocp-aux-pwren-hog {
+ gpio-hog;
+ gpios = <ASPEED_GPIO(R, 3) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "ocp-aux-pwren";
+ };
+
+ bmc-ready {
+ gpio-hog;
+ gpios = <ASPEED_GPIO(AC, 5) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "bmc-ready";
};
};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index 1e0e88465254..7b540880cef9 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -4,12 +4,54 @@
/dts-v1/;
#include "aspeed-g6.dtsi"
+#include <dt-bindings/i2c/i2c.h>
#include <dt-bindings/gpio/aspeed-gpio.h>
/ {
model = "Ampere Mt.Mitchell BMC";
compatible = "ampere,mtmitchell-bmc", "aspeed,ast2600";
+ aliases {
+ serial7 = &uart8;
+ serial8 = &uart9;
+
+ /*
+ * I2C NVMe alias port
+ */
+ i2c100 = &backplane_0;
+ i2c48 = &nvmeslot_0;
+ i2c49 = &nvmeslot_1;
+ i2c50 = &nvmeslot_2;
+ i2c51 = &nvmeslot_3;
+ i2c52 = &nvmeslot_4;
+ i2c53 = &nvmeslot_5;
+ i2c54 = &nvmeslot_6;
+ i2c55 = &nvmeslot_7;
+
+ i2c101 = &backplane_1;
+ i2c56 = &nvmeslot_8;
+ i2c57 = &nvmeslot_9;
+ i2c58 = &nvmeslot_10;
+ i2c59 = &nvmeslot_11;
+ i2c60 = &nvmeslot_12;
+ i2c61 = &nvmeslot_13;
+ i2c62 = &nvmeslot_14;
+ i2c63 = &nvmeslot_15;
+
+ i2c102 = &backplane_2;
+ i2c64 = &nvmeslot_16;
+ i2c65 = &nvmeslot_17;
+ i2c66 = &nvmeslot_18;
+ i2c67 = &nvmeslot_19;
+ i2c68 = &nvmeslot_20;
+ i2c69 = &nvmeslot_21;
+ i2c70 = &nvmeslot_22;
+ i2c71 = &nvmeslot_23;
+
+ i2c80 = &nvme_m2_0;
+ i2c81 = &nvme_m2_1;
+ };
+
chosen {
stdout-path = &uart5;
};
@@ -61,174 +103,192 @@
adc0mux: adc0mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 0>;
+ io-channels = <&adc_i2c_0 0>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc1mux: adc1mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 1>;
+ io-channels = <&adc_i2c_0 1>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc2mux: adc2mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 2>;
+ io-channels = <&adc_i2c_0 2>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc3mux: adc3mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 3>;
+ io-channels = <&adc_i2c_0 3>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc4mux: adc4mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 4>;
+ io-channels = <&adc_i2c_0 4>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc5mux: adc5mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 5>;
+ io-channels = <&adc_i2c_0 5>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc6mux: adc6mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 6>;
+ io-channels = <&adc_i2c_0 6>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc7mux: adc7mux {
compatible = "io-channel-mux";
- io-channels = <&adc0 7>;
+ io-channels = <&adc_i2c_0 7>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc8mux: adc8mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 0>;
+ io-channels = <&adc_i2c_0 8>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc9mux: adc9mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 1>;
+ io-channels = <&adc_i2c_0 9>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc10mux: adc10mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 2>;
+ io-channels = <&adc_i2c_0 10>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc11mux: adc11mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 3>;
+ io-channels = <&adc_i2c_0 11>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc12mux: adc12mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 4>;
+ io-channels = <&adc_i2c_0 12>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc13mux: adc13mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 5>;
+ io-channels = <&adc_i2c_0 13>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc14mux: adc14mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 6>;
+ io-channels = <&adc_i2c_0 14>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
adc15mux: adc15mux {
compatible = "io-channel-mux";
- io-channels = <&adc1 7>;
+ io-channels = <&adc_i2c_0 15>;
#io-channel-cells = <1>;
io-channel-names = "parent";
mux-controls = <&gpioI5mux>;
+ settle-time-us = <10000>;
channels = "s0", "s1";
};
iio-hwmon {
compatible = "iio-hwmon";
- io-channels = <&adc0mux 0>, <&adc0mux 1>,
- <&adc1mux 0>, <&adc1mux 1>,
- <&adc2mux 0>, <&adc2mux 1>,
- <&adc3mux 0>, <&adc3mux 1>,
- <&adc4mux 0>, <&adc4mux 1>,
- <&adc5mux 0>, <&adc5mux 1>,
- <&adc6mux 0>, <&adc6mux 1>,
- <&adc7mux 0>, <&adc7mux 1>,
- <&adc8mux 0>, <&adc8mux 1>,
- <&adc9mux 0>, <&adc9mux 1>,
- <&adc10mux 0>, <&adc10mux 1>,
- <&adc11mux 0>, <&adc11mux 1>,
- <&adc12mux 0>, <&adc12mux 1>,
- <&adc13mux 0>, <&adc13mux 1>,
- <&adc14mux 0>, <&adc14mux 1>,
- <&adc15mux 0>, <&adc15mux 1>,
- <&adc_i2c 0>, <&adc_i2c 1>,
- <&adc_i2c 2>, <&adc_i2c 3>,
- <&adc_i2c 4>, <&adc_i2c 5>,
- <&adc_i2c 6>, <&adc_i2c 7>,
- <&adc_i2c 8>, <&adc_i2c 9>,
- <&adc_i2c 10>, <&adc_i2c 11>,
- <&adc_i2c 12>, <&adc_i2c 13>,
- <&adc_i2c 14>, <&adc_i2c 15>;
+ io-channels = <&adc0mux 0>, <&adc0mux 1>,
+ <&adc1mux 0>, <&adc1mux 1>,
+ <&adc2mux 0>, <&adc2mux 1>,
+ <&adc3mux 0>, <&adc3mux 1>,
+ <&adc4mux 0>, <&adc4mux 1>,
+ <&adc5mux 0>, <&adc5mux 1>,
+ <&adc6mux 0>, <&adc6mux 1>,
+ <&adc7mux 0>, <&adc7mux 1>,
+ <&adc8mux 0>, <&adc8mux 1>,
+ <&adc9mux 0>, <&adc9mux 1>,
+ <&adc10mux 0>, <&adc10mux 1>,
+ <&adc11mux 0>, <&adc11mux 1>,
+ <&adc12mux 0>, <&adc12mux 1>,
+ <&adc13mux 0>, <&adc13mux 1>,
+ <&adc14mux 0>, <&adc14mux 1>,
+ <&adc15mux 0>, <&adc15mux 1>,
+ <&adc_i2c_1 0>, <&adc_i2c_1 1>,
+ <&adc_i2c_1 2>, <&adc_i2c_1 3>,
+ <&adc_i2c_1 4>, <&adc_i2c_1 5>,
+ <&adc_i2c_1 6>, <&adc_i2c_1 7>,
+ <&adc_i2c_1 8>, <&adc_i2c_1 9>,
+ <&adc_i2c_1 10>, <&adc_i2c_1 11>,
+ <&adc_i2c_1 12>, <&adc_i2c_1 13>,
+ <&adc_i2c_1 14>, <&adc_i2c_1 15>,
+ <&adc0 0>, <&adc0 1>,
+ <&adc0 2>;
};
};
@@ -307,6 +367,14 @@
status = "okay";
};
+&uart8 {
+ status = "okay";
+};
+
+&uart9 {
+ status = "okay";
+};
+
&i2c0 {
status = "okay";
@@ -336,12 +404,27 @@
&i2c3 {
status = "okay";
+ bus-frequency = <1000000>;
+ multi-master;
+ mctp-controller;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
};
&i2c4 {
status = "okay";
- adc_i2c: adc@16 {
+ adc_i2c_0: adc@14 {
+ compatible = "lltc,ltc2497";
+ reg = <0x14>;
+ vref-supply = <&voltage_mon_reg>;
+ #io-channel-cells = <1>;
+ };
+
+ adc_i2c_1: adc@16 {
compatible = "lltc,ltc2497";
reg = <0x16>;
vref-supply = <&voltage_mon_reg>;
@@ -450,6 +533,11 @@
&i2c8 {
status = "okay";
+ temperature-sensor@48 {
+ compatible = "ti,tmp112";
+ reg = <0x48>;
+ };
+
gpio@77 {
compatible = "nxp,pca9539";
reg = <0x77>;
@@ -469,6 +557,237 @@
&i2c9 {
status = "okay";
+ i2c-mux@70 {
+ compatible = "nxp,pca9548";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x70>;
+ i2c-mux-idle-disconnect;
+
+ backplane_1: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+
+ eeprom@50 {
+ compatible = "atmel,24c64";
+ reg = <0x50>;
+ pagesize = <32>;
+ };
+
+ i2c-mux@71 {
+ compatible = "nxp,pca9548";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+ i2c-mux-idle-disconnect;
+
+ nvmeslot_8: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+ };
+ nvmeslot_9: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1>;
+ };
+ nvmeslot_10: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x2>;
+ };
+ nvmeslot_11: i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x3>;
+ };
+ nvmeslot_12: i2c@4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x4>;
+ };
+ nvmeslot_13: i2c@5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x5>;
+ };
+ nvmeslot_14: i2c@6 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x6>;
+ };
+ nvmeslot_15: i2c@7 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x7>;
+ };
+ };
+
+ tmp432@4c {
+ compatible = "ti,tmp75";
+ reg = <0x4c>;
+ };
+ };
+
+ backplane_2: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x2>;
+
+ eeprom@50 {
+ compatible = "atmel,24c64";
+ reg = <0x50>;
+ pagesize = <32>;
+ };
+
+ i2c-mux@71 {
+ compatible = "nxp,pca9548";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+ i2c-mux-idle-disconnect;
+
+ nvmeslot_16: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+ };
+ nvmeslot_17: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1>;
+ };
+ nvmeslot_18: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x2>;
+ };
+ nvmeslot_19: i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x3>;
+ };
+ nvmeslot_20: i2c@4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x4>;
+ };
+ nvmeslot_21: i2c@5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x5>;
+ };
+ nvmeslot_22: i2c@6 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x6>;
+ };
+ nvmeslot_23: i2c@7 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x7>;
+ };
+ };
+
+ tmp432@4c {
+ compatible = "ti,tmp75";
+ reg = <0x4c>;
+ };
+ };
+
+ backplane_0: i2c@4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x4>;
+
+ eeprom@50 {
+ compatible = "atmel,24c64";
+ reg = <0x50>;
+ pagesize = <32>;
+ };
+
+ i2c-mux@71 {
+ compatible = "nxp,pca9548";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+ i2c-mux-idle-disconnect;
+
+ nvmeslot_0: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+ };
+ nvmeslot_1: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1>;
+ };
+ nvmeslot_2: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x2>;
+ };
+ nvmeslot_3: i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x3>;
+ };
+ nvmeslot_4: i2c@4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x4>;
+ };
+ nvmeslot_5: i2c@5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x5>;
+ };
+ nvmeslot_6: i2c@6 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x6>;
+ };
+ nvmeslot_7: i2c@7 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x7>;
+ };
+ };
+
+ tmp432@4c {
+ compatible = "ti,tmp75";
+ reg = <0x4c>;
+ };
+ };
+
+ i2c@7 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x7>;
+
+ i2c-mux@71 {
+ compatible = "nxp,pca9546";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+ i2c-mux-idle-disconnect;
+
+ nvme_m2_0: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+ };
+
+ nvme_m2_1: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1>;
+ };
+ };
+ };
+ };
};
&i2c11 {
@@ -499,20 +818,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
- &pinctrl_adc2_default &pinctrl_adc3_default
- &pinctrl_adc4_default &pinctrl_adc5_default
- &pinctrl_adc6_default &pinctrl_adc7_default>;
-};
-
-&adc1 {
- ref_voltage = <2500>;
- status = "okay";
-
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default
- &pinctrl_adc10_default &pinctrl_adc11_default
- &pinctrl_adc12_default &pinctrl_adc13_default
- &pinctrl_adc14_default &pinctrl_adc15_default>;
+ &pinctrl_adc2_default>;
};
&vhub {
@@ -528,16 +834,17 @@
gpio-line-names =
/*A0-A7*/ "","","","","","i2c2-reset-n","i2c6-reset-n","i2c4-reset-n",
/*B0-B7*/ "","","","","host0-sysreset-n","host0-pmin-n","","",
- /*C0-C7*/ "s0-vrd-fault-n","s1-vrd-fault-n","","",
+ /*C0-C7*/ "s0-vrd-fault-n","s1-vrd-fault-n","bmc-debug-mode","",
"irq-n","","vrd-sel","spd-sel",
/*D0-D7*/ "presence-ps0","presence-ps1","hsc-12vmain-alt2-n","ext-high-temp-n",
"","bmc-ncsi-txen","","",
- /*E0-E7*/ "","","clk50m-bmc-ncsi","","","","","",
+ /*E0-E7*/ "","eth-phy-int-n","clk50m-bmc-ncsi","","","","","",
/*F0-F7*/ "s0-pcp-oc-warn-n","s1-pcp-oc-warn-n","power-chassis-control",
"cpu-bios-recover","s0-heartbeat","hs-csout-prochot",
"s0-vr-hot-n","s1-vr-hot-n",
/*G0-G7*/ "","","hsc-12vmain-alt1-n","","","","","",
- /*H0-H7*/ "","","wd-disable-n","power-chassis-good","","","","",
+ /*H0-H7*/ "jtag-program-sel","fpga-program-b","wd-disable-n",
+ "power-chassis-good","","","","",
/*I0-I7*/ "","","","","","adc-sw","power-button","rtc-battery-voltage-read-enable",
/*J0-J7*/ "","","","","","","","",
/*K0-K7*/ "","","","","","","","",
@@ -552,17 +859,17 @@
/*Q0-Q7*/ "","","","","","","","",
/*R0-R7*/ "","","","","","","","",
/*S0-S7*/ "","","identify-button","led-identify",
- "s1-ddr-save","spi-nor-access","sys-pgood","presence-cpu1",
+ "s1-ddr-save","spi-nor-access","host0-ready","presence-cpu1",
/*T0-T7*/ "","","","","","","","",
/*U0-U7*/ "","","","","","","","",
/*V0-V7*/ "s0-hightemp-n","s0-fault-alert","s0-sys-auth-failure-n",
- "host0-reboot-ack-n","host0-ready","host0-shd-req-n",
+ "host0-reboot-ack-n","s0-fw-boot-ok","host0-shd-req-n",
"host0-shd-ack-n","s0-overtemp-n",
- /*W0-W7*/ "","ocp-main-pwren","ocp-pgood","",
+ /*W0-W7*/ "ocp-aux-pwren","ocp-main-pwren","ocp-pgood","s1-pcp-pgood",
"bmc-ok","bmc-ready","spi0-program-sel","spi0-backup-sel",
/*X0-X7*/ "i2c-backup-sel","s1-fault-alert","s1-fw-boot-ok",
"s1-hightemp-n","s0-spi-auth-fail-n","s1-sys-auth-failure-n",
- "s1-overtemp-n","s1-spi-auth-fail-n",
+ "s1-overtemp-n","cpld-s1-spi-auth-fail-n",
/*Y0-Y7*/ "","","","","","","","host0-special-boot",
/*Z0-Z7*/ "reset-button","ps0-pgood","ps1-pgood","","","","","";
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-bytedance-g220a.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-bytedance-g220a.dts
index f75cad41ae6f..3f03a198a1a8 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-bytedance-g220a.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-bytedance-g220a.dts
@@ -424,7 +424,7 @@
&i2c3 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -471,7 +471,7 @@
&i2c6 {
status = "okay";
- i2c-switch@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9548";
reg = <0x72>;
#address-cells = <1>;
@@ -524,7 +524,7 @@
};
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -533,7 +533,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -569,7 +569,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -605,7 +605,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <2>;
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -640,7 +640,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -808,7 +808,7 @@
&i2c10 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -838,7 +838,7 @@
};
};
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-bletchley.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-bletchley.dts
index e899de681f47..5be0e8fd2633 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-bletchley.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-bletchley.dts
@@ -45,8 +45,8 @@
num-chipselects = <1>;
cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
- tpmdev@0 {
- compatible = "tcg,tpm_tis-spi";
+ tpm@0 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
spi-max-frequency = <33000000>;
reg = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cloudripper.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cloudripper.dts
index 5cd060029ea9..d49328fa487a 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cloudripper.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cloudripper.dts
@@ -132,7 +132,7 @@
* PCA9548 (1-0070) provides 8 channels connecting to SMB (Switch
* Main Board).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -194,7 +194,7 @@
* PCA9548 (2-0070) provides 8 channels connecting to SCM (System
* Controller Module).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -256,7 +256,7 @@
* PCA9548 (3-0070) provides 8 channels connecting to SMB (Switch
* Main Board).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -423,7 +423,7 @@
* PCA9548 (8-0070) provides 8 channels connecting to PDB (Power
* Delivery Board).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -486,7 +486,7 @@
* PCA9548 (15-0076) provides 8 channels connecting to FCM (Fan
* Controller Module).
*/
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cmm.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cmm.dts
index 90a3f485c67a..24153868cc00 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cmm.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-cmm.dts
@@ -328,7 +328,7 @@
&i2c1 {
status = "okay";
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -341,7 +341,7 @@
#size-cells = <0>;
reg = <0>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -390,7 +390,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -446,7 +446,7 @@
#size-cells = <0>;
reg = <1>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -495,7 +495,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -551,7 +551,7 @@
#size-cells = <0>;
reg = <2>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -600,7 +600,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -656,7 +656,7 @@
#size-cells = <0>;
reg = <3>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -705,7 +705,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -761,7 +761,7 @@
#size-cells = <0>;
reg = <4>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -810,7 +810,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -866,7 +866,7 @@
#size-cells = <0>;
reg = <5>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -915,7 +915,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -971,7 +971,7 @@
#size-cells = <0>;
reg = <6>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1020,7 +1020,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1076,7 +1076,7 @@
#size-cells = <0>;
reg = <7>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1125,7 +1125,7 @@
};
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1183,7 +1183,7 @@
&i2c2 {
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1281,7 +1281,7 @@
&i2c8 {
status = "okay";
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1294,7 +1294,7 @@
#size-cells = <0>;
reg = <0>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1350,7 +1350,7 @@
#size-cells = <0>;
reg = <1>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1406,7 +1406,7 @@
#size-cells = <0>;
reg = <2>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1462,7 +1462,7 @@
#size-cells = <0>;
reg = <3>;
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-elbert.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-elbert.dts
index b5cd4c7800b0..74f3c67e0eff 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-elbert.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-elbert.dts
@@ -65,7 +65,7 @@
};
&i2c2 {
- i2c-switch@75 {
+ i2c-mux@75 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -123,7 +123,7 @@
};
&i2c5 {
- i2c-switch@75 {
+ i2c-mux@75 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-fuji.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-fuji.dts
index 6b319f34a9b9..f23c26a3441d 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-fuji.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-fuji.dts
@@ -233,7 +233,7 @@
* PCA9548 (2-0070) provides 8 channels connecting to SCM (System
* Controller Module).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -303,7 +303,7 @@
* PCA9548 (8-0070) provides 8 channels connecting to SMB (Switch
* Main Board).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -315,7 +315,7 @@
#size-cells = <0>;
reg = <0>;
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -481,7 +481,7 @@
#size-cells = <0>;
reg = <1>;
- i2c-switch@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -544,7 +544,7 @@
#size-cells = <0>;
reg = <2>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -615,7 +615,7 @@
#size-cells = <0>;
reg = <3>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -715,7 +715,7 @@
* PCA9548 (11-0077) provides 8 channels connecting to SMB (Switch
* Main Board).
*/
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -727,7 +727,7 @@
#size-cells = <0>;
reg = <0>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -790,7 +790,7 @@
#size-cells = <0>;
reg = <1>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -853,7 +853,7 @@
#size-cells = <0>;
reg = <2>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -916,7 +916,7 @@
#size-cells = <0>;
reg = <3>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -979,7 +979,7 @@
#size-cells = <0>;
reg = <4>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1042,7 +1042,7 @@
#size-cells = <0>;
reg = <5>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1105,7 +1105,7 @@
#size-cells = <0>;
reg = <6>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1168,7 +1168,7 @@
#size-cells = <0>;
reg = <7>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minerva-cmc.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minerva-cmc.dts
new file mode 100644
index 000000000000..f04ef9063520
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minerva-cmc.dts
@@ -0,0 +1,265 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2023 Facebook Inc.
+/dts-v1/;
+
+#include "aspeed-g6.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/i2c/i2c.h>
+
+/ {
+ model = "Facebook Minerva CMC";
+ compatible = "facebook,minerva-cmc", "aspeed,ast2600";
+
+ aliases {
+ serial5 = &uart5;
+ };
+
+ chosen {
+ stdout-path = "serial5:57600n8";
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x80000000>;
+ };
+
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>,
+ <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,
+ <&adc1 2>;
+ };
+};
+
+&uart6 {
+ status = "okay";
+};
+
+&wdt1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdtrst1_default>;
+ aspeed,reset-type = "soc";
+ aspeed,external-signal;
+ aspeed,ext-push-pull;
+ aspeed,ext-active-high;
+ aspeed,ext-pulse-duration = <256>;
+};
+
+&mac3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rmii4_default>;
+ use-ncsi;
+ mlx,multi-host;
+};
+
+&fmc {
+ status = "okay";
+ flash@0 {
+ status = "okay";
+ m25p,fast-read;
+ label = "bmc";
+ spi-max-frequency = <50000000>;
+#include "openbmc-flash-layout-128.dtsi"
+ };
+ flash@1 {
+ status = "okay";
+ m25p,fast-read;
+ label = "alt-bmc";
+ spi-max-frequency = <50000000>;
+ };
+};
+
+&rtc {
+ status = "okay";
+};
+
+&sgpiom1 {
+ status = "okay";
+ ngpios = <128>;
+ bus-frequency = <2000000>;
+};
+
+&i2c0 {
+ status = "okay";
+};
+
+&i2c1 {
+ status = "okay";
+
+ temperature-sensor@4b {
+ compatible = "ti,tmp75";
+ reg = <0x4B>;
+ };
+
+ eeprom@51 {
+ compatible = "atmel,24c128";
+ reg = <0x51>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ i2c-mux@77 {
+ compatible = "nxp,pca9548";
+ reg = <0x77>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ i2c-mux-idle-disconnect;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <4>;
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <5>;
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+ };
+ };
+};
+
+&i2c3 {
+ status = "okay";
+};
+
+&i2c4 {
+ status = "okay";
+};
+
+&i2c5 {
+ status = "okay";
+};
+
+&i2c6 {
+ status = "okay";
+};
+
+&i2c7 {
+ status = "okay";
+};
+
+&i2c8 {
+ status = "okay";
+};
+
+&i2c9 {
+ status = "okay";
+};
+
+&i2c10 {
+ status = "okay";
+};
+
+&i2c11 {
+ status = "okay";
+};
+
+&i2c12 {
+ status = "okay";
+};
+
+&i2c13 {
+ status = "okay";
+};
+
+&i2c14 {
+ status = "okay";
+ multi-master;
+
+ ipmb@10 {
+ compatible = "ipmb-dev";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ i2c-protocol;
+ };
+};
+
+&i2c15 {
+ status = "okay";
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+};
+
+&adc0 {
+ aspeed,int-vref-microvolt = <2500000>;
+ status = "okay";
+ pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
+ &pinctrl_adc2_default &pinctrl_adc3_default
+ &pinctrl_adc4_default &pinctrl_adc5_default
+ &pinctrl_adc6_default &pinctrl_adc7_default>;
+};
+
+&adc1 {
+ aspeed,int-vref-microvolt = <2500000>;
+ status = "okay";
+ pinctrl-0 = <&pinctrl_adc10_default>;
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&uhci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minipack.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minipack.dts
index 230d16cd9967..aafd1042b6e5 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minipack.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-minipack.dts
@@ -344,7 +344,7 @@
* I2C Switch 2-0070 is connecting to SCM (System Controller
* Module).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -425,7 +425,7 @@
&i2c8 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -441,7 +441,7 @@
#size-cells = <0>;
reg = <0>;
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -507,7 +507,7 @@
#size-cells = <0>;
reg = <1>;
- i2c-switch@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -573,7 +573,7 @@
#size-cells = <0>;
reg = <2>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -639,7 +639,7 @@
#size-cells = <0>;
reg = <3>;
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -729,7 +729,7 @@
* I2C Switch 9-0070 is connecting to MAC/PHY EEPROMs on SMB
* (Switch Main Board).
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -793,7 +793,7 @@
&i2c11 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -809,7 +809,7 @@
#size-cells = <0>;
reg = <0>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -875,7 +875,7 @@
#size-cells = <0>;
reg = <1>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -941,7 +941,7 @@
#size-cells = <0>;
reg = <2>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1007,7 +1007,7 @@
#size-cells = <0>;
reg = <3>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1073,7 +1073,7 @@
#size-cells = <0>;
reg = <4>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1139,7 +1139,7 @@
#size-cells = <0>;
reg = <5>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1205,7 +1205,7 @@
#size-cells = <0>;
reg = <6>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -1271,7 +1271,7 @@
#size-cells = <0>;
reg = <7>;
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-tiogapass.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-tiogapass.dts
index b6b16356f571..704ee684e0fb 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-tiogapass.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-tiogapass.dts
@@ -211,7 +211,7 @@
&i2c1 {
status = "okay";
//X24 Riser
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9544";
#address-cells = <1>;
#size-cells = <0>;
@@ -243,7 +243,7 @@
pagesize = <32>;
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
@@ -303,7 +303,7 @@
pagesize = <32>;
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
@@ -363,7 +363,7 @@
pagesize = <32>;
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge100.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge100.dts
index 584efa528450..97cd11c3d9a5 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge100.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge100.dts
@@ -44,7 +44,7 @@
};
&i2c7 {
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge400.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge400.dts
index ed305948386f..5a8169bbda87 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge400.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-wedge400.dts
@@ -59,7 +59,8 @@
ast-adc-hwmon {
compatible = "iio-hwmon";
- io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>;
+ io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>,
+ <&adc 5>, <&adc 6>, <&adc 7>, <&adc 8>;
};
/*
@@ -79,8 +80,8 @@
gpio-miso = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_HIGH>;
num-chipselects = <1>;
- tpmdev@0 {
- compatible = "tcg,tpm_tis-spi";
+ tpm@0 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
spi-max-frequency = <33000000>;
reg = <0>;
};
@@ -138,7 +139,7 @@
&i2c2 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -218,7 +219,7 @@
&i2c8 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -287,7 +288,7 @@
&i2c11 {
status = "okay";
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -366,6 +367,7 @@
};
&sdhci1 {
+ max-frequency = <25000000>;
/*
* DMA mode needs to be disabled to avoid conflicts with UHCI
* Controller in AST2500 SoC.
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yamp.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yamp.dts
index 5e6105874217..98fe0d6c8188 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yamp.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yamp.dts
@@ -57,7 +57,7 @@
&i2c2 {
status = "okay";
- i2c-switch@75 {
+ i2c-mux@75 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yosemite4.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yosemite4.dts
new file mode 100644
index 000000000000..64075cc41d92
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-facebook-yosemite4.dts
@@ -0,0 +1,624 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2022 Facebook Inc.
+
+/dts-v1/;
+#include "aspeed-g6.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/leds/leds-pca955x.h>
+#include <dt-bindings/i2c/i2c.h>
+
+/ {
+ model = "Facebook Yosemite 4 BMC";
+ compatible = "facebook,yosemite4-bmc", "aspeed,ast2600";
+
+ aliases {
+ serial4 = &uart5;
+ serial5 = &uart6;
+ serial6 = &uart7;
+ serial7 = &uart8;
+ serial8 = &uart9;
+ };
+
+ chosen {
+ stdout-path = "serial4:57600n8";
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x80000000>;
+ };
+
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>,
+ <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,
+ <&adc1 0>, <&adc1 1>;
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&uart3 {
+ status = "okay";
+};
+
+&uart4 {
+ status = "okay";
+};
+
+&uart5 {
+ status = "okay";
+};
+
+&uart6 {
+ status = "okay";
+};
+
+&uart7 {
+ status = "okay";
+};
+
+&uart8 {
+ status = "okay";
+};
+
+&uart9 {
+ status = "okay";
+};
+
+&wdt1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdtrst1_default>;
+ aspeed,reset-type = "soc";
+ aspeed,external-signal;
+ aspeed,ext-push-pull;
+ aspeed,ext-active-high;
+ aspeed,ext-pulse-duration = <256>;
+};
+
+&mac2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rmii3_default>;
+ use-ncsi;
+ mlx,multi-host;
+};
+
+&mac3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rmii4_default>;
+ use-ncsi;
+ mlx,multi-host;
+};
+
+&fmc {
+ status = "okay";
+ flash@0 {
+ status = "okay";
+ m25p,fast-read;
+ label = "bmc";
+ spi-rx-bus-width = <4>;
+ spi-max-frequency = <50000000>;
+#include "openbmc-flash-layout-64.dtsi"
+ };
+ flash@1 {
+ status = "okay";
+ m25p,fast-read;
+ label = "bmc2";
+ spi-rx-bus-width = <4>;
+ spi-max-frequency = <50000000>;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c1 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c3 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c4 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c5 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c6 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c7 {
+ status = "okay";
+ mctp-controller;
+ bus-frequency = <400000>;
+ multi-master;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ power-sensor@40 {
+ compatible = "adi,adm1278";
+ reg = <0x40>;
+ };
+};
+
+&i2c8 {
+ status = "okay";
+ bus-frequency = <400000>;
+ i2c-mux@70 {
+ compatible = "nxp,pca9544";
+ idle-state = <0>;
+ i2c-mux-idle-disconnect;
+ reg = <0x70>;
+ };
+};
+
+&i2c9 {
+ status = "okay";
+ bus-frequency = <400000>;
+ i2c-mux@71 {
+ compatible = "nxp,pca9544";
+ idle-state = <0>;
+ i2c-mux-idle-disconnect;
+ reg = <0x71>;
+ };
+};
+
+&i2c10 {
+ status = "okay";
+ bus-frequency = <400000>;
+};
+
+&i2c11 {
+ status = "okay";
+ power-sensor@10 {
+ compatible = "adi, adm1272";
+ reg = <0x10>;
+ };
+
+ power-sensor@12 {
+ compatible = "adi, adm1272";
+ reg = <0x12>;
+ };
+
+ gpio@20 {
+ compatible = "nxp,pca9555";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpio@21 {
+ compatible = "nxp,pca9555";
+ reg = <0x21>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpio@22 {
+ compatible = "nxp,pca9555";
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpio@23 {
+ compatible = "nxp,pca9555";
+ reg = <0x23>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ temperature-sensor@48 {
+ compatible = "ti,tmp75";
+ reg = <0x48>;
+ };
+
+ temperature-sensor@49 {
+ compatible = "ti,tmp75";
+ reg = <0x49>;
+ };
+
+ temperature-sensor@4a {
+ compatible = "ti,tmp75";
+ reg = <0x4a>;
+ };
+
+ temperature-sensor@4b {
+ compatible = "ti,tmp75";
+ reg = <0x4b>;
+ };
+
+ eeprom@54 {
+ compatible = "atmel,24c256";
+ reg = <0x54>;
+ };
+};
+
+&i2c12 {
+ status = "okay";
+ bus-frequency = <400000>;
+
+ temperature-sensor@48 {
+ compatible = "ti,tmp75";
+ reg = <0x48>;
+ };
+
+ eeprom@50 {
+ compatible = "atmel,24c128";
+ reg = <0x50>;
+ };
+
+ rtc@6f {
+ compatible = "nuvoton,nct3018y";
+ reg = <0x6f>;
+ };
+};
+
+&i2c13 {
+ status = "okay";
+ bus-frequency = <400000>;
+};
+
+&i2c14 {
+ status = "okay";
+ bus-frequency = <400000>;
+ adc@1d {
+ compatible = "ti,adc128d818";
+ reg = <0x1d>;
+ ti,mode = /bits/ 8 <2>;
+ };
+
+ adc@35 {
+ compatible = "ti,adc128d818";
+ reg = <0x35>;
+ ti,mode = /bits/ 8 <2>;
+ };
+
+ adc@37 {
+ compatible = "ti,adc128d818";
+ reg = <0x37>;
+ ti,mode = /bits/ 8 <2>;
+ };
+
+ power-sensor@40 {
+ compatible = "ti,ina230";
+ reg = <0x40>;
+ };
+
+ power-sensor@41 {
+ compatible = "ti,ina230";
+ reg = <0x41>;
+ };
+
+ power-sensor@42 {
+ compatible = "ti,ina230";
+ reg = <0x42>;
+ };
+
+ power-sensor@43 {
+ compatible = "ti,ina230";
+ reg = <0x43>;
+ };
+
+ power-sensor@44 {
+ compatible = "ti,ina230";
+ reg = <0x44>;
+ };
+
+ temperature-sensor@4e {
+ compatible = "ti,tmp75";
+ reg = <0x4e>;
+ };
+
+ temperature-sensor@4f {
+ compatible = "ti,tmp75";
+ reg = <0x4f>;
+ };
+
+ eeprom@51 {
+ compatible = "atmel,24c128";
+ reg = <0x51>;
+ };
+
+ i2c-mux@71 {
+ compatible = "nxp,pca9846";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ idle-state = <0>;
+ i2c-mux-idle-disconnect;
+ reg = <0x71>;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ adc@1f {
+ compatible = "ti,adc128d818";
+ reg = <0x1f>;
+ ti,mode = /bits/ 8 <2>;
+ };
+
+ pwm@20{
+ compatible = "max31790";
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ gpio@22{
+ compatible = "ti,tca6424";
+ reg = <0x22>;
+ };
+
+ pwm@23{
+ compatible = "max31790";
+ reg = <0x23>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ adc@33 {
+ compatible = "maxim,max11615";
+ reg = <0x33>;
+ };
+
+ eeprom@52 {
+ compatible = "atmel,24c128";
+ reg = <0x52>;
+ };
+
+ gpio@61 {
+ compatible = "nxp,pca9552";
+ reg = <0x61>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+ };
+
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ adc@1f {
+ compatible = "ti,adc128d818";
+ reg = <0x1f>;
+ ti,mode = /bits/ 8 <2>;
+ };
+
+ pwm@20{
+ compatible = "max31790";
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ gpio@22{
+ compatible = "ti,tca6424";
+ reg = <0x22>;
+ };
+
+ pwm@23{
+ compatible = "max31790";
+ reg = <0x23>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ adc@33 {
+ compatible = "maxim,max11615";
+ reg = <0x33>;
+ };
+
+ eeprom@52 {
+ compatible = "atmel,24c128";
+ reg = <0x52>;
+ };
+
+ gpio@61 {
+ compatible = "nxp,pca9552";
+ reg = <0x61>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+ };
+ };
+
+ i2c-mux@73 {
+ compatible = "nxp,pca9544";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ idle-state = <0>;
+ i2c-mux-idle-disconnect;
+ reg = <0x73>;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ adc@35 {
+ compatible = "maxim,max11617";
+ reg = <0x35>;
+ };
+ };
+
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ adc@35 {
+ compatible = "maxim,max11617";
+ reg = <0x35>;
+ };
+ };
+ };
+};
+
+&i2c15 {
+ status = "okay";
+ mctp-controller;
+ multi-master;
+ bus-frequency = <400000>;
+
+ mctp@10 {
+ compatible = "mctp-i2c-controller";
+ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+
+ i2c-mux@72 {
+ compatible = "nxp,pca9544";
+ idle-state = <0>;
+ i2c-mux-idle-disconnect;
+ reg = <0x72>;
+ };
+};
+
+&adc0 {
+ ref_voltage = <2500>;
+ status = "okay";
+ pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
+ &pinctrl_adc2_default &pinctrl_adc3_default
+ &pinctrl_adc4_default &pinctrl_adc5_default
+ &pinctrl_adc6_default &pinctrl_adc7_default>;
+};
+
+&adc1 {
+ ref_voltage = <2500>;
+ status = "okay";
+ pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default>;
+};
+
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&uhci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-bonnell.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-bonnell.dts
index 81902cbe662c..cad1b9aac97b 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-bonnell.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-bonnell.dts
@@ -12,38 +12,11 @@
compatible = "ibm,bonnell-bmc", "aspeed,ast2600";
aliases {
- i2c100 = &cfam0_i2c0;
- i2c101 = &cfam0_i2c1;
- i2c110 = &cfam0_i2c10;
- i2c111 = &cfam0_i2c11;
- i2c112 = &cfam0_i2c12;
- i2c113 = &cfam0_i2c13;
- i2c114 = &cfam0_i2c14;
- i2c115 = &cfam0_i2c15;
- i2c202 = &cfam1_i2c2;
- i2c203 = &cfam1_i2c3;
- i2c210 = &cfam1_i2c10;
- i2c211 = &cfam1_i2c11;
- i2c214 = &cfam1_i2c14;
- i2c215 = &cfam1_i2c15;
- i2c216 = &cfam1_i2c16;
- i2c217 = &cfam1_i2c17;
-
serial4 = &uart5;
i2c16 = &i2c11mux0chn0;
i2c17 = &i2c11mux0chn1;
i2c18 = &i2c11mux0chn2;
i2c19 = &i2c11mux0chn3;
-
- spi10 = &cfam0_spi0;
- spi11 = &cfam0_spi1;
- spi12 = &cfam0_spi2;
- spi13 = &cfam0_spi3;
- spi20 = &cfam1_spi0;
- spi21 = &cfam1_spi1;
- spi22 = &cfam1_spi2;
- spi23 = &cfam1_spi3;
-
};
chosen {
@@ -61,6 +34,11 @@
#size-cells = <1>;
ranges;
+ event_log: tcg_event_log@b3d00000 {
+ no-map;
+ reg = <0xb3d00000 0x100000>;
+ };
+
ramoops@b3e00000 {
compatible = "ramoops";
reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
@@ -197,313 +175,6 @@
clk-phase-mmc-hs200 = <180>, <180>;
};
-&fsim0 {
- status = "okay";
-
- #address-cells = <2>;
- #size-cells = <0>;
-
- cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_HIGH>;
-
- cfam@0,0 {
- reg = <0 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <0>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam0_i2c0: i2c-bus@0 {
- reg = <0>; /* OMI01 */
- };
-
- cfam0_i2c1: i2c-bus@1 {
- reg = <1>; /* OMI23 */
- };
-
- cfam0_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam0_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam0_i2c12: i2c-bus@c {
- reg = <12>; /* OP4A */
- };
-
- cfam0_i2c13: i2c-bus@d {
- reg = <13>; /* OP4B */
- };
-
- cfam0_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam0_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam0_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
-
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- fsi_occ0: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
-
- fsi_hub0: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
- };
- };
-};
-
-&fsi_hub0 {
- cfam@1,0 {
- reg = <1 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <1>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam1_i2c2: i2c-bus@2 {
- reg = <2>; /* OMI45 */
- };
-
- cfam1_i2c3: i2c-bus@3 {
- reg = <3>; /* OMI67 */
- };
-
- cfam1_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam1_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam1_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam1_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
-
- cfam1_i2c16: i2c-bus@10 {
- reg = <16>; /* OP6A */
- };
-
- cfam1_i2c17: i2c-bus@11 {
- reg = <17>; /* OP6B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam1_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam1_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam1_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam1_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
-
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- fsi_occ1: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
-
- fsi_hub1: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
-
- no-scan-on-init;
- };
- };
-};
-
&ibt {
status = "okay";
};
@@ -788,8 +459,9 @@
status = "okay";
tpm@2e {
- compatible = "nuvoton,npct75x";
+ compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
reg = <0x2e>;
+ memory-region = <&event_log>;
};
eeprom@50 {
@@ -913,3 +585,33 @@
aspeed,lpc-io-reg = <0xca2>;
aspeed,lpc-interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
+
+#include "ibm-power10-dual.dtsi"
+
+&cfam0_i2c10 {
+ eeprom@50 {
+ compatible = "atmel,at30tse004a";
+ reg = <0x50>;
+ };
+};
+
+&cfam0_i2c11 {
+ eeprom@50 {
+ compatible = "atmel,at30tse004a";
+ reg = <0x50>;
+ };
+};
+
+&cfam0_i2c12 {
+ eeprom@50 {
+ compatible = "atmel,at30tse004a";
+ reg = <0x50>;
+ };
+};
+
+&cfam0_i2c13 {
+ eeprom@50 {
+ compatible = "atmel,at30tse004a";
+ reg = <0x50>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-everest.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-everest.dts
index c6f8f20914d1..214b2e6a4c6d 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-everest.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-everest.dts
@@ -12,38 +12,6 @@
compatible = "ibm,everest-bmc", "aspeed,ast2600";
aliases {
- i2c100 = &cfam0_i2c0;
- i2c101 = &cfam0_i2c1;
- i2c110 = &cfam0_i2c10;
- i2c111 = &cfam0_i2c11;
- i2c112 = &cfam0_i2c12;
- i2c113 = &cfam0_i2c13;
- i2c114 = &cfam0_i2c14;
- i2c115 = &cfam0_i2c15;
- i2c202 = &cfam1_i2c2;
- i2c203 = &cfam1_i2c3;
- i2c210 = &cfam1_i2c10;
- i2c211 = &cfam1_i2c11;
- i2c214 = &cfam1_i2c14;
- i2c215 = &cfam1_i2c15;
- i2c216 = &cfam1_i2c16;
- i2c217 = &cfam1_i2c17;
- i2c300 = &cfam2_i2c0;
- i2c301 = &cfam2_i2c1;
- i2c310 = &cfam2_i2c10;
- i2c311 = &cfam2_i2c11;
- i2c312 = &cfam2_i2c12;
- i2c313 = &cfam2_i2c13;
- i2c314 = &cfam2_i2c14;
- i2c315 = &cfam2_i2c15;
- i2c402 = &cfam3_i2c2;
- i2c403 = &cfam3_i2c3;
- i2c410 = &cfam3_i2c10;
- i2c411 = &cfam3_i2c11;
- i2c414 = &cfam3_i2c14;
- i2c415 = &cfam3_i2c15;
- i2c416 = &cfam3_i2c16;
- i2c417 = &cfam3_i2c17;
i2c500 = &cfam4_i2c0;
i2c501 = &cfam4_i2c1;
i2c510 = &cfam4_i2c10;
@@ -113,22 +81,72 @@
serial4 = &uart5;
- spi10 = &cfam0_spi0;
- spi11 = &cfam0_spi1;
- spi12 = &cfam0_spi2;
- spi13 = &cfam0_spi3;
- spi20 = &cfam1_spi0;
- spi21 = &cfam1_spi1;
- spi22 = &cfam1_spi2;
- spi23 = &cfam1_spi3;
- spi30 = &cfam2_spi0;
- spi31 = &cfam2_spi1;
- spi32 = &cfam2_spi2;
- spi33 = &cfam2_spi3;
- spi40 = &cfam3_spi0;
- spi41 = &cfam3_spi1;
- spi42 = &cfam3_spi2;
- spi43 = &cfam3_spi3;
+ sbefifo500 = &sbefifo500;
+ sbefifo501 = &sbefifo501;
+ sbefifo510 = &sbefifo510;
+ sbefifo511 = &sbefifo511;
+ sbefifo512 = &sbefifo512;
+ sbefifo513 = &sbefifo513;
+ sbefifo514 = &sbefifo514;
+ sbefifo515 = &sbefifo515;
+ sbefifo602 = &sbefifo602;
+ sbefifo603 = &sbefifo603;
+ sbefifo610 = &sbefifo610;
+ sbefifo611 = &sbefifo611;
+ sbefifo614 = &sbefifo614;
+ sbefifo615 = &sbefifo615;
+ sbefifo616 = &sbefifo616;
+ sbefifo617 = &sbefifo617;
+ sbefifo700 = &sbefifo700;
+ sbefifo701 = &sbefifo701;
+ sbefifo710 = &sbefifo710;
+ sbefifo711 = &sbefifo711;
+ sbefifo712 = &sbefifo712;
+ sbefifo713 = &sbefifo713;
+ sbefifo714 = &sbefifo714;
+ sbefifo715 = &sbefifo715;
+ sbefifo802 = &sbefifo802;
+ sbefifo803 = &sbefifo803;
+ sbefifo810 = &sbefifo810;
+ sbefifo811 = &sbefifo811;
+ sbefifo814 = &sbefifo814;
+ sbefifo815 = &sbefifo815;
+ sbefifo816 = &sbefifo816;
+ sbefifo817 = &sbefifo817;
+
+ scom500 = &scom500;
+ scom501 = &scom501;
+ scom510 = &scom510;
+ scom511 = &scom511;
+ scom512 = &scom512;
+ scom513 = &scom513;
+ scom514 = &scom514;
+ scom515 = &scom515;
+ scom602 = &scom602;
+ scom603 = &scom603;
+ scom610 = &scom610;
+ scom611 = &scom611;
+ scom614 = &scom614;
+ scom615 = &scom615;
+ scom616 = &scom616;
+ scom617 = &scom617;
+ scom700 = &scom700;
+ scom701 = &scom701;
+ scom710 = &scom710;
+ scom711 = &scom711;
+ scom712 = &scom712;
+ scom713 = &scom713;
+ scom714 = &scom714;
+ scom715 = &scom715;
+ scom802 = &scom802;
+ scom803 = &scom803;
+ scom810 = &scom810;
+ scom811 = &scom811;
+ scom814 = &scom814;
+ scom815 = &scom815;
+ scom816 = &scom816;
+ scom817 = &scom817;
+
spi50 = &cfam4_spi0;
spi51 = &cfam4_spi1;
spi52 = &cfam4_spi2;
@@ -399,7 +417,7 @@
"expander-cable-card5";
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -544,7 +562,7 @@
"expander-cable-card11";
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -701,7 +719,7 @@
&i2c6 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -1792,7 +1810,7 @@
reg = <0x50>;
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -1929,7 +1947,7 @@
reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -2188,7 +2206,7 @@
};
};
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -2241,7 +2259,7 @@
&i2c15 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -2293,7 +2311,7 @@
};
};
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -2345,7 +2363,7 @@
};
};
- i2c-switch@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9546";
reg = <0x72>;
#address-cells = <1>;
@@ -2413,172 +2431,85 @@
clk-phase-mmc-hs200 = <210>, <228>;
};
-&fsim0 {
+&ibt {
status = "okay";
+};
- #address-cells = <2>;
- #size-cells = <0>;
-
- /*
- * CFAM Reset is supposed to be active low but pass1 hardware is wired
- * active high.
- */
- cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_HIGH>;
-
- cfam@0,0 { /* DCM0_C0 */
- reg = <0 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <0>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam0_i2c0: i2c-bus@0 {
- reg = <0>; /* OMI01 */
- };
-
- cfam0_i2c1: i2c-bus@1 {
- reg = <1>; /* OMI23 */
- };
-
- cfam0_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam0_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam0_i2c12: i2c-bus@c {
- reg = <12>; /* OP4A */
- };
-
- cfam0_i2c13: i2c-bus@d {
- reg = <13>; /* OP4B */
- };
-
- cfam0_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam0_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam0_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+&uart2 {
+ status = "okay";
+};
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
+&vuart1 {
+ status = "okay";
+};
- cfam0_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
+&vuart2 {
+ status = "okay";
+};
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+&lpc_ctrl {
+ status = "okay";
+ memory-region = <&flash_memory>;
+};
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
+&mac2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rmii3_default>;
+ clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>,
+ <&syscon ASPEED_CLK_MAC3RCLK>;
+ clock-names = "MACCLK", "RCLK";
+ use-ncsi;
+};
- cfam0_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
+&mac3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rmii4_default>;
+ clocks = <&syscon ASPEED_CLK_GATE_MAC4CLK>,
+ <&syscon ASPEED_CLK_MAC4RCLK>;
+ clock-names = "MACCLK", "RCLK";
+ use-ncsi;
+};
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+&wdt1 {
+ aspeed,reset-type = "none";
+ aspeed,external-signal;
+ aspeed,ext-push-pull;
+ aspeed,ext-active-high;
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdtrst1_default>;
+};
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+&wdt2 {
+ status = "okay";
+};
- fsi_occ0: occ {
- compatible = "ibm,p10-occ";
+&xdma {
+ status = "okay";
+ memory-region = <&vga_memory>;
+};
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
+&kcs2 {
+ status = "okay";
+ aspeed,lpc-io-reg = <0xca8 0xcac>;
+};
- fsi_hub0: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
- };
- };
+&kcs3 {
+ status = "okay";
+ aspeed,lpc-io-reg = <0xca2>;
+ aspeed,lpc-interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
+#include "ibm-power10-quad.dtsi"
+
&fsi_hub0 {
- cfam@1,0 { /* DCM0_C1 */
- reg = <1 0>;
+ cfam@4,0 { /* DCM2_C0 */
+ reg = <4 0>;
#address-cells = <1>;
#size-cells = <1>;
- chip-id = <1>;
+ chip-id = <4>;
scom@1000 {
compatible = "ibm,fsi2pib";
@@ -2591,185 +2522,260 @@
#address-cells = <1>;
#size-cells = <0>;
- cfam1_i2c2: i2c-bus@2 {
- reg = <2>; /* OMI45 */
- };
+ cfam4_i2c0: i2c-bus@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>; /* OM01 */
- cfam1_i2c3: i2c-bus@3 {
- reg = <3>; /* OMI67 */
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam1_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- cfam1_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
+ scom500: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- cfam1_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
+ sbefifo500: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
- cfam1_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
+ cfam4_i2c1: i2c-bus@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>; /* OM23 */
- cfam1_i2c16: i2c-bus@10 {
- reg = <16>; /* OP6A */
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam1_i2c17: i2c-bus@11 {
- reg = <17>; /* OP6B */
- };
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ scom501: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- cfam1_spi0: spi@0 {
- reg = <0x0>;
+ sbefifo501: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam4_i2c10: i2c-bus@a {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <10>; /* OP3A */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom510: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo510: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam1_spi1: spi@20 {
- reg = <0x20>;
+ cfam4_i2c11: i2c-bus@b {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <11>; /* OP3B */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom511: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo511: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam1_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
+ cfam4_i2c12: i2c-bus@c {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <12>; /* OP4A */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom512: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo512: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam1_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ cfam4_i2c13: i2c-bus@d {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <13>; /* OP4B */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ scom513: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- fsi_occ1: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
+ sbefifo513: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- };
- fsi_hub1: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
-
- no-scan-on-init;
- };
- };
-
- cfam@2,0 { /* DCM1_C0 */
- reg = <2 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <2>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
+ cfam4_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <14>; /* OP5A */
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam2_i2c0: i2c-bus@0 {
- reg = <0>; /* OM01 */
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- cfam2_i2c1: i2c-bus@1 {
- reg = <1>; /* OM23 */
- };
+ scom514: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- cfam2_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
+ sbefifo514: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
- cfam2_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
+ cfam4_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <15>; /* OP5B */
- cfam2_i2c12: i2c-bus@c {
- reg = <12>; /* OP4A */
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam2_i2c13: i2c-bus@d {
- reg = <13>; /* OP4B */
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- cfam2_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
+ scom515: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- cfam2_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
+ sbefifo515: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
};
@@ -2779,7 +2785,7 @@
#address-cells = <1>;
#size-cells = <0>;
- cfam2_spi0: spi@0 {
+ cfam4_spi0: spi@0 {
reg = <0x0>;
#address-cells = <1>;
#size-cells = <0>;
@@ -2795,7 +2801,7 @@
};
};
- cfam2_spi1: spi@20 {
+ cfam4_spi1: spi@20 {
reg = <0x20>;
#address-cells = <1>;
#size-cells = <0>;
@@ -2811,9 +2817,9 @@
};
};
- cfam2_spi2: spi@40 {
+ cfam4_spi2: spi@40 {
reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -2828,9 +2834,9 @@
};
};
- cfam2_spi3: spi@60 {
+ cfam4_spi3: spi@60 {
reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -2852,7 +2858,7 @@
#address-cells = <1>;
#size-cells = <0>;
- fsi_occ2: occ {
+ fsi_occ4: occ {
compatible = "ibm,p10-occ";
occ-hwmon {
@@ -2862,7 +2868,7 @@
};
};
- fsi_hub2: hub@3400 {
+ fsi_hub4: hub@3400 {
compatible = "fsi-master-hub";
reg = <0x3400 0x400>;
#address-cells = <2>;
@@ -2872,11 +2878,11 @@
};
};
- cfam@3,0 { /* DCM1_C1 */
- reg = <3 0>;
+ cfam@5,0 { /* DCM2_C1 */
+ reg = <5 0>;
#address-cells = <1>;
#size-cells = <1>;
- chip-id = <3>;
+ chip-id = <5>;
scom@1000 {
compatible = "ibm,fsi2pib";
@@ -2889,334 +2895,260 @@
#address-cells = <1>;
#size-cells = <0>;
- cfam3_i2c2: i2c-bus@2 {
+ cfam5_i2c2: i2c-bus@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <2>; /* OM45 */
- };
-
- cfam3_i2c3: i2c-bus@3 {
- reg = <3>; /* OM67 */
- };
-
- cfam3_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam3_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam3_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam3_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
-
- cfam3_i2c16: i2c-bus@10 {
- reg = <16>; /* OP6A */
- };
- cfam3_i2c17: i2c-bus@11 {
- reg = <17>; /* OP6B */
- };
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- cfam3_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ scom602: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ sbefifo602: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam3_spi1: spi@20 {
- reg = <0x20>;
+ cfam5_i2c3: i2c-bus@3 {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <3>; /* OM67 */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam3_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+ scom603: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ sbefifo603: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam3_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ cfam5_i2c10: i2c-bus@a {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <10>; /* OP3A */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- fsi_occ3: occ {
- compatible = "ibm,p10-occ";
+ scom610: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
+ sbefifo610: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- };
-
- fsi_hub3: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
-
- no-scan-on-init;
- };
- };
-
- cfam@4,0 { /* DCM2_C0 */
- reg = <4 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <4>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam4_i2c0: i2c-bus@0 {
- reg = <0>; /* OM01 */
- };
-
- cfam4_i2c1: i2c-bus@1 {
- reg = <1>; /* OM23 */
- };
- cfam4_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam4_i2c11: i2c-bus@b {
+ cfam5_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <11>; /* OP3B */
- };
- cfam4_i2c12: i2c-bus@c {
- reg = <12>; /* OP4A */
- };
-
- cfam4_i2c13: i2c-bus@d {
- reg = <13>; /* OP4B */
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam4_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- cfam4_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
- };
+ scom611: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam4_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ sbefifo611: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam4_spi1: spi@20 {
- reg = <0x20>;
+ cfam5_i2c14: i2c-bus@e {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <14>; /* OP5A */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam4_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
+ scom614: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
+ sbefifo614: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- cfam4_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ cfam5_i2c15: i2c-bus@f {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <15>; /* OP5B */
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- fsi_occ4: occ {
- compatible = "ibm,p10-occ";
+ scom615: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
+ sbefifo615: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
};
- };
-
- fsi_hub4: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
- no-scan-on-init;
- };
- };
+ cfam5_i2c16: i2c-bus@10 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <16>; /* OP6A */
- cfam@5,0 { /* DCM2_C1 */
- reg = <5 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <5>;
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
+ scom616: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- cfam5_i2c2: i2c-bus@2 {
- reg = <2>; /* OM45 */
- };
-
- cfam5_i2c3: i2c-bus@3 {
- reg = <3>; /* OM67 */
- };
-
- cfam5_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
+ sbefifo616: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
- cfam5_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
+ cfam5_i2c17: i2c-bus@11 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <17>; /* OP6B */
- cfam5_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
- cfam5_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
- cfam5_i2c16: i2c-bus@10 {
- reg = <16>; /* OP6A */
- };
+ scom617: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
- cfam5_i2c17: i2c-bus@11 {
- reg = <17>; /* OP6B */
+ sbefifo617: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
};
@@ -3260,7 +3192,7 @@
cfam5_spi2: spi@40 {
reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -3277,7 +3209,7 @@
cfam5_spi3: spi@60 {
reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -3337,35 +3269,259 @@
#size-cells = <0>;
cfam6_i2c0: i2c-bus@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0>; /* OM01 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom700: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo700: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c1: i2c-bus@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <1>; /* OM23 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom701: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo701: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c10: i2c-bus@a {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <10>; /* OP3A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom710: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo710: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <11>; /* OP3B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom711: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo711: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c12: i2c-bus@c {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <12>; /* OP4A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom712: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo712: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c13: i2c-bus@d {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <13>; /* OP4B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom713: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo713: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <14>; /* OP5A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom714: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo714: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam6_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <15>; /* OP5B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom715: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo715: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
};
@@ -3409,7 +3565,7 @@
cfam6_spi2: spi@40 {
reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -3426,7 +3582,7 @@
cfam6_spi3: spi@60 {
reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -3486,35 +3642,259 @@
#size-cells = <0>;
cfam7_i2c2: i2c-bus@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <2>; /* OM45 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom802: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo802: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c3: i2c-bus@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <3>; /* OM67 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom803: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo803: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c10: i2c-bus@a {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <10>; /* OP3A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom810: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo810: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <11>; /* OP3B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom811: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo811: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <14>; /* OP5A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom814: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo814: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <15>; /* OP5B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom815: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo815: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c16: i2c-bus@10 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <16>; /* OP6A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom816: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo816: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
cfam7_i2c17: i2c-bus@11 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <17>; /* OP6B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom817: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo817: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
};
@@ -3558,7 +3938,7 @@
cfam7_spi2: spi@40 {
reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -3575,7 +3955,7 @@
cfam7_spi3: spi@60 {
reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
+ compatible = "ibm,fsi2spi";
#address-cells = <1>;
#size-cells = <0>;
@@ -3619,22 +3999,6 @@
};
/* Legacy OCC numbering (to get rid of when userspace is fixed) */
-&fsi_occ0 {
- reg = <1>;
-};
-
-&fsi_occ1 {
- reg = <2>;
-};
-
-&fsi_occ2 {
- reg = <3>;
-};
-
-&fsi_occ3 {
- reg = <4>;
-};
-
&fsi_occ4 {
reg = <5>;
};
@@ -3650,74 +4014,3 @@
&fsi_occ7 {
reg = <8>;
};
-
-&ibt {
- status = "okay";
-};
-
-&uart2 {
- status = "okay";
-};
-
-&vuart1 {
- status = "okay";
-};
-
-&vuart2 {
- status = "okay";
-};
-
-&lpc_ctrl {
- status = "okay";
- memory-region = <&flash_memory>;
-};
-
-&mac2 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_rmii3_default>;
- clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>,
- <&syscon ASPEED_CLK_MAC3RCLK>;
- clock-names = "MACCLK", "RCLK";
- use-ncsi;
-};
-
-&mac3 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_rmii4_default>;
- clocks = <&syscon ASPEED_CLK_GATE_MAC4CLK>,
- <&syscon ASPEED_CLK_MAC4RCLK>;
- clock-names = "MACCLK", "RCLK";
- use-ncsi;
-};
-
-&wdt1 {
- aspeed,reset-type = "none";
- aspeed,external-signal;
- aspeed,ext-push-pull;
- aspeed,ext-active-high;
-
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_wdtrst1_default>;
-};
-
-&wdt2 {
- status = "okay";
-};
-
-&xdma {
- status = "okay";
- memory-region = <&vga_memory>;
-};
-
-&kcs2 {
- status = "okay";
- aspeed,lpc-io-reg = <0xca8 0xcac>;
-};
-
-&kcs3 {
- status = "okay";
- aspeed,lpc-io-reg = <0xca2>;
- aspeed,lpc-interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
-};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-rainier.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-rainier.dts
index 7162e65b8115..5cb0094e21e0 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-rainier.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-ibm-rainier.dts
@@ -12,39 +12,6 @@
compatible = "ibm,rainier-bmc", "aspeed,ast2600";
aliases {
- i2c100 = &cfam0_i2c0;
- i2c101 = &cfam0_i2c1;
- i2c110 = &cfam0_i2c10;
- i2c111 = &cfam0_i2c11;
- i2c112 = &cfam0_i2c12;
- i2c113 = &cfam0_i2c13;
- i2c114 = &cfam0_i2c14;
- i2c115 = &cfam0_i2c15;
- i2c202 = &cfam1_i2c2;
- i2c203 = &cfam1_i2c3;
- i2c210 = &cfam1_i2c10;
- i2c211 = &cfam1_i2c11;
- i2c214 = &cfam1_i2c14;
- i2c215 = &cfam1_i2c15;
- i2c216 = &cfam1_i2c16;
- i2c217 = &cfam1_i2c17;
- i2c300 = &cfam2_i2c0;
- i2c301 = &cfam2_i2c1;
- i2c310 = &cfam2_i2c10;
- i2c311 = &cfam2_i2c11;
- i2c312 = &cfam2_i2c12;
- i2c313 = &cfam2_i2c13;
- i2c314 = &cfam2_i2c14;
- i2c315 = &cfam2_i2c15;
- i2c402 = &cfam3_i2c2;
- i2c403 = &cfam3_i2c3;
- i2c410 = &cfam3_i2c10;
- i2c411 = &cfam3_i2c11;
- i2c414 = &cfam3_i2c14;
- i2c415 = &cfam3_i2c15;
- i2c416 = &cfam3_i2c16;
- i2c417 = &cfam3_i2c17;
-
serial4 = &uart5;
i2c16 = &i2c2mux0;
i2c17 = &i2c2mux1;
@@ -61,23 +28,6 @@
i2c28 = &i2c6mux0chn3;
i2c29 = &i2c11mux0chn0;
i2c30 = &i2c11mux0chn1;
-
- spi10 = &cfam0_spi0;
- spi11 = &cfam0_spi1;
- spi12 = &cfam0_spi2;
- spi13 = &cfam0_spi3;
- spi20 = &cfam1_spi0;
- spi21 = &cfam1_spi1;
- spi22 = &cfam1_spi2;
- spi23 = &cfam1_spi3;
- spi30 = &cfam2_spi0;
- spi31 = &cfam2_spi1;
- spi32 = &cfam2_spi2;
- spi33 = &cfam2_spi3;
- spi40 = &cfam3_spi0;
- spi41 = &cfam3_spi1;
- spi42 = &cfam3_spi2;
- spi43 = &cfam3_spi3;
};
chosen {
@@ -301,632 +251,6 @@
clk-phase-mmc-hs200 = <180>, <180>;
};
-&fsim0 {
- status = "okay";
-
- #address-cells = <2>;
- #size-cells = <0>;
-
- /*
- * CFAM Reset is supposed to be active low but pass1 hardware is wired
- * active high.
- */
- cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_HIGH>;
-
- cfam@0,0 {
- reg = <0 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <0>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam0_i2c0: i2c-bus@0 {
- reg = <0>; /* OMI01 */
- };
-
- cfam0_i2c1: i2c-bus@1 {
- reg = <1>; /* OMI23 */
- };
-
- cfam0_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam0_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam0_i2c12: i2c-bus@c {
- reg = <12>; /* OP4A */
- };
-
- cfam0_i2c13: i2c-bus@d {
- reg = <13>; /* OP4B */
- };
-
- cfam0_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam0_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam0_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam0_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
-
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- fsi_occ0: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
-
- fsi_hub0: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
- };
- };
-};
-
-&fsi_hub0 {
- cfam@1,0 {
- reg = <1 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <1>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam1_i2c2: i2c-bus@2 {
- reg = <2>; /* OMI45 */
- };
-
- cfam1_i2c3: i2c-bus@3 {
- reg = <3>; /* OMI67 */
- };
-
- cfam1_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam1_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam1_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam1_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
-
- cfam1_i2c16: i2c-bus@10 {
- reg = <16>; /* OP6A */
- };
-
- cfam1_i2c17: i2c-bus@11 {
- reg = <17>; /* OP6B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam1_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam1_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam1_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam1_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
-
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- fsi_occ1: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
-
- fsi_hub1: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
-
- no-scan-on-init;
- };
- };
-
- cfam@2,0 {
- reg = <2 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <2>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam2_i2c0: i2c-bus@0 {
- reg = <0>; /* OM01 */
- };
-
- cfam2_i2c1: i2c-bus@1 {
- reg = <1>; /* OM23 */
- };
-
- cfam2_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam2_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam2_i2c12: i2c-bus@c {
- reg = <12>; /* OP4A */
- };
-
- cfam2_i2c13: i2c-bus@d {
- reg = <13>; /* OP4B */
- };
-
- cfam2_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam2_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam2_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam2_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam2_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam2_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
-
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- fsi_occ2: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
-
- fsi_hub2: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
-
- no-scan-on-init;
- };
- };
-
- cfam@3,0 {
- reg = <3 0>;
- #address-cells = <1>;
- #size-cells = <1>;
- chip-id = <3>;
-
- scom@1000 {
- compatible = "ibm,fsi2pib";
- reg = <0x1000 0x400>;
- };
-
- i2c@1800 {
- compatible = "ibm,fsi-i2c-master";
- reg = <0x1800 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam3_i2c2: i2c-bus@2 {
- reg = <2>; /* OM45 */
- };
-
- cfam3_i2c3: i2c-bus@3 {
- reg = <3>; /* OM67 */
- };
-
- cfam3_i2c10: i2c-bus@a {
- reg = <10>; /* OP3A */
- };
-
- cfam3_i2c11: i2c-bus@b {
- reg = <11>; /* OP3B */
- };
-
- cfam3_i2c14: i2c-bus@e {
- reg = <14>; /* OP5A */
- };
-
- cfam3_i2c15: i2c-bus@f {
- reg = <15>; /* OP5B */
- };
-
- cfam3_i2c16: i2c-bus@10 {
- reg = <16>; /* OP6A */
- };
-
- cfam3_i2c17: i2c-bus@11 {
- reg = <17>; /* OP6B */
- };
- };
-
- fsi2spi@1c00 {
- compatible = "ibm,fsi2spi";
- reg = <0x1c00 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- cfam3_spi0: spi@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam3_spi1: spi@20 {
- reg = <0x20>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam3_spi2: spi@40 {
- reg = <0x40>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
-
- cfam3_spi3: spi@60 {
- reg = <0x60>;
- compatible = "ibm,fsi2spi-restricted";
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@0 {
- at25,byte-len = <0x80000>;
- at25,addr-mode = <4>;
- at25,page-size = <256>;
-
- compatible = "atmel,at25";
- reg = <0>;
- spi-max-frequency = <1000000>;
- };
- };
- };
-
- sbefifo@2400 {
- compatible = "ibm,p9-sbefifo";
- reg = <0x2400 0x400>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- fsi_occ3: occ {
- compatible = "ibm,p10-occ";
-
- occ-hwmon {
- compatible = "ibm,p10-occ-hwmon";
- ibm,no-poll-on-init;
- };
- };
- };
-
- fsi_hub3: hub@3400 {
- compatible = "fsi-master-hub";
- reg = <0x3400 0x400>;
- #address-cells = <2>;
- #size-cells = <0>;
-
- no-scan-on-init;
- };
- };
-};
-
-/* Legacy OCC numbering (to get rid of when userspace is fixed) */
-&fsi_occ0 {
- reg = <1>;
-};
-
-&fsi_occ1 {
- reg = <2>;
-};
-
-&fsi_occ2 {
- reg = <3>;
-};
-
-&fsi_occ3 {
- reg = <4>;
-};
-
&ibt {
status = "okay";
};
@@ -1017,7 +341,7 @@
reg = <0x4a>;
};
- pca9546@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -1099,7 +423,7 @@
reg = <0x49>;
};
- pca9546@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -1201,7 +525,7 @@
reg = <0x4b>;
};
- pca9546@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -2031,7 +1355,7 @@
reg = <0x49>;
};
- pca9546@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -2092,11 +1416,6 @@
&i2c12 {
status = "okay";
- tpm@2e {
- compatible = "nuvoton,npct75x";
- reg = <0x2e>;
- };
-
eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
@@ -2418,3 +1737,5 @@
aspeed,lpc-io-reg = <0xca2>;
aspeed,lpc-interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
+
+#include "ibm-power10-quad.dtsi"
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-fp5280g2.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-fp5280g2.dts
index 208b0f094ed9..0dea014e4f30 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-fp5280g2.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-fp5280g2.dts
@@ -348,7 +348,7 @@
label = "outlet";
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -432,7 +432,7 @@
&i2c7 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-nf5280m6.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-nf5280m6.dts
index b3c1e3ba5831..92b9b3987c92 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-nf5280m6.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inspur-nf5280m6.dts
@@ -215,7 +215,7 @@
label = "outlet";
};
- pca9548@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
reg = <0x70>;
};
@@ -224,17 +224,17 @@
&i2c3 {
status = "okay";
- pca9548@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
reg = <0x70>;
};
- pca9548@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9548";
reg = <0x71>;
};
- pca9548@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9548";
reg = <0x72>;
};
@@ -248,7 +248,7 @@
&i2c5 {
status = "okay";
- pca9548@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
reg = <0x70>;
};
@@ -257,7 +257,7 @@
&i2c6 {
status = "okay";
- pca9548@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
reg = <0x70>;
};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-starscream.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-starscream.dts
new file mode 100644
index 000000000000..ec82af94e1fb
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-starscream.dts
@@ -0,0 +1,389 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2023 Inventec Corp.
+
+/dts-v1/;
+
+#include "aspeed-g6.dtsi"
+#include "aspeed-g6-pinctrl.dtsi"
+#include <dt-bindings/i2c/i2c.h>
+#include <dt-bindings/gpio/aspeed-gpio.h>
+
+/ {
+ model = "STARSCREAM BMC";
+ compatible = "inventec,starscream-bmc", "aspeed,ast2600";
+
+ aliases {
+ serial4 = &uart5;
+ };
+
+ chosen {
+ stdout-path = &uart5;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x80000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ video_engine_memory: video {
+ size = <0x04000000>;
+ alignment = <0x01000000>;
+ compatible = "shared-dma-pool";
+ reusable;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-uid {
+ label = "UID_LED";
+ gpios = <&gpio0 186 GPIO_ACTIVE_LOW>;
+ };
+
+ led-heartbeat {
+ label = "HB_LED";
+ gpios = <&gpio0 127 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&mdio0 {
+ status = "okay";
+
+ ethphy0: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+};
+
+&mac2 {
+ status = "okay";
+ pinctrl-names = "default";
+ phy-mode = "rmii";
+ pinctrl-0 = <&pinctrl_rmii3_default>;
+ use-ncsi;
+};
+
+&mac3 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&ethphy0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rgmii4_default>;
+};
+
+&fmc {
+ status = "okay";
+ flash@0 {
+ status = "okay";
+ m25p,fast-read;
+ label = "bmc";
+ spi-max-frequency = <50000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+#include "openbmc-flash-layout.dtsi"
+ };
+
+ flash@1 {
+ status = "okay";
+ m25p,fast-read;
+ label = "bmc2";
+ spi-max-frequency = <50000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ };
+};
+
+&spi1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi1_default>;
+
+ flash@0 {
+ status = "okay";
+ m25p,fast-read;
+ label = "bios";
+ spi-max-frequency = <50000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ };
+};
+
+&vuart1 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart3 {
+ status = "okay";
+};
+
+&uart5 {
+ status = "okay";
+};
+
+&kcs3 {
+ aspeed,lpc-io-reg = <0xca2>;
+ status = "okay";
+};
+
+&uart_routing {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+};
+&i2c1 {
+ status = "okay";
+};
+&i2c2 {
+ status = "okay";
+};
+&i2c3 {
+ status = "okay";
+};
+
+&i2c4 {
+ status = "okay";
+
+ // I2C EXPANDER
+ i2c-mux@71 {
+ compatible = "nxp,pca9546";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ // AMD SB-TSI CPU1
+ sbtsi@4c {
+ compatible = "amd,sbtsi";
+ reg = <0x4c>;
+ };
+ };
+
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ // AMD SB-TSI CPU2
+ sbtsi@48 {
+ compatible = "amd,sbtsi";
+ reg = <0x48>;
+ };
+ };
+ };
+};
+
+&i2c5 {
+ status = "okay";
+
+ // I2C EXPANDER U153
+ i2c-mux@70 {
+ compatible = "nxp,pca9546";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x70>;
+
+ usb_hub: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ riser1: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ };
+
+ riser2: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+ };
+
+ i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+ };
+ };
+};
+
+&i2c6 {
+ status = "okay";
+
+ // Motherboard Temp_U89
+ temperature-sensor@4e {
+ compatible = "ti,tmp421";
+ reg = <0x4e>;
+ };
+
+ // RunBMC Temp_U6
+ temperature-sensor@49 {
+ compatible = "ti,tmp75";
+ reg = <0x49>;
+ };
+};
+
+&i2c7 {
+ status = "okay";
+ // I2C EXPANDER U40
+ i2c-mux@70 {
+ compatible = "nxp,pca9545";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x70>;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ };
+
+ i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+ };
+
+ i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+ };
+ };
+};
+
+&i2c8 {
+ status = "okay";
+ // FRU RunBMC
+ eeprom@51 {
+ compatible = "atmel,24c512";
+ reg = <0x51>;
+ pagesize = <128>;
+ };
+};
+
+&i2c9 {
+ status = "okay";
+};
+
+&i2c10 {
+ status = "okay";
+};
+
+&i2c11 {
+ status = "okay";
+};
+
+&i2c12 {
+ status = "okay";
+ // FRU SCM
+ eeprom@51 {
+ compatible = "atmel,24c512";
+ reg = <0x51>;
+ pagesize = <128>;
+ };
+
+ // SCM Temp_U17
+ temperature-sensor@4f {
+ compatible = "ti,tmp75";
+ reg = <0x4f>;
+ };
+};
+
+&gpio0 {
+ status = "okay";
+ gpio-line-names =
+ /*A0-A7*/ "","","","","","","","",
+ /*B0-B7*/ "alert-psu0-smb-r-n","bmc-ready","","assert-cpu0-prochot-r-n",
+ "","","","",
+ /*C0-C7*/ "","","","","","","","",
+ /*D0-D7*/ "","","","","","","","",
+ /*E0-E7*/ "","","","","","","","",
+ /*F0-F7*/ "","","","","reset-sgpio-r-n","","","",
+ /*G0-G7*/ "","","scm-jtag-mux-select","","","","","",
+ /*H0-H7*/ "","","","","reset-out","power-out","","",
+ /*I0-I7*/ "","","","","","","irq-bmc-cpu0-buf-nmi-n","",
+ /*J0-J7*/ "","","","","","","","",
+ /*K0-K7*/ "","","","","","","","",
+ /*L0-L7*/ "","","","","","","","",
+ /*M0-M7*/ "","","","","","","","",
+ /*N0-N7*/ "","","ncsi-ocp-clk-en-n","","","","","",
+ /*O0-O7*/ "","","","","","","cpu1-thermal-trip-n","",
+ /*P0-P7*/ "","","","","","","","",
+ /*Q0-Q7*/ "cpu0-prochot-n","","cpu1-prochot-n","","cpu0-pe-rst0","","","",
+ /*R0-R7*/ "","","","","","","","",
+ /*S0-S7*/ "","","","",
+ "","PCH_SLP_S4_BMC_N","cpu0-thermtrip-n","alert-psu1-smb-r-n",
+ /*T0-T7*/ "","","","","","","","",
+ /*U0-U7*/ "","","","","","","","",
+ /*V0-V7*/ "bios-recovery-buf-n","","assert-cpu1-prochot-r-n","",
+ "power-chassis-good","","","",
+ /*W0-W7*/ "","","","","","","","",
+ /*X0-X7*/ "","","","","platform-type","","","",
+ /*Y0-Y7*/ "","","","","","","","",
+ /*Z0-Z7*/ "","cpld-power-break-n","","","","","","",
+ /*AA0-AA7*/ "","","","","","","","",
+ /*AB0-AB7*/ "","","","","","","","",
+ /*AC0-AC7*/ "","","","","","","","";
+};
+
+&sgpiom0 {
+ status = "okay";
+ ngpios = <64>;
+ bus-frequency = <1000000>;
+};
+
+&lpc_snoop {
+ status = "okay";
+ snoop-ports = <0x80>;
+};
+
+&emmc_controller {
+ status = "okay";
+};
+
+&emmc {
+ status = "okay";
+ non-removable;
+ max-frequency = <52000000>;
+ bus-width = <8>;
+};
+
+&video {
+ status = "okay";
+ memory-region = <&video_engine_memory>;
+};
+
+&vhub {
+ status = "okay";
+ aspeed,vhub-downstream-ports = <7>;
+ aspeed,vhub-generic-endpoints = <21>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb2ad_default>;
+};
+
+&rtc {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-transformers.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-transformers.dts
index caf66651e5b5..c713cb7a6187 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-transformers.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-inventec-transformers.dts
@@ -193,14 +193,14 @@
// I2C EXPANDER
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9544";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x71>;
};
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9544";
#address-cells = <1>;
#size-cells = <0>;
@@ -212,7 +212,7 @@
// I2C EXPANDER
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9544";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr630.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr630.dts
index 8f543cca7c21..ddbcbc64e235 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr630.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr630.dts
@@ -208,7 +208,7 @@
* Slot 3
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9545";
reg = <0x70>;
#address-cells = <1>;
@@ -249,7 +249,7 @@
* Slot 2,
* Slot 3
*/
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9546";
reg = <0x76>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr855xg2.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr855xg2.dts
index bcc1820f5c07..6045b60b80da 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr855xg2.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-lenovo-hr855xg2.dts
@@ -175,7 +175,7 @@
&i2c0 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9545";
reg = <0x70>;
#address-cells = <1>;
@@ -227,7 +227,7 @@
&i2c3 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-tacoma.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-tacoma.dts
index 3f6010ef2b86..213023bc5aec 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-tacoma.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-tacoma.dts
@@ -456,7 +456,7 @@
status = "okay";
tpm: tpm@2e {
- compatible = "tcg,tpm-tis-i2c";
+ compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
reg = <0x2e>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-zaius.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-zaius.dts
index 0cb7b20ff3ab..3d2d8db73ca6 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-zaius.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-opp-zaius.dts
@@ -231,7 +231,7 @@
&i2c1 {
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
@@ -282,7 +282,7 @@
&i2c4 {
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-q71l.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-q71l.dts
index 9605e53f5bbf..fed2791f5994 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-q71l.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-q71l.dts
@@ -197,7 +197,7 @@
* Slot 6,
* Slot 7
*/
- i2c-switch@74 {
+ i2c-mux@74 {
compatible = "nxp,pca9546";
reg = <0x74>;
#address-cells = <1>;
@@ -238,7 +238,7 @@
* SSD 1,
* SSD 2
*/
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -325,7 +325,7 @@
* PSU3
* PSU2
*/
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-s6q.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-s6q.dts
index 46cbba6305b8..983853eedaef 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-s6q.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-quanta-s6q.dts
@@ -285,7 +285,7 @@
reg = <0x4b>;
};
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
@@ -321,7 +321,7 @@
&i2c1 {
status = "okay";
- i2c-switch@59 {
+ i2c-mux@59 {
compatible = "nxp,pca9848";
reg = <0x59>;
#address-cells = <1>;
@@ -393,7 +393,7 @@
#size-cells = <0>;
reg = <7>;
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9546";
reg = <0x77>;
#address-cells = <1>;
@@ -490,7 +490,7 @@
&i2c6 {
status = "okay";
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -556,7 +556,7 @@
&i2c7 {
status = "okay";
- i2c-switch@75 {
+ i2c-mux@75 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-n110.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-n110.dts
index 24319267d550..44b9853f6e63 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-n110.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-n110.dts
@@ -88,16 +88,16 @@
&i2c13 {
/* SMB_PCIE2_STBY_LVC3 */
- mux-expa@73 {
- compatible = "nxp,pca9545";
- reg = <0x73>;
+ i2c-mux@71 {
+ compatible = "nxp,pca9543";
+ reg = <0x71>;
#address-cells = <1>;
#size-cells = <0>;
i2c-mux-idle-disconnect;
};
- mux-sata@71 {
- compatible = "nxp,pca9543";
- reg = <0x71>;
+ i2c-mux@73 {
+ compatible = "nxp,pca9545";
+ reg = <0x73>;
#address-cells = <1>;
#size-cells = <0>;
i2c-mux-idle-disconnect;
@@ -106,7 +106,7 @@
&i2c2 {
/* SMB_PCIE_STBY_LVC3 */
- mux-expb@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9545";
reg = <0x71>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-rx20.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-rx20.dts
index ebbb68b55559..b8f0b08018a3 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-rx20.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-rx20.dts
@@ -133,7 +133,7 @@
&i2c13 {
/* SMB_PCIE2_STBY_LVC3 */
- mux-expa@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
reg = <0x70>;
#address-cells = <1>;
@@ -144,7 +144,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <2>;
- rsra-mux@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9548";
reg = <0x72>;
#address-cells = <1>;
@@ -165,7 +165,7 @@
};
};
};
- mux-sata@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
reg = <0x71>;
#address-cells = <1>;
@@ -176,7 +176,7 @@
&i2c2 {
/* SMB_PCIE_STBY_LVC3 */
- mux-expb@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9548";
reg = <0x71>;
#address-cells = <1>;
@@ -187,7 +187,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
- rsrb-mux@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9548";
reg = <0x72>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-sx20.dts b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-sx20.dts
index e36ee4704994..933ca831d375 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-sx20.dts
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-bmc-vegman-sx20.dts
@@ -88,16 +88,16 @@
&i2c13 {
/* SMB_PCIE2_STBY_LVC3 */
- mux-expa@73 {
- compatible = "nxp,pca9545";
- reg = <0x73>;
+ i2c-mux@71 {
+ compatible = "nxp,pca9543";
+ reg = <0x71>;
#address-cells = <1>;
#size-cells = <0>;
i2c-mux-idle-disconnect;
};
- mux-sata@71 {
- compatible = "nxp,pca9543";
- reg = <0x71>;
+ i2c-mux@73 {
+ compatible = "nxp,pca9545";
+ reg = <0x73>;
#address-cells = <1>;
#size-cells = <0>;
i2c-mux-idle-disconnect;
@@ -106,7 +106,7 @@
&i2c2 {
/* SMB_PCIE_STBY_LVC3 */
- mux-expb@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9545";
reg = <0x71>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g4.dtsi b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g4.dtsi
index 530491ae5eb2..857cb26ed6d7 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g4.dtsi
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g4.dtsi
@@ -466,7 +466,6 @@
i2c0: i2c-bus@40 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x40 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -482,7 +481,6 @@
i2c1: i2c-bus@80 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x80 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -498,7 +496,6 @@
i2c2: i2c-bus@c0 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0xc0 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -515,7 +512,6 @@
i2c3: i2c-bus@100 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x100 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -532,7 +528,6 @@
i2c4: i2c-bus@140 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x140 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -549,7 +544,6 @@
i2c5: i2c-bus@180 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x180 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -566,7 +560,6 @@
i2c6: i2c-bus@1c0 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x1c0 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -583,7 +576,6 @@
i2c7: i2c-bus@300 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x300 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -600,7 +592,6 @@
i2c8: i2c-bus@340 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x340 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -617,7 +608,6 @@
i2c9: i2c-bus@380 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x380 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -634,7 +624,6 @@
i2c10: i2c-bus@3c0 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x3c0 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -651,7 +640,6 @@
i2c11: i2c-bus@400 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x400 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -668,7 +656,6 @@
i2c12: i2c-bus@440 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x440 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
@@ -685,7 +672,6 @@
i2c13: i2c-bus@480 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x480 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g5.dtsi b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g5.dtsi
index 04f98d1dbb97..e6f3cf3c721e 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g5.dtsi
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g5.dtsi
@@ -363,6 +363,7 @@
interrupts = <40>;
reg = <0x1e780200 0x0100>;
clocks = <&syscon ASPEED_CLK_APB>;
+ #interrupt-cells = <2>;
interrupt-controller;
bus-frequency = <12000000>;
pinctrl-names = "default";
@@ -594,7 +595,6 @@
i2c0: i2c-bus@40 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x40 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -610,7 +610,6 @@
i2c1: i2c-bus@80 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x80 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -626,7 +625,6 @@
i2c2: i2c-bus@c0 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0xc0 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -643,7 +641,6 @@
i2c3: i2c-bus@100 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x100 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -660,7 +657,6 @@
i2c4: i2c-bus@140 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x140 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -677,7 +673,6 @@
i2c5: i2c-bus@180 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x180 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -694,7 +689,6 @@
i2c6: i2c-bus@1c0 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x1c0 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -711,7 +705,6 @@
i2c7: i2c-bus@300 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x300 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -728,7 +721,6 @@
i2c8: i2c-bus@340 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x340 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -745,7 +737,6 @@
i2c9: i2c-bus@380 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x380 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -762,7 +753,6 @@
i2c10: i2c-bus@3c0 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x3c0 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -779,7 +769,6 @@
i2c11: i2c-bus@400 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x400 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -796,7 +785,6 @@
i2c12: i2c-bus@440 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x440 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
@@ -813,7 +801,6 @@
i2c13: i2c-bus@480 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x480 0x40>;
compatible = "aspeed,ast2500-i2c-bus";
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6-pinctrl.dtsi
index 7cd4f075e325..289668f051eb 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6-pinctrl.dtsi
@@ -297,6 +297,16 @@
groups = "I2C9";
};
+ pinctrl_i3c1_default: i3c1_default {
+ function = "I3C1";
+ groups = "I3C1";
+ };
+
+ pinctrl_i3c2_default: i3c2_default {
+ function = "I3C2";
+ groups = "I3C2";
+ };
+
pinctrl_i3c3_default: i3c3_default {
function = "I3C3";
groups = "I3C3";
diff --git a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6.dtsi b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6.dtsi
index 172dd748d807..29f94696d8b1 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6.dtsi
+++ b/sys/contrib/device-tree/src/arm/aspeed/aspeed-g6.dtsi
@@ -474,6 +474,7 @@
reg = <0x1e780500 0x100>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&syscon ASPEED_CLK_APB2>;
+ #interrupt-cells = <2>;
interrupt-controller;
bus-frequency = <12000000>;
pinctrl-names = "default";
@@ -488,6 +489,7 @@
reg = <0x1e780600 0x100>;
interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&syscon ASPEED_CLK_APB2>;
+ #interrupt-cells = <2>;
interrupt-controller;
bus-frequency = <12000000>;
pinctrl-names = "default";
@@ -729,6 +731,16 @@
status = "disabled";
};
+ vuart3: serial@1e787800 {
+ compatible = "aspeed,ast2500-vuart";
+ reg = <0x1e787800 0x40>;
+ reg-shift = <2>;
+ interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon ASPEED_CLK_APB2>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
vuart2: serial@1e788000 {
compatible = "aspeed,ast2500-vuart";
reg = <0x1e788000 0x40>;
@@ -739,6 +751,16 @@
status = "disabled";
};
+ vuart4: serial@1e788800 {
+ compatible = "aspeed,ast2500-vuart";
+ reg = <0x1e788800 0x40>;
+ reg-shift = <2>;
+ interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon ASPEED_CLK_APB2>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
uart2: serial@1e78d000 {
compatible = "ns16550a";
reg = <0x1e78d000 0x20>;
@@ -882,7 +904,6 @@
i2c0: i2c-bus@80 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x80 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -897,7 +918,6 @@
i2c1: i2c-bus@100 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x100 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -912,7 +932,6 @@
i2c2: i2c-bus@180 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x180 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -927,7 +946,6 @@
i2c3: i2c-bus@200 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x200 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -942,7 +960,6 @@
i2c4: i2c-bus@280 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x280 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -957,7 +974,6 @@
i2c5: i2c-bus@300 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x300 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -972,7 +988,6 @@
i2c6: i2c-bus@380 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x380 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -987,7 +1002,6 @@
i2c7: i2c-bus@400 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x400 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1002,7 +1016,6 @@
i2c8: i2c-bus@480 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x480 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1017,7 +1030,6 @@
i2c9: i2c-bus@500 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x500 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1032,7 +1044,6 @@
i2c10: i2c-bus@580 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x580 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1047,7 +1058,6 @@
i2c11: i2c-bus@600 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x600 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1062,7 +1072,6 @@
i2c12: i2c-bus@680 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x680 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1077,7 +1086,6 @@
i2c13: i2c-bus@700 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x700 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1092,7 +1100,6 @@
i2c14: i2c-bus@780 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x780 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
@@ -1107,7 +1114,6 @@
i2c15: i2c-bus@800 {
#address-cells = <1>;
#size-cells = <0>;
- #interrupt-cells = <1>;
reg = <0x800 0x80>;
compatible = "aspeed,ast2600-i2c-bus";
clocks = <&syscon ASPEED_CLK_APB2>;
diff --git a/sys/contrib/device-tree/src/arm/aspeed/ast2500-facebook-netbmc-common.dtsi b/sys/contrib/device-tree/src/arm/aspeed/ast2500-facebook-netbmc-common.dtsi
index c0c43b8644ee..7f1ae3f4df9d 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/ast2500-facebook-netbmc-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/aspeed/ast2500-facebook-netbmc-common.dtsi
@@ -4,6 +4,10 @@
#include "aspeed-g5.dtsi"
/ {
+ aliases {
+ spi0 = &fmc;
+ };
+
memory@80000000 {
reg = <0x80000000 0x40000000>;
};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/ast2600-facebook-netbmc-common.dtsi b/sys/contrib/device-tree/src/arm/aspeed/ast2600-facebook-netbmc-common.dtsi
index 31590d3186a2..00e5887c926f 100644
--- a/sys/contrib/device-tree/src/arm/aspeed/ast2600-facebook-netbmc-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/aspeed/ast2600-facebook-netbmc-common.dtsi
@@ -35,8 +35,8 @@
gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
- tpmdev@0 {
- compatible = "tcg,tpm_tis-spi";
+ tpm@0 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
spi-max-frequency = <33000000>;
reg = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/ibm-power10-dual.dtsi b/sys/contrib/device-tree/src/arm/aspeed/ibm-power10-dual.dtsi
new file mode 100644
index 000000000000..cc466910bb52
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/aspeed/ibm-power10-dual.dtsi
@@ -0,0 +1,380 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2023 IBM Corp.
+
+&fsim0 {
+ status = "okay";
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_HIGH>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom@1000 {
+ compatible = "ibm,fsi2pib";
+ reg = <0x1000 0x400>;
+ };
+
+ i2c@1800 {
+ compatible = "ibm,fsi-i2c-master";
+ reg = <0x1800 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam0_i2c0: i2c-bus@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>; /* OMI01 */
+ };
+
+ cfam0_i2c1: i2c-bus@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>; /* OMI23 */
+ };
+
+ cfam0_i2c10: i2c-bus@a {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <10>; /* OP3A */
+ };
+
+ cfam0_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <11>; /* OP3B */
+ };
+
+ cfam0_i2c12: i2c-bus@c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <12>; /* OP4A */
+ };
+
+ cfam0_i2c13: i2c-bus@d {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <13>; /* OP4B */
+ };
+
+ cfam0_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <14>; /* OP5A */
+ };
+
+ cfam0_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <15>; /* OP5B */
+ };
+ };
+
+ fsi2spi@1c00 {
+ compatible = "ibm,fsi2spi";
+ reg = <0x1c00 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam0_spi0: spi@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam0_spi1: spi@20 {
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam0_spi2: spi@40 {
+ reg = <0x40>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam0_spi3: spi@60 {
+ reg = <0x60>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+ sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fsi_occ0: occ {
+ compatible = "ibm,p10-occ";
+
+ occ-hwmon {
+ compatible = "ibm,p10-occ-hwmon";
+ ibm,no-poll-on-init;
+ };
+ };
+ };
+
+ fsi_hub0: hub@3400 {
+ compatible = "fsi-master-hub";
+ reg = <0x3400 0x400>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&fsi_hub0 {
+ cfam@1,0 {
+ reg = <1 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <1>;
+
+ scom@1000 {
+ compatible = "ibm,fsi2pib";
+ reg = <0x1000 0x400>;
+ };
+
+ i2c@1800 {
+ compatible = "ibm,fsi-i2c-master";
+ reg = <0x1800 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam1_i2c2: i2c-bus@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>; /* OMI45 */
+ };
+
+ cfam1_i2c3: i2c-bus@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>; /* OMI67 */
+ };
+
+ cfam1_i2c10: i2c-bus@a {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <10>; /* OP3A */
+ };
+
+ cfam1_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <11>; /* OP3B */
+ };
+
+ cfam1_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <14>; /* OP5A */
+ };
+
+ cfam1_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <15>; /* OP5B */
+ };
+
+ cfam1_i2c16: i2c-bus@10 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <16>; /* OP6A */
+ };
+
+ cfam1_i2c17: i2c-bus@11 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <17>; /* OP6B */
+ };
+ };
+
+ fsi2spi@1c00 {
+ compatible = "ibm,fsi2spi";
+ reg = <0x1c00 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam1_spi0: spi@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam1_spi1: spi@20 {
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam1_spi2: spi@40 {
+ reg = <0x40>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam1_spi3: spi@60 {
+ reg = <0x60>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+ sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fsi_occ1: occ {
+ compatible = "ibm,p10-occ";
+
+ occ-hwmon {
+ compatible = "ibm,p10-occ-hwmon";
+ ibm,no-poll-on-init;
+ };
+ };
+ };
+
+ fsi_hub1: hub@3400 {
+ compatible = "fsi-master-hub";
+ reg = <0x3400 0x400>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ no-scan-on-init;
+ };
+ };
+};
+
+/* Legacy OCC numbering (to get rid of when userspace is fixed) */
+&fsi_occ0 {
+ reg = <1>;
+};
+
+&fsi_occ1 {
+ reg = <2>;
+};
+
+/ {
+ aliases {
+ i2c100 = &cfam0_i2c0;
+ i2c101 = &cfam0_i2c1;
+ i2c110 = &cfam0_i2c10;
+ i2c111 = &cfam0_i2c11;
+ i2c112 = &cfam0_i2c12;
+ i2c113 = &cfam0_i2c13;
+ i2c114 = &cfam0_i2c14;
+ i2c115 = &cfam0_i2c15;
+ i2c202 = &cfam1_i2c2;
+ i2c203 = &cfam1_i2c3;
+ i2c210 = &cfam1_i2c10;
+ i2c211 = &cfam1_i2c11;
+ i2c214 = &cfam1_i2c14;
+ i2c215 = &cfam1_i2c15;
+ i2c216 = &cfam1_i2c16;
+ i2c217 = &cfam1_i2c17;
+
+ spi10 = &cfam0_spi0;
+ spi11 = &cfam0_spi1;
+ spi12 = &cfam0_spi2;
+ spi13 = &cfam0_spi3;
+ spi20 = &cfam1_spi0;
+ spi21 = &cfam1_spi1;
+ spi22 = &cfam1_spi2;
+ spi23 = &cfam1_spi3;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/aspeed/ibm-power10-quad.dtsi b/sys/contrib/device-tree/src/arm/aspeed/ibm-power10-quad.dtsi
new file mode 100644
index 000000000000..57494c744b5d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/aspeed/ibm-power10-quad.dtsi
@@ -0,0 +1,1305 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2023 IBM Corp.
+
+#include "ibm-power10-dual.dtsi"
+
+&cfam0_i2c0 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom100: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo100: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c1 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom101: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo101: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c10 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom110: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo110: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c11 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom111: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo111: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c12 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom112: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo112: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c13 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom113: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo113: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c14 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom114: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo114: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam0_i2c15 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom115: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo115: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c2 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom202: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo202: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c3 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom203: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo203: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c10 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom210: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo210: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c11 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom211: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo211: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c14 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom214: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo214: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c15 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom215: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo215: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c16 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom216: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo216: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&cfam1_i2c17 {
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom217: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo217: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+};
+
+&fsi_hub0 {
+ cfam@2,0 {
+ reg = <2 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <2>;
+
+ scom@1000 {
+ compatible = "ibm,fsi2pib";
+ reg = <0x1000 0x400>;
+ };
+
+ i2c@1800 {
+ compatible = "ibm,fsi-i2c-master";
+ reg = <0x1800 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam2_i2c0: i2c-bus@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>; /* OM01 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom300: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo300: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c1: i2c-bus@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>; /* OM23 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom301: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo301: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c10: i2c-bus@a {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <10>; /* OP3A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom310: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo310: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <11>; /* OP3B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom311: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo311: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c12: i2c-bus@c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <12>; /* OP4A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom312: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo312: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c13: i2c-bus@d {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <13>; /* OP4B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom313: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo313: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <14>; /* OP5A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom314: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo314: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam2_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <15>; /* OP5B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom315: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo315: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+ };
+
+ fsi2spi@1c00 {
+ compatible = "ibm,fsi2spi";
+ reg = <0x1c00 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam2_spi0: spi@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam2_spi1: spi@20 {
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam2_spi2: spi@40 {
+ reg = <0x40>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam2_spi3: spi@60 {
+ reg = <0x60>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+ sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fsi_occ2: occ {
+ compatible = "ibm,p10-occ";
+
+ occ-hwmon {
+ compatible = "ibm,p10-occ-hwmon";
+ ibm,no-poll-on-init;
+ };
+ };
+ };
+
+ fsi_hub2: hub@3400 {
+ compatible = "fsi-master-hub";
+ reg = <0x3400 0x400>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ no-scan-on-init;
+ };
+ };
+
+ cfam@3,0 {
+ reg = <3 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <3>;
+
+ scom@1000 {
+ compatible = "ibm,fsi2pib";
+ reg = <0x1000 0x400>;
+ };
+
+ i2c@1800 {
+ compatible = "ibm,fsi-i2c-master";
+ reg = <0x1800 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam3_i2c2: i2c-bus@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>; /* OM45 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom402: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo402: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c3: i2c-bus@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>; /* OM67 */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom403: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo403: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c10: i2c-bus@a {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <10>; /* OP3A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom410: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo410: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c11: i2c-bus@b {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <11>; /* OP3B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom411: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo411: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c14: i2c-bus@e {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <14>; /* OP5A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom414: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo414: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c15: i2c-bus@f {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <15>; /* OP5B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom415: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo415: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c16: i2c-bus@10 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <16>; /* OP6A */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom416: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo416: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+
+ cfam3_i2c17: i2c-bus@11 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <17>; /* OP6B */
+
+ i2cr@20 {
+ compatible = "ibm,i2cr-fsi-master";
+ reg = <0x20>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cfam@0,0 {
+ reg = <0 0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ chip-id = <0>;
+
+ scom417: scom@1000 {
+ compatible = "ibm,i2cr-scom";
+ reg = <0x1000 0x400>;
+ };
+
+ sbefifo417: sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+ };
+ };
+
+ fsi2spi@1c00 {
+ compatible = "ibm,fsi2spi";
+ reg = <0x1c00 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cfam3_spi0: spi@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam3_spi1: spi@20 {
+ reg = <0x20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam3_spi2: spi@40 {
+ reg = <0x40>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ cfam3_spi3: spi@60 {
+ reg = <0x60>;
+ compatible = "ibm,fsi2spi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@0 {
+ at25,byte-len = <0x80000>;
+ at25,addr-mode = <4>;
+ at25,page-size = <256>;
+
+ compatible = "atmel,at25";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+ sbefifo@2400 {
+ compatible = "ibm,p9-sbefifo";
+ reg = <0x2400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fsi_occ3: occ {
+ compatible = "ibm,p10-occ";
+
+ occ-hwmon {
+ compatible = "ibm,p10-occ-hwmon";
+ ibm,no-poll-on-init;
+ };
+ };
+ };
+
+ fsi_hub3: hub@3400 {
+ compatible = "fsi-master-hub";
+ reg = <0x3400 0x400>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ no-scan-on-init;
+ };
+ };
+};
+
+/* Legacy OCC numbering (to get rid of when userspace is fixed) */
+&fsi_occ2 {
+ reg = <3>;
+};
+
+&fsi_occ3 {
+ reg = <4>;
+};
+
+/ {
+ aliases {
+ i2c300 = &cfam2_i2c0;
+ i2c301 = &cfam2_i2c1;
+ i2c310 = &cfam2_i2c10;
+ i2c311 = &cfam2_i2c11;
+ i2c312 = &cfam2_i2c12;
+ i2c313 = &cfam2_i2c13;
+ i2c314 = &cfam2_i2c14;
+ i2c315 = &cfam2_i2c15;
+ i2c402 = &cfam3_i2c2;
+ i2c403 = &cfam3_i2c3;
+ i2c410 = &cfam3_i2c10;
+ i2c411 = &cfam3_i2c11;
+ i2c414 = &cfam3_i2c14;
+ i2c415 = &cfam3_i2c15;
+ i2c416 = &cfam3_i2c16;
+ i2c417 = &cfam3_i2c17;
+
+ sbefifo100 = &sbefifo100;
+ sbefifo101 = &sbefifo101;
+ sbefifo110 = &sbefifo110;
+ sbefifo111 = &sbefifo111;
+ sbefifo112 = &sbefifo112;
+ sbefifo113 = &sbefifo113;
+ sbefifo114 = &sbefifo114;
+ sbefifo115 = &sbefifo115;
+ sbefifo202 = &sbefifo202;
+ sbefifo203 = &sbefifo203;
+ sbefifo210 = &sbefifo210;
+ sbefifo211 = &sbefifo211;
+ sbefifo214 = &sbefifo214;
+ sbefifo215 = &sbefifo215;
+ sbefifo216 = &sbefifo216;
+ sbefifo217 = &sbefifo217;
+ sbefifo300 = &sbefifo300;
+ sbefifo301 = &sbefifo301;
+ sbefifo310 = &sbefifo310;
+ sbefifo311 = &sbefifo311;
+ sbefifo312 = &sbefifo312;
+ sbefifo313 = &sbefifo313;
+ sbefifo314 = &sbefifo314;
+ sbefifo315 = &sbefifo315;
+ sbefifo402 = &sbefifo402;
+ sbefifo403 = &sbefifo403;
+ sbefifo410 = &sbefifo410;
+ sbefifo411 = &sbefifo411;
+ sbefifo414 = &sbefifo414;
+ sbefifo415 = &sbefifo415;
+ sbefifo416 = &sbefifo416;
+ sbefifo417 = &sbefifo417;
+
+ scom100 = &scom100;
+ scom101 = &scom101;
+ scom110 = &scom110;
+ scom111 = &scom111;
+ scom112 = &scom112;
+ scom113 = &scom113;
+ scom114 = &scom114;
+ scom115 = &scom115;
+ scom202 = &scom202;
+ scom203 = &scom203;
+ scom210 = &scom210;
+ scom211 = &scom211;
+ scom214 = &scom214;
+ scom215 = &scom215;
+ scom216 = &scom216;
+ scom217 = &scom217;
+ scom300 = &scom300;
+ scom301 = &scom301;
+ scom310 = &scom310;
+ scom311 = &scom311;
+ scom312 = &scom312;
+ scom313 = &scom313;
+ scom314 = &scom314;
+ scom315 = &scom315;
+ scom402 = &scom402;
+ scom403 = &scom403;
+ scom410 = &scom410;
+ scom411 = &scom411;
+ scom414 = &scom414;
+ scom415 = &scom415;
+ scom416 = &scom416;
+ scom417 = &scom417;
+
+ spi30 = &cfam2_spi0;
+ spi31 = &cfam2_spi1;
+ spi32 = &cfam2_spi2;
+ spi33 = &cfam2_spi3;
+ spi40 = &cfam3_spi0;
+ spi41 = &cfam3_spi1;
+ spi42 = &cfam3_spi2;
+ spi43 = &cfam3_spi3;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm-cygnus.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm-cygnus.dtsi
index f9f79ed82518..07ca0d993c9f 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm-cygnus.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm-cygnus.dtsi
@@ -167,6 +167,7 @@
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupt-parent = <&mailbox>;
interrupts = <0>;
};
@@ -247,6 +248,7 @@
gpio-controller;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
+ #interrupt-cells = <2>;
};
i2c1: i2c@1800b000 {
@@ -518,6 +520,7 @@
gpio-controller;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
gpio-ranges = <&pinctrl 0 42 1>,
<&pinctrl 1 44 3>,
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm-hr2.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm-hr2.dtsi
index 33e6ba63a1ee..75545b10ef2f 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm-hr2.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm-hr2.dtsi
@@ -54,8 +54,8 @@
pmu {
compatible = "arm,cortex-a9-pmu";
- interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
interrupt-affinity = <&cpu0>;
};
@@ -200,6 +200,7 @@
gpio-controller;
ngpios = <4>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm-ns.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm-ns.dtsi
index dae9c47ace76..d0d5f7e52a91 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm-ns.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm-ns.dtsi
@@ -14,6 +14,13 @@
#address-cells = <1>;
#size-cells = <1>;
+ pmu {
+ compatible = "arm,cortex-a9-pmu";
+ interrupts =
+ <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
chipcommon-a-bus@18000000 {
compatible = "simple-bus";
ranges = <0x00000000 0x18000000 0x00001000>;
@@ -272,14 +279,32 @@
gmac0: ethernet@24000 {
reg = <0x24000 0x800>;
+ phy-mode = "internal";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
};
gmac1: ethernet@25000 {
reg = <0x25000 0x800>;
+ phy-mode = "internal";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
};
gmac2: ethernet@26000 {
reg = <0x26000 0x800>;
+ phy-mode = "internal";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
};
gmac3: ethernet@27000 {
@@ -302,6 +327,29 @@
#address-cells = <1>;
};
+ mdio-mux@18003000 {
+ compatible = "mdio-mux-mmioreg", "mdio-mux";
+ mdio-parent-bus = <&mdio>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x18003000 0x4>;
+ mux-mask = <0x200>;
+
+ mdio@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb3_phy: usb3-phy@10 {
+ compatible = "brcm,ns-ax-usb3-phy";
+ reg = <0x10>;
+ usb3-dmp-syscon = <&usb3_dmp>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+ };
+ };
+
rng: rng@18004000 {
compatible = "brcm,bcm5301x-rng";
reg = <0x18004000 0x14>;
@@ -442,6 +490,10 @@
brcm,nand-has-wp;
};
+ usb3_dmp: syscon@18105000 {
+ reg = <0x18105000 0x1000>;
+ };
+
thermal-zones {
cpu_thermal: cpu-thermal {
polling-delay-passive = <0>;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm-nsp.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm-nsp.dtsi
index 5b1dc58d40ba..6a4482c93167 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm-nsp.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm-nsp.dtsi
@@ -72,8 +72,8 @@
pmu {
compatible = "arm,cortex-a9-pmu";
- interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
interrupt-affinity = <&cpu0>, <&cpu1>;
};
@@ -180,6 +180,7 @@
gpio-controller;
ngpios = <32>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
gpio-ranges = <&pinctrl 0 0 32>;
};
@@ -352,6 +353,7 @@
gpio-controller;
ngpios = <4>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm11351.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm11351.dtsi
index b271a9bf06a9..53857e572080 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm11351.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm11351.dtsi
@@ -111,13 +111,12 @@
gpio: gpio@35003000 {
compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio";
reg = <0x35003000 0x800>;
- interrupts =
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
#gpio-cells = <2>;
#interrupt-cells = <2>;
gpio-controller;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm21664.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm21664.dtsi
index 2eb7f5b0c1dc..fa73600e883e 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm21664.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm21664.dtsi
@@ -101,11 +101,10 @@
gpio: gpio@35003000 {
compatible = "brcm,bcm21664-gpio", "brcm,kona-gpio";
reg = <0x35003000 0x524>;
- interrupts =
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
#gpio-cells = <2>;
#interrupt-cells = <2>;
gpio-controller;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm23550.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm23550.dtsi
index 445eadb8d871..50ebe93d6bd0 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm23550.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm23550.dtsi
@@ -101,11 +101,10 @@
gpio: gpio@1003000 {
compatible = "brcm,bcm23550-gpio", "brcm,kona-gpio";
reg = <0x01003000 0x524>;
- interrupts =
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
#gpio-cells = <2>;
#interrupt-cells = <2>;
gpio-controller;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi-400.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi-400.dts
index 1ab8184302db..5a2869a18bd5 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi-400.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi-400.dts
@@ -36,9 +36,7 @@
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};
-&leds {
- /delete-node/ led_act;
-};
+/delete-node/ &led_act;
&pm {
/delete-property/ system-power-controller;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi.dtsi
index 98817a6675b9..d233a191c139 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2711-rpi.dtsi
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "bcm2835-rpi.dtsi"
+#include <dt-bindings/power/raspberrypi-power.h>
#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
/ {
@@ -76,3 +77,7 @@
&vchiq {
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
};
+
+&xhci {
+ power-domains = <&power RPI_POWER_DOMAIN_USB>;
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2711.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm2711.dtsi
index 097e9f252235..22c7f1561344 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2711.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2711.dtsi
@@ -76,7 +76,7 @@
};
};
- dma: dma@7e007000 {
+ dma: dma-controller@7e007000 {
compatible = "brcm,bcm2835-dma";
reg = <0x7e007000 0xb00>;
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
@@ -278,7 +278,7 @@
clocks = <&clocks BCM2835_CLOCK_PWM>;
assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
assigned-clock-rates = <10000000>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
status = "disabled";
};
@@ -604,6 +604,20 @@
};
};
+ xhci: usb@7e9c0000 {
+ compatible = "brcm,bcm2711-xhci", "brcm,xhci-brcm-v2";
+ reg = <0x0 0x7e9c0000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ /* DWC2 and this IP block share the same USB PHY,
+ * enabling both at the same time results in lockups.
+ * So keep this node disabled and let the bootloader
+ * decide which interface should be enabled.
+ */
+ status = "disabled";
+ };
+
v3d: gpu@7ec00000 {
compatible = "brcm,2711-v3d";
reg = <0x0 0x7ec00000 0x4000>,
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm28155-ap.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm28155-ap.dts
index 0a8ad1d673d8..2f3634545e64 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm28155-ap.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm28155-ap.dts
@@ -15,64 +15,64 @@
device_type = "memory";
reg = <0x80000000 0x40000000>; /* 1 GB */
};
+};
- serial@3e000000 {
- status = "okay";
- };
-
- i2c@3e016000 {
- clock-frequency = <400000>;
- status = "okay";
- };
+&bsc1 {
+ clock-frequency = <400000>;
+ status = "okay";
+};
- i2c@3e017000 {
- clock-frequency = <400000>;
- status = "okay";
- };
+&bsc2 {
+ clock-frequency = <400000>;
+ status = "okay";
+};
- i2c@3e018000 {
- clock-frequency = <400000>;
- status = "okay";
- };
+&bsc3 {
+ clock-frequency = <400000>;
+ status = "okay";
+};
- i2c@3500d000 {
- clock-frequency = <100000>;
- status = "okay";
+&pmu_bsc {
+ clock-frequency = <100000>;
+ status = "okay";
- pmu: pmu@8 {
- reg = <0x08>;
- };
+ pmu: pmu@8 {
+ reg = <0x08>;
};
+};
- sdio2: mmc@3f190000 {
- non-removable;
- max-frequency = <48000000>;
- vmmc-supply = <&camldo1_reg>;
- vqmmc-supply = <&iosr1_reg>;
- status = "okay";
- };
+&pwm {
+ status = "okay";
+};
- sdio4: mmc@3f1b0000 {
- max-frequency = <48000000>;
- cd-gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
- vmmc-supply = <&sdldo_reg>;
- vqmmc-supply = <&sdxldo_reg>;
- status = "okay";
- };
+&sdio2 {
+ non-removable;
+ max-frequency = <48000000>;
+ vmmc-supply = <&camldo1_reg>;
+ vqmmc-supply = <&iosr1_reg>;
+ status = "okay";
+};
- pwm: pwm@3e01a000 {
- status = "okay";
- };
+&sdio4 {
+ max-frequency = <48000000>;
+ cd-gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&sdldo_reg>;
+ vqmmc-supply = <&sdxldo_reg>;
+ status = "okay";
+};
- usbotg: usb@3f120000 {
- vusb_d-supply = <&usbldo_reg>;
- vusb_a-supply = <&iosr1_reg>;
- status = "okay";
- };
+&uartb {
+ status = "okay";
+};
- usbphy: usb-phy@3f130000 {
- status = "okay";
- };
+&usbotg {
+ vusb_d-supply = <&usbldo_reg>;
+ vusb_a-supply = <&iosr1_reg>;
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
};
#include "bcm59056.dtsi"
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-common.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-common.dtsi
index bb7e8f7facaf..9261b67dbee1 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-common.dtsi
@@ -8,7 +8,7 @@
interrupt-parent = <&intc>;
soc {
- dma: dma@7e007000 {
+ dma: dma-controller@7e007000 {
compatible = "brcm,bcm2835-dma";
reg = <0x7e007000 0xf00>;
interrupts = <1 16>,
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a-plus.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a-plus.dts
index 02ce817868ba..069b48272aa5 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a-plus.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a-plus.dts
@@ -81,6 +81,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
/* I2S interface */
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a.dts
index 3fdf60eb11dc..2726c00431e8 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-a.dts
@@ -83,6 +83,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0 &i2s_alt2>;
/* I2S interface */
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-plus.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-plus.dts
index 9956fd06a4b6..c57b999a4520 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-plus.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-plus.dts
@@ -83,6 +83,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
/* I2S interface */
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-rev2.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-rev2.dts
index 4e1770afb145..ae6d3a9586ab 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-rev2.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b-rev2.dts
@@ -83,6 +83,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0 &i2s_alt2>;
/* I2S interface */
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b.dts
index eec1d0892d33..72764be75a79 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-b.dts
@@ -83,6 +83,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-cm1-io1.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-cm1-io1.dts
index 87958a96c3e0..3f9d198ac3ab 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-cm1-io1.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-cm1-io1.dts
@@ -73,6 +73,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero-w.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero-w.dts
index dbf825985ec0..1f0b163e400c 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero-w.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero-w.dts
@@ -97,6 +97,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0>;
};
@@ -111,6 +112,7 @@
};
&sdhci {
+ pinctrl-names = "default";
pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero.dts
index f80e65a825fd..539c19c10946 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi-zero.dts
@@ -85,6 +85,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
/* I2S interface */
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi.dtsi
index ee9ee9d1fe65..f0acc9390f31 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2835-rpi.dtsi
@@ -26,8 +26,6 @@
};
&gpio {
- pinctrl-names = "default";
-
gpioout: gpioout {
brcm,pins = <6>;
brcm,function = <BCM2835_FSEL_GPIO_OUT>;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2836-rpi-2-b.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2836-rpi-2-b.dts
index 6068ec390081..79918033750e 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2836-rpi-2-b.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2836-rpi-2-b.dts
@@ -82,6 +82,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
/* I2S interface */
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-cm3-io3.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-cm3-io3.dts
index cf84e69fced8..72d26d130efa 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-cm3-io3.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-cm3-io3.dts
@@ -72,6 +72,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-zero-2-w.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-zero-2-w.dts
index b9cc4594398b..85cf594724ef 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-zero-2-w.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm2837-rpi-zero-2-w.dts
@@ -95,6 +95,7 @@
"SD_DATA2_R",
"SD_DATA3_R";
+ pinctrl-names = "default";
pinctrl-0 = <&gpioout &alt0>;
};
@@ -109,6 +110,7 @@
};
&sdhci {
+ pinctrl-names = "default";
pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm283x.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm283x.dtsi
index c9c52a19ef3b..2ca8a2505a4d 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm283x.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm283x.dtsi
@@ -416,7 +416,7 @@
clocks = <&clocks BCM2835_CLOCK_PWM>;
assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
assigned-clock-rates = <10000000>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
index 42bcbf10957c..9f9084269ef5 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
@@ -181,5 +181,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-linksys-ea6500-v2.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-linksys-ea6500-v2.dts
index f1412ba83def..0454423fe166 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-linksys-ea6500-v2.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-linksys-ea6500-v2.dts
@@ -19,7 +19,8 @@
memory@0 {
device_type = "memory";
- reg = <0x00000000 0x08000000>;
+ reg = <0x00000000 0x08000000>,
+ <0x88000000 0x08000000>;
};
gpio-keys {
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xap-1510.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xap-1510.dts
index e04d2e5ea51a..72e960c888ac 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xap-1510.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xap-1510.dts
@@ -85,5 +85,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xwc-1000.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xwc-1000.dts
index a399800139d9..750e17482371 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xwc-1000.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-luxul-xwc-1000.dts
@@ -88,5 +88,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-netgear-r6250.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-netgear-r6250.dts
index fad3473810a2..2bdbc7d18b0e 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-netgear-r6250.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-netgear-r6250.dts
@@ -122,5 +122,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-smartrg-sr400ac.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-smartrg-sr400ac.dts
index 5b2b7b8b3b12..b226bef3369c 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4708-smartrg-sr400ac.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4708-smartrg-sr400ac.dts
@@ -145,6 +145,14 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47081-buffalo-wzr-600dhp2.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
index d0a26b643b82..192b8db5a89c 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
@@ -145,5 +145,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xap-1410.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xap-1410.dts
index 9f21d6d6d35b..0198b5f9e4a7 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xap-1410.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xap-1410.dts
@@ -81,5 +81,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xwr-1200.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xwr-1200.dts
index 256107291702..73ff1694a4a0 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xwr-1200.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47081-luxul-xwr-1200.dts
@@ -148,5 +148,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4709-asus-rt-ac87u.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4709-asus-rt-ac87u.dts
index 4f44cb4df704..59400217f8c3 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4709-asus-rt-ac87u.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4709-asus-rt-ac87u.dts
@@ -25,6 +25,12 @@
<0x88000000 0x08000000>;
};
+ nvram@1c080000 {
+ et1macaddr: et1macaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
@@ -62,6 +68,11 @@
};
};
+&gmac0 {
+ nvmem-cells = <&et1macaddr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
&usb3_phy {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4709-linksys-ea9200.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4709-linksys-ea9200.dts
index 99253fd7adb3..2ba5adf2b7e7 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4709-linksys-ea9200.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4709-linksys-ea9200.dts
@@ -47,3 +47,41 @@
&usb3_phy {
status = "okay";
};
+
+&srab {
+ status = "okay";
+
+ ports {
+ port@0 {
+ label = "lan1";
+ };
+
+ port@1 {
+ label = "lan2";
+ };
+
+ port@2 {
+ label = "lan3";
+ };
+
+ port@3 {
+ label = "lan4";
+ };
+
+ port@4 {
+ label = "wan";
+ };
+
+ port@5 {
+ status = "disabled";
+ };
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ label = "cpu";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm4709-netgear-r8000.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm4709-netgear-r8000.dts
index 707c561703ed..127ca8741220 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm4709-netgear-r8000.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm4709-netgear-r8000.dts
@@ -227,6 +227,24 @@
label = "wan";
};
+ port@5 {
+ status = "disabled";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
+ port@7 {
+ status = "disabled";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
port@8 {
label = "cpu";
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dts
new file mode 100644
index 000000000000..5f089307cd8c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
+ */
+
+/dts-v1/;
+
+#include "bcm47094-asus-rt-ac3100.dtsi"
+
+/ {
+ compatible = "asus,rt-ac3100", "brcm,bcm47094", "brcm,bcm4708";
+ model = "ASUS RT-AC3100";
+
+ nvram@1c080000 {
+ et0macaddr: et0macaddr {
+ };
+ };
+};
+
+&gmac0 {
+ nvmem-cells = <&et0macaddr>;
+ nvmem-cell-names = "mac-address";
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dtsi
new file mode 100644
index 000000000000..09cefce27fb1
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac3100.dtsi
@@ -0,0 +1,163 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
+ */
+
+#include "bcm47094.dtsi"
+#include "bcm5301x-nand-cs0-bch8.dtsi"
+
+/ {
+ chosen {
+ bootargs = "earlycon";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x00000000 0x08000000>,
+ <0x88000000 0x18000000>;
+ };
+
+ nvram@1c080000 {
+ compatible = "brcm,nvram";
+ reg = <0x1c080000 0x00180000>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-power {
+ label = "white:power";
+ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+
+ led-wan-red {
+ label = "red:wan";
+ gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-lan {
+ label = "white:lan";
+ gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
+ };
+
+ led-usb2 {
+ label = "white:usb2";
+ gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ led-usb3 {
+ label = "white:usb3";
+ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port1>, <&xhci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led-wps {
+ label = "white:wps";
+ gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-wps {
+ label = "WPS";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
+ };
+
+ button-reset {
+ label = "Reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
+ };
+
+ button-wifi {
+ label = "Wi-Fi";
+ linux,code = <KEY_RFKILL>;
+ gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
+ };
+
+ button-led {
+ label = "Backlight";
+ linux,code = <KEY_BRIGHTNESS_ZERO>;
+ gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&srab {
+ compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
+ status = "okay";
+
+ ports {
+ port@0 {
+ label = "lan4";
+ };
+
+ port@1 {
+ label = "lan3";
+ };
+
+ port@2 {
+ label = "lan2";
+ };
+
+ port@3 {
+ label = "lan1";
+ };
+
+ port@4 {
+ label = "wan";
+ };
+
+ port@5 {
+ label = "cpu";
+ };
+
+ port@7 {
+ label = "cpu";
+ };
+
+ port@8 {
+ label = "cpu";
+ };
+ };
+};
+
+&usb2 {
+ vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
+};
+
+&usb3_phy {
+ status = "okay";
+};
+
+&nandcs {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x00000000 0x00080000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "nvram";
+ reg = <0x00080000 0x00180000>;
+ };
+
+ partition@200000 {
+ label = "firmware";
+ reg = <0x00200000 0x07e00000>;
+ compatible = "brcm,trx";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac88u.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac88u.dts
index 4d5747aa5dc8..fd344b55087e 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac88u.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-asus-rt-ac88u.dts
@@ -1,102 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
- * Copyright (C) 2021-2022 Arınç ÜNAL <arinc.unal@arinc9.com>
+ * Author: Arınç ÜNAL <arinc.unal@arinc9.com>
*/
/dts-v1/;
-#include "bcm47094.dtsi"
-#include "bcm5301x-nand-cs0-bch8.dtsi"
+#include "bcm47094-asus-rt-ac3100.dtsi"
/ {
compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
- model = "Asus RT-AC88U";
-
- chosen {
- bootargs = "earlycon";
- };
-
- memory@0 {
- device_type = "memory";
- reg = <0x00000000 0x08000000>,
- <0x88000000 0x18000000>;
- };
+ model = "ASUS RT-AC88U";
nvram@1c080000 {
- compatible = "brcm,nvram";
- reg = <0x1c080000 0x00180000>;
-
et1macaddr: et1macaddr {
};
};
- leds {
- compatible = "gpio-leds";
-
- led-power {
- label = "white:power";
- gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "default-on";
- };
-
- led-wan-red {
- label = "red:wan";
- gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
- };
-
- led-lan {
- label = "white:lan";
- gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
- };
-
- led-usb2 {
- label = "white:usb2";
- gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
- trigger-sources = <&ehci_port2>;
- linux,default-trigger = "usbport";
- };
-
- led-usb3 {
- label = "white:usb3";
- gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
- trigger-sources = <&ehci_port1>, <&xhci_port1>;
- linux,default-trigger = "usbport";
- };
-
- led-wps {
- label = "white:wps";
- gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
- };
- };
-
- gpio-keys {
- compatible = "gpio-keys";
-
- button-wps {
- label = "WPS";
- linux,code = <KEY_WPS_BUTTON>;
- gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
- };
-
- button-reset {
- label = "Reset";
- linux,code = <KEY_RESTART>;
- gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
- };
-
- button-wifi {
- label = "Wi-Fi";
- linux,code = <KEY_RFKILL>;
- gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
- };
-
- button-led {
- label = "Backlight";
- linux,code = <KEY_BRIGHTNESS_ZERO>;
- gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
- };
- };
-
switch {
compatible = "realtek,rtl8365mb";
/* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
@@ -175,31 +94,9 @@
};
&srab {
- compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
- status = "okay";
dsa,member = <0 0>;
ports {
- port@0 {
- label = "lan4";
- };
-
- port@1 {
- label = "lan3";
- };
-
- port@2 {
- label = "lan2";
- };
-
- port@3 {
- label = "lan1";
- };
-
- port@4 {
- label = "wan";
- };
-
sw0_p5: port@5 {
/delete-property/ethernet;
@@ -212,19 +109,6 @@
pause;
};
};
-
- port@7 {
- label = "cpu";
-
- fixed-link {
- speed = <1000>;
- full-duplex;
- };
- };
-
- port@8 {
- label = "cpu";
- };
};
};
@@ -236,36 +120,3 @@
nvmem-cells = <&et1macaddr>;
nvmem-cell-names = "mac-address";
};
-
-&usb2 {
- vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
-};
-
-&usb3_phy {
- status = "okay";
-};
-
-&nandcs {
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- label = "boot";
- reg = <0x00000000 0x00080000>;
- read-only;
- };
-
- partition@80000 {
- label = "nvram";
- reg = <0x00080000 0x00180000>;
- };
-
- partition@200000 {
- label = "firmware";
- reg = <0x00200000 0x07e00000>;
- compatible = "brcm,trx";
- };
- };
-};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-885l.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-885l.dts
index 51ce510b3e3a..c5099defe9f9 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-885l.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-885l.dts
@@ -25,6 +25,15 @@
<0x88000000 0x08000000>;
};
+ nvram@1e3f0000 {
+ compatible = "brcm,nvram";
+ reg = <0x1e3f0000 0x10000>;
+
+ et2macaddr: et2macaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
+
nand_controller: nand-controller@18028000 {
nand@0 {
partitions {
@@ -33,6 +42,7 @@
#size-cells = <1>;
partition@0 {
+ compatible = "seama";
label = "firmware";
reg = <0x00000000 0x08000000>;
};
@@ -111,6 +121,11 @@
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};
+&gmac0 {
+ nvmem-cells = <&et2macaddr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
&spi_nor {
status = "okay";
};
@@ -141,6 +156,16 @@
port@4 {
label = "wan";
+ nvmem-cells = <&et2macaddr 3>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@5 {
+ status = "disabled";
+ };
+
+ port@7 {
+ status = "disabled";
};
port@8 {
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-890l.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-890l.dts
index 60744f82c2b7..3124dfd01b94 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-890l.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-dlink-dir-890l.dts
@@ -149,6 +149,7 @@
* partitions: this device uses SEAMA.
*/
firmware@0 {
+ compatible = "seama";
label = "firmware";
reg = <0x00000000 0x08000000>;
};
@@ -191,6 +192,14 @@
label = "wan";
};
+ port@5 {
+ status = "disabled";
+ };
+
+ port@7 {
+ status = "disabled";
+ };
+
port@8 {
label = "cpu";
phy-mode = "rgmii";
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-linksys-panamera.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-linksys-panamera.dts
index 8036c04d81cb..2b5c80d835e9 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-linksys-panamera.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-linksys-panamera.dts
@@ -279,7 +279,7 @@
reg = <0x080000 0x0100000>;
};
- partition@180000{
+ partition@180000 {
label = "devinfo";
reg = <0x0180000 0x080000>;
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-abr-4500.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-abr-4500.dts
index e8991d4e248c..e374062eb5b7 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-abr-4500.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-abr-4500.dts
@@ -107,5 +107,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xap-1610.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xap-1610.dts
index 6875625869d9..badafa024d24 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xap-1610.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xap-1610.dts
@@ -64,6 +64,43 @@
nvmem-cell-names = "mac-address";
};
+
+&pcie0 {
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ bridge@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ wifi@0,0 {
+ compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac";
+ reg = <0x0000 0 0 0 0>;
+ brcm,ccode-map = "AU-AU-920", "CA-CA-892", "GB-DE-964", "NZ-AU-920", "US-US-825";
+ };
+ };
+};
+
+&pcie1 {
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ bridge@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ wifi@0,0 {
+ compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac";
+ reg = <0x0000 0 0 0 0>;
+ brcm,ccode-map = "AU-AU-920", "CA-CA-892", "GB-DE-964", "NZ-AU-920", "US-US-825";
+ };
+ };
+};
+
&spi_nor {
status = "okay";
};
@@ -83,5 +120,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xbr-4500.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xbr-4500.dts
index 7cfa4607ef31..cf95af9db1e6 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xbr-4500.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xbr-4500.dts
@@ -107,5 +107,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwc-2000.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwc-2000.dts
index d55e10095eae..992c19e1cfa1 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwc-2000.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwc-2000.dts
@@ -75,5 +75,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3100.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3100.dts
index ccf031c0e276..4d0ba315a204 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3100.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3100.dts
@@ -147,5 +147,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3150-v1.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3150-v1.dts
index 789dd2a3d226..83c429afc297 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3150-v1.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-luxul-xwr-3150-v1.dts
@@ -81,6 +81,42 @@
nvmem-cell-names = "mac-address";
};
+&pcie0 {
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ bridge@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ wifi@0,0 {
+ compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac";
+ reg = <0x0000 0 0 0 0>;
+ brcm,ccode-map = "AU-AU-953", "CA-CA-946", "GB-E0-846", "NZ-AU-953", "US-Q2-930";
+ };
+ };
+};
+
+&pcie1 {
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ bridge@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ wifi@0,0 {
+ compatible = "brcm,bcm4366-fmac", "brcm,bcm4329-fmac";
+ reg = <0x0000 0 0 0 0>;
+ brcm,ccode-map = "AU-AU-953", "CA-CA-946", "GB-E0-846", "NZ-AU-953", "US-Q2-930";
+ };
+ };
+};
+
&usb3 {
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
};
@@ -122,5 +158,13 @@
port@5 {
label = "cpu";
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-phicomm-k3.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-phicomm-k3.dts
index 3bf6e24978ac..bb1bc4e61bc2 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47094-phicomm-k3.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47094-phicomm-k3.dts
@@ -55,7 +55,7 @@
reg = <0x0080000 0x0100000>;
};
- partition@180000{
+ partition@180000 {
label = "phicomm";
reg = <0x0180000 0x0280000>;
read-only;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-1440.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-1440.dts
index 0734aa249b8e..ac44c745bdf8 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-1440.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-1440.dts
@@ -26,7 +26,6 @@
led-wlan {
label = "bcm53xx:blue:wlan";
gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "default-off";
};
led-system {
@@ -46,3 +45,22 @@
};
};
};
+
+&gmac0 {
+ phy-mode = "rgmii";
+ phy-handle = <&bcm54210e>;
+
+ /delete-node/ fixed-link;
+
+ mdio {
+ /delete-node/ switch@1e;
+
+ bcm54210e: ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
+};
+
+&gmac1 {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-810.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-810.dts
index e6fb6cbe6963..fd071da26cfa 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-810.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47189-luxul-xap-810.dts
@@ -26,7 +26,6 @@
led-5ghz {
label = "bcm53xx:blue:5ghz";
gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "default-off";
};
led-system {
@@ -42,7 +41,6 @@
led-2ghz {
label = "bcm53xx:blue:2ghz";
gpios = <&pcie0_chipcommon 3 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "default-off";
};
};
@@ -83,3 +81,22 @@
};
};
};
+
+&gmac0 {
+ phy-mode = "rgmii";
+ phy-handle = <&bcm54210e>;
+
+ /delete-node/ fixed-link;
+
+ mdio {
+ /delete-node/ switch@1e;
+
+ bcm54210e: ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
+};
+
+&gmac1 {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm47189-tenda-ac9.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm47189-tenda-ac9.dts
index dab2e5f63a72..3ac6cac541ca 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm47189-tenda-ac9.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm47189-tenda-ac9.dts
@@ -111,34 +111,27 @@
ports {
port@0 {
- reg = <0>;
label = "wan";
};
port@1 {
- reg = <1>;
label = "lan1";
};
port@2 {
- reg = <2>;
label = "lan2";
};
port@3 {
- reg = <3>;
label = "lan3";
};
port@4 {
- reg = <4>;
label = "lan4";
};
- port@5 {
- reg = <5>;
+ port@8 {
label = "cpu";
- ethernet = <&gmac0>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm53015-meraki-mr26.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm53015-meraki-mr26.dts
index 03ad614e6b72..0bf5106f7012 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm53015-meraki-mr26.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm53015-meraki-mr26.dts
@@ -124,6 +124,14 @@
full-duplex;
};
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm53016-meraki-mr32.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm53016-meraki-mr32.dts
index 26c12bfb0bdd..25eeacf6a248 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm53016-meraki-mr32.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm53016-meraki-mr32.dts
@@ -185,6 +185,14 @@
full-duplex;
};
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm5301x.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm5301x.dtsi
index 600a1b54f2ae..f06a178a9240 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm5301x.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm5301x.dtsi
@@ -26,13 +26,6 @@
};
};
- pmu {
- compatible = "arm,cortex-a9-pmu";
- interrupts =
- <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
- };
-
clocks {
#address-cells = <1>;
#size-cells = <1>;
@@ -69,33 +62,6 @@
};
};
- mdio-mux@18003000 {
- compatible = "mdio-mux-mmioreg", "mdio-mux";
- mdio-parent-bus = <&mdio>;
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x18003000 0x4>;
- mux-mask = <0x200>;
-
- mdio@0 {
- reg = <0x0>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- usb3_phy: usb3-phy@10 {
- compatible = "brcm,ns-ax-usb3-phy";
- reg = <0x10>;
- usb3-dmp-syscon = <&usb3_dmp>;
- #phy-cells = <0>;
- status = "disabled";
- };
- };
- };
-
- usb3_dmp: syscon@18105000 {
- reg = <0x18105000 0x1000>;
- };
-
i2c0: i2c@18009000 {
compatible = "brcm,iproc-i2c";
reg = <0x18009000 0x50>;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm53573.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm53573.dtsi
index 3f03a381db0f..2df80740d181 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm53573.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm53573.dtsi
@@ -127,6 +127,9 @@
pcie0: pcie@2000 {
reg = <0x00002000 0x1000>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
};
usb2: usb2@4000 {
@@ -156,8 +159,6 @@
};
ohci: usb@d000 {
- #usb-cells = <0>;
-
compatible = "generic-ohci";
reg = <0xd000 0x1000>;
interrupt-parent = <&gic>;
@@ -180,6 +181,12 @@
gmac0: ethernet@5000 {
reg = <0x5000 0x1000>;
+ phy-mode = "internal";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
mdio {
#address-cells = <1>;
@@ -191,10 +198,44 @@
status = "disabled";
- /* ports are defined in board DTS */
ports {
#address-cells = <1>;
#size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ };
+
+ port@1 {
+ reg = <1>;
+ };
+
+ port@2 {
+ reg = <2>;
+ };
+
+ port@3 {
+ reg = <3>;
+ };
+
+ port@4 {
+ reg = <4>;
+ };
+
+ port@5 {
+ reg = <5>;
+ ethernet = <&gmac1>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
+ port@8 {
+ reg = <8>;
+ ethernet = <&gmac0>;
+ };
};
};
};
@@ -202,6 +243,12 @@
gmac1: ethernet@b000 {
reg = <0xb000 0x1000>;
+ phy-mode = "internal";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
};
pmu@12000 {
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm63138.dtsi b/sys/contrib/device-tree/src/arm/broadcom/bcm63138.dtsi
index 93281c47c9ba..4ef02283612b 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm63138.dtsi
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm63138.dtsi
@@ -232,6 +232,12 @@
interrupt-names = "nand";
};
+ serial@4400 {
+ compatible = "brcm,bcm63138-hs-uart", "brcm,bcmbca-hs-uart";
+ reg = <0x4400 0x1e0>;
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
bootlut: bootlut@8000 {
compatible = "brcm,bcm63138-bootlut";
reg = <0x8000 0x50>;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm947189acdbmr.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm947189acdbmr.dts
index 3709baa2376f..0b8727ae6f16 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm947189acdbmr.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm947189acdbmr.dts
@@ -60,9 +60,9 @@
spi {
compatible = "spi-gpio";
num-chipselects = <1>;
- gpio-sck = <&chipcommon 21 0>;
- gpio-miso = <&chipcommon 22 0>;
- gpio-mosi = <&chipcommon 23 0>;
+ sck-gpios = <&chipcommon 21 0>;
+ miso-gpios = <&chipcommon 22 0>;
+ mosi-gpios = <&chipcommon 23 0>;
cs-gpios = <&chipcommon 24 0>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/broadcom/bcm953012er.dts b/sys/contrib/device-tree/src/arm/broadcom/bcm953012er.dts
index 4fe3b3653376..d939ec9f4a9e 100644
--- a/sys/contrib/device-tree/src/arm/broadcom/bcm953012er.dts
+++ b/sys/contrib/device-tree/src/arm/broadcom/bcm953012er.dts
@@ -84,6 +84,14 @@
label = "cpu";
ethernet = <&gmac0>;
};
+
+ port@7 {
+ status = "disabled";
+ };
+
+ port@8 {
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/hisilicon/hi3519.dtsi b/sys/contrib/device-tree/src/arm/hisilicon/hi3519.dtsi
index c524c854d319..a42b71cdc5d7 100644
--- a/sys/contrib/device-tree/src/arm/hisilicon/hi3519.dtsi
+++ b/sys/contrib/device-tree/src/arm/hisilicon/hi3519.dtsi
@@ -54,7 +54,7 @@
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg HI3519_UART0_CLK>, <&crg HI3519_UART0_CLK>;
clock-names = "uartclk", "apb_pclk";
- status = "disable";
+ status = "disabled";
};
uart1: serial@12101000 {
@@ -63,7 +63,7 @@
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg HI3519_UART1_CLK>, <&crg HI3519_UART1_CLK>;
clock-names = "uartclk", "apb_pclk";
- status = "disable";
+ status = "disabled";
};
uart2: serial@12102000 {
@@ -72,7 +72,7 @@
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg HI3519_UART2_CLK>, <&crg HI3519_UART2_CLK>;
clock-names = "uartclk", "apb_pclk";
- status = "disable";
+ status = "disabled";
};
uart3: serial@12103000 {
@@ -81,7 +81,7 @@
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg HI3519_UART3_CLK>, <&crg HI3519_UART3_CLK>;
clock-names = "uartclk", "apb_pclk";
- status = "disable";
+ status = "disabled";
};
uart4: serial@12104000 {
@@ -90,7 +90,7 @@
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg HI3519_UART4_CLK>, <&crg HI3519_UART4_CLK>;
clock-names = "uartclk", "apb_pclk";
- status = "disable";
+ status = "disabled";
};
dual_timer0: timer@12000000 {
@@ -100,7 +100,7 @@
reg = <0x12000000 0x1000>;
clocks = <&clk_3m>;
clock-names = "apb_pclk";
- status = "disable";
+ status = "disabled";
};
dual_timer1: timer@12001000 {
@@ -110,7 +110,7 @@
reg = <0x12001000 0x1000>;
clocks = <&clk_3m>;
clock-names = "apb_pclk";
- status = "disable";
+ status = "disabled";
};
dual_timer2: timer@12002000 {
@@ -120,7 +120,7 @@
reg = <0x12002000 0x1000>;
clocks = <&clk_3m>;
clock-names = "apb_pclk";
- status = "disable";
+ status = "disabled";
};
spi_bus0: spi@12120000 {
@@ -132,7 +132,7 @@
num-cs = <1>;
#address-cells = <1>;
#size-cells = <0>;
- status = "disable";
+ status = "disabled";
};
spi_bus1: spi@12121000 {
@@ -144,7 +144,7 @@
num-cs = <1>;
#address-cells = <1>;
#size-cells = <0>;
- status = "disable";
+ status = "disabled";
};
spi_bus2: spi@12122000 {
@@ -156,7 +156,7 @@
num-cs = <1>;
#address-cells = <1>;
#size-cells = <0>;
- status = "disable";
+ status = "disabled";
};
sysctrl: system-controller@12020000 {
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts
index b9d46eb06507..fa133c913606 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-dlink-dsm-g600.dts
@@ -57,7 +57,7 @@
button-reset {
wakeup-source;
- linux,code = <KEY_ESC>;
+ linux,code = <KEY_RESTART>;
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-freecom-fsg-3.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-freecom-fsg-3.dts
index 5a5e16cc7335..73d3c11dd0d4 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-freecom-fsg-3.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-freecom-fsg-3.dts
@@ -44,7 +44,7 @@
};
button-reset {
wakeup-source;
- linux,code = <KEY_ESC>;
+ linux,code = <KEY_RESTART>;
label = "reset";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-gateway-7001.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-gateway-7001.dts
index 4d70f6afd13a..6d5e69035f94 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-gateway-7001.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-gateway-7001.dts
@@ -60,6 +60,8 @@
* We have slots (IDSEL) 1 and 2 with one assigned IRQ
* each handling all IRQs.
*/
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map =
/* IDSEL 1 */
<0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-goramo-multilink.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-goramo-multilink.dts
index 9ec0169bacf8..5f4c849915db 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-goramo-multilink.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-goramo-multilink.dts
@@ -89,6 +89,8 @@
* The slots have Ethernet, Ethernet, NEC and MPCI.
* The IDSELs are 11, 12, 13, 14.
*/
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map =
/* IDSEL 11 - Ethernet A */
<0x5800 0 0 1 &gpio0 4 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 11 is irq 4 */
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-iomega-nas100d.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-iomega-nas100d.dts
index 8da6823e1dbe..26f02dad6a54 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-iomega-nas100d.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-iomega-nas100d.dts
@@ -63,7 +63,7 @@
};
button-reset {
wakeup-source;
- linux,code = <KEY_ESC>;
+ linux,code = <KEY_RESTART>;
label = "reset";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-nslu2.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-nslu2.dts
index da1e93212b86..2eec5f63d399 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-nslu2.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-nslu2.dts
@@ -65,7 +65,7 @@
};
button-reset {
wakeup-source;
- linux,code = <KEY_ESC>;
+ linux,code = <KEY_RESTART>;
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
@@ -101,6 +101,8 @@
flash@0,0 {
compatible = "intel,ixp4xx-flash", "cfi-flash";
bank-width = <2>;
+ /* Enable writes on the expansion bus */
+ intel,ixp4xx-eb-write-enable = <1>;
/*
* 8 MB of Flash in 0x20000 byte blocks
* mapped in at CS0.
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-wrv54g.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-wrv54g.dts
index 4aba9e0214a0..98275a363c57 100644
--- a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-wrv54g.dts
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-linksys-wrv54g.dts
@@ -13,7 +13,7 @@
/ {
model = "Linksys WRV54G / Gemtek GTWX5715";
- compatible = "linksys,wrv54g", "gemtek,gtwx5715", "intel,ixp42x";
+ compatible = "linksys,wrv54g", "intel,ixp42x";
#address-cells = <1>;
#size-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts
new file mode 100644
index 000000000000..2c89db34c8d8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts
@@ -0,0 +1,251 @@
+// SPDX-License-Identifier: ISC
+/*
+ * Device Tree file for the USRobotics USR8200 firewall
+ * VPN and NAS. Based on know-how from Peter Denison.
+ *
+ * This machine is based on IXP422, the USR internal codename
+ * is "Jeeves".
+ */
+
+/dts-v1/;
+
+#include "intel-ixp42x.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "USRobotics USR8200";
+ compatible = "usr,usr8200", "intel,ixp42x";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x00000000 0x4000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ stdout-path = "uart1:115200n8";
+ };
+
+ aliases {
+ /* These are switched around */
+ serial0 = &uart1;
+ serial1 = &uart0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ ieee1394_led: led-1394 {
+ label = "usr8200:green:1394";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+ usb1_led: led-usb1 {
+ label = "usr8200:green:usb1";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+ usb2_led: led-usb2 {
+ label = "usr8200:green:usb2";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+ wireless_led: led-wireless {
+ /*
+ * This LED is mounted inside the case but cannot be
+ * seen from the outside: probably USR planned at one
+ * point for the device to have a wireless card, then
+ * changed their mind and didn't mount it, leaving the
+ * LED in place.
+ */
+ label = "usr8200:green:wireless";
+ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+ pwr_led: led-pwr {
+ label = "usr8200:green:pwr";
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+
+ button-reset {
+ wakeup-source;
+ linux,code = <KEY_RESTART>;
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ soc {
+ bus@c4000000 {
+ flash@0,0 {
+ compatible = "intel,ixp4xx-flash", "cfi-flash";
+ bank-width = <2>;
+ /* Enable writes on the expansion bus */
+ intel,ixp4xx-eb-write-enable = <1>;
+ /* 16 MB of Flash mapped in at CS0 */
+ reg = <0 0x00000000 0x1000000>;
+
+ partitions {
+ compatible = "redboot-fis";
+ /* Eraseblock at 0x0fe0000 */
+ fis-index-block = <0x7f>;
+ };
+ };
+ rtc@2,0 {
+ /* EPSON RTC7301 DG DIL-capsule */
+ compatible = "epson,rtc7301dg";
+ /*
+ * These timing settings were found in the boardfile patch:
+ * IXP4XX_EXP_CS2 = 0x3fff000 | IXP4XX_EXP_BUS_SIZE(0) | IXP4XX_EXP_BUS_WR_EN |
+ * IXP4XX_EXP_BUS_CS_EN | IXP4XX_EXP_BUS_BYTE_EN;
+ */
+ intel,ixp4xx-eb-t1 = <0>; // no cycles extra address phase
+ intel,ixp4xx-eb-t2 = <0>; // no cycles extra setup phase
+ intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase
+ intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase
+ intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase
+ intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle
+ intel,ixp4xx-eb-byte-access-on-halfword = <0>;
+ intel,ixp4xx-eb-mux-address-and-data = <0>;
+ intel,ixp4xx-eb-ahb-split-transfers = <0>;
+ intel,ixp4xx-eb-write-enable = <1>;
+ intel,ixp4xx-eb-byte-access = <1>;
+ /* 512 bytes at CS2 */
+ reg = <2 0x00000000 0x0000200>;
+ reg-io-width = <1>;
+ native-endian;
+ /* FIXME: try to check if there is an IRQ for the RTC? */
+ };
+ };
+
+ pci@c0000000 {
+ status = "okay";
+
+ /*
+ * Taken from USR8200 boardfile from OpenWrt
+ *
+ * We have 3 slots (IDSEL) with partly swizzled IRQs on slot 16.
+ * We assume the same IRQ for all pins on the remaining slots, that
+ * is what the boardfile was doing.
+ */
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0xf800 0 0 7>;
+ interrupt-map =
+ /* IDSEL 14 used for "Wireless" in the board file */
+ <0x7000 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 7 */
+ /* IDSEL 15 used for VIA VT6307 IEEE 1394 Firewire */
+ <0x7800 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 15 is irq 8 */
+ /* IDSEL 16 used for VIA VT6202 USB 2.0 4+1 */
+ <0x8000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 16 is irq 11 */
+ <0x8000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 16 is irq 10 */
+ <0x8000 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT C on slot 16 is irq 9 */
+ };
+
+ gpio@c8004000 {
+ /* Enable clock out on GPIO 15 */
+ intel,ixp4xx-gpio15-clkout;
+ };
+
+ /* EthB WAN */
+ ethernet@c8009000 {
+ status = "okay";
+ queue-rx = <&qmgr 3>;
+ queue-txready = <&qmgr 20>;
+ phy-mode = "rgmii";
+ phy-handle = <&phy9>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /*
+ * PHY 0..4 are internal to the MV88E6060 switch but appear
+ * as independent devices.
+ */
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+ phy1: ethernet-phy@1 {
+ reg = <1>;
+ };
+ phy2: ethernet-phy@2 {
+ reg = <2>;
+ };
+ phy3: ethernet-phy@3 {
+ reg = <3>;
+ };
+
+ /* Altima AMI101L used by the WAN port */
+ phy9: ethernet-phy@9 {
+ reg = <9>;
+ };
+
+ /* The switch uses MDIO addresses 16 thru 31 */
+ switch@16 {
+ compatible = "marvell,mv88e6060";
+ reg = <16>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "lan1";
+ phy-handle = <&phy0>;
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "lan2";
+ phy-handle = <&phy1>;
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "lan3";
+ phy-handle = <&phy2>;
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "lan4";
+ phy-handle = <&phy3>;
+ };
+
+ port@5 {
+ /* Port 5 is the CPU port according to the MV88E6060 datasheet */
+ reg = <5>;
+ phy-mode = "rgmii-id";
+ ethernet = <&ethc>;
+ label = "cpu";
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+ };
+
+ /* EthC LAN connected to the Marvell DSA Switch */
+ ethc: ethernet@c800a000 {
+ status = "okay";
+ queue-rx = <&qmgr 4>;
+ queue-txready = <&qmgr 21>;
+ phy-mode = "rgmii";
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga.dtsi b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga.dtsi
index 4c1d140f40f8..35be14150f41 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga.dtsi
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga.dtsi
@@ -768,7 +768,7 @@
status = "disabled";
};
- nand0: nand@ff900000 {
+ nand0: nand-controller@ff900000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "altr,socfpga-denali-nand";
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10.dtsi b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10.dtsi
index 72c55e5187ca..6b6e77596ffa 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10.dtsi
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10.dtsi
@@ -440,7 +440,7 @@
clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>;
clock-names = "stmmaceth", "ptp_ref";
resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
snps,axi-config = <&socfpga_axi_setup>;
status = "disabled";
};
@@ -460,7 +460,7 @@
clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>;
clock-names = "stmmaceth", "ptp_ref";
resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
snps,axi-config = <&socfpga_axi_setup>;
status = "disabled";
};
@@ -480,7 +480,7 @@
clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>;
clock-names = "stmmaceth", "ptp_ref";
resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
snps,axi-config = <&socfpga_axi_setup>;
status = "disabled";
};
@@ -669,7 +669,7 @@
status = "disabled";
};
- nand: nand@ffb90000 {
+ nand: nand-controller@ffb90000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "altr,socfpga-denali-nand";
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10_socdk_qspi.dts b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10_socdk_qspi.dts
index 11ccdc6c2dc6..0434f1c7b665 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10_socdk_qspi.dts
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria10_socdk_qspi.dts
@@ -17,8 +17,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <3>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria5_socdk.dts b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria5_socdk.dts
index c48385702a85..7342f5942b0d 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria5_socdk.dts
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_arria5_socdk.dts
@@ -124,8 +124,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <4>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_socdk.dts b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_socdk.dts
index c7f5fa0ba0f2..d37a982e8571 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_socdk.dts
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_socdk.dts
@@ -129,8 +129,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <4>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sockit.dts b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sockit.dts
index 3dd99c7c95e0..9e4db7407f1a 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sockit.dts
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sockit.dts
@@ -174,8 +174,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <4>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sodia.dts b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sodia.dts
index 2564671fc1c6..ce0d6514eeb5 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sodia.dts
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_sodia.dts
@@ -121,8 +121,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <4>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
diff --git a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_vining_fpga.dts b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_vining_fpga.dts
index e0630b0eed03..65f390bf8975 100644
--- a/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_vining_fpga.dts
+++ b/sys/contrib/device-tree/src/arm/intel/socfpga/socfpga_cyclone5_vining_fpga.dts
@@ -229,8 +229,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <4>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
@@ -246,8 +244,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <4>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-dlink-dns327l.dts b/sys/contrib/device-tree/src/arm/marvell/armada-370-dlink-dns327l.dts
index 561195b749eb..d4c4efabd254 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-dlink-dns327l.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-dlink-dns327l.dts
@@ -105,54 +105,45 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usb_power: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- pinctrl-0 = <&xhci_pwr_pin>;
- pinctrl-names = "default";
- regulator-name = "USB3.0 Port Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-boot-on;
- regulator-always-on;
- gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
- };
+ usb_power: regulator-1 {
+ compatible = "regulator-fixed";
+ pinctrl-0 = <&xhci_pwr_pin>;
+ pinctrl-names = "default";
+ regulator-name = "USB3.0 Port Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-boot-on;
+ regulator-always-on;
+ gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
- sata_r_power: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- pinctrl-0 = <&sata_r_pwr_pin>;
- pinctrl-names = "default";
- regulator-name = "SATA-R Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <2000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
- };
+ sata_r_power: regulator-2 {
+ compatible = "regulator-fixed";
+ pinctrl-0 = <&sata_r_pwr_pin>;
+ pinctrl-names = "default";
+ regulator-name = "SATA-R Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <2000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
+ };
- sata_l_power: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- pinctrl-0 = <&sata_l_pwr_pin>;
- pinctrl-names = "default";
- regulator-name = "SATA-L Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <4000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
- };
+ sata_l_power: regulator-3 {
+ compatible = "regulator-fixed";
+ pinctrl-0 = <&sata_l_pwr_pin>;
+ pinctrl-names = "default";
+ regulator-name = "SATA-L Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <4000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-rd.dts b/sys/contrib/device-tree/src/arm/marvell/armada-370-rd.dts
index b459a670f615..f23f6b3fc8f3 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-rd.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-rd.dts
@@ -95,7 +95,7 @@
gpio-fan {
compatible = "gpio-fan";
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = <0 0 3000 1>;
+ gpio-fan,speed-map = <0 0>, <3000 1>;
pinctrl-0 = <&fan_pins>;
pinctrl-names = "default";
};
@@ -149,39 +149,37 @@
};
};
- switch: switch@10 {
+ switch: ethernet-switch@10 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <0x10>;
interrupt-controller;
#interrupt-cells = <2>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
label = "lan0";
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan1";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan3";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
ethernet = <&eth1>;
phy-mode = "rgmii-id";
@@ -196,25 +194,25 @@
#address-cells = <1>;
#size-cells = <0>;
- switchphy0: switchphy@0 {
+ switchphy0: ethernet-phy@0 {
reg = <0>;
interrupt-parent = <&switch>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
};
- switchphy1: switchphy@1 {
+ switchphy1: ethernet-phy@1 {
reg = <1>;
interrupt-parent = <&switch>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
};
- switchphy2: switchphy@2 {
+ switchphy2: ethernet-phy@2 {
reg = <2>;
interrupt-parent = <&switch>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
};
- switchphy3: switchphy@3 {
+ switchphy3: ethernet-phy@3 {
reg = <3>;
interrupt-parent = <&switch>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-2bay.dts b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-2bay.dts
index 8dd242e668e6..6ec3dd3337f4 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-2bay.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-2bay.dts
@@ -25,9 +25,9 @@
gpio-fan {
gpio-fan,speed-map =
- < 0 3
- 950 2
- 1400 1
- 1800 0>;
+ < 0 3>,
+ < 950 2>,
+ <1400 1>,
+ <1800 0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-4bay.dts b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-4bay.dts
index 9cb69999b1db..3011578a3124 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-4bay.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-4bay.dts
@@ -46,29 +46,26 @@
};
};
- regulators {
- regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "SATA2 power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&pca9554 6 GPIO_ACTIVE_HIGH>;
- };
- regulator@4 {
- compatible = "regulator-fixed";
- reg = <4>;
- regulator-name = "SATA3 power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&pca9554 7 GPIO_ACTIVE_HIGH>;
- };
+ regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA2 power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&pca9554 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ regulator-4 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA3 power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&pca9554 7 GPIO_ACTIVE_HIGH>;
};
gpio-leds {
@@ -109,10 +106,10 @@
gpio-fan {
gpio-fan,speed-map =
- < 0 3
- 800 2
- 1050 1
- 1300 0>;
+ < 0 3>,
+ < 800 2>,
+ <1050 1>,
+ <1300 0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-xbay.dtsi b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-xbay.dtsi
index 822f10734946..ffb3179033e7 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-xbay.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-nas-xbay.dtsi
@@ -70,34 +70,26 @@
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
-
- regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "SATA0 power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
- };
- regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "SATA1 power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
- };
+ regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA0 power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
+ };
+
+ regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA1 power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
};
gpio-fan {
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud-2bay.dts b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud-2bay.dts
index 5ee572dc9242..45d8ec5dfeb7 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud-2bay.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud-2bay.dts
@@ -32,17 +32,14 @@
};
};
- regulators {
- regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "SATA1 power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
- };
+ regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA1 power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud.dtsi b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud.dtsi
index 124a8ba279e3..054124857235 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-seagate-personal-cloud.dtsi
@@ -53,32 +53,25 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "USB Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 27 GPIO_ACTIVE_LOW>;
- };
- regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "SATA0 power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
- };
+ regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 27 GPIO_ACTIVE_LOW>;
+ };
+
+ regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA0 power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
};
gpio-keys {
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-370-synology-ds213j.dts b/sys/contrib/device-tree/src/arm/marvell/armada-370-synology-ds213j.dts
index f0893cc06607..02599a3e9816 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-370-synology-ds213j.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-370-synology-ds213j.dts
@@ -113,14 +113,14 @@
&gpio2 0 GPIO_ACTIVE_HIGH
&gpio2 1 GPIO_ACTIVE_HIGH>;
alarm-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 1000 1
- 1150 2
- 1350 4
- 1500 3
- 1650 5
- 1750 6
- 1900 7 >;
+ gpio-fan,speed-map = < 0 0>,
+ <1000 1>,
+ <1150 2>,
+ <1350 4>,
+ <1500 3>,
+ <1650 5>,
+ <1750 6>,
+ <1900 7>;
};
gpio-leds {
@@ -142,38 +142,32 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-0 = <&sata1_pwr_pin &sata2_pwr_pin>;
+ sata1_regulator: sata1-regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA1 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <2000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sata1_pwr_pin>;
pinctrl-names = "default";
+ };
- sata1_regulator: sata1-regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "SATA1 Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <2000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
- };
-
- sata2_regulator: sata2-regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "SATA2 Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <4000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
- };
+ sata2_regulator: sata2-regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA2 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <4000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sata2_pwr_pin>;
+ pinctrl-names = "default";
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-381-netgear-gs110emx.dts b/sys/contrib/device-tree/src/arm/marvell/armada-381-netgear-gs110emx.dts
index f4c4b213ef4e..5baf83e5253d 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-381-netgear-gs110emx.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-381-netgear-gs110emx.dts
@@ -77,51 +77,49 @@
pinctrl-0 = <&mdio_pins>;
status = "okay";
- switch@0 {
+ ethernet-switch@0 {
compatible = "marvell,mv88e6190";
- #address-cells = <1>;
#interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&gpio1>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
pinctrl-0 = <&switch_interrupt_pins>;
pinctrl-names = "default";
- #size-cells = <0>;
reg = <0>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
- switch0phy1: switch0phy1@1 {
+ switch0phy1: ethernet-phy@1 {
reg = <0x1>;
};
- switch0phy2: switch0phy2@2 {
+ switch0phy2: ethernet-phy@2 {
reg = <0x2>;
};
- switch0phy3: switch0phy3@3 {
+ switch0phy3: ethernet-phy@3 {
reg = <0x3>;
};
- switch0phy4: switch0phy4@4 {
+ switch0phy4: ethernet-phy@4 {
reg = <0x4>;
};
- switch0phy5: switch0phy5@5 {
+ switch0phy5: ethernet-phy@5 {
reg = <0x5>;
};
- switch0phy6: switch0phy6@6 {
+ switch0phy6: ethernet-phy@6 {
reg = <0x6>;
};
- switch0phy7: switch0phy7@7 {
+ switch0phy7: ethernet-phy@7 {
reg = <0x7>;
};
- switch0phy8: switch0phy8@8 {
+ switch0phy8: ethernet-phy@8 {
reg = <0x8>;
};
};
@@ -142,11 +140,11 @@
};
};
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
ethernet = <&eth0>;
phy-mode = "rgmii";
reg = <0>;
@@ -158,55 +156,55 @@
};
};
- port@1 {
+ ethernet-port@1 {
label = "lan1";
phy-handle = <&switch0phy1>;
reg = <1>;
};
- port@2 {
+ ethernet-port@2 {
label = "lan2";
phy-handle = <&switch0phy2>;
reg = <2>;
};
- port@3 {
+ ethernet-port@3 {
label = "lan3";
phy-handle = <&switch0phy3>;
reg = <3>;
};
- port@4 {
+ ethernet-port@4 {
label = "lan4";
phy-handle = <&switch0phy4>;
reg = <4>;
};
- port@5 {
+ ethernet-port@5 {
label = "lan5";
phy-handle = <&switch0phy5>;
reg = <5>;
};
- port@6 {
+ ethernet-port@6 {
label = "lan6";
phy-handle = <&switch0phy6>;
reg = <6>;
};
- port@7 {
+ ethernet-port@7 {
label = "lan7";
phy-handle = <&switch0phy7>;
reg = <7>;
};
- port@8 {
+ ethernet-port@8 {
label = "lan8";
phy-handle = <&switch0phy8>;
reg = <8>;
};
- port@9 {
+ ethernet-port@9 {
/* 88X3310P external phy */
label = "lan9";
phy-handle = <&phy1>;
@@ -214,7 +212,7 @@
reg = <9>;
};
- port@a {
+ ethernet-port@a {
/* 88X3310P external phy */
label = "lan10";
phy-handle = <&phy2>;
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-382-rd-ac3x-48g4x2xl.dts b/sys/contrib/device-tree/src/arm/marvell/armada-382-rd-ac3x-48g4x2xl.dts
index 584f0d0398a5..6ab65d21861a 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-382-rd-ac3x-48g4x2xl.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-382-rd-ac3x-48g4x2xl.dts
@@ -40,7 +40,7 @@
pinctrl-0 = <&i2c0_pins>;
status = "okay";
- eeprom@53{
+ eeprom@53 {
compatible = "atmel,24c64";
reg = <0x53>;
};
@@ -95,11 +95,11 @@
reg = <0x00000000 0x00500000>;
label = "u-boot";
};
- partition@500000{
+ partition@500000 {
reg = <0x00500000 0x00400000>;
label = "u-boot env";
};
- partition@900000{
+ partition@900000 {
reg = <0x00900000 0x3F700000>;
label = "user";
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-l8.dts b/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-l8.dts
index 1990f7d0cc79..1707d1b01545 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-l8.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-l8.dts
@@ -7,66 +7,66 @@
};
&mdio {
- switch0: switch0@4 {
+ switch0: ethernet-switch@4 {
compatible = "marvell,mv88e6190";
reg = <4>;
pinctrl-names = "default";
pinctrl-0 = <&cf_gtr_switch_reset_pins>;
reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan8";
phy-handle = <&switch0phy0>;
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan7";
phy-handle = <&switch0phy1>;
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan6";
phy-handle = <&switch0phy2>;
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "lan5";
phy-handle = <&switch0phy3>;
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "lan4";
phy-handle = <&switch0phy4>;
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "lan3";
phy-handle = <&switch0phy5>;
};
- port@7 {
+ ethernet-port@7 {
reg = <7>;
label = "lan2";
phy-handle = <&switch0phy6>;
};
- port@8 {
+ ethernet-port@8 {
reg = <8>;
label = "lan1";
phy-handle = <&switch0phy7>;
};
- port@10 {
+ ethernet-port@10 {
reg = <10>;
phy-mode = "2500base-x";
@@ -83,35 +83,35 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy0: switch0phy0@1 {
+ switch0phy0: ethernet-phy@1 {
reg = <0x1>;
};
- switch0phy1: switch0phy1@2 {
+ switch0phy1: ethernet-phy@2 {
reg = <0x2>;
};
- switch0phy2: switch0phy2@3 {
+ switch0phy2: ethernet-phy@3 {
reg = <0x3>;
};
- switch0phy3: switch0phy3@4 {
+ switch0phy3: ethernet-phy@4 {
reg = <0x4>;
};
- switch0phy4: switch0phy4@5 {
+ switch0phy4: ethernet-phy@5 {
reg = <0x5>;
};
- switch0phy5: switch0phy5@6 {
+ switch0phy5: ethernet-phy@6 {
reg = <0x6>;
};
- switch0phy6: switch0phy6@7 {
+ switch0phy6: ethernet-phy@7 {
reg = <0x7>;
};
- switch0phy7: switch0phy7@8 {
+ switch0phy7: ethernet-phy@8 {
reg = <0x8>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-s4.dts b/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-s4.dts
index b795ad573891..a7678a784c18 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-s4.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-385-clearfog-gtr-s4.dts
@@ -11,42 +11,42 @@
};
&mdio {
- switch0: switch0@4 {
+ switch0: ethernet-switch@4 {
compatible = "marvell,mv88e6085";
reg = <4>;
pinctrl-names = "default";
pinctrl-0 = <&cf_gtr_switch_reset_pins>;
reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan2";
phy-handle = <&switch0phy0>;
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan1";
phy-handle = <&switch0phy1>;
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan4";
phy-handle = <&switch0phy2>;
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "lan3";
phy-handle = <&switch0phy3>;
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
phy-mode = "2500base-x";
ethernet = <&eth1>;
@@ -63,19 +63,19 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy0: switch0phy0@11 {
+ switch0phy0: ethernet-phy@11 {
reg = <0x11>;
};
- switch0phy1: switch0phy1@12 {
+ switch0phy1: ethernet-phy@12 {
reg = <0x12>;
};
- switch0phy2: switch0phy2@13 {
+ switch0phy2: ethernet-phy@13 {
reg = <0x13>;
};
- switch0phy3: switch0phy3@14 {
+ switch0phy3: ethernet-phy@14 {
reg = <0x14>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-385-linksys.dtsi b/sys/contrib/device-tree/src/arm/marvell/armada-385-linksys.dtsi
index fc8216fd9f60..4116ed60f709 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-385-linksys.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-385-linksys.dtsi
@@ -158,42 +158,40 @@
&mdio {
status = "okay";
- switch@0 {
+ ethernet-switch@0 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <0>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
label = "lan4";
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan3";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan1";
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "wan";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
phy-mode = "sgmii";
ethernet = <&eth2>;
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-385-synology-ds116.dts b/sys/contrib/device-tree/src/arm/marvell/armada-385-synology-ds116.dts
index ea91ff964d94..6caa5c50175a 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-385-synology-ds116.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-385-synology-ds116.dts
@@ -131,14 +131,14 @@
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>,
<&gpio1 17 GPIO_ACTIVE_HIGH>,
<&gpio1 16 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 1500 1
- 2500 2
- 3000 3
- 3400 4
- 3700 5
- 3900 6
- 4000 7>;
+ gpio-fan,speed-map = < 0 0>,
+ <1500 1>,
+ <2500 2>,
+ <3000 3>,
+ <3400 4>,
+ <3700 5>,
+ <3900 6>,
+ <4000 7>;
#cooling-cells = <2>;
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-385-turris-omnia.dts b/sys/contrib/device-tree/src/arm/marvell/armada-385-turris-omnia.dts
index 2d8d319bec83..7b755bb4e4e7 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-385-turris-omnia.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-385-turris-omnia.dts
@@ -435,12 +435,10 @@
};
/* Switch MV88E6176 at address 0x10 */
- switch@10 {
+ ethernet-switch@10 {
pinctrl-names = "default";
pinctrl-0 = <&swint_pins>;
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
dsa,member = <0 0>;
reg = <0x10>;
@@ -448,36 +446,36 @@
interrupt-parent = <&gpio1>;
interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- ports@0 {
+ ethernet-port@0 {
reg = <0>;
label = "lan0";
};
- ports@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan1";
};
- ports@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan2";
};
- ports@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan3";
};
- ports@4 {
+ ethernet-port@4 {
reg = <4>;
label = "lan4";
};
- ports@5 {
+ ethernet-port@5 {
reg = <5>;
ethernet = <&eth1>;
phy-mode = "rgmii-id";
@@ -488,7 +486,7 @@
};
};
- ports@6 {
+ ethernet-port@6 {
reg = <6>;
ethernet = <&eth0>;
phy-mode = "rgmii-id";
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-388-clearfog.dts b/sys/contrib/device-tree/src/arm/marvell/armada-388-clearfog.dts
index 32c569df142f..3290ccad2374 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-388-clearfog.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-388-clearfog.dts
@@ -92,44 +92,42 @@
&mdio {
status = "okay";
- switch@4 {
+ ethernet-switch@4 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <4>;
pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
pinctrl-names = "default";
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
label = "lan5";
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan4";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan3";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan2";
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "lan1";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
ethernet = <&eth1>;
phy-mode = "1000base-x";
@@ -140,7 +138,7 @@
};
};
- port@6 {
+ ethernet-port@6 {
/* 88E1512 external phy */
reg = <6>;
label = "lan6";
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-388-gp.dts b/sys/contrib/device-tree/src/arm/marvell/armada-388-gp.dts
index e2ba50520b6b..1de0a172aa5f 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-388-gp.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-388-gp.dts
@@ -237,8 +237,8 @@
gpio-fan {
compatible = "gpio-fan";
gpios = <&expander1 3 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 3000 1>;
+ gpio-fan,speed-map = < 0 0>,
+ <3000 1>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-xp-linksys-mamba.dts b/sys/contrib/device-tree/src/arm/marvell/armada-xp-linksys-mamba.dts
index 7a0614fd0c93..ea859f7ea042 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-xp-linksys-mamba.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-xp-linksys-mamba.dts
@@ -265,42 +265,40 @@
&mdio {
status = "okay";
- switch@0 {
+ ethernet-switch@0 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <0>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
label = "lan4";
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan3";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan1";
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "internet";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
phy-mode = "rgmii-id";
ethernet = <&eth0>;
diff --git a/sys/contrib/device-tree/src/arm/marvell/armada-xp-synology-ds414.dts b/sys/contrib/device-tree/src/arm/marvell/armada-xp-synology-ds414.dts
index 5551bac1962c..1b65059794bf 100644
--- a/sys/contrib/device-tree/src/arm/marvell/armada-xp-synology-ds414.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/armada-xp-synology-ds414.dts
@@ -109,65 +109,60 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-0 = <&sata1_pwr_pin &sata2_pwr_pin
- &sata3_pwr_pin &sata4_pwr_pin>;
+ sata1_regulator: sata1-regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA1 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <2000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sata1_pwr_pin>;
pinctrl-names = "default";
+ };
- sata1_regulator: sata1-regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "SATA1 Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <2000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
- };
-
- sata2_regulator: sata2-regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "SATA2 Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <4000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
- };
+ sata2_regulator: sata2-regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA2 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <4000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sata2_pwr_pin>;
+ pinctrl-names = "default";
+ };
- sata3_regulator: sata3-regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "SATA3 Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <6000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
- };
+ sata3_regulator: sata3-regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA3 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <6000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sata3_pwr_pin>;
+ pinctrl-names = "default";
+ };
- sata4_regulator: sata4-regulator@4 {
- compatible = "regulator-fixed";
- reg = <4>;
- regulator-name = "SATA4 Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- startup-delay-us = <8000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
- };
+ sata4_regulator: sata4-regulator-4 {
+ compatible = "regulator-fixed";
+ regulator-name = "SATA4 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <8000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sata4_pwr_pin>;
+ pinctrl-names = "default";
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/dove-cm-a510.dtsi b/sys/contrib/device-tree/src/arm/marvell/dove-cm-a510.dtsi
index 1082fdfbfe60..621cb145a8f6 100644
--- a/sys/contrib/device-tree/src/arm/marvell/dove-cm-a510.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/dove-cm-a510.dtsi
@@ -108,18 +108,12 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- wifi_power: regulator@1 {
- compatible = "regulator-fixed";
- regulator-name = "WiFi Power";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>;
- };
+ wifi_power: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "WiFi Power";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/dove-cubox.dts b/sys/contrib/device-tree/src/arm/marvell/dove-cubox.dts
index dbba0c8cdab1..bfde99486a87 100644
--- a/sys/contrib/device-tree/src/arm/marvell/dove-cubox.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/dove-cubox.dts
@@ -28,24 +28,17 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usb_power: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "USB Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio0 1 0>;
- pinctrl-0 = <&pmx_gpio_1>;
- pinctrl-names = "default";
- };
+ usb_power: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 1 0>;
+ pinctrl-0 = <&pmx_gpio_1>;
+ pinctrl-names = "default";
};
clocks {
diff --git a/sys/contrib/device-tree/src/arm/marvell/dove-d3plug.dts b/sys/contrib/device-tree/src/arm/marvell/dove-d3plug.dts
index 5aa5d4a7d51d..a451fd576990 100644
--- a/sys/contrib/device-tree/src/arm/marvell/dove-d3plug.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/dove-d3plug.dts
@@ -37,24 +37,17 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usb_power: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "USB Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio0 8 0>;
- pinctrl-0 = <&pmx_gpio_8>;
- pinctrl-names = "default";
- };
+ usb_power: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 8 0>;
+ pinctrl-0 = <&pmx_gpio_8>;
+ pinctrl-names = "default";
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/dove-sbc-a510.dts b/sys/contrib/device-tree/src/arm/marvell/dove-sbc-a510.dts
index df021f9b0117..8585ee5533bf 100644
--- a/sys/contrib/device-tree/src/arm/marvell/dove-sbc-a510.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/dove-sbc-a510.dts
@@ -76,22 +76,20 @@
stdout-path = &uart0;
};
- regulators {
- usb0_power: regulator@2 {
- compatible = "regulator-fixed";
- regulator-name = "USB Power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio_ext 0 GPIO_ACTIVE_HIGH>;
- };
-
- mmc_power: regulator@3 {
- compatible = "regulator-fixed";
- regulator-name = "MMC Power";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio_ext 13 GPIO_ACTIVE_HIGH>;
- };
+ usb0_power: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio_ext 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ mmc_power: regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "MMC Power";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio_ext 13 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-dnskw.dtsi b/sys/contrib/device-tree/src/arm/marvell/kirkwood-dnskw.dtsi
index eb917462b219..0738eb679fcd 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-dnskw.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-dnskw.dtsi
@@ -38,9 +38,9 @@
pinctrl-names = "default";
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH
&gpio1 13 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = <0 0
- 3000 1
- 6000 2>;
+ gpio-fan,speed-map = <0 0>,
+ <3000 1>,
+ <6000 2>;
};
gpio_poweroff {
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-l-50.dts b/sys/contrib/device-tree/src/arm/marvell/kirkwood-l-50.dts
index 9fd3581bb24b..c841eb8e7fb1 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-l-50.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-l-50.dts
@@ -62,9 +62,10 @@
status = "okay";
clock-frequency = <400000>;
- gpio2: gpio-expander@20{
+ gpio2: gpio-expander@20 {
#gpio-cells = <2>;
#interrupt-cells = <2>;
+ interrupt-controller;
compatible = "semtech,sx1505q";
reg = <0x20>;
@@ -76,9 +77,10 @@
* 5: mPCIE reset (active low)
* 6: Express card reset (active low)
*/
- gpio3: gpio-expander@21{
+ gpio3: gpio-expander@21 {
#gpio-cells = <2>;
#interrupt-cells = <2>;
+ interrupt-controller;
compatible = "semtech,sx1505q";
reg = <0x21>;
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-6282.dtsi b/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-6282.dtsi
index 377b6e970259..dfac2045a1eb 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-6282.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-6282.dtsi
@@ -118,10 +118,11 @@
gpios = <&gpio0 17 GPIO_ACTIVE_LOW
&gpio0 16 GPIO_ACTIVE_LOW>;
- gpio-fan,speed-map = <0 3
- 1500 2
- 3250 1
- 5000 0>;
+ gpio-fan,speed-map =
+ < 0 3>,
+ <1500 2>,
+ <3250 1>,
+ <5000 0>;
alarm-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-lswxl.dts b/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-lswxl.dts
index c6024b569423..0425df8cb91c 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-lswxl.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-linkstation-lswxl.dts
@@ -69,10 +69,11 @@
gpios = <&gpio1 16 GPIO_ACTIVE_LOW
&gpio1 15 GPIO_ACTIVE_LOW>;
- gpio-fan,speed-map = <0 3
- 1500 2
- 3250 1
- 5000 0>;
+ gpio-fan,speed-map =
+ < 0 3>,
+ <1500 2>,
+ <3250 1>,
+ <5000 0>;
alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-lsxl.dtsi b/sys/contrib/device-tree/src/arm/marvell/kirkwood-lsxl.dtsi
index 88b70ba1c8fe..f80af24b9e90 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-lsxl.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-lsxl.dtsi
@@ -172,10 +172,11 @@
pinctrl-names = "default";
gpios = <&gpio0 19 GPIO_ACTIVE_LOW
&gpio0 18 GPIO_ACTIVE_LOW>;
- gpio-fan,speed-map = <0 3
- 1500 2
- 3250 1
- 5000 0>;
+ gpio-fan,speed-map =
+ <0 3>,
+ <1500 2>,
+ <3250 1>,
+ <5000 0>;
alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2max.dts b/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2max.dts
index c0a087e77408..044958bc55da 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2max.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2max.dts
@@ -29,15 +29,15 @@
&gpio1 1 GPIO_ACTIVE_LOW
&gpio0 23 GPIO_ACTIVE_LOW>;
gpio-fan,speed-map =
- < 0 0
- 1500 15
- 1700 14
- 1800 13
- 2100 12
- 3100 11
- 3300 10
- 4300 9
- 5500 8>;
+ < 0 0>,
+ <1500 15>,
+ <1700 14>,
+ <1800 13>,
+ <2100 12>,
+ <3100 11>,
+ <3300 10>,
+ <4300 9>,
+ <5500 8>;
alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2mini.dts b/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2mini.dts
index 5b9fa14b6428..3fbe008f9141 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2mini.dts
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-ns2mini.dts
@@ -30,15 +30,15 @@
&gpio1 1 GPIO_ACTIVE_LOW
&gpio0 23 GPIO_ACTIVE_LOW>;
gpio-fan,speed-map =
- < 0 0
- 3000 15
- 3180 14
- 4140 13
- 4570 12
- 6760 11
- 7140 10
- 7980 9
- 9200 8>;
+ < 0 0>,
+ <3000 15>,
+ <3180 14>,
+ <4140 13>,
+ <4570 12>,
+ <6760 11>,
+ <7140 10>,
+ <7980 9>,
+ <9200 8>;
alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/kirkwood-synology.dtsi b/sys/contrib/device-tree/src/arm/marvell/kirkwood-synology.dtsi
index 9b6666020cdd..20964eb48fd7 100644
--- a/sys/contrib/device-tree/src/arm/marvell/kirkwood-synology.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/kirkwood-synology.dtsi
@@ -286,14 +286,15 @@
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH
&gpio1 1 GPIO_ACTIVE_HIGH
&gpio1 2 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 2200 1
- 2500 2
- 3000 4
- 3300 3
- 3700 5
- 3800 6
- 4200 7 >;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <2200 1>,
+ <2500 2>,
+ <3000 4>,
+ <3300 3>,
+ <3700 5>,
+ <3800 6>,
+ <4200 7>;
};
gpio-fan-150-15-18 {
@@ -306,14 +307,15 @@
&gpio0 16 GPIO_ACTIVE_HIGH
&gpio0 17 GPIO_ACTIVE_HIGH>;
alarm-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 2200 1
- 2500 2
- 3000 4
- 3300 3
- 3700 5
- 3800 6
- 4200 7 >;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <2200 1>,
+ <2500 2>,
+ <3000 4>,
+ <3300 3>,
+ <3700 5>,
+ <3800 6>,
+ <4200 7>;
};
gpio-fan-100-32-35 {
@@ -326,14 +328,15 @@
&gpio1 1 GPIO_ACTIVE_HIGH
&gpio1 2 GPIO_ACTIVE_HIGH>;
alarm-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 2500 1
- 3100 2
- 3800 3
- 4600 4
- 4800 5
- 4900 6
- 5000 7 >;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <2500 1>,
+ <3100 2>,
+ <3800 3>,
+ <4600 4>,
+ <4800 5>,
+ <4900 6>,
+ <5000 7>;
};
gpio-fan-100-15-18 {
@@ -346,14 +349,15 @@
&gpio0 16 GPIO_ACTIVE_HIGH
&gpio0 17 GPIO_ACTIVE_HIGH>;
alarm-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 2500 1
- 3100 2
- 3800 3
- 4600 4
- 4800 5
- 4900 6
- 5000 7 >;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <2500 1>,
+ <3100 2>,
+ <3800 3>,
+ <4600 4>,
+ <4800 5>,
+ <4900 6>,
+ <5000 7>;
};
gpio-fan-100-15-35-1 {
@@ -366,14 +370,15 @@
&gpio0 16 GPIO_ACTIVE_HIGH
&gpio0 17 GPIO_ACTIVE_HIGH>;
alarm-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 2500 1
- 3100 2
- 3800 3
- 4600 4
- 4800 5
- 4900 6
- 5000 7 >;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <2500 1>,
+ <3100 2>,
+ <3800 3>,
+ <4600 4>,
+ <4800 5>,
+ <4900 6>,
+ <5000 7>;
};
gpio-fan-100-15-35-3 {
@@ -388,14 +393,15 @@
alarm-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH
&gpio1 12 GPIO_ACTIVE_HIGH
&gpio1 13 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = < 0 0
- 2500 1
- 3100 2
- 3800 3
- 4600 4
- 4800 5
- 4900 6
- 5000 7 >;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <2500 1>,
+ <3100 2>,
+ <3800 3>,
+ <4600 4>,
+ <4800 5>,
+ <4900 6>,
+ <5000 7>;
};
gpio-leds-alarm-12 {
diff --git a/sys/contrib/device-tree/src/arm/marvell/mvebu-linkstation-fan.dtsi b/sys/contrib/device-tree/src/arm/marvell/mvebu-linkstation-fan.dtsi
index e172029a0c4d..a260c42dbda3 100644
--- a/sys/contrib/device-tree/src/arm/marvell/mvebu-linkstation-fan.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/mvebu-linkstation-fan.dtsi
@@ -50,10 +50,10 @@
pinctrl-names = "default";
gpio-fan,speed-map =
- <0 3
- 1500 2
- 3250 1
- 5000 0>;
+ < 0 3>,
+ <1500 2>,
+ <3250 1>,
+ <5000 0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/marvell/pxa168.dtsi b/sys/contrib/device-tree/src/arm/marvell/pxa168.dtsi
index 16212b912b94..22ed10cb5619 100644
--- a/sys/contrib/device-tree/src/arm/marvell/pxa168.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/pxa168.dtsi
@@ -153,7 +153,7 @@
};
};
- soc_clocks: clocks{
+ soc_clocks: clocks {
compatible = "marvell,pxa168-clock";
reg = <0xd4050000 0x1000>,
<0xd4282800 0x400>,
diff --git a/sys/contrib/device-tree/src/arm/marvell/pxa910.dtsi b/sys/contrib/device-tree/src/arm/marvell/pxa910.dtsi
index 352a39357810..bd64ac1ec66f 100644
--- a/sys/contrib/device-tree/src/arm/marvell/pxa910.dtsi
+++ b/sys/contrib/device-tree/src/arm/marvell/pxa910.dtsi
@@ -163,7 +163,7 @@
};
};
- soc_clocks: clocks{
+ soc_clocks: clocks {
compatible = "marvell,pxa910-clock";
reg = <0xd4050000 0x1000>,
<0xd4282800 0x400>,
diff --git a/sys/contrib/device-tree/src/arm/mediatek/mt2701-evb.dts b/sys/contrib/device-tree/src/arm/mediatek/mt2701-evb.dts
index d1535f385f36..9c7325f18933 100644
--- a/sys/contrib/device-tree/src/arm/mediatek/mt2701-evb.dts
+++ b/sys/contrib/device-tree/src/arm/mediatek/mt2701-evb.dts
@@ -244,7 +244,7 @@
&usb2 {
status = "okay";
usb-role-switch;
- connector{
+ connector {
compatible = "gpio-usb-b-connector", "usb-b-connector";
type = "micro";
id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/mediatek/mt6323.dtsi b/sys/contrib/device-tree/src/arm/mediatek/mt6323.dtsi
index 7fda40ab5fe8..c230c865116d 100644
--- a/sys/contrib/device-tree/src/arm/mediatek/mt6323.dtsi
+++ b/sys/contrib/device-tree/src/arm/mediatek/mt6323.dtsi
@@ -21,10 +21,10 @@
status = "disabled";
};
- mt6323regulator: mt6323regulator{
+ mt6323regulator: mt6323regulator {
compatible = "mediatek,mt6323-regulator";
- mt6323_vproc_reg: buck_vproc{
+ mt6323_vproc_reg: buck_vproc {
regulator-name = "vproc";
regulator-min-microvolt = < 700000>;
regulator-max-microvolt = <1350000>;
@@ -33,7 +33,7 @@
regulator-boot-on;
};
- mt6323_vsys_reg: buck_vsys{
+ mt6323_vsys_reg: buck_vsys {
regulator-name = "vsys";
regulator-min-microvolt = <1400000>;
regulator-max-microvolt = <2987500>;
@@ -42,13 +42,13 @@
regulator-boot-on;
};
- mt6323_vpa_reg: buck_vpa{
+ mt6323_vpa_reg: buck_vpa {
regulator-name = "vpa";
regulator-min-microvolt = < 500000>;
regulator-max-microvolt = <3650000>;
};
- mt6323_vtcxo_reg: ldo_vtcxo{
+ mt6323_vtcxo_reg: ldo_vtcxo {
regulator-name = "vtcxo";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -57,28 +57,28 @@
regulator-boot-on;
};
- mt6323_vcn28_reg: ldo_vcn28{
+ mt6323_vcn28_reg: ldo_vcn28 {
regulator-name = "vcn28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-enable-ramp-delay = <185>;
};
- mt6323_vcn33_bt_reg: ldo_vcn33_bt{
+ mt6323_vcn33_bt_reg: ldo_vcn33_bt {
regulator-name = "vcn33_bt";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3600000>;
regulator-enable-ramp-delay = <185>;
};
- mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
+ mt6323_vcn33_wifi_reg: ldo_vcn33_wifi {
regulator-name = "vcn33_wifi";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3600000>;
regulator-enable-ramp-delay = <185>;
};
- mt6323_va_reg: ldo_va{
+ mt6323_va_reg: ldo_va {
regulator-name = "va";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -87,14 +87,14 @@
regulator-boot-on;
};
- mt6323_vcama_reg: ldo_vcama{
+ mt6323_vcama_reg: ldo_vcama {
regulator-name = "vcama";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <2800000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vio28_reg: ldo_vio28{
+ mt6323_vio28_reg: ldo_vio28 {
regulator-name = "vio28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -103,7 +103,7 @@
regulator-boot-on;
};
- mt6323_vusb_reg: ldo_vusb{
+ mt6323_vusb_reg: ldo_vusb {
regulator-name = "vusb";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -111,7 +111,7 @@
regulator-boot-on;
};
- mt6323_vmc_reg: ldo_vmc{
+ mt6323_vmc_reg: ldo_vmc {
regulator-name = "vmc";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
@@ -119,7 +119,7 @@
regulator-boot-on;
};
- mt6323_vmch_reg: ldo_vmch{
+ mt6323_vmch_reg: ldo_vmch {
regulator-name = "vmch";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
@@ -127,7 +127,7 @@
regulator-boot-on;
};
- mt6323_vemc3v3_reg: ldo_vemc3v3{
+ mt6323_vemc3v3_reg: ldo_vemc3v3 {
regulator-name = "vemc3v3";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
@@ -135,49 +135,49 @@
regulator-boot-on;
};
- mt6323_vgp1_reg: ldo_vgp1{
+ mt6323_vgp1_reg: ldo_vgp1 {
regulator-name = "vgp1";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vgp2_reg: ldo_vgp2{
+ mt6323_vgp2_reg: ldo_vgp2 {
regulator-name = "vgp2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3000000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vgp3_reg: ldo_vgp3{
+ mt6323_vgp3_reg: ldo_vgp3 {
regulator-name = "vgp3";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vcn18_reg: ldo_vcn18{
+ mt6323_vcn18_reg: ldo_vcn18 {
regulator-name = "vcn18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vsim1_reg: ldo_vsim1{
+ mt6323_vsim1_reg: ldo_vsim1 {
regulator-name = "vsim1";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vsim2_reg: ldo_vsim2{
+ mt6323_vsim2_reg: ldo_vsim2 {
regulator-name = "vsim2";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vrtc_reg: ldo_vrtc{
+ mt6323_vrtc_reg: ldo_vrtc {
regulator-name = "vrtc";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -185,28 +185,28 @@
regulator-boot-on;
};
- mt6323_vcamaf_reg: ldo_vcamaf{
+ mt6323_vcamaf_reg: ldo_vcamaf {
regulator-name = "vcamaf";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vibr_reg: ldo_vibr{
+ mt6323_vibr_reg: ldo_vibr {
regulator-name = "vibr";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <36>;
};
- mt6323_vrf18_reg: ldo_vrf18{
+ mt6323_vrf18_reg: ldo_vrf18 {
regulator-name = "vrf18";
regulator-min-microvolt = <1825000>;
regulator-max-microvolt = <1825000>;
regulator-enable-ramp-delay = <187>;
};
- mt6323_vm_reg: ldo_vm{
+ mt6323_vm_reg: ldo_vm {
regulator-name = "vm";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1800000>;
@@ -215,7 +215,7 @@
regulator-boot-on;
};
- mt6323_vio18_reg: ldo_vio18{
+ mt6323_vio18_reg: ldo_vio18 {
regulator-name = "vio18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@@ -224,14 +224,14 @@
regulator-boot-on;
};
- mt6323_vcamd_reg: ldo_vcamd{
+ mt6323_vcamd_reg: ldo_vcamd {
regulator-name = "vcamd";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <216>;
};
- mt6323_vcamio_reg: ldo_vcamio{
+ mt6323_vcamio_reg: ldo_vcamio {
regulator-name = "vcamio";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
diff --git a/sys/contrib/device-tree/src/arm/mediatek/mt7623n.dtsi b/sys/contrib/device-tree/src/arm/mediatek/mt7623n.dtsi
index 3adab5cd1fef..3e5cabf19cde 100644
--- a/sys/contrib/device-tree/src/arm/mediatek/mt7623n.dtsi
+++ b/sys/contrib/device-tree/src/arm/mediatek/mt7623n.dtsi
@@ -116,8 +116,8 @@
"mediatek,mt2701-jpgdec";
reg = <0 0x15004000 0 0x1000>;
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
- <&imgsys CLK_IMG_JPGDEC>;
+ clocks = <&imgsys CLK_IMG_JPGDEC_SMI>,
+ <&imgsys CLK_IMG_JPGDEC>;
clock-names = "jpgdec-smi",
"jpgdec";
power-domains = <&scpsys MT2701_POWER_DOMAIN_ISP>;
diff --git a/sys/contrib/device-tree/src/arm/mediatek/mt7629-rfb.dts b/sys/contrib/device-tree/src/arm/mediatek/mt7629-rfb.dts
index 84e14bee7235..f24ebc20732a 100644
--- a/sys/contrib/device-tree/src/arm/mediatek/mt7629-rfb.dts
+++ b/sys/contrib/device-tree/src/arm/mediatek/mt7629-rfb.dts
@@ -168,7 +168,7 @@
i2c_pins: i2c-pins {
mux {
function = "i2c";
- groups = "i2c_0";
+ groups = "i2c_0";
};
conf {
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60_curiosity.dts b/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60_curiosity.dts
index cb86a3a170ce..c6fbdd29019f 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60_curiosity.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60_curiosity.dts
@@ -249,6 +249,8 @@
ethernet-phy@0 {
reg = <0x0>;
+ interrupt-parent = <&pioB>;
+ interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -353,6 +355,7 @@
AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A */
AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
+ AT91_PIOB 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* PB8 IRQ GPIO */
AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
};
@@ -439,6 +442,10 @@
status = "okay";
};
+&rtt {
+ atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+};
+
&sdmmc0 {
bus-width = <4>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60ek.dts b/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60ek.dts
index 5cd593028aff..f3cbb675cea4 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60ek.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60ek.dts
@@ -292,6 +292,8 @@
ethernet-phy@0 {
reg = <0x0>;
+ interrupt-parent = <&pioB>;
+ interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -465,6 +467,7 @@
AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A */
AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
+ AT91_PIOB 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* PB8 IRQ GPIO */
AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
};
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_som1_ek.dts b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_som1_ek.dts
index d0a6dbd377df..f3ffb8f01d8a 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_som1_ek.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_som1_ek.dts
@@ -54,7 +54,6 @@
sdmmc0: sdio-host@a0000000 {
bus-width = <8>;
- mmc-ddr-3_3v;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sdmmc0_default>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_wlsom1_ek.dts b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_wlsom1_ek.dts
index e055b9e2fe34..15239834d886 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_wlsom1_ek.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_wlsom1_ek.dts
@@ -197,7 +197,6 @@
&sdmmc0 {
bus-width = <4>;
- mmc-ddr-3_3v;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sdmmc0_default>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d29_curiosity.dts b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d29_curiosity.dts
new file mode 100644
index 000000000000..6b02b7bcfd49
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d29_curiosity.dts
@@ -0,0 +1,600 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * at91-sama5d29_curiosity.dts - Device Tree file for SAMA5D29 Curiosity board
+ *
+ * Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Mihai Sain <mihai.sain@microchip.com>
+ *
+ */
+/dts-v1/;
+#include "sama5d29.dtsi"
+#include "sama5d2-pinfunc.h"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mfd/atmel-flexcom.h>
+
+/ {
+ model = "Microchip SAMA5D29 Curiosity";
+ compatible = "microchip,sama5d29-curiosity", "atmel,sama5d29", "atmel,sama5d2", "atmel,sama5";
+
+ aliases {
+ serial0 = &uart0; // debug
+ serial1 = &uart1; // RPi
+ serial2 = &uart3; // mikro BUS 2
+ serial3 = &uart4; // mikro BUS 1
+ serial4 = &uart6; // flx1 Bluetooth
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait";
+ stdout-path = "serial0:115200n8";
+ };
+
+ clocks {
+ slow_xtal {
+ clock-frequency = <32768>;
+ };
+
+ main_xtal {
+ clock-frequency = <24000000>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_key_gpio_default>;
+
+ button-1 {
+ label = "USER BUTTON";
+ gpios = <&pioA PIN_PA17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_PROG1>;
+ wakeup-source;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_led_gpio_default>;
+ status = "okay";
+
+ led-red {
+ label = "red";
+ gpios = <&pioA PIN_PA7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-green {
+ label = "green";
+ gpios = <&pioA PIN_PA8 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-blue {
+ label = "blue";
+ gpios = <&pioA PIN_PA9 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ memory@20000000 {
+ device_type = "memory";
+ reg = <0x20000000 0x20000000>;
+ };
+};
+
+&adc {
+ vddana-supply = <&vdd_3v3>;
+ vref-supply = <&vdd_3v3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
+ status = "okay";
+};
+
+&can0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can0_default>;
+ status = "okay";
+};
+
+&can1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can1_default>;
+ status = "okay";
+};
+
+&flx1 {
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
+ status = "okay";
+
+ uart6: serial@200 {
+ pinctrl-0 = <&pinctrl_flx1_default>;
+ pinctrl-names = "default";
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "okay";
+ };
+};
+
+&flx4 {
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
+ status = "okay";
+
+ spi6: spi@400 {
+ dmas = <0>, <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rpi_spi>;
+ status = "okay";
+ };
+};
+
+&i2c0 {
+ dmas = <0>, <0>;
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&pinctrl_i2c0_default>;
+ pinctrl-1 = <&pinctrl_i2c0_gpio>;
+ sda-gpios = <&pioA PIN_PB31 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&pioA PIN_PC0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-sda-hold-time-ns = <350>;
+ status = "okay";
+
+ mcp16502@5b {
+ compatible = "microchip,mcp16502";
+ reg = <0x5b>;
+ status = "okay";
+ lpm-gpios = <&pioBU 0 GPIO_ACTIVE_LOW>;
+
+ regulators {
+ vdd_3v3: VDD_IO {
+ regulator-name = "VDD_IO";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ vddio_ddr: VDD_DDR {
+ regulator-name = "VDD_DDR";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1200000>;
+ regulator-changeable-in-suspend;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1200000>;
+ regulator-changeable-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ vdd_core: VDD_CORE {
+ regulator-name = "VDD_CORE";
+ regulator-min-microvolt = <1250000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ vdd_ddr: VDD_OTHER {
+ regulator-name = "VDD_OTHER";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <2>;
+ regulator-allowed-modes = <2>, <4>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ regulator-changeable-in-suspend;
+ regulator-mode = <4>;
+ };
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ regulator-changeable-in-suspend;
+ regulator-mode = <4>;
+ };
+ };
+
+ LDO1 {
+ regulator-name = "LDO1";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ LDO2 {
+ regulator-name = "LDO2";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+
+ regulator-state-standby {
+ regulator-on-in-suspend;
+ };
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&i2c1 {
+ dmas = <0>, <0>;
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&pinctrl_i2c1_default>;
+ pinctrl-1 = <&pinctrl_i2c1_gpio>;
+ i2c-analog-filter;
+ i2c-digital-filter;
+ i2c-digital-filter-width-ns = <35>;
+ sda-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&pioA PIN_PD5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ status = "okay";
+};
+
+&pioA {
+ pinctrl_adc_default: adc-default {
+ pinmux = <PIN_PD25__GPIO>,
+ <PIN_PD26__GPIO>;
+ bias-disable;
+ };
+
+ pinctrl_adtrg_default: adtrg-default {
+ pinmux = <PIN_PD31__ADTRG>;
+ bias-pull-up;
+ };
+
+ pinctrl_can0_default: can0-default {
+ pinmux = <PIN_PC10__CANTX0>,
+ <PIN_PC11__CANRX0>;
+ bias-disable;
+ };
+
+ pinctrl_can1_default: can1-default {
+ pinmux = <PIN_PC26__CANTX1>,
+ <PIN_PC27__CANRX1>;
+ bias-disable;
+ };
+
+ pinctrl_debug_uart: debug-uart {
+ pinmux = <PIN_PB26__URXD0>,
+ <PIN_PB27__UTXD0>;
+ bias-disable;
+ };
+
+ pinctrl_flx1_default: flx1-default {
+ pinmux = <PIN_PA24__FLEXCOM1_IO0>,
+ <PIN_PA23__FLEXCOM1_IO1>,
+ <PIN_PA25__FLEXCOM1_IO3>,
+ <PIN_PA26__FLEXCOM1_IO4>;
+ bias-disable;
+ };
+
+ pinctrl_i2c0_default: i2c0-default {
+ pinmux = <PIN_PB31__TWD0>,
+ <PIN_PC0__TWCK0>;
+ bias-disable;
+ };
+
+ pinctrl_i2c0_gpio: i2c0-gpio-default {
+ pinmux = <PIN_PB31__GPIO>,
+ <PIN_PC0__GPIO>;
+ bias-disable;
+ };
+
+ pinctrl_i2c1_default: i2c1-default {
+ pinmux = <PIN_PD4__TWD1>,
+ <PIN_PD5__TWCK1>;
+ bias-disable;
+ };
+
+ pinctrl_i2c1_gpio: i2c1-gpio-default {
+ pinmux = <PIN_PD4__GPIO>,
+ <PIN_PD5__GPIO>;
+ bias-disable;
+ };
+
+ pinctrl_key_gpio_default: key-gpio-default {
+ pinmux = <PIN_PA17__GPIO>;
+ bias-pull-up;
+ };
+
+ pinctrl_led_gpio_default: led-gpio-default {
+ pinmux = <PIN_PA7__GPIO>,
+ <PIN_PA8__GPIO>,
+ <PIN_PA9__GPIO>;
+ bias-pull-up;
+ };
+
+ pinctrl_mikrobus1_pwm: mikrobus1-pwm {
+ pinmux = <PIN_PA31__PWML0>;
+ bias-disable;
+ };
+
+ pinctrl_mikrobus2_pwm: mikrobus2-pwm {
+ pinmux = <PIN_PB0__PWMH1>;
+ bias-disable;
+ };
+
+ pinctrl_mikrobus1_uart: mikrobus1-uart {
+ pinmux = <PIN_PB3__URXD4>,
+ <PIN_PB4__UTXD4>;
+ bias-disable;
+ };
+
+ pinctrl_mikrobus2_uart: mikrobus2-uart {
+ pinmux = <PIN_PB11__URXD3>,
+ <PIN_PB12__UTXD3>;
+ bias-disable;
+ };
+
+ pinctrl_qspi1_default: qspi1-default {
+ pinmux = <PIN_PB5__QSPI1_SCK>,
+ <PIN_PB6__QSPI1_CS>,
+ <PIN_PB7__QSPI1_IO0>,
+ <PIN_PB8__QSPI1_IO1>,
+ <PIN_PB9__QSPI1_IO2>,
+ <PIN_PB10__QSPI1_IO3>;
+ bias-disable;
+ };
+
+ pinctrl_rpi_spi: rpi-spi {
+ pinmux = <PIN_PD12__FLEXCOM4_IO0>,
+ <PIN_PD13__FLEXCOM4_IO1>,
+ <PIN_PD14__FLEXCOM4_IO2>,
+ <PIN_PD15__FLEXCOM4_IO3>,
+ <PIN_PD16__FLEXCOM4_IO4>;
+ bias-disable;
+ };
+
+ pinctrl_rpi_uart: rpi-uart {
+ pinmux = <PIN_PD2__URXD1>,
+ <PIN_PD3__UTXD1>;
+ bias-disable;
+ };
+
+ pinctrl_sdmmc0_default: sdmmc0-default {
+ pinmux = <PIN_PA0__SDMMC0_CK>,
+ <PIN_PA1__SDMMC0_CMD>,
+ <PIN_PA2__SDMMC0_DAT0>,
+ <PIN_PA3__SDMMC0_DAT1>,
+ <PIN_PA4__SDMMC0_DAT2>,
+ <PIN_PA5__SDMMC0_DAT3>,
+ <PIN_PA11__SDMMC0_VDDSEL>,
+ <PIN_PA13__SDMMC0_CD>;
+ bias-disable;
+ };
+
+ pinctrl_sdmmc1_default: sdmmc1-default {
+ pinmux = <PIN_PA18__SDMMC1_DAT0>,
+ <PIN_PA19__SDMMC1_DAT1>,
+ <PIN_PA20__SDMMC1_DAT2>,
+ <PIN_PA21__SDMMC1_DAT3>,
+ <PIN_PA22__SDMMC1_CK>,
+ <PIN_PA28__SDMMC1_CMD>,
+ <PIN_PA30__SDMMC1_CD>;
+ bias-disable;
+ };
+
+ pinctrl_spi1_default: spi1-default {
+ pinmux = <PIN_PC1__SPI1_SPCK>,
+ <PIN_PC2__SPI1_MOSI>,
+ <PIN_PC3__SPI1_MISO>,
+ <PIN_PC4__SPI1_NPCS0>,
+ <PIN_PC5__SPI1_NPCS1>,
+ <PIN_PC6__SPI1_NPCS2>,
+ <PIN_PC7__SPI1_NPCS3>;
+ bias-disable;
+ };
+
+ pinctrl_usb_default: usb-default {
+ pinmux = <PIN_PA6__GPIO>;
+ bias-disable;
+ };
+
+ pinctrl_usba_vbus: usba-vbus {
+ pinmux = <PIN_PB13__GPIO>;
+ bias-disable;
+ };
+};
+
+&pwm0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>;
+ status = "okay";
+};
+
+&qspi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_qspi1_default>;
+ status = "okay";
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ m25p,fast-read;
+ label = "atmel_qspi1";
+ status = "okay";
+
+ at91bootstrap@0 {
+ label = "at91bootstrap";
+ reg = <0x0 0x40000>;
+ };
+
+ bootloader@40000 {
+ label = "bootloader";
+ reg = <0x40000 0xc0000>;
+ };
+
+ bootloaderenvred@100000 {
+ label = "bootloader env redundant";
+ reg = <0x100000 0x40000>;
+ };
+
+ bootloaderenv@140000 {
+ label = "bootloader env";
+ reg = <0x140000 0x40000>;
+ };
+
+ dtb@180000 {
+ label = "device tree";
+ reg = <0x180000 0x80000>;
+ };
+
+ kernel@200000 {
+ label = "kernel";
+ reg = <0x200000 0x600000>;
+ };
+ };
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sdmmc0_default>;
+ disable-wp;
+ status = "okay";
+};
+
+&sdmmc1 {
+ bus-width = <4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sdmmc1_default>;
+ disable-wp;
+ status = "okay";
+};
+
+&shutdown_controller {
+ debounce-delay-us = <976>;
+ atmel,wakeup-rtc-timer;
+
+ input@0 {
+ reg = <0>;
+ };
+};
+
+&spi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi1_default>;
+ status = "okay";
+};
+
+&tcb0 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_debug_uart>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rpi_uart>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "okay";
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mikrobus2_uart>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "okay";
+};
+
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mikrobus1_uart>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "okay";
+};
+
+&usb0 {
+ atmel,vbus-gpio = <&pioA PIN_PB13 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usba_vbus>;
+ status = "okay";
+};
+
+&usb1 {
+ num-ports = <3>;
+ atmel,vbus-gpio = <0
+ &pioA PIN_PA6 GPIO_ACTIVE_HIGH
+ 0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb_default>;
+ status = "okay";
+};
+
+&usb2 {
+ status = "okay";
+};
+
+&watchdog {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d3_ksz9477_evb.dts b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d3_ksz9477_evb.dts
index 14af1fd6d247..b66570080894 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91-sama5d3_ksz9477_evb.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-sama5d3_ksz9477_evb.dts
@@ -152,6 +152,7 @@
label = "cpu";
ethernet = <&macb0>;
phy-mode = "rgmii-txid";
+ tx-internal-delay-ps = <2000>;
fixed-link {
speed = <1000>;
@@ -162,6 +163,18 @@
};
};
+&tcb0 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+};
+
&usb0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usba_vbus>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91-vinco.dts b/sys/contrib/device-tree/src/arm/microchip/at91-vinco.dts
index ebeaa6ab500e..ecbdacf48708 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91-vinco.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91-vinco.dts
@@ -159,7 +159,7 @@
atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usba_vbus>;
- status = "disable";
+ status = "disabled";
};
usb1: ohci@500000 {
@@ -168,7 +168,7 @@
&pioE 11 GPIO_ACTIVE_LOW
&pioE 12 GPIO_ACTIVE_LOW
>;
- status = "disable";
+ status = "disabled";
};
usb2: ehci@600000 {
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91rm9200.dtsi b/sys/contrib/device-tree/src/arm/microchip/at91rm9200.dtsi
index 37b500f6f395..16c675e3a890 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91rm9200.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/at91rm9200.dtsi
@@ -135,9 +135,9 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0xfffa0000 0x100>;
- interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
- 18 IRQ_TYPE_LEVEL_HIGH 0
- 19 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>,
+ <18 IRQ_TYPE_LEVEL_HIGH 0>,
+ <19 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&pmc PMC_TYPE_PERIPHERAL 18>, <&pmc PMC_TYPE_PERIPHERAL 19>, <&slow_xtal>;
clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
};
@@ -147,9 +147,9 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0xfffa4000 0x100>;
- interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0
- 21 IRQ_TYPE_LEVEL_HIGH 0
- 22 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>,
+ <21 IRQ_TYPE_LEVEL_HIGH 0>,
+ <22 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 20>, <&pmc PMC_TYPE_PERIPHERAL 21>, <&pmc PMC_TYPE_PERIPHERAL 22>, <&slow_xtal>;
clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
};
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9260.dtsi b/sys/contrib/device-tree/src/arm/microchip/at91sam9260.dtsi
index 35a007365b6a..e56d5546554c 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9260.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9260.dtsi
@@ -65,7 +65,7 @@
clock-frequency = <0>;
};
- adc_op_clk: adc_op_clk{
+ adc_op_clk: adc_op_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <5000000>;
@@ -148,9 +148,9 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0xfffa0000 0x100>;
- interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
- 18 IRQ_TYPE_LEVEL_HIGH 0
- 19 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>,
+ <18 IRQ_TYPE_LEVEL_HIGH 0>,
+ <19 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&pmc PMC_TYPE_PERIPHERAL 18>, <&pmc PMC_TYPE_PERIPHERAL 19>, <&pmc PMC_TYPE_CORE PMC_SLOW>;
clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
};
@@ -160,9 +160,9 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0xfffdc000 0x100>;
- interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0
- 27 IRQ_TYPE_LEVEL_HIGH 0
- 28 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>,
+ <27 IRQ_TYPE_LEVEL_HIGH 0>,
+ <28 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_PERIPHERAL 27>, <&pmc PMC_TYPE_PERIPHERAL 28>, <&pmc PMC_TYPE_CORE PMC_SLOW>;
clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
};
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9261.dtsi b/sys/contrib/device-tree/src/arm/microchip/at91sam9261.dtsi
index 528ffc6f6f96..307b60658014 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9261.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9261.dtsi
@@ -205,7 +205,7 @@
status = "disabled";
};
- usart2: serial@fffb8000{
+ usart2: serial@fffb8000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xfffb8000 0x200>;
atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9g20ek_2mmc.dts b/sys/contrib/device-tree/src/arm/microchip/at91sam9g20ek_2mmc.dts
index 2db95e8ffc64..172af6ff4b18 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9g20ek_2mmc.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9g20ek_2mmc.dts
@@ -12,7 +12,7 @@
compatible = "atmel,at91sam9g20ek_2mmc", "atmel,at91sam9g20", "atmel,at91sam9";
ahb {
- apb{
+ apb {
mmc0: mmc@fffa8000 {
/* clk already mux wuth slot0 */
pinctrl-0 = <
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9g45.dtsi b/sys/contrib/device-tree/src/arm/microchip/at91sam9g45.dtsi
index 7cccc606e36c..325c63a53118 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9g45.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9g45.dtsi
@@ -70,7 +70,7 @@
clock-frequency = <0>;
};
- adc_op_clk: adc_op_clk{
+ adc_op_clk: adc_op_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <300000>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9m10g45ek.dts b/sys/contrib/device-tree/src/arm/microchip/at91sam9m10g45ek.dts
index 7f45e81ca165..071db4f16313 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9m10g45ek.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9m10g45ek.dts
@@ -164,7 +164,7 @@
};
};
- spi0: spi@fffa4000{
+ spi0: spi@fffa4000 {
status = "okay";
cs-gpios = <&pioB 3 0>, <0>, <0>, <0>;
flash@0 {
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9rl.dtsi b/sys/contrib/device-tree/src/arm/microchip/at91sam9rl.dtsi
index 3d089ffbe162..7436b5c862b1 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9rl.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9rl.dtsi
@@ -67,7 +67,7 @@
clock-frequency = <0>;
};
- adc_op_clk: adc_op_clk{
+ adc_op_clk: adc_op_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1000000>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/at91sam9x5.dtsi b/sys/contrib/device-tree/src/arm/microchip/at91sam9x5.dtsi
index a1fed912f2ee..a7456c2191fa 100644
--- a/sys/contrib/device-tree/src/arm/microchip/at91sam9x5.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/at91sam9x5.dtsi
@@ -68,7 +68,7 @@
clock-frequency = <0>;
};
- adc_op_clk: adc_op_clk{
+ adc_op_clk: adc_op_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1000000>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/lan966x-pcb8290.dts b/sys/contrib/device-tree/src/arm/microchip/lan966x-pcb8290.dts
index 8804e8ba5370..3b7577e48b46 100644
--- a/sys/contrib/device-tree/src/arm/microchip/lan966x-pcb8290.dts
+++ b/sys/contrib/device-tree/src/arm/microchip/lan966x-pcb8290.dts
@@ -28,7 +28,7 @@
&gpio {
miim_a_pins: mdio-pins {
/* MDC, MDIO */
- pins = "GPIO_28", "GPIO_29";
+ pins = "GPIO_28", "GPIO_29";
function = "miim_a";
};
diff --git a/sys/contrib/device-tree/src/arm/microchip/sama5d2.dtsi b/sys/contrib/device-tree/src/arm/microchip/sama5d2.dtsi
index daeeb24e5f4d..5f8e297e19ed 100644
--- a/sys/contrib/device-tree/src/arm/microchip/sama5d2.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/sama5d2.dtsi
@@ -382,9 +382,9 @@
macb0: ethernet@f8008000 {
compatible = "atmel,sama5d2-gem";
reg = <0xf8008000 0x1000>;
- interrupts = <5 IRQ_TYPE_LEVEL_HIGH 3 /* Queue 0 */
- 66 IRQ_TYPE_LEVEL_HIGH 3 /* Queue 1 */
- 67 IRQ_TYPE_LEVEL_HIGH 3>; /* Queue 2 */
+ interrupts = <5 IRQ_TYPE_LEVEL_HIGH 3>, /* Queue 0 */
+ <66 IRQ_TYPE_LEVEL_HIGH 3>, /* Queue 1 */
+ <67 IRQ_TYPE_LEVEL_HIGH 3>; /* Queue 2 */
clocks = <&pmc PMC_TYPE_PERIPHERAL 5>, <&pmc PMC_TYPE_PERIPHERAL 5>;
clock-names = "hclk", "pclk";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/microchip/sama5d3.dtsi b/sys/contrib/device-tree/src/arm/microchip/sama5d3.dtsi
index d9e66700d1c2..d4fc0c1dfc10 100644
--- a/sys/contrib/device-tree/src/arm/microchip/sama5d3.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/sama5d3.dtsi
@@ -74,7 +74,7 @@
clock-frequency = <0>;
};
- adc_op_clk: adc_op_clk{
+ adc_op_clk: adc_op_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1000000>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/sama5d4.dtsi b/sys/contrib/device-tree/src/arm/microchip/sama5d4.dtsi
index 41284e013f53..58ceed997889 100644
--- a/sys/contrib/device-tree/src/arm/microchip/sama5d4.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/sama5d4.dtsi
@@ -72,7 +72,7 @@
clock-frequency = <0>;
};
- adc_op_clk: adc_op_clk{
+ adc_op_clk: adc_op_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1000000>;
@@ -694,7 +694,7 @@
clock-names = "aes_clk";
};
- tdes: crpyto@fc04c000 {
+ tdes: crypto@fc04c000 {
compatible = "atmel,at91sam9g46-tdes";
reg = <0xfc04c000 0x100>;
interrupts = <14 IRQ_TYPE_LEVEL_HIGH 0>;
diff --git a/sys/contrib/device-tree/src/arm/microchip/sama7g5.dtsi b/sys/contrib/device-tree/src/arm/microchip/sama7g5.dtsi
index 9642a42d84e6..269e0a3ca269 100644
--- a/sys/contrib/device-tree/src/arm/microchip/sama7g5.dtsi
+++ b/sys/contrib/device-tree/src/arm/microchip/sama7g5.dtsi
@@ -366,8 +366,8 @@
compatible = "bosch,m_can";
reg = <0xe0828000 0x100>, <0x100000 0x7800>;
reg-names = "m_can", "message_ram";
- interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&pmc PMC_TYPE_PERIPHERAL 61>, <&pmc PMC_TYPE_GCK 61>;
clock-names = "hclk", "cclk";
@@ -382,8 +382,8 @@
compatible = "bosch,m_can";
reg = <0xe082c000 0x100>, <0x100000 0xbc00>;
reg-names = "m_can", "message_ram";
- interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&pmc PMC_TYPE_PERIPHERAL 62>, <&pmc PMC_TYPE_GCK 62>;
clock-names = "hclk", "cclk";
@@ -398,8 +398,8 @@
compatible = "bosch,m_can";
reg = <0xe0830000 0x100>, <0x100000 0x10000>;
reg-names = "m_can", "message_ram";
- interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&pmc PMC_TYPE_PERIPHERAL 63>, <&pmc PMC_TYPE_GCK 63>;
clock-names = "hclk", "cclk";
@@ -414,8 +414,8 @@
compatible = "bosch,m_can";
reg = <0xe0834000 0x100>, <0x110000 0x4400>;
reg-names = "m_can", "message_ram";
- interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&pmc PMC_TYPE_PERIPHERAL 64>, <&pmc PMC_TYPE_GCK 64>;
clock-names = "hclk", "cclk";
@@ -430,8 +430,8 @@
compatible = "bosch,m_can";
reg = <0xe0838000 0x100>, <0x110000 0x8800>;
reg-names = "m_can", "message_ram";
- interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&pmc PMC_TYPE_PERIPHERAL 65>, <&pmc PMC_TYPE_GCK 65>;
clock-names = "hclk", "cclk";
@@ -446,8 +446,8 @@
compatible = "bosch,m_can";
reg = <0xe083c000 0x100>, <0x110000 0xcc00>;
reg-names = "m_can", "message_ram";
- interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&pmc PMC_TYPE_PERIPHERAL 66>, <&pmc PMC_TYPE_GCK 66>;
clock-names = "hclk", "cclk";
@@ -845,12 +845,12 @@
gmac0: ethernet@e2800000 {
compatible = "microchip,sama7g5-gem";
reg = <0xe2800000 0x1000>;
- interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 51>, <&pmc PMC_TYPE_PERIPHERAL 51>, <&pmc PMC_TYPE_GCK 51>, <&pmc PMC_TYPE_GCK 53>;
clock-names = "pclk", "hclk", "tx_clk", "tsu_clk";
assigned-clocks = <&pmc PMC_TYPE_GCK 51>;
@@ -861,8 +861,8 @@
gmac1: ethernet@e2804000 {
compatible = "microchip,sama7g5-emac";
reg = <0xe2804000 0x1000>;
- interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 52>, <&pmc PMC_TYPE_PERIPHERAL 52>;
clock-names = "pclk", "hclk";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/nspire/nspire-classic.dtsi b/sys/contrib/device-tree/src/arm/nspire/nspire-classic.dtsi
index 01e1bb7c3c6c..a6e9cbf51524 100644
--- a/sys/contrib/device-tree/src/arm/nspire/nspire-classic.dtsi
+++ b/sys/contrib/device-tree/src/arm/nspire/nspire-classic.dtsi
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/boot/nspire-classic.dts
- *
* Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
*/
diff --git a/sys/contrib/device-tree/src/arm/nspire/nspire-clp.dts b/sys/contrib/device-tree/src/arm/nspire/nspire-clp.dts
index f52f38c61588..c5773f770fd4 100644
--- a/sys/contrib/device-tree/src/arm/nspire/nspire-clp.dts
+++ b/sys/contrib/device-tree/src/arm/nspire/nspire-clp.dts
@@ -1,37 +1,82 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/boot/nspire-clp.dts
- *
* Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
*/
+
/dts-v1/;
+#include <dt-bindings/input/input.h>
+
/include/ "nspire-classic.dtsi"
&keypad {
linux,keymap = <
- 0x0000001c 0x0001001c 0x00020039
- 0x0004002c 0x00050034 0x00060015
- 0x0007000b 0x0008002d 0x01000033
- 0x0101004e 0x01020011 0x01030004
- 0x0104002f 0x01050003 0x01060016
- 0x01070002 0x01080014 0x02000062
- 0x0201000c 0x0202001f 0x02030007
- 0x02040013 0x02050006 0x02060010
- 0x02070005 0x02080019 0x03000027
- 0x03010037 0x03020018 0x0303000a
- 0x03040031 0x03050009 0x03060032
- 0x03070008 0x03080026 0x04000028
- 0x04010035 0x04020025 0x04040024
- 0x04060017 0x04080023 0x05000028
- 0x05020022 0x0503001b 0x05040021
- 0x0505001a 0x05060012 0x0507006f
- 0x05080020 0x0509002a 0x0601001c
- 0x0602002e 0x06030068 0x06040030
- 0x0605006d 0x0606001e 0x06070001
- 0x0608002b 0x0609000f 0x07000067
- 0x0702006a 0x0704006c 0x07060069
- 0x0707000e 0x0708001d 0x070a000d
+ MATRIX_KEY(0, 0, 0x1c)
+ MATRIX_KEY(0, 1, 0x1c)
+ MATRIX_KEY(0, 2, 0x39)
+ MATRIX_KEY(0, 4, 0x2c)
+ MATRIX_KEY(0, 5, 0x34)
+ MATRIX_KEY(0, 6, 0x15)
+ MATRIX_KEY(0, 7, 0x0b)
+ MATRIX_KEY(0, 8, 0x2d)
+ MATRIX_KEY(1, 0, 0x33)
+ MATRIX_KEY(1, 1, 0x4e)
+ MATRIX_KEY(1, 2, 0x11)
+ MATRIX_KEY(1, 3, 0x04)
+ MATRIX_KEY(1, 4, 0x2f)
+ MATRIX_KEY(1, 5, 0x03)
+ MATRIX_KEY(1, 6, 0x16)
+ MATRIX_KEY(1, 7, 0x02)
+ MATRIX_KEY(1, 8, 0x14)
+ MATRIX_KEY(2, 0, 0x62)
+ MATRIX_KEY(2, 1, 0x0c)
+ MATRIX_KEY(2, 2, 0x1f)
+ MATRIX_KEY(2, 3, 0x07)
+ MATRIX_KEY(2, 4, 0x13)
+ MATRIX_KEY(2, 5, 0x06)
+ MATRIX_KEY(2, 6, 0x10)
+ MATRIX_KEY(2, 7, 0x05)
+ MATRIX_KEY(2, 8, 0x19)
+ MATRIX_KEY(3, 0, 0x27)
+ MATRIX_KEY(3, 1, 0x37)
+ MATRIX_KEY(3, 2, 0x18)
+ MATRIX_KEY(3, 3, 0x0a)
+ MATRIX_KEY(3, 4, 0x31)
+ MATRIX_KEY(3, 5, 0x09)
+ MATRIX_KEY(3, 6, 0x32)
+ MATRIX_KEY(3, 7, 0x08)
+ MATRIX_KEY(3, 8, 0x26)
+ MATRIX_KEY(4, 0, 0x28)
+ MATRIX_KEY(4, 1, 0x35)
+ MATRIX_KEY(4, 2, 0x25)
+ MATRIX_KEY(4, 4, 0x24)
+ MATRIX_KEY(4, 6, 0x17)
+ MATRIX_KEY(4, 8, 0x23)
+ MATRIX_KEY(5, 0, 0x28)
+ MATRIX_KEY(5, 2, 0x22)
+ MATRIX_KEY(5, 3, 0x1b)
+ MATRIX_KEY(5, 4, 0x21)
+ MATRIX_KEY(5, 5, 0x1a)
+ MATRIX_KEY(5, 6, 0x12)
+ MATRIX_KEY(5, 7, 0x6f)
+ MATRIX_KEY(5, 8, 0x20)
+ MATRIX_KEY(5, 9, 0x2a)
+ MATRIX_KEY(6, 1, 0x1c)
+ MATRIX_KEY(6, 2, 0x2e)
+ MATRIX_KEY(6, 3, 0x68)
+ MATRIX_KEY(6, 4, 0x30)
+ MATRIX_KEY(6, 5, 0x6d)
+ MATRIX_KEY(6, 6, 0x1e)
+ MATRIX_KEY(6, 7, 0x01)
+ MATRIX_KEY(6, 8, 0x2b)
+ MATRIX_KEY(6, 9, 0x0f)
+ MATRIX_KEY(7, 0, 0x67)
+ MATRIX_KEY(7, 2, 0x6a)
+ MATRIX_KEY(7, 4, 0x6c)
+ MATRIX_KEY(7, 6, 0x69)
+ MATRIX_KEY(7, 7, 0x0e)
+ MATRIX_KEY(7, 8, 0x1d)
+ MATRIX_KEY(7, 10, 0x0d)
>;
};
diff --git a/sys/contrib/device-tree/src/arm/nspire/nspire-cx.dts b/sys/contrib/device-tree/src/arm/nspire/nspire-cx.dts
index 590b7dff6ae5..29f0181e5b38 100644
--- a/sys/contrib/device-tree/src/arm/nspire/nspire-cx.dts
+++ b/sys/contrib/device-tree/src/arm/nspire/nspire-cx.dts
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/boot/nspire-cx.dts
- *
* Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
*/
+
/dts-v1/;
+#include <dt-bindings/input/input.h>
+
/include/ "nspire.dtsi"
&lcd {
@@ -24,7 +25,7 @@
compatible = "arm,pl011", "arm,primecell";
clocks = <&uart_clk>, <&apb_pclk>;
- clock-names = "uart_clk", "apb_pclk";
+ clock-names = "uartclk", "apb_pclk";
};
&timer0 {
@@ -45,28 +46,72 @@
&keypad {
linux,keymap = <
- 0x0000001c 0x0001001c 0x00040039
- 0x0005002c 0x00060015 0x0007000b
- 0x0008000f 0x0100002d 0x01010011
- 0x0102002f 0x01030004 0x01040016
- 0x01050014 0x0106001f 0x01070002
- 0x010a006a 0x02000013 0x02010010
- 0x02020019 0x02030007 0x02040018
- 0x02050031 0x02060032 0x02070005
- 0x02080028 0x0209006c 0x03000026
- 0x03010025 0x03020024 0x0303000a
- 0x03040017 0x03050023 0x03060022
- 0x03070008 0x03080035 0x03090069
- 0x04000021 0x04010012 0x04020020
- 0x0404002e 0x04050030 0x0406001e
- 0x0407000d 0x04080037 0x04090067
- 0x05010038 0x0502000c 0x0503001b
- 0x05040034 0x0505001a 0x05060006
- 0x05080027 0x0509000e 0x050a006f
- 0x0600002b 0x0602004e 0x06030068
- 0x06040003 0x0605006d 0x06060009
- 0x06070001 0x0609000f 0x0708002a
- 0x0709001d 0x070a0033 >;
+ MATRIX_KEY(0, 0, 0x1c)
+ MATRIX_KEY(0, 1, 0x1c)
+ MATRIX_KEY(0, 4, 0x39)
+ MATRIX_KEY(0, 5, 0x2c)
+ MATRIX_KEY(0, 6, 0x15)
+ MATRIX_KEY(0, 7, 0x0b)
+ MATRIX_KEY(0, 8, 0x0f)
+ MATRIX_KEY(1, 0, 0x2d)
+ MATRIX_KEY(1, 1, 0x11)
+ MATRIX_KEY(1, 2, 0x2f)
+ MATRIX_KEY(1, 3, 0x04)
+ MATRIX_KEY(1, 4, 0x16)
+ MATRIX_KEY(1, 5, 0x14)
+ MATRIX_KEY(1, 6, 0x1f)
+ MATRIX_KEY(1, 7, 0x02)
+ MATRIX_KEY(1, 10, 0x6a)
+ MATRIX_KEY(2, 0, 0x13)
+ MATRIX_KEY(2, 1, 0x10)
+ MATRIX_KEY(2, 2, 0x19)
+ MATRIX_KEY(2, 3, 0x07)
+ MATRIX_KEY(2, 4, 0x18)
+ MATRIX_KEY(2, 5, 0x31)
+ MATRIX_KEY(2, 6, 0x32)
+ MATRIX_KEY(2, 7, 0x05)
+ MATRIX_KEY(2, 8, 0x28)
+ MATRIX_KEY(2, 9, 0x6c)
+ MATRIX_KEY(3, 0, 0x26)
+ MATRIX_KEY(3, 1, 0x25)
+ MATRIX_KEY(3, 2, 0x24)
+ MATRIX_KEY(3, 3, 0x0a)
+ MATRIX_KEY(3, 4, 0x17)
+ MATRIX_KEY(3, 5, 0x23)
+ MATRIX_KEY(3, 6, 0x22)
+ MATRIX_KEY(3, 7, 0x08)
+ MATRIX_KEY(3, 8, 0x35)
+ MATRIX_KEY(3, 9, 0x69)
+ MATRIX_KEY(4, 0, 0x21)
+ MATRIX_KEY(4, 1, 0x12)
+ MATRIX_KEY(4, 2, 0x20)
+ MATRIX_KEY(4, 4, 0x2e)
+ MATRIX_KEY(4, 5, 0x30)
+ MATRIX_KEY(4, 6, 0x1e)
+ MATRIX_KEY(4, 7, 0x0d)
+ MATRIX_KEY(4, 8, 0x37)
+ MATRIX_KEY(4, 9, 0x67)
+ MATRIX_KEY(5, 1, 0x38)
+ MATRIX_KEY(5, 2, 0x0c)
+ MATRIX_KEY(5, 3, 0x1b)
+ MATRIX_KEY(5, 4, 0x34)
+ MATRIX_KEY(5, 5, 0x1a)
+ MATRIX_KEY(5, 6, 0x06)
+ MATRIX_KEY(5, 8, 0x27)
+ MATRIX_KEY(5, 9, 0x0e)
+ MATRIX_KEY(5, 10, 0x6f)
+ MATRIX_KEY(6, 0, 0x2b)
+ MATRIX_KEY(6, 2, 0x4e)
+ MATRIX_KEY(6, 3, 0x68)
+ MATRIX_KEY(6, 4, 0x03)
+ MATRIX_KEY(6, 5, 0x6d)
+ MATRIX_KEY(6, 6, 0x09)
+ MATRIX_KEY(6, 7, 0x01)
+ MATRIX_KEY(6, 9, 0x0f)
+ MATRIX_KEY(7, 8, 0x2a)
+ MATRIX_KEY(7, 9, 0x1d)
+ MATRIX_KEY(7, 10, 0x33)
+ >;
};
&vbus_reg {
diff --git a/sys/contrib/device-tree/src/arm/nspire/nspire-tp.dts b/sys/contrib/device-tree/src/arm/nspire/nspire-tp.dts
index f7d0faacd4cc..3f0107f1c2c7 100644
--- a/sys/contrib/device-tree/src/arm/nspire/nspire-tp.dts
+++ b/sys/contrib/device-tree/src/arm/nspire/nspire-tp.dts
@@ -1,37 +1,82 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/boot/nspire-tp.dts
- *
* Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
*/
+
/dts-v1/;
+#include <dt-bindings/input/input.h>
+
/include/ "nspire-classic.dtsi"
&keypad {
linux,keymap = <
- 0x0000001c 0x0001001c 0x00040039
- 0x0005002c 0x00060015 0x0007000b
- 0x0008000f 0x0100002d 0x01010011
- 0x0102002f 0x01030004 0x01040016
- 0x01050014 0x0106001f 0x01070002
- 0x010a006a 0x02000013 0x02010010
- 0x02020019 0x02030007 0x02040018
- 0x02050031 0x02060032 0x02070005
- 0x02080028 0x0209006c 0x03000026
- 0x03010025 0x03020024 0x0303000a
- 0x03040017 0x03050023 0x03060022
- 0x03070008 0x03080035 0x03090069
- 0x04000021 0x04010012 0x04020020
- 0x0404002e 0x04050030 0x0406001e
- 0x0407000d 0x04080037 0x04090067
- 0x05010038 0x0502000c 0x0503001b
- 0x05040034 0x0505001a 0x05060006
- 0x05080027 0x0509000e 0x050a006f
- 0x0600002b 0x0602004e 0x06030068
- 0x06040003 0x0605006d 0x06060009
- 0x06070001 0x0609000f 0x0708002a
- 0x0709001d 0x070a0033 >;
+ MATRIX_KEY(0, 0, 0x1c)
+ MATRIX_KEY(0, 1, 0x1c)
+ MATRIX_KEY(0, 4, 0x39)
+ MATRIX_KEY(0, 5, 0x2c)
+ MATRIX_KEY(0, 6, 0x15)
+ MATRIX_KEY(0, 7, 0x0b)
+ MATRIX_KEY(0, 8, 0x0f)
+ MATRIX_KEY(1, 0, 0x2d)
+ MATRIX_KEY(1, 1, 0x11)
+ MATRIX_KEY(1, 2, 0x2f)
+ MATRIX_KEY(1, 3, 0x04)
+ MATRIX_KEY(1, 4, 0x16)
+ MATRIX_KEY(1, 5, 0x14)
+ MATRIX_KEY(1, 6, 0x1f)
+ MATRIX_KEY(1, 7, 0x02)
+ MATRIX_KEY(1, 10, 0x6a)
+ MATRIX_KEY(2, 0, 0x13)
+ MATRIX_KEY(2, 1, 0x10)
+ MATRIX_KEY(2, 2, 0x19)
+ MATRIX_KEY(2, 3, 0x07)
+ MATRIX_KEY(2, 4, 0x18)
+ MATRIX_KEY(2, 5, 0x31)
+ MATRIX_KEY(2, 6, 0x32)
+ MATRIX_KEY(2, 7, 0x05)
+ MATRIX_KEY(2, 8, 0x28)
+ MATRIX_KEY(2, 9, 0x6c)
+ MATRIX_KEY(3, 0, 0x26)
+ MATRIX_KEY(3, 1, 0x25)
+ MATRIX_KEY(3, 2, 0x24)
+ MATRIX_KEY(3, 3, 0x0a)
+ MATRIX_KEY(3, 4, 0x17)
+ MATRIX_KEY(3, 5, 0x23)
+ MATRIX_KEY(3, 6, 0x22)
+ MATRIX_KEY(3, 7, 0x08)
+ MATRIX_KEY(3, 8, 0x35)
+ MATRIX_KEY(3, 9, 0x69)
+ MATRIX_KEY(4, 0, 0x21)
+ MATRIX_KEY(4, 1, 0x12)
+ MATRIX_KEY(4, 2, 0x20)
+ MATRIX_KEY(4, 4, 0x2e)
+ MATRIX_KEY(4, 5, 0x30)
+ MATRIX_KEY(4, 6, 0x1e)
+ MATRIX_KEY(4, 7, 0x0d)
+ MATRIX_KEY(4, 8, 0x37)
+ MATRIX_KEY(4, 9, 0x67)
+ MATRIX_KEY(5, 1, 0x38)
+ MATRIX_KEY(5, 2, 0x0c)
+ MATRIX_KEY(5, 3, 0x1b)
+ MATRIX_KEY(5, 4, 0x34)
+ MATRIX_KEY(5, 5, 0x1a)
+ MATRIX_KEY(5, 6, 0x06)
+ MATRIX_KEY(5, 8, 0x27)
+ MATRIX_KEY(5, 9, 0x0e)
+ MATRIX_KEY(5, 10, 0x6f)
+ MATRIX_KEY(6, 0, 0x2b)
+ MATRIX_KEY(6, 2, 0x4e)
+ MATRIX_KEY(6, 3, 0x68)
+ MATRIX_KEY(6, 4, 0x03)
+ MATRIX_KEY(6, 5, 0x6d)
+ MATRIX_KEY(6, 6, 0x09)
+ MATRIX_KEY(6, 7, 0x01)
+ MATRIX_KEY(6, 9, 0x0f)
+ MATRIX_KEY(7, 8, 0x2a)
+ MATRIX_KEY(7, 9, 0x1d)
+ MATRIX_KEY(7, 10, 0x33)
+ >;
};
/ {
diff --git a/sys/contrib/device-tree/src/arm/nspire/nspire.dtsi b/sys/contrib/device-tree/src/arm/nspire/nspire.dtsi
index 088bcc38589f..d56fef7250db 100644
--- a/sys/contrib/device-tree/src/arm/nspire/nspire.dtsi
+++ b/sys/contrib/device-tree/src/arm/nspire/nspire.dtsi
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/boot/nspire.dtsi
- *
* Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
*/
@@ -11,8 +9,13 @@
interrupt-parent = <&intc>;
cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
cpu@0 {
compatible = "arm,arm926ej-s";
+ device_type = "cpu";
+ reg = <0>;
};
};
@@ -21,8 +24,15 @@
};
sram: sram@a4000000 {
- device = "memory";
- reg = <0xa4000000 0x20000>;
+ compatible = "mmio-sram";
+ reg = <0xa4000000 0x20000>; /* 128k */
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xa4000000 0x20000>;
+
+ sram@0 {
+ reg = <0x0 0x20000>;
+ };
};
timer_clk: timer_clk {
@@ -59,7 +69,6 @@
compatible = "regulator-fixed";
regulator-name = "USB VBUS output";
- regulator-type = "voltage";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
@@ -172,7 +181,14 @@
};
misc: misc@900a0000 {
+ compatible = "ti,nspire-misc", "syscon", "simple-mfd";
reg = <0x900a0000 0x1000>;
+
+ reboot {
+ compatible = "syscon-reboot";
+ offset = <0x08>;
+ value = <0x02>;
+ };
};
pwr: pwr@900b0000 {
diff --git a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-common-npcm7xx.dtsi b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-common-npcm7xx.dtsi
index c7b5ef15b716..868454ae6bde 100644
--- a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-common-npcm7xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-common-npcm7xx.dtsi
@@ -220,6 +220,15 @@
};
};
+ peci: peci-controller@f0100000 {
+ compatible = "nuvoton,npcm750-peci";
+ reg = <0xf0100000 0x200>;
+ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk NPCM7XX_CLK_APB3>;
+ cmd-timeout-ms = <1000>;
+ status = "disabled";
+ };
+
spi0: spi@200000 {
compatible = "nuvoton,npcm750-pspi";
reg = <0x200000 0x1000>;
diff --git a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gbs.dts b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gbs.dts
index 9e9eba8bad5e..9f64c85e1c20 100644
--- a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gbs.dts
+++ b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gbs.dts
@@ -525,7 +525,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
@@ -666,7 +666,7 @@
reg = <0x50>;
};
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
@@ -727,7 +727,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@73 {
+ i2c-mux@73 {
compatible = "nxp,pca9545";
#address-cells = <1>;
#size-cells = <0>;
@@ -763,7 +763,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@72 {
+ i2c-mux@72 {
compatible = "nxp,pca9545";
#address-cells = <1>;
#size-cells = <0>;
@@ -812,7 +812,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
#address-cells = <1>;
#size-cells = <0>;
@@ -866,7 +866,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9545";
#address-cells = <1>;
#size-cells = <0>;
@@ -902,7 +902,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@76 {
+ i2c-mux@76 {
compatible = "nxp,pca9545";
#address-cells = <1>;
#size-cells = <0>;
@@ -961,7 +961,7 @@
clock-frequency = <100000>;
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9545";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gsj.dts b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gsj.dts
index 2a394cc15284..cd7843339c24 100644
--- a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gsj.dts
+++ b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-gsj.dts
@@ -146,7 +146,7 @@
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
- bmc@0{
+ bmc@0 {
label = "bmc";
reg = <0x000000 0x2000000>;
};
@@ -155,7 +155,7 @@
reg = <0x0000000 0x80000>;
read-only;
};
- u-boot-env@100000{
+ u-boot-env@100000 {
label = "u-boot-env";
reg = <0x00100000 0x40000>;
};
@@ -303,7 +303,7 @@
&i2c15 {
status = "okay";
- i2c-switch@75 {
+ i2c-mux@75 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-kudo.dts b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-kudo.dts
index f7b38bee039b..5787ae95d3b4 100644
--- a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-kudo.dts
+++ b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm730-kudo.dts
@@ -397,7 +397,7 @@
reg = <0x0000000 0xC0000>;
read-only;
};
- u-boot-env@100000{
+ u-boot-env@100000 {
label = "u-boot-env";
reg = <0x00100000 0x40000>;
};
@@ -494,7 +494,7 @@
&i2c1 {
status = "okay";
- i2c-switch@75 {
+ i2c-mux@75 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -573,7 +573,7 @@
};
};
};
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -613,7 +613,7 @@
&i2c4 {
status = "okay";
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -684,7 +684,7 @@
&i2c13 {
status = "okay";
- i2c-switch@77 {
+ i2c-mux@77 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm750-runbmc-olympus.dts b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm750-runbmc-olympus.dts
index 87359ab05db3..baa39d0c1032 100644
--- a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm750-runbmc-olympus.dts
+++ b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-npcm750-runbmc-olympus.dts
@@ -111,7 +111,7 @@
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
- bmc@0{
+ bmc@0 {
label = "bmc";
reg = <0x000000 0x2000000>;
};
@@ -120,7 +120,7 @@
reg = <0x0000000 0x80000>;
read-only;
};
- u-boot-env@100000{
+ u-boot-env@100000 {
label = "u-boot-env";
reg = <0x00100000 0x40000>;
};
@@ -208,7 +208,7 @@
&i2c1 {
status = "okay";
- i2c-switch@70 {
+ i2c-mux@70 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
@@ -258,7 +258,7 @@
};
};
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9546";
reg = <0x71>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-wpcm450.dtsi b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-wpcm450.dtsi
index fd671c7a1e5d..6e1f0f164cb4 100644
--- a/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-wpcm450.dtsi
+++ b/sys/contrib/device-tree/src/arm/nuvoton/nuvoton-wpcm450.dtsi
@@ -120,6 +120,7 @@
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>,
<3 IRQ_TYPE_LEVEL_HIGH>,
<4 IRQ_TYPE_LEVEL_HIGH>;
+ #interrupt-cells = <2>;
interrupt-controller;
};
@@ -128,6 +129,7 @@
gpio-controller;
#gpio-cells = <2>;
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+ #interrupt-cells = <2>;
interrupt-controller;
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra114-asus-tf701t.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra114-asus-tf701t.dts
index 84a3eb38e71d..763ab812eb87 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra114-asus-tf701t.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra114-asus-tf701t.dts
@@ -271,6 +271,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra114-dalmore.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra114-dalmore.dts
index a685fcb129d0..c06b52fe330a 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra114-dalmore.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra114-dalmore.dts
@@ -755,6 +755,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra114-roth.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra114-roth.dts
index b9d00009d1f4..a89b16573b42 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra114-roth.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra114-roth.dts
@@ -779,6 +779,8 @@
/* Usable on reworked devices only */
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra114-tn7.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra114-tn7.dts
index f02d8c79eee7..bfbdb345575a 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra114-tn7.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra114-tn7.dts
@@ -50,6 +50,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra114.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra114.dtsi
index 09996acad639..86f14e2fd29f 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra114.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra114.dtsi
@@ -315,7 +315,6 @@
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA114_CLK_UARTA>;
resets = <&tegra_car 6>;
- reset-names = "serial";
dmas = <&apbdma 8>, <&apbdma 8>;
dma-names = "rx", "tx";
status = "disabled";
@@ -328,7 +327,6 @@
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA114_CLK_UARTB>;
resets = <&tegra_car 7>;
- reset-names = "serial";
dmas = <&apbdma 9>, <&apbdma 9>;
dma-names = "rx", "tx";
status = "disabled";
@@ -341,7 +339,6 @@
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA114_CLK_UARTC>;
resets = <&tegra_car 55>;
- reset-names = "serial";
dmas = <&apbdma 10>, <&apbdma 10>;
dma-names = "rx", "tx";
status = "disabled";
@@ -354,7 +351,6 @@
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA114_CLK_UARTD>;
resets = <&tegra_car 65>;
- reset-names = "serial";
dmas = <&apbdma 19>, <&apbdma 19>;
dma-names = "rx", "tx";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-eval.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-eval.dts
index 2df2d8a6b552..0f3debeb294b 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-eval.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-eval.dts
@@ -52,6 +52,8 @@
/* Apalis UART1 */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2-eval.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2-eval.dts
index f4521fd15f6a..d13b8d25ca6a 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2-eval.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2-eval.dts
@@ -53,6 +53,8 @@
/* Apalis UART1 */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2.dtsi
index 75cfe718737c..54b7da4b6920 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis-v1.2.dtsi
@@ -1557,16 +1557,19 @@
serial@70006040 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006200 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006300 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis.dtsi
index 554c8089491c..c5a0d6aebaec 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-apalis.dtsi
@@ -1550,16 +1550,19 @@
serial@70006040 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006200 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006300 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-jetson-tk1.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra124-jetson-tk1.dts
index 4196f2401c90..f09109be1152 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-jetson-tk1.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-jetson-tk1.dts
@@ -1385,6 +1385,7 @@
*/
serial@70006000 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
};
@@ -1398,12 +1399,15 @@
*/
serial@70006040 {
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
};
/* DB9 serial port */
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-nyan.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra124-nyan.dtsi
index 0c35ca2e9121..a2ee37180200 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-nyan.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-nyan.dtsi
@@ -70,6 +70,8 @@
serial@70006000 {
/* Debug connector on the bottom of the board near SD card. */
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124-venice2.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra124-venice2.dts
index c697301c443c..3924ee385dee 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124-venice2.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124-venice2.dts
@@ -609,6 +609,8 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra124.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra124.dtsi
index b3fbecf5c818..8f1fff373461 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra124.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra124.dtsi
@@ -380,7 +380,6 @@
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_UARTA>;
resets = <&tegra_car 6>;
- reset-names = "serial";
dmas = <&apbdma 8>, <&apbdma 8>;
dma-names = "rx", "tx";
status = "disabled";
@@ -393,7 +392,6 @@
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_UARTB>;
resets = <&tegra_car 7>;
- reset-names = "serial";
dmas = <&apbdma 9>, <&apbdma 9>;
dma-names = "rx", "tx";
status = "disabled";
@@ -406,7 +404,6 @@
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_UARTC>;
resets = <&tegra_car 55>;
- reset-names = "serial";
dmas = <&apbdma 10>, <&apbdma 10>;
dma-names = "rx", "tx";
status = "disabled";
@@ -419,7 +416,6 @@
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_UARTD>;
resets = <&tegra_car 65>;
- reset-names = "serial";
dmas = <&apbdma 19>, <&apbdma 19>;
dma-names = "rx", "tx";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-acer-a500-picasso.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-acer-a500-picasso.dts
index 08b42952f4de..a619ea83ed3b 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-acer-a500-picasso.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-acer-a500-picasso.dts
@@ -65,7 +65,7 @@
rgb {
status = "okay";
- port@0 {
+ port {
lcd_output: endpoint {
remote-endpoint = <&lvds_encoder_input>;
bus-width = <18>;
@@ -393,12 +393,14 @@
uartb: serial@70006040 {
compatible = "nvidia,tegra20-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
/* GPS BCM4751 */
};
uartc: serial@70006200 {
compatible = "nvidia,tegra20-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-asus-tf101.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-asus-tf101.dts
index c2a9c3fb5b33..e118809dc6d9 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-asus-tf101.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-asus-tf101.dts
@@ -66,7 +66,7 @@
rgb {
status = "okay";
- port@0 {
+ port {
lcd_output: endpoint {
remote-endpoint = <&lvds_encoder_input>;
bus-width = <18>;
@@ -450,12 +450,14 @@
serial@70006040 {
compatible = "nvidia,tegra20-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
/* GPS BCM4751 */
};
serial@70006200 {
compatible = "nvidia,tegra20-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
@@ -482,6 +484,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-eval-v3.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-eval-v3.dts
index 612f4e54cb20..be2ead4147f2 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-eval-v3.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-eval-v3.dts
@@ -102,6 +102,8 @@
/* Colibri UART-A */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-iris.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-iris.dts
index 25a9f5dfe62d..1da202ad1ded 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-iris.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri-iris.dts
@@ -102,6 +102,8 @@
/* Colibri UART-A */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri.dtsi
index 0e03910abbe6..8c1d5c9fa483 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-colibri.dtsi
@@ -446,18 +446,20 @@
tegra_ac97: ac97@70002000 {
status = "okay";
nvidia,codec-reset-gpio =
- <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_HIGH>;
+ <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>;
nvidia,codec-sync-gpio =
<&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>;
};
serial@70006040 {
compatible = "nvidia,tegra20-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006300 {
compatible = "nvidia,tegra20-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-harmony.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-harmony.dts
index 11f21aeba8e9..5c31a6c8dabe 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-harmony.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-harmony.dts
@@ -273,6 +273,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-paz00.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-paz00.dts
index e995f428dc2e..afb922bd79a7 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-paz00.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-paz00.dts
@@ -279,10 +279,14 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
serial@70006200 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
@@ -307,20 +311,19 @@
clock-frequency = <100000>;
};
- nvec@7000c500 {
+ i2c@7000c500 {
compatible = "nvidia,nvec";
- reg = <0x7000c500 0x100>;
- interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
+
+ /delete-property/ #address-cells;
+ /delete-property/ #size-cells;
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
+
clock-frequency = <80000>;
request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
slave-addr = <138>;
- clocks = <&tegra_car TEGRA20_CLK_I2C3>,
- <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
- clock-names = "div-clk", "fast-clk";
- resets = <&tegra_car 67>;
- reset-names = "i2c";
+
+ status = "okay";
};
i2c@7000d000 {
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-seaboard.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-seaboard.dts
index bd4ff8b40b20..e944ae9b86c2 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-seaboard.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-seaboard.dts
@@ -324,6 +324,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-tamonten.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra20-tamonten.dtsi
index ddb84e4a9f8b..5c214dd060bb 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-tamonten.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-tamonten.dtsi
@@ -288,6 +288,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-trimslice.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-trimslice.dts
index 1944121e2dd6..7cae6ad57544 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-trimslice.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-trimslice.dts
@@ -276,6 +276,8 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20-ventana.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra20-ventana.dts
index 433575a6ad38..f3273941437c 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20-ventana.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20-ventana.dts
@@ -323,6 +323,8 @@
};
serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra20.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra20.dtsi
index 4177d04265d8..8da75ccc4402 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra20.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra20.dtsi
@@ -442,7 +442,6 @@
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA20_CLK_UARTA>;
resets = <&tegra_car 6>;
- reset-names = "serial";
dmas = <&apbdma 8>, <&apbdma 8>;
dma-names = "rx", "tx";
status = "disabled";
@@ -455,7 +454,6 @@
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA20_CLK_UARTB>;
resets = <&tegra_car 7>;
- reset-names = "serial";
dmas = <&apbdma 9>, <&apbdma 9>;
dma-names = "rx", "tx";
status = "disabled";
@@ -468,7 +466,6 @@
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA20_CLK_UARTC>;
resets = <&tegra_car 55>;
- reset-names = "serial";
dmas = <&apbdma 10>, <&apbdma 10>;
dma-names = "rx", "tx";
status = "disabled";
@@ -481,7 +478,6 @@
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA20_CLK_UARTD>;
resets = <&tegra_car 65>;
- reset-names = "serial";
dmas = <&apbdma 19>, <&apbdma 19>;
dma-names = "rx", "tx";
status = "disabled";
@@ -494,7 +490,6 @@
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA20_CLK_UARTE>;
resets = <&tegra_car 66>;
- reset-names = "serial";
dmas = <&apbdma 20>, <&apbdma 20>;
dma-names = "rx", "tx";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-eval.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-eval.dts
index 842b5faba285..fc284155cd76 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-eval.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-eval.dts
@@ -59,6 +59,8 @@
/* Apalis UART1 */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1-eval.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1-eval.dts
index ca277bf1df78..9d08e2b094b4 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1-eval.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1-eval.dts
@@ -60,6 +60,8 @@
/* Apalis UART1 */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1.dtsi
index a4b7fe5c3d23..ff0d684622f7 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis-v1.1.dtsi
@@ -829,16 +829,19 @@
serial@70006040 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006300 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
@@ -994,7 +997,6 @@
compatible = "st,stmpe811";
reg = <0x41>;
irq-gpio = <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>;
- interrupt-controller;
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis.dtsi
index d73103884000..d38f1dd38a90 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-apalis.dtsi
@@ -820,16 +820,19 @@
serial@70006040 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006300 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
@@ -977,7 +980,6 @@
compatible = "st,stmpe811";
reg = <0x41>;
irq-gpio = <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>;
- interrupt-controller;
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-lvds-display.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-lvds-display.dtsi
index bae09d82594d..680edff0f26f 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-lvds-display.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-lvds-display.dtsi
@@ -10,7 +10,7 @@
rgb {
status = "okay";
- port@0 {
+ port {
dpi_output: endpoint {
remote-endpoint = <&bridge_input>;
bus-width = <24>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-nexus7-grouper-common.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-nexus7-grouper-common.dtsi
index c0062353c1f1..a9342e04b14b 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-nexus7-grouper-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-nexus7-grouper-common.dtsi
@@ -798,12 +798,14 @@
uartb: serial@70006040 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
/* GPS BCM4751 */
};
uartc: serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
@@ -1090,15 +1092,11 @@
display-panel {
/*
- * Nexus 7 supports two compatible panel models:
- *
- * 1. hydis,hv070wx2-1e0
- * 2. chunghwa,claa070wp03xg
- *
- * We want to use timing which is optimized for Nexus 7,
- * hence we need to customize the timing.
+ * Some device variants come with a Hydis HV070WX2-1E0, but
+ * since they are all largely compatible, we'll go with the
+ * Chunghwa one here.
*/
- compatible = "panel-lvds";
+ compatible = "chunghwa,claa070wp03xg", "panel-lvds";
width-mm = <94>;
height-mm = <150>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-tf700t.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-tf700t.dts
index efde7dad718a..9c480fde2e76 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-tf700t.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-tf700t.dts
@@ -15,7 +15,7 @@
rgb {
status = "okay";
- port@0 {
+ port {
dpi_output: endpoint {
remote-endpoint = <&bridge_input>;
bus-width = <24>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-transformer-common.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-transformer-common.dtsi
index bdb898ad6262..ead95306840f 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-transformer-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-asus-transformer-common.dtsi
@@ -1088,6 +1088,7 @@
serial@70006040 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
@@ -1096,6 +1097,7 @@
serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-beaver.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-beaver.dts
index 51769d5132ae..1d74179dde79 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-beaver.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-beaver.dts
@@ -1733,6 +1733,8 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-cardhu.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-cardhu.dtsi
index 37a9c5a0ca30..0120859d6d72 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-cardhu.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-cardhu.dtsi
@@ -170,11 +170,14 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri-eval-v3.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri-eval-v3.dts
index 36615c5fda2c..1990bf8e122d 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri-eval-v3.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri-eval-v3.dts
@@ -38,6 +38,8 @@
/* Colibri UART-A */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri.dtsi
index ed6106f1bea1..81c8a5fd92cc 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-colibri.dtsi
@@ -710,11 +710,13 @@
serial@70006040 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
serial@70006300 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
};
@@ -859,7 +861,6 @@
compatible = "st,stmpe811";
reg = <0x41>;
irq-gpio = <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>;
- interrupt-controller;
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-ouya.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-ouya.dts
index eef27c82987b..7e3de26ca960 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-ouya.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-ouya.dts
@@ -2004,6 +2004,7 @@
uartc: serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
@@ -2033,6 +2034,8 @@
};
uartd: serial@70006300 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30-pegatron-chagall.dts b/sys/contrib/device-tree/src/arm/nvidia/tegra30-pegatron-chagall.dts
index 8d10eb8b48b9..4012f9c799a8 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30-pegatron-chagall.dts
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30-pegatron-chagall.dts
@@ -1110,6 +1110,7 @@
uartb: serial@70006040 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
@@ -1118,6 +1119,7 @@
uartc: serial@70006200 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
/delete-property/ reg-shift;
status = "okay";
@@ -2626,7 +2628,7 @@
};
display-panel {
- compatible = "panel-lvds";
+ compatible = "hannstar,hsd101pww2", "panel-lvds";
width-mm = <217>;
height-mm = <136>;
diff --git a/sys/contrib/device-tree/src/arm/nvidia/tegra30.dtsi b/sys/contrib/device-tree/src/arm/nvidia/tegra30.dtsi
index 9cba67b54111..f866fa7b55a5 100644
--- a/sys/contrib/device-tree/src/arm/nvidia/tegra30.dtsi
+++ b/sys/contrib/device-tree/src/arm/nvidia/tegra30.dtsi
@@ -563,7 +563,6 @@
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA30_CLK_UARTA>;
resets = <&tegra_car 6>;
- reset-names = "serial";
dmas = <&apbdma 8>, <&apbdma 8>;
dma-names = "rx", "tx";
status = "disabled";
@@ -576,7 +575,6 @@
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA30_CLK_UARTB>;
resets = <&tegra_car 7>;
- reset-names = "serial";
dmas = <&apbdma 9>, <&apbdma 9>;
dma-names = "rx", "tx";
status = "disabled";
@@ -589,7 +587,6 @@
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA30_CLK_UARTC>;
resets = <&tegra_car 55>;
- reset-names = "serial";
dmas = <&apbdma 10>, <&apbdma 10>;
dma-names = "rx", "tx";
status = "disabled";
@@ -602,7 +599,6 @@
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA30_CLK_UARTD>;
resets = <&tegra_car 65>;
- reset-names = "serial";
dmas = <&apbdma 19>, <&apbdma 19>;
dma-names = "rx", "tx";
status = "disabled";
@@ -615,7 +611,6 @@
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA30_CLK_UARTE>;
resets = <&tegra_car 66>;
- reset-names = "serial";
dmas = <&apbdma 20>, <&apbdma 20>;
dma-names = "rx", "tx";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx1-ads.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx1-ads.dts
index 5833fb6f15d8..2c817c4a4c68 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx1-ads.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx1-ads.dts
@@ -65,7 +65,7 @@
pinctrl-0 = <&pinctrl_weim>;
status = "okay";
- nor: nor@0,0 {
+ nor: flash@0,0 {
compatible = "cfi-flash";
reg = <0 0x00000000 0x02000000>;
bank-width = <4>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx1-apf9328.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx1-apf9328.dts
index 77b21aa7a146..e66eef87a7a4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx1-apf9328.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx1-apf9328.dts
@@ -45,7 +45,7 @@
pinctrl-0 = <&pinctrl_weim>;
status = "okay";
- nor: nor@0,0 {
+ nor: flash@0,0 {
compatible = "cfi-flash";
reg = <0 0x00000000 0x02000000>;
bank-width = <2>;
@@ -58,10 +58,8 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eth>;
compatible = "davicom,dm9000";
- reg = <
- 4 0x00c00000 0x2
- 4 0x00c00002 0x2
- >;
+ reg = <4 0x00c00000 0x2>,
+ <4 0x00c00002 0x2>;
interrupt-parent = <&gpio2>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
fsl,weim-cs-timing = <0x0000c700 0x19190d01>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx1.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx1.dtsi
index e312f1e74e2f..1ac10965fdfd 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx1.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx1.dtsi
@@ -68,7 +68,7 @@
interrupt-parent = <&aitc>;
ranges;
- aipi@200000 {
+ bus@200000 {
compatible = "fsl,aipi-bus", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
@@ -155,7 +155,7 @@
};
};
- aipi@210000 {
+ bus@210000 {
compatible = "fsl,aipi-bus", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
@@ -268,9 +268,12 @@
status = "disabled";
};
- esram: esram@300000 {
+ esram: sram@300000 {
compatible = "mmio-sram";
reg = <0x00300000 0x20000>;
+ ranges = <0 0x00300000 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-cpuimx25.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-cpuimx25.dtsi
index 0703f62d10d1..93a6e4e680b4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-cpuimx25.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-cpuimx25.dtsi
@@ -27,7 +27,7 @@
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
- pcf8563@51 {
+ rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
index 7d4301b22b90..6cddb2cc36fe 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
@@ -16,7 +16,7 @@
bus-width = <18>;
display-timings {
native-mode = <&qvga_timings>;
- qvga_timings: 320x240 {
+ qvga_timings: timing0 {
clock-frequency = <6500000>;
hactive = <320>;
vactive = <240>;
@@ -30,22 +30,15 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_lcd_3v3: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_reg_lcd_3v3>;
- regulator-name = "lcd-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_lcd_3v3: regulator-0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_lcd_3v3>;
+ regulator-name = "lcd-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
index 80a7f96de4c6..64b2ffac463b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
@@ -16,7 +16,7 @@
bus-width = <18>;
display-timings {
native-mode = <&dvi_svga_timings>;
- dvi_svga_timings: 800x600 {
+ dvi_svga_timings: timing0 {
clock-frequency = <40000000>;
hactive = <800>;
vactive = <600>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
index 24027a1fb46d..fb074bfdaa8d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
@@ -16,7 +16,7 @@
bus-width = <18>;
display-timings {
native-mode = <&dvi_vga_timings>;
- dvi_vga_timings: 640x480 {
+ dvi_vga_timings: timing0 {
clock-frequency = <31250000>;
hactive = <640>;
vactive = <480>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-karo-tx25.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-karo-tx25.dts
index 0950eb66d3d9..458b94d3d4ed 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-karo-tx25.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-karo-tx25.dts
@@ -14,20 +14,13 @@
stdout-path = &uart1;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_fec_phy: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "fec-phy";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio4 9 0>;
- enable-active-high;
- };
+ reg_fec_phy: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "fec-phy";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio4 9 0>;
+ enable-active-high;
};
memory@80000000 {
@@ -39,46 +32,46 @@
&iomuxc {
pinctrl_uart1: uart1grp {
fsl,pins = <
- MX25_PAD_UART1_TXD__UART1_TXD 0x80000000
- MX25_PAD_UART1_RXD__UART1_RXD 0x80000000
- MX25_PAD_UART1_CTS__UART1_CTS 0x80000000
- MX25_PAD_UART1_RTS__UART1_RTS 0x80000000
+ MX25_PAD_UART1_TXD__UART1_TXD 0x00000020
+ MX25_PAD_UART1_RXD__UART1_RXD 0x000000a0
+ MX25_PAD_UART1_CTS__UART1_CTS 0x00000060
+ MX25_PAD_UART1_RTS__UART1_RTS 0x000000e0
>;
};
pinctrl_fec: fecgrp {
fsl,pins = <
- MX25_PAD_D11__GPIO_4_9 0x80000000 /* FEC PHY power on pin */
- MX25_PAD_D13__GPIO_4_7 0x80000000 /* FEC reset */
- MX25_PAD_FEC_MDC__FEC_MDC 0x80000000
- MX25_PAD_FEC_MDIO__FEC_MDIO 0x80000000
- MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x80000000
- MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x80000000
- MX25_PAD_FEC_TX_EN__FEC_TX_EN 0x80000000
- MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x80000000
- MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x80000000
- MX25_PAD_FEC_RX_DV__FEC_RX_DV 0x80000000
- MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x80000000
+ MX25_PAD_D11__GPIO_4_9 0x00000021 /* FEC PHY power on pin */
+ MX25_PAD_D13__GPIO_4_7 0x000000a1 /* FEC reset */
+ MX25_PAD_FEC_MDC__FEC_MDC 0x00000060
+ MX25_PAD_FEC_MDIO__FEC_MDIO 0x000001f0
+ MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x00000060
+ MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x00000060
+ MX25_PAD_FEC_TX_EN__FEC_TX_EN 0x00000060
+ MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x000000c1
+ MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x000000c0
+ MX25_PAD_FEC_RX_DV__FEC_RX_DV 0x000000c0
+ MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x000000c0
>;
};
pinctrl_nfc: nfcgrp {
fsl,pins = <
- MX25_PAD_NF_CE0__NF_CE0 0x80000000
+ MX25_PAD_NF_CE0__NF_CE0 0x00000001
MX25_PAD_NFWE_B__NFWE_B 0x80000000
MX25_PAD_NFRE_B__NFRE_B 0x80000000
MX25_PAD_NFALE__NFALE 0x80000000
MX25_PAD_NFCLE__NFCLE 0x80000000
MX25_PAD_NFWP_B__NFWP_B 0x80000000
- MX25_PAD_NFRB__NFRB 0x80000000
- MX25_PAD_D7__D7 0x80000000
- MX25_PAD_D6__D6 0x80000000
- MX25_PAD_D5__D5 0x80000000
- MX25_PAD_D4__D4 0x80000000
- MX25_PAD_D3__D3 0x80000000
- MX25_PAD_D2__D2 0x80000000
- MX25_PAD_D1__D1 0x80000000
- MX25_PAD_D0__D0 0x80000000
+ MX25_PAD_NFRB__NFRB 0x000000e0
+ MX25_PAD_D7__D7 0x00000080
+ MX25_PAD_D6__D6 0x00000080
+ MX25_PAD_D5__D5 0x00000080
+ MX25_PAD_D4__D4 0x00000080
+ MX25_PAD_D3__D3 0x00000080
+ MX25_PAD_D2__D2 0x00000080
+ MX25_PAD_D1__D1 0x00000000
+ MX25_PAD_D0__D0 0x00000080
>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-pdk.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-pdk.dts
index fb66884d8a2f..dd176fb54e58 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25-pdk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25-pdk.dts
@@ -16,45 +16,35 @@
reg = <0x80000000 0x4000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_fec_3v3: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "fec-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 3 0>;
- enable-active-high;
- };
+ reg_fec_3v3: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "fec-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 3 0>;
+ enable-active-high;
+ };
- reg_2p5v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- };
+ reg_2p5v: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ };
- reg_3p3v: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
+ reg_3p3v: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
- reg_can_3v3: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "can-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio4 6 0>;
- };
+ reg_can_3v3: regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "can-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio4 6 0>;
};
sound {
@@ -78,7 +68,7 @@
bus-width = <18>;
display-timings {
native-mode = <&wvga_timings>;
- wvga_timings: 640x480 {
+ wvga_timings: timing0 {
hactive = <640>;
vactive = <480>;
hback-porch = <45>;
@@ -132,6 +122,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks 129>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx25.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx25.dtsi
index 5f90d72b840b..9cfff2151b7e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx25.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx25.dtsi
@@ -68,6 +68,16 @@
};
};
+ usbphy0: usb-phy0 {
+ compatible = "usb-nop-xceiv";
+ #phy-cells = <0>;
+ };
+
+ usbphy1: usb-phy1 {
+ compatible = "usb-nop-xceiv";
+ #phy-cells = <0>;
+ };
+
soc: soc {
#address-cells = <1>;
#size-cells = <1>;
@@ -93,7 +103,7 @@
compatible = "fsl,imx25-i2c", "fsl,imx21-i2c";
reg = <0x43f80000 0x4000>;
clocks = <&clks 48>;
- clock-names = "";
+ clock-names = "ipg";
interrupts = <3>;
status = "disabled";
};
@@ -104,7 +114,7 @@
compatible = "fsl,imx25-i2c", "fsl,imx21-i2c";
reg = <0x43f84000 0x4000>;
clocks = <&clks 48>;
- clock-names = "";
+ clock-names = "ipg";
interrupts = <10>;
status = "disabled";
};
@@ -151,7 +161,7 @@
compatible = "fsl,imx25-i2c", "fsl,imx21-i2c";
reg = <0x43f98000 0x4000>;
clocks = <&clks 48>;
- clock-names = "";
+ clock-names = "ipg";
interrupts = <4>;
status = "disabled";
};
@@ -178,12 +188,9 @@
};
kpp: kpp@43fa8000 {
- #address-cells = <1>;
- #size-cells = <0>;
compatible = "fsl,imx25-kpp", "fsl,imx21-kpp";
reg = <0x43fa8000 0x4000>;
clocks = <&clks 102>;
- clock-names = "";
interrupts = <24>;
status = "disabled";
};
@@ -529,7 +536,6 @@
compatible = "fsl,imx25-wdt", "fsl,imx21-wdt";
reg = <0x53fdc000 0x4000>;
clocks = <&clks 126>;
- clock-names = "";
interrupts = <55>;
};
@@ -543,7 +549,7 @@
};
iim: efuse@53ff0000 {
- compatible = "fsl,imx25-iim", "fsl,imx27-iim";
+ compatible = "fsl,imx25-iim";
reg = <0x53ff0000 0x4000>;
interrupts = <19>;
clocks = <&clks 99>;
@@ -583,10 +589,9 @@
};
dryice@53ffc000 {
- compatible = "fsl,imx25-dryice", "fsl,imx25-rtc";
+ compatible = "fsl,imx25-rtc";
reg = <0x53ffc000 0x4000>;
clocks = <&clks 81>;
- clock-names = "ipg";
interrupts = <25 56>;
};
};
@@ -594,9 +599,12 @@
iram: sram@78000000 {
compatible = "mmio-sram";
reg = <0x78000000 0x20000>;
+ ranges = <0 0x78000000 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
};
- emi@80000000 {
+ bus@80000000 {
compatible = "fsl,emi-bus", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
@@ -616,22 +624,4 @@
};
};
};
-
- usbphy {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usbphy0: usb-phy@0 {
- reg = <0>;
- compatible = "usb-nop-xceiv";
- #phy-cells = <0>;
- };
-
- usbphy1: usb-phy@1 {
- reg = <1>;
- compatible = "usb-nop-xceiv";
- #phy-cells = <0>;
- };
- };
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-apf27dev.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-apf27dev.dts
index 6f1e8ce9e76e..849306cb4532 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-apf27dev.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-apf27dev.dts
@@ -16,7 +16,7 @@
fsl,pcr = <0xfae80083>; /* non-standard but required */
display-timings {
native-mode = <&timing0>;
- timing0: 800x480 {
+ timing0: timing0 {
clock-frequency = <33000033>;
hactive = <800>;
vactive = <480>;
@@ -47,26 +47,19 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_leds>;
- user {
+ led-user {
label = "Heartbeat";
gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_max5821: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "max5821-reg";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- regulator-always-on;
- };
+ reg_max5821: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "max5821-reg";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-cpuimx27.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-cpuimx27.dtsi
index 74110bbcd9d4..c7e923584878 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-cpuimx27.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-cpuimx27.dtsi
@@ -33,7 +33,7 @@
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
- pcf8563@51 {
+ rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
@@ -90,7 +90,7 @@
&weim {
status = "okay";
- nor: nor@0,0 {
+ nor: flash@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts
index 9c3ec82ec7e5..d78793601306 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts
@@ -16,7 +16,7 @@
display-timings {
native-mode = <&timing0>;
- timing0: 320x240 {
+ timing0: timing0 {
clock-frequency = <6500000>;
hactive = <320>;
vactive = <240>;
@@ -54,22 +54,15 @@
};
};
- regulators {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "simple-bus";
-
- reg_lcd: regulator@0 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_lcdreg>;
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "LCD";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_lcd: regulator-0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcdreg>;
+ regulator-name = "LCD";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-pdk.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-pdk.dts
index 35123b7cb6b3..21d436972aa4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-pdk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-pdk.dts
@@ -14,18 +14,12 @@
reg = <0xa0000000 0x08000000>;
};
- usbphy {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usbphy0: usbphy@0 {
- compatible = "usb-nop-xceiv";
- reg = <0>;
- clocks = <&clks IMX27_CLK_DUMMY>;
- clock-names = "main_clk";
- #phy-cells = <0>;
- };
+
+ usbphy0: usbphy {
+ compatible = "usb-nop-xceiv";
+ clocks = <&clks IMX27_CLK_DUMMY>;
+ clock-names = "main_clk";
+ #phy-cells = <0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-rdk.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-rdk.dts
index 188639738dc3..27c93b9fe049 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-rdk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-rdk.dts
@@ -19,7 +19,7 @@
fsl,pcr = <0xf0c88080>; /* non-standard but required */
display-timings {
native-mode = <&timing0>;
- timing0: 640x480 {
+ timing0: timing0 {
hactive = <640>;
vactive = <480>;
hback-porch = <112>;
@@ -33,19 +33,12 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3v3: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3V3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3v3: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-som.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-som.dtsi
index 303f920201c5..abc9233c5a1b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycard-s-som.dtsi
@@ -34,7 +34,7 @@
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
- at24@52 {
+ eeprom@52 {
compatible = "atmel,24c32";
pagesize = <32>;
reg = <0x52>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-rdk.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-rdk.dts
index 344e77790152..b8048e12e3d9 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-rdk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-rdk.dts
@@ -19,7 +19,7 @@
display-timings {
native-mode = <&timing0>;
- timing0: 240x320 {
+ timing0: timing0 {
clock-frequency = <5500000>;
hactive = <240>;
vactive = <320>;
@@ -37,29 +37,23 @@
};
};
- regulators {
- regulator@2 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_csien>;
- reg = <2>;
- regulator-name = "CSI_EN";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 24 GPIO_ACTIVE_LOW>;
- regulator-always-on;
- };
+ regulator-2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_csien>;
+ regulator-name = "CSI_EN";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 24 GPIO_ACTIVE_LOW>;
+ regulator-always-on;
};
- usbphy {
- usbphy2: usbphy@2 {
- compatible = "usb-nop-xceiv";
- reg = <2>;
- vcc-supply = <&reg_5v0>;
- clocks = <&clks IMX27_CLK_DUMMY>;
- clock-names = "main_clk";
- #phy-cells = <0>;
- };
+ usbphy2: usbphy {
+ compatible = "usb-nop-xceiv";
+ vcc-supply = <&reg_5v0>;
+ clocks = <&clks IMX27_CLK_DUMMY>;
+ clock-names = "main_clk";
+ #phy-cells = <0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-som.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-som.dtsi
index 3d10273177e9..e958d7286ae9 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27-phytec-phycore-som.dtsi
@@ -15,41 +15,27 @@
reg = <0xa0000000 0x08000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3v3: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3V3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
+ reg_3v3: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
- reg_5v0: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "5V0";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- };
+ reg_5v0: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "5V0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
};
- usbphy {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- usbphy0: usbphy@0 {
- compatible = "usb-nop-xceiv";
- reg = <0>;
- vcc-supply = <&sw3_reg>;
- clocks = <&clks IMX27_CLK_DUMMY>;
- clock-names = "main_clk";
- #phy-cells = <0>;
- };
+
+ usbphy0: usbphy {
+ compatible = "usb-nop-xceiv";
+ vcc-supply = <&sw3_reg>;
+ clocks = <&clks IMX27_CLK_DUMMY>;
+ clock-names = "main_clk";
+ #phy-cells = <0>;
};
};
@@ -57,12 +43,12 @@
status = "okay";
/* SSI0 <=> PINS_4 (MC13783 Audio) */
- ssi0 {
+ mux-ssi0 {
fsl,audmux-port = <0>;
fsl,port-config = <0xcb205000>;
};
- pins4 {
+ mux-pins4 {
fsl,audmux-port = <2>;
fsl,port-config = <0x00001000>;
};
@@ -188,13 +174,13 @@
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
- at24@52 {
+ eeprom@52 {
compatible = "atmel,24c32";
pagesize = <32>;
reg = <0x52>;
};
- pcf8563@51 {
+ rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
@@ -322,7 +308,7 @@
&weim {
status = "okay";
- nor: nor@0,0 {
+ nor: flash@0,0 {
compatible = "cfi-flash";
reg = <0 0x00000000 0x02000000>;
bank-width = <2>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx27.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx27.dtsi
index e140307be2e7..ec472695c71e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx27.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx27.dtsi
@@ -81,7 +81,7 @@
interrupt-parent = <&aitc>;
ranges;
- aipi1: aipi@10000000 { /* AIPI1 */
+ aipi1: bus@10000000 { /* AIPI1 */
compatible = "fsl,aipi-bus", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
@@ -453,7 +453,7 @@
};
};
- aipi2: aipi@10020000 { /* AIPI2 */
+ aipi2: bus@10020000 { /* AIPI2 */
compatible = "fsl,aipi-bus", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
@@ -534,7 +534,7 @@
clock-names = "ipg", "ahb";
};
- clks: ccm@10027000{
+ clks: ccm@10027000 {
compatible = "fsl,imx27-ccm";
reg = <0x10027000 0x1000>;
#clock-cells = <1>;
@@ -588,6 +588,9 @@
iram: sram@ffff4c00 {
compatible = "mmio-sram";
reg = <0xffff4c00 0xb400>;
+ ranges = <0 0xffff4c00 0xb400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx31.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx31.dtsi
index 95c05f17a6d5..e1ae7c175f7d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx31.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx31.dtsi
@@ -232,7 +232,7 @@
reg = <0x53f00000 0x100000>;
ranges;
- clks: ccm@53f80000{
+ clks: ccm@53f80000 {
compatible = "fsl,imx31-ccm";
reg = <0x53f80000 0x4000>;
interrupts = <31>, <53>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx50-evk.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx50-evk.dts
index 4ea5c23f181b..3f45c01d9cce 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx50-evk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx50-evk.dts
@@ -23,7 +23,7 @@
cs-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>, <&gpio4 13 GPIO_ACTIVE_LOW>;
status = "okay";
- flash: m25p32@1 {
+ flash: flash@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "m25p32", "jedec,spi-nor";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx50-kobo-aura.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx50-kobo-aura.dts
index 467db6b4ed7f..b1a6a9c58ac3 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx50-kobo-aura.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx50-kobo-aura.dts
@@ -73,7 +73,7 @@
states = <3300000 0>;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- enable-gpio = <&gpio4 12 GPIO_ACTIVE_LOW>;
+ enable-gpios = <&gpio4 12 GPIO_ACTIVE_LOW>;
startup-delay-us = <100000>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx50.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx50.dtsi
index 3d9a9f37f672..c5b25d2f6264 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx50.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx50.dtsi
@@ -335,7 +335,7 @@
#reset-cells = <1>;
};
- clks: ccm@53fd4000{
+ clks: ccm@53fd4000 {
compatible = "fsl,imx50-ccm";
reg = <0x53fd4000 0x4000>;
interrupts = <0 71 0x04 0 72 0x04>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx51-babbage.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx51-babbage.dts
index a1f9c6a72275..16ff543f3fbf 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx51-babbage.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx51-babbage.dts
@@ -173,22 +173,15 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_hub_reset: regulator@0 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbotgreg>;
- reg = <0>;
- regulator-name = "hub_reset";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_hub_reset: regulator-hub-reset {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotgreg>;
+ regulator-name = "hub_reset";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx51-eukrea-mbimxsd51-baseboard.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx51-eukrea-mbimxsd51-baseboard.dts
index b6d931e96a8f..aff380e999c7 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx51-eukrea-mbimxsd51-baseboard.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx51-eukrea-mbimxsd51-baseboard.dts
@@ -45,21 +45,14 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_can: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "CAN_RST";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <20000>;
- enable-active-high;
- };
+ reg_can: regulator-can {
+ compatible = "regulator-fixed";
+ regulator-name = "CAN_RST";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <20000>;
+ enable-active-high;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx51-zii-rdu1.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx51-zii-rdu1.dts
index 5d4b29d76585..7cd17b43b4b2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx51-zii-rdu1.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx51-zii-rdu1.dts
@@ -119,8 +119,8 @@
compatible = "i2c-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_swi2c>;
- gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>, /* sda */
- <&gpio3 4 GPIO_ACTIVE_HIGH>; /* scl */
+ sda-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
i2c-gpio,delay-us = <50>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx51.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx51.dtsi
index ba92a3ea6872..c96d6311dfa7 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx51.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx51.dtsi
@@ -455,7 +455,7 @@
#reset-cells = <1>;
};
- clks: ccm@73fd4000{
+ clks: ccm@73fd4000 {
compatible = "fsl,imx51-ccm";
reg = <0x73fd4000 0x4000>;
interrupts = <0 71 0x04 0 72 0x04>;
@@ -651,7 +651,7 @@
};
sahara: crypto@83ff8000 {
- compatible = "fsl,imx53-sahara", "fsl,imx51-sahara";
+ compatible = "fsl,imx53-sahara";
reg = <0x83ff8000 0x4000>;
interrupts = <19 20>;
clocks = <&clks IMX5_CLK_SAHARA_IPG_GATE>,
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-ard.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-ard.dts
index 23a7492e2929..165e1b00b721 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-ard.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-ard.dts
@@ -43,19 +43,12 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
};
gpio-keys {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-cx9020.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-cx9020.dts
index 055d23a9aee7..0814f5665a59 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-cx9020.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-cx9020.dts
@@ -22,7 +22,7 @@
};
display-0 {
- #address-cells =<1>;
+ #address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx-parallel-display";
interface-pix-fmt = "rgb24";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53.dtsi
index fe5e0d308e99..00b8d7ca41a2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53.dtsi
@@ -15,28 +15,20 @@
<0xb0000000 0x20000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p2v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P2V";
- regulator-min-microvolt = <3200000>;
- regulator-max-microvolt = <3200000>;
- regulator-always-on;
- };
+ reg_3p2v: regulator-3p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P2V";
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-always-on;
+ };
- reg_backlight: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "lcd-supply";
- regulator-min-microvolt = <3200000>;
- regulator-max-microvolt = <3200000>;
- regulator-always-on;
- };
+ reg_backlight: regulator-backlight {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd-supply";
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-always-on;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53evk.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53evk.dts
index 2bd2432d317f..c323b4dbe9f0 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53evk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-m53evk.dts
@@ -65,28 +65,20 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usbh1_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 2 0>;
- };
+ reg_usbh1_vbus: regulator-usbh1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 2 0>;
+ };
- reg_usb_otg_vbus: regulator@4 {
- compatible = "regulator-fixed";
- reg = <4>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 4 0>;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 4 0>;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-mba53.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-mba53.dts
index 09eee0dd44c1..6a37616cef1c 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-mba53.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-mba53.dts
@@ -38,27 +38,19 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_backlight: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "lcd-supply";
- gpio = <&gpio2 5 0>;
- startup-delay-us = <5000>;
- };
+ reg_backlight: regulator-backlight {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd-supply";
+ gpio = <&gpio2 5 0>;
+ startup-delay-us = <5000>;
+ };
- reg_3p2v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P2V";
- regulator-min-microvolt = <3200000>;
- regulator-max-microvolt = <3200000>;
- regulator-always-on;
- };
+ reg_3p2v: regulator-3p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P2V";
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-always-on;
};
sound {
@@ -169,6 +161,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX5_CLK_SSI_EXT1_GATE>;
VDDA-supply = <&reg_3p2v>;
VDDIO-supply = <&reg_3p2v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-qsb-common.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-qsb-common.dtsi
index 50fef8dd3675..d80440446473 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-qsb-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-qsb-common.dtsi
@@ -16,6 +16,13 @@
<0xb0000000 0x20000000>;
};
+ backlight_parallel: backlight-parallel {
+ compatible = "pwm-backlight";
+ pwms = <&pwm2 0 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ };
+
display0: disp0 {
compatible = "fsl,imx-parallel-display";
pinctrl-names = "default";
@@ -80,6 +87,10 @@
panel {
compatible = "sii,43wvf1g";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_display_power>;
+ backlight = <&backlight_parallel>;
+ enable-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>;
port {
panel_in: endpoint {
@@ -88,29 +99,21 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p2v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P2V";
- regulator-min-microvolt = <3200000>;
- regulator-max-microvolt = <3200000>;
- regulator-always-on;
- };
+ reg_3p2v: regulator-3p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P2V";
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-always-on;
+ };
- reg_usb_vbus: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio7 8 0>;
- enable-active-high;
- };
+ reg_usb_vbus: regulator-usb-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio7 8 0>;
+ enable-active-high;
};
sound {
@@ -202,6 +205,12 @@
>;
};
+ pinctrl_display_power: displaypowergrp {
+ fsl,pins = <
+ MX53_PAD_EIM_D24__GPIO3_24 0x1e4
+ >;
+ };
+
pinctrl_esdhc1: esdhc1grp {
fsl,pins = <
MX53_PAD_SD1_DATA0__ESDHC1_DAT0 0x1d5
@@ -292,6 +301,12 @@
>;
};
+ pinctrl_pwm2: pwm2grp {
+ fsl,pins = <
+ MX53_PAD_GPIO_1__PWM2_PWMO 0x5
+ >;
+ };
+
pinctrl_vga_sync: vgasync-grp {
fsl,pins = <
/* VGA_HSYNC, VSYNC with max drive strength */
@@ -367,6 +382,12 @@
status = "okay";
};
+&pwm2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm2>;
+ status = "okay";
+};
+
&sata {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-lvds.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-lvds.dts
new file mode 100644
index 000000000000..b1c1e7c759b3
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-lvds.dts
@@ -0,0 +1,97 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright 2023 Linaro Ltd.
+
+/dts-v1/;
+
+#include <dt-bindings/pwm/pwm.h>
+#include "imx53-sk-imx53-atm0700d4.dtsi"
+
+/ {
+ lvds-decoder {
+ compatible = "ti,sn65lvds94", "lvds-decoder";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lvds_decoder_in: endpoint {
+ remote-endpoint = <&lvds0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ lvds_decoder_out: endpoint {
+ remote-endpoint = <&panel_rgb_in>;
+ };
+ };
+ };
+ };
+};
+
+&iomuxc {
+ pinctrl_lvds0: lvds0grp {
+ /* LVDS pins only have pin mux configuration */
+ fsl,pins = <
+ MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK 0x80000000
+ MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0 0x80000000
+ MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1 0x80000000
+ MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2 0x80000000
+ MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3 0x80000000
+ >;
+ };
+
+ pinctrl_spi_gpio: spigrp {
+ fsl,pins = <
+ MX53_PAD_EIM_A22__GPIO2_16 0x1f4
+ MX53_PAD_EIM_A21__GPIO2_17 0x1f4
+ MX53_PAD_EIM_A16__GPIO2_22 0x1f4
+ MX53_PAD_EIM_A18__GPIO2_20 0x1f4
+ >;
+ };
+};
+
+&ldb {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lvds0>;
+ status = "okay";
+
+ lvds0: lvds-channel@0 {
+ reg = <0>;
+ fsl,data-mapping = "spwg";
+ fsl,data-width = <24>;
+ status = "okay";
+
+ port@2 {
+ reg = <2>;
+
+ lvds0_out: endpoint {
+ remote-endpoint = <&lvds_decoder_in>;
+ };
+ };
+ };
+};
+
+&panel_rgb_in {
+ remote-endpoint = <&lvds_decoder_out>;
+};
+
+&spi_ts {
+ pinctrl-0 = <&pinctrl_spi_gpio>;
+ pinctrl-names = "default";
+
+ sck-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
+ miso-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
+ mosi-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;
+ cs-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
+};
+
+&touchscreen {
+ interrupts-extended = <&gpio3 22 IRQ_TYPE_EDGE_BOTH>;
+ pendown-gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-rgb.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-rgb.dts
new file mode 100644
index 000000000000..2559ada7e401
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4-rgb.dts
@@ -0,0 +1,112 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright 2023 Linaro Ltd.
+
+/dts-v1/;
+
+#include <dt-bindings/pwm/pwm.h>
+#include "imx53-sk-imx53-atm0700d4.dtsi"
+
+/ {
+ display: disp0 {
+ compatible = "fsl,imx-parallel-display";
+ interface-pix-fmt = "rgb24";
+ pinctrl-0 = <&pinctrl_rgb24>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ display0_in: endpoint {
+ remote-endpoint = <&ipu_di0_disp0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ display_out: endpoint {
+ remote-endpoint = <&panel_rgb_in>;
+ };
+ };
+ };
+
+};
+
+&iomuxc {
+ pinctrl_rgb24: rgb24grp {
+ fsl,pins = <
+ MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x5
+ MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x5
+ MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x5
+ MX53_PAD_DI0_PIN3__IPU_DI0_PIN3 0x5
+ MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x5
+ MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x5
+ MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x5
+ MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x5
+ MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x5
+ MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x5
+ MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x5
+ MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x5
+ MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x5
+ MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x5
+ MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x5
+ MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x5
+ MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x5
+ MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x5
+ MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x5
+ MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15 0x5
+ MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16 0x5
+ MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17 0x5
+ MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18 0x5
+ MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19 0x5
+ MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20 0x5
+ MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21 0x5
+ MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22 0x5
+ MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23 0x5
+ >;
+ };
+
+ pinctrl_spi_gpio: spigrp {
+ fsl,pins = <
+ MX53_PAD_SD1_DATA1__GPIO1_17 0x1f4
+ MX53_PAD_GPIO_7__GPIO1_7 0x1f4
+ MX53_PAD_PATA_DATA3__GPIO2_3 0x1f4
+ MX53_PAD_PATA_DATA8__GPIO2_8 0x1f4
+ >;
+ };
+};
+
+&ipu_di0_disp0 {
+ remote-endpoint = <&display0_in>;
+};
+
+&panel {
+ enable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+};
+
+&panel_rgb_in {
+ remote-endpoint = <&display_out>;
+};
+
+&pwm1 {
+ status = "disabled";
+};
+
+&spi_ts {
+ pinctrl-0 = <&pinctrl_spi_gpio>;
+ pinctrl-names = "default";
+
+ sck-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ mosi-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+ miso-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+ cs-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
+};
+
+&touchscreen {
+ interrupts-extended = <&gpio2 6 IRQ_TYPE_EDGE_BOTH>;
+ pendown-gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4.dtsi
new file mode 100644
index 000000000000..e395004e80e6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-sk-imx53-atm0700d4.dtsi
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright 2023 Linaro Ltd.
+
+/dts-v1/;
+
+#include <dt-bindings/pwm/pwm.h>
+#include "imx53-sk-imx53.dts"
+
+/ {
+ panel: panel-rgb {
+ compatible = "powertip,ph800480t013-idf02";
+
+ port {
+ panel_rgb_in: endpoint {
+ };
+ };
+ };
+
+ spi_ts: spi {
+ compatible = "spi-gpio";
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+
+ num-chipselects = <1>;
+
+ touchscreen: touchscreen@0 {
+ reg = <0>;
+ compatible = "ti,ads7843";
+ spi-max-frequency = <300000>;
+
+ ti,vref-mv = /bits/ 16 <3300>;
+ ti,x-plate-ohms = /bits/ 16 <450>;
+ ti,y-plate-ohms = /bits/ 16 <250>;
+ ti,debounce-tol = /bits/ 16 <10>;
+ ti,debounce-rep = /bits/ 16 <0>;
+ touchscreen-size-x = <4096>;
+ touchscreen-size-y = <4096>;
+ touchscreen-swapped-x-y;
+ touchscreen-max-pressure = <100>;
+
+ wakeup-source;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-smd.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-smd.dts
index f8d17967a67e..55435dfdff8a 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-smd.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-smd.dts
@@ -67,10 +67,10 @@
reg = <0>;
};
- flash: m25p32@1 {
+ flash: flash@1 {
#address-cells = <1>;
#size-cells = <1>;
- compatible = "st,m25p32", "st,m25p", "jedec,spi-nor";
+ compatible = "st,m25p32", "jedec,spi-nor";
spi-max-frequency = <20000000>;
reg = <1>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-tqma53.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-tqma53.dtsi
index d930739674a1..294811bfc8d2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-tqma53.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-tqma53.dtsi
@@ -15,19 +15,12 @@
reg = <0x70000000 0x40000000>; /* Up to 1GiB */
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-voipac-dmm-668.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-voipac-dmm-668.dtsi
index 24859d0c09c1..c0622cf7188c 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53-voipac-dmm-668.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53-voipac-dmm-668.dtsi
@@ -15,29 +15,21 @@
<0xb0000000 0x20000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_usb_vbus: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 31 0>; /* PEN */
- enable-active-high;
- };
+ reg_usb_vbus: regulator-usb-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 31 0>; /* PEN */
+ enable-active-high;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx53.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx53.dtsi
index 17dc13719639..07658e477095 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx53.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx53.dtsi
@@ -275,7 +275,7 @@
ecspi1: spi@50010000 {
#address-cells = <1>;
#size-cells = <0>;
- compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi";
+ compatible = "fsl,imx53-ecspi";
reg = <0x50010000 0x4000>;
interrupts = <36>;
clocks = <&clks IMX5_CLK_ECSPI1_IPG_GATE>,
@@ -595,7 +595,7 @@
#reset-cells = <1>;
};
- clks: ccm@53fd4000{
+ clks: ccm@53fd4000 {
compatible = "fsl,imx53-ccm";
reg = <0x53fd4000 0x4000>;
interrupts = <0 71 0x04 0 72 0x04>;
@@ -701,7 +701,7 @@
ecspi2: spi@63fac000 {
#address-cells = <1>;
#size-cells = <0>;
- compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi";
+ compatible = "fsl,imx53-ecspi";
reg = <0x63fac000 0x4000>;
interrupts = <37>;
clocks = <&clks IMX5_CLK_ECSPI2_IPG_GATE>,
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105pv2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105pv2.dts
index 411aa72d344b..63cdf24eb397 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105pv2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105pv2.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B105Pv2
//
@@ -22,7 +22,7 @@
compatible = "ilitek,ili251x";
reg = <0x41>;
pinctrl-names = "default";
- pinctrl-0 =<&pinctrl_q7_gpio0>;
+ pinctrl-0 = <&pinctrl_q7_gpio0>;
interrupt-parent = <&gpio5>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&tca6424a 21 GPIO_ACTIVE_LOW>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105v2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105v2.dts
index d011127c635b..2e75d700efdb 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105v2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b105v2.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B105v2
//
@@ -22,7 +22,7 @@
compatible = "ilitek,ili251x";
reg = <0x41>;
pinctrl-names = "default";
- pinctrl-0 =<&pinctrl_q7_gpio0>;
+ pinctrl-0 = <&pinctrl_q7_gpio0>;
interrupt-parent = <&gpio5>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&tca6424a 21 GPIO_ACTIVE_LOW>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125pv2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125pv2.dts
index ca840fa84052..94625d5d5918 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125pv2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125pv2.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B125Pv2
//
@@ -22,7 +22,7 @@
compatible = "eeti,exc80h60";
reg = <0x2a>;
pinctrl-names = "default";
- pinctrl-0 =<&pinctrl_q7_gpio0>;
+ pinctrl-0 = <&pinctrl_q7_gpio0>;
interrupt-parent = <&gpio5>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tca6424a 21 GPIO_ACTIVE_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125v2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125v2.dts
index 81e5a9cb8900..b3cfa8110ade 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125v2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b125v2.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B125v2
//
@@ -22,7 +22,7 @@
compatible = "eeti,exc80h60";
reg = <0x2a>;
pinctrl-names = "default";
- pinctrl-0 =<&pinctrl_q7_gpio0>;
+ pinctrl-0 = <&pinctrl_q7_gpio0>;
interrupt-parent = <&gpio5>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tca6424a 21 GPIO_ACTIVE_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b155v2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b155v2.dts
index c861937b30f6..7edc788bcb8f 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b155v2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b155v2.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B155v2
//
@@ -22,7 +22,7 @@
compatible = "eeti,exc80h84";
reg = <0x2a>;
pinctrl-names = "default";
- pinctrl-0 =<&pinctrl_q7_gpio0>;
+ pinctrl-0 = <&pinctrl_q7_gpio0>;
interrupt-parent = <&gpio5>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
touchscreen-inverted-x;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5pv2.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5pv2.dtsi
index 37697fac9dea..9f1655540cb9 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5pv2.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5pv2.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B1x5Pv2
// patient monitor series
@@ -257,7 +257,7 @@
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card,widgets = "Speaker", "Ext Spk";
- simple-audio-card,audio-routing = "Ext Spk", "LINE";
+ simple-audio-card,routing = "Ext Spk", "LINE";
simple-audio-card,cpu {
sound-dai = <&ssi1>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5v2.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5v2.dtsi
index f028b6a191df..590dcc0953cc 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5v2.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-b1x5v2.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for General Electric B1x5v2
// patient monitor series
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-emcon-avari.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-emcon-avari.dts
index 407ad8d43c84..77d7600b2675 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-emcon-avari.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-emcon-avari.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (C) 2018 emtrion GmbH
//
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-qmx6.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-qmx6.dtsi
index 05fd8ff4da1e..8a637fdff073 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-qmx6.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-qmx6.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
//
// Device Tree Source for i.MX6DL based congatec QMX6
// System on Module
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-riotboard.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-riotboard.dts
index 0366d1037ef4..114739d10447 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-riotboard.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-riotboard.dts
@@ -172,6 +172,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-apalis-ixora-v1.2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-apalis-ixora-v1.2.dts
index 717decda0ceb..3ac7a4501620 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-apalis-ixora-v1.2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-apalis-ixora-v1.2.dts
@@ -76,6 +76,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enable_can1_power>;
regulator-name = "can1_supply";
+ startup-delay-us = <1000>;
};
reg_can2_supply: regulator-can2-supply {
@@ -85,6 +86,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enable_can2_power>;
regulator-name = "can2_supply";
+ startup-delay-us = <1000>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-arm2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-arm2.dts
index 75586299d9ca..631d6d690959 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-arm2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-arm2.dts
@@ -17,29 +17,21 @@
reg = <0x10000000 0x80000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_usb_otg_vbus: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 0>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 0>;
+ enable-active-high;
};
leds {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b650v3.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b650v3.dts
index fa1a1df37cde..b0d345f5d071 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b650v3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b650v3.dts
@@ -98,8 +98,8 @@
};
&usbphy1 {
- fsl,tx-cal-45-dn-ohms = <55>;
- fsl,tx-cal-45-dp-ohms = <55>;
+ fsl,tx-cal-45-dn-ohms = <54>;
+ fsl,tx-cal-45-dp-ohms = <54>;
fsl,tx-d-cal = <100>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b850v3.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b850v3.dts
index db8c332df6a1..cad112e05475 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b850v3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-b850v3.dts
@@ -227,7 +227,6 @@
#address-cells = <3>;
#size-cells = <2>;
- #interrupt-cells = <1>;
bridge@2,1 {
compatible = "pci10b5,8605";
@@ -235,7 +234,6 @@
#address-cells = <3>;
#size-cells = <2>;
- #interrupt-cells = <1>;
/* Intel Corporation I210 Gigabit Network Connection */
ethernet@3,0 {
@@ -250,7 +248,6 @@
#address-cells = <3>;
#size-cells = <2>;
- #interrupt-cells = <1>;
/* Intel Corporation I210 Gigabit Network Connection */
switch_nic: ethernet@4,0 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bosch-acc.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bosch-acc.dts
index 8263bfef9bf8..02648806c275 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bosch-acc.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bosch-acc.dts
@@ -314,7 +314,6 @@
};
sw3a_reg: sw3a {
- compatible = "regulator-fixed";
regulator-name = "DDR_1V5a";
regulator-boot-on;
regulator-always-on;
@@ -322,7 +321,6 @@
};
sw3b_reg: sw3b {
- compatible = "regulator-fixed";
regulator-name = "DDR_1V5b";
regulator-boot-on;
regulator-always-on;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bx50v3.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bx50v3.dtsi
index ead83091e193..c1ae7c47b442 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bx50v3.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-bx50v3.dtsi
@@ -228,6 +228,7 @@
sgtl5000: codec@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&mclk>;
VDDA-supply = <&reg_1p8v>;
VDDIO-supply = <&reg_3p3v>;
@@ -244,6 +245,7 @@
reg = <0x74>;
gpio-controller;
#gpio-cells = <2>;
+ #interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&gpio2>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
@@ -389,7 +391,6 @@
#address-cells = <3>;
#size-cells = <2>;
- #interrupt-cells = <1>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-cm-fx6.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-cm-fx6.dts
index ffb3b8eeae5d..95b49fc83f7b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-cm-fx6.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-cm-fx6.dts
@@ -263,7 +263,7 @@
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
- compatible = "st,m25p", "jedec,spi-nor";
+ compatible = "jedec,spi-nor";
spi-max-frequency = <20000000>;
reg = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dmo-edmqmx6.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dmo-edmqmx6.dts
index 3815cb660ff7..9f7ac7158c46 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dmo-edmqmx6.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dmo-edmqmx6.dts
@@ -28,40 +28,31 @@
reg = <0x10000000 0x80000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_usb_otg_switch: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "usb_otg_switch";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio7 12 0>;
- regulator-boot-on;
- regulator-always-on;
- };
+ reg_usb_otg_switch: regulator-usb-otg-switch {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_switch";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio7 12 0>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
- reg_usb_host1: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_host1_en";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio3 31 0>;
- enable-active-high;
- };
+ reg_usb_host1: regulator-usb-host1 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_host1_en";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio3 31 0>;
+ enable-active-high;
};
gpio-leds {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dms-ba16.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dms-ba16.dts
index 137db38f0d27..d2d0a82ea178 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dms-ba16.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-dms-ba16.dts
@@ -96,6 +96,7 @@
sgtl5000: codec@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&sys_mclk>;
lrclk-strength = <0x3>;
VDDA-supply = <&reg_1p8v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-emcon-avari.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-emcon-avari.dts
index 0f582a9d4c0e..02813368a820 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-emcon-avari.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-emcon-avari.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (C) 2018 emtrion GmbH
//
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gk802.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gk802.dts
index 2fda68f9d3f6..ce55c9558679 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gk802.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gk802.dts
@@ -19,19 +19,12 @@
reg = <0x10000000 0x40000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
};
gpio-keys {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gw5400-a.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gw5400-a.dts
index 0ba802b891b5..c5c144879fa6 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gw5400-a.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-gw5400-a.dts
@@ -67,47 +67,37 @@
status = "okay";
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_1p0v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "1P0V";
- regulator-min-microvolt = <1000000>;
- regulator-max-microvolt = <1000000>;
- regulator-always-on;
- };
+ reg_1p0v: regulator-1p0v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P0V";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-always-on;
+ };
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_usb_h1_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
- reg_usb_otg_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
sound {
@@ -320,6 +310,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&sw4_reg>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-h100.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-h100.dts
index 3fe4591e21f5..a603562ea49a 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-h100.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-h100.dts
@@ -179,6 +179,7 @@
sgtl5000: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_h100_sgtl5000>;
clocks = <&clks IMX6QDL_CLK_CKO>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-pistachio.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-pistachio.dts
index 109b46a22b5e..46c6b96d8073 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-pistachio.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-pistachio.dts
@@ -196,6 +196,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_1p8v>;
VDDIO-supply = <&reg_1p8v>;
@@ -636,11 +637,11 @@
};
&usbphy1 {
- fsl,tx-d-cal = <0x5>;
+ fsl,tx-d-cal = <79>;
};
&usbphy2 {
- fsl,tx-d-cal = <0x5>;
+ fsl,tx-d-cal = <79>;
};
&usdhc1 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-prti6q.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-prti6q.dts
index d8fa83effd63..3508a2cd928a 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-prti6q.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-prti6q.dts
@@ -359,8 +359,11 @@
keep-power-in-suspend;
status = "okay";
- wifi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ wifi@2 {
compatible = "ti,wl1271";
+ reg = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wifi>;
interrupts-extended = <&gpio1 30 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-skov-reve-mi1010ait-1cp1.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-skov-reve-mi1010ait-1cp1.dts
index a3f247c722b4..0342a79ccd5d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-skov-reve-mi1010ait-1cp1.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-skov-reve-mi1010ait-1cp1.dts
@@ -37,9 +37,9 @@
&clks {
assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
- <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+ <&clks IMX6QDL_CLK_LDB_DI1_SEL>, <&clks IMX6QDL_CLK_ENET_REF_SEL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
- <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
+ <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>, <&clk50m_phy>;
};
&hdmi {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-tbs2910.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-tbs2910.dts
index 2f576e2ce73f..7c298d9aa21e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-tbs2910.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-tbs2910.dts
@@ -141,6 +141,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-var-mx6customboard.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-var-mx6customboard.dts
new file mode 100644
index 000000000000..18a620832a2a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-var-mx6customboard.dts
@@ -0,0 +1,247 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Support for Variscite MX6 Carrier-board
+ *
+ * Copyright 2016 Variscite, Ltd. All Rights Reserved
+ * Copyright 2022 Bootlin
+ */
+
+/dts-v1/;
+
+#include "imx6qdl-var-som.dtsi"
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+ model = "Variscite i.MX6 QUAD/DUAL VAR-SOM-MX6 Custom Board";
+ compatible = "variscite,mx6customboard", "variscite,var-som-imx6q", "fsl,imx6q";
+
+ panel0: lvds-panel0 {
+ compatible = "panel-lvds";
+ backlight = <&backlight_lvds>;
+ width-mm = <152>;
+ height-mm = <91>;
+ label = "etm070001adh6";
+ data-mapping = "jeida-18";
+
+ panel-timing {
+ clock-frequency = <32000000>;
+ hactive = <800>;
+ vactive = <480>;
+ hback-porch = <39>;
+ hfront-porch = <39>;
+ vback-porch = <29>;
+ vfront-porch = <13>;
+ hsync-len = <47>;
+ vsync-len = <2>;
+ };
+
+ port {
+ panel_in_lvds0: endpoint {
+ remote-endpoint = <&lvds0_out>;
+ };
+ };
+ };
+
+ panel1: lvds-panel1 {
+ compatible = "panel-lvds";
+ width-mm = <152>;
+ height-mm = <91>;
+ data-mapping = "jeida-18";
+
+ panel-timing {
+ clock-frequency = <38251000>;
+ hactive = <800>;
+ vactive = <600>;
+ hback-porch = <112>;
+ hfront-porch = <32>;
+ vback-porch = <3>;
+ vfront-porch = <17>;
+ hsync-len = <80>;
+ vsync-len = <4>;
+ };
+
+ port {
+ panel_in_lvds1: endpoint {
+ remote-endpoint = <&lvds1_out>;
+ };
+ };
+ };
+
+ backlight_lvds: backlight-lvds {
+ compatible = "pwm-backlight";
+ pwms = <&pwm2 0 50000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 248>;
+ default-brightness-level = <7>;
+ power-supply = <&reg_3p3v>;
+ };
+};
+
+&i2c3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c3>;
+ status = "okay";
+
+ touchscreen@24 {
+ compatible = "cypress,tt21000";
+ reg = <0x24>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&reg_3p3v>;
+ touchscreen-size-x = <880>;
+ touchscreen-size-y = <1280>;
+ };
+
+ touchscreen@38 {
+ compatible = "edt,edt-ft5306";
+ reg = <0x38>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+ touchscreen-size-x = <1800>;
+ touchscreen-size-y = <1000>;
+ };
+};
+
+&iomuxc {
+ pinctrl_camera: cameragrp {
+ fsl,pins = <
+ MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 0x1b0b0
+ MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19 0x1b0b0
+ MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x1b0b0
+ MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x1b0b0
+ MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC 0x1b0b0
+ MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC 0x1b0b0
+ >;
+ };
+
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x1b0b0
+ MX6QDL_PAD_GPIO_8__FLEXCAN1_RX 0x1b0b0
+ >;
+ };
+
+ pinctrl_ipu1: ipu1grp {
+ fsl,pins = <
+ MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
+ MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x10
+ MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x10
+ MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x10
+ MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x10
+ MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x10
+ MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x10
+ MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x10
+ MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x10
+ MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x10
+ MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x10
+ MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x10
+ MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x10
+ MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x10
+ MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x10
+ MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x10
+ MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x10
+ MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x10
+ MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x10
+ MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x10
+ MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x10
+ MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x10
+ MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x10
+ MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0x10
+ MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0x10
+ MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0x10
+ MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x10
+ MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x10
+ MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x10
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
+ MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
+ MX6QDL_PAD_EIM_D23__UART3_CTS_B 0x1b0b1
+ MX6QDL_PAD_EIM_EB3__UART3_RTS_B 0x1b0b1
+ >;
+ };
+
+ pinctrl_usbotg_var: usbotggrp {
+ fsl,pins = <
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x17059
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071
+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071
+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
+ >;
+ };
+};
+
+&ldb {
+ status = "okay";
+
+ lvds-channel@0 {
+ fsl,data-mapping = "spwg";
+ fsl,data-width = <24>;
+ status = "okay";
+
+ port@4 {
+ reg = <4>;
+
+ lvds0_out: endpoint {
+ remote-endpoint = <&panel_in_lvds0>;
+ };
+ };
+ };
+
+ lvds-channel@1 {
+ fsl,data-mapping = "spwg";
+ fsl,data-width = <24>;
+ status = "okay";
+
+ port@4 {
+ reg = <4>;
+
+ lvds1_out: endpoint {
+ remote-endpoint = <&panel_in_lvds1>;
+ };
+ };
+ };
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&usdhc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc2>;
+ cd-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apalis.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apalis.dtsi
index 4cc965277c52..ea40623d12e5 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apalis.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apalis.dtsi
@@ -12,6 +12,13 @@
model = "Toradex Apalis iMX6Q/D Module";
compatible = "toradex,apalis_imx6q", "fsl,imx6q";
+ aliases {
+ mmc0 = &usdhc3; /* eMMC */
+ mmc1 = &usdhc1; /* MMC1 slot */
+ mmc2 = &usdhc2; /* SD1 slot */
+ /delete-property/ mmc3;
+ };
+
/* Will be filled by the bootloader */
memory@10000000 {
device_type = "memory";
@@ -166,7 +173,7 @@
reg_usb_host_vbus: regulator-usb-host-vbus {
compatible = "regulator-fixed";
enable-active-high;
- gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_regulator_usbh_pwr>;
regulator-max-microvolt = <5000000>;
@@ -619,7 +626,6 @@
blocks = <0x5>;
id = <0>;
interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
- interrupt-controller;
interrupt-parent = <&gpio4>;
irq-trigger = <0x1>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apf6dev.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apf6dev.dtsi
index 2577eb4f535a..338d292553ad 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apf6dev.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-apf6dev.dtsi
@@ -181,6 +181,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-aristainetos2.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-aristainetos2.dtsi
index 6b64b2fc3995..db1bc511e71f 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-aristainetos2.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-aristainetos2.dtsi
@@ -301,12 +301,12 @@
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
- eeprom@50{
+ eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
};
- eeprom@57{
+ eeprom@57 {
compatible = "atmel,24c64";
reg = <0x57>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-colibri.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-colibri.dtsi
index 570995707504..d3a7a6eeb8e0 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-colibri.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-colibri.dtsi
@@ -12,6 +12,13 @@
model = "Toradex Colibri iMX6DL/S Module";
compatible = "toradex,colibri_imx6dl", "fsl,imx6dl";
+ aliases {
+ mmc0 = &usdhc3; /* eMMC */
+ mmc1 = &usdhc1; /* MMC/SD Slot */
+ /delete-property/ mmc2;
+ /delete-property/ mmc3;
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
brightness-levels = <0 45 63 88 119 158 203 255>;
@@ -26,7 +33,7 @@
extcon_usbc_det: usbc-det {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
+ id-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbc_det>;
};
@@ -543,7 +550,6 @@
blocks = <0x5>;
interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
interrupt-parent = <&gpio6>;
- interrupt-controller;
id = <0>;
irq-trigger = <0x1>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-dfi-fs700-m60.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-dfi-fs700-m60.dtsi
index 2c1d6f28e695..0a6c3a092b34 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-dfi-fs700-m60.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-dfi-fs700-m60.dtsi
@@ -2,26 +2,18 @@
#include <dt-bindings/gpio/gpio.h>
/ {
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- dummy_reg: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "dummy-supply";
- };
+ dummy_reg: regulator-dummy {
+ compatible = "regulator-fixed";
+ regulator-name = "dummy-supply";
+ };
- reg_usb_otg_vbus: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 0>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 0>;
+ enable-active-high;
};
chosen {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon-avari.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon-avari.dtsi
index c4e146f3341b..5587069b6052 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon-avari.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon-avari.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (C) 2018 emtrion GmbH
//
@@ -54,7 +54,7 @@
clk_codec: clock-codec {
compatible = "fixed-clock";
#clock-cells = <0>;
- clock-frequency = <12000000>;
+ clock-frequency = <12000000>;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon.dtsi
index ee2dd75cead6..42b2ba23aefc 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-emcon.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (C) 2018 emtrion GmbH
//
@@ -225,7 +225,6 @@
pinctrl-0 = <&pinctrl_pmic>;
interrupt-parent = <&gpio2>;
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
- interrupt-controller;
onkey {
compatible = "dlg,da9063-onkey";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw52xx.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw52xx.dtsi
index 47d9a8d08197..535679c27d6f 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw52xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw52xx.dtsi
@@ -455,6 +455,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_1p8v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw53xx.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw53xx.dtsi
index fb1d29abe099..3e1c572af582 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw53xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw53xx.dtsi
@@ -452,6 +452,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_1p8v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw54xx.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw54xx.dtsi
index a642be45ffe2..0ffa0357a6fa 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw54xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw54xx.dtsi
@@ -114,57 +114,47 @@
status = "okay";
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_1p0v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "1P0V";
- regulator-min-microvolt = <1000000>;
- regulator-max-microvolt = <1000000>;
- regulator-always-on;
- };
+ reg_1p0v: regulator-1p0v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P0V";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-always-on;
+ };
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_can1_stby: regulator-can1-stby {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_reg_can1>;
- regulator-name = "can1_stby";
- gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
+ reg_can1_stby: regulator-can1-stby {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_can1>;
+ regulator-name = "can1_stby";
+ gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
- reg_usb_h1_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
- reg_usb_otg_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
sound-analog {
@@ -509,6 +499,7 @@
sgtl5000: audio-codec@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&sw4_reg>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5904.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5904.dtsi
index 9594bc5745ed..1e723807ab4c 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5904.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5904.dtsi
@@ -52,6 +52,11 @@
/ {
/* these are used by bootloader for disabling nodes */
aliases {
+ ethernet0 = &fec;
+ ethernet1 = &lan1;
+ ethernet2 = &lan2;
+ ethernet3 = &lan3;
+ ethernet4 = &lan4;
led0 = &led0;
led1 = &led1;
led2 = &led2;
@@ -212,28 +217,61 @@
compatible = "marvell,mv88e6085";
reg = <0>;
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sw_phy0: ethernet-phy@0 {
+ reg = <0x0>;
+ };
+
+ sw_phy1: ethernet-phy@1 {
+ reg = <0x1>;
+ };
+
+ sw_phy2: ethernet-phy@2 {
+ reg = <0x2>;
+ };
+
+ sw_phy3: ethernet-phy@3 {
+ reg = <0x3>;
+ };
+ };
+
ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ lan4: port@0 {
reg = <0>;
label = "lan4";
+ phy-handle = <&sw_phy0>;
+ phy-mode = "internal";
+ local-mac-address = [00 00 00 00 00 00];
};
- port@1 {
+ lan3: port@1 {
reg = <1>;
label = "lan3";
+ phy-handle = <&sw_phy1>;
+ phy-mode = "internal";
+ local-mac-address = [00 00 00 00 00 00];
};
- port@2 {
+ lan2: port@2 {
reg = <2>;
label = "lan2";
+ phy-handle = <&sw_phy2>;
+ phy-mode = "internal";
+ local-mac-address = [00 00 00 00 00 00];
};
- port@3 {
+ lan1: port@3 {
reg = <3>;
label = "lan1";
+ phy-handle = <&sw_phy3>;
+ phy-mode = "internal";
+ local-mac-address = [00 00 00 00 00 00];
};
port@5 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5910.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5910.dtsi
index 218d6e667ed2..424dc7fcd533 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5910.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5910.dtsi
@@ -326,7 +326,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio7>;
interrupts = <13 0>;
- interrupt-names = "INT1";
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5912.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5912.dtsi
index de5983cf7810..49ea25c71967 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5912.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-gw5912.dtsi
@@ -307,7 +307,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio7>;
interrupts = <13 0>;
- interrupt-names = "INT1";
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6.dtsi
index 7d032d1f3b47..4d2abcd44eff 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6.dtsi
@@ -36,21 +36,21 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiobuttons>;
- button1 {
+ button-1 {
label = "s6";
linux,code = <KEY_F6>;
gpios = <&gpio7 13 GPIO_ACTIVE_LOW>;
wakeup-source;
};
- button2 {
+ button-2 {
label = "s7";
linux,code = <KEY_F7>;
gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
wakeup-source;
};
- button3 {
+ button-3 {
label = "s8";
linux,code = <KEY_F8>;
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
@@ -500,21 +500,21 @@
pinctrl_pwm1: pwm1grp {
fsl,pins = <
- /* 100 k PD, DSE 120 OHM, SPPEED LO */
+ /* 100 k PD, DSE 120 OHM, SPEED LO */
MX6QDL_PAD_GPIO_9__PWM1_OUT 0x00003050
>;
};
pinctrl_pwm3: pwm3grp {
fsl,pins = <
- /* 100 k PD, DSE 120 OHM, SPPEED LO */
+ /* 100 k PD, DSE 120 OHM, SPEED LO */
MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x00003050
>;
};
pinctrl_pwm4: pwm4grp {
fsl,pins = <
- /* 100 k PD, DSE 120 OHM, SPPEED LO */
+ /* 100 k PD, DSE 120 OHM, SPEED LO */
MX6QDL_PAD_SD4_DAT2__PWM4_OUT 0x00003050
>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6a.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6a.dtsi
index 27fec340c380..238f3af42822 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6a.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6a.dtsi
@@ -15,6 +15,7 @@
lm75: temperature-sensor@49 {
compatible = "national,lm75";
reg = <0x49>;
+ vs-supply = <&reg_mba6_3p3v>;
};
m24c64_57: eeprom@57 {
@@ -23,6 +24,7 @@
pagesize = <32>;
#address-cells = <1>;
#size-cells = <1>;
+ vcc-supply = <&reg_mba6_3p3v>;
mba_mac_address: mac-address@20 {
reg = <0x20 0x6>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6b.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6b.dtsi
index 0a9f076eeb36..a587bc88f76f 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6b.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-mba6b.dtsi
@@ -25,6 +25,7 @@
lm75: temperature-sensor@49 {
compatible = "national,lm75";
reg = <0x49>;
+ vs-supply = <&reg_mba6_3p3v>;
};
m24c64_57: eeprom@57 {
@@ -33,6 +34,7 @@
pagesize = <32>;
#address-cells = <1>;
#size-cells = <1>;
+ vcc-supply = <&reg_mba6_3p3v>;
mba_mac_address: mac-address@20 {
reg = <0x20 0x6>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nit6xlite.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nit6xlite.dtsi
index 6d4eab1942b9..f2542d725ce7 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nit6xlite.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nit6xlite.dtsi
@@ -15,51 +15,41 @@
reg = <0x10000000 0x20000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
+ reg_2p5v: regulator-2p5v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ };
- reg_2p5v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- regulator-always-on;
- };
-
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
-
- reg_usb_otg_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-
- reg_wlan_vmmc: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_wlan_vmmc>;
- regulator-name = "reg_wlan_vmmc";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- gpio = <&gpio6 7 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <70000>;
- enable-active-high;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_wlan_vmmc: regulator-wlan-vmmc {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wlan_vmmc>;
+ regulator-name = "reg_wlan_vmmc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ enable-active-high;
};
gpio-keys {
@@ -236,6 +226,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_max.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_max.dtsi
index 81a9a302aec1..32a110a35b02 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_max.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_max.dtsi
@@ -15,83 +15,70 @@
reg = <0x10000000 0xF0000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
- reg_1p8v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "1P8V";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- };
+ reg_2p5v: regulator-2p5v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ };
- reg_2p5v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_3p3v: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_usb_otg_vbus: regulator-usb-otg {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- reg_usb_otg_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbh1>;
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- reg_usb_h1_vbus: regulator@4 {
- compatible = "regulator-fixed";
- reg = <4>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbh1>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-
- reg_wlan_vmmc: regulator@5 {
- compatible = "regulator-fixed";
- reg = <5>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_wlan_vmmc>;
- regulator-name = "reg_wlan_vmmc";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio6 15 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <70000>;
- enable-active-high;
- };
-
- reg_can_xcvr: regulator@6 {
- compatible = "regulator-fixed";
- reg = <6>;
- regulator-name = "CAN XCVR";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_can_xcvr>;
- gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
- };
+ reg_wlan_vmmc: regulator-wlan-vmmc {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wlan_vmmc>;
+ regulator-name = "reg_wlan_vmmc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
+
+ reg_can_xcvr: regulator-can-xcvr {
+ compatible = "regulator-fixed";
+ regulator-name = "CAN XCVR";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can_xcvr>;
+ gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
};
gpio-keys {
@@ -378,6 +365,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_som2.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_som2.dtsi
index 000e9dc97b1a..414196b75991 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_som2.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6_som2.dtsi
@@ -286,6 +286,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6x.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6x.dtsi
index 731759bdd7f5..f278b14911ce 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6x.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-nitrogen6x.dtsi
@@ -17,74 +17,62 @@
reg = <0x10000000 0x40000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
+ reg_2p5v: regulator-2p5v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ };
- reg_2p5v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
-
- reg_usb_otg_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 0>;
- enable-active-high;
- };
-
- reg_can_xcvr: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "CAN XCVR";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_can_xcvr>;
- gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
- };
-
- reg_wlan_vmmc: regulator@4 {
- compatible = "regulator-fixed";
- reg = <4>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_wlan_vmmc>;
- regulator-name = "reg_wlan_vmmc";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio6 15 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <70000>;
- enable-active-high;
- };
-
- reg_usb_h1_vbus: regulator@5 {
- compatible = "regulator-fixed";
- reg = <5>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbh1>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 0>;
+ enable-active-high;
+ };
+
+ reg_can_xcvr: regulator-can-xcvr {
+ compatible = "regulator-fixed";
+ regulator-name = "CAN XCVR";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can_xcvr>;
+ gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_wlan_vmmc: regulator-wlan-vmmc {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wlan_vmmc>;
+ regulator-name = "reg_wlan_vmmc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio6 15 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
+
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbh1>;
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
gpio-keys {
@@ -309,6 +297,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pbab01.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pbab01.dtsi
index a41e47c06ef4..e40041871b28 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pbab01.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pbab01.dtsi
@@ -10,22 +10,18 @@
stdout-path = &uart4;
};
- regulators {
- sound_1v8: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "i2s-audio-1v8";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
+ sound_1v8: regulator-sound-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "i2s-audio-1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
- sound_3v3: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "i2s-audio-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
+ sound_3v3: regulator-sound-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "i2s-audio-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
};
tlv320_mclk: oscillator {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pfla02.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pfla02.dtsi
index 80adb2a02cc9..c0c47adc5866 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pfla02.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-pfla02.dtsi
@@ -14,32 +14,24 @@
reg = <0x10000000 0x80000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb_otg_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio4 15 0>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio4 15 0>;
+ enable-active-high;
+ };
- reg_usb_h1_vbus: regulator@1 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbh1_vbus>;
- reg = <1>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 0 0>;
- enable-active-high;
- };
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbh1_vbus>;
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 0 0>;
+ enable-active-high;
};
gpio_leds: leds {
@@ -132,6 +124,7 @@
reg = <0x58>;
interrupt-parent = <&gpio2>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>; /* active-low GPIO2_9 */
+ #interrupt-cells = <2>;
interrupt-controller;
regulators {
@@ -464,3 +457,11 @@
vmmc-supply = <&vdd_sd0_reg>;
status = "disabled";
};
+
+&wdog1 {
+ /*
+ * Rely on PMIC reboot handler. Internal i.MX6 watchdog, that is also
+ * used for reboot, does not reset all external PMIC voltages on reset.
+ */
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-phycore-som.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-phycore-som.dtsi
index 28a805384668..85e278eb2016 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-phycore-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-phytec-phycore-som.dtsi
@@ -100,6 +100,7 @@
interrupt-parent = <&gpio1>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
@@ -309,3 +310,11 @@
>;
};
};
+
+&wdog1 {
+ /*
+ * Rely on PMIC reboot handler. Internal i.MX6 watchdog, that is also
+ * used for reboot, does not reset all external PMIC voltages on reset.
+ */
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-rex.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-rex.dtsi
index f804ff95a6ad..eba698d04243 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-rex.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-rex.dtsi
@@ -13,41 +13,32 @@
stdout-path = &uart1;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_usbh1_vbus: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- pinctrl-names = "default";
- regulator-name = "usbh1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usbh1_vbus: regulator-usbh1-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ regulator-name = "usbh1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- reg_usb_otg_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- pinctrl-names = "default";
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-otg-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
leds {
@@ -120,6 +111,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-sabrelite.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-sabrelite.dtsi
index 12573e1f917c..84c8a9531e18 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-sabrelite.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-sabrelite.dtsi
@@ -24,88 +24,74 @@
reg = <0x10000000 0x40000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
+ reg_2p5v: regulator-2p5v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ };
- reg_2p5v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
-
- reg_usb_otg_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 0>;
- enable-active-high;
- };
-
- reg_can_xcvr: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "CAN XCVR";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_can_xcvr>;
- gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
- };
-
- reg_1p5v: regulator@4 {
- compatible = "regulator-fixed";
- reg = <4>;
- regulator-name = "1P5V";
- regulator-min-microvolt = <1500000>;
- regulator-max-microvolt = <1500000>;
- regulator-always-on;
- };
-
- reg_1p8v: regulator@5 {
- compatible = "regulator-fixed";
- reg = <5>;
- regulator-name = "1P8V";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- };
-
- reg_2p8v: regulator@6 {
- compatible = "regulator-fixed";
- reg = <6>;
- regulator-name = "2P8V";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-always-on;
- };
-
- reg_usb_h1_vbus: regulator@7 {
- compatible = "regulator-fixed";
- reg = <7>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbh1>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 0>;
+ enable-active-high;
+ };
+
+ reg_can_xcvr: regulator-can-xcvr {
+ compatible = "regulator-fixed";
+ regulator-name = "CAN XCVR";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can_xcvr>;
+ gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_1p5v: regulator-1p5v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P5V";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-always-on;
+ };
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ reg_2p8v: regulator-2p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ };
+
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbh1>;
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
mipi_xclk: mipi_xclk {
@@ -334,6 +320,7 @@
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-skov-cpu-revc.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-skov-cpu-revc.dtsi
index b81799d7076a..596b3bb3ddd1 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-skov-cpu-revc.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-skov-cpu-revc.dtsi
@@ -25,7 +25,7 @@
compatible = "ti,tsc2046e-adc";
reg = <0>;
pinctrl-0 = <&pinctrl_touch>;
- pinctrl-names ="default";
+ pinctrl-names = "default";
spi-max-frequency = <1000000>;
interrupts-extended = <&gpio3 19 IRQ_TYPE_LEVEL_LOW>;
#io-channel-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6a.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6a.dtsi
index aff46f3040c1..68525f0205d3 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6a.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6a.dtsi
@@ -30,6 +30,7 @@
sensor@48 {
compatible = "national,lm75";
reg = <0x48>;
+ vs-supply = <&reg_3p3v>;
};
eeprom@50 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6b.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6b.dtsi
index a3f6543c3aaa..aeba0a273600 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6b.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-tqma6b.dtsi
@@ -23,6 +23,7 @@
sensor@48 {
compatible = "national,lm75";
reg = <0x48>;
+ vs-supply = <&reg_3p3v>;
};
eeprom@50 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-ts7970.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-ts7970.dtsi
index 1e0a041e9f60..e2db875b61c4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-ts7970.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-ts7970.dtsi
@@ -235,6 +235,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-udoo.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-udoo.dtsi
index 93a8123da27d..647ba5e623dd 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-udoo.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-udoo.dtsi
@@ -59,29 +59,21 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb_h1_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "usb_h1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */
- gpio = <&gpio7 12 0>;
- };
+ reg_usb_h1_vbus: regulator-usb-h1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */
+ gpio = <&gpio7 12 0>;
+ };
- reg_panel: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "lcd_panel";
- enable-active-high;
- gpio = <&gpio1 2 0>;
- };
+ reg_panel: regulator-panel {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_panel";
+ enable-active-high;
+ gpio = <&gpio1 2 0>;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-var-som.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-var-som.dtsi
new file mode 100644
index 000000000000..a1ea33c4eeb7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-var-som.dtsi
@@ -0,0 +1,569 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Support for Variscite VAR-SOM-MX6 Module
+ *
+ * Copyright 2011 Linaro Ltd.
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014-2016 Variscite, Ltd.
+ * Author: Donio Ron <ron.d@variscite.com>
+ * Copyright 2022 Bootlin
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include <dt-bindings/clock/imx6qdl-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/sound/fsl-imx-audmux.h>
+
+/ {
+ model = "Variscite VAR-SOM-MX6 module";
+ compatible = "variscite,var-som-imx6q", "fsl,imx6q";
+
+ chosen {
+ stdout-path = &uart1;
+ };
+
+ memory@10000000 {
+ device_type = "memory";
+ reg = <0x10000000 0x40000000>;
+ };
+
+ reg_usb_otg_vbus: regulator-usb-otg-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_usb_h1_vbus: regulator-usb-h1-vbud {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_h1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ reg_wl18xx_vmmc: regulator-wl18xx {
+ compatible = "regulator-fixed";
+ regulator-name = "vwl1807";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ startup-delay-us = <70000>;
+ };
+
+ sound: sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "var-som-audio";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&sound_codec>;
+ simple-audio-card,frame-master = <&sound_codec>;
+ simple-audio-card,widgets = "Headphone", "Headphone Jack",
+ "Line", "Line In", "Microphone", "Mic Jack";
+ simple-audio-card,routing = "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT",
+ "LINE1L", "Line In",
+ "LINE1R", "Line In";
+
+ sound_cpu: simple-audio-card,cpu {
+ sound-dai = <&ssi2>;
+ };
+
+ sound_codec: simple-audio-card,codec {
+ sound-dai = <&tlv320aic3106>;
+ clocks = <&clks IMX6QDL_CLK_CKO>;
+ };
+ };
+
+ rfkill {
+ compatible = "rfkill-gpio";
+ name = "rfkill";
+ radio-type = "bluetooth";
+ shutdown-gpios = <&gpio6 18 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&audmux {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_audmux>;
+ status = "okay";
+
+ mux-ssi2 {
+ fsl,audmux-port = <1>;
+ fsl,port-config = <
+ (IMX_AUDMUX_V2_PTCR_SYN |
+ IMX_AUDMUX_V2_PTCR_TFSDIR |
+ IMX_AUDMUX_V2_PTCR_TFSEL(2) |
+ IMX_AUDMUX_V2_PTCR_TCLKDIR |
+ IMX_AUDMUX_V2_PTCR_TCSEL(2))
+ IMX_AUDMUX_V2_PDCR_RXDSEL(2)
+ >;
+ };
+
+ mux-aud3 {
+ fsl,audmux-port = <2>;
+ fsl,port-config = <
+ IMX_AUDMUX_V2_PTCR_SYN
+ IMX_AUDMUX_V2_PDCR_RXDSEL(1)
+ >;
+ };
+};
+
+&ecspi3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ecspi3>;
+ cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&fec {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_enet>;
+ phy-mode = "rgmii";
+ phy-handle = <&rgmii_phy>;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rgmii_phy: ethernet-phy@7 {
+ reg = <7>;
+ reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10000>;
+ };
+ };
+};
+
+&gpmi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpmi_nand>;
+ status = "okay";
+};
+
+&i2c2 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ pmic@8 {
+ compatible = "fsl,pfuze100";
+ reg = <0x08>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pmic>;
+
+ regulators {
+ sw1a_reg: sw1ab {
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1875000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <6250>;
+ };
+
+ sw1c_reg: sw1c {
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1875000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <6250>;
+ };
+
+ sw2_reg: sw2 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ sw3a_reg: sw3a {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3950000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ sw3b_reg: sw3b {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3950000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ sw4_reg: sw4 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3950000>;
+ };
+
+ snvs_reg: vsnvs {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vref_reg: vrefddr {
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vgen1_reg: vgen1 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1550000>;
+ };
+
+ vgen2_reg: vgen2 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1550000>;
+ };
+
+ vgen3_reg: vgen3 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vgen4_reg: vgen4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vgen5_reg: vgen5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vgen6_reg: vgen6 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+ };
+
+ tlv320aic3106: audio-codec@1b {
+ compatible = "ti,tlv320aic3106";
+ reg = <0x1b>;
+ #sound-dai-cells = <0>;
+ DRVDD-supply = <&reg_3p3v>;
+ AVDD-supply = <&reg_3p3v>;
+ IOVDD-supply = <&reg_3p3v>;
+ DVDD-supply = <&reg_1p8v>;
+ ai3x-ocmv = <0>;
+ reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>;
+ ai3x-gpio-func = <
+ 0 /* AIC3X_GPIO1_FUNC_DISABLED */
+ 5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */
+ >;
+ };
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hog>;
+
+ pinctrl_audmux: audmuxgrp {
+ fsl,pins = <
+ MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
+ MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
+ MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0
+ MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
+ /* Audio Clock */
+ MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0
+ >;
+ };
+
+ pinctrl_bt: btgrp {
+ fsl,pins = <
+ /* Bluetooth/wifi enable */
+ MX6QDL_PAD_SD3_DAT6__GPIO6_IO18 0x1b0b1
+ /* Wifi Slow Clock */
+ MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT 0x000b0
+ >;
+ };
+
+ pinctrl_ecspi3: ecspi3grp {
+ fsl,pins = <
+ MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO 0x100b1
+ MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI 0x100b1
+ MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1
+ >;
+ };
+
+ pinctrl_enet: enetgrp {
+ fsl,pins = <
+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
+ >;
+ };
+
+ pinctrl_enet_irq: enetirqgrp {
+ fsl,pins = <
+ MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1
+ >;
+ };
+
+ pinctrl_gpmi_nand: gpminandgrp {
+ fsl,pins = <
+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb0b1
+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
+ >;
+ };
+
+ pinctrl_hog: hoggrp {
+ fsl,pins = <
+ /* CTW6120 IRQ */
+ MX6QDL_PAD_EIM_DA7__GPIO3_IO07 0xb0b1
+ /* SDMMC2 CD/WP */
+ MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x1b0b0
+ MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x1b0b0
+ >;
+ };
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
+ MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
+ >;
+ };
+
+ pinctrl_i2c3: i2c3grp {
+ fsl,pins = <
+ MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1
+ MX6QDL_PAD_GPIO_16__I2C3_SDA 0x4001b8b1
+ >;
+ };
+
+ pinctrl_pmic: pmicgrp {
+ fsl,pins = <
+ /* PMIC INT */
+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0
+ >;
+ };
+
+ pinctrl_pwm2: pwm2grp {
+ fsl,pins = <
+ MX6QDL_PAD_DISP0_DAT9__PWM2_OUT 0x1b0b1
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
+ MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX6QDL_PAD_SD3_DAT4__UART2_RX_DATA 0x1b0b1
+ MX6QDL_PAD_SD3_DAT5__UART2_TX_DATA 0x1b0b1
+ MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1
+ MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1
+ >;
+ };
+
+ pinctrl_usdhc3: usdhc3grp {
+ fsl,pins = <
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17069
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10069
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17069
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17069
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17069
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17069
+ /* WL_EN */
+ MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x13059
+ /* WL_IRQ */
+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x13059
+ >;
+ };
+
+ pinctrl_usdhc3_100mhz: usdhc3grp100mhzgrp {
+ fsl,pins = <
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9
+ /* WL_EN */
+ MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x130B9
+ /* WL_IRQ */
+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x130B9
+ >;
+ };
+
+ pinctrl_usdhc3_200mhz: usdhc3grp200mhzgrp {
+ fsl,pins = <
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9
+ /* WL_EN */
+ MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x130F9
+ /* WL_IRQ */
+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x130F9
+ >;
+ };
+};
+
+&pwm2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm2>;
+ status = "okay";
+};
+
+&reg_arm {
+ vin-supply = <&sw1a_reg>;
+};
+
+&reg_pu {
+ vin-supply = <&sw1c_reg>;
+};
+
+&reg_soc {
+ vin-supply = <&sw1c_reg>;
+};
+
+&reg_vdd1p1 {
+ vin-supply = <&vgen5_reg>;
+};
+
+&reg_vdd2p5 {
+ vin-supply = <&vgen5_reg>;
+};
+
+&snvs_poweroff {
+ status = "okay";
+};
+
+&ssi2 {
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2 &pinctrl_bt>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&usbh1 {
+ vbus-supply = <&reg_usb_h1_vbus>;
+ status = "okay";
+};
+
+&usbotg {
+ vbus-supply = <&reg_usb_otg_vbus>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotg_var>;
+ disable-over-current;
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usbphy1 {
+ fsl,tx-d-cal = <0x5>;
+};
+
+&usbphy2 {
+ fsl,tx-d-cal = <0x5>;
+};
+
+&usdhc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc1>;
+ non-removable;
+ keep-power-in-suspend;
+ status = "okay";
+};
+
+&usdhc3 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc3>;
+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+ bus-width = <4>;
+ vmmc-supply = <&reg_wl18xx_vmmc>;
+ non-removable;
+ wakeup-source;
+ keep-power-in-suspend;
+ cap-power-off-card;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ wifi: wifi@2 {
+ compatible = "ti,wl1835";
+ reg = <2>;
+ interrupt-parent = <&gpio6>;
+ interrupts = <17 IRQ_TYPE_EDGE_RISING>;
+ ref-clock-frequency = <38400000>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-wandboard.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-wandboard.dtsi
index e4f63423d8ee..38abb6b50f6c 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-wandboard.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl-wandboard.dtsi
@@ -119,6 +119,7 @@
pinctrl-0 = <&pinctrl_mclk>;
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl.dtsi
index bda182edc589..81142c523fa8 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6qdl.dtsi
@@ -475,7 +475,7 @@
<&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
dma-names = "rxa", "rxb", "rxc",
"txa", "txb", "txc";
- fsl,asrc-rate = <48000>;
+ fsl,asrc-rate = <48000>;
fsl,asrc-width = <16>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx-nitrogen6sx.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx-nitrogen6sx.dts
index a2c79bcf9a11..cd9cbc9ccc9e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx-nitrogen6sx.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx-nitrogen6sx.dts
@@ -72,7 +72,6 @@
pinctrl-0 = <&pinctrl_reg_wlan>;
compatible = "regulator-fixed";
clocks = <&clks IMX6SX_CLK_CKO>;
- clock-names = "slow";
regulator-name = "wlan-en";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -196,6 +195,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sgtl5000>;
reg = <0x0a>;
+ #sound-dai-cells = <0>;
clocks = <&clks IMX6SX_CLK_CKO2>;
VDDA-supply = <&reg_1p8v>;
VDDIO-supply = <&reg_1p8v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx.dtsi
index a05069d49cb8..df3a375f0a3e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6sx.dtsi
@@ -221,7 +221,7 @@
clocks = <&clks IMX6SX_CLK_APBH_DMA>;
};
- gpmi: nand-controller@1806000{
+ gpmi: nand-controller@1806000 {
compatible = "fsl,imx6sx-gpmi-nand";
#address-cells = <1>;
#size-cells = <1>;
@@ -418,7 +418,7 @@
<&sdma 21 23 1>, <&sdma 22 23 1>;
dma-names = "rxa", "rxb", "rxc",
"txa", "txb", "txc";
- fsl,asrc-rate = <48000>;
+ fsl,asrc-rate = <48000>;
fsl,asrc-width = <16>;
status = "okay";
};
@@ -1010,7 +1010,7 @@
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
fsl,tuning-start-tap = <20>;
- fsl,tuning-step= <2>;
+ fsl,tuning-step = <2>;
status = "disabled";
};
@@ -1024,7 +1024,7 @@
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
fsl,tuning-start-tap = <20>;
- fsl,tuning-step= <2>;
+ fsl,tuning-step = <2>;
status = "disabled";
};
@@ -1038,7 +1038,7 @@
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
fsl,tuning-start-tap = <20>;
- fsl,tuning-step= <2>;
+ fsl,tuning-step = <2>;
status = "disabled";
};
@@ -1311,6 +1311,10 @@
<&clks IMX6SX_CLK_LCDIF_APB>,
<&clks IMX6SX_CLK_DISPLAY_AXI>;
clock-names = "pix", "axi", "disp_axi";
+ assigned-clocks = <&clks IMX6SX_CLK_LCDIF1_PRE_SEL>,
+ <&clks IMX6SX_CLK_LCDIF1_SEL>;
+ assigned-clock-parents = <&clks IMX6SX_CLK_PLL5_VIDEO_DIV>,
+ <&clks IMX6SX_CLK_LCDIF1_PODF>;
power-domains = <&pd_disp>;
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-14x14-evk.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-14x14-evk.dtsi
index 155515fe13fa..2ac40d69425b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-14x14-evk.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-14x14-evk.dtsi
@@ -442,14 +442,14 @@
>;
};
- pinctrl_flexcan1: flexcan1grp{
+ pinctrl_flexcan1: flexcan1grp {
fsl,pins = <
MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX 0x1b020
MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX 0x1b020
>;
};
- pinctrl_flexcan2: flexcan2grp{
+ pinctrl_flexcan2: flexcan2grp {
fsl,pins = <
MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX 0x1b020
MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX 0x1b020
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcexpress.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcexpress.dts
index 3792679c0c90..ad7f63ca521a 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcexpress.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcexpress.dts
@@ -145,7 +145,7 @@
>;
};
- pinctrl_flexcan1: flexcan1grp{
+ pinctrl_flexcan1: flexcan1grp {
fsl,pins = <
MX6UL_PAD_LCD_DATA08__FLEXCAN1_TX 0x1b020
MX6UL_PAD_LCD_DATA09__FLEXCAN1_RX 0x1b020
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcpro.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcpro.dts
index 3ec042bfccba..1762bc47e18d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcpro.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsbcpro.dts
@@ -291,20 +291,20 @@
>;
};
- pinctrl_flexcan1: flexcan1grp{
+ pinctrl_flexcan1: flexcan1grp {
fsl,pins = <
MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX 0x1b020
MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX 0x1b020
>;
};
- pinctrl_flexcan2: flexcan2grp{
+ pinctrl_flexcan2: flexcan2grp {
fsl,pins = <
MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX 0x1b020
MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX 0x1b020
>;
};
- pinctrl_goodix_touch: goodixgrp{
+ pinctrl_goodix_touch: goodixgrp {
fsl,pins = <
MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x1020
>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsom.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsom.dtsi
index 7d1a391431bd..4a03ea6d24dc 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsom.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-ccimx6ulsom.dtsi
@@ -114,7 +114,6 @@
};
vdda_adc_3v3: vldo1 {
- compatible = "regulator-fixed";
regulator-name = "vref-adc-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-geam.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-geam.dts
index a0097da03f38..875ae699c5cb 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-geam.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-geam.dts
@@ -148,7 +148,6 @@
reg = <0x0a>;
#sound-dai-cells = <0>;
clocks = <&clks IMX6UL_CLK_OSC>;
- clock-names = "mclk";
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
VDDD-supply = <&reg_1p8v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-kontron-bl-common.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-kontron-bl-common.dtsi
index 43868311f48a..33d5f27285a4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-kontron-bl-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-kontron-bl-common.dtsi
@@ -272,7 +272,7 @@
>;
};
- pinctrl_flexcan2: flexcan2grp{
+ pinctrl_flexcan2: flexcan2grp {
fsl,pins = <
MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX 0x1b020
MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX 0x1b020
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-dwarf.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-dwarf.dts
index 5a74c7f68eb6..fb206c1d8aca 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-dwarf.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-dwarf.dts
@@ -40,6 +40,7 @@
sgtl5000: audio-codec@a {
reg = <0x0a>;
compatible = "fsl,sgtl5000";
+ #sound-dai-cells = <0>;
clocks = <&sys_mclk>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-hobbit.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-hobbit.dts
index 09f7ffa9ad8c..bf7dbb4f1f3e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-hobbit.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-hobbit.dts
@@ -51,6 +51,7 @@
sgtl5000: codec@a {
reg = <0x0a>;
compatible = "fsl,sgtl5000";
+ #sound-dai-cells = <0>;
clocks = <&sys_mclk>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-pi.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-pi.dts
index 6cd7d5877d20..6cfc943a8fa3 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-pi.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico-pi.dts
@@ -51,6 +51,7 @@
sgtl5000: codec@a {
reg = <0x0a>;
compatible = "fsl,sgtl5000";
+ #sound-dai-cells = <0>;
clocks = <&sys_mclk>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico.dtsi
index 4ffe99ed55ca..07dcecbe485d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-pico.dtsi
@@ -121,6 +121,8 @@
max-speed = <100>;
interrupt-parent = <&gpio5>;
interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&clks IMX6UL_CLK_ENET_REF>;
+ clock-names = "rmii-ref";
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul-mainboard.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul-mainboard.dts
index 92ac0edcb608..ef76ece21010 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul-mainboard.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul-mainboard.dts
@@ -133,7 +133,7 @@
pinctrl-0 = <&pinctrl_disp0_3>;
};
-&reg_usbotg_vbus{
+&reg_usbotg_vbus {
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul.dtsi
index 6bd90473050b..1db146ac1c17 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-tx6ul.dtsi
@@ -114,10 +114,8 @@
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c_gpio>;
- gpios = <
- &gpio5 1 GPIO_ACTIVE_HIGH /* SDA */
- &gpio5 0 GPIO_ACTIVE_HIGH /* SCL */
- >;
+ sda-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio5 0 GPIO_ACTIVE_HIGH>;
clock-frequency = <400000>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul.dtsi
index 0174f3edbd16..a27a7554c2e7 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul.dtsi
@@ -179,7 +179,7 @@
gpmi: nand-controller@1806000 {
compatible = "fsl,imx6q-gpmi-nand";
#address-cells = <1>;
- #size-cells = <1>;
+ #size-cells = <0>;
reg = <0x01806000 0x2000>, <0x01808000 0x2000>;
reg-names = "gpmi-nand", "bch";
interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>;
@@ -364,7 +364,7 @@
<&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
dma-names = "rxa", "rxb", "rxc",
"txa", "txb", "txc";
- fsl,asrc-rate = <48000>;
+ fsl,asrc-rate = <48000>;
fsl,asrc-width = <16>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-aster.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-aster.dts
index 919c0464d6cb..b2cdf4877718 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-aster.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-aster.dts
@@ -12,6 +12,5 @@
model = "Toradex Colibri iMX6ULL 1GB (eMMC) on Colibri Aster";
compatible = "toradex,colibri-imx6ull-emmc-aster",
"toradex,colibri-imx6ull-emmc",
- "toradex,colibri-imx6ull",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-eval-v3.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-eval-v3.dts
index 61b93cb040c7..2dc16c54fc78 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-eval-v3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-eval-v3.dts
@@ -12,6 +12,5 @@
model = "Toradex Colibri iMX6ULL 1GB (eMMC) on Colibri Evaluation Board V3";
compatible = "toradex,colibri-imx6ull-emmc-eval",
"toradex,colibri-imx6ull-emmc",
- "toradex,colibri-imx6ull",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris-v2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris-v2.dts
index b9060c2f7977..9bae08fb7f85 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris-v2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris-v2.dts
@@ -10,8 +10,7 @@
/ {
model = "Toradex Colibri iMX6ULL 1G (eMMC) on Colibri Iris V2";
- compatible = "toradex,colibri-imx6ull-iris-v2",
+ compatible = "toradex,colibri-imx6ull-emmc-iris-v2",
"toradex,colibri-imx6ull-emmc",
- "toradex,colibri-imx6ull",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris.dts
index 0ab71f2f5daa..0b1603ff9420 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-emmc-iris.dts
@@ -12,6 +12,5 @@
model = "Toradex Colibri iMX6ULL 1GB (eMMC) on Colibri Iris";
compatible = "toradex,colibri-imx6ull-emmc-iris",
"toradex,colibri-imx6ull-emmc",
- "toradex,colibri-imx6ull",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-eval-v3.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-eval-v3.dts
index d6da984e518d..c5bc255b21e1 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-eval-v3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-eval-v3.dts
@@ -10,7 +10,7 @@
/ {
model = "Toradex Colibri iMX6ULL 256/512MB on Colibri Evaluation Board V3";
- compatible = "toradex,colibri-imx6ull-eval", "fsl,imx6ull";
+ compatible = "toradex,colibri-imx6ull-eval", "toradex,colibri-imx6ull", "fsl,imx6ull";
};
&ad7879_ts {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-aster.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-aster.dts
index c7da5b41966f..d3bbd05da293 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-aster.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-aster.dts
@@ -11,7 +11,7 @@
/ {
model = "Toradex Colibri iMX6ULL 512MB on Colibri Aster";
compatible = "toradex,colibri-imx6ull-wifi-aster",
- "toradex,colibri-imx6ull",
+ "toradex,colibri-imx6ull-wifi",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-eval-v3.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-eval-v3.dts
index 917f5dbe64ba..0ac306c9cef2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-eval-v3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-eval-v3.dts
@@ -10,7 +10,7 @@
/ {
model = "Toradex Colibri iMX6ULL 512MB on Colibri Evaluation Board V3";
- compatible = "toradex,colibri-imx6ull-wifi-eval", "fsl,imx6ull";
+ compatible = "toradex,colibri-imx6ull-wifi-eval", "toradex,colibri-imx6ull-wifi", "fsl,imx6ull";
};
&ad7879_ts {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris-v2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris-v2.dts
index 488da6df56fa..38cd52c45496 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris-v2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris-v2.dts
@@ -11,7 +11,7 @@
/ {
model = "Toradex Colibri iMX6ULL 512MB on Colibri Iris V2";
compatible = "toradex,colibri-imx6ull-wifi-iris-v2",
- "toradex,colibri-imx6ull",
+ "toradex,colibri-imx6ull-wifi",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris.dts
index e63253254754..5f60df64f173 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri-wifi-iris.dts
@@ -11,7 +11,7 @@
/ {
model = "Toradex Colibri iMX6ULL 512MB on Colibri Iris";
compatible = "toradex,colibri-imx6ull-wifi-iris",
- "toradex,colibri-imx6ull",
+ "toradex,colibri-imx6ull-wifi",
"fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri.dtsi
index fde8a19aac0f..ec3c1e7301f4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-colibri.dtsi
@@ -102,7 +102,6 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "+V3.3_ETH";
- regulator-type = "voltage";
vin-supply = <&reg_module_3v3>;
clocks = <&clks IMX6UL_CLK_ENET2_REF_125M>;
startup-delay-us = <150000>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-emmc.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-emmc.dts
index 14adb87da911..1610f3892d9e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-emmc.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-emmc.dts
@@ -9,8 +9,8 @@
/ {
model = "PHYTEC phyGate-Tauri i.MX6 UltraLite";
- compatible = "phytec,imx6ull-phygate-tauri",
- "phytec,imx6ull-phygate-tauri-emmc",
+ compatible = "phytec,imx6ull-phygate-tauri-emmc",
+ "phytec,imx6ull-phygate-tauri",
"phytec,imx6ull-pcl063", "fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-nand.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-nand.dts
index ae396ac63443..92e7d38d5637 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-nand.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri-nand.dts
@@ -9,8 +9,8 @@
/ {
model = "PHYTEC phyGate-Tauri i.MX6 UltraLite";
- compatible = "phytec,imx6ull-phygate-tauri",
- "phytec,imx6ull-phygate-tauri-nand",
+ compatible = "phytec,imx6ull-phygate-tauri-nand",
+ "phytec,imx6ull-phygate-tauri",
"phytec,imx6ull-pcl063", "fsl,imx6ull";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri.dtsi
index ea627638e40c..d12fb44aeb14 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-phytec-tauri.dtsi
@@ -9,11 +9,6 @@
#include "imx6ull-phytec-phycore-som.dtsi"
/ {
-
- model = "PHYTEC phyGate-Tauri i.MX6 UltraLite";
- compatible = "phytec,imx6ull-phygate-tauri",
- "phytec,imx6ull-pcl063", "fsl,imx6ull";
-
aliases {
rtc0 = &i2c_rtc;
rtc1 = &snvs_rtc;
@@ -121,7 +116,7 @@
tpm_tis: tpm@1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_tpm>;
- compatible = "tcg,tpm_tis-spi";
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
reg = <1>;
spi-max-frequency = <20000000>;
interrupt-parent = <&gpio5>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7-colibri.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7-colibri.dtsi
index 104580d51d74..9fe51884af79 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7-colibri.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7-colibri.dtsi
@@ -29,7 +29,7 @@
extcon_usbc_det: usbc-det {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
+ id-gpios = <&gpio7 14 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbc_det>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7-tqma7.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7-tqma7.dtsi
index fe42b0a46831..3fc3130f9def 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7-tqma7.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7-tqma7.dtsi
@@ -128,11 +128,16 @@
};
};
- /* NXP SE97BTP with temperature sensor + eeprom */
+ /* LM75A temperature sensor, TQMa7x 01xx */
+ lm75a: temperature-sensor@48 {
+ compatible = "national,lm75a";
+ reg = <0x48>;
+ };
+
+ /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x 02xx */
se97b: temperature-sensor-eeprom@1e {
compatible = "nxp,se97b", "jedec,jc-42.4-temp";
reg = <0x1e>;
- status = "okay";
};
/* ST M24C64 */
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-aster.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-aster.dts
index d9c7045a55ba..212e0685585d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-aster.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-aster.dts
@@ -12,7 +12,6 @@
model = "Toradex Colibri iMX7D 1GB (eMMC) on Aster Carrier Board";
compatible = "toradex,colibri-imx7d-emmc-aster",
"toradex,colibri-imx7d-emmc",
- "toradex,colibri-imx7d",
"fsl,imx7d";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-eval-v3.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-eval-v3.dts
index 96b599439dde..1deece7e7129 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-eval-v3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-eval-v3.dts
@@ -11,7 +11,6 @@
model = "Toradex Colibri iMX7D 1GB (eMMC) on Colibri Evaluation Board V3";
compatible = "toradex,colibri-imx7d-emmc-eval-v3",
"toradex,colibri-imx7d-emmc",
- "toradex,colibri-imx7d",
"fsl,imx7d";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris-v2.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris-v2.dts
index 5eccb837b158..22e7863c2e80 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris-v2.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris-v2.dts
@@ -11,7 +11,6 @@
model = "Toradex Colibri iMX7D 1GB on Iris V2 Carrier Board";
compatible = "toradex,colibri-imx7d-emmc-iris-v2",
"toradex,colibri-imx7d-emmc",
- "toradex,colibri-imx7d",
"fsl,imx7d";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris.dts
index ae10e8a66ff1..a3cf8f50e3dc 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc-iris.dts
@@ -11,7 +11,6 @@
model = "Toradex Colibri iMX7D 1GB on Iris Carrier Board";
compatible = "toradex,colibri-imx7d-emmc-iris",
"toradex,colibri-imx7d-emmc",
- "toradex,colibri-imx7d",
"fsl,imx7d";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc.dtsi
index 3740e34ef99f..9670f45eab3b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-colibri-emmc.dtsi
@@ -11,6 +11,10 @@
/* Required to properly pass MAC addresses from bootloader. */
ethernet0 = &fec1;
ethernet1 = &fec2;
+ mmc0 = &usdhc3; /* eMMC */
+ mmc1 = &usdhc1; /* MMC/SD slot */
+ /delete-property/ mmc2;
+ /delete-property/ mmc3;
};
memory@80000000 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-flex-concentrator.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-flex-concentrator.dts
index 3a723843d562..9984b343cdf0 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-flex-concentrator.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-flex-concentrator.dts
@@ -130,7 +130,7 @@
* TCG specification - Section 6.4.1 Clocking:
* TPM shall support a SPI clock frequency range of 10-24 MHz.
*/
- st33htph: tpm-tis@0 {
+ st33htph: tpm@0 {
compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
reg = <0>;
spi-max-frequency = <24000000>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-meerkat96.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-meerkat96.dts
index dd8003bd1fc0..f0fda15f3020 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-meerkat96.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-meerkat96.dts
@@ -212,7 +212,7 @@
keep-power-in-suspend;
wakeup-source;
vmmc-supply = <&reg_wlreg_on>;
- vqmmc-supply =<&reg_3p3v>;
+ vqmmc-supply = <&reg_3p3v>;
status = "okay";
brcmf: wifi@1 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-dwarf.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-dwarf.dts
index fdc10563f147..1b965652291b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-dwarf.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-dwarf.dts
@@ -40,6 +40,7 @@
sgtl5000: audio-codec@a {
reg = <0x0a>;
compatible = "fsl,sgtl5000";
+ #sound-dai-cells = <0>;
clocks = <&sys_mclk>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
@@ -62,6 +63,7 @@
gpio-controller;
#gpio-cells = <2>;
#interrupt-cells = <2>;
+ interrupt-controller;
reg = <0x25>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-nymph.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-nymph.dts
index 5afb1674e012..af26284297a2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-nymph.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-nymph.dts
@@ -51,6 +51,7 @@
sgtl5000: audio-codec@a {
reg = <0x0a>;
compatible = "fsl,sgtl5000";
+ #sound-dai-cells = <0>;
clocks = <&sys_mclk>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-pi.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-pi.dts
index f263e391e24c..62221131336f 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-pi.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico-pi.dts
@@ -61,6 +61,10 @@
};
};
+&usdhc1 {
+ status = "disabled";
+};
+
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico.dtsi
index 73d90845e85c..8d5037ac03c7 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-pico.dtsi
@@ -108,6 +108,14 @@
assigned-clock-rates = <0>, <32768>;
};
+&cpu0 {
+ cpu-supply = <&sw1a_reg>;
+};
+
+&cpu1 {
+ cpu-supply = <&sw1a_reg>;
+};
+
&ecspi3 {
cs-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
@@ -509,7 +517,7 @@
>;
};
- pinctrl_pwm4: pwm4grp{
+ pinctrl_pwm4: pwm4grp {
fsl,pins = <
MX7D_PAD_GPIO1_IO11__PWM4_OUT 0x7f
>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-sdb.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-sdb.dts
index 75f1cd14bea1..0462e43ec09b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-sdb.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-sdb.dts
@@ -10,6 +10,11 @@
model = "Freescale i.MX7 SabreSD Board";
compatible = "fsl,imx7d-sdb", "fsl,imx7d";
+ aliases {
+ ethernet0 = &fec1;
+ ethernet1 = &fec2;
+ };
+
chosen {
stdout-path = &uart1;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-smegw01.dts b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-smegw01.dts
index 85b97b5f64e7..7ed27c7ad726 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-smegw01.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d-smegw01.dts
@@ -149,7 +149,7 @@
&i2c2 {
pinctrl-names = "default";
- pinctrl-0 =<&pinctrl_i2c2>;
+ pinctrl-0 = <&pinctrl_i2c2>;
clock-frequency = <100000>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d.dtsi
index 4b94b8afb55d..0484e349e064 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7d.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7d.dtsi
@@ -217,9 +217,6 @@
};
&ca_funnel_in_ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
port@1 {
reg = <1>;
ca_funnel_in_port1: endpoint {
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7s.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7s.dtsi
index 6ffb428dc939..9c81c6baa2d3 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7s.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7s.dtsi
@@ -183,6 +183,15 @@
interrupt-parent = <&gpc>;
ranges;
+ ocram: sram@900000 {
+ compatible = "mmio-sram";
+ reg = <0x00900000 0x20000>;
+ ranges = <0 0x00900000 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ clocks = <&clks IMX7D_OCRAM_CLK>;
+ };
+
funnel@30041000 {
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
reg = <0x30041000 0x1000>;
@@ -190,7 +199,11 @@
clock-names = "apb_pclk";
ca_funnel_in_ports: in-ports {
- port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
ca_funnel_in_port0: endpoint {
remote-endpoint = <&etm0_out_port>;
};
@@ -454,7 +467,7 @@
};
gpt1: timer@302d0000 {
- compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+ compatible = "fsl,imx7d-gpt", "fsl,imx6dl-gpt";
reg = <0x302d0000 0x10000>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX7D_GPT1_ROOT_CLK>,
@@ -463,7 +476,7 @@
};
gpt2: timer@302e0000 {
- compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+ compatible = "fsl,imx7d-gpt", "fsl,imx6dl-gpt";
reg = <0x302e0000 0x10000>;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX7D_GPT2_ROOT_CLK>,
@@ -473,7 +486,7 @@
};
gpt3: timer@302f0000 {
- compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+ compatible = "fsl,imx7d-gpt", "fsl,imx6dl-gpt";
reg = <0x302f0000 0x10000>;
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX7D_GPT3_ROOT_CLK>,
@@ -483,7 +496,7 @@
};
gpt4: timer@30300000 {
- compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
+ compatible = "fsl,imx7d-gpt", "fsl,imx6dl-gpt";
reg = <0x30300000 0x10000>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX7D_GPT4_ROOT_CLK>,
@@ -605,6 +618,7 @@
nvmem-cells = <&tempmon_calib>, <&fuse_grade>;
nvmem-cell-names = "calib", "temp_grade";
clocks = <&clks IMX7D_PLL_SYS_MAIN_CLK>;
+ #thermal-sensor-cells = <0>;
};
};
@@ -658,7 +672,6 @@
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <3>;
interrupt-parent = <&intc>;
- #power-domain-cells = <1>;
pgc {
#address-cells = <1>;
@@ -721,6 +734,8 @@
clocks = <&clks IMX7D_ECSPI4_ROOT_CLK>,
<&clks IMX7D_ECSPI4_ROOT_CLK>;
clock-names = "ipg", "per";
+ dma-names = "rx", "tx";
+ dmas = <&sdma 6 7 1>, <&sdma 7 7 2>;
status = "disabled";
};
@@ -800,10 +815,8 @@
compatible = "fsl,imx7-csi";
reg = <0x30710000 0x10000>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clks IMX7D_CLK_DUMMY>,
- <&clks IMX7D_CSI_MCLK_ROOT_CLK>,
- <&clks IMX7D_CLK_DUMMY>;
- clock-names = "axi", "mclk", "dcic";
+ clocks = <&clks IMX7D_CSI_MCLK_ROOT_CLK>;
+ clock-names = "mclk";
status = "disabled";
port {
@@ -814,7 +827,7 @@
};
lcdif: lcdif@30730000 {
- compatible = "fsl,imx7d-lcdif", "fsl,imx28-lcdif";
+ compatible = "fsl,imx7d-lcdif", "fsl,imx6sx-lcdif";
reg = <0x30730000 0x10000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>,
@@ -853,6 +866,26 @@
};
};
};
+
+ mipi_dsi: dsi@30760000 {
+ compatible = "fsl,imx7d-mipi-dsim", "fsl,imx8mm-mipi-dsim";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x30760000 0x400>;
+ clocks = <&clks IMX7D_MIPI_DSI_ROOT_CLK>,
+ <&clks IMX7D_MIPI_DPHY_ROOT_CLK>;
+ clock-names = "bus_clk", "sclk_mipi";
+ assigned-clocks = <&clks IMX7D_MIPI_DSI_ROOT_SRC>,
+ <&clks IMX7D_PLL_SYS_PFD5_CLK>;
+ assigned-clock-parents = <&clks IMX7D_PLL_SYS_PFD5_CLK>;
+ assigned-clock-rates = <0>, <333000000>;
+ power-domains = <&pgc_mipi_phy>;
+ interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ samsung,burst-clock-frequency = <891000000>;
+ samsung,esc-clock-frequency = <20000000>;
+ samsung,pll-clock-frequency = <24000000>;
+ status = "disabled";
+ };
};
aips3: bus@30800000 {
@@ -878,6 +911,8 @@
clocks = <&clks IMX7D_ECSPI1_ROOT_CLK>,
<&clks IMX7D_ECSPI1_ROOT_CLK>;
clock-names = "ipg", "per";
+ dma-names = "rx", "tx";
+ dmas = <&sdma 0 7 1>, <&sdma 1 7 2>;
status = "disabled";
};
@@ -890,6 +925,8 @@
clocks = <&clks IMX7D_ECSPI2_ROOT_CLK>,
<&clks IMX7D_ECSPI2_ROOT_CLK>;
clock-names = "ipg", "per";
+ dma-names = "rx", "tx";
+ dmas = <&sdma 2 7 1>, <&sdma 3 7 2>;
status = "disabled";
};
@@ -902,6 +939,8 @@
clocks = <&clks IMX7D_ECSPI3_ROOT_CLK>,
<&clks IMX7D_ECSPI3_ROOT_CLK>;
clock-names = "ipg", "per";
+ dma-names = "rx", "tx";
+ dmas = <&sdma 4 7 1>, <&sdma 5 7 2>;
status = "disabled";
};
@@ -1275,10 +1314,10 @@
clocks = <&clks IMX7D_NAND_USDHC_BUS_RAWNAND_CLK>;
};
- gpmi: nand-controller@33002000{
+ gpmi: nand-controller@33002000 {
compatible = "fsl,imx7d-gpmi-nand";
#address-cells = <1>;
- #size-cells = <1>;
+ #size-cells = <0>;
reg = <0x33002000 0x2000>, <0x33004000 0x4000>;
reg-names = "gpmi-nand", "bch";
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/imx7ulp.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/imx7ulp.dtsi
index b01ddda7bd9e..ac338320ac1d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/imx7ulp.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/imx7ulp.dtsi
@@ -209,7 +209,7 @@
};
usbphy1: usb-phy@40350000 {
- compatible = "fsl,imx7ulp-usbphy", "fsl,imx6ul-usbphy";
+ compatible = "fsl,imx7ulp-usbphy";
reg = <0x40350000 0x1000>;
interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pcc2 IMX7ULP_CLK_USB_PHY>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/imx/mba6ulx.dtsi b/sys/contrib/device-tree/src/arm/nxp/imx/mba6ulx.dtsi
index e3b2d23068f7..e78d0a7d8cd2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/imx/mba6ulx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/imx/mba6ulx.dtsi
@@ -35,22 +35,25 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_buttons>;
- button1 {
+ button-1 {
label = "s14";
linux,code = <KEY_1>;
gpios = <&expander_in0 0 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
- button2 {
+ button-2 {
label = "s6";
linux,code = <KEY_2>;
gpios = <&expander_in0 1 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
- button3 {
+ button-3 {
label = "s7";
linux,code = <KEY_3>;
gpios = <&expander_in0 2 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
power-button {
@@ -277,10 +280,9 @@
reg = <0x41>;
interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio4>;
- interrupt-controller;
status = "disabled";
- stmpe_touchscreen {
+ touchscreen {
compatible = "st,stmpe-ts";
st,adc-freq = <1>; /* 3.25 MHz ADC clock speed */
st,ave-ctrl = <3>; /* 8 sample average control */
@@ -465,7 +467,7 @@
pinctrl_pwm2: pwm2grp {
fsl,pins = <
- /* 100 k PD, DSE 120 OHM, SPPEED LO */
+ /* 100 k PD, DSE 120 OHM, SPEED LO */
MX6UL_PAD_GPIO1_IO09__PWM2_OUT 0x00003050
>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/lpc/lpc18xx.dtsi b/sys/contrib/device-tree/src/arm/nxp/lpc/lpc18xx.dtsi
index 9cf09c183b85..6dd73290f0c6 100644
--- a/sys/contrib/device-tree/src/arm/nxp/lpc/lpc18xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/lpc/lpc18xx.dtsi
@@ -74,7 +74,7 @@
sct_pwm: pwm@40000000 {
compatible = "nxp,lpc1850-sct-pwm";
reg = <0x40000000 0x1000>;
- clocks =<&ccu1 CLK_CPU_SCT>;
+ clocks = <&ccu1 CLK_CPU_SCT>;
clock-names = "pwm";
resets = <&rgu 37>;
#pwm-cells = <3>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-iot.dts b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-iot.dts
index ce8e26d7791f..e13ccae629a7 100644
--- a/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-iot.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-iot.dts
@@ -62,19 +62,19 @@
};
};
-&can0{
+&can0 {
status = "disabled";
};
-&can1{
+&can1 {
status = "disabled";
};
-&can2{
+&can2 {
status = "disabled";
};
-&can3{
+&can3 {
status = "okay";
};
@@ -125,7 +125,7 @@
status = "okay";
};
-&esdhc{
+&esdhc {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a-mbls1021a.dts b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a-mbls1021a.dts
new file mode 100644
index 000000000000..34636fcdfd6a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a-mbls1021a.dts
@@ -0,0 +1,405 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR X11)
+/*
+ * Copyright 2013-2014 Freescale Semiconductor, Inc.
+ * Copyright 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/leds/leds-pca9532.h>
+#include <dt-bindings/net/ti-dp83867.h>
+
+#include "ls1021a-tqmls1021a.dtsi"
+
+/ {
+ model = "TQMLS102xA SOM on MBLS102xA";
+ compatible = "tq,ls1021a-tqmls1021a-mbls102xa", "tq,ls1021a-tqmls1021a", "fsl,ls1021a";
+
+ audio_mclk: audio-clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <25000000>;
+ };
+
+ backlight_dcu: backlight {
+ compatible = "gpio-backlight";
+ gpios = <&pca9530 0 GPIO_ACTIVE_LOW>;
+ status = "disabled";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+
+ switch-1 {
+ label = "S6";
+ linux,code = <BTN_0>;
+ gpios = <&pca9554_0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ btn2: switch-2 {
+ label = "S7";
+ linux,code = <BTN_1>;
+ gpios = <&pca9554_0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ switch-3 {
+ label = "S8";
+ linux,code = <BTN_2>;
+ gpios = <&pca9554_0 2 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_leds: gpio-leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ function-enumerator = <0>;
+ gpios = <&pca9554_2 4 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ function-enumerator = <1>;
+ gpios = <&pca9554_2 5 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+
+ led-2 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ function-enumerator = <2>;
+ gpios = <&pca9554_2 6 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+
+ led-3 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_HEARTBEAT;
+ function-enumerator = <0>;
+ gpios = <&pca9554_2 7 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ lvds_encoder: lvds-encoder {
+ compatible = "ti,sn75lvds83", "lvds-encoder";
+ power-supply = <&reg_3p3v>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lvds_encoder_in: endpoint {};
+ };
+
+ port@1 {
+ reg = <1>;
+
+ lvds_encoder_out: endpoint {};
+ };
+ };
+ };
+
+ reg_1p2v: regulator-1p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ vin-supply = <&reg_3p3v>;
+ };
+
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ hdmi_out: hdmi {
+ compatible = "hdmi-connector";
+ type = "a";
+ ddc-i2c-bus = <&i2c0>;
+ status = "disabled";
+
+ port {
+ hdmi_in: endpoint {
+ remote-endpoint = <&sii9022a_out>;
+ };
+ };
+ };
+
+ display: panel {
+ backlight = <&backlight_dcu>;
+ enable-gpios = <&pca9554_1 3 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+
+ port {
+ panel_in: endpoint {};
+ };
+ };
+
+ sound {
+ compatible = "fsl,imx-audio-tlv320aic32x4";
+ model = "ls1021a-mbls1021a-tlv320aic32";
+ ssi-controller = <&sai1>;
+ audio-codec = <&tlv320aic32x4>;
+ };
+
+};
+
+&can0 {
+ xceiver-supply = <&reg_3p3v>;
+ status = "okay";
+};
+
+&can1 {
+ xceiver-supply = <&reg_3p3v>;
+ status = "okay";
+};
+
+&dspi0 {
+ status = "okay";
+};
+
+&enet0 {
+ phy-handle = <&rgmii_phy0c>;
+ phy-mode = "rgmii-id";
+ mac-address = [ 00 00 00 00 00 00 ];
+ status = "okay";
+};
+
+&enet1 {
+ tbi-handle = <&tbi1>;
+ phy-handle = <&sgmii_phy03>;
+ phy-mode = "sgmii";
+ mac-address = [ 00 00 00 00 00 00 ];
+ status = "okay";
+};
+
+&enet2 {
+ phy-handle = <&rgmii_phy04>;
+ phy-mode = "rgmii-id";
+ mac-address = [ 00 00 00 00 00 00 ];
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ tlv320aic32x4: audio-codec@18 {
+ compatible = "ti,tlv320aic32x4";
+ reg = <0x18>;
+ clocks = <&audio_mclk>;
+ clock-names = "mclk";
+ ldoin-supply = <&reg_3p3v>;
+ iov-supply = <&reg_3p3v>;
+ };
+
+ pca9554_0: gpio-expander@20 {
+ compatible = "nxp,pca9554";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ vcc-supply = <&reg_3p3v>;
+ gpio-line-names = "BUTTON0", "BUTTON1",
+ "BUTTON2", "EMMC_SEL",
+ "DIP2", "DIP3",
+ "EXT_TOUCH_INT", "GPIO_1";
+ };
+
+ pca9554_1: gpio-expander@21 {
+ compatible = "nxp,pca9554";
+ reg = <0x21>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ vcc-supply = <&reg_3p3v>;
+ gpio-line-names = "PCIE_PWR_EN", "MPCIE_DISABLE#",
+ "MPCIE_WAKE#", "LCD_BLT_EN",
+ "LCD_PWR_EN", "EC1_PHY_PWDN",
+ "EC3_PHY_PWDN", "SGMII_PHY_PWDN";
+ };
+
+ pca9554_2: gpio-expander@22 {
+ compatible = "nxp,pca9554";
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&extirq>;
+ interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ vcc-supply = <&reg_3p3v>;
+ gpio-line-names = "MUX_SEL0", "MUX_SEL1",
+ "MUX_SEL2", "MUX_SEL3",
+ "V95", "V96", "V97", "V98";
+ };
+
+ sii9022a: hdmi-transmitter@3b {
+ compatible = "sil,sii9022";
+ reg = <0x3b>;
+ iovcc-supply = <&reg_3p3v>;
+ cvcc12-supply = <&reg_1p2v>;
+ interrupts = <GIC_SPI 167 IRQ_TYPE_EDGE_RISING>;
+ #sound-dai-cells = <0>;
+ sil,i2s-data-lanes = <0>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sii9022a_in: endpoint {};
+ };
+
+ port@1 {
+ reg = <1>;
+
+ sii9022a_out: endpoint {
+ remote-endpoint = <&hdmi_in>;
+ };
+ };
+ };
+ };
+
+ stmpe811: port-expander@41 {
+ compatible = "st,stmpe811";
+ reg = <0x41>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+ vcc-supply = <&reg_3p3v>;
+ vio-supply = <&reg_3p3v>;
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ /* GPIO 5-7 used for touch */
+ st,norequest-mask = <0xf0>;
+ gpio-line-names = "GPIO_ADC_I2C1_1",
+ "GPIO_ADC_I2C1_2",
+ "GPIO_ADC_I2C1_3",
+ "GPIO_ADC_I2C1_4";
+ };
+
+ touchscreen {
+ compatible = "st,stmpe-ts";
+ status = "disabled";
+ };
+ };
+
+ pca9530: leds@60 {
+ compatible = "nxp,pca9530";
+ reg = <0x60>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "PWM_0", "PWM_1";
+
+ led-0 {
+ type = <PCA9532_TYPE_GPIO>;
+ };
+
+ led-1 {
+ type = <PCA9532_TYPE_GPIO>;
+ };
+ };
+
+};
+
+&i2c1 {
+ status = "okay";
+};
+
+&lpuart0 {
+ linux,rs485-enabled-at-boot-time;
+ status = "okay";
+};
+
+&mdio0 {
+ sgmii_phy03: ethernet-phy@3 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x03>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ ti,dp83867-rxctrl-strap-quirk;
+ };
+
+ rgmii_phy04: ethernet-phy@4 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x04>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ rgmii_phy0c: ethernet-phy@c {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0c>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+};
+
+&pwm6 {
+ status = "okay";
+};
+
+&pwm7 {
+ status = "okay";
+};
+
+&sai1 {
+ status = "okay";
+};
+
+&sata {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&usb3 {
+ /*
+ * Although DR connector, VBUS is always driven, so
+ * restrict to host mode.
+ */
+ dr_mode = "host";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a.dtsi b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a.dtsi
new file mode 100644
index 000000000000..1b13851ad997
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a-tqmls1021a.dtsi
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR X11)
+/*
+ * Copyright 2013-2014 Freescale Semiconductor, Inc.
+ * Copyright 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+#include "ls1021a.dtsi"
+
+/ {
+ model = "TQMLS102xA SOM";
+ compatible = "tq,ls1021a-tqmls1021a", "fsl,ls1021a";
+
+ reg_3p3v_som: regulator-3p3v-som {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V_SOM";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&esdhc {
+ /* e-MMC over 8 data lines */
+ bus-width = <8>;
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ /* MC34VR500 DC/DC regulator at 0x8, managed by PMIC */
+ /* On-board PMC at 0x11 */
+
+ sa56004: temperature-sensor@4c {
+ compatible = "nxp,sa56004";
+ reg = <0x4c>;
+ vcc-supply = <&reg_3p3v_som>;
+ };
+
+ rtc0: rtc@51 {
+ compatible = "nxp,pcf85063a";
+ reg = <0x51>;
+ quartz-load-femtofarads = <12500>;
+ };
+
+ m24c64_54: eeprom@54 {
+ compatible = "atmel,24c64";
+ reg = <0x54>;
+ pagesize = <32>;
+ read-only;
+ vcc-supply = <&reg_3p3v_som>;
+ };
+};
+
+&mdio0 {
+ tbi1: tbi-phy@8 {
+ reg = <0x8>;
+ device_type = "tbi-phy";
+ };
+};
+
+&qspi {
+ status = "okay";
+
+ qflash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <20000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+ reg = <0>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot@0 {
+ label = "U-Boot-PBL";
+ reg = <0x0 0xe0000>;
+ };
+
+ env@e0000 {
+ label = "U-Boot Environment";
+ reg = <0xe0000 0x10000>;
+ };
+
+ dtb@f0000 {
+ label = "DTB";
+ reg = <0xf0000 0x10000>;
+ };
+
+ linux@100000 {
+ label = "Linux";
+ reg = <0x100000 0x700000>;
+ };
+
+ rootfs@800000 {
+ label = "RootFS";
+ reg = <0x800000 0x3800000>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a.dtsi b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a.dtsi
index 49c78c84cd5d..d471cc5efa94 100644
--- a/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/ls/ls1021a.dtsi
@@ -112,7 +112,7 @@
compatible = "fsl,ls1021a-msi";
reg = <0x0 0x1570e00 0x0 0x8>;
msi-controller;
- interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>;
};
msi2: msi-controller@1570e08 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-evk.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-evk.dts
index 3b609d987d88..7365fe4581a3 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-evk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-evk.dts
@@ -137,7 +137,7 @@
backlight_display: backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 2 5000000>;
+ pwms = <&pwm 2 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-olinuxino.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-olinuxino.dts
index 0729e72f2283..229e727b222e 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-olinuxino.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-olinuxino.dts
@@ -101,21 +101,14 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb0_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "usb0_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- startup-delay-us = <300>; /* LAN9215 requires a POR of 200us minimum */
- gpio = <&gpio0 17 0>;
- };
+ reg_usb0_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ startup-delay-us = <300>; /* LAN9215 requires a POR of 200us minimum */
+ gpio = <&gpio0 17 0>;
};
leds {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-sansa.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-sansa.dts
index 46057d9bf555..b23e7ada9c80 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-sansa.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-sansa.dts
@@ -166,7 +166,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 2 5000000>;
+ pwms = <&pwm 2 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
@@ -175,10 +175,8 @@
#address-cells = <1>;
#size-cells = <0>;
compatible = "i2c-gpio";
- gpios = <
- &gpio1 24 0 /* SDA */
- &gpio1 22 0 /* SCL */
- >;
+ sda-gpios = <&gpio1 24 0>;
+ scl-gpios = <&gpio1 22 0>;
i2c-gpio,delay-us = <2>; /* ~100 kHz */
};
@@ -186,10 +184,8 @@
#address-cells = <1>;
#size-cells = <0>;
compatible = "i2c-gpio";
- gpios = <
- &gpio0 31 0 /* SDA */
- &gpio0 30 0 /* SCL */
- >;
+ sda-gpios = <&gpio0 31 0>;
+ scl-gpios = <&gpio0 30 0>;
i2c-gpio,delay-us = <2>; /* ~100 kHz */
touch: touch@20 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-stmp378x_devb.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-stmp378x_devb.dts
index da4b88f32eaa..69124ba6a666 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-stmp378x_devb.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-stmp378x_devb.dts
@@ -59,18 +59,11 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_vddio_sd0: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "vddio-sd0";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio1 29 0>;
- };
+ reg_vddio_sd0: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vddio-sd0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio1 29 0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-xfi3.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-xfi3.dts
index b1d8210f3ecc..28341d8315c2 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-xfi3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23-xfi3.dts
@@ -153,7 +153,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 2 5000000>;
+ pwms = <&pwm 2 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23.dtsi b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23.dtsi
index a3668a0827fc..0309592af1e1 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx23.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx23.dtsi
@@ -62,8 +62,8 @@
dma_apbh: dma-controller@80004000 {
compatible = "fsl,imx23-dma-apbh";
reg = <0x80004000 0x2000>;
- interrupts = <0 14 20 0
- 13 13 13 13>;
+ interrupts = <0>, <14>, <20>, <0>,
+ <13>, <13>, <13>, <13>;
#dma-cells = <1>;
dma-channels = <8>;
clocks = <&clks 15>;
@@ -110,7 +110,7 @@
reg = <0x80018000 0x2000>;
gpio0: gpio@0 {
- compatible = "fsl,imx23-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx23-gpio";
reg = <0>;
interrupts = <16>;
gpio-controller;
@@ -120,7 +120,7 @@
};
gpio1: gpio@1 {
- compatible = "fsl,imx23-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx23-gpio";
reg = <1>;
interrupts = <17>;
gpio-controller;
@@ -130,7 +130,7 @@
};
gpio2: gpio@2 {
- compatible = "fsl,imx23-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx23-gpio";
reg = <2>;
interrupts = <18>;
gpio-controller;
@@ -412,13 +412,13 @@
status = "disabled";
};
- dma_apbx: dma-apbx@80024000 {
+ dma_apbx: dma-controller@80024000 {
compatible = "fsl,imx23-dma-apbx";
reg = <0x80024000 0x2000>;
- interrupts = <7 5 9 26
- 19 0 25 23
- 60 58 9 0
- 0 0 0 0>;
+ interrupts = <7>, <5>, <9>, <26>,
+ <19>, <0>, <25>, <23>,
+ <60>, <58>, <9>, <0>,
+ <0>, <0>, <0>, <0>;
interrupt-names = "audio-adc", "audio-dac", "spdif-tx", "i2c",
"saif0", "empty", "auart0-rx", "auart0-tx",
"auart1-rx", "auart1-tx", "saif1", "empty",
@@ -431,7 +431,7 @@
dcp: crypto@80028000 {
compatible = "fsl,imx23-dcp";
reg = <0x80028000 0x2000>;
- interrupts = <53 54>;
+ interrupts = <53>, <54>;
status = "okay";
};
@@ -456,7 +456,7 @@
lcdif@80030000 {
compatible = "fsl,imx23-lcdif";
reg = <0x80030000 2000>;
- interrupts = <46 45>;
+ interrupts = <46>, <45>;
clocks = <&clks 38>;
status = "disabled";
};
@@ -484,7 +484,7 @@
ranges;
clks: clkctrl@80040000 {
- compatible = "fsl,imx23-clkctrl", "fsl,clkctrl";
+ compatible = "fsl,imx23-clkctrl";
reg = <0x80040000 0x2000>;
#clock-cells = <1>;
};
@@ -525,7 +525,8 @@
lradc: lradc@80050000 {
compatible = "fsl,imx23-lradc";
reg = <0x80050000 0x2000>;
- interrupts = <36 37 38 39 40 41 42 43 44>;
+ interrupts = <36>, <37>, <38>, <39>, <40>,
+ <41>, <42>, <43>, <44>;
status = "disabled";
clocks = <&clks 26>;
#io-channel-cells = <1>;
@@ -560,7 +561,7 @@
compatible = "fsl,imx23-pwm";
reg = <0x80064000 0x2000>;
clocks = <&clks 30>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
fsl,pwm-number = <5>;
status = "disabled";
};
@@ -568,7 +569,7 @@
timrot@80068000 {
compatible = "fsl,imx23-timrot", "fsl,timrot";
reg = <0x80068000 0x2000>;
- interrupts = <28 29 30 31>;
+ interrupts = <28>, <29>, <30>, <31>;
clocks = <&clks 28>;
};
@@ -597,7 +598,7 @@
reg = <0x80070000 0x2000>;
interrupts = <0>;
clocks = <&clks 32>, <&clks 16>;
- clock-names = "uart", "apb_pclk";
+ clock-names = "uartclk", "apb_pclk";
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-apf28dev.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-apf28dev.dts
index 4704b6141836..6c87266eb135 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-apf28dev.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-apf28dev.dts
@@ -10,28 +10,20 @@
model = "Armadeus Systems APF28Dev docking/development board";
compatible = "armadeus,imx28-apf28dev", "armadeus,imx28-apf28", "fsl,imx28";
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb0_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "usb0_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 23 1>;
- enable-active-high;
- };
+ reg_usb0_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 23 1>;
+ enable-active-high;
+ };
- reg_can0_vcc: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "can0_vcc";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- };
+ reg_can0_vcc: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "can0_vcc";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
};
leds {
@@ -47,7 +39,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 3 191000>;
+ pwms = <&pwm 3 191000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10037.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10037.dts
index d3e9a731525b..c72fe2d392f1 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10037.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10037.dts
@@ -64,20 +64,13 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb1_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb_pins_cfa10037>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio0 7 1>;
- };
+ reg_usb1_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins_cfa10037>;
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio0 7 1>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10049.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10049.dts
index c5a7f56d83db..f0ce897b9d5c 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10049.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10049.dts
@@ -78,21 +78,14 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb1_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb_pins_cfa10049>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio0 7 1>;
- };
+ reg_usb1_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins_cfa10049>;
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio0 7 1>;
};
spi-2 {
@@ -180,7 +173,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 3 5000000>;
+ pwms = <&pwm 3 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10055.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10055.dts
index 70e225a99fbe..cb68edd6101b 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10055.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10055.dts
@@ -39,7 +39,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 3 5000000>;
+ pwms = <&pwm 3 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10057.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10057.dts
index 27602c01f162..5875c3d7ba97 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10057.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10057.dts
@@ -14,26 +14,19 @@
model = "Crystalfontz CFA-10057 Board";
compatible = "crystalfontz,cfa10057", "crystalfontz,cfa10036", "fsl,imx28";
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb1_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb_pins_cfa10057>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio0 7 1>;
- };
+ reg_usb1_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins_cfa10057>;
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio0 7 1>;
};
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 4 5000000>;
+ pwms = <&pwm 4 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10058.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10058.dts
index 931c4d089b26..b414e67ef379 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10058.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-cfa10058.dts
@@ -14,26 +14,19 @@
model = "Crystalfontz CFA-10058 Board";
compatible = "crystalfontz,cfa10058", "crystalfontz,cfa10036", "fsl,imx28";
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb1_vbus: regulator@0 {
- pinctrl-names = "default";
- pinctrl-0 = <&usb_pins_cfa10058>;
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio0 7 1>;
- };
+ reg_usb1_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_pins_cfa10058>;
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio0 7 1>;
};
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 3 5000000>;
+ pwms = <&pwm 3 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx283lc.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx283lc.dts
index 29f8a3a245d4..7ae2d4ca8ef0 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx283lc.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx283lc.dts
@@ -47,7 +47,7 @@
status = "okay";
};
-&pinctrl{
+&pinctrl {
pinctrl-names = "default";
pinctrl-0 = <&hog_pins_cpuimx283>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx28lc.dtsi b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx28lc.dtsi
index b285a946e2c2..652fc9e57a55 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx28lc.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-eukrea-mbmx28lc.dtsi
@@ -14,7 +14,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 4 1000000>;
+ pwms = <&pwm 4 1000000 0>;
brightness-levels = <0 25 50 75 100 125 150 175 200 225 255>;
default-brightness-level = <10>;
};
@@ -69,55 +69,45 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_lcd_3v3: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- pinctrl-names = "default";
- pinctrl-0 = <&reg_lcd_3v3_pins_mbmx28lc>;
- regulator-name = "lcd-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_lcd_3v3: regulator-1 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&reg_lcd_3v3_pins_mbmx28lc>;
+ regulator-name = "lcd-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- reg_usb0_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- pinctrl-names = "default";
- pinctrl-0 = <&reg_usb0_vbus_pins_mbmx28lc>;
- regulator-name = "usb0_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb0_vbus: regulator-2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&reg_usb0_vbus_pins_mbmx28lc>;
+ regulator-name = "usb0_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- reg_usb1_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- pinctrl-names = "default";
- pinctrl-0 = <&reg_usb1_vbus_pins_mbmx28lc>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio1 19 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ reg_usb1_vbus: regulator-3 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&reg_usb1_vbus_pins_mbmx28lc>;
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-evk.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-evk.dts
index 783abb82b2a8..9ebb7371e235 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-evk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-evk.dts
@@ -117,7 +117,7 @@
backlight_display: backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 2 5000000>;
+ pwms = <&pwm 2 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-lwe.dtsi b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-lwe.dtsi
index bb971e660db8..69fcb0dde940 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-lwe.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-lwe.dtsi
@@ -18,6 +18,7 @@
memory@40000000 {
reg = <0x40000000 0x08000000>;
+ device_type = "memory";
};
reg_3v3: regulator-reg-3v3 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28.dtsi b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28.dtsi
index c08b14ad7cd5..66facef10ba9 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28.dtsi
@@ -14,19 +14,12 @@
reg = <0x40000000 0x08000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28cu3.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28cu3.dts
index 6b01de9efd02..34b4d3246db1 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28cu3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28cu3.dts
@@ -17,7 +17,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 3 5000000>;
+ pwms = <&pwm 3 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
@@ -40,47 +40,37 @@
};
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_vddio_sd0: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "vddio-sd0";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio3 29 0>;
- };
+ reg_vddio_sd0: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "vddio-sd0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio3 29 0>;
+ };
- reg_vddio_sd1: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "vddio-sd1";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 19 0>;
- };
+ reg_vddio_sd1: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "vddio-sd1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 19 0>;
+ };
- reg_usb1_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 8 0>;
- enable-active-high;
- };
+ reg_usb1_vbus: regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 8 0>;
+ enable-active-high;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28evk.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28evk.dts
index e350d57a4cec..13070ca08cff 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28evk.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-m28evk.dts
@@ -13,38 +13,33 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 4 5000000>;
+ pwms = <&pwm 4 5000000 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
- regulators {
- reg_vddio_sd0: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "vddio-sd0";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio3 28 0>;
- };
+ reg_vddio_sd0: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "vddio-sd0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio3 28 0>;
+ };
- reg_usb0_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb0_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 12 0>;
- };
+ reg_usb0_vbus: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 12 0>;
+ };
- reg_usb1_vbus: regulator@3 {
- compatible = "regulator-fixed";
- reg = <3>;
- regulator-name = "usb1_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 13 0>;
- };
+ reg_usb1_vbus: regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 13 0>;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-sps1.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-sps1.dts
index 5d74a68c56ff..0f01dded4e3d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-sps1.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-sps1.dts
@@ -15,19 +15,12 @@
reg = <0x40000000 0x08000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_usb0_vbus: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "usb0_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 9 0>;
- };
+ reg_usb0_vbus: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 9 0>;
};
leds {
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-tx28.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-tx28.dts
index 23ad7cd0a1de..5485fe118dc4 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-tx28.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-tx28.dts
@@ -131,7 +131,7 @@
backlight {
compatible = "pwm-backlight";
- pwms = <&pwm 0 500000>;
+ pwms = <&pwm 0 500000 0>;
/*
* a silly way to create a 1:1 relationship between the
* PWM value and the actual duty cycle
@@ -260,6 +260,7 @@
sgtl5000: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
+ #sound-dai-cells = <0>;
VDDA-supply = <&reg_2p5v>;
VDDIO-supply = <&reg_3p3v>;
clocks = <&mclk>;
@@ -652,6 +653,7 @@
vbus-supply = <&reg_usb0_vbus>;
disable-over-current;
dr_mode = "peripheral";
+ phy_type = "utmi";
status = "okay";
};
@@ -659,19 +661,18 @@
vbus-supply = <&reg_usb1_vbus>;
disable-over-current;
dr_mode = "host";
+ phy_type = "utmi";
status = "okay";
};
&usbphy0 {
pinctrl-names = "default";
pinctrl-0 = <&tx28_usbphy0_pins>;
- phy_type = "utmi";
status = "okay";
};
&usbphy1 {
pinctrl-names = "default";
pinctrl-0 = <&tx28_usbphy1_pins>;
- phy_type = "utmi";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-xea.dts b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-xea.dts
index a400c108f66a..6c5e6856648a 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-xea.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28-xea.dts
@@ -8,6 +8,7 @@
#include "imx28-lwe.dtsi"
/ {
+ model = "Liebherr XEA board";
compatible = "lwn,imx28-xea", "fsl,imx28";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28.dtsi b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28.dtsi
index 29e37b1fae66..4817fba2d938 100644
--- a/sys/contrib/device-tree/src/arm/nxp/mxs/imx28.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/mxs/imx28.dtsi
@@ -81,10 +81,10 @@
dma_apbh: dma-controller@80004000 {
compatible = "fsl,imx28-dma-apbh";
reg = <0x80004000 0x2000>;
- interrupts = <82 83 84 85
- 88 88 88 88
- 88 88 88 88
- 87 86 0 0>;
+ interrupts = <82>, <83>, <84>, <85>,
+ <88>, <88>, <88>, <88>,
+ <88>, <88>, <88>, <88>,
+ <87>, <86>, <0>, <0>;
#dma-cells = <1>;
dma-channels = <16>;
clocks = <&clks 25>;
@@ -164,7 +164,7 @@
reg = <0x80018000 0x2000>;
gpio0: gpio@0 {
- compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx28-gpio";
reg = <0>;
interrupts = <127>;
gpio-controller;
@@ -174,7 +174,7 @@
};
gpio1: gpio@1 {
- compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx28-gpio";
reg = <1>;
interrupts = <126>;
gpio-controller;
@@ -184,7 +184,7 @@
};
gpio2: gpio@2 {
- compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx28-gpio";
reg = <2>;
interrupts = <125>;
gpio-controller;
@@ -194,7 +194,7 @@
};
gpio3: gpio@3 {
- compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx28-gpio";
reg = <3>;
interrupts = <124>;
gpio-controller;
@@ -204,7 +204,7 @@
};
gpio4: gpio@4 {
- compatible = "fsl,imx28-gpio", "fsl,mxs-gpio";
+ compatible = "fsl,imx28-gpio";
reg = <4>;
interrupts = <123>;
gpio-controller;
@@ -990,22 +990,22 @@
status = "disabled";
};
- dma_apbx: dma-apbx@80024000 {
+ dma_apbx: dma-controller@80024000 {
compatible = "fsl,imx28-dma-apbx";
reg = <0x80024000 0x2000>;
- interrupts = <78 79 66 0
- 80 81 68 69
- 70 71 72 73
- 74 75 76 77>;
+ interrupts = <78>, <79>, <66>, <0>,
+ <80>, <81>, <68>, <69>,
+ <70>, <71>, <72>, <73>,
+ <74>, <75>, <76>, <77>;
#dma-cells = <1>;
dma-channels = <16>;
clocks = <&clks 26>;
};
dcp: crypto@80028000 {
- compatible = "fsl,imx28-dcp", "fsl,imx23-dcp";
+ compatible = "fsl,imx28-dcp";
reg = <0x80028000 0x2000>;
- interrupts = <52 53 54>;
+ interrupts = <52>, <53>, <54>;
status = "okay";
};
@@ -1100,7 +1100,7 @@
ranges;
clks: clkctrl@80040000 {
- compatible = "fsl,imx28-clkctrl", "fsl,clkctrl";
+ compatible = "fsl,imx28-clkctrl";
reg = <0x80040000 0x2000>;
#clock-cells = <1>;
};
@@ -1136,8 +1136,8 @@
lradc: lradc@80050000 {
compatible = "fsl,imx28-lradc";
reg = <0x80050000 0x2000>;
- interrupts = <10 14 15 16 17 18 19
- 20 21 22 23 24 25>;
+ interrupts = <10>, <14>, <15>, <16>, <17>, <18>, <19>,
+ <20>, <21>, <22>, <23>, <24>, <25>;
status = "disabled";
clocks = <&clks 41>;
#io-channel-cells = <1>;
@@ -1185,7 +1185,7 @@
compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
reg = <0x80064000 0x2000>;
clocks = <&clks 44>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
fsl,pwm-number = <8>;
status = "disabled";
};
@@ -1193,7 +1193,7 @@
timer: timrot@80068000 {
compatible = "fsl,imx28-timrot", "fsl,timrot";
reg = <0x80068000 0x2000>;
- interrupts = <48 49 50 51>;
+ interrupts = <48>, <49>, <50>, <51>;
clocks = <&clks 26>;
};
@@ -1252,7 +1252,7 @@
reg = <0x80074000 0x1000>;
interrupts = <47>;
clocks = <&clks 45>, <&clks 26>;
- clock-names = "uart", "apb_pclk";
+ clock-names = "uartclk", "apb_pclk";
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf-colibri-eval-v3.dtsi b/sys/contrib/device-tree/src/arm/nxp/vf/vf-colibri-eval-v3.dtsi
index 14c411f146f5..5a19da9313ae 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf-colibri-eval-v3.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf-colibri-eval-v3.dtsi
@@ -55,7 +55,7 @@
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
power-supply = <&reg_3v3>;
- status = "okay";
+ status = "okay";
};
&dcu0 {
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-bk4.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-bk4.dts
index e4f691d601cc..722182f5fd17 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-bk4.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-bk4.dts
@@ -68,7 +68,7 @@
#address-cells = <1>;
#size-cells = <0>;
/* PTD12 ->RPIO[91] */
- sck-gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
+ sck-gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
/* PTD10 ->RPIO[89] */
miso-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
num-chipselects = <0>;
@@ -79,7 +79,7 @@
gpio-controller;
#gpio-cells = <2>;
/* PTB18 -> RGPIO[40] */
- load-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+ load-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
spi-max-frequency = <100000>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-twr.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-twr.dts
index 6c246d5aa032..876c14ecceb6 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-twr.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-twr.dts
@@ -30,27 +30,20 @@
clock-frequency = <50000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
- reg_3p3v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
- reg_vcc_3v3_mcu: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "vcc_3v3_mcu";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
+ reg_vcc_3v3_mcu: regulator-vcc-3v3-mcu {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v3_mcu";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
};
sound {
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-cfu1.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-cfu1.dts
index 1a19aec8957b..7e72f860c3c5 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-cfu1.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-cfu1.dts
@@ -162,7 +162,7 @@
suppress-preamble;
status = "okay";
- switch0: switch0@0 {
+ switch0: ethernet-switch@0 {
compatible = "marvell,mv88e6085";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_switch>;
@@ -173,26 +173,26 @@
interrupt-controller;
#interrupt-cells = <2>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
label = "eth_cu_1000_1";
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "eth_cu_1000_2";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "eth_cu_1000_3";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "eth_fc_1000_1";
phy-mode = "1000base-x";
@@ -200,7 +200,7 @@
sfp = <&sff>;
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
phy-mode = "rmii";
ethernet = <&fec1>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-dev-rev-b.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-dev-rev-b.dts
index 16b4e06c4efa..029f49be40e3 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-dev-rev-b.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-dev-rev-b.dts
@@ -294,11 +294,11 @@
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
- sck-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ sck-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
mosi-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
miso-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
- cs-gpios = <&gpio1 9 GPIO_ACTIVE_LOW
- &gpio1 8 GPIO_ACTIVE_HIGH>;
+ cs-gpios = <&gpio1 9 GPIO_ACTIVE_LOW
+ &gpio1 8 GPIO_ACTIVE_HIGH>;
num-chipselects = <2>;
flash@0 {
@@ -338,6 +338,7 @@
reg = <0x22>;
gpio-controller;
#gpio-cells = <2>;
+ #interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&gpio3>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-scu4-aib.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-scu4-aib.dts
index df1335492a19..77492eeea450 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-scu4-aib.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-scu4-aib.dts
@@ -47,17 +47,17 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0: switch0@0 {
+ switch0: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
reg = <0>;
dsa,member = <0 0>;
eeprom-length = <65536>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
phy-mode = "rmii";
ethernet = <&fec1>;
@@ -68,37 +68,37 @@
};
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "aib2main_1";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "aib2main_2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "eth_cu_1000_5";
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "eth_cu_1000_6";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "eth_cu_1000_4";
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "eth_cu_1000_7";
};
- port@7 {
+ ethernet-port@7 {
reg = <7>;
label = "modem_pic";
@@ -108,7 +108,7 @@
};
};
- switch0port10: port@10 {
+ switch0port10: ethernet-port@10 {
reg = <10>;
label = "dsa";
phy-mode = "xgmii";
@@ -130,32 +130,32 @@
#address-cells = <1>;
#size-cells = <0>;
- switch1: switch1@0 {
+ switch1: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
reg = <0>;
dsa,member = <0 1>;
eeprom-length = <65536>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "eth_cu_1000_3";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "eth_cu_100_2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "eth_cu_100_3";
};
- switch1port9: port@9 {
+ switch1port9: ethernet-port@9 {
reg = <9>;
label = "dsa";
phy-mode = "xgmii";
@@ -168,7 +168,7 @@
};
};
- switch1port10: port@10 {
+ switch1port10: ethernet-port@10 {
reg = <10>;
label = "dsa";
phy-mode = "xgmii";
@@ -188,17 +188,17 @@
#address-cells = <1>;
#size-cells = <0>;
- switch2: switch2@0 {
+ switch2: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
reg = <0>;
dsa,member = <0 2>;
eeprom-length = <65536>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "eth_fc_1000_2";
phy-mode = "1000base-x";
@@ -206,7 +206,7 @@
sfp = <&sff1>;
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "eth_fc_1000_3";
phy-mode = "1000base-x";
@@ -214,7 +214,7 @@
sfp = <&sff2>;
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "eth_fc_1000_4";
phy-mode = "1000base-x";
@@ -222,7 +222,7 @@
sfp = <&sff3>;
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "eth_fc_1000_5";
phy-mode = "1000base-x";
@@ -230,7 +230,7 @@
sfp = <&sff4>;
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "eth_fc_1000_6";
phy-mode = "1000base-x";
@@ -238,7 +238,7 @@
sfp = <&sff5>;
};
- port@7 {
+ ethernet-port@7 {
reg = <7>;
label = "eth_fc_1000_7";
phy-mode = "1000base-x";
@@ -246,7 +246,7 @@
sfp = <&sff6>;
};
- port@9 {
+ ethernet-port@9 {
reg = <9>;
label = "eth_fc_1000_1";
phy-mode = "1000base-x";
@@ -254,7 +254,7 @@
sfp = <&sff0>;
};
- switch2port10: port@10 {
+ switch2port10: ethernet-port@10 {
reg = <10>;
label = "dsa";
phy-mode = "2500base-x";
@@ -276,17 +276,17 @@
#address-cells = <1>;
#size-cells = <0>;
- switch3: switch3@0 {
+ switch3: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
reg = <0>;
dsa,member = <0 3>;
eeprom-length = <65536>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "eth_fc_1000_8";
phy-mode = "1000base-x";
@@ -294,7 +294,7 @@
sfp = <&sff7>;
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "eth_fc_1000_9";
phy-mode = "1000base-x";
@@ -302,7 +302,7 @@
sfp = <&sff8>;
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "eth_fc_1000_10";
phy-mode = "1000base-x";
@@ -310,7 +310,7 @@
sfp = <&sff9>;
};
- switch3port9: port@9 {
+ switch3port9: ethernet-port@9 {
reg = <9>;
label = "dsa";
phy-mode = "2500base-x";
@@ -322,7 +322,7 @@
};
};
- switch3port10: port@10 {
+ switch3port10: ethernet-port@10 {
reg = <10>;
label = "dsa";
phy-mode = "xgmii";
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-spb4.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-spb4.dts
index 1461804ecaea..2a490464660c 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-spb4.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-spb4.dts
@@ -123,7 +123,7 @@
suppress-preamble;
status = "okay";
- switch0: switch0@0 {
+ switch0: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
pinctrl-0 = <&pinctrl_gpio_switch0>;
pinctrl-names = "default";
@@ -134,11 +134,11 @@
interrupt-controller;
#interrupt-cells = <2>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
phy-mode = "rmii";
ethernet = <&fec1>;
@@ -149,32 +149,32 @@
};
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "eth_cu_1000_1";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "eth_cu_1000_2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "eth_cu_1000_3";
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "eth_cu_1000_4";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "eth_cu_1000_5";
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "eth_cu_1000_6";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-dtu.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-dtu.dts
index 463c2452b9b7..078d8699e16d 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-dtu.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-dtu.dts
@@ -112,7 +112,7 @@
suppress-preamble;
status = "okay";
- switch0: switch0@0 {
+ switch0: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
pinctrl-0 = <&pinctrl_gpio_switch0>;
pinctrl-names = "default";
@@ -123,11 +123,11 @@
interrupt-controller;
#interrupt-cells = <2>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
phy-mode = "rmii";
ethernet = <&fec1>;
@@ -138,27 +138,27 @@
};
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "eth_cu_100_3";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "eth_cu_1000_4";
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "eth_cu_1000_5";
};
- port@8 {
+ ethernet-port@8 {
reg = <8>;
label = "eth_cu_1000_1";
};
- port@9 {
+ ethernet-port@9 {
reg = <9>;
label = "eth_cu_1000_2";
phy-handle = <&phy9>;
@@ -167,12 +167,12 @@
};
};
- mdio1 {
+ mdio-external {
compatible = "marvell,mv88e6xxx-mdio-external";
#address-cells = <1>;
#size-cells = <0>;
- phy9: phy9@0 {
+ phy9: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c45";
pinctrl-0 = <&pinctrl_gpio_phy9>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-spu3.dts b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-spu3.dts
index f5ae0d5de315..22c8f44390a9 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-spu3.dts
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vf610-zii-ssmb-spu3.dts
@@ -137,7 +137,7 @@
suppress-preamble;
status = "okay";
- switch0: switch0@0 {
+ switch0: ethernet-switch@0 {
compatible = "marvell,mv88e6190";
pinctrl-0 = <&pinctrl_gpio_switch0>;
pinctrl-names = "default";
@@ -148,11 +148,11 @@
interrupt-controller;
#interrupt-cells = <2>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
phy-mode = "rmii";
ethernet = <&fec1>;
@@ -163,32 +163,32 @@
};
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "eth_cu_1000_1";
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "eth_cu_1000_2";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "eth_cu_1000_3";
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "eth_cu_1000_4";
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "eth_cu_1000_5";
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "eth_cu_1000_6";
};
diff --git a/sys/contrib/device-tree/src/arm/nxp/vf/vfxxx.dtsi b/sys/contrib/device-tree/src/arm/nxp/vf/vfxxx.dtsi
index 3f7dc787938e..acccf9a3c898 100644
--- a/sys/contrib/device-tree/src/arm/nxp/vf/vfxxx.dtsi
+++ b/sys/contrib/device-tree/src/arm/nxp/vf/vfxxx.dtsi
@@ -111,8 +111,7 @@
interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_UART0>;
clock-names = "ipg";
- dmas = <&edma0 0 2>,
- <&edma0 0 3>;
+ dmas = <&edma0 0 2>, <&edma0 0 3>;
dma-names = "rx","tx";
status = "disabled";
};
@@ -123,8 +122,7 @@
interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_UART1>;
clock-names = "ipg";
- dmas = <&edma0 0 4>,
- <&edma0 0 5>;
+ dmas = <&edma0 0 4>, <&edma0 0 5>;
dma-names = "rx","tx";
status = "disabled";
};
@@ -135,8 +133,7 @@
interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_UART2>;
clock-names = "ipg";
- dmas = <&edma0 0 6>,
- <&edma0 0 7>;
+ dmas = <&edma0 0 6>, <&edma0 0 7>;
dma-names = "rx","tx";
status = "disabled";
};
@@ -147,8 +144,7 @@
interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_UART3>;
clock-names = "ipg";
- dmas = <&edma0 0 8>,
- <&edma0 0 9>;
+ dmas = <&edma0 0 8>, <&edma0 0 9>;
dma-names = "rx","tx";
status = "disabled";
};
@@ -162,8 +158,7 @@
clocks = <&clks VF610_CLK_DSPI0>;
clock-names = "dspi";
spi-num-chipselects = <6>;
- dmas = <&edma1 1 12>,
- <&edma1 1 13>;
+ dmas = <&edma1 1 12>, <&edma1 1 13>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -177,8 +172,7 @@
clocks = <&clks VF610_CLK_DSPI1>;
clock-names = "dspi";
spi-num-chipselects = <4>;
- dmas = <&edma1 1 14>,
- <&edma1 1 15>;
+ dmas = <&edma1 1 14>, <&edma1 1 15>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -426,8 +420,7 @@
interrupts = <72 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_I2C1>;
clock-names = "ipg";
- dmas = <&edma0 0 52>,
- <&edma0 0 53>;
+ dmas = <&edma0 0 52>, <&edma0 0 53>;
dma-names = "rx","tx";
status = "disabled";
};
@@ -551,8 +544,7 @@
clocks = <&clks VF610_CLK_DSPI3>;
clock-names = "dspi";
spi-num-chipselects = <2>;
- dmas = <&edma1 0 12>,
- <&edma1 0 13>;
+ dmas = <&edma1 0 12>, <&edma1 0 13>;
dma-names = "rx", "tx";
status = "disabled";
};
@@ -569,7 +561,7 @@
<20000000>;
};
- esdhc0: esdhc@400b1000 {
+ esdhc0: mmc@400b1000 {
compatible = "fsl,imx53-esdhc";
reg = <0x400b1000 0x1000>;
interrupts = <27 IRQ_TYPE_LEVEL_HIGH>;
@@ -580,7 +572,7 @@
status = "disabled";
};
- esdhc1: esdhc@400b2000 {
+ esdhc1: mmc@400b2000 {
compatible = "fsl,imx53-esdhc";
reg = <0x400b2000 0x1000>;
interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
@@ -719,8 +711,7 @@
interrupts = <74 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks VF610_CLK_I2C3>;
clock-names = "ipg";
- dmas = <&edma0 1 38>,
- <&edma0 1 39>;
+ dmas = <&edma0 1 38>, <&edma0 1 39>;
dma-names = "rx","tx";
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8018.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8018.dtsi
new file mode 100644
index 000000000000..22f3c7bac522
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8018.dtsi
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Device Tree Source for Qualcomm PM8018
+ *
+ * Copyright (C) 2016 BayLibre, SAS.
+ * Author : Neil Armstrong <narmstrong@baylibre.com>
+ */
+
+&ssbi {
+ pm8018: pmic {
+ compatible = "qcom,pm8018", "qcom,pm8921";
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pwrkey@1c {
+ compatible = "qcom,pm8018-pwrkey",
+ "qcom,pm8921-pwrkey";
+ reg = <0x1c>;
+ interrupts-extended = <&pm8018 50 IRQ_TYPE_EDGE_RISING>,
+ <&pm8018 51 IRQ_TYPE_EDGE_RISING>;
+ debounce = <15625>;
+ pull-up;
+ };
+
+ pm8018_mpps: mpps@50 {
+ compatible = "qcom,pm8018-mpp", "qcom,ssbi-mpp";
+ reg = <0x50>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8018_mpps 0 0 6>;
+ };
+
+ rtc@11d {
+ compatible = "qcom,pm8018-rtc", "qcom,pm8921-rtc";
+ reg = <0x11d>;
+ interrupts-extended = <&pm8018 39 IRQ_TYPE_EDGE_RISING>;
+ allow-set-time;
+ };
+
+ pm8018_gpio: gpio@150 {
+ compatible = "qcom,pm8058-gpio",
+ "qcom,ssbi-gpio";
+ reg = <0x150>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ gpio-ranges = <&pm8018_gpio 0 0 6>;
+ #gpio-cells = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8058.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8058.dtsi
new file mode 100644
index 000000000000..984b79777984
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8058.dtsi
@@ -0,0 +1,159 @@
+// SPDX-License-Identifier: GPL-2.0
+
+&ssbi {
+ pm8058: pmic {
+ compatible = "qcom,pm8058";
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pwrkey@1c {
+ compatible = "qcom,pm8058-pwrkey";
+ reg = <0x1c>;
+ interrupts-extended = <&pm8058 50 IRQ_TYPE_EDGE_RISING>,
+ <&pm8058 51 IRQ_TYPE_EDGE_RISING>;
+ debounce = <15625>;
+ pull-up;
+ };
+
+ pm8058_led48: led@48 {
+ compatible = "qcom,pm8058-keypad-led";
+ reg = <0x48>;
+ status = "disabled";
+ };
+
+ vibrator@4a {
+ compatible = "qcom,pm8058-vib";
+ reg = <0x4a>;
+ };
+
+ pm8058_mpps: mpps@50 {
+ compatible = "qcom,pm8058-mpp",
+ "qcom,ssbi-mpp";
+ reg = <0x50>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8058_mpps 0 0 12>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm8058_led131: led@131 {
+ compatible = "qcom,pm8058-led";
+ reg = <0x131>;
+ status = "disabled";
+ };
+
+ pm8058_led132: led@132 {
+ compatible = "qcom,pm8058-led";
+ reg = <0x132>;
+ status = "disabled";
+ };
+
+ pm8058_led133: led@133 {
+ compatible = "qcom,pm8058-led";
+ reg = <0x133>;
+ status = "disabled";
+ };
+
+ pm8058_keypad: keypad@148 {
+ compatible = "qcom,pm8058-keypad";
+ reg = <0x148>;
+ interrupts-extended = <&pm8058 74 IRQ_TYPE_EDGE_RISING>,
+ <&pm8058 75 IRQ_TYPE_EDGE_RISING>;
+ debounce = <15>;
+ scan-delay = <32>;
+ row-hold = <91500>;
+ };
+
+ pm8058_gpio: gpio@150 {
+ compatible = "qcom,pm8058-gpio",
+ "qcom,ssbi-gpio";
+ reg = <0x150>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ gpio-ranges = <&pm8058_gpio 0 0 44>;
+ #gpio-cells = <2>;
+ };
+
+ pm8058_xoadc: xoadc@197 {
+ compatible = "qcom,pm8058-adc";
+ reg = <0x197>;
+ interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #io-channel-cells = <2>;
+
+ vcoin: adc-channel@0 {
+ reg = <0x00 0x00>;
+ };
+
+ vbat: adc-channel@1 {
+ reg = <0x00 0x01>;
+ };
+
+ dcin: adc-channel@2 {
+ reg = <0x00 0x02>;
+ };
+
+ ichg: adc-channel@3 {
+ reg = <0x00 0x03>;
+ };
+
+ vph_pwr: adc-channel@4 {
+ reg = <0x00 0x04>;
+ };
+
+ usb_vbus: adc-channel@a {
+ reg = <0x00 0x0a>;
+ };
+
+ die_temp: adc-channel@b {
+ reg = <0x00 0x0b>;
+ };
+
+ ref_625mv: adc-channel@c {
+ reg = <0x00 0x0c>;
+ };
+
+ ref_1250mv: adc-channel@d {
+ reg = <0x00 0x0d>;
+ };
+
+ ref_325mv: adc-channel@e {
+ reg = <0x00 0x0e>;
+ };
+
+ ref_muxoff: adc-channel@f {
+ reg = <0x00 0x0f>;
+ };
+ };
+
+ rtc@1e8 {
+ compatible = "qcom,pm8058-rtc";
+ reg = <0x1e8>;
+ interrupts-extended = <&pm8058 39 IRQ_TYPE_EDGE_RISING>;
+ allow-set-time;
+ };
+ };
+};
+
+/ {
+ /*
+ * These channels from the ADC are simply hardware monitors.
+ * That is why the ADC is referred to as "HKADC" - HouseKeeping
+ * ADC.
+ */
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&pm8058_xoadc 0x00 0x01>, /* Battery */
+ <&pm8058_xoadc 0x00 0x02>, /* DC in (charger) */
+ <&pm8058_xoadc 0x00 0x04>, /* VPH the main system voltage */
+ <&pm8058_xoadc 0x00 0x0b>, /* Die temperature */
+ <&pm8058_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
+ <&pm8058_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
+ <&pm8058_xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8226.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8226.dtsi
new file mode 100644
index 000000000000..2fd4f135ed84
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8226.dtsi
@@ -0,0 +1,182 @@
+// SPDX-License-Identifier: BSD-3-Clause
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pm8226-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8226_temp>;
+
+ trips {
+ trip0 {
+ temperature = <105000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <125000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ crit {
+ temperature = <145000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+ pm8226_0: pm8226@0 {
+ compatible = "qcom,pm8226", "qcom,spmi-pmic";
+ reg = <0x0 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pon@800 {
+ compatible = "qcom,pm8916-pon";
+ reg = <0x800>;
+
+ pwrkey {
+ compatible = "qcom,pm8941-pwrkey";
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ linux,code = <KEY_POWER>;
+ };
+
+ pm8226_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ status = "disabled";
+ };
+ };
+
+ smbb: charger@1000 {
+ compatible = "qcom,pm8226-charger";
+ reg = <0x1000>;
+ interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "chg-done",
+ "chg-fast",
+ "chg-trkl",
+ "bat-temp-ok",
+ "bat-present",
+ "chg-gone",
+ "usb-valid",
+ "dc-valid";
+
+ status = "disabled";
+
+ chg_otg: otg-vbus { };
+ };
+
+ pm8226_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
+ io-channels = <&pm8226_vadc VADC_DIE_TEMP>;
+ io-channel-names = "thermal";
+ #thermal-sensor-cells = <0>;
+ };
+
+ pm8226_vadc: adc@3100 {
+ compatible = "qcom,spmi-vadc";
+ reg = <0x3100>;
+ interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+
+ channel@7 {
+ reg = <VADC_VSYS>;
+ qcom,pre-scaling = <1 3>;
+ label = "vph_pwr";
+ };
+ channel@8 {
+ reg = <VADC_DIE_TEMP>;
+ label = "die_temp";
+ };
+ channel@9 {
+ reg = <VADC_REF_625MV>;
+ label = "ref_625mv";
+ };
+ channel@a {
+ reg = <VADC_REF_1250MV>;
+ label = "ref_1250mv";
+ };
+ channel@e {
+ reg = <VADC_GND_REF>;
+ };
+ channel@f {
+ reg = <VADC_VDD_VADC>;
+ };
+ };
+
+ pm8226_iadc: adc@3600 {
+ compatible = "qcom,pm8226-iadc", "qcom,spmi-iadc";
+ reg = <0x3600>;
+ interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>, <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ pm8226_mpps: mpps@a000 {
+ compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8226_mpps 0 0 8>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm8226_gpios: gpio@c000 {
+ compatible = "qcom,pm8226-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8226_gpios 0 0 8>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
+ pm8226_1: pm8226@1 {
+ compatible = "qcom,pm8226", "qcom,spmi-pmic";
+ reg = <0x1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8226_spmi_regulators: regulators {
+ compatible = "qcom,pm8226-regulators";
+ };
+
+ pm8226_vib: vibrator@c000 {
+ compatible = "qcom,pm8916-vib";
+ reg = <0xc000>;
+ status = "disabled";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8821.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8821.dtsi
new file mode 100644
index 000000000000..064e3ba54e18
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8821.dtsi
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/* This PMIC is used on a secondary SSBI bus */
+&ssbi2 {
+ pm8821: pmic {
+ compatible = "qcom,pm8821";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8821_mpps: mpps@50 {
+ compatible = "qcom,pm8821-mpp", "qcom,ssbi-mpp";
+ reg = <0x50>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8821_mpps 0 0 4>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8841.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8841.dtsi
new file mode 100644
index 000000000000..3bf2ce5c86a6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8841.dtsi
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+
+/ {
+ thermal-zones {
+ pm8841-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8841_temp>;
+
+ trips {
+ trip0 {
+ temperature = <105000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <125000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ crit {
+ temperature = <140000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+
+ pm8841_0: pm8841@4 {
+ compatible = "qcom,pm8841", "qcom,spmi-pmic";
+ reg = <0x4 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8841_mpps: mpps@a000 {
+ compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8841_mpps 0 0 4>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm8841_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
+ #thermal-sensor-cells = <0>;
+ };
+ };
+
+ pm8841_1: pm8841@5 {
+ compatible = "qcom,pm8841", "qcom,spmi-pmic";
+ reg = <0x5 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8921.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8921.dtsi
new file mode 100644
index 000000000000..058962af3005
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8921.dtsi
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0
+
+&ssbi {
+ pm8921: pmic {
+ compatible = "qcom,pm8921";
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pwrkey@1c {
+ compatible = "qcom,pm8921-pwrkey";
+ reg = <0x1c>;
+ interrupts-extended = <&pm8921 50 IRQ_TYPE_EDGE_RISING>,
+ <&pm8921 51 IRQ_TYPE_EDGE_RISING>;
+ debounce = <15625>;
+ pull-up;
+ };
+
+ pm8921_mpps: mpps@50 {
+ compatible = "qcom,pm8921-mpp",
+ "qcom,ssbi-mpp";
+ reg = <0x50>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8921_mpps 0 0 12>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ rtc@11d {
+ compatible = "qcom,pm8921-rtc";
+ reg = <0x11d>;
+ interrupts-extended = <&pm8921 39 IRQ_TYPE_EDGE_RISING>;
+ allow-set-time;
+ };
+
+ pm8921_keypad: keypad@148 {
+ compatible = "qcom,pm8921-keypad";
+ reg = <0x148>;
+ interrupts-extended = <&pm8921 74 IRQ_TYPE_EDGE_RISING>,
+ <&pm8921 75 IRQ_TYPE_EDGE_RISING>;
+ debounce = <15>;
+ scan-delay = <32>;
+ row-hold = <91500>;
+ status = "disabled";
+ };
+
+ pm8921_gpio: gpio@150 {
+
+ compatible = "qcom,pm8921-gpio",
+ "qcom,ssbi-gpio";
+ reg = <0x150>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ gpio-ranges = <&pm8921_gpio 0 0 44>;
+ #gpio-cells = <2>;
+
+ };
+
+ pm8921_xoadc: xoadc@197 {
+ compatible = "qcom,pm8921-adc";
+ reg = <0x197>;
+ interrupts-extended = <&pm8921 78 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #io-channel-cells = <2>;
+
+ vcoin: adc-channel@0 {
+ reg = <0x00 0x00>;
+ };
+
+ vbat: adc-channel@1 {
+ reg = <0x00 0x01>;
+ };
+
+ dcin: adc-channel@2 {
+ reg = <0x00 0x02>;
+ };
+
+ vph_pwr: adc-channel@4 {
+ reg = <0x00 0x04>;
+ };
+
+ batt_therm: adc-channel@8 {
+ reg = <0x00 0x08>;
+ };
+
+ batt_id: adc-channel@9 {
+ reg = <0x00 0x09>;
+ };
+
+ usb_vbus: adc-channel@a {
+ reg = <0x00 0x0a>;
+ };
+
+ die_temp: adc-channel@b {
+ reg = <0x00 0x0b>;
+ };
+
+ ref_625mv: adc-channel@c {
+ reg = <0x00 0x0c>;
+ };
+
+ ref_1250mv: adc-channel@d {
+ reg = <0x00 0x0d>;
+ };
+
+ chg_temp: adc-channel@e {
+ reg = <0x00 0x0e>;
+ };
+
+ ref_muxoff: adc-channel@f {
+ reg = <0x00 0x0f>;
+ };
+ };
+ };
+};
+
+/ {
+ /*
+ * These channels from the ADC are simply hardware monitors.
+ * That is why the ADC is referred to as "HKADC" - HouseKeeping
+ * ADC.
+ */
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&pm8921_xoadc 0x00 0x01>, /* Battery */
+ <&pm8921_xoadc 0x00 0x02>, /* DC in (charger) */
+ <&pm8921_xoadc 0x00 0x04>, /* VPH the main system voltage */
+ <&pm8921_xoadc 0x00 0x0b>, /* Die temperature */
+ <&pm8921_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
+ <&pm8921_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
+ <&pm8921_xoadc 0x00 0x0e>; /* Charger temperature */
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pm8941.dtsi b/sys/contrib/device-tree/src/arm/qcom/pm8941.dtsi
new file mode 100644
index 000000000000..aca0052a02b7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pm8941.dtsi
@@ -0,0 +1,256 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+
+/ {
+ thermal-zones {
+ pm8941-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8941_temp>;
+
+ trips {
+ trip0 {
+ temperature = <105000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <125000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ crit {
+ temperature = <145000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+
+ pm8941_0: pm8941@0 {
+ compatible = "qcom,pm8941", "qcom,spmi-pmic";
+ reg = <0x0 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>,
+ <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ pon@800 {
+ compatible = "qcom,pm8941-pon";
+ reg = <0x800>;
+
+ pwrkey {
+ compatible = "qcom,pm8941-pwrkey";
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ };
+
+ pm8941_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ status = "disabled";
+ };
+ };
+
+ usb_id: usb-detect@900 {
+ compatible = "qcom,pm8941-misc";
+ reg = <0x900>;
+ interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "usb_id";
+ };
+
+ smbb: charger@1000 {
+ compatible = "qcom,pm8941-charger";
+ reg = <0x1000>;
+ interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "chg-done",
+ "chg-fast",
+ "chg-trkl",
+ "bat-temp-ok",
+ "bat-present",
+ "chg-gone",
+ "usb-valid",
+ "dc-valid";
+
+ usb-otg-in-supply = <&pm8941_5vs1>;
+
+ status = "disabled";
+
+ chg_otg: otg-vbus { };
+ };
+
+ pm8941_gpios: gpio@c000 {
+ compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ gpio-ranges = <&pm8941_gpios 0 0 36>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ boost_bypass_n_pin: boost-bypass-state {
+ pins = "gpio21";
+ function = "normal";
+ };
+ };
+
+ pm8941_mpps: mpps@a000 {
+ compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8941_mpps 0 0 8>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm8941_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
+ io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
+ io-channel-names = "thermal";
+ #thermal-sensor-cells = <0>;
+ };
+
+ pm8941_vadc: adc@3100 {
+ compatible = "qcom,spmi-vadc";
+ reg = <0x3100>;
+ interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+
+
+ channel@6 {
+ reg = <VADC_VBAT_SNS>;
+ };
+
+ channel@8 {
+ reg = <VADC_DIE_TEMP>;
+ };
+
+ channel@9 {
+ reg = <VADC_REF_625MV>;
+ };
+
+ channel@a {
+ reg = <VADC_REF_1250MV>;
+ };
+
+ channel@e {
+ reg = <VADC_GND_REF>;
+ };
+
+ channel@f {
+ reg = <VADC_VDD_VADC>;
+ };
+
+ channel@30 {
+ reg = <VADC_LR_MUX1_BAT_THERM>;
+ };
+ };
+
+ pm8941_iadc: adc@3600 {
+ compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
+ reg = <0x3600>;
+ interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
+ qcom,external-resistor-micro-ohms = <10000>;
+ };
+
+ pm8941_coincell: charger@2800 {
+ compatible = "qcom,pm8941-coincell";
+ reg = <0x2800>;
+ status = "disabled";
+ };
+ };
+
+ pm8941_1: pm8941@1 {
+ compatible = "qcom,pm8941", "qcom,spmi-pmic";
+ reg = <0x1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8941_lpg: pwm {
+ compatible = "qcom,pm8941-lpg";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #pwm-cells = <2>;
+
+ status = "disabled";
+ };
+
+ pm8941_vib: vibrator@c000 {
+ compatible = "qcom,pm8916-vib";
+ reg = <0xc000>;
+ status = "disabled";
+ };
+
+ pm8941_wled: wled@d800 {
+ compatible = "qcom,pm8941-wled";
+ reg = <0xd800>;
+ label = "backlight";
+
+ status = "disabled";
+ };
+
+ regulators {
+ compatible = "qcom,pm8941-regulators";
+ interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
+ interrupt-names = "ocp-5vs1", "ocp-5vs2";
+ vin_5vs-supply = <&pm8941_5v>;
+
+ pm8941_5v: s4 {
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-enable-ramp-delay = <500>;
+ };
+
+ pm8941_5vs1: 5vs1 {
+ regulator-enable-ramp-delay = <1000>;
+ regulator-pull-down;
+ regulator-over-current-protection;
+ qcom,ocp-max-retries = <10>;
+ qcom,ocp-retry-delay = <30>;
+ qcom,vs-soft-start-strength = <0>;
+ regulator-initial-mode = <1>;
+ };
+
+ pm8941_5vs2: 5vs2 {
+ regulator-enable-ramp-delay = <1000>;
+ regulator-pull-down;
+ regulator-over-current-protection;
+ qcom,ocp-max-retries = <10>;
+ qcom,ocp-retry-delay = <30>;
+ qcom,vs-soft-start-strength = <0>;
+ regulator-initial-mode = <1>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pma8084.dtsi b/sys/contrib/device-tree/src/arm/qcom/pma8084.dtsi
new file mode 100644
index 000000000000..2985f4805b93
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pma8084.dtsi
@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+
+ pma8084_0: pma8084@0 {
+ compatible = "qcom,pma8084", "qcom,spmi-pmic";
+ reg = <0x0 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>,
+ <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ pwrkey@800 {
+ compatible = "qcom,pm8941-pwrkey";
+ reg = <0x800>;
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ };
+
+ pma8084_gpios: gpio@c000 {
+ compatible = "qcom,pma8084-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ gpio-ranges = <&pma8084_gpios 0 0 22>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pma8084_mpps: mpps@a000 {
+ compatible = "qcom,pma8084-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pma8084_mpps 0 0 8>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pma8084_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
+ #thermal-sensor-cells = <0>;
+ io-channels = <&pma8084_vadc VADC_DIE_TEMP>;
+ io-channel-names = "thermal";
+ };
+
+ pma8084_vadc: adc@3100 {
+ compatible = "qcom,spmi-vadc";
+ reg = <0x3100>;
+ interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+
+ channel@8 {
+ reg = <VADC_DIE_TEMP>;
+ };
+
+ channel@9 {
+ reg = <VADC_REF_625MV>;
+ };
+
+ channel@a {
+ reg = <VADC_REF_1250MV>;
+ };
+
+ channel@c {
+ reg = <VADC_SPARE1>;
+ };
+
+ channel@e {
+ reg = <VADC_GND_REF>;
+ };
+
+ channel@f {
+ reg = <VADC_VDD_VADC>;
+ };
+ };
+ };
+
+ pma8084_1: pma8084@1 {
+ compatible = "qcom,pma8084", "qcom,spmi-pmic";
+ reg = <0x1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pmx55.dtsi b/sys/contrib/device-tree/src/arm/qcom/pmx55.dtsi
new file mode 100644
index 000000000000..da0851173c69
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pmx55.dtsi
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: BSD-3-Clause
+
+/*
+ * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2020, Linaro Limited
+ */
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+ pmic@8 {
+ compatible = "qcom,pmx55", "qcom,spmi-pmic";
+ reg = <0x8 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pon@800 {
+ compatible = "qcom,pm8916-pon";
+ reg = <0x0800>;
+
+ status = "disabled";
+ };
+
+ pmx55_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0x8 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
+ io-channels = <&pmx55_adc ADC5_DIE_TEMP>;
+ io-channel-names = "thermal";
+ #thermal-sensor-cells = <0>;
+ };
+
+ pmx55_adc: adc@3100 {
+ compatible = "qcom,spmi-adc5";
+ reg = <0x3100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+ interrupts = <0x8 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+ channel@0 {
+ reg = <ADC5_REF_GND>;
+ qcom,pre-scaling = <1 1>;
+ label = "ref_gnd";
+ };
+
+ channel@1 {
+ reg = <ADC5_1P25VREF>;
+ qcom,pre-scaling = <1 1>;
+ label = "vref_1p25";
+ };
+
+ channel@6 {
+ reg = <ADC5_DIE_TEMP>;
+ qcom,pre-scaling = <1 1>;
+ label = "die_temp";
+ };
+
+ channel@9 {
+ reg = <ADC5_CHG_TEMP>;
+ qcom,pre-scaling = <1 1>;
+ label = "chg_temp";
+ };
+ };
+
+ pmx55_gpios: gpio@c000 {
+ compatible = "qcom,pmx55-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ gpio-ranges = <&pmx55_gpios 0 0 11>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
+ pmic@9 {
+ compatible = "qcom,pmx55", "qcom,spmi-pmic";
+ reg = <0x9 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/pmx65.dtsi b/sys/contrib/device-tree/src/arm/qcom/pmx65.dtsi
new file mode 100644
index 000000000000..1c7fdf59c1f5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/pmx65.dtsi
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+ pmic@1 {
+ compatible = "qcom,pmx65", "qcom,spmi-pmic";
+ reg = <1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmx65_temp: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ pmx65_gpios: gpio@8800 {
+ compatible = "qcom,pmx65-gpio", "qcom,spmi-gpio";
+ reg = <0x8800>;
+ gpio-controller;
+ gpio-ranges = <&pmx65_gpios 0 0 16>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-asus-sparrow.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-asus-sparrow.dts
index aa0e0e8d2a97..a2ca456012f1 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-asus-sparrow.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-asus-sparrow.dts
@@ -6,7 +6,7 @@
/dts-v1/;
#include "qcom-msm8226.dtsi"
-#include "qcom-pm8226.dtsi"
+#include "pm8226.dtsi"
/delete-node/ &adsp_region;
@@ -253,6 +253,8 @@
qcom,fast-charge-high-threshold-voltage = <4400000>;
qcom,auto-recharge-threshold-voltage = <4300000>;
qcom,minimum-input-voltage = <4400000>;
+
+ status = "okay";
};
&tlmm {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-huawei-sturgeon.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-huawei-sturgeon.dts
index de19640efe55..ac228965a485 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-huawei-sturgeon.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-huawei-sturgeon.dts
@@ -6,7 +6,7 @@
/dts-v1/;
#include "qcom-msm8226.dtsi"
-#include "qcom-pm8226.dtsi"
+#include "pm8226.dtsi"
#include <dt-bindings/input/ti-drv260x.h>
/delete-node/ &adsp_region;
@@ -335,6 +335,8 @@
qcom,fast-charge-current-limit = <300000>;
qcom,fast-charge-safe-current = <600000>;
qcom,auto-recharge-threshold-voltage = <4240000>;
+
+ status = "okay";
};
&tlmm {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-lg-lenok.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-lg-lenok.dts
index b887e5361ec3..0a1fd5eb3c6d 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-lg-lenok.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-lg-lenok.dts
@@ -6,7 +6,7 @@
/dts-v1/;
#include "qcom-msm8226.dtsi"
-#include "qcom-pm8226.dtsi"
+#include "pm8226.dtsi"
/delete-node/ &adsp_region;
@@ -292,6 +292,8 @@
qcom,fast-charge-high-threshold-voltage = <4350000>;
qcom,auto-recharge-threshold-voltage = <4240000>;
qcom,minimum-input-voltage = <4450000>;
+
+ status = "okay";
};
&tlmm {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-samsung-matisse-wifi.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-samsung-matisse-wifi.dts
index 884d99297d4c..cffc069712b2 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-samsung-matisse-wifi.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8026-samsung-matisse-wifi.dts
@@ -7,7 +7,7 @@
#include <dt-bindings/input/input.h>
#include "qcom-msm8226.dtsi"
-#include "qcom-pm8226.dtsi"
+#include "pm8226.dtsi"
/delete-node/ &adsp_region;
/delete-node/ &smem_region;
@@ -45,11 +45,11 @@
event-hall-sensor {
label = "Hall Effect Sensor";
- gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
- interrupts = <&tlmm 110 IRQ_TYPE_EDGE_FALLING>;
+ gpios = <&tlmm 110 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
debounce-interval = <15>;
+ linux,can-disable;
wakeup-source;
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8060-dragonboard.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8060-dragonboard.dts
index db4c791b2e2f..009afd8212c2 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8060-dragonboard.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8060-dragonboard.dts
@@ -5,6 +5,7 @@
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
#include "qcom-msm8660.dtsi"
+#include "pm8058.dtsi"
/ {
model = "Qualcomm APQ8060 Dragonboard";
@@ -24,7 +25,6 @@
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
regulator-name = "VPH";
- regulator-type = "voltage";
regulator-always-on;
regulator-boot-on;
};
@@ -72,7 +72,7 @@
/* Trig on both edges - getting close or far away */
interrupts-extended = <&pm8058_gpio 34 IRQ_TYPE_EDGE_BOTH>;
/* MPP05 analog input to the XOADC */
- io-channels = <&xoadc 0x00 0x05>;
+ io-channels = <&pm8058_xoadc 0x00 0x05>;
io-channel-names = "aout";
pinctrl-names = "default";
pinctrl-0 = <&dragon_cm3605_gpios>, <&dragon_cm3605_mpps>;
@@ -273,6 +273,10 @@
};
};
+&pm8058 {
+ interrupts-extended = <&tlmm 88 IRQ_TYPE_LEVEL_LOW>;
+};
+
&pm8058_gpio {
dragon_ethernet_gpios: ethernet-state {
pinconf {
@@ -448,6 +452,8 @@
* that means
*/
regulators-0 {
+ compatible = "qcom,rpm-pm8901-regulators";
+
vdd_l0-supply = <&pm8901_s4>;
vdd_l1-supply = <&vph>;
vdd_l2-supply = <&vph>;
@@ -465,57 +471,63 @@
lvs3_in-supply = <&pm8058_s2>;
mvs_in-supply = <&pm8058_s3>;
- l0 {
+ pm8901_l0: l0 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l1 {
+
+ pm8901_l1: l1 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
bias-pull-down;
};
- l2 {
+
+ pm8901_l2: l2 {
/* TMA340 requires strictly 3.3V */
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
bias-pull-down;
};
- l3 {
+
+ pm8901_l3: l3 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
bias-pull-down;
};
- l4 {
+
+ pm8901_l4: l4 {
regulator-min-microvolt = <2600000>;
regulator-max-microvolt = <2600000>;
bias-pull-down;
};
- l5 {
+
+ pm8901_l5: l5 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
bias-pull-down;
};
- l6 {
+
+ pm8901_l6: l6 {
regulator-min-microvolt = <2200000>;
regulator-max-microvolt = <2200000>;
bias-pull-down;
};
/* s0 and s1 are SAW regulators controlled over SPM */
- s2 {
+ pm8901_s2: s2 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
qcom,switch-mode-frequency = <1600000>;
bias-pull-down;
};
- s3 {
+ pm8901_s3: s3 {
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
qcom,switch-mode-frequency = <1600000>;
bias-pull-down;
};
- s4 {
+ pm8901_s4: s4 {
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1225000>;
qcom,switch-mode-frequency = <1600000>;
@@ -523,17 +535,22 @@
};
/* LVS0 thru 3 and mvs are just switches */
- lvs0 {
+ pm8901_lvs0: lvs0 {
regulator-always-on;
};
- lvs1 { };
- lvs2 { };
- lvs3 { };
- mvs { };
+ pm8901_lvs1: lvs1 { };
+
+ pm8901_lvs2: lvs2 { };
+
+ pm8901_lvs3: lvs3 { };
+
+ pm8901_mvs: mvs { };
};
regulators-1 {
+ compatible = "qcom,rpm-pm8058-regulators";
+
vdd_l0_l1_lvs-supply = <&pm8058_s3>;
vdd_l2_l11_l12-supply = <&vph>;
vdd_l3_l4_l5-supply = <&vph>;
@@ -555,144 +572,169 @@
vdd_s4-supply = <&vph>;
vdd_ncp-supply = <&vph>;
- l0 {
+ pm8058_l0: l0 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l1 {
+
+ pm8058_l1: l1 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l2 {
+
+ pm8058_l2: l2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2600000>;
bias-pull-down;
};
- l3 {
+
+ pm8058_l3: l3 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l4 {
+
+ pm8058_l4: l4 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
bias-pull-down;
};
- l5 {
+
+ pm8058_l5: l5 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
bias-pull-down;
};
- l6 {
+
+ pm8058_l6: l6 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3600000>;
bias-pull-down;
};
- l7 {
+
+ pm8058_l7: l7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l8 {
+
+ pm8058_l8: l8 {
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <3050000>;
bias-pull-down;
};
- l9 {
+
+ pm8058_l9: l9 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l10 {
+
+ pm8058_l10: l10 {
regulator-min-microvolt = <2600000>;
regulator-max-microvolt = <2600000>;
bias-pull-down;
};
- l11 {
+
+ pm8058_l11: l11 {
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
bias-pull-down;
};
- l12 {
+
+ pm8058_l12: l12 {
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
bias-pull-down;
};
- l13 {
+
+ pm8058_l13: l13 {
regulator-min-microvolt = <2050000>;
regulator-max-microvolt = <2050000>;
bias-pull-down;
};
- l14 {
+
+ pm8058_l14: l14 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
};
- l15 {
+
+ pm8058_l15: l15 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
bias-pull-down;
};
- l16 {
+
+ pm8058_l16: l16 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
regulator-always-on;
};
- l17 {
+
+ pm8058_l17: l17 {
// 1.5V according to schematic
regulator-min-microvolt = <2600000>;
regulator-max-microvolt = <2600000>;
bias-pull-down;
};
- l18 {
+
+ pm8058_l18: l18 {
regulator-min-microvolt = <2200000>;
regulator-max-microvolt = <2200000>;
bias-pull-down;
};
- l19 {
+
+ pm8058_l19: l19 {
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <2500000>;
bias-pull-down;
};
- l20 {
+
+ pm8058_l20: l20 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l21 {
+
+ pm8058_l21: l21 {
// 1.1 V according to schematic
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
regulator-always-on;
};
- l22 {
+
+ pm8058_l22: l22 {
// 1.2 V according to schematic
regulator-min-microvolt = <1150000>;
regulator-max-microvolt = <1150000>;
bias-pull-down;
};
- l23 {
+
+ pm8058_l23: l23 {
// Unused
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l24 {
+
+ pm8058_l24: l24 {
// Unused
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l25 {
+
+ pm8058_l25: l25 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- s0 {
+ pm8058_s0: s0 {
// regulator-min-microvolt = <500000>;
// regulator-max-microvolt = <1325000>;
regulator-min-microvolt = <1100000>;
@@ -700,7 +742,8 @@
qcom,switch-mode-frequency = <1600000>;
bias-pull-down;
};
- s1 {
+
+ pm8058_s1: s1 {
// regulator-min-microvolt = <500000>;
// regulator-max-microvolt = <1250000>;
regulator-min-microvolt = <1100000>;
@@ -708,21 +751,24 @@
qcom,switch-mode-frequency = <1600000>;
bias-pull-down;
};
- s2 {
+
+ pm8058_s2: s2 {
// 1.3 V according to schematic
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1400000>;
qcom,switch-mode-frequency = <1600000>;
bias-pull-down;
};
- s3 {
+
+ pm8058_s3: s3 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,switch-mode-frequency = <1600000>;
regulator-always-on;
bias-pull-down;
};
- s4 {
+
+ pm8058_s4: s4 {
regulator-min-microvolt = <2200000>;
regulator-max-microvolt = <2200000>;
qcom,switch-mode-frequency = <1600000>;
@@ -731,14 +777,15 @@
};
/* LVS0 and LVS1 are just switches */
- lvs0 {
+ pm8058_lvs0: lvs0 {
bias-pull-down;
};
- lvs1 {
+
+ pm8058_lvs1: lvs1 {
bias-pull-down;
};
- ncp {
+ pm8058_ncp: ncp {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,switch-mode-frequency = <1600000>;
@@ -945,28 +992,32 @@
};
};
-&xoadc {
+&pm8058_xoadc {
/* Reference voltage 2.2 V */
xoadc-ref-supply = <&pm8058_l18>;
/* Board-specific channels */
- mpp5@5 {
+ adc-channel@5 {
/* Connected to AOUT of ALS sensor */
reg = <0x00 0x05>;
};
- mpp6@6 {
+
+ adc-channel@6 {
/* Connected to test point TP43 */
reg = <0x00 0x06>;
};
- mpp7@7 {
+
+ adc-channel@7 {
/* Connected to battery thermistor */
reg = <0x00 0x07>;
};
- mpp8@8 {
+
+ adc-channel@8 {
/* Connected to battery ID detector */
reg = <0x00 0x08>;
};
- mpp9@9 {
+
+ adc-channel@9 {
/* Connected to XO thermistor */
reg = <0x00 0x09>;
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-asus-nexus7-flo.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-asus-nexus7-flo.dts
index c57c27cd8a20..d460743fbb94 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-asus-nexus7-flo.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-asus-nexus7-flo.dts
@@ -1,8 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "Asus Nexus7(flo)";
compatible = "asus,nexus7-flo", "qcom,apq8064";
@@ -36,7 +40,6 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "ext_3p3v";
- regulator-type = "voltage";
startup-delay-us = <0>;
gpio = <&tlmm_pinmux 77 GPIO_ACTIVE_HIGH>;
enable-active-high;
@@ -181,24 +184,26 @@
status = "okay";
};
-/* eMMC */
-&sdcc1 {
- vmmc-supply = <&pm8921_l5>;
- vqmmc-supply = <&pm8921_s4>;
- status = "okay";
-};
-
&mdp_dsi1_out {
remote-endpoint = <&dsi0_in>;
};
+&pm8821 {
+ interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+ interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
&rpm {
regulators {
+ compatible = "qcom,rpm-pm8921-regulators";
+
vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
vin_lvs1_3_6-supply = <&pm8921_s4>;
vin_lvs4_5_7-supply = <&pm8921_s4>;
-
vdd_l24-supply = <&pm8921_s1>;
vdd_l25-supply = <&pm8921_s1>;
vin_lvs2-supply = <&pm8921_s1>;
@@ -210,7 +215,7 @@
vdd_ncp-supply = <&pm8921_l6>;
/* Buck SMPS */
- s1 {
+ pm8921_s1: s1 {
regulator-always-on;
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1225000>;
@@ -219,7 +224,7 @@
};
/* msm otg HSUSB_VDDCX */
- s3 {
+ pm8921_s3: s3 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1150000>;
qcom,switch-mode-frequency = <4800000>;
@@ -232,55 +237,58 @@
* tabla2x-slim-CDC_VDD_CP
* tabla2x-slim-VDDIO_CDC
*/
- s4 {
+ pm8921_s4: s4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,switch-mode-frequency = <3200000>;
regulator-always-on;
};
- s7 {
+ pm8921_s7: s7 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
qcom,switch-mode-frequency = <3200000>;
};
/* mipi_dsi.1-dsi1_pll_vdda */
- l2 {
+ pm8921_l2: l2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
};
/* msm_otg-HSUSB_3p3 */
- l3 {
+ pm8921_l3: l3 {
regulator-min-microvolt = <3075000>;
regulator-max-microvolt = <3075000>;
bias-pull-down;
};
/* msm_otg-HSUSB_1p8 */
- l4 {
+ pm8921_l4: l4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
/* msm_sdcc.1-sdc_vdd */
- l5 {
+ pm8921_l5: l5 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
regulator-always-on;
bias-pull-down;
};
- l6 {
+ pm8921_l6: l6 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
};
+ pm8921_l8: l8 {
+ };
+
/* mipi_dsi.1-dsi1_avdd */
- l11 {
+ pm8921_l11: l11 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
bias-pull-down;
@@ -288,14 +296,14 @@
};
/* pwm_power for backlight */
- l17 {
+ pm8921_l17: l17 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-always-on;
};
/* camera, qdsp6 */
- l23 {
+ pm8921_l23: l23 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
@@ -305,37 +313,44 @@
* tabla2x-slim-CDC_VDDA_A_1P2V
* tabla2x-slim-VDDD_CDC_D
*/
- l25 {
+ pm8921_l25: l25 {
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
bias-pull-down;
};
- lvs1 {
+ pm8921_lvs1: lvs1 {
bias-pull-down;
};
- lvs4 {
+ pm8921_lvs4: lvs4 {
bias-pull-down;
};
- lvs5 {
+ pm8921_lvs5: lvs5 {
bias-pull-down;
};
- lvs6 {
+ pm8921_lvs6: lvs6 {
bias-pull-down;
};
/*
* mipi_dsi.1-dsi1_vddio
* pil_riva-pll_vdd
*/
- lvs7 {
+ pm8921_lvs7: lvs7 {
bias-pull-down;
};
};
};
+/* eMMC */
+&sdcc1 {
+ vmmc-supply = <&pm8921_l5>;
+ vqmmc-supply = <&pm8921_s4>;
+ status = "okay";
+};
+
&usb_hs1_phy {
v3p3-supply = <&pm8921_l3>;
v1p8-supply = <&pm8921_l4>;
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-cm-qs600.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-cm-qs600.dts
index d6ecfd8addb7..671d58cc2741 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-cm-qs600.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-cm-qs600.dts
@@ -1,8 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "CompuLab CM-QS600";
compatible = "qcom,apq8064-cm-qs600", "qcom,apq8064";
@@ -69,6 +72,14 @@
status = "okay";
};
+&pm8821 {
+ interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+ interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
&pm8921_gpio {
wlan_default_gpios: wlan-gpios-state {
pinconf {
@@ -82,6 +93,8 @@
&rpm {
regulators {
+ compatible = "qcom,rpm-pm8921-regulators";
+
vin_lvs1_3_6-supply = <&pm8921_s4>;
vin_lvs2-supply = <&pm8921_s1>;
vin_lvs4_5_7-supply = <&pm8921_s4>;
@@ -93,9 +106,8 @@
vdd_l27-supply = <&pm8921_s7>;
vdd_l28-supply = <&pm8921_s7>;
-
/* Buck SMPS */
- s1 {
+ pm8921_s1: s1 {
regulator-always-on;
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1225000>;
@@ -103,52 +115,51 @@
bias-pull-down;
};
- s3 {
+ pm8921_s3: s3 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
qcom,switch-mode-frequency = <4800000>;
};
- s4 {
+ pm8921_s4: s4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,switch-mode-frequency = <3200000>;
};
- s7 {
+ pm8921_s7: s7 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
qcom,switch-mode-frequency = <3200000>;
};
- l3 {
+ pm8921_l3: l3 {
regulator-min-microvolt = <3050000>;
regulator-max-microvolt = <3300000>;
bias-pull-down;
};
- l4 {
+ pm8921_l4: l4 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l5 {
+ pm8921_l5: l5 {
regulator-min-microvolt = <2750000>;
regulator-max-microvolt = <3000000>;
bias-pull-down;
};
- l23 {
+ pm8921_l23: l23 {
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <1900000>;
bias-pull-down;
};
- lvs6 {
+ pm8921_lvs6: lvs6 {
bias-pull-down;
};
-
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-ifc6410.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-ifc6410.dts
index 96307550523a..ed86b24119c9 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-ifc6410.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-ifc6410.dts
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "Qualcomm APQ8064/IFC6410";
compatible = "qcom,apq8064-ifc6410", "qcom,apq8064";
@@ -58,7 +61,6 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "ext_3p3v";
- regulator-type = "voltage";
startup-delay-us = <0>;
gpio = <&tlmm_pinmux 77 GPIO_ACTIVE_HIGH>;
enable-active-high;
@@ -171,6 +173,14 @@
perst-gpios = <&tlmm_pinmux 27 GPIO_ACTIVE_LOW>;
};
+&pm8821 {
+ interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+ interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
&pm8921_gpio {
wlan_default_gpios: wlan-gpios-state {
pinconf {
@@ -193,6 +203,8 @@
&rpm {
regulators {
+ compatible = "qcom,rpm-pm8921-regulators";
+
vin_lvs1_3_6-supply = <&pm8921_s4>;
vin_lvs2-supply = <&pm8921_s1>;
vin_lvs4_5_7-supply = <&pm8921_s4>;
@@ -204,9 +216,8 @@
vdd_l27-supply = <&pm8921_s7>;
vdd_l28-supply = <&pm8921_s7>;
-
/* Buck SMPS */
- s1 {
+ pm8921_s1: s1 {
regulator-always-on;
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1225000>;
@@ -214,59 +225,63 @@
bias-pull-down;
};
- s3 {
+ pm8921_s3: s3 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
qcom,switch-mode-frequency = <4800000>;
};
- s4 {
+ pm8921_s4: s4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,switch-mode-frequency = <3200000>;
};
- s7 {
+ pm8921_s7: s7 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
qcom,switch-mode-frequency = <3200000>;
};
- l3 {
+ pm8921_l3: l3 {
regulator-min-microvolt = <3050000>;
regulator-max-microvolt = <3300000>;
bias-pull-down;
};
- l4 {
+ pm8921_l4: l4 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l5 {
+ pm8921_l5: l5 {
regulator-min-microvolt = <2750000>;
regulator-max-microvolt = <3000000>;
bias-pull-down;
};
- l6 {
+ pm8921_l6: l6 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
bias-pull-down;
};
- l23 {
+ pm8921_l23: l23 {
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <1900000>;
bias-pull-down;
};
- lvs1 {
+ pm8921_lvs1: lvs1 {
+ bias-pull-down;
+ };
+
+ pm8921_lvs6: lvs6 {
bias-pull-down;
};
- lvs6 {
+ pm8921_hdmi_switch: hdmi-switch {
bias-pull-down;
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-pins.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-pins.dtsi
index b4d286a6fab1..7c545c50847b 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-pins.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-pins.dtsi
@@ -233,6 +233,22 @@
};
};
+ gsbi4_uart_pin_a: gsbi4-uart-pin-active-state {
+ rx-pins {
+ pins = "gpio11";
+ function = "gsbi4";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tx-pins {
+ pins = "gpio10";
+ function = "gsbi4";
+ drive-strength = <4>;
+ bias-disable;
+ };
+ };
+
gsbi6_uart_2pins: gsbi6_uart_2pins {
mux {
pins = "gpio14", "gpio15";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts
index 9244512b74d1..2412aa3e3e8d 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/mfd/qcom-rpm.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "Sony Xperia Z";
compatible = "sony,xperia-yuga", "qcom,apq8064";
@@ -65,6 +68,14 @@
status = "okay";
};
+&pm8821 {
+ interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921 {
+ interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
+};
+
&pm8921_gpio {
gpio_keys_pin_a: gpio-keys-active-state {
pins = "gpio3", "gpio4", "gpio29", "gpio35";
@@ -82,11 +93,25 @@
&riva {
pinctrl-names = "default";
pinctrl-0 = <&riva_wlan_pin_a>, <&riva_bt_pin_a>, <&riva_fm_pin_a>;
+
+ vddcx-supply = <&pm8921_s3>;
+ vddmx-supply = <&pm8921_l24>;
+ vddpx-supply = <&pm8921_s4>;
+
status = "okay";
+
+ iris {
+ vddxo-supply = <&pm8921_l4>;
+ vddrfa-supply = <&pm8921_s2>;
+ vddpa-supply = <&pm8921_l10>;
+ vdddig-supply = <&pm8921_lvs2>;
+ };
};
&rpm {
regulators {
+ compatible = "qcom,rpm-pm8921-regulators";
+
vin_l1_l2_l12_l18-supply = <&pm8921_s4>;
vin_lvs_1_3_6-supply = <&pm8921_s4>;
vin_lvs_4_5_7-supply = <&pm8921_s4>;
@@ -98,7 +123,7 @@
vin_l28-supply = <&pm8921_s7>;
/* Buck SMPS */
- s1 {
+ pm8921_s1: s1 {
regulator-always-on;
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1225000>;
@@ -106,21 +131,21 @@
bias-pull-down;
};
- s2 {
+ pm8921_s2: s2 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
qcom,switch-mode-frequency = <1600000>;
bias-pull-down;
};
- s3 {
+ pm8921_s3: s3 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1150000>;
qcom,switch-mode-frequency = <4800000>;
bias-pull-down;
};
- s4 {
+ pm8921_s4: s4 {
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@@ -129,205 +154,207 @@
qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
};
- s7 {
+ pm8921_s7: s7 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
qcom,switch-mode-frequency = <3200000>;
};
- s8 {
+ pm8921_s8: s8 {
regulator-min-microvolt = <2200000>;
regulator-max-microvolt = <2200000>;
qcom,switch-mode-frequency = <1600000>;
};
/* PMOS LDO */
- l1 {
+ pm8921_l1: l1 {
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
bias-pull-down;
};
- l2 {
+ pm8921_l2: l2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l3 {
+ pm8921_l3: l3 {
regulator-min-microvolt = <3075000>;
regulator-max-microvolt = <3075000>;
bias-pull-down;
};
- l4 {
+ pm8921_l4: l4 {
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l5 {
+ pm8921_l5: l5 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
bias-pull-down;
};
- l6 {
+ pm8921_l6: l6 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
bias-pull-down;
};
- l7 {
+ pm8921_l7: l7 {
regulator-min-microvolt = <1850000>;
regulator-max-microvolt = <2950000>;
bias-pull-down;
};
- l8 {
+ pm8921_l8: l8 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
bias-pull-down;
};
- l9 {
+ pm8921_l9: l9 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
bias-pull-down;
};
- l10 {
+ pm8921_l10: l10 {
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
bias-pull-down;
};
- l11 {
+ pm8921_l11: l11 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
bias-pull-down;
};
- l12 {
+ pm8921_l12: l12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l14 {
+ pm8921_l14: l14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l15 {
+ pm8921_l15: l15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2950000>;
bias-pull-down;
};
- l16 {
+ pm8921_l16: l16 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
bias-pull-down;
};
- l17 {
+ pm8921_l17: l17 {
regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <2000000>;
bias-pull-down;
};
- l18 {
+ pm8921_l18: l18 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
bias-pull-down;
};
- l21 {
+ pm8921_l21: l21 {
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
bias-pull-down;
};
- l22 {
+ pm8921_l22: l22 {
regulator-min-microvolt = <2600000>;
regulator-max-microvolt = <2600000>;
bias-pull-down;
};
- l23 {
+ pm8921_l23: l23 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
bias-pull-down;
};
- l24 {
+ pm8921_l24: l24 {
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <1150000>;
bias-pull-down;
};
- l25 {
+ pm8921_l25: l25 {
regulator-always-on;
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
bias-pull-down;
};
- l27 {
+ pm8921_l27: l27 {
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
- l28 {
+ pm8921_l28: l28 {
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
bias-pull-down;
};
- l29 {
+ pm8921_l29: l29 {
regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <2000000>;
bias-pull-down;
};
/* Low Voltage Switch */
- lvs1 {
+ pm8921_lvs1: lvs1 {
bias-pull-down;
};
- lvs2 {
+ pm8921_lvs2: lvs2 {
bias-pull-down;
};
- lvs3 {
+ pm8921_lvs3: lvs3 {
bias-pull-down;
};
- lvs4 {
+ pm8921_lvs4: lvs4 {
bias-pull-down;
};
- lvs5 {
+ pm8921_lvs5: lvs5 {
bias-pull-down;
};
- lvs6 {
+ pm8921_lvs6: lvs6 {
bias-pull-down;
};
- lvs7 {
+ pm8921_lvs7: lvs7 {
bias-pull-down;
};
- usb-switch {};
+ pm8921_usb_switch: usb-switch {};
- hdmi-switch {};
+ pm8921_hdmi_switch: hdmi-switch {
+ bias-pull-down;
+ };
- ncp {
+ pm8921_ncp: ncp {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,switch-mode-frequency = <1600000>;
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064.dtsi
index d2289205ff81..3faf57035d54 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8064.dtsi
@@ -226,46 +226,6 @@
hwlocks = <&sfpb_mutex 3>;
};
- smd {
- compatible = "qcom,smd";
-
- modem-edge {
- interrupts = <0 37 IRQ_TYPE_EDGE_RISING>;
-
- qcom,ipc = <&l2cc 8 3>;
- qcom,smd-edge = <0>;
-
- status = "disabled";
- };
-
- q6-edge {
- interrupts = <0 90 IRQ_TYPE_EDGE_RISING>;
-
- qcom,ipc = <&l2cc 8 15>;
- qcom,smd-edge = <1>;
-
- status = "disabled";
- };
-
- dsps-edge {
- interrupts = <0 138 IRQ_TYPE_EDGE_RISING>;
-
- qcom,ipc = <&sps_sic_non_secure 0x4080 0>;
- qcom,smd-edge = <3>;
-
- status = "disabled";
- };
-
- riva-edge {
- interrupts = <0 198 IRQ_TYPE_EDGE_RISING>;
-
- qcom,ipc = <&l2cc 8 25>;
- qcom,smd-edge = <6>;
-
- status = "disabled";
- };
- };
-
smsm {
compatible = "qcom,smsm";
@@ -324,23 +284,6 @@
};
};
-
- /*
- * These channels from the ADC are simply hardware monitors.
- * That is why the ADC is referred to as "HKADC" - HouseKeeping
- * ADC.
- */
- iio-hwmon {
- compatible = "iio-hwmon";
- io-channels = <&xoadc 0x00 0x01>, /* Battery */
- <&xoadc 0x00 0x02>, /* DC in (charger) */
- <&xoadc 0x00 0x04>, /* VPH the main system voltage */
- <&xoadc 0x00 0x0b>, /* Die temperature */
- <&xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
- <&xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
- <&xoadc 0x00 0x0e>; /* Charger temperature */
- };
-
soc: soc {
#address-cells = <1>;
#size-cells = <1>;
@@ -555,6 +498,18 @@
#size-cells = <1>;
ranges;
+ gsbi4_serial: serial@16340000 {
+ compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
+ reg = <0x16340000 0x100>,
+ <0x16300000 0x3>;
+ interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+ pinctrl-0 = <&gsbi4_uart_pin_a>;
+ pinctrl-names = "default";
+ clocks = <&gcc GSBI4_UART_CLK>, <&gcc GSBI4_H_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
gsbi4_i2c: i2c@16380000 {
compatible = "qcom,i2c-qup-v1.1.1";
pinctrl-0 = <&i2c4_pins>;
@@ -683,133 +638,16 @@
clock-names = "core";
};
- ssbi@c00000 {
+ ssbi2: ssbi@c00000 {
compatible = "qcom,ssbi";
reg = <0x00c00000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pm8821: pmic {
- compatible = "qcom,pm8821";
- interrupt-parent = <&tlmm_pinmux>;
- interrupts = <76 IRQ_TYPE_LEVEL_LOW>;
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pm8821_mpps: mpps@50 {
- compatible = "qcom,pm8821-mpp", "qcom,ssbi-mpp";
- reg = <0x50>;
- interrupt-controller;
- #interrupt-cells = <2>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8821_mpps 0 0 4>;
- };
- };
};
- ssbi@500000 {
+ ssbi: ssbi@500000 {
compatible = "qcom,ssbi";
reg = <0x00500000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pmicintc: pmic {
- compatible = "qcom,pm8921";
- interrupt-parent = <&tlmm_pinmux>;
- interrupts = <74 8>;
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pm8921_gpio: gpio@150 {
-
- compatible = "qcom,pm8921-gpio",
- "qcom,ssbi-gpio";
- reg = <0x150>;
- interrupt-controller;
- #interrupt-cells = <2>;
- gpio-controller;
- gpio-ranges = <&pm8921_gpio 0 0 44>;
- #gpio-cells = <2>;
-
- };
-
- pm8921_mpps: mpps@50 {
- compatible = "qcom,pm8921-mpp",
- "qcom,ssbi-mpp";
- reg = <0x50>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8921_mpps 0 0 12>;
- interrupt-controller;
- #interrupt-cells = <2>;
- };
-
- rtc@11d {
- compatible = "qcom,pm8921-rtc";
- interrupt-parent = <&pmicintc>;
- interrupts = <39 1>;
- reg = <0x11d>;
- allow-set-time;
- };
-
- pwrkey@1c {
- compatible = "qcom,pm8921-pwrkey";
- reg = <0x1c>;
- interrupt-parent = <&pmicintc>;
- interrupts = <50 1>, <51 1>;
- debounce = <15625>;
- pull-up;
- };
-
- xoadc: xoadc@197 {
- compatible = "qcom,pm8921-adc";
- reg = <197>;
- interrupts-extended = <&pmicintc 78 IRQ_TYPE_EDGE_RISING>;
- #address-cells = <2>;
- #size-cells = <0>;
- #io-channel-cells = <2>;
-
- vcoin: adc-channel@0 {
- reg = <0x00 0x00>;
- };
- vbat: adc-channel@1 {
- reg = <0x00 0x01>;
- };
- dcin: adc-channel@2 {
- reg = <0x00 0x02>;
- };
- vph_pwr: adc-channel@4 {
- reg = <0x00 0x04>;
- };
- batt_therm: adc-channel@8 {
- reg = <0x00 0x08>;
- };
- batt_id: adc-channel@9 {
- reg = <0x00 0x09>;
- };
- usb_vbus: adc-channel@a {
- reg = <0x00 0x0a>;
- };
- die_temp: adc-channel@b {
- reg = <0x00 0x0b>;
- };
- ref_625mv: adc-channel@c {
- reg = <0x00 0x0c>;
- };
- ref_1250mv: adc-channel@d {
- reg = <0x00 0x0d>;
- };
- chg_temp: adc-channel@e {
- reg = <0x00 0x0e>;
- };
- ref_muxoff: adc-channel@f {
- reg = <0x00 0x0f>;
- };
- };
- };
};
qfprom: qfprom@700000 {
@@ -919,60 +757,6 @@
clocks = <&pxo_board>, <&cxo_board>;
clock-names = "pxo", "cxo";
};
-
- regulators {
- compatible = "qcom,rpm-pm8921-regulators";
-
- pm8921_s1: s1 {};
- pm8921_s2: s2 {};
- pm8921_s3: s3 {};
- pm8921_s4: s4 {};
- pm8921_s7: s7 {};
- pm8921_s8: s8 {};
-
- pm8921_l1: l1 {};
- pm8921_l2: l2 {};
- pm8921_l3: l3 {};
- pm8921_l4: l4 {};
- pm8921_l5: l5 {};
- pm8921_l6: l6 {};
- pm8921_l7: l7 {};
- pm8921_l8: l8 {};
- pm8921_l9: l9 {};
- pm8921_l10: l10 {};
- pm8921_l11: l11 {};
- pm8921_l12: l12 {};
- pm8921_l14: l14 {};
- pm8921_l15: l15 {};
- pm8921_l16: l16 {};
- pm8921_l17: l17 {};
- pm8921_l18: l18 {};
- pm8921_l21: l21 {};
- pm8921_l22: l22 {};
- pm8921_l23: l23 {};
- pm8921_l24: l24 {};
- pm8921_l25: l25 {};
- pm8921_l26: l26 {};
- pm8921_l27: l27 {};
- pm8921_l28: l28 {};
- pm8921_l29: l29 {};
-
- pm8921_lvs1: lvs1 {};
- pm8921_lvs2: lvs2 {};
- pm8921_lvs3: lvs3 {};
- pm8921_lvs4: lvs4 {};
- pm8921_lvs5: lvs5 {};
- pm8921_lvs6: lvs6 {};
- pm8921_lvs7: lvs7 {};
-
- pm8921_usb_switch: usb-switch {};
-
- pm8921_hdmi_switch: hdmi-switch {
- bias-pull-down;
- };
-
- pm8921_ncp: ncp {};
- };
};
usb1: usb@12500000 {
@@ -1298,7 +1082,6 @@
dsi0: dsi@4700000 {
compatible = "qcom,apq8064-dsi-ctrl",
"qcom,mdss-dsi-ctrl";
- label = "MDSS DSI CTRL->0";
#address-cells = <1>;
#size-cells = <0>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
@@ -1501,7 +1284,7 @@
qcom,ncb = <3>;
};
- pcie: pci@1b500000 {
+ pcie: pcie@1b500000 {
compatible = "qcom,pcie-apq8064";
reg = <0x1b500000 0x1000>,
<0x1b502000 0x80>,
@@ -1652,10 +1435,6 @@
memory-region = <&wcnss_mem>;
- vddcx-supply = <&pm8921_s3>;
- vddmx-supply = <&pm8921_l24>;
- vddpx-supply = <&pm8921_s4>;
-
status = "disabled";
iris {
@@ -1663,11 +1442,6 @@
clocks = <&cxo_board>;
clock-names = "xo";
-
- vddxo-supply = <&pm8921_l4>;
- vddrfa-supply = <&pm8921_s2>;
- vddpa-supply = <&pm8921_l10>;
- vdddig-supply = <&pm8921_lvs2>;
};
smd-edge {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8074-dragonboard.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8074-dragonboard.dts
index e0679436000b..6fce0112361f 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8074-dragonboard.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8074-dragonboard.dts
@@ -4,8 +4,8 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "qcom-msm8974.dtsi"
-#include "qcom-pm8841.dtsi"
-#include "qcom-pm8941.dtsi"
+#include "pm8841.dtsi"
+#include "pm8941.dtsi"
/delete-node/ &mpss_region;
@@ -49,6 +49,33 @@
no-map;
};
};
+
+ vreg_boost: vreg-boost {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_n_pin>;
+ };
+
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
};
&blsp1_uart2 {
@@ -156,6 +183,11 @@
};
};
+&pm8941_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
&pm8941_wled {
qcom,cs-out;
qcom,switching-freq = <3200>;
@@ -398,6 +430,10 @@
pinctrl-1 = <&sdc2_off>;
};
+&smbb {
+ status = "okay";
+};
+
&tlmm {
sdc1_on: sdc1-on-state {
clk-pins {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-ifc6540.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-ifc6540.dts
index 116e59a3b76d..1df24c922be9 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-ifc6540.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-ifc6540.dts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-apq8084.dtsi"
-#include "qcom-pma8084.dtsi"
+#include "pma8084.dtsi"
/ {
model = "Qualcomm APQ8084/IFC6540";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-mtp.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-mtp.dts
index c6b6680248a6..d4e6aee034af 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-mtp.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084-mtp.dts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-apq8084.dtsi"
-#include "qcom-pma8084.dtsi"
+#include "pma8084.dtsi"
/ {
model = "Qualcomm APQ 8084-MTP";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084.dtsi
index 8f178bc87e1d..2b1f9d0fb510 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-apq8084.dtsi
@@ -784,10 +784,10 @@
};
};
- smd {
- compatible = "qcom,smd";
+ rpm: remoteproc {
+ compatible = "qcom,apq8084-rpm-proc", "qcom,rpm-proc";
- rpm {
+ smd-edge {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs 8 0>;
qcom,smd-edge = <15>;
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4018-ap120c-ac.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4018-ap120c-ac.dtsi
index d90b4f4c63af..da67d55fa557 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4018-ap120c-ac.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4018-ap120c-ac.dtsi
@@ -262,10 +262,11 @@
&usb3 {
status = "okay";
- dwc3@8a00000 {
- phys = <&usb3_hs_phy>;
- phy-names = "usb2-phy";
};
+
+&usb3_dwc {
+ phys = <&usb3_hs_phy>;
+ phy-names = "usb2-phy";
};
&usb2_hs_phy {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019-ap.dk04.1.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019-ap.dk04.1.dtsi
index 468ebc40d2ad..374af6dd360a 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019-ap.dk04.1.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019-ap.dk04.1.dtsi
@@ -98,7 +98,7 @@
};
};
- pci@40000000 {
+ pcie@40000000 {
status = "okay";
perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019.dtsi
index f0ef86fadc9d..f989bd741cd1 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq4019.dtsi
@@ -224,15 +224,18 @@
};
sdhci: mmc@7824900 {
- compatible = "qcom,sdhci-msm-v4";
+ compatible = "qcom,ipq4019-sdhci", "qcom,sdhci-msm-v4";
reg = <0x7824900 0x11c>, <0x7824000 0x800>;
reg-names = "hc", "core";
interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "hc_irq", "pwr_irq";
bus-width = <8>;
- clocks = <&gcc GCC_SDCC1_AHB_CLK>, <&gcc GCC_SDCC1_APPS_CLK>,
- <&gcc GCC_DCD_XO_CLK>;
- clock-names = "iface", "core", "xo";
+ clocks = <&gcc GCC_SDCC1_AHB_CLK>,
+ <&gcc GCC_SDCC1_APPS_CLK>,
+ <&xo>;
+ clock-names = "iface",
+ "core",
+ "xo";
status = "disabled";
};
@@ -414,12 +417,12 @@
reg = <0x4ab000 0x4>;
};
- pcie0: pci@40000000 {
+ pcie0: pcie@40000000 {
compatible = "qcom,pcie-ipq4019";
- reg = <0x40000000 0xf1d
- 0x40000f20 0xa8
- 0x80000 0x2000
- 0x40100000 0x1000>;
+ reg = <0x40000000 0xf1d>,
+ <0x40000f20 0xa8>,
+ <0x80000 0x2000>,
+ <0x40100000 0x1000>;
reg-names = "dbi", "elbi", "parf", "config";
device_type = "pci";
linux,pci-domain = <0>;
@@ -543,9 +546,9 @@
<GIC_SPI 46 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 47 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "msi0", "msi1", "msi2", "msi3",
- "msi4", "msi5", "msi6", "msi7",
- "msi8", "msi9", "msi10", "msi11",
+ interrupt-names = "msi0", "msi1", "msi2", "msi3",
+ "msi4", "msi5", "msi6", "msi7",
+ "msi8", "msi9", "msi10", "msi11",
"msi12", "msi13", "msi14", "msi15",
"legacy";
status = "disabled";
@@ -585,9 +588,9 @@
<GIC_SPI 62 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 63 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "msi0", "msi1", "msi2", "msi3",
- "msi4", "msi5", "msi6", "msi7",
- "msi8", "msi9", "msi10", "msi11",
+ interrupt-names = "msi0", "msi1", "msi2", "msi3",
+ "msi4", "msi5", "msi6", "msi7",
+ "msi8", "msi9", "msi10", "msi11",
"msi12", "msi13", "msi14", "msi15",
"legacy";
status = "disabled";
@@ -621,7 +624,7 @@
};
};
- usb3_ss_phy: ssphy@9a000 {
+ usb3_ss_phy: usb-phy@9a000 {
compatible = "qcom,usb-ss-ipq4019-phy";
#phy-cells = <0>;
reg = <0x9a000 0x800>;
@@ -631,7 +634,7 @@
status = "disabled";
};
- usb3_hs_phy: hsphy@a6000 {
+ usb3_hs_phy: usb-phy@a6000 {
compatible = "qcom,usb-hs-ipq4019-phy";
#phy-cells = <0>;
reg = <0xa6000 0x40>;
@@ -641,7 +644,7 @@
status = "disabled";
};
- usb3: usb3@8af8800 {
+ usb3: usb@8af8800 {
compatible = "qcom,ipq4019-dwc3", "qcom,dwc3";
reg = <0x8af8800 0x100>;
#address-cells = <1>;
@@ -653,7 +656,7 @@
ranges;
status = "disabled";
- dwc3@8a00000 {
+ usb3_dwc: usb@8a00000 {
compatible = "snps,dwc3";
reg = <0x8a00000 0xf8000>;
interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
@@ -663,7 +666,7 @@
};
};
- usb2_hs_phy: hsphy@a8000 {
+ usb2_hs_phy: usb-phy@a8000 {
compatible = "qcom,usb-hs-ipq4019-phy";
#phy-cells = <0>;
reg = <0xa8000 0x40>;
@@ -673,7 +676,7 @@
status = "disabled";
};
- usb2: usb2@60f8800 {
+ usb2: usb@60f8800 {
compatible = "qcom,ipq4019-dwc3", "qcom,dwc3";
reg = <0x60f8800 0x100>;
#address-cells = <1>;
@@ -685,7 +688,7 @@
ranges;
status = "disabled";
- dwc3@6000000 {
+ usb@6000000 {
compatible = "snps,dwc3";
reg = <0x6000000 0xf8000>;
interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-rb3011.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-rb3011.dts
index 104eb729c2d6..12e806adcda8 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-rb3011.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-rb3011.dts
@@ -20,6 +20,33 @@
stdout-path = "serial0:115200n8";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&buttons_pins>;
+ pinctrl-names = "default";
+
+ button {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>;
+ linux,input-type = <1>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&leds_pins>;
+ pinctrl-names = "default";
+
+ led-0 {
+ label = "rb3011:green:user";
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
memory@42000000 {
reg = <0x42000000 0x3e000000>;
device_type = "memory";
@@ -282,7 +309,6 @@
spi4: spi@1a280000 {
status = "okay";
- spi-max-frequency = <50000000>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
@@ -303,34 +329,6 @@
};
};
};
-
- gpio-keys {
- compatible = "gpio-keys";
- pinctrl-0 = <&buttons_pins>;
- pinctrl-names = "default";
-
- button {
- label = "reset";
- linux,code = <KEY_RESTART>;
- gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>;
- linux,input-type = <1>;
- debounce-interval = <60>;
- };
- };
-
- leds {
- compatible = "gpio-leds";
- pinctrl-0 = <&leds_pins>;
- pinctrl-names = "default";
-
- led-0 {
- label = "rb3011:green:user";
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- };
-
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-v1.0.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-v1.0.dtsi
index c5abe7151f14..49de9752632f 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-v1.0.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064-v1.0.dtsi
@@ -14,6 +14,67 @@
stdout-path = "serial0:115200n8";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&buttons_pins>;
+ pinctrl-names = "default";
+
+ button-1 {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
+ linux,input-type = <1>;
+ debounce-interval = <60>;
+ };
+ button-2 {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
+ linux,input-type = <1>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&leds_pins>;
+ pinctrl-names = "default";
+
+ led-0 {
+ label = "led_usb1";
+ gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "usbdev";
+ default-state = "off";
+ };
+
+ led-1 {
+ label = "led_usb3";
+ gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "usbdev";
+ default-state = "off";
+ };
+
+ led-2 {
+ label = "status_led_fail";
+ function = LED_FUNCTION_STATUS;
+ gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ led-3 {
+ label = "sata_led";
+ gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ led-4 {
+ label = "status_led_pass";
+ function = LED_FUNCTION_STATUS;
+ gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
soc {
gsbi@16300000 {
qcom,mode = <GSBI_PROT_I2C_UART>;
@@ -30,7 +91,6 @@
spi4: spi@1a280000 {
status = "okay";
- spi-max-frequency = <50000000>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
@@ -65,66 +125,5 @@
ports-implemented = <0x1>;
status = "okay";
};
-
- gpio-keys {
- compatible = "gpio-keys";
- pinctrl-0 = <&buttons_pins>;
- pinctrl-names = "default";
-
- button-1 {
- label = "reset";
- linux,code = <KEY_RESTART>;
- gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
- linux,input-type = <1>;
- debounce-interval = <60>;
- };
- button-2 {
- label = "wps";
- linux,code = <KEY_WPS_BUTTON>;
- gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
- linux,input-type = <1>;
- debounce-interval = <60>;
- };
- };
-
- leds {
- compatible = "gpio-leds";
- pinctrl-0 = <&leds_pins>;
- pinctrl-names = "default";
-
- led-0 {
- label = "led_usb1";
- gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "usbdev";
- default-state = "off";
- };
-
- led-1 {
- label = "led_usb3";
- gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "usbdev";
- default-state = "off";
- };
-
- led-2 {
- label = "status_led_fail";
- function = LED_FUNCTION_STATUS;
- gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
-
- led-3 {
- label = "sata_led";
- gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
-
- led-4 {
- label = "status_led_pass";
- function = LED_FUNCTION_STATUS;
- gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- };
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064.dtsi
index 6198f42f6a9c..6a7f4dd0f775 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-ipq8064.dtsi
@@ -366,7 +366,7 @@
};
};
- qcom,ssbi@500000 {
+ ssbi@500000 {
compatible = "qcom,ssbi";
reg = <0x00500000 0x1000>;
qcom,controller-type = "pmic-arbiter";
@@ -1076,7 +1076,7 @@
status = "disabled";
};
- pcie0: pci@1b500000 {
+ pcie0: pcie@1b500000 {
compatible = "qcom,pcie-ipq8064";
reg = <0x1b500000 0x1000
0x1b502000 0x80
@@ -1127,7 +1127,7 @@
perst-gpios = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
};
- pcie1: pci@1b700000 {
+ pcie1: pcie@1b700000 {
compatible = "qcom,pcie-ipq8064";
reg = <0x1b700000 0x1000
0x1b702000 0x80
@@ -1178,7 +1178,7 @@
perst-gpios = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
};
- pcie2: pci@1b900000 {
+ pcie2: pcie@1b900000 {
compatible = "qcom,pcie-ipq8064";
reg = <0x1b900000 0x1000
0x1b902000 0x80
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548-mangoh-green.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548-mangoh-green.dts
index b269fdca1460..e3b4b93c3d38 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548-mangoh-green.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548-mangoh-green.dts
@@ -6,11 +6,11 @@
* Author : Neil Armstrong <narmstrong@baylibre.com>
*/
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
#include "qcom-mdm9615-wp8548.dtsi"
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/gpio/gpio.h>
/ {
model = "MangOH Green with WP8548 Module";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548.dtsi
index 92c8003dac25..0dd52cac0e2e 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615-wp8548.dtsi
@@ -7,6 +7,7 @@
*/
#include "qcom-mdm9615.dtsi"
+#include "pm8018.dtsi"
/ {
model = "Sierra Wireless WP8548 Module";
@@ -76,7 +77,11 @@
};
};
-&pmicgpio {
+&pm8018 {
+ interrupts-extended = <&intc GIC_PPI 226 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&pm8018_gpio {
usb_vbus_5v_pins: usb-vbus-5v-state {
pins = "gpio4";
function = "normal";
@@ -129,6 +134,142 @@
pinctrl-names = "default";
};
+&rpm {
+ regulators {
+ compatible = "qcom,rpm-pm8018-regulators";
+
+ vin_lvs1-supply = <&pm8018_s3>;
+
+ vdd_l7-supply = <&pm8018_s4>;
+ vdd_l8-supply = <&pm8018_s3>;
+ vdd_l9_l10_l11_l12-supply = <&pm8018_s5>;
+
+ /* Buck SMPS */
+ pm8018_s1: s1 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1150000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ };
+
+ pm8018_s2: s2 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1300000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ };
+
+ pm8018_s3: s3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ };
+
+ pm8018_s4: s4 {
+ regulator-min-microvolt = <2100000>;
+ regulator-max-microvolt = <2200000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ };
+
+ pm8018_s5: s5 {
+ regulator-always-on;
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ qcom,switch-mode-frequency = <1600000>;
+ bias-pull-down;
+ };
+
+ /* PMOS LDO */
+ pm8018_l2: l2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ bias-pull-down;
+ };
+
+ pm8018_l3: l3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ bias-pull-down;
+ };
+
+ pm8018_l4: l4 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ bias-pull-down;
+ };
+
+ pm8018_l5: l5 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ bias-pull-down;
+ };
+
+ pm8018_l6: l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2850000>;
+ bias-pull-down;
+ };
+
+ pm8018_l7: l7 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <1900000>;
+ bias-pull-down;
+ };
+
+ pm8018_l8: l8 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ bias-pull-down;
+ };
+
+ pm8018_l9: l9 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1150000>;
+ bias-pull-down;
+ };
+
+ pm8018_l10: l10 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ bias-pull-down;
+ };
+
+ pm8018_l11: l11 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ bias-pull-down;
+ };
+
+ pm8018_l12: l12 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ bias-pull-down;
+ };
+
+ pm8018_l13: l13 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <2950000>;
+ bias-pull-down;
+ };
+
+ pm8018_l14: l14 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ bias-pull-down;
+ };
+
+ /* Low Voltage Switch */
+ pm8018_lvs1: lvs1 {
+ bias-pull-down;
+ };
+ };
+};
+
&sdcc1 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615.dtsi
index b40c52ddf9b4..34c60994d026 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-mdm9615.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-mdm9615.h>
+#include <dt-bindings/clock/qcom,lcc-msm8960.h>
#include <dt-bindings/reset/qcom,gcc-mdm9615.h>
#include <dt-bindings/mfd/qcom-rpm.h>
#include <dt-bindings/soc/qcom,gsbi.h>
@@ -39,21 +40,19 @@
};
clocks {
- cxo_board {
+ cxo_board: cxo_board {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <19200000>;
};
};
- regulators {
- vsdcc_fixed: vsdcc-regulator {
- compatible = "regulator-fixed";
- regulator-name = "SDCC Power";
- regulator-min-microvolt = <2700000>;
- regulator-max-microvolt = <2700000>;
- regulator-always-on;
- };
+ vsdcc_fixed: vsdcc-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "SDCC Power";
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <2700000>;
+ regulator-always-on;
};
soc: soc {
@@ -106,6 +105,8 @@
#power-domain-cells = <1>;
#reset-cells = <1>;
reg = <0x900000 0x4000>;
+ clocks = <&cxo_board>,
+ <&lcc PLL4>;
};
lcc: clock-controller@28000000 {
@@ -113,6 +114,20 @@
reg = <0x28000000 0x1000>;
#clock-cells = <1>;
#reset-cells = <1>;
+ clocks = <&cxo_board>,
+ <&gcc PLL4_VOTE>,
+ <0>,
+ <0>, <0>,
+ <0>, <0>,
+ <0>;
+ clock-names = "cxo",
+ "pll4_vote",
+ "mi2s_codec_clk",
+ "codec_i2s_mic_codec_clk",
+ "spare_i2s_mic_codec_clk",
+ "codec_i2s_spkr_codec_clk",
+ "spare_i2s_spkr_codec_clk",
+ "pcm_codec_clk";
};
l2cc: clock-controller@2011000 {
@@ -241,57 +256,10 @@
};
};
- qcom,ssbi@500000 {
+ ssbi: ssbi@500000 {
compatible = "qcom,ssbi";
reg = <0x500000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pmicintc: pmic {
- compatible = "qcom,pm8018", "qcom,pm8921";
- interrupts = <GIC_PPI 226 IRQ_TYPE_LEVEL_HIGH>;
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pwrkey@1c {
- compatible = "qcom,pm8018-pwrkey", "qcom,pm8921-pwrkey";
- reg = <0x1c>;
- interrupt-parent = <&pmicintc>;
- interrupts = <50 IRQ_TYPE_EDGE_RISING>,
- <51 IRQ_TYPE_EDGE_RISING>;
- debounce = <15625>;
- pull-up;
- };
-
- pmicmpp: mpps@50 {
- compatible = "qcom,pm8018-mpp", "qcom,ssbi-mpp";
- interrupt-controller;
- #interrupt-cells = <2>;
- reg = <0x50>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pmicmpp 0 0 6>;
- };
-
- rtc@11d {
- compatible = "qcom,pm8018-rtc", "qcom,pm8921-rtc";
- interrupt-parent = <&pmicintc>;
- interrupts = <39 IRQ_TYPE_EDGE_RISING>;
- reg = <0x11d>;
- allow-set-time;
- };
-
- pmicgpio: gpio@150 {
- compatible = "qcom,pm8018-gpio", "qcom,ssbi-gpio";
- reg = <0x150>;
- interrupt-controller;
- #interrupt-cells = <2>;
- gpio-controller;
- gpio-ranges = <&pmicgpio 0 0 6>;
- #gpio-cells = <2>;
- };
- };
};
sdcc1bam: dma-controller@12182000 {
@@ -368,140 +336,6 @@
<GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 22 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "ack", "err", "wakeup";
-
- regulators {
- compatible = "qcom,rpm-pm8018-regulators";
-
- vin_lvs1-supply = <&pm8018_s3>;
-
- vdd_l7-supply = <&pm8018_s4>;
- vdd_l8-supply = <&pm8018_s3>;
- vdd_l9_l10_l11_l12-supply = <&pm8018_s5>;
-
- /* Buck SMPS */
- pm8018_s1: s1 {
- regulator-min-microvolt = <500000>;
- regulator-max-microvolt = <1150000>;
- qcom,switch-mode-frequency = <1600000>;
- bias-pull-down;
- };
-
- pm8018_s2: s2 {
- regulator-min-microvolt = <1225000>;
- regulator-max-microvolt = <1300000>;
- qcom,switch-mode-frequency = <1600000>;
- bias-pull-down;
- };
-
- pm8018_s3: s3 {
- regulator-always-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- qcom,switch-mode-frequency = <1600000>;
- bias-pull-down;
- };
-
- pm8018_s4: s4 {
- regulator-min-microvolt = <2100000>;
- regulator-max-microvolt = <2200000>;
- qcom,switch-mode-frequency = <1600000>;
- bias-pull-down;
- };
-
- pm8018_s5: s5 {
- regulator-always-on;
- regulator-min-microvolt = <1350000>;
- regulator-max-microvolt = <1350000>;
- qcom,switch-mode-frequency = <1600000>;
- bias-pull-down;
- };
-
- /* PMOS LDO */
- pm8018_l2: l2 {
- regulator-always-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- bias-pull-down;
- };
-
- pm8018_l3: l3 {
- regulator-always-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- bias-pull-down;
- };
-
- pm8018_l4: l4 {
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- bias-pull-down;
- };
-
- pm8018_l5: l5 {
- regulator-min-microvolt = <2850000>;
- regulator-max-microvolt = <2850000>;
- bias-pull-down;
- };
-
- pm8018_l6: l6 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <2850000>;
- bias-pull-down;
- };
-
- pm8018_l7: l7 {
- regulator-min-microvolt = <1850000>;
- regulator-max-microvolt = <1900000>;
- bias-pull-down;
- };
-
- pm8018_l8: l8 {
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- bias-pull-down;
- };
-
- pm8018_l9: l9 {
- regulator-min-microvolt = <750000>;
- regulator-max-microvolt = <1150000>;
- bias-pull-down;
- };
-
- pm8018_l10: l10 {
- regulator-min-microvolt = <1050000>;
- regulator-max-microvolt = <1050000>;
- bias-pull-down;
- };
-
- pm8018_l11: l11 {
- regulator-min-microvolt = <1050000>;
- regulator-max-microvolt = <1050000>;
- bias-pull-down;
- };
-
- pm8018_l12: l12 {
- regulator-min-microvolt = <1050000>;
- regulator-max-microvolt = <1050000>;
- bias-pull-down;
- };
-
- pm8018_l13: l13 {
- regulator-min-microvolt = <1850000>;
- regulator-max-microvolt = <2950000>;
- bias-pull-down;
- };
-
- pm8018_l14: l14 {
- regulator-min-microvolt = <2850000>;
- regulator-max-microvolt = <2850000>;
- bias-pull-down;
- };
-
- /* Low Voltage Switch */
- pm8018_lvs1: lvs1 {
- bias-pull-down;
- };
- };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-common.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-common.dtsi
new file mode 100644
index 000000000000..525d8c608b06
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-common.dtsi
@@ -0,0 +1,327 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Common Board Device Tree for Microsoft MSM8x26-based Lumias
+ *
+ * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
+ * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+ * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
+ * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
+ */
+
+#include "qcom-msm8226.dtsi"
+#include "pm8226.dtsi"
+#include <dt-bindings/input/input.h>
+
+/*
+ * Delete all generic (msm8226.dtsi) reserved
+ * memory mappings which are different on these devices.
+ */
+/delete-node/ &smem_region;
+
+/ {
+ aliases {
+ mmc0 = &sdhc_1; /* eMMC */
+ mmc1 = &sdhc_2; /* microSD */
+ display0 = &framebuffer;
+ };
+
+ chosen {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ stdout-path = "display0";
+
+ framebuffer: framebuffer@3200000 {
+ compatible = "simple-framebuffer";
+ reg = <0x3200000 0x800000>;
+ format = "a8r8g8b8";
+ width = <720>;
+ height = <1280>;
+ stride = <(720 * 4)>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>,
+ <&mmcc MDSS_BYTE0_CLK>,
+ <&mmcc MDSS_MDP_CLK>,
+ <&mmcc MDSS_PCLK0_CLK>,
+ <&mmcc MDSS_VSYNC_CLK>;
+ power-domains = <&mmcc MDSS_GDSC>;
+ };
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Buttons";
+
+ key-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ /*
+ * This device being a WP platform has a different
+ * memory layout than other Android based devices.
+ * This smem memory region is directly copied from
+ * the original UEFI firmware.
+ */
+ reserved-memory {
+ display_reserved: framebuffer@3200000 {
+ reg = <0x03200000 0x800000>;
+ no-map;
+ };
+
+ smem_region: smem@fa00000 {
+ reg = <0x0fa00000 0x100000>;
+ no-map;
+ };
+ };
+};
+
+&blsp1_i2c5 {
+ status = "okay";
+
+ touchscreen: touchscreen@4b {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x4b>;
+
+ interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <&pm8226_l15>;
+ vio-supply = <&pm8226_l6>;
+
+ pinctrl-0 = <&touchscreen_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rmi4-f01@1 {
+ reg = <0x01>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f11@11 {
+ reg = <0x11>;
+ syna,sensor-type = <1>;
+ };
+ };
+};
+
+&blsp1_uart3 {
+ status = "okay";
+};
+
+&pm8226_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm8226_vib {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-pm8226-regulators";
+
+ /* These values were taken from the original firmware DSDT */
+ pm8226_s1: s1 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ };
+
+ pm8226_s3: s3 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1300000>;
+ };
+
+ pm8226_s4: s4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2100000>;
+ };
+
+ pm8226_s5: s5 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1150000>;
+ };
+
+ pm8226_l3: l3 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1150000>;
+ };
+
+ pm8226_l4: l4 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l5: l5 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l6: l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l7: l7 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <1850000>;
+ };
+
+ pm8226_l8: l8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ pm8226_l9: l9 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l10: l10 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l12: l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l14: l14 {
+ regulator-min-microvolt = <2750000>;
+ regulator-max-microvolt = <2750000>;
+ };
+
+ pm8226_l15: l15 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8226_l16: l16 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ pm8226_l17: l17 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-system-load = <200000>;
+ regulator-allow-set-load;
+ };
+
+ pm8226_l18: l18 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-system-load = <200000>;
+ regulator-allow-set-load;
+ };
+
+ pm8226_l19: l19 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8226_l20: l20 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3075000>;
+ };
+
+ pm8226_l21: l21 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l22: l22 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l23: l23 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l24: l24 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1300000>;
+ };
+
+ pm8226_l25: l25 {
+ regulator-min-microvolt = <1775000>;
+ regulator-max-microvolt = <2075000>;
+ };
+
+ pm8226_l27: l27 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l28: l28 {
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+ };
+};
+
+&sdhc_1 {
+ vmmc-supply = <&pm8226_l17>;
+ vqmmc-supply = <&pm8226_l6>;
+
+ status = "okay";
+};
+
+&sdhc_2 {
+ vmmc-supply = <&pm8226_l18>;
+ vqmmc-supply = <&pm8226_l21>;
+
+ status = "okay";
+};
+
+&usb {
+ extcon = <&smbb>;
+ dr_mode = "peripheral";
+
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&smbb>;
+ v1p8-supply = <&pm8226_l10>;
+ v3p3-supply = <&pm8226_l20>;
+};
+
+&tlmm {
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio106", "gpio107", "gpio108";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ touchscreen_default: touchscreen-default-state {
+ irq-pins {
+ pins = "gpio17";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ reset-pins {
+ pins = "gpio16";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-dempsey.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-dempsey.dts
new file mode 100644
index 000000000000..2c664b5934ec
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-dempsey.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
+ * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+ * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
+ * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226-microsoft-common.dtsi"
+
+/ {
+ model = "Microsoft Lumia 640";
+ compatible = "microsoft,dempsey", "qcom,msm8226";
+ chassis-type = "handset";
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-makepeace.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-makepeace.dts
new file mode 100644
index 000000000000..731c5c375678
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-makepeace.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
+ * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+ * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
+ * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226-microsoft-common.dtsi"
+
+/ {
+ model = "Microsoft Lumia 640 XL";
+ compatible = "microsoft,makepeace", "qcom,msm8226";
+ chassis-type = "handset";
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-moneypenny.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-moneypenny.dts
new file mode 100644
index 000000000000..992b7115b5f8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226-microsoft-moneypenny.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
+ * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+ * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
+ * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226-microsoft-common.dtsi"
+
+/ {
+ model = "Nokia Lumia 630";
+ compatible = "microsoft,moneypenny", "qcom,msm8226";
+ chassis-type = "handset";
+};
+
+&framebuffer {
+ width = <480>;
+ height = <854>;
+ stride = <(480 * 4)>;
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226.dtsi
index 313a726f4704..b492c95e5d30 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8226.dtsi
@@ -53,26 +53,22 @@
IRQ_TYPE_LEVEL_HIGH)>;
};
- reserved-memory {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- smem_region: smem@3000000 {
- reg = <0x3000000 0x100000>;
- no-map;
+ rpm: remoteproc {
+ compatible = "qcom,msm8226-rpm-proc", "qcom,rpm-proc";
+
+ master-stats {
+ compatible = "qcom,rpm-master-stats";
+ qcom,rpm-msg-ram = <&apss_master_stats>,
+ <&mpss_master_stats>,
+ <&lpss_master_stats>,
+ <&pronto_master_stats>;
+ qcom,master-names = "APSS",
+ "MPSS",
+ "LPSS",
+ "PRONTO";
};
- adsp_region: adsp@dc00000 {
- reg = <0x0dc00000 0x1900000>;
- no-map;
- };
- };
-
- smd {
- compatible = "qcom,smd";
-
- rpm {
+ smd-edge {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs 8 0>;
qcom,smd-edge = <15>;
@@ -120,6 +116,22 @@
};
};
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ smem_region: smem@3000000 {
+ reg = <0x3000000 0x100000>;
+ no-map;
+ };
+
+ adsp_region: adsp@dc00000 {
+ reg = <0x0dc00000 0x1900000>;
+ no-map;
+ };
+ };
+
smem {
compatible = "qcom,smem";
@@ -230,6 +242,17 @@
status = "disabled";
};
+ blsp1_uart2: serial@f991e000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0xf991e000 0x1000>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core",
+ "iface";
+ status = "disabled";
+ };
+
blsp1_uart3: serial@f991f000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0xf991f000 0x1000>;
@@ -313,6 +336,21 @@
#size-cells = <0>;
};
+ blsp1_i2c6: i2c@f9928000 {
+ compatible = "qcom,i2c-qup-v2.1.1";
+ reg = <0xf9928000 0x1000>;
+ interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_QUP6_I2C_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core",
+ "iface";
+ pinctrl-0 = <&blsp1_i2c6_pins>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
cci: cci@fda0c000 {
compatible = "qcom,msm8226-cci";
#address-cells = <1>;
@@ -404,8 +442,8 @@
<&gcc GPLL0_VOTE>,
<&gcc GPLL1_VOTE>,
<&rpmcc RPM_SMD_GFX3D_CLK_SRC>,
- <0>,
- <0>;
+ <&mdss_dsi0_phy 1>,
+ <&mdss_dsi0_phy 0>;
clock-names = "xo",
"mmss_gpll0_vote",
"gpll0_vote",
@@ -460,6 +498,13 @@
bias-disable;
};
+ blsp1_i2c6_pins: blsp1-i2c6-state {
+ pins = "gpio22", "gpio23";
+ function = "blsp_i2c6";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
cci_default: cci-default-state {
pins = "gpio29", "gpio30";
function = "cci_i2c0";
@@ -742,6 +787,26 @@
rpm_msg_ram: sram@fc428000 {
compatible = "qcom,rpm-msg-ram";
reg = <0xfc428000 0x4000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xfc428000 0x4000>;
+
+ apss_master_stats: sram@150 {
+ reg = <0x150 0x14>;
+ };
+
+ mpss_master_stats: sram@b50 {
+ reg = <0xb50 0x14>;
+ };
+
+ lpss_master_stats: sram@1550 {
+ reg = <0x1550 0x14>;
+ };
+
+ pronto_master_stats: sram@1f50 {
+ reg = <0x1f50 0x14>;
+ };
};
tcsr_mutex: hwlock@fd484000 {
@@ -784,6 +849,23 @@
};
};
+ sram@fdd00000 {
+ compatible = "qcom,msm8226-ocmem";
+ reg = <0xfdd00000 0x2000>,
+ <0xfec00000 0x20000>;
+ reg-names = "ctrl", "mem";
+ ranges = <0 0xfec00000 0x20000>;
+ clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>;
+ clock-names = "core";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ gmu_sram: gmu-sram@0 {
+ reg = <0x0 0x20000>;
+ };
+ };
+
sram@fe805000 {
compatible = "qcom,msm8226-imem", "syscon", "simple-mfd";
reg = <0xfe805000 0x1000>;
@@ -793,8 +875,175 @@
offset = <0x65c>;
mode-bootloader = <0x77665500>;
- mode-normal = <0x77665501>;
- mode-recovery = <0x77665502>;
+ mode-normal = <0x77665501>;
+ mode-recovery = <0x77665502>;
+ };
+ };
+
+ mdss: display-subsystem@fd900000 {
+ compatible = "qcom,mdss";
+ reg = <0xfd900000 0x100>, <0xfd924000 0x1000>;
+ reg-names = "mdss_phys", "vbif_phys";
+
+ power-domains = <&mmcc MDSS_GDSC>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>,
+ <&mmcc MDSS_VSYNC_CLK>;
+ clock-names = "iface",
+ "bus",
+ "vsync";
+
+ interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@fd900000 {
+ compatible = "qcom,msm8226-mdp5", "qcom,mdp5";
+ reg = <0xfd900100 0x22000>;
+ reg-names = "mdp_phys";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>,
+ <&mmcc MDSS_MDP_CLK>,
+ <&mmcc MDSS_VSYNC_CLK>;
+ clock-names = "iface",
+ "bus",
+ "core",
+ "vsync";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_mdp_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@fd922800 {
+ compatible = "qcom,msm8226-dsi-ctrl",
+ "qcom,mdss-dsi-ctrl";
+ reg = <0xfd922800 0x1f8>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ assigned-clocks = <&mmcc BYTE0_CLK_SRC>,
+ <&mmcc PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>;
+
+ clocks = <&mmcc MDSS_MDP_CLK>,
+ <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>,
+ <&mmcc MDSS_BYTE0_CLK>,
+ <&mmcc MDSS_PCLK0_CLK>,
+ <&mmcc MDSS_ESC0_CLK>,
+ <&mmcc MMSS_MISC_AHB_CLK>;
+ clock-names = "mdp_core",
+ "iface",
+ "bus",
+ "byte",
+ "pixel",
+ "core",
+ "core_mmss";
+
+ phys = <&mdss_dsi0_phy>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&mdss_mdp_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@fd922a00 {
+ compatible = "qcom,dsi-phy-28nm-8226";
+ reg = <0xfd922a00 0xd4>,
+ <0xfd922b00 0x280>,
+ <0xfd922d80 0x30>;
+ reg-names = "dsi_pll",
+ "dsi_phy",
+ "dsi_phy_regulator";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface",
+ "ref";
+ };
+ };
+
+ gpu: adreno@fdb00000 {
+ compatible = "qcom,adreno-305.18", "qcom,adreno";
+ reg = <0xfdb00000 0x10000>;
+ reg-names = "kgsl_3d0_reg_memory";
+
+ interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "kgsl_3d0_irq";
+
+ clocks = <&mmcc OXILI_GFX3D_CLK>,
+ <&mmcc OXILICX_AHB_CLK>,
+ <&mmcc OXILICX_AXI_CLK>;
+ clock-names = "core", "iface", "mem_iface";
+
+ sram = <&gmu_sram>;
+ power-domains = <&mmcc OXILICX_GDSC>;
+ operating-points-v2 = <&gpu_opp_table>;
+
+ status = "disabled";
+
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-450000000 {
+ opp-hz = /bits/ 64 <450000000>;
+ };
+
+ opp-320000000 {
+ opp-hz = /bits/ 64 <320000000>;
+ };
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ };
+
+ opp-19000000 {
+ opp-hz = /bits/ 64 <19000000>;
+ };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660-surf.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660-surf.dts
index be18f1be29a1..69fe651f564d 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660-surf.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660-surf.dts
@@ -2,6 +2,7 @@
#include <dt-bindings/input/input.h>
#include "qcom-msm8660.dtsi"
+#include "pm8058.dtsi"
/ {
model = "Qualcomm MSM8660 SURF";
@@ -35,30 +36,42 @@
};
&pm8058 {
- keypad@148 {
- linux,keymap = <
- MATRIX_KEY(0, 0, KEY_FN_F1)
- MATRIX_KEY(0, 1, KEY_UP)
- MATRIX_KEY(0, 2, KEY_LEFT)
- MATRIX_KEY(0, 3, KEY_VOLUMEUP)
- MATRIX_KEY(1, 0, KEY_FN_F2)
- MATRIX_KEY(1, 1, KEY_RIGHT)
- MATRIX_KEY(1, 2, KEY_DOWN)
- MATRIX_KEY(1, 3, KEY_VOLUMEDOWN)
- MATRIX_KEY(2, 3, KEY_ENTER)
- MATRIX_KEY(4, 0, KEY_CAMERA_FOCUS)
- MATRIX_KEY(4, 1, KEY_UP)
- MATRIX_KEY(4, 2, KEY_LEFT)
- MATRIX_KEY(4, 3, KEY_HOME)
- MATRIX_KEY(4, 4, KEY_FN_F3)
- MATRIX_KEY(5, 0, KEY_CAMERA)
- MATRIX_KEY(5, 1, KEY_RIGHT)
- MATRIX_KEY(5, 2, KEY_DOWN)
- MATRIX_KEY(5, 3, KEY_BACK)
- MATRIX_KEY(5, 4, KEY_MENU)
- >;
- keypad,num-rows = <6>;
- keypad,num-columns = <5>;
+ interrupts-extended = <&tlmm 88 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8058_keypad {
+ linux,keymap = <
+ MATRIX_KEY(0, 0, KEY_FN_F1)
+ MATRIX_KEY(0, 1, KEY_UP)
+ MATRIX_KEY(0, 2, KEY_LEFT)
+ MATRIX_KEY(0, 3, KEY_VOLUMEUP)
+ MATRIX_KEY(1, 0, KEY_FN_F2)
+ MATRIX_KEY(1, 1, KEY_RIGHT)
+ MATRIX_KEY(1, 2, KEY_DOWN)
+ MATRIX_KEY(1, 3, KEY_VOLUMEDOWN)
+ MATRIX_KEY(2, 3, KEY_ENTER)
+ MATRIX_KEY(4, 0, KEY_CAMERA_FOCUS)
+ MATRIX_KEY(4, 1, KEY_UP)
+ MATRIX_KEY(4, 2, KEY_LEFT)
+ MATRIX_KEY(4, 3, KEY_HOME)
+ MATRIX_KEY(4, 4, KEY_FN_F3)
+ MATRIX_KEY(5, 0, KEY_CAMERA)
+ MATRIX_KEY(5, 1, KEY_RIGHT)
+ MATRIX_KEY(5, 2, KEY_DOWN)
+ MATRIX_KEY(5, 3, KEY_BACK)
+ MATRIX_KEY(5, 4, KEY_MENU)
+ >;
+ keypad,num-rows = <6>;
+ keypad,num-columns = <5>;
+};
+
+&rpm {
+ regulators-0 {
+ compatible = "qcom,rpm-pm8901-regulators";
+ };
+
+ regulators-1 {
+ compatible = "qcom,rpm-pm8058-regulators";
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660.dtsi
index 78023ed2fdf7..a7c245b9c8f9 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8660.dtsi
@@ -73,22 +73,6 @@
};
};
- /*
- * These channels from the ADC are simply hardware monitors.
- * That is why the ADC is referred to as "HKADC" - HouseKeeping
- * ADC.
- */
- iio-hwmon {
- compatible = "iio-hwmon";
- io-channels = <&xoadc 0x00 0x01>, /* Battery */
- <&xoadc 0x00 0x02>, /* DC in (charger) */
- <&xoadc 0x00 0x04>, /* VPH the main system voltage */
- <&xoadc 0x00 0x0b>, /* Die temperature */
- <&xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
- <&xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
- <&xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
- };
-
soc: soc {
#address-cells = <1>;
#size-cells = <1>;
@@ -334,143 +318,10 @@
status = "disabled";
};
- ssbi@500000 {
+ ssbi: ssbi@500000 {
compatible = "qcom,ssbi";
reg = <0x500000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pm8058: pmic {
- compatible = "qcom,pm8058";
- interrupt-parent = <&tlmm>;
- interrupts = <88 8>;
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pm8058_gpio: gpio@150 {
- compatible = "qcom,pm8058-gpio",
- "qcom,ssbi-gpio";
- reg = <0x150>;
- interrupt-controller;
- #interrupt-cells = <2>;
- gpio-controller;
- gpio-ranges = <&pm8058_gpio 0 0 44>;
- #gpio-cells = <2>;
-
- };
-
- pm8058_mpps: mpps@50 {
- compatible = "qcom,pm8058-mpp",
- "qcom,ssbi-mpp";
- reg = <0x50>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8058_mpps 0 0 12>;
- interrupt-controller;
- #interrupt-cells = <2>;
- };
-
- pwrkey@1c {
- compatible = "qcom,pm8058-pwrkey";
- reg = <0x1c>;
- interrupt-parent = <&pm8058>;
- interrupts = <50 1>, <51 1>;
- debounce = <15625>;
- pull-up;
- };
-
- pm8058_keypad: keypad@148 {
- compatible = "qcom,pm8058-keypad";
- reg = <0x148>;
- interrupt-parent = <&pm8058>;
- interrupts = <74 1>, <75 1>;
- debounce = <15>;
- scan-delay = <32>;
- row-hold = <91500>;
- };
-
- xoadc: xoadc@197 {
- compatible = "qcom,pm8058-adc";
- reg = <0x197>;
- interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
- #address-cells = <2>;
- #size-cells = <0>;
- #io-channel-cells = <2>;
-
- vcoin: adc-channel@0 {
- reg = <0x00 0x00>;
- };
- vbat: adc-channel@1 {
- reg = <0x00 0x01>;
- };
- dcin: adc-channel@2 {
- reg = <0x00 0x02>;
- };
- ichg: adc-channel@3 {
- reg = <0x00 0x03>;
- };
- vph_pwr: adc-channel@4 {
- reg = <0x00 0x04>;
- };
- usb_vbus: adc-channel@a {
- reg = <0x00 0x0a>;
- };
- die_temp: adc-channel@b {
- reg = <0x00 0x0b>;
- };
- ref_625mv: adc-channel@c {
- reg = <0x00 0x0c>;
- };
- ref_1250mv: adc-channel@d {
- reg = <0x00 0x0d>;
- };
- ref_325mv: adc-channel@e {
- reg = <0x00 0x0e>;
- };
- ref_muxoff: adc-channel@f {
- reg = <0x00 0x0f>;
- };
- };
-
- rtc@1e8 {
- compatible = "qcom,pm8058-rtc";
- reg = <0x1e8>;
- interrupt-parent = <&pm8058>;
- interrupts = <39 1>;
- allow-set-time;
- };
-
- vibrator@4a {
- compatible = "qcom,pm8058-vib";
- reg = <0x4a>;
- };
-
- pm8058_led48: led@48 {
- compatible = "qcom,pm8058-keypad-led";
- reg = <0x48>;
- status = "disabled";
- };
-
- pm8058_led131: led@131 {
- compatible = "qcom,pm8058-led";
- reg = <0x131>;
- status = "disabled";
- };
-
- pm8058_led132: led@132 {
- compatible = "qcom,pm8058-led";
- reg = <0x132>;
- status = "disabled";
- };
-
- pm8058_led133: led@133 {
- compatible = "qcom,pm8058-led";
- reg = <0x133>;
- status = "disabled";
- };
-
- };
};
l2cc: clock-controller@2082000 {
@@ -496,72 +347,6 @@
clocks = <&pxo_board>;
clock-names = "pxo";
};
-
- regulators-0 {
- compatible = "qcom,rpm-pm8901-regulators";
-
- pm8901_l0: l0 {};
- pm8901_l1: l1 {};
- pm8901_l2: l2 {};
- pm8901_l3: l3 {};
- pm8901_l4: l4 {};
- pm8901_l5: l5 {};
- pm8901_l6: l6 {};
-
- /* S0 and S1 Handled as SAW regulators by SPM */
- pm8901_s2: s2 {};
- pm8901_s3: s3 {};
- pm8901_s4: s4 {};
-
- pm8901_lvs0: lvs0 {};
- pm8901_lvs1: lvs1 {};
- pm8901_lvs2: lvs2 {};
- pm8901_lvs3: lvs3 {};
-
- pm8901_mvs: mvs {};
- };
-
- regulators-1 {
- compatible = "qcom,rpm-pm8058-regulators";
-
- pm8058_l0: l0 {};
- pm8058_l1: l1 {};
- pm8058_l2: l2 {};
- pm8058_l3: l3 {};
- pm8058_l4: l4 {};
- pm8058_l5: l5 {};
- pm8058_l6: l6 {};
- pm8058_l7: l7 {};
- pm8058_l8: l8 {};
- pm8058_l9: l9 {};
- pm8058_l10: l10 {};
- pm8058_l11: l11 {};
- pm8058_l12: l12 {};
- pm8058_l13: l13 {};
- pm8058_l14: l14 {};
- pm8058_l15: l15 {};
- pm8058_l16: l16 {};
- pm8058_l17: l17 {};
- pm8058_l18: l18 {};
- pm8058_l19: l19 {};
- pm8058_l20: l20 {};
- pm8058_l21: l21 {};
- pm8058_l22: l22 {};
- pm8058_l23: l23 {};
- pm8058_l24: l24 {};
- pm8058_l25: l25 {};
-
- pm8058_s0: s0 {};
- pm8058_s1: s1 {};
- pm8058_s2: s2 {};
- pm8058_s3: s3 {};
- pm8058_s4: s4 {};
-
- pm8058_lvs0: lvs0 {};
- pm8058_lvs1: lvs1 {};
-
- pm8058_ncp: ncp {};
- };
};
amba {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-htc-memul.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-htc-memul.dts
new file mode 100644
index 000000000000..ed328b24335f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-htc-memul.dts
@@ -0,0 +1,372 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Luca Weiss <luca@z3ntu.xyz>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226.dtsi"
+#include "pm8226.dtsi"
+
+/delete-node/ &adsp_region;
+/delete-node/ &smem_region;
+
+/ {
+ model = "HTC One Mini 2";
+ compatible = "htc,memul", "qcom,msm8926", "qcom,msm8226";
+ chassis-type = "handset";
+
+ aliases {
+ mmc1 = &sdhc_2; /* SDC2 SD card slot */
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-power {
+ label = "Power";
+ gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ debounce-interval = <15>;
+ };
+
+ key-volume-down {
+ label = "Volume Down";
+ gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEDOWN>;
+ debounce-interval = <15>;
+ };
+
+ key-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ };
+ };
+
+ reserved-memory {
+ unknown@5b00000 {
+ reg = <0x05b00000 0x200000>;
+ no-map;
+ };
+
+ unknown@7500000 {
+ reg = <0x07500000 0xb00000>;
+ no-map;
+ };
+
+ mpss_region: mpss@8000000 {
+ reg = <0x08000000 0x4f00000>;
+ no-map;
+ };
+
+ unknown@cf00000 {
+ reg = <0x0cf00000 0x200000>;
+ no-map;
+ };
+
+ mba_region: mba@d100000 {
+ reg = <0x0d100000 0x3a000>;
+ no-map;
+ };
+
+ unknown@d13a000 {
+ reg = <0x0d13a000 0xc6000>;
+ no-map;
+ };
+
+ wcnss_region: wcnss@d200000 {
+ reg = <0x0d200000 0x650000>;
+ no-map;
+ };
+
+ unknown@d850000 {
+ reg = <0x0d850000 0x3b0000>;
+ no-map;
+ };
+
+ adsp_region: adsp@dc00000 {
+ reg = <0x0dc00000 0x1400000>;
+ no-map;
+ };
+
+ unknown@f000000 {
+ reg = <0x0f000000 0x500000>;
+ no-map;
+ };
+
+ venus_region: venus@f500000 {
+ reg = <0x0f500000 0x500000>;
+ no-map;
+ };
+
+ smem_region: smem@fa00000 {
+ reg = <0x0fa00000 0x100000>;
+ no-map;
+ };
+
+ unknown@fb00000 {
+ reg = <0x0fb00000 0x1b00000>;
+ no-map;
+ };
+ };
+};
+
+&adsp {
+ firmware-name = "qcom/msm8926/memul/adsp.mbn";
+ status = "okay";
+};
+
+&blsp1_i2c2 {
+ status = "okay";
+
+ magnetometer@d {
+ compatible = "asahi-kasei,ak8963";
+ reg = <0x0d>;
+ interrupts-extended = <&tlmm 66 IRQ_TYPE_EDGE_RISING>;
+ vdd-supply = <&pm8226_l19>;
+ vid-supply = <&pm8226_l28>;
+ };
+
+ accelerometer@18 {
+ compatible = "bosch,bma250e";
+ reg = <0x18>;
+ interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_RISING>;
+ vdd-supply = <&pm8226_l19>;
+ vddio-supply = <&pm8226_l28>;
+ };
+};
+
+&blsp1_i2c4 {
+ status = "okay";
+
+ /* TFA9887 @ 34 */
+ /* TFA9887 @ 35 */
+};
+
+&blsp1_i2c5 {
+ status = "okay";
+
+ touchscreen@20 {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x20>;
+
+ interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <&pm8226_l19>;
+
+ syna,startup-delay-ms = <160>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rmi4-f01@1 {
+ reg = <0x1>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f12@12 {
+ reg = <0x12>;
+ syna,sensor-type = <1>;
+ };
+ };
+};
+
+&blsp1_i2c6 {
+ status = "okay";
+
+ /* NCP6924 Camera Regulators @ 10 */
+ /* PN544 NFC @ 28 */
+ /* TPS61310 Flash/Torch @ 33 */
+};
+
+&pm8226_vib {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-pm8226-regulators";
+
+ pm8226_s3: s3 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ pm8226_s4: s4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2200000>;
+ };
+
+ pm8226_s5: s5 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1150000>;
+ };
+
+ pm8226_l1: l1 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ pm8226_l2: l2 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l3: l3 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1337500>;
+ };
+
+ pm8226_l4: l4 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l5: l5 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l6: l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l7: l7 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <1850000>;
+ };
+
+ pm8226_l8: l8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l9: l9 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l10: l10 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l12: l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l14: l14 {
+ regulator-min-microvolt = <2750000>;
+ regulator-max-microvolt = <2750000>;
+ };
+
+ pm8226_l15: l15 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ pm8226_l16: l16 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3350000>;
+ };
+
+ pm8226_l17: l17 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l18: l18 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l19: l19 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8226_l20: l20 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3075000>;
+ };
+
+ pm8226_l21: l21 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-allow-set-load;
+ };
+
+ pm8226_l22: l22 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l23: l23 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ pm8226_l24: l24 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ pm8226_l25: l25 {
+ regulator-min-microvolt = <1775000>;
+ regulator-max-microvolt = <2125000>;
+ };
+
+ pm8226_l26: l26 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ pm8226_l27: l27 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l28: l28 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_lvs1: lvs1 {};
+ };
+};
+
+&sdhc_2 {
+ vmmc-supply = <&pm8226_l18>;
+ vqmmc-supply = <&pm8226_l21>;
+
+ bus-width = <4>;
+ cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
+&smbb {
+ qcom,fast-charge-safe-current = <1750000>;
+ qcom,fast-charge-current-limit = <1750000>;
+ qcom,fast-charge-safe-voltage = <4360000>;
+ qcom,fast-charge-high-threshold-voltage = <4350000>;
+ qcom,auto-recharge-threshold-voltage = <4300000>;
+ qcom,minimum-input-voltage = <4300000>;
+
+ status = "okay";
+};
+
+&usb {
+ extcon = <&smbb>;
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&smbb>;
+ v1p8-supply = <&pm8226_l10>;
+ v3p3-supply = <&pm8226_l20>;
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-superman-lte.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-superman-lte.dts
new file mode 100644
index 000000000000..9b48661d69c5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-superman-lte.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
+ * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+ * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
+ * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226-microsoft-common.dtsi"
+
+/* This device has touchscreen on i2c3 instead */
+/delete-node/ &touchscreen;
+
+/ {
+ model = "Nokia Lumia 735";
+ compatible = "microsoft,superman-lte", "qcom,msm8926", "qcom,msm8226";
+ chassis-type = "handset";
+};
+
+&blsp1_i2c3 {
+ status = "okay";
+
+ touchscreen: touchscreen@4b {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x4b>;
+
+ interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <&pm8226_l15>;
+ vio-supply = <&pm8226_l6>;
+
+ pinctrl-0 = <&touchscreen_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rmi4-f01@1 {
+ reg = <0x01>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f11@11 {
+ reg = <0x11>;
+ syna,sensor-type = <1>;
+ };
+ };
+};
+
+&blsp1_i2c5 {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-tesla.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-tesla.dts
new file mode 100644
index 000000000000..53a6d4e85959
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-microsoft-tesla.dts
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Jack Matthews <jm5112356@gmail.com>
+ * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+ * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@gmail.com>
+ * Copyright (c) 2023, Rayyan Ansari <rayyan@ansari.sh>
+ */
+
+/dts-v1/;
+
+#include "qcom-msm8226-microsoft-common.dtsi"
+
+/* This device has touchscreen on i2c1 instead */
+/delete-node/ &touchscreen;
+
+/ {
+ model = "Nokia Lumia 830";
+ compatible = "microsoft,tesla", "qcom,msm8926", "qcom,msm8226";
+ chassis-type = "handset";
+};
+
+&blsp1_i2c1 {
+ status = "okay";
+
+ touchscreen: touchscreen@4b {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x4b>;
+
+ interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <&pm8226_l15>;
+ vio-supply = <&pm8226_l6>;
+
+ pinctrl-0 = <&touchscreen_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rmi4-f01@1 {
+ reg = <0x01>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f12@12 {
+ reg = <0x12>;
+ syna,sensor-type = <1>;
+ };
+ };
+};
+
+&blsp1_i2c5 {
+ status = "disabled";
+};
+
+&gpio_keys {
+ key-camera-snapshot {
+ label = "Camera Snapshot";
+ gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_CAMERA>;
+ };
+
+ key-camera-focus {
+ label = "Camera Focus";
+ gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_CAMERA_FOCUS>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-motorola-peregrine.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-motorola-peregrine.dts
new file mode 100644
index 000000000000..0cbe2d2fbbb1
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8926-motorola-peregrine.dts
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: BSD-3-Clause
+
+/dts-v1/;
+
+#include "qcom-msm8226.dtsi"
+#include "pm8226.dtsi"
+
+/delete-node/ &smem_region;
+
+/ {
+ model = "Motorola Moto G 4G (2013)";
+ compatible = "motorola,peregrine", "qcom,msm8926", "qcom,msm8226";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &sdhc_1; /* SDC1 eMMC slot */
+ mmc1 = &sdhc_2; /* SDC2 SD card slot */
+ };
+
+ chosen {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ framebuffer0: framebuffer@3200000 {
+ compatible = "simple-framebuffer";
+ reg = <0x03200000 0x800000>;
+ width = <720>;
+ height = <1280>;
+ stride = <(720 * 3)>;
+ format = "r8g8b8";
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ event-hall-sensor {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ };
+
+ key-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ framebuffer@3200000 {
+ reg = <0x03200000 0x800000>;
+ no-map;
+ };
+
+ smem_region: smem@fa00000 {
+ reg = <0x0fa00000 0x100000>;
+ no-map;
+ };
+ };
+};
+
+&blsp1_i2c3 {
+ status = "okay";
+
+ sensor@48 {
+ compatible = "ti,tmp108";
+ reg = <0x48>;
+ };
+};
+
+&blsp1_uart3 {
+ status = "okay";
+};
+
+&pm8226_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm8226_vib {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-pm8226-regulators";
+
+ pm8226_s3: s3 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1300000>;
+ };
+
+ pm8226_s4: s4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2200000>;
+ };
+
+ pm8226_s5: s5 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1150000>;
+ };
+
+ pm8226_l1: l1 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ pm8226_l2: l2 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l3: l3 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1337500>;
+ };
+
+ pm8226_l4: l4 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l5: l5 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ pm8226_l6: l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allow-set-load;
+ };
+
+ pm8226_l7: l7 {
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <1850000>;
+ };
+
+ pm8226_l8: l8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l9: l9 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l10: l10 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l12: l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8226_l14: l14 {
+ regulator-min-microvolt = <2750000>;
+ regulator-max-microvolt = <2750000>;
+ };
+
+ pm8226_l15: l15 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ pm8226_l16: l16 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3350000>;
+ };
+
+ pm8226_l17: l17 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l18: l18 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l19: l19 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8226_l20: l20 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3075000>;
+ };
+
+ pm8226_l21: l21 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-allow-set-load;
+ };
+
+ pm8226_l22: l22 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l23: l23 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8226_l24: l24 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ pm8226_l25: l25 {
+ regulator-min-microvolt = <1775000>;
+ regulator-max-microvolt = <2125000>;
+ };
+
+ pm8226_l26: l26 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ pm8226_l27: l27 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8226_l28: l28 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ };
+
+ pm8226_lvs1: lvs1 {
+ /* Pull-up for I2C lines */
+ regulator-always-on;
+ };
+ };
+};
+
+&sdhc_1 {
+ vmmc-supply = <&pm8226_l17>;
+ vqmmc-supply = <&pm8226_l6>;
+
+ bus-width = <8>;
+ non-removable;
+
+ status = "okay";
+};
+
+&sdhc_2 {
+ vmmc-supply = <&pm8226_l18>;
+ vqmmc-supply = <&pm8226_l21>;
+
+ bus-width = <4>;
+ cd-gpios = <&tlmm 115 GPIO_ACTIVE_HIGH>;
+
+ status = "okay";
+};
+
+&smbb {
+ qcom,fast-charge-safe-current = <2000000>;
+ qcom,fast-charge-current-limit = <1900000>;
+ qcom,fast-charge-safe-voltage = <4400000>;
+ qcom,minimum-input-voltage = <4300000>;
+
+ status = "okay";
+};
+
+&usb {
+ extcon = <&smbb>;
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&smbb>;
+ v1p8-supply = <&pm8226_l10>;
+ v3p3-supply = <&pm8226_l20>;
+};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-cdp.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-cdp.dts
index 6c1bc3818883..36f4c997b0b3 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-cdp.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-cdp.dts
@@ -2,6 +2,7 @@
#include <dt-bindings/input/input.h>
#include "qcom-msm8960.dtsi"
+#include "pm8921.dtsi"
/ {
model = "Qualcomm MSM8960 CDP";
@@ -88,17 +89,21 @@
};
};
-&pmicintc {
- keypad@148 {
- linux,keymap = <
- MATRIX_KEY(0, 0, KEY_VOLUMEUP)
- MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
- MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
- MATRIX_KEY(0, 3, KEY_CAMERA)
- >;
- keypad,num-rows = <1>;
- keypad,num-columns = <5>;
- };
+&pm8921 {
+ interrupts-extended = <&msmgpio 104 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&pm8921_keypad {
+ linux,keymap = <
+ MATRIX_KEY(0, 0, KEY_VOLUMEUP)
+ MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
+ MATRIX_KEY(0, 3, KEY_CAMERA)
+ >;
+ keypad,num-rows = <1>;
+ keypad,num-columns = <5>;
+
+ status = "okay";
};
&rpm {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-samsung-expressatt.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-samsung-expressatt.dts
index 13e85c287498..1a5116336ff0 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/input/input.h>
+#include <dt-bindings/reset/qcom,gcc-msm8960.h>
#include "qcom-msm8960.dtsi"
-#include <dt-bindings/reset/qcom,gcc-msm8960.h>
+#include "pm8921.dtsi"
/ {
model = "Samsung Galaxy Express SGH-I437";
@@ -84,6 +85,10 @@
};
};
+&pm8921 {
+ interrupts-extended = <&msmgpio 104 IRQ_TYPE_LEVEL_LOW>;
+};
+
&rpm {
regulators {
compatible = "qcom,rpm-pm8921-regulators";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960.dtsi
index fa2013388d99..f420740e068e 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8960.dtsi
@@ -200,10 +200,6 @@
<GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 22 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "ack", "err", "wakeup";
-
- regulators {
- compatible = "qcom,rpm-pm8921-regulators";
- };
};
acc0: clock-controller@2088000 {
@@ -259,49 +255,10 @@
};
};
- ssbi@500000 {
+ ssbi: ssbi@500000 {
compatible = "qcom,ssbi";
reg = <0x500000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pmicintc: pmic {
- compatible = "qcom,pm8921";
- interrupt-parent = <&msmgpio>;
- interrupts = <104 IRQ_TYPE_LEVEL_LOW>;
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pwrkey@1c {
- compatible = "qcom,pm8921-pwrkey";
- reg = <0x1c>;
- interrupt-parent = <&pmicintc>;
- interrupts = <50 IRQ_TYPE_EDGE_RISING>,
- <51 IRQ_TYPE_EDGE_RISING>;
- debounce = <15625>;
- pull-up;
- };
-
- keypad@148 {
- compatible = "qcom,pm8921-keypad";
- reg = <0x148>;
- interrupt-parent = <&pmicintc>;
- interrupts = <74 IRQ_TYPE_EDGE_RISING>,
- <75 IRQ_TYPE_EDGE_RISING>;
- debounce = <15>;
- scan-delay = <32>;
- row-hold = <91500>;
- };
-
- rtc@11d {
- compatible = "qcom,pm8921-rtc";
- interrupt-parent = <&pmicintc>;
- interrupts = <39 IRQ_TYPE_EDGE_RISING>;
- reg = <0x11d>;
- allow-set-time;
- };
- };
};
rng@1a500000 {
@@ -364,7 +321,6 @@
#size-cells = <0>;
reg = <0x16080000 0x1000>;
interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
- spi-max-frequency = <24000000>;
cs-gpios = <&msmgpio 8 0>;
clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>;
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
index 60bdfddeae69..4aaae8537a3f 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-msm8974.dtsi"
-#include "qcom-pm8841.dtsi"
-#include "qcom-pm8941.dtsi"
+#include "pm8841.dtsi"
+#include "pm8941.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -60,6 +60,33 @@
enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
};
+ vreg_boost: vreg-boost {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_n_pin>;
+ };
+
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
+
vreg_wlan: wlan-regulator {
compatible = "regulator-fixed";
@@ -340,6 +367,7 @@
&remoteproc_adsp {
cx-supply = <&pm8841_s2>;
+ status = "okay";
};
&remoteproc_mss {
@@ -347,6 +375,7 @@
mss-supply = <&pm8841_s3>;
mx-supply = <&pm8841_s1>;
pll-supply = <&pm8941_l12>;
+ status = "okay";
};
&rpm_requests {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-sony-xperia-rhine.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-sony-xperia-rhine.dtsi
index 68a2f9094e53..d34659ebac22 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-sony-xperia-rhine.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974-sony-xperia-rhine.dtsi
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-msm8974.dtsi"
-#include "qcom-pm8841.dtsi"
-#include "qcom-pm8941.dtsi"
+#include "pm8841.dtsi"
+#include "pm8941.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -65,6 +65,33 @@
pmsg-size = <0x80000>;
};
};
+
+ vreg_boost: vreg-boost {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_n_pin>;
+ };
+
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
};
&blsp1_i2c2 {
@@ -190,6 +217,7 @@
&remoteproc_adsp {
cx-supply = <&pm8841_s2>;
+ status = "okay";
};
&remoteproc_mss {
@@ -197,6 +225,7 @@
mss-supply = <&pm8841_s3>;
mx-supply = <&pm8841_s1>;
pll-supply = <&pm8941_l12>;
+ status = "okay";
};
&rpm_requests {
@@ -425,6 +454,8 @@
qcom,fast-charge-low-threshold-voltage = <3400000>;
qcom,auto-recharge-threshold-voltage = <4200000>;
qcom,minimum-input-voltage = <4300000>;
+
+ status = "okay";
};
&tlmm {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974.dtsi
index aeca504918a0..b1413983787c 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974.dtsi
@@ -113,6 +113,40 @@
interrupts = <GIC_PPI 7 0xf04>;
};
+ rpm: remoteproc {
+ compatible = "qcom,msm8974-rpm-proc", "qcom,rpm-proc";
+
+ master-stats {
+ compatible = "qcom,rpm-master-stats";
+ qcom,rpm-msg-ram = <&apss_master_stats>,
+ <&mpss_master_stats>,
+ <&lpss_master_stats>,
+ <&pronto_master_stats>;
+ qcom,master-names = "APSS",
+ "MPSS",
+ "LPSS",
+ "PRONTO";
+ };
+
+ smd-edge {
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,ipc = <&apcs 8 0>;
+ qcom,smd-edge = <15>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8974";
+ qcom,smd-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc";
+ #clock-cells = <1>;
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
@@ -293,28 +327,6 @@
};
};
- smd {
- compatible = "qcom,smd";
-
- rpm {
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 0>;
- qcom,smd-edge = <15>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8974";
- qcom,smd-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc";
- #clock-cells = <1>;
- clocks = <&xo_board>;
- clock-names = "xo";
- };
- };
- };
- };
-
soc: soc {
#address-cells = <1>;
#size-cells = <1>;
@@ -334,6 +346,20 @@
reg = <0xf9011000 0x1000>;
};
+ saw_l2: power-controller@f9012000 {
+ compatible = "qcom,saw2";
+ reg = <0xf9012000 0x1000>;
+ regulator;
+ };
+
+ watchdog@f9017000 {
+ compatible = "qcom,apss-wdt-msm8974", "qcom,kpss-wdt";
+ reg = <0xf9017000 0x1000>;
+ interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 4 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&sleep_clk>;
+ };
+
timer@f9020000 {
#address-cells = <1>;
#size-cells = <1>;
@@ -393,52 +419,46 @@
};
};
- saw0: power-controller@f9089000 {
- compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
- reg = <0xf9089000 0x1000>, <0xf9009000 0x1000>;
- };
-
- saw1: power-controller@f9099000 {
- compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
- reg = <0xf9099000 0x1000>, <0xf9009000 0x1000>;
- };
-
- saw2: power-controller@f90a9000 {
- compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
- reg = <0xf90a9000 0x1000>, <0xf9009000 0x1000>;
- };
-
- saw3: power-controller@f90b9000 {
- compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
- reg = <0xf90b9000 0x1000>, <0xf9009000 0x1000>;
- };
-
- saw_l2: power-controller@f9012000 {
- compatible = "qcom,saw2";
- reg = <0xf9012000 0x1000>;
- regulator;
- };
-
acc0: power-manager@f9088000 {
compatible = "qcom,kpss-acc-v2";
reg = <0xf9088000 0x1000>, <0xf9008000 0x1000>;
};
+ saw0: power-controller@f9089000 {
+ compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
+ reg = <0xf9089000 0x1000>, <0xf9009000 0x1000>;
+ };
+
acc1: power-manager@f9098000 {
compatible = "qcom,kpss-acc-v2";
reg = <0xf9098000 0x1000>, <0xf9008000 0x1000>;
};
+ saw1: power-controller@f9099000 {
+ compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
+ reg = <0xf9099000 0x1000>, <0xf9009000 0x1000>;
+ };
+
acc2: power-manager@f90a8000 {
compatible = "qcom,kpss-acc-v2";
reg = <0xf90a8000 0x1000>, <0xf9008000 0x1000>;
};
+ saw2: power-controller@f90a9000 {
+ compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
+ reg = <0xf90a9000 0x1000>, <0xf9009000 0x1000>;
+ };
+
acc3: power-manager@f90b8000 {
compatible = "qcom,kpss-acc-v2";
reg = <0xf90b8000 0x1000>, <0xf9008000 0x1000>;
};
+ saw3: power-controller@f90b9000 {
+ compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
+ reg = <0xf90b9000 0x1000>, <0xf9009000 0x1000>;
+ };
+
sdhc_1: mmc@f9824900 {
compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
@@ -1051,6 +1071,15 @@
};
};
+ bimc: interconnect@fc380000 {
+ reg = <0xfc380000 0x6a000>;
+ compatible = "qcom,msm8974-bimc";
+ #interconnect-cells = <1>;
+ clock-names = "bus", "bus_a";
+ clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
+ <&rpmcc RPM_SMD_BIMC_A_CLK>;
+ };
+
gcc: clock-controller@fc400000 {
compatible = "qcom,gcc-msm8974";
#clock-cells = <1>;
@@ -1067,15 +1096,26 @@
rpm_msg_ram: sram@fc428000 {
compatible = "qcom,rpm-msg-ram";
reg = <0xfc428000 0x4000>;
- };
- bimc: interconnect@fc380000 {
- reg = <0xfc380000 0x6a000>;
- compatible = "qcom,msm8974-bimc";
- #interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xfc428000 0x4000>;
+
+ apss_master_stats: sram@150 {
+ reg = <0x150 0x14>;
+ };
+
+ mpss_master_stats: sram@b50 {
+ reg = <0xb50 0x14>;
+ };
+
+ lpss_master_stats: sram@1550 {
+ reg = <0x1550 0x14>;
+ };
+
+ pronto_master_stats: sram@1f50 {
+ reg = <0x1f50 0x14>;
+ };
};
snoc: interconnect@fc460000 {
@@ -1084,7 +1124,7 @@
#interconnect-cells = <1>;
clock-names = "bus", "bus_a";
clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
+ <&rpmcc RPM_SMD_SNOC_A_CLK>;
};
pnoc: interconnect@fc468000 {
@@ -1093,7 +1133,7 @@
#interconnect-cells = <1>;
clock-names = "bus", "bus_a";
clocks = <&rpmcc RPM_SMD_PNOC_CLK>,
- <&rpmcc RPM_SMD_PNOC_A_CLK>;
+ <&rpmcc RPM_SMD_PNOC_A_CLK>;
};
ocmemnoc: interconnect@fc470000 {
@@ -1102,7 +1142,7 @@
#interconnect-cells = <1>;
clock-names = "bus", "bus_a";
clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
- <&rpmcc RPM_SMD_OCMEMGX_A_CLK>;
+ <&rpmcc RPM_SMD_OCMEMGX_A_CLK>;
};
mmssnoc: interconnect@fc478000 {
@@ -1111,7 +1151,7 @@
#interconnect-cells = <1>;
clock-names = "bus", "bus_a";
clocks = <&mmcc MMSS_S0_AXI_CLK>,
- <&mmcc MMSS_S0_AXI_CLK>;
+ <&mmcc MMSS_S0_AXI_CLK>;
};
cnoc: interconnect@fc480000 {
@@ -1120,7 +1160,7 @@
#interconnect-cells = <1>;
clock-names = "bus", "bus_a";
clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
- <&rpmcc RPM_SMD_CNOC_A_CLK>;
+ <&rpmcc RPM_SMD_CNOC_A_CLK>;
};
tsens: thermal-sensor@fc4a9000 {
@@ -1601,13 +1641,6 @@
bias-pull-up;
drive-strength = <2>;
};
-
- cd-pins {
- pins = "gpio54";
- function = "gpio";
- bias-disable;
- drive-strength = <2>;
- };
};
blsp1_uart2_default: blsp1-uart2-default-state {
@@ -2376,31 +2409,4 @@
<GIC_PPI 1 0xf08>;
clock-frequency = <19200000>;
};
-
- vreg_boost: vreg-boost {
- compatible = "regulator-fixed";
-
- regulator-name = "vreg-boost";
- regulator-min-microvolt = <3150000>;
- regulator-max-microvolt = <3150000>;
-
- regulator-always-on;
- regulator-boot-on;
-
- gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
- enable-active-high;
-
- pinctrl-names = "default";
- pinctrl-0 = <&boost_bypass_n_pin>;
- };
-
- vreg_vph_pwr: vreg-vph-pwr {
- compatible = "regulator-fixed";
- regulator-name = "vph-pwr";
-
- regulator-min-microvolt = <3600000>;
- regulator-max-microvolt = <3600000>;
-
- regulator-always-on;
- };
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-fairphone-fp2.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-fairphone-fp2.dts
index f531d2679f6c..fe227fd3f908 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-fairphone-fp2.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-fairphone-fp2.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-msm8974pro.dtsi"
-#include "qcom-pm8841.dtsi"
-#include "qcom-pm8941.dtsi"
+#include "pm8841.dtsi"
+#include "pm8941.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -57,6 +57,33 @@
enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
vcc-supply = <&pm8941_l18>;
};
+
+ vreg_boost: vreg-boost {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_n_pin>;
+ };
+
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
};
&blsp1_i2c2 {
@@ -381,6 +408,8 @@
qcom,fast-charge-high-threshold-voltage = <4350000>;
qcom,auto-recharge-threshold-voltage = <4240000>;
qcom,minimum-input-voltage = <4450000>;
+
+ status = "okay";
};
&tlmm {
@@ -414,7 +443,7 @@
wcnss_pin_a: wcnss-pin-active-state {
wlan-pins {
- pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
+ pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
function = "wlan";
drive-strength = <6>;
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-oneplus-bacon.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-oneplus-bacon.dts
index 8230d0e1d95d..4c8edadea0ac 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-oneplus-bacon.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-oneplus-bacon.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-msm8974pro.dtsi"
-#include "qcom-pm8841.dtsi"
-#include "qcom-pm8941.dtsi"
+#include "pm8841.dtsi"
+#include "pm8941.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -51,6 +51,33 @@
debounce-interval = <150>;
};
};
+
+ vreg_boost: vreg-boost {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_n_pin>;
+ };
+
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
};
&blsp1_i2c1 {
@@ -433,6 +460,10 @@
status = "okay";
};
+&smbb {
+ status = "okay";
+};
+
&tlmm {
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
pins = "gpio68";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-samsung-klte.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-samsung-klte.dts
index 3e2c86591ee2..b93539e2b87e 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-samsung-klte.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-samsung-klte.dts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-msm8974pro.dtsi"
-#include "qcom-pma8084.dtsi"
+#include "pma8084.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/leds/common.h>
@@ -155,7 +155,15 @@
enable-active-high;
};
- /delete-node/ vreg-boost;
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
};
&blsp1_i2c2 {
@@ -355,7 +363,6 @@
vddr-supply = <&vreg_panel>;
reset-gpios = <&pma8084_gpios 17 GPIO_ACTIVE_LOW>;
- te-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
port {
panel_in: endpoint {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-sony-xperia-shinano-castor.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-sony-xperia-shinano-castor.dts
index 154639d56f35..ee94741a26ed 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-sony-xperia-shinano-castor.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-msm8974pro-sony-xperia-shinano-castor.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "qcom-msm8974pro.dtsi"
-#include "qcom-pm8841.dtsi"
-#include "qcom-pm8941.dtsi"
+#include "pm8841.dtsi"
+#include "pm8941.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -84,6 +84,33 @@
pinctrl-0 = <&lcd_dcdc_en_pin_a>;
};
+ vreg_boost: vreg-boost {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_n_pin>;
+ };
+
+ vreg_vph_pwr: vreg-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph-pwr";
+
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ regulator-always-on;
+ };
+
vreg_wlan: wlan-regulator {
compatible = "regulator-fixed";
@@ -125,15 +152,15 @@
syna,startup-delay-ms = <100>;
- rmi-f01@1 {
+ rmi4-f01@1 {
reg = <0x1>;
- syna,nosleep = <1>;
+ syna,nosleep-mode = <1>;
};
- rmi-f11@11 {
+ rmi4-f11@11 {
reg = <0x11>;
- syna,f11-flip-x = <1>;
syna,sensor-type = <1>;
+ touchscreen-inverted-x;
};
};
};
@@ -297,6 +324,7 @@
&remoteproc_adsp {
cx-supply = <&pm8841_s2>;
+ status = "okay";
};
&remoteproc_mss {
@@ -304,6 +332,7 @@
mss-supply = <&pm8841_s3>;
mx-supply = <&pm8841_s1>;
pll-supply = <&pm8941_l12>;
+ status = "okay";
};
&rpm_requests {
@@ -558,6 +587,8 @@
qcom,fast-charge-low-threshold-voltage = <3400000>;
qcom,auto-recharge-threshold-voltage = <4200000>;
qcom,minimum-input-voltage = <4300000>;
+
+ status = "okay";
};
&tlmm {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-pm8226.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-pm8226.dtsi
index 3b8ad28cecb0..2413778f3715 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-pm8226.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-pm8226.dtsi
@@ -102,27 +102,27 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@7 {
+ channel@7 {
reg = <VADC_VSYS>;
qcom,pre-scaling = <1 3>;
label = "vph_pwr";
};
- adc-chan@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
label = "die_temp";
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
label = "ref_625mv";
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
label = "ref_1250mv";
};
- adc-chan@e {
+ channel@e {
reg = <VADC_GND_REF>;
};
- adc-chan@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-pm8941.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-pm8941.dtsi
index b3e246bacd78..ed0ba591c755 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-pm8941.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-pm8941.dtsi
@@ -50,12 +50,24 @@
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
};
- pwrkey@800 {
- compatible = "qcom,pm8941-pwrkey";
+ pon@800 {
+ compatible = "qcom,pm8941-pon";
reg = <0x800>;
- interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
- debounce = <15625>;
- bias-pull-up;
+
+ pwrkey {
+ compatible = "qcom,pm8941-pwrkey";
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ };
+
+ pm8941_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ status = "disabled";
+ };
};
usb_id: usb-detect@900 {
@@ -133,31 +145,31 @@
#io-channel-cells = <1>;
- adc-chan@6 {
+ channel@6 {
reg = <VADC_VBAT_SNS>;
};
- adc-chan@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
};
- adc-chan@e {
+ channel@e {
reg = <VADC_GND_REF>;
};
- adc-chan@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
};
- adc-chan@30 {
+ channel@30 {
reg = <VADC_LR_MUX1_BAT_THERM>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-pma8084.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-pma8084.dtsi
index 2dd4c6aa71c9..2985f4805b93 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-pma8084.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-pma8084.dtsi
@@ -64,27 +64,27 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
};
- adc-chan@c {
+ channel@c {
reg = <VADC_SPARE1>;
};
- adc-chan@e {
+ channel@e {
reg = <VADC_GND_REF>;
};
- adc-chan@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-pmx55.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-pmx55.dtsi
index e1b869480bbd..da0851173c69 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-pmx55.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-pmx55.dtsi
@@ -40,25 +40,25 @@
#io-channel-cells = <1>;
interrupts = <0x8 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
};
- chg-temp@9 {
+ channel@9 {
reg = <ADC5_CHG_TEMP>;
qcom,pre-scaling = <1 1>;
label = "chg_temp";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-mtp.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-mtp.dts
index 7e97ad5803d8..247069361909 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-mtp.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-mtp.dts
@@ -9,7 +9,7 @@
#include "qcom-sdx55.dtsi"
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <arm64/qcom/pm8150b.dtsi>
-#include "qcom-pmx55.dtsi"
+#include "pmx55.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SDX55 MTP";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-t55.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-t55.dts
index 51058b065279..082f7ed1a01f 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-t55.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-t55.dts
@@ -8,7 +8,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "qcom-sdx55.dtsi"
-#include "qcom-pmx55.dtsi"
+#include "pmx55.dtsi"
/ {
model = "Thundercomm T55 Development Kit";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-telit-fn980-tlb.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-telit-fn980-tlb.dts
index 8fadc6e70692..e336a15b45c4 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-telit-fn980-tlb.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55-telit-fn980-tlb.dts
@@ -8,7 +8,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "qcom-sdx55.dtsi"
-#include "qcom-pmx55.dtsi"
+#include "pmx55.dtsi"
/ {
model = "Telit FN980 TLB";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55.dtsi
index df3cd9c4ffb9..27429d0fedfb 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx55.dtsi
@@ -228,31 +228,26 @@
usb_qmpphy: phy@ff6000 {
compatible = "qcom,sdx55-qmp-usb3-uni-phy";
- reg = <0x00ff6000 0x1c0>;
- status = "disabled";
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x00ff6000 0x1000>;
clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
- <&gcc GCC_USB3_PRIM_CLKREF_CLK>;
- clock-names = "aux", "cfg_ahb", "ref";
-
- resets = <&gcc GCC_USB3PHY_PHY_BCR>,
- <&gcc GCC_USB3_PHY_BCR>;
- reset-names = "phy", "common";
-
- usb_ssphy: phy@ff6200 {
- reg = <0x00ff6200 0x170>,
- <0x00ff6400 0x200>,
- <0x00ff6800 0x800>;
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_uni_phy_pipe_clk_src";
- };
+ <&gcc GCC_USB3_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+
+ resets = <&gcc GCC_USB3_PHY_BCR>,
+ <&gcc GCC_USB3PHY_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
+
+ status = "disabled";
};
mc_virt: interconnect@1100000 {
@@ -345,10 +340,10 @@
"msi8";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
- interrupt-map = <0 0 0 1 &intc 0 0 0 141 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
- <0 0 0 2 &intc 0 0 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
- <0 0 0 3 &intc 0 0 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
- <0 0 0 4 &intc 0 0 0 144 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
+ interrupt-map = <0 0 0 1 &intc 0 141 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
+ <0 0 0 2 &intc 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
+ <0 0 0 3 &intc 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
+ <0 0 0 4 &intc 0 144 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
clocks = <&gcc GCC_PCIE_PIPE_CLK>,
<&gcc GCC_PCIE_AUX_CLK>,
@@ -379,7 +374,7 @@
power-domains = <&gcc PCIE_GDSC>;
- phys = <&pcie_lane>;
+ phys = <&pcie_phy>;
phy-names = "pciephy";
status = "disabled";
@@ -428,7 +423,7 @@
resets = <&gcc GCC_PCIE_BCR>;
reset-names = "core";
power-domains = <&gcc PCIE_GDSC>;
- phys = <&pcie_lane>;
+ phys = <&pcie_phy>;
phy-names = "pciephy";
max-link-speed = <3>;
num-lanes = <2>;
@@ -436,20 +431,27 @@
status = "disabled";
};
- pcie_phy: phy@1c07000 {
+ pcie_phy: phy@1c06000 {
compatible = "qcom,sdx55-qmp-pcie-phy";
- reg = <0x01c07000 0x1c4>;
+ reg = <0x01c06000 0x2000>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
clocks = <&gcc GCC_PCIE_AUX_PHY_CLK_SRC>,
<&gcc GCC_PCIE_CFG_AHB_CLK>,
<&gcc GCC_PCIE_0_CLKREF_CLK>,
- <&gcc GCC_PCIE_RCHNG_PHY_CLK>;
+ <&gcc GCC_PCIE_RCHNG_PHY_CLK>,
+ <&gcc GCC_PCIE_PIPE_CLK>;
clock-names = "aux",
"cfg_ahb",
"ref",
- "refgen";
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_PHY_BCR>;
reset-names = "phy";
@@ -458,20 +460,6 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie_lane: lanes@1c06000 {
- reg = <0x01c06000 0x104>, /* tx0 */
- <0x01c06200 0x328>, /* rx0 */
- <0x01c07200 0x1e8>, /* pcs */
- <0x01c06800 0x104>, /* tx1 */
- <0x01c06a00 0x328>, /* rx1 */
- <0x01c07600 0x800>; /* pcs_misc */
- clocks = <&gcc GCC_PCIE_PIPE_CLK>;
- clock-names = "pipe0";
-
- #phy-cells = <0>;
- clock-output-names = "pcie_pipe_clk";
- };
};
ipa: ipa@1e40000 {
@@ -592,10 +580,10 @@
<&gcc GCC_USB30_MASTER_CLK>;
assigned-clock-rates = <19200000>, <200000000>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 51 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 11 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 10 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -603,14 +591,14 @@
resets = <&gcc GCC_USB30_BCR>;
- usb_dwc3: dwc3@a600000 {
+ usb_dwc3: usb@a600000 {
compatible = "snps,dwc3";
reg = <0x0a600000 0xcd00>;
interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
iommus = <&apps_smmu 0x1a0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_hsphy>, <&usb_ssphy>;
+ phys = <&usb_hsphy>, <&usb_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -619,7 +607,7 @@
compatible = "qcom,sdx55-pdc", "qcom,pdc";
reg = <0x0b210000 0x30000>;
qcom,pdc-ranges = <0 179 52>;
- #interrupt-cells = <3>;
+ #interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupt-controller;
};
@@ -645,7 +633,6 @@
#size-cells = <0>;
interrupt-controller;
#interrupt-cells = <4>;
- cell-index = <0>;
};
tlmm: pinctrl@f100000 {
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65-mtp.dts b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65-mtp.dts
index 02d8d6e241ae..07c10c84eefa 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65-mtp.dts
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65-mtp.dts
@@ -4,11 +4,15 @@
*/
/dts-v1/;
+/* PM7250B is configured to use SID2/3 */
+#define PM7250B_SID 2
+#define PM7250B_SID1 3
+
#include "qcom-sdx65.dtsi"
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <arm64/qcom/pmk8350.dtsi>
-#include <arm64/qcom/pm8150b.dtsi>
-#include "qcom-pmx65.dtsi"
+#include <arm64/qcom/pm7250b.dtsi>
+#include "pmx65.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SDX65 MTP";
diff --git a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65.dtsi b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65.dtsi
index 1a3583029a64..40591a4da6a4 100644
--- a/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65.dtsi
+++ b/sys/contrib/device-tree/src/arm/qcom/qcom-sdx65.dtsi
@@ -204,8 +204,16 @@
gcc: clock-controller@100000 {
compatible = "qcom,gcc-sdx65";
reg = <0x00100000 0x001f7400>;
- clocks = <&rpmhcc RPMH_CXO_CLK>, <&rpmhcc RPMH_CXO_CLK_A>, <&sleep_clk>;
- clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&rpmhcc RPMH_CXO_CLK_A>,
+ <&sleep_clk>,
+ <&pcie_phy>,
+ <0>;
+ clock-names = "bi_tcxo",
+ "bi_tcxo_ao",
+ "sleep_clk",
+ "pcie_pipe_clk",
+ "usb3_phy_wrapper_gcc_usb30_pipe_clk";
#power-domain-cells = <1>;
#clock-cells = <1>;
#reset-cells = <1>;
@@ -233,32 +241,27 @@
usb_qmpphy: phy@ff6000 {
compatible = "qcom,sdx65-qmp-usb3-uni-phy";
- reg = <0x00ff6000 0x1c8>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x00ff6000 0x2000>;
clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_CLKREF_EN>,
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
- <&gcc GCC_USB3_PRIM_CLKREF_EN>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&gcc GCC_USB3_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
- resets = <&gcc GCC_USB3PHY_PHY_BCR>,
- <&gcc GCC_USB3_PHY_BCR>;
- reset-names = "phy", "common";
+ resets = <&gcc GCC_USB3_PHY_BCR>,
+ <&gcc GCC_USB3PHY_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
status = "disabled";
- usb_ssphy: phy@ff6200 {
- reg = <0x00ff6e00 0x160>,
- <0x00ff7000 0x1ec>,
- <0x00ff6200 0x1e00>;
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_uni_phy_pipe_clk_src";
- };
};
system_noc: interconnect@1620000 {
@@ -338,7 +341,7 @@
power-domains = <&gcc PCIE_GDSC>;
phys = <&pcie_phy>;
- phy-names = "pcie-phy";
+ phy-names = "pciephy";
max-link-speed = <3>;
num-lanes = <2>;
@@ -466,9 +469,9 @@
interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "hc_irq", "pwr_irq";
- clocks = <&gcc GCC_SDCC1_APPS_CLK>,
- <&gcc GCC_SDCC1_AHB_CLK>;
- clock-names = "core", "iface";
+ clocks = <&gcc GCC_SDCC1_AHB_CLK>,
+ <&gcc GCC_SDCC1_APPS_CLK>;
+ clock-names = "iface", "core";
status = "disabled";
};
@@ -520,7 +523,7 @@
iommus = <&apps_smmu 0x1a0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_hsphy>, <&usb_ssphy>;
+ phys = <&usb_hsphy>, <&usb_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -530,7 +533,7 @@
reg = <0x0c264000 0x1000>;
};
- spmi_bus: qcom,spmi@c440000 {
+ spmi_bus: spmi@c440000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0xc440000 0xd00>,
<0xc600000 0x2000000>,
@@ -544,7 +547,6 @@
#interrupt-cells = <4>;
#address-cells = <2>;
#size-cells = <0>;
- cell-index = <0>;
qcom,channel = <0>;
qcom,ee = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm/renesas/iwg20d-q7-dbcm-ca.dtsi b/sys/contrib/device-tree/src/arm/renesas/iwg20d-q7-dbcm-ca.dtsi
index e10f99278c77..de52218ceaa4 100644
--- a/sys/contrib/device-tree/src/arm/renesas/iwg20d-q7-dbcm-ca.dtsi
+++ b/sys/contrib/device-tree/src/arm/renesas/iwg20d-q7-dbcm-ca.dtsi
@@ -27,6 +27,15 @@
};
};
};
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
};
&can1 {
@@ -69,6 +78,12 @@
clocks = <&cec_clock>;
clock-names = "cec";
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r7s72100-genmai.dts b/sys/contrib/device-tree/src/arm/renesas/r7s72100-genmai.dts
index 1e8447176b10..29ba098f5dd5 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r7s72100-genmai.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r7s72100-genmai.dts
@@ -29,9 +29,33 @@
reg = <0x08000000 0x08000000>;
};
- lbsc {
+ flash@18000000 {
+ compatible = "mtd-rom";
+ reg = <0x18000000 0x08000000>;
+ bank-width = <4>;
+ device-width = <1>;
+
+ clocks = <&mstp9_clks R7S72100_CLK_SPIBSC0>;
+ power-domains = <&cpg_clocks>;
+
#address-cells = <1>;
#size-cells = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "user";
+ reg = <0x00000000 0x04000000>;
+ };
+
+ partition@4000000 {
+ label = "user1";
+ reg = <0x04000000 0x40000000>;
+ };
+ };
};
leds {
@@ -87,6 +111,62 @@
clock-frequency = <13330000>;
};
+&bsc {
+ flash@0 {
+ compatible = "cfi-flash";
+ reg = <0x00000000 0x04000000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000000 0x00040000>;
+ };
+
+ partition@40000 {
+ label = "uboot-env";
+ reg = <0x00040000 0x00020000>;
+ };
+
+ partition@60000 {
+ label = "flash";
+ reg = <0x00060000 0x03fa0000>;
+ };
+ };
+ };
+
+ flash@4000000 {
+ compatible = "cfi-flash";
+ reg = <0x04000000 0x04000000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot1";
+ reg = <0x00000000 0x00040000>;
+ };
+
+ partition@40000 {
+ label = "uboot-env1";
+ reg = <0x00040000 0x00020000>;
+ };
+
+ partition@60000 {
+ label = "flash1";
+ reg = <0x00060000 0x03fa0000>;
+ };
+ };
+ };
+};
+
&usb_x1_clk {
clock-frequency = <48000000>;
};
diff --git a/sys/contrib/device-tree/src/arm/renesas/r7s72100-gr-peach.dts b/sys/contrib/device-tree/src/arm/renesas/r7s72100-gr-peach.dts
index 105f9c71f9fd..9d29861f23f1 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r7s72100-gr-peach.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r7s72100-gr-peach.dts
@@ -29,14 +29,8 @@
reg = <0x20000000 0x00a00000>;
};
- lbsc {
- #address-cells = <1>;
- #size-cells = <1>;
- };
-
flash@18000000 {
compatible = "mtd-rom";
- probe-type = "map_rom";
reg = <0x18000000 0x00800000>;
bank-width = <4>;
device-width = <1>;
diff --git a/sys/contrib/device-tree/src/arm/renesas/r7s72100-rskrza1.dts b/sys/contrib/device-tree/src/arm/renesas/r7s72100-rskrza1.dts
index 1c5acf694407..b547216d4801 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r7s72100-rskrza1.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r7s72100-rskrza1.dts
@@ -29,6 +29,48 @@
reg = <0x08000000 0x02000000>;
};
+ flash@18000000 {
+ compatible = "mtd-rom";
+ reg = <0x18000000 0x08000000>;
+ clocks = <&mstp9_clks R7S72100_CLK_SPIBSC0>;
+ power-domains = <&cpg_clocks>;
+ bank-width = <4>;
+ device-width = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000000 0x00080000>;
+ };
+
+ partition@80000 {
+ label = "uboot-env";
+ reg = <0x00080000 0x00040000>;
+ };
+
+ partition@c0000 {
+ label = "dt";
+ reg = <0x000c0000 0x00040000>;
+ };
+
+ partition@100000 {
+ label = "kernel";
+ reg = <0x00100000 0x00280000>;
+ };
+
+ partition@400000 {
+ label = "rootfs";
+ reg = <0x00400000 0x01c00000>;
+ };
+ };
+ };
+
keyboard {
compatible = "gpio-keys";
@@ -60,11 +102,6 @@
};
};
- lbsc {
- #address-cells = <1>;
- #size-cells = <1>;
- };
-
leds {
compatible = "gpio-leds";
@@ -118,6 +155,30 @@
};
};
+&bsc {
+ flash@0 {
+ compatible = "cfi-flash";
+ reg = <0x00000000 0x4000000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "apps";
+ reg = <0x00000000 0x01000000>;
+ };
+
+ partition@1000000 {
+ label = "data";
+ reg = <0x01000000 0x03000000>;
+ };
+ };
+ };
+};
+
&usb_x1_clk {
clock-frequency = <48000000>;
};
diff --git a/sys/contrib/device-tree/src/arm/renesas/r7s72100.dtsi b/sys/contrib/device-tree/src/arm/renesas/r7s72100.dtsi
index b07b71307f24..e6d8da6faffb 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r7s72100.dtsi
+++ b/sys/contrib/device-tree/src/arm/renesas/r7s72100.dtsi
@@ -36,6 +36,13 @@
clock-div = <3>;
};
+ bsc: bsc {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0 0x18000000>;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/renesas/r7s9210-rza2mevb.dts b/sys/contrib/device-tree/src/arm/renesas/r7s9210-rza2mevb.dts
index 69a5a44b8a2f..cd2324b8e8ff 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r7s9210-rza2mevb.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r7s9210-rza2mevb.dts
@@ -63,11 +63,6 @@
};
};
- lbsc {
- #address-cells = <1>;
- #size-cells = <1>;
- };
-
leds {
compatible = "gpio-leds";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a73a4-ape6evm.dts b/sys/contrib/device-tree/src/arm/renesas/r8a73a4-ape6evm.dts
index e81a7213d304..ed75c01dbee1 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a73a4-ape6evm.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a73a4-ape6evm.dts
@@ -164,7 +164,7 @@
&bsc {
flash@0 {
- compatible = "cfi-flash", "mtd-rom";
+ compatible = "cfi-flash";
reg = <0x0 0x08000000>;
bank-width = <2>;
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7740-armadillo800eva.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7740-armadillo800eva.dts
index fa09295052c6..e1ac2c161e73 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7740-armadillo800eva.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7740-armadillo800eva.dts
@@ -58,7 +58,7 @@
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_sdhi0>;
- enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&pfc 74 GPIO_ACTIVE_HIGH>;
gpios = <&pfc 17 GPIO_ACTIVE_HIGH>;
states = <3300000 0>, <1800000 1>;
@@ -132,7 +132,7 @@
i2c-gpio,delay-us = <5>;
};
- backlight {
+ backlight: backlight {
compatible = "pwm-backlight";
pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
@@ -143,6 +143,18 @@
enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>;
};
+ panel {
+ compatible = "ampire,am-800480l1tmqw-t00h";
+ backlight = <&backlight>;
+ power-supply = <&reg_5p0v>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&lcdc0_rgb>;
+ };
+ };
+ };
+
sound {
compatible = "simple-audio-card";
@@ -228,10 +240,22 @@
};
};
-&pfc {
+&lcdc0 {
pinctrl-0 = <&lcd0_pins>;
pinctrl-names = "default";
+ status = "okay";
+
+ ports {
+ port@0 {
+ endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
+&pfc {
ether_pins: ether {
groups = "gether_mii", "gether_int";
function = "gether";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7740.dtsi b/sys/contrib/device-tree/src/arm/renesas/r8a7740.dtsi
index 1b2cf5fa322b..55884ec701f8 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7740.dtsi
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7740.dtsi
@@ -398,6 +398,61 @@
status = "disabled";
};
+ lcdc0: lcd-controller@fe940000 {
+ compatible = "renesas,r8a7740-lcdc";
+ reg = <0xfe940000 0x4000>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
+ <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
+ <&vou_clk>;
+ clock-names = "fck", "media", "lclk", "video";
+ power-domains = <&pd_a4lc>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lcdc0_rgb: endpoint {
+ };
+ };
+ };
+ };
+
+ lcdc1: lcd-controller@fe944000 {
+ compatible = "renesas,r8a7740-lcdc";
+ reg = <0xfe944000 0x4000>;
+ interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7740_CLK_LCDC1>,
+ <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk1_clk>,
+ <&vou_clk>;
+ clock-names = "fck", "media", "lclk", "video";
+ power-domains = <&pd_a4lc>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lcdc1_rgb: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ lcdc1_hdmi: endpoint {
+ };
+ };
+ };
+ };
+
tmu0: timer@fff80000 {
compatible = "renesas,tmu-r8a7740", "renesas,tmu";
reg = <0xfff80000 0x2c>;
@@ -474,6 +529,16 @@
#clock-cells = <0>;
clock-frequency = <0>;
};
+ lcdlclk0_clk: lcdlclk0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ };
+ lcdlclk1_clk: lcdlclk1 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ };
/* Special CPG clocks */
cpg_clocks: cpg_clocks@e6150000 {
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm-dbhd-ca.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm-dbhd-ca.dts
index b1f679da36b2..a0b574398055 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm-dbhd-ca.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm-dbhd-ca.dts
@@ -34,6 +34,15 @@
};
};
};
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
};
&du {
@@ -81,6 +90,12 @@
clock-names = "cec";
pd-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm.dts
index c105932f642e..24411044ef6c 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7745-iwg22d-sodimm.dts
@@ -182,7 +182,7 @@
VDDIO-supply = <&reg_3p3v>;
};
- stmpe811@44 {
+ port-expander@44 {
compatible = "st,stmpe811";
reg = <0x44>;
interrupt-parent = <&gpio4>;
@@ -197,7 +197,7 @@
/* internal ADC reference */
st,ref-sel = <0>;
- stmpe_touchscreen {
+ touchscreen {
compatible = "st,stmpe-ts";
/* 8 sample average control */
st,ave-ctrl = <3>;
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7778-bockw.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7778-bockw.dts
index 9b65d246e583..a3f9d74e8877 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7778-bockw.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7778-bockw.dts
@@ -62,6 +62,35 @@
};
&bsc {
+ flash@0 {
+ compatible = "cfi-flash";
+ reg = <0x0 0x04000000>;
+ pinctrl-0 = <&flash_pins>;
+ pinctrl-names = "default";
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000000 0x00040000>;
+ read-only;
+ };
+ partition@40000 {
+ label = "uboot-env";
+ reg = <0x00040000 0x00040000>;
+ read-only;
+ };
+ partition@80000 {
+ label = "flash";
+ reg = <0x00080000 0x03f80000>;
+ };
+ };
+ };
+
ethernet@18300000 {
compatible = "smsc,lan89218", "smsc,lan9115";
reg = <0x18300000 0x1000>;
@@ -126,6 +155,11 @@
pinctrl-0 = <&scif_clk_pins>;
pinctrl-names = "default";
+ flash_pins: flash {
+ groups = "lbsc_cs0";
+ function = "lbsc";
+ };
+
scif0_pins: scif0 {
groups = "scif0_data_a", "scif0_ctrl";
function = "scif0";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7779-marzen.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7779-marzen.dts
index fd40890bd77b..9b13e8d1538b 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7779-marzen.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7779-marzen.dts
@@ -52,25 +52,10 @@
states = <3300000 1>, <1800000 0>;
};
- ethernet@18000000 {
- compatible = "smsc,lan89218", "smsc,lan9115";
- reg = <0x18000000 0x100>;
- pinctrl-0 = <&ethernet_pins>;
- pinctrl-names = "default";
-
- phy-mode = "mii";
- interrupt-parent = <&irqpin0>;
- interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
- smsc,irq-push-pull;
- reg-io-width = <4>;
- vddvario-supply = <&fixedregulator3v3>;
- vdd33a-supply = <&fixedregulator3v3>;
- };
-
- keyboard-irq {
+ keypad-0 {
compatible = "gpio-keys";
- pinctrl-0 = <&keyboard_irq_pins>;
+ pinctrl-0 = <&keypad0_pins>;
pinctrl-names = "default";
interrupt-parent = <&gpio0>;
@@ -91,11 +76,11 @@
};
};
- keyboard-gpio {
+ keypad-1 {
compatible = "gpio-keys-polled";
poll-interval = <50>;
- pinctrl-0 = <&keyboard_gpio_pins>;
+ pinctrl-0 = <&keypad1_pins>;
pinctrl-names = "default";
key-3 {
@@ -208,7 +193,7 @@
};
&gpio0 {
- keyboard-irq-hog {
+ keypad0-hog {
gpio-hog;
gpios = <17 GPIO_ACTIVE_LOW>, <18 GPIO_ACTIVE_LOW>;
input;
@@ -229,6 +214,52 @@
clock-frequency = <31250000>;
};
+&lbsc {
+ flash@0 {
+ compatible = "cfi-flash";
+ reg = <0x0 0x04000000>;
+ pinctrl-0 = <&flash_pins>;
+ pinctrl-names = "default";
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000000 0x00040000>;
+ read-only;
+ };
+ partition@40000 {
+ label = "uboot-env";
+ reg = <0x00040000 0x00040000>;
+ read-only;
+ };
+ partition@80000 {
+ label = "flash";
+ reg = <0x00080000 0x03f80000>;
+ };
+ };
+ };
+
+ ethernet@18000000 {
+ compatible = "smsc,lan89218", "smsc,lan9115";
+ reg = <0x18000000 0x100>;
+ pinctrl-0 = <&ethernet_pins>;
+ pinctrl-names = "default";
+
+ phy-mode = "mii";
+ interrupt-parent = <&irqpin0>;
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+ smsc,irq-push-pull;
+ reg-io-width = <4>;
+ vddvario-supply = <&fixedregulator3v3>;
+ vdd33a-supply = <&fixedregulator3v3>;
+ };
+};
+
&tmu0 {
status = "okay";
};
@@ -264,6 +295,11 @@
};
};
+ flash_pins: flash {
+ groups = "lbsc_cs0";
+ function = "lbsc";
+ };
+
scif2_pins: scif2 {
groups = "scif2_data_c";
function = "scif2";
@@ -284,11 +320,11 @@
function = "hspi0";
};
- keyboard_irq_pins: keyboard-irq {
+ keypad0_pins: keypad-0 {
pins = "GP_0_17", "GP_0_18";
bias-pull-up;
};
- keyboard_gpio_pins: keyboard-gpio {
+ keypad1_pins: keypad-1 {
pins = "GP_0_19", "GP_0_20";
bias-pull-up;
};
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7779.dtsi b/sys/contrib/device-tree/src/arm/renesas/r8a7779.dtsi
index 97b767d81d92..7743af5e2a6f 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7779.dtsi
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7779.dtsi
@@ -699,6 +699,13 @@
};
};
+ lbsc: lbsc {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0 0x1c000000>;
+ };
+
prr: chipid@ff000044 {
compatible = "renesas,prr";
reg = <0xff000044 4>;
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7790-lager.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7790-lager.dts
index 5ad5349a50dc..8590981245a6 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7790-lager.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7790-lager.dts
@@ -73,11 +73,6 @@
reg = <1 0x40000000 0 0xc0000000>;
};
- lbsc {
- #address-cells = <1>;
- #size-cells = <1>;
- };
-
keyboard {
compatible = "gpio-keys";
@@ -127,6 +122,15 @@
};
};
+ fixedregulator1v8: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
fixedregulator3v3: regulator-3v3 {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
@@ -308,7 +312,7 @@
*
* IIC0/I2C0 does not appear to support fallback to GPIO.
*/
- i2cexio0: i2c-10 {
+ i2cexio0: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&iic0>, <&i2c0>;
i2c-bus-name = "i2c-exio0";
@@ -321,7 +325,7 @@
* This is similar to the arangement described for i2cexio0 (above)
* with a fallback to GPIO also provided.
*/
- i2cexio1: i2c-11 {
+ i2cexio1: i2c-mux2 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&iic1>, <&i2c1>, <&gpioi2c1>;
i2c-bus-name = "i2c-exio1";
@@ -333,7 +337,7 @@
* IIC2 and I2C2 may be switched using pinmux.
* A fallback to GPIO is also provided.
*/
- i2chdmi: i2c-12 {
+ i2chdmi: i2c-mux3 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&iic2>, <&i2c2>, <&gpioi2c2>;
i2c-bus-name = "i2c-hdmi";
@@ -366,6 +370,12 @@
clocks = <&cec_clock>;
clock-names = "cec";
+ avdd-supply = <&fixedregulator1v8>;
+ dvdd-supply = <&fixedregulator1v8>;
+ pvdd-supply = <&fixedregulator1v8>;
+ dvdd-3v-supply = <&fixedregulator3v3>;
+ bgvdd-supply = <&fixedregulator1v8>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -422,7 +432,7 @@
* IIC3 and I2C3 may be switched using pinmux.
* IIC3/I2C3 does not appear to support fallback to GPIO.
*/
- i2cpwr: i2c-13 {
+ i2cpwr: i2c-mux4 {
compatible = "i2c-demux-pinctrl";
pinctrl-names = "default";
pinctrl-0 = <&pmic_irq_pins>;
@@ -437,6 +447,7 @@
interrupt-parent = <&irqc0>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
rtc {
compatible = "dlg,da9063-rtc";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7790-stout.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7790-stout.dts
index fe14727eefe1..683f7395fab0 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7790-stout.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7790-stout.dts
@@ -44,6 +44,15 @@
};
};
+ fixedregulator1v8: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
fixedregulator3v3: regulator-3v3 {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
@@ -296,6 +305,12 @@
clocks = <&osc4_clk>;
clock-names = "cec";
+ avdd-supply = <&fixedregulator1v8>;
+ dvdd-supply = <&fixedregulator1v8>;
+ pvdd-supply = <&fixedregulator1v8>;
+ dvdd-3v-supply = <&fixedregulator3v3>;
+ bgvdd-supply = <&fixedregulator1v8>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -332,6 +347,7 @@
interrupt-parent = <&irqc0>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
onkey {
compatible = "dlg,da9063-onkey";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7791-koelsch.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7791-koelsch.dts
index 26a40782cc89..0efd9f98c75a 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7791-koelsch.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7791-koelsch.dts
@@ -73,11 +73,6 @@
reg = <2 0x00000000 0 0x40000000>;
};
- lbsc {
- #address-cells = <1>;
- #size-cells = <1>;
- };
-
keyboard {
compatible = "gpio-keys";
@@ -179,6 +174,24 @@
};
};
+ reg_1p8v: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_3p3v: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
vcc_sdhi0: regulator-vcc-sdhi0 {
compatible = "regulator-fixed";
@@ -345,7 +358,7 @@
* I2C1 is routed to EXIO connector B, pins 64 (SCL) + 66 (SDA).
* A fallback to GPIO is provided.
*/
- i2cexio1: i2c-12 {
+ i2cexio1: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c1>, <&gpioi2c1>;
i2c-bus-name = "i2c-exio1";
@@ -356,7 +369,7 @@
/*
* A fallback to GPIO is provided for I2C2.
*/
- i2chdmi: i2c-13 {
+ i2chdmi: i2c-mux2 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c2>, <&gpioi2c2>;
i2c-bus-name = "i2c-hdmi";
@@ -389,6 +402,12 @@
clocks = <&cec_clock>;
clock-names = "cec";
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -451,7 +470,7 @@
* I2C4 is routed to EXIO connector E, pins 37 (SCL) + 39 (SDA).
* A fallback to GPIO is provided.
*/
- i2cexio4: i2c-14 {
+ i2cexio4: i2c-mux3 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c4>, <&gpioi2c4>;
i2c-bus-name = "i2c-exio4";
@@ -800,6 +819,7 @@
interrupt-parent = <&irqc0>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
rtc {
compatible = "dlg,da9063-rtc";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7791-porter.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7791-porter.dts
index ec0a20d5130d..93c86e921645 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7791-porter.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7791-porter.dts
@@ -47,6 +47,24 @@
reg = <2 0x00000000 0 0x40000000>;
};
+ reg_1p8v: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_3p3v: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
vcc_sdhi0: regulator-vcc-sdhi0 {
compatible = "regulator-fixed";
@@ -148,7 +166,7 @@
/*
* A fallback to GPIO is provided for I2C2.
*/
- i2chdmi: i2c-10 {
+ i2chdmi: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c2>, <&gpioi2c2>;
i2c-bus-name = "i2c-hdmi";
@@ -179,6 +197,12 @@
interrupt-parent = <&gpio3>;
interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -389,6 +413,7 @@
interrupt-parent = <&irqc0>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
watchdog {
compatible = "dlg,da9063-watchdog";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7792-blanche.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7792-blanche.dts
index c66de9dd12df..540a9ad28f28 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7792-blanche.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7792-blanche.dts
@@ -30,6 +30,15 @@
reg = <0 0x40000000 0 0x40000000>;
};
+ d1_8v: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "D1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
d3_3v: regulator-3v3 {
compatible = "regulator-fixed";
regulator-name = "D3.3V";
@@ -39,21 +48,6 @@
regulator-always-on;
};
- ethernet@18000000 {
- compatible = "smsc,lan89218", "smsc,lan9115";
- reg = <0 0x18000000 0 0x100>;
- phy-mode = "mii";
- interrupt-parent = <&irqc>;
- interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
- smsc,irq-push-pull;
- reg-io-width = <4>;
- vddvario-supply = <&d3_3v>;
- vdd33a-supply = <&d3_3v>;
-
- pinctrl-0 = <&lan89218_pins>;
- pinctrl-names = "default";
- };
-
vga-encoder {
compatible = "adi,adv7123";
@@ -196,6 +190,52 @@
clock-frequency = <48000000>;
};
+&lbsc {
+ flash@0 {
+ compatible = "cfi-flash";
+ reg = <0x00000000 0x04000000>;
+ pinctrl-0 = <&flash_pins>;
+ pinctrl-names = "default";
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000000 0x00040000>;
+ read-only;
+ };
+ partition@40000 {
+ label = "uboot-env";
+ reg = <0x00040000 0x00040000>;
+ read-only;
+ };
+ partition@80000 {
+ label = "flash";
+ reg = <0x00080000 0x03f80000>;
+ };
+ };
+ };
+
+ ethernet@18000000 {
+ compatible = "smsc,lan89218", "smsc,lan9115";
+ reg = <0x18000000 0x100>;
+ phy-mode = "mii";
+ interrupt-parent = <&irqc>;
+ interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+ smsc,irq-push-pull;
+ reg-io-width = <4>;
+ vddvario-supply = <&d3_3v>;
+ vdd33a-supply = <&d3_3v>;
+
+ pinctrl-0 = <&lan89218_pins>;
+ pinctrl-names = "default";
+ };
+};
+
&pfc {
scif0_pins: scif0 {
groups = "scif0_data";
@@ -238,8 +278,13 @@
function = "du1";
};
+ flash_pins: flash {
+ groups = "lbsc_cs0";
+ function = "lbsc";
+ };
+
keyboard_pins: keyboard {
- pins = "GP_3_10", "GP_3_11", "GP_3_12", "GP_3_15", "GP_11_02";
+ pins = "GP_3_10", "GP_3_11", "GP_3_12", "GP_3_15", "GP_11_2";
bias-pull-up;
};
@@ -294,6 +339,12 @@
interrupt-parent = <&irqc>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+ avdd-supply = <&d1_8v>;
+ dvdd-supply = <&d1_8v>;
+ pvdd-supply = <&d1_8v>;
+ dvdd-3v-supply = <&d3_3v>;
+ bgvdd-supply = <&d1_8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -330,6 +381,7 @@
interrupt-parent = <&irqc>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
rtc {
compatible = "dlg,da9063-rtc";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7792-wheat.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7792-wheat.dts
index 434e4655be9d..000f21a2a863 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7792-wheat.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7792-wheat.dts
@@ -29,6 +29,15 @@
reg = <0 0x40000000 0 0x40000000>;
};
+ d1_8v: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "D1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
d3_3v: regulator-3v3 {
compatible = "regulator-fixed";
regulator-name = "D3.3V";
@@ -38,22 +47,6 @@
regulator-always-on;
};
- ethernet@18000000 {
- compatible = "smsc,lan89218", "smsc,lan9115";
- reg = <0 0x18000000 0 0x100>;
- phy-mode = "mii";
- interrupt-parent = <&irqc>;
- interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
- smsc,irq-push-pull;
- smsc,save-mac-address;
- reg-io-width = <4>;
- vddvario-supply = <&d3_3v>;
- vdd33a-supply = <&d3_3v>;
-
- pinctrl-0 = <&lan89218_pins>;
- pinctrl-names = "default";
- };
-
keyboard {
compatible = "gpio-keys";
@@ -117,6 +110,24 @@
clock-frequency = <20000000>;
};
+&lbsc {
+ ethernet@18000000 {
+ compatible = "smsc,lan89218", "smsc,lan9115";
+ reg = <0x18000000 0x100>;
+ phy-mode = "mii";
+ interrupt-parent = <&irqc>;
+ interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+ smsc,irq-push-pull;
+ smsc,save-mac-address;
+ reg-io-width = <4>;
+ vddvario-supply = <&d3_3v>;
+ vdd33a-supply = <&d3_3v>;
+
+ pinctrl-0 = <&lan89218_pins>;
+ pinctrl-names = "default";
+ };
+};
+
&pfc {
scif0_pins: scif0 {
groups = "scif0_data";
@@ -252,6 +263,12 @@
reg = <0x3d>, <0x4d>, <0x2d>, <0x5d>;
reg-names = "main", "edid", "cec", "packet";
+ avdd-supply = <&d1_8v>;
+ dvdd-supply = <&d1_8v>;
+ pvdd-supply = <&d1_8v>;
+ dvdd-3v-supply = <&d3_3v>;
+ bgvdd-supply = <&d1_8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -281,6 +298,12 @@
reg = <0x39>, <0x49>, <0x29>, <0x59>;
reg-names = "main", "edid", "cec", "packet";
+ avdd-supply = <&d1_8v>;
+ dvdd-supply = <&d1_8v>;
+ pvdd-supply = <&d1_8v>;
+ dvdd-3v-supply = <&d3_3v>;
+ bgvdd-supply = <&d1_8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7792.dtsi b/sys/contrib/device-tree/src/arm/renesas/r8a7792.dtsi
index a6d9367f8fa0..ecfab3ff59e8 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7792.dtsi
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7792.dtsi
@@ -84,6 +84,13 @@
clock-frequency = <0>;
};
+ lbsc: lbsc {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0 0 0x1c000000>;
+ };
+
pmu {
compatible = "arm,cortex-a15-pmu";
interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7793-gose.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7793-gose.dts
index 79b537b24642..1ea6c757893b 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7793-gose.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7793-gose.dts
@@ -165,6 +165,24 @@
};
};
+ reg_1p8v: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_3p3v: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
vcc_sdhi0: regulator-vcc-sdhi0 {
compatible = "regulator-fixed";
@@ -324,7 +342,7 @@
/*
* A fallback to GPIO is provided for I2C2.
*/
- i2chdmi: i2c-11 {
+ i2chdmi: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c2>, <&gpioi2c2>;
i2c-bus-name = "i2c-hdmi";
@@ -368,6 +386,12 @@
interrupt-parent = <&gpio3>;
interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -430,7 +454,7 @@
* I2C4 is routed to EXIO connector E, pins 37 (SCL) + 39 (SDA).
* A fallback to GPIO is provided.
*/
- i2cexio4: i2c-12 {
+ i2cexio4: i2c-mux2 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c4>, <&gpioi2c4>;
i2c-bus-name = "i2c-exio4";
@@ -735,6 +759,7 @@
interrupt-parent = <&irqc0>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
rtc {
compatible = "dlg,da9063-rtc";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7794-alt.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7794-alt.dts
index 4d93319674c6..b5ecafbb2e4d 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7794-alt.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7794-alt.dts
@@ -90,11 +90,6 @@
states = <3300000 1>, <1800000 0>;
};
- lbsc {
- #address-cells = <1>;
- #size-cells = <1>;
- };
-
keyboard {
compatible = "gpio-keys";
@@ -197,7 +192,7 @@
/*
* A fallback to GPIO is provided for I2C1.
*/
- i2chdmi: i2c-11 {
+ i2chdmi: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c1>, <&gpioi2c1>;
i2c-bus-name = "i2c-hdmi";
@@ -227,7 +222,7 @@
* I2C4 is routed to EXIO connector B, pins 73 (SCL) + 74 (SDA).
* A fallback to GPIO is provided.
*/
- i2cexio4: i2c-14 {
+ i2cexio4: i2c-mux2 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c4>, <&gpioi2c4>;
i2c-bus-name = "i2c-exio4";
@@ -458,6 +453,7 @@
interrupt-parent = <&gpio3>;
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
rtc {
compatible = "dlg,da9063-rtc";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r8a7794-silk.dts b/sys/contrib/device-tree/src/arm/renesas/r8a7794-silk.dts
index b7af1befa126..595e074085eb 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r8a7794-silk.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r8a7794-silk.dts
@@ -102,6 +102,15 @@
};
};
+ d1_8v: regulator-d1-8v {
+ compatible = "regulator-fixed";
+ regulator-name = "D1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
d3_3v: regulator-d3-3v {
compatible = "regulator-fixed";
regulator-name = "D3.3V";
@@ -225,7 +234,7 @@
/*
* A fallback to GPIO is provided for I2C1.
*/
- i2chdmi: i2c-10 {
+ i2chdmi: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&i2c1>, <&gpioi2c1>;
i2c-bus-name = "i2c-hdmi";
@@ -256,6 +265,12 @@
interrupt-parent = <&gpio5>;
interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&d1_8v>;
+ dvdd-supply = <&d1_8v>;
+ pvdd-supply = <&d1_8v>;
+ dvdd-3v-supply = <&d3_3v>;
+ bgvdd-supply = <&d1_8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -424,6 +439,7 @@
interrupt-parent = <&gpio3>;
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
onkey {
compatible = "dlg,da9063-onkey";
diff --git a/sys/contrib/device-tree/src/arm/renesas/r9a06g032-rzn1d400-db.dts b/sys/contrib/device-tree/src/arm/renesas/r9a06g032-rzn1d400-db.dts
index c18bbd7141c4..31cdca3e623c 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r9a06g032-rzn1d400-db.dts
+++ b/sys/contrib/device-tree/src/arm/renesas/r9a06g032-rzn1d400-db.dts
@@ -67,7 +67,7 @@
status = "okay";
};
-&pinctrl{
+&pinctrl {
pins_can0: pins_can0 {
pinmux = <RZN1_PINMUX(162, RZN1_FUNC_CAN)>, /* CAN0_TXD */
<RZN1_PINMUX(163, RZN1_FUNC_CAN)>; /* CAN0_RXD */
diff --git a/sys/contrib/device-tree/src/arm/renesas/r9a06g032.dtsi b/sys/contrib/device-tree/src/arm/renesas/r9a06g032.dtsi
index 0fa565a1c3ad..fa63e1afc4ef 100644
--- a/sys/contrib/device-tree/src/arm/renesas/r9a06g032.dtsi
+++ b/sys/contrib/device-tree/src/arm/renesas/r9a06g032.dtsi
@@ -437,7 +437,7 @@
};
can0: can@52104000 {
- compatible = "renesas,r9a06g032-sja1000","renesas,rzn1-sja1000";
+ compatible = "renesas,r9a06g032-sja1000", "renesas,rzn1-sja1000";
reg = <0x52104000 0x800>;
reg-io-width = <4>;
interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3036-kylin.dts b/sys/contrib/device-tree/src/arm/rockchip/rk3036-kylin.dts
index 67e1e04139e7..e32c73d32f0a 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3036-kylin.dts
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3036-kylin.dts
@@ -8,11 +8,26 @@
model = "Rockchip RK3036 KylinBoard";
compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
+ chosen {
+ stdout-path = "serial2:115200n8";
+ };
+
memory@60000000 {
device_type = "memory";
reg = <0x60000000 0x20000000>;
};
+ hdmi_con: hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
leds: gpio-leds {
compatible = "gpio-leds";
@@ -110,6 +125,12 @@
status = "okay";
};
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
&i2c1 {
clock-frequency = <400000>;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3036.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rk3036.dtsi
index 78686fc72ce6..04af224005f8 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3036.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3036.dtsi
@@ -17,6 +17,9 @@
interrupt-parent = <&gic>;
aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
@@ -282,7 +285,6 @@
clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
<&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
- rockchip,default-sample-phase = <158>;
disable-wp;
dmas = <&pdma 12>;
dma-names = "rx-tx";
@@ -402,12 +404,20 @@
pinctrl-0 = <&hdmi_ctl>;
status = "disabled";
- hdmi_in: port {
+ ports {
#address-cells = <1>;
#size-cells = <0>;
- hdmi_in_vop: endpoint@0 {
+
+ hdmi_in: port@0 {
reg = <0>;
- remote-endpoint = <&vop_out_hdmi>;
+
+ hdmi_in_vop: endpoint {
+ remote-endpoint = <&vop_out_hdmi>;
+ };
+ };
+
+ hdmi_out: port@1 {
+ reg = <1>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3066a.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rk3066a.dtsi
index de9915d946f7..30139f21de64 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3066a.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3066a.dtsi
@@ -13,6 +13,11 @@
/ {
compatible = "rockchip,rk3066a";
+ aliases {
+ gpio4 = &gpio4;
+ gpio6 = &gpio6;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3128-evb.dts b/sys/contrib/device-tree/src/arm/rockchip/rk3128-evb.dts
index c38f42497cbd..c7ab7fcdb436 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3128-evb.dts
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3128-evb.dts
@@ -12,11 +12,6 @@
compatible = "rockchip,rk3128-evb", "rockchip,rk3128";
aliases {
- gpio0 = &gpio0;
- gpio1 = &gpio1;
- gpio2 = &gpio2;
- gpio3 = &gpio3;
- i2c1 = &i2c1;
mmc0 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3128-xpi-3128.dts b/sys/contrib/device-tree/src/arm/rockchip/rk3128-xpi-3128.dts
new file mode 100644
index 000000000000..03a97881519a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3128-xpi-3128.dts
@@ -0,0 +1,425 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include "rk3128.dtsi"
+
+/ {
+ model = "Geniatech XPI-3128";
+ compatible = "geniatech,xpi-3128", "rockchip,rk3128";
+
+ aliases {
+ ethernet0 = &gmac;
+ mmc0 = &emmc;
+ mmc1 = &sdmmc;
+ };
+
+ memory@60000000 {
+ device_type = "memory";
+ reg = <0x60000000 0x40000000>;
+ };
+
+ chosen {
+ stdout-path = &uart1;
+ };
+
+ adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <3300000>;
+
+ button-recovery {
+ label = "Recovery";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <0>;
+ };
+ };
+
+ dc_5v: dc-5v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "DC_5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /*
+ * This is a vbus-supply, which also supplies the GL852G usb hub,
+ * thus has to be always-on
+ */
+ host_pwr_5v: host-pwr-5v-regulator {
+ compatible = "regulator-fixed";
+ gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <1500>;
+ regulator-name = "HOST_PWR_5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_5v>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&host_drv>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ ir-receiver {
+ compatible = "gpio-ir-receiver";
+ gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_int>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-power {
+ gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
+ default-state = "on";
+ pinctrl-names = "default";
+ pinctrl-0 = <&power_led>;
+ };
+
+ led-spd {
+ gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
+ /*
+ * currently not allowed to be set as per
+ * https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/common.yaml
+ * and needs to set in userspace:
+ *
+ * linux,default-trigger = "netdev";
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&spd_led>;
+ };
+ };
+
+ mcu3v3: mcu3v3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "MCU3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_io>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc_ddr: vcc-ddr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_DDR";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ vin-supply = <&vcc_sys>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc_io: vcc-io-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_IO";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_sys>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc_lan: vcc-lan-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_LAN";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_io>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc_sd: vcc-sd-regulator {
+ compatible = "regulator-fixed";
+ gpio = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+ startup-delay-us = <500>;
+ regulator-name = "VCC_SD";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_io>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_pwren>;
+ };
+
+ vcc_sys: vcc-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_SYS";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_5v>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc33_hdmi: vcc33-hdmi-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC33_HDMI";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcca_33>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcca_33: vcca-33-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCCA_33";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_sys>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd_11: vdd-11-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VDD_11";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc_sys>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd11_hdmi: vdd11-hdmi-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VDD11_HDMI";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vdd_11>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd_arm: vdd-arm-regulator {
+ compatible = "pwm-regulator";
+ regulator-name = "VDD_ARM";
+ pwms = <&pwm1 0 25000 1>;
+ pwm-supply = <&vcc_sys>;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /*
+ * As per schematics vdd_log is minimum 900 mV, maximum 1400 mV.
+ * Since there are HW blocks in PD_LOGIC (which are all driven by
+ * this supply), that either do not have a driver at all or the
+ * driver does not implement regulator support we have to make
+ * sure here that the voltage never drops below 1050 mV.
+ */
+ vdd_log: vdd-log-regulator {
+ compatible = "pwm-regulator";
+ regulator-name = "VDD_LOG";
+ pwms = <&pwm2 0 25000 1>;
+ pwm-dutycycle-range = <30 100>;
+ pwm-supply = <&vcc_sys>;
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-ramp-delay = <4000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&emmc {
+ bus-width = <8>;
+ vmmc-supply = <&vcc_io>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
+ cap-mmc-highspeed;
+ mmc-ddr-3_3v;
+ no-sd;
+ no-sdio;
+ status = "okay";
+};
+
+&gmac {
+ clock_in_out = "output";
+ phy-supply = <&vcc_lan>;
+ phy-mode = "rmii";
+ phy-handle = <&phy0>;
+ assigned-clocks = <&cru SCLK_MAC_SRC>;
+ assigned-clock-rates= <50000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rmii_pins>;
+ status = "okay";
+};
+
+&gpio0 {
+ gpio-line-names = /* GPIO0 A0-A7 */
+ "", "", "HEADER_5", "HEADER_3",
+ "", "", "", "",
+ /* GPIO0 B0-B7 */
+ "HEADER_22", "HEADER_23", "", "HEADER_19",
+ "HEADER_26", "HEADER_21", "HEADER_24", "",
+ /* GPIO0 C0-C7 */
+ "", "HEADER_18", "", "",
+ "", "", "", "",
+ /* GPIO0 D0-D7 */
+ "HEADER_36", "", "", "",
+ "", "", "HEADER_13", "";
+};
+
+&gpio1 {
+ gpio-line-names = /* GPIO1 A0-A7 */
+ "HEADER_7", "HEADER_35", "HEADER_33", "HEADER_37",
+ "HEADER_40", "HEADER_38", "", "",
+ /* GPIO1 B0-B7 */
+ "HEADER_11", "", "", "HEADER_29",
+ "HEADER_31", "", "", "",
+ /* GPIO1 C0-C7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO1 D0-D7 */
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&gpio2 {
+ gpio-line-names = /* GPIO2 A0-A7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO2 B0-B7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO2 C0-C7 */
+ "", "", "", "",
+ "HEADER_27", "", "", "",
+ /* GPIO2 D0-D7 */
+ "", "", "HEADER_8", "HEADER_10",
+ "", "", "", "";
+};
+
+&gpio3 {
+ gpio-line-names = /* GPIO3 A0-A7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO3 B0-B7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO3 C0-C7 */
+ "", "HEADER_32", "", "",
+ "", "", "", "HEADER_12",
+ /* GPIO3 D0-D7 */
+ "", "", "", "HEADER_15",
+ "", "", "", "";
+};
+
+&gpu {
+ mali-supply = <&vdd_log>;
+ status = "okay";
+};
+
+&mdio {
+ phy0: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ max-speed = <100>;
+ /* T2.2.4 min. 1 us */
+ reset-assert-us = <10>;
+ /* T2.2.1 + T2.2.2 + T2.2.3 min. 6.05 us */
+ reset-deassert-us = <20>;
+ reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&dp83848c_rst>;
+ };
+};
+
+&pinctrl {
+ dp83848c {
+ dp83848c_rst: dp83848c-rst {
+ rockchip,pins = <2 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ ir-receiver {
+ ir_int: ir-int {
+ rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ power_led: power-led {
+ rockchip,pins = <0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ spd_led: spd-led {
+ rockchip,pins = <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb2 {
+ host_drv: host-drv {
+ rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pwm1 {
+ status = "okay";
+};
+
+&pwm2 {
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_io>;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ vmmc-supply = <&vcc_sd>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det>;
+ disable-wp;
+ cap-sd-highspeed;
+ no-mmc;
+ no-sdio;
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&usb_host_ehci {
+ status = "okay";
+};
+
+&usb_otg {
+ vusb_a-supply = <&vcc_io>;
+ vusb_d-supply = <&vdd_11>;
+ status = "okay";
+};
+
+&usb2phy {
+ status = "okay";
+};
+
+&usb2phy_host {
+ status = "okay";
+};
+
+&usb2phy_otg {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3128.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rk3128.dtsi
index b63bd4ad3143..e2264c40b924 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3128.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3128.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/power/rk3128-power.h>
/ {
compatible = "rockchip,rk3128";
@@ -15,6 +16,20 @@
#address-cells = <1>;
#size-cells = <1>;
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ };
+
arm-pmu {
compatible = "arm,cortex-a7-pmu";
interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
@@ -27,6 +42,7 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
+ enable-method = "rockchip,rk3036-smp";
cpu0: cpu@f00 {
device_type = "cpu";
@@ -34,10 +50,8 @@
reg = <0xf00>;
clock-latency = <40000>;
clocks = <&cru ARMCLK>;
- operating-points = <
- /* KHz uV */
- 816000 1000000
- >;
+ resets = <&cru SRST_CORE0>;
+ operating-points-v2 = <&cpu_opp_table>;
#cooling-cells = <2>; /* min followed by max */
};
@@ -45,18 +59,80 @@
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0xf01>;
+ resets = <&cru SRST_CORE1>;
+ operating-points-v2 = <&cpu_opp_table>;
};
cpu2: cpu@f02 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0xf02>;
+ resets = <&cru SRST_CORE2>;
+ operating-points-v2 = <&cpu_opp_table>;
};
cpu3: cpu@f03 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0xf03>;
+ resets = <&cru SRST_CORE3>;
+ operating-points-v2 = <&cpu_opp_table>;
+ };
+ };
+
+ cpu_opp_table: opp-table-0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-216000000 {
+ opp-hz = /bits/ 64 <216000000>;
+ opp-microvolt = <950000 950000 1325000>;
+ };
+ opp-408000000 {
+ opp-hz = /bits/ 64 <408000000>;
+ opp-microvolt = <950000 950000 1325000>;
+ };
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <950000 950000 1325000>;
+ };
+ opp-696000000 {
+ opp-hz = /bits/ 64 <696000000>;
+ opp-microvolt = <975000 975000 1325000>;
+ };
+ opp-816000000 {
+ opp-hz = /bits/ 64 <816000000>;
+ opp-microvolt = <1075000 1075000 1325000>;
+ opp-suspend;
+ };
+ opp-1008000000 {
+ opp-hz = /bits/ 64 <1008000000>;
+ opp-microvolt = <1200000 1200000 1325000>;
+ };
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1325000 1325000 1325000>;
+ };
+ };
+
+ gpu_opp_table: opp-table-1 {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-microvolt = <975000 975000 1250000>;
+ };
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ opp-microvolt = <1050000 1050000 1250000>;
+ };
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ opp-microvolt = <1150000 1150000 1250000>;
+ };
+ opp-480000000 {
+ opp-hz = /bits/ 64 <480000000>;
+ opp-microvolt = <1250000 1250000 1250000>;
};
};
@@ -64,7 +140,8 @@
compatible = "arm,armv7-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
- <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
arm,cpu-registers-not-fw-configured;
clock-frequency = <24000000>;
};
@@ -76,9 +153,132 @@
#clock-cells = <0>;
};
+ imem: sram@10080000 {
+ compatible = "mmio-sram";
+ reg = <0x10080000 0x2000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x10080000 0x2000>;
+
+ smp-sram@0 {
+ compatible = "rockchip,rk3066-smp-sram";
+ reg = <0x00 0x10>;
+ };
+ };
+
+ gpu: gpu@10090000 {
+ compatible = "rockchip,rk3128-mali", "arm,mali-400";
+ reg = <0x10090000 0x10000>;
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "gp",
+ "gpmmu",
+ "pp0",
+ "ppmmu0",
+ "pp1",
+ "ppmmu1";
+ clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>;
+ clock-names = "bus", "core";
+ operating-points-v2 = <&gpu_opp_table>;
+ resets = <&cru SRST_GPU>;
+ power-domains = <&power RK3128_PD_GPU>;
+ status = "disabled";
+ };
+
pmu: syscon@100a0000 {
compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd";
reg = <0x100a0000 0x1000>;
+
+ power: power-controller {
+ compatible = "rockchip,rk3128-power-controller";
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ power-domain@RK3128_PD_VIO {
+ reg = <RK3128_PD_VIO>;
+ clocks = <&cru ACLK_CIF>,
+ <&cru HCLK_CIF>,
+ <&cru DCLK_EBC>,
+ <&cru HCLK_EBC>,
+ <&cru ACLK_IEP>,
+ <&cru HCLK_IEP>,
+ <&cru ACLK_LCDC0>,
+ <&cru HCLK_LCDC0>,
+ <&cru PCLK_MIPI>,
+ <&cru ACLK_RGA>,
+ <&cru HCLK_RGA>,
+ <&cru ACLK_VIO0>,
+ <&cru ACLK_VIO1>,
+ <&cru HCLK_VIO>,
+ <&cru HCLK_VIO_H2P>,
+ <&cru DCLK_VOP>,
+ <&cru SCLK_VOP>;
+ pm_qos = <&qos_ebc>,
+ <&qos_iep>,
+ <&qos_lcdc>,
+ <&qos_rga>,
+ <&qos_vip>;
+ #power-domain-cells = <0>;
+ };
+
+ power-domain@RK3128_PD_VIDEO {
+ reg = <RK3128_PD_VIDEO>;
+ clocks = <&cru ACLK_VDPU>,
+ <&cru HCLK_VDPU>,
+ <&cru ACLK_VEPU>,
+ <&cru HCLK_VEPU>,
+ <&cru SCLK_HEVC_CORE>;
+ pm_qos = <&qos_vpu>;
+ #power-domain-cells = <0>;
+ };
+
+ power-domain@RK3128_PD_GPU {
+ reg = <RK3128_PD_GPU>;
+ clocks = <&cru ACLK_GPU>;
+ pm_qos = <&qos_gpu>;
+ #power-domain-cells = <0>;
+ };
+ };
+ };
+
+ qos_gpu: qos@1012d000 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012d000 0x20>;
+ };
+
+ qos_vpu: qos@1012e000 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012e000 0x20>;
+ };
+
+ qos_rga: qos@1012f000 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012f000 0x20>;
+ };
+
+ qos_ebc: qos@1012f080 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012f080 0x20>;
+ };
+
+ qos_iep: qos@1012f100 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012f100 0x20>;
+ };
+
+ qos_lcdc: qos@1012f180 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012f180 0x20>;
+ };
+
+ qos_vip: qos@1012f200 {
+ compatible = "rockchip,rk3128-qos", "syscon";
+ reg = <0x1012f200 0x20>;
};
gic: interrupt-controller@10139000 {
@@ -100,6 +300,9 @@
clocks = <&cru HCLK_OTG>;
clock-names = "otg";
dr_mode = "otg";
+ g-np-tx-fifo-size = <16>;
+ g-rx-fifo-size = <280>;
+ g-tx-fifo-size = <256 128 128 64 32 16>;
phys = <&usb2phy_otg>;
phy-names = "usb2-phy";
status = "disabled";
@@ -109,6 +312,7 @@
compatible = "generic-ehci";
reg = <0x101c0000 0x20000>;
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru HCLK_HOST2>;
phys = <&usb2phy_host>;
phy-names = "usb";
status = "disabled";
@@ -118,6 +322,7 @@
compatible = "generic-ohci";
reg = <0x101e0000 0x20000>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru HCLK_HOST2>;
phys = <&usb2phy_host>;
phy-names = "usb";
status = "disabled";
@@ -207,6 +412,8 @@
clocks = <&cru SCLK_OTGPHY0>;
clock-names = "phyclk";
clock-output-names = "usb480m_phy";
+ assigned-clocks = <&cru SCLK_USB480M>;
+ assigned-clock-parents = <&usb2phy>;
#clock-cells = <0>;
status = "disabled";
@@ -233,7 +440,7 @@
compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer";
reg = <0x20044000 0x20>;
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_TIMER>, <&xin24m>;
+ clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER0>;
clock-names = "pclk", "timer";
};
@@ -241,7 +448,7 @@
compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer";
reg = <0x20044020 0x20>;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_TIMER>, <&xin24m>;
+ clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER1>;
clock-names = "pclk", "timer";
};
@@ -249,7 +456,7 @@
compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer";
reg = <0x20044040 0x20>;
interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_TIMER>, <&xin24m>;
+ clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER2>;
clock-names = "pclk", "timer";
};
@@ -257,7 +464,7 @@
compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer";
reg = <0x20044060 0x20>;
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_TIMER>, <&xin24m>;
+ clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER3>;
clock-names = "pclk", "timer";
};
@@ -265,7 +472,7 @@
compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer";
reg = <0x20044080 0x20>;
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_TIMER>, <&xin24m>;
+ clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER4>;
clock-names = "pclk", "timer";
};
@@ -273,7 +480,7 @@
compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer";
reg = <0x200440a0 0x20>;
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_TIMER>, <&xin24m>;
+ clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER5>;
clock-names = "pclk", "timer";
};
@@ -426,7 +633,7 @@
i2c0: i2c@20072000 {
compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c";
- reg = <20072000 0x1000>;
+ reg = <0x20072000 0x1000>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "i2c";
clocks = <&cru PCLK_I2C0>;
@@ -458,11 +665,40 @@
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
arm,pl330-broken-no-flushp;
+ arm,pl330-periph-burst;
clocks = <&cru ACLK_DMAC>;
clock-names = "apb_pclk";
#dma-cells = <1>;
};
+ gmac: ethernet@2008c000 {
+ compatible = "rockchip,rk3128-gmac";
+ reg = <0x2008c000 0x4000>;
+ interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq", "eth_wake_irq";
+ clocks = <&cru SCLK_MAC>,
+ <&cru SCLK_MAC_RX>, <&cru SCLK_MAC_TX>,
+ <&cru SCLK_MAC_REF>, <&cru SCLK_MAC_REFOUT>,
+ <&cru ACLK_GMAC>, <&cru PCLK_GMAC>;
+ clock-names = "stmmaceth",
+ "mac_clk_rx", "mac_clk_tx",
+ "clk_mac_ref", "clk_mac_refout",
+ "aclk_mac", "pclk_mac";
+ resets = <&cru SRST_GMAC>;
+ reset-names = "stmmaceth";
+ rockchip,grf = <&grf>;
+ rx-fifo-depth = <4096>;
+ tx-fifo-depth = <2048>;
+ status = "disabled";
+
+ mdio: mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ };
+ };
+
pinctrl: pinctrl {
compatible = "rockchip,rk3128-pinctrl";
rockchip,grf = <&grf>;
@@ -788,12 +1024,16 @@
rockchip,pins = <1 RK_PB7 1 &pcfg_pull_default>;
};
+ sdmmc_det: sdmmc-det {
+ rockchip,pins = <1 RK_PC1 1 &pcfg_pull_default>;
+ };
+
sdmmc_wp: sdmmc-wp {
rockchip,pins = <1 RK_PA7 1 &pcfg_pull_default>;
};
sdmmc_pwren: sdmmc-pwren {
- rockchip,pins = <1 RK_PB6 1 &pcfg_pull_default>;
+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_default>;
};
sdmmc_bus4: sdmmc-bus4 {
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk322x.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rk322x.dtsi
index ffc16d6b97e1..831561fc1814 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk322x.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk322x.dtsi
@@ -15,6 +15,10 @@
interrupt-parent = <&gic>;
aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
@@ -215,9 +219,9 @@
power-domain@RK3228_PD_VOP {
reg = <RK3228_PD_VOP>;
- clocks =<&cru ACLK_VOP>,
- <&cru DCLK_VOP>,
- <&cru HCLK_VOP>;
+ clocks = <&cru ACLK_VOP>,
+ <&cru DCLK_VOP>,
+ <&cru HCLK_VOP>;
pm_qos = <&qos_vop>;
#power-domain-cells = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3288.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rk3288.dtsi
index cb9cdaddffd4..ead343dc3df1 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3288.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3288.dtsi
@@ -19,6 +19,15 @@
aliases {
ethernet0 = &gmac;
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ gpio4 = &gpio4;
+ gpio5 = &gpio5;
+ gpio6 = &gpio6;
+ gpio7 = &gpio7;
+ gpio8 = &gpio8;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rk3xxx.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rk3xxx.dtsi
index cb4e42ede56a..f37137f298d5 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rk3xxx.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rk3xxx.dtsi
@@ -16,6 +16,10 @@
aliases {
ethernet0 = &emac;
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1108.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rv1108.dtsi
index abf3006f0a84..f3291f3bbc6f 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rv1108.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1108.dtsi
@@ -196,7 +196,6 @@
pwm4: pwm@10280000 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x10280000 0x10>;
- interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -208,7 +207,6 @@
pwm5: pwm@10280010 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x10280010 0x10>;
- interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -220,7 +218,6 @@
pwm6: pwm@10280020 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x10280020 0x10>;
- interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -232,7 +229,6 @@
pwm7: pwm@10280030 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x10280030 0x10>;
- interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -386,7 +382,6 @@
pwm0: pwm@20040000 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x20040000 0x10>;
- interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM0_PMU>, <&cru PCLK_PWM0_PMU>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -398,7 +393,6 @@
pwm1: pwm@20040010 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x20040010 0x10>;
- interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM0_PMU>, <&cru PCLK_PWM0_PMU>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -410,7 +404,6 @@
pwm2: pwm@20040020 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x20040020 0x10>;
- interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM0_PMU>, <&cru PCLK_PWM0_PMU>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -422,7 +415,6 @@
pwm3: pwm@20040030 {
compatible = "rockchip,rv1108-pwm", "rockchip,rk3288-pwm";
reg = <0x20040030 0x10>;
- interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM0_PMU>, <&cru PCLK_PWM0_PMU>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1109-sonoff-ihost.dts b/sys/contrib/device-tree/src/arm/rockchip/rv1109-sonoff-ihost.dts
new file mode 100644
index 000000000000..45dced8087a3
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1109-sonoff-ihost.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+#include "rv1109.dtsi"
+#include "rv1126-sonoff-ihost.dtsi"
+
+/ {
+ model = "Sonoff iHost 2G";
+ compatible = "itead,sonoff-ihost", "rockchip,rv1109";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_arm>;
+};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1109.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rv1109.dtsi
new file mode 100644
index 000000000000..9cbaa08ab1b8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1109.dtsi
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+
+#include "rv1126.dtsi"
+
+/ {
+ compatible = "rockchip,rv1109";
+
+ cpus {
+ /delete-node/ cpu@f02;
+ /delete-node/ cpu@f03;
+ };
+
+ arm-pmu {
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-affinity = <&cpu0>, <&cpu1>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2-io.dts b/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2-io.dts
index 3340fc3f0739..0c2396b8f8db 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2-io.dts
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2-io.dts
@@ -20,6 +20,35 @@
chosen {
stdout-path = "serial2:1500000n8";
};
+
+ vcc12v_dcin: vcc12v-dcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ v3v3_sys: v3v3-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "v3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
};
&gmac {
@@ -32,7 +61,7 @@
phy-mode = "rgmii";
phy-supply = <&vcc_3v3>;
pinctrl-names = "default";
- pinctrl-0 = <&rgmiim1_pins &clk_out_ethernetm1_pins>;
+ pinctrl-0 = <&rgmiim1_miim &rgmiim1_bus2 &rgmiim1_bus4 &clk_out_ethernetm1_pins>;
tx_delay = <0x2a>;
rx_delay = <0x1a>;
status = "okay";
@@ -59,6 +88,10 @@
};
};
+&pwm11 {
+ status = "okay";
+};
+
&sdmmc {
bus-width = <4>;
cap-mmc-highspeed;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2.dtsi
index cc64ba4be344..7ea8d7d16f5f 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1126-edgeble-neu2.dtsi
@@ -11,15 +11,6 @@
mmc0 = &emmc;
};
- vcc5v0_sys: vcc5v0-sys-regulator {
- compatible = "regulator-fixed";
- regulator-name = "vcc5v0_sys";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- };
-
vccio_flash: vccio-flash-regulator {
compatible = "regulator-fixed";
enable-active-high;
@@ -52,7 +43,7 @@
bus-width = <8>;
non-removable;
pinctrl-names = "default";
- pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk &emmc_rstnout>;
+ pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk>;
rockchip,default-sample-phase = <90>;
vmmc-supply = <&vcc_3v3>;
vqmmc-supply = <&vccio_flash>;
@@ -301,6 +292,22 @@
status = "okay";
};
+&sfc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fspi_pins>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
&sdio {
bus-width = <4>;
cap-sd-highspeed;
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1126-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rv1126-pinctrl.dtsi
index b77021772781..06b1d7f2d858 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rv1126-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1126-pinctrl.dtsi
@@ -59,6 +59,24 @@
<0 RK_PD5 2 &pcfg_pull_up_drv_level_2>;
};
};
+ fspi {
+ /omit-if-no-ref/
+ fspi_pins: fspi-pins {
+ rockchip,pins =
+ /* fspi_clk */
+ <1 RK_PA3 3 &pcfg_pull_down>,
+ /* fspi_cs0n */
+ <0 RK_PD4 3 &pcfg_pull_up>,
+ /* fspi_d0 */
+ <1 RK_PA0 3 &pcfg_pull_up>,
+ /* fspi_d1 */
+ <1 RK_PA1 3 &pcfg_pull_up>,
+ /* fspi_d2 */
+ <0 RK_PD6 3 &pcfg_pull_up>,
+ /* fspi_d3 */
+ <1 RK_PA2 3 &pcfg_pull_up>;
+ };
+ };
i2c0 {
/omit-if-no-ref/
i2c0_xfer: i2c0-xfer {
@@ -69,38 +87,84 @@
<0 RK_PB5 1 &pcfg_pull_none_drv_level_0_smt>;
};
};
+ i2c2 {
+ /omit-if-no-ref/
+ i2c2_xfer: i2c2-xfer {
+ rockchip,pins =
+ /* i2c2_scl */
+ <0 RK_PC2 1 &pcfg_pull_none_drv_level_0_smt>,
+ /* i2c2_sda */
+ <0 RK_PC3 1 &pcfg_pull_none_drv_level_0_smt>;
+ };
+ };
+ pwm2 {
+ /omit-if-no-ref/
+ pwm2m0_pins: pwm2m0-pins {
+ rockchip,pins =
+ /* pwm2_pin_m0 */
+ <0 RK_PC0 3 &pcfg_pull_none>;
+ };
+ };
+ pwm11 {
+ /omit-if-no-ref/
+ pwm11m0_pins: pwm11m0-pins {
+ rockchip,pins =
+ /* pwm11_pin_m0 */
+ <3 RK_PA7 6 &pcfg_pull_none>;
+ };
+ };
rgmii {
/omit-if-no-ref/
- rgmiim1_pins: rgmiim1-pins {
+ rgmiim1_miim: rgmiim1-miim {
rockchip,pins =
/* rgmii_mdc_m1 */
<2 RK_PC2 2 &pcfg_pull_none>,
/* rgmii_mdio_m1 */
- <2 RK_PC1 2 &pcfg_pull_none>,
- /* rgmii_rxclk_m1 */
- <2 RK_PD3 2 &pcfg_pull_none>,
+ <2 RK_PC1 2 &pcfg_pull_none>;
+ };
+ /omit-if-no-ref/
+ rgmiim1_rxer: rgmiim1-rxer {
+ rockchip,pins =
+ /* rgmii_rxer_m1 */
+ <2 RK_PC0 2 &pcfg_pull_none>;
+ };
+ /omit-if-no-ref/
+ rgmiim1_bus2: rgmiim1-bus2 {
+ rockchip,pins =
/* rgmii_rxd0_m1 */
<2 RK_PB5 2 &pcfg_pull_none>,
/* rgmii_rxd1_m1 */
<2 RK_PB6 2 &pcfg_pull_none>,
- /* rgmii_rxd2_m1 */
- <2 RK_PC7 2 &pcfg_pull_none>,
- /* rgmii_rxd3_m1 */
- <2 RK_PD0 2 &pcfg_pull_none>,
/* rgmii_rxdv_m1 */
<2 RK_PB4 2 &pcfg_pull_none>,
- /* rgmii_txclk_m1 */
- <2 RK_PD2 2 &pcfg_pull_none_drv_level_3>,
/* rgmii_txd0_m1 */
<2 RK_PC3 2 &pcfg_pull_none_drv_level_3>,
/* rgmii_txd1_m1 */
<2 RK_PC4 2 &pcfg_pull_none_drv_level_3>,
+ /* rgmii_txen_m1 */
+ <2 RK_PC6 2 &pcfg_pull_none_drv_level_3>;
+ };
+ /omit-if-no-ref/
+ rgmiim1_bus4: rgmiim1-bus4 {
+ rockchip,pins =
+ /* rgmii_rxclk_m1 */
+ <2 RK_PD3 2 &pcfg_pull_none>,
+ /* rgmii_rxd2_m1 */
+ <2 RK_PC7 2 &pcfg_pull_none>,
+ /* rgmii_rxd3_m1 */
+ <2 RK_PD0 2 &pcfg_pull_none>,
+ /* rgmii_txclk_m1 */
+ <2 RK_PD2 2 &pcfg_pull_none_drv_level_3>,
/* rgmii_txd2_m1 */
<2 RK_PD1 2 &pcfg_pull_none_drv_level_3>,
/* rgmii_txd3_m1 */
- <2 RK_PA4 2 &pcfg_pull_none_drv_level_3>,
- /* rgmii_txen_m1 */
- <2 RK_PC6 2 &pcfg_pull_none_drv_level_3>;
+ <2 RK_PA4 2 &pcfg_pull_none_drv_level_3>;
+ };
+ /omit-if-no-ref/
+ rgmiim1_mclkinout: rgmiim1-mclkinout {
+ rockchip,pins =
+ /* rgmii_clk_m1 */
+ <2 RK_PB7 2 &pcfg_pull_none>;
};
};
sdmmc0 {
@@ -229,6 +293,14 @@
/* uart3_tx_m0 */
<3 RK_PC6 4 &pcfg_pull_up>;
};
+ /omit-if-no-ref/
+ uart3m2_xfer: uart3m2-xfer {
+ rockchip,pins =
+ /* uart3_rx_m2 */
+ <3 RK_PA1 4 &pcfg_pull_up>,
+ /* uart3_tx_m2 */
+ <3 RK_PA0 4 &pcfg_pull_up>;
+ };
};
uart4 {
/omit-if-no-ref/
@@ -239,6 +311,14 @@
/* uart4_tx_m0 */
<3 RK_PA4 4 &pcfg_pull_up>;
};
+ /omit-if-no-ref/
+ uart4m2_xfer: uart4m2-xfer {
+ rockchip,pins =
+ /* uart4_rx_m2 */
+ <1 RK_PD4 3 &pcfg_pull_up>,
+ /* uart4_tx_m2 */
+ <1 RK_PD5 3 &pcfg_pull_up>;
+ };
};
uart5 {
/omit-if-no-ref/
@@ -249,5 +329,13 @@
/* uart5_tx_m0 */
<3 RK_PA6 4 &pcfg_pull_up>;
};
+ /omit-if-no-ref/
+ uart5m2_xfer: uart5m2-xfer {
+ rockchip,pins =
+ /* uart5_rx_m2 */
+ <2 RK_PA1 3 &pcfg_pull_up>,
+ /* uart5_tx_m2 */
+ <2 RK_PA0 3 &pcfg_pull_up>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dts b/sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dts
new file mode 100644
index 000000000000..77386a48d81e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+#include "rv1126.dtsi"
+#include "rv1126-sonoff-ihost.dtsi"
+
+/ {
+ model = "Sonoff iHost 4G";
+ compatible = "itead,sonoff-ihost", "rockchip,rv1126";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_arm>;
+};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dtsi
new file mode 100644
index 000000000000..32b329e87a0c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1126-sonoff-ihost.dtsi
@@ -0,0 +1,404 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
+ * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
+ */
+
+/ {
+ aliases {
+ ethernet0 = &gmac;
+ mmc0 = &emmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ vcc5v0_sys: regulator-vcc5v0-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ sdio_pwrseq: pwrseq-sdio {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rk809 1>;
+ clock-names = "ext_clock";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable_h>;
+ reset-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&emmc {
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk &emmc_rstnout>;
+ rockchip,default-sample-phase = <90>;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ rk809: pmic@20 {
+ compatible = "rockchip,rk809";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB1 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <1>;
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int_l>;
+ rockchip,system-power-controller;
+ wakeup-source;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc_buck5>;
+ vcc6-supply = <&vcc_buck5>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc3v3_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+
+ regulators {
+ vdd_npu_vepu: DCDC_REG1 {
+ regulator-name = "vdd_npu_vepu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <650000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <6001>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_arm: DCDC_REG2 {
+ regulator-name = "vdd_arm";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <725000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-name = "vcc_ddr";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc3v3_sys: DCDC_REG4 {
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_buck5: DCDC_REG5 {
+ regulator-name = "vcc_buck5";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2200000>;
+ regulator-max-microvolt = <2200000>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2200000>;
+ };
+ };
+
+ vcc_0v8: LDO_REG1 {
+ regulator-name = "vcc_0v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc1v8_pmu: LDO_REG2 {
+ regulator-name = "vcc1v8_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd0v8_pmu: LDO_REG3 {
+ regulator-name = "vcc0v8_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <800000>;
+ };
+ };
+
+ vcc_1v8: LDO_REG4 {
+ regulator-name = "vcc_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcc_dovdd: LDO_REG5 {
+ regulator-name = "vcc_dovdd";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_dvdd: LDO_REG6 {
+ regulator-name = "vcc_dvdd";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_avdd: LDO_REG7 {
+ regulator-name = "vcc_avdd";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG8 {
+ regulator-name = "vccio_sd";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_sd: LDO_REG9 {
+ regulator-name = "vcc3v3_sd";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_5v0: SWITCH_REG1 {
+ regulator-name = "vcc_5v0";
+ };
+
+ vcc_3v3: SWITCH_REG2 {
+ regulator-name = "vcc_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ pcf8563: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
+ clock-output-names = "xin32k";
+ };
+};
+
+&gmac {
+ assigned-clocks = <&cru CLK_GMAC_SRC_M1>, <&cru CLK_GMAC_SRC>,
+ <&cru CLK_GMAC_TX_RX>;
+ assigned-clock-parents = <&cru CLK_GMAC_RGMII_M1>, <&cru CLK_GMAC_SRC_M1>,
+ <&cru RMII_MODE_CLK>;
+ assigned-clock-rates = <0>, <50000000>;
+ clock_in_out = "output";
+ phy-handle = <&phy>;
+ phy-mode = "rmii";
+ phy-supply = <&vcc_3v3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmiim1_miim &rgmiim1_rxer &rgmiim1_bus2 &rgmiim1_mclkinout>;
+ status = "okay";
+};
+
+&mdio {
+ phy: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&eth_phy_rst>;
+ reset-active-low;
+ reset-assert-us = <50000>;
+ reset-deassert-us = <10000>;
+ reset-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pinctrl {
+ ethernet {
+ eth_phy_rst: eth-phy-rst {
+ rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+ bt {
+ bt_enable: bt-enable {
+ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake_dev: bt-wake-dev {
+ rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake_host: bt-wake-host {
+ rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ wifi {
+ wifi_enable_h: wifi-enable-h {
+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ pmuio0-supply = <&vcc1v8_pmu>;
+ pmuio1-supply = <&vcc3v3_sys>;
+ vccio1-supply = <&vcc_1v8>;
+ vccio2-supply = <&vccio_sd>;
+ vccio3-supply = <&vcc_1v8>;
+ vccio4-supply = <&vcc_dovdd>;
+ vccio5-supply = <&vcc_1v8>;
+ vccio6-supply = <&vcc_1v8>;
+ vccio7-supply = <&vcc_dovdd>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdio {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ keep-power-in-suspend;
+ max-frequency = <100000000>;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc1_clk &sdmmc1_cmd &sdmmc1_bus4>;
+ rockchip,default-sample-phase = <90>;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc3v3_sys>;
+ vqmmc-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ card-detect-delay = <200>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_bus4 &sdmmc0_det>;
+ rockchip,default-sample-phase = <90>;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr104;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_xfer &uart0_ctsn &uart0_rtsn>;
+ uart-has-rtscts;
+ status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8723ds-bt";
+ device-wake-gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>; /* BT_WAKE */
+ enable-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; /* BT_RST */
+ host-wake-gpios = <&gpio1 RK_PC5 GPIO_ACTIVE_HIGH>; /* BT_WAKE_HOST */
+ max-speed = <2000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_enable>, <&bt_wake_dev>, <&bt_wake_host>;
+ };
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3m2_xfer>;
+ status = "okay";
+};
+
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4m2_xfer>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/rockchip/rv1126.dtsi b/sys/contrib/device-tree/src/arm/rockchip/rv1126.dtsi
index 1f07d0a4fa73..bb603cae13df 100644
--- a/sys/contrib/device-tree/src/arm/rockchip/rv1126.dtsi
+++ b/sys/contrib/device-tree/src/arm/rockchip/rv1126.dtsi
@@ -21,6 +21,13 @@
aliases {
i2c0 = &i2c0;
+ i2c2 = &i2c2;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ serial4 = &uart4;
+ serial5 = &uart5;
};
cpus {
@@ -83,6 +90,11 @@
clock-frequency = <24000000>;
};
+ display_subsystem {
+ compatible = "rockchip,display-subsystem";
+ ports = <&vop_out>;
+ };
+
xin24m: oscillator {
compatible = "fixed-clock";
clock-frequency = <24000000>;
@@ -125,6 +137,26 @@
reg = <0xfe86c000 0x20>;
};
+ qos_iep: qos@fe8a0000 {
+ compatible = "rockchip,rv1126-qos", "syscon";
+ reg = <0xfe8a0000 0x20>;
+ };
+
+ qos_rga_rd: qos@fe8a0080 {
+ compatible = "rockchip,rv1126-qos", "syscon";
+ reg = <0xfe8a0080 0x20>;
+ };
+
+ qos_rga_wr: qos@fe8a0100 {
+ compatible = "rockchip,rv1126-qos", "syscon";
+ reg = <0xfe8a0100 0x20>;
+ };
+
+ qos_vop: qos@fe8a0180 {
+ compatible = "rockchip,rv1126-qos", "syscon";
+ reg = <0xfe8a0180 0x20>;
+ };
+
gic: interrupt-controller@feff0000 {
compatible = "arm,gic-400";
interrupt-controller;
@@ -170,6 +202,25 @@
pm_qos = <&qos_sdio>;
#power-domain-cells = <0>;
};
+
+ power-domain@RV1126_PD_VO {
+ reg = <RV1126_PD_VO>;
+ clocks = <&cru ACLK_RGA>,
+ <&cru HCLK_RGA>,
+ <&cru CLK_RGA_CORE>,
+ <&cru ACLK_VOP>,
+ <&cru HCLK_VOP>,
+ <&cru DCLK_VOP>,
+ <&cru PCLK_DSIHOST>,
+ <&cru ACLK_IEP>,
+ <&cru HCLK_IEP>,
+ <&cru CLK_IEP_CORE>;
+ pm_qos = <&qos_rga_rd>,
+ <&qos_rga_wr>,
+ <&qos_vop>,
+ <&qos_iep>;
+ #power-domain-cells = <0>;
+ };
};
};
@@ -187,6 +238,20 @@
status = "disabled";
};
+ i2c2: i2c@ff400000 {
+ compatible = "rockchip,rv1126-i2c", "rockchip,rk3399-i2c";
+ reg = <0xff400000 0x1000>;
+ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+ rockchip,grf = <&pmugrf>;
+ clocks = <&pmucru CLK_I2C2>, <&pmucru PCLK_I2C2>;
+ clock-names = "i2c", "pclk";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_xfer>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
uart1: serial@ff410000 {
compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
reg = <0xff410000 0x100>;
@@ -203,6 +268,17 @@
status = "disabled";
};
+ pwm2: pwm@ff430020 {
+ compatible = "rockchip,rv1126-pwm", "rockchip,rk3328-pwm";
+ reg = <0xff430020 0x10>;
+ clock-names = "pwm", "pclk";
+ clocks = <&pmucru CLK_PWM0>, <&pmucru PCLK_PWM0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm2m0_pins>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
pmucru: clock-controller@ff480000 {
compatible = "rockchip,rv1126-pmucru";
reg = <0xff480000 0x1000>;
@@ -232,6 +308,17 @@
clock-names = "apb_pclk";
};
+ pwm11: pwm@ff550030 {
+ compatible = "rockchip,rv1126-pwm", "rockchip,rk3328-pwm";
+ reg = <0xff550030 0x10>;
+ clock-names = "pwm", "pclk";
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
+ pinctrl-0 = <&pwm11m0_pins>;
+ pinctrl-names = "default";
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
uart0: serial@ff560000 {
compatible = "rockchip,rv1126-uart", "snps,dw-apb-uart";
reg = <0xff560000 0x100>;
@@ -332,6 +419,43 @@
clock-names = "pclk", "timer";
};
+ vop: vop@ffb00000 {
+ compatible = "rockchip,rv1126-vop";
+ reg = <0xffb00000 0x200>, <0xffb00a00 0x400>;
+ interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+ clocks = <&cru ACLK_VOP>, <&cru DCLK_VOP>, <&cru HCLK_VOP>;
+ reset-names = "axi", "ahb", "dclk";
+ resets = <&cru SRST_VOP_A>, <&cru SRST_VOP_H>, <&cru SRST_VOP_D>;
+ iommus = <&vop_mmu>;
+ power-domains = <&power RV1126_PD_VO>;
+ status = "disabled";
+
+ vop_out: port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vop_out_rgb: endpoint@0 {
+ reg = <0>;
+ };
+
+ vop_out_dsi: endpoint@1 {
+ reg = <1>;
+ };
+ };
+ };
+
+ vop_mmu: iommu@ffb00f00 {
+ compatible = "rockchip,iommu";
+ reg = <0xffb00f00 0x100>;
+ interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "aclk", "iface";
+ clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
+ #iommu-cells = <0>;
+ power-domains = <&power RV1126_PD_VO>;
+ status = "disabled";
+ };
+
gmac: ethernet@ffc40000 {
compatible = "rockchip,rv1126-gmac", "snps,dwmac-4.20a";
reg = <0xffc40000 0x4000>;
@@ -419,6 +543,18 @@
status = "disabled";
};
+ sfc: spi@ffc90000 {
+ compatible = "rockchip,sfc";
+ reg = <0xffc90000 0x4000>;
+ interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+ assigned-clocks = <&cru SCLK_SFC>;
+ assigned-clock-rates = <80000000>;
+ clock-names = "clk_sfc", "hclk_sfc";
+ clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
+ power-domains = <&power RV1126_PD_NVM>;
+ status = "disabled";
+ };
+
pinctrl: pinctrl {
compatible = "rockchip,rv1126-pinctrl";
rockchip,grf = <&grf>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos4.dtsi
index f775b9377a38..7f981b5c0d64 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4.dtsi
@@ -203,16 +203,16 @@
camera: camera@11800000 {
compatible = "samsung,fimc";
+ ranges = <0x0 0x11800000 0xa0000>;
status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
#clock-cells = <1>;
clock-output-names = "cam_a_clkout", "cam_b_clkout";
- ranges;
- fimc_0: fimc@11800000 {
+ fimc_0: fimc@0 {
compatible = "samsung,exynos4210-fimc";
- reg = <0x11800000 0x1000>;
+ reg = <0x0 0x1000>;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_FIMC0>,
<&clock CLK_SCLK_FIMC0>;
@@ -223,9 +223,9 @@
status = "disabled";
};
- fimc_1: fimc@11810000 {
+ fimc_1: fimc@10000 {
compatible = "samsung,exynos4210-fimc";
- reg = <0x11810000 0x1000>;
+ reg = <0x00010000 0x1000>;
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_FIMC1>,
<&clock CLK_SCLK_FIMC1>;
@@ -236,9 +236,9 @@
status = "disabled";
};
- fimc_2: fimc@11820000 {
+ fimc_2: fimc@20000 {
compatible = "samsung,exynos4210-fimc";
- reg = <0x11820000 0x1000>;
+ reg = <0x00020000 0x1000>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_FIMC2>,
<&clock CLK_SCLK_FIMC2>;
@@ -249,9 +249,9 @@
status = "disabled";
};
- fimc_3: fimc@11830000 {
+ fimc_3: fimc@30000 {
compatible = "samsung,exynos4210-fimc";
- reg = <0x11830000 0x1000>;
+ reg = <0x00030000 0x1000>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_FIMC3>,
<&clock CLK_SCLK_FIMC3>;
@@ -262,9 +262,9 @@
status = "disabled";
};
- csis_0: csis@11880000 {
+ csis_0: csis@80000 {
compatible = "samsung,exynos4210-csis";
- reg = <0x11880000 0x4000>;
+ reg = <0x00080000 0x4000>;
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_CSIS0>,
<&clock CLK_SCLK_CSIS0>;
@@ -278,9 +278,9 @@
#size-cells = <0>;
};
- csis_1: csis@11890000 {
+ csis_1: csis@90000 {
compatible = "samsung,exynos4210-csis";
- reg = <0x11890000 0x4000>;
+ reg = <0x00090000 0x4000>;
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_CSIS1>,
<&clock CLK_SCLK_CSIS1>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4210-i9100.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4210-i9100.dts
index 37cd4dde53e4..0d8495792a70 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4210-i9100.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4210-i9100.dts
@@ -184,6 +184,28 @@
};
};
+ i2c-gpio-2 {
+ compatible = "i2c-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sda-gpios = <&gpk1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpk1 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+
+ touchscreen@20 {
+ compatible = "cypress,aries-touchkey";
+ reg = <0x20>;
+
+ interrupt-parent = <&gpl0>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+
+ vdd-supply = <&vtouchled_reg>;
+ vcc-supply = <&vtouch_reg>;
+ linux,keycodes = <KEY_MENU>, <KEY_BACK>;
+ };
+ };
+
spi-3 {
compatible = "spi-gpio";
#address-cells = <1>;
@@ -207,8 +229,8 @@
power-on-delay = <10>;
reset-delay = <10>;
- panel-width-mm = <90>;
- panel-height-mm = <154>;
+ panel-width-mm = <56>;
+ panel-height-mm = <93>;
display-timings {
timing {
@@ -380,6 +402,23 @@
vusb_a-supply = <&vusbdac_reg>;
};
+&i2c_1 {
+ status = "okay";
+
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-slave-addr = <0x10>;
+ samsung,i2c-max-bus-freq = <100000>;
+
+ lis3dh: accelerometer@19 {
+ compatible = "st,lis3dh-accel";
+ reg = <0x19>;
+
+ mount-matrix = "0", "-1", "0",
+ "1", "0", "0",
+ "0", "0", "1";
+ };
+};
+
&i2c_3 {
status = "okay";
@@ -513,7 +552,6 @@
regulator-name = "TOUCH_2.8V";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
- regulator-always-on;
};
vpll_reg: LDO10 {
@@ -527,6 +565,14 @@
regulator-name = "VT_CAM_1.8V";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
+
+ /*
+ * Force-enable this regulator; otherwise the
+ * kernel hangs very early in the boot process
+ * for about 12 seconds, without apparent
+ * reason.
+ */
+ regulator-always-on;
};
vcclcd_reg: LDO13 {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4210-trats.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4210-trats.dts
index bfb04b31e11b..95e0e01b6ff6 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4210-trats.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4210-trats.dts
@@ -20,10 +20,10 @@
memory@40000000 {
device_type = "memory";
- reg = <0x40000000 0x10000000
- 0x50000000 0x10000000
- 0x60000000 0x10000000
- 0x70000000 0x10000000>;
+ reg = <0x40000000 0x10000000
+ 0x50000000 0x10000000
+ 0x60000000 0x10000000
+ 0x70000000 0x10000000>;
};
aliases {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4210-universal_c210.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4210-universal_c210.dts
index c84af3d27c1c..bdc30f8cf748 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4210-universal_c210.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4210-universal_c210.dts
@@ -20,8 +20,8 @@
memory@40000000 {
device_type = "memory";
- reg = <0x40000000 0x10000000
- 0x50000000 0x10000000>;
+ reg = <0x40000000 0x10000000
+ 0x50000000 0x10000000>;
};
aliases {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4210.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos4210.dtsi
index 0e27c3375e2e..510e8665d1a2 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4210.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4210.dtsi
@@ -391,8 +391,16 @@
};
&cpu_thermal {
- polling-delay-passive = <0>;
- polling-delay = <0>;
+ /*
+ * Exynos 4210 supports thermal interrupts, but only for the rising
+ * threshold. This means that polling is not needed for preventing
+ * overheating, but only for decreasing cooling when possible. Hence we
+ * poll with a high delay. Ideally, we would disable polling for the
+ * first trip point, but this isn't really possible without outrageous
+ * hacks.
+ */
+ polling-delay-passive = <5000>;
+ polling-delay = <5000>;
};
&gic {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-3g8.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-3g8.dts
new file mode 100644
index 000000000000..d96b2dd44608
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-3g8.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4212 based Galaxy Tab 3 8.0 3G board device tree
+ * source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ */
+
+/dts-v1/;
+#include "exynos4212-tab3.dtsi"
+
+/ {
+ model = "Samsung Galaxy Tab 3 8.0 3G (SM-T311) based on Exynos4212";
+ compatible = "samsung,t311", "samsung,tab3", "samsung,exynos4212", "samsung,exynos4";
+ chassis-type = "tablet";
+};
+
+/* Pin control sleep state overrides */
+&sleep0 {
+ PIN_SLP(gpb-5, INPUT, UP);
+};
+
+&sleep1 {
+ PIN_SLP(gpl0-0, OUT0, NONE);
+ PIN_SLP(gpl1-0, OUT0, NONE);
+ PIN_SLP(gpl2-4, OUT0, NONE);
+ PIN_SLP(gpm3-3, OUT1, NONE);
+};
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-lte8.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-lte8.dts
new file mode 100644
index 000000000000..bbb398eca7b0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-lte8.dts
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4212 based Galaxy Tab 3 8.0 LTE board device tree
+ * source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ */
+
+/dts-v1/;
+#include "exynos4212-tab3.dtsi"
+
+/ {
+ model = "Samsung Galaxy Tab 3 8.0 LTE (SM-T315) based on Exynos4212";
+ compatible = "samsung,t315", "samsung,tab3", "samsung,exynos4212", "samsung,exynos4";
+ chassis-type = "tablet";
+};
+
+/* Pin control sleep state overrides */
+&sleep0 {
+ PIN_SLP(gpa0-4, INPUT, UP);
+ PIN_SLP(gpa0-5, INPUT, UP);
+
+ PIN_SLP(gpb-5, INPUT, UP);
+
+ PIN_SLP(gpc0-0, PREV, NONE);
+ PIN_SLP(gpc1-3, INPUT, NONE);
+
+ PIN_SLP(gpf1-6, INPUT, NONE);
+ PIN_SLP(gpf2-2, PREV, NONE);
+};
+
+&sleep1 {
+ PIN_SLP(gpl0-0, PREV, NONE);
+
+ PIN_SLP(gpl1-0, PREV, NONE);
+
+ PIN_SLP(gpl2-1, INPUT, DOWN);
+ PIN_SLP(gpl2-2, INPUT, DOWN);
+ PIN_SLP(gpl2-4, OUT0, NONE);
+ PIN_SLP(gpl2-5, PREV, NONE);
+
+ PIN_SLP(gpm3-3, OUT1, NONE);
+};
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-wifi8.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-wifi8.dts
new file mode 100644
index 000000000000..54cb01703b60
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3-wifi8.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4212 based Galaxy Tab 3 8.0 WiFi board device tree
+ * source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ */
+
+/dts-v1/;
+#include "exynos4212-tab3.dtsi"
+
+/ {
+ model = "Samsung Galaxy Tab 3 8.0 WiFi (SM-T310) based on Exynos4212";
+ compatible = "samsung,t310", "samsung,tab3", "samsung,exynos4212", "samsung,exynos4";
+ chassis-type = "tablet";
+};
+
+&i2c_lightsensor {
+ status = "okay";
+
+ lightsensor@10 {
+ compatible = "capella,cm3323";
+ reg = <0x10>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3.dtsi
new file mode 100644
index 000000000000..e5254e32aa8f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4212-tab3.dtsi
@@ -0,0 +1,1310 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4212 based Galaxy Tab 3 board common source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ */
+
+/dts-v1/;
+#include "exynos4212.dtsi"
+#include "exynos4412-ppmu-common.dtsi"
+#include "exynos-mfc-reserved-memory.dtsi"
+#include <dt-bindings/clock/samsung,s2mps11.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "exynos-pinctrl.h"
+
+/ {
+ compatible = "samsung,tab3", "samsung,exynos4212", "samsung,exynos4";
+
+ memory@40000000 {
+ device_type = "memory";
+
+ /*
+ * Technically 1.5GB is available, but the latter 512MB is handled
+ * in a special way by downstream (every second page is skipped),
+ * and thus doesn't initialize correctly on mainline. Only 1020M is
+ * used for now.
+ */
+ reg = <0x40000000 0x3fc00000>;
+ };
+
+ aliases {
+ mmc0 = &mshc_0; /* Internal storage */
+ mmc1 = &sdhci_2; /* SD card */
+ mmc2 = &sdhci_3; /* WiFi */
+ };
+
+ chosen {
+ stdout-path = &serial_2;
+
+ /* Default S-BOOT bootloader loads initramfs here */
+ linux,initrd-start = <0x42000000>;
+ linux,initrd-end = <0x42800000>;
+ };
+
+ firmware@204f000 {
+ compatible = "samsung,secure-firmware";
+ reg = <0x0204F000 0x1000>;
+ };
+
+ fixed-rate-clocks {
+ xxti {
+ compatible = "samsung,clock-xxti";
+ clock-frequency = <0>;
+ };
+
+ xusbxti {
+ compatible = "samsung,clock-xusbxti";
+ clock-frequency = <24000000>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_keys>;
+
+ key-power {
+ gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ label = "power";
+ debounce-interval = <10>;
+ wakeup-source;
+ };
+
+ key-up {
+ gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ label = "volume down";
+ debounce-interval = <10>;
+ };
+
+ key-down {
+ gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEDOWN>;
+ label = "volume up";
+ debounce-interval = <10>;
+ };
+
+ key-home {
+ gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_HOME>;
+ label = "home";
+ debounce-interval = <10>;
+ };
+
+ switch-hall-sensor {
+ gpios = <&gpx2 4 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ label = "hall effect sensor";
+ debounce-interval = <10>;
+ wakeup-source;
+ };
+ };
+
+ led-touchkeys {
+ compatible = "regulator-led";
+ vled-supply = <&ldo20_reg>;
+ default-state = "off";
+ function = LED_FUNCTION_KBD_BACKLIGHT;
+ color = <LED_COLOR_ID_WHITE>;
+ };
+
+ i2c_max77693: i2c-gpio-1 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpm2 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpm2 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@66 {
+ compatible = "maxim,max77693";
+ reg = <0x66>;
+ interrupt-parent = <&gpx1>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&max77693_irq>;
+
+ regulators {
+ esafeout1_reg: ESAFEOUT1 {
+ regulator-name = "ESAFEOUT1";
+ regulator-boot-on;
+ };
+
+ esafeout2_reg: ESAFEOUT2 {
+ regulator-name = "ESAFEOUT2";
+ };
+
+ charger_reg: CHARGER {
+ regulator-name = "CHARGER";
+ regulator-min-microamp = <60000>;
+ regulator-max-microamp = <2580000>;
+ regulator-boot-on;
+ };
+ };
+
+ charger {
+ compatible = "maxim,max77693-charger";
+
+ maxim,constant-microvolt = <4350000>;
+ maxim,min-system-microvolt = <3600000>;
+ maxim,thermal-regulation-celsius = <100>;
+ maxim,battery-overcurrent-microamp = <3500000>;
+ maxim,charge-input-threshold-microvolt = <4300000>;
+ };
+ };
+ };
+
+ i2c_max77693_fuel: i2c-gpio-2 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpy0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpy0 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fuel-gauge@36 {
+ compatible = "maxim,max17050";
+ reg = <0x36>;
+ interrupt-parent = <&gpx2>;
+ interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&max77693_fuel_irq>;
+
+ maxim,over-heat-temp = <500>;
+ maxim,over-volt = <4500>;
+ };
+ };
+
+ i2c_magnetometer: i2c-gpio-3 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpy2 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpy2 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ magnetometer@2e {
+ compatible = "yamaha,yas532";
+ reg = <0x2e>;
+ iovdd-supply = <&ldo3_reg>;
+ mount-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "-1";
+ };
+ };
+
+ i2c_lightsensor: i2c-gpio-4 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpl0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpl0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ /* WiFi model uses CM3323, 3G/LTE use CM36653 */
+ };
+
+ i2c_bl: i2c-gpio-5 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpm4 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpm4 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight: backlight@2c {
+ compatible = "ti,lp8556";
+ reg = <0x2c>;
+
+ bl-name = "lcd-bl";
+ dev-ctrl = /bits/ 8 <0x80>;
+ init-brt = /bits/ 8 <0x78>; /* 120 */
+
+ power-supply = <&vbatt_reg>;
+ enable-supply = <&backlight_reset_supply>;
+
+ pwms = <&pwm 1 78770 0>;
+ pwm-names = "lp8556";
+
+ rom-a3h {
+ rom-addr = /bits/ 8 <0xa3>;
+ rom-val = /bits/ 8 <0x5e>;
+ };
+
+ rom-a5h {
+ rom-addr = /bits/ 8 <0xa5>;
+ rom-val = /bits/ 8 <0x34>;
+ };
+
+ rom-a7h {
+ rom-addr = /bits/ 8 <0xa7>;
+ rom-val = /bits/ 8 <0xfa>;
+ };
+ };
+ };
+
+ vbatt_reg: voltage-regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "VBATT";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ backlight_reset_supply: voltage-regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "BACKLIGHT_ENVDDIO";
+ pinctrl-names = "default";
+ pinctrl-0 = <&backlight_reset>;
+ gpio = <&gpm0 1 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ display_3v3_supply: voltage-regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "DISPLAY_3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd_en>;
+ gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>; /* LCD_EN */
+ enable-active-high;
+ };
+
+ mic_bias_reg: voltage-regulator-4 {
+ compatible = "regulator-fixed";
+ regulator-name = "MICBIAS_LDO_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ submic_bias_reg: voltage-regulator-5 {
+ compatible = "regulator-fixed";
+ regulator-name = "SUB_MICBIAS_LDO_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ sound: sound {
+ compatible = "samsung,midas-audio";
+ model = "TAB3";
+ mic-bias-supply = <&mic_bias_reg>;
+ submic-bias-supply = <&submic_bias_reg>;
+
+ audio-routing = "HP", "HPOUT1L",
+ "HP", "HPOUT1R",
+
+ "SPK", "SPKOUTLN",
+ "SPK", "SPKOUTLP",
+ "SPK", "SPKOUTRN",
+ "SPK", "SPKOUTRP",
+
+ "RCV", "HPOUT2N",
+ "RCV", "HPOUT2P",
+
+ "LINE", "LINEOUT2N",
+ "LINE", "LINEOUT2P",
+
+ "HDMI", "LINEOUT1N",
+ "HDMI", "LINEOUT1P",
+
+ "IN2LP:VXRN", "MICBIAS1",
+ "IN2LN", "MICBIAS1",
+ "Main Mic", "MICBIAS1",
+
+ "IN1RP", "MICBIAS2",
+ "IN1RN", "MICBIAS2",
+ "Sub Mic", "MICBIAS2",
+
+ "IN1LP", "Headset Mic",
+ "IN1LN", "Headset Mic";
+
+ cpu {
+ sound-dai = <&i2s0 0>;
+ };
+
+ codec {
+ sound-dai = <&wm1811>;
+ };
+ };
+
+ wlan_pwrseq: sdhci3-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&gpm3 5 GPIO_ACTIVE_LOW>;
+ clocks = <&s5m8767_osc S2MPS11_CLK_BT>;
+ clock-names = "ext_clock";
+ };
+};
+
+&bus_acp {
+ devfreq = <&bus_dmc>;
+ status = "okay";
+};
+
+&bus_c2c {
+ devfreq = <&bus_dmc>;
+ status = "okay";
+};
+
+&bus_display {
+ devfreq = <&bus_leftbus>;
+ status = "okay";
+};
+
+&bus_dmc {
+ devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+ vdd-supply = <&buck1_reg>;
+ status = "okay";
+};
+
+&bus_fsys {
+ devfreq = <&bus_leftbus>;
+ status = "okay";
+};
+
+&bus_leftbus {
+ devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+ vdd-supply = <&buck3_reg>;
+ status = "okay";
+};
+
+&bus_mfc {
+ devfreq = <&bus_leftbus>;
+ status = "okay";
+};
+
+&bus_peri {
+ devfreq = <&bus_leftbus>;
+ status = "okay";
+};
+
+&bus_rightbus {
+ devfreq = <&bus_leftbus>;
+ status = "okay";
+};
+
+&cpu0 {
+ cpu0-supply = <&buck2_reg>;
+};
+
+&cpu_thermal {
+ cooling-maps {
+ map0 {
+ /* Corresponds to 800MHz at freq_table */
+ cooling-device = <&cpu0 7 7>, <&cpu1 7 7>;
+ };
+ map1 {
+ /* Corresponds to 200MHz at freq_table */
+ cooling-device = <&cpu0 13 13>, <&cpu1 13 13>;
+ };
+ };
+};
+
+&dsi_0 {
+ vddcore-supply = <&ldo8_reg>;
+ vddio-supply = <&ldo10_reg>;
+ samsung,burst-clock-frequency = <500000000>;
+ samsung,esc-clock-frequency = <20000000>;
+ samsung,pll-clock-frequency = <24000000>;
+ status = "okay";
+
+ panel@0 {
+ compatible = "samsung,lsl080al02", "samsung,s6d7aa0";
+ reg = <0>;
+ power-supply = <&display_3v3_supply>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd_nrst>;
+ reset-gpios = <&gpf0 4 GPIO_ACTIVE_LOW>;
+ backlight = <&backlight>;
+ };
+};
+
+&exynos_usbphy {
+ vbus-supply = <&esafeout1_reg>;
+ status = "okay";
+};
+
+&fimd {
+ samsung,invert-vclk;
+ status = "okay";
+};
+
+&gpu {
+ mali-supply = <&buck4_reg>;
+ status = "okay";
+};
+
+&hsotg {
+ vusb_d-supply = <&ldo15_reg>;
+ vusb_a-supply = <&ldo12_reg>;
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&i2c_1 {
+ pinctrl-0 = <&i2c1_bus>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ lis3dh: accelerometer@19 {
+ /* K2DH seems to be the same as lis2dh12 in terms of registers */
+ compatible = "st,lis2dh12-accel";
+ reg = <0x19>;
+
+ interrupt-parent = <&gpx0>;
+ interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+
+ vdd-supply = <&ldo17_reg>;
+ vddio-supply = <&ldo3_reg>;
+
+ mount-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "-1";
+ };
+};
+
+&i2c_3 {
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-slave-addr = <0x10>;
+ samsung,i2c-max-bus-freq = <400000>;
+ pinctrl-0 = <&i2c3_bus>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ touchscreen@48 {
+ /* MELFAS MMS252, using MMS114 compatible for now */
+ compatible = "melfas,mms114";
+ reg = <0x48>;
+ interrupt-parent = <&gpb>;
+ interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+ touchscreen-size-x = <800>;
+ touchscreen-size-y = <1280>;
+ avdd-supply = <&ldo21_reg>;
+ vdd-supply = <&ldo25_reg>;
+ linux,keycodes = <KEY_MENU KEY_BACK>;
+ };
+};
+
+&i2c_4 {
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-slave-addr = <0x10>;
+ samsung,i2c-max-bus-freq = <100000>;
+ pinctrl-0 = <&i2c4_bus>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ wm1811: audio-codec@1a {
+ compatible = "wlf,wm1811";
+ reg = <0x1a>;
+ clocks = <&pmu_system_controller 0>;
+ clock-names = "MCLK1";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gpx3>;
+ interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ #sound-dai-cells = <0>;
+
+ wlf,gpio-cfg = <0x3 0x0 0x0 0x0 0x0 0x0
+ 0x0 0x8000 0x0 0x0 0x0>;
+ wlf,micbias-cfg = <0x25 0x2f>;
+
+ wlf,lineout1-feedback;
+ wlf,lineout1-se;
+ wlf,lineout2-se;
+ wlf,ldoena-always-driven;
+
+ AVDD2-supply = <&ldo3_reg>;
+ CPVDD-supply = <&ldo3_reg>;
+ DBVDD1-supply = <&ldo3_reg>;
+ DBVDD2-supply = <&ldo3_reg>;
+ DBVDD3-supply = <&ldo3_reg>;
+ SPKVDD1-supply = <&vbatt_reg>;
+ SPKVDD2-supply = <&vbatt_reg>;
+ wlf,ldo1ena-gpios = <&gpm4 4 GPIO_ACTIVE_HIGH>;
+ wlf,ldo2ena-gpios = <&gpm4 4 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&i2c_7 {
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-slave-addr = <0x10>;
+ samsung,i2c-max-bus-freq = <100000>;
+ pinctrl-0 = <&i2c7_bus>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ s5m8767: pmic@66 {
+ compatible = "samsung,s5m8767-pmic";
+ reg = <0x66>;
+ interrupt-parent = <&gpx0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;
+ wakeup-source;
+
+ s5m8767,pmic-buck-default-dvs-idx = <1>;
+
+ s5m8767,pmic-buck-dvs-gpios = <&gpm3 0 GPIO_ACTIVE_HIGH>,
+ <&gpm3 1 GPIO_ACTIVE_HIGH>,
+ <&gpm3 2 GPIO_ACTIVE_HIGH>;
+
+ s5m8767,pmic-buck-ds-gpios = <&gpf3 1 GPIO_ACTIVE_HIGH>,
+ <&gpf3 2 GPIO_ACTIVE_HIGH>,
+ <&gpf3 3 GPIO_ACTIVE_HIGH>;
+
+ s5m8767,pmic-buck2-dvs-voltage = <1100000>, <1100000>,
+ <1100000>, <1100000>,
+ <1100000>, <1100000>,
+ <1100000>, <1100000>;
+
+ s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
+ <1100000>, <1100000>,
+ <1100000>, <1100000>,
+ <1100000>, <1100000>;
+
+ s5m8767,pmic-buck4-dvs-voltage = <1100000>, <1100000>,
+ <1100000>, <1100000>,
+ <1100000>, <1100000>,
+ <1100000>, <1100000>;
+
+ regulators {
+ ldo1_reg: LDO1 {
+ regulator-name = "VALIVE_1.0V_AP";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ op_mode = <1>;
+ };
+
+ ldo2_reg: LDO2 {
+ regulator-name = "VM1M2_1.2V_AP";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-boot-on;
+ op_mode = <1>;
+ };
+
+ ldo3_reg: LDO3 {
+ regulator-name = "VCC_1.8V_AP";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ op_mode = <1>;
+ };
+
+ ldo5_reg: LDO5 {
+ regulator-name = "VCC_3.3V_MHL";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ op_mode = <1>;
+ };
+
+ ldo8_reg: LDO8 {
+ regulator-name = "VMIPI_1.0V";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ op_mode = <3>;
+ };
+
+ ldo9_reg: LDO9 {
+ regulator-name = "VSIL_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ op_mode = <1>;
+ };
+
+ ldo10_reg: LDO10 {
+ regulator-name = "VMIPI_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ op_mode = <3>;
+ };
+
+ ldo12_reg: LDO12 {
+ regulator-name = "VUOTG_3.0V";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ op_mode = <1>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ ldo13_reg: LDO13 {
+ regulator-name = "VCC_1.8V_MHL";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ op_mode = <1>;
+ };
+
+ ldo15_reg: LDO15 {
+ regulator-name = "VHSIC_1.0V";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ op_mode = <1>;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ ldo17_reg: LDO17 {
+ regulator-name = "VCC_2.8V_AP";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ op_mode = <1>;
+ regulator-always-on;
+ };
+
+ ldo19_reg: LDO19 {
+ regulator-name = "VLED_IC_1.9V";
+ regulator-min-microvolt = <1900000>;
+ regulator-max-microvolt = <1900000>;
+ op_mode = <1>;
+ regulator-always-on;
+ };
+
+ ldo20_reg: LDO20 {
+ regulator-name = "VTOUCH_3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ op_mode = <1>;
+ };
+
+ ldo21_reg: LDO21 {
+ regulator-name = "TSP_VDD_3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ op_mode = <1>;
+ };
+
+ ldo22_reg: LDO22 {
+ regulator-name = "5M_AF_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ op_mode = <1>;
+ };
+
+ ldo23_reg: LDO23 {
+ regulator-name = "VTF_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ op_mode = <3>;
+ };
+
+ ldo24_reg: LDO24 {
+ regulator-name = "LEDA_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ op_mode = <1>;
+ };
+
+ ldo25_reg: LDO25 {
+ regulator-name = "TSP_VDD_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ op_mode = <1>;
+ };
+
+ ldo26_reg: LDO26 {
+ regulator-name = "CAM_IO_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ op_mode = <1>;
+ };
+
+ ldo27_reg: LDO27 {
+ regulator-name = "VTCAM_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ op_mode = <1>;
+ };
+
+ buck1_reg: BUCK1 {
+ regulator-name = "VDD_MIF";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ regulator-boot-on;
+ op_mode = <3>;
+ };
+
+ buck2_reg: BUCK2 {
+ regulator-name = "VDD_ARM";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-always-on;
+ regulator-boot-on;
+ op_mode = <3>;
+ };
+
+ buck3_reg: BUCK3 {
+ regulator-name = "VDD_INT";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ op_mode = <3>;
+ };
+
+ buck4_reg: BUCK4 {
+ regulator-name = "VDD_G3D";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1150000>;
+ regulator-boot-on;
+ op_mode = <3>;
+ };
+
+ buck5_reg: BUCK5 {
+ regulator-name = "VMEM_1.2V_AP";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ regulator-boot-on;
+ op_mode = <1>;
+ };
+
+ buck6_reg: BUCK6 {
+ regulator-name = "CAM_ISP_CORE_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ op_mode = <1>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+
+ s5m8767_osc: clocks {
+ compatible = "samsung,s5m8767-clk";
+ #clock-cells = <1>;
+ clock-output-names = "en32khz_ap",
+ "en32khz_cp",
+ "en32khz_bt";
+ };
+ };
+};
+
+&i2s0 {
+ pinctrl-0 = <&i2s0_bus>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&mshc_0 {
+ broken-cd;
+ non-removable;
+ card-detect-delay = <200>;
+ vmmc-supply = <&ldo22_reg>;
+ clock-frequency = <400000000>;
+ samsung,dw-mshc-ciu-div = <0>;
+ samsung,dw-mshc-sdr-timing = <2 3>;
+ samsung,dw-mshc-ddr-timing = <1 2>;
+ pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
+ pinctrl-names = "default";
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ mmc-ddr-1_8v;
+ status = "okay";
+};
+
+&pinctrl_0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sleep0>;
+
+ lcd_en: lcd-en-pins {
+ samsung,pins = "gpc0-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ lcd_nrst: lcd-nrst-pins {
+ samsung,pins = "gpf0-4";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ s5m8767_ds: s5m8767-ds-pins {
+ samsung,pins = "gpf3-1", "gpf3-2", "gpf3-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
+ sleep0: sleep-state {
+ PIN_SLP(gpa0-0, INPUT, NONE);
+ PIN_SLP(gpa0-1, OUT0, NONE);
+ PIN_SLP(gpa0-2, INPUT, NONE);
+ PIN_SLP(gpa0-3, INPUT, UP);
+ PIN_SLP(gpa0-4, INPUT, DOWN);
+ PIN_SLP(gpa0-5, INPUT, DOWN);
+ PIN_SLP(gpa0-6, INPUT, DOWN);
+ PIN_SLP(gpa0-7, INPUT, DOWN);
+
+ PIN_SLP(gpa1-0, INPUT, DOWN);
+ PIN_SLP(gpa1-1, INPUT, DOWN);
+ PIN_SLP(gpa1-2, INPUT, DOWN);
+ PIN_SLP(gpa1-3, INPUT, DOWN);
+ PIN_SLP(gpa1-4, INPUT, DOWN);
+ PIN_SLP(gpa1-5, INPUT, DOWN);
+
+ PIN_SLP(gpb-0, INPUT, NONE);
+ PIN_SLP(gpb-1, INPUT, NONE);
+ PIN_SLP(gpb-2, INPUT, NONE);
+ PIN_SLP(gpb-3, INPUT, NONE);
+ PIN_SLP(gpb-4, INPUT, DOWN);
+ PIN_SLP(gpb-5, INPUT, DOWN);
+ PIN_SLP(gpb-6, INPUT, DOWN);
+ PIN_SLP(gpb-7, INPUT, DOWN);
+
+ PIN_SLP(gpc0-0, INPUT, DOWN);
+ PIN_SLP(gpc0-1, INPUT, DOWN);
+ PIN_SLP(gpc0-2, INPUT, NONE);
+ PIN_SLP(gpc0-3, INPUT, NONE);
+ PIN_SLP(gpc0-4, INPUT, NONE);
+
+ PIN_SLP(gpc1-0, INPUT, DOWN);
+ PIN_SLP(gpc1-1, INPUT, DOWN);
+ PIN_SLP(gpc1-2, INPUT, DOWN);
+ PIN_SLP(gpc1-3, INPUT, DOWN);
+ PIN_SLP(gpc1-4, INPUT, DOWN);
+
+ PIN_SLP(gpd0-0, INPUT, DOWN);
+ PIN_SLP(gpd0-1, OUT0, NONE);
+ PIN_SLP(gpd0-2, INPUT, NONE);
+ PIN_SLP(gpd0-3, INPUT, NONE);
+
+ PIN_SLP(gpd1-0, INPUT, DOWN);
+ PIN_SLP(gpd1-1, INPUT, DOWN);
+ PIN_SLP(gpd1-2, INPUT, NONE);
+ PIN_SLP(gpd1-3, INPUT, NONE);
+
+ PIN_SLP(gpf0-0, INPUT, DOWN);
+ PIN_SLP(gpf0-1, INPUT, DOWN);
+ PIN_SLP(gpf0-2, INPUT, DOWN);
+ PIN_SLP(gpf0-3, INPUT, DOWN);
+ PIN_SLP(gpf0-4, OUT0, NONE);
+ PIN_SLP(gpf0-5, OUT0, NONE);
+ PIN_SLP(gpf0-6, INPUT, DOWN);
+ PIN_SLP(gpf0-7, INPUT, DOWN);
+
+ PIN_SLP(gpf1-0, INPUT, DOWN);
+ PIN_SLP(gpf1-1, INPUT, DOWN);
+ PIN_SLP(gpf1-2, INPUT, DOWN);
+ PIN_SLP(gpf1-3, INPUT, DOWN);
+ PIN_SLP(gpf1-4, INPUT, DOWN);
+ PIN_SLP(gpf1-5, INPUT, DOWN);
+ PIN_SLP(gpf1-6, INPUT, DOWN);
+ PIN_SLP(gpf1-7, INPUT, DOWN);
+
+ PIN_SLP(gpf2-0, INPUT, DOWN);
+ PIN_SLP(gpf2-1, INPUT, DOWN);
+ PIN_SLP(gpf2-2, INPUT, DOWN);
+ PIN_SLP(gpf2-3, INPUT, DOWN);
+ PIN_SLP(gpf2-4, INPUT, DOWN);
+ PIN_SLP(gpf2-5, INPUT, DOWN);
+ PIN_SLP(gpf2-6, INPUT, DOWN);
+ PIN_SLP(gpf2-7, INPUT, DOWN);
+
+ PIN_SLP(gpf3-0, INPUT, DOWN);
+ PIN_SLP(gpf3-1, INPUT, DOWN);
+ PIN_SLP(gpf3-2, INPUT, DOWN);
+ PIN_SLP(gpf3-3, INPUT, DOWN);
+ PIN_SLP(gpf3-4, PREV, NONE);
+ PIN_SLP(gpf3-5, OUT0, DOWN);
+
+ PIN_SLP(gpj0-0, INPUT, DOWN);
+ PIN_SLP(gpj0-1, INPUT, DOWN);
+ PIN_SLP(gpj0-2, INPUT, DOWN);
+ PIN_SLP(gpj0-3, OUT0, NONE);
+ PIN_SLP(gpj0-4, INPUT, DOWN);
+ PIN_SLP(gpj0-5, INPUT, DOWN);
+ PIN_SLP(gpj0-6, OUT0, NONE);
+ PIN_SLP(gpj0-7, OUT0, NONE);
+
+ PIN_SLP(gpj1-0, OUT0, NONE);
+ PIN_SLP(gpj1-1, INPUT, DOWN);
+ PIN_SLP(gpj1-2, PREV, NONE);
+ PIN_SLP(gpj1-3, INPUT, DOWN);
+ PIN_SLP(gpj1-4, INPUT, DOWN);
+ };
+};
+
+&pinctrl_1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sleep1>;
+
+ bt_shutdown: bt-shutdown-pins {
+ samsung,pins = "gpl0-6";
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ bt_host_wakeup: bt-host-wakeup-pins {
+ samsung,pins = "gpx2-6";
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ bt_device_wakeup: bt-device-wakeup-pins {
+ samsung,pins = "gpx3-1";
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ backlight_reset: backlight-reset-pins {
+ samsung,pins = "gpm0-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ gpio_keys: gpio-keys-pins {
+ samsung,pins = "gpx1-2", "gpx2-2", "gpx2-4", "gpx2-7", "gpx3-3";
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ max77693_irq: max77693-irq-pins {
+ samsung,pins = "gpx1-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
+ max77693_fuel_irq: max77693-fuel-irq-pins {
+ samsung,pins = "gpx2-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
+ sdhci2_cd: sdhci2-cd-irq-pins {
+ samsung,pins = "gpx3-4";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
+ s5m8767_dvs: s5m8767-dvs-pins {
+ samsung,pins = "gpm3-0", "gpm3-1", "gpm3-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
+ s5m8767_irq: s5m8767-irq-pins {
+ samsung,pins = "gpx0-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
+ sleep1: sleep-state {
+ PIN_SLP(gpk0-0, PREV, NONE);
+ PIN_SLP(gpk0-1, PREV, NONE);
+ PIN_SLP(gpk0-2, PREV, NONE);
+ PIN_SLP(gpk0-3, PREV, NONE);
+ PIN_SLP(gpk0-4, PREV, NONE);
+ PIN_SLP(gpk0-5, PREV, NONE);
+ PIN_SLP(gpk0-6, PREV, NONE);
+
+ PIN_SLP(gpk1-0, INPUT, DOWN);
+ PIN_SLP(gpk1-1, INPUT, DOWN);
+ PIN_SLP(gpk1-2, INPUT, DOWN);
+ PIN_SLP(gpk1-3, PREV, NONE);
+ PIN_SLP(gpk1-4, PREV, NONE);
+ PIN_SLP(gpk1-5, PREV, NONE);
+ PIN_SLP(gpk1-6, PREV, NONE);
+
+ PIN_SLP(gpk2-0, INPUT, DOWN);
+ PIN_SLP(gpk2-1, INPUT, DOWN);
+ PIN_SLP(gpk2-2, INPUT, DOWN);
+ PIN_SLP(gpk2-3, INPUT, DOWN);
+ PIN_SLP(gpk2-4, INPUT, DOWN);
+ PIN_SLP(gpk2-5, INPUT, DOWN);
+ PIN_SLP(gpk2-6, INPUT, DOWN);
+
+ PIN_SLP(gpk3-0, OUT0, NONE);
+ PIN_SLP(gpk3-1, INPUT, NONE);
+ PIN_SLP(gpk3-2, INPUT, DOWN);
+ PIN_SLP(gpk3-3, INPUT, NONE);
+ PIN_SLP(gpk3-4, INPUT, NONE);
+ PIN_SLP(gpk3-5, INPUT, NONE);
+ PIN_SLP(gpk3-6, INPUT, NONE);
+
+ PIN_SLP(gpl0-0, INPUT, DOWN);
+ PIN_SLP(gpl0-1, INPUT, NONE);
+ PIN_SLP(gpl0-2, INPUT, NONE);
+ PIN_SLP(gpl0-3, INPUT, DOWN);
+ PIN_SLP(gpl0-4, INPUT, DOWN);
+ PIN_SLP(gpl0-6, PREV, NONE);
+
+ PIN_SLP(gpl1-0, INPUT, DOWN);
+ PIN_SLP(gpl1-1, OUT0, NONE);
+ PIN_SLP(gpl2-0, INPUT, DOWN);
+ PIN_SLP(gpl2-1, PREV, NONE);
+ PIN_SLP(gpl2-2, PREV, NONE);
+ PIN_SLP(gpl2-3, INPUT, DOWN);
+ PIN_SLP(gpl2-4, INPUT, DOWN);
+ PIN_SLP(gpl2-5, INPUT, DOWN);
+ PIN_SLP(gpl2-6, INPUT, DOWN);
+ PIN_SLP(gpl2-7, INPUT, DOWN);
+
+ PIN_SLP(gpm0-0, PREV, NONE);
+ PIN_SLP(gpm0-1, OUT0, NONE);
+ PIN_SLP(gpm0-2, INPUT, DOWN);
+ PIN_SLP(gpm0-3, INPUT, DOWN);
+ PIN_SLP(gpm0-4, INPUT, DOWN);
+ PIN_SLP(gpm0-5, INPUT, DOWN);
+ PIN_SLP(gpm0-6, INPUT, DOWN);
+ PIN_SLP(gpm0-7, INPUT, DOWN);
+
+ PIN_SLP(gpm1-0, INPUT, DOWN);
+ PIN_SLP(gpm1-1, INPUT, DOWN);
+ PIN_SLP(gpm1-2, INPUT, NONE);
+ PIN_SLP(gpm1-3, INPUT, NONE);
+ PIN_SLP(gpm1-4, INPUT, NONE);
+ PIN_SLP(gpm1-5, INPUT, NONE);
+ PIN_SLP(gpm1-6, OUT0, NONE);
+
+ PIN_SLP(gpm2-0, INPUT, NONE);
+ PIN_SLP(gpm2-1, INPUT, NONE);
+ PIN_SLP(gpm2-2, OUT0, NONE);
+ PIN_SLP(gpm2-3, INPUT, DOWN);
+ PIN_SLP(gpm2-4, INPUT, DOWN);
+
+ PIN_SLP(gpm3-0, PREV, NONE);
+ PIN_SLP(gpm3-1, PREV, NONE);
+ PIN_SLP(gpm3-2, PREV, NONE);
+ PIN_SLP(gpm3-3, INPUT, DOWN);
+ PIN_SLP(gpm3-4, INPUT, DOWN);
+ PIN_SLP(gpm3-5, PREV, NONE);
+ PIN_SLP(gpm3-6, INPUT, DOWN);
+ PIN_SLP(gpm3-7, OUT0, NONE);
+
+ PIN_SLP(gpm4-0, INPUT, DOWN);
+ PIN_SLP(gpm4-1, INPUT, DOWN);
+ PIN_SLP(gpm4-2, INPUT, DOWN);
+ PIN_SLP(gpm4-3, INPUT, DOWN);
+ PIN_SLP(gpm4-4, PREV, NONE);
+ PIN_SLP(gpm4-5, INPUT, NONE);
+ PIN_SLP(gpm4-6, INPUT, DOWN);
+ PIN_SLP(gpm4-7, INPUT, DOWN);
+
+ PIN_SLP(gpy0-0, INPUT, DOWN);
+ PIN_SLP(gpy0-1, INPUT, DOWN);
+ PIN_SLP(gpy0-2, INPUT, NONE);
+ PIN_SLP(gpy0-3, INPUT, NONE);
+ PIN_SLP(gpy0-4, INPUT, DOWN);
+ PIN_SLP(gpy0-5, INPUT, DOWN);
+
+ PIN_SLP(gpy1-0, INPUT, DOWN);
+ PIN_SLP(gpy1-1, INPUT, DOWN);
+ PIN_SLP(gpy1-2, INPUT, DOWN);
+ PIN_SLP(gpy1-3, INPUT, DOWN);
+
+ PIN_SLP(gpy2-0, PREV, NONE);
+ PIN_SLP(gpy2-1, INPUT, DOWN);
+ PIN_SLP(gpy2-2, INPUT, NONE);
+ PIN_SLP(gpy2-3, INPUT, NONE);
+ PIN_SLP(gpy2-4, INPUT, NONE);
+ PIN_SLP(gpy2-5, INPUT, NONE);
+
+ PIN_SLP(gpy3-0, INPUT, DOWN);
+ PIN_SLP(gpy3-1, INPUT, DOWN);
+ PIN_SLP(gpy3-2, INPUT, DOWN);
+ PIN_SLP(gpy3-3, INPUT, DOWN);
+ PIN_SLP(gpy3-4, INPUT, DOWN);
+ PIN_SLP(gpy3-5, INPUT, DOWN);
+ PIN_SLP(gpy3-6, INPUT, DOWN);
+ PIN_SLP(gpy3-7, INPUT, DOWN);
+
+ PIN_SLP(gpy4-0, INPUT, DOWN);
+ PIN_SLP(gpy4-1, INPUT, DOWN);
+ PIN_SLP(gpy4-2, INPUT, DOWN);
+ PIN_SLP(gpy4-3, INPUT, DOWN);
+ PIN_SLP(gpy4-4, INPUT, DOWN);
+ PIN_SLP(gpy4-5, INPUT, DOWN);
+ PIN_SLP(gpy4-6, INPUT, DOWN);
+ PIN_SLP(gpy4-7, INPUT, DOWN);
+
+ PIN_SLP(gpy5-0, INPUT, DOWN);
+ PIN_SLP(gpy5-1, INPUT, DOWN);
+ PIN_SLP(gpy5-2, INPUT, DOWN);
+ PIN_SLP(gpy5-3, INPUT, DOWN);
+ PIN_SLP(gpy5-4, INPUT, DOWN);
+ PIN_SLP(gpy5-5, INPUT, DOWN);
+ PIN_SLP(gpy5-6, INPUT, DOWN);
+ PIN_SLP(gpy5-7, INPUT, DOWN);
+
+ PIN_SLP(gpy6-0, INPUT, DOWN);
+ PIN_SLP(gpy6-1, INPUT, DOWN);
+ PIN_SLP(gpy6-2, INPUT, DOWN);
+ PIN_SLP(gpy6-3, INPUT, DOWN);
+ PIN_SLP(gpy6-4, INPUT, DOWN);
+ PIN_SLP(gpy6-5, INPUT, DOWN);
+ PIN_SLP(gpy6-6, INPUT, DOWN);
+ PIN_SLP(gpy6-7, INPUT, DOWN);
+ };
+};
+
+&pinctrl_2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sleep2>;
+
+ sleep2: sleep-state {
+ PIN_SLP(gpz-0, INPUT, DOWN);
+ PIN_SLP(gpz-1, INPUT, DOWN);
+ PIN_SLP(gpz-2, INPUT, DOWN);
+ PIN_SLP(gpz-3, INPUT, DOWN);
+ PIN_SLP(gpz-4, INPUT, DOWN);
+ PIN_SLP(gpz-5, INPUT, DOWN);
+ PIN_SLP(gpz-6, INPUT, DOWN);
+ };
+};
+
+&pinctrl_3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sleep3>;
+
+ sleep3: sleep-state {
+ PIN_SLP(gpv0-0, INPUT, DOWN);
+ PIN_SLP(gpv0-1, INPUT, DOWN);
+ PIN_SLP(gpv0-2, INPUT, DOWN);
+ PIN_SLP(gpv0-3, INPUT, DOWN);
+ PIN_SLP(gpv0-4, INPUT, DOWN);
+ PIN_SLP(gpv0-5, INPUT, DOWN);
+ PIN_SLP(gpv0-6, INPUT, DOWN);
+ PIN_SLP(gpv0-7, INPUT, DOWN);
+
+ PIN_SLP(gpv1-0, INPUT, DOWN);
+ PIN_SLP(gpv1-1, INPUT, DOWN);
+ PIN_SLP(gpv1-2, INPUT, DOWN);
+ PIN_SLP(gpv1-3, INPUT, DOWN);
+ PIN_SLP(gpv1-4, INPUT, DOWN);
+ PIN_SLP(gpv1-5, INPUT, DOWN);
+ PIN_SLP(gpv1-6, INPUT, DOWN);
+ PIN_SLP(gpv1-7, INPUT, DOWN);
+
+ PIN_SLP(gpv2-0, INPUT, DOWN);
+ PIN_SLP(gpv2-1, INPUT, DOWN);
+ PIN_SLP(gpv2-2, INPUT, DOWN);
+ PIN_SLP(gpv2-3, INPUT, DOWN);
+ PIN_SLP(gpv2-4, INPUT, DOWN);
+ PIN_SLP(gpv2-5, INPUT, DOWN);
+ PIN_SLP(gpv2-6, INPUT, DOWN);
+ PIN_SLP(gpv2-7, INPUT, DOWN);
+
+ PIN_SLP(gpv3-0, INPUT, DOWN);
+ PIN_SLP(gpv3-1, INPUT, DOWN);
+ PIN_SLP(gpv3-2, INPUT, DOWN);
+ PIN_SLP(gpv3-3, INPUT, DOWN);
+ PIN_SLP(gpv3-4, INPUT, DOWN);
+ PIN_SLP(gpv3-5, INPUT, DOWN);
+ PIN_SLP(gpv3-6, INPUT, DOWN);
+ PIN_SLP(gpv3-7, INPUT, DOWN);
+
+ PIN_SLP(gpv4-0, INPUT, DOWN);
+ PIN_SLP(gpv4-1, INPUT, DOWN);
+ };
+};
+
+&pmu_system_controller {
+ assigned-clocks = <&pmu_system_controller 0>;
+ assigned-clock-parents = <&clock CLK_XUSBXTI>;
+};
+
+&pwm {
+ pinctrl-0 = <&pwm1_out>;
+ pinctrl-names = "default";
+ samsung,pwm-outputs = <1>;
+ status = "okay";
+};
+
+/*
+ * The internal RTC does not work; instead, the RTC provided by the
+ * S5M8766 PMIC is used. Disable the RTC to make sure the working
+ * one gets used.
+ *
+ * We add this node to avoid DTB check warnings, as the Exynos4 RTC
+ * requires two clocks, and only one is set up by default.
+ */
+&rtc {
+ clocks = <&clock CLK_RTC>, <&s5m8767_osc S2MPS11_CLK_AP>;
+ clock-names = "rtc", "rtc_src";
+ status = "disabled";
+};
+
+&sdhci_2 {
+ bus-width = <4>;
+ cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
+ pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>;
+ pinctrl-names = "default";
+ vmmc-supply = <&ldo23_reg>;
+ status = "okay";
+};
+
+&sdhci_3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ non-removable;
+ bus-width = <4>;
+
+ mmc-pwrseq = <&wlan_pwrseq>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>;
+ status = "okay";
+
+ brcmf: wifi@1 {
+ compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
+ reg = <1>;
+
+ interrupt-parent = <&gpx2>;
+ interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "host-wake";
+ };
+};
+
+&serial_0 {
+ pinctrl-0 = <&uart0_data &uart0_fctl>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4330-bt"; /* BCM4334B0 */
+ pinctrl-0 = <&bt_shutdown &bt_device_wakeup &bt_host_wakeup>;
+ pinctrl-names = "default";
+ max-speed = <3000000>;
+ shutdown-gpios = <&gpl0 6 GPIO_ACTIVE_HIGH>;
+ device-wakeup-gpios = <&gpx3 1 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>;
+ clocks = <&s5m8767_osc S2MPS11_CLK_BT>;
+ };
+};
+
+&serial_1 {
+ status = "okay";
+};
+
+&serial_2 {
+ status = "okay";
+};
+
+&serial_3 {
+ status = "okay";
+};
+
+&tmu {
+ vtmu-supply = <&ldo10_reg>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4412-galaxy-s3.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos4412-galaxy-s3.dtsi
index 94122e9c6625..54e1a57ae886 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4412-galaxy-s3.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4412-galaxy-s3.dtsi
@@ -173,36 +173,35 @@
};
&sound {
- samsung,audio-routing =
- "HP", "HPOUT1L",
- "HP", "HPOUT1R",
+ audio-routing = "HP", "HPOUT1L",
+ "HP", "HPOUT1R",
- "SPK", "SPKOUTLN",
- "SPK", "SPKOUTLP",
- "SPK", "SPKOUTRN",
- "SPK", "SPKOUTRP",
+ "SPK", "SPKOUTLN",
+ "SPK", "SPKOUTLP",
+ "SPK", "SPKOUTRN",
+ "SPK", "SPKOUTRP",
- "RCV", "HPOUT2N",
- "RCV", "HPOUT2P",
+ "RCV", "HPOUT2N",
+ "RCV", "HPOUT2P",
- "HDMI", "LINEOUT1N",
- "HDMI", "LINEOUT1P",
+ "HDMI", "LINEOUT1N",
+ "HDMI", "LINEOUT1P",
- "LINE", "LINEOUT2N",
- "LINE", "LINEOUT2P",
+ "LINE", "LINEOUT2N",
+ "LINE", "LINEOUT2P",
- "IN1LP", "MICBIAS1",
- "IN1LN", "MICBIAS1",
- "Main Mic", "MICBIAS1",
+ "IN1LP", "MICBIAS1",
+ "IN1LN", "MICBIAS1",
+ "Main Mic", "MICBIAS1",
- "IN1RP", "Sub Mic",
- "IN1RN", "Sub Mic",
+ "IN1RP", "Sub Mic",
+ "IN1RN", "Sub Mic",
- "IN2LP:VXRN", "MICBIAS2",
- "Headset Mic", "MICBIAS2",
+ "IN2LP:VXRN", "MICBIAS2",
+ "Headset Mic", "MICBIAS2",
- "IN2RN", "FM In",
- "IN2RP:VXRP", "FM In";
+ "IN2RN", "FM In",
+ "IN2RP:VXRP", "FM In";
};
&submic_bias_reg {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4412-midas.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos4412-midas.dtsi
index e6b949c1a00f..3d5aace668dc 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4412-midas.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4412-midas.dtsi
@@ -137,21 +137,21 @@
key-down {
gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
- linux,code = <114>;
+ linux,code = <KEY_VOLUMEDOWN>;
label = "volume down";
debounce-interval = <10>;
};
key-up {
gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
- linux,code = <115>;
+ linux,code = <KEY_VOLUMEUP>;
label = "volume up";
debounce-interval = <10>;
};
key-power {
gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
- linux,code = <116>;
+ linux,code = <KEY_POWER>;
label = "power";
debounce-interval = <10>;
wakeup-source;
@@ -159,7 +159,7 @@
key-ok {
gpios = <&gpx0 1 GPIO_ACTIVE_LOW>;
- linux,code = <139>;
+ linux,code = <KEY_OK>;
label = "ok";
debounce-interval = <10>;
wakeup-source;
@@ -182,6 +182,38 @@
pinctrl-0 = <&max77693_irq>;
reg = <0x66>;
+ muic {
+ compatible = "maxim,max77693-muic";
+
+ connector {
+ compatible = "samsung,usb-connector-11pin",
+ "usb-b-connector";
+ label = "micro-USB";
+ type = "micro";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ muic_to_usb: endpoint {
+ remote-endpoint = <&usb_to_muic>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ muic_to_mhl: endpoint {
+ remote-endpoint = <&mhl_to_muic>;
+ };
+ };
+ };
+ };
+ };
+
regulators {
esafeout1_reg: ESAFEOUT1 {
regulator-name = "ESAFEOUT1";
@@ -287,6 +319,14 @@
remote-endpoint = <&hdmi_to_mhl>;
};
};
+
+ port@1 {
+ reg = <1>;
+
+ mhl_to_muic: endpoint {
+ remote-endpoint = <&muic_to_mhl>;
+ };
+ };
};
};
};
@@ -545,8 +585,16 @@
&hsotg {
vusb_d-supply = <&ldo15_reg>;
vusb_a-supply = <&ldo12_reg>;
- dr_mode = "peripheral";
+ dr_mode = "otg";
+ role-switch-default-mode = "peripheral";
+ usb-role-switch;
status = "okay";
+
+ port {
+ usb_to_muic: endpoint {
+ remote-endpoint = <&muic_to_usb>;
+ };
+ };
};
&i2c_0 {
@@ -990,7 +1038,7 @@
&pmu_system_controller {
assigned-clocks = <&pmu_system_controller 0>;
- assigned-clock-parents = <&clock CLK_XUSBXTI>;
+ assigned-clock-parents = <&clock CLK_XUSBXTI>;
};
&pinctrl_0 {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4412-n710x.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4412-n710x.dts
index 9ae05b0d684c..0a151437fc73 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4412-n710x.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4412-n710x.dts
@@ -76,34 +76,33 @@
};
&sound {
- samsung,audio-routing =
- "HP", "HPOUT1L",
- "HP", "HPOUT1R",
+ audio-routing = "HP", "HPOUT1L",
+ "HP", "HPOUT1R",
- "SPK", "SPKOUTLN",
- "SPK", "SPKOUTLP",
+ "SPK", "SPKOUTLN",
+ "SPK", "SPKOUTLP",
- "RCV", "HPOUT2N",
- "RCV", "HPOUT2P",
+ "RCV", "HPOUT2N",
+ "RCV", "HPOUT2P",
- "HDMI", "LINEOUT1N",
- "HDMI", "LINEOUT1P",
+ "HDMI", "LINEOUT1N",
+ "HDMI", "LINEOUT1P",
- "LINE", "LINEOUT2N",
- "LINE", "LINEOUT2P",
+ "LINE", "LINEOUT2N",
+ "LINE", "LINEOUT2P",
- "IN1LP", "MICBIAS2",
- "IN1LN", "MICBIAS2",
- "Headset Mic", "MICBIAS2",
+ "IN1LP", "MICBIAS2",
+ "IN1LN", "MICBIAS2",
+ "Headset Mic", "MICBIAS2",
- "IN1RP", "Sub Mic",
- "IN1RN", "Sub Mic",
+ "IN1RP", "Sub Mic",
+ "IN1RN", "Sub Mic",
- "IN2LP:VXRN", "Main Mic",
- "IN2LN", "Main Mic",
+ "IN2LP:VXRN", "Main Mic",
+ "IN2LN", "Main Mic",
- "IN2RN", "FM In",
- "IN2RP:VXRP", "FM In";
+ "IN2RN", "FM In",
+ "IN2RP:VXRP", "FM In";
};
&submic_bias_reg {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidu3.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidu3.dts
index 42812da1f882..b1b0916b1505 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidu3.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidu3.dts
@@ -138,13 +138,12 @@
samsung,audio-widgets =
"Headphone", "Headphone Jack",
"Speakers", "Speakers";
- samsung,audio-routing =
- "Headphone Jack", "HPL",
- "Headphone Jack", "HPR",
- "Headphone Jack", "MICBIAS",
- "IN1", "Headphone Jack",
- "Speakers", "SPKL",
- "Speakers", "SPKR";
+ audio-routing = "Headphone Jack", "HPL",
+ "Headphone Jack", "HPR",
+ "Headphone Jack", "MICBIAS",
+ "IN1", "Headphone Jack",
+ "Speakers", "SPKL",
+ "Speakers", "SPKR";
};
&spi_1 {
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidx.dts b/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidx.dts
index d5316cf2fbb6..0eb8a2680a20 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidx.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4412-odroidx.dts
@@ -135,9 +135,8 @@
"Headphone", "Headphone Jack",
"Microphone", "Mic Jack",
"Microphone", "DMIC";
- samsung,audio-routing =
- "Headphone Jack", "HPL",
- "Headphone Jack", "HPR",
- "IN1", "Mic Jack",
- "Mic Jack", "MICBIAS";
+ audio-routing = "Headphone Jack", "HPL",
+ "Headphone Jack", "HPR",
+ "IN1", "Mic Jack",
+ "Mic Jack", "MICBIAS";
};
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos4x12.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos4x12.dtsi
index 84c1db221c98..b4b5e769145b 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos4x12.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos4x12.dtsi
@@ -451,14 +451,15 @@
};
&camera {
+ ranges = <0x0 0x11800000 0xba1000>;
clocks = <&clock CLK_SCLK_CAM0>, <&clock CLK_SCLK_CAM1>,
<&clock CLK_PIXELASYNCM0>, <&clock CLK_PIXELASYNCM1>;
clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
/* fimc_[0-3] are configured outside, under phandles */
- fimc_lite_0: fimc-lite@12390000 {
+ fimc_lite_0: fimc-lite@b90000 {
compatible = "samsung,exynos4212-fimc-lite";
- reg = <0x12390000 0x1000>;
+ reg = <0x00b90000 0x1000>;
interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&pd_isp>;
clocks = <&isp_clock CLK_ISP_FIMC_LITE0>;
@@ -467,9 +468,9 @@
status = "disabled";
};
- fimc_lite_1: fimc-lite@123a0000 {
+ fimc_lite_1: fimc-lite@ba0000 {
compatible = "samsung,exynos4212-fimc-lite";
- reg = <0x123a0000 0x1000>;
+ reg = <0x00ba0000 0x1000>;
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&pd_isp>;
clocks = <&isp_clock CLK_ISP_FIMC_LITE1>;
@@ -478,9 +479,9 @@
status = "disabled";
};
- fimc_is: fimc-is@12000000 {
+ fimc_is: fimc-is@800000 {
compatible = "samsung,exynos4212-fimc-is";
- reg = <0x12000000 0x260000>;
+ reg = <0x00800000 0x260000>;
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&pd_isp>;
@@ -516,18 +517,15 @@
iommus = <&sysmmu_fimc_isp>, <&sysmmu_fimc_drc>,
<&sysmmu_fimc_fd>, <&sysmmu_fimc_mcuctl>;
iommu-names = "isp", "drc", "fd", "mcuctl";
+ samsung,pmu-syscon = <&pmu_system_controller>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
status = "disabled";
- pmu@10020000 {
- reg = <0x10020000 0x3000>;
- };
-
- i2c1_isp: i2c-isp@12140000 {
+ i2c1_isp: i2c-isp@940000 {
compatible = "samsung,exynos4212-i2c-isp";
- reg = <0x12140000 0x100>;
+ reg = <0x00940000 0x100>;
clocks = <&isp_clock CLK_ISP_I2C1_ISP>;
clock-names = "i2c_isp";
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos5250-snow-common.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos5250-snow-common.dtsi
index c82e2762e07c..65b000df176e 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos5250-snow-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos5250-snow-common.dtsi
@@ -60,12 +60,9 @@
i2c-arbitrator {
compatible = "i2c-arb-gpio-challenge";
- #address-cells = <1>;
- #size-cells = <0>;
-
i2c-parent = <&i2c_4>;
- our-claim-gpio = <&gpf0 3 GPIO_ACTIVE_LOW>;
+ our-claim-gpios = <&gpf0 3 GPIO_ACTIVE_LOW>;
their-claim-gpios = <&gpe0 4 GPIO_ACTIVE_LOW>;
slew-delay-us = <10>;
wait-retry-us = <3000>;
@@ -75,8 +72,7 @@
pinctrl-0 = <&arb_our_claim &arb_their_claim>;
/* Use ID 104 as a hint that we're on physical bus 4 */
- i2c_104: i2c@0 {
- reg = <0>;
+ i2c_104: i2c-arb {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu3-audio.dtsi b/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu3-audio.dtsi
index 86b96f9706db..52a1d8fd5452 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu3-audio.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu3-audio.dtsi
@@ -18,16 +18,15 @@
samsung,audio-widgets =
"Headphone", "Headphone Jack",
"Speakers", "Speakers";
- samsung,audio-routing =
- "Headphone Jack", "HPL",
- "Headphone Jack", "HPR",
- "Headphone Jack", "MICBIAS",
- "IN12", "Headphone Jack",
- "Speakers", "SPKL",
- "Speakers", "SPKR",
- "I2S Playback", "Mixer DAI TX",
- "HiFi Playback", "Mixer DAI TX",
- "Mixer DAI RX", "HiFi Capture";
+ audio-routing = "Headphone Jack", "HPL",
+ "Headphone Jack", "HPR",
+ "Headphone Jack", "MICBIAS",
+ "IN12", "Headphone Jack",
+ "Speakers", "SPKL",
+ "Speakers", "SPKR",
+ "I2S Playback", "Mixer DAI TX",
+ "HiFi Playback", "Mixer DAI TX",
+ "Mixer DAI RX", "HiFi Capture";
cpu {
sound-dai = <&i2s0 0>, <&i2s0 1>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu4.dts b/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu4.dts
index f5fb617f46bd..363786f032cc 100644
--- a/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu4.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/exynos5422-odroidxu4.dts
@@ -35,7 +35,7 @@
compatible = "samsung,odroid-xu3-audio";
model = "Odroid-XU4";
- samsung,audio-routing = "I2S Playback", "Mixer DAI TX";
+ audio-routing = "I2S Playback", "Mixer DAI TX";
cpu {
sound-dai = <&i2s0 0>, <&i2s0 1>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/s3c6410-mini6410.dts b/sys/contrib/device-tree/src/arm/samsung/s3c6410-mini6410.dts
index 17097da36f5e..0b07b3c31960 100644
--- a/sys/contrib/device-tree/src/arm/samsung/s3c6410-mini6410.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/s3c6410-mini6410.dts
@@ -51,7 +51,7 @@
ethernet@18000000 {
compatible = "davicom,dm9000";
- reg = <0x18000000 0x2 0x18000004 0x2>;
+ reg = <0x18000000 0x2>, <0x18000004 0x2>;
interrupt-parent = <&gpn>;
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
davicom,no-eeprom;
diff --git a/sys/contrib/device-tree/src/arm/samsung/s5pv210-fascinate4g.dts b/sys/contrib/device-tree/src/arm/samsung/s5pv210-fascinate4g.dts
index eaa7c4f0e257..149e488f8e74 100644
--- a/sys/contrib/device-tree/src/arm/samsung/s5pv210-fascinate4g.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/s5pv210-fascinate4g.dts
@@ -74,30 +74,29 @@
headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
- samsung,audio-routing =
- "HP", "HPOUT1L",
- "HP", "HPOUT1R",
+ audio-routing = "HP", "HPOUT1L",
+ "HP", "HPOUT1R",
- "SPK", "SPKOUTLN",
- "SPK", "SPKOUTLP",
+ "SPK", "SPKOUTLN",
+ "SPK", "SPKOUTLP",
- "RCV", "HPOUT2N",
- "RCV", "HPOUT2P",
+ "RCV", "HPOUT2N",
+ "RCV", "HPOUT2P",
- "LINE", "LINEOUT2N",
- "LINE", "LINEOUT2P",
+ "LINE", "LINEOUT2N",
+ "LINE", "LINEOUT2P",
- "IN1LP", "Main Mic",
- "IN1LN", "Main Mic",
+ "IN1LP", "Main Mic",
+ "IN1LN", "Main Mic",
- "IN1RP", "Headset Mic",
- "IN1RN", "Headset Mic",
+ "IN1RP", "Headset Mic",
+ "IN1RN", "Headset Mic",
- "Modem Out", "Modem TX",
- "Modem RX", "Modem In",
+ "Modem Out", "Modem TX",
+ "Modem RX", "Modem In",
- "Bluetooth SPK", "TX",
- "RX", "Bluetooth Mic";
+ "Bluetooth SPK", "TX",
+ "RX", "Bluetooth Mic";
pinctrl-names = "default";
pinctrl-0 = <&headset_det &earpath_sel>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/s5pv210-galaxys.dts b/sys/contrib/device-tree/src/arm/samsung/s5pv210-galaxys.dts
index 532d3f5bceb1..879294412381 100644
--- a/sys/contrib/device-tree/src/arm/samsung/s5pv210-galaxys.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/s5pv210-galaxys.dts
@@ -101,33 +101,32 @@
headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_LOW>;
headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
- samsung,audio-routing =
- "HP", "HPOUT1L",
- "HP", "HPOUT1R",
+ audio-routing = "HP", "HPOUT1L",
+ "HP", "HPOUT1R",
- "SPK", "SPKOUTLN",
- "SPK", "SPKOUTLP",
+ "SPK", "SPKOUTLN",
+ "SPK", "SPKOUTLP",
- "RCV", "HPOUT2N",
- "RCV", "HPOUT2P",
+ "RCV", "HPOUT2N",
+ "RCV", "HPOUT2P",
- "LINE", "LINEOUT2N",
- "LINE", "LINEOUT2P",
+ "LINE", "LINEOUT2N",
+ "LINE", "LINEOUT2P",
- "IN1LP", "Main Mic",
- "IN1LN", "Main Mic",
+ "IN1LP", "Main Mic",
+ "IN1LN", "Main Mic",
- "IN1RP", "Headset Mic",
- "IN1RN", "Headset Mic",
+ "IN1RP", "Headset Mic",
+ "IN1RN", "Headset Mic",
- "IN2LN", "FM In",
- "IN2RN", "FM In",
+ "IN2LN", "FM In",
+ "IN2RN", "FM In",
- "Modem Out", "Modem TX",
- "Modem RX", "Modem In",
+ "Modem Out", "Modem TX",
+ "Modem RX", "Modem In",
- "Bluetooth SPK", "TX",
- "RX", "Bluetooth Mic";
+ "Bluetooth SPK", "TX",
+ "RX", "Bluetooth Mic";
pinctrl-names = "default";
pinctrl-0 = <&headset_det &earpath_sel>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/s5pv210-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/samsung/s5pv210-pinctrl.dtsi
index af740abd9e0f..6ecdd504e5f4 100644
--- a/sys/contrib/device-tree/src/arm/samsung/s5pv210-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/s5pv210-pinctrl.dtsi
@@ -832,12 +832,12 @@
};
lcd_data24: lcd-data-width24-pins {
- samsung,pins = "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7",
- "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3",
- "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7",
- "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3",
- "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7",
- "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3";
+ samsung,pins = "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7",
+ "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3",
+ "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7",
+ "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3",
+ "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7",
+ "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3";
samsung,pin-function = <S5PV210_PIN_FUNC_2>;
samsung,pin-pud = <S5PV210_PIN_PULL_NONE>;
samsung,pin-drv = <S5PV210_PIN_DRV_LV1>;
diff --git a/sys/contrib/device-tree/src/arm/samsung/s5pv210-smdkv210.dts b/sys/contrib/device-tree/src/arm/samsung/s5pv210-smdkv210.dts
index 6e26c67e0a26..901e7197b136 100644
--- a/sys/contrib/device-tree/src/arm/samsung/s5pv210-smdkv210.dts
+++ b/sys/contrib/device-tree/src/arm/samsung/s5pv210-smdkv210.dts
@@ -41,7 +41,7 @@
ethernet@a8000000 {
compatible = "davicom,dm9000";
- reg = <0xA8000000 0x2 0xA8000002 0x2>;
+ reg = <0xa8000000 0x2>, <0xa8000002 0x2>;
interrupt-parent = <&gph1>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
local-mac-address = [00 00 de ad be ef];
diff --git a/sys/contrib/device-tree/src/arm/samsung/s5pv210.dtsi b/sys/contrib/device-tree/src/arm/samsung/s5pv210.dtsi
index f7de5b5f2f38..ed560c9a3aa1 100644
--- a/sys/contrib/device-tree/src/arm/samsung/s5pv210.dtsi
+++ b/sys/contrib/device-tree/src/arm/samsung/s5pv210.dtsi
@@ -549,17 +549,17 @@
camera: camera@fa600000 {
compatible = "samsung,fimc";
+ ranges = <0x0 0xfa600000 0xe01000>;
clocks = <&clocks SCLK_CAM0>, <&clocks SCLK_CAM1>;
clock-names = "sclk_cam0", "sclk_cam1";
#address-cells = <1>;
#size-cells = <1>;
#clock-cells = <1>;
clock-output-names = "cam_a_clkout", "cam_b_clkout";
- ranges;
- csis0: csis@fa600000 {
+ csis0: csis@0 {
compatible = "samsung,s5pv210-csis";
- reg = <0xfa600000 0x4000>;
+ reg = <0x00000000 0x4000>;
interrupt-parent = <&vic2>;
interrupts = <29>;
clocks = <&clocks CLK_CSIS>,
@@ -572,9 +572,9 @@
#size-cells = <0>;
};
- fimc0: fimc@fb200000 {
+ fimc0: fimc@c00000 {
compatible = "samsung,s5pv210-fimc";
- reg = <0xfb200000 0x1000>;
+ reg = <0x00c00000 0x1000>;
interrupts = <5>;
interrupt-parent = <&vic2>;
clocks = <&clocks CLK_FIMC0>,
@@ -586,9 +586,9 @@
samsung,cam-if;
};
- fimc1: fimc@fb300000 {
+ fimc1: fimc@d00000 {
compatible = "samsung,s5pv210-fimc";
- reg = <0xfb300000 0x1000>;
+ reg = <0x00d00000 0x1000>;
interrupt-parent = <&vic2>;
interrupts = <6>;
clocks = <&clocks CLK_FIMC1>,
@@ -602,9 +602,9 @@
samsung,lcd-wb;
};
- fimc2: fimc@fb400000 {
+ fimc2: fimc@e00000 {
compatible = "samsung,s5pv210-fimc";
- reg = <0xfb400000 0x1000>;
+ reg = <0x00e00000 0x1000>;
interrupt-parent = <&vic2>;
interrupts = <7>;
clocks = <&clocks CLK_FIMC2>,
diff --git a/sys/contrib/device-tree/src/arm/st/spear1310-evb.dts b/sys/contrib/device-tree/src/arm/st/spear1310-evb.dts
index 05408df38203..18191a87f07c 100644
--- a/sys/contrib/device-tree/src/arm/st/spear1310-evb.dts
+++ b/sys/contrib/device-tree/src/arm/st/spear1310-evb.dts
@@ -352,7 +352,6 @@
#size-cells = <0>;
spi-max-frequency = <1000000>;
spi-cpha;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable;
pl022,com-mode = <0>;
@@ -385,7 +384,6 @@
spi-max-frequency = <12000000>;
spi-cpol;
spi-cpha;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable;
pl022,com-mode = <0x2>;
diff --git a/sys/contrib/device-tree/src/arm/st/spear1340-evb.dts b/sys/contrib/device-tree/src/arm/st/spear1340-evb.dts
index 7700f2afc128..cea624fc745c 100644
--- a/sys/contrib/device-tree/src/arm/st/spear1340-evb.dts
+++ b/sys/contrib/device-tree/src/arm/st/spear1340-evb.dts
@@ -445,7 +445,6 @@
spi-max-frequency = <12000000>;
spi-cpol;
spi-cpha;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable;
pl022,com-mode = <0x2>;
@@ -461,7 +460,6 @@
spi-max-frequency = <1000000>;
spi-cpha;
reg = <1>;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable;
pl022,com-mode = <0>;
diff --git a/sys/contrib/device-tree/src/arm/st/spear1340.dtsi b/sys/contrib/device-tree/src/arm/st/spear1340.dtsi
index d54e10629a7d..51f6ffd08b42 100644
--- a/sys/contrib/device-tree/src/arm/st/spear1340.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/spear1340.dtsi
@@ -63,8 +63,8 @@
compatible = "snps,designware-i2s";
reg = <0xb2400000 0x10000>;
interrupt-names = "play_irq";
- interrupts = <0 98 0x4
- 0 99 0x4>;
+ interrupts = <0 98 0x4>,
+ <0 99 0x4>;
play;
channel = <8>;
status = "disabled";
@@ -74,8 +74,8 @@
compatible = "snps,designware-i2s";
reg = <0xb2000000 0x10000>;
interrupt-names = "record_irq";
- interrupts = <0 100 0x4
- 0 101 0x4>;
+ interrupts = <0 100 0x4>,
+ <0 101 0x4>;
record;
channel = <8>;
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm/st/spear13xx.dtsi b/sys/contrib/device-tree/src/arm/st/spear13xx.dtsi
index 913553367687..3b6897084e26 100644
--- a/sys/contrib/device-tree/src/arm/st/spear13xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/spear13xx.dtsi
@@ -39,8 +39,8 @@
pmu {
compatible = "arm,cortex-a9-pmu";
- interrupts = <0 6 0x04
- 0 7 0x04>;
+ interrupts = <0 6 0x04>,
+ <0 7 0x04>;
};
L2: cache-controller {
@@ -141,10 +141,10 @@
0xb0820000 0x0010 /* NAND Base ADDR */
0xb0810000 0x0010>; /* NAND Base CMD */
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
- interrupts = <0 20 0x4
- 0 21 0x4
- 0 22 0x4
- 0 23 0x4>;
+ interrupts = <0 20 0x4>,
+ <0 21 0x4>,
+ <0 22 0x4>,
+ <0 23 0x4>;
st,mode = <2>;
status = "disabled";
};
@@ -152,8 +152,8 @@
gmac0: eth@e2000000 {
compatible = "st,spear600-gmac";
reg = <0xe2000000 0x8000>;
- interrupts = <0 33 0x4
- 0 34 0x4>;
+ interrupts = <0 33 0x4>,
+ <0 34 0x4>;
interrupt-names = "macirq", "eth_wake_irq";
status = "disabled";
};
@@ -263,8 +263,8 @@
compatible = "st,designware-i2s";
reg = <0xe0180000 0x1000>;
interrupt-names = "play_irq", "record_irq";
- interrupts = <0 10 0x4
- 0 11 0x4 >;
+ interrupts = <0 10 0x4>,
+ <0 11 0x4>;
status = "disabled";
};
@@ -272,8 +272,8 @@
compatible = "st,designware-i2s";
reg = <0xe0200000 0x1000>;
interrupt-names = "play_irq", "record_irq";
- interrupts = <0 26 0x4
- 0 53 0x4>;
+ interrupts = <0 26 0x4>,
+ <0 53 0x4>;
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-dbx5x0.dtsi b/sys/contrib/device-tree/src/arm/st/ste-dbx5x0.dtsi
index d5d88771ef97..0f87abeddc33 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-dbx5x0.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-dbx5x0.dtsi
@@ -425,7 +425,7 @@
gpio0: gpio@8012e000 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8012e000 0x80>;
+ reg = <0x8012e000 0x80>;
interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -440,7 +440,7 @@
gpio1: gpio@8012e080 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8012e080 0x80>;
+ reg = <0x8012e080 0x80>;
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -455,7 +455,7 @@
gpio2: gpio@8000e000 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8000e000 0x80>;
+ reg = <0x8000e000 0x80>;
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -470,7 +470,7 @@
gpio3: gpio@8000e080 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8000e080 0x80>;
+ reg = <0x8000e080 0x80>;
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -485,7 +485,7 @@
gpio4: gpio@8000e100 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8000e100 0x80>;
+ reg = <0x8000e100 0x80>;
interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -500,7 +500,7 @@
gpio5: gpio@8000e180 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8000e180 0x80>;
+ reg = <0x8000e180 0x80>;
interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -515,7 +515,7 @@
gpio6: gpio@8011e000 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8011e000 0x80>;
+ reg = <0x8011e000 0x80>;
interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -530,7 +530,7 @@
gpio7: gpio@8011e080 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0x8011e080 0x80>;
+ reg = <0x8011e080 0x80>;
interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -545,7 +545,7 @@
gpio8: gpio@a03fe000 {
compatible = "stericsson,db8500-gpio",
"st,nomadik-gpio";
- reg = <0xa03fe000 0x80>;
+ reg = <0xa03fe000 0x80>;
interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm/st/ste-href-ab8500.dtsi b/sys/contrib/device-tree/src/arm/st/ste-href-ab8500.dtsi
index e1de9d389a01..5eeb44c5e932 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-href-ab8500.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-href-ab8500.dtsi
@@ -9,6 +9,54 @@
soc {
prcmu@80157000 {
ab8500 {
+ phy {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&usb_a_1_default>;
+ pinctrl-1 = <&usb_a_1_sleep>;
+ };
+
+ regulator {
+ ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
+ regulator-name = "V-DISPLAY";
+ };
+
+ ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
+ regulator-name = "V-eMMC1";
+ };
+
+ ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
+ regulator-name = "V-MMC-SD";
+ };
+
+ ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
+ regulator-name = "V-INTCORE";
+ };
+
+ ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
+ regulator-name = "V-TVOUT";
+ };
+
+ ab8500_ldo_audio_reg: ab8500_ldo_audio {
+ regulator-name = "V-AUD";
+ };
+
+ ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
+ regulator-name = "V-AMIC1";
+ };
+
+ ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
+ regulator-name = "V-AMIC2";
+ };
+
+ ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
+ regulator-name = "V-DMIC";
+ };
+
+ ab8500_ldo_ana_reg: ab8500_ldo_ana {
+ regulator-name = "V-CSI/DSI";
+ };
+ };
+
gpio {
/* Hog a few default settings */
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/st/ste-href-ab8505.dtsi b/sys/contrib/device-tree/src/arm/st/ste-href-ab8505.dtsi
new file mode 100644
index 000000000000..268db68ccf87
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/st/ste-href-ab8505.dtsi
@@ -0,0 +1,490 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2023 Linus Walleij <linus.walleij@linaro.org>
+ */
+
+#include "ste-ab8505.dtsi"
+
+/ {
+ soc {
+ prcmu@80157000 {
+ ab8505 {
+ phy {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&usb_a_1_default>;
+ pinctrl-1 = <&usb_a_1_sleep>;
+ };
+
+ regulator {
+ ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
+ regulator-name = "V-DISPLAY";
+ };
+
+ ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
+ regulator-name = "V-eMMC1";
+ };
+
+ ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
+ regulator-name = "V-MMC-SD";
+ };
+
+ ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
+ regulator-name = "V-INTCORE";
+ };
+
+ ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
+ regulator-name = "V-TVOUT";
+ };
+
+ ab8500_ldo_audio_reg: ab8500_ldo_audio {
+ regulator-name = "V-AUD";
+ };
+
+ ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
+ regulator-name = "V-AMIC1";
+ };
+
+ ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
+ regulator-name = "V-AMIC2";
+ };
+
+ ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
+ regulator-name = "V-DMIC";
+ };
+
+ ab8500_ldo_ana_reg: ab8500_ldo_ana {
+ regulator-name = "V-CSI/DSI";
+ };
+ };
+
+ gpio {
+ /* Hog a few default settings */
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio2_default_mode>,
+ <&gpio4_default_mode>,
+ <&gpio10_default_mode>,
+ <&gpio11_default_mode>,
+ <&gpio12_default_mode>,
+ <&gpio13_default_mode>,
+ <&gpio16_default_mode>,
+ <&gpio24_default_mode>,
+ <&gpio25_default_mode>,
+ <&gpio36_default_mode>,
+ <&gpio37_default_mode>,
+ <&gpio38_default_mode>,
+ <&gpio39_default_mode>,
+ <&gpio42_default_mode>,
+ <&gpio26_default_mode>,
+ <&gpio35_default_mode>,
+ <&ycbcr_default_mode>,
+ <&pwm_default_mode>,
+ <&adi1_default_mode>,
+ <&usbuicc_default_mode>,
+ <&dmic_default_mode>,
+ <&extcpena_default_mode>,
+ <&modsclsda_default_mode>;
+
+ /*
+ * Pins 2, 4, 10, 11, 12, 13, 16, 24, 25, 36, 37, 38, 39 and 42
+ * are muxed in as GPIO, and configured as INPUT PULL DOWN
+ */
+ gpio2 {
+ gpio2_default_mode: gpio2_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio2_a_1";
+ };
+ default_cfg {
+ pins = "GPIO2_T9";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio4 {
+ gpio4_default_mode: gpio4_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio4_a_1";
+ };
+ default_cfg {
+ pins = "GPIO4_W2";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio10 {
+ gpio10_default_mode: gpio10_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio10_d_1";
+ };
+ default_cfg {
+ pins = "GPIO10_U17";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio11 {
+ gpio11_default_mode: gpio11_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio11_d_1";
+ };
+ default_cfg {
+ pins = "GPIO11_AA18";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio12 {
+ gpio12_default_mode: gpio12_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio12_d_1";
+ };
+ default_cfg {
+ pins = "GPIO12_U16";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio13 {
+ gpio13_default_mode: gpio13_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio13_d_1";
+ };
+ default_cfg {
+ pins = "GPIO13_W17";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio16 {
+ gpio16_default_mode: gpio16_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio16_a_1";
+ };
+ default_cfg {
+ pins = "GPIO16_F15";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio24 {
+ gpio24_default_mode: gpio24_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio24_a_1";
+ };
+ default_cfg {
+ pins = "GPIO24_T14";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio25 {
+ gpio25_default_mode: gpio25_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio25_a_1";
+ };
+ default_cfg {
+ pins = "GPIO25_R16";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio36 {
+ gpio36_default_mode: gpio36_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio36_a_1";
+ };
+ default_cfg {
+ pins = "GPIO36_A17";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio37 {
+ gpio37_default_mode: gpio37_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio37_a_1";
+ };
+ default_cfg {
+ pins = "GPIO37_E15";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio38 {
+ gpio38_default_mode: gpio38_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio38_a_1";
+ };
+ default_cfg {
+ pins = "GPIO38_C17";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio39 {
+ gpio39_default_mode: gpio39_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio39_a_1";
+ };
+ default_cfg {
+ pins = "GPIO39_E16";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ gpio42 {
+ gpio42_default_mode: gpio42_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio42_a_1";
+ };
+ default_cfg {
+ pins = "GPIO42_U2";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ /*
+ * Pins 26 and 35 muxed in as GPIO, and configured as OUTPUT LOW
+ */
+ gpio26 {
+ gpio26_default_mode: gpio26_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio26_d_1";
+ };
+ default_cfg {
+ pins = "GPIO26_M16";
+ output-low;
+ };
+ };
+ };
+ gpio35 {
+ gpio35_default_mode: gpio35_default {
+ default_mux {
+ function = "gpio";
+ groups = "gpio35_d_1";
+ };
+ default_cfg {
+ pins = "GPIO35_W15";
+ output-low;
+ };
+ };
+ };
+ /*
+ * This sets up the YCBCR connector pins, i.e. analog video out.
+ * Set as input with no bias.
+ */
+ ycbcr {
+ ycbcr_default_mode: ycbcr_default {
+ default_mux {
+ function = "ycbcr";
+ groups = "ycbcr0123_d_1";
+ };
+ default_cfg {
+ pins = "GPIO6_Y18",
+ "GPIO7_AA20",
+ "GPIO8_W18",
+ "GPIO9_AA19";
+ input-enable;
+ bias-disable;
+ };
+ };
+ };
+ /* This sets up the PWM pins 14 and 15 */
+ pwm {
+ pwm_default_mode: pwm_default {
+ default_mux {
+ function = "pwmout";
+ groups = "pwmout1_d_1", "pwmout2_d_1";
+ };
+ default_cfg {
+ pins = "GPIO14_F14",
+ "GPIO15_B17";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ /* This sets up audio interface 1 */
+ adi1 {
+ adi1_default_mode: adi1_default {
+ default_mux {
+ function = "adi1";
+ groups = "adi1_d_1";
+ };
+ default_cfg {
+ pins = "GPIO17_P5",
+ "GPIO18_R5",
+ "GPIO19_U5",
+ "GPIO20_T5";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ /* This sets up the USB UICC pins */
+ usbuicc {
+ usbuicc_default_mode: usbuicc_default {
+ default_mux {
+ function = "usbuicc";
+ groups = "usbuicc_d_1";
+ };
+ default_cfg {
+ pins = "GPIO21_H19",
+ "GPIO22_G20",
+ "GPIO23_G19";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ /* This sets up the microphone pins */
+ dmic {
+ dmic_default_mode: dmic_default {
+ default_mux {
+ function = "dmic";
+ groups = "dmic12_d_1",
+ "dmic34_d_1",
+ "dmic56_d_1";
+ };
+ default_cfg {
+ pins = "GPIO27_J6",
+ "GPIO28_K6",
+ "GPIO29_G6",
+ "GPIO30_H6",
+ "GPIO31_F5",
+ "GPIO32_G5";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ extcpena {
+ extcpena_default_mode: extcpena_default {
+ default_mux {
+ function = "extcpena";
+ groups = "extcpena_d_1";
+ };
+ default_cfg {
+ pins = "GPIO34_R17";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ /* Modem I2C setup (SCL and SDA pins) */
+ modsclsda {
+ modsclsda_default_mode: modsclsda_default {
+ default_mux {
+ function = "modsclsda";
+ groups = "modsclsda_d_1";
+ };
+ default_cfg {
+ pins = "GPIO40_T19",
+ "GPIO41_U19";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ /*
+ * Clock output pins associated with regulators.
+ */
+ sysclkreq2 {
+ sysclkreq2_default_mode: sysclkreq2_default {
+ default_mux {
+ function = "sysclkreq";
+ groups = "sysclkreq2_d_1";
+ };
+ default_cfg {
+ pins = "GPIO1_T10";
+ input-enable;
+ bias-disable;
+ };
+ };
+ sysclkreq2_sleep_mode: sysclkreq2_sleep {
+ default_mux {
+ function = "gpio";
+ groups = "gpio1_a_1";
+ };
+ default_cfg {
+ pins = "GPIO1_T10";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ sysclkreq4 {
+ sysclkreq4_default_mode: sysclkreq4_default {
+ default_mux {
+ function = "sysclkreq";
+ groups = "sysclkreq4_d_1";
+ };
+ default_cfg {
+ pins = "GPIO3_U9";
+ input-enable;
+ bias-disable;
+ };
+ };
+ sysclkreq4_sleep_mode: sysclkreq4_sleep {
+ default_mux {
+ function = "gpio";
+ groups = "gpio3_a_1";
+ };
+ default_cfg {
+ pins = "GPIO3_U9";
+ input-enable;
+ bias-pull-down;
+ };
+ };
+ };
+ };
+ /*
+ * Charging is not working on the HREF unless an actual battery is
+ * mounted, most HREFs have a DC cable in to the "battery power"
+ * which means this will only be cofusing. So do not enable charging
+ * of the HREFs.
+ */
+ ab8500_fg {
+ status = "disabled";
+ };
+ ab8500_btemp {
+ status = "disabled";
+ };
+ ab8500_charger {
+ status = "disabled";
+ };
+ ab8500_chargalg {
+ status = "disabled";
+ };
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-href-tvk1281618-r2.dtsi b/sys/contrib/device-tree/src/arm/st/ste-href-tvk1281618-r2.dtsi
index 37e59403c01f..7448135e25f6 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-href-tvk1281618-r2.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-href-tvk1281618-r2.dtsi
@@ -192,7 +192,7 @@
#size-cells = <0>;
reg = <0x4b>;
vdd-supply = <&ab8500_ldo_aux1_reg>;
- vddio-supply = <&db8500_vsmps2_reg>;
+ vio-supply = <&db8500_vsmps2_reg>;
pinctrl-names = "default";
pinctrl-0 = <&synaptics_tvk_mode>;
interrupt-parent = <&gpio2>;
@@ -200,7 +200,7 @@
rmi4-f01@1 {
reg = <0x1>;
- syna,nosleep = <1>;
+ syna,nosleep-mode = <1>;
};
rmi4-f11@11 {
reg = <0x11>;
diff --git a/sys/contrib/device-tree/src/arm/st/ste-href.dtsi b/sys/contrib/device-tree/src/arm/st/ste-href.dtsi
index 13b11dbeba1c..fbf0309e108f 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-href.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-href.dtsi
@@ -242,61 +242,6 @@
status = "okay";
};
- prcmu@80157000 {
- ab8500 {
- gpio {
- };
-
- phy {
- pinctrl-names = "default", "sleep";
- pinctrl-0 = <&usb_a_1_default>;
- pinctrl-1 = <&usb_a_1_sleep>;
- };
-
- regulator {
- ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
- regulator-name = "V-DISPLAY";
- };
-
- ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
- regulator-name = "V-eMMC1";
- };
-
- ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
- regulator-name = "V-MMC-SD";
- };
-
- ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
- regulator-name = "V-INTCORE";
- };
-
- ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
- regulator-name = "V-TVOUT";
- };
-
- ab8500_ldo_audio_reg: ab8500_ldo_audio {
- regulator-name = "V-AUD";
- };
-
- ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
- regulator-name = "V-AMIC1";
- };
-
- ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
- regulator-name = "V-AMIC2";
- };
-
- ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
- regulator-name = "V-DMIC";
- };
-
- ab8500_ldo_ana_reg: ab8500_ldo_ana {
- regulator-name = "V-CSI/DSI";
- };
- };
- };
- };
-
pinctrl {
sdi0 {
sdi0_default_mode: sdi0_default {
diff --git a/sys/contrib/device-tree/src/arm/st/ste-href520-tvk.dts b/sys/contrib/device-tree/src/arm/st/ste-href520-tvk.dts
index 4201547c5988..5677df43c3ac 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-href520-tvk.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-href520-tvk.dts
@@ -5,6 +5,7 @@
/dts-v1/;
#include "ste-db8520.dtsi"
+#include "ste-href-ab8505.dtsi"
#include "ste-hrefv60plus.dtsi"
#include "ste-href-tvk1281618-r3.dtsi"
@@ -28,7 +29,7 @@
2900000 0x0>;
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
- enable-gpio = <&gpio2 14 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-stuib.dts b/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-stuib.dts
index dfc933214c1a..b142bb2d38d8 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-stuib.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-stuib.dts
@@ -5,6 +5,7 @@
/dts-v1/;
#include "ste-db8500.dtsi"
+#include "ste-href-ab8500.dtsi"
#include "ste-hrefprev60.dtsi"
#include "ste-href-stuib.dtsi"
@@ -27,7 +28,7 @@
2900000 0x0>;
gpios = <&tc3589x_gpio 18 GPIO_ACTIVE_HIGH>;
- enable-gpio = <&tc3589x_gpio 17 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&tc3589x_gpio 17 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-tvk.dts b/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-tvk.dts
index 75506339a93c..5da1ff41b00e 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-tvk.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-hrefprev60-tvk.dts
@@ -5,6 +5,7 @@
/dts-v1/;
#include "ste-db8500.dtsi"
+#include "ste-href-ab8500.dtsi"
#include "ste-hrefprev60.dtsi"
#include "ste-href-tvk1281618-r2.dtsi"
@@ -27,7 +28,7 @@
2900000 0x0>;
gpios = <&tc3589x_gpio 18 GPIO_ACTIVE_HIGH>;
- enable-gpio = <&tc3589x_gpio 17 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&tc3589x_gpio 17 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-hrefprev60.dtsi b/sys/contrib/device-tree/src/arm/st/ste-hrefprev60.dtsi
index 9859ee91a15e..c87fd27b4434 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-hrefprev60.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-hrefprev60.dtsi
@@ -62,7 +62,7 @@
// External Micro SD slot
mmc@80126000 {
- cd-gpios = <&tc3589x_gpio 3 GPIO_ACTIVE_HIGH>;
+ cd-gpios = <&tc3589x_gpio 3 GPIO_ACTIVE_HIGH>;
};
pinctrl {
diff --git a/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-stuib.dts b/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-stuib.dts
index 52c56ed17ae6..c4abe24a7cd0 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-stuib.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-stuib.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include "ste-db8500.dtsi"
+#include "ste-href-ab8500.dtsi"
#include "ste-hrefv60plus.dtsi"
#include "ste-href-stuib.dtsi"
@@ -29,7 +30,7 @@
2900000 0x0>;
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
- enable-gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-tvk.dts b/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-tvk.dts
index 2db2f8be8b03..f55e8de2b516 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-tvk.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus-tvk.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include "ste-db8500.dtsi"
+#include "ste-href-ab8500.dtsi"
#include "ste-hrefv60plus.dtsi"
#include "ste-href-tvk1281618-r2.dtsi"
@@ -29,7 +30,7 @@
2900000 0x0>;
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
- enable-gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus.dtsi b/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus.dtsi
index e66fa59c2de6..b23966c16a32 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-hrefv60plus.dtsi
@@ -3,7 +3,6 @@
* Copyright 2012 ST-Ericsson AB
*/
-#include "ste-href-ab8500.dtsi"
#include "ste-href.dtsi"
/ {
@@ -191,7 +190,7 @@
// External Micro SD slot
mmc@80126000 {
- cd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; // 95
+ cd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; // 95
};
pinctrl {
diff --git a/sys/contrib/device-tree/src/arm/st/ste-nomadik-stn8815.dtsi b/sys/contrib/device-tree/src/arm/st/ste-nomadik-stn8815.dtsi
index 6816eef39d45..4d37c5fb553c 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-nomadik-stn8815.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/ste-nomadik-stn8815.dtsi
@@ -52,7 +52,7 @@
gpio0: gpio@101e4000 {
compatible = "st,nomadik-gpio";
- reg = <0x101e4000 0x80>;
+ reg = <0x101e4000 0x80>;
interrupt-parent = <&vica>;
interrupts = <6>;
interrupt-controller;
@@ -66,7 +66,7 @@
gpio1: gpio@101e5000 {
compatible = "st,nomadik-gpio";
- reg = <0x101e5000 0x80>;
+ reg = <0x101e5000 0x80>;
interrupt-parent = <&vica>;
interrupts = <7>;
interrupt-controller;
@@ -80,7 +80,7 @@
gpio2: gpio@101e6000 {
compatible = "st,nomadik-gpio";
- reg = <0x101e6000 0x80>;
+ reg = <0x101e6000 0x80>;
interrupt-parent = <&vica>;
interrupts = <8>;
interrupt-controller;
@@ -94,7 +94,7 @@
gpio3: gpio@101e7000 {
compatible = "st,nomadik-gpio";
- reg = <0x101e7000 0x80>;
+ reg = <0x101e7000 0x80>;
ngpio = <28>;
interrupt-parent = <&vica>;
interrupts = <9>;
diff --git a/sys/contrib/device-tree/src/arm/st/ste-snowball.dts b/sys/contrib/device-tree/src/arm/st/ste-snowball.dts
index 9a3d6546399d..1322abfc7acf 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-snowball.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-snowball.dts
@@ -229,7 +229,7 @@
/* GPIO228 SD_SEL */
gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
/* GPIO217 MMC_EN */
- enable-gpio = <&gpio6 25 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-min-microvolt = <1800000>;
@@ -266,7 +266,7 @@
pinctrl-1 = <&mc0_a_1_sleep>;
/* GPIO218 MMC_CD */
- cd-gpios = <&gpio6 26 GPIO_ACTIVE_LOW>;
+ cd-gpios = <&gpio6 26 GPIO_ACTIVE_LOW>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina-tmo.dts b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina-tmo.dts
index 463942ae755e..c623cc35c5ea 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina-tmo.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina-tmo.dts
@@ -310,7 +310,7 @@
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc0_a_2_default>;
pinctrl-1 = <&mc0_a_2_sleep>;
- cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
+ cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina.dts b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina.dts
index c1ae0e23fe45..2355ca6e9ad6 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-codina.dts
@@ -402,7 +402,7 @@
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc0_a_2_default>;
pinctrl-1 = <&mc0_a_2_sleep>;
- cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
+ cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-gavini.dts b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-gavini.dts
index b21e40da3dfd..ad9a20ccaaeb 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-gavini.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-gavini.dts
@@ -362,7 +362,7 @@
pinctrl-0 = <&mc0_a_2_default>;
pinctrl-1 = <&mc0_a_2_sleep>;
/* "flash detect" actually card detect */
- cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>;
+ cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-janice.dts b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-janice.dts
index 6e586e875565..229f7c32103c 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-janice.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-janice.dts
@@ -412,7 +412,7 @@
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc0_a_2_default>;
pinctrl-1 = <&mc0_a_2_sleep>;
- cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
+ cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-kyle.dts b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-kyle.dts
index ba4421080b2a..cdb147dcc1db 100644
--- a/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-kyle.dts
+++ b/sys/contrib/device-tree/src/arm/st/ste-ux500-samsung-kyle.dts
@@ -238,7 +238,7 @@
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mc0_a_1_default>;
pinctrl-1 = <&mc0_a_1_sleep>;
- cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
+ cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stih407-family.dtsi b/sys/contrib/device-tree/src/arm/st/stih407-family.dtsi
index 3f58383a7b59..29302e74aa1d 100644
--- a/sys/contrib/device-tree/src/arm/st/stih407-family.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stih407-family.dtsi
@@ -111,7 +111,6 @@
regulator-min-microvolt = <784000>;
regulator-max-microvolt = <1299000>;
regulator-always-on;
- max-duty-cycle = <255>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stih418-b2264.dts b/sys/contrib/device-tree/src/arm/st/stih418-b2264.dts
index fc32a03073b6..fdc16e9f5822 100644
--- a/sys/contrib/device-tree/src/arm/st/stih418-b2264.dts
+++ b/sys/contrib/device-tree/src/arm/st/stih418-b2264.dts
@@ -69,19 +69,19 @@
};
aliases {
- ttyAS0 = &sbc_serial0;
+ serial0 = &sbc_serial0;
ethernet0 = &ethernet0;
};
- soc {
- leds {
- compatible = "gpio-leds";
- led-green {
- gpios = <&pio1 3 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
+ leds {
+ compatible = "gpio-leds";
+ led-green {
+ gpios = <&pio1 3 GPIO_ACTIVE_LOW>;
+ default-state = "off";
};
+ };
+ soc {
pin-controller-sbc@961f080 {
gmac1 {
rgmii1-0 {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32429i-eval.dts b/sys/contrib/device-tree/src/arm/st/stm32429i-eval.dts
index 576235ec3c51..afa417b34b25 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32429i-eval.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32429i-eval.dts
@@ -222,7 +222,6 @@
reg = <0x42>;
interrupts = <8 3>;
interrupt-parent = <&gpioi>;
- interrupt-controller;
wakeup-source;
stmpegpio: stmpe_gpio {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32746g-eval.dts b/sys/contrib/device-tree/src/arm/st/stm32746g-eval.dts
index a293e65141c6..e9ac37b6eca0 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32746g-eval.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32746g-eval.dts
@@ -188,9 +188,10 @@
status = "okay";
vmmc-supply = <&mmc_vcard>;
broken-cd;
- pinctrl-names = "default", "opendrain";
+ pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdio_pins_a>;
pinctrl-1 = <&sdio_pins_od_a>;
+ pinctrl-2 = <&sdio_pins_sleep_a>;
bus-width = <4>;
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f469-disco.dts b/sys/contrib/device-tree/src/arm/st/stm32f469-disco.dts
index cbbd521bf010..8a4f8ddd083d 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f469-disco.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32f469-disco.dts
@@ -69,16 +69,9 @@
serial0 = &usart3;
};
- mmc_vcard: mmc_vcard {
+ vcc_3v3: vcc-3v3 {
compatible = "regulator-fixed";
- regulator-name = "mmc_vcard";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-
- vdd_dsi: vdd-dsi {
- compatible = "regulator-fixed";
- regulator-name = "vdd_dsi";
+ regulator-name = "vcc_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
@@ -164,7 +157,7 @@
compatible = "orisetech,otm8009a";
reg = <0>; /* dsi virtual channel (0..3) */
reset-gpios = <&gpioh 7 GPIO_ACTIVE_LOW>;
- power-supply = <&vdd_dsi>;
+ power-supply = <&vcc_3v3>;
status = "okay";
port {
@@ -219,7 +212,7 @@
&sdio {
status = "okay";
- vmmc-supply = <&mmc_vcard>;
+ vmmc-supply = <&vcc_3v3>;
cd-gpios = <&gpiog 2 GPIO_ACTIVE_LOW>;
broken-cd;
pinctrl-names = "default", "opendrain";
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f7-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/st/stm32f7-pinctrl.dtsi
index 9f65403295ca..97fc3fb5a9ca 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f7-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32f7-pinctrl.dtsi
@@ -171,6 +171,16 @@
};
};
+ i2c3_pins_a: i2c3-0 {
+ pins {
+ pinmux = <STM32_PINMUX('H', 8, AF4)>, /* I2C3_SDA */
+ <STM32_PINMUX('H', 7, AF4)>; /* I2C3_SCL */
+ bias-disable;
+ drive-open-drain;
+ slew-rate = <0>;
+ };
+ };
+
usbotg_hs_pins_a: usbotg-hs-0 {
pins {
pinmux = <STM32_PINMUX('H', 4, AF10)>, /* OTG_HS_ULPI_NXT */
@@ -253,6 +263,17 @@
};
};
+ sdio_pins_sleep_a: sdio-pins-sleep-a-0 {
+ pins {
+ pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1 D0 */
+ <STM32_PINMUX('C', 9, ANALOG)>, /* SDMMC1 D1 */
+ <STM32_PINMUX('C', 10, ANALOG)>, /* SDMMC1 D2 */
+ <STM32_PINMUX('C', 11, ANALOG)>, /* SDMMC1 D3 */
+ <STM32_PINMUX('C', 12, ANALOG)>, /* SDMMC1 CLK */
+ <STM32_PINMUX('D', 2, ANALOG)>; /* SDMMC1 CMD */
+ };
+ };
+
sdio_pins_b: sdio-pins-b-0 {
pins {
pinmux = <STM32_PINMUX('G', 9, AF11)>, /* SDMMC2 D0 */
@@ -284,6 +305,17 @@
};
};
+ sdio_pins_sleep_b: sdio-pins-sleep-b-0 {
+ pins {
+ pinmux = <STM32_PINMUX('G', 9, ANALOG)>, /* SDMMC2 D0 */
+ <STM32_PINMUX('G', 10, ANALOG)>, /* SDMMC2 D1 */
+ <STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC2 D2 */
+ <STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC2 D3 */
+ <STM32_PINMUX('D', 6, ANALOG)>, /* SDMMC2 CLK */
+ <STM32_PINMUX('D', 7, ANALOG)>; /* SDMMC2 CMD */
+ };
+ };
+
can1_pins_a: can1-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 12, AF9)>; /* CAN1_TX */
@@ -365,6 +397,40 @@
bias-pull-up;
};
};
+
+ ltdc_pins_a: ltdc-0 {
+ pins {
+ pinmux = <STM32_PINMUX('E', 4, AF14)>, /* LCD_B0 */
+ <STM32_PINMUX('G',12, AF9)>, /* LCD_B4 */
+ <STM32_PINMUX('I', 9, AF14)>, /* LCD_VSYNC */
+ <STM32_PINMUX('I',10, AF14)>, /* LCD_HSYNC */
+ <STM32_PINMUX('I',14, AF14)>, /* LCD_CLK */
+ <STM32_PINMUX('I',15, AF14)>, /* LCD_R0 */
+ <STM32_PINMUX('J', 0, AF14)>, /* LCD_R1 */
+ <STM32_PINMUX('J', 1, AF14)>, /* LCD_R2 */
+ <STM32_PINMUX('J', 2, AF14)>, /* LCD_R3 */
+ <STM32_PINMUX('J', 3, AF14)>, /* LCD_R4 */
+ <STM32_PINMUX('J', 4, AF14)>, /* LCD_R5 */
+ <STM32_PINMUX('J', 5, AF14)>, /* LCD_R6 */
+ <STM32_PINMUX('J', 6, AF14)>, /* LCD_R7 */
+ <STM32_PINMUX('J', 7, AF14)>, /* LCD_G0 */
+ <STM32_PINMUX('J', 8, AF14)>, /* LCD_G1 */
+ <STM32_PINMUX('J', 9, AF14)>, /* LCD_G2 */
+ <STM32_PINMUX('J',10, AF14)>, /* LCD_G3 */
+ <STM32_PINMUX('J',11, AF14)>, /* LCD_G4 */
+ <STM32_PINMUX('J',13, AF14)>, /* LCD_B1 */
+ <STM32_PINMUX('J',14, AF14)>, /* LCD_B2 */
+ <STM32_PINMUX('J',15, AF14)>, /* LCD_B3 */
+ <STM32_PINMUX('K', 0, AF14)>, /* LCD_G5 */
+ <STM32_PINMUX('K', 1, AF14)>, /* LCD_G6 */
+ <STM32_PINMUX('K', 2, AF14)>, /* LCD_G7 */
+ <STM32_PINMUX('K', 4, AF14)>, /* LCD_B5 */
+ <STM32_PINMUX('K', 5, AF14)>, /* LCD_B6 */
+ <STM32_PINMUX('K', 6, AF14)>, /* LCD_B7 */
+ <STM32_PINMUX('K', 7, AF14)>; /* LCD_DE */
+ slew-rate = <2>;
+ };
+ };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f746-disco.dts b/sys/contrib/device-tree/src/arm/st/stm32f746-disco.dts
index c11616ed5fc6..087de6f09629 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f746-disco.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32f746-disco.dts
@@ -43,8 +43,9 @@
/dts-v1/;
#include "stm32f746.dtsi"
#include "stm32f746-pinctrl.dtsi"
-#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "STMicroelectronics STM32F746-DISCO board";
@@ -60,6 +61,19 @@
reg = <0xC0000000 0x800000>;
};
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ no-map;
+ size = <0x80000>;
+ linux,dma-default;
+ };
+ };
+
aliases {
serial0 = &usart1;
};
@@ -79,12 +93,31 @@
regulator-always-on;
};
- mmc_vcard: mmc_vcard {
+ vcc_3v3: vcc-3v3 {
compatible = "regulator-fixed";
- regulator-name = "mmc_vcard";
+ regulator-name = "vcc_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
+
+ backlight: backlight {
+ compatible = "gpio-backlight";
+ gpios = <&gpiok 3 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ panel_rgb: panel-rgb {
+ compatible = "rocktech,rk043fn48h";
+ power-supply = <&vcc_3v3>;
+ backlight = <&backlight>;
+ enable-gpios = <&gpioi 12 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ port {
+ panel_in_rgb: endpoint {
+ remote-endpoint = <&ltdc_out_rgb>;
+ };
+ };
+ };
};
&clk_hse {
@@ -99,13 +132,42 @@
status = "okay";
};
+&i2c3 {
+ pinctrl-0 = <&i2c3_pins_a>;
+ pinctrl-names = "default";
+ clock-frequency = <400000>;
+ status = "okay";
+
+ touchscreen@38 {
+ compatible = "edt,edt-ft5306";
+ reg = <0x38>;
+ interrupt-parent = <&gpioi>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+ touchscreen-size-x = <480>;
+ touchscreen-size-y = <272>;
+ };
+};
+
+&ltdc {
+ pinctrl-0 = <&ltdc_pins_a>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ port {
+ ltdc_out_rgb: endpoint {
+ remote-endpoint = <&panel_in_rgb>;
+ };
+ };
+};
+
&sdio1 {
status = "okay";
- vmmc-supply = <&mmc_vcard>;
+ vmmc-supply = <&vcc_3v3>;
cd-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default", "opendrain";
+ pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdio_pins_a>;
pinctrl-1 = <&sdio_pins_od_a>;
+ pinctrl-2 = <&sdio_pins_sleep_a>;
bus-width = <4>;
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f746-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/st/stm32f746-pinctrl.dtsi
index 781197ef42d6..139f72b790c0 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f746-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32f746-pinctrl.dtsi
@@ -8,4 +8,48 @@
&pinctrl {
compatible = "st,stm32f746-pinctrl";
+
+ gpioa: gpio@40020000 {
+ gpio-ranges = <&pinctrl 0 0 16>;
+ };
+
+ gpiob: gpio@40020400 {
+ gpio-ranges = <&pinctrl 0 16 16>;
+ };
+
+ gpioc: gpio@40020800 {
+ gpio-ranges = <&pinctrl 0 32 16>;
+ };
+
+ gpiod: gpio@40020c00 {
+ gpio-ranges = <&pinctrl 0 48 16>;
+ };
+
+ gpioe: gpio@40021000 {
+ gpio-ranges = <&pinctrl 0 64 16>;
+ };
+
+ gpiof: gpio@40021400 {
+ gpio-ranges = <&pinctrl 0 80 16>;
+ };
+
+ gpiog: gpio@40021800 {
+ gpio-ranges = <&pinctrl 0 96 16>;
+ };
+
+ gpioh: gpio@40021c00 {
+ gpio-ranges = <&pinctrl 0 112 16>;
+ };
+
+ gpioi: gpio@40022000 {
+ gpio-ranges = <&pinctrl 0 128 16>;
+ };
+
+ gpioj: gpio@40022400 {
+ gpio-ranges = <&pinctrl 0 144 16>;
+ };
+
+ gpiok: gpio@40022800 {
+ gpio-ranges = <&pinctrl 0 160 8>;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f746.dtsi b/sys/contrib/device-tree/src/arm/st/stm32f746.dtsi
index d1802efd067c..65c72b6fcc83 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f746.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32f746.dtsi
@@ -257,6 +257,43 @@
status = "disabled";
};
+ can3: can@40003400 {
+ compatible = "st,stm32f4-bxcan";
+ reg = <0x40003400 0x200>;
+ interrupts = <104>, <105>, <106>, <107>;
+ interrupt-names = "tx", "rx0", "rx1", "sce";
+ resets = <&rcc STM32F7_APB1_RESET(CAN3)>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN3)>;
+ st,gcan = <&gcan3>;
+ status = "disabled";
+ };
+
+ gcan3: gcan@40003600 {
+ compatible = "st,stm32f4-gcan", "syscon";
+ reg = <0x40003600 0x200>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN3)>;
+ };
+
+ spi2: spi@40003800 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "st,stm32f7-spi";
+ reg = <0x40003800 0x400>;
+ interrupts = <36>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(SPI2)>;
+ status = "disabled";
+ };
+
+ spi3: spi@40003c00 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "st,stm32f7-spi";
+ reg = <0x40003c00 0x400>;
+ interrupts = <51>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(SPI3)>;
+ status = "disabled";
+ };
+
usart2: serial@40004400 {
compatible = "st,stm32f7-uart";
reg = <0x40004400 0x400>;
@@ -337,6 +374,36 @@
status = "disabled";
};
+ can1: can@40006400 {
+ compatible = "st,stm32f4-bxcan";
+ reg = <0x40006400 0x200>;
+ interrupts = <19>, <20>, <21>, <22>;
+ interrupt-names = "tx", "rx0", "rx1", "sce";
+ resets = <&rcc STM32F7_APB1_RESET(CAN1)>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN1)>;
+ st,can-primary;
+ st,gcan = <&gcan1>;
+ status = "disabled";
+ };
+
+ gcan1: gcan@40006600 {
+ compatible = "st,stm32f4-gcan", "syscon";
+ reg = <0x40006600 0x200>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN1)>;
+ };
+
+ can2: can@40006800 {
+ compatible = "st,stm32f4-bxcan";
+ reg = <0x40006800 0x200>;
+ interrupts = <63>, <64>, <65>, <66>;
+ interrupt-names = "tx", "rx0", "rx1", "sce";
+ resets = <&rcc STM32F7_APB1_RESET(CAN2)>;
+ clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN2)>;
+ st,can-secondary;
+ st,gcan = <&gcan1>;
+ status = "disabled";
+ };
+
cec: cec@40006c00 {
compatible = "st,stm32-cec";
reg = <0x40006C00 0x400>;
@@ -444,9 +511,30 @@
status = "disabled";
};
+ spi1: spi@40013000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "st,stm32f7-spi";
+ reg = <0x40013000 0x400>;
+ interrupts = <35>;
+ clocks = <&rcc 0 STM32F7_APB2_CLOCK(SPI1)>;
+ status = "disabled";
+ };
+
+ spi4: spi@40013400 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "st,stm32f7-spi";
+ reg = <0x40013400 0x400>;
+ interrupts = <84>;
+ clocks = <&rcc 0 STM32F7_APB2_CLOCK(SPI4)>;
+ status = "disabled";
+ };
+
syscfg: syscon@40013800 {
compatible = "st,stm32-syscfg", "syscon";
reg = <0x40013800 0x400>;
+ clocks = <&rcc 0 STM32F7_APB2_CLOCK(SYSCFG)>;
};
exti: interrupt-controller@40013c00 {
@@ -507,6 +595,36 @@
};
};
+ spi5: spi@40015000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "st,stm32f7-spi";
+ reg = <0x40015000 0x400>;
+ interrupts = <85>;
+ clocks = <&rcc 0 STM32F7_APB2_CLOCK(SPI5)>;
+ status = "disabled";
+ };
+
+ spi6: spi@40015400 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "st,stm32f7-spi";
+ reg = <0x40015400 0x400>;
+ interrupts = <86>;
+ clocks = <&rcc 0 STM32F7_APB2_CLOCK(SPI6)>;
+ status = "disabled";
+ };
+
+ ltdc: display-controller@40016800 {
+ compatible = "st,stm32-ltdc";
+ reg = <0x40016800 0x200>;
+ interrupts = <88>, <89>;
+ resets = <&rcc STM32F7_APB2_RESET(LTDC)>;
+ clocks = <&rcc 1 CLK_LCD>;
+ clock-names = "lcd";
+ status = "disabled";
+ };
+
pwrcfg: power-config@40007000 {
compatible = "st,stm32-power-config", "syscon";
reg = <0x40007000 0x400>;
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f769-disco.dts b/sys/contrib/device-tree/src/arm/st/stm32f769-disco.dts
index b038d0ed39e8..5d12ae25b327 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f769-disco.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32f769-disco.dts
@@ -131,9 +131,10 @@
vmmc-supply = <&mmc_vcard>;
cd-gpios = <&gpioi 15 GPIO_ACTIVE_LOW>;
broken-cd;
- pinctrl-names = "default", "opendrain";
+ pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdio_pins_b>;
pinctrl-1 = <&sdio_pins_od_b>;
+ pinctrl-2 = <&sdio_pins_sleep_b>;
bus-width = <4>;
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32f769-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/st/stm32f769-pinctrl.dtsi
index c26abc04e2ce..02c2a8b08468 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32f769-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32f769-pinctrl.dtsi
@@ -8,4 +8,48 @@
&pinctrl {
compatible = "st,stm32f769-pinctrl";
+
+ gpioa: gpio@40020000 {
+ gpio-ranges = <&pinctrl 0 0 16>;
+ };
+
+ gpiob: gpio@40020400 {
+ gpio-ranges = <&pinctrl 0 16 16>;
+ };
+
+ gpioc: gpio@40020800 {
+ gpio-ranges = <&pinctrl 0 32 16>;
+ };
+
+ gpiod: gpio@40020c00 {
+ gpio-ranges = <&pinctrl 0 48 16>;
+ };
+
+ gpioe: gpio@40021000 {
+ gpio-ranges = <&pinctrl 0 64 16>;
+ };
+
+ gpiof: gpio@40021400 {
+ gpio-ranges = <&pinctrl 0 80 16>;
+ };
+
+ gpiog: gpio@40021800 {
+ gpio-ranges = <&pinctrl 0 96 16>;
+ };
+
+ gpioh: gpio@40021c00 {
+ gpio-ranges = <&pinctrl 0 112 16>;
+ };
+
+ gpioi: gpio@40022000 {
+ gpio-ranges = <&pinctrl 0 128 16>;
+ };
+
+ gpioj: gpio@40022400 {
+ gpio-ranges = <&pinctrl 0 144 16>;
+ };
+
+ gpiok: gpio@40022800 {
+ gpio-ranges = <&pinctrl 0 160 8>;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp131.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp131.dtsi
index d163c267e34c..b04d24c939c3 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp131.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp131.dtsi
@@ -33,6 +33,8 @@
optee {
method = "smc";
compatible = "linaro,optee-tz";
+ interrupt-parent = <&intc>;
+ interrupts = <GIC_PPI 15 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>;
};
scmi: scmi {
@@ -40,7 +42,6 @@
#address-cells = <1>;
#size-cells = <0>;
linaro,optee-channel-id = <0>;
- shmem = <&scmi_shm>;
scmi_clk: protocol@14 {
reg = <0x14>;
@@ -51,6 +52,28 @@
reg = <0x16>;
#reset-cells = <1>;
};
+
+ scmi_voltd: protocol@17 {
+ reg = <0x17>;
+
+ scmi_regu: regulators {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ scmi_reg11: regulator@0 {
+ reg = <VOLTD_SCMI_REG11>;
+ regulator-name = "reg11";
+ };
+ scmi_reg18: regulator@1 {
+ reg = <VOLTD_SCMI_REG18>;
+ regulator-name = "reg18";
+ };
+ scmi_usb33: regulator@2 {
+ reg = <VOLTD_SCMI_USB33>;
+ regulator-name = "usb33";
+ };
+ };
+ };
};
};
@@ -77,28 +100,6 @@
always-on;
};
- /* PWR 1v1, 1v8 and 3v3 regulators defined as fixed, waiting for SCMI */
- reg11: reg11 {
- compatible = "regulator-fixed";
- regulator-name = "reg11";
- regulator-min-microvolt = <1100000>;
- regulator-max-microvolt = <1100000>;
- };
-
- reg18: reg18 {
- compatible = "regulator-fixed";
- regulator-name = "reg18";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
-
- usb33: usb33 {
- compatible = "regulator-fixed";
- regulator-name = "usb33";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -106,19 +107,6 @@
interrupt-parent = <&intc>;
ranges;
- scmi_sram: sram@2ffff000 {
- compatible = "mmio-sram";
- reg = <0x2ffff000 0x1000>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0 0x2ffff000 0x1000>;
-
- scmi_shm: scmi-sram@0 {
- compatible = "arm,scmi-shmem";
- reg = <0 0x80>;
- };
- };
-
timers2: timer@40000000 {
#address-cells = <1>;
#size-cells = <0>;
@@ -813,7 +801,7 @@
g-tx-fifo-size = <256 16 16 16 16 16 16 16>;
dr_mode = "otg";
otg-rev = <0x200>;
- usb33d-supply = <&usb33>;
+ usb33d-supply = <&scmi_usb33>;
status = "disabled";
};
@@ -1222,6 +1210,25 @@
};
};
+ hash: hash@54003000 {
+ compatible = "st,stm32mp13-hash";
+ reg = <0x54003000 0x400>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&rcc HASH1>;
+ resets = <&rcc HASH1_R>;
+ dmas = <&mdma 30 0x2 0x1000a02 0x0 0x0>;
+ dma-names = "in";
+ status = "disabled";
+ };
+
+ rng: rng@54004000 {
+ compatible = "st,stm32mp13-rng";
+ reg = <0x54004000 0x400>;
+ clocks = <&rcc RNG1_K>;
+ resets = <&rcc RNG1_R>;
+ status = "disabled";
+ };
+
mdma: dma-controller@58000000 {
compatible = "st,stm32h7-mdma";
reg = <0x58000000 0x1000>;
@@ -1343,8 +1350,8 @@
reg = <0x5a006000 0x1000>;
clocks = <&rcc USBPHY_K>;
resets = <&rcc USBPHY_R>;
- vdda1v1-supply = <&reg11>;
- vdda1v8-supply = <&reg18>;
+ vdda1v1-supply = <&scmi_reg11>;
+ vdda1v8-supply = <&scmi_reg18>;
status = "disabled";
usbphyc_port0: usb-phy@0 {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp135.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp135.dtsi
index abf2acd37b4e..68d32f9f5314 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp135.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp135.dtsi
@@ -8,5 +8,16 @@
/ {
soc {
+ dcmipp: dcmipp@5a000000 {
+ compatible = "st,stm32mp13-dcmipp";
+ reg = <0x5a000000 0x400>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rcc DCMIPP_R>;
+ clocks = <&rcc DCMIPP_K>;
+ status = "disabled";
+
+ port {
+ };
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp135f-dk.dts b/sys/contrib/device-tree/src/arm/st/stm32mp135f-dk.dts
index f0900ca672b5..eea740d097c7 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp135f-dk.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp135f-dk.dts
@@ -9,6 +9,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
+#include <dt-bindings/regulator/st,stm32mp13-regulator.h>
#include "stm32mp135.dtsi"
#include "stm32mp13xf.dtsi"
#include "stm32mp13-pinctrl.dtsi"
@@ -65,45 +66,13 @@
default-state = "off";
};
};
-
- v3v3_sw: v3v3-sw {
- compatible = "regulator-fixed";
- regulator-name = "v3v3_sw";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
-
- vdd_adc: vdd-adc {
- compatible = "regulator-fixed";
- regulator-name = "vdd_adc";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
-
- vdd_sd: vdd-sd {
- compatible = "regulator-fixed";
- regulator-name = "vdd_sd";
- regulator-min-microvolt = <2900000>;
- regulator-max-microvolt = <2900000>;
- regulator-always-on;
- };
-
- vdd_usb: vdd-usb {
- compatible = "regulator-fixed";
- regulator-name = "vdd_usb";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
};
&adc_1 {
pinctrl-names = "default";
pinctrl-0 = <&adc1_usb_cc_pins_a>;
- vdda-supply = <&vdd_adc>;
- vref-supply = <&vdd_adc>;
+ vdda-supply = <&scmi_vdd_adc>;
+ vref-supply = <&scmi_vdd_adc>;
status = "okay";
adc1: adc@0 {
status = "okay";
@@ -195,6 +164,29 @@
status = "okay";
};
+&scmi_regu {
+ scmi_vdd_adc: regulator@10 {
+ reg = <VOLTD_SCMI_STPMIC1_LDO1>;
+ regulator-name = "vdd_adc";
+ };
+ scmi_vdd_usb: regulator@13 {
+ reg = <VOLTD_SCMI_STPMIC1_LDO4>;
+ regulator-name = "vdd_usb";
+ };
+ scmi_vdd_sd: regulator@14 {
+ reg = <VOLTD_SCMI_STPMIC1_LDO5>;
+ regulator-name = "vdd_sd";
+ };
+ scmi_v1v8_periph: regulator@15 {
+ reg = <VOLTD_SCMI_STPMIC1_LDO6>;
+ regulator-name = "v1v8_periph";
+ };
+ scmi_v3v3_sw: regulator@19 {
+ reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
+ regulator-name = "v3v3_sw";
+ };
+};
+
&sdmmc1 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
@@ -204,7 +196,7 @@
disable-wp;
st,neg-edge;
bus-width = <4>;
- vmmc-supply = <&vdd_sd>;
+ vmmc-supply = <&scmi_vdd_sd>;
status = "okay";
};
@@ -321,7 +313,7 @@
hub@1 {
compatible = "usb424,2514";
reg = <1>;
- vdd-supply = <&v3v3_sw>;
+ vdd-supply = <&scmi_v3v3_sw>;
};
};
@@ -342,7 +334,7 @@
};
&usbphyc_port0 {
- phy-supply = <&vdd_usb>;
+ phy-supply = <&scmi_vdd_usb>;
st,current-boost-microamp = <1000>;
st,decrease-hs-slew-rate;
st,tune-hs-dc-level = <2>;
@@ -356,7 +348,7 @@
};
&usbphyc_port1 {
- phy-supply = <&vdd_usb>;
+ phy-supply = <&scmi_vdd_usb>;
st,current-boost-microamp = <1000>;
st,decrease-hs-slew-rate;
st,tune-hs-dc-level = <2>;
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15-pinctrl.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15-pinctrl.dtsi
index 05c9c4f8064c..ae83e7b10232 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15-pinctrl.dtsi
@@ -6,12 +6,26 @@
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
&pinctrl {
+ /omit-if-no-ref/
+ adc1_ain_pins_a: adc1-ain-0 {
+ pins {
+ pinmux = <STM32_PINMUX('F', 11, ANALOG)>, /* ADC1_INP2 */
+ <STM32_PINMUX('B', 1, ANALOG)>, /* ADC1_INP5 */
+ <STM32_PINMUX('B', 0, ANALOG)>, /* ADC1_INP9 */
+ <STM32_PINMUX('C', 0, ANALOG)>, /* ADC1_INP10 */
+ <STM32_PINMUX('C', 3, ANALOG)>, /* ADC1_INP13 */
+ <STM32_PINMUX('A', 3, ANALOG)>; /* ADC1_INP15 */
+ };
+ };
+
+ /omit-if-no-ref/
adc1_in6_pins_a: adc1-in6-0 {
pins {
pinmux = <STM32_PINMUX('F', 12, ANALOG)>;
};
};
+ /omit-if-no-ref/
adc12_ain_pins_a: adc12-ain-0 {
pins {
pinmux = <STM32_PINMUX('C', 3, ANALOG)>, /* ADC1 in13 */
@@ -21,6 +35,7 @@
};
};
+ /omit-if-no-ref/
adc12_ain_pins_b: adc12-ain-1 {
pins {
pinmux = <STM32_PINMUX('F', 12, ANALOG)>, /* ADC1 in6 */
@@ -28,6 +43,7 @@
};
};
+ /omit-if-no-ref/
adc12_usb_cc_pins_a: adc12-usb-cc-pins-0 {
pins {
pinmux = <STM32_PINMUX('A', 4, ANALOG)>, /* ADC12 in18 */
@@ -35,6 +51,7 @@
};
};
+ /omit-if-no-ref/
cec_pins_a: cec-0 {
pins {
pinmux = <STM32_PINMUX('A', 15, AF4)>;
@@ -44,12 +61,14 @@
};
};
+ /omit-if-no-ref/
cec_sleep_pins_a: cec-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 15, ANALOG)>; /* HDMI_CEC */
};
};
+ /omit-if-no-ref/
cec_pins_b: cec-1 {
pins {
pinmux = <STM32_PINMUX('B', 6, AF5)>;
@@ -59,24 +78,28 @@
};
};
+ /omit-if-no-ref/
cec_sleep_pins_b: cec-sleep-1 {
pins {
pinmux = <STM32_PINMUX('B', 6, ANALOG)>; /* HDMI_CEC */
};
};
+ /omit-if-no-ref/
dac_ch1_pins_a: dac-ch1-0 {
pins {
pinmux = <STM32_PINMUX('A', 4, ANALOG)>;
};
};
+ /omit-if-no-ref/
dac_ch2_pins_a: dac-ch2-0 {
pins {
pinmux = <STM32_PINMUX('A', 5, ANALOG)>;
};
};
+ /omit-if-no-ref/
dcmi_pins_a: dcmi-0 {
pins {
pinmux = <STM32_PINMUX('H', 8, AF13)>,/* DCMI_HSYNC */
@@ -98,6 +121,7 @@
};
};
+ /omit-if-no-ref/
dcmi_sleep_pins_a: dcmi-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 8, ANALOG)>,/* DCMI_HSYNC */
@@ -118,6 +142,7 @@
};
};
+ /omit-if-no-ref/
dcmi_pins_b: dcmi-1 {
pins {
pinmux = <STM32_PINMUX('A', 4, AF13)>,/* DCMI_HSYNC */
@@ -135,6 +160,7 @@
};
};
+ /omit-if-no-ref/
dcmi_sleep_pins_b: dcmi-sleep-1 {
pins {
pinmux = <STM32_PINMUX('A', 4, ANALOG)>,/* DCMI_HSYNC */
@@ -151,6 +177,7 @@
};
};
+ /omit-if-no-ref/
dcmi_pins_c: dcmi-2 {
pins {
pinmux = <STM32_PINMUX('A', 4, AF13)>,/* DCMI_HSYNC */
@@ -170,6 +197,7 @@
};
};
+ /omit-if-no-ref/
dcmi_sleep_pins_c: dcmi-sleep-2 {
pins {
pinmux = <STM32_PINMUX('A', 4, ANALOG)>,/* DCMI_HSYNC */
@@ -188,6 +216,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_pins_a: rgmii-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
@@ -219,6 +248,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_sleep_pins_a: rgmii-sleep-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
@@ -239,6 +269,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_pins_b: rgmii-1 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
@@ -270,6 +301,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_sleep_pins_b: rgmii-sleep-1 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
@@ -290,6 +322,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_pins_c: rgmii-2 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
@@ -321,6 +354,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_sleep_pins_c: rgmii-sleep-2 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
@@ -341,6 +375,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_pins_d: rgmii-3 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
@@ -371,6 +406,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rgmii_sleep_pins_d: rgmii-sleep-3 {
pins1 {
pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
@@ -391,6 +427,49 @@
};
};
+ /omit-if-no-ref/
+ ethernet0_rgmii_pins_e: rgmii-4 {
+ pins1 {
+ pinmux = <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
+ <STM32_PINMUX('G', 13, AF11)>, /* ETH_RGMII_TXD0 */
+ <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
+ <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
+ <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
+ <STM32_PINMUX('B', 11, AF11)>; /* ETH_RGMII_TX_CTL */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <2>;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
+ <STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
+ <STM32_PINMUX('H', 6, AF11)>, /* ETH_RGMII_RXD2 */
+ <STM32_PINMUX('H', 7, AF11)>, /* ETH_RGMII_RXD3 */
+ <STM32_PINMUX('A', 1, AF11)>, /* ETH_RGMII_RX_CLK */
+ <STM32_PINMUX('A', 7, AF11)>; /* ETH_RGMII_RX_CTL */
+ bias-disable;
+ };
+ };
+
+ /omit-if-no-ref/
+ ethernet0_rgmii_sleep_pins_e: rgmii-sleep-4 {
+ pins1 {
+ pinmux = <STM32_PINMUX('G', 4, ANALOG)>, /* ETH_RGMII_GTX_CLK */
+ <STM32_PINMUX('G', 13, ANALOG)>, /* ETH_RGMII_TXD0 */
+ <STM32_PINMUX('G', 14, ANALOG)>, /* ETH_RGMII_TXD1 */
+ <STM32_PINMUX('C', 2, ANALOG)>, /* ETH_RGMII_TXD2 */
+ <STM32_PINMUX('E', 2, ANALOG)>, /* ETH_RGMII_TXD3 */
+ <STM32_PINMUX('B', 11, ANALOG)>, /* ETH_RGMII_TX_CTL */
+ <STM32_PINMUX('C', 4, ANALOG)>, /* ETH_RGMII_RXD0 */
+ <STM32_PINMUX('C', 5, ANALOG)>, /* ETH_RGMII_RXD1 */
+ <STM32_PINMUX('H', 6, ANALOG)>, /* ETH_RGMII_RXD2 */
+ <STM32_PINMUX('H', 7, ANALOG)>, /* ETH_RGMII_RXD3 */
+ <STM32_PINMUX('A', 1, ANALOG)>, /* ETH_RGMII_RX_CLK */
+ <STM32_PINMUX('A', 7, ANALOG)>; /* ETH_RGMII_RX_CTL */
+ };
+ };
+
+ /omit-if-no-ref/
ethernet0_rmii_pins_a: rmii-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */
@@ -411,6 +490,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rmii_sleep_pins_a: rmii-sleep-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 13, ANALOG)>, /* ETH1_RMII_TXD0 */
@@ -425,6 +505,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rmii_pins_b: rmii-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 5, AF0)>, /* ETH1_CLK */
@@ -452,6 +533,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rmii_sleep_pins_b: rmii-sleep-1 {
pins1 {
pinmux = <STM32_PINMUX('A', 2, ANALOG)>, /* ETH1_MDIO */
@@ -466,6 +548,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rmii_pins_c: rmii-2 {
pins1 {
pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */
@@ -486,6 +569,7 @@
};
};
+ /omit-if-no-ref/
ethernet0_rmii_sleep_pins_c: rmii-sleep-2 {
pins1 {
pinmux = <STM32_PINMUX('G', 13, ANALOG)>, /* ETH1_RMII_TXD0 */
@@ -500,6 +584,7 @@
};
};
+ /omit-if-no-ref/
fmc_pins_a: fmc-0 {
pins1 {
pinmux = <STM32_PINMUX('D', 4, AF12)>, /* FMC_NOE */
@@ -525,6 +610,7 @@
};
};
+ /omit-if-no-ref/
fmc_sleep_pins_a: fmc-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 4, ANALOG)>, /* FMC_NOE */
@@ -544,6 +630,7 @@
};
};
+ /omit-if-no-ref/
fmc_pins_b: fmc-1 {
pins {
pinmux = <STM32_PINMUX('D', 4, AF12)>, /* FMC_NOE */
@@ -573,6 +660,7 @@
};
};
+ /omit-if-no-ref/
fmc_sleep_pins_b: fmc-sleep-1 {
pins {
pinmux = <STM32_PINMUX('D', 4, ANALOG)>, /* FMC_NOE */
@@ -599,6 +687,7 @@
};
};
+ /omit-if-no-ref/
i2c1_pins_a: i2c1-0 {
pins {
pinmux = <STM32_PINMUX('D', 12, AF5)>, /* I2C1_SCL */
@@ -609,6 +698,7 @@
};
};
+ /omit-if-no-ref/
i2c1_sleep_pins_a: i2c1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 12, ANALOG)>, /* I2C1_SCL */
@@ -616,6 +706,7 @@
};
};
+ /omit-if-no-ref/
i2c1_pins_b: i2c1-1 {
pins {
pinmux = <STM32_PINMUX('F', 14, AF5)>, /* I2C1_SCL */
@@ -626,6 +717,7 @@
};
};
+ /omit-if-no-ref/
i2c1_sleep_pins_b: i2c1-sleep-1 {
pins {
pinmux = <STM32_PINMUX('F', 14, ANALOG)>, /* I2C1_SCL */
@@ -633,6 +725,7 @@
};
};
+ /omit-if-no-ref/
i2c2_pins_a: i2c2-0 {
pins {
pinmux = <STM32_PINMUX('H', 4, AF4)>, /* I2C2_SCL */
@@ -643,6 +736,7 @@
};
};
+ /omit-if-no-ref/
i2c2_sleep_pins_a: i2c2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 4, ANALOG)>, /* I2C2_SCL */
@@ -650,6 +744,7 @@
};
};
+ /omit-if-no-ref/
i2c2_pins_b1: i2c2-1 {
pins {
pinmux = <STM32_PINMUX('H', 5, AF4)>; /* I2C2_SDA */
@@ -659,12 +754,14 @@
};
};
+ /omit-if-no-ref/
i2c2_sleep_pins_b1: i2c2-sleep-1 {
pins {
pinmux = <STM32_PINMUX('H', 5, ANALOG)>; /* I2C2_SDA */
};
};
+ /omit-if-no-ref/
i2c2_pins_c: i2c2-2 {
pins {
pinmux = <STM32_PINMUX('F', 1, AF4)>, /* I2C2_SCL */
@@ -675,6 +772,7 @@
};
};
+ /omit-if-no-ref/
i2c2_pins_sleep_c: i2c2-sleep-2 {
pins {
pinmux = <STM32_PINMUX('F', 1, ANALOG)>, /* I2C2_SCL */
@@ -682,6 +780,7 @@
};
};
+ /omit-if-no-ref/
i2c5_pins_a: i2c5-0 {
pins {
pinmux = <STM32_PINMUX('A', 11, AF4)>, /* I2C5_SCL */
@@ -692,6 +791,7 @@
};
};
+ /omit-if-no-ref/
i2c5_sleep_pins_a: i2c5-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 11, ANALOG)>, /* I2C5_SCL */
@@ -700,6 +800,7 @@
};
};
+ /omit-if-no-ref/
i2c5_pins_b: i2c5-1 {
pins {
pinmux = <STM32_PINMUX('D', 0, AF4)>, /* I2C5_SCL */
@@ -710,6 +811,7 @@
};
};
+ /omit-if-no-ref/
i2c5_sleep_pins_b: i2c5-sleep-1 {
pins {
pinmux = <STM32_PINMUX('D', 0, ANALOG)>, /* I2C5_SCL */
@@ -717,6 +819,7 @@
};
};
+ /omit-if-no-ref/
i2s2_pins_a: i2s2-0 {
pins {
pinmux = <STM32_PINMUX('I', 3, AF5)>, /* I2S2_SDO */
@@ -728,6 +831,7 @@
};
};
+ /omit-if-no-ref/
i2s2_sleep_pins_a: i2s2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('I', 3, ANALOG)>, /* I2S2_SDO */
@@ -736,6 +840,28 @@
};
};
+ /omit-if-no-ref/
+ i2s2_pins_b: i2s2-1 {
+ pins {
+ pinmux = <STM32_PINMUX('C', 3, AF5)>, /* I2S2_SDO */
+ <STM32_PINMUX('B', 12, AF5)>, /* I2S2_WS */
+ <STM32_PINMUX('B', 13, AF5)>; /* I2S2_CK */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+ };
+
+ /omit-if-no-ref/
+ i2s2_sleep_pins_b: i2s2-sleep-1 {
+ pins {
+ pinmux = <STM32_PINMUX('C', 3, ANALOG)>, /* I2S2_SDO */
+ <STM32_PINMUX('B', 12, ANALOG)>, /* I2S2_WS */
+ <STM32_PINMUX('B', 13, ANALOG)>; /* I2S2_CK */
+ };
+ };
+
+ /omit-if-no-ref/
ltdc_pins_a: ltdc-0 {
pins {
pinmux = <STM32_PINMUX('G', 7, AF14)>, /* LCD_CLK */
@@ -772,6 +898,7 @@
};
};
+ /omit-if-no-ref/
ltdc_sleep_pins_a: ltdc-sleep-0 {
pins {
pinmux = <STM32_PINMUX('G', 7, ANALOG)>, /* LCD_CLK */
@@ -805,6 +932,7 @@
};
};
+ /omit-if-no-ref/
ltdc_pins_b: ltdc-1 {
pins {
pinmux = <STM32_PINMUX('I', 14, AF14)>, /* LCD_CLK */
@@ -841,6 +969,7 @@
};
};
+ /omit-if-no-ref/
ltdc_sleep_pins_b: ltdc-sleep-1 {
pins {
pinmux = <STM32_PINMUX('I', 14, ANALOG)>, /* LCD_CLK */
@@ -874,6 +1003,7 @@
};
};
+ /omit-if-no-ref/
ltdc_pins_c: ltdc-2 {
pins1 {
pinmux = <STM32_PINMUX('B', 1, AF9)>, /* LTDC_R6 */
@@ -909,6 +1039,7 @@
};
};
+ /omit-if-no-ref/
ltdc_sleep_pins_c: ltdc-sleep-2 {
pins1 {
pinmux = <STM32_PINMUX('B', 1, ANALOG)>, /* LTDC_R6 */
@@ -936,6 +1067,7 @@
};
};
+ /omit-if-no-ref/
ltdc_pins_d: ltdc-3 {
pins1 {
pinmux = <STM32_PINMUX('G', 7, AF14)>; /* LCD_CLK */
@@ -977,6 +1109,7 @@
};
};
+ /omit-if-no-ref/
ltdc_sleep_pins_d: ltdc-sleep-3 {
pins {
pinmux = <STM32_PINMUX('G', 7, ANALOG)>, /* LCD_CLK */
@@ -1010,6 +1143,84 @@
};
};
+ /omit-if-no-ref/
+ ltdc_pins_e: ltdc-4 {
+ pins1 {
+ pinmux = <STM32_PINMUX('H', 2, AF14)>, /* LTDC_R0 */
+ <STM32_PINMUX('H', 3, AF14)>, /* LTDC_R1 */
+ <STM32_PINMUX('H', 8, AF14)>, /* LTDC_R2 */
+ <STM32_PINMUX('H', 9, AF14)>, /* LTDC_R3 */
+ <STM32_PINMUX('H', 10, AF14)>, /* LTDC_R4 */
+ <STM32_PINMUX('C', 0, AF14)>, /* LTDC_R5 */
+ <STM32_PINMUX('H', 12, AF14)>, /* LTDC_R6 */
+ <STM32_PINMUX('E', 15, AF14)>, /* LTDC_R7 */
+ <STM32_PINMUX('E', 14, AF13)>, /* LTDC_G0 */
+ <STM32_PINMUX('E', 6, AF14)>, /* LTDC_G1 */
+ <STM32_PINMUX('H', 13, AF14)>, /* LTDC_G2 */
+ <STM32_PINMUX('H', 14, AF14)>, /* LTDC_G3 */
+ <STM32_PINMUX('H', 4, AF14)>, /* LTDC_G4 */
+ <STM32_PINMUX('I', 0, AF14)>, /* LTDC_G5 */
+ <STM32_PINMUX('I', 1, AF14)>, /* LTDC_G6 */
+ <STM32_PINMUX('I', 2, AF14)>, /* LTDC_G7 */
+ <STM32_PINMUX('D', 9, AF14)>, /* LTDC_B0 */
+ <STM32_PINMUX('G', 12, AF14)>, /* LTDC_B1 */
+ <STM32_PINMUX('G', 10, AF14)>, /* LTDC_B2 */
+ <STM32_PINMUX('D', 10, AF14)>, /* LTDC_B3 */
+ <STM32_PINMUX('E', 12, AF14)>, /* LTDC_B4 */
+ <STM32_PINMUX('A', 3, AF14)>, /* LTDC_B5 */
+ <STM32_PINMUX('B', 8, AF14)>, /* LTDC_B6 */
+ <STM32_PINMUX('D', 8, AF14)>, /* LTDC_B7 */
+ <STM32_PINMUX('F', 10, AF14)>, /* LTDC_DE */
+ <STM32_PINMUX('I', 9, AF14)>, /* LTDC_VSYNC */
+ <STM32_PINMUX('I', 10, AF14)>; /* LTDC_HSYNC */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+
+ pins2 {
+ pinmux = <STM32_PINMUX('G', 7, AF14)>; /* LTDC_CLK */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+ };
+
+ /omit-if-no-ref/
+ ltdc_sleep_pins_e: ltdc-sleep-4 {
+ pins {
+ pinmux = <STM32_PINMUX('H', 2, ANALOG)>, /* LTDC_R0 */
+ <STM32_PINMUX('H', 3, ANALOG)>, /* LTDC_R1 */
+ <STM32_PINMUX('H', 8, ANALOG)>, /* LTDC_R2 */
+ <STM32_PINMUX('H', 9, ANALOG)>, /* LTDC_R3 */
+ <STM32_PINMUX('H', 10, ANALOG)>, /* LTDC_R4 */
+ <STM32_PINMUX('C', 0, ANALOG)>, /* LTDC_R5 */
+ <STM32_PINMUX('H', 12, ANALOG)>, /* LTDC_R6 */
+ <STM32_PINMUX('E', 15, ANALOG)>, /* LTDC_R7 */
+ <STM32_PINMUX('D', 9, ANALOG)>, /* LTDC_B0 */
+ <STM32_PINMUX('G', 12, ANALOG)>, /* LTDC_B1 */
+ <STM32_PINMUX('G', 10, ANALOG)>, /* LTDC_B2 */
+ <STM32_PINMUX('D', 10, ANALOG)>, /* LTDC_B3 */
+ <STM32_PINMUX('E', 12, ANALOG)>, /* LTDC_B4 */
+ <STM32_PINMUX('A', 3, ANALOG)>, /* LTDC_B5 */
+ <STM32_PINMUX('B', 8, ANALOG)>, /* LTDC_B6 */
+ <STM32_PINMUX('D', 8, ANALOG)>, /* LTDC_B7 */
+ <STM32_PINMUX('E', 14, ANALOG)>, /* LTDC_G0 */
+ <STM32_PINMUX('E', 6, ANALOG)>, /* LTDC_G1 */
+ <STM32_PINMUX('H', 13, ANALOG)>, /* LTDC_G2 */
+ <STM32_PINMUX('H', 14, ANALOG)>, /* LTDC_G3 */
+ <STM32_PINMUX('H', 4, ANALOG)>, /* LTDC_G4 */
+ <STM32_PINMUX('I', 0, ANALOG)>, /* LTDC_G5 */
+ <STM32_PINMUX('I', 1, ANALOG)>, /* LTDC_G6 */
+ <STM32_PINMUX('I', 2, ANALOG)>, /* LTDC_G7 */
+ <STM32_PINMUX('F', 10, ANALOG)>, /* LTDC_DE */
+ <STM32_PINMUX('I', 9, ANALOG)>, /* LTDC_VSYNC */
+ <STM32_PINMUX('I', 10, ANALOG)>, /* LTDC_HSYNC */
+ <STM32_PINMUX('G', 7, ANALOG)>; /* LTDC_CLK */
+ };
+ };
+
+ /omit-if-no-ref/
mco1_pins_a: mco1-0 {
pins {
pinmux = <STM32_PINMUX('A', 13, AF2)>; /* MCO1 */
@@ -1019,12 +1230,14 @@
};
};
+ /omit-if-no-ref/
mco1_sleep_pins_a: mco1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 13, ANALOG)>; /* MCO1 */
};
};
+ /omit-if-no-ref/
mco2_pins_a: mco2-0 {
pins {
pinmux = <STM32_PINMUX('G', 2, AF1)>; /* MCO2 */
@@ -1034,12 +1247,14 @@
};
};
+ /omit-if-no-ref/
mco2_sleep_pins_a: mco2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('G', 2, ANALOG)>; /* MCO2 */
};
};
+ /omit-if-no-ref/
m_can1_pins_a: m-can1-0 {
pins1 {
pinmux = <STM32_PINMUX('H', 13, AF9)>; /* CAN1_TX */
@@ -1053,6 +1268,7 @@
};
};
+ /omit-if-no-ref/
m_can1_sleep_pins_a: m_can1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 13, ANALOG)>, /* CAN1_TX */
@@ -1060,6 +1276,7 @@
};
};
+ /omit-if-no-ref/
m_can1_pins_b: m-can1-1 {
pins1 {
pinmux = <STM32_PINMUX('A', 12, AF9)>; /* CAN1_TX */
@@ -1073,6 +1290,7 @@
};
};
+ /omit-if-no-ref/
m_can1_sleep_pins_b: m_can1-sleep-1 {
pins {
pinmux = <STM32_PINMUX('A', 12, ANALOG)>, /* CAN1_TX */
@@ -1080,6 +1298,7 @@
};
};
+ /omit-if-no-ref/
m_can1_pins_c: m-can1-2 {
pins1 {
pinmux = <STM32_PINMUX('H', 13, AF9)>; /* CAN1_TX */
@@ -1093,6 +1312,7 @@
};
};
+ /omit-if-no-ref/
m_can1_sleep_pins_c: m_can1-sleep-2 {
pins {
pinmux = <STM32_PINMUX('H', 13, ANALOG)>, /* CAN1_TX */
@@ -1100,6 +1320,29 @@
};
};
+ /omit-if-no-ref/
+ m_can1_pins_d: m-can1-3 {
+ pins1 {
+ pinmux = <STM32_PINMUX('D', 1, AF9)>; /* CAN1_TX */
+ slew-rate = <1>;
+ drive-push-pull;
+ bias-disable;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('D', 0, AF9)>; /* CAN1_RX */
+ bias-disable;
+ };
+ };
+
+ /omit-if-no-ref/
+ m_can1_sleep_pins_d: m_can1-sleep-3 {
+ pins {
+ pinmux = <STM32_PINMUX('D', 1, ANALOG)>, /* CAN1_TX */
+ <STM32_PINMUX('D', 0, ANALOG)>; /* CAN1_RX */
+ };
+ };
+
+ /omit-if-no-ref/
m_can2_pins_a: m-can2-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 13, AF9)>; /* CAN2_TX */
@@ -1113,6 +1356,7 @@
};
};
+ /omit-if-no-ref/
m_can2_sleep_pins_a: m_can2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 13, ANALOG)>, /* CAN2_TX */
@@ -1120,6 +1364,7 @@
};
};
+ /omit-if-no-ref/
pwm1_pins_a: pwm1-0 {
pins {
pinmux = <STM32_PINMUX('E', 9, AF1)>, /* TIM1_CH1 */
@@ -1131,6 +1376,7 @@
};
};
+ /omit-if-no-ref/
pwm1_sleep_pins_a: pwm1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('E', 9, ANALOG)>, /* TIM1_CH1 */
@@ -1139,6 +1385,7 @@
};
};
+ /omit-if-no-ref/
pwm1_pins_b: pwm1-1 {
pins {
pinmux = <STM32_PINMUX('E', 9, AF1)>; /* TIM1_CH1 */
@@ -1148,12 +1395,30 @@
};
};
+ /omit-if-no-ref/
pwm1_sleep_pins_b: pwm1-sleep-1 {
pins {
pinmux = <STM32_PINMUX('E', 9, ANALOG)>; /* TIM1_CH1 */
};
};
+ /omit-if-no-ref/
+ pwm1_pins_c: pwm1-2 {
+ pins {
+ pinmux = <STM32_PINMUX('E', 11, AF1)>; /* TIM1_CH2 */
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+ };
+
+ /omit-if-no-ref/
+ pwm1_sleep_pins_c: pwm1-sleep-2 {
+ pins {
+ pinmux = <STM32_PINMUX('E', 11, ANALOG)>; /* TIM1_CH2 */
+ };
+ };
+
+ /omit-if-no-ref/
pwm2_pins_a: pwm2-0 {
pins {
pinmux = <STM32_PINMUX('A', 3, AF1)>; /* TIM2_CH4 */
@@ -1163,12 +1428,14 @@
};
};
+ /omit-if-no-ref/
pwm2_sleep_pins_a: pwm2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 3, ANALOG)>; /* TIM2_CH4 */
};
};
+ /omit-if-no-ref/
pwm3_pins_a: pwm3-0 {
pins {
pinmux = <STM32_PINMUX('C', 7, AF2)>; /* TIM3_CH2 */
@@ -1178,12 +1445,14 @@
};
};
+ /omit-if-no-ref/
pwm3_sleep_pins_a: pwm3-sleep-0 {
pins {
pinmux = <STM32_PINMUX('C', 7, ANALOG)>; /* TIM3_CH2 */
};
};
+ /omit-if-no-ref/
pwm3_pins_b: pwm3-1 {
pins {
pinmux = <STM32_PINMUX('B', 5, AF2)>; /* TIM3_CH2 */
@@ -1193,12 +1462,14 @@
};
};
+ /omit-if-no-ref/
pwm3_sleep_pins_b: pwm3-sleep-1 {
pins {
pinmux = <STM32_PINMUX('B', 5, ANALOG)>; /* TIM3_CH2 */
};
};
+ /omit-if-no-ref/
pwm4_pins_a: pwm4-0 {
pins {
pinmux = <STM32_PINMUX('D', 14, AF2)>, /* TIM4_CH3 */
@@ -1209,6 +1480,7 @@
};
};
+ /omit-if-no-ref/
pwm4_sleep_pins_a: pwm4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 14, ANALOG)>, /* TIM4_CH3 */
@@ -1216,6 +1488,7 @@
};
};
+ /omit-if-no-ref/
pwm4_pins_b: pwm4-1 {
pins {
pinmux = <STM32_PINMUX('D', 13, AF2)>; /* TIM4_CH2 */
@@ -1225,12 +1498,14 @@
};
};
+ /omit-if-no-ref/
pwm4_sleep_pins_b: pwm4-sleep-1 {
pins {
pinmux = <STM32_PINMUX('D', 13, ANALOG)>; /* TIM4_CH2 */
};
};
+ /omit-if-no-ref/
pwm5_pins_a: pwm5-0 {
pins {
pinmux = <STM32_PINMUX('H', 11, AF2)>; /* TIM5_CH2 */
@@ -1240,12 +1515,14 @@
};
};
+ /omit-if-no-ref/
pwm5_sleep_pins_a: pwm5-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 11, ANALOG)>; /* TIM5_CH2 */
};
};
+ /omit-if-no-ref/
pwm5_pins_b: pwm5-1 {
pins {
pinmux = <STM32_PINMUX('H', 11, AF2)>, /* TIM5_CH2 */
@@ -1257,6 +1534,7 @@
};
};
+ /omit-if-no-ref/
pwm5_sleep_pins_b: pwm5-sleep-1 {
pins {
pinmux = <STM32_PINMUX('H', 11, ANALOG)>, /* TIM5_CH2 */
@@ -1265,6 +1543,7 @@
};
};
+ /omit-if-no-ref/
pwm8_pins_a: pwm8-0 {
pins {
pinmux = <STM32_PINMUX('I', 2, AF3)>; /* TIM8_CH4 */
@@ -1274,12 +1553,36 @@
};
};
+ /omit-if-no-ref/
pwm8_sleep_pins_a: pwm8-sleep-0 {
pins {
pinmux = <STM32_PINMUX('I', 2, ANALOG)>; /* TIM8_CH4 */
};
};
+ /omit-if-no-ref/
+ pwm8_pins_b: pwm8-1 {
+ pins {
+ pinmux = <STM32_PINMUX('I', 5, AF3)>, /* TIM8_CH1 */
+ <STM32_PINMUX('I', 6, AF3)>, /* TIM8_CH2 */
+ <STM32_PINMUX('I', 7, AF3)>, /* TIM8_CH3 */
+ <STM32_PINMUX('C', 9, AF3)>; /* TIM8_CH4 */
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+ };
+
+ /omit-if-no-ref/
+ pwm8_sleep_pins_b: pwm8-sleep-1 {
+ pins {
+ pinmux = <STM32_PINMUX('I', 5, ANALOG)>, /* TIM8_CH1 */
+ <STM32_PINMUX('I', 6, ANALOG)>, /* TIM8_CH2 */
+ <STM32_PINMUX('I', 7, ANALOG)>, /* TIM8_CH3 */
+ <STM32_PINMUX('C', 9, ANALOG)>; /* TIM8_CH4 */
+ };
+ };
+
+ /omit-if-no-ref/
pwm12_pins_a: pwm12-0 {
pins {
pinmux = <STM32_PINMUX('H', 6, AF2)>; /* TIM12_CH1 */
@@ -1289,12 +1592,14 @@
};
};
+ /omit-if-no-ref/
pwm12_sleep_pins_a: pwm12-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 6, ANALOG)>; /* TIM12_CH1 */
};
};
+ /omit-if-no-ref/
qspi_clk_pins_a: qspi-clk-0 {
pins {
pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QSPI_CLK */
@@ -1304,12 +1609,14 @@
};
};
+ /omit-if-no-ref/
qspi_clk_sleep_pins_a: qspi-clk-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 10, ANALOG)>; /* QSPI_CLK */
};
};
+ /omit-if-no-ref/
qspi_bk1_pins_a: qspi-bk1-0 {
pins {
pinmux = <STM32_PINMUX('F', 8, AF10)>, /* QSPI_BK1_IO0 */
@@ -1322,6 +1629,7 @@
};
};
+ /omit-if-no-ref/
qspi_bk1_sleep_pins_a: qspi-bk1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 8, ANALOG)>, /* QSPI_BK1_IO0 */
@@ -1331,6 +1639,7 @@
};
};
+ /omit-if-no-ref/
qspi_bk2_pins_a: qspi-bk2-0 {
pins {
pinmux = <STM32_PINMUX('H', 2, AF9)>, /* QSPI_BK2_IO0 */
@@ -1343,6 +1652,7 @@
};
};
+ /omit-if-no-ref/
qspi_bk2_sleep_pins_a: qspi-bk2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 2, ANALOG)>, /* QSPI_BK2_IO0 */
@@ -1352,6 +1662,7 @@
};
};
+ /omit-if-no-ref/
qspi_cs1_pins_a: qspi-cs1-0 {
pins {
pinmux = <STM32_PINMUX('B', 6, AF10)>; /* QSPI_BK1_NCS */
@@ -1361,12 +1672,14 @@
};
};
+ /omit-if-no-ref/
qspi_cs1_sleep_pins_a: qspi-cs1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 6, ANALOG)>; /* QSPI_BK1_NCS */
};
};
+ /omit-if-no-ref/
qspi_cs2_pins_a: qspi-cs2-0 {
pins {
pinmux = <STM32_PINMUX('C', 0, AF10)>; /* QSPI_BK2_NCS */
@@ -1376,12 +1689,14 @@
};
};
+ /omit-if-no-ref/
qspi_cs2_sleep_pins_a: qspi-cs2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('C', 0, ANALOG)>; /* QSPI_BK2_NCS */
};
};
+ /omit-if-no-ref/
sai2a_pins_a: sai2a-0 {
pins {
pinmux = <STM32_PINMUX('I', 5, AF10)>, /* SAI2_SCK_A */
@@ -1394,6 +1709,7 @@
};
};
+ /omit-if-no-ref/
sai2a_sleep_pins_a: sai2a-sleep-0 {
pins {
pinmux = <STM32_PINMUX('I', 5, ANALOG)>, /* SAI2_SCK_A */
@@ -1403,6 +1719,7 @@
};
};
+ /omit-if-no-ref/
sai2a_pins_b: sai2a-1 {
pins1 {
pinmux = <STM32_PINMUX('I', 6, AF10)>, /* SAI2_SD_A */
@@ -1414,6 +1731,7 @@
};
};
+ /omit-if-no-ref/
sai2a_sleep_pins_b: sai2a-sleep-1 {
pins {
pinmux = <STM32_PINMUX('I', 6, ANALOG)>, /* SAI2_SD_A */
@@ -1422,6 +1740,7 @@
};
};
+ /omit-if-no-ref/
sai2a_pins_c: sai2a-2 {
pins {
pinmux = <STM32_PINMUX('D', 13, AF10)>, /* SAI2_SCK_A */
@@ -1433,6 +1752,7 @@
};
};
+ /omit-if-no-ref/
sai2a_sleep_pins_c: sai2a-sleep-2 {
pins {
pinmux = <STM32_PINMUX('D', 13, ANALOG)>, /* SAI2_SCK_A */
@@ -1441,6 +1761,7 @@
};
};
+ /omit-if-no-ref/
sai2b_pins_a: sai2b-0 {
pins1 {
pinmux = <STM32_PINMUX('E', 12, AF10)>, /* SAI2_SCK_B */
@@ -1456,6 +1777,7 @@
};
};
+ /omit-if-no-ref/
sai2b_sleep_pins_a: sai2b-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 11, ANALOG)>, /* SAI2_SD_B */
@@ -1465,6 +1787,7 @@
};
};
+ /omit-if-no-ref/
sai2b_pins_b: sai2b-1 {
pins {
pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
@@ -1472,12 +1795,14 @@
};
};
+ /omit-if-no-ref/
sai2b_sleep_pins_b: sai2b-sleep-1 {
pins {
pinmux = <STM32_PINMUX('F', 11, ANALOG)>; /* SAI2_SD_B */
};
};
+ /omit-if-no-ref/
sai2b_pins_c: sai2b-2 {
pins1 {
pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
@@ -1485,12 +1810,14 @@
};
};
+ /omit-if-no-ref/
sai2b_sleep_pins_c: sai2b-sleep-2 {
pins {
pinmux = <STM32_PINMUX('F', 11, ANALOG)>; /* SAI2_SD_B */
};
};
+ /omit-if-no-ref/
sai2b_pins_d: sai2b-3 {
pins1 {
pinmux = <STM32_PINMUX('H', 2, AF10)>, /* SAI2_SCK_B */
@@ -1506,6 +1833,7 @@
};
};
+ /omit-if-no-ref/
sai2b_sleep_pins_d: sai2b-sleep-3 {
pins1 {
pinmux = <STM32_PINMUX('H', 2, ANALOG)>, /* SAI2_SCK_B */
@@ -1515,6 +1843,7 @@
};
};
+ /omit-if-no-ref/
sai4a_pins_a: sai4a-0 {
pins {
pinmux = <STM32_PINMUX('B', 5, AF10)>; /* SAI4_SD_A */
@@ -1524,12 +1853,14 @@
};
};
+ /omit-if-no-ref/
sai4a_sleep_pins_a: sai4a-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 5, ANALOG)>; /* SAI4_SD_A */
};
};
+ /omit-if-no-ref/
sdmmc1_b4_pins_a: sdmmc1-b4-0 {
pins1 {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
@@ -1549,6 +1880,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_b4_od_pins_a: sdmmc1-b4-od-0 {
pins1 {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
@@ -1573,6 +1905,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_b4_init_pins_a: sdmmc1-b4-init-0 {
pins1 {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
@@ -1585,6 +1918,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_b4_sleep_pins_a: sdmmc1-b4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */
@@ -1596,6 +1930,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_b4_pins_b: sdmmc1-b4-1 {
pins1 {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
@@ -1615,6 +1950,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_b4_od_pins_b: sdmmc1-b4-od-1 {
pins1 {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
@@ -1639,6 +1975,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_b4_sleep_pins_b: sdmmc1-b4-sleep-1 {
pins {
pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */
@@ -1650,6 +1987,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_dir_pins_a: sdmmc1-dir-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 2, AF11)>, /* SDMMC1_D0DIR */
@@ -1665,6 +2003,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_dir_init_pins_a: sdmmc1-dir-init-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 2, AF11)>, /* SDMMC1_D0DIR */
@@ -1676,6 +2015,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_dir_sleep_pins_a: sdmmc1-dir-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 2, ANALOG)>, /* SDMMC1_D0DIR */
@@ -1685,6 +2025,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_dir_pins_b: sdmmc1-dir-1 {
pins1 {
pinmux = <STM32_PINMUX('F', 2, AF11)>, /* SDMMC1_D0DIR */
@@ -1700,6 +2041,7 @@
};
};
+ /omit-if-no-ref/
sdmmc1_dir_sleep_pins_b: sdmmc1-dir-sleep-1 {
pins {
pinmux = <STM32_PINMUX('F', 2, ANALOG)>, /* SDMMC1_D0DIR */
@@ -1709,6 +2051,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_b4_pins_a: sdmmc2-b4-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
@@ -1728,6 +2071,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
@@ -1752,6 +2096,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC2_D0 */
@@ -1763,6 +2108,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_b4_pins_b: sdmmc2-b4-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
@@ -1782,6 +2128,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_b4_od_pins_b: sdmmc2-b4-od-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
@@ -1806,6 +2153,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_pins_a: sdmmc2-d47-0 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
@@ -1818,6 +2166,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_sleep_pins_a: sdmmc2-d47-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
@@ -1827,6 +2176,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_pins_b: sdmmc2-d47-1 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
@@ -1839,6 +2189,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_sleep_pins_b: sdmmc2-d47-sleep-1 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
@@ -1848,6 +2199,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_pins_c: sdmmc2-d47-2 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
@@ -1860,6 +2212,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_sleep_pins_c: sdmmc2-d47-sleep-2 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
@@ -1869,6 +2222,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_pins_d: sdmmc2-d47-3 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
@@ -1878,6 +2232,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_sleep_pins_d: sdmmc2-d47-sleep-3 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
@@ -1887,6 +2242,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_pins_e: sdmmc2-d47-4 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
@@ -1899,6 +2255,7 @@
};
};
+ /omit-if-no-ref/
sdmmc2_d47_sleep_pins_e: sdmmc2-d47-sleep-4 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
@@ -1908,6 +2265,7 @@
};
};
+ /omit-if-no-ref/
sdmmc3_b4_pins_a: sdmmc3-b4-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
@@ -1927,6 +2285,7 @@
};
};
+ /omit-if-no-ref/
sdmmc3_b4_od_pins_a: sdmmc3-b4-od-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
@@ -1951,6 +2310,7 @@
};
};
+ /omit-if-no-ref/
sdmmc3_b4_sleep_pins_a: sdmmc3-b4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 0, ANALOG)>, /* SDMMC3_D0 */
@@ -1962,6 +2322,7 @@
};
};
+ /omit-if-no-ref/
sdmmc3_b4_pins_b: sdmmc3-b4-1 {
pins1 {
pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
@@ -1981,6 +2342,7 @@
};
};
+ /omit-if-no-ref/
sdmmc3_b4_od_pins_b: sdmmc3-b4-od-1 {
pins1 {
pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
@@ -2005,6 +2367,7 @@
};
};
+ /omit-if-no-ref/
sdmmc3_b4_sleep_pins_b: sdmmc3-b4-sleep-1 {
pins {
pinmux = <STM32_PINMUX('F', 0, ANALOG)>, /* SDMMC3_D0 */
@@ -2016,6 +2379,7 @@
};
};
+ /omit-if-no-ref/
spdifrx_pins_a: spdifrx-0 {
pins {
pinmux = <STM32_PINMUX('G', 12, AF8)>; /* SPDIF_IN1 */
@@ -2023,12 +2387,14 @@
};
};
+ /omit-if-no-ref/
spdifrx_sleep_pins_a: spdifrx-sleep-0 {
pins {
pinmux = <STM32_PINMUX('G', 12, ANALOG)>; /* SPDIF_IN1 */
};
};
+ /omit-if-no-ref/
spi1_pins_b: spi1-1 {
pins1 {
pinmux = <STM32_PINMUX('A', 5, AF5)>, /* SPI1_SCK */
@@ -2044,6 +2410,7 @@
};
};
+ /omit-if-no-ref/
spi2_pins_a: spi2-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, AF5)>, /* SPI2_SCK */
@@ -2059,6 +2426,7 @@
};
};
+ /omit-if-no-ref/
spi2_pins_b: spi2-1 {
pins1 {
pinmux = <STM32_PINMUX('I', 1, AF5)>, /* SPI2_SCK */
@@ -2074,6 +2442,22 @@
};
};
+ /omit-if-no-ref/
+ spi2_pins_c: spi2-2 {
+ pins1 {
+ pinmux = <STM32_PINMUX('I', 1, AF5)>, /* SPI2_SCK */
+ <STM32_PINMUX('I', 3, AF5)>; /* SPI2_MOSI */
+ bias-disable;
+ drive-push-pull;
+ };
+
+ pins2 {
+ pinmux = <STM32_PINMUX('I', 2, AF5)>; /* SPI2_MISO */
+ bias-pull-down;
+ };
+ };
+
+ /omit-if-no-ref/
spi4_pins_a: spi4-0 {
pins {
pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */
@@ -2088,6 +2472,23 @@
};
};
+ /omit-if-no-ref/
+ spi5_pins_a: spi5-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('F', 7, AF5)>, /* SPI5_SCK */
+ <STM32_PINMUX('F', 9, AF5)>; /* SPI5_MOSI */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <1>;
+ };
+
+ pins2 {
+ pinmux = <STM32_PINMUX('F', 8, AF5)>; /* SPI5_MISO */
+ bias-disable;
+ };
+ };
+
+ /omit-if-no-ref/
stusb1600_pins_a: stusb1600-0 {
pins {
pinmux = <STM32_PINMUX('I', 11, GPIO)>;
@@ -2095,6 +2496,7 @@
};
};
+ /omit-if-no-ref/
uart4_pins_a: uart4-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
@@ -2108,6 +2510,7 @@
};
};
+ /omit-if-no-ref/
uart4_idle_pins_a: uart4-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 11, ANALOG)>; /* UART4_TX */
@@ -2118,6 +2521,7 @@
};
};
+ /omit-if-no-ref/
uart4_sleep_pins_a: uart4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('G', 11, ANALOG)>, /* UART4_TX */
@@ -2125,6 +2529,7 @@
};
};
+ /omit-if-no-ref/
uart4_pins_b: uart4-1 {
pins1 {
pinmux = <STM32_PINMUX('D', 1, AF8)>; /* UART4_TX */
@@ -2138,6 +2543,7 @@
};
};
+ /omit-if-no-ref/
uart4_pins_c: uart4-2 {
pins1 {
pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
@@ -2151,6 +2557,7 @@
};
};
+ /omit-if-no-ref/
uart4_pins_d: uart4-3 {
pins1 {
pinmux = <STM32_PINMUX('A', 13, AF8)>; /* UART4_TX */
@@ -2164,6 +2571,7 @@
};
};
+ /omit-if-no-ref/
uart4_idle_pins_d: uart4-idle-3 {
pins1 {
pinmux = <STM32_PINMUX('A', 13, ANALOG)>; /* UART4_TX */
@@ -2174,6 +2582,7 @@
};
};
+ /omit-if-no-ref/
uart4_sleep_pins_d: uart4-sleep-3 {
pins {
pinmux = <STM32_PINMUX('A', 13, ANALOG)>, /* UART4_TX */
@@ -2181,6 +2590,7 @@
};
};
+ /omit-if-no-ref/
uart5_pins_a: uart5-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 13, AF14)>; /* UART5_TX */
@@ -2194,6 +2604,7 @@
};
};
+ /omit-if-no-ref/
uart7_pins_a: uart7-0 {
pins1 {
pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART7_TX */
@@ -2209,6 +2620,7 @@
};
};
+ /omit-if-no-ref/
uart7_pins_b: uart7-1 {
pins1 {
pinmux = <STM32_PINMUX('F', 7, AF7)>; /* UART7_TX */
@@ -2222,6 +2634,7 @@
};
};
+ /omit-if-no-ref/
uart7_pins_c: uart7-2 {
pins1 {
pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART7_TX */
@@ -2235,6 +2648,7 @@
};
};
+ /omit-if-no-ref/
uart7_idle_pins_c: uart7-idle-2 {
pins1 {
pinmux = <STM32_PINMUX('E', 8, ANALOG)>; /* UART7_TX */
@@ -2245,6 +2659,7 @@
};
};
+ /omit-if-no-ref/
uart7_sleep_pins_c: uart7-sleep-2 {
pins {
pinmux = <STM32_PINMUX('E', 8, ANALOG)>, /* UART7_TX */
@@ -2252,6 +2667,7 @@
};
};
+ /omit-if-no-ref/
uart8_pins_a: uart8-0 {
pins1 {
pinmux = <STM32_PINMUX('E', 1, AF8)>; /* UART8_TX */
@@ -2265,6 +2681,7 @@
};
};
+ /omit-if-no-ref/
uart8_rtscts_pins_a: uart8rtscts-0 {
pins {
pinmux = <STM32_PINMUX('G', 7, AF8)>, /* UART8_RTS */
@@ -2273,6 +2690,7 @@
};
};
+ /omit-if-no-ref/
usart1_pins_a: usart1-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 12, AF7)>; /* USART1_RTS */
@@ -2286,6 +2704,7 @@
};
};
+ /omit-if-no-ref/
usart1_idle_pins_a: usart1-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 12, ANALOG)>, /* USART1_RTS */
@@ -2293,6 +2712,7 @@
};
};
+ /omit-if-no-ref/
usart1_sleep_pins_a: usart1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 12, ANALOG)>, /* USART1_RTS */
@@ -2300,6 +2720,7 @@
};
};
+ /omit-if-no-ref/
usart2_pins_a: usart2-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 5, AF7)>, /* USART2_TX */
@@ -2315,6 +2736,7 @@
};
};
+ /omit-if-no-ref/
usart2_sleep_pins_a: usart2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 5, ANALOG)>, /* USART2_TX */
@@ -2324,6 +2746,7 @@
};
};
+ /omit-if-no-ref/
usart2_pins_b: usart2-1 {
pins1 {
pinmux = <STM32_PINMUX('F', 5, AF7)>, /* USART2_TX */
@@ -2339,6 +2762,7 @@
};
};
+ /omit-if-no-ref/
usart2_sleep_pins_b: usart2-sleep-1 {
pins {
pinmux = <STM32_PINMUX('F', 5, ANALOG)>, /* USART2_TX */
@@ -2348,6 +2772,7 @@
};
};
+ /omit-if-no-ref/
usart2_pins_c: usart2-2 {
pins1 {
pinmux = <STM32_PINMUX('D', 5, AF7)>, /* USART2_TX */
@@ -2363,6 +2788,7 @@
};
};
+ /omit-if-no-ref/
usart2_idle_pins_c: usart2-idle-2 {
pins1 {
pinmux = <STM32_PINMUX('D', 5, ANALOG)>, /* USART2_TX */
@@ -2380,6 +2806,7 @@
};
};
+ /omit-if-no-ref/
usart2_sleep_pins_c: usart2-sleep-2 {
pins {
pinmux = <STM32_PINMUX('D', 5, ANALOG)>, /* USART2_TX */
@@ -2389,6 +2816,7 @@
};
};
+ /omit-if-no-ref/
usart3_pins_a: usart3-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, AF7)>; /* USART3_TX */
@@ -2402,6 +2830,7 @@
};
};
+ /omit-if-no-ref/
usart3_idle_pins_a: usart3-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>; /* USART3_TX */
@@ -2412,6 +2841,7 @@
};
};
+ /omit-if-no-ref/
usart3_sleep_pins_a: usart3-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2419,6 +2849,7 @@
};
};
+ /omit-if-no-ref/
usart3_pins_b: usart3-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
@@ -2434,6 +2865,7 @@
};
};
+ /omit-if-no-ref/
usart3_idle_pins_b: usart3-idle-1 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2451,6 +2883,7 @@
};
};
+ /omit-if-no-ref/
usart3_sleep_pins_b: usart3-sleep-1 {
pins {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2460,6 +2893,7 @@
};
};
+ /omit-if-no-ref/
usart3_pins_c: usart3-2 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
@@ -2475,6 +2909,7 @@
};
};
+ /omit-if-no-ref/
usart3_idle_pins_c: usart3-idle-2 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2492,6 +2927,7 @@
};
};
+ /omit-if-no-ref/
usart3_sleep_pins_c: usart3-sleep-2 {
pins {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2501,6 +2937,7 @@
};
};
+ /omit-if-no-ref/
usart3_pins_d: usart3-3 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
@@ -2516,6 +2953,7 @@
};
};
+ /omit-if-no-ref/
usart3_idle_pins_d: usart3-idle-3 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2528,6 +2966,7 @@
};
};
+ /omit-if-no-ref/
usart3_sleep_pins_d: usart3-sleep-3 {
pins {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2537,6 +2976,7 @@
};
};
+ /omit-if-no-ref/
usart3_pins_e: usart3-4 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
@@ -2552,6 +2992,7 @@
};
};
+ /omit-if-no-ref/
usart3_idle_pins_e: usart3-idle-4 {
pins1 {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2569,6 +3010,7 @@
};
};
+ /omit-if-no-ref/
usart3_sleep_pins_e: usart3-sleep-4 {
pins {
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
@@ -2578,12 +3020,30 @@
};
};
+ /omit-if-no-ref/
+ usart3_pins_f: usart3-5 {
+ pins1 {
+ pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
+ <STM32_PINMUX('D', 12, AF7)>; /* USART3_RTS */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
+ <STM32_PINMUX('D', 11, AF7)>; /* USART3_CTS_NSS */
+ bias-disable;
+ };
+ };
+
+ /omit-if-no-ref/
usbotg_hs_pins_a: usbotg-hs-0 {
pins {
pinmux = <STM32_PINMUX('A', 10, ANALOG)>; /* OTG_ID */
};
};
+ /omit-if-no-ref/
usbotg_fs_dp_dm_pins_a: usbotg-fs-dp-dm-0 {
pins {
pinmux = <STM32_PINMUX('A', 11, ANALOG)>, /* OTG_FS_DM */
@@ -2593,6 +3053,7 @@
};
&pinctrl_z {
+ /omit-if-no-ref/
i2c2_pins_b2: i2c2-0 {
pins {
pinmux = <STM32_PINMUX('Z', 0, AF3)>; /* I2C2_SCL */
@@ -2602,12 +3063,14 @@
};
};
+ /omit-if-no-ref/
i2c2_sleep_pins_b2: i2c2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('Z', 0, ANALOG)>; /* I2C2_SCL */
};
};
+ /omit-if-no-ref/
i2c4_pins_a: i2c4-0 {
pins {
pinmux = <STM32_PINMUX('Z', 4, AF6)>, /* I2C4_SCL */
@@ -2618,6 +3081,7 @@
};
};
+ /omit-if-no-ref/
i2c4_sleep_pins_a: i2c4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('Z', 4, ANALOG)>, /* I2C4_SCL */
@@ -2625,6 +3089,7 @@
};
};
+ /omit-if-no-ref/
i2c6_pins_a: i2c6-0 {
pins {
pinmux = <STM32_PINMUX('Z', 6, AF2)>, /* I2C6_SCL */
@@ -2635,6 +3100,7 @@
};
};
+ /omit-if-no-ref/
i2c6_sleep_pins_a: i2c6-sleep-0 {
pins {
pinmux = <STM32_PINMUX('Z', 6, ANALOG)>, /* I2C6_SCL */
@@ -2642,6 +3108,7 @@
};
};
+ /omit-if-no-ref/
spi1_pins_a: spi1-0 {
pins1 {
pinmux = <STM32_PINMUX('Z', 0, AF5)>, /* SPI1_SCK */
@@ -2657,6 +3124,7 @@
};
};
+ /omit-if-no-ref/
spi1_sleep_pins_a: spi1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('Z', 0, ANALOG)>, /* SPI1_SCK */
@@ -2665,6 +3133,7 @@
};
};
+ /omit-if-no-ref/
usart1_pins_b: usart1-1 {
pins1 {
pinmux = <STM32_PINMUX('Z', 7, AF7)>; /* USART1_TX */
@@ -2678,6 +3147,7 @@
};
};
+ /omit-if-no-ref/
usart1_idle_pins_b: usart1-idle-1 {
pins1 {
pinmux = <STM32_PINMUX('Z', 7, ANALOG)>; /* USART1_TX */
@@ -2688,6 +3158,7 @@
};
};
+ /omit-if-no-ref/
usart1_sleep_pins_b: usart1-sleep-1 {
pins {
pinmux = <STM32_PINMUX('Z', 7, ANALOG)>, /* USART1_TX */
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15-scmi.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15-scmi.dtsi
index 543f24c2f4f6..dc3b09f2f2af 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15-scmi.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15-scmi.dtsi
@@ -16,7 +16,6 @@
#address-cells = <1>;
#size-cells = <0>;
linaro,optee-channel-id = <0>;
- shmem = <&scmi_shm>;
scmi_clk: protocol@14 {
reg = <0x14>;
@@ -35,22 +34,21 @@
#address-cells = <1>;
#size-cells = <0>;
- scmi_reg11: reg11@0 {
+ scmi_reg11: regulator@0 {
reg = <0>;
regulator-name = "reg11";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
- scmi_reg18: reg18@1 {
- voltd-name = "reg18";
+ scmi_reg18: regulator@1 {
reg = <1>;
regulator-name = "reg18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
- scmi_usb33: usb33@2 {
+ scmi_usb33: regulator@2 {
reg = <2>;
regulator-name = "usb33";
regulator-min-microvolt = <3300000>;
@@ -60,21 +58,6 @@
};
};
};
-
- soc {
- scmi_sram: sram@2ffff000 {
- compatible = "mmio-sram";
- reg = <0x2ffff000 0x1000>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0 0x2ffff000 0x1000>;
-
- scmi_shm: scmi-sram@0 {
- compatible = "arm,scmi-shmem";
- reg = <0 0x80>;
- };
- };
- };
};
&reg11 {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp151.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp151.dtsi
index 61508917521c..fa4cbd312e5a 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp151.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp151.dtsi
@@ -1521,6 +1521,8 @@
clocks = <&usbphyc>, <&rcc USBH>;
resets = <&rcc USBH_R>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&usbphyc_port0>;
+ phy-names = "usb";
status = "disabled";
};
@@ -1531,6 +1533,8 @@
resets = <&rcc USBH_R>;
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
companion = <&usbh_ohci>;
+ phys = <&usbphyc_port0>;
+ phy-names = "usb";
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1c.dts b/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1c.dts
index 7ecf31263abc..c90d815f906b 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1c.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1c.dts
@@ -23,6 +23,18 @@
clock-frequency = <25000000>;
};
+ pse_t1l1: ethernet-pse-1 {
+ compatible = "podl-pse-regulator";
+ pse-supply = <&reg_t1l1>;
+ #pse-cells = <0>;
+ };
+
+ pse_t1l2: ethernet-pse-2 {
+ compatible = "podl-pse-regulator";
+ pse-supply = <&reg_t1l2>;
+ #pse-cells = <0>;
+ };
+
mdio0: mdio {
compatible = "virtual,mdio-gpio";
#address-cells = <1>;
@@ -32,6 +44,24 @@
};
+ reg_t1l1: regulator-pse-t1l1 {
+ compatible = "regulator-fixed";
+ regulator-name = "pse-t1l1";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gpio = <&gpiog 13 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_t1l2: regulator-pse-t1l2 {
+ compatible = "regulator-fixed";
+ regulator-name = "pse-t1l2";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gpio = <&gpiog 14 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&gpiod 8 GPIO_ACTIVE_LOW>;
@@ -92,6 +122,7 @@
reset-gpios = <&gpiog 12 GPIO_ACTIVE_LOW>;
reset-assert-us = <10>;
reset-deassert-us = <35>;
+ pses = <&pse_t1l1>;
};
/* TI DP83TD510E */
@@ -102,6 +133,7 @@
reset-gpios = <&gpiog 11 GPIO_ACTIVE_LOW>;
reset-assert-us = <10>;
reset-deassert-us = <35>;
+ pses = <&pse_t1l2>;
};
/* Micrel KSZ9031 */
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1l.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1l.dtsi
index dd23de85100c..3938d357e198 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1l.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp151a-prtt1l.dtsi
@@ -206,8 +206,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp157.dtsi
index 5e733cd16ff9..6197d878894d 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157.dtsi
@@ -22,9 +22,27 @@
reg = <0x5a000000 0x800>;
clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>;
clock-names = "pclk", "ref", "px_clk";
+ phy-dsi-supply = <&reg18>;
resets = <&rcc DSI_R>;
reset-names = "apb";
status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsi_in: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsi_out: endpoint {
+ };
+ };
+ };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157a-dk1-scmi.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157a-dk1-scmi.dts
index afcd6285890c..ce5937270aa1 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157a-dk1-scmi.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157a-dk1-scmi.dts
@@ -11,7 +11,7 @@
/ {
model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board";
- compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157a-dk1", "st,stm32mp157";
+ compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157";
reserved-memory {
optee@de000000 {
@@ -59,7 +59,7 @@
/delete-property/ st,syscfg-holdboot;
resets = <&scmi_reset RST_SCMI_MCU>,
<&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
- reset-names = "mcu_rst", "hold_boot";
+ reset-names = "mcu_rst", "hold_boot";
};
&rcc {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
index 4279b26547df..df97e03d2a5a 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
@@ -46,26 +46,14 @@
&dsi {
status = "okay";
- phy-dsi-supply = <&reg18>;
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
+};
- port@0 {
- reg = <0>;
- dsi_in: endpoint {
- remote-endpoint = <&ltdc_ep0_out>;
- };
- };
+&dsi_in {
+ remote-endpoint = <&ltdc_ep0_out>;
+};
- port@1 {
- reg = <1>;
- dsi_out: endpoint {
- remote-endpoint = <&bridge_in>;
- };
- };
- };
+&dsi_out {
+ remote-endpoint = <&bridge_in>;
};
&i2c6 {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-edimm2.2.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-edimm2.2.dts
index efba54289820..f8e404346396 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-edimm2.2.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157a-icore-stm32mp1-edimm2.2.dts
@@ -46,26 +46,14 @@
&dsi {
status = "okay";
- phy-dsi-supply = <&reg18>;
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
+};
- port@0 {
- reg = <0>;
- dsi_in_ltdc: endpoint {
- remote-endpoint = <&ltdc_out_dsi>;
- };
- };
+&dsi_in {
+ remote-endpoint = <&ltdc_out_dsi>;
+};
- port@1 {
- reg = <1>;
- dsi_out_bridge: endpoint {
- remote-endpoint = <&bridge_in_dsi>;
- };
- };
- };
+&dsi_out {
+ remote-endpoint = <&bridge_in_dsi>;
};
&i2c6 {
@@ -88,7 +76,7 @@
port@0 {
reg = <0>;
bridge_in_dsi: endpoint {
- remote-endpoint = <&dsi_out_bridge>;
+ remote-endpoint = <&dsi_out>;
data-lanes = <1 2>;
};
};
@@ -108,7 +96,7 @@
port {
ltdc_out_dsi: endpoint {
- remote-endpoint = <&dsi_in_ltdc>;
+ remote-endpoint = <&dsi_in>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157a-stinger96.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp157a-stinger96.dtsi
index 5f85598cc7c6..5c1cc48e5199 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157a-stinger96.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157a-stinger96.dtsi
@@ -313,8 +313,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2-scmi.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2-scmi.dts
index 39358d902000..c20a73841c1f 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2-scmi.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2-scmi.dts
@@ -11,7 +11,7 @@
/ {
model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board";
- compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157";
+ compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157";
reserved-memory {
optee@de000000 {
@@ -65,7 +65,7 @@
/delete-property/ st,syscfg-holdboot;
resets = <&scmi_reset RST_SCMI_MCU>,
<&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
- reset-names = "mcu_rst", "hold_boot";
+ reset-names = "mcu_rst", "hold_boot";
};
&rcc {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2.dts
index 4bef2300ed7c..7a701f7ef0c7 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-dk2.dts
@@ -34,26 +34,6 @@
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
- phy-dsi-supply = <&reg18>;
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
- dsi_in: endpoint {
- remote-endpoint = <&ltdc_ep1_out>;
- };
- };
-
- port@1 {
- reg = <1>;
- dsi_out: endpoint {
- remote-endpoint = <&panel_in>;
- };
- };
- };
panel@0 {
compatible = "orisetech,otm8009a";
@@ -70,13 +50,20 @@
};
};
+&dsi_in {
+ remote-endpoint = <&ltdc_ep1_out>;
+};
+
+&dsi_out {
+ remote-endpoint = <&panel_in>;
+};
+
&i2c1 {
touchscreen@38 {
compatible = "focaltech,ft6236";
reg = <0x38>;
interrupts = <2 2>;
interrupt-parent = <&gpiof>;
- interrupt-controller;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-ed1-scmi.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-ed1-scmi.dts
index 07ea765a4553..5e2eaf57ce22 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-ed1-scmi.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-ed1-scmi.dts
@@ -11,7 +11,7 @@
/ {
model = "STMicroelectronics STM32MP157C-ED1 SCMI eval daughter";
- compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157";
+ compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157";
reserved-memory {
optee@fe000000 {
@@ -64,7 +64,7 @@
/delete-property/ st,syscfg-holdboot;
resets = <&scmi_reset RST_SCMI_MCU>,
<&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
- reset-names = "mcu_rst", "hold_boot";
+ reset-names = "mcu_rst", "hold_boot";
};
&rcc {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-emsbc-argon.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-emsbc-argon.dts
index 33b3f11d24bb..a19c488cf7c8 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-emsbc-argon.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-emsbc-argon.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (c) 2021 emtrion GmbH
// Author: Reinhold Müller <reinhold.mueller@emtrion.de>.
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-emstamp-argon.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp157c-emstamp-argon.dtsi
index 94e38141af67..4792004cab0c 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-emstamp-argon.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-emstamp-argon.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (c) 2021 emtrion GmbH
// Author: Reinhold Müller <reinhold.mueller@emtrion.de>.
@@ -310,7 +310,6 @@
vref_ddr: vref_ddr {
regulator-name = "vref_ddr";
regulator-always-on;
- regulator-over-current-protection;
};
bst_out: boost {
@@ -321,7 +320,7 @@
vbus_otg: pwr_sw1 {
regulator-name = "vbus_otg";
interrupts = <IT_OCP_OTG 0>;
- regulator-active-discharge;
+ regulator-active-discharge = <1>;
};
vbus_usbh: pwr_sw2 {
@@ -368,8 +367,8 @@
&m4_rproc {
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
<&vdev0vring1>, <&vdev0buffer>;
- mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
- mbox-names = "vq0", "vq1", "shutdown";
+ mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
+ mbox-names = "vq0", "vq1", "shutdown", "detach";
interrupt-parent = <&exti>;
interrupts = <68 1>;
interrupt-names = "wdg";
@@ -501,14 +500,10 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
&usbh_ohci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1-scmi.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1-scmi.dts
index 813086ec2489..3226fb945a8e 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1-scmi.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1-scmi.dts
@@ -11,8 +11,7 @@
/ {
model = "STMicroelectronics STM32MP157C-EV1 SCMI eval daughter on eval mother";
- compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ev1", "st,stm32mp157c-ed1",
- "st,stm32mp157";
+ compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157";
reserved-memory {
optee@fe000000 {
@@ -70,7 +69,7 @@
/delete-property/ st,syscfg-holdboot;
resets = <&scmi_reset RST_SCMI_MCU>,
<&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
- reset-names = "mcu_rst", "hold_boot";
+ reset-names = "mcu_rst", "hold_boot";
};
&rcc {
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1.dts
index af3800501875..9eb9a1bf4f2c 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1.dts
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-ev1.dts
@@ -100,30 +100,10 @@
};
&dsi {
- phy-dsi-supply = <&reg18>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
- dsi_in: endpoint {
- remote-endpoint = <&ltdc_ep0_out>;
- };
- };
-
- port@1 {
- reg = <1>;
- dsi_out: endpoint {
- remote-endpoint = <&dsi_panel_in>;
- };
- };
- };
-
panel@0 {
compatible = "raydium,rm68200";
reg = <0>;
@@ -140,6 +120,14 @@
};
};
+&dsi_in {
+ remote-endpoint = <&ltdc_ep0_out>;
+};
+
+&dsi_out {
+ remote-endpoint = <&dsi_panel_in>;
+};
+
&ethernet0 {
status = "okay";
pinctrl-0 = <&ethernet0_rgmii_pins_a>;
@@ -374,7 +362,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen1.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen1.dts
new file mode 100644
index 000000000000..81f254fb88b0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen1.dts
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
+/*
+ * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
+ * Copyright (C) 2021 Rouven Czerwinski, Pengutronix
+ * Copyright (C) 2023 Leonard Göhrs, Pengutronix
+ */
+
+/dts-v1/;
+
+#include "stm32mp157.dtsi"
+#include "stm32mp15xc-lxa-tac.dtsi"
+
+/ {
+ model = "Linux Automation Test Automation Controller (TAC) Gen 1";
+ compatible = "lxa,stm32mp157c-tac-gen1", "oct,stm32mp15xx-osd32", "st,stm32mp157";
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ power-supply = <&v3v3>;
+
+ brightness-levels = <0 31 63 95 127 159 191 223 255>;
+ default-brightness-level = <7>;
+ pwms = <&backlight_pwm 1 1000000 0>;
+ };
+
+ reg_iobus_12v: regulator-iobus-12v {
+ compatible = "regulator-fixed";
+ vin-supply = <&reg_12v>;
+
+ gpio = <&gpioh 13 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-max-microvolt = <12000000>;
+ regulator-min-microvolt = <12000000>;
+ regulator-name = "12V_IOBUS";
+ };
+};
+
+&gpioa {
+ gpio-line-names = "", "", "STACK_CS2", "", "STACK_CS3", /* 0 */
+ "ETH_GPIO1", "ETH_INT", "", "", "", /* 5 */
+ "", "", "", "BOOTROM_LED", "ETH_LAB_LEDRP", /* 10 */
+ ""; /* 15 */
+};
+
+&gpioc {
+ gpio-line-names = "", "STACK_CS1", "", "", "", /* 0 */
+ "", "", "", "", "", /* 5 */
+ "", ""; /* 10 */
+};
+
+&gpu {
+ status = "disabled";
+};
+
+&i2c1 {
+ powerboard_gpio: gpio@24 {
+ compatible = "nxp,pca9570";
+ reg = <0x24>;
+
+ #gpio-cells = <2>;
+ gpio-controller;
+ gpio-line-names = "DUT_PWR_EN", "DUT_PWR_DISCH", "DUT_PWR_ADCRST", "";
+ };
+};
+
+&spi2 {
+ adc@0 {
+ compatible = "ti,lmp92064";
+ reg = <0>;
+ spi-max-frequency = <5000000>;
+ vdd-supply = <&reg_pb_3v3>;
+ vdig-supply = <&reg_pb_3v3>;
+ reset-gpios = <&powerboard_gpio 2 GPIO_ACTIVE_HIGH>;
+
+ shunt-resistor-micro-ohms = <15000>;
+ };
+};
+
+&timers1 {
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+
+ backlight_pwm: pwm {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pwm1_pins_c>;
+ pinctrl-1 = <&pwm1_sleep_pins_c>;
+
+ status = "okay";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen2.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen2.dts
new file mode 100644
index 000000000000..8a34d15e9005
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-lxa-tac-gen2.dts
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
+/*
+ * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
+ * Copyright (C) 2021 Rouven Czerwinski, Pengutronix
+ * Copyright (C) 2023 Leonard Göhrs, Pengutronix
+ */
+
+/dts-v1/;
+
+#include "stm32mp157.dtsi"
+#include "stm32mp15xc-lxa-tac.dtsi"
+
+/ {
+ model = "Linux Automation Test Automation Controller (TAC) Gen 2";
+ compatible = "lxa,stm32mp157c-tac-gen2", "oct,stm32mp15xx-osd32", "st,stm32mp157";
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ power-supply = <&v3v3>;
+
+ brightness-levels = <0 31 63 95 127 159 191 223 255>;
+ default-brightness-level = <7>;
+ pwms = <&led_pwm 3 1000000 0>;
+ };
+
+ reg_iobus_12v: regulator-iobus-12v {
+ compatible = "regulator-fixed";
+ vin-supply = <&reg_12v>;
+ gpio = <&gpioh 13 GPIO_ACTIVE_LOW>;
+ regulator-max-microvolt = <12000000>;
+ regulator-min-microvolt = <12000000>;
+ regulator-name = "12V_IOBUS";
+ };
+
+ led-controller-1 {
+ compatible = "pwm-leds-multicolor";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+ max-brightness = <65535>;
+
+ led-red {
+ active-low;
+ color = <LED_COLOR_ID_RED>;
+ pwms = <&led_pwm 0 1000000 0>;
+ };
+
+ led-green {
+ active-low;
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&led_pwm 2 1000000 0>;
+ };
+
+ led-blue {
+ active-low;
+ color = <LED_COLOR_ID_BLUE>;
+ pwms = <&led_pwm 1 1000000 0>;
+ };
+ };
+ };
+
+ led-controller-2 {
+ compatible = "gpio-leds";
+
+ led-5 {
+ label = "tac:green:iobus";
+ gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-6 {
+ label = "tac:green:can";
+ gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-7 {
+ label = "tac:green:out0";
+ gpios = <&gpiob 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-8 {
+ label = "tac:green:out1";
+ gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-9 {
+ label = "tac:green:uarttx";
+ gpios = <&gpiod 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-10 {
+ label = "tac:green:uartrx";
+ gpios = <&gpiof 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-11 {
+ label = "tac:green:usbh1";
+ gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-12 {
+ label = "tac:green:usbh2";
+ gpios = <&gpiod 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-13 {
+ label = "tac:green:usbh3";
+ gpios = <&gpiob 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-14 {
+ label = "tac:green:usbg";
+ gpios = <&gpiod 14 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "usb-gadget";
+ };
+
+ led-15 {
+ label = "tac:green:dutpwr";
+ gpios = <&gpioa 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpioa {
+ gpio-line-names = "", "", "DUT_PWR_EN", "", "STACK_CS3", /* 0 */
+ "ETH_GPIO1", "ETH_INT", "", "", "", /* 5 */
+ "", "", "", "BOOTROM_LED", "ETH_LAB_LEDRP", /* 10 */
+ ""; /* 15 */
+};
+
+&gpioc {
+ gpio-line-names = "", "DUT_PWR_DISCH", "", "", "", /* 0 */
+ "", "", "", "", "", /* 5 */
+ "", ""; /* 10 */
+};
+
+&gpu {
+ status = "disabled";
+};
+
+&m_can2 {
+ termination-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>;
+ termination-ohms = <120>;
+};
+
+&spi2 {
+ adc@0 {
+ compatible = "ti,lmp92064";
+ reg = <0>;
+
+ reset-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>;
+ shunt-resistor-micro-ohms = <15000>;
+ spi-max-frequency = <5000000>;
+ vdd-supply = <&reg_pb_3v3>;
+ vdig-supply = <&reg_pb_3v3>;
+ };
+};
+
+&timers8 {
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+
+ led_pwm: pwm {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pwm8_pins_b>;
+ pinctrl-1 = <&pwm8_sleep_pins_b>;
+ status = "okay";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-odyssey-som.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp157c-odyssey-som.dtsi
index e22871dc580c..cf7485251490 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-odyssey-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-odyssey-som.dtsi
@@ -230,8 +230,8 @@
&m4_rproc {
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
<&vdev0vring1>, <&vdev0buffer>;
- mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
- mbox-names = "vq0", "vq1", "shutdown";
+ mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
+ mbox-names = "vq0", "vq1", "shutdown", "detach";
interrupt-parent = <&exti>;
interrupts = <68 1>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-osd32mp1-red.dts b/sys/contrib/device-tree/src/arm/st/stm32mp157c-osd32mp1-red.dts
new file mode 100644
index 000000000000..527c33be66cc
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-osd32mp1-red.dts
@@ -0,0 +1,221 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) Geanix ApS 2023 - All Rights Reserved
+ * Author: Sean Nyekjaer <sean@geanix.com>
+ */
+
+/dts-v1/;
+
+#include "stm32mp157.dtsi"
+#include "stm32mp15xc.dtsi"
+#include "stm32mp15xx-osd32.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/stm32-pinfunc.h>
+
+/ {
+ model = "Octavo OSD32MP1 RED board";
+ compatible = "oct,stm32mp157c-osd32-red", "oct,stm32mp15xx-osd32", "st,stm32mp157";
+
+ aliases {
+ serial0 = &uart4;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ led-controller-0 {
+ compatible = "gpio-leds";
+
+ led-0 {
+ label = "heartbeat";
+ gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+};
+
+&crc1 {
+ status = "okay";
+};
+
+&dts {
+ status = "okay";
+};
+
+&ethernet0 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&ethernet0_rgmii_pins_a>;
+ pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
+ phy-mode = "rgmii-id";
+ max-speed = <1000>;
+ phy-handle = <&phy0>;
+ st,eth-clk-sel;
+ status = "okay";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy0: ethernet-phy@3 {
+ reg = <3>;
+ };
+ };
+};
+
+&iwdg2 {
+ timeout-sec = <32>;
+ status = "okay";
+};
+
+&i2c1 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&i2c1_pins_a>;
+ pinctrl-1 = <&i2c1_sleep_pins_a>;
+ status = "okay";
+ i2c-scl-rising-time-ns = <100>;
+ i2c-scl-falling-time-ns = <7>;
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ hdmi-transmitter@39 {
+ compatible = "sil,sii9022";
+ reg = <0x39>;
+ reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>;
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpiog>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&ltdc_pins_e>;
+ pinctrl-1 = <&ltdc_sleep_pins_e>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ sii9022_in: endpoint {
+ remote-endpoint = <&ltdc_ep0_out>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+ sii9022_tx_endpoint: endpoint {
+ remote-endpoint = <&i2s2_endpoint>;
+ };
+ };
+ };
+ };
+};
+
+&i2s2 {
+ clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc CK_PER>, <&rcc PLL3_R>;
+ clock-names = "pclk", "i2sclk", "x8k", "x11k";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&i2s2_pins_b>;
+ pinctrl-1 = <&i2s2_sleep_pins_b>;
+ status = "okay";
+
+ i2s2_port: port {
+ i2s2_endpoint: endpoint {
+ remote-endpoint = <&sii9022_tx_endpoint>;
+ dai-format = "i2s";
+ mclk-fs = <256>;
+ };
+ };
+};
+
+&ltdc {
+ status = "okay";
+
+ port {
+ ltdc_ep0_out: endpoint {
+ remote-endpoint = <&sii9022_in>;
+ };
+ };
+};
+
+&m_can1 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&m_can1_pins_d>;
+ pinctrl-1 = <&m_can1_sleep_pins_d>;
+ status = "okay";
+};
+
+&pwr_regulators {
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+};
+
+&rtc {
+ status = "okay";
+};
+
+&sdmmc1 {
+ pinctrl-names = "default", "opendrain", "sleep";
+ pinctrl-0 = <&sdmmc1_b4_pins_a>;
+ pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
+ pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+ cd-gpios = <&gpioe 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ disable-wp;
+ st,neg-edge;
+ bus-width = <4>;
+ vmmc-supply = <&v3v3>;
+ status = "okay";
+};
+
+&sdmmc2 {
+ pinctrl-names = "default", "opendrain", "sleep";
+ pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_d>;
+ pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
+ pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_d>;
+ non-removable;
+ no-sd;
+ no-sdio;
+ st,neg-edge;
+ bus-width = <8>;
+ vmmc-supply = <&v3v3>;
+ vqmmc-supply = <&vdd>;
+ mmc-ddr-3_3v;
+ status = "okay";
+};
+
+&uart4 {
+ pinctrl-names = "default", "sleep", "idle";
+ pinctrl-0 = <&uart4_pins_a>;
+ pinctrl-1 = <&uart4_sleep_pins_a>;
+ pinctrl-2 = <&uart4_idle_pins_a>;
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+ status = "okay";
+};
+
+&usbh_ehci {
+ status = "okay";
+};
+
+&usbh_ohci {
+ status = "okay";
+};
+
+&usbotg_hs {
+ vbus-supply = <&vbus_otg>;
+};
+
+&usbphyc {
+ status = "okay";
+};
+
+&usbphyc_port0 {
+ phy-supply = <&vdd_usb>;
+};
+
+&usbphyc_port1 {
+ phy-supply = <&vdd_usb>;
+};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp157c-phycore-stm32mp15-som.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp157c-phycore-stm32mp15-som.dtsi
index 4e8b2d2b30c7..bf0c32027baf 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp157c-phycore-stm32mp15-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp157c-phycore-stm32mp15-som.dtsi
@@ -547,14 +547,10 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
&usbh_ohci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xc-lxa-tac.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xc-lxa-tac.dtsi
new file mode 100644
index 000000000000..fc3a2386dbb9
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xc-lxa-tac.dtsi
@@ -0,0 +1,603 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
+/*
+ * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
+ * Copyright (C) 2021 Rouven Czerwinski, Pengutronix
+ * Copyright (C) 2023 Leonard Göhrs, Pengutronix
+ */
+
+#include "stm32mp15xc.dtsi"
+#include "stm32mp15xx-osd32.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+ aliases {
+ ethernet0 = &ethernet0;
+ ethernet1 = &port_uplink;
+ ethernet2 = &port_dut;
+ mmc1 = &sdmmc2;
+ serial0 = &uart4;
+ serial1 = &usart3;
+ };
+
+ chosen {
+ stdout-path = &uart4;
+ };
+
+ led-controller-0 {
+ compatible = "gpio-leds";
+
+ led-0 {
+ label = "tac:green:user1";
+ gpios = <&gpiof 10 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ label = "tac:green:user2";
+ gpios = <&gpiog 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-2 {
+ label = "tac:green:statusdut";
+ gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
+ };
+
+ /* led-3 and led-4 are internally connected antiparallel to one
+ * another inside the ethernet jack like this:
+ * GPIOA14 ---+---|led-3|>--+--- GPIOD15
+ * +--<|led-4|---+
+ * E.g. only one of the LEDs can be illuminated at a time while
+ * the other output must be driven low.
+ * This should likely be implemented using a multi color LED
+ * driver for antiparallel LEDs.
+ */
+ led-3 {
+ label = "tac:green:statuslab";
+ gpios = <&gpioa 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-4 {
+ label = "tac:orange:statuslab";
+ gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-lower {
+ label = "USER_BTN2";
+ linux,code = <KEY_ESC>;
+ gpios = <&gpioe 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ };
+
+ button-upper {
+ label = "USER_BTN";
+ linux,code = <KEY_HOME>;
+ gpios = <&gpioi 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ };
+ };
+
+ /* supplied by either barrel connector or PoE */
+ reg_12v: regulator-12v {
+ compatible = "regulator-fixed";
+ regulator-name = "12V";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ regulator-always-on;
+ };
+
+ reg_5v: regulator-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ vin-supply = <&reg_12v>;
+ };
+
+ reg_1v2: regulator-1v2 {
+ compatible = "regulator-fixed";
+ regulator-name = "1V2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ vin-supply = <&reg_5v>;
+ };
+
+ reg_pb_5v: regulator-pb-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "5V_POWERBOARD";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ vin-supply = <&reg_5v>;
+ };
+
+ reg_pb_3v3: regulator-pb-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "3V3_POWERBOARD";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <&reg_pb_5v>;
+ };
+
+ output-iobus-12v {
+ compatible = "regulator-output";
+ vout-supply = <&reg_iobus_12v>;
+ };
+
+ output-vuart {
+ compatible = "regulator-output";
+ vout-supply = <&v3v3_hdmi>;
+ };
+};
+
+baseboard_eeprom: &sip_eeprom {
+};
+
+&adc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&adc1_ain_pins_a>;
+ vdd-supply = <&vdd>;
+ vdda-supply = <&vdda>;
+ vref-supply = <&vrefbuf>;
+ status = "okay";
+
+ adc1: adc@0 {
+ st,adc-channels = <0 1 2 5 9 10 13 15>;
+ st,min-sample-time-nsecs = <5000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ channel@0 {
+ reg = <0>;
+ label = "HOST_2_CURR_FB";
+ };
+
+ channel@1 {
+ reg = <1>;
+ label = "HOST_3_CURR_FB";
+ };
+
+ channel@2 {
+ reg = <2>;
+ label = "OUT_0_FB";
+ };
+
+ channel@5 {
+ reg = <5>;
+ label = "IOBUS_CURR_FB";
+ };
+
+ channel@9 {
+ reg = <9>;
+ label = "IOBUS_VOLT_FB";
+ };
+
+ channel@10 {
+ reg = <10>;
+ label = "OUT_1_FB";
+ };
+
+ channel@13 {
+ reg = <13>;
+ label = "HOST_CURR_FB";
+ };
+
+ channel@15 {
+ reg = <15>;
+ label = "HOST_1_CURR_FB";
+ };
+ };
+
+ adc2: adc@100 {
+ st,adc-channels = <12>;
+ st,min-sample-time-nsecs = <500000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ channel@12 {
+ reg = <12>;
+ label = "TEMP_INTERNAL";
+ };
+ };
+};
+
+&crc1 {
+ status = "okay";
+};
+
+&cryp1 {
+ status = "okay";
+};
+
+&dts {
+ status = "okay";
+};
+
+&ethernet0 {
+ assigned-clocks = <&rcc ETHCK_K>, <&rcc PLL4_P>;
+ assigned-clock-parents = <&rcc PLL4_P>;
+ assigned-clock-rates = <125000000>; /* Clock PLL4 to 750Mhz in ATF */
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&ethernet0_rgmii_pins_e>;
+ pinctrl-1 = <&ethernet0_rgmii_sleep_pins_e>;
+
+ st,eth-clk-sel;
+ phy-mode = "rgmii-id";
+
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
+&ethernet0_rgmii_pins_e {
+ pins1 {
+ /* Reduce EMI emission by reducing RGMII drive strength */
+ slew-rate = <1>;
+ };
+};
+
+&gpiob {
+ gpio-line-names = "", "", "", "", "", /* 0 */
+ "", "USB_RESET", "", "", "", /* 5 */
+ "", "", "", "", "", /* 10 */
+ ""; /* 15 */
+};
+
+&gpiod {
+ gpio-line-names = "", "", "", "", "TP38", /* 0 */
+ "TP39", "", "", "TP41", "TP42", /* 5 */
+ "OLED_DC", "", "", "ETH_CS", "", /* 10 */
+ "ETH_LAB_LEDRN"; /* 15 */
+};
+
+&gpioe {
+ gpio-line-names = "TP35", "", "", "", "CAN_1_120R", /* 0 */
+ "", "", "USER_BTN2", "TP48", "UART_TX_EN", /* 5 */
+ "UART_RX_EN", "TP24", "", "TP25", "TP26", /* 10 */
+ "TP27"; /* 15 */
+};
+
+&gpiof {
+ gpio-line-names = "TP36", "TP37", "", "", "OLED_CS", /* 0 */
+ "", "", "", "", "", /* 5 */
+ "USER_LED1", "", "STACK_CS0", "", "", /* 10 */
+ ""; /* 15 */
+};
+
+&gpiog {
+ gpio-line-names = "ETH_RESET", "", "", "", "", /* 0 */
+ "IOBUS_FLT_FB", "", "USER_LED2", "ETH1_PPS_A", "CAN_0_120R", /* 5 */
+ "TP49", "", "", "", "", /* 10 */
+ ""; /* 15 */
+};
+
+&gpioh {
+ gpio-line-names = "", "", "OUT_1", "OUT_0", "OLED_RESET", /* 0 */
+ "", "", "", "", "", /* 5 */
+ "ETH1_PPS_B", "ETH_GPIO2", "", "IOBUS_PWR_EN", "", /* 10 */
+ "TP33"; /* 15 */
+};
+
+&gpioi {
+ gpio-line-names = "TIM_RTS", "", "", "", "DEVICE_DATA_EN", /* 0 */
+ "", "", "", "ETH_WOL", "TP43", /* 5 */
+ "", "USER_BTN"; /* 10 */
+};
+
+&gpioz {
+ gpio-line-names = "HWID0", "HWID1", "HWID2", "HWID3", "", /* 0 */
+ "", "HWID4", "HWID5"; /* 5 */
+};
+
+&hash1 {
+ status = "okay";
+};
+
+&i2c1 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&i2c1_pins_b>;
+ pinctrl-1 = <&i2c1_sleep_pins_b>;
+ status = "okay";
+
+ powerboard_eeprom: eeprom@50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ vcc-supply = <&v3v3>;
+ };
+
+ temperature-sensor@48 {
+ compatible = "national,lm75a";
+ reg = <0x48>;
+ status = "disabled";
+ };
+};
+
+&i2c5 {
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&i2c5_pins_b>;
+ pinctrl-1 = <&i2c5_sleep_pins_b>;
+
+ status = "okay";
+
+ usbhub: usbhub@2c {
+ compatible ="microchip,usb2514b";
+ reg = <0x2c>;
+ vdd-supply = <&v3v3>;
+ reset-gpios = <&gpiob 6 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&iwdg2 {
+ timeout-sec = <8>;
+ status = "okay";
+};
+
+&m_can1 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&m_can1_pins_b>;
+ pinctrl-1 = <&m_can1_sleep_pins_b>;
+ status = "okay";
+};
+
+&m_can2 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&m_can2_pins_a>;
+ pinctrl-1 = <&m_can2_sleep_pins_a>;
+ status = "okay";
+};
+
+&pmic {
+ regulators {
+ buck1-supply = <&reg_5v>; /* VIN */
+ buck2-supply = <&reg_5v>; /* VIN */
+ buck3-supply = <&reg_5v>; /* VIN */
+ buck4-supply = <&reg_5v>; /* VIN */
+ ldo2-supply = <&reg_5v>; /* PMIC_LDO25IN */
+ ldo4-supply = <&reg_5v>; /* VIN */
+ ldo5-supply = <&reg_5v>; /* PMIC_LDO25IN */
+ vref_ddr-supply = <&reg_5v>; /* VIN */
+ boost-supply = <&reg_5v>; /* PMIC_BSTIN */
+ pwr_sw2-supply = <&bst_out>; /* PMIC_SWIN */
+ };
+};
+
+&pwr_regulators {
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+};
+
+&rtc {
+ status = "okay";
+};
+
+&sdmmc2 {
+ pinctrl-names = "default", "opendrain", "sleep";
+ pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
+ pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_b>;
+ pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_b>;
+ vmmc-supply = <&v3v3>;
+
+ bus-width = <8>;
+ mmc-ddr-3_3v;
+ no-1-8-v;
+ non-removable;
+ no-sd;
+ no-sdio;
+ st,neg-edge;
+
+ status = "okay";
+};
+
+&spi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2_pins_c>;
+ cs-gpios = <&gpiof 12 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&spi4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi4_pins_a>;
+ cs-gpios = <&gpiof 4 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ lcd: display@0 {
+ compatible = "shineworld,lh133k", "panel-mipi-dbi-spi";
+ reg = <0>;
+ power-supply = <&v3v3>;
+ io-supply = <&v3v3>;
+ backlight = <&backlight>;
+ dc-gpios = <&gpiod 10 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpioh 4 GPIO_ACTIVE_HIGH>;
+ spi-3wire;
+ spi-max-frequency = <32000000>;
+
+ width-mm = <23>;
+ height-mm = <23>;
+ rotation = <180>;
+
+ panel-timing {
+ hactive = <240>;
+ vactive = <240>;
+ hback-porch = <0>;
+ vback-porch = <0>;
+
+ clock-frequency = <0>;
+ hfront-porch = <0>;
+ hsync-len = <0>;
+ vfront-porch = <0>;
+ vsync-len = <0>;
+ };
+ };
+};
+
+&spi5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi5_pins_a>;
+
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ cs-gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+
+ switch: switch@0 {
+ compatible = "microchip,ksz9563";
+ reg = <0>;
+
+ reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>;
+ spi-max-frequency = <44000000>;
+
+ interrupt-parent = <&gpioa>;
+ interrupts = <6 IRQ_TYPE_EDGE_RISING>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port_dut: port@0 {
+ reg = <0>;
+ label = "dut";
+ };
+
+ port_uplink: port@1 {
+ reg = <1>;
+ label = "uplink";
+ };
+
+ port_cpu: port@2 {
+ reg = <2>;
+ label = "cpu";
+
+ ethernet = <&ethernet0>;
+
+ phy-mode = "rgmii-id";
+ rx-internal-delay-ps = <2000>;
+ tx-internal-delay-ps = <2000>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+};
+
+&timers2 {
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+
+ timer@1 {
+ status = "okay";
+ };
+};
+
+&timers3 {
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+
+ timer@2 {
+ status = "okay";
+ };
+};
+
+&timers4 {
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+
+ timer@3 {
+ status = "okay";
+ };
+};
+
+&uart4 {
+ label = "debug";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins_a>;
+
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+};
+
+&usart3 {
+ label = "dut";
+ uart-has-rtscts;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&usart3_pins_f>;
+
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ status = "okay";
+};
+
+&usbh_ehci {
+ status = "okay";
+};
+
+&usbotg_hs {
+ phys = <&usbphyc_port1 0>;
+ phy-names = "usb2-phy";
+
+ vusb_d-supply = <&vdd_usb>;
+ vusb_a-supply = <&reg18>;
+
+ dr_mode = "peripheral";
+
+ status = "okay";
+};
+
+&usbphyc {
+ status = "okay";
+};
+
+&usbphyc_port0 {
+ phy-supply = <&vdd_usb>;
+};
+
+&usbphyc_port1 {
+ phy-supply = <&vdd_usb>;
+};
+
+&vrefbuf {
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ vdda-supply = <&vdda>;
+
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-drc02.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-drc02.dtsi
index 35b1034aa3cf..bb4f8a0b937f 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-drc02.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-drc02.dtsi
@@ -152,7 +152,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-pdk2.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-pdk2.dtsi
index 46b87a27d8b3..466d9701add0 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-pdk2.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-pdk2.dtsi
@@ -305,7 +305,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-picoitx.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-picoitx.dtsi
index abc595350e71..b5bc53accd6b 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-picoitx.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-picoitx.dtsi
@@ -119,12 +119,10 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
};
&usbh_ohci {
- phys = <&usbphyc_port0>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-som.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-som.dtsi
index e61df23d361a..74a11ccc5333 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcom-som.dtsi
@@ -416,8 +416,8 @@
&m4_rproc {
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
<&vdev0vring1>, <&vdev0buffer>;
- mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
- mbox-names = "vq0", "vq1", "shutdown";
+ mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
+ mbox-names = "vq0", "vq1", "shutdown", "detach";
interrupt-parent = <&exti>;
interrupts = <68 1>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-avenger96.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-avenger96.dtsi
index 0069ad75d55e..343a4613dfca 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-avenger96.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-avenger96.dtsi
@@ -489,8 +489,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
- phy-names = "usb";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-drc-compact.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-drc-compact.dtsi
index 92d906bfd5d7..bc4ddcbdd5cf 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-drc-compact.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-drc-compact.dtsi
@@ -312,12 +312,10 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
};
&usbh_ohci {
- phys = <&usbphyc_port0>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-som.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-som.dtsi
index bba19f21e527..89881a26c614 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-som.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-som.dtsi
@@ -227,8 +227,8 @@
&m4_rproc {
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
<&vdev0vring1>, <&vdev0buffer>;
- mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
- mbox-names = "vq0", "vq1", "shutdown";
+ mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
+ mbox-names = "vq0", "vq1", "shutdown", "detach";
interrupt-parent = <&exti>;
interrupts = <68 1>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-testbench.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-testbench.dtsi
index ab7f0ba49639..6e79c4b6fe32 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-testbench.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dhcor-testbench.dtsi
@@ -168,12 +168,10 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
};
&usbh_ohci {
- phys = <&usbphyc_port0>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dkx.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dkx.dtsi
index 511113f2e399..f7634c51efb2 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dkx.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-dkx.dtsi
@@ -680,7 +680,6 @@
};
&usbh_ehci {
- phys = <&usbphyc_port0>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-osd32.dtsi b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-osd32.dtsi
index a43965c86fe8..aeb71c41a734 100644
--- a/sys/contrib/device-tree/src/arm/st/stm32mp15xx-osd32.dtsi
+++ b/sys/contrib/device-tree/src/arm/st/stm32mp15xx-osd32.dtsi
@@ -117,18 +117,14 @@
regulator-name = "v1v8_audio";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
- regulator-always-on;
interrupts = <IT_CURLIM_LDO1 0>;
-
};
v3v3_hdmi: ldo2 {
regulator-name = "v3v3_hdmi";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- regulator-always-on;
interrupts = <IT_CURLIM_LDO2 0>;
-
};
vtt_ddr: ldo3 {
@@ -156,9 +152,7 @@
regulator-name = "v1v2_hdmi";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
- regulator-always-on;
interrupts = <IT_CURLIM_LDO6 0>;
-
};
vref_ddr: vref_ddr {
diff --git a/sys/contrib/device-tree/src/arm/ti/davinci/da850-evm.dts b/sys/contrib/device-tree/src/arm/ti/davinci/da850-evm.dts
index 111708d992ca..6c5936278e75 100644
--- a/sys/contrib/device-tree/src/arm/ti/davinci/da850-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/davinci/da850-evm.dts
@@ -161,7 +161,7 @@
&pmx_core {
status = "okay";
- mcasp0_pins: pinmux_mcasp0_pins {
+ mcasp0_pins: mcasp0-pins {
pinctrl-single,bits = <
/*
* AHCLKX, ACLKX, AFSX, AHCLKR, ACLKR,
@@ -172,7 +172,7 @@
0x04 0x00011000 0x000ff000
>;
};
- nand_pins: nand_pins {
+ nand_pins: nand-pins {
pinctrl-single,bits = <
/* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[4], EMA_CS[3] */
0x1c 0x10110110 0xf0ff0ff0
diff --git a/sys/contrib/device-tree/src/arm/ti/davinci/da850-lcdk.dts b/sys/contrib/device-tree/src/arm/ti/davinci/da850-lcdk.dts
index e379d6e7ad49..8390d71b000a 100644
--- a/sys/contrib/device-tree/src/arm/ti/davinci/da850-lcdk.dts
+++ b/sys/contrib/device-tree/src/arm/ti/davinci/da850-lcdk.dts
@@ -199,7 +199,7 @@
&pmx_core {
status = "okay";
- mcasp0_pins: pinmux_mcasp0_pins {
+ mcasp0_pins: mcasp0-pins {
pinctrl-single,bits = <
/* AHCLKX AFSX ACLKX */
0x00 0x00101010 0x00f0f0f0
@@ -208,7 +208,7 @@
>;
};
- nand_pins: nand_pins {
+ nand_pins: nand-pins {
pinctrl-single,bits = <
/* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */
0x1c 0x10110010 0xf0ff00f0
diff --git a/sys/contrib/device-tree/src/arm/ti/davinci/da850-lego-ev3.dts b/sys/contrib/device-tree/src/arm/ti/davinci/da850-lego-ev3.dts
index afd04a423856..4df10379ff22 100644
--- a/sys/contrib/device-tree/src/arm/ti/davinci/da850-lego-ev3.dts
+++ b/sys/contrib/device-tree/src/arm/ti/davinci/da850-lego-ev3.dts
@@ -234,7 +234,7 @@
&pmx_core {
status = "okay";
- ev3_lcd_pins: pinmux_lcd {
+ ev3_lcd_pins: lcd-pins {
pinctrl-single,bits = <
/* SIMO, CLK */
0x14 0x00100100 0x00f00f00
@@ -391,7 +391,7 @@
pinctrl-names = "default";
cs-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
- display@0{
+ display@0 {
compatible = "lego,ev3-lcd";
reg = <0>;
spi-max-frequency = <10000000>;
diff --git a/sys/contrib/device-tree/src/arm/ti/davinci/da850.dtsi b/sys/contrib/device-tree/src/arm/ti/davinci/da850.dtsi
index e46e4d22db39..f759fdfe1b10 100644
--- a/sys/contrib/device-tree/src/arm/ti/davinci/da850.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/davinci/da850.dtsi
@@ -170,55 +170,55 @@
#pinctrl-single,gpio-range-cells = <3>;
};
- serial0_rtscts_pins: pinmux_serial0_rtscts_pins {
+ serial0_rtscts_pins: serial0-rtscts-pins {
pinctrl-single,bits = <
/* UART0_RTS UART0_CTS */
0x0c 0x22000000 0xff000000
>;
};
- serial0_rxtx_pins: pinmux_serial0_rxtx_pins {
+ serial0_rxtx_pins: serial0-rxtx-pins {
pinctrl-single,bits = <
/* UART0_TXD UART0_RXD */
0x0c 0x00220000 0x00ff0000
>;
};
- serial1_rtscts_pins: pinmux_serial1_rtscts_pins {
+ serial1_rtscts_pins: serial1-rtscts-pins {
pinctrl-single,bits = <
/* UART1_CTS UART1_RTS */
0x00 0x00440000 0x00ff0000
>;
};
- serial1_rxtx_pins: pinmux_serial1_rxtx_pins {
+ serial1_rxtx_pins: serial1-rxtx-pins {
pinctrl-single,bits = <
/* UART1_TXD UART1_RXD */
0x10 0x22000000 0xff000000
>;
};
- serial2_rtscts_pins: pinmux_serial2_rtscts_pins {
+ serial2_rtscts_pins: serial2-rtscts-pins {
pinctrl-single,bits = <
/* UART2_CTS UART2_RTS */
0x00 0x44000000 0xff000000
>;
};
- serial2_rxtx_pins: pinmux_serial2_rxtx_pins {
+ serial2_rxtx_pins: serial2-rxtx-pins {
pinctrl-single,bits = <
/* UART2_TXD UART2_RXD */
0x10 0x00220000 0x00ff0000
>;
};
- i2c0_pins: pinmux_i2c0_pins {
+ i2c0_pins: i2c0-pins {
pinctrl-single,bits = <
/* I2C0_SDA,I2C0_SCL */
0x10 0x00002200 0x0000ff00
>;
};
- i2c1_pins: pinmux_i2c1_pins {
+ i2c1_pins: i2c1-pins {
pinctrl-single,bits = <
/* I2C1_SDA, I2C1_SCL */
0x10 0x00440000 0x00ff0000
>;
};
- mmc0_pins: pinmux_mmc_pins {
+ mmc0_pins: mmc-pins {
pinctrl-single,bits = <
/* MMCSD0_DAT[3] MMCSD0_DAT[2]
* MMCSD0_DAT[1] MMCSD0_DAT[0]
@@ -227,85 +227,85 @@
0x28 0x00222222 0x00ffffff
>;
};
- ehrpwm0a_pins: pinmux_ehrpwm0a_pins {
+ ehrpwm0a_pins: ehrpwm0a-pins {
pinctrl-single,bits = <
/* EPWM0A */
0xc 0x00000002 0x0000000f
>;
};
- ehrpwm0b_pins: pinmux_ehrpwm0b_pins {
+ ehrpwm0b_pins: ehrpwm0b-pins {
pinctrl-single,bits = <
/* EPWM0B */
0xc 0x00000020 0x000000f0
>;
};
- ehrpwm1a_pins: pinmux_ehrpwm1a_pins {
+ ehrpwm1a_pins: ehrpwm1a-pins {
pinctrl-single,bits = <
/* EPWM1A */
0x14 0x00000002 0x0000000f
>;
};
- ehrpwm1b_pins: pinmux_ehrpwm1b_pins {
+ ehrpwm1b_pins: ehrpwm1b-pins {
pinctrl-single,bits = <
/* EPWM1B */
0x14 0x00000020 0x000000f0
>;
};
- ecap0_pins: pinmux_ecap0_pins {
+ ecap0_pins: ecap0-pins {
pinctrl-single,bits = <
/* ECAP0_APWM0 */
0x8 0x20000000 0xf0000000
>;
};
- ecap1_pins: pinmux_ecap1_pins {
+ ecap1_pins: ecap1-pins {
pinctrl-single,bits = <
/* ECAP1_APWM1 */
0x4 0x40000000 0xf0000000
>;
};
- ecap2_pins: pinmux_ecap2_pins {
+ ecap2_pins: ecap2-pins {
pinctrl-single,bits = <
/* ECAP2_APWM2 */
0x4 0x00000004 0x0000000f
>;
};
- spi0_pins: pinmux_spi0_pins {
+ spi0_pins: spi0-pins {
pinctrl-single,bits = <
/* SIMO, SOMI, CLK */
0xc 0x00001101 0x0000ff0f
>;
};
- spi0_cs0_pin: pinmux_spi0_cs0 {
+ spi0_cs0_pin: spi0-cs0-pins {
pinctrl-single,bits = <
/* CS0 */
0x10 0x00000010 0x000000f0
>;
};
- spi0_cs3_pin: pinmux_spi0_cs3_pin {
+ spi0_cs3_pin: spi0-cs3-pins {
pinctrl-single,bits = <
/* CS3 */
0xc 0x01000000 0x0f000000
>;
};
- spi1_pins: pinmux_spi1_pins {
+ spi1_pins: spi1-pins {
pinctrl-single,bits = <
/* SIMO, SOMI, CLK */
0x14 0x00110100 0x00ff0f00
>;
};
- spi1_cs0_pin: pinmux_spi1_cs0 {
+ spi1_cs0_pin: spi1-cs0-pins {
pinctrl-single,bits = <
/* CS0 */
0x14 0x00000010 0x000000f0
>;
};
- mdio_pins: pinmux_mdio_pins {
+ mdio_pins: mdio-pins {
pinctrl-single,bits = <
/* MDIO_CLK, MDIO_D */
0x10 0x00000088 0x000000ff
>;
};
- mii_pins: pinmux_mii_pins {
+ mii_pins: mii-pins {
pinctrl-single,bits = <
/*
* MII_TXEN, MII_TXCLK, MII_COL
@@ -321,7 +321,7 @@
0xc 0x88888888 0xffffffff
>;
};
- lcd_pins: pinmux_lcd_pins {
+ lcd_pins: lcd-pins {
pinctrl-single,bits = <
/*
* LCD_D[2], LCD_D[3], LCD_D[4], LCD_D[5],
@@ -342,7 +342,7 @@
0x4c 0x02000022 0x0f0000ff
>;
};
- vpif_capture_pins: vpif_capture_pins {
+ vpif_capture_pins: vpif-capture-pins {
pinctrl-single,bits = <
/* VP_DIN[2..7], VP_CLKIN1, VP_CLKIN0 */
0x38 0x11111111 0xffffffff
@@ -352,7 +352,7 @@
0x40 0x00000011 0x000000ff
>;
};
- vpif_display_pins: vpif_display_pins {
+ vpif_display_pins: vpif-display-pins {
pinctrl-single,bits = <
/* VP_DOUT[2..7] */
0x40 0x11111100 0xffffff00
@@ -421,7 +421,7 @@
/* eDMA3 CC0: 0x01c0 0000 - 0x01c0 7fff */
reg = <0x0 0x8000>;
reg-names = "edma3_cc";
- interrupts = <11 12>;
+ interrupts = <11>, <12>;
interrupt-names = "edma3_ccint", "edma3_ccerrint";
#dma-cells = <2>;
@@ -447,7 +447,7 @@
/* eDMA3 CC1: 0x01e3 0000 - 0x01e3 7fff */
reg = <0x230000 0x8000>;
reg-names = "edma3_cc";
- interrupts = <93 94>;
+ interrupts = <93>, <94>;
interrupt-names = "edma3_ccint", "edma3_ccerrint";
#dma-cells = <2>;
@@ -494,8 +494,7 @@
rtc0: rtc@23000 {
compatible = "ti,da830-rtc";
reg = <0x23000 0x1000>;
- interrupts = <19
- 19>;
+ interrupts = <19>, <19>;
clocks = <&pll0_auxclk>;
clock-names = "int-clk";
status = "disabled";
@@ -725,11 +724,7 @@
ti,davinci-ctrl-ram-offset = <0>;
ti,davinci-ctrl-ram-size = <0x2000>;
local-mac-address = [ 00 00 00 00 00 00 ];
- interrupts = <33
- 34
- 35
- 36
- >;
+ interrupts = <33>, <34>, <35>,<36>;
clocks = <&psc1 5>;
power-domains = <&psc1 5>;
status = "disabled";
@@ -748,7 +743,7 @@
gpio-controller;
#gpio-cells = <2>;
reg = <0x226000 0x1000>;
- interrupts = <42 43 44 45 46 47 48 49 50>;
+ interrupts = <42>, <43>, <44>, <45>, <46>, <47>, <48>, <49>, <50>;
ti,ngpio = <144>;
ti,davinci-gpio-unbanked = <0>;
clocks = <&psc1 3>;
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2e-netcp.dtsi b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2e-netcp.dtsi
index bff73a0ed10b..5c88a90903b8 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2e-netcp.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2e-netcp.dtsi
@@ -36,9 +36,9 @@ qmss: qmss@2a40000 {
qpend {
qpend-0 {
qrange = <658 8>;
- interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
- 0 43 0xf04 0 44 0xf04 0 45 0xf04
- 0 46 0xf04 0 47 0xf04>;
+ interrupts = <0 40 0xf04 0 41 0xf04 0 42 0xf04
+ 0 43 0xf04 0 44 0xf04 0 45 0xf04
+ 0 46 0xf04 0 47 0xf04>;
};
qpend-1 {
qrange = <528 16>;
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-evm.dts b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-evm.dts
index 7bfc80f1af26..f0ddbbcdc972 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-evm.dts
@@ -9,7 +9,7 @@
#include "keystone-k2g.dtsi"
/ {
- compatible = "ti,k2g-evm", "ti,k2g", "ti,keystone";
+ compatible = "ti,k2g-evm", "ti,k2g", "ti,keystone";
model = "Texas Instruments K2G General Purpose EVM";
memory@800000000 {
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-netcp.dtsi b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-netcp.dtsi
index f6306933ff42..7109ca031617 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-netcp.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2g-netcp.dtsi
@@ -37,9 +37,9 @@ qmss: qmss@4020000 {
qpend {
qpend-0 {
qrange = <77 8>;
- interrupts =<0 308 0xf04 0 309 0xf04 0 310 0xf04
- 0 311 0xf04 0 312 0xf04 0 313 0xf04
- 0 314 0xf04 0 315 0xf04>;
+ interrupts = <0 308 0xf04 0 309 0xf04 0 310 0xf04
+ 0 311 0xf04 0 312 0xf04 0 313 0xf04
+ 0 314 0xf04 0 315 0xf04>;
qalloc-by-id;
};
};
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-evm.dts b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-evm.dts
index 206df8a8d9dd..8dfb54295027 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-evm.dts
@@ -10,7 +10,7 @@
#include "keystone-k2hk.dtsi"
/ {
- compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone";
+ compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone";
model = "Texas Instruments Keystone 2 Kepler/Hawking EVM";
reserved-memory {
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-netcp.dtsi b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-netcp.dtsi
index 8a421c65f920..c2ee775eab6a 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-netcp.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2hk-netcp.dtsi
@@ -49,9 +49,9 @@ qmss: qmss@2a40000 {
qpend {
qpend-0 {
qrange = <658 8>;
- interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
- 0 43 0xf04 0 44 0xf04 0 45 0xf04
- 0 46 0xf04 0 47 0xf04>;
+ interrupts = <0 40 0xf04 0 41 0xf04 0 42 0xf04
+ 0 43 0xf04 0 44 0xf04 0 45 0xf04
+ 0 46 0xf04 0 47 0xf04>;
};
qpend-1 {
qrange = <8704 16>;
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l-netcp.dtsi b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l-netcp.dtsi
index 5ec6680a533d..1afebd7458c1 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l-netcp.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l-netcp.dtsi
@@ -36,9 +36,9 @@ qmss: qmss@2a40000 {
qpend {
qpend-0 {
qrange = <658 8>;
- interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
- 0 43 0xf04 0 44 0xf04 0 45 0xf04
- 0 46 0xf04 0 47 0xf04>;
+ interrupts = <0 40 0xf04 0 41 0xf04 0 42 0xf04
+ 0 43 0xf04 0 44 0xf04 0 45 0xf04
+ 0 46 0xf04 0 47 0xf04>;
};
qpend-1 {
qrange = <528 16>;
diff --git a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l.dtsi b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l.dtsi
index 8949578e62e8..2062fe561642 100644
--- a/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/keystone/keystone-k2l.dtsi
@@ -137,7 +137,7 @@
>;
};
- dfesync_rp1_pins: dfesync-rp1-pins{
+ dfesync_rp1_pins: dfesync-rp1-pins {
pinctrl-single,bits = <
/* DFESYNC_RP1_SEL */
0x0 0x0 0x2
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am335x-boneblack.dts b/sys/contrib/device-tree/src/arm/ti/omap/am335x-boneblack.dts
index b956e2f60fe0..16b567e3cb47 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am335x-boneblack.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am335x-boneblack.dts
@@ -20,7 +20,8 @@
* BeagleBone Blacks have PG 2.0 silicon which is guaranteed
* to support 1GHz OPP so enable it for PG 2.0 on this board.
*/
- oppnitro-1000000000 {
+ opp-1000000000 {
+ /* OPP Nitro */
opp-supported-hw = <0x06 0x0100>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am335x-moxa-uc-2100-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am335x-moxa-uc-2100-common.dtsi
index b8730aa52ce6..a59331aa58e5 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am335x-moxa-uc-2100-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am335x-moxa-uc-2100-common.dtsi
@@ -217,7 +217,7 @@
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
- tpm_spi_tis@0 {
+ tpm@0 {
compatible = "tcg,tpm_tis-spi";
reg = <0>;
spi-max-frequency = <500000>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am335x-osd335x-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am335x-osd335x-common.dtsi
index 9863bf499a39..93a3af83feac 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am335x-osd335x-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am335x-osd335x-common.dtsi
@@ -28,7 +28,8 @@
* the HW OPP table, the silicon looks like it is Revision 1.0 (ie the
* EFUSE_SMA register reads as all zeros).
*/
- oppnitro-1000000000 {
+ opp-1000000000 {
+ /* OPP Nitro */
opp-supported-hw = <0x06 0x0100>;
};
};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am335x-pocketbeagle.dts b/sys/contrib/device-tree/src/arm/ti/omap/am335x-pocketbeagle.dts
index 5dfe4d4bab93..78ce860e59b3 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am335x-pocketbeagle.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am335x-pocketbeagle.dts
@@ -8,6 +8,7 @@
#include "am33xx.dtsi"
#include "am335x-osd335x-common.dtsi"
+#include <dt-bindings/leds/common.h>
/ {
model = "TI AM335x PocketBeagle";
@@ -25,6 +26,8 @@
led-usr0 {
label = "beaglebone:green:usr0";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_HEARTBEAT;
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
@@ -32,6 +35,8 @@
led-usr1 {
label = "beaglebone:green:usr1";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_DISK_ACTIVITY;
gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc0";
default-state = "off";
@@ -39,6 +44,8 @@
led-usr2 {
label = "beaglebone:green:usr2";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_CPU;
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "cpu0";
default-state = "off";
@@ -46,6 +53,8 @@
led-usr3 {
label = "beaglebone:green:usr3";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_INDICATOR;
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
@@ -112,7 +121,7 @@
"P2.24",
"P2.33",
"P2.22",
- "P2.18",
+ "P2.18 [PRU0.15i]",
"NC",
"NC",
"P2.01 [PWM1A]",
@@ -208,11 +217,6 @@
compatible = "pinconf-single";
pinctrl-names = "default";
- pinctrl-0 = < &P2_03_gpio &P1_34_gpio &P2_19_gpio &P2_24_gpio
- &P2_33_gpio &P2_22_gpio &P2_18_gpio &P2_10_gpio
- &P2_06_gpio &P2_04_gpio &P2_02_gpio &P2_08_gpio
- &P2_17_gpio >;
-
/* P2_03 (ZCZ ball T10) gpio0_23 0x824 PIN 9 */
P2_03_gpio: P2-03-gpio-pins {
pinctrl-single,pins = <
@@ -267,10 +271,10 @@
pinctrl-single,bias-pulldown = < 0x10 0x00 0x10 0x18>;
};
- /* P2_18 (ZCZ ball U13) gpio1_15 0x83c PIN 15 */
- P2_18_gpio: P2-18-gpio-pins {
+ /* P2_20 (ZCZ ball T13) gpio2_00 0x888 */
+ P2_20_gpio: P2-20-gpio-pins {
pinctrl-single,pins = <
- AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE7)
+ AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE7)
>;
pinctrl-single,bias-pullup = < 0x10 0x10 0x00 0x18>;
pinctrl-single,bias-pulldown = < 0x10 0x00 0x10 0x18>;
@@ -401,6 +405,27 @@
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT_PULLDOWN, MUX_MODE6) /* (U17) gpmc_wpn.uart4_txd */
>;
};
+
+ pru0_pins: pinmux-pru0-pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_INPUT_PULLUP, MUX_MODE5)/* (D14) xdma_event_intr1.pr1_pru0_pru_r31_16 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE5)/* (A14) mcasp0_ahclkx.pr1_pru0_pru_r30_7 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (B12) mcasp0_acklr.pr1_pru0_pru_r30_4 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSX, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (B13) mcasp0_fsx.pr1_pru0_pru_r30_1 */
+ AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE6) /* (U13) gpmc_ad15.pr1_pru0_pru_r31_15 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR1, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (D13) mcasp0_axr1.pr1_pru0_pru_r30_6 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE5)/* (C12) mcasp0_ahclkr.pr1_pru0_pru_r30_3 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR0, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (D12) mcasp0_axr0.pr1_pru0_pru_r30_2 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (C13) mcasp0_fsr.pr1_pru0_pru_r30_5 */
+ >;
+ };
+
+ pru1_pins: pinmux-pru1-pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE5)/*(R6) lcd_ac_bias_en.pr1_pru1_pru_r30_11 */
+ AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (V5) lcd_pclk.pr1_pru1_pru_r30_10 */
+ >;
+ };
};
&epwmss0 {
@@ -482,3 +507,17 @@
&usb1 {
dr_mode = "host";
};
+
+&pruss_tm {
+ status = "okay";
+};
+
+&pru0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pru0_pins>;
+};
+
+&pru1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pru1_pins>;
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am33xx-l4.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am33xx-l4.dtsi
index 195a03b4c8e5..c29cb59fdb9f 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am33xx-l4.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am33xx-l4.dtsi
@@ -455,8 +455,8 @@
rtc: rtc@0 {
compatible = "ti,am3352-rtc", "ti,da830-rtc";
reg = <0x0 0x1000>;
- interrupts = <75
- 76>;
+ interrupts = <75>,
+ <76>;
};
};
@@ -739,7 +739,7 @@
* c0_tx_pend
* c0_misc_pend
*/
- interrupts = <40 41 42 43>;
+ interrupts = <40>, <41>, <42>, <43>;
ranges = <0 0 0x8000>;
syscon = <&scm_conf>;
status = "disabled";
@@ -779,7 +779,7 @@
syscon = <&scm_conf>;
status = "disabled";
- interrupts = <40 41 42 43>;
+ interrupts = <40>, <41>, <42>, <43>;
interrupt-names = "rx_thresh", "rx", "tx", "misc";
ethernet-ports {
@@ -899,7 +899,7 @@
pruss_intc: interrupt-controller@20000 {
compatible = "ti,pruss-intc";
reg = <0x20000 0x2000>;
- interrupts = <20 21 22 23 24 25 26 27>;
+ interrupts = <20>, <21>, <22>, <23>, <24>, <25>, <26>, <27>;
interrupt-names = "host_intr0", "host_intr1",
"host_intr2", "host_intr3",
"host_intr4", "host_intr5",
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am33xx.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am33xx.dtsi
index 32d397b3950b..5b9e01a8aa5d 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am33xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am33xx.dtsi
@@ -80,64 +80,74 @@
* because the can not be enabled simultaneously on a
* single SoC.
*/
- opp50-300000000 {
+ opp-50-300000000{
+ /* OPP50 */
opp-hz = /bits/ 64 <300000000>;
opp-microvolt = <950000 931000 969000>;
opp-supported-hw = <0x06 0x0010>;
opp-suspend;
};
- opp100-275000000 {
+ opp-100-275000000{
+ /* OPP100-1 */
opp-hz = /bits/ 64 <275000000>;
opp-microvolt = <1100000 1078000 1122000>;
opp-supported-hw = <0x01 0x00FF>;
opp-suspend;
};
- opp100-300000000 {
+ opp-100-300000000{
+ /* OPP100-2 */
opp-hz = /bits/ 64 <300000000>;
opp-microvolt = <1100000 1078000 1122000>;
opp-supported-hw = <0x06 0x0020>;
opp-suspend;
};
- opp100-500000000 {
+ opp-100-500000000{
+ /* OPP100-3 */
opp-hz = /bits/ 64 <500000000>;
opp-microvolt = <1100000 1078000 1122000>;
opp-supported-hw = <0x01 0xFFFF>;
};
- opp100-600000000 {
+ opp-100-600000000 {
+ /* OPP100-4 */
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1100000 1078000 1122000>;
opp-supported-hw = <0x06 0x0040>;
};
- opp120-600000000 {
+ opp-120-600000000 {
+ /* OPP120-1 */
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1200000 1176000 1224000>;
opp-supported-hw = <0x01 0xFFFF>;
};
- opp120-720000000 {
+ opp-120-720000000 {
+ /* OPP120-2 */
opp-hz = /bits/ 64 <720000000>;
opp-microvolt = <1200000 1176000 1224000>;
opp-supported-hw = <0x06 0x0080>;
};
- oppturbo-720000000 {
+ opp-720000000 {
+ /* OPP Turbo-1 */
opp-hz = /bits/ 64 <720000000>;
opp-microvolt = <1260000 1234800 1285200>;
opp-supported-hw = <0x01 0xFFFF>;
};
- oppturbo-800000000 {
+ opp-800000000 {
+ /* OPP Turbo-2 */
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1260000 1234800 1285200>;
opp-supported-hw = <0x06 0x0100>;
};
- oppnitro-1000000000 {
+ opp-1000000000 {
+ /* OPP Nitro */
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <1325000 1298500 1351500>;
opp-supported-hw = <0x04 0x0200>;
@@ -349,6 +359,7 @@
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>;
+ ti,sysc-delay-us = <2>;
clocks = <&l3s_clkctrl AM3_L3S_USB_OTG_HS_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am3517-evm.dts b/sys/contrib/device-tree/src/arm/ti/omap/am3517-evm.dts
index af9df15274be..40f15da81043 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am3517-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am3517-evm.dts
@@ -172,11 +172,24 @@
&davinci_emac {
pinctrl-names = "default";
pinctrl-0 = <&ethernet_pins>;
+ phy-mode = "rmii";
+ phy-handle = <&ethphy0>;
status = "okay";
};
&davinci_mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
status = "okay";
+
+ ethphy0: ethernet-phy@0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&enet_phy_pins>;
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <26 IRQ_TYPE_LEVEL_LOW>; /* gpio_58 */
+ };
};
&dss {
@@ -257,6 +270,12 @@
>;
};
+ enet_phy_pins: ethernet-phy-pins {
+ pinctrl-single,pins = <
+ OMAP3_CORE1_IOPAD(0x20bc, PIN_INPUT | MUX_MODE4) /* gpmc_ncs7.gpio_57 */
+ >;
+ };
+
i2c2_pins: i2c2-pins {
pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
@@ -271,13 +290,6 @@
>;
};
- leds_pins: leds-pins {
- pinctrl-single,pins = <
- OMAP3_WKUP_IOPAD(0x2a24, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu0.gpio_11 */
- OMAP3_WKUP_IOPAD(0x2a26, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu1.gpio_31 */
- >;
- };
-
mmc1_pins: mmc1-pins {
pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
@@ -355,3 +367,12 @@
>;
};
};
+
+&omap3_pmx_wkup {
+ leds_pins: leds-pins {
+ pinctrl-single,pins = <
+ OMAP3_WKUP_IOPAD(0x2a24, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu0.gpio_11 */
+ OMAP3_WKUP_IOPAD(0x2a26, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu1.gpio_31 */
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am3517.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am3517.dtsi
index 823f63502e9f..77e58e686fb1 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am3517.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am3517.dtsi
@@ -15,6 +15,7 @@
aliases {
serial3 = &uart4;
can = &hecc;
+ ethernet = &davinci_emac;
};
cpus {
@@ -34,14 +35,16 @@
* appear to operate at 300MHz as well. Since AM3517 only
* lists one operating voltage, it will remain fixed at 1.2V
*/
- opp50-300000000 {
+ opp-50-300000000 {
+ /* OPP50 */
opp-hz = /bits/ 64 <300000000>;
opp-microvolt = <1200000>;
opp-supported-hw = <0xffffffff 0xffffffff>;
opp-suspend;
};
- opp100-600000000 {
+ opp-100-600000000 {
+ /* OPP100 */
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1200000>;
opp-supported-hw = <0xffffffff 0xffffffff>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am4372.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am4372.dtsi
index 8613355bbd5e..9d2c064534f7 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am4372.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am4372.dtsi
@@ -70,32 +70,37 @@
compatible = "operating-points-v2-ti-cpu";
syscon = <&scm_conf>;
- opp50-300000000 {
+ opp-50-300000000 {
+ /* OPP50 */
opp-hz = /bits/ 64 <300000000>;
opp-microvolt = <950000 931000 969000>;
opp-supported-hw = <0xFF 0x01>;
opp-suspend;
};
- opp100-600000000 {
+ opp-100-600000000 {
+ /* OPP100 */
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1100000 1078000 1122000>;
opp-supported-hw = <0xFF 0x04>;
};
- opp120-720000000 {
+ opp-120-720000000 {
+ /* OPP120 */
opp-hz = /bits/ 64 <720000000>;
opp-microvolt = <1200000 1176000 1224000>;
opp-supported-hw = <0xFF 0x08>;
};
- oppturbo-800000000 {
+ opp-800000000{
+ /* OPP Turbo */
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1260000 1234800 1285200>;
opp-supported-hw = <0xFF 0x10>;
};
- oppnitro-1000000000 {
+ opp-1000000000 {
+ /* OPP Nitro */
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <1325000 1298500 1351500>;
opp-supported-hw = <0xFF 0x20>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am437x-idk-evm.dts b/sys/contrib/device-tree/src/arm/ti/omap/am437x-idk-evm.dts
index 863552393c07..00682ce7e14c 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am437x-idk-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am437x-idk-evm.dts
@@ -58,7 +58,7 @@
vin-supply = <&vdd_corereg>;
};
- v1_8dreg: fixed-regulator-v1_8dreg{
+ v1_8dreg: fixed-regulator-v1_8dreg {
compatible = "regulator-fixed";
regulator-name = "V1_8DREG";
regulator-min-microvolt = <1800000>;
@@ -68,7 +68,7 @@
vin-supply = <&v24_0d>;
};
- v1_8d: fixed-regulator-v1_8d{
+ v1_8d: fixed-regulator-v1_8d {
compatible = "regulator-fixed";
regulator-name = "V1_8D";
regulator-min-microvolt = <1800000>;
@@ -78,7 +78,7 @@
vin-supply = <&v1_8dreg>;
};
- v1_5dreg: fixed-regulator-v1_5dreg{
+ v1_5dreg: fixed-regulator-v1_5dreg {
compatible = "regulator-fixed";
regulator-name = "V1_5DREG";
regulator-min-microvolt = <1500000>;
@@ -88,7 +88,7 @@
vin-supply = <&v24_0d>;
};
- v1_5d: fixed-regulator-v1_5d{
+ v1_5d: fixed-regulator-v1_5d {
compatible = "regulator-fixed";
regulator-name = "V1_5D";
regulator-min-microvolt = <1500000>;
@@ -527,11 +527,13 @@
* Supply voltage supervisor on board will not allow opp50 so
* disable it and set opp100 as suspend OPP.
*/
- opp50-300000000 {
+ opp-50-300000000 {
+ /* opp50-300000000 */
status = "disabled";
};
- opp100-600000000 {
+ opp-100-600000000 {
+ /* opp100-600000000 */
opp-suspend;
};
};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am437x-l4.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am437x-l4.dtsi
index 415210b034ef..824b9415ebbe 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am437x-l4.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am437x-l4.dtsi
@@ -442,8 +442,8 @@
compatible = "ti,am4372-rtc", "ti,am3352-rtc",
"ti,da830-rtc";
reg = <0x0 0x1000>;
- interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_32768_ck>;
clock-names = "int-clk";
system-power-controller;
@@ -549,10 +549,10 @@
syscon = <&scm_conf>;
status = "disabled";
- interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH
- GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "rx_thresh", "rx", "tx", "misc";
ethernet-ports {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am571x-idk.dts b/sys/contrib/device-tree/src/arm/ti/omap/am571x-idk.dts
index 48425020281a..322cf79d22e9 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am571x-idk.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am571x-idk.dts
@@ -168,8 +168,8 @@
};
&extcon_usb2 {
- id-gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
- vbus-gpio = <&gpio7 22 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&gpio7 22 GPIO_ACTIVE_HIGH>;
};
&sn65hvs882 {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am5729-beagleboneai.dts b/sys/contrib/device-tree/src/arm/ti/omap/am5729-beagleboneai.dts
index 149cfafb90bf..3e834fc7e370 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am5729-beagleboneai.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am5729-beagleboneai.dts
@@ -197,7 +197,7 @@
extcon_usb1: extcon_usb1 {
compatible = "linux,extcon-usb-gpio";
ti,enable-id-detection;
- id-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
};
};
@@ -415,7 +415,6 @@
reg = <0x41>;
interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
interrupt-parent = <&gpio2>;
- interrupt-controller;
id = <0>;
blocks = <0x5>;
irq-trigger = <0x1>;
@@ -677,12 +676,6 @@
clock-frequency = <100000>;
};
-&cpu0_opp_table {
- opp_slow-500000000 {
- opp-shared;
- };
-};
-
&ipu2 {
status = "okay";
memory-region = <&ipu2_memory_region>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/am572x-idk-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/am572x-idk-common.dtsi
index 1d66278c3a72..3fca84819dc0 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/am572x-idk-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/am572x-idk-common.dtsi
@@ -169,8 +169,8 @@
};
&extcon_usb2 {
- id-gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>;
- vbus-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>;
};
&sn65hvs882 {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/dra7-evm-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/dra7-evm-common.dtsi
index 4cdffd6db740..ed5199d7acd8 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/dra7-evm-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/dra7-evm-common.dtsi
@@ -15,12 +15,12 @@
extcon_usb1: extcon_usb1 {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&pcf_gpio_21 1 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&pcf_gpio_21 1 GPIO_ACTIVE_HIGH>;
};
extcon_usb2: extcon_usb2 {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&pcf_gpio_21 2 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&pcf_gpio_21 2 GPIO_ACTIVE_HIGH>;
};
sound0: sound0 {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/dra7.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/dra7.dtsi
index 97ce0c4f1df7..6509c742fb58 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/dra7.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/dra7.dtsi
@@ -101,7 +101,8 @@
compatible = "operating-points-v2-ti-cpu";
syscon = <&scm_wkup>;
- opp_nom-1000000000 {
+ opp-1000000000 {
+ /* OPP NOM */
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <1060000 850000 1150000>,
<1060000 850000 1150000>;
@@ -109,7 +110,8 @@
opp-suspend;
};
- opp_od-1176000000 {
+ opp-1176000000 {
+ /* OPP OD */
opp-hz = /bits/ 64 <1176000000>;
opp-microvolt = <1160000 885000 1160000>,
<1160000 885000 1160000>;
@@ -117,7 +119,8 @@
opp-supported-hw = <0xFF 0x02>;
};
- opp_high@1500000000 {
+ opp-1500000000 {
+ /* OPP High */
opp-hz = /bits/ 64 <1500000000>;
opp-microvolt = <1210000 950000 1250000>,
<1210000 950000 1250000>;
@@ -144,7 +147,7 @@
l3-noc@44000000 {
compatible = "ti,dra7-l3-noc";
- reg = <0x44000000 0x1000>,
+ reg = <0x44000000 0x1000000>,
<0x45000000 0x1000>;
interrupts-extended = <&crossbar_mpu GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
<&wakeupgen GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/dra71-evm.dts b/sys/contrib/device-tree/src/arm/ti/omap/dra71-evm.dts
index a64364443031..f747ac56eb92 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/dra71-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/dra71-evm.dts
@@ -293,11 +293,11 @@
};
&extcon_usb1 {
- vbus-gpio = <&pcf_lcd 14 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&pcf_lcd 14 GPIO_ACTIVE_HIGH>;
};
&extcon_usb2 {
- vbus-gpio = <&pcf_lcd 15 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&pcf_lcd 15 GPIO_ACTIVE_HIGH>;
};
&ipu2 {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/dra72-evm-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/dra72-evm-common.dtsi
index 31ab0c60ca75..f8151c61488e 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/dra72-evm-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/dra72-evm-common.dtsi
@@ -96,12 +96,12 @@
extcon_usb1: extcon_usb1 {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&pcf_gpio_21 1 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&pcf_gpio_21 1 GPIO_ACTIVE_HIGH>;
};
extcon_usb2: extcon_usb2 {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&pcf_gpio_21 2 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&pcf_gpio_21 2 GPIO_ACTIVE_HIGH>;
};
hdmi0: connector {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/dra76-evm.dts b/sys/contrib/device-tree/src/arm/ti/omap/dra76-evm.dts
index 57868ac60d29..cf9c3d35b049 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/dra76-evm.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/dra76-evm.dts
@@ -533,11 +533,11 @@
};
&extcon_usb1 {
- vbus-gpio = <&pcf_lcd 14 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&pcf_lcd 14 GPIO_ACTIVE_HIGH>;
};
&extcon_usb2 {
- vbus-gpio = <&pcf_lcd 15 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&pcf_lcd 15 GPIO_ACTIVE_HIGH>;
};
&m_can0 {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/dra76x.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/dra76x.dtsi
index 931db7932c11..1045eb24aa0d 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/dra76x.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/dra76x.dtsi
@@ -130,7 +130,8 @@
};
&cpu0_opp_table {
- opp_plus@1800000000 {
+ opp-1800000000 {
+ /* OPP Plus */
opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <1250000 950000 1250000>,
<1250000 950000 1250000>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/logicpd-torpedo-37xx-devkit.dts b/sys/contrib/device-tree/src/arm/ti/omap/logicpd-torpedo-37xx-devkit.dts
index 533ce7ce387a..fbff15a0a0fe 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/logicpd-torpedo-37xx-devkit.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/logicpd-torpedo-37xx-devkit.dts
@@ -52,7 +52,7 @@
&uart2 {
/delete-property/dma-names;
- bluetooth {
+ bluetooth-gnss {
compatible = "ti,wl1283-st";
enable-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio 162 */
max-speed = <3000000>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-common.dtsi
index 091ba310053e..a0c53d9c2625 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-common.dtsi
@@ -6,15 +6,6 @@
#include "motorola-cpcap-mapphone.dtsi"
/ {
- chosen {
- stdout-path = &uart3;
- };
-
- aliases {
- display0 = &lcd0;
- display1 = &hdmi0;
- };
-
/*
* We seem to have only 1021 MB accessible, 1021 - 1022 is locked,
* then 1023 - 1024 seems to contain mbm.
@@ -63,45 +54,6 @@
regulator-always-on;
};
- /* FS USB Host PHY on port 1 for mdm6600 */
- fsusb1_phy: usb-phy@1 {
- compatible = "motorola,mapphone-mdm6600";
- pinctrl-0 = <&usb_mdm6600_pins>;
- pinctrl-names = "default";
- enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>; /* gpio_95 */
- power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; /* gpio_54 */
- reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>; /* gpio_49 */
- /* mode: gpio_148 gpio_149 */
- motorola,mode-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>,
- <&gpio5 21 GPIO_ACTIVE_HIGH>;
- /* cmd: gpio_103 gpio_104 gpio_142 */
- motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>,
- <&gpio4 8 GPIO_ACTIVE_HIGH>,
- <&gpio5 14 GPIO_ACTIVE_HIGH>;
- /* status: gpio_52 gpio_53 gpio_55 */
- motorola,status-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>,
- <&gpio2 21 GPIO_ACTIVE_HIGH>,
- <&gpio2 23 GPIO_ACTIVE_HIGH>;
- #phy-cells = <0>;
- };
-
- /* HS USB host TLL nop-phy on port 2 for w3glte */
- hsusb2_phy: usb-phy@2 {
- compatible = "usb-nop-xceiv";
- #phy-cells = <0>;
- };
-
- /* LCD regulator from sw5 source */
- lcd_regulator: regulator-lcd {
- compatible = "regulator-fixed";
- regulator-name = "lcd";
- regulator-min-microvolt = <5050000>;
- regulator-max-microvolt = <5050000>;
- gpio = <&gpio4 0 GPIO_ACTIVE_HIGH>; /* gpio96 */
- enable-active-high;
- vin-supply = <&sw5>;
- };
-
/* This is probably coming straight from the battery.. */
wl12xx_vmmc: regulator-wl12xx {
compatible = "regulator-fixed";
@@ -132,41 +84,6 @@
dais = <&mcbsp2_port>, <&mcbsp3_port>;
};
-
- pwm8: pwm-8 {
- pinctrl-names = "default";
- pinctrl-0 = <&vibrator_direction_pin>;
-
- compatible = "ti,omap-dmtimer-pwm";
- #pwm-cells = <3>;
- ti,timers = <&timer8>;
- ti,clock-source = <0x01>;
- };
-
- pwm9: pwm-9 {
- pinctrl-names = "default";
- pinctrl-0 = <&vibrator_enable_pin>;
-
- compatible = "ti,omap-dmtimer-pwm";
- #pwm-cells = <3>;
- ti,timers = <&timer9>;
- ti,clock-source = <0x01>;
- };
-
- vibrator {
- compatible = "pwm-vibrator";
- pwms = <&pwm9 0 10000000 0>, <&pwm8 0 10000000 0>;
- pwm-names = "enable", "direction";
- direction-duty-cycle-ns = <10000000>;
- };
-
- backlight: backlight {
- compatible = "led-backlight";
-
- leds = <&backlight_led>;
- brightness-levels = <31 63 95 127 159 191 223 255>;
- default-brightness-level = <6>;
- };
};
&cpu_thermal {
@@ -196,57 +113,6 @@
status = "okay";
};
-&dsi1 {
- status = "okay";
- vdd-supply = <&vcsi>;
-
- port {
- dsi1_out_ep: endpoint {
- remote-endpoint = <&lcd0_in>;
- lanes = <0 1 2 3 4 5>;
- };
- };
-
- lcd0: panel@0 {
- compatible = "motorola,droid4-panel", "panel-dsi-cm";
- reg = <0>;
- label = "lcd0";
- vddi-supply = <&lcd_regulator>;
- reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */
-
- backlight = <&backlight>;
-
- width-mm = <50>;
- height-mm = <89>;
- rotation = <90>;
-
- panel-timing {
- clock-frequency = <0>; /* Calculated by dsi */
-
- hback-porch = <2>;
- hactive = <540>;
- hfront-porch = <0>;
- hsync-len = <2>;
-
- vback-porch = <1>;
- vactive = <960>;
- vfront-porch = <0>;
- vsync-len = <1>;
-
- hsync-active = <0>;
- vsync-active = <0>;
- de-active = <1>;
- pixelclk-active = <1>;
- };
-
- port {
- lcd0_in: endpoint {
- remote-endpoint = <&dsi1_out_ep>;
- };
- };
- };
-};
-
&hdmi {
status = "okay";
pinctrl-0 = <&dss_hdmi_pins>;
@@ -261,13 +127,6 @@
};
};
-/* Battery NVRAM on 1-wire handled by w1_ds250x driver */
-&hdqw1w {
- pinctrl-0 = <&hdq_pins>;
- pinctrl-names = "default";
- ti,mode = "1w";
-};
-
&i2c1 {
tmp105@48 {
compatible = "ti,tmp105";
@@ -321,34 +180,6 @@
};
};
-&i2c2 {
- touchscreen@4a {
- compatible = "atmel,maxtouch";
- reg = <0x4a>;
- pinctrl-names = "default";
- pinctrl-0 = <&touchscreen_pins>;
-
- reset-gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; /* gpio173 */
-
- /* gpio_183 with sys_nirq2 pad as wakeup */
- interrupts-extended = <&gpio6 23 IRQ_TYPE_LEVEL_LOW>,
- <&omap4_pmx_core 0x160>;
- interrupt-names = "irq", "wakeup";
- wakeup-source;
- };
-
- isl29030@44 {
- compatible = "isil,isl29030";
- reg = <0x44>;
-
- pinctrl-names = "default";
- pinctrl-0 = <&als_proximity_pins>;
-
- interrupt-parent = <&gpio6>;
- interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
- };
-};
-
&omap4_pmx_core {
/* hdmi_hpd.gpio_63 */
@@ -358,13 +189,6 @@
>;
};
- hdq_pins: hdq-pins {
- pinctrl-single,pins = <
- /* 0x4a100120 hdq_sio.hdq_sio aa27 */
- OMAP4_IOPAD(0x120, PIN_INPUT | MUX_MODE0)
- >;
- };
-
/* hdmi_cec.hdmi_cec, hdmi_scl.hdmi_scl, hdmi_sda.hdmi_sda */
dss_hdmi_pins: dss-hdmi-pins {
pinctrl-single,pins = <
@@ -426,56 +250,6 @@
>;
};
- touchscreen_pins: touchscreen-pins {
- pinctrl-single,pins = <
- OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)
- OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
- >;
- };
-
- als_proximity_pins: als-proximity-pins {
- pinctrl-single,pins = <
- OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
- >;
- };
-
- usb_mdm6600_pins: usb-mdm6600-pins {
- pinctrl-single,pins = <
- /* enable 0x4a1000d8 usbb1_ulpitll_dat7.gpio_95 ag16 */
- OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
-
- /* power 0x4a10007c gpmc_nwp.gpio_54 c25 */
- OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
-
- /* reset 0x4a100072 gpmc_a25.gpio_49 d20 */
- OMAP4_IOPAD(0x072, PIN_OUTPUT | MUX_MODE3)
-
- /* mode0/bpwake 0x4a10014e sdmmc5_dat1.gpio_148 af4 */
- OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
-
- /* mode1/apwake 0x4a100150 sdmmc5_dat2.gpio_149 ag3 */
- OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
-
- /* status0 0x4a10007e gpmc_clk.gpio_55 b22 */
- OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
-
- /* status1 0x4a10007a gpmc_ncs3.gpio_53 c22 */
- OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
-
- /* status2 0x4a100078 gpmc_ncs2.gpio_52 d21 */
- OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
-
- /* cmd0 0x4a100094 gpmc_ncs6.gpio_103 c24 */
- OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
-
- /* cmd1 0x4a100096 gpmc_ncs7.gpio_104 d24 */
- OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
-
- /* cmd2 0x4a100142 uart3_rts_sd.gpio_142 f28 */
- OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
- >;
- };
-
usb_ulpi_pins: usb-ulpi-pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x196, MUX_MODE7)
@@ -583,18 +357,6 @@
OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */
>;
};
-
- vibrator_direction_pin: vibrator-direction-pins {
- pinctrl-single,pins = <
- OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1) /* dmtimer8_pwm_evt (gpio_27) */
- >;
- };
-
- vibrator_enable_pin: vibrator-enable-pins {
- pinctrl-single,pins = <
- OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1) /* dmtimer9_pwm_evt (gpio_28) */
- >;
- };
};
&omap4_pmx_wkup {
@@ -611,17 +373,6 @@
status = "disabled";
};
-/* Configure pwm clock source for timers 8 & 9 */
-&timer8 {
- assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
- assigned-clock-parents = <&sys_clkin_ck>;
-};
-
-&timer9 {
- assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>;
- assigned-clock-parents = <&sys_clkin_ck>;
-};
-
/*
* The uart1 port is wired to mdm6600 with rts and cts. The modem uses gpio_149
* for wake-up events for both the USB PHY and the UART. We can use gpio_149
@@ -640,6 +391,7 @@
&uart3 {
interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
&omap4_pmx_core 0x17c>;
+ overrun-throttle-ms = <500>;
};
&uart4 {
@@ -653,20 +405,6 @@
};
};
-&usbhsohci {
- phys = <&fsusb1_phy>;
- phy-names = "usb";
-};
-
-&usbhsehci {
- phys = <&hsusb2_phy>;
-};
-
-&usbhshost {
- port1-mode = "ohci-phy-4pin-dpdm";
- port2-mode = "ehci-tll";
-};
-
/* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
&usb_otg_hs {
interface-type = <1>;
@@ -679,23 +417,6 @@
power = <150>;
};
-&i2c4 {
- ak8975: magnetometer@c {
- compatible = "asahi-kasei,ak8975";
- reg = <0x0c>;
-
- vdd-supply = <&vhvio>;
-
- interrupt-parent = <&gpio6>;
- interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
-
- rotation-matrix = "-1", "0", "0",
- "0", "1", "0",
- "0", "0", "-1";
-
- };
-};
-
&mcbsp2 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-handset.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-handset.dtsi
new file mode 100644
index 000000000000..f3f9ff02b35f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-handset.dtsi
@@ -0,0 +1,234 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "motorola-mapphone-common.dtsi"
+
+/ {
+ /* FS USB Host PHY on port 1 for mdm6600 */
+ fsusb1_phy: usb-phy@1 {
+ compatible = "motorola,mapphone-mdm6600";
+ pinctrl-0 = <&usb_mdm6600_pins>;
+ pinctrl-1 = <&usb_mdm6600_sleep_pins>;
+ pinctrl-names = "default", "sleep";
+ enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>; /* gpio_95 */
+ power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; /* gpio_54 */
+ reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>; /* gpio_49 */
+ /* mode: gpio_148 gpio_149 */
+ motorola,mode-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>,
+ <&gpio5 21 GPIO_ACTIVE_HIGH>;
+ /* cmd: gpio_103 gpio_104 gpio_142 */
+ motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>,
+ <&gpio4 8 GPIO_ACTIVE_HIGH>,
+ <&gpio5 14 GPIO_ACTIVE_HIGH>;
+ /* status: gpio_52 gpio_53 gpio_55 */
+ motorola,status-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>,
+ <&gpio2 21 GPIO_ACTIVE_HIGH>,
+ <&gpio2 23 GPIO_ACTIVE_HIGH>;
+ #phy-cells = <0>;
+ };
+
+ /* HS USB host TLL nop-phy on port 2 for w3glte */
+ hsusb2_phy: usb-phy@2 {
+ compatible = "usb-nop-xceiv";
+ #phy-cells = <0>;
+ };
+
+ pwm8: pwm-8 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&vibrator_direction_pin>;
+
+ compatible = "ti,omap-dmtimer-pwm";
+ #pwm-cells = <3>;
+ ti,timers = <&timer8>;
+ ti,clock-source = <0x01>;
+ };
+
+ pwm9: pwm-9 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&vibrator_enable_pin>;
+
+ compatible = "ti,omap-dmtimer-pwm";
+ #pwm-cells = <3>;
+ ti,timers = <&timer9>;
+ ti,clock-source = <0x01>;
+ };
+
+ vibrator {
+ compatible = "pwm-vibrator";
+ pwms = <&pwm9 0 10000000 0>, <&pwm8 0 10000000 0>;
+ pwm-names = "enable", "direction";
+ direction-duty-cycle-ns = <10000000>;
+ };
+};
+
+/* Battery NVRAM on 1-wire handled by w1_ds250x driver */
+&hdqw1w {
+ pinctrl-0 = <&hdq_pins>;
+ pinctrl-names = "default";
+ ti,mode = "1w";
+};
+
+&i2c2 {
+ touchscreen@4a {
+ compatible = "atmel,maxtouch";
+ reg = <0x4a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touchscreen_pins>;
+
+ reset-gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; /* gpio173 */
+
+ /* gpio_183 with sys_nirq2 pad as wakeup */
+ interrupts-extended = <&gpio6 23 IRQ_TYPE_LEVEL_LOW>,
+ <&omap4_pmx_core 0x160>;
+ interrupt-names = "irq", "wakeup";
+ wakeup-source;
+ };
+
+ isl29030@44 {
+ compatible = "isil,isl29030";
+ reg = <0x44>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&als_proximity_pins>;
+
+ interrupt-parent = <&gpio6>;
+ interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
+ };
+};
+
+&omap4_pmx_core {
+ hdq_pins: hdq-pins {
+ pinctrl-single,pins = <
+ /* 0x4a100120 hdq_sio.hdq_sio aa27 */
+ OMAP4_IOPAD(0x120, PIN_INPUT | MUX_MODE0)
+ >;
+ };
+
+ /* kpd_row0.gpio_178 */
+ tmp105_irq: tmp105-irq-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
+ >;
+ };
+
+ touchscreen_pins: touchscreen-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
+ >;
+ };
+
+ usb_mdm6600_pins: usb-mdm6600-pins {
+ pinctrl-single,pins = <
+ /* enable 0x4a1000d8 usbb1_ulpitll_dat7.gpio_95 ag16 */
+ OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
+
+ /* power 0x4a10007c gpmc_nwp.gpio_54 c25 */
+ OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
+
+ /* reset 0x4a100072 gpmc_a25.gpio_49 d20 */
+ OMAP4_IOPAD(0x072, PIN_OUTPUT | MUX_MODE3)
+
+ /* mode0/bpwake 0x4a10014e sdmmc5_dat1.gpio_148 af4 */
+ OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
+
+ /* mode1/apwake 0x4a100150 sdmmc5_dat2.gpio_149 ag3 */
+ OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
+
+ /* status0 0x4a10007e gpmc_clk.gpio_55 b22 */
+ OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
+
+ /* status1 0x4a10007a gpmc_ncs3.gpio_53 c22 */
+ OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
+
+ /* status2 0x4a100078 gpmc_ncs2.gpio_52 d21 */
+ OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
+
+ /* cmd0 0x4a100094 gpmc_ncs6.gpio_103 c24 */
+ OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
+
+ /* cmd1 0x4a100096 gpmc_ncs7.gpio_104 d24 */
+ OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
+
+ /* cmd2 0x4a100142 uart3_rts_sd.gpio_142 f28 */
+ OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
+ >;
+ };
+
+ /* Modem sleep pins to keep gpio_49 high with internal pull */
+ usb_mdm6600_sleep_pins: usb-mdm6600-sleep-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x072, PIN_INPUT_PULLUP | MUX_MODE7) /* Keep gpio_49 reset high */
+ OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
+ >;
+ };
+
+ als_proximity_pins: als-proximity-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
+ >;
+ };
+
+ vibrator_direction_pin: vibrator-direction-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1) /* dmtimer8_pwm_evt (gpio_27) */
+ >;
+ };
+
+ vibrator_enable_pin: vibrator-enable-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1) /* dmtimer9_pwm_evt (gpio_28) */
+ >;
+ };
+};
+
+/* Configure pwm clock source for timers 8 & 9 */
+&timer8 {
+ assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
+ assigned-clock-parents = <&sys_32k_ck>;
+};
+
+&timer9 {
+ assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>;
+ assigned-clock-parents = <&sys_32k_ck>;
+};
+
+&usbhsohci {
+ phys = <&fsusb1_phy>;
+ phy-names = "usb";
+};
+
+&usbhsehci {
+ phys = <&hsusb2_phy>;
+};
+
+&usbhshost {
+ port1-mode = "ohci-phy-4pin-dpdm";
+ port2-mode = "ehci-tll";
+};
+
+&i2c4 {
+ ak8975: magnetometer@c {
+ compatible = "asahi-kasei,ak8975";
+ reg = <0x0c>;
+
+ vdd-supply = <&vhvio>;
+
+ interrupt-parent = <&gpio6>;
+ interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
+
+ rotation-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "-1";
+
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-mz607-mz617.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-mz607-mz617.dtsi
new file mode 100644
index 000000000000..a356b3a2f24e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-mz607-mz617.dtsi
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "motorola-mapphone-common.dtsi"
+
+&keypad {
+ keypad,num-rows = <8>;
+ keypad,num-columns = <8>;
+ linux,keymap = <MATRIX_KEY(5, 0, KEY_VOLUMEUP)>,
+ <MATRIX_KEY(3, 0, KEY_VOLUMEDOWN)>;
+};
+
+/*
+ * On tablets, mmc1 regulator is vsimcard instead of vwlan2 in the stock kernel
+ * dtb. The regulator may not be wired even if a MMC cage is added though.
+ */
+&mmc1 {
+ vmmc-supply = <&vsimcard>;
+ bus-width = <4>;
+ cd-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>; /* gpio_176 */
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-xt8xx.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-xt8xx.dtsi
new file mode 100644
index 000000000000..8b8de92b5424
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/ti/omap/motorola-mapphone-xt8xx.dtsi
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "motorola-mapphone-handset.dtsi"
+
+/ {
+ backlight: backlight {
+ compatible = "led-backlight";
+
+ leds = <&backlight_led>;
+ brightness-levels = <31 63 95 127 159 191 223 255>;
+ default-brightness-level = <6>;
+ };
+
+ /* LCD regulator from sw5 source */
+ lcd_regulator: regulator-lcd {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd";
+ regulator-min-microvolt = <5050000>;
+ regulator-max-microvolt = <5050000>;
+ gpio = <&gpio4 0 GPIO_ACTIVE_HIGH>; /* gpio96 */
+ enable-active-high;
+ vin-supply = <&sw5>;
+ };
+};
+
+&dsi1 {
+ status = "okay";
+ vdd-supply = <&vcsi>;
+
+ port {
+ dsi1_out_ep: endpoint {
+ remote-endpoint = <&lcd0_in>;
+ lanes = <0 1 2 3 4 5>;
+ };
+ };
+
+ lcd0: panel@0 {
+ compatible = "motorola,droid4-panel", "panel-dsi-cm";
+ reg = <0>;
+ label = "lcd0";
+ vddi-supply = <&lcd_regulator>;
+ reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */
+ backlight = <&backlight>;
+
+ width-mm = <50>;
+ height-mm = <89>;
+ rotation = <90>;
+
+ panel-timing {
+ clock-frequency = <0>; /* Calculated by dsi */
+
+ hback-porch = <2>;
+ hactive = <540>;
+ hfront-porch = <0>;
+ hsync-len = <2>;
+
+ vback-porch = <1>;
+ vactive = <960>;
+ vfront-porch = <0>;
+ vsync-len = <1>;
+
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <1>;
+ };
+
+ port {
+ lcd0_in: endpoint {
+ remote-endpoint = <&dsi1_out_ep>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap3-cpu-thermal.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap3-cpu-thermal.dtsi
index 0da759f8e2c2..7dd2340bc5e4 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap3-cpu-thermal.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap3-cpu-thermal.dtsi
@@ -12,8 +12,7 @@ cpu_thermal: cpu-thermal {
polling-delay = <1000>; /* milliseconds */
coefficients = <0 20000>;
- /* sensor ID */
- thermal-sensors = <&bandgap 0>;
+ thermal-sensors = <&bandgap>;
cpu_trips: trips {
cpu_alert0: cpu_alert {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap3-devkit8000-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap3-devkit8000-common.dtsi
index 3b9838f1bb6b..07d5894ebb74 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap3-devkit8000-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap3-devkit8000-common.dtsi
@@ -275,8 +275,8 @@
ethernet@6,0 {
compatible = "davicom,dm9000";
- reg = <6 0x000 2
- 6 0x400 2>; /* CS6, offset 0 and 0x400, IO size 2 */
+ reg = <6 0x000 2>,
+ <6 0x400 2>; /* CS6, offset 0 and 0x400, IO size 2 */
bank-width = <2>;
interrupt-parent = <&gpio1>;
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap3-gta04.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap3-gta04.dtsi
index b6b27e93857f..3661340009e7 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap3-gta04.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap3-gta04.dtsi
@@ -11,7 +11,7 @@
/ {
model = "OMAP3 GTA04";
- compatible = "goldelico,gta04", "ti,omap3630", "ti,omap36xx", "ti,omap3";
+ compatible = "goldelico,gta04", "ti,omap3630", "ti,omap3";
cpus {
cpu@0 {
cpu0-supply = <&vcc>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap34xx.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap34xx.dtsi
index 9dbf62797f0f..fc7233ac183a 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap34xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap34xx.dtsi
@@ -25,7 +25,7 @@
compatible = "operating-points-v2-ti-cpu";
syscon = <&scm_conf>;
- opp1-125000000 {
+ opp-125000000 {
opp-hz = /bits/ 64 <125000000>;
/*
* we currently only select the max voltage from table
@@ -40,32 +40,32 @@
opp-supported-hw = <0xffffffff 3>;
};
- opp2-250000000 {
+ opp-250000000 {
opp-hz = /bits/ 64 <250000000>;
opp-microvolt = <1075000 1075000 1075000>;
opp-supported-hw = <0xffffffff 3>;
opp-suspend;
};
- opp3-500000000 {
+ opp-500000000 {
opp-hz = /bits/ 64 <500000000>;
opp-microvolt = <1200000 1200000 1200000>;
opp-supported-hw = <0xffffffff 3>;
};
- opp4-550000000 {
+ opp-550000000 {
opp-hz = /bits/ 64 <550000000>;
opp-microvolt = <1275000 1275000 1275000>;
opp-supported-hw = <0xffffffff 3>;
};
- opp5-600000000 {
+ opp-600000000 {
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1350000 1350000 1350000>;
opp-supported-hw = <0xffffffff 3>;
};
- opp6-720000000 {
+ opp-720000000 {
opp-hz = /bits/ 64 <720000000>;
opp-microvolt = <1350000 1350000 1350000>;
/* only high-speed grade omap3530 devices */
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap36xx.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap36xx.dtsi
index fff9c3d34193..e6d8070c1bf8 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap36xx.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap36xx.dtsi
@@ -30,7 +30,8 @@
compatible = "operating-points-v2-ti-cpu";
syscon = <&scm_conf>;
- opp50-300000000 {
+ opp-50-300000000 {
+ /* OPP50 */
opp-hz = /bits/ 64 <300000000>;
/*
* we currently only select the max voltage from table
@@ -48,21 +49,24 @@
opp-suspend;
};
- opp100-600000000 {
+ opp-100-600000000 {
+ /* OPP100 */
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1200000 1200000 1200000>,
<1200000 1200000 1200000>;
opp-supported-hw = <0xffffffff 3>;
};
- opp130-800000000 {
+ opp-130-800000000 {
+ /* OPP130 */
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1325000 1325000 1325000>,
<1325000 1325000 1325000>;
opp-supported-hw = <0xffffffff 3>;
};
- opp1g-1000000000 {
+ opp-1000000000 {
+ /* OPP1G */
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <1375000 1375000 1375000>,
<1375000 1375000 1375000>;
@@ -71,7 +75,7 @@
};
};
- opp_supply_mpu_iva: opp_supply {
+ opp_supply_mpu_iva: opp-supply {
compatible = "ti,omap-opp-supply";
ti,absolute-max-voltage-uv = <1375000>;
};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-cpu-thermal.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap4-cpu-thermal.dtsi
index 801b4f10350c..d484ec1e4fd8 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4-cpu-thermal.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-cpu-thermal.dtsi
@@ -12,7 +12,10 @@ cpu_thermal: cpu_thermal {
polling-delay-passive = <250>; /* milliseconds */
polling-delay = <1000>; /* milliseconds */
- /* sensor ID */
+ /*
+ * See 44xx files for single sensor addressing, omap5 and dra7 need
+ * also sensor ID for addressing.
+ */
thermal-sensors = <&bandgap 0>;
cpu_trips: trips {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid-bionic-xt875.dts b/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid-bionic-xt875.dts
index ccf03a743678..1d9000f84f1b 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid-bionic-xt875.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid-bionic-xt875.dts
@@ -1,11 +1,20 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
-#include "motorola-mapphone-common.dtsi"
+#include "motorola-mapphone-xt8xx.dtsi"
/ {
model = "Motorola Droid Bionic XT875";
compatible = "motorola,droid-bionic", "ti,omap4430", "ti,omap4";
+
+ chosen {
+ stdout-path = &uart3;
+ };
+
+ aliases {
+ display0 = &lcd0;
+ display1 = &hdmi0;
+ };
};
&keypad {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid4-xt894.dts b/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid4-xt894.dts
index e833c21f1c01..cc3f3e1b65ea 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid4-xt894.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-droid4-xt894.dts
@@ -1,9 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
-#include "motorola-mapphone-common.dtsi"
+#include "motorola-mapphone-xt8xx.dtsi"
/ {
+ model = "Motorola Droid 4 XT894";
+ compatible = "motorola,droid4", "ti,omap4430", "ti,omap4";
+
+ chosen {
+ stdout-path = &uart3;
+ };
+
+ aliases {
+ display0 = &lcd0;
+ display1 = &hdmi0;
+ };
+
gpio_keys {
compatible = "gpio-keys";
@@ -33,11 +45,6 @@
};
};
-/ {
- model = "Motorola Droid 4 XT894";
- compatible = "motorola,droid4", "ti,omap4430", "ti,omap4";
-};
-
&keypad {
keypad,num-rows = <8>;
keypad,num-columns = <8>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-epson-embt2ws.dts b/sys/contrib/device-tree/src/arm/ti/omap/omap4-epson-embt2ws.dts
index e119e2cccc4e..24f7d0285f79 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4-epson-embt2ws.dts
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-epson-embt2ws.dts
@@ -4,6 +4,7 @@
*/
/dts-v1/;
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/input/input.h>
#include "omap4460.dtsi"
@@ -50,6 +51,12 @@
regulator-name = "unknown";
};
+ wl12xx_pwrseq: wl12xx-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&twl 1>;
+ clock-names = "ext_clock";
+ };
+
/* regulator for wl12xx on sdio2 */
wl12xx_vmmc: wl12xx-vmmc {
pinctrl-names = "default";
@@ -73,6 +80,7 @@
twl: pmic@48 {
compatible = "ti,twl6032";
reg = <0x48>;
+ #clock-cells = <1>;
/* IRQ# = 7 */
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
interrupt-controller;
@@ -188,15 +196,6 @@
pinctrl-0 = <&mpu9150h_pins>;
interrupt-parent = <&gpio2>;
interrupt = <19 IRQ_TYPE_LEVEL_HIGH>;
-
- i2c-gate {
- #address-cells = <1>;
- #size-cells = <0>;
- magnetometer@c {
- compatible = "asahi-kasei,ak8975";
- reg = <0x0c>;
- };
- };
};
};
@@ -206,7 +205,31 @@
clock-frequency = <100000>;
- /* TODO: BD2606MVV at 0x66 */
+ led-controller@66 {
+ compatible = "rohm,bd2606mvv";
+ reg = <0x66>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
+ };
+
+ led@4 {
+ reg = <4>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_STATUS;
+ };
+ };
};
&i2c4 {
@@ -227,7 +250,16 @@
reset-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
};
- /* TODO: mpu9150 at control unit, seems to require quirks */
+ mpu9150: imu@68 {
+ compatible = "invensense,mpu9150";
+ reg = <0x68>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&mpu9150_pins>;
+ interrupt-parent = <&gpio2>;
+ interrupt = <7 IRQ_TYPE_LEVEL_HIGH>;
+ invensense,level-shifter;
+ };
};
&keypad {
@@ -269,6 +301,7 @@
pinctrl-names = "default";
pinctrl-0 = <&wl12xx_pins>;
vmmc-supply = <&wl12xx_vmmc>;
+ mmc-pwrseq = <&wl12xx_pwrseq>;
interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
&omap4_pmx_core 0x12e>;
non-removable;
@@ -362,6 +395,12 @@
>;
};
+ mpu9150_pins: pinmux-mpu9150-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x5e, PIN_INPUT_PULLUP | MUX_MODE3)
+ >;
+ };
+
mpu9150h_pins: pinmux-mpu9150h-pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x76, PIN_INPUT_PULLUP | MUX_MODE3)
@@ -410,7 +449,7 @@
>;
};
- wl12xx_gpio: pinmux-wl12xx-gpio {
+ wl12xx_gpio: pinmux-wl12xx-gpio-pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE3) /* gpio_24 / WLAN_EN */
>;
@@ -423,10 +462,12 @@
interrupts-extended = <&wakeupgen GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
&omap4_pmx_core OMAP4_UART2_RX>;
- /*
- * BT + GPS in WL1283 in WG7500 requiring CLK32KAUDIO of pmic
- * which does not have a driver
- */
+ bluetooth-gnss {
+ compatible = "ti,wl1283-st";
+ enable-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; /* GPIO_25 */
+ clocks = <&twl 1>;
+ clock-names = "ext_clock";
+ };
};
&uart3 {
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4-abe.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4-abe.dtsi
index 7ae8b620515c..59f546a278f8 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4-abe.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4-abe.dtsi
@@ -109,6 +109,8 @@
reg = <0x0 0xff>, /* MPU private access */
<0x49022000 0xff>; /* L3 Interconnect */
reg-names = "mpu", "dma";
+ clocks = <&abe_clkctrl OMAP4_MCBSP1_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
@@ -142,6 +144,8 @@
reg = <0x0 0xff>, /* MPU private access */
<0x49024000 0xff>; /* L3 Interconnect */
reg-names = "mpu", "dma";
+ clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
@@ -175,6 +179,8 @@
reg = <0x0 0xff>, /* MPU private access */
<0x49026000 0xff>; /* L3 Interconnect */
reg-names = "mpu", "dma";
+ clocks = <&abe_clkctrl OMAP4_MCBSP3_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4.dtsi
index 46b8f9efd413..3fcef3080eae 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-l4.dtsi
@@ -2043,6 +2043,8 @@
compatible = "ti,omap4-mcbsp";
reg = <0x0 0xff>; /* L4 Interconnect */
reg-names = "mpu";
+ clocks = <&l4_per_clkctrl OMAP4_MCBSP4_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz609.dts b/sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz609.dts
new file mode 100644
index 000000000000..762934e2d075
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz609.dts
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "motorola-mapphone-mz607-mz617.dtsi"
+
+/ {
+ model = "Motorola Xyboard MZ609";
+ compatible = "motorola,xyboard-mz609", "ti,omap4430", "ti,omap4";
+
+ chosen {
+ stdout-path = &uart3;
+ };
+
+ aliases {
+ display1 = &hdmi0;
+ };
+
+ backlight: backlight {
+ compatible = "led-backlight";
+
+ leds = <&backlight_led>;
+ brightness-levels = <31 63 95 127 159 191 223 255>;
+ default-brightness-level = <6>;
+ };
+};
+
+&i2c1 {
+ led-controller@38 {
+ compatible = "ti,lm3532";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x38>;
+
+ enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
+
+ ramp-up-us = <1024>;
+ ramp-down-us = <8193>;
+
+ backlight_led: led@0 {
+ reg = <0>;
+ led-sources = <2>;
+ ti,led-mode = <0>;
+ label = ":backlight";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz617.dts b/sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz617.dts
new file mode 100644
index 000000000000..b9caea3b7f9d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4-xyboard-mz617.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "motorola-mapphone-mz607-mz617.dtsi"
+
+/ {
+ model = "Motorola Xyboard MZ617";
+ compatible = "motorola,xyboard-mz617", "ti,omap4430", "ti,omap4";
+
+ chosen {
+ stdout-path = &uart3;
+ };
+
+ aliases {
+ display1 = &hdmi0;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap443x.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap443x.dtsi
index 238aceb799f8..2104170fe2cd 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap443x.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap443x.dtsi
@@ -69,6 +69,7 @@
};
&cpu_thermal {
+ thermal-sensors = <&bandgap>;
coefficients = <0 20000>;
};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap4460.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap4460.dtsi
index 1b27a862ae81..a6764750d447 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap4460.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap4460.dtsi
@@ -79,6 +79,7 @@
};
&cpu_thermal {
+ thermal-sensors = <&bandgap>;
coefficients = <348 (-9301)>;
};
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap5-board-common.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap5-board-common.dtsi
index 6f46f1ecf1e5..8946b5580cd9 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap5-board-common.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap5-board-common.dtsi
@@ -415,9 +415,9 @@
gpadc: gpadc {
compatible = "ti,palmas-gpadc";
- interrupts = <18 0
- 16 0
- 17 0>;
+ interrupts = <18 0>,
+ <16 0>,
+ <17 0>;
#io-channel-cells = <1>;
ti,channel0-current-microamp = <5>;
ti,channel3-current-microamp = <10>;
diff --git a/sys/contrib/device-tree/src/arm/ti/omap/omap5-l4-abe.dtsi b/sys/contrib/device-tree/src/arm/ti/omap/omap5-l4-abe.dtsi
index a03bca5a3584..97b0c3b5f573 100644
--- a/sys/contrib/device-tree/src/arm/ti/omap/omap5-l4-abe.dtsi
+++ b/sys/contrib/device-tree/src/arm/ti/omap/omap5-l4-abe.dtsi
@@ -109,6 +109,8 @@
reg = <0x0 0xff>, /* MPU private access */
<0x49022000 0xff>; /* L3 Interconnect */
reg-names = "mpu", "dma";
+ clocks = <&abe_clkctrl OMAP5_MCBSP1_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
@@ -142,6 +144,8 @@
reg = <0x0 0xff>, /* MPU private access */
<0x49024000 0xff>; /* L3 Interconnect */
reg-names = "mpu", "dma";
+ clocks = <&abe_clkctrl OMAP5_MCBSP2_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
@@ -175,6 +179,8 @@
reg = <0x0 0xff>, /* MPU private access */
<0x49026000 0xff>; /* L3 Interconnect */
reg-names = "mpu", "dma";
+ clocks = <&abe_clkctrl OMAP5_MCBSP3_CLKCTRL 24>;
+ clock-names = "fck";
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "common";
ti,buffer-size = <128>;
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100-allwinner-perf1.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100-allwinner-perf1.dts
index d34c2bb1079f..f5c5c1464482 100644
--- a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100-allwinner-perf1.dts
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100-allwinner-perf1.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2020 Yangtao Li <frank@allwinnertech.com>
*/
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100.dtsi b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100.dtsi
index 97e3e6907acd..a3dccf193765 100644
--- a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100.dtsi
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-a100.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2020 Yangtao Li <frank@allwinnertech.com>
*/
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts
index 686f58e77004..b710f1a0f53a 100644
--- a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6-pine-h64-model-b.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2019 Corentin LABBE <clabbe@baylibre.com>
*/
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1-manta.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1-manta.dts
new file mode 100644
index 000000000000..dbce61b355d6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1-manta.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2023 Martin Botka <martin.botka@somainline.org>.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616-bigtreetech-cb1.dtsi"
+
+/ {
+ model = "BigTreeTech CB1";
+ compatible = "bigtreetech,cb1-manta", "bigtreetech,cb1", "allwinner,sun50i-h616";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
new file mode 100644
index 000000000000..1fed2b46cfe8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2023 Martin Botka <martin.botka@somainline.org>.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ aliases {
+ ethernet0 = &rtl8189ftv;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+ };
+ };
+
+ reg_vcc5v: regulator-vcc5v {
+ /* board wide 5V supply from carrier boards */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_vcc33_wifi: vcc33-wifi {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc33-wifi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <&reg_vcc5v>;
+ };
+
+ reg_vcc_wifi_io: vcc-wifi-io {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-wifi-io";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ vin-supply = <&reg_vcc33_wifi>;
+ };
+
+ wifi_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rtc 1>;
+ clock-names = "ext_clock";
+ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
+ post-power-on-delay-ms = <200>;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_dldo1>;
+ /* Card detection pin is not connected */
+ broken-cd;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&mmc1 {
+ vmmc-supply = <&reg_vcc33_wifi>;
+ vqmmc-supply = <&reg_vcc_wifi_io>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ mmc-ddr-1_8v;
+ status = "okay";
+
+ rtl8189ftv: wifi@1 {
+ reg = <1>;
+ };
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313a: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ regulators{
+ reg_dcdc1: dcdc1 {
+ regulator-name = "vdd-gpu-sys";
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <990000>;
+ regulator-always-on;
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-name = "vdd-cpu";
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-ramp-delay = <200>;
+ regulator-always-on;
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-name = "vcc-dram";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-always-on;
+ };
+
+ reg_aldo1: aldo1 {
+ regulator-name = "vcc-1v8-pll";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ reg_dldo1: dldo1 {
+ regulator-name = "vcc-3v3-io";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&usbphy {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-pi.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-pi.dts
new file mode 100644
index 000000000000..832f08b2b260
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-bigtreetech-pi.dts
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2023 Martin Botka <martin@biqu3d.com>.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616-bigtreetech-cb1.dtsi"
+
+/ {
+ model = "BigTreeTech Pi";
+ compatible = "bigtreetech,pi", "allwinner,sun50i-h616";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ehci3 {
+ status = "okay";
+};
+
+&ir {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
+
+&ohci3 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero.dtsi b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero.dtsi
new file mode 100644
index 000000000000..fc7315b94406
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero.dtsi
@@ -0,0 +1,131 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Arm Ltd.
+ *
+ * DT nodes common between Orange Pi Zero 2 and Orange Pi Zero 3.
+ * Excludes PMIC nodes and properties, since they are different between the two.
+ */
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ aliases {
+ ethernet0 = &emac0;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
+ default-state = "on";
+ };
+
+ led-1 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
+ };
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply directly from the USB-C socket */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&reg_vcc5v>;
+ enable-active-high;
+ gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
+ };
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+/* USB 2 & 3 are on headers only. */
+
+&emac0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ext_rgmii_pins>;
+ phy-handle = <&ext_rgmii_phy>;
+ status = "okay";
+};
+
+&mdio0 {
+ ext_rgmii_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+};
+
+&mmc0 {
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+ bus-width = <4>;
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
+
+&usbotg {
+ /*
+ * PHY0 pins are connected to a USB-C socket, but a role switch
+ * is not implemented: both CC pins are pulled to GND.
+ * The VBUS pins power the device, so a fixed peripheral mode
+ * is the best choice.
+ * The board can be powered via GPIOs, in this case port0 *can*
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
+ * then provided by the GPIOs. Any user of this setup would
+ * need to adjust the DT accordingly: dr_mode set to "host",
+ * enabling OHCI0 and EHCI0.
+ */
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ usb1_vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero2.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero2.dts
index cb8600d0ea1e..b5d713926a34 100644
--- a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -1,99 +1,26 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2020 Arm Ltd.
*/
/dts-v1/;
-#include "sun50i-h616.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/leds/common.h>
+#include "sun50i-h616-orangepi-zero.dtsi"
/ {
model = "OrangePi Zero2";
compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
-
- aliases {
- ethernet0 = &emac0;
- serial0 = &uart0;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-
- leds {
- compatible = "gpio-leds";
-
- led-0 {
- function = LED_FUNCTION_POWER;
- color = <LED_COLOR_ID_RED>;
- gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
- default-state = "on";
- };
-
- led-1 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
- };
- };
-
- reg_vcc5v: vcc5v {
- /* board wide 5V supply directly from the USB-C socket */
- compatible = "regulator-fixed";
- regulator-name = "vcc-5v";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
-
- reg_usb1_vbus: regulator-usb1-vbus {
- compatible = "regulator-fixed";
- regulator-name = "usb1-vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- vin-supply = <&reg_vcc5v>;
- enable-active-high;
- gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
- };
};
-&ehci1 {
- status = "okay";
-};
-
-/* USB 2 & 3 are on headers only. */
-
&emac0 {
- pinctrl-names = "default";
- pinctrl-0 = <&ext_rgmii_pins>;
- phy-mode = "rgmii";
- phy-handle = <&ext_rgmii_phy>;
- phy-supply = <&reg_dcdce>;
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
- status = "okay";
-};
-
-&mdio0 {
- ext_rgmii_phy: ethernet-phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <1>;
- };
+ phy-mode = "rgmii";
+ phy-supply = <&reg_dcdce>;
};
&mmc0 {
vmmc-supply = <&reg_dcdce>;
- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
- bus-width = <4>;
- status = "okay";
-};
-
-&ohci1 {
- status = "okay";
};
&r_rsb {
@@ -211,44 +138,3 @@
vcc-ph-supply = <&reg_aldo1>;
vcc-pi-supply = <&reg_aldo1>;
};
-
-&spi0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
-
- flash@0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <40000000>;
- };
-};
-
-&uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart0_ph_pins>;
- status = "okay";
-};
-
-&usbotg {
- /*
- * PHY0 pins are connected to a USB-C socket, but a role switch
- * is not implemented: both CC pins are pulled to GND.
- * The VBUS pins power the device, so a fixed peripheral mode
- * is the best choice.
- * The board can be powered via GPIOs, in this case port0 *can*
- * act as a host (with a cable/adapter ignoring CC), as VBUS is
- * then provided by the GPIOs. Any user of this setup would
- * need to adjust the DT accordingly: dr_mode set to "host",
- * enabling OHCI0 and EHCI0.
- */
- dr_mode = "peripheral";
- status = "okay";
-};
-
-&usbphy {
- usb1_vbus-supply = <&reg_usb1_vbus>;
- status = "okay";
-};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-x96-mate.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-x96-mate.dts
index 07424c28b696..959b6fd18483 100644
--- a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-x96-mate.dts
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616-x96-mate.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2021 Arm Ltd.
*/
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616.dtsi b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616.dtsi
index 74aed0d232a9..d549d277d972 100644
--- a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616.dtsi
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h616.dtsi
@@ -133,6 +133,13 @@
#reset-cells = <1>;
};
+ sid: efuse@3006000 {
+ compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid";
+ reg = <0x03006000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
watchdog: watchdog@30090a0 {
compatible = "allwinner,sun50i-h616-wdt",
"allwinner,sun6i-a31-wdt";
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero2w.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero2w.dts
new file mode 100644
index 000000000000..21ca1977055d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero2w.dts
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "OrangePi Zero 2W";
+ compatible = "xunlong,orangepi-zero2w", "allwinner,sun50i-h618";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
+ };
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply directly from the USB-C socket */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_vcc3v3: vcc3v3 {
+ /* SY8089 DC/DC converter */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_vcc5v>;
+ regulator-always-on;
+ };
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+/* USB 2 & 3 are on the FPC connector (or the exansion board) */
+
+&mmc0 {
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+ bus-width = <4>;
+ vmmc-supply = <&reg_vcc3v3>;
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&pio {
+ vcc-pc-supply = <&reg_dldo1>;
+ vcc-pf-supply = <&reg_dldo1>; /* internally via VCC-IO */
+ vcc-pg-supply = <&reg_aldo1>;
+ vcc-ph-supply = <&reg_dldo1>; /* internally via VCC-IO */
+ vcc-pi-supply = <&reg_dldo1>;
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&pio>;
+ interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
+
+ vin1-supply = <&reg_vcc5v>;
+ vin2-supply = <&reg_vcc5v>;
+ vin3-supply = <&reg_vcc5v>;
+
+ regulators {
+ /* Supplies VCC-PLL and DRAM */
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc1v8";
+ };
+
+ /* Supplies VCC-IO, so needs to be always on. */
+ reg_dldo1: dldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3";
+ };
+
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <990000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-dram";
+ };
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
+
+&usbotg {
+ /*
+ * PHY0 pins are connected to a USB-C socket, but a role switch
+ * is not implemented: both CC pins are pulled to GND.
+ * The VBUS pins power the device, so a fixed peripheral mode
+ * is the best choice.
+ * The board can be powered via GPIOs, in this case port0 *can*
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
+ * then provided by the GPIOs. Any user of this setup would
+ * need to adjust the DT accordingly: dr_mode set to "host",
+ * enabling OHCI0 and EHCI0.
+ */
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ usb1_vbus-supply = <&reg_vcc5v>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero3.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero3.dts
new file mode 100644
index 000000000000..b3b1b8692125
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-orangepi-zero3.dts
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616-orangepi-zero.dtsi"
+
+/ {
+ model = "OrangePi Zero3";
+ compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
+};
+
+&emac0 {
+ allwinner,tx-delay-ps = <700>;
+ phy-mode = "rgmii-rxid";
+ phy-supply = <&reg_dldo1>;
+};
+
+&ext_rgmii_phy {
+ motorcomm,clk-out-frequency-hz = <125000000>;
+};
+
+&mmc0 {
+ /*
+ * The schematic shows the card detect pin wired up to PF6, via an
+ * inverter, but it just doesn't work.
+ */
+ broken-cd;
+ vmmc-supply = <&reg_dldo1>;
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&pio>;
+ interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
+
+ vin1-supply = <&reg_vcc5v>;
+ vin2-supply = <&reg_vcc5v>;
+ vin3-supply = <&reg_vcc5v>;
+
+ regulators {
+ /* Supplies VCC-PLL, so needs to be always on. */
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc1v8";
+ };
+
+ /* Supplies VCC-IO, so needs to be always on. */
+ reg_dldo1: dldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3";
+ };
+
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <990000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-dram";
+ };
+ };
+ };
+};
+
+&pio {
+ vcc-pc-supply = <&reg_dldo1>;
+ vcc-pf-supply = <&reg_dldo1>;
+ vcc-pg-supply = <&reg_aldo1>;
+ vcc-ph-supply = <&reg_dldo1>;
+ vcc-pi-supply = <&reg_dldo1>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-transpeed-8k618-t.dts b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-transpeed-8k618-t.dts
new file mode 100644
index 000000000000..8ea1fd41aeba
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h618-transpeed-8k618-t.dts
@@ -0,0 +1,161 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ model = "Transpeed 8K618-T";
+ compatible = "transpeed,8k618-t", "allwinner,sun50i-h618";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply directly from the DC input */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_vcc3v3: vcc3v3 {
+ /* discrete 3.3V regulator */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ir {
+ status = "okay";
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_dldo1>;
+ cd-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>; /* PI16 */
+ bus-width = <4>;
+ status = "okay";
+};
+
+&mmc2 {
+ vmmc-supply = <&reg_dldo1>;
+ vqmmc-supply = <&reg_aldo1>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+
+ vin1-supply = <&reg_vcc5v>;
+ vin2-supply = <&reg_vcc5v>;
+ vin3-supply = <&reg_vcc5v>;
+
+ regulators {
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-1v8-pll";
+ };
+
+ reg_dldo1: dldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-3v3-io-mmc";
+ };
+
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <990000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1360000>;
+ regulator-max-microvolt = <1360000>;
+ regulator-name = "vdd-dram";
+ };
+ };
+ };
+};
+
+&pio {
+ vcc-pc-supply = <&reg_aldo1>;
+ vcc-pg-supply = <&reg_dldo1>;
+ vcc-ph-supply = <&reg_dldo1>;
+ vcc-pi-supply = <&reg_dldo1>;
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&usbotg {
+ dr_mode = "host"; /* USB A type receptable */
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10.dtsi b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10.dtsi
index 41c9eb51d0ee..072fe20cfca0 100644
--- a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10.dtsi
+++ b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10.dtsi
@@ -59,6 +59,25 @@
};
};
+ firmware {
+ svc {
+ compatible = "intel,stratix10-svc";
+ method = "smc";
+ memory-region = <&service_reserved>;
+
+ fpga_mgr: fpga-mgr {
+ compatible = "intel,stratix10-soc-fpga-mgr";
+ };
+ };
+ };
+
+ fpga-region {
+ compatible = "fpga-region";
+ #address-cells = <0x2>;
+ #size-cells = <0x2>;
+ fpga-mgr = <&fpga_mgr>;
+ };
+
pmu {
compatible = "arm,armv8-pmuv3";
interrupts = <0 170 4>,
@@ -125,7 +144,7 @@
};
};
- soc {
+ soc@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
@@ -133,13 +152,6 @@
interrupt-parent = <&intc>;
ranges = <0 0 0 0xffffffff>;
- base_fpga_region {
- #address-cells = <0x2>;
- #size-cells = <0x2>;
- compatible = "fpga-region";
- fpga-mgr = <&fpga_mgr>;
- };
-
clkmgr: clock-controller@ffd10000 {
compatible = "intel,stratix10-clkmgr";
reg = <0xffd10000 0x1000>;
@@ -153,7 +165,7 @@
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];
resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
clocks = <&clkmgr STRATIX10_EMAC0_CLK>, <&clkmgr STRATIX10_EMAC_PTP_CLK>;
clock-names = "stmmaceth", "ptp_ref";
tx-fifo-depth = <16384>;
@@ -171,7 +183,7 @@
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];
resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
clocks = <&clkmgr STRATIX10_EMAC1_CLK>, <&clkmgr STRATIX10_EMAC_PTP_CLK>;
clock-names = "stmmaceth", "ptp_ref";
tx-fifo-depth = <16384>;
@@ -189,7 +201,7 @@
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];
resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
clocks = <&clkmgr STRATIX10_EMAC2_CLK>, <&clkmgr STRATIX10_EMAC_PTP_CLK>;
clock-names = "stmmaceth", "ptp_ref";
tx-fifo-depth = <16384>;
@@ -331,6 +343,9 @@
ocram: sram@ffe00000 {
compatible = "mmio-sram";
reg = <0xffe00000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xffe00000 0x100000>;
};
pdma: dma-controller@ffda0000 {
@@ -484,12 +499,6 @@
status = "disabled";
};
- usbphy0: usbphy@0 {
- #phy-cells = <0>;
- compatible = "usb-nop-xceiv";
- status = "okay";
- };
-
usb0: usb@ffb00000 {
compatible = "snps,dwc2";
reg = <0xffb00000 0x40000>;
@@ -513,6 +522,7 @@
resets = <&rst USB1_RESET>, <&rst USB1_OCP_RESET>;
reset-names = "dwc2", "dwc2-ecc";
clocks = <&clkmgr STRATIX10_USB_CLK>;
+ clock-names = "otg";
iommus = <&smmu 7>;
status = "disabled";
};
@@ -623,17 +633,10 @@
status = "disabled";
};
+ };
- firmware {
- svc {
- compatible = "intel,stratix10-svc";
- method = "smc";
- memory-region = <&service_reserved>;
-
- fpga_mgr: fpga-mgr {
- compatible = "intel,stratix10-soc-fpga-mgr";
- };
- };
- };
+ usbphy0: usbphy0 {
+ compatible = "usb-nop-xceiv";
+ #phy-cells = <0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk.dts b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk.dts
index 3037f58057c9..26173f0b0051 100644
--- a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk.dts
+++ b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk.dts
@@ -38,10 +38,10 @@
};
};
- memory {
+ memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x80000000 0 0>;
};
ref_033v: regulator-v-ref {
@@ -51,7 +51,7 @@
regulator-max-microvolt = <330000>;
};
- soc {
+ soc@0 {
eccmgr {
sdmmca-ecc@ff8c8c00 {
compatible = "altr,socfpga-s10-sdmmc-ecc",
@@ -66,14 +66,14 @@
};
&pinctrl0 {
- i2c1_pmx_func: i2c1-pmx-func {
+ i2c1_pmx_func: i2c1-pmx-func-pins {
pinctrl-single,pins = <
0x78 0x4 /* I2C1_SDA (IO6-B) PIN30SEL) */
0x7c 0x4 /* I2C1_SCL (IO7-B) PIN31SEL */
>;
};
- i2c1_pmx_func_gpio: i2c1-pmx-func-gpio {
+ i2c1_pmx_func_gpio: i2c1-pmx-func-gpio-pins {
pinctrl-single,pins = <
0x78 0x8 /* I2C1_SDA (IO6-B) PIN30SEL) */
0x7c 0x8 /* I2C1_SCL (IO7-B) PIN31SEL */
@@ -187,8 +187,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <1>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
@@ -202,12 +200,12 @@
qspi_boot: partition@0 {
label = "Boot and fpga data";
- reg = <0x0 0x03FE0000>;
+ reg = <0x0 0x04200000>;
};
- qspi_rootfs: partition@3FE0000 {
- label = "Root Filesystem - JFFS2";
- reg = <0x03FE0000 0x0C020000>;
+ root: partition@4200000 {
+ label = "Root Filesystem - UBIFS";
+ reg = <0x04200000 0x0BE00000>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk_nand.dts b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk_nand.dts
index f4cf30bac557..81d0e914a77c 100644
--- a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk_nand.dts
+++ b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_socdk_nand.dts
@@ -38,10 +38,10 @@
};
};
- memory {
+ memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x80000000 0 0>;
};
ref_033v: regulator-v-ref {
@@ -51,7 +51,7 @@
regulator-max-microvolt = <330000>;
};
- soc {
+ soc@0 {
eccmgr {
sdmmca-ecc@ff8c8c00 {
compatible = "altr,socfpga-s10-sdmmc-ecc",
@@ -102,10 +102,10 @@
&nand {
status = "okay";
- flash@0 {
+ nand@0 {
+ reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
- reg = <0>;
nand-bus-width = <16>;
partition@0 {
@@ -176,8 +176,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <1>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
@@ -194,7 +192,7 @@
reg = <0x0 0x03FE0000>;
};
- qspi_rootfs: partition@3FE0000 {
+ qspi_rootfs: partition@3fe0000 {
label = "Root Filesystem - JFFS2";
reg = <0x03FE0000 0x0C020000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_swvp.dts b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_swvp.dts
index a8db58573954..0d837d3e65a5 100644
--- a/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_swvp.dts
+++ b/sys/contrib/device-tree/src/arm64/altera/socfpga_stratix10_swvp.dts
@@ -29,7 +29,7 @@
linux,initrd-end = <0x125c8324>;
};
- memory {
+ memory@80000000 {
device_type = "memory";
reg = <0x0 0x0 0x0 0x80000000>;
};
@@ -80,8 +80,6 @@
&mmc {
status = "okay";
- altr,dw-mshc-ciu-div = <0x3>;
- altr,dw-mshc-sdr-timing = <0x0 0x3>;
cap-sd-highspeed;
cap-mmc-highspeed;
broken-cd;
diff --git a/sys/contrib/device-tree/src/arm64/amazon/alpine-v2.dtsi b/sys/contrib/device-tree/src/arm64/amazon/alpine-v2.dtsi
index dccbba6e7f98..dbf2dce8d1d6 100644
--- a/sys/contrib/device-tree/src/arm64/amazon/alpine-v2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amazon/alpine-v2.dtsi
@@ -145,7 +145,6 @@
msix: msix@fbe00000 {
compatible = "al,alpine-msix";
reg = <0x0 0xfbe00000 0x0 0x100000>;
- interrupt-controller;
msi-controller;
al,msi-base-spi = <160>;
al,msi-num-spis = <160>;
diff --git a/sys/contrib/device-tree/src/arm64/amazon/alpine-v3.dtsi b/sys/contrib/device-tree/src/arm64/amazon/alpine-v3.dtsi
index 39481d7fd7d4..3ea178acdddf 100644
--- a/sys/contrib/device-tree/src/arm64/amazon/alpine-v3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amazon/alpine-v3.dtsi
@@ -355,7 +355,6 @@
msix: msix@fbe00000 {
compatible = "al,alpine-msix";
reg = <0x0 0xfbe00000 0x0 0x100000>;
- interrupt-controller;
msi-controller;
al,msi-base-spi = <336>;
al,msi-num-spis = <959>;
diff --git a/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b0.dts b/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b0.dts
index 21149acb6b31..1a65f1ec183d 100644
--- a/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b0.dts
+++ b/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b0.dts
@@ -64,7 +64,6 @@
reg = <0>;
spi-max-frequency = <20000000>;
voltage-ranges = <3200 3400>;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,com-mode = <0x0>;
pl022,rx-level-trig = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b1.dts b/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b1.dts
index 99205ae1b46b..52f8d36295a8 100644
--- a/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b1.dts
+++ b/sys/contrib/device-tree/src/arm64/amd/amd-overdrive-rev-b1.dts
@@ -76,7 +76,6 @@
reg = <0>;
spi-max-frequency = <20000000>;
voltage-ranges = <3200 3400>;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,com-mode = <0x0>;
pl022,rx-level-trig = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/amd/elba-16core.dtsi b/sys/contrib/device-tree/src/arm64/amd/elba-16core.dtsi
new file mode 100644
index 000000000000..568bcc39ce9f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amd/elba-16core.dtsi
@@ -0,0 +1,197 @@
+// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+/*
+ * Copyright 2020-2023 Advanced Micro Devices, Inc.
+ */
+
+/ {
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu-map {
+ cluster0 {
+ core0 { cpu = <&cpu0>; };
+ core1 { cpu = <&cpu1>; };
+ core2 { cpu = <&cpu2>; };
+ core3 { cpu = <&cpu3>; };
+ };
+
+ cluster1 {
+ core0 { cpu = <&cpu4>; };
+ core1 { cpu = <&cpu5>; };
+ core2 { cpu = <&cpu6>; };
+ core3 { cpu = <&cpu7>; };
+ };
+
+ cluster2 {
+ core0 { cpu = <&cpu8>; };
+ core1 { cpu = <&cpu9>; };
+ core2 { cpu = <&cpu10>; };
+ core3 { cpu = <&cpu11>; };
+ };
+
+ cluster3 {
+ core0 { cpu = <&cpu12>; };
+ core1 { cpu = <&cpu13>; };
+ core2 { cpu = <&cpu14>; };
+ core3 { cpu = <&cpu15>; };
+ };
+ };
+
+ /* CLUSTER 0 */
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x0>;
+ next-level-cache = <&l2_0>;
+ enable-method = "psci";
+ };
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x1>;
+ next-level-cache = <&l2_0>;
+ enable-method = "psci";
+ };
+
+ cpu2: cpu@2 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x2>;
+ next-level-cache = <&l2_0>;
+ enable-method = "psci";
+ };
+
+ cpu3: cpu@3 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x3>;
+ next-level-cache = <&l2_0>;
+ enable-method = "psci";
+ };
+
+ l2_0: l2-cache0 {
+ compatible = "cache";
+ cache-unified;
+ cache-level = <2>;
+ };
+
+ /* CLUSTER 1 */
+ cpu4: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x100>;
+ next-level-cache = <&l2_1>;
+ enable-method = "psci";
+ };
+
+ cpu5: cpu@101 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x101>;
+ next-level-cache = <&l2_1>;
+ enable-method = "psci";
+ };
+
+ cpu6: cpu@102 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x102>;
+ next-level-cache = <&l2_1>;
+ enable-method = "psci";
+ };
+
+ cpu7: cpu@103 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x103>;
+ next-level-cache = <&l2_1>;
+ enable-method = "psci";
+ };
+
+ l2_1: l2-cache1 {
+ compatible = "cache";
+ cache-unified;
+ cache-level = <2>;
+ };
+
+ /* CLUSTER 2 */
+ cpu8: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x200>;
+ next-level-cache = <&l2_2>;
+ enable-method = "psci";
+ };
+
+ cpu9: cpu@201 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x201>;
+ next-level-cache = <&l2_2>;
+ enable-method = "psci";
+ };
+
+ cpu10: cpu@202 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x202>;
+ next-level-cache = <&l2_2>;
+ enable-method = "psci";
+ };
+
+ cpu11: cpu@203 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x203>;
+ next-level-cache = <&l2_2>;
+ enable-method = "psci";
+ };
+
+ l2_2: l2-cache2 {
+ compatible = "cache";
+ cache-unified;
+ cache-level = <2>;
+ };
+
+ /* CLUSTER 3 */
+ cpu12: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x300>;
+ next-level-cache = <&l2_3>;
+ enable-method = "psci";
+ };
+
+ cpu13: cpu@301 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x301>;
+ next-level-cache = <&l2_3>;
+ enable-method = "psci";
+ };
+
+ cpu14: cpu@302 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x302>;
+ next-level-cache = <&l2_3>;
+ enable-method = "psci";
+ };
+
+ cpu15: cpu@303 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a72";
+ reg = <0x303>;
+ next-level-cache = <&l2_3>;
+ enable-method = "psci";
+ };
+
+ l2_3: l2-cache3 {
+ compatible = "cache";
+ cache-unified;
+ cache-level = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amd/elba-asic-common.dtsi b/sys/contrib/device-tree/src/arm64/amd/elba-asic-common.dtsi
new file mode 100644
index 000000000000..46b6c6783f58
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amd/elba-asic-common.dtsi
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+/*
+ * Copyright 2020-2022 Advanced Micro Devices, Inc.
+ */
+
+&ahb_clk {
+ clock-frequency = <400000000>;
+};
+
+&emmc_clk {
+ clock-frequency = <200000000>;
+};
+
+&flash_clk {
+ clock-frequency = <400000000>;
+};
+
+&ref_clk {
+ clock-frequency = <156250000>;
+};
+
+&qspi {
+ status = "okay";
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ spi-rx-bus-width = <2>;
+ m25p,fast-read;
+ cdns,read-delay = <0>;
+ cdns,tshsl-ns = <0>;
+ cdns,tsd2d-ns = <0>;
+ cdns,tchsh-ns = <0>;
+ cdns,tslch-ns = <0>;
+ };
+};
+
+&gpio0 {
+ status = "okay";
+};
+
+&emmc {
+ bus-width = <8>;
+ cap-mmc-hw-reset;
+ status = "okay";
+};
+
+&wdt0 {
+ status = "okay";
+};
+
+&i2c0 {
+ clock-frequency = <100000>;
+ status = "okay";
+
+ rtc@51 {
+ compatible = "nxp,pcf85263";
+ reg = <0x51>;
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ num-cs = <4>;
+ cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>,
+ <&porta 7 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/amd/elba-asic.dts b/sys/contrib/device-tree/src/arm64/amd/elba-asic.dts
new file mode 100644
index 000000000000..c3f4da2f7449
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amd/elba-asic.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+/*
+ * Device Tree file for AMD Pensando Elba Board.
+ *
+ * Copyright 2020-2022 Advanced Micro Devices, Inc.
+ */
+
+/dts-v1/;
+
+#include "elba.dtsi"
+#include "elba-16core.dtsi"
+#include "elba-asic-common.dtsi"
+#include "elba-flash-parts.dtsi"
+
+/ {
+ model = "AMD Pensando Elba Board";
+ compatible = "amd,pensando-elba-ortano", "amd,pensando-elba";
+
+ aliases {
+ serial0 = &uart0;
+ spi0 = &spi0;
+ spi1 = &qspi;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amd/elba-flash-parts.dtsi b/sys/contrib/device-tree/src/arm64/amd/elba-flash-parts.dtsi
new file mode 100644
index 000000000000..cf761a05a81f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amd/elba-flash-parts.dtsi
@@ -0,0 +1,117 @@
+// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+/*
+ * Copyright 2020-2023 Advanced Micro Devices, Inc.
+ */
+
+&flash0 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ partition@0 {
+ label = "rsvd";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ label = "flash";
+ reg = <0x10000 0xfff0000>;
+ };
+
+ partition@f0000 {
+ label = "golduenv";
+ reg = <0xf0000 0x10000>;
+ };
+
+ partition@100000 {
+ label = "boot0";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@180000 {
+ label = "golduboot";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "brdcfg0";
+ reg = <0x380000 0x10000>;
+ };
+
+ partition@390000 {
+ label = "brdcfg1";
+ reg = <0x390000 0x10000>;
+ };
+
+ partition@400000 {
+ label = "goldfw";
+ reg = <0x400000 0x3c00000>;
+ };
+
+ partition@4010000 {
+ label = "fwmap";
+ reg = <0x4010000 0x20000>;
+ };
+
+ partition@4030000 {
+ label = "fwsel";
+ reg = <0x4030000 0x20000>;
+ };
+
+ partition@4090000 {
+ label = "bootlog";
+ reg = <0x4090000 0x20000>;
+ };
+
+ partition@40b0000 {
+ label = "panicbuf";
+ reg = <0x40b0000 0x20000>;
+ };
+
+ partition@40d0000 {
+ label = "uservars";
+ reg = <0x40d0000 0x20000>;
+ };
+
+ partition@4200000 {
+ label = "uboota";
+ reg = <0x4200000 0x400000>;
+ };
+
+ partition@4600000 {
+ label = "ubootb";
+ reg = <0x4600000 0x400000>;
+ };
+
+ partition@4a00000 {
+ label = "mainfwa";
+ reg = <0x4a00000 0x1000000>;
+ };
+
+ partition@5a00000 {
+ label = "mainfwb";
+ reg = <0x5a00000 0x1000000>;
+ };
+
+ partition@6a00000 {
+ label = "diaguboot";
+ reg = <0x6a00000 0x400000>;
+ };
+
+ partition@6e00000 {
+ label = "spare";
+ reg = <0x6e00000 0x1200000>;
+ };
+
+ partition@8000000 {
+ label = "diagfw";
+ reg = <0x8000000 0x7fe0000>;
+ };
+
+ partition@ffe0000 {
+ label = "ubootenv";
+ reg = <0xffe0000 0x10000>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amd/elba.dtsi b/sys/contrib/device-tree/src/arm64/amd/elba.dtsi
new file mode 100644
index 000000000000..674890cf2a34
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amd/elba.dtsi
@@ -0,0 +1,191 @@
+// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+/*
+ * Copyright 2020-2022 Advanced Micro Devices, Inc.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include "dt-bindings/interrupt-controller/arm-gic.h"
+
+/ {
+ model = "Elba ASIC Board";
+ compatible = "amd,pensando-elba";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ dma-coherent;
+
+ ahb_clk: oscillator0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ emmc_clk: oscillator2 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ flash_clk: oscillator3 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ ref_clk: oscillator4 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ psci {
+ compatible = "arm,psci-0.2";
+ method = "smc";
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ pmu {
+ compatible = "arm,cortex-a72-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ soc: soc {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ i2c0: i2c@400 {
+ compatible = "snps,designware-i2c";
+ reg = <0x0 0x400 0x0 0x100>;
+ clocks = <&ahb_clk>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ i2c-sda-hold-time-ns = <480>;
+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ wdt0: watchdog@1400 {
+ compatible = "snps,dw-wdt";
+ reg = <0x0 0x1400 0x0 0x100>;
+ clocks = <&ahb_clk>;
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ qspi: spi@2400 {
+ compatible = "amd,pensando-elba-qspi", "cdns,qspi-nor";
+ reg = <0x0 0x2400 0x0 0x400>,
+ <0x0 0x7fff0000 0x0 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&flash_clk>;
+ cdns,fifo-depth = <1024>;
+ cdns,fifo-width = <4>;
+ cdns,trigger-address = <0x7fff0000>;
+ status = "disabled";
+ };
+
+ spi0: spi@2800 {
+ compatible = "amd,pensando-elba-spi";
+ reg = <0x0 0x2800 0x0 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ amd,pensando-elba-syscon = <&syscon>;
+ clocks = <&ahb_clk>;
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ num-cs = <2>;
+ status = "disabled";
+ };
+
+ gpio0: gpio@4000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x0 0x4000 0x0 0x78>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ porta: gpio-port@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ reg = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <8>;
+ interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ interrupt-parent = <&gic>;
+ #interrupt-cells = <2>;
+ };
+
+ portb: gpio-port@1 {
+ compatible = "snps,dw-apb-gpio-port";
+ reg = <1>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <8>;
+ };
+ };
+
+ uart0: serial@4800 {
+ compatible = "ns16550a";
+ reg = <0x0 0x4800 0x0 0x100>;
+ clocks = <&ref_clk>;
+ interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ };
+
+ gic: interrupt-controller@800000 {
+ compatible = "arm,gic-v3";
+ reg = <0x0 0x800000 0x0 0x200000>, /* GICD */
+ <0x0 0xa00000 0x0 0x200000>, /* GICR */
+ <0x0 0x60000000 0x0 0x2000>, /* GICC */
+ <0x0 0x60010000 0x0 0x1000>, /* GICH */
+ <0x0 0x60020000 0x0 0x2000>; /* GICV */
+ #address-cells = <2>;
+ #size-cells = <2>;
+ #interrupt-cells = <3>;
+ ranges;
+ interrupt-controller;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+ /*
+ * Elba specific pre-ITS is enabled using the
+ * existing property socionext,synquacer-pre-its
+ */
+ gic_its: msi-controller@820000 {
+ compatible = "arm,gic-v3-its";
+ reg = <0x0 0x820000 0x0 0x10000>;
+ msi-controller;
+ #msi-cells = <1>;
+ socionext,synquacer-pre-its =
+ <0xc00000 0x1000000>;
+ };
+ };
+
+ emmc: mmc@30440000 {
+ compatible = "amd,pensando-elba-sd4hc", "cdns,sd4hc";
+ reg = <0x0 0x30440000 0x0 0x10000>,
+ <0x0 0x30480044 0x0 0x4>; /* byte-lane ctrl */
+ clocks = <&emmc_clk>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+ cdns,phy-input-delay-sd-highspeed = <0x4>;
+ cdns,phy-input-delay-legacy = <0x4>;
+ cdns,phy-input-delay-sd-uhs-sdr50 = <0x6>;
+ cdns,phy-input-delay-sd-uhs-ddr50 = <0x16>;
+ mmc-ddr-1_8v;
+ status = "disabled";
+ };
+
+ syscon: syscon@307c0000 {
+ compatible = "amd,pensando-elba-syscon", "syscon";
+ reg = <0x0 0x307c0000 0x0 0x3000>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/amlogic-c3.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-c3.dtsi
index 60ad4f3eef9d..2ad1f8eef199 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/amlogic-c3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-c3.dtsi
@@ -47,6 +47,15 @@
#clock-cells = <0>;
};
+ sm: secure-monitor {
+ compatible = "amlogic,meson-gxbb-sm";
+
+ pwrc: power-controller {
+ compatible = "amlogic,c3-pwrc";
+ #power-domain-cells = <1>;
+ };
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <2>;
@@ -72,6 +81,38 @@
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
+ watchdog@2100 {
+ compatible = "amlogic,c3-wdt", "amlogic,t7-wdt";
+ reg = <0x0 0x2100 0x0 0x10>;
+ clocks = <&xtal>;
+ };
+
+ periphs_pinctrl: pinctrl@4000 {
+ compatible = "amlogic,c3-periphs-pinctrl";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ gpio: bank@4000 {
+ reg = <0x0 0x4000 0x0 0x004c>,
+ <0x0 0x4100 0x0 0x01de>;
+ reg-names = "mux", "gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&periphs_pinctrl 0 0 55>;
+ };
+ };
+
+ gpio_intc: interrupt-controller@4080 {
+ compatible = "amlogic,meson-gpio-intc",
+ "amlogic,c3-gpio-intc";
+ reg = <0x0 0x4080 0x0 0x0020>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ amlogic,channel-interrupts =
+ <10 11 12 13 14 15 16 17 18 19 20 21>;
+ };
+
uart_b: serial@7a000 {
compatible = "amlogic,meson-s4-uart",
"amlogic,meson-ao-uart";
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-an400.dts b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-an400.dts
new file mode 100644
index 000000000000..c05edebb90b5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-an400.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "amlogic-t7.dtsi"
+
+/ {
+ model = "Amlogic A311D2 AN400 Development Board";
+ compatible = "amlogic,an400", "amlogic,a311d2", "amlogic,t7";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ aliases {
+ serial0 = &uart_a;
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x00000000 0x00000000 0x00000000 0xE0000000
+ 0x00000001 0x00000000 0x00000000 0x20000000>;
+ };
+
+ xtal: xtal-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "xtal";
+ #clock-cells = <0>;
+ };
+};
+
+&uart_a {
+ clocks = <&xtal>, <&xtal>, <&xtal>;
+ clock-names = "xtal", "pclk", "baud";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
new file mode 100644
index 000000000000..fffdab96b12e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2022 Wesion, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "amlogic-t7.dtsi"
+
+/ {
+ model = "Khadas vim4";
+ compatible = "khadas,vim4", "amlogic,a311d2", "amlogic,t7";
+
+ aliases {
+ serial0 = &uart_a;
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x2 0x0>; /* 8 GB */
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 3 MiB reserved for ARM Trusted Firmware (BL31) */
+ secmon_reserved: secmon@5000000 {
+ reg = <0x0 0x05000000 0x0 0x300000>;
+ no-map;
+ };
+
+ /* 32 MiB reserved for ARM Trusted Firmware (BL32) */
+ secmon_reserved_bl32: secmon@5300000 {
+ reg = <0x0 0x05300000 0x0 0x2000000>;
+ no-map;
+ };
+ };
+
+ xtal: xtal-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "xtal";
+ #clock-cells = <0>;
+ };
+
+};
+
+&uart_a {
+ status = "okay";
+ clocks = <&xtal>, <&xtal>, <&xtal>;
+ clock-names = "xtal", "pclk", "baud";
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7.dtsi
new file mode 100644
index 000000000000..a03c7667d2b6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/amlogic-t7.dtsi
@@ -0,0 +1,183 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Amlogic, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/amlogic,t7-pwrc.h>
+
+/ {
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <0x2>;
+ #size-cells = <0x0>;
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&cpu100>;
+ };
+ core1 {
+ cpu = <&cpu101>;
+ };
+ core2 {
+ cpu = <&cpu102>;
+ };
+ core3 {
+ cpu = <&cpu103>;
+ };
+ };
+
+ cluster1 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+ core1 {
+ cpu = <&cpu1>;
+ };
+ core2 {
+ cpu = <&cpu2>;
+ };
+ core3 {
+ cpu = <&cpu3>;
+ };
+ };
+ };
+
+ cpu100: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ };
+
+ cpu101: cpu@101{
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ reg = <0x0 0x101>;
+ enable-method = "psci";
+ };
+
+ cpu102: cpu@102 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ reg = <0x0 0x102>;
+ enable-method = "psci";
+ };
+
+ cpu103: cpu@103 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ reg = <0x0 0x103>;
+ enable-method = "psci";
+ };
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a73";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ };
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a73";
+ reg = <0x0 0x1>;
+ enable-method = "psci";
+ };
+
+ cpu2: cpu@2 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a73";
+ reg = <0x0 0x2>;
+ enable-method = "psci";
+ };
+
+ cpu3: cpu@3 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a73";
+ reg = <0x0 0x3>;
+ enable-method = "psci";
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ sm: secure-monitor {
+ compatible = "amlogic,meson-gxbb-sm";
+
+ pwrc: power-controller {
+ compatible = "amlogic,t7-pwrc";
+ #power-domain-cells = <1>;
+ };
+ };
+
+ soc {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ gic: interrupt-controller@fff01000 {
+ compatible = "arm,gic-400";
+ #interrupt-cells = <3>;
+ #address-cells = <0>;
+ interrupt-controller;
+ reg = <0x0 0xfff01000 0 0x1000>,
+ <0x0 0xfff02000 0 0x0100>;
+ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
+ };
+
+ apb4: bus@fe000000 {
+ compatible = "simple-bus";
+ reg = <0x0 0xfe000000 0x0 0x480000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
+
+ watchdog@2100 {
+ compatible = "amlogic,t7-wdt";
+ reg = <0x0 0x2100 0x0 0x10>;
+ clocks = <&xtal>;
+ };
+
+ periphs_pinctrl: pinctrl@4000 {
+ compatible = "amlogic,t7-periphs-pinctrl";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ gpio: bank@4000 {
+ reg = <0x0 0x4000 0x0 0x0064>,
+ <0x0 0x40c0 0x0 0x0220>;
+ reg-names = "mux", "gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&periphs_pinctrl 0 0 157>;
+ };
+ };
+
+ uart_a: serial@78000 {
+ compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
+ reg = <0x0 0x78000 0x0 0x18>;
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+ };
+
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-a1-ad402.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-a1-ad402.dts
new file mode 100644
index 000000000000..1c20516fa653
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-a1-ad402.dts
@@ -0,0 +1,147 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 SberDevices
+ * Author: Dmitry Rokosov <ddrokosov@sberdevices.ru>
+ */
+
+/dts-v1/;
+
+#include "meson-a1.dtsi"
+
+/ {
+ compatible = "amlogic,ad402", "amlogic,a1";
+ model = "Amlogic Meson A1 AD402 Development Board";
+
+ aliases {
+ serial0 = &uart_AO_B;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x0 0x8000000>;
+ };
+
+ reserved-memory {
+ /* 3 MiB reserved for Amlogic Trust OS (BL32) */
+ secos_reserved: secos@3d00000 {
+ reg = <0x0 0x03d00000 0x0 0x300000>;
+ no-map;
+ };
+ };
+
+ firmware {
+ optee {
+ compatible = "linaro,optee-tz";
+ method = "smc";
+ };
+ };
+
+ battery_4v2: regulator-battery-4v2 {
+ compatible = "regulator-fixed";
+ regulator-name = "4V2";
+ regulator-min-microvolt = <4200000>;
+ regulator-max-microvolt = <4200000>;
+ regulator-always-on;
+ };
+
+ vddq_1v35: regulator-vddq-1v35 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDQ_1V35";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ vin-supply = <&battery_4v2>;
+ regulator-always-on;
+ };
+
+ vddao_3v3: regulator-vddao-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDAO_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&battery_4v2>;
+ regulator-always-on;
+ };
+
+ vcc_3v3: regulator-vcc-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
+ };
+
+ vddio_1v8: regulator-vddio-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDIO_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
+ };
+};
+
+/* Bluetooth HCI H4 */
+&uart_AO {
+ status = "okay";
+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
+ pinctrl-names = "default";
+};
+
+&uart_AO_B {
+ status = "okay";
+};
+
+&saradc {
+ status = "okay";
+ vref-supply = <&vddio_1v8>;
+};
+
+&spifc {
+ status = "okay";
+ pinctrl-0 = <&spifc_pins>;
+ pinctrl-names = "default";
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ status = "okay";
+ reg = <0>;
+ spi-max-frequency = <96000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ };
+};
+
+&usb2_phy1 {
+ phy-supply = <&vcc_3v3>;
+};
+
+&usb {
+ status = "okay";
+ dr_mode = "peripheral";
+};
+
+&sd_emmc {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-0 = <&sdio_pins>;
+ pinctrl-1 = <&sdio_clk_gate_pins>;
+ pinctrl-names = "default", "clk-gate";
+
+ bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr104;
+ max-frequency = <200000000>;
+ non-removable;
+ disable-wp;
+
+ vmmc-supply = <&vddao_3v3>;
+ vqmmc-supply = <&vddio_1v8>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-a1.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-a1.dtsi
index c8f344596285..648e7f49424f 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-a1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-a1.dtsi
@@ -3,9 +3,13 @@
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/amlogic,a1-pll-clkc.h>
+#include <dt-bindings/clock/amlogic,a1-peripherals-clkc.h>
#include <dt-bindings/gpio/meson-a1-gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/power/meson-a1-power.h>
+#include <dt-bindings/reset/amlogic,meson-a1-reset.h>
/ {
compatible = "amlogic,a1";
@@ -41,6 +45,15 @@
};
};
+ efuse: efuse {
+ compatible = "amlogic,meson-gxbb-efuse";
+ clocks = <&clkc_periphs CLKID_OTP>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ secure-monitor = <&sm>;
+ power-domains = <&pwrc PWRC_OTP_ID>;
+ };
+
psci {
compatible = "arm,psci-1.0";
method = "smc";
@@ -66,7 +79,6 @@
pwrc: power-controller {
compatible = "amlogic,meson-a1-pwrc";
#power-domain-cells = <1>;
- status = "okay";
};
};
@@ -76,6 +88,16 @@
#size-cells = <2>;
ranges;
+ spifc: spi@fd000400 {
+ compatible = "amlogic,a1-spifc";
+ reg = <0x0 0xfd000400 0x0 0x290>;
+ clocks = <&clkc_periphs CLKID_SPIFC>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&pwrc PWRC_SPIFC_ID>;
+ status = "disabled";
+ };
+
apb: bus@fe000000 {
compatible = "simple-bus";
reg = <0x0 0xfe000000 0x0 0x1000000>;
@@ -83,7 +105,6 @@
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x1000000>;
-
reset: reset-controller@0 {
compatible = "amlogic,meson-a1-reset";
reg = <0x0 0x0 0x0 0x8c>;
@@ -105,10 +126,200 @@
gpio-ranges = <&periphs_pinctrl 0 0 62>;
};
+ i2c0_f11_pins: i2c0-f11 {
+ mux {
+ groups = "i2c0_sck_f11",
+ "i2c0_sda_f12";
+ function = "i2c0";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c0_f9_pins: i2c0-f9 {
+ mux {
+ groups = "i2c0_sck_f9",
+ "i2c0_sda_f10";
+ function = "i2c0";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c1_x_pins: i2c1-x {
+ mux {
+ groups = "i2c1_sck_x",
+ "i2c1_sda_x";
+ function = "i2c1";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c1_a_pins: i2c1-a {
+ mux {
+ groups = "i2c1_sck_a",
+ "i2c1_sda_a";
+ function = "i2c1";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c2_x0_pins: i2c2-x0 {
+ mux {
+ groups = "i2c2_sck_x0",
+ "i2c2_sda_x1";
+ function = "i2c2";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c2_x15_pins: i2c2-x15 {
+ mux {
+ groups = "i2c2_sck_x15",
+ "i2c2_sda_x16";
+ function = "i2c2";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c2_a4_pins: i2c2-a4 {
+ mux {
+ groups = "i2c2_sck_a4",
+ "i2c2_sda_a5";
+ function = "i2c2";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c2_a8_pins: i2c2-a8 {
+ mux {
+ groups = "i2c2_sck_a8",
+ "i2c2_sda_a9";
+ function = "i2c2";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c3_x_pins: i2c3-x {
+ mux {
+ groups = "i2c3_sck_x",
+ "i2c3_sda_x";
+ function = "i2c3";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c3_f_pins: i2c3-f {
+ mux {
+ groups = "i2c3_sck_f",
+ "i2c3_sda_f";
+ function = "i2c3";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ uart_a_pins: uart-a {
+ mux {
+ groups = "uart_a_tx",
+ "uart_a_rx";
+ function = "uart_a";
+ };
+ };
+
+ uart_a_cts_rts_pins: uart-a-cts-rts {
+ mux {
+ groups = "uart_a_cts",
+ "uart_a_rts";
+ function = "uart_a";
+ bias-pull-down;
+ };
+ };
+
+ sdio_pins: sdio {
+ mux0 {
+ groups = "sdcard_d0_x",
+ "sdcard_d1_x",
+ "sdcard_d2_x",
+ "sdcard_d3_x",
+ "sdcard_cmd_x";
+ function = "sdcard";
+ bias-pull-up;
+ };
+
+ mux1 {
+ groups = "sdcard_clk_x";
+ function = "sdcard";
+ bias-disable;
+ };
+ };
+
+ sdio_clk_gate_pins: sdio-clk-gate {
+ mux {
+ groups = "sdcard_clk_x";
+ function = "sdcard";
+ bias-pull-down;
+ };
+ };
+
+ spifc_pins: spifc {
+ mux {
+ groups = "spif_mo",
+ "spif_mi",
+ "spif_clk",
+ "spif_cs",
+ "spif_hold_n",
+ "spif_wp_n";
+ function = "spif";
+ };
+ };
+ };
+
+ gpio_intc: interrupt-controller@440 {
+ compatible = "amlogic,meson-a1-gpio-intc",
+ "amlogic,meson-gpio-intc";
+ reg = <0x0 0x0440 0x0 0x14>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ amlogic,channel-interrupts =
+ <49 50 51 52 53 54 55 56>;
+ };
+
+ clkc_periphs: clock-controller@800 {
+ compatible = "amlogic,a1-peripherals-clkc";
+ reg = <0 0x800 0 0x104>;
+ #clock-cells = <1>;
+ clocks = <&clkc_pll CLKID_FCLK_DIV2>,
+ <&clkc_pll CLKID_FCLK_DIV3>,
+ <&clkc_pll CLKID_FCLK_DIV5>,
+ <&clkc_pll CLKID_FCLK_DIV7>,
+ <&clkc_pll CLKID_HIFI_PLL>,
+ <&xtal>;
+ clock-names = "fclk_div2", "fclk_div3",
+ "fclk_div5", "fclk_div7",
+ "hifi_pll", "xtal";
+ };
+
+ i2c0: i2c@1400 {
+ compatible = "amlogic,meson-axg-i2c";
+ status = "disabled";
+ reg = <0x0 0x1400 0x0 0x20>;
+ interrupts = <GIC_SPI 32 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&clkc_periphs CLKID_I2C_M_A>;
+ power-domains = <&pwrc PWRC_I2C_ID>;
};
uart_AO: serial@1c00 {
- compatible = "amlogic,meson-gx-uart",
+ compatible = "amlogic,meson-a1-uart",
"amlogic,meson-ao-uart";
reg = <0x0 0x1c00 0x0 0x18>;
interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
@@ -118,7 +329,7 @@
};
uart_AO_B: serial@2000 {
- compatible = "amlogic,meson-gx-uart",
+ compatible = "amlogic,meson-a1-uart",
"amlogic,meson-ao-uart";
reg = <0x0 0x2000 0x0 0x18>;
interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
@@ -127,14 +338,148 @@
status = "disabled";
};
- gpio_intc: interrupt-controller@0440 {
- compatible = "amlogic,meson-a1-gpio-intc",
- "amlogic,meson-gpio-intc";
- reg = <0x0 0x0440 0x0 0x14>;
- interrupt-controller;
- #interrupt-cells = <2>;
- amlogic,channel-interrupts =
- <49 50 51 52 53 54 55 56>;
+ saradc: adc@2c00 {
+ compatible = "amlogic,meson-g12a-saradc",
+ "amlogic,meson-saradc";
+ reg = <0x0 0x2c00 0x0 0x48>;
+ #io-channel-cells = <1>;
+ power-domains = <&pwrc PWRC_I2C_ID>;
+ interrupts = <GIC_SPI 35 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&xtal>,
+ <&clkc_periphs CLKID_SARADC_EN>,
+ <&clkc_periphs CLKID_SARADC>,
+ <&clkc_periphs CLKID_SARADC_SEL>;
+ clock-names = "clkin", "core",
+ "adc_clk", "adc_sel";
+ status = "disabled";
+ };
+
+ i2c1: i2c@5c00 {
+ compatible = "amlogic,meson-axg-i2c";
+ status = "disabled";
+ reg = <0x0 0x5c00 0x0 0x20>;
+ interrupts = <GIC_SPI 68 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&clkc_periphs CLKID_I2C_M_B>;
+ power-domains = <&pwrc PWRC_I2C_ID>;
+ };
+
+ i2c2: i2c@6800 {
+ compatible = "amlogic,meson-axg-i2c";
+ status = "disabled";
+ reg = <0x0 0x6800 0x0 0x20>;
+ interrupts = <GIC_SPI 76 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&clkc_periphs CLKID_I2C_M_C>;
+ power-domains = <&pwrc PWRC_I2C_ID>;
+ };
+
+ i2c3: i2c@6c00 {
+ compatible = "amlogic,meson-axg-i2c";
+ status = "disabled";
+ reg = <0x0 0x6c00 0x0 0x20>;
+ interrupts = <GIC_SPI 78 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&clkc_periphs CLKID_I2C_M_D>;
+ power-domains = <&pwrc PWRC_I2C_ID>;
+ };
+
+ usb2_phy1: phy@4000 {
+ compatible = "amlogic,a1-usb2-phy";
+ clocks = <&clkc_periphs CLKID_USB_PHY_IN>;
+ clock-names = "xtal";
+ reg = <0x0 0x4000 0x0 0x60>;
+ resets = <&reset RESET_USBPHY>;
+ reset-names = "phy";
+ #phy-cells = <0>;
+ power-domains = <&pwrc PWRC_USB_ID>;
+ };
+
+ hwrng: rng@5118 {
+ compatible = "amlogic,meson-rng";
+ reg = <0x0 0x5118 0x0 0x4>;
+ power-domains = <&pwrc PWRC_OTP_ID>;
+ };
+
+ sec_AO: ao-secure@5a20 {
+ compatible = "amlogic,meson-gx-ao-secure", "syscon";
+ reg = <0x0 0x5a20 0x0 0x140>;
+ amlogic,has-chip-id;
+ };
+
+ clkc_pll: pll-clock-controller@7c80 {
+ compatible = "amlogic,a1-pll-clkc";
+ reg = <0 0x7c80 0 0x18c>;
+ #clock-cells = <1>;
+ clocks = <&clkc_periphs CLKID_FIXPLL_IN>,
+ <&clkc_periphs CLKID_HIFIPLL_IN>;
+ clock-names = "fixpll_in", "hifipll_in";
+ };
+
+ sd_emmc: sd@10000 {
+ compatible = "amlogic,meson-axg-mmc";
+ reg = <0x0 0x10000 0x0 0x800>;
+ interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkc_periphs CLKID_SD_EMMC_A>,
+ <&clkc_periphs CLKID_SD_EMMC>,
+ <&clkc_pll CLKID_FCLK_DIV2>;
+ clock-names = "core",
+ "clkin0",
+ "clkin1";
+ assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_SEL2>;
+ assigned-clock-parents = <&xtal>;
+ resets = <&reset RESET_SD_EMMC_A>;
+ power-domains = <&pwrc PWRC_SD_EMMC_ID>;
+ status = "disabled";
+ };
+ };
+
+ usb: usb@fe004400 {
+ status = "disabled";
+ compatible = "amlogic,meson-a1-usb-ctrl";
+ reg = <0x0 0xfe004400 0x0 0xa0>;
+ interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ clocks = <&clkc_periphs CLKID_USB_CTRL>,
+ <&clkc_periphs CLKID_USB_BUS>,
+ <&clkc_periphs CLKID_USB_CTRL_IN>;
+ clock-names = "usb_ctrl", "usb_bus", "xtal_usb_ctrl";
+ resets = <&reset RESET_USBCTRL>;
+ reset-name = "usb_ctrl";
+
+ dr_mode = "otg";
+
+ phys = <&usb2_phy1>;
+ phy-names = "usb2-phy1";
+
+ dwc3: usb@ff400000 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0xff400000 0x0 0x100000>;
+ interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+ dr_mode = "host";
+ snps,dis_u2_susphy_quirk;
+ snps,quirk-frame-length-adjustment = <0x20>;
+ snps,parkmode-disable-ss-quirk;
+ };
+
+ dwc2: usb@ff500000 {
+ compatible = "amlogic,meson-a1-usb", "snps,dwc2";
+ reg = <0x0 0xff500000 0x0 0x40000>;
+ interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&usb2_phy1>;
+ phy-names = "usb2-phy";
+ clocks = <&clkc_periphs CLKID_USB_PHY>;
+ clock-names = "otg";
+ dr_mode = "peripheral";
+ g-rx-fifo-size = <192>;
+ g-np-tx-fifo-size = <128>;
+ g-tx-fifo-size = <128 128 16 16 16>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-2.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-2.dts
index 0062667c4f65..8a18ce948450 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-2.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-2.dts
@@ -30,8 +30,20 @@
&uart_B {
bluetooth {
compatible = "realtek,rtl8822cs-bt";
- enable-gpios = <&gpio GPIOZ_7 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio GPIOZ_7 GPIO_ACTIVE_HIGH>;
host-wake-gpios = <&gpio GPIOZ_8 GPIO_ACTIVE_HIGH>;
device-wake-gpios = <&gpio GPIOZ_6 GPIO_ACTIVE_HIGH>;
};
};
+
+&i2c_AO {
+ /* EEPROM on base board */
+ eeprompd: eeprom@56 {
+ compatible = "atmel,24c64";
+ reg = <0x56>;
+ pagesize = <0x20>;
+ label = "eeprompd";
+ address-width = <0x10>;
+ vcc-supply = <&vddao_3v3>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-3.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-3.dts
index c2d22b00c1cd..c356bd2cc63a 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-3.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-jethome-jethub-j110-rev-3.dts
@@ -25,3 +25,15 @@
&sd_emmc_b {
broken-cd;/* cd-gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;*/
};
+
+&i2c_AO {
+ /* EEPROM on base board */
+ eeprompd: eeprom@56 {
+ compatible = "atmel,24c64";
+ reg = <0x56>;
+ pagesize = <0x20>;
+ label = "eeprompd";
+ address-width = <0x10>;
+ vcc-supply = <&vddao_3v3>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-s400.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-s400.dts
index 359589d1dfa9..c8905663bc75 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-s400.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg-s400.dts
@@ -66,7 +66,6 @@
VDDA-supply = <&vcc_3v3>;
VDDP-supply = <&vcc_3v3>;
VDDD-supply = <&vcc_3v3>;
- status = "okay";
sound-name-prefix = "Linein";
};
@@ -75,14 +74,12 @@
compatible = "everest,es7154";
VDD-supply = <&vcc_3v3>;
PVDD-supply = <&vcc_5v>;
- status = "okay";
sound-name-prefix = "Lineout";
};
spdif_dit: audio-codec-2 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -91,14 +88,12 @@
compatible = "dmic-codec";
num-channels = <7>;
wakeup-delay-ms = <50>;
- status = "okay";
sound-name-prefix = "MIC";
};
spdif_dir: audio-codec-4 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dir";
- status = "okay";
sound-name-prefix = "DIR";
};
@@ -280,7 +275,6 @@
assigned-clock-rates = <589824000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg.dtsi
index 768d0ed78dbe..7e5ac9db93f8 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-axg.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-axg.dtsi
@@ -432,6 +432,27 @@
};
};
+ nand_all_pins: nand-all-pins {
+ mux {
+ groups = "emmc_nand_d0",
+ "emmc_nand_d1",
+ "emmc_nand_d2",
+ "emmc_nand_d3",
+ "emmc_nand_d4",
+ "emmc_nand_d5",
+ "emmc_nand_d6",
+ "emmc_nand_d7",
+ "nand_ce0",
+ "nand_ale",
+ "nand_cle",
+ "nand_wen_clk",
+ "nand_ren_wr";
+ function = "nand";
+ input-enable;
+ bias-pull-up;
+ };
+ };
+
emmc_ds_pins: emmc_ds {
mux {
groups = "emmc_ds";
@@ -1908,6 +1929,21 @@
resets = <&reset RESET_SD_EMMC_C>;
};
+ nfc: nand-controller@7800 {
+ compatible = "amlogic,meson-axg-nfc";
+ reg = <0x0 0x7800 0x0 0x100>,
+ <0x0 0x7000 0x0 0x800>;
+ reg-names = "nfc", "emmc";
+ pinctrl-0 = <&nand_all_pins>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 34 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc CLKID_SD_EMMC_C>,
+ <&clkc CLKID_FCLK_DIV2>;
+ clock-names = "core", "device";
+ };
+
usb2_phy1: phy@9020 {
compatible = "amlogic,meson-gxl-usb2-phy";
#phy-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12-common.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12-common.dtsi
index 0c49655cc90c..ff68b911b729 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12-common.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/clock/g12a-aoclkc.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h>
#include <dt-bindings/reset/amlogic,meson-g12a-reset.h>
#include <dt-bindings/thermal/thermal.h>
@@ -1733,7 +1734,7 @@
clock-names = "xtal", "mpeg-clk";
};
- ao_pinctrl: pinctrl@14 {
+ ao_pinctrl: pinctrl {
compatible = "amlogic,meson-g12a-aobus-pinctrl";
#address-cells = <2>;
#size-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12.dtsi
index 6a1f4dcf6488..e732df3f3114 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12.dtsi
@@ -15,10 +15,10 @@
compatible = "amlogic,axg-tdm-iface";
#sound-dai-cells = <0>;
sound-name-prefix = "TDM_A";
- clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
- <&clkc_audio AUD_CLKID_MST_A_SCLK>,
- <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
- clock-names = "mclk", "sclk", "lrclk";
+ clocks = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_A_LRCLK>,
+ <&clkc_audio AUD_CLKID_MST_A_MCLK>;
+ clock-names = "sclk", "lrclk", "mclk";
status = "disabled";
};
@@ -26,10 +26,10 @@
compatible = "amlogic,axg-tdm-iface";
#sound-dai-cells = <0>;
sound-name-prefix = "TDM_B";
- clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
- <&clkc_audio AUD_CLKID_MST_B_SCLK>,
- <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
- clock-names = "mclk", "sclk", "lrclk";
+ clocks = <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_LRCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_MCLK>;
+ clock-names = "sclk", "lrclk", "mclk";
status = "disabled";
};
@@ -37,10 +37,10 @@
compatible = "amlogic,axg-tdm-iface";
#sound-dai-cells = <0>;
sound-name-prefix = "TDM_C";
- clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
- <&clkc_audio AUD_CLKID_MST_C_SCLK>,
- <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
- clock-names = "mclk", "sclk", "lrclk";
+ clocks = <&clkc_audio AUD_CLKID_MST_C_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_C_LRCLK>,
+ <&clkc_audio AUD_CLKID_MST_C_MCLK>;
+ clock-names = "sclk", "lrclk", "mclk";
status = "disabled";
};
};
@@ -195,8 +195,7 @@
};
tdmin_a: audio-controller@300 {
- compatible = "amlogic,g12a-tdmin",
- "amlogic,axg-tdmin";
+ compatible = "amlogic,g12a-tdmin";
reg = <0x0 0x300 0x0 0x40>;
sound-name-prefix = "TDMIN_A";
resets = <&clkc_audio AUD_RESET_TDMIN_A>;
@@ -211,8 +210,7 @@
};
tdmin_b: audio-controller@340 {
- compatible = "amlogic,g12a-tdmin",
- "amlogic,axg-tdmin";
+ compatible = "amlogic,g12a-tdmin";
reg = <0x0 0x340 0x0 0x40>;
sound-name-prefix = "TDMIN_B";
resets = <&clkc_audio AUD_RESET_TDMIN_B>;
@@ -227,8 +225,7 @@
};
tdmin_c: audio-controller@380 {
- compatible = "amlogic,g12a-tdmin",
- "amlogic,axg-tdmin";
+ compatible = "amlogic,g12a-tdmin";
reg = <0x0 0x380 0x0 0x40>;
sound-name-prefix = "TDMIN_C";
resets = <&clkc_audio AUD_RESET_TDMIN_C>;
@@ -243,8 +240,7 @@
};
tdmin_lb: audio-controller@3c0 {
- compatible = "amlogic,g12a-tdmin",
- "amlogic,axg-tdmin";
+ compatible = "amlogic,g12a-tdmin";
reg = <0x0 0x3c0 0x0 0x40>;
sound-name-prefix = "TDMIN_LB";
resets = <&clkc_audio AUD_RESET_TDMIN_LB>;
@@ -272,12 +268,12 @@
status = "disabled";
};
- spdifout: audio-controller@480 {
+ spdifout_a: audio-controller@480 {
compatible = "amlogic,g12a-spdifout",
"amlogic,axg-spdifout";
reg = <0x0 0x480 0x0 0x50>;
#sound-dai-cells = <0>;
- sound-name-prefix = "SPDIFOUT";
+ sound-name-prefix = "SPDIFOUT_A";
clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
<&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
clock-names = "pclk", "mclk";
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-radxa-zero.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-radxa-zero.dts
index cf0a9be83fc4..fcd7e1d8e16f 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-radxa-zero.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-radxa-zero.dts
@@ -145,7 +145,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-sei510.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-sei510.dts
index 4fb31c2ba31c..4c4550dd4711 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-sei510.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-sei510.dts
@@ -45,7 +45,6 @@
compatible = "dmic-codec";
num-channels = <2>;
wakeup-delay-ms = <50>;
- status = "okay";
sound-name-prefix = "MIC";
};
@@ -209,7 +208,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-u200.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-u200.dts
index 4b5d11e56364..8355ddd7e9ae 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-u200.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-u200.dts
@@ -8,6 +8,8 @@
#include "meson-g12a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
/ {
compatible = "amlogic,u200", "amlogic,g12a";
@@ -18,6 +20,26 @@
ethernet0 = &ethmac;
};
+ dioo2133: audio-amplifier-0 {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+ VCC-supply = <&vcc_5v>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "10U2";
+ };
+
+ spdif_dir: audio-codec-0 {
+ compatible = "linux,spdif-dir";
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "DIR";
+ };
+
+ spdif_dit: audio-codec-1 {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "DIT";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -147,6 +169,216 @@
regulator-boot-on;
regulator-always-on;
};
+
+ sound {
+ compatible = "amlogic,axg-sound-card";
+ model = "U200";
+ audio-widgets = "Line", "Lineout";
+ audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmout_c>,
+ <&tdmin_a>, <&tdmin_b>, <&tdmin_c>,
+ <&tdmin_lb>, <&dioo2133>;
+ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
+ "TDMOUT_A IN 1", "FRDDR_B OUT 0",
+ "TDMOUT_A IN 2", "FRDDR_C OUT 0",
+ "TDM_A Playback", "TDMOUT_A OUT",
+ "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
+ "TDM_B Playback", "TDMOUT_B OUT",
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+ "TDM_C Playback", "TDMOUT_C OUT",
+ "SPDIFOUT_A IN 0", "FRDDR_A OUT 3",
+ "SPDIFOUT_A IN 1", "FRDDR_B OUT 3",
+ "SPDIFOUT_A IN 2", "FRDDR_C OUT 3",
+ "SPDIFOUT_B IN 0", "FRDDR_A OUT 4",
+ "SPDIFOUT_B IN 1", "FRDDR_B OUT 4",
+ "SPDIFOUT_B IN 2", "FRDDR_C OUT 4",
+ "TDMIN_A IN 0", "TDM_A Capture",
+ "TDMIN_A IN 1", "TDM_B Capture",
+ "TDMIN_A IN 2", "TDM_C Capture",
+ "TDMIN_A IN 3", "TDM_A Loopback",
+ "TDMIN_A IN 4", "TDM_B Loopback",
+ "TDMIN_A IN 5", "TDM_C Loopback",
+ "TDMIN_B IN 0", "TDM_A Capture",
+ "TDMIN_B IN 1", "TDM_B Capture",
+ "TDMIN_B IN 2", "TDM_C Capture",
+ "TDMIN_B IN 3", "TDM_A Loopback",
+ "TDMIN_B IN 4", "TDM_B Loopback",
+ "TDMIN_B IN 5", "TDM_C Loopback",
+ "TDMIN_C IN 0", "TDM_A Capture",
+ "TDMIN_C IN 1", "TDM_B Capture",
+ "TDMIN_C IN 2", "TDM_C Capture",
+ "TDMIN_C IN 3", "TDM_A Loopback",
+ "TDMIN_C IN 4", "TDM_B Loopback",
+ "TDMIN_C IN 5", "TDM_C Loopback",
+ "TDMIN_LB IN 3", "TDM_A Capture",
+ "TDMIN_LB IN 4", "TDM_B Capture",
+ "TDMIN_LB IN 5", "TDM_C Capture",
+ "TDMIN_LB IN 0", "TDM_A Loopback",
+ "TDMIN_LB IN 1", "TDM_B Loopback",
+ "TDMIN_LB IN 2", "TDM_C Loopback",
+ "TODDR_A IN 0", "TDMIN_A OUT",
+ "TODDR_B IN 0", "TDMIN_A OUT",
+ "TODDR_C IN 0", "TDMIN_A OUT",
+ "TODDR_A IN 1", "TDMIN_B OUT",
+ "TODDR_B IN 1", "TDMIN_B OUT",
+ "TODDR_C IN 1", "TDMIN_B OUT",
+ "TODDR_A IN 2", "TDMIN_C OUT",
+ "TODDR_B IN 2", "TDMIN_C OUT",
+ "TODDR_C IN 2", "TDMIN_C OUT",
+ "TODDR_A IN 3", "SPDIFIN Capture",
+ "TODDR_B IN 3", "SPDIFIN Capture",
+ "TODDR_C IN 3", "SPDIFIN Capture",
+ "TODDR_A IN 6", "TDMIN_LB OUT",
+ "TODDR_B IN 6", "TDMIN_LB OUT",
+ "TODDR_C IN 6", "TDMIN_LB OUT",
+ "10U2 INL", "ACODEC LOLP",
+ "10U2 INR", "ACODEC LORP",
+ "Lineout", "10U2 OUTL",
+ "Lineout", "10U2 OUTR";
+
+ assigned-clocks = <&clkc CLKID_MPLL2>,
+ <&clkc CLKID_MPLL0>,
+ <&clkc CLKID_MPLL1>;
+ assigned-clock-parents = <0>, <0>, <0>;
+ assigned-clock-rates = <294912000>,
+ <270950400>,
+ <393216000>;
+
+ dai-link-0 {
+ sound-dai = <&frddr_a>;
+ };
+
+ dai-link-1 {
+ sound-dai = <&frddr_b>;
+ };
+
+ dai-link-2 {
+ sound-dai = <&frddr_c>;
+ };
+
+ dai-link-3 {
+ sound-dai = <&toddr_a>;
+ };
+
+ dai-link-4 {
+ sound-dai = <&toddr_b>;
+ };
+
+ dai-link-5 {
+ sound-dai = <&toddr_c>;
+ };
+
+ /* Connected to the WIFI/BT chip */
+ dai-link-6 {
+ sound-dai = <&tdmif_a>;
+ dai-format = "dsp_a";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&toacodec TOACODEC_IN_A>;
+ };
+
+ codec-1 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
+ };
+ };
+
+ /* Connected to the onboard AD82584F DAC */
+ dai-link-7 {
+ sound-dai = <&tdmif_b>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&toacodec TOACODEC_IN_B>;
+ };
+
+ codec-1 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
+ };
+ };
+
+ /* 8ch HDMI interface */
+ dai-link-8 {
+ sound-dai = <&tdmif_c>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ dai-tdm-slot-tx-mask-1 = <1 1>;
+ dai-tdm-slot-tx-mask-2 = <1 1>;
+ dai-tdm-slot-tx-mask-3 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&toacodec TOACODEC_IN_C>;
+ };
+
+ codec-1 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
+ };
+ };
+
+ /* spdif hdmi and coax output */
+ dai-link-9 {
+ sound-dai = <&spdifout_a>;
+
+ codec-0 {
+ sound-dai = <&spdif_dit>;
+ };
+
+ codec-1 {
+ sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;
+ };
+ };
+
+ /* spdif hdmi interface */
+ dai-link-10 {
+ sound-dai = <&spdifout_b>;
+
+ codec {
+ sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;
+ };
+ };
+
+ /* hdmi glue */
+ dai-link-11 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
+
+ codec {
+ sound-dai = <&hdmi_tx>;
+ };
+ };
+
+ /* internal codec glue */
+ dai-link-12 {
+ sound-dai = <&toacodec TOACODEC_OUT>;
+
+ codec {
+ sound-dai = <&acodec>;
+ };
+ };
+
+ /* spdif coax input */
+ dai-link-13 {
+ sound-dai = <&spdifin>;
+
+ codec {
+ sound-dai = <&spdif_dir>;
+ };
+ };
+ };
+};
+
+&acodec {
+ status = "okay";
+};
+
+&arb {
+ status = "okay";
};
&cec_AO {
@@ -163,6 +395,10 @@
hdmi-phandle = <&hdmi_tx>;
};
+&clkc_audio {
+ status = "okay";
+};
+
&cpu0 {
cpu-supply = <&vddcpu>;
operating-points-v2 = <&cpu_opp_table>;
@@ -191,6 +427,10 @@
clock-latency = <50000>;
};
+&clkc_audio {
+ status = "okay";
+};
+
&cvbs_vdac_port {
cvbs_vdac_out: endpoint {
remote-endpoint = <&cvbs_connector_in>;
@@ -203,6 +443,18 @@
phy-mode = "rmii";
};
+&frddr_a {
+ status = "okay";
+};
+
+&frddr_b {
+ status = "okay";
+};
+
+&frddr_c {
+ status = "okay";
+};
+
&hdmi_tx {
status = "okay";
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
@@ -288,6 +540,95 @@
vqmmc-supply = <&flash_1v8>;
};
+&spdifin {
+ pinctrl-0 = <&spdif_in_h_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&spdifout_a {
+ pinctrl-0 = <&spdif_ao_out_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&spdifout_b {
+ status = "okay";
+};
+
+&tdmif_a {
+ pinctrl-0 = <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>, <&tdm_a_dout0_pins> ;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&tdmif_b {
+ pinctrl-0 = <&mclk0_a_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>,
+ <&tdm_b_dout0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ assigned-clocks = <&clkc_audio AUD_CLKID_TDM_MCLK_PAD0>,
+ <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
+ <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
+ assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+ assigned-clock-rates = <0>, <0>, <0>;
+};
+
+&tdmif_c {
+ status = "okay";
+};
+
+&tdmin_a {
+ status = "okay";
+};
+
+&tdmin_b {
+ status = "okay";
+};
+
+&tdmin_c {
+ status = "okay";
+};
+
+&tdmin_lb {
+ status = "okay";
+};
+
+&tdmout_a {
+ status = "okay";
+};
+
+&tdmout_b {
+ status = "okay";
+};
+
+&tdmout_c {
+ status = "okay";
+};
+
+&toacodec {
+ status = "okay";
+};
+
+&toddr_a {
+ status = "okay";
+};
+
+&toddr_b {
+ status = "okay";
+};
+
+&toddr_c {
+ status = "okay";
+};
+
+&tohdmitx {
+ status = "okay";
+};
+
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-x96-max.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-x96-max.dts
index b2bb94981838..9b55982b6a6b 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-x96-max.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12a-x96-max.dts
@@ -22,7 +22,6 @@
spdif_dit: audio-codec-1 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -155,9 +154,9 @@
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT",
- "SPDIFOUT IN 0", "FRDDR_A OUT 3",
- "SPDIFOUT IN 1", "FRDDR_B OUT 3",
- "SPDIFOUT IN 2", "FRDDR_C OUT 3";
+ "SPDIFOUT_A IN 0", "FRDDR_A OUT 3",
+ "SPDIFOUT_A IN 1", "FRDDR_B OUT 3",
+ "SPDIFOUT_A IN 2", "FRDDR_C OUT 3";
assigned-clocks = <&clkc CLKID_MPLL2>,
<&clkc CLKID_MPLL0>,
@@ -166,7 +165,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -197,7 +195,7 @@
/* spdif hdmi or toslink interface */
dai-link-4 {
- sound-dai = <&spdifout>;
+ sound-dai = <&spdifout_a>;
codec-0 {
sound-dai = <&spdif_dit>;
@@ -344,7 +342,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -457,7 +455,7 @@
vqmmc-supply = <&flash_1v8>;
};
-&spdifout {
+&spdifout_a {
pinctrl-0 = <&spdif_out_h_pins>;
pinctrl-names = "default";
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-a311d-libretech-cc.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-a311d-libretech-cc.dts
new file mode 100644
index 000000000000..65b963d794cd
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-a311d-libretech-cc.dts
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 BayLibre, SAS.
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/clock/g12a-clkc.h>
+#include "meson-g12b-a311d.dtsi"
+#include "meson-libretech-cottonwood.dtsi"
+
+/ {
+ compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b";
+ model = "Libre Computer AML-A311D-CC Alta";
+
+ vddcpu_a: regulator-vddcpu-a {
+ compatible = "pwm-regulator";
+ regulator-name = "VDDCPU_A";
+ regulator-min-microvolt = <730000>;
+ regulator-max-microvolt = <1011000>;
+ regulator-boot-on;
+ regulator-always-on;
+ pwm-supply = <&dc_in>;
+ pwms = <&pwm_ab 0 1250 0>;
+ pwm-dutycycle-range = <100 0>;
+ };
+
+ sound {
+ model = "LC-ALTA";
+ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
+ "TDMOUT_A IN 1", "FRDDR_B OUT 0",
+ "TDMOUT_A IN 2", "FRDDR_C OUT 0",
+ "TDM_A Playback", "TDMOUT_A OUT",
+ "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
+ "TDM_B Playback", "TDMOUT_B OUT",
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+ "TDM_C Playback", "TDMOUT_C OUT",
+ "TDMIN_A IN 0", "TDM_A Capture",
+ "TDMIN_B IN 0", "TDM_A Capture",
+ "TDMIN_C IN 0", "TDM_A Capture",
+ "TDMIN_A IN 3", "TDM_A Loopback",
+ "TDMIN_B IN 3", "TDM_A Loopback",
+ "TDMIN_C IN 3", "TDM_A Loopback",
+ "TDMIN_A IN 1", "TDM_B Capture",
+ "TDMIN_B IN 1", "TDM_B Capture",
+ "TDMIN_C IN 1", "TDM_B Capture",
+ "TDMIN_A IN 4", "TDM_B Loopback",
+ "TDMIN_B IN 4", "TDM_B Loopback",
+ "TDMIN_C IN 4", "TDM_B Loopback",
+ "TDMIN_A IN 2", "TDM_C Capture",
+ "TDMIN_B IN 2", "TDM_C Capture",
+ "TDMIN_C IN 2", "TDM_C Capture",
+ "TDMIN_A IN 5", "TDM_C Loopback",
+ "TDMIN_B IN 5", "TDM_C Loopback",
+ "TDMIN_C IN 5", "TDM_C Loopback",
+ "TODDR_A IN 0", "TDMIN_A OUT",
+ "TODDR_B IN 0", "TDMIN_A OUT",
+ "TODDR_C IN 0", "TDMIN_A OUT",
+ "TODDR_A IN 1", "TDMIN_B OUT",
+ "TODDR_B IN 1", "TDMIN_B OUT",
+ "TODDR_C IN 1", "TDMIN_B OUT",
+ "TODDR_A IN 2", "TDMIN_C OUT",
+ "TODDR_B IN 2", "TDMIN_C OUT",
+ "TODDR_C IN 2", "TDMIN_C OUT",
+ "Lineout", "ACODEC LOLP",
+ "Lineout", "ACODEC LORP";
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&vddcpu_b>;
+ operating-points-v2 = <&cpu_opp_table_0>;
+ clocks = <&clkc CLKID_CPU_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu1 {
+ cpu-supply = <&vddcpu_b>;
+ operating-points-v2 = <&cpu_opp_table_0>;
+ clocks = <&clkc CLKID_CPU_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu100 {
+ cpu-supply = <&vddcpu_a>;
+ operating-points-v2 = <&cpub_opp_table_1>;
+ clocks = <&clkc CLKID_CPUB_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu101 {
+ cpu-supply = <&vddcpu_a>;
+ operating-points-v2 = <&cpub_opp_table_1>;
+ clocks = <&clkc CLKID_CPUB_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu102 {
+ cpu-supply = <&vddcpu_a>;
+ operating-points-v2 = <&cpub_opp_table_1>;
+ clocks = <&clkc CLKID_CPUB_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu103 {
+ cpu-supply = <&vddcpu_a>;
+ operating-points-v2 = <&cpub_opp_table_1>;
+ clocks = <&clkc CLKID_CPUB_CLK>;
+ clock-latency = <50000>;
+};
+
+&pwm_ab {
+ pinctrl-0 = <&pwm_a_e_pins>, <&pwm_b_x7_pins>;
+ clocks = <&xtal>, <&xtal>;
+ clock-names = "clkin0", "clkin1";
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4-cm4io.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4-cm4io.dts
index 1b0c3881c6a1..13d478f9c891 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4-cm4io.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4-cm4io.dts
@@ -65,7 +65,7 @@
compatible = "amlogic,axg-sound-card";
model = "BPI-CM4IO";
audio-aux-devs = <&tdmout_b>;
- audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT";
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4.dtsi
index 97e522921b06..08c33ec7e9f1 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi-cm4.dtsi
@@ -56,7 +56,7 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
- enable-gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
+ enable-gpios = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
enable-active-high;
regulator-always-on;
@@ -201,7 +201,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -369,7 +369,7 @@
bluetooth {
compatible = "realtek,rtl8822cs-bt";
- enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
host-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
device-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi.dtsi
index 83709787eb91..4b8db872bbf3 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-bananapi.dtsi
@@ -47,8 +47,6 @@
fan0: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
- cooling-min-state = <0>;
- cooling-max-state = <3>;
cooling-levels = <0 120 170 220>;
pwms = <&pwm_cd 1 40000 0>;
};
@@ -327,7 +325,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -489,7 +487,7 @@
bluetooth {
compatible = "realtek,rtl8822cs-bt";
- enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
host-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
device-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gsking-x.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gsking-x.dts
index 1fa6e75abd21..bb73e10b5e74 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gsking-x.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gsking-x.dts
@@ -55,7 +55,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking-pro.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking-pro.dts
index afe375fa83ca..6eeedd54ab91 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking-pro.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking-pro.dts
@@ -56,7 +56,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking.dts
index 5d96c1449050..0da386cabe1a 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-gtking.dts
@@ -22,7 +22,6 @@
spdif_dit: audio-codec-1 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -34,9 +33,9 @@
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT",
- "SPDIFOUT IN 0", "FRDDR_A OUT 3",
- "SPDIFOUT IN 1", "FRDDR_B OUT 3",
- "SPDIFOUT IN 2", "FRDDR_C OUT 3";
+ "SPDIFOUT_A IN 0", "FRDDR_A OUT 3",
+ "SPDIFOUT_A IN 1", "FRDDR_B OUT 3",
+ "SPDIFOUT_A IN 2", "FRDDR_C OUT 3";
assigned-clocks = <&clkc CLKID_MPLL2>,
<&clkc CLKID_MPLL0>,
@@ -45,7 +44,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -76,7 +74,7 @@
/* spdif hdmi or toslink interface */
dai-link-4 {
- sound-dai = <&spdifout>;
+ sound-dai = <&spdifout_a>;
codec-0 {
sound-dai = <&spdif_dit>;
@@ -140,7 +138,7 @@
};
};
-&spdifout {
+&spdifout_a {
pinctrl-0 = <&spdif_out_h_pins>;
pinctrl-names = "default";
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-go-ultra.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-go-ultra.dts
index 29d642e746d4..eed2a23047ca 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-go-ultra.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-go-ultra.dts
@@ -221,7 +221,7 @@
"Headphone", "Headphones",
"Speaker", "Internal Speakers";
audio-aux-devs = <&tdmout_b>, <&tdmin_b>, <&speaker_amp>;
- audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
"TDM_B Playback", "TDMOUT_B OUT",
"TDMIN_B IN 1", "TDM_B Capture",
"TDMIN_B IN 4", "TDM_B Loopback",
@@ -380,7 +380,7 @@
compatible = "rockchip,rk818";
reg = <0x1c>;
interrupt-parent = <&gpio_intc>;
- interrupts = <7 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_7 */
+ interrupts = <IRQID_GPIOAO_7 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_7 */
#clock-cells = <1>;
vcc1-supply = <&vdd_sys>;
@@ -519,7 +519,7 @@
reg = <0x20>;
interrupt-parent = <&gpio_intc>;
- interrupts = <5 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_5 */
+ interrupts = <IRQID_GPIOAO_5 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_5 */
vcc1-supply = <&vdd_sys>;
vcc2-supply = <&vdd_sys>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2.dtsi
index 24d0442dffb2..91c9769fda20 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2.dtsi
@@ -78,7 +78,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -185,7 +184,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -241,7 +240,7 @@
* This signal should be handled by a USB specific power sequence
* in order to reset the Hub when USB bus is powered down.
*/
- hog-0 {
+ usb-hub-hog {
gpio-hog;
gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
output-high;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2l.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2l.dts
index 70919f40d597..e26f3e3258e1 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2l.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid-n2l.dts
@@ -46,7 +46,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-ugoos-am6.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-ugoos-am6.dts
index 0c7892600d56..6396f190d703 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-ugoos-am6.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-ugoos-am6.dts
@@ -17,7 +17,6 @@
spdif_dit: audio-codec-1 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -29,9 +28,9 @@
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
"TDM_B Playback", "TDMOUT_B OUT",
- "SPDIFOUT IN 0", "FRDDR_A OUT 3",
- "SPDIFOUT IN 1", "FRDDR_B OUT 3",
- "SPDIFOUT IN 2", "FRDDR_C OUT 3";
+ "SPDIFOUT_A IN 0", "FRDDR_A OUT 3",
+ "SPDIFOUT_A IN 1", "FRDDR_B OUT 3",
+ "SPDIFOUT_A IN 2", "FRDDR_C OUT 3";
assigned-clocks = <&clkc CLKID_MPLL2>,
<&clkc CLKID_MPLL0>,
@@ -40,7 +39,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -71,7 +69,7 @@
/* spdif hdmi or toslink interface */
dai-link-4 {
- sound-dai = <&spdifout>;
+ sound-dai = <&spdifout_a>;
codec-0 {
sound-dai = <&spdif_dit>;
@@ -126,7 +124,7 @@
linux,rc-map-name = "rc-khadas";
};
-&spdifout {
+&spdifout_a {
pinctrl-0 = <&spdif_out_h_pins>;
pinctrl-names = "default";
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-w400.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-w400.dtsi
index b40d2c1002c9..ac8b7178257e 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-w400.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-w400.dtsi
@@ -269,7 +269,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-libretech-pc.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-libretech-pc.dtsi
index 4e84ab87cc7d..5e7b9273b062 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-libretech-pc.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-libretech-pc.dtsi
@@ -201,7 +201,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-p23x-q20x.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-p23x-q20x.dtsi
index dafc841f7c16..e59c3c92b1e7 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-p23x-q20x.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gx-p23x-q20x.dtsi
@@ -26,7 +26,6 @@
spdif_dit: audio-codec-0 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -137,8 +136,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
-
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-kii-pro.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-kii-pro.dts
index e238f1f10124..f28452b9f00f 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-kii-pro.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-kii-pro.dts
@@ -18,7 +18,6 @@
spdif_dit: audio-codec-0 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nanopi-k2.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nanopi-k2.dts
index 7d94160f5802..1fd2e56e6b08 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nanopi-k2.dts
@@ -142,7 +142,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nexbox-a95x.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nexbox-a95x.dts
index 63137ce3cb9d..4aab1ab705b4 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nexbox-a95x.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-nexbox-a95x.dts
@@ -149,7 +149,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-odroidc2.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-odroidc2.dts
index 01356437a077..e6d2de7c45a9 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-odroidc2.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-odroidc2.dts
@@ -184,7 +184,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p200.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p200.dts
index 3c93d1898b40..591455c50e88 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p200.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p200.dts
@@ -9,11 +9,18 @@
#include "meson-gxbb-p20x.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/meson-aiu.h>
/ {
compatible = "amlogic,p200", "amlogic,meson-gxbb";
model = "Amlogic Meson GXBB P200 Development Board";
+ spdif_dit: audio-codec-0 {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ sound-name-prefix = "DIT";
+ };
+
avdd18_usb_adc: regulator-avdd18_usb_adc {
compatible = "regulator-fixed";
regulator-name = "AVDD18_USB_ADC";
@@ -57,6 +64,58 @@
press-threshold-microvolt = <0>; /* 0% */
};
};
+
+ sound {
+ compatible = "amlogic,gx-sound-card";
+ model = "P200";
+ assigned-clocks = <&clkc CLKID_MPLL0>,
+ <&clkc CLKID_MPLL1>,
+ <&clkc CLKID_MPLL2>;
+ assigned-clock-parents = <0>, <0>, <0>;
+ assigned-clock-rates = <294912000>,
+ <270950400>,
+ <393216000>;
+
+ dai-link-0 {
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
+ };
+
+ dai-link-1 {
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
+ };
+
+ dai-link-2 {
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
+ dai-format = "i2s";
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
+ };
+ };
+
+ dai-link-3 {
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
+
+ codec-0 {
+ sound-dai = <&spdif_dit>;
+ };
+ };
+
+ dai-link-4 {
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
+
+ codec-0 {
+ sound-dai = <&hdmi_tx>;
+ };
+ };
+ };
+};
+
+&aiu {
+ status = "okay";
+ pinctrl-0 = <&spdif_out_y_pins>;
+ pinctrl-names = "default";
};
&ethmac {
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p201.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p201.dts
index 150a82f3b2d7..6f81eed83bec 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p201.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-p201.dts
@@ -8,10 +8,49 @@
/dts-v1/;
#include "meson-gxbb-p20x.dtsi"
+#include <dt-bindings/sound/meson-aiu.h>
/ {
compatible = "amlogic,p201", "amlogic,meson-gxbb";
model = "Amlogic Meson GXBB P201 Development Board";
+
+ sound {
+ compatible = "amlogic,gx-sound-card";
+ model = "P201";
+ assigned-clocks = <&clkc CLKID_MPLL0>,
+ <&clkc CLKID_MPLL1>,
+ <&clkc CLKID_MPLL2>;
+ assigned-clock-parents = <0>, <0>, <0>;
+ assigned-clock-rates = <294912000>,
+ <270950400>,
+ <393216000>;
+
+ dai-link-0 {
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
+ };
+
+ dai-link-1 {
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
+ dai-format = "i2s";
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
+ };
+ };
+
+ dai-link-2 {
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
+
+ codec-0 {
+ sound-dai = <&hdmi_tx>;
+ };
+ };
+ };
+};
+
+&aiu {
+ status = "okay";
};
&ethmac {
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi
index 66daf3af34c3..74df32534231 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi
@@ -21,7 +21,6 @@
spdif_dit: audio-codec-0 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -116,7 +115,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-hub.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-hub.dts
index 58733017eda8..af9ea32a2876 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-hub.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-hub.dts
@@ -23,7 +23,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-play2.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-play2.dts
index 505ffcd8eb76..376760d86766 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-play2.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-wetek-play2.dts
@@ -17,7 +17,6 @@
spdif_dit: audio-codec-0 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -56,7 +55,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts
index 213a0705ebdc..a29b49f051ae 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-libretech-ac.dts
@@ -130,7 +130,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-p241.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-p241.dts
index ff906becd2ab..c0d6eb55100a 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-p241.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s805x-p241.dts
@@ -135,7 +135,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts
index 02f81839d4e3..fea65f20523a 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -74,7 +74,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc-v2.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
index 6c4e68e0e625..2825db91e462 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
@@ -167,7 +167,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts
index 82bfabfbd39c..27093e6ac9e2 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -149,7 +149,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-khadas-vim2.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-khadas-vim2.dts
index 74897a154891..860f307494c5 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-khadas-vim2.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-khadas-vim2.dts
@@ -157,7 +157,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-nexbox-a1.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-nexbox-a1.dts
index 236c0a144142..ad2dd4ad0a31 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-nexbox-a1.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-nexbox-a1.dts
@@ -28,7 +28,6 @@
spdif_dit: audio-codec-0 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -94,7 +93,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-rbox-pro.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-rbox-pro.dts
index 50137aafab10..d05dde8da5c5 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-rbox-pro.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-rbox-pro.dts
@@ -37,7 +37,6 @@
spdif_dit: audio-codec-0 {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
- status = "okay";
sound-name-prefix = "DIT";
};
@@ -109,7 +108,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-khadas-vim3.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-khadas-vim3.dtsi
index c9705941e4ab..514a6dd4b124 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-khadas-vim3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-khadas-vim3.dtsi
@@ -189,7 +189,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-libretech-cottonwood.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-libretech-cottonwood.dtsi
new file mode 100644
index 000000000000..35e8f5bae990
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-libretech-cottonwood.dtsi
@@ -0,0 +1,614 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 BayLibre, SAS.
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
+ */
+
+#include <dt-bindings/clock/g12a-clkc.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
+
+/ {
+ aliases {
+ serial0 = &uart_AO;
+ ethernet0 = &ethmac;
+ spi0 = &spifc;
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x0 0x80000000>;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ dioo2133: audio-amplifier-0 {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>;
+ VCC-supply = <&vcc_5v>;
+ sound-name-prefix = "10U2";
+ };
+
+ /* TOFIX: handle CVBS_DET on SARADC channel 0 */
+ cvbs-connector {
+ compatible = "composite-video-connector";
+
+ port {
+ cvbs_connector_in: endpoint {
+ remote-endpoint = <&cvbs_vdac_out>;
+ };
+ };
+ };
+
+ emmc_pwrseq: emmc-pwrseq {
+ compatible = "mmc-pwrseq-emmc";
+ reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
+ };
+
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&hdmi_tx_tmds_out>;
+ };
+ };
+ };
+
+ led-blue {
+ compatible = "pwm-leds";
+
+ led {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_ACTIVITY;
+ linux,default-trigger = "heartbeat";
+ max-brightness = <255>;
+ pwms = <&pwm_ab 1 1250 0>;
+ active-low;
+ };
+ };
+
+ led-green {
+ compatible = "pwm-leds";
+
+ led {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ linux,default-trigger = "default-on";
+ max-brightness = <255>;
+ pwms = <&pwm_cd 1 1250 0>;
+ active-low;
+ };
+ };
+
+ led-orange {
+ compatible = "gpio-leds";
+
+ led {
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_STANDBY;
+ gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
+ panic-indicator;
+ };
+ };
+
+ dc_in: regulator-dc-in {
+ compatible = "regulator-fixed";
+ regulator-name = "5V_IN";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ flash_1v8: regulator-flash-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "FLASH_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ vin-supply = <&vcc_3v3>;
+ };
+
+ vcc_card: regulator-vcc-card {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_CARD";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vddao_3v3>;
+ gpio = <&gpio GPIOX_2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ enable-active-high;
+ gpio-open-drain;
+ };
+
+ vcc_3v3: regulator-vcc-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <&vddao_3v3>;
+
+ /* FIXME: controlled by TEST_N */
+ };
+
+ vcc_5v: regulator-vcc-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ vin-supply = <&dc_in>;
+ gpio = <&gpio GPIOH_8 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ enable-active-high;
+ gpio-open-drain;
+ };
+
+ vddao_3v3: regulator-vddao_3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDAO_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <&dc_in>;
+ };
+
+ vddcpu_b: regulator-vddcpu-b {
+ compatible = "pwm-regulator";
+ regulator-name = "VDDCPU_B";
+ regulator-min-microvolt = <730000>;
+ regulator-max-microvolt = <1011000>;
+ regulator-boot-on;
+ regulator-always-on;
+ pwm-supply = <&dc_in>;
+ pwms = <&pwm_AO_cd 1 1250 0>;
+ pwm-dutycycle-range = <100 0>;
+ };
+
+ vddio_ao18: regulator-vddio_ao18 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDIO_AO18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ vin-supply = <&vddao_3v3>;
+ };
+
+ vddio_c: regulator-vddio_c {
+ compatible = "regulator-gpio";
+ regulator-name = "VDDIO_C";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-settling-time-up-us = <200>;
+ regulator-settling-time-down-us = <50000>;
+ vin-supply = <&vddao_3v3>;
+ gpios = <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>;
+ states = <3300000 0>,
+ <1800000 1>;
+ };
+
+ sound {
+ compatible = "amlogic,axg-sound-card";
+ audio-widgets = "Line", "Lineout";
+ audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmout_c>,
+ <&tdmin_a>, <&tdmin_b>, <&tdmin_c>,
+ <&dioo2133>;
+
+ assigned-clocks = <&clkc CLKID_MPLL2>,
+ <&clkc CLKID_MPLL0>,
+ <&clkc CLKID_MPLL1>;
+ assigned-clock-parents = <0>, <0>, <0>;
+ assigned-clock-rates = <294912000>,
+ <270950400>,
+ <393216000>;
+
+ dai-link-0 {
+ sound-dai = <&frddr_a>;
+ };
+
+ dai-link-1 {
+ sound-dai = <&frddr_b>;
+ };
+
+ dai-link-2 {
+ sound-dai = <&frddr_c>;
+ };
+
+ dai-link-3 {
+ sound-dai = <&toddr_a>;
+ };
+
+ dai-link-4 {
+ sound-dai = <&toddr_b>;
+ };
+
+ dai-link-5 {
+ sound-dai = <&toddr_c>;
+ };
+
+ /*
+ * Audio setup: The 40 pins header provides access to 2 TDMs,
+ * SPDIF In/Out and PDM inputs.
+ * - TDM A: 2 lanes
+ * D0: 40/X9
+ * D1: 38/X8
+ * BCLK: 12/X11
+ * FS: 35/X10
+ * - TDM B: 4 lanes
+ * D0: 37/A3
+ * D1: 16/A4
+ * D2: 18/A5 or 7/AO6
+ * D3: 22/A6 or 21/H5
+ * BCLK: 29/A1 or 8/AO8
+ * FS: 31/A2 or 11/AO7
+ * - 2 Master Clocks:
+ * MCLK0: 15/A0 or 10/AO9
+ * MCLK1: 33/X15
+ * - SPDIF:
+ * OUT: 32/A11
+ * IN: 21/H5
+ * - PDM Input:
+ * DO: 13/A8
+ * D1: 26/A9
+ * D2: 22/A6
+ * D3: 18/A5
+ * DCLK: 36/A7
+ *
+ * TDM C is not usable on the 40 pins connector so it is
+ * setup for the HDMI 4 lanes i2s.
+ *
+ * No pinctrl is enabled by default to preserve the
+ * genericity of the 40 pins header. Many configurations are
+ * possible based on the desired use case. Please adjust TDM
+ * masks, clock setups and pinctrl accordingly.
+ */
+
+ dai-link-6 {
+ sound-dai = <&tdmif_a>;
+ dai-format = "dsp_a";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
+ };
+
+ codec-1 {
+ sound-dai = <&toacodec TOACODEC_IN_A>;
+ };
+ };
+
+ dai-link-7 {
+ sound-dai = <&tdmif_b>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ dai-tdm-slot-rx-mask-1 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
+ };
+
+ codec-1 {
+ sound-dai = <&toacodec TOACODEC_IN_B>;
+ };
+ };
+
+ dai-link-8 {
+ sound-dai = <&tdmif_c>;
+ dai-format = "i2s";
+ dai-tdm-slot-tx-mask-0 = <1 1>;
+ dai-tdm-slot-tx-mask-1 = <1 1>;
+ dai-tdm-slot-tx-mask-2 = <1 1>;
+ dai-tdm-slot-tx-mask-3 = <1 1>;
+ mclk-fs = <256>;
+
+ codec-0 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
+ };
+
+ codec-1 {
+ sound-dai = <&toacodec TOACODEC_IN_C>;
+ };
+ };
+
+ dai-link-9 {
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
+
+ codec {
+ sound-dai = <&hdmi_tx>;
+ };
+ };
+
+ dai-link-10 {
+ sound-dai = <&toacodec TOACODEC_OUT>;
+
+ codec {
+ sound-dai = <&acodec>;
+ };
+ };
+ };
+};
+
+&acodec {
+ status = "okay";
+ AVDD-supply = <&vddio_ao18>;
+};
+
+&arb {
+ status = "okay";
+};
+
+&cecb_AO {
+ status = "okay";
+ pinctrl-0 = <&cec_ao_b_h_pins>;
+ pinctrl-names = "default";
+ hdmi-phandle = <&hdmi_tx>;
+};
+
+&clkc_audio {
+ status = "okay";
+};
+
+&cvbs_vdac_port {
+ cvbs_vdac_out: endpoint {
+ remote-endpoint = <&cvbs_connector_in>;
+ };
+};
+
+&dwc3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub: hub@1 {
+ compatible = "usb5e3,626";
+ reg = <1>;
+ reset-gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
+ vdd-supply = <&vcc_5v>;
+ };
+};
+
+&ethmac {
+ pinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>, <&eth_phy_irq_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&external_phy>;
+ amlogic,tx-delay-ns = <2>;
+};
+
+&ext_mdio {
+ external_phy: ethernet-phy@0 {
+ /* Realtek RTL8211F (0x001cc916) */
+ reg = <0>;
+ max-speed = <1000>;
+
+ reset-assert-us = <100000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
+
+ interrupt-parent = <&gpio_intc>;
+ /* MAC_INTR on GPIOZ_14 */
+ interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&frddr_a {
+ status = "okay";
+};
+
+&frddr_b {
+ status = "okay";
+};
+
+&frddr_c {
+ status = "okay";
+};
+
+&hdmi_tx {
+ status = "okay";
+ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
+ pinctrl-names = "default";
+ hdmi-supply = <&vcc_5v>;
+};
+
+&hdmi_tx_tmds_port {
+ hdmi_tx_tmds_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+};
+
+&ir {
+ status = "okay";
+ pinctrl-0 = <&remote_input_ao_pins>;
+ pinctrl-names = "default";
+};
+
+&periphs_pinctrl {
+ spi_cs_disable_pins: spi-cs-disable {
+ mux {
+ groups = "BOOT_14";
+ function = "gpio_periphs";
+ bias-disable;
+ output-high;
+ };
+ };
+
+ eth_phy_irq_pins: eth-phy-irq {
+ mux {
+ groups = "GPIOZ_14";
+ function = "gpio_periphs";
+ bias-pull-up;
+ output-disable;
+ };
+ };
+};
+
+&pwm_AO_cd {
+ status = "okay";
+ pinctrl-0 = <&pwm_ao_d_e_pins>;
+ pinctrl-names = "default";
+ clocks = <&xtal>;
+ clock-names = "clkin1";
+};
+
+&pwm_ab {
+ status = "okay";
+ pinctrl-0 = <&pwm_b_x7_pins>;
+ pinctrl-names = "default";
+ clocks = <&xtal>;
+ clock-names = "clkin1";
+};
+
+&pwm_cd {
+ status = "okay";
+ pinctrl-0 = <&pwm_d_x3_pins>;
+ pinctrl-names = "default";
+ clocks = <&xtal>;
+ clock-names = "clkin1";
+};
+
+&saradc {
+ status = "okay";
+ vref-supply = <&vddio_ao18>;
+};
+
+/* SD card */
+&sd_emmc_b {
+ status = "okay";
+ pinctrl-0 = <&sdcard_c_pins>;
+ pinctrl-1 = <&sdcard_clk_gate_c_pins>;
+ pinctrl-names = "default", "clk-gate";
+
+ bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ max-frequency = <200000000>;
+ disable-wp;
+
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&vcc_card>;
+ vqmmc-supply = <&vddio_c>;
+};
+
+/*
+ * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR CS
+ * and eMMC Data 4 to 7 pins.
+ * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
+ * and change bus-width to 4 then spifc can be enabled.
+ */
+&sd_emmc_c {
+ status = "okay";
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>,
+ <&spi_cs_disable_pins>;
+ pinctrl-1 = <&emmc_clk_gate_pins>;
+ pinctrl-names = "default", "clk-gate";
+
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ max-frequency = <200000000>;
+ disable-wp;
+
+ mmc-pwrseq = <&emmc_pwrseq>;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&flash_1v8>;
+};
+
+&spifc {
+ status = "disabled";
+ pinctrl-0 = <&nor_pins>;
+ pinctrl-names = "default";
+ cs-gpios = <&gpio BOOT_14 GPIO_ACTIVE_LOW>;
+
+ w25lq128d: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <80000000>;
+ };
+};
+
+&tdmif_a {
+ status = "okay";
+};
+
+&tdmif_b {
+ status = "okay";
+};
+
+&tdmif_c {
+ status = "okay";
+};
+
+&tdmin_a {
+ status = "okay";
+};
+
+&tdmin_b {
+ status = "okay";
+};
+
+&tdmin_c {
+ status = "okay";
+};
+
+&tdmout_a {
+ status = "okay";
+};
+
+&tdmout_b {
+ status = "okay";
+};
+
+&tdmout_c {
+ status = "okay";
+};
+
+&toacodec {
+ status = "okay";
+};
+
+&toddr_a {
+ status = "okay";
+};
+
+&toddr_b {
+ status = "okay";
+};
+
+&toddr_c {
+ status = "okay";
+};
+
+&tohdmitx {
+ status = "okay";
+};
+
+&uart_AO {
+ status = "okay";
+ pinctrl-0 = <&uart_ao_a_pins>;
+ pinctrl-names = "default";
+};
+
+&usb2_phy1 {
+ phy-supply = <&dc_in>;
+};
+
+&usb3_pcie_phy {
+ phy-supply = <&vcc_5v>;
+};
+
+&usb {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-s4-s805x2-aq222.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-s4-s805x2-aq222.dts
index 8ffbcb2b1ac5..983caddc409c 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-s4-s805x2-aq222.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-s4-s805x2-aq222.dts
@@ -15,7 +15,7 @@
#size-cells = <2>;
aliases {
- serial0 = &uart_B;
+ serial0 = &uart_b;
};
memory@0 {
@@ -23,8 +23,70 @@
reg = <0x0 0x0 0x0 0x40000000>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 52 MiB reserved for ARM Trusted Firmware */
+ secmon_reserved: secmon@5000000 {
+ reg = <0x0 0x05000000 0x0 0x3400000>;
+ no-map;
+ };
+ };
+};
+
+&uart_b {
+ status = "okay";
+};
+
+&ir {
+ status = "okay";
+ pinctrl-0 = <&remote_pins>;
+ pinctrl-names = "default";
+};
+
+&nand {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-0 = <&nand_pins>;
+ pinctrl-names = "default";
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ nand-on-flash-bbt;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x00200000>;
+ };
+ partition@200000 {
+ label = "env";
+ reg = <0x00200000 0x00400000>;
+ };
+ partition@600000 {
+ label = "system";
+ reg = <0x00600000 0x00a00000>;
+ };
+ partition@1000000 {
+ label = "rootfs";
+ reg = <0x01000000 0x03000000>;
+ };
+ partition@4000000 {
+ label = "media";
+ reg = <0x04000000 0x8000000>;
+ };
+ };
};
-&uart_B {
+&spicc0 {
status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spicc0_pins_x>;
+ cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-s4.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-s4.dtsi
index f24460186d3d..ce90b35686a2 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-s4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-s4.dtsi
@@ -6,6 +6,10 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-s4-gpio.h>
+#include <dt-bindings/clock/amlogic,s4-pll-clkc.h>
+#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
+#include <dt-bindings/power/meson-s4-power.h>
/ {
cpus {
@@ -92,6 +96,44 @@
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
+ clkc_periphs: clock-controller@0 {
+ compatible = "amlogic,s4-peripherals-clkc";
+ reg = <0x0 0x0 0x0 0x49c>;
+ clocks = <&clkc_pll CLKID_FCLK_DIV2>,
+ <&clkc_pll CLKID_FCLK_DIV2P5>,
+ <&clkc_pll CLKID_FCLK_DIV3>,
+ <&clkc_pll CLKID_FCLK_DIV4>,
+ <&clkc_pll CLKID_FCLK_DIV5>,
+ <&clkc_pll CLKID_FCLK_DIV7>,
+ <&clkc_pll CLKID_HIFI_PLL>,
+ <&clkc_pll CLKID_GP0_PLL>,
+ <&clkc_pll CLKID_MPLL0>,
+ <&clkc_pll CLKID_MPLL1>,
+ <&clkc_pll CLKID_MPLL2>,
+ <&clkc_pll CLKID_MPLL3>,
+ <&clkc_pll CLKID_HDMI_PLL>,
+ <&xtal>;
+ clock-names = "fclk_div2", "fclk_div2p5", "fclk_div3",
+ "fclk_div4", "fclk_div5", "fclk_div7",
+ "hifi_pll", "gp0_pll", "mpll0", "mpll1",
+ "mpll2", "mpll3", "hdmi_pll", "xtal";
+ #clock-cells = <1>;
+ };
+
+ clkc_pll: clock-controller@8000 {
+ compatible = "amlogic,s4-pll-clkc";
+ reg = <0x0 0x8000 0x0 0x1e8>;
+ clocks = <&xtal>;
+ clock-names = "xtal";
+ #clock-cells = <1>;
+ };
+
+ watchdog@2100 {
+ compatible = "amlogic,s4-wdt", "amlogic,t7-wdt";
+ reg = <0x0 0x2100 0x0 0x10>;
+ clocks = <&xtal>;
+ };
+
periphs_pinctrl: pinctrl@4000 {
compatible = "amlogic,meson-s4-periphs-pinctrl";
#address-cells = <2>;
@@ -106,6 +148,195 @@
#gpio-cells = <2>;
gpio-ranges = <&periphs_pinctrl 0 0 82>;
};
+
+ remote_pins: remote-pin {
+ mux {
+ groups = "remote_in";
+ function = "remote_in";
+ bias-disable;
+ };
+ };
+
+ i2c0_pins1: i2c0-pins1 {
+ mux {
+ groups = "i2c0_sda",
+ "i2c0_scl";
+ function = "i2c0";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c1_pins1: i2c1-pins1 {
+ mux {
+ groups = "i2c1_sda_c",
+ "i2c1_scl_c";
+ function = "i2c1";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c1_pins2: i2c1-pins2 {
+ mux {
+ groups = "i2c1_sda_d",
+ "i2c1_scl_d";
+ function = "i2c1";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c1_pins3: i2c1-pins3 {
+ mux {
+ groups = "i2c1_sda_h",
+ "i2c1_scl_h";
+ function = "i2c1";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c1_pins4: i2c1-pins4 {
+ mux {
+ groups = "i2c1_sda_x",
+ "i2c1_scl_x";
+ function = "i2c1";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c2_pins1: i2c2-pins1 {
+ mux {
+ groups = "i2c2_sda_d",
+ "i2c2_scl_d";
+ function = "i2c2";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c2_pins2: i2c2-pins2 {
+ mux {
+ groups = "i2c2_sda_h8",
+ "i2c2_scl_h9";
+ function = "i2c2";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c2_pins3: i2c2-pins3 {
+ mux {
+ groups = "i2c2_sda_h0",
+ "i2c2_scl_h1";
+ function = "i2c2";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c3_pins1: i2c3-pins1 {
+ mux {
+ groups = "i2c3_sda_x",
+ "i2c3_scl_x";
+ function = "i2c3";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c3_pins2: i2c3-pins2 {
+ mux {
+ groups = "i2c3_sda_z",
+ "i2c3_scl_z";
+ function = "i2c3";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c4_pins1: i2c4-pins1 {
+ mux {
+ groups = "i2c4_sda_c",
+ "i2c4_scl_c";
+ function = "i2c4";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c4_pins2: i2c4-pins2 {
+ mux {
+ groups = "i2c4_sda_d",
+ "i2c4_scl_d";
+ function = "i2c4";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ i2c4_pins3: i2c4-pins3 {
+ mux {
+ groups = "i2c4_sda_z",
+ "i2c4_scl_z";
+ function = "i2c4";
+ drive-strength-microamp = <3000>;
+ bias-disable;
+ };
+ };
+
+ nand_pins: nand-pins {
+ mux {
+ groups = "emmc_nand_d0",
+ "emmc_nand_d1",
+ "emmc_nand_d2",
+ "emmc_nand_d3",
+ "emmc_nand_d4",
+ "emmc_nand_d5",
+ "emmc_nand_d6",
+ "emmc_nand_d7",
+ "nand_ce0",
+ "nand_ale",
+ "nand_cle",
+ "nand_wen_clk",
+ "nand_ren_wr";
+ function = "nand";
+ input-enable;
+ };
+ };
+
+ spicc0_pins_x: spicc0-pins_x {
+ mux {
+ groups = "spi_a_mosi_x",
+ "spi_a_miso_x",
+ "spi_a_clk_x";
+ function = "spi_a";
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ spicc0_pins_h: spicc0-pins-h {
+ mux {
+ groups = "spi_a_mosi_h",
+ "spi_a_miso_h",
+ "spi_a_clk_h";
+ function = "spi_a";
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ spicc0_pins_z: spicc0-pins-z {
+ mux {
+ groups = "spi_a_mosi_z",
+ "spi_a_miso_z",
+ "spi_a_clk_z";
+ function = "spi_a";
+ drive-strength-microamp = <3000>;
+ };
+ };
+
};
gpio_intc: interrupt-controller@4080 {
@@ -118,14 +349,120 @@
<10 11 12 13 14 15 16 17 18 19 20 21>;
};
- uart_B: serial@7a000 {
+ eth_phy: mdio-multiplexer@28000 {
+ compatible = "amlogic,g12a-mdio-mux";
+ reg = <0x0 0x28000 0x0 0xa4>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&clkc_periphs CLKID_ETHPHY>,
+ <&xtal>,
+ <&clkc_pll CLKID_MPLL_50M>;
+ clock-names = "pclk", "clkin0", "clkin1";
+ mdio-parent-bus = <&mdio0>;
+
+ ext_mdio: mdio@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ int_mdio: mdio@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ internal_ephy: ethernet-phy@8 {
+ compatible = "ethernet-phy-id0180.3301",
+ "ethernet-phy-ieee802.3-c22";
+ interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+ reg = <8>;
+ max-speed = <100>;
+ };
+ };
+ };
+
+ spicc0: spi@50000 {
+ compatible = "amlogic,meson-g12a-spicc";
+ reg = <0x0 0x50000 0x0 0x44>;
+ interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkc_periphs CLKID_SPICC0>,
+ <&clkc_periphs CLKID_SPICC0_EN>;
+ clock-names = "core", "pclk";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c0: i2c@66000 {
+ compatible = "amlogic,meson-axg-i2c";
+ reg = <0x0 0x66000 0x0 0x20>;
+ interrupts = <GIC_SPI 160 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_I2C_M_A>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@68000 {
+ compatible = "amlogic,meson-axg-i2c";
+ reg = <0x0 0x68000 0x0 0x20>;
+ interrupts = <GIC_SPI 161 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_I2C_M_B>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@6a000 {
+ compatible = "amlogic,meson-axg-i2c";
+ reg = <0x0 0x6a000 0x0 0x20>;
+ interrupts = <GIC_SPI 162 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_I2C_M_C>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c3: i2c@6c000 {
+ compatible = "amlogic,meson-axg-i2c";
+ reg = <0x0 0x6c000 0x0 0x20>;
+ interrupts = <GIC_SPI 163 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_I2C_M_D>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c4: i2c@6e000 {
+ compatible = "amlogic,meson-axg-i2c";
+ reg = <0x0 0x6e000 0x0 0x20>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_I2C_M_E>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ nand: nand-controller@8c800 {
+ compatible = "amlogic,meson-axg-nfc";
+ reg = <0x0 0x8c800 0x0 0x100>, <0x0 0x8c000 0x0 0x4>;
+ reg-names = "nfc", "emmc";
+ interrupts = <GIC_SPI 175 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&clkc_periphs CLKID_SD_EMMC_C>,
+ <&clkc_pll CLKID_FCLK_DIV2>;
+ clock-names = "core", "device";
+ status = "disabled";
+ };
+
+ uart_b: serial@7a000 {
compatible = "amlogic,meson-s4-uart",
"amlogic,meson-ao-uart";
reg = <0x0 0x7a000 0x0 0x18>;
interrupts = <GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
- status = "disabled";
- clocks = <&xtal>, <&xtal>, <&xtal>;
+ clocks = <&xtal>, <&clkc_periphs CLKID_UART_B>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
+ status = "disabled";
};
reset: reset-controller@2000 {
@@ -133,6 +470,43 @@
reg = <0x0 0x2000 0x0 0x98>;
#reset-cells = <1>;
};
+
+ ir: ir@84040 {
+ compatible = "amlogic,meson-s4-ir";
+ reg = <0x0 0x84040 0x0 0x30>;
+ interrupts = <GIC_SPI 22 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
+ hwrng: rng@440788 {
+ compatible = "amlogic,meson-s4-rng";
+ reg = <0x0 0x440788 0x0 0x0c>;
+ };
+ };
+
+ ethmac: ethernet@fdc00000 {
+ compatible = "amlogic,meson-axg-dwmac",
+ "snps,dwmac-3.70a",
+ "snps,dwmac";
+ reg = <0x0 0xfdc00000 0x0 0x10000>,
+ <0x0 0xfe024000 0x0 0x8>;
+
+ interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ power-domains = <&pwrc PWRC_S4_ETH_ID>;
+ clocks = <&clkc_periphs CLKID_ETH>,
+ <&clkc_pll CLKID_FCLK_DIV2>,
+ <&clkc_pll CLKID_MPLL2>;
+ clock-names = "stmmaceth", "clkin0", "clkin1";
+ rx-fifo-depth = <4096>;
+ tx-fifo-depth = <2048>;
+ status = "disabled";
+
+ mdio0: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+ };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air-gbit.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air-gbit.dts
index d1debccdc1c2..9b2eb6e42651 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air-gbit.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air-gbit.dts
@@ -29,7 +29,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -100,7 +99,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air.dts
index c94f2870b78b..6e34fd80ed71 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-a95xf3-air.dts
@@ -29,7 +29,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-bananapi.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-bananapi.dtsi
index 17045ff81c69..62404743e62d 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-bananapi.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-bananapi.dtsi
@@ -45,7 +45,7 @@
linux,code = <BTN_1>;
gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio_intc>;
- interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <IRQID_GPIOAO_3 IRQ_TYPE_EDGE_BOTH>;
};
};
@@ -217,7 +217,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-h96-max.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-h96-max.dts
index 0f6660e68e72..e6e9410d40cb 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-h96-max.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-h96-max.dts
@@ -29,7 +29,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -100,7 +99,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid-hc4.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid-hc4.dts
index 74088e7280fe..846a2d6c20e5 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid-hc4.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid-hc4.dts
@@ -19,8 +19,6 @@
fan0: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
- cooling-min-state = <0>;
- cooling-max-state = <3>;
cooling-levels = <0 120 170 220>;
pwms = <&pwm_cd 1 40000 0>;
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid.dtsi b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid.dtsi
index 2fce44939f45..1db2327bbd13 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid.dtsi
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-odroid.dtsi
@@ -181,7 +181,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -283,7 +282,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-s905d3-libretech-cc.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-s905d3-libretech-cc.dts
new file mode 100644
index 000000000000..537370db360f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-s905d3-libretech-cc.dts
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 BayLibre, SAS.
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/clock/g12a-clkc.h>
+#include "meson-sm1.dtsi"
+#include "meson-libretech-cottonwood.dtsi"
+
+/ {
+ compatible = "libretech,aml-s905d3-cc", "amlogic,sm1";
+ model = "Libre Computer AML-S905D3-CC Solitude";
+
+ sound {
+ model = "LC-SOLITUDE";
+ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
+ "TDMOUT_A IN 1", "FRDDR_B OUT 0",
+ "TDMOUT_A IN 2", "FRDDR_C OUT 0",
+ "TDM_A Playback", "TDMOUT_A OUT",
+ "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
+ "TDM_B Playback", "TDMOUT_B OUT",
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+ "TDM_C Playback", "TDMOUT_C OUT",
+ "TDMIN_A IN 0", "TDM_A Capture",
+ "TDMIN_B IN 0", "TDM_A Capture",
+ "TDMIN_C IN 0", "TDM_A Capture",
+ "TDMIN_A IN 13", "TDM_A Loopback",
+ "TDMIN_B IN 13", "TDM_A Loopback",
+ "TDMIN_C IN 13", "TDM_A Loopback",
+ "TDMIN_A IN 1", "TDM_B Capture",
+ "TDMIN_B IN 1", "TDM_B Capture",
+ "TDMIN_C IN 1", "TDM_B Capture",
+ "TDMIN_A IN 14", "TDM_B Loopback",
+ "TDMIN_B IN 14", "TDM_B Loopback",
+ "TDMIN_C IN 14", "TDM_B Loopback",
+ "TDMIN_A IN 2", "TDM_C Capture",
+ "TDMIN_B IN 2", "TDM_C Capture",
+ "TDMIN_C IN 2", "TDM_C Capture",
+ "TDMIN_A IN 15", "TDM_C Loopback",
+ "TDMIN_B IN 15", "TDM_C Loopback",
+ "TDMIN_C IN 15", "TDM_C Loopback",
+ "TODDR_A IN 0", "TDMIN_A OUT",
+ "TODDR_B IN 0", "TDMIN_A OUT",
+ "TODDR_C IN 0", "TDMIN_A OUT",
+ "TODDR_A IN 1", "TDMIN_B OUT",
+ "TODDR_B IN 1", "TDMIN_B OUT",
+ "TODDR_C IN 1", "TDMIN_B OUT",
+ "TODDR_A IN 2", "TDMIN_C OUT",
+ "TODDR_B IN 2", "TDMIN_C OUT",
+ "TODDR_C IN 2", "TDMIN_C OUT",
+ "Lineout", "ACODEC LOLP",
+ "Lineout", "ACODEC LORP";
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&vddcpu_b>;
+ operating-points-v2 = <&cpu_opp_table>;
+ clocks = <&clkc CLKID_CPU_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu1 {
+ cpu-supply = <&vddcpu_b>;
+ operating-points-v2 = <&cpu_opp_table>;
+ clocks = <&clkc CLKID_CPU1_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu2 {
+ cpu-supply = <&vddcpu_b>;
+ operating-points-v2 = <&cpu_opp_table>;
+ clocks = <&clkc CLKID_CPU2_CLK>;
+ clock-latency = <50000>;
+};
+
+&cpu3 {
+ cpu-supply = <&vddcpu_b>;
+ operating-points-v2 = <&cpu_opp_table>;
+ clocks = <&clkc CLKID_CPU3_CLK>;
+ clock-latency = <50000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-sei610.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-sei610.dts
index 9068a334ea57..109932068dbe 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-sei610.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-sei610.dts
@@ -32,7 +32,6 @@
compatible = "dmic-codec";
num-channels = <2>;
wakeup-delay-ms = <50>;
- status = "okay";
sound-name-prefix = "MIC";
};
@@ -53,7 +52,7 @@
linux,code = <BTN_0>;
gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio_intc>;
- interrupts = <34 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <IRQID_GPIOH_6 IRQ_TYPE_EDGE_BOTH>;
};
key-2 {
@@ -61,7 +60,7 @@
linux,code = <BTN_1>;
gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio_intc>;
- interrupts = <35 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <IRQID_GPIOH_7 IRQ_TYPE_EDGE_BOTH>;
};
key-3 {
@@ -69,7 +68,7 @@
linux,code = <BTN_2>;
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio_intc>;
- interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <IRQID_GPIOAO_2 IRQ_TYPE_EDGE_BOTH>;
};
key-mic-mute {
@@ -78,7 +77,7 @@
linux,input-type = <EV_SW>;
gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio_intc>;
- interrupts = <99 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <IRQID_GPIOE_2 IRQ_TYPE_EDGE_BOTH>;
};
key-power {
@@ -86,7 +85,7 @@
linux,code = <KEY_POWER>;
gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio_intc>;
- interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <IRQID_GPIOAO_3 IRQ_TYPE_EDGE_BOTH>;
};
};
@@ -247,7 +246,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -583,7 +581,7 @@
bluetooth {
compatible = "brcm,bcm43438-bt";
interrupt-parent = <&gpio_intc>;
- interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <IRQID_GPIOX_18 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "host-wakeup";
shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
max-speed = <2000000>;
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air-gbit.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air-gbit.dts
index 7e1a74046ba5..fc9b961133cd 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air-gbit.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air-gbit.dts
@@ -29,7 +29,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
@@ -100,7 +99,7 @@
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air.dts b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air.dts
index cd93d798f2a3..9ea969255b4f 100644
--- a/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air.dts
+++ b/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-x96-air.dts
@@ -29,7 +29,6 @@
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
- status = "okay";
dai-link-0 {
sound-dai = <&frddr_a>;
diff --git a/sys/contrib/device-tree/src/arm64/apm/apm-shadowcat.dtsi b/sys/contrib/device-tree/src/arm64/apm/apm-shadowcat.dtsi
index 377660d705d1..65ebac3082e2 100644
--- a/sys/contrib/device-tree/src/arm64/apm/apm-shadowcat.dtsi
+++ b/sys/contrib/device-tree/src/arm64/apm/apm-shadowcat.dtsi
@@ -728,7 +728,7 @@
};
};
- sbgpio: gpio@17001000{
+ sbgpio: gpio@17001000 {
compatible = "apm,xgene-gpio-sb";
reg = <0x0 0x17001000 0x0 0x400>;
#gpio-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/apm/apm-storm.dtsi b/sys/contrib/device-tree/src/arm64/apm/apm-storm.dtsi
index efa79209f4b2..988928c60f15 100644
--- a/sys/contrib/device-tree/src/arm64/apm/apm-storm.dtsi
+++ b/sys/contrib/device-tree/src/arm64/apm/apm-storm.dtsi
@@ -946,7 +946,7 @@
dr_mode = "host";
};
- sbgpio: gpio@17001000{
+ sbgpio: gpio@17001000 {
compatible = "apm,xgene-gpio-sb";
reg = <0x0 0x17001000 0x0 0x400>;
#gpio-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/arm/corstone1000-fvp.dts b/sys/contrib/device-tree/src/arm64/arm/corstone1000-fvp.dts
index 26b0f1b3cea6..901a7fc83307 100644
--- a/sys/contrib/device-tree/src/arm64/arm/corstone1000-fvp.dts
+++ b/sys/contrib/device-tree/src/arm64/arm/corstone1000-fvp.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
* Copyright (c) 2022, Arm Limited. All rights reserved.
* Copyright (c) 2022, Linaro Limited. All rights reserved.
diff --git a/sys/contrib/device-tree/src/arm64/arm/corstone1000-mps3.dts b/sys/contrib/device-tree/src/arm64/arm/corstone1000-mps3.dts
index e3146747c2d9..10d265be0c02 100644
--- a/sys/contrib/device-tree/src/arm64/arm/corstone1000-mps3.dts
+++ b/sys/contrib/device-tree/src/arm64/arm/corstone1000-mps3.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
* Copyright (c) 2022, Arm Limited. All rights reserved.
* Copyright (c) 2022, Linaro Limited. All rights reserved.
diff --git a/sys/contrib/device-tree/src/arm64/arm/corstone1000.dtsi b/sys/contrib/device-tree/src/arm64/arm/corstone1000.dtsi
index 21f1f952e985..6ad7829f9e28 100644
--- a/sys/contrib/device-tree/src/arm64/arm/corstone1000.dtsi
+++ b/sys/contrib/device-tree/src/arm64/arm/corstone1000.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0 or MIT
+// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
* Copyright (c) 2022, Arm Limited. All rights reserved.
* Copyright (c) 2022, Linaro Limited. All rights reserved.
@@ -43,10 +43,10 @@
#interrupt-cells = <3>;
#address-cells = <0>;
interrupt-controller;
- reg = <0x1c010000 0x1000>,
- <0x1c02f000 0x2000>,
- <0x1c04f000 0x1000>,
- <0x1c06f000 0x2000>;
+ reg = <0x1c010000 0x1000>,
+ <0x1c02f000 0x2000>,
+ <0x1c04f000 0x1000>,
+ <0x1c06f000 0x2000>;
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(1) |
IRQ_TYPE_LEVEL_LOW)>;
};
@@ -77,14 +77,10 @@
timer {
compatible = "arm,armv8-timer";
- interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) |
- IRQ_TYPE_LEVEL_LOW)>,
- <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) |
- IRQ_TYPE_LEVEL_LOW)>,
- <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) |
- IRQ_TYPE_LEVEL_LOW)>,
- <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) |
- IRQ_TYPE_LEVEL_LOW)>;
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>;
};
uartclk: uartclk {
diff --git a/sys/contrib/device-tree/src/arm64/arm/foundation-v8-gicv3.dtsi b/sys/contrib/device-tree/src/arm64/arm/foundation-v8-gicv3.dtsi
index e4a3c7dbcc20..17fba3bc99cd 100644
--- a/sys/contrib/device-tree/src/arm64/arm/foundation-v8-gicv3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/arm/foundation-v8-gicv3.dtsi
@@ -12,11 +12,11 @@
#size-cells = <1>;
ranges = <0x0 0x0 0x2f000000 0x100000>;
interrupt-controller;
- reg = <0x0 0x2f000000 0x0 0x10000>,
- <0x0 0x2f100000 0x0 0x200000>,
- <0x0 0x2c000000 0x0 0x2000>,
- <0x0 0x2c010000 0x0 0x2000>,
- <0x0 0x2c02f000 0x0 0x2000>;
+ reg = <0x0 0x2f000000 0x0 0x10000>,
+ <0x0 0x2f100000 0x0 0x200000>,
+ <0x0 0x2c000000 0x0 0x2000>,
+ <0x0 0x2c010000 0x0 0x2000>,
+ <0x0 0x2c02f000 0x0 0x2000>;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
its: msi-controller@2f020000 {
diff --git a/sys/contrib/device-tree/src/arm64/arm/juno-base.dtsi b/sys/contrib/device-tree/src/arm64/arm/juno-base.dtsi
index 8b4d280b1e7e..b897f5542c0a 100644
--- a/sys/contrib/device-tree/src/arm64/arm/juno-base.dtsi
+++ b/sys/contrib/device-tree/src/arm64/arm/juno-base.dtsi
@@ -747,7 +747,7 @@
};
thermal-zones {
- pmic {
+ pmic-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 0>;
@@ -760,7 +760,7 @@
};
};
- soc {
+ soc-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 3>;
@@ -773,28 +773,28 @@
};
};
- big_cluster_thermal_zone: big-cluster {
+ big_cluster_thermal_zone: big-cluster-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 21>;
status = "disabled";
};
- little_cluster_thermal_zone: little-cluster {
+ little_cluster_thermal_zone: little-cluster-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 22>;
status = "disabled";
};
- gpu0_thermal_zone: gpu0 {
+ gpu0_thermal_zone: gpu0-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 23>;
status = "disabled";
};
- gpu1_thermal_zone: gpu1 {
+ gpu1_thermal_zone: gpu1-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 24>;
diff --git a/sys/contrib/device-tree/src/arm64/arm/juno-scmi.dtsi b/sys/contrib/device-tree/src/arm64/arm/juno-scmi.dtsi
index ec85cd2c733c..31929e2377d8 100644
--- a/sys/contrib/device-tree/src/arm64/arm/juno-scmi.dtsi
+++ b/sys/contrib/device-tree/src/arm64/arm/juno-scmi.dtsi
@@ -76,27 +76,27 @@
};
thermal-zones {
- pmic {
+ pmic-thermal {
thermal-sensors = <&scmi_sensors0 0>;
};
- soc {
+ soc-thermal {
thermal-sensors = <&scmi_sensors0 3>;
};
- big-cluster {
+ big-cluster-thermal {
thermal-sensors = <&scmi_sensors0 21>;
};
- little-cluster {
+ little-cluster-thermal {
thermal-sensors = <&scmi_sensors0 22>;
};
- gpu0 {
+ gpu0-thermal {
thermal-sensors = <&scmi_sensors0 23>;
};
- gpu1 {
+ gpu1-thermal {
thermal-sensors = <&scmi_sensors0 24>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/bitmain/bm1880.dtsi b/sys/contrib/device-tree/src/arm64/bitmain/bm1880.dtsi
index 53a9b76057aa..22a200fb07d2 100644
--- a/sys/contrib/device-tree/src/arm64/bitmain/bm1880.dtsi
+++ b/sys/contrib/device-tree/src/arm64/bitmain/bm1880.dtsi
@@ -184,7 +184,7 @@
status = "disabled";
};
- uart1: serial@5801A000 {
+ uart1: serial@5801a000 {
compatible = "snps,dw-apb-uart";
reg = <0x0 0x5801a000 0x0 0x2000>;
clocks = <&clk BM1880_CLK_UART_500M>,
@@ -197,7 +197,7 @@
status = "disabled";
};
- uart2: serial@5801C000 {
+ uart2: serial@5801c000 {
compatible = "snps,dw-apb-uart";
reg = <0x0 0x5801c000 0x0 0x2000>;
clocks = <&clk BM1880_CLK_UART_500M>,
@@ -210,7 +210,7 @@
status = "disabled";
};
- uart3: serial@5801E000 {
+ uart3: serial@5801e000 {
compatible = "snps,dw-apb-uart";
reg = <0x0 0x5801e000 0x0 0x2000>;
clocks = <&clk BM1880_CLK_UART_500M>,
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/bcmbca/bcm4908.dtsi b/sys/contrib/device-tree/src/arm64/broadcom/bcmbca/bcm4908.dtsi
index f549bda8c48c..2f124b027bbf 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/bcmbca/bcm4908.dtsi
+++ b/sys/contrib/device-tree/src/arm64/broadcom/bcmbca/bcm4908.dtsi
@@ -577,7 +577,7 @@
#size-cells = <0>;
};
- hsspi: spi@1000{
+ hsspi: spi@1000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,bcm4908-hsspi", "brcm,bcmbca-hsspi-v1.0";
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-svk.dts b/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-svk.dts
index fbf0392b8371..dec5a110f1e8 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-svk.dts
+++ b/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-svk.dts
@@ -113,7 +113,6 @@
spi-max-frequency = <5000000>;
spi-cpha;
spi-cpol;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable = <0>;
pl022,com-mode = <0>;
@@ -137,7 +136,6 @@
at25,page-size = <64>;
spi-cpha;
spi-cpol;
- pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable = <0>;
pl022,com-mode = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-xmc.dts b/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-xmc.dts
index 699f7742ce7f..1d314f17bbdd 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-xmc.dts
+++ b/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2-xmc.dts
@@ -114,7 +114,7 @@
reg = <0x04000000 0x06400000>; /* 100MB */
};
- partition@a400000{
+ partition@a400000 {
label = "ncustfs";
reg = <0x0a400000 0x35c00000>; /* 860MB */
};
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2.dtsi b/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2.dtsi
index 9dcd25ec2c04..896d1f33b5b6 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/broadcom/northstar2/ns2.dtsi
@@ -586,6 +586,7 @@
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupts = <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/stingray/bcm958802a802x.dts b/sys/contrib/device-tree/src/arm64/broadcom/stingray/bcm958802a802x.dts
index a41facd7d79b..66471a25e4ac 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/stingray/bcm958802a802x.dts
+++ b/sys/contrib/device-tree/src/arm64/broadcom/stingray/bcm958802a802x.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or BSD-3-Clause)
+// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
*Copyright(c) 2018 Broadcom
*/
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-board-base.dtsi b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-board-base.dtsi
index 82a24711d0d8..cdd709491f01 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-board-base.dtsi
+++ b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-board-base.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or BSD-3-Clause)
+// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
* Copyright(c) 2016-2018 Broadcom
*/
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-pcie.dtsi b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-pcie.dtsi
index 33a472ab17e8..663e51756746 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-pcie.dtsi
+++ b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-pcie.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or BSD-3-Clause)
+// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
*Copyright(c) 2018 Broadcom
*/
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-usb.dtsi b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-usb.dtsi
index 5401a646c840..ac4f7b8f9273 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-usb.dtsi
+++ b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray-usb.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or BSD-3-Clause)
+// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
*Copyright(c) 2018 Broadcom
*/
diff --git a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray.dtsi b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray.dtsi
index 7aece79bf882..d8516ec0dae7 100644
--- a/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray.dtsi
+++ b/sys/contrib/device-tree/src/arm64/broadcom/stingray/stingray.dtsi
@@ -450,6 +450,7 @@
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
gpio-ranges = <&pinmux 0 0 16>,
<&pinmux 16 71 2>,
@@ -565,7 +566,7 @@
iommus = <&smmu 0x6000 0x0000>;
};
- enet: ethernet@340000{
+ enet: ethernet@340000 {
compatible = "brcm,amac";
reg = <0x00340000 0x1000>;
reg-names = "amac_base";
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynos5433-tm2-common.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynos5433-tm2-common.dtsi
index e4ed788413fe..8f02de8480b6 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynos5433-tm2-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynos5433-tm2-common.dtsi
@@ -124,20 +124,18 @@
audio-amplifier = <&max98504>;
mic-bias-gpios = <&gpr3 2 GPIO_ACTIVE_HIGH>;
model = "wm5110";
- samsung,audio-routing =
- /* Headphone */
- "HP", "HPOUT1L",
- "HP", "HPOUT1R",
-
- /* Speaker */
- "SPK", "SPKOUT",
- "SPKOUT", "HPOUT2L",
- "SPKOUT", "HPOUT2R",
-
- /* Receiver */
- "RCV", "HPOUT3L",
- "RCV", "HPOUT3R";
- status = "okay";
+ audio-routing = /* Headphone */
+ "HP", "HPOUT1L",
+ "HP", "HPOUT1R",
+
+ /* Speaker */
+ "SPK", "SPKOUT",
+ "SPKOUT", "HPOUT2L",
+ "SPKOUT", "HPOUT2R",
+
+ /* Receiver */
+ "RCV", "HPOUT3L",
+ "RCV", "HPOUT3R";
};
};
@@ -1104,7 +1102,7 @@
te_irq: te-irq-pins {
samsung,pins = "gpf1-3";
- samsung,pin-function = <0xf>;
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynos5433.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynos5433.dtsi
index 91ae0462a706..7fbbec04bff0 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynos5433.dtsi
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynos5433.dtsi
@@ -361,7 +361,8 @@
ranges = <0x0 0x0 0x0 0x18000000>;
chipid@10000000 {
- compatible = "samsung,exynos4210-chipid";
+ compatible = "samsung,exynos5433-chipid",
+ "samsung,exynos4210-chipid";
reg = <0x10000000 0x100>;
};
@@ -850,7 +851,8 @@
reg = <0x10580000 0x1a20>, <0x11090000 0x100>;
wakeup-interrupt-controller {
- compatible = "samsung,exynos7-wakeup-eint";
+ compatible = "samsung,exynos5433-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
};
};
@@ -1546,7 +1548,7 @@
};
adc: adc@14d10000 {
- compatible = "samsung,exynos7-adc";
+ compatible = "samsung,exynos5433-adc", "samsung,exynos7-adc";
reg = <0x14d10000 0x100>;
interrupts = <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "adc";
@@ -1556,7 +1558,7 @@
};
i2s1: i2s@14d60000 {
- compatible = "samsung,exynos7-i2s";
+ compatible = "samsung,exynos5433-i2s", "samsung,exynos7-i2s";
reg = <0x14d60000 0x100>;
dmas = <&pdma0 31>, <&pdma0 30>;
dma-names = "tx", "rx";
@@ -1571,7 +1573,7 @@
};
pwm: pwm@14dd0000 {
- compatible = "samsung,exynos4210-pwm";
+ compatible = "samsung,exynos5433-pwm", "samsung,exynos4210-pwm";
reg = <0x14dd0000 0x100>;
interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
@@ -1586,7 +1588,8 @@
};
hsi2c_0: i2c@14e40000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14e40000 0x1000>;
interrupts = <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1599,7 +1602,8 @@
};
hsi2c_1: i2c@14e50000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14e50000 0x1000>;
interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1612,7 +1616,8 @@
};
hsi2c_2: i2c@14e60000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14e60000 0x1000>;
interrupts = <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1625,7 +1630,8 @@
};
hsi2c_3: i2c@14e70000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14e70000 0x1000>;
interrupts = <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1638,7 +1644,8 @@
};
hsi2c_4: i2c@14ec0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14ec0000 0x1000>;
interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1651,7 +1658,8 @@
};
hsi2c_5: i2c@14ed0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14ed0000 0x1000>;
interrupts = <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1664,7 +1672,8 @@
};
hsi2c_6: i2c@14ee0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14ee0000 0x1000>;
interrupts = <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1677,7 +1686,8 @@
};
hsi2c_7: i2c@14ef0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14ef0000 0x1000>;
interrupts = <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1690,7 +1700,8 @@
};
hsi2c_8: i2c@14d90000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14d90000 0x1000>;
interrupts = <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1703,7 +1714,8 @@
};
hsi2c_9: i2c@14da0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14da0000 0x1000>;
interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1716,7 +1728,8 @@
};
hsi2c_10: i2c@14de0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14de0000 0x1000>;
interrupts = <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1729,7 +1742,8 @@
};
hsi2c_11: i2c@14df0000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "samsung,exynos5433-hsi2c",
+ "samsung,exynos7-hsi2c";
reg = <0x14df0000 0x1000>;
interrupts = <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -1820,7 +1834,8 @@
};
mshc_0: mmc@15540000 {
- compatible = "samsung,exynos7-dw-mshc-smu";
+ compatible = "samsung,exynos5433-dw-mshc-smu",
+ "samsung,exynos7-dw-mshc-smu";
interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
@@ -1833,7 +1848,8 @@
};
mshc_1: mmc@15550000 {
- compatible = "samsung,exynos7-dw-mshc-smu";
+ compatible = "samsung,exynos5433-dw-mshc-smu",
+ "samsung,exynos7-dw-mshc-smu";
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
@@ -1846,7 +1862,8 @@
};
mshc_2: mmc@15560000 {
- compatible = "samsung,exynos7-dw-mshc-smu";
+ compatible = "samsung,exynos5433-dw-mshc-smu",
+ "samsung,exynos7-dw-mshc-smu";
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
@@ -1897,7 +1914,8 @@
};
i2s0: i2s@11440000 {
- compatible = "samsung,exynos7-i2s";
+ compatible = "samsung,exynos5433-i2s",
+ "samsung,exynos7-i2s";
reg = <0x11440000 0x100>;
dmas = <&adma 0>, <&adma 2>;
dma-names = "tx", "rx";
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynos7.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynos7.dtsi
index 5ea8bda2bfa6..9cb6bd61262e 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynos7.dtsi
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynos7.dtsi
@@ -25,7 +25,6 @@
pinctrl6 = &pinctrl_fsys0;
pinctrl7 = &pinctrl_fsys1;
pinctrl8 = &pinctrl_bus1;
- tmuctrl0 = &tmuctrl_0;
};
arm-pmu {
@@ -129,7 +128,8 @@
ranges = <0 0 0 0x18000000>;
chipid@10000000 {
- compatible = "samsung,exynos4210-chipid";
+ compatible = "samsung,exynos7-chipid",
+ "samsung,exynos4210-chipid";
reg = <0x10000000 0x100>;
};
@@ -138,10 +138,10 @@
#interrupt-cells = <3>;
#address-cells = <0>;
interrupt-controller;
- reg = <0x11001000 0x1000>,
- <0x11002000 0x2000>,
- <0x11004000 0x2000>,
- <0x11006000 0x2000>;
+ reg = <0x11001000 0x1000>,
+ <0x11002000 0x2000>,
+ <0x11004000 0x2000>,
+ <0x11006000 0x2000>;
};
pdma0: dma-controller@10e10000 {
@@ -280,7 +280,7 @@
};
serial_0: serial@13630000 {
- compatible = "samsung,exynos4210-uart";
+ compatible = "samsung,exynos7-uart", "samsung,exynos4210-uart";
reg = <0x13630000 0x100>;
interrupts = <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock_peric0 PCLK_UART0>,
@@ -290,7 +290,7 @@
};
serial_1: serial@14c20000 {
- compatible = "samsung,exynos4210-uart";
+ compatible = "samsung,exynos7-uart", "samsung,exynos4210-uart";
reg = <0x14c20000 0x100>;
interrupts = <GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock_peric1 PCLK_UART1>,
@@ -300,7 +300,7 @@
};
serial_2: serial@14c30000 {
- compatible = "samsung,exynos4210-uart";
+ compatible = "samsung,exynos7-uart", "samsung,exynos4210-uart";
reg = <0x14c30000 0x100>;
interrupts = <GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock_peric1 PCLK_UART2>,
@@ -310,7 +310,7 @@
};
serial_3: serial@14c40000 {
- compatible = "samsung,exynos4210-uart";
+ compatible = "samsung,exynos7-uart", "samsung,exynos4210-uart";
reg = <0x14c40000 0x100>;
interrupts = <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock_peric1 PCLK_UART3>,
@@ -540,7 +540,7 @@
};
rtc: rtc@10590000 {
- compatible = "samsung,s3c6410-rtc";
+ compatible = "samsung,exynos7-rtc", "samsung,s3c6410-rtc";
reg = <0x10590000 0x100>;
interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
@@ -560,7 +560,8 @@
};
gpu: gpu@14ac0000 {
- compatible = "samsung,exynos5433-mali", "arm,mali-t760";
+ compatible = "samsung,exynos7-mali",
+ "samsung,exynos5433-mali", "arm,mali-t760";
reg = <0x14ac0000 0x5000>;
interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>,
@@ -620,7 +621,7 @@
};
pwm: pwm@136c0000 {
- compatible = "samsung,exynos4210-pwm";
+ compatible = "samsung,exynos7-pwm", "samsung,exynos4210-pwm";
reg = <0x136c0000 0x100>;
interrupts = <GIC_SPI 449 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 450 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynos7885.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynos7885.dtsi
index d69fc2392bd0..008228fb319a 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynos7885.dtsi
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynos7885.dtsi
@@ -172,7 +172,8 @@
ranges = <0x0 0x0 0x0 0x20000000>;
chipid@10000000 {
- compatible = "samsung,exynos850-chipid";
+ compatible = "samsung,exynos7885-chipid",
+ "samsung,exynos850-chipid";
reg = <0x10000000 0x24>;
};
@@ -264,7 +265,8 @@
reg = <0x11cb0000 0x1000>;
wakeup-interrupt-controller {
- compatible = "samsung,exynos7-wakeup-eint";
+ compatible = "samsung,exynos7885-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -289,12 +291,14 @@
};
pmu_system_controller: system-controller@11c80000 {
- compatible = "samsung,exynos7-pmu", "syscon";
+ compatible = "samsung,exynos7885-pmu",
+ "samsung,exynos7-pmu", "syscon";
reg = <0x11c80000 0x10000>;
};
mmc_0: mmc@13500000 {
- compatible = "samsung,exynos7-dw-mshc-smu";
+ compatible = "samsung,exynos7885-dw-mshc-smu",
+ "samsung,exynos7-dw-mshc-smu";
reg = <0x13500000 0x2000>;
interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -307,7 +311,8 @@
};
serial_0: serial@13800000 {
- compatible = "samsung,exynos5433-uart";
+ compatible = "samsung,exynos7885-uart",
+ "samsung,exynos5433-uart";
reg = <0x13800000 0x100>;
interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
@@ -320,7 +325,8 @@
};
serial_1: serial@13810000 {
- compatible = "samsung,exynos5433-uart";
+ compatible = "samsung,exynos7885-uart",
+ "samsung,exynos5433-uart";
reg = <0x13810000 0x100>;
interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
@@ -333,7 +339,8 @@
};
serial_2: serial@13820000 {
- compatible = "samsung,exynos5433-uart";
+ compatible = "samsung,exynos7885-uart",
+ "samsung,exynos5433-uart";
reg = <0x13820000 0x100>;
interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
@@ -346,7 +353,8 @@
};
i2c_0: i2c@13830000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13830000 0x100>;
interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -359,7 +367,8 @@
};
i2c_1: i2c@13840000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13840000 0x100>;
interrupts = <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -372,7 +381,8 @@
};
i2c_2: i2c@13850000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13850000 0x100>;
interrupts = <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -385,7 +395,8 @@
};
i2c_3: i2c@13860000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13860000 0x100>;
interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -398,7 +409,8 @@
};
i2c_4: i2c@13870000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13870000 0x100>;
interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -411,7 +423,8 @@
};
i2c_5: i2c@13880000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13880000 0x100>;
interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -424,7 +437,8 @@
};
i2c_6: i2c@13890000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x13890000 0x100>;
interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -437,7 +451,8 @@
};
i2c_7: i2c@11cd0000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos7885-i2c",
+ "samsung,s3c2440-i2c";
reg = <0x11cd0000 0x100>;
interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynos850-e850-96.dts b/sys/contrib/device-tree/src/arm64/exynos/exynos850-e850-96.dts
index 6ed38912507f..f074df8982b3 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynos850-e850-96.dts
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynos850-e850-96.dts
@@ -29,6 +29,22 @@
stdout-path = &serial_0;
};
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ label = "micro-USB";
+ type = "micro";
+ vbus-supply = <&reg_usb_host_vbus>;
+ id-gpios = <&gpa0 0 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&micro_usb_det_pins>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb1_drd_sw>;
+ };
+ };
+ };
+
/*
* RAM: 4 GiB (eMCP):
* - 2 GiB at 0x80000000
@@ -111,6 +127,35 @@
};
};
+ /* TODO: Remove this once PMIC is implemented */
+ reg_dummy: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "dummy_reg";
+ };
+
+ reg_usb_host_vbus: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_host_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpa3 5 GPIO_ACTIVE_LOW>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges;
+
+ ramoops@f0000000 {
+ compatible = "ramoops";
+ reg = <0x0 0xf0000000 0x200000>;
+ record-size = <0x20000>;
+ console-size = <0x20000>;
+ ftrace-size = <0x100000>;
+ pmsg-size = <0x20000>;
+ };
+ };
+
/*
* RTC clock (XrtcXTI); external, must be 32.768 kHz.
*
@@ -172,6 +217,12 @@
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
};
+
+ micro_usb_det_pins: micro-usb-det-pins {
+ samsung,pins = "gpa0-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
};
&rtc {
@@ -186,6 +237,28 @@
pinctrl-0 = <&uart1_pins>;
};
+&usbdrd {
+ status = "okay";
+ vdd10-supply = <&reg_dummy>;
+ vdd33-supply = <&reg_dummy>;
+};
+
+&usbdrd_dwc3 {
+ dr_mode = "otg";
+ usb-role-switch;
+ role-switch-default-mode = "host";
+
+ port {
+ usb1_drd_sw: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
+ };
+};
+
+&usbdrd_phy {
+ status = "okay";
+};
+
&usi_uart {
samsung,clkreq-on; /* needed for UART mode */
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynos850.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynos850.dtsi
index aa077008b3be..da3f4a791e68 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynos850.dtsi
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynos850.dtsi
@@ -359,7 +359,8 @@
reg = <0x11850000 0x1000>;
wakeup-interrupt-controller {
- compatible = "samsung,exynos850-wakeup-eint";
+ compatible = "samsung,exynos850-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
};
};
@@ -368,7 +369,8 @@
reg = <0x11c30000 0x1000>;
wakeup-interrupt-controller {
- compatible = "samsung,exynos850-wakeup-eint";
+ compatible = "samsung,exynos850-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
};
};
@@ -396,7 +398,7 @@
};
rtc: rtc@11a30000 {
- compatible = "samsung,s3c6410-rtc";
+ compatible = "samsung,exynos850-rtc", "samsung,s3c6410-rtc";
reg = <0x11a30000 0x100>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
@@ -406,7 +408,8 @@
};
mmc_0: mmc@12100000 {
- compatible = "samsung,exynos7-dw-mshc-smu";
+ compatible = "samsung,exynos850-dw-mshc-smu",
+ "samsung,exynos7-dw-mshc-smu";
reg = <0x12100000 0x2000>;
interrupts = <GIC_SPI 452 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -419,7 +422,7 @@
};
i2c_0: i2c@13830000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13830000 0x100>;
interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -432,7 +435,7 @@
};
i2c_1: i2c@13840000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13840000 0x100>;
interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -445,7 +448,7 @@
};
i2c_2: i2c@13850000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13850000 0x100>;
interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -458,7 +461,7 @@
};
i2c_3: i2c@13860000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13860000 0x100>;
interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -471,7 +474,7 @@
};
i2c_4: i2c@13870000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13870000 0x100>;
interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -485,7 +488,7 @@
/* I2C_5 (also called CAM_PMIC_I2C in TRM) */
i2c_5: i2c@13880000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13880000 0x100>;
interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -499,7 +502,7 @@
/* I2C_6 (also called MOTOR_I2C in TRM) */
i2c_6: i2c@13890000 {
- compatible = "samsung,s3c2440-i2c";
+ compatible = "samsung,exynos850-i2c", "samsung,s3c2440-i2c";
reg = <0x13890000 0x100>;
interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -570,6 +573,36 @@
clocks = <&cmu_cmgp CLK_GOUT_SYSREG_CMGP_PCLK>;
};
+ usbdrd: usb@13600000 {
+ compatible = "samsung,exynos850-dwusb3";
+ ranges = <0x0 0x13600000 0x10000>;
+ clocks = <&cmu_hsi CLK_GOUT_USB_BUS_EARLY_CLK>,
+ <&cmu_hsi CLK_GOUT_USB_REF_CLK>;
+ clock-names = "bus_early", "ref";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "disabled";
+
+ usbdrd_dwc3: usb@0 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0x10000>;
+ interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&usbdrd_phy 0>;
+ phy-names = "usb2-phy";
+ };
+ };
+
+ usbdrd_phy: phy@135d0000 {
+ compatible = "samsung,exynos850-usbdrd-phy";
+ reg = <0x135d0000 0x100>;
+ clocks = <&cmu_hsi CLK_GOUT_USB_PHY_ACLK>,
+ <&cmu_hsi CLK_GOUT_USB_PHY_REF_CLK>;
+ clock-names = "phy", "ref";
+ samsung,pmu-syscon = <&pmu_system_controller>;
+ #phy-cells = <1>;
+ status = "disabled";
+ };
+
usi_uart: usi@138200c0 {
compatible = "samsung,exynos850-usi";
reg = <0x138200c0 0x20>;
@@ -610,7 +643,8 @@
status = "disabled";
hsi2c_0: i2c@138a0000 {
- compatible = "samsung,exynosautov9-hsi2c";
+ compatible = "samsung,exynos850-hsi2c",
+ "samsung,exynosautov9-hsi2c";
reg = <0x138a0000 0xc0>;
interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -638,7 +672,8 @@
status = "disabled";
hsi2c_1: i2c@138b0000 {
- compatible = "samsung,exynosautov9-hsi2c";
+ compatible = "samsung,exynos850-hsi2c",
+ "samsung,exynosautov9-hsi2c";
reg = <0x138b0000 0xc0>;
interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -666,7 +701,8 @@
status = "disabled";
hsi2c_2: i2c@138c0000 {
- compatible = "samsung,exynosautov9-hsi2c";
+ compatible = "samsung,exynos850-hsi2c",
+ "samsung,exynosautov9-hsi2c";
reg = <0x138c0000 0xc0>;
interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -708,7 +744,8 @@
status = "disabled";
hsi2c_3: i2c@11d00000 {
- compatible = "samsung,exynosautov9-hsi2c";
+ compatible = "samsung,exynos850-hsi2c",
+ "samsung,exynosautov9-hsi2c";
reg = <0x11d00000 0xc0>;
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -748,7 +785,8 @@
status = "disabled";
hsi2c_4: i2c@11d20000 {
- compatible = "samsung,exynosautov9-hsi2c";
+ compatible = "samsung,exynos850-hsi2c",
+ "samsung,exynosautov9-hsi2c";
reg = <0x11d20000 0xc0>;
interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynosautov9-sadk.dts b/sys/contrib/device-tree/src/arm64/exynos/exynosautov9-sadk.dts
index 101f51bf565a..de2c1de51a76 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynosautov9-sadk.dts
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynosautov9-sadk.dts
@@ -9,6 +9,7 @@
/dts-v1/;
#include "exynosautov9.dtsi"
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
/ {
model = "Samsung ExynosAuto v9 SADK board";
@@ -32,6 +33,31 @@
<0xa 0x00000000 0x2 0x00000000>;
};
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&key_wakeup &key_volup &key_voldown>;
+
+ key-wakeup {
+ label = "Wakeup";
+ linux,code = <KEY_WAKEUP>;
+ gpios = <&gpa0 0 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+
+ key-volume-down {
+ label = "Volume Down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&gpg2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ key-volume-up {
+ label = "Volume Up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&gpg1 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
ufs_0_fixed_vcc_reg: regulator-0 {
compatible = "regulator-fixed";
regulator-name = "ufs-vcc";
@@ -49,6 +75,37 @@
};
};
+&pinctrl_alive {
+ key_wakeup: key-wakeup-pins {
+ samsung,pins = "gpa0-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+ };
+};
+
+&pinctrl_peric1 {
+ key_voldown: key-voldown-pins {
+ samsung,pins = "gpg2-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+ };
+
+ key_volup: key-volup-pins {
+ samsung,pins = "gpg1-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+ };
+};
+
+&pwm {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_tout3>;
+ status = "okay";
+};
+
&serial_0 {
pinctrl-0 = <&uart0_bus_dual>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynosautov9.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynosautov9.dtsi
index d3c5cdeff47f..c871a2f49fda 100644
--- a/sys/contrib/device-tree/src/arm64/exynos/exynosautov9.dtsi
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynosautov9.dtsi
@@ -166,7 +166,8 @@
ranges = <0x0 0x0 0x0 0x20000000>;
chipid@10000000 {
- compatible = "samsung,exynos850-chipid";
+ compatible = "samsung,exynosautov9-chipid",
+ "samsung,exynos850-chipid";
reg = <0x10000000 0x24>;
};
@@ -309,11 +310,13 @@
reg = <0x10450000 0x1000>;
wakeup-interrupt-controller {
- compatible = "samsung,exynosautov9-wakeup-eint";
+ compatible = "samsung,exynosautov9-wakeup-eint",
+ "samsung,exynos850-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
};
};
- pinctrl_aud: pinctrl@19c60000{
+ pinctrl_aud: pinctrl@19c60000 {
compatible = "samsung,exynosautov9-pinctrl";
reg = <0x19c60000 0x1000>;
};
@@ -349,7 +352,8 @@
};
pmu_system_controller: system-controller@10460000 {
- compatible = "samsung,exynos7-pmu", "syscon";
+ compatible = "samsung,exynosautov9-pmu",
+ "samsung,exynos7-pmu", "syscon";
reg = <0x10460000 0x10000>;
reboot: syscon-reboot {
@@ -1560,6 +1564,17 @@
samsung,syscon-phandle = <&pmu_system_controller>;
samsung,cluster-index = <1>;
};
+
+ pwm: pwm@103f0000 {
+ compatible = "samsung,exynosautov9-pwm",
+ "samsung,exynos4210-pwm";
+ reg = <0x103f0000 0x100>;
+ samsung,pwm-outputs = <0>, <1>, <2>, <3>;
+ #pwm-cells = <3>;
+ clocks = <&xtcxo>;
+ clock-names = "timers";
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynosautov920-pinctrl.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynosautov920-pinctrl.dtsi
new file mode 100644
index 000000000000..663e8265cbf5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynosautov920-pinctrl.dtsi
@@ -0,0 +1,1266 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's ExynosAutov920 SoC pin-mux and pin-config device tree source
+ *
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Samsung's ExynosAutov920 SoC pin-mux and pin-config options are listed as
+ * device tree nodes in this file.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+#include "exynos-pinctrl.h"
+
+&pinctrl_alive {
+ gpa0: gpa0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ gpa1: gpa1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ gpq0: gpq0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_aud {
+ gpb0: gpb0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpb1: gpb1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpb2: gpb2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpb3: gpb3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpb4: gpb4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpb5: gpb5-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpb6: gpb6-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_hsi0 {
+ gph0: gph0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph1: gph1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_hsi1 {
+ gph8: gph8-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_hsi2 {
+ gph3: gph3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph4: gph4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph5: gph5-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph6: gph6-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_hsi2ufs {
+ gph2: gph2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ ufs_refclk_out: ufs-refclk-out-pins {
+ samsung,pins = "gph2-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ ufs_rst_n: ufs-rst-n-pins {
+ samsung,pins = "gph2-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <EXYNOS_PIN_PULL_DOWN>;
+ };
+
+ ufs_refclk_out_1: ufs-refclk-out-1-pins {
+ samsung,pins = "gph2-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <EXYNOS_PIN_PULL_DOWN>;
+ };
+
+ ufs_rst_n_1: ufs-rst-n-1-pins {
+ samsung,pins = "gph2-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <EXYNOS_PIN_PULL_DOWN>;
+ };
+};
+
+&pinctrl_peric0 {
+ gpg0: gpg0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg2: gpg2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg3: gpg3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg4: gpg4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpg5: gpg5-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp0: gpp0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp1: gpp1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp2: gpp2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp3: gpp3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp4: gpp4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ /* PWM PERIC0 */
+ pwm_tout0: pwm-tout0-pins {
+ samsung,pins = "gpg0-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ pwm_tout1: pwm-tout1-pins {
+ samsung,pins = "gpg0-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ pwm_tout2: pwm-tout2-pins {
+ samsung,pins = "gpg0-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ pwm_tout3: pwm-tout3-pins {
+ samsung,pins = "gpg0-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI00 */
+ uart0_bus: uart0-bus-pins {
+ samsung,pins = "gpp0-0", "gpp0-1", "gpp0-2", "gpp0-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart0_bus_dual: uart0-bus-dual-pins {
+ samsung,pins = "gpp0-0", "gpp0-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI01 */
+ uart1_bus: uart1-bus-pins {
+ samsung,pins = "gpp0-4", "gpp0-5", "gpp0-6", "gpp0-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart1_bus_dual: uart1-bus-dual-pins {
+ samsung,pins = "gpp0-4", "gpp0-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI02 */
+ uart2_bus: uart2-bus-pins {
+ samsung,pins = "gpp1-0", "gpp1-1", "gpp1-2", "gpp1-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart2_bus_dual: uart2-bus-dual-pins {
+ samsung,pins = "gpp1-0", "gpp1-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI03 */
+ uart3_bus: uart3-bus-pins {
+ samsung,pins = "gpp1-4", "gpp1-5", "gpp1-6", "gpp1-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart3_bus_dual: uart3-bus-dual-pins {
+ samsung,pins = "gpp1-4", "gpp1-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI04 */
+ uart4_bus: uart4-bus-pins {
+ samsung,pins = "gpp2-0", "gpp2-1", "gpp2-2", "gpp2-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart4_bus_dual: uart4-bus-dual-pins {
+ samsung,pins = "gpp2-0", "gpp2-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI05 */
+ uart5_bus: uart5-bus-pins {
+ samsung,pins = "gpp2-4", "gpp2-5", "gpp2-6", "gpp2-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart5_bus_dual: uart5-bus-dual-pins {
+ samsung,pins = "gpp2-4", "gpp2-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI06 */
+ uart6_bus: uart6-bus-pins {
+ samsung,pins = "gpp3-0", "gpp3-1", "gpp3-2", "gpp3-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart6_bus_dual: uart6-bus-dual-pins {
+ samsung,pins = "gpp3-0", "gpp3-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI07 */
+ uart7_bus: uart7-bus-pins {
+ samsung,pins = "gpp3-4", "gpp3-5", "gpp3-6", "gpp3-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart7_bus_dual: uart7-bus-dual-pins {
+ samsung,pins = "gpp3-4", "gpp3-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC0_USI08 */
+ uart8_bus: uart8-bus-pins {
+ samsung,pins = "gpp4-0", "gpp4-1", "gpp4-2", "gpp4-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart8_bus_dual: uart8-bus-dual-pins {
+ samsung,pins = "gpp4-0", "gpp4-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI00 */
+ hsi2c0_bus: hsi2c0-bus-pins {
+ samsung,pins = "gpp0-0", "gpp0-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI00_I2C */
+ hsi2c1_bus: hsi2c1-bus-pins {
+ samsung,pins = "gpp0-2", "gpp0-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI01 */
+ hsi2c2_bus: hsi2c2-bus-pins {
+ samsung,pins = "gpp0-4", "gpp0-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI01_I2C */
+ hsi2c3_bus: hsi2c3-bus-pins {
+ samsung,pins = "gpp0-6", "gpp0-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI02 */
+ hsi2c4_bus: hsi2c4-bus-pins {
+ samsung,pins = "gpp1-0", "gpp1-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI02_I2C */
+ hsi2c5_bus: hsi2c5-bus-pins {
+ samsung,pins = "gpp1-2", "gpp1-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI03 */
+ hsi2c6_bus: hsi2c6-bus-pins {
+ samsung,pins = "gpp1-4", "gpp1-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI03_I2C */
+ hsi2c7_bus: hsi2c7-bus-pins {
+ samsung,pins = "gpp1-6", "gpp1-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI04 */
+ hsi2c8_bus: hsi2c8-bus-pins {
+ samsung,pins = "gpp2-0", "gpp2-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI04_I2C */
+ hsi2c9_bus: hsi2c9-bus-pins {
+ samsung,pins = "gpp2-2", "gpp2-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI05 */
+ hsi2c10_bus: hsi2c10-bus-pins {
+ samsung,pins = "gpp2-4", "gpp2-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI05_I2C */
+ hsi2c11_bus: hsi2c11-bus-pins {
+ samsung,pins = "gpp2-6", "gpp2-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI06 */
+ hsi2c12_bus: hsi2c12-bus-pins {
+ samsung,pins = "gpp3-0", "gpp3-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI06_I2C */
+ hsi2c13_bus: hsi2c13-bus-pins {
+ samsung,pins = "gpp3-2", "gpp3-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI07 */
+ hsi2c14_bus: hsi2c14-bus-pins {
+ samsung,pins = "gpp3-4", "gpp3-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI07_I2C */
+ hsi2c15_bus: hsi2c15-bus-pins {
+ samsung,pins = "gpp3-6", "gpp3-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI08 */
+ hsi2c16_bus: hsi2c16-bus-pins {
+ samsung,pins = "gpp4-0", "gpp4-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC0 USI08_I2C */
+ hsi2c17_bus: hsi2c17-bus-pins {
+ samsung,pins = "gpp4-2", "gpp4-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI00 */
+ spi0_bus: spi0-bus-pins {
+ samsung,pins = "gpp0-0", "gpp0-1", "gpp0-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi0_cs: spi0-cs-pins {
+ samsung,pins = "gpp0-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi0_cs_func: spi0-cs-func-pins {
+ samsung,pins = "gpp0-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI01 */
+ spi1_bus: spi1-bus-pins {
+ samsung,pins = "gpp0-4", "gpp0-5", "gpp0-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi1_cs: spi1-cs-pins {
+ samsung,pins = "gpp0-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi1_cs_func: spi1-cs-func-pins {
+ samsung,pins = "gpp0-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI02 */
+ spi2_bus: spi2-bus-pins {
+ samsung,pins = "gpp1-0", "gpp1-1", "gpp1-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi2_cs: spi2-cs-pins {
+ samsung,pins = "gpp1-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi2_cs_func: spi2-cs-func-pins {
+ samsung,pins = "gpp1-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI03 */
+ spi3_bus: spi3-bus-pins {
+ samsung,pins = "gpp1-4", "gpp1-5", "gpp1-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi3_cs: spi3-cs-pins {
+ samsung,pins = "gpp1-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi3_cs_func: spi3-cs-func-pins {
+ samsung,pins = "gpp1-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI04 */
+ spi4_bus: spi4-bus-pins {
+ samsung,pins = "gpp2-0", "gpp2-1", "gpp2-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi4_cs: spi4-cs-pins {
+ samsung,pins = "gpp2-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi4_cs_func: spi4-cs-func-pins {
+ samsung,pins = "gpp2-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI05 */
+ spi5_bus: spi5-bus-pins {
+ samsung,pins = "gpp2-4", "gpp2-5", "gpp2-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi5_cs: spi5-cs-pins {
+ samsung,pins = "gpp2-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi5_cs_func: spi5-cs-func-pins {
+ samsung,pins = "gpp2-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI06 */
+ spi6_bus: spi6-bus-pins {
+ samsung,pins = "gpp3-0", "gpp3-1", "gpp3-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi6_cs: spi6-cs-pins {
+ samsung,pins = "gpp3-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi6_cs_func: spi6-cs-func-pins {
+ samsung,pins = "gpp3-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI07 */
+ spi7_bus: spi7-bus-pins {
+ samsung,pins = "gpp3-4", "gpp3-5", "gpp3-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi7_cs: spi7-cs-pins {
+ samsung,pins = "gpp3-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi7_cs_func: spi7-cs-func-pins {
+ samsung,pins = "gpp3-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC0 USI08 */
+ spi8_bus: spi8-bus-pins {
+ samsung,pins = "gpp4-0", "gpp4-1", "gpp4-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi8_cs: spi8-cs-pins {
+ samsung,pins = "gpp4-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi8_cs_func: spi8-cs-func-pins {
+ samsung,pins = "gpp4-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I3C PERIC0 */
+ i3c0_bus: i3c0-bus-pins {
+ samsung,pins = "gpp2-6", "gpp2-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ i3c1_bus: i3c1-bus-pins {
+ samsung,pins = "gpp3-2", "gpp3-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ i3c2_bus: i3c2-bus-pins {
+ samsung,pins = "gpp3-6", "gpp3-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ i3c3_bus: i3c3-bus-pins {
+ samsung,pins = "gpp4-2", "gpp4-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+};
+
+&pinctrl_peric1 {
+ gpg1: gpg1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp5: gpp5-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp6: gpp6-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp7: gpp7-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp8: gpp8-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp9: gpp9-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp10: gpp10-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp11: gpp11-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp12: gpp12-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ /* UART PERIC1 USI09 */
+ uart9_bus: uart9-bus-pins {
+ samsung,pins = "gpp5-0", "gpp5-1", "gpp5-2", "gpp5-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart9_bus_dual: uart9-bus-dual-pins {
+ samsung,pins = "gpp5-0", "gpp5-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1 USI10 */
+ uart10_bus: uart10-bus-pins {
+ samsung,pins = "gpp5-4", "gpp5-5", "gpp5-6", "gpp5-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart10_bus_dual: uart10-bus-dual-pins {
+ samsung,pins = "gpp5-4", "gpp5-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1 USI11 */
+ uart11_bus: uart11-bus-pins {
+ samsung,pins = "gpp10-0", "gpp10-1", "gpp10-2", "gpp10-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart11_bus_dual: uart11-bus-dual-pins {
+ samsung,pins = "gpp10-0", "gpp10-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1_USI12 */
+ uart12_bus: uart12-bus-pins {
+ samsung,pins = "gpp7-0", "gpp7-1", "gpp7-2", "gpp7-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart12_bus_dual: uart12-bus-dual-pins {
+ samsung,pins = "gpp7-0", "gpp7-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1_USI13 */
+ uart13_bus: uart13-bus-pins {
+ samsung,pins = "gpp7-4", "gpp7-5", "gpp7-6", "gpp7-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart13_bus_dual: uart13-bus-dual-pins {
+ samsung,pins = "gpp7-4", "gpp7-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1 USI14 */
+ uart14_bus: uart14-bus-pins {
+ samsung,pins = "gpp8-0", "gpp8-1", "gpp8-2", "gpp8-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart14_bus_dual: uart14-bus-dual-pins {
+ samsung,pins = "gpp8-0", "gpp8-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1 USI15 */
+ uart15_bus: uart15-bus-pins {
+ samsung,pins = "gpp11-0", "gpp11-1", "gpp11-2", "gpp11-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart15_bus_dual: uart15-bus-dual-pins {
+ samsung,pins = "gpp11-0", "gpp11-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1 USI16 */
+ uart16_bus: uart16-bus-pins {
+ samsung,pins = "gpp9-0", "gpp9-1", "gpp9-2", "gpp9-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart16_bus_dual: uart16-bus-dual-pins {
+ samsung,pins = "gpp9-0", "gpp9-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* UART PERIC1 USI17 */
+ uart17_bus: uart17-bus-pins {
+ samsung,pins = "gpp12-0", "gpp12-1", "gpp12-2", "gpp12-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ uart17_bus_dual: uart17-bus-dual-pins {
+ samsung,pins = "gpp12-0", "gpp12-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI09 */
+ hsi2c18_bus: hsi2c18-bus-pins {
+ samsung,pins = "gpp5-0", "gpp5-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI09_I2C */
+ hsi2c19_bus: hsi2c19-bus-pins {
+ samsung,pins = "gpp5-2", "gpp5-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI10 */
+ hsi2c20_bus: hsi2c20-bus-pins {
+ samsung,pins = "gpp5-4", "gpp5-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI10_I2C */
+ hsi2c21_bus: hsi2c21-bus-pins {
+ samsung,pins = "gpp5-6", "gpp5-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI11 */
+ hsi2c22_bus: hsi2c22-bus-pins {
+ samsung,pins = "gpp10-0", "gpp10-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI11_I2C */
+ hsi2c23_bus: hsi2c23-bus-pins {
+ samsung,pins = "gpp10-2", "gpp10-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI12 */
+ hsi2c24_bus: hsi2c24-bus-pins {
+ samsung,pins = "gpp7-0", "gpp7-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI12_I2C */
+ hsi2c25_bus: hsi2c25-bus-pins {
+ samsung,pins = "gpp7-2", "gpp7-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI13 */
+ hsi2c26_bus: hsi2c26-bus-pins {
+ samsung,pins = "gpp7-4", "gpp7-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI13_I2C */
+ hsi2c27_bus: hsi2c27-bus-pins {
+ samsung,pins = "gpp7-6", "gpp7-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI14 */
+ hsi2c28_bus: hsi2c28-bus-pins {
+ samsung,pins = "gpp8-0", "gpp8-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI14_I2C */
+ hsi2c29_bus: hsi2c29-bus-pins {
+ samsung,pins = "gpp8-2", "gpp8-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI15 */
+ hsi2c30_bus: hsi2c30-bus-pins {
+ samsung,pins = "gpp11-0", "gpp11-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI15_I2C */
+ hsi2c31_bus: hsi2c31-bus-pins {
+ samsung,pins = "gpp11-2", "gpp11-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI16 */
+ hsi2c32_bus: hsi2c32-bus-pins {
+ samsung,pins = "gpp9-0", "gpp9-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI16_I2C */
+ hsi2c33_bus: hsi2c33-bus-pins {
+ samsung,pins = "gpp9-2", "gpp9-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI17 */
+ hsi2c34_bus: hsi2c34-bus-pins {
+ samsung,pins = "gpp12-0", "gpp12-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I2C PERIC1 USI17_I2C */
+ hsi2c35_bus: hsi2c35-bus-pins {
+ samsung,pins = "gpp12-2", "gpp12-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_3>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI09 */
+ spi9_bus: spi9-bus-pins {
+ samsung,pins = "gpp5-0", "gpp5-1", "gpp5-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi9_cs: spi9-cs-pins {
+ samsung,pins = "gpp5-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi9_cs_func: spi9-cs-func-pins {
+ samsung,pins = "gpp5-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI10 */
+ spi10_bus: spi10-bus-pins {
+ samsung,pins = "gpp5-4", "gpp5-5", "gpp5-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi10_cs: spi10-cs-pins {
+ samsung,pins = "gpp5-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi10_cs_func: spi10-cs-func-pins {
+ samsung,pins = "gpp5-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI11 */
+ spi11_bus: spi11-bus-pins {
+ samsung,pins = "gpp10-0", "gpp10-1", "gpp10-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi11_cs: spi11-cs-pins {
+ samsung,pins = "gpp10-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi11_cs_func: spi11-cs-func-pins {
+ samsung,pins = "gpp10-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI12 */
+ spi12_bus: spi12-bus-pins {
+ samsung,pins = "gpp7-0", "gpp7-1", "gpp7-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi12_cs: spi12-cs-pins {
+ samsung,pins = "gpp7-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi12_cs_func: spi12-cs-func-pins {
+ samsung,pins = "gpp7-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI13 */
+ spi13_bus: spi13-bus-pins {
+ samsung,pins = "gpp7-4", "gpp7-5", "gpp7-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi13_cs: spi13-cs-pins {
+ samsung,pins = "gpp7-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi13_cs_func: spi13-cs-func-pins {
+ samsung,pins = "gpp7-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI14 */
+ spi14_bus: spi14-bus-pins {
+ samsung,pins = "gpp8-0", "gpp8-1", "gpp8-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi14_cs: spi14-cs-pins {
+ samsung,pins = "gpp8-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi14_cs_func: spi14-cs-func-pins {
+ samsung,pins = "gpp8-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI15 */
+ spi15_bus: spi15-bus-pins {
+ samsung,pins = "gpp11-0", "gpp11-1", "gpp11-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi15_cs: spi15-cs-pins {
+ samsung,pins = "gpp11-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi15_cs_func: spi15-cs-func-pins {
+ samsung,pins = "gpp11-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI16 */
+ spi16_bus: spi16-bus-pins {
+ samsung,pins = "gpp9-0", "gpp9-1", "gpp9-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi16_cs: spi16-cs-pins {
+ samsung,pins = "gpp9-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi16_cs_func: spi16-cs-func-pins {
+ samsung,pins = "gpp9-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* SPI PERIC1 USI17 */
+ spi17_bus: spi17-bus-pins {
+ samsung,pins = "gpp12-0", "gpp12-1", "gpp12-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi17_cs: spi17-cs-pins {
+ samsung,pins = "gpp12-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ spi17_cs_func: spi17-cs-func-pins {
+ samsung,pins = "gpp12-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ /* I3C PERIC1 */
+ i3c4_bus: i3c4-bus-pins {
+ samsung,pins = "gpp7-2", "gpp7-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ i3c5_bus: i3c5-bus-pins {
+ samsung,pins = "gpp7-6", "gpp7-7";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ i3c6_bus: i3c6-bus-pins {
+ samsung,pins = "gpp8-2", "gpp8-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
+ i3c7_bus: i3c7-bus-pins {
+ samsung,pins = "gpp11-2", "gpp11-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_4>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynosautov920-sadk.dts b/sys/contrib/device-tree/src/arm64/exynos/exynosautov920-sadk.dts
new file mode 100644
index 000000000000..a397f068ed53
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynosautov920-sadk.dts
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's ExynosAutov920 SADK board device tree source
+ *
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+#include "exynosautov920.dtsi"
+#include "exynos-pinctrl.h"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "Samsung ExynosAutov920 SADK board";
+ compatible = "samsung,exynosautov920-sadk", "samsung,exynosautov920";
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ aliases {
+ serial0 = &serial_0;
+ };
+
+ chosen {
+ stdout-path = &serial_0;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&key_wakeup &key_back>;
+
+ key-wakeup {
+ label = "KEY_WAKEUP";
+ linux,code = <KEY_WAKEUP>;
+ gpios = <&gpa0 0 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+
+ key-back {
+ label = "KEY_BACK";
+ linux,code = <KEY_BACK>;
+ gpios = <&gpp6 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x0 0x80000000 0x0 0x70000000>,
+ <0x8 0x80000000 0x1 0xfba00000>,
+ <0xa 0x00000000 0x2 0x00000000>;
+ };
+};
+
+&pinctrl_alive {
+ key_wakeup: key-wakeup-pins {
+ samsung,pins = "gpa0-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+ };
+};
+
+&pinctrl_peric1 {
+ key_back: key-back-pins {
+ samsung,pins = "gpp6-3";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+ };
+};
+
+&pwm {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_tout0>;
+ status = "okay";
+};
+
+&serial_0 {
+ status = "okay";
+};
+
+&usi_0 {
+ samsung,clkreq-on; /* needed for UART mode */
+ status = "okay";
+};
+
+&xtcxo {
+ clock-frequency = <38400000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/exynos/exynosautov920.dtsi b/sys/contrib/device-tree/src/arm64/exynos/exynosautov920.dtsi
new file mode 100644
index 000000000000..c1c8566d74f5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/exynosautov920.dtsi
@@ -0,0 +1,312 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's ExynosAutov920 SoC device tree source
+ *
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/samsung,exynos-usi.h>
+
+/ {
+ compatible = "samsung,exynosautov920";
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ interrupt-parent = <&gic>;
+
+ aliases {
+ pinctrl0 = &pinctrl_alive;
+ pinctrl1 = &pinctrl_aud;
+ pinctrl2 = &pinctrl_hsi0;
+ pinctrl3 = &pinctrl_hsi1;
+ pinctrl4 = &pinctrl_hsi2;
+ pinctrl5 = &pinctrl_hsi2ufs;
+ pinctrl6 = &pinctrl_peric0;
+ pinctrl7 = &pinctrl_peric1;
+ };
+
+ arm-pmu {
+ compatible = "arm,cortex-a78-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ xtcxo: clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-output-names = "oscclk";
+ };
+
+ /*
+ * FIXME: Keep the stub clock for serial driver, until proper clock
+ * driver is implemented.
+ */
+ clock_usi: clock-usi {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <200000000>;
+ clock-output-names = "usi";
+ };
+
+ cpus: cpus {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+ core1 {
+ cpu = <&cpu1>;
+ };
+ core2 {
+ cpu = <&cpu2>;
+ };
+ core3 {
+ cpu = <&cpu3>;
+ };
+ };
+
+ cluster1 {
+ core0 {
+ cpu = <&cpu4>;
+ };
+ core1 {
+ cpu = <&cpu5>;
+ };
+ core2 {
+ cpu = <&cpu6>;
+ };
+ core3 {
+ cpu = <&cpu7>;
+ };
+ };
+
+ cluster2 {
+ core0 {
+ cpu = <&cpu8>;
+ };
+ core1 {
+ cpu = <&cpu9>;
+ };
+ };
+ };
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ };
+
+ cpu1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ };
+
+ cpu2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x200>;
+ enable-method = "psci";
+ };
+
+ cpu3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x300>;
+ enable-method = "psci";
+ };
+
+ cpu4: cpu@10000 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x10000>;
+ enable-method = "psci";
+ };
+
+ cpu5: cpu@10100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x10100>;
+ enable-method = "psci";
+ };
+
+ cpu6: cpu@10200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x10200>;
+ enable-method = "psci";
+ };
+
+ cpu7: cpu@10300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x10300>;
+ enable-method = "psci";
+ };
+
+ cpu8: cpu@20000 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x20000>;
+ enable-method = "psci";
+ };
+
+ cpu9: cpu@20100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78ae";
+ reg = <0x0 0x20100>;
+ enable-method = "psci";
+ };
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x0 0x0 0x20000000>;
+
+ chipid@10000000 {
+ compatible = "samsung,exynosautov920-chipid",
+ "samsung,exynos850-chipid";
+ reg = <0x10000000 0x24>;
+ };
+
+ gic: interrupt-controller@10400000 {
+ compatible = "arm,gic-v3";
+ #interrupt-cells = <3>;
+ #address-cells = <0>;
+ interrupt-controller;
+ reg = <0x10400000 0x10000>,
+ <0x10460000 0x140000>;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ syscon_peric0: syscon@10820000 {
+ compatible = "samsung,exynosautov920-peric0-sysreg",
+ "syscon";
+ reg = <0x10820000 0x2000>;
+ };
+
+ pinctrl_peric0: pinctrl@10830000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x10830000 0x10000>;
+ interrupts = <GIC_SPI 753 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ usi_0: usi@108800c0 {
+ compatible = "samsung,exynosautov920-usi",
+ "samsung,exynos850-usi";
+ reg = <0x108800c0 0x20>;
+ samsung,sysreg = <&syscon_peric0 0x1000>;
+ samsung,mode = <USI_V2_UART>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ clocks = <&clock_usi>, <&clock_usi>;
+ clock-names = "pclk", "ipclk";
+ status = "disabled";
+
+ serial_0: serial@10880000 {
+ compatible = "samsung,exynosautov920-uart",
+ "samsung,exynos850-uart";
+ reg = <0x10880000 0xc0>;
+ interrupts = <GIC_SPI 764 IRQ_TYPE_LEVEL_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_bus>;
+ clocks = <&clock_usi>, <&clock_usi>;
+ clock-names = "uart", "clk_uart_baud0";
+ samsung,uart-fifosize = <256>;
+ status = "disabled";
+ };
+ };
+
+ pwm: pwm@109b0000 {
+ compatible = "samsung,exynosautov920-pwm",
+ "samsung,exynos4210-pwm";
+ reg = <0x109b0000 0x100>;
+ samsung,pwm-outputs = <0>, <1>, <2>, <3>;
+ #pwm-cells = <3>;
+ clocks = <&xtcxo>;
+ clock-names = "timers";
+ status = "disabled";
+ };
+
+ syscon_peric1: syscon@10c20000 {
+ compatible = "samsung,exynosautov920-peric1-sysreg",
+ "syscon";
+ reg = <0x10c20000 0x2000>;
+ };
+
+ pinctrl_peric1: pinctrl@10c30000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x10c30000 0x10000>;
+ interrupts = <GIC_SPI 781 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pinctrl_alive: pinctrl@11850000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x11850000 0x10000>;
+
+ wakeup-interrupt-controller {
+ compatible = "samsung,exynosautov920-wakeup-eint";
+ };
+ };
+
+ pmu_system_controller: system-controller@11860000 {
+ compatible = "samsung,exynosautov920-pmu",
+ "samsung,exynos7-pmu","syscon";
+ reg = <0x11860000 0x10000>;
+ };
+
+ pinctrl_hsi0: pinctrl@16040000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x16040000 0x10000>;
+ interrupts = <GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pinctrl_hsi1: pinctrl@16450000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x16450000 0x10000>;
+ interrupts = <GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pinctrl_hsi2: pinctrl@16c10000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x16c10000 0x10000>;
+ interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pinctrl_hsi2ufs: pinctrl@16d20000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x16d20000 0x10000>;
+ interrupts = <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pinctrl_aud: pinctrl@1a460000 {
+ compatible = "samsung,exynosautov920-pinctrl";
+ reg = <0x1a460000 0x10000>;
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+#include "exynosautov920-pinctrl.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/exynos/google/gs101-oriole.dts b/sys/contrib/device-tree/src/arm64/exynos/google/gs101-oriole.dts
new file mode 100644
index 000000000000..4a71f752200d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/google/gs101-oriole.dts
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Oriole Device Tree
+ *
+ * Copyright 2021-2023 Google LLC
+ * Copyright 2023 Linaro Ltd - <peter.griffin@linaro.org>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "gs101-pinctrl.h"
+#include "gs101.dtsi"
+
+/ {
+ model = "Oriole";
+ compatible = "google,gs101-oriole", "google,gs101";
+
+ aliases {
+ serial0 = &serial_0;
+ };
+
+ chosen {
+ /* Bootloader expects bootargs specified otherwise it crashes */
+ bootargs = "";
+ stdout-path = &serial_0;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&key_voldown>, <&key_volup>, <&key_power>;
+
+ button-vol-down {
+ label = "KEY_VOLUMEDOWN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&gpa7 3 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+
+ button-vol-up {
+ label = "KEY_VOLUMEUP";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&gpa8 1 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+
+ button-power {
+ label = "KEY_POWER";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpa10 1 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+ };
+};
+
+&ext_24_5m {
+ clock-frequency = <24576000>;
+};
+
+&ext_200m {
+ clock-frequency = <200000000>;
+};
+
+&pinctrl_far_alive {
+ key_voldown: key-voldown-pins {
+ samsung,pins = "gpa7-3";
+ samsung,pin-function = <GS101_PIN_FUNC_EINT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ key_volup: key-volup-pins {
+ samsung,pins = "gpa8-1";
+ samsung,pin-function = <GS101_PIN_FUNC_EINT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+};
+
+&pinctrl_gpio_alive {
+ key_power: key-power-pins {
+ samsung,pins = "gpa10-1";
+ samsung,pin-function = <GS101_PIN_FUNC_EINT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+};
+
+&serial_0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_bus>;
+ status = "okay";
+};
+
+&usi_uart {
+ samsung,clkreq-on; /* needed for UART mode */
+ status = "okay";
+};
+
+&watchdog_cl0 {
+ timeout-sec = <30>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.dtsi b/sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.dtsi
new file mode 100644
index 000000000000..e6a9776d4d62
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.dtsi
@@ -0,0 +1,1249 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * GS101 SoC pin-mux and pin-config device tree source
+ *
+ * Copyright 2019-2023 Google LLC
+ * Copyright 2023 Linaro Ltd - <peter.griffin@linaro.org>
+ */
+
+#include "gs101-pinctrl.h"
+
+&pinctrl_gpio_alive {
+ gpa0: gpa0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa1: gpa1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa2: gpa2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa3: gpa3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa4: gpa4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa5: gpa5-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa9: gpa9-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa10: gpa10-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ uart15_bus: uart15-bus-pins {
+ samsung,pins = "gpa2-3", "gpa2-4";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ uart16_bus: uart16-bus-pins {
+ samsung,pins = "gpa3-0", "gpa3-1", "gpa3-2", "gpa3-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ uart17_bus: uart17-bus-pins {
+ samsung,pins = "gpa4-0", "gpa4-1", "gpa4-2", "gpa4-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi15_bus: spi15-bus-pins {
+ samsung,pins = "gpa4-0", "gpa4-1", "gpa4-2";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi15_cs: spi15-cs-pins {
+ samsung,pins = "gpa4-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+};
+
+&pinctrl_far_alive {
+ gpa6: gpa6-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa7: gpa7-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa8: gpa8-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ gpa11: gpa11-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+};
+
+&pinctrl_gsacore {
+ gps0: gps0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gps1: gps1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gps2: gps2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_gsactrl {
+ gps3: gps3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+};
+
+&pinctrl_hsi1 {
+ gph0: gph0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph1: gph1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pcie0_clkreq: pcie0-clkreq-pins{
+ samsung,pins = "gph0-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_UP>;
+ samsung,pin-drv = <GS101_PIN_DRV_10_MA>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ samsung,pin-pud-pdn = <GS101_PIN_PULL_UP>;
+ };
+
+ pcie0_perst: pcie0-perst-pins {
+ samsung,pins = "gph0-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-drv = <GS101_PIN_DRV_10_MA>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ };
+};
+
+&pinctrl_hsi2 {
+ gph2: gph2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph3: gph3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gph4: gph4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ sd2_clk: sd2-clk-pins {
+ samsung,pins = "gph4-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_7_5_MA>;
+ };
+
+ sd2_cmd: sd2-cmd-pins {
+ samsung,pins = "gph4-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_UP>;
+ samsung,pin-drv = <GS101_PIN_DRV_7_5_MA>;
+ };
+
+ sd2_bus1: sd2-bus-width1-pins {
+ samsung,pins = "gph4-2";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_UP>;
+ samsung,pin-drv = <GS101_PIN_DRV_7_5_MA>;
+ };
+
+ sd2_bus4: sd2-bus-width4-pins {
+ samsung,pins = "gph4-3", "gph4-4", "gph4-5";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_UP>;
+ samsung,pin-drv = <GS101_PIN_DRV_7_5_MA>;
+ };
+
+ sd2_clk_fast_slew_rate_1x: sd2-clk-fast-slew-rate-1x-pins {
+ samsung,pins = "gph4-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ sd2_clk_fast_slew_rate_2x: sd2-clk-fast-slew-rate-2x-pins {
+ samsung,pins = "gph4-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sd2_clk_fast_slew_rate_3x: sd2-clk-fast-slew-rate-3x-pins {
+ samsung,pins = "gph4-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_7_5_MA>;
+ };
+
+ sd2_clk_fast_slew_rate_4x: sd2-clk-fast-slew-rate-4x-pins {
+ samsung,pins = "gph4-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_10_MA>;
+ };
+
+ ufs_rst_n: ufs-rst-n-pins {
+ samsung,pins = "gph3-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ samsung,pin-pud-pdn = <GS101_PIN_PULL_NONE>;
+ };
+
+ ufs_refclk_out: ufs-refclk-out-pins {
+ samsung,pins = "gph3-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ samsung,pin-pud-pdn = <GS101_PIN_PULL_NONE>;
+ };
+
+ pcie1_clkreq: pcie1-clkreq-pins {
+ samsung,pins = "gph2-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_UP>;
+ samsung,pin-drv = <GS101_PIN_DRV_10_MA>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ samsung,pin-pud-pdn = <GS101_PIN_PULL_UP>;
+ };
+
+ pcie1_perst: pcie1-perst-pins {
+ samsung,pins = "gph2-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-drv = <GS101_PIN_DRV_10_MA>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ };
+};
+
+&pinctrl_peric0 {
+ gpp0: gpp0-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp1: gpp1-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp2: gpp2-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp3: gpp3-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp4: gpp4-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp5: gpp5-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp6: gpp6-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp7: gpp7-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp8: gpp8-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp9: gpp9-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp10: gpp10-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp11: gpp11-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp12: gpp12-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp13: gpp13-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp14: gpp14-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp15: gpp15-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp16: gpp16-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp17: gpp17-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp18: gpp18-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp19: gpp19-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ /* USI_PERIC0_UART_DBG */
+ uart0_bus: uart0-bus-pins {
+ samsung,pins = "gpp1-2", "gpp1-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ disp_te_pri_on: disp-te-pri-on-pins {
+ samsung,pins = "gpp0-3";
+ samsung,pin-function = <GS101_PIN_FUNC_EINT>;
+ };
+
+ disp_te_pri_off: disp-te-pri-off-pins {
+ samsung,pins = "gpp0-3";
+ samsung,pin-function = <GS101_PIN_FUNC_INPUT>;
+ };
+
+ disp_te_sec_on: disp-te-sec-on-pins {
+ samsung,pins = "gpp0-4";
+ samsung,pin-function = <GS101_PIN_FUNC_EINT>;
+ };
+
+ disp_te_sec_off: disp-te-sec-off-pins {
+ samsung,pins = "gpp0-4";
+ samsung,pin-function = <GS101_PIN_FUNC_INPUT>;
+ };
+
+ sensor_mclk1_out: sensor-mclk1-out-pins {
+ samsung,pins = "gpp3-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk1_fn: sensor-mclk1-fn-pins {
+ samsung,pins = "gpp3-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk2_out: sensor-mclk2-out-pins {
+ samsung,pins = "gpp5-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk2_fn: sensor-mclk2-fn-pins {
+ samsung,pins = "gpp5-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk3_out: sensor-mclk3-out-pins {
+ samsung,pins = "gpp7-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk3_fn: sensor-mclk3-fn-pins {
+ samsung,pins = "gpp7-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk4_out: sensor-mclk4-out-pins {
+ samsung,pins = "gpp9-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk4_fn: sensor-mclk4-fn-pins {
+ samsung,pins = "gpp9-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk5_out: sensor-mclk5-out-pins {
+ samsung,pins = "gpp11-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk5_fn: sensor-mclk5-fn-pins {
+ samsung,pins = "gpp11-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk6_out: sensor-mclk6-out-pins {
+ samsung,pins = "gpp13-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk6_fn: sensor-mclk6-fn-pins {
+ samsung,pins = "gpp13-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk7_out: sensor-mclk7-out-pins {
+ samsung,pins = "gpp15-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk7_fn: sensor-mclk7-fn-pins {
+ samsung,pins = "gpp15-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk8_out: sensor-mclk8-out-pins {
+ samsung,pins = "gpp17-0";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ sensor_mclk8_fn: sensor-mclk8-fn-pins {
+ samsung,pins = "gpp17-0";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_5_MA>;
+ };
+
+ hsi2c14_bus: hsi2c14-bus-pins {
+ samsung,pins = "gpp18-0", "gpp18-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart14_bus_single: uart14-bus-pins {
+ samsung,pins = "gpp18-0", "gpp18-1",
+ "gpp18-2", "gpp18-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi14_bus: spi14-bus-pins {
+ samsung,pins = "gpp18-0", "gpp18-1", "gpp18-2";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi14_cs: spi14-cs-pins {
+ samsung,pins = "gpp18-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi14_cs_func: spi14-cs-func-pins {
+ samsung,pins = "gpp18-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c8_bus: hsi2c8-bus-pins {
+ samsung,pins = "gpp16-0", "gpp16-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ samsung,pin-pud-pdn = <GS101_PIN_PDN_OUT0>;
+ };
+
+ uart8_bus_single: uart8-bus-pins {
+ samsung,pins = "gpp16-0", "gpp16-1", "gpp16-2",
+ "gpp16-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi8_bus: spi8-bus-pins {
+ samsung,pins = "gpp16-0", "gpp16-1", "gpp16-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi8_cs: spi8-cs-pins {
+ samsung,pins = "gpp16-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi8_cs_func: spi8-cs-func-pins {
+ samsung,pins = "gpp16-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c7_bus: hsi2c7-bus-pins {
+ samsung,pins = "gpp14-0", "gpp14-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart7_bus_single: uart7-bus-pins {
+ samsung,pins = "gpp14-0", "gpp14-1",
+ "gpp14-2", "gpp14-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi7_bus: spi7-bus-pins {
+ samsung,pins = "gpp14-0", "gpp14-1", "gpp14-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi7_cs: spi7-cs-pins {
+ samsung,pins = "gpp14-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi7_cs_func: spi7-cs-func-pins {
+ samsung,pins = "gpp14-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c6_bus: hsi2c6-bus-pins {
+ samsung,pins = "gpp12-0", "gpp12-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart6_bus_single: uart6-bus-pins {
+ samsung,pins = "gpp12-0", "gpp12-1",
+ "gpp12-2", "gpp12-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi6_bus: spi6-bus-pins {
+ samsung,pins = "gpp12-0", "gpp12-1", "gpp12-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi6_cs: spi6-cs-pins {
+ samsung,pins = "gpp12-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi6_cs_func: spi6-cs-func-pins {
+ samsung,pins = "gpp12-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c5_bus: hsi2c5-bus-pins {
+ samsung,pins = "gpp10-0", "gpp10-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart5_bus_single: uart5-bus-pins {
+ samsung,pins = "gpp10-0", "gpp10-1",
+ "gpp10-2", "gpp10-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi5_bus: spi5-bus-pins {
+ samsung,pins = "gpp10-0", "gpp10-1", "gpp10-2";
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ samsung,pin-pud-pdn = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi5_cs_func: spi5-cs-func-pins {
+ samsung,pins = "gpp10-3";
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
+ samsung,pin-pud-pdn = <GS101_PIN_PULL_NONE>;
+ };
+
+ hsi2c4_bus: hsi2c4-bus-pins {
+ samsung,pins = "gpp8-0", "gpp8-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart4_bus_single: uart4-bus-pins {
+ samsung,pins = "gpp8-0", "gpp8-1",
+ "gpp8-2", "gpp8-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi4_bus: spi4-bus-pins {
+ samsung,pins = "gpp8-0", "gpp8-1", "gpp8-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi4_cs: spi4-cs-pins {
+ samsung,pins = "gpp8-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi4_cs_func: spi4-cs-func-pins {
+ samsung,pins = "gpp8-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c3_bus: hsi2c3-bus-pins {
+ samsung,pins = "gpp6-0", "gpp6-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart3_bus_single: uart3-bus-pins {
+ samsung,pins = "gpp6-0", "gpp6-1",
+ "gpp6-2", "gpp6-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi3_bus: spi3-bus-pins {
+ samsung,pins = "gpp6-0", "gpp6-1", "gpp6-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi3_cs: spi3-cs-pins {
+ samsung,pins = "gpp6-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi3_cs_func: spi3-cs-func-pins {
+ samsung,pins = "gpp6-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c2_bus: hsi2c2-bus-pins {
+ samsung,pins = "gpp4-0", "gpp4-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart2_bus_single: uart2-bus-pins {
+ samsung,pins = "gpp4-0", "gpp4-1",
+ "gpp4-2", "gpp4-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi2_bus: spi2-bus-pins {
+ samsung,pins = "gpp4-0", "gpp4-1", "gpp4-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi2_cs: spi2-cs-pins {
+ samsung,pins = "gpp4-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi2_cs_func: spi2-cs-func-pins {
+ samsung,pins = "gpp4-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c1_bus: hsi2c1-bus-pins {
+ samsung,pins = "gpp2-0", "gpp2-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart1_bus_single: uart1-bus-pins {
+ samsung,pins = "gpp2-0", "gpp2-1",
+ "gpp2-2", "gpp2-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi1_bus: spi1-bus-pins {
+ samsung,pins = "gpp2-0", "gpp2-1", "gpp2-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi1_cs: spi1-cs-pins {
+ samsung,pins = "gpp2-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi1_cs_func: spi1-cs-func-pins {
+ samsung,pins = "gpp2-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+};
+
+&pinctrl_peric1 {
+ gpp20: gpp20-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp21: gpp21-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp22: gpp22-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp23: gpp23-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp24: gpp24-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp25: gpp25-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp26: gpp26-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ gpp27: gpp27-gpio-bank {
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ hsi2c13_bus: hsi2c13-bus-pins {
+ samsung,pins = "gpp25-0", "gpp25-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart13_bus_single: uart13-bus-pins {
+ samsung,pins = "gpp25-0", "gpp25-1",
+ "gpp25-2", "gpp25-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi13_bus: spi13-bus-pins {
+ samsung,pins = "gpp25-0", "gpp25-1", "gpp25-2";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi13_cs: spi13-cs-pins {
+ samsung,pins = "gpp25-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi13_cs_func: spi13-cs-func-pins {
+ samsung,pins = "gpp25-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c12_bus: hsi2c12-bus-pins {
+ samsung,pins = "gpp23-4", "gpp23-5";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart12_bus_single: uart12-bus-pins {
+ samsung,pins = "gpp23-4", "gpp23-5",
+ "gpp23-6", "gpp23-7";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi12_bus: spi12-bus-pins {
+ samsung,pins = "gpp23-4", "gpp23-5", "gpp23-6";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi14_cs2: spi14-cs2-pins {
+ samsung,pins = "gpp23-6";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi12_cs: spi12-cs-pins {
+ samsung,pins = "gpp23-7";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi12_cs_func: spi12-cs-func-pins {
+ samsung,pins = "gpp23-7";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c11_bus: hsi2c11-bus-pins {
+ samsung,pins = "gpp23-0", "gpp23-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart11_bus_single: uart11-bus-pins {
+ samsung,pins = "gpp23-0", "gpp23-1",
+ "gpp23-2", "gpp23-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi11_bus: spi11-bus-pins {
+ samsung,pins = "gpp23-0", "gpp23-1", "gpp23-2";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi11_cs: spi11-cs-pins {
+ samsung,pins = "gpp23-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi11_cs_func: spi11-cs-func-pins {
+ samsung,pins = "gpp23-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c10_bus: hsi2c10-bus-pins {
+ samsung,pins = "gpp21-0", "gpp21-1";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart10_bus_single: uart10-bus-pins {
+ samsung,pins = "gpp21-0", "gpp21-1",
+ "gpp21-2", "gpp21-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi10_bus: spi10-bus-pins {
+ samsung,pins = "gpp21-0", "gpp21-1", "gpp21-2";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi10_cs: spi10-cs-pins {
+ samsung,pins = "gpp21-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi10_cs_func: spi10-cs-func-pins {
+ samsung,pins = "gpp21-3";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c9_bus: hsi2c9-bus-pins {
+ samsung,pins = "gpp20-4", "gpp20-5";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart9_bus_single: uart9-bus-pins {
+ samsung,pins = "gpp20-4", "gpp20-5",
+ "gpp20-6", "gpp20-7";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi9_bus: spi9-bus-pins {
+ samsung,pins = "gpp20-4", "gpp20-5", "gpp20-6";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi9_cs: spi9-cs-pins {
+ samsung,pins = "gpp20-7";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi9_cs_func: spi9-cs-func-pins {
+ samsung,pins = "gpp20-7";
+ samsung,pin-function = <GS101_PIN_FUNC_2>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ hsi2c0_bus: hsi2c0-bus-pins {
+ samsung,pins = "gpp20-0", "gpp20-1";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ uart0_bus_single: uart0-bus-pins {
+ samsung,pins = "gpp20-0", "gpp20-1",
+ "gpp20-2", "gpp20-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ };
+
+ spi0_bus: spi0-bus-pins {
+ samsung,pins = "gpp20-0", "gpp20-1", "gpp20-2";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi0_cs: spi0-cs-pins {
+ samsung,pins = "gpp20-3";
+ samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+
+ spi0_cs_func: spi0-cs-func-pins {
+ samsung,pins = "gpp20-3";
+ samsung,pin-function = <GS101_PIN_FUNC_3>;
+ samsung,pin-pud = <GS101_PIN_PULL_NONE>;
+ samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.h b/sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.h
new file mode 100644
index 000000000000..b7d276b1e25a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/google/gs101-pinctrl.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Pinctrl binding constants for GS101
+ *
+ * Copyright 2020-2023 Google LLC
+ */
+
+#ifndef __DTS_ARM64_SAMSUNG_EXYNOS_GOOGLE_PINCTRL_GS101_H__
+#define __DTS_ARM64_SAMSUNG_EXYNOS_GOOGLE_PINCTRL_GS101_H__
+
+#define GS101_PIN_PULL_NONE 0
+#define GS101_PIN_PULL_DOWN 1
+#define GS101_PIN_PULL_UP 3
+
+/* Pin function in power down mode */
+#define GS101_PIN_PDN_OUT0 0
+#define GS101_PIN_PDN_OUT1 1
+#define GS101_PIN_PDN_INPUT 2
+#define GS101_PIN_PDN_PREV 3
+
+/* GS101 drive strengths */
+#define GS101_PIN_DRV_2_5_MA 0
+#define GS101_PIN_DRV_5_MA 1
+#define GS101_PIN_DRV_7_5_MA 2
+#define GS101_PIN_DRV_10_MA 3
+
+#define GS101_PIN_FUNC_INPUT 0
+#define GS101_PIN_FUNC_OUTPUT 1
+#define GS101_PIN_FUNC_2 2
+#define GS101_PIN_FUNC_3 3
+#define GS101_PIN_FUNC_EINT 0xf
+
+#endif /* __DTS_ARM64_SAMSUNG_EXYNOS_GOOGLE_PINCTRL_GS101_H__ */
diff --git a/sys/contrib/device-tree/src/arm64/exynos/google/gs101.dtsi b/sys/contrib/device-tree/src/arm64/exynos/google/gs101.dtsi
new file mode 100644
index 000000000000..d838e3a7af6e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/exynos/google/gs101.dtsi
@@ -0,0 +1,473 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * GS101 SoC
+ *
+ * Copyright 2019-2023 Google LLC
+ * Copyright 2023 Linaro Ltd - <peter.griffin@linaro.org>
+ */
+
+#include <dt-bindings/clock/google,gs101.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/samsung,exynos-usi.h>
+
+/ {
+ compatible = "google,gs101";
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ interrupt-parent = <&gic>;
+
+ aliases {
+ pinctrl0 = &pinctrl_gpio_alive;
+ pinctrl1 = &pinctrl_far_alive;
+ pinctrl2 = &pinctrl_gsacore;
+ pinctrl3 = &pinctrl_gsactrl;
+ pinctrl4 = &pinctrl_peric0;
+ pinctrl5 = &pinctrl_peric1;
+ pinctrl6 = &pinctrl_hsi1;
+ pinctrl7 = &pinctrl_hsi2;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+ core1 {
+ cpu = <&cpu1>;
+ };
+ core2 {
+ cpu = <&cpu2>;
+ };
+ core3 {
+ cpu = <&cpu3>;
+ };
+ };
+
+ cluster1 {
+ core0 {
+ cpu = <&cpu4>;
+ };
+ core1 {
+ cpu = <&cpu5>;
+ };
+ };
+
+ cluster2 {
+ core0 {
+ cpu = <&cpu6>;
+ };
+ core1 {
+ cpu = <&cpu7>;
+ };
+ };
+ };
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0000>;
+ enable-method = "psci";
+ cpu-idle-states = <&ANANKE_CPU_SLEEP>;
+ capacity-dmips-mhz = <250>;
+ dynamic-power-coefficient = <70>;
+ };
+
+ cpu1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0100>;
+ enable-method = "psci";
+ cpu-idle-states = <&ANANKE_CPU_SLEEP>;
+ capacity-dmips-mhz = <250>;
+ dynamic-power-coefficient = <70>;
+ };
+
+ cpu2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0200>;
+ enable-method = "psci";
+ cpu-idle-states = <&ANANKE_CPU_SLEEP>;
+ capacity-dmips-mhz = <250>;
+ dynamic-power-coefficient = <70>;
+ };
+
+ cpu3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0300>;
+ enable-method = "psci";
+ cpu-idle-states = <&ANANKE_CPU_SLEEP>;
+ capacity-dmips-mhz = <250>;
+ dynamic-power-coefficient = <70>;
+ };
+
+ cpu4: cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a76";
+ reg = <0x0400>;
+ enable-method = "psci";
+ cpu-idle-states = <&ENYO_CPU_SLEEP>;
+ capacity-dmips-mhz = <620>;
+ dynamic-power-coefficient = <284>;
+ };
+
+ cpu5: cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a76";
+ reg = <0x0500>;
+ enable-method = "psci";
+ cpu-idle-states = <&ENYO_CPU_SLEEP>;
+ capacity-dmips-mhz = <620>;
+ dynamic-power-coefficient = <284>;
+ };
+
+ cpu6: cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,cortex-x1";
+ reg = <0x0600>;
+ enable-method = "psci";
+ cpu-idle-states = <&HERA_CPU_SLEEP>;
+ capacity-dmips-mhz = <1024>;
+ dynamic-power-coefficient = <650>;
+ };
+
+ cpu7: cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,cortex-x1";
+ reg = <0x0700>;
+ enable-method = "psci";
+ cpu-idle-states = <&HERA_CPU_SLEEP>;
+ capacity-dmips-mhz = <1024>;
+ dynamic-power-coefficient = <650>;
+ };
+
+ idle-states {
+ entry-method = "psci";
+
+ ANANKE_CPU_SLEEP: cpu-ananke-sleep {
+ idle-state-name = "c2";
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x0010000>;
+ entry-latency-us = <70>;
+ exit-latency-us = <160>;
+ min-residency-us = <2000>;
+ };
+
+ ENYO_CPU_SLEEP: cpu-enyo-sleep {
+ idle-state-name = "c2";
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x0010000>;
+ entry-latency-us = <150>;
+ exit-latency-us = <190>;
+ min-residency-us = <2500>;
+ };
+
+ HERA_CPU_SLEEP: cpu-hera-sleep {
+ idle-state-name = "c2";
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x0010000>;
+ entry-latency-us = <235>;
+ exit-latency-us = <220>;
+ min-residency-us = <3500>;
+ };
+ };
+ };
+
+ /* TODO replace with CCF clock */
+ dummy_clk: clock-3 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <12345>;
+ clock-output-names = "pclk";
+ };
+
+ /* ect node is required to be present by bootloader */
+ ect {
+ };
+
+ ext_24_5m: clock-1 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-output-names = "oscclk";
+ };
+
+ ext_200m: clock-2 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-output-names = "ext-200m";
+ };
+
+ pmu-0 {
+ compatible = "arm,cortex-a55-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster0>;
+ };
+
+ pmu-1 {
+ compatible = "arm,cortex-a76-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster1>;
+ };
+
+ pmu-2 {
+ compatible = "arm,cortex-x1-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster2>;
+ };
+
+ pmu-3 {
+ compatible = "arm,dsu-pmu";
+ interrupts = <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH 0>;
+ cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
+ <&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges;
+
+ gsa_reserved_protected: gsa@90200000 {
+ reg = <0x0 0x90200000 0x400000>;
+ no-map;
+ };
+
+ tpu_fw_reserved: tpu-fw@93000000 {
+ reg = <0x0 0x93000000 0x1000000>;
+ no-map;
+ };
+
+ aoc_reserve: aoc@94000000 {
+ reg = <0x0 0x94000000 0x03000000>;
+ no-map;
+ };
+
+ abl_reserved: abl@f8800000 {
+ reg = <0x0 0xf8800000 0x02000000>;
+ no-map;
+ };
+
+ dss_log_reserved: dss-log-reserved@fd3f0000 {
+ reg = <0x0 0xfd3f0000 0x0000e000>;
+ no-map;
+ };
+
+ debug_kinfo_reserved: debug-kinfo-reserved@fd3fe000 {
+ reg = <0x0 0xfd3fe000 0x00001000>;
+ no-map;
+ };
+
+ bldr_log_reserved: bldr-log-reserved@fd800000 {
+ reg = <0x0 0xfd800000 0x00100000>;
+ no-map;
+ };
+
+ bldr_log_hist_reserved: bldr-log-hist-reserved@fd900000 {
+ reg = <0x0 0xfd900000 0x00002000>;
+ no-map;
+ };
+ };
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x0 0x0 0x40000000>;
+
+ cmu_misc: clock-controller@10010000 {
+ compatible = "google,gs101-cmu-misc";
+ reg = <0x10010000 0x8000>;
+ #clock-cells = <1>;
+ clocks = <&cmu_top CLK_DOUT_CMU_MISC_BUS>,
+ <&cmu_top CLK_DOUT_CMU_MISC_SSS>;
+ clock-names = "bus", "sss";
+ };
+
+ watchdog_cl0: watchdog@10060000 {
+ compatible = "google,gs101-wdt";
+ reg = <0x10060000 0x100>;
+ interrupts = <GIC_SPI 765 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cmu_misc CLK_GOUT_MISC_WDT_CLUSTER0_PCLK>,
+ <&ext_24_5m>;
+ clock-names = "watchdog", "watchdog_src";
+ samsung,syscon-phandle = <&pmu_system_controller>;
+ samsung,cluster-index = <0>;
+ status = "disabled";
+ };
+
+ watchdog_cl1: watchdog@10070000 {
+ compatible = "google,gs101-wdt";
+ reg = <0x10070000 0x100>;
+ interrupts = <GIC_SPI 766 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cmu_misc CLK_GOUT_MISC_WDT_CLUSTER1_PCLK>,
+ <&ext_24_5m>;
+ clock-names = "watchdog", "watchdog_src";
+ samsung,syscon-phandle = <&pmu_system_controller>;
+ samsung,cluster-index = <1>;
+ status = "disabled";
+ };
+
+ gic: interrupt-controller@10400000 {
+ compatible = "arm,gic-v3";
+ #interrupt-cells = <4>;
+ interrupt-controller;
+ reg = <0x10400000 0x10000>, /* GICD */
+ <0x10440000 0x100000>;/* GICR * 8 */
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+
+ ppi-partitions {
+ ppi_cluster0: interrupt-partition-0 {
+ affinity = <&cpu0 &cpu1 &cpu2 &cpu3>;
+ };
+
+ ppi_cluster1: interrupt-partition-1 {
+ affinity = <&cpu4 &cpu5>;
+ };
+
+ ppi_cluster2: interrupt-partition-2 {
+ affinity = <&cpu6 &cpu7>;
+ };
+ };
+ };
+
+ sysreg_peric0: syscon@10820000 {
+ compatible = "google,gs101-peric0-sysreg", "syscon";
+ reg = <0x10820000 0x10000>;
+ };
+
+ pinctrl_peric0: pinctrl@10840000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x10840000 0x00001000>;
+ interrupts = <GIC_SPI 625 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ usi_uart: usi@10a000c0 {
+ compatible = "google,gs101-usi",
+ "samsung,exynos850-usi";
+ reg = <0x10a000c0 0x20>;
+ ranges;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ clocks = <&dummy_clk>, <&dummy_clk>;
+ clock-names = "pclk", "ipclk";
+ samsung,sysreg = <&sysreg_peric0 0x1020>;
+ samsung,mode = <USI_V2_UART>;
+ status = "disabled";
+
+ serial_0: serial@10a00000 {
+ compatible = "google,gs101-uart";
+ reg = <0x10a00000 0xc0>;
+ reg-io-width = <4>;
+ interrupts = <GIC_SPI 634
+ IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&dummy_clk 0>, <&dummy_clk 0>;
+ clock-names = "uart", "clk_uart_baud0";
+ samsung,uart-fifosize = <256>;
+ status = "disabled";
+ };
+ };
+
+ sysreg_peric1: syscon@10c20000 {
+ compatible = "google,gs101-peric1-sysreg", "syscon";
+ reg = <0x10c20000 0x10000>;
+ };
+
+ pinctrl_peric1: pinctrl@10c40000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x10c40000 0x00001000>;
+ interrupts = <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ pinctrl_hsi1: pinctrl@11840000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x11840000 0x00001000>;
+ interrupts = <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ pinctrl_hsi2: pinctrl@14440000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x14440000 0x00001000>;
+ interrupts = <GIC_SPI 503 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ cmu_apm: clock-controller@17400000 {
+ compatible = "google,gs101-cmu-apm";
+ reg = <0x17400000 0x8000>;
+ #clock-cells = <1>;
+
+ clocks = <&ext_24_5m>;
+ clock-names = "oscclk";
+ };
+
+ sysreg_apm: syscon@174204e0 {
+ compatible = "google,gs101-apm-sysreg", "syscon";
+ reg = <0x174204e0 0x1000>;
+ };
+
+ pmu_system_controller: system-controller@17460000 {
+ compatible = "google,gs101-pmu", "syscon";
+ reg = <0x17460000 0x10000>;
+ };
+
+ pinctrl_gpio_alive: pinctrl@174d0000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x174d0000 0x00001000>;
+
+ wakeup-interrupt-controller {
+ compatible = "google,gs101-wakeup-eint",
+ "samsung,exynos850-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
+ };
+ };
+
+ pinctrl_far_alive: pinctrl@174e0000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x174e0000 0x00001000>;
+
+ wakeup-interrupt-controller {
+ compatible = "google,gs101-wakeup-eint",
+ "samsung,exynos850-wakeup-eint",
+ "samsung,exynos7-wakeup-eint";
+ };
+ };
+
+ pinctrl_gsactrl: pinctrl@17940000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x17940000 0x00001000>;
+ };
+
+ pinctrl_gsacore: pinctrl@17a80000 {
+ compatible = "google,gs101-pinctrl";
+ reg = <0x17a80000 0x00001000>;
+ };
+
+ cmu_top: clock-controller@1e080000 {
+ compatible = "google,gs101-cmu-top";
+ reg = <0x1e080000 0x8000>;
+ #clock-cells = <1>;
+
+ clocks = <&ext_24_5m>;
+ clock-names = "oscclk";
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts =
+ <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW) 0>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW) 0>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW) 0>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW) 0>;
+ };
+};
+
+#include "gs101-pinctrl.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1012a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1012a.dtsi
index a863022529ac..1e3fe3897b52 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1012a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1012a.dtsi
@@ -307,46 +307,46 @@
reg = <0x0 0x1f00000 0x0 0x10000>;
interrupts = <0 33 0x4>;
fsl,tmu-range = <0xb0000 0x9002a 0x6004c 0x60062>;
- fsl,tmu-calibration = <0x00000000 0x00000025
- 0x00000001 0x0000002c
- 0x00000002 0x00000032
- 0x00000003 0x00000039
- 0x00000004 0x0000003f
- 0x00000005 0x00000046
- 0x00000006 0x0000004c
- 0x00000007 0x00000053
- 0x00000008 0x00000059
- 0x00000009 0x0000005f
- 0x0000000a 0x00000066
- 0x0000000b 0x0000006c
-
- 0x00010000 0x00000026
- 0x00010001 0x0000002d
- 0x00010002 0x00000035
- 0x00010003 0x0000003d
- 0x00010004 0x00000045
- 0x00010005 0x0000004d
- 0x00010006 0x00000055
- 0x00010007 0x0000005d
- 0x00010008 0x00000065
- 0x00010009 0x0000006d
-
- 0x00020000 0x00000026
- 0x00020001 0x00000030
- 0x00020002 0x0000003a
- 0x00020003 0x00000044
- 0x00020004 0x0000004e
- 0x00020005 0x00000059
- 0x00020006 0x00000063
-
- 0x00030000 0x00000014
- 0x00030001 0x00000021
- 0x00030002 0x0000002e
- 0x00030003 0x0000003a
- 0x00030004 0x00000047
- 0x00030005 0x00000053
- 0x00030006 0x00000060>;
- big-endian;
+ fsl,tmu-calibration =
+ <0x00000000 0x00000025>,
+ <0x00000001 0x0000002c>,
+ <0x00000002 0x00000032>,
+ <0x00000003 0x00000039>,
+ <0x00000004 0x0000003f>,
+ <0x00000005 0x00000046>,
+ <0x00000006 0x0000004c>,
+ <0x00000007 0x00000053>,
+ <0x00000008 0x00000059>,
+ <0x00000009 0x0000005f>,
+ <0x0000000a 0x00000066>,
+ <0x0000000b 0x0000006c>,
+
+ <0x00010000 0x00000026>,
+ <0x00010001 0x0000002d>,
+ <0x00010002 0x00000035>,
+ <0x00010003 0x0000003d>,
+ <0x00010004 0x00000045>,
+ <0x00010005 0x0000004d>,
+ <0x00010006 0x00000055>,
+ <0x00010007 0x0000005d>,
+ <0x00010008 0x00000065>,
+ <0x00010009 0x0000006d>,
+
+ <0x00020000 0x00000026>,
+ <0x00020001 0x00000030>,
+ <0x00020002 0x0000003a>,
+ <0x00020003 0x00000044>,
+ <0x00020004 0x0000004e>,
+ <0x00020005 0x00000059>,
+ <0x00020006 0x00000063>,
+
+ <0x00030000 0x00000014>,
+ <0x00030001 0x00000021>,
+ <0x00030002 0x0000002e>,
+ <0x00030003 0x0000003a>,
+ <0x00030004 0x00000047>,
+ <0x00030005 0x00000053>,
+ <0x00030006 0x00000060>;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dts
index 73eb6061c73e..af9194eca556 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dts
@@ -56,10 +56,14 @@
};
&enetc_port2 {
+ nvmem-cells = <&base_mac_address 2>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
&enetc_port3 {
+ nvmem-cells = <&base_mac_address 3>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -80,6 +84,8 @@
managed = "in-band-status";
phy-handle = <&qsgmii_phy0>;
phy-mode = "qsgmii";
+ nvmem-cells = <&base_mac_address 4>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -88,6 +94,8 @@
managed = "in-band-status";
phy-handle = <&qsgmii_phy1>;
phy-mode = "qsgmii";
+ nvmem-cells = <&base_mac_address 5>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -96,6 +104,8 @@
managed = "in-band-status";
phy-handle = <&qsgmii_phy2>;
phy-mode = "qsgmii";
+ nvmem-cells = <&base_mac_address 6>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -104,6 +114,8 @@
managed = "in-band-status";
phy-handle = <&qsgmii_phy3>;
phy-mode = "qsgmii";
+ nvmem-cells = <&base_mac_address 7>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var1.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var1.dts
index 7cd29ab970d9..1f34c7553459 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var1.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var1.dts
@@ -55,5 +55,7 @@
&enetc_port1 {
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
+ nvmem-cells = <&base_mac_address 0>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var2.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var2.dts
index 113b1df74bf8..aac41192caa1 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var2.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var2.dts
@@ -36,10 +36,14 @@
};
&enetc_port2 {
+ nvmem-cells = <&base_mac_address 2>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
&enetc_port3 {
+ nvmem-cells = <&base_mac_address 3>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -52,6 +56,8 @@
managed = "in-band-status";
phy-handle = <&phy0>;
phy-mode = "sgmii";
+ nvmem-cells = <&base_mac_address 0>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -60,6 +66,8 @@
managed = "in-band-status";
phy-handle = <&phy1>;
phy-mode = "sgmii";
+ nvmem-cells = <&base_mac_address 1>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var4.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var4.dts
index 9b5e92fb753e..a4421db3784e 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var4.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28-var4.dts
@@ -43,5 +43,7 @@
&enetc_port1 {
phy-handle = <&phy1>;
phy-mode = "rgmii-id";
+ nvmem-cells = <&base_mac_address 1>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28.dts
index 4ab17b984b03..8b65af4a7147 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a-kontron-sl28.dts
@@ -92,6 +92,8 @@
phy-handle = <&phy0>;
phy-mode = "sgmii";
managed = "in-band-status";
+ nvmem-cells = <&base_mac_address 0>;
+ nvmem-cell-names = "mac-address";
status = "okay";
};
@@ -154,6 +156,21 @@
label = "bootloader environment";
};
};
+
+ otp-1 {
+ compatible = "user-otp";
+
+ nvmem-layout {
+ compatible = "kontron,sl28-vpd";
+
+ serial_number: serial-number {
+ };
+
+ base_mac_address: base-mac-address {
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi
index 9cbb31191cf9..ae534c23b970 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi
@@ -28,6 +28,12 @@
reg = <0x0>;
enable-method = "psci";
clocks = <&clockgen QORIQ_CLK_CMUX 0>;
+ i-cache-size = <0xc000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
next-level-cache = <&l2>;
cpu-idle-states = <&CPU_PW20>;
#cooling-cells = <2>;
@@ -39,6 +45,12 @@
reg = <0x1>;
enable-method = "psci";
clocks = <&clockgen QORIQ_CLK_CMUX 0>;
+ i-cache-size = <0xc000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
next-level-cache = <&l2>;
cpu-idle-states = <&CPU_PW20>;
#cooling-cells = <2>;
@@ -48,6 +60,9 @@
compatible = "cache";
cache-level = <2>;
cache-unified;
+ cache-size = <0x100000>;
+ cache-line-size = <64>;
+ cache-sets = <1024>;
};
};
@@ -1011,49 +1026,50 @@
reg = <0x0 0x1f80000 0x0 0x10000>;
interrupts = <0 23 0x4>;
fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>;
- fsl,tmu-calibration = <0x00000000 0x00000024
- 0x00000001 0x0000002b
- 0x00000002 0x00000031
- 0x00000003 0x00000038
- 0x00000004 0x0000003f
- 0x00000005 0x00000045
- 0x00000006 0x0000004c
- 0x00000007 0x00000053
- 0x00000008 0x00000059
- 0x00000009 0x00000060
- 0x0000000a 0x00000066
- 0x0000000b 0x0000006d
-
- 0x00010000 0x0000001c
- 0x00010001 0x00000024
- 0x00010002 0x0000002c
- 0x00010003 0x00000035
- 0x00010004 0x0000003d
- 0x00010005 0x00000045
- 0x00010006 0x0000004d
- 0x00010007 0x00000055
- 0x00010008 0x0000005e
- 0x00010009 0x00000066
- 0x0001000a 0x0000006e
-
- 0x00020000 0x00000018
- 0x00020001 0x00000022
- 0x00020002 0x0000002d
- 0x00020003 0x00000038
- 0x00020004 0x00000043
- 0x00020005 0x0000004d
- 0x00020006 0x00000058
- 0x00020007 0x00000063
- 0x00020008 0x0000006e
-
- 0x00030000 0x00000010
- 0x00030001 0x0000001c
- 0x00030002 0x00000029
- 0x00030003 0x00000036
- 0x00030004 0x00000042
- 0x00030005 0x0000004f
- 0x00030006 0x0000005b
- 0x00030007 0x00000068>;
+ fsl,tmu-calibration =
+ <0x00000000 0x00000024>,
+ <0x00000001 0x0000002b>,
+ <0x00000002 0x00000031>,
+ <0x00000003 0x00000038>,
+ <0x00000004 0x0000003f>,
+ <0x00000005 0x00000045>,
+ <0x00000006 0x0000004c>,
+ <0x00000007 0x00000053>,
+ <0x00000008 0x00000059>,
+ <0x00000009 0x00000060>,
+ <0x0000000a 0x00000066>,
+ <0x0000000b 0x0000006d>,
+
+ <0x00010000 0x0000001c>,
+ <0x00010001 0x00000024>,
+ <0x00010002 0x0000002c>,
+ <0x00010003 0x00000035>,
+ <0x00010004 0x0000003d>,
+ <0x00010005 0x00000045>,
+ <0x00010006 0x0000004d>,
+ <0x00010007 0x00000055>,
+ <0x00010008 0x0000005e>,
+ <0x00010009 0x00000066>,
+ <0x0001000a 0x0000006e>,
+
+ <0x00020000 0x00000018>,
+ <0x00020001 0x00000022>,
+ <0x00020002 0x0000002d>,
+ <0x00020003 0x00000038>,
+ <0x00020004 0x00000043>,
+ <0x00020005 0x0000004d>,
+ <0x00020006 0x00000058>,
+ <0x00020007 0x00000063>,
+ <0x00020008 0x0000006e>,
+
+ <0x00030000 0x00000010>,
+ <0x00030001 0x0000001c>,
+ <0x00030002 0x00000029>,
+ <0x00030003 0x00000036>,
+ <0x00030004 0x00000042>,
+ <0x00030005 0x0000004f>,
+ <0x00030006 0x0000005b>,
+ <0x00030007 0x00000068>;
little-endian;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a-mbls10xxa.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a-mbls10xxa.dts
new file mode 100644
index 000000000000..03748a7f657b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a-mbls10xxa.dts
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+#include "fsl-ls1043a-tqmls1043a.dtsi"
+#include "tqmls10xxa-mbls10xxa.dtsi"
+
+/ {
+ model = "TQ-Systems GmbH LS1043A TQMLS1043A SoM on MBLS10xxA board";
+ compatible = "tq,ls1043a-tqmls1043a-mbls10xxa", "tq,ls1043a-tqmls1043a",
+ "fsl,ls1043a";
+
+ aliases {
+ qsgmii-s1-p1 = &qsgmii1_phy1;
+ qsgmii-s1-p2 = &qsgmii1_phy2;
+ qsgmii-s1-p3 = &qsgmii1_phy3;
+ qsgmii-s1-p4 = &qsgmii1_phy4;
+ qsgmii-s2-p1 = &qsgmii2_phy1;
+ qsgmii-s2-p2 = &qsgmii2_phy2;
+ qsgmii-s2-p3 = &qsgmii2_phy3;
+ qsgmii-s2-p4 = &qsgmii2_phy4;
+ serial0 = &duart0;
+ serial1 = &duart1;
+ };
+
+ chosen {
+ stdout-path = &duart1;
+ };
+};
+
+&esdhc {
+ cd-gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
+};
+
+&usb2 {
+ status = "okay";
+};
+
+#include "fsl-ls1043-post.dtsi"
+#include "tqmls104xa-mbls10xxa-fman.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a.dtsi
new file mode 100644
index 000000000000..12d5f3938e5d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a-tqmls1043a.dtsi
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for LS1043A based SoM of TQ
+ */
+
+#include "fsl-ls1043a.dtsi"
+#include "tqmls10xxa.dtsi"
+
+&qspi {
+ num-cs = <2>;
+ status = "okay";
+
+ qflash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <62500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a.dtsi
index f8acbefc805b..d333b773bc45 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1043a.dtsi
@@ -447,46 +447,47 @@
reg = <0x0 0x1f00000 0x0 0x10000>;
interrupts = <0 33 0x4>;
fsl,tmu-range = <0xb0000 0x9002a 0x6004c 0x70062>;
- fsl,tmu-calibration = <0x00000000 0x00000023
- 0x00000001 0x0000002a
- 0x00000002 0x00000031
- 0x00000003 0x00000037
- 0x00000004 0x0000003e
- 0x00000005 0x00000044
- 0x00000006 0x0000004b
- 0x00000007 0x00000051
- 0x00000008 0x00000058
- 0x00000009 0x0000005e
- 0x0000000a 0x00000065
- 0x0000000b 0x0000006b
-
- 0x00010000 0x00000023
- 0x00010001 0x0000002b
- 0x00010002 0x00000033
- 0x00010003 0x0000003b
- 0x00010004 0x00000043
- 0x00010005 0x0000004b
- 0x00010006 0x00000054
- 0x00010007 0x0000005c
- 0x00010008 0x00000064
- 0x00010009 0x0000006c
-
- 0x00020000 0x00000021
- 0x00020001 0x0000002c
- 0x00020002 0x00000036
- 0x00020003 0x00000040
- 0x00020004 0x0000004b
- 0x00020005 0x00000055
- 0x00020006 0x0000005f
-
- 0x00030000 0x00000013
- 0x00030001 0x0000001d
- 0x00030002 0x00000028
- 0x00030003 0x00000032
- 0x00030004 0x0000003d
- 0x00030005 0x00000047
- 0x00030006 0x00000052
- 0x00030007 0x0000005c>;
+ fsl,tmu-calibration =
+ <0x00000000 0x00000023>,
+ <0x00000001 0x0000002a>,
+ <0x00000002 0x00000031>,
+ <0x00000003 0x00000037>,
+ <0x00000004 0x0000003e>,
+ <0x00000005 0x00000044>,
+ <0x00000006 0x0000004b>,
+ <0x00000007 0x00000051>,
+ <0x00000008 0x00000058>,
+ <0x00000009 0x0000005e>,
+ <0x0000000a 0x00000065>,
+ <0x0000000b 0x0000006b>,
+
+ <0x00010000 0x00000023>,
+ <0x00010001 0x0000002b>,
+ <0x00010002 0x00000033>,
+ <0x00010003 0x0000003b>,
+ <0x00010004 0x00000043>,
+ <0x00010005 0x0000004b>,
+ <0x00010006 0x00000054>,
+ <0x00010007 0x0000005c>,
+ <0x00010008 0x00000064>,
+ <0x00010009 0x0000006c>,
+
+ <0x00020000 0x00000021>,
+ <0x00020001 0x0000002c>,
+ <0x00020002 0x00000036>,
+ <0x00020003 0x00000040>,
+ <0x00020004 0x0000004b>,
+ <0x00020005 0x00000055>,
+ <0x00020006 0x0000005f>,
+
+ <0x00030000 0x00000013>,
+ <0x00030001 0x0000001d>,
+ <0x00030002 0x00000028>,
+ <0x00030003 0x00000032>,
+ <0x00030004 0x0000003d>,
+ <0x00030005 0x00000047>,
+ <0x00030006 0x00000052>,
+ <0x00030007 0x0000005c>;
#thermal-sensor-cells = <1>;
};
@@ -526,20 +527,6 @@
status = "disabled";
};
- dspi1: spi@2110000 {
- compatible = "fsl,ls1043a-dspi", "fsl,ls1021a-v1.0-dspi";
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x0 0x2110000 0x0 0x10000>;
- interrupts = <0 65 0x4>;
- clock-names = "dspi";
- clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
- QORIQ_CLK_PLL_DIV(1)>;
- spi-num-chipselects = <5>;
- big-endian;
- status = "disabled";
- };
-
i2c0: i2c@2180000 {
compatible = "fsl,ls1043a-i2c", "fsl,vf610-i2c";
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a-mbls10xxa.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a-mbls10xxa.dts
new file mode 100644
index 000000000000..37834ae3deac
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a-mbls10xxa.dts
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+#include "fsl-ls1046a-tqmls1046a.dtsi"
+#include "tqmls10xxa-mbls10xxa.dtsi"
+
+/ {
+ model = "TQ-Systems GmbH LS1046A TQMLS1046A SoM on MBLS10xxA board";
+ compatible = "tq,ls1046a-tqmls1046a-mbls10xxa", "tq,ls1046a-tqmls1046a",
+ "fsl,ls1046a";
+
+ aliases {
+ qsgmii-s1-p1 = &qsgmii1_phy1;
+ qsgmii-s1-p2 = &qsgmii1_phy2;
+ qsgmii-s1-p3 = &qsgmii1_phy3;
+ qsgmii-s1-p4 = &qsgmii1_phy4;
+ qsgmii-s2-p1 = &qsgmii2_phy1;
+ qsgmii-s2-p2 = &qsgmii2_phy2;
+ qsgmii-s2-p3 = &qsgmii2_phy3;
+ qsgmii-s2-p4 = &qsgmii2_phy4;
+ serial0 = &duart0;
+ serial1 = &duart1;
+ };
+
+ chosen {
+ stdout-path = &duart1;
+ };
+};
+
+&dspi {
+ status = "okay";
+};
+
+&esdhc {
+ cd-gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
+};
+
+&usb2 {
+ status = "okay";
+};
+
+#include "fsl-ls1046-post.dtsi"
+#include "tqmls104xa-mbls10xxa-fman.dtsi"
+
+&enet7 {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a.dtsi
new file mode 100644
index 000000000000..4a8f8bc688f5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a-tqmls1046a.dtsi
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for LS1046A based SoM of TQ
+ */
+
+#include "fsl-ls1046a.dtsi"
+#include "tqmls10xxa.dtsi"
+
+&qspi {
+ num-cs = <2>;
+ status = "okay";
+
+ qflash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <62500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ };
+
+ qflash1: flash@1 {
+ compatible = "jedec,spi-nor";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <62500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a.dtsi
index 50f68ca5a9af..1515cec23147 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1046a.dtsi
@@ -445,46 +445,46 @@
fsl,tmu-range = <0xb0000 0x9002a 0x6004c 0x70062>;
fsl,tmu-calibration =
/* Calibration data group 1 */
- <0x00000000 0x00000023
- 0x00000001 0x00000029
- 0x00000002 0x0000002f
- 0x00000003 0x00000036
- 0x00000004 0x0000003c
- 0x00000005 0x00000042
- 0x00000006 0x00000049
- 0x00000007 0x0000004f
- 0x00000008 0x00000055
- 0x00000009 0x0000005c
- 0x0000000a 0x00000062
- 0x0000000b 0x00000068
+ <0x00000000 0x00000023>,
+ <0x00000001 0x00000029>,
+ <0x00000002 0x0000002f>,
+ <0x00000003 0x00000036>,
+ <0x00000004 0x0000003c>,
+ <0x00000005 0x00000042>,
+ <0x00000006 0x00000049>,
+ <0x00000007 0x0000004f>,
+ <0x00000008 0x00000055>,
+ <0x00000009 0x0000005c>,
+ <0x0000000a 0x00000062>,
+ <0x0000000b 0x00000068>,
/* Calibration data group 2 */
- 0x00010000 0x00000022
- 0x00010001 0x0000002a
- 0x00010002 0x00000032
- 0x00010003 0x0000003a
- 0x00010004 0x00000042
- 0x00010005 0x0000004a
- 0x00010006 0x00000052
- 0x00010007 0x0000005a
- 0x00010008 0x00000062
- 0x00010009 0x0000006a
+ <0x00010000 0x00000022>,
+ <0x00010001 0x0000002a>,
+ <0x00010002 0x00000032>,
+ <0x00010003 0x0000003a>,
+ <0x00010004 0x00000042>,
+ <0x00010005 0x0000004a>,
+ <0x00010006 0x00000052>,
+ <0x00010007 0x0000005a>,
+ <0x00010008 0x00000062>,
+ <0x00010009 0x0000006a>,
/* Calibration data group 3 */
- 0x00020000 0x00000021
- 0x00020001 0x0000002b
- 0x00020002 0x00000035
- 0x00020003 0x0000003e
- 0x00020004 0x00000048
- 0x00020005 0x00000052
- 0x00020006 0x0000005c
+ <0x00020000 0x00000021>,
+ <0x00020001 0x0000002b>,
+ <0x00020002 0x00000035>,
+ <0x00020003 0x0000003e>,
+ <0x00020004 0x00000048>,
+ <0x00020005 0x00000052>,
+ <0x00020006 0x0000005c>,
/* Calibration data group 4 */
- 0x00030000 0x00000011
- 0x00030001 0x0000001a
- 0x00030002 0x00000024
- 0x00030003 0x0000002e
- 0x00030004 0x00000038
- 0x00030005 0x00000042
- 0x00030006 0x0000004c
- 0x00030007 0x00000056>;
+ <0x00030000 0x00000011>,
+ <0x00030001 0x0000001a>,
+ <0x00030002 0x00000024>,
+ <0x00030003 0x0000002e>,
+ <0x00030004 0x00000038>,
+ <0x00030005 0x00000042>,
+ <0x00030006 0x0000004c>,
+ <0x00030007 0x00000056>;
big-endian;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a-mbls10xxa.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a-mbls10xxa.dts
new file mode 100644
index 000000000000..e567918f6afc
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a-mbls10xxa.dts
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+#include "fsl-ls1088a-tqmls1088a.dtsi"
+#include "tqmls10xxa-mbls10xxa.dtsi"
+
+/ {
+ model = "TQ-Systems GmbH LS1088A TQMLS1088A SoM on MBLS10xxA board";
+ compatible = "tq,ls1088a-tqmls1088a-mbls10xxa", "tq,ls1088a-tqmls1088a",
+ "fsl,ls1088a";
+
+ aliases {
+ dpmac1 = &dpmac1;
+ dpmac2 = &dpmac2;
+ dpmac3 = &dpmac3;
+ dpmac4 = &dpmac4;
+ dpmac5 = &dpmac5;
+ dpmac6 = &dpmac6;
+ dpmac7 = &dpmac7;
+ dpmac8 = &dpmac8;
+ dpmac9 = &dpmac9;
+ dpmac10 = &dpmac10;
+ qsgmii-s1-p1 = &qsgmii1_phy1;
+ qsgmii-s1-p2 = &qsgmii1_phy2;
+ qsgmii-s1-p3 = &qsgmii1_phy3;
+ qsgmii-s1-p4 = &qsgmii1_phy4;
+ qsgmii-s2-p1 = &qsgmii2_phy1;
+ qsgmii-s2-p2 = &qsgmii2_phy2;
+ qsgmii-s2-p3 = &qsgmii2_phy3;
+ qsgmii-s2-p4 = &qsgmii2_phy4;
+ rgmii-s1 = &rgmii_phy1;
+ rgmii-s2 = &rgmii_phy2;
+ serial0 = &duart0;
+ serial1 = &duart1;
+ };
+
+ chosen {
+ stdout-path = &duart1;
+ };
+};
+
+&esdhc {
+ cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+};
+
+&sfp1_i2c {
+ status = "okay";
+};
+
+&sfp2_i2c {
+ status = "okay";
+};
+
+#include "tqmls1088a-mbls10xxa-mc.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a.dtsi
new file mode 100644
index 000000000000..9a0f21484be9
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a-tqmls1088a.dtsi
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for LS1088A based SoM of TQ
+ */
+
+#include "fsl-ls1088a.dtsi"
+#include "tqmls10xxa.dtsi"
+
+&qspi {
+ num-cs = <2>;
+ status = "okay";
+
+ qflash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <62500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ };
+
+ qflash1: flash@1 {
+ compatible = "jedec,spi-nor";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <62500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a.dtsi
index 8f6090a9aef2..8616d5e0c388 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1088a.dtsi
@@ -284,46 +284,46 @@
fsl,tmu-range = <0xb0000 0x9002a 0x6004c 0x70062>;
fsl,tmu-calibration =
/* Calibration data group 1 */
- <0x00000000 0x00000023
- 0x00000001 0x0000002a
- 0x00000002 0x00000030
- 0x00000003 0x00000037
- 0x00000004 0x0000003d
- 0x00000005 0x00000044
- 0x00000006 0x0000004a
- 0x00000007 0x00000051
- 0x00000008 0x00000057
- 0x00000009 0x0000005e
- 0x0000000a 0x00000064
- 0x0000000b 0x0000006b
+ <0x00000000 0x00000023>,
+ <0x00000001 0x0000002a>,
+ <0x00000002 0x00000030>,
+ <0x00000003 0x00000037>,
+ <0x00000004 0x0000003d>,
+ <0x00000005 0x00000044>,
+ <0x00000006 0x0000004a>,
+ <0x00000007 0x00000051>,
+ <0x00000008 0x00000057>,
+ <0x00000009 0x0000005e>,
+ <0x0000000a 0x00000064>,
+ <0x0000000b 0x0000006b>,
/* Calibration data group 2 */
- 0x00010000 0x00000022
- 0x00010001 0x0000002a
- 0x00010002 0x00000032
- 0x00010003 0x0000003a
- 0x00010004 0x00000042
- 0x00010005 0x0000004a
- 0x00010006 0x00000052
- 0x00010007 0x0000005a
- 0x00010008 0x00000062
- 0x00010009 0x0000006a
+ <0x00010000 0x00000022>,
+ <0x00010001 0x0000002a>,
+ <0x00010002 0x00000032>,
+ <0x00010003 0x0000003a>,
+ <0x00010004 0x00000042>,
+ <0x00010005 0x0000004a>,
+ <0x00010006 0x00000052>,
+ <0x00010007 0x0000005a>,
+ <0x00010008 0x00000062>,
+ <0x00010009 0x0000006a>,
/* Calibration data group 3 */
- 0x00020000 0x00000021
- 0x00020001 0x0000002b
- 0x00020002 0x00000035
- 0x00020003 0x00000040
- 0x00020004 0x0000004a
- 0x00020005 0x00000054
- 0x00020006 0x0000005e
+ <0x00020000 0x00000021>,
+ <0x00020001 0x0000002b>,
+ <0x00020002 0x00000035>,
+ <0x00020003 0x00000040>,
+ <0x00020004 0x0000004a>,
+ <0x00020005 0x00000054>,
+ <0x00020006 0x0000005e>,
/* Calibration data group 4 */
- 0x00030000 0x00000010
- 0x00030001 0x0000001c
- 0x00030002 0x00000027
- 0x00030003 0x00000032
- 0x00030004 0x0000003e
- 0x00030005 0x00000049
- 0x00030006 0x00000054
- 0x00030007 0x00000060>;
+ <0x00030000 0x00000010>,
+ <0x00030001 0x0000001c>,
+ <0x00030002 0x00000027>,
+ <0x00030003 0x00000032>,
+ <0x00030004 0x0000003e>,
+ <0x00030005 0x00000049>,
+ <0x00030006 0x00000054>,
+ <0x00030007 0x00000060>;
little-endian;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa-qds.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa-qds.dtsi
index 52c5a43b30a0..e2c94da6d6e8 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa-qds.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa-qds.dtsi
@@ -69,7 +69,7 @@
mdio-parent-bus = <&emdio1>;
reg = <0x54 1>; /* BRDCFG4 */
mux-mask = <0xe0>; /* EMI1_MDIO */
- #address-cells=<1>;
+ #address-cells = <1>;
#size-cells = <0>;
/* Child MDIO buses, one for each riser card:
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa.dtsi
index d2f5345d0560..0b7292835906 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls208xa.dtsi
@@ -321,42 +321,43 @@
reg = <0x0 0x1f80000 0x0 0x10000>;
interrupts = <0 23 0x4>;
fsl,tmu-range = <0xb0000 0x9002a 0x6004c 0x30062>;
- fsl,tmu-calibration = <0x00000000 0x00000026
- 0x00000001 0x0000002d
- 0x00000002 0x00000032
- 0x00000003 0x00000039
- 0x00000004 0x0000003f
- 0x00000005 0x00000046
- 0x00000006 0x0000004d
- 0x00000007 0x00000054
- 0x00000008 0x0000005a
- 0x00000009 0x00000061
- 0x0000000a 0x0000006a
- 0x0000000b 0x00000071
-
- 0x00010000 0x00000025
- 0x00010001 0x0000002c
- 0x00010002 0x00000035
- 0x00010003 0x0000003d
- 0x00010004 0x00000045
- 0x00010005 0x0000004e
- 0x00010006 0x00000057
- 0x00010007 0x00000061
- 0x00010008 0x0000006b
- 0x00010009 0x00000076
-
- 0x00020000 0x00000029
- 0x00020001 0x00000033
- 0x00020002 0x0000003d
- 0x00020003 0x00000049
- 0x00020004 0x00000056
- 0x00020005 0x00000061
- 0x00020006 0x0000006d
-
- 0x00030000 0x00000021
- 0x00030001 0x0000002a
- 0x00030002 0x0000003c
- 0x00030003 0x0000004e>;
+ fsl,tmu-calibration =
+ <0x00000000 0x00000026>,
+ <0x00000001 0x0000002d>,
+ <0x00000002 0x00000032>,
+ <0x00000003 0x00000039>,
+ <0x00000004 0x0000003f>,
+ <0x00000005 0x00000046>,
+ <0x00000006 0x0000004d>,
+ <0x00000007 0x00000054>,
+ <0x00000008 0x0000005a>,
+ <0x00000009 0x00000061>,
+ <0x0000000a 0x0000006a>,
+ <0x0000000b 0x00000071>,
+
+ <0x00010000 0x00000025>,
+ <0x00010001 0x0000002c>,
+ <0x00010002 0x00000035>,
+ <0x00010003 0x0000003d>,
+ <0x00010004 0x00000045>,
+ <0x00010005 0x0000004e>,
+ <0x00010006 0x00000057>,
+ <0x00010007 0x00000061>,
+ <0x00010008 0x0000006b>,
+ <0x00010009 0x00000076>,
+
+ <0x00020000 0x00000029>,
+ <0x00020001 0x00000033>,
+ <0x00020002 0x0000003d>,
+ <0x00020003 0x00000049>,
+ <0x00020004 0x00000056>,
+ <0x00020005 0x00000061>,
+ <0x00020006 0x0000006d>,
+
+ <0x00030000 0x00000021>,
+ <0x00030001 0x0000002a>,
+ <0x00030002 0x0000003c>,
+ <0x00030003 0x0000004e>;
little-endian;
#thermal-sensor-cells = <1>;
};
@@ -1186,26 +1187,34 @@
dma-coherent;
};
- usb0: usb@3100000 {
- status = "disabled";
- compatible = "snps,dwc3";
- reg = <0x0 0x3100000 0x0 0x10000>;
- interrupts = <0 80 0x4>; /* Level high type */
- dr_mode = "host";
- snps,quirk-frame-length-adjustment = <0x20>;
- snps,dis_rxdet_inp3_quirk;
- snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
- };
+ bus: bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "simple-bus";
+ ranges;
+ dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x00000000>;
+
+ usb0: usb@3100000 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0x3100000 0x0 0x10000>;
+ interrupts = <0 80 0x4>; /* Level high type */
+ dr_mode = "host";
+ snps,quirk-frame-length-adjustment = <0x20>;
+ snps,dis_rxdet_inp3_quirk;
+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+ status = "disabled";
+ };
- usb1: usb@3110000 {
- status = "disabled";
- compatible = "snps,dwc3";
- reg = <0x0 0x3110000 0x0 0x10000>;
- interrupts = <0 81 0x4>; /* Level high type */
- dr_mode = "host";
- snps,quirk-frame-length-adjustment = <0x20>;
- snps,dis_rxdet_inp3_quirk;
- snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+ usb1: usb@3110000 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0x3110000 0x0 0x10000>;
+ interrupts = <0 81 0x4>; /* Level high type */
+ dr_mode = "host";
+ snps,quirk-frame-length-adjustment = <0x20>;
+ snps,dis_rxdet_inp3_quirk;
+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+ status = "disabled";
+ };
};
ccn@4000000 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a.dts
new file mode 100644
index 000000000000..da0f58e26b9a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a.dts
@@ -0,0 +1,338 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/net/ti-dp83867.h>
+
+#include "fsl-lx2160a-tqmlx2160a.dtsi"
+
+/ {
+ model = "TQ Systems GmbH MBLX2160A Starterkit";
+ compatible = "tq,lx2160a-tqmlx2160a-mblx2160a", "tq,lx2160a-tqmlx2160a",
+ "fsl,lx2160a";
+
+ aliases {
+ mmc0 = &esdhc0;
+ mmc1 = &esdhc1;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ };
+
+ chosen {
+ stdout-path = &uart0;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-user1 {
+ label = "button:user1";
+ gpios = <&gpio2 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_F1>;
+ };
+
+ button-user2 {
+ label = "button:user2";
+ gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_F2>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-user1 {
+ gpios = <&gpioex1 15 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_HEARTBEAT;
+ function-enumerator = <0>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-user2 {
+ gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_HEARTBEAT;
+ function-enumerator = <1>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ sfp_xfi1: sfp-xfi1 {
+ compatible = "sff,sfp";
+ i2c-bus = <&xfi1_i2c>;
+ mod-def0-gpios = <&gpioex2 2 GPIO_ACTIVE_LOW>;
+ los-gpios = <&gpioex2 3 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&gpioex2 0 GPIO_ACTIVE_HIGH>;
+ tx-disable-gpios = <&gpioex2 1 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+
+ sfp_xfi2: sfp-xfi2 {
+ compatible = "sff,sfp";
+ i2c-bus = <&xfi2_i2c>;
+ mod-def0-gpios = <&gpioex2 6 GPIO_ACTIVE_LOW>;
+ los-gpios = <&gpioex2 7 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&gpioex2 4 GPIO_ACTIVE_HIGH>;
+ tx-disable-gpios = <&gpioex2 5 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+};
+
+&can0 {
+ status = "okay";
+};
+
+&can1 {
+ status = "okay";
+};
+
+&dpmac17 {
+ phy-handle = <&dp83867_2_3>;
+ phy-connection-type = "rgmii-id";
+};
+
+&dpmac18 {
+ phy-handle = <&dp83867_2_4>;
+ phy-connection-type = "rgmii-id";
+};
+
+&emdio1 {
+ status = "okay";
+
+ dp83867_1_1: ethernet-phy@1 {
+ reg = <1>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_1_2: ethernet-phy@2 {
+ reg = <2>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_1_3: ethernet-phy@3 {
+ reg = <3>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_1_4: ethernet-phy@4 {
+ reg = <4>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_1_5: ethernet-phy@5 {
+ reg = <5>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_1_6: ethernet-phy@6 {
+ reg = <6>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+};
+
+&emdio2 {
+ status = "okay";
+
+ dp83867_2_1: ethernet-phy@1 {
+ reg = <1>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_2_2: ethernet-phy@2 {
+ reg = <2>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_2_3: ethernet-phy@3 {
+ reg = <3>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+
+ dp83867_2_4: ethernet-phy@4 {
+ reg = <4>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+};
+
+&esdhc0 {
+ sd-uhs-sdr104;
+ sd-uhs-sdr50;
+ sd-uhs-sdr25;
+ sd-uhs-sdr12;
+ no-mmc;
+ no-sdio;
+ wp-gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
+ cd-gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&i2c0 {
+ gpioex3: gpio@20 {
+ compatible = "nxp,pca9555";
+ reg = <0x20>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+};
+
+&i2c4 {
+ status = "okay";
+
+ mux@70 {
+ compatible = "nxp,pca9544";
+ reg = <0x70>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ vdd-supply = <&reg_vcc3v3>;
+
+ i2c@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gpioex0: gpio@20 {
+ compatible = "nxp,pca9555";
+ reg = <0x20>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+
+ gpioex1: gpio@21 {
+ compatible = "nxp,pca9555";
+ reg = <0x21>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+
+ gpioex2: gpio@22 {
+ compatible = "nxp,pca9555";
+ reg = <0x22>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+ };
+
+ i2c@3 {
+ reg = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&i2c5 {
+ status = "okay";
+
+ mux@70 {
+ compatible = "nxp,pca9544";
+ reg = <0x70>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ vdd-supply = <&reg_vcc3v3>;
+
+ i2c@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ xfi1_i2c: i2c@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ xfi2_i2c: i2c@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c@3 {
+ reg = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&pcs_mdio17 {
+ status = "okay";
+};
+
+&pcs_mdio18 {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&uart3 {
+ status = "okay";
+};
+
+&usb0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ hub_2_0: hub@1 {
+ compatible = "usb451,8142";
+ reg = <1>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpioex1 0 GPIO_ACTIVE_LOW>;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb451,8140";
+ reg = <2>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpioex1 0 GPIO_ACTIVE_LOW>;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+};
+
+&usb1 {
+ dr_mode = "otg";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_12_x_x.dtso b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_12_x_x.dtso
new file mode 100644
index 000000000000..8284a564e20d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_12_x_x.dtso
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+/dts-v1/;
+/plugin/;
+
+&dpmac9 {
+ phy-handle = <&dp83867_2_1>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&dpmac10 {
+ phy-handle = <&dp83867_2_2>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&pcs_mdio9 {
+ status = "okay";
+};
+
+&pcs_mdio10 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_14_x_x.dtso b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_14_x_x.dtso
new file mode 100644
index 000000000000..636b17a383ed
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_14_x_x.dtso
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+/dts-v1/;
+/plugin/;
+
+&dpmac1 {
+ managed = "in-band-status";
+};
+
+&pcs_mdio1 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_11_x.dtso b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_11_x.dtso
new file mode 100644
index 000000000000..6d0c808cd840
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_11_x.dtso
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+/dts-v1/;
+/plugin/;
+
+&dpmac12 {
+ phy-handle = <&dp83867_1_1>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&dpmac13 {
+ phy-handle = <&dp83867_1_5>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&dpmac14 {
+ phy-handle = <&dp83867_1_6>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&dpmac16 {
+ phy-handle = <&dp83867_1_4>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&pcs_mdio12 {
+ status = "okay";
+};
+
+&pcs_mdio13 {
+ status = "okay";
+};
+
+&pcs_mdio14 {
+ status = "okay";
+};
+
+&pcs_mdio16 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_7_x.dtso b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_7_x.dtso
new file mode 100644
index 000000000000..db88a86ff69c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_7_x.dtso
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+/dts-v1/;
+/plugin/;
+
+&dpmac12 {
+ phy-handle = <&dp83867_1_1>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&dpmac13 {
+ sfp = <&sfp_xfi1>;
+ managed = "in-band-status";
+};
+
+&dpmac14 {
+ sfp = <&sfp_xfi2>;
+ managed = "in-band-status";
+};
+
+&dpmac16 {
+ phy-handle = <&dp83867_1_4>;
+ phy-connection-type = "sgmii";
+ managed = "in-band-status";
+};
+
+&pcs_mdio12 {
+ status = "okay";
+};
+
+&pcs_mdio13 {
+ status = "okay";
+};
+
+&pcs_mdio14 {
+ status = "okay";
+};
+
+&pcs_mdio16 {
+ status = "okay";
+};
+
+&sfp_xfi1 {
+ status = "okay";
+};
+
+&sfp_xfi2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_8_x.dtso b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_8_x.dtso
new file mode 100644
index 000000000000..f6dfa76aa0e7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a-mblx2160a_x_8_x.dtso
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+/dts-v1/;
+/plugin/;
+
+&dpmac13 {
+ sfp = <&sfp_xfi1>;
+ managed = "in-band-status";
+};
+
+&dpmac14 {
+ sfp = <&sfp_xfi2>;
+ managed = "in-band-status";
+};
+
+&pcs_mdio13 {
+ status = "okay";
+};
+
+&pcs_mdio14 {
+ status = "okay";
+};
+
+&sata0 {
+ status = "okay";
+};
+
+&sata1 {
+ status = "okay";
+};
+
+&sata2 {
+ status = "okay";
+};
+
+&sfp_xfi1 {
+ status = "okay";
+};
+
+&sfp_xfi2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a.dtsi
new file mode 100644
index 000000000000..89a4765737b4
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a-tqmlx2160a.dtsi
@@ -0,0 +1,97 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger
+ */
+
+#include "fsl-lx2160a.dtsi"
+
+/ {
+ reg_vcc3v3: regulator-vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+
+&emdio1 {
+ status = "okay";
+};
+
+&emdio2 {
+ status = "okay";
+};
+
+&esdhc1 {
+ bus-width = <8>;
+ no-sd;
+ no-sdio;
+ non-removable;
+ mmc-hs200-1_8v;
+ status = "okay";
+};
+
+&fspi {
+ status = "okay";
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <10000000>;
+ spi-rx-bus-width = <1>;
+ spi-tx-bus-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ };
+
+ flash1: flash@1 {
+ compatible = "jedec,spi-nor";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <10000000>;
+ spi-rx-bus-width = <1>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&i2c0 {
+ scl-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+
+ sensor0: temperature-sensor@1f {
+ compatible = "nxp,se97", "jedec,jc-42.4-temp";
+ reg = <0x1f>;
+ };
+
+ eeprom1: eeprom@57 {
+ compatible = "atmel,24c02";
+ reg = <0x57>;
+ pagesize = <16>;
+ read-only;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+
+ rtc: rtc@51 {
+ compatible = "nxp,pcf85063a";
+ reg = <0x51>;
+ quartz-load-femtofarads = <12500>;
+ };
+
+ eeprom2: eeprom@50 {
+ compatible = "atmel,24c64";
+ reg = <0x50>;
+ pagesize = <32>;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a.dtsi
index ea6a94b57aeb..6640b49670ae 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2160a.dtsi
@@ -626,6 +626,13 @@
#phy-cells = <1>;
};
+ serdes_2: phy@1eb0000 {
+ compatible = "fsl,lynx-28g";
+ reg = <0x0 0x1eb0000 0x0 0x1e30>;
+ #phy-cells = <1>;
+ status = "disabled";
+ };
+
crypto: crypto@8000000 {
compatible = "fsl,sec-v5.0", "fsl,sec-v4.0";
fsl,sec-era = <10>;
@@ -725,9 +732,9 @@
fsl,tmu-range = <0x800000e6 0x8001017d>;
fsl,tmu-calibration =
/* Calibration data group 1 */
- <0x00000000 0x00000035
+ <0x00000000 0x00000035>,
/* Calibration data group 2 */
- 0x00000001 0x00000154>;
+ <0x00000001 0x00000154>;
little-endian;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-clearfog.dts b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-clearfog.dts
new file mode 100644
index 000000000000..9f88583aa25e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-clearfog.dts
@@ -0,0 +1,376 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+//
+// Device Tree file for LX2162A Clearfog
+//
+// Copyright 2023 Josua Mayer <josua@solid-run.com>
+
+/dts-v1/;
+
+#include "fsl-lx2160a.dtsi"
+#include "fsl-lx2162a-sr-som.dtsi"
+
+/ {
+ model = "SolidRun LX2162A Clearfog";
+ compatible = "solidrun,lx2162a-clearfog", "solidrun,lx2162a-som", "fsl,lx2160a";
+
+ aliases {
+ crypto = &crypto;
+ i2c0 = &i2c0;
+ i2c1 = &i2c2;
+ i2c2 = &i2c4;
+ i2c3 = &sfp_i2c0;
+ i2c4 = &sfp_i2c1;
+ i2c5 = &sfp_i2c2;
+ i2c6 = &sfp_i2c3;
+ i2c7 = &mpcie1_i2c;
+ i2c8 = &mpcie0_i2c;
+ i2c9 = &pcieclk_i2c;
+ mmc0 = &esdhc0;
+ mmc1 = &esdhc1;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sfp_at: led-sfp-at {
+ gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; /* PROC_IRQ5 */
+ default-state = "off";
+ };
+
+ led_sfp_ab: led-sfp-ab {
+ gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>; /* PROC_IRQ11 */
+ default-state = "off";
+ };
+
+ led_sfp_bt: led-sfp-bt {
+ gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>; /* EVT1_B */
+ default-state = "off";
+ };
+
+ led_sfp_bb: led-sfp-bb {
+ gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>; /* EVT2_B */
+ default-state = "off";
+ };
+ };
+
+ sfp_at: sfp-at {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp_i2c0>;
+ mod-def0-gpios = <&gpio2 16 GPIO_ACTIVE_LOW>; /* EVT4_B */
+ maximum-power-milliwatt = <2000>;
+ };
+
+ sfp_ab: sfp-ab {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp_i2c1>;
+ mod-def0-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; /* PROC_IRQ1 */
+ maximum-power-milliwatt = <2000>;
+ };
+
+ sfp_bt: sfp-bt {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp_i2c2>;
+ mod-def0-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; /* PROC_IRQ10 */
+ maximum-power-milliwatt = <2000>;
+ };
+
+ sfp_bb: sfp-bb {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp_i2c3>;
+ mod-def0-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; /* EVT3_B */
+ maximum-power-milliwatt = <2000>;
+ };
+};
+
+&dpmac3 {
+ sfp = <&sfp_at>;
+ managed = "in-band-status";
+ phys = <&serdes_1 7>;
+};
+
+&dpmac4 {
+ sfp = <&sfp_ab>;
+ managed = "in-band-status";
+ phys = <&serdes_1 6>;
+};
+
+&dpmac5 {
+ sfp = <&sfp_bt>;
+ managed = "in-band-status";
+ phys = <&serdes_1 5>;
+};
+
+&dpmac6 {
+ sfp = <&sfp_bb>;
+ managed = "in-band-status";
+ phys = <&serdes_1 4>;
+};
+
+&dpmac11 {
+ phys = <&serdes_2 0>;
+ phy-handle = <&ethernet_phy3>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac12 {
+ phys = <&serdes_2 1>;
+ phy-handle = <&ethernet_phy1>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac13 {
+ phys = <&serdes_2 6>;
+ phy-handle = <&ethernet_phy6>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac14 {
+ phys = <&serdes_2 7>;
+ phy-handle = <&ethernet_phy8>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac15 {
+ phys = <&serdes_2 4>;
+ phy-handle = <&ethernet_phy4>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac16 {
+ phys = <&serdes_2 5>;
+ phy-handle = <&ethernet_phy2>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac17 {
+ /* override connection to on-SoM phy */
+ /delete-property/ phy-handle;
+ /delete-property/ phy-connection-type;
+
+ phys = <&serdes_2 2>;
+ phy-handle = <&ethernet_phy5>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&dpmac18 {
+ phys = <&serdes_2 3>;
+ phy-handle = <&ethernet_phy7>;
+ phy-connection-type = "sgmii";
+ status = "okay";
+};
+
+&emdio1 {
+ ethernet_phy1: ethernet-phy@8 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <8>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy2: ethernet-phy@9 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <9>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy3: ethernet-phy@10 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <10>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy4: ethernet-phy@11 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <11>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy5: ethernet-phy@12 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <12>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy6: ethernet-phy@13 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <13>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy7: ethernet-phy@14 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <14>;
+ max-speed = <1000>;
+ };
+
+ ethernet_phy8: ethernet-phy@15 {
+ compatible = "ethernet-phy-ieee802.3-c45";
+ reg = <15>;
+ max-speed = <1000>;
+ };
+};
+
+&esdhc0 {
+ sd-uhs-sdr104;
+ sd-uhs-sdr50;
+ sd-uhs-sdr25;
+ sd-uhs-sdr12;
+ status = "okay";
+};
+
+&ethernet_phy0 {
+ /*
+ * SoM has a phy at address 1 connected to SoC Ethernet Controller 1.
+ * It competes for WRIOP MAC17, and no connector has been wired.
+ */
+ status = "disabled";
+};
+
+&i2c2 {
+ status = "okay";
+
+ /* retimer@18 */
+
+ i2c-mux@70 {
+ compatible = "nxp,pca9546";
+ reg = <0x70>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ i2c-mux-idle-disconnect;
+
+ sfp_i2c0: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ sfp_i2c1: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ };
+
+ sfp_i2c2: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+ };
+
+ sfp_i2c3: i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+ };
+ };
+
+ i2c-mux@71 {
+ compatible = "nxp,pca9546";
+ reg = <0x71>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ i2c-mux-idle-disconnect;
+
+ mpcie1_i2c: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ mpcie0_i2c: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ };
+
+ pcieclk_i2c: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+
+ /* clock-controller@6b */
+ };
+ };
+};
+
+&pcie3 {
+ status = "disabled";
+};
+
+&pcie4 {
+ status = "disabled";
+};
+
+&pcs_mdio3 {
+ status = "okay";
+};
+
+&pcs_mdio4 {
+ status = "okay";
+};
+
+&pcs_mdio5 {
+ status = "okay";
+};
+
+&pcs_mdio6 {
+ status = "okay";
+};
+
+&pcs_mdio11 {
+ status = "okay";
+};
+
+&pcs_mdio12 {
+ status = "okay";
+};
+
+&pcs_mdio13 {
+ status = "okay";
+};
+
+&pcs_mdio14 {
+ status = "okay";
+};
+
+&pcs_mdio15 {
+ status = "okay";
+};
+
+&pcs_mdio16 {
+ status = "okay";
+};
+
+&pcs_mdio17 {
+ status = "okay";
+};
+
+&pcs_mdio18 {
+ status = "okay";
+};
+
+&serdes_1 {
+ status = "okay";
+};
+
+&serdes_2 {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&usb0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-sr-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-sr-som.dtsi
new file mode 100644
index 000000000000..0580ea30cfbc
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-lx2162a-sr-som.dtsi
@@ -0,0 +1,73 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+//
+// Device Tree file for LX2162A-SOM
+//
+// Copyright 2021 Rabeeh Khoury <rabeeh@solid-run.com>
+// Copyright 2023 Josua Mayer <josua@solid-run.com>
+
+&crypto {
+ status = "okay";
+};
+
+&dpmac17 {
+ phy-handle = <&ethernet_phy0>;
+ phy-connection-type = "rgmii-id";
+};
+
+&emdio1 {
+ status = "okay";
+
+ ethernet_phy0: ethernet-phy@1 {
+ reg = <1>;
+ };
+};
+
+&esdhc1 {
+ bus-width = <8>;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ status = "okay";
+};
+
+&fspi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ m25p,fast-read;
+ spi-max-frequency = <50000000>;
+ /* The following setting enables 1-1-8 (CMD-ADDR-DATA) mode */
+ spi-rx-bus-width = <8>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+
+ fan-controller@18 {
+ compatible = "ti,amc6821";
+ reg = <0x18>;
+ };
+
+ ddr_spd: eeprom@51 {
+ compatible = "st,24c02", "atmel,24c02";
+ reg = <0x51>;
+ read-only;
+ };
+
+ config_eeprom: eeprom@57 {
+ compatible = "st,24c02", "atmel,24c02";
+ reg = <0x57>;
+ };
+};
+
+&i2c4 {
+ status = "okay";
+
+ variable_eeprom: eeprom@54 {
+ compatible = "st,24c2048", "atmel,24c2048";
+ reg = <0x54>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.1.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.1.dtsi
index c6d51f116298..5438923a905c 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.1.dtsi
@@ -165,7 +165,6 @@
"gpio5-24", "UART24-FORCEOFF", "gpio5-26",
"LED-4-GREEN", "gpio5-28", "LED-4-RED", "gpio5-30",
"gpio5-31";
- ngpios = <32>;
};
/* Apalis PWM3, MXM3 pin 6 */
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.2.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.2.dtsi
index 40067ab8aa74..f6654fdcb147 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-ixora-v1.2.dtsi
@@ -68,6 +68,7 @@
gpio = <&lsio_gpio5 22 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-name = "can1_supply";
+ startup-delay-us = <1000>;
};
reg_can2_supply: regulator-can2-supply {
@@ -77,6 +78,7 @@
gpio = <&lsio_gpio2 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-name = "can2_supply";
+ startup-delay-us = <1000>;
};
reg_usb_host_vbus: regulator-usb-host-vbus {
@@ -212,7 +214,6 @@
"gpio5-24", "UART24-FORCEOFF", "gpio5-26",
"LED-4-GREEN", "gpio5-28", "LED-4-RED", "gpio5-30",
"gpio5-31";
- ngpios = <32>;
};
/* Apalis PWM3, MXM3 pin 6 */
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-v1.1.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-v1.1.dtsi
index bd5d771637ca..f69b0c17560a 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-v1.1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-apalis-v1.1.dtsi
@@ -82,12 +82,9 @@
pinctrl-0 = <&pinctrl_wifi_pdn>;
gpio = <&lsio_gpio1 28 GPIO_ACTIVE_HIGH>;
enable-active-high;
+ regulator-always-on;
regulator-name = "wifi_pwrdn_fake_regulator";
regulator-settling-time-us = <100>;
-
- regulator-state-mem {
- regulator-off-in-suspend;
- };
};
reg_pcie_switch: regulator-pcie-switch {
@@ -264,7 +261,7 @@
reset-assert-us = <2>;
reset-deassert-us = <2>;
reset-gpios = <&lsio_gpio1 11 GPIO_ACTIVE_LOW>;
- reset-names = "phy-reset";
+ reset-names = "phy";
};
};
};
@@ -503,15 +500,6 @@
"MXM3_185",
"MXM3_187";
- /*
- * Add GPIO2_20 as a wakeup source:
- * Pin: 101 SC_P_SPI3_CS0 (MXM3_37/WAKE1_MICO)
- * Type: 5 SC_PAD_WAKEUP_FALL_EDGE
- * Line: 20
- */
- pad-wakeup = <IMX8QM_SPI3_CS0 5 20>;
- pad-wakeup-num = <1>;
-
pcie-wifi-hog {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie_wifi_refclk>;
@@ -684,15 +672,15 @@
};
/* Messaging Units */
-&mu_m0{
+&mu_m0 {
status = "okay";
};
-&mu1_m0{
+&mu1_m0 {
status = "okay";
};
-&mu2_m0{
+&mu2_m0 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-audio.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-audio.dtsi
index 6c8d75ef9250..f057c6b21b30 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-audio.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-audio.dtsi
@@ -7,17 +7,73 @@
#include <dt-bindings/clock/imx8-lpcg.h>
#include <dt-bindings/firmware/imx/rsrc.h>
+audio_ipg_clk: clock-audio-ipg {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <120000000>;
+ clock-output-names = "audio_ipg_clk";
+};
+
audio_subsys: bus@59000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x59000000 0x0 0x59000000 0x1000000>;
- audio_ipg_clk: clock-audio-ipg {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <120000000>;
- clock-output-names = "audio_ipg_clk";
+ edma0: dma-controller@591f0000 {
+ compatible = "fsl,imx8qm-edma";
+ reg = <0x591f0000 0x190000>;
+ #dma-cells = <3>;
+ dma-channels = <24>;
+ dma-channel-mask = <0x5c0c00>;
+ interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>, /* 0 asrc 0 */
+ <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>, /* 1 */
+ <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>, /* 2 */
+ <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>, /* 3 */
+ <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>, /* 4 */
+ <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>, /* 5 */
+ <GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>, /* 6 esai0 */
+ <GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>, /* 7 */
+ <GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>, /* 8 spdif0 */
+ <GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>, /* 9 */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 10 unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 11 unused */
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>, /* 12 sai0 */
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>, /* 13 */
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>, /* 14 sai1 */
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>, /* 15 */
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>, /* 16 sai2 */
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>, /* 17 sai3 */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 18 unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 19 unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 20 unused */
+ <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>, /* 21 */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 22 unused */
+ <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH>; /* 23 unused */
+ power-domains = <&pd IMX_SC_R_DMA_0_CH0>,
+ <&pd IMX_SC_R_DMA_0_CH1>,
+ <&pd IMX_SC_R_DMA_0_CH2>,
+ <&pd IMX_SC_R_DMA_0_CH3>,
+ <&pd IMX_SC_R_DMA_0_CH4>,
+ <&pd IMX_SC_R_DMA_0_CH5>,
+ <&pd IMX_SC_R_DMA_0_CH6>,
+ <&pd IMX_SC_R_DMA_0_CH7>,
+ <&pd IMX_SC_R_DMA_0_CH8>,
+ <&pd IMX_SC_R_DMA_0_CH9>,
+ <&pd IMX_SC_R_DMA_0_CH10>,
+ <&pd IMX_SC_R_DMA_0_CH11>,
+ <&pd IMX_SC_R_DMA_0_CH12>,
+ <&pd IMX_SC_R_DMA_0_CH13>,
+ <&pd IMX_SC_R_DMA_0_CH14>,
+ <&pd IMX_SC_R_DMA_0_CH15>,
+ <&pd IMX_SC_R_DMA_0_CH16>,
+ <&pd IMX_SC_R_DMA_0_CH17>,
+ <&pd IMX_SC_R_DMA_0_CH18>,
+ <&pd IMX_SC_R_DMA_0_CH19>,
+ <&pd IMX_SC_R_DMA_0_CH20>,
+ <&pd IMX_SC_R_DMA_0_CH21>,
+ <&pd IMX_SC_R_DMA_0_CH22>,
+ <&pd IMX_SC_R_DMA_0_CH23>;
};
dsp_lpcg: clock-controller@59580000 {
@@ -65,4 +121,34 @@ audio_subsys: bus@59000000 {
memory-region = <&dsp_reserved>;
status = "disabled";
};
+
+ edma1: dma-controller@599f0000 {
+ compatible = "fsl,imx8qm-edma";
+ reg = <0x599f0000 0xc0000>;
+ #dma-cells = <3>;
+ dma-channels = <11>;
+ dma-channel-mask = <0xc0>;
+ interrupts = <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>, /* 0 asrc 1 */
+ <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>, /* 1 */
+ <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>, /* 2 */
+ <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>, /* 3 */
+ <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>, /* 4 */
+ <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>, /* 5 */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 6 unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* 7 unused */
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>, /* sai4 */
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>; /* sai5 */
+ power-domains = <&pd IMX_SC_R_DMA_1_CH0>,
+ <&pd IMX_SC_R_DMA_1_CH1>,
+ <&pd IMX_SC_R_DMA_1_CH2>,
+ <&pd IMX_SC_R_DMA_1_CH3>,
+ <&pd IMX_SC_R_DMA_1_CH4>,
+ <&pd IMX_SC_R_DMA_1_CH5>,
+ <&pd IMX_SC_R_DMA_1_CH6>,
+ <&pd IMX_SC_R_DMA_1_CH7>,
+ <&pd IMX_SC_R_DMA_1_CH8>,
+ <&pd IMX_SC_R_DMA_1_CH9>,
+ <&pd IMX_SC_R_DMA_1_CH10>;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-conn.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-conn.dtsi
index e62a43591361..3c42240e78e2 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-conn.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-conn.dtsi
@@ -7,33 +7,33 @@
#include <dt-bindings/clock/imx8-lpcg.h>
#include <dt-bindings/firmware/imx/rsrc.h>
+conn_axi_clk: clock-conn-axi {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <333333333>;
+ clock-output-names = "conn_axi_clk";
+};
+
+conn_ahb_clk: clock-conn-ahb {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <166666666>;
+ clock-output-names = "conn_ahb_clk";
+};
+
+conn_ipg_clk: clock-conn-ipg {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <83333333>;
+ clock-output-names = "conn_ipg_clk";
+};
+
conn_subsys: bus@5b000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x5b000000 0x0 0x5b000000 0x1000000>;
- conn_axi_clk: clock-conn-axi {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <333333333>;
- clock-output-names = "conn_axi_clk";
- };
-
- conn_ahb_clk: clock-conn-ahb {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <166666666>;
- clock-output-names = "conn_ahb_clk";
- };
-
- conn_ipg_clk: clock-conn-ipg {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <83333333>;
- clock-output-names = "conn_ipg_clk";
- };
-
usbotg1: usb@5b0d0000 {
compatible = "fsl,imx7ulp-usb", "fsl,imx6ul-usb", "fsl,imx27-usb";
reg = <0x5b0d0000 0x200>;
@@ -157,12 +157,10 @@ conn_subsys: bus@5b000000 {
usbotg3_cdns3: usb@5b120000 {
compatible = "cdns,usb3";
- reg = <0x5b130000 0x10000>, /* memory area for HOST registers */
- <0x5b140000 0x10000>, /* memory area for DEVICE registers */
- <0x5b120000 0x10000>; /* memory area for OTG/DRD registers */
- reg-names = "xhci", "dev", "otg";
- #address-cells = <1>;
- #size-cells = <1>;
+ reg = <0x5b120000 0x10000>, /* memory area for OTG/DRD registers */
+ <0x5b130000 0x10000>, /* memory area for HOST registers */
+ <0x5b140000 0x10000>; /* memory area for DEVICE registers */
+ reg-names = "otg", "xhci", "dev";
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-dma.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-dma.dtsi
index adb98a72bdfd..b0bb77150adc 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-dma.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-dma.dtsi
@@ -7,19 +7,19 @@
#include <dt-bindings/clock/imx8-lpcg.h>
#include <dt-bindings/firmware/imx/rsrc.h>
+dma_ipg_clk: clock-dma-ipg {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <120000000>;
+ clock-output-names = "dma_ipg_clk";
+};
+
dma_subsys: bus@5a000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x5a000000 0x0 0x5a000000 0x1000000>;
- dma_ipg_clk: clock-dma-ipg {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <120000000>;
- clock-output-names = "dma_ipg_clk";
- };
-
lpspi0: spi@5a000000 {
compatible = "fsl,imx7ulp-spi";
reg = <0x5a000000 0x10000>;
@@ -86,52 +86,135 @@ dma_subsys: bus@5a000000 {
lpuart0: serial@5a060000 {
reg = <0x5a060000 0x1000>;
- interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&uart0_lpcg IMX_LPCG_CLK_4>,
<&uart0_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "baud";
assigned-clocks = <&clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <80000000>;
power-domains = <&pd IMX_SC_R_UART_0>;
+ dma-names = "tx","rx";
+ dmas = <&edma2 9 0 0>, <&edma2 8 0 1>;
status = "disabled";
};
lpuart1: serial@5a070000 {
reg = <0x5a070000 0x1000>;
- interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&uart1_lpcg IMX_LPCG_CLK_4>,
<&uart1_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "baud";
assigned-clocks = <&clk IMX_SC_R_UART_1 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <80000000>;
power-domains = <&pd IMX_SC_R_UART_1>;
+ dma-names = "tx","rx";
+ dmas = <&edma2 11 0 0>, <&edma2 10 0 1>;
status = "disabled";
};
lpuart2: serial@5a080000 {
reg = <0x5a080000 0x1000>;
- interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&uart2_lpcg IMX_LPCG_CLK_4>,
<&uart2_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "baud";
assigned-clocks = <&clk IMX_SC_R_UART_2 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <80000000>;
power-domains = <&pd IMX_SC_R_UART_2>;
+ dma-names = "tx","rx";
+ dmas = <&edma2 13 0 0>, <&edma2 12 0 1>;
status = "disabled";
};
lpuart3: serial@5a090000 {
reg = <0x5a090000 0x1000>;
- interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&uart3_lpcg IMX_LPCG_CLK_4>,
<&uart3_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "baud";
assigned-clocks = <&clk IMX_SC_R_UART_3 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <80000000>;
power-domains = <&pd IMX_SC_R_UART_3>;
+ dma-names = "tx","rx";
+ dmas = <&edma2 15 0 0>, <&edma2 14 0 1>;
status = "disabled";
};
+ adma_pwm: pwm@5a190000 {
+ compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm";
+ reg = <0x5a190000 0x1000>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&adma_pwm_lpcg 1>,
+ <&adma_pwm_lpcg 0>;
+ clock-names = "ipg", "per";
+ assigned-clocks = <&clk IMX_SC_R_LCD_0_PWM_0 IMX_SC_PM_CLK_PER>;
+ assigned-clock-rates = <24000000>;
+ #pwm-cells = <3>;
+ power-domains = <&pd IMX_SC_R_LCD_0_PWM_0>;
+ };
+
+ edma2: dma-controller@5a1f0000 {
+ compatible = "fsl,imx8qm-edma";
+ reg = <0x5a1f0000 0x170000>;
+ #dma-cells = <3>;
+ dma-channels = <16>;
+ interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 436 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 437 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 441 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&pd IMX_SC_R_DMA_2_CH0>,
+ <&pd IMX_SC_R_DMA_2_CH1>,
+ <&pd IMX_SC_R_DMA_2_CH2>,
+ <&pd IMX_SC_R_DMA_2_CH3>,
+ <&pd IMX_SC_R_DMA_2_CH4>,
+ <&pd IMX_SC_R_DMA_2_CH5>,
+ <&pd IMX_SC_R_DMA_2_CH6>,
+ <&pd IMX_SC_R_DMA_2_CH7>,
+ <&pd IMX_SC_R_DMA_2_CH8>,
+ <&pd IMX_SC_R_DMA_2_CH9>,
+ <&pd IMX_SC_R_DMA_2_CH10>,
+ <&pd IMX_SC_R_DMA_2_CH11>,
+ <&pd IMX_SC_R_DMA_2_CH12>,
+ <&pd IMX_SC_R_DMA_2_CH13>,
+ <&pd IMX_SC_R_DMA_2_CH14>,
+ <&pd IMX_SC_R_DMA_2_CH15>;
+ };
+
+ edma3: dma-controller@5a9f0000 {
+ compatible = "fsl,imx8qm-edma";
+ reg = <0x5a9f0000 0x90000>;
+ #dma-cells = <3>;
+ dma-channels = <8>;
+ interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&pd IMX_SC_R_DMA_3_CH0>,
+ <&pd IMX_SC_R_DMA_3_CH1>,
+ <&pd IMX_SC_R_DMA_3_CH2>,
+ <&pd IMX_SC_R_DMA_3_CH3>,
+ <&pd IMX_SC_R_DMA_3_CH4>,
+ <&pd IMX_SC_R_DMA_3_CH5>,
+ <&pd IMX_SC_R_DMA_3_CH6>,
+ <&pd IMX_SC_R_DMA_3_CH7>;
+ };
+
spi0_lpcg: clock-controller@5a400000 {
compatible = "fsl,imx8qxp-lpcg";
reg = <0x5a400000 0x10000>;
@@ -228,6 +311,18 @@ dma_subsys: bus@5a000000 {
power-domains = <&pd IMX_SC_R_UART_3>;
};
+ adma_pwm_lpcg: clock-controller@5a590000 {
+ compatible = "fsl,imx8qxp-lpcg";
+ reg = <0x5a590000 0x10000>;
+ #clock-cells = <1>;
+ clocks = <&clk IMX_SC_R_LCD_0_PWM_0 IMX_SC_PM_CLK_PER>,
+ <&dma_ipg_clk>;
+ clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
+ clock-output-names = "adma_pwm_lpcg_clk",
+ "adma_pwm_lpcg_ipg_clk";
+ power-domains = <&pd IMX_SC_R_LCD_0_PWM_0>;
+ };
+
i2c0: i2c@5a800000 {
reg = <0x5a800000 0x4000>;
interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-img.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-img.dtsi
index a90654155a88..e7783cc2d830 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-img.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-img.dtsi
@@ -3,25 +3,22 @@
* Copyright 2019-2021 NXP
* Zhou Guoniu <guoniu.zhou@nxp.com>
*/
+img_ipg_clk: clock-img-ipg {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <200000000>;
+ clock-output-names = "img_ipg_clk";
+};
+
img_subsys: bus@58000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x58000000 0x0 0x58000000 0x1000000>;
- img_ipg_clk: clock-img-ipg {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <200000000>;
- clock-output-names = "img_ipg_clk";
- };
-
jpegdec: jpegdec@58400000 {
reg = <0x58400000 0x00050000>;
- interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&img_jpeg_dec_lpcg IMX_LPCG_CLK_0>,
<&img_jpeg_dec_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg";
@@ -29,18 +26,13 @@ img_subsys: bus@58000000 {
<&img_jpeg_dec_lpcg IMX_LPCG_CLK_4>;
assigned-clock-rates = <200000000>, <200000000>;
power-domains = <&pd IMX_SC_R_MJPEG_DEC_MP>,
- <&pd IMX_SC_R_MJPEG_DEC_S0>,
- <&pd IMX_SC_R_MJPEG_DEC_S1>,
- <&pd IMX_SC_R_MJPEG_DEC_S2>,
- <&pd IMX_SC_R_MJPEG_DEC_S3>;
+ <&pd IMX_SC_R_MJPEG_DEC_S0>;
+ slot = <0>;
};
jpegenc: jpegenc@58450000 {
reg = <0x58450000 0x00050000>;
- interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&img_jpeg_enc_lpcg IMX_LPCG_CLK_0>,
<&img_jpeg_enc_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg";
@@ -48,10 +40,8 @@ img_subsys: bus@58000000 {
<&img_jpeg_enc_lpcg IMX_LPCG_CLK_4>;
assigned-clock-rates = <200000000>, <200000000>;
power-domains = <&pd IMX_SC_R_MJPEG_ENC_MP>,
- <&pd IMX_SC_R_MJPEG_ENC_S0>,
- <&pd IMX_SC_R_MJPEG_ENC_S1>,
- <&pd IMX_SC_R_MJPEG_ENC_S2>,
- <&pd IMX_SC_R_MJPEG_ENC_S3>;
+ <&pd IMX_SC_R_MJPEG_ENC_S0>;
+ slot = <0>;
};
img_jpeg_dec_lpcg: clock-controller@585d0000 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-lsio.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-lsio.dtsi
index ea8c93757521..7e510b21bbac 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-lsio.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8-ss-lsio.dtsi
@@ -7,6 +7,13 @@
#include <dt-bindings/clock/imx8-lpcg.h>
#include <dt-bindings/firmware/imx/rsrc.h>
+lsio_bus_clk: clock-lsio-bus {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ clock-output-names = "lsio_bus_clk";
+};
+
lsio_subsys: bus@5d000000 {
compatible = "simple-bus";
#address-cells = <1>;
@@ -14,20 +21,6 @@ lsio_subsys: bus@5d000000 {
ranges = <0x5d000000 0x0 0x5d000000 0x1000000>,
<0x08000000 0x0 0x08000000 0x10000000>;
- lsio_mem_clk: clock-lsio-mem {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <200000000>;
- clock-output-names = "lsio_mem_clk";
- };
-
- lsio_bus_clk: clock-lsio-bus {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <100000000>;
- clock-output-names = "lsio_bus_clk";
- };
-
lsio_pwm0: pwm@5d000000 {
compatible = "fsl,imx27-pwm";
reg = <0x5d000000 0x10000>;
@@ -36,7 +29,8 @@ lsio_subsys: bus@5d000000 {
<&pwm0_lpcg 1>;
assigned-clocks = <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
+ interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
@@ -48,7 +42,8 @@ lsio_subsys: bus@5d000000 {
<&pwm1_lpcg 1>;
assigned-clocks = <&clk IMX_SC_R_PWM_1 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
@@ -60,7 +55,8 @@ lsio_subsys: bus@5d000000 {
<&pwm2_lpcg 1>;
assigned-clocks = <&clk IMX_SC_R_PWM_2 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
+ interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
@@ -72,7 +68,8 @@ lsio_subsys: bus@5d000000 {
<&pwm3_lpcg 1>;
assigned-clocks = <&clk IMX_SC_R_PWM_3 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>;
- #pwm-cells = <2>;
+ #pwm-cells = <3>;
+ interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-evk.dts
index f542476187b3..b972658efb17 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-evk.dts
@@ -186,7 +186,6 @@
&flexspi0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexspi0>;
- nxp,fspi-dll-slvdly = <4>;
status = "okay";
mt35xu512aba0: flash@0 {
@@ -362,11 +361,9 @@
};
&lpspi3 {
- fsl,spi-num-chipselects = <1>;
fsl,spi-only-use-cs1-sel;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi3>;
- pinctrl-assert-gpios = <&pca6416_1 7 GPIO_ACTIVE_HIGH>;
status = "okay";
spidev0: spi@0 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-adma.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-adma.dtsi
index 6881330ab4c6..0a477f6318f1 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-adma.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-adma.dtsi
@@ -15,43 +15,73 @@
interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
};
+&edma2 {
+ interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 291 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 295 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&edma3 {
+ interrupts = <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 303 IRQ_TYPE_LEVEL_HIGH>;
+};
+
&i2c0 {
- compatible = "fsl,imx8dxl-lpi2c", "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c";
+ compatible = "fsl,imx8dxl-lpi2c", "fsl,imx7ulp-lpi2c";
interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
};
&i2c1 {
- compatible = "fsl,imx8dxl-lpi2c", "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c";
+ compatible = "fsl,imx8dxl-lpi2c", "fsl,imx7ulp-lpi2c";
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
};
&i2c2 {
- compatible = "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c";
+ compatible = "fsl,imx8dxl-lpi2c", "fsl,imx7ulp-lpi2c";
interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
};
&i2c3 {
- compatible = "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c";
+ compatible = "fsl,imx8dxl-lpi2c", "fsl,imx7ulp-lpi2c";
interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
};
&lpuart0 {
- compatible = "fsl,imx8qxp-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx8dxl-lpuart", "fsl,imx8qxp-lpuart";
interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_HIGH>;
};
&lpuart1 {
- compatible = "fsl,imx8qxp-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx8dxl-lpuart", "fsl,imx8qxp-lpuart";
interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
};
&lpuart2 {
- compatible = "fsl,imx8qxp-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx8dxl-lpuart", "fsl,imx8qxp-lpuart";
interrupts = <GIC_SPI 230 IRQ_TYPE_LEVEL_HIGH>;
};
&lpuart3 {
- compatible = "fsl,imx8qxp-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx8dxl-lpuart", "fsl,imx8qxp-lpuart";
interrupts = <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-conn.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-conn.dtsi
index 652493ae4bb5..6d13e4fafb76 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-conn.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-conn.dtsi
@@ -6,7 +6,7 @@
/delete-node/ &enet1_lpcg;
/delete-node/ &fec2;
-&conn_subsys {
+/ {
conn_enet0_root_clk: clock-conn-enet0-root {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -14,13 +14,22 @@
clock-output-names = "conn_enet0_root_clk";
};
+ clk_dummy: clock-dummy {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ clock-output-names = "clk_dummy";
+ };
+};
+
+&conn_subsys {
eqos: ethernet@5b050000 {
compatible = "nxp,imx8dxl-dwmac-eqos", "snps,dwmac-5.10a";
reg = <0x5b050000 0x10000>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "eth_wake_irq", "macirq";
+ interrupt-names = "macirq", "eth_wake_irq";
clocks = <&eqos_lpcg IMX_LPCG_CLK_4>,
<&eqos_lpcg IMX_LPCG_CLK_6>,
<&eqos_lpcg IMX_LPCG_CLK_0>,
@@ -51,13 +60,6 @@
rx-burst-size-dword = <0x10>;
power-domains = <&pd IMX_SC_R_USB_1>;
status = "disabled";
-
- clk_dummy: clock-dummy {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <0>;
- clock-output-names = "clk_dummy";
- };
};
usbmisc2: usbmisc@5b0e0200 {
@@ -116,7 +118,7 @@
};
&fec1 {
- compatible = "fsl,imx8qm-fec";
+ compatible = "fsl,imx8dxl-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec";
interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-ddr.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-ddr.dtsi
index 550f513708d8..3569abb5bb9b 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-ddr.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl-ss-ddr.dtsi
@@ -4,6 +4,6 @@
*/
&ddr_pmu0 {
- compatible = "fsl,imx8-ddr-pmu";
+ compatible = "fsl,imx8dxl-ddr-pmu", "fsl,imx8-ddr-pmu";
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl.dtsi
index 792b7224ca5b..f580eb6db9a6 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8dxl.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8dxl.dtsi
@@ -122,10 +122,8 @@
&lsio_mu1 3 3>;
pd: power-controller {
- compatible = "fsl,scu-pd";
+ compatible = "fsl,imx8dl-scu-pd", "fsl,scu-pd";
#power-domain-cells = <1>;
- wakeup-irq = <160 163 235 236 237 228 229 230 231 238
- 239 240 166 169>;
};
clk: clock-controller {
@@ -168,12 +166,12 @@
};
watchdog {
- compatible = "fsl,imx-sc-wdt";
+ compatible = "fsl,imx8dxl-sc-wdt", "fsl,imx-sc-wdt";
timeout-sec = <60>;
};
tsens: thermal-sensor {
- compatible = "fsl,imx-sc-thermal";
+ compatible = "fsl,imx8dxl-sc-thermal", "fsl,imx-sc-thermal";
#thermal-sensor-cells = <1>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-baseboard.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-baseboard.dtsi
index bc531175ff76..6086dae2e5fb 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-baseboard.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-baseboard.dtsi
@@ -6,6 +6,13 @@
#include <dt-bindings/phy/phy-imx8-pcie.h>
/ {
+
+ dmic_codec: dmic-codec {
+ compatible = "dmic-codec";
+ num-channels = <1>;
+ #sound-dai-cells = <0>;
+ };
+
leds {
compatible = "gpio-leds";
@@ -98,18 +105,46 @@
enable-active-high;
};
- sound {
- compatible = "fsl,imx-audio-wm8962";
- model = "wm8962-audio";
- audio-cpu = <&sai3>;
- audio-codec = <&wm8962>;
- audio-routing =
- "Headphone Jack", "HPOUTL",
- "Headphone Jack", "HPOUTR",
- "Ext Spk", "SPKOUTL",
- "Ext Spk", "SPKOUTR",
- "AMIC", "MICBIAS",
- "IN3R", "AMIC";
+ sound-dmic {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "dmic";
+ simple-audio-card,format = "pdm";
+ simple-audio-card,bitclock-master = <&dailink_master>;
+ simple-audio-card,frame-master = <&dailink_master>;
+
+ dailink_master: simple-audio-card,cpu {
+ sound-dai = <&micfil>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&dmic_codec>;
+ };
+ };
+
+ sound-wm8962 {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "wm8962";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,widgets = "Headphone", "Headphones",
+ "Microphone", "Headset Mic",
+ "Speaker", "Speaker";
+ simple-audio-card,routing = "Headphones", "HPOUTL",
+ "Headphones", "HPOUTR",
+ "Speaker", "SPKOUTL",
+ "Speaker", "SPKOUTR",
+ "Headset Mic", "MICBIAS",
+ "IN3R", "Headset Mic";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai3>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&wm8962>;
+ clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
+ frame-master;
+ bitclock-master;
+ };
};
};
@@ -141,11 +176,11 @@
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
- camera@3c {
+ camera@10 {
compatible = "ovti,ov5640";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ov5640>;
- reg = <0x3c>;
+ reg = <0x10>;
clocks = <&clk IMX8MM_CLK_CLKO1>;
clock-names = "xclk";
assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
@@ -192,6 +227,7 @@
0x0000 /* 4:FN_DMICCDAT */
0x0000 /* 5:Default */
>;
+ #sound-dai-cells = <0>;
};
pca6416_0: gpio@20 {
@@ -215,6 +251,15 @@
};
};
+&micfil {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pdm>;
+ assigned-clocks = <&clk IMX8MM_CLK_PDM>;
+ assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <49152000>;
+ status = "okay";
+};
+
&mipi_csi {
status = "okay";
ports {
@@ -289,7 +334,6 @@
};
&usbotg2 {
- pinctrl-names = "default";
disable-over-current;
dr_mode = "host";
status = "okay";
@@ -353,6 +397,13 @@
>;
};
+ pinctrl_pdm: pdmgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI5_RXC_PDM_CLK 0xd6
+ MX8MM_IOMUXC_SAI5_RXD0_PDM_DATA0 0xd6
+ >;
+ };
+
pinctrl_reg_usb_otg1: usbotg1grp {
fsl,pins = <
MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-kit.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-kit.dts
index 74a7b0cc10c2..905c98cb080d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-kit.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-kit.dts
@@ -16,4 +16,135 @@
chosen {
stdout-path = &uart2;
};
+
+ connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&adv7535_out>;
+ };
+ };
+ };
+
+ reg_hdmi: regulator-hdmi-dvdd {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_hdmi>;
+ regulator-name = "hdmi_pwr_en";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ startup-delay-us = <70000>;
+ regulator-always-on;
+ };
+
+ sound-hdmi {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "sound-hdmi";
+ simple-audio-card,format = "i2s";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai5>;
+ system-clock-direction-out;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&adv_bridge>;
+ };
+ };
+};
+
+&i2c2 {
+ adv_bridge: hdmi@3d {
+ compatible = "adi,adv7535";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hdmi_bridge>;
+ reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
+ reg-names = "main", "cec", "edid", "packet";
+ adi,dsi-lanes = <4>;
+ avdd-supply = <&reg_hdmi>;
+ a2vdd-supply = <&reg_hdmi>;
+ dvdd-supply = <&reg_hdmi>;
+ pvdd-supply = <&reg_hdmi>;
+ v1p2-supply = <&reg_hdmi>;
+ v3p3-supply = <&reg_hdmi>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adv7535_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ adv7535_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <20000000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&adv7535_in>;
+ };
+ };
+ };
+};
+
+&sai5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai5>;
+ assigned-clocks = <&clk IMX8MM_CLK_SAI5>;
+ assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <24576000>;
+ #sound-dai-cells = <0>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_hdmi_bridge: hdmibridgegrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x19
+ >;
+ };
+
+ pinctrl_reg_hdmi: reghdmigrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x16
+ >;
+ };
+
+ pinctrl_sai5: sai5grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0 0xd6
+ MX8MM_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK 0xd6
+ MX8MM_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC 0xd6
+ >;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-som.dtsi
index 201325f566cb..62ed64663f49 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-beacon-som.dtsi
@@ -3,6 +3,8 @@
* Copyright 2020 Compass Electronics Group, LLC
*/
+#include "imx8mm-overdrive.dtsi"
+
/ {
aliases {
rtc0 = &rtc;
@@ -112,7 +114,7 @@
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-ddr4-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-ddr4-evk.dts
index 010e836ebe5c..27848cee1670 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-ddr4-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-ddr4-evk.dts
@@ -23,7 +23,6 @@
&gpmi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpmi_nand>;
- nand-on-flash-bbt;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dts
index b2e8967e9687..c8ff70212602 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (c) 2021 emtrion GmbH
// Author: Frank Erdrich <frank.erdrich@emtrion.com>
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dtsi
index 5028f232b6bd..44c2cba41a1f 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon-avari.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (C) 2021 emtrion GmbH
// Author: Frank Erdrich <frank.erdrich@emtrion.com>
@@ -104,7 +104,7 @@
compatible = "nxp,pca8574";
reg = <0x3a>;
gpio-controller;
- #gpio-cells = <1>;
+ #gpio-cells = <2>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon.dtsi
index 4e9e58acd262..af7dc8d1f5f1 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-emcon.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright 2018 NXP
// Copyright (C) 2021 emtrion GmbH
@@ -108,8 +108,6 @@
};
&iomuxc {
- pinctrl-names = "default";
-
pinctrl_csi_pwn: csi-pwn-grp {
fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19
@@ -411,7 +409,7 @@
regulators {
buck1_reg: BUCK1 {
- regulator-name = "BUCK1";
+ regulator-name = "buck1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
@@ -420,7 +418,7 @@
};
buck2_reg: BUCK2 {
- regulator-name = "BUCK2";
+ regulator-name = "buck2";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
regulator-boot-on;
@@ -432,7 +430,7 @@
buck3_reg: BUCK3 {
// BUCK5 in datasheet
- regulator-name = "BUCK3";
+ regulator-name = "buck3";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1350000>;
regulator-boot-on;
@@ -441,7 +439,7 @@
buck4_reg: BUCK4 {
// BUCK6 in datasheet
- regulator-name = "BUCK4";
+ regulator-name = "buck4";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
@@ -450,7 +448,7 @@
buck5_reg: BUCK5 {
// BUCK7 in datasheet
- regulator-name = "BUCK5";
+ regulator-name = "buck5";
regulator-min-microvolt = <1605000>;
regulator-max-microvolt = <1995000>;
regulator-boot-on;
@@ -459,7 +457,7 @@
buck6_reg: BUCK6 {
// BUCK8 in datasheet
- regulator-name = "BUCK6";
+ regulator-name = "buck6";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
regulator-boot-on;
@@ -467,7 +465,7 @@
};
ldo1_reg: LDO1 {
- regulator-name = "LDO1";
+ regulator-name = "ldo1";
regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <1900000>;
regulator-boot-on;
@@ -475,7 +473,7 @@
};
ldo2_reg: LDO2 {
- regulator-name = "LDO2";
+ regulator-name = "ldo2";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <900000>;
regulator-boot-on;
@@ -483,7 +481,7 @@
};
ldo3_reg: LDO3 {
- regulator-name = "LDO3";
+ regulator-name = "ldo3";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
@@ -491,7 +489,7 @@
};
ldo4_reg: LDO4 {
- regulator-name = "LDO4";
+ regulator-name = "ldo4";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
@@ -499,7 +497,7 @@
};
ldo6_reg: LDO6 {
- regulator-name = "LDO6";
+ regulator-name = "ldo6";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-evk.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-evk.dtsi
index df8e808ac473..b53104ed8919 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-evk.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-evk.dtsi
@@ -26,7 +26,7 @@
port {
hdmi_connector_in: endpoint {
- remote-endpoint = <&adv7533_out>;
+ remote-endpoint = <&adv7535_out>;
};
};
};
@@ -72,6 +72,13 @@
enable-active-high;
};
+ reg_vddext_3v3: regulator-vddext-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDEXT_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm1 0 5000000 0>;
@@ -317,15 +324,16 @@
hdmi@3d {
compatible = "adi,adv7535";
- reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
- reg-names = "main", "cec", "edid", "packet";
+ reg = <0x3d>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
adi,dsi-lanes = <4>;
-
- adi,input-depth = <8>;
- adi,input-colorspace = "rgb";
- adi,input-clock = "1x";
- adi,input-style = <1>;
- adi,input-justification = "evenly";
+ avdd-supply = <&buck5_reg>;
+ dvdd-supply = <&buck5_reg>;
+ pvdd-supply = <&buck5_reg>;
+ a2vdd-supply = <&buck5_reg>;
+ v3p3-supply = <&reg_vddext_3v3>;
+ v1p2-supply = <&buck5_reg>;
ports {
#address-cells = <1>;
@@ -334,7 +342,7 @@
port@0 {
reg = <0>;
- adv7533_in: endpoint {
+ adv7535_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
@@ -342,7 +350,7 @@
port@1 {
reg = <1>;
- adv7533_out: endpoint {
+ adv7535_out: endpoint {
remote-endpoint = <&hdmi_connector_in>;
};
};
@@ -359,12 +367,6 @@
interrupts = <11 8>;
status = "okay";
- port {
- typec1_dr_sw: endpoint {
- remote-endpoint = <&usb1_drd_sw>;
- };
- };
-
typec1_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
@@ -376,10 +378,21 @@
PDO_VAR(5000, 20000, 3000)>;
op-sink-microwatt = <15000000>;
self-powered;
+
+ port {
+ typec1_dr_sw: endpoint {
+ remote-endpoint = <&usb1_drd_sw>;
+ };
+ };
};
};
};
+
+&csi {
+ status = "okay";
+};
+
&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default";
@@ -393,12 +406,47 @@
#gpio-cells = <2>;
vcc-supply = <&buck4_reg>;
};
+
+ camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_camera>;
+ clocks = <&clk IMX8MM_CLK_CLKO1>;
+ clock-names = "xclk";
+ assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
+ assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
+ assigned-clock-rates = <24000000>;
+ powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+
+ port {
+ ov5640_to_mipi_csi2: endpoint {
+ remote-endpoint = <&imx8mm_mipi_csi_in>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
};
&lcdif {
status = "okay";
};
+&mipi_csi {
+ status = "okay";
+
+ ports {
+ port@0 {
+ imx8mm_mipi_csi_in: endpoint {
+ remote-endpoint = <&ov5640_to_mipi_csi2>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
&mipi_dsi {
samsung,esc-clock-frequency = <10000000>;
status = "okay";
@@ -408,7 +456,7 @@
reg = <1>;
dsi_out: endpoint {
- remote-endpoint = <&adv7533_in>;
+ remote-endpoint = <&adv7535_in>;
data-lanes = <1 2 3 4>;
};
};
@@ -684,4 +732,12 @@
MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT 0x06
>;
};
+
+ pinctrl_camera: cameragrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19
+ MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19
+ MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59
+ >;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-nitrogen-r2.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-nitrogen-r2.dts
index 0e8f0d7161ad..12fb79d20b29 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-nitrogen-r2.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-nitrogen-r2.dts
@@ -220,7 +220,7 @@
#address-cells = <1>;
#size-cells = <0>;
- i2c3@0 {
+ i2c@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-overdrive.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-overdrive.dtsi
new file mode 100644
index 000000000000..b31436b5e9b7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-overdrive.dtsi
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+&gpu_2d {
+ assigned-clocks = <&clk IMX8MM_CLK_GPU2D_CORE>,
+ <&clk IMX8MM_GPU_PLL_OUT>;
+ assigned-clock-parents = <&clk IMX8MM_GPU_PLL_OUT>;
+ assigned-clock-rates = <0>, <1000000000>;
+};
+
+&gpu_3d {
+ assigned-clocks = <&clk IMX8MM_CLK_GPU3D_CORE>,
+ <&clk IMX8MM_GPU_PLL_OUT>;
+ assigned-clock-parents = <&clk IMX8MM_GPU_PLL_OUT>;
+ assigned-clock-rates = <0>, <1000000000>;
+};
+
+&vpu_blk_ctrl {
+ assigned-clocks = <&clk IMX8MM_CLK_VPU_G1>,
+ <&clk IMX8MM_CLK_VPU_G2>,
+ <&clk IMX8MM_CLK_VPU_H1>,
+ <&clk IMX8MM_VPU_PLL_OUT>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL3_OUT>,
+ <&clk IMX8MM_VPU_PLL_OUT>,
+ <&clk IMX8MM_SYS_PLL3_OUT>;
+ assigned-clock-rates = <750000000>,
+ <700000000>,
+ <750000000>,
+ <700000000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phg.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phg.dts
index 606a4f4d5f15..75bbedc6164c 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phg.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phg.dts
@@ -111,6 +111,11 @@
};
};
+/* QSPI is not populated on the SoM */
+&flexspi {
+ status = "disabled";
+};
+
&ecspi1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phyboard-polis-rdk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phyboard-polis-rdk.dts
index 479948f8a4b7..92e62fe31929 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phyboard-polis-rdk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phyboard-polis-rdk.dts
@@ -140,6 +140,26 @@
};
};
+/* TPM */
+&ecspi2 {
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ecspi2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ tpm: tpm@0 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+ interrupt-parent = <&gpio2>;
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm>;
+ reg = <0>;
+ spi-max-frequency = <43000000>;
+ };
+};
+
&gpio1 {
gpio-line-names = "", "LED_RED", "WDOG_INT", "X_RTC_INT",
"", "", "", "RESET_ETHPHY",
@@ -170,8 +190,11 @@
&i2c4 {
clock-frequency = <400000>;
- pinctrl-names = "default";
+ pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c4>;
+ pinctrl-1 = <&pinctrl_i2c4_gpio>;
+ sda-gpios = <&gpio5 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpio5 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
/* PCIe */
@@ -333,6 +356,15 @@
>;
};
+ pinctrl_ecspi2: ecspi2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x80
+ MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x80
+ MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x80
+ MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x00
+ >;
+ };
+
pinctrl_fan: fan0grp {
fsl,pins = <
MX8MM_IOMUXC_SAI1_RXD6_GPIO4_IO8 0x16
@@ -346,6 +378,13 @@
>;
};
+ pinctrl_i2c4_gpio: i2c4gpiogrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20 0x1e2
+ MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0x1e2
+ >;
+ };
+
pinctrl_leds: leds1grp {
fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x16
@@ -368,6 +407,12 @@
>;
};
+ pinctrl_tpm: tpmgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x140
+ >;
+ };
+
pinctrl_uart1: uart1grp {
fsl,pins = <
MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_RX 0x00
@@ -388,8 +433,8 @@
pinctrl_uart3: uart3grp {
fsl,pins = <
- MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x40
- MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x40
+ MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
+ MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phycore-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phycore-som.dtsi
index 847f08537b48..6069678244f3 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phycore-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phycore-som.dtsi
@@ -102,6 +102,8 @@
status = "okay";
som_flash: flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
@@ -149,7 +151,6 @@
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <1800000>;
regulator-name = "NVCC_SD2 (LDO2)";
- vselect-en;
regulator-state-mem {
regulator-off-in-suspend;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phygate-tauri-l.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phygate-tauri-l.dts
new file mode 100644
index 000000000000..27a902569e2a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-phygate-tauri-l.dts
@@ -0,0 +1,489 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 PHYTEC Messtechnik GmbH
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+#include "imx8mm-phycore-som.dtsi"
+
+/ {
+ model = "PHYTEC phyGATE-Tauri-L-iMX8MM";
+ compatible = "phytec,imx8mm-phygate-tauri-l",
+ "phytec,imx8mm-phycore-som", "fsl,imx8mm";
+
+ chosen {
+ stdout-path = &uart3;
+ };
+
+ can_osc_40m: clock-can {
+ compatible = "fixed-clock";
+ clock-frequency = <40000000>;
+ clock-output-names = "can_osc_40m";
+ #clock-cells = <0>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpiokeys>;
+
+ key {
+ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ label = "KEY-A";
+ linux,code = <KEY_A>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_leds>;
+
+ led-1 {
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "none";
+ };
+
+ led-2 {
+ color = <LED_COLOR_ID_YELLOW>;
+ gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "none";
+ };
+ };
+
+ usdhc1_pwrseq: pwr-seq {
+ compatible = "mmc-pwrseq-simple";
+ post-power-on-delay-ms = <100>;
+ power-off-delay-us = <60>;
+ reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_usb_hub_vbus: regulator-hub-otg1 {
+ compatible = "regulator-fixed";
+ gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbhubpwr>;
+ regulator-name = "usb_hub_vbus";
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ };
+
+ reg_usb_otg1_vbus: regulator-usb-otg1 {
+ compatible = "regulator-fixed";
+ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotg1pwr>;
+ regulator-name = "usb_otg1_vbus";
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ };
+
+ reg_usdhc2_vmmc: regulator-usdhc2 {
+ compatible = "regulator-fixed";
+ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ off-on-delay-us = <20000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "VSD_3V3";
+ };
+};
+
+&ecspi1 {
+ cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>,
+ <&gpio5 13 GPIO_ACTIVE_LOW>,
+ <&gpio5 2 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ /* CAN MCP251XFD */
+ can0: can@0 {
+ compatible = "microchip,mcp251xfd";
+ reg = <0>;
+ clocks = <&can_osc_40m>;
+ interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can_int>;
+ spi-max-frequency = <10000000>;
+ };
+
+ tpm: tpm@1 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm>;
+ reg = <1>;
+ spi-max-frequency = <38000000>;
+ };
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ pinctrl-1 = <&pinctrl_i2c2_gpio>;
+ scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ status = "okay";
+
+ temp_sense0: temperature-sensor@49 {
+ compatible = "ti,tmp102";
+ reg = <0x49>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tempsense>;
+ #thermal-sensor-cells = <1>;
+ };
+};
+
+&i2c3 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c3>;
+ pinctrl-1 = <&pinctrl_i2c3_gpio>;
+ scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ status = "okay";
+};
+
+&i2c4 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c4>;
+ pinctrl-1 = <&pinctrl_i2c4_gpio>;
+ scl-gpios = <&gpio5 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio5 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ status = "okay";
+};
+
+/* PCIe */
+&pcie0 {
+ assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
+ <&clk IMX8MM_CLK_PCIE1_PHY>,
+ <&clk IMX8MM_CLK_PCIE1_CTRL>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
+ <&clk IMX8MM_SYS_PLL2_100M>,
+ <&clk IMX8MM_SYS_PLL2_250M>;
+ assigned-clock-rates = <10000000>, <100000000>, <250000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie>;
+ reset-gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&pwm1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm1>;
+ status = "okay";
+};
+
+&pwm3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm3>;
+ status = "okay";
+};
+
+&pwm4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm4>;
+ status = "okay";
+};
+
+/* RTC */
+&rv3028 {
+ trickle-resistor-ohms = <3000>;
+};
+
+&uart1 {
+ assigned-clocks = <&clk IMX8MM_CLK_UART1>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+/* UART2 - RS232 */
+&uart2 {
+ assigned-clocks = <&clk IMX8MM_CLK_UART2>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ status = "okay";
+};
+
+/* UART - console */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
+/* USB */
+&usbotg1 {
+ adp-disable;
+ dr_mode = "otg";
+ over-current-active-low;
+ samsung,picophy-pre-emp-curr-control = <3>;
+ samsung,picophy-dc-vol-level-adjust = <7>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotg1>;
+ srp-disable;
+ vbus-supply = <&reg_usb_otg1_vbus>;
+ status = "okay";
+};
+
+&usbotg2 {
+ disable-over-current;
+ dr_mode = "host";
+ samsung,picophy-pre-emp-curr-control = <3>;
+ samsung,picophy-dc-vol-level-adjust = <7>;
+ vbus-supply = <&reg_usb_hub_vbus>;
+ status = "okay";
+};
+
+/* SD-Card */
+&usdhc2 {
+ assigned-clocks = <&clk IMX8MM_CLK_USDHC2>;
+ assigned-clock-rates = <200000000>;
+ bus-width = <4>;
+ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ vqmmc-supply = <&reg_nvcc_sd2>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_can_int: can-intgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x00
+ >;
+ };
+
+ pinctrl_ecspi1: ecspi1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x82
+ MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x82
+ MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x82
+ >;
+ };
+
+ pinctrl_ecspi1_cs: ecspi1csgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x00
+ MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x00
+ MX8MM_IOMUXC_SAI3_MCLK_GPIO5_IO2 0x00
+ >;
+ };
+
+ pinctrl_gpiokeys: keygrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x00
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c2
+ MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c2_gpio: i2c2gpiogrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C2_SDA_GPIO5_IO17 0x1e0
+ MX8MM_IOMUXC_I2C2_SCL_GPIO5_IO16 0x1e0
+ >;
+ };
+
+
+ pinctrl_i2c3: i2c3grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c2
+ MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c3_gpio: i2c3gpiogrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C3_SDA_GPIO5_IO19 0x1e0
+ MX8MM_IOMUXC_I2C3_SCL_GPIO5_IO18 0x1e0
+ >;
+ };
+
+ pinctrl_i2c4: i2c4grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c2
+ MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c4_gpio: i2c4gpiogrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0x1e0
+ MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20 0x1e0
+ >;
+ };
+
+ pinctrl_leds: leds1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI3_RXD_GPIO4_IO30 0x00
+ MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x00
+ >;
+ };
+
+ pinctrl_pcie: pciegrp {
+ fsl,pins = <
+ /* COEX2 */
+ MX8MM_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x00
+ /* COEX1 */
+ MX8MM_IOMUXC_SAI1_TXD0_GPIO4_IO12 0x12
+ >;
+ };
+
+ pinctrl_pwm1: pwm1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT 0x40
+ >;
+ };
+
+ pinctrl_pwm3: pwm3grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SPDIF_TX_PWM3_OUT 0x40
+ >;
+ };
+
+ pinctrl_pwm4: pwm4grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT 0x40
+ >;
+ };
+
+ pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x40
+ >;
+ };
+
+ pinctrl_tempsense: tempsensegrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI3_TXFS_GPIO4_IO31 0x00
+ >;
+ };
+
+ pinctrl_tpm: tpmgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x140
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x00
+ MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x00
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x00
+ MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x00
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
+ MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_usbhubpwr: usbhubpwrgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x00
+ >;
+ };
+
+ pinctrl_usbotg1pwr: usbotg1pwrgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x00
+ >;
+ };
+
+ pinctrl_usbotg1: usbotg1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x80
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x182
+ MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0xc6
+ MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xc6
+ MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xc6
+ MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xc6
+ MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xc6
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x40
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x192
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d2
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d2
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d2
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d2
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d2
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2100mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2200mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx-lvds-tm070jvhg33.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx-lvds-tm070jvhg33.dtso
new file mode 100644
index 000000000000..e44249c6d8a0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx-lvds-tm070jvhg33.dtso
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ compatible = "tq,imx8mm-tqma8mqml-mba8mx", "tq,imx8mm-tqma8mqml", "fsl,imx8mm";
+};
+
+&backlight_lvds {
+ status = "okay";
+};
+
+&dsi_lvds_bridge {
+ status = "okay";
+};
+
+&expander0 {
+ dsi-mux-oe-hog {
+ gpio-hog;
+ gpios = <10 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "DSI_MUX_OE#";
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ status = "okay";
+};
+
+&panel {
+ compatible = "tianma,tm070jvhg33";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx.dts
index 156d793a0c97..ea6e8b85169f 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml-mba8mx.dts
@@ -11,6 +11,7 @@
/ {
model = "TQ-Systems GmbH i.MX8MM TQMa8MxML on MBa8Mx";
compatible = "tq,imx8mm-tqma8mqml-mba8mx", "tq,imx8mm-tqma8mqml", "fsl,imx8mm";
+ chassis-type = "embedded";
aliases {
eeprom0 = &eeprom3;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml.dtsi
index b4466a26d838..8c0c6e715924 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-tqma8mqml.dtsi
@@ -230,6 +230,11 @@
};
};
+&mipi_dsi {
+ vddcore-supply = <&ldo4_reg>;
+ vddio-supply = <&ldo3_reg>;
+};
+
&pcie_phy {
fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
fsl,clkreq-unsupported;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-var-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-var-som.dtsi
index 2b83a5258ec6..d7830df5b6f9 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-var-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-var-som.dtsi
@@ -142,7 +142,7 @@
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw71xx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw71xx.dtsi
index 0ce60ad9c7d5..6425773f68e0 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw71xx.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw71xx.dtsi
@@ -96,7 +96,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio4>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx-0x-rpidsi.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx-0x-rpidsi.dtso
new file mode 100644
index 000000000000..e0768d408c3b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx-0x-rpidsi.dtso
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+#include "imx8mm-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ compatible = "gw,imx8mm-gw73xx-0x", "fsl,imx8mm";
+
+ panel {
+ compatible = "powertip,ph800480t013-idf02";
+ power-supply = <&attiny>;
+ backlight = <&attiny>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&bridge_out>;
+ };
+ };
+ };
+};
+
+&i2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ attiny: regulator@45 {
+ compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
+ reg = <0x45>;
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,burst-clock-frequency = <891000000>;
+ samsung,esc-clock-frequency = <54000000>;
+ samsung,pll-clock-frequency = <27000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ bridge@0 {
+ compatible = "toshiba,tc358762";
+ reg = <0>;
+ vddc-supply = <&attiny>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ bridge_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ bridge_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&bridge_in>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx.dtsi
index 570992a52b75..752caa38eb03 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw72xx.dtsi
@@ -84,8 +84,15 @@
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi2>;
- cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
+ <&gpio1 10 GPIO_ACTIVE_LOW>;
status = "okay";
+
+ tpm@1 {
+ compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
+ reg = <0x1>;
+ spi-max-frequency = <36000000>;
+ };
};
&gpio1 {
@@ -118,7 +125,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio4>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
@@ -153,23 +159,30 @@
pcie@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- pcie@1,0 {
+ pcie@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- pcie@2,3 {
+ pcie@3,0 {
reg = <0x1800 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- eth1: pcie@5,0 {
+ eth1: ethernet@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
local-mac-address = [00 00 00 00 00 00];
};
@@ -313,6 +326,7 @@
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
+ MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0xd6
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx-0x-rpidsi.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx-0x-rpidsi.dtso
new file mode 100644
index 000000000000..e0768d408c3b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx-0x-rpidsi.dtso
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+#include "imx8mm-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ compatible = "gw,imx8mm-gw73xx-0x", "fsl,imx8mm";
+
+ panel {
+ compatible = "powertip,ph800480t013-idf02";
+ power-supply = <&attiny>;
+ backlight = <&attiny>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&bridge_out>;
+ };
+ };
+ };
+};
+
+&i2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ attiny: regulator@45 {
+ compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
+ reg = <0x45>;
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,burst-clock-frequency = <891000000>;
+ samsung,esc-clock-frequency = <54000000>;
+ samsung,pll-clock-frequency = <27000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ bridge@0 {
+ compatible = "toshiba,tc358762";
+ reg = <0>;
+ vddc-supply = <&attiny>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ bridge_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ bridge_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&bridge_in>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx.dtsi
index 1800c6a4b1fc..2aa6c1090fc7 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw73xx.dtsi
@@ -104,8 +104,15 @@
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi2>;
- cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
+ <&gpio1 10 GPIO_ACTIVE_LOW>;
status = "okay";
+
+ tpm@1 {
+ compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
+ reg = <0x1>;
+ spi-max-frequency = <36000000>;
+ };
};
&gpio1 {
@@ -138,7 +145,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio4>;
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
@@ -173,23 +179,30 @@
pcie@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- pcie@1,0 {
+ pcie@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- pcie@2,4 {
+ pcie@4,0 {
reg = <0x2000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- eth1: pcie@6,0 {
+ eth1: ethernet@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
local-mac-address = [00 00 00 00 00 00];
};
@@ -362,6 +375,7 @@
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
+ MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0xd6
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7901.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7901.dts
index 0ec2ce3dd721..87b80e2412cb 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7901.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7901.dts
@@ -242,6 +242,22 @@
};
};
+&A53_0 {
+ cpu-supply = <&buck2>;
+};
+
+&A53_1 {
+ cpu-supply = <&buck2>;
+};
+
+&A53_2 {
+ cpu-supply = <&buck2>;
+};
+
+&A53_3 {
+ cpu-supply = <&buck2>;
+};
+
&ddrc {
operating-points-v2 = <&ddrc_opp_table>;
@@ -341,6 +357,8 @@
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
adc {
compatible = "gw,gsc-adc";
@@ -496,7 +514,7 @@
interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
@@ -511,7 +529,7 @@
};
/* vdd_arm: 0.805-1.0V (typ=0.9V) */
- BUCK2 {
+ buck2: BUCK2 {
regulator-name = "buck2";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
@@ -626,7 +644,6 @@
pinctrl-0 = <&pinctrl_ksz>;
interrupt-parent = <&gpio4>;
interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
- phy-mode = "rgmii-id";
ports {
#address-cells = <1>;
@@ -662,7 +679,6 @@
port@5 {
reg = <5>;
- label = "cpu";
ethernet = <&fec1>;
phy-mode = "rgmii-id";
@@ -773,12 +789,21 @@
/* SDIO WiFi */
&usdhc1 {
- pinctrl-names = "default";
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc1>;
+ pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
bus-width = <4>;
non-removable;
vmmc-supply = <&reg_wifi>;
+ #address-cells = <1>;
+ #size-cells = <0>;
status = "okay";
+
+ wifi@0 {
+ compatible = "brcm,bcm43455-fmac", "brcm,bcm4329-fmac";
+ reg = <0>;
+ };
};
/* microSD */
@@ -1038,6 +1063,28 @@
>;
};
+ pinctrl_usdhc1_100mhz: usdhc1-100mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x194
+ MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d4
+ MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d4
+ MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d4
+ MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d4
+ MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d4
+ >;
+ };
+
+ pinctrl_usdhc1_200mhz: usdhc1-200mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x196
+ MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d6
+ MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d6
+ MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d6
+ MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d6
+ MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d6
+ >;
+ };
+
pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7902.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7902.dts
index 03cd29063312..c11260c26d0b 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7902.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7902.dts
@@ -314,6 +314,8 @@
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
adc {
compatible = "gw,gsc-adc";
@@ -431,7 +433,7 @@
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
@@ -585,7 +587,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio1>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
@@ -634,13 +635,16 @@
pcie@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
- eth1: pcie@1,0 {
+ eth1: ethernet@0,0 {
reg = <0x0000 0 0 0 0>;
- #address-cells = <1>;
- #size-cells = <0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
local-mac-address = [00 00 00 00 00 00];
};
@@ -714,12 +718,21 @@
/* SDIO WiFi */
&usdhc2 {
- pinctrl-names = "default";
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
bus-width = <4>;
non-removable;
vmmc-supply = <&reg_wifi>;
+ #address-cells = <1>;
+ #size-cells = <0>;
status = "okay";
+
+ wifi@0 {
+ compatible = "brcm,bcm43455-fmac", "brcm,bcm4329-fmac";
+ reg = <0>;
+ };
};
/* eMMC */
@@ -992,6 +1005,28 @@
>;
};
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
+ >;
+ };
+
pinctrl_usdhc3: usdhc3grp {
fsl,pins = <
MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x190
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7903.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7903.dts
index 07b07dc954fd..db1737bf637d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7903.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7903.dts
@@ -280,6 +280,8 @@
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
adc {
compatible = "gw,gsc-adc";
@@ -416,7 +418,7 @@
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
@@ -541,7 +543,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio1>;
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7904.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7904.dts
index d5b716855812..05489a31e7fd 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7904.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7904.dts
@@ -330,6 +330,8 @@
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
adc {
compatible = "gw,gsc-adc";
@@ -460,7 +462,7 @@
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
@@ -585,7 +587,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio1>;
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
@@ -640,6 +641,8 @@
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
+ cts-gpios = <&gpio5 26 GPIO_ACTIVE_LOW>;
+ rts-gpios = <&gpio5 27 GPIO_ACTIVE_LOW>;
status = "okay";
};
@@ -650,13 +653,6 @@
status = "okay";
};
-/* off-board RS232 */
-&uart3 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart3>;
- status = "okay";
-};
-
&usbotg1 {
dr_mode = "host";
disable-over-current;
@@ -818,6 +814,8 @@
fsl,pins = <
MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
+ MX8MM_IOMUXC_UART3_RXD_GPIO5_IO26 0x140 /* CTS# in */
+ MX8MM_IOMUXC_UART3_TXD_GPIO5_IO27 0x140 /* RTS# out */
>;
};
@@ -828,13 +826,6 @@
>;
};
- pinctrl_uart3: uart3grp {
- fsl,pins = <
- MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
- MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
- >;
- };
-
pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905-0x.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905-0x.dts
new file mode 100644
index 000000000000..914753f062cd
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905-0x.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+/dts-v1/;
+
+#include "imx8mm.dtsi"
+#include "imx8mm-venice-gw700x.dtsi"
+#include "imx8mm-venice-gw7905.dtsi"
+
+/ {
+ model = "Gateworks Venice GW7905-0x i.MX8MM Development Kit";
+ compatible = "gateworks,imx8mm-gw7905-0x", "fsl,imx8mm";
+
+ chosen {
+ stdout-path = &uart2;
+ };
+};
+
+/* Disable SOM interfaces not used on baseboard */
+&fec1 {
+ status = "disabled";
+};
+
+&usdhc1 {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905.dtsi
new file mode 100644
index 000000000000..5eb92005195c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-venice-gw7905.dtsi
@@ -0,0 +1,303 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/phy/phy-imx8-pcie.h>
+
+/ {
+ led-controller {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_leds>;
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio4 2 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ pcie0_refclk: clock-pcie0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ };
+
+ pps {
+ compatible = "pps-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pps>;
+ gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ reg_usb2_vbus: regulator-usb2-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usb2_en>;
+ regulator-name = "usb2_vbus";
+ gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_usdhc2_vmmc: regulator-usdhc2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+ regulator-name = "SD2_3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+/* off-board header */
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi2>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&gpio1 {
+ gpio-line-names =
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "gpioa", "gpiob", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&gpio4 {
+ gpio-line-names =
+ "", "", "", "pci_usb_sel",
+ "", "", "", "pci_wdis#",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&gpio5 {
+ gpio-line-names =
+ "", "", "", "",
+ "gpioc", "gpiod", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ eeprom@52 {
+ compatible = "atmel,24c32";
+ reg = <0x52>;
+ pagesize = <32>;
+ };
+};
+
+/* off-board header */
+&i2c3 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c3>;
+ status = "okay";
+};
+
+&pcie_phy {
+ fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
+ fsl,clkreq-unsupported;
+ clocks = <&pcie0_refclk>;
+ clock-names = "ref";
+ status = "okay";
+};
+
+&pcie0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie0>;
+ reset-gpio = <&gpio4 6 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+/* GPS */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+/* USB1 - Type C front panel SINK port J14 */
+&usbotg1 {
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+/* USB2 4-port USB3.0 HUB:
+ * P1 - USBC connector (host only)
+ * P2 - USB2 test connector
+ * P3 - miniPCIe full card
+ * P4 - miniPCIe half card
+ */
+&usbotg2 {
+ dr_mode = "host";
+ vbus-supply = <&reg_usb2_vbus>;
+ status = "okay";
+};
+
+/* microSD */
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hog>;
+
+ pinctrl_hog: hoggrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x40000040 /* GPIOA */
+ MX8MM_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x40000040 /* GPIOB */
+ MX8MM_IOMUXC_SAI1_RXD1_GPIO4_IO3 0x40000106 /* PCI_USBSEL */
+ MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7 0x40000106 /* PCIE_WDIS# */
+ MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x40000040 /* GPIOD */
+ MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4 0x40000040 /* GPIOC */
+ >;
+ };
+
+ pinctrl_gpio_leds: gpioledgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI1_RXFS_GPIO4_IO0 0x6 /* LEDG */
+ MX8MM_IOMUXC_SAI1_RXD0_GPIO4_IO2 0x6 /* LEDR */
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c2
+ MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c3: i2c3grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c2
+ MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_pcie0: pciegrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI1_RXD4_GPIO4_IO6 0x106
+ >;
+ };
+
+ pinctrl_pps: ppsgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5 0x106
+ >;
+ };
+
+ pinctrl_reg_usb2_en: regusb2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x6 /* USBHUB_RST# (ext p/u) */
+ >;
+ };
+
+ pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x40
+ >;
+ };
+
+ pinctrl_spi2: spi2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x140
+ MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x140
+ MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x140
+ MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x140
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
+ MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0xc0
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0xc0
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
+ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
+ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
+ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
+ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
+ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
+ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0xc0
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x1c4
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-mallow.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-mallow.dtsi
new file mode 100644
index 000000000000..4a0799d63446
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-mallow.dtsi
@@ -0,0 +1,173 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ *
+ * Common dtsi for Verdin IMX8MM SoM on Mallow carrier board
+ *
+ * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-mini-nano
+ * https://www.toradex.com/products/carrier-board/mallow-carrier-board
+ */
+
+#include <dt-bindings/leds/common.h>
+
+/ {
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_leds>;
+
+ /* SODIMM 52 - USER_LED_1_RED */
+ led-0 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <1>;
+ gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 54 - USER_LED_1_GREEN */
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <1>;
+ gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 56 - USER_LED_2_RED */
+ led-2 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <2>;
+ gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 58 - USER_LED_2_GREEN */
+ led-3 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <2>;
+ gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+/* Verdin SPI_1 */
+&ecspi2 {
+ pinctrl-0 = <&pinctrl_ecspi2>, <&pinctrl_tpm_cs>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>, <&gpio3 2 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ tpm@1 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+ reg = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm_irq>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
+ spi-max-frequency = <18500000>;
+ };
+};
+
+/* EEPROM on Mallow */
+&eeprom_carrier_board {
+ status = "okay";
+};
+
+/* Verdin ETH_1 */
+&fec1 {
+ status = "okay";
+};
+
+/* Temperature sensor on Mallow */
+&hwmon_temp {
+ compatible = "ti,tmp1075";
+ status = "okay";
+};
+
+/* Verdin I2C_2_DSI */
+&i2c2 {
+ status = "okay";
+};
+
+/* Verdin I2C_4_CSI */
+&i2c3 {
+ status = "okay";
+};
+
+/* Verdin I2C_1 */
+&i2c4 {
+ status = "okay";
+};
+
+/* Verdin PCIE_1 */
+&pcie0 {
+ status = "okay";
+};
+
+&pcie_phy {
+ status = "okay";
+};
+
+/* Verdin PWM_3_DSI */
+&pwm1 {
+ status = "okay";
+};
+
+/* Verdin PWM_1 */
+&pwm2 {
+ status = "okay";
+};
+
+/* Verdin PWM_2 */
+&pwm3 {
+ status = "okay";
+};
+
+/* Verdin UART_3 */
+&uart1 {
+ status = "okay";
+};
+
+/* Verdin UART_1 */
+&uart2 {
+ status = "okay";
+};
+
+/* Verdin UART_2 */
+&uart3 {
+ status = "okay";
+};
+
+/* Verdin USB_1 */
+&usbotg1 {
+ status = "okay";
+};
+
+/* Verdin USB_2 */
+&usbotg2 {
+ status = "okay";
+};
+
+/* Verdin SD_1 */
+&usdhc2 {
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_leds: ledsgrp {
+ fsl,pins =
+ <MX8MM_IOMUXC_NAND_ALE_GPIO3_IO0 0x106>, /* SODIMM 52 */
+ <MX8MM_IOMUXC_NAND_CE0_B_GPIO3_IO1 0x106>, /* SODIMM 54 */
+ <MX8MM_IOMUXC_NAND_DATA00_GPIO3_IO6 0x106>, /* SODIMM 56 */
+ <MX8MM_IOMUXC_NAND_DATA01_GPIO3_IO7 0x106>; /* SODIMM 58 */
+ };
+
+ pinctrl_tpm_cs: tpmcsgrp {
+ fsl,pins =
+ <MX8MM_IOMUXC_NAND_CE1_B_GPIO3_IO2 0x146>; /* SODIMM 64 */
+ };
+
+ pinctrl_tpm_irq: tpmirqgrp {
+ fsl,pins =
+ <MX8MM_IOMUXC_NAND_DQS_GPIO3_IO14 0x141>; /* SODIMM 66 */
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-nonwifi-mallow.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-nonwifi-mallow.dts
new file mode 100644
index 000000000000..1b1999f3a80e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-nonwifi-mallow.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+/dts-v1/;
+
+#include "imx8mm-verdin.dtsi"
+#include "imx8mm-verdin-nonwifi.dtsi"
+#include "imx8mm-verdin-mallow.dtsi"
+
+/ {
+ model = "Toradex Verdin iMX8M Mini on Mallow";
+ compatible = "toradex,verdin-imx8mm-nonwifi-mallow",
+ "toradex,verdin-imx8mm-nonwifi",
+ "toradex,verdin-imx8mm",
+ "fsl,imx8mm";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-wifi-mallow.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-wifi-mallow.dts
new file mode 100644
index 000000000000..2916145f31bb
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm-verdin-wifi-mallow.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+/dts-v1/;
+
+#include "imx8mm-verdin.dtsi"
+#include "imx8mm-verdin-wifi.dtsi"
+#include "imx8mm-verdin-mallow.dtsi"
+
+/ {
+ model = "Toradex Verdin iMX8M Mini WB on Mallow";
+ compatible = "toradex,verdin-imx8mm-wifi-mallow",
+ "toradex,verdin-imx8mm-wifi",
+ "toradex,verdin-imx8mm",
+ "fsl,imx8mm";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mm.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mm.dtsi
index 1a647d4072ba..8a1b42b94dce 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mm.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mm.dtsi
@@ -399,6 +399,7 @@
"pll8k", "pll11k", "clkext3";
dmas = <&sdma2 24 25 0x80000000>;
dma-names = "rx";
+ #sound-dai-cells = <0>;
status = "disabled";
};
@@ -635,6 +636,8 @@
clk: clock-controller@30380000 {
compatible = "fsl,imx8mm-ccm";
reg = <0x30380000 0x10000>;
+ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
#clock-cells = <1>;
clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>,
<&clk_ext3>, <&clk_ext4>;
@@ -646,7 +649,6 @@
<&clk IMX8MM_CLK_AUDIO_AHB>,
<&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
<&clk IMX8MM_SYS_PLL3>,
- <&clk IMX8MM_VIDEO_PLL1>,
<&clk IMX8MM_AUDIO_PLL1>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>,
<&clk IMX8MM_ARM_PLL_OUT>,
@@ -656,7 +658,6 @@
<400000000>,
<400000000>,
<750000000>,
- <594000000>,
<393216000>;
};
@@ -1132,7 +1133,7 @@
assigned-clock-parents = <&clk IMX8MM_VIDEO_PLL1_OUT>,
<&clk IMX8MM_SYS_PLL2_1000M>,
<&clk IMX8MM_SYS_PLL1_800M>;
- assigned-clock-rates = <594000000>, <500000000>, <200000000>;
+ assigned-clock-rates = <24000000>, <500000000>, <200000000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_LCDIF>;
status = "disabled";
@@ -1150,12 +1151,8 @@
clocks = <&clk IMX8MM_CLK_DSI_CORE>,
<&clk IMX8MM_CLK_DSI_PHY_REF>;
clock-names = "bus_clk", "sclk_mipi";
- assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>,
- <&clk IMX8MM_CLK_DSI_PHY_REF>;
- assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>,
- <&clk IMX8MM_CLK_24M>;
- assigned-clock-rates = <266000000>, <24000000>;
- samsung,pll-clock-frequency = <24000000>;
+ assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_DSI>;
status = "disabled";
@@ -1344,8 +1341,8 @@
#size-cells = <2>;
device_type = "pci";
bus-range = <0x00 0xff>;
- ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000 /* downstream I/O 64KB */
- 0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
+ ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000>, /* downstream I/O 64KB */
+ <0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
num-lanes = <1>;
num-viewport = <4>;
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
@@ -1407,7 +1404,7 @@
assigned-clocks = <&clk IMX8MM_CLK_GPU3D_CORE>,
<&clk IMX8MM_GPU_PLL_OUT>;
assigned-clock-parents = <&clk IMX8MM_GPU_PLL_OUT>;
- assigned-clock-rates = <0>, <1000000000>;
+ assigned-clock-rates = <0>, <800000000>;
power-domains = <&pgc_gpu>;
};
@@ -1422,7 +1419,7 @@
assigned-clocks = <&clk IMX8MM_CLK_GPU2D_CORE>,
<&clk IMX8MM_GPU_PLL_OUT>;
assigned-clock-parents = <&clk IMX8MM_GPU_PLL_OUT>;
- assigned-clock-rates = <0>, <1000000000>;
+ assigned-clock-rates = <0>, <800000000>;
power-domains = <&pgc_gpu>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-baseboard.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-baseboard.dtsi
index 16761975f56e..20018ee2c803 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-baseboard.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-baseboard.dtsi
@@ -4,6 +4,12 @@
*/
/ {
+ dmic_codec: dmic-codec {
+ compatible = "dmic-codec";
+ num-channels = <1>;
+ #sound-dai-cells = <0>;
+ };
+
leds {
compatible = "gpio-leds";
@@ -74,6 +80,22 @@
enable-active-high;
};
+ sound-dmic {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "dmic";
+ simple-audio-card,format = "pdm";
+ simple-audio-card,bitclock-master = <&dailink_master>;
+ simple-audio-card,frame-master = <&dailink_master>;
+
+ dailink_master: simple-audio-card,cpu {
+ sound-dai = <&micfil>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&dmic_codec>;
+ };
+ };
+
sound-wm8962 {
compatible = "simple-audio-card";
simple-audio-card,name = "wm8962";
@@ -221,6 +243,15 @@
};
};
+&micfil {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pdm>;
+ assigned-clocks = <&clk IMX8MN_CLK_PDM>;
+ assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <49152000>;
+ status = "okay";
+};
+
&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
@@ -311,6 +342,13 @@
>;
};
+ pinctrl_pdm: pdmgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SAI5_RXC_PDM_CLK 0xd6
+ MX8MN_IOMUXC_SAI5_RXD0_PDM_BIT_STREAM0 0xd6
+ >;
+ };
+
pinctrl_reg_usb_otg: reg-otggrp {
fsl,pins = <
MX8MN_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-kit.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-kit.dts
index 1392ce02587b..35b8d2060cd9 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-kit.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-kit.dts
@@ -16,4 +16,137 @@
chosen {
stdout-path = &uart2;
};
+
+ connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&adv7535_out>;
+ };
+ };
+ };
+
+ reg_hdmi: regulator-hdmi-dvdd {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_hdmi>;
+ regulator-name = "hdmi_pwr_en";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ startup-delay-us = <70000>;
+ regulator-always-on;
+ };
+
+ sound-hdmi {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "sound-hdmi";
+ simple-audio-card,format = "i2s";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai5>;
+ system-clock-direction-out;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&adv_bridge>;
+ };
+ };
+};
+
+&i2c2 {
+ adv_bridge: hdmi@3d {
+ compatible = "adi,adv7535";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hdmi_bridge>;
+ reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
+ reg-names = "main", "cec", "edid", "packet";
+ adi,dsi-lanes = <4>;
+ avdd-supply = <&reg_hdmi>;
+ a2vdd-supply = <&reg_hdmi>;
+ dvdd-supply = <&reg_hdmi>;
+ pvdd-supply = <&reg_hdmi>;
+ v1p2-supply = <&reg_hdmi>;
+ v3p3-supply = <&reg_hdmi>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adv7535_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ adv7535_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
+};
+
+&lcdif {
+ assigned-clocks = <&clk IMX8MN_VIDEO_PLL1>;
+ assigned-clock-rates = <594000000>;
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <20000000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&adv7535_in>;
+ };
+ };
+ };
+};
+
+&sai5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai5>;
+ assigned-clocks = <&clk IMX8MN_CLK_SAI5>;
+ assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <24576000>;
+ #sound-dai-cells = <0>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_hdmi_bridge: hdmibridgegrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x19
+ >;
+ };
+
+ pinctrl_reg_hdmi: reghdmigrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11 0x16
+ >;
+ };
+
+ pinctrl_sai5: sai5grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0 0xd6
+ MX8MN_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK 0xd6
+ MX8MN_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC 0xd6
+ >;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-som.dtsi
index 8a4369d38903..2a64115eebf1 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-beacon-som.dtsi
@@ -3,6 +3,8 @@
* Copyright 2020 Compass Electronics Group, LLC
*/
+#include "imx8mn-overdrive.dtsi"
+
/ {
aliases {
rtc0 = &rtc;
@@ -121,7 +123,7 @@
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-common.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-common.dtsi
index 8e100e71b8d2..bbb07c650da9 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-common.dtsi
@@ -7,6 +7,7 @@
/dts-v1/;
#include "imx8mn.dtsi"
+#include "imx8mn-bsh-smm-s2-display.dtsi"
/ {
chosen {
@@ -92,7 +93,7 @@
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-display.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-display.dtsi
new file mode 100644
index 000000000000..7675583a6b67
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2-display.dtsi
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2021 BSH
+ */
+
+/ {
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm1 0 700000 0>; /* 700000 ns = 1337Hz */
+ brightness-levels = <0 100>;
+ num-interpolated-steps = <100>;
+ default-brightness-level = <50>;
+ status = "okay";
+ };
+
+ reg_3v3_dvdd: regulator-3v3-O3 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_dvdd>;
+ regulator-name = "3v3-dvdd-supply";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_v3v3_avdd: regulator-3v3-O2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_avdd>;
+ regulator-name = "3v3-avdd-supply";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pwm1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_bl>;
+ status = "okay";
+};
+
+&lcdif {
+ assigned-clocks = <&clk IMX8MN_VIDEO_PLL1>;
+ assigned-clock-rates = <594000000>;
+ status = "okay";
+};
+
+&pgc_dispmix {
+ assigned-clocks = <&clk IMX8MN_CLK_DISP_AXI>, <&clk IMX8MN_CLK_DISP_APB>;
+ assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>, <&clk IMX8MN_SYS_PLL1_800M>;
+ assigned-clock-rates = <500000000>, <200000000>;
+};
+
+&mipi_dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ samsung,esc-clock-frequency = <20000000>;
+ samsung,pll-clock-frequency = <12000000>;
+ status = "okay";
+
+ panel@0 {
+ compatible = "sharp,ls068b3sx02", "syna,r63353";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_panel>;
+ reg = <0>;
+
+ backlight = <&backlight>;
+ dvdd-supply = <&reg_3v3_dvdd>;
+ avdd-supply = <&reg_v3v3_avdd>;
+ reset-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mipi_dsi_out>;
+ };
+ };
+
+ };
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ mipi_dsi_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
+&gpu {
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_avdd: avddgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x16 /* VDD 3V3_VO2 */
+ >;
+ };
+
+ /* This is for both PWM and voltage regulators for display */
+ pinctrl_bl: blgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO01_PWM1_OUT 0x16
+ >;
+ };
+
+ pinctrl_dvdd: dvddgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x16 /* VDD 3V3_VO3 */
+ >;
+ };
+
+ pinctrl_panel: panelgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SAI3_RXC_GPIO4_IO29 0x16 /* panel reset */
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2.dts
index 7acc5a960dd9..11a1ba5bfdb7 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-bsh-smm-s2.dts
@@ -21,7 +21,6 @@
&gpmi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpmi_nand>;
- nand-on-flash-bbt;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-ddr4-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-ddr4-evk.dts
index 5110d59b719f..cc2ff59ac53b 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-ddr4-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-ddr4-evk.dts
@@ -60,7 +60,7 @@
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-dimonoff-gateway-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-dimonoff-gateway-evk.dts
new file mode 100644
index 000000000000..6f9b82958b96
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-dimonoff-gateway-evk.dts
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2022 DimOnOff
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/usb/pd.h>
+#include "imx8mn-var-som-symphony.dts"
+
+/ {
+ model = "DimOnOff Gateway EVK board";
+ compatible = "dimonoff,gateway-evk", "variscite,var-som-mx8mn",
+ "fsl,imx8mn";
+
+ /*
+ * U30 FPF2193 regulator.
+ * Source = BASE_PER_3V3 = SOM_3V3 (COM pin 49).
+ */
+ reg_disp_3v3: regulator-disp-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "Display 3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_keys>;
+
+ key-enter {
+ label = "enter";
+ gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_ENTER>;
+ wakeup-source;
+ };
+ };
+
+ /* Bourns PEC12R rotary encoder, 24 steps. */
+ rotary: rotary-encoder {
+ compatible = "rotary-encoder";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rotary>;
+ gpios = <&gpio5 12 GPIO_ACTIVE_LOW>, /* A */
+ <&gpio5 13 GPIO_ACTIVE_LOW>; /* B */
+ linux,axis = <0>; /* REL_X */
+ rotary-encoder,encoding = "gray";
+ rotary-encoder,relative-axis;
+ };
+};
+
+/* Disable Asynchronous Sample Rate Converter (audio) */
+&easrc {
+ status = "disabled";
+};
+
+&ecspi1 {
+ /* Resistive touch controller */
+ /delete-node/ touchscreen@0;
+};
+
+&gpu {
+ status = "disabled";
+};
+
+&i2c2 {
+ adc@48 {
+ compatible = "ti,ads7924";
+ reg = <0x48>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc>;
+ vref-supply = <&reg_disp_3v3>;
+ reset-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ reg = <0>;
+ label = "Pot0";
+ };
+ channel@1 {
+ reg = <1>;
+ label = "Pot1";
+ };
+ channel@2 {
+ reg = <2>;
+ label = "Pot2";
+ };
+ channel@3 {
+ reg = <3>;
+ label = "Pot3";
+ };
+ };
+
+ rtc@51 {
+ compatible = "nxp,pcf2129";
+ reg = <0x51>;
+ reset-source; /* For watchdog. */
+ };
+
+ rtc@53 {
+ compatible = "nxp,pcf2131";
+ reg = <0x53>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rtc>;
+ reset-source; /* For watchdog. */
+ interrupt-parent = <&gpio5>;
+ interrupts = <10 IRQ_TYPE_EDGE_FALLING>; /* J17.6 on EVK */
+ };
+};
+
+&i2c3 {
+ touchscreen@38 {
+ status = "disabled";
+ };
+
+ codec@1a {
+ status = "disabled";
+ };
+
+ /* DS1337 RTC module */
+ rtc@68 {
+ status = "disabled";
+ };
+};
+
+&sai5 {
+ status = "disabled";
+};
+
+&iomuxc {
+ pinctrl_gpio_keys: gpiokeysgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO08_GPIO1_IO8 0xc6
+ >;
+ };
+
+ pinctrl_rotary: rotarygrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_ECSPI2_MISO_GPIO5_IO12 0x00000156
+ MX8MN_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x00000156
+ >;
+ };
+
+ pinctrl_adc: adcgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x00000156
+ >;
+ };
+
+ pinctrl_rtc: rtcgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_ECSPI2_SCLK_GPIO5_IO10 0x00000156
+ MX8MN_IOMUXC_ECSPI2_MOSI_GPIO5_IO11 0x00000156
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dts
index 4839a962a170..0b71f50d936e 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dts
@@ -40,7 +40,7 @@
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
regulators {
- buck1: BUCK1{
+ buck1: BUCK1 {
regulator-name = "VDD_SOC";
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <950000>;
@@ -59,7 +59,7 @@
regulator-ramp-delay = <3125>;
};
- buck4: BUCK4{
+ buck4: BUCK4 {
regulator-name = "VDD_3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -67,7 +67,7 @@
regulator-always-on;
};
- buck5: BUCK5{
+ buck5: BUCK5 {
regulator-name = "VDD_1V8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dtsi
index 1443857bfa5f..a0e13d3324ed 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-evk.dtsi
@@ -23,6 +23,18 @@
};
};
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&adv7533_out>;
+ };
+ };
+ };
+
memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0 0x80000000>;
@@ -59,8 +71,6 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_wlf>;
wlf,mute-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
- clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
- clock-names = "mclk";
};
sound-bt-sco {
@@ -163,10 +173,45 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c2>;
pinctrl-1 = <&pinctrl_i2c2_gpio>;
- scl-gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
+ hdmi@3d {
+ compatible = "adi,adv7535";
+ reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
+ reg-names = "main", "cec", "edid", "packet";
+ adi,dsi-lanes = <4>;
+
+ adi,input-depth = <8>;
+ adi,input-colorspace = "rgb";
+ adi,input-clock = "1x";
+ adi,input-style = <1>;
+ adi,input-justification = "evenly";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adv7533_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ adv7533_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+
+ };
+ };
+
ptn5110: tcpc@50 {
compatible = "nxp,ptn5110";
pinctrl-names = "default";
@@ -176,12 +221,6 @@
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
status = "okay";
- port {
- typec1_dr_sw: endpoint {
- remote-endpoint = <&usb1_drd_sw>;
- };
- };
-
typec1_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
@@ -193,6 +232,12 @@
PDO_VAR(5000, 20000, 3000)>;
op-sink-microwatt = <15000000>;
self-powered;
+
+ port {
+ typec1_dr_sw: endpoint {
+ remote-endpoint = <&usb1_drd_sw>;
+ };
+ };
};
};
};
@@ -212,6 +257,65 @@
gpio-controller;
#gpio-cells = <2>;
};
+
+ camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_camera>;
+ clocks = <&clk IMX8MN_CLK_CLKO1>;
+ clock-names = "xclk";
+ assigned-clocks = <&clk IMX8MN_CLK_CLKO1>;
+ assigned-clock-parents = <&clk IMX8MN_CLK_24M>;
+ assigned-clock-rates = <24000000>;
+ powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+
+ port {
+ ov5640_to_mipi_csi2: endpoint {
+ remote-endpoint = <&imx8mn_mipi_csi_in>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&isi {
+ status = "okay";
+};
+
+&mipi_csi {
+ status = "okay";
+
+ ports {
+ port@0 {
+ imx8mn_mipi_csi_in: endpoint {
+ remote-endpoint = <&ov5640_to_mipi_csi2>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <10000000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&adv7533_in>;
+ data-lanes = <1 2 3 4>;
+ };
+ };
+ };
};
&sai2 {
@@ -326,6 +430,14 @@
};
&iomuxc {
+ pinctrl_camera: cameragrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19
+ MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19
+ MX8MN_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59
+ >;
+ };
+
pinctrl_fec1: fec1grp {
fsl,pins = <
MX8MN_IOMUXC_ENET_MDC_ENET1_MDC 0x3
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-overdrive.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-overdrive.dtsi
new file mode 100644
index 000000000000..5d03fb893e90
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-overdrive.dtsi
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+&gpu {
+ assigned-clocks = <&clk IMX8MN_CLK_GPU_CORE>,
+ <&clk IMX8MN_CLK_GPU_SHADER>,
+ <&clk IMX8MN_CLK_GPU_AXI>,
+ <&clk IMX8MN_CLK_GPU_AHB>,
+ <&clk IMX8MN_GPU_PLL>;
+ assigned-clock-parents = <&clk IMX8MN_GPU_PLL_OUT>,
+ <&clk IMX8MN_GPU_PLL_OUT>,
+ <&clk IMX8MN_SYS_PLL1_800M>,
+ <&clk IMX8MN_SYS_PLL1_800M>;
+ assigned-clock-rates = <600000000>,
+ <600000000>,
+ <800000000>,
+ <400000000>,
+ <1200000000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-rve-gateway.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-rve-gateway.dts
new file mode 100644
index 000000000000..1b633bd1ebb6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-rve-gateway.dts
@@ -0,0 +1,285 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 DimOnOff
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/usb/pd.h>
+#include "imx8mn-var-som.dtsi"
+
+/ {
+ model = "RVE gateway";
+ compatible = "rve,rve-gateway", "variscite,var-som-mx8mn", "fsl,imx8mn";
+
+ crystal_duart_24m: crystal-duart-24m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_keys>;
+
+ key-enter {
+ label = "enter";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_ENTER>;
+ };
+
+ key-exit {
+ label = "exit";
+ gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_ESC>;
+ };
+ };
+
+ lcd {
+ compatible = "hit,hd44780";
+ display-height-chars = <2>;
+ display-width-chars = <20>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd>;
+ data-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>,
+ <&gpio1 6 GPIO_ACTIVE_HIGH>,
+ <&gpio1 14 GPIO_ACTIVE_HIGH>,
+ <&gpio4 28 GPIO_ACTIVE_HIGH>,
+ <&gpio5 24 GPIO_ACTIVE_HIGH>,
+ <&gpio5 2 GPIO_ACTIVE_HIGH>,
+ <&gpio1 12 GPIO_ACTIVE_HIGH>,
+ <&gpio5 25 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>;
+ rs-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ rw-gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>;
+ };
+
+ reg_3p3v: regulator-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ /* Bourns PEC12R rotary encoder, 24 steps. */
+ rotary: rotary-encoder {
+ compatible = "rotary-encoder";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rotary>;
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>, /* A */
+ <&gpio3 21 GPIO_ACTIVE_LOW>; /* B */
+ linux,axis = <0>; /* REL_X */
+ rotary-encoder,encoding = "gray";
+ rotary-encoder,relative-axis;
+ };
+};
+
+&ecspi1 {
+ cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
+
+ duart1: serial@0 {
+ compatible = "nxp,sc16is752";
+ reg = <0>;
+ spi-rx-bus-width = <1>;
+ spi-tx-bus-width = <1>;
+ spi-max-frequency = <4000000>;
+ clocks = <&crystal_duart_24m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <22 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "RADIO0", "RADIO1", "RADIO2", "RADIO3",
+ "RADIO4", "RADIO_RESET", "TP12", "TP11";
+ linux,rs485-enabled-at-boot-time;
+ rs485-rts-active-low;
+ };
+
+ /delete-node/ touchscreen@0;
+};
+
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ecspi2>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
+ status = "okay";
+
+ duart2: serial@0 {
+ compatible = "nxp,sc16is752";
+ reg = <0>;
+ spi-rx-bus-width = <1>;
+ spi-tx-bus-width = <1>;
+ spi-max-frequency = <4000000>;
+ clocks = <&crystal_duart_24m>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "LED_B_USER", "LED_R_USER", "LED_G_USER",
+ "GPIO_EXT3", "GPIO_EXT2", "GPIO_EXT1",
+ "GPIO_EXT0", "TP13";
+ linux,rs485-enabled-at-boot-time;
+ rs485-rts-active-low;
+ };
+};
+
+/* Configure PWM pins in GPIO mode: */
+&gpio5 {
+ gpio-line-names = "", "", "", "PWM3", "PWM2", "PWM1";
+};
+
+&gpu {
+ status = "disabled";
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ /* Carrier board EEPROM */
+ eeprom_cb: eeprom@56 {
+ compatible = "atmel,24c04";
+ reg = <0x56>;
+ pagesize = <16>;
+ vcc-supply = <&reg_3p3v>;
+ };
+
+ lm75: sensor@48 {
+ compatible = "st,stlm75";
+ reg = <0x48>;
+ vs-supply = <&reg_3p3v>;
+ };
+
+ mcp7940: rtc@6f {
+ compatible = "microchip,mcp7940x";
+ reg = <0x6f>;
+ };
+};
+
+&i2c3 {
+ codec@1a {
+ status = "disabled";
+ };
+};
+
+&i2c4 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c4>;
+ status = "okay";
+
+ pcf8574_1: gpio@38 {
+ compatible = "nxp,pcf8574";
+ reg = <0x38>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "LED_B_COMM3", "LED_R_COMM3", "LED_G_COMM3",
+ "TP14", "TP15", "LED_G_COMM4", "LED_R_COMM4",
+ "LED_B_COMM4";
+ };
+
+ pcf8574_2: gpio@39 {
+ compatible = "nxp,pcf8574";
+ reg = <0x39>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "LED_B_COMM2", "LED_G_COMM2", "LED_B_COMM1",
+ "LED_R_COMM2", "LED_R_COMM1", "LED_G_COMM1",
+ "TP16", "TP17";
+ };
+};
+
+/* Bluetooth */
+&uart2 {
+ status = "disabled";
+};
+
+&usbotg1 {
+ dr_mode = "host";
+ disable-over-current;
+ status = "okay";
+};
+
+/* SD interface on expansion connector. */
+&usdhc2 {
+ vmmc-supply = <&reg_3p3v>;
+ cd-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
+};
+
+&iomuxc {
+ pinctrl_ecspi1: ecspi1grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x13
+ MX8MN_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x13
+ MX8MN_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x13
+ MX8MN_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x13 /* SS0 */
+ MX8MN_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x13 /* SC16 IRQ */
+ >;
+ };
+
+ pinctrl_ecspi2: ecspi2grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x13
+ MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x13
+ MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x13
+ MX8MN_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x13 /* SS0 */
+ MX8MN_IOMUXC_SAI5_RXC_GPIO3_IO20 0x13 /* SC16 IRQ */
+ >;
+ };
+
+ pinctrl_gpio_keys: gpiokeysgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO01_GPIO1_IO1 0xc6 /* Enter */
+ MX8MN_IOMUXC_SAI5_RXD2_GPIO3_IO23 0xc6 /* Exit */
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3
+ MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3
+ >;
+ };
+
+ pinctrl_i2c4: i2c4grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c3
+ MX8MN_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c3
+ >;
+ };
+
+ pinctrl_lcd: lcdgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SAI3_TXD_GPIO5_IO1 0x00000156 /* D0 */
+ MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x00000156 /* D1 */
+ MX8MN_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x00000156 /* D2 */
+ MX8MN_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x00000156 /* D3 */
+ MX8MN_IOMUXC_UART2_RXD_GPIO5_IO24 0x00000156 /* D4 */
+ MX8MN_IOMUXC_SAI3_MCLK_GPIO5_IO2 0x00000156 /* D5 */
+ MX8MN_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x00000156 /* D6 */
+ MX8MN_IOMUXC_UART2_TXD_GPIO5_IO25 0x00000156 /* D7 */
+ MX8MN_IOMUXC_UART1_TXD_GPIO5_IO23 0x00000156 /* E */
+ MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x00000156 /* RS */
+ MX8MN_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x00000156 /* R/W */
+ >;
+ };
+
+ pinctrl_rotary: rotarygrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x00000156 /* A */
+ MX8MN_IOMUXC_SAI5_RXD0_GPIO3_IO21 0x00000156 /* B */
+ >;
+ };
+
+ /* Override Card Detect function GPIO value (GPIO1_IO10) from SOM: */
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x41
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx-lvds-tm070jvhg33.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx-lvds-tm070jvhg33.dtso
new file mode 100644
index 000000000000..29235e390a5d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx-lvds-tm070jvhg33.dtso
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ compatible = "tq,imx8mn-tqma8mqnl-mba8mx", "tq,imx8mn-tqma8mqnl", "fsl,imx8mn";
+};
+
+&backlight_lvds {
+ status = "okay";
+};
+
+&dsi_lvds_bridge {
+ status = "okay";
+};
+
+&expander0 {
+ dsi-mux-oe-hog {
+ gpio-hog;
+ gpios = <10 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "DSI_MUX_OE#";
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ status = "okay";
+};
+
+&panel {
+ compatible = "tianma,tm070jvhg33";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx.dts
index 3f1e49bfe38f..c07d59147ab5 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl-mba8mx.dts
@@ -11,6 +11,7 @@
/ {
model = "TQ-Systems GmbH i.MX8MN TQMa8MxNL on MBa8Mx";
compatible = "tq,imx8mn-tqma8mqnl-mba8mx", "tq,imx8mn-tqma8mqnl", "fsl,imx8mn";
+ chassis-type = "embedded";
aliases {
eeprom0 = &eeprom3;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl.dtsi
index 31ae338b7ed9..fb24b9aa1b93 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-tqma8mqnl.dtsi
@@ -208,15 +208,22 @@
read-only;
reg = <0x53>;
pagesize = <16>;
+ vcc-supply = <&reg_vcc3v3>;
};
eeprom0: eeprom@57 {
compatible = "atmel,24c64";
reg = <0x57>;
pagesize = <32>;
+ vcc-supply = <&reg_vcc3v3>;
};
};
+&mipi_dsi {
+ vddcore-supply = <&ldo4_reg>;
+ vddio-supply = <&ldo3_reg>;
+};
+
&usdhc3 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc3>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som-symphony.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som-symphony.dts
index 406a711486da..a6b94d1957c9 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som-symphony.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som-symphony.dts
@@ -1,11 +1,14 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
+ * Supports Symphony evaluation board versions >= 1.4a.
+ *
* Copyright 2019-2020 Variscite Ltd.
* Copyright (C) 2020 Krzysztof Kozlowski <krzk@kernel.org>
*/
/dts-v1/;
+#include <dt-bindings/usb/pd.h>
#include "imx8mn-var-som.dtsi"
/ {
@@ -54,6 +57,15 @@
linux,default-trigger = "heartbeat";
};
};
+
+ /* Peripherals supply, enabled by Q2 after SOM_3V3 rises. */
+ reg_per_3v3: regulator-peripheral-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "per_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
};
&ethphy {
@@ -76,6 +88,7 @@
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
#gpio-cells = <2>;
wakeup-source;
+ vcc-supply = <&reg_per_3v3>;
/* USB 3.0 OTG (usbotg1) / SATA port switch, set to USB 3.0 */
usb3-sata-sel-hog {
@@ -100,14 +113,26 @@
};
};
+ /*
+ * For Symphony board version <= 1.4, the PTN5150 IRQ pin is connected
+ * to GPIO1_IO11 on the SoM (R106 present, R132 absent). From Symphony
+ * board version >= 1.4a, the PTN5150 ID pin is connected to GPIO1_IO11
+ * on the SoM (R106 absent, R132 present).
+ */
extcon_usbotg1: typec@3d {
compatible = "nxp,ptn5150";
reg = <0x3d>;
interrupt-parent = <&gpio1>;
- interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+ interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ptn5150>;
status = "okay";
+
+ port {
+ typec1_dr_sw: endpoint {
+ remote-endpoint = <&usb1_drd_sw>;
+ };
+ };
};
};
@@ -148,8 +173,21 @@
};
&usbotg1 {
+ dr_mode = "otg";
+ hnp-disable;
+ srp-disable;
+ adp-disable;
+ usb-role-switch;
disable-over-current;
- extcon = <&extcon_usbotg1>, <&extcon_usbotg1>;
+ samsung,picophy-pre-emp-curr-control = <3>;
+ samsung,picophy-dc-vol-level-adjust = <7>;
+ status = "okay";
+
+ port {
+ usb1_drd_sw: endpoint {
+ remote-endpoint = <&typec1_dr_sw>;
+ };
+ };
};
&iomuxc {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som.dtsi
index b8946edf317b..b364307868f2 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-var-som.dtsi
@@ -31,6 +31,14 @@
gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
+
+ reg_3v3_fixed: regulator-3v3-fixed {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
};
&A53_0 {
@@ -234,6 +242,7 @@
compatible = "atmel,24c04";
reg = <0x52>;
pagesize = <16>;
+ vcc-supply = <&reg_3v3_fixed>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-venice-gw7902.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-venice-gw7902.dts
index 2ddba4213001..0b1fa04f1d67 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn-venice-gw7902.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn-venice-gw7902.dts
@@ -312,6 +312,8 @@
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
adc {
compatible = "gw,gsc-adc";
@@ -429,7 +431,7 @@
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
- clocks = <&osc_32k 0>;
+ clocks = <&osc_32k>;
clock-output-names = "clk-32k-out";
regulators {
@@ -583,7 +585,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio1>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
};
@@ -667,12 +668,21 @@
/* SDIO WiFi */
&usdhc2 {
- pinctrl-names = "default";
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
bus-width = <4>;
non-removable;
vmmc-supply = <&reg_wifi>;
+ #address-cells = <1>;
+ #size-cells = <0>;
status = "okay";
+
+ wifi@0 {
+ compatible = "brcm,bcm43455-fmac", "brcm,bcm4329-fmac";
+ reg = <0>;
+ };
};
/* eMMC */
@@ -923,6 +933,28 @@
>;
};
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
+ MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
+ MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
+ MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
+ MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
+ MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
+ MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
+ MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
+ MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
+ MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
+ MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
+ >;
+ };
+
pinctrl_usdhc3: usdhc3grp {
fsl,pins = <
MX8MN_IOMUXC_NAND_WE_B_USDHC3_CLK 0x190
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mn.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mn.dtsi
index aa38dd6dc9ba..136e75c51251 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mn.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mn.dtsi
@@ -371,6 +371,7 @@
"pll8k", "pll11k", "clkext3";
dmas = <&sdma2 24 25 0x80000000>;
dma-names = "rx";
+ #sound-dai-cells = <0>;
status = "disabled";
};
@@ -636,6 +637,8 @@
clk: clock-controller@30380000 {
compatible = "fsl,imx8mn-ccm";
reg = <0x30380000 0x10000>;
+ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
#clock-cells = <1>;
clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>,
<&clk_ext3>, <&clk_ext4>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-beacon-kit.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-beacon-kit.dts
index 06e91297fb16..a08057410bde 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-beacon-kit.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-beacon-kit.dts
@@ -23,6 +23,12 @@
stdout-path = &uart2;
};
+ clk_xtal25: clock-xtal25 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <25000000>;
+ };
+
connector {
compatible = "usb-c-connector";
label = "USB-C";
@@ -49,6 +55,12 @@
};
};
+ dmic_codec: dmic-codec {
+ compatible = "dmic-codec";
+ num-channels = <1>;
+ #sound-dai-cells = <0>;
+ };
+
gpio-keys {
compatible = "gpio-keys";
autorepeat;
@@ -82,6 +94,17 @@
};
};
+ bridge-connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con: endpoint {
+ remote-endpoint = <&adv7535_out>;
+ };
+ };
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -112,12 +135,6 @@
};
};
- pcie0_refclk: clock-pcie {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <100000000>;
- };
-
reg_audio: regulator-wm8962 {
compatible = "regulator-fixed";
regulator-name = "3v3_aud";
@@ -147,6 +164,37 @@
enable-active-high;
};
+ sound-adv7535 {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "sound-adv7535";
+ simple-audio-card,format = "i2s";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai5>;
+ system-clock-direction-out;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&adv_bridge>;
+ };
+ };
+
+ sound-dmic {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "sound-pdm";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink_master>;
+ simple-audio-card,frame-master = <&dailink_master>;
+
+ dailink_master: simple-audio-card,cpu {
+ sound-dai = <&micfil>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&dmic_codec>;
+ };
+ };
+
sound-wm8962 {
compatible = "simple-audio-card";
simple-audio-card,name = "wm8962";
@@ -174,6 +222,11 @@
};
};
+&audio_blk_ctrl {
+ assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>, <&clk IMX8MP_AUDIO_PLL2>;
+ assigned-clock-rates = <393216000>, <135475200>;
+};
+
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
@@ -181,7 +234,7 @@
status = "okay";
tpm: tpm@0 {
- compatible = "infineon,slb9670";
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_tpm>;
@@ -246,6 +299,42 @@
interrupt-controller;
#interrupt-cells = <2>;
};
+
+ adv_bridge: hdmi@3d {
+ compatible = "adi,adv7535";
+ reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
+ reg-names = "main", "cec", "edid", "packet";
+ adi,dsi-lanes = <4>;
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adv7535_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ adv7535_out: endpoint {
+ remote-endpoint = <&hdmi_con>;
+ };
+ };
+ };
+ };
+
+ pcieclk: clock-generator@68 {
+ compatible = "renesas,9fgv0241";
+ reg = <0x68>;
+ clocks = <&clk_xtal25>;
+ #clock-cells = <1>;
+ };
};
&i2c3 {
@@ -364,6 +453,34 @@
};
};
+&lcdif1 {
+ status = "okay";
+};
+
+&micfil {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pdm>;
+ assigned-clocks = <&clk IMX8MP_CLK_PDM>;
+ assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <49152000>;
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <10000000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&adv7535_in>;
+ };
+ };
+ };
+};
+
&pcie {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie>;
@@ -372,8 +489,9 @@
};
&pcie_phy {
+ fsl,clkreq-unsupported;
fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
- clocks = <&pcie0_refclk>;
+ clocks = <&pcieclk 1>;
clock-names = "ref";
status = "okay";
};
@@ -381,8 +499,19 @@
&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
- assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
+ assigned-clocks = <&clk IMX8MP_CLK_SAI3>,
+ <&clk IMX8MP_AUDIO_PLL2> ;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
+ assigned-clock-rates = <12288000>, <361267200>;
+ fsl,sai-mclk-direction-output;
+ status = "okay";
+};
+
+&sai5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai5>;
+ assigned-clocks = <&clk IMX8MP_CLK_SAI5>;
+ assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12288000>;
fsl,sai-mclk-direction-output;
status = "okay";
@@ -544,6 +673,13 @@
>;
};
+ pinctrl_pdm: pdmgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXC__AUDIOMIX_PDM_CLK 0xd6
+ MX8MP_IOMUXC_SAI5_RXD0__AUDIOMIX_PDM_BIT_STREAM00 0xd6
+ >;
+ };
+
pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
fsl,pins = <
MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x40
@@ -560,6 +696,14 @@
>;
};
+ pinctrl_sai5: sai5grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD3__AUDIOMIX_SAI5_TX_DATA00 0xd6
+ MX8MP_IOMUXC_SAI5_RXD2__AUDIOMIX_SAI5_TX_BCLK 0xd6
+ MX8MP_IOMUXC_SAI5_RXD1__AUDIOMIX_SAI5_TX_SYNC 0xd6
+ >;
+ };
+
pinctrl_tpm: tpmgrp {
fsl,pins = <
MX8MP_IOMUXC_SAI1_RXFS__GPIO4_IO00 0x19 /* Reset */
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-data-modul-edm-sbc.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-data-modul-edm-sbc.dts
index 13674dc64be9..5828c9d7821d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-data-modul-edm-sbc.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-data-modul-edm-sbc.dts
@@ -362,6 +362,8 @@
};
buck2: BUCK2 { /* VDD_ARM */
+ nxp,dvs-run-voltage = <950000>;
+ nxp,dvs-standby-voltage = <850000>;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <1000000>;
regulator-ramp-delay = <3125>;
@@ -484,7 +486,7 @@
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
- status = "okay";
+ status = "disabled";
};
&usb3_phy0 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-model-a.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-model-a.dts
index b4409349eb3f..2c19766ebf09 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-model-a.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-model-a.dts
@@ -75,7 +75,7 @@
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
- phy-connection-type = "rgmii-id";
+ phy-mode = "rgmii-id";
phy-handle = <&ethphy0>;
status = "okay";
@@ -129,7 +129,7 @@
nxp,dvs-standby-voltage = <850000>;
};
- buck4: BUCK4{
+ buck4: BUCK4 {
regulator-name = "BUCK4";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <3400000>;
@@ -137,7 +137,7 @@
regulator-always-on;
};
- buck5: BUCK5{
+ buck5: BUCK5 {
regulator-name = "BUCK5";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <3400000>;
@@ -226,7 +226,6 @@
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
- clock-frequency = <32768>;
clock-output-names = "xin32k";
interrupt-parent = <&gpio2>;
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
@@ -285,7 +284,6 @@
usb_hub_2_x: hub@1 {
compatible = "usbbda,5411";
reg = <1>;
- reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
vdd-supply = <&reg_usb_hub>;
peer-hub = <&usb_hub_3_x>;
};
@@ -294,7 +292,6 @@
usb_hub_3_x: hub@2 {
compatible = "usbbda,411";
reg = <2>;
- reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
vdd-supply = <&reg_usb_hub>;
peer-hub = <&usb_hub_2_x>;
};
@@ -355,28 +352,6 @@
>;
};
- pinctrl_fec: fecgrp {
- fsl,pins = <
- MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC 0x3
- MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO 0x3
- MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0 0x91
- MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1 0x91
- MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2 0x91
- MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3 0x91
- MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC 0x91
- MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x91
- MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0 0x1f
- MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1 0x1f
- MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2 0x1f
- MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3 0x1f
- MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x1f
- MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC 0x1f
- MX8MP_IOMUXC_SAI1_RXD1__ENET1_1588_EVENT1_OUT 0x1f
- MX8MP_IOMUXC_SAI1_RXD0__ENET1_1588_EVENT1_IN 0x1f
- MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x19
- >;
- };
-
pinctrl_gpio_led: gpioledgrp {
fsl,pins = <
MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO16 0x19
@@ -466,7 +441,6 @@
pinctrl_usb1: usb1grp {
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR 0x10
- MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25 0x19
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a-bmb-08.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a-bmb-08.dts
new file mode 100644
index 000000000000..b11d694b98e1
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a-bmb-08.dts
@@ -0,0 +1,528 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2019 NXP
+ * Copyright (C) 2023 Pengutronix, Marco Felsch <kernel@pengutronix.de>
+ */
+
+/dts-v1/;
+
+#include "imx8mp-debix-som-a.dtsi"
+
+/ {
+ model = "Polyhex i.MX8MPlus Debix SOM A on BMB-08";
+ compatible = "polyhex,imx8mp-debix-som-a-bmb-08", "polyhex,imx8mp-debix-som-a",
+ "fsl,imx8mp";
+
+ aliases {
+ ethernet0 = &eqos;
+ ethernet1 = &fec;
+ };
+
+ chosen {
+ stdout-path = &uart2;
+ };
+
+ reg_baseboard_vdd3v3: regulator-baseboard-vdd3v3 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "BB_VDD3V3";
+ /* Required timings for ethernet phy's */
+ startup-delay-us = <50000>;
+ off-on-delay-us = <110000>;
+ gpio = <&expander0 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_baseboard_vdd5v0: regulator-baseboard-vdd5v0 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-name = "BB_VDD5V";
+ gpio = <&expander0 9 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ regulator-som-vdd1v8 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "SOM_VDD1V8_SW";
+ gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ regulator-som-vdd3v3 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "SOM_VDD3V3_SW";
+ gpio = <&expander0 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ reg_csi1_1v8: regulator-csi1-vdd1v8 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "CSI1_VDD1V8";
+ gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&reg_baseboard_vdd3v3>;
+ };
+
+ reg_csi1_3v3: regulator-csi1-vdd3v3 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "CSI1_VDD3V3";
+ gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&reg_vdd5v0>;
+ };
+
+ reg_csi2_1v8: regulator-csi2-vdd1v8 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_csi2_1v8>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "CSI2_VDD1V8";
+ gpio = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&reg_baseboard_vdd3v3>;
+ };
+
+ reg_csi2_3v3: regulator-csi2-vdd3v3 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_csi2_3v3>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "CSI2_VDD3V3";
+ gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&reg_vdd5v0>;
+ };
+
+ regulator-vbus-usb20 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-name = "USB20_5V";
+ gpio = <&expander1 14 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ vin-supply = <&reg_baseboard_vdd5v0>;
+ };
+
+ regulator-vbus-usb30 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-name = "USB30_5V";
+ gpio = <&expander1 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ vin-supply = <&reg_baseboard_vdd5v0>;
+ };
+
+ reg_vdd5v0: regulator-vdd5v0 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-name = "VDD_5V";
+ gpio = <&expander0 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&eqos {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_eqos>;
+ nvmem-cells = <&ethmac1>;
+ nvmem-cell-names = "mac-address";
+ phy-supply = <&reg_baseboard_vdd3v3>;
+ phy-handle = <&ethphy0>;
+ phy-mode = "rgmii-id";
+ status = "okay";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy0: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ reset-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <150000>;
+ eee-broken-1000t;
+ realtek,clkout-disable;
+ };
+ };
+};
+
+&fec {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec>;
+ nvmem-cells = <&ethmac2>;
+ nvmem-cell-names = "mac-address";
+ phy-supply = <&reg_baseboard_vdd3v3>;
+ phy-handle = <&ethphy1>;
+ phy-mode = "rgmii-id";
+ fsl,magic-packet;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy1: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ reset-gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <150000>;
+ eee-broken-1000t;
+ realtek,clkout-disable;
+ };
+ };
+};
+
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1>;
+ xceiver-supply = <&reg_vdd5v0>;
+ status = "okay";
+};
+
+&flexcan2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan2>;
+ xceiver-supply = <&reg_vdd5v0>;
+ status = "okay";
+};
+
+&flexspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexspi0>;
+ status = "okay";
+
+ flash: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <4>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+};
+
+&i2c4 {
+ expander0: gpio@20 {
+ compatible = "nxp,pca9535";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <0x02>;
+ };
+
+ expander1: gpio@23 {
+ compatible = "nxp,pca9535";
+ reg = <0x23>;
+ gpio-controller;
+ #gpio-cells = <0x02>;
+
+ /*
+ * Since USB1 is bound to peripheral mode we need to ensure
+ * that VBUS is turned off.
+ */
+ usb30-otg-hog {
+ gpio-hog;
+ gpios = <13 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "USB30_OTG_EN";
+ };
+ };
+
+ rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rtc>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+ #clock-cells = <0>;
+ };
+
+ eeprom@52 {
+ compatible = "atmel,24c02";
+ reg = <0x52>;
+ pagesize = <16>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* MACs stored in ASCII */
+ ethmac1: mac-address@0 {
+ reg = <0x0 0xc>;
+ };
+
+ ethmac2: mac-address@c {
+ reg = <0xc 0xc>;
+ };
+ };
+};
+
+&snvs_pwrkey {
+ status = "okay";
+};
+
+/* Debug */
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ status = "okay";
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart4>;
+ status = "okay";
+};
+
+&usb3_0 {
+ status = "okay";
+};
+
+&usb3_1 {
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ /* 2.x hub on port 1 */
+ usb_hub_2_x: hub@1 {
+ compatible = "usb5e3,610";
+ reg = <1>;
+ reset-gpios = <&expander1 9 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&reg_vdd5v0>;
+ peer-hub = <&usb_hub_3_x>;
+ };
+
+ /* 3.x hub on port 2 */
+ usb_hub_3_x: hub@2 {
+ compatible = "usb5e3,620";
+ reg = <2>;
+ reset-gpios = <&expander1 9 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&reg_vdd5v0>;
+ peer-hub = <&usb_hub_2_x>;
+ };
+};
+
+&usb3_phy0 {
+ status = "okay";
+};
+
+&usb3_phy1 {
+ status = "okay";
+};
+
+/* µSD Card */
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
+ assigned-clocks = <&clk IMX8MP_CLK_USDHC2>;
+ assigned-clock-rates = <400000000>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ bus-width = <4>;
+ disable-wp;
+ no-sdio;
+ no-mmc;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_eqos: eqosgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC 0x3
+ MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO 0x3
+ MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x91
+ MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x91
+ MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2 0x91
+ MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x91
+ MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x91
+ MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x91
+ MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x1f
+ MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x1f
+ MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2 0x1f
+ MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x1f
+ MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x1f
+ MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x1f
+
+ MX8MP_IOMUXC_SAI1_RXFS__ENET1_1588_EVENT0_IN 0x1f
+ MX8MP_IOMUXC_SAI1_TXD6__GPIO4_IO18 0x19
+ >;
+ };
+
+ pinctrl_fec: fecgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC 0x3
+ MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO 0x3
+ MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0 0x91
+ MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1 0x91
+ MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2 0x91
+ MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3 0x91
+ MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC 0x91
+ MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x91
+ MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0 0x1f
+ MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1 0x1f
+ MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2 0x1f
+ MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3 0x1f
+ MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x1f
+ MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC 0x1f
+ MX8MP_IOMUXC_SAI1_RXD0__ENET1_1588_EVENT1_IN 0x1f
+ MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x19
+ >;
+ };
+
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD2__CAN1_RX 0x154
+ MX8MP_IOMUXC_SAI5_RXD1__CAN1_TX 0x154
+ >;
+ };
+
+ pinctrl_flexcan2: flexcan2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX 0x154
+ MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX 0x154
+ >;
+ };
+
+ pinctrl_flexspi0: flexspi0grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_ALE__FLEXSPI_A_SCLK 0x1c2
+ MX8MP_IOMUXC_NAND_CE0_B__FLEXSPI_A_SS0_B 0x82
+ MX8MP_IOMUXC_NAND_DATA00__FLEXSPI_A_DATA00 0x82
+ MX8MP_IOMUXC_NAND_DATA01__FLEXSPI_A_DATA01 0x82
+ MX8MP_IOMUXC_NAND_DATA02__FLEXSPI_A_DATA02 0x82
+ MX8MP_IOMUXC_NAND_DATA03__FLEXSPI_A_DATA03 0x82
+ >;
+ };
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C1_SCL__I2C1_SCL 0x400001c2
+ MX8MP_IOMUXC_I2C1_SDA__I2C1_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c4: i2c4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C4_SCL__I2C4_SCL 0x400001c3
+ MX8MP_IOMUXC_I2C4_SDA__I2C4_SDA 0x400001c3
+ >;
+ };
+
+ pinctrl_rtc: rtcgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03 0x140
+ >;
+ };
+
+ pinctrl_pmic: pmicgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO03__GPIO1_IO03 0x41
+ >;
+ };
+
+ pinctrl_reg_csi2_1v8: regcsi21v8grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x19
+ >;
+ };
+
+ pinctrl_reg_csi2_3v3: regcsi23v3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25 0x19
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x14f
+ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x14f
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x49
+ MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x49
+ >;
+ };
+
+ pinctrl_uart4: uart4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART4_RXD__UART4_DCE_RX 0x49
+ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x49
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d0
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d0
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d0
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d0
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d0
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x194
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d4
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x196
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d6
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d6
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d6
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d6
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d6
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a.dtsi
new file mode 100644
index 000000000000..91094c227744
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-debix-som-a.dtsi
@@ -0,0 +1,307 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2019 NXP
+ * Copyright (C) 2023 Pengutronix, Marco Felsch <kernel@pengutronix.de>
+ */
+
+#include "imx8mp.dtsi"
+
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "Polyhex i.MX8MPlus Debix SOM A";
+ compatible = "polyhex,imx8mp-debix-som-a", "fsl,imx8mp";
+
+ reg_usdhc2_vmmc: regulator-usdhc2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+ regulator-name = "VSD_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_led>;
+
+ led-0 {
+ gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+ };
+};
+
+&A53_0 {
+ cpu-supply = <&buck2>;
+};
+
+&A53_1 {
+ cpu-supply = <&buck2>;
+};
+
+&A53_2 {
+ cpu-supply = <&buck2>;
+};
+
+&A53_3 {
+ cpu-supply = <&buck2>;
+};
+
+&i2c1 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c1>;
+ status = "okay";
+
+ pmic@25 {
+ compatible = "nxp,pca9450c";
+ reg = <0x25>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pmic>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+
+ regulators {
+ buck1: BUCK1 {
+ regulator-name = "BUCK1";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <2187500>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <3125>;
+ };
+
+ buck2: BUCK2 {
+ regulator-name = "BUCK2";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <2187500>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <3125>;
+ nxp,dvs-run-voltage = <950000>;
+ nxp,dvs-standby-voltage = <850000>;
+ };
+
+ buck4: BUCK4 {
+ regulator-name = "BUCK4";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buck5: BUCK5 {
+ regulator-name = "BUCK5";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buck6: BUCK6 {
+ regulator-name = "BUCK6";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo1: LDO1 {
+ regulator-name = "LDO1";
+ regulator-min-microvolt = <1600000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo2: LDO2 {
+ regulator-name = "LDO2";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1150000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo3: LDO3 {
+ regulator-name = "LDO3";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo4: LDO4 {
+ regulator-name = "LDO4";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo5: LDO5 {
+ regulator-name = "LDO5";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&i2c4 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c4>;
+ status = "okay";
+
+ adc@48 {
+ compatible = "ti,ads1115";
+ reg = <0x48>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@4 {
+ reg = <4>;
+ ti,gain = <1>;
+ ti,datarate = <7>;
+ };
+
+ channel@5 {
+ reg = <5>;
+ ti,gain = <1>;
+ ti,datarate = <7>;
+ };
+
+ channel@6 {
+ reg = <6>;
+ ti,gain = <1>;
+ ti,datarate = <7>;
+ };
+
+ channel@7 {
+ reg = <7>;
+ ti,gain = <1>;
+ ti,datarate = <7>;
+ };
+ };
+};
+
+&snvs_pwrkey {
+ status = "okay";
+};
+
+/* eMMC */
+&usdhc3 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc3>;
+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+ assigned-clocks = <&clk IMX8MP_CLK_USDHC3>;
+ assigned-clock-rates = <400000000>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
+
+&wdog1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdog>;
+ fsl,ext-reset-output;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_gpio_led: gpioledgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO16 0x19
+ >;
+ };
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C1_SCL__I2C1_SCL 0x400001c2
+ MX8MP_IOMUXC_I2C1_SDA__I2C1_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c4: i2c4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C4_SCL__I2C4_SCL 0x400001c3
+ MX8MP_IOMUXC_I2C4_SDA__I2C4_SDA 0x400001c3
+ >;
+ };
+
+ pinctrl_pmic: pmicgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO03__GPIO1_IO03 0x41
+ >;
+ };
+
+ pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x41
+ >;
+ };
+
+ pinctrl_usdhc3: usdhc3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x190
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d0
+ MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d0
+ MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d0
+ MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d0
+ MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d0
+ MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d0
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d0
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d0
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d0
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x190
+ >;
+ };
+
+ pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4
+ MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d4
+ MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d4
+ MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d4
+ MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d4
+ MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d4
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d4
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d4
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d4
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x194
+ >;
+ };
+
+ pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x196
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d6
+ MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d6
+ MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d6
+ MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d6
+ MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d6
+ MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d6
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d6
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d6
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d6
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x196
+ >;
+ };
+
+ pinctrl_wdog: wdoggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO02__WDOG1_WDOG_B 0xc6
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk2.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk2.dts
index e9fb5f7f39b5..3b1c940860e0 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk2.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk2.dts
@@ -186,9 +186,9 @@
&pcie_phy {
clock-names = "ref";
- clocks = <&clk IMX8MP_SYS_PLL2_100M>;
+ clocks = <&hsio_blk_ctrl>;
fsl,clkreq-unsupported;
- fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_UNUSED>;
+ fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk3.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk3.dts
index 31d85d5871c9..b749e28e5ede 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk3.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-pdk3.dts
@@ -35,33 +35,6 @@
clock-frequency = <25000000>;
};
- connector {
- compatible = "usb-c-connector";
- label = "USB-C";
- data-role = "dual";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- usb_c_0_hs_ep: endpoint {
- remote-endpoint = <&dwc3_0_hs_ep>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- usb_c_0_ss_ep: endpoint {
- remote-endpoint = <&ptn5150_in_ep>;
- };
- };
- };
- };
-
gpio-keys {
compatible = "gpio-keys";
@@ -202,33 +175,19 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ptn5150>;
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
+ port {
- port@0 {
- reg = <0>;
-
- ptn5150_in_ep: endpoint {
- remote-endpoint = <&usb_c_0_ss_ep>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- ptn5150_out_ep: endpoint {
- remote-endpoint = <&dwc3_0_ss_ep>;
- };
+ ptn5150_out_ep: endpoint {
+ remote-endpoint = <&dwc3_0_ep>;
};
};
};
power-sensor@40 {
- compatible = "ti,ina238";
- reg = <0x40>;
- shunt-resistor = <20000>; /* 0.02 R */
- ti,shunt-gain = <1>; /* Drop cca. 40mV */
+ compatible = "ti,ina238";
+ reg = <0x40>;
+ shunt-resistor = <20000>; /* 0.02 R */
+ ti,shunt-gain = <1>; /* Drop cca. 40mV */
};
eeprom_board: eeprom@54 {
@@ -253,10 +212,6 @@
};
};
-&ethphy0g {
- reg = <7>;
-};
-
&fec { /* Second ethernet */
pinctrl-0 = <&pinctrl_fec_rgmii>;
phy-handle = <&ethphypdk>;
@@ -310,16 +265,7 @@
usb-role-switch;
port {
- #address-cells = <1>;
- #size-cells = <0>;
-
- dwc3_0_hs_ep: endpoint@0 {
- reg = <0>;
- remote-endpoint = <&usb_c_0_hs_ep>;
- };
-
- dwc3_0_ss_ep: endpoint@1 {
- reg = <1>;
+ dwc3_0_ep: endpoint {
remote-endpoint = <&ptn5150_out_ep>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-som.dtsi
index cb1953d14aa9..43f1d45ccc96 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-dhcom-som.dtsi
@@ -25,9 +25,7 @@
reg_eth_vio: regulator-eth-vio {
compatible = "regulator-fixed";
- gpio = <&gpio2 10 GPIO_ACTIVE_LOW>;
- pinctrl-0 = <&pinctrl_enet_vio>;
- pinctrl-names = "default";
+ gpio = <&ioexp 2 GPIO_ACTIVE_LOW>;
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
@@ -57,6 +55,11 @@
regulator-max-microvolt = <3300000>;
regulator-name = "VDD_3P3V_AWO";
};
+
+ wlan_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&ioexp 1 GPIO_ACTIVE_LOW>;
+ };
};
&A53_0 {
@@ -112,7 +115,7 @@
reg = <0>;
reset-assert-us = <1000>;
reset-deassert-us = <1000>;
- reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&ioexp 4 GPIO_ACTIVE_LOW>;
/* Non-default PHY population option. */
status = "disabled";
};
@@ -128,7 +131,7 @@
reg = <5>;
reset-assert-us = <1000>;
reset-deassert-us = <1000>;
- reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&ioexp 4 GPIO_ACTIVE_LOW>;
/* Default PHY population option. */
status = "okay";
};
@@ -252,7 +255,7 @@
<&clk IMX8MP_AUDIO_PLL2_OUT>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
assigned-clock-rates = <13000000>, <13000000>, <156000000>;
- reset-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
status = "disabled";
ports {
@@ -293,6 +296,8 @@
};
buck2: BUCK2 { /* VDD_ARM */
+ nxp,dvs-run-voltage = <950000>;
+ nxp,dvs-standby-voltage = <850000>;
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <1000000>;
regulator-ramp-delay = <3125>;
@@ -348,8 +353,9 @@
};
adc@48 {
- compatible = "ti,tla2024";
+ compatible = "ti,ads1015";
reg = <0x48>;
+ interrupts-extended = <&ioexp 7 IRQ_TYPE_EDGE_FALLING>;
#address-cells = <1>;
#size-cells = <0>;
@@ -396,24 +402,54 @@
};
eeprom0: eeprom@50 { /* EEPROM with EQoS MAC address */
- compatible = "atmel,24c02";
- pagesize = <16>;
+ compatible = "atmel,24c32"; /* M24C32-D */
+ pagesize = <32>;
reg = <0x50>;
};
rv3032: rtc@51 {
compatible = "microcrystal,rv3032";
reg = <0x51>;
- interrupts-extended = <&gpio5 5 IRQ_TYPE_LEVEL_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_rtc>;
+ interrupts-extended = <&ioexp 3 IRQ_TYPE_EDGE_FALLING>;
+ wakeup-source;
};
eeprom1: eeprom@53 { /* EEPROM with FEC MAC address */
- compatible = "atmel,24c02";
- pagesize = <16>;
+ compatible = "atmel,24c32"; /* M24C32-D */
+ pagesize = <32>;
reg = <0x53>;
};
+
+ eeprom0wl: eeprom@58 {
+ compatible = "atmel,24c32d-wl"; /* M24C32-D WL page of 0x50 */
+ pagesize = <32>;
+ reg = <0x58>;
+ };
+
+ eeprom1wl: eeprom@5b {
+ compatible = "atmel,24c32d-wl"; /* M24C32-D WL page of 0x53 */
+ pagesize = <32>;
+ reg = <0x5b>;
+ };
+
+ ioexp: gpio@74 {
+ compatible = "nxp,pca9539";
+ reg = <0x74>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ioexp>;
+ wakeup-source;
+
+ gpio-line-names =
+ "BT_REG_EN", "WL_REG_EN", "VIO_SWITCHED_#EN", "RTC_#INT",
+ "ENET_QOS_#RST", "RGB_OSZ_ENABLE", "USB1_ID", "ADC_ALTER_RDY",
+ "DHCOM-W", "DHCOM-V", "DHCOM-U", "DHCOM-T",
+ "BT_HOST_WAKE", "BT_DEV_WAKE", "", "";
+ };
};
&i2c4 {
@@ -463,6 +499,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
status = "okay";
+ wakeup-source;
};
&uart2 {
@@ -484,10 +521,8 @@
assigned-clock-rates = <80000000>;
bluetooth {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart2_bt>;
compatible = "cypress,cyw4373a0-bt";
- shutdown-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ shutdown-gpios = <&ioexp 0 GPIO_ACTIVE_HIGH>;
max-speed = <4000000>;
};
};
@@ -514,8 +549,6 @@
};
&usb_dwc3_0 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usb0_vbus>;
dr_mode = "otg";
status = "okay";
};
@@ -541,6 +574,7 @@
pinctrl-0 = <&pinctrl_usdhc1>;
pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+ mmc-pwrseq = <&wlan_pwrseq>;
vmmc-supply = <&buck4>;
bus-width = <4>;
non-removable;
@@ -559,7 +593,6 @@
* connected to the SoC, but can be connected on to
* SoC pin on the carrier board.
*/
- reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
};
};
@@ -601,8 +634,9 @@
&pinctrl_dhcom_d &pinctrl_dhcom_e &pinctrl_dhcom_f
&pinctrl_dhcom_g &pinctrl_dhcom_h &pinctrl_dhcom_i
&pinctrl_dhcom_j &pinctrl_dhcom_k &pinctrl_dhcom_l
- /* GPIO_M is connected to CLKOUT1 */
- &pinctrl_dhcom_int>;
+ &pinctrl_dhcom_m &pinctrl_dhcom_n &pinctrl_dhcom_o
+ &pinctrl_dhcom_p &pinctrl_dhcom_q &pinctrl_dhcom_r
+ &pinctrl_dhcom_s &pinctrl_dhcom_int>;
pinctrl-names = "default";
pinctrl_dhcom_a: dhcom-a-grp {
@@ -689,6 +723,55 @@
>;
};
+ pinctrl_dhcom_m: dhcom-m-grp {
+ fsl,pins = <
+ /* CSIx_MCLK */
+ MX8MP_IOMUXC_SPDIF_EXT_CLK__GPIO5_IO05 0x2
+ >;
+ };
+
+ pinctrl_dhcom_n: dhcom-n-grp {
+ fsl,pins = <
+ /* CSI2_D3- */
+ MX8MP_IOMUXC_SD1_DATA7__GPIO2_IO09 0x2
+ >;
+ };
+
+ pinctrl_dhcom_o: dhcom-o-grp {
+ fsl,pins = <
+ /* CSI2_D3+ */
+ MX8MP_IOMUXC_SD1_DATA6__GPIO2_IO08 0x2
+ >;
+ };
+
+ pinctrl_dhcom_p: dhcom-p-grp {
+ fsl,pins = <
+ /* CSI2_D2- */
+ MX8MP_IOMUXC_SD1_RESET_B__GPIO2_IO10 0x2
+ >;
+ };
+
+ pinctrl_dhcom_q: dhcom-q-grp {
+ fsl,pins = <
+ /* CSI2_D2+ */
+ MX8MP_IOMUXC_GPIO1_IO13__GPIO1_IO13 0x2
+ >;
+ };
+
+ pinctrl_dhcom_r: dhcom-r-grp {
+ fsl,pins = <
+ /* CSI2_D1- */
+ MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x2
+ >;
+ };
+
+ pinctrl_dhcom_s: dhcom-s-grp {
+ fsl,pins = <
+ /* CSI2_D1+ */
+ MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x2
+ >;
+ };
+
pinctrl_dhcom_int: dhcom-int-grp {
fsl,pins = <
/* INT_HIGHEST_PRIO */
@@ -762,16 +845,8 @@
>;
};
- pinctrl_enet_vio: dhcom-enet-vio-grp {
- fsl,pins = <
- MX8MP_IOMUXC_SD1_RESET_B__GPIO2_IO10 0x22
- >;
- };
-
pinctrl_ethphy0: dhcom-ethphy0-grp {
fsl,pins = <
- /* ENET_QOS_#RST Reset */
- MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x22
/* ENET_QOS_#INT Interrupt */
MX8MP_IOMUXC_SAI5_RXFS__GPIO3_IO19 0x22
>;
@@ -897,6 +972,13 @@
>;
};
+ pinctrl_ioexp: dhcom-ioexp-grp {
+ fsl,pins = <
+ /* #GPIO_EXP_INT */
+ MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x22
+ >;
+ };
+
pinctrl_pmic: dhcom-pmic-grp {
fsl,pins = <
/* PMIC_nINT */
@@ -910,13 +992,6 @@
>;
};
- pinctrl_rtc: dhcom-rtc-grp {
- fsl,pins = <
- /* RTC_#INT Interrupt */
- MX8MP_IOMUXC_SPDIF_EXT_CLK__GPIO5_IO05 0x40000080
- >;
- };
-
pinctrl_tc9595: dhcom-tc9595-grp {
fsl,pins = <
/* RESET_DSIBRIDGE */
@@ -962,13 +1037,6 @@
>;
};
- pinctrl_uart2_bt: dhcom-uart2-bt-grp {
- fsl,pins = <
- /* BT_REG_EN */
- MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x144
- >;
- };
-
pinctrl_uart3: dhcom-uart3-grp {
fsl,pins = <
MX8MP_IOMUXC_ECSPI1_SCLK__UART3_DCE_RX 0x49
@@ -985,12 +1053,6 @@
>;
};
- pinctrl_usb0_vbus: dhcom-usb0-grp {
- fsl,pins = <
- MX8MP_IOMUXC_GPIO1_IO10__USB1_OTG_ID 0x0
- >;
- };
-
pinctrl_usb1_vbus: dhcom-usb1-grp {
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR 0x6
@@ -1006,8 +1068,6 @@
MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0
MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0
MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0
- /* WL_REG_EN */
- MX8MP_IOMUXC_GPIO1_IO13__GPIO1_IO13 0x144
>;
};
@@ -1019,8 +1079,6 @@
MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d4
MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d4
MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d4
- /* WL_REG_EN */
- MX8MP_IOMUXC_GPIO1_IO13__GPIO1_IO13 0x144
>;
};
@@ -1032,8 +1090,6 @@
MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d6
MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d6
MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d6
- /* WL_REG_EN */
- MX8MP_IOMUXC_GPIO1_IO13__GPIO1_IO13 0x144
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-evk.dts
index fa37ce89f8d3..f87fa5a948cc 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-evk.dts
@@ -16,6 +16,18 @@
stdout-path = &uart2;
};
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&adv7533_out>;
+ };
+ };
+ };
+
gpio-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -125,6 +137,28 @@
};
};
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ dsp_vdev0vring0: vdev0vring0@942f0000 {
+ reg = <0 0x942f0000 0 0x8000>;
+ no-map;
+ };
+
+ dsp_vdev0vring1: vdev0vring1@942f8000 {
+ reg = <0 0x942f8000 0 0x8000>;
+ no-map;
+ };
+
+ dsp_vdev0buffer: vdev0buffer@94300000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x94300000 0 0x100000>;
+ no-map;
+ };
+ };
};
&flexspi {
@@ -378,6 +412,40 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
+
+ hdmi@3d {
+ compatible = "adi,adv7535";
+ reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
+ reg-names = "main", "cec", "edid", "packet";
+ adi,dsi-lanes = <4>;
+ adi,input-depth = <8>;
+ adi,input-colorspace = "rgb";
+ adi,input-clock = "1x";
+ adi,input-style = <1>;
+ adi,input-justification = "evenly";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adv7533_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ adv7533_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+
+ };
+ };
};
&i2c3 {
@@ -443,6 +511,26 @@
*/
};
+&lcdif1 {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <10000000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ remote-endpoint = <&adv7533_in>;
+ data-lanes = <1 2 3 4>;
+ };
+ };
+ };
+};
+
&pcie_phy {
fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
clocks = <&pcie0_refclk>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s-ep1.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s-ep1.dts
index 64d522c71a44..da4b1807c275 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s-ep1.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s-ep1.dts
@@ -55,11 +55,10 @@
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
clocks = <&clk IMX8MP_CLK_CLKOUT1>;
- clock-names = "mclk";
#sound-dai-cells = <0>;
- VDDA-supply = <&reg_vcc_3v3_audio>;
- VDDD-supply = <&reg_vcc_1v8_audio>;
+ VDDA-supply = <&reg_vcc_3v3_audio>;
+ VDDD-supply = <&reg_vcc_1v8_audio>;
VDDIO-supply = <&reg_vcc_1v8_audio>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s.dtsi
index 5dbec71747c3..61c2a63efc6d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-msc-sm2s.dtsi
@@ -109,7 +109,7 @@
compatible = "linux,extcon-usb-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb0_extcon>;
- id-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phyboard-pollux-rdk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phyboard-pollux-rdk.dts
index 6aa720bafe28..c8640cac3edc 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phyboard-pollux-rdk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phyboard-pollux-rdk.dts
@@ -19,6 +19,36 @@
stdout-path = &uart1;
};
+ reg_can1_stby: regulator-can1-stby {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1_reg>;
+ gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "can1-stby";
+ };
+
+ reg_can2_stby: regulator-can2-stby {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan2_reg>;
+ gpio = <&gpio3 21 GPIO_ACTIVE_LOW>;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "can2-stby";
+ };
+
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb1_vbus>;
+ gpio = <&gpio1 12 GPIO_ACTIVE_LOW>;
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ regulator-name = "usb1_host_vbus";
+ };
+
reg_usdhc2_vmmc: regulator-usdhc2 {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -57,6 +87,21 @@
};
};
+/* CAN FD */
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1>;
+ xceiver-supply = <&reg_can1_stby>;
+ status = "okay";
+};
+
+&flexcan2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan2>;
+ xceiver-supply = <&reg_can2_stby>;
+ status = "okay";
+};
+
&i2c2 {
clock-frequency = <400000>;
pinctrl-names = "default", "gpio";
@@ -76,15 +121,15 @@
compatible = "nxp,pca9533";
reg = <0x62>;
- led1 {
+ led-1 {
type = <PCA9532_TYPE_LED>;
};
- led2 {
+ led-2 {
type = <PCA9532_TYPE_LED>;
};
- led3 {
+ led-3 {
type = <PCA9532_TYPE_LED>;
};
};
@@ -101,8 +146,51 @@
status = "okay";
};
+/* USB1 Host mode Type-A */
+&usb3_phy0 {
+ vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
+
+&usb3_0 {
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+/* USB2 4-port USB3.0 HUB */
+&usb3_phy1 {
+ status = "okay";
+};
+
+&usb3_1 {
+ fsl,permanently-attached;
+ fsl,disable-port-power-control;
+ status = "okay";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+/* RS232/RS485 */
+&uart2 {
+ assigned-clocks = <&clk IMX8MP_CLK_UART2>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
/* SD-Card */
&usdhc2 {
+ assigned-clocks = <&clk IMX8MP_CLK_USDHC2>;
+ assigned-clock-rates = <200000000>;
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_pins>;
pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_pins>;
@@ -113,6 +201,33 @@
status = "okay";
};
+&gpio1 {
+ gpio-line-names = "", "", "X_PMIC_WDOG_B", "",
+ "PMIC_SD_VSEL", "", "", "", "", "",
+ "", "", "USB1_OTG_PWR", "", "", "X_nETHPHY_INT";
+};
+
+&gpio2 {
+ gpio-line-names = "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "X_SD2_CD_B", "", "", "",
+ "", "", "", "SD2_RESET_B";
+};
+
+&gpio3 {
+ gpio-line-names = "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "", "", "nCAN1_EN", "nCAN2_EN";
+};
+
+&gpio4 {
+ gpio-line-names = "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "X_PMIC_IRQ_B", "", "nENET0_INT_PWDN";
+};
+
&iomuxc {
pinctrl_eqos: eqosgrp {
fsl,pins = <
@@ -134,6 +249,32 @@
>;
};
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD2__CAN1_RX 0x154
+ MX8MP_IOMUXC_SAI5_RXD1__CAN1_TX 0x154
+ >;
+ };
+
+ pinctrl_flexcan2: flexcan2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX 0x154
+ MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX 0x154
+ >;
+ };
+
+ pinctrl_flexcan1_reg: flexcan1reggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x154
+ >;
+ };
+
+ pinctrl_flexcan2_reg: flexcan2reggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x154
+ >;
+ };
+
pinctrl_i2c2: i2c2grp {
fsl,pins = <
MX8MP_IOMUXC_I2C2_SCL__I2C2_SCL 0x400001c2
@@ -161,6 +302,21 @@
>;
};
+ pinctrl_usb1_vbus: usb1vbusgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x10
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x140
+ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x140
+ MX8MP_IOMUXC_SAI3_RXC__UART2_DCE_CTS 0x140
+ MX8MP_IOMUXC_SAI3_RXD__UART2_DCE_RTS 0x140
+ >;
+ };
+
pinctrl_usdhc2_pins: usdhc2-gpiogrp {
fsl,pins = <
MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12 0x1c4
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phycore-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phycore-som.dtsi
index ecc4bce6db97..c976c3b6cbc6 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phycore-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-phycore-som.dtsi
@@ -42,8 +42,8 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec>;
- phy-mode = "rgmii-id";
phy-handle = <&ethphy1>;
+ phy-mode = "rgmii-id";
fsl,magic-packet;
status = "okay";
@@ -54,14 +54,12 @@
ethphy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
- interrupt-parent = <&gpio1>;
- interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
- ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
- ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
- ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ enet-phy-lane-no-swap;
ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,min-output-impedance;
- enet-phy-lane-no-swap;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
};
};
};
@@ -75,8 +73,8 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
- spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
};
};
@@ -85,89 +83,85 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio5 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
pmic: pmic@25 {
- reg = <0x25>;
compatible = "nxp,pca9450c";
+ reg = <0x25>;
+ interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pmic>;
- interrupt-parent = <&gpio4>;
- interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
regulators {
buck1: BUCK1 {
- regulator-min-microvolt = <600000>;
- regulator-max-microvolt = <2187500>;
- regulator-boot-on;
regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1000000>;
+ regulator-min-microvolt = <805000>;
+ regulator-name = "VDD_SOC (BUCK1)";
regulator-ramp-delay = <3125>;
};
buck2: BUCK2 {
- regulator-min-microvolt = <600000>;
- regulator-max-microvolt = <2187500>;
- regulator-boot-on;
- regulator-always-on;
- regulator-ramp-delay = <3125>;
nxp,dvs-run-voltage = <950000>;
nxp,dvs-standby-voltage = <850000>;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1050000>;
+ regulator-min-microvolt = <805000>;
+ regulator-name = "VDD_ARM (BUCK2)";
+ regulator-ramp-delay = <3125>;
};
buck4: BUCK4 {
- regulator-min-microvolt = <600000>;
- regulator-max-microvolt = <3400000>;
- regulator-boot-on;
regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "VDD_3V3 (BUCK4)";
};
buck5: BUCK5 {
- regulator-min-microvolt = <600000>;
- regulator-max-microvolt = <3400000>;
- regulator-boot-on;
regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1800000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-name = "VDD_1V8 (BUCK5)";
};
buck6: BUCK6 {
- regulator-min-microvolt = <600000>;
- regulator-max-microvolt = <3400000>;
- regulator-boot-on;
regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1155000>;
+ regulator-min-microvolt = <1045000>;
+ regulator-name = "NVCC_DRAM_1V1 (BUCK6)";
};
ldo1: LDO1 {
- regulator-min-microvolt = <1600000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
regulator-always-on;
- };
-
- ldo2: LDO2 {
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1150000>;
regulator-boot-on;
- regulator-always-on;
+ regulator-max-microvolt = <1950000>;
+ regulator-min-microvolt = <1710000>;
+ regulator-name = "NVCC_SNVS_1V8 (LDO1)";
};
ldo3: LDO3 {
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
regulator-always-on;
- };
-
- ldo4: LDO4 {
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-max-microvolt = <1800000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-name = "VDDA_1V8 (LDO3)";
};
ldo5: LDO5 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-name = "NVCC_SD2 (LDO5)";
};
};
};
@@ -205,24 +199,36 @@
status = "okay";
};
+&gpio1 {
+ gpio-line-names = "", "", "X_PMIC_WDOG_B", "",
+ "", "", "", "", "", "",
+ "", "", "", "", "", "X_nETHPHY_INT";
+};
+
+&gpio4 {
+ gpio-line-names = "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "", "", "", "",
+ "", "", "X_PMIC_IRQ_B";
+};
+
&iomuxc {
pinctrl_fec: fecgrp {
fsl,pins = <
- MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC 0x3
- MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO 0x3
- MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0 0x91
- MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1 0x91
- MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2 0x91
- MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3 0x91
- MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC 0x91
- MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x91
+ MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC 0x2
+ MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO 0x2
+ MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0 0x90
+ MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1 0x90
+ MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2 0x90
+ MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3 0x90
+ MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC 0x90
MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0 0x12
MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1 0x12
MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2 0x14
MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3 0x14
MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x14
MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC 0x14
- MX8MP_IOMUXC_GPIO1_IO15__GPIO1_IO15 0x11
+ MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x90
>;
};
@@ -239,69 +245,69 @@
pinctrl_i2c1: i2c1grp {
fsl,pins = <
- MX8MP_IOMUXC_I2C1_SCL__I2C1_SCL 0x400001c3
- MX8MP_IOMUXC_I2C1_SDA__I2C1_SDA 0x400001c3
+ MX8MP_IOMUXC_I2C1_SDA__I2C1_SDA 0x400001c2
+ MX8MP_IOMUXC_I2C1_SCL__I2C1_SCL 0x400001c2
>;
};
pinctrl_i2c1_gpio: i2c1gpiogrp {
fsl,pins = <
- MX8MP_IOMUXC_I2C1_SCL__GPIO5_IO14 0x1e3
- MX8MP_IOMUXC_I2C1_SDA__GPIO5_IO15 0x1e3
+ MX8MP_IOMUXC_I2C1_SCL__GPIO5_IO14 0x1e2
+ MX8MP_IOMUXC_I2C1_SDA__GPIO5_IO15 0x1e2
>;
};
pinctrl_pmic: pmicirqgrp {
fsl,pins = <
- MX8MP_IOMUXC_SAI1_TXD6__GPIO4_IO18 0x141
+ MX8MP_IOMUXC_SAI1_TXD6__GPIO4_IO18 0x140
>;
};
pinctrl_usdhc3: usdhc3grp {
fsl,pins = <
- MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x190
- MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d0
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x190
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d0
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d0
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d0
MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d0
MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d0
MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d0
MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d0
MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d0
- MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d0
- MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d0
- MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d0
- MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x190
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x190
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d0
>;
};
pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
fsl,pins = <
- MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194
- MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x194
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d4
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d4
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d4
MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d4
MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d4
MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d4
MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d4
MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d4
- MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d4
- MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d4
- MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d4
- MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x194
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4
>;
};
pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
fsl,pins = <
- MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x196
- MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d6
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x196
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d2
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d2
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d2
MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d2
MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d2
MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d2
MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d2
MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d2
- MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d2
- MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d2
- MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d2
- MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x196
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x196
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d6
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-reva.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-reva.dtsi
new file mode 100644
index 000000000000..59813ef8e2bb
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-reva.dtsi
@@ -0,0 +1,711 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#include "imx8mp.dtsi"
+
+#include <dt-bindings/leds/common.h>
+
+/ {
+ aliases {
+ /* some of this aliases like backlight0, ethernetX and switch0
+ * are needed for the bootloader.
+ */
+ backlight0 = &backlight;
+ ethernet0 = &eqos;
+ ethernet1 = &lan1;
+ ethernet2 = &lan2;
+ rtc0 = &i2c_rtc;
+ rtc1 = &snvs_rtc;
+ switch0 = &switch;
+ };
+
+ /*
+ * Backlight is present only on some of boards, so it is disabled by
+ * default.
+ */
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pinctrl-0 = <&pinctrl_backlight>;
+ pwms = <&pwm1 0 20000 0>;
+ power-supply = <&reg_24v>;
+ enable-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
+ brightness-levels = <0 255>;
+ num-interpolated-steps = <17>;
+ default-brightness-level = <8>;
+ status = "disabled";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_led>;
+
+ led-0 {
+ label = "D1";
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_STATUS;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ label = "D2";
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ led-2 {
+ label = "D3";
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
+ reg_1v2: regulator-1v2 {
+ compatible = "regulator-fixed";
+ vin-supply = <&reg_5v_p>;
+ regulator-name = "1V2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ reg_2v5: regulator-2v5 {
+ compatible = "regulator-fixed";
+ vin-supply = <&reg_5v_s>;
+ regulator-name = "2V5";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ };
+
+ reg_3v3: regulator-3v3 {
+ compatible = "regulator-fixed";
+ vin-supply = <&reg_5v_s>;
+ regulator-name = "3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ /*
+ * This regulator will provide power as long as possible even if
+ * undervoltage is detected.
+ */
+ reg_5v_p: regulator-5v-p {
+ compatible = "regulator-fixed";
+ regulator-name = "5V_P";
+ vin-supply = <&reg_24v>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ /*
+ * This regulator will be automatically shutdown if undervoltage is
+ * detected.
+ */
+ reg_5v_s: regulator-5v-s {
+ compatible = "regulator-fixed";
+ regulator-name = "5V_S";
+ vin-supply = <&reg_24v>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_24v: regulator-24v {
+ compatible = "regulator-fixed";
+ regulator-name = "24V";
+ regulator-min-microvolt = <24000000>;
+ regulator-max-microvolt = <24000000>;
+ };
+
+ reg_can2rs: regulator-can2rs {
+ compatible = "regulator-fixed";
+ regulator-name = "CAN2RS";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_can2rs>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio4 22 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_canrs: regulator-canrs {
+ compatible = "regulator-fixed";
+ regulator-name = "CANRS";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_canrs>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio4 21 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_tft_vcom: regulator-tft-vcom {
+ compatible = "pwm-regulator";
+ pwms = <&pwm4 0 20000 0>;
+ regulator-name = "VCOM";
+ vin-supply = <&reg_5v_s>;
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-always-on;
+ voltage-table = <3600000 26>;
+ status = "disabled";
+ };
+
+ reg_vsd_3v3: regulator-vsd-3v3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_vsd_3v3>;
+ vin-supply = <&reg_vdd_3v3>;
+ compatible = "regulator-fixed";
+ regulator-name = "VSD_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&A53_0 {
+ cpu-supply = <&reg_vdd_arm>;
+};
+
+&A53_1 {
+ cpu-supply = <&reg_vdd_arm>;
+};
+
+&A53_2 {
+ cpu-supply = <&reg_vdd_arm>;
+};
+
+&A53_3 {
+ cpu-supply = <&reg_vdd_arm>;
+};
+
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ecspi2>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ adc: adc@0 {
+ compatible = "microchip,mcp3002";
+ reg = <0>;
+ vref-supply = <&reg_vdd_3v3>;
+ spi-max-frequency = <1000000>;
+ #io-channel-cells = <1>;
+ };
+};
+
+&eqos {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_eqos>;
+ phy-mode = "rgmii-txid";
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1>;
+ xceiver-supply = <&reg_canrs>;
+ status = "okay";
+};
+
+&flexcan2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan2>;
+ xceiver-supply = <&reg_can2rs>;
+ status = "okay";
+};
+
+&i2c1 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c1>;
+ status = "okay";
+
+ pmic@25 {
+ compatible = "nxp,pca9450c";
+ reg = <0x25>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pmic>;
+ interrupts-extended = <&gpio1 3 IRQ_TYPE_EDGE_RISING>;
+ sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+
+ regulators {
+ reg_vdd_soc: BUCK1 {
+ regulator-name = "VDD_SOC";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <2187500>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <3125>;
+ };
+
+ reg_vdd_arm: BUCK2 {
+ regulator-name = "VDD_ARM";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <2187500>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <3125>;
+ nxp,dvs-run-voltage = <950000>;
+ nxp,dvs-standby-voltage = <850000>;
+ };
+
+ reg_vdd_3v3: BUCK4 {
+ regulator-name = "VDD_3V3";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3400000>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_vdd_1v8: BUCK5 {
+ regulator-name = "VDD_1V8";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3400000>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_nvcc_dram_1v1: BUCK6 {
+ regulator-name = "NVCC_DRAM_1V1";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3400000>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_nvcc_snvs_1v8: LDO1 {
+ regulator-name = "NVCC_SNVS_1V8";
+ regulator-min-microvolt = <1600000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_vdda_1v8: LDO3 {
+ regulator-name = "VDDA_1V8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_nvcc_sd2: LDO5 {
+ regulator-name = "NVCC_SD2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_5v_p>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&i2c3 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c3>;
+ status = "okay";
+
+ i2c_rtc: rtc@51 {
+ compatible = "nxp,pcf85063tp";
+ reg = <0x51>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rtc>;
+ interrupts-extended = <&gpio4 31 IRQ_TYPE_EDGE_FALLING>;
+ quartz-load-femtofarads = <12500>;
+ };
+};
+
+&i2c4 {
+ clock-frequency = <380000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c4>;
+ status = "okay";
+
+ switch: switch@5f {
+ compatible = "microchip,ksz9893";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_switch>;
+ reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
+ reg = <0x5f>;
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lan1: port@0 {
+ reg = <0>;
+ phy-mode = "internal";
+ label = "lan1";
+ };
+
+ lan2: port@1 {
+ reg = <1>;
+ phy-mode = "internal";
+ label = "lan2";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "cpu";
+ ethernet = <&eqos>;
+ phy-mode = "rgmii";
+ /* 2ns RX delay is implemented on PCB */
+ tx-internal-delay-ps = <2000>;
+ rx-internal-delay-ps = <0>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+};
+
+&pwm1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm1>;
+};
+
+&pwm4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm4>;
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&uart2 {
+ /* console */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ status = "okay";
+};
+
+&usb3_0 {
+ status = "okay";
+};
+
+&usb3_1 {
+ status = "okay";
+};
+
+&usb3_phy0 {
+ vbus-supply = <&reg_3v3>;
+ status = "okay";
+};
+
+&usb3_phy1 {
+ vbus-supply = <&reg_3v3>;
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ dr_mode = "host";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+};
+
+/* SD Card */
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+ vmmc-supply = <&reg_vsd_3v3>;
+ vqmmc-supply = <&reg_nvcc_sd2>;
+ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+/* eMMC */
+&usdhc3 {
+ assigned-clocks = <&clk IMX8MP_CLK_USDHC3>;
+ assigned-clock-rates = <400000000>;
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc3>;
+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+ vmmc-supply = <&reg_vdd_3v3>;
+ vqmmc-supply = <&reg_vdd_1v8>;
+ bus-width = <8>;
+ no-sd;
+ no-sdio;
+ non-removable;
+ status = "okay";
+};
+
+&wdog1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdog>;
+ fsl,ext-reset-output;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_backlight: backlightgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_TXFS__GPIO4_IO24 0x0100
+ >;
+ };
+
+ pinctrl_can2rs: can2rsgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_RXC__GPIO4_IO22 0x154
+ >;
+ };
+
+ pinctrl_canrs: canrsgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x154
+ >;
+ };
+
+ pinctrl_ecspi2: ecspi2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x44
+ MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x44
+ MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x44
+ MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x40
+ >;
+ };
+
+ pinctrl_eqos: eqosgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x91
+ MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x91
+ MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2 0x91
+ MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x91
+ MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x91
+ MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x91
+ MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x1f
+ MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x1f
+ MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2 0x1f
+ MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x1f
+ MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x1f
+ MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x1f
+ >;
+ };
+
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SPDIF_RX__CAN1_RX 0x154
+ MX8MP_IOMUXC_SPDIF_TX__CAN1_TX 0x154
+ >;
+ };
+
+ pinctrl_flexcan2: flexcan2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_MCLK__CAN2_RX 0x154
+ MX8MP_IOMUXC_SAI2_TXD0__CAN2_TX 0x154
+ >;
+ };
+
+ pinctrl_gpio_led: gpioledgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO05__GPIO1_IO05 0x19
+ MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06 0x19
+ MX8MP_IOMUXC_GPIO1_IO07__GPIO1_IO07 0x19
+ >;
+ };
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C1_SCL__I2C1_SCL 0x400001c2
+ MX8MP_IOMUXC_I2C1_SDA__I2C1_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c3: i2c3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C3_SCL__I2C3_SCL 0x400001c2
+ MX8MP_IOMUXC_I2C3_SDA__I2C3_SDA 0x400001c2
+ >;
+ };
+
+ pinctrl_i2c4: i2c4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C4_SCL__I2C4_SCL 0x400001c3
+ MX8MP_IOMUXC_I2C4_SDA__I2C4_SDA 0x400001c3
+ >;
+ };
+
+ pinctrl_pmic: pmicirqgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO03__GPIO1_IO03 0x41
+ MX8MP_IOMUXC_GPIO1_IO04__GPIO1_IO04 0x41
+ >;
+ };
+
+ pinctrl_pwm1: pwm1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SPDIF_EXT_CLK__PWM1_OUT 0x116
+ >;
+ };
+
+ pinctrl_pwm4: pwm4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI3_MCLK__PWM4_OUT 0x116
+ >;
+ };
+
+ pinctrl_reg_vsd_3v3: regvsd3v3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x40
+ >;
+ };
+
+ pinctrl_rtc: rtcgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31 0x41
+ >;
+ };
+
+ pinctrl_switch: switchgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI3_TXC__GPIO5_IO00 0x41
+ MX8MP_IOMUXC_SAI3_TXD__GPIO5_IO01 0x41
+ >;
+ };
+
+ pinctrl_touchscreen: touchscreengrp {
+ fsl,pins = <
+ /* external 10 k pull up */
+ /* CTP_INT */
+ MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x41
+ /* CTP_RST */
+ MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x41
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140
+ MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140
+ MX8MP_IOMUXC_UART3_RXD__UART1_DTE_RTS 0x140
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x14f
+ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x14f
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d0
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d0
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d0
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d0
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d0
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x194
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d4
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x196
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d6
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d6
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d6
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d6
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d6
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12 0x1c4
+ MX8MP_IOMUXC_SD2_WP__GPIO2_IO20 0x1c4
+ >;
+ };
+
+ pinctrl_usdhc3: usdhc3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x190
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d0
+ MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d0
+ MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d0
+ MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d0
+ MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d0
+ MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d0
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d0
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d0
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d0
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x190
+ >;
+ };
+
+ pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4
+ MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d4
+ MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d4
+ MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d4
+ MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d4
+ MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d4
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d4
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d4
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d4
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x194
+ >;
+ };
+
+ pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x196
+ MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d6
+ MX8MP_IOMUXC_NAND_DATA04__USDHC3_DATA0 0x1d6
+ MX8MP_IOMUXC_NAND_DATA05__USDHC3_DATA1 0x1d6
+ MX8MP_IOMUXC_NAND_DATA06__USDHC3_DATA2 0x1d6
+ MX8MP_IOMUXC_NAND_DATA07__USDHC3_DATA3 0x1d6
+ MX8MP_IOMUXC_NAND_RE_B__USDHC3_DATA4 0x1d6
+ MX8MP_IOMUXC_NAND_CE2_B__USDHC3_DATA5 0x1d6
+ MX8MP_IOMUXC_NAND_CE3_B__USDHC3_DATA6 0x1d6
+ MX8MP_IOMUXC_NAND_CLE__USDHC3_DATA7 0x1d6
+ MX8MP_IOMUXC_NAND_CE1_B__USDHC3_STROBE 0x196
+ >;
+ };
+
+ pinctrl_wdog: wdoggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO02__WDOG1_WDOG_B 0xc6
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-hdmi.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-hdmi.dts
new file mode 100644
index 000000000000..c1ca69da3cb8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-hdmi.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "imx8mp-skov-reva.dtsi"
+
+/ {
+ model = "SKOV IMX8MP CPU revB - HDMI";
+ compatible = "skov,imx8mp-skov-revb-hdmi", "fsl,imx8mp";
+};
+
+&iomuxc {
+ pinctrl_hdmi: hdmigrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_HDMI_DDC_SCL__HDMIMIX_HDMI_SCL 0x1c3
+ MX8MP_IOMUXC_HDMI_DDC_SDA__HDMIMIX_HDMI_SDA 0x1c3
+ MX8MP_IOMUXC_HDMI_HPD__HDMIMIX_HDMI_HPD 0x19
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-lt6.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-lt6.dts
new file mode 100644
index 000000000000..ccbd3abedd69
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-lt6.dts
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "imx8mp-skov-reva.dtsi"
+
+/ {
+ model = "SKOV IMX8MP CPU revB - LT6";
+ compatible = "skov,imx8mp-skov-revb-lt6", "fsl,imx8mp";
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, <&adc_ts 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <65000>;
+ touchscreen-inverted-y;
+ touchscreen-swapped-x-y;
+ touchscreen-x-plate-ohms = <300>;
+ };
+};
+
+&reg_tft_vcom {
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+ voltage-table = <3600000 26>;
+ status = "okay";
+};
+
+&pwm4 {
+ status = "okay";
+};
+
+&backlight {
+ status = "okay";
+};
+
+&ecspi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ecspi1>;
+ cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ adc_ts: adc@0 {
+ compatible = "ti,tsc2046e-adc";
+ reg = <0>;
+ pinctrl-0 = <&pinctrl_touch>;
+ pinctrl-names ="default";
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio4 25 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ };
+};
+
+&pwm1 {
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_ecspi1: ecspi1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI1_SCLK__ECSPI1_SCLK 0x44
+ MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI 0x44
+ MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO 0x44
+ MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x40
+ >;
+ };
+
+ pinctrl_touch: touchgrp {
+ fsl,pins = <
+ /* external pull up */
+ MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25 0x40
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts
new file mode 100644
index 000000000000..3c2efdc59bfa
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "imx8mp-skov-reva.dtsi"
+
+/ {
+ model = "SKOV IMX8MP CPU revB - MI1010AIT-1CP1";
+ compatible = "skov,imx8mp-skov-revb-mi1010ait-1cp1", "fsl,imx8mp";
+
+ panel {
+ compatible = "multi-inno,mi1010ait-1cp";
+ backlight = <&backlight>;
+ power-supply = <&reg_tft_vcom>;
+
+ port {
+ in_lvds0: endpoint {
+ remote-endpoint = <&ldb_lvds_ch0>;
+ };
+ };
+ };
+};
+
+&backlight {
+ status = "okay";
+};
+
+&i2c2 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ touchscreen@38 {
+ compatible = "edt,edt-ft5406";
+ reg = <0x38>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_touchscreen>;
+ interrupts-extended = <&gpio4 28 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>;
+ touchscreen-size-x = <1280>;
+ touchscreen-size-y = <800>;
+ vcc-supply = <&reg_vdd_3v3>;
+ iovcc-supply = <&reg_vdd_3v3>;
+ wakeup-source;
+ };
+};
+
+&lcdif2 {
+ status = "okay";
+};
+
+&lvds_bridge {
+ /* IMX8MP_CLK_MEDIA_LDB = IMX8MP_CLK_MEDIA_DISP2_PIX * 7 */
+ assigned-clock-rates = <482300000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ ldb_lvds_ch0: endpoint {
+ remote-endpoint = <&in_lvds0>;
+ };
+ };
+ };
+};
+
+&media_blk_ctrl {
+ /* currently it is not possible to let display clocks confugure
+ * automatically, so we need to set them manually
+ */
+ assigned-clock-rates = <500000000>, <200000000>, <0>,
+ /* IMX8MP_CLK_MEDIA_DISP2_PIX = pixelclk of lvds panel */
+ <68900000>,
+ /* IMX8MP_VIDEO_PLL1 = IMX8MP_CLK_MEDIA_LDB * 2 */
+ <964600000>;
+};
+
+&pwm4 {
+ status = "okay";
+};
+
+&pwm1 {
+ status = "okay";
+};
+
+&reg_tft_vcom {
+ regulator-min-microvolt = <3160000>;
+ regulator-max-microvolt = <3160000>;
+ voltage-table = <3160000 73>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_I2C2_SCL__I2C2_SCL 0x400001c2
+ MX8MP_IOMUXC_I2C2_SDA__I2C2_SDA 0x400001c2
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds-g133han01.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds-g133han01.dtso
new file mode 100644
index 000000000000..5058cd9409c7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds-g133han01.dtso
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/imx8mp-clock.h>
+
+&{/} {
+ compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
+};
+
+&backlight_lvds {
+ status = "okay";
+};
+
+&display {
+ compatible = "auo,g133han01";
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dual-lvds-odd-pixels;
+
+ panel_in_lvds0: endpoint {
+ remote-endpoint = <&ldb_lvds_ch0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dual-lvds-even-pixels;
+
+ panel_in_lvds1: endpoint {
+ remote-endpoint = <&ldb_lvds_ch1>;
+ };
+ };
+ };
+};
+
+&lcdif2 {
+ status = "okay";
+};
+
+&lvds_bridge {
+ assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>,
+ <&clk IMX8MP_VIDEO_PLL1>;
+ assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
+ assigned-clock-rates = <0>, <988400000>;
+ status = "okay";
+
+ ports {
+ port@1 {
+ ldb_lvds_ch0: endpoint {
+ remote-endpoint = <&panel_in_lvds0>;
+ };
+ };
+
+ port@2 {
+ ldb_lvds_ch1: endpoint {
+ remote-endpoint = <&panel_in_lvds1>;
+ };
+ };
+ };
+};
+
+&pwm2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
index 4240e20d38ac..86d3da36e4f3 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
@@ -15,6 +15,7 @@
/ {
model = "TQ-Systems i.MX8MPlus TQMa8MPxL on MBa8MPxL";
compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
+ chassis-type = "embedded";
chosen {
stdout-path = &uart4;
@@ -55,6 +56,21 @@
clock-frequency = <25000000>;
};
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ type = "micro";
+ label = "X29";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbcon0>;
+ id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb3_dwc>;
+ };
+ };
+ };
+
fan0: pwm-fan {
compatible = "pwm-fan";
pinctrl-names = "default";
@@ -168,6 +184,13 @@
enable-active-high;
};
+ reg_vcc_1v8: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
reg_vcc_3v3: regulator-3v3 {
compatible = "regulator-fixed";
regulator-name = "VCC_3V3";
@@ -464,7 +487,7 @@
clock-names = "mclk";
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_MCLK1>;
reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>;
- iov-supply = <&reg_vcc_3v3>;
+ iov-supply = <&reg_vcc_1v8>;
ldoin-supply = <&reg_vcc_3v3>;
};
@@ -602,7 +625,6 @@
&usb3_1 {
fsl,disable-port-power-control;
fsl,permanently-attached;
- dr_mode = "host";
status = "okay";
};
@@ -626,13 +648,10 @@
role-switch-default-mode = "peripheral";
status = "okay";
- connector {
- compatible = "gpio-usb-b-connector", "usb-b-connector";
- type = "micro";
- label = "X29";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbcon0>;
- id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+ port {
+ usb3_dwc: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx-2x.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx-2x.dts
new file mode 100644
index 000000000000..53120fc9cd7f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx-2x.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+/dts-v1/;
+
+#include "imx8mp.dtsi"
+#include "imx8mp-venice-gw702x.dtsi"
+#include "imx8mp-venice-gw71xx.dtsi"
+
+/ {
+ model = "Gateworks Venice GW71xx-2x i.MX8MP Development Kit";
+ compatible = "gateworks,imx8mp-gw71xx-2x", "fsl,imx8mp";
+
+ chosen {
+ stdout-path = &uart2;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx.dtsi
new file mode 100644
index 000000000000..0e8d0f3c7ea8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw71xx.dtsi
@@ -0,0 +1,247 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/phy/phy-imx8-pcie.h>
+
+/ {
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbcon1>;
+ type = "micro";
+ label = "Type-C";
+ id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb3_dwc>;
+ };
+ };
+ };
+
+ led-controller {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_leds>;
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ pcie0_refclk: clock-pcie0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ };
+
+ pps {
+ compatible = "pps-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pps>;
+ gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+};
+
+/* off-board header */
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi2>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&gpio4 {
+ gpio-line-names =
+ "", "", "", "",
+ "", "", "", "",
+ "dio1", "", "", "dio0",
+ "", "", "pci_usb_sel", "",
+ "", "", "", "",
+ "", "", "", "",
+ "dio3", "", "dio2", "",
+ "pci_wdis#", "", "", "";
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ accelerometer@19 {
+ compatible = "st,lis2de12";
+ reg = <0x19>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_accel>;
+ st,drdy-int-pin = <1>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&pcie_phy {
+ fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
+ fsl,clkreq-unsupported;
+ clocks = <&pcie0_refclk>;
+ clock-names = "ref";
+ status = "okay";
+};
+
+&pcie {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie0>;
+ reset-gpio = <&gpio4 29 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+/* GPS */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+/* off-board header */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
+/* USB1 Type-C front panel */
+&usb3_0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb1>;
+ fsl,over-current-active-low;
+ status = "okay";
+};
+
+&usb3_phy0 {
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ /* dual role is implemented but not a full featured OTG */
+ adp-disable;
+ hnp-disable;
+ srp-disable;
+ dr_mode = "otg";
+ usb-role-switch;
+ role-switch-default-mode = "peripheral";
+ status = "okay";
+
+ port {
+ usb3_dwc: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
+ };
+};
+
+/* USB2 - MiniPCIe socket */
+&usb3_1 {
+ fsl,permanently-attached;
+ fsl,disable-port-power-control;
+ status = "okay";
+};
+
+&usb3_phy1 {
+ status = "okay";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hog>;
+
+ pinctrl_hog: hoggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD6__GPIO4_IO08 0x40000146 /* DIO1 */
+ MX8MP_IOMUXC_SAI1_TXC__GPIO4_IO11 0x40000146 /* DIO0 */
+ MX8MP_IOMUXC_SAI1_TXD2__GPIO4_IO14 0x40000106 /* PCIE_USBSEL */
+ MX8MP_IOMUXC_SAI2_TXD0__GPIO4_IO26 0x40000146 /* DIO2 */
+ MX8MP_IOMUXC_SAI2_TXFS__GPIO4_IO24 0x40000146 /* DIO3 */
+ MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x40000106 /* PCIE_WDIS# */
+ >;
+ };
+
+ pinctrl_accel: accelgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x150 /* IRQ */
+ >;
+ };
+
+ pinctrl_gpio_leds: gpioledgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01 0x6 /* LEDG */
+ MX8MP_IOMUXC_SAI1_RXD3__GPIO4_IO05 0x6 /* LEDR */
+ >;
+ };
+
+ pinctrl_pcie0: pcie0grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x106
+ >;
+ };
+
+ pinctrl_pps: ppsgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03 0x146
+ >;
+ };
+
+ pinctrl_usb1: usb1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 /* USB1_FLT# */
+ >;
+ };
+
+ pinctrl_usbcon1: usbcon1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x140 /* USB1_ID */
+ >;
+ };
+
+ pinctrl_spi2: spi2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x140
+ MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x140
+ MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x140
+ MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x140
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140
+ MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140
+ MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx-2x.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx-2x.dts
new file mode 100644
index 000000000000..255e36f66b00
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx-2x.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+/dts-v1/;
+
+#include "imx8mp.dtsi"
+#include "imx8mp-venice-gw702x.dtsi"
+#include "imx8mp-venice-gw72xx.dtsi"
+
+/ {
+ model = "Gateworks Venice GW72xx-2x i.MX8MP Development Kit";
+ compatible = "gateworks,imx8mp-gw72xx-2x", "fsl,imx8mp";
+
+ chosen {
+ stdout-path = &uart2;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx.dtsi
new file mode 100644
index 000000000000..41c79d2ebdd6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw72xx.dtsi
@@ -0,0 +1,390 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/phy/phy-imx8-pcie.h>
+
+/ {
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbcon1>;
+ type = "micro";
+ label = "otg";
+ id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb3_dwc>;
+ };
+ };
+ };
+
+ led-controller {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_leds>;
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ pcie0_refclk: clock-pcie0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ };
+
+ pps {
+ compatible = "pps-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pps>;
+ gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ reg_usb1_vbus: regulator-usb1 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usb1_en>;
+ regulator-name = "usb1_vbus";
+ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_usb2_vbus: regulator-usb2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usb2_en>;
+ regulator-name = "usb2_vbus";
+ gpio = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc2_vmmc>;
+ regulator-name = "VDD_3V3_SD";
+ enable-active-high;
+ gpio = <&gpio2 19 0>; /* SD2_RESET */
+ off-on-delay-us = <12000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ startup-delay-us = <100>;
+ };
+};
+
+/* off-board header */
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi2>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
+ <&gpio1 10 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ tpm@1 {
+ compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
+ reg = <0x1>;
+ spi-max-frequency = <36000000>;
+ };
+};
+
+&gpio4 {
+ gpio-line-names =
+ "", "", "", "",
+ "", "", "", "",
+ "dio1", "", "", "dio0",
+ "", "", "pci_usb_sel", "",
+ "", "", "", "",
+ "", "", "rs485_en", "rs485_term",
+ "", "", "", "rs485_half",
+ "pci_wdis#", "", "", "";
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ accelerometer@19 {
+ compatible = "st,lis2de12";
+ reg = <0x19>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_accel>;
+ st,drdy-int-pin = <1>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&pcie_phy {
+ fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
+ fsl,clkreq-unsupported;
+ clocks = <&pcie0_refclk>;
+ clock-names = "ref";
+ status = "okay";
+};
+
+&pcie {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie0>;
+ reset-gpio = <&gpio4 29 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+/* GPS */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+/* off-board header */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
+/* RS232 */
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart4>;
+ status = "okay";
+};
+
+/* USB1 - OTG */
+&usb3_0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb1>;
+ fsl,over-current-active-low;
+ status = "okay";
+};
+
+&usb3_phy0 {
+ vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ /* dual role is implemented but not a full featured OTG */
+ adp-disable;
+ hnp-disable;
+ srp-disable;
+ dr_mode = "otg";
+ usb-role-switch;
+ role-switch-default-mode = "peripheral";
+ status = "okay";
+
+ port {
+ usb3_dwc: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
+ };
+};
+
+/* USB2 - USB3.0 Hub */
+&usb3_1 {
+ fsl,permanently-attached;
+ fsl,disable-port-power-control;
+ status = "okay";
+};
+
+&usb3_phy1 {
+ vbus-supply = <&reg_usb2_vbus>;
+ status = "okay";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+/* microSD */
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ bus-width = <4>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hog>;
+
+ pinctrl_hog: hoggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD6__GPIO4_IO08 0x40000146 /* DIO1 */
+ MX8MP_IOMUXC_SAI1_TXC__GPIO4_IO11 0x40000146 /* DIO0 */
+ MX8MP_IOMUXC_SAI1_TXD2__GPIO4_IO14 0x40000106 /* PCIE_USBSEL */
+ MX8MP_IOMUXC_SAI2_MCLK__GPIO4_IO27 0x40000106 /* RS485_HALF */
+ MX8MP_IOMUXC_SAI2_RXC__GPIO4_IO22 0x40000106 /* RS485_EN */
+ MX8MP_IOMUXC_SAI2_RXD0__GPIO4_IO23 0x40000106 /* RS485_TERM */
+ MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x40000106 /* PCIE_WDIS# */
+ >;
+ };
+
+ pinctrl_accel: accelgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x150 /* IRQ */
+ >;
+ };
+
+ pinctrl_gpio_leds: gpioledgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01 0x6 /* LEDG */
+ MX8MP_IOMUXC_SAI1_RXD3__GPIO4_IO05 0x6 /* LEDR */
+ >;
+ };
+
+ pinctrl_pcie0: pcie0grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x106
+ >;
+ };
+
+ pinctrl_pps: ppsgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03 0x146
+ >;
+ };
+
+ pinctrl_reg_usb1_en: regusb1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x146 /* USB1_EN */
+ >;
+ };
+
+ pinctrl_usb1: usb1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 /* USB1_FLT# */
+ >;
+ };
+
+ pinctrl_usbcon1: usbcon1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x140 /* USB1_ID */
+ >;
+ };
+
+ pinctrl_reg_usb2_en: regusb2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_TXD0__GPIO4_IO12 0x146 /* USBHUB_RST# */
+ >;
+ };
+
+ pinctrl_spi2: spi2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x140
+ MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x140
+ MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x140
+ MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x140
+ MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x140
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140
+ MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140
+ MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_uart4: uart4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART4_RXD__UART4_DCE_RX 0x140
+ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190
+ MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0
+ MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0
+ MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0
+ MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0
+ MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d0
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d0
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d0
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d0
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d0
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x194
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d4
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x196
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d6
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d6
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d6
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d6
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d6
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_vmmc: usdhc2-vmmc-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_RESET_B__USDHC2_RESET_B 0x1d0
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12 0x1c4
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx-2x.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx-2x.dts
new file mode 100644
index 000000000000..000fd15e0c07
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx-2x.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+/dts-v1/;
+
+#include "imx8mp.dtsi"
+#include "imx8mp-venice-gw702x.dtsi"
+#include "imx8mp-venice-gw73xx.dtsi"
+
+/ {
+ model = "Gateworks Venice GW73xx-2x i.MX8MP Development Kit";
+ compatible = "gateworks,imx8mp-gw73xx-2x", "fsl,imx8mp";
+
+ chosen {
+ stdout-path = &uart2;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx.dtsi
new file mode 100644
index 000000000000..d5c400b355af
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw73xx.dtsi
@@ -0,0 +1,432 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/phy/phy-imx8-pcie.h>
+
+/ {
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbcon1>;
+ type = "micro";
+ label = "otg";
+ id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb3_dwc>;
+ };
+ };
+ };
+
+ led-controller {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_leds>;
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ pcie0_refclk: clock-pcie0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ };
+
+ pps {
+ compatible = "pps-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pps>;
+ gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ reg_usb1_vbus: regulator-usb1 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usb1_en>;
+ regulator-name = "usb1_vbus";
+ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_usb2_vbus: regulator-usb2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usb2_en>;
+ regulator-name = "usb2_vbus";
+ gpio = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_wifi_en: regulator-wifi-en {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_wl>;
+ regulator-name = "wl";
+ gpio = <&gpio4 19 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <100>;
+ enable-active-high;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc2_vmmc>;
+ regulator-name = "VDD_3V3_SD";
+ enable-active-high;
+ gpio = <&gpio2 19 0>; /* SD2_RESET */
+ off-on-delay-us = <12000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ startup-delay-us = <100>;
+ };
+};
+
+/* off-board header */
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi2>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
+ <&gpio1 10 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ tpm@1 {
+ compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
+ reg = <0x1>;
+ spi-max-frequency = <36000000>;
+ };
+};
+
+&gpio4 {
+ gpio-line-names =
+ "", "", "", "",
+ "", "", "", "",
+ "dio1", "", "", "dio0",
+ "", "", "pci_usb_sel", "",
+ "", "", "", "",
+ "", "", "rs485_en", "rs485_term",
+ "", "", "", "rs485_half",
+ "pci_wdis#", "", "", "";
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ accelerometer@19 {
+ compatible = "st,lis2de12";
+ reg = <0x19>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_accel>;
+ st,drdy-int-pin = <1>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&pcie_phy {
+ fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
+ fsl,clkreq-unsupported;
+ clocks = <&pcie0_refclk>;
+ clock-names = "ref";
+ status = "okay";
+};
+
+&pcie {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie0>;
+ reset-gpio = <&gpio4 29 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+/* GPS */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+/* bluetooth HCI */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_bten>;
+ cts-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
+ rts-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4330-bt";
+ shutdown-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+/* RS232 */
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart4>;
+ status = "okay";
+};
+
+/* USB1 - OTG */
+&usb3_0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb1>;
+ fsl,over-current-active-low;
+ status = "okay";
+};
+
+&usb3_phy0 {
+ vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ /* dual role is implemented but not a full featured OTG */
+ adp-disable;
+ hnp-disable;
+ srp-disable;
+ dr_mode = "otg";
+ usb-role-switch;
+ role-switch-default-mode = "peripheral";
+ status = "okay";
+
+ port {
+ usb3_dwc: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
+ };
+};
+
+/* USB2 - USB3.0 Hub */
+&usb3_1 {
+ fsl,permanently-attached;
+ fsl,disable-port-power-control;
+ status = "okay";
+};
+
+&usb3_phy1 {
+ vbus-supply = <&reg_usb2_vbus>;
+ status = "okay";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+/* SDIO WiFi */
+&usdhc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc1>;
+ bus-width = <4>;
+ non-removable;
+ vmmc-supply = <&reg_wifi_en>;
+ status = "okay";
+};
+
+/* microSD */
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ bus-width = <4>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hog>;
+
+ pinctrl_hog: hoggrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD6__GPIO4_IO08 0x40000146 /* DIO1 */
+ MX8MP_IOMUXC_SAI1_TXC__GPIO4_IO11 0x40000146 /* DIO0 */
+ MX8MP_IOMUXC_SAI1_TXD2__GPIO4_IO14 0x40000106 /* PCIE_USBSEL */
+ MX8MP_IOMUXC_SAI2_MCLK__GPIO4_IO27 0x40000106 /* RS485_HALF */
+ MX8MP_IOMUXC_SAI2_RXC__GPIO4_IO22 0x40000106 /* RS485_EN */
+ MX8MP_IOMUXC_SAI2_RXD0__GPIO4_IO23 0x40000106 /* RS485_TERM */
+ MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x40000106 /* PCIE_WDIS# */
+ >;
+ };
+
+ pinctrl_accel: accelgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x150 /* IRQ */
+ >;
+ };
+
+ pinctrl_bten: btengrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_TXD4__GPIO4_IO16 0x146
+ >;
+ };
+
+ pinctrl_gpio_leds: gpioledgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01 0x6 /* LEDG */
+ MX8MP_IOMUXC_SAI1_RXD3__GPIO4_IO05 0x6 /* LEDR */
+ >;
+ };
+
+ pinctrl_pcie0: pcie0grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x106
+ >;
+ };
+
+ pinctrl_pps: ppsgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03 0x146
+ >;
+ };
+
+ pinctrl_reg_wl: regwlgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x146
+ >;
+ };
+
+ pinctrl_reg_usb1_en: regusb1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x146 /* USB1_EN */
+ >;
+ };
+
+ pinctrl_usb1: usb1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 /* USB1_FLT# */
+ >;
+ };
+
+ pinctrl_usbcon1: usbcon1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x140 /* USB1_ID */
+ >;
+ };
+
+ pinctrl_reg_usb2_en: regusb2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI1_TXD0__GPIO4_IO12 0x146 /* USBHUB_RST# */
+ >;
+ };
+
+ pinctrl_spi2: spi2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x140
+ MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x140
+ MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x140
+ MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x140
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140
+ MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140
+ MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140
+ MX8MP_IOMUXC_ECSPI1_MISO__GPIO5_IO08 0x140
+ MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x140
+ >;
+ };
+
+ pinctrl_uart4: uart4grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_UART4_RXD__UART4_DCE_RX 0x140
+ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x140
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190
+ MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0
+ MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0
+ MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0
+ MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0
+ MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d0
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d0
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d0
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d0
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d0
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x194
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d4
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x196
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d6
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d6
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d6
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d6
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d6
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_vmmc: usdhc2-vmmc-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_RESET_B__USDHC2_RESET_B 0x1d0
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12 0x1c4
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-imx219.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-imx219.dtso
new file mode 100644
index 000000000000..270a9114da97
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-imx219.dtso
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+#include "imx8mp-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ compatible = "gw,imx8mp-gw74xx", "fsl,imx8mp";
+
+ reg_cam: regulator-cam {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_cam>;
+ compatible = "regulator-fixed";
+ regulator-name = "reg_cam";
+ gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ cam24m: cam24m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ clock-output-names = "cam24m";
+ };
+};
+
+&i2c4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ imx219: sensor@10 {
+ compatible = "sony,imx219";
+ reg = <0x10>;
+ clocks = <&cam24m>;
+ VDIG-supply = <&reg_cam>;
+
+ port {
+ /* MIPI CSI-2 bus endpoint */
+ imx219_to_mipi_csi2: endpoint {
+ remote-endpoint = <&mipi_csi_0_in>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ link-frequencies = /bits/ 64 <456000000>;
+ };
+ };
+ };
+};
+
+&isi_0 {
+ status = "okay";
+};
+
+&mipi_csi_0 {
+ status = "okay";
+
+ ports {
+ port@0 {
+ mipi_csi_0_in: endpoint {
+ remote-endpoint = <&imx219_to_mipi_csi2>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&iomuxc {
+ pinctrl_reg_cam: regcamgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO04__GPIO1_IO04 0x41
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-rpidsi.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-rpidsi.dtso
new file mode 100644
index 000000000000..6a39f43435c2
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx-rpidsi.dtso
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Gateworks Corporation
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ compatible = "gateworks,imx8mp-gw74xx", "fsl,imx8mp";
+
+ panel {
+ compatible = "powertip,ph800480t013-idf02";
+ power-supply = <&attiny>;
+ backlight = <&attiny>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&bridge_out>;
+ };
+ };
+ };
+};
+
+&i2c4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ attiny: regulator@45 {
+ compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
+ reg = <0x45>;
+ };
+};
+
+&lcdif1 {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,burst-clock-frequency = <891000000>;
+ samsung,esc-clock-frequency = <54000000>;
+ samsung,pll-clock-frequency = <27000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ bridge@0 {
+ compatible = "toshiba,tc358762";
+ reg = <0>;
+ vddc-supply = <&attiny>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ bridge_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ bridge_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+
+ dsi_out: endpoint {
+ data-lanes = <1 2>;
+ remote-endpoint = <&bridge_in>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx.dts
index 92514b71b5f4..cae586cd45bd 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-venice-gw74xx.dts
@@ -35,6 +35,21 @@
reg = <0x0 0x40000000 0 0x80000000>;
};
+ connector {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbcon1>;
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ type = "micro";
+ label = "Type-C";
+ id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb3_dwc>;
+ };
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
@@ -125,12 +140,22 @@
regulator-max-microvolt = <5000000>;
};
+ reg_can1_stby: regulator-can1-stby {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_can1>;
+ regulator-name = "can1_stby";
+ gpio = <&gpio3 19 GPIO_ACTIVE_LOW>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
reg_can2_stby: regulator-can2-stby {
compatible = "regulator-fixed";
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_reg_can>;
+ pinctrl-0 = <&pinctrl_reg_can2>;
regulator-name = "can2_stby";
- gpio = <&gpio3 19 GPIO_ACTIVE_LOW>;
+ gpio = <&gpio5 5 GPIO_ACTIVE_LOW>;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
@@ -164,6 +189,19 @@
cpu-supply = <&reg_arm>;
};
+&ecspi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi1>;
+ cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ tpm@0 {
+ compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
+ reg = <0x0>;
+ spi-max-frequency = <36000000>;
+ };
+};
+
/* off-board header */
&ecspi2 {
pinctrl-names = "default";
@@ -204,6 +242,13 @@
};
};
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1>;
+ xceiver-supply = <&reg_can1_stby>;
+ status = "okay";
+};
+
&flexcan2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan2>;
@@ -214,38 +259,38 @@
&gpio1 {
gpio-line-names =
"", "", "", "", "", "", "", "",
- "", "", "dio0", "", "dio1", "", "", "",
+ "", "dio0", "", "dio1", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "";
};
&gpio2 {
gpio-line-names =
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "pcie3_wdis#", "",
+ "", "", "", "", "", "", "m2_pin20", "",
+ "", "", "", "", "", "pcie1_wdis#", "pcie3_wdis#", "",
"", "", "pcie2_wdis#", "", "", "", "", "",
"", "", "", "", "", "", "", "";
};
&gpio3 {
gpio-line-names =
- "m2_gdis#", "", "", "", "", "", "", "m2_rst#",
+ "", "", "", "", "", "", "m2_rst", "",
+ "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
- "m2_off#", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "";
};
&gpio4 {
gpio-line-names =
+ "", "", "m2_off#", "", "", "", "", "",
"", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "m2_wdis#", "", "", "",
- "", "", "", "", "", "", "", "uart_rs485";
+ "", "", "m2_wdis#", "", "", "", "", "",
+ "", "", "", "", "", "", "", "rs485_en";
};
&gpio5 {
gpio-line-names =
- "uart_half", "uart_term", "", "", "", "", "", "",
+ "rs485_hd", "rs485_term", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "";
@@ -268,6 +313,8 @@
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
adc {
compatible = "gw,gsc-adc";
@@ -286,6 +333,12 @@
label = "vdd_bat";
};
+ channel@16 {
+ gw,mode = <4>;
+ reg = <0x16>;
+ label = "fan_tach";
+ };
+
channel@82 {
gw,mode = <2>;
reg = <0x82>;
@@ -358,6 +411,11 @@
gw,voltage-divider-ohms = <10000 10000>;
};
};
+
+ fan-controller@a {
+ compatible = "gw,gsc-fan";
+ reg = <0x0a>;
+ };
};
gpio: gpio@23 {
@@ -369,85 +427,6 @@
interrupts = <4>;
};
- pmic@25 {
- compatible = "nxp,pca9450c";
- reg = <0x25>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_pmic>;
- interrupt-parent = <&gpio3>;
- interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
-
- regulators {
- BUCK1 {
- regulator-name = "BUCK1";
- regulator-min-microvolt = <720000>;
- regulator-max-microvolt = <1000000>;
- regulator-boot-on;
- regulator-always-on;
- regulator-ramp-delay = <3125>;
- };
-
- reg_arm: BUCK2 {
- regulator-name = "BUCK2";
- regulator-min-microvolt = <720000>;
- regulator-max-microvolt = <1025000>;
- regulator-boot-on;
- regulator-always-on;
- regulator-ramp-delay = <3125>;
- nxp,dvs-run-voltage = <950000>;
- nxp,dvs-standby-voltage = <850000>;
- };
-
- BUCK4 {
- regulator-name = "BUCK4";
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3600000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- BUCK5 {
- regulator-name = "BUCK5";
- regulator-min-microvolt = <1650000>;
- regulator-max-microvolt = <1950000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- BUCK6 {
- regulator-name = "BUCK6";
- regulator-min-microvolt = <1045000>;
- regulator-max-microvolt = <1155000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- LDO1 {
- regulator-name = "LDO1";
- regulator-min-microvolt = <1650000>;
- regulator-max-microvolt = <1950000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- LDO3 {
- regulator-name = "LDO3";
- regulator-min-microvolt = <1710000>;
- regulator-max-microvolt = <1890000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- LDO5 {
- regulator-name = "LDO5";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- regulator-always-on;
- };
- };
- };
-
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
@@ -495,7 +474,6 @@
st,drdy-int-pin = <1>;
interrupt-parent = <&gpio1>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "INT1";
};
switch: switch@5f {
@@ -546,7 +524,6 @@
port@5 {
reg = <5>;
- label = "cpu";
ethernet = <&fec>;
phy-mode = "rgmii-id";
@@ -559,7 +536,6 @@
};
};
-/* off-board header */
&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default", "gpio";
@@ -568,6 +544,85 @@
scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
+
+ pmic@25 {
+ compatible = "nxp,pca9450c";
+ reg = <0x25>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pmic>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+
+ regulators {
+ BUCK1 {
+ regulator-name = "BUCK1";
+ regulator-min-microvolt = <720000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <3125>;
+ };
+
+ reg_arm: BUCK2 {
+ regulator-name = "BUCK2";
+ regulator-min-microvolt = <720000>;
+ regulator-max-microvolt = <1025000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <3125>;
+ nxp,dvs-run-voltage = <950000>;
+ nxp,dvs-standby-voltage = <850000>;
+ };
+
+ BUCK4 {
+ regulator-name = "BUCK4";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ BUCK5 {
+ regulator-name = "BUCK5";
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ BUCK6 {
+ regulator-name = "BUCK6";
+ regulator-min-microvolt = <1045000>;
+ regulator-max-microvolt = <1155000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO1 {
+ regulator-name = "LDO1";
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO3 {
+ regulator-name = "LDO3";
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1890000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO5 {
+ regulator-name = "LDO5";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
/* off-board header */
@@ -652,13 +707,10 @@
role-switch-default-mode = "peripheral";
status = "okay";
- connector {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usbcon1>;
- compatible = "gpio-usb-b-connector", "usb-b-connector";
- type = "micro";
- label = "Type-C";
- id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+ port {
+ usb3_dwc: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
};
};
@@ -693,7 +745,7 @@
status = "okay";
wifi@0 {
- compatible = "cypress,cyw4373-fmac";
+ compatible = "cypress,cyw4373-fmac", "brcm,bcm4329-fmac";
reg = <0>;
};
};
@@ -726,12 +778,14 @@
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO09__GPIO1_IO09 0x40000040 /* DIO0 */
MX8MP_IOMUXC_GPIO1_IO11__GPIO1_IO11 0x40000040 /* DIO1 */
- MX8MP_IOMUXC_NAND_DQS__GPIO3_IO14 0x40000040 /* M2SKT_OFF# */
- MX8MP_IOMUXC_SD2_DATA3__GPIO2_IO18 0x40000150 /* PCIE2_WDIS# */
+ MX8MP_IOMUXC_SAI1_RXD0__GPIO4_IO02 0x40000040 /* M2SKT_OFF# */
+ MX8MP_IOMUXC_SAI1_TXD6__GPIO4_IO18 0x40000150 /* M2SKT_WDIS# */
+ MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06 0x40000040 /* M2SKT_PIN20 */
+ MX8MP_IOMUXC_SD1_STROBE__GPIO2_IO11 0x40000040 /* M2SKT_PIN22 */
+ MX8MP_IOMUXC_SD2_CLK__GPIO2_IO13 0x40000150 /* PCIE1_WDIS# */
MX8MP_IOMUXC_SD2_CMD__GPIO2_IO14 0x40000150 /* PCIE3_WDIS# */
+ MX8MP_IOMUXC_SD2_DATA3__GPIO2_IO18 0x40000150 /* PCIE2_WDIS# */
MX8MP_IOMUXC_NAND_DATA00__GPIO3_IO06 0x40000040 /* M2SKT_RST# */
- MX8MP_IOMUXC_SAI1_TXD6__GPIO4_IO18 0x40000150 /* M2SKT_WDIS# */
- MX8MP_IOMUXC_NAND_ALE__GPIO3_IO00 0x40000150 /* M2SKT_GDIS# */
MX8MP_IOMUXC_SAI3_TXD__GPIO5_IO01 0x40000104 /* UART_TERM */
MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31 0x40000104 /* UART_RS485 */
MX8MP_IOMUXC_SAI3_TXC__GPIO5_IO00 0x40000104 /* UART_HALF */
@@ -784,6 +838,13 @@
>;
};
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SPDIF_RX__CAN1_RX 0x154
+ MX8MP_IOMUXC_SPDIF_TX__CAN1_TX 0x154
+ >;
+ };
+
pinctrl_flexcan2: flexcan2grp {
fsl,pins = <
MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX 0x154
@@ -869,7 +930,7 @@
pinctrl_pcie0: pciegrp {
fsl,pins = <
- MX8MP_IOMUXC_SD2_DATA2__GPIO2_IO17 0x110
+ MX8MP_IOMUXC_SD2_DATA2__GPIO2_IO17 0x106
>;
};
@@ -885,12 +946,18 @@
>;
};
- pinctrl_reg_can: regcangrp {
+ pinctrl_reg_can1: regcan1grp {
fsl,pins = <
MX8MP_IOMUXC_SAI5_RXFS__GPIO3_IO19 0x154
>;
};
+ pinctrl_reg_can2: regcan2grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SPDIF_EXT_CLK__GPIO5_IO05 0x154
+ >;
+ };
+
pinctrl_reg_usb2: regusb2grp {
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06 0x140
@@ -903,12 +970,12 @@
>;
};
- pinctrl_sai2: sai2grp {
+ pinctrl_spi1: spi1grp {
fsl,pins = <
- MX8MP_IOMUXC_SAI2_TXFS__AUDIOMIX_SAI2_TX_SYNC 0xd6
- MX8MP_IOMUXC_SAI2_TXD0__AUDIOMIX_SAI2_TX_DATA00 0xd6
- MX8MP_IOMUXC_SAI2_TXC__AUDIOMIX_SAI2_TX_BCLK 0xd6
- MX8MP_IOMUXC_SAI2_MCLK__AUDIOMIX_SAI2_MCLK 0xd6
+ MX8MP_IOMUXC_ECSPI1_SCLK__ECSPI1_SCLK 0x82
+ MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI 0x82
+ MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO 0x82
+ MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x140
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dahlia.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dahlia.dtsi
index 56b0e4b865c9..7e9e4b13b5c5 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dahlia.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dahlia.dtsi
@@ -3,7 +3,36 @@
* Copyright 2022 Toradex
*/
-/* TODO: Audio Codec */
+/ {
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,bitclock-master = <&codec_dai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&codec_dai>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,name = "imx8mp-wm8904";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPOUTL",
+ "Headphone Jack", "HPOUTR",
+ "IN2L", "Line In Jack",
+ "IN2R", "Line In Jack",
+ "Headphone Jack", "MICBIAS",
+ "IN1L", "Headphone Jack";
+ simple-audio-card,widgets =
+ "Microphone", "Headphone Jack",
+ "Headphone", "Headphone Jack",
+ "Line", "Line In Jack";
+
+ codec_dai: simple-audio-card,codec {
+ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
+ sound-dai = <&wm8904_1a>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai1>;
+ };
+ };
+};
&backlight {
power-supply = <&reg_3p3v>;
@@ -64,7 +93,21 @@
&i2c4 {
status = "okay";
- /* TODO: Audio Codec */
+ /* Audio Codec */
+ wm8904_1a: audio-codec@1a {
+ compatible = "wlf,wm8904";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai1>;
+ #sound-dai-cells = <0>;
+ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
+ clock-names = "mclk";
+ AVDD-supply = <&reg_1p8v>;
+ CPVDD-supply = <&reg_1p8v>;
+ DBVDD-supply = <&reg_1p8v>;
+ DCVDD-supply = <&reg_1p8v>;
+ MICVDD-supply = <&reg_1p8v>;
+ };
};
/* Verdin PCIE_1 */
@@ -95,7 +138,14 @@
vin-supply = <&reg_3p3v>;
};
-/* TODO: Verdin I2S_1 */
+/* Verdin I2S_1 */
+&sai1 {
+ assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
+ assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <24576000>;
+ fsl,sai-mclk-direction-output;
+ status = "okay";
+};
/* Verdin UART_1 */
&uart1 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dev.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dev.dtsi
index bdfdd4c782f1..a509b2b7fa85 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dev.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-dev.dtsi
@@ -4,8 +4,6 @@
*/
/ {
- /* TODO: Audio Codec */
-
reg_eth2phy: regulator-eth2phy {
compatible = "regulator-fixed";
enable-active-high;
@@ -17,6 +15,41 @@
startup-delay-us = <200000>;
vin-supply = <&reg_3p3v>;
};
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,bitclock-master = <&codec_dai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&codec_dai>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,name = "imx8mp-nau8822";
+ simple-audio-card,routing =
+ "Headphones", "LHP",
+ "Headphones", "RHP",
+ "Speaker", "LSPK",
+ "Speaker", "RSPK",
+ "Line Out", "AUXOUT1",
+ "Line Out", "AUXOUT2",
+ "LAUX", "Line In",
+ "RAUX", "Line In",
+ "LMICP", "Mic In",
+ "RMICP", "Mic In";
+ simple-audio-card,widgets =
+ "Headphones", "Headphones",
+ "Line Out", "Line Out",
+ "Speaker", "Speaker",
+ "Microphone", "Mic In",
+ "Line", "Line In";
+
+ codec_dai: simple-audio-card,codec {
+ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
+ sound-dai = <&nau8822_1a>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&sai1>;
+ };
+ };
};
&backlight {
@@ -88,7 +121,14 @@
&i2c4 {
status = "okay";
- /* TODO: Audio Codec */
+ /* Audio Codec */
+ nau8822_1a: audio-codec@1a {
+ compatible = "nuvoton,nau8822";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai1>;
+ #sound-dai-cells = <0>;
+ };
};
/* Verdin PCIE_1 */
@@ -119,7 +159,14 @@
vin-supply = <&reg_3p3v>;
};
-/* TODO: Verdin I2C_1 with Audio Codec */
+/* Verdin I2S_1 */
+&sai1 {
+ assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
+ assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <24576000>;
+ fsl,sai-mclk-direction-output;
+ status = "okay";
+};
/* Verdin UART_1, connector X50 through RS485 transceiver */
&uart1 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-mallow.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-mallow.dtsi
new file mode 100644
index 000000000000..8482393f3cac
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-mallow.dtsi
@@ -0,0 +1,199 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ *
+ * Common dtsi for Verdin IMX8MP SoM on Mallow carrier board
+ *
+ * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-plus
+ * https://www.toradex.com/products/carrier-board/mallow-carrier-board
+ */
+
+#include <dt-bindings/leds/common.h>
+
+/ {
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_leds>;
+
+ /* SODIMM 52 - USER_LED_1_RED */
+ led-0 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <1>;
+ gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 54 - USER_LED_1_GREEN */
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <1>;
+ gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 56 - USER_LED_2_RED */
+ led-2 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <2>;
+ gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 58 - USER_LED_2_GREEN */
+ led-3 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <2>;
+ gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&backlight {
+ power-supply = <&reg_3p3v>;
+};
+
+/* Verdin SPI_1 */
+&ecspi1 {
+ pinctrl-0 = <&pinctrl_ecspi1>, <&pinctrl_tpm_cs>;
+ cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>, <&gpio3 16 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ tpm@1 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+ reg = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm_irq>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
+ spi-max-frequency = <18500000>;
+ };
+};
+
+/* EEPROM on Mallow */
+&eeprom_carrier_board {
+ status = "okay";
+};
+
+/* Verdin ETH_1 */
+&eqos {
+ status = "okay";
+};
+
+/* Verdin CAN_1 */
+&flexcan1 {
+ status = "okay";
+};
+
+/* Verdin CAN_2 */
+&flexcan2 {
+ status = "okay";
+};
+
+/* Temperature sensor on Mallow */
+&hwmon_temp {
+ compatible = "ti,tmp1075";
+ status = "okay";
+};
+
+/* Verdin I2C_2_DSI */
+&i2c2 {
+ status = "okay";
+};
+
+/* Verdin I2C_4_CSI */
+&i2c3 {
+ status = "okay";
+};
+
+/* Verdin I2C_1 */
+&i2c4 {
+ status = "okay";
+};
+
+/* Verdin PCIE_1 */
+&pcie {
+ status = "okay";
+};
+
+&pcie_phy {
+ status = "okay";
+};
+
+/* Verdin PWM_1 */
+&pwm1 {
+ status = "okay";
+};
+
+/* Verdin PWM_2 */
+&pwm2 {
+ status = "okay";
+};
+
+/* Verdin PWM_3_DSI */
+&pwm3 {
+ status = "okay";
+};
+
+&reg_usdhc2_vmmc {
+ vin-supply = <&reg_3p3v>;
+};
+
+/* Verdin UART_1 */
+&uart1 {
+ status = "okay";
+};
+
+/* Verdin UART_2 */
+&uart2 {
+ status = "okay";
+};
+
+/* Verdin UART_3 */
+&uart3 {
+ status = "okay";
+};
+
+/* Verdin USB_1 */
+&usb3_0 {
+ status = "okay";
+};
+
+&usb3_phy0 {
+ status = "okay";
+};
+
+/* Verdin USB_2 */
+&usb3_1 {
+ status = "okay";
+};
+
+&usb3_phy1 {
+ status = "okay";
+};
+
+/* Verdin SD_1 */
+&usdhc2 {
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_leds: ledsgrp {
+ fsl,pins =
+ <MX8MP_IOMUXC_NAND_ALE__GPIO3_IO00 0x106>, /* SODIMM 52 */
+ <MX8MP_IOMUXC_NAND_CE0_B__GPIO3_IO01 0x106>, /* SODIMM 54 */
+ <MX8MP_IOMUXC_NAND_DATA00__GPIO3_IO06 0x106>, /* SODIMM 56 */
+ <MX8MP_IOMUXC_NAND_DATA01__GPIO3_IO07 0x106>; /* SODIMM 58 */
+ };
+
+ pinctrl_tpm_cs: tpmcsgrp {
+ fsl,pins =
+ <MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO16 0x82>; /* SODIMM 64 */
+ };
+
+ pinctrl_tpm_irq: tpmirqgrp {
+ fsl,pins =
+ <MX8MP_IOMUXC_NAND_DQS__GPIO3_IO14 0x16>; /* SODIMM 66 */
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-nonwifi-mallow.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-nonwifi-mallow.dts
new file mode 100644
index 000000000000..6a536a4964bb
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-nonwifi-mallow.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+/dts-v1/;
+
+#include "imx8mp-verdin.dtsi"
+#include "imx8mp-verdin-nonwifi.dtsi"
+#include "imx8mp-verdin-mallow.dtsi"
+
+/ {
+ model = "Toradex Verdin iMX8M Plus on Mallow Board";
+ compatible = "toradex,verdin-imx8mp-nonwifi-mallow",
+ "toradex,verdin-imx8mp-nonwifi",
+ "toradex,verdin-imx8mp",
+ "fsl,imx8mp";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-wifi-mallow.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-wifi-mallow.dts
new file mode 100644
index 000000000000..08b7aef3fdde
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin-wifi-mallow.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+/dts-v1/;
+
+#include "imx8mp-verdin.dtsi"
+#include "imx8mp-verdin-wifi.dtsi"
+#include "imx8mp-verdin-mallow.dtsi"
+
+/ {
+ model = "Toradex Verdin iMX8M Plus WB on Mallow Board";
+ compatible = "toradex,verdin-imx8mp-wifi-mallow",
+ "toradex,verdin-imx8mp-wifi",
+ "toradex,verdin-imx8mp",
+ "fsl,imx8mp";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin.dtsi
index e9e4fcb562f1..c3305f0d4001 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp-verdin.dtsi
@@ -45,6 +45,23 @@
status = "disabled";
};
+ connector {
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
+ id-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+ label = "Type-C";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb_1_id>;
+ self-powered;
+ type = "micro";
+ vbus-supply = <&reg_usb1_vbus>;
+
+ port {
+ usb_dr_connector: endpoint {
+ remote-endpoint = <&usb3_dwc>;
+ };
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
@@ -184,7 +201,6 @@
&eqos {
phy-handle = <&ethphy0>;
phy-mode = "rgmii-id";
- phy-supply = <&reg_module_eth1phy>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
snps,force_thresh_dma_mode;
@@ -836,15 +852,10 @@
srp-disable;
usb-role-switch;
- connector {
- compatible = "gpio-usb-b-connector", "usb-b-connector";
- id-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
- label = "Type-C";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usb_1_id>;
- self-powered;
- type = "micro";
- vbus-supply = <&reg_usb1_vbus>;
+ port {
+ usb3_dwc: endpoint {
+ remote-endpoint = <&usb_dr_connector>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mp.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mp.dtsi
index cc406bb338fe..39a550c1cd26 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mp.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mp.dtsi
@@ -202,6 +202,60 @@
clock-output-names = "clk_ext4";
};
+ funnel {
+ /*
+ * non-configurable funnel don't show up on the AMBA
+ * bus. As such no need to add "arm,primecell".
+ */
+ compatible = "arm,coresight-static-funnel";
+
+ in-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ca_funnel_in_port0: endpoint {
+ remote-endpoint = <&etm0_out_port>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ ca_funnel_in_port1: endpoint {
+ remote-endpoint = <&etm1_out_port>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ ca_funnel_in_port2: endpoint {
+ remote-endpoint = <&etm2_out_port>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ ca_funnel_in_port3: endpoint {
+ remote-endpoint = <&etm3_out_port>;
+ };
+ };
+ };
+
+ out-ports {
+ port {
+
+ ca_funnel_out_port0: endpoint {
+ remote-endpoint = <&hugo_funnel_in_port0>;
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -210,6 +264,7 @@
dsp_reserved: dsp@92400000 {
reg = <0 0x92400000 0 0x2000000>;
no-map;
+ status = "disabled";
};
};
@@ -306,8 +361,7 @@
etm0: etm@28440000 {
compatible = "arm,coresight-etm4x", "arm,primecell";
- reg = <0x28440000 0x10000>;
- arm,primecell-periphid = <0xbb95d>;
+ reg = <0x28440000 0x1000>;
cpu = <&A53_0>;
clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
clock-names = "apb_pclk";
@@ -323,8 +377,7 @@
etm1: etm@28540000 {
compatible = "arm,coresight-etm4x", "arm,primecell";
- reg = <0x28540000 0x10000>;
- arm,primecell-periphid = <0xbb95d>;
+ reg = <0x28540000 0x1000>;
cpu = <&A53_1>;
clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
clock-names = "apb_pclk";
@@ -340,8 +393,7 @@
etm2: etm@28640000 {
compatible = "arm,coresight-etm4x", "arm,primecell";
- reg = <0x28640000 0x10000>;
- arm,primecell-periphid = <0xbb95d>;
+ reg = <0x28640000 0x1000>;
cpu = <&A53_2>;
clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
clock-names = "apb_pclk";
@@ -357,8 +409,7 @@
etm3: etm@28740000 {
compatible = "arm,coresight-etm4x", "arm,primecell";
- reg = <0x28740000 0x10000>;
- arm,primecell-periphid = <0xbb95d>;
+ reg = <0x28740000 0x1000>;
cpu = <&A53_3>;
clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
clock-names = "apb_pclk";
@@ -372,59 +423,6 @@
};
};
- funnel {
- /*
- * non-configurable funnel don't show up on the AMBA
- * bus. As such no need to add "arm,primecell".
- */
- compatible = "arm,coresight-static-funnel";
-
- in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- ca_funnel_in_port0: endpoint {
- remote-endpoint = <&etm0_out_port>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- ca_funnel_in_port1: endpoint {
- remote-endpoint = <&etm1_out_port>;
- };
- };
-
- port@2 {
- reg = <2>;
-
- ca_funnel_in_port2: endpoint {
- remote-endpoint = <&etm2_out_port>;
- };
- };
-
- port@3 {
- reg = <3>;
-
- ca_funnel_in_port3: endpoint {
- remote-endpoint = <&etm3_out_port>;
- };
- };
- };
-
- out-ports {
- port {
- ca_funnel_out_port0: endpoint {
- remote-endpoint = <&hugo_funnel_in_port0>;
- };
- };
- };
- };
-
funnel@28c03000 {
compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
reg = <0x28c03000 0x1000>;
@@ -701,7 +699,7 @@
snvs_rtc: snvs-rtc-lp {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
- regmap =<&snvs>;
+ regmap = <&snvs>;
offset = <0x34>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
@@ -729,6 +727,8 @@
clk: clock-controller@30380000 {
compatible = "fsl,imx8mp-ccm";
reg = <0x30380000 0x10000>;
+ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
#clock-cells = <1>;
clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>,
<&clk_ext3>, <&clk_ext4>;
@@ -794,6 +794,12 @@
reg = <IMX8MP_POWER_DOMAIN_AUDIOMIX>;
clocks = <&clk IMX8MP_CLK_AUDIO_ROOT>,
<&clk IMX8MP_CLK_AUDIO_AXI>;
+ assigned-clocks = <&clk IMX8MP_CLK_AUDIO_AHB>,
+ <&clk IMX8MP_CLK_AUDIO_AXI_SRC>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
+ <&clk IMX8MP_SYS_PLL1_800M>;
+ assigned-clock-rates = <400000000>,
+ <600000000>;
};
pgc_gpu2d: power-domain@6 {
@@ -854,7 +860,7 @@
pgc_vpumix: power-domain@19 {
#power-domain-cells = <0>;
reg = <IMX8MP_POWER_DOMAIN_VPUMIX>;
- clocks =<&clk IMX8MP_CLK_VPU_ROOT>;
+ clocks = <&clk IMX8MP_CLK_VPU_ROOT>;
};
pgc_vpu_g1: power-domain@20 {
@@ -884,6 +890,15 @@
clocks = <&clk IMX8MP_CLK_ML_AXI>,
<&clk IMX8MP_CLK_ML_AHB>,
<&clk IMX8MP_CLK_NPU_ROOT>;
+ assigned-clocks = <&clk IMX8MP_CLK_ML_CORE>,
+ <&clk IMX8MP_CLK_ML_AXI>,
+ <&clk IMX8MP_CLK_ML_AHB>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
+ <&clk IMX8MP_SYS_PLL1_800M>,
+ <&clk IMX8MP_SYS_PLL1_800M>;
+ assigned-clock-rates = <800000000>,
+ <800000000>,
+ <300000000>;
};
};
};
@@ -1457,6 +1472,47 @@
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
+
+ easrc: easrc@30c90000 {
+ compatible = "fsl,imx8mp-easrc", "fsl,imx8mn-easrc";
+ reg = <0x30c90000 0x10000>;
+ interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_ASRC_IPG>;
+ clock-names = "mem";
+ dmas = <&sdma2 16 23 0> , <&sdma2 17 23 0>,
+ <&sdma2 18 23 0> , <&sdma2 19 23 0>,
+ <&sdma2 20 23 0> , <&sdma2 21 23 0>,
+ <&sdma2 22 23 0> , <&sdma2 23 23 0>;
+ dma-names = "ctx0_rx", "ctx0_tx",
+ "ctx1_rx", "ctx1_tx",
+ "ctx2_rx", "ctx2_tx",
+ "ctx3_rx", "ctx3_tx";
+ firmware-name = "imx/easrc/easrc-imx8mn.bin";
+ fsl,asrc-rate = <8000>;
+ fsl,asrc-format = <2>;
+ status = "disabled";
+ };
+
+ micfil: audio-controller@30ca0000 {
+ compatible = "fsl,imx8mp-micfil";
+ reg = <0x30ca0000 0x10000>;
+ #sound-dai-cells = <0>;
+ interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_IPG>,
+ <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_SEL>,
+ <&clk IMX8MP_AUDIO_PLL1_OUT>,
+ <&clk IMX8MP_AUDIO_PLL2_OUT>,
+ <&clk IMX8MP_CLK_EXT3>;
+ clock-names = "ipg_clk", "ipg_clk_app",
+ "pll8k", "pll11k", "clkext3";
+ dmas = <&sdma2 24 25 0x80000000>;
+ dma-names = "rx";
+ status = "disabled";
+ };
+
};
sdma3: dma-controller@30e00000 {
@@ -1764,7 +1820,7 @@
compatible = "fsl,imx8mp-ldb";
reg = <0x5c 0x4>, <0x128 0x4>;
reg-names = "ldb", "lvds";
- clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+ clocks = <&clk IMX8MP_CLK_MEDIA_LDB_ROOT>;
clock-names = "ldb";
assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
@@ -1846,8 +1902,8 @@
#size-cells = <2>;
device_type = "pci";
bus-range = <0x00 0xff>;
- ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000>, /* downstream I/O 64KB */
- <0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
+ ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000>, /* downstream I/O 64KB */
+ <0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
num-lanes = <1>;
num-viewport = <4>;
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
@@ -1968,6 +2024,18 @@
interconnect-names = "g1", "g2", "vc8000e";
};
+ npu: npu@38500000 {
+ compatible = "vivante,gc";
+ reg = <0x38500000 0x200000>;
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX8MP_CLK_NPU_ROOT>,
+ <&clk IMX8MP_CLK_NPU_ROOT>,
+ <&clk IMX8MP_CLK_ML_AXI>,
+ <&clk IMX8MP_CLK_ML_AHB>;
+ clock-names = "core", "shader", "bus", "reg";
+ power-domains = <&pgc_mlmix>;
+ };
+
gic: interrupt-controller@38800000 {
compatible = "arm,gic-v3";
reg = <0x38800000 0x10000>,
@@ -2028,6 +2096,7 @@
phys = <&usb3_phy0>, <&usb3_phy0>;
phy-names = "usb2-phy", "usb3-phy";
snps,gfladj-refclk-lpm-sel-quirk;
+ snps,parkmode-disable-ss-quirk;
};
};
@@ -2070,6 +2139,7 @@
phys = <&usb3_phy1>, <&usb3_phy1>;
phy-names = "usb2-phy", "usb3-phy";
snps,gfladj-refclk-lpm-sel-quirk;
+ snps,parkmode-disable-ss-quirk;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-kontron-pitx-imx8m.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-kontron-pitx-imx8m.dts
index 6376417e918c..d8cf1f27c3ec 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-kontron-pitx-imx8m.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-kontron-pitx-imx8m.dts
@@ -65,7 +65,7 @@
status = "okay";
tpm@0 {
- compatible = "infineon,slb9670";
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
reg = <0>;
spi-max-frequency = <43000000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-devkit.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-devkit.dts
index ce7ce2ba855c..8055a2c23035 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-devkit.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-devkit.dts
@@ -139,18 +139,6 @@
regulator-always-on;
};
- reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_usdhc2_pwr>;
- regulator-name = "VSD_3V3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-always-on;
- };
-
wwan_codec: sound-wwan-codec {
compatible = "option,gtm601";
#sound-dai-cells = <0>;
@@ -242,6 +230,13 @@
enable-active-high;
regulator-always-on;
};
+
+ wifi_pwr_seq: pwrseq {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc2_rst>;
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ };
};
&A53_0 {
@@ -324,6 +319,7 @@
regulator-ramp-delay = <1250>;
rohm,dvs-run-voltage = <1000000>;
rohm,dvs-idle-voltage = <900000>;
+ regulator-always-on;
};
buck3_reg: BUCK3 {
@@ -561,9 +557,9 @@
reg = <0x6a>;
vdd-supply = <&reg_3v3_p>;
vddio-supply = <&reg_3v3_p>;
- mount-matrix = "1", "0", "0",
- "0", "1", "0",
- "0", "0", "-1";
+ mount-matrix = "1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "-1";
};
};
@@ -807,7 +803,7 @@
>;
};
- pinctrl_usdhc2_pwr: usdhc2pwrgrp {
+ pinctrl_usdhc2_rst: usdhc2rstgrp {
fsl,pins = <
MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
>;
@@ -1030,8 +1026,8 @@
pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
bus-width = <4>;
- vmmc-supply = <&reg_usdhc2_vmmc>;
- power-supply = <&wifi_pwr_en>;
+ vmmc-supply = <&wifi_pwr_en>;
+ mmc-pwrseq = <&wifi_pwr_seq>;
broken-cd;
disable-wp;
cap-sdio-irq;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r2.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r2.dts
index 2b3d437a642a..cf40025111c8 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r2.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r2.dts
@@ -13,9 +13,9 @@
};
&accel_gyro {
- mount-matrix = "1", "0", "0",
- "0", "-1", "0",
- "0", "0", "1";
+ mount-matrix = "1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "1";
};
&bq25895 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r3.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r3.dtsi
index 7fd0176e4bd3..17f86496f8b0 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r3.dtsi
@@ -16,9 +16,9 @@
};
&accel_gyro {
- mount-matrix = "1", "0", "0",
- "0", "1", "0",
- "0", "0", "-1";
+ mount-matrix = "1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "-1";
};
&bq25895 {
@@ -39,9 +39,9 @@
};
&magnetometer {
- mount-matrix = "1", "0", "0",
- "0", "-1", "0",
- "0", "0", "-1";
+ mount-matrix = "1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "-1";
};
&proximity {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r4.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r4.dts
index 97577c0a7715..33f398b48119 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r4.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5-r4.dts
@@ -23,5 +23,5 @@
};
&proximity {
- proximity-near-level = <5>;
+ proximity-near-level = <7>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5.dtsi
index 38732579d13e..ffb5fe61630d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-librem5.dtsi
@@ -91,6 +91,7 @@
regulator-max-microvolt = <1800000>;
gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
+ regulator-always-on;
};
reg_mic_2v4: regulator-mic-2v4 {
@@ -380,7 +381,7 @@
gpio-hog;
gpios = <1 GPIO_ACTIVE_HIGH>;
input;
- lane-mapping = "pmic-5v";
+ line-name = "pmic-5v";
};
};
@@ -795,6 +796,8 @@
interrupt-parent = <&gpio1>;
interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "irq";
+ extcon = <&usb3_phy0>;
+ wakeup-source;
connector {
compatible = "usb-c-connector";
@@ -998,7 +1001,7 @@
};
regulator@3e {
- compatible = "tps65132";
+ compatible = "ti,tps65132";
reg = <0x3e>;
reg_lcd_avdd: outp {
@@ -1151,15 +1154,12 @@
pinctrl-0 = <&pinctrl_charger_in>;
interrupt-parent = <&gpio3>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
- phys = <&usb3_phy0>;
ti,battery-regulation-voltage = <4208000>; /* uV */
ti,termination-current = <128000>; /* uA */
ti,precharge-current = <128000>; /* uA */
ti,minimum-sys-voltage = <3700000>; /* uV */
ti,boost-voltage = <5000000>; /* uV */
ti,boost-max-current = <1500000>; /* uA */
- ti,use-vinmin-threshold = <1>; /* enable VINDPM */
- ti,vinmin-threshold = <3900000>; /* uV */
monitored-battery = <&bat>;
power-supplies = <&typec_pd>;
};
@@ -1376,7 +1376,7 @@
pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
bus-width = <8>;
vmmc-supply = <&reg_vdd_3v3>;
- power-supply = <&reg_vdd_1v8>;
+ vqmmc-supply = <&reg_vdd_1v8>;
non-removable;
status = "okay";
};
@@ -1391,7 +1391,7 @@
bus-width = <4>;
vmmc-supply = <&reg_wifi_3v3>;
mmc-pwrseq = <&usdhc2_pwrseq>;
- post-power-on-delay-ms = <1000>;
+ post-power-on-delay-ms = <20>;
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
max-frequency = <100000000>;
disable-wp;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-nitrogen.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-nitrogen.dts
index 8614c18b5998..767819cce886 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-nitrogen.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-nitrogen.dts
@@ -142,7 +142,7 @@
#address-cells = <1>;
#size-cells = <0>;
- i2c1a: i2c1@0 {
+ i2c1a: i2c@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
@@ -159,7 +159,7 @@
};
};
- i2c1b: i2c1@1 {
+ i2c1b: i2c@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
@@ -176,7 +176,7 @@
};
};
- i2c1c: i2c1@2 {
+ i2c1c: i2c@2 {
reg = <2>;
#address-cells = <1>;
#size-cells = <0>;
@@ -193,7 +193,7 @@
};
};
- i2c1d: i2c1@3 {
+ i2c1d: i2c@3 {
reg = <3>;
#address-cells = <1>;
#size-cells = <0>;
@@ -222,7 +222,7 @@
#address-cells = <1>;
#size-cells = <0>;
- i2c4@0 {
+ i2c@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
@@ -257,14 +257,14 @@
};
};
- ddc_i2c_bus: i2c4@1 {
+ ddc_i2c_bus: i2c@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
};
- i2c4@3 {
+ i2c@3 {
reg = <3>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-phanbell.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-phanbell.dts
index a3b9d615a3b4..e34045d10a12 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-phanbell.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-phanbell.dts
@@ -39,7 +39,7 @@
fan: gpio-fan {
compatible = "gpio-fan";
- gpio-fan,speed-map = <0 0 8600 1>;
+ gpio-fan,speed-map = <0 0>, <8600 1>;
gpios = <&gpio3 5 GPIO_ACTIVE_HIGH>;
#cooling-cells = <2>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-pico-pi.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-pico-pi.dts
index 89cbec5c41b2..ec89b5adeb93 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-pico-pi.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-pico-pi.dts
@@ -67,12 +67,12 @@
compatible = "rohm,bd71837";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pmic>;
+ #clock-cells = <0>;
clocks = <&pmic_osc>;
clock-names = "osc";
clock-output-names = "pmic_clk";
interrupt-parent = <&gpio1>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "irq";
regulators {
buck1: BUCK1 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-sr-som.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-sr-som.dtsi
index 0187890a90c5..efc00f4abeb1 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-sr-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-sr-som.dtsi
@@ -133,7 +133,7 @@
};
};
-&pgc_gpu{
+&pgc_gpu {
power-supply = <&sw1a_reg>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-thor96.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-thor96.dts
index 6e6182709d22..eaa9d0c0fcc1 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-thor96.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-thor96.dts
@@ -107,7 +107,7 @@
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wifi_reg_on>;
- gpio = <&gpio3 3 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx-lvds-tm070jvhg33.dtso b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx-lvds-tm070jvhg33.dtso
new file mode 100644
index 000000000000..306977d6ba0c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx-lvds-tm070jvhg33.dtso
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2019-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ compatible = "tq,imx8mq-tqma8mq-mba8mx", "tq,imx8mq-tqma8mq", "fsl,imx8mq";
+};
+
+&backlight_lvds {
+ status = "okay";
+};
+
+&dphy {
+ status = "okay";
+};
+
+&dsi_lvds_bridge {
+ status = "okay";
+};
+
+&expander0 {
+ dsi-mux-oe-hog {
+ gpio-hog;
+ gpios = <10 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "DSI_MUX_OE#";
+ };
+};
+
+&lcdif {
+ status = "okay";
+};
+
+&mipi_dsi {
+ status = "okay";
+};
+
+&panel {
+ compatible = "tianma,tm070jvhg33";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx.dts
index afb3ceb06751..b302daca4ce6 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-tqma8mq-mba8mx.dts
@@ -11,6 +11,7 @@
/ {
model = "TQ-Systems GmbH i.MX8MQ TQMa8MQ on MBa8Mx";
compatible = "tq,imx8mq-tqma8mq-mba8mx", "tq,imx8mq-tqma8mq", "fsl,imx8mq";
+ chassis-type = "embedded";
aliases {
eeprom0 = &eeprom3;
@@ -24,7 +25,7 @@
compatible = "linux,extcon-usb-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbcon0>;
- id-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
};
pcie0_refclk: pcie0-refclk {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-zii-ultra.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-zii-ultra.dtsi
index cb777b47baf9..0c960efd9b3d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq-zii-ultra.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq-zii-ultra.dtsi
@@ -15,7 +15,7 @@
stdout-path = &uart1;
};
- mdio0: bitbang-mdio {
+ mdio0: mdio {
compatible = "virtual,mdio-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mdio_bitbang>, <&pinctrl_fec1_phy_reset>;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8mq.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8mq.dtsi
index 01eec424f7f7..c6dc3ba0d43b 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8mq.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8mq.dtsi
@@ -225,6 +225,59 @@
};
};
+ funnel {
+ /*
+ * non-configurable funnel don't show up on the AMBA
+ * bus. As such no need to add "arm,primecell".
+ */
+ compatible = "arm,coresight-static-funnel";
+
+ in-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ca_funnel_in_port0: endpoint {
+ remote-endpoint = <&etm0_out_port>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ ca_funnel_in_port1: endpoint {
+ remote-endpoint = <&etm1_out_port>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ ca_funnel_in_port2: endpoint {
+ remote-endpoint = <&etm2_out_port>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ ca_funnel_in_port3: endpoint {
+ remote-endpoint = <&etm3_out_port>;
+ };
+ };
+ };
+
+ out-ports {
+ port {
+ ca_funnel_out_port0: endpoint {
+ remote-endpoint = <&hugo_funnel_in_port0>;
+ };
+ };
+ };
+ };
+
pmu {
compatible = "arm,cortex-a53-pmu";
interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
@@ -330,6 +383,145 @@
nvmem-cells = <&imx8mq_uid>;
nvmem-cell-names = "soc_unique_id";
+ etm0: etm@28440000 {
+ compatible = "arm,coresight-etm4x", "arm,primecell";
+ reg = <0x28440000 0x1000>;
+ cpu = <&A53_0>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ out-ports {
+ port {
+ etm0_out_port: endpoint {
+ remote-endpoint = <&ca_funnel_in_port0>;
+ };
+ };
+ };
+ };
+
+ etm1: etm@28540000 {
+ compatible = "arm,coresight-etm4x", "arm,primecell";
+ reg = <0x28540000 0x1000>;
+ cpu = <&A53_1>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ out-ports {
+ port {
+ etm1_out_port: endpoint {
+ remote-endpoint = <&ca_funnel_in_port1>;
+ };
+ };
+ };
+ };
+
+ etm2: etm@28640000 {
+ compatible = "arm,coresight-etm4x", "arm,primecell";
+ reg = <0x28640000 0x1000>;
+ cpu = <&A53_2>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ out-ports {
+ port {
+ etm2_out_port: endpoint {
+ remote-endpoint = <&ca_funnel_in_port2>;
+ };
+ };
+ };
+ };
+
+ etm3: etm@28740000 {
+ compatible = "arm,coresight-etm4x", "arm,primecell";
+ reg = <0x28740000 0x1000>;
+ cpu = <&A53_3>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ out-ports {
+ port {
+ etm3_out_port: endpoint {
+ remote-endpoint = <&ca_funnel_in_port3>;
+ };
+ };
+ };
+ };
+
+ funnel@28c03000 {
+ compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
+ reg = <0x28c03000 0x1000>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ in-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ hugo_funnel_in_port0: endpoint {
+ remote-endpoint = <&ca_funnel_out_port0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ hugo_funnel_in_port1: endpoint {
+ /* M4 input */
+ };
+ };
+ /* the other input ports are not connect to anything */
+ };
+
+ out-ports {
+ port {
+ hugo_funnel_out_port0: endpoint {
+ remote-endpoint = <&etf_in_port>;
+ };
+ };
+ };
+ };
+
+ etf@28c04000 {
+ compatible = "arm,coresight-tmc", "arm,primecell";
+ reg = <0x28c04000 0x1000>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ in-ports {
+ port {
+ etf_in_port: endpoint {
+ remote-endpoint = <&hugo_funnel_out_port0>;
+ };
+ };
+ };
+
+ out-ports {
+ port {
+ etf_out_port: endpoint {
+ remote-endpoint = <&etr_in_port>;
+ };
+ };
+ };
+ };
+
+ etr@28c06000 {
+ compatible = "arm,coresight-tmc", "arm,primecell";
+ reg = <0x28c06000 0x1000>;
+ clocks = <&clk IMX8MQ_CLK_MAIN_AXI>;
+ clock-names = "apb_pclk";
+
+ in-ports {
+ port {
+ etr_in_port: endpoint {
+ remote-endpoint = <&etf_out_port>;
+ };
+ };
+ };
+ };
+
aips1: bus@30000000 { /* AIPS1 */
compatible = "fsl,aips-bus", "simple-bus";
reg = <0x30000000 0x400000>;
@@ -631,9 +823,9 @@
compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
reg = <0x30370000 0x10000>;
- snvs_rtc: snvs-rtc-lp{
+ snvs_rtc: snvs-rtc-lp {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
- regmap =<&snvs>;
+ regmap = <&snvs>;
offset = <0x34>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
@@ -1457,6 +1649,7 @@
phys = <&usb3_phy0>, <&usb3_phy0>;
phy-names = "usb2-phy", "usb3-phy";
power-domains = <&pgc_otg1>;
+ snps,parkmode-disable-ss-quirk;
status = "disabled";
};
@@ -1488,6 +1681,7 @@
phys = <&usb3_phy1>, <&usb3_phy1>;
phy-names = "usb2-phy", "usb3-phy";
power-domains = <&pgc_otg2>;
+ snps,parkmode-disable-ss-quirk;
status = "disabled";
};
@@ -1582,8 +1776,8 @@
#size-cells = <2>;
device_type = "pci";
bus-range = <0x00 0xff>;
- ranges = <0x81000000 0 0x00000000 0x27f80000 0 0x00010000>, /* downstream I/O 64KB */
- <0x82000000 0 0x20000000 0x20000000 0 0x07f00000>; /* non-prefetchable memory */
+ ranges = <0x81000000 0 0x00000000 0x27f80000 0 0x00010000>, /* downstream I/O 64KB */
+ <0x82000000 0 0x20000000 0x20000000 0 0x07f00000>; /* non-prefetchable memory */
num-lanes = <1>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "msi";
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-apalis.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-apalis.dtsi
index 1c6af9f549a8..4d6427fbe875 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-apalis.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-apalis.dtsi
@@ -21,7 +21,6 @@
* this PHY model. Use delay on MAC side instead.
*/
&fec1 {
- fsl,rgmii_txc_dly;
phy-mode = "rgmii-rxid";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-mek.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-mek.dts
index 607cd6b4e972..6d50838ad17d 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-mek.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-mek.dts
@@ -22,6 +22,10 @@
/delete-node/ cpu@101;
};
+ thermal-zones {
+ /delete-node/ cpu1-thermal;
+ };
+
memory@80000000 {
device_type = "memory";
reg = <0x00000000 0x80000000 0 0x40000000>;
@@ -43,6 +47,18 @@
status = "okay";
};
+&lpuart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lpuart2>;
+ status = "okay";
+};
+
+&lpuart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lpuart3>;
+ status = "okay";
+};
+
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
@@ -114,6 +130,20 @@
>;
};
+ pinctrl_lpuart2: lpuart2grp {
+ fsl,pins = <
+ IMX8QM_UART0_RTS_B_DMA_UART2_RX 0x06000020
+ IMX8QM_UART0_CTS_B_DMA_UART2_TX 0x06000020
+ >;
+ };
+
+ pinctrl_lpuart3: lpuart3grp {
+ fsl,pins = <
+ IMX8QM_M41_GPIO0_00_DMA_UART3_RX 0x06000020
+ IMX8QM_M41_GPIO0_01_DMA_UART3_TX 0x06000020
+ >;
+ };
+
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
IMX8QM_EMMC0_CLK_CONN_EMMC0_CLK 0x06000041
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-dma.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-dma.dtsi
index e9b198c13b2f..69cb8676732e 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-dma.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-dma.dtsi
@@ -44,6 +44,69 @@
};
};
+&edma2 {
+ reg = <0x5a1f0000 0x170000>;
+ #dma-cells = <3>;
+ dma-channels = <22>;
+ dma-channel-mask = <0xf00>;
+ interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* unused */
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, /* unused */
+ <GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 436 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 437 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 441 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&pd IMX_SC_R_DMA_0_CH0>,
+ <&pd IMX_SC_R_DMA_0_CH1>,
+ <&pd IMX_SC_R_DMA_0_CH2>,
+ <&pd IMX_SC_R_DMA_0_CH3>,
+ <&pd IMX_SC_R_DMA_0_CH4>,
+ <&pd IMX_SC_R_DMA_0_CH5>,
+ <&pd IMX_SC_R_DMA_0_CH6>,
+ <&pd IMX_SC_R_DMA_0_CH7>,
+ <&pd IMX_SC_R_DMA_0_CH8>,
+ <&pd IMX_SC_R_DMA_0_CH9>,
+ <&pd IMX_SC_R_DMA_0_CH10>,
+ <&pd IMX_SC_R_DMA_0_CH11>,
+ <&pd IMX_SC_R_DMA_0_CH12>,
+ <&pd IMX_SC_R_DMA_0_CH13>,
+ <&pd IMX_SC_R_DMA_0_CH14>,
+ <&pd IMX_SC_R_DMA_0_CH15>,
+ <&pd IMX_SC_R_DMA_0_CH16>,
+ <&pd IMX_SC_R_DMA_0_CH17>,
+ <&pd IMX_SC_R_DMA_0_CH18>,
+ <&pd IMX_SC_R_DMA_0_CH19>,
+ <&pd IMX_SC_R_DMA_0_CH20>,
+ <&pd IMX_SC_R_DMA_0_CH21>;
+ status = "okay";
+};
+
+&edma3 {
+ power-domains = <&pd IMX_SC_R_DMA_1_CH0>,
+ <&pd IMX_SC_R_DMA_1_CH1>,
+ <&pd IMX_SC_R_DMA_1_CH2>,
+ <&pd IMX_SC_R_DMA_1_CH3>,
+ <&pd IMX_SC_R_DMA_1_CH4>,
+ <&pd IMX_SC_R_DMA_1_CH5>,
+ <&pd IMX_SC_R_DMA_1_CH6>,
+ <&pd IMX_SC_R_DMA_1_CH7>;
+};
+
&flexcan1 {
fsl,clk-source = /bits/ 8 <1>;
};
@@ -64,18 +127,26 @@
&lpuart0 {
compatible = "fsl,imx8qm-lpuart", "fsl,imx8qxp-lpuart";
+ dmas = <&edma2 13 0 0>, <&edma2 12 0 1>;
+ dma-names = "rx","tx";
};
&lpuart1 {
compatible = "fsl,imx8qm-lpuart", "fsl,imx8qxp-lpuart";
+ dmas = <&edma2 15 0 0>, <&edma2 14 0 1>;
+ dma-names = "rx","tx";
};
&lpuart2 {
compatible = "fsl,imx8qm-lpuart", "fsl,imx8qxp-lpuart";
+ dmas = <&edma2 17 0 0>, <&edma2 16 0 1>;
+ dma-names = "rx","tx";
};
&lpuart3 {
compatible = "fsl,imx8qm-lpuart", "fsl,imx8qxp-lpuart";
+ dmas = <&edma2 19 0 0>, <&edma2 18 0 1>;
+ dma-names = "rx","tx";
};
&i2c0 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-img.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-img.dtsi
index 7764b4146e0a..2bbdacb1313f 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-img.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qm-ss-img.dtsi
@@ -8,5 +8,5 @@
};
&jpegenc {
- compatible = "nxp,imx8qm-jpgdec", "nxp,imx8qxp-jpgenc";
+ compatible = "nxp,imx8qm-jpgenc", "nxp,imx8qxp-jpgenc";
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qm.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8qm.dtsi
index 9fff867709f0..31744fc1ab08 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qm.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qm.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/pinctrl/pads-imx8qm.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
interrupt-parent = <&gic>;
@@ -23,9 +24,9 @@
serial1 = &lpuart1;
serial2 = &lpuart2;
serial3 = &lpuart3;
- vpu_core0 = &vpu_core0;
- vpu_core1 = &vpu_core1;
- vpu_core2 = &vpu_core2;
+ vpu-core0 = &vpu_core0;
+ vpu-core1 = &vpu_core1;
+ vpu-core2 = &vpu_core2;
};
cpus {
@@ -62,6 +63,7 @@
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <0x0 0x0>;
+ clocks = <&clk IMX_SC_R_A53 IMX_SC_PM_CLK_CPU>;
enable-method = "psci";
i-cache-size = <0x8000>;
i-cache-line-size = <64>;
@@ -70,12 +72,15 @@
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&A53_L2>;
+ operating-points-v2 = <&a53_opp_table>;
+ #cooling-cells = <2>;
};
A53_1: cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <0x0 0x1>;
+ clocks = <&clk IMX_SC_R_A53 IMX_SC_PM_CLK_CPU>;
enable-method = "psci";
i-cache-size = <0x8000>;
i-cache-line-size = <64>;
@@ -84,12 +89,15 @@
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&A53_L2>;
+ operating-points-v2 = <&a53_opp_table>;
+ #cooling-cells = <2>;
};
A53_2: cpu@2 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <0x0 0x2>;
+ clocks = <&clk IMX_SC_R_A53 IMX_SC_PM_CLK_CPU>;
enable-method = "psci";
i-cache-size = <0x8000>;
i-cache-line-size = <64>;
@@ -98,12 +106,15 @@
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&A53_L2>;
+ operating-points-v2 = <&a53_opp_table>;
+ #cooling-cells = <2>;
};
A53_3: cpu@3 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <0x0 0x3>;
+ clocks = <&clk IMX_SC_R_A53 IMX_SC_PM_CLK_CPU>;
enable-method = "psci";
i-cache-size = <0x8000>;
i-cache-line-size = <64>;
@@ -112,12 +123,15 @@
d-cache-line-size = <64>;
d-cache-sets = <128>;
next-level-cache = <&A53_L2>;
+ operating-points-v2 = <&a53_opp_table>;
+ #cooling-cells = <2>;
};
A72_0: cpu@100 {
device_type = "cpu";
compatible = "arm,cortex-a72";
reg = <0x0 0x100>;
+ clocks = <&clk IMX_SC_R_A72 IMX_SC_PM_CLK_CPU>;
enable-method = "psci";
i-cache-size = <0xC000>;
i-cache-line-size = <64>;
@@ -126,14 +140,19 @@
d-cache-line-size = <64>;
d-cache-sets = <256>;
next-level-cache = <&A72_L2>;
+ operating-points-v2 = <&a72_opp_table>;
+ #cooling-cells = <2>;
};
A72_1: cpu@101 {
device_type = "cpu";
compatible = "arm,cortex-a72";
reg = <0x0 0x101>;
+ clocks = <&clk IMX_SC_R_A72 IMX_SC_PM_CLK_CPU>;
enable-method = "psci";
next-level-cache = <&A72_L2>;
+ operating-points-v2 = <&a72_opp_table>;
+ #cooling-cells = <2>;
};
A53_L2: l2-cache0 {
@@ -155,6 +174,66 @@
};
};
+ a53_opp_table: opp-table-0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <900000>;
+ clock-latency-ns = <150000>;
+ };
+
+ opp-896000000 {
+ opp-hz = /bits/ 64 <896000000>;
+ opp-microvolt = <1000000>;
+ clock-latency-ns = <150000>;
+ };
+
+ opp-1104000000 {
+ opp-hz = /bits/ 64 <1104000000>;
+ opp-microvolt = <1100000>;
+ clock-latency-ns = <150000>;
+ };
+
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1100000>;
+ clock-latency-ns = <150000>;
+ opp-suspend;
+ };
+ };
+
+ a72_opp_table: opp-table-1 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <1000000>;
+ clock-latency-ns = <150000>;
+ };
+
+ opp-1056000000 {
+ opp-hz = /bits/ 64 <1056000000>;
+ opp-microvolt = <1000000>;
+ clock-latency-ns = <150000>;
+ };
+
+ opp-1296000000 {
+ opp-hz = /bits/ 64 <1296000000>;
+ opp-microvolt = <1100000>;
+ clock-latency-ns = <150000>;
+ };
+
+ opp-1596000000 {
+ opp-hz = /bits/ 64 <1596000000>;
+ opp-microvolt = <1100000>;
+ clock-latency-ns = <150000>;
+ opp-suspend;
+ };
+ };
+
gic: interrupt-controller@51a00000 {
compatible = "arm,gic-v3";
reg = <0x0 0x51a00000 0 0x10000>, /* GIC Dist */
@@ -212,6 +291,133 @@
rtc: rtc {
compatible = "fsl,imx8qxp-sc-rtc";
};
+
+ tsens: thermal-sensor {
+ compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
+ #thermal-sensor-cells = <1>;
+ };
+ };
+
+ thermal-zones {
+ cpu0-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+ thermal-sensors = <&tsens IMX_SC_R_A53>;
+
+ trips {
+ cpu_alert0: trip0 {
+ temperature = <107000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit0: trip1 {
+ temperature = <127000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert0>;
+ cooling-device =
+ <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu1-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+ thermal-sensors = <&tsens IMX_SC_R_A72>;
+
+ trips {
+ cpu_alert1: trip0 {
+ temperature = <107000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit1: trip1 {
+ temperature = <127000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert1>;
+ cooling-device =
+ <&A72_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&A72_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ gpu0-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+ thermal-sensors = <&tsens IMX_SC_R_GPU_0_PID0>;
+
+ trips {
+ gpu_alert0: trip0 {
+ temperature = <107000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ gpu_crit0: trip1 {
+ temperature = <127000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpu1-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+ thermal-sensors = <&tsens IMX_SC_R_GPU_1_PID0>;
+
+ trips {
+ gpu_alert1: trip0 {
+ temperature = <107000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ gpu_crit1: trip1 {
+ temperature = <127000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ drc0-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+ thermal-sensors = <&tsens IMX_SC_R_DRC_0>;
+
+ trips {
+ drc_alert0: trip0 {
+ temperature = <107000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ drc_crit0: trip1 {
+ temperature = <127000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
};
/* sorted in register address */
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ai_ml.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ai_ml.dts
index 7d00e17f0447..50bf7919c863 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ai_ml.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ai_ml.dts
@@ -180,7 +180,7 @@
>;
};
- pinctrl_leds: ledsgrp{
+ pinctrl_leds: ledsgrp {
fsl,pins = <
IMX8QXP_ESAI0_TX2_RX3_LSIO_GPIO0_IO06 0x00000021
IMX8QXP_ESAI0_TX3_RX2_LSIO_GPIO0_IO07 0x00000021
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-mek.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-mek.dts
index 7924b0969ad8..8360bb851ac0 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-mek.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-mek.dts
@@ -31,7 +31,7 @@
};
gpio-sbu-mux {
- compatible = "gpio-sbu-mux";
+ compatible = "nxp,cbdtu02043", "gpio-sbu-mux";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_typec_mux>;
select-gpios = <&lsio_gpio5 9 GPIO_ACTIVE_HIGH>;
@@ -50,6 +50,10 @@
status = "okay";
};
+&dsp_reserved {
+ status = "okay";
+};
+
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
@@ -152,12 +156,6 @@
interrupt-parent = <&lsio_gpio1>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
- port {
- typec_dr_sw: endpoint {
- remote-endpoint = <&usb3_drd_sw>;
- };
- };
-
usb_con1: connector {
compatible = "usb-c-connector";
label = "USB-C";
@@ -169,8 +167,17 @@
#address-cells = <1>;
#size-cells = <0>;
+ port@0 {
+ reg = <0>;
+
+ typec_dr_sw: endpoint {
+ remote-endpoint = <&usb3_drd_sw>;
+ };
+ };
+
port@1 {
reg = <1>;
+
typec_con_ss: endpoint {
remote-endpoint = <&usb3_data_ss>;
};
@@ -187,6 +194,18 @@
status = "okay";
};
+&lpuart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lpuart2>;
+ status = "okay";
+};
+
+&lpuart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lpuart3>;
+ status = "okay";
+};
+
&mu_m0 {
status = "okay";
};
@@ -340,6 +359,20 @@
>;
};
+ pinctrl_lpuart2: lpuart2grp {
+ fsl,pins = <
+ IMX8QXP_UART2_TX_ADMA_UART2_TX 0x06000020
+ IMX8QXP_UART2_RX_ADMA_UART2_RX 0x06000020
+ >;
+ };
+
+ pinctrl_lpuart3: lpuart3grp {
+ fsl,pins = <
+ IMX8QXP_FLEXCAN2_TX_ADMA_UART3_TX 0x06000020
+ IMX8QXP_FLEXCAN2_RX_ADMA_UART3_RX 0x06000020
+ >;
+ };
+
pinctrl_typec: typecgrp {
fsl,pins = <
IMX8QXP_SPI2_SCK_LSIO_GPIO1_IO03 0x06000021
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ss-vpu.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ss-vpu.dtsi
new file mode 100644
index 000000000000..7894a3ab26d6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp-ss-vpu.dtsi
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR X11)
+/*
+ * Copyright 2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+&vpu_core0 {
+ reg = <0x2d040000 0x10000>;
+};
+
+&vpu_core1 {
+ reg = <0x2d050000 0x10000>;
+};
+
+/delete-node/ &mu2_m0;
+/delete-node/ &vpu_core2;
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp.dtsi
index 85c0b1d2bac5..958267b33340 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8qxp.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8qxp.dtsi
@@ -46,9 +46,8 @@
serial1 = &lpuart1;
serial2 = &lpuart2;
serial3 = &lpuart3;
- vpu_core0 = &vpu_core0;
- vpu_core1 = &vpu_core1;
- vpu_core2 = &vpu_core2;
+ vpu-core0 = &vpu_core0;
+ vpu-core1 = &vpu_core1;
};
cpus {
@@ -184,6 +183,7 @@
dsp_reserved: dsp@92400000 {
reg = <0 0x92400000 0 0x2000000>;
no-map;
+ status = "disabled";
};
encoder_rpc: encoder-rpc@94400000 {
@@ -317,6 +317,7 @@
};
#include "imx8qxp-ss-img.dtsi"
+#include "imx8qxp-ss-vpu.dtsi"
#include "imx8qxp-ss-adma.dtsi"
#include "imx8qxp-ss-conn.dtsi"
#include "imx8qxp-ss-lsio.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8ulp-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx8ulp-evk.dts
index f1c6d933a17c..69dd8e31027c 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8ulp-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8ulp-evk.dts
@@ -20,6 +20,55 @@
reg = <0x0 0x80000000 0 0x80000000>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0 0x28000000>;
+ linux,cma-default;
+ };
+
+ m33_reserved: noncacheable-section@a8600000 {
+ reg = <0 0xa8600000 0 0x1000000>;
+ no-map;
+ };
+
+ rsc_table: rsc-table@1fff8000{
+ reg = <0 0x1fff8000 0 0x1000>;
+ no-map;
+ };
+
+ vdev0vring0: vdev0vring0@aff00000 {
+ reg = <0 0xaff00000 0 0x8000>;
+ no-map;
+ };
+
+ vdev0vring1: vdev0vring1@aff08000 {
+ reg = <0 0xaff08000 0 0x8000>;
+ no-map;
+ };
+
+ vdev1vring0: vdev1vring0@aff10000 {
+ reg = <0 0xaff10000 0 0x8000>;
+ no-map;
+ };
+
+ vdev1vring1: vdev1vring1@aff18000 {
+ reg = <0 0xaff18000 0 0x8000>;
+ no-map;
+ };
+
+ vdevbuffer: vdevbuffer@a8400000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0xa8400000 0 0x100000>;
+ no-map;
+ };
+ };
+
clock_ext_rmii: clock-ext-rmii {
compatible = "fixed-clock";
clock-frequency = <50000000>;
@@ -36,6 +85,31 @@
};
};
+&cm33 {
+ mbox-names = "tx", "rx", "rxdb";
+ mboxes = <&mu 0 1>,
+ <&mu 1 1>,
+ <&mu 3 1>;
+ memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
+ status = "okay";
+};
+
+&flexspi2 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_flexspi2_ptd>;
+ pinctrl-1 = <&pinctrl_flexspi2_ptd>;
+ status = "okay";
+
+ mx25uw51345gxdi00: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <200000000>;
+ spi-tx-bus-width = <8>;
+ spi-rx-bus-width = <8>;
+ };
+};
+
&lpuart5 {
/* console */
pinctrl-names = "default", "sleep";
@@ -44,10 +118,29 @@
status = "okay";
};
-&usdhc0 {
+&lpi2c7 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpi2c7>;
+ pinctrl-1 = <&pinctrl_lpi2c7>;
+ status = "okay";
+
+ pcal6408: gpio@21 {
+ compatible = "nxp,pcal9554b";
+ reg = <0x21>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+};
+
+&usdhc0 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
pinctrl-0 = <&pinctrl_usdhc0>;
pinctrl-1 = <&pinctrl_usdhc0>;
+ pinctrl-2 = <&pinctrl_usdhc0>;
+ pinctrl-3 = <&pinctrl_usdhc0>;
non-removable;
bus-width = <8>;
status = "okay";
@@ -79,6 +172,10 @@
};
};
+&mu {
+ status = "okay";
+};
+
&iomuxc1 {
pinctrl_enet: enetgrp {
fsl,pins = <
@@ -96,6 +193,23 @@
>;
};
+ pinctrl_flexspi2_ptd: flexspi2ptdgrp {
+ fsl,pins = <
+
+ MX8ULP_PAD_PTD12__FLEXSPI2_A_SS0_B 0x42
+ MX8ULP_PAD_PTD13__FLEXSPI2_A_SCLK 0x42
+ MX8ULP_PAD_PTD14__FLEXSPI2_A_DATA3 0x42
+ MX8ULP_PAD_PTD15__FLEXSPI2_A_DATA2 0x42
+ MX8ULP_PAD_PTD16__FLEXSPI2_A_DATA1 0x42
+ MX8ULP_PAD_PTD17__FLEXSPI2_A_DATA0 0x42
+ MX8ULP_PAD_PTD18__FLEXSPI2_A_DQS 0x42
+ MX8ULP_PAD_PTD19__FLEXSPI2_A_DATA7 0x42
+ MX8ULP_PAD_PTD20__FLEXSPI2_A_DATA6 0x42
+ MX8ULP_PAD_PTD21__FLEXSPI2_A_DATA5 0x42
+ MX8ULP_PAD_PTD22__FLEXSPI2_A_DATA4 0x42
+ >;
+ };
+
pinctrl_lpuart5: lpuart5grp {
fsl,pins = <
MX8ULP_PAD_PTF14__LPUART5_TX 0x3
@@ -103,19 +217,26 @@
>;
};
+ pinctrl_lpi2c7: lpi2c7grp {
+ fsl,pins = <
+ MX8ULP_PAD_PTE12__LPI2C7_SCL 0x20
+ MX8ULP_PAD_PTE13__LPI2C7_SDA 0x20
+ >;
+ };
+
pinctrl_usdhc0: usdhc0grp {
fsl,pins = <
- MX8ULP_PAD_PTD1__SDHC0_CMD 0x43
- MX8ULP_PAD_PTD2__SDHC0_CLK 0x10042
- MX8ULP_PAD_PTD10__SDHC0_D0 0x43
- MX8ULP_PAD_PTD9__SDHC0_D1 0x43
- MX8ULP_PAD_PTD8__SDHC0_D2 0x43
- MX8ULP_PAD_PTD7__SDHC0_D3 0x43
- MX8ULP_PAD_PTD6__SDHC0_D4 0x43
- MX8ULP_PAD_PTD5__SDHC0_D5 0x43
- MX8ULP_PAD_PTD4__SDHC0_D6 0x43
- MX8ULP_PAD_PTD3__SDHC0_D7 0x43
- MX8ULP_PAD_PTD11__SDHC0_DQS 0x10042
+ MX8ULP_PAD_PTD1__SDHC0_CMD 0x3
+ MX8ULP_PAD_PTD2__SDHC0_CLK 0x10002
+ MX8ULP_PAD_PTD10__SDHC0_D0 0x3
+ MX8ULP_PAD_PTD9__SDHC0_D1 0x3
+ MX8ULP_PAD_PTD8__SDHC0_D2 0x3
+ MX8ULP_PAD_PTD7__SDHC0_D3 0x3
+ MX8ULP_PAD_PTD6__SDHC0_D4 0x3
+ MX8ULP_PAD_PTD5__SDHC0_D5 0x3
+ MX8ULP_PAD_PTD4__SDHC0_D6 0x3
+ MX8ULP_PAD_PTD3__SDHC0_D7 0x3
+ MX8ULP_PAD_PTD11__SDHC0_DQS 0x10002
>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8ulp.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8ulp.dtsi
index 57627bdaa851..c4a0082f30d3 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8ulp.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8ulp.dtsi
@@ -7,6 +7,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/imx8ulp-power.h>
+#include <dt-bindings/thermal/thermal.h>
#include "imx8ulp-pinfunc.h"
@@ -39,6 +40,7 @@
reg = <0x0 0x0>;
enable-method = "psci";
next-level-cache = <&A35_L2>;
+ cpu-idle-states = <&cpu_sleep>;
};
A35_1: cpu@1 {
@@ -47,6 +49,7 @@
reg = <0x0 0x1>;
enable-method = "psci";
next-level-cache = <&A35_L2>;
+ cpu-idle-states = <&cpu_sleep>;
};
A35_L2: l2-cache0 {
@@ -54,6 +57,19 @@
cache-level = <2>;
cache-unified;
};
+
+ idle-states {
+ entry-method = "psci";
+
+ cpu_sleep: cpu-sleep {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x0>;
+ local-timer-stop;
+ entry-latency-us = <1000>;
+ exit-latency-us = <700>;
+ min-residency-us = <2700>;
+ };
+ };
};
gic: interrupt-controller@2d400000 {
@@ -78,6 +94,28 @@
method = "smc";
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+ thermal-sensors = <&scmi_sensor 0>;
+
+ trips {
+ cpu_alert0: trip0 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit0: trip1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* Physical Secure */
@@ -148,11 +186,17 @@
};
};
+ cm33: remoteproc-cm33 {
+ compatible = "fsl,imx8ulp-cm33";
+ status = "disabled";
+ };
+
soc: soc@0 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0x0 0x0 0x0 0x40000000>;
+ ranges = <0x0 0x0 0x0 0x40000000>,
+ <0x60000000 0x0 0x60000000 0x1000000>;
s4muap: mailbox@27020000 {
compatible = "fsl,imx8ulp-mu-s4";
@@ -307,6 +351,21 @@
#reset-cells = <1>;
};
+ flexspi2: spi@29810000 {
+ compatible = "nxp,imx8mm-fspi";
+ reg = <0x29810000 0x10000>, <0x60000000 0x10000000>;
+ reg-names = "fspi_base", "fspi_mmap";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&pcc4 IMX8ULP_CLK_FLEXSPI2>,
+ <&pcc4 IMX8ULP_CLK_FLEXSPI2>;
+ clock-names = "fspi_en", "fspi";
+ assigned-clocks = <&pcc4 IMX8ULP_CLK_FLEXSPI2>;
+ assigned-clock-parents = <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV2>;
+ status = "disabled";
+ };
+
lpi2c6: i2c@29840000 {
compatible = "fsl,imx8ulp-lpi2c", "fsl,imx7ulp-lpi2c";
reg = <0x29840000 0x10000>;
@@ -365,6 +424,10 @@
<&pcc4 IMX8ULP_CLK_USDHC0>;
clock-names = "ipg", "ahb", "per";
power-domains = <&scmi_devpd IMX8ULP_PD_USDHC0>;
+ assigned-clocks = <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV1>,
+ <&pcc4 IMX8ULP_CLK_USDHC0>;
+ assigned-clock-parents = <0>, <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV1>;
+ assigned-clock-rates = <389283840>, <389283840>;
fsl,tuning-start-tap = <20>;
fsl,tuning-step = <2>;
bus-width = <4>;
@@ -380,6 +443,10 @@
<&pcc4 IMX8ULP_CLK_USDHC1>;
clock-names = "ipg", "ahb", "per";
power-domains = <&scmi_devpd IMX8ULP_PD_USDHC1>;
+ assigned-clocks = <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV2>,
+ <&pcc4 IMX8ULP_CLK_USDHC1>;
+ assigned-clock-parents = <0>, <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV2>;
+ assigned-clock-rates = <194641920>, <194641920>;
fsl,tuning-start-tap = <20>;
fsl,tuning-step = <2>;
bus-width = <4>;
@@ -395,6 +462,10 @@
<&pcc4 IMX8ULP_CLK_USDHC2>;
clock-names = "ipg", "ahb", "per";
power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
+ assigned-clocks = <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV2>,
+ <&pcc4 IMX8ULP_CLK_USDHC2>;
+ assigned-clock-parents = <0>, <&cgc1 IMX8ULP_CLK_SPLL3_PFD3_DIV2>;
+ assigned-clock-rates = <194641920>, <194641920>;
fsl,tuning-start-tap = <20>;
fsl,tuning-step = <2>;
bus-width = <4>;
@@ -412,12 +483,13 @@
};
};
- gpioe: gpio@2d000080 {
- compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio";
- reg = <0x2d000080 0x1000>, <0x2d000040 0x40>;
+ gpioe: gpio@2d000000 {
+ compatible = "fsl,imx8ulp-gpio";
+ reg = <0x2d000000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&pcc4 IMX8ULP_CLK_RGPIOE>,
@@ -426,12 +498,13 @@
gpio-ranges = <&iomuxc1 0 32 24>;
};
- gpiof: gpio@2d010080 {
- compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio";
- reg = <0x2d010080 0x1000>, <0x2d010040 0x40>;
+ gpiof: gpio@2d010000 {
+ compatible = "fsl,imx8ulp-gpio";
+ reg = <0x2d010000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&pcc4 IMX8ULP_CLK_RGPIOF>,
@@ -461,12 +534,13 @@
};
};
- gpiod: gpio@2e200080 {
- compatible = "fsl,imx8ulp-gpio", "fsl,imx7ulp-gpio";
- reg = <0x2e200080 0x1000>, <0x2e200040 0x40>;
+ gpiod: gpio@2e200000 {
+ compatible = "fsl,imx8ulp-gpio";
+ reg = <0x2e200000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&pcc5 IMX8ULP_CLK_RGPIOD>,
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-aster.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-aster.dtsi
index aab655931cde..bc659066e19a 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-aster.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-aster.dtsi
@@ -35,7 +35,7 @@
/* Colibri UART_A */
&lpuart3 {
- status= "okay";
+ status = "okay";
};
/* Colibri SDCard */
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris-v2.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris-v2.dtsi
index 98202a437040..58ec0b399c4f 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris-v2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris-v2.dtsi
@@ -23,11 +23,11 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds_converter &pinctrl_gpio_iris>;
- pinctrl_enable_3v3_vmmc: enable_3v3_vmmc {
+ pinctrl_enable_3v3_vmmc: enable-3v3-vmmc-grp {
fsl,pins = <IMX8QXP_SAI1_RXFS_LSIO_GPIO0_IO31 0x20>; /* SODIMM 100 */
};
- pinctrl_lvds_converter: lcd-lvds {
+ pinctrl_lvds_converter: lvds-converter-grp {
fsl,pins = <IMX8QXP_FLEXCAN1_TX_LSIO_GPIO1_IO18 0x20>, /* SODIMM 55 */
/* 6B/8B mode. Select LOW - 8B mode (24bit) */
<IMX8QXP_FLEXCAN1_RX_LSIO_GPIO1_IO17 0x20>, /* SODIMM 63 */
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris.dtsi
index f8953067bc3b..8d06925a8ebd 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx8x-colibri-iris.dtsi
@@ -77,7 +77,7 @@
/* Colibri UART_A */
&lpuart3 {
- status= "okay";
+ status = "okay";
};
&lsio_gpio3 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx93-11x11-evk.dts b/sys/contrib/device-tree/src/arm64/freescale/imx93-11x11-evk.dts
index c50f46f06f62..9921ea13ab48 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx93-11x11-evk.dts
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx93-11x11-evk.dts
@@ -15,6 +15,52 @@
stdout-path = &lpuart1;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ alloc-ranges = <0 0x80000000 0 0x40000000>;
+ size = <0 0x10000000>;
+ linux,cma-default;
+ };
+
+ vdev0vring0: vdev0vring0@a4000000 {
+ reg = <0 0xa4000000 0 0x8000>;
+ no-map;
+ };
+
+ vdev0vring1: vdev0vring1@a4008000 {
+ reg = <0 0xa4008000 0 0x8000>;
+ no-map;
+ };
+
+ vdev1vring0: vdev1vring0@a4000000 {
+ reg = <0 0xa4010000 0 0x8000>;
+ no-map;
+ };
+
+ vdev1vring1: vdev1vring1@a4018000 {
+ reg = <0 0xa4018000 0 0x8000>;
+ no-map;
+ };
+
+ rsc_table: rsc-table@2021f000 {
+ reg = <0 0x2021f000 0 0x1000>;
+ no-map;
+ };
+
+ vdevbuffer: vdevbuffer@a4020000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0xa4020000 0 0x100000>;
+ no-map;
+ };
+
+ };
+
reg_vref_1v8: regulator-adc-vref {
compatible = "regulator-fixed";
regulator-name = "vref_1v8";
@@ -30,6 +76,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+ off-on-delay-us = <12000>;
enable-active-high;
};
};
@@ -39,6 +86,16 @@
status = "okay";
};
+&cm33 {
+ mbox-names = "tx", "rx", "rxdb";
+ mboxes = <&mu1 0 1>,
+ <&mu1 1 1>,
+ <&mu1 3 1>;
+ memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
+ status = "okay";
+};
+
&mu1 {
status = "okay";
};
@@ -93,6 +150,12 @@
status = "okay";
};
+&lpuart5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart5>;
+ status = "okay";
+};
+
&usdhc1 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc1>;
@@ -166,18 +229,28 @@
>;
};
+ pinctrl_uart5: uart5grp {
+ fsl,pins = <
+ MX93_PAD_DAP_TDO_TRACESWO__LPUART5_TX 0x31e
+ MX93_PAD_DAP_TDI__LPUART5_RX 0x31e
+ MX93_PAD_DAP_TMS_SWDIO__LPUART5_RTS_B 0x31e
+ MX93_PAD_DAP_TCLK_SWCLK__LPUART5_CTS_B 0x31e
+ >;
+ };
+
+ /* need to config the SION for data and cmd pad, refer to ERR052021 */
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
MX93_PAD_SD1_CLK__USDHC1_CLK 0x15fe
- MX93_PAD_SD1_CMD__USDHC1_CMD 0x13fe
- MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x13fe
- MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x13fe
- MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x13fe
- MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x13fe
- MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x13fe
- MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x13fe
- MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x13fe
- MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x13fe
+ MX93_PAD_SD1_CMD__USDHC1_CMD 0x400013fe
+ MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x400013fe
+ MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x400013fe
+ MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x400013fe
+ MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x400013fe
+ MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x400013fe
+ MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x400013fe
+ MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x400013fe
+ MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x400013fe
MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x15fe
>;
};
@@ -194,14 +267,15 @@
>;
};
+ /* need to config the SION for data and cmd pad, refer to ERR052021 */
pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
MX93_PAD_SD2_CLK__USDHC2_CLK 0x15fe
- MX93_PAD_SD2_CMD__USDHC2_CMD 0x13fe
- MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x13fe
- MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x13fe
- MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x13fe
- MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x13fe
+ MX93_PAD_SD2_CMD__USDHC2_CMD 0x400013fe
+ MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x400013fe
+ MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x400013fe
+ MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x400013fe
+ MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x400013fe
MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x51e
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxca.dts b/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxca.dts
new file mode 100644
index 000000000000..af795ecf678b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxca.dts
@@ -0,0 +1,709 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Markus Niebel
+ * Author: Alexander Stein
+ */
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/net/ti-dp83867.h>
+#include <dt-bindings/pwm/pwm.h>
+
+#include "imx93-tqma9352.dtsi"
+
+/{
+ model = "TQ-Systems i.MX93 TQMa93xxLA/TQMa93xxCA on MBa93xxCA starter kit";
+ compatible = "tq,imx93-tqma9352-mba93xxca",
+ "tq,imx93-tqma9352", "fsl,imx93";
+ chassis-type = "embedded";
+
+ chosen {
+ stdout-path = &lpuart1;
+ };
+
+ aliases {
+ eeprom0 = &eeprom0;
+ rtc0 = &pcf85063;
+ rtc1 = &bbnsm_rtc;
+ };
+
+ backlight_lvds: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&tpm5 0 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ power-supply = <&reg_12v0>;
+ enable-gpios = <&expander2 2 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+
+ fan0: pwm-fan {
+ compatible = "pwm-fan";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwmfan>;
+ fan-supply = <&reg_pwm_fan>;
+ #cooling-cells = <2>;
+ /* typical 25 kHz -> 40.000 nsec */
+ pwms = <&tpm6 0 40000 PWM_POLARITY_INVERTED>;
+ cooling-levels = <0 32 64 128 196 240>;
+ pulses-per-revolution = <2>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ status = "disabled";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+
+ switch-a {
+ label = "switcha";
+ linux,code = <BTN_0>;
+ gpios = <&expander0 6 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+
+ switch-b {
+ label = "switchb";
+ linux,code = <BTN_1>;
+ gpios = <&expander0 7 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&expander2 6 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "default-on";
+ };
+
+ led-2 {
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_HEARTBEAT;
+ gpios = <&expander2 7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&adc1 0>, <&adc1 1>, <&adc1 2>, <&adc1 3>;
+ };
+
+ reg_3v3: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_3V3_MB";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_5v0: regulator-5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_5V0_MB";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_12v0: regulator-12v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_12V";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gpio = <&expander1 7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_mpcie_1v5: regulator-mpcie-1v5 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_1V5_MPCIE";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ gpio = <&expander0 2 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_mpcie_3v3: regulator-mpcie-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_3V3_MPCIE";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&expander0 3 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_pwm_fan: regulator-pwm-fan {
+ compatible = "regulator-fixed";
+ regulator-name = "FAN_PWR";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gpio = <&expander0 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&reg_12v0>;
+ };
+
+ thermal-zones {
+ cpu-thermal {
+ trips {
+ cpu_active0: trip-active0 {
+ temperature = <40000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ cpu_active1: trip-active1 {
+ temperature = <48000>;
+ hysteresis = <3000>;
+ type = "active";
+ };
+
+ cpu_active2: trip-active2 {
+ temperature = <60000>;
+ hysteresis = <10000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map1 {
+ trip = <&cpu_active0>;
+ cooling-device = <&fan0 1 1>;
+ };
+
+ map2 {
+ trip = <&cpu_active1>;
+ cooling-device = <&fan0 2 2>;
+ };
+
+ map3 {
+ trip = <&cpu_active2>;
+ cooling-device = <&fan0 3 3>;
+ };
+ };
+ };
+ };
+};
+
+&adc1 {
+ status = "okay";
+};
+
+&eqos {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_eqos>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&ethphy_eqos>;
+ status = "okay";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy_eqos: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_eqos_phy>;
+ reset-gpios = <&expander1 0 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <500000>;
+ reset-deassert-us = <50000>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+ enet-phy-lane-no-swap;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,dp83867-rxctrl-strap-quirk;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+ };
+};
+
+&fec {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&ethphy_fec>;
+ fsl,magic-packet;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <5000000>;
+
+ ethphy_fec: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec_phy>;
+ reset-gpios = <&expander1 1 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <500000>;
+ reset-deassert-us = <50000>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
+ enet-phy-lane-no-swap;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,dp83867-rxctrl-strap-quirk;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+ };
+};
+
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1>;
+ xceiver-supply = <&reg_3v3>;
+ status = "okay";
+};
+
+&flexcan2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan2>;
+ xceiver-supply = <&reg_3v3>;
+ status = "okay";
+};
+
+&gpio1 {
+ expander-irq-hog {
+ gpio-hog;
+ gpios = <12 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "PEX_INT#";
+ };
+
+ tcpc-irq-hog {
+ gpio-hog;
+ gpios = <2 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "USB_C_ALERT#";
+ };
+};
+
+&lpi2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpi2c3>;
+ pinctrl-1 = <&pinctrl_lpi2c3>;
+ status = "okay";
+
+ temperature-sensor@1c {
+ compatible = "nxp,se97b", "jedec,jc-42.4-temp";
+ reg = <0x1c>;
+ };
+
+ eeprom2: eeprom@54 {
+ compatible = "nxp,se97b", "atmel,24c02";
+ reg = <0x54>;
+ pagesize = <16>;
+ vcc-supply = <&reg_3v3>;
+ };
+
+ expander0: gpio@70 {
+ compatible = "nxp,pca9538";
+ reg = <0x70>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pexp_irq>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+ vcc-supply = <&reg_3v3>;
+ gpio-line-names = "FAN_PWR_EN", "MPCIE_WAKE#",
+ "MPCIE_1V5_EN", "MPCIE_3V3_EN",
+ "MPCIE_PERST#", "MPCIE_WDISABLE#",
+ "BUTTON_A#", "BUTTON_B#";
+
+ mpcie-wake-hog {
+ gpio-hog;
+ gpios = <1 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "MPCIE_WAKE#";
+ };
+
+ /*
+ * Controls the mPCIE slot reset which is low active as
+ * reset signal. The output-low states, the signal is
+ * inactive, e.g. not in reset
+ */
+ mpcie_rst_hog: mpcie-rst-hog {
+ gpio-hog;
+ gpios = <4 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "MPCIE_PERST#";
+ };
+
+ /*
+ * Controls the mPCIE slot WDISABLE pin which is low active
+ * as disable signal. The output-low states, the signal is
+ * inactive, e.g. not disabled
+ */
+ mpcie_wdisable_hog: mpcie-wdisable-hog {
+ gpio-hog;
+ gpios = <5 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "MPCIE_WDISABLE#";
+ };
+ };
+
+ expander1: gpio@71 {
+ compatible = "nxp,pca9538";
+ reg = <0x71>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ vcc-supply = <&reg_3v3>;
+ gpio-line-names = "ENET1_RESET#", "ENET2_RESET#",
+ "USB_RESET#", "",
+ "WLAN_PD#", "WLAN_W_DISABLE#",
+ "WLAN_PERST#", "12V_EN";
+
+ /*
+ * Controls the on board USB Hub reset which is low
+ * active as reset signal. The output-low states, the
+ * signal is inactive, e.g. no reset
+ */
+ usb-reset-hog {
+ gpio-hog;
+ gpios = <2 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "USB_RESET#";
+ };
+
+ /*
+ * Controls the WiFi card PD pin which is low active
+ * as power down signal. The output-high states, the signal
+ * is active, e.g. card is powered down
+ */
+ wlan-pd-hog {
+ gpio-hog;
+ gpios = <4 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "WLAN_PD#";
+ };
+
+ /*
+ * Controls the WiFi card disable pin which is low active
+ * as disable signal. The output-high states, the signal
+ * is active, e.g. card is disabled
+ */
+ wlan-wdisable-hog {
+ gpio-hog;
+ gpios = <5 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "WLAN_W_DISABLE#";
+ };
+
+ /*
+ * Controls the WiFi card reset pin which is low active
+ * as reset signal. The output-high states, the signal
+ * is active, e.g. card in reset
+ */
+ wlan-perst-hog {
+ gpio-hog;
+ gpios = <6 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "WLAN_PERST#";
+ };
+ };
+
+ expander2: gpio@72 {
+ compatible = "nxp,pca9538";
+ reg = <0x72>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ vcc-supply = <&reg_3v3>;
+ gpio-line-names = "LCD_RESET#", "LCD_PWR_EN",
+ "LCD_BLT_EN", "DP_EN",
+ "MIPI_CSI_EN", "MIPI_CSI_RST#",
+ "USER_LED1", "USER_LED2";
+ };
+};
+
+&lpi2c5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpi2c5>;
+ pinctrl-1 = <&pinctrl_lpi2c5>;
+ status = "okay";
+};
+
+&lpspi6 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpspi6>;
+ pinctrl-1 = <&pinctrl_lpspi6>;
+ status = "okay";
+};
+
+&lpuart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&lpuart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ linux,rs485-enabled-at-boot-time;
+ status = "okay";
+};
+
+/* disabled per default, console for M33 */
+&lpuart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "disabled";
+};
+
+&lpuart6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart6>;
+ status = "okay";
+};
+
+&lpuart8 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart8>;
+ status = "okay";
+};
+
+&tpm5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm5>;
+};
+
+&tpm6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm6>;
+ status = "okay";
+};
+
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2_hs>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_uhs>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_uhs>, <&pinctrl_usdhc2_gpio>;
+ cd-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ bus-width = <4>;
+ no-sdio;
+ no-mmc;
+ disable-wp;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_eqos: eqosgrp {
+ fsl,pins = <
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET1_MDC__ENET_QOS_MDC 0x51e
+ MX93_PAD_ENET1_MDIO__ENET_QOS_MDIO 0x4000051e
+ /* PD | FSEL_2 | DSE X6 */
+ MX93_PAD_ENET1_RD0__ENET_QOS_RGMII_RD0 0x57e
+ MX93_PAD_ENET1_RD1__ENET_QOS_RGMII_RD1 0x57e
+ MX93_PAD_ENET1_RD2__ENET_QOS_RGMII_RD2 0x57e
+ MX93_PAD_ENET1_RD3__ENET_QOS_RGMII_RD3 0x57e
+ /* PD | FSEL_3 | DSE X6 */
+ MX93_PAD_ENET1_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x5fe
+ MX93_PAD_ENET1_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x57e
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET1_TD0__ENET_QOS_RGMII_TD0 0x51e
+ MX93_PAD_ENET1_TD1__ENET_QOS_RGMII_TD1 0x51e
+ MX93_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2 0x51e
+ MX93_PAD_ENET1_TD3__ENET_QOS_RGMII_TD3 0x51e
+ MX93_PAD_ENET1_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x51e
+ /* PD | FSEL_3 | DSE X3 */
+ MX93_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x58e
+ >;
+ };
+
+ pinctrl_eqos_phy: eqosphygrp {
+ fsl,pins = <
+ MX93_PAD_CCM_CLKO1__GPIO3_IO26 0x1306
+ >;
+ };
+
+ pinctrl_fec: fecgrp {
+ fsl,pins = <
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET2_MDC__ENET1_MDC 0x51e
+ MX93_PAD_ENET2_MDIO__ENET1_MDIO 0x4000051e
+ /* PD | FSEL_2 | DSE X6 */
+ MX93_PAD_ENET2_RD0__ENET1_RGMII_RD0 0x57e
+ MX93_PAD_ENET2_RD1__ENET1_RGMII_RD1 0x57e
+ MX93_PAD_ENET2_RD2__ENET1_RGMII_RD2 0x57e
+ MX93_PAD_ENET2_RD3__ENET1_RGMII_RD3 0x57e
+ /* PD | FSEL_3 | DSE X6 */
+ MX93_PAD_ENET2_RXC__ENET1_RGMII_RXC 0x5fe
+ MX93_PAD_ENET2_RX_CTL__ENET1_RGMII_RX_CTL 0x57e
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET2_TD0__ENET1_RGMII_TD0 0x51e
+ MX93_PAD_ENET2_TD1__ENET1_RGMII_TD1 0x51e
+ MX93_PAD_ENET2_TD2__ENET1_RGMII_TD2 0x51e
+ MX93_PAD_ENET2_TD3__ENET1_RGMII_TD3 0x51e
+ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL 0x51e
+ /* PD | FSEL_3 | DSE X3 */
+ MX93_PAD_ENET2_TXC__ENET1_RGMII_TXC 0x58e
+ >;
+ };
+
+ pinctrl_fec_phy: fecphygrp {
+ fsl,pins = <
+ MX93_PAD_CCM_CLKO2__GPIO3_IO27 0x1306
+ >;
+ };
+
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX93_PAD_PDM_BIT_STREAM0__CAN1_RX 0x139e
+ MX93_PAD_PDM_CLK__CAN1_TX 0x139e
+ >;
+ };
+
+ pinctrl_flexcan2: flexcan2grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO25__CAN2_TX 0x139e
+ MX93_PAD_GPIO_IO27__CAN2_RX 0x139e
+ >;
+ };
+
+ pinctrl_lpi2c3: lpi2c3grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO28__LPI2C3_SDA 0x40000b9e
+ MX93_PAD_GPIO_IO29__LPI2C3_SCL 0x40000b9e
+ >;
+ };
+
+ pinctrl_lpi2c5: lpi2c5grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO22__LPI2C5_SDA 0x40000b9e
+ MX93_PAD_GPIO_IO23__LPI2C5_SCL 0x40000b9e
+ >;
+ };
+
+ pinctrl_lpspi6: lpspi6grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO00__LPSPI6_PCS0 0x3fe
+ MX93_PAD_GPIO_IO01__LPSPI6_SIN 0x3fe
+ MX93_PAD_GPIO_IO02__LPSPI6_SOUT 0x3fe
+ MX93_PAD_GPIO_IO03__LPSPI6_SCK 0x3fe
+ >;
+ };
+
+ pinctrl_pexp_irq: pexpirqgrp {
+ fsl,pins = <
+ MX93_PAD_SAI1_TXC__GPIO1_IO12 0x1306
+ >;
+ };
+
+ pinctrl_pwmfan: pwmfangrp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO09__GPIO2_IO09 0x1306
+ >;
+ };
+
+ pinctrl_tpm5: tpm5grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO06__TPM5_CH0 0x57e
+ >;
+ };
+
+ pinctrl_tpm6: tpm6grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO08__TPM6_CH0 0x57e
+ >;
+ };
+
+ pinctrl_typec: typecgrp {
+ fsl,pins = <
+ MX93_PAD_I2C2_SCL__GPIO1_IO02 0x1306
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX93_PAD_UART1_RXD__LPUART1_RX 0x31e
+ MX93_PAD_UART1_TXD__LPUART1_TX 0x31e
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX93_PAD_UART2_TXD__LPUART2_TX 0x31e
+ MX93_PAD_UART2_RXD__LPUART2_RX 0x31e
+ MX93_PAD_SAI1_TXD0__LPUART2_RTS_B 0x51e
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO14__LPUART3_TX 0x31e
+ MX93_PAD_GPIO_IO15__LPUART3_RX 0x31e
+ >;
+ };
+
+ pinctrl_uart6: uart6grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO04__LPUART6_TX 0x31e
+ MX93_PAD_GPIO_IO05__LPUART6_RX 0x31e
+ >;
+ };
+
+ pinctrl_uart8: uart8grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO12__LPUART8_TX 0x31e
+ MX93_PAD_GPIO_IO13__LPUART8_RX 0x31e
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX93_PAD_SD2_CD_B__GPIO3_IO00 0x31e
+ >;
+ };
+
+ pinctrl_usdhc2_hs: usdhc2hsgrp {
+ fsl,pins = <
+ /* HYS | PD | PU | FSEL_3 | DSE X5 */
+ MX93_PAD_SD2_CLK__USDHC2_CLK 0x17be
+ /* HYS | PD | PU | FSEL_3 | DSE X4 */
+ MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e
+ /* HYS | PD | PU | FSEL_3 | DSE X3 */
+ MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x138e
+ MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x138e
+ MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x138e
+ MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x138e
+ /* PD | PU | FSEL_2 | DSE X3 */
+ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x50e
+ >;
+ };
+
+ pinctrl_usdhc2_uhs: usdhc2uhsgrp {
+ fsl,pins = <
+ /* HYS | PD | PU | FSEL_3 | DSE X6 */
+ MX93_PAD_SD2_CLK__USDHC2_CLK 0x17fe
+ /* HYS | PD | PU | FSEL_3 | DSE X4 */
+ MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e
+ MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x139e
+ MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x139e
+ MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x139e
+ MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x139e
+ /* PD | PU | FSEL_2 | DSE X3 */
+ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x50e
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxla.dts b/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxla.dts
new file mode 100644
index 000000000000..eb3f4cfb6986
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352-mba93xxla.dts
@@ -0,0 +1,642 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Markus Niebel
+ * Author: Alexander Stein
+ */
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/net/ti-dp83867.h>
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/usb/pd.h>
+#include "imx93-tqma9352.dtsi"
+
+/{
+ model = "TQ-Systems i.MX93 TQMa93xxLA on MBa93xxLA SBC";
+ compatible = "tq,imx93-tqma9352-mba93xxla",
+ "tq,imx93-tqma9352", "fsl,imx93";
+ chassis-type = "embedded";
+
+ chosen {
+ stdout-path = &lpuart1;
+ };
+
+ aliases {
+ eeprom0 = &eeprom0;
+ rtc0 = &pcf85063;
+ rtc1 = &bbnsm_rtc;
+ };
+
+ backlight_lvds: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&tpm5 0 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ power-supply = <&reg_12v0>;
+ enable-gpios = <&expander2 2 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+
+ clk_dp: clk-dp {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+
+ switch-a {
+ label = "switcha";
+ linux,code = <BTN_0>;
+ gpios = <&expander0 6 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+
+ switch-b {
+ label = "switchb";
+ linux,code = <BTN_1>;
+ gpios = <&expander0 7 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&expander2 6 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "default-on";
+ };
+
+ led-2 {
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_HEARTBEAT;
+ gpios = <&expander2 7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&adc1 0>, <&adc1 1>, <&adc1 2>, <&adc1 3>;
+ };
+
+ reg_3v3: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_3V3_MB";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_3v8: regulator-3v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_3V8";
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ gpio = <&expander0 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ /* TODO: this is supply for IOT module */
+ regulator-always-on;
+ };
+
+ reg_5v0: regulator-5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_5V0_MB";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_12v0: regulator-12v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_12V";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gpio = <&expander1 7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&adc1 {
+ status = "okay";
+};
+
+&eqos {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_eqos>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&ethphy_eqos>;
+ status = "okay";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy_eqos: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_eqos_phy>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&expander1 0 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <500000>;
+ reset-deassert-us = <50000>;
+ enet-phy-lane-no-swap;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,dp83867-rxctrl-strap-quirk;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+ };
+};
+
+&fec {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&ethphy_fec>;
+ fsl,magic-packet;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <5000000>;
+
+ ethphy_fec: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec_phy>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&expander1 1 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <500000>;
+ reset-deassert-us = <50000>;
+ enet-phy-lane-no-swap;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,dp83867-rxctrl-strap-quirk;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+ };
+};
+
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan1>;
+ xceiver-supply = <&reg_3v3>;
+ status = "okay";
+};
+
+&flexcan2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexcan2>;
+ xceiver-supply = <&reg_3v3>;
+ status = "okay";
+};
+
+&gpio1 {
+ expander-irq-hog {
+ gpio-hog;
+ gpios = <12 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "PEX_INT#";
+ };
+
+ rtc-irq-hog {
+ gpio-hog;
+ gpios = <14 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "RTC_EVENT#";
+ };
+};
+
+&gpio3 {
+ ethphy-eqos-irq-hog {
+ gpio-hog;
+ gpios = <26 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "ENET0_IRQ#";
+ };
+
+ ethphy-fec-irq-hog {
+ gpio-hog;
+ gpios = <27 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "ENET1_IRQ#";
+ };
+};
+
+&lpi2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpi2c3>;
+ pinctrl-1 = <&pinctrl_lpi2c3>;
+ status = "okay";
+
+ temperature-sensor@1c {
+ compatible = "nxp,se97b", "jedec,jc-42.4-temp";
+ reg = <0x1c>;
+ };
+
+ eeprom2: eeprom@54 {
+ compatible = "nxp,se97b", "atmel,24c02";
+ reg = <0x54>;
+ pagesize = <16>;
+ vcc-supply = <&reg_3v3>;
+ };
+
+ expander0: gpio@70 {
+ compatible = "nxp,pca9538";
+ reg = <0x70>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pexp_irq>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+ vcc-supply = <&reg_3v3>;
+ gpio-line-names = "3V8_EN", "",
+ "", "IOT_PWRKEY",
+ "IOT_RESET", "IOT_W_DISABLE",
+ "BUTTON_A#", "BUTTON_B#";
+
+ /*
+ * Controls the IOT W_DISABLE pin which is low active
+ * as disable signal but inverted as seen from the CPU.
+ * The output-low states, the signal is
+ * inactive, e.g. not disabled
+ */
+ iot_wdisable_hog: iot-wdisable-hog {
+ gpio-hog;
+ gpios = <5 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "IOT_W_DISABLE";
+ };
+ };
+
+ expander1: gpio@71 {
+ compatible = "nxp,pca9538";
+ reg = <0x71>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ vcc-supply = <&reg_3v3>;
+ gpio-line-names = "ENET1_RESET#", "ENET2_RESET#",
+ "USB_RESET#", "",
+ "WLAN_PD#", "WLAN_W_DISABLE#",
+ "WLAN_PERST#", "12V_EN";
+
+ /*
+ * Controls the WiFi card PD pin which is low active
+ * as power down signal. The output-low states, the signal
+ * is inactive, e.g. not power down
+ */
+ wlan-pd-hog {
+ gpio-hog;
+ gpios = <4 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "WLAN_PD#";
+ };
+
+ /*
+ * Controls the WiFi card disable pin which is low active
+ * as disable signal. The output-low states, the signal
+ * is inactive, e.g. not disabled
+ */
+ wlan-wdisable-hog {
+ gpio-hog;
+ gpios = <5 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "WLAN_W_DISABLE#";
+ };
+
+ /*
+ * Controls the WiFi card reset pin which is low active
+ * as reset signal. The output-low states, the signal
+ * is inactive, e.g. not in reset
+ */
+ wlan-perst-hog {
+ gpio-hog;
+ gpios = <6 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "WLAN_PERST#";
+ };
+ };
+
+ expander2: gpio@72 {
+ compatible = "nxp,pca9538";
+ reg = <0x72>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ vcc-supply = <&reg_3v3>;
+ gpio-line-names = "LCD_RESET#", "LCD_PWR_EN",
+ "LCD_BL_EN", "DP_EN",
+ "MIPI_CSI_EN", "MIPI_CSI_RST#",
+ "USER_LED1", "USER_LED2";
+ };
+};
+
+&lpi2c5 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpi2c5>;
+ pinctrl-1 = <&pinctrl_lpi2c5>;
+ status = "okay";
+
+ dp_bridge: dp-bridge@f {
+ compatible = "toshiba,tc9595", "toshiba,tc358767";
+ reg = <0x0f>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tc9595>;
+ clock-names = "ref";
+ clocks = <&clk_dp>;
+ reset-gpios = <&expander2 3 GPIO_ACTIVE_HIGH>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
+ toshiba,hpd-pin = <0>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dp_dsi_in: endpoint {
+ data-lanes = <1 2 3 4>;
+ };
+ };
+ };
+ };
+};
+
+&lpuart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&lpuart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ linux,rs485-enabled-at-boot-time;
+ status = "okay";
+};
+
+/* disabled per default, console for M33 */
+&lpuart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "disabled";
+};
+
+&lpuart6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart6>;
+ status = "okay";
+};
+
+&lpuart8 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart8>;
+ status = "okay";
+};
+
+&pcf85063 {
+ /* RTC_EVENT# is connected on MBa93xxLA */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcf85063>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
+};
+
+&tpm5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tpm5>;
+};
+
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2_hs>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_uhs>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_uhs>, <&pinctrl_usdhc2_gpio>;
+ cd-gpios = <&gpio3 00 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&reg_usdhc2_vmmc>;
+ bus-width = <4>;
+ no-sdio;
+ no-mmc;
+ disable-wp;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_eqos: eqosgrp {
+ fsl,pins = <
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET1_MDC__ENET_QOS_MDC 0x51e
+ MX93_PAD_ENET1_MDIO__ENET_QOS_MDIO 0x4000051e
+ /* PD | FSEL_2 | DSE X6 */
+ MX93_PAD_ENET1_RD0__ENET_QOS_RGMII_RD0 0x57e
+ MX93_PAD_ENET1_RD1__ENET_QOS_RGMII_RD1 0x57e
+ MX93_PAD_ENET1_RD2__ENET_QOS_RGMII_RD2 0x57e
+ MX93_PAD_ENET1_RD3__ENET_QOS_RGMII_RD3 0x57e
+ /* PD | FSEL_3 | DSE X6 */
+ MX93_PAD_ENET1_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x5fe
+ MX93_PAD_ENET1_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x57e
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET1_TD0__ENET_QOS_RGMII_TD0 0x51e
+ MX93_PAD_ENET1_TD1__ENET_QOS_RGMII_TD1 0x51e
+ MX93_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2 0x51e
+ MX93_PAD_ENET1_TD3__ENET_QOS_RGMII_TD3 0x51e
+ MX93_PAD_ENET1_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x51e
+ /* PD | FSEL_3 | DSE X3 */
+ MX93_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x58e
+ >;
+ };
+
+ pinctrl_eqos_phy: eqosphygrp {
+ fsl,pins = <
+ MX93_PAD_CCM_CLKO1__GPIO3_IO26 0x1306
+ >;
+ };
+
+ pinctrl_fec: fecgrp {
+ fsl,pins = <
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET2_MDC__ENET1_MDC 0x51e
+ MX93_PAD_ENET2_MDIO__ENET1_MDIO 0x4000051e
+ /* PD | FSEL_2 | DSE X6 */
+ MX93_PAD_ENET2_RD0__ENET1_RGMII_RD0 0x57e
+ MX93_PAD_ENET2_RD1__ENET1_RGMII_RD1 0x57e
+ MX93_PAD_ENET2_RD2__ENET1_RGMII_RD2 0x57e
+ MX93_PAD_ENET2_RD3__ENET1_RGMII_RD3 0x57e
+ /* PD | FSEL_3 | DSE X6 */
+ MX93_PAD_ENET2_RXC__ENET1_RGMII_RXC 0x5fe
+ MX93_PAD_ENET2_RX_CTL__ENET1_RGMII_RX_CTL 0x57e
+ /* PD | FSEL_2 | DSE X4 */
+ MX93_PAD_ENET2_TD0__ENET1_RGMII_TD0 0x51e
+ MX93_PAD_ENET2_TD1__ENET1_RGMII_TD1 0x51e
+ MX93_PAD_ENET2_TD2__ENET1_RGMII_TD2 0x51e
+ MX93_PAD_ENET2_TD3__ENET1_RGMII_TD3 0x51e
+ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL 0x51e
+ /* PD | FSEL_3 | DSE X3 */
+ MX93_PAD_ENET2_TXC__ENET1_RGMII_TXC 0x58e
+ >;
+ };
+
+ pinctrl_fec_phy: fecphygrp {
+ fsl,pins = <
+ MX93_PAD_CCM_CLKO2__GPIO3_IO27 0x1306
+ >;
+ };
+
+ pinctrl_flexcan1: flexcan1grp {
+ fsl,pins = <
+ MX93_PAD_PDM_BIT_STREAM0__CAN1_RX 0x139e
+ MX93_PAD_PDM_CLK__CAN1_TX 0x139e
+ >;
+ };
+
+ pinctrl_flexcan2: flexcan2grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO25__CAN2_TX 0x139e
+ MX93_PAD_GPIO_IO27__CAN2_RX 0x139e
+ >;
+ };
+
+ pinctrl_lpi2c3: lpi2c3grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO28__LPI2C3_SDA 0x40000b9e
+ MX93_PAD_GPIO_IO29__LPI2C3_SCL 0x40000b9e
+ >;
+ };
+
+ pinctrl_lpi2c5: lpi2c5grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO22__LPI2C5_SDA 0x40000b9e
+ MX93_PAD_GPIO_IO23__LPI2C5_SCL 0x40000b9e
+ >;
+ };
+
+ pinctrl_pcf85063: pcf85063grp {
+ fsl,pins = <
+ MX93_PAD_SAI1_RXD0__GPIO1_IO14 0x1306
+ >;
+ };
+
+ pinctrl_pexp_irq: pexpirqgrp {
+ fsl,pins = <
+ MX93_PAD_SAI1_TXC__GPIO1_IO12 0x1306
+ >;
+ };
+
+ pinctrl_tc9595: tc9595-grp {
+ fsl,pins = <
+ /* DP_IRQ */
+ MX93_PAD_CCM_CLKO4__GPIO4_IO29 0x1306
+ >;
+ };
+
+ pinctrl_tpm5: tpm5grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO06__TPM5_CH0 0x57e
+ >;
+ };
+
+ pinctrl_typec: typecgrp {
+ fsl,pins = <
+ MX93_PAD_I2C2_SCL__GPIO1_IO02 0x1306
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX93_PAD_UART1_RXD__LPUART1_RX 0x31e
+ MX93_PAD_UART1_TXD__LPUART1_TX 0x31e
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX93_PAD_UART2_TXD__LPUART2_TX 0x31e
+ MX93_PAD_UART2_RXD__LPUART2_RX 0x31e
+ MX93_PAD_SAI1_TXD0__LPUART2_RTS_B 0x51e
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO14__LPUART3_TX 0x31e
+ MX93_PAD_GPIO_IO15__LPUART3_RX 0x31e
+ >;
+ };
+
+ pinctrl_uart6: uart6grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO04__LPUART6_TX 0x31e
+ MX93_PAD_GPIO_IO05__LPUART6_RX 0x31e
+ >;
+ };
+
+ pinctrl_uart8: uart8grp {
+ fsl,pins = <
+ MX93_PAD_GPIO_IO12__LPUART8_TX 0x31e
+ MX93_PAD_GPIO_IO13__LPUART8_RX 0x31e
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2gpiogrp {
+ fsl,pins = <
+ MX93_PAD_SD2_CD_B__GPIO3_IO00 0x31e
+ >;
+ };
+
+ pinctrl_usdhc2_hs: usdhc2hsgrp {
+ fsl,pins = <
+ /* HYS | PD | PU | FSEL_3 | DSE X5 */
+ MX93_PAD_SD2_CLK__USDHC2_CLK 0x17be
+ /* HYS | PD | PU | FSEL_3 | DSE X4 */
+ MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e
+ /* HYS | PD | PU | FSEL_3 | DSE X3 */
+ MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x138e
+ MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x138e
+ MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x138e
+ MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x138e
+ /* PD | PU | FSEL_2 | DSE X3 */
+ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x50e
+ >;
+ };
+
+ pinctrl_usdhc2_uhs: usdhc2uhsgrp {
+ fsl,pins = <
+ /* HYS | PD | PU | FSEL_3 | DSE X6 */
+ MX93_PAD_SD2_CLK__USDHC2_CLK 0x17fe
+ /* HYS | PD | PU | FSEL_3 | DSE X4 */
+ MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e
+ MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x139e
+ MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x139e
+ MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x139e
+ MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x139e
+ /* PD | PU | FSEL_2 | DSE X3 */
+ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x50e
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352.dtsi
new file mode 100644
index 000000000000..f6e422dc2663
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx93-tqma9352.dtsi
@@ -0,0 +1,213 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Markus Niebel
+ */
+
+#include "imx93.dtsi"
+
+/{
+ model = "TQ-Systems i.MX93 TQMa93xxLA/TQMa93xxCA SOM";
+ compatible = "tq,imx93-tqma9352", "fsl,imx93";
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ alloc-ranges = <0 0x60000000 0 0x40000000>;
+ size = <0 0x10000000>;
+ linux,cma-default;
+ };
+ };
+
+ reg_v1v8: regulator-v1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ reg_v3v3: regulator-v3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ /* SD2 RST# via PMIC SW_EN */
+ reg_usdhc2_vmmc: regulator-usdhc2 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+ regulator-name = "VSD_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_v3v3>;
+ gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&adc1 {
+ vref-supply = <&reg_v1v8>;
+};
+
+&flexspi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexspi1>;
+ status = "okay";
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ /*
+ * no DQS, RXCLKSRC internal loop back, max 66 MHz
+ * clk framework uses CLK_DIVIDER_ROUND_CLOSEST
+ * selected value together with root from
+ * IMX93_CLK_SYS_PLL_PFD1 @ 800.000.000 Hz helps to
+ * respect the maximum value.
+ */
+ spi-max-frequency = <62000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ };
+};
+
+&gpio1 {
+ pmic-irq-hog {
+ gpio-hog;
+ gpios = <3 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "PMIC_IRQ#";
+ };
+};
+
+&lpi2c1 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_lpi2c1>;
+ pinctrl-1 = <&pinctrl_lpi2c1>;
+ status = "okay";
+
+ se97_som: temperature-sensor@1b {
+ compatible = "nxp,se97b", "jedec,jc-42.4-temp";
+ reg = <0x1b>;
+ };
+
+ pcf85063: rtc@51 {
+ compatible = "nxp,pcf85063a";
+ reg = <0x51>;
+ quartz-load-femtofarads = <7000>;
+ };
+
+ eeprom0: eeprom@53 {
+ compatible = "nxp,se97b", "atmel,24c02";
+ reg = <0x53>;
+ pagesize = <16>;
+ read-only;
+ vcc-supply = <&reg_v3v3>;
+ };
+
+ eeprom1: eeprom@57 {
+ compatible = "atmel,24c64";
+ reg = <0x57>;
+ pagesize = <32>;
+ vcc-supply = <&reg_v3v3>;
+ };
+
+ /* protectable identification memory (part of M24C64-D @57) */
+ eeprom@5f {
+ compatible = "st,24c64", "atmel,24c64";
+ reg = <0x5f>;
+ size = <32>;
+ pagesize = <32>;
+ vcc-supply = <&reg_v3v3>;
+ };
+
+ imu@6a {
+ compatible = "st,ism330dhcx";
+ reg = <0x6a>;
+ vdd-supply = <&reg_v3v3>;
+ vddio-supply = <&reg_v3v3>;
+ };
+};
+
+&usdhc1 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc1>;
+ pinctrl-1 = <&pinctrl_usdhc1>;
+ pinctrl-2 = <&pinctrl_usdhc1>;
+ bus-width = <8>;
+ non-removable;
+ no-sdio;
+ no-sd;
+ status = "okay";
+};
+
+&wdog3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdog>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_flexspi1: flexspi1grp {
+ fsl,pins = <
+ MX93_PAD_SD3_CMD__FLEXSPI1_A_SS0_B 0x3fe
+ MX93_PAD_SD3_CLK__FLEXSPI1_A_SCLK 0x3fe
+ MX93_PAD_SD3_DATA0__FLEXSPI1_A_DATA00 0x3fe
+ MX93_PAD_SD3_DATA1__FLEXSPI1_A_DATA01 0x3fe
+ MX93_PAD_SD3_DATA2__FLEXSPI1_A_DATA02 0x3fe
+ MX93_PAD_SD3_DATA3__FLEXSPI1_A_DATA03 0x3fe
+ >;
+ };
+
+ pinctrl_lpi2c1: lpi2c1grp {
+ fsl,pins = <
+ MX93_PAD_I2C1_SCL__LPI2C1_SCL 0x40000b9e
+ MX93_PAD_I2C1_SDA__LPI2C1_SDA 0x40000b9e
+ >;
+ };
+
+ pinctrl_pca9451: pca9451grp {
+ fsl,pins = <
+ MX93_PAD_I2C2_SDA__GPIO1_IO03 0x1306
+ >;
+ };
+
+ pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
+ fsl,pins = <
+ MX93_PAD_SD2_RESET_B__GPIO3_IO07 0x1306
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ /* HYS | PU | PD | FSEL_3 | X5 */
+ MX93_PAD_SD1_CLK__USDHC1_CLK 0x17be
+ MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x17be
+ /* HYS | PU | FSEL_3 | X5 */
+ MX93_PAD_SD1_CMD__USDHC1_CMD 0x13be
+ /* HYS | PU | FSEL_3 | X4 */
+ MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x139e
+ MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x139e
+ MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x139e
+ MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x139e
+ MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x139e
+ MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x139e
+ MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x139e
+ MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x139e
+ >;
+ };
+
+ pinctrl_wdog: wdoggrp {
+ fsl,pins = <
+ MX93_PAD_WDOG_ANY__WDOG1_WDOG_ANY 0x31e
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/imx93.dtsi b/sys/contrib/device-tree/src/arm64/freescale/imx93.dtsi
index 1d8dd14b65cf..8f2e7c42ad6e 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/imx93.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/imx93.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/fsl,imx93-power.h>
+#include <dt-bindings/thermal/thermal.h>
#include "imx93-pinfunc.h"
@@ -132,6 +133,56 @@
interrupt-parent = <&gic>;
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <2000>;
+
+ thermal-sensors = <&tmu 0>;
+
+ trips {
+ cpu_alert: cpu-alert {
+ temperature = <80000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit: cpu-crit {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert>;
+ cooling-device =
+ <&A55_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&A55_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
+
+ cm33: remoteproc-cm33 {
+ compatible = "fsl,imx93-cm33";
+ clocks = <&clk IMX93_CLK_CM33_GATE>;
+ status = "disabled";
+ };
+
+ mqs1: mqs1 {
+ compatible = "fsl,imx93-mqs";
+ gpr = <&aonmix_ns_gpr>;
+ status = "disabled";
+ };
+
+ mqs2: mqs2 {
+ compatible = "fsl,imx93-mqs";
+ gpr = <&wakeupmix_gpr>;
+ status = "disabled";
+ };
+
soc@0 {
compatible = "simple-bus";
#address-cells = <1>;
@@ -146,7 +197,47 @@
#size-cells = <1>;
ranges;
- anomix_ns_gpr: syscon@44210000 {
+ edma1: dma-controller@44000000 {
+ compatible = "fsl,imx93-edma3";
+ reg = <0x44000000 0x200000>;
+ #dma-cells = <3>;
+ dma-channels = <31>;
+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, // 0: Reserved
+ <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, // 1: CANFD1
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, // 2: Reserved
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, // 3: GPIO1 CH0
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, // 4: GPIO1 CH1
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, // 5: I3C1 TO Bus
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, // 6: I3C1 From Bus
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, // 7: LPI2C1 M TX
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, // 8: LPI2C1 S TX
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, // 9: LPI2C2 M RX
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, // 10: LPI2C2 S RX
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, // 11: LPSPI1 TX
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, // 12: LPSPI1 RX
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, // 13: LPSPI2 TX
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, // 14: LPSPI2 RX
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, // 15: LPTMR1
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, // 16: LPUART1 TX
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, // 17: LPUART1 RX
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, // 18: LPUART2 TX
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, // 19: LPUART2 RX
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, // 20: S400
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, // 21: SAI TX
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, // 22: SAI RX
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, // 23: TPM1 CH0/CH2
+ <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, // 24: TPM1 CH1/CH3
+ <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, // 25: TPM1 Overflow
+ <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, // 26: TMP2 CH0/CH2
+ <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, // 27: TMP2 CH1/CH3
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, // 28: TMP2 Overflow
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, // 29: PDM
+ <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>; // 30: ADC1
+ clocks = <&clk IMX93_CLK_EDMA1_GATE>;
+ clock-names = "dma";
+ };
+
+ aonmix_ns_gpr: syscon@44210000 {
compatible = "fsl,imx93-aonmix-ns-syscfg", "syscon";
reg = <0x44210000 0x1000>;
};
@@ -203,6 +294,19 @@
status = "disabled";
};
+ i3c1: i3c-master@44330000 {
+ compatible = "silvaco,i3c-master-v1";
+ reg = <0x44330000 0x10000>;
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <3>;
+ #size-cells = <0>;
+ clocks = <&clk IMX93_CLK_BUS_AON>,
+ <&clk IMX93_CLK_I3C1_GATE>,
+ <&clk IMX93_CLK_I3C1_SLOW>;
+ clock-names = "pclk", "fast_clk", "slow_clk";
+ status = "disabled";
+ };
+
lpi2c1: i2c@44340000 {
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
reg = <0x44340000 0x10000>;
@@ -252,20 +356,24 @@
};
lpuart1: serial@44380000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x44380000 0x1000>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART1_GATE>;
clock-names = "ipg";
+ dmas = <&edma1 17 0 1>, <&edma1 16 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
lpuart2: serial@44390000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x44390000 0x1000>;
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART2_GATE>;
clock-names = "ipg";
+ dmas = <&edma1 19 0 1>, <&edma1 18 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
@@ -280,6 +388,20 @@
assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
assigned-clock-rates = <40000000>;
fsl,clk-source = /bits/ 8 <0>;
+ fsl,stop-mode = <&aonmix_ns_gpr 0x14 0>;
+ status = "disabled";
+ };
+
+ sai1: sai@443b0000 {
+ compatible = "fsl,imx93-sai";
+ reg = <0x443b0000 0x10000>;
+ interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_SAI1_IPG>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_SAI1_GATE>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_DUMMY>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
+ dmas = <&edma1 22 0 1>, <&edma1 21 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
@@ -311,6 +433,8 @@
#clock-cells = <1>;
clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>;
clock-names = "osc_32k", "osc_24m", "clk_ext1";
+ assigned-clocks = <&clk IMX93_CLK_AUDIO_PLL>;
+ assigned-clock-rates = <393216000>;
status = "okay";
};
@@ -333,14 +457,51 @@
compatible = "fsl,imx93-src-slice";
reg = <0x44462400 0x400>, <0x44465800 0x400>;
#power-domain-cells = <0>;
- clocks = <&clk IMX93_CLK_MEDIA_AXI>,
+ clocks = <&clk IMX93_CLK_NIC_MEDIA_GATE>,
<&clk IMX93_CLK_MEDIA_APB>;
};
};
- anatop: anatop@44480000 {
- compatible = "fsl,imx93-anatop", "syscon";
+ clock-controller@44480000 {
+ compatible = "fsl,imx93-anatop";
reg = <0x44480000 0x2000>;
+ #clock-cells = <1>;
+ };
+
+ tmu: tmu@44482000 {
+ compatible = "fsl,qoriq-tmu";
+ reg = <0x44482000 0x1000>;
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_TMC_GATE>;
+ little-endian;
+ fsl,tmu-range = <0x800000da 0x800000e9
+ 0x80000102 0x8000012a
+ 0x80000166 0x800001a7
+ 0x800001b6>;
+ fsl,tmu-calibration = <0x00000000 0x0000000e
+ 0x00000001 0x00000029
+ 0x00000002 0x00000056
+ 0x00000003 0x000000a2
+ 0x00000004 0x00000116
+ 0x00000005 0x00000195
+ 0x00000006 0x000001b2>;
+ #thermal-sensor-cells = <1>;
+ };
+
+ micfil: micfil@44520000 {
+ compatible = "fsl,imx93-micfil";
+ reg = <0x44520000 0x10000>;
+ interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_PDM_IPG>,
+ <&clk IMX93_CLK_PDM_GATE>,
+ <&clk IMX93_CLK_AUDIO_PLL>;
+ clock-names = "ipg_clk", "ipg_clk_app", "pll8k";
+ dmas = <&edma1 29 0 5>;
+ dma-names = "rx";
+ status = "disabled";
};
adc1: adc@44530000 {
@@ -364,6 +525,79 @@
#size-cells = <1>;
ranges;
+ edma2: dma-controller@42000000 {
+ compatible = "fsl,imx93-edma4";
+ reg = <0x42000000 0x210000>;
+ #dma-cells = <3>;
+ dma-channels = <64>;
+ interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_EDMA2_GATE>;
+ clock-names = "dma";
+ };
+
wakeupmix_gpr: syscon@42420000 {
compatible = "fsl,imx93-wakeupmix-syscfg", "syscon";
reg = <0x42420000 0x1000>;
@@ -437,6 +671,19 @@
status = "disabled";
};
+ i3c2: i3c-master@42520000 {
+ compatible = "silvaco,i3c-master-v1";
+ reg = <0x42520000 0x10000>;
+ interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <3>;
+ #size-cells = <0>;
+ clocks = <&clk IMX93_CLK_BUS_WAKEUP>,
+ <&clk IMX93_CLK_I3C2_GATE>,
+ <&clk IMX93_CLK_I3C2_SLOW>;
+ clock-names = "pclk", "fast_clk", "slow_clk";
+ status = "disabled";
+ };
+
lpi2c3: i2c@42530000 {
compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
reg = <0x42530000 0x10000>;
@@ -486,38 +733,46 @@
};
lpuart3: serial@42570000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x42570000 0x1000>;
interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART3_GATE>;
clock-names = "ipg";
+ dmas = <&edma2 18 0 1>, <&edma2 17 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
lpuart4: serial@42580000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x42580000 0x1000>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART4_GATE>;
clock-names = "ipg";
+ dmas = <&edma2 20 0 1>, <&edma2 19 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
lpuart5: serial@42590000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x42590000 0x1000>;
interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART5_GATE>;
clock-names = "ipg";
+ dmas = <&edma2 22 0 1>, <&edma2 21 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
lpuart6: serial@425a0000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x425a0000 0x1000>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART6_GATE>;
clock-names = "ipg";
+ dmas = <&edma2 24 0 1>, <&edma2 23 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
@@ -532,6 +787,7 @@
assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
assigned-clock-rates = <40000000>;
fsl,clk-source = /bits/ 8 <0>;
+ fsl,stop-mode = <&wakeupmix_gpr 0x0c 2>;
status = "disabled";
};
@@ -550,21 +806,70 @@
status = "disabled";
};
+ sai2: sai@42650000 {
+ compatible = "fsl,imx93-sai";
+ reg = <0x42650000 0x10000>;
+ interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_SAI2_IPG>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_SAI2_GATE>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_DUMMY>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
+ dmas = <&edma2 59 0 1>, <&edma2 58 0 0>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ sai3: sai@42660000 {
+ compatible = "fsl,imx93-sai";
+ reg = <0x42660000 0x10000>;
+ interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_SAI3_IPG>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_SAI3_GATE>, <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_DUMMY>;
+ clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
+ dmas = <&edma2 61 0 1>, <&edma2 60 0 0>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
+ xcvr: xcvr@42680000 {
+ compatible = "fsl,imx93-xcvr";
+ reg = <0x42680000 0x800>,
+ <0x42680800 0x400>,
+ <0x42680c00 0x080>,
+ <0x42680e00 0x080>;
+ reg-names = "ram", "regs", "rxfifo", "txfifo";
+ interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_BUS_WAKEUP>,
+ <&clk IMX93_CLK_SPDIF_GATE>,
+ <&clk IMX93_CLK_DUMMY>,
+ <&clk IMX93_CLK_AUD_XCVR_GATE>;
+ clock-names = "ipg", "phy", "spba", "pll_ipg";
+ dmas = <&edma2 65 0 1>, <&edma2 66 0 0>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
lpuart7: serial@42690000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x42690000 0x1000>;
interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART7_GATE>;
clock-names = "ipg";
+ dmas = <&edma2 88 0 1>, <&edma2 87 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
lpuart8: serial@426a0000 {
- compatible = "fsl,imx93-lpuart", "fsl,imx7ulp-lpuart";
+ compatible = "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart";
reg = <0x426a0000 0x1000>;
interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPUART8_GATE>;
clock-names = "ipg";
+ dmas = <&edma2 90 0 1>, <&edma2 89 0 0>;
+ dma-names = "rx", "tx";
status = "disabled";
};
@@ -682,8 +987,8 @@
<&clk IMX93_CLK_USDHC1_GATE>;
clock-names = "ipg", "ahb", "per";
bus-width = <8>;
- fsl,tuning-start-tap = <20>;
- fsl,tuning-step= <2>;
+ fsl,tuning-start-tap = <1>;
+ fsl,tuning-step = <2>;
status = "disabled";
};
@@ -696,8 +1001,8 @@
<&clk IMX93_CLK_USDHC2_GATE>;
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
- fsl,tuning-start-tap = <20>;
- fsl,tuning-step= <2>;
+ fsl,tuning-start-tap = <1>;
+ fsl,tuning-step = <2>;
status = "disabled";
};
@@ -759,18 +1064,19 @@
<&clk IMX93_CLK_USDHC3_GATE>;
clock-names = "ipg", "ahb", "per";
bus-width = <4>;
- fsl,tuning-start-tap = <20>;
- fsl,tuning-step= <2>;
+ fsl,tuning-start-tap = <1>;
+ fsl,tuning-step = <2>;
status = "disabled";
};
};
- gpio2: gpio@43810080 {
- compatible = "fsl,imx93-gpio", "fsl,imx7ulp-gpio";
- reg = <0x43810080 0x1000>, <0x43810040 0x40>;
+ gpio2: gpio@43810000 {
+ compatible = "fsl,imx93-gpio", "fsl,imx8ulp-gpio";
+ reg = <0x43810000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&clk IMX93_CLK_GPIO2_GATE>,
@@ -779,12 +1085,13 @@
gpio-ranges = <&iomuxc 0 4 30>;
};
- gpio3: gpio@43820080 {
- compatible = "fsl,imx93-gpio", "fsl,imx7ulp-gpio";
- reg = <0x43820080 0x1000>, <0x43820040 0x40>;
+ gpio3: gpio@43820000 {
+ compatible = "fsl,imx93-gpio", "fsl,imx8ulp-gpio";
+ reg = <0x43820000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&clk IMX93_CLK_GPIO3_GATE>,
@@ -794,12 +1101,13 @@
<&iomuxc 26 34 2>, <&iomuxc 28 0 4>;
};
- gpio4: gpio@43830080 {
- compatible = "fsl,imx93-gpio", "fsl,imx7ulp-gpio";
- reg = <0x43830080 0x1000>, <0x43830040 0x40>;
+ gpio4: gpio@43830000 {
+ compatible = "fsl,imx93-gpio", "fsl,imx8ulp-gpio";
+ reg = <0x43830000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&clk IMX93_CLK_GPIO4_GATE>,
@@ -808,12 +1116,13 @@
gpio-ranges = <&iomuxc 0 38 28>, <&iomuxc 28 36 2>;
};
- gpio1: gpio@47400080 {
- compatible = "fsl,imx93-gpio", "fsl,imx7ulp-gpio";
- reg = <0x47400080 0x1000>, <0x47400040 0x40>;
+ gpio1: gpio@47400000 {
+ compatible = "fsl,imx93-gpio", "fsl,imx8ulp-gpio";
+ reg = <0x47400000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
- interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&clk IMX93_CLK_GPIO1_GATE>,
diff --git a/sys/contrib/device-tree/src/arm64/freescale/mba8mx.dtsi b/sys/contrib/device-tree/src/arm64/freescale/mba8mx.dtsi
index 8a9fe5cdcc98..e2bc53b8d39a 100644
--- a/sys/contrib/device-tree/src/arm64/freescale/mba8mx.dtsi
+++ b/sys/contrib/device-tree/src/arm64/freescale/mba8mx.dtsi
@@ -8,6 +8,16 @@
/* TQ-Systems GmbH MBa8Mx baseboard */
/ {
+ backlight_lvds: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm3 0 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ power-supply = <&reg_12v>;
+ enable-gpios = <&expander2 2 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+
beeper {
compatible = "pwm-beeper";
pwms = <&pwm4 0 250000 0>;
@@ -65,12 +75,45 @@
};
};
+ gpio_delays: gpio-delays {
+ compatible = "gpio-delay";
+ #gpio-cells = <3>;
+ gpio-controller;
+ gpios = <&expander0 6 GPIO_ACTIVE_HIGH>;
+ gpio-line-names = "LVDS_BRIDGE_EN_1V8";
+ };
+
+ panel: panel-lvds {
+ /*
+ * Display is not fixed, so compatible has to be added from
+ * DT overlay
+ */
+ backlight = <&backlight_lvds>;
+ power-supply = <&reg_vcc_3v3>;
+ status = "disabled";
+
+ port {
+ panel_in_lvds: endpoint {
+ data-lanes = <1 2 3 4>;
+ remote-endpoint = <&lvds_bridge_out>;
+ };
+ };
+ };
+
pcie0_refclk: pcie0-refclk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <100000000>;
};
+ reg_12v: regulator-12v {
+ compatible = "regulator-fixed";
+ regulator-name = "MBA8MX_12V";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ regulator-always-on;
+ };
+
reg_hub_vbus: regulator-hub-vbus {
compatible = "regulator-fixed";
regulator-name = "MBA8MX_HUB_VBUS";
@@ -157,6 +200,10 @@
interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <2>;
+ gpio-line-names = "", "", "", "",
+ "", "", "LVDS_BRIDGE_EN", "",
+ "", "", "", "",
+ "", "", "", "";
sd-mux-oe-hog {
gpio-hog;
@@ -227,6 +274,52 @@
scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
+
+ dsi_lvds_bridge: bridge@2d {
+ compatible = "ti,sn65dsi84";
+ reg = <0x2d>;
+ enable-gpios = <&gpio_delays 0 130000 0>;
+ vcc-supply = <&reg_sn65dsi83_1v8>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lvds_bridge_in: endpoint {
+ data-lanes = <1 2 3 4>;
+ remote-endpoint = <&mipi_dsi_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ lvds_bridge_out: endpoint {
+ remote-endpoint = <&panel_in_lvds>;
+ };
+ };
+ };
+ };
+};
+
+&mipi_dsi {
+ samsung,burst-clock-frequency = <891000000>;
+ samsung,esc-clock-frequency = <20000000>;
+
+ ports {
+ port@1 {
+ reg = <1>;
+
+ mipi_dsi_out: endpoint {
+ data-lanes = <1 2 3 4>;
+ remote-endpoint = <&lvds_bridge_in>;
+ };
+ };
+ };
};
&pwm3 {
diff --git a/sys/contrib/device-tree/src/arm64/freescale/tqmls104xa-mbls10xxa-fman.dtsi b/sys/contrib/device-tree/src/arm64/freescale/tqmls104xa-mbls10xxa-fman.dtsi
new file mode 100644
index 000000000000..4c38dd541143
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/tqmls104xa-mbls10xxa-fman.dtsi
@@ -0,0 +1,104 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2019,2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for MBLS10xxA from TQ (FMAN related sections)
+ */
+
+#include <dt-bindings/net/ti-dp83867.h>
+
+&enet0 {
+ status = "disabled";
+};
+
+&enet1 {
+ status = "disabled";
+};
+
+&enet2 {
+ phy-handle = <&rgmii_phy1>;
+ phy-connection-type = "rgmii";
+ phy-mode = "rgmii-id";
+ status = "okay";
+};
+
+&enet3 {
+ phy-handle = <&rgmii_phy2>;
+ phy-connection-type = "rgmii";
+ phy-mode = "rgmii-id";
+ status = "okay";
+};
+
+&enet4 {
+ status = "disabled";
+};
+
+&enet5 {
+ status = "disabled";
+};
+
+&enet6 {
+ status = "disabled";
+};
+
+&mdio0 {
+ status = "okay";
+
+ qsgmii2_phy1: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x00>;
+ };
+
+ qsgmii2_phy2: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x01>;
+ };
+
+ qsgmii2_phy3: ethernet-phy@2 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x02>;
+ };
+
+ qsgmii2_phy4: ethernet-phy@3 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x03>;
+ };
+
+ rgmii_phy2: ethernet-phy@c {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0c>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+ };
+
+ rgmii_phy1: ethernet-phy@e {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0e>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+ };
+
+ qsgmii1_phy1: ethernet-phy@1c {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1c>;
+ };
+
+ qsgmii1_phy2: ethernet-phy@1d {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1d>;
+ };
+
+ qsgmii1_phy3: ethernet-phy@1e {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1e>;
+ };
+
+ qsgmii1_phy4: ethernet-phy@1f {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1f>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/tqmls1088a-mbls10xxa-mc.dtsi b/sys/contrib/device-tree/src/arm64/freescale/tqmls1088a-mbls10xxa-mc.dtsi
new file mode 100644
index 000000000000..2471bb109e8e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/tqmls1088a-mbls10xxa-mc.dtsi
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for MBLS10xxA from TQ (MC related sections)
+ */
+
+#include <dt-bindings/net/ti-dp83867.h>
+
+/ {
+ sfp1: sfp1 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp1_i2c>;
+ mod-def0-gpios = <&gpioexp2 2 GPIO_ACTIVE_LOW>;
+ los-gpios = <&gpioexp2 3 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&gpioexp2 0 GPIO_ACTIVE_HIGH>;
+ tx-disable-gpios = <&gpioexp2 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ sfp2: sfp2 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp2_i2c>;
+ mod-def0-gpios = <&gpioexp2 10 GPIO_ACTIVE_LOW>;
+ los-gpios = <&gpioexp2 11 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&gpioexp2 8 GPIO_ACTIVE_HIGH>;
+ tx-disable-gpios = <&gpioexp2 9 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&dpmac1 {
+ pcs-handle = <&pcs1>;
+};
+
+&dpmac2 {
+ pcs-handle = <&pcs2>;
+};
+
+&dpmac3 {
+ pcs-handle = <&pcs3_0>;
+};
+
+&dpmac4 {
+ pcs-handle = <&pcs3_1>;
+};
+
+&dpmac5 {
+ pcs-handle = <&pcs3_2>;
+};
+
+&dpmac6 {
+ pcs-handle = <&pcs3_3>;
+};
+
+&dpmac7 {
+ pcs-handle = <&pcs7_0>;
+};
+
+&dpmac8 {
+ pcs-handle = <&pcs7_1>;
+};
+
+&dpmac9 {
+ pcs-handle = <&pcs7_2>;
+};
+
+&dpmac10 {
+ pcs-handle = <&pcs7_3>;
+};
+
+&emdio1 {
+ status = "okay";
+
+ qsgmii2_phy1: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x00>;
+ };
+
+ qsgmii2_phy2: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x01>;
+ };
+
+ qsgmii2_phy3: ethernet-phy@2 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x02>;
+ };
+
+ qsgmii2_phy4: ethernet-phy@3 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x03>;
+ };
+
+ rgmii_phy2: ethernet-phy@c {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0c>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+ };
+
+ rgmii_phy1: ethernet-phy@e {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0e>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+ };
+
+ qsgmii1_phy1: ethernet-phy@1c {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1c>;
+ };
+
+ qsgmii1_phy2: ethernet-phy@1d {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1d>;
+ };
+
+ qsgmii1_phy3: ethernet-phy@1e {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1e>;
+ };
+
+ qsgmii1_phy4: ethernet-phy@1f {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1f>;
+ };
+};
+
+&pcs_mdio1 {
+ status = "okay";
+};
+
+&pcs_mdio2 {
+ status = "okay";
+};
+
+&pcs_mdio3 {
+ status = "okay";
+};
+
+&pcs_mdio7 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa-mbls10xxa.dtsi b/sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa-mbls10xxa.dtsi
new file mode 100644
index 000000000000..65b4ed28a3d4
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa-mbls10xxa.dtsi
@@ -0,0 +1,136 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for MBLS10xxA from TQ
+ */
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+ autorepeat;
+
+ button-0 {
+ label = "button0";
+ gpios = <&gpioexp3 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_F1>;
+ };
+
+ button-1 {
+ label = "button1";
+ gpios = <&gpioexp3 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_F2>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-user {
+ gpios = <&gpioexp3 13 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_HEARTBEAT;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ reg_3v3: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_3V3_MB";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+};
+
+&duart0 {
+ status = "okay";
+};
+
+&duart1 {
+ status = "okay";
+};
+
+&esdhc {
+ status = "okay";
+};
+
+&i2c3 {
+ status = "okay";
+
+ i2c-mux@70 {
+ compatible = "nxp,pca9544";
+ reg = <0x70>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gpioexp1: gpio@20 {
+ compatible = "nxp,pca9555";
+ reg = <0x20>;
+ vcc-supply = <&reg_3v3>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpioexp2: gpio@21 {
+ compatible = "nxp,pca9555";
+ reg = <0x21>;
+ vcc-supply = <&reg_3v3>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpioexp3: gpio@22 {
+ compatible = "nxp,pca9555";
+ reg = <0x22>;
+ vcc-supply = <&reg_3v3>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+ };
+
+ sfp1_i2c: i2c@1 {
+ reg = <0x1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ sfp2_i2c: i2c@2 {
+ reg = <0x2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c@3 {
+ reg = <0x3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&sata {
+ status = "okay";
+};
+
+&usb0 {
+ status = "okay";
+};
+
+&usb1 {
+ dr_mode = "otg";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa.dtsi b/sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa.dtsi
new file mode 100644
index 000000000000..138f8778afde
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/freescale/tqmls10xxa.dtsi
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2018-2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Gregor Herburger, Timo Herbrecher
+ *
+ * Device Tree Include file for TQMLs10xxA SoM of TQ
+ */
+
+/ {
+ reg_vcc3v3: regulator-vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+
+ temperature-sensor@18 {
+ compatible = "nxp,se97b", "jedec,jc-42.4-temp";
+ reg = <0x18>;
+ };
+
+ eeprom@50 {
+ compatible = "nxp,se97b", "atmel,24c02";
+ reg = <0x50>;
+ pagesize = <16>;
+ vcc-supply = <&reg_vcc3v3>;
+ read-only;
+ };
+
+ rtc@51 {
+ compatible = "nxp,pcf85063a";
+ reg = <0x51>;
+ };
+
+ eeprom@57 {
+ compatible = "atmel,24c64";
+ reg = <0x57>;
+ pagesize = <32>;
+ vcc-supply = <&reg_vcc3v3>;
+ };
+};
+
+&esdhc {
+ /* eSDHC or eMMC: set by bootloader */
+ non-removable;
+ disable-wp;
+ mmc-hs200-1_8v;
+ sd-uhs-sdr104;
+ sd-uhs-sdr50;
+ sd-uhs-sdr25;
+ sd-uhs-sdr12;
+};
diff --git a/sys/contrib/device-tree/src/arm64/hisilicon/hi3798cv200.dtsi b/sys/contrib/device-tree/src/arm64/hisilicon/hi3798cv200.dtsi
index a83b9d4f172e..ed1b5a7a6067 100644
--- a/sys/contrib/device-tree/src/arm64/hisilicon/hi3798cv200.dtsi
+++ b/sys/contrib/device-tree/src/arm64/hisilicon/hi3798cv200.dtsi
@@ -302,8 +302,8 @@
compatible = "snps,dw-mshc";
reg = <0x9820000 0x10000>;
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&crg HISTB_SDIO0_CIU_CLK>,
- <&crg HISTB_SDIO0_BIU_CLK>;
+ clocks = <&crg HISTB_SDIO0_BIU_CLK>,
+ <&crg HISTB_SDIO0_CIU_CLK>;
clock-names = "biu", "ciu";
resets = <&crg 0x9c 4>;
reset-names = "reset";
diff --git a/sys/contrib/device-tree/src/arm64/hisilicon/hi6220.dtsi b/sys/contrib/device-tree/src/arm64/hisilicon/hi6220.dtsi
index b7e2cbf466b3..be808bb2544e 100644
--- a/sys/contrib/device-tree/src/arm64/hisilicon/hi6220.dtsi
+++ b/sys/contrib/device-tree/src/arm64/hisilicon/hi6220.dtsi
@@ -861,7 +861,7 @@
#thermal-sensor-cells = <1>;
};
- i2s0: i2s@f7118000{
+ i2s0: i2s@f7118000 {
compatible = "hisilicon,hi6210-i2s";
reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
@@ -1032,17 +1032,17 @@
compatible = "hisilicon,hi6220-mali", "arm,mali-450";
reg = <0x0 0xf4080000 0x0 0x00040000>;
interrupt-parent = <&gic>;
- interrupts = <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 126 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "gp",
"gpmmu",
diff --git a/sys/contrib/device-tree/src/arm64/hisilicon/hikey970-pmic.dtsi b/sys/contrib/device-tree/src/arm64/hisilicon/hikey970-pmic.dtsi
index 970047f2dabd..299c4ab630e8 100644
--- a/sys/contrib/device-tree/src/arm64/hisilicon/hikey970-pmic.dtsi
+++ b/sys/contrib/device-tree/src/arm64/hisilicon/hikey970-pmic.dtsi
@@ -10,10 +10,9 @@
/ {
spmi: spmi@fff24000 {
compatible = "hisilicon,kirin970-spmi-controller";
+ reg = <0x0 0xfff24000 0x0 0x1000>;
#address-cells = <2>;
#size-cells = <0>;
- status = "okay";
- reg = <0x0 0xfff24000 0x0 0x1000>;
hisilicon,spmi-channel = <2>;
pmic: pmic@0 {
@@ -25,9 +24,6 @@
gpios = <&gpio28 0 0>;
regulators {
- #address-cells = <1>;
- #size-cells = <0>;
-
ldo3: ldo3 { /* HDMI */
regulator-name = "ldo3";
regulator-min-microvolt = <1500000>;
diff --git a/sys/contrib/device-tree/src/arm64/hisilicon/hip06.dtsi b/sys/contrib/device-tree/src/arm64/hisilicon/hip06.dtsi
index c588848bfdeb..f46c33d10750 100644
--- a/sys/contrib/device-tree/src/arm64/hisilicon/hip06.dtsi
+++ b/sys/contrib/device-tree/src/arm64/hisilicon/hip06.dtsi
@@ -570,7 +570,7 @@
};
};
- eth0: ethernet-4{
+ eth0: ethernet-4 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <4>;
@@ -579,7 +579,7 @@
dma-coherent;
};
- eth1: ethernet-5{
+ eth1: ethernet-5 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <5>;
@@ -588,7 +588,7 @@
dma-coherent;
};
- eth2: ethernet-0{
+ eth2: ethernet-0 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <0>;
@@ -597,7 +597,7 @@
dma-coherent;
};
- eth3: ethernet-1{
+ eth3: ethernet-1 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/hisilicon/hip07.dtsi b/sys/contrib/device-tree/src/arm64/hisilicon/hip07.dtsi
index 595abe339c5d..81d907ef43ed 100644
--- a/sys/contrib/device-tree/src/arm64/hisilicon/hip07.dtsi
+++ b/sys/contrib/device-tree/src/arm64/hisilicon/hip07.dtsi
@@ -1483,7 +1483,7 @@
};
};
- eth0: ethernet@4{
+ eth0: ethernet@4 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <4>;
@@ -1492,7 +1492,7 @@
dma-coherent;
};
- eth1: ethernet@5{
+ eth1: ethernet@5 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <5>;
@@ -1501,7 +1501,7 @@
dma-coherent;
};
- eth2: ethernet@0{
+ eth2: ethernet@0 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <0>;
@@ -1510,7 +1510,7 @@
dma-coherent;
};
- eth3: ethernet@1{
+ eth3: ethernet@1 {
compatible = "hisilicon,hns-nic-v2";
ae-handle = <&dsaf0>;
port-idx-in-ae = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex.dtsi b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex.dtsi
index f9674cc46764..76aafa172eb0 100644
--- a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex.dtsi
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex.dtsi
@@ -60,6 +60,25 @@
};
};
+ firmware {
+ svc {
+ compatible = "intel,agilex-svc";
+ method = "smc";
+ memory-region = <&service_reserved>;
+
+ fpga_mgr: fpga-mgr {
+ compatible = "intel,agilex-soc-fpga-mgr";
+ };
+ };
+ };
+
+ fpga-region {
+ compatible = "fpga-region";
+ #address-cells = <0x2>;
+ #size-cells = <0x2>;
+ fpga-mgr = <&fpga_mgr>;
+ };
+
pmu {
compatible = "arm,armv8-pmuv3";
interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>,
@@ -130,7 +149,7 @@
compatible = "usb-nop-xceiv";
};
- soc {
+ soc@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
@@ -138,13 +157,6 @@
interrupt-parent = <&intc>;
ranges = <0 0 0 0xffffffff>;
- base_fpga_region {
- #address-cells = <0x2>;
- #size-cells = <0x2>;
- compatible = "fpga-region";
- fpga-mgr = <&fpga_mgr>;
- };
-
clkmgr: clock-controller@ffd10000 {
compatible = "intel,agilex-clkmgr";
reg = <0xffd10000 0x1000>;
@@ -158,7 +170,7 @@
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];
resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
tx-fifo-depth = <16384>;
rx-fifo-depth = <16384>;
snps,multicast-filter-bins = <256>;
@@ -176,7 +188,7 @@
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];
resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
tx-fifo-depth = <16384>;
rx-fifo-depth = <16384>;
snps,multicast-filter-bins = <256>;
@@ -194,7 +206,7 @@
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];
resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
- reset-names = "stmmaceth", "stmmaceth-ocp";
+ reset-names = "stmmaceth", "ahb";
tx-fifo-depth = <16384>;
rx-fifo-depth = <16384>;
snps,multicast-filter-bins = <256>;
@@ -336,6 +348,9 @@
ocram: sram@ffe00000 {
compatible = "mmio-sram";
reg = <0xffe00000 0x40000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xffe00000 0x40000>;
};
pdma: dma-controller@ffda0000 {
@@ -365,7 +380,7 @@
pinctrl-single,function-mask = <0x0000000f>;
};
- pinctrl1: pinconf@ffd13100 {
+ pinctrl1: pinctrl@ffd13100 {
compatible = "pinctrl-single";
#pinctrl-cells = <1>;
reg = <0xffd13100 0x20>;
@@ -373,9 +388,9 @@
};
rst: rstmgr@ffd11000 {
- #reset-cells = <1>;
- compatible = "altr,stratix10-rst-mgr";
+ compatible = "altr,stratix10-rst-mgr", "altr,rst-mgr";
reg = <0xffd11000 0x100>;
+ #reset-cells = <1>;
};
smmu: iommu@fa000000 {
@@ -656,17 +671,5 @@
status = "disabled";
};
-
- firmware {
- svc {
- compatible = "intel,agilex-svc";
- method = "smc";
- memory-region = <&service_reserved>;
-
- fpga_mgr: fpga-mgr {
- compatible = "intel,agilex-soc-fpga-mgr";
- };
- };
- };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5.dtsi b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5.dtsi
new file mode 100644
index 000000000000..d66d425e45b7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5.dtsi
@@ -0,0 +1,468 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2023, Intel Corporation
+ */
+
+/dts-v1/;
+#include <dt-bindings/reset/altr,rst-mgr-s10.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/intel,agilex5-clkmgr.h>
+
+/ {
+ compatible = "intel,socfpga-agilex5";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ service_reserved: svcbuffer@0 {
+ compatible = "shared-dma-pool";
+ reg = <0x0 0x80000000 0x0 0x2000000>;
+ alignment = <0x1000>;
+ no-map;
+ };
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ compatible = "arm,cortex-a55";
+ reg = <0x0>;
+ device_type = "cpu";
+ enable-method = "psci";
+ };
+
+ cpu1: cpu@1 {
+ compatible = "arm,cortex-a55";
+ reg = <0x100>;
+ device_type = "cpu";
+ enable-method = "psci";
+ };
+
+ cpu2: cpu@2 {
+ compatible = "arm,cortex-a76";
+ reg = <0x200>;
+ device_type = "cpu";
+ enable-method = "psci";
+ };
+
+ cpu3: cpu@3 {
+ compatible = "arm,cortex-a76";
+ reg = <0x300>;
+ device_type = "cpu";
+ enable-method = "psci";
+ };
+ };
+
+ psci {
+ compatible = "arm,psci-0.2";
+ method = "smc";
+ };
+
+ intc: interrupt-controller@1d000000 {
+ compatible = "arm,gic-v3";
+ reg = <0x0 0x1d000000 0 0x10000>,
+ <0x0 0x1d060000 0 0x100000>;
+ ranges;
+ #interrupt-cells = <3>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ interrupt-controller;
+ #redistributor-regions = <1>;
+ redistributor-stride = <0x0 0x20000>;
+
+ its: msi-controller@1d040000 {
+ compatible = "arm,gic-v3-its";
+ reg = <0x0 0x1d040000 0x0 0x20000>;
+ msi-controller;
+ #msi-cells = <1>;
+ };
+ };
+
+ /* Clock tree 5 main sources*/
+ clocks {
+ cb_intosc_hs_div2_clk: cb-intosc-hs-div2-clk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ };
+
+ cb_intosc_ls_clk: cb-intosc-ls-clk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ };
+
+ f2s_free_clk: f2s-free-clk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ };
+
+ osc1: osc1 {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ };
+
+ qspi_clk: qspi-clk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <200000000>;
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupt-parent = <&intc>;
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+ };
+
+ usbphy0: usbphy {
+ #phy-cells = <0>;
+ compatible = "usb-nop-xceiv";
+ };
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+ ranges = <0 0 0 0xffffffff>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ device_type = "soc";
+ interrupt-parent = <&intc>;
+
+ clkmgr: clock-controller@10d10000 {
+ compatible = "intel,agilex5-clkmgr";
+ reg = <0x10d10000 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ i2c0: i2c@10c02800 {
+ compatible = "snps,designware-i2c";
+ reg = <0x10c02800 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst I2C0_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@10c02900 {
+ compatible = "snps,designware-i2c";
+ reg = <0x10c02900 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst I2C1_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@10c02a00 {
+ compatible = "snps,designware-i2c";
+ reg = <0x10c02a00 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst I2C2_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ status = "disabled";
+ };
+
+ i2c3: i2c@10c02b00 {
+ compatible = "snps,designware-i2c";
+ reg = <0x10c02b00 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst I2C3_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ status = "disabled";
+ };
+
+ i2c4: i2c@10c02c00 {
+ compatible = "snps,designware-i2c";
+ reg = <0x10c02c00 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst I2C4_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ status = "disabled";
+ };
+
+ i3c0: i3c-master@10da0000 {
+ compatible = "snps,dw-i3c-master-1.00a";
+ reg = <0x10da0000 0x1000>;
+ #address-cells = <3>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_L4_MP_CLK>;
+ status = "disabled";
+ };
+
+ i3c1: i3c-master@10da1000 {
+ compatible = "snps,dw-i3c-master-1.00a";
+ reg = <0x10da1000 0x1000>;
+ #address-cells = <3>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_L4_MP_CLK>;
+ status = "disabled";
+ };
+
+ gpio1: gpio@10c03300 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x10c03300 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ resets = <&rst GPIO1_RESET>;
+ status = "disabled";
+
+ portb: gpio-controller@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ reg = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <24>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ nand: nand-controller@10b80000 {
+ compatible = "cdns,hp-nfc";
+ reg = <0x10b80000 0x10000>,
+ <0x10840000 0x10000>;
+ reg-names = "reg", "sdma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_NAND_NF_CLK>;
+ cdns,board-delay-ps = <4830>;
+ status = "disabled";
+ };
+
+ ocram: sram@0 {
+ compatible = "mmio-sram";
+ reg = <0x00000000 0x80000>;
+ ranges = <0 0 0x80000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
+ dmac0: dma-controller@10db0000 {
+ compatible = "snps,axi-dma-1.01a";
+ reg = <0x10db0000 0x500>;
+ clocks = <&clkmgr AGILEX5_L4_MAIN_CLK>,
+ <&clkmgr AGILEX5_L4_MP_CLK>;
+ clock-names = "core-clk", "cfgr-clk";
+ interrupt-parent = <&intc>;
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ dma-channels = <4>;
+ snps,dma-masters = <1>;
+ snps,data-width = <2>;
+ snps,block-size = <32767 32767 32767 32767>;
+ snps,priority = <0 1 2 3>;
+ snps,axi-max-burst-len = <8>;
+ };
+
+ dmac1: dma-controller@10dc0000 {
+ compatible = "snps,axi-dma-1.01a";
+ reg = <0x10dc0000 0x500>;
+ clocks = <&clkmgr AGILEX5_L4_MAIN_CLK>,
+ <&clkmgr AGILEX5_L4_MP_CLK>;
+ clock-names = "core-clk", "cfgr-clk";
+ interrupt-parent = <&intc>;
+ interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ dma-channels = <4>;
+ snps,dma-masters = <1>;
+ snps,data-width = <2>;
+ snps,block-size = <32767 32767 32767 32767>;
+ snps,priority = <0 1 2 3>;
+ snps,axi-max-burst-len = <8>;
+ };
+
+ rst: rstmgr@10d11000 {
+ compatible = "altr,stratix10-rst-mgr", "altr,rst-mgr";
+ reg = <0x10d11000 0x1000>;
+ #reset-cells = <1>;
+ };
+
+ spi0: spi@10da4000 {
+ compatible = "snps,dw-apb-ssi";
+ reg = <0x10da4000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst SPIM0_RESET>;
+ reset-names = "spi";
+ reg-io-width = <4>;
+ num-cs = <4>;
+ clocks = <&clkmgr AGILEX5_L4_MAIN_CLK>;
+ dmas = <&dmac0 2>, <&dmac0 3>;
+ dma-names = "tx", "rx";
+ status = "disabled";
+
+ };
+
+ spi1: spi@10da5000 {
+ compatible = "snps,dw-apb-ssi";
+ reg = <0x10da5000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst SPIM1_RESET>;
+ reset-names = "spi";
+ reg-io-width = <4>;
+ num-cs = <4>;
+ clocks = <&clkmgr AGILEX5_L4_MAIN_CLK>;
+ status = "disabled";
+ };
+
+ sysmgr: sysmgr@10d12000 {
+ compatible = "altr,sys-mgr-s10","altr,sys-mgr";
+ reg = <0x10d12000 0x500>;
+ };
+
+ timer0: timer0@10c03000 {
+ compatible = "snps,dw-apb-timer";
+ reg = <0x10c03000 0x100>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ clock-names = "timer";
+ };
+
+ timer1: timer1@10c03100 {
+ compatible = "snps,dw-apb-timer";
+ reg = <0x10c03100 0x100>;
+ interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ clock-names = "timer";
+ };
+
+ timer2: timer2@10d00000 {
+ compatible = "snps,dw-apb-timer";
+ reg = <0x10d00000 0x100>;
+ interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ clock-names = "timer";
+ };
+
+ timer3: timer3@10d00100 {
+ compatible = "snps,dw-apb-timer";
+ reg = <0x10d00100 0x100>;
+ interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ clock-names = "timer";
+ };
+
+ uart0: serial@10c02000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x10c02000 0x100>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ resets = <&rst UART0_RESET>;
+ status = "disabled";
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ };
+
+ uart1: serial@10c02100 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x10c02100 0x100>;
+ interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ resets = <&rst UART1_RESET>;
+ status = "disabled";
+ clocks = <&clkmgr AGILEX5_L4_SP_CLK>;
+ };
+
+ usb0: usb@10b00000 {
+ compatible = "snps,dwc2";
+ reg = <0x10b00000 0x40000>;
+ interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&usbphy0>;
+ phy-names = "usb2-phy";
+ resets = <&rst USB0_RESET>, <&rst USB0_OCP_RESET>;
+ reset-names = "dwc2", "dwc2-ecc";
+ clocks = <&clkmgr AGILEX5_USB2OTG_HCLK>;
+ clock-names = "otg";
+ status = "disabled";
+ };
+
+ watchdog0: watchdog@10d00200 {
+ compatible = "snps,dw-wdt";
+ reg = <0x10d00200 0x100>;
+ interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst WATCHDOG0_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SYS_FREE_CLK>;
+ status = "disabled";
+ };
+
+ watchdog1: watchdog@10d00300 {
+ compatible = "snps,dw-wdt";
+ reg = <0x10d00300 0x100>;
+ interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst WATCHDOG1_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SYS_FREE_CLK>;
+ status = "disabled";
+ };
+
+ watchdog2: watchdog@10d00400 {
+ compatible = "snps,dw-wdt";
+ reg = <0x10d00400 0x100>;
+ interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst WATCHDOG2_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SYS_FREE_CLK>;
+ status = "disabled";
+ };
+
+ watchdog3: watchdog@10d00500 {
+ compatible = "snps,dw-wdt";
+ reg = <0x10d00500 0x100>;
+ interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst WATCHDOG3_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SYS_FREE_CLK>;
+ status = "disabled";
+ };
+
+ watchdog4: watchdog@10d00600 {
+ compatible = "snps,dw-wdt";
+ reg = <0x10d00600 0x100>;
+ interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst WATCHDOG4_RESET>;
+ clocks = <&clkmgr AGILEX5_L4_SYS_FREE_CLK>;
+ status = "disabled";
+ };
+
+ qspi: spi@108d2000 {
+ compatible = "intel,socfpga-qspi", "cdns,qspi-nor";
+ reg = <0x108d2000 0x100>,
+ <0x10900000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+ cdns,fifo-depth = <128>;
+ cdns,fifo-width = <4>;
+ cdns,trigger-address = <0x00000000>;
+ clocks = <&qspi_clk>;
+ status = "disabled";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5_socdk.dts b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5_socdk.dts
new file mode 100644
index 000000000000..c533e5a3a610
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex5_socdk.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2023, Intel Corporation
+ */
+#include "socfpga_agilex5.dtsi"
+
+/ {
+ model = "SoCFPGA Agilex5 SoCDK";
+ compatible = "intel,socfpga-agilex5-socdk", "intel,socfpga-agilex5";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&osc1 {
+ clock-frequency = <25000000>;
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&usb0 {
+ status = "okay";
+ disable-over-current;
+};
+
+&watchdog0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_n6000.dts b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_n6000.dts
index 6231a69204b1..d22de06e9839 100644
--- a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_n6000.dts
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_n6000.dts
@@ -20,13 +20,13 @@
stdout-path = "serial0:115200n8";
};
- memory@0 {
+ memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x80000000 0 0>;
};
- soc {
+ soc@0 {
bus@80000000 {
compatible = "simple-bus";
reg = <0x80000000 0x60000000>,
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk.dts b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk.dts
index 07c3f8876613..ad99aefeb185 100644
--- a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk.dts
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk.dts
@@ -37,10 +37,10 @@
};
};
- memory {
+ memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x80000000 0 0>;
};
};
@@ -113,8 +113,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <2>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
@@ -128,12 +126,12 @@
qspi_boot: partition@0 {
label = "Boot and fpga data";
- reg = <0x0 0x03FE0000>;
+ reg = <0x0 0x04200000>;
};
- qspi_rootfs: partition@3FE0000 {
- label = "Root Filesystem - JFFS2";
- reg = <0x03FE0000 0x0C020000>;
+ root: partition@4200000 {
+ label = "Root Filesystem - UBIFS";
+ reg = <0x04200000 0x0BE00000>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk_nand.dts b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk_nand.dts
index 51f83f96ec65..0f9020bd0c52 100644
--- a/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk_nand.dts
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_agilex_socdk_nand.dts
@@ -37,10 +37,10 @@
};
};
- memory {
+ memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x80000000 0 0>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/intel/socfpga_n5x_socdk.dts b/sys/contrib/device-tree/src/arm64/intel/socfpga_n5x_socdk.dts
index 08c088571270..2d70a92c2090 100644
--- a/sys/contrib/device-tree/src/arm64/intel/socfpga_n5x_socdk.dts
+++ b/sys/contrib/device-tree/src/arm64/intel/socfpga_n5x_socdk.dts
@@ -19,18 +19,17 @@
stdout-path = "serial0:115200n8";
};
- memory {
+ memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x80000000 0 0>;
};
- soc {
+ soc@0 {
sdram_edac: memory-controller@f87f8000 {
compatible = "snps,ddrc-3.80a";
reg = <0xf87f8000 0x400>;
interrupts = <0 175 4>;
- status = "okay";
};
};
};
@@ -91,8 +90,6 @@
spi-max-frequency = <100000000>;
m25p,fast-read;
- cdns,page-size = <256>;
- cdns,block-size = <16>;
cdns,read-delay = <2>;
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
@@ -109,7 +106,7 @@
reg = <0x0 0x03FE0000>;
};
- qspi_rootfs: partition@3FE0000 {
+ qspi_rootfs: partition@3fe0000 {
label = "Root Filesystem - JFFS2";
reg = <0x03FE0000 0x0C020000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/lg/lg1312.dtsi b/sys/contrib/device-tree/src/arm64/lg/lg1312.dtsi
index 78ae73d0cf36..b864ffa74ea8 100644
--- a/sys/contrib/device-tree/src/arm64/lg/lg1312.dtsi
+++ b/sys/contrib/device-tree/src/arm64/lg/lg1312.dtsi
@@ -48,6 +48,8 @@
};
L2_0: l2-cache0 {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
};
@@ -124,7 +126,6 @@
amba {
#address-cells = <2>;
#size-cells = <1>;
- #interrupt-cells = <3>;
compatible = "simple-bus";
interrupt-parent = <&gic>;
diff --git a/sys/contrib/device-tree/src/arm64/lg/lg1313.dtsi b/sys/contrib/device-tree/src/arm64/lg/lg1313.dtsi
index 2173316573be..996fb39bb50c 100644
--- a/sys/contrib/device-tree/src/arm64/lg/lg1313.dtsi
+++ b/sys/contrib/device-tree/src/arm64/lg/lg1313.dtsi
@@ -48,6 +48,8 @@
};
L2_0: l2-cache0 {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
};
@@ -124,7 +126,6 @@
amba {
#address-cells = <2>;
#size-cells = <1>;
- #interrupt-cells = <3>;
compatible = "simple-bus";
interrupt-parent = <&gic>;
diff --git a/sys/contrib/device-tree/src/arm64/marvell/ac5-98dx25xx.dtsi b/sys/contrib/device-tree/src/arm64/marvell/ac5-98dx25xx.dtsi
index c9ce1010c415..b5e042b8e929 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/ac5-98dx25xx.dtsi
+++ b/sys/contrib/device-tree/src/arm64/marvell/ac5-98dx25xx.dtsi
@@ -135,7 +135,7 @@
clocks = <&cnm_clock>;
};
- i2c0: i2c@11000{
+ i2c0: i2c@11000 {
compatible = "marvell,mv78230-i2c";
reg = <0x11000 0x20>;
#address-cells = <1>;
@@ -144,7 +144,7 @@
clocks = <&cnm_clock>;
clock-names = "core";
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
- clock-frequency=<100000>;
+ clock-frequency = <100000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&i2c0_pins>;
@@ -154,7 +154,7 @@
status = "disabled";
};
- i2c1: i2c@11100{
+ i2c1: i2c@11100 {
compatible = "marvell,mv78230-i2c";
reg = <0x11100 0x20>;
#address-cells = <1>;
@@ -163,7 +163,7 @@
clocks = <&cnm_clock>;
clock-names = "core";
interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
- clock-frequency=<100000>;
+ clock-frequency = <100000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&i2c1_pins>;
@@ -297,6 +297,16 @@
status = "disabled";
};
+ nand: nand-controller@805b0000 {
+ compatible = "marvell,ac5-nand-controller";
+ reg = <0x0 0x805b0000 0x0 0x00000054>;
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&nand_clock>;
+ status = "disabled";
+ };
+
gic: interrupt-controller@80600000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>;
@@ -319,5 +329,11 @@
#clock-cells = <0>;
clock-frequency = <200000000>;
};
+
+ nand_clock: nand-clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <400000000>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier-cn9131.dts b/sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier-cn9131.dts
new file mode 100644
index 000000000000..2a0b07000089
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier-cn9131.dts
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Marvell International Ltd.
+ *
+ * Device tree for the AC5X RD Type 7 Com Express carrier board,
+ * Utilizing the CN913x COM Express CPU module board.
+ * This specific carrier board in this mode of operation (external)
+ * only maintains a PCIe link with the CPU module,
+ * which does not require any special DTS definitions.
+ *
+ * AC5X RD works here in external mode (switch selectable at the back of the
+ * board), and connect via an external cable a kit
+ * which would allow it to use an external CN9131 CPU COM Express module,
+ * mounted on top of an interposer kit.
+ *
+ * So in this case, once the switch is set to external mode as explained above,
+ * the AC5X RD becomes part of the carrier solution.
+ *
+ * When the board boots in the external CPU mode, the internal CPU is disabled,
+ * and only the switch portion of the SOC acts as a PCIe end-point, Hence there
+ * is no need to describe this internal (disabled CPU) in the device tree.
+ *
+ * There is no CPU booting in this mode on the carrier, only on the
+ * CN9131 COM Express CPU module.
+ * What runs the Linux is the CN9131 on the COM Express CPU module,
+ * And it accesses the switch end-point on the AC5X RD portion of the carrier
+ * via PCIe.
+ */
+
+#include "cn9131-db-comexpress.dtsi"
+#include "ac5x-rd-carrier.dtsi"
+
+/ {
+ model = "Marvell Armada AC5X RD COM EXPRESS type 7 carrier board with CN9131 CPU module";
+ compatible = "marvell,cn9131-ac5x-carrier", "marvell,rd-ac5x-carrier",
+ "marvell,cn9131-cpu-module", "marvell,cn9131",
+ "marvell,armada-ap807-quad", "marvell,armada-ap807";
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x2 0x00000000>;
+ };
+
+};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier.dtsi b/sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier.dtsi
new file mode 100644
index 000000000000..f98629abb58b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/marvell/ac5x-rd-carrier.dtsi
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Marvell International Ltd.
+ *
+ * Device tree for the AC5X RD Type 7 Com Express carrier board,
+ * This specific board in external mode (see below) only maintains
+ * a PCIe link with the COM Express CPU module, which does not
+ * require any special DTS definitions.
+ *
+ * AC5X RD can either work as you would expect, as a complete standalone
+ * box using the internal CPU, or you can move the switch on the back of
+ * the box to "external" mode, and connect via an external cable a kit
+ * which would allow it to use an external CPU COM Express module,
+ * mounted on top of an interposer kit.
+ *
+ * So in this case, once the switch is set to external mode as explained above,
+ * the AC5X RD becomes part of the carrier solution.
+ * This is a development/reference solution, not a full commercial solution,
+ * hence it was designed with the flexibility to be configured in different
+ * modes of operation.
+ *
+ * When the board boots in the external CPU mode, the internal CPU is disabled,
+ * and only the switch portion of the SOC acts as a PCIe end-point, Hence there
+ * is no need to describe this internal (disabled CPU) in the device tree.
+ *
+ * There is no CPU booting in this mode on the carrier,
+ * only on the COM Express CPU module.
+ */
+
+/ {
+ model = "Marvell Armada AC5X RD COM EXPRESS type 7 carrier board";
+ compatible = "marvell,rd-ac5x-carrier";
+
+};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-eDPU.dts b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-eDPU.dts
index 57fc698e55d0..d6d37a1f6f38 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-eDPU.dts
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-eDPU.dts
@@ -12,3 +12,50 @@
&eth0 {
phy-mode = "2500base-x";
};
+
+/*
+ * External MV88E6361 switch is only available on v2 of the board.
+ * U-Boot will enable the MDIO bus and switch nodes.
+ */
+&mdio {
+ status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&smi_pins>;
+
+ /* Actual device is MV88E6361 */
+ switch: switch@0 {
+ compatible = "marvell,mv88e6190";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "cpu";
+ phy-mode = "2500base-x";
+ managed = "in-band-status";
+ ethernet = <&eth0>;
+ };
+
+ port@9 {
+ reg = <9>;
+ label = "downlink";
+ phy-mode = "2500base-x";
+ managed = "in-band-status";
+ };
+
+ port@a {
+ reg = <10>;
+ label = "uplink";
+ phy-mode = "2500base-x";
+ managed = "in-band-status";
+ sfp = <&sfp_eth1>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin-ultra.dts b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin-ultra.dts
index f9abef8dcc94..870bb380a40a 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin-ultra.dts
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin-ultra.dts
@@ -126,32 +126,32 @@
reset-gpios = <&gpiosb 23 GPIO_ACTIVE_LOW>;
- ports {
- switch0port1: port@1 {
+ ethernet-ports {
+ switch0port1: ethernet-port@1 {
reg = <1>;
label = "lan0";
phy-handle = <&switch0phy0>;
};
- switch0port2: port@2 {
+ switch0port2: ethernet-port@2 {
reg = <2>;
label = "lan1";
phy-handle = <&switch0phy1>;
};
- switch0port3: port@3 {
+ switch0port3: ethernet-port@3 {
reg = <3>;
label = "lan2";
phy-handle = <&switch0phy2>;
};
- switch0port4: port@4 {
+ switch0port4: ethernet-port@4 {
reg = <4>;
label = "lan3";
phy-handle = <&switch0phy3>;
};
- switch0port5: port@5 {
+ switch0port5: ethernet-port@5 {
reg = <5>;
label = "wan";
phy-handle = <&extphy>;
@@ -160,7 +160,7 @@
};
mdio {
- switch0phy3: switch0phy3@14 {
+ switch0phy3: ethernet-phy@14 {
reg = <0x14>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin.dtsi b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin.dtsi
index 5fc613d24151..fed2dcecb323 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin.dtsi
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-espressobin.dtsi
@@ -13,7 +13,7 @@
/ {
aliases {
ethernet0 = &eth0;
- /* for dsa slave device */
+ /* for DSA user port device */
ethernet1 = &switch0port1;
ethernet2 = &switch0port2;
ethernet3 = &switch0port3;
@@ -145,19 +145,17 @@
};
&mdio {
- switch0: switch0@1 {
+ switch0: ethernet-switch@1 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <1>;
dsa,member = <0 0>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- switch0port0: port@0 {
+ switch0port0: ethernet-port@0 {
reg = <0>;
label = "cpu";
ethernet = <&eth0>;
@@ -168,19 +166,19 @@
};
};
- switch0port1: port@1 {
+ switch0port1: ethernet-port@1 {
reg = <1>;
label = "wan";
phy-handle = <&switch0phy0>;
};
- switch0port2: port@2 {
+ switch0port2: ethernet-port@2 {
reg = <2>;
label = "lan0";
phy-handle = <&switch0phy1>;
};
- switch0port3: port@3 {
+ switch0port3: ethernet-port@3 {
reg = <3>;
label = "lan1";
phy-handle = <&switch0phy2>;
@@ -192,13 +190,13 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy0: switch0phy0@11 {
+ switch0phy0: ethernet-phy@11 {
reg = <0x11>;
};
- switch0phy1: switch0phy1@12 {
+ switch0phy1: ethernet-phy@12 {
reg = <0x12>;
};
- switch0phy2: switch0phy2@13 {
+ switch0phy2: ethernet-phy@13 {
reg = <0x13>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-gl-mv1000.dts b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-gl-mv1000.dts
index b1b45b4fa9d4..63fbc8352161 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-gl-mv1000.dts
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-gl-mv1000.dts
@@ -152,31 +152,29 @@
};
&mdio {
- switch0: switch0@1 {
+ switch0: ethernet-switch@1 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <1>;
dsa,member = <0 0>;
- ports: ports {
+ ports: ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@0 {
+ ethernet-port@0 {
reg = <0>;
label = "cpu";
ethernet = <&eth0>;
};
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "wan";
phy-handle = <&switch0phy0>;
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan0";
phy-handle = <&switch0phy1>;
@@ -185,7 +183,7 @@
nvmem-cell-names = "mac-address";
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan1";
phy-handle = <&switch0phy2>;
@@ -199,13 +197,13 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy0: switch0phy0@11 {
+ switch0phy0: ethernet-phy@11 {
reg = <0x11>;
};
- switch0phy1: switch0phy1@12 {
+ switch0phy1: ethernet-phy@12 {
reg = <0x12>;
};
- switch0phy2: switch0phy2@13 {
+ switch0phy2: ethernet-phy@13 {
reg = <0x13>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-turris-mox.dts b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-turris-mox.dts
index 9eab2bb22134..f1a9f2234359 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-turris-mox.dts
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-turris-mox.dts
@@ -130,7 +130,7 @@
compatible = "microchip,mcp7940x";
reg = <0x6f>;
interrupt-parent = <&gpiosb>;
- interrupts = <5 0>; /* GPIO2_5 */
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>; /* GPIO2_5 */
};
};
@@ -304,9 +304,15 @@
reg = <1>;
};
- /* switch nodes are enabled by U-Boot if modules are present */
+ /*
+ * NOTE: switch nodes are enabled by U-Boot if modules are present
+ * DO NOT change this node name (switch0@10) even if it is not following
+ * conventions! Deployed U-Boot binaries are explicitly looking for
+ * this node in order to augment the device tree!
+ * Also do not touch the "ports" or "port@n" nodes. These are also ABI.
+ */
switch0@10 {
- compatible = "marvell,mv88e6190";
+ compatible = "marvell,turris-mox-mv88e6190", "marvell,mv88e6190";
reg = <0x10>;
dsa,member = <0 0>;
interrupt-parent = <&moxtet>;
@@ -317,35 +323,35 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy1: switch0phy1@1 {
+ switch0phy1: ethernet-phy@1 {
reg = <0x1>;
};
- switch0phy2: switch0phy2@2 {
+ switch0phy2: ethernet-phy@2 {
reg = <0x2>;
};
- switch0phy3: switch0phy3@3 {
+ switch0phy3: ethernet-phy@3 {
reg = <0x3>;
};
- switch0phy4: switch0phy4@4 {
+ switch0phy4: ethernet-phy@4 {
reg = <0x4>;
};
- switch0phy5: switch0phy5@5 {
+ switch0phy5: ethernet-phy@5 {
reg = <0x5>;
};
- switch0phy6: switch0phy6@6 {
+ switch0phy6: ethernet-phy@6 {
reg = <0x6>;
};
- switch0phy7: switch0phy7@7 {
+ switch0phy7: ethernet-phy@7 {
reg = <0x7>;
};
- switch0phy8: switch0phy8@8 {
+ switch0phy8: ethernet-phy@8 {
reg = <0x8>;
};
};
@@ -430,8 +436,9 @@
};
};
+ /* NOTE: this node name is ABI, don't change it! */
switch0@2 {
- compatible = "marvell,mv88e6085";
+ compatible = "marvell,turris-mox-mv88e6085", "marvell,mv88e6085";
reg = <0x2>;
dsa,member = <0 0>;
interrupt-parent = <&moxtet>;
@@ -442,19 +449,19 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy1_topaz: switch0phy1@11 {
+ switch0phy1_topaz: ethernet-phy@11 {
reg = <0x11>;
};
- switch0phy2_topaz: switch0phy2@12 {
+ switch0phy2_topaz: ethernet-phy@12 {
reg = <0x12>;
};
- switch0phy3_topaz: switch0phy3@13 {
+ switch0phy3_topaz: ethernet-phy@13 {
reg = <0x13>;
};
- switch0phy4_topaz: switch0phy4@14 {
+ switch0phy4_topaz: ethernet-phy@14 {
reg = <0x14>;
};
};
@@ -497,8 +504,9 @@
};
};
+ /* NOTE: this node name is ABI, don't change it! */
switch1@11 {
- compatible = "marvell,mv88e6190";
+ compatible = "marvell,turris-mox-mv88e6190", "marvell,mv88e6190";
reg = <0x11>;
dsa,member = <0 1>;
interrupt-parent = <&moxtet>;
@@ -509,35 +517,35 @@
#address-cells = <1>;
#size-cells = <0>;
- switch1phy1: switch1phy1@1 {
+ switch1phy1: ethernet-phy@1 {
reg = <0x1>;
};
- switch1phy2: switch1phy2@2 {
+ switch1phy2: ethernet-phy@2 {
reg = <0x2>;
};
- switch1phy3: switch1phy3@3 {
+ switch1phy3: ethernet-phy@3 {
reg = <0x3>;
};
- switch1phy4: switch1phy4@4 {
+ switch1phy4: ethernet-phy@4 {
reg = <0x4>;
};
- switch1phy5: switch1phy5@5 {
+ switch1phy5: ethernet-phy@5 {
reg = <0x5>;
};
- switch1phy6: switch1phy6@6 {
+ switch1phy6: ethernet-phy@6 {
reg = <0x6>;
};
- switch1phy7: switch1phy7@7 {
+ switch1phy7: ethernet-phy@7 {
reg = <0x7>;
};
- switch1phy8: switch1phy8@8 {
+ switch1phy8: ethernet-phy@8 {
reg = <0x8>;
};
};
@@ -622,8 +630,9 @@
};
};
+ /* NOTE: this node name is ABI, don't change it! */
switch1@2 {
- compatible = "marvell,mv88e6085";
+ compatible = "marvell,turris-mox-mv88e6085", "marvell,mv88e6085";
reg = <0x2>;
dsa,member = <0 1>;
interrupt-parent = <&moxtet>;
@@ -634,19 +643,19 @@
#address-cells = <1>;
#size-cells = <0>;
- switch1phy1_topaz: switch1phy1@11 {
+ switch1phy1_topaz: ethernet-phy@11 {
reg = <0x11>;
};
- switch1phy2_topaz: switch1phy2@12 {
+ switch1phy2_topaz: ethernet-phy@12 {
reg = <0x12>;
};
- switch1phy3_topaz: switch1phy3@13 {
+ switch1phy3_topaz: ethernet-phy@13 {
reg = <0x13>;
};
- switch1phy4_topaz: switch1phy4@14 {
+ switch1phy4_topaz: ethernet-phy@14 {
reg = <0x14>;
};
};
@@ -689,8 +698,9 @@
};
};
+ /* NOTE: this node name is ABI, don't change it! */
switch2@12 {
- compatible = "marvell,mv88e6190";
+ compatible = "marvell,turris-mox-mv88e6190", "marvell,mv88e6190";
reg = <0x12>;
dsa,member = <0 2>;
interrupt-parent = <&moxtet>;
@@ -701,35 +711,35 @@
#address-cells = <1>;
#size-cells = <0>;
- switch2phy1: switch2phy1@1 {
+ switch2phy1: ethernet-phy@1 {
reg = <0x1>;
};
- switch2phy2: switch2phy2@2 {
+ switch2phy2: ethernet-phy@2 {
reg = <0x2>;
};
- switch2phy3: switch2phy3@3 {
+ switch2phy3: ethernet-phy@3 {
reg = <0x3>;
};
- switch2phy4: switch2phy4@4 {
+ switch2phy4: ethernet-phy@4 {
reg = <0x4>;
};
- switch2phy5: switch2phy5@5 {
+ switch2phy5: ethernet-phy@5 {
reg = <0x5>;
};
- switch2phy6: switch2phy6@6 {
+ switch2phy6: ethernet-phy@6 {
reg = <0x6>;
};
- switch2phy7: switch2phy7@7 {
+ switch2phy7: ethernet-phy@7 {
reg = <0x7>;
};
- switch2phy8: switch2phy8@8 {
+ switch2phy8: ethernet-phy@8 {
reg = <0x8>;
};
};
@@ -805,8 +815,9 @@
};
};
+ /* NOTE: this node name is ABI, don't change it! */
switch2@2 {
- compatible = "marvell,mv88e6085";
+ compatible = "marvell,turris-mox-mv88e6085", "marvell,mv88e6085";
reg = <0x2>;
dsa,member = <0 2>;
interrupt-parent = <&moxtet>;
@@ -817,19 +828,19 @@
#address-cells = <1>;
#size-cells = <0>;
- switch2phy1_topaz: switch2phy1@11 {
+ switch2phy1_topaz: ethernet-phy@11 {
reg = <0x11>;
};
- switch2phy2_topaz: switch2phy2@12 {
+ switch2phy2_topaz: ethernet-phy@12 {
reg = <0x12>;
};
- switch2phy3_topaz: switch2phy3@13 {
+ switch2phy3_topaz: ethernet-phy@13 {
reg = <0x13>;
};
- switch2phy4_topaz: switch2phy4@14 {
+ switch2phy4_topaz: ethernet-phy@14 {
reg = <0x14>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-uDPU.dtsi b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-uDPU.dtsi
index 3f79923376fb..3a9b6907185d 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-3720-uDPU.dtsi
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-3720-uDPU.dtsi
@@ -61,10 +61,10 @@
sfp_eth1: sfp-eth1 {
compatible = "sff,sfp";
i2c-bus = <&i2c1>;
- los-gpio = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
- mod-def0-gpio = <&gpiosb 8 GPIO_ACTIVE_LOW>;
- tx-disable-gpio = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
- tx-fault-gpio = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
+ los-gpios = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpios = <&gpiosb 8 GPIO_ACTIVE_LOW>;
+ tx-disable-gpios = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <3000>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-7040-mochabin.dts b/sys/contrib/device-tree/src/arm64/marvell/armada-7040-mochabin.dts
index 39ce6e25a8ef..40b7ee7ead72 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-7040-mochabin.dts
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-7040-mochabin.dts
@@ -149,7 +149,7 @@
};
/* SPI-NOR */
-&cp0_spi1{
+&cp0_spi1 {
status = "okay";
pinctrl-names = "default";
@@ -301,10 +301,8 @@
};
/* 88E6141 Topaz switch */
- switch: switch@3 {
+ switch: ethernet-switch@3 {
compatible = "marvell,mv88e6085";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <3>;
pinctrl-names = "default";
@@ -314,35 +312,35 @@
interrupt-parent = <&cp0_gpio1>;
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- swport1: port@1 {
+ swport1: ethernet-port@1 {
reg = <1>;
label = "lan0";
phy-handle = <&swphy1>;
};
- swport2: port@2 {
+ swport2: ethernet-port@2 {
reg = <2>;
label = "lan1";
phy-handle = <&swphy2>;
};
- swport3: port@3 {
+ swport3: ethernet-port@3 {
reg = <3>;
label = "lan2";
phy-handle = <&swphy3>;
};
- swport4: port@4 {
+ swport4: ethernet-port@4 {
reg = <4>;
label = "lan3";
phy-handle = <&swphy4>;
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "cpu";
ethernet = <&cp0_eth1>;
@@ -355,19 +353,19 @@
#address-cells = <1>;
#size-cells = <0>;
- swphy1: swphy1@17 {
+ swphy1: ethernet-phy@17 {
reg = <17>;
};
- swphy2: swphy2@18 {
+ swphy2: ethernet-phy@18 {
reg = <18>;
};
- swphy3: swphy3@19 {
+ swphy3: ethernet-phy@19 {
reg = <19>;
};
- swphy4: swphy4@20 {
+ swphy4: ethernet-phy@20 {
reg = <20>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-8040-clearfog-gt-8k.dts b/sys/contrib/device-tree/src/arm64/marvell/armada-8040-clearfog-gt-8k.dts
index 4125202028c8..67892f0d2863 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-8040-clearfog-gt-8k.dts
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-8040-clearfog-gt-8k.dts
@@ -497,42 +497,42 @@
reset-deassert-us = <10000>;
};
- switch0: switch0@4 {
+ switch0: ethernet-switch@4 {
compatible = "marvell,mv88e6085";
reg = <4>;
pinctrl-names = "default";
pinctrl-0 = <&cp1_switch_reset_pins>;
reset-gpios = <&cp1_gpio1 24 GPIO_ACTIVE_LOW>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "lan2";
phy-handle = <&switch0phy0>;
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "lan1";
phy-handle = <&switch0phy1>;
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "lan4";
phy-handle = <&switch0phy2>;
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "lan3";
phy-handle = <&switch0phy3>;
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "cpu";
ethernet = <&cp1_eth2>;
@@ -545,19 +545,19 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy0: switch0phy0@11 {
+ switch0phy0: ethernet-phy@11 {
reg = <0x11>;
};
- switch0phy1: switch0phy1@12 {
+ switch0phy1: ethernet-phy@12 {
reg = <0x12>;
};
- switch0phy2: switch0phy2@13 {
+ switch0phy2: ethernet-phy@13 {
reg = <0x13>;
};
- switch0phy3: switch0phy3@14 {
+ switch0phy3: ethernet-phy@14 {
reg = <0x14>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/armada-ap80x.dtsi b/sys/contrib/device-tree/src/arm64/marvell/armada-ap80x.dtsi
index 2c920e22cec2..7ec7c789d87e 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/armada-ap80x.dtsi
+++ b/sys/contrib/device-tree/src/arm64/marvell/armada-ap80x.dtsi
@@ -138,7 +138,6 @@
odmi: odmi@300000 {
compatible = "marvell,odmi-controller";
- interrupt-controller;
msi-controller;
marvell,odmi-frames = <4>;
reg = <0x300000 0x4000>,
diff --git a/sys/contrib/device-tree/src/arm64/marvell/cn9130-crb.dtsi b/sys/contrib/device-tree/src/arm64/marvell/cn9130-crb.dtsi
index 32cfb3e2efc3..6fcc34f7b464 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/cn9130-crb.dtsi
+++ b/sys/contrib/device-tree/src/arm64/marvell/cn9130-crb.dtsi
@@ -120,7 +120,7 @@
"mpp59", "mpp60", "mpp61";
marvell,function = "sdio";
};
- cp0_spi0_pins: cp0-spi-pins-0 {
+ cp0_spi1_pins: cp0-spi-pins-1 {
marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
marvell,function = "spi1";
};
@@ -170,7 +170,7 @@
&cp0_spi1 {
pinctrl-names = "default";
- pinctrl-0 = <&cp0_spi0_pins>;
+ pinctrl-0 = <&cp0_spi1_pins>;
reg = <0x700680 0x50>, /* control */
<0x2000000 0x1000000>; /* CS0 */
status = "okay";
@@ -207,11 +207,9 @@
reg = <0>;
};
- switch6: switch0@6 {
+ switch6: ethernet-switch@6 {
/* Actual device is MV88E6393X */
compatible = "marvell,mv88e6190";
- #address-cells = <1>;
- #size-cells = <0>;
reg = <6>;
interrupt-parent = <&cp0_gpio1>;
interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
@@ -220,59 +218,59 @@
dsa,member = <0 0>;
- ports {
+ ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
- port@1 {
+ ethernet-port@1 {
reg = <1>;
label = "p1";
phy-handle = <&switch0phy1>;
};
- port@2 {
+ ethernet-port@2 {
reg = <2>;
label = "p2";
phy-handle = <&switch0phy2>;
};
- port@3 {
+ ethernet-port@3 {
reg = <3>;
label = "p3";
phy-handle = <&switch0phy3>;
};
- port@4 {
+ ethernet-port@4 {
reg = <4>;
label = "p4";
phy-handle = <&switch0phy4>;
};
- port@5 {
+ ethernet-port@5 {
reg = <5>;
label = "p5";
phy-handle = <&switch0phy5>;
};
- port@6 {
+ ethernet-port@6 {
reg = <6>;
label = "p6";
phy-handle = <&switch0phy6>;
};
- port@7 {
+ ethernet-port@7 {
reg = <7>;
label = "p7";
phy-handle = <&switch0phy7>;
};
- port@8 {
+ ethernet-port@8 {
reg = <8>;
label = "p8";
phy-handle = <&switch0phy8>;
};
- port@9 {
+ ethernet-port@9 {
reg = <9>;
label = "p9";
phy-mode = "10gbase-r";
@@ -280,7 +278,7 @@
managed = "in-band-status";
};
- port@a {
+ ethernet-port@a {
reg = <10>;
ethernet = <&cp0_eth0>;
phy-mode = "10gbase-r";
@@ -293,35 +291,35 @@
#address-cells = <1>;
#size-cells = <0>;
- switch0phy1: switch0phy1@1 {
+ switch0phy1: ethernet-phy@1 {
reg = <0x1>;
};
- switch0phy2: switch0phy2@2 {
+ switch0phy2: ethernet-phy@2 {
reg = <0x2>;
};
- switch0phy3: switch0phy3@3 {
+ switch0phy3: ethernet-phy@3 {
reg = <0x3>;
};
- switch0phy4: switch0phy4@4 {
+ switch0phy4: ethernet-phy@4 {
reg = <0x4>;
};
- switch0phy5: switch0phy5@5 {
+ switch0phy5: ethernet-phy@5 {
reg = <0x5>;
};
- switch0phy6: switch0phy6@6 {
+ switch0phy6: ethernet-phy@6 {
reg = <0x6>;
};
- switch0phy7: switch0phy7@7 {
+ switch0phy7: ethernet-phy@7 {
reg = <0x7>;
};
- switch0phy8: switch0phy8@8 {
+ switch0phy8: ethernet-phy@8 {
reg = <0x8>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/cn9130-db-comexpress.dtsi b/sys/contrib/device-tree/src/arm64/marvell/cn9130-db-comexpress.dtsi
new file mode 100644
index 000000000000..028496ebc473
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/marvell/cn9130-db-comexpress.dtsi
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Marvell International Ltd.
+ *
+ * Device tree for the CN9130-DB Com Express CPU module board.
+ */
+
+#include "cn9130-db.dtsi"
+
+/ {
+ model = "Marvell Armada CN9130-DB COM EXPRESS type 7 CPU module board";
+ compatible = "marvell,cn9130-cpu-module", "marvell,cn9130",
+ "marvell,armada-ap807-quad", "marvell,armada-ap807";
+
+};
+
+&ap0_reg_sd_vccq {
+ regulator-max-microvolt = <1800000>;
+ states = <1800000 0x1 1800000 0x0>;
+ /delete-property/ gpios;
+};
+
+&cp0_reg_usb3_vbus0 {
+ /delete-property/ gpio;
+};
+
+&cp0_reg_usb3_vbus1 {
+ /delete-property/ gpio;
+};
+
+&cp0_reg_sd_vcc {
+ status = "disabled";
+};
+
+&cp0_reg_sd_vccq {
+ status = "disabled";
+};
+
+&cp0_sdhci0 {
+ status = "disabled";
+};
+
+&cp0_eth0 {
+ status = "disabled";
+};
+
+&cp0_eth1 {
+ status = "okay";
+ phy = <&phy0>;
+ phy-mode = "rgmii-id";
+};
+
+&cp0_eth2 {
+ status = "disabled";
+};
+
+&cp0_mdio {
+ status = "okay";
+ pinctrl-0 = <&cp0_ge_mdio_pins>;
+ phy0: ethernet-phy@0 {
+ status = "okay";
+ };
+};
+
+&cp0_syscon0 {
+ cp0_pinctrl: pinctrl {
+ compatible = "marvell,cp115-standalone-pinctrl";
+
+ cp0_ge_mdio_pins: ge-mdio-pins {
+ marvell,pins = "mpp40", "mpp41";
+ marvell,function = "ge";
+ };
+ };
+};
+
+&cp0_sdhci0 {
+ status = "disabled";
+};
+
+&cp0_spi1 {
+ status = "okay";
+};
+
+&cp0_usb3_0 {
+ status = "okay";
+ usb-phy = <&cp0_usb3_0_phy0>;
+ phy-names = "usb";
+ /delete-property/ phys;
+};
+
+&cp0_usb3_1 {
+ status = "okay";
+ usb-phy = <&cp0_usb3_0_phy1>;
+ phy-names = "usb";
+ /delete-property/ phys;
+};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/cn9130-db.dtsi b/sys/contrib/device-tree/src/arm64/marvell/cn9130-db.dtsi
index c7de1ea0d470..6eb6a175de38 100644
--- a/sys/contrib/device-tree/src/arm64/marvell/cn9130-db.dtsi
+++ b/sys/contrib/device-tree/src/arm64/marvell/cn9130-db.dtsi
@@ -307,7 +307,7 @@
&cp0_spi1 {
status = "disabled";
pinctrl-names = "default";
- pinctrl-0 = <&cp0_spi0_pins>;
+ pinctrl-0 = <&cp0_spi1_pins>;
reg = <0x700680 0x50>;
flash@0 {
@@ -371,7 +371,7 @@
"mpp59", "mpp60", "mpp61";
marvell,function = "sdio";
};
- cp0_spi0_pins: cp0-spi-pins-0 {
+ cp0_spi1_pins: cp0-spi-pins-1 {
marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
marvell,function = "spi1";
};
diff --git a/sys/contrib/device-tree/src/arm64/marvell/cn9131-db-comexpress.dtsi b/sys/contrib/device-tree/src/arm64/marvell/cn9131-db-comexpress.dtsi
new file mode 100644
index 000000000000..6f3914bcfd01
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/marvell/cn9131-db-comexpress.dtsi
@@ -0,0 +1,108 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Marvell International Ltd.
+ *
+ * Device tree for the CN9131-DB Com Express CPU module board.
+ */
+
+#include "cn9131-db.dtsi"
+
+/ {
+ model = "Marvell Armada CN9131-DB COM EXPRESS type 7 CPU module board";
+ compatible = "marvell,cn9131-cpu-module", "marvell,cn9131", "marvell,cn9130",
+ "marvell,armada-ap807-quad", "marvell,armada-ap807";
+
+};
+
+&ap0_reg_sd_vccq {
+ regulator-max-microvolt = <1800000>;
+ states = <1800000 0x1 1800000 0x0>;
+ /delete-property/ gpios;
+};
+
+&cp0_reg_usb3_vbus0 {
+ /delete-property/ gpio;
+};
+
+&cp0_reg_usb3_vbus1 {
+ /delete-property/ gpio;
+};
+
+&cp1_reg_usb3_vbus0 {
+ /delete-property/ gpio;
+};
+
+&cp0_reg_sd_vcc {
+ status = "disabled";
+};
+
+&cp0_reg_sd_vccq {
+ status = "disabled";
+};
+
+&cp0_sdhci0 {
+ status = "disabled";
+};
+
+&cp0_eth0 {
+ status = "disabled";
+};
+
+&cp0_eth1 {
+ status = "okay";
+ phy = <&phy0>;
+ phy-mode = "rgmii-id";
+};
+
+&cp0_eth2 {
+ status = "disabled";
+};
+
+&cp0_mdio {
+ status = "okay";
+ pinctrl-0 = <&cp0_ge_mdio_pins>;
+ phy0: ethernet-phy@0 {
+ status = "okay";
+ };
+};
+
+&cp0_syscon0 {
+ cp0_pinctrl: pinctrl {
+ compatible = "marvell,cp115-standalone-pinctrl";
+
+ cp0_ge_mdio_pins: ge-mdio-pins {
+ marvell,pins = "mpp40", "mpp41";
+ marvell,function = "ge";
+ };
+ };
+};
+
+&cp0_sdhci0 {
+ status = "disabled";
+};
+
+&cp0_spi1 {
+ status = "okay";
+};
+
+&cp0_usb3_0 {
+ status = "okay";
+ usb-phy = <&cp0_usb3_0_phy0>;
+ phy-names = "usb";
+ /delete-property/ phys;
+};
+
+&cp0_usb3_1 {
+ status = "okay";
+ usb-phy = <&cp0_usb3_0_phy1>;
+ phy-names = "usb";
+ /delete-property/ phys;
+};
+
+&cp1_usb3_1 {
+ status = "okay";
+ usb-phy = <&cp1_usb3_0_phy0>;
+ /* Generic PHY, providing serdes lanes */
+ phys = <&cp1_comphy3 1>;
+ phy-names = "usb";
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt6358.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt6358.dtsi
index b605313bed99..a1b96013f814 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt6358.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt6358.dtsi
@@ -8,8 +8,6 @@
pmic: pmic {
compatible = "mediatek,mt6358";
interrupt-controller;
- interrupt-parent = <&pio>;
- interrupts = <182 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <2>;
mt6358codec: mt6358codec {
@@ -128,7 +126,6 @@
};
mt6358_vrf12_reg: ldo_vrf12 {
- compatible = "regulator-fixed";
regulator-name = "vrf12";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
@@ -136,7 +133,6 @@
};
mt6358_vio18_reg: ldo_vio18 {
- compatible = "regulator-fixed";
regulator-name = "vio18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@@ -153,7 +149,6 @@
};
mt6358_vcamio_reg: ldo_vcamio {
- compatible = "regulator-fixed";
regulator-name = "vcamio";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@@ -168,7 +163,6 @@
};
mt6358_vcn18_reg: ldo_vcn18 {
- compatible = "regulator-fixed";
regulator-name = "vcn18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@@ -176,7 +170,6 @@
};
mt6358_vfe28_reg: ldo_vfe28 {
- compatible = "regulator-fixed";
regulator-name = "vfe28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -193,7 +186,6 @@
};
mt6358_vcn28_reg: ldo_vcn28 {
- compatible = "regulator-fixed";
regulator-name = "vcn28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -218,7 +210,6 @@
};
mt6358_vxo22_reg: ldo_vxo22 {
- compatible = "regulator-fixed";
regulator-name = "vxo22";
regulator-min-microvolt = <2200000>;
regulator-max-microvolt = <2200000>;
@@ -234,7 +225,6 @@
};
mt6358_vaux18_reg: ldo_vaux18 {
- compatible = "regulator-fixed";
regulator-name = "vaux18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@@ -249,7 +239,6 @@
};
mt6358_vbif28_reg: ldo_vbif28 {
- compatible = "regulator-fixed";
regulator-name = "vbif28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -280,7 +269,6 @@
};
mt6358_vio28_reg: ldo_vio28 {
- compatible = "regulator-fixed";
regulator-name = "vio28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
@@ -288,7 +276,6 @@
};
mt6358_va12_reg: ldo_va12 {
- compatible = "regulator-fixed";
regulator-name = "va12";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
@@ -297,22 +284,14 @@
};
mt6358_vrf18_reg: ldo_vrf18 {
- compatible = "regulator-fixed";
regulator-name = "vrf18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <120>;
};
- mt6358_vcn33_bt_reg: ldo_vcn33_bt {
- regulator-name = "vcn33_bt";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3500000>;
- regulator-enable-ramp-delay = <270>;
- };
-
- mt6358_vcn33_wifi_reg: ldo_vcn33_wifi {
- regulator-name = "vcn33_wifi";
+ mt6358_vcn33_reg: ldo_vcn33 {
+ regulator-name = "vcn33";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3500000>;
regulator-enable-ramp-delay = <270>;
@@ -340,7 +319,6 @@
};
mt6358_vaud28_reg: ldo_vaud28 {
- compatible = "regulator-fixed";
regulator-name = "vaud28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt6795-sony-xperia-m5.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt6795-sony-xperia-m5.dts
index b5746e6d0b15..7364c7278276 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt6795-sony-xperia-m5.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt6795-sony-xperia-m5.dts
@@ -22,6 +22,23 @@
serial1 = &uart1;
};
+ backlight_lcd0: backlight {
+ compatible = "led-backlight";
+ leds = <&disp_led_pwm>, <&pmic_bl_led>;
+
+ default-brightness-level = <300>;
+ };
+
+ led-controller-display {
+ compatible = "pwm-leds";
+
+ disp_led_pwm: led-0 {
+ label = "backlight-pwm";
+ pwms = <&pwm0 0 500000>;
+ max-brightness = <1024>;
+ };
+ };
+
memory@40000000 {
device_type = "memory";
reg = <0 0x40000000 0 0x1e800000>;
@@ -49,6 +66,65 @@
no-map;
};
};
+
+ vreg_disp_avdd: regulator-disp-avdd {
+ compatible = "regulator-fixed";
+ regulator-name = "disp_avdd";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 138 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vreg_disp_avee: regulator-disp-avee {
+ compatible = "regulator-fixed";
+ regulator-name = "disp_avee";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 139 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vreg_disp_vddh: regulator-disp-vddh {
+ compatible = "regulator-fixed";
+ regulator-name = "disp_vddh";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&dsi0 {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel: panel@0 {
+ compatible = "sharp,ls060t1sx01";
+ reg = <0>;
+ avdd-supply = <&vreg_disp_avdd>;
+ avee-supply = <&vreg_disp_avee>;
+ vddi-supply = <&mt6331_vgp3_reg>;
+ vddh-supply = <&vreg_disp_vddh>;
+ reset-gpios = <&pio 106 GPIO_ACTIVE_LOW>;
+ backlight = <&backlight_lcd0>;
+
+ pinctrl-0 = <&disp_rst_pins>;
+ pinctrl-names = "default";
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+ };
+
+ port {
+ dsi0_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
};
&fhctl {
@@ -163,7 +239,17 @@
status = "okay";
};
+&mt6331_vgp3_reg {
+ regulator-min-microvolt = <1800000>;
+};
+
&pio {
+ disp_rst_pins: lcm-pins {
+ pins-rst {
+ pinmux = <PINMUX_GPIO106__FUNC_GPIO106>;
+ };
+ };
+
mmc0_pins_default: emmc-sdr-pins {
pins-cmd-dat {
pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
@@ -338,6 +424,21 @@
* an interrupt on the companion, so we use the MT6332 IRQ GPIO.
*/
interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+
+ mt6332-led {
+ compatible = "mediatek,mt6332-led";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic_bl_led: led@0 {
+ reg = <0>;
+ label = "backlight-pmic";
+ };
+ };
+};
+
+&pwm0 {
+ status = "okay";
};
&uart0 {
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt6795.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt6795.dtsi
index 597bce2fed72..e5e269a660b1 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt6795.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt6795.dtsi
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2015 MediaTek Inc.
- * Author: Mars.C <mars.cheng@mediatek.com>
+ * Copyright (C) 2023 Collabora Ltd.
+ * Authors: Mars.C <mars.cheng@mediatek.com>
+ * AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
*/
#include <dt-bindings/interrupt-controller/irq.h>
@@ -19,6 +21,23 @@
#address-cells = <2>;
#size-cells = <2>;
+ aliases {
+ ovl0 = &ovl0;
+ ovl1 = &ovl1;
+ rdma0 = &rdma0;
+ rdma1 = &rdma1;
+ rdma2 = &rdma2;
+ wdma0 = &wdma0;
+ wdma1 = &wdma1;
+ color0 = &color0;
+ color1 = &color1;
+ split0 = &split0;
+ split1 = &split1;
+ dpi0 = &dpi0;
+ dsi0 = &dsi0;
+ dsi1 = &dsi1;
+ };
+
psci {
compatible = "arm,psci-0.2";
method = "smc";
@@ -434,6 +453,26 @@
#mbox-cells = <2>;
};
+ mipi_tx0: dsi-phy@10215000 {
+ compatible = "mediatek,mt8173-mipi-tx";
+ reg = <0 0x10215000 0 0x1000>;
+ clocks = <&clk26m>;
+ clock-output-names = "mipi_tx0_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ mipi_tx1: dsi-phy@10216000 {
+ compatible = "mediatek,mt8173-mipi-tx";
+ reg = <0 0x10216000 0 0x1000>;
+ clocks = <&clk26m>;
+ clock-output-names = "mipi_tx1_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
gic: interrupt-controller@10221000 {
compatible = "arm,gic-400";
#interrupt-cells = <3>;
@@ -690,6 +729,211 @@
mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
};
+ ovl0: ovl@1400c000 {
+ compatible = "mediatek,mt6795-disp-ovl", "mediatek,mt8173-disp-ovl";
+ reg = <0 0x1400c000 0 0x1000>;
+ interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_OVL0>;
+ iommus = <&iommu M4U_PORT_DISP_OVL0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xc000 0x1000>;
+ };
+
+ ovl1: ovl@1400d000 {
+ compatible = "mediatek,mt6795-disp-ovl", "mediatek,mt8173-disp-ovl";
+ reg = <0 0x1400d000 0 0x1000>;
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_OVL1>;
+ iommus = <&iommu M4U_PORT_DISP_OVL1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xd000 0x1000>;
+ };
+
+ rdma0: rdma@1400e000 {
+ compatible = "mediatek,mt6795-disp-rdma", "mediatek,mt8173-disp-rdma";
+ reg = <0 0x1400e000 0 0x1000>;
+ interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA0>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xe000 0x1000>;
+ };
+
+ rdma1: rdma@1400f000 {
+ compatible = "mediatek,mt6795-disp-rdma", "mediatek,mt8173-disp-rdma";
+ reg = <0 0x1400f000 0 0x1000>;
+ interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA1>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xf000 0x1000>;
+ };
+
+ rdma2: rdma@14010000 {
+ compatible = "mediatek,mt6795-disp-rdma", "mediatek,mt8173-disp-rdma";
+ reg = <0 0x14010000 0 0x1000>;
+ interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA2>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA2>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0 0x1000>;
+ };
+
+ wdma0: wdma@14011000 {
+ compatible = "mediatek,mt6795-disp-wdma", "mediatek,mt8173-disp-wdma";
+ reg = <0 0x14011000 0 0x1000>;
+ interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_WDMA0>;
+ iommus = <&iommu M4U_PORT_DISP_WDMA0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x1000 0x1000>;
+ };
+
+ wdma1: wdma@14012000 {
+ compatible = "mediatek,mt6795-disp-wdma", "mediatek,mt8173-disp-wdma";
+ reg = <0 0x14012000 0 0x1000>;
+ interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_WDMA1>;
+ iommus = <&iommu M4U_PORT_DISP_WDMA1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x2000 0x1000>;
+ };
+
+ color0: color@14013000 {
+ compatible = "mediatek,mt6795-disp-color", "mediatek,mt8173-disp-color";
+ reg = <0 0x14013000 0 0x1000>;
+ interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_COLOR0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x3000 0x1000>;
+ };
+
+ color1: color@14014000 {
+ compatible = "mediatek,mt6795-disp-color", "mediatek,mt8173-disp-color";
+ reg = <0 0x14014000 0 0x1000>;
+ interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_COLOR1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x4000 0x1000>;
+ };
+
+ aal@14015000 {
+ compatible = "mediatek,mt6795-disp-aal", "mediatek,mt8173-disp-aal";
+ reg = <0 0x14015000 0 0x1000>;
+ interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_AAL>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x5000 0x1000>;
+ };
+
+ gamma@14016000 {
+ compatible = "mediatek,mt6795-disp-gamma", "mediatek,mt8173-disp-gamma";
+ reg = <0 0x14016000 0 0x1000>;
+ interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_GAMMA>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x6000 0x1000>;
+ };
+
+ merge@14017000 {
+ compatible = "mediatek,mt6795-disp-merge", "mediatek,mt8173-disp-merge";
+ reg = <0 0x14017000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_MERGE>;
+ };
+
+ split0: split@14018000 {
+ compatible = "mediatek,mt6795-disp-split", "mediatek,mt8173-disp-split";
+ reg = <0 0x14018000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_SPLIT0>;
+ };
+
+ split1: split@14019000 {
+ compatible = "mediatek,mt6795-disp-split", "mediatek,mt8173-disp-split";
+ reg = <0 0x14019000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_SPLIT1>;
+ };
+
+ ufoe@1401a000 {
+ compatible = "mediatek,mt6795-disp-ufoe", "mediatek,mt8173-disp-ufoe";
+ reg = <0 0x1401a000 0 0x1000>;
+ interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_UFOE>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xa000 0x1000>;
+ };
+
+ dsi0: dsi@1401b000 {
+ compatible = "mediatek,mt6795-dsi", "mediatek,mt8173-dsi";
+ reg = <0 0x1401b000 0 0x1000>;
+ interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DSI0_ENGINE>,
+ <&mmsys CLK_MM_DSI0_DIGITAL>,
+ <&mipi_tx0>;
+ clock-names = "engine", "digital", "hs";
+ phys = <&mipi_tx0>;
+ phy-names = "dphy";
+ status = "disabled";
+ };
+
+ dsi1: dsi@1401c000 {
+ compatible = "mediatek,mt6795-dsi", "mediatek,mt8173-dsi";
+ reg = <0 0x1401c000 0 0x1000>;
+ interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DSI1_ENGINE>,
+ <&mmsys CLK_MM_DSI1_DIGITAL>,
+ <&mipi_tx1>;
+ clock-names = "engine", "digital", "hs";
+ phys = <&mipi_tx1>;
+ phy-names = "dphy";
+ status = "disabled";
+ };
+
+ dpi0: dpi@1401d000 {
+ compatible = "mediatek,mt6795-dpi", "mediatek,mt8183-dpi";
+ reg = <0 0x1401d000 0 0x1000>;
+ interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DPI_PIXEL>,
+ <&mmsys CLK_MM_DPI_ENGINE>,
+ <&apmixedsys CLK_APMIXED_TVDPLL>;
+ clock-names = "pixel", "engine", "pll";
+ status = "disabled";
+ };
+
+ pwm0: pwm@1401e000 {
+ compatible = "mediatek,mt6795-disp-pwm", "mediatek,mt8173-disp-pwm";
+ reg = <0 0x1401e000 0 0x1000>;
+ #pwm-cells = <2>;
+ clocks = <&mmsys CLK_MM_DISP_PWM026M>, <&mmsys CLK_MM_DISP_PWM0MM>;
+ clock-names = "main", "mm";
+ status = "disabled";
+ };
+
+ pwm1: pwm@1401f000 {
+ compatible = "mediatek,mt6795-disp-pwm", "mediatek,mt8173-disp-pwm";
+ reg = <0 0x1401f000 0 0x1000>;
+ #pwm-cells = <2>;
+ clocks = <&mmsys CLK_MM_DISP_PWM126M>, <&mmsys CLK_MM_DISP_PWM1MM>;
+ clock-names = "main", "mm";
+ status = "disabled";
+ };
+
+ mutex: mutex@14020000 {
+ compatible = "mediatek,mt8173-disp-mutex";
+ reg = <0 0x14020000 0 0x1000>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_MUTEX_32K>;
+ mediatek,gce-events = <CMDQ_EVENT_MUTEX0_STREAM_EOF>,
+ <CMDQ_EVENT_MUTEX1_STREAM_EOF>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1402XXXX 0 0x1000>;
+ };
+
larb0: larb@14021000 {
compatible = "mediatek,mt6795-smi-larb";
reg = <0 0x14021000 0 0x1000>;
@@ -708,6 +952,13 @@
clock-names = "apb", "smi";
};
+ od@14023000 {
+ compatible = "mediatek,mt6795-disp-od", "mediatek,mt8173-disp-od";
+ reg = <0 0x14023000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_OD>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1402XXXX 0x3000 0x1000>;
+ };
+
larb2: larb@15001000 {
compatible = "mediatek,mt6795-smi-larb";
reg = <0 0x15001000 0 0x1000>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt7622-bananapi-bpi-r64.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt7622-bananapi-bpi-r64.dts
index e4605d23fdc8..a1f42048dcc7 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -73,7 +73,7 @@
};
};
- memory {
+ memory@40000000 {
reg = <0 0x40000000 0 0x40000000>;
};
@@ -153,8 +153,7 @@
reg = <0>;
interrupt-controller;
#interrupt-cells = <1>;
- interrupt-parent = <&pio>;
- interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&pio 53 IRQ_TYPE_LEVEL_HIGH>;
reset-gpios = <&pio 54 0>;
ports {
@@ -385,9 +384,9 @@
i2s1_pins: i2s1-pins {
mux {
function = "i2s";
- groups = "i2s_out_mclk_bclk_ws",
- "i2s1_in_data",
- "i2s1_out_data";
+ groups = "i2s_out_mclk_bclk_ws",
+ "i2s1_in_data",
+ "i2s1_out_data";
};
conf {
@@ -585,11 +584,11 @@
};
&sata {
- status = "disable";
+ status = "disabled";
};
&sata_phy {
- status = "disable";
+ status = "disabled";
};
&spi0 {
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt7622-rfb1.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt7622-rfb1.dts
index dad8e683aac5..2dc1bdc74e21 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt7622-rfb1.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt7622-rfb1.dts
@@ -55,7 +55,7 @@
};
};
- memory {
+ memory@40000000 {
reg = <0 0x40000000 0 0x20000000>;
};
@@ -311,9 +311,9 @@
i2s1_pins: i2s1-pins {
mux {
function = "i2s";
- groups = "i2s_out_mclk_bclk_ws",
- "i2s1_in_data",
- "i2s1_out_data";
+ groups = "i2s_out_mclk_bclk_ws",
+ "i2s1_in_data",
+ "i2s1_out_data";
};
conf {
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt7622.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt7622.dtsi
index 36ef2dbe8add..3ee9266fa8e9 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt7622.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt7622.dtsi
@@ -905,7 +905,7 @@
status = "disabled";
};
- sata_phy: t-phy@1a243000 {
+ sata_phy: t-phy {
compatible = "mediatek,mt7622-tphy",
"mediatek,generic-tphy-v1";
#address-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt7986a-bananapi-bpi-r3.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt7986a-bananapi-bpi-r3.dts
index af4a4309bda4..d06d4af43cbf 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt7986a-bananapi-bpi-r3.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt7986a-bananapi-bpi-r3.dts
@@ -126,6 +126,7 @@
compatible = "sff,sfp";
i2c-bus = <&i2c_sfp1>;
los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>;
+ maximum-power-milliwatt = <3000>;
mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>;
tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
@@ -137,6 +138,7 @@
i2c-bus = <&i2c_sfp2>;
los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>;
+ maximum-power-milliwatt = <3000>;
tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>;
};
@@ -150,16 +152,16 @@
trip = <&cpu_trip_active_high>;
};
- cpu-active-low {
+ cpu-active-med {
/* active: set fan to cooling level 1 */
cooling-device = <&fan 1 1>;
- trip = <&cpu_trip_active_low>;
+ trip = <&cpu_trip_active_med>;
};
- cpu-passive {
- /* passive: set fan to cooling level 0 */
+ cpu-active-low {
+ /* active: set fan to cooling level 0 */
cooling-device = <&fan 0 0>;
- trip = <&cpu_trip_passive>;
+ trip = <&cpu_trip_active_low>;
};
};
};
@@ -203,8 +205,7 @@
reg = <31>;
interrupt-controller;
#interrupt-cells = <1>;
- interrupt-parent = <&pio>;
- interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&pio 66 IRQ_TYPE_LEVEL_HIGH>;
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt7986a.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt7986a.dtsi
index 68539ea788df..fc751e049953 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt7986a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt7986a.dtsi
@@ -374,6 +374,10 @@
reg = <0 0x11230000 0 0x1000>,
<0 0x11c20000 0 0x1000>;
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+ assigned-clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>,
+ <&topckgen CLK_TOP_EMMC_250M_SEL>;
+ assigned-clock-parents = <&apmixedsys CLK_APMIXED_MPLL>,
+ <&topckgen CLK_TOP_NET1PLL_D5_D2>;
clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>,
<&infracfg CLK_INFRA_MSDC_HCK_CK>,
<&infracfg CLK_INFRA_MSDC_CK>,
@@ -434,7 +438,7 @@
};
};
- pcie_phy: t-phy@11c00000 {
+ pcie_phy: t-phy {
compatible = "mediatek,mt7986-tphy",
"mediatek,generic-tphy-v2";
#address-cells = <2>;
@@ -610,22 +614,34 @@
thermal-sensors = <&thermal 0>;
trips {
+ cpu_trip_crit: crit {
+ temperature = <125000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+
+ cpu_trip_hot: hot {
+ temperature = <120000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
cpu_trip_active_high: active-high {
temperature = <115000>;
hysteresis = <2000>;
type = "active";
};
- cpu_trip_active_low: active-low {
+ cpu_trip_active_med: active-med {
temperature = <85000>;
hysteresis = <2000>;
type = "active";
};
- cpu_trip_passive: passive {
- temperature = <40000>;
+ cpu_trip_active_low: active-low {
+ temperature = <60000>;
hysteresis = <2000>;
- type = "passive";
+ type = "active";
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm-hana.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm-hana.dtsi
index bdcd35cecad9..90cbbc18a483 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm-hana.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm-hana.dtsi
@@ -13,8 +13,7 @@
touchscreen2: touchscreen@34 {
compatible = "melfas,mip4_ts";
reg = <0x34>;
- interrupt-parent = <&pio>;
- interrupts = <88 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
};
/*
@@ -26,8 +25,7 @@
compatible = "hid-over-i2c";
reg = <0x20>;
hid-descr-addr = <0x0020>;
- interrupt-parent = <&pio>;
- interrupts = <88 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -39,8 +37,7 @@
*/
trackpad2: trackpad@2c {
compatible = "hid-over-i2c";
- interrupt-parent = <&pio>;
- interrupts = <117 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
reg = <0x2c>;
hid-descr-addr = <0x0020>;
wakeup-source;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm.dtsi
index 111495622cac..8d614ac2c58e 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8173-elm.dtsi
@@ -245,8 +245,7 @@
reg = <0x1a>;
avdd-supply = <&mt6397_vgp1_reg>;
cpvdd-supply = <&mt6397_vcama_reg>;
- interrupt-parent = <&pio>;
- interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
+ interrupts-extended = <&pio 3 IRQ_TYPE_EDGE_BOTH>;
pinctrl-names = "default";
pinctrl-0 = <&rt5650_irq>;
#sound-dai-cells = <1>;
@@ -308,8 +307,7 @@
da9211: da9211@68 {
compatible = "dlg,da9211";
reg = <0x68>;
- interrupt-parent = <&pio>;
- interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 15 IRQ_TYPE_LEVEL_LOW>;
regulators {
da9211_vcpu_reg: BUCKA {
@@ -353,8 +351,7 @@
touchscreen: touchscreen@10 {
compatible = "elan,ekth3500";
reg = <0x10>;
- interrupt-parent = <&pio>;
- interrupts = <88 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -366,8 +363,7 @@
trackpad: trackpad@15 {
compatible = "elan,ekth3000";
- interrupt-parent = <&pio>;
- interrupts = <117 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
reg = <0x15>;
vcc-supply = <&mt6397_vgp6_reg>;
wakeup-source;
@@ -439,8 +435,7 @@
btmrvl: btmrvl@2 {
compatible = "marvell,sd8897-bt";
reg = <2>;
- interrupt-parent = <&pio>;
- interrupts = <119 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 119 IRQ_TYPE_LEVEL_LOW>;
marvell,wakeup-pin = /bits/ 16 <0x0d>;
marvell,wakeup-gap-ms = /bits/ 16 <0x64>;
};
@@ -448,8 +443,7 @@
mwifiex: mwifiex@1 {
compatible = "marvell,sd8897";
reg = <1>;
- interrupt-parent = <&pio>;
- interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 38 IRQ_TYPE_LEVEL_LOW>;
marvell,wakeup-pin = <3>;
};
};
@@ -933,8 +927,7 @@
compatible = "mediatek,mt6397";
#address-cells = <1>;
#size-cells = <1>;
- interrupt-parent = <&pio>;
- interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -1160,8 +1153,7 @@
compatible = "google,cros-ec-spi";
reg = <0x0>;
spi-max-frequency = <12000000>;
- interrupt-parent = <&pio>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 0 IRQ_TYPE_LEVEL_LOW>;
google,cros-ec-spi-msg-delay = <500>;
i2c_tunnel: i2c-tunnel0 {
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8173-evb.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8173-evb.dts
index 5122963d8743..0e5c628d1ec3 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8173-evb.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8173-evb.dts
@@ -44,7 +44,7 @@
id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>;
};
- usb_p1_vbus: regulator@0 {
+ usb_p1_vbus: regulator-usb-p1 {
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
@@ -53,7 +53,7 @@
enable-active-high;
};
- usb_p0_vbus: regulator@1 {
+ usb_p0_vbus: regulator-usb-p0 {
compatible = "regulator-fixed";
regulator-name = "vbus";
regulator-min-microvolt = <5000000>;
@@ -303,8 +303,7 @@
pmic: pmic {
compatible = "mediatek,mt6397";
- interrupt-parent = <&pio>;
- interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8173.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8173.dtsi
index c47d7d900f28..cac4cd0a0320 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8173.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8173.dtsi
@@ -1368,10 +1368,9 @@
#clock-cells = <1>;
};
- vcodec_dec: vcodec@16000000 {
+ vcodec_dec: vcodec@16020000 {
compatible = "mediatek,mt8173-vcodec-dec";
- reg = <0 0x16000000 0 0x100>, /* VDEC_SYS */
- <0 0x16020000 0 0x1000>, /* VDEC_MISC */
+ reg = <0 0x16020000 0 0x1000>, /* VDEC_MISC */
<0 0x16021000 0 0x800>, /* VDEC_LD */
<0 0x16021800 0 0x800>, /* VDEC_TOP */
<0 0x16022000 0 0x1000>, /* VDEC_CM */
@@ -1382,6 +1381,8 @@
<0 0x16027000 0 0x800>, /* VDEC_HWQ */
<0 0x16027800 0 0x800>, /* VDEC_HWB */
<0 0x16028400 0 0x400>; /* VDEC_HWG */
+ reg-names = "misc", "ld", "top", "cm", "ad", "av", "pp",
+ "hwd", "hwq", "hwb", "hwg";
interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
<&iommu M4U_PORT_HW_VDEC_PP_EXT>,
@@ -1392,6 +1393,7 @@
<&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
<&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
mediatek,vpu = <&vpu>;
+ mediatek,vdecsys = <&vdecsys>;
power-domains = <&spm MT8173_POWER_DOMAIN_VDEC>;
clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
<&topckgen CLK_TOP_UNIVPLL_D2>,
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-evb.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-evb.dts
index d8bd51807683..681deddffc2a 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-evb.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-evb.dts
@@ -31,14 +31,14 @@
#address-cells = <2>;
#size-cells = <2>;
ranges;
- scp_mem_reserved: scp_mem_region {
+ scp_mem_reserved: memory@50000000 {
compatible = "shared-dma-pool";
reg = <0 0x50000000 0 0x2900000>;
no-map;
};
};
- ntc@0 {
+ thermal-sensor {
compatible = "murata,ncp03wf104";
pullup-uv = <1800000>;
pullup-ohm = <390000>;
@@ -155,8 +155,8 @@
};
&pio {
- i2c_pins_0: i2c0{
- pins_i2c{
+ i2c_pins_0: i2c0 {
+ pins_i2c {
pinmux = <PINMUX_GPIO82__FUNC_SDA0>,
<PINMUX_GPIO83__FUNC_SCL0>;
mediatek,pull-up-adv = <3>;
@@ -164,8 +164,8 @@
};
};
- i2c_pins_1: i2c1{
- pins_i2c{
+ i2c_pins_1: i2c1 {
+ pins_i2c {
pinmux = <PINMUX_GPIO81__FUNC_SDA1>,
<PINMUX_GPIO84__FUNC_SCL1>;
mediatek,pull-up-adv = <3>;
@@ -173,8 +173,8 @@
};
};
- i2c_pins_2: i2c2{
- pins_i2c{
+ i2c_pins_2: i2c2 {
+ pins_i2c {
pinmux = <PINMUX_GPIO103__FUNC_SCL2>,
<PINMUX_GPIO104__FUNC_SDA2>;
mediatek,pull-up-adv = <3>;
@@ -182,8 +182,8 @@
};
};
- i2c_pins_3: i2c3{
- pins_i2c{
+ i2c_pins_3: i2c3 {
+ pins_i2c {
pinmux = <PINMUX_GPIO50__FUNC_SCL3>,
<PINMUX_GPIO51__FUNC_SDA3>;
mediatek,pull-up-adv = <3>;
@@ -191,8 +191,8 @@
};
};
- i2c_pins_4: i2c4{
- pins_i2c{
+ i2c_pins_4: i2c4 {
+ pins_i2c {
pinmux = <PINMUX_GPIO105__FUNC_SCL4>,
<PINMUX_GPIO106__FUNC_SDA4>;
mediatek,pull-up-adv = <3>;
@@ -200,8 +200,8 @@
};
};
- i2c_pins_5: i2c5{
- pins_i2c{
+ i2c_pins_5: i2c5 {
+ pins_i2c {
pinmux = <PINMUX_GPIO48__FUNC_SCL5>,
<PINMUX_GPIO49__FUNC_SDA5>;
mediatek,pull-up-adv = <3>;
@@ -209,8 +209,8 @@
};
};
- spi_pins_0: spi0{
- pins_spi{
+ spi_pins_0: spi0 {
+ pins_spi {
pinmux = <PINMUX_GPIO85__FUNC_SPI0_MI>,
<PINMUX_GPIO86__FUNC_SPI0_CSB>,
<PINMUX_GPIO87__FUNC_SPI0_MO>,
@@ -324,8 +324,8 @@
};
};
- spi_pins_1: spi1{
- pins_spi{
+ spi_pins_1: spi1 {
+ pins_spi {
pinmux = <PINMUX_GPIO161__FUNC_SPI1_A_MI>,
<PINMUX_GPIO162__FUNC_SPI1_A_CSB>,
<PINMUX_GPIO163__FUNC_SPI1_A_MO>,
@@ -334,8 +334,8 @@
};
};
- spi_pins_2: spi2{
- pins_spi{
+ spi_pins_2: spi2 {
+ pins_spi {
pinmux = <PINMUX_GPIO0__FUNC_SPI2_CSB>,
<PINMUX_GPIO1__FUNC_SPI2_MO>,
<PINMUX_GPIO2__FUNC_SPI2_CLK>,
@@ -344,8 +344,8 @@
};
};
- spi_pins_3: spi3{
- pins_spi{
+ spi_pins_3: spi3 {
+ pins_spi {
pinmux = <PINMUX_GPIO21__FUNC_SPI3_MI>,
<PINMUX_GPIO22__FUNC_SPI3_CSB>,
<PINMUX_GPIO23__FUNC_SPI3_MO>,
@@ -354,8 +354,8 @@
};
};
- spi_pins_4: spi4{
- pins_spi{
+ spi_pins_4: spi4 {
+ pins_spi {
pinmux = <PINMUX_GPIO17__FUNC_SPI4_MI>,
<PINMUX_GPIO18__FUNC_SPI4_CSB>,
<PINMUX_GPIO19__FUNC_SPI4_MO>,
@@ -364,8 +364,8 @@
};
};
- spi_pins_5: spi5{
- pins_spi{
+ spi_pins_5: spi5 {
+ pins_spi {
pinmux = <PINMUX_GPIO13__FUNC_SPI5_MI>,
<PINMUX_GPIO14__FUNC_SPI5_CSB>,
<PINMUX_GPIO15__FUNC_SPI5_MO>,
@@ -381,6 +381,10 @@
};
};
+&pmic {
+ interrupts-extended = <&pio 182 IRQ_TYPE_LEVEL_HIGH>;
+};
+
&mfg {
domain-supply = <&mt6358_vgpu_reg>;
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-da7219.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-da7219.dtsi
index 2c69e7658dba..8b57706ac814 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-da7219.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-da7219.dtsi
@@ -11,8 +11,7 @@
pinctrl-0 = <&da7219_pins>;
compatible = "dlg,da7219";
reg = <0x1a>;
- interrupt-parent = <&pio>;
- interrupts = <165 IRQ_TYPE_LEVEL_LOW 165 0>;
+ interrupts-extended = <&pio 165 IRQ_TYPE_LEVEL_LOW>;
dlg,micbias-lvl = <2600>;
dlg,mic-amp-in-sel = "diff";
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-ts3a227e.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-ts3a227e.dtsi
index 0799c48ade19..548e22c194a2 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-ts3a227e.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-audio-ts3a227e.dtsi
@@ -11,8 +11,7 @@
pinctrl-0 = <&ts3a227e_pins>;
compatible = "ti,ts3a227e";
reg = <0x3b>;
- interrupt-parent = <&pio>;
- interrupts = <157 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 157 IRQ_TYPE_LEVEL_LOW>;
status = "okay";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts
index 552bfc726999..0b45aee2e299 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts
@@ -18,8 +18,7 @@
compatible = "hid-over-i2c";
reg = <0x10>;
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&touchscreen_pins>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts
index 77b96ddf648e..b595622e7bee 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts
@@ -30,8 +30,7 @@
compatible = "hid-over-i2c";
reg = <0x10>;
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&touchscreen_pins>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts
index 37e6e58f63b7..5a1c39318a6c 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts
@@ -17,8 +17,7 @@
compatible = "hid-over-i2c";
reg = <0x10>;
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&touchscreen_pins>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts
index 0e09604004d5..3ea4fdb40118 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts
@@ -17,8 +17,7 @@
compatible = "hid-over-i2c";
reg = <0x10>;
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&touchscreen_pins>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku0.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku0.dts
new file mode 100644
index 000000000000..4eb2a0d571af
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku0.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-da7219-rt1015p.dtsi"
+
+/ {
+ model = "Google makomo sku0 board";
+ chassis-type = "laptop";
+ compatible = "google,makomo-sku0", "google,makomo", "mediatek,mt8183";
+};
+
+&qca_wifi {
+ qcom,ath10k-calibration-variant = "GO_FENNEL14";
+};
+
+&mmc1_pins_uhs {
+ pins-clk {
+ drive-strength = <MTK_DRIVE_6mA>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku1.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku1.dts
new file mode 100644
index 000000000000..6a733361e8ae
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-makomo-sku1.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi-fennel.dtsi"
+#include "mt8183-kukui-audio-ts3a227e-rt1015p.dtsi"
+
+/ {
+ model = "Google makomo sku1 board";
+ chassis-type = "laptop";
+ compatible = "google,makomo-sku1", "google,makomo", "mediatek,mt8183";
+};
+
+&qca_wifi {
+ qcom,ath10k-calibration-variant = "GO_FENNEL14";
+};
+
+&mmc1_pins_uhs {
+ pins-clk {
+ drive-strength = <MTK_DRIVE_6mA>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico.dts
new file mode 100644
index 000000000000..8ce9568fee95
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi.dtsi"
+#include "mt8183-kukui-audio-ts3a227e-max98357a.dtsi"
+
+/ {
+ model = "Google pico board";
+ chassis-type = "convertible";
+ compatible = "google,pico-sku1", "google,pico", "mediatek,mt8183";
+};
+
+&i2c_tunnel {
+ google,remote-bus = <0>;
+};
+
+&i2c2 {
+ i2c-scl-internal-delay-ns = <25000>;
+
+ trackpad@2c {
+ compatible = "hid-over-i2c";
+ reg = <0x2c>;
+ hid-descr-addr = <0x20>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&trackpad_pins>;
+
+ interrupts-extended = <&pio 7 IRQ_TYPE_LEVEL_LOW>;
+
+ wakeup-source;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico6.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico6.dts
new file mode 100644
index 000000000000..a2e74b829320
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi-pico6.dts
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-jacuzzi.dtsi"
+#include "mt8183-kukui-audio-ts3a227e-max98357a.dtsi"
+
+/ {
+ model = "Google pico6 board";
+ chassis-type = "convertible";
+ compatible = "google,pico-sku2", "google,pico", "mediatek,mt8183";
+
+ bt_wakeup: bt-wakeup {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_pins_wakeup>;
+
+ wobt {
+ label = "Wake on BT";
+ gpios = <&pio 42 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WAKEUP>;
+ wakeup-source;
+ };
+ };
+};
+
+&i2c_tunnel {
+ google,remote-bus = <0>;
+};
+
+&i2c2 {
+ i2c-scl-internal-delay-ns = <25000>;
+
+ trackpad@2c {
+ compatible = "hid-over-i2c";
+ reg = <0x2c>;
+ hid-descr-addr = <0x20>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&trackpad_pins>;
+
+ interrupts-extended = <&pio 7 IRQ_TYPE_LEVEL_LOW>;
+
+ wakeup-source;
+ };
+};
+
+&wifi_wakeup {
+ wowlan {
+ gpios = <&pio 113 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&wifi_pwrseq {
+ post-power-on-delay-ms = <50>;
+
+ /* Toggle WIFI_ENABLE to reset the chip. */
+ reset-gpios = <&pio 8 GPIO_ACTIVE_LOW>;
+};
+
+&wifi_pins_pwrseq {
+ pins-wifi-enable {
+ pinmux = <PINMUX_GPIO8__FUNC_GPIO8>;
+ };
+};
+
+&mmc1_pins_default {
+ pins-cmd-dat {
+ drive-strength = <MTK_DRIVE_6mA>;
+ };
+ pins-clk {
+ drive-strength = <MTK_DRIVE_6mA>;
+ };
+};
+
+&mmc1_pins_uhs {
+ pins-clk {
+ drive-strength = <MTK_DRIVE_6mA>;
+ };
+};
+
+&mmc1 {
+ bt_reset: bt-reset {
+ compatible = "mediatek,mt7921s-bluetooth";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_pins_reset>;
+ reset-gpios = <&pio 120 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pio {
+ bt_pins_wakeup: bt-pins-wakeup {
+ piins-bt-wakeup {
+ pinmux = <PINMUX_GPIO42__FUNC_GPIO42>;
+ input-enable;
+ };
+ };
+
+ bt_pins_reset: bt-pins-reset {
+ pins-bt-reset {
+ pinmux = <PINMUX_GPIO120__FUNC_GPIO120>;
+ output-high;
+ };
+ };
+};
+
+/delete-node/ &bluetooth;
+/delete-node/ &bt_pins;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi
index bf97b60ae4d1..7592e3b86037 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi
@@ -91,6 +91,8 @@
&dsi0 {
status = "okay";
+ /delete-property/#size-cells;
+ /delete-property/#address-cells;
/delete-node/panel@0;
ports {
port {
@@ -147,7 +149,6 @@
reg = <0x58>;
pinctrl-names = "default";
pinctrl-0 = <&anx7625_pins>;
- panel_flags = <1>;
enable-gpios = <&pio 45 GPIO_ACTIVE_HIGH>;
reset-gpios = <&pio 73 GPIO_ACTIVE_HIGH>;
vdd10-supply = <&pp1200_mipibrdg>;
@@ -441,20 +442,20 @@
};
touchscreen_pins: touchscreen-pins {
- touch_int_odl {
+ touch-int-odl {
pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
input-enable;
bias-pull-up;
};
- touch_rst_l {
+ touch-rst-l {
pinmux = <PINMUX_GPIO156__FUNC_GPIO156>;
output-high;
};
};
trackpad_pins: trackpad-pins {
- trackpad_int {
+ trackpad-int {
pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
input-enable;
bias-disable; /* pulled externally */
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu-sku22.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu-sku22.dts
index fcce8ea1232e..1ecf39458d93 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu-sku22.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu-sku22.dts
@@ -14,6 +14,24 @@
"google,kakadu", "mediatek,mt8183";
};
+&i2c0 {
+ touchscreen: touchscreen@10 {
+ compatible = "hid-over-i2c";
+ reg = <0x10>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&open_touch>;
+
+ interrupts-extended = <&pio 155 IRQ_TYPE_EDGE_FALLING>;
+
+ post-power-on-delay-ms = <10>;
+ hid-descr-addr = <0x0001>;
+ };
+};
+
+&panel {
+ compatible = "boe,tv105wum-nw0";
+};
+
&sound {
compatible = "mediatek,mt8183_mt6358_ts3a227_rt1015p";
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dts
index ebfabba72507..ba74109a4909 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dts
@@ -13,3 +13,21 @@
compatible = "google,kakadu-rev3", "google,kakadu-rev2",
"google,kakadu", "mediatek,mt8183";
};
+
+&i2c0 {
+ touchscreen: touchscreen@10 {
+ compatible = "hid-over-i2c";
+ reg = <0x10>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&open_touch>;
+
+ interrupts-extended = <&pio 155 IRQ_TYPE_EDGE_FALLING>;
+
+ post-power-on-delay-ms = <10>;
+ hid-descr-addr = <0x0001>;
+ };
+};
+
+&panel {
+ compatible = "boe,tv105wum-nw0";
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dtsi
index a11adeb29b1f..b6a9830af269 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kakadu.dtsi
@@ -63,19 +63,6 @@
&i2c0 {
status = "okay";
-
- touchscreen: touchscreen@10 {
- compatible = "hid-over-i2c";
- reg = <0x10>;
- pinctrl-names = "default";
- pinctrl-0 = <&open_touch>;
-
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_EDGE_FALLING>;
-
- post-power-on-delay-ms = <10>;
- hid-descr-addr = <0x0001>;
- };
};
&mt6358_vcama2_reg {
@@ -384,5 +371,5 @@
&panel {
status = "okay";
- compatible = "boe,tv105wum-nw0";
+ /* compatible will be set in board dts */
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku32.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku32.dts
new file mode 100644
index 000000000000..05361008e8ac
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku32.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-kakadu.dtsi"
+#include "mt8183-kukui-audio-da7219-rt1015p.dtsi"
+
+/ {
+ model = "Google katsu board";
+ chassis-type = "tablet";
+ compatible = "google,katsu-sku32", "google,katsu", "mediatek,mt8183";
+};
+
+&i2c0 {
+ touchscreen1: touchscreen@5d {
+ compatible = "goodix,gt7375p";
+ reg = <0x5d>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&open_touch>;
+
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
+
+ reset-gpios = <&pio 156 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&lcd_pp3300>;
+ };
+};
+
+&panel {
+ compatible = "starry,2081101qfh032011-53g";
+};
+
+&qca_wifi {
+ qcom,ath10k-calibration-variant = "GO_KATSU";
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku38.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku38.dts
new file mode 100644
index 000000000000..cf008ed82878
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-katsu-sku38.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-kakadu.dtsi"
+#include "mt8183-kukui-audio-rt1015p.dtsi"
+
+/ {
+ model = "Google katsu sku38 board";
+ chassis-type = "tablet";
+ compatible = "google,katsu-sku38", "google,katsu", "mediatek,mt8183";
+};
+
+&i2c0 {
+ touchscreen1: touchscreen@5d {
+ compatible = "goodix,gt7375p";
+ reg = <0x5d>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&open_touch>;
+
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
+
+ reset-gpios = <&pio 156 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&lcd_pp3300>;
+ };
+};
+
+&panel {
+ compatible = "starry,2081101qfh032011-53g";
+};
+
+&qca_wifi {
+ qcom,ath10k-calibration-variant = "GO_KATSU";
+};
+
+&sound {
+ compatible = "mediatek,mt8183_mt6358_ts3a227_rt1015p";
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kodama.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kodama.dtsi
index 4864c39e53a4..306c95166f3f 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kodama.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-kodama.dtsi
@@ -48,8 +48,7 @@
touchscreen: touchscreen@10 {
compatible = "hid-over-i2c";
reg = <0x10>;
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&touch_default>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-krane.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-krane.dtsi
index d5f41c6c9881..382e4c6d7191 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-krane.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui-krane.dtsi
@@ -54,8 +54,7 @@
pinctrl-names = "default";
pinctrl-0 = <&open_touch>;
- interrupt-parent = <&pio>;
- interrupts = <155 IRQ_TYPE_EDGE_FALLING>;
+ interrupts-extended = <&pio 155 IRQ_TYPE_EDGE_FALLING>;
post-power-on-delay-ms = <10>;
hid-descr-addr = <0x0001>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui.dtsi
index 6ce16a265e05..1b3396b1cee3 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-kukui.dtsi
@@ -103,12 +103,20 @@
regulator-max-microvolt = <3300000>;
};
+ /* system wide semi-regulated power rail from charger */
+ reg_vsys: regulator-vsys {
+ compatible = "regulator-fixed";
+ regulator-name = "vsys";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
reserved_memory: reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
- scp_mem_reserved: scp_mem_region {
+ scp_mem_reserved: memory@50000000 {
compatible = "shared-dma-pool";
reg = <0 0x50000000 0 0x2900000>;
no-map;
@@ -404,6 +412,26 @@
Avdd-supply = <&mt6358_vaud28_reg>;
};
+&mt6358regulator {
+ vsys-ldo1-supply = <&reg_vsys>;
+ vsys-ldo2-supply = <&reg_vsys>;
+ vsys-ldo3-supply = <&reg_vsys>;
+ vsys-vcore-supply = <&reg_vsys>;
+ vsys-vdram1-supply = <&reg_vsys>;
+ vsys-vgpu-supply = <&reg_vsys>;
+ vsys-vmodem-supply = <&reg_vsys>;
+ vsys-vpa-supply = <&reg_vsys>;
+ vsys-vproc11-supply = <&reg_vsys>;
+ vsys-vproc12-supply = <&reg_vsys>;
+ vsys-vs1-supply = <&reg_vsys>;
+ vsys-vs2-supply = <&reg_vsys>;
+ vs1-ldo1-supply = <&mt6358_vs1_reg>;
+ vs2-ldo1-supply = <&mt6358_vdram1_reg>;
+ vs2-ldo2-supply = <&mt6358_vs2_reg>;
+ vs2-ldo3-supply = <&mt6358_vs2_reg>;
+ vs2-ldo4-supply = <&mt6358_vs2_reg>;
+};
+
&mt6358_vgpu_reg {
regulator-min-microvolt = <625000>;
regulator-max-microvolt = <900000>;
@@ -432,7 +460,7 @@
&pio {
aud_pins_default: audiopins {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO97__FUNC_I2S2_MCK>,
<PINMUX_GPIO98__FUNC_I2S2_BCK>,
<PINMUX_GPIO101__FUNC_I2S2_LRCK>,
@@ -454,7 +482,7 @@
};
aud_pins_tdm_out_on: audiotdmouton {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO169__FUNC_TDM_BCK_2ND>,
<PINMUX_GPIO170__FUNC_TDM_LRCK_2ND>,
<PINMUX_GPIO171__FUNC_TDM_DATA0_2ND>,
@@ -466,7 +494,7 @@
};
aud_pins_tdm_out_off: audiotdmoutoff {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO169__FUNC_GPIO169>,
<PINMUX_GPIO170__FUNC_GPIO170>,
<PINMUX_GPIO171__FUNC_GPIO171>,
@@ -480,13 +508,13 @@
};
bt_pins: bt-pins {
- pins_bt_en {
+ pins-bt-en {
pinmux = <PINMUX_GPIO120__FUNC_GPIO120>;
output-low;
};
};
- ec_ap_int_odl: ec_ap_int_odl {
+ ec_ap_int_odl: ec-ap-int-odl {
pins1 {
pinmux = <PINMUX_GPIO151__FUNC_GPIO151>;
input-enable;
@@ -494,7 +522,7 @@
};
};
- h1_int_od_l: h1_int_od_l {
+ h1_int_od_l: h1-int-od-l {
pins1 {
pinmux = <PINMUX_GPIO153__FUNC_GPIO153>;
input-enable;
@@ -502,7 +530,7 @@
};
i2c0_pins: i2c0 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO82__FUNC_SDA0>,
<PINMUX_GPIO83__FUNC_SCL0>;
mediatek,pull-up-adv = <3>;
@@ -511,7 +539,7 @@
};
i2c1_pins: i2c1 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO81__FUNC_SDA1>,
<PINMUX_GPIO84__FUNC_SCL1>;
mediatek,pull-up-adv = <3>;
@@ -520,7 +548,7 @@
};
i2c2_pins: i2c2 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO103__FUNC_SCL2>,
<PINMUX_GPIO104__FUNC_SDA2>;
bias-disable;
@@ -529,7 +557,7 @@
};
i2c3_pins: i2c3 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO50__FUNC_SCL3>,
<PINMUX_GPIO51__FUNC_SDA3>;
mediatek,pull-up-adv = <3>;
@@ -538,7 +566,7 @@
};
i2c4_pins: i2c4 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO105__FUNC_SCL4>,
<PINMUX_GPIO106__FUNC_SDA4>;
bias-disable;
@@ -547,7 +575,7 @@
};
i2c5_pins: i2c5 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO48__FUNC_SCL5>,
<PINMUX_GPIO49__FUNC_SDA5>;
mediatek,pull-up-adv = <3>;
@@ -556,7 +584,7 @@
};
i2c6_pins: i2c6 {
- pins_bus {
+ pins-bus {
pinmux = <PINMUX_GPIO11__FUNC_SCL6>,
<PINMUX_GPIO12__FUNC_SDA6>;
bias-disable;
@@ -564,7 +592,7 @@
};
mmc0_pins_default: mmc0-pins-default {
- pins_cmd_dat {
+ pins-cmd-dat {
pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,
<PINMUX_GPIO128__FUNC_MSDC0_DAT1>,
<PINMUX_GPIO125__FUNC_MSDC0_DAT2>,
@@ -579,13 +607,13 @@
mediatek,pull-up-adv = <01>;
};
- pins_clk {
+ pins-clk {
pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
drive-strength = <MTK_DRIVE_14mA>;
mediatek,pull-down-adv = <10>;
};
- pins_rst {
+ pins-rst {
pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
drive-strength = <MTK_DRIVE_14mA>;
mediatek,pull-down-adv = <01>;
@@ -593,7 +621,7 @@
};
mmc0_pins_uhs: mmc0-pins-uhs {
- pins_cmd_dat {
+ pins-cmd-dat {
pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,
<PINMUX_GPIO128__FUNC_MSDC0_DAT1>,
<PINMUX_GPIO125__FUNC_MSDC0_DAT2>,
@@ -608,19 +636,19 @@
mediatek,pull-up-adv = <01>;
};
- pins_clk {
+ pins-clk {
pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
drive-strength = <MTK_DRIVE_14mA>;
mediatek,pull-down-adv = <10>;
};
- pins_ds {
+ pins-ds {
pinmux = <PINMUX_GPIO131__FUNC_MSDC0_DSL>;
drive-strength = <MTK_DRIVE_14mA>;
mediatek,pull-down-adv = <10>;
};
- pins_rst {
+ pins-rst {
pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
drive-strength = <MTK_DRIVE_14mA>;
mediatek,pull-up-adv = <01>;
@@ -628,7 +656,7 @@
};
mmc1_pins_default: mmc1-pins-default {
- pins_cmd_dat {
+ pins-cmd-dat {
pinmux = <PINMUX_GPIO31__FUNC_MSDC1_CMD>,
<PINMUX_GPIO32__FUNC_MSDC1_DAT0>,
<PINMUX_GPIO34__FUNC_MSDC1_DAT1>,
@@ -638,7 +666,7 @@
mediatek,pull-up-adv = <10>;
};
- pins_clk {
+ pins-clk {
pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
input-enable;
mediatek,pull-down-adv = <10>;
@@ -646,7 +674,7 @@
};
mmc1_pins_uhs: mmc1-pins-uhs {
- pins_cmd_dat {
+ pins-cmd-dat {
pinmux = <PINMUX_GPIO31__FUNC_MSDC1_CMD>,
<PINMUX_GPIO32__FUNC_MSDC1_DAT0>,
<PINMUX_GPIO34__FUNC_MSDC1_DAT1>,
@@ -657,7 +685,7 @@
mediatek,pull-up-adv = <10>;
};
- pins_clk {
+ pins-clk {
pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
drive-strength = <MTK_DRIVE_8mA>;
mediatek,pull-down-adv = <10>;
@@ -665,15 +693,15 @@
};
};
- panel_pins_default: panel_pins_default {
- panel_reset {
+ panel_pins_default: panel-pins-default {
+ panel-reset {
pinmux = <PINMUX_GPIO45__FUNC_GPIO45>;
output-low;
bias-pull-up;
};
};
- pwm0_pin_default: pwm0_pin_default {
+ pwm0_pin_default: pwm0-pin-default {
pins1 {
pinmux = <PINMUX_GPIO176__FUNC_GPIO176>;
output-high;
@@ -685,14 +713,14 @@
};
scp_pins: scp {
- pins_scp_uart {
+ pins-scp-uart {
pinmux = <PINMUX_GPIO110__FUNC_TP_URXD1_AO>,
<PINMUX_GPIO112__FUNC_TP_UTXD1_AO>;
};
};
spi0_pins: spi0 {
- pins_spi{
+ pins-spi {
pinmux = <PINMUX_GPIO85__FUNC_SPI0_MI>,
<PINMUX_GPIO86__FUNC_GPIO86>,
<PINMUX_GPIO87__FUNC_SPI0_MO>,
@@ -702,7 +730,7 @@
};
spi1_pins: spi1 {
- pins_spi{
+ pins-spi {
pinmux = <PINMUX_GPIO161__FUNC_SPI1_A_MI>,
<PINMUX_GPIO162__FUNC_SPI1_A_CSB>,
<PINMUX_GPIO163__FUNC_SPI1_A_MO>,
@@ -712,20 +740,20 @@
};
spi2_pins: spi2 {
- pins_spi{
+ pins-spi {
pinmux = <PINMUX_GPIO0__FUNC_SPI2_CSB>,
<PINMUX_GPIO1__FUNC_SPI2_MO>,
<PINMUX_GPIO2__FUNC_SPI2_CLK>;
bias-disable;
};
- pins_spi_mi {
+ pins-spi-mi {
pinmux = <PINMUX_GPIO94__FUNC_SPI2_MI>;
mediatek,pull-down-adv = <00>;
};
};
spi3_pins: spi3 {
- pins_spi{
+ pins-spi {
pinmux = <PINMUX_GPIO21__FUNC_SPI3_MI>,
<PINMUX_GPIO22__FUNC_SPI3_CSB>,
<PINMUX_GPIO23__FUNC_SPI3_MO>,
@@ -735,7 +763,7 @@
};
spi4_pins: spi4 {
- pins_spi{
+ pins-spi {
pinmux = <PINMUX_GPIO17__FUNC_SPI4_MI>,
<PINMUX_GPIO18__FUNC_SPI4_CSB>,
<PINMUX_GPIO19__FUNC_SPI4_MO>,
@@ -745,7 +773,7 @@
};
spi5_pins: spi5 {
- pins_spi{
+ pins-spi {
pinmux = <PINMUX_GPIO13__FUNC_SPI5_MI>,
<PINMUX_GPIO14__FUNC_SPI5_CSB>,
<PINMUX_GPIO15__FUNC_SPI5_MO>,
@@ -755,69 +783,73 @@
};
uart0_pins_default: uart0-pins-default {
- pins_rx {
+ pins-rx {
pinmux = <PINMUX_GPIO95__FUNC_URXD0>;
input-enable;
bias-pull-up;
};
- pins_tx {
+ pins-tx {
pinmux = <PINMUX_GPIO96__FUNC_UTXD0>;
};
};
uart1_pins_default: uart1-pins-default {
- pins_rx {
+ pins-rx {
pinmux = <PINMUX_GPIO121__FUNC_URXD1>;
input-enable;
bias-pull-up;
};
- pins_tx {
+ pins-tx {
pinmux = <PINMUX_GPIO115__FUNC_UTXD1>;
};
- pins_rts {
+ pins-rts {
pinmux = <PINMUX_GPIO47__FUNC_URTS1>;
output-enable;
};
- pins_cts {
+ pins-cts {
pinmux = <PINMUX_GPIO46__FUNC_UCTS1>;
input-enable;
};
};
uart1_pins_sleep: uart1-pins-sleep {
- pins_rx {
+ pins-rx {
pinmux = <PINMUX_GPIO121__FUNC_GPIO121>;
input-enable;
bias-pull-up;
};
- pins_tx {
+ pins-tx {
pinmux = <PINMUX_GPIO115__FUNC_UTXD1>;
};
- pins_rts {
+ pins-rts {
pinmux = <PINMUX_GPIO47__FUNC_URTS1>;
output-enable;
};
- pins_cts {
+ pins-cts {
pinmux = <PINMUX_GPIO46__FUNC_UCTS1>;
input-enable;
};
};
wifi_pins_pwrseq: wifi-pins-pwrseq {
- pins_wifi_enable {
+ pins-wifi-enable {
pinmux = <PINMUX_GPIO119__FUNC_GPIO119>;
output-low;
};
};
wifi_pins_wakeup: wifi-pins-wakeup {
- pins_wifi_wakeup {
+ pins-wifi-wakeup {
pinmux = <PINMUX_GPIO113__FUNC_GPIO113>;
input-enable;
};
};
};
+&pmic {
+ interrupts-extended = <&pio 182 IRQ_TYPE_LEVEL_HIGH>;
+};
+
&pwm0 {
status = "okay";
pinctrl-names = "default";
@@ -831,7 +863,7 @@
pinctrl-names = "default";
pinctrl-0 = <&scp_pins>;
- cros_ec {
+ cros-ec-rpmsg {
compatible = "google,cros-ec-rpmsg";
mediatek,rpmsg-name = "cros-ec-rpmsg";
};
@@ -856,14 +888,13 @@
status = "okay";
cs-gpios = <&pio 86 GPIO_ACTIVE_LOW>;
- cr50@0 {
+ tpm@0 {
compatible = "google,cr50";
reg = <0>;
spi-max-frequency = <1000000>;
pinctrl-names = "default";
pinctrl-0 = <&h1_int_od_l>;
- interrupt-parent = <&pio>;
- interrupts = <153 IRQ_TYPE_EDGE_RISING>;
+ interrupts-extended = <&pio 153 IRQ_TYPE_EDGE_RISING>;
};
};
@@ -890,8 +921,7 @@
compatible = "google,cros-ec-spi";
reg = <0>;
spi-max-frequency = <3000000>;
- interrupt-parent = <&pio>;
- interrupts = <151 IRQ_TYPE_LEVEL_LOW>;
+ interrupts-extended = <&pio 151 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&ec_ap_int_odl>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-pumpkin.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-pumpkin.dts
index 526bcae7a3f8..76449b4cf236 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183-pumpkin.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183-pumpkin.dts
@@ -193,7 +193,7 @@
&pio {
i2c_pins_0: i2c0 {
- pins_i2c{
+ pins_i2c {
pinmux = <PINMUX_GPIO82__FUNC_SDA0>,
<PINMUX_GPIO83__FUNC_SCL0>;
mediatek,pull-up-adv = <3>;
@@ -202,7 +202,7 @@
};
i2c_pins_1: i2c1 {
- pins_i2c{
+ pins_i2c {
pinmux = <PINMUX_GPIO81__FUNC_SDA1>,
<PINMUX_GPIO84__FUNC_SCL1>;
mediatek,pull-up-adv = <3>;
@@ -211,7 +211,7 @@
};
i2c_pins_2: i2c2 {
- pins_i2c{
+ pins_i2c {
pinmux = <PINMUX_GPIO103__FUNC_SCL2>,
<PINMUX_GPIO104__FUNC_SDA2>;
mediatek,pull-up-adv = <3>;
@@ -220,7 +220,7 @@
};
i2c_pins_3: i2c3 {
- pins_i2c{
+ pins_i2c {
pinmux = <PINMUX_GPIO50__FUNC_SCL3>,
<PINMUX_GPIO51__FUNC_SDA3>;
mediatek,pull-up-adv = <3>;
@@ -229,7 +229,7 @@
};
i2c_pins_4: i2c4 {
- pins_i2c{
+ pins_i2c {
pinmux = <PINMUX_GPIO105__FUNC_SCL4>,
<PINMUX_GPIO106__FUNC_SDA4>;
mediatek,pull-up-adv = <3>;
@@ -238,7 +238,7 @@
};
i2c_pins_5: i2c5 {
- pins_i2c{
+ pins_i2c {
pinmux = <PINMUX_GPIO48__FUNC_SCL5>,
<PINMUX_GPIO49__FUNC_SDA5>;
mediatek,pull-up-adv = <3>;
@@ -370,6 +370,10 @@
};
};
+&pmic {
+ interrupts-extended = <&pio 182 IRQ_TYPE_LEVEL_HIGH>;
+};
+
&mfg {
domain-supply = <&mt6358_vgpu_reg>;
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8183.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8183.dtsi
index 5169779d01df..920ee415ef5f 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8183.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8183.dtsi
@@ -1183,22 +1183,10 @@
status = "disabled";
};
- svs: svs@1100b000 {
- compatible = "mediatek,mt8183-svs";
- reg = <0 0x1100b000 0 0x1000>;
- interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&infracfg CLK_INFRA_THERM>;
- clock-names = "main";
- nvmem-cells = <&svs_calibration>,
- <&thermal_calibration>;
- nvmem-cell-names = "svs-calibration-data",
- "t-calibration-data";
- };
-
thermal: thermal@1100b000 {
#thermal-sensor-cells = <1>;
compatible = "mediatek,mt8183-thermal";
- reg = <0 0x1100b000 0 0x1000>;
+ reg = <0 0x1100b000 0 0xc00>;
clocks = <&infracfg CLK_INFRA_THERM>,
<&infracfg CLK_INFRA_AUXADC>;
clock-names = "therm", "auxadc";
@@ -1210,125 +1198,16 @@
nvmem-cell-names = "calibration-data";
};
- thermal_zones: thermal-zones {
- cpu_thermal: cpu-thermal {
- polling-delay-passive = <100>;
- polling-delay = <500>;
- thermal-sensors = <&thermal 0>;
- sustainable-power = <5000>;
-
- trips {
- threshold: trip-point0 {
- temperature = <68000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- target: trip-point1 {
- temperature = <80000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- cpu_crit: cpu-crit {
- temperature = <115000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&target>;
- cooling-device = <&cpu0
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>,
- <&cpu1
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>,
- <&cpu2
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>,
- <&cpu3
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>;
- contribution = <3072>;
- };
- map1 {
- trip = <&target>;
- cooling-device = <&cpu4
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>,
- <&cpu5
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>,
- <&cpu6
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>,
- <&cpu7
- THERMAL_NO_LIMIT
- THERMAL_NO_LIMIT>;
- contribution = <1024>;
- };
- };
- };
-
- /* The tzts1 ~ tzts6 don't need to polling */
- /* The tzts1 ~ tzts6 don't need to thermal throttle */
-
- tzts1: tzts1 {
- polling-delay-passive = <0>;
- polling-delay = <0>;
- thermal-sensors = <&thermal 1>;
- sustainable-power = <5000>;
- trips {};
- cooling-maps {};
- };
-
- tzts2: tzts2 {
- polling-delay-passive = <0>;
- polling-delay = <0>;
- thermal-sensors = <&thermal 2>;
- sustainable-power = <5000>;
- trips {};
- cooling-maps {};
- };
-
- tzts3: tzts3 {
- polling-delay-passive = <0>;
- polling-delay = <0>;
- thermal-sensors = <&thermal 3>;
- sustainable-power = <5000>;
- trips {};
- cooling-maps {};
- };
-
- tzts4: tzts4 {
- polling-delay-passive = <0>;
- polling-delay = <0>;
- thermal-sensors = <&thermal 4>;
- sustainable-power = <5000>;
- trips {};
- cooling-maps {};
- };
-
- tzts5: tzts5 {
- polling-delay-passive = <0>;
- polling-delay = <0>;
- thermal-sensors = <&thermal 5>;
- sustainable-power = <5000>;
- trips {};
- cooling-maps {};
- };
-
- tztsABB: tztsABB {
- polling-delay-passive = <0>;
- polling-delay = <0>;
- thermal-sensors = <&thermal 6>;
- sustainable-power = <5000>;
- trips {};
- cooling-maps {};
- };
+ svs: svs@1100bc00 {
+ compatible = "mediatek,mt8183-svs";
+ reg = <0 0x1100bc00 0 0x400>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&infracfg CLK_INFRA_THERM>;
+ clock-names = "main";
+ nvmem-cells = <&svs_calibration>,
+ <&thermal_calibration>;
+ nvmem-cell-names = "svs-calibration-data",
+ "t-calibration-data";
};
pwm0: pwm@1100e000 {
@@ -1781,7 +1660,7 @@
mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
};
- mdp3-rdma0@14001000 {
+ dma-controller0@14001000 {
compatible = "mediatek,mt8183-mdp3-rdma";
reg = <0 0x14001000 0 0x1000>;
mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>;
@@ -1793,6 +1672,7 @@
iommus = <&iommu M4U_PORT_MDP_RDMA0>;
mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST 0>,
<&gce 21 CMDQ_THR_PRIO_LOWEST 0>;
+ #dma-cells = <1>;
};
mdp3-rsz0@14003000 {
@@ -1813,7 +1693,7 @@
clocks = <&mmsys CLK_MM_MDP_RSZ1>;
};
- mdp3-wrot0@14005000 {
+ dma-controller@14005000 {
compatible = "mediatek,mt8183-mdp3-wrot";
reg = <0 0x14005000 0 0x1000>;
mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x5000 0x1000>;
@@ -1822,6 +1702,7 @@
power-domains = <&spm MT8183_POWER_DOMAIN_DISP>;
clocks = <&mmsys CLK_MM_MDP_WROT0>;
iommus = <&iommu M4U_PORT_MDP_WROT0>;
+ #dma-cells = <1>;
};
mdp3-wdma@14006000 {
@@ -2019,6 +1900,36 @@
#clock-cells = <1>;
};
+ vcodec_dec: video-codec@16020000 {
+ compatible = "mediatek,mt8183-vcodec-dec";
+ reg = <0 0x16020000 0 0x1000>, /* VDEC_MISC */
+ <0 0x16021000 0 0x800>, /* VDEC_VLD */
+ <0 0x16021800 0 0x800>, /* VDEC_TOP */
+ <0 0x16022000 0 0x1000>, /* VDEC_MC */
+ <0 0x16023000 0 0x1000>, /* VDEC_AVCVLD */
+ <0 0x16024000 0 0x1000>, /* VDEC_AVCMV */
+ <0 0x16025000 0 0x1000>, /* VDEC_PP */
+ <0 0x16026800 0 0x800>, /* VP8_VD */
+ <0 0x16027000 0 0x800>, /* VP6_VD */
+ <0 0x16027800 0 0x800>, /* VP8_VL */
+ <0 0x16028400 0 0x400>; /* VP9_VD */
+ reg-names = "misc", "ld", "top", "cm", "ad", "av", "pp",
+ "hwd", "hwq", "hwb", "hwg";
+ interrupts = <GIC_SPI 250 IRQ_TYPE_LEVEL_LOW>;
+ iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
+ <&iommu M4U_PORT_HW_VDEC_PPWRAP_EXT>;
+ mediatek,scp = <&scp>;
+ mediatek,vdecsys = <&vdecsys>;
+ power-domains = <&spm MT8183_POWER_DOMAIN_VDEC>;
+ clocks = <&vdecsys CLK_VDEC_VDEC>;
+ clock-names = "vdec";
+ };
+
larb1: larb@16010000 {
compatible = "mediatek,mt8183-smi-larb";
reg = <0 0x16010000 0 0x1000>;
@@ -2105,4 +2016,125 @@
power-domains = <&spm MT8183_POWER_DOMAIN_CAM>;
};
};
+
+ thermal_zones: thermal-zones {
+ cpu_thermal: cpu-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <500>;
+ thermal-sensors = <&thermal 0>;
+ sustainable-power = <5000>;
+
+ trips {
+ threshold: trip-point0 {
+ temperature = <68000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ target: trip-point1 {
+ temperature = <80000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu_crit: cpu-crit {
+ temperature = <115000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&target>;
+ cooling-device = <&cpu0
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>,
+ <&cpu1
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>,
+ <&cpu2
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>,
+ <&cpu3
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>;
+ contribution = <3072>;
+ };
+ map1 {
+ trip = <&target>;
+ cooling-device = <&cpu4
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>,
+ <&cpu5
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>,
+ <&cpu6
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>,
+ <&cpu7
+ THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>;
+ contribution = <1024>;
+ };
+ };
+ };
+
+ /* The tzts1 ~ tzts6 don't need to polling */
+ /* The tzts1 ~ tzts6 don't need to thermal throttle */
+
+ tzts1: tzts1 {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&thermal 1>;
+ sustainable-power = <5000>;
+ trips {};
+ cooling-maps {};
+ };
+
+ tzts2: tzts2 {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&thermal 2>;
+ sustainable-power = <5000>;
+ trips {};
+ cooling-maps {};
+ };
+
+ tzts3: tzts3 {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&thermal 3>;
+ sustainable-power = <5000>;
+ trips {};
+ cooling-maps {};
+ };
+
+ tzts4: tzts4 {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&thermal 4>;
+ sustainable-power = <5000>;
+ trips {};
+ cooling-maps {};
+ };
+
+ tzts5: tzts5 {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&thermal 5>;
+ sustainable-power = <5000>;
+ trips {};
+ cooling-maps {};
+ };
+
+ tztsABB: tztsABB {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&thermal 6>;
+ sustainable-power = <5000>;
+ trips {};
+ cooling-maps {};
+ };
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8186.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8186.dtsi
index f04ae70c470a..2fec6fd1c1a7 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8186.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8186.dtsi
@@ -22,7 +22,7 @@
aliases {
ovl0 = &ovl0;
- ovl_2l0 = &ovl_2l0;
+ ovl-2l0 = &ovl_2l0;
rdma0 = &rdma0;
rdma1 = &rdma1;
};
@@ -924,7 +924,8 @@
reg = <MT8186_POWER_DOMAIN_CSIRX_TOP>;
clocks = <&topckgen CLK_TOP_SENINF>,
<&topckgen CLK_TOP_SENINF1>;
- clock-names = "csirx_top0", "csirx_top1";
+ clock-names = "subsys-csirx-top0",
+ "subsys-csirx-top1";
#power-domain-cells = <0>;
};
@@ -942,7 +943,8 @@
reg = <MT8186_POWER_DOMAIN_ADSP_AO>;
clocks = <&topckgen CLK_TOP_AUDIODSP>,
<&topckgen CLK_TOP_ADSP_BUS>;
- clock-names = "audioadsp", "adsp_bus";
+ clock-names = "audioadsp",
+ "subsys-adsp-bus";
#address-cells = <1>;
#size-cells = <0>;
#power-domain-cells = <1>;
@@ -975,8 +977,11 @@
<&mmsys CLK_MM_SMI_COMMON>,
<&mmsys CLK_MM_SMI_GALS>,
<&mmsys CLK_MM_SMI_IOMMU>;
- clock-names = "disp", "mdp", "smi_infra", "smi_common",
- "smi_gals", "smi_iommu";
+ clock-names = "disp", "mdp",
+ "subsys-smi-infra",
+ "subsys-smi-common",
+ "subsys-smi-gals",
+ "subsys-smi-iommu";
mediatek,infracfg = <&infracfg_ao>;
#address-cells = <1>;
#size-cells = <0>;
@@ -993,15 +998,17 @@
power-domain@MT8186_POWER_DOMAIN_CAM {
reg = <MT8186_POWER_DOMAIN_CAM>;
- clocks = <&topckgen CLK_TOP_CAM>,
- <&topckgen CLK_TOP_SENINF>,
+ clocks = <&topckgen CLK_TOP_SENINF>,
<&topckgen CLK_TOP_SENINF1>,
<&topckgen CLK_TOP_SENINF2>,
<&topckgen CLK_TOP_SENINF3>,
+ <&camsys CLK_CAM2MM_GALS>,
<&topckgen CLK_TOP_CAMTM>,
- <&camsys CLK_CAM2MM_GALS>;
- clock-names = "cam-top", "cam0", "cam1", "cam2",
- "cam3", "cam-tm", "gals";
+ <&topckgen CLK_TOP_CAM>;
+ clock-names = "cam0", "cam1", "cam2",
+ "cam3", "gals",
+ "subsys-cam-tm",
+ "subsys-cam-top";
mediatek,infracfg = <&infracfg_ao>;
#address-cells = <1>;
#size-cells = <0>;
@@ -1020,9 +1027,9 @@
power-domain@MT8186_POWER_DOMAIN_IMG {
reg = <MT8186_POWER_DOMAIN_IMG>;
- clocks = <&topckgen CLK_TOP_IMG1>,
- <&imgsys1 CLK_IMG1_GALS_IMG1>;
- clock-names = "img-top", "gals";
+ clocks = <&imgsys1 CLK_IMG1_GALS_IMG1>,
+ <&topckgen CLK_TOP_IMG1>;
+ clock-names = "gals", "subsys-img-top";
mediatek,infracfg = <&infracfg_ao>;
#address-cells = <1>;
#size-cells = <0>;
@@ -1041,8 +1048,11 @@
<&ipesys CLK_IPE_LARB20>,
<&ipesys CLK_IPE_SMI_SUBCOM>,
<&ipesys CLK_IPE_GALS_IPE>;
- clock-names = "ipe-top", "ipe-larb0", "ipe-larb1",
- "ipe-smi", "ipe-gals";
+ clock-names = "subsys-ipe-top",
+ "subsys-ipe-larb0",
+ "subsys-ipe-larb1",
+ "subsys-ipe-smi",
+ "subsys-ipe-gals";
mediatek,infracfg = <&infracfg_ao>;
#power-domain-cells = <0>;
};
@@ -1061,7 +1071,9 @@
clocks = <&topckgen CLK_TOP_WPE>,
<&wpesys CLK_WPE_SMI_LARB8_CK_EN>,
<&wpesys CLK_WPE_SMI_LARB8_PCLK_EN>;
- clock-names = "wpe0", "larb-ck", "larb-pclk";
+ clock-names = "wpe0",
+ "subsys-larb-ck",
+ "subsys-larb-pclk";
mediatek,infracfg = <&infracfg_ao>;
#power-domain-cells = <0>;
};
@@ -1148,14 +1160,14 @@
status = "disabled";
};
- adsp_mailbox0: mailbox@10686000 {
+ adsp_mailbox0: mailbox@10686100 {
compatible = "mediatek,mt8186-adsp-mbox";
#mbox-cells = <0>;
reg = <0 0x10686100 0 0x1000>;
interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH 0>;
};
- adsp_mailbox1: mailbox@10687000 {
+ adsp_mailbox1: mailbox@10687100 {
compatible = "mediatek,mt8186-adsp-mbox";
#mbox-cells = <0>;
reg = <0 0x10687100 0 0x1000>;
@@ -1656,7 +1668,7 @@
#address-cells = <1>;
#size-cells = <1>;
- gpu_speedbin: gpu-speed-bin@59c {
+ gpu_speedbin: gpu-speedbin@59c {
reg = <0x59c 0x4>;
bits = <0 3>;
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8188-evb.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8188-evb.dts
new file mode 100644
index 000000000000..68a82b49f7a3
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8188-evb.dts
@@ -0,0 +1,387 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ */
+/dts-v1/;
+#include "mt8188.dtsi"
+#include "mt6359.dtsi"
+
+/ {
+ model = "MediaTek MT8188 evaluation board";
+ compatible = "mediatek,mt8188-evb", "mediatek,mt8188";
+
+ aliases {
+ serial0 = &uart0;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ i2c4 = &i2c4;
+ i2c5 = &i2c5;
+ i2c6 = &i2c6;
+ mmc0 = &mmc0;
+ };
+
+ chosen: chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x80000000>;
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ scp_mem_reserved: memory@50000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x50000000 0 0x2900000>;
+ no-map;
+ };
+ };
+};
+
+&auxadc {
+ status = "okay";
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c4_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c5_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c6_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&mmc0 {
+ bus-width = <8>;
+ hs400-ds-delay = <0x1481b>;
+ max-frequency = <200000000>;
+
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ supports-cqe;
+ cap-mmc-hw-reset;
+ no-sdio;
+ no-sd;
+ non-removable;
+
+ vmmc-supply = <&mt6359_vemc_1_ldo_reg>;
+ vqmmc-supply = <&mt6359_vufs_ldo_reg>;
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_default_pins>;
+ pinctrl-1 = <&mmc0_uhs_pins>;
+
+ status = "okay";
+};
+
+&mt6359_vcore_buck_reg {
+ regulator-always-on;
+};
+
+&mt6359_vgpu11_buck_reg {
+ regulator-always-on;
+};
+
+&mt6359_vpu_buck_reg {
+ regulator-always-on;
+};
+
+&mt6359_vrf12_ldo_reg {
+ regulator-always-on;
+};
+
+&nor_flash {
+ pinctrl-names = "default";
+ pinctrl-0 = <&nor_pins_default>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+ };
+};
+
+&pio {
+ adsp_uart_pins: adsp-uart-pins {
+ pins-tx-rx {
+ pinmux = <PINMUX_GPIO35__FUNC_O_ADSP_UTXD0>,
+ <PINMUX_GPIO36__FUNC_I1_ADSP_URXD0>;
+ };
+ };
+
+ i2c0_pins: i2c0-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO56__FUNC_B1_SDA0>,
+ <PINMUX_GPIO55__FUNC_B1_SCL0>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ i2c1_pins: i2c1-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO58__FUNC_B1_SDA1>,
+ <PINMUX_GPIO57__FUNC_B1_SCL1>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ i2c2_pins: i2c2-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO60__FUNC_B1_SDA2>,
+ <PINMUX_GPIO59__FUNC_B1_SCL2>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ i2c3_pins: i2c3-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO62__FUNC_B1_SDA3>,
+ <PINMUX_GPIO61__FUNC_B1_SCL3>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ i2c4_pins: i2c4-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO64__FUNC_B1_SDA4>,
+ <PINMUX_GPIO63__FUNC_B1_SCL4>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ i2c5_pins: i2c5-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO66__FUNC_B1_SDA5>,
+ <PINMUX_GPIO65__FUNC_B1_SCL5>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ i2c6_pins: i2c6-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO68__FUNC_B1_SDA6>,
+ <PINMUX_GPIO67__FUNC_B1_SCL6>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_011>;
+ };
+ };
+
+ mmc0_default_pins: mmc0-default-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO161__FUNC_B1_MSDC0_DAT0>,
+ <PINMUX_GPIO160__FUNC_B1_MSDC0_DAT1>,
+ <PINMUX_GPIO159__FUNC_B1_MSDC0_DAT2>,
+ <PINMUX_GPIO158__FUNC_B1_MSDC0_DAT3>,
+ <PINMUX_GPIO154__FUNC_B1_MSDC0_DAT4>,
+ <PINMUX_GPIO153__FUNC_B1_MSDC0_DAT5>,
+ <PINMUX_GPIO152__FUNC_B1_MSDC0_DAT6>,
+ <PINMUX_GPIO151__FUNC_B1_MSDC0_DAT7>,
+ <PINMUX_GPIO156__FUNC_B1_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <6>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-clk {
+ pinmux = <PINMUX_GPIO157__FUNC_B1_MSDC0_CLK>;
+ drive-strength = <6>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO155__FUNC_O_MSDC0_RSTB>;
+ drive-strength = <6>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc0_uhs_pins: mmc0-uhs-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO161__FUNC_B1_MSDC0_DAT0>,
+ <PINMUX_GPIO160__FUNC_B1_MSDC0_DAT1>,
+ <PINMUX_GPIO159__FUNC_B1_MSDC0_DAT2>,
+ <PINMUX_GPIO158__FUNC_B1_MSDC0_DAT3>,
+ <PINMUX_GPIO154__FUNC_B1_MSDC0_DAT4>,
+ <PINMUX_GPIO153__FUNC_B1_MSDC0_DAT5>,
+ <PINMUX_GPIO152__FUNC_B1_MSDC0_DAT6>,
+ <PINMUX_GPIO151__FUNC_B1_MSDC0_DAT7>,
+ <PINMUX_GPIO156__FUNC_B1_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <8>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-clk-ds {
+ pinmux = <PINMUX_GPIO157__FUNC_B1_MSDC0_CLK>,
+ <PINMUX_GPIO162__FUNC_B0_MSDC0_DSL>;
+ drive-strength = <8>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO155__FUNC_O_MSDC0_RSTB>;
+ drive-strength = <8>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ nor_pins_default: nor-pins {
+ pins-io-ck {
+ pinmux = <PINMUX_GPIO127__FUNC_B0_SPINOR_IO0>,
+ <PINMUX_GPIO125__FUNC_O_SPINOR_CK>,
+ <PINMUX_GPIO128__FUNC_B0_SPINOR_IO1>;
+ bias-pull-down;
+ };
+
+ pins-io-cs {
+ pinmux = <PINMUX_GPIO126__FUNC_O_SPINOR_CS>,
+ <PINMUX_GPIO129__FUNC_B0_SPINOR_IO2>,
+ <PINMUX_GPIO130__FUNC_B0_SPINOR_IO3>;
+ bias-pull-up;
+ };
+ };
+
+ spi0_pins: spi0-pins {
+ pins-spi {
+ pinmux = <PINMUX_GPIO69__FUNC_O_SPIM0_CSB>,
+ <PINMUX_GPIO70__FUNC_O_SPIM0_CLK>,
+ <PINMUX_GPIO71__FUNC_B0_SPIM0_MOSI>,
+ <PINMUX_GPIO72__FUNC_B0_SPIM0_MISO>;
+ bias-disable;
+ };
+ };
+
+ spi1_pins: spi1-pins {
+ pins-spi {
+ pinmux = <PINMUX_GPIO75__FUNC_O_SPIM1_CSB>,
+ <PINMUX_GPIO76__FUNC_O_SPIM1_CLK>,
+ <PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI>,
+ <PINMUX_GPIO78__FUNC_B0_SPIM1_MISO>;
+ bias-disable;
+ };
+ };
+
+ spi2_pins: spi2-pins {
+ pins-spi {
+ pinmux = <PINMUX_GPIO79__FUNC_O_SPIM2_CSB>,
+ <PINMUX_GPIO80__FUNC_O_SPIM2_CLK>,
+ <PINMUX_GPIO81__FUNC_B0_SPIM2_MOSI>,
+ <PINMUX_GPIO82__FUNC_B0_SPIM2_MISO>;
+ bias-disable;
+ };
+ };
+
+ uart0_pins: uart0-pins {
+ pins-rx-tx {
+ pinmux = <PINMUX_GPIO31__FUNC_O_UTXD0>,
+ <PINMUX_GPIO32__FUNC_I1_URXD0>;
+ bias-pull-up;
+ };
+ };
+};
+
+&pmic {
+ interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&scp {
+ memory-region = <&scp_mem_reserved>;
+ status = "okay";
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins>;
+ status = "okay";
+};
+
+&spi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi1_pins>;
+ status = "okay";
+};
+
+&spi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2_pins>;
+ status = "okay";
+};
+
+&u3phy0 {
+ status = "okay";
+};
+
+&u3phy1 {
+ status = "okay";
+};
+
+&u3phy2 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+ status = "okay";
+};
+
+&xhci0 {
+ status = "okay";
+};
+
+&xhci1 {
+ status = "okay";
+};
+
+&xhci2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8188.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8188.dtsi
new file mode 100644
index 000000000000..b4315c9214dc
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8188.dtsi
@@ -0,0 +1,956 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2023 MediaTek Inc.
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h>
+#include <dt-bindings/power/mediatek,mt8188-power.h>
+
+/ {
+ compatible = "mediatek,mt8188";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x000>;
+ enable-method = "psci";
+ clock-frequency = <2000000000>;
+ capacity-dmips-mhz = <282>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ #cooling-cells = <2>;
+ };
+
+ cpu1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x100>;
+ enable-method = "psci";
+ clock-frequency = <2000000000>;
+ capacity-dmips-mhz = <282>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ #cooling-cells = <2>;
+ };
+
+ cpu2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x200>;
+ enable-method = "psci";
+ clock-frequency = <2000000000>;
+ capacity-dmips-mhz = <282>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ #cooling-cells = <2>;
+ };
+
+ cpu3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x300>;
+ enable-method = "psci";
+ clock-frequency = <2000000000>;
+ capacity-dmips-mhz = <282>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ #cooling-cells = <2>;
+ };
+
+ cpu4: cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x400>;
+ enable-method = "psci";
+ clock-frequency = <2000000000>;
+ capacity-dmips-mhz = <282>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ #cooling-cells = <2>;
+ };
+
+ cpu5: cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x500>;
+ enable-method = "psci";
+ clock-frequency = <2000000000>;
+ capacity-dmips-mhz = <282>;
+ cpu-idle-states = <&cpu_off_l &cluster_off_l>;
+ i-cache-size = <32768>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <128>;
+ d-cache-size = <32768>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ #cooling-cells = <2>;
+ };
+
+ cpu6: cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x600>;
+ enable-method = "psci";
+ clock-frequency = <2600000000>;
+ capacity-dmips-mhz = <1024>;
+ cpu-idle-states = <&cpu_off_b &cluster_off_b>;
+ i-cache-size = <65536>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <65536>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
+ next-level-cache = <&l2_1>;
+ #cooling-cells = <2>;
+ };
+
+ cpu7: cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x700>;
+ enable-method = "psci";
+ clock-frequency = <2600000000>;
+ capacity-dmips-mhz = <1024>;
+ cpu-idle-states = <&cpu_off_b &cluster_off_b>;
+ i-cache-size = <65536>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <65536>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <256>;
+ next-level-cache = <&l2_1>;
+ #cooling-cells = <2>;
+ };
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+
+ core1 {
+ cpu = <&cpu1>;
+ };
+
+ core2 {
+ cpu = <&cpu2>;
+ };
+
+ core3 {
+ cpu = <&cpu3>;
+ };
+
+ core4 {
+ cpu = <&cpu4>;
+ };
+
+ core5 {
+ cpu = <&cpu5>;
+ };
+
+ core6 {
+ cpu = <&cpu6>;
+ };
+
+ core7 {
+ cpu = <&cpu7>;
+ };
+ };
+ };
+
+ idle-states {
+ entry-method = "psci";
+
+ cpu_off_l: cpu-off-l {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x00010000>;
+ local-timer-stop;
+ entry-latency-us = <50>;
+ exit-latency-us = <95>;
+ min-residency-us = <580>;
+ };
+
+ cpu_off_b: cpu-off-b {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x00010000>;
+ local-timer-stop;
+ entry-latency-us = <45>;
+ exit-latency-us = <140>;
+ min-residency-us = <740>;
+ };
+
+ cluster_off_l: cluster-off-l {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x01010010>;
+ local-timer-stop;
+ entry-latency-us = <55>;
+ exit-latency-us = <155>;
+ min-residency-us = <840>;
+ };
+
+ cluster_off_b: cluster-off-b {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x01010010>;
+ local-timer-stop;
+ entry-latency-us = <50>;
+ exit-latency-us = <200>;
+ min-residency-us = <1000>;
+ };
+ };
+
+ l2_0: l2-cache0 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <131072>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l2_1: l2-cache1 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <262144>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&l3_0>;
+ cache-unified;
+ };
+
+ l3_0: l3-cache {
+ compatible = "cache";
+ cache-level = <3>;
+ cache-size = <2097152>;
+ cache-line-size = <64>;
+ cache-sets = <2048>;
+ cache-unified;
+ };
+ };
+
+ clk13m: oscillator-13m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <13000000>;
+ clock-output-names = "clk13m";
+ };
+
+ clk26m: oscillator-26m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ clock-output-names = "clk26m";
+ };
+
+ clk32k: oscillator-32k {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "clk32k";
+ };
+
+ pmu-a55 {
+ compatible = "arm,cortex-a55-pmu";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster0>;
+ };
+
+ pmu-a78 {
+ compatible = "arm,cortex-a78-pmu";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster1>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ timer: timer {
+ compatible = "arm,armv8-timer";
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-frequency = <13000000>;
+ };
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "simple-bus";
+ ranges;
+
+ gic: interrupt-controller@c000000 {
+ compatible = "arm,gic-v3";
+ #interrupt-cells = <4>;
+ #redistributor-regions = <1>;
+ interrupt-parent = <&gic>;
+ interrupt-controller;
+ reg = <0 0x0c000000 0 0x40000>,
+ <0 0x0c040000 0 0x200000>;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+
+ ppi-partitions {
+ ppi_cluster0: interrupt-partition-0 {
+ affinity = <&cpu0 &cpu1 &cpu2 &cpu3 &cpu4 &cpu5>;
+ };
+
+ ppi_cluster1: interrupt-partition-1 {
+ affinity = <&cpu6 &cpu7>;
+ };
+ };
+ };
+
+ topckgen: syscon@10000000 {
+ compatible = "mediatek,mt8188-topckgen", "syscon";
+ reg = <0 0x10000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ infracfg_ao: syscon@10001000 {
+ compatible = "mediatek,mt8188-infracfg-ao", "syscon";
+ reg = <0 0x10001000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ pericfg: syscon@10003000 {
+ compatible = "mediatek,mt8188-pericfg", "syscon";
+ reg = <0 0x10003000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ pio: pinctrl@10005000 {
+ compatible = "mediatek,mt8188-pinctrl";
+ reg = <0 0x10005000 0 0x1000>,
+ <0 0x11c00000 0 0x1000>,
+ <0 0x11e10000 0 0x1000>,
+ <0 0x11e20000 0 0x1000>,
+ <0 0x11ea0000 0 0x1000>,
+ <0 0x1000b000 0 0x1000>;
+ reg-names = "iocfg0", "iocfg_rm", "iocfg_lt",
+ "iocfg_lm", "iocfg_rt", "eint";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pio 0 0 176>;
+ interrupt-controller;
+ interrupts = <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH 0>;
+ #interrupt-cells = <2>;
+ };
+
+ watchdog: watchdog@10007000 {
+ compatible = "mediatek,mt8188-wdt";
+ reg = <0 0x10007000 0 0x100>;
+ mediatek,disable-extrst;
+ #reset-cells = <1>;
+ };
+
+ apmixedsys: syscon@1000c000 {
+ compatible = "mediatek,mt8188-apmixedsys", "syscon";
+ reg = <0 0x1000c000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ systimer: timer@10017000 {
+ compatible = "mediatek,mt8188-timer", "mediatek,mt6765-timer";
+ reg = <0 0x10017000 0 0x1000>;
+ interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk13m>;
+ };
+
+ pwrap: pwrap@10024000 {
+ compatible = "mediatek,mt8188-pwrap", "mediatek,mt8195-pwrap", "syscon";
+ reg = <0 0x10024000 0 0x1000>;
+ reg-names = "pwrap";
+ interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&infracfg_ao CLK_INFRA_AO_PMIC_AP>,
+ <&infracfg_ao CLK_INFRA_AO_PMIC_TMR>;
+ clock-names = "spi", "wrap";
+ };
+
+ scp: scp@10500000 {
+ compatible = "mediatek,mt8188-scp";
+ reg = <0 0x10500000 0 0x100000>,
+ <0 0x10720000 0 0xe0000>;
+ reg-names = "sram", "cfg";
+ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH 0>;
+ };
+
+ adsp_audio26m: clock-controller@10b91100 {
+ compatible = "mediatek,mt8188-adsp-audio26m";
+ reg = <0 0x10b91100 0 0x100>;
+ #clock-cells = <1>;
+ };
+
+ uart0: serial@11001100 {
+ compatible = "mediatek,mt8188-uart", "mediatek,mt6577-uart";
+ reg = <0 0x11001100 0 0x100>;
+ interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>, <&infracfg_ao CLK_INFRA_AO_UART0>;
+ clock-names = "baud", "bus";
+ status = "disabled";
+ };
+
+ uart1: serial@11001200 {
+ compatible = "mediatek,mt8188-uart", "mediatek,mt6577-uart";
+ reg = <0 0x11001200 0 0x100>;
+ interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>, <&infracfg_ao CLK_INFRA_AO_UART1>;
+ clock-names = "baud", "bus";
+ status = "disabled";
+ };
+
+ uart2: serial@11001300 {
+ compatible = "mediatek,mt8188-uart", "mediatek,mt6577-uart";
+ reg = <0 0x11001300 0 0x100>;
+ interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>, <&infracfg_ao CLK_INFRA_AO_UART2>;
+ clock-names = "baud", "bus";
+ status = "disabled";
+ };
+
+ uart3: serial@11001400 {
+ compatible = "mediatek,mt8188-uart", "mediatek,mt6577-uart";
+ reg = <0 0x11001400 0 0x100>;
+ interrupts = <GIC_SPI 723 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>, <&infracfg_ao CLK_INFRA_AO_UART3>;
+ clock-names = "baud", "bus";
+ status = "disabled";
+ };
+
+ auxadc: adc@11002000 {
+ compatible = "mediatek,mt8188-auxadc", "mediatek,mt8173-auxadc";
+ reg = <0 0x11002000 0 0x1000>;
+ clocks = <&infracfg_ao CLK_INFRA_AO_AUXADC>;
+ clock-names = "main";
+ #io-channel-cells = <1>;
+ status = "disabled";
+ };
+
+ pericfg_ao: syscon@11003000 {
+ compatible = "mediatek,mt8188-pericfg-ao", "syscon";
+ reg = <0 0x11003000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ spi0: spi@1100a000 {
+ compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 0x1100a000 0 0x1000>;
+ interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_UNIVPLL_D6_D2>,
+ <&topckgen CLK_TOP_SPI>,
+ <&infracfg_ao CLK_INFRA_AO_SPI0>;
+ clock-names = "parent-clk", "sel-clk", "spi-clk";
+ status = "disabled";
+ };
+
+ spi1: spi@11010000 {
+ compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 0x11010000 0 0x1000>;
+ interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_UNIVPLL_D6_D2>,
+ <&topckgen CLK_TOP_SPI>,
+ <&infracfg_ao CLK_INFRA_AO_SPI1>;
+ clock-names = "parent-clk", "sel-clk", "spi-clk";
+ status = "disabled";
+ };
+
+ spi2: spi@11012000 {
+ compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 0x11012000 0 0x1000>;
+ interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_UNIVPLL_D6_D2>,
+ <&topckgen CLK_TOP_SPI>,
+ <&infracfg_ao CLK_INFRA_AO_SPI2>;
+ clock-names = "parent-clk", "sel-clk", "spi-clk";
+ status = "disabled";
+ };
+
+ spi3: spi@11013000 {
+ compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 0x11013000 0 0x1000>;
+ interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_UNIVPLL_D6_D2>,
+ <&topckgen CLK_TOP_SPI>,
+ <&infracfg_ao CLK_INFRA_AO_SPI3>;
+ clock-names = "parent-clk", "sel-clk", "spi-clk";
+ status = "disabled";
+ };
+
+ spi4: spi@11018000 {
+ compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 0x11018000 0 0x1000>;
+ interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_UNIVPLL_D6_D2>,
+ <&topckgen CLK_TOP_SPI>,
+ <&infracfg_ao CLK_INFRA_AO_SPI4>;
+ clock-names = "parent-clk", "sel-clk", "spi-clk";
+ status = "disabled";
+ };
+
+ spi5: spi@11019000 {
+ compatible = "mediatek,mt8188-spi-ipm", "mediatek,spi-ipm";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 0x11019000 0 0x1000>;
+ interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_UNIVPLL_D6_D2>,
+ <&topckgen CLK_TOP_SPI>,
+ <&infracfg_ao CLK_INFRA_AO_SPI5>;
+ clock-names = "parent-clk", "sel-clk", "spi-clk";
+ status = "disabled";
+ };
+
+ xhci1: usb@11200000 {
+ compatible = "mediatek,mt8188-xhci", "mediatek,mtk-xhci";
+ reg = <0 0x11200000 0 0x1000>,
+ <0 0x11203e00 0 0x0100>;
+ reg-names = "mac", "ippc";
+ interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH 0>;
+ phys = <&u2port1 PHY_TYPE_USB2>,
+ <&u3port1 PHY_TYPE_USB3>;
+ assigned-clocks = <&topckgen CLK_TOP_USB_TOP>,
+ <&topckgen CLK_TOP_SSUSB_XHCI>;
+ assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_BUS>,
+ <&topckgen CLK_TOP_SSUSB_TOP_REF>,
+ <&pericfg_ao CLK_PERI_AO_SSUSB_XHCI>;
+ clock-names = "sys_ck", "ref_ck", "mcu_ck";
+ mediatek,syscon-wakeup = <&pericfg 0x468 2>;
+ wakeup-source;
+ status = "disabled";
+ };
+
+ mmc0: mmc@11230000 {
+ compatible = "mediatek,mt8188-mmc", "mediatek,mt8183-mmc";
+ reg = <0 0x11230000 0 0x10000>,
+ <0 0x11f50000 0 0x1000>;
+ interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_MSDC50_0>,
+ <&infracfg_ao CLK_INFRA_AO_MSDC0>,
+ <&infracfg_ao CLK_INFRA_AO_MSDC0_SRC>,
+ <&infracfg_ao CLK_INFRA_AO_RG_AES_MSDCFDE_CK_0P>;
+ clock-names = "source", "hclk", "source_cg", "crypto_clk";
+ status = "disabled";
+ };
+
+ mmc1: mmc@11240000 {
+ compatible = "mediatek,mt8188-mmc", "mediatek,mt8183-mmc";
+ reg = <0 0x11240000 0 0x1000>,
+ <0 0x11eb0000 0 0x1000>;
+ interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&topckgen CLK_TOP_MSDC30_1>,
+ <&infracfg_ao CLK_INFRA_AO_MSDC1>,
+ <&infracfg_ao CLK_INFRA_AO_MSDC1_SRC>;
+ clock-names = "source", "hclk", "source_cg";
+ assigned-clocks = <&topckgen CLK_TOP_MSDC30_1>;
+ assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
+ status = "disabled";
+ };
+
+ i2c0: i2c@11280000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11280000 0 0x1000>,
+ <0 0x10220080 0 0x80>;
+ interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_c CLK_IMP_IIC_WRAP_C_AP_CLOCK_I2C0>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@11281000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11281000 0 0x1000>,
+ <0 0x10220180 0 0x80>;
+ interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_c CLK_IMP_IIC_WRAP_C_AP_CLOCK_I2C2>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c3: i2c@11282000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11282000 0 0x1000>,
+ <0 0x10220280 0 0x80>;
+ interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_c CLK_IMP_IIC_WRAP_C_AP_CLOCK_I2C3>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ imp_iic_wrap_c: clock-controller@11283000 {
+ compatible = "mediatek,mt8188-imp-iic-wrap-c";
+ reg = <0 0x11283000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ xhci2: usb@112a0000 {
+ compatible = "mediatek,mt8188-xhci", "mediatek,mtk-xhci";
+ reg = <0 0x112a0000 0 0x1000>,
+ <0 0x112a3e00 0 0x0100>;
+ reg-names = "mac", "ippc";
+ interrupts = <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH 0>;
+ phys = <&u2port2 PHY_TYPE_USB2>;
+ assigned-clocks = <&topckgen CLK_TOP_SSUSB_XHCI_3P>,
+ <&topckgen CLK_TOP_USB_TOP_3P>;
+ assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_3P_BUS>,
+ <&topckgen CLK_TOP_SSUSB_TOP_P3_REF>,
+ <&pericfg_ao CLK_PERI_AO_SSUSB_3P_XHCI>;
+ clock-names = "sys_ck", "ref_ck", "mcu_ck";
+ status = "disabled";
+ };
+
+ xhci0: usb@112b0000 {
+ compatible = "mediatek,mt8188-xhci", "mediatek,mtk-xhci";
+ reg = <0 0x112b0000 0 0x1000>,
+ <0 0x112b3e00 0 0x0100>;
+ reg-names = "mac", "ippc";
+ interrupts = <GIC_SPI 533 IRQ_TYPE_LEVEL_HIGH 0>;
+ phys = <&u2port0 PHY_TYPE_USB2>;
+ assigned-clocks = <&topckgen CLK_TOP_SSUSB_XHCI_2P>,
+ <&topckgen CLK_TOP_USB_TOP_2P>;
+ assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_2P_BUS>,
+ <&topckgen CLK_TOP_SSUSB_TOP_P2_REF>,
+ <&pericfg_ao CLK_PERI_AO_SSUSB_2P_XHCI>;
+ clock-names = "sys_ck", "ref_ck", "mcu_ck";
+ mediatek,syscon-wakeup = <&pericfg 0x460 2>;
+ wakeup-source;
+ status = "disabled";
+ };
+
+ nor_flash: spi@1132c000 {
+ compatible = "mediatek,mt8188-nor", "mediatek,mt8186-nor";
+ reg = <0 0x1132c000 0 0x1000>;
+ clocks = <&topckgen CLK_TOP_SPINOR>,
+ <&pericfg_ao CLK_PERI_AO_FLASHIFLASHCK>,
+ <&pericfg_ao CLK_PERI_AO_FLASHIF_BUS>;
+ clock-names = "spi", "sf", "axi";
+ assigned-clocks = <&topckgen CLK_TOP_SPINOR>;
+ interrupts = <GIC_SPI 825 IRQ_TYPE_LEVEL_HIGH 0>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@11e00000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11e00000 0 0x1000>,
+ <0 0x10220100 0 0x80>;
+ interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_w CLK_IMP_IIC_WRAP_W_AP_CLOCK_I2C1>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c4: i2c@11e01000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11e01000 0 0x1000>,
+ <0 0x10220380 0 0x80>;
+ interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_w CLK_IMP_IIC_WRAP_W_AP_CLOCK_I2C4>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ imp_iic_wrap_w: clock-controller@11e02000 {
+ compatible = "mediatek,mt8188-imp-iic-wrap-w";
+ reg = <0 0x11e02000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ u3phy0: t-phy@11e30000 {
+ compatible = "mediatek,mt8188-tphy", "mediatek,generic-tphy-v3";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x0 0x11e30000 0x1000>;
+ status = "disabled";
+
+ u2port0: usb-phy@0 {
+ reg = <0x0 0x700>;
+ clocks = <&topckgen CLK_TOP_SSUSB_PHY_P2_REF>,
+ <&apmixedsys CLK_APMIXED_PLL_SSUSB26M_EN>;
+ clock-names = "ref", "da_ref";
+ #phy-cells = <1>;
+ };
+ };
+
+ u3phy1: t-phy@11e40000 {
+ compatible = "mediatek,mt8188-tphy", "mediatek,generic-tphy-v3";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x0 0x11e40000 0x1000>;
+ status = "disabled";
+
+ u2port1: usb-phy@0 {
+ reg = <0x0 0x700>;
+ clocks = <&topckgen CLK_TOP_SSUSB_PHY_REF>,
+ <&apmixedsys CLK_APMIXED_PLL_SSUSB26M_EN>;
+ clock-names = "ref", "da_ref";
+ #phy-cells = <1>;
+ };
+
+ u3port1: usb-phy@700 {
+ reg = <0x700 0x700>;
+ clocks = <&apmixedsys CLK_APMIXED_PLL_SSUSB26M_EN>,
+ <&clk26m>;
+ clock-names = "ref", "da_ref";
+ #phy-cells = <1>;
+ status = "disabled";
+ };
+ };
+
+ u3phy2: t-phy@11e80000 {
+ compatible = "mediatek,mt8188-tphy", "mediatek,generic-tphy-v3";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x0 0x11e80000 0x1000>;
+ status = "disabled";
+
+ u2port2: usb-phy@0 {
+ reg = <0x0 0x700>;
+ clocks = <&topckgen CLK_TOP_SSUSB_PHY_P3_REF>,
+ <&apmixedsys CLK_APMIXED_PLL_SSUSB26M_EN>;
+ clock-names = "ref", "da_ref";
+ #phy-cells = <1>;
+ };
+ };
+
+ i2c5: i2c@11ec0000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11ec0000 0 0x1000>,
+ <0 0x10220480 0 0x80>;
+ interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_en CLK_IMP_IIC_WRAP_EN_AP_CLOCK_I2C5>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c6: i2c@11ec1000 {
+ compatible = "mediatek,mt8188-i2c";
+ reg = <0 0x11ec1000 0 0x1000>,
+ <0 0x10220600 0 0x80>;
+ interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH 0>;
+ clock-div = <1>;
+ clocks = <&imp_iic_wrap_en CLK_IMP_IIC_WRAP_EN_AP_CLOCK_I2C6>,
+ <&infracfg_ao CLK_INFRA_AO_APDMA_BCLK>;
+ clock-names = "main", "dma";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ imp_iic_wrap_en: clock-controller@11ec2000 {
+ compatible = "mediatek,mt8188-imp-iic-wrap-en";
+ reg = <0 0x11ec2000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ mfgcfg: clock-controller@13fbf000 {
+ compatible = "mediatek,mt8188-mfgcfg";
+ reg = <0 0x13fbf000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ vppsys0: clock-controller@14000000 {
+ compatible = "mediatek,mt8188-vppsys0";
+ reg = <0 0x14000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ wpesys: clock-controller@14e00000 {
+ compatible = "mediatek,mt8188-wpesys";
+ reg = <0 0x14e00000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ wpesys_vpp0: clock-controller@14e02000 {
+ compatible = "mediatek,mt8188-wpesys-vpp0";
+ reg = <0 0x14e02000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ vppsys1: clock-controller@14f00000 {
+ compatible = "mediatek,mt8188-vppsys1";
+ reg = <0 0x14f00000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ imgsys: clock-controller@15000000 {
+ compatible = "mediatek,mt8188-imgsys";
+ reg = <0 0x15000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ imgsys1_dip_top: clock-controller@15110000 {
+ compatible = "mediatek,mt8188-imgsys1-dip-top";
+ reg = <0 0x15110000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ imgsys1_dip_nr: clock-controller@15130000 {
+ compatible = "mediatek,mt8188-imgsys1-dip-nr";
+ reg = <0 0x15130000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ imgsys_wpe1: clock-controller@15220000 {
+ compatible = "mediatek,mt8188-imgsys-wpe1";
+ reg = <0 0x15220000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ ipesys: clock-controller@15330000 {
+ compatible = "mediatek,mt8188-ipesys";
+ reg = <0 0x15330000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ imgsys_wpe2: clock-controller@15520000 {
+ compatible = "mediatek,mt8188-imgsys-wpe2";
+ reg = <0 0x15520000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ imgsys_wpe3: clock-controller@15620000 {
+ compatible = "mediatek,mt8188-imgsys-wpe3";
+ reg = <0 0x15620000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ camsys: clock-controller@16000000 {
+ compatible = "mediatek,mt8188-camsys";
+ reg = <0 0x16000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ camsys_rawa: clock-controller@1604f000 {
+ compatible = "mediatek,mt8188-camsys-rawa";
+ reg = <0 0x1604f000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ camsys_yuva: clock-controller@1606f000 {
+ compatible = "mediatek,mt8188-camsys-yuva";
+ reg = <0 0x1606f000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ camsys_rawb: clock-controller@1608f000 {
+ compatible = "mediatek,mt8188-camsys-rawb";
+ reg = <0 0x1608f000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ camsys_yuvb: clock-controller@160af000 {
+ compatible = "mediatek,mt8188-camsys-yuvb";
+ reg = <0 0x160af000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ ccusys: clock-controller@17200000 {
+ compatible = "mediatek,mt8188-ccusys";
+ reg = <0 0x17200000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ vdecsys_soc: clock-controller@1800f000 {
+ compatible = "mediatek,mt8188-vdecsys-soc";
+ reg = <0 0x1800f000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ vdecsys: clock-controller@1802f000 {
+ compatible = "mediatek,mt8188-vdecsys";
+ reg = <0 0x1802f000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ vencsys: clock-controller@1a000000 {
+ compatible = "mediatek,mt8188-vencsys";
+ reg = <0 0x1a000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r1.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r1.dts
index 6e23428a3ed2..fd2cb8765a15 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r1.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r1.dts
@@ -4,7 +4,6 @@
*/
/dts-v1/;
#include "mt8192-asurada.dtsi"
-#include "mt8192-asurada-audio-rt1015p-rt5682.dtsi"
/ {
model = "Google Hayato rev1";
@@ -101,6 +100,24 @@
};
};
+&rt5682 {
+ compatible = "realtek,rt5682i";
+ realtek,btndet-delay = <16>;
+ VBAT-supply = <&pp3300_ldo_z>;
+};
+
+&sound {
+ compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682";
+
+ speaker-codecs {
+ sound-dai = <&rt1015p>;
+ };
+
+ headset-codec {
+ sound-dai = <&rt5682 0>;
+ };
+};
+
&touchscreen {
compatible = "hid-over-i2c";
post-power-on-delay-ms = <10>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r5-sku2.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r5-sku2.dts
new file mode 100644
index 000000000000..3127ee5f6172
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-hayato-r5-sku2.dts
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+/dts-v1/;
+#include "mt8192-asurada.dtsi"
+
+/ {
+ model = "Google Hayato rev5";
+ compatible = "google,hayato-rev5-sku2", "google,hayato-sku2",
+ "google,hayato", "mediatek,mt8192";
+};
+
+&keyboard_controller {
+ function-row-physmap = <
+ MATRIX_KEY(0x00, 0x02, 0) /* T1 */
+ MATRIX_KEY(0x03, 0x02, 0) /* T2 */
+ MATRIX_KEY(0x02, 0x02, 0) /* T3 */
+ MATRIX_KEY(0x01, 0x02, 0) /* T4 */
+ MATRIX_KEY(0x03, 0x04, 0) /* T5 */
+ MATRIX_KEY(0x02, 0x04, 0) /* T6 */
+ MATRIX_KEY(0x01, 0x04, 0) /* T7 */
+ MATRIX_KEY(0x02, 0x09, 0) /* T8 */
+ MATRIX_KEY(0x01, 0x09, 0) /* T9 */
+ MATRIX_KEY(0x00, 0x04, 0) /* T10 */
+ >;
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x02, KEY_BACK)
+ MATRIX_KEY(0x03, 0x02, KEY_FORWARD)
+ MATRIX_KEY(0x02, 0x02, KEY_REFRESH)
+ MATRIX_KEY(0x01, 0x02, KEY_FULL_SCREEN)
+ MATRIX_KEY(0x03, 0x04, KEY_SCALE)
+ MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
+ MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
+ MATRIX_KEY(0x02, 0x09, KEY_MUTE)
+ MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
+
+ CROS_STD_MAIN_KEYMAP
+ >;
+};
+
+&rt5682 {
+ compatible = "realtek,rt5682s";
+};
+
+&sound {
+ compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682s";
+
+ speaker-codecs {
+ sound-dai = <&rt1015p>;
+ };
+
+ headset-codec {
+ sound-dai = <&rt5682 0>;
+ };
+};
+
+&touchscreen {
+ compatible = "hid-over-i2c";
+ post-power-on-delay-ms = <10>;
+ hid-descr-addr = <0x0001>;
+ vdd-supply = <&pp3300_u>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r0.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r0.dts
index c6ad10cec95e..bc88866ab2f5 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r0.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r0.dts
@@ -4,7 +4,6 @@
*/
/dts-v1/;
#include "mt8192-asurada.dtsi"
-#include "mt8192-asurada-audio-rt1015p-rt5682.dtsi"
#include <dt-bindings/leds/common.h>
/ {
@@ -58,6 +57,24 @@
>;
};
+&rt5682 {
+ compatible = "realtek,rt5682i";
+ realtek,btndet-delay = <16>;
+ VBAT-supply = <&pp3300_ldo_z>;
+};
+
+&sound {
+ compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682";
+
+ speaker-codecs {
+ sound-dai = <&rt1015p>;
+ };
+
+ headset-codec {
+ sound-dai = <&rt5682 0>;
+ };
+};
+
&touchscreen {
compatible = "elan,ekth3500";
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r4.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r4.dts
new file mode 100644
index 000000000000..0039158c9e60
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada-spherion-r4.dts
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+/dts-v1/;
+#include "mt8192-asurada.dtsi"
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "Google Spherion (rev4)";
+ compatible = "google,spherion-rev4", "google,spherion",
+ "mediatek,mt8192";
+
+ pwmleds {
+ compatible = "pwm-leds";
+
+ led {
+ function = LED_FUNCTION_KBD_BACKLIGHT;
+ color = <LED_COLOR_ID_WHITE>;
+ pwms = <&cros_ec_pwm 0>;
+ max-brightness = <1023>;
+ };
+ };
+};
+
+&cros_ec_pwm {
+ status = "okay";
+};
+
+&keyboard_controller {
+ function-row-physmap = <
+ MATRIX_KEY(0x00, 0x02, 0) /* T1 */
+ MATRIX_KEY(0x03, 0x02, 0) /* T2 */
+ MATRIX_KEY(0x02, 0x02, 0) /* T3 */
+ MATRIX_KEY(0x01, 0x02, 0) /* T4 */
+ MATRIX_KEY(0x03, 0x04, 0) /* T5 */
+ MATRIX_KEY(0x02, 0x04, 0) /* T6 */
+ MATRIX_KEY(0x01, 0x04, 0) /* T7 */
+ MATRIX_KEY(0x02, 0x09, 0) /* T8 */
+ MATRIX_KEY(0x01, 0x09, 0) /* T9 */
+ MATRIX_KEY(0x00, 0x04, 0) /* T10 */
+ >;
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x02, KEY_BACK)
+ MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
+ MATRIX_KEY(0x02, 0x02, KEY_FULL_SCREEN)
+ MATRIX_KEY(0x01, 0x02, KEY_SCALE)
+ MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
+ MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
+ MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
+ MATRIX_KEY(0x02, 0x09, KEY_MUTE)
+ MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
+
+ CROS_STD_MAIN_KEYMAP
+ >;
+};
+
+&rt5682 {
+ compatible = "realtek,rt5682s";
+};
+
+&sound {
+ compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682s";
+
+ speaker-codecs {
+ sound-dai = <&rt1015p>;
+ };
+
+ headset-codec {
+ sound-dai = <&rt5682 0>;
+ };
+};
+
+&touchscreen {
+ compatible = "elan,ekth3500";
+};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada.dtsi
index 0e8b34117090..d87aab8d7a79 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8192-asurada.dtsi
@@ -210,6 +210,14 @@
};
};
+ rt1015p: audio-codec {
+ compatible = "realtek,rt1015p";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rt1015p_pins>;
+ sdb-gpios = <&pio 147 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ };
+
sound: sound {
mediatek,platform = <&afe>;
pinctrl-names = "aud_clk_mosi_off",
@@ -305,6 +313,19 @@
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
+
+ rt5682: audio-codec@1a {
+ /* Realtek RT5682i or RT5682s, sharing the same configuration */
+ reg = <0x1a>;
+ interrupts-extended = <&pio 18 IRQ_TYPE_LEVEL_LOW>;
+ realtek,jd-src = <1>;
+ #sound-dai-cells = <1>;
+
+ AVDD-supply = <&mt6359_vio18_ldo_reg>;
+ DBVDD-supply = <&mt6359_vio18_ldo_reg>;
+ LDO1-IN-supply = <&mt6359_vio18_ldo_reg>;
+ MICVDD-supply = <&pp3300_g>;
+ };
};
&i2c2 {
@@ -1184,6 +1205,13 @@
};
};
+ rt1015p_pins: rt1015p-default-pins {
+ pins {
+ pinmux = <PINMUX_GPIO147__FUNC_GPIO147>;
+ output-low;
+ };
+ };
+
scp_pins: scp-pins {
pins-vreq-vao {
pinmux = <PINMUX_GPIO195__FUNC_SCP_VREQ_VAO>;
@@ -1284,7 +1312,7 @@
pinctrl-names = "default";
pinctrl-0 = <&scp_pins>;
- cros-ec {
+ cros-ec-rpmsg {
compatible = "google,cros-ec-rpmsg";
mediatek,rpmsg-name = "cros-ec-rpmsg";
};
@@ -1374,7 +1402,7 @@
pinctrl-names = "default";
pinctrl-0 = <&spi5_pins>;
- cr50@0 {
+ tpm@0 {
compatible = "google,cr50";
reg = <0>;
interrupts-extended = <&pio 171 IRQ_TYPE_EDGE_RISING>;
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8192.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8192.dtsi
index 69f4cded5dbb..6dd32dbfb832 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8192.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8192.dtsi
@@ -14,6 +14,8 @@
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/power/mt8192-power.h>
#include <dt-bindings/reset/mt8192-resets.h>
+#include <dt-bindings/thermal/thermal.h>
+#include <dt-bindings/thermal/mediatek,lvts-thermal.h>
/ {
compatible = "mediatek,mt8192";
@@ -72,6 +74,7 @@
next-level-cache = <&l2_0>;
performance-domains = <&performance 0>;
capacity-dmips-mhz = <427>;
+ #cooling-cells = <2>;
};
cpu1: cpu@100 {
@@ -90,6 +93,7 @@
next-level-cache = <&l2_0>;
performance-domains = <&performance 0>;
capacity-dmips-mhz = <427>;
+ #cooling-cells = <2>;
};
cpu2: cpu@200 {
@@ -108,6 +112,7 @@
next-level-cache = <&l2_0>;
performance-domains = <&performance 0>;
capacity-dmips-mhz = <427>;
+ #cooling-cells = <2>;
};
cpu3: cpu@300 {
@@ -126,6 +131,7 @@
next-level-cache = <&l2_0>;
performance-domains = <&performance 0>;
capacity-dmips-mhz = <427>;
+ #cooling-cells = <2>;
};
cpu4: cpu@400 {
@@ -144,6 +150,7 @@
next-level-cache = <&l2_1>;
performance-domains = <&performance 1>;
capacity-dmips-mhz = <1024>;
+ #cooling-cells = <2>;
};
cpu5: cpu@500 {
@@ -162,6 +169,7 @@
next-level-cache = <&l2_1>;
performance-domains = <&performance 1>;
capacity-dmips-mhz = <1024>;
+ #cooling-cells = <2>;
};
cpu6: cpu@600 {
@@ -180,6 +188,7 @@
next-level-cache = <&l2_1>;
performance-domains = <&performance 1>;
capacity-dmips-mhz = <1024>;
+ #cooling-cells = <2>;
};
cpu7: cpu@700 {
@@ -198,6 +207,7 @@
next-level-cache = <&l2_1>;
performance-domains = <&performance 1>;
capacity-dmips-mhz = <1024>;
+ #cooling-cells = <2>;
};
cpu-map {
@@ -788,6 +798,29 @@
status = "disabled";
};
+ lvts_ap: thermal-sensor@1100b000 {
+ compatible = "mediatek,mt8192-lvts-ap";
+ reg = <0 0x1100b000 0 0xc00>;
+ interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&infracfg CLK_INFRA_THERM>;
+ resets = <&infracfg MT8192_INFRA_RST0_THERM_CTRL_SWRST>;
+ nvmem-cells = <&lvts_e_data1>;
+ nvmem-cell-names = "lvts-calib-data-1";
+ #thermal-sensor-cells = <1>;
+ };
+
+ svs: svs@1100bc00 {
+ compatible = "mediatek,mt8192-svs";
+ reg = <0 0x1100bc00 0 0x400>;
+ interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&infracfg CLK_INFRA_THERM>;
+ clock-names = "main";
+ nvmem-cells = <&svs_calibration>, <&lvts_e_data1>;
+ nvmem-cell-names = "svs-calibration-data", "t-calibration-data";
+ resets = <&infracfg MT8192_INFRA_RST3_THERM_CTRL_PTP_SWRST>;
+ reset-names = "svs_rst";
+ };
+
pwm0: pwm@1100e000 {
compatible = "mediatek,mt8183-disp-pwm";
reg = <0 0x1100e000 0 0x1000>;
@@ -1114,6 +1147,17 @@
status = "disabled";
};
+ lvts_mcu: thermal-sensor@11278000 {
+ compatible = "mediatek,mt8192-lvts-mcu";
+ reg = <0 0x11278000 0 0x1000>;
+ interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&infracfg CLK_INFRA_THERM>;
+ resets = <&infracfg MT8192_INFRA_RST4_THERM_CTRL_MCU_SWRST>;
+ nvmem-cells = <&lvts_e_data1>;
+ nvmem-cell-names = "lvts-calib-data-1";
+ #thermal-sensor-cells = <1>;
+ };
+
efuse: efuse@11c10000 {
compatible = "mediatek,mt8192-efuse", "mediatek,efuse";
reg = <0 0x11c10000 0 0x1000>;
@@ -1899,4 +1943,426 @@
power-domains = <&spm MT8192_POWER_DOMAIN_MDP>;
};
};
+
+ thermal_zones: thermal-zones {
+ cpu0-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_LITTLE_CPU0>;
+
+ trips {
+ cpu0_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu0_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu0_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu1-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_LITTLE_CPU1>;
+
+ trips {
+ cpu1_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu1_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu1_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu2-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_LITTLE_CPU2>;
+
+ trips {
+ cpu2_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu2_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu2_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu3-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_LITTLE_CPU3>;
+
+ trips {
+ cpu3_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu3_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu3_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu4-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_BIG_CPU0>;
+
+ trips {
+ cpu4_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu4_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu4_alert>;
+ cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu5-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_BIG_CPU1>;
+
+ trips {
+ cpu5_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu5_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu5_alert>;
+ cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu6-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_BIG_CPU2>;
+
+ trips {
+ cpu6_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu6_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu6_alert>;
+ cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ cpu7-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_mcu MT8192_MCU_BIG_CPU3>;
+
+ trips {
+ cpu7_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu7_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu7_alert>;
+ cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ vpu0-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_VPU0>;
+
+ trips {
+ vpu0_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ vpu0_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ vpu1-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_VPU1>;
+
+ trips {
+ vpu1_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ vpu1_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpu0-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_GPU0>;
+
+ trips {
+ gpu0_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ gpu0_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpu1-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_GPU1>;
+
+ trips {
+ gpu1_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ gpu1_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ infra-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_INFRA>;
+
+ trips {
+ infra_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ infra_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cam-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_CAM>;
+
+ trips {
+ cam_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cam_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ md0-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_MD0>;
+
+ trips {
+ md0_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ md0_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ md1-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_MD1>;
+
+ trips {
+ md1_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ md1_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+
+ md2-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&lvts_ap MT8192_AP_MD2>;
+
+ trips {
+ md2_alert: trip-alert {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ md2_crit: trip-crit {
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8195-cherry.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8195-cherry.dtsi
index 37a3e9de90ff..3c6079edda19 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8195-cherry.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8195-cherry.dtsi
@@ -47,6 +47,19 @@
reg = <0 0x40000000 0 0x80000000>;
};
+ pp3300_disp_x: regulator-pp3300-disp-x {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_disp_x";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <2500>;
+ enable-active-high;
+ gpio = <&pio 55 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&panel_fixed_pins>;
+ vin-supply = <&pp3300_z2>;
+ };
+
/* system wide LDO 3.3V power rail */
pp3300_z5: regulator-pp3300-ldo-z5 {
compatible = "regulator-fixed";
@@ -114,6 +127,77 @@
regulator-boot-on;
};
+ /* Murata NCP03WF104F05RL */
+ tboard_thermistor1: thermal-sensor-t1 {
+ compatible = "generic-adc-thermal";
+ #thermal-sensor-cells = <0>;
+ io-channels = <&auxadc 0>;
+ io-channel-names = "sensor-channel";
+ temperature-lookup-table = < (-10000) 1553
+ (-5000) 1485
+ 0 1406
+ 5000 1317
+ 10000 1219
+ 15000 1115
+ 20000 1007
+ 25000 900
+ 30000 796
+ 35000 697
+ 40000 605
+ 45000 523
+ 50000 449
+ 55000 384
+ 60000 327
+ 65000 279
+ 70000 237
+ 75000 202
+ 80000 172
+ 85000 147
+ 90000 125
+ 95000 107
+ 100000 92
+ 105000 79
+ 110000 68
+ 115000 59
+ 120000 51
+ 125000 44>;
+ };
+
+ tboard_thermistor2: thermal-sensor-t2 {
+ compatible = "generic-adc-thermal";
+ #thermal-sensor-cells = <0>;
+ io-channels = <&auxadc 1>;
+ io-channel-names = "sensor-channel";
+ temperature-lookup-table = < (-10000) 1553
+ (-5000) 1485
+ 0 1406
+ 5000 1317
+ 10000 1219
+ 15000 1115
+ 20000 1007
+ 25000 900
+ 30000 796
+ 35000 697
+ 40000 605
+ 45000 523
+ 50000 449
+ 55000 384
+ 60000 327
+ 65000 279
+ 70000 237
+ 75000 202
+ 80000 172
+ 85000 147
+ 90000 125
+ 95000 107
+ 100000 92
+ 105000 79
+ 110000 68
+ 115000 59
+ 120000 51
+ 125000 44>;
+ };
+
usb_vbus: regulator-5v0-usb-vbus {
compatible = "regulator-fixed";
regulator-name = "usb-vbus";
@@ -176,6 +260,10 @@
memory-region = <&afe_mem>;
};
+&auxadc {
+ status = "okay";
+};
+
&dp_intf0 {
status = "okay";
@@ -217,6 +305,20 @@
reg = <1>;
edp_out: endpoint {
data-lanes = <0 1 2 3>;
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+
+ aux-bus {
+ panel {
+ compatible = "edp-panel";
+ power-supply = <&pp3300_disp_x>;
+ backlight = <&backlight_lcd0>;
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&edp_out>;
+ };
};
};
};
@@ -362,7 +464,7 @@
pinctrl-0 = <&i2c7_pins>;
pmic@34 {
- #interrupt-cells = <1>;
+ #interrupt-cells = <2>;
compatible = "mediatek,mt6360";
reg = <0x34>;
interrupt-controller;
@@ -374,6 +476,14 @@
};
};
+&mfg0 {
+ domain-supply = <&mt6315_7_vbuck1>;
+};
+
+&mfg1 {
+ domain-supply = <&mt6359_vsram_others_ldo_reg>;
+};
+
&mmc0 {
status = "okay";
@@ -444,7 +554,6 @@
/* for GPU SRAM */
&mt6359_vsram_others_ldo_reg {
- regulator-always-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <750000>;
};
@@ -881,6 +990,12 @@
};
};
+ panel_fixed_pins: panel-pwr-default-pins {
+ pins-vreg-en {
+ pinmux = <PINMUX_GPIO55__FUNC_GPIO55>;
+ };
+ };
+
pio_default: pio-default-pins {
pins-wifi-enable {
pinmux = <PINMUX_GPIO58__FUNC_GPIO58>;
@@ -1121,7 +1236,36 @@
regulator-enable-ramp-delay = <256>;
regulator-ramp-delay = <6250>;
regulator-allowed-modes = <0 1 2>;
- regulator-always-on;
+ };
+ };
+ };
+};
+
+&thermal_zones {
+ soc-area-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&tboard_thermistor1>;
+
+ trips {
+ trip-crit {
+ temperature = <84000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ pmic-area-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <0>;
+ thermal-sensors = <&tboard_thermistor2>;
+
+ trips {
+ trip-crit {
+ temperature = <84000>;
+ hysteresis = <1000>;
+ type = "critical";
};
};
};
@@ -1150,6 +1294,7 @@
&xhci0 {
status = "okay";
+ rx-fifo-depth = <3072>;
vusb33-supply = <&mt6359_vusb_ldo_reg>;
vbus-supply = <&usb_vbus>;
};
@@ -1157,6 +1302,7 @@
&xhci1 {
status = "okay";
+ rx-fifo-depth = <3072>;
vusb33-supply = <&mt6359_vusb_ldo_reg>;
vbus-supply = <&usb_vbus>;
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8195-demo.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8195-demo.dts
index b2485ddfd33b..4127cb84eba4 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8195-demo.dts
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8195-demo.dts
@@ -48,7 +48,7 @@
memory@40000000 {
device_type = "memory";
- reg = <0 0x40000000 0 0x80000000>;
+ reg = <0 0x40000000 0x2 0x00000000>;
};
reserved-memory {
@@ -56,13 +56,8 @@
#size-cells = <2>;
ranges;
- /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
- bl31_secmon_reserved: secmon@54600000 {
- no-map;
- reg = <0 0x54600000 0x0 0x200000>;
- };
-
- /* 12 MiB reserved for OP-TEE (BL32)
+ /*
+ * 12 MiB reserved for OP-TEE (BL32)
* +-----------------------+ 0x43e0_0000
* | SHMEM 2MiB |
* +-----------------------+ 0x43c0_0000
@@ -75,11 +70,39 @@
no-map;
reg = <0 0x43200000 0 0x00c00000>;
};
+
+ scp_mem: memory@50000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x50000000 0 0x2900000>;
+ no-map;
+ };
+
+ vpu_mem: memory@53000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x53000000 0 0x1400000>; /* 20 MB */
+ };
+
+ /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_mem: memory@54600000 {
+ no-map;
+ reg = <0 0x54600000 0x0 0x200000>;
+ };
+
+ snd_dma_mem: memory@60000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x60000000 0 0x1100000>;
+ no-map;
+ };
+
+ apu_mem: memory@62000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x62000000 0 0x1400000>; /* 20 MB */
+ };
};
};
&eth {
- phy-mode ="rgmii-id";
+ phy-mode = "rgmii-id";
phy-handle = <&ethernet_phy0>;
snps,reset-gpio = <&pio 93 GPIO_ACTIVE_HIGH>;
snps,reset-delays-us = <0 10000 80000>;
@@ -105,6 +128,7 @@
compatible = "mediatek,mt6360";
reg = <0x34>;
interrupt-controller;
+ #interrupt-cells = <1>;
interrupts-extended = <&pio 101 IRQ_TYPE_EDGE_FALLING>;
interrupt-names = "IRQB";
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8195.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8195.dtsi
index 4dbbf8fdab75..b9101662ce40 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8195.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8195.dtsi
@@ -313,6 +313,7 @@
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
<&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
+ status = "fail";
};
dmic_codec: dmic-codec {
@@ -537,7 +538,7 @@
#size-cells = <0>;
#power-domain-cells = <1>;
- power-domain@MT8195_POWER_DOMAIN_MFG1 {
+ mfg1: power-domain@MT8195_POWER_DOMAIN_MFG1 {
reg = <MT8195_POWER_DOMAIN_MFG1>;
clocks = <&apmixedsys CLK_APMIXED_MFGPLL>,
<&topckgen CLK_TOP_MFG_CORE_TMP>;
@@ -626,6 +627,8 @@
power-domain@MT8195_POWER_DOMAIN_VENC_CORE1 {
reg = <MT8195_POWER_DOMAIN_VENC_CORE1>;
+ clocks = <&vencsys_core1 CLK_VENC_CORE1_LARB>;
+ clock-names = "venc1-larb";
mediatek,infracfg = <&infracfg_ao>;
#power-domain-cells = <0>;
};
@@ -688,6 +691,8 @@
power-domain@MT8195_POWER_DOMAIN_VENC {
reg = <MT8195_POWER_DOMAIN_VENC>;
+ clocks = <&vencsys CLK_VENC_LARB>;
+ clock-names = "venc0-larb";
mediatek,infracfg = <&infracfg_ao>;
#power-domain-cells = <0>;
};
@@ -1114,7 +1119,7 @@
lvts_ap: thermal-sensor@1100b000 {
compatible = "mediatek,mt8195-lvts-ap";
- reg = <0 0x1100b000 0 0x1000>;
+ reg = <0 0x1100b000 0 0xc00>;
interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&infracfg_ao CLK_INFRA_AO_THERM>;
resets = <&infracfg_ao MT8195_INFRA_RST0_THERM_CTRL_SWRST>;
@@ -1123,6 +1128,18 @@
#thermal-sensor-cells = <1>;
};
+ svs: svs@1100bc00 {
+ compatible = "mediatek,mt8195-svs";
+ reg = <0 0x1100bc00 0 0x400>;
+ interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&infracfg_ao CLK_INFRA_AO_THERM>;
+ clock-names = "main";
+ nvmem-cells = <&svs_calib_data &lvts_efuse_data1>;
+ nvmem-cell-names = "svs-calibration-data", "t-calibration-data";
+ resets = <&infracfg_ao MT8195_INFRA_RST3_THERM_CTRL_PTP_SWRST>;
+ reset-names = "svs_rst";
+ };
+
disp_pwm0: pwm@1100e000 {
compatible = "mediatek,mt8195-disp-pwm", "mediatek,mt8183-disp-pwm";
reg = <0 0x1100e000 0 0x1000>;
@@ -1681,6 +1698,9 @@
lvts_efuse_data2: lvts2-calib@1d0 {
reg = <0x1d0 0x38>;
};
+ svs_calib_data: svs-calib@580 {
+ reg = <0x580 0x64>;
+ };
};
u3phy2: t-phy@11c40000 {
@@ -1713,6 +1733,26 @@
};
};
+ mipi_tx0: dsi-phy@11c80000 {
+ compatible = "mediatek,mt8195-mipi-tx", "mediatek,mt8183-mipi-tx";
+ reg = <0 0x11c80000 0 0x1000>;
+ clocks = <&clk26m>;
+ clock-output-names = "mipi_tx0_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ mipi_tx1: dsi-phy@11c90000 {
+ compatible = "mediatek,mt8195-mipi-tx", "mediatek,mt8183-mipi-tx";
+ reg = <0 0x11c90000 0 0x1000>;
+ clocks = <&clk26m>;
+ clock-output-names = "mipi_tx1_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
i2c5: i2c@11d00000 {
compatible = "mediatek,mt8195-i2c",
"mediatek,mt8192-i2c";
@@ -1960,6 +2000,115 @@
#clock-cells = <1>;
};
+ dma-controller@14001000 {
+ compatible = "mediatek,mt8195-mdp3-rdma";
+ reg = <0 0x14001000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x1000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP0_MDP_RDMA_SOF>,
+ <CMDQ_EVENT_VPP0_MDP_RDMA_FRAME_DONE>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS0>;
+ iommus = <&iommu_vpp M4U_PORT_L4_MDP_RDMA>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_RDMA>;
+ mboxes = <&gce1 12 CMDQ_THR_PRIO_1>,
+ <&gce1 13 CMDQ_THR_PRIO_1>,
+ <&gce1 14 CMDQ_THR_PRIO_1>,
+ <&gce1 21 CMDQ_THR_PRIO_1>,
+ <&gce1 22 CMDQ_THR_PRIO_1>;
+ #dma-cells = <1>;
+ };
+
+ display@14002000 {
+ compatible = "mediatek,mt8195-mdp3-fg";
+ reg = <0 0x14002000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x2000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_FG>;
+ };
+
+ display@14003000 {
+ compatible = "mediatek,mt8195-mdp3-stitch";
+ reg = <0 0x14003000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x3000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_STITCH>;
+ };
+
+ display@14004000 {
+ compatible = "mediatek,mt8195-mdp3-hdr";
+ reg = <0 0x14004000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x4000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_HDR>;
+ };
+
+ display@14005000 {
+ compatible = "mediatek,mt8195-mdp3-aal";
+ reg = <0 0x14005000 0 0x1000>;
+ interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x5000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_AAL>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS0>;
+ };
+
+ display@14006000 {
+ compatible = "mediatek,mt8195-mdp3-rsz", "mediatek,mt8183-mdp3-rsz";
+ reg = <0 0x14006000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x6000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP0_MDP_RSZ_IN_RSZ_SOF>,
+ <CMDQ_EVENT_VPP0_MDP_RSZ_FRAME_DONE>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_RSZ>;
+ };
+
+ display@14007000 {
+ compatible = "mediatek,mt8195-mdp3-tdshp";
+ reg = <0 0x14007000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x7000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_TDSHP>;
+ };
+
+ display@14008000 {
+ compatible = "mediatek,mt8195-mdp3-color";
+ reg = <0 0x14008000 0 0x1000>;
+ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x8000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_COLOR>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS0>;
+ };
+
+ display@14009000 {
+ compatible = "mediatek,mt8195-mdp3-ovl";
+ reg = <0 0x14009000 0 0x1000>;
+ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0x9000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_OVL>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS0>;
+ iommus = <&iommu_vpp M4U_PORT_L4_MDP_OVL>;
+ };
+
+ display@1400a000 {
+ compatible = "mediatek,mt8195-mdp3-padding";
+ reg = <0 0x1400a000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0xa000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_PADDING>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS0>;
+ };
+
+ display@1400b000 {
+ compatible = "mediatek,mt8195-mdp3-tcc";
+ reg = <0 0x1400b000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0xb000 0x1000>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_TCC>;
+ };
+
+ dma-controller@1400c000 {
+ compatible = "mediatek,mt8195-mdp3-wrot", "mediatek,mt8183-mdp3-wrot";
+ reg = <0 0x1400c000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0xc000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP0_MDP_WROT_SOF>,
+ <CMDQ_EVENT_VPP0_MDP_WROT_VIDO_WDONE>;
+ clocks = <&vppsys0 CLK_VPP0_MDP_WROT>;
+ iommus = <&iommu_vpp M4U_PORT_L4_MDP_WROT>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS0>;
+ #dma-cells = <1>;
+ };
+
mutex@1400f000 {
compatible = "mediatek,mt8195-vpp-mutex";
reg = <0 0x1400f000 0 0x1000>;
@@ -2107,6 +2256,289 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
};
+ display@14f06000 {
+ compatible = "mediatek,mt8195-mdp3-split";
+ reg = <0 0x14f06000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0x6000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_VPP_SPLIT>,
+ <&vppsys1 CLK_VPP1_HDMI_META>,
+ <&vppsys1 CLK_VPP1_VPP_SPLIT_HDMI>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f07000 {
+ compatible = "mediatek,mt8195-mdp3-tcc";
+ reg = <0 0x14f07000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0x7000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_TCC>;
+ };
+
+ dma-controller@14f08000 {
+ compatible = "mediatek,mt8195-mdp3-rdma";
+ reg = <0 0x14f08000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0x8000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP1_MDP_RDMA_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP1_MDP_RDMA_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_RDMA>;
+ iommus = <&iommu_vdo M4U_PORT_L5_SVPP1_MDP_RDMA>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ #dma-cells = <1>;
+ };
+
+ dma-controller@14f09000 {
+ compatible = "mediatek,mt8195-mdp3-rdma";
+ reg = <0 0x14f09000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0x9000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP2_MDP_RDMA_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP2_MDP_RDMA_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_RDMA>;
+ iommus = <&iommu_vdo M4U_PORT_L5_SVPP2_MDP_RDMA>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ #dma-cells = <1>;
+ };
+
+ dma-controller@14f0a000 {
+ compatible = "mediatek,mt8195-mdp3-rdma";
+ reg = <0 0x14f0a000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0xa000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP3_MDP_RDMA_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP3_MDP_RDMA_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_RDMA>;
+ iommus = <&iommu_vpp M4U_PORT_L6_SVPP3_MDP_RDMA>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ #dma-cells = <1>;
+ };
+
+ display@14f0b000 {
+ compatible = "mediatek,mt8195-mdp3-fg";
+ reg = <0 0x14f0b000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0xb000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_FG>;
+ };
+
+ display@14f0c000 {
+ compatible = "mediatek,mt8195-mdp3-fg";
+ reg = <0 0x14f0c000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0xc000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_FG>;
+ };
+
+ display@14f0d000 {
+ compatible = "mediatek,mt8195-mdp3-fg";
+ reg = <0 0x14f0d000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0xd000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_FG>;
+ };
+
+ display@14f0e000 {
+ compatible = "mediatek,mt8195-mdp3-hdr";
+ reg = <0 0x14f0e000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0xe000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_HDR>;
+ };
+
+ display@14f0f000 {
+ compatible = "mediatek,mt8195-mdp3-hdr";
+ reg = <0 0x14f0f000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f0XXXX 0xf000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_HDR>;
+ };
+
+ display@14f10000 {
+ compatible = "mediatek,mt8195-mdp3-hdr";
+ reg = <0 0x14f10000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_HDR>;
+ };
+
+ display@14f11000 {
+ compatible = "mediatek,mt8195-mdp3-aal";
+ reg = <0 0x14f11000 0 0x1000>;
+ interrupts = <GIC_SPI 617 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x1000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_AAL>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f12000 {
+ compatible = "mediatek,mt8195-mdp3-aal";
+ reg = <0 0x14f12000 0 0x1000>;
+ interrupts = <GIC_SPI 618 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x2000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_AAL>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f13000 {
+ compatible = "mediatek,mt8195-mdp3-aal";
+ reg = <0 0x14f13000 0 0x1000>;
+ interrupts = <GIC_SPI 619 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x3000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_AAL>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f14000 {
+ compatible = "mediatek,mt8195-mdp3-rsz", "mediatek,mt8183-mdp3-rsz";
+ reg = <0 0x14f14000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x4000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP1_MDP_RSZ_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP1_MDP_RSZ_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_RSZ>;
+ };
+
+ display@14f15000 {
+ compatible = "mediatek,mt8195-mdp3-rsz", "mediatek,mt8183-mdp3-rsz";
+ reg = <0 0x14f15000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x5000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP2_MDP_RSZ_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP2_MDP_RSZ_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_RSZ>;
+ };
+
+ display@14f16000 {
+ compatible = "mediatek,mt8195-mdp3-rsz", "mediatek,mt8183-mdp3-rsz";
+ reg = <0 0x14f16000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x6000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP3_MDP_RSZ_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP3_MDP_RSZ_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_RSZ>;
+ };
+
+ display@14f17000 {
+ compatible = "mediatek,mt8195-mdp3-tdshp";
+ reg = <0 0x14f17000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x7000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_TDSHP>;
+ };
+
+ display@14f18000 {
+ compatible = "mediatek,mt8195-mdp3-tdshp";
+ reg = <0 0x14f18000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x8000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_TDSHP>;
+ };
+
+ display@14f19000 {
+ compatible = "mediatek,mt8195-mdp3-tdshp";
+ reg = <0 0x14f19000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0x9000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_TDSHP>;
+ };
+
+ display@14f1a000 {
+ compatible = "mediatek,mt8195-mdp3-merge";
+ reg = <0 0x14f1a000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0xa000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_VPP_MERGE>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f1b000 {
+ compatible = "mediatek,mt8195-mdp3-merge";
+ reg = <0 0x14f1b000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0xb000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_VPP_MERGE>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f1c000 {
+ compatible = "mediatek,mt8195-mdp3-color";
+ reg = <0 0x14f1c000 0 0x1000>;
+ interrupts = <GIC_SPI 628 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0xc000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_COLOR>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f1d000 {
+ compatible = "mediatek,mt8195-mdp3-color";
+ reg = <0 0x14f1d000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0xd000 0x1000>;
+ interrupts = <GIC_SPI 629 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_COLOR>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f1e000 {
+ compatible = "mediatek,mt8195-mdp3-color";
+ reg = <0 0x14f1e000 0 0x1000>;
+ interrupts = <GIC_SPI 630 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0xe000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_COLOR>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f1f000 {
+ compatible = "mediatek,mt8195-mdp3-ovl";
+ reg = <0 0x14f1f000 0 0x1000>;
+ interrupts = <GIC_SPI 631 IRQ_TYPE_LEVEL_HIGH 0>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f1XXXX 0xf000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_OVL>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ iommus = <&iommu_vdo M4U_PORT_L5_SVPP1_MDP_OVL>;
+ };
+
+ display@14f20000 {
+ compatible = "mediatek,mt8195-mdp3-padding";
+ reg = <0 0x14f20000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f2XXXX 0 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_VPP_PAD>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f21000 {
+ compatible = "mediatek,mt8195-mdp3-padding";
+ reg = <0 0x14f21000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f2XXXX 0x1000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_VPP_PAD>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ display@14f22000 {
+ compatible = "mediatek,mt8195-mdp3-padding";
+ reg = <0 0x14f22000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f2XXXX 0x2000 0x1000>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_VPP_PAD>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ };
+
+ dma-controller@14f23000 {
+ compatible = "mediatek,mt8195-mdp3-wrot", "mediatek,mt8183-mdp3-wrot";
+ reg = <0 0x14f23000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f2XXXX 0x3000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP1_MDP_WROT_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP1_MDP_WROT_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP1_MDP_WROT>;
+ iommus = <&iommu_vdo M4U_PORT_L5_SVPP1_MDP_WROT>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ #dma-cells = <1>;
+ };
+
+ dma-controller@14f24000 {
+ compatible = "mediatek,mt8195-mdp3-wrot", "mediatek,mt8183-mdp3-wrot";
+ reg = <0 0x14f24000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f2XXXX 0x4000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP2_MDP_WROT_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP2_MDP_WROT_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP2_MDP_WROT>;
+ iommus = <&iommu_vdo M4U_PORT_L5_SVPP2_MDP_WROT>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ #dma-cells = <1>;
+ };
+
+ dma-controller@14f25000 {
+ compatible = "mediatek,mt8195-mdp3-wrot", "mediatek,mt8183-mdp3-wrot";
+ reg = <0 0x14f25000 0 0x1000>;
+ mediatek,gce-client-reg = <&gce1 SUBSYS_14f2XXXX 0x5000 0x1000>;
+ mediatek,gce-events = <CMDQ_EVENT_VPP1_SVPP3_MDP_WROT_SOF>,
+ <CMDQ_EVENT_VPP1_SVPP3_MDP_WROT_FRAME_DONE>;
+ clocks = <&vppsys1 CLK_VPP1_SVPP3_MDP_WROT>;
+ iommus = <&iommu_vpp M4U_PORT_L6_SVPP3_MDP_WROT>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VPPSYS1>;
+ #dma-cells = <1>;
+ };
+
imgsys: clock-controller@15000000 {
compatible = "mediatek,mt8195-imgsys";
reg = <0 0x15000000 0 0x1000>;
@@ -2664,7 +3096,7 @@
reg = <0 0x1b010000 0 0x1000>;
mediatek,larb-id = <20>;
mediatek,smi = <&smi_common_vpp>;
- clocks = <&vencsys_core1 CLK_VENC_CORE1_LARB>,
+ clocks = <&vencsys_core1 CLK_VENC_CORE1_VENC>,
<&vencsys_core1 CLK_VENC_CORE1_GALS>,
<&vppsys0 CLK_VPP0_GALS_VDO0_VDO1_VENCSYS_CORE1>;
clock-names = "apb", "smi", "gals";
@@ -2736,6 +3168,20 @@
mediatek,gce-client-reg = <&gce0 SUBSYS_1c00XXXX 0x7000 0x1000>;
};
+ dsi0: dsi@1c008000 {
+ compatible = "mediatek,mt8195-dsi", "mediatek,mt8183-dsi";
+ reg = <0 0x1c008000 0 0x1000>;
+ interrupts = <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH 0>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS0>;
+ clocks = <&vdosys0 CLK_VDO0_DSI0>,
+ <&vdosys0 CLK_VDO0_DSI0_DSI>,
+ <&mipi_tx0>;
+ clock-names = "engine", "digital", "hs";
+ phys = <&mipi_tx0>;
+ phy-names = "dphy";
+ status = "disabled";
+ };
+
dsc0: dsc@1c009000 {
compatible = "mediatek,mt8195-disp-dsc";
reg = <0 0x1c009000 0 0x1000>;
@@ -2745,6 +3191,20 @@
mediatek,gce-client-reg = <&gce0 SUBSYS_1c00XXXX 0x9000 0x1000>;
};
+ dsi1: dsi@1c012000 {
+ compatible = "mediatek,mt8195-dsi", "mediatek,mt8183-dsi";
+ reg = <0 0x1c012000 0 0x1000>;
+ interrupts = <GIC_SPI 654 IRQ_TYPE_LEVEL_HIGH 0>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS0>;
+ clocks = <&vdosys0 CLK_VDO0_DSI1>,
+ <&vdosys0 CLK_VDO0_DSI1_DSI>,
+ <&mipi_tx1>;
+ clock-names = "engine", "digital", "hs";
+ phys = <&mipi_tx1>;
+ phy-names = "dphy";
+ status = "disabled";
+ };
+
merge0: merge@1c014000 {
compatible = "mediatek,mt8195-disp-merge";
reg = <0 0x1c014000 0 0x1000>;
@@ -2868,7 +3328,7 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
};
- vdo1_rdma0: rdma@1c104000 {
+ vdo1_rdma0: dma-controller@1c104000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c104000 0 0x1000>;
interrupts = <GIC_SPI 495 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2876,9 +3336,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vdo M4U_PORT_L2_MDP_RDMA0>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x4000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma1: rdma@1c105000 {
+ vdo1_rdma1: dma-controller@1c105000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c105000 0 0x1000>;
interrupts = <GIC_SPI 496 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2886,9 +3347,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vpp M4U_PORT_L3_MDP_RDMA1>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x5000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma2: rdma@1c106000 {
+ vdo1_rdma2: dma-controller@1c106000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c106000 0 0x1000>;
interrupts = <GIC_SPI 497 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2896,9 +3358,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vdo M4U_PORT_L2_MDP_RDMA2>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x6000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma3: rdma@1c107000 {
+ vdo1_rdma3: dma-controller@1c107000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c107000 0 0x1000>;
interrupts = <GIC_SPI 498 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2906,9 +3369,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vpp M4U_PORT_L3_MDP_RDMA3>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x7000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma4: rdma@1c108000 {
+ vdo1_rdma4: dma-controller@1c108000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c108000 0 0x1000>;
interrupts = <GIC_SPI 499 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2916,9 +3380,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vdo M4U_PORT_L2_MDP_RDMA4>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x8000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma5: rdma@1c109000 {
+ vdo1_rdma5: dma-controller@1c109000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c109000 0 0x1000>;
interrupts = <GIC_SPI 500 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2926,9 +3391,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vpp M4U_PORT_L3_MDP_RDMA5>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x9000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma6: rdma@1c10a000 {
+ vdo1_rdma6: dma-controller@1c10a000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c10a000 0 0x1000>;
interrupts = <GIC_SPI 501 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2936,9 +3402,10 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vdo M4U_PORT_L2_MDP_RDMA6>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0xa000 0x1000>;
+ #dma-cells = <1>;
};
- vdo1_rdma7: rdma@1c10b000 {
+ vdo1_rdma7: dma-controller@1c10b000 {
compatible = "mediatek,mt8195-vdo1-rdma";
reg = <0 0x1c10b000 0 0x1000>;
interrupts = <GIC_SPI 502 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -2946,6 +3413,7 @@
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
iommus = <&iommu_vpp M4U_PORT_L3_MDP_RDMA7>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0xb000 0x1000>;
+ #dma-cells = <1>;
};
merge1: vpp-merge@1c10c000 {
@@ -2957,7 +3425,7 @@
clock-names = "merge","merge_async";
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0xc000 0x1000>;
- mediatek,merge-mute = <1>;
+ mediatek,merge-mute;
resets = <&vdosys1 MT8195_VDOSYS1_SW0_RST_B_MERGE0_DL_ASYNC>;
};
@@ -2970,7 +3438,7 @@
clock-names = "merge","merge_async";
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0xd000 0x1000>;
- mediatek,merge-mute = <1>;
+ mediatek,merge-mute;
resets = <&vdosys1 MT8195_VDOSYS1_SW0_RST_B_MERGE1_DL_ASYNC>;
};
@@ -2983,7 +3451,7 @@
clock-names = "merge","merge_async";
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0xe000 0x1000>;
- mediatek,merge-mute = <1>;
+ mediatek,merge-mute;
resets = <&vdosys1 MT8195_VDOSYS1_SW0_RST_B_MERGE2_DL_ASYNC>;
};
@@ -2996,7 +3464,7 @@
clock-names = "merge","merge_async";
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0xf000 0x1000>;
- mediatek,merge-mute = <1>;
+ mediatek,merge-mute;
resets = <&vdosys1 MT8195_VDOSYS1_SW0_RST_B_MERGE3_DL_ASYNC>;
};
@@ -3009,7 +3477,7 @@
clock-names = "merge","merge_async";
power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0x0000 0x1000>;
- mediatek,merge-fifo-en = <1>;
+ mediatek,merge-fifo-en;
resets = <&vdosys1 MT8195_VDOSYS1_SW0_RST_B_MERGE4_DL_ASYNC>;
};
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8365.dtsi b/sys/contrib/device-tree/src/arm64/mediatek/mt8365.dtsi
index 413496c92069..24581f7410aa 100644
--- a/sys/contrib/device-tree/src/arm64/mediatek/mt8365.dtsi
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8365.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/power/mediatek,mt8365-power.h>
/ {
compatible = "mediatek,mt8365";
@@ -298,6 +299,119 @@
reg = <0 0x10005000 0 0x1000>;
};
+ scpsys: syscon@10006000 {
+ compatible = "mediatek,mt8365-syscfg", "syscon", "simple-mfd";
+ reg = <0 0x10006000 0 0x1000>;
+ #power-domain-cells = <1>;
+
+ /* System Power Manager */
+ spm: power-controller {
+ compatible = "mediatek,mt8365-power-controller";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #power-domain-cells = <1>;
+
+ /* power domains of the SoC */
+ power-domain@MT8365_POWER_DOMAIN_MM {
+ reg = <MT8365_POWER_DOMAIN_MM>;
+ clocks = <&topckgen CLK_TOP_MM_SEL>,
+ <&mmsys CLK_MM_MM_SMI_COMMON>,
+ <&mmsys CLK_MM_MM_SMI_COMM0>,
+ <&mmsys CLK_MM_MM_SMI_COMM1>,
+ <&mmsys CLK_MM_MM_SMI_LARB0>;
+ clock-names = "mm", "mm-0", "mm-1",
+ "mm-2", "mm-3";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ mediatek,infracfg-nao = <&infracfg_nao>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ power-domain@MT8365_POWER_DOMAIN_CAM {
+ reg = <MT8365_POWER_DOMAIN_CAM>;
+ clocks = <&camsys CLK_CAM_LARB2>,
+ <&camsys CLK_CAM_SENIF>,
+ <&camsys CLK_CAMSV0>,
+ <&camsys CLK_CAMSV1>,
+ <&camsys CLK_CAM_FDVT>,
+ <&camsys CLK_CAM_WPE>;
+ clock-names = "cam-0", "cam-1",
+ "cam-2", "cam-3",
+ "cam-4", "cam-5";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ mediatek,smi = <&smi_common>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_VDEC {
+ reg = <MT8365_POWER_DOMAIN_VDEC>;
+ #power-domain-cells = <0>;
+ mediatek,smi = <&smi_common>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_VENC {
+ reg = <MT8365_POWER_DOMAIN_VENC>;
+ #power-domain-cells = <0>;
+ mediatek,smi = <&smi_common>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_APU {
+ reg = <MT8365_POWER_DOMAIN_APU>;
+ clocks = <&infracfg CLK_IFR_APU_AXI>,
+ <&apu CLK_APU_IPU_CK>,
+ <&apu CLK_APU_AXI>,
+ <&apu CLK_APU_JTAG>,
+ <&apu CLK_APU_IF_CK>,
+ <&apu CLK_APU_EDMA>,
+ <&apu CLK_APU_AHB>;
+ clock-names = "apu", "apu-0",
+ "apu-1", "apu-2",
+ "apu-3", "apu-4",
+ "apu-5";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ mediatek,smi = <&smi_common>;
+ };
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_CONN {
+ reg = <MT8365_POWER_DOMAIN_CONN>;
+ clocks = <&topckgen CLK_TOP_CONN_32K>,
+ <&topckgen CLK_TOP_CONN_26M>;
+ clock-names = "conn", "conn1";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_MFG {
+ reg = <MT8365_POWER_DOMAIN_MFG>;
+ clocks = <&topckgen CLK_TOP_MFG_SEL>;
+ clock-names = "mfg";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_AUDIO {
+ reg = <MT8365_POWER_DOMAIN_AUDIO>;
+ clocks = <&topckgen CLK_TOP_AUD_INTBUS_SEL>,
+ <&infracfg CLK_IFR_AUDIO>,
+ <&infracfg CLK_IFR_AUD_26M_BK>;
+ clock-names = "audio", "audio1", "audio2";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_DSP {
+ reg = <MT8365_POWER_DOMAIN_DSP>;
+ clocks = <&topckgen CLK_TOP_DSP_SEL>,
+ <&topckgen CLK_TOP_DSP_26M>;
+ clock-names = "dsp", "dsp1";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+ };
+ };
+
watchdog: watchdog@10007000 {
compatible = "mediatek,mt8365-wdt", "mediatek,mt6589-wdt";
reg = <0 0x10007000 0 0x100>;
@@ -357,6 +471,14 @@
reg = <0 0x10200a80 0 0x20>;
};
+ iommu: iommu@10205000 {
+ compatible = "mediatek,mt8365-m4u";
+ reg = <0 0x10205000 0 0x1000>;
+ interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_LOW>;
+ mediatek,larbs = <&larb0>, <&larb1>, <&larb2>, <&larb3>;
+ #iommu-cells = <1>;
+ };
+
infracfg_nao: infracfg@1020e000 {
compatible = "mediatek,mt8365-infracfg", "syscon";
reg = <0 0x1020e000 0 0x1000>;
@@ -603,6 +725,94 @@
#phy-cells = <1>;
};
};
+
+ mmsys: syscon@14000000 {
+ compatible = "mediatek,mt8365-mmsys", "syscon";
+ reg = <0 0x14000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ smi_common: smi@14002000 {
+ compatible = "mediatek,mt8365-smi-common";
+ reg = <0 0x14002000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MM_SMI_COMMON>,
+ <&mmsys CLK_MM_MM_SMI_COMMON>,
+ <&mmsys CLK_MM_MM_SMI_COMM0>,
+ <&mmsys CLK_MM_MM_SMI_COMM1>;
+ clock-names = "apb", "smi", "gals0", "gals1";
+ power-domains = <&spm MT8365_POWER_DOMAIN_MM>;
+ };
+
+ larb0: larb@14003000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x14003000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&mmsys CLK_MM_MM_SMI_LARB0>,
+ <&mmsys CLK_MM_MM_SMI_LARB0>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_MM>;
+ mediatek,larb-id = <0>;
+ };
+
+ camsys: syscon@15000000 {
+ compatible = "mediatek,mt8365-imgsys", "syscon";
+ reg = <0 0x15000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ larb2: larb@15001000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x15001000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&mmsys CLK_MM_MM_SMI_IMG>,
+ <&camsys CLK_CAM_LARB2>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_CAM>;
+ mediatek,larb-id = <2>;
+ };
+
+ vdecsys: syscon@16000000 {
+ compatible = "mediatek,mt8365-vdecsys", "syscon";
+ reg = <0 0x16000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ larb3: larb@16010000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x16010000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&vdecsys CLK_VDEC_LARB1>,
+ <&vdecsys CLK_VDEC_LARB1>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_VDEC>;
+ mediatek,larb-id = <3>;
+ };
+
+ vencsys: syscon@17000000 {
+ compatible = "mediatek,mt8365-vencsys", "syscon";
+ reg = <0 0x17000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ larb1: larb@17010000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x17010000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&vencsys CLK_VENC>, <&vencsys CLK_VENC>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_VENC>;
+ mediatek,larb-id = <1>;
+ };
+
+ apu: syscon@19020000 {
+ compatible = "mediatek,mt8365-apu", "syscon";
+ reg = <0 0x19020000 0 0x1000>;
+ #clock-cells = <1>;
+ };
};
timer {
diff --git a/sys/contrib/device-tree/src/arm64/mediatek/mt8395-genio-1200-evk.dts b/sys/contrib/device-tree/src/arm64/mediatek/mt8395-genio-1200-evk.dts
new file mode 100644
index 000000000000..7fc515a07c65
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/mediatek/mt8395-genio-1200-evk.dts
@@ -0,0 +1,900 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ * Author: Ben Lok <ben.lok@mediatek.com>
+ * Macpaul Lin <macpaul.lin@mediatek.com>
+ */
+/dts-v1/;
+
+#include "mt8195.dtsi"
+#include "mt6359.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/mt8195-pinfunc.h>
+#include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
+#include <dt-bindings/spmi/spmi.h>
+#include <dt-bindings/usb/pd.h>
+
+/ {
+ model = "MediaTek Genio 1200 EVK-P1V2-EMMC";
+ compatible = "mediatek,mt8395-evk", "mediatek,mt8395",
+ "mediatek,mt8195";
+
+ aliases {
+ serial0 = &uart0;
+ ethernet0 = &eth;
+ };
+
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ firmware {
+ optee {
+ compatible = "linaro,optee-tz";
+ method = "smc";
+ };
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0x2 0x00000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /*
+ * 12 MiB reserved for OP-TEE (BL32)
+ * +-----------------------+ 0x43e0_0000
+ * | SHMEM 2MiB |
+ * +-----------------------+ 0x43c0_0000
+ * | | TA_RAM 8MiB |
+ * + TZDRAM +--------------+ 0x4340_0000
+ * | | TEE_RAM 2MiB |
+ * +-----------------------+ 0x4320_0000
+ */
+ optee_reserved: optee@43200000 {
+ no-map;
+ reg = <0 0x43200000 0 0x00c00000>;
+ };
+
+ scp_mem: memory@50000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x50000000 0 0x2900000>;
+ no-map;
+ };
+
+ vpu_mem: memory@53000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x53000000 0 0x1400000>; /* 20 MB */
+ };
+
+ /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_mem: memory@54600000 {
+ no-map;
+ reg = <0 0x54600000 0x0 0x200000>;
+ };
+
+ snd_dma_mem: memory@60000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x60000000 0 0x1100000>;
+ no-map;
+ };
+
+ apu_mem: memory@62000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x62000000 0 0x1400000>; /* 20 MB */
+ };
+ };
+
+ backlight_lcd0: backlight-lcd0 {
+ compatible = "pwm-backlight";
+ pwms = <&disp_pwm0 0 500000>;
+ enable-gpios = <&pio 47 GPIO_ACTIVE_HIGH>;
+ brightness-levels = <0 1023>;
+ num-interpolated-steps = <1023>;
+ default-brightness-level = <576>;
+ };
+
+ backlight_lcd1: backlight-lcd1 {
+ compatible = "pwm-backlight";
+ pwms = <&disp_pwm1 0 500000>;
+ enable-gpios = <&pio 46 GPIO_ACTIVE_HIGH>;
+ brightness-levels = <0 1023>;
+ num-interpolated-steps = <1023>;
+ default-brightness-level = <576>;
+ };
+
+ can_clk: can-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <20000000>;
+ clock-output-names = "can-clk";
+ };
+
+ edp_panel_fixed_3v3: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "edp_panel_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ enable-active-high;
+ gpio = <&pio 6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&edp_panel_3v3_en_pins>;
+ };
+
+ edp_panel_fixed_12v: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "edp_backlight_12v";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ enable-active-high;
+ gpio = <&pio 96 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&edp_panel_12v_en_pins>;
+ };
+
+ keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ button-volume-up {
+ wakeup-source;
+ debounce-interval = <100>;
+ gpios = <&pio 106 GPIO_ACTIVE_LOW>;
+ label = "volume_up";
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ wifi_fixed_3v3: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "wifi_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+};
+
+&disp_pwm0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0_default_pins>;
+ status = "okay";
+};
+
+&dmic_codec {
+ wakeup-delay-ms = <200>;
+};
+
+&eth {
+ phy-mode ="rgmii-rxid";
+ phy-handle = <&eth_phy0>;
+ snps,reset-gpio = <&pio 93 GPIO_ACTIVE_HIGH>;
+ snps,reset-delays-us = <0 10000 10000>;
+ mediatek,tx-delay-ps = <2030>;
+ mediatek,mac-wol;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&eth_default_pins>;
+ pinctrl-1 = <&eth_sleep_pins>;
+ status = "okay";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ eth_phy0: eth-phy0@1 {
+ compatible = "ethernet-phy-id001c.c916";
+ reg = <0x1>;
+ };
+ };
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&i2c0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&i2c1 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&i2c1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ touchscreen@5d {
+ compatible = "goodix,gt9271";
+ reg = <0x5d>;
+ interrupts-extended = <&pio 132 IRQ_TYPE_EDGE_RISING>;
+ irq-gpios = <&pio 132 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 133 GPIO_ACTIVE_HIGH>;
+ AVDD28-supply = <&mt6360_ldo1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touch_pins>;
+ };
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&i2c2_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&i2c6 {
+ clock-frequency = <400000>;
+ pinctrl-0 = <&i2c6_pins>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ mt6360: pmic@34 {
+ compatible = "mediatek,mt6360";
+ reg = <0x34>;
+ interrupt-parent = <&pio>;
+ interrupts = <128 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-names = "IRQB";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ pinctrl-0 = <&mt6360_pins>;
+
+ charger {
+ compatible = "mediatek,mt6360-chg";
+ richtek,vinovp-microvolt = <14500000>;
+
+ otg_vbus_regulator: usb-otg-vbus-regulator {
+ regulator-name = "usb-otg-vbus";
+ regulator-min-microvolt = <4425000>;
+ regulator-max-microvolt = <5825000>;
+ };
+ };
+
+ regulator {
+ compatible = "mediatek,mt6360-regulator";
+ LDO_VIN3-supply = <&mt6360_buck2>;
+
+ mt6360_buck1: buck1 {
+ regulator-name = "emi_vdd2";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP
+ MT6360_OPMODE_ULP>;
+ regulator-always-on;
+ };
+
+ mt6360_buck2: buck2 {
+ regulator-name = "emi_vddq";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP
+ MT6360_OPMODE_ULP>;
+ regulator-always-on;
+ };
+
+ mt6360_ldo1: ldo1 {
+ regulator-name = "tp1_p3v0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ regulator-always-on;
+ };
+
+ mt6360_ldo2: ldo2 {
+ regulator-name = "panel1_p1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_ldo3: ldo3 {
+ regulator-name = "vmc_pmu";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_ldo5: ldo5 {
+ regulator-name = "vmch_pmu";
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ /* This is a measure point, which name is mt6360_ldo1 on schematic */
+ mt6360_ldo6: ldo6 {
+ regulator-name = "mt6360_ldo1";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <2100000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_ldo7: ldo7 {
+ regulator-name = "emi_vmddr_en";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <2100000>;
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&mfg0 {
+ domain-supply = <&mt6315_7_vbuck1>;
+};
+
+&mmc0 {
+ status = "okay";
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_default_pins>;
+ pinctrl-1 = <&mmc0_uhs_pins>;
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ cap-mmc-hw-reset;
+ no-sdio;
+ no-sd;
+ hs400-ds-delay = <0x14c11>;
+ vmmc-supply = <&mt6359_vemc_1_ldo_reg>;
+ vqmmc-supply = <&mt6359_vufs_ldo_reg>;
+ non-removable;
+};
+
+&mmc1 {
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc1_default_pins>;
+ pinctrl-1 = <&mmc1_uhs_pins>;
+ bus-width = <4>;
+ max-frequency = <200000000>;
+ cap-sd-highspeed;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ no-mmc;
+ no-sdio;
+ vmmc-supply = <&mt6360_ldo5>;
+ vqmmc-supply = <&mt6360_ldo3>;
+ status = "okay";
+ non-removable;
+};
+
+&mt6359_vaud18_ldo_reg {
+ regulator-always-on;
+};
+
+&mt6359_vbbck_ldo_reg {
+ regulator-always-on;
+};
+
+/* For USB Hub */
+&mt6359_vcamio_ldo_reg {
+ regulator-always-on;
+};
+
+&mt6359_vcn33_2_bt_ldo_reg {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+};
+
+&mt6359_vcore_buck_reg {
+ regulator-always-on;
+};
+
+&mt6359_vgpu11_buck_reg {
+ regulator-always-on;
+};
+
+&mt6359_vpu_buck_reg {
+ regulator-always-on;
+};
+
+&mt6359_vrf12_ldo_reg {
+ regulator-always-on;
+};
+
+&mt6359codec {
+ mediatek,mic-type-0 = <1>; /* ACC */
+ mediatek,mic-type-1 = <3>; /* DCC */
+ mediatek,mic-type-2 = <1>; /* ACC */
+};
+
+&pcie0 {
+ pinctrl-names = "default", "idle";
+ pinctrl-0 = <&pcie0_default_pins>;
+ pinctrl-1 = <&pcie0_idle_pins>;
+ status = "okay";
+};
+
+&pcie1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_default_pins>;
+ status = "disabled";
+};
+
+&pciephy {
+ status = "okay";
+};
+
+&pio {
+ audio_default_pins: audio-default-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO61__FUNC_DMIC1_CLK>,
+ <PINMUX_GPIO62__FUNC_DMIC1_DAT>,
+ <PINMUX_GPIO65__FUNC_PCM_DO>,
+ <PINMUX_GPIO66__FUNC_PCM_CLK>,
+ <PINMUX_GPIO67__FUNC_PCM_DI>,
+ <PINMUX_GPIO68__FUNC_PCM_SYNC>,
+ <PINMUX_GPIO69__FUNC_AUD_CLK_MOSI>,
+ <PINMUX_GPIO70__FUNC_AUD_SYNC_MOSI>,
+ <PINMUX_GPIO71__FUNC_AUD_DAT_MOSI0>,
+ <PINMUX_GPIO72__FUNC_AUD_DAT_MOSI1>,
+ <PINMUX_GPIO73__FUNC_AUD_DAT_MISO0>,
+ <PINMUX_GPIO74__FUNC_AUD_DAT_MISO1>,
+ <PINMUX_GPIO75__FUNC_AUD_DAT_MISO2>;
+ };
+ };
+
+ disp_pwm1_default_pins: disp-pwm1-default-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO104__FUNC_DISP_PWM1>;
+ };
+ };
+
+ edp_panel_12v_en_pins: edp-panel-12v-en-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO96__FUNC_GPIO96>;
+ output-high;
+ };
+ };
+
+ edp_panel_3v3_en_pins: edp-panel-3v3-en-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
+ output-high;
+ };
+ };
+
+ eth_default_pins: eth-default-pins {
+ pins-cc {
+ pinmux = <PINMUX_GPIO85__FUNC_GBE_TXC>,
+ <PINMUX_GPIO86__FUNC_GBE_RXC>,
+ <PINMUX_GPIO87__FUNC_GBE_RXDV>,
+ <PINMUX_GPIO88__FUNC_GBE_TXEN>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ };
+
+ pins-mdio {
+ pinmux = <PINMUX_GPIO89__FUNC_GBE_MDC>,
+ <PINMUX_GPIO90__FUNC_GBE_MDIO>;
+ input-enable;
+ };
+
+ pins-power {
+ pinmux = <PINMUX_GPIO91__FUNC_GPIO91>,
+ <PINMUX_GPIO92__FUNC_GPIO92>;
+ output-high;
+ };
+
+ pins-rxd {
+ pinmux = <PINMUX_GPIO81__FUNC_GBE_RXD3>,
+ <PINMUX_GPIO82__FUNC_GBE_RXD2>,
+ <PINMUX_GPIO83__FUNC_GBE_RXD1>,
+ <PINMUX_GPIO84__FUNC_GBE_RXD0>;
+ };
+
+ pins-txd {
+ pinmux = <PINMUX_GPIO77__FUNC_GBE_TXD3>,
+ <PINMUX_GPIO78__FUNC_GBE_TXD2>,
+ <PINMUX_GPIO79__FUNC_GBE_TXD1>,
+ <PINMUX_GPIO80__FUNC_GBE_TXD0>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ };
+ };
+
+ eth_sleep_pins: eth-sleep-pins {
+ pins-cc {
+ pinmux = <PINMUX_GPIO85__FUNC_GPIO85>,
+ <PINMUX_GPIO86__FUNC_GPIO86>,
+ <PINMUX_GPIO87__FUNC_GPIO87>,
+ <PINMUX_GPIO88__FUNC_GPIO88>;
+ };
+
+ pins-mdio {
+ pinmux = <PINMUX_GPIO89__FUNC_GPIO89>,
+ <PINMUX_GPIO90__FUNC_GPIO90>;
+ input-disable;
+ bias-disable;
+ };
+
+ pins-rxd {
+ pinmux = <PINMUX_GPIO81__FUNC_GPIO81>,
+ <PINMUX_GPIO82__FUNC_GPIO82>,
+ <PINMUX_GPIO83__FUNC_GPIO83>,
+ <PINMUX_GPIO84__FUNC_GPIO84>;
+ };
+
+ pins-txd {
+ pinmux = <PINMUX_GPIO77__FUNC_GPIO77>,
+ <PINMUX_GPIO78__FUNC_GPIO78>,
+ <PINMUX_GPIO79__FUNC_GPIO79>,
+ <PINMUX_GPIO80__FUNC_GPIO80>;
+ };
+ };
+
+ gpio_key_pins: gpio-keys-pins {
+ pins {
+ pinmux = <PINMUX_GPIO106__FUNC_GPIO106>;
+ bias-pull-up;
+ input-enable;
+ };
+ };
+
+ i2c0_pins: i2c0-pins {
+ pins {
+ pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+ <PINMUX_GPIO9__FUNC_SCL0>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_111>;
+ drive-strength-microamp = <1000>;
+ };
+ };
+
+ i2c1_pins: i2c1-pins {
+ pins {
+ pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
+ <PINMUX_GPIO11__FUNC_SCL1>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_111>;
+ drive-strength-microamp = <1000>;
+ };
+ };
+
+ i2c2_pins: i2c2-pins {
+ pins {
+ pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
+ <PINMUX_GPIO13__FUNC_SCL2>;
+ bias-pull-up = <MTK_PULL_SET_RSEL_111>;
+ drive-strength = <MTK_DRIVE_6mA>;
+ };
+ };
+
+ i2c6_pins: i2c6-pins {
+ pins {
+ pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
+ <PINMUX_GPIO26__FUNC_SCL6>;
+ bias-pull-up;
+ };
+ };
+
+ mmc0_default_pins: mmc0-default-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO122__FUNC_MSDC0_CLK>;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
+ <PINMUX_GPIO125__FUNC_MSDC0_DAT1>,
+ <PINMUX_GPIO124__FUNC_MSDC0_DAT2>,
+ <PINMUX_GPIO123__FUNC_MSDC0_DAT3>,
+ <PINMUX_GPIO119__FUNC_MSDC0_DAT4>,
+ <PINMUX_GPIO118__FUNC_MSDC0_DAT5>,
+ <PINMUX_GPIO117__FUNC_MSDC0_DAT6>,
+ <PINMUX_GPIO116__FUNC_MSDC0_DAT7>,
+ <PINMUX_GPIO121__FUNC_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO120__FUNC_MSDC0_RSTB>;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc0_uhs_pins: mmc0-uhs-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO122__FUNC_MSDC0_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
+ <PINMUX_GPIO125__FUNC_MSDC0_DAT1>,
+ <PINMUX_GPIO124__FUNC_MSDC0_DAT2>,
+ <PINMUX_GPIO123__FUNC_MSDC0_DAT3>,
+ <PINMUX_GPIO119__FUNC_MSDC0_DAT4>,
+ <PINMUX_GPIO118__FUNC_MSDC0_DAT5>,
+ <PINMUX_GPIO117__FUNC_MSDC0_DAT6>,
+ <PINMUX_GPIO116__FUNC_MSDC0_DAT7>,
+ <PINMUX_GPIO121__FUNC_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-ds {
+ pinmux = <PINMUX_GPIO127__FUNC_MSDC0_DSL>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO120__FUNC_MSDC0_RSTB>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_default_pins: mmc1-default-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO111__FUNC_MSDC1_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO110__FUNC_MSDC1_CMD>,
+ <PINMUX_GPIO112__FUNC_MSDC1_DAT0>,
+ <PINMUX_GPIO113__FUNC_MSDC1_DAT1>,
+ <PINMUX_GPIO114__FUNC_MSDC1_DAT2>,
+ <PINMUX_GPIO115__FUNC_MSDC1_DAT3>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_uhs_pins: mmc1-uhs-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO111__FUNC_MSDC1_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO110__FUNC_MSDC1_CMD>,
+ <PINMUX_GPIO112__FUNC_MSDC1_DAT0>,
+ <PINMUX_GPIO113__FUNC_MSDC1_DAT1>,
+ <PINMUX_GPIO114__FUNC_MSDC1_DAT2>,
+ <PINMUX_GPIO115__FUNC_MSDC1_DAT3>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mt6360_pins: mt6360-pins {
+ pins {
+ pinmux = <PINMUX_GPIO17__FUNC_GPIO17>,
+ <PINMUX_GPIO128__FUNC_GPIO128>;
+ input-enable;
+ bias-pull-up;
+ };
+ };
+
+ pcie0_default_pins: pcie0-default-pins {
+ pins {
+ pinmux = <PINMUX_GPIO19__FUNC_WAKEN>,
+ <PINMUX_GPIO20__FUNC_PERSTN>,
+ <PINMUX_GPIO21__FUNC_CLKREQN>;
+ bias-pull-up;
+ };
+ };
+
+ pcie0_idle_pins: pcie0-idle-pins {
+ pins {
+ pinmux = <PINMUX_GPIO20__FUNC_GPIO20>;
+ bias-disable;
+ output-low;
+ };
+ };
+
+ pcie1_default_pins: pcie1-default-pins {
+ pins {
+ pinmux = <PINMUX_GPIO22__FUNC_PERSTN_1>,
+ <PINMUX_GPIO23__FUNC_CLKREQN_1>,
+ <PINMUX_GPIO24__FUNC_WAKEN_1>;
+ bias-pull-up;
+ };
+ };
+
+ pwm0_default_pins: pwm0-default-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO97__FUNC_DISP_PWM0>;
+ };
+ };
+
+ spi1_pins: spi1-pins {
+ pins {
+ pinmux = <PINMUX_GPIO136__FUNC_SPIM1_CSB>,
+ <PINMUX_GPIO137__FUNC_SPIM1_CLK>,
+ <PINMUX_GPIO138__FUNC_SPIM1_MO>,
+ <PINMUX_GPIO139__FUNC_SPIM1_MI>;
+ bias-disable;
+ };
+ };
+
+ spi2_pins: spi-pins {
+ pins {
+ pinmux = <PINMUX_GPIO140__FUNC_SPIM2_CSB>,
+ <PINMUX_GPIO141__FUNC_SPIM2_CLK>,
+ <PINMUX_GPIO142__FUNC_SPIM2_MO>,
+ <PINMUX_GPIO143__FUNC_SPIM2_MI>;
+ bias-disable;
+ };
+ };
+
+ touch_pins: touch-pins {
+ pins-irq {
+ pinmux = <PINMUX_GPIO132__FUNC_GPIO132>;
+ input-enable;
+ bias-disable;
+ };
+
+ pins-reset {
+ pinmux = <PINMUX_GPIO133__FUNC_GPIO133>;
+ output-high;
+ };
+ };
+
+ uart0_pins: uart0-pins {
+ pins {
+ pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
+ <PINMUX_GPIO99__FUNC_URXD0>;
+ };
+ };
+
+ uart1_pins: uart1-pins {
+ pins {
+ pinmux = <PINMUX_GPIO100__FUNC_URTS1>,
+ <PINMUX_GPIO101__FUNC_UCTS1>,
+ <PINMUX_GPIO102__FUNC_UTXD1>,
+ <PINMUX_GPIO103__FUNC_URXD1>;
+ };
+ };
+};
+
+&pmic {
+ interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&scp {
+ memory-region = <&scp_mem>;
+ status = "okay";
+};
+
+&spi1 {
+ pinctrl-0 = <&spi1_pins>;
+ pinctrl-names = "default";
+ mediatek,pad-select = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ cs-gpios = <&pio 64 GPIO_ACTIVE_LOW>;
+
+ can0: can@0 {
+ compatible = "microchip,mcp2518fd";
+ reg = <0>;
+ clocks = <&can_clk>;
+ spi-max-frequency = <20000000>;
+ interrupts-extended = <&pio 16 IRQ_TYPE_LEVEL_LOW>;
+ vdd-supply = <&mt6359_vcn33_2_bt_ldo_reg>;
+ xceiver-supply = <&mt6359_vcn33_2_bt_ldo_reg>;
+ };
+};
+
+&spi2 {
+ pinctrl-0 = <&spi2_pins>;
+ pinctrl-names = "default";
+ mediatek,pad-select = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+};
+
+&spmi {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ mt6315_6: pmic@6 {
+ compatible = "mediatek,mt6315-regulator";
+ reg = <0x6 SPMI_USID>;
+
+ regulators {
+ mt6315_6_vbuck1: vbuck1 {
+ regulator-compatible = "vbuck1";
+ regulator-name = "Vbcpu";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1193750>;
+ regulator-enable-ramp-delay = <256>;
+ regulator-allowed-modes = <0 1 2>;
+ regulator-always-on;
+ };
+ };
+ };
+
+ mt6315_7: pmic@7 {
+ compatible = "mediatek,mt6315-regulator";
+ reg = <0x7 SPMI_USID>;
+
+ regulators {
+ mt6315_7_vbuck1: vbuck1 {
+ regulator-compatible = "vbuck1";
+ regulator-name = "Vgpu";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1193750>;
+ regulator-enable-ramp-delay = <256>;
+ regulator-allowed-modes = <0 1 2>;
+ };
+ };
+ };
+};
+
+&u3phy0 {
+ status = "okay";
+};
+
+&u3phy1 {
+ status = "okay";
+};
+
+&u3phy2 {
+ status = "okay";
+};
+
+&u3phy3 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-0 = <&uart0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-0 = <&uart1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&ufsphy {
+ status = "disabled";
+};
+
+&xhci0 {
+ status = "okay";
+};
+
+&xhci1 {
+ vusb33-supply = <&mt6359_vusb_ldo_reg>;
+ status = "okay";
+};
+
+&xhci2 {
+ vusb33-supply = <&mt6359_vusb_ldo_reg>;
+ status = "okay";
+};
+
+&xhci3 {
+ vusb33-supply = <&mt6359_vusb_ldo_reg>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/microchip/sparx5.dtsi b/sys/contrib/device-tree/src/arm64/microchip/sparx5.dtsi
index 4996499cc738..24075cd91420 100644
--- a/sys/contrib/device-tree/src/arm64/microchip/sparx5.dtsi
+++ b/sys/contrib/device-tree/src/arm64/microchip/sparx5.dtsi
@@ -469,14 +469,14 @@
switch: switch@600000000 {
compatible = "microchip,sparx5-switch";
- reg = <0x6 0 0x401000>,
- <0x6 0x10004000 0x7fc000>,
- <0x6 0x11010000 0xaf0000>;
+ reg = <0x6 0 0x401000>,
+ <0x6 0x10004000 0x7fc000>,
+ <0x6 0x11010000 0xaf0000>;
reg-names = "cpu", "dev", "gcb";
interrupt-names = "xtr", "fdma", "ptp";
- interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
resets = <&reset 0>;
reset-names = "switch";
};
diff --git a/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-common-npcm8xx.dtsi b/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-common-npcm8xx.dtsi
index aa7aac8c3774..ecd171b2feba 100644
--- a/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-common-npcm8xx.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-common-npcm8xx.dtsi
@@ -68,6 +68,15 @@
ranges = <0x0 0x0 0xf0000000 0x00300000>,
<0xfff00000 0x0 0xfff00000 0x00016000>;
+ peci: peci-controller@100000 {
+ compatible = "nuvoton,npcm845-peci";
+ reg = <0x100000 0x1000>;
+ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk NPCM8XX_CLK_APB3>;
+ cmd-timeout-ms = <1000>;
+ status = "disabled";
+ };
+
timer0: timer@8000 {
compatible = "nuvoton,npcm845-timer";
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-npcm845.dtsi b/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-npcm845.dtsi
index 12118b75c0e6..383938dcd3ce 100644
--- a/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-npcm845.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nuvoton/nuvoton-npcm845.dtsi
@@ -49,6 +49,8 @@
l2: l2-cache {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra132-norrin.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra132-norrin.dts
index d4c034ac1244..bbc2e9bef08d 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra132-norrin.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra132-norrin.dts
@@ -531,6 +531,8 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra132.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra132.dtsi
index 8b78be8f4f9d..7e24a212c7e4 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra132.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra132.dtsi
@@ -93,6 +93,8 @@
resets = <&tegra_car 28>;
reset-names = "host1x";
+ iommus = <&mc TEGRA_SWGROUP_HC>;
+
#address-cells = <2>;
#size-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra186.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra186.dtsi
index 7e4c496fd91c..2b3bb5d0af17 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra186.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra186.dtsi
@@ -135,7 +135,8 @@
clocks = <&bpmp TEGRA186_CLK_AHUB>;
clock-names = "ahub";
assigned-clocks = <&bpmp TEGRA186_CLK_AHUB>;
- assigned-clock-parents = <&bpmp TEGRA186_CLK_PLL_A_OUT0>;
+ assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLP_OUT0>;
+ assigned-clock-rates = <81600000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x02900800 0x02900800 0x11800>;
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra194.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra194.dtsi
index 154fc8c0eb6d..33f92b77cd9d 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra194.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra194.dtsi
@@ -231,7 +231,8 @@
clocks = <&bpmp TEGRA194_CLK_AHUB>;
clock-names = "ahub";
assigned-clocks = <&bpmp TEGRA194_CLK_AHUB>;
- assigned-clock-parents = <&bpmp TEGRA194_CLK_PLLA_OUT0>;
+ assigned-clock-parents = <&bpmp TEGRA194_CLK_PLLP_OUT0>;
+ assigned-clock-rates = <81600000>;
status = "disabled";
#address-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2180.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2180.dtsi
index 92163b680980..0ae5a44f7d07 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2180.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2180.dtsi
@@ -28,6 +28,8 @@
/* debug port */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2371-2180.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2371-2180.dts
index 38f4ff229bef..a6a58e51822d 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2371-2180.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2371-2180.dts
@@ -58,19 +58,17 @@
dev-ctrl = /bits/ 8 <0x80>;
init-brt = /bits/ 8 <0xff>;
- pwm-period = <29334>;
-
pwms = <&pwm 0 29334>;
pwm-names = "lp8557";
/* boost frequency 1 MHz */
- rom_13h {
+ rom-13h {
rom-addr = /bits/ 8 <0x13>;
rom-val = /bits/ 8 <0x01>;
};
/* 3 LED string */
- rom_14h {
+ rom-14h {
rom-addr = /bits/ 8 <0x14>;
rom-val = /bits/ 8 <0x87>;
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2530.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2530.dtsi
index 0a70daeffd85..f0d53f0b4117 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2530.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2530.dtsi
@@ -21,6 +21,8 @@
/* debug port */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2894.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2894.dtsi
index 1f263fd32a7a..bbd6ff0564da 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2894.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p2894.dtsi
@@ -1321,6 +1321,8 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p3450-0000.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p3450-0000.dts
index c9f488e14f37..c56824d7f4d8 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p3450-0000.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-p3450-0000.dts
@@ -126,6 +126,8 @@
/* debug port */
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-smaug.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-smaug.dts
index 5a1ce432c1fb..9ebb7369256e 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210-smaug.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210-smaug.dts
@@ -31,6 +31,33 @@
};
host1x@50000000 {
+ dsia: dsi@54300000 {
+ avdd-dsi-csi-supply = <&vdd_dsi_csi>;
+ status = "okay";
+
+ link2: panel@0 {
+ compatible = "jdi,lpm102a188a";
+ reg = <0>;
+ };
+ };
+
+ dsib: dsi@54400000 {
+ avdd-dsi-csi-supply = <&vdd_dsi_csi>;
+ nvidia,ganged-mode = <&dsia>;
+ status = "okay";
+
+ link1: panel@0 {
+ compatible = "jdi,lpm102a188a";
+ reg = <0>;
+ power-supply = <&pplcd_vdd>;
+ ddi-supply = <&pp1800_lcdio>;
+ enable-gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
+ link2 = <&link2>;
+ backlight = <&backlight>;
+ };
+ };
+
dpaux: dpaux@545c0000 {
status = "okay";
};
@@ -1312,11 +1339,15 @@
};
serial@70006000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
uartd: serial@70006300 {
compatible = "nvidia,tegra30-hsuart";
+ reset-names = "serial";
+ /delete-property/ reg-shift;
status = "okay";
bluetooth {
@@ -1391,7 +1422,6 @@
maxim,dvs-default-state = <1>;
maxim,enable-active-discharge;
maxim,enable-bias-control;
- maxim,disable-etr;
maxim,enable-gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
maxim,externally-enable;
};
@@ -1648,6 +1678,37 @@
status = "okay";
};
+ backlight: backlight@2c {
+ compatible = "ti,lp8557";
+ reg = <0x2c>;
+ power-supply = <&pplcd_vdd>;
+ enable-supply = <&pp1800_lcdio>;
+ bl-name = "lp8557-backlight";
+ dev-ctrl = /bits/ 8 <0x01>;
+ init-brt = /bits/ 8 <0x80>;
+
+ /* Full scale current, 20mA */
+ rom-11h {
+ rom-addr = /bits/ 8 <0x11>;
+ rom-val = /bits/ 8 <0x05>;
+ };
+ /* Frequency = 4.9kHz, magic undocumented val */
+ rom-12h {
+ rom-addr = /bits/ 8 <0x12>;
+ rom-val = /bits/ 8 <0x29>;
+ };
+ /* Boost freq = 1MHz, BComp option = 1 */
+ rom-13h {
+ rom-addr = /bits/ 8 <0x13>;
+ rom-val = /bits/ 8 <0x03>;
+ };
+ /* 4V OV, 6 output LED string enabled */
+ rom-14h {
+ rom-addr = /bits/ 8 <0x14>;
+ rom-val = /bits/ 8 <0xbf>;
+ };
+ };
+
audio-codec@2d {
compatible = "realtek,rt5677";
reg = <0x2d>;
@@ -1929,4 +1990,12 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
+
+ vdd_dsi_csi: regulator-vdd-dsi-csi {
+ compatible = "regulator-fixed";
+ regulator-name = "AVDD_DSI_CSI_1V2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&pp1200_avdd>;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra210.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra210.dtsi
index 617583ff2736..47f8268e46bf 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra210.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra210.dtsi
@@ -916,9 +916,7 @@
pd_vic: vic {
clocks = <&tegra_car TEGRA210_CLK_VIC03>;
- clock-names = "vic";
resets = <&tegra_car 178>;
- reset-names = "vic";
#power-domain-cells = <0>;
};
@@ -1386,7 +1384,8 @@
clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
clock-names = "ahub";
assigned-clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
- assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
+ assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_P>;
+ assigned-clock-rates = <81600000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x702d0000 0x702d0000 0x0000e400>;
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0000.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0000.dtsi
index 319b3a9cff24..cb792041fc62 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0000.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0000.dtsi
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "tegra234.dtsi"
+#include "tegra234-p3701.dtsi"
/ {
model = "NVIDIA Jetson AGX Orin";
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0008.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0008.dtsi
index e468352b8b7f..553fa4ba1cd4 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0008.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701-0008.dtsi
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "tegra234.dtsi"
+#include "tegra234-p3701.dtsi"
/ {
compatible = "nvidia,p3701-0008", "nvidia,tegra234";
@@ -43,6 +44,39 @@
status = "okay";
};
+ i2c@c250000 {
+ power-sensor@41 {
+ compatible = "ti,ina3221";
+ reg = <0x41>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ input@0 {
+ reg = <0x0>;
+ label = "CVB_ATX_12V";
+ shunt-resistor-micro-ohms = <2000>;
+ };
+
+ input@1 {
+ reg = <0x1>;
+ label = "CVB_ATX_3V3";
+ shunt-resistor-micro-ohms = <2000>;
+ };
+
+ input@2 {
+ reg = <0x2>;
+ label = "CVB_ATX_5V";
+ shunt-resistor-micro-ohms = <2000>;
+ };
+ };
+
+ power-sensor@44 {
+ compatible = "ti,ina219";
+ reg = <0x44>;
+ shunt-resistor = <2000>;
+ };
+ };
+
rtc@c2a0000 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701.dtsi
new file mode 100644
index 000000000000..db6ef711674a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3701.dtsi
@@ -0,0 +1,2044 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/ {
+ compatible = "nvidia,p3701", "nvidia,tegra234";
+
+ bus@0 {
+ aconnect@2900000 {
+ status = "okay";
+
+ ahub@2900800 {
+ status = "okay";
+
+ i2s@2901000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ i2s1_cif: endpoint {
+ remote-endpoint = <&xbar_i2s1>;
+ };
+ };
+
+ i2s1_port: port@1 {
+ reg = <1>;
+
+ i2s1_dap: endpoint {
+ dai-format = "i2s";
+ /* placeholder for external codec */
+ };
+ };
+ };
+ };
+
+ i2s@2901100 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ i2s2_cif: endpoint {
+ remote-endpoint = <&xbar_i2s2>;
+ };
+ };
+
+ i2s2_port: port@1 {
+ reg = <1>;
+
+ i2s2_dap: endpoint {
+ dai-format = "i2s";
+ /* placeholder for external codec */
+ };
+ };
+ };
+ };
+
+ i2s@2901300 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ i2s4_cif: endpoint {
+ remote-endpoint = <&xbar_i2s4>;
+ };
+ };
+
+ i2s4_port: port@1 {
+ reg = <1>;
+
+ i2s4_dap: endpoint {
+ dai-format = "i2s";
+ /* placeholder for external codec */
+ };
+ };
+ };
+ };
+
+ i2s@2901500 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ i2s6_cif: endpoint {
+ remote-endpoint = <&xbar_i2s6>;
+ };
+ };
+
+ i2s6_port: port@1 {
+ reg = <1>;
+
+ i2s6_dap: endpoint {
+ dai-format = "i2s";
+ /* placeholder for external codec */
+ };
+ };
+ };
+ };
+
+ sfc@2902000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sfc1_cif_in: endpoint {
+ remote-endpoint = <&xbar_sfc1_in>;
+ };
+ };
+
+ sfc1_out_port: port@1 {
+ reg = <1>;
+
+ sfc1_cif_out: endpoint {
+ remote-endpoint = <&xbar_sfc1_out>;
+ };
+ };
+ };
+ };
+
+ sfc@2902200 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sfc2_cif_in: endpoint {
+ remote-endpoint = <&xbar_sfc2_in>;
+ };
+ };
+
+ sfc2_out_port: port@1 {
+ reg = <1>;
+
+ sfc2_cif_out: endpoint {
+ remote-endpoint = <&xbar_sfc2_out>;
+ };
+ };
+ };
+ };
+
+ sfc@2902400 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sfc3_cif_in: endpoint {
+ remote-endpoint = <&xbar_sfc3_in>;
+ };
+ };
+
+ sfc3_out_port: port@1 {
+ reg = <1>;
+
+ sfc3_cif_out: endpoint {
+ remote-endpoint = <&xbar_sfc3_out>;
+ };
+ };
+ };
+ };
+
+ sfc@2902600 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sfc4_cif_in: endpoint {
+ remote-endpoint = <&xbar_sfc4_in>;
+ };
+ };
+
+ sfc4_out_port: port@1 {
+ reg = <1>;
+
+ sfc4_cif_out: endpoint {
+ remote-endpoint = <&xbar_sfc4_out>;
+ };
+ };
+ };
+ };
+
+ amx@2903000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ amx1_in1: endpoint {
+ remote-endpoint = <&xbar_amx1_in1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ amx1_in2: endpoint {
+ remote-endpoint = <&xbar_amx1_in2>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ amx1_in3: endpoint {
+ remote-endpoint = <&xbar_amx1_in3>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ amx1_in4: endpoint {
+ remote-endpoint = <&xbar_amx1_in4>;
+ };
+ };
+
+ amx1_out_port: port@4 {
+ reg = <4>;
+
+ amx1_out: endpoint {
+ remote-endpoint = <&xbar_amx1_out>;
+ };
+ };
+ };
+ };
+
+ amx@2903100 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ amx2_in1: endpoint {
+ remote-endpoint = <&xbar_amx2_in1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ amx2_in2: endpoint {
+ remote-endpoint = <&xbar_amx2_in2>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ amx2_in3: endpoint {
+ remote-endpoint = <&xbar_amx2_in3>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ amx2_in4: endpoint {
+ remote-endpoint = <&xbar_amx2_in4>;
+ };
+ };
+
+ amx2_out_port: port@4 {
+ reg = <4>;
+
+ amx2_out: endpoint {
+ remote-endpoint = <&xbar_amx2_out>;
+ };
+ };
+ };
+ };
+
+ amx@2903200 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ amx3_in1: endpoint {
+ remote-endpoint = <&xbar_amx3_in1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ amx3_in2: endpoint {
+ remote-endpoint = <&xbar_amx3_in2>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ amx3_in3: endpoint {
+ remote-endpoint = <&xbar_amx3_in3>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ amx3_in4: endpoint {
+ remote-endpoint = <&xbar_amx3_in4>;
+ };
+ };
+
+ amx3_out_port: port@4 {
+ reg = <4>;
+
+ amx3_out: endpoint {
+ remote-endpoint = <&xbar_amx3_out>;
+ };
+ };
+ };
+ };
+
+ amx@2903300 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ amx4_in1: endpoint {
+ remote-endpoint = <&xbar_amx4_in1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ amx4_in2: endpoint {
+ remote-endpoint = <&xbar_amx4_in2>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ amx4_in3: endpoint {
+ remote-endpoint = <&xbar_amx4_in3>;
+ };
+ };
+
+ port@3 {
+ reg = <3>;
+
+ amx4_in4: endpoint {
+ remote-endpoint = <&xbar_amx4_in4>;
+ };
+ };
+
+ amx4_out_port: port@4 {
+ reg = <4>;
+
+ amx4_out: endpoint {
+ remote-endpoint = <&xbar_amx4_out>;
+ };
+ };
+ };
+ };
+
+ adx@2903800 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adx1_in: endpoint {
+ remote-endpoint = <&xbar_adx1_in>;
+ };
+ };
+
+ adx1_out1_port: port@1 {
+ reg = <1>;
+
+ adx1_out1: endpoint {
+ remote-endpoint = <&xbar_adx1_out1>;
+ };
+ };
+
+ adx1_out2_port: port@2 {
+ reg = <2>;
+
+ adx1_out2: endpoint {
+ remote-endpoint = <&xbar_adx1_out2>;
+ };
+ };
+
+ adx1_out3_port: port@3 {
+ reg = <3>;
+
+ adx1_out3: endpoint {
+ remote-endpoint = <&xbar_adx1_out3>;
+ };
+ };
+
+ adx1_out4_port: port@4 {
+ reg = <4>;
+
+ adx1_out4: endpoint {
+ remote-endpoint = <&xbar_adx1_out4>;
+ };
+ };
+ };
+ };
+
+ adx@2903900 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adx2_in: endpoint {
+ remote-endpoint = <&xbar_adx2_in>;
+ };
+ };
+
+ adx2_out1_port: port@1 {
+ reg = <1>;
+
+ adx2_out1: endpoint {
+ remote-endpoint = <&xbar_adx2_out1>;
+ };
+ };
+
+ adx2_out2_port: port@2 {
+ reg = <2>;
+
+ adx2_out2: endpoint {
+ remote-endpoint = <&xbar_adx2_out2>;
+ };
+ };
+
+ adx2_out3_port: port@3 {
+ reg = <3>;
+
+ adx2_out3: endpoint {
+ remote-endpoint = <&xbar_adx2_out3>;
+ };
+ };
+
+ adx2_out4_port: port@4 {
+ reg = <4>;
+
+ adx2_out4: endpoint {
+ remote-endpoint = <&xbar_adx2_out4>;
+ };
+ };
+ };
+ };
+
+ adx@2903a00 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adx3_in: endpoint {
+ remote-endpoint = <&xbar_adx3_in>;
+ };
+ };
+
+ adx3_out1_port: port@1 {
+ reg = <1>;
+
+ adx3_out1: endpoint {
+ remote-endpoint = <&xbar_adx3_out1>;
+ };
+ };
+
+ adx3_out2_port: port@2 {
+ reg = <2>;
+
+ adx3_out2: endpoint {
+ remote-endpoint = <&xbar_adx3_out2>;
+ };
+ };
+
+ adx3_out3_port: port@3 {
+ reg = <3>;
+
+ adx3_out3: endpoint {
+ remote-endpoint = <&xbar_adx3_out3>;
+ };
+ };
+
+ adx3_out4_port: port@4 {
+ reg = <4>;
+
+ adx3_out4: endpoint {
+ remote-endpoint = <&xbar_adx3_out4>;
+ };
+ };
+ };
+ };
+
+ adx@2903b00 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ adx4_in: endpoint {
+ remote-endpoint = <&xbar_adx4_in>;
+ };
+ };
+
+ adx4_out1_port: port@1 {
+ reg = <1>;
+
+ adx4_out1: endpoint {
+ remote-endpoint = <&xbar_adx4_out1>;
+ };
+ };
+
+ adx4_out2_port: port@2 {
+ reg = <2>;
+
+ adx4_out2: endpoint {
+ remote-endpoint = <&xbar_adx4_out2>;
+ };
+ };
+
+ adx4_out3_port: port@3 {
+ reg = <3>;
+
+ adx4_out3: endpoint {
+ remote-endpoint = <&xbar_adx4_out3>;
+ };
+ };
+
+ adx4_out4_port: port@4 {
+ reg = <4>;
+
+ adx4_out4: endpoint {
+ remote-endpoint = <&xbar_adx4_out4>;
+ };
+ };
+ };
+ };
+
+ dmic@2904200 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dmic3_cif: endpoint {
+ remote-endpoint = <&xbar_dmic3>;
+ };
+ };
+
+ dmic3_port: port@1 {
+ reg = <1>;
+
+ dmic3_dap: endpoint {
+ /* placeholder for external codec */
+ };
+ };
+ };
+ };
+
+ processing-engine@2908000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0x0>;
+
+ ope1_cif_in_ep: endpoint {
+ remote-endpoint = <&xbar_ope1_in_ep>;
+ };
+ };
+
+ ope1_out_port: port@1 {
+ reg = <0x1>;
+
+ ope1_cif_out_ep: endpoint {
+ remote-endpoint = <&xbar_ope1_out_ep>;
+ };
+ };
+ };
+ };
+
+ mvc@290a000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mvc1_cif_in: endpoint {
+ remote-endpoint = <&xbar_mvc1_in>;
+ };
+ };
+
+ mvc1_out_port: port@1 {
+ reg = <1>;
+
+ mvc1_cif_out: endpoint {
+ remote-endpoint = <&xbar_mvc1_out>;
+ };
+ };
+ };
+ };
+
+ mvc@290a200 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mvc2_cif_in: endpoint {
+ remote-endpoint = <&xbar_mvc2_in>;
+ };
+ };
+
+ mvc2_out_port: port@1 {
+ reg = <1>;
+
+ mvc2_cif_out: endpoint {
+ remote-endpoint = <&xbar_mvc2_out>;
+ };
+ };
+ };
+ };
+
+ amixer@290bb00 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0x0>;
+
+ mix_in1: endpoint {
+ remote-endpoint = <&xbar_mix_in1>;
+ };
+ };
+
+ port@1 {
+ reg = <0x1>;
+
+ mix_in2: endpoint {
+ remote-endpoint = <&xbar_mix_in2>;
+ };
+ };
+
+ port@2 {
+ reg = <0x2>;
+
+ mix_in3: endpoint {
+ remote-endpoint = <&xbar_mix_in3>;
+ };
+ };
+
+ port@3 {
+ reg = <0x3>;
+
+ mix_in4: endpoint {
+ remote-endpoint = <&xbar_mix_in4>;
+ };
+ };
+
+ port@4 {
+ reg = <0x4>;
+
+ mix_in5: endpoint {
+ remote-endpoint = <&xbar_mix_in5>;
+ };
+ };
+
+ port@5 {
+ reg = <0x5>;
+
+ mix_in6: endpoint {
+ remote-endpoint = <&xbar_mix_in6>;
+ };
+ };
+
+ port@6 {
+ reg = <0x6>;
+
+ mix_in7: endpoint {
+ remote-endpoint = <&xbar_mix_in7>;
+ };
+ };
+
+ port@7 {
+ reg = <0x7>;
+
+ mix_in8: endpoint {
+ remote-endpoint = <&xbar_mix_in8>;
+ };
+ };
+
+ port@8 {
+ reg = <0x8>;
+
+ mix_in9: endpoint {
+ remote-endpoint = <&xbar_mix_in9>;
+ };
+ };
+
+ port@9 {
+ reg = <0x9>;
+
+ mix_in10: endpoint {
+ remote-endpoint = <&xbar_mix_in10>;
+ };
+ };
+
+ mix_out1_port: port@a {
+ reg = <0xa>;
+
+ mix_out1: endpoint {
+ remote-endpoint = <&xbar_mix_out1>;
+ };
+ };
+
+ mix_out2_port: port@b {
+ reg = <0xb>;
+
+ mix_out2: endpoint {
+ remote-endpoint = <&xbar_mix_out2>;
+ };
+ };
+
+ mix_out3_port: port@c {
+ reg = <0xc>;
+
+ mix_out3: endpoint {
+ remote-endpoint = <&xbar_mix_out3>;
+ };
+ };
+
+ mix_out4_port: port@d {
+ reg = <0xd>;
+
+ mix_out4: endpoint {
+ remote-endpoint = <&xbar_mix_out4>;
+ };
+ };
+
+ mix_out5_port: port@e {
+ reg = <0xe>;
+
+ mix_out5: endpoint {
+ remote-endpoint = <&xbar_mix_out5>;
+ };
+ };
+ };
+ };
+
+ admaif@290f000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ admaif0_port: port@0 {
+ reg = <0x0>;
+
+ admaif0: endpoint {
+ remote-endpoint = <&xbar_admaif0>;
+ };
+ };
+
+ admaif1_port: port@1 {
+ reg = <0x1>;
+
+ admaif1: endpoint {
+ remote-endpoint = <&xbar_admaif1>;
+ };
+ };
+
+ admaif2_port: port@2 {
+ reg = <0x2>;
+
+ admaif2: endpoint {
+ remote-endpoint = <&xbar_admaif2>;
+ };
+ };
+
+ admaif3_port: port@3 {
+ reg = <0x3>;
+
+ admaif3: endpoint {
+ remote-endpoint = <&xbar_admaif3>;
+ };
+ };
+
+ admaif4_port: port@4 {
+ reg = <0x4>;
+
+ admaif4: endpoint {
+ remote-endpoint = <&xbar_admaif4>;
+ };
+ };
+
+ admaif5_port: port@5 {
+ reg = <0x5>;
+
+ admaif5: endpoint {
+ remote-endpoint = <&xbar_admaif5>;
+ };
+ };
+
+ admaif6_port: port@6 {
+ reg = <0x6>;
+
+ admaif6: endpoint {
+ remote-endpoint = <&xbar_admaif6>;
+ };
+ };
+
+ admaif7_port: port@7 {
+ reg = <0x7>;
+
+ admaif7: endpoint {
+ remote-endpoint = <&xbar_admaif7>;
+ };
+ };
+
+ admaif8_port: port@8 {
+ reg = <0x8>;
+
+ admaif8: endpoint {
+ remote-endpoint = <&xbar_admaif8>;
+ };
+ };
+
+ admaif9_port: port@9 {
+ reg = <0x9>;
+
+ admaif9: endpoint {
+ remote-endpoint = <&xbar_admaif9>;
+ };
+ };
+
+ admaif10_port: port@a {
+ reg = <0xa>;
+
+ admaif10: endpoint {
+ remote-endpoint = <&xbar_admaif10>;
+ };
+ };
+
+ admaif11_port: port@b {
+ reg = <0xb>;
+
+ admaif11: endpoint {
+ remote-endpoint = <&xbar_admaif11>;
+ };
+ };
+
+ admaif12_port: port@c {
+ reg = <0xc>;
+
+ admaif12: endpoint {
+ remote-endpoint = <&xbar_admaif12>;
+ };
+ };
+
+ admaif13_port: port@d {
+ reg = <0xd>;
+
+ admaif13: endpoint {
+ remote-endpoint = <&xbar_admaif13>;
+ };
+ };
+
+ admaif14_port: port@e {
+ reg = <0xe>;
+
+ admaif14: endpoint {
+ remote-endpoint = <&xbar_admaif14>;
+ };
+ };
+
+ admaif15_port: port@f {
+ reg = <0xf>;
+
+ admaif15: endpoint {
+ remote-endpoint = <&xbar_admaif15>;
+ };
+ };
+
+ admaif16_port: port@10 {
+ reg = <0x10>;
+
+ admaif16: endpoint {
+ remote-endpoint = <&xbar_admaif16>;
+ };
+ };
+
+ admaif17_port: port@11 {
+ reg = <0x11>;
+
+ admaif17: endpoint {
+ remote-endpoint = <&xbar_admaif17>;
+ };
+ };
+
+ admaif18_port: port@12 {
+ reg = <0x12>;
+
+ admaif18: endpoint {
+ remote-endpoint = <&xbar_admaif18>;
+ };
+ };
+
+ admaif19_port: port@13 {
+ reg = <0x13>;
+
+ admaif19: endpoint {
+ remote-endpoint = <&xbar_admaif19>;
+ };
+ };
+ };
+ };
+
+ asrc@2910000 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0x0>;
+
+ asrc_in1_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in1_ep>;
+ };
+ };
+
+ port@1 {
+ reg = <0x1>;
+
+ asrc_in2_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in2_ep>;
+ };
+ };
+
+ port@2 {
+ reg = <0x2>;
+
+ asrc_in3_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in3_ep>;
+ };
+ };
+
+ port@3 {
+ reg = <0x3>;
+
+ asrc_in4_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in4_ep>;
+ };
+ };
+
+ port@4 {
+ reg = <0x4>;
+
+ asrc_in5_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in5_ep>;
+ };
+ };
+
+ port@5 {
+ reg = <0x5>;
+
+ asrc_in6_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in6_ep>;
+ };
+ };
+
+ port@6 {
+ reg = <0x6>;
+
+ asrc_in7_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_in7_ep>;
+ };
+ };
+
+ asrc_out1_port: port@7 {
+ reg = <0x7>;
+
+ asrc_out1_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_out1_ep>;
+ };
+ };
+
+ asrc_out2_port: port@8 {
+ reg = <0x8>;
+
+ asrc_out2_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_out2_ep>;
+ };
+ };
+
+ asrc_out3_port: port@9 {
+ reg = <0x9>;
+
+ asrc_out3_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_out3_ep>;
+ };
+ };
+
+ asrc_out4_port: port@a {
+ reg = <0xa>;
+
+ asrc_out4_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_out4_ep>;
+ };
+ };
+
+ asrc_out5_port: port@b {
+ reg = <0xb>;
+
+ asrc_out5_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_out5_ep>;
+ };
+ };
+
+ asrc_out6_port: port@c {
+ reg = <0xc>;
+
+ asrc_out6_ep: endpoint {
+ remote-endpoint = <&xbar_asrc_out6_ep>;
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0x0>;
+
+ xbar_admaif0: endpoint {
+ remote-endpoint = <&admaif0>;
+ };
+ };
+
+ port@1 {
+ reg = <0x1>;
+
+ xbar_admaif1: endpoint {
+ remote-endpoint = <&admaif1>;
+ };
+ };
+
+ port@2 {
+ reg = <0x2>;
+
+ xbar_admaif2: endpoint {
+ remote-endpoint = <&admaif2>;
+ };
+ };
+
+ port@3 {
+ reg = <0x3>;
+
+ xbar_admaif3: endpoint {
+ remote-endpoint = <&admaif3>;
+ };
+ };
+
+ port@4 {
+ reg = <0x4>;
+
+ xbar_admaif4: endpoint {
+ remote-endpoint = <&admaif4>;
+ };
+ };
+
+ port@5 {
+ reg = <0x5>;
+
+ xbar_admaif5: endpoint {
+ remote-endpoint = <&admaif5>;
+ };
+ };
+
+ port@6 {
+ reg = <0x6>;
+
+ xbar_admaif6: endpoint {
+ remote-endpoint = <&admaif6>;
+ };
+ };
+
+ port@7 {
+ reg = <0x7>;
+
+ xbar_admaif7: endpoint {
+ remote-endpoint = <&admaif7>;
+ };
+ };
+
+ port@8 {
+ reg = <0x8>;
+
+ xbar_admaif8: endpoint {
+ remote-endpoint = <&admaif8>;
+ };
+ };
+
+ port@9 {
+ reg = <0x9>;
+
+ xbar_admaif9: endpoint {
+ remote-endpoint = <&admaif9>;
+ };
+ };
+
+ port@a {
+ reg = <0xa>;
+
+ xbar_admaif10: endpoint {
+ remote-endpoint = <&admaif10>;
+ };
+ };
+
+ port@b {
+ reg = <0xb>;
+
+ xbar_admaif11: endpoint {
+ remote-endpoint = <&admaif11>;
+ };
+ };
+
+ port@c {
+ reg = <0xc>;
+
+ xbar_admaif12: endpoint {
+ remote-endpoint = <&admaif12>;
+ };
+ };
+
+ port@d {
+ reg = <0xd>;
+
+ xbar_admaif13: endpoint {
+ remote-endpoint = <&admaif13>;
+ };
+ };
+
+ port@e {
+ reg = <0xe>;
+
+ xbar_admaif14: endpoint {
+ remote-endpoint = <&admaif14>;
+ };
+ };
+
+ port@f {
+ reg = <0xf>;
+
+ xbar_admaif15: endpoint {
+ remote-endpoint = <&admaif15>;
+ };
+ };
+
+ port@10 {
+ reg = <0x10>;
+
+ xbar_admaif16: endpoint {
+ remote-endpoint = <&admaif16>;
+ };
+ };
+
+ port@11 {
+ reg = <0x11>;
+
+ xbar_admaif17: endpoint {
+ remote-endpoint = <&admaif17>;
+ };
+ };
+
+ port@12 {
+ reg = <0x12>;
+
+ xbar_admaif18: endpoint {
+ remote-endpoint = <&admaif18>;
+ };
+ };
+
+ port@13 {
+ reg = <0x13>;
+
+ xbar_admaif19: endpoint {
+ remote-endpoint = <&admaif19>;
+ };
+ };
+
+ xbar_i2s1_port: port@14 {
+ reg = <0x14>;
+
+ xbar_i2s1: endpoint {
+ remote-endpoint = <&i2s1_cif>;
+ };
+ };
+
+ xbar_i2s2_port: port@15 {
+ reg = <0x15>;
+
+ xbar_i2s2: endpoint {
+ remote-endpoint = <&i2s2_cif>;
+ };
+ };
+
+ xbar_i2s4_port: port@17 {
+ reg = <0x17>;
+
+ xbar_i2s4: endpoint {
+ remote-endpoint = <&i2s4_cif>;
+ };
+ };
+
+ xbar_i2s6_port: port@19 {
+ reg = <0x19>;
+
+ xbar_i2s6: endpoint {
+ remote-endpoint = <&i2s6_cif>;
+ };
+ };
+
+ xbar_dmic3_port: port@1c {
+ reg = <0x1c>;
+
+ xbar_dmic3: endpoint {
+ remote-endpoint = <&dmic3_cif>;
+ };
+ };
+
+ xbar_sfc1_in_port: port@20 {
+ reg = <0x20>;
+
+ xbar_sfc1_in: endpoint {
+ remote-endpoint = <&sfc1_cif_in>;
+ };
+ };
+
+ port@21 {
+ reg = <0x21>;
+
+ xbar_sfc1_out: endpoint {
+ remote-endpoint = <&sfc1_cif_out>;
+ };
+ };
+
+ xbar_sfc2_in_port: port@22 {
+ reg = <0x22>;
+
+ xbar_sfc2_in: endpoint {
+ remote-endpoint = <&sfc2_cif_in>;
+ };
+ };
+
+ port@23 {
+ reg = <0x23>;
+
+ xbar_sfc2_out: endpoint {
+ remote-endpoint = <&sfc2_cif_out>;
+ };
+ };
+
+ xbar_sfc3_in_port: port@24 {
+ reg = <0x24>;
+
+ xbar_sfc3_in: endpoint {
+ remote-endpoint = <&sfc3_cif_in>;
+ };
+ };
+
+ port@25 {
+ reg = <0x25>;
+
+ xbar_sfc3_out: endpoint {
+ remote-endpoint = <&sfc3_cif_out>;
+ };
+ };
+
+ xbar_sfc4_in_port: port@26 {
+ reg = <0x26>;
+
+ xbar_sfc4_in: endpoint {
+ remote-endpoint = <&sfc4_cif_in>;
+ };
+ };
+
+ port@27 {
+ reg = <0x27>;
+
+ xbar_sfc4_out: endpoint {
+ remote-endpoint = <&sfc4_cif_out>;
+ };
+ };
+
+ xbar_mvc1_in_port: port@28 {
+ reg = <0x28>;
+
+ xbar_mvc1_in: endpoint {
+ remote-endpoint = <&mvc1_cif_in>;
+ };
+ };
+
+ port@29 {
+ reg = <0x29>;
+
+ xbar_mvc1_out: endpoint {
+ remote-endpoint = <&mvc1_cif_out>;
+ };
+ };
+
+ xbar_mvc2_in_port: port@2a {
+ reg = <0x2a>;
+
+ xbar_mvc2_in: endpoint {
+ remote-endpoint = <&mvc2_cif_in>;
+ };
+ };
+
+ port@2b {
+ reg = <0x2b>;
+
+ xbar_mvc2_out: endpoint {
+ remote-endpoint = <&mvc2_cif_out>;
+ };
+ };
+
+ xbar_amx1_in1_port: port@2c {
+ reg = <0x2c>;
+
+ xbar_amx1_in1: endpoint {
+ remote-endpoint = <&amx1_in1>;
+ };
+ };
+
+ xbar_amx1_in2_port: port@2d {
+ reg = <0x2d>;
+
+ xbar_amx1_in2: endpoint {
+ remote-endpoint = <&amx1_in2>;
+ };
+ };
+
+ xbar_amx1_in3_port: port@2e {
+ reg = <0x2e>;
+
+ xbar_amx1_in3: endpoint {
+ remote-endpoint = <&amx1_in3>;
+ };
+ };
+
+ xbar_amx1_in4_port: port@2f {
+ reg = <0x2f>;
+
+ xbar_amx1_in4: endpoint {
+ remote-endpoint = <&amx1_in4>;
+ };
+ };
+
+ port@30 {
+ reg = <0x30>;
+
+ xbar_amx1_out: endpoint {
+ remote-endpoint = <&amx1_out>;
+ };
+ };
+
+ xbar_amx2_in1_port: port@31 {
+ reg = <0x31>;
+
+ xbar_amx2_in1: endpoint {
+ remote-endpoint = <&amx2_in1>;
+ };
+ };
+
+ xbar_amx2_in2_port: port@32 {
+ reg = <0x32>;
+
+ xbar_amx2_in2: endpoint {
+ remote-endpoint = <&amx2_in2>;
+ };
+ };
+
+ xbar_amx2_in3_port: port@33 {
+ reg = <0x33>;
+
+ xbar_amx2_in3: endpoint {
+ remote-endpoint = <&amx2_in3>;
+ };
+ };
+
+ xbar_amx2_in4_port: port@34 {
+ reg = <0x34>;
+
+ xbar_amx2_in4: endpoint {
+ remote-endpoint = <&amx2_in4>;
+ };
+ };
+
+ port@35 {
+ reg = <0x35>;
+
+ xbar_amx2_out: endpoint {
+ remote-endpoint = <&amx2_out>;
+ };
+ };
+
+ xbar_amx3_in1_port: port@36 {
+ reg = <0x36>;
+
+ xbar_amx3_in1: endpoint {
+ remote-endpoint = <&amx3_in1>;
+ };
+ };
+
+ xbar_amx3_in2_port: port@37 {
+ reg = <0x37>;
+
+ xbar_amx3_in2: endpoint {
+ remote-endpoint = <&amx3_in2>;
+ };
+ };
+
+ xbar_amx3_in3_port: port@38 {
+ reg = <0x38>;
+
+ xbar_amx3_in3: endpoint {
+ remote-endpoint = <&amx3_in3>;
+ };
+ };
+
+ xbar_amx3_in4_port: port@39 {
+ reg = <0x39>;
+
+ xbar_amx3_in4: endpoint {
+ remote-endpoint = <&amx3_in4>;
+ };
+ };
+
+ port@3a {
+ reg = <0x3a>;
+
+ xbar_amx3_out: endpoint {
+ remote-endpoint = <&amx3_out>;
+ };
+ };
+
+ xbar_amx4_in1_port: port@3b {
+ reg = <0x3b>;
+
+ xbar_amx4_in1: endpoint {
+ remote-endpoint = <&amx4_in1>;
+ };
+ };
+
+ xbar_amx4_in2_port: port@3c {
+ reg = <0x3c>;
+
+ xbar_amx4_in2: endpoint {
+ remote-endpoint = <&amx4_in2>;
+ };
+ };
+
+ xbar_amx4_in3_port: port@3d {
+ reg = <0x3d>;
+
+ xbar_amx4_in3: endpoint {
+ remote-endpoint = <&amx4_in3>;
+ };
+ };
+
+ xbar_amx4_in4_port: port@3e {
+ reg = <0x3e>;
+
+ xbar_amx4_in4: endpoint {
+ remote-endpoint = <&amx4_in4>;
+ };
+ };
+
+ port@3f {
+ reg = <0x3f>;
+
+ xbar_amx4_out: endpoint {
+ remote-endpoint = <&amx4_out>;
+ };
+ };
+
+ xbar_adx1_in_port: port@40 {
+ reg = <0x40>;
+
+ xbar_adx1_in: endpoint {
+ remote-endpoint = <&adx1_in>;
+ };
+ };
+
+ port@41 {
+ reg = <0x41>;
+
+ xbar_adx1_out1: endpoint {
+ remote-endpoint = <&adx1_out1>;
+ };
+ };
+
+ port@42 {
+ reg = <0x42>;
+
+ xbar_adx1_out2: endpoint {
+ remote-endpoint = <&adx1_out2>;
+ };
+ };
+
+ port@43 {
+ reg = <0x43>;
+
+ xbar_adx1_out3: endpoint {
+ remote-endpoint = <&adx1_out3>;
+ };
+ };
+
+ port@44 {
+ reg = <0x44>;
+
+ xbar_adx1_out4: endpoint {
+ remote-endpoint = <&adx1_out4>;
+ };
+ };
+
+ xbar_adx2_in_port: port@45 {
+ reg = <0x45>;
+
+ xbar_adx2_in: endpoint {
+ remote-endpoint = <&adx2_in>;
+ };
+ };
+
+ port@46 {
+ reg = <0x46>;
+
+ xbar_adx2_out1: endpoint {
+ remote-endpoint = <&adx2_out1>;
+ };
+ };
+
+ port@47 {
+ reg = <0x47>;
+
+ xbar_adx2_out2: endpoint {
+ remote-endpoint = <&adx2_out2>;
+ };
+ };
+
+ port@48 {
+ reg = <0x48>;
+
+ xbar_adx2_out3: endpoint {
+ remote-endpoint = <&adx2_out3>;
+ };
+ };
+
+ port@49 {
+ reg = <0x49>;
+
+ xbar_adx2_out4: endpoint {
+ remote-endpoint = <&adx2_out4>;
+ };
+ };
+
+ xbar_adx3_in_port: port@4a {
+ reg = <0x4a>;
+
+ xbar_adx3_in: endpoint {
+ remote-endpoint = <&adx3_in>;
+ };
+ };
+
+ port@4b {
+ reg = <0x4b>;
+
+ xbar_adx3_out1: endpoint {
+ remote-endpoint = <&adx3_out1>;
+ };
+ };
+
+ port@4c {
+ reg = <0x4c>;
+
+ xbar_adx3_out2: endpoint {
+ remote-endpoint = <&adx3_out2>;
+ };
+ };
+
+ port@4d {
+ reg = <0x4d>;
+
+ xbar_adx3_out3: endpoint {
+ remote-endpoint = <&adx3_out3>;
+ };
+ };
+
+ port@4e {
+ reg = <0x4e>;
+
+ xbar_adx3_out4: endpoint {
+ remote-endpoint = <&adx3_out4>;
+ };
+ };
+
+ xbar_adx4_in_port: port@4f {
+ reg = <0x4f>;
+
+ xbar_adx4_in: endpoint {
+ remote-endpoint = <&adx4_in>;
+ };
+ };
+
+ port@50 {
+ reg = <0x50>;
+
+ xbar_adx4_out1: endpoint {
+ remote-endpoint = <&adx4_out1>;
+ };
+ };
+
+ port@51 {
+ reg = <0x51>;
+
+ xbar_adx4_out2: endpoint {
+ remote-endpoint = <&adx4_out2>;
+ };
+ };
+
+ port@52 {
+ reg = <0x52>;
+
+ xbar_adx4_out3: endpoint {
+ remote-endpoint = <&adx4_out3>;
+ };
+ };
+
+ port@53 {
+ reg = <0x53>;
+
+ xbar_adx4_out4: endpoint {
+ remote-endpoint = <&adx4_out4>;
+ };
+ };
+
+ xbar_mix_in1_port: port@54 {
+ reg = <0x54>;
+
+ xbar_mix_in1: endpoint {
+ remote-endpoint = <&mix_in1>;
+ };
+ };
+
+ xbar_mix_in2_port: port@55 {
+ reg = <0x55>;
+
+ xbar_mix_in2: endpoint {
+ remote-endpoint = <&mix_in2>;
+ };
+ };
+
+ xbar_mix_in3_port: port@56 {
+ reg = <0x56>;
+
+ xbar_mix_in3: endpoint {
+ remote-endpoint = <&mix_in3>;
+ };
+ };
+
+ xbar_mix_in4_port: port@57 {
+ reg = <0x57>;
+
+ xbar_mix_in4: endpoint {
+ remote-endpoint = <&mix_in4>;
+ };
+ };
+
+ xbar_mix_in5_port: port@58 {
+ reg = <0x58>;
+
+ xbar_mix_in5: endpoint {
+ remote-endpoint = <&mix_in5>;
+ };
+ };
+
+ xbar_mix_in6_port: port@59 {
+ reg = <0x59>;
+
+ xbar_mix_in6: endpoint {
+ remote-endpoint = <&mix_in6>;
+ };
+ };
+
+ xbar_mix_in7_port: port@5a {
+ reg = <0x5a>;
+
+ xbar_mix_in7: endpoint {
+ remote-endpoint = <&mix_in7>;
+ };
+ };
+
+ xbar_mix_in8_port: port@5b {
+ reg = <0x5b>;
+
+ xbar_mix_in8: endpoint {
+ remote-endpoint = <&mix_in8>;
+ };
+ };
+
+ xbar_mix_in9_port: port@5c {
+ reg = <0x5c>;
+
+ xbar_mix_in9: endpoint {
+ remote-endpoint = <&mix_in9>;
+ };
+ };
+
+ xbar_mix_in10_port: port@5d {
+ reg = <0x5d>;
+
+ xbar_mix_in10: endpoint {
+ remote-endpoint = <&mix_in10>;
+ };
+ };
+
+ port@5e {
+ reg = <0x5e>;
+
+ xbar_mix_out1: endpoint {
+ remote-endpoint = <&mix_out1>;
+ };
+ };
+
+ port@5f {
+ reg = <0x5f>;
+
+ xbar_mix_out2: endpoint {
+ remote-endpoint = <&mix_out2>;
+ };
+ };
+
+ port@60 {
+ reg = <0x60>;
+
+ xbar_mix_out3: endpoint {
+ remote-endpoint = <&mix_out3>;
+ };
+ };
+
+ port@61 {
+ reg = <0x61>;
+
+ xbar_mix_out4: endpoint {
+ remote-endpoint = <&mix_out4>;
+ };
+ };
+
+ port@62 {
+ reg = <0x62>;
+
+ xbar_mix_out5: endpoint {
+ remote-endpoint = <&mix_out5>;
+ };
+ };
+
+ xbar_asrc_in1_port: port@63 {
+ reg = <0x63>;
+
+ xbar_asrc_in1_ep: endpoint {
+ remote-endpoint = <&asrc_in1_ep>;
+ };
+ };
+
+ port@64 {
+ reg = <0x64>;
+
+ xbar_asrc_out1_ep: endpoint {
+ remote-endpoint = <&asrc_out1_ep>;
+ };
+ };
+
+ xbar_asrc_in2_port: port@65 {
+ reg = <0x65>;
+
+ xbar_asrc_in2_ep: endpoint {
+ remote-endpoint = <&asrc_in2_ep>;
+ };
+ };
+
+ port@66 {
+ reg = <0x66>;
+
+ xbar_asrc_out2_ep: endpoint {
+ remote-endpoint = <&asrc_out2_ep>;
+ };
+ };
+
+ xbar_asrc_in3_port: port@67 {
+ reg = <0x67>;
+
+ xbar_asrc_in3_ep: endpoint {
+ remote-endpoint = <&asrc_in3_ep>;
+ };
+ };
+
+ port@68 {
+ reg = <0x68>;
+
+ xbar_asrc_out3_ep: endpoint {
+ remote-endpoint = <&asrc_out3_ep>;
+ };
+ };
+
+ xbar_asrc_in4_port: port@69 {
+ reg = <0x69>;
+
+ xbar_asrc_in4_ep: endpoint {
+ remote-endpoint = <&asrc_in4_ep>;
+ };
+ };
+
+ port@6a {
+ reg = <0x6a>;
+
+ xbar_asrc_out4_ep: endpoint {
+ remote-endpoint = <&asrc_out4_ep>;
+ };
+ };
+
+ xbar_asrc_in5_port: port@6b {
+ reg = <0x6b>;
+
+ xbar_asrc_in5_ep: endpoint {
+ remote-endpoint = <&asrc_in5_ep>;
+ };
+ };
+
+ port@6c {
+ reg = <0x6c>;
+
+ xbar_asrc_out5_ep: endpoint {
+ remote-endpoint = <&asrc_out5_ep>;
+ };
+ };
+
+ xbar_asrc_in6_port: port@6d {
+ reg = <0x6d>;
+
+ xbar_asrc_in6_ep: endpoint {
+ remote-endpoint = <&asrc_in6_ep>;
+ };
+ };
+
+ port@6e {
+ reg = <0x6e>;
+
+ xbar_asrc_out6_ep: endpoint {
+ remote-endpoint = <&asrc_out6_ep>;
+ };
+ };
+
+ xbar_asrc_in7_port: port@6f {
+ reg = <0x6f>;
+
+ xbar_asrc_in7_ep: endpoint {
+ remote-endpoint = <&asrc_in7_ep>;
+ };
+ };
+
+ xbar_ope1_in_port: port@70 {
+ reg = <0x70>;
+
+ xbar_ope1_in_ep: endpoint {
+ remote-endpoint = <&ope1_cif_in_ep>;
+ };
+ };
+
+ port@71 {
+ reg = <0x71>;
+
+ xbar_ope1_out_ep: endpoint {
+ remote-endpoint = <&ope1_cif_out_ep>;
+ };
+ };
+ };
+ };
+
+ dma-controller@2930000 {
+ status = "okay";
+ };
+
+ interrupt-controller@2a40000 {
+ status = "okay";
+ };
+ };
+
+ i2c@c240000 {
+ status = "okay";
+
+ power-sensor@40 {
+ compatible = "ti,ina3221";
+ reg = <0x40>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ input@0 {
+ reg = <0x0>;
+ label = "VDD_GPU_SOC";
+ shunt-resistor-micro-ohms = <2000>;
+ };
+
+ input@1 {
+ reg = <0x1>;
+ label = "VDD_CPU_CV";
+ shunt-resistor-micro-ohms = <2000>;
+ };
+
+ input@2 {
+ reg = <0x2>;
+ label = "VIN_SYS_5V0";
+ shunt-resistor-micro-ohms = <2000>;
+ ti,summation-disable;
+ };
+ };
+
+ power-sensor@41 {
+ compatible = "ti,ina3221";
+ reg = <0x41>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ input@0 {
+ reg = <0x0>;
+ status = "disabled";
+ };
+
+ input@1 {
+ reg = <0x1>;
+ label = "VDDQ_VDD2_1V8AO";
+ shunt-resistor-micro-ohms = <2000>;
+ };
+
+ input@2 {
+ reg = <0x2>;
+ status = "disabled";
+ };
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000+p3701-0000.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000+p3701-0000.dts
index cd13cf2381dd..81a82933e350 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000+p3701-0000.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000+p3701-0000.dts
@@ -3,7 +3,6 @@
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/input/gpio-keys.h>
-#include <dt-bindings/sound/rt5640.h>
#include "tegra234-p3701-0000.dtsi"
#include "tegra234-p3737-0000.dtsi"
@@ -24,1992 +23,9 @@
};
bus@0 {
- aconnect@2900000 {
- status = "okay";
-
- ahub@2900800 {
- status = "okay";
-
- i2s@2901000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- i2s1_cif: endpoint {
- remote-endpoint = <&xbar_i2s1>;
- };
- };
-
- i2s1_port: port@1 {
- reg = <1>;
-
- i2s1_dap: endpoint {
- dai-format = "i2s";
- remote-endpoint = <&rt5640_ep>;
- };
- };
- };
- };
-
- i2s@2901100 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- i2s2_cif: endpoint {
- remote-endpoint = <&xbar_i2s2>;
- };
- };
-
- i2s2_port: port@1 {
- reg = <1>;
-
- i2s2_dap: endpoint {
- dai-format = "i2s";
- /* placeholder for external codec */
- };
- };
- };
- };
-
- i2s@2901300 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- i2s4_cif: endpoint {
- remote-endpoint = <&xbar_i2s4>;
- };
- };
-
- i2s4_port: port@1 {
- reg = <1>;
-
- i2s4_dap: endpoint {
- dai-format = "i2s";
- /* placeholder for external codec */
- };
- };
- };
- };
-
- i2s@2901500 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- i2s6_cif: endpoint {
- remote-endpoint = <&xbar_i2s6>;
- };
- };
-
- i2s6_port: port@1 {
- reg = <1>;
-
- i2s6_dap: endpoint {
- dai-format = "i2s";
- /* placeholder for external codec */
- };
- };
- };
- };
-
- sfc@2902000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- sfc1_cif_in: endpoint {
- remote-endpoint = <&xbar_sfc1_in>;
- };
- };
-
- sfc1_out_port: port@1 {
- reg = <1>;
-
- sfc1_cif_out: endpoint {
- remote-endpoint = <&xbar_sfc1_out>;
- };
- };
- };
- };
-
- sfc@2902200 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- sfc2_cif_in: endpoint {
- remote-endpoint = <&xbar_sfc2_in>;
- };
- };
-
- sfc2_out_port: port@1 {
- reg = <1>;
-
- sfc2_cif_out: endpoint {
- remote-endpoint = <&xbar_sfc2_out>;
- };
- };
- };
- };
-
- sfc@2902400 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- sfc3_cif_in: endpoint {
- remote-endpoint = <&xbar_sfc3_in>;
- };
- };
-
- sfc3_out_port: port@1 {
- reg = <1>;
-
- sfc3_cif_out: endpoint {
- remote-endpoint = <&xbar_sfc3_out>;
- };
- };
- };
- };
-
- sfc@2902600 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- sfc4_cif_in: endpoint {
- remote-endpoint = <&xbar_sfc4_in>;
- };
- };
-
- sfc4_out_port: port@1 {
- reg = <1>;
-
- sfc4_cif_out: endpoint {
- remote-endpoint = <&xbar_sfc4_out>;
- };
- };
- };
- };
-
- amx@2903000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- amx1_in1: endpoint {
- remote-endpoint = <&xbar_amx1_in1>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- amx1_in2: endpoint {
- remote-endpoint = <&xbar_amx1_in2>;
- };
- };
-
- port@2 {
- reg = <2>;
-
- amx1_in3: endpoint {
- remote-endpoint = <&xbar_amx1_in3>;
- };
- };
-
- port@3 {
- reg = <3>;
-
- amx1_in4: endpoint {
- remote-endpoint = <&xbar_amx1_in4>;
- };
- };
-
- amx1_out_port: port@4 {
- reg = <4>;
-
- amx1_out: endpoint {
- remote-endpoint = <&xbar_amx1_out>;
- };
- };
- };
- };
-
- amx@2903100 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- amx2_in1: endpoint {
- remote-endpoint = <&xbar_amx2_in1>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- amx2_in2: endpoint {
- remote-endpoint = <&xbar_amx2_in2>;
- };
- };
-
- port@2 {
- reg = <2>;
-
- amx2_in3: endpoint {
- remote-endpoint = <&xbar_amx2_in3>;
- };
- };
-
- port@3 {
- reg = <3>;
-
- amx2_in4: endpoint {
- remote-endpoint = <&xbar_amx2_in4>;
- };
- };
-
- amx2_out_port: port@4 {
- reg = <4>;
-
- amx2_out: endpoint {
- remote-endpoint = <&xbar_amx2_out>;
- };
- };
- };
- };
-
- amx@2903200 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- amx3_in1: endpoint {
- remote-endpoint = <&xbar_amx3_in1>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- amx3_in2: endpoint {
- remote-endpoint = <&xbar_amx3_in2>;
- };
- };
-
- port@2 {
- reg = <2>;
-
- amx3_in3: endpoint {
- remote-endpoint = <&xbar_amx3_in3>;
- };
- };
-
- port@3 {
- reg = <3>;
-
- amx3_in4: endpoint {
- remote-endpoint = <&xbar_amx3_in4>;
- };
- };
-
- amx3_out_port: port@4 {
- reg = <4>;
-
- amx3_out: endpoint {
- remote-endpoint = <&xbar_amx3_out>;
- };
- };
- };
- };
-
- amx@2903300 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- amx4_in1: endpoint {
- remote-endpoint = <&xbar_amx4_in1>;
- };
- };
-
- port@1 {
- reg = <1>;
-
- amx4_in2: endpoint {
- remote-endpoint = <&xbar_amx4_in2>;
- };
- };
-
- port@2 {
- reg = <2>;
-
- amx4_in3: endpoint {
- remote-endpoint = <&xbar_amx4_in3>;
- };
- };
-
- port@3 {
- reg = <3>;
-
- amx4_in4: endpoint {
- remote-endpoint = <&xbar_amx4_in4>;
- };
- };
-
- amx4_out_port: port@4 {
- reg = <4>;
-
- amx4_out: endpoint {
- remote-endpoint = <&xbar_amx4_out>;
- };
- };
- };
- };
-
- adx@2903800 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- adx1_in: endpoint {
- remote-endpoint = <&xbar_adx1_in>;
- };
- };
-
- adx1_out1_port: port@1 {
- reg = <1>;
-
- adx1_out1: endpoint {
- remote-endpoint = <&xbar_adx1_out1>;
- };
- };
-
- adx1_out2_port: port@2 {
- reg = <2>;
-
- adx1_out2: endpoint {
- remote-endpoint = <&xbar_adx1_out2>;
- };
- };
-
- adx1_out3_port: port@3 {
- reg = <3>;
-
- adx1_out3: endpoint {
- remote-endpoint = <&xbar_adx1_out3>;
- };
- };
-
- adx1_out4_port: port@4 {
- reg = <4>;
-
- adx1_out4: endpoint {
- remote-endpoint = <&xbar_adx1_out4>;
- };
- };
- };
- };
-
- adx@2903900 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- adx2_in: endpoint {
- remote-endpoint = <&xbar_adx2_in>;
- };
- };
-
- adx2_out1_port: port@1 {
- reg = <1>;
-
- adx2_out1: endpoint {
- remote-endpoint = <&xbar_adx2_out1>;
- };
- };
-
- adx2_out2_port: port@2 {
- reg = <2>;
-
- adx2_out2: endpoint {
- remote-endpoint = <&xbar_adx2_out2>;
- };
- };
-
- adx2_out3_port: port@3 {
- reg = <3>;
-
- adx2_out3: endpoint {
- remote-endpoint = <&xbar_adx2_out3>;
- };
- };
-
- adx2_out4_port: port@4 {
- reg = <4>;
-
- adx2_out4: endpoint {
- remote-endpoint = <&xbar_adx2_out4>;
- };
- };
- };
- };
-
- adx@2903a00 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- adx3_in: endpoint {
- remote-endpoint = <&xbar_adx3_in>;
- };
- };
-
- adx3_out1_port: port@1 {
- reg = <1>;
-
- adx3_out1: endpoint {
- remote-endpoint = <&xbar_adx3_out1>;
- };
- };
-
- adx3_out2_port: port@2 {
- reg = <2>;
-
- adx3_out2: endpoint {
- remote-endpoint = <&xbar_adx3_out2>;
- };
- };
-
- adx3_out3_port: port@3 {
- reg = <3>;
-
- adx3_out3: endpoint {
- remote-endpoint = <&xbar_adx3_out3>;
- };
- };
-
- adx3_out4_port: port@4 {
- reg = <4>;
-
- adx3_out4: endpoint {
- remote-endpoint = <&xbar_adx3_out4>;
- };
- };
- };
- };
-
- adx@2903b00 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- adx4_in: endpoint {
- remote-endpoint = <&xbar_adx4_in>;
- };
- };
-
- adx4_out1_port: port@1 {
- reg = <1>;
-
- adx4_out1: endpoint {
- remote-endpoint = <&xbar_adx4_out1>;
- };
- };
-
- adx4_out2_port: port@2 {
- reg = <2>;
-
- adx4_out2: endpoint {
- remote-endpoint = <&xbar_adx4_out2>;
- };
- };
-
- adx4_out3_port: port@3 {
- reg = <3>;
-
- adx4_out3: endpoint {
- remote-endpoint = <&xbar_adx4_out3>;
- };
- };
-
- adx4_out4_port: port@4 {
- reg = <4>;
-
- adx4_out4: endpoint {
- remote-endpoint = <&xbar_adx4_out4>;
- };
- };
- };
- };
-
- dmic@2904200 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- dmic3_cif: endpoint {
- remote-endpoint = <&xbar_dmic3>;
- };
- };
-
- dmic3_port: port@1 {
- reg = <1>;
-
- dmic3_dap: endpoint {
- /* placeholder for external codec */
- };
- };
- };
- };
-
- processing-engine@2908000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0x0>;
-
- ope1_cif_in_ep: endpoint {
- remote-endpoint = <&xbar_ope1_in_ep>;
- };
- };
-
- ope1_out_port: port@1 {
- reg = <0x1>;
-
- ope1_cif_out_ep: endpoint {
- remote-endpoint = <&xbar_ope1_out_ep>;
- };
- };
- };
- };
-
- mvc@290a000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- mvc1_cif_in: endpoint {
- remote-endpoint = <&xbar_mvc1_in>;
- };
- };
-
- mvc1_out_port: port@1 {
- reg = <1>;
-
- mvc1_cif_out: endpoint {
- remote-endpoint = <&xbar_mvc1_out>;
- };
- };
- };
- };
-
- mvc@290a200 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
-
- mvc2_cif_in: endpoint {
- remote-endpoint = <&xbar_mvc2_in>;
- };
- };
-
- mvc2_out_port: port@1 {
- reg = <1>;
-
- mvc2_cif_out: endpoint {
- remote-endpoint = <&xbar_mvc2_out>;
- };
- };
- };
- };
-
- amixer@290bb00 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0x0>;
-
- mix_in1: endpoint {
- remote-endpoint = <&xbar_mix_in1>;
- };
- };
-
- port@1 {
- reg = <0x1>;
-
- mix_in2: endpoint {
- remote-endpoint = <&xbar_mix_in2>;
- };
- };
-
- port@2 {
- reg = <0x2>;
-
- mix_in3: endpoint {
- remote-endpoint = <&xbar_mix_in3>;
- };
- };
-
- port@3 {
- reg = <0x3>;
-
- mix_in4: endpoint {
- remote-endpoint = <&xbar_mix_in4>;
- };
- };
-
- port@4 {
- reg = <0x4>;
-
- mix_in5: endpoint {
- remote-endpoint = <&xbar_mix_in5>;
- };
- };
-
- port@5 {
- reg = <0x5>;
-
- mix_in6: endpoint {
- remote-endpoint = <&xbar_mix_in6>;
- };
- };
-
- port@6 {
- reg = <0x6>;
-
- mix_in7: endpoint {
- remote-endpoint = <&xbar_mix_in7>;
- };
- };
-
- port@7 {
- reg = <0x7>;
-
- mix_in8: endpoint {
- remote-endpoint = <&xbar_mix_in8>;
- };
- };
-
- port@8 {
- reg = <0x8>;
-
- mix_in9: endpoint {
- remote-endpoint = <&xbar_mix_in9>;
- };
- };
-
- port@9 {
- reg = <0x9>;
-
- mix_in10: endpoint {
- remote-endpoint = <&xbar_mix_in10>;
- };
- };
-
- mix_out1_port: port@a {
- reg = <0xa>;
-
- mix_out1: endpoint {
- remote-endpoint = <&xbar_mix_out1>;
- };
- };
-
- mix_out2_port: port@b {
- reg = <0xb>;
-
- mix_out2: endpoint {
- remote-endpoint = <&xbar_mix_out2>;
- };
- };
-
- mix_out3_port: port@c {
- reg = <0xc>;
-
- mix_out3: endpoint {
- remote-endpoint = <&xbar_mix_out3>;
- };
- };
-
- mix_out4_port: port@d {
- reg = <0xd>;
-
- mix_out4: endpoint {
- remote-endpoint = <&xbar_mix_out4>;
- };
- };
-
- mix_out5_port: port@e {
- reg = <0xe>;
-
- mix_out5: endpoint {
- remote-endpoint = <&xbar_mix_out5>;
- };
- };
- };
- };
-
- admaif@290f000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- admaif0_port: port@0 {
- reg = <0x0>;
-
- admaif0: endpoint {
- remote-endpoint = <&xbar_admaif0>;
- };
- };
-
- admaif1_port: port@1 {
- reg = <0x1>;
-
- admaif1: endpoint {
- remote-endpoint = <&xbar_admaif1>;
- };
- };
-
- admaif2_port: port@2 {
- reg = <0x2>;
-
- admaif2: endpoint {
- remote-endpoint = <&xbar_admaif2>;
- };
- };
-
- admaif3_port: port@3 {
- reg = <0x3>;
-
- admaif3: endpoint {
- remote-endpoint = <&xbar_admaif3>;
- };
- };
-
- admaif4_port: port@4 {
- reg = <0x4>;
-
- admaif4: endpoint {
- remote-endpoint = <&xbar_admaif4>;
- };
- };
-
- admaif5_port: port@5 {
- reg = <0x5>;
-
- admaif5: endpoint {
- remote-endpoint = <&xbar_admaif5>;
- };
- };
-
- admaif6_port: port@6 {
- reg = <0x6>;
-
- admaif6: endpoint {
- remote-endpoint = <&xbar_admaif6>;
- };
- };
-
- admaif7_port: port@7 {
- reg = <0x7>;
-
- admaif7: endpoint {
- remote-endpoint = <&xbar_admaif7>;
- };
- };
-
- admaif8_port: port@8 {
- reg = <0x8>;
-
- admaif8: endpoint {
- remote-endpoint = <&xbar_admaif8>;
- };
- };
-
- admaif9_port: port@9 {
- reg = <0x9>;
-
- admaif9: endpoint {
- remote-endpoint = <&xbar_admaif9>;
- };
- };
-
- admaif10_port: port@a {
- reg = <0xa>;
-
- admaif10: endpoint {
- remote-endpoint = <&xbar_admaif10>;
- };
- };
-
- admaif11_port: port@b {
- reg = <0xb>;
-
- admaif11: endpoint {
- remote-endpoint = <&xbar_admaif11>;
- };
- };
-
- admaif12_port: port@c {
- reg = <0xc>;
-
- admaif12: endpoint {
- remote-endpoint = <&xbar_admaif12>;
- };
- };
-
- admaif13_port: port@d {
- reg = <0xd>;
-
- admaif13: endpoint {
- remote-endpoint = <&xbar_admaif13>;
- };
- };
-
- admaif14_port: port@e {
- reg = <0xe>;
-
- admaif14: endpoint {
- remote-endpoint = <&xbar_admaif14>;
- };
- };
-
- admaif15_port: port@f {
- reg = <0xf>;
-
- admaif15: endpoint {
- remote-endpoint = <&xbar_admaif15>;
- };
- };
-
- admaif16_port: port@10 {
- reg = <0x10>;
-
- admaif16: endpoint {
- remote-endpoint = <&xbar_admaif16>;
- };
- };
-
- admaif17_port: port@11 {
- reg = <0x11>;
-
- admaif17: endpoint {
- remote-endpoint = <&xbar_admaif17>;
- };
- };
-
- admaif18_port: port@12 {
- reg = <0x12>;
-
- admaif18: endpoint {
- remote-endpoint = <&xbar_admaif18>;
- };
- };
-
- admaif19_port: port@13 {
- reg = <0x13>;
-
- admaif19: endpoint {
- remote-endpoint = <&xbar_admaif19>;
- };
- };
- };
- };
-
- asrc@2910000 {
- status = "okay";
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0x0>;
-
- asrc_in1_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in1_ep>;
- };
- };
-
- port@1 {
- reg = <0x1>;
-
- asrc_in2_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in2_ep>;
- };
- };
-
- port@2 {
- reg = <0x2>;
-
- asrc_in3_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in3_ep>;
- };
- };
-
- port@3 {
- reg = <0x3>;
-
- asrc_in4_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in4_ep>;
- };
- };
-
- port@4 {
- reg = <0x4>;
-
- asrc_in5_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in5_ep>;
- };
- };
-
- port@5 {
- reg = <0x5>;
-
- asrc_in6_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in6_ep>;
- };
- };
-
- port@6 {
- reg = <0x6>;
-
- asrc_in7_ep: endpoint {
- remote-endpoint = <&xbar_asrc_in7_ep>;
- };
- };
-
- asrc_out1_port: port@7 {
- reg = <0x7>;
-
- asrc_out1_ep: endpoint {
- remote-endpoint = <&xbar_asrc_out1_ep>;
- };
- };
-
- asrc_out2_port: port@8 {
- reg = <0x8>;
-
- asrc_out2_ep: endpoint {
- remote-endpoint = <&xbar_asrc_out2_ep>;
- };
- };
-
- asrc_out3_port: port@9 {
- reg = <0x9>;
-
- asrc_out3_ep: endpoint {
- remote-endpoint = <&xbar_asrc_out3_ep>;
- };
- };
-
- asrc_out4_port: port@a {
- reg = <0xa>;
-
- asrc_out4_ep: endpoint {
- remote-endpoint = <&xbar_asrc_out4_ep>;
- };
- };
-
- asrc_out5_port: port@b {
- reg = <0xb>;
-
- asrc_out5_ep: endpoint {
- remote-endpoint = <&xbar_asrc_out5_ep>;
- };
- };
-
- asrc_out6_port: port@c {
- reg = <0xc>;
-
- asrc_out6_ep: endpoint {
- remote-endpoint = <&xbar_asrc_out6_ep>;
- };
- };
- };
- };
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0x0>;
-
- xbar_admaif0: endpoint {
- remote-endpoint = <&admaif0>;
- };
- };
-
- port@1 {
- reg = <0x1>;
-
- xbar_admaif1: endpoint {
- remote-endpoint = <&admaif1>;
- };
- };
-
- port@2 {
- reg = <0x2>;
-
- xbar_admaif2: endpoint {
- remote-endpoint = <&admaif2>;
- };
- };
-
- port@3 {
- reg = <0x3>;
-
- xbar_admaif3: endpoint {
- remote-endpoint = <&admaif3>;
- };
- };
-
- port@4 {
- reg = <0x4>;
-
- xbar_admaif4: endpoint {
- remote-endpoint = <&admaif4>;
- };
- };
-
- port@5 {
- reg = <0x5>;
-
- xbar_admaif5: endpoint {
- remote-endpoint = <&admaif5>;
- };
- };
-
- port@6 {
- reg = <0x6>;
-
- xbar_admaif6: endpoint {
- remote-endpoint = <&admaif6>;
- };
- };
-
- port@7 {
- reg = <0x7>;
-
- xbar_admaif7: endpoint {
- remote-endpoint = <&admaif7>;
- };
- };
-
- port@8 {
- reg = <0x8>;
-
- xbar_admaif8: endpoint {
- remote-endpoint = <&admaif8>;
- };
- };
-
- port@9 {
- reg = <0x9>;
-
- xbar_admaif9: endpoint {
- remote-endpoint = <&admaif9>;
- };
- };
-
- port@a {
- reg = <0xa>;
-
- xbar_admaif10: endpoint {
- remote-endpoint = <&admaif10>;
- };
- };
-
- port@b {
- reg = <0xb>;
-
- xbar_admaif11: endpoint {
- remote-endpoint = <&admaif11>;
- };
- };
-
- port@c {
- reg = <0xc>;
-
- xbar_admaif12: endpoint {
- remote-endpoint = <&admaif12>;
- };
- };
-
- port@d {
- reg = <0xd>;
-
- xbar_admaif13: endpoint {
- remote-endpoint = <&admaif13>;
- };
- };
-
- port@e {
- reg = <0xe>;
-
- xbar_admaif14: endpoint {
- remote-endpoint = <&admaif14>;
- };
- };
-
- port@f {
- reg = <0xf>;
-
- xbar_admaif15: endpoint {
- remote-endpoint = <&admaif15>;
- };
- };
-
- port@10 {
- reg = <0x10>;
-
- xbar_admaif16: endpoint {
- remote-endpoint = <&admaif16>;
- };
- };
-
- port@11 {
- reg = <0x11>;
-
- xbar_admaif17: endpoint {
- remote-endpoint = <&admaif17>;
- };
- };
-
- port@12 {
- reg = <0x12>;
-
- xbar_admaif18: endpoint {
- remote-endpoint = <&admaif18>;
- };
- };
-
- port@13 {
- reg = <0x13>;
-
- xbar_admaif19: endpoint {
- remote-endpoint = <&admaif19>;
- };
- };
-
- xbar_i2s1_port: port@14 {
- reg = <0x14>;
-
- xbar_i2s1: endpoint {
- remote-endpoint = <&i2s1_cif>;
- };
- };
-
- xbar_i2s2_port: port@15 {
- reg = <0x15>;
-
- xbar_i2s2: endpoint {
- remote-endpoint = <&i2s2_cif>;
- };
- };
-
- xbar_i2s4_port: port@17 {
- reg = <0x17>;
-
- xbar_i2s4: endpoint {
- remote-endpoint = <&i2s4_cif>;
- };
- };
-
- xbar_i2s6_port: port@19 {
- reg = <0x19>;
-
- xbar_i2s6: endpoint {
- remote-endpoint = <&i2s6_cif>;
- };
- };
-
- xbar_dmic3_port: port@1c {
- reg = <0x1c>;
-
- xbar_dmic3: endpoint {
- remote-endpoint = <&dmic3_cif>;
- };
- };
-
- xbar_sfc1_in_port: port@20 {
- reg = <0x20>;
-
- xbar_sfc1_in: endpoint {
- remote-endpoint = <&sfc1_cif_in>;
- };
- };
-
- port@21 {
- reg = <0x21>;
-
- xbar_sfc1_out: endpoint {
- remote-endpoint = <&sfc1_cif_out>;
- };
- };
-
- xbar_sfc2_in_port: port@22 {
- reg = <0x22>;
-
- xbar_sfc2_in: endpoint {
- remote-endpoint = <&sfc2_cif_in>;
- };
- };
-
- port@23 {
- reg = <0x23>;
-
- xbar_sfc2_out: endpoint {
- remote-endpoint = <&sfc2_cif_out>;
- };
- };
-
- xbar_sfc3_in_port: port@24 {
- reg = <0x24>;
-
- xbar_sfc3_in: endpoint {
- remote-endpoint = <&sfc3_cif_in>;
- };
- };
-
- port@25 {
- reg = <0x25>;
-
- xbar_sfc3_out: endpoint {
- remote-endpoint = <&sfc3_cif_out>;
- };
- };
-
- xbar_sfc4_in_port: port@26 {
- reg = <0x26>;
-
- xbar_sfc4_in: endpoint {
- remote-endpoint = <&sfc4_cif_in>;
- };
- };
-
- port@27 {
- reg = <0x27>;
-
- xbar_sfc4_out: endpoint {
- remote-endpoint = <&sfc4_cif_out>;
- };
- };
-
- xbar_mvc1_in_port: port@28 {
- reg = <0x28>;
-
- xbar_mvc1_in: endpoint {
- remote-endpoint = <&mvc1_cif_in>;
- };
- };
-
- port@29 {
- reg = <0x29>;
-
- xbar_mvc1_out: endpoint {
- remote-endpoint = <&mvc1_cif_out>;
- };
- };
-
- xbar_mvc2_in_port: port@2a {
- reg = <0x2a>;
-
- xbar_mvc2_in: endpoint {
- remote-endpoint = <&mvc2_cif_in>;
- };
- };
-
- port@2b {
- reg = <0x2b>;
-
- xbar_mvc2_out: endpoint {
- remote-endpoint = <&mvc2_cif_out>;
- };
- };
-
- xbar_amx1_in1_port: port@2c {
- reg = <0x2c>;
-
- xbar_amx1_in1: endpoint {
- remote-endpoint = <&amx1_in1>;
- };
- };
-
- xbar_amx1_in2_port: port@2d {
- reg = <0x2d>;
-
- xbar_amx1_in2: endpoint {
- remote-endpoint = <&amx1_in2>;
- };
- };
-
- xbar_amx1_in3_port: port@2e {
- reg = <0x2e>;
-
- xbar_amx1_in3: endpoint {
- remote-endpoint = <&amx1_in3>;
- };
- };
-
- xbar_amx1_in4_port: port@2f {
- reg = <0x2f>;
-
- xbar_amx1_in4: endpoint {
- remote-endpoint = <&amx1_in4>;
- };
- };
-
- port@30 {
- reg = <0x30>;
-
- xbar_amx1_out: endpoint {
- remote-endpoint = <&amx1_out>;
- };
- };
-
- xbar_amx2_in1_port: port@31 {
- reg = <0x31>;
-
- xbar_amx2_in1: endpoint {
- remote-endpoint = <&amx2_in1>;
- };
- };
-
- xbar_amx2_in2_port: port@32 {
- reg = <0x32>;
-
- xbar_amx2_in2: endpoint {
- remote-endpoint = <&amx2_in2>;
- };
- };
-
- xbar_amx2_in3_port: port@33 {
- reg = <0x33>;
-
- xbar_amx2_in3: endpoint {
- remote-endpoint = <&amx2_in3>;
- };
- };
-
- xbar_amx2_in4_port: port@34 {
- reg = <0x34>;
-
- xbar_amx2_in4: endpoint {
- remote-endpoint = <&amx2_in4>;
- };
- };
-
- port@35 {
- reg = <0x35>;
-
- xbar_amx2_out: endpoint {
- remote-endpoint = <&amx2_out>;
- };
- };
-
- xbar_amx3_in1_port: port@36 {
- reg = <0x36>;
-
- xbar_amx3_in1: endpoint {
- remote-endpoint = <&amx3_in1>;
- };
- };
-
- xbar_amx3_in2_port: port@37 {
- reg = <0x37>;
-
- xbar_amx3_in2: endpoint {
- remote-endpoint = <&amx3_in2>;
- };
- };
-
- xbar_amx3_in3_port: port@38 {
- reg = <0x38>;
-
- xbar_amx3_in3: endpoint {
- remote-endpoint = <&amx3_in3>;
- };
- };
-
- xbar_amx3_in4_port: port@39 {
- reg = <0x39>;
-
- xbar_amx3_in4: endpoint {
- remote-endpoint = <&amx3_in4>;
- };
- };
-
- port@3a {
- reg = <0x3a>;
-
- xbar_amx3_out: endpoint {
- remote-endpoint = <&amx3_out>;
- };
- };
-
- xbar_amx4_in1_port: port@3b {
- reg = <0x3b>;
-
- xbar_amx4_in1: endpoint {
- remote-endpoint = <&amx4_in1>;
- };
- };
-
- xbar_amx4_in2_port: port@3c {
- reg = <0x3c>;
-
- xbar_amx4_in2: endpoint {
- remote-endpoint = <&amx4_in2>;
- };
- };
-
- xbar_amx4_in3_port: port@3d {
- reg = <0x3d>;
-
- xbar_amx4_in3: endpoint {
- remote-endpoint = <&amx4_in3>;
- };
- };
-
- xbar_amx4_in4_port: port@3e {
- reg = <0x3e>;
-
- xbar_amx4_in4: endpoint {
- remote-endpoint = <&amx4_in4>;
- };
- };
-
- port@3f {
- reg = <0x3f>;
-
- xbar_amx4_out: endpoint {
- remote-endpoint = <&amx4_out>;
- };
- };
-
- xbar_adx1_in_port: port@40 {
- reg = <0x40>;
-
- xbar_adx1_in: endpoint {
- remote-endpoint = <&adx1_in>;
- };
- };
-
- port@41 {
- reg = <0x41>;
-
- xbar_adx1_out1: endpoint {
- remote-endpoint = <&adx1_out1>;
- };
- };
-
- port@42 {
- reg = <0x42>;
-
- xbar_adx1_out2: endpoint {
- remote-endpoint = <&adx1_out2>;
- };
- };
-
- port@43 {
- reg = <0x43>;
-
- xbar_adx1_out3: endpoint {
- remote-endpoint = <&adx1_out3>;
- };
- };
-
- port@44 {
- reg = <0x44>;
-
- xbar_adx1_out4: endpoint {
- remote-endpoint = <&adx1_out4>;
- };
- };
-
- xbar_adx2_in_port: port@45 {
- reg = <0x45>;
-
- xbar_adx2_in: endpoint {
- remote-endpoint = <&adx2_in>;
- };
- };
-
- port@46 {
- reg = <0x46>;
-
- xbar_adx2_out1: endpoint {
- remote-endpoint = <&adx2_out1>;
- };
- };
-
- port@47 {
- reg = <0x47>;
-
- xbar_adx2_out2: endpoint {
- remote-endpoint = <&adx2_out2>;
- };
- };
-
- port@48 {
- reg = <0x48>;
-
- xbar_adx2_out3: endpoint {
- remote-endpoint = <&adx2_out3>;
- };
- };
-
- port@49 {
- reg = <0x49>;
-
- xbar_adx2_out4: endpoint {
- remote-endpoint = <&adx2_out4>;
- };
- };
-
- xbar_adx3_in_port: port@4a {
- reg = <0x4a>;
-
- xbar_adx3_in: endpoint {
- remote-endpoint = <&adx3_in>;
- };
- };
-
- port@4b {
- reg = <0x4b>;
-
- xbar_adx3_out1: endpoint {
- remote-endpoint = <&adx3_out1>;
- };
- };
-
- port@4c {
- reg = <0x4c>;
-
- xbar_adx3_out2: endpoint {
- remote-endpoint = <&adx3_out2>;
- };
- };
-
- port@4d {
- reg = <0x4d>;
-
- xbar_adx3_out3: endpoint {
- remote-endpoint = <&adx3_out3>;
- };
- };
-
- port@4e {
- reg = <0x4e>;
-
- xbar_adx3_out4: endpoint {
- remote-endpoint = <&adx3_out4>;
- };
- };
-
- xbar_adx4_in_port: port@4f {
- reg = <0x4f>;
-
- xbar_adx4_in: endpoint {
- remote-endpoint = <&adx4_in>;
- };
- };
-
- port@50 {
- reg = <0x50>;
-
- xbar_adx4_out1: endpoint {
- remote-endpoint = <&adx4_out1>;
- };
- };
-
- port@51 {
- reg = <0x51>;
-
- xbar_adx4_out2: endpoint {
- remote-endpoint = <&adx4_out2>;
- };
- };
-
- port@52 {
- reg = <0x52>;
-
- xbar_adx4_out3: endpoint {
- remote-endpoint = <&adx4_out3>;
- };
- };
-
- port@53 {
- reg = <0x53>;
-
- xbar_adx4_out4: endpoint {
- remote-endpoint = <&adx4_out4>;
- };
- };
-
- xbar_mix_in1_port: port@54 {
- reg = <0x54>;
-
- xbar_mix_in1: endpoint {
- remote-endpoint = <&mix_in1>;
- };
- };
-
- xbar_mix_in2_port: port@55 {
- reg = <0x55>;
-
- xbar_mix_in2: endpoint {
- remote-endpoint = <&mix_in2>;
- };
- };
-
- xbar_mix_in3_port: port@56 {
- reg = <0x56>;
-
- xbar_mix_in3: endpoint {
- remote-endpoint = <&mix_in3>;
- };
- };
-
- xbar_mix_in4_port: port@57 {
- reg = <0x57>;
-
- xbar_mix_in4: endpoint {
- remote-endpoint = <&mix_in4>;
- };
- };
-
- xbar_mix_in5_port: port@58 {
- reg = <0x58>;
-
- xbar_mix_in5: endpoint {
- remote-endpoint = <&mix_in5>;
- };
- };
-
- xbar_mix_in6_port: port@59 {
- reg = <0x59>;
-
- xbar_mix_in6: endpoint {
- remote-endpoint = <&mix_in6>;
- };
- };
-
- xbar_mix_in7_port: port@5a {
- reg = <0x5a>;
-
- xbar_mix_in7: endpoint {
- remote-endpoint = <&mix_in7>;
- };
- };
-
- xbar_mix_in8_port: port@5b {
- reg = <0x5b>;
-
- xbar_mix_in8: endpoint {
- remote-endpoint = <&mix_in8>;
- };
- };
-
- xbar_mix_in9_port: port@5c {
- reg = <0x5c>;
-
- xbar_mix_in9: endpoint {
- remote-endpoint = <&mix_in9>;
- };
- };
-
- xbar_mix_in10_port: port@5d {
- reg = <0x5d>;
-
- xbar_mix_in10: endpoint {
- remote-endpoint = <&mix_in10>;
- };
- };
-
- port@5e {
- reg = <0x5e>;
-
- xbar_mix_out1: endpoint {
- remote-endpoint = <&mix_out1>;
- };
- };
-
- port@5f {
- reg = <0x5f>;
-
- xbar_mix_out2: endpoint {
- remote-endpoint = <&mix_out2>;
- };
- };
-
- port@60 {
- reg = <0x60>;
-
- xbar_mix_out3: endpoint {
- remote-endpoint = <&mix_out3>;
- };
- };
-
- port@61 {
- reg = <0x61>;
-
- xbar_mix_out4: endpoint {
- remote-endpoint = <&mix_out4>;
- };
- };
-
- port@62 {
- reg = <0x62>;
-
- xbar_mix_out5: endpoint {
- remote-endpoint = <&mix_out5>;
- };
- };
-
- xbar_asrc_in1_port: port@63 {
- reg = <0x63>;
-
- xbar_asrc_in1_ep: endpoint {
- remote-endpoint = <&asrc_in1_ep>;
- };
- };
-
- port@64 {
- reg = <0x64>;
-
- xbar_asrc_out1_ep: endpoint {
- remote-endpoint = <&asrc_out1_ep>;
- };
- };
-
- xbar_asrc_in2_port: port@65 {
- reg = <0x65>;
-
- xbar_asrc_in2_ep: endpoint {
- remote-endpoint = <&asrc_in2_ep>;
- };
- };
-
- port@66 {
- reg = <0x66>;
-
- xbar_asrc_out2_ep: endpoint {
- remote-endpoint = <&asrc_out2_ep>;
- };
- };
-
- xbar_asrc_in3_port: port@67 {
- reg = <0x67>;
-
- xbar_asrc_in3_ep: endpoint {
- remote-endpoint = <&asrc_in3_ep>;
- };
- };
-
- port@68 {
- reg = <0x68>;
-
- xbar_asrc_out3_ep: endpoint {
- remote-endpoint = <&asrc_out3_ep>;
- };
- };
-
- xbar_asrc_in4_port: port@69 {
- reg = <0x69>;
-
- xbar_asrc_in4_ep: endpoint {
- remote-endpoint = <&asrc_in4_ep>;
- };
- };
-
- port@6a {
- reg = <0x6a>;
-
- xbar_asrc_out4_ep: endpoint {
- remote-endpoint = <&asrc_out4_ep>;
- };
- };
-
- xbar_asrc_in5_port: port@6b {
- reg = <0x6b>;
-
- xbar_asrc_in5_ep: endpoint {
- remote-endpoint = <&asrc_in5_ep>;
- };
- };
-
- port@6c {
- reg = <0x6c>;
-
- xbar_asrc_out5_ep: endpoint {
- remote-endpoint = <&asrc_out5_ep>;
- };
- };
-
- xbar_asrc_in6_port: port@6d {
- reg = <0x6d>;
-
- xbar_asrc_in6_ep: endpoint {
- remote-endpoint = <&asrc_in6_ep>;
- };
- };
-
- port@6e {
- reg = <0x6e>;
-
- xbar_asrc_out6_ep: endpoint {
- remote-endpoint = <&asrc_out6_ep>;
- };
- };
-
- xbar_asrc_in7_port: port@6f {
- reg = <0x6f>;
-
- xbar_asrc_in7_ep: endpoint {
- remote-endpoint = <&asrc_in7_ep>;
- };
- };
-
- xbar_ope1_in_port: port@70 {
- reg = <0x70>;
-
- xbar_ope1_in_ep: endpoint {
- remote-endpoint = <&ope1_cif_in_ep>;
- };
- };
-
- port@71 {
- reg = <0x71>;
-
- xbar_ope1_out_ep: endpoint {
- remote-endpoint = <&ope1_cif_out_ep>;
- };
- };
- };
- };
-
- dma-controller@2930000 {
- status = "okay";
- };
-
- interrupt-controller@2a40000 {
- status = "okay";
- };
- };
-
serial@3100000 {
compatible = "nvidia,tegra194-hsuart";
+ reset-names = "serial";
status = "okay";
};
@@ -2018,30 +34,6 @@
status = "okay";
};
- i2c@31e0000 {
- status = "okay";
-
- audio-codec@1c {
- compatible = "realtek,rt5640";
- reg = <0x1c>;
- interrupt-parent = <&gpio>;
- interrupts = <TEGRA234_MAIN_GPIO(AC, 5) GPIO_ACTIVE_HIGH>;
- clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
- clock-names = "mclk";
- realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
- realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
- realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
- sound-name-prefix = "CVB-RT";
-
- port {
- rt5640_ep: endpoint {
- remote-endpoint = <&i2s1_dap>;
- mclk-fs = <256>;
- };
- };
- };
- };
-
pwm@32a0000 {
assigned-clocks = <&bpmp TEGRA234_CLK_PWM3>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
@@ -2099,6 +91,7 @@
mode = "otg";
usb-role-switch;
status = "okay";
+
port {
hs_typec_p1: endpoint {
remote-endpoint = <&hs_ucsi_ccg_p1>;
@@ -2109,6 +102,7 @@
usb2-1 {
mode = "host";
status = "okay";
+
port {
hs_typec_p0: endpoint {
remote-endpoint = <&hs_ucsi_ccg_p0>;
@@ -2129,6 +123,7 @@
usb3-0 {
nvidia,usb2-companion = <1>;
status = "okay";
+
port {
ss_typec_p0: endpoint {
remote-endpoint = <&ss_ucsi_ccg_p0>;
@@ -2139,6 +134,7 @@
usb3-1 {
nvidia,usb2-companion = <0>;
status = "okay";
+
port {
ss_typec_p1: endpoint {
remote-endpoint = <&ss_ucsi_ccg_p1>;
@@ -2179,7 +175,7 @@
status = "okay";
phy-handle = <&mgbe0_phy>;
- phy-mode = "usxgmii";
+ phy-mode = "10gbase-r";
mdio {
#address-cells = <1>;
@@ -2194,57 +190,6 @@
};
};
- pcie@14100000 {
- status = "okay";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
-
- phys = <&p2u_hsio_3>;
- phy-names = "p2u-0";
- };
-
- pcie@14160000 {
- status = "okay";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
-
- phys = <&p2u_hsio_4>, <&p2u_hsio_5>, <&p2u_hsio_6>,
- <&p2u_hsio_7>;
- phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
- };
-
- pcie@141a0000 {
- status = "okay";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ls>;
- vpcie3v3-supply = <&vdd_3v3_pcie>;
- vpcie12v-supply = <&vdd_12v_pcie>;
-
- phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
- <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
- <&p2u_nvhs_6>, <&p2u_nvhs_7>;
- phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
- "p2u-5", "p2u-6", "p2u-7";
- };
-
- pcie-ep@141a0000 {
- status = "disabled";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ls>;
-
- reset-gpios = <&gpio TEGRA234_MAIN_GPIO(AF, 1) GPIO_ACTIVE_LOW>;
-
- nvidia,refclk-select-gpios = <&gpio_aon
- TEGRA234_AON_GPIO(AA, 4)
- GPIO_ACTIVE_HIGH>;
-
- phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
- <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
- <&p2u_nvhs_6>, <&p2u_nvhs_7>;
- phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
- "p2u-5", "p2u-6", "p2u-7";
- };
-
i2c@c240000 {
status = "okay";
@@ -2271,6 +216,7 @@
port@0 {
reg = <0>;
+
hs_ucsi_ccg_p0: endpoint {
remote-endpoint = <&hs_typec_p0>;
};
@@ -2278,6 +224,7 @@
port@1 {
reg = <1>;
+
ss_ucsi_ccg_p0: endpoint {
remote-endpoint = <&ss_typec_p0>;
};
@@ -2297,6 +244,7 @@
port@0 {
reg = <0>;
+
hs_ucsi_ccg_p1: endpoint {
remote-endpoint = <&hs_typec_p1>;
};
@@ -2304,6 +252,7 @@
port@1 {
reg = <1>;
+
ss_ucsi_ccg_p1: endpoint {
remote-endpoint = <&ss_typec_p1>;
};
@@ -2312,6 +261,57 @@
};
};
};
+
+ pcie@14100000 {
+ status = "okay";
+
+ vddio-pex-ctl-supply = <&vdd_1v8_ao>;
+
+ phys = <&p2u_hsio_3>;
+ phy-names = "p2u-0";
+ };
+
+ pcie@14160000 {
+ status = "okay";
+
+ vddio-pex-ctl-supply = <&vdd_1v8_ao>;
+
+ phys = <&p2u_hsio_4>, <&p2u_hsio_5>, <&p2u_hsio_6>,
+ <&p2u_hsio_7>;
+ phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
+ };
+
+ pcie@141a0000 {
+ status = "okay";
+
+ vddio-pex-ctl-supply = <&vdd_1v8_ls>;
+ vpcie3v3-supply = <&vdd_3v3_pcie>;
+ vpcie12v-supply = <&vdd_12v_pcie>;
+
+ phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
+ <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
+ <&p2u_nvhs_6>, <&p2u_nvhs_7>;
+ phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
+ "p2u-5", "p2u-6", "p2u-7";
+ };
+
+ pcie-ep@141a0000 {
+ status = "disabled";
+
+ vddio-pex-ctl-supply = <&vdd_1v8_ls>;
+
+ reset-gpios = <&gpio TEGRA234_MAIN_GPIO(AF, 1) GPIO_ACTIVE_LOW>;
+
+ nvidia,refclk-select-gpios = <&gpio_aon
+ TEGRA234_AON_GPIO(AA, 4)
+ GPIO_ACTIVE_HIGH>;
+
+ phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
+ <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
+ <&p2u_nvhs_6>, <&p2u_nvhs_7>;
+ phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
+ "p2u-5", "p2u-6", "p2u-7";
+ };
};
gpio-keys {
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000.dtsi
index d94147f22ebf..eb79e80a9852 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3737-0000.dtsi
@@ -1,9 +1,26 @@
// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/sound/rt5640.h>
+
/ {
compatible = "nvidia,p3737-0000";
bus@0 {
+ aconnect@2900000 {
+ ahub@2900800 {
+ i2s@2901000 {
+ ports {
+ port@1 {
+ endpoint {
+ dai-format = "i2s";
+ remote-endpoint = <&rt5640_ep>;
+ };
+ };
+ };
+ };
+ };
+ };
+
i2c@3160000 {
status = "okay";
@@ -20,6 +37,30 @@
};
};
+ i2c@31e0000 {
+ status = "okay";
+
+ audio-codec@1c {
+ compatible = "realtek,rt5640";
+ reg = <0x1c>;
+ interrupt-parent = <&gpio>;
+ interrupts = <TEGRA234_MAIN_GPIO(AC, 5) GPIO_ACTIVE_HIGH>;
+ clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
+ clock-names = "mclk";
+ realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
+ realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
+ realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
+ sound-name-prefix = "CVB-RT";
+
+ port {
+ rt5640_ep: endpoint {
+ remote-endpoint = <&i2s1_dap>;
+ mclk-fs = <256>;
+ };
+ };
+ };
+ };
+
pwm@3280000 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002+p3701-0008.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002+p3701-0008.dts
index 43d797e5544f..bac611d735c5 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002+p3701-0008.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002+p3701-0008.dts
@@ -12,6 +12,7 @@
aliases {
serial0 = &tcu;
+ serial1 = &uarta;
};
chosen {
@@ -19,104 +20,102 @@
};
bus@0 {
- host1x@13e00000 {
- nvdec@15480000 {
- status = "okay";
- };
- };
-
- pcie@140e0000 {
+ serial@3100000 {
+ compatible = "nvidia,tegra194-hsuart";
+ reset-names = "serial";
status = "okay";
- vddio-pex-ctl-supply = <&vdd_1v8_ls>;
- phys = <&p2u_gbe_4>, <&p2u_gbe_5>;
- phy-names = "p2u-0", "p2u-1";
};
- pcie@14100000 {
+ i2c@3160000 {
status = "okay";
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
- phys = <&p2u_hsio_3>;
- phy-names = "p2u-0";
};
- pcie@14160000 {
+ i2c@3180000 {
status = "okay";
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
- phys = <&p2u_hsio_7>, <&p2u_hsio_6>, <&p2u_hsio_5>,
- <&p2u_hsio_4>;
- phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
};
- pcie@141a0000 {
+ i2c@3190000 {
status = "okay";
- vddio-pex-ctl-supply = <&vdd_1v8_ls>;
- phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
- <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
- <&p2u_nvhs_6>, <&p2u_nvhs_7>;
- phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
- "p2u-5", "p2u-6", "p2u-7";
};
- pcie@141e0000 {
+ i2c@31b0000 {
status = "okay";
- vddio-pex-ctl-supply = <&vdd_1v8_ls>;
- phys = <&p2u_gbe_0>, <&p2u_gbe_1>;
- phy-names = "p2u-0", "p2u-1";
};
- aconnect@2900000 {
+ i2c@31c0000 {
status = "okay";
+
};
- serial@3100000 {
- compatible = "nvidia,tegra194-hsuart";
+ i2c@31e0000 {
status = "okay";
};
- i2c@3160000 {
+ spi@3270000 {
status = "okay";
};
- i2c@3180000 {
+ hda@3510000 {
+ nvidia,model = "NVIDIA IGX Orin HDA";
status = "okay";
};
- i2c@3190000 {
+ fuse@3810000 {
status = "okay";
};
- i2c@31b0000 {
+ i2c@c240000 {
status = "okay";
};
- i2c@31c0000 {
+ i2c@c250000 {
status = "okay";
-
};
- i2c@31e0000 {
- status = "okay";
+ host1x@13e00000 {
+ nvdec@15480000 {
+ status = "okay";
+ };
};
- spi@3270000 {
+ pcie@140e0000 {
status = "okay";
+ vddio-pex-ctl-supply = <&vdd_1v8_ls>;
+ phys = <&p2u_gbe_4>, <&p2u_gbe_5>;
+ phy-names = "p2u-0", "p2u-1";
};
- hda@3510000 {
- nvidia,model = "NVIDIA IGX HDA";
+ pcie@14100000 {
status = "okay";
+ vddio-pex-ctl-supply = <&vdd_1v8_ao>;
+ vpcie3v3-supply = <&vdd_3v3_wifi>;
+ phys = <&p2u_hsio_3>;
+ phy-names = "p2u-0";
};
- fuse@3810000 {
+ pcie@14160000 {
status = "okay";
+ vddio-pex-ctl-supply = <&vdd_1v8_ao>;
+ phys = <&p2u_hsio_7>, <&p2u_hsio_6>, <&p2u_hsio_5>,
+ <&p2u_hsio_4>;
+ phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
};
- i2c@c240000 {
+ pcie@141a0000 {
status = "okay";
+ vddio-pex-ctl-supply = <&vdd_1v8_ls>;
+ phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
+ <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
+ <&p2u_nvhs_6>, <&p2u_nvhs_7>;
+ phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
+ "p2u-5", "p2u-6", "p2u-7";
};
- i2c@c250000 {
+ pcie@141e0000 {
status = "okay";
+ vddio-pex-ctl-supply = <&vdd_1v8_ls>;
+ phys = <&p2u_gbe_0>, <&p2u_gbe_1>;
+ phy-names = "p2u-0", "p2u-1";
};
};
@@ -151,4 +150,89 @@
serial {
status = "okay";
};
+
+ sound {
+ status = "okay";
+
+ compatible = "nvidia,tegra186-audio-graph-card";
+
+ dais = /* ADMAIF (FE) Ports */
+ <&admaif0_port>, <&admaif1_port>, <&admaif2_port>, <&admaif3_port>,
+ <&admaif4_port>, <&admaif5_port>, <&admaif6_port>, <&admaif7_port>,
+ <&admaif8_port>, <&admaif9_port>, <&admaif10_port>, <&admaif11_port>,
+ <&admaif12_port>, <&admaif13_port>, <&admaif14_port>, <&admaif15_port>,
+ <&admaif16_port>, <&admaif17_port>, <&admaif18_port>, <&admaif19_port>,
+ /* XBAR Ports */
+ <&xbar_i2s1_port>, <&xbar_i2s2_port>, <&xbar_i2s4_port>,
+ <&xbar_i2s6_port>, <&xbar_dmic3_port>,
+ <&xbar_sfc1_in_port>, <&xbar_sfc2_in_port>,
+ <&xbar_sfc3_in_port>, <&xbar_sfc4_in_port>,
+ <&xbar_mvc1_in_port>, <&xbar_mvc2_in_port>,
+ <&xbar_amx1_in1_port>, <&xbar_amx1_in2_port>,
+ <&xbar_amx1_in3_port>, <&xbar_amx1_in4_port>,
+ <&xbar_amx2_in1_port>, <&xbar_amx2_in2_port>,
+ <&xbar_amx2_in3_port>, <&xbar_amx2_in4_port>,
+ <&xbar_amx3_in1_port>, <&xbar_amx3_in2_port>,
+ <&xbar_amx3_in3_port>, <&xbar_amx3_in4_port>,
+ <&xbar_amx4_in1_port>, <&xbar_amx4_in2_port>,
+ <&xbar_amx4_in3_port>, <&xbar_amx4_in4_port>,
+ <&xbar_adx1_in_port>, <&xbar_adx2_in_port>,
+ <&xbar_adx3_in_port>, <&xbar_adx4_in_port>,
+ <&xbar_mix_in1_port>, <&xbar_mix_in2_port>,
+ <&xbar_mix_in3_port>, <&xbar_mix_in4_port>,
+ <&xbar_mix_in5_port>, <&xbar_mix_in6_port>,
+ <&xbar_mix_in7_port>, <&xbar_mix_in8_port>,
+ <&xbar_mix_in9_port>, <&xbar_mix_in10_port>,
+ <&xbar_asrc_in1_port>, <&xbar_asrc_in2_port>,
+ <&xbar_asrc_in3_port>, <&xbar_asrc_in4_port>,
+ <&xbar_asrc_in5_port>, <&xbar_asrc_in6_port>,
+ <&xbar_asrc_in7_port>,
+ <&xbar_ope1_in_port>,
+ /* HW accelerators */
+ <&sfc1_out_port>, <&sfc2_out_port>,
+ <&sfc3_out_port>, <&sfc4_out_port>,
+ <&mvc1_out_port>, <&mvc2_out_port>,
+ <&amx1_out_port>, <&amx2_out_port>,
+ <&amx3_out_port>, <&amx4_out_port>,
+ <&adx1_out1_port>, <&adx1_out2_port>,
+ <&adx1_out3_port>, <&adx1_out4_port>,
+ <&adx2_out1_port>, <&adx2_out2_port>,
+ <&adx2_out3_port>, <&adx2_out4_port>,
+ <&adx3_out1_port>, <&adx3_out2_port>,
+ <&adx3_out3_port>, <&adx3_out4_port>,
+ <&adx4_out1_port>, <&adx4_out2_port>,
+ <&adx4_out3_port>, <&adx4_out4_port>,
+ <&mix_out1_port>, <&mix_out2_port>, <&mix_out3_port>,
+ <&mix_out4_port>, <&mix_out5_port>,
+ <&asrc_out1_port>, <&asrc_out2_port>, <&asrc_out3_port>,
+ <&asrc_out4_port>, <&asrc_out5_port>, <&asrc_out6_port>,
+ <&ope1_out_port>,
+ /* BE I/O Ports */
+ <&i2s1_port>, <&i2s2_port>, <&i2s4_port>, <&i2s6_port>,
+ <&dmic3_port>;
+
+ label = "NVIDIA IGX Orin APE";
+
+ widgets = "Microphone", "CVB-RT MIC Jack",
+ "Microphone", "CVB-RT MIC",
+ "Headphone", "CVB-RT HP Jack",
+ "Speaker", "CVB-RT SPK";
+
+ routing = /* I2S4 <-> RT5640 */
+ "CVB-RT AIF1 Playback", "I2S4 DAP-Playback",
+ "I2S4 DAP-Capture", "CVB-RT AIF1 Capture",
+ /* RT5640 codec controls */
+ "CVB-RT HP Jack", "CVB-RT HPOL",
+ "CVB-RT HP Jack", "CVB-RT HPOR",
+ "CVB-RT IN1P", "CVB-RT MIC Jack",
+ "CVB-RT IN2P", "CVB-RT MIC Jack",
+ "CVB-RT IN2N", "CVB-RT MIC Jack",
+ "CVB-RT IN3P", "CVB-RT MIC Jack",
+ "CVB-RT SPK", "CVB-RT SPOLP",
+ "CVB-RT SPK", "CVB-RT SPORP",
+ "CVB-RT SPK", "CVB-RT LOUTL",
+ "CVB-RT SPK", "CVB-RT LOUTR",
+ "CVB-RT DMIC1", "CVB-RT MIC",
+ "CVB-RT DMIC2", "CVB-RT MIC";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002.dtsi
index c95063b19321..527f2f3aee3a 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3740-0002.dtsi
@@ -1,10 +1,60 @@
// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/sound/rt5640.h>
+
/ {
compatible = "nvidia,p3740-0002";
bus@0 {
+ aconnect@2900000 {
+ ahub@2900800 {
+ i2s@2901300 {
+ ports {
+ port@1 {
+ endpoint {
+ dai-format = "i2s";
+ remote-endpoint = <&rt5640_ep>;
+ };
+ };
+ };
+ };
+
+ i2s@2901500 {
+ ports {
+ port@1 {
+ endpoint {
+ bitclock-master;
+ frame-master;
+ };
+ };
+ };
+ };
+ };
+ };
+
i2c@31c0000 {
+ rt5640: audio-codec@1c {
+ compatible = "realtek,rt5640";
+ reg = <0x1c>;
+ interrupt-parent = <&gpio>;
+ interrupts = <TEGRA234_MAIN_GPIO(F, 3) GPIO_ACTIVE_HIGH>;
+ clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
+ clock-names = "mclk";
+
+ realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
+ realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
+ realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
+
+ sound-name-prefix = "CVB-RT";
+
+ port {
+ rt5640_ep: endpoint {
+ remote-endpoint = <&i2s4_dap>;
+ mclk-fs = <256>;
+ };
+ };
+ };
+
/* carrier board ID EEPROM */
eeprom@55 {
compatible = "atmel,24c02";
@@ -134,4 +184,32 @@
"usb3-0", "usb3-1", "usb3-2";
};
};
+
+ vdd_3v3_dp: regulator-vdd-3v3-dp {
+ compatible = "regulator-fixed";
+ regulator-name = "VDD_3V3_DP";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vdd_3v3_sys>;
+ gpio = <&gpio TEGRA234_MAIN_GPIO(H, 6) 0>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ vdd_3v3_sys: regulator-vdd-3v3-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "VDD_3V3_SYS";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ vdd_3v3_wifi: regulator-vdd-3v3-wifi {
+ compatible = "regulator-fixed";
+ regulator-name = "VDD_3V3_WIFI";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio TEGRA234_MAIN_GPIO(G, 3) GPIO_ACTIVE_HIGH>;
+ regulator-boot-on;
+ enable-active-high;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3767.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3767.dtsi
index a8aa6e7d8fbc..59c14ded5e9f 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3767.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3767.dtsi
@@ -28,7 +28,7 @@
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <136000000>;
+ spi-max-frequency = <102000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
};
@@ -42,7 +42,7 @@
mmc@3400000 {
status = "okay";
bus-width = <4>;
- cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_HIGH>;
+ cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
disable-wp;
};
@@ -55,6 +55,35 @@
avdd-usb-supply = <&vdd_3v3_ao>;
};
+ i2c@c240000 {
+ status = "okay";
+
+ power-sensor@40 {
+ compatible = "ti,ina3221";
+ reg = <0x40>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ input@0 {
+ reg = <0x0>;
+ label = "VDD_IN";
+ shunt-resistor-micro-ohms = <5000>;
+ };
+
+ input@1 {
+ reg = <0x1>;
+ label = "VDD_CPU_GPU_CV";
+ shunt-resistor-micro-ohms = <5000>;
+ };
+
+ input@2 {
+ reg = <0x2>;
+ label = "VDD_SOC";
+ shunt-resistor-micro-ohms = <5000>;
+ };
+ };
+ };
+
rtc@c2a0000 {
status = "okay";
};
@@ -106,12 +135,18 @@
trips {
tj_trip_active0: active-0 {
- temperature = <74000>;
+ temperature = <35000>;
hysteresis = <4000>;
type = "active";
};
tj_trip_active1: active-1 {
+ temperature = <74000>;
+ hysteresis = <4000>;
+ type = "active";
+ };
+
+ tj_trip_active2: active-2 {
temperature = <95000>;
hysteresis = <4000>;
type = "active";
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0000.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0000.dts
index 65e4b51b79c1..61b0e69d3d20 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0000.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0000.dts
@@ -12,16 +12,20 @@
model = "NVIDIA Jetson Orin NX Engineering Reference Developer Kit";
aliases {
- serial0 = &tcu;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
+ serial1 = &uarta;
+ serial2 = &uarte;
};
bus@0 {
- serial@31d0000 {
- current-speed = <115200>;
+ serial@3100000 {
+ compatible = "nvidia,tegra194-hsuart";
+ reset-names = "serial";
+ status = "okay";
+ };
+
+ serial@3140000 {
+ compatible = "nvidia,tegra194-hsuart";
+ reset-names = "serial";
status = "okay";
};
@@ -39,50 +43,6 @@
padctl@3520000 {
status = "okay";
};
-
- /* C1 - M.2 Key-E */
- pcie@14100000 {
- status = "okay";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
-
- phys = <&p2u_hsio_3>;
- phy-names = "p2u-0";
- };
-
- /* C4 - M.2 Key-M */
- pcie@14160000 {
- status = "okay";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
-
- phys = <&p2u_hsio_4>, <&p2u_hsio_5>, <&p2u_hsio_6>,
- <&p2u_hsio_7>;
- phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
- };
-
- /* C8 - Ethernet */
- pcie@140a0000 {
- status = "okay";
-
- num-lanes = <2>;
-
- phys = <&p2u_gbe_2>, <&p2u_gbe_3>;
- phy-names = "p2u-0", "p2u-1";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
- vpcie3v3-supply = <&vdd_3v3_pcie>;
- };
-
- /* C7 - M.2 Key-M */
- pcie@141e0000 {
- status = "okay";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
-
- phys = <&p2u_gbe_0>, <&p2u_gbe_1>;
- phy-names = "p2u-0", "p2u-1";
- };
};
gpio-keys {
@@ -113,7 +73,7 @@
};
pwm-fan {
- cooling-levels = <0 187 255>;
+ cooling-levels = <0 88 187 255>;
};
vdd_3v3_pcie: regulator-vdd-3v3-pcie {
@@ -125,10 +85,6 @@
enable-active-high;
};
- serial {
- status = "okay";
- };
-
thermal-zones {
tj-thermal {
cooling-maps {
@@ -141,6 +97,11 @@
cooling-device = <&fan 1 2>;
trip = <&tj_trip_active1>;
};
+
+ map-active-2 {
+ cooling-device = <&fan 2 3>;
+ trip = <&tj_trip_active2>;
+ };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0005.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0005.dts
index 9b86aa6f7dbe..9e9bb9ca8be4 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0005.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000+p3767-0005.dts
@@ -12,7 +12,7 @@
model = "NVIDIA Jetson Orin Nano Developer Kit";
pwm-fan {
- cooling-levels = <0 187 255>;
+ cooling-levels = <0 88 187 255>;
};
thermal-zones {
@@ -27,6 +27,11 @@
cooling-device = <&fan 1 2>;
trip = <&tj_trip_active1>;
};
+
+ map-active-2 {
+ cooling-device = <&fan 2 3>;
+ trip = <&tj_trip_active2>;
+ };
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000.dtsi
index c7291ba27cfa..5d0298b6c30d 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-p3768-0000.dtsi
@@ -134,6 +134,19 @@
"usb3-1";
};
+ /* C8 - Ethernet */
+ pcie@140a0000 {
+ status = "okay";
+
+ num-lanes = <2>;
+
+ phys = <&p2u_gbe_2>, <&p2u_gbe_3>;
+ phy-names = "p2u-0", "p2u-1";
+
+ vddio-pex-ctl-supply = <&vdd_1v8_ao>;
+ vpcie3v3-supply = <&vdd_3v3_pcie>;
+ };
+
/* C1 - M.2 Key-E */
pcie@14100000 {
status = "okay";
@@ -155,19 +168,6 @@
phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
};
- /* C8 - Ethernet */
- pcie@140a0000 {
- status = "okay";
-
- num-lanes = <2>;
-
- phys = <&p2u_gbe_2>, <&p2u_gbe_3>;
- phy-names = "p2u-0", "p2u-1";
-
- vddio-pex-ctl-supply = <&vdd_1v8_ao>;
- vpcie3v3-supply = <&vdd_3v3_pcie>;
- };
-
/* C7 - M.2 Key-M */
pcie@141e0000 {
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-sim-vdk.dts b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-sim-vdk.dts
index 5804acfc428a..9f3e9f30c3f7 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234-sim-vdk.dts
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234-sim-vdk.dts
@@ -19,6 +19,8 @@
bus@0 {
serial@3100000 {
+ /delete-property/ dmas;
+ /delete-property/ dma-names;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/nvidia/tegra234.dtsi b/sys/contrib/device-tree/src/arm64/nvidia/tegra234.dtsi
index f4974e81dd4b..d1bd328892af 100644
--- a/sys/contrib/device-tree/src/arm64/nvidia/tegra234.dtsi
+++ b/sys/contrib/device-tree/src/arm64/nvidia/tegra234.dtsi
@@ -43,12 +43,12 @@
<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+ <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";
};
@@ -180,7 +180,8 @@
clocks = <&bpmp TEGRA234_CLK_AHUB>;
clock-names = "ahub";
assigned-clocks = <&bpmp TEGRA234_CLK_AHUB>;
- assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLA_OUT0>;
+ assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+ assigned-clock-rates = <81600000>;
status = "disabled";
#address-cells = <2>;
@@ -687,6 +688,17 @@
status = "disabled";
};
+ uarte: serial@3140000 {
+ compatible = "nvidia,tegra234-uart", "nvidia,tegra20-uart";
+ reg = <0x0 0x03140000 0x0 0x10000>;
+ interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bpmp TEGRA234_CLK_UARTE>;
+ resets = <&bpmp TEGRA234_RESET_UARTE>;
+ dmas = <&gpcdma 20>, <&gpcdma 20>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
gen1_i2c: i2c@3160000 {
compatible = "nvidia,tegra194-i2c";
reg = <0x0 0x3160000 0x0 0x100>;
@@ -695,8 +707,8 @@
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <400000>;
- clocks = <&bpmp TEGRA234_CLK_I2C1
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C1>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
assigned-clocks = <&bpmp TEGRA234_CLK_I2C1>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
@@ -714,8 +726,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <400000>;
- clocks = <&bpmp TEGRA234_CLK_I2C3
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C3>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
assigned-clocks = <&bpmp TEGRA234_CLK_I2C3>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
@@ -733,8 +745,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <100000>;
- clocks = <&bpmp TEGRA234_CLK_I2C4
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C4>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
assigned-clocks = <&bpmp TEGRA234_CLK_I2C4>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
@@ -752,8 +764,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <100000>;
- clocks = <&bpmp TEGRA234_CLK_I2C6
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C6>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
assigned-clocks = <&bpmp TEGRA234_CLK_I2C6>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
@@ -771,8 +783,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <100000>;
- clocks = <&bpmp TEGRA234_CLK_I2C7
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C7>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
assigned-clocks = <&bpmp TEGRA234_CLK_I2C7>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
@@ -797,8 +809,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <100000>;
- clocks = <&bpmp TEGRA234_CLK_I2C9
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C9>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
assigned-clocks = <&bpmp TEGRA234_CLK_I2C9>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
@@ -808,6 +820,44 @@
dma-names = "rx", "tx";
};
+ spi@3210000 {
+ compatible = "nvidia,tegra210-spi", "nvidia,tegra114-spi";
+ reg = <0x0 0x03210000 0x0 0x1000>;
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&bpmp TEGRA234_CLK_SPI1>;
+ assigned-clocks = <&bpmp TEGRA234_CLK_SPI1>;
+ assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clock-names = "spi";
+ iommus = <&smmu_niso0 TEGRA234_SID_GPCDMA>;
+ resets = <&bpmp TEGRA234_RESET_SPI1>;
+ reset-names = "spi";
+ dmas = <&gpcdma 15>, <&gpcdma 15>;
+ dma-names = "rx", "tx";
+ dma-coherent;
+ status = "disabled";
+ };
+
+ spi@3230000 {
+ compatible = "nvidia,tegra210-spi", "nvidia,tegra114-spi";
+ reg = <0x0 0x03230000 0x0 0x1000>;
+ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&bpmp TEGRA234_CLK_SPI3>;
+ clock-names = "spi";
+ iommus = <&smmu_niso0 TEGRA234_SID_GPCDMA>;
+ assigned-clocks = <&bpmp TEGRA234_CLK_SPI3>;
+ assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+ resets = <&bpmp TEGRA234_RESET_SPI3>;
+ reset-names = "spi";
+ dmas = <&gpcdma 17>, <&gpcdma 17>;
+ dma-names = "rx", "tx";
+ dma-coherent;
+ status = "disabled";
+ };
+
spi@3270000 {
compatible = "nvidia,tegra234-qspi";
reg = <0x0 0x3270000 0x0 0x1000>;
@@ -1409,7 +1459,7 @@
<&mc TEGRA234_MEMORY_CLIENT_MGBEAWR &emc>;
interconnect-names = "dma-mem", "write";
iommus = <&smmu_niso0 TEGRA234_SID_MGBE>;
- power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEA>;
+ power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEB>;
status = "disabled";
};
@@ -1443,7 +1493,7 @@
<&mc TEGRA234_MEMORY_CLIENT_MGBEBWR &emc>;
interconnect-names = "dma-mem", "write";
iommus = <&smmu_niso0 TEGRA234_SID_MGBE_VF1>;
- power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEB>;
+ power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEC>;
status = "disabled";
};
@@ -1477,7 +1527,7 @@
<&mc TEGRA234_MEMORY_CLIENT_MGBECWR &emc>;
interconnect-names = "dma-mem", "write";
iommus = <&smmu_niso0 TEGRA234_SID_MGBE_VF2>;
- power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBEC>;
+ power-domains = <&bpmp TEGRA234_POWER_DOMAIN_MGBED>;
status = "disabled";
};
@@ -1703,8 +1753,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <100000>;
- clocks = <&bpmp TEGRA234_CLK_I2C2
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C2>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
assigned-clocks = <&bpmp TEGRA234_CLK_I2C2>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
@@ -1722,8 +1772,8 @@
#size-cells = <0>;
status = "disabled";
clock-frequency = <400000>;
- clocks = <&bpmp TEGRA234_CLK_I2C8
- &bpmp TEGRA234_CLK_PLLP_OUT0>;
+ clocks = <&bpmp TEGRA234_CLK_I2C8>,
+ <&bpmp TEGRA234_CLK_PLLP_OUT0>;
clock-names = "div-clk", "parent";
assigned-clocks = <&bpmp TEGRA234_CLK_I2C8>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
@@ -1733,6 +1783,25 @@
dma-names = "rx", "tx";
};
+ spi@c260000 {
+ compatible = "nvidia,tegra210-spi", "nvidia,tegra114-spi";
+ reg = <0x0 0x0c260000 0x0 0x1000>;
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&bpmp TEGRA234_CLK_SPI2>;
+ clock-names = "spi";
+ iommus = <&smmu_niso0 TEGRA234_SID_GPCDMA>;
+ assigned-clocks = <&bpmp TEGRA234_CLK_SPI2>;
+ assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+ resets = <&bpmp TEGRA234_RESET_SPI2>;
+ reset-names = "spi";
+ dmas = <&gpcdma 19>, <&gpcdma 19>;
+ dma-names = "rx", "tx";
+ dma-coherent;
+ status = "disabled";
+ };
+
rtc@c2a0000 {
compatible = "nvidia,tegra234-rtc", "nvidia,tegra20-rtc";
reg = <0x0 0x0c2a0000 0x0 0x10000>;
@@ -3589,72 +3658,142 @@
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp2: opp-268800000 {
+ cl0_ch1_opp2: opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl0_ch1_opp3: opp-268800000 {
opp-hz = /bits/ 64 <268800000>;
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp3: opp-422400000 {
+ cl0_ch1_opp4: opp-345600000 {
+ opp-hz = /bits/ 64 <345600000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl0_ch1_opp5: opp-422400000 {
opp-hz = /bits/ 64 <422400000>;
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp4: opp-576000000 {
+ cl0_ch1_opp6: opp-499200000 {
+ opp-hz = /bits/ 64 <499200000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl0_ch1_opp7: opp-576000000 {
opp-hz = /bits/ 64 <576000000>;
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp5: opp-729600000 {
+ cl0_ch1_opp8: opp-652800000 {
+ opp-hz = /bits/ 64 <652800000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl0_ch1_opp9: opp-729600000 {
opp-hz = /bits/ 64 <729600000>;
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp6: opp-883200000 {
+ cl0_ch1_opp10: opp-806400000 {
+ opp-hz = /bits/ 64 <806400000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl0_ch1_opp11: opp-883200000 {
opp-hz = /bits/ 64 <883200000>;
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp7: opp-1036800000 {
+ cl0_ch1_opp12: opp-960000000 {
+ opp-hz = /bits/ 64 <960000000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl0_ch1_opp13: opp-1036800000 {
opp-hz = /bits/ 64 <1036800000>;
opp-peak-kBps = <816000>;
};
- cl0_ch1_opp8: opp-1190400000 {
+ cl0_ch1_opp14: opp-1113600000 {
+ opp-hz = /bits/ 64 <1113600000>;
+ opp-peak-kBps = <1632000>;
+ };
+
+ cl0_ch1_opp15: opp-1190400000 {
opp-hz = /bits/ 64 <1190400000>;
- opp-peak-kBps = <816000>;
+ opp-peak-kBps = <1632000>;
+ };
+
+ cl0_ch1_opp16: opp-1267200000 {
+ opp-hz = /bits/ 64 <1267200000>;
+ opp-peak-kBps = <1632000>;
};
- cl0_ch1_opp9: opp-1344000000 {
+ cl0_ch1_opp17: opp-1344000000 {
opp-hz = /bits/ 64 <1344000000>;
opp-peak-kBps = <1632000>;
};
- cl0_ch1_opp10: opp-1497600000 {
- opp-hz = /bits/ 64 <1497600000>;
+ cl0_ch1_opp18: opp-1420800000 {
+ opp-hz = /bits/ 64 <1420800000>;
opp-peak-kBps = <1632000>;
};
- cl0_ch1_opp11: opp-1651200000 {
+ cl0_ch1_opp19: opp-1497600000 {
+ opp-hz = /bits/ 64 <1497600000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl0_ch1_opp20: opp-1574400000 {
+ opp-hz = /bits/ 64 <1574400000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl0_ch1_opp21: opp-1651200000 {
opp-hz = /bits/ 64 <1651200000>;
- opp-peak-kBps = <2660000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl0_ch1_opp22: opp-1728000000 {
+ opp-hz = /bits/ 64 <1728000000>;
+ opp-peak-kBps = <3200000>;
};
- cl0_ch1_opp12: opp-1804800000 {
+ cl0_ch1_opp23: opp-1804800000 {
opp-hz = /bits/ 64 <1804800000>;
- opp-peak-kBps = <2660000>;
+ opp-peak-kBps = <3200000>;
};
- cl0_ch1_opp13: opp-1958400000 {
+ cl0_ch1_opp24: opp-1881600000 {
+ opp-hz = /bits/ 64 <1881600000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl0_ch1_opp25: opp-1958400000 {
opp-hz = /bits/ 64 <1958400000>;
opp-peak-kBps = <3200000>;
};
- cl0_ch1_opp14: opp-2112000000 {
+ cl0_ch1_opp26: opp-2035200000 {
+ opp-hz = /bits/ 64 <2035200000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl0_ch1_opp27: opp-2112000000 {
opp-hz = /bits/ 64 <2112000000>;
opp-peak-kBps = <6400000>;
};
- cl0_ch1_opp15: opp-2201600000 {
+ cl0_ch1_opp28: opp-2188800000 {
+ opp-hz = /bits/ 64 <2188800000>;
+ opp-peak-kBps = <6400000>;
+ };
+
+ cl0_ch1_opp29: opp-2201600000 {
opp-hz = /bits/ 64 <2201600000>;
opp-peak-kBps = <6400000>;
};
@@ -3669,72 +3808,142 @@
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp2: opp-268800000 {
+ cl1_ch1_opp2: opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl1_ch1_opp3: opp-268800000 {
opp-hz = /bits/ 64 <268800000>;
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp3: opp-422400000 {
+ cl1_ch1_opp4: opp-345600000 {
+ opp-hz = /bits/ 64 <345600000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl1_ch1_opp5: opp-422400000 {
opp-hz = /bits/ 64 <422400000>;
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp4: opp-576000000 {
+ cl1_ch1_opp6: opp-499200000 {
+ opp-hz = /bits/ 64 <499200000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl1_ch1_opp7: opp-576000000 {
opp-hz = /bits/ 64 <576000000>;
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp5: opp-729600000 {
+ cl1_ch1_opp8: opp-652800000 {
+ opp-hz = /bits/ 64 <652800000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl1_ch1_opp9: opp-729600000 {
opp-hz = /bits/ 64 <729600000>;
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp6: opp-883200000 {
+ cl1_ch1_opp10: opp-806400000 {
+ opp-hz = /bits/ 64 <806400000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl1_ch1_opp11: opp-883200000 {
opp-hz = /bits/ 64 <883200000>;
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp7: opp-1036800000 {
+ cl1_ch1_opp12: opp-960000000 {
+ opp-hz = /bits/ 64 <960000000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl1_ch1_opp13: opp-1036800000 {
opp-hz = /bits/ 64 <1036800000>;
opp-peak-kBps = <816000>;
};
- cl1_ch1_opp8: opp-1190400000 {
+ cl1_ch1_opp14: opp-1113600000 {
+ opp-hz = /bits/ 64 <1113600000>;
+ opp-peak-kBps = <1632000>;
+ };
+
+ cl1_ch1_opp15: opp-1190400000 {
opp-hz = /bits/ 64 <1190400000>;
- opp-peak-kBps = <816000>;
+ opp-peak-kBps = <1632000>;
};
- cl1_ch1_opp9: opp-1344000000 {
+ cl1_ch1_opp16: opp-1267200000 {
+ opp-hz = /bits/ 64 <1267200000>;
+ opp-peak-kBps = <1632000>;
+ };
+
+ cl1_ch1_opp17: opp-1344000000 {
opp-hz = /bits/ 64 <1344000000>;
opp-peak-kBps = <1632000>;
};
- cl1_ch1_opp10: opp-1497600000 {
- opp-hz = /bits/ 64 <1497600000>;
+ cl1_ch1_opp18: opp-1420800000 {
+ opp-hz = /bits/ 64 <1420800000>;
opp-peak-kBps = <1632000>;
};
- cl1_ch1_opp11: opp-1651200000 {
+ cl1_ch1_opp19: opp-1497600000 {
+ opp-hz = /bits/ 64 <1497600000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl1_ch1_opp20: opp-1574400000 {
+ opp-hz = /bits/ 64 <1574400000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl1_ch1_opp21: opp-1651200000 {
opp-hz = /bits/ 64 <1651200000>;
- opp-peak-kBps = <2660000>;
+ opp-peak-kBps = <3200000>;
};
- cl1_ch1_opp12: opp-1804800000 {
+ cl1_ch1_opp22: opp-1728000000 {
+ opp-hz = /bits/ 64 <1728000000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl1_ch1_opp23: opp-1804800000 {
opp-hz = /bits/ 64 <1804800000>;
- opp-peak-kBps = <2660000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl1_ch1_opp24: opp-1881600000 {
+ opp-hz = /bits/ 64 <1881600000>;
+ opp-peak-kBps = <3200000>;
};
- cl1_ch1_opp13: opp-1958400000 {
+ cl1_ch1_opp25: opp-1958400000 {
opp-hz = /bits/ 64 <1958400000>;
opp-peak-kBps = <3200000>;
};
- cl1_ch1_opp14: opp-2112000000 {
+ cl1_ch1_opp26: opp-2035200000 {
+ opp-hz = /bits/ 64 <2035200000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl1_ch1_opp27: opp-2112000000 {
opp-hz = /bits/ 64 <2112000000>;
opp-peak-kBps = <6400000>;
};
- cl1_ch1_opp15: opp-2201600000 {
+ cl1_ch1_opp28: opp-2188800000 {
+ opp-hz = /bits/ 64 <2188800000>;
+ opp-peak-kBps = <6400000>;
+ };
+
+ cl1_ch1_opp29: opp-2201600000 {
opp-hz = /bits/ 64 <2201600000>;
opp-peak-kBps = <6400000>;
};
@@ -3749,72 +3958,142 @@
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp2: opp-268800000 {
+ cl2_ch1_opp2: opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl2_ch1_opp3: opp-268800000 {
opp-hz = /bits/ 64 <268800000>;
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp3: opp-422400000 {
+ cl2_ch1_opp4: opp-345600000 {
+ opp-hz = /bits/ 64 <345600000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl2_ch1_opp5: opp-422400000 {
opp-hz = /bits/ 64 <422400000>;
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp4: opp-576000000 {
+ cl2_ch1_opp6: opp-499200000 {
+ opp-hz = /bits/ 64 <499200000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl2_ch1_opp7: opp-576000000 {
opp-hz = /bits/ 64 <576000000>;
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp5: opp-729600000 {
+ cl2_ch1_opp8: opp-652800000 {
+ opp-hz = /bits/ 64 <652800000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl2_ch1_opp9: opp-729600000 {
opp-hz = /bits/ 64 <729600000>;
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp6: opp-883200000 {
+ cl2_ch1_opp10: opp-806400000 {
+ opp-hz = /bits/ 64 <806400000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl2_ch1_opp11: opp-883200000 {
opp-hz = /bits/ 64 <883200000>;
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp7: opp-1036800000 {
+ cl2_ch1_opp12: opp-960000000 {
+ opp-hz = /bits/ 64 <960000000>;
+ opp-peak-kBps = <816000>;
+ };
+
+ cl2_ch1_opp13: opp-1036800000 {
opp-hz = /bits/ 64 <1036800000>;
opp-peak-kBps = <816000>;
};
- cl2_ch1_opp8: opp-1190400000 {
+ cl2_ch1_opp14: opp-1113600000 {
+ opp-hz = /bits/ 64 <1113600000>;
+ opp-peak-kBps = <1632000>;
+ };
+
+ cl2_ch1_opp15: opp-1190400000 {
opp-hz = /bits/ 64 <1190400000>;
- opp-peak-kBps = <816000>;
+ opp-peak-kBps = <1632000>;
+ };
+
+ cl2_ch1_opp16: opp-1267200000 {
+ opp-hz = /bits/ 64 <1267200000>;
+ opp-peak-kBps = <1632000>;
};
- cl2_ch1_opp9: opp-1344000000 {
+ cl2_ch1_opp17: opp-1344000000 {
opp-hz = /bits/ 64 <1344000000>;
opp-peak-kBps = <1632000>;
};
- cl2_ch1_opp10: opp-1497600000 {
- opp-hz = /bits/ 64 <1497600000>;
+ cl2_ch1_opp18: opp-1420800000 {
+ opp-hz = /bits/ 64 <1420800000>;
opp-peak-kBps = <1632000>;
};
- cl2_ch1_opp11: opp-1651200000 {
+ cl2_ch1_opp19: opp-1497600000 {
+ opp-hz = /bits/ 64 <1497600000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl2_ch1_opp20: opp-1574400000 {
+ opp-hz = /bits/ 64 <1574400000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl2_ch1_opp21: opp-1651200000 {
opp-hz = /bits/ 64 <1651200000>;
- opp-peak-kBps = <2660000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl2_ch1_opp22: opp-1728000000 {
+ opp-hz = /bits/ 64 <1728000000>;
+ opp-peak-kBps = <3200000>;
};
- cl2_ch1_opp12: opp-1804800000 {
+ cl2_ch1_opp23: opp-1804800000 {
opp-hz = /bits/ 64 <1804800000>;
- opp-peak-kBps = <2660000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl2_ch1_opp24: opp-1881600000 {
+ opp-hz = /bits/ 64 <1881600000>;
+ opp-peak-kBps = <3200000>;
};
- cl2_ch1_opp13: opp-1958400000 {
+ cl2_ch1_opp25: opp-1958400000 {
opp-hz = /bits/ 64 <1958400000>;
opp-peak-kBps = <3200000>;
};
- cl2_ch1_opp14: opp-2112000000 {
+ cl2_ch1_opp26: opp-2035200000 {
+ opp-hz = /bits/ 64 <2035200000>;
+ opp-peak-kBps = <3200000>;
+ };
+
+ cl2_ch1_opp27: opp-2112000000 {
opp-hz = /bits/ 64 <2112000000>;
opp-peak-kBps = <6400000>;
};
- cl2_ch1_opp15: opp-2201600000 {
+ cl2_ch1_opp28: opp-2188800000 {
+ opp-hz = /bits/ 64 <2188800000>;
+ opp-peak-kBps = <6400000>;
+ };
+
+ cl2_ch1_opp29: opp-2201600000 {
opp-hz = /bits/ 64 <2201600000>;
opp-peak-kBps = <6400000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-d3-camera-mezzanine.dts b/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-d3-camera-mezzanine.dts
new file mode 100644
index 000000000000..c08b4be5cc7e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-d3-camera-mezzanine.dts
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Linaro Ltd.
+ */
+
+/dts-v1/;
+
+#include "apq8016-sbc.dts"
+
+/ {
+ camera_vdddo_1v8: camera-vdddo-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "camera_vdddo";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ camera_vdda_2v8: camera-vdda-2v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "camera_vdda";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ };
+
+ camera_vddd_1v5: camera-vddd-1v5 {
+ compatible = "regulator-fixed";
+ regulator-name = "camera_vddd";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-always-on;
+ };
+};
+
+&camss {
+ status = "okay";
+
+ ports {
+ port@0 {
+ reg = <0>;
+ csiphy0_ep: endpoint {
+ data-lanes = <0 2>;
+ remote-endpoint = <&ov5640_ep>;
+ };
+ };
+ };
+};
+
+&cci {
+ status = "okay";
+};
+
+&cci_i2c0 {
+ camera_rear@3b {
+ compatible = "ovti,ov5640";
+ reg = <0x3b>;
+
+ powerdown-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&camera_rear_default>;
+
+ clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
+ clock-names = "xclk";
+ assigned-clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
+ assigned-clock-rates = <23880000>;
+
+ DOVDD-supply = <&camera_vdddo_1v8>;
+ AVDD-supply = <&camera_vdda_2v8>;
+ DVDD-supply = <&camera_vddd_1v5>;
+
+ port {
+ ov5640_ep: endpoint {
+ data-lanes = <1 2>;
+ remote-endpoint = <&csiphy0_ep>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-usb-host.dtso b/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-usb-host.dtso
new file mode 100644
index 000000000000..a82c26b7eae8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc-usb-host.dtso
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+/plugin/;
+
+&usb {
+ dr_mode = "host";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc.dts b/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc.dts
index f3d65a606194..9ffad7d1f2b6 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/apq8016-sbc.dts
@@ -34,30 +34,6 @@
stdout-path = "serial0";
};
- camera_vdddo_1v8: camera-vdddo-1v8 {
- compatible = "regulator-fixed";
- regulator-name = "camera_vdddo";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- };
-
- camera_vdda_2v8: camera-vdda-2v8 {
- compatible = "regulator-fixed";
- regulator-name = "camera_vdda";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-always-on;
- };
-
- camera_vddd_1v5: camera-vddd-1v5 {
- compatible = "regulator-fixed";
- regulator-name = "camera_vddd";
- regulator-min-microvolt = <1500000>;
- regulator-max-microvolt = <1500000>;
- regulator-always-on;
- };
-
reserved-memory {
ramoops@bff00000 {
compatible = "ramoops";
@@ -77,7 +53,7 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 121 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 121 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
};
@@ -172,15 +148,13 @@
};
&blsp_i2c2 {
- /* On Low speed expansion */
+ /* On Low speed expansion: LS-I2C0 */
status = "okay";
- label = "LS-I2C0";
};
&blsp_i2c4 {
- /* On High speed expansion */
+ /* On High speed expansion: HS-I2C2 */
status = "okay";
- label = "HS-I2C2";
adv_bridge: bridge@39 {
status = "okay";
@@ -198,6 +172,9 @@
pd-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
avdd-supply = <&pm8916_l6>;
+ a2vdd-supply = <&pm8916_l6>;
+ dvdd-supply = <&pm8916_l6>;
+ pvdd-supply = <&pm8916_l6>;
v1p2-supply = <&pm8916_l6>;
v3p3-supply = <&pm8916_l17>;
@@ -228,21 +205,18 @@
};
&blsp_i2c6 {
- /* On Low speed expansion */
+ /* On Low speed expansion: LS-I2C1 */
status = "okay";
- label = "LS-I2C1";
};
&blsp_spi3 {
- /* On High speed expansion */
+ /* On High speed expansion: HS-SPI1 */
status = "okay";
- label = "HS-SPI1";
};
&blsp_spi5 {
- /* On Low speed expansion */
+ /* On Low speed expansion: LS-SPI0 */
status = "okay";
- label = "LS-SPI0";
};
&blsp_uart1 {
@@ -257,52 +231,12 @@
&camss {
status = "okay";
- ports {
- port@0 {
- reg = <0>;
- csiphy0_ep: endpoint {
- data-lanes = <0 2>;
- remote-endpoint = <&ov5640_ep>;
- status = "okay";
- };
- };
- };
};
-&cci {
+&gpu {
status = "okay";
};
-&cci_i2c0 {
- camera_rear@3b {
- compatible = "ovti,ov5640";
- reg = <0x3b>;
-
- enable-gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
- reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&camera_rear_default>;
-
- clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
- clock-names = "xclk";
- clock-frequency = <23880000>;
-
- vdddo-supply = <&camera_vdddo_1v8>;
- vdda-supply = <&camera_vdda_2v8>;
- vddd-supply = <&camera_vddd_1v5>;
-
- /* No camera mezzanine by default */
- status = "disabled";
-
- port {
- ov5640_ep: endpoint {
- data-lanes = <0 2>;
- remote-endpoint = <&csiphy0_ep>;
- };
- };
- };
-};
-
&lpass {
status = "okay";
};
@@ -311,6 +245,10 @@
status = "okay";
};
+&mba_mem {
+ status = "okay";
+};
+
&mdss {
status = "okay";
};
@@ -326,10 +264,13 @@
firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn";
};
+&mpss_mem {
+ status = "okay";
+ reg = <0x0 0x86800000 0x0 0x2b00000>;
+};
+
&pm8916_codec {
status = "okay";
- clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
- clock-names = "mclk";
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
};
@@ -437,6 +378,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
firmware-name = "qcom/apq8016/wcnss.mbn";
@@ -450,6 +399,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
/* Enable CoreSight */
&cti0 { status = "okay"; };
&cti1 { status = "okay"; };
diff --git a/sys/contrib/device-tree/src/arm64/qcom/apq8039-t2.dts b/sys/contrib/device-tree/src/arm64/qcom/apq8039-t2.dts
index 40644c242fb7..4f82bb668616 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/apq8039-t2.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/apq8039-t2.dts
@@ -131,6 +131,10 @@
status = "okay";
};
+&gpu {
+ status = "okay";
+};
+
&lpass {
status = "okay";
};
@@ -366,7 +370,6 @@
function = "gpio";
pins = "gpio107";
bias-pull-up;
- input-enable;
};
};
@@ -375,7 +378,6 @@
pinctrl-0 = <&pinctrl_otg_default>;
pinctrl-1 = <&pinctrl_otg_host>;
pinctrl-2 = <&pinctrl_otg_device>;
- pin-switch-delay-us = <100000>;
usb-role-switch;
status = "okay";
@@ -393,3 +395,7 @@
&wcnss_iris {
compatible = "qcom,wcn3680";
};
+
+&wcnss_mem {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/apq8096-db820c.dts b/sys/contrib/device-tree/src/arm64/qcom/apq8096-db820c.dts
index 537547b97459..e8148b3d6c50 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/apq8096-db820c.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/apq8096-db820c.dts
@@ -62,25 +62,23 @@
stdout-path = "serial0:115200n8";
};
- clocks {
- divclk4: divclk4 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <32768>;
- clock-output-names = "divclk4";
+ div1_mclk: divclk1 {
+ compatible = "gpio-gate-clock";
+ pinctrl-0 = <&audio_mclk>;
+ pinctrl-names = "default";
+ clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
+ #clock-cells = <0>;
+ enable-gpios = <&pm8994_gpios 15 0>;
+ };
- pinctrl-names = "default";
- pinctrl-0 = <&divclk4_pin_a>;
- };
+ divclk4: divclk4 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "divclk4";
- div1_mclk: divclk1 {
- compatible = "gpio-gate-clock";
- pinctrl-0 = <&audio_mclk>;
- pinctrl-names = "default";
- clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
- #clock-cells = <0>;
- enable-gpios = <&pm8994_gpios 15 0>;
- };
+ pinctrl-names = "default";
+ pinctrl-0 = <&divclk4_pin_a>;
};
gpio-keys {
@@ -99,14 +97,14 @@
usb2_id: usb2-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb2_vbus_det_gpio>;
};
usb3_id: usb3-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb3_vbus_det_gpio>;
};
@@ -138,8 +136,7 @@
};
&blsp1_i2c3 {
- /* On Low speed expansion */
- label = "LS-I2C0";
+ /* On Low speed expansion: LS-I2C0 */
status = "okay";
};
@@ -168,14 +165,12 @@
};
&blsp2_i2c1 {
- /* On High speed expansion */
- label = "HS-I2C2";
+ /* On High speed expansion: HS-I2C2 */
status = "okay";
};
&blsp2_i2c1 {
- /* On Low speed expansion */
- label = "LS-I2C1";
+ /* On Low speed expansion: LS-I2C1 */
status = "okay";
};
@@ -236,8 +231,8 @@
status = "okay";
pinctrl-names = "default", "sleep";
- pinctrl-0 = <&mdss_hdmi_hpd_active &mdss_hdmi_ddc_active>;
- pinctrl-1 = <&mdss_hdmi_hpd_suspend &mdss_hdmi_ddc_suspend>;
+ pinctrl-0 = <&hdmi_hpd_active &hdmi_ddc_active>;
+ pinctrl-1 = <&hdmi_hpd_suspend &hdmi_ddc_suspend>;
core-vdda-supply = <&vreg_l12a_1p8>;
core-vcc-supply = <&vreg_s4a_1p8>;
@@ -433,28 +428,28 @@
drive-strength = <2>;
};
- mdss_hdmi_hpd_active: mdss_hdmi-hpd-active-state {
+ hdmi_hpd_active: hdmi-hpd-active-state {
pins = "gpio34";
function = "hdmi_hot";
bias-pull-down;
drive-strength = <16>;
};
- mdss_hdmi_hpd_suspend: mdss_hdmi-hpd-suspend-state {
+ hdmi_hpd_suspend: hdmi-hpd-suspend-state {
pins = "gpio34";
function = "hdmi_hot";
bias-pull-down;
drive-strength = <2>;
};
- mdss_hdmi_ddc_active: mdss_hdmi-ddc-active-state {
+ hdmi_ddc_active: hdmi-ddc-active-state {
pins = "gpio32", "gpio33";
function = "hdmi_ddc";
drive-strength = <2>;
bias-pull-up;
};
- mdss_hdmi_ddc_suspend: mdss_hdmi-ddc-suspend-state {
+ hdmi_ddc_suspend: hdmi-ddc-suspend-state {
pins = "gpio32", "gpio33";
function = "hdmi_ddc";
drive-strength = <2>;
@@ -1043,7 +1038,7 @@
};
};
- mdss_hdmi-dai-link {
+ hdmi-dai-link {
link-name = "HDMI";
cpu {
sound-dai = <&q6afedai HDMI_RX>;
@@ -1094,7 +1089,6 @@
vdda-phy-supply = <&vreg_l28a_0p925>;
vdda-pll-supply = <&vreg_l12a_1p8>;
- vddp-ref-clk-supply = <&vreg_l25a_1p2>;
};
&ufshc {
@@ -1103,6 +1097,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l25a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l25a_1p2>;
vcc-max-microamp = <600000>;
vccq-max-microamp = <450000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5018-rdp432-c2.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq5018-rdp432-c2.dts
new file mode 100644
index 000000000000..8460b538eb6a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5018-rdp432-c2.dts
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+/*
+ * IPQ5018 MP03.1-C2 board device tree source
+ *
+ * Copyright (c) 2023 The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "ipq5018.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. IPQ5018/AP-RDP432.1-C2";
+ compatible = "qcom,ipq5018-rdp432-c2", "qcom,ipq5018";
+
+ aliases {
+ serial0 = &blsp1_uart1;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&blsp1_uart1 {
+ pinctrl-0 = <&uart1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&sdhc_1 {
+ pinctrl-0 = <&sdc_default_state>;
+ pinctrl-names = "default";
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ max-frequency = <192000000>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&sleep_clk {
+ clock-frequency = <32000>;
+};
+
+&tlmm {
+ sdc_default_state: sdc-default-state {
+ clk-pins {
+ pins = "gpio9";
+ function = "sdc1_clk";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ cmd-pins {
+ pins = "gpio8";
+ function = "sdc1_cmd";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ data-pins {
+ pins = "gpio4", "gpio5", "gpio6", "gpio7";
+ function = "sdc1_data";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
+};
+
+&usb {
+ status = "okay";
+};
+
+&usb_dwc {
+ dr_mode = "host";
+};
+
+&usbphy0 {
+ status = "okay";
+};
+
+&xo_board_clk {
+ clock-frequency = <24000000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5018.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq5018.dtsi
new file mode 100644
index 000000000000..32b178b639f0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5018.dtsi
@@ -0,0 +1,400 @@
+// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+/*
+ * IPQ5018 SoC device tree source
+ *
+ * Copyright (c) 2023 The Linux Foundation. All rights reserved.
+ */
+
+#include <dt-bindings/clock/qcom,apss-ipq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,gcc-ipq5018.h>
+#include <dt-bindings/reset/qcom,gcc-ipq5018.h>
+
+/ {
+ interrupt-parent = <&intc>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ clocks {
+ sleep_clk: sleep-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ xo_board_clk: xo-board-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ CPU0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ reg = <0x0>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
+ operating-points-v2 = <&cpu_opp_table>;
+ };
+
+ CPU1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a53";
+ reg = <0x1>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
+ operating-points-v2 = <&cpu_opp_table>;
+ };
+
+ L2_0: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-size = <0x80000>;
+ cache-unified;
+ };
+ };
+
+ cpu_opp_table: opp-table-cpu {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-800000000 {
+ opp-hz = /bits/ 64 <800000000>;
+ opp-microvolt = <1100000>;
+ clock-latency-ns = <200000>;
+ };
+
+ opp-1008000000 {
+ opp-hz = /bits/ 64 <1008000000>;
+ opp-microvolt = <1100000>;
+ clock-latency-ns = <200000>;
+ };
+ };
+
+ firmware {
+ scm {
+ compatible = "qcom,scm-ipq5018", "qcom,scm";
+ qcom,sdi-enabled;
+ };
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ /* We expect the bootloader to fill in the size */
+ reg = <0x0 0x40000000 0x0 0x0>;
+ };
+
+ pmu {
+ compatible = "arm,cortex-a53-pmu";
+ interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ bootloader@4a800000 {
+ reg = <0x0 0x4a800000 0x0 0x200000>;
+ no-map;
+ };
+
+ sbl@4aa00000 {
+ reg = <0x0 0x4aa00000 0x0 0x100000>;
+ no-map;
+ };
+
+ smem@4ab00000 {
+ compatible = "qcom,smem";
+ reg = <0x0 0x4ab00000 0x0 0x100000>;
+ no-map;
+
+ hwlocks = <&tcsr_mutex 3>;
+ };
+
+ tz_region: tz@4ac00000 {
+ reg = <0x0 0x4ac00000 0x0 0x200000>;
+ no-map;
+ };
+ };
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0 0 0xffffffff>;
+
+ usbphy0: phy@5b000 {
+ compatible = "qcom,ipq5018-usb-hsphy";
+ reg = <0x0005b000 0x120>;
+
+ clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>;
+
+ resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ tlmm: pinctrl@1000000 {
+ compatible = "qcom,ipq5018-tlmm";
+ reg = <0x01000000 0x300000>;
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&tlmm 0 0 47>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ uart1_pins: uart1-state {
+ pins = "gpio31", "gpio32", "gpio33", "gpio34";
+ function = "blsp1_uart1";
+ drive-strength = <8>;
+ bias-pull-down;
+ };
+ };
+
+ gcc: clock-controller@1800000 {
+ compatible = "qcom,gcc-ipq5018";
+ reg = <0x01800000 0x80000>;
+ clocks = <&xo_board_clk>,
+ <&sleep_clk>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+ tcsr_mutex: hwlock@1905000 {
+ compatible = "qcom,tcsr-mutex";
+ reg = <0x01905000 0x20000>;
+ #hwlock-cells = <1>;
+ };
+
+ sdhc_1: mmc@7804000 {
+ compatible = "qcom,ipq5018-sdhci", "qcom,sdhci-msm-v5";
+ reg = <0x7804000 0x1000>;
+ reg-names = "hc";
+
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hc_irq", "pwr_irq";
+
+ clocks = <&gcc GCC_SDCC1_AHB_CLK>,
+ <&gcc GCC_SDCC1_APPS_CLK>,
+ <&xo_board_clk>;
+ clock-names = "iface", "core", "xo";
+ non-removable;
+ status = "disabled";
+ };
+
+ blsp_dma: dma-controller@7884000 {
+ compatible = "qcom,bam-v1.7.0";
+ reg = <0x07884000 0x1d000>;
+ interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "bam_clk";
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ };
+
+ blsp1_uart1: serial@78af000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x078af000 0x200>;
+ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART1_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
+ blsp1_spi1: spi@78b5000 {
+ compatible = "qcom,spi-qup-v2.2.1";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x078b5000 0x600>;
+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_QUP1_SPI_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ dmas = <&blsp_dma 4>, <&blsp_dma 5>;
+ dma-names = "tx", "rx";
+ status = "disabled";
+ };
+
+ usb: usb@8af8800 {
+ compatible = "qcom,ipq5018-dwc3", "qcom,dwc3";
+ reg = <0x08af8800 0x400>;
+
+ interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hs_phy_irq";
+
+ clocks = <&gcc GCC_USB0_MASTER_CLK>,
+ <&gcc GCC_SYS_NOC_USB0_AXI_CLK>,
+ <&gcc GCC_USB0_SLEEP_CLK>,
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ clock-names = "core",
+ "iface",
+ "sleep",
+ "mock_utmi";
+
+ resets = <&gcc GCC_USB0_BCR>;
+
+ qcom,select-utmi-as-pipe-clk;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ status = "disabled";
+
+ usb_dwc: usb@8a00000 {
+ compatible = "snps,dwc3";
+ reg = <0x08a00000 0xe000>;
+ clocks = <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ clock-names = "ref";
+ interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
+ phy-names = "usb2-phy";
+ phys = <&usbphy0>;
+ tx-fifo-resize;
+ snps,is-utmi-l1-suspend;
+ snps,hird-threshold = /bits/ 8 <0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_u3_susphy_quirk;
+ };
+ };
+
+ intc: interrupt-controller@b000000 {
+ compatible = "qcom,msm-qgic2";
+ reg = <0x0b000000 0x1000>, /* GICD */
+ <0x0b002000 0x2000>, /* GICC */
+ <0x0b001000 0x1000>, /* GICH */
+ <0x0b004000 0x2000>; /* GICV */
+ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+ interrupt-controller;
+ #interrupt-cells = <3>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x0b00a000 0x1ffa>;
+
+ v2m0: v2m@0 {
+ compatible = "arm,gic-v2m-frame";
+ reg = <0x00000000 0xff8>;
+ msi-controller;
+ };
+
+ v2m1: v2m@1000 {
+ compatible = "arm,gic-v2m-frame";
+ reg = <0x00001000 0xff8>;
+ msi-controller;
+ };
+ };
+
+ watchdog: watchdog@b017000 {
+ compatible = "qcom,apss-wdt-ipq5018", "qcom,kpss-wdt";
+ reg = <0x0b017000 0x40>;
+ interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&sleep_clk>;
+ };
+
+ apcs_glb: mailbox@b111000 {
+ compatible = "qcom,ipq5018-apcs-apps-global",
+ "qcom,ipq6018-apcs-apps-global";
+ reg = <0x0b111000 0x1000>;
+ #clock-cells = <1>;
+ clocks = <&a53pll>, <&xo_board_clk>, <&gcc GPLL0>;
+ clock-names = "pll", "xo", "gpll0";
+ #mbox-cells = <1>;
+ };
+
+ a53pll: clock@b116000 {
+ compatible = "qcom,ipq5018-a53pll";
+ reg = <0x0b116000 0x40>;
+ #clock-cells = <0>;
+ clocks = <&xo_board_clk>;
+ clock-names = "xo";
+ };
+
+ timer@b120000 {
+ compatible = "arm,armv7-timer-mem";
+ reg = <0x0b120000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ frame@b120000 {
+ reg = <0x0b121000 0x1000>,
+ <0x0b122000 0x1000>;
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+ frame-number = <0>;
+ };
+
+ frame@b123000 {
+ reg = <0xb123000 0x1000>;
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ frame-number = <1>;
+ status = "disabled";
+ };
+
+ frame@b124000 {
+ frame-number = <2>;
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+ reg = <0x0b124000 0x1000>;
+ status = "disabled";
+ };
+
+ frame@b125000 {
+ reg = <0x0b125000 0x1000>;
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+ frame-number = <3>;
+ status = "disabled";
+ };
+
+ frame@b126000 {
+ reg = <0x0b126000 0x1000>;
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+ frame-number = <4>;
+ status = "disabled";
+ };
+
+ frame@b127000 {
+ reg = <0x0b127000 0x1000>;
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+ frame-number = <5>;
+ status = "disabled";
+ };
+
+ frame@b128000 {
+ reg = <0x0b128000 0x1000>;
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+ frame-number = <6>;
+ status = "disabled";
+ };
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp-common.dtsi
new file mode 100644
index 000000000000..b37ae7749083
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp-common.dtsi
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * IPQ5332 RDP board common device tree source
+ *
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include "ipq5332.dtsi"
+
+/ {
+ aliases {
+ serial0 = &blsp1_uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ button-wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&gpio_leds_default>;
+ pinctrl-names = "default";
+
+ led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tx";
+ default-state = "off";
+ };
+ };
+};
+
+&blsp1_uart0 {
+ pinctrl-0 = <&serial_0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&sleep_clk {
+ clock-frequency = <32000>;
+};
+
+&xo_board {
+ clock-frequency = <24000000>;
+};
+
+/* PINCTRL */
+&tlmm {
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio35";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ gpio_leds_default: gpio-leds-default-state {
+ pins = "gpio36";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-down;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp441.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp441.dts
index 3af1d5556950..846413817e9a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp441.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp441.dts
@@ -7,29 +7,15 @@
/dts-v1/;
-#include "ipq5332.dtsi"
+#include "ipq5332-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ5332 MI01.2";
compatible = "qcom,ipq5332-ap-mi01.2", "qcom,ipq5332";
-
- aliases {
- serial0 = &blsp1_uart0;
- };
-
- chosen {
- stdout-path = "serial0";
- };
-};
-
-&blsp1_uart0 {
- pinctrl-0 = <&serial_0_pins>;
- pinctrl-names = "default";
- status = "okay";
};
&blsp1_i2c1 {
- clock-frequency = <400000>;
+ clock-frequency = <400000>;
pinctrl-0 = <&i2c_1_pins>;
pinctrl-names = "default";
status = "okay";
@@ -46,16 +32,6 @@
status = "okay";
};
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&xo_board {
- clock-frequency = <24000000>;
-};
-
-/* PINCTRL */
-
&tlmm {
i2c_1_pins: i2c-1-state {
pins = "gpio29", "gpio30";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp442.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp442.dts
index bcf3b31c20e3..ed8a54eb95c0 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp442.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp442.dts
@@ -7,29 +7,15 @@
/dts-v1/;
-#include "ipq5332.dtsi"
+#include "ipq5332-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ5332 MI01.3";
compatible = "qcom,ipq5332-ap-mi01.3", "qcom,ipq5332";
-
- aliases {
- serial0 = &blsp1_uart0;
- };
-
- chosen {
- stdout-path = "serial0";
- };
-};
-
-&blsp1_uart0 {
- pinctrl-0 = <&serial_0_pins>;
- pinctrl-names = "default";
- status = "okay";
};
&blsp1_i2c1 {
- clock-frequency = <400000>;
+ clock-frequency = <400000>;
pinctrl-0 = <&i2c_1_pins>;
pinctrl-names = "default";
status = "okay";
@@ -60,16 +46,6 @@
status = "okay";
};
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&xo_board {
- clock-frequency = <24000000>;
-};
-
-/* PINCTRL */
-
&tlmm {
i2c_1_pins: i2c-1-state {
pins = "gpio29", "gpio30";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp468.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp468.dts
index 3b6a5cb8bf07..c224ffc65b08 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp468.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp468.dts
@@ -7,25 +7,20 @@
/dts-v1/;
-#include "ipq5332.dtsi"
+#include "ipq5332-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ5332 MI01.6";
compatible = "qcom,ipq5332-ap-mi01.6", "qcom,ipq5332";
- aliases {
- serial0 = &blsp1_uart0;
+ regulator_fixed_5p0: regulator-s0500 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <500000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-name = "fixed_5p0";
};
-
- chosen {
- stdout-path = "serial0";
- };
-};
-
-&blsp1_uart0 {
- pinctrl-0 = <&serial_0_pins>;
- pinctrl-names = "default";
- status = "okay";
};
&blsp1_spi0 {
@@ -53,14 +48,6 @@
status = "okay";
};
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&xo_board {
- clock-frequency = <24000000>;
-};
-
/* PINCTRL */
&tlmm {
@@ -101,3 +88,17 @@
bias-pull-up;
};
};
+
+&usb {
+ status = "okay";
+};
+
+&usb_dwc {
+ dr_mode = "host";
+};
+
+&usbphy0 {
+ vdd-supply = <&regulator_fixed_5p0>;
+
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp474.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp474.dts
index 53c68d8c5e5d..d5f99e741ae5 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp474.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5332-rdp474.dts
@@ -7,45 +7,15 @@
/dts-v1/;
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include "ipq5332.dtsi"
+#include "ipq5332-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ5332 MI01.9";
compatible = "qcom,ipq5332-ap-mi01.9", "qcom,ipq5332";
-
- aliases {
- serial0 = &blsp1_uart0;
- };
-
- chosen {
- stdout-path = "serial0";
- };
-
- gpio-keys {
- compatible = "gpio-keys";
- pinctrl-0 = <&gpio_keys_default_state>;
- pinctrl-names = "default";
-
- button-wps {
- label = "wps";
- linux,code = <KEY_WPS_BUTTON>;
- gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
- linux,input-type = <1>;
- debounce-interval = <60>;
- };
- };
-};
-
-&blsp1_uart0 {
- pinctrl-0 = <&serial_0_pins>;
- pinctrl-names = "default";
- status = "okay";
};
&blsp1_i2c1 {
- clock-frequency = <400000>;
+ clock-frequency = <400000>;
pinctrl-0 = <&i2c_1_pins>;
pinctrl-names = "default";
status = "okay";
@@ -62,24 +32,9 @@
status = "okay";
};
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&xo_board {
- clock-frequency = <24000000>;
-};
-
/* PINCTRL */
&tlmm {
- gpio_keys_default_state: gpio-keys-default-state {
- pins = "gpio35";
- function = "gpio";
- drive-strength = <8>;
- bias-pull-up;
- };
-
i2c_1_pins: i2c-1-state {
pins = "gpio29", "gpio30";
function = "blsp1_i2c0";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq5332.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq5332.dtsi
index 8bfc2db44624..42e2e48b2bc3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq5332.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq5332.dtsi
@@ -91,11 +91,19 @@
};
cpu_opp_table: opp-table-cpu {
- compatible = "operating-points-v2";
+ compatible = "operating-points-v2-kryo-cpu";
opp-shared;
+ nvmem-cells = <&cpu_speed_bin>;
- opp-1488000000 {
- opp-hz = /bits/ 64 <1488000000>;
+ opp-1100000000 {
+ opp-hz = /bits/ 64 <1100000000>;
+ opp-supported-hw = <0x7>;
+ clock-latency-ns = <200000>;
+ };
+
+ opp-1500000000 {
+ opp-hz = /bits/ 64 <1500000000>;
+ opp-supported-hw = <0x3>;
clock-latency-ns = <200000>;
};
};
@@ -135,7 +143,7 @@
reg = <0x0 0x4a800000 0x0 0x100000>;
no-map;
- hwlocks = <&tcsr_mutex 0>;
+ hwlocks = <&tcsr_mutex 3>;
};
};
@@ -145,11 +153,29 @@
#size-cells = <1>;
ranges = <0 0 0 0xffffffff>;
+ usbphy0: phy@7b000 {
+ compatible = "qcom,ipq5332-usb-hsphy";
+ reg = <0x0007b000 0x12c>;
+
+ clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>;
+
+ resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
qfprom: efuse@a4000 {
compatible = "qcom,ipq5332-qfprom", "qcom,qfprom";
reg = <0x000a4000 0x721>;
#address-cells = <1>;
#size-cells = <1>;
+
+ cpu_speed_bin: cpu-speed-bin@1d {
+ reg = <0x1d 0x2>;
+ bits = <7 2>;
+ };
};
rng: rng@e3000 {
@@ -290,6 +316,48 @@
status = "disabled";
};
+ usb: usb@8af8800 {
+ compatible = "qcom,ipq5332-dwc3", "qcom,dwc3";
+ reg = <0x08af8800 0x400>;
+
+ interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hs_phy_irq";
+
+ clocks = <&gcc GCC_USB0_MASTER_CLK>,
+ <&gcc GCC_SNOC_USB_CLK>,
+ <&gcc GCC_USB0_SLEEP_CLK>,
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ clock-names = "core",
+ "iface",
+ "sleep",
+ "mock_utmi";
+
+ resets = <&gcc GCC_USB_BCR>;
+
+ qcom,select-utmi-as-pipe-clk;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ status = "disabled";
+
+ usb_dwc: usb@8a00000 {
+ compatible = "snps,dwc3";
+ reg = <0x08a00000 0xe000>;
+ clocks = <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ clock-names = "ref";
+ interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
+ phy-names = "usb2-phy";
+ phys = <&usbphy0>;
+ tx-fifo-resize;
+ snps,is-utmi-l1-suspend;
+ snps,hird-threshold = /bits/ 8 <0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_u3_susphy_quirk;
+ };
+ };
+
intc: interrupt-controller@b000000 {
compatible = "qcom,msm-qgic2";
reg = <0x0b000000 0x1000>, /* GICD */
@@ -335,8 +403,8 @@
"qcom,ipq6018-apcs-apps-global";
reg = <0x0b111000 0x1000>;
#clock-cells = <1>;
- clocks = <&a53pll>, <&xo_board>;
- clock-names = "pll", "xo";
+ clocks = <&a53pll>, <&xo_board>, <&gcc GPLL0>;
+ clock-names = "pll", "xo", "gpll0";
#mbox-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq6018.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq6018.dtsi
index 7355f266742a..61c8fd49c966 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq6018.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq6018.dtsi
@@ -96,42 +96,49 @@
};
cpu_opp_table: opp-table-cpu {
- compatible = "operating-points-v2";
+ compatible = "operating-points-v2-kryo-cpu";
+ nvmem-cells = <&cpu_speed_bin>;
opp-shared;
opp-864000000 {
opp-hz = /bits/ 64 <864000000>;
opp-microvolt = <725000>;
+ opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
};
opp-1056000000 {
opp-hz = /bits/ 64 <1056000000>;
opp-microvolt = <787500>;
+ opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
};
opp-1320000000 {
opp-hz = /bits/ 64 <1320000000>;
opp-microvolt = <862500>;
+ opp-supported-hw = <0x3>;
clock-latency-ns = <200000>;
};
opp-1440000000 {
opp-hz = /bits/ 64 <1440000000>;
opp-microvolt = <925000>;
+ opp-supported-hw = <0x3>;
clock-latency-ns = <200000>;
};
opp-1608000000 {
opp-hz = /bits/ 64 <1608000000>;
opp-microvolt = <987500>;
+ opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
};
opp-1800000000 {
opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <1062500>;
+ opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
};
};
@@ -146,6 +153,32 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,ipq6018-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-ipq6018";
+ qcom,glink-channels = "rpm_requests";
+
+ regulators {
+ compatible = "qcom,rpm-mp5496-regulators";
+
+ ipq6018_s2: s2 {
+ regulator-min-microvolt = <725000>;
+ regulator-max-microvolt = <1062500>;
+ regulator-always-on;
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -182,32 +215,10 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-ipq6018";
- qcom,glink-channels = "rpm_requests";
-
- regulators {
- compatible = "qcom,rpm-mp5496-regulators";
-
- ipq6018_s2: s2 {
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1062500>;
- regulator-always-on;
- };
- };
- };
- };
-
smem {
compatible = "qcom,smem";
memory-region = <&smem_region>;
- hwlocks = <&tcsr_mutex 0>;
+ hwlocks = <&tcsr_mutex 3>;
};
soc: soc@0 {
@@ -232,31 +243,26 @@
ssphy_0: ssphy@78000 {
compatible = "qcom,ipq6018-qmp-usb3-phy";
- reg = <0x0 0x00078000 0x0 0x1c4>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0x0 0x00078000 0x0 0x1000>;
clocks = <&gcc GCC_USB0_AUX_CLK>,
- <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, <&xo>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&xo>,
+ <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_USB0_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "gcc_usb0_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
resets = <&gcc GCC_USB0_PHY_BCR>,
<&gcc GCC_USB3PHY_0_PHY_BCR>;
- reset-names = "phy","common";
- status = "disabled";
+ reset-names = "phy",
+ "phy_phy";
- usb0_ssphy: phy@78200 {
- reg = <0x0 0x00078200 0x0 0x130>, /* Tx */
- <0x0 0x00078400 0x0 0x200>, /* Rx */
- <0x0 0x00078800 0x0 0x1f8>, /* PCS */
- <0x0 0x00078600 0x0 0x044>; /* PCS misc */
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB0_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "gcc_usb0_pipe_clk_src";
- };
+ status = "disabled";
};
qusb_phy_0: qusb@79000 {
@@ -274,33 +280,25 @@
pcie_phy: phy@84000 {
compatible = "qcom,ipq6018-qmp-pcie-phy";
- reg = <0x0 0x00084000 0x0 0x1bc>; /* Serdes PLL */
+ reg = <0x0 0x00084000 0x0 0x1000>;
status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
clocks = <&gcc GCC_PCIE0_AUX_CLK>,
- <&gcc GCC_PCIE0_AHB_CLK>;
- clock-names = "aux", "cfg_ahb";
+ <&gcc GCC_PCIE0_AHB_CLK>,
+ <&gcc GCC_PCIE0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "pipe";
+
+ clock-output-names = "gcc_pcie0_pipe_clk_src";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE0_PHY_BCR>,
<&gcc GCC_PCIE0PHY_PHY_BCR>;
reset-names = "phy",
"common";
-
- pcie_phy0: phy@84200 {
- reg = <0x0 0x00084200 0x0 0x16c>, /* Serdes Tx */
- <0x0 0x00084400 0x0 0x200>, /* Serdes Rx */
- <0x0 0x00084800 0x0 0x1f0>, /* PCS: Lane0, COM, PCIE */
- <0x0 0x00084c00 0x0 0xf4>; /* pcs_misc */
- #phy-cells = <0>;
-
- clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "gcc_pcie0_pipe_clk_src";
- #clock-cells = <0>;
- };
};
mdio: mdio@90000 {
@@ -318,6 +316,11 @@
reg = <0x0 0x000a4000 0x0 0x2000>;
#address-cells = <1>;
#size-cells = <1>;
+
+ cpu_speed_bin: cpu-speed-bin@135 {
+ reg = <0x135 0x1>;
+ bits = <7 1>;
+ };
};
prng: qrng@e3000 {
@@ -389,7 +392,7 @@
tcsr_mutex: hwlock@1905000 {
compatible = "qcom,ipq6018-tcsr-mutex", "qcom,tcsr-mutex";
- reg = <0x0 0x01905000 0x0 0x1000>;
+ reg = <0x0 0x01905000 0x0 0x20000>;
#hwlock-cells = <1>;
};
@@ -443,6 +446,26 @@
qcom,ee = <0>;
};
+ blsp1_uart1: serial@78af000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x0 0x78af000 0x0 0x200>;
+ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART1_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
+ blsp1_uart2: serial@78b0000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x0 0x78b0000 0x0 0x200>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
blsp1_uart3: serial@78b1000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0x0 0x078b1000 0x0 0x200>;
@@ -453,6 +476,36 @@
status = "disabled";
};
+ blsp1_uart4: serial@78b2000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x0 0x078b2000 0x0 0x200>;
+ interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART4_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
+ blsp1_uart5: serial@78b3000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x0 0x78b3000 0x0 0x200>;
+ interrupts = <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART5_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
+ blsp1_uart6: serial@78b4000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x0 0x078b4000 0x0 0x200>;
+ interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_UART6_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
blsp1_spi1: spi@78b5000 {
compatible = "qcom,spi-qup-v2.2.1";
#address-cells = <1>;
@@ -481,6 +534,20 @@
status = "disabled";
};
+ blsp1_spi5: spi@78b9000 {
+ compatible = "qcom,spi-qup-v2.2.1";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0x078b9000 0x0 0x600>;
+ interrupts = <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_QUP5_SPI_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ dmas = <&blsp_dma 20>, <&blsp_dma 21>;
+ dma-names = "tx", "rx";
+ status = "disabled";
+ };
+
blsp1_i2c2: i2c@78b6000 {
compatible = "qcom,i2c-qup-v2.2.1";
#address-cells = <1>;
@@ -561,7 +628,7 @@
<&gcc GCC_USB0_MOCK_UTMI_CLK>;
assigned-clock-rates = <133330000>,
<133330000>,
- <20000000>;
+ <24000000>;
resets = <&gcc GCC_USB0_BCR>;
status = "disabled";
@@ -570,7 +637,7 @@
compatible = "snps,dwc3";
reg = <0x0 0x08a00000 0x0 0xcd00>;
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&qusb_phy_0>, <&usb0_ssphy>;
+ phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
clocks = <&xo>;
clock-names = "ref";
@@ -615,8 +682,8 @@
compatible = "qcom,ipq6018-apcs-apps-global";
reg = <0x0 0x0b111000 0x0 0x1000>;
#clock-cells = <1>;
- clocks = <&a53pll>, <&xo>;
- clock-names = "pll", "xo";
+ clocks = <&a53pll>, <&xo>, <&gcc GPLL0>;
+ clock-names = "pll", "xo", "gpll0";
#mbox-cells = <1>;
};
@@ -735,7 +802,7 @@
};
};
- pcie0: pci@20000000 {
+ pcie0: pcie@20000000 {
compatible = "qcom,pcie-ipq6018";
reg = <0x0 0x20000000 0x0 0xf1d>,
<0x0 0x20000f20 0x0 0xa8>,
@@ -752,7 +819,7 @@
#address-cells = <3>;
#size-cells = <2>;
- phys = <&pcie_phy0>;
+ phys = <&pcie_phy>;
phy-names = "pciephy";
ranges = <0x81000000 0x0 0x00000000 0x0 0x20200000 0x0 0x10000>,
@@ -763,10 +830,10 @@
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
- interrupt-map = <0 0 0 1 &intc 0 75 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
- <0 0 0 2 &intc 0 78 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
- <0 0 0 3 &intc 0 79 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
- <0 0 0 4 &intc 0 83 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
+ interrupt-map = <0 0 0 1 &intc 0 0 0 75 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
+ <0 0 0 2 &intc 0 0 0 78 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
+ <0 0 0 3 &intc 0 0 0 79 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
+ <0 0 0 4 &intc 0 0 0 83 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
clocks = <&gcc GCC_SYS_NOC_PCIE0_AXI_CLK>,
<&gcc GCC_PCIE0_AXI_M_CLK>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq8074.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq8074.dtsi
index 68839acbd613..26441447c866 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq8074.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq8074.dtsi
@@ -101,7 +101,7 @@
reg = <0x0 0x4ab00000 0x0 0x100000>;
no-map;
- hwlocks = <&tcsr_mutex 0>;
+ hwlocks = <&tcsr_mutex 3>;
};
memory@4ac00000 {
@@ -125,32 +125,26 @@
ssphy_1: phy@58000 {
compatible = "qcom,ipq8074-qmp-usb3-phy";
- reg = <0x00058000 0x1c4>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x00058000 0x1000>;
clocks = <&gcc GCC_USB1_AUX_CLK>,
- <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
- <&xo>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&xo>,
+ <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_USB1_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "usb3phy_1_cc_pipe_clk";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
resets = <&gcc GCC_USB1_PHY_BCR>,
- <&gcc GCC_USB3PHY_1_PHY_BCR>;
- reset-names = "phy","common";
- status = "disabled";
+ <&gcc GCC_USB3PHY_1_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
- usb1_ssphy: phy@58200 {
- reg = <0x00058200 0x130>, /* Tx */
- <0x00058400 0x200>, /* Rx */
- <0x00058800 0x1f8>, /* PCS */
- <0x00058600 0x044>; /* PCS misc */
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB1_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3phy_1_cc_pipe_clk";
- };
+ status = "disabled";
};
qusb_phy_1: phy@59000 {
@@ -168,32 +162,26 @@
ssphy_0: phy@78000 {
compatible = "qcom,ipq8074-qmp-usb3-phy";
- reg = <0x00078000 0x1c4>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x00078000 0x1000>;
clocks = <&gcc GCC_USB0_AUX_CLK>,
- <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
- <&xo>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&xo>,
+ <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_USB0_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "usb3phy_0_cc_pipe_clk";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
resets = <&gcc GCC_USB0_PHY_BCR>,
- <&gcc GCC_USB3PHY_0_PHY_BCR>;
- reset-names = "phy","common";
- status = "disabled";
+ <&gcc GCC_USB3PHY_0_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
- usb0_ssphy: phy@78200 {
- reg = <0x00078200 0x130>, /* Tx */
- <0x00078400 0x200>, /* Rx */
- <0x00078800 0x1f8>, /* PCS */
- <0x00078600 0x044>; /* PCS misc */
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB0_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3phy_0_cc_pipe_clk";
- };
+ status = "disabled";
};
qusb_phy_0: phy@79000 {
@@ -211,59 +199,48 @@
pcie_qmp0: phy@84000 {
compatible = "qcom,ipq8074-qmp-gen3-pcie-phy";
- reg = <0x00084000 0x1bc>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x00084000 0x1000>;
clocks = <&gcc GCC_PCIE0_AUX_CLK>,
- <&gcc GCC_PCIE0_AHB_CLK>;
- clock-names = "aux", "cfg_ahb";
+ <&gcc GCC_PCIE0_AHB_CLK>,
+ <&gcc GCC_PCIE0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "pipe";
+
+ clock-output-names = "pcie20_phy0_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
+
resets = <&gcc GCC_PCIE0_PHY_BCR>,
- <&gcc GCC_PCIE0PHY_PHY_BCR>;
+ <&gcc GCC_PCIE0PHY_PHY_BCR>;
reset-names = "phy",
"common";
status = "disabled";
-
- pcie_phy0: phy@84200 {
- reg = <0x84200 0x16c>,
- <0x84400 0x200>,
- <0x84800 0x1f0>,
- <0x84c00 0xf4>;
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "pcie20_phy0_pipe_clk";
- };
};
pcie_qmp1: phy@8e000 {
compatible = "qcom,ipq8074-qmp-pcie-phy";
- reg = <0x0008e000 0x1c4>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x0008e000 0x1000>;
clocks = <&gcc GCC_PCIE1_AUX_CLK>,
- <&gcc GCC_PCIE1_AHB_CLK>;
- clock-names = "aux", "cfg_ahb";
+ <&gcc GCC_PCIE1_AHB_CLK>,
+ <&gcc GCC_PCIE1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "pipe";
+
+ clock-output-names = "pcie20_phy1_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
+
resets = <&gcc GCC_PCIE1_PHY_BCR>,
- <&gcc GCC_PCIE1PHY_PHY_BCR>;
+ <&gcc GCC_PCIE1PHY_PHY_BCR>;
reset-names = "phy",
"common";
status = "disabled";
-
- pcie_phy1: phy@8e200 {
- reg = <0x8e200 0x130>,
- <0x8e400 0x200>,
- <0x8e800 0x1f8>;
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "pcie20_phy1_pipe_clk";
- };
};
mdio: mdio@90000 {
@@ -380,8 +357,14 @@
gcc: gcc@1800000 {
compatible = "qcom,gcc-ipq8074";
reg = <0x01800000 0x80000>;
- clocks = <&xo>, <&sleep_clk>;
- clock-names = "xo", "sleep_clk";
+ clocks = <&xo>,
+ <&sleep_clk>,
+ <&pcie_qmp0>,
+ <&pcie_qmp1>;
+ clock-names = "xo",
+ "sleep_clk",
+ "pcie0_pipe",
+ "pcie1_pipe";
#clock-cells = <1>;
#power-domain-cells = <1>;
#reset-cells = <1>;
@@ -417,7 +400,7 @@
};
sdhc_1: mmc@7824900 {
- compatible = "qcom,sdhci-msm-v4";
+ compatible = "qcom,ipq8074-sdhci", "qcom,sdhci-msm-v4";
reg = <0x7824900 0x500>, <0x7824000 0x800>;
reg-names = "hc", "core";
@@ -534,6 +517,20 @@
status = "disabled";
};
+ blsp1_spi4: spi@78b8000 {
+ compatible = "qcom,spi-qup-v2.2.1";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x78b8000 0x600>;
+ interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_BLSP1_QUP4_SPI_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ dmas = <&blsp_dma 18>, <&blsp_dma 19>;
+ dma-names = "tx", "rx";
+ status = "disabled";
+ };
+
blsp1_i2c5: i2c@78b9000 {
compatible = "qcom,i2c-qup-v2.2.1";
#address-cells = <1>;
@@ -639,7 +636,7 @@
compatible = "snps,dwc3";
reg = <0x8a00000 0xcd00>;
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&qusb_phy_0>, <&usb0_ssphy>;
+ phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
@@ -681,7 +678,7 @@
compatible = "snps,dwc3";
reg = <0x8c00000 0xcd00>;
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&qusb_phy_1>, <&usb1_ssphy>;
+ phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
@@ -719,8 +716,8 @@
compatible = "qcom,ipq8074-apcs-apps-global",
"qcom,ipq6018-apcs-apps-global";
reg = <0x0b111000 0x1000>;
- clocks = <&a53pll>, <&xo>;
- clock-names = "pll", "xo";
+ clocks = <&a53pll>, <&xo>, <&gcc GPLL0>;
+ clock-names = "pll", "xo", "gpll0";
#clock-cells = <1>;
#mbox-cells = <1>;
@@ -792,12 +789,12 @@
};
};
- pcie1: pci@10000000 {
+ pcie1: pcie@10000000 {
compatible = "qcom,pcie-ipq8074";
- reg = <0x10000000 0xf1d>,
- <0x10000f20 0xa8>,
- <0x00088000 0x2000>,
- <0x10100000 0x1000>;
+ reg = <0x10000000 0xf1d>,
+ <0x10000f20 0xa8>,
+ <0x00088000 0x2000>,
+ <0x10100000 0x1000>;
reg-names = "dbi", "elbi", "parf", "config";
device_type = "pci";
linux,pci-domain = <1>;
@@ -807,7 +804,7 @@
#address-cells = <3>;
#size-cells = <2>;
- phys = <&pcie_phy1>;
+ phys = <&pcie_qmp1>;
phy-names = "pciephy";
ranges = <0x81000000 0x0 0x00000000 0x10200000 0x0 0x10000>, /* I/O */
@@ -817,13 +814,13 @@
interrupt-names = "msi";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
- interrupt-map = <0 0 0 1 &intc 0 142
+ interrupt-map = <0 0 0 1 &intc 0 0 142
IRQ_TYPE_LEVEL_HIGH>, /* int_a */
- <0 0 0 2 &intc 0 143
+ <0 0 0 2 &intc 0 0 143
IRQ_TYPE_LEVEL_HIGH>, /* int_b */
- <0 0 0 3 &intc 0 144
+ <0 0 0 3 &intc 0 0 144
IRQ_TYPE_LEVEL_HIGH>, /* int_c */
- <0 0 0 4 &intc 0 145
+ <0 0 0 4 &intc 0 0 145
IRQ_TYPE_LEVEL_HIGH>; /* int_d */
clocks = <&gcc GCC_SYS_NOC_PCIE1_AXI_CLK>,
@@ -853,7 +850,7 @@
status = "disabled";
};
- pcie0: pci@20000000 {
+ pcie0: pcie@20000000 {
compatible = "qcom,pcie-ipq8074-gen3";
reg = <0x20000000 0xf1d>,
<0x20000f20 0xa8>,
@@ -869,7 +866,7 @@
#address-cells = <3>;
#size-cells = <2>;
- phys = <&pcie_phy0>;
+ phys = <&pcie_qmp0>;
phy-names = "pciephy";
ranges = <0x81000000 0x0 0x00000000 0x20200000 0x0 0x10000>, /* I/O */
@@ -879,13 +876,13 @@
interrupt-names = "msi";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
- interrupt-map = <0 0 0 1 &intc 0 75
+ interrupt-map = <0 0 0 1 &intc 0 0 75
IRQ_TYPE_LEVEL_HIGH>, /* int_a */
- <0 0 0 2 &intc 0 78
+ <0 0 0 2 &intc 0 0 78
IRQ_TYPE_LEVEL_HIGH>, /* int_b */
- <0 0 0 3 &intc 0 79
+ <0 0 0 3 &intc 0 0 79
IRQ_TYPE_LEVEL_HIGH>, /* int_c */
- <0 0 0 4 &intc 0 83
+ <0 0 0 4 &intc 0 0 83
IRQ_TYPE_LEVEL_HIGH>; /* int_d */
clocks = <&gcc GCC_SYS_NOC_PCIE0_AXI_CLK>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp-common.dtsi
new file mode 100644
index 000000000000..91e104b0f865
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp-common.dtsi
@@ -0,0 +1,169 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * IPQ9574 RDP board common device tree source
+ *
+ * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include "ipq9574.dtsi"
+
+/ {
+ aliases {
+ serial0 = &blsp1_uart2;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ regulator_fixed_3p3: s3300 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-name = "fixed_3p3";
+ };
+
+ regulator_fixed_0p925: s0925 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <925000>;
+ regulator-max-microvolt = <925000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-name = "fixed_0p925";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ button-wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&gpio_leds_default>;
+ pinctrl-names = "default";
+
+ led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tx";
+ default-state = "off";
+ };
+ };
+};
+
+&blsp1_spi0 {
+ pinctrl-0 = <&spi_0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ flash@0 {
+ compatible = "micron,n25q128a11", "jedec,spi-nor";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <50000000>;
+ };
+};
+
+&blsp1_uart2 {
+ pinctrl-0 = <&uart2_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-mp5496-regulators";
+
+ ipq9574_s1: s1 {
+ /*
+ * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
+ * During regulator registration, kernel not knowing the initial voltage,
+ * considers it as zero and brings up the regulators with minimum supported voltage.
+ * Update the regulator-min-microvolt with SVS voltage of 725mV so that
+ * the regulators are brought up with 725mV which is sufficient for all the
+ * corner parts to operate at 800MHz
+ */
+ regulator-min-microvolt = <725000>;
+ regulator-max-microvolt = <1075000>;
+ };
+
+ mp5496_l2: l2 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+};
+
+&sleep_clk {
+ clock-frequency = <32000>;
+};
+
+&tlmm {
+ spi_0_pins: spi-0-state {
+ pins = "gpio11", "gpio12", "gpio13", "gpio14";
+ function = "blsp0_spi";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio37";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ gpio_leds_default: gpio-leds-default-state {
+ pins = "gpio64";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+};
+
+&usb_0_dwc3 {
+ dr_mode = "host";
+};
+
+&usb_0_qmpphy {
+ vdda-pll-supply = <&mp5496_l2>;
+ vdda-phy-supply = <&regulator_fixed_0p925>;
+
+ status = "okay";
+};
+
+&usb_0_qusbphy {
+ vdd-supply = <&regulator_fixed_0p925>;
+ vdda-pll-supply = <&mp5496_l2>;
+ vdda-phy-dpdm-supply = <&regulator_fixed_3p3>;
+
+ status = "okay";
+};
+
+&usb3 {
+ status = "okay";
+};
+
+&xo_board_clk {
+ clock-frequency = <24000000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp418.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp418.dts
index 2b093e02637b..f4f9199d4ab1 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp418.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp418.dts
@@ -8,58 +8,12 @@
/dts-v1/;
-#include "ipq9574.dtsi"
+#include "ipq9574-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C2";
compatible = "qcom,ipq9574-ap-al02-c2", "qcom,ipq9574";
- aliases {
- serial0 = &blsp1_uart2;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-};
-
-&blsp1_spi0 {
- pinctrl-0 = <&spi_0_pins>;
- pinctrl-names = "default";
- status = "okay";
-
- flash@0 {
- compatible = "micron,n25q128a11", "jedec,spi-nor";
- reg = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
- spi-max-frequency = <50000000>;
- };
-};
-
-&blsp1_uart2 {
- pinctrl-0 = <&uart2_pins>;
- pinctrl-names = "default";
- status = "okay";
-};
-
-&rpm_requests {
- regulators {
- compatible = "qcom,rpm-mp5496-regulators";
-
- ipq9574_s1: s1 {
- /*
- * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
- * During regulator registration, kernel not knowing the initial voltage,
- * considers it as zero and brings up the regulators with minimum supported voltage.
- * Update the regulator-min-microvolt with SVS voltage of 725mV so that
- * the regulators are brought up with 725mV which is sufficient for all the
- * corner parts to operate at 800MHz
- */
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1075000>;
- };
- };
};
&sdhc_1 {
@@ -74,10 +28,6 @@
status = "okay";
};
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
&tlmm {
sdc_default_state: sdc-default-state {
clk-pins {
@@ -110,15 +60,4 @@
bias-pull-down;
};
};
-
- spi_0_pins: spi-0-state {
- pins = "gpio11", "gpio12", "gpio13", "gpio14";
- function = "blsp0_spi";
- drive-strength = <8>;
- bias-disable;
- };
-};
-
-&xo_board_clk {
- clock-frequency = <24000000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp433.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp433.dts
index 2b3ed8d351f7..1bb8d96c9a82 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp433.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp433.dts
@@ -8,44 +8,11 @@
/dts-v1/;
-#include "ipq9574.dtsi"
+#include "ipq9574-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C7";
compatible = "qcom,ipq9574-ap-al02-c7", "qcom,ipq9574";
-
- aliases {
- serial0 = &blsp1_uart2;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-};
-
-&blsp1_uart2 {
- pinctrl-0 = <&uart2_pins>;
- pinctrl-names = "default";
- status = "okay";
-};
-
-&rpm_requests {
- regulators {
- compatible = "qcom,rpm-mp5496-regulators";
-
- ipq9574_s1: s1 {
- /*
- * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
- * During regulator registration, kernel not knowing the initial voltage,
- * considers it as zero and brings up the regulators with minimum supported voltage.
- * Update the regulator-min-microvolt with SVS voltage of 725mV so that
- * the regulators are brought up with 725mV which is sufficient for all the
- * corner parts to operate at 800MHz
- */
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1075000>;
- };
- };
};
&sdhc_1 {
@@ -60,10 +27,6 @@
status = "okay";
};
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
&tlmm {
sdc_default_state: sdc-default-state {
clk-pins {
@@ -97,7 +60,3 @@
};
};
};
-
-&xo_board_clk {
- clock-frequency = <24000000>;
-};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp449.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp449.dts
index c8fa54e1a62c..d36d1078763e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp449.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp449.dts
@@ -8,73 +8,10 @@
/dts-v1/;
-#include "ipq9574.dtsi"
+#include "ipq9574-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C6";
compatible = "qcom,ipq9574-ap-al02-c6", "qcom,ipq9574";
- aliases {
- serial0 = &blsp1_uart2;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-};
-
-&blsp1_spi0 {
- pinctrl-0 = <&spi_0_pins>;
- pinctrl-names = "default";
- status = "okay";
-
- flash@0 {
- compatible = "micron,n25q128a11", "jedec,spi-nor";
- reg = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
- spi-max-frequency = <50000000>;
- };
-};
-
-&blsp1_uart2 {
- pinctrl-0 = <&uart2_pins>;
- pinctrl-names = "default";
- status = "okay";
-};
-
-&rpm_requests {
- regulators {
- compatible = "qcom,rpm-mp5496-regulators";
-
- ipq9574_s1: s1 {
- /*
- * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
- * During regulator registration, kernel not knowing the initial voltage,
- * considers it as zero and brings up the regulators with minimum supported voltage.
- * Update the regulator-min-microvolt with SVS voltage of 725mV so that
- * the regulators are brought up with 725mV which is sufficient for all the
- * corner parts to operate at 800MHz
- */
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1075000>;
- };
- };
-};
-
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&tlmm {
- spi_0_pins: spi-0-state {
- pins = "gpio11", "gpio12", "gpio13", "gpio14";
- function = "blsp0_spi";
- drive-strength = <8>;
- bias-disable;
- };
-};
-
-&xo_board_clk {
- clock-frequency = <24000000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp453.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp453.dts
index f01de6628c3b..c30c9fbedf26 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp453.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp453.dts
@@ -8,73 +8,10 @@
/dts-v1/;
-#include "ipq9574.dtsi"
+#include "ipq9574-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C8";
compatible = "qcom,ipq9574-ap-al02-c8", "qcom,ipq9574";
- aliases {
- serial0 = &blsp1_uart2;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-};
-
-&blsp1_spi0 {
- pinctrl-0 = <&spi_0_pins>;
- pinctrl-names = "default";
- status = "okay";
-
- flash@0 {
- compatible = "micron,n25q128a11", "jedec,spi-nor";
- reg = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
- spi-max-frequency = <50000000>;
- };
-};
-
-&blsp1_uart2 {
- pinctrl-0 = <&uart2_pins>;
- pinctrl-names = "default";
- status = "okay";
-};
-
-&rpm_requests {
- regulators {
- compatible = "qcom,rpm-mp5496-regulators";
-
- ipq9574_s1: s1 {
- /*
- * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
- * During regulator registration, kernel not knowing the initial voltage,
- * considers it as zero and brings up the regulators with minimum supported voltage.
- * Update the regulator-min-microvolt with SVS voltage of 725mV so that
- * the regulators are brought up with 725mV which is sufficient for all the
- * corner parts to operate at 800MHz
- */
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1075000>;
- };
- };
-};
-
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&tlmm {
- spi_0_pins: spi-0-state {
- pins = "gpio11", "gpio12", "gpio13", "gpio14";
- function = "blsp0_spi";
- drive-strength = <8>;
- bias-disable;
- };
-};
-
-&xo_board_clk {
- clock-frequency = <24000000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp454.dts b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp454.dts
index 6efae3426cb8..0dc382f5d5ec 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp454.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574-rdp454.dts
@@ -8,73 +8,9 @@
/dts-v1/;
-#include "ipq9574.dtsi"
+#include "ipq9574-rdp-common.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C9";
compatible = "qcom,ipq9574-ap-al02-c9", "qcom,ipq9574";
-
- aliases {
- serial0 = &blsp1_uart2;
- };
-
- chosen {
- stdout-path = "serial0:115200n8";
- };
-};
-
-&blsp1_spi0 {
- pinctrl-0 = <&spi_0_pins>;
- pinctrl-names = "default";
- status = "okay";
-
- flash@0 {
- compatible = "micron,n25q128a11", "jedec,spi-nor";
- reg = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
- spi-max-frequency = <50000000>;
- };
-};
-
-&blsp1_uart2 {
- pinctrl-0 = <&uart2_pins>;
- pinctrl-names = "default";
- status = "okay";
-};
-
-&rpm_requests {
- regulators {
- compatible = "qcom,rpm-mp5496-regulators";
-
- ipq9574_s1: s1 {
- /*
- * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders.
- * During regulator registration, kernel not knowing the initial voltage,
- * considers it as zero and brings up the regulators with minimum supported voltage.
- * Update the regulator-min-microvolt with SVS voltage of 725mV so that
- * the regulators are brought up with 725mV which is sufficient for all the
- * corner parts to operate at 800MHz
- */
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1075000>;
- };
- };
-};
-
-&sleep_clk {
- clock-frequency = <32000>;
-};
-
-&tlmm {
- spi_0_pins: spi-0-state {
- pins = "gpio11", "gpio12", "gpio13", "gpio14";
- function = "blsp0_spi";
- drive-strength = <8>;
- bias-disable;
- };
-};
-
-&xo_board_clk {
- clock-frequency = <24000000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/ipq9574.dtsi b/sys/contrib/device-tree/src/arm64/qcom/ipq9574.dtsi
index f120c7c52351..5f83ee42a719 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/ipq9574.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/ipq9574.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/clock/qcom,ipq9574-gcc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/qcom,ipq9574-gcc.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
interrupt-parent = <&intc>;
@@ -42,6 +43,7 @@
clock-names = "cpu";
operating-points-v2 = <&cpu_opp_table>;
cpu-supply = <&ipq9574_s1>;
+ #cooling-cells = <2>;
};
CPU1: cpu@1 {
@@ -54,6 +56,7 @@
clock-names = "cpu";
operating-points-v2 = <&cpu_opp_table>;
cpu-supply = <&ipq9574_s1>;
+ #cooling-cells = <2>;
};
CPU2: cpu@2 {
@@ -66,6 +69,7 @@
clock-names = "cpu";
operating-points-v2 = <&cpu_opp_table>;
cpu-supply = <&ipq9574_s1>;
+ #cooling-cells = <2>;
};
CPU3: cpu@3 {
@@ -78,6 +82,7 @@
clock-names = "cpu";
operating-points-v2 = <&cpu_opp_table>;
cpu-supply = <&ipq9574_s1>;
+ #cooling-cells = <2>;
};
L2_0: l2-cache {
@@ -101,42 +106,56 @@
};
cpu_opp_table: opp-table-cpu {
- compatible = "operating-points-v2";
+ compatible = "operating-points-v2-kryo-cpu";
opp-shared;
+ nvmem-cells = <&cpu_speed_bin>;
opp-936000000 {
opp-hz = /bits/ 64 <936000000>;
opp-microvolt = <725000>;
+ opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
};
opp-1104000000 {
opp-hz = /bits/ 64 <1104000000>;
opp-microvolt = <787500>;
+ opp-supported-hw = <0xf>;
+ clock-latency-ns = <200000>;
+ };
+
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <862500>;
+ opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
};
opp-1416000000 {
opp-hz = /bits/ 64 <1416000000>;
opp-microvolt = <862500>;
+ opp-supported-hw = <0x7>;
clock-latency-ns = <200000>;
};
opp-1488000000 {
opp-hz = /bits/ 64 <1488000000>;
opp-microvolt = <925000>;
+ opp-supported-hw = <0x7>;
clock-latency-ns = <200000>;
};
opp-1800000000 {
opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <987500>;
+ opp-supported-hw = <0x5>;
clock-latency-ns = <200000>;
};
opp-2208000000 {
opp-hz = /bits/ 64 <2208000000>;
opp-microvolt = <1062500>;
+ opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
};
};
@@ -151,6 +170,22 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,ipq9574-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-ipq9574";
+ qcom,glink-channels = "rpm_requests";
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -174,23 +209,11 @@
smem@4aa00000 {
compatible = "qcom,smem";
reg = <0x0 0x4aa00000 0x0 0x100000>;
- hwlocks = <&tcsr_mutex 0>;
+ hwlocks = <&tcsr_mutex 3>;
no-map;
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-ipq9574";
- qcom,glink-channels = "rpm_requests";
- };
- };
-
soc: soc@0 {
compatible = "simple-bus";
#address-cells = <1>;
@@ -214,6 +237,11 @@
reg = <0x000a4000 0x5a1>;
#address-cells = <1>;
#size-cells = <1>;
+
+ cpu_speed_bin: cpu-speed-bin@15 {
+ reg = <0x15 0x2>;
+ bits = <7 2>;
+ };
};
cryptobam: dma-controller@704000 {
@@ -401,6 +429,8 @@
clocks = <&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
clock-names = "core", "iface";
+ assigned-clocks = <&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>;
+ assigned-clock-rates = <50000000>;
dmas = <&blsp_dma 14>, <&blsp_dma 15>;
dma-names = "tx", "rx";
status = "disabled";
@@ -429,6 +459,8 @@
clocks = <&gcc GCC_BLSP1_QUP3_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
clock-names = "core", "iface";
+ assigned-clocks = <&gcc GCC_BLSP1_QUP3_I2C_APPS_CLK>;
+ assigned-clock-rates = <50000000>;
dmas = <&blsp_dma 16>, <&blsp_dma 17>;
dma-names = "tx", "rx";
status = "disabled";
@@ -457,6 +489,8 @@
clocks = <&gcc GCC_BLSP1_QUP4_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
clock-names = "core", "iface";
+ assigned-clocks = <&gcc GCC_BLSP1_QUP4_I2C_APPS_CLK>;
+ assigned-clock-rates = <50000000>;
dmas = <&blsp_dma 18>, <&blsp_dma 19>;
dma-names = "tx", "rx";
status = "disabled";
@@ -486,6 +520,8 @@
clocks = <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
clock-names = "core", "iface";
+ assigned-clocks = <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>;
+ assigned-clock-rates = <50000000>;
dmas = <&blsp_dma 20>, <&blsp_dma 21>;
dma-names = "tx", "rx";
status = "disabled";
@@ -505,6 +541,91 @@
status = "disabled";
};
+ usb_0_qusbphy: phy@7b000 {
+ compatible = "qcom,ipq9574-qusb2-phy";
+ reg = <0x0007b000 0x180>;
+ #phy-cells = <0>;
+
+ clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&xo_board_clk>;
+ clock-names = "cfg_ahb",
+ "ref";
+
+ resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
+ status = "disabled";
+ };
+
+ usb_0_qmpphy: phy@7d000 {
+ compatible = "qcom,ipq9574-qmp-usb3-phy";
+ reg = <0x0007d000 0xa00>;
+ #phy-cells = <0>;
+
+ clocks = <&gcc GCC_USB0_AUX_CLK>,
+ <&xo_board_clk>,
+ <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
+ <&gcc GCC_USB0_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+
+ resets = <&gcc GCC_USB0_PHY_BCR>,
+ <&gcc GCC_USB3PHY_0_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
+
+ #clock-cells = <0>;
+ clock-output-names = "usb0_pipe_clk";
+
+ status = "disabled";
+ };
+
+ usb3: usb@8af8800 {
+ compatible = "qcom,ipq9574-dwc3", "qcom,dwc3";
+ reg = <0x08af8800 0x400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ clocks = <&gcc GCC_SNOC_USB_CLK>,
+ <&gcc GCC_USB0_MASTER_CLK>,
+ <&gcc GCC_ANOC_USB_AXI_CLK>,
+ <&gcc GCC_USB0_SLEEP_CLK>,
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+
+ clock-names = "cfg_noc",
+ "core",
+ "iface",
+ "sleep",
+ "mock_utmi";
+
+ assigned-clocks = <&gcc GCC_USB0_MASTER_CLK>,
+ <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ assigned-clock-rates = <200000000>,
+ <24000000>;
+
+ interrupts-extended = <&intc GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "pwr_event";
+
+ resets = <&gcc GCC_USB_BCR>;
+ status = "disabled";
+
+ usb_0_dwc3: usb@8a00000 {
+ compatible = "snps,dwc3";
+ reg = <0x8a00000 0xcd00>;
+ clocks = <&gcc GCC_USB0_MOCK_UTMI_CLK>;
+ clock-names = "ref";
+ interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&usb_0_qusbphy>, <&usb_0_qmpphy>;
+ phy-names = "usb2-phy", "usb3-phy";
+ tx-fifo-resize;
+ snps,is-utmi-l1-suspend;
+ snps,hird-threshold = /bits/ 8 <0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_u3_susphy_quirk;
+ };
+ };
+
intc: interrupt-controller@b000000 {
compatible = "qcom,msm-qgic2";
reg = <0x0b000000 0x1000>, /* GICD */
@@ -550,8 +671,8 @@
"qcom,ipq6018-apcs-apps-global";
reg = <0x0b111000 0x1000>;
#clock-cells = <1>;
- clocks = <&a73pll>, <&xo_board_clk>;
- clock-names = "pll", "xo";
+ clocks = <&a73pll>, <&xo_board_clk>, <&gcc GPLL0>;
+ clock-names = "pll", "xo", "gpll0";
#mbox-cells = <1>;
};
@@ -727,18 +848,28 @@
thermal-sensors = <&tsens 10>;
trips {
- cpu-critical {
+ cpu0_crit: cpu-critical {
temperature = <120000>;
hysteresis = <10000>;
type = "critical";
};
- cpu-passive {
+ cpu0_alert: cpu-passive {
temperature = <110000>;
hysteresis = <1000>;
type = "passive";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu0_alert>;
+ cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
};
cpu1-thermal {
@@ -747,18 +878,28 @@
thermal-sensors = <&tsens 11>;
trips {
- cpu-critical {
+ cpu1_crit: cpu-critical {
temperature = <120000>;
hysteresis = <10000>;
type = "critical";
};
- cpu-passive {
+ cpu1_alert: cpu-passive {
temperature = <110000>;
hysteresis = <1000>;
type = "passive";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu1_alert>;
+ cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
};
cpu2-thermal {
@@ -767,18 +908,28 @@
thermal-sensors = <&tsens 12>;
trips {
- cpu-critical {
+ cpu2_crit: cpu-critical {
temperature = <120000>;
hysteresis = <10000>;
type = "critical";
};
- cpu-passive {
+ cpu2_alert: cpu-passive {
temperature = <110000>;
hysteresis = <1000>;
type = "passive";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu2_alert>;
+ cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
};
cpu3-thermal {
@@ -787,18 +938,28 @@
thermal-sensors = <&tsens 13>;
trips {
- cpu-critical {
+ cpu3_crit: cpu-critical {
temperature = <120000>;
hysteresis = <10000>;
type = "critical";
};
- cpu-passive {
+ cpu3_alert: cpu-passive {
temperature = <110000>;
hysteresis = <1000>;
type = "passive";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu3_alert>;
+ cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
};
wcss-phyb-thermal {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-acer-a1-724.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-acer-a1-724.dts
index 5ad49fe999db..b32c7a97394d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-acer-a1-724.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-acer-a1-724.dts
@@ -7,6 +7,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
/*
* NOTE: The original firmware from Acer can only boot 32-bit kernels.
@@ -48,7 +49,7 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
};
@@ -83,6 +84,29 @@
};
};
+&blsp_i2c4 {
+ status = "okay";
+
+ led-controller@30 {
+ compatible = "kinetic,ktd2026";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <1>;
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+ };
+};
+
&blsp_i2c5 {
status = "okay";
@@ -155,6 +179,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -163,6 +195,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio115";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-alcatel-idol347.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-alcatel-idol347.dts
index 1c43f3d6a0b4..3459145516a1 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-alcatel-idol347.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-alcatel-idol347.dts
@@ -3,6 +3,8 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
@@ -22,6 +24,19 @@
stdout-path = "serial0";
};
+ reserved-memory {
+ /delete-node/ reserved@86680000;
+ /delete-node/ rmtfs@86700000;
+
+ rmtfs: rmtfs@86680000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0x0 0x86680000 0x0 0x160000>;
+ no-map;
+
+ qcom,client-id = <1>;
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
@@ -50,16 +65,60 @@
};
};
+ reg_headphones_avdd: regulator-headphones-avdd {
+ compatible = "regulator-fixed";
+ regulator-name = "headphones_avdd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&tlmm 121 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-0 = <&headphones_avdd_default>;
+ pinctrl-names = "default";
+ };
+
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
};
};
-&blsp_uart2 {
+&blsp_i2c3 {
status = "okay";
+
+ headphones: audio-codec@10 {
+ compatible = "asahi-kasei,ak4375";
+ reg = <0x10>;
+ avdd-supply = <&reg_headphones_avdd>;
+ tvdd-supply = <&pm8916_l6>;
+ pdn-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&headphones_pdn_default>;
+ pinctrl-names = "default";
+ #sound-dai-cells = <0>;
+ };
+
+ speaker_codec_top: audio-codec@34 {
+ compatible = "nxp,tfa9897";
+ reg = <0x34>;
+ vddd-supply = <&pm8916_l6>;
+ rcv-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&speaker_top_default>;
+ pinctrl-names = "default";
+ sound-name-prefix = "Speaker Top";
+ #sound-dai-cells = <0>;
+ };
+
+ speaker_codec_bottom: audio-codec@36 {
+ compatible = "nxp,tfa9897";
+ reg = <0x36>;
+ vddd-supply = <&pm8916_l6>;
+ rcv-gpios = <&tlmm 111 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&speaker_bottom_default>;
+ pinctrl-names = "default";
+ sound-name-prefix = "Speaker Bottom";
+ #sound-dai-cells = <0>;
+ };
};
&blsp_i2c4 {
@@ -153,6 +212,22 @@
};
};
+&blsp_uart2 {
+ status = "okay";
+};
+
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5000000>;
+};
+
+&pm8916_codec {
+ qcom,micbias1-ext-cap;
+ qcom,micbias-lvl = <2800>;
+ qcom,mbhc-vthreshold-low = <75 100 120 180 500>;
+ qcom,mbhc-vthreshold-high = <75 100 120 180 500>;
+ qcom,hphl-jack-type-normally-open;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -169,6 +244,17 @@
status = "okay";
};
+&q6afedai {
+ dai@18 {
+ reg = <SECONDARY_MI2S_RX>;
+ qcom,sd-lines = <0>;
+ };
+ dai@22 {
+ reg = <QUATERNARY_MI2S_RX>;
+ qcom,sd-lines = <0>;
+ };
+};
+
&sdhc_1 {
status = "okay";
};
@@ -183,6 +269,54 @@
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
+&sound {
+ /* Add pin switches for speakers to allow disabling them individually */
+ model = "alcatel-idol3";
+ widgets =
+ "Speaker", "Speaker Top",
+ "Speaker", "Speaker Bottom";
+ pin-switches = "Speaker Top", "Speaker Bottom";
+ audio-routing =
+ "Speaker Top", "Speaker Top OUT",
+ "Speaker Bottom", "Speaker Bottom OUT",
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+
+ pinctrl-0 = <&cdc_pdm_default &pri_mi2s_default &pri_mi2s_ws_default &sec_mi2s_default>;
+ pinctrl-1 = <&cdc_pdm_sleep &pri_mi2s_sleep &pri_mi2s_ws_sleep &sec_mi2s_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ sound_link_backend2: backend2-dai-link {
+ link-name = "Quaternary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&speaker_codec_top>, <&speaker_codec_bottom>;
+ };
+ };
+};
+
+&sound_link_backend0 {
+ /* Primary MI2S is not used, replace with Secondary MI2S for headphones */
+ link-name = "Secondary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai SECONDARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&headphones>;
+ };
+};
+
&usb {
status = "okay";
extcon = <&usb_id>, <&usb_id>;
@@ -192,6 +326,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -200,6 +342,19 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
+/* Only some of the pins are used */
+&pri_mi2s_default {
+ pins = "gpio113", "gpio115";
+};
+
+&pri_mi2s_sleep {
+ pins = "gpio113", "gpio115";
+};
+
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio31";
@@ -233,6 +388,20 @@
bias-disable;
};
+ headphones_avdd_default: headphones-avdd-default-state {
+ pins = "gpio121";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ headphones_pdn_default: headphones-pdn-default-state {
+ pins = "gpio114";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
/*
* The OEM wired an additional GPIO to be asserted so that
* the si-en,sn3190 LED IC works. Since this GPIO is not
@@ -279,6 +448,20 @@
bias-disable;
};
+ speaker_bottom_default: speaker-bottom-default-state {
+ pins = "gpio111";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ speaker_top_default: speaker-top-default-state {
+ pins = "gpio50";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
ts_int_reset_default: ts-int-reset-default-state {
pins = "gpio13", "gpio100";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-asus-z00l.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-asus-z00l.dts
index 92f695481769..77618c7374df 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-asus-z00l.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-asus-z00l.dts
@@ -3,6 +3,8 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -130,6 +132,18 @@
status = "okay";
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5500000>;
+};
+
+&pm8916_codec {
+ qcom,micbias-lvl = <2800>;
+ qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
+ qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
+ qcom,micbias1-ext-cap;
+ qcom,hphl-jack-type-normally-open;
+};
+
&pm8916_rpm_regulators {
pm8916_l17: l17 {
regulator-min-microvolt = <2850000>;
@@ -151,6 +165,13 @@
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
+&sound {
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+};
+
&usb {
status = "okay";
extcon = <&usb_id>, <&usb_id>;
@@ -160,6 +181,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -168,6 +197,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
gpio_keys_default: gpio-keys-default-state {
pins = "gpio107", "gpio117";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-gplus-fl8005a.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-gplus-fl8005a.dts
index f4dbc515c47a..b748d140b52e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-gplus-fl8005a.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-gplus-fl8005a.dts
@@ -75,7 +75,7 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&usb_id_default>;
pinctrl-names = "default";
};
@@ -150,6 +150,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -158,6 +166,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
camera_flash_default: camera-flash-default-state {
pins = "gpio31", "gpio32";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-huawei-g7.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-huawei-g7.dts
index 4239c8fda11b..bf7fc89dd106 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-huawei-g7.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-huawei-g7.dts
@@ -80,7 +80,7 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 117 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
};
@@ -328,6 +328,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -336,6 +344,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
accel_irq_default: accel-irq-default-state {
pins = "gpio115";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8150.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8150.dts
index 97262b8519b3..3a3e794c022f 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8150.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8150.dts
@@ -3,6 +3,8 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -23,14 +25,47 @@
stdout-path = "serial0";
};
+ /*
+ * For some reason, the signed wcnss firmware is not relocatable.
+ * It must be loaded at 0x8b600000. Unfortunately, this also means that
+ * mpss_mem does not fit when loaded to the typical address at 0x86800000.
+ *
+ * Load wcnss_mem to the fixed address and relocate mpss_mem to the next
+ * working higher address. For some reason the modem firmware does not
+ * boot when placed at 0x8a800000 to 0x8e800000.
+ */
reserved-memory {
- /* wcnss.mdt is not relocatable, so it must be loaded at 0x8b600000 */
- /delete-node/ wcnss@89300000;
+ /delete-node/ mpss@86800000;
+ /delete-node/ wcnss;
wcnss_mem: wcnss@8b600000 {
reg = <0x0 0x8b600000 0x0 0x600000>;
no-map;
};
+
+ mpss_mem: mpss@8e800000 {
+ reg = <0x0 0x8e800000 0x0 0x5000000>;
+ no-map;
+ };
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4350000>;
+ energy-full-design-microwatt-hours = <9500000>;
+ charge-full-design-microamp-hours = <2500000>;
+
+ ocv-capacity-celsius = <25>;
+ ocv-capacity-table-0 = <4330000 100>, <4265000 95>,
+ <4208000 90>, <4153000 85>, <4100000 80>, <4049000 75>,
+ <4001000 70>, <3962000 65>, <3919000 60>, <3872000 55>,
+ <3839000 50>, <3817000 45>, <3798000 40>, <3783000 35>,
+ <3767000 30>, <3747000 25>, <3729000 20>, <3709000 16>,
+ <3688000 13>, <3681000 11>, <3680000 10>, <3679000 9>,
+ <3677000 8>, <3674000 7>, <3666000 6>, <3641000 5>,
+ <3597000 4>, <3537000 3>, <3457000 2>, <3336000 1>,
+ <3000000 0>;
};
gpio-keys {
@@ -88,6 +123,7 @@
#size-cells = <0>;
vcc-supply = <&pm8916_l17>;
+ vio-supply = <&pm8916_l6>;
led@0 {
reg = <0>;
@@ -165,7 +201,7 @@
pinctrl-0 = <&light_int_default>;
vdd-supply = <&pm8916_l17>;
- vio-supply = <&pm8916_l6>;
+ vddio-supply = <&pm8916_l6>;
};
gyroscope@68 {
@@ -220,6 +256,29 @@
status = "okay";
};
+&pm8916_bms {
+ status = "okay";
+
+ monitored-battery = <&battery>;
+ power-supplies = <&pm8916_charger>;
+};
+
+&pm8916_charger {
+ status = "okay";
+
+ monitored-battery = <&battery>;
+
+ qcom,fast-charge-safe-current = <900000>;
+ qcom,fast-charge-safe-voltage = <4300000>;
+};
+
+&pm8916_codec {
+ qcom,micbias-lvl = <2800>;
+ qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
+ qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
+ qcom,hphl-jack-type-normally-open;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -232,10 +291,6 @@
};
};
-&pm8916_usbin {
- status = "okay";
-};
-
&pm8916_vib {
status = "okay";
};
@@ -249,14 +304,29 @@
non-removable;
};
+&sound {
+ audio-routing =
+ "AMIC1", "MIC BIAS Internal1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS Internal3";
+};
+
&usb {
status = "okay";
dr_mode = "peripheral";
- extcon = <&pm8916_usbin>;
+ extcon = <&pm8916_charger>;
};
&usb_hs_phy {
- extcon = <&pm8916_usbin>;
+ extcon = <&pm8916_charger>;
+};
+
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
};
&wcnss {
@@ -267,6 +337,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio116";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8910.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8910.dts
index 9757182fba3e..3b7fdb6797a9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8910.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-longcheer-l8910.dts
@@ -3,9 +3,12 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
/ {
model = "BQ Aquaris X5 (Longcheer L8910)";
@@ -22,6 +25,16 @@
stdout-path = "serial0";
};
+ speaker_amp: audio-amplifier {
+ compatible = "awinic,aw8738";
+ mode-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>;
+ awinic,mode = <5>;
+ sound-name-prefix = "Speaker Amp";
+
+ pinctrl-0 = <&spk_ext_pa_default>;
+ pinctrl-names = "default";
+ };
+
flash-led-controller {
compatible = "ocs,ocp8110";
enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
@@ -68,12 +81,52 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
};
};
+&blsp_i2c2 {
+ status = "okay";
+
+ led-controller@30 {
+ compatible = "kinetic,ktd2026";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vin-supply = <&pm8916_l17>;
+ vio-supply = <&pm8916_l6>;
+
+ pinctrl-0 = <&status_led_default>;
+ pinctrl-names = "default";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+};
+
&blsp_i2c3 {
status = "okay";
@@ -107,6 +160,27 @@
status = "okay";
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5000000>;
+};
+
+&pm8916_codec {
+ qcom,micbias-lvl = <2800>;
+ qcom,mbhc-vthreshold-low = <75 100 120 180 500>;
+ qcom,mbhc-vthreshold-high = <75 100 120 180 500>;
+ qcom,hphl-jack-type-normally-open;
+};
+
+&pm8916_gpios {
+ status_led_default: status-led-default-state {
+ pins = "gpio3";
+ function = PMIC_GPIO_FUNC_NORMAL;
+ power-source = <PM8916_GPIO_VPH>;
+ bias-disable;
+ output-high;
+ };
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -137,6 +211,28 @@
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
+&sound {
+ /*
+ * Provide widgets/pin-switches to allow enabling speaker separately.
+ * The hardware does not provide a way to disable the output via the
+ * headphone jack when the speaker is enabled.
+ */
+ model = "bq-paella";
+ widgets =
+ "Speaker", "Speaker",
+ "Headphone", "Headphones";
+ pin-switches = "Speaker";
+ audio-routing =
+ "Speaker", "Speaker Amp OUT",
+ "Speaker Amp IN", "HPH_R",
+ "Headphones", "HPH_L",
+ "Headphones", "HPH_R",
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+ aux-devs = <&speaker_amp>;
+};
+
&usb {
status = "okay";
extcon = <&usb_id>, <&usb_id>;
@@ -146,6 +242,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -154,6 +258,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
button_backlight_default: button-backlight-default-state {
pins = "gpio17";
@@ -193,6 +301,13 @@
bias-disable;
};
+ spk_ext_pa_default: spk-ext-pa-default-state {
+ pins = "gpio114";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
usb_id_default: usb-id-default-state {
pins = "gpio110";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-modem-qdsp6.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916-modem-qdsp6.dtsi
new file mode 100644
index 000000000000..039961622633
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-modem-qdsp6.dtsi
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
+/*
+ * msm8916-modem-qdsp6.dtsi describes the typical modem setup on MSM8916 devices
+ * (or similar SoCs) with audio routed via the QDSP6 services provided by the
+ * modem firmware. The digital/analog codec in the SoC/PMIC is used by default,
+ * but boards can define additional codecs by adding additional backend DAI links.
+ */
+
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+
+&apr {
+ status = "okay";
+};
+
+&bam_dmux {
+ status = "okay";
+};
+
+&bam_dmux_dma {
+ status = "okay";
+};
+
+&lpass {
+ status = "reserved"; /* Controlled by QDSP6 */
+};
+
+&lpass_codec {
+ status = "okay";
+};
+
+&mba_mem {
+ status = "okay";
+};
+
+&mpss {
+ status = "okay";
+};
+
+&mpss_mem {
+ status = "okay";
+};
+
+&pm8916_codec {
+ status = "okay";
+};
+
+&q6afedai {
+ dai@16 {
+ reg = <PRIMARY_MI2S_RX>;
+ qcom,sd-lines = <0 1>;
+ };
+ dai@20 {
+ reg = <TERTIARY_MI2S_TX>;
+ qcom,sd-lines = <0 1>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ direction = <Q6ASM_DAI_RX>;
+ };
+ dai@1 {
+ reg = <1>;
+ direction = <Q6ASM_DAI_TX>;
+ };
+ dai@2 {
+ reg = <2>;
+ direction = <Q6ASM_DAI_RX>;
+ };
+ dai@3 {
+ reg = <3>;
+ direction = <Q6ASM_DAI_RX>;
+ is-compress-dai;
+ };
+};
+
+&sound {
+ compatible = "qcom,msm8916-qdsp6-sndcard";
+ model = "msm8916";
+
+ pinctrl-0 = <&cdc_pdm_default>;
+ pinctrl-1 = <&cdc_pdm_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ status = "okay";
+
+ frontend0-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ frontend1-dai-link {
+ link-name = "MultiMedia2";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
+ frontend2-dai-link {
+ link-name = "MultiMedia3";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ frontend3-dai-link {
+ link-name = "MultiMedia4";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+ };
+ };
+
+ sound_link_backend0: backend0-dai-link {
+ link-name = "Primary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 0>, <&pm8916_codec 0>;
+ };
+ };
+
+ sound_link_backend1: backend1-dai-link {
+ link-name = "Tertiary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai TERTIARY_MI2S_TX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 1>, <&pm8916_codec 1>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-mtp.dts
index 438eb1faee1d..ac527a3a0826 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-mtp.dts
@@ -10,6 +10,7 @@
/ {
model = "Qualcomm Technologies, Inc. MSM 8916 MTP";
compatible = "qcom,msm8916-mtp", "qcom,msm8916-mtp/1", "qcom,msm8916";
+ chassis-type = "handset";
aliases {
serial0 = &blsp_uart2;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a2015-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a2015-common.dtsi
index 019bf73178fa..2937495940ea 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a2015-common.dtsi
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/sound/apq8016-lpass.h>
/ {
aliases {
@@ -196,6 +199,18 @@
};
};
+&blsp_i2c1 {
+ status = "okay";
+
+ speaker_codec: audio-codec@34 {
+ compatible = "nxp,tfa9895";
+ reg = <0x34>;
+ vddd-supply = <&pm8916_l5>;
+ sound-name-prefix = "Speaker";
+ #sound-dai-cells = <0>;
+ };
+};
+
&blsp_i2c2 {
status = "okay";
@@ -239,6 +254,29 @@
status = "okay";
};
+&gpu {
+ status = "okay";
+};
+
+/*
+ * For some reason the speaker amplifier is connected to the second SD line
+ * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the
+ * device tree, otherwise audio will seemingly play fine on the wrong SD line
+ * but the speaker stays silent.
+ *
+ * When routing audio via QDSP6 (the default) the &lpass node is reserved and
+ * the definitions from &q6afedai are used. When the modem is disabled audio can
+ * be alternatively routed directly to the LPASS hardware with reduced latency.
+ * The definitions for &lpass are here for completeness to simplify changing the
+ * setup with minor changes to the DT (either manually or with DT overlays).
+ */
+&lpass {
+ dai-link@3 {
+ reg = <MI2S_QUATERNARY>;
+ qcom,playback-sd-lines = <1>;
+ };
+};
+
&mdss {
status = "okay";
};
@@ -249,6 +287,10 @@
pinctrl-1 = <&mdss_sleep>;
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5400000>;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -261,6 +303,13 @@
};
};
+&q6afedai {
+ dai@22 {
+ reg = <QUATERNARY_MI2S_RX>;
+ qcom,sd-lines = <1>;
+ };
+};
+
&sdhc_1 {
status = "okay";
};
@@ -275,6 +324,32 @@
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
+&sound {
+ model = "samsung-a2015";
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+
+ pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
+ pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ sound_link_backend2: backend2-dai-link {
+ link-name = "Quaternary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&speaker_codec>;
+ };
+ };
+};
+
&usb {
status = "okay";
extcon = <&muic>, <&muic>;
@@ -284,6 +359,14 @@
extcon = <&muic>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio115";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a3u-eur.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a3u-eur.dts
index e5a569698c4f..3b934f5eba47 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a3u-eur.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a3u-eur.dts
@@ -49,11 +49,6 @@
};
};
-&touchkey {
- vcc-supply = <&reg_touch_key>;
- vdd-supply = <&reg_key_led>;
-};
-
&accelerometer {
mount-matrix = "0", "1", "0",
"1", "0", "0",
@@ -108,6 +103,11 @@
remote-endpoint = <&panel_in>;
};
+&touchkey {
+ vcc-supply = <&reg_touch_key>;
+ vdd-supply = <&reg_key_led>;
+};
+
&vibrator {
status = "okay";
};
@@ -120,6 +120,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
panel_vdd3_default: panel-vdd3-default-state {
pins = "gpio9";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a5u-eur.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a5u-eur.dts
index 388482a1e3d9..391befa22bb4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a5u-eur.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-a5u-eur.dts
@@ -71,6 +71,10 @@
compatible = "qcom,wcn3660b";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
tkey_en_default: tkey-en-default-state {
pins = "gpio97";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e2015-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e2015-common.dtsi
index 0cdd6af7817f..3c49dac92d2d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e2015-common.dtsi
@@ -42,10 +42,31 @@
&blsp_i2c2 {
/* lis2hh12 accelerometer instead of BMC150 */
- status = "disabled";
-
/delete-node/ accelerometer@10;
/delete-node/ magnetometer@12;
+
+ accelerometer@1d {
+ compatible = "st,lis2hh12";
+ reg = <0x1d>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
+
+ vdd-supply = <&pm8916_l5>;
+ vddio-supply = <&pm8916_l5>;
+
+ st,drdy-int-pin = <1>;
+ mount-matrix = "1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "1";
+
+ pinctrl-0 = <&accel_int_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5a00000>;
};
&reg_motor_vdd {
@@ -66,6 +87,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
tkey_en_default: tkey-en-default-state {
pins = "gpio97";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e5.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e5.dts
index 777eb934eb4b..fad2535255f7 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e5.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-e5.dts
@@ -22,3 +22,23 @@
compatible = "samsung,e5", "qcom,msm8916";
chassis-type = "handset";
};
+
+&blsp_i2c5 {
+ status = "okay";
+
+ touchscreen@48 {
+ compatible = "melfas,mms345l";
+ reg = <0x48>;
+
+ interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>;
+
+ touchscreen-size-x = <720>;
+ touchscreen-size-y = <1280>;
+
+ avdd-supply = <&reg_vdd_tsp_a>;
+ vdd-supply = <&pm8916_l6>;
+
+ pinctrl-0 = <&ts_int_default>;
+ pinctrl-names = "default";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-grandmax.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-grandmax.dts
index 3f145dde4059..5882b3a593b8 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-grandmax.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-grandmax.dts
@@ -49,6 +49,10 @@
status = "disabled";
};
+&sound {
+ model = "samsung-gmax"; /* No secondary microphone */
+};
+
&tlmm {
gpio_leds_default: gpio-led-default-state {
pins = "gpio60";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt5-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt5-common.dtsi
index 7943bb619116..fbd2caf405d5 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt5-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt5-common.dtsi
@@ -3,9 +3,12 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/sound/apq8016-lpass.h>
/ {
aliases {
@@ -65,25 +68,6 @@
};
};
-&blsp_i2c4 {
- status = "okay";
-
- fuelgauge@36 {
- compatible = "maxim,max77849-battery";
- reg = <0x36>;
-
- maxim,rsns-microohm = <10000>;
- maxim,over-heat-temp = <600>;
- maxim,over-volt = <4400>;
-
- interrupt-parent = <&tlmm>;
- interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
-
- pinctrl-0 = <&fuelgauge_int_default>;
- pinctrl-names = "default";
- };
-};
-
&blsp_i2c2 {
status = "okay";
@@ -101,7 +85,6 @@
interrupt-parent = <&tlmm>;
interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "INT1";
st,drdy-int-pin = <1>;
mount-matrix = "0", "1", "0",
@@ -113,10 +96,52 @@
};
};
+&blsp_i2c4 {
+ status = "okay";
+
+ fuelgauge@36 {
+ compatible = "maxim,max77849-battery";
+ reg = <0x36>;
+
+ maxim,rsns-microohm = <10000>;
+ maxim,over-heat-temp = <600>;
+ maxim,over-volt = <4400>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-0 = <&fuelgauge_int_default>;
+ pinctrl-names = "default";
+ };
+};
+
&blsp_uart2 {
status = "okay";
};
+/*
+ * For some reason the speaker amplifier is connected to the second SD line
+ * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the
+ * device tree, otherwise audio will seemingly play fine on the wrong SD line
+ * but the speaker stays silent.
+ *
+ * When routing audio via QDSP6 (the default) the &lpass node is reserved and
+ * the definitions from &q6afedai are used. When the modem is disabled audio can
+ * be alternatively routed directly to the LPASS hardware with reduced latency.
+ * The definitions for &lpass are here for completeness to simplify changing the
+ * setup with minor changes to the DT (either manually or with DT overlays).
+ */
+&lpass {
+ dai-link@3 {
+ reg = <MI2S_QUATERNARY>;
+ qcom,playback-sd-lines = <1>;
+ };
+};
+
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5400000>;
+};
+
&pm8916_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
@@ -134,6 +159,13 @@
status = "okay";
};
+&q6afedai {
+ dai@22 {
+ reg = <QUATERNARY_MI2S_RX>;
+ qcom,sd-lines = <1>;
+ };
+};
+
&sdhc_1 {
status = "okay";
};
@@ -148,6 +180,27 @@
status = "okay";
};
+&sound {
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+
+ sound_link_backend2: backend2-dai-link {
+ link-name = "Quaternary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&speaker_codec>;
+ };
+ };
+};
+
&usb {
dr_mode = "peripheral";
extcon = <&pm8916_usbin>;
@@ -159,6 +212,14 @@
extcon = <&pm8916_usbin>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -167,6 +228,10 @@
compatible = "qcom,wcn3660b";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
accel_int_default: accel-int-default-state {
pins = "gpio115";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt510.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt510.dts
index 48111c6a2c78..5b34529b816c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt510.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt510.dts
@@ -9,6 +9,14 @@
compatible = "samsung,gt510", "qcom,msm8916";
chassis-type = "tablet";
+ speaker_codec: audio-codec {
+ compatible = "maxim,max98357a";
+ sdmode-gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ pinctrl-0 = <&audio_sdmode_default>;
+ pinctrl-names = "default";
+ };
+
clk_pwm: pwm {
compatible = "clk-pwm";
#pwm-cells = <2>;
@@ -19,6 +27,19 @@
pinctrl-names = "default";
};
+ reg_lcd_vmipi: regulator-lcd-vmipi {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_vmipi";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&lcd_en_default>;
+ pinctrl-names = "default";
+ };
+
reg_motor_vdd: regulator-motor-vdd {
compatible = "regulator-fixed";
regulator-name = "motor_vdd";
@@ -55,6 +76,19 @@
enable-active-high;
};
+ reg_vlcd_5p4v: regulator-vlcd-5p4v {
+ compatible = "regulator-fixed";
+ regulator-name = "vlcd_5p4v";
+ regulator-min-microvolt = <5400000>;
+ regulator-max-microvolt = <5400000>;
+
+ gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&buckbooster_en_default>;
+ pinctrl-names = "default";
+ };
+
vibrator {
compatible = "pwm-vibrator";
@@ -81,10 +115,67 @@
pinctrl-0 = <&tsp_int_rst_default>;
pinctrl-names = "default";
+
+ linux,keycodes = <KEY_APPSELECT KEY_BACK>;
};
};
+&gpu {
+ status = "okay";
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ pinctrl-0 = <&mdss_default>;
+ pinctrl-1 = <&mdss_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ panel@0 {
+ compatible = "samsung,ltl101at01", "samsung,s6d7aa0";
+ reg = <0>;
+
+ power-supply = <&reg_vlcd_5p4v>;
+ vmipi-supply = <&reg_lcd_vmipi>;
+ reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ data-lanes = <0 1 2 3>;
+ remote-endpoint = <&panel_in>;
+};
+
+&sound {
+ model = "samsung-gt510";
+ pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
+ pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
+ pinctrl-names = "default", "sleep";
+};
+
&tlmm {
+ audio_sdmode_default: audio-sdmode-default-state {
+ pins = "gpio55";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ buckbooster_en_default: buckbooster-en-default-state {
+ pins = "gpio51";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
motor_en_default: motor-en-default-state {
pins = "gpio76";
function = "gpio";
@@ -97,6 +188,27 @@
function = "gcc_gp2_clk_a";
};
+ lcd_en_default: lcd-en-default-state {
+ pins = "gpio8";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ mdss_default: mdss-default-state {
+ pins = "gpio97";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ mdss_sleep: mdss-sleep-state {
+ pins = "gpio97";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
tsp_en_default: tsp-en-default-state {
pins = "gpio73";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt58.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt58.dts
index 98ceaad7fcea..579312ed53ce 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt58.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-gt58.dts
@@ -9,6 +9,19 @@
compatible = "samsung,gt58", "qcom,msm8916";
chassis-type = "tablet";
+ reg_5p4v: regulator-5p4v {
+ compatible = "regulator-fixed";
+ regulator-name = "vlcd_5p4v";
+ regulator-min-microvolt = <5400000>;
+ regulator-max-microvolt = <5400000>;
+
+ gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&buckbooster_en_default>;
+ pinctrl-names = "default";
+ };
+
reg_vdd_tsp: regulator-vdd-tsp {
compatible = "regulator-fixed";
regulator-name = "vdd_tsp";
@@ -22,6 +35,26 @@
pinctrl-names = "default";
};
+ i2c-amplifier {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 55 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 56 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&amp_i2c_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ speaker_codec: audio-codec@34 {
+ compatible = "nxp,tfa9895";
+ reg = <0x34>;
+ vddd-supply = <&pm8916_l5>;
+ sound-name-prefix = "Speaker";
+ #sound-dai-cells = <0>;
+ };
+ };
+
vibrator {
compatible = "gpio-vibrator";
enable-gpios = <&tlmm 76 GPIO_ACTIVE_HIGH>;
@@ -51,7 +84,76 @@
};
};
+&gpu {
+ status = "okay";
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ pinctrl-0 = <&mdss_default>;
+ pinctrl-1 = <&mdss_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ panel@0 {
+ compatible = "samsung,lsl080al03", "samsung,s6d7aa0";
+ reg = <0>;
+
+ power-supply = <&reg_5p4v>;
+ vmipi-supply = <&pm8916_l5>;
+ reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ data-lanes = <0 1 2 3>;
+ remote-endpoint = <&panel_in>;
+};
+
+&sound {
+ model = "samsung-a2015";
+ pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default &secondary_mic_default>;
+ pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep &secondary_mic_default>;
+ pinctrl-names = "default", "sleep";
+};
+
&tlmm {
+ amp_i2c_default: amp-i2c-default-state {
+ pins = "gpio55", "gpio56";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ buckbooster_en_default: buckbooster-en-default-state {
+ pins = "gpio8";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ mdss_default: mdss-default-state {
+ pins = "gpio97";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ mdss_sleep: mdss-sleep-state {
+ pins = "gpio97";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
reg_tsp_en_default: reg-tsp-en-default-state {
pins = "gpio73";
function = "gpio";
@@ -59,6 +161,14 @@
bias-disable;
};
+ secondary_mic_default: secondary-mic-default-state {
+ pins = "gpio98";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-high;
+ };
+
tsp_int_default: tsp-int-default-state {
pins = "gpio13";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5-common.dtsi
index f4fd5d72b28b..5ca2ada266f4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5-common.dtsi
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -84,12 +86,61 @@
pinctrl-0 = <&muic_int_default>;
};
};
+
+ i2c_sensors: i2c-sensors {
+ compatible = "i2c-gpio";
+
+ sda-gpios = <&tlmm 31 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 32 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&sensors_i2c_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ accelerometer: accelerometer@1d {
+ compatible = "st,lis2hh12";
+ reg = <0x1d>;
+
+ interrupts-extended = <&tlmm 115 IRQ_TYPE_LEVEL_HIGH>;
+
+ pinctrl-0 = <&accel_int_default>;
+ pinctrl-names = "default";
+
+ st,drdy-int-pin = <1>;
+ };
+ };
+};
+
+&blsp_i2c5 {
+ status = "okay";
+
+ touchscreen: touchscreen@50 {
+ compatible = "imagis,ist3038c";
+ reg = <0x50>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+
+ touchscreen-size-x = <720>;
+ touchscreen-size-y = <1280>;
+
+ vddio-supply = <&pm8916_l6>;
+
+ pinctrl-0 = <&tsp_int_default>;
+ pinctrl-names = "default";
+ };
};
&blsp_uart2 {
status = "okay";
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5800000>;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -109,6 +160,14 @@
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
};
+&sound {
+ model = "msm8916-1mic";
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+};
+
&usb {
extcon = <&muic>, <&muic>;
status = "okay";
@@ -118,6 +177,14 @@
extcon = <&muic>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -126,7 +193,18 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
+ accel_int_default: accel-int-default-state {
+ pins = "gpio115";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
pins = "gpio52";
function = "gpio";
@@ -162,6 +240,22 @@
sdc2_cd_default: sdc2-cd-default-state {
pins = "gpio38";
function = "gpio";
+
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ sensors_i2c_default: sensors-i2c-default-state {
+ pins = "gpio31", "gpio32";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tsp_int_default: tsp-int-default-state {
+ pins = "gpio13";
+ function = "gpio";
+
drive-strength = <2>;
bias-disable;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5.dts
index 0a32d33e9778..ba8650971d6a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5.dts
@@ -10,6 +10,23 @@
chassis-type = "handset";
};
+&accelerometer {
+ vdd-supply = <&pm8916_l5>;
+ vddio-supply = <&pm8916_l5>;
+};
+
+&blsp_i2c5 {
+ status = "disabled";
+};
+
+&pm8916_codec {
+ qcom,micbias1-ext-cap;
+};
+
+&touchscreen {
+ /* FIXME: Missing sm5703-mfd driver to power up vdd-supply */
+};
+
&usb_hs_phy {
qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5x.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5x.dts
index 7e1326cc13c5..8b404a9cd62d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5x.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-j5x.dts
@@ -8,12 +8,53 @@
model = "Samsung Galaxy J5 (2016)";
compatible = "samsung,j5x", "qcom,msm8916";
chassis-type = "handset";
+
+ reg_vdd_tsp_a: regulator-vdd-tsp-a {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_tsp_a";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+
+ gpio = <&tlmm 108 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&tsp_ldo_en_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&accelerometer {
+ interrupts-extended = <&tlmm 49 IRQ_TYPE_LEVEL_HIGH>;
+
+ vdd-supply = <&pm8916_l6>;
+ vddio-supply = <&pm8916_l6>;
+
+ mount-matrix = "0", "-1", "0",
+ "1", "0", "0",
+ "0", "0", "-1";
};
&muic {
interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
};
+&touchscreen {
+ vdd-supply = <&reg_vdd_tsp_a>;
+};
+
+&tlmm {
+ tsp_ldo_en_default: tsp-ldo-en-default-state {
+ pins = "gpio108";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+};
+
+&accel_int_default {
+ pins = "gpio49";
+};
+
&muic_int_default {
pins = "gpio121";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-serranove.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-serranove.dts
index 15dc246e84e2..5ce8f1350abc 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-serranove.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-samsung-serranove.dts
@@ -6,6 +6,8 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -142,6 +144,12 @@
pinctrl-names = "default";
pinctrl-0 = <&muic_irq_default>;
+
+ usb_con: connector {
+ compatible = "usb-b-connector";
+ label = "micro-USB";
+ type = "micro";
+ };
};
};
@@ -199,6 +207,15 @@
pinctrl-0 = <&nfc_default>;
};
};
+
+ battery: battery {
+ compatible = "simple-battery";
+ precharge-current-microamp = <450000>;
+ constant-charge-current-max-microamp = <1000000>;
+ charge-term-current-microamp = <150000>;
+ precharge-upper-limit-microvolt = <3500000>;
+ constant-charge-voltage-max-microvolt = <4350000>;
+ };
};
&blsp_i2c2 {
@@ -219,16 +236,16 @@
compatible = "yamaha,yas537";
reg = <0x2e>;
- mount-matrix = "0", "1", "0",
- "1", "0", "0",
- "0", "0", "-1";
+ mount-matrix = "0", "1", "0",
+ "1", "0", "0",
+ "0", "0", "-1";
};
};
&blsp_i2c4 {
status = "okay";
- battery@35 {
+ fuel-gauge@35 {
compatible = "richtek,rt5033-battery";
reg = <0x35>;
@@ -237,6 +254,8 @@
pinctrl-names = "default";
pinctrl-0 = <&fg_alert_default>;
+
+ power-supplies = <&rt5033_charger>;
};
};
@@ -261,10 +280,51 @@
};
};
+&blsp_i2c6 {
+ status = "okay";
+
+ pmic@34 {
+ compatible = "richtek,rt5033";
+ reg = <0x34>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <62 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int_default>;
+
+ regulators {
+ rt5033_reg_safe_ldo: SAFE_LDO {
+ regulator-min-microvolt = <4900000>;
+ regulator-max-microvolt = <4900000>;
+ regulator-always-on;
+ };
+ rt5033_reg_ldo: LDO {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+ rt5033_reg_buck: BUCK {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+ };
+
+ rt5033_charger: charger {
+ compatible = "richtek,rt5033-charger";
+ monitored-battery = <&battery>;
+ richtek,usb-connector = <&usb_con>;
+ };
+ };
+};
+
&blsp_uart2 {
status = "okay";
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5a00000>;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -296,6 +356,13 @@
no-1-8-v;
};
+&sound {
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+};
+
&usb {
status = "okay";
extcon = <&muic>, <&muic>;
@@ -305,6 +372,14 @@
extcon = <&muic>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -313,6 +388,10 @@
compatible = "qcom,wcn3660b";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
fg_alert_default: fg-alert-default-state {
pins = "gpio121";
@@ -387,6 +466,14 @@
bias-disable;
};
+ pmic_int_default: pmic-int-default-state {
+ pins = "gpio62";
+ function = "gpio";
+
+ drive-strength = <2>;
+ bias-disable;
+ };
+
tkey_default: tkey-default-state {
pins = "gpio98";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-uf896.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-uf896.dts
index 6fe1850ba20e..f34997500891 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-uf896.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-uf896.dts
@@ -13,16 +13,16 @@
gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
};
-&led_r {
- gpios = <&tlmm 82 GPIO_ACTIVE_HIGH>;
+&led_b {
+ gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
};
&led_g {
gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>;
};
-&led_b {
- gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
+&led_r {
+ gpios = <&tlmm 82 GPIO_ACTIVE_HIGH>;
};
&button_default {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-ufi001c.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-ufi001c.dts
index 16d4a91022be..6cb3911ba1c9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-ufi001c.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-thwc-ufi001c.dts
@@ -13,16 +13,16 @@
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
};
-&led_r {
- gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
+&led_b {
+ gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
};
&led_g {
gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
};
-&led_b {
- gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+&led_r {
+ gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
};
&mpss {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-ufi.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916-ufi.dtsi
index 004a129a2ee2..c77ed04bb6c3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-ufi.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-ufi.dtsi
@@ -17,18 +17,6 @@
stdout-path = "serial0";
};
- reserved-memory {
- mpss_mem: mpss@86800000 {
- reg = <0x0 0x86800000 0x0 0x5500000>;
- no-map;
- };
-
- gps_mem: gps@8bd00000 {
- reg = <0x0 0x8bd00000 0x0 0x200000>;
- no-map;
- };
- };
-
gpio-keys {
compatible = "gpio-keys";
@@ -92,10 +80,19 @@
clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
};
+&mba_mem {
+ status = "okay";
+};
+
&mpss {
status = "okay";
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5500000>;
+ status = "okay";
+};
+
&pm8916_usbin {
status = "okay";
};
@@ -115,6 +112,14 @@
extcon = <&pm8916_usbin>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -123,6 +128,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
/* pins are board-specific */
button_default: button-default-state {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-wingtech-wt88047.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-wingtech-wt88047.dts
index c94d36b38651..510b3b3c4e3c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-wingtech-wt88047.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-wingtech-wt88047.dts
@@ -6,6 +6,8 @@
/dts-v1/;
#include "msm8916-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
@@ -25,6 +27,28 @@
stdout-path = "serial0";
};
+ speaker_amp: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "Speaker Amp";
+ pinctrl-0 = <&speaker_amp_default>;
+ pinctrl-names = "default";
+ };
+
+ /*
+ * This seems to be actually an analog switch that either routes audio
+ * to the headphone jack or nowhere. Given that we need to enable a GPIO
+ * to get sound on headphones, modelling it as simple-audio-amplifier
+ * works just fine.
+ */
+ headphones_switch: audio-switch {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "Headphones Switch";
+ pinctrl-0 = <&headphones_switch_default>;
+ pinctrl-names = "default";
+ };
+
flash-led-controller {
compatible = "ocs,ocp8110";
enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
@@ -56,7 +80,7 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
};
@@ -118,6 +142,7 @@
#size-cells = <0>;
vcc-supply = <&pm8916_l16>;
+ vio-supply = <&pm8916_l5>;
led@0 {
reg = <0>;
@@ -146,6 +171,18 @@
status = "okay";
};
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5100000>;
+};
+
+&pm8916_codec {
+ qcom,micbias1-ext-cap;
+ qcom,micbias-lvl = <2800>;
+ qcom,mbhc-vthreshold-low = <75 100 120 180 500>;
+ qcom,mbhc-vthreshold-high = <75 100 120 180 500>;
+ qcom,hphl-jack-type-normally-open;
+};
+
&pm8916_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -180,6 +217,30 @@
non-removable;
};
+&sound {
+ /*
+ * Provide widgets/pin-switches to allow enabling speaker and headphones
+ * separately. Both are routed via the HPH_L/HPH_R pins of the codec.
+ */
+ model = "wt88047";
+ widgets =
+ "Speaker", "Speaker",
+ "Headphone", "Headphones";
+ pin-switches = "Speaker", "Headphones";
+ audio-routing =
+ "Speaker", "Speaker Amp OUTL",
+ "Speaker", "Speaker Amp OUTR",
+ "Speaker Amp INL", "HPH_R",
+ "Speaker Amp INR", "HPH_R",
+ "Headphones", "Headphones Switch OUTL",
+ "Headphones", "Headphones Switch OUTR",
+ "Headphones Switch INL", "HPH_L",
+ "Headphones Switch INR", "HPH_R",
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2";
+ aux-devs = <&speaker_amp>, <&headphones_switch>;
+};
+
&usb {
status = "okay";
extcon = <&usb_id>, <&usb_id>;
@@ -189,6 +250,14 @@
extcon = <&usb_id>;
};
+&venus {
+ status = "okay";
+};
+
+&venus_mem {
+ status = "okay";
+};
+
&wcnss {
status = "okay";
};
@@ -197,6 +266,10 @@
compatible = "qcom,wcn3620";
};
+&wcnss_mem {
+ status = "okay";
+};
+
&tlmm {
camera_flash_default: camera-flash-default-state {
pins = "gpio31", "gpio32";
@@ -214,6 +287,13 @@
bias-pull-up;
};
+ headphones_switch_default: headphones-switch-default-state {
+ pins = "gpio8";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
imu_default: imu-default-state {
pins = "gpio115";
function = "gpio";
@@ -222,6 +302,13 @@
bias-disable;
};
+ speaker_amp_default: speaker-amp-default-state {
+ pins = "gpio117";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
touchscreen_default: touchscreen-default-state {
touchscreen-pins {
pins = "gpio13";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916-yiming-uz801v3.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8916-yiming-uz801v3.dts
index 5e6ba8c58bb5..a98efcfe78b7 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916-yiming-uz801v3.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916-yiming-uz801v3.dts
@@ -13,16 +13,16 @@
gpios = <&tlmm 23 GPIO_ACTIVE_LOW>;
};
-&led_r {
- gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
+&led_b {
+ gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
};
&led_g {
gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
};
-&led_b {
- gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+&led_r {
+ gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
};
&button_default {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8916.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8916.dtsi
index 7582c7d748fe..e423c57ddd41 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8916.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8916.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/reset/qcom,gcc-msm8916.h>
+#include <dt-bindings/soc/qcom,apr.h>
#include <dt-bindings/thermal/thermal.h>
/ {
@@ -74,23 +75,43 @@
};
mpss_mem: mpss@86800000 {
- reg = <0x0 0x86800000 0x0 0x2b00000>;
+ /*
+ * The memory region for the mpss firmware is generally
+ * relocatable and could be allocated dynamically.
+ * However, many firmware versions tend to fail when
+ * loaded to some special addresses, so it is hard to
+ * define reliable alloc-ranges.
+ *
+ * alignment = <0x0 0x400000>;
+ * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
+ */
+ reg = <0x0 0x86800000 0x0 0>; /* size is device-specific */
no-map;
+ status = "disabled";
};
- wcnss_mem: wcnss@89300000 {
- reg = <0x0 0x89300000 0x0 0x600000>;
+ wcnss_mem: wcnss {
+ size = <0x0 0x600000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
+ status = "disabled";
};
- venus_mem: venus@89900000 {
- reg = <0x0 0x89900000 0x0 0x600000>;
+ venus_mem: venus {
+ size = <0x0 0x500000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
+ status = "disabled";
};
- mba_mem: mba@8ea00000 {
+ mba_mem: mba {
+ size = <0x0 0x100000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
- reg = <0 0x8ea00000 0 0x100000>;
+ status = "disabled";
};
};
@@ -282,10 +303,10 @@
};
};
- smd {
- compatible = "qcom,smd";
+ rpm: remoteproc {
+ compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc";
- rpm {
+ smd-edge {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs 8 0>;
qcom,smd-edge = <15>;
@@ -519,9 +540,6 @@
compatible = "qcom,msm8916-bimc";
reg = <0x00400000 0x62000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
};
tsens: thermal-sensor@4a9000 {
@@ -554,18 +572,12 @@
compatible = "qcom,msm8916-pcnoc";
reg = <0x00500000 0x11000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_PCNOC_CLK>,
- <&rpmcc RPM_SMD_PCNOC_A_CLK>;
};
snoc: interconnect@580000 {
compatible = "qcom,msm8916-snoc";
reg = <0x00580000 0x14000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
};
stm: stm@802000 {
@@ -1712,6 +1724,14 @@
ports {
#address-cells = <1>;
#size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ };
+
+ port@1 {
+ reg = <1>;
+ };
};
};
@@ -1742,7 +1762,7 @@
};
};
- gpu@1c00000 {
+ gpu: gpu@1c00000 {
compatible = "qcom,adreno-306.0", "qcom,adreno";
reg = <0x01c00000 0x20000>;
reg-names = "kgsl_3d0_reg_memory";
@@ -1765,6 +1785,7 @@
power-domains = <&gcc OXILI_GDSC>;
operating-points-v2 = <&gpu_opp_table>;
iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+ status = "disabled";
gpu_opp_table: opp-table {
compatible = "operating-points-v2";
@@ -1789,7 +1810,7 @@
clock-names = "core", "iface", "bus";
iommus = <&apps_iommu 5>;
memory-region = <&venus_mem>;
- status = "okay";
+ status = "disabled";
video-decoder {
compatible = "venus-decoder";
@@ -1805,7 +1826,7 @@
#size-cells = <1>;
#iommu-cells = <1>;
compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
- ranges = <0 0x01e20000 0x40000>;
+ ranges = <0 0x01e20000 0x20000>;
reg = <0x01ef0000 0x3000>;
clocks = <&gcc GCC_SMMU_CFG_CLK>,
<&gcc GCC_APSS_TCU_CLK>;
@@ -1960,6 +1981,54 @@
label = "hexagon";
+ apr: apr {
+ compatible = "qcom,apr-v2";
+ qcom,smd-channels = "apr_audio_svc";
+ qcom,domain = <APR_DOMAIN_ADSP>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ q6core: service@3 {
+ compatible = "qcom,q6core";
+ reg = <APR_SVC_ADSP_CORE>;
+ };
+
+ q6afe: service@4 {
+ compatible = "qcom,q6afe";
+ reg = <APR_SVC_AFE>;
+
+ q6afedai: dais {
+ compatible = "qcom,q6afe-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ };
+ };
+
+ q6asm: service@7 {
+ compatible = "qcom,q6asm";
+ reg = <APR_SVC_ASM>;
+
+ q6asmdai: dais {
+ compatible = "qcom,q6asm-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ };
+ };
+
+ q6adm: service@8 {
+ compatible = "qcom,q6adm";
+ reg = <APR_SVC_ADM>;
+
+ q6routing: routing {
+ compatible = "qcom,q6adm-routing";
+ #sound-dai-cells = <0>;
+ };
+ };
+ };
+
fastrpc {
compatible = "qcom,fastrpc";
qcom,smd-channels = "fastrpcsmd-apps-dsp";
@@ -2077,6 +2146,7 @@
clock-names = "bam_clk";
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,controlled-remotely;
};
blsp_uart1: serial@78af000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8939-huawei-kiwi.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8939-huawei-kiwi.dts
new file mode 100644
index 000000000000..3cec51891aed
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8939-huawei-kiwi.dts
@@ -0,0 +1,242 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8939-pm8916.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Huawei Honor 5X / GR5 (2016)";
+ compatible = "huawei,kiwi", "qcom,msm8939";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &sdhc_1; /* SDC1 eMMC slot */
+ mmc1 = &sdhc_2; /* SDC2 SD card slot */
+ serial0 = &blsp_uart2;
+ };
+
+ chosen {
+ stdout-path = "serial0";
+ };
+
+ reserved-memory {
+ qseecom_mem: qseecom@84a00000 {
+ reg = <0x0 0x84a00000 0x0 0x1600000>;
+ no-map;
+ };
+ };
+
+ gpio-hall-sensor {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_hall_sensor_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Hall Effect Sensor";
+
+ event-hall-sensor {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Buttons";
+
+ button-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ usb_id: usb-id {
+ compatible = "linux,extcon-usb-gpio";
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&usb_id_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&blsp_i2c2 {
+ status = "okay";
+
+ accelerometer@1e {
+ compatible = "kionix,kx023-1025";
+ reg = <0x1e>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l6>;
+ pinctrl-0 = <&accel_int_default>;
+ pinctrl-names = "default";
+ mount-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "1";
+ };
+
+ proximity@39 {
+ compatible = "avago,apds9930";
+ reg = <0x39>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <113 IRQ_TYPE_EDGE_FALLING>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l6>;
+
+ led-max-microamp = <25000>;
+ amstaos,proximity-diodes = <0>;
+
+ pinctrl-0 = <&prox_irq_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&blsp_i2c5 {
+ status = "okay";
+
+ touchscreen@1c {
+ compatible = "cypress,tt21000";
+
+ reg = <0x1c>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+
+ reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
+
+ /*
+ * NOTE: vdd is not directly supplied by pm8916_l16, it seems to be a
+ * fixed regulator that is automatically enabled by pm8916_l16.
+ */
+ vdd-supply = <&pm8916_l16>;
+ vddio-supply = <&pm8916_l16>;
+
+ pinctrl-0 = <&touchscreen_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&blsp_uart2 {
+ status = "okay";
+};
+
+&pm8916_l8 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+};
+
+&pm8916_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm8916_rpm_regulators {
+ pm8916_l16: l16 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8916_l17: l17 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+};
+
+&pm8916_vib {
+ status = "okay";
+};
+
+&sdhc_1 {
+ status = "okay";
+};
+
+&sdhc_2 {
+ pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
+ pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
+ pinctrl-names = "default", "sleep";
+
+ cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+
+ status = "okay";
+};
+
+&usb {
+ extcon = <&usb_id>, <&usb_id>;
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&usb_id>;
+};
+
+&wcnss {
+ status = "okay";
+};
+
+&wcnss_iris {
+ compatible = "qcom,wcn3620";
+};
+
+&wcnss_mem {
+ status = "okay";
+};
+
+&tlmm {
+ accel_int_default: accel-int-default-state {
+ pins = "gpio115";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ gpio_hall_sensor_default: gpio-hall-sensor-default-state {
+ pins = "gpio69";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio107";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ prox_irq_default: prox-irq-default-state {
+ pins = "gpio113";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ sdc2_cd_default: sdc2-cd-default-state {
+ pins = "gpio38";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ touchscreen_default: touchscreen-default-state {
+ pins = "gpio12", "gpio13";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ usb_id_default: usb-id-default-state {
+ pins = "gpio110";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8939-longcheer-l9100.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8939-longcheer-l9100.dts
new file mode 100644
index 000000000000..e3404c4455cf
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8939-longcheer-l9100.dts
@@ -0,0 +1,390 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8939-pm8916.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
+
+/ {
+ model = "BQ Aquaris M5 (Longcheer L9100)";
+ compatible = "longcheer,l9100", "qcom,msm8939";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &sdhc_1; /* eMMC */
+ mmc1 = &sdhc_2; /* SD card */
+ serial0 = &blsp_uart2;
+ };
+
+ chosen {
+ stdout-path = "serial0";
+ };
+
+ gpio-hall-sensor {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_hall_sensor_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Hall Effect Sensor";
+
+ event-hall-sensor {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Buttons";
+
+ button-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_WHITE>;
+ default-state = "off";
+ function = LED_FUNCTION_KBD_BACKLIGHT;
+
+ pinctrl-0 = <&button_backlight_default>;
+ pinctrl-names = "default";
+ };
+ };
+
+ reg_ts_vdd: regulator-vdd-ts {
+ compatible = "regulator-fixed";
+ regulator-name = "regulator-vdd-ts";
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+
+ gpio = <&tlmm 78 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&ts_vdd_default>;
+ pinctrl-names = "default";
+ };
+
+ backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pm8916_pwm 0 100000>;
+ brightness-levels = <0 255>;
+ num-interpolated-steps = <255>;
+ default-brightness-level = <128>;
+ enable-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&lcd_bl_en_default>;
+ pinctrl-names = "default";
+ };
+
+ flash-led-controller {
+ compatible = "ocs,ocp8110";
+ flash-gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&camera_front_flash_default>;
+ pinctrl-names = "default";
+
+ led {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ flash-max-timeout-us = <250000>;
+ };
+ };
+
+ usb_id: usb-id {
+ compatible = "linux,extcon-usb-gpio";
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&usb_id_default &usb_id_switch_default>;
+ pinctrl-names = "default";
+ };
+
+};
+
+&blsp_i2c2 {
+ status = "okay";
+
+ led-controller@30 {
+ compatible = "kinetic,ktd2026";
+ reg = <0x30>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vin-supply = <&pm8916_l17>;
+ vio-supply = <&pm8916_l6>;
+
+ pinctrl-0 = <&status_led_default>;
+ pinctrl-names = "default";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+ };
+};
+
+&blsp_i2c3 {
+ status = "okay";
+
+ magnetometer@d {
+ compatible = "asahi-kasei,ak09911";
+ reg = <0x0d>;
+
+ vdd-supply = <&pm8916_l17>;
+ vid-supply = <&pm8916_l6>;
+
+ reset-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&mag_reset_default>;
+ pinctrl-names = "default";
+ };
+
+ light-sensor@23 {
+ compatible = "liteon,ltr559";
+ reg = <0x23>;
+ proximity-near-level = <75>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l5>;
+
+ interrupts-extended = <&tlmm 113 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-0 = <&light_int_default>;
+ pinctrl-names = "default";
+ };
+
+ imu@68 {
+ compatible = "bosch,bmi160";
+ reg = <0x68>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l6>;
+ };
+};
+
+&blsp_i2c5 {
+ status = "okay";
+
+ touchscreen@4a {
+ compatible = "atmel,maxtouch";
+ reg = <0x4a>;
+
+ interrupts-extended = <&tlmm 13 IRQ_TYPE_LEVEL_LOW>;
+
+ reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
+
+ vdda-supply = <&pm8916_l6>;
+ vdd-supply = <&reg_ts_vdd>;
+
+ pinctrl-0 = <&ts_int_reset_default>;
+ pinctrl-names = "default";
+
+ /* Keys listed from right to left */
+ linux,keycodes = <KEY_APPSELECT KEY_HOMEPAGE KEY_BACK>;
+ };
+};
+
+&blsp_uart2 {
+ status = "okay";
+};
+
+&pm8916_gpios {
+ status_led_default: status-led-default-state {
+ pins = "gpio3";
+ function = PMIC_GPIO_FUNC_NORMAL;
+ power-source = <PM8916_GPIO_VPH>;
+ bias-disable;
+ output-high;
+ };
+};
+
+&pm8916_mpps {
+ pwm_out: mpp4-state {
+ pins = "mpp4";
+ function = "digital";
+ power-source = <PM8916_MPP_VPH>;
+ output-low;
+ qcom,dtest = <1>;
+ };
+};
+
+&pm8916_pwm {
+ pinctrl-0 = <&pwm_out>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&pm8916_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm8916_rpm_regulators {
+ pm8916_l17: l17 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+};
+
+&pm8916_vib {
+ status = "okay";
+};
+
+&sdhc_1 {
+ status = "okay";
+};
+
+&sdhc_2 {
+ pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
+ pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
+ pinctrl-names = "default", "sleep";
+
+ cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
+&usb {
+ extcon = <&usb_id>, <&usb_id>;
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&usb_id>;
+};
+
+&wcnss {
+ status = "okay";
+};
+
+&wcnss_iris {
+ compatible = "qcom,wcn3620";
+};
+
+&wcnss_mem {
+ status = "okay";
+};
+
+&tlmm {
+ button_backlight_default: button-backlight-default-state {
+ pins = "gpio17";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ camera_front_flash_default: camera-front-flash-default-state {
+ pins = "gpio8", "gpio49";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ gpio_hall_sensor_default: gpio-hall-sensor-default-state {
+ pins = "gpio20";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio107";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ lcd_bl_en_default: lcd-bl-en-default-state {
+ pins = "gpio98";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ light_int_default: light-int-default-state {
+ pins = "gpio113";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ mag_reset_default: mag-reset-default-state {
+ pins = "gpio68";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ sdc2_cd_default: sdc2-cd-default-state {
+ pins = "gpio38";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ ts_int_reset_default: ts-int-reset-default-state {
+ pins = "gpio12", "gpio13";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ ts_vdd_default: ts-vdd-default-state {
+ pins = "gpio78";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ usb_id_default: usb-id-default-state {
+ pins = "gpio110";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ usb_id_switch_default: usb-id-switch-default-state {
+ pins = "gpio121";
+ function = "gpio";
+ drive-strength = <2>;
+ output-high;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8939-samsung-a7.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8939-samsung-a7.dts
new file mode 100644
index 000000000000..aa6c39482a2f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8939-samsung-a7.dts
@@ -0,0 +1,569 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8939-pm8916.dtsi"
+#include "msm8916-modem-qdsp6.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/sound/apq8016-lpass.h>
+
+/ {
+ model = "Samsung Galaxy A7 (2015)";
+ compatible = "samsung,a7", "qcom,msm8939";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &sdhc_1; /* SDC1 eMMC slot */
+ mmc1 = &sdhc_2; /* SDC2 SD card slot */
+ serial0 = &blsp_uart2;
+ };
+
+ chosen {
+ stdout-path = "serial0";
+ };
+
+ reserved-memory {
+ /* Additional memory used by Samsung firmware modifications */
+ tz-apps@85500000 {
+ reg = <0x0 0x85500000 0x0 0xb00000>;
+ no-map;
+ };
+ };
+
+ gpio-hall-sensor {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_hall_sensor_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Hall Effect Sensor";
+
+ event-hall-sensor {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_keys_default>;
+ pinctrl-names = "default";
+
+ label = "GPIO Buttons";
+
+ button-volume-up {
+ label = "Volume Up";
+ gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ };
+
+ button-home {
+ label = "Home";
+ gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_HOMEPAGE>;
+ };
+ };
+
+ i2c-fg {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&fg_i2c_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ battery@35 {
+ compatible = "richtek,rt5033-battery";
+ reg = <0x35>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
+
+ pinctrl-0 = <&fg_alert_default>;
+ pinctrl-names = "default";
+ };
+ };
+
+ i2c-nfc {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&nfc_i2c_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nfc@2b {
+ compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
+ reg = <0x2b>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <21 IRQ_TYPE_EDGE_RISING>;
+
+ enable-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>;
+ firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&nfc_default>;
+ pinctrl-names = "default";
+ };
+ };
+
+ i2c-sensor {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 84 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 85 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&sensor_i2c_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ accelerometer: accelerometer@10 {
+ compatible = "bosch,bmc150_accel";
+ reg = <0x10>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <115 IRQ_TYPE_EDGE_RISING>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l5>;
+
+ pinctrl-0 = <&accel_int_default>;
+ pinctrl-names = "default";
+
+ mount-matrix = "-1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "1";
+ };
+
+ magnetometer@12 {
+ compatible = "bosch,bmc150_magn";
+ reg = <0x12>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l5>;
+ };
+ };
+
+ i2c-tkey {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ pinctrl-0 = <&tkey_i2c_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchkey@20 {
+ /* Note: Actually an ABOV MCU that implements same interface */
+ compatible = "coreriver,tc360-touchkey";
+ reg = <0x20>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
+
+ vcc-supply = <&reg_touch_key>;
+ vdd-supply = <&reg_keyled>;
+ vddio-supply = <&pm8916_l6>;
+
+ linux,keycodes = <KEY_APPSELECT KEY_BACK>;
+
+ pinctrl-0 = <&tkey_default>;
+ pinctrl-names = "default";
+ };
+ };
+
+ pwm_vibrator: pwm-vibrator {
+ compatible = "clk-pwm";
+ #pwm-cells = <2>;
+
+ clocks = <&gcc GCC_GP2_CLK>;
+
+ pinctrl-0 = <&motor_pwm_default>;
+ pinctrl-names = "default";
+ };
+
+ reg_keyled: regulator-keyled {
+ compatible = "regulator-fixed";
+ regulator-name = "keyled";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ /* NOTE: On some variants e.g. SM-A700FD it's GPIO 91 */
+ gpio = <&tlmm 100 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&tkey_led_en_default>;
+ pinctrl-names = "default";
+ };
+
+ reg_touch_key: regulator-touch-key {
+ compatible = "regulator-fixed";
+ regulator-name = "touch_key";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+
+ gpio = <&tlmm 56 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&tkey_en_default>;
+ pinctrl-names = "default";
+ };
+
+ reg_tsp_vdd: regulator-tsp-vdd {
+ compatible = "regulator-fixed";
+ regulator-name = "tsp_vdd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&pm8916_s4>;
+
+ gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&reg_tsp_io_en_default>;
+ pinctrl-names = "default";
+ };
+
+ reg_vdd_tsp: regulator-vdd-tsp {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_tsp";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&reg_tsp_en_default>;
+ pinctrl-names = "default";
+ };
+
+ reg_vibrator: regulator-vibrator {
+ compatible = "regulator-fixed";
+ regulator-name = "motor_en";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+
+ gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&motor_en_default>;
+ pinctrl-names = "default";
+ };
+
+ vibrator {
+ compatible = "pwm-vibrator";
+
+ pwms = <&pwm_vibrator 0 100000>;
+ pwm-names = "enable";
+
+ vcc-supply = <&reg_vibrator>;
+ };
+};
+
+&blsp_i2c1 {
+ status = "okay";
+
+ muic: extcon@25 {
+ compatible = "siliconmitus,sm5502-muic";
+ reg = <0x25>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-0 = <&muic_int_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&blsp_i2c2 {
+ status = "okay";
+
+ speaker_codec: audio-codec@34 {
+ compatible = "nxp,tfa9895";
+ reg = <0x34>;
+ vddd-supply = <&pm8916_l5>;
+ sound-name-prefix = "Speaker";
+ #sound-dai-cells = <0>;
+ };
+};
+
+&blsp_i2c5 {
+ status = "okay";
+
+ touchscreen@24 {
+ compatible = "cypress,tt21000";
+
+ reg = <0x24>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+
+ vdd-supply = <&reg_vdd_tsp>;
+ vddio-supply = <&reg_tsp_vdd>;
+
+ pinctrl-0 = <&tsp_int_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&blsp_uart2 {
+ status = "okay";
+};
+
+/*
+ * For some reason the speaker amplifier is connected to the second SD line
+ * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the
+ * device tree, otherwise audio will seemingly play fine on the wrong SD line
+ * but the speaker stays silent.
+ *
+ * When routing audio via QDSP6 (the default) the &lpass node is reserved and
+ * the definitions from &q6afedai are used. When the modem is disabled audio can
+ * be alternatively routed directly to the LPASS hardware with reduced latency.
+ * The definitions for &lpass are here for completeness to simplify changing the
+ * setup with minor changes to the DT (either manually or with DT overlays).
+ */
+&lpass {
+ dai-link@3 {
+ reg = <MI2S_QUATERNARY>;
+ qcom,playback-sd-lines = <1>;
+ };
+};
+
+&mpss_mem {
+ reg = <0x0 0x86800000 0x0 0x5800000>;
+};
+
+&pm8916_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm8916_rpm_regulators {
+ pm8916_l17: l17 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+};
+
+&q6afedai {
+ dai@22 {
+ reg = <QUATERNARY_MI2S_RX>;
+ qcom,sd-lines = <1>;
+ };
+};
+
+&sdhc_1 {
+ status = "okay";
+};
+
+&sdhc_2 {
+ pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
+ pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
+ pinctrl-names = "default", "sleep";
+
+ cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
+&sound {
+ model = "samsung-a2015";
+ audio-routing =
+ "AMIC1", "MIC BIAS External1",
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+
+ pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
+ pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ sound_link_backend2: backend2-dai-link {
+ link-name = "Quaternary MI2S";
+
+ cpu {
+ sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
+ };
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ codec {
+ sound-dai = <&speaker_codec>;
+ };
+ };
+};
+
+&usb {
+ extcon = <&muic>, <&muic>;
+ status = "okay";
+};
+
+&usb_hs_phy {
+ extcon = <&muic>;
+};
+
+&wcnss {
+ status = "okay";
+};
+
+&wcnss_iris {
+ compatible = "qcom,wcn3660b";
+};
+
+&wcnss_mem {
+ status = "okay";
+};
+
+&tlmm {
+ accel_int_default: accel-int-default-state {
+ pins = "gpio115";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ fg_alert_default: fg-alert-default-state {
+ pins = "gpio121";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ fg_i2c_default: fg-i2c-default-state {
+ pins = "gpio105", "gpio106";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ gpio_hall_sensor_default: gpio-hall-sensor-default-state {
+ pins = "gpio52";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ gpio_keys_default: gpio-keys-default-state {
+ pins = "gpio107", "gpio109";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ motor_en_default: motor-en-default-state {
+ pins = "gpio86";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ motor_pwm_default: motor-pwm-default-state {
+ pins = "gpio50";
+ function = "gcc_gp2_clk_a";
+ };
+
+ muic_int_default: muic-int-default-state {
+ pins = "gpio12";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ nfc_default: nfc-default-state {
+ irq-pins {
+ pins = "gpio21";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ nfc-pins {
+ pins = "gpio49", "gpio116";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
+ nfc_i2c_default: nfc-i2c-default-state {
+ pins = "gpio0", "gpio1";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ reg_tsp_en_default: reg-tsp-en-default-state {
+ pins = "gpio73";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ reg_tsp_io_en_default: reg-tsp-io-en-default-state {
+ pins = "gpio8";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ sdc2_cd_default: sdc2-cd-default-state {
+ pins = "gpio38";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ sensor_i2c_default: sensor-i2c-default-state {
+ pins = "gpio84", "gpio85";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tkey_default: tkey-default-state {
+ pins = "gpio20";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tkey_en_default: tkey-en-default-state {
+ pins = "gpio56";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tkey_i2c_default: tkey-i2c-default-state {
+ pins = "gpio16", "gpio17";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tkey_led_en_default: tkey-led-en-default-state {
+ pins = "gpio100";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tsp_int_default: tsp-int-default-state {
+ pins = "gpio13";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8939-sony-xperia-kanuti-tulip.dts
index 8613cf93dac5..eeb4d578c6fa 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8939-sony-xperia-kanuti-tulip.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8939-sony-xperia-kanuti-tulip.dts
@@ -16,6 +16,7 @@
/ {
model = "Sony Xperia M4 Aqua";
compatible = "sony,kanuti-tulip", "qcom,msm8939";
+ chassis-type = "handset";
qcom,board-id = <QCOM_BOARD_ID_MTP 0>;
qcom,msm-id = <QCOM_ID_MSM8939 0>, <QCOM_ID_MSM8939 0x30000>;
@@ -32,12 +33,16 @@
usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&usb_id_default>;
pinctrl-names = "default";
};
};
+&gpu {
+ status = "okay";
+};
+
&mdss {
status = "okay";
};
@@ -86,3 +91,7 @@
&wcnss_iris {
compatible = "qcom,wcn3660";
};
+
+&wcnss_mem {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8939.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8939.dtsi
index 895cafc11480..82d85ff61045 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8939.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8939.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/reset/qcom,gcc-msm8939.h>
+#include <dt-bindings/soc/qcom,apr.h>
#include <dt-bindings/thermal/thermal.h>
/ {
@@ -55,6 +56,7 @@
L2_1: l2-cache {
compatible = "cache";
cache-level = <2>;
+ cache-unified;
};
};
@@ -111,6 +113,7 @@
L2_0: l2-cache {
compatible = "cache";
cache-level = <2>;
+ cache-unified;
};
};
@@ -155,7 +158,7 @@
idle-states {
CPU_SLEEP_0: cpu-sleep-0 {
- compatible ="qcom,idle-state-spc", "arm,idle-state";
+ compatible = "arm,idle-state";
entry-latency-us = <130>;
exit-latency-us = <150>;
min-residency-us = <2000>;
@@ -240,6 +243,62 @@
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
};
+ rpm: remoteproc {
+ compatible = "qcom,msm8936-rpm-proc", "qcom,rpm-proc";
+
+ smd-edge {
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,ipc = <&apcs1_mbox 8 0>;
+ qcom,smd-edge = <15>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8936";
+ qcom,smd-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8936", "qcom,rpmcc";
+ #clock-cells = <1>;
+ clock-names = "xo";
+ clocks = <&xo_board>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,msm8939-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <1>;
+ };
+
+ rpmpd_opp_svs_krait: opp2 {
+ opp-level = <2>;
+ };
+
+ rpmpd_opp_svs_soc: opp3 {
+ opp-level = <3>;
+ };
+
+ rpmpd_opp_nom: opp4 {
+ opp-level = <4>;
+ };
+
+ rpmpd_opp_turbo: opp5 {
+ opp-level = <5>;
+ };
+
+ rpmpd_opp_super_turbo: opp6 {
+ opp-level = <6>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -288,79 +347,43 @@
};
mpss_mem: mpss@86800000 {
- reg = <0x0 0x86800000 0x0 0x5500000>;
+ /*
+ * The memory region for the mpss firmware is generally
+ * relocatable and could be allocated dynamically.
+ * However, many firmware versions tend to fail when
+ * loaded to some special addresses, so it is hard to
+ * define reliable alloc-ranges.
+ *
+ * alignment = <0x0 0x400000>;
+ * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
+ */
+ reg = <0x0 0x86800000 0x0 0>; /* size is device-specific */
no-map;
+ status = "disabled";
};
- wcnss_mem: wcnss@8bd00000 {
- reg = <0x0 0x8bd00000 0x0 0x600000>;
+ wcnss_mem: wcnss {
+ size = <0x0 0x600000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
+ status = "disabled";
};
- venus_mem: venus@8c300000 {
- reg = <0x0 0x8c300000 0x0 0x800000>;
+ venus_mem: venus {
+ size = <0x0 0x500000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
+ status = "disabled";
};
- mba_mem: mba@8cb00000 {
- reg = <0x0 0x8cb00000 0x0 0x100000>;
+ mba_mem: mba {
+ size = <0x0 0x100000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
- };
- };
-
- smd {
- compatible = "qcom,smd";
-
- rpm {
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs1_mbox 8 0>;
- qcom,smd-edge = <15>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8936";
- qcom,smd-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8936", "qcom,rpmcc";
- #clock-cells = <1>;
- clock-names = "xo";
- clocks = <&xo_board>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,msm8939-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <1>;
- };
-
- rpmpd_opp_svs_krait: opp2 {
- opp-level = <2>;
- };
-
- rpmpd_opp_svs_soc: opp3 {
- opp-level = <3>;
- };
-
- rpmpd_opp_nom: opp4 {
- opp-level = <4>;
- };
-
- rpmpd_opp_turbo: opp5 {
- opp-level = <5>;
- };
-
- rpmpd_opp_super_turbo: opp6 {
- opp-level = <6>;
- };
- };
- };
- };
+ status = "disabled";
};
};
@@ -386,8 +409,6 @@
interrupt-controller;
#interrupt-cells = <2>;
- #address-cells = <0>;
- #size-cells = <0>;
};
};
@@ -581,9 +602,6 @@
bimc: interconnect@400000 {
compatible = "qcom,msm8939-bimc";
reg = <0x00400000 0x62000>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
#interconnect-cells = <1>;
};
@@ -627,25 +645,16 @@
pcnoc: interconnect@500000 {
compatible = "qcom,msm8939-pcnoc";
reg = <0x00500000 0x11000>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_PCNOC_CLK>,
- <&rpmcc RPM_SMD_PCNOC_A_CLK>;
#interconnect-cells = <1>;
};
snoc: interconnect@580000 {
compatible = "qcom,msm8939-snoc";
reg = <0x00580000 0x14080>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
#interconnect-cells = <1>;
snoc_mm: interconnect-snoc {
compatible = "qcom,msm8939-snoc-mm";
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SYSMMNOC_CLK>,
- <&rpmcc RPM_SMD_SYSMMNOC_A_CLK>;
#interconnect-cells = <1>;
};
};
@@ -1395,7 +1404,7 @@
};
};
- gpu@1c00000 {
+ gpu: gpu@1c00000 {
compatible = "qcom,adreno-405.0", "qcom,adreno";
reg = <0x01c00000 0x10000>;
reg-names = "kgsl_3d0_reg_memory";
@@ -1418,6 +1427,7 @@
power-domains = <&gcc OXILI_GDSC>;
operating-points-v2 = <&opp_table>;
iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+ status = "disabled";
opp_table: opp-table {
compatible = "operating-points-v2";
@@ -1447,7 +1457,7 @@
apps_iommu: iommu@1ef0000 {
compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
reg = <0x01ef0000 0x3000>;
- ranges = <0 0x01e20000 0x40000>;
+ ranges = <0 0x01e20000 0x20000>;
clocks = <&gcc GCC_SMMU_CFG_CLK>,
<&gcc GCC_APSS_TCU_CLK>;
clock-names = "iface", "bus";
@@ -1516,6 +1526,20 @@
#interrupt-cells = <4>;
};
+ bam_dmux_dma: dma-controller@4044000 {
+ compatible = "qcom,bam-v1.7.0";
+ reg = <0x04044000 0x19000>;
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+
+ num-channels = <6>;
+ qcom,num-ees = <1>;
+ qcom,powered-remotely;
+
+ status = "disabled";
+ };
+
mpss: remoteproc@4080000 {
compatible = "qcom,msm8916-mss-pil";
reg = <0x04080000 0x100>, <0x04020000 0x040>;
@@ -1548,6 +1572,22 @@
qcom,halt-regs = <&tcsr 0x18000 0x19000 0x1a000>;
status = "disabled";
+ bam_dmux: bam-dmux {
+ compatible = "qcom,bam-dmux";
+
+ interrupt-parent = <&hexagon_smsm>;
+ interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "pc", "pc-ack";
+
+ qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>;
+ qcom,smem-state-names = "pc", "pc-ack";
+
+ dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
mba {
memory-region = <&mba_mem>;
};
@@ -1564,6 +1604,54 @@
qcom,remote-pid = <1>;
label = "hexagon";
+
+ apr: apr {
+ compatible = "qcom,apr-v2";
+ qcom,smd-channels = "apr_audio_svc";
+ qcom,domain = <APR_DOMAIN_ADSP>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ q6core: service@3 {
+ compatible = "qcom,q6core";
+ reg = <APR_SVC_ADSP_CORE>;
+ };
+
+ q6afe: service@4 {
+ compatible = "qcom,q6afe";
+ reg = <APR_SVC_AFE>;
+
+ q6afedai: dais {
+ compatible = "qcom,q6afe-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ };
+ };
+
+ q6asm: service@7 {
+ compatible = "qcom,q6asm";
+ reg = <APR_SVC_ASM>;
+
+ q6asmdai: dais {
+ compatible = "qcom,q6asm-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ };
+ };
+
+ q6adm: service@8 {
+ compatible = "qcom,q6adm";
+ reg = <APR_SVC_ADM>;
+
+ q6routing: routing {
+ compatible = "qcom,q6adm-routing";
+ #sound-dai-cells = <0>;
+ };
+ };
+ };
};
};
@@ -1644,7 +1732,7 @@
clocks = <&gcc GCC_SDCC2_AHB_CLK>,
<&gcc GCC_SDCC2_APPS_CLK>,
<&rpmcc RPM_SMD_XO_CLK_SRC>;
- clock-names = "iface", "core", "xo";
+ clock-names = "iface", "core", "xo";
resets = <&gcc GCC_SDCC2_BCR>;
pinctrl-0 = <&sdc2_default>;
pinctrl-1 = <&sdc2_sleep>;
@@ -1661,6 +1749,7 @@
clock-names = "bam_clk";
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,controlled-remotely;
};
blsp_uart1: serial@78af000 {
@@ -1731,7 +1820,7 @@
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
- clock-names = "core", "iface";
+ clock-names = "core", "iface";
dmas = <&blsp_dma 6>, <&blsp_dma 7>;
dma-names = "tx", "rx";
pinctrl-0 = <&blsp_i2c2_default>;
@@ -1765,7 +1854,7 @@
interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_BLSP1_QUP3_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
- clock-names = "core", "iface";
+ clock-names = "core", "iface";
dmas = <&blsp_dma 8>, <&blsp_dma 9>;
dma-names = "tx", "rx";
pinctrl-0 = <&blsp_i2c3_default>;
@@ -1799,7 +1888,7 @@
interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_BLSP1_QUP4_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
- clock-names = "core", "iface";
+ clock-names = "core", "iface";
dmas = <&blsp_dma 10>, <&blsp_dma 11>;
dma-names = "tx", "rx";
pinctrl-0 = <&blsp_i2c4_default>;
@@ -1833,7 +1922,7 @@
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
- clock-names = "core", "iface";
+ clock-names = "core", "iface";
dmas = <&blsp_dma 12>, <&blsp_dma 13>;
dma-names = "tx", "rx";
pinctrl-0 = <&blsp_i2c5_default>;
@@ -1867,7 +1956,7 @@
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_BLSP1_QUP6_I2C_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
- clock-names = "core", "iface";
+ clock-names = "core", "iface";
dmas = <&blsp_dma 14>, <&blsp_dma 15>;
dma-names = "tx", "rx";
pinctrl-0 = <&blsp_i2c6_default>;
@@ -1975,7 +2064,7 @@
};
smd-edge {
- interrupts = <GIC_SPI 142 1>;
+ interrupts = <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs1_mbox 8 17>;
qcom,smd-edge = <6>;
qcom,remote-pid = <4>;
@@ -2095,6 +2184,8 @@
#address-cells = <1>;
#size-cells = <1>;
ranges;
+ /* Necessary because firmware does not configure this correctly */
+ clock-frequency = <19200000>;
frame@b121000 {
reg = <0x0b121000 0x1000>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-daisy.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-daisy.dts
index 1d672e608653..a5957e79b818 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-daisy.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-daisy.dts
@@ -17,7 +17,7 @@
compatible = "xiaomi,daisy", "qcom,msm8953";
chassis-type = "handset";
qcom,msm-id = <293 0>;
- qcom,board-id= <0x1000b 0x9>;
+ qcom,board-id = <0x1000b 0x9>;
chosen {
#address-cells = <2>;
@@ -125,7 +125,7 @@
vmon-slot-no = <1>;
imon-slot-no = <1>;
- interleave_mode = <0>;
+ maxim,interleave-mode;
#sound-dai-cells = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-mido.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-mido.dts
index ed95d09cedb1..6b9245cd8b0c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-mido.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-mido.dts
@@ -111,6 +111,7 @@
reg = <0x45>;
vcc-supply = <&pm8953_l10>;
+ vio-supply = <&pm8953_l5>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-tissot.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-tissot.dts
index 831d3a42b583..9ac4f507e321 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-tissot.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-tissot.dts
@@ -96,7 +96,7 @@
vmon-slot-no = <1>;
imon-slot-no = <1>;
- #sound-dai-cells = <1>;
+ #sound-dai-cells = <0>;
};
led-controller@45 {
@@ -104,6 +104,7 @@
reg = <0x45>;
vcc-supply = <&pm8953_l10>;
+ vio-supply = <&pm8953_l5>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-vince.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-vince.dts
index b5be55034fd3..b0588f30f8f1 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-vince.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8953-xiaomi-vince.dts
@@ -20,7 +20,7 @@
compatible = "xiaomi,vince", "qcom,msm8953";
chassis-type = "handset";
qcom,msm-id = <293 0>;
- qcom,board-id= <0x1000b 0x08>;
+ qcom,board-id = <0x1000b 0x08>;
gpio-keys {
compatible = "gpio-keys";
@@ -113,6 +113,7 @@
reg = <0x45>;
vcc-supply = <&pm8953_l10>;
+ vio-supply = <&pm8953_l5>;
#address-cells = <1>;
#size-cells = <0>;
@@ -132,7 +133,6 @@
touchscreen@20 {
reg = <0x20>;
compatible = "syna,rmi4-i2c";
- interrupts-parent = <&tlmm>;
interrupts-extended = <&tlmm 65 IRQ_TYPE_EDGE_FALLING>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8953.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8953.dtsi
index b711cf9a6dc0..ad2f8cf9c966 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8953.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8953.dtsi
@@ -174,10 +174,10 @@
};
};
- memory {
+ memory@10000000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
- reg = <0 0 0 0>;
+ reg = <0 0x10000000 0 0>;
};
pmu {
@@ -190,6 +190,74 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,msm8953-rpm-proc", "qcom,rpm-proc";
+
+ smd-edge {
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,ipc = <&apcs 8 0>;
+ qcom,smd-edge = <15>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8953";
+ qcom,smd-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8953", "qcom,rpmcc";
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ #clock-cells = <1>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,msm8953-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION>;
+ };
+
+ rpmpd_opp_ret_plus: opp2 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
+ };
+
+ rpmpd_opp_min_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
+
+ rpmpd_opp_low_svs: opp4 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
+
+ rpmpd_opp_svs: opp5 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
+
+ rpmpd_opp_svs_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
+
+ rpmpd_opp_nom: opp7 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
+
+ rpmpd_opp_nom_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp9 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -263,74 +331,6 @@
};
};
- smd {
- compatible = "qcom,smd";
-
- rpm {
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 0>;
- qcom,smd-edge = <15>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8953";
- qcom,smd-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8953", "qcom,rpmcc";
- clocks = <&xo_board>;
- clock-names = "xo";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,msm8953-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <RPM_SMD_LEVEL_RETENTION>;
- };
-
- rpmpd_opp_ret_plus: opp2 {
- opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
- };
-
- rpmpd_opp_min_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
-
- rpmpd_opp_low_svs: opp4 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
-
- rpmpd_opp_svs: opp5 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
-
- rpmpd_opp_svs_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
-
- rpmpd_opp_nom: opp7 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
-
- rpmpd_opp_nom_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
-
- rpmpd_opp_turbo: opp9 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
- };
- };
- };
- };
- };
-
smp2p-adsp {
compatible = "qcom,smp2p";
qcom,smem = <443>, <429>;
@@ -726,6 +726,48 @@
bias-disable;
};
+ spi_3_default: spi-3-default-state {
+ pins = "gpio10", "gpio11";
+ function = "blsp_spi3";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ spi_3_sleep: spi-3-sleep-state {
+ pins = "gpio10", "gpio11";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ spi_5_default: spi-5-default-state {
+ pins = "gpio18", "gpio19";
+ function = "blsp_spi5";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ spi_5_sleep: spi-5-sleep-state {
+ pins = "gpio18", "gpio19";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ spi_6_default: spi-6-default-state {
+ pins = "gpio22", "gpio23";
+ function = "blsp_spi6";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ spi_6_sleep: spi-6-sleep-state {
+ pins = "gpio22", "gpio23";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
wcnss_pin_a: wcnss-active-state {
wcss-wlan2-pins {
@@ -1004,7 +1046,7 @@
apps_iommu: iommu@1e20000 {
compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v1";
- ranges = <0 0x01e20000 0x20000>;
+ ranges = <0 0x01e20000 0x20000>;
clocks = <&gcc GCC_SMMU_CFG_CLK>,
<&gcc GCC_APSS_TCU_ASYNC_CLK>;
@@ -1360,6 +1402,26 @@
status = "disabled";
};
+ spi_3: spi@78b7000 {
+ compatible = "qcom,spi-qup-v2.2.1";
+ reg = <0x078b7000 0x600>;
+ interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "core", "iface";
+ clocks = <&gcc GCC_BLSP1_QUP3_I2C_APPS_CLK>,
+ <&gcc GCC_BLSP1_AHB_CLK>;
+ dmas = <&blsp1_dma 8>, <&blsp1_dma 9>;
+ dma-names = "tx", "rx";
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&spi_3_default>;
+ pinctrl-1 = <&spi_3_sleep>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
i2c_4: i2c@78b8000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x078b8000 0x600>;
@@ -1413,6 +1475,26 @@
status = "disabled";
};
+ spi_5: spi@7af5000 {
+ compatible = "qcom,spi-qup-v2.2.1";
+ reg = <0x07af5000 0x600>;
+ interrupts = <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "core", "iface";
+ clocks = <&gcc GCC_BLSP2_QUP1_I2C_APPS_CLK>,
+ <&gcc GCC_BLSP2_AHB_CLK>;
+ dmas = <&blsp2_dma 4>, <&blsp2_dma 5>;
+ dma-names = "tx", "rx";
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&spi_5_default>;
+ pinctrl-1 = <&spi_5_sleep>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
i2c_6: i2c@7af6000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x07af6000 0x600>;
@@ -1433,6 +1515,26 @@
status = "disabled";
};
+ spi_6: spi@7af6000 {
+ compatible = "qcom,spi-qup-v2.2.1";
+ reg = <0x07af6000 0x600>;
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "core", "iface";
+ clocks = <&gcc GCC_BLSP2_QUP2_I2C_APPS_CLK>,
+ <&gcc GCC_BLSP2_AHB_CLK>;
+ dmas = <&blsp2_dma 6>, <&blsp2_dma 7>;
+ dma-names = "tx", "rx";
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&spi_6_default>;
+ pinctrl-1 = <&spi_6_sleep>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
i2c_7: i2c@7af7000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x07af7000 0x600>;
@@ -1645,7 +1747,7 @@
apr {
compatible = "qcom,apr-v2";
qcom,smd-channels = "apr_audio_svc";
- qcom,apr-domain = <APR_DOMAIN_ADSP>;
+ qcom,domain = <APR_DOMAIN_ADSP>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8976.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8976.dtsi
index 753b9a2105ed..d2bb1ada361a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8976.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8976.dtsi
@@ -232,6 +232,82 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,msm8976-rpm-proc", "qcom,rpm-proc";
+
+ smd-edge {
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,ipc = <&apcs 8 0>;
+ qcom,smd-edge = <15>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8976";
+ qcom,smd-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ #clock-cells = <1>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,msm8976-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION>;
+ };
+
+ rpmpd_opp_ret_plus: opp2 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
+ };
+
+ rpmpd_opp_min_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
+
+ rpmpd_opp_low_svs: opp4 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
+
+ rpmpd_opp_svs: opp5 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
+
+ rpmpd_opp_svs_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
+
+ rpmpd_opp_nom: opp7 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
+
+ rpmpd_opp_nom_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp9 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
+
+ rpmpd_opp_turbo_no_cpr: opp10 {
+ opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
+ };
+
+ rpmpd_opp_turbo_high: opp111 {
+ opp-level = <RPM_SMD_LEVEL_TURBO_HIGH>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -262,7 +338,12 @@
};
lpass_mem: lpass@8c200000 {
- reg = <0x0 0x8c200000 0x0 0x1800000>;
+ reg = <0x0 0x8c200000 0x0 0x1000000>;
+ no-map;
+ };
+
+ wcnss_fw_mem: wcnss@8d200000 {
+ reg = <0x0 0x8d200000 0x0 0x800000>;
no-map;
};
@@ -303,7 +384,7 @@
smp2p-modem {
compatible = "qcom,smp2p";
interrupts = <GIC_SPI 27 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 13>;
+ qcom,ipc = <&apcs 8 14>;
qcom,local-pid = <0>;
qcom,remote-pid = <1>;
@@ -326,7 +407,7 @@
smp2p-wcnss {
compatible = "qcom,smp2p";
interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 17>;
+ qcom,ipc = <&apcs 8 18>;
qcom,local-pid = <0>;
qcom,remote-pid = <4>;
@@ -346,91 +427,15 @@
};
};
- smd {
- compatible = "qcom,smd";
-
- rpm {
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 0>;
- qcom,smd-edge = <15>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8976";
- qcom,smd-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc";
- clocks = <&xo_board>;
- clock-names = "xo";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,msm8976-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <RPM_SMD_LEVEL_RETENTION>;
- };
-
- rpmpd_opp_ret_plus: opp2 {
- opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
- };
-
- rpmpd_opp_min_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
-
- rpmpd_opp_low_svs: opp4 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
-
- rpmpd_opp_svs: opp5 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
-
- rpmpd_opp_svs_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
-
- rpmpd_opp_nom: opp7 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
-
- rpmpd_opp_nom_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
-
- rpmpd_opp_turbo: opp9 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
-
- rpmpd_opp_turbo_no_cpr: opp10 {
- opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
- };
-
- rpmpd_opp_turbo_high: opp111 {
- opp-level = <RPM_SMD_LEVEL_TURBO_HIGH>;
- };
- };
- };
- };
- };
- };
-
smsm {
compatible = "qcom,smsm";
#address-cells = <1>;
#size-cells = <0>;
- qcom,ipc-1 = <&apcs 8 12>;
+ qcom,ipc-1 = <&apcs 8 13>;
qcom,ipc-2 = <&apcs 8 9>;
- qcom,ipc-3 = <&apcs 8 18>;
+ qcom,ipc-3 = <&apcs 8 19>;
apps_smsm: apps@0 {
reg = <0>;
@@ -439,7 +444,7 @@
hexagon_smsm: hexagon@1 {
reg = <1>;
- interrupts = <0 290 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <GIC_SPI 290 IRQ_TYPE_EDGE_RISING>;
interrupt-controller;
#interrupt-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8992-xiaomi-libra.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8992-xiaomi-libra.dts
index fcca1ba94da6..133f9c2540bc 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8992-xiaomi-libra.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8992-xiaomi-libra.dts
@@ -15,6 +15,7 @@
/delete-node/ &audio_mem;
/delete-node/ &mpss_mem;
/delete-node/ &peripheral_region;
+/delete-node/ &res_hyp_mem;
/delete-node/ &rmtfs_mem;
/ {
@@ -109,11 +110,6 @@
qcom,client-id = <1>;
};
- audio_mem: audio@cb400000 {
- reg = <0 0xcb000000 0 0x400000>;
- no-mem;
- };
-
qseecom_mem: qseecom@cb400000 {
reg = <0 0xcb400000 0 0x1c00000>;
no-mem;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8994-msft-lumia-octagon.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8994-msft-lumia-octagon.dtsi
index 2861bcdf87b7..cbc84459a5ae 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8994-msft-lumia-octagon.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8994-msft-lumia-octagon.dtsi
@@ -23,6 +23,7 @@
/delete-node/ &mba_mem;
/delete-node/ &mpss_mem;
/delete-node/ &peripheral_region;
+/delete-node/ &res_hyp_mem;
/delete-node/ &rmtfs_mem;
/delete-node/ &smem_mem;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8994.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8994.dtsi
index 5a7923d7c62a..8295bf1b219d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8994.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8994.dtsi
@@ -178,6 +178,56 @@
method = "hvc";
};
+ rpm: remoteproc {
+ compatible = "qcom,msm8994-rpm-proc", "qcom,rpm-proc";
+
+ smd-edge {
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,ipc = <&apcs 8 0>;
+ qcom,smd-edge = <15>;
+ qcom,remote-pid = <6>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8994";
+ qcom,smd-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8994", "qcom,rpmcc";
+ #clock-cells = <1>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,msm8994-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <1>;
+ };
+ rpmpd_opp_svs_krait: opp2 {
+ opp-level = <2>;
+ };
+ rpmpd_opp_svs_soc: opp3 {
+ opp-level = <3>;
+ };
+ rpmpd_opp_nom: opp4 {
+ opp-level = <4>;
+ };
+ rpmpd_opp_turbo: opp5 {
+ opp-level = <5>;
+ };
+ rpmpd_opp_super_turbo: opp6 {
+ opp-level = <6>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -231,61 +281,12 @@
no-map;
};
- reserved@6c00000 {
+ res_hyp_mem: reserved@6c00000 {
reg = <0 0x06c00000 0 0x400000>;
no-map;
};
};
- smd {
- compatible = "qcom,smd";
- rpm {
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,ipc = <&apcs 8 0>;
- qcom,smd-edge = <15>;
- qcom,remote-pid = <6>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8994";
- qcom,smd-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8994", "qcom,rpmcc";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,msm8994-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <1>;
- };
- rpmpd_opp_svs_krait: opp2 {
- opp-level = <2>;
- };
- rpmpd_opp_svs_soc: opp3 {
- opp-level = <3>;
- };
- rpmpd_opp_nom: opp4 {
- opp-level = <4>;
- };
- rpmpd_opp_turbo: opp5 {
- opp-level = <5>;
- };
- rpmpd_opp_super_turbo: opp6 {
- opp-level = <6>;
- };
- };
- };
- };
- };
- };
-
smem {
compatible = "qcom,smem";
memory-region = <&smem_mem>;
@@ -455,7 +456,7 @@
usb@f9200000 {
compatible = "snps,dwc3";
reg = <0xf9200000 0xcc00>;
- interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
maximum-speed = "high-speed";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8996-mtp.dts
index 495d45a16e63..6e9c9caf25b1 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996-mtp.dts
@@ -10,6 +10,7 @@
/ {
model = "Qualcomm Technologies, Inc. MSM 8996 MTP";
compatible = "qcom,msm8996-mtp", "qcom,msm8996";
+ chassis-type = "handset";
aliases {
serial0 = &blsp2_uart2;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996-oneplus-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8996-oneplus-common.dtsi
index ec5457508fe6..38035e0db80b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996-oneplus-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996-oneplus-common.dtsi
@@ -772,7 +772,6 @@
&ufsphy {
vdda-phy-supply = <&vreg_l28a_0p925>;
vdda-pll-supply = <&vreg_l12a_1p8>;
- vddp-ref-clk-supply = <&vreg_l25a_1p2>;
status = "okay";
};
@@ -781,6 +780,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l25a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l25a_1p2>;
vcc-max-microamp = <600000>;
vccq-max-microamp = <450000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone-dora.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone-dora.dts
index 4a0645db0ae1..6374c5f53d9a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone-dora.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone-dora.dts
@@ -24,5 +24,5 @@
};
&usb3_id {
- id-gpio = <&tlmm 24 GPIO_ACTIVE_LOW>;
+ id-gpios = <&tlmm 24 GPIO_ACTIVE_LOW>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone.dtsi
index b4b770a9277d..d55e4075040f 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996-sony-xperia-tone.dtsi
@@ -71,7 +71,7 @@
usb3_id: usb3-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 25 GPIO_ACTIVE_LOW>;
+ id-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usb_detect>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-common.dtsi
index 47f55c7311e9..5ab583be9e0a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-common.dtsi
@@ -11,26 +11,24 @@
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
/ {
- clocks {
- divclk1_cdc: divclk1 {
- compatible = "gpio-gate-clock";
- clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
- #clock-cells = <0>;
- enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>;
+ divclk1_cdc: divclk1 {
+ compatible = "gpio-gate-clock";
+ clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
+ #clock-cells = <0>;
+ enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&divclk1_default>;
- };
+ pinctrl-names = "default";
+ pinctrl-0 = <&divclk1_default>;
+ };
- divclk4: divclk4 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <32768>;
- clock-output-names = "divclk4";
+ divclk4: divclk4 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "divclk4";
- pinctrl-names = "default";
- pinctrl-0 = <&divclk4_pin_a>;
- };
+ pinctrl-names = "default";
+ pinctrl-0 = <&divclk4_pin_a>;
};
gpio-keys {
@@ -117,7 +115,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
/delete-node/ mba@91500000;
@@ -187,10 +185,9 @@
&blsp2_i2c2 {
status = "okay";
- label = "NFC_I2C";
clock-frequency = <400000>;
- nfc: pn548@28 {
+ nfc: nfc@28 {
compatible = "nxp,nxp-nci-i2c";
reg = <0x28>;
@@ -208,9 +205,8 @@
&blsp2_i2c3 {
status = "okay";
- label = "TYPEC_I2C";
- typec: tusb320l@47 {
+ typec: typec@47 {
compatible = "ti,tusb320l";
reg = <0x47>;
interrupt-parent = <&tlmm>;
@@ -220,7 +216,7 @@
&blsp2_i2c6 {
status = "okay";
- label = "MSM_TS_I2C";
+ /* MSM_TS */
};
&blsp1_uart2 {
@@ -421,6 +417,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l25a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l25a_1p2>;
vcc-max-microamp = <600000>;
vccq-max-microamp = <450000>;
@@ -432,7 +429,6 @@
vdda-phy-supply = <&vreg_l28a_0p925>;
vdda-pll-supply = <&vreg_l12a_1p8>;
- vddp-ref-clk-supply = <&vreg_l25a_1p2>;
};
&venus {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-gemini.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-gemini.dts
index bdedcf9dff03..f8e9d90afab0 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-gemini.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-gemini.dts
@@ -20,16 +20,14 @@
qcom,pmic-id = <0x20009 0x2000a 0x00 0x00>;
qcom,board-id = <31 0>;
- clocks {
- divclk2_haptics: divclk2 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <32768>;
- clock-output-names = "divclk2";
-
- pinctrl-names = "default";
- pinctrl-0 = <&divclk2_pin_a>;
- };
+ divclk2_haptics: divclk2 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "divclk2";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&divclk2_pin_a>;
};
};
@@ -82,7 +80,7 @@
#size-cells = <0>;
interrupt-parent = <&tlmm>;
interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
- vdda-supply = <&vreg_l6a_1p8>;
+ vio-supply = <&vreg_l6a_1p8>;
vdd-supply = <&vdd_3v2_tp>;
reset-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8996.dtsi
index 0cb2d4f08c3a..ee6f87c828ae 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996.dtsi
@@ -8,6 +8,8 @@
#include <dt-bindings/clock/qcom,mmcc-msm8996.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/interconnect/qcom,msm8996.h>
+#include <dt-bindings/interconnect/qcom,msm8996-cbf.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,apr.h>
@@ -49,6 +51,7 @@
cpu-idle-states = <&CPU_SLEEP_0>;
capacity-dmips-mhz = <1024>;
clocks = <&kryocc 0>;
+ interconnects = <&cbf MASTER_CBF_M4M &cbf SLAVE_CBF_M4M>;
operating-points-v2 = <&cluster0_opp>;
#cooling-cells = <2>;
next-level-cache = <&L2_0>;
@@ -67,6 +70,7 @@
cpu-idle-states = <&CPU_SLEEP_0>;
capacity-dmips-mhz = <1024>;
clocks = <&kryocc 0>;
+ interconnects = <&cbf MASTER_CBF_M4M &cbf SLAVE_CBF_M4M>;
operating-points-v2 = <&cluster0_opp>;
#cooling-cells = <2>;
next-level-cache = <&L2_0>;
@@ -80,6 +84,7 @@
cpu-idle-states = <&CPU_SLEEP_0>;
capacity-dmips-mhz = <1024>;
clocks = <&kryocc 1>;
+ interconnects = <&cbf MASTER_CBF_M4M &cbf SLAVE_CBF_M4M>;
operating-points-v2 = <&cluster1_opp>;
#cooling-cells = <2>;
next-level-cache = <&L2_1>;
@@ -98,6 +103,7 @@
cpu-idle-states = <&CPU_SLEEP_0>;
capacity-dmips-mhz = <1024>;
clocks = <&kryocc 1>;
+ interconnects = <&cbf MASTER_CBF_M4M &cbf SLAVE_CBF_M4M>;
operating-points-v2 = <&cluster1_opp>;
#cooling-cells = <2>;
next-level-cache = <&L2_1>;
@@ -149,91 +155,109 @@
opp-hz = /bits/ 64 <307200000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-422400000 {
opp-hz = /bits/ 64 <422400000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-480000000 {
opp-hz = /bits/ 64 <480000000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-556800000 {
opp-hz = /bits/ 64 <556800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-652800000 {
opp-hz = /bits/ 64 <652800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <384000>;
};
opp-729600000 {
opp-hz = /bits/ 64 <729600000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <460800>;
};
opp-844800000 {
opp-hz = /bits/ 64 <844800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <537600>;
};
opp-960000000 {
opp-hz = /bits/ 64 <960000000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <672000>;
};
opp-1036800000 {
opp-hz = /bits/ 64 <1036800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <672000>;
};
opp-1113600000 {
opp-hz = /bits/ 64 <1113600000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <825600>;
};
opp-1190400000 {
opp-hz = /bits/ 64 <1190400000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <825600>;
};
opp-1228800000 {
opp-hz = /bits/ 64 <1228800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <902400>;
};
opp-1324800000 {
opp-hz = /bits/ 64 <1324800000>;
opp-supported-hw = <0xd>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1056000>;
};
opp-1363200000 {
opp-hz = /bits/ 64 <1363200000>;
opp-supported-hw = <0x2>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1132800>;
};
opp-1401600000 {
opp-hz = /bits/ 64 <1401600000>;
opp-supported-hw = <0xd>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1132800>;
};
opp-1478400000 {
opp-hz = /bits/ 64 <1478400000>;
opp-supported-hw = <0x9>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1190400>;
};
opp-1497600000 {
opp-hz = /bits/ 64 <1497600000>;
opp-supported-hw = <0x04>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1305600>;
};
opp-1593600000 {
opp-hz = /bits/ 64 <1593600000>;
opp-supported-hw = <0x9>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1382400>;
};
};
@@ -247,136 +271,163 @@
opp-hz = /bits/ 64 <307200000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-403200000 {
opp-hz = /bits/ 64 <403200000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-480000000 {
opp-hz = /bits/ 64 <480000000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-556800000 {
opp-hz = /bits/ 64 <556800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-652800000 {
opp-hz = /bits/ 64 <652800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-729600000 {
opp-hz = /bits/ 64 <729600000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <307200>;
};
opp-806400000 {
opp-hz = /bits/ 64 <806400000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <384000>;
};
opp-883200000 {
opp-hz = /bits/ 64 <883200000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <460800>;
};
opp-940800000 {
opp-hz = /bits/ 64 <940800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <537600>;
};
opp-1036800000 {
opp-hz = /bits/ 64 <1036800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <595200>;
};
opp-1113600000 {
opp-hz = /bits/ 64 <1113600000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <672000>;
};
opp-1190400000 {
opp-hz = /bits/ 64 <1190400000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <672000>;
};
opp-1248000000 {
opp-hz = /bits/ 64 <1248000000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <748800>;
};
opp-1324800000 {
opp-hz = /bits/ 64 <1324800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <825600>;
};
opp-1401600000 {
opp-hz = /bits/ 64 <1401600000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <902400>;
};
opp-1478400000 {
opp-hz = /bits/ 64 <1478400000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <979200>;
};
opp-1555200000 {
opp-hz = /bits/ 64 <1555200000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1056000>;
};
opp-1632000000 {
opp-hz = /bits/ 64 <1632000000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1190400>;
};
opp-1708800000 {
opp-hz = /bits/ 64 <1708800000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1228800>;
};
opp-1785600000 {
opp-hz = /bits/ 64 <1785600000>;
opp-supported-hw = <0xf>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1305600>;
};
opp-1804800000 {
opp-hz = /bits/ 64 <1804800000>;
opp-supported-hw = <0xe>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1305600>;
};
opp-1824000000 {
opp-hz = /bits/ 64 <1824000000>;
opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1382400>;
};
opp-1900800000 {
opp-hz = /bits/ 64 <1900800000>;
opp-supported-hw = <0x4>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1305600>;
};
opp-1920000000 {
opp-hz = /bits/ 64 <1920000000>;
opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1459200>;
};
opp-1996800000 {
opp-hz = /bits/ 64 <1996800000>;
opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1593600>;
};
opp-2073600000 {
opp-hz = /bits/ 64 <2073600000>;
opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1593600>;
};
opp-2150400000 {
opp-hz = /bits/ 64 <2150400000>;
opp-supported-hw = <0x1>;
clock-latency-ns = <200000>;
+ opp-peak-kBps = <1593600>;
};
};
@@ -393,11 +444,81 @@
reg = <0x0 0x80000000 0x0 0x0>;
};
+ etm {
+ compatible = "qcom,coresight-remote-etm";
+
+ out-ports {
+ port {
+ modem_etm_out_funnel_in2: endpoint {
+ remote-endpoint =
+ <&funnel_in2_in_modem_etm>;
+ };
+ };
+ };
+ };
+
psci {
compatible = "arm,psci-1.0";
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,msm8996-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8996";
+ qcom,glink-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8996", "qcom,rpmcc";
+ #clock-cells = <1>;
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,msm8996-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp1: opp1 {
+ opp-level = <1>;
+ };
+
+ rpmpd_opp2: opp2 {
+ opp-level = <2>;
+ };
+
+ rpmpd_opp3: opp3 {
+ opp-level = <3>;
+ };
+
+ rpmpd_opp4: opp4 {
+ opp-level = <4>;
+ };
+
+ rpmpd_opp5: opp5 {
+ opp-level = <5>;
+ };
+
+ rpmpd_opp6: opp6 {
+ opp-level = <6>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -431,7 +552,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
mpss_mem: mpss@88800000 {
@@ -472,62 +593,6 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
-
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
-
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
-
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8996";
- qcom,glink-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8996", "qcom,rpmcc";
- #clock-cells = <1>;
- clocks = <&xo_board>;
- clock-names = "xo";
- };
-
- rpmpd: power-controller {
- compatible = "qcom,msm8996-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp1: opp1 {
- opp-level = <1>;
- };
-
- rpmpd_opp2: opp2 {
- opp-level = <2>;
- };
-
- rpmpd_opp3: opp3 {
- opp-level = <3>;
- };
-
- rpmpd_opp4: opp4 {
- opp-level = <4>;
- };
-
- rpmpd_opp5: opp5 {
- opp-level = <5>;
- };
-
- rpmpd_opp6: opp6 {
- opp-level = <6>;
- };
- };
- };
- };
- };
-
smem {
compatible = "qcom,smem";
memory-region = <&smem_mem>;
@@ -538,7 +603,7 @@
compatible = "qcom,smp2p";
qcom,smem = <443>, <429>;
- interrupts = <0 158 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <GIC_SPI 158 IRQ_TYPE_EDGE_RISING>;
mboxes = <&apcs_glb 10>;
@@ -727,10 +792,10 @@
<&pciephy_0>,
<&pciephy_1>,
<&pciephy_2>,
- <&ssusb_phy_0>,
- <&ufsphy_lane 0>,
- <&ufsphy_lane 1>,
- <&ufsphy_lane 2>;
+ <&usb3phy>,
+ <&ufsphy 0>,
+ <&ufsphy 1>,
+ <&ufsphy 2>;
clock-names = "cxo",
"cxo2",
"sleep_clk",
@@ -747,9 +812,6 @@
compatible = "qcom,msm8996-bimc";
reg = <0x00408000 0x5a000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
};
tsens0: thermal-sensor@4a9000 {
@@ -800,18 +862,12 @@
compatible = "qcom,msm8996-cnoc";
reg = <0x00500000 0x1000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
- <&rpmcc RPM_SMD_CNOC_A_CLK>;
};
snoc: interconnect@524000 {
compatible = "qcom,msm8996-snoc";
reg = <0x00524000 0x1c000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
};
a0noc: interconnect@543000 {
@@ -831,19 +887,14 @@
compatible = "qcom,msm8996-a1noc";
reg = <0x00562000 0x5000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_AGGR1_NOC_CLK>,
- <&rpmcc RPM_SMD_AGGR1_NOC_A_CLK>;
};
a2noc: interconnect@583000 {
compatible = "qcom,msm8996-a2noc";
reg = <0x00583000 0x7000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a", "aggre2_ufs_axi", "ufs_axi";
- clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
- <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
- <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
+ clock-names = "aggre2_ufs_axi", "ufs_axi";
+ clocks = <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
<&gcc GCC_UFS_AXI_CLK>;
};
@@ -851,19 +902,14 @@
compatible = "qcom,msm8996-mnoc";
reg = <0x005a4000 0x1c000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a", "iface";
- clocks = <&rpmcc RPM_SMD_MMAXI_CLK>,
- <&rpmcc RPM_SMD_MMAXI_A_CLK>,
- <&mmcc AHB_CLK_SRC>;
+ clock-names = "iface";
+ clocks = <&mmcc AHB_CLK_SRC>;
};
pnoc: interconnect@5c0000 {
compatible = "qcom,msm8996-pnoc";
reg = <0x005c0000 0x3000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_PCNOC_CLK>,
- <&rpmcc RPM_SMD_PCNOC_A_CLK>;
};
tcsr_mutex: hwlock@740000 {
@@ -1075,7 +1121,7 @@
reg-names = "dsi_ctrl";
interrupt-parent = <&mdss>;
- interrupts = <4>;
+ interrupts = <5>;
clocks = <&mmcc MDSS_MDP_CLK>,
<&mmcc MDSS_BYTE1_CLK>,
@@ -1136,11 +1182,11 @@
status = "disabled";
};
- mdss_hdmi: mdss_hdmi-tx@9a0000 {
- compatible = "qcom,mdss_hdmi-tx-8996";
- reg = <0x009a0000 0x50c>,
- <0x00070000 0x6158>,
- <0x009e0000 0xfff>;
+ mdss_hdmi: hdmi-tx@9a0000 {
+ compatible = "qcom,hdmi-tx-8996";
+ reg = <0x009a0000 0x50c>,
+ <0x00070000 0x6158>,
+ <0x009e0000 0xfff>;
reg-names = "core_physical",
"qfprom_physical",
"hdcp_physical";
@@ -1180,7 +1226,7 @@
mdss_hdmi_phy: phy@9a0600 {
#phy-cells = <0>;
- compatible = "qcom,mdss_hdmi-phy-8996";
+ compatible = "qcom,hdmi-phy-8996";
reg = <0x009a0600 0x1c4>,
<0x009a0a00 0x124>,
<0x009a0c00 0x124>,
@@ -1213,7 +1259,7 @@
reg = <0x00b00000 0x3f000>;
reg-names = "kgsl_3d0_reg_memory";
- interrupts = <0 300 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mmcc GPU_GX_GFX3D_CLK>,
<&mmcc GPU_AHB_CLK>,
@@ -1995,7 +2041,7 @@
reg = <0x00624000 0x2500>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufsphy_lane>;
+ phys = <&ufsphy>;
phy-names = "ufsphy";
power-domains = <&gcc UFS_GDSC>;
@@ -2048,25 +2094,18 @@
ufsphy: phy@627000 {
compatible = "qcom,msm8996-qmp-ufs-phy";
- reg = <0x00627000 0x1c4>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x00627000 0x1000>;
clocks = <&gcc GCC_UFS_CLKREF_CLK>;
clock-names = "ref";
resets = <&ufshc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufsphy_lane: phy@627400 {
- reg = <0x627400 0x12c>,
- <0x627600 0x200>,
- <0x627c00 0x1b4>;
- #clock-cells = <1>;
- #phy-cells = <0>;
- };
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
};
camss: camss@a34000 {
@@ -2401,9 +2440,8 @@
"handover",
"stop-ack";
- clocks = <&xo_board>,
- <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
- clock-names = "xo", "aggre2";
+ clocks = <&xo_board>;
+ clock-names = "xo";
memory-region = <&slpi_mem>;
@@ -2448,10 +2486,15 @@
<&gcc GCC_MSS_GPLL0_DIV_CLK>,
<&gcc GCC_MSS_SNOC_AXI_CLK>,
<&gcc GCC_MSS_MNOC_BIMC_AXI_CLK>,
- <&rpmcc RPM_SMD_PCNOC_CLK>,
<&rpmcc RPM_SMD_QDSS_CLK>;
- clock-names = "iface", "bus", "mem", "xo", "gpll0_mss",
- "snoc_axi", "mnoc_axi", "pnoc", "qdss";
+ clock-names = "iface",
+ "bus",
+ "mem",
+ "xo",
+ "gpll0_mss",
+ "snoc_axi",
+ "mnoc_axi",
+ "qdss";
resets = <&gcc GCC_MSS_RESTART>;
reset-names = "mss_restart";
@@ -2592,6 +2635,14 @@
clocks = <&rpmcc RPM_QDSS_CLK>, <&rpmcc RPM_QDSS_A_CLK>;
clock-names = "apb_pclk", "atclk";
+ in-ports {
+ port {
+ funnel_in2_in_modem_etm: endpoint {
+ remote-endpoint =
+ <&modem_etm_out_funnel_in2>;
+ };
+ };
+ };
out-ports {
port {
@@ -3003,8 +3054,8 @@
usb3_dwc3: usb@6a00000 {
compatible = "snps,dwc3";
reg = <0x06a00000 0xcc00>;
- interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&hsusb_phy1>, <&ssusb_phy_0>;
+ interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&hsusb_phy1>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,hird-threshold = /bits/ 8 <0>;
snps,dis_u2_susphy_quirk;
@@ -3016,32 +3067,26 @@
usb3phy: phy@7410000 {
compatible = "qcom,msm8996-qmp-usb3-phy";
- reg = <0x07410000 0x1c4>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x07410000 0x1000>;
clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
- <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
- <&gcc GCC_USB3_CLKREF_CLK>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&gcc GCC_USB3_CLKREF_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
+ <&gcc GCC_USB3_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "usb3_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
resets = <&gcc GCC_USB3_PHY_BCR>,
- <&gcc GCC_USB3PHY_PHY_BCR>;
- reset-names = "phy", "common";
- status = "disabled";
+ <&gcc GCC_USB3PHY_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
- ssusb_phy_0: phy@7410200 {
- reg = <0x07410200 0x200>,
- <0x07410400 0x130>,
- <0x07410600 0x1a8>;
- #phy-cells = <0>;
-
- #clock-cells = <0>;
- clock-output-names = "usb3_phy_pipe_clk_src";
- clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- };
+ status = "disabled";
};
hsusb_phy1: phy@7411000 {
@@ -3336,6 +3381,9 @@
#size-cells = <1>;
ranges;
+ interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hs_phy_irq";
+
clocks = <&gcc GCC_PERIPH_NOC_USB20_AHB_CLK>,
<&gcc GCC_USB20_MASTER_CLK>,
<&gcc GCC_USB20_MOCK_UTMI_CLK>,
@@ -3358,7 +3406,7 @@
usb2_dwc3: usb@7600000 {
compatible = "snps,dwc3";
reg = <0x07600000 0xcc00>;
- interrupts = <0 138 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
phys = <&hsusb_phy2>;
phy-names = "usb2-phy";
maximum-speed = "high-speed";
@@ -3372,7 +3420,7 @@
qcom,controlled-remotely;
reg = <0x09184000 0x32000>;
num-channels = <31>;
- interrupts = <0 164 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <1>;
qcom,num-ees = <2>;
@@ -3381,7 +3429,7 @@
slim_msm: slim-ngd@91c0000 {
compatible = "qcom,slim-ngd-v1.5.0";
reg = <0x091c0000 0x2c000>;
- interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&slimbam 3>, <&slimbam 4>;
dma-names = "rx", "tx";
#address-cells = <1>;
@@ -3551,6 +3599,7 @@
reg = <0x09a11000 0x10000>;
clocks = <&rpmcc RPM_SMD_XO_A_CLK_SRC>, <&apcs_glb>;
#clock-cells = <0>;
+ #interconnect-cells = <1>;
};
intc: interrupt-controller@9bc0000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8996pro-xiaomi-natrium.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8996pro-xiaomi-natrium.dts
index 7957c8823f0d..5e3fd1637f44 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8996pro-xiaomi-natrium.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8996pro-xiaomi-natrium.dts
@@ -106,7 +106,7 @@
&sound {
compatible = "qcom,apq8096-sndcard";
model = "natrium";
- audio-routing = "RX_BIAS", "MCLK";
+ audio-routing = "RX_BIAS", "MCLK";
mm1-dai-link {
link-name = "MultiMedia1";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8998-fxtec-pro1.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8998-fxtec-pro1.dts
index b35e2d9f428c..f1ceaedd9520 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8998-fxtec-pro1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8998-fxtec-pro1.dts
@@ -31,7 +31,7 @@
*/
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
};
gpio-hall-sensors {
@@ -671,6 +671,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l26a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l26a_1p2>;
vcc-max-microamp = <750000>;
vccq-max-microamp = <560000>;
vccq2-max-microamp = <750000>;
@@ -680,7 +681,6 @@
status = "okay";
vdda-phy-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l2a_1p2>;
- vddp-ref-clk-supply = <&vreg_l26a_1p2>;
};
&usb3 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8998-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8998-mtp.dts
index 453a1c9e9808..7c77612fb990 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8998-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8998-mtp.dts
@@ -11,6 +11,7 @@
/ {
model = "Qualcomm Technologies, Inc. MSM8998 v1 MTP";
compatible = "qcom,msm8998-mtp", "qcom,msm8998";
+ chassis-type = "handset";
qcom,board-id = <8 0>;
@@ -411,6 +412,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l26a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l26a_1p2>;
vcc-max-microamp = <750000>;
vccq-max-microamp = <560000>;
vccq2-max-microamp = <750000>;
@@ -420,7 +422,6 @@
status = "okay";
vdda-phy-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l2a_1p2>;
- vddp-ref-clk-supply = <&vreg_l26a_1p2>;
};
&usb3 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8998-oneplus-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8998-oneplus-common.dtsi
index 68e634f8212c..e6a69d942a4a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8998-oneplus-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8998-oneplus-common.dtsi
@@ -534,6 +534,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l26a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l26a_1p2>;
vcc-max-microamp = <750000>;
vccq-max-microamp = <560000>;
vccq2-max-microamp = <750000>;
@@ -544,7 +545,6 @@
vdda-phy-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l2a_1p2>;
- vddp-ref-clk-supply = <&vreg_l26a_1p2>;
};
&usb3 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8998-sony-xperia-yoshino.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8998-sony-xperia-yoshino.dtsi
index 687e96068cb2..876c6921ddf0 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8998-sony-xperia-yoshino.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8998-sony-xperia-yoshino.dtsi
@@ -89,8 +89,8 @@
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
- vbus-gpio = <&tlmm 128 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&cc_dir_default &usb_detect_en>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8998-xiaomi-sagit.dts b/sys/contrib/device-tree/src/arm64/qcom/msm8998-xiaomi-sagit.dts
index 2444b87fddf7..0cac06f25a77 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8998-xiaomi-sagit.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8998-xiaomi-sagit.dts
@@ -213,7 +213,6 @@
rmi4-f1a@1a {
reg = <0x1a>;
- syna,codes = <KEY_BACK KEY_APPSELECT>;
};
};
};
@@ -668,6 +667,7 @@
vcc-supply = <&vreg_l20a_2p95>;
vccq-supply = <&vreg_l26a_1p2>;
vccq2-supply = <&vreg_s4a_1p8>;
+ vdd-hba-supply = <&vreg_l26a_1p2>;
vcc-max-microamp = <750000>;
vccq-max-microamp = <560000>;
vccq2-max-microamp = <750000>;
@@ -677,7 +677,6 @@
&ufsphy {
vdda-phy-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l2a_1p2>;
- vddp-ref-clk-supply = <&vreg_l26a_1p2>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/msm8998.dtsi b/sys/contrib/device-tree/src/arm64/qcom/msm8998.dtsi
index f0e943ff0046..2793cc22d381 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/msm8998.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/msm8998.dtsi
@@ -6,6 +6,7 @@
#include <dt-bindings/clock/qcom,gpucc-msm8998.h>
#include <dt-bindings/clock/qcom,mmcc-msm8998.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/gpio/gpio.h>
@@ -56,7 +57,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
spss_mem: memory@8ab00000 {
@@ -316,73 +317,98 @@
};
};
+ dsi_opp_table: opp-table-dsi {
+ compatible = "operating-points-v2";
+
+ opp-131250000 {
+ opp-hz = /bits/ 64 <131250000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-210000000 {
+ opp-hz = /bits/ 64 <210000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp-312500000 {
+ opp-hz = /bits/ 64 <312500000>;
+ required-opps = <&rpmpd_opp_nom>;
+ };
+ };
+
psci {
compatible = "arm,psci-1.0";
method = "smc";
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
+ rpm: remoteproc {
+ compatible = "qcom,msm8998-rpm-proc", "qcom,rpm-proc";
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
+ glink-edge {
+ compatible = "qcom,glink-rpm";
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-msm8998";
- qcom,glink-channels = "rpm_requests";
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-msm8998", "qcom,rpmcc";
- #clock-cells = <1>;
- };
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-msm8998";
+ qcom,glink-channels = "rpm_requests";
- rpmpd: power-controller {
- compatible = "qcom,msm8998-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-msm8998", "qcom,rpmcc";
+ clocks = <&xo>;
+ clock-names = "xo";
+ #clock-cells = <1>;
+ };
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
+ rpmpd: power-controller {
+ compatible = "qcom,msm8998-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
- rpmpd_opp_ret: opp1 {
- opp-level = <RPM_SMD_LEVEL_RETENTION>;
- };
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
- rpmpd_opp_ret_plus: opp2 {
- opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
- };
+ rpmpd_opp_ret: opp1 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION>;
+ };
- rpmpd_opp_min_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
+ rpmpd_opp_ret_plus: opp2 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
+ };
- rpmpd_opp_low_svs: opp4 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
+ rpmpd_opp_min_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
- rpmpd_opp_svs: opp5 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
+ rpmpd_opp_low_svs: opp4 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
- rpmpd_opp_svs_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
+ rpmpd_opp_svs: opp5 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
- rpmpd_opp_nom: opp7 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
+ rpmpd_opp_svs_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
- rpmpd_opp_nom_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
+ rpmpd_opp_nom: opp7 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
- rpmpd_opp_turbo: opp9 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
+ rpmpd_opp_nom_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp9 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
- rpmpd_opp_turbo_plus: opp10 {
- opp-level = <RPM_SMD_LEVEL_BINNING>;
+ rpmpd_opp_turbo_plus: opp10 {
+ opp-level = <RPM_SMD_LEVEL_BINNING>;
+ };
};
};
};
@@ -907,12 +933,12 @@
<GIC_SPI 465 IRQ_TYPE_EDGE_RISING>;
};
- pcie0: pci@1c00000 {
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-msm8998", "qcom,pcie-msm8996";
- reg = <0x01c00000 0x2000>,
- <0x1b000000 0xf1d>,
- <0x1b000f20 0xa8>,
- <0x1b100000 0x100000>;
+ reg = <0x01c00000 0x2000>,
+ <0x1b000000 0xf1d>,
+ <0x1b000f20 0xa8>,
+ <0x1b100000 0x100000>;
reg-names = "parf", "dbi", "elbi", "config";
device_type = "pci";
linux,pci-domain = <0>;
@@ -920,7 +946,7 @@
#address-cells = <3>;
#size-cells = <2>;
num-lanes = <1>;
- phys = <&pciephy>;
+ phys = <&pcie_phy>;
phy-names = "pciephy";
status = "disabled";
@@ -950,39 +976,35 @@
pcie_phy: phy@1c06000 {
compatible = "qcom,msm8998-qmp-pcie-phy";
- reg = <0x01c06000 0x18c>;
- #address-cells = <1>;
- #size-cells = <1>;
+ reg = <0x01c06000 0x1000>;
status = "disabled";
- ranges;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
- <&gcc GCC_PCIE_CLKREF_CLK>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&gcc GCC_PCIE_CLKREF_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "pipe";
+
+ clock-output-names = "pcie_0_pipe_clk_src";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_0_PHY_BCR>, <&gcc GCC_PCIE_PHY_BCR>;
reset-names = "phy", "common";
vdda-phy-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l2a_1p2>;
-
- pciephy: phy@1c06800 {
- reg = <0x01c06200 0x128>, <0x01c06400 0x1fc>, <0x01c06800 0x20c>;
- #phy-cells = <0>;
-
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "pcie_0_pipe_clk_src";
- #clock-cells = <0>;
- };
};
ufshc: ufshc@1da4000 {
compatible = "qcom,msm8998-ufshc", "qcom,ufshc", "jedec,ufs-2.0";
reg = <0x01da4000 0x2500>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufsphy_lanes>;
+ phys = <&ufsphy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
power-domains = <&gcc UFS_GDSC>;
@@ -1023,11 +1045,7 @@
ufsphy: phy@1da7000 {
compatible = "qcom,msm8998-qmp-ufs-phy";
- reg = <0x01da7000 0x18c>;
- #address-cells = <1>;
- #size-cells = <1>;
- status = "disabled";
- ranges;
+ reg = <0x01da7000 0x1000>;
clock-names =
"ref",
@@ -1039,14 +1057,8 @@
reset-names = "ufsphy";
resets = <&ufshc 0>;
- ufsphy_lanes: phy@1da7400 {
- reg = <0x01da7400 0x128>,
- <0x01da7600 0x1fc>,
- <0x01da7c00 0x1dc>,
- <0x01da7800 0x128>,
- <0x01da7a00 0x1fc>;
- #phy-cells = <0>;
- };
+ #phy-cells = <0>;
+ status = "disabled";
};
tcsr_mutex: hwlock@1f40000 {
@@ -1488,7 +1500,7 @@
"rbcpr",
"core";
- interrupts = <0 300 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
iommus = <&adreno_smmu 0>;
operating-points-v2 = <&gpu_opp_table>;
power-domains = <&rpmpd MSM8998_VDDMX>;
@@ -1574,7 +1586,7 @@
reg = <0x05065000 0x9000>;
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
- <&gcc GPLL0_OUT_MAIN>;
+ <&gcc GCC_GPU_GPLL0_CLK>;
clock-names = "xo",
"gpll0";
};
@@ -1593,9 +1605,8 @@
px-supply = <&vreg_lvs2a_1p8>;
- clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
- <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
- clock-names = "xo", "aggre2";
+ clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "xo";
memory-region = <&slpi_mem>;
@@ -2009,9 +2020,11 @@
cpu = <&CPU4>;
- port {
- etm4_out: endpoint {
- remote-endpoint = <&apss_funnel_in4>;
+ out-ports {
+ port {
+ etm4_out: endpoint {
+ remote-endpoint = <&apss_funnel_in4>;
+ };
};
};
};
@@ -2026,9 +2039,11 @@
cpu = <&CPU5>;
- port {
- etm5_out: endpoint {
- remote-endpoint = <&apss_funnel_in5>;
+ out-ports {
+ port {
+ etm5_out: endpoint {
+ remote-endpoint = <&apss_funnel_in5>;
+ };
};
};
};
@@ -2043,9 +2058,11 @@
cpu = <&CPU6>;
- port {
- etm6_out: endpoint {
- remote-endpoint = <&apss_funnel_in6>;
+ out-ports {
+ port {
+ etm6_out: endpoint {
+ remote-endpoint = <&apss_funnel_in6>;
+ };
};
};
};
@@ -2060,9 +2077,11 @@
cpu = <&CPU7>;
- port {
- etm7_out: endpoint {
- remote-endpoint = <&apss_funnel_in7>;
+ out-ports {
+ port {
+ etm7_out: endpoint {
+ remote-endpoint = <&apss_funnel_in7>;
+ };
};
};
};
@@ -2074,11 +2093,11 @@
spmi_bus: spmi@800f000 {
compatible = "qcom,spmi-pmic-arb";
- reg = <0x0800f000 0x1000>,
- <0x08400000 0x1000000>,
- <0x09400000 0x1000000>,
- <0x0a400000 0x220000>,
- <0x0800a000 0x3000>;
+ reg = <0x0800f000 0x1000>,
+ <0x08400000 0x1000000>,
+ <0x09400000 0x1000000>,
+ <0x0a400000 0x220000>,
+ <0x0800a000 0x3000>;
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
interrupt-names = "periph_irq";
interrupts = <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>;
@@ -2127,7 +2146,7 @@
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&qusb2phy>, <&usb1_ssphy>;
+ phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
snps,hird-threshold = /bits/ 8 <0x10>;
@@ -2136,33 +2155,26 @@
usb3phy: phy@c010000 {
compatible = "qcom,msm8998-qmp-usb3-phy";
- reg = <0x0c010000 0x18c>;
- status = "disabled";
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ reg = <0x0c010000 0x1000>;
clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
+ <&gcc GCC_USB3_CLKREF_CLK>,
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
- <&gcc GCC_USB3_CLKREF_CLK>;
- clock-names = "aux", "cfg_ahb", "ref";
+ <&gcc GCC_USB3_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+ clock-output-names = "usb3_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
resets = <&gcc GCC_USB3_PHY_BCR>,
<&gcc GCC_USB3PHY_PHY_BCR>;
- reset-names = "phy", "common";
+ reset-names = "phy",
+ "phy_phy";
- usb1_ssphy: phy@c010200 {
- reg = <0xc010200 0x128>,
- <0xc010400 0x200>,
- <0xc010c00 0x20c>,
- <0xc010600 0x128>,
- <0xc010800 0x200>;
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_phy_pipe_clk_src";
- };
+ status = "disabled";
};
qusb2phy: phy@c012000 {
@@ -2718,16 +2730,274 @@
"dsi1byte",
"hdmipll",
"dplink",
- "dpvco";
+ "dpvco",
+ "gpll0_div";
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
<&gcc GCC_MMSS_GPLL0_CLK>,
+ <&mdss_dsi0_phy 1>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi1_phy 1>,
+ <&mdss_dsi1_phy 0>,
<0>,
<0>,
<0>,
- <0>,
- <0>,
- <0>,
- <0>;
+ <&gcc GCC_MMSS_GPLL0_DIV_CLK>;
+ };
+
+ mdss: display-subsystem@c900000 {
+ compatible = "qcom,msm8998-mdss";
+ reg = <0x0c900000 0x1000>;
+ reg-names = "mdss";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>,
+ <&mmcc MDSS_MDP_CLK>;
+ clock-names = "iface",
+ "bus",
+ "core";
+
+ power-domains = <&mmcc MDSS_GDSC>;
+ iommus = <&mmss_smmu 0>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@c901000 {
+ compatible = "qcom,msm8998-dpu";
+ reg = <0x0c901000 0x8f000>,
+ <0x0c9a8e00 0xf0>,
+ <0x0c9b0000 0x2008>,
+ <0x0c9b8000 0x1040>;
+ reg-names = "mdp",
+ "regdma",
+ "vbif",
+ "vbif_nrt";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>,
+ <&mmcc MNOC_AHB_CLK>,
+ <&mmcc MDSS_MDP_CLK>,
+ <&mmcc MDSS_VSYNC_CLK>;
+ clock-names = "iface",
+ "bus",
+ "mnoc",
+ "core",
+ "vsync";
+
+ assigned-clocks = <&mmcc MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmpd MSM8998_VDDMX>;
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-171430000 {
+ opp-hz = /bits/ 64 <171430000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-275000000 {
+ opp-hz = /bits/ 64 <275000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp-330000000 {
+ opp-hz = /bits/ 64 <330000000>;
+ required-opps = <&rpmpd_opp_nom>;
+ };
+
+ opp-412500000 {
+ opp-hz = /bits/ 64 <412500000>;
+ required-opps = <&rpmpd_opp_turbo>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ dpu_intf2_out: endpoint {
+ remote-endpoint = <&mdss_dsi1_in>;
+ };
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@c994000 {
+ compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0c994000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&mmcc MDSS_BYTE0_CLK>,
+ <&mmcc MDSS_BYTE0_INTF_CLK>,
+ <&mmcc MDSS_PCLK0_CLK>,
+ <&mmcc MDSS_ESC0_CLK>,
+ <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&mmcc BYTE0_CLK_SRC>,
+ <&mmcc PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmpd MSM8998_VDDCX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@c994400 {
+ compatible = "qcom,dsi-phy-10nm-8998";
+ reg = <0x0c994400 0x200>,
+ <0x0c994600 0x280>,
+ <0x0c994a00 0x1e0>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface", "ref";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ mdss_dsi1: dsi@c996000 {
+ compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0c996000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <5>;
+
+ clocks = <&mmcc MDSS_BYTE1_CLK>,
+ <&mmcc MDSS_BYTE1_INTF_CLK>,
+ <&mmcc MDSS_PCLK1_CLK>,
+ <&mmcc MDSS_ESC1_CLK>,
+ <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&mmcc BYTE1_CLK_SRC>,
+ <&mmcc PCLK1_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi1_phy 0>,
+ <&mdss_dsi1_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmpd MSM8998_VDDCX>;
+
+ phys = <&mdss_dsi1_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi1_in: endpoint {
+ remote-endpoint = <&dpu_intf2_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi1_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi1_phy: phy@c996400 {
+ compatible = "qcom,dsi-phy-10nm-8998";
+ reg = <0x0c996400 0x200>,
+ <0x0c996600 0x280>,
+ <0x0c996a00 0x10e>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface",
+ "ref";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
};
mmss_smmu: iommu@cd00000 {
@@ -2737,10 +3007,10 @@
clocks = <&mmcc MNOC_AHB_CLK>,
<&mmcc BIMC_SMMU_AHB_CLK>,
- <&rpmcc RPM_SMD_MMAXI_CLK>,
<&mmcc BIMC_SMMU_AXI_CLK>;
- clock-names = "iface-mm", "iface-smmu",
- "bus-mm", "bus-smmu";
+ clock-names = "iface-mm",
+ "iface-smmu",
+ "bus-smmu";
#global-interrupts = <0>;
interrupts =
@@ -2764,6 +3034,8 @@
<GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+
+ power-domains = <&mmcc BIMC_SMMU_GDSC>;
};
remoteproc_adsp: remoteproc@17300000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm6125.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm6125.dtsi
index 59092a551a16..99369a0cdb61 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm6125.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm6125.dtsi
@@ -85,36 +85,42 @@
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
#io-channel-cells = <1>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
+ label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
+ label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
+ label = "die_temp";
};
- vph-pwr@83 {
+ channel@83 {
reg = <ADC5_VPH_PWR>;
qcom,pre-scaling = <1 3>;
+ label = "vph_pwr";
};
- vcoin@85 {
+ channel@85 {
reg = <ADC5_VCOIN>;
qcom,pre-scaling = <1 3>;
+ label = "vcoin";
};
- xo-therm@4c {
+ channel@4c {
reg = <ADC5_XO_THERM_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "xo_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm6150.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm6150.dtsi
index 2e6afa296141..ddbaf7280b03 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm6150.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm6150.dtsi
@@ -53,6 +53,14 @@
bias-pull-up;
linux,code = <KEY_POWER>;
};
+
+ pm6150_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ status = "disabled";
+ };
};
pm6150_temp: temp-alarm@2400 {
@@ -72,7 +80,7 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
label = "die_temp";
};
@@ -88,6 +96,14 @@
status = "disabled";
};
+ pm6150_rtc: rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>, <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
pm6150_gpios: gpio@c000 {
compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm6150l.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm6150l.dtsi
index 6f7aa67501e2..d13a1ab7c20b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm6150l.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm6150l.dtsi
@@ -60,25 +60,25 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- adc-chan@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- adc-chan@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
};
- adc-chan@83 {
+ channel@83 {
reg = <ADC5_VPH_PWR>;
qcom,pre-scaling = <1 3>;
label = "vph_pwr";
@@ -121,8 +121,9 @@
pm6150l_wled: leds@d800 {
compatible = "qcom,pm6150l-wled";
reg = <0xd800>, <0xd900>;
- interrupts = <0x5 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "ovp";
+ interrupts = <0x5 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
+ <0x5 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ovp", "short";
label = "backlight";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm660.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm660.dtsi
index 4bc717917f44..98dc04962fe3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm660.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm660.dtsi
@@ -91,82 +91,93 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- ref_gnd: ref_gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,decimation = <1024>;
qcom,pre-scaling = <1 1>;
+ label = "ref_gnd";
};
- vref_1p25: vref_1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,decimation = <1024>;
qcom,pre-scaling = <1 1>;
+ label = "vref_1p25";
};
- die_temp: die_temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,decimation = <1024>;
qcom,pre-scaling = <1 1>;
+ label = "die_temp";
};
- xo_therm: xo_therm@4c {
+ channel@4c {
reg = <ADC5_XO_THERM_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,decimation = <1024>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "xo_therm";
};
- msm_therm: msm_therm@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,decimation = <1024>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "msm_therm";
};
- emmc_therm: emmc_therm@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,decimation = <1024>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "emmc_therm";
};
- pa_therm0: thermistor0@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,decimation = <1024>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "pa_therm0";
};
- pa_therm1: thermistor1@50 {
+ channel@50 {
reg = <ADC5_AMUX_THM4_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,decimation = <1024>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "pa_therm1";
};
- quiet_therm: quiet_therm@51 {
+ channel@51 {
reg = <ADC5_AMUX_THM5_100K_PU>;
qcom,pre-scaling = <1 1>;
qcom,decimation = <1024>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
+ label = "quiet_therm";
};
- vadc_vph_pwr: vph_pwr@83 {
+ channel@83 {
reg = <ADC5_VPH_PWR>;
qcom,decimation = <1024>;
qcom,pre-scaling = <1 3>;
+ label = "vph_pwr";
};
- vcoin: vcoin@85 {
+ channel@85 {
reg = <ADC5_VCOIN>;
qcom,decimation = <1024>;
qcom,pre-scaling = <1 3>;
+ label = "vcoin";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm660l.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm660l.dtsi
index 87b71b7205b8..6fdbf507c262 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm660l.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm660l.dtsi
@@ -74,8 +74,9 @@
pm660l_wled: leds@d800 {
compatible = "qcom,pm660l-wled";
reg = <0xd800>, <0xd900>;
- interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "ovp";
+ interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
+ <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ovp", "short";
label = "backlight";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm7250b.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm7250b.dtsi
index daa6f1d30efa..3bf7cf5d1700 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm7250b.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm7250b.dtsi
@@ -39,16 +39,16 @@
};
&spmi_bus {
- pmic@2 {
+ pmic@PM7250B_SID {
compatible = "qcom,pm7250b", "qcom,spmi-pmic";
- reg = <0x2 SPMI_USID>;
+ reg = <PM7250B_SID SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pm7250b_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
- interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <PM7250B_SID 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
io-channels = <&pm7250b_adc ADC5_DIE_TEMP>;
io-channel-names = "thermal";
#thermal-sensor-cells = <0>;
@@ -60,58 +60,58 @@
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
- interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <PM7250B_SID 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- adc-chan@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- adc-chan@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- adc-chan@2 {
+ channel@2 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
};
- adc-chan@7 {
+ channel@7 {
reg = <ADC5_USB_IN_I>;
qcom,pre-scaling = <1 1>;
label = "usb_in_i_uv";
};
- adc-chan@8 {
+ channel@8 {
reg = <ADC5_USB_IN_V_16>;
qcom,pre-scaling = <1 16>;
label = "usb_in_v_div_16";
};
- adc-chan@9 {
+ channel@9 {
reg = <ADC5_CHG_TEMP>;
qcom,pre-scaling = <1 1>;
label = "chg_temp";
};
- adc-chan@e {
+ channel@e {
reg = <ADC5_AMUX_THM2>;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
label = "smb1390_therm";
};
- adc-chan@1e {
+ channel@1e {
reg = <ADC5_MID_CHG_DIV6>;
qcom,pre-scaling = <1 6>;
label = "chg_mid";
};
- adc-chan@4b {
+ channel@4b {
reg = <ADC5_BAT_ID_100K_PU>;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
@@ -119,19 +119,19 @@
label = "bat_id";
};
- adc-chan@83 {
+ channel@83 {
reg = <ADC5_VPH_PWR>;
qcom,pre-scaling = <1 3>;
label = "vph_pwr";
};
- adc-chan@84 {
+ channel@84 {
reg = <ADC5_VBAT_SNS>;
qcom,pre-scaling = <1 3>;
label = "vbat_sns";
};
- adc-chan@99 {
+ channel@99 {
reg = <ADC5_SBUx>;
qcom,pre-scaling = <1 3>;
label = "chg_sbux";
@@ -141,17 +141,27 @@
pm7250b_adc_tm: adc-tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
- interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <PM7250B_SID 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
+
+ pm7250b_gpios: gpio@c000 {
+ compatible = "qcom,pm7250b-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ gpio-ranges = <&pm7250b_gpios 0 0 12>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
};
- pmic@3 {
+ pmic@PM7250B_SID1 {
compatible = "qcom,pm7250b", "qcom,spmi-pmic";
- reg = <0x3 SPMI_USID>;
+ reg = <PM7250B_SID1 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm7550ba.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm7550ba.dtsi
new file mode 100644
index 000000000000..8b00ece987d1
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm7550ba.dtsi
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pm7550ba-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pm7550ba_temp_alarm>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "hot";
+ };
+
+ trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+ pm7550ba: pmic@7 {
+ compatible = "qcom,pm7550ba", "qcom,spmi-pmic";
+ reg = <7 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm7550ba_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0x7 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ pm7550ba_gpios: gpio@8800 {
+ compatible = "qcom,pm7550ba-gpio", "qcom,spmi-gpio";
+ reg = <0x8800>;
+ gpio-controller;
+ gpio-ranges = <&pm7550ba_gpios 0 0 8>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm7550ba_eusb2_repeater: phy@fd00 {
+ compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater";
+ reg = <0xfd00>;
+ #phy-cells = <0>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi
index db90c55fa2cf..3ba3ba5d8fce 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi
@@ -90,19 +90,19 @@
#io-channel-cells = <1>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8150b.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8150b.dtsi
index 66752cc063d6..1aee3270ce7b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8150b.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8150b.dtsi
@@ -59,6 +59,46 @@
reg = <0x1100>;
};
+ pm8150b_typec: typec@1500 {
+ compatible = "qcom,pm8150b-typec";
+ status = "disabled";
+ reg = <0x1500>,
+ <0x1700>;
+ interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
+ <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
+ <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
+ <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "or-rid-detect-change",
+ "vpd-detect",
+ "cc-state-change",
+ "vconn-oc",
+ "vbus-change",
+ "attach-detach",
+ "legacy-cable-detect",
+ "try-snk-src-detect",
+ "sig-tx",
+ "sig-rx",
+ "msg-tx",
+ "msg-rx",
+ "msg-tx-failed",
+ "msg-tx-discarded",
+ "msg-rx-discarded",
+ "fr-swap";
+ vdd-vbus-supply = <&pm8150b_vbus>;
+ };
+
pm8150b_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
@@ -76,25 +116,25 @@
#io-channel-cells = <1>;
interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
};
- chg-temp@9 {
+ channel@9 {
reg = <ADC5_CHG_TEMP>;
qcom,pre-scaling = <1 1>;
label = "chg_temp";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8150l.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8150l.dtsi
index cca45fad75ac..ac08a09c64c2 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8150l.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8150l.dtsi
@@ -70,19 +70,19 @@
#io-channel-cells = <1>;
interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
@@ -132,5 +132,15 @@
status = "disabled";
};
+ pm8150l_wled: leds@d800 {
+ compatible = "qcom,pm8150l-wled";
+ reg = <0xd800>, <0xd900>;
+ interrupts = <0x5 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
+ <0x5 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ovp", "short";
+ label = "backlight";
+
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi
index 2dfeb99300d7..9ed9ba23e81e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi
@@ -8,7 +8,7 @@
/ {
thermal-zones {
- pm8350_thermal: pm8350c-thermal {
+ pm8350_thermal: pm8350-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pm8350_temp_alarm>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8350b.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8350b.dtsi
index f1c7bd9d079c..05c105898892 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8350b.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8350b.dtsi
@@ -8,7 +8,7 @@
/ {
thermal-zones {
- pm8350b_thermal: pm8350c-thermal {
+ pm8350b_thermal: pm8350b-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pm8350b_temp_alarm>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8350c.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8350c.dtsi
index f28e71487d5c..aa74e21fe0dc 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8350c.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8350c.dtsi
@@ -30,6 +30,12 @@
#interrupt-cells = <2>;
};
+ pm8350c_flash: led-controller@ee00 {
+ compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
+ reg = <0xee00>;
+ status = "disabled";
+ };
+
pm8350c_pwm: pwm {
compatible = "qcom,pm8350c-pwm";
#pwm-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8550.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8550.dtsi
index db3d5c17a77d..797a18c249a4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8550.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8550.dtsi
@@ -64,9 +64,6 @@
pm8550_pwm: pwm {
compatible = "qcom,pm8550-pwm", "qcom,pm8350c-pwm";
-
- #address-cells = <1>;
- #size-cells = <0>;
#pwm-cells = <2>;
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8550ve.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8550ve.dtsi
index c47646a467be..4dc1f03ab2c7 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8550ve.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8550ve.dtsi
@@ -33,16 +33,16 @@
&spmi_bus {
- pm8550ve: pmic@5 {
+ pm8550ve: pmic@PMK8550VE_SID {
compatible = "qcom,pm8550", "qcom,spmi-pmic";
- reg = <0x5 SPMI_USID>;
+ reg = <PMK8550VE_SID SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pm8550ve_temp_alarm: temp-alarm@a00 {
compatible = "qcom,spmi-temp-alarm";
reg = <0xa00>;
- interrupts = <0x5 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <PMK8550VE_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8916.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8916.dtsi
index 1ea8920ff369..4b2e8fb47d2d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8916.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8916.dtsi
@@ -41,6 +41,35 @@
};
};
+ pm8916_charger: charger@1000 {
+ compatible = "qcom,pm8916-lbc";
+ reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>;
+ reg-names = "chgr", "bat_if", "usb", "misc";
+
+ interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
+ <0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "vbat_det",
+ "fast_chg",
+ "chg_fail",
+ "chg_done",
+ "bat_pres",
+ "temp_ok",
+ "coarse_det",
+ "usb_vbus",
+ "chg_gone",
+ "overtemp";
+
+ status = "disabled";
+ };
+
pm8916_usbin: usb-detect@1300 {
compatible = "qcom,pm8941-misc";
reg = <0x1300>;
@@ -66,31 +95,50 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@0 {
+ channel@0 {
reg = <VADC_USBIN>;
qcom,pre-scaling = <1 10>;
};
- adc-chan@7 {
+ channel@7 {
reg = <VADC_VSYS>;
qcom,pre-scaling = <1 3>;
};
- adc-chan@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
};
- adc-chan@e {
+ channel@e {
reg = <VADC_GND_REF>;
};
- adc-chan@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
};
};
+ pm8916_bms: battery@4000 {
+ compatible = "qcom,pm8916-bms-vm";
+ reg = <0x4000>;
+ interrupts = <0x0 0x40 0 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 1 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 2 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 3 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 4 IRQ_TYPE_EDGE_RISING>,
+ <0x0 0x40 5 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "cv_leave",
+ "cv_enter",
+ "ocv_good",
+ "ocv_thr",
+ "fifo",
+ "state_chg";
+
+ status = "disabled";
+ };
+
rtc@6000 {
compatible = "qcom,pm8941-rtc";
reg = <0x6000>, <0x6100>;
@@ -142,9 +190,6 @@
pm8916_codec: audio-codec@f000 {
compatible = "qcom,pm8916-wcd-analog-codec";
reg = <0xf000>;
- reg-names = "pmic-codec-core";
- clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
- clock-names = "mclk";
interrupt-parent = <&spmi_bus>;
interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
<0x1 0xf0 0x1 IRQ_TYPE_NONE>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8950.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8950.dtsi
index 5ec38b7e335a..f03095779de0 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8950.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8950.dtsi
@@ -50,77 +50,90 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- vcoin@5 {
+ channel@5 {
reg = <VADC_VCOIN>;
qcom,pre-scaling = <1 1>;
+ label = "vcoin";
};
- vph-pwr@7 {
+ channel@7 {
reg = <VADC_VSYS>;
qcom,pre-scaling = <1 1>;
+ label = "vph_pwr";
};
- die-temp@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
+ label = "die_temp";
};
- ref-625mv@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
qcom,pre-scaling = <1 1>;
+ label = "ref_625mv";
};
- ref-1250mv@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
qcom,pre-scaling = <1 1>;
+ label = "ref_1250mv";
};
- ref-buf-625mv@c {
+ channel@c {
reg = <VADC_SPARE1>;
qcom,pre-scaling = <1 1>;
+ label = "ref_buf_625mv";
};
- ref-gnd@e {
+ channel@e {
reg = <VADC_GND_REF>;
+ label = "ref_gnd";
};
- ref-vdd@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
+ label = "ref_vdd";
};
- pa-therm1@11 {
+ channel@11 {
reg = <VADC_P_MUX2_1_1>;
qcom,pre-scaling = <1 1>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "pa_therm1";
};
- case-therm@13 {
+ channel@13 {
reg = <VADC_P_MUX4_1_1>;
qcom,pre-scaling = <1 1>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "case_therm";
};
- xo-therm@32 {
+ channel@32 {
reg = <VADC_LR_MUX3_XO_THERM>;
qcom,pre-scaling = <1 1>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "xo_therm";
};
- pa-therm0@36 {
+ channel@36 {
reg = <VADC_LR_MUX7_HW_ID>;
qcom,pre-scaling = <1 1>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "pa_therm0";
};
- xo-therm-buf@3c {
+ channel@3c {
reg = <VADC_LR_MUX3_BUF_XO_THERM>;
qcom,pre-scaling = <1 1>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "xo_therm_buf";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8953.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8953.dtsi
index 2268daf27fa7..1067e141be6c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8953.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8953.dtsi
@@ -6,6 +6,37 @@
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/spmi/spmi.h>
+/ {
+ thermal-zones {
+ pm8953-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pm8953_temp>;
+
+ trips {
+ trip0 {
+ temperature = <105000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <125000>;
+ hysteresis = <0>;
+ type = "hot";
+ };
+
+ trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
&spmi_bus {
pmic@0 {
compatible = "qcom,pm8953", "qcom,spmi-pmic";
@@ -36,7 +67,7 @@
};
};
- temp-alarm@2400 {
+ pm8953_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
@@ -53,22 +84,22 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
};
- adc-chan@c {
+ channel@c {
reg = <VADC_SPARE1>;
};
- adc-chan@e {
+ channel@e {
reg = <VADC_GND_REF>;
};
- adc-chan@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8994.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8994.dtsi
index 672094c8ca58..d44a95caf04a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8994.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8994.dtsi
@@ -83,27 +83,27 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@7 {
+ channel@7 {
reg = <VADC_VSYS>;
qcom,pre-scaling = <1 3>;
label = "vph_pwr";
};
- adc-chan@8 {
+ channel@8 {
reg = <VADC_DIE_TEMP>;
label = "die_temp";
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
label = "ref_625mv";
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
label = "ref_1250mv";
};
- adc-chan@e {
+ channel@e {
reg = <VADC_GND_REF>;
};
- adc-chan@f {
+ channel@f {
reg = <VADC_VDD_VADC>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pm8998.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pm8998.dtsi
index 695d79116cde..3f82715392c6 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pm8998.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pm8998.dtsi
@@ -86,7 +86,7 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
label = "die_temp";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmi8950.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmi8950.dtsi
index 4891be3cd68a..1029f3b1bb9a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmi8950.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmi8950.dtsi
@@ -20,37 +20,37 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- adc-chan@0 {
+ channel@0 {
reg = <VADC_USBIN>;
qcom,pre-scaling = <1 4>;
label = "usbin";
};
- adc-chan@1 {
+ channel@1 {
reg = <VADC_DCIN>;
qcom,pre-scaling = <1 4>;
label = "dcin";
};
- adc-chan@2 {
+ channel@2 {
reg = <VADC_VCHG_SNS>;
qcom,pre-scaling = <1 1>;
label = "vchg_sns";
};
- adc-chan@9 {
+ channel@9 {
reg = <VADC_REF_625MV>;
qcom,pre-scaling = <1 1>;
label = "ref_625mv";
};
- adc-chan@a {
+ channel@a {
reg = <VADC_REF_1250MV>;
qcom,pre-scaling = <1 1>;
label = "ref_1250mv";
};
- adc-chan@d {
+ channel@d {
reg = <VADC_SPARE2>;
qcom,pre-scaling = <1 1>;
label = "chg_temp";
@@ -87,8 +87,9 @@
pmi8950_wled: leds@d800 {
compatible = "qcom,pmi8950-wled";
reg = <0xd800>, <0xd900>;
- interrupts = <0x3 0xd8 0x02 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "short";
+ interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
+ <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ovp", "short";
label = "backlight";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmi8994.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmi8994.dtsi
index 0192968f4d9b..36d6a1fb553a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmi8994.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmi8994.dtsi
@@ -54,8 +54,9 @@
pmi8994_wled: wled@d800 {
compatible = "qcom,pmi8994-wled";
reg = <0xd800>, <0xd900>;
- interrupts = <3 0xd8 0x02 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "short";
+ interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
+ <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ovp", "short";
qcom,cabc;
qcom,external-pfet;
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmk8350.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmk8350.dtsi
index bc6297e7253e..f0ed15458dd7 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmk8350.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmk8350.dtsi
@@ -22,7 +22,7 @@
mode-bootloader = <0x02>;
};
};
-
+
&spmi_bus {
pmk8350: pmic@PMK8350_SID {
compatible = "qcom,pmk8350", "qcom,spmi-pmic";
@@ -59,7 +59,7 @@
};
pmk8350_adc_tm: adc-tm@3400 {
- compatible = "qcom,adc-tm7";
+ compatible = "qcom,spmi-adc-tm5-gen2";
reg = <0x3400>;
interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_1.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_1.dtsi
index ee1e428d3a6e..dbd4b91dfe06 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_1.dtsi
@@ -77,19 +77,19 @@
#io-channel-cells = <1>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_2.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_2.dtsi
index 1da4606e8ee6..1cee20ac2c9c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmm8155au_2.dtsi
@@ -69,19 +69,19 @@
#io-channel-cells = <1>;
interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmp8074.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmp8074.dtsi
index 580684411d74..0d0a846ac8d9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmp8074.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmp8074.dtsi
@@ -18,57 +18,66 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
+ label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
+ label = "vref_1p25";
};
- vref-vadc@2 {
+ channel@2 {
reg = <ADC5_VREF_VADC>;
qcom,pre-scaling = <1 1>;
+ label = "vref_vadc";
};
- pmic_die: die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
+ label = "pmic_die";
};
- xo_therm: xo-temp@76 {
+ channel@76 {
reg = <ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "xo_therm";
};
- pa_therm1: thermistor1@77 {
+ channel@77 {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "pa_therm1";
};
- pa_therm2: thermistor2@78 {
+ channel@78 {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "pa_therm2";
};
- pa_therm3: thermistor3@79 {
+ channel@79 {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "pa_therm3";
};
- vph-pwr@131 {
+ channel@131 {
reg = <ADC5_VPH_PWR>;
qcom,pre-scaling = <1 3>;
+ label = "vph_pwr";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmr735b.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmr735b.dtsi
index ec24c4478005..f7473e247322 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pmr735b.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmr735b.dtsi
@@ -8,7 +8,7 @@
/ {
thermal-zones {
- pmr735a_thermal: pmr735a-thermal {
+ pmr735b_thermal: pmr735b-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pmr735b_temp_alarm>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmr735d_a.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmr735d_a.dtsi
new file mode 100644
index 000000000000..37daaefe3431
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmr735d_a.dtsi
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022, Linaro Limited
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pmr735d-k-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pmr735d_k_temp_alarm>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "hot";
+ };
+ };
+ };
+ };
+};
+
+
+&spmi_bus {
+ pmr735d_k: pmic@a {
+ compatible = "qcom,pmr735d", "qcom,spmi-pmic";
+ reg = <0xa SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmr735d_k_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0xa 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ pmr735d_k_gpios: gpio@8800 {
+ compatible = "qcom,pmr735d-gpio", "qcom,spmi-gpio";
+ reg = <0x8800>;
+ gpio-controller;
+ gpio-ranges = <&pmr735d_k_gpios 0 0 2>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmr735d_b.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmr735d_b.dtsi
new file mode 100644
index 000000000000..3b470f6ac46f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmr735d_b.dtsi
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022, Linaro Limited
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pmr735d-l-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pmr735d_l_temp_alarm>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "hot";
+ };
+ };
+ };
+ };
+};
+
+
+&spmi_bus {
+ pmr735d_l: pmic@b {
+ compatible = "qcom,pmr735d", "qcom,spmi-pmic";
+ reg = <0xb SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmr735d_l_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0xb 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ pmr735d_l_gpios: gpio@8800 {
+ compatible = "qcom,pmr735d-gpio", "qcom,spmi-gpio";
+ reg = <0x8800>;
+ gpio-controller;
+ gpio-ranges = <&pmr735d_l_gpios 0 0 2>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pms405.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pms405.dtsi
index 22edb47c6a84..461ad97032f7 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/pms405.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/pms405.dtsi
@@ -81,45 +81,52 @@
#size-cells = <0>;
#io-channel-cells = <1>;
- ref_gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
+ label = "ref_gnd";
};
- vref_1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
+ label = "vref_1p25";
};
- pon_1: vph_pwr@131 {
+ channel@131 {
reg = <ADC5_VPH_PWR>;
qcom,pre-scaling = <1 3>;
+ label = "vph_pwr";
};
- die_temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
+ label = "die_temp";
};
- pa_therm1: thermistor1@77 {
+ channel@77 {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "pa_therm1";
};
- pa_therm3: thermistor3@79 {
+ channel@79 {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "pa_therm3";
};
- xo_therm: xo_temp@76 {
+ channel@76 {
reg = <ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "xo_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/pmx75.dtsi b/sys/contrib/device-tree/src/arm64/qcom/pmx75.dtsi
new file mode 100644
index 000000000000..373e45f63dff
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/pmx75.dtsi
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pmx75-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pmx75_temp_alarm>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "hot";
+ };
+
+ trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+ pmx75: pmic@1 {
+ compatible = "qcom,pmx75", "qcom,spmi-pmic";
+ reg = <1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmx75_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
+ pmx75_gpios: gpio@8800 {
+ compatible = "qcom,pmx75-gpio", "qcom,spmi-gpio";
+ reg = <0x8800>;
+ gpio-controller;
+ gpio-ranges = <&pmx75_gpios 0 0 16>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qcm2290.dtsi b/sys/contrib/device-tree/src/arm64/qcom/qcm2290.dtsi
index 0ed11e80e5e2..0911fb08ed63 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qcm2290.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/qcm2290.dtsi
@@ -5,12 +5,15 @@
* Based on sm6115.dtsi and previous efforts by Shawn Guo & Loic Poulain.
*/
+#include <dt-bindings/clock/qcom,dispcc-qcm2290.h>
#include <dt-bindings/clock/qcom,gcc-qcm2290.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/dma/qcom-gpi.h>
#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interconnect/qcom,qcm2290.h>
+#include <dt-bindings/interconnect/qcom,rpm-icc.h>
#include <dt-bindings/power/qcom-rpmpd.h>
/ {
@@ -150,6 +153,8 @@
clocks = <&rpmcc RPM_SMD_CE1_CLK>;
clock-names = "core";
#reset-cells = <1>;
+ interconnects = <&system_noc MASTER_CRYPTO_CORE0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
};
};
@@ -194,10 +199,94 @@
CLUSTER_PD: power-domain-cpu-cluster {
#power-domain-cells = <0>;
+ power-domains = <&mpm>;
domain-idle-states = <&CLUSTER_SLEEP>;
};
};
+ rpm: remoteproc {
+ compatible = "qcom,qcm2290-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+ interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-qcm2290";
+ qcom,glink-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-qcm2290", "qcom,rpmcc";
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ #clock-cells = <1>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,qcm2290-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_min_svs: opp1 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
+
+ rpmpd_opp_low_svs: opp2 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
+
+ rpmpd_opp_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
+
+ rpmpd_opp_svs_plus: opp4 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
+
+ rpmpd_opp_nom: opp5 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
+
+ rpmpd_opp_nom_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp7 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
+
+ rpmpd_opp_turbo_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
+ };
+ };
+ };
+ };
+ };
+
+ mpm: interrupt-controller {
+ compatible = "qcom,mpm";
+ qcom,rpm-msg-ram = <&apss_mpm>;
+ interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
+ mboxes = <&apcs_glb 1>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ #power-domain-cells = <0>;
+ interrupt-parent = <&intc>;
+ qcom,mpm-pin-count = <96>;
+ qcom,mpm-pin-map = <2 275>, /* TSENS0 uplow */
+ <5 296>, /* Soundwire master_irq */
+ <12 422>, /* DWC3 ss_phy_irq */
+ <24 79>, /* Soundwire wake_irq */
+ <86 183>, /* MPM wake, SPMI */
+ <90 260>; /* QUSB2_PHY DP+DM */
+ };
+ };
+
reserved_memory: reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -288,67 +377,6 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
- interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-qcm2290";
- qcom,glink-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-qcm2290", "qcom,rpmcc";
- clocks = <&xo_board>;
- clock-names = "xo";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,qcm2290-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_min_svs: opp1 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
-
- rpmpd_opp_low_svs: opp2 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
-
- rpmpd_opp_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
-
- rpmpd_opp_svs_plus: opp4 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
-
- rpmpd_opp_nom: opp5 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
-
- rpmpd_opp_nom_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
-
- rpmpd_opp_turbo: opp7 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
-
- rpmpd_opp_turbo_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
- };
- };
- };
- };
- };
-
smp2p-adsp {
compatible = "qcom,smp2p";
qcom,smem = <443>, <429>;
@@ -420,6 +448,7 @@
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
gpio-ranges = <&tlmm 0 0 127>;
+ wakeup-parent = <&mpm>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -638,6 +667,59 @@
status = "disabled";
};
+ usb_qmpphy: phy@1615000 {
+ compatible = "qcom,qcm2290-qmp-usb3-phy";
+ reg = <0x0 0x01615000 0x0 0x1000>;
+
+ clocks = <&gcc GCC_AHB2PHY_USB_CLK>,
+ <&gcc GCC_USB3_PRIM_CLKREF_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+ clock-names = "cfg_ahb",
+ "ref",
+ "com_aux",
+ "pipe";
+
+ resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>,
+ <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>;
+ reset-names = "phy",
+ "phy_phy";
+
+ #clock-cells = <0>;
+ clock-output-names = "usb3_phy_pipe_clk_src";
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ system_noc: interconnect@1880000 {
+ compatible = "qcom,qcm2290-snoc";
+ reg = <0x0 0x01880000 0x0 0x60200>;
+ #interconnect-cells = <2>;
+
+ qup_virt: interconnect-qup {
+ compatible = "qcom,qcm2290-qup-virt";
+ #interconnect-cells = <2>;
+ };
+
+ mmnrt_virt: interconnect-mmnrt {
+ compatible = "qcom,qcm2290-mmnrt-virt";
+ #interconnect-cells = <2>;
+ };
+
+ mmrt_virt: interconnect-mmrt {
+ compatible = "qcom,qcm2290-mmrt-virt";
+ #interconnect-cells = <2>;
+ };
+ };
+
+ config_noc: interconnect@1900000 {
+ compatible = "qcom,qcm2290-cnoc";
+ reg = <0x0 0x01900000 0x0 0x8200>;
+ #interconnect-cells = <2>;
+ };
+
qfprom@1b44000 {
compatible = "qcom,qcm2290-qfprom", "qcom,qfprom";
reg = <0x0 0x01b44000 0x0 0x3000>;
@@ -650,6 +732,60 @@
};
};
+ pmu@1b8e300 {
+ compatible = "qcom,qcm2290-cpu-bwmon", "qcom,sdm845-bwmon";
+ reg = <0x0 0x01b8e300 0x0 0x600>;
+ interrupts = <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>;
+
+ operating-points-v2 = <&cpu_bwmon_opp_table>;
+ interconnects = <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG
+ &bimc SLAVE_EBI1 RPM_ACTIVE_TAG>;
+
+ cpu_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <(200 * 4 * 1000)>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <(300 * 4 * 1000)>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <(451 * 4 * 1000)>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <(547 * 4 * 1000)>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <(681 * 4 * 1000)>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <(768 * 4 * 1000)>;
+ };
+
+ opp-6 {
+ opp-peak-kBps = <(1017 * 4 * 1000)>;
+ };
+
+ opp-7 {
+ opp-peak-kBps = <(1353 * 4 * 1000)>;
+ };
+
+ opp-8 {
+ opp-peak-kBps = <(1555 * 4 * 1000)>;
+ };
+
+ opp-9 {
+ opp-peak-kBps = <(1804 * 4 * 1000)>;
+ };
+ };
+ };
+
spmi_bus: spmi@1c40000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0x0 0x01c40000 0x0 0x1100>,
@@ -662,7 +798,7 @@
"obsrvr",
"intr",
"cnfg";
- interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&mpm 86 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "periph_irq";
qcom,ee = <0>;
qcom,channel = <0>;
@@ -677,8 +813,8 @@
reg = <0x0 0x04411000 0x0 0x1ff>,
<0x0 0x04410000 0x0 0x8>;
#qcom,sensors = <10>;
- interrupts = <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&mpm 2 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow", "critical";
#thermal-sensor-cells = <1>;
};
@@ -690,9 +826,22 @@
clock-names = "core";
};
+ bimc: interconnect@4480000 {
+ compatible = "qcom,qcm2290-bimc";
+ reg = <0x0 0x04480000 0x0 0x80000>;
+ #interconnect-cells = <2>;
+ };
+
rpm_msg_ram: sram@45f0000 {
- compatible = "qcom,rpm-msg-ram";
+ compatible = "qcom,rpm-msg-ram", "mmio-sram";
reg = <0x0 0x045f0000 0x0 0x7000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x0 0x045f0000 0x7000>;
+
+ apss_mpm: sram@1b8 {
+ reg = <0x1b8 0x48>;
+ };
};
sram@4690000 {
@@ -725,13 +874,45 @@
resets = <&gcc GCC_SDCC1_BCR>;
power-domains = <&rpmpd QCM2290_VDDCX>;
+ operating-points-v2 = <&sdhc1_opp_table>;
iommus = <&apps_smmu 0xc0 0x0>;
+ interconnects = <&system_noc MASTER_SDCC_1 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_SDCC_1 RPM_ALWAYS_TAG>;
+ interconnect-names = "sdhc-ddr",
+ "cpu-sdhc";
qcom,dll-config = <0x000f642c>;
qcom,ddr-config = <0x80040868>;
bus-width = <8>;
status = "disabled";
+
+ sdhc1_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-100000000 {
+ opp-hz = /bits/ 64 <100000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ opp-peak-kBps = <250000 133320>;
+ opp-avg-kBps = <102400 65000>;
+ };
+
+ opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ opp-peak-kBps = <800000 300000>;
+ opp-avg-kBps = <204800 200000>;
+ };
+
+ opp-384000000 {
+ opp-hz = /bits/ 64 <384000000>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ opp-peak-kBps = <800000 300000>;
+ opp-avg-kBps = <204800 200000>;
+ };
+ };
};
sdhc_2: mmc@4784000 {
@@ -755,6 +936,12 @@
power-domains = <&rpmpd QCM2290_VDDCX>;
operating-points-v2 = <&sdhc2_opp_table>;
iommus = <&apps_smmu 0xa0 0x0>;
+ interconnects = <&system_noc MASTER_SDCC_2 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_SDCC_2 RPM_ALWAYS_TAG>;
+ interconnect-names = "sdhc-ddr",
+ "cpu-sdhc";
qcom,dll-config = <0x0007642c>;
qcom,ddr-config = <0x80040868>;
@@ -768,11 +955,15 @@
opp-100000000 {
opp-hz = /bits/ 64 <100000000>;
required-opps = <&rpmpd_opp_low_svs>;
+ opp-peak-kBps = <250000 133320>;
+ opp-avg-kBps = <261438 150000>;
};
opp-202000000 {
opp-hz = /bits/ 64 <202000000>;
required-opps = <&rpmpd_opp_svs_plus>;
+ opp-peak-kBps = <800000 300000>;
+ opp-avg-kBps = <261438 300000>;
};
};
};
@@ -790,7 +981,7 @@
<GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>;
- dma-channels = <10>;
+ dma-channels = <10>;
dma-channel-mask = <0x1f>;
iommus = <&apps_smmu 0xf6 0x0>;
#dma-cells = <3>;
@@ -820,6 +1011,15 @@
dmas = <&gpi_dma0 0 0 QCOM_GPI_I2C>,
<&gpi_dma0 1 0 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -836,6 +1036,12 @@
dmas = <&gpi_dma0 0 0 QCOM_GPI_SPI>,
<&gpi_dma0 1 0 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -849,6 +1055,12 @@
clock-names = "se";
pinctrl-0 = <&qup_uart0_default>;
pinctrl-names = "default";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -863,6 +1075,15 @@
dmas = <&gpi_dma0 0 1 QCOM_GPI_I2C>,
<&gpi_dma0 1 1 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -879,6 +1100,12 @@
dmas = <&gpi_dma0 0 1 QCOM_GPI_SPI>,
<&gpi_dma0 1 1 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -895,6 +1122,15 @@
dmas = <&gpi_dma0 0 2 QCOM_GPI_I2C>,
<&gpi_dma0 1 2 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -911,6 +1147,12 @@
dmas = <&gpi_dma0 0 2 QCOM_GPI_SPI>,
<&gpi_dma0 1 2 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -927,6 +1169,15 @@
dmas = <&gpi_dma0 0 3 QCOM_GPI_I2C>,
<&gpi_dma0 1 3 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -943,6 +1194,12 @@
dmas = <&gpi_dma0 0 3 QCOM_GPI_SPI>,
<&gpi_dma0 1 3 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -959,6 +1216,15 @@
dmas = <&gpi_dma0 0 4 QCOM_GPI_I2C>,
<&gpi_dma0 1 4 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -975,6 +1241,12 @@
dmas = <&gpi_dma0 0 4 QCOM_GPI_SPI>,
<&gpi_dma0 1 4 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -988,6 +1260,12 @@
clock-names = "se";
pinctrl-0 = <&qup_uart4_default>;
pinctrl-names = "default";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1002,6 +1280,15 @@
dmas = <&gpi_dma0 0 5 QCOM_GPI_I2C>,
<&gpi_dma0 1 5 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1018,6 +1305,12 @@
dmas = <&gpi_dma0 0 5 QCOM_GPI_SPI>,
<&gpi_dma0 1 5 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc MASTER_APPSS_PROC RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1027,9 +1320,10 @@
usb: usb@4ef8800 {
compatible = "qcom,qcm2290-dwc3", "qcom,dwc3";
reg = <0x0 0x04ef8800 0x0 0x400>;
- interrupts = <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "hs_phy_irq", "ss_phy_irq";
+ interrupts-extended = <&intc GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
+ <&mpm 12 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hs_phy_irq",
+ "ss_phy_irq";
clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>,
<&gcc GCC_USB30_PRIM_MASTER_CLK>,
@@ -1050,6 +1344,13 @@
resets = <&gcc GCC_USB30_PRIM_BCR>;
power-domains = <&gcc GCC_USB30_PRIM_GDSC>;
+ /* TODO: USB<->IPA path */
+ interconnects = <&system_noc MASTER_USB3_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_USB3 RPM_ALWAYS_TAG>;
+ interconnect-names = "usb-ddr",
+ "apps-usb";
wakeup-source;
#address-cells = <2>;
@@ -1062,8 +1363,8 @@
compatible = "snps,dwc3";
reg = <0x0 0x04e00000 0x0 0xcd00>;
interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&usb_hsphy>;
- phy-names = "usb2-phy";
+ phys = <&usb_hsphy>, <&usb_qmpphy>;
+ phy-names = "usb2-phy", "usb3-phy";
iommus = <&apps_smmu 0x120 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
@@ -1075,6 +1376,225 @@
};
};
+ mdss: display-subsystem@5e00000 {
+ compatible = "qcom,qcm2290-mdss";
+ reg = <0x0 0x05e00000 0x0 0x1000>;
+ reg-names = "mdss";
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ clocks = <&gcc GCC_DISP_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface",
+ "bus",
+ "core";
+
+ resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
+
+ power-domains = <&dispcc MDSS_GDSC>;
+
+ iommus = <&apps_smmu 0x420 0x2>,
+ <&apps_smmu 0x421 0x0>;
+ interconnects = <&mmrt_virt MASTER_MDP0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ALWAYS_TAG
+ &config_noc SLAVE_DISPLAY_CFG RPM_ALWAYS_TAG>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ mdp: display-controller@5e01000 {
+ compatible = "qcom,qcm2290-dpu";
+ reg = <0x0 0x05e01000 0x0 0x8f000>,
+ <0x0 0x05eb0000 0x0 0x2008>;
+ reg-names = "mdp",
+ "vbif";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "bus",
+ "iface",
+ "core",
+ "lut",
+ "vsync";
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmpd QCM2290_VDDCX>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmpd_opp_min_svs>;
+ };
+
+ opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-256000000 {
+ opp-hz = /bits/ 64 <256000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp-307200000 {
+ opp-hz = /bits/ 64 <307200000>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ };
+
+ opp-384000000 {
+ opp-hz = /bits/ 64 <384000000>;
+ required-opps = <&rpmpd_opp_nom>;
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@5e94000 {
+ compatible = "qcom,qcm2290-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x0 0x05e94000 0x0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmpd QCM2290_VDDCX>;
+ phys = <&mdss_dsi0_phy>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ dsi_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmpd_opp_min_svs>;
+ };
+
+ opp-164000000 {
+ opp-hz = /bits/ 64 <164000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-187500000 {
+ opp-hz = /bits/ 64 <187500000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@5e94400 {
+ compatible = "qcom,dsi-phy-14nm-2290";
+ reg = <0x0 0x05e94400 0x0 0x100>,
+ <0x0 0x05e94500 0x0 0x300>,
+ <0x0 0x05e94800 0x0 0x188>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface",
+ "ref";
+
+ power-domains = <&rpmpd QCM2290_VDDMX>;
+ required-opps = <&rpmpd_opp_nom>;
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ dispcc: clock-controller@5f00000 {
+ compatible = "qcom,qcm2290-dispcc";
+ reg = <0x0 0x05f00000 0x0 0x20000>;
+ clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
+ <&rpmcc RPM_SMD_XO_A_CLK_SRC>,
+ <&gcc GCC_DISP_GPLL0_CLK_SRC>,
+ <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>;
+ clock-names = "bi_tcxo",
+ "bi_tcxo_ao",
+ "gcc_disp_gpll0_clk_src",
+ "gcc_disp_gpll0_div_clk_src",
+ "dsi0_phy_pll_out_byteclk",
+ "dsi0_phy_pll_out_dsiclk";
+ #power-domain-cells = <1>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
remoteproc_mpss: remoteproc@6080000 {
compatible = "qcom,qcm2290-mpss-pas", "qcom,sm6115-mpss-pas";
reg = <0x0 0x06080000 0x0 0x100>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qcm6490-fairphone-fp5.dts b/sys/contrib/device-tree/src/arm64/qcom/qcm6490-fairphone-fp5.dts
new file mode 100644
index 000000000000..176898c9dbbd
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/qcm6490-fairphone-fp5.dts
@@ -0,0 +1,921 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Luca Weiss <luca.weiss@fairphone.com>
+ */
+
+/dts-v1/;
+
+/* PM7250B is configured to use SID8/9 */
+#define PM7250B_SID 8
+#define PM7250B_SID1 9
+
+#include <dt-bindings/iio/qcom,spmi-adc7-pm7325.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sc7280.dtsi"
+#include "pm7250b.dtsi"
+#include "pm7325.dtsi"
+#include "pm8350c.dtsi" /* PM7350C */
+#include "pmk8350.dtsi" /* PMK7325 */
+
+/delete-node/ &rmtfs_mem;
+
+/ {
+ model = "Fairphone 5";
+ compatible = "fairphone,fp5", "qcom,qcm6490";
+ chassis-type = "handset";
+
+ aliases {
+ serial0 = &uart5;
+ serial1 = &uart7;
+ };
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ framebuffer0: framebuffer@a000000 {
+ compatible = "simple-framebuffer";
+ reg = <0x0 0xe1000000 0x0 (2700 * 1224 * 4)>;
+ width = <1224>;
+ height = <2700>;
+ stride = <(1224 * 4)>;
+ format = "a8r8g8b8";
+ clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&volume_down_default>, <&hall_sensor_default>;
+ pinctrl-names = "default";
+
+ key-volume-up {
+ label = "Volume up";
+ gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ };
+
+ /* Powered by the always-on vreg_l8c */
+ event-hall-sensor {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 155 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ wakeup-source;
+ };
+ };
+
+ reserved-memory {
+ cont_splash_mem: cont-splash@e1000000 {
+ reg = <0x0 0xe1000000 0x0 0x2300000>;
+ no-map;
+ };
+
+ cdsp_mem: cdsp@88f00000 {
+ reg = <0x0 0x88f00000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ rmtfs_mem: memory@f8500000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0x0 0xf8500000 0x0 0x600000>;
+ no-map;
+
+ qcom,client-id = <1>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>, <QCOM_SCM_VMID_NAV>;
+ };
+ };
+
+ ois_avdd0_1p8: regulator-ois-avdd0-1p8 {
+ compatible = "regulator-fixed";
+ regulator-name = "OIS_AVDD0_1P8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&tlmm 157 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&vreg_bob>;
+ };
+
+ ois_dvdd_1p1: regulator-ois-dvdd-1p1 {
+ compatible = "regulator-fixed";
+ regulator-name = "OIS_DVDD_1P1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ gpio = <&tlmm 97 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&vreg_s8b>;
+ };
+
+ afvdd_2p8: regulator-afvdd-2p8 {
+ compatible = "regulator-fixed";
+ regulator-name = "AFVDD_2P8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ gpio = <&tlmm 68 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ vin-supply = <&vreg_bob>;
+ };
+
+ thermal-zones {
+ camera-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 2>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ chg-skin-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm7250b_adc_tm 0>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ conn-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm7250b_adc_tm 1>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ quiet-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 1>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ rear-cam-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 4>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ sdm-skin-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 3>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ xo-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 0>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm7325-rpmh-regulators";
+ qcom,pmic-id = "b";
+
+ vreg_s1b: smps1 {
+ regulator-min-microvolt = <1840000>;
+ regulator-max-microvolt = <2040000>;
+ };
+
+ vreg_s7b: smps7 {
+ regulator-min-microvolt = <535000>;
+ regulator-max-microvolt = <1120000>;
+ };
+
+ vreg_s8b: smps8 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_RET>;
+ };
+
+ vreg_l1b: ldo1 {
+ regulator-min-microvolt = <825000>;
+ regulator-max-microvolt = <925000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b: ldo2 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3b: ldo3 {
+ regulator-min-microvolt = <312000>;
+ regulator-max-microvolt = <910000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b: ldo6 {
+ regulator-min-microvolt = <1140000>;
+ regulator-max-microvolt = <1260000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b: ldo7 {
+ /* Constrained for UFS VCC, at least until UFS driver scales voltage */
+ regulator-min-microvolt = <2952000>;
+ regulator-max-microvolt = <2952000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b: ldo8 {
+ regulator-min-microvolt = <870000>;
+ regulator-max-microvolt = <970000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b: ldo9 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11b: ldo11 {
+ regulator-min-microvolt = <1504000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b: ldo12 {
+ regulator-min-microvolt = <751000>;
+ regulator-max-microvolt = <824000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b: ldo13 {
+ regulator-min-microvolt = <530000>;
+ regulator-max-microvolt = <824000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b: ldo14 {
+ regulator-min-microvolt = <1080000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b: ldo15 {
+ regulator-min-microvolt = <765000>;
+ regulator-max-microvolt = <1020000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b: ldo16 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b: ldo17 {
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18b: ldo18 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l19b: ldo19 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8350c-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vreg_s1c: smps1 {
+ regulator-min-microvolt = <2190000>;
+ regulator-max-microvolt = <2210000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s9c: smps9 {
+ regulator-min-microvolt = <1010000>;
+ regulator-max-microvolt = <1170000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1c: ldo1 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1980000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c: ldo2 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c: ldo3 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4c: ldo4 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5c: ldo5 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c: ldo6 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c: ldo7 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c: ldo8 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ /* Hall sensor VDD */
+ regulator-always-on;
+ };
+
+ vreg_l9c: ldo9 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c: ldo10 {
+ regulator-min-microvolt = <720000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c: ldo11 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12c: ldo12 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13c: ldo13 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob: bob {
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+ };
+};
+
+&dispcc {
+ /* Disable for now so simple-framebuffer continues working */
+ status = "disabled";
+};
+
+&gcc {
+ protected-clocks = <GCC_CFG_NOC_LPASS_CLK>,
+ <GCC_EDP_CLKREF_EN>,
+ <GCC_MSS_CFG_AHB_CLK>,
+ <GCC_MSS_GPLL0_MAIN_DIV_CLK_SRC>,
+ <GCC_MSS_OFFLINE_AXI_CLK>,
+ <GCC_MSS_Q6SS_BOOT_CLK_SRC>,
+ <GCC_MSS_Q6_MEMNOC_AXI_CLK>,
+ <GCC_MSS_SNOC_AXI_CLK>,
+ <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
+ <GCC_QSPI_CORE_CLK>,
+ <GCC_QSPI_CORE_CLK_SRC>,
+ <GCC_SEC_CTRL_CLK_SRC>,
+ <GCC_WPSS_AHB_BDG_MST_CLK>,
+ <GCC_WPSS_AHB_CLK>,
+ <GCC_WPSS_RSCP_CLK>;
+};
+
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
+&i2c1 {
+ status = "okay";
+
+ /* PM8008 PMIC @ 8 and 9 */
+ /* Pixelworks @ 26 */
+ /* FSA4480 USB audio switch @ 42 */
+ /* AW86927FCR haptics @ 5a */
+};
+
+&i2c2 {
+ status = "okay";
+
+ /* AW88261FCR amplifier @ 34 */
+ /* AW88261FCR amplifier @ 35 */
+};
+
+&i2c4 {
+ status = "okay";
+
+ /* PTN36502 USB redriver @ 1a */
+};
+
+&i2c9 {
+ status = "okay";
+
+ /* ST21NFC NFC @ 28 */
+ /* VL53L3 ToF @ 29 */
+};
+
+&ipa {
+ qcom,gsi-loader = "self";
+ memory-region = <&ipa_fw_mem>;
+ firmware-name = "qcom/qcm6490/fairphone5/ipa_fws.mdt";
+ status = "okay";
+};
+
+&pm7250b_adc {
+ channel@4d {
+ reg = <ADC5_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "charger_skin_therm";
+ };
+
+ channel@4f {
+ reg = <ADC5_AMUX_THM3_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "conn_therm";
+ };
+};
+
+&pm7250b_adc_tm {
+ status = "okay";
+
+ charger-skin-therm@0 {
+ reg = <0>;
+ io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ conn-therm@1 {
+ reg = <1>;
+ io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
+&pm7325_gpios {
+ volume_down_default: volume-down-default-state {
+ pins = "gpio6";
+ function = PMIC_GPIO_FUNC_NORMAL;
+ power-source = <1>;
+ bias-pull-up;
+ input-enable;
+ };
+};
+
+&pm8350c_flash {
+ status = "okay";
+
+ led-0 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ led-sources = <1>, <4>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <1500000>;
+ flash-max-timeout-us = <1280000>;
+ };
+};
+
+&pmk8350_adc_tm {
+ status = "okay";
+
+ xo-therm@0 {
+ reg = <0>;
+ io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ quiet-therm@1 {
+ reg = <1>;
+ io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ cam-flash-therm@2 {
+ reg = <2>;
+ io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM2_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ sdm-skin-therm@3 {
+ reg = <3>;
+ io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM3_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ wide-rfc-therm@4 {
+ reg = <4>;
+ io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM4_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
+&pmk8350_rtc {
+ status = "okay";
+};
+
+&pmk8350_vadc {
+ status = "okay";
+
+ channel@44 {
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "pmk8350_xo_therm";
+ };
+
+ channel@144 {
+ reg = <PM7325_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "pm7325_quiet_therm";
+ };
+
+ channel@145 {
+ reg = <PM7325_ADC7_AMUX_THM2_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "pm7325_cam_flash_therm";
+ };
+
+ channel@146 {
+ reg = <PM7325_ADC7_AMUX_THM3_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "pm7325_sdm_skin_therm";
+ };
+
+ channel@147 {
+ reg = <PM7325_ADC7_AMUX_THM4_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "pm7325_wide_rfc_therm";
+ };
+};
+
+&pon_pwrkey {
+ status = "okay";
+};
+
+&pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&qup_spi13_cs {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qup_spi13_data_clk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qup_uart5_rx {
+ drive-strength = <2>;
+ bias-disable;
+};
+
+&qup_uart5_tx {
+ drive-strength = <2>;
+ bias-disable;
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&remoteproc_adsp {
+ firmware-name = "qcom/qcm6490/fairphone5/adsp.mbn";
+ status = "okay";
+};
+
+&remoteproc_cdsp {
+ firmware-name = "qcom/qcm6490/fairphone5/cdsp.mbn";
+ status = "okay";
+};
+
+&remoteproc_mpss {
+ firmware-name = "qcom/qcm6490/fairphone5/modem.mbn";
+ status = "okay";
+};
+
+&remoteproc_wpss {
+ firmware-name = "qcom/qcm6490/fairphone5/wpss.mbn";
+ status = "okay";
+};
+
+&sdc2_clk {
+ drive-strength = <16>;
+ bias-disable;
+};
+
+&sdc2_cmd {
+ drive-strength = <10>;
+ bias-pull-up;
+};
+
+&sdc2_data {
+ drive-strength = <10>;
+ bias-pull-up;
+};
+
+&sdhc_2 {
+ vmmc-supply = <&vreg_l9c>;
+ vqmmc-supply = <&vreg_l6c>;
+
+ pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>;
+ pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>;
+
+ status = "okay";
+};
+
+&spi13 {
+ status = "okay";
+
+ /* Goodix touchscreen @ 0 */
+};
+
+&tlmm {
+ /*
+ * 32-33: SMB1394 (SPMI)
+ * 56-59: fingerprint reader (SPI)
+ */
+ gpio-reserved-ranges = <32 2>, <56 4>;
+
+ bluetooth_enable_default: bluetooth-enable-default-state {
+ pins = "gpio85";
+ function = "gpio";
+ output-low;
+ bias-disable;
+ };
+
+ hall_sensor_default: hall-sensor-default-state {
+ pins = "gpio155";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_uart7_sleep_cts: qup-uart7-sleep-cts-state {
+ pins = "gpio28";
+ function = "gpio";
+ /*
+ * Configure a bias-bus-hold on CTS to lower power
+ * usage when Bluetooth is turned off. Bus hold will
+ * maintain a low power state regardless of whether
+ * the Bluetooth module drives the pin in either
+ * direction or leaves the pin fully unpowered.
+ */
+ bias-bus-hold;
+ };
+
+ qup_uart7_sleep_rts: qup-uart7-sleep-rts-state {
+ pins = "gpio29";
+ function = "gpio";
+ /*
+ * Configure pull-down on RTS. As RTS is active low
+ * signal, pull it low to indicate the BT SoC that it
+ * can wakeup the system anytime from suspend state by
+ * pulling RX low (by sending wakeup bytes).
+ */
+ bias-pull-down;
+ };
+
+ qup_uart7_sleep_tx: qup-uart7-sleep-tx-state {
+ pins = "gpio30";
+ function = "gpio";
+ /*
+ * Configure pull-up on TX when it isn't actively driven
+ * to prevent BT SoC from receiving garbage during sleep.
+ */
+ bias-pull-up;
+ };
+
+ qup_uart7_sleep_rx: qup-uart7-sleep-rx-state {
+ pins = "gpio31";
+ function = "gpio";
+ /*
+ * Configure a pull-up on RX. This is needed to avoid
+ * garbage data when the TX pin of the Bluetooth module
+ * is floating which may cause spurious wakeups.
+ */
+ bias-pull-up;
+ };
+
+ sw_ctrl_default: sw-ctrl-default-state {
+ pins = "gpio86";
+ function = "gpio";
+ bias-pull-down;
+ };
+};
+
+&uart5 {
+ compatible = "qcom,geni-debug-uart";
+ status = "okay";
+};
+
+&uart7 {
+ /delete-property/interrupts;
+ interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
+ <&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
+ pinctrl-names = "default", "sleep";
+
+ status = "okay";
+
+ bluetooth: bluetooth {
+ compatible = "qcom,wcn6750-bt";
+
+ pinctrl-0 = <&bluetooth_enable_default>, <&sw_ctrl_default>;
+ pinctrl-names = "default";
+
+ enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
+ swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+
+ vddio-supply = <&vreg_l19b>;
+ vddaon-supply = <&vreg_s7b>;
+ vddbtcxmx-supply = <&vreg_s7b>;
+ vddrfacmn-supply = <&vreg_s7b>;
+ vddrfa0p8-supply = <&vreg_s7b>;
+ vddrfa1p7-supply = <&vreg_s1b>;
+ vddrfa1p2-supply = <&vreg_s8b>;
+ vddrfa2p2-supply = <&vreg_s1c>;
+ vddasd-supply = <&vreg_l11c>;
+
+ max-speed = <3200000>;
+ };
+};
+
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+
+ vcc-supply = <&vreg_l7b>;
+ vcc-max-microamp = <800000>;
+ /*
+ * Technically l9b enables an eLDO (supplied by s1b) which then powers
+ * VCCQ2 of the UFS.
+ */
+ vccq-supply = <&vreg_l9b>;
+ vccq-max-microamp = <900000>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l10c>;
+ vdda-pll-supply = <&vreg_l6b>;
+
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l10c>;
+ vdda18-supply = <&vreg_l1c>;
+ vdda33-supply = <&vreg_l2b>;
+
+ qcom,hs-crossover-voltage-microvolt = <28000>;
+ qcom,hs-output-impedance-micro-ohms = <2600000>;
+ qcom,hs-rise-fall-time-bp = <5430>;
+ qcom,hs-disconnect-bp = <1743>;
+ qcom,hs-amplitude-bp = <2430>;
+
+ qcom,pre-emphasis-amplitude-bp = <20000>;
+ qcom,pre-emphasis-duration-bp = <20000>;
+
+ qcom,squelch-detector-bp = <(-2090)>;
+
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ vdda-phy-supply = <&vreg_l6b>;
+ vdda-pll-supply = <&vreg_l1b>;
+
+ status = "okay";
+};
+
+&wifi {
+ qcom,ath11k-calibration-variant = "Fairphone_5";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qcm6490-idp.dts b/sys/contrib/device-tree/src/arm64/qcom/qcm6490-idp.dts
new file mode 100644
index 000000000000..03e97e27d16d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/qcm6490-idp.dts
@@ -0,0 +1,468 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sc7280.dtsi"
+#include "pm7325.dtsi"
+#include "pm8350c.dtsi"
+#include "pmk8350.dtsi"
+
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &rmtfs_mem;
+/delete-node/ &adsp_mem;
+/delete-node/ &cdsp_mem;
+/delete-node/ &video_mem;
+/delete-node/ &wlan_ce_mem;
+/delete-node/ &wpss_mem;
+/delete-node/ &xbl_mem;
+
+/ {
+ model = "Qualcomm Technologies, Inc. QCM6490 IDP";
+ compatible = "qcom,qcm6490-idp", "qcom,qcm6490";
+ chassis-type = "embedded";
+
+ aliases {
+ serial0 = &uart5;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reserved-memory {
+ xbl_mem: xbl@80700000 {
+ reg = <0x0 0x80700000 0x0 0x100000>;
+ no-map;
+ };
+
+ cdsp_secure_heap_mem: cdsp-secure-heap@81800000 {
+ reg = <0x0 0x81800000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ camera_mem: camera@84300000 {
+ reg = <0x0 0x84300000 0x0 0x500000>;
+ no-map;
+ };
+
+ wpss_mem: wpss@84800000 {
+ reg = <0x0 0x84800000 0x0 0x1900000>;
+ no-map;
+ };
+
+ adsp_mem: adsp@86100000 {
+ reg = <0x0 0x86100000 0x0 0x2800000>;
+ no-map;
+ };
+
+ cdsp_mem: cdsp@88900000 {
+ reg = <0x0 0x88900000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ video_mem: video@8a700000 {
+ reg = <0x0 0x8a700000 0x0 0x700000>;
+ no-map;
+ };
+
+ cvp_mem: cvp@8ae00000 {
+ reg = <0x0 0x8ae00000 0x0 0x500000>;
+ no-map;
+ };
+
+ ipa_fw_mem: ipa-fw@8b300000 {
+ reg = <0x0 0x8b300000 0x0 0x10000>;
+ no-map;
+ };
+
+ ipa_gsi_mem: ipa-gsi@8b310000 {
+ reg = <0x0 0x8b310000 0x0 0xa000>;
+ no-map;
+ };
+
+ gpu_microcode_mem: gpu-microcode@8b31a000 {
+ reg = <0x0 0x8b31a000 0x0 0x2000>;
+ no-map;
+ };
+
+ mpss_mem: mpss@8b800000 {
+ reg = <0x0 0x8b800000 0x0 0xf600000>;
+ no-map;
+ };
+
+ tz_stat_mem: tz-stat@c0000000 {
+ reg = <0x0 0xc0000000 0x0 0x100000>;
+ no-map;
+ };
+
+ tags_mem: tags@c0100000 {
+ reg = <0x0 0xc0100000 0x0 0x1200000>;
+ no-map;
+ };
+
+ qtee_mem: qtee@c1300000 {
+ reg = <0x0 0xc1300000 0x0 0x500000>;
+ no-map;
+ };
+
+ trusted_apps_mem: trusted_apps@c1800000 {
+ reg = <0x0 0xc1800000 0x0 0x1c00000>;
+ no-map;
+ };
+
+ debug_vm_mem: debug-vm@d0600000 {
+ reg = <0x0 0xd0600000 0x0 0x100000>;
+ no-map;
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <4350000>;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm7325-rpmh-regulators";
+ qcom,pmic-id = "b";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-l1-l4-l12-l15-supply = <&vreg_s7b_0p972>;
+ vdd-l2-l7-supply = <&vreg_bob_3p296>;
+ vdd-l3-supply = <&vreg_s2b_0p876>;
+ vdd-l5-supply = <&vreg_s2b_0p876>;
+ vdd-l6-l9-l10-supply = <&vreg_s8b_1p272>;
+ vdd-l8-supply = <&vreg_s7b_0p972>;
+ vdd-l11-l17-l18-l19-supply = <&vreg_s1b_1p872>;
+ vdd-l13-supply = <&vreg_s7b_0p972>;
+ vdd-l14-l16-supply = <&vreg_s8b_1p272>;
+
+ vreg_s1b_1p872: smps1 {
+ regulator-min-microvolt = <1840000>;
+ regulator-max-microvolt = <2040000>;
+ };
+
+ vreg_s2b_0p876: smps2 {
+ regulator-min-microvolt = <570070>;
+ regulator-max-microvolt = <1050000>;
+ };
+
+ vreg_s7b_0p972: smps7 {
+ regulator-min-microvolt = <535000>;
+ regulator-max-microvolt = <1120000>;
+ };
+
+ vreg_s8b_1p272: smps8 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_RET>;
+ };
+
+ vreg_l1b_0p912: ldo1 {
+ regulator-min-microvolt = <825000>;
+ regulator-max-microvolt = <925000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_3p072: ldo2 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3b_0p504: ldo3 {
+ regulator-min-microvolt = <312000>;
+ regulator-max-microvolt = <910000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4b_0p752: ldo4 {
+ regulator-min-microvolt = <752000>;
+ regulator-max-microvolt = <820000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ reg_l5b_0p752: ldo5 {
+ regulator-min-microvolt = <552000>;
+ regulator-max-microvolt = <832000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p2: ldo6 {
+ regulator-min-microvolt = <1140000>;
+ regulator-max-microvolt = <1260000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_2p952: ldo7 {
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_0p904: ldo8 {
+ regulator-min-microvolt = <870000>;
+ regulator-max-microvolt = <970000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_1p2: ldo9 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11b_1p504: ldo11 {
+ regulator-min-microvolt = <1504000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_0p751: ldo12 {
+ regulator-min-microvolt = <751000>;
+ regulator-max-microvolt = <824000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_0p53: ldo13 {
+ regulator-min-microvolt = <530000>;
+ regulator-max-microvolt = <824000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_1p08: ldo14 {
+ regulator-min-microvolt = <1080000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_0p765: ldo15 {
+ regulator-min-microvolt = <765000>;
+ regulator-max-microvolt = <1020000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_1p1: ldo16 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_1p7: ldo17 {
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18b_1p8: ldo18 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l19b_1p8: ldo19 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8350c-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-s9-supply = <&vph_pwr>;
+ vdd-s10-supply = <&vph_pwr>;
+ vdd-l1-l12-supply = <&vreg_s1b_1p872>;
+ vdd-l2-l8-supply = <&vreg_s1b_1p872>;
+ vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob_3p296>;
+ vdd-l6-l9-l11-supply = <&vreg_bob_3p296>;
+ vdd-l10-supply = <&vreg_s7b_0p972>;
+ vdd-bob-supply = <&vph_pwr>;
+
+ vreg_s1c_2p19: smps1 {
+ regulator-min-microvolt = <2190000>;
+ regulator-max-microvolt = <2210000>;
+ };
+
+ vreg_s2c_0p752: smps2 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <800000>;
+ };
+
+ vreg_s5c_0p752: smps5 {
+ regulator-min-microvolt = <465000>;
+ regulator-max-microvolt = <1050000>;
+ };
+
+ vreg_s7c_0p752: smps7 {
+ regulator-min-microvolt = <465000>;
+ regulator-max-microvolt = <800000>;
+ };
+
+ vreg_s9c_1p084: smps9 {
+ regulator-min-microvolt = <1010000>;
+ regulator-max-microvolt = <1170000>;
+ };
+
+ vreg_l1c_1p8: ldo1 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1980000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_1p62: ldo2 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <1980000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_2p8: ldo3 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3540000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4c_1p62: ldo4 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5c_1p62: ldo5 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c_2p96: ldo6 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c_3p0: ldo7 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c_1p62: ldo8 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9c_2p96: ldo9 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <35440000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c_0p88: ldo10 {
+ regulator-min-microvolt = <720000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c_2p8: ldo11 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12c_1p65: ldo12 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13c_2p7: ldo13 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob_3p296: bob {
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ };
+ };
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&sdhc_1 {
+ non-removable;
+ no-sd;
+ no-sdio;
+
+ vmmc-supply = <&vreg_l7b_2p952>;
+ vqmmc-supply = <&vreg_l19b_1p8>;
+
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <32 2>, /* ADSP */
+ <48 4>; /* NFC */
+};
+
+&uart5 {
+ compatible = "qcom,geni-debug-uart";
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l10c_0p88>;
+ vdda33-supply = <&vreg_l2b_3p072>;
+ vdda18-supply = <&vreg_l1c_1p8>;
+
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ vdda-phy-supply = <&vreg_l6b_1p2>;
+ vdda-pll-supply = <&vreg_l1b_0p912>;
+
+ status = "okay";
+};
+
+&wifi {
+ memory-region = <&wlan_fw_mem>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qcs404.dtsi b/sys/contrib/device-tree/src/arm64/qcom/qcs404.dtsi
index 972f753847e1..2f2eeaf2e945 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qcs404.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/qcs404.dtsi
@@ -166,6 +166,84 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,qcs404-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-qcs404";
+ qcom,glink-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-qcs404", "qcom,rpmcc";
+ #clock-cells = <1>;
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,qcs404-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <16>;
+ };
+
+ rpmpd_opp_ret_plus: opp2 {
+ opp-level = <32>;
+ };
+
+ rpmpd_opp_min_svs: opp3 {
+ opp-level = <48>;
+ };
+
+ rpmpd_opp_low_svs: opp4 {
+ opp-level = <64>;
+ };
+
+ rpmpd_opp_svs: opp5 {
+ opp-level = <128>;
+ };
+
+ rpmpd_opp_svs_plus: opp6 {
+ opp-level = <192>;
+ };
+
+ rpmpd_opp_nom: opp7 {
+ opp-level = <256>;
+ };
+
+ rpmpd_opp_nom_plus: opp8 {
+ opp-level = <320>;
+ };
+
+ rpmpd_opp_turbo: opp9 {
+ opp-level = <384>;
+ };
+
+ rpmpd_opp_turbo_no_cpr: opp10 {
+ opp-level = <416>;
+ };
+
+ rpmpd_opp_turbo_plus: opp11 {
+ opp-level = <512>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -217,80 +295,6 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
-
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-qcs404";
- qcom,glink-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-qcs404", "qcom,rpmcc";
- #clock-cells = <1>;
- clocks = <&xo_board>;
- clock-names = "xo";
- };
-
- rpmpd: power-controller {
- compatible = "qcom,qcs404-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <16>;
- };
-
- rpmpd_opp_ret_plus: opp2 {
- opp-level = <32>;
- };
-
- rpmpd_opp_min_svs: opp3 {
- opp-level = <48>;
- };
-
- rpmpd_opp_low_svs: opp4 {
- opp-level = <64>;
- };
-
- rpmpd_opp_svs: opp5 {
- opp-level = <128>;
- };
-
- rpmpd_opp_svs_plus: opp6 {
- opp-level = <192>;
- };
-
- rpmpd_opp_nom: opp7 {
- opp-level = <256>;
- };
-
- rpmpd_opp_nom_plus: opp8 {
- opp-level = <320>;
- };
-
- rpmpd_opp_turbo: opp9 {
- opp-level = <384>;
- };
-
- rpmpd_opp_turbo_no_cpr: opp10 {
- opp-level = <416>;
- };
-
- rpmpd_opp_turbo_plus: opp11 {
- opp-level = <512>;
- };
- };
- };
- };
- };
-
smem {
compatible = "qcom,smem";
@@ -554,9 +558,6 @@
reg = <0x00400000 0x80000>;
compatible = "qcom,qcs404-bimc";
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
};
tsens: thermal-sensor@4a9000 {
@@ -597,18 +598,12 @@
reg = <0x00500000 0x15080>;
compatible = "qcom,qcs404-pcnoc";
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_PNOC_CLK>,
- <&rpmcc RPM_SMD_PNOC_A_CLK>;
};
snoc: interconnect@580000 {
reg = <0x00580000 0x23080>;
compatible = "qcom,qcs404-snoc";
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
};
remoteproc_cdsp: remoteproc@b00000 {
@@ -1457,12 +1452,12 @@
};
};
- pcie: pci@10000000 {
+ pcie: pcie@10000000 {
compatible = "qcom,pcie-qcs404";
- reg = <0x10000000 0xf1d>,
- <0x10000f20 0xa8>,
- <0x07780000 0x2000>,
- <0x10001000 0x2000>;
+ reg = <0x10000000 0xf1d>,
+ <0x10000f20 0xa8>,
+ <0x07780000 0x2000>,
+ <0x10001000 0x2000>;
reg-names = "dbi", "elbi", "parf", "config";
device_type = "pci";
linux,pci-domain = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qcs6490-rb3gen2.dts b/sys/contrib/device-tree/src/arm64/qcom/qcs6490-rb3gen2.dts
new file mode 100644
index 000000000000..8bb7d13d85f6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/qcs6490-rb3gen2.dts
@@ -0,0 +1,455 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+/* PM7250B is configured to use SID8/9 */
+#define PM7250B_SID 8
+#define PM7250B_SID1 9
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sc7280.dtsi"
+#include "pm7250b.dtsi"
+#include "pm7325.dtsi"
+#include "pm8350c.dtsi"
+#include "pmk8350.dtsi"
+
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &remoteproc_mpss;
+/delete-node/ &rmtfs_mem;
+/delete-node/ &adsp_mem;
+/delete-node/ &cdsp_mem;
+/delete-node/ &video_mem;
+/delete-node/ &wlan_ce_mem;
+/delete-node/ &wpss_mem;
+/delete-node/ &xbl_mem;
+
+/ {
+ model = "Qualcomm Technologies, Inc. Robotics RB3gen2";
+ compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
+ chassis-type = "embedded";
+
+ aliases {
+ serial0 = &uart5;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reserved-memory {
+ xbl_mem: xbl@80700000 {
+ reg = <0x0 0x80700000 0x0 0x100000>;
+ no-map;
+ };
+
+ cdsp_secure_heap_mem: cdsp-secure-heap@81800000 {
+ reg = <0x0 0x81800000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ camera_mem: camera@84300000 {
+ reg = <0x0 0x84300000 0x0 0x500000>;
+ no-map;
+ };
+
+ wpss_mem: wpss@84800000 {
+ reg = <0x0 0x84800000 0x0 0x1900000>;
+ no-map;
+ };
+
+ adsp_mem: adsp@86100000 {
+ reg = <0x0 0x86100000 0x0 0x2800000>;
+ no-map;
+ };
+
+ cdsp_mem: cdsp@88900000 {
+ reg = <0x0 0x88900000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ video_mem: video@8a700000 {
+ reg = <0x0 0x8a700000 0x0 0x700000>;
+ no-map;
+ };
+
+ cvp_mem: cvp@8ae00000 {
+ reg = <0x0 0x8ae00000 0x0 0x500000>;
+ no-map;
+ };
+
+ ipa_fw_mem: ipa-fw@8b300000 {
+ reg = <0x0 0x8b300000 0x0 0x10000>;
+ no-map;
+ };
+
+ ipa_gsi_mem: ipa-gsi@8b310000 {
+ reg = <0x0 0x8b310000 0x0 0xa000>;
+ no-map;
+ };
+
+ gpu_microcode_mem: gpu-microcode@8b31a000 {
+ reg = <0x0 0x8b31a000 0x0 0x2000>;
+ no-map;
+ };
+
+ tz_stat_mem: tz-stat@c0000000 {
+ reg = <0x0 0xc0000000 0x0 0x100000>;
+ no-map;
+ };
+
+ tags_mem: tags@c0100000 {
+ reg = <0x0 0xc0100000 0x0 0x1200000>;
+ no-map;
+ };
+
+ qtee_mem: qtee@c1300000 {
+ reg = <0x0 0xc1300000 0x0 0x500000>;
+ no-map;
+ };
+
+ trusted_apps_mem: trusted_apps@c1800000 {
+ reg = <0x0 0xc1800000 0x0 0x1c00000>;
+ no-map;
+ };
+
+ debug_vm_mem: debug-vm@d0600000 {
+ reg = <0x0 0xd0600000 0x0 0x100000>;
+ no-map;
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <4350000>;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm7325-rpmh-regulators";
+ qcom,pmic-id = "b";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-l1-l4-l12-l15-supply = <&vreg_s7b_0p972>;
+ vdd-l2-l7-supply = <&vreg_bob_3p296>;
+ vdd-l3-supply = <&vreg_s2b_0p876>;
+ vdd-l5-supply = <&vreg_s2b_0p876>;
+ vdd-l6-l9-l10-supply = <&vreg_s8b_1p272>;
+ vdd-l8-supply = <&vreg_s7b_0p972>;
+ vdd-l11-l17-l18-l19-supply = <&vreg_s1b_1p872>;
+ vdd-l13-supply = <&vreg_s7b_0p972>;
+ vdd-l14-l16-supply = <&vreg_s8b_1p272>;
+
+ vreg_s1b_1p872: smps1 {
+ regulator-min-microvolt = <1840000>;
+ regulator-max-microvolt = <2040000>;
+ };
+
+ vreg_s2b_0p876: smps2 {
+ regulator-min-microvolt = <570070>;
+ regulator-max-microvolt = <1050000>;
+ };
+
+ vreg_s7b_0p972: smps7 {
+ regulator-min-microvolt = <535000>;
+ regulator-max-microvolt = <1120000>;
+ };
+
+ vreg_s8b_1p272: smps8 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_RET>;
+ };
+
+ vreg_l1b_0p912: ldo1 {
+ regulator-min-microvolt = <825000>;
+ regulator-max-microvolt = <925000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_3p072: ldo2 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3b_0p504: ldo3 {
+ regulator-min-microvolt = <312000>;
+ regulator-max-microvolt = <910000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4b_0p752: ldo4 {
+ regulator-min-microvolt = <752000>;
+ regulator-max-microvolt = <820000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ reg_l5b_0p752: ldo5 {
+ regulator-min-microvolt = <552000>;
+ regulator-max-microvolt = <832000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p2: ldo6 {
+ regulator-min-microvolt = <1140000>;
+ regulator-max-microvolt = <1260000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_2p952: ldo7 {
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_0p904: ldo8 {
+ regulator-min-microvolt = <870000>;
+ regulator-max-microvolt = <970000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_1p2: ldo9 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11b_1p504: ldo11 {
+ regulator-min-microvolt = <1504000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_0p751: ldo12 {
+ regulator-min-microvolt = <751000>;
+ regulator-max-microvolt = <824000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_0p53: ldo13 {
+ regulator-min-microvolt = <530000>;
+ regulator-max-microvolt = <824000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_1p08: ldo14 {
+ regulator-min-microvolt = <1080000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_0p765: ldo15 {
+ regulator-min-microvolt = <765000>;
+ regulator-max-microvolt = <1020000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_1p1: ldo16 {
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_1p7: ldo17 {
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18b_1p8: ldo18 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l19b_1p8: ldo19 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8350c-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-s9-supply = <&vph_pwr>;
+ vdd-s10-supply = <&vph_pwr>;
+ vdd-l1-l12-supply = <&vreg_s1b_1p872>;
+ vdd-l2-l8-supply = <&vreg_s1b_1p872>;
+ vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob_3p296>;
+ vdd-l6-l9-l11-supply = <&vreg_bob_3p296>;
+ vdd-l10-supply = <&vreg_s7b_0p972>;
+ vdd-bob-supply = <&vph_pwr>;
+
+ vreg_s1c_2p19: smps1 {
+ regulator-min-microvolt = <2190000>;
+ regulator-max-microvolt = <2210000>;
+ };
+
+ vreg_s2c_0p752: smps2 {
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <800000>;
+ };
+
+ vreg_s5c_0p752: smps5 {
+ regulator-min-microvolt = <465000>;
+ regulator-max-microvolt = <1050000>;
+ };
+
+ vreg_s7c_0p752: smps7 {
+ regulator-min-microvolt = <465000>;
+ regulator-max-microvolt = <800000>;
+ };
+
+ vreg_s9c_1p084: smps9 {
+ regulator-min-microvolt = <1010000>;
+ regulator-max-microvolt = <1170000>;
+ };
+
+ vreg_l1c_1p8: ldo1 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1980000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_1p62: ldo2 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <1980000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_2p8: ldo3 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3540000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4c_1p62: ldo4 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5c_1p62: ldo5 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c_2p96: ldo6 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c_3p0: ldo7 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c_1p62: ldo8 {
+ regulator-min-microvolt = <1620000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9c_2p96: ldo9 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <35440000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c_0p88: ldo10 {
+ regulator-min-microvolt = <720000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c_2p8: ldo11 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12c_1p65: ldo12 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13c_2p7: ldo13 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3544000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob_3p296: bob {
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ };
+ };
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <32 2>, /* ADSP */
+ <48 4>; /* NFC */
+};
+
+&uart5 {
+ compatible = "qcom,geni-debug-uart";
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l10c_0p88>;
+ vdda33-supply = <&vreg_l2b_3p072>;
+ vdda18-supply = <&vreg_l1c_1p8>;
+
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ vdda-phy-supply = <&vreg_l6b_1p2>;
+ vdda-pll-supply = <&vreg_l1b_0p912>;
+
+ status = "okay";
+};
+
+&wifi {
+ memory-region = <&wlan_fw_mem>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qdu1000-idp.dts b/sys/contrib/device-tree/src/arm64/qcom/qdu1000-idp.dts
index 1d22f87fd238..5a25cdec969e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qdu1000-idp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/qdu1000-idp.dts
@@ -448,6 +448,28 @@
status = "okay";
};
+&reserved_memory {
+ ecc_meta_data_mem: ecc-meta-data@e0000000 {
+ reg = <0x0 0xe0000000 0x0 0x20000000>;
+ no-map;
+ };
+
+ harq_buffer_mem: harq-buffer@800000000 {
+ reg = <0x8 0x0 0x0 0x80000000>;
+ no-map;
+ };
+
+ tenx_sp_buffer_mem: tenx-sp-buffer@880000000 {
+ reg = <0x8 0x80000000 0x0 0x50000000>;
+ no-map;
+ };
+
+ fapi_buffer_mem: fapi-buffer@8d0000000 {
+ reg = <0x8 0xd0000000 0x0 0x20000000>;
+ no-map;
+ };
+};
+
&sdhc {
pinctrl-0 = <&sdc_on_state>;
pinctrl-1 = <&sdc_off_state>;
@@ -471,6 +493,10 @@
status = "okay";
};
+&tlmm {
+ gpio-reserved-ranges = <28 2>;
+};
+
&uart7 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qdu1000.dtsi b/sys/contrib/device-tree/src/arm64/qcom/qdu1000.dtsi
index 1c0e5d271e91..832f472c4b7a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qdu1000.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/qdu1000.dtsi
@@ -381,6 +381,20 @@
#power-domain-cells = <1>;
};
+ ecpricc: clock-controller@280000 {
+ compatible = "qcom,qdu1000-ecpricc";
+ reg = <0x0 0x00280000 0x0 0x31c00>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_ECPRI_CC_GPLL0_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL1_EVEN_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL2_EVEN_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL3_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL4_CLK_SRC>,
+ <&gcc GCC_ECPRI_CC_GPLL5_EVEN_CLK_SRC>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
gpi_dma0: dma-controller@900000 {
compatible = "qcom,qdu1000-gpi-dma", "qcom,sm6350-gpi-dma";
reg = <0x0 0x900000 0x0 0x60000>;
@@ -1446,13 +1460,10 @@
system-cache-controller@19200000 {
compatible = "qcom,qdu1000-llcc";
reg = <0 0x19200000 0 0xd80000>,
- <0 0x1a200000 0 0x80000>,
- <0 0x221c8128 0 0x4>;
- reg-names = "llcc_base",
- "llcc_broadcast_base",
- "multi_channel_register";
+ <0 0x1a200000 0 0x80000>;
+ reg-names = "llcc0_base",
+ "llcc_broadcast_base";
interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
- multi-ch-bit-off = <24 2>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qrb2210-rb1.dts b/sys/contrib/device-tree/src/arm64/qcom/qrb2210-rb1.dts
index ef3616093289..aa53b6af6d9c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qrb2210-rb1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/qrb2210-rb1.dts
@@ -5,6 +5,7 @@
/dts-v1/;
+#include <dt-bindings/leds/common.h>
#include "qcm2290.dtsi"
#include "pm2250.dtsi"
@@ -13,7 +14,7 @@
compatible = "qcom,qrb2210-rb1", "qcom,qrb2210", "qcom,qcm2290";
aliases {
- serial0 = &uart0;
+ serial0 = &uart4;
sdhc1 = &sdhc_1;
sdhc2 = &sdhc_2;
};
@@ -22,6 +23,14 @@
stdout-path = "serial0:115200n8";
};
+ clocks {
+ clk40M: can-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <40000000>;
+ #clock-cells = <0>;
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
label = "gpio-keys";
@@ -38,6 +47,196 @@
wakeup-source;
};
};
+
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con: endpoint {
+ remote-endpoint = <&lt9611_out>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-bt {
+ label = "blue:bt";
+ function = LED_FUNCTION_BLUETOOTH;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "bluetooth-power";
+ default-state = "off";
+ };
+
+ led-user0 {
+ label = "green:user0";
+ function = LED_FUNCTION_INDICATOR;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "none";
+ default-state = "off";
+ panic-indicator;
+ };
+
+ led-wlan {
+ label = "yellow:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_YELLOW>;
+ gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tx";
+ default-state = "off";
+ };
+ };
+
+ vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
+ compatible = "regulator-fixed";
+ regulator-name = "VREG_HDMI_OUT_1P2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vdc_1v2>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ lt9611_3v3: regulator-lt9611-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "LT9611_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vdc_3v3>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* Main barrel jack input */
+ vdc_12v: regulator-vdc-12v {
+ compatible = "regulator-fixed";
+ regulator-name = "DC_12V";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* 1.2V supply stepped down from the barrel jack input */
+ vdc_1v2: regulator-vdc-1v2 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDC_1V2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vdc_12v>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* 3.3V supply stepped down from the barrel jack input */
+ vdc_3v3: regulator-vdc-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDC_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vdc_12v>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* 5V supply stepped down from the barrel jack input */
+ vdc_5v: regulator-vdc-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "VDC_5V";
+
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* "Battery" voltage for the SoM, stepped down from the barrel jack input */
+ vdc_vbat_som: regulator-vdc-vbat {
+ compatible = "regulator-fixed";
+ regulator-name = "VBAT_SOM";
+ regulator-min-microvolt = <4200000>;
+ regulator-max-microvolt = <4200000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* PM2250 charger out, supplied by VBAT */
+ vph_pwr: regulator-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ vin-supply = <&vdc_vbat_som>;
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&gpi_dma0 {
+ status = "okay";
+};
+
+&i2c2 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ lt9611_codec: hdmi-bridge@2b {
+ compatible = "lontium,lt9611uxc";
+ reg = <0x2b>;
+ interrupts-extended = <&tlmm 46 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
+
+ vdd-supply = <&vreg_hdmi_out_1p2>;
+ vcc-supply = <&lt9611_3v3>;
+
+ pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
+ pinctrl-names = "default";
+ #sound-dai-cells = <1>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lt9611_a: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ lt9611_out: endpoint {
+ remote-endpoint = <&hdmi_con>;
+ };
+ };
+ };
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&pm2250_l5>;
+ status = "okay";
+};
+
+&mdss_dsi0_out {
+ remote-endpoint = <&lt9611_a>;
+ data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi0_phy {
+ status = "okay";
};
&pm2250_resin {
@@ -49,7 +248,193 @@
status = "okay";
};
+&remoteproc_adsp {
+ firmware-name = "qcom/qcm2290/adsp.mbn";
+ status = "okay";
+};
+
+&remoteproc_mpss {
+ firmware-name = "qcom/qcm2290/modem.mbn";
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-pm2250-regulators";
+ vdd_s3-supply = <&vph_pwr>;
+ vdd_s4-supply = <&vph_pwr>;
+ vdd_l1_l2_l3_l5_l6_l7_l8_l9_l10_l11_l12-supply = <&pm2250_s3>;
+ vdd_l4_l17_l18_l19_l20_l21_l22-supply = <&vph_pwr>;
+ vdd_l13_l14_l15_l16-supply = <&pm2250_s4>;
+
+ /*
+ * S1 - VDD_APC
+ * S2 - VDD_CX
+ */
+
+ pm2250_s3: s3 {
+ /* 0.4V-1.6625V -> 1.3V (Power tree requirements) */
+ regulator-min-microvolt = <1352000>;
+ regulator-max-microvolt = <1352000>;
+ regulator-boot-on;
+ };
+
+ pm2250_s4: s4 {
+ /* 1.2V-2.35V -> 2.05V (Power tree requirements) */
+ regulator-min-microvolt = <2072000>;
+ regulator-max-microvolt = <2072000>;
+ regulator-boot-on;
+ };
+
+ /* L1 - VDD_MX */
+
+ pm2250_l2: l2 {
+ /* LPDDR4X VDD2 */
+ regulator-min-microvolt = <1136000>;
+ regulator-max-microvolt = <1136000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ pm2250_l3: l3 {
+ /* LPDDR4X VDDQ */
+ regulator-min-microvolt = <616000>;
+ regulator-max-microvolt = <616000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ pm2250_l4: l4 {
+ /* max = 3.05V -> max = 2.7 to disable 3V signaling (SDHCI2) */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2700000>;
+ regulator-allow-set-load;
+ };
+
+ pm2250_l5: l5 {
+ /* CSI/DSI */
+ regulator-min-microvolt = <1232000>;
+ regulator-max-microvolt = <1232000>;
+ regulator-allow-set-load;
+ regulator-boot-on;
+ };
+
+ pm2250_l6: l6 {
+ /* DRAM PLL */
+ regulator-min-microvolt = <928000>;
+ regulator-max-microvolt = <928000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ pm2250_l7: l7 {
+ /* Wi-Fi CX/MX */
+ regulator-min-microvolt = <664000>;
+ regulator-max-microvolt = <664000>;
+ };
+
+ /*
+ * L8 - VDD_LPI_CX
+ * L9 - VDD_LPI_MX
+ */
+
+ pm2250_l10: l10 {
+ /* Wi-Fi RFA */
+ regulator-min-microvolt = <1304000>;
+ regulator-max-microvolt = <1304000>;
+ };
+
+ pm2250_l11: l11 {
+ /* GPS RF1 */
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-boot-on;
+ };
+
+ pm2250_l12: l12 {
+ /* USB PHYs */
+ regulator-min-microvolt = <928000>;
+ regulator-max-microvolt = <928000>;
+ regulator-allow-set-load;
+ regulator-boot-on;
+ };
+
+ pm2250_l13: l13 {
+ /* USB/QFPROM/PLLs */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allow-set-load;
+ regulator-boot-on;
+ };
+
+ pm2250_l14: l14 {
+ /* SDHCI1 VQMMC */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allow-set-load;
+ /* Broken hardware, never turn it off! */
+ regulator-always-on;
+ };
+
+ pm2250_l15: l15 {
+ /* WCD/DSI/BT VDDIO */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allow-set-load;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ pm2250_l16: l16 {
+ /* GPS RF2 */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ pm2250_l17: l17 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ pm2250_l18: l18 {
+ /* VDD_PXn */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm2250_l19: l19 {
+ /* VDD_PXn */
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm2250_l20: l20 {
+ /* SDHCI1 VMMC */
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-allow-set-load;
+ };
+
+ pm2250_l21: l21 {
+ /* SDHCI2 VMMC */
+ regulator-min-microvolt = <2960000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-allow-set-load;
+ regulator-boot-on;
+ };
+
+ pm2250_l22: l22 {
+ /* Wi-Fi */
+ regulator-min-microvolt = <3312000>;
+ regulator-max-microvolt = <3312000>;
+ };
+ };
+};
+
&sdhc_1 {
+ vmmc-supply = <&pm2250_l20>;
+ vqmmc-supply = <&pm2250_l14>;
pinctrl-0 = <&sdc1_state_on>;
pinctrl-1 = <&sdc1_state_off>;
pinctrl-names = "default", "sleep";
@@ -61,6 +446,8 @@
};
&sdhc_2 {
+ vmmc-supply = <&pm2250_l21>;
+ vqmmc-supply = <&pm2250_l4>;
cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&sdc2_state_on &sd_det_in_on>;
pinctrl-1 = <&sdc2_state_off &sd_det_in_off>;
@@ -70,7 +457,34 @@
status = "okay";
};
+&spi5 {
+ status = "okay";
+
+ can@0 {
+ compatible = "microchip,mcp2518fd";
+ reg = <0>;
+ interrupts-extended = <&tlmm 39 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&clk40M>;
+ spi-max-frequency = <10000000>;
+ vdd-supply = <&vdc_5v>;
+ xceiver-supply = <&vdc_5v>;
+ };
+};
+
&tlmm {
+ lt9611_rst_pin: lt9611-rst-state {
+ pins = "gpio41";
+ function = "gpio";
+ input-disable;
+ output-high;
+ };
+
+ lt9611_irq_pin: lt9611-irq-state {
+ pins = "gpio46";
+ function = "gpio";
+ bias-disable;
+ };
+
sd_det_in_on: sd-det-in-on-state {
pins = "gpio88";
function = "gpio";
@@ -94,7 +508,7 @@
};
/* UART connected to the Micro-USB port via a FTDI chip */
-&uart0 {
+&uart4 {
compatible = "qcom,geni-debug-uart";
status = "okay";
};
@@ -103,7 +517,29 @@
status = "okay";
};
+&usb_qmpphy {
+ vdda-phy-supply = <&pm2250_l12>;
+ vdda-pll-supply = <&pm2250_l13>;
+ status = "okay";
+};
+
+&usb_dwc3 {
+ dr_mode = "host";
+};
+
&usb_hsphy {
+ vdd-supply = <&pm2250_l12>;
+ vdda-pll-supply = <&pm2250_l13>;
+ vdda-phy-dpdm-supply = <&pm2250_l21>;
+ status = "okay";
+};
+
+&wifi {
+ vdd-0.8-cx-mx-supply = <&pm2250_l7>;
+ vdd-1.8-xo-supply = <&pm2250_l13>;
+ vdd-1.3-rfa-supply = <&pm2250_l10>;
+ vdd-3.3-ch0-supply = <&pm2250_l22>;
+ qcom,ath10k-calibration-variant = "Thundercomm_RB1";
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qrb4210-rb2.dts b/sys/contrib/device-tree/src/arm64/qcom/qrb4210-rb2.dts
index e23a0406eacc..7c19f874fa71 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qrb4210-rb2.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/qrb4210-rb2.dts
@@ -15,6 +15,7 @@
aliases {
serial0 = &uart4;
+ serial1 = &uart3;
};
chosen {
@@ -179,6 +180,14 @@
status = "okay";
};
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ firmware-name = "qcom/qrb4210/a610_zap.mbn";
+ };
+};
+
&i2c2 {
clock-frequency = <400000>;
status = "okay";
@@ -272,6 +281,12 @@
status = "okay";
};
+&remoteproc_mpss {
+ firmware-name = "qcom/qrb4210/modem.mbn";
+
+ status = "okay";
+};
+
&rpm_requests {
regulators {
compatible = "qcom,rpm-pm6125-regulators";
@@ -338,13 +353,14 @@
};
vreg_l8a_0p664: l8 {
- regulator-min-microvolt = <400000>;
- regulator-max-microvolt = <728000>;
+ regulator-min-microvolt = <640000>;
+ regulator-max-microvolt = <640000>;
};
vreg_l9a_1p8: l9 {
regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <2000000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-allow-set-load;
};
vreg_l10a_1p8: l10 {
@@ -381,11 +397,13 @@
vreg_l16a_1p3: l16 {
regulator-min-microvolt = <1704000>;
regulator-max-microvolt = <1904000>;
+ regulator-allow-set-load;
};
vreg_l17a_1p3: l17 {
regulator-min-microvolt = <1152000>;
regulator-max-microvolt = <1384000>;
+ regulator-allow-set-load;
};
vreg_l18a_1p232: l18 {
@@ -416,8 +434,9 @@
};
vreg_l23a_3p3: l23 {
- regulator-min-microvolt = <3200000>;
- regulator-max-microvolt = <3400000>;
+ regulator-min-microvolt = <3312000>;
+ regulator-max-microvolt = <3312000>;
+ regulator-allow-set-load;
};
vreg_l24a_2p96: l24 {
@@ -479,6 +498,66 @@
<56 3>, <61 2>, <64 1>,
<68 1>, <72 8>, <96 1>;
+ uart3_default: uart3-default-state {
+ cts-pins {
+ pins = "gpio8";
+ function = "qup3";
+ drive-strength = <2>;
+ bias-bus-hold;
+ };
+
+ rts-pins {
+ pins = "gpio9";
+ function = "qup3";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tx-pins {
+ pins = "gpio10";
+ function = "qup3";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ rx-pins {
+ pins = "gpio11";
+ function = "qup3";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ uart3_sleep: uart3-sleep-state {
+ cts-pins {
+ pins = "gpio8";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-bus-hold;
+ };
+
+ rts-pins {
+ pins = "gpio9";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ tx-pins {
+ pins = "gpio10";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ rx-pins {
+ pins = "gpio11";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
lt9611_rst_pin: lt9611-rst-state {
pins = "gpio41";
function = "gpio";
@@ -500,6 +579,26 @@
};
};
+&uart3 {
+ interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <&tlmm 11 IRQ_TYPE_LEVEL_HIGH>;
+ pinctrl-0 = <&uart3_default>;
+ pinctrl-1 = <&uart3_sleep>;
+ pinctrl-names = "default", "sleep";
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn3988-bt";
+
+ vddio-supply = <&vreg_l9a_1p8>;
+ vddxo-supply = <&vreg_l16a_1p3>;
+ vddrf-supply = <&vreg_l17a_1p3>;
+ vddch0-supply = <&vreg_l23a_3p3>;
+ enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
+ max-speed = <3200000>;
+ };
+};
+
&uart4 {
status = "okay";
};
@@ -510,7 +609,6 @@
&usb_dwc3 {
maximum-speed = "super-speed";
- dr_mode = "peripheral";
};
&usb_hsphy {
@@ -528,6 +626,16 @@
status = "okay";
};
+&wifi {
+ vdd-0.8-cx-mx-supply = <&vreg_l8a_0p664>;
+ vdd-1.8-xo-supply = <&vreg_l16a_1p3>;
+ vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
+ vdd-3.3-ch0-supply = <&vreg_l23a_3p3>;
+ qcom,ath10k-calibration-variant = "Thundercomm_RB2";
+
+ status = "okay";
+};
+
&xo_board {
clock-frequency = <19200000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5-vision-mezzanine.dts b/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5-vision-mezzanine.dts
index bb149e577914..edc0e42ee017 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5-vision-mezzanine.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5-vision-mezzanine.dts
@@ -46,7 +46,7 @@
assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>;
assigned-clock-rates = <24000000>;
- dovdd-supply = <&vreg_l7f_1p8>;
+ dovdd-supply = <&vreg_l7f_1p8>;
avdd-supply = <&vdc_5v>;
dvdd-supply = <&vdc_5v>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5.dts b/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5.dts
index a9e7b832c18c..cd0db4f31d4a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5.dts
@@ -9,6 +9,7 @@
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
+#include <dt-bindings/usb/pd.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
#include "pm8150b.dtsi"
@@ -22,6 +23,7 @@
aliases {
serial0 = &uart12;
+ serial1 = &uart6;
sdhc2 = &sdhc_2;
};
@@ -63,8 +65,8 @@
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_GREEN>;
gpios = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "panic-indicator";
default-state = "off";
+ panic-indicator;
};
led-wlan {
@@ -609,12 +611,61 @@
/* LS-I2C1 */
&i2c15 {
status = "okay";
+
+ typec-mux@1c {
+ compatible = "onnn,nb7vpq904m";
+ reg = <0x1c>;
+
+ vcc-supply = <&vreg_s4a_1p8>;
+
+ retimer-switch;
+ orientation-switch;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ redriver_usb_con_ss: endpoint {
+ remote-endpoint = <&pm8150b_typec_mux_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ redriver_phy_con_ss: endpoint {
+ remote-endpoint = <&usb_1_qmpphy_out>;
+ data-lanes = <0 1 2 3>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ redriver_usb_con_sbu: endpoint {
+ remote-endpoint = <&pm8150b_typec_sbu_out>;
+ };
+ };
+ };
+ };
};
&mdss {
status = "okay";
};
+&mdss_dp {
+ status = "okay";
+};
+
+&mdss_dp_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_1_qmpphy_dp_in>;
+};
+
&mdss_dsi0 {
status = "okay";
vdda-supply = <&vreg_l9a_1p2>;
@@ -640,16 +691,18 @@
};
&pm8150_adc {
- xo-therm@4c {
+ channel@4c {
reg = <ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "xo_therm";
};
- wifi-therm@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "wifi_therm";
};
};
@@ -717,10 +770,11 @@
};
&pm8150b_adc {
- conn-therm@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "conn_therm";
};
};
@@ -752,16 +806,18 @@
};
&pm8150l_adc {
- skin-msm-therm@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "skin_msm_therm";
};
- pm8150l-therm@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "pm8150l_therm";
};
};
@@ -1208,6 +1264,14 @@
"HST_WLAN_UART_TX",
"HST_WLAN_UART_RX";
+ bt_en_state: bt-default-state {
+ pins = "gpio21";
+ function = "gpio";
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+
lt9611_irq_pin: lt9611-irq-state {
pins = "gpio63";
function = "gpio";
@@ -1241,6 +1305,26 @@
};
};
+&uart6 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,qca6390-bt";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_en_state>;
+
+ enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+
+ vddio-supply = <&vreg_s4a_1p8>;
+ vddpmu-supply = <&vreg_s2f_0p95>;
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddrfa0p9-supply = <&vreg_s2f_0p95>;
+ vddrfa1p3-supply = <&vreg_s8c_1p3>;
+ vddrfa1p9-supply = <&vreg_s5a_1p9>;
+ };
+};
+
&uart12 {
status = "okay";
};
@@ -1268,7 +1352,12 @@
};
&usb_1_dwc3 {
- dr_mode = "peripheral";
+ dr_mode = "otg";
+ usb-role-switch;
+};
+
+&usb_1_role_switch_out {
+ remote-endpoint = <&pm8150b_role_switch_in>;
};
&usb_1_hsphy {
@@ -1284,6 +1373,11 @@
vdda-phy-supply = <&vreg_l9a_1p2>;
vdda-pll-supply = <&vreg_l18a_0p92>;
+ orientation-switch;
+};
+
+&usb_1_qmpphy_out {
+ remote-endpoint = <&redriver_phy_con_ss>;
};
&usb_2 {
@@ -1334,3 +1428,66 @@
drive-strength = <6>;
bias-disable;
};
+
+&pm8150b_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <3000000>;
+ status = "okay";
+};
+
+&pm8150b_typec {
+ status = "okay";
+
+ vdd-pdphy-supply = <&vreg_l2a_3p1>;
+
+ connector {
+ compatible = "usb-c-connector";
+
+ power-role = "source";
+ data-role = "dual";
+ self-powered;
+
+ source-pdos = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+
+ altmodes {
+ displayport {
+ svid = /bits/ 16 <0xff01>;
+ vdo = <0x00001c46>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ pm8150b_role_switch_in: endpoint {
+ remote-endpoint = <&usb_1_role_switch_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ pm8150b_typec_mux_in: endpoint {
+ remote-endpoint = <&redriver_usb_con_ss>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pm8150b_typec_sbu_out: endpoint {
+ remote-endpoint = <&redriver_usb_con_sbu>;
+ };
+ };
+ };
+ };
+};
+
+&usb_1_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp_out>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/qru1000-idp.dts b/sys/contrib/device-tree/src/arm64/qcom/qru1000-idp.dts
index 2cc893ae4d10..2a862c83309e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/qru1000-idp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/qru1000-idp.dts
@@ -448,6 +448,22 @@
status = "okay";
};
+&reserved_memory {
+ ecc_meta_data_mem: ecc-meta-data@f0000000 {
+ reg = <0x0 0xf0000000 0x0 0x10000000>;
+ no-map;
+ };
+
+ tenx_sp_mem: tenx-sp-buffer@800000000 {
+ reg = <0x8 0x0 0x0 0x80000000>;
+ no-map;
+ };
+};
+
+&tlmm {
+ gpio-reserved-ranges = <28 2>;
+};
+
&uart7 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sa8540p-pmics.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sa8540p-pmics.dtsi
index 1221be89b3de..a1fbb477fafe 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sa8540p-pmics.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sa8540p-pmics.dtsi
@@ -14,7 +14,7 @@
#address-cells = <1>;
#size-cells = <0>;
- rtc@6000 {
+ pmm8540a_rtc: rtc@6000 {
compatible = "qcom,pm8941-rtc";
reg = <0x6000>, <0x6100>;
reg-names = "rtc", "alarm";
@@ -39,6 +39,15 @@
#address-cells = <1>;
#size-cells = <0>;
+ pmm8540c_sdam_2: nvram@b110 {
+ compatible = "qcom,spmi-sdam";
+ reg = <0xb110>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xb110 0xb0>;
+ status = "disabled";
+ };
+
pmm8540c_gpios: gpio@c000 {
compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sa8540p-ride.dts b/sys/contrib/device-tree/src/arm64/qcom/sa8540p-ride.dts
index 5a26974dcf8f..b04f72ec097c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sa8540p-ride.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sa8540p-ride.dts
@@ -407,6 +407,21 @@
status = "okay";
};
+&pmm8540a_rtc {
+ nvmem-cells = <&rtc_offset>;
+ nvmem-cell-names = "offset";
+
+ status = "okay";
+};
+
+&pmm8540c_sdam_2 {
+ status = "okay";
+
+ rtc_offset: rtc-offset@a0 {
+ reg = <0xa0 0x4>;
+ };
+};
+
&qup0 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sa8540p.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sa8540p.dtsi
index bacbdec56281..96b2c59ad02b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sa8540p.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sa8540p.dtsi
@@ -207,7 +207,7 @@
linux,pci-domain = <2>;
- interrupts = <GIC_SPI 567 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 567 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "msi";
interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 541 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sa8775p-pmics.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sa8775p-pmics.dtsi
index 3c3b6287cd27..eaa43f022a65 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sa8775p-pmics.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sa8775p-pmics.dtsi
@@ -173,7 +173,7 @@
compatible = "qcom,pmm8654au-gpio", "qcom,spmi-gpio";
reg = <0x8800>;
gpio-controller;
- gpio-ranges = <&pmm8654au_2_gpios 0 0 12>;
+ gpio-ranges = <&pmm8654au_1_gpios 0 0 12>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sa8775p-ride.dts b/sys/contrib/device-tree/src/arm64/qcom/sa8775p-ride.dts
index 26f5a4e0ffed..26ad05bd3b3f 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sa8775p-ride.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sa8775p-ride.dts
@@ -16,11 +16,13 @@
compatible = "qcom,sa8775p-ride", "qcom,sa8775p";
aliases {
+ ethernet0 = &ethernet0;
+ ethernet1 = &ethernet1;
+ i2c11 = &i2c11;
+ i2c18 = &i2c18;
serial0 = &uart10;
serial1 = &uart12;
serial2 = &uart17;
- i2c11 = &i2c11;
- i2c18 = &i2c18;
spi16 = &spi16;
ufshc1 = &ufs_mem_hc;
};
@@ -261,6 +263,175 @@
};
};
+&ethernet0 {
+ phy-mode = "sgmii";
+ phy-handle = <&sgmii_phy0>;
+
+ pinctrl-0 = <&ethernet0_default>;
+ pinctrl-names = "default";
+
+ snps,mtl-rx-config = <&mtl_rx_setup>;
+ snps,mtl-tx-config = <&mtl_tx_setup>;
+ snps,ps-speed = <1000>;
+
+ status = "okay";
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sgmii_phy0: phy@8 {
+ compatible = "ethernet-phy-id0141.0dd4";
+ reg = <0x8>;
+ device_type = "ethernet-phy";
+ interrupts-extended = <&tlmm 7 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <11000>;
+ reset-deassert-us = <70000>;
+ };
+
+ sgmii_phy1: phy@a {
+ compatible = "ethernet-phy-id0141.0dd4";
+ reg = <0xa>;
+ device_type = "ethernet-phy";
+ interrupts-extended = <&tlmm 26 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&pmm8654au_2_gpios 9 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <11000>;
+ reset-deassert-us = <70000>;
+ };
+ };
+
+ mtl_rx_setup: rx-queues-config {
+ snps,rx-queues-to-use = <4>;
+ snps,rx-sched-sp;
+
+ queue0 {
+ snps,dcb-algorithm;
+ snps,map-to-dma-channel = <0x0>;
+ snps,route-up;
+ snps,priority = <0x1>;
+ };
+
+ queue1 {
+ snps,dcb-algorithm;
+ snps,map-to-dma-channel = <0x1>;
+ snps,route-ptp;
+ };
+
+ queue2 {
+ snps,avb-algorithm;
+ snps,map-to-dma-channel = <0x2>;
+ snps,route-avcp;
+ };
+
+ queue3 {
+ snps,avb-algorithm;
+ snps,map-to-dma-channel = <0x3>;
+ snps,priority = <0xc>;
+ };
+ };
+
+ mtl_tx_setup: tx-queues-config {
+ snps,tx-queues-to-use = <4>;
+ snps,tx-sched-sp;
+
+ queue0 {
+ snps,dcb-algorithm;
+ };
+
+ queue1 {
+ snps,dcb-algorithm;
+ };
+
+ queue2 {
+ snps,avb-algorithm;
+ snps,send_slope = <0x1000>;
+ snps,idle_slope = <0x1000>;
+ snps,high_credit = <0x3e800>;
+ snps,low_credit = <0xffc18000>;
+ };
+
+ queue3 {
+ snps,avb-algorithm;
+ snps,send_slope = <0x1000>;
+ snps,idle_slope = <0x1000>;
+ snps,high_credit = <0x3e800>;
+ snps,low_credit = <0xffc18000>;
+ };
+ };
+};
+
+&ethernet1 {
+ phy-mode = "sgmii";
+ phy-handle = <&sgmii_phy1>;
+
+ snps,mtl-rx-config = <&mtl_rx_setup1>;
+ snps,mtl-tx-config = <&mtl_tx_setup1>;
+ snps,ps-speed = <1000>;
+
+ status = "okay";
+
+ mtl_rx_setup1: rx-queues-config {
+ snps,rx-queues-to-use = <4>;
+ snps,rx-sched-sp;
+
+ queue0 {
+ snps,dcb-algorithm;
+ snps,map-to-dma-channel = <0x0>;
+ snps,route-up;
+ snps,priority = <0x1>;
+ };
+
+ queue1 {
+ snps,dcb-algorithm;
+ snps,map-to-dma-channel = <0x1>;
+ snps,route-ptp;
+ };
+
+ queue2 {
+ snps,avb-algorithm;
+ snps,map-to-dma-channel = <0x2>;
+ snps,route-avcp;
+ };
+
+ queue3 {
+ snps,avb-algorithm;
+ snps,map-to-dma-channel = <0x3>;
+ snps,priority = <0xc>;
+ };
+ };
+
+ mtl_tx_setup1: tx-queues-config {
+ snps,tx-queues-to-use = <4>;
+ snps,tx-sched-sp;
+
+ queue0 {
+ snps,dcb-algorithm;
+ };
+
+ queue1 {
+ snps,dcb-algorithm;
+ };
+
+ queue2 {
+ snps,avb-algorithm;
+ snps,send_slope = <0x1000>;
+ snps,idle_slope = <0x1000>;
+ snps,high_credit = <0x3e800>;
+ snps,low_credit = <0xffc18000>;
+ };
+
+ queue3 {
+ snps,avb-algorithm;
+ snps,send_slope = <0x1000>;
+ snps,idle_slope = <0x1000>;
+ snps,high_credit = <0x3e800>;
+ snps,low_credit = <0xffc18000>;
+ };
+ };
+};
+
&i2c11 {
clock-frequency = <400000>;
pinctrl-0 = <&qup_i2c11_default>;
@@ -290,6 +461,11 @@
"ANALOG_PON_OPT";
};
+&pmm8654au_0_pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
&pmm8654au_1_gpios {
gpio-line-names = "PMIC_C_ID0",
"PMIC_C_ID1",
@@ -355,6 +531,16 @@
status = "okay";
};
+&serdes0 {
+ phy-supply = <&vreg_l5a>;
+ status = "okay";
+};
+
+&serdes1 {
+ phy-supply = <&vreg_l5a>;
+ status = "okay";
+};
+
&sleep_clk {
clock-frequency = <32764>;
};
@@ -366,6 +552,22 @@
};
&tlmm {
+ ethernet0_default: ethernet0-default-state {
+ ethernet0_mdc: ethernet0-mdc-pins {
+ pins = "gpio8";
+ function = "emac0_mdc";
+ drive-strength = <16>;
+ bias-pull-up;
+ };
+
+ ethernet0_mdio: ethernet0-mdio-pins {
+ pins = "gpio9";
+ function = "emac0_mdio";
+ drive-strength = <16>;
+ bias-pull-up;
+ };
+ };
+
qup_uart10_default: qup-uart10-state {
pins = "gpio46", "gpio47";
function = "qup1_se3";
@@ -443,6 +645,86 @@
bias-pull-down;
};
};
+
+ pcie0_default_state: pcie0-default-state {
+ perst-pins {
+ pins = "gpio2";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ clkreq-pins {
+ pins = "gpio1";
+ function = "pcie0_clkreq";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ wake-pins {
+ pins = "gpio0";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ pcie1_default_state: pcie1-default-state {
+ perst-pins {
+ pins = "gpio4";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ clkreq-pins {
+ pins = "gpio3";
+ function = "pcie1_clkreq";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ wake-pins {
+ pins = "gpio5";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+};
+
+&pcie0 {
+ perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie0_default_state>;
+
+ status = "okay";
+};
+
+&pcie1 {
+ perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_default_state>;
+
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l5a>;
+ vdda-pll-supply = <&vreg_l1c>;
+
+ status = "okay";
+};
+
+&pcie1_phy {
+ vdda-phy-supply = <&vreg_l5a>;
+ vdda-pll-supply = <&vreg_l1c>;
+
+ status = "okay";
};
&uart10 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sa8775p.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sa8775p.dtsi
index b130136acffe..a7eaca33d326 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sa8775p.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sa8775p.dtsi
@@ -481,8 +481,8 @@
<0>,
<0>,
<0>,
- <0>,
- <0>,
+ <&pcie0_phy>,
+ <&pcie1_phy>,
<0>,
<0>,
<0>;
@@ -1487,6 +1487,11 @@
};
};
+ rng: rng@10d2000 {
+ compatible = "qcom,sa8775p-trng", "qcom,trng";
+ reg = <0 0x010d2000 0 0x1000>;
+ };
+
ufs_mem_hc: ufs@1d84000 {
compatible = "qcom,sa8775p-ufshc", "qcom,ufshc", "jedec,ufs-2.0";
reg = <0x0 0x01d84000 0x0 0x3000>;
@@ -1525,6 +1530,7 @@
<0 0>,
<0 0>,
<0 0>;
+ qcom,ice = <&ice>;
status = "disabled";
};
@@ -1546,6 +1552,13 @@
status = "disabled";
};
+ ice: crypto@1d88000 {
+ compatible = "qcom,sa8775p-inline-crypto-engine",
+ "qcom,inline-crypto-engine";
+ reg = <0x0 0x01d88000 0x0 0x8000>;
+ clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
+ };
+
usb_0_hsphy: phy@88e4000 {
compatible = "qcom,sa8775p-usb-hs-phy",
"qcom,usb-snps-hs-5nm-phy";
@@ -1602,8 +1615,8 @@
assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 14 IRQ_TYPE_EDGE_RISING>,
- <&pdc 15 IRQ_TYPE_EDGE_RISING>,
+ <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
<&pdc 12 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "pwr_event",
"dp_hs_phy_irq",
@@ -1689,8 +1702,8 @@
assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 8 IRQ_TYPE_EDGE_RISING>,
- <&pdc 7 IRQ_TYPE_EDGE_RISING>,
+ <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 7 IRQ_TYPE_EDGE_BOTH>,
<&pdc 13 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "pwr_event",
"dp_hs_phy_irq",
@@ -1752,8 +1765,8 @@
assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 10 IRQ_TYPE_EDGE_RISING>,
- <&pdc 9 IRQ_TYPE_EDGE_RISING>;
+ <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "pwr_event",
"dp_hs_phy_irq",
"dm_hs_phy_irq";
@@ -1837,6 +1850,24 @@
<GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>;
};
+ serdes0: phy@8901000 {
+ compatible = "qcom,sa8775p-dwmac-sgmii-phy";
+ reg = <0x0 0x08901000 0x0 0xe10>;
+ clocks = <&gcc GCC_SGMI_CLKREF_EN>;
+ clock-names = "sgmi_ref";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ serdes1: phy@8902000 {
+ compatible = "qcom,sa8775p-dwmac-sgmii-phy";
+ reg = <0x0 0x08902000 0x0 0xe10>;
+ clocks = <&gcc GCC_SGMI_CLKREF_EN>;
+ clock-names = "sgmi_ref";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
pdc: interrupt-controller@b220000 {
compatible = "qcom,sa8775p-pdc", "qcom,pdc";
reg = <0x0 0x0b220000 0x0 0x30000>,
@@ -1884,6 +1915,50 @@
interrupt-controller;
};
+ tsens2: thermal-sensor@c251000 {
+ compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
+ reg = <0x0 0x0c251000 0x0 0x1ff>,
+ <0x0 0x0c224000 0x0 0x8>;
+ interrupts = <GIC_SPI 572 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 609 IRQ_TYPE_LEVEL_HIGH>;
+ #qcom,sensors = <13>;
+ interrupt-names = "uplow", "critical";
+ #thermal-sensor-cells = <1>;
+ };
+
+ tsens3: thermal-sensor@c252000 {
+ compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
+ reg = <0x0 0x0c252000 0x0 0x1ff>,
+ <0x0 0x0c225000 0x0 0x8>;
+ interrupts = <GIC_SPI 573 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 610 IRQ_TYPE_LEVEL_HIGH>;
+ #qcom,sensors = <13>;
+ interrupt-names = "uplow", "critical";
+ #thermal-sensor-cells = <1>;
+ };
+
+ tsens0: thermal-sensor@c263000 {
+ compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
+ reg = <0x0 0x0c263000 0x0 0x1ff>,
+ <0x0 0x0c222000 0x0 0x8>;
+ interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
+ #qcom,sensors = <12>;
+ interrupt-names = "uplow", "critical";
+ #thermal-sensor-cells = <1>;
+ };
+
+ tsens1: thermal-sensor@c265000 {
+ compatible = "qcom,sa8775p-tsens", "qcom,tsens-v2";
+ reg = <0x0 0x0c265000 0x0 0x1ff>,
+ <0x0 0x0c223000 0x0 0x8>;
+ interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>;
+ #qcom,sensors = <12>;
+ interrupt-names = "uplow", "critical";
+ #thermal-sensor-cells = <1>;
+ };
+
aoss_qmp: power-management@c300000 {
compatible = "qcom,sa8775p-aoss-qmp", "qcom,aoss-qmp";
reg = <0x0 0x0c300000 0x0 0x400>;
@@ -1894,6 +1969,11 @@
#clock-cells = <0>;
};
+ sram@c3f0000 {
+ compatible = "qcom,rpmh-stats";
+ reg = <0x0 0x0c3f0000 0x0 0x400>;
+ };
+
spmi_bus: spmi@c440000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0x0 0x0c440000 0x0 0x1100>,
@@ -1925,6 +2005,7 @@
interrupt-controller;
#interrupt-cells = <2>;
gpio-ranges = <&tlmm 0 0 149>;
+ wakeup-parent = <&pdc>;
};
apps_smmu: iommu@15000000 {
@@ -2154,7 +2235,7 @@
compatible = "qcom,apss-wdt-sa8775p", "qcom,kpss-wdt";
reg = <0x0 0x17c10000 0x0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
memtimer: timer@17c20000 {
@@ -2306,6 +2387,1124 @@
#freq-domain-cells = <1>;
};
+
+ ethernet1: ethernet@23000000 {
+ compatible = "qcom,sa8775p-ethqos";
+ reg = <0x0 0x23000000 0x0 0x10000>,
+ <0x0 0x23016000 0x0 0x100>;
+ reg-names = "stmmaceth", "rgmii";
+
+ interrupts = <GIC_SPI 929 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+
+ clocks = <&gcc GCC_EMAC1_AXI_CLK>,
+ <&gcc GCC_EMAC1_SLV_AHB_CLK>,
+ <&gcc GCC_EMAC1_PTP_CLK>,
+ <&gcc GCC_EMAC1_PHY_AUX_CLK>;
+ clock-names = "stmmaceth",
+ "pclk",
+ "ptp_ref",
+ "phyaux";
+
+ power-domains = <&gcc EMAC1_GDSC>;
+
+ phys = <&serdes1>;
+ phy-names = "serdes";
+
+ iommus = <&apps_smmu 0x140 0xf>;
+
+ snps,tso;
+ snps,pbl = <32>;
+ rx-fifo-depth = <16384>;
+ tx-fifo-depth = <16384>;
+
+ status = "disabled";
+ };
+
+ ethernet0: ethernet@23040000 {
+ compatible = "qcom,sa8775p-ethqos";
+ reg = <0x0 0x23040000 0x0 0x10000>,
+ <0x0 0x23056000 0x0 0x100>;
+ reg-names = "stmmaceth", "rgmii";
+
+ interrupts = <GIC_SPI 946 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+
+ clocks = <&gcc GCC_EMAC0_AXI_CLK>,
+ <&gcc GCC_EMAC0_SLV_AHB_CLK>,
+ <&gcc GCC_EMAC0_PTP_CLK>,
+ <&gcc GCC_EMAC0_PHY_AUX_CLK>;
+ clock-names = "stmmaceth",
+ "pclk",
+ "ptp_ref",
+ "phyaux";
+
+ power-domains = <&gcc EMAC0_GDSC>;
+
+ phys = <&serdes0>;
+ phy-names = "serdes";
+
+ iommus = <&apps_smmu 0x120 0xf>;
+
+ snps,tso;
+ snps,pbl = <32>;
+ rx-fifo-depth = <16384>;
+ tx-fifo-depth = <16384>;
+
+ status = "disabled";
+ };
+ };
+
+ thermal-zones {
+ aoss-0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-0-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-1-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-2-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-3-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ gpuss-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ gpuss-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ gpuss-2-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ audio-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ camss-0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ pcie-0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpuss-0-0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens0 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ aoss-1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-0-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-1-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-2-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-0-3-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ gpuss-3-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ gpuss-4-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ gpuss-5-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ video-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ camss-1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ pcie-1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpuss-0-1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens1 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ aoss-2-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-0-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-1-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-2-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-3-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-0-0-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-0-1-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-0-2-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-1-0-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-1-1-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-1-2-0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ ddrss-0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpuss-1-0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens2 12>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ aoss-3-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-0-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-1-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-2-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpu-1-3-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-0-0-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-0-1-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-0-2-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-1-0-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-1-1-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ nsp-1-2-1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ ddrss-1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
+
+ cpuss-1-1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&tsens3 12>;
+
+ trips {
+ trip-point0 {
+ temperature = <105000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <115000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+ };
+ };
};
arch_timer: timer {
@@ -2315,4 +3514,204 @@
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
};
+
+ pcie0: pcie@1c00000 {
+ compatible = "qcom,pcie-sa8775p";
+ reg = <0x0 0x01c00000 0x0 0x3000>,
+ <0x0 0x40000000 0x0 0xf20>,
+ <0x0 0x40000f20 0x0 0xa8>,
+ <0x0 0x40001000 0x0 0x4000>,
+ <0x0 0x40100000 0x0 0x100000>,
+ <0x0 0x01c03000 0x0 0x1000>;
+ reg-names = "parf", "dbi", "elbi", "atu", "config", "mhi";
+ device_type = "pci";
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0x0 0x00000000 0x0 0x40200000 0x0 0x100000>,
+ <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>;
+ bus-range = <0x00 0xff>;
+
+ dma-coherent;
+
+ linux,pci-domain = <0>;
+ num-lanes = <2>;
+
+ interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi0", "msi1", "msi2", "msi3",
+ "msi4", "msi5", "msi6", "msi7";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_PCIE_0_AUX_CLK>,
+ <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
+ <&gcc GCC_PCIE_0_SLV_AXI_CLK>,
+ <&gcc GCC_PCIE_0_SLV_Q2A_AXI_CLK>;
+
+ clock-names = "aux",
+ "cfg",
+ "bus_master",
+ "bus_slave",
+ "slave_q2a";
+
+ assigned-clocks = <&gcc GCC_PCIE_0_AUX_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ interconnects = <&pcie_anoc MASTER_PCIE_0 0 &mc_virt SLAVE_EBI1 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_0 0>;
+ interconnect-names = "pcie-mem", "cpu-pcie";
+
+ iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
+ <0x100 &pcie_smmu 0x0001 0x1>;
+
+ resets = <&gcc GCC_PCIE_0_BCR>;
+ reset-names = "pci";
+ power-domains = <&gcc PCIE_0_GDSC>;
+
+ phys = <&pcie0_phy>;
+ phy-names = "pciephy";
+
+ status = "disabled";
+ };
+
+ pcie0_phy: phy@1c04000 {
+ compatible = "qcom,sa8775p-qmp-gen4x2-pcie-phy";
+ reg = <0x0 0x1c04000 0x0 0x2000>;
+
+ clocks = <&gcc GCC_PCIE_0_AUX_CLK>,
+ <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_CLKREF_EN>,
+ <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>,
+ <&gcc GCC_PCIE_0_PIPEDIV2_CLK>,
+ <&gcc GCC_PCIE_0_PHY_AUX_CLK>;
+
+ clock-names = "aux", "cfg_ahb", "ref", "rchng", "pipe",
+ "pipediv2", "phy_aux";
+
+ assigned-clocks = <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>;
+ assigned-clock-rates = <100000000>;
+
+ resets = <&gcc GCC_PCIE_0_PHY_BCR>;
+ reset-names = "phy";
+
+ #clock-cells = <0>;
+ clock-output-names = "pcie_0_pipe_clk";
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ pcie1: pcie@1c10000 {
+ compatible = "qcom,pcie-sa8775p";
+ reg = <0x0 0x01c10000 0x0 0x3000>,
+ <0x0 0x60000000 0x0 0xf20>,
+ <0x0 0x60000f20 0x0 0xa8>,
+ <0x0 0x60001000 0x0 0x4000>,
+ <0x0 0x60100000 0x0 0x100000>,
+ <0x0 0x01c13000 0x0 0x1000>;
+ reg-names = "parf", "dbi", "elbi", "atu", "config", "mhi";
+ device_type = "pci";
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0x0 0x00000000 0x0 0x60200000 0x0 0x100000>,
+ <0x02000000 0x0 0x60300000 0x0 0x60300000 0x0 0x1fd00000>;
+ bus-range = <0x00 0xff>;
+
+ dma-coherent;
+
+ linux,pci-domain = <1>;
+ num-lanes = <4>;
+
+ interrupts = <GIC_SPI 519 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi0", "msi1", "msi2", "msi3",
+ "msi4", "msi5", "msi6", "msi7";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_PCIE_1_AUX_CLK>,
+ <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_1_MSTR_AXI_CLK>,
+ <&gcc GCC_PCIE_1_SLV_AXI_CLK>,
+ <&gcc GCC_PCIE_1_SLV_Q2A_AXI_CLK>;
+
+ clock-names = "aux",
+ "cfg",
+ "bus_master",
+ "bus_slave",
+ "slave_q2a";
+
+ assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ interconnects = <&pcie_anoc MASTER_PCIE_1 0 &mc_virt SLAVE_EBI1 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_1 0>;
+ interconnect-names = "pcie-mem", "cpu-pcie";
+
+ iommu-map = <0x0 &pcie_smmu 0x0080 0x1>,
+ <0x100 &pcie_smmu 0x0081 0x1>;
+
+ resets = <&gcc GCC_PCIE_1_BCR>;
+ reset-names = "pci";
+ power-domains = <&gcc PCIE_1_GDSC>;
+
+ phys = <&pcie1_phy>;
+ phy-names = "pciephy";
+
+ status = "disabled";
+ };
+
+ pcie1_phy: phy@1c14000 {
+ compatible = "qcom,sa8775p-qmp-gen4x4-pcie-phy";
+ reg = <0x0 0x1c14000 0x0 0x4000>;
+
+ clocks = <&gcc GCC_PCIE_1_AUX_CLK>,
+ <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_CLKREF_EN>,
+ <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>,
+ <&gcc GCC_PCIE_1_PIPEDIV2_CLK>,
+ <&gcc GCC_PCIE_1_PHY_AUX_CLK>;
+
+ clock-names = "aux", "cfg_ahb", "ref", "rchng", "pipe",
+ "pipediv2", "phy_aux";
+
+ assigned-clocks = <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>;
+ assigned-clock-rates = <100000000>;
+
+ resets = <&gcc GCC_PCIE_1_PHY_BCR>;
+ reset-names = "phy";
+
+ #clock-cells = <0>;
+ clock-output-names = "pcie_1_pipe_clk";
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-acer-aspire1.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-acer-aspire1.dts
index b637b4270f88..5afcb8212f49 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-acer-aspire1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-acer-aspire1.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc7180.dtsi"
@@ -129,6 +130,113 @@
pinctrl-names = "default";
};
+ sound: sound {
+ compatible = "qcom,sc7180-qdsp6-sndcard";
+ pinctrl-0 = <&pri_mi2s_active>, <&pri_mi2s_mclk_active>, <&ter_mi2s_active>;
+ pinctrl-names = "default";
+ model = "Acer-Aspire-1";
+
+ audio-routing =
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+
+ multimedia1-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ multimedia2-dai-link {
+ link-name = "MultiMedia2";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
+ multimedia3-dai-link {
+ link-name = "MultiMedia3";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ multimedia4-dai-link {
+ link-name = "MultiMedia4";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+ };
+ };
+
+ primary-rx-dai-link {
+ link-name = "Primary MI2S Playback";
+
+ cpu {
+ sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&alc5682 0>;
+ };
+ };
+
+ primary-tx-dai-link {
+ link-name = "Primary MI2S Capture";
+
+ cpu {
+ sound-dai = <&q6afedai PRIMARY_MI2S_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&alc5682 0>;
+ };
+ };
+
+ tertiary-rx-dai-link {
+ link-name = "Tertiary MI2S Playback";
+
+ cpu {
+ sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&max98357a>;
+ };
+ };
+
+ displayport-rx-dai-link {
+ link-name = "DisplayPort Playback";
+
+ cpu {
+ sound-dai = <&q6afedai DISPLAY_PORT_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&mdss_dp>;
+ };
+ };
+ };
+
reg_tp_3p3: touchpad-regulator {
compatible = "regulator-fixed";
regulator-name = "tp_3p3";
@@ -209,9 +317,22 @@
AVDD-supply = <&vreg_l15a_1p8>;
MICVDD-supply = <&reg_codec_3p3>;
VBAT-supply = <&reg_codec_3p3>;
+ DBVDD-supply = <&vreg_l15a_1p8>;
+ LDO1-IN-supply = <&vreg_l15a_1p8>;
+
+ /*
+ * NOTE: The board has a path from this codec to the
+ * DMIC microphones in the lid, however some of the option
+ * resistors are absent and the microphones are connected
+ * to the SoC instead.
+ *
+ * If the resistors were to be changed by the user to
+ * connect the codec, the following could be used:
+ *
+ * realtek,dmic1-data-pin = <1>;
+ * realtek,dmic1-clk-pin = <1>;
+ */
- realtek,dmic1-data-pin = <1>;
- realtek,dmic1-clk-pin = <1>;
realtek,jd-src = <1>;
};
};
@@ -314,16 +435,18 @@
};
&pm6150_adc {
- thermistor@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "thermistor";
};
- charger-thermistor@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "charger_thermistor";
};
};
@@ -349,6 +472,49 @@
status = "disabled";
};
+&pm6150_rtc {
+ status = "okay";
+};
+
+&q6afedai {
+ dai@16 {
+ reg = <PRIMARY_MI2S_RX>;
+ qcom,sd-lines = <1>;
+ };
+
+ dai@17 {
+ reg = <PRIMARY_MI2S_TX>;
+ qcom,sd-lines = <0>;
+ };
+
+ dai@20 {
+ reg = <TERTIARY_MI2S_RX>;
+ qcom,sd-lines = <0>;
+ };
+
+ dai@104 {
+ reg = <DISPLAY_PORT_RX>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ };
+
+ dai@1 {
+ reg = <1>;
+ };
+
+ dai@2 {
+ reg = <2>;
+ };
+
+ dai@3 {
+ reg = <3>;
+ };
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -357,6 +523,12 @@
status = "okay";
};
+&remoteproc_adsp {
+ memory-region = <&adsp_mem>;
+ firmware-name = "qcom/sc7180/acer/aspire1/qcadsp7180.mbn";
+ status = "okay";
+};
+
&remoteproc_mpss {
firmware-name = "qcom/sc7180/acer/aspire1/qcmpss7180_nm.mbn";
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-firmware-tfa.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-firmware-tfa.dtsi
new file mode 100644
index 000000000000..ee35a454dbf6
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-firmware-tfa.dtsi
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: BSD-3-Clause
+
+/*
+ * Devices that use SC7180 with TrustedFirmware-A
+ * need PSCI PC mode instead of the OSI mode provided
+ * by Qualcomm firmware.
+ */
+
+&CPU0 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+ &LITTLE_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU1 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+ &LITTLE_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU2 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+ &LITTLE_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU3 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+ &LITTLE_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU4 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+ &LITTLE_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU5 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+ &LITTLE_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU6 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&BIG_CPU_SLEEP_0
+ &BIG_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+&CPU7 {
+ /delete-property/ power-domains;
+ /delete-property/ power-domain-names;
+
+ cpu-idle-states = <&BIG_CPU_SLEEP_0
+ &BIG_CPU_SLEEP_1
+ &CLUSTER_SLEEP_0>;
+};
+
+/delete-node/ &domain_idle_states;
+
+&idle_states {
+ CLUSTER_SLEEP_0: cluster-sleep-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "cluster-power-down";
+ arm,psci-suspend-param = <0x40003444>;
+ entry-latency-us = <3263>;
+ exit-latency-us = <6562>;
+ min-residency-us = <9926>;
+ local-timer-stop;
+ };
+};
+
+/delete-node/ &CPU_PD0;
+/delete-node/ &CPU_PD1;
+/delete-node/ &CPU_PD2;
+/delete-node/ &CPU_PD3;
+/delete-node/ &CPU_PD4;
+/delete-node/ &CPU_PD5;
+/delete-node/ &CPU_PD6;
+/delete-node/ &CPU_PD7;
+/delete-node/ &CLUSTER_PD;
+
+&apps_rsc {
+ /delete-property/ power-domains;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-idp.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-idp.dts
index a1c50be4ad95..0146fb0036d4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-idp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-idp.dts
@@ -11,6 +11,7 @@
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "sc7180.dtsi"
+#include "sc7180-firmware-tfa.dtsi"
#include "pm6150.dtsi"
#include "pm6150l.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz-r1.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz-r1.dts
index edfcd47e1a00..03d350dcec96 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz-r1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz-r1.dts
@@ -24,8 +24,8 @@
};
&pm6150_adc {
- /delete-node/ skin-temp-thermistor@4e;
- /delete-node/ charger-thermistor@4f;
+ /delete-node/ channel@4e;
+ /delete-node/ channel@4f;
};
&pm6150_adc_tm {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz.dtsi
index 8b8ea8af165d..7765c8f64905 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-coachz.dtsi
@@ -10,7 +10,6 @@
/* Deleted nodes from sc7180-trogdor.dtsi */
-/delete-node/ &alc5682;
/delete-node/ &pp3300_codec;
/ {
@@ -104,6 +103,7 @@ ap_ts_pen_1v8: &i2c4 {
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ panel = <&panel>;
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
vdd-supply = <&pp3300_ts>;
@@ -119,10 +119,11 @@ ap_ts_pen_1v8: &i2c4 {
};
&pm6150_adc {
- skin-temp-thermistor@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "skin_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-homestar.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-homestar.dtsi
index b3ba23a88a0b..2ba3bbf3b9ad 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-homestar.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-homestar.dtsi
@@ -7,6 +7,8 @@
/* This file must be included after sc7180-trogdor.dtsi */
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
+
/ {
/* BOARD-SPECIFIC TOP LEVEL NODES */
@@ -116,6 +118,7 @@ ap_ts_pen_1v8: &i2c4 {
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ panel = <&panel>;
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
vdd-supply = <&pp3300_touch>;
@@ -145,10 +148,11 @@ ap_ts_pen_1v8: &i2c4 {
};
&pm6150_adc {
- skin-temp-thermistor@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "skin_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-kingoftown.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-kingoftown.dts
index 36326ef972dc..d6db7d83adcf 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-kingoftown.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-kingoftown.dts
@@ -11,19 +11,13 @@
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include <arm/cros-ec-keyboard.dtsi>
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
/ {
model = "Google Kingoftown";
compatible = "google,kingoftown", "qcom,sc7180";
};
-&alc5682 {
- compatible = "realtek,rt5682s";
- /delete-property/ VBAT-supply;
- realtek,dmic1-clk-pin = <2>;
- realtek,dmic-clk-rate-hz = <2048000>;
-};
-
&ap_tp_i2c {
status = "okay";
};
@@ -84,11 +78,6 @@ ap_ts_pen_1v8: &i2c4 {
gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
};
-&sound {
- compatible = "google,sc7180-trogdor";
- model = "sc7180-rt5682s-max98357a-1mic";
-};
-
&wifi {
qcom,ath10k-calibration-variant = "GO_KINGOFTOWN";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r10.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r10.dts
new file mode 100644
index 000000000000..eba15535e1c7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r10.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Lazor Limozeen board device tree source
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+/dts-v1/;
+
+#include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-parade-ps8640.dtsi"
+#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
+
+/ {
+ model = "Google Lazor Limozeen without Touchscreen (rev10+)";
+ compatible = "google,lazor-sku6", "google,lazor-sku18", "qcom,sc7180";
+};
+
+/delete-node/ &ap_ts;
+
+&panel {
+ compatible = "edp-panel";
+};
+
+&sdhc_2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts
index 7f01573b5543..e7da0d6e8ef5 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r5.dts
@@ -11,6 +11,7 @@
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Lazor Limozeen without Touchscreen (rev5 - rev8)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts
index 913b5fc3ba76..a609a2651549 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-nots-r9.dts
@@ -11,13 +11,14 @@
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
- model = "Google Lazor Limozeen without Touchscreen (rev9+)";
- compatible = "google,lazor-sku6", "qcom,sc7180";
+ model = "Google Lazor Limozeen without Touchscreen (rev9)";
+ compatible = "google,lazor-rev9-sku6", "google,lazor-rev9-sku18", "qcom,sc7180";
};
-/delete-node/&ap_ts;
+/delete-node/ &ap_ts;
&panel {
compatible = "edp-panel";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r10.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r10.dts
new file mode 100644
index 000000000000..5cc7c0d8e70b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r10.dts
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Lazor Limozeen board device tree source
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+/dts-v1/;
+
+#include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-parade-ps8640.dtsi"
+#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
+
+/ {
+ model = "Google Lazor Limozeen (rev10+)";
+ compatible = "google,lazor-sku4", "google,lazor-sku15", "qcom,sc7180";
+};
+
+/delete-node/ &ap_ts;
+
+&ap_ts_pen_1v8 {
+ ap_ts: touchscreen@10 {
+ compatible = "elan,ekth3500";
+ reg = <0x10>;
+ pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
+ pinctrl-names = "default";
+
+ interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&tlmm>;
+
+ vcc33-supply = <&pp3300_ts>;
+
+ reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&panel {
+ compatible = "auo,b116xa01";
+};
+
+&sdhc_2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r4.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r4.dts
index d42dcd421146..8a24812b9a00 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r4.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r4.dts
@@ -11,6 +11,8 @@
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
+
/ {
model = "Google Lazor Limozeen (rev4 - rev8)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r9.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r9.dts
index 15d77dc5f956..dd377209dec3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r9.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-limozeen-r9.dts
@@ -11,23 +11,24 @@
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
- model = "Google Lazor Limozeen (rev9+)";
- compatible = "google,lazor-sku4", "qcom,sc7180";
+ model = "Google Lazor Limozeen (rev9)";
+ compatible = "google,lazor-rev9-sku4", "google,lazor-rev9-sku15", "qcom,sc7180";
};
-/delete-node/&ap_ts;
+/delete-node/ &ap_ts;
&ap_ts_pen_1v8 {
ap_ts: touchscreen@10 {
compatible = "elan,ekth3500";
reg = <0x10>;
- pinctrl-names = "default";
pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
+ pinctrl-names = "default";
- interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&tlmm>;
vcc33-supply = <&pp3300_ts>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r1.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r1.dts
index 80c7108bc51b..b60060a38426 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r1.dts
@@ -10,6 +10,7 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Lazor (rev1 - 2)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-kb.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-kb.dts
new file mode 100644
index 000000000000..45d34718a1bc
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-kb.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Lazor board device tree source
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+/dts-v1/;
+
+#include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-parade-ps8640.dtsi"
+#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-lite.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
+
+/ {
+ model = "Google Lazor (rev10+) with KB Backlight";
+ compatible = "google,lazor-sku2", "qcom,sc7180";
+};
+
+&keyboard_backlight {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-lte.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-lte.dts
new file mode 100644
index 000000000000..79028d0dd1b0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10-lte.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Lazor board device tree source
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+/dts-v1/;
+
+#include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-parade-ps8640.dtsi"
+#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
+
+/ {
+ model = "Google Lazor (rev10+) with LTE";
+ compatible = "google,lazor-sku0", "google,lazor-sku10", "qcom,sc7180";
+};
+
+&ap_sar_sensor_i2c {
+ status = "okay";
+};
+
+&keyboard_backlight {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10.dts
new file mode 100644
index 000000000000..045827341ea0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r10.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Lazor board device tree source
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+/dts-v1/;
+
+#include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-parade-ps8640.dtsi"
+#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-lite.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
+
+/ {
+ model = "Google Lazor (rev10+)";
+ compatible = "google,lazor", "qcom,sc7180";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts
index 6ff81c1f7c44..3459b81c5628 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts
@@ -10,6 +10,7 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
#include "sc7180-lite.dtsi"
/ {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts
index e58e36e35950..ff8f47da109d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts
@@ -11,6 +11,7 @@
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Lazor (rev3 - 8) with LTE";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3.dts
index 76c83f88cb41..dd8f6d95655e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r3.dts
@@ -10,6 +10,7 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
#include "sc7180-lite.dtsi"
/ {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-kb.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-kb.dts
index 960f7b7ce094..faf527972977 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-kb.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-kb.dts
@@ -10,11 +10,12 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
#include "sc7180-lite.dtsi"
/ {
- model = "Google Lazor (rev9+) with KB Backlight";
- compatible = "google,lazor-sku2", "qcom,sc7180";
+ model = "Google Lazor (rev9) with KB Backlight";
+ compatible = "google,lazor-rev9-sku2", "qcom,sc7180";
};
&keyboard_backlight {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-lte.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-lte.dts
index 38027f13b9d0..d737fd0637fb 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-lte.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9-lte.dts
@@ -11,10 +11,11 @@
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
- model = "Google Lazor (rev9+) with LTE";
- compatible = "google,lazor-sku0", "qcom,sc7180";
+ model = "Google Lazor (rev9) with LTE";
+ compatible = "google,lazor-rev9-sku0", "google,lazor-rev9-sku10", "qcom,sc7180";
};
&ap_sar_sensor_i2c {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9.dts
index 56dd222650d3..8daad32ff53b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor-r9.dts
@@ -10,9 +10,10 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-lazor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
#include "sc7180-lite.dtsi"
/ {
- model = "Google Lazor (rev9+)";
- compatible = "google,lazor", "qcom,sc7180";
+ model = "Google Lazor (rev9)";
+ compatible = "google,lazor-rev9", "qcom,sc7180";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor.dtsi
index 269007d73162..e9f213d27711 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-lazor.dtsi
@@ -43,6 +43,7 @@ ap_ts_pen_1v8: &i2c4 {
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ panel = <&panel>;
post-power-on-delay-ms = <20>;
hid-descr-addr = <0x0001>;
@@ -55,7 +56,7 @@ ap_ts_pen_1v8: &i2c4 {
};
&pm6150_adc {
- /delete-node/ charger-thermistor@4f;
+ /delete-node/ channel@4f;
};
&pm6150_adc_tm {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-parade.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-parade.dts
index 767cb7450c0d..1c3d9f1381ca 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-parade.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-parade.dts
@@ -11,6 +11,7 @@
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-pazquel.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Pazquel (Parade,LTE)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-ti.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-ti.dts
index 9145b74e9009..bf170471b00c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-ti.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-lte-ti.dts
@@ -11,6 +11,7 @@
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-pazquel.dtsi"
#include "sc7180-trogdor-lte-sku.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Pazquel (TI,LTE)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-parade.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-parade.dts
index 9a0e6632a786..60ae129b83c9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-parade.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-parade.dts
@@ -10,6 +10,7 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-parade-ps8640.dtsi"
#include "sc7180-trogdor-pazquel.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Pazquel (Parade)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-ti.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-ti.dts
index 47c5970d8c22..31678a98ce2c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-ti.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel-ti.dts
@@ -10,6 +10,7 @@
#include "sc7180-trogdor.dtsi"
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
#include "sc7180-trogdor-pazquel.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Pazquel (TI)";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel360.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel360.dtsi
index 273e2249f018..89034b6702f4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel360.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pazquel360.dtsi
@@ -7,13 +7,7 @@
/* This file must be included after sc7180-trogdor.dtsi */
#include "sc7180-trogdor-pazquel.dtsi"
-
-&alc5682 {
- compatible = "realtek,rt5682s";
- realtek,dmic1-clk-pin = <2>;
- realtek,dmic-clk-rate-hz = <2048000>;
- /delete-property/ VBAT-supply;
-};
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
ap_ts_pen_1v8: &i2c4 {
clock-frequency = <400000>;
@@ -64,11 +58,6 @@ ap_ts_pen_1v8: &i2c4 {
>;
};
-&sound {
- compatible = "google,sc7180-trogdor";
- model = "sc7180-rt5682s-max98357a-1mic";
-};
-
&wifi {
qcom,ath10k-calibration-variant = "GO_PAZQUEL360";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r1.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r1.dts
index 8467ff41e6d5..ba222a60c4c6 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r1.dts
@@ -27,7 +27,7 @@
};
&pm6150_adc {
- /delete-node/ charger-thermistor@4f;
+ /delete-node/ channel@4f;
};
&pm6150_adc_tm {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r2.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r2.dts
index 88cf2246c18a..64d6172bf402 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r2.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom-r2.dts
@@ -24,7 +24,7 @@
};
&pm6150_adc {
- /delete-node/ charger-thermistor@4f;
+ /delete-node/ channel@4f;
};
&pm6150_adc_tm {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom.dtsi
index 6c5287bd27d6..067813f5f437 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-pompom.dtsi
@@ -8,6 +8,7 @@
#include "sc7180-trogdor.dtsi"
/* Must come after sc7180-trogdor.dtsi to modify cros_ec */
#include <arm/cros-ec-keyboard.dtsi>
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
/ {
@@ -102,6 +103,7 @@ ap_ts_pen_1v8: &i2c4 {
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ panel = <&panel>;
post-power-on-delay-ms = <20>;
hid-descr-addr = <0x0001>;
@@ -139,7 +141,7 @@ ap_ts_pen_1v8: &i2c4 {
};
&panel {
- compatible = "kingdisplay,kd116n21-30nv-a010";
+ compatible = "edp-panel";
};
&pen_insert {
@@ -148,10 +150,11 @@ ap_ts_pen_1v8: &i2c4 {
};
&pm6150_adc {
- 5v-choke-thermistor@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "5v_choke_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-quackingstick.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-quackingstick.dtsi
index 62ab6427dd65..5f06842c683b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-quackingstick.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-quackingstick.dtsi
@@ -8,6 +8,7 @@
/dts-v1/;
#include "sc7180-trogdor.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/* This board only has 1 USB Type-C port. */
/delete-node/ &usb_c1;
@@ -69,6 +70,7 @@
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+ panel = <&panel>;
post-power-on-delay-ms = <20>;
hid-descr-addr = <0x0001>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-r1.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-r1.dts
index 671b3691f1bb..c9667751a990 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-r1.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-r1.dts
@@ -10,6 +10,7 @@
#include "sc7180-trogdor.dtsi"
/* Must come after sc7180-trogdor.dtsi to modify cros_ec */
#include <arm/cros-ec-keyboard.dtsi>
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
/ {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682i-sku.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682i-sku.dtsi
new file mode 100644
index 000000000000..26f2f5de489c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682i-sku.dtsi
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Trogdor dts fragment for SKUs with rt5682i
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+&hp_i2c {
+ alc5682: codec@1a {
+ compatible = "realtek,rt5682i";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_irq>;
+
+ #sound-dai-cells = <1>;
+
+ interrupt-parent = <&tlmm>;
+ /*
+ * This will get ignored because the interrupt type
+ * is set in rt5682.c.
+ */
+ interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
+
+ AVDD-supply = <&pp1800_alc5682>;
+ DBVDD-supply = <&pp1800_alc5682>;
+ LDO1-IN-supply = <&pp1800_alc5682>;
+ MICVDD-supply = <&pp3300_codec>;
+ VBAT-supply = <&pp3300_audio>;
+
+ realtek,dmic1-data-pin = <1>;
+ realtek,dmic1-clk-pin = <1>;
+ realtek,jd-src = <1>;
+ };
+};
+
+&sound {
+ model = "sc7180-rt5682-max98357a-1mic";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682s-sku.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682s-sku.dtsi
new file mode 100644
index 000000000000..ea036a73f875
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-rt5682s-sku.dtsi
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Google Trogdor dts fragment for SKUs with rt5682s
+ *
+ * Copyright 2023 Google LLC.
+ */
+
+&hp_i2c {
+ alc5682: codec@1a {
+ compatible = "realtek,rt5682s";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_irq>;
+
+ #sound-dai-cells = <1>;
+
+ interrupt-parent = <&tlmm>;
+ /*
+ * This will get ignored because the interrupt type
+ * is set in rt5682.c.
+ */
+ interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
+
+ AVDD-supply = <&pp1800_alc5682>;
+ DBVDD-supply = <&pp1800_alc5682>;
+ LDO1-IN-supply = <&pp1800_alc5682>;
+ MICVDD-supply = <&pp3300_codec>;
+
+ realtek,dmic1-data-pin = <1>;
+ realtek,dmic1-clk-pin = <2>;
+ realtek,dmic-clk-rate-hz = <2048000>;
+ realtek,jd-src = <1>;
+ };
+};
+
+&sound {
+ model = "sc7180-rt5682s-max98357a-1mic";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
index 6225ab8329c3..116f79c25a5d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts
@@ -10,21 +10,20 @@
/dts-v1/;
-#include "sc7180-trogdor-wormdingler-rev1-boe.dts"
+#include "sc7180-trogdor-wormdingler.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ (BOE, rt5682s)";
compatible = "google,wormdingler-sku1025", "qcom,sc7180";
};
-&alc5682 {
- compatible = "realtek,rt5682s";
- /delete-property/ VBAT-supply;
- realtek,dmic1-clk-pin = <2>;
- realtek,dmic-clk-rate-hz = <2048000>;
+&mdss_dsi0_phy {
+ qcom,phy-rescode-offset-top = /bits/ 8 <31 31 31 31 (-32)>;
+ qcom,phy-rescode-offset-bot = /bits/ 8 <31 31 31 31 (-32)>;
+ qcom,phy-drive-ldo-level = <450>;
};
-&sound {
- compatible = "google,sc7180-trogdor";
- model = "sc7180-rt5682s-max98357a-1mic";
+&panel {
+ compatible = "boe,tv110c9m-ll3";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts
index 6eeead70d3eb..72627760e2a4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-boe.dts
@@ -11,6 +11,7 @@
/dts-v1/;
#include "sc7180-trogdor-wormdingler.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ BOE panel board";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
index b40b068dad6a..0bf355e08f78 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts
@@ -10,21 +10,14 @@
/dts-v1/;
-#include "sc7180-trogdor-wormdingler-rev1-inx.dts"
+#include "sc7180-trogdor-wormdingler.dtsi"
+#include "sc7180-trogdor-rt5682s-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ (INX, rt5682s)";
compatible = "google,wormdingler-sku1", "qcom,sc7180";
};
-&alc5682 {
- compatible = "realtek,rt5682s";
- /delete-property/ VBAT-supply;
- realtek,dmic1-clk-pin = <2>;
- realtek,dmic-clk-rate-hz = <2048000>;
-};
-
-&sound {
- compatible = "google,sc7180-trogdor";
- model = "sc7180-rt5682s-max98357a-1mic";
+&panel {
+ compatible = "innolux,hj110iz-01a";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts
index dd34a2297ea0..4b165b826ab3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler-rev1-inx.dts
@@ -11,6 +11,7 @@
/dts-v1/;
#include "sc7180-trogdor-wormdingler.dtsi"
+#include "sc7180-trogdor-rt5682i-sku.dtsi"
/ {
model = "Google Wormdingler rev1+ INX panel board";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler.dtsi
index 2efa8a4bcda6..305ad127246e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-wormdingler.dtsi
@@ -123,6 +123,7 @@
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ panel = <&panel>;
post-power-on-delay-ms = <70>;
hid-descr-addr = <0x0001>;
@@ -163,10 +164,11 @@
};
&pm6150_adc {
- skin-temp-thermistor@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "skin_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor.dtsi
index 681637cf6c4a..46aaeba28604 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor.dtsi
@@ -13,6 +13,7 @@
#include <dt-bindings/sound/sc7180-lpass.h>
#include "sc7180.dtsi"
+#include "sc7180-firmware-tfa.dtsi"
/* PMICs depend on spmi_bus label and so must come after sc7180.dtsi */
#include "pm6150.dtsi"
#include "pm6150l.dtsi"
@@ -371,7 +372,6 @@
sound: sound {
compatible = "google,sc7180-trogdor";
- model = "sc7180-rt5682-max98357a-1mic";
audio-routing =
"Headphone Jack", "HPOL",
@@ -746,32 +746,6 @@ ap_tp_i2c: &i2c7 {
hp_i2c: &i2c9 {
status = "okay";
clock-frequency = <400000>;
-
- alc5682: codec@1a {
- compatible = "realtek,rt5682i";
- reg = <0x1a>;
- pinctrl-names = "default";
- pinctrl-0 = <&hp_irq>;
-
- #sound-dai-cells = <1>;
-
- interrupt-parent = <&tlmm>;
- /*
- * This will get ignored because the interrupt type
- * is set in rt5682.c.
- */
- interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
-
- AVDD-supply = <&pp1800_alc5682>;
- DBVDD-supply = <&pp1800_alc5682>;
- LDO1-IN-supply = <&pp1800_alc5682>;
- MICVDD-supply = <&pp3300_codec>;
- VBAT-supply = <&pp3300_audio>;
-
- realtek,dmic1-data-pin = <1>;
- realtek,dmic1-clk-pin = <1>;
- realtek,jd-src = <1>;
- };
};
&lpasscc {
@@ -837,10 +811,11 @@ hp_i2c: &i2c9 {
};
&pm6150_adc {
- charger-thermistor@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "charger_therm";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi
index 06df931d8cad..4dcaa15caef2 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi
@@ -11,14 +11,19 @@
#include <dt-bindings/clock/qcom,lpasscorecc-sc7180.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,videocc-sc7180.h>
+#include <dt-bindings/firmware/qcom,scm.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sc7180.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
#include <dt-bindings/phy/phy-qcom-qusb2.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/reset/qcom,sdm845-aoss.h>
#include <dt-bindings/reset/qcom,sdm845-pdc.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/soc/qcom,apr.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/thermal/thermal.h>
/ {
@@ -78,9 +83,8 @@
reg = <0x0 0x0>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <415>;
dynamic-power-coefficient = <137>;
operating-points-v2 = <&cpu0_opp_table>;
@@ -108,9 +112,8 @@
reg = <0x0 0x100>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD1>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <415>;
dynamic-power-coefficient = <137>;
next-level-cache = <&L2_100>;
@@ -133,9 +136,8 @@
reg = <0x0 0x200>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD2>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <415>;
dynamic-power-coefficient = <137>;
next-level-cache = <&L2_200>;
@@ -158,9 +160,8 @@
reg = <0x0 0x300>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD3>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <415>;
dynamic-power-coefficient = <137>;
next-level-cache = <&L2_300>;
@@ -183,9 +184,8 @@
reg = <0x0 0x400>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD4>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <415>;
dynamic-power-coefficient = <137>;
next-level-cache = <&L2_400>;
@@ -208,9 +208,8 @@
reg = <0x0 0x500>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD5>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <415>;
dynamic-power-coefficient = <137>;
next-level-cache = <&L2_500>;
@@ -233,9 +232,8 @@
reg = <0x0 0x600>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
- cpu-idle-states = <&BIG_CPU_SLEEP_0
- &BIG_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD6>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <480>;
next-level-cache = <&L2_600>;
@@ -258,9 +256,8 @@
reg = <0x0 0x700>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
- cpu-idle-states = <&BIG_CPU_SLEEP_0
- &BIG_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD7>;
+ power-domain-names = "psci";
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <480>;
next-level-cache = <&L2_700>;
@@ -313,7 +310,7 @@
};
};
- idle-states {
+ idle_states: idle-states {
entry-method = "psci";
LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
@@ -355,15 +352,34 @@
min-residency-us = <5555>;
local-timer-stop;
};
+ };
- CLUSTER_SLEEP_0: cluster-sleep-0 {
- compatible = "arm,idle-state";
+ domain_idle_states: domain-idle-states {
+ CLUSTER_SLEEP_PC: cluster-sleep-0 {
+ compatible = "domain-idle-state";
+ idle-state-name = "cluster-l3-power-collapse";
+ arm,psci-suspend-param = <0x41000044>;
+ entry-latency-us = <2752>;
+ exit-latency-us = <3048>;
+ min-residency-us = <6118>;
+ };
+
+ CLUSTER_SLEEP_CX_RET: cluster-sleep-1 {
+ compatible = "domain-idle-state";
+ idle-state-name = "cluster-cx-retention";
+ arm,psci-suspend-param = <0x41001244>;
+ entry-latency-us = <3638>;
+ exit-latency-us = <4562>;
+ min-residency-us = <8467>;
+ };
+
+ CLUSTER_AOSS_SLEEP: cluster-sleep-2 {
+ compatible = "domain-idle-state";
idle-state-name = "cluster-power-down";
- arm,psci-suspend-param = <0x40003444>;
+ arm,psci-suspend-param = <0x4100b244>;
entry-latency-us = <3263>;
exit-latency-us = <6562>;
- min-residency-us = <9926>;
- local-timer-stop;
+ min-residency-us = <9826>;
};
};
};
@@ -566,6 +582,61 @@
psci {
compatible = "arm,psci-1.0";
method = "smc";
+
+ CPU_PD0: cpu0 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD1: cpu1 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD2: cpu2 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD3: cpu3 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD4: cpu4 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD5: cpu5 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD6: cpu6 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
+ };
+
+ CPU_PD7: cpu7 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
+ };
+
+ CLUSTER_PD: cpu-cluster0 {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_SLEEP_PC
+ &CLUSTER_SLEEP_CX_RET
+ &CLUSTER_AOSS_SLEEP>;
+ };
};
reserved_memory: reserved-memory {
@@ -620,7 +691,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
};
@@ -1975,6 +2046,11 @@
pins = "gpio57";
function = "lpass_ext";
};
+
+ ter_mi2s_active: ter-mi2s-active-state {
+ pins = "gpio63", "gpio64", "gpio65", "gpio66";
+ function = "mi2s_2";
+ };
};
remoteproc_mpss: remoteproc@4080000 {
@@ -2728,48 +2804,111 @@
nvmem-cells = <&qusb2p_hstx_trim>;
};
- usb_1_qmpphy: phy-wrapper@88e9000 {
+ usb_1_qmpphy: phy@88e8000 {
compatible = "qcom,sc7180-qmp-usb3-dp-phy";
- reg = <0 0x088e9000 0 0x18c>,
- <0 0x088e8000 0 0x3c>,
- <0 0x088ea000 0 0x18c>;
+ reg = <0 0x088e8000 0 0x3000>;
status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
- <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
<&gcc GCC_USB3_PRIM_CLKREF_CLK>,
- <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "com_aux";
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "usb3_pipe",
+ "cfg_ahb";
resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
<&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
reset-names = "phy", "common";
- usb_1_ssphy: usb3-phy@88e9200 {
- reg = <0 0x088e9200 0 0x128>,
- <0 0x088e9400 0 0x200>,
- <0 0x088e9c00 0 0x218>,
- <0 0x088e9600 0 0x128>,
- <0 0x088e9800 0 0x200>,
- <0 0x088e9a00 0 0x18>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_phy_pipe_clk_src";
+ #clock-cells = <1>;
+ #phy-cells = <1>;
+ };
+
+ pmu@90b6300 {
+ compatible = "qcom,sc7180-cpu-bwmon", "qcom,sdm845-bwmon";
+ reg = <0 0x090b6300 0 0x600>;
+ interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
+
+ interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY
+ &gem_noc SLAVE_LLCC QCOM_ICC_TAG_ACTIVE_ONLY>;
+ operating-points-v2 = <&cpu_bwmon_opp_table>;
+
+ cpu_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <2288000>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <4577000>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <7110000>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <9155000>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <12298000>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <14236000>;
+ };
};
+ };
- dp_phy: dp-phy@88ea200 {
- reg = <0 0x088ea200 0 0x200>,
- <0 0x088ea400 0 0x200>,
- <0 0x088eaa00 0 0x200>,
- <0 0x088ea600 0 0x200>,
- <0 0x088ea800 0 0x200>;
- #clock-cells = <1>;
- #phy-cells = <0>;
+ pmu@90cd000 {
+ compatible = "qcom,sc7180-llcc-bwmon", "qcom,sc7280-llcc-bwmon";
+ reg = <0 0x090cd000 0 0x1000>;
+ interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
+
+ interconnects = <&mc_virt MASTER_LLCC QCOM_ICC_TAG_ACTIVE_ONLY
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ACTIVE_ONLY>;
+ operating-points-v2 = <&llcc_bwmon_opp_table>;
+
+ llcc_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <1144000>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <1720000>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <2086000>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <2929000>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <3879000>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <5931000>;
+ };
+
+ opp-6 {
+ opp-peak-kBps = <6881000>;
+ };
+
+ opp-7 {
+ opp-peak-kBps = <8137000>;
+ };
};
};
@@ -2827,8 +2966,8 @@
interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 8 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 9 IRQ_TYPE_LEVEL_HIGH>;
+ <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -2850,7 +2989,7 @@
iommus = <&apps_smmu 0x540 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
+ phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
};
@@ -2961,8 +3100,12 @@
interrupt-controller;
#interrupt-cells = <1>;
- interconnects = <&mmss_noc MASTER_MDP0 0 &mc_virt SLAVE_EBI1 0>;
- interconnect-names = "mdp0-mem";
+ interconnects = <&mmss_noc MASTER_MDP0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_DISPLAY_CFG QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
iommus = <&apps_smmu 0x800 0x2>;
@@ -3156,8 +3299,9 @@
"ctrl_link_iface", "stream_pixel";
assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
<&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
- assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
- phys = <&dp_phy>;
+ assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+ phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>;
phy-names = "dp";
operating-points-v2 = <&dp_opp_table>;
@@ -3214,8 +3358,8 @@
<&gcc GCC_DISP_GPLL0_CLK_SRC>,
<&mdss_dsi0_phy 0>,
<&mdss_dsi0_phy 1>,
- <&dp_phy 0>,
- <&dp_phy 1>;
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
clock-names = "bi_tcxo",
"gcc_disp_gpll0_clk_src",
"dsi0_phy_pll_out_byteclk",
@@ -3436,7 +3580,7 @@
compatible = "qcom,apss-wdt-sc7180", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
timer@17c20000 {
@@ -3512,6 +3656,7 @@
<SLEEP_TCS 3>,
<WAKE_TCS 3>,
<CONTROL_TCS 1>;
+ power-domains = <&CLUSTER_PD>;
rpmhcc: clock-controller {
compatible = "qcom,sc7180-rpmh-clk";
@@ -3624,6 +3769,126 @@
status = "disabled";
};
+ remoteproc_adsp: remoteproc@62400000 {
+ compatible = "qcom,sc7180-adsp-pas";
+ reg = <0 0x62400000 0 0x100>;
+
+ interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ power-domains = <&rpmhpd SC7180_LCX>,
+ <&rpmhpd SC7180_LMX>;
+ power-domain-names = "lcx", "lmx";
+
+ qcom,qmp = <&aoss_qmp>;
+ qcom,smem-states = <&adsp_smp2p_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ glink-edge {
+ interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+ label = "lpass";
+ qcom,remote-pid = <2>;
+ mboxes = <&apss_shared 8>;
+
+ apr {
+ compatible = "qcom,apr-v2";
+ qcom,glink-channels = "apr_audio_svc";
+ qcom,domain = <APR_DOMAIN_ADSP>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ service@3 {
+ compatible = "qcom,q6core";
+ reg = <APR_SVC_ADSP_CORE>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+ };
+
+ q6afe: service@4 {
+ compatible = "qcom,q6afe";
+ reg = <APR_SVC_AFE>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+ q6afedai: dais {
+ compatible = "qcom,q6afe-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ };
+
+ q6afecc: clock-controller {
+ compatible = "qcom,q6afe-clocks";
+ #clock-cells = <2>;
+ };
+ };
+
+ q6asm: service@7 {
+ compatible = "qcom,q6asm";
+ reg = <APR_SVC_ASM>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+ q6asmdai: dais {
+ compatible = "qcom,q6asm-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ iommus = <&apps_smmu 0x1001 0x0>;
+ };
+ };
+
+ q6adm: service@8 {
+ compatible = "qcom,q6adm";
+ reg = <APR_SVC_ADM>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+ q6routing: routing {
+ compatible = "qcom,q6adm-routing";
+ #sound-dai-cells = <0>;
+ };
+ };
+ };
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+ label = "adsp";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+ iommus = <&apps_smmu 0x1003 0x0>;
+ };
+
+ compute-cb@4 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <4>;
+ iommus = <&apps_smmu 0x1004 0x0>;
+ };
+
+ compute-cb@5 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <5>;
+ iommus = <&apps_smmu 0x1005 0x0>;
+ qcom,nsessions = <5>;
+ };
+ };
+ };
+ };
+
lpasscc: clock-controller@62d00000 {
compatible = "qcom,sc7180-lpasscorecc";
reg = <0 0x62d00000 0 0x50000>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-chrome-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280-chrome-common.dtsi
index 2e1cd219fc18..c4d00a81da39 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-chrome-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-chrome-common.dtsi
@@ -17,6 +17,9 @@
* required by the setup for Chrome boards.
*/
+/delete-node/ &cdsp_mem;
+/delete-node/ &gpu_zap_mem;
+/delete-node/ &gpu_zap_shader;
/delete-node/ &hyp_mem;
/delete-node/ &xbl_mem;
/delete-node/ &reserved_xbl_uefi_log;
@@ -24,11 +27,6 @@
/ {
reserved-memory {
- adsp_mem: memory@86700000 {
- reg = <0x0 0x86700000 0x0 0x2800000>;
- no-map;
- };
-
camera_mem: memory@8ad00000 {
reg = <0x0 0x8ad00000 0x0 0x500000>;
no-map;
@@ -38,14 +36,29 @@
reg = <0x0 0x8b200000 0x0 0x500000>;
no-map;
};
-
- wpss_mem: memory@9ae00000 {
- reg = <0x0 0x9ae00000 0x0 0x1900000>;
- no-map;
- };
};
};
+&lpass_aon {
+ status = "okay";
+};
+
+&lpass_core {
+ status = "okay";
+};
+
+&lpass_hm {
+ status = "okay";
+};
+
+&lpasscc {
+ status = "okay";
+};
+
+&pdc_reset {
+ status = "okay";
+};
+
/* The PMIC PON code isn't compatible w/ how Chrome EC/BIOS handle things. */
&pmk8350_pon {
status = "disabled";
@@ -74,9 +87,31 @@
};
};
+/* Currently not used */
+&remoteproc_cdsp {
+ /delete-property/ memory-region;
+};
+
&remoteproc_wpss {
- status = "okay";
+ compatible = "qcom,sc7280-wpss-pil";
+ clocks = <&gcc GCC_WPSS_AHB_BDG_MST_CLK>,
+ <&gcc GCC_WPSS_AHB_CLK>,
+ <&gcc GCC_WPSS_RSCP_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "ahb_bdg",
+ "ahb",
+ "rscp",
+ "xo";
+
+ resets = <&aoss_reset AOSS_CC_WCSS_RESTART>,
+ <&pdc_reset PDC_WPSS_SYNC_RESET>;
+ reset-names = "restart", "pdc_sync";
+
+ qcom,halt-regs = <&tcsr_1 0x17000>;
+
firmware-name = "ath11k/WCN6750/hw1.0/wpss.mdt";
+
+ status = "okay";
};
&scm {
@@ -84,6 +119,10 @@
dma-coherent;
};
+&watchdog {
+ status = "okay";
+};
+
&wifi {
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-crd-r3.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7280-crd-r3.dts
index afae7f46b050..c2cba9d7179b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-crd-r3.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-crd-r3.dts
@@ -38,6 +38,10 @@
};
};
+&bluetooth {
+ vddio-supply = <&vreg_l18b_1p8>;
+};
+
ap_tp_i2c: &i2c0 {
status = "okay";
clock-frequency = <400000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi
index 485f9942e128..a90c70b1b73e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi
@@ -13,7 +13,7 @@
compatible = "google,sc7280-herobrine";
model = "sc7280-rt5682-max98360a-3mic";
- audio-routing = "VA DMIC0", "vdd-micb",
+ audio-routing = "VA DMIC0", "vdd-micb",
"VA DMIC1", "vdd-micb",
"VA DMIC2", "vdd-micb",
"VA DMIC3", "vdd-micb",
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-lte-sku.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-lte-sku.dtsi
index 95505549adcc..b721a8546800 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-lte-sku.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-lte-sku.dtsi
@@ -8,11 +8,6 @@
/ {
reserved-memory {
- mpss_mem: memory@8b800000 {
- reg = <0x0 0x8b800000 0x0 0xf600000>;
- no-map;
- };
-
mba_mem: memory@9c700000 {
reg = <0x0 0x9c700000 0x0 0x200000>;
no-map;
@@ -33,6 +28,8 @@
&remoteproc_mpss {
compatible = "qcom,sc7280-mss-pil";
+ reg = <0 0x04080000 0 0x10000>, <0 0x04180000 0 0x48>;
+ reg-names = "qdsp6", "rmb";
clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
<&gcc GCC_MSS_OFFLINE_AXI_CLK>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-wifi-sku.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-wifi-sku.dtsi
index 2febd6126d4c..3ebc915f0dc2 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-wifi-sku.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-herobrine-wifi-sku.dtsi
@@ -7,5 +7,6 @@
/* WIFI SKUs save 256M by not having modem/mba/rmtfs memory regions defined. */
+/delete-node/ &mpss_mem;
/delete-node/ &remoteproc_mpss;
/delete-node/ &rmtfs_mem;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dts b/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dts
index 15222e92e3f5..b5fe7356be48 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dts
@@ -73,7 +73,7 @@
};
&pmk8350_vadc {
- pmr735a-die-temp@403 {
+ channel@403 {
reg = <PMR735A_ADC7_DIE_TEMP>;
label = "pmr735a_die_temp";
qcom,pre-scaling = <1 1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dtsi
index 21027042cf13..a0059527d9e4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-idp.dtsi
@@ -432,7 +432,7 @@
};
&pmk8350_vadc {
- pmk8350-die-temp@3 {
+ channel@3 {
reg = <PMK8350_ADC7_DIE_TEMP>;
label = "pmk8350_die_temp";
qcom,pre-scaling = <1 1>;
@@ -499,6 +499,25 @@
status = "okay";
};
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+ vcc-supply = <&vreg_l7b_2p9>;
+ vcc-max-microamp = <800000>;
+ vccq-supply = <&vreg_l9b_1p2>;
+ vccq-max-microamp = <900000>;
+ vccq2-supply = <&vreg_l9b_1p2>;
+ vccq2-max-microamp = <900000>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l10c_0p8>;
+ vdda-pll-supply = <&vreg_l6b_1p2>;
+
+ status = "okay";
+};
+
&usb_1 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280-qcard.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280-qcard.dtsi
index 9137db066d9e..f9b96bd2477e 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280-qcard.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280-qcard.dtsi
@@ -383,13 +383,13 @@
};
&pmk8350_vadc {
- pmk8350-die-temp@3 {
+ channel@3 {
reg = <PMK8350_ADC7_DIE_TEMP>;
label = "pmk8350_die_temp";
qcom,pre-scaling = <1 1>;
};
- pmr735a-die-temp@403 {
+ channel@403 {
reg = <PMR735A_ADC7_DIE_TEMP>;
label = "pmr735a_die_temp";
qcom,pre-scaling = <1 1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi
index a0e8db8270e7..83b5b76ba179 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi
@@ -13,11 +13,14 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,videocc-sc7280.h>
#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sc7280.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/reset/qcom,sdm845-aoss.h>
#include <dt-bindings/reset/qcom,sdm845-pdc.h>
@@ -89,74 +92,99 @@
#size-cells = <2>;
ranges;
- wlan_ce_mem: memory@4cd000 {
+ wlan_ce_mem: wlan-ce@4cd000 {
no-map;
reg = <0x0 0x004cd000 0x0 0x1000>;
};
- hyp_mem: memory@80000000 {
+ hyp_mem: hyp@80000000 {
reg = <0x0 0x80000000 0x0 0x600000>;
no-map;
};
- xbl_mem: memory@80600000 {
+ xbl_mem: xbl@80600000 {
reg = <0x0 0x80600000 0x0 0x200000>;
no-map;
};
- aop_mem: memory@80800000 {
+ aop_mem: aop@80800000 {
reg = <0x0 0x80800000 0x0 0x60000>;
no-map;
};
- aop_cmd_db_mem: memory@80860000 {
+ aop_cmd_db_mem: aop-cmd-db@80860000 {
reg = <0x0 0x80860000 0x0 0x20000>;
compatible = "qcom,cmd-db";
no-map;
};
- reserved_xbl_uefi_log: memory@80880000 {
+ reserved_xbl_uefi_log: xbl-uefi-res@80880000 {
reg = <0x0 0x80884000 0x0 0x10000>;
no-map;
};
- sec_apps_mem: memory@808ff000 {
+ sec_apps_mem: sec-apps@808ff000 {
reg = <0x0 0x808ff000 0x0 0x1000>;
no-map;
};
- smem_mem: memory@80900000 {
+ smem_mem: smem@80900000 {
reg = <0x0 0x80900000 0x0 0x200000>;
no-map;
};
- cpucp_mem: memory@80b00000 {
+ cpucp_mem: cpucp@80b00000 {
no-map;
reg = <0x0 0x80b00000 0x0 0x100000>;
};
- wlan_fw_mem: memory@80c00000 {
+ wlan_fw_mem: wlan-fw@80c00000 {
reg = <0x0 0x80c00000 0x0 0xc00000>;
no-map;
};
- video_mem: memory@8b200000 {
+ adsp_mem: adsp@86700000 {
+ reg = <0x0 0x86700000 0x0 0x2800000>;
+ no-map;
+ };
+
+ video_mem: video@8b200000 {
reg = <0x0 0x8b200000 0x0 0x500000>;
no-map;
};
- ipa_fw_mem: memory@8b700000 {
+ cdsp_mem: cdsp@88f00000 {
+ reg = <0x0 0x88f00000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ ipa_fw_mem: ipa-fw@8b700000 {
reg = <0 0x8b700000 0 0x10000>;
no-map;
};
- rmtfs_mem: memory@9c900000 {
+ gpu_zap_mem: zap@8b71a000 {
+ reg = <0 0x8b71a000 0 0x2000>;
+ no-map;
+ };
+
+ mpss_mem: mpss@8b800000 {
+ reg = <0x0 0x8b800000 0x0 0xf600000>;
+ no-map;
+ };
+
+ wpss_mem: wpss@9ae00000 {
+ reg = <0x0 0x9ae00000 0x0 0x1900000>;
+ no-map;
+ };
+
+ rmtfs_mem: rmtfs@9c900000 {
compatible = "qcom,rmtfs-mem";
reg = <0x0 0x9c900000 0x0 0x280000>;
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
};
@@ -170,9 +198,8 @@
reg = <0x0 0x0>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
next-level-cache = <&L2_0>;
operating-points-v2 = <&cpu0_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -198,9 +225,8 @@
reg = <0x0 0x100>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD1>;
+ power-domain-names = "psci";
next-level-cache = <&L2_100>;
operating-points-v2 = <&cpu0_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -221,9 +247,8 @@
reg = <0x0 0x200>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD2>;
+ power-domain-names = "psci";
next-level-cache = <&L2_200>;
operating-points-v2 = <&cpu0_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -244,9 +269,8 @@
reg = <0x0 0x300>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
- cpu-idle-states = <&LITTLE_CPU_SLEEP_0
- &LITTLE_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD3>;
+ power-domain-names = "psci";
next-level-cache = <&L2_300>;
operating-points-v2 = <&cpu0_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -267,9 +291,8 @@
reg = <0x0 0x400>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
- cpu-idle-states = <&BIG_CPU_SLEEP_0
- &BIG_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD4>;
+ power-domain-names = "psci";
next-level-cache = <&L2_400>;
operating-points-v2 = <&cpu4_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -290,9 +313,8 @@
reg = <0x0 0x500>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
- cpu-idle-states = <&BIG_CPU_SLEEP_0
- &BIG_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD5>;
+ power-domain-names = "psci";
next-level-cache = <&L2_500>;
operating-points-v2 = <&cpu4_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -313,9 +335,8 @@
reg = <0x0 0x600>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
- cpu-idle-states = <&BIG_CPU_SLEEP_0
- &BIG_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD6>;
+ power-domain-names = "psci";
next-level-cache = <&L2_600>;
operating-points-v2 = <&cpu4_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -336,9 +357,8 @@
reg = <0x0 0x700>;
clocks = <&cpufreq_hw 2>;
enable-method = "psci";
- cpu-idle-states = <&BIG_CPU_SLEEP_0
- &BIG_CPU_SLEEP_1
- &CLUSTER_SLEEP_0>;
+ power-domains = <&CPU_PD7>;
+ power-domain-names = "psci";
next-level-cache = <&L2_700>;
operating-points-v2 = <&cpu7_opp_table>;
interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
@@ -431,9 +451,11 @@
min-residency-us = <5555>;
local-timer-stop;
};
+ };
+ domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
- compatible = "arm,idle-state";
+ compatible = "domain-idle-state";
idle-state-name = "cluster-power-down";
arm,psci-suspend-param = <0x40003444>;
entry-latency-us = <3263>;
@@ -649,18 +671,6 @@
};
};
- eud_typec: connector {
- compatible = "usb-c-connector";
-
- ports {
- port@0 {
- con_eud: endpoint {
- remote-endpoint = <&eud_con>;
- };
- };
- };
- };
-
memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the size */
@@ -811,6 +821,59 @@
psci {
compatible = "arm,psci-1.0";
method = "smc";
+
+ CPU_PD0: power-domain-cpu0 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD1: power-domain-cpu1 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD2: power-domain-cpu2 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD3: power-domain-cpu3 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
+ };
+
+ CPU_PD4: power-domain-cpu4 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
+ };
+
+ CPU_PD5: power-domain-cpu5 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
+ };
+
+ CPU_PD6: power-domain-cpu6 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
+ };
+
+ CPU_PD7: power-domain-cpu7 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
+ };
+
+ CLUSTER_PD: power-domain-cluster {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_SLEEP_0>;
+ };
};
qspi_opp_table: opp-table-qspi {
@@ -868,8 +931,9 @@
reg = <0 0x00100000 0 0x1f0000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>, <&sleep_clk>,
- <0>, <&pcie1_lane>,
- <0>, <0>, <0>, <0>;
+ <0>, <&pcie1_phy>,
+ <&ufs_mem_phy 0>, <&ufs_mem_phy 1>, <&ufs_mem_phy 2>,
+ <&usb_1_qmpphy QMP_USB43DP_USB3_PIPE_CLK>;
clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk",
"pcie_0_pipe_clk", "pcie_1_pipe_clk",
"ufs_phy_rx_symbol_0_clk", "ufs_phy_rx_symbol_1_clk",
@@ -936,6 +1000,7 @@
bus-width = <8>;
supports-cqe;
+ dma-coherent;
qcom,dll-config = <0x0007642c>;
qcom,ddr-config = <0x80040868>;
@@ -1996,6 +2061,11 @@
};
};
+ rng: rng@10d3000 {
+ compatible = "qcom,sc7280-trng", "qcom,trng";
+ reg = <0 0x010d3000 0 0x1000>;
+ };
+
cnoc2: interconnect@1500000 {
reg = <0 0x01500000 0 0x1000>;
compatible = "qcom,sc7280-cnoc2";
@@ -2088,7 +2158,7 @@
qcom,smem-state-names = "wlan-smp2p-out";
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
compatible = "qcom,pcie-sc7280";
reg = <0 0x01c08000 0 0x3000>,
<0 0x40000000 0 0xf1d>,
@@ -2119,7 +2189,7 @@
clocks = <&gcc GCC_PCIE_1_PIPE_CLK>,
<&gcc GCC_PCIE_1_PIPE_CLK_SRC>,
- <&pcie1_lane>,
+ <&pcie1_phy>,
<&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_PCIE_1_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
@@ -2153,7 +2223,7 @@
power-domains = <&gcc GCC_PCIE_1_GDSC>;
- phys = <&pcie1_lane>;
+ phys = <&pcie1_phy>;
phy-names = "pciephy";
pinctrl-names = "default";
@@ -2169,15 +2239,22 @@
pcie1_phy: phy@1c0e000 {
compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy";
- reg = <0 0x01c0e000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c0e000 0 0x1000>;
clocks = <&gcc GCC_PCIE_1_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
<&gcc GCC_PCIE_CLKREF_EN>,
- <&gcc GCC_PCIE1_PHY_RCHNG_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE1_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_1_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
reset-names = "phy";
@@ -2186,21 +2263,99 @@
assigned-clock-rates = <100000000>;
status = "disabled";
+ };
- pcie1_lane: phy@1c0e200 {
- reg = <0 0x01c0e200 0 0x170>,
- <0 0x01c0e400 0 0x200>,
- <0 0x01c0ea00 0 0x1f0>,
- <0 0x01c0e600 0 0x170>,
- <0 0x01c0e800 0 0x200>,
- <0 0x01c0ee00 0 0xf4>;
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
- clock-names = "pipe0";
+ ufs_mem_hc: ufs@1d84000 {
+ compatible = "qcom,sc7280-ufshc", "qcom,ufshc",
+ "jedec,ufs-2.0";
+ reg = <0x0 0x01d84000 0x0 0x3000>;
+ interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&ufs_mem_phy>;
+ phy-names = "ufsphy";
+ lanes-per-direction = <2>;
+ #reset-cells = <1>;
+ resets = <&gcc GCC_UFS_PHY_BCR>;
+ reset-names = "rst";
- #phy-cells = <0>;
- #clock-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
- };
+ power-domains = <&gcc GCC_UFS_PHY_GDSC>;
+ required-opps = <&rpmhpd_opp_nom>;
+
+ iommus = <&apps_smmu 0x80 0x0>;
+ dma-coherent;
+
+ interconnects = <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &cnoc2 SLAVE_UFS_MEM_CFG QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "ufs-ddr", "cpu-ufs";
+
+ clocks = <&gcc GCC_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_UFS_PHY_AHB_CLK>,
+ <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
+ clock-names = "core_clk",
+ "bus_aggr_clk",
+ "iface_clk",
+ "core_clk_unipro",
+ "ref_clk",
+ "tx_lane0_sync_clk",
+ "rx_lane0_sync_clk",
+ "rx_lane1_sync_clk";
+ freq-table-hz =
+ <75000000 300000000>,
+ <0 0>,
+ <0 0>,
+ <75000000 300000000>,
+ <0 0>,
+ <0 0>,
+ <0 0>,
+ <0 0>;
+ status = "disabled";
+ };
+
+ ufs_mem_phy: phy@1d87000 {
+ compatible = "qcom,sc7280-qmp-ufs-phy";
+ reg = <0x0 0x01d87000 0x0 0xe00>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_UFS_PHY_PHY_AUX_CLK>,
+ <&gcc GCC_UFS_1_CLKREF_EN>;
+ clock-names = "ref", "ref_aux", "qref";
+
+ power-domains = <&rpmhpd SC7280_MX>;
+
+ resets = <&ufs_mem_hc 0>;
+ reset-names = "ufsphy";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ cryptobam: dma-controller@1dc4000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0x0 0x01dc4000 0x0 0x28000>;
+ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ iommus = <&apps_smmu 0x4e4 0x0011>,
+ <&apps_smmu 0x4e6 0x0011>;
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ };
+
+ crypto: crypto@1dfa000 {
+ compatible = "qcom,sc7280-qce", "qcom,sm8150-qce", "qcom,qce";
+ reg = <0x0 0x01dfa000 0x0 0x6000>;
+ dmas = <&cryptobam 4>, <&cryptobam 5>;
+ dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x4e4 0x0011>,
+ <&apps_smmu 0x4e4 0x0011>;
+ interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
+ interconnect-names = "memory";
};
ipa: ipa@1e40000 {
@@ -2266,6 +2421,7 @@
clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>;
clock-names = "iface";
#clock-cells = <1>;
+ status = "reserved"; /* Owned by ADSP firmware */
};
lpass_rx_macro: codec@3200000 {
@@ -2417,6 +2573,7 @@
clock-names = "bi_tcxo", "bi_tcxo_ao", "iface";
#clock-cells = <1>;
#power-domain-cells = <1>;
+ status = "reserved"; /* Owned by ADSP firmware */
};
lpass_core: clock-controller@3900000 {
@@ -2427,6 +2584,7 @@
power-domains = <&lpass_hm LPASS_CORE_CC_LPASS_CORE_HM_GDSC>;
#clock-cells = <1>;
#power-domain-cells = <1>;
+ status = "reserved"; /* Owned by ADSP firmware */
};
lpass_cpu: audio@3987000 {
@@ -2449,7 +2607,7 @@
<&apps_smmu 0x1821 0>,
<&apps_smmu 0x1832 0>;
- power-domains = <&rpmhpd SC7280_LCX>;
+ power-domains = <&rpmhpd SC7280_LCX>;
power-domain-names = "lcx";
required-opps = <&rpmhpd_opp_nom>;
@@ -2497,6 +2655,7 @@
clock-names = "bi_tcxo";
#clock-cells = <1>;
#power-domain-cells = <1>;
+ status = "reserved"; /* Owned by ADSP firmware */
};
lpass_ag_noc: interconnect@3c40000 {
@@ -2510,7 +2669,6 @@
compatible = "qcom,sc7280-lpass-lpi-pinctrl";
reg = <0 0x033c0000 0x0 0x20000>,
<0 0x03550000 0x0 0x10000>;
- qcom,adsp-bypass-mode;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&lpass_tlmm 0 0 15>;
@@ -2565,7 +2723,8 @@
"cx_mem",
"cx_dbgc";
interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
- iommus = <&adreno_smmu 0 0x401>;
+ iommus = <&adreno_smmu 0 0x400>,
+ <&adreno_smmu 1 0x400>;
operating-points-v2 = <&gpu_opp_table>;
qcom,gmu = <&gmu>;
interconnects = <&gem_noc MASTER_GFX3D 0 &mc_virt SLAVE_EBI1 0>;
@@ -2575,6 +2734,10 @@
nvmem-cells = <&gpu_speed_bin>;
nvmem-cell-names = "speed_bin";
+ gpu_zap_shader: zap-shader {
+ memory-region = <&gpu_zap_mem>;
+ };
+
gpu_opp_table: opp-table {
compatible = "operating-points-v2";
@@ -2582,14 +2745,14 @@
opp-hz = /bits/ 64 <315000000>;
opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
opp-peak-kBps = <1804000>;
- opp-supported-hw = <0x03>;
+ opp-supported-hw = <0x07>;
};
opp-450000000 {
opp-hz = /bits/ 64 <450000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
opp-peak-kBps = <4068000>;
- opp-supported-hw = <0x03>;
+ opp-supported-hw = <0x07>;
};
/* Only applicable for SKUs which has 550Mhz as Fmax */
@@ -2604,28 +2767,28 @@
opp-hz = /bits/ 64 <550000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
opp-peak-kBps = <6832000>;
- opp-supported-hw = <0x02>;
+ opp-supported-hw = <0x06>;
};
opp-608000000 {
opp-hz = /bits/ 64 <608000000>;
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
opp-peak-kBps = <8368000>;
- opp-supported-hw = <0x02>;
+ opp-supported-hw = <0x06>;
};
opp-700000000 {
opp-hz = /bits/ 64 <700000000>;
opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
opp-peak-kBps = <8532000>;
- opp-supported-hw = <0x02>;
+ opp-supported-hw = <0x06>;
};
opp-812000000 {
opp-hz = /bits/ 64 <812000000>;
opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
opp-peak-kBps = <8532000>;
- opp-supported-hw = <0x02>;
+ opp-supported-hw = <0x06>;
};
opp-840000000 {
@@ -2739,12 +2902,12 @@
"gpu_cc_hub_aon_clk";
power-domains = <&gpucc GPU_CC_CX_GDSC>;
+ dma-coherent;
};
remoteproc_mpss: remoteproc@4080000 {
compatible = "qcom,sc7280-mpss-pas";
- reg = <0 0x04080000 0 0x10000>, <0 0x04180000 0 0x48>;
- reg-names = "qdsp6", "rmb";
+ reg = <0 0x04080000 0 0x10000>;
interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
<&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
@@ -3296,6 +3459,7 @@
operating-points-v2 = <&sdhc2_opp_table>;
bus-width = <4>;
+ dma-coherent;
qcom,dll-config = <0x0007642c>;
@@ -3346,48 +3510,51 @@
resets = <&gcc GCC_QUSB2PHY_SEC_BCR>;
};
- usb_1_qmpphy: phy-wrapper@88e9000 {
- compatible = "qcom,sc7280-qmp-usb3-dp-phy",
- "qcom,sm8250-qmp-usb3-dp-phy";
- reg = <0 0x088e9000 0 0x200>,
- <0 0x088e8000 0 0x40>,
- <0 0x088ea000 0 0x200>;
+ usb_1_qmpphy: phy@88e8000 {
+ compatible = "qcom,sc7280-qmp-usb3-dp-phy";
+ reg = <0 0x088e8000 0 0x3000>;
status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
<&rpmhcc RPMH_CXO_CLK>,
- <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
- clock-names = "aux", "ref_clk_src", "com_aux";
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "usb3_pipe";
resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>,
<&gcc GCC_USB3_PHY_PRIM_BCR>;
reset-names = "phy", "common";
- usb_1_ssphy: usb3-phy@88e9200 {
- reg = <0 0x088e9200 0 0x200>,
- <0 0x088e9400 0 0x200>,
- <0 0x088e9c00 0 0x400>,
- <0 0x088e9600 0 0x200>,
- <0 0x088e9800 0 0x200>,
- <0 0x088e9a00 0 0x100>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_phy_pipe_clk_src";
- };
+ #clock-cells = <1>;
+ #phy-cells = <1>;
- dp_phy: dp-phy@88ea200 {
- reg = <0 0x088ea200 0 0x200>,
- <0 0x088ea400 0 0x200>,
- <0 0x088eaa00 0 0x200>,
- <0 0x088ea600 0 0x200>,
- <0 0x088ea800 0 0x200>;
- #phy-cells = <0>;
- #clock-cells = <1>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_dp_qmpphy_out: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_dp_qmpphy_usb_ss_in: endpoint {
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_dp_qmpphy_dp_in: endpoint {
+ };
+ };
};
};
@@ -3416,8 +3583,8 @@
assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 12 IRQ_TYPE_EDGE_RISING>,
- <&pdc 13 IRQ_TYPE_EDGE_RISING>;
+ <&pdc 12 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 13 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq",
"dp_hs_phy_irq",
"dm_hs_phy_irq";
@@ -3469,8 +3636,77 @@
status = "disabled";
};
+ remoteproc_adsp: remoteproc@3700000 {
+ compatible = "qcom,sc7280-adsp-pas";
+ reg = <0 0x03700000 0 0x100>;
+
+ interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
+ <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+ <&adsp_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog", "fatal", "ready", "handover",
+ "stop-ack", "shutdown-ack";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ power-domains = <&rpmhpd SC7280_LCX>,
+ <&rpmhpd SC7280_LMX>;
+ power-domain-names = "lcx", "lmx";
+
+ memory-region = <&adsp_mem>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&adsp_smp2p_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ glink-edge {
+ interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ label = "lpass";
+ qcom,remote-pid = <2>;
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+ label = "adsp";
+ qcom,non-secure-domain;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+ iommus = <&apps_smmu 0x1803 0x0>;
+ };
+
+ compute-cb@4 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <4>;
+ iommus = <&apps_smmu 0x1804 0x0>;
+ };
+
+ compute-cb@5 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <5>;
+ iommus = <&apps_smmu 0x1805 0x0>;
+ };
+ };
+ };
+ };
+
remoteproc_wpss: remoteproc@8a00000 {
- compatible = "qcom,sc7280-wpss-pil";
+ compatible = "qcom,sc7280-wpss-pas";
reg = <0 0x08a00000 0 0x10000>;
interrupts-extended = <&intc GIC_SPI 587 IRQ_TYPE_EDGE_RISING>,
@@ -3482,12 +3718,8 @@
interrupt-names = "wdog", "fatal", "ready", "handover",
"stop-ack", "shutdown-ack";
- clocks = <&gcc GCC_WPSS_AHB_BDG_MST_CLK>,
- <&gcc GCC_WPSS_AHB_CLK>,
- <&gcc GCC_WPSS_RSCP_CLK>,
- <&rpmhcc RPMH_CXO_CLK>;
- clock-names = "ahb_bdg", "ahb",
- "rscp", "xo";
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
power-domains = <&rpmhpd SC7280_CX>,
<&rpmhpd SC7280_MX>;
@@ -3500,11 +3732,6 @@
qcom,smem-states = <&wpss_smp2p_out 0>;
qcom,smem-state-names = "stop";
- resets = <&aoss_reset AOSS_CC_WCSS_RESTART>,
- <&pdc_reset PDC_WPSS_SYNC_RESET>;
- reset-names = "restart", "pdc_sync";
-
- qcom,halt-regs = <&tcsr_1 0x17000>;
status = "disabled";
@@ -3624,6 +3851,8 @@
<0 0x88e2000 0 0x1000>;
interrupts-extended = <&pdc 11 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+
ports {
#address-cells = <1>;
#size-cells = <0>;
@@ -3634,13 +3863,6 @@
remote-endpoint = <&usb2_role_switch>;
};
};
-
- port@1 {
- reg = <1>;
- eud_con: endpoint {
- remote-endpoint = <&con_eud>;
- };
- };
};
};
@@ -3651,6 +3873,144 @@
qcom,bcm-voters = <&apps_bcm_voter>;
};
+ remoteproc_cdsp: remoteproc@a300000 {
+ compatible = "qcom,sc7280-cdsp-pas";
+ reg = <0 0x0a300000 0 0x10000>;
+
+ interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>,
+ <&cdsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&cdsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&cdsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&cdsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+ <&cdsp_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog", "fatal", "ready", "handover",
+ "stop-ack", "shutdown-ack";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ power-domains = <&rpmhpd SC7280_CX>,
+ <&rpmhpd SC7280_MX>;
+ power-domain-names = "cx", "mx";
+
+ interconnects = <&nsp_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>;
+
+ memory-region = <&cdsp_mem>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&cdsp_smp2p_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ glink-edge {
+ interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+ mboxes = <&ipcc IPCC_CLIENT_CDSP
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ label = "cdsp";
+ qcom,remote-pid = <5>;
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+ label = "cdsp";
+ qcom,non-secure-domain;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@1 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <1>;
+ iommus = <&apps_smmu 0x11a1 0x0420>,
+ <&apps_smmu 0x1181 0x0420>;
+ };
+
+ compute-cb@2 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <2>;
+ iommus = <&apps_smmu 0x11a2 0x0420>,
+ <&apps_smmu 0x1182 0x0420>;
+ };
+
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+ iommus = <&apps_smmu 0x11a3 0x0420>,
+ <&apps_smmu 0x1183 0x0420>;
+ };
+
+ compute-cb@4 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <4>;
+ iommus = <&apps_smmu 0x11a4 0x0420>,
+ <&apps_smmu 0x1184 0x0420>;
+ };
+
+ compute-cb@5 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <5>;
+ iommus = <&apps_smmu 0x11a5 0x0420>,
+ <&apps_smmu 0x1185 0x0420>;
+ };
+
+ compute-cb@6 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <6>;
+ iommus = <&apps_smmu 0x11a6 0x0420>,
+ <&apps_smmu 0x1186 0x0420>;
+ };
+
+ compute-cb@7 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <7>;
+ iommus = <&apps_smmu 0x11a7 0x0420>,
+ <&apps_smmu 0x1187 0x0420>;
+ };
+
+ compute-cb@8 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <8>;
+ iommus = <&apps_smmu 0x11a8 0x0420>,
+ <&apps_smmu 0x1188 0x0420>;
+ };
+
+ /* note: secure cb9 in downstream */
+
+ compute-cb@11 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <11>;
+ iommus = <&apps_smmu 0x11ab 0x0420>,
+ <&apps_smmu 0x118b 0x0420>;
+ };
+
+ compute-cb@12 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <12>;
+ iommus = <&apps_smmu 0x11ac 0x0420>,
+ <&apps_smmu 0x118c 0x0420>;
+ };
+
+ compute-cb@13 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <13>;
+ iommus = <&apps_smmu 0x11ad 0x0420>,
+ <&apps_smmu 0x118d 0x0420>;
+ };
+
+ compute-cb@14 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <14>;
+ iommus = <&apps_smmu 0x11ae 0x0420>,
+ <&apps_smmu 0x118e 0x0420>;
+ };
+ };
+ };
+ };
+
usb_1: usb@a6f8800 {
compatible = "qcom,sc7280-dwc3", "qcom,dwc3";
reg = <0 0x0a6f8800 0 0x400>;
@@ -3676,9 +4036,9 @@
assigned-clock-rates = <19200000>, <200000000>;
interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 14 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
<&pdc 15 IRQ_TYPE_EDGE_BOTH>,
- <&pdc 17 IRQ_TYPE_EDGE_BOTH>;
+ <&pdc 17 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "hs_phy_irq",
"dp_hs_phy_irq",
"dm_hs_phy_irq",
@@ -3702,7 +4062,7 @@
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
+ phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
};
@@ -3788,6 +4148,86 @@
#power-domain-cells = <1>;
};
+ cci0: cci@ac4a000 {
+ compatible = "qcom,sc7280-cci", "qcom,msm8996-cci";
+ reg = <0 0x0ac4a000 0 0x1000>;
+ interrupts = <GIC_SPI 460 IRQ_TYPE_EDGE_RISING>;
+ power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>;
+
+ clocks = <&camcc CAM_CC_CAMNOC_AXI_CLK>,
+ <&camcc CAM_CC_SLOW_AHB_CLK_SRC>,
+ <&camcc CAM_CC_CPAS_AHB_CLK>,
+ <&camcc CAM_CC_CCI_0_CLK>,
+ <&camcc CAM_CC_CCI_0_CLK_SRC>;
+ clock-names = "camnoc_axi",
+ "slow_ahb_src",
+ "cpas_ahb",
+ "cci",
+ "cci_src";
+ pinctrl-0 = <&cci0_default &cci1_default>;
+ pinctrl-1 = <&cci0_sleep &cci1_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ cci0_i2c0: i2c-bus@0 {
+ reg = <0>;
+ clock-frequency = <1000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ cci0_i2c1: i2c-bus@1 {
+ reg = <1>;
+ clock-frequency = <1000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
+ cci1: cci@ac4b000 {
+ compatible = "qcom,sc7280-cci", "qcom,msm8996-cci";
+ reg = <0 0x0ac4b000 0 0x1000>;
+ interrupts = <GIC_SPI 271 IRQ_TYPE_EDGE_RISING>;
+ power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>;
+
+ clocks = <&camcc CAM_CC_CAMNOC_AXI_CLK>,
+ <&camcc CAM_CC_SLOW_AHB_CLK_SRC>,
+ <&camcc CAM_CC_CPAS_AHB_CLK>,
+ <&camcc CAM_CC_CCI_1_CLK>,
+ <&camcc CAM_CC_CCI_1_CLK_SRC>;
+ clock-names = "camnoc_axi",
+ "slow_ahb_src",
+ "cpas_ahb",
+ "cci",
+ "cci_src";
+ pinctrl-0 = <&cci2_default &cci3_default>;
+ pinctrl-1 = <&cci2_sleep &cci3_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ cci1_i2c0: i2c-bus@0 {
+ reg = <0>;
+ clock-frequency = <1000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ cci1_i2c1: i2c-bus@1 {
+ reg = <1>;
+ clock-frequency = <1000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
camcc: clock-controller@ad00000 {
compatible = "qcom,sc7280-camcc";
reg = <0 0x0ad00000 0 0x10000>;
@@ -3807,8 +4247,8 @@
<&gcc GCC_DISP_GPLL0_CLK_SRC>,
<&mdss_dsi_phy 0>,
<&mdss_dsi_phy 1>,
- <&dp_phy 0>,
- <&dp_phy 1>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>,
<&mdss_edp_phy 0>,
<&mdss_edp_phy 1>;
clock-names = "bi_tcxo",
@@ -3842,8 +4282,12 @@
interrupt-controller;
#interrupt-cells = <1>;
- interconnects = <&mmss_noc MASTER_MDP0 0 &mc_virt SLAVE_EBI1 0>;
- interconnect-names = "mdp0-mem";
+ interconnects = <&mmss_noc MASTER_MDP0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &cnoc2 SLAVE_DISPLAY_CFG QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
iommus = <&apps_smmu 0x900 0x402>;
@@ -4144,8 +4588,9 @@
"stream_pixel";
assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
<&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
- assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
- phys = <&dp_phy>;
+ assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+ phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>;
phy-names = "dp";
operating-points-v2 = <&dp_opp_table>;
@@ -4215,6 +4660,7 @@
compatible = "qcom,sc7280-pdc-global";
reg = <0 0x0b5e0000 0 0x20000>;
#reset-cells = <1>;
+ status = "reserved"; /* Owned by firmware */
};
tsens0: thermal-sensor@c263000 {
@@ -4291,6 +4737,62 @@
gpio-ranges = <&tlmm 0 0 175>;
wakeup-parent = <&pdc>;
+ cci0_default: cci0-default-state {
+ pins = "gpio69", "gpio70";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ cci0_sleep: cci0-sleep-state {
+ pins = "gpio69", "gpio70";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ cci1_default: cci1-default-state {
+ pins = "gpio71", "gpio72";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ cci1_sleep: cci1-sleep-state {
+ pins = "gpio71", "gpio72";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ cci2_default: cci2-default-state {
+ pins = "gpio73", "gpio74";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ cci2_sleep: cci2-sleep-state {
+ pins = "gpio73", "gpio74";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ cci3_default: cci3-default-state {
+ pins = "gpio75", "gpio76";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ cci3_sleep: cci3-sleep-state {
+ pins = "gpio75", "gpio76";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
dp_hot_plug_det: dp-hot-plug-det-state {
pins = "gpio47";
function = "dp_hot";
@@ -5211,11 +5713,12 @@
};
};
- watchdog@17c10000 {
+ watchdog: watchdog@17c10000 {
compatible = "qcom,apss-wdt-sc7280", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
+ status = "reserved"; /* Owned by Gunyah hyp */
};
timer@17c20000 {
@@ -5291,6 +5794,7 @@
<SLEEP_TCS 3>,
<WAKE_TCS 3>,
<CONTROL_TCS 1>;
+ power-domains = <&CLUSTER_PD>;
apps_bcm_voter: bcm-voter {
compatible = "qcom,bcm-voter";
@@ -5363,6 +5867,14 @@
reg = <0 0x18591000 0 0x1000>,
<0 0x18592000 0 0x1000>,
<0 0x18593000 0 0x1000>;
+
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dcvsh-irq-0",
+ "dcvsh-irq-1",
+ "dcvsh-irq-2";
+
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_GPLL0>;
clock-names = "xo", "alternate";
#freq-domain-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8180x-lenovo-flex-5g.dts b/sys/contrib/device-tree/src/arm64/qcom/sc8180x-lenovo-flex-5g.dts
index fe3b366e1435..0c22f3efec20 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8180x-lenovo-flex-5g.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8180x-lenovo-flex-5g.dts
@@ -6,6 +6,7 @@
/dts-v1/;
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>
@@ -36,7 +37,7 @@
pinctrl-0 = <&hall_int_active_state>;
pinctrl-names = "default";
- lid {
+ lid-switch {
gpios = <&tlmm 121 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
@@ -45,6 +46,84 @@
};
};
+ pmic-glink {
+ compatible = "qcom,sc8180x-pmic-glink", "qcom,pmic-glink";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_con0_hs: endpoint {
+ remote-endpoint = <&usb_prim_role_switch>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_con0_ss: endpoint {
+ remote-endpoint = <&usb_prim_qmpphy_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_con0_sbu: endpoint {
+ remote-endpoint = <&usbprim_sbu_mux>;
+ };
+ };
+ };
+ };
+
+ connector@1 {
+ compatible = "usb-c-connector";
+ reg = <1>;
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_con1_hs: endpoint {
+ remote-endpoint = <&usb_sec_role_switch>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_con1_ss: endpoint {
+ remote-endpoint = <&usb_sec_qmpphy_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_con1_sbu: endpoint {
+ remote-endpoint = <&usbsec_sbu_mux>;
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
rmtfs_mem: rmtfs-region@85500000 {
compatible = "qcom,rmtfs-mem";
@@ -52,7 +131,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
wlan_mem: wlan-region@8bc00000 {
@@ -100,6 +179,44 @@
vin-supply = <&vph_pwr>;
};
+
+ usbprim-sbu-mux {
+ compatible = "pericom,pi3usb102", "gpio-sbu-mux";
+
+ enable-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
+ select-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&usbprim_sbu_default>;
+
+ mode-switch;
+ orientation-switch;
+
+ port {
+ usbprim_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_con0_sbu>;
+ };
+ };
+ };
+
+ usbsec-sbu-mux {
+ compatible = "pericom,pi3usb102", "gpio-sbu-mux";
+
+ enable-gpios = <&tlmm 188 GPIO_ACTIVE_LOW>;
+ select-gpios = <&tlmm 187 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&usbsec_sbu_default>;
+
+ mode-switch;
+ orientation-switch;
+
+ port {
+ usbsec_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_con1_sbu>;
+ };
+ };
+ };
};
&apps_rsc {
@@ -283,6 +400,24 @@
status = "okay";
};
+&mdss_dp0 {
+ status = "okay";
+};
+
+&mdss_dp0_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_prim_qmpphy_dp_in>;
+};
+
+&mdss_dp1 {
+ status = "okay";
+};
+
+&mdss_dp1_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_sec_qmpphy_dp_in>;
+};
+
&mdss_edp {
data-lanes = <0 1 2 3>;
@@ -298,11 +433,9 @@
backlight = <&backlight>;
- ports {
- port {
- auo_b140han06_in: endpoint {
- remote-endpoint = <&mdss_edp_out>;
- };
+ port {
+ auo_b140han06_in: endpoint {
+ remote-endpoint = <&mdss_edp_out>;
};
};
};
@@ -319,8 +452,8 @@
};
&pcie3 {
- perst-gpio = <&tlmm 178 GPIO_ACTIVE_LOW>;
- wake-gpio = <&tlmm 180 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 180 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&pcie3_default_state>;
pinctrl-names = "default";
@@ -419,6 +552,8 @@
vdda-phy-supply = <&vreg_l3c_1p2>;
vdda-pll-supply = <&vreg_l5e_0p88>;
+ orientation-switch;
+
status = "okay";
};
@@ -430,6 +565,18 @@
dr_mode = "host";
};
+&usb_prim_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp0_out>;
+};
+
+&usb_prim_qmpphy_out {
+ remote-endpoint = <&pmic_glink_con0_ss>;
+};
+
+&usb_prim_role_switch {
+ remote-endpoint = <&pmic_glink_con0_hs>;
+};
+
&usb_sec_hsphy {
vdda-pll-supply = <&vreg_l5e_0p88>;
vdda18-supply = <&vreg_l12a_1p8>;
@@ -442,9 +589,23 @@
vdda-phy-supply = <&vreg_l3c_1p2>;
vdda-pll-supply = <&vreg_l5e_0p88>;
+ orientation-switch;
+
status = "okay";
};
+&usb_sec_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp1_out>;
+};
+
+&usb_sec_qmpphy_out {
+ remote-endpoint = <&pmic_glink_con1_ss>;
+};
+
+&usb_sec_role_switch {
+ remote-endpoint = <&pmic_glink_con1_hs>;
+};
+
&usb_sec {
status = "okay";
};
@@ -497,7 +658,6 @@
pins = "gpio121";
function = "gpio";
- input-enable;
bias-disable;
};
@@ -513,7 +673,6 @@
pins = "gpio122";
function = "gpio";
- input-enable;
bias-pull-up;
drive-strength = <2>;
};
@@ -530,7 +689,6 @@
pins = "gpio37", "gpio24";
function = "gpio";
- input-enable;
bias-pull-up;
drive-strength = <2>;
};
@@ -560,6 +718,40 @@
};
};
+ usbprim_sbu_default: usbprim-sbu-state {
+ oe-n-pins {
+ pins = "gpio152";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ output-high;
+ };
+
+ sel-pins {
+ pins = "gpio100";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ };
+ };
+
+ usbsec_sbu_default: usbsec-sbu-state {
+ oe-n-pins {
+ pins = "gpio188";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ output-high;
+ };
+
+ sel-pins {
+ pins = "gpio187";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ };
+ };
+
uart13_state: uart13-state {
cts-pins {
pins = "gpio43";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8180x-pmics.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc8180x-pmics.dtsi
index 8247af01c84a..ddc84282f142 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8180x-pmics.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8180x-pmics.dtsi
@@ -74,7 +74,7 @@
#address-cells = <1>;
#size-cells = <0>;
- pon: power-on@800 {
+ pon: pon@800 {
compatible = "qcom,pm8916-pon";
reg = <0x0800>;
pwrkey {
@@ -105,19 +105,19 @@
#io-channel-cells = <1>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
@@ -142,9 +142,10 @@
};
pmc8180_gpios: gpio@c000 {
- compatible = "qcom,pmc8180-gpio";
+ compatible = "qcom,pmc8180-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
+ gpio-ranges = <&pmc8180_gpios 0 0 10>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -172,19 +173,19 @@
#io-channel-cells = <1>;
interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- vcoin@85 {
+ channel@85 {
reg = <0x85>;
qcom,pre-scaling = <1 1>;
label = "vcoin2";
@@ -220,19 +221,19 @@
#io-channel-cells = <1>;
interrupts = <0xa 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- vcoin@85 {
+ channel@85 {
reg = <0x85>;
qcom,pre-scaling = <1 1>;
label = "vcoin";
@@ -246,7 +247,7 @@
#address-cells = <1>;
#size-cells = <0>;
- power-on@800 {
+ pon@800 {
compatible = "qcom,pm8916-pon";
reg = <0x0800>;
@@ -270,19 +271,19 @@
#io-channel-cells = <1>;
interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- ref-gnd@0 {
+ channel@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
label = "ref_gnd";
};
- vref-1p25@1 {
+ channel@1 {
reg = <ADC5_1P25VREF>;
qcom,pre-scaling = <1 1>;
label = "vref_1p25";
};
- die-temp@6 {
+ channel@6 {
reg = <ADC5_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "die_temp";
@@ -300,9 +301,10 @@
};
pmc8180c_gpios: gpio@c000 {
- compatible = "qcom,pmc8180c-gpio";
+ compatible = "qcom,pmc8180c-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
+ gpio-ranges = <&pmc8180c_gpios 0 0 12>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
@@ -313,7 +315,7 @@
compatible = "qcom,pmc8180c", "qcom,spmi-pmic";
reg = <0x5 SPMI_USID>;
- pmc8180c_lpg: lpg {
+ pmc8180c_lpg: pwm {
compatible = "qcom,pmc8180c-lpg";
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8180x-primus.dts b/sys/contrib/device-tree/src/arm64/qcom/sc8180x-primus.dts
index fc038474cb71..bfee60c93ccc 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8180x-primus.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8180x-primus.dts
@@ -6,6 +6,7 @@
/dts-v1/;
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>
@@ -42,7 +43,7 @@
pinctrl-0 = <&hall_int_active_state>;
lid-switch {
- gpios = <&tlmm 121 GPIO_ACTIVE_HIGH>;
+ gpios = <&tlmm 121 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
wakeup-source;
@@ -50,6 +51,84 @@
};
};
+ pmic-glink {
+ compatible = "qcom,sc8180x-pmic-glink", "qcom,pmic-glink";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_con0_hs: endpoint {
+ remote-endpoint = <&usb_prim_role_switch>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_con0_ss: endpoint {
+ remote-endpoint = <&usb_prim_qmpphy_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_con0_sbu: endpoint {
+ remote-endpoint = <&usbprim_sbu_mux>;
+ };
+ };
+ };
+ };
+
+ connector@1 {
+ compatible = "usb-c-connector";
+ reg = <1>;
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_con1_hs: endpoint {
+ remote-endpoint = <&usb_sec_role_switch>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_con1_ss: endpoint {
+ remote-endpoint = <&usb_sec_qmpphy_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_con1_sbu: endpoint {
+ remote-endpoint = <&usbsec_sbu_mux>;
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
rmtfs_mem: rmtfs-region@85500000 {
compatible = "qcom,rmtfs-mem";
@@ -57,7 +136,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
wlan_mem: wlan-region@8bc00000 {
@@ -143,6 +222,44 @@
vin-supply = <&vph_pwr>;
};
+
+ usbprim-sbu-mux {
+ compatible = "pericom,pi3usb102", "gpio-sbu-mux";
+
+ enable-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
+ select-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&usbprim_sbu_default>;
+
+ mode-switch;
+ orientation-switch;
+
+ port {
+ usbprim_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_con0_sbu>;
+ };
+ };
+ };
+
+ usbsec-sbu-mux {
+ compatible = "pericom,pi3usb102", "gpio-sbu-mux";
+
+ enable-gpios = <&tlmm 188 GPIO_ACTIVE_LOW>;
+ select-gpios = <&tlmm 187 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&usbsec_sbu_default>;
+
+ mode-switch;
+ orientation-switch;
+
+ port {
+ usbsec_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_con1_sbu>;
+ };
+ };
+ };
};
&apps_rsc {
@@ -269,12 +386,18 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
};
vreg_l10e_2p9: ldo10 {
regulator-min-microvolt = <2904000>;
regulator-max-microvolt = <2904000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
};
vreg_l12e: ldo12 {
@@ -363,6 +486,24 @@
status = "okay";
};
+&mdss_dp0 {
+ status = "okay";
+};
+
+&mdss_dp0_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_prim_qmpphy_dp_in>;
+};
+
+&mdss_dp1 {
+ status = "okay";
+};
+
+&mdss_dp1_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_sec_qmpphy_dp_in>;
+};
+
&mdss_edp {
data-lanes = <0 1 2 3>;
@@ -377,11 +518,9 @@
backlight = <&backlight>;
- ports {
- port {
- auo_b133han05_in: endpoint {
- remote-endpoint = <&mdss_edp_out>;
- };
+ port {
+ auo_b133han05_in: endpoint {
+ remote-endpoint = <&mdss_edp_out>;
};
};
};
@@ -398,8 +537,8 @@
};
&pcie1 {
- perst-gpio = <&tlmm 175 GPIO_ACTIVE_LOW>;
- wake-gpio = <&tlmm 177 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 177 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pcie2_default_state>;
@@ -496,6 +635,8 @@
vdda-phy-supply = <&vreg_l3c_1p2>;
vdda-pll-supply = <&vreg_l5e_0p88>;
+ orientation-switch;
+
status = "okay";
};
@@ -507,6 +648,18 @@
dr_mode = "host";
};
+&usb_prim_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp0_out>;
+};
+
+&usb_prim_qmpphy_out {
+ remote-endpoint = <&pmic_glink_con0_ss>;
+};
+
+&usb_prim_role_switch {
+ remote-endpoint = <&pmic_glink_con0_hs>;
+};
+
&usb_sec_hsphy {
vdda-pll-supply = <&vreg_l5e_0p88>;
vdda18-supply = <&vreg_l12a_1p8>;
@@ -519,9 +672,23 @@
vdda-phy-supply = <&vreg_l3c_1p2>;
vdda-pll-supply = <&vreg_l5e_0p88>;
+ orientation-switch;
+
status = "okay";
};
+&usb_sec_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp1_out>;
+};
+
+&usb_sec_qmpphy_out {
+ remote-endpoint = <&pmic_glink_con1_ss>;
+};
+
+&usb_sec_role_switch {
+ remote-endpoint = <&pmic_glink_con1_hs>;
+};
+
&usb_sec {
status = "okay";
};
@@ -582,7 +749,6 @@
pins = "gpio121";
function = "gpio";
- input-enable;
bias-disable;
};
@@ -592,7 +758,6 @@
function = "gpio";
bias-pull-up;
- intput-enable;
};
kp-disable-pins {
@@ -635,13 +800,46 @@
};
};
+ usbprim_sbu_default: usbprim-sbu-state {
+ oe-n-pins {
+ pins = "gpio152";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ output-high;
+ };
+
+ sel-pins {
+ pins = "gpio100";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ };
+ };
+
+ usbsec_sbu_default: usbsec-sbu-state {
+ oe-n-pins {
+ pins = "gpio188";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ output-high;
+ };
+
+ sel-pins {
+ pins = "gpio187";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <16>;
+ };
+ };
+
tp_int_active_state: tp-int-active-state {
tp-int-pins {
pins = "gpio24";
function = "gpio";
bias-disable;
- input-enable;
};
tp-close-n-pins {
@@ -649,7 +847,6 @@
function = "gpio";
bias-disable;
- input-enable;
};
};
@@ -658,7 +855,6 @@
pins = "gpio122";
function = "gpio";
- input-enable;
bias-disable;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8180x.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc8180x.dtsi
index be78a933d8eb..0430d99091e3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8180x.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8180x.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/clock/qcom,gcc-sc8180x.h>
#include <dt-bindings/clock/qcom,gpucc-sm8150.h>
#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sc8180x.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -64,6 +65,7 @@
L3_0: l3-cache {
compatible = "cache";
cache-level = <3>;
+ cache-unified;
};
};
};
@@ -298,7 +300,7 @@
domain-idle-states {
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
- arm,psci-suspend-param = <0x4100c244>;
+ arm,psci-suspend-param = <0x4100a344>;
entry-latency-us = <3263>;
exit-latency-us = <6562>;
min-residency-us = <9987>;
@@ -1683,7 +1685,7 @@
qcom,bcm-voters = <&apps_bcm_voter>;
};
- pcie0: pci@1c00000 {
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-sc8180x";
reg = <0 0x01c00000 0 0x3000>,
<0 0x60000000 0 0xf1d>,
@@ -1735,7 +1737,6 @@
assigned-clocks = <&gcc GCC_PCIE_0_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommus = <&apps_smmu 0x1d80 0x7f>;
iommu-map = <0x0 &apps_smmu 0x1d80 0x1>,
<0x100 &apps_smmu 0x1d81 0x1>;
@@ -1748,23 +1749,29 @@
<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>;
interconnect-names = "pcie-mem", "cpu-pcie";
- phys = <&pcie0_lane>;
+ phys = <&pcie0_phy>;
phy-names = "pciephy";
+ dma-coherent;
status = "disabled";
};
- pcie0_phy: phy-wrapper@1c06000 {
+ pcie0_phy: phy@1c06000 {
compatible = "qcom,sc8180x-qmp-pcie-phy";
- reg = <0 0x1c06000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c06000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
<&gcc GCC_PCIE_0_CLKREF_CLK>,
- <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE0_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+ #clock-cells = <0>;
+ clock-output-names = "pcie_0_pipe_clk";
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_0_PHY_BCR>;
reset-names = "phy";
@@ -1773,24 +1780,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie0_lane: phy@1c06200 {
- reg = <0 0x1c06200 0 0x170>, /* tx0 */
- <0 0x1c06400 0 0x200>, /* rx0 */
- <0 0x1c06a00 0 0x1f0>, /* pcs */
- <0 0x1c06600 0 0x170>, /* tx1 */
- <0 0x1c06800 0 0x200>, /* rx1 */
- <0 0x1c06e00 0 0xf4>; /* pcs_com */
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- clock-output-names = "pcie_0_pipe_clk";
- #phy-cells = <0>;
- };
};
- pcie3: pci@1c08000 {
+ pcie3: pcie@1c08000 {
compatible = "qcom,pcie-sc8180x";
reg = <0 0x01c08000 0 0x3000>,
<0 0x40000000 0 0xf1d>,
@@ -1842,7 +1834,6 @@
assigned-clocks = <&gcc GCC_PCIE_3_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommus = <&apps_smmu 0x1e00 0x7f>;
iommu-map = <0x0 &apps_smmu 0x1e00 0x1>,
<0x100 &apps_smmu 0x1e01 0x1>;
@@ -1855,23 +1846,30 @@
<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>;
interconnect-names = "pcie-mem", "cpu-pcie";
- phys = <&pcie3_lane>;
+ phys = <&pcie3_phy>;
phy-names = "pciephy";
+ dma-coherent;
status = "disabled";
};
- pcie3_phy: phy-wrapper@1c0c000 {
+ pcie3_phy: phy@1c0c000 {
compatible = "qcom,sc8180x-qmp-pcie-phy";
- reg = <0 0x1c0c000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c0c000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_3_CFG_AHB_CLK>,
<&gcc GCC_PCIE_3_CLKREF_CLK>,
- <&gcc GCC_PCIE2_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE3_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_3_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+ #clock-cells = <0>;
+ clock-output-names = "pcie_3_pipe_clk";
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_3_PHY_BCR>;
reset-names = "phy";
@@ -1880,24 +1878,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie3_lane: phy@1c0c200 {
- reg = <0 0x1c0c200 0 0x170>, /* tx0 */
- <0 0x1c0c400 0 0x200>, /* rx0 */
- <0 0x1c0ca00 0 0x1f0>, /* pcs */
- <0 0x1c0c600 0 0x170>, /* tx1 */
- <0 0x1c0c800 0 0x200>, /* rx1 */
- <0 0x1c0ce00 0 0xf4>; /* pcs_com */
- clocks = <&gcc GCC_PCIE_3_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- clock-output-names = "pcie_3_pipe_clk";
- #phy-cells = <0>;
- };
};
- pcie1: pci@1c10000 {
+ pcie1: pcie@1c10000 {
compatible = "qcom,pcie-sc8180x";
reg = <0 0x01c10000 0 0x3000>,
<0 0x68000000 0 0xf1d>,
@@ -1949,7 +1932,6 @@
assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommus = <&apps_smmu 0x1c80 0x7f>;
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
<0x100 &apps_smmu 0x1c81 0x1>;
@@ -1962,23 +1944,30 @@
<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>;
interconnect-names = "pcie-mem", "cpu-pcie";
- phys = <&pcie1_lane>;
+ phys = <&pcie1_phy>;
phy-names = "pciephy";
+ dma-coherent;
status = "disabled";
};
- pcie1_phy: phy-wrapper@1c16000 {
+ pcie1_phy: phy@1c16000 {
compatible = "qcom,sc8180x-qmp-pcie-phy";
- reg = <0 0x1c16000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c16000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
<&gcc GCC_PCIE_1_CLKREF_CLK>,
- <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE1_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+ #clock-cells = <0>;
+ clock-output-names = "pcie_1_pipe_clk";
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
reset-names = "phy";
@@ -1987,24 +1976,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie1_lane: phy@1c0e200 {
- reg = <0 0x1c16200 0 0x170>, /* tx0 */
- <0 0x1c16400 0 0x200>, /* rx0 */
- <0 0x1c16a00 0 0x1f0>, /* pcs */
- <0 0x1c16600 0 0x170>, /* tx1 */
- <0 0x1c16800 0 0x200>, /* rx1 */
- <0 0x1c16e00 0 0xf4>; /* pcs_com */
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
- clock-names = "pipe0";
- #clock-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
-
- #phy-cells = <0>;
- };
};
- pcie2: pci@1c18000 {
+ pcie2: pcie@1c18000 {
compatible = "qcom,pcie-sc8180x";
reg = <0 0x01c18000 0 0x3000>,
<0 0x70000000 0 0xf1d>,
@@ -2056,7 +2030,6 @@
assigned-clocks = <&gcc GCC_PCIE_2_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommus = <&apps_smmu 0x1d00 0x7f>;
iommu-map = <0x0 &apps_smmu 0x1d00 0x1>,
<0x100 &apps_smmu 0x1d01 0x1>;
@@ -2069,23 +2042,30 @@
<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>;
interconnect-names = "pcie-mem", "cpu-pcie";
- phys = <&pcie2_lane>;
+ phys = <&pcie2_phy>;
phy-names = "pciephy";
+ dma-coherent;
status = "disabled";
};
- pcie2_phy: phy-wrapper@1c1c000 {
+ pcie2_phy: phy@1c1c000 {
compatible = "qcom,sc8180x-qmp-pcie-phy";
- reg = <0 0x1c1c000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c1c000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_2_CFG_AHB_CLK>,
<&gcc GCC_PCIE_2_CLKREF_CLK>,
- <&gcc GCC_PCIE2_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE2_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_2_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+ #clock-cells = <0>;
+ clock-output-names = "pcie_2_pipe_clk";
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_2_PHY_BCR>;
reset-names = "phy";
@@ -2094,22 +2074,6 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie2_lane: phy@1c0e200 {
- reg = <0 0x1c1c200 0 0x170>, /* tx0 */
- <0 0x1c1c400 0 0x200>, /* rx0 */
- <0 0x1c1ca00 0 0x1f0>, /* pcs */
- <0 0x1c1c600 0 0x170>, /* tx1 */
- <0 0x1c1c800 0 0x200>, /* rx1 */
- <0 0x1c1ce00 0 0xf4>; /* pcs_com */
- clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- clock-output-names = "pcie_2_pipe_clk";
-
- #phy-cells = <0>;
- };
};
ufs_mem_hc: ufshc@1d84000 {
@@ -2117,7 +2081,7 @@
"jedec,ufs-2.0";
reg = <0 0x01d84000 0 0x2500>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
#reset-cells = <1>;
@@ -2151,15 +2115,21 @@
<0 0>,
<0 0>;
+ power-domains = <&gcc UFS_PHY_GDSC>;
+
+ interconnects = <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_UFS_MEM_0_CFG QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "ufs-ddr", "cpu-ufs";
+
status = "disabled";
};
ufs_mem_phy: phy-wrapper@1d87000 {
compatible = "qcom,sc8180x-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
+
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
clock-names = "ref",
@@ -2167,16 +2137,10 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x108>,
- <0 0x01d87600 0 0x1e0>,
- <0 0x01d87c00 0 0x1dc>,
- <0 0x01d87800 0 0x108>,
- <0 0x01d87a00 0 0x1e0>;
- #phy-cells = <0>;
- };
+ #phy-cells = <0>;
+
+ status = "disabled";
};
ipa_virt: interconnect@1e00000 {
@@ -2252,7 +2216,7 @@
};
gmu: gmu@2c6a000 {
- compatible="qcom,adreno-gmu-680.1", "qcom,adreno-gmu";
+ compatible = "qcom,adreno-gmu-680.1", "qcom,adreno-gmu";
reg = <0 0x02c6a000 0 0x30000>,
<0 0x0b290000 0 0x10000>,
@@ -2464,6 +2428,23 @@
status = "disabled";
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_prim_qmpphy_out: endpoint {};
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_prim_qmpphy_dp_in: endpoint {};
+ };
+ };
+
usb_prim_ssphy: usb3-phy@88e9200 {
reg = <0 0x088e9200 0 0x200>,
<0 0x088e9400 0 0x200>,
@@ -2513,6 +2494,23 @@
status = "disabled";
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_sec_qmpphy_out: endpoint {};
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_sec_qmpphy_dp_in: endpoint {};
+ };
+ };
+
usb_sec_ssphy: usb3-phy@88e9200 {
reg = <0 0x088ee200 0 0x200>,
<0 0x088ee400 0 0x200>,
@@ -2541,8 +2539,11 @@
system-cache-controller@9200000 {
compatible = "qcom,sc8180x-llcc";
- reg = <0 0x09200000 0 0x50000>, <0 0x09600000 0 0x50000>;
- reg-names = "llcc_base", "llcc_broadcast_base";
+ reg = <0 0x09200000 0 0x50000>, <0 0x09280000 0 0x50000>,
+ <0 0x09300000 0 0x50000>, <0 0x09380000 0 0x50000>,
+ <0 0x09600000 0 0x50000>;
+ reg-names = "llcc0_base", "llcc1_base", "llcc2_base",
+ "llcc3_base", "llcc_broadcast_base";
interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -2556,10 +2557,10 @@
usb_prim: usb@a6f8800 {
compatible = "qcom,sc8180x-dwc3", "qcom,dwc3";
reg = <0 0x0a6f8800 0 0x400>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 488 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 489 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq",
"ss_phy_irq",
"dm_hs_phy_irq",
@@ -2568,14 +2569,14 @@
clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>,
<&gcc GCC_USB30_PRIM_MASTER_CLK>,
<&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>,
- <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
<&gcc GCC_USB30_PRIM_SLEEP_CLK>,
+ <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
<&gcc GCC_USB3_SEC_CLKREF_CLK>;
clock-names = "cfg_noc",
"core",
"iface",
- "mock_utmi",
"sleep",
+ "mock_utmi",
"xo";
resets = <&gcc GCC_USB30_PRIM_BCR>;
power-domains = <&gcc USB30_PRIM_GDSC>;
@@ -2604,6 +2605,11 @@
snps,dis_enblslpm_quirk;
phys = <&usb_prim_hsphy>, <&usb_prim_ssphy>;
phy-names = "usb2-phy", "usb3-phy";
+
+ port {
+ usb_prim_role_switch: endpoint {
+ };
+ };
};
};
@@ -2614,21 +2620,21 @@
clocks = <&gcc GCC_CFG_NOC_USB3_SEC_AXI_CLK>,
<&gcc GCC_USB30_SEC_MASTER_CLK>,
<&gcc GCC_AGGRE_USB3_SEC_AXI_CLK>,
- <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>,
<&gcc GCC_USB30_SEC_SLEEP_CLK>,
+ <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>,
<&gcc GCC_USB3_SEC_CLKREF_CLK>;
clock-names = "cfg_noc",
"core",
"iface",
- "mock_utmi",
"sleep",
+ "mock_utmi",
"xo";
resets = <&gcc GCC_USB30_SEC_BCR>;
power-domains = <&gcc USB30_SEC_GDSC>;
- interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 490 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 491 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 7 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 11 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -2656,6 +2662,11 @@
snps,dis_enblslpm_quirk;
phys = <&usb_sec_hsphy>, <&usb_sec_ssphy>;
phy-names = "usb2-phy", "usb3-phy";
+
+ port {
+ usb_sec_role_switch: endpoint {
+ };
+ };
};
};
@@ -2702,11 +2713,15 @@
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
<&gcc GCC_DISP_HF_AXI_CLK>,
<&dispcc DISP_CC_MDSS_MDP_CLK>,
- <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>,
+ <&dispcc DISP_CC_MDSS_ROT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>;
clock-names = "iface",
"bus",
"core",
- "vsync";
+ "vsync",
+ "rot",
+ "lut";
assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>,
<&dispcc DISP_CC_MDSS_VSYNC_CLK>;
@@ -2983,6 +2998,8 @@
port@1 {
reg = <1>;
+ mdss_dp0_out: endpoint {
+ };
};
};
@@ -3057,6 +3074,8 @@
port@1 {
reg = <1>;
+ mdss_dp1_out: endpoint {
+ };
};
};
@@ -3111,8 +3130,6 @@
phys = <&edp_phy>;
phy-names = "dp";
- #sound-dai-cells = <0>;
-
operating-points-v2 = <&edp_opp_table>;
power-domains = <&rpmhpd SC8180X_MMCX>;
@@ -3255,7 +3272,6 @@
#size-cells = <0>;
interrupt-controller;
#interrupt-cells = <4>;
- cell-index = <0>;
};
apps_smmu: iommu@15000000 {
@@ -3413,10 +3429,12 @@
reg = <0x0 0x17a00000 0x0 0x10000>, /* GICD */
<0x0 0x17a60000 0x0 0x100000>; /* GICR * 8 */
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ #redistributor-regions = <1>;
+ redistributor-stride = <0 0x20000>;
};
apss_shared: mailbox@17c00000 {
- compatible = "qcom,sc8180x-apss-shared";
+ compatible = "qcom,sc8180x-apss-shared", "qcom,sdm845-apss-shared";
reg = <0x0 0x17c00000 0x0 0x1000>;
#mbox-cells = <1>;
};
@@ -3429,7 +3447,7 @@
#size-cells = <1>;
ranges = <0 0 0 0x20000000>;
- frame@17c21000{
+ frame@17c21000 {
reg = <0x17c21000 0x1000>,
<0x17c22000 0x1000>;
frame-number = <0>;
@@ -3856,7 +3874,7 @@
};
};
- gpu-thermal-top {
+ gpu-top-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
@@ -4006,7 +4024,7 @@
};
};
- gpu-thermal-bottom {
+ gpu-bottom-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-crd.dts b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-crd.dts
index b566e403d1db..41215567b3ae 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-crd.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-crd.dts
@@ -133,7 +133,7 @@
vreg_edp_bl: regulator-edp-bl {
compatible = "regulator-fixed";
- regulator-name = "VBL9";
+ regulator-name = "VREG_EDP_BL";
regulator-min-microvolt = <3600000>;
regulator-max-microvolt = <3600000>;
@@ -149,7 +149,7 @@
vreg_nvme: regulator-nvme {
compatible = "regulator-fixed";
- regulator-name = "VCC3_SSD";
+ regulator-name = "VREG_NVME_3P3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -163,11 +163,11 @@
vreg_misc_3p3: regulator-misc-3p3 {
compatible = "regulator-fixed";
- regulator-name = "VCC3B";
+ regulator-name = "VREG_MISC_3P3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>;
+ gpio = <&pmc8280_1_gpios 2 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
@@ -180,7 +180,7 @@
vreg_wlan: regulator-wlan {
compatible = "regulator-fixed";
- regulator-name = "VCC_WLAN_3R9";
+ regulator-name = "VPH_PWR_WLAN";
regulator-min-microvolt = <3900000>;
regulator-max-microvolt = <3900000>;
@@ -196,7 +196,7 @@
vreg_wwan: regulator-wwan {
compatible = "regulator-fixed";
- regulator-name = "VCC3B_WAN";
+ regulator-name = "SDX_VPH_PWR";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -234,7 +234,6 @@
mode-switch;
orientation-switch;
- svid = /bits/ 16 <0xff01>;
port {
usb0_sbu_mux: endpoint {
@@ -254,7 +253,6 @@
mode-switch;
orientation-switch;
- svid = /bits/ 16 <0xff01>;
port {
usb1_sbu_mux: endpoint {
@@ -460,6 +458,8 @@
};
&mdss0_dp3_phy {
+ compatible = "qcom,sc8280xp-edp-phy";
+
vdda-phy-supply = <&vreg_l6b>;
vdda-pll-supply = <&vreg_l3b>;
@@ -563,6 +563,8 @@
};
&pcie4 {
+ max-link-speed = <2>;
+
perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
@@ -757,7 +759,7 @@
};
misc_3p3_reg_en: misc-3p3-reg-en-state {
- pins = "gpio1";
+ pins = "gpio2";
function = "normal";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 7cc3028440b6..eb657e544961 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -12,6 +12,7 @@
#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc8280xp.dtsi"
@@ -78,6 +79,24 @@
};
};
+ leds {
+ compatible = "gpio-leds";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam_indicator_en>;
+
+ led-camera-indicator {
+ label = "white:camera-indicator";
+ function = LED_FUNCTION_INDICATOR;
+ color = <LED_COLOR_ID_WHITE>;
+ gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "none";
+ default-state = "off";
+ /* Reuse as a panic indicator until we get a "camera on" trigger */
+ panic-indicator;
+ };
+ };
+
pmic-glink {
compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";
@@ -334,7 +353,6 @@
mode-switch;
orientation-switch;
- svid = /bits/ 16 <0xff01>;
port {
usb0_sbu_mux: endpoint {
@@ -354,7 +372,6 @@
mode-switch;
orientation-switch;
- svid = /bits/ 16 <0xff01>;
port {
usb1_sbu_mux: endpoint {
@@ -556,6 +573,7 @@
&mdss0_dp3 {
compatible = "qcom,sc8280xp-edp";
+ /delete-property/ #sound-dai-cells;
data-lanes = <0 1 2 3>;
@@ -587,6 +605,7 @@
};
&mdss0_dp3_phy {
+ compatible = "qcom,sc8280xp-edp-phy";
vdda-phy-supply = <&vreg_l6b>;
vdda-pll-supply = <&vreg_l3b>;
@@ -703,6 +722,8 @@
};
&pcie4 {
+ max-link-speed = <2>;
+
perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
@@ -836,88 +857,88 @@
&pmk8280_vadc {
status = "okay";
- pmic-die-temp@3 {
+ channel@3 {
reg = <PMK8350_ADC7_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "pmk8350_die_temp";
};
- xo-therm@44 {
+ channel@44 {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "pmk8350_xo_therm";
};
- pmic-die-temp@103 {
+ channel@103 {
reg = <PM8350_ADC7_DIE_TEMP(1)>;
qcom,pre-scaling = <1 1>;
label = "pmc8280_1_die_temp";
};
- sys-therm@144 {
+ channel@144 {
reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm1";
};
- sys-therm@145 {
+ channel@145 {
reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm2";
};
- sys-therm@146 {
+ channel@146 {
reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm3";
};
- sys-therm@147 {
+ channel@147 {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm4";
};
- pmic-die-temp@303 {
+ channel@303 {
reg = <PM8350_ADC7_DIE_TEMP(3)>;
qcom,pre-scaling = <1 1>;
label = "pmc8280_2_die_temp";
};
- sys-therm@344 {
+ channel@344 {
reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm5";
};
- sys-therm@345 {
+ channel@345 {
reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm6";
};
- sys-therm@346 {
+ channel@346 {
reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm7";
};
- sys-therm@347 {
+ channel@347 {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
qcom,hw-settle-time = <200>;
qcom,ratiometric;
label = "sys_therm8";
};
- pmic-die-temp@403 {
+ channel@403 {
reg = <PMR735A_ADC7_DIE_TEMP>;
qcom,pre-scaling = <1 1>;
label = "pmr735a_die_temp";
@@ -1246,7 +1267,7 @@
};
&tlmm {
- gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>;
+ gpio-reserved-ranges = <70 2>, <74 6>, <125 2>, <128 2>, <154 4>;
bt_default: bt-default-state {
hstp-bt-en-pins {
@@ -1263,6 +1284,13 @@
};
};
+ cam_indicator_en: cam-indicator-en-state {
+ pins = "gpio28";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
edp_reg_en: edp-reg-en-state {
pins = "gpio25";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-pmics.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-pmics.dtsi
index a0ba535bb6c9..80ee12ded4f4 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-pmics.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-pmics.dtsi
@@ -101,7 +101,7 @@
compatible = "qcom,pmk8350-rtc";
reg = <0x6100>, <0x6200>;
reg-names = "rtc", "alarm";
- interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
+ interrupts-extended = <&spmi_bus 0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
wakeup-source;
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp.dtsi
index ac0596dfdbc4..febf28356ff8 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sc8280xp.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sc8280xp.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h>
#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sc8280xp-camcc.h>
#include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sc8280xp.h>
@@ -298,6 +299,7 @@
firmware {
scm: scm {
compatible = "qcom,scm-sc8280xp", "qcom,scm";
+ interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
};
};
@@ -2730,7 +2732,7 @@
status = "disabled";
};
- swr1: soundwire-controller@3210000 {
+ swr1: soundwire@3210000 {
compatible = "qcom,soundwire-v1.6.0";
reg = <0 0x03210000 0 0x2000>;
interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
@@ -2806,7 +2808,7 @@
status = "disabled";
};
- swr0: soundwire-controller@3250000 {
+ swr0: soundwire@3250000 {
reg = <0 0x03250000 0 0x2000>;
compatible = "qcom,soundwire-v1.6.0";
interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
@@ -2843,7 +2845,7 @@
#reset-cells = <1>;
};
- swr2: soundwire-controller@3330000 {
+ swr2: soundwire@3330000 {
compatible = "qcom,soundwire-v1.6.0";
reg = <0 0x03330000 0 0x2000>;
interrupts = <GIC_SPI 959 IRQ_TYPE_LEVEL_HIGH>,
@@ -3449,6 +3451,20 @@
};
};
+ camcc: clock-controller@ad00000 {
+ compatible = "qcom,sc8280xp-camcc";
+ reg = <0 0x0ad00000 0 0x20000>;
+ clocks = <&gcc GCC_CAMERA_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>,
+ <&rpmhcc RPMH_CXO_CLK_A>,
+ <&sleep_clk>;
+ power-domains = <&rpmhpd SC8280XP_MMCX>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
mdss0: display-subsystem@ae00000 {
compatible = "qcom,sc8280xp-mdss";
reg = <0 0x0ae00000 0 0x1000>;
@@ -4029,6 +4045,7 @@
sram@c3f0000 {
compatible = "qcom,rpmh-stats";
reg = <0 0x0c3f0000 0 0x400>;
+ qcom,qmp = <&aoss_qmp>;
};
spmi_bus: spmi@c440000 {
@@ -4058,6 +4075,7 @@
interrupt-controller;
#interrupt-cells = <2>;
gpio-ranges = <&tlmm 0 0 230>;
+ wakeup-parent = <&pdc>;
};
apps_smmu: iommu@15000000 {
@@ -4223,7 +4241,7 @@
compatible = "qcom,apss-wdt-sc8280xp", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
timer@17c20000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sda660-inforce-ifc6560.dts b/sys/contrib/device-tree/src/arm64/qcom/sda660-inforce-ifc6560.dts
index 0b23d5bb3f26..2ed39d402d3f 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sda660-inforce-ifc6560.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sda660-inforce-ifc6560.dts
@@ -43,7 +43,7 @@
*/
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
};
hdmi-out {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm630-sony-xperia-nile.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm630-sony-xperia-nile.dtsi
index 3033723fc6ff..87d0293c728d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm630-sony-xperia-nile.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm630-sony-xperia-nile.dtsi
@@ -150,7 +150,7 @@
*/
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm630.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm630.dtsi
index bba0f366ef03..513fe5e76b68 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm630.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm630.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/clock/qcom,gpucc-sdm660.h>
#include <dt-bindings/clock/qcom,mmcc-sdm660.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/interconnect/qcom,sdm660.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/gpio/gpio.h>
@@ -359,6 +360,74 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,sdm660-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-sdm660";
+ qcom,glink-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-sdm660", "qcom,rpmcc";
+ #clock-cells = <1>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,sdm660-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION>;
+ };
+
+ rpmpd_opp_ret_plus: opp2 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
+ };
+
+ rpmpd_opp_min_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
+
+ rpmpd_opp_low_svs: opp4 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
+
+ rpmpd_opp_svs: opp5 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
+
+ rpmpd_opp_svs_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
+
+ rpmpd_opp_nom: opp7 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
+
+ rpmpd_opp_nom_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp9 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -385,7 +454,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
smem_region: smem-mem@86000000 {
@@ -440,70 +509,6 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
-
- interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-sdm660";
- qcom,glink-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-sdm660", "qcom,rpmcc";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,sdm660-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <RPM_SMD_LEVEL_RETENTION>;
- };
-
- rpmpd_opp_ret_plus: opp2 {
- opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
- };
-
- rpmpd_opp_min_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
-
- rpmpd_opp_low_svs: opp4 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
-
- rpmpd_opp_svs: opp5 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
-
- rpmpd_opp_svs_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
-
- rpmpd_opp_nom: opp7 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
-
- rpmpd_opp_nom_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
-
- rpmpd_opp_turbo: opp9 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
- };
- };
- };
- };
-
smem: smem {
compatible = "qcom,smem";
memory-region = <&smem_region>;
@@ -601,9 +606,6 @@
compatible = "qcom,sdm660-bimc";
reg = <0x01008000 0x78000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
- <&rpmcc RPM_SMD_BIMC_A_CLK>;
};
restart@10ac000 {
@@ -615,28 +617,17 @@
compatible = "qcom,sdm660-cnoc";
reg = <0x01500000 0x10000>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
- <&rpmcc RPM_SMD_CNOC_A_CLK>;
};
snoc: interconnect@1626000 {
compatible = "qcom,sdm660-snoc";
reg = <0x01626000 0x7090>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a";
- clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
- <&rpmcc RPM_SMD_SNOC_A_CLK>;
};
anoc2_smmu: iommu@16c0000 {
compatible = "qcom,sdm630-smmu-v2", "qcom,smmu-v2";
reg = <0x016c0000 0x40000>;
-
- assigned-clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
- assigned-clock-rates = <1000>;
- clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
- clock-names = "bus";
#global-interrupts = <2>;
#iommu-cells = <1>;
@@ -681,16 +672,12 @@
compatible = "qcom,sdm660-a2noc";
reg = <0x01704000 0xc100>;
#interconnect-cells = <1>;
- clock-names = "bus",
- "bus_a",
- "ipa",
+ clock-names = "ipa",
"ufs_axi",
"aggre2_ufs_axi",
"aggre2_usb3_axi",
"cfg_noc_usb2_axi";
- clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
- <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
- <&rpmcc RPM_SMD_IPA_CLK>,
+ clocks = <&rpmcc RPM_SMD_IPA_CLK>,
<&gcc GCC_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_USB3_AXI_CLK>,
@@ -701,10 +688,8 @@
compatible = "qcom,sdm660-mnoc";
reg = <0x01745000 0xa010>;
#interconnect-cells = <1>;
- clock-names = "bus", "bus_a", "iface";
- clocks = <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK>,
- <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK_A>,
- <&mmcc AHB_CLK_SRC>;
+ clock-names = "iface";
+ clocks = <&mmcc AHB_CLK_SRC>;
};
tsens: thermal-sensor@10ae000 {
@@ -1024,13 +1009,72 @@
};
};
+ remoteproc_mss: remoteproc@4080000 {
+ compatible = "qcom,sdm660-mss-pil";
+ reg = <0x04080000 0x100>, <0x04180000 0x40>;
+ reg-names = "qdsp6", "rmb";
+
+ interrupts-extended = <&intc GIC_SPI 448 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack",
+ "shutdown-ack";
+
+ clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
+ <&gcc GCC_BIMC_MSS_Q6_AXI_CLK>,
+ <&gcc GCC_BOOT_ROM_AHB_CLK>,
+ <&gcc GPLL0_OUT_MSSCC>,
+ <&gcc GCC_MSS_SNOC_AXI_CLK>,
+ <&gcc GCC_MSS_MNOC_BIMC_AXI_CLK>,
+ <&rpmcc RPM_SMD_QDSS_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface",
+ "bus",
+ "mem",
+ "gpll0_mss",
+ "snoc_axi",
+ "mnoc_axi",
+ "qdss",
+ "xo";
+
+ qcom,smem-states = <&modem_smp2p_out 0>;
+ qcom,smem-state-names = "stop";
+
+ resets = <&gcc GCC_MSS_RESTART>;
+ reset-names = "mss_restart";
+
+ qcom,halt-regs = <&tcsr_regs_1 0x3000 0x5000 0x4000>;
+
+ power-domains = <&rpmpd SDM660_VDDCX>,
+ <&rpmpd SDM660_VDDMX>;
+ power-domain-names = "cx", "mx";
+
+ memory-region = <&mba_region>, <&mpss_region>;
+
+ status = "disabled";
+
+ glink-edge {
+ interrupts = <GIC_SPI 452 IRQ_TYPE_EDGE_RISING>;
+ label = "modem";
+ qcom,remote-pid = <1>;
+ mboxes = <&apcs_glb 15>;
+ };
+ };
+
adreno_gpu: gpu@5000000 {
compatible = "qcom,adreno-508.0", "qcom,adreno";
reg = <0x05000000 0x40000>;
reg-names = "kgsl_3d0_reg_memory";
- interrupts = <0 300 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_GPU_CFG_AHB_CLK>,
<&gpucc GPUCC_RBBMTIMER_CLK>,
@@ -1122,7 +1166,9 @@
clocks = <&gcc GCC_GPU_CFG_AHB_CLK>,
<&gcc GCC_BIMC_GFX_CLK>,
<&gcc GCC_GPU_BIMC_GFX_CLK>;
- clock-names = "iface", "mem", "mem_iface";
+ clock-names = "iface",
+ "mem",
+ "mem_iface";
#global-interrupts = <2>;
#iommu-cells = <1>;
@@ -1196,11 +1242,11 @@
spmi_bus: spmi@800f000 {
compatible = "qcom,spmi-pmic-arb";
- reg = <0x0800f000 0x1000>,
- <0x08400000 0x1000000>,
- <0x09400000 0x1000000>,
- <0x0a400000 0x220000>,
- <0x0800a000 0x3000>;
+ reg = <0x0800f000 0x1000>,
+ <0x08400000 0x1000000>,
+ <0x09400000 0x1000000>,
+ <0x0a400000 0x220000>,
+ <0x0800a000 0x3000>;
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
interrupt-names = "periph_irq";
interrupts = <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>;
@@ -1224,20 +1270,16 @@
<&gcc GCC_USB30_MASTER_CLK>,
<&gcc GCC_AGGRE2_USB3_AXI_CLK>,
<&gcc GCC_USB30_SLEEP_CLK>,
- <&gcc GCC_USB30_MOCK_UTMI_CLK>,
- <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
+ <&gcc GCC_USB30_MOCK_UTMI_CLK>;
clock-names = "cfg_noc",
"core",
"iface",
"sleep",
- "mock_utmi",
- "bus";
+ "mock_utmi";
assigned-clocks = <&gcc GCC_USB30_MOCK_UTMI_CLK>,
- <&gcc GCC_USB30_MASTER_CLK>,
- <&rpmcc RPM_SMD_AGGR2_NOC_CLK>;
- assigned-clock-rates = <19200000>, <120000000>,
- <19200000>;
+ <&gcc GCC_USB30_MASTER_CLK>;
+ assigned-clock-rates = <19200000>, <120000000>;
interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
@@ -1412,10 +1454,10 @@
clocks = <&gcc GCC_CFG_NOC_USB2_AXI_CLK>,
<&gcc GCC_USB20_MASTER_CLK>,
- <&gcc GCC_USB20_MOCK_UTMI_CLK>,
- <&gcc GCC_USB20_SLEEP_CLK>;
+ <&gcc GCC_USB20_SLEEP_CLK>,
+ <&gcc GCC_USB20_MOCK_UTMI_CLK>;
clock-names = "cfg_noc", "core",
- "mock_utmi", "sleep";
+ "sleep", "mock_utmi";
assigned-clocks = <&gcc GCC_USB20_MOCK_UTMI_CLK>,
<&gcc GCC_USB20_MASTER_CLK>;
@@ -2140,10 +2182,9 @@
clocks = <&mmcc MNOC_AHB_CLK>,
<&mmcc BIMC_SMMU_AHB_CLK>,
- <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK>,
<&mmcc BIMC_SMMU_AXI_CLK>;
clock-names = "iface-mm", "iface-smmu",
- "bus-mm", "bus-smmu";
+ "bus-smmu";
#global-interrupts = <2>;
#iommu-cells = <1>;
@@ -2260,12 +2301,6 @@
compatible = "qcom,sdm660-gnoc";
reg = <0x17900000 0xe000>;
#interconnect-cells = <1>;
- /*
- * This one apparently features no clocks,
- * so let's not mess with the driver needlessly
- */
- clock-names = "bus", "bus_a";
- clocks = <&xo_board>, <&xo_board>;
};
apcs_glb: mailbox@17911000 {
@@ -2286,50 +2321,50 @@
frame@17921000 {
frame-number = <0>;
- interrupts = <0 8 0x4>,
- <0 7 0x4>;
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17921000 0x1000>,
<0x17922000 0x1000>;
};
frame@17923000 {
frame-number = <1>;
- interrupts = <0 9 0x4>;
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17923000 0x1000>;
status = "disabled";
};
frame@17924000 {
frame-number = <2>;
- interrupts = <0 10 0x4>;
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17924000 0x1000>;
status = "disabled";
};
frame@17925000 {
frame-number = <3>;
- interrupts = <0 11 0x4>;
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17925000 0x1000>;
status = "disabled";
};
frame@17926000 {
frame-number = <4>;
- interrupts = <0 12 0x4>;
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17926000 0x1000>;
status = "disabled";
};
frame@17927000 {
frame-number = <5>;
- interrupts = <0 13 0x4>;
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17927000 0x1000>;
status = "disabled";
};
frame@17928000 {
frame-number = <6>;
- interrupts = <0 14 0x4>;
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x17928000 0x1000>;
status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm632-fairphone-fp3.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm632-fairphone-fp3.dts
index 301eca9a4f31..057579ae3013 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm632-fairphone-fp3.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm632-fairphone-fp3.dts
@@ -80,6 +80,10 @@
};
};
+&lpass {
+ status = "okay";
+};
+
&pm8953_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
@@ -239,3 +243,18 @@
&usb3_dwc3 {
dr_mode = "peripheral";
};
+
+&wcnss {
+ status = "okay";
+
+ vddpx-supply = <&pm8953_l5>;
+};
+
+&wcnss_iris {
+ compatible = "qcom,wcn3680";
+
+ vddxo-supply = <&pm8953_l7>;
+ vddrfa-supply = <&pm8953_l19>;
+ vddpa-supply = <&pm8953_l9>;
+ vdddig-supply = <&pm8953_l5>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm660-xiaomi-lavender.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm660-xiaomi-lavender.dts
index 8fb2d1788742..3c47410ba94c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm660-xiaomi-lavender.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm660-xiaomi-lavender.dts
@@ -85,7 +85,7 @@
*/
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm670.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm670.dtsi
index a1c207c0266d..4d7b77a23159 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm670.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm670.dtsi
@@ -6,10 +6,12 @@
* Copyright (c) 2022, Richard Acayan. All rights reserved.
*/
+#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/dma/qcom-gpi.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sdm670-rpmh.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/phy/phy-qcom-qusb2.h>
@@ -35,6 +37,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x0>;
enable-method = "psci";
+ capacity-dmips-mhz = <610>;
+ dynamic-power-coefficient = <203>;
+ qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD0>;
power-domain-names = "psci";
next-level-cache = <&L2_0>;
@@ -56,6 +64,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x100>;
enable-method = "psci";
+ capacity-dmips-mhz = <610>;
+ dynamic-power-coefficient = <203>;
+ qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD1>;
power-domain-names = "psci";
next-level-cache = <&L2_100>;
@@ -72,6 +86,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x200>;
enable-method = "psci";
+ capacity-dmips-mhz = <610>;
+ dynamic-power-coefficient = <203>;
+ qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD2>;
power-domain-names = "psci";
next-level-cache = <&L2_200>;
@@ -88,6 +108,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x300>;
enable-method = "psci";
+ capacity-dmips-mhz = <610>;
+ dynamic-power-coefficient = <203>;
+ qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD3>;
power-domain-names = "psci";
next-level-cache = <&L2_300>;
@@ -104,6 +130,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x400>;
enable-method = "psci";
+ capacity-dmips-mhz = <610>;
+ dynamic-power-coefficient = <203>;
+ qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD4>;
power-domain-names = "psci";
next-level-cache = <&L2_400>;
@@ -120,6 +152,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x500>;
enable-method = "psci";
+ capacity-dmips-mhz = <610>;
+ dynamic-power-coefficient = <203>;
+ qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD5>;
power-domain-names = "psci";
next-level-cache = <&L2_500>;
@@ -136,6 +174,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x600>;
enable-method = "psci";
+ capacity-dmips-mhz = <1024>;
+ dynamic-power-coefficient = <393>;
+ qcom,freq-domain = <&cpufreq_hw 1>;
+ operating-points-v2 = <&cpu6_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD6>;
power-domain-names = "psci";
next-level-cache = <&L2_600>;
@@ -152,6 +196,12 @@
compatible = "qcom,kryo360";
reg = <0x0 0x700>;
enable-method = "psci";
+ capacity-dmips-mhz = <1024>;
+ dynamic-power-coefficient = <393>;
+ qcom,freq-domain = <&cpufreq_hw 1>;
+ operating-points-v2 = <&cpu6_opp_table>;
+ interconnects = <&gladiator_noc MASTER_AMPSS_M0 3 &mem_noc SLAVE_EBI_CH0 3>,
+ <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
power-domains = <&CPU_PD7>;
power-domain-names = "psci";
next-level-cache = <&L2_700>;
@@ -246,6 +296,135 @@
reg = <0x0 0x80000000 0x0 0x0>;
};
+ cpu0_opp_table: opp-table-cpu0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ cpu0_opp1: opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ opp-peak-kBps = <400000 4800000>;
+ };
+
+ cpu0_opp2: opp-576000000 {
+ opp-hz = /bits/ 64 <576000000>;
+ opp-peak-kBps = <400000 4800000>;
+ };
+
+ cpu0_opp3: opp-748800000 {
+ opp-hz = /bits/ 64 <748800000>;
+ opp-peak-kBps = <1200000 4800000>;
+ };
+
+ cpu0_opp4: opp-998400000 {
+ opp-hz = /bits/ 64 <998400000>;
+ opp-peak-kBps = <1804000 8908800>;
+ };
+
+ cpu0_opp5: opp-1209600000 {
+ opp-hz = /bits/ 64 <1209600000>;
+ opp-peak-kBps = <2188000 8908800>;
+ };
+
+ cpu0_opp6: opp-1324800000 {
+ opp-hz = /bits/ 64 <1324800000>;
+ opp-peak-kBps = <2188000 13516800>;
+ };
+
+ cpu0_opp7: opp-1516800000 {
+ opp-hz = /bits/ 64 <1516800000>;
+ opp-peak-kBps = <3072000 15052800>;
+ };
+
+ cpu0_opp8: opp-1612800000 {
+ opp-hz = /bits/ 64 <1612800000>;
+ opp-peak-kBps = <3072000 22118400>;
+ };
+
+ cpu0_opp9: opp-1708800000 {
+ opp-hz = /bits/ 64 <1708800000>;
+ opp-peak-kBps = <4068000 23040000>;
+ };
+ };
+
+ cpu6_opp_table: opp-table-cpu6 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ cpu6_opp1: opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ opp-peak-kBps = <400000 4800000>;
+ };
+
+ cpu6_opp2: opp-652800000 {
+ opp-hz = /bits/ 64 <652800000>;
+ opp-peak-kBps = <400000 4800000>;
+ };
+
+ cpu6_opp3: opp-825600000 {
+ opp-hz = /bits/ 64 <825600000>;
+ opp-peak-kBps = <1200000 4800000>;
+ };
+
+ cpu6_opp4: opp-979200000 {
+ opp-hz = /bits/ 64 <979200000>;
+ opp-peak-kBps = <1200000 4800000>;
+ };
+
+ cpu6_opp5: opp-1132800000 {
+ opp-hz = /bits/ 64 <1132800000>;
+ opp-peak-kBps = <2188000 8908800>;
+ };
+
+ cpu6_opp6: opp-1363200000 {
+ opp-hz = /bits/ 64 <1363200000>;
+ opp-peak-kBps = <4068000 12902400>;
+ };
+
+ cpu6_opp7: opp-1536000000 {
+ opp-hz = /bits/ 64 <1536000000>;
+ opp-peak-kBps = <4068000 12902400>;
+ };
+
+ cpu6_opp8: opp-1747200000 {
+ opp-hz = /bits/ 64 <1747200000>;
+ opp-peak-kBps = <4068000 15052800>;
+ };
+
+ cpu6_opp9: opp-1843200000 {
+ opp-hz = /bits/ 64 <1843200000>;
+ opp-peak-kBps = <4068000 15052800>;
+ };
+
+ cpu6_opp10: opp-1996800000 {
+ opp-hz = /bits/ 64 <1996800000>;
+ opp-peak-kBps = <6220000 19046400>;
+ };
+ };
+
+ dsi_opp_table: opp-table-dsi {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmhpd_opp_min_svs>;
+ };
+
+ opp-180000000 {
+ opp-hz = /bits/ 64 <180000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-275000000 {
+ opp-hz = /bits/ 64 <275000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-358000000 {
+ opp-hz = /bits/ 64 <358000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+ };
+
psci {
compatible = "arm,psci-1.0";
method = "smc";
@@ -969,6 +1148,7 @@
interrupt-controller;
#interrupt-cells = <2>;
gpio-ranges = <&tlmm 0 0 151>;
+ wakeup-parent = <&pdc>;
qup_i2c0_default: qup-i2c0-default-state {
pins = "gpio0", "gpio1";
@@ -1140,10 +1320,10 @@
<&gcc GCC_USB30_PRIM_MASTER_CLK>;
assigned-clock-rates = <19200000>, <150000000>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 488 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 489 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -1169,6 +1349,17 @@
};
};
+ pdc: interrupt-controller@b220000 {
+ compatible = "qcom,sdm670-pdc", "qcom,pdc";
+ reg = <0 0x0b220000 0 0x30000>;
+ qcom,pdc-ranges = <0 480 40>, <41 521 7>, <49 529 4>,
+ <54 534 24>, <79 559 15>, <94 609 15>,
+ <115 630 7>;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&intc>;
+ interrupt-controller;
+ };
+
spmi_bus: spmi@c440000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0 0x0c440000 0 0x1100>,
@@ -1187,6 +1378,273 @@
#interrupt-cells = <4>;
};
+ mdss: display-subsystem@ae00000 {
+ compatible = "qcom,sdm670-mdss";
+ reg = <0 0x0ae00000 0 0x1000>;
+ reg-names = "mdss";
+
+ power-domains = <&dispcc MDSS_GDSC>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface", "core";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interconnects = <&mmss_noc MASTER_MDP_PORT0 0 &mem_noc SLAVE_EBI_CH0 0>,
+ <&mmss_noc MASTER_MDP_PORT1 0 &mem_noc SLAVE_EBI_CH0 0>;
+ interconnect-names = "mdp0-mem", "mdp1-mem";
+
+ iommus = <&apps_smmu 0x880 0x8>,
+ <&apps_smmu 0xc80 0x8>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@ae01000 {
+ compatible = "qcom,sdm670-dpu";
+ reg = <0 0x0ae01000 0 0x8f000>,
+ <0 0x0aeb0000 0 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ clocks = <&gcc GCC_DISP_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "gcc-bus", "iface", "bus", "core", "vsync";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmhpd SDM670_CX>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf0_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi1_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmhpd_opp_min_svs>;
+ };
+
+ opp-171428571 {
+ opp-hz = /bits/ 64 <171428571>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-358000000 {
+ opp-hz = /bits/ 64 <358000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-430000000 {
+ opp-hz = /bits/ 64 <430000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@ae94000 {
+ compatible = "qcom,sdm670-dsi-ctrl",
+ "qcom,mdss-dsi-ctrl";
+ reg = <0 0x0ae94000 0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmhpd SDM670_CX>;
+
+ phys = <&mdss_dsi0_phy>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@ae94400 {
+ compatible = "qcom,dsi-phy-10nm";
+ reg = <0 0x0ae94400 0 0x200>,
+ <0 0x0ae94600 0 0x280>,
+ <0 0x0ae94a00 0 0x1e0>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "ref";
+
+ status = "disabled";
+ };
+
+ mdss_dsi1: dsi@ae96000 {
+ compatible = "qcom,sdm670-dsi-ctrl",
+ "qcom,mdss-dsi-ctrl";
+ reg = <0 0x0ae96000 0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <5>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi1_phy 0>, <&mdss_dsi1_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmhpd SDM670_CX>;
+
+ phys = <&mdss_dsi1_phy>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi1_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi1_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi1_phy: phy@ae96400 {
+ compatible = "qcom,dsi-phy-10nm";
+ reg = <0 0x0ae96400 0 0x200>,
+ <0 0x0ae96600 0 0x280>,
+ <0 0x0ae96a00 0 0x10e>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "ref";
+
+ status = "disabled";
+ };
+ };
+
+ dispcc: clock-controller@af00000 {
+ compatible = "qcom,sdm845-dispcc";
+ reg = <0 0x0af00000 0 0x10000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_DISP_GPLL0_CLK_SRC>,
+ <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>,
+ <&mdss_dsi1_phy 0>,
+ <&mdss_dsi1_phy 1>,
+ <0>,
+ <0>;
+ clock-names = "bi_tcxo",
+ "gcc_disp_gpll0_clk_src",
+ "gcc_disp_gpll0_div_clk_src",
+ "dsi0_phy_pll_out_byteclk",
+ "dsi0_phy_pll_out_dsiclk",
+ "dsi1_phy_pll_out_byteclk",
+ "dsi1_phy_pll_out_dsiclk",
+ "dp_link_clk_divsel_ten",
+ "dp_vco_divided_clk_src_mux";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
apps_smmu: iommu@15000000 {
compatible = "qcom,sdm670-smmu-500", "qcom,smmu-500", "arm,mmu-500";
reg = <0 0x15000000 0 0x80000>;
@@ -1354,5 +1812,26 @@
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <3>;
};
+
+ osm_l3: interconnect@17d41000 {
+ compatible = "qcom,sdm670-osm-l3", "qcom,osm-l3";
+ reg = <0 0x17d41000 0 0x1400>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
+ clock-names = "xo", "alternate";
+
+ #interconnect-cells = <1>;
+ };
+
+ cpufreq_hw: cpufreq@17d43000 {
+ compatible = "qcom,sdm670-cpufreq-hw", "qcom,cpufreq-hw";
+ reg = <0 0x17d43000 0 0x1400>, <0 0x17d45800 0 0x1400>;
+ reg-names = "freq-domain0", "freq-domain1";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
+ clock-names = "xo", "alternate";
+
+ #freq-domain-cells = <1>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-cheza.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845-cheza.dtsi
index 1ce413263b7f..0ab5e8f53ac9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-cheza.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-cheza.dtsi
@@ -143,16 +143,20 @@
};
};
+&cpufreq_hw {
+ /delete-property/ interrupts-extended; /* reference to lmh_cluster[01] */
+};
+
&psci {
- /delete-node/ cpu0;
- /delete-node/ cpu1;
- /delete-node/ cpu2;
- /delete-node/ cpu3;
- /delete-node/ cpu4;
- /delete-node/ cpu5;
- /delete-node/ cpu6;
- /delete-node/ cpu7;
- /delete-node/ cpu-cluster0;
+ /delete-node/ power-domain-cpu0;
+ /delete-node/ power-domain-cpu1;
+ /delete-node/ power-domain-cpu2;
+ /delete-node/ power-domain-cpu3;
+ /delete-node/ power-domain-cpu4;
+ /delete-node/ power-domain-cpu5;
+ /delete-node/ power-domain-cpu6;
+ /delete-node/ power-domain-cpu7;
+ /delete-node/ power-domain-cluster;
};
&cpus {
@@ -275,6 +279,14 @@
&CLUSTER_SLEEP_0>;
};
+&lmh_cluster0 {
+ status = "disabled";
+};
+
+&lmh_cluster1 {
+ status = "disabled";
+};
+
/*
* Reserved memory changes
*
@@ -338,6 +350,8 @@
&apps_rsc {
+ /delete-property/ power-domains;
+
regulators-0 {
compatible = "qcom,pm8998-rpmh-regulators";
qcom,pmic-id = "a";
@@ -1071,27 +1085,27 @@ ap_ts_i2c: &i2c14 {
};
&pm8998_adc {
- adc-chan@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
label = "sdm_temp";
};
- adc-chan@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
label = "quiet_temp";
};
- adc-chan@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
label = "lte_temp_1";
};
- adc-chan@50 {
+ channel@50 {
reg = <ADC5_AMUX_THM4_100K_PU>;
label = "lte_temp_2";
};
- adc-chan@51 {
+ channel@51 {
reg = <ADC5_AMUX_THM5_100K_PU>;
label = "charger_temp";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-db845c.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-db845c.dts
index d6b464cb61d6..ab6220456513 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-db845c.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-db845c.dts
@@ -67,8 +67,8 @@
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_GREEN>;
gpios = <&pm8998_gpios 13 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "panic-indicator";
default-state = "off";
+ panic-indicator;
};
led-1 {
@@ -101,6 +101,14 @@
};
};
+ reserved-memory {
+ /* Cont splash region set up by the bootloader */
+ cont_splash_mem: framebuffer@9d400000 {
+ reg = <0x0 0x9d400000 0x0 0x2400000>;
+ no-map;
+ };
+ };
+
lt9611_1v8: lt9611-vdd18-regulator {
compatible = "regulator-fixed";
regulator-name = "LT9611_1V8";
@@ -410,6 +418,13 @@
};
};
+&camss {
+ status = "okay";
+
+ vdda-phy-supply = <&vreg_l1a_0p875>;
+ vdda-pll-supply = <&vreg_l26a_1p2>;
+};
+
&cdsp_pas {
status = "okay";
firmware-name = "qcom/sdm845/cdsp.mbn";
@@ -506,6 +521,7 @@
};
&mdss {
+ memory-region = <&cont_splash_mem>;
status = "okay";
};
@@ -1114,7 +1130,7 @@
vdd-rx-supply = <&vreg_s4a_1p8>;
vdd-io-supply = <&vreg_s4a_1p8>;
- swm: swm@c85 {
+ swm: soundwire@c85 {
left_spkr: speaker@0,1 {
compatible = "sdw10217201000";
reg = <0 1>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-lg-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845-lg-common.dtsi
index f942c5afea9b..99dafc6716e7 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-lg-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-lg-common.dtsi
@@ -111,7 +111,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
/* rmtfs upper guard */
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-mtp.dts
index b2d4336e764b..76bfa786612c 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-mtp.dts
@@ -15,6 +15,7 @@
/ {
model = "Qualcomm Technologies, Inc. SDM845 MTP";
compatible = "qcom,sdm845-mtp", "qcom,sdm845";
+ chassis-type = "handset";
aliases {
serial0 = &uart9;
@@ -113,7 +114,7 @@
&adsp_pas {
status = "okay";
- firmware-name = "qcom/sdm845/adsp.mdt";
+ firmware-name = "qcom/sdm845/adsp.mbn";
};
&apps_rsc {
@@ -414,7 +415,7 @@
&cdsp_pas {
status = "okay";
- firmware-name = "qcom/sdm845/cdsp.mdt";
+ firmware-name = "qcom/sdm845/cdsp.mbn";
};
&gcc {
@@ -532,43 +533,75 @@
firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn";
};
+&pcie0 {
+ perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
+
+ pinctrl-0 = <&pcie0_default_state>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l1a_0p875>;
+ vdda-pll-supply = <&vreg_l26a_1p2>;
+
+ status = "okay";
+};
+
+&pcie1 {
+ perst-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_default_state>;
+
+ status = "okay";
+};
+
+&pcie1_phy {
+ status = "okay";
+
+ vdda-phy-supply = <&vreg_l1a_0p875>;
+ vdda-pll-supply = <&vreg_l26a_1p2>;
+};
+
&pm8998_adc {
- adc-chan@4c {
+ channel@4c {
reg = <ADC5_XO_THERM_100K_PU>;
label = "xo_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
- adc-chan@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
label = "msm_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
- adc-chan@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
label = "pa_therm1";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
- adc-chan@51 {
+ channel@51 {
reg = <ADC5_AMUX_THM5_100K_PU>;
label = "quiet_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
- adc-chan@83 {
+ channel@83 {
reg = <ADC5_VPH_PWR>;
label = "vph_pwr";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
- adc-chan@85 {
+ channel@85 {
reg = <ADC5_VCOIN>;
label = "vcoin";
qcom,ratiometric;
@@ -608,6 +641,11 @@
};
};
+&pm8998_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
&qupv3_id_1 {
status = "okay";
};
@@ -624,6 +662,52 @@
cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
};
+&tlmm {
+ pcie0_default_state: pcie0-default-state {
+ clkreq-pins {
+ pins = "gpio36";
+ function = "pci_e0";
+ bias-pull-up;
+ };
+
+ perst-n-pins {
+ pins = "gpio35";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ wake-n-pins {
+ pins = "gpio37";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ pcie1_default_state: pcie1-default-state {
+ clkreq-pins {
+ pins = "gpio103";
+ function = "pci_e1";
+ bias-pull-up;
+ };
+
+ perst-n-pins {
+ pins = "gpio102";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-pull-down;
+ };
+
+ wake-n-pins {
+ pins = "gpio104";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+};
+
&uart9 {
status = "okay";
};
@@ -715,6 +799,9 @@
vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+
+ qcom,snoc-host-cap-8bit-quirk;
+ qcom,ath10k-calibration-variant = "Qualcomm_sdm845mtp";
};
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-common.dtsi
index 122c7128dea9..e821103d49c0 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-common.dtsi
@@ -8,6 +8,7 @@
/dts-v1/;
#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
@@ -90,7 +91,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
rmtfs_upper_guard: rmtfs-upper-guard@f5d01000 {
no-map;
@@ -484,6 +485,28 @@
status = "okay";
};
+&pmi8998_flash {
+ status = "okay";
+
+ led-0 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ led-sources = <1>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <1500000>;
+ flash-max-timeout-us = <1280000>;
+ };
+
+ led-1 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_YELLOW>;
+ led-sources = <2>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <1500000>;
+ flash-max-timeout-us = <1280000>;
+ };
+};
+
&q6afedai {
qi2s@22 {
reg = <22>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-enchilada.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-enchilada.dts
index 623a826b18a3..4005e04d998a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-enchilada.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-oneplus-enchilada.dts
@@ -39,7 +39,7 @@
max98927_codec: max98927@3a {
compatible = "maxim,max98927";
reg = <0x3a>;
- #sound-dai-cells = <1>;
+ #sound-dai-cells = <0>;
pinctrl-0 = <&speaker_default>;
pinctrl-names = "default";
@@ -57,7 +57,7 @@
&sound {
model = "OnePlus 6";
- audio-routing = "RX_BIAS", "MCLK",
+ audio-routing = "RX_BIAS", "MCLK",
"AMIC2", "MIC BIAS2",
"AMIC3", "MIC BIAS4",
"AMIC4", "MIC BIAS1",
@@ -66,7 +66,7 @@
&speaker_playback_dai {
codec {
- sound-dai = <&max98927_codec 0>;
+ sound-dai = <&max98927_codec>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-shift-axolotl.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-shift-axolotl.dts
index dce0141f3719..fbb8655653fb 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-shift-axolotl.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-shift-axolotl.dts
@@ -440,7 +440,7 @@
reg = <0x38>;
wakeup-source;
interrupt-parent = <&tlmm>;
- interrupts = <125 0x2>;
+ interrupts = <125 IRQ_TYPE_EDGE_FALLING>;
vdd-supply = <&vreg_l28a_3p0>;
vcc-i2c-supply = <&vreg_l14a_1p88>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akari.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akari.dts
index d97b7f1e7140..6e65909ab582 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akari.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akari.dts
@@ -15,3 +15,173 @@
&panel {
compatible = "sony,td4353-jdi-tama";
};
+
+&pmi8998_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "NC",
+ "NC",
+ "",
+ "NC",
+ "NC",
+ "",
+ "WLC_EN_N",
+ "NC",
+ "NC", /* GPIO_10 */
+ "RSVD(WLC_EN_N)",
+ "CAM_IO_EN",
+ "",
+ "NC";
+};
+
+&tlmm {
+ gpio-line-names = "NC", /* GPIO_0 */
+ "NC",
+ "NC",
+ "NC",
+ "DEBUG_UART_TX",
+ "DEBUG_UART_RX",
+ "DISP_RESET_N",
+ "NC",
+ "CHAT_CAM_PWR_EN",
+ "CAM2_RSTN",
+ "MDP_VSYNC_P", /* GPIO_10 */
+ "RGBC_IR_INT",
+ "NFC_VEN",
+ "CAM_MCLK0",
+ "CAM_MCLK1",
+ "NC",
+ "NC",
+ "CCI_I2C_SDA0",
+ "CCI_I2C_SCL0",
+ "CCI_I2C_SDA1",
+ "CCI_I2C_SCL1", /* GPIO_20 */
+ "CAM_SOF",
+ "TOF_INT",
+ "TOF_RESET_N",
+ "NC",
+ "NC",
+ "NC",
+ "MAIN_CAM_PWR_EN",
+ "DVDT_ENABLE",
+ "DVDT_WRT_DET_AND",
+ "DVDT_WRT_DET_OR", /* GPIO_30 */
+ "WLC_INT_N",
+ "NC",
+ "CAMSENSOR_I2C_SDA",
+ "CAMSENSOR_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "CC_DIR",
+ "NC",
+ "FP_RESET_N", /* GPIO_40 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "BT_HCI_UART_CTS_N",
+ "BT_HCI_UART_RFR_N",
+ "BT_HCI_UART_TXD",
+ "BT_HCI_UART_TRXD",
+ "USB_AUDIO_EN1",
+ "SW_SERVICE", /* GPIO_50 */
+ "US_EURO_SEL",
+ "NC",
+ "CODEC_INT2_N",
+ "CODEC_INT1_N",
+ "APPS_I2C_SDA",
+ "APPS_I2C_SCL",
+ "FORCED_USB_BOOT",
+ "NC",
+ "NC",
+ "NC", /* GPIO_60 */
+ "USB_PD_EN",
+ "NFC_DWLD_EN",
+ "NFC_IRQ",
+ "CODEC_RST_N",
+ "CODEC_SPI_MISO",
+ "CODEC_SPI_MOSI",
+ "CODEC_SPI_CLK",
+ "CODEC_SPI_CS_N",
+ "NC",
+ "CODEC_SLIMBUS_CLK", /* GPIO_70 */
+ "CODEC_SLIMBUS_DATA0",
+ "CODEC_SLIMBUS_DATA1",
+ "BT_FM_SLIMBUS_DATA",
+ "BT_FM_SLIMBUS_CLK",
+ "HW_ID_0",
+ "HW_ID_1",
+ "TX_GTR_THRES_IN",
+ "NC",
+ "NC",
+ "CAM1_RSTN", /* GPIO_80 */
+ "",
+ "",
+ "",
+ "",
+ "TS_I2C_SDA",
+ "TS_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "NC", /* GPIO_90 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "RFFE6_CLK",
+ "RFFE6_DATA",
+ "TS_RESET_N",
+ "", /* GPIO_100 */
+ "GRFC4",
+ "DEBUG_GPIO0",
+ "DEBUG_GPIO1",
+ "RF_LCD_ID_EN",
+ "UIM2_DATA",
+ "UIM2_CLK",
+ "UIM2_RESET",
+ "UIM2_PRESENT",
+ "UIM1_DATA",
+ "UIM1_CLK", /* GPIO_110 */
+ "UIM1_RESET",
+ "UIM1_PRESENT",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "ACCEL_INT",
+ "GYRO_INT",
+ "COMPASS_INT",
+ "ALS_PROX_INT_N", /* GPIO_120 */
+ "FP_INT",
+ "RF_ID_EXTENTION",
+ "BAROMETER_INT",
+ "ACC_COVER_OPEN",
+ "TS_INT_N",
+ "TRAY_DET",
+ "GRFC3",
+ "NC",
+ "UIM2_DETECT_EN",
+ "QLINK_REQUEST", /* GPIO_130 */
+ "QLINK_ENABLE",
+ "GRFC2",
+ "NC",
+ "WMSS_RESET_N",
+ "PA_INDICATOR_OR",
+ "GRFC1",
+ "RFFE3_DATA",
+ "RFFE3_CLK",
+ "RFFE4_DATA",
+ "RFFE4_CLK", /* GPIO_140 */
+ "RFFE5_DATA",
+ "RFFE5_CLK",
+ "GNSS_EN",
+ "MSS_LTE_COXM_TXD",
+ "MSS_LTE_COXM_RXD",
+ "RFFE2_DATA",
+ "RFFE2_CLK",
+ "RFFE1_DATA",
+ "RFFE1_CLK";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akatsuki.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akatsuki.dts
index 5d2052a0ff69..82e59e453354 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akatsuki.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-akatsuki.dts
@@ -44,11 +44,179 @@
/delete-property/ touch-reset-gpios;
};
+&pmi8998_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "NC",
+ "NC",
+ "",
+ "NC",
+ "NC",
+ "",
+ "WLC_EN_N",
+ "NC",
+ "NC", /* GPIO_10 */
+ "NC",
+ "CAM_IO_EN",
+ "",
+ "NC";
+};
+
&pmi8998_wled {
status = "disabled";
};
&tlmm {
+ gpio-line-names = "NC", /* GPIO_0 */
+ "NC",
+ "NC",
+ "NC",
+ "DEBUG_UART_TX",
+ "DEBUG_UART_RX",
+ "DISP_RESET_N",
+ "SAMD_RSTEN_N",
+ "CHAT_CAM_PWR_EN",
+ "CAM2_RSTN",
+ "MDP_VSYNC_P", /* GPIO_10 */
+ "RGBC_IR_INT",
+ "NFC_VEN",
+ "CAM_MCLK0",
+ "CAM_MCLK1",
+ "NC",
+ "MASTER_RST_N",
+ "CCI_I2C_SDA0",
+ "CCI_I2C_SCL0",
+ "CCI_I2C_SDA1",
+ "CCI_I2C_SCL1", /* GPIO_20 */
+ "CAM_SOF",
+ "TOF_INT",
+ "TOF_RESET_N",
+ "NC",
+ "NC",
+ "NC",
+ "MAIN_CAM_PWR_EN",
+ "DVDT_ENABLE",
+ "DVDT_WRT_DET_AND",
+ "DVDT_WRT_DET_OR", /* GPIO_30 */
+ "WLC_INT_N",
+ "NC",
+ "CAMSENSOR_I2C_SDA",
+ "CAMSENSOR_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "CC_DIR",
+ "NC",
+ "FP_RESET_N", /* GPIO_40 */
+ "NC",
+ "NC",
+ "NC",
+ "DISP_ERR_FG",
+ "BT_HCI_UART_CTS_N",
+ "BT_HCI_UART_RFR_N",
+ "BT_HCI_UART_TXD",
+ "BT_HCI_UART_TRXD",
+ "USB_AUDIO_EN1",
+ "SW_SERVICE", /* GPIO_50 */
+ "US_EURO_SEL",
+ "SAMD_BOOTL_PIN",
+ "CODEC_INT2_N",
+ "CODEC_INT1_N",
+ "APPS_I2C_SDA",
+ "APPS_I2C_SCL",
+ "FORCED_USB_BOOT",
+ "SDM_SWD_CLK",
+ "SDM_SWD_DAT",
+ "SAMD_RST", /* GPIO_60 */
+ "USB_PD_EN",
+ "NFC_DWLD_EN",
+ "NFC_IRQ",
+ "CODEC_RST_N",
+ "CODEC_SPI_MISO",
+ "CODEC_SPI_MOSI",
+ "CODEC_SPI_CLK",
+ "CODEC_SPI_CS_N",
+ "NC",
+ "CODEC_SLIMBUS_CLK", /* GPIO_70 */
+ "CODEC_SLIMBUS_DATA0",
+ "CODEC_SLIMBUS_DATA1",
+ "BT_FM_SLIMBUS_DATA",
+ "BT_FM_SLIMBUS_CLK",
+ "HW_ID_0",
+ "HW_ID_1",
+ "TX_GTR_THRES_IN",
+ "MODE_SEL2",
+ "NC",
+ "CAM1_RSTN", /* GPIO_80 */
+ "",
+ "",
+ "",
+ "",
+ "TS_I2C_SDA",
+ "TS_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "NC", /* GPIO_90 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "RFFE6_CLK",
+ "RFFE6_DATA",
+ "TS_RESET_N",
+ "", /* GPIO_100 */
+ "GRFC4",
+ "DEBUG_GPIO0",
+ "DEBUG_GPIO1",
+ "RF_LCD_ID_EN",
+ "UIM2_DATA",
+ "UIM2_CLK",
+ "UIM2_RESET",
+ "UIM2_PRESENT",
+ "UIM1_DATA",
+ "UIM1_CLK", /* GPIO_110 */
+ "UIM1_RESET",
+ "UIM1_PRESENT",
+ "NC",
+ "NC",
+ "NC",
+ "NFC_ESE_PWR_REQ",
+ "ACCEL_INT",
+ "GYRO_INT",
+ "COMPASS_INT",
+ "ALS_PROX_INT_N", /* GPIO_120 */
+ "FP_INT",
+ "RF_ID_EXTENTION",
+ "BAROMETER_INT",
+ "ACC_COVER_OPEN",
+ "TS_INT_N",
+ "TRAY_DET",
+ "GRFC3",
+ "NC",
+ "UIM2_DETECT_EN",
+ "QLINK_REQUEST", /* GPIO_130 */
+ "QLINK_ENABLE",
+ "GRFC2",
+ "TS_VDDIO_EN",
+ "WMSS_RESET_N",
+ "PA_INDICATOR_OR",
+ "GRFC1",
+ "RFFE3_DATA",
+ "RFFE3_CLK",
+ "RFFE4_DATA",
+ "RFFE4_CLK", /* GPIO_140 */
+ "RFFE5_DATA",
+ "RFFE5_CLK",
+ "GNSS_EN",
+ "MSS_LTE_COXM_TXD",
+ "MSS_LTE_COXM_RXD",
+ "RFFE2_DATA",
+ "RFFE2_CLK",
+ "RFFE1_DATA",
+ "RFFE1_CLK";
+
ts_vddio_en: ts-vddio-en-state {
pins = "gpio133";
function = "gpio";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-apollo.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-apollo.dts
index cd056f78070f..dc15ab1a2716 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-apollo.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama-apollo.dts
@@ -17,3 +17,173 @@
height-mm = <112>;
width-mm = <56>;
};
+
+&pmi8998_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "NC",
+ "NC",
+ "",
+ "VIB_LDO_EN",
+ "NC",
+ "",
+ "NC",
+ "NC",
+ "NC", /* GPIO_10 */
+ "NC",
+ "CAM_IO_EN",
+ "",
+ "NC";
+};
+
+&tlmm {
+ gpio-line-names = "NC", /* GPIO_0 */
+ "NC",
+ "NC",
+ "NC",
+ "DEBUG_UART_TX",
+ "DEBUG_UART_RX",
+ "DISP_RESET_N",
+ "NC",
+ "CHAT_CAM_PWR_EN",
+ "CAM2_RSTN",
+ "MDP_VSYNC_P", /* GPIO_10 */
+ "RGBC_IR_INT",
+ "NFC_VEN",
+ "CAM_MCLK0",
+ "CAM_MCLK1",
+ "NC",
+ "NC",
+ "CCI_I2C_SDA0",
+ "CCI_I2C_SCL0",
+ "CCI_I2C_SDA1",
+ "CCI_I2C_SCL1", /* GPIO_20 */
+ "CAM_SOF",
+ "TOF_INT",
+ "TOF_RESET_N",
+ "NC",
+ "NC",
+ "NC",
+ "MAIN_CAM_PWR_EN",
+ "DVDT_ENABLE",
+ "DVDT_WRT_DET_AND",
+ "DVDT_WRT_DET_OR", /* GPIO_30 */
+ "NC",
+ "NC",
+ "CAMSENSOR_I2C_SDA",
+ "CAMSENSOR_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "CC_DIR",
+ "NC",
+ "FP_RESET_N", /* GPIO_40 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "BT_HCI_UART_CTS_N",
+ "BT_HCI_UART_RFR_N",
+ "BT_HCI_UART_TXD",
+ "BT_HCI_UART_TRXD",
+ "USB_AUDIO_EN1",
+ "SW_SERVICE", /* GPIO_50 */
+ "US_EURO_SEL",
+ "NC",
+ "CODEC_INT2_N",
+ "CODEC_INT1_N",
+ "APPS_I2C_SDA",
+ "APPS_I2C_SCL",
+ "FORCED_USB_BOOT",
+ "NC",
+ "NC",
+ "NC", /* GPIO_60 */
+ "USB_PD_EN",
+ "NFC_DWLD_EN",
+ "NFC_IRQ",
+ "CODEC_RST_N",
+ "CODEC_SPI_MISO",
+ "CODEC_SPI_MOSI",
+ "CODEC_SPI_CLK",
+ "CODEC_SPI_CS_N",
+ "NC",
+ "CODEC_SLIMBUS_CLK", /* GPIO_70 */
+ "CODEC_SLIMBUS_DATA0",
+ "CODEC_SLIMBUS_DATA1",
+ "BT_FM_SLIMBUS_DATA",
+ "BT_FM_SLIMBUS_CLK",
+ "HW_ID_0",
+ "HW_ID_1",
+ "TX_GTR_THRES_IN",
+ "NC",
+ "NC",
+ "CAM1_RSTN", /* GPIO_80 */
+ "",
+ "",
+ "",
+ "",
+ "TS_I2C_SDA",
+ "TS_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "NC", /* GPIO_90 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "RFFE6_CLK",
+ "RFFE6_DATA",
+ "TS_RESET_N",
+ "", /* GPIO_100 */
+ "GRFC4",
+ "DEBUG_GPIO0",
+ "DEBUG_GPIO1",
+ "RF_LCD_ID_EN",
+ "UIM2_DATA",
+ "UIM2_CLK",
+ "UIM2_RESET",
+ "UIM2_PRESENT",
+ "UIM1_DATA",
+ "UIM1_CLK", /* GPIO_110 */
+ "UIM1_RESET",
+ "UIM1_PRESENT",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "ACCEL_INT",
+ "GYRO_INT",
+ "COMPASS_INT",
+ "ALS_PROX_INT_N", /* GPIO_120 */
+ "FP_INT",
+ "RF_ID_EXTENTION",
+ "BAROMETER_INT",
+ "ACC_COVER_OPEN",
+ "TS_INT_N",
+ "TRAY_DET",
+ "GRFC3",
+ "NC",
+ "UIM2_DETECT_EN",
+ "QLINK_REQUEST", /* GPIO_130 */
+ "QLINK_ENABLE",
+ "GRFC2",
+ "NC",
+ "WMSS_RESET_N",
+ "PA_INDICATOR_OR",
+ "GRFC1",
+ "RFFE3_DATA",
+ "RFFE3_CLK",
+ "RFFE4_DATA",
+ "RFFE4_CLK", /* GPIO_140 */
+ "RFFE5_DATA",
+ "RFFE5_CLK",
+ "GNSS_EN",
+ "MSS_LTE_COXM_TXD",
+ "MSS_LTE_COXM_RXD",
+ "RFFE2_DATA",
+ "RFFE2_CLK",
+ "RFFE1_DATA",
+ "RFFE1_CLK";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama.dtsi
index 3bc187a066ae..b02a1dc5fecd 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-sony-xperia-tama.dtsi
@@ -15,6 +15,15 @@
qcom,msm-id = <321 0x20001>; /* SDM845 v2.1 */
qcom,board-id = <8 0>;
+ aliases {
+ serial0 = &uart6;
+ serial1 = &uart9;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
gpio-keys {
compatible = "gpio-keys";
@@ -58,6 +67,36 @@
};
};
+ cam_vana_front_vreg: cam-vana-front-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam_vana_front_vreg";
+ gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&chat_cam_pwr_en>;
+ pinctrl-names = "default";
+ };
+
+ cam_vana_rear_vreg: cam-vana-rear-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam_vana_rear_vreg";
+ gpio = <&tlmm 27 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&main_cam_pwr_en>;
+ pinctrl-names = "default";
+ };
+
+ cam_vio_vreg: cam-vio-reagulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam_vio_vreg";
+ gpio = <&pmi8998_gpios 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&cam_io_en>;
+ pinctrl-names = "default";
+ };
+
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
@@ -515,7 +554,41 @@
status = "okay";
};
+&pm8005_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "NC",
+ "",
+ "";
+};
+
&pm8998_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "FOCUS_N",
+ "",
+ "NC",
+ "VOL_DOWN_N",
+ "VOL_UP_N",
+ "SNAPSHOT_N",
+ "NC",
+ "FLASH_THERM",
+ "NC", /* GPIO_10 */
+ "LCD_ID",
+ "RF_ID",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "", /* GPIO_20 */
+ "NFC_CLK_REQ",
+ "",
+ "",
+ "",
+ "",
+ "";
+
focus_n: focus-n-state {
pins = "gpio2";
function = PMIC_GPIO_FUNC_NORMAL;
@@ -549,6 +622,17 @@
};
};
+&pmi8998_gpios {
+ cam_io_en: cam-io-en-state {
+ pins = "gpio12";
+ function = "normal";
+ qcom,drive-strength = <3>;
+ power-source = <0>;
+ drive-push-pull;
+ output-low;
+ };
+};
+
&pmi8998_wled {
default-brightness = <800>;
qcom,switching-freq = <800>;
@@ -617,6 +701,14 @@
bias-pull-down;
};
+ chat_cam_pwr_en: chat-cam-pwr-en-state {
+ pins = "gpio8";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+
sde_te_active_sleep: sde-te-active-sleep-state {
pins = "gpio10";
function = "mdp_vsync";
@@ -624,6 +716,14 @@
bias-pull-down;
};
+ main_cam_pwr_en: main-cam-pwr-en-state {
+ pins = "gpio27";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+
ts_default: ts-default-state {
reset-pins {
pins = "gpio99";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-wcd9340.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845-wcd9340.dtsi
index c15d48860646..6172cd1539e6 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-wcd9340.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-wcd9340.dtsi
@@ -54,7 +54,7 @@
reg = <0x42 0x2>;
};
- swm: swm@c85 {
+ swm: soundwire@c85 {
compatible = "qcom,soundwire-v1.3.0";
reg = <0xc85 0x40>;
interrupts-extended = <&wcd9340 20>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-beryllium-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-beryllium-common.dtsi
index 9d6faeb65624..617b17b2d7d9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-beryllium-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-beryllium-common.dtsi
@@ -111,7 +111,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
};
@@ -355,6 +355,28 @@
status = "okay";
};
+&pmi8998_flash {
+ status = "okay";
+
+ led-0 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ led-sources = <1>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <1500000>;
+ flash-max-timeout-us = <1280000>;
+ };
+
+ led-1 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_YELLOW>;
+ led-sources = <2>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <1500000>;
+ flash-max-timeout-us = <1280000>;
+ };
+};
+
&pm8998_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-polaris.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-polaris.dts
index 6db12abaa88d..e386b504e978 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-polaris.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845-xiaomi-polaris.dts
@@ -108,7 +108,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi
index 02a6ea0b8b2c..c2244824355a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi
@@ -18,6 +18,7 @@
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sdm845.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
#include <dt-bindings/phy/phy-qcom-qusb2.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/reset/qcom,sdm845-aoss.h>
@@ -813,7 +814,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
qseecom_mem: qseecom@8ab00000 {
@@ -1197,8 +1198,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>,
- <&pcie0_lane>,
- <&pcie1_lane>;
+ <&pcie0_phy>,
+ <&pcie1_phy>;
clock-names = "bi_tcxo",
"bi_tcxo_ao",
"sleep_clk",
@@ -1207,6 +1208,7 @@
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
+ power-domains = <&rpmhpd SDM845_CX>;
};
qfprom@784000 {
@@ -2304,7 +2306,7 @@
};
};
- pcie0: pci@1c00000 {
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-sdm845";
reg = <0 0x01c00000 0 0x2000>,
<0 0x60000000 0 0xf1d>,
@@ -2369,7 +2371,7 @@
power-domains = <&gcc PCIE_0_GDSC>;
- phys = <&pcie0_lane>;
+ phys = <&pcie0_phy>;
phy-names = "pciephy";
status = "disabled";
@@ -2377,15 +2379,22 @@
pcie0_phy: phy@1c06000 {
compatible = "qcom,sdm845-qmp-pcie-phy";
- reg = <0 0x01c06000 0 0x18c>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c06000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
<&gcc GCC_PCIE_0_CLKREF_CLK>,
- <&gcc GCC_PCIE_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_0_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_0_PHY_BCR>;
reset-names = "phy";
@@ -2394,22 +2403,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie0_lane: phy@1c06200 {
- reg = <0 0x01c06200 0 0x128>,
- <0 0x01c06400 0 0x1fc>,
- <0 0x01c06800 0 0x218>,
- <0 0x01c06600 0 0x70>;
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- #phy-cells = <0>;
- clock-output-names = "pcie_0_pipe_clk";
- };
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
compatible = "qcom,pcie-sdm845";
reg = <0 0x01c08000 0 0x2000>,
<0 0x40000000 0 0xf1d>,
@@ -2479,7 +2475,7 @@
power-domains = <&gcc PCIE_1_GDSC>;
- phys = <&pcie1_lane>;
+ phys = <&pcie1_phy>;
phy-names = "pciephy";
status = "disabled";
@@ -2487,15 +2483,22 @@
pcie1_phy: phy@1c0a000 {
compatible = "qcom,sdm845-qhp-pcie-phy";
- reg = <0 0x01c0a000 0 0x800>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c0a000 0 0x2000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
<&gcc GCC_PCIE_1_CLKREF_CLK>,
- <&gcc GCC_PCIE_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_1_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
reset-names = "phy";
@@ -2504,18 +2507,6 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie1_lane: phy@1c06200 {
- reg = <0 0x01c0a800 0 0x800>,
- <0 0x01c0a800 0 0x800>,
- <0 0x01c0b800 0 0x400>;
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- #phy-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
- };
};
mem_noc: interconnect@1380000 {
@@ -2574,7 +2565,7 @@
<0 0x01d90000 0 0x8000>;
reg-names = "std", "ice";
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
power-domains = <&gcc UFS_PHY_GDSC>;
@@ -2604,26 +2595,50 @@
<&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
<&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>,
<&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
- freq-table-hz =
- <50000000 200000000>,
- <0 0>,
- <0 0>,
- <37500000 150000000>,
- <0 0>,
- <0 0>,
- <0 0>,
- <0 0>,
- <0 300000000>;
+
+ operating-points-v2 = <&ufs_opp_table>;
+
+ interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mem_noc SLAVE_EBI1 0>,
+ <&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>;
+ interconnect-names = "ufs-ddr", "cpu-ufs";
status = "disabled";
+
+ ufs_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-50000000 {
+ opp-hz = /bits/ 64 <50000000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <37500000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <75000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <150000000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
};
ufs_mem_phy: phy@1d87000 {
compatible = "qcom,sdm845-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x18c>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
+
clock-names = "ref",
"ref_aux";
clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
@@ -2631,16 +2646,9 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x108>,
- <0 0x01d87600 0 0x1e0>,
- <0 0x01d87c00 0 0x1dc>,
- <0 0x01d87800 0 0x108>,
- <0 0x01d87a00 0 0x1e0>;
- #phy-cells = <0>;
- };
+ #phy-cells = <0>;
+ status = "disabled";
};
cryptobam: dma-controller@1dc4000 {
@@ -3550,11 +3558,8 @@
};
in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@1 {
- reg = <1>;
+ port {
etf_in: endpoint {
remote-endpoint =
<&merge_funnel_out>;
@@ -3979,80 +3984,54 @@
nvmem-cells = <&qusb2s_hstx_trim>;
};
- usb_1_qmpphy: phy@88e9000 {
+ usb_1_qmpphy: phy@88e8000 {
compatible = "qcom,sdm845-qmp-usb3-dp-phy";
- reg = <0 0x088e9000 0 0x18c>,
- <0 0x088e8000 0 0x38>,
- <0 0x088ea000 0 0x40>;
+ reg = <0 0x088e8000 0 0x3000>;
status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
- <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
<&gcc GCC_USB3_PRIM_CLKREF_CLK>,
- <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "com_aux";
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "usb3_pipe",
+ "cfg_ahb";
resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
<&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
reset-names = "phy", "common";
- usb_1_ssphy: usb3-phy@88e9200 {
- reg = <0 0x088e9200 0 0x128>,
- <0 0x088e9400 0 0x200>,
- <0 0x088e9c00 0 0x218>,
- <0 0x088e9600 0 0x128>,
- <0 0x088e9800 0 0x200>,
- <0 0x088e9a00 0 0x100>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_phy_pipe_clk_src";
- };
-
- dp_phy: dp-phy@88ea200 {
- reg = <0 0x088ea200 0 0x200>,
- <0 0x088ea400 0 0x200>,
- <0 0x088eaa00 0 0x200>,
- <0 0x088ea600 0 0x200>,
- <0 0x088ea800 0 0x200>;
- #clock-cells = <1>;
- #phy-cells = <0>;
- };
+ #clock-cells = <1>;
+ #phy-cells = <1>;
};
usb_2_qmpphy: phy@88eb000 {
compatible = "qcom,sdm845-qmp-usb3-uni-phy";
- reg = <0 0x088eb000 0 0x18c>;
- status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x088eb000 0 0x1000>;
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
<&gcc GCC_USB3_SEC_CLKREF_CLK>,
- <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "com_aux";
+ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "com_aux",
+ "pipe";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
- resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
- <&gcc GCC_USB3_PHY_SEC_BCR>;
- reset-names = "phy", "common";
+ resets = <&gcc GCC_USB3_PHY_SEC_BCR>,
+ <&gcc GCC_USB3PHY_PHY_SEC_BCR>;
+ reset-names = "phy",
+ "phy_phy";
- usb_2_ssphy: phy@88eb200 {
- reg = <0 0x088eb200 0 0x128>,
- <0 0x088eb400 0 0x1fc>,
- <0 0x088eb800 0 0x218>,
- <0 0x088eb600 0 0x70>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_uni_phy_pipe_clk_src";
- };
+ status = "disabled";
};
usb_1: usb@a6f8800 {
@@ -4079,10 +4058,10 @@
<&gcc GCC_USB30_PRIM_MASTER_CLK>;
assigned-clock-rates = <19200000>, <150000000>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 488 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 489 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -4101,7 +4080,7 @@
iommus = <&apps_smmu 0x740 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
+ phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -4130,10 +4109,10 @@
<&gcc GCC_USB30_SEC_MASTER_CLK>;
assigned-clock-rates = <19200000>, <150000000>;
- interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 490 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 491 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -4152,7 +4131,7 @@
iommus = <&apps_smmu 0x760 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
+ phys = <&usb_2_hsphy>, <&usb_2_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -4569,8 +4548,9 @@
"ctrl_link_iface", "stream_pixel";
assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
<&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
- assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
- phys = <&dp_phy>;
+ assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+ phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>;
phy-names = "dp";
operating-points-v2 = <&dp_opp_table>;
@@ -4908,8 +4888,8 @@
<&mdss_dsi0_phy 1>,
<&mdss_dsi1_phy 0>,
<&mdss_dsi1_phy 1>,
- <&dp_phy 0>,
- <&dp_phy 1>;
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
clock-names = "bi_tcxo",
"gcc_disp_gpll0_clk_src",
"gcc_disp_gpll0_div_clk_src",
@@ -5113,7 +5093,7 @@
compatible = "qcom,apss-wdt-sdm845", "qcom,kpss-wdt";
reg = <0 0x17980000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
apss_shared: mailbox@17990000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm850-lenovo-yoga-c630.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm850-lenovo-yoga-c630.dts
index cfbc4fc1eba9..47dc42f6e936 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm850-lenovo-yoga-c630.dts
@@ -33,7 +33,8 @@
chassis-type = "convertible";
aliases {
- hsuart0 = &uart6;
+ serial0 = &uart9;
+ serial1 = &uart6;
};
gpio-keys {
@@ -80,6 +81,22 @@
};
};
+ sw_edp_1p2: edp-1p2-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "sw_edp_1p2";
+
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ pinctrl-0 = <&sw_edp_1p2_en>;
+ pinctrl-names = "default";
+
+ gpio = <&pm8998_gpios 9 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ vin-supply = <&vreg_l2a_1p2>;
+ };
+
sn65dsi86_refclk: sn65dsi86-refclk {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -87,6 +104,25 @@
clock-frequency = <19200000>;
};
+ vph_pwr: regulator-vph-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
+
+ vlcm_3v3: regulator-vlcm-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "vlcm_3v3";
+
+ vin-supply = <&vph_pwr>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&sn65dsi86 1000000>;
@@ -356,6 +392,8 @@
hid-descr-addr = <0x20>;
interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>;
+
+ wakeup-source;
};
};
@@ -372,6 +410,8 @@
pinctrl-names = "default";
pinctrl-0 = <&i2c5_hid_active>;
+
+ wakeup-source;
};
};
@@ -387,6 +427,8 @@
enable-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+ vcca-supply = <&sw_edp_1p2>;
+ vcc-supply = <&sw_edp_1p2>;
vpll-supply = <&vreg_l14a_1p88>;
vccio-supply = <&vreg_l14a_1p88>;
@@ -419,6 +461,7 @@
panel: panel {
compatible = "boe,nv133fhm-n61";
backlight = <&backlight>;
+ power-supply = <&vlcm_3v3>;
port {
panel_in_edp: endpoint {
@@ -443,6 +486,8 @@
pinctrl-names = "default";
pinctrl-0 = <&i2c11_hid_active>;
+
+ wakeup-source;
};
};
@@ -480,6 +525,16 @@
firmware-name = "qcom/sdm850/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/sdm850/LENOVO/81JL/qcdsp2850.mbn";
};
+&pm8998_gpios {
+ /* This pin is pulled down by a fixed resistor */
+ sw_edp_1p2_en: pm8998-gpio9-state {
+ pins = "gpio9";
+ function = "normal";
+ bias-disable;
+ qcom,drive-strength = <0>;
+ };
+};
+
&qup_i2c10_default {
drive-strength = <2>;
bias-disable;
@@ -658,6 +713,10 @@
};
};
+&uart9 {
+ status = "okay";
+};
+
&ufs_mem_hc {
status = "okay";
@@ -744,7 +803,7 @@
qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
- swm: swm@c85 {
+ swm: soundwire@c85 {
left_spkr: speaker@0,3 {
compatible = "sdw10217211000";
reg = <0 3>;
@@ -779,5 +838,5 @@
&crypto {
/* FIXME: qce_start triggers an SError */
- status = "disable";
+ status = "disabled";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdm850-samsung-w737.dts b/sys/contrib/device-tree/src/arm64/qcom/sdm850-samsung-w737.dts
index 41f59e32af64..26217836c270 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdm850-samsung-w737.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdm850-samsung-w737.dts
@@ -56,7 +56,7 @@
};
aliases {
- hsuart0 = &uart6;
+ serial1 = &uart6;
};
/* Reserved memory changes */
@@ -658,7 +658,7 @@
qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
- swm: swm@c85 {
+ swm: soundwire@c85 {
left_spkr: speaker@0,3 {
compatible = "sdw10217211000";
reg = <0 3>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdx75-idp.dts b/sys/contrib/device-tree/src/arm64/qcom/sdx75-idp.dts
index cbe5cdf5a228..f76e72fb2072 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdx75-idp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdx75-idp.dts
@@ -5,7 +5,11 @@
/dts-v1/;
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sdx75.dtsi"
+#include "pm7550ba.dtsi"
+#include "pmk8550.dtsi"
+#include "pmx75.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SDX75 IDP";
@@ -14,12 +18,243 @@
aliases {
serial0 = &uart1;
};
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
+
+ vph_ext: vph-ext-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_ext";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
+
+ vreg_bob_3p3: pmx75-bob {
+ compatible = "regulator-fixed";
+ regulator-name = "vreg_bob_3p3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ vin-supply = <&vph_ext>;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pmx75-rpmh-regulators";
+ qcom,pmic-id = "b";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-s9-supply = <&vph_pwr>;
+ vdd-s10-supply = <&vph_pwr>;
+ vdd-l1-supply = <&vreg_s2b_1p224>;
+ vdd-l2-l18-supply = <&vreg_s2b_1p224>;
+ vdd-l3-supply = <&vreg_s7b_0p936>;
+ vdd-l4-l16-supply = <&vreg_s7b_0p936>;
+ vdd-l5-l6-supply = <&vreg_s4b_1p824>;
+ vdd-l7-supply = <&vreg_s7b_0p936>;
+ vdd-l8-l9-supply = <&vreg_s8b_0p824>;
+ vdd-l10-supply = <&vreg_bob_3p3>;
+ vdd-l11-l13-supply = <&vreg_bob_3p3>;
+ vdd-l12-supply = <&vreg_s2b_1p224>;
+ vdd-l14-supply = <&vreg_s3b_0p752>;
+ vdd-l15-supply = <&vreg_s2b_1p224>;
+ vdd-l17-supply = <&vreg_s8b_0p824>;
+ vdd-l19-supply = <&vreg_s7b_0p936>;
+ vdd-l20-l21-supply = <&vreg_s7b_0p936>;
+
+ vreg_s2b_1p224: smps2 {
+ regulator-name = "vreg_s2b_1p224";
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ vreg_s3b_0p752: smps3 {
+ regulator-name = "vreg_s3b_0p752";
+ regulator-min-microvolt = <684000>;
+ regulator-max-microvolt = <904000>;
+ };
+
+ vreg_s4b_1p824: smps4 {
+ regulator-name = "vreg_s4b_1p824";
+ regulator-min-microvolt = <1824000>;
+ regulator-max-microvolt = <1904000>;
+ };
+
+ vreg_s7b_0p936: smps7 {
+ regulator-name = "vreg_s7b_0p936";
+ regulator-min-microvolt = <352000>;
+ regulator-max-microvolt = <1060000>;
+ };
+
+ vreg_s8b_0p824: smps8 {
+ regulator-name = "vreg_s8b_0p824";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1100000>;
+ };
+
+ vreg_l1b_1p2: ldo1 {
+ regulator-name = "vreg_l1b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_1p128: ldo2 {
+ regulator-name = "vreg_l2b_1p128";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3b_0p896: ldo3 {
+ regulator-name = "vreg_l3b_0p896";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1040000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4b_0p88: ldo4 {
+ regulator-name = "vreg_l4b_0p88";
+ regulator-min-microvolt = <864000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5b_1p776: ldo5 {
+ regulator-name = "vreg_l5b_1p776";
+ regulator-min-microvolt = <1770000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p8: ldo6 {
+ regulator-name = "vreg_l6b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_0p904: ldo7 {
+ regulator-name = "vreg_l7b_0p904";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_0p8: ldo8 {
+ regulator-name = "vreg_l8b_0p8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_0p752: ldo9 {
+ regulator-name = "vreg_l9b_0p752";
+ regulator-min-microvolt = <752000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10b_3p08: ldo10 {
+ regulator-name = "vreg_l10b_3p08";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3088000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11b_1p8: ldo11 {
+ regulator-name = "vreg_l11b_1p8";
+ regulator-min-microvolt = <1704000>;
+ regulator-max-microvolt = <2928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_1p2: ldo12 {
+ regulator-name = "vreg_l12b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_1p8: ldo13 {
+ regulator-name = "vreg_l13b_1p8";
+ regulator-min-microvolt = <1704000>;
+ regulator-max-microvolt = <2928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_0p624: ldo14 {
+ regulator-name = "vreg_l14b_0p624";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_1p2: ldo15 {
+ regulator-name = "vreg_l15b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_0p912: ldo16 {
+ regulator-name = "vreg_l16b_0p912";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_0p752: ldo17 {
+ regulator-name = "vreg_l17b_0p752";
+ regulator-min-microvolt = <684000>;
+ regulator-max-microvolt = <957600>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l19b_0p952: ldo19 {
+ regulator-name = "vreg_l19b_0p952";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l20b_0p912: ldo20 {
+ regulator-name = "vreg_l20b_0p912";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <952000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l21b_0p856: ldo21 {
+ regulator-name = "vreg_l21b_0p856";
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
};
&chosen {
stdout-path = "serial0:115200n8";
};
+&pm7550ba_eusb2_repeater {
+ vdd18-supply = <&vreg_l5b_1p776>;
+ vdd3-supply = <&vreg_l10b_3p08>;
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -31,3 +266,27 @@
&uart1 {
status = "okay";
};
+
+&usb {
+ status = "okay";
+};
+
+&usb_dwc3 {
+ dr_mode = "peripheral";
+};
+
+&usb_hsphy {
+ vdd-supply = <&vreg_l4b_0p88>;
+ vdda12-supply = <&vreg_l1b_1p2>;
+
+ phys = <&pm7550ba_eusb2_repeater>;
+
+ status = "okay";
+};
+
+&usb_qmpphy {
+ vdda-phy-supply = <&vreg_l4b_0p88>;
+ vdda-pll-supply = <&vreg_l1b_1p2>;
+
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sdx75.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sdx75.dtsi
index 21d5d55da5eb..7dbdf8ca6de6 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sdx75.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sdx75.dtsi
@@ -8,7 +8,11 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,sdx75-gcc.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
+#include <dt-bindings/interconnect/qcom,sdx75.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
+#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
/ {
@@ -201,6 +205,19 @@
};
};
+ clk_virt: interconnect-0 {
+ compatible = "qcom,sdx75-clk-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ clocks = <&rpmhcc RPMH_QPIC_CLK>;
+ };
+
+ mc_virt: interconnect-1 {
+ compatible = "qcom,sdx75-mc-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x0>;
@@ -432,6 +449,9 @@
clock-names = "m-ahb",
"s-ahb";
iommus = <&apps_smmu 0xe3 0x0>;
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core";
#address-cells = <2>;
#size-cells = <2>;
ranges;
@@ -442,6 +462,12 @@
reg = <0x0 0x00984000 0x0 0x4000>;
clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>;
clock-names = "se";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &system_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
interrupts = <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-0 = <&qupv3_se1_2uart_active>;
pinctrl-1 = <&qupv3_se1_2uart_sleep>;
@@ -451,12 +477,144 @@
};
};
+ usb_hsphy: phy@ff4000 {
+ compatible = "qcom,sdx75-snps-eusb2-phy", "qcom,sm8550-snps-eusb2-phy";
+ reg = <0x0 0x00ff4000 0x0 0x154>;
+ #phy-cells = <0>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "ref";
+
+ resets = <&gcc GCC_QUSB2PHY_BCR>;
+
+ status = "disabled";
+ };
+
+ usb_qmpphy: phy@ff6000 {
+ compatible = "qcom,sdx75-qmp-usb3-uni-phy";
+ reg = <0x0 0x00ff6000 0x0 0x2000>;
+
+ clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
+ <&gcc GCC_USB2_CLKREF_EN>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
+ <&gcc GCC_USB3_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "cfg_ahb",
+ "pipe";
+
+ power-domains = <&gcc GCC_USB3_PHY_GDSC>;
+
+ resets = <&gcc GCC_USB3_PHY_BCR>,
+ <&gcc GCC_USB3PHY_PHY_BCR>;
+ reset-names = "phy",
+ "phy_phy";
+
+ #clock-cells = <0>;
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ system_noc: interconnect@1640000 {
+ compatible = "qcom,sdx75-system-noc";
+ reg = <0x0 0x01640000 0x0 0x4b400>;
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ pcie_anoc: interconnect@16c0000 {
+ compatible = "qcom,sdx75-pcie-anoc";
+ reg = <0x0 0x016c0000 0x0 0x14200>;
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
tcsr_mutex: hwlock@1f40000 {
compatible = "qcom,tcsr-mutex";
reg = <0x0 0x01f40000 0x0 0x40000>;
#hwlock-cells = <1>;
};
+ usb: usb@a6f8800 {
+ compatible = "qcom,sdx75-dwc3", "qcom,dwc3";
+ reg = <0x0 0x0a6f8800 0x0 0x400>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ clocks = <&gcc GCC_USB30_SLV_AHB_CLK>,
+ <&gcc GCC_USB30_MASTER_CLK>,
+ <&gcc GCC_USB30_MSTR_AXI_CLK>,
+ <&gcc GCC_USB30_SLEEP_CLK>,
+ <&gcc GCC_USB30_MOCK_UTMI_CLK>;
+ clock-names = "cfg_noc",
+ "core",
+ "iface",
+ "sleep",
+ "mock_utmi";
+
+ assigned-clocks = <&gcc GCC_USB30_MOCK_UTMI_CLK>,
+ <&gcc GCC_USB30_MASTER_CLK>;
+ assigned-clock-rates = <19200000>, <200000000>;
+
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 17 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 9 IRQ_TYPE_EDGE_RISING>,
+ <&pdc 10 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "hs_phy_irq",
+ "ss_phy_irq",
+ "dm_hs_phy_irq",
+ "dp_hs_phy_irq";
+
+ power-domains = <&gcc GCC_USB30_GDSC>;
+
+ resets = <&gcc GCC_USB30_BCR>;
+
+ interconnects = <&system_noc MASTER_USB3_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &system_noc SLAVE_USB3 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "usb-ddr",
+ "apps-usb";
+
+ status = "disabled";
+
+ usb_dwc3: usb@a600000 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0x0a600000 0x0 0xcd00>;
+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+ iommus = <&apps_smmu 0x80 0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_enblslpm_quirk;
+ phys = <&usb_hsphy>,
+ <&usb_qmpphy>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_1_dwc3_hs: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_1_dwc3_ss: endpoint {
+ };
+ };
+ };
+ };
+ };
+
pdc: interrupt-controller@b220000 {
compatible = "qcom,sdx75-pdc", "qcom,pdc";
reg = <0x0 0xb220000 0x0 0x30000>,
@@ -469,6 +627,29 @@
interrupt-controller;
};
+ spmi_bus: spmi@c400000 {
+ compatible = "qcom,spmi-pmic-arb";
+ reg = <0x0 0x0c400000 0x0 0x3000>,
+ <0x0 0x0c500000 0x0 0x400000>,
+ <0x0 0x0c440000 0x0 0x80000>,
+ <0x0 0x0c4c0000 0x0 0x10000>,
+ <0x0 0x0c42d000 0x0 0x4000>;
+ reg-names = "core",
+ "chnls",
+ "obsrvr",
+ "intr",
+ "cnfg";
+ interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "periph_irq";
+ qcom,ee = <0>;
+ qcom,channel = <0>;
+ qcom,bus-id = <0>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ interrupt-controller;
+ #interrupt-cells = <4>;
+ };
+
tlmm: pinctrl@f000000 {
compatible = "qcom,sdx75-tlmm";
reg = <0x0 0x0f000000 0x0 0x400000>;
@@ -484,14 +665,14 @@
tx-pins {
pins = "gpio12";
function = "qup_se1_l2_mira";
- drive-strength= <2>;
+ drive-strength = <2>;
bias-disable;
};
rx-pins {
pins = "gpio13";
function = "qup_se1_l3_mira";
- drive-strength= <2>;
+ drive-strength = <2>;
bias-disable;
};
};
@@ -643,6 +824,56 @@
clock-names = "xo";
#clock-cells = <1>;
};
+
+ rpmhpd: power-controller {
+ compatible = "qcom,sdx75-rpmhpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmhpd_opp_table>;
+
+ rpmhpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmhpd_opp_ret: opp-16 {
+ opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
+ };
+
+ rpmhpd_opp_min_svs: opp-48 {
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+
+ rpmhpd_opp_low_svs: opp-64 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ rpmhpd_opp_svs: opp-128 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ rpmhpd_opp_svs_l1: opp-192 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ rpmhpd_opp_nom: opp-256 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ };
+
+ rpmhpd_opp_nom_l1: opp-320 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ };
+
+ rpmhpd_opp_nom_l2: opp-336 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
+ };
+
+ rpmhpd_opp_turbo: opp-384 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ };
+
+ rpmhpd_opp_turbo_l1: opp-416 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ };
+ };
+ };
};
cpufreq_hw: cpufreq@17d91000 {
@@ -658,6 +889,20 @@
#freq-domain-cells = <1>;
#clock-cells = <1>;
};
+
+ dc_noc: interconnect@190e0000 {
+ compatible = "qcom,sdx75-dc-noc";
+ reg = <0x0 0x190e0000 0x0 0x8200>;
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ gem_noc: interconnect@19100000 {
+ compatible = "qcom,sdx75-gem-noc";
+ reg = <0x0 0x19100000 0x0 0x34080>;
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
};
timer {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm4250-oneplus-billie2.dts b/sys/contrib/device-tree/src/arm64/qcom/sm4250-oneplus-billie2.dts
index 75951fd439df..2c7a12983dae 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm4250-oneplus-billie2.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm4250-oneplus-billie2.dts
@@ -225,13 +225,13 @@
vcc-max-microamp = <600000>;
vccq2-supply = <&vreg_l11a>;
vccq2-max-microamp = <600000>;
+ vdd-hba-supply = <&vreg_l18a>;
status = "okay";
};
&ufs_mem_phy {
vdda-phy-supply = <&vreg_l4a>;
vdda-pll-supply = <&vreg_l12a>;
- vddp-ref-clk-supply = <&vreg_l18a>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm4450-qrd.dts b/sys/contrib/device-tree/src/arm64/qcom/sm4450-qrd.dts
new file mode 100644
index 000000000000..866e93783590
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm4450-qrd.dts
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "sm4450.dtsi"
+/ {
+ model = "Qualcomm Technologies, Inc. SM4450 QRD";
+ compatible = "qcom,sm4450-qrd", "qcom,sm4450";
+
+ aliases {
+ serial0 = &uart7;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>; /* NFC eSE SPI */
+};
+
+&uart7 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm4450.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm4450.dtsi
new file mode 100644
index 000000000000..3e7ae3bebbe0
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm4450.dtsi
@@ -0,0 +1,538 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sm4450-gcc.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>
+
+/ {
+ interrupt-parent = <&intc>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ chosen { };
+
+ clocks{
+ xo_board: xo-board {
+ compatible = "fixed-clock";
+ clock-frequency = <76800000>;
+ #clock-cells = <0>;
+ };
+
+ sleep_clk: sleep-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <32000>;
+ #clock-cells = <0>;
+ };
+ };
+
+ cpus {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ CPU0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_0: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+
+ L3_0: l3-cache {
+ compatible = "cache";
+ cache-level = <3>;
+ cache-unified;
+ };
+ };
+ };
+
+ CPU1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ next-level-cache = <&L2_100>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_100: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x200>;
+ enable-method = "psci";
+ next-level-cache = <&L2_200>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_200: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x300>;
+ enable-method = "psci";
+ next-level-cache = <&L2_300>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_300: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU4: cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x400>;
+ enable-method = "psci";
+ next-level-cache = <&L2_400>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_400: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU5: cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x500>;
+ enable-method = "psci";
+ next-level-cache = <&L2_500>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_500: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU6: cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x0 0x600>;
+ enable-method = "psci";
+ next-level-cache = <&L2_600>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_600: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU7: cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a78";
+ reg = <0x0 0x700>;
+ enable-method = "psci";
+ next-level-cache = <&L2_700>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ #cooling-cells = <2>;
+
+ L2_700: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&CPU0>;
+ };
+
+ core1 {
+ cpu = <&CPU1>;
+ };
+
+ core2 {
+ cpu = <&CPU2>;
+ };
+
+ core3 {
+ cpu = <&CPU3>;
+ };
+
+ core4 {
+ cpu = <&CPU4>;
+ };
+
+ core5 {
+ cpu = <&CPU5>;
+ };
+
+ core6 {
+ cpu = <&CPU6>;
+ };
+
+ core7 {
+ cpu = <&CPU7>;
+ };
+ };
+ };
+
+ idle-states {
+ entry-method = "psci";
+
+ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x40000004>;
+ entry-latency-us = <800>;
+ exit-latency-us = <750>;
+ min-residency-us = <4090>;
+ local-timer-stop;
+ };
+
+ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
+ compatible = "arm,idle-state";
+ arm,psci-suspend-param = <0x40000004>;
+ entry-latency-us = <600>;
+ exit-latency-us = <1550>;
+ min-residency-us = <4791>;
+ local-timer-stop;
+ };
+ };
+
+ domain-idle-states {
+ CLUSTER_SLEEP_0: cluster-sleep-0 {
+ compatible = "domain-idle-state";
+ arm,psci-suspend-param = <0x41000044>;
+ entry-latency-us = <1050>;
+ exit-latency-us = <2500>;
+ min-residency-us = <5309>;
+ };
+
+ CLUSTER_SLEEP_1: cluster-sleep-1 {
+ compatible = "domain-idle-state";
+ arm,psci-suspend-param = <0x41003344>;
+ entry-latency-us = <1561>;
+ exit-latency-us = <2801>;
+ min-residency-us = <8550>;
+ };
+ };
+ };
+
+ memory@a0000000 {
+ device_type = "memory";
+ /* We expect the bootloader to fill in the size */
+ reg = <0x0 0xa0000000 0x0 0x0>;
+ };
+
+ pmu {
+ compatible = "arm,armv8-pmuv3";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+
+ CPU_PD0: power-domain-cpu0 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ };
+
+ CPU_PD1: power-domain-cpu1 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ };
+
+ CPU_PD2: power-domain-cpu2 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ };
+
+ CPU_PD3: power-domain-cpu3 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ };
+
+ CPU_PD4: power-domain-cpu4 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ };
+
+ CPU_PD5: power-domain-cpu5 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ };
+
+ CPU_PD6: power-domain-cpu6 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ };
+
+ CPU_PD7: power-domain-cpu7 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ };
+
+ CLUSTER_PD: power-domain-cpu-cluster0 {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_SLEEP_0>, <&CLUSTER_SLEEP_1>;
+ };
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ aop_cmd_db_mem: cmd-db@80860000 {
+ compatible = "qcom,cmd-db";
+ reg = <0x0 0x80860000 0x0 0x20000>;
+ no-map;
+ };
+ };
+
+ soc: soc@0 {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0 0 0 0 0x10 0>;
+ dma-ranges = <0 0 0 0 0x10 0>;
+ compatible = "simple-bus";
+
+ gcc: clock-controller@100000 {
+ compatible = "qcom,sm4450-gcc";
+ reg = <0x0 0x00100000 0x0 0x1f4200>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&sleep_clk>,
+ <0>,
+ <0>,
+ <0>,
+ <0>;
+ };
+
+ qupv3_id_0: geniqup@ac0000 {
+ compatible = "qcom,geni-se-qup";
+ reg = <0x0 0x00ac0000 0x0 0x2000>;
+ ranges;
+ clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
+ clock-names = "m-ahb", "s-ahb";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ status = "disabled";
+
+ uart7: serial@a88000 {
+ compatible = "qcom,geni-debug-uart";
+ reg = <0x0 0x00a88000 0x0 0x4000>;
+ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+ clock-names = "se";
+ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+ pinctrl-0 = <&qup_uart7_tx>, <&qup_uart7_rx>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+ };
+
+ tcsr_mutex: hwlock@1f40000 {
+ compatible = "qcom,tcsr-mutex";
+ reg = <0x0 0x01f40000 0x0 0x40000>;
+ #hwlock-cells = <1>;
+ };
+
+ pdc: interrupt-controller@b220000 {
+ compatible = "qcom,sm4450-pdc", "qcom,pdc";
+ reg = <0 0x0b220000 0 0x30000>, <0 0x174000f0 0 0x64>;
+ qcom,pdc-ranges = <0 480 94>, <94 494 31>,
+ <125 63 1>;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&intc>;
+ interrupt-controller;
+ };
+
+ tlmm: pinctrl@f100000 {
+ compatible = "qcom,sm4450-tlmm";
+ reg = <0x0 0x0f100000 0x0 0x300000>;
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-ranges = <&tlmm 0 0 137>;
+ wakeup-parent = <&pdc>;
+
+ qup_uart7_rx: qup-uart7-rx-state {
+ pins = "gpio23";
+ function = "qup1_se2_l2";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ qup_uart7_tx: qup-uart7-tx-state {
+ pins = "gpio22";
+ function = "qup1_se2_l2";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
+ intc: interrupt-controller@17200000 {
+ compatible = "arm,gic-v3";
+ reg = <0x0 0x17200000 0x0 0x10000>, /* GICD */
+ <0x0 0x17260000 0x0 0x100000>; /* GICR * 8 */
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+ #interrupt-cells = <3>;
+ interrupt-controller;
+ #redistributor-regions = <1>;
+ redistributor-stride = <0x0 0x20000>;
+ };
+
+ timer@17420000 {
+ compatible = "arm,armv7-timer-mem";
+ reg = <0x0 0x17420000 0x0 0x1000>;
+ ranges = <0 0 0 0x20000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ frame@17421000 {
+ reg = <0x17421000 0x1000>,
+ <0x17422000 0x1000>;
+ frame-number = <0>;
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ frame@17423000 {
+ reg = <0x17423000 0x1000>;
+ frame-number = <1>;
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ frame@17425000 {
+ reg = <0x17425000 0x1000>;
+ frame-number = <2>;
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ frame@17427000 {
+ reg = <0x17427000 0x1000>;
+ frame-number = <3>;
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ frame@17429000 {
+ reg = <0x17429000 0x1000>;
+ frame-number = <4>;
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ frame@1742b000 {
+ reg = <0x1742b000 0x1000>;
+ frame-number = <5>;
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ frame@1742d000 {
+ reg = <0x1742d000 0x1000>;
+ frame-number = <6>;
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+ };
+
+ apps_rsc: rsc@17a00000 {
+ compatible = "qcom,rpmh-rsc";
+ reg = <0x0 0x17a00000 0x0 0x10000>,
+ <0x0 0x17a10000 0x0 0x10000>,
+ <0x0 0x17a20000 0x0 0x10000>;
+ reg-names = "drv-0", "drv-1", "drv-2";
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+ label = "apps_rsc";
+ qcom,tcs-offset = <0xd00>;
+ qcom,drv-id = <2>;
+ qcom,tcs-config = <ACTIVE_TCS 2>, <SLEEP_TCS 3>,
+ <WAKE_TCS 3>, <CONTROL_TCS 0>;
+ power-domains = <&CLUSTER_PD>;
+
+ apps_bcm_voter: bcm-voter {
+ compatible = "qcom,bcm-voter";
+ };
+
+ rpmhcc: clock-controller {
+ compatible = "qcom,sm4450-rpmh-clk";
+ #clock-cells = <1>;
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ };
+ };
+
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6115-fxtec-pro1x.dts b/sys/contrib/device-tree/src/arm64/qcom/sm6115-fxtec-pro1x.dts
index 3ce9875e932c..98eb072fa912 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6115-fxtec-pro1x.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6115-fxtec-pro1x.dts
@@ -44,7 +44,7 @@
gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
debounce-interval = <15>;
linux,can-disable;
- gpio-key,wakeup;
+ wakeup-source;
};
};
};
@@ -219,13 +219,13 @@
vcc-max-microamp = <600000>;
vccq2-supply = <&pm6125_l11a>;
vccq2-max-microamp = <600000>;
+ vdd-hba-supply = <&pm6125_l18a>;
status = "okay";
};
&ufs_mem_phy {
vdda-phy-supply = <&pm6125_l4a>;
vdda-pll-supply = <&pm6125_l12a>;
- vddp-ref-clk-supply = <&pm6125_l18a>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6115.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm6115.dtsi
index 55118577bf92..f9849b8befbf 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6115.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6115.dtsi
@@ -10,6 +10,8 @@
#include <dt-bindings/dma/qcom-gpi.h>
#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interconnect/qcom,rpm-icc.h>
+#include <dt-bindings/interconnect/qcom,sm6115.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/qcom-rpmpd.h>
@@ -264,6 +266,8 @@
scm: scm {
compatible = "qcom,scm-sm6115", "qcom,scm";
#reset-cells = <1>;
+ interconnects = <&system_noc MASTER_CRYPTO_CORE0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
};
};
@@ -273,6 +277,25 @@
reg = <0 0x80000000 0 0>;
};
+ qup_opp_table: opp-table-qup {
+ compatible = "operating-points-v2";
+
+ opp-75000000 {
+ opp-hz = /bits/ 64 <75000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-100000000 {
+ opp-hz = /bits/ 64 <100000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp-128000000 {
+ opp-hz = /bits/ 64 <128000000>;
+ required-opps = <&rpmpd_opp_nom>;
+ };
+ };
+
pmu {
compatible = "arm,armv8-pmuv3";
interrupts = <GIC_PPI 6 IRQ_TYPE_LEVEL_HIGH>;
@@ -341,6 +364,72 @@
};
};
+ rpm: remoteproc {
+ compatible = "qcom,sm6115-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+
+ interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-sm6115";
+ qcom,glink-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-sm6115", "qcom,rpmcc";
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ #clock-cells = <1>;
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,sm6115-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_min_svs: opp1 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
+
+ rpmpd_opp_low_svs: opp2 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
+
+ rpmpd_opp_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
+
+ rpmpd_opp_svs_plus: opp4 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
+
+ rpmpd_opp_nom: opp5 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
+
+ rpmpd_opp_nom_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp7 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
+
+ rpmpd_opp_turbo_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved_memory: reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -440,68 +529,6 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
-
- interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-sm6115";
- qcom,glink-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-sm6115", "qcom,rpmcc";
- clocks = <&xo_board>;
- clock-names = "xo";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,sm6115-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_min_svs: opp1 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
-
- rpmpd_opp_low_svs: opp2 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
-
- rpmpd_opp_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
-
- rpmpd_opp_svs_plus: opp4 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
-
- rpmpd_opp_nom: opp5 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
-
- rpmpd_opp_nom_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
-
- rpmpd_opp_turbo: opp7 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
-
- rpmpd_opp_turbo_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
- };
- };
- };
- };
- };
-
smp2p-adsp {
compatible = "qcom,smp2p";
qcom,smem = <443>, <429>;
@@ -855,6 +882,43 @@
status = "disabled";
};
+ system_noc: interconnect@1880000 {
+ compatible = "qcom,sm6115-snoc";
+ reg = <0x0 0x01880000 0x0 0x5f080>;
+ clocks = <&gcc GCC_SYS_NOC_CPUSS_AHB_CLK>,
+ <&gcc GCC_SYS_NOC_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_SYS_NOC_USB3_PRIM_AXI_CLK>,
+ <&rpmcc RPM_SMD_IPA_CLK>;
+ clock-names = "cpu_axi",
+ "ufs_axi",
+ "usb_axi",
+ "ipa";
+ #interconnect-cells = <2>;
+
+ clk_virt: interconnect-clk {
+ compatible = "qcom,sm6115-clk-virt";
+ #interconnect-cells = <2>;
+ };
+
+ mmrt_virt: interconnect-mmrt {
+ compatible = "qcom,sm6115-mmrt-virt";
+ #interconnect-cells = <2>;
+ };
+
+ mmnrt_virt: interconnect-mmnrt {
+ compatible = "qcom,sm6115-mmnrt-virt";
+ #interconnect-cells = <2>;
+ };
+ };
+
+ config_noc: interconnect@1900000 {
+ compatible = "qcom,sm6115-cnoc";
+ reg = <0x0 0x01900000 0x0 0x6200>;
+ clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>;
+ clock-names = "usb_axi";
+ #interconnect-cells = <2>;
+ };
+
qfprom@1b40000 {
compatible = "qcom,sm6115-qfprom", "qcom,qfprom";
reg = <0x0 0x01b40000 0x0 0x7000>;
@@ -865,6 +929,11 @@
reg = <0x25b 0x1>;
bits = <1 4>;
};
+
+ gpu_speed_bin: gpu-speed-bin@6006 {
+ reg = <0x6006 0x2>;
+ bits = <5 8>;
+ };
};
rng: rng@1b53000 {
@@ -874,6 +943,60 @@
clock-names = "core";
};
+ pmu@1b8e300 {
+ compatible = "qcom,sm6115-cpu-bwmon", "qcom,sdm845-bwmon";
+ reg = <0x0 0x01b8e300 0x0 0x600>;
+ interrupts = <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>;
+
+ operating-points-v2 = <&cpu_bwmon_opp_table>;
+ interconnects = <&bimc MASTER_AMPSS_M0 RPM_ACTIVE_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ACTIVE_TAG>;
+
+ cpu_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <(200 * 4 * 1000)>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <(300 * 4 * 1000)>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <(451 * 4 * 1000)>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <(547 * 4 * 1000)>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <(681 * 4 * 1000)>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <(768 * 4 * 1000)>;
+ };
+
+ opp-6 {
+ opp-peak-kBps = <(1017 * 4 * 1000)>;
+ };
+
+ opp-7 {
+ opp-peak-kBps = <(1353 * 4 * 1000)>;
+ };
+
+ opp-8 {
+ opp-peak-kBps = <(1555 * 4 * 1000)>;
+ };
+
+ opp-9 {
+ opp-peak-kBps = <(1804 * 4 * 1000)>;
+ };
+ };
+ };
+
spmi_bus: spmi@1c40000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0x0 0x01c40000 0x0 0x1100>,
@@ -903,6 +1026,12 @@
#thermal-sensor-cells = <1>;
};
+ bimc: interconnect@4480000 {
+ compatible = "qcom,sm6115-bimc";
+ reg = <0x0 0x04480000 0x0 0x80000>;
+ #interconnect-cells = <2>;
+ };
+
rpm_msg_ram: sram@45f0000 {
compatible = "qcom,rpm-msg-ram";
reg = <0x0 0x045f0000 0x0 0x7000>;
@@ -930,8 +1059,42 @@
<&gcc GCC_SDCC1_ICE_CORE_CLK>;
clock-names = "iface", "core", "xo", "ice";
+ power-domains = <&rpmpd SM6115_VDDCX>;
+ operating-points-v2 = <&sdhc1_opp_table>;
+ interconnects = <&system_noc MASTER_SDCC_1 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_SDCC_1 RPM_ALWAYS_TAG>;
+ interconnect-names = "sdhc-ddr",
+ "cpu-sdhc";
+
bus-width = <8>;
status = "disabled";
+
+ sdhc1_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-100000000 {
+ opp-hz = /bits/ 64 <100000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ opp-peak-kBps = <250000 133320>;
+ opp-avg-kBps = <102400 65000>;
+ };
+
+ opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ opp-peak-kBps = <800000 300000>;
+ opp-avg-kBps = <204800 200000>;
+ };
+
+ opp-384000000 {
+ opp-hz = /bits/ 64 <384000000>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ opp-peak-kBps = <800000 300000>;
+ opp-avg-kBps = <204800 200000>;
+ };
+ };
};
sdhc_2: mmc@4784000 {
@@ -952,6 +1115,12 @@
operating-points-v2 = <&sdhc2_opp_table>;
iommus = <&apps_smmu 0x00a0 0x0>;
resets = <&gcc GCC_SDCC2_BCR>;
+ interconnects = <&system_noc MASTER_SDCC_2 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_SDCC_2 RPM_ALWAYS_TAG>;
+ interconnect-names = "sdhc-ddr",
+ "cpu-sdhc";
bus-width = <4>;
qcom,dll-config = <0x0007642c>;
@@ -964,11 +1133,15 @@
opp-100000000 {
opp-hz = /bits/ 64 <100000000>;
required-opps = <&rpmpd_opp_low_svs>;
+ opp-peak-kBps = <250000 133320>;
+ opp-avg-kBps = <261438 150000>;
};
opp-202000000 {
opp-hz = /bits/ 64 <202000000>;
required-opps = <&rpmpd_opp_nom>;
+ opp-peak-kBps = <800000 300000>;
+ opp-avg-kBps = <261438 300000>;
};
};
};
@@ -978,7 +1151,7 @@
reg = <0x0 0x04804000 0x0 0x3000>, <0x0 0x04810000 0x0 0x8000>;
reg-names = "std", "ice";
interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <1>;
#reset-cells = <1>;
@@ -1019,24 +1192,17 @@
ufs_mem_phy: phy@4807000 {
compatible = "qcom,sm6115-qmp-ufs-phy";
- reg = <0x0 0x04807000 0x0 0x1c4>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0x0 0x04807000 0x0 0x1000>;
clocks = <&gcc GCC_UFS_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
clock-names = "ref", "ref_aux";
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufs_mem_phy_lanes: phy@4807400 {
- reg = <0x0 0x04807400 0x0 0x098>,
- <0x0 0x04807600 0x0 0x130>,
- <0x0 0x04807c00 0x0 0x16c>;
- #phy-cells = <0>;
- };
+ #phy-cells = <0>;
+
+ status = "disabled";
};
gpi_dma0: dma-controller@4a00000 {
@@ -1052,7 +1218,7 @@
<GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>;
- dma-channels = <10>;
+ dma-channels = <10>;
dma-channel-mask = <0xf>;
iommus = <&apps_smmu 0xf6 0x0>;
#dma-cells = <3>;
@@ -1082,6 +1248,15 @@
dmas = <&gpi_dma0 0 0 QCOM_GPI_I2C>,
<&gpi_dma0 1 0 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1098,6 +1273,15 @@
dmas = <&gpi_dma0 0 0 QCOM_GPI_SPI>,
<&gpi_dma0 1 0 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1114,6 +1298,15 @@
dmas = <&gpi_dma0 0 1 QCOM_GPI_I2C>,
<&gpi_dma0 1 1 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1130,6 +1323,15 @@
dmas = <&gpi_dma0 0 1 QCOM_GPI_SPI>,
<&gpi_dma0 1 1 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1146,6 +1348,15 @@
dmas = <&gpi_dma0 0 2 QCOM_GPI_I2C>,
<&gpi_dma0 1 2 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1162,6 +1373,15 @@
dmas = <&gpi_dma0 0 2 QCOM_GPI_SPI>,
<&gpi_dma0 1 2 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1178,6 +1398,15 @@
dmas = <&gpi_dma0 0 3 QCOM_GPI_I2C>,
<&gpi_dma0 1 3 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1194,11 +1423,37 @@
dmas = <&gpi_dma0 0 3 QCOM_GPI_SPI>,
<&gpi_dma0 1 3 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
+ uart3: serial@4a8c000 {
+ compatible = "qcom,geni-uart";
+ reg = <0x0 0x04a8c000 0x0 0x4000>;
+ interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
+ clock-names = "se";
+ power-domains = <&rpmpd SM6115_VDDCX>;
+ operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
+ status = "disabled";
+ };
+
i2c4: i2c@4a90000 {
compatible = "qcom,geni-i2c";
reg = <0x0 0x04a90000 0x0 0x4000>;
@@ -1210,6 +1465,15 @@
dmas = <&gpi_dma0 0 4 QCOM_GPI_I2C>,
<&gpi_dma0 1 4 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1226,6 +1490,15 @@
dmas = <&gpi_dma0 0 4 QCOM_GPI_SPI>,
<&gpi_dma0 1 4 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1237,6 +1510,12 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>;
interrupts = <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>;
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1251,6 +1530,15 @@
dmas = <&gpi_dma0 0 5 QCOM_GPI_I2C>,
<&gpi_dma0 1 5 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1267,6 +1555,15 @@
dmas = <&gpi_dma0 0 5 QCOM_GPI_SPI>,
<&gpi_dma0 1 5 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 RPM_ALWAYS_TAG
+ &clk_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_QUP_0 RPM_ALWAYS_TAG>,
+ <&system_noc MASTER_QUP_0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1298,6 +1595,14 @@
resets = <&gcc GCC_USB30_PRIM_BCR>;
power-domains = <&gcc GCC_USB30_PRIM_GDSC>;
+ /* TODO: USB<->IPA path */
+ interconnects = <&system_noc MASTER_USB3 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_USB3 RPM_ALWAYS_TAG>;
+ interconnect-names = "usb-ddr",
+ "apps-usb";
+
qcom,select-utmi-as-pipe-clk;
status = "disabled";
@@ -1316,6 +1621,104 @@
};
};
+ gpu: gpu@5900000 {
+ compatible = "qcom,adreno-610.0", "qcom,adreno";
+ reg = <0x0 0x05900000 0x0 0x40000>;
+ reg-names = "kgsl_3d0_reg_memory";
+
+ /* There's no (real) GMU, so we have to handle quite a bunch of clocks! */
+ clocks = <&gpucc GPU_CC_GX_GFX3D_CLK>,
+ <&gpucc GPU_CC_AHB_CLK>,
+ <&gcc GCC_BIMC_GPU_AXI_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gpucc GPU_CC_CX_GMU_CLK>,
+ <&gpucc GPU_CC_CXO_CLK>;
+ clock-names = "core",
+ "iface",
+ "mem_iface",
+ "alt_mem_iface",
+ "gmu",
+ "xo";
+
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+
+ iommus = <&adreno_smmu 0 1>;
+ operating-points-v2 = <&gpu_opp_table>;
+ power-domains = <&rpmpd SM6115_VDDCX>;
+ qcom,gmu = <&gmu_wrapper>;
+
+ nvmem-cells = <&gpu_speed_bin>;
+ nvmem-cell-names = "speed_bin";
+
+ status = "disabled";
+
+ zap-shader {
+ memory-region = <&pil_gpu_mem>;
+ };
+
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-320000000 {
+ opp-hz = /bits/ 64 <320000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ opp-supported-hw = <0x1f>;
+ };
+
+ opp-465000000 {
+ opp-hz = /bits/ 64 <465000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ opp-supported-hw = <0x1f>;
+ };
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ opp-supported-hw = <0x1f>;
+ };
+
+ opp-745000000 {
+ opp-hz = /bits/ 64 <745000000>;
+ required-opps = <&rpmpd_opp_nom>;
+ opp-supported-hw = <0xf>;
+ };
+
+ opp-820000000 {
+ opp-hz = /bits/ 64 <820000000>;
+ required-opps = <&rpmpd_opp_nom_plus>;
+ opp-supported-hw = <0x7>;
+ };
+
+ opp-900000000 {
+ opp-hz = /bits/ 64 <900000000>;
+ required-opps = <&rpmpd_opp_turbo>;
+ opp-supported-hw = <0x7>;
+ };
+
+ /* Speed bin 2 can reach 950 Mhz instead of 980 like the rest. */
+ opp-950000000 {
+ opp-hz = /bits/ 64 <950000000>;
+ required-opps = <&rpmpd_opp_turbo_plus>;
+ opp-supported-hw = <0x4>;
+ };
+
+ opp-980000000 {
+ opp-hz = /bits/ 64 <980000000>;
+ required-opps = <&rpmpd_opp_turbo_plus>;
+ opp-supported-hw = <0x3>;
+ };
+ };
+ };
+
+ gmu_wrapper: gmu@596a000 {
+ compatible = "qcom,adreno-gmu-wrapper";
+ reg = <0x0 0x0596a000 0x0 0x30000>;
+ reg-names = "gmu";
+ power-domains = <&gpucc GPU_CX_GDSC>,
+ <&gpucc GPU_GX_GDSC>;
+ power-domain-names = "cx", "gx";
+ };
+
gpucc: clock-controller@5990000 {
compatible = "qcom,sm6115-gpucc";
reg = <0x0 0x05990000 0x0 0x9000>;
@@ -1371,6 +1774,13 @@
iommus = <&apps_smmu 0x420 0x2>,
<&apps_smmu 0x421 0x0>;
+ interconnects = <&mmrt_virt MASTER_MDP_PORT0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI_CH0 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_AMPSS_M0 RPM_ALWAYS_TAG
+ &config_noc SLAVE_DISPLAY_CFG RPM_ALWAYS_TAG>;
+ interconnect-names = "mdp0-mem",
+ "cpu-cfg";
+
#address-cells = <2>;
#size-cells = <2>;
ranges;
@@ -2459,54 +2869,54 @@
compatible = "arm,armv7-timer-mem";
reg = <0x0 0x0f120000 0x0 0x1000>;
#address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ #size-cells = <1>;
+ ranges = <0x0 0x0 0x0 0x0 0x20000000>;
clock-frequency = <19200000>;
frame@f121000 {
- reg = <0x0 0x0f121000 0x0 0x1000>, <0x0 0x0f122000 0x0 0x1000>;
+ reg = <0x0 0x0f121000 0x1000>, <0x0 0x0f122000 0x1000>;
frame-number = <0>;
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
};
frame@f123000 {
- reg = <0x0 0x0f123000 0x0 0x1000>;
+ reg = <0x0 0x0f123000 0x1000>;
frame-number = <1>;
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
frame@f124000 {
- reg = <0x0 0x0f124000 0x0 0x1000>;
+ reg = <0x0 0x0f124000 0x1000>;
frame-number = <2>;
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
frame@f125000 {
- reg = <0x0 0x0f125000 0x0 0x1000>;
+ reg = <0x0 0x0f125000 0x1000>;
frame-number = <3>;
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
frame@f126000 {
- reg = <0x0 0x0f126000 0x0 0x1000>;
+ reg = <0x0 0x0f126000 0x1000>;
frame-number = <4>;
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
frame@f127000 {
- reg = <0x0 0x0f127000 0x0 0x1000>;
+ reg = <0x0 0x0f127000 0x1000>;
frame-number = <5>;
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
frame@f128000 {
- reg = <0x0 0x0f128000 0x0 0x1000>;
+ reg = <0x0 0x0f128000 0x1000>;
frame-number = <6>;
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6115p-lenovo-j606f.dts b/sys/contrib/device-tree/src/arm64/qcom/sm6115p-lenovo-j606f.dts
index 81fdcaf48926..54da053a8042 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6115p-lenovo-j606f.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6115p-lenovo-j606f.dts
@@ -65,9 +65,49 @@
};
};
-&dispcc {
- /* HACK: disable until a panel driver is ready to retain simplefb */
- status = "disabled";
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ firmware-name = "qcom/sm6115/LENOVO/J606F/a610_zap.mbn";
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&pm6125_l18>;
+ status = "okay";
+
+ panel: panel@0 {
+ compatible = "lenovo,j606f-boe-nt36523w", "novatek,nt36523w";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>;
+ vddio-supply = <&pm6125_l9>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&te_active &mdss_dsi_active>;
+
+ rotation = <180>; /* Yep, it's mounted upside down! */
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ data-lanes = <0 1 2 3>;
+ remote-endpoint = <&panel_in>;
+};
+
+&mdss_dsi0_phy {
+ status = "okay";
};
&pm6125_gpios {
@@ -212,8 +252,9 @@
};
pm6125_l18: l18 {
- regulator-min-microvolt = <1104000>;
- regulator-max-microvolt = <1312000>;
+ /* 1.104V-1.312V fixed @ 1.232V for DSIPHY */
+ regulator-min-microvolt = <1232000>;
+ regulator-max-microvolt = <1232000>;
};
pm6125_l19: l19 {
@@ -282,6 +323,20 @@
bias-pull-up;
output-high;
};
+
+ te_active: te-active-state {
+ pins = "gpio81";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ mdss_dsi_active: dsi-active-state {
+ pins = "gpio82";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
};
&ufs_mem_hc {
@@ -289,13 +344,13 @@
vcc-max-microamp = <600000>;
vccq2-supply = <&pm6125_l11>;
vccq2-max-microamp = <600000>;
+ vdd-hba-supply = <&pm6125_l18>;
status = "okay";
};
&ufs_mem_phy {
vdda-phy-supply = <&pm6125_l4>;
vdda-pll-supply = <&pm6125_l12>;
- vddp-ref-clk-supply = <&pm6125_l18>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6125-sony-xperia-seine-pdx201.dts b/sys/contrib/device-tree/src/arm64/qcom/sm6125-sony-xperia-seine-pdx201.dts
index 9f8a9ef398a2..08046f866f60 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6125-sony-xperia-seine-pdx201.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6125-sony-xperia-seine-pdx201.dts
@@ -42,7 +42,7 @@
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 102 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
};
gpio-keys {
@@ -79,7 +79,7 @@
reg = <0x0 0xffc40000 0x0 0xc0000>;
record-size = <0x1000>;
console-size = <0x40000>;
- msg-size = <0x20000 0x20000>;
+ pmsg-size = <0x20000>;
};
cmdline_mem: memory@ffd00000 {
@@ -179,43 +179,85 @@
/* Cirrus Logic CS35L41 boosted audio amplifier @ 40 */
};
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&pm6125_l18>;
+ status = "okay";
+
+ panel@0 {
+ compatible = "samsung,sofef01-m-ams597ut01";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 90 GPIO_ACTIVE_LOW>;
+
+ vddio-supply = <&pm6125_l12>;
+
+ pinctrl-0 = <&mdss_dsi_active &mdss_te_active_sleep>;
+ pinctrl-1 = <&mdss_dsi_sleep &mdss_te_active_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ remote-endpoint = <&panel_in>;
+ data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi0_phy {
+ status = "okay";
+};
+
&pm6125_adc {
pinctrl-names = "default";
pinctrl-0 = <&camera_flash_therm &emmc_ufs_therm &rf_pa1_therm>;
- rf-pa0-therm@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "rf_pa0_therm";
};
- quiet-therm@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "quiet_therm";
};
- camera-flash-therm@52 {
+ channel@52 {
reg = <ADC5_GPIO1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "camera_flash_therm";
};
- emmc-ufs-therm@54 {
+ channel@54 {
reg = <ADC5_GPIO3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "emmc_ufs_therm";
};
- rf-pa1-therm@55 {
+ channel@55 {
reg = <ADC5_GPIO4_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
+ label = "rf_pa1_therm";
};
};
@@ -469,6 +511,28 @@
drive-strength = <2>;
bias-disable;
};
+
+ mdss_te_active_sleep: mdss-te-active-sleep-state {
+ pins = "gpio89";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ mdss_dsi_active: mdss-dsi-active-state {
+ pins = "gpio90";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ mdss_dsi_sleep: mdss-dsi-sleep-state {
+ pins = "gpio90";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
};
&usb3 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6125-xiaomi-laurel-sprout.dts b/sys/contrib/device-tree/src/arm64/qcom/sm6125-xiaomi-laurel-sprout.dts
index a7f4aeae9c1a..a49d3ebb1931 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6125-xiaomi-laurel-sprout.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6125-xiaomi-laurel-sprout.dts
@@ -52,7 +52,7 @@
reg = <0x0 0xffc40000 0x0 0xc0000>;
record-size = <0x1000>;
console-size = <0x40000>;
- msg-size = <0x20000 0x20000>;
+ pmsg-size = <0x20000>;
};
cmdline_mem: memory@ffd00000 {
@@ -63,7 +63,7 @@
extcon_usb: usb-id {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 102 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
};
gpio-keys {
@@ -400,15 +400,13 @@
vccq2-supply = <&vreg_l11a>;
vcc-max-microamp = <600000>;
vccq2-max-microamp = <600000>;
+ vdd-hba-supply = <&vreg_l18a>;
status = "okay";
};
&ufs_mem_phy {
vdda-phy-supply = <&vreg_l4a>;
vdda-pll-supply = <&vreg_l10a>;
- vdda-phy-max-microamp = <51400>;
- vdda-pll-max-microamp = <14200>;
- vddp-ref-clk-supply = <&vreg_l18a>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6125.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm6125.dtsi
index a596baa6ce3e..1dd3a4056e26 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6125.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6125.dtsi
@@ -3,6 +3,7 @@
* Copyright (c) 2021, Martin Botka <martin.botka@somainline.org>
*/
+#include <dt-bindings/clock/qcom,dispcc-sm6125.h>
#include <dt-bindings/clock/qcom,gcc-sm6125.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/dma/qcom-gpi.h>
@@ -22,7 +23,6 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <19200000>;
- clock-output-names = "xo_board";
};
sleep_clk: sleep-clk {
@@ -181,6 +181,80 @@
method = "smc";
};
+ rpm: remoteproc {
+ compatible = "qcom,sm6125-rpm-proc", "qcom,rpm-proc";
+
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+
+ interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-sm6125";
+ qcom,glink-channels = "rpm_requests";
+
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-sm6125", "qcom,rpmcc";
+ #clock-cells = <1>;
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ };
+
+ rpmpd: power-controller {
+ compatible = "qcom,sm6125-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_ret: opp1 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION>;
+ };
+
+ rpmpd_opp_ret_plus: opp2 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
+ };
+
+ rpmpd_opp_min_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
+
+ rpmpd_opp_low_svs: opp4 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
+
+ rpmpd_opp_svs: opp5 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
+
+ rpmpd_opp_svs_plus: opp6 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
+
+ rpmpd_opp_nom: opp7 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
+
+ rpmpd_opp_nom_plus: opp8 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp9 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
+
+ rpmpd_opp_turbo_no_cpr: opp10 {
+ opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
+ };
+ };
+ };
+ };
+ };
+ };
+
reserved_memory: reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -292,74 +366,6 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
-
- interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&apcs_glb 0>;
-
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-sm6125";
- qcom,glink-channels = "rpm_requests";
-
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-sm6125", "qcom,rpmcc";
- #clock-cells = <1>;
- };
-
- rpmpd: power-controller {
- compatible = "qcom,sm6125-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_ret: opp1 {
- opp-level = <RPM_SMD_LEVEL_RETENTION>;
- };
-
- rpmpd_opp_ret_plus: opp2 {
- opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
- };
-
- rpmpd_opp_min_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
-
- rpmpd_opp_low_svs: opp4 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
-
- rpmpd_opp_svs: opp5 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
-
- rpmpd_opp_svs_plus: opp6 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
-
- rpmpd_opp_nom: opp7 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
-
- rpmpd_opp_nom_plus: opp8 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
-
- rpmpd_opp_turbo: opp9 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
-
- rpmpd_opp_turbo_no_cpr: opp10 {
- opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
- };
- };
- };
- };
- };
-
smem: smem {
compatible = "qcom,smem";
memory-region = <&smem_mem>;
@@ -679,6 +685,24 @@
status = "disabled";
};
+ spmi_bus: spmi@1c40000 {
+ compatible = "qcom,spmi-pmic-arb";
+ reg = <0x01c40000 0x1100>,
+ <0x01e00000 0x2000000>,
+ <0x03e00000 0x100000>,
+ <0x03f00000 0xa0000>,
+ <0x01c0a000 0x26000>;
+ reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
+ interrupt-names = "periph_irq";
+ interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
+ qcom,ee = <0>;
+ qcom,channel = <0>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ interrupt-controller;
+ #interrupt-cells = <4>;
+ };
+
rpm_msg_ram: sram@45f0000 {
compatible = "qcom,rpm-msg-ram";
reg = <0x045f0000 0x7000>;
@@ -695,7 +719,7 @@
clocks = <&gcc GCC_SDCC1_AHB_CLK>,
<&gcc GCC_SDCC1_APPS_CLK>,
- <&xo_board>;
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
clock-names = "iface", "core", "xo";
iommus = <&apps_smmu 0x160 0x0>;
@@ -722,7 +746,7 @@
clocks = <&gcc GCC_SDCC2_AHB_CLK>,
<&gcc GCC_SDCC2_APPS_CLK>,
- <&xo_board>;
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
clock-names = "iface", "core", "xo";
iommus = <&apps_smmu 0x180 0x0>;
@@ -1161,6 +1185,10 @@
<&gcc GCC_USB30_PRIM_MASTER_CLK>;
assigned-clock-rates = <19200000>, <66666667>;
+ interrupts = <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hs_phy_irq", "ss_phy_irq";
+
power-domains = <&gcc USB30_PRIM_GDSC>;
qcom,select-utmi-as-pipe-clk;
status = "disabled";
@@ -1184,27 +1212,226 @@
reg = <0x04690000 0x10000>;
};
- spmi_bus: spmi@1c40000 {
- compatible = "qcom,spmi-pmic-arb";
- reg = <0x01c40000 0x1100>,
- <0x01e00000 0x2000000>,
- <0x03e00000 0x100000>,
- <0x03f00000 0xa0000>,
- <0x01c0a000 0x26000>;
- reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
- interrupt-names = "periph_irq";
- interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
- qcom,ee = <0>;
- qcom,channel = <0>;
- #address-cells = <2>;
- #size-cells = <0>;
+ mdss: display-subsystem@5e00000 {
+ compatible = "qcom,sm6125-mdss";
+ reg = <0x05e00000 0x1000>;
+ reg-names = "mdss";
+
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
- #interrupt-cells = <4>;
+ #interrupt-cells = <1>;
+
+ clocks = <&gcc GCC_DISP_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface",
+ "ahb",
+ "core";
+
+ power-domains = <&dispcc MDSS_GDSC>;
+
+ iommus = <&apps_smmu 0x400 0x0>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@5e01000 {
+ compatible = "qcom,sm6125-dpu";
+ reg = <0x05e01000 0x83208>,
+ <0x05eb0000 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_ROT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>,
+ <&gcc GCC_DISP_THROTTLE_CORE_CLK>;
+ clock-names = "bus",
+ "iface",
+ "rot",
+ "lut",
+ "core",
+ "vsync",
+ "throttle";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmpd SM6125_VDDCX>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-192000000 {
+ opp-hz = /bits/ 64 <192000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-256000000 {
+ opp-hz = /bits/ 64 <256000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp-307200000 {
+ opp-hz = /bits/ 64 <307200000>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ };
+
+ opp-384000000 {
+ opp-hz = /bits/ 64 <384000000>;
+ required-opps = <&rpmpd_opp_nom>;
+ };
+
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ required-opps = <&rpmpd_opp_turbo>;
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@5e94000 {
+ compatible = "qcom,sm6125-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0x05e94000 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&dsi_opp_table>;
+ power-domains = <&rpmpd SM6125_VDDCX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+
+ dsi_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-164000000 {
+ opp-hz = /bits/ 64 <164000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-187500000 {
+ opp-hz = /bits/ 64 <187500000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@5e94400 {
+ compatible = "qcom,sm6125-dsi-phy-14nm";
+ reg = <0x05e94400 0x100>,
+ <0x05e94500 0x300>,
+ <0x05e94800 0x188>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface",
+ "ref";
+
+ required-opps = <&rpmpd_opp_nom>;
+ power-domains = <&rpmpd SM6125_VDDMX>;
+
+ status = "disabled";
+ };
+ };
+
+ dispcc: clock-controller@5f00000 {
+ compatible = "qcom,sm6125-dispcc";
+ reg = <0x05f00000 0x20000>;
+
+ clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>,
+ <0>,
+ <0>,
+ <0>,
+ <&gcc GCC_DISP_AHB_CLK>,
+ <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>;
+ clock-names = "bi_tcxo",
+ "dsi0_phy_pll_out_byteclk",
+ "dsi0_phy_pll_out_dsiclk",
+ "dsi1_phy_pll_out_dsiclk",
+ "dp_phy_pll_link_clk",
+ "dp_phy_pll_vco_div_clk",
+ "cfg_ahb_clk",
+ "gcc_disp_gpll0_div_clk_src";
+
+ required-opps = <&rpmpd_opp_ret>;
+ power-domains = <&rpmpd SM6125_VDDCX>;
+
+ #clock-cells = <1>;
+ #power-domain-cells = <1>;
};
apps_smmu: iommu@c600000 {
compatible = "qcom,sm6125-smmu-500", "qcom,smmu-500", "arm,mmu-500";
- reg = <0xc600000 0x80000>;
+ reg = <0x0c600000 0x80000>;
interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6350.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm6350.dtsi
index 30e77010aed5..43cffe8e1247 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6350.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6350.dtsi
@@ -4,7 +4,9 @@
* Copyright (c) 2022, Luca Weiss <luca.weiss@fairphone.com>
*/
+#include <dt-bindings/clock/qcom,dispcc-sm6350.h>
#include <dt-bindings/clock/qcom,gcc-sm6350.h>
+#include <dt-bindings/clock/qcom,gpucc-sm6350.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,sm6350-camcc.h>
#include <dt-bindings/dma/qcom-gpi.h>
@@ -633,11 +635,6 @@
no-map;
};
- pil_gpu_mem: memory@8b715400 {
- reg = <0 0x8b715400 0 0x2000>;
- no-map;
- };
-
pil_modem_mem: memory@8b800000 {
reg = <0 0x8b800000 0 0xf800000>;
no-map;
@@ -658,6 +655,11 @@
no-map;
};
+ pil_gpu_mem: memory@f0d00000 {
+ reg = <0 0xf0d00000 0 0x1000>;
+ no-map;
+ };
+
debug_region: memory@ffb00000 {
reg = <0 0xffb00000 0 0xc0000>;
no-map;
@@ -673,7 +675,7 @@
reg = <0 0xffc00000 0 0x100000>;
record-size = <0x1000>;
console-size = <0x40000>;
- msg-size = <0x20000 0x20000>;
+ pmsg-size = <0x20000>;
ecc-size = <16>;
no-map;
};
@@ -804,6 +806,18 @@
#mbox-cells = <2>;
};
+ qfprom: qfprom@784000 {
+ compatible = "qcom,sm6350-qfprom", "qcom,qfprom";
+ reg = <0 0x00784000 0 0x3000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ gpu_speed_bin: gpu-speed-bin@2015 {
+ reg = <0x2015 0x1>;
+ bits = <0 8>;
+ };
+ };
+
rng: rng@793000 {
compatible = "qcom,prng-ee";
reg = <0 0x00793000 0 0x1000>;
@@ -1128,7 +1142,7 @@
<0 0x01d90000 0 0x8000>;
reg-names = "std", "ice";
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
#reset-cells = <1>;
@@ -1173,10 +1187,7 @@
ufs_mem_phy: phy@1d87000 {
compatible = "qcom,sm6350-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x18c>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
clock-names = "ref",
"ref_aux";
@@ -1186,16 +1197,9 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
+ #phy-cells = <0>;
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x128>,
- <0 0x01d87600 0 0x1fc>,
- <0 0x01d87c00 0 0x1dc>,
- <0 0x01d87800 0 0x128>,
- <0 0x01d87a00 0 0x1fc>;
- #phy-cells = <0>;
- };
+ status = "disabled";
};
ipa: ipa@1e40000 {
@@ -1308,6 +1312,159 @@
};
};
+ gpu: gpu@3d00000 {
+ compatible = "qcom,adreno-619.0", "qcom,adreno";
+ reg = <0 0x03d00000 0 0x40000>,
+ <0 0x03d9e000 0 0x1000>;
+ reg-names = "kgsl_3d0_reg_memory",
+ "cx_mem";
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
+
+ iommus = <&adreno_smmu 0>;
+ operating-points-v2 = <&gpu_opp_table>;
+ qcom,gmu = <&gmu>;
+ nvmem-cells = <&gpu_speed_bin>;
+ nvmem-cell-names = "speed_bin";
+
+ status = "disabled";
+
+ zap-shader {
+ memory-region = <&pil_gpu_mem>;
+ };
+
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-850000000 {
+ opp-hz = /bits/ 64 <850000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ opp-supported-hw = <0x02>;
+ };
+
+ opp-800000000 {
+ opp-hz = /bits/ 64 <800000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ opp-supported-hw = <0x04>;
+ };
+
+ opp-650000000 {
+ opp-hz = /bits/ 64 <650000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ opp-supported-hw = <0x08>;
+ };
+
+ opp-565000000 {
+ opp-hz = /bits/ 64 <565000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ opp-supported-hw = <0x10>;
+ };
+
+ opp-430000000 {
+ opp-hz = /bits/ 64 <430000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-355000000 {
+ opp-hz = /bits/ 64 <355000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-253000000 {
+ opp-hz = /bits/ 64 <253000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ opp-supported-hw = <0xff>;
+ };
+ };
+ };
+
+ adreno_smmu: iommu@3d40000 {
+ compatible = "qcom,sm6350-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2";
+ reg = <0 0x03d40000 0 0x10000>;
+ #iommu-cells = <1>;
+ #global-interrupts = <2>;
+ interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 364 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 365 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 366 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 369 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gpucc GPU_CC_AHB_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>;
+ clock-names = "ahb",
+ "bus",
+ "iface";
+
+ power-domains = <&gpucc GPU_CX_GDSC>;
+ };
+
+ gmu: gmu@3d6a000 {
+ compatible = "qcom,adreno-gmu-619.0", "qcom,adreno-gmu";
+ reg = <0 0x03d6a000 0 0x31000>,
+ <0 0x0b290000 0 0x10000>,
+ <0 0x0b490000 0 0x10000>;
+ reg-names = "gmu",
+ "gmu_pdc",
+ "gmu_pdc_seq";
+
+ interrupts = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hfi",
+ "gmu";
+
+ clocks = <&gpucc GPU_CC_AHB_CLK>,
+ <&gpucc GPU_CC_CX_GMU_CLK>,
+ <&gpucc GPU_CC_CXO_CLK>,
+ <&gcc GCC_DDRSS_GPU_AXI_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>;
+ clock-names = "ahb",
+ "gmu",
+ "cxo",
+ "axi",
+ "memnoc";
+
+ power-domains = <&gpucc GPU_CX_GDSC>,
+ <&gpucc GPU_GX_GDSC>;
+ power-domain-names = "cx",
+ "gx";
+
+ iommus = <&adreno_smmu 5>;
+
+ operating-points-v2 = <&gmu_opp_table>;
+
+ status = "disabled";
+
+ gmu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+ };
+ };
+
+ gpucc: clock-controller@3d90000 {
+ compatible = "qcom,sm6350-gpucc";
+ reg = <0 0x03d90000 0 0x9000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_GPU_GPLL0_CLK>,
+ <&gcc GCC_GPU_GPLL0_DIV_CLK>;
+ clock-names = "bi_tcxo",
+ "gcc_gpu_gpll0_clk_src",
+ "gcc_gpu_gpll0_div_clk_src";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
mpss: remoteproc@4080000 {
compatible = "qcom,sm6350-mpss-pas";
reg = <0x0 0x04080000 0x0 0x4040>;
@@ -1556,6 +1713,103 @@
qcom,bcm-voters = <&apps_bcm_voter>;
};
+ pmu@90b6300 {
+ compatible = "qcom,sm6350-llcc-bwmon", "qcom,sdm845-bwmon";
+ reg = <0x0 0x090b6300 0x0 0x600>;
+ interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
+
+ operating-points-v2 = <&llcc_bwmon_opp_table>;
+ interconnects = <&clk_virt MASTER_LLCC QCOM_ICC_TAG_ACTIVE_ONLY
+ &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>;
+
+ llcc_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <2288000>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <4577000>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <7110000>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <9155000>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <12298000>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <14236000>;
+ };
+
+ };
+ };
+
+ pmu@90cd000 {
+ compatible = "qcom,sm6350-cpu-bwmon", "qcom,sc7280-llcc-bwmon";
+ reg = <0x0 0x090cd000 0x0 0x1000>;
+ interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
+
+ operating-points-v2 = <&cpu_bwmon_opp_table>;
+ interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY
+ &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>;
+
+ cpu_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <762000>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <1144000>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <1720000>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <2086000>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <2597000>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <2929000>;
+ };
+
+ opp-6 {
+ opp-peak-kBps = <3879000>;
+ };
+
+ opp-7 {
+ opp-peak-kBps = <5161000>;
+ };
+
+ opp-8 {
+ opp-peak-kBps = <5931000>;
+ };
+
+ opp-9 {
+ opp-peak-kBps = <6881000>;
+ };
+
+ opp-10 {
+ opp-peak-kBps = <7980000>;
+ };
+ };
+ };
+
usb_1: usb@a6f8800 {
compatible = "qcom,sm6350-dwc3", "qcom,dwc3";
reg = <0 0x0a6f8800 0 0x400>;
@@ -1703,6 +1957,223 @@
#power-domain-cells = <1>;
};
+ mdss: display-subsystem@ae00000 {
+ compatible = "qcom,sm6350-mdss";
+ reg = <0 0x0ae00000 0 0x1000>;
+ reg-names = "mdss";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ clocks = <&gcc GCC_DISP_AHB_CLK>,
+ <&gcc GCC_DISP_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface",
+ "bus",
+ "core";
+
+ power-domains = <&dispcc MDSS_GDSC>;
+ iommus = <&apps_smmu 0x800 0x2>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@ae01000 {
+ compatible = "qcom,sm6350-dpu";
+ reg = <0 0x0ae01000 0 0x8f000>,
+ <0 0x0aeb0000 0 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&gcc GCC_DISP_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_ROT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "bus",
+ "iface",
+ "rot",
+ "lut",
+ "core",
+ "vsync";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmhpd SM6350_CX>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmhpd_opp_min_svs>;
+ };
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-373333333 {
+ opp-hz = /bits/ 64 <373333333>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-448000000 {
+ opp-hz = /bits/ 64 <448000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+
+ opp-560000000 {
+ opp-hz = /bits/ 64 <560000000>;
+ required-opps = <&rpmhpd_opp_turbo>;
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@ae94000 {
+ compatible = "qcom,sm6350-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0 0x0ae94000 0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&mdss_dsi_opp_table>;
+ power-domains = <&rpmhpd SM6350_MX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+
+ mdss_dsi_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-187500000 {
+ opp-hz = /bits/ 64 <187500000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-358000000 {
+ opp-hz = /bits/ 64 <358000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@ae94400 {
+ compatible = "qcom,dsi-phy-10nm";
+ reg = <0 0x0ae94400 0 0x200>,
+ <0 0x0ae94600 0 0x280>,
+ <0 0x0ae94a00 0 0x1e0>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "ref";
+
+ status = "disabled";
+ };
+ };
+
+ dispcc: clock-controller@af00000 {
+ compatible = "qcom,sm6350-dispcc";
+ reg = <0 0x0af00000 0 0x20000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_DISP_GPLL0_CLK>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+ clock-names = "bi_tcxo",
+ "gcc_disp_gpll0_clk",
+ "dsi0_phy_pll_out_byteclk",
+ "dsi0_phy_pll_out_dsiclk",
+ "dp_phy_pll_link_clk",
+ "dp_phy_pll_vco_div_clk";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
pdc: interrupt-controller@b220000 {
compatible = "qcom,sm6350-pdc", "qcom,pdc";
reg = <0 0x0b220000 0 0x30000>, <0 0x17c000f0 0 0x64>;
@@ -1780,6 +2251,7 @@
interrupt-controller;
#interrupt-cells = <2>;
gpio-ranges = <&tlmm 0 0 157>;
+ wakeup-parent = <&pdc>;
cci0_default: cci0-default-state {
pins = "gpio39", "gpio40";
@@ -2042,7 +2514,7 @@
compatible = "qcom,apss-wdt-sm6350", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
timer@17c20000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6375-sony-xperia-murray-pdx225.dts b/sys/contrib/device-tree/src/arm64/qcom/sm6375-sony-xperia-murray-pdx225.dts
index b2f1bb1d58e9..cca2c2eb88ad 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6375-sony-xperia-murray-pdx225.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6375-sony-xperia-murray-pdx225.dts
@@ -80,6 +80,15 @@
};
};
+ touch_avdd: touch-avdd-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "touch_avdd";
+ gpio = <&tlmm 59 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ts_avdd_default>;
+ enable-active-high;
+ };
+
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
@@ -136,9 +145,10 @@
interrupts = <22 0x2008>;
vdd-supply = <&pm6125_l13>;
+ avdd-supply = <&touch_avdd>;
pinctrl-names = "default";
- pinctrl-0 = <&ts_int_default &ts_avdd_default>;
+ pinctrl-0 = <&ts_int_default>;
};
};
@@ -187,6 +197,11 @@
status = "okay";
};
+&remoteproc_mss {
+ firmware-name = "qcom/sm6375/Sony/murray/modem.mbn";
+ status = "okay";
+};
+
&rpm_requests {
regulators-0 {
compatible = "qcom,rpm-pm6125-regulators";
@@ -238,8 +253,8 @@
};
pm6125_l7: l7 {
- regulator-min-microvolt = <720000>;
- regulator-max-microvolt = <1050000>;
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
};
pm6125_l8: l8 {
@@ -306,7 +321,7 @@
pm6125_l21: l21 {
regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3400000>;
+ regulator-max-microvolt = <3312000>;
};
pm6125_l22: l22 {
@@ -317,7 +332,7 @@
pm6125_l23: l23 {
regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3400000>;
+ regulator-max-microvolt = <3312000>;
};
pm6125_l24: l24 {
@@ -340,8 +355,8 @@
};
pmr735a_l2: l2 {
- regulator-min-microvolt = <352000>;
- regulator-max-microvolt = <796000>;
+ regulator-min-microvolt = <640000>;
+ regulator-max-microvolt = <640000>;
};
pmr735a_l3: l3 {
@@ -412,7 +427,7 @@
pins = "gpio59";
function = "gpio";
drive-strength = <8>;
- output-high;
+ output-low;
};
};
@@ -425,6 +440,18 @@
};
&usb_1_hsphy {
+ vdda-pll-supply = <&pm6125_l7>;
+ vdda18-supply = <&pm6125_l10>;
+ vdda33-supply = <&pmr735a_l7>;
+ status = "okay";
+};
+
+&wifi {
+ vdd-0.8-cx-mx-supply = <&pmr735a_l2>;
+ vdd-1.8-xo-supply = <&pm6125_l16>;
+ vdd-1.3-rfa-supply = <&pm6125_l2>;
+ vdd-3.3-ch0-supply = <&pm6125_l23>;
+ vdd-3.3-ch1-supply = <&pm6125_l21>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm6375.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm6375.dtsi
index 3dba34210a6d..7ac8bf26dda3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm6375.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm6375.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/clock/qcom,sm6375-gpucc.h>
#include <dt-bindings/dma/qcom-gpi.h>
#include <dt-bindings/firmware/qcom,scm.h>
+#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
#include <dt-bindings/power/qcom-rpmpd.h>
@@ -45,6 +46,8 @@
enable-method = "psci";
next-level-cache = <&L2_0>;
qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD0>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -69,6 +72,8 @@
enable-method = "psci";
next-level-cache = <&L2_100>;
qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD1>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -88,6 +93,8 @@
enable-method = "psci";
next-level-cache = <&L2_200>;
qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD2>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -107,6 +114,8 @@
enable-method = "psci";
next-level-cache = <&L2_300>;
qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD3>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -126,6 +135,8 @@
enable-method = "psci";
next-level-cache = <&L2_400>;
qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD4>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -145,6 +156,8 @@
enable-method = "psci";
next-level-cache = <&L2_500>;
qcom,freq-domain = <&cpufreq_hw 0>;
+ operating-points-v2 = <&cpu0_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD5>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -164,6 +177,8 @@
enable-method = "psci";
next-level-cache = <&L2_600>;
qcom,freq-domain = <&cpufreq_hw 1>;
+ operating-points-v2 = <&cpu6_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD6>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -183,6 +198,8 @@
enable-method = "psci";
next-level-cache = <&L2_700>;
qcom,freq-domain = <&cpufreq_hw 1>;
+ operating-points-v2 = <&cpu6_opp_table>;
+ interconnects = <&cpucp_l3 MASTER_EPSS_L3_APPS &cpucp_l3 SLAVE_EPSS_L3_SHARED>;
power-domains = <&CPU_PD7>;
power-domain-names = "psci";
#cooling-cells = <2>;
@@ -294,12 +311,141 @@
};
};
+ mpm: interrupt-controller {
+ compatible = "qcom,mpm";
+ qcom,rpm-msg-ram = <&apss_mpm>;
+ interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
+ mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_SMP2P>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ #power-domain-cells = <0>;
+ interrupt-parent = <&intc>;
+ qcom,mpm-pin-count = <96>;
+ qcom,mpm-pin-map = <5 296>, /* Soundwire wake_irq */
+ <12 422>, /* DWC3 ss_phy_irq */
+ <86 183>, /* MPM wake, SPMI */
+ <89 314>, /* TSENS0 0C */
+ <90 315>, /* TSENS1 0C */
+ <93 164>, /* DWC3 dm_hs_phy_irq */
+ <94 165>; /* DWC3 dp_hs_phy_irq */
+ };
+
memory@80000000 {
device_type = "memory";
/* We expect the bootloader to fill in the size */
reg = <0x0 0x80000000 0x0 0x0>;
};
+ cpu0_opp_table: opp-table-cpu0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ opp-peak-kBps = <(300000 * 32)>;
+ };
+
+ opp-576000000 {
+ opp-hz = /bits/ 64 <576000000>;
+ opp-peak-kBps = <(556800 * 32)>;
+ };
+
+ opp-691200000 {
+ opp-hz = /bits/ 64 <691200000>;
+ opp-peak-kBps = <(652800 * 32)>;
+ };
+
+ opp-940800000 {
+ opp-hz = /bits/ 64 <940800000>;
+ opp-peak-kBps = <(921600 * 32)>;
+ };
+
+ opp-1113600000 {
+ opp-hz = /bits/ 64 <1113600000>;
+ opp-peak-kBps = <(921600 * 32)>;
+ };
+
+ opp-1324800000 {
+ opp-hz = /bits/ 64 <1324800000>;
+ opp-peak-kBps = <(1171200 * 32)>;
+ };
+
+ opp-1516800000 {
+ opp-hz = /bits/ 64 <1516800000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-1651200000 {
+ opp-hz = /bits/ 64 <1651200000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-1708800000 {
+ opp-hz = /bits/ 64 <1708800000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-1804800000 {
+ opp-hz = /bits/ 64 <1804800000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+ };
+
+ cpu6_opp_table: opp-table-cpu6 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-691200000 {
+ opp-hz = /bits/ 64 <691200000>;
+ opp-peak-kBps = <(556800 * 32)>;
+ };
+
+ opp-940800000 {
+ opp-hz = /bits/ 64 <940800000>;
+ opp-peak-kBps = <(921600 * 32)>;
+ };
+
+ opp-1228800000 {
+ opp-hz = /bits/ 64 <1228800000>;
+ opp-peak-kBps = <(1171200 * 32)>;
+ };
+
+ opp-1401600000 {
+ opp-hz = /bits/ 64 <1401600000>;
+ opp-peak-kBps = <(1382400 * 32)>;
+ };
+
+ opp-1516800000 {
+ opp-hz = /bits/ 64 <1516800000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-1651200000 {
+ opp-hz = /bits/ 64 <1651200000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-1804800000 {
+ opp-hz = /bits/ 64 <1804800000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-1900800000 {
+ opp-hz = /bits/ 64 <1900800000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-2054400000 {
+ opp-hz = /bits/ 64 <2054400000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+
+ opp-2208000000 {
+ opp-hz = /bits/ 64 <2208000000>;
+ opp-peak-kBps = <(1497600 * 32)>;
+ };
+ };
+
pmu {
compatible = "arm,armv8-pmuv3";
interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
@@ -359,6 +505,7 @@
CLUSTER_PD: power-domain-cpu-cluster0 {
#power-domain-cells = <0>;
+ power-domains = <&mpm>;
domain-idle-states = <&CLUSTER_SLEEP_0>;
};
};
@@ -494,67 +641,71 @@
};
};
- rpm-glink {
- compatible = "qcom,glink-rpm";
- interrupts-extended = <&ipcc IPCC_CLIENT_AOP
- IPCC_MPROC_SIGNAL_GLINK_QMP
- IRQ_TYPE_EDGE_RISING>;
- qcom,rpm-msg-ram = <&rpm_msg_ram>;
- mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP>;
+ rpm: remoteproc {
+ compatible = "qcom,sm6375-rpm-proc", "qcom,rpm-proc";
- rpm_requests: rpm-requests {
- compatible = "qcom,rpm-sm6375";
- qcom,glink-channels = "rpm_requests";
+ glink-edge {
+ compatible = "qcom,glink-rpm";
+ interrupts-extended = <&ipcc IPCC_CLIENT_AOP
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP>;
- rpmcc: clock-controller {
- compatible = "qcom,rpmcc-sm6375", "qcom,rpmcc";
- clocks = <&xo_board_clk>;
- clock-names = "xo";
- #clock-cells = <1>;
- };
+ rpm_requests: rpm-requests {
+ compatible = "qcom,rpm-sm6375";
+ qcom,glink-channels = "rpm_requests";
- rpmpd: power-controller {
- compatible = "qcom,sm6375-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
+ rpmcc: clock-controller {
+ compatible = "qcom,rpmcc-sm6375", "qcom,rpmcc";
+ clocks = <&xo_board_clk>;
+ clock-names = "xo";
+ #clock-cells = <1>;
+ };
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
+ rpmpd: power-controller {
+ compatible = "qcom,sm6375-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
- rpmpd_opp_ret: opp1 {
- opp-level = <RPM_SMD_LEVEL_RETENTION>;
- };
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
- rpmpd_opp_min_svs: opp2 {
- opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
- };
+ rpmpd_opp_ret: opp1 {
+ opp-level = <RPM_SMD_LEVEL_RETENTION>;
+ };
- rpmpd_opp_low_svs: opp3 {
- opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
- };
+ rpmpd_opp_min_svs: opp2 {
+ opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
+ };
- rpmpd_opp_svs: opp4 {
- opp-level = <RPM_SMD_LEVEL_SVS>;
- };
+ rpmpd_opp_low_svs: opp3 {
+ opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
+ };
- rpmpd_opp_svs_plus: opp5 {
- opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
- };
+ rpmpd_opp_svs: opp4 {
+ opp-level = <RPM_SMD_LEVEL_SVS>;
+ };
- rpmpd_opp_nom: opp6 {
- opp-level = <RPM_SMD_LEVEL_NOM>;
- };
+ rpmpd_opp_svs_plus: opp5 {
+ opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
+ };
- rpmpd_opp_nom_plus: opp7 {
- opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
- };
+ rpmpd_opp_nom: opp6 {
+ opp-level = <RPM_SMD_LEVEL_NOM>;
+ };
- rpmpd_opp_turbo: opp8 {
- opp-level = <RPM_SMD_LEVEL_TURBO>;
- };
+ rpmpd_opp_nom_plus: opp7 {
+ opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
+ };
+
+ rpmpd_opp_turbo: opp8 {
+ opp-level = <RPM_SMD_LEVEL_TURBO>;
+ };
- rpmpd_opp_turbo_no_cpr: opp9 {
- opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
+ rpmpd_opp_turbo_no_cpr: opp9 {
+ opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
+ };
};
};
};
@@ -677,7 +828,7 @@
reg = <0 0x00500000 0 0x800000>;
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
gpio-ranges = <&tlmm 0 0 157>;
- /* TODO: Hook up MPM as wakeup-parent when it's there */
+ wakeup-parent = <&mpm>;
interrupt-controller;
gpio-controller;
#interrupt-cells = <2>;
@@ -765,6 +916,36 @@
drive-strength = <6>;
bias-disable;
};
+
+ qup_uart1_default: qup-uart1-default-state {
+ cts-pins {
+ pins = "gpio61";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ rts-pins {
+ pins = "gpio62";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ tx-pins {
+ pins = "gpio63";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ rx-pins {
+ pins = "gpio64";
+ function = "qup01";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
};
gcc: clock-controller@1400000 {
@@ -799,7 +980,7 @@
<0 0x01c0a000 0 0x26000>;
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
interrupt-names = "periph_irq";
- interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&mpm 86 IRQ_TYPE_LEVEL_HIGH>;
qcom,ee = <0>;
qcom,channel = <0>;
#address-cells = <2>;
@@ -831,8 +1012,15 @@
};
rpm_msg_ram: sram@45f0000 {
- compatible = "qcom,rpm-msg-ram";
+ compatible = "qcom,rpm-msg-ram", "mmio-sram";
reg = <0 0x045f0000 0 0x7000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x0 0x045f0000 0x7000>;
+
+ apss_mpm: sram@1b8 {
+ reg = <0x1b8 0x48>;
+ };
};
sram@4690000 {
@@ -980,6 +1168,19 @@
status = "disabled";
};
+ uart1: serial@4a84000 {
+ compatible = "qcom,geni-uart";
+ reg = <0x0 0x04a84000 0x0 0x4000>;
+ interrupts = <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>;
+ clock-names = "se";
+ power-domains = <&rpmpd SM6375_VDDCX>;
+ operating-points-v2 = <&qup_opp_table>;
+ pinctrl-0 = <&qup_uart1_default>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+
i2c2: i2c@4a88000 {
compatible = "qcom,geni-i2c";
reg = <0x0 0x04a88000 0x0 0x4000>;
@@ -1229,10 +1430,10 @@
<&gcc GCC_USB30_PRIM_MASTER_CLK>;
assigned-clock-rates = <19200000>, <133333333>;
- interrupts = <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
+ <&mpm 12 IRQ_TYPE_LEVEL_HIGH>,
+ <&mpm 93 IRQ_TYPE_EDGE_BOTH>,
+ <&mpm 94 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq",
"ss_phy_irq",
"dm_hs_phy_irq",
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-common.dtsi
new file mode 100644
index 000000000000..e55cd83c19b8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-common.dtsi
@@ -0,0 +1,423 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/firmware/qcom,scm.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm7125.dtsi"
+#include "pm6150.dtsi"
+#include "pm6150l.dtsi"
+
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &rmtfs_mem;
+
+/ {
+ chassis-type = "handset";
+
+ qcom,msm-id = <QCOM_ID_SM7125 0>;
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ framebuffer@9c000000 {
+ compatible = "simple-framebuffer";
+ reg = <0x0 0x9c000000 0x0 (1080 * 2400 * 4)>;
+ width = <1080>;
+ height = <2400>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
+ };
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ key-vol-up {
+ label = "Volume Up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&pm6150l_gpios 2 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ wakeup-source;
+ };
+ };
+
+ reserved-memory {
+ mpss_mem: memory@86000000 {
+ reg = <0x0 0x86000000 0x0 0x8400000>;
+ no-map;
+ };
+
+ venus_mem: memory@8ee00000 {
+ reg = <0x0 0x8ee00000 0x0 0x500000>;
+ no-map;
+ };
+
+ cdsp_mem: memory@8f300000 {
+ reg = <0x0 0x8f300000 0x0 0x1e00000>;
+ no-map;
+ };
+
+ adsp_mem: memory@91100000 {
+ reg = <0x0 0x91100000 0x0 0x2800000>;
+ no-map;
+ };
+
+ wlan_mem: memory@93900000 {
+ reg = <0x0 0x93900000 0x0 0x200000>;
+ no-map;
+ };
+
+ ipa_fw_mem: memory@93b00000 {
+ reg = <0x0 0x93b00000 0x0 0x10000>;
+ no-map;
+ };
+
+ gpu_mem: memory@93b15000 {
+ reg = <0x0 0x93b15000 0x0 0x2000>;
+ no-map;
+ };
+
+ cont_splash_mem: memory@9c000000 {
+ reg = <0x0 0x9c000000 0x0 (1080 * 2400 * 4)>;
+ no-map;
+ };
+
+ pstore_mem: ramoops@9d800000 {
+ compatible = "ramoops";
+ reg = <0x0 0x9d800000 0x0 0x400000>;
+ record-size = <0x80000>;
+ pmsg-size = <0x200000>;
+ console-size = <0x100000>;
+ };
+
+ rmtfs_mem: memory@fa601000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0x0 0xfa601000 0x0 0x200000>;
+ no-map;
+
+ qcom,client-id = <1>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
+ };
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm6150-rpmh-regulators";
+ qcom,pmic-id = "a";
+
+ vreg_s1a_1p1: smps1 {
+ regulator-min-microvolt = <1128000>;
+ regulator-max-microvolt = <1128000>;
+ };
+
+ vreg_s4a_1p0: smps4 {
+ regulator-min-microvolt = <824000>;
+ regulator-max-microvolt = <1120000>;
+ };
+
+ vreg_s5a_2p0: smps5 {
+ regulator-min-microvolt = <1744000>;
+ regulator-max-microvolt = <2040000>;
+ };
+
+ vreg_l1a_1p2: ldo1 {
+ regulator-min-microvolt = <1178000>;
+ regulator-max-microvolt = <1256000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2a_1p0: ldo2 {
+ regulator-min-microvolt = <944000>;
+ regulator-max-microvolt = <1056000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3a_1p0: ldo3 {
+ regulator-min-microvolt = <968000>;
+ regulator-max-microvolt = <1064000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4a_0p88: ldo4 {
+ regulator-min-microvolt = <824000>;
+ regulator-max-microvolt = <928000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5a_2p7: ldo5 {
+ regulator-min-microvolt = <2496000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6a_0p6: ldo6 {
+ regulator-min-microvolt = <568000>;
+ regulator-max-microvolt = <648000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9a_0p664: ldo9 {
+ regulator-min-microvolt = <488000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10a_1p8: ldo10 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1832000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11a_1p8: ldo11 {
+ regulator-min-microvolt = <1696000>;
+ regulator-max-microvolt = <1904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12a_1p8: ldo12 {
+ regulator-min-microvolt = <1696000>;
+ regulator-max-microvolt = <1952000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13a_1p8: ldo13 {
+ regulator-min-microvolt = <1696000>;
+ regulator-max-microvolt = <1904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14a_1p8: ldo14 {
+ regulator-min-microvolt = <1728000>;
+ regulator-max-microvolt = <1832000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15a_1p8: ldo15 {
+ regulator-min-microvolt = <1696000>;
+ regulator-max-microvolt = <1904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16a_2p7: ldo16 {
+ regulator-min-microvolt = <2496000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17a_3p1: ldo17 {
+ regulator-min-microvolt = <2920000>;
+ regulator-max-microvolt = <3232000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18a_3p0: ldo18 {
+ regulator-min-microvolt = <1696000>;
+ regulator-max-microvolt = <1904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l19a_3p0: ldo19 {
+ regulator-min-microvolt = <2696000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm6150l-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vreg_s8c_1p3: smps8 {
+ regulator-min-microvolt = <1120000>;
+ regulator-max-microvolt = <1408000>;
+ };
+
+ vreg_l1c_1p8: ldo1 {
+ regulator-min-microvolt = <1616000>;
+ regulator-max-microvolt = <1984000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_1p3: ldo2 {
+ regulator-min-microvolt = <1168000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_1p23: ldo3 {
+ regulator-min-microvolt = <1144000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4c_1p8: ldo4 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5c_1p8: ldo5 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c_3p0: ldo6 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c_3p0: ldo7 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3312000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c_1p8: ldo8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9c_2p9: ldo9 {
+ regulator-min-microvolt = <2952000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c_3p3: ldo10 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c_3p3: ldo11 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob: bob {
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+ };
+};
+
+&dispcc {
+ /* HACK: disable until a panel driver is ready to retain simplefb */
+ status = "disabled";
+};
+
+&pm6150_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm6150_rtc {
+ status = "okay";
+};
+
+&sdhc_2 {
+ cd-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default","sleep";
+ pinctrl-0 = <&sdc2_on>;
+ pinctrl-1 = <&sdc2_off>;
+ vmmc-supply = <&vreg_l9c_2p9>;
+ vqmmc-supply = <&vreg_l6c_3p0>;
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <34 4>, <59 4>;
+
+ sdc2_on: sdc2-on-state {
+ clk-pins {
+ pins = "sdc2_clk";
+ bias-disable;
+ drive-strength = <16>;
+ };
+
+ cmd-pins {
+ pins = "sdc2_cmd";
+ bias-pull-up;
+ drive-strength = <10>;
+ };
+
+ data-pins {
+ pins = "sdc2_data";
+ bias-pull-up;
+ drive-strength = <10>;
+ };
+
+ sd-cd-pins {
+ pins = "gpio69";
+ function = "gpio";
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+ };
+
+ sdc2_off: sdc2-off-state {
+ clk-pins {
+ pins = "sdc2_clk";
+ bias-disable;
+ drive-strength = <2>;
+ };
+
+ cmd-pins {
+ pins = "sdc2_cmd";
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+
+ data-pins {
+ pins = "sdc2_data";
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+
+ sd-cd-pins {
+ pins = "gpio69";
+ function = "gpio";
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+ };
+};
+
+&usb_1 {
+ qcom,select-utmi-as-pipe-clk;
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+ maximum-speed = "high-speed";
+ status = "okay";
+};
+
+&usb_1_hsphy {
+ vdd-supply = <&vreg_l4a_0p88>;
+ vdda-phy-dpdm-supply = <&vreg_l17a_3p1>;
+ vdda-pll-supply = <&vreg_l11a_1p8>;
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ vdda-phy-supply = <&vreg_l4a_0p88>;
+ vdda-pll-supply = <&vreg_l3c_1p23>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-joyeuse.dts b/sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-joyeuse.dts
new file mode 100644
index 000000000000..e010d1957509
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm7125-xiaomi-joyeuse.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "sm7125-xiaomi-common.dtsi"
+
+/ {
+ model = "Xiaomi Redmi Note 9 Pro (Global)";
+ compatible = "xiaomi,joyeuse", "qcom,sm7125";
+
+ /* required for bootloader to select correct board */
+ qcom,board-id = <0x50022 1>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm7125.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm7125.dtsi
new file mode 100644
index 000000000000..12dd72859a43
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm7125.dtsi
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ */
+
+#include "sc7180.dtsi"
+
+/* SM7125 uses Kryo 465 instead of Kryo 468 */
+&CPU0 { compatible = "qcom,kryo465"; };
+&CPU1 { compatible = "qcom,kryo465"; };
+&CPU2 { compatible = "qcom,kryo465"; };
+&CPU3 { compatible = "qcom,kryo465"; };
+&CPU4 { compatible = "qcom,kryo465"; };
+&CPU5 { compatible = "qcom,kryo465"; };
+&CPU6 { compatible = "qcom,kryo465"; };
+&CPU7 { compatible = "qcom,kryo465"; };
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm7225-fairphone-fp4.dts b/sys/contrib/device-tree/src/arm64/qcom/sm7225-fairphone-fp4.dts
index e3dc49951523..ade619805519 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm7225-fairphone-fp4.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm7225-fairphone-fp4.dts
@@ -5,9 +5,14 @@
/dts-v1/;
+/* PM7250B is configured to use SID2/3 */
+#define PM7250B_SID 2
+#define PM7250B_SID1 3
+
/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
#define PMK8350_SID 6
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/input/input.h>
@@ -75,7 +80,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
};
@@ -386,36 +391,10 @@
};
&i2c10 {
- clock-frequency = <400000>;
- status = "okay";
-
/* PM8008 PMIC @ 8 and 9 */
/* PX8618 @ 26 */
/* SMB1395 PMIC @ 34 */
-
- haptics@5a {
- compatible = "awinic,aw8695";
- reg = <0x5a>;
- interrupts-extended = <&tlmm 85 IRQ_TYPE_EDGE_FALLING>;
- reset-gpios = <&tlmm 90 GPIO_ACTIVE_HIGH>;
-
- awinic,f0-preset = <2350>;
- awinic,f0-coefficient = <260>;
- awinic,f0-calibration-percent = <7>;
- awinic,drive-level = <125>;
-
- awinic,f0-detection-play-time = <5>;
- awinic,f0-detection-wait-time = <3>;
- awinic,f0-detection-repeat = <2>;
- awinic,f0-detection-trace = <15>;
-
- awinic,boost-debug = /bits/ 8 <0x30 0xeb 0xd4>;
- awinic,tset = /bits/ 8 <0x12>;
- awinic,r-spare = /bits/ 8 <0x68>;
-
- awinic,bemf-upper-threshold = <4104>;
- awinic,bemf-lower-threshold = <1016>;
- };
+ /* awinic,aw8695 @ 5a */
};
&ipa {
@@ -476,7 +455,7 @@
};
&pm7250b_adc {
- adc-chan@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
@@ -484,7 +463,7 @@
label = "charger_skin_therm";
};
- adc-chan@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
@@ -516,7 +495,7 @@
};
&pmk8350_vadc {
- adc-chan@644 {
+ channel@644 {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8150-hdk.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8150-hdk.dts
index c0200e7f3f74..de670b407ef1 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8150-hdk.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8150-hdk.dts
@@ -7,6 +7,7 @@
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/usb/pd.h>
#include "sm8150.dtsi"
#include "pm8150.dtsi"
#include "pm8150b.dtsi"
@@ -15,6 +16,7 @@
/ {
model = "Qualcomm Technologies, Inc. SM8150 HDK";
compatible = "qcom,sm8150-hdk", "qcom,sm8150";
+ chassis-type = "embedded";
aliases {
serial0 = &uart2;
@@ -53,6 +55,17 @@
gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
};
};
+
+ hdmi-out {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con: endpoint {
+ remote-endpoint = <&lt9611_out>;
+ };
+ };
+ };
};
&apps_rsc {
@@ -126,8 +139,6 @@
vdda_sp_sensor:
vdda_ufs_2ln_core_1:
vdda_ufs_2ln_core_2:
- vdda_usb_ss_dp_core_1:
- vdda_usb_ss_dp_core_2:
vdda_qlink_lv:
vdda_qlink_lv_ck:
vreg_l5a_0p875: ldo5 {
@@ -209,6 +220,12 @@
regulator-max-microvolt = <3008000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
+
+ vreg_l18a_0p8: ldo18 {
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
};
regulators-1 {
@@ -358,15 +375,210 @@
status = "okay";
};
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
&gpu {
- /*
- * NOTE: "amd,imageon" makes Adreno start in headless mode, remove it
- * after display support is added on this board.
- */
- compatible = "qcom,adreno-640.1", "qcom,adreno", "amd,imageon";
status = "okay";
};
+&i2c4 {
+ clock-frequency = <100000>;
+
+ status = "okay";
+
+ typec-mux@42 {
+ compatible = "fcs,fsa4480";
+ reg = <0x42>;
+
+ interrupts-extended = <&tlmm 152 IRQ_TYPE_LEVEL_LOW>;
+
+ vcc-supply = <&vreg_bob>;
+ mode-switch;
+ orientation-switch;
+
+ port {
+ fsa4480_sbu_mux: endpoint {
+ remote-endpoint = <&pm8150b_typec_sbu_out>;
+ };
+ };
+ };
+};
+
+&i2c9 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ lt9611_codec: hdmi-bridge@3b {
+ compatible = "lontium,lt9611";
+ reg = <0x3b>;
+ #sound-dai-cells = <1>;
+
+ interrupts-extended = <&tlmm 9 IRQ_TYPE_EDGE_FALLING>;
+
+ reset-gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
+
+ vdd-supply = <&vreg_s4a_1p8>;
+ vcc-supply = <&vreg_bob>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&lt9611_irq_pin>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lt9611_a: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ lt9611_b: endpoint {
+ remote-endpoint = <&mdss_dsi1_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ lt9611_out: endpoint {
+ remote-endpoint = <&hdmi_con>;
+ };
+ };
+ };
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dp {
+ status = "okay";
+};
+
+&mdss_dp_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_1_qmpphy_dp_in>;
+};
+
+&mdss_dsi0 {
+ status = "okay";
+ vdda-supply = <&vreg_l3c_1p2>;
+
+ qcom,dual-dsi-mode;
+ qcom,master-dsi;
+
+ ports {
+ port@1 {
+ endpoint {
+ remote-endpoint = <&lt9611_a>;
+ data-lanes = <0 1 2 3>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_phy {
+ status = "okay";
+ vdds-supply = <&vreg_l5a_0p875>;
+};
+
+&mdss_dsi1 {
+ vdda-supply = <&vreg_l3c_1p2>;
+
+ qcom,dual-dsi-mode;
+
+ /* DSI1 is slave, so use DSI0 clocks */
+ assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
+
+ status = "okay";
+
+ ports {
+ port@1 {
+ endpoint {
+ remote-endpoint = <&lt9611_b>;
+ data-lanes = <0 1 2 3>;
+ };
+ };
+ };
+};
+
+&mdss_dsi1_phy {
+ vdds-supply = <&vreg_l5a_0p875>;
+ status = "okay";
+};
+
+&pm8150b_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <3000000>;
+ status = "okay";
+};
+
+&pm8150b_typec {
+ status = "okay";
+
+ vdd-pdphy-supply = <&vreg_l2a_3p1>;
+
+ connector {
+ compatible = "usb-c-connector";
+
+ power-role = "source";
+ data-role = "dual";
+ self-powered;
+
+ source-pdos = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+
+ altmodes {
+ displayport {
+ svid = /bits/ 16 <0xff01>;
+ vdo = <0x00001c46>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ pm8150b_role_switch_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ pm8150b_typec_mux_in: endpoint {
+ remote-endpoint = <&usb_1_qmpphy_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pm8150b_typec_sbu_out: endpoint {
+ remote-endpoint = <&fsa4480_sbu_mux>;
+ };
+ };
+ };
+ };
+};
+
&pon_pwrkey {
status = "okay";
};
@@ -377,6 +589,10 @@
linux,code = <KEY_VOLUMEDOWN>;
};
+&qupv3_id_0 {
+ status = "okay";
+};
+
&qupv3_id_1 {
status = "okay";
};
@@ -401,6 +617,13 @@
&tlmm {
gpio-reserved-ranges = <0 4>, <126 4>;
+
+ lt9611_irq_pin: lt9611-irq-state {
+ pins = "gpio9";
+ function = "gpio";
+ bias-disable;
+ };
+
};
&uart2 {
@@ -444,13 +667,26 @@
&usb_1_qmpphy {
status = "okay";
vdda-phy-supply = <&vreg_l3c_1p2>;
- vdda-pll-supply = <&vdda_usb_ss_dp_core_1>;
+ vdda-pll-supply = <&vreg_l18a_0p8>;
+ orientation-switch;
+};
+
+&usb_1_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp_out>;
+};
+
+&usb_1_qmpphy_out {
+ remote-endpoint = <&pm8150b_typec_mux_in>;
+};
+
+&usb_1_qmpphy_usb_ss_in {
+ remote-endpoint = <&usb_1_dwc3_ss>;
};
&usb_2_qmpphy {
status = "okay";
vdda-phy-supply = <&vreg_l3c_1p2>;
- vdda-pll-supply = <&vdda_usb_ss_dp_core_1>;
+ vdda-pll-supply = <&vreg_l5a_0p875>;
};
&usb_1 {
@@ -462,7 +698,16 @@
};
&usb_1_dwc3 {
- dr_mode = "peripheral";
+ dr_mode = "otg";
+ usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&pm8150b_role_switch_in>;
+};
+
+&usb_1_dwc3_ss {
+ remote-endpoint = <&usb_1_qmpphy_usb_ss_in>;
};
&usb_2_dwc3 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8150-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8150-mtp.dts
index 34ec84916bdd..286350ac7751 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8150-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8150-mtp.dts
@@ -16,6 +16,7 @@
/ {
model = "Qualcomm Technologies, Inc. SM8150 MTP";
compatible = "qcom,sm8150-mtp", "qcom,sm8150";
+ chassis-type = "handset";
aliases {
serial0 = &uart2;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8150-sony-xperia-kumano.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8150-sony-xperia-kumano.dtsi
index baafea53770b..ae0ca48b89a5 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8150-sony-xperia-kumano.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8150-sony-xperia-kumano.dtsi
@@ -222,7 +222,7 @@
reg = <0x0 0xffc00000 0x0 0x100000>;
record-size = <0x1000>;
console-size = <0x40000>;
- msg-size = <0x20000 0x20000>;
+ pmsg-size = <0x20000>;
ecc-size = <16>;
no-map;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi
index b46e55bb8bde..761a6757dc26 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi
@@ -5,7 +5,9 @@
*/
#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/clock/qcom,rpmh.h>
@@ -720,7 +722,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
camera_mem: memory@8b700000 {
@@ -1231,7 +1233,7 @@
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&qup_i2c7_default>;
- interrupts = <GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1822,7 +1824,7 @@
<0x0 0x010ad000 0x0 0x3000>;
};
- pcie0: pci@1c00000 {
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-sm8150";
reg = <0 0x01c00000 0 0x3000>,
<0 0x60000000 0 0xf1d>,
@@ -1873,10 +1875,10 @@
power-domains = <&gcc PCIE_0_GDSC>;
- phys = <&pcie0_lane>;
+ phys = <&pcie0_phy>;
phy-names = "pciephy";
- perst-gpio = <&tlmm 35 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
enable-gpio = <&tlmm 37 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
@@ -1887,14 +1889,22 @@
pcie0_phy: phy@1c06000 {
compatible = "qcom,sm8150-qmp-gen3x1-pcie-phy";
- reg = <0 0x01c06000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c06000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
- <&gcc GCC_PCIE0_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "refgen";
+ <&gcc GCC_PCIE_0_CLKREF_CLK>,
+ <&gcc GCC_PCIE0_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_0_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_0_PHY_BCR>;
reset-names = "phy";
@@ -1903,21 +1913,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie0_lane: phy@1c06200 {
- reg = <0 0x01c06200 0 0x170>, /* tx */
- <0 0x01c06400 0 0x200>, /* rx */
- <0 0x01c06800 0 0x1f0>, /* pcs */
- <0 0x01c06c00 0 0xf4>; /* "pcs_lane" same as pcs_misc? */
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- clock-names = "pipe0";
-
- #phy-cells = <0>;
- clock-output-names = "pcie_0_pipe_clk";
- };
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
compatible = "qcom,pcie-sm8150";
reg = <0 0x01c08000 0 0x3000>,
<0 0x40000000 0 0xf1d>,
@@ -1971,10 +1969,10 @@
power-domains = <&gcc PCIE_1_GDSC>;
- phys = <&pcie1_lane>;
+ phys = <&pcie1_phy>;
phy-names = "pciephy";
- perst-gpio = <&tlmm 102 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
enable-gpio = <&tlmm 104 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
@@ -1985,14 +1983,22 @@
pcie1_phy: phy@1c0e000 {
compatible = "qcom,sm8150-qmp-gen3x2-pcie-phy";
- reg = <0 0x01c0e000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c0e000 0 0x1000>;
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
- <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "refgen";
+ <&gcc GCC_PCIE_1_CLKREF_CLK>,
+ <&gcc GCC_PCIE1_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_1_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
reset-names = "phy";
@@ -2001,20 +2007,6 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie1_lane: phy@1c0e200 {
- reg = <0 0x01c0e200 0 0x170>, /* tx0 */
- <0 0x01c0e400 0 0x200>, /* rx0 */
- <0 0x01c0ea00 0 0x1f0>, /* pcs */
- <0 0x01c0e600 0 0x170>, /* tx1 */
- <0 0x01c0e800 0 0x200>, /* rx1 */
- <0 0x01c0ee00 0 0xf4>; /* "pcs_com" same as pcs_misc? */
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
- clock-names = "pipe0";
-
- #phy-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
- };
};
ufs_mem_hc: ufshc@1d84000 {
@@ -2024,7 +2016,7 @@
<0 0x01d90000 0 0x8000>;
reg-names = "std", "ice";
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
#reset-cells = <1>;
@@ -2069,10 +2061,8 @@
ufs_mem_phy: phy@1d87000 {
compatible = "qcom,sm8150-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
+
clock-names = "ref",
"ref_aux";
clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
@@ -2082,16 +2072,10 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x16c>,
- <0 0x01d87600 0 0x200>,
- <0 0x01d87c00 0 0x200>,
- <0 0x01d87800 0 0x16c>,
- <0 0x01d87a00 0 0x200>;
- #phy-cells = <0>;
- };
+ #phy-cells = <0>;
+
+ status = "disabled";
};
cryptobam: dma-controller@1dc4000 {
@@ -2965,11 +2949,8 @@
};
in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@1 {
- reg = <1>;
+ port {
replicator1_in: endpoint {
remote-endpoint = <&replicator_out1>;
};
@@ -3434,69 +3415,77 @@
resets = <&gcc GCC_QUSB2PHY_SEC_BCR>;
};
- usb_1_qmpphy: phy@88e9000 {
- compatible = "qcom,sm8150-qmp-usb3-phy";
- reg = <0 0x088e9000 0 0x18c>,
- <0 0x088e8000 0 0x10>;
- status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ usb_1_qmpphy: phy@88e8000 {
+ compatible = "qcom,sm8150-qmp-usb3-dp-phy";
+ reg = <0 0x088e8000 0 0x3000>;
clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
- <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_USB3_PRIM_CLKREF_CLK>,
- <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
- clock-names = "aux", "ref_clk_src", "ref", "com_aux";
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "usb3_pipe";
resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>,
<&gcc GCC_USB3_PHY_PRIM_BCR>;
reset-names = "phy", "common";
- usb_1_ssphy: phy@88e9200 {
- reg = <0 0x088e9200 0 0x200>,
- <0 0x088e9400 0 0x200>,
- <0 0x088e9c00 0 0x218>,
- <0 0x088e9600 0 0x200>,
- <0 0x088e9800 0 0x200>,
- <0 0x088e9a00 0 0x100>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_phy_pipe_clk_src";
+ #clock-cells = <1>;
+ #phy-cells = <1>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_1_qmpphy_out: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_1_qmpphy_usb_ss_in: endpoint {
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_1_qmpphy_dp_in: endpoint {
+ };
+ };
};
};
usb_2_qmpphy: phy@88eb000 {
compatible = "qcom,sm8150-qmp-usb3-uni-phy";
- reg = <0 0x088eb000 0 0x200>;
- status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x088eb000 0 0x1000>;
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
- <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_USB3_SEC_CLKREF_CLK>,
- <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
- clock-names = "aux", "ref_clk_src", "ref", "com_aux";
+ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "pipe";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
- resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
- <&gcc GCC_USB3_PHY_SEC_BCR>;
- reset-names = "phy", "common";
+ resets = <&gcc GCC_USB3_PHY_SEC_BCR>,
+ <&gcc GCC_USB3PHY_PHY_SEC_BCR>;
+ reset-names = "phy",
+ "phy_phy";
- usb_2_ssphy: phy@88eb200 {
- reg = <0 0x088eb200 0 0x200>,
- <0 0x088eb400 0 0x200>,
- <0 0x088eb800 0 0x800>,
- <0 0x088eb600 0 0x200>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_uni_phy_pipe_clk_src";
- };
+ status = "disabled";
};
sdhc_2: mmc@8804000 {
@@ -3584,10 +3573,10 @@
<&gcc GCC_USB30_PRIM_MASTER_CLK>;
assigned-clock-rates = <19200000>, <200000000>;
- interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 486 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 488 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 489 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 9 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -3606,8 +3595,27 @@
iommus = <&apps_smmu 0x140 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
+ phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_1_dwc3_hs: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_1_dwc3_ss: endpoint {
+ };
+ };
+ };
};
};
@@ -3637,10 +3645,10 @@
<&gcc GCC_USB30_SEC_MASTER_CLK>;
assigned-clock-rates = <19200000>, <200000000>;
- interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 490 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 491 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 7 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 11 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq", "ss_phy_irq",
"dm_hs_phy_irq", "dp_hs_phy_irq";
@@ -3659,7 +3667,7 @@
iommus = <&apps_smmu 0x160 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
+ phys = <&usb_2_hsphy>, <&usb_2_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -3738,6 +3746,13 @@
remote-endpoint = <&mdss_dsi1_in>;
};
};
+
+ port@2 {
+ reg = <2>;
+ dpu_intf0_out: endpoint {
+ remote-endpoint = <&mdss_dp_in>;
+ };
+ };
};
mdp_opp_table: opp-table {
@@ -3765,6 +3780,86 @@
};
};
+ mdss_dp: displayport-controller@ae90000 {
+ compatible = "qcom,sm8150-dp", "qcom,sm8350-dp";
+ reg = <0 0xae90000 0 0x200>,
+ <0 0xae90200 0 0x200>,
+ <0 0xae90400 0 0x600>,
+ <0 0x0ae90a00 0 0x600>,
+ <0 0x0ae91000 0 0x600>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <12>;
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
+ clock-names = "core_iface",
+ "core_aux",
+ "ctrl_link",
+ "ctrl_link_iface",
+ "stream_pixel";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
+ assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+
+ phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>;
+ phy-names = "dp";
+
+ #sound-dai-cells = <0>;
+
+ operating-points-v2 = <&dp_opp_table>;
+ power-domains = <&rpmhpd SM8250_MMCX>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dp_in: endpoint {
+ remote-endpoint = <&dpu_intf0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dp_out: endpoint {
+ };
+ };
+ };
+
+ dp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-160000000 {
+ opp-hz = /bits/ 64 <160000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-270000000 {
+ opp-hz = /bits/ 64 <270000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-540000000 {
+ opp-hz = /bits/ 64 <540000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-810000000 {
+ opp-hz = /bits/ 64 <810000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
mdss_dsi0: dsi@ae94000 {
compatible = "qcom,sm8150-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
@@ -3840,7 +3935,7 @@
};
mdss_dsi0_phy: phy@ae94400 {
- compatible = "qcom,dsi-phy-7nm";
+ compatible = "qcom,dsi-phy-7nm-8150";
reg = <0 0x0ae94400 0 0x200>,
<0 0x0ae94600 0 0x280>,
<0 0x0ae94900 0 0x260>;
@@ -3914,7 +4009,7 @@
};
mdss_dsi1_phy: phy@ae96400 {
- compatible = "qcom,dsi-phy-7nm";
+ compatible = "qcom,dsi-phy-7nm-8150";
reg = <0 0x0ae96400 0 0x200>,
<0 0x0ae96600 0 0x280>,
<0 0x0ae96900 0 0x260>;
@@ -3941,8 +4036,8 @@
<&mdss_dsi0_phy 1>,
<&mdss_dsi1_phy 0>,
<&mdss_dsi1_phy 1>,
- <0>,
- <0>;
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
clock-names = "bi_tcxo",
"dsi0_phy_pll_out_byteclk",
"dsi0_phy_pll_out_dsiclk",
@@ -3951,6 +4046,7 @@
"dp_phy_pll_link_clk",
"dp_phy_pll_vco_div_clk";
power-domains = <&rpmhpd SM8150_MMCX>;
+ required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
@@ -3958,7 +4054,7 @@
pdc: interrupt-controller@b220000 {
compatible = "qcom,sm8150-pdc", "qcom,pdc";
- reg = <0 0x0b220000 0 0x400>;
+ reg = <0 0x0b220000 0 0x30000>;
qcom,pdc-ranges = <0 480 94>, <94 609 31>,
<125 63 1>;
#interrupt-cells = <2>;
@@ -4189,7 +4285,7 @@
compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
timer@17c20000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-hdk.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8250-hdk.dts
index 0aee7f8658b4..1bbb71e1a4fc 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250-hdk.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-hdk.dts
@@ -14,6 +14,7 @@
/ {
model = "Qualcomm Technologies, Inc. SM8250 HDK";
compatible = "qcom,sm8250-hdk", "qcom,sm8250";
+ chassis-type = "embedded";
aliases {
serial0 = &uart12;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8250-mtp.dts
index 4c9de236676d..7ef99038cb37 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-mtp.dts
@@ -18,6 +18,7 @@
/ {
model = "Qualcomm Technologies, Inc. SM8250 MTP";
compatible = "qcom,sm8250-mtp", "qcom,sm8250";
+ chassis-type = "handset";
aliases {
serial0 = &uart12;
@@ -525,22 +526,25 @@
};
&pm8150_adc {
- xo-therm@4c {
+ channel@4c {
reg = <ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "xo_therm";
};
- skin-therm@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "skin_therm";
};
- pa-therm1@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "pa_therm1";
};
};
@@ -570,10 +574,11 @@
};
&pm8150b_adc {
- conn-therm@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "conn_therm";
};
};
@@ -614,22 +619,25 @@
};
&pm8150l_adc {
- camera-flash-therm@4d {
+ channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "camera_flash_therm";
};
- skin-msm-therm@4e {
+ channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "skin_msm_therm";
};
- pa-therm2@4f {
+ channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
+ label = "pa_therm2";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx203.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx203.dts
index 356a81698731..b70bf9261ba9 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx203.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx203.dts
@@ -14,3 +14,369 @@
};
/delete-node/ &vreg_l7f_1p8;
+
+&i2c5 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ pmic@75 {
+ compatible = "dlg,slg51000";
+ reg = <0x75>;
+ dlg,cs-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+ vin5-supply = <&vreg_s1f_1p2>;
+ vin6-supply = <&vreg_s1f_1p2>;
+
+ pinctrl-0 = <&cam_pwr_b_cs>;
+ pinctrl-names = "default";
+
+ regulators {
+ slg51000_1_ldo1: ldo1 {
+ regulator-name = "slg51000_b_ldo1";
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ slg51000_1_ldo2: ldo2 {
+ regulator-name = "slg51000_b_ldo2";
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ slg51000_1_ldo3: ldo3 {
+ regulator-name = "slg51000_b_ldo3";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+
+ slg51000_1_ldo4: ldo4 {
+ regulator-name = "slg51000_b_ldo4";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+
+ slg51000_1_ldo5: ldo5 {
+ regulator-name = "slg51000_b_ldo5";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ slg51000_1_ldo6: ldo6 {
+ regulator-name = "slg51000_b_ldo6";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ slg51000_1_ldo7: ldo7 {
+ regulator-name = "slg51000_b_ldo7";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+ };
+ };
+};
+
+&i2c15 {
+ pmic@75 {
+ compatible = "dlg,slg51000";
+ reg = <0x75>;
+ dlg,cs-gpios = <&tlmm 71 GPIO_ACTIVE_HIGH>;
+ vin5-supply = <&vreg_l2f_1p3>;
+ vin6-supply = <&vreg_l2f_1p3>;
+
+ pinctrl-0 = <&cam_pwr_a_cs>;
+ pinctrl-names = "default";
+
+ regulators {
+ slg51000_0_ldo1: ldo1 {
+ regulator-name = "slg51000_a_ldo1";
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ slg51000_0_ldo2: ldo2 {
+ regulator-name = "slg51000_a_ldo2";
+ regulator-min-microvolt = <2400000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ slg51000_0_ldo3: ldo3 {
+ regulator-name = "slg51000_a_ldo3";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+
+ slg51000_0_ldo4: ldo4 {
+ regulator-name = "slg51000_a_ldo4";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+
+ slg51000_0_ldo5: ldo5 {
+ regulator-name = "slg51000_a_ldo5";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ slg51000_0_ldo6: ldo6 {
+ regulator-name = "slg51000_a_ldo6";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ slg51000_0_ldo7: ldo7 {
+ regulator-name = "slg51000_a_ldo7";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3750000>;
+ };
+ };
+ };
+};
+
+&pm8009_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "CAM_PWR_LD_EN",
+ "WIDEC_PWR_EN",
+ "NC";
+};
+
+&pm8150_gpios {
+ gpio-line-names = "VOL_DOWN_N", /* GPIO_1 */
+ "OPTION_2",
+ "NC",
+ "PM_SLP_CLK_IN",
+ "OPTION_1",
+ "NC",
+ "NC",
+ "SP_ARI_PWR_ALARM",
+ "NC",
+ "NC"; /* GPIO_10 */
+};
+
+&pm8150b_gpios {
+ gpio-line-names = "SNAPSHOT_N", /* GPIO_1 */
+ "FOCUS_N",
+ "NC",
+ "NC",
+ "RF_LCD_ID_EN",
+ "NC",
+ "NC",
+ "LCD_ID",
+ "NC",
+ "WLC_EN_N", /* GPIO_10 */
+ "NC",
+ "RF_ID";
+};
+
+&pm8150l_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "PM3003A_EN",
+ "NC",
+ "NC",
+ "NC",
+ "AUX2_THERM",
+ "BB_HP_EN",
+ "FP_LDO_EN",
+ "PMX_RESET_N",
+ "AUX3_THERM", /* GPIO_10 */
+ "DTV_PWR_EN",
+ "PM3003A_MODE";
+};
+
+&tlmm {
+ gpio-line-names = "AP_CTI_IN", /* GPIO_0 */
+ "MDM2AP_ERR_FATAL",
+ "AP_CTI_OUT",
+ "MDM2AP_STATUS",
+ "NFC_I2C_SDA",
+ "NFC_I2C_SCL",
+ "NFC_EN",
+ "NFC_CLK_REQ",
+ "NFC_ESE_PWR_REQ",
+ "DVDT_WRT_DET_AND",
+ "SPK_AMP_RESET_N", /* GPIO_10 */
+ "SPK_AMP_INT_N",
+ "APPS_I2C_1_SDA",
+ "APPS_I2C_1_SCL",
+ "NC",
+ "TX_GTR_THRES_IN",
+ "HST_BT_UART_CTS",
+ "HST_BT_UART_RFR",
+ "HST_BT_UART_TX",
+ "HST_BT_UART_RX",
+ "HST_WLAN_EN", /* GPIO_20 */
+ "HST_BT_EN",
+ "RGBC_IR_PWR_EN",
+ "FP_INT_N",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NFC_ESE_SPI_MISO",
+ "NFC_ESE_SPI_MOSI",
+ "NFC_ESE_SPI_SCLK", /* GPIO_30 */
+ "NFC_ESE_SPI_CS_N",
+ "WCD_RST_N",
+ "NC",
+ "SDM_DEBUG_UART_TX",
+ "SDM_DEBUG_UART_RX",
+ "TS_I2C_SDA",
+ "TS_I2C_SCL",
+ "TS_INT_N",
+ "FP_SPI_MISO", /* GPIO_40 */
+ "FP_SPI_MOSI",
+ "FP_SPI_SCLK",
+ "FP_SPI_CS_N",
+ "APPS_I2C_0_SDA",
+ "APPS_I2C_0_SCL",
+ "DISP_ERR_FG",
+ "UIM2_DETECT_EN",
+ "NC",
+ "NC",
+ "NC", /* GPIO_50 */
+ "NC",
+ "MDM_UART_CTS",
+ "MDM_UART_RFR",
+ "MDM_UART_TX",
+ "MDM_UART_RX",
+ "AP2MDM_STATUS",
+ "AP2MDM_ERR_FATAL",
+ "MDM_IPC_HS_UART_TX",
+ "MDM_IPC_HS_UART_RX",
+ "NC", /* GPIO_60 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "USB_CC_DIR",
+ "DISP_VSYNC",
+ "NC",
+ "NC",
+ "CAM_PWR_B_CS",
+ "NC", /* GPIO_70 */
+ "CAM_PWR_A_CS",
+ "SBU_SW_SEL",
+ "SBU_SW_OE",
+ "FP_RESET_N",
+ "FP_RESET_N",
+ "DISP_RESET_N",
+ "DEBUG_GPIO0",
+ "TRAY_DET",
+ "CAM2_RST_N",
+ "PCIE0_RST_N",
+ "PCIE0_CLK_REQ_N", /* GPIO_80 */
+ "PCIE0_WAKE_N",
+ "DVDT_ENABLE",
+ "DVDT_WRT_DET_OR",
+ "NC",
+ "PCIE2_RST_N",
+ "PCIE2_CLK_REQ_N",
+ "PCIE2_WAKE_N",
+ "MDM_VFR_IRQ0",
+ "MDM_VFR_IRQ1",
+ "SW_SERVICE", /* GPIO_90 */
+ "CAM_SOF",
+ "CAM1_RST_N",
+ "CAM0_RST_N",
+ "CAM0_MCLK",
+ "CAM1_MCLK",
+ "CAM2_MCLK",
+ "CAM3_MCLK",
+ "CAM4_MCLK",
+ "TOF_RST_N",
+ "NC", /* GPIO_100 */
+ "CCI0_I2C_SDA",
+ "CCI0_I2C_SCL",
+ "CCI1_I2C_SDA",
+ "CCI1_I2C_SCL_",
+ "CCI2_I2C_SDA",
+ "CCI2_I2C_SCL",
+ "CCI3_I2C_SDA",
+ "CCI3_I2C_SCL",
+ "CAM3_RST_N",
+ "NFC_DWL_REQ", /* GPIO_110 */
+ "NFC_IRQ",
+ "XVS",
+ "NC",
+ "RF_ID_EXTENSION",
+ "SPK_AMP_I2C_SDA",
+ "SPK_AMP_I2C_SCL",
+ "NC",
+ "NC",
+ "WLC_I2C_SDA",
+ "WLC_I2C_SCL", /* GPIO_120 */
+ "ACC_COVER_OPEN",
+ "ALS_PROX_INT_N",
+ "ACCEL_INT",
+ "WLAN_SW_CTRL",
+ "CAMSENSOR_I2C_SDA",
+ "CAMSENSOR_I2C_SCL",
+ "UDON_SWITCH_SEL",
+ "WDOG_DISABLE",
+ "BAROMETER_INT",
+ "NC", /* GPIO_130 */
+ "NC",
+ "FORCED_USB_BOOT",
+ "NC",
+ "NC",
+ "WLC_INT_N",
+ "NC",
+ "NC",
+ "RGBC_IR_INT",
+ "NC",
+ "NC", /* GPIO_140 */
+ "NC",
+ "BT_SLIMBUS_CLK",
+ "BT_SLIMBUS_DATA",
+ "HW_ID_0",
+ "HW_ID_1",
+ "WCD_SWR_TX_CLK",
+ "WCD_SWR_TX_DATA0",
+ "WCD_SWR_TX_DATA1",
+ "WCD_SWR_RX_CLK",
+ "WCD_SWR_RX_DATA0", /* GPIO_150 */
+ "WCD_SWR_RX_DATA1",
+ "SDM_DMIC_CLK1",
+ "SDM_DMIC_DATA1",
+ "SDM_DMIC_CLK2",
+ "SDM_DMIC_DATA2",
+ "SPK_AMP_I2S_CLK",
+ "SPK_AMP_I2S_WS",
+ "SPK_AMP_I2S_ASP_DIN",
+ "SPK_AMP_I2S_ASP_DOUT",
+ "COMPASS_I2C_SDA", /* GPIO_160 */
+ "COMPASS_I2C_SCL",
+ "NC",
+ "NC",
+ "SSC_SPI_1_MISO",
+ "SSC_SPI_1_MOSI",
+ "SSC_SPI_1_CLK",
+ "SSC_SPI_1_CS_N",
+ "NC",
+ "NC",
+ "SSC_SENSOR_I2C_SDA", /* GPIO_170 */
+ "SSC_SENSOR_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "HST_BLE_SNS_UART6_TX",
+ "HST_BLE_SNS_UART6_RX",
+ "HST_WLAN_UART_TX",
+ "HST_WLAN_UART_RX";
+
+ cam_pwr_b_cs: cam-pwr-b-state {
+ pins = "gpio69";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+
+ cam_pwr_a_cs: cam-pwr-a-state {
+ pins = "gpio71";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx206.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx206.dts
index 01fe3974ee72..58a521046f5f 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx206.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo-pdx206.dts
@@ -20,6 +20,8 @@
};
&gpio_keys {
+ pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &g_assist_n>;
+
g-assist-key {
label = "Google Assistant Key";
linux,code = <KEY_LEFTMETA>;
@@ -30,6 +32,247 @@
};
};
+&pm8009_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "NC",
+ "WIDEC_PWR_EN",
+ "NC";
+};
+
+&pm8150_gpios {
+ gpio-line-names = "VOL_DOWN_N", /* GPIO_1 */
+ "OPTION_2",
+ "NC",
+ "PM_SLP_CLK_IN",
+ "OPTION_1",
+ "G_ASSIST_N",
+ "NC",
+ "SP_ARI_PWR_ALARM",
+ "NC",
+ "NC"; /* GPIO_10 */
+
+ g_assist_n: g-assist-n-state {
+ pins = "gpio6";
+ function = "normal";
+ power-source = <1>;
+ bias-pull-up;
+ input-enable;
+ };
+};
+
+&pm8150b_gpios {
+ gpio-line-names = "SNAPSHOT_N", /* GPIO_1 */
+ "FOCUS_N",
+ "NC",
+ "NC",
+ "RF_LCD_ID_EN",
+ "NC",
+ "NC",
+ "LCD_ID",
+ "NC",
+ "NC", /* GPIO_10 */
+ "NC",
+ "RF_ID";
+};
+
+&pm8150l_gpios {
+ gpio-line-names = "NC", /* GPIO_1 */
+ "PM3003A_EN",
+ "NC",
+ "NC",
+ "NC",
+ "AUX2_THERM",
+ "BB_HP_EN",
+ "FP_LDO_EN",
+ "PMX_RESET_N",
+ "NC", /* GPIO_10 */
+ "NC",
+ "PM3003A_MODE";
+};
+
+&tlmm {
+ gpio-line-names = "AP_CTI_IN", /* GPIO_0 */
+ "MDM2AP_ERR_FATAL",
+ "AP_CTI_OUT",
+ "MDM2AP_STATUS",
+ "NFC_I2C_SDA",
+ "NFC_I2C_SCL",
+ "NFC_EN",
+ "NFC_CLK_REQ",
+ "NFC_ESE_PWR_REQ",
+ "DVDT_WRT_DET_AND",
+ "SPK_AMP_RESET_N", /* GPIO_10 */
+ "SPK_AMP_INT_N",
+ "APPS_I2C_1_SDA",
+ "APPS_I2C_1_SCL",
+ "NC",
+ "TX_GTR_THRES_IN",
+ "HST_BT_UART_CTS",
+ "HST_BT_UART_RFR",
+ "HST_BT_UART_TX",
+ "HST_BT_UART_RX",
+ "HST_WLAN_EN", /* GPIO_20 */
+ "HST_BT_EN",
+ "RGBC_IR_PWR_EN",
+ "FP_INT_N",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NFC_ESE_SPI_MISO",
+ "NFC_ESE_SPI_MOSI",
+ "NFC_ESE_SPI_SCLK", /* GPIO_30 */
+ "NFC_ESE_SPI_CS_N",
+ "WCD_RST_N",
+ "NC",
+ "SDM_DEBUG_UART_TX",
+ "SDM_DEBUG_UART_RX",
+ "TS_I2C_SDA",
+ "TS_I2C_SCL",
+ "TS_INT_N",
+ "FP_SPI_MISO", /* GPIO_40 */
+ "FP_SPI_MOSI",
+ "FP_SPI_SCLK",
+ "FP_SPI_CS_N",
+ "APPS_I2C_0_SDA",
+ "APPS_I2C_0_SCL",
+ "DISP_ERR_FG",
+ "UIM2_DETECT_EN",
+ "NC",
+ "NC",
+ "NC", /* GPIO_50 */
+ "NC",
+ "MDM_UART_CTS",
+ "MDM_UART_RFR",
+ "MDM_UART_TX",
+ "MDM_UART_RX",
+ "AP2MDM_STATUS",
+ "AP2MDM_ERR_FATAL",
+ "MDM_IPC_HS_UART_TX",
+ "MDM_IPC_HS_UART_RX",
+ "NC", /* GPIO_60 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "USB_CC_DIR",
+ "DISP_VSYNC",
+ "NC",
+ "NC",
+ "CAM_PWR_B_CS",
+ "NC", /* GPIO_70 */
+ "FRONTC_PWR_EN",
+ "SBU_SW_SEL",
+ "SBU_SW_OE",
+ "FP_RESET_N",
+ "FP_RESET_N",
+ "DISP_RESET_N",
+ "DEBUG_GPIO0",
+ "TRAY_DET",
+ "CAM2_RST_N",
+ "PCIE0_RST_N",
+ "PCIE0_CLK_REQ_N", /* GPIO_80 */
+ "PCIE0_WAKE_N",
+ "DVDT_ENABLE",
+ "DVDT_WRT_DET_OR",
+ "NC",
+ "PCIE2_RST_N",
+ "PCIE2_CLK_REQ_N",
+ "PCIE2_WAKE_N",
+ "MDM_VFR_IRQ0",
+ "MDM_VFR_IRQ1",
+ "SW_SERVICE", /* GPIO_90 */
+ "CAM_SOF",
+ "CAM1_RST_N",
+ "CAM0_RST_N",
+ "CAM0_MCLK",
+ "CAM1_MCLK",
+ "CAM2_MCLK",
+ "CAM3_MCLK",
+ "NC",
+ "NC",
+ "NC", /* GPIO_100 */
+ "CCI0_I2C_SDA",
+ "CCI0_I2C_SCL",
+ "CCI1_I2C_SDA",
+ "CCI1_I2C_SCL_",
+ "CCI2_I2C_SDA",
+ "CCI2_I2C_SCL",
+ "CCI3_I2C_SDA",
+ "CCI3_I2C_SCL",
+ "CAM3_RST_N",
+ "NFC_DWL_REQ", /* GPIO_110 */
+ "NFC_IRQ",
+ "XVS",
+ "NC",
+ "RF_ID_EXTENSION",
+ "SPK_AMP_I2C_SDA",
+ "SPK_AMP_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "ACC_COVER_OPEN",
+ "ALS_PROX_INT_N",
+ "ACCEL_INT",
+ "WLAN_SW_CTRL",
+ "CAMSENSOR_I2C_SDA",
+ "CAMSENSOR_I2C_SCL",
+ "UDON_SWITCH_SEL",
+ "WDOG_DISABLE",
+ "BAROMETER_INT",
+ "NC", /* GPIO_130 */
+ "NC",
+ "FORCED_USB_BOOT",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "RGBC_IR_INT",
+ "NC",
+ "NC", /* GPIO_140 */
+ "NC",
+ "BT_SLIMBUS_CLK",
+ "BT_SLIMBUS_DATA",
+ "HW_ID_0",
+ "HW_ID_1",
+ "WCD_SWR_TX_CLK",
+ "WCD_SWR_TX_DATA0",
+ "WCD_SWR_TX_DATA1",
+ "WCD_SWR_RX_CLK",
+ "WCD_SWR_RX_DATA0", /* GPIO_150 */
+ "WCD_SWR_RX_DATA1",
+ "SDM_DMIC_CLK1",
+ "SDM_DMIC_DATA1",
+ "SDM_DMIC_CLK2",
+ "SDM_DMIC_DATA2",
+ "SPK_AMP_I2S_CLK",
+ "SPK_AMP_I2S_WS",
+ "SPK_AMP_I2S_ASP_DIN",
+ "SPK_AMP_I2S_ASP_DOUT",
+ "COMPASS_I2C_SDA", /* GPIO_160 */
+ "COMPASS_I2C_SCL",
+ "NC",
+ "NC",
+ "SSC_SPI_1_MISO",
+ "SSC_SPI_1_MOSI",
+ "SSC_SPI_1_CLK",
+ "SSC_SPI_1_CS_N",
+ "NC",
+ "NC",
+ "SSC_SENSOR_I2C_SDA", /* GPIO_170 */
+ "SSC_SENSOR_I2C_SCL",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "HST_BLE_SNS_UART6_TX",
+ "HST_BLE_SNS_UART6_RX",
+ "HST_WLAN_UART_TX",
+ "HST_WLAN_UART_RX";
+};
+
&vreg_l2f_1p3 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo.dtsi
index 8ab82bacba81..e07d0311ecb5 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-sony-xperia-edo.dtsi
@@ -18,7 +18,12 @@
qcom,msm-id = <356 0x20001>; /* SM8250 v2.1 */
qcom,board-id = <0x10008 0>;
+ aliases {
+ serial0 = &uart12;
+ };
+
chosen {
+ stdout-path = "serial0:115200n8";
#address-cells = <2>;
#size-cells = <2>;
ranges;
@@ -51,12 +56,26 @@
gpio_keys: gpio-keys {
compatible = "gpio-keys";
- /*
- * Camera focus (light press) and camera snapshot (full press)
- * seem not to work properly.. Adding the former one stalls the CPU
- * and the latter kills the volume down key for whatever reason. In any
- * case, they are both on &pm8150b_gpios: camera focus(2), camera snapshot(1).
- */
+ pinctrl-0 = <&focus_n &snapshot_n &vol_down_n>;
+ pinctrl-names = "default";
+
+ key-camera-focus {
+ label = "Camera Focus";
+ linux,code = <KEY_CAMERA_FOCUS>;
+ gpios = <&pm8150b_gpios 2 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ wakeup-source;
+ };
+
+ key-camera-snapshot {
+ label = "Camera Snapshot";
+ linux,code = <KEY_CAMERA>;
+ gpios = <&pm8150b_gpios 1 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ wakeup-source;
+ };
key-vol-down {
label = "Volume Down";
@@ -112,7 +131,7 @@
reg = <0x0 0xffc00000 0x0 0x100000>;
record-size = <0x1000>;
console-size = <0x40000>;
- msg-size = <0x20000 0x20000>;
+ pmsg-size = <0x20000>;
ecc-size = <16>;
no-map;
};
@@ -486,13 +505,6 @@
};
};
-&i2c5 {
- status = "okay";
- clock-frequency = <400000>;
-
- /* Dialog SLG51000 CMIC @ 75 */
-};
-
&i2c9 {
status = "okay";
clock-frequency = <400000>;
@@ -551,6 +563,34 @@
vdda-pll-supply = <&vreg_l9a_1p2>;
};
+&pm8150_gpios {
+ vol_down_n: vol-down-n-state {
+ pins = "gpio1";
+ function = "normal";
+ power-source = <0>;
+ bias-pull-up;
+ input-enable;
+ };
+};
+
+&pm8150b_gpios {
+ snapshot_n: snapshot-n-state {
+ pins = "gpio1";
+ function = "normal";
+ power-source = <0>;
+ bias-pull-up;
+ input-enable;
+ };
+
+ focus_n: focus-n-state {
+ pins = "gpio2";
+ function = "normal";
+ power-source = <0>;
+ bias-pull-up;
+ input-enable;
+ };
+};
+
&pon_pwrkey {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-elish-common.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-elish-common.dtsi
index b841ea9192ae..946365f15a59 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -6,6 +6,7 @@
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/usb/pd.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
#include "pm8150b.dtsi"
@@ -23,7 +24,7 @@
/delete-node/ &xbl_aop_mem;
/ {
- classis-type = "tablet";
+ chassis-type = "tablet";
/* required for bootloader to select correct board */
qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
@@ -114,7 +115,7 @@
};
reserved-memory {
- xbl_aop_mem: xbl-aop@80700000 {
+ xbl_aop_mem: xbl-aop@80600000 {
reg = <0x0 0x80600000 0x0 0x260000>;
no-map;
};
@@ -565,7 +566,7 @@
};
};
- port@1{
+ port@1 {
reg = <1>;
panel_in_1: endpoint {
@@ -627,6 +628,41 @@
};
};
+&pm8150b_typec {
+ vdd-pdphy-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+
+ power-role = "source";
+ data-role = "dual";
+ self-powered;
+
+ source-pdos = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pm8150b_role_switch_in: endpoint {
+ remote-endpoint = <&usb_1_role_switch_out>;
+ };
+ };
+ };
+ };
+};
+
+&pm8150b_vbus {
+ status = "okay";
+};
+
&pon_pwrkey {
status = "okay";
};
@@ -664,11 +700,12 @@
};
&usb_1_dwc3 {
- dr_mode = "peripheral";
+ dr_mode = "otg";
maximum-speed = "high-speed";
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
+ usb-role-switch;
};
&usb_1_hsphy {
@@ -678,6 +715,10 @@
status = "okay";
};
+&usb_1_role_switch_out {
+ remote-endpoint = <&pm8150b_role_switch_in>;
+};
+
&ufs_mem_hc {
vcc-supply = <&vreg_l17a_3p0>;
vcc-max-microamp = <800000>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-pipa.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-pipa.dts
new file mode 100644
index 000000000000..86e1f7fd1c20
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250-xiaomi-pipa.dts
@@ -0,0 +1,623 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/*
+ * Copyright (c) 2023 Luka Panio <lukapanio@gmail.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+#include "pm8009.dtsi"
+
+/*
+ * Delete following upstream (sm8250.dtsi) reserved
+ * memory mappings which are different on this device.
+ */
+/delete-node/ &adsp_mem;
+/delete-node/ &cdsp_secure_heap;
+/delete-node/ &slpi_mem;
+/delete-node/ &spss_mem;
+/delete-node/ &xbl_aop_mem;
+
+/ {
+
+ model = "Xiaomi Pad 6";
+ compatible = "xiaomi,pipa", "qcom,sm8250";
+
+ chassis-type = "tablet";
+
+ /* required for bootloader to select correct board */
+ qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
+ qcom,board-id = <0x34 0>;
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ framebuffer: framebuffer@9c000000 {
+ compatible = "simple-framebuffer";
+ reg = <0x0 0x9c000000 0x0 0x2300000>;
+ width = <1800>;
+ height = <2880>;
+ stride = <(1800 * 4)>;
+ format = "a8r8g8b8";
+ };
+ };
+
+ battery_l: battery-l {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3870000>;
+ energy-full-design-microwatt-hours = <16700000>;
+ charge-full-design-microamp-hours = <4420000>;
+ };
+
+ battery_r: battery-r {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3870000>;
+ energy-full-design-microwatt-hours = <16700000>;
+ charge-full-design-microamp-hours = <4420000>;
+ };
+
+ bl_vddpos_5p5: bl-vddpos-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "bl_vddpos_5p5";
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ regulator-enable-ramp-delay = <233>;
+ gpio = <&tlmm 130 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ };
+
+ bl_vddneg_5p5: bl-vddneg-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "bl_vddneg_5p5";
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ regulator-enable-ramp-delay = <233>;
+ gpio = <&tlmm 131 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&vol_up_n>;
+ pinctrl-names = "default";
+
+ key-vol-up {
+ label = "Volume Up";
+ gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ wakeup-source;
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
+
+ /* S6c is really ebi.lvl but it's there for supply map completeness sake. */
+ vreg_s6c_0p88: smpc6-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vreg_s6c_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-always-on;
+ vin-supply = <&vph_pwr>;
+ };
+
+ reserved-memory {
+ xbl_aop_mem: xbl-aop@80700000 {
+ reg = <0x0 0x80600000 0x0 0x260000>;
+ no-map;
+ };
+
+ slpi_mem: slpi@88c00000 {
+ reg = <0x0 0x88c00000 0x0 0x2f00000>;
+ no-map;
+ };
+
+ adsp_mem: adsp@8bb00000 {
+ reg = <0x0 0x8bb00000 0x0 0x2500000>;
+ no-map;
+ };
+
+ spss_mem: spss@8e000000 {
+ reg = <0x0 0x8e000000 0x0 0x100000>;
+ no-map;
+ };
+
+ cdsp_secure_heap: cdsp-secure-heap@8e100000 {
+ reg = <0x0 0x8e100000 0x0 0x4600000>;
+ no-map;
+ };
+
+ cont_splash_mem: cont-splash@9c000000 {
+ reg = <0x0 0x9c000000 0x0 0x2300000>;
+ no-map;
+ };
+
+ ramoops@b0000000 {
+ compatible = "ramoops";
+ reg = <0x0 0xb0000000 0x0 0x400000>;
+ record-size = <0x1000>;
+ console-size = <0x200000>;
+ ecc-size = <16>;
+ no-map;
+ };
+ };
+};
+
+&adsp {
+ firmware-name = "qcom/sm8250/xiaomi/pipa/adsp.mbn";
+ status = "okay";
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8150-rpmh-regulators";
+ qcom,pmic-id = "a";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-s9-supply = <&vph_pwr>;
+ vdd-s10-supply = <&vph_pwr>;
+ vdd-l1-l8-l11-supply = <&vreg_s6c_0p88>;
+ vdd-l2-l10-supply = <&vreg_bob>;
+ vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
+ vdd-l6-l9-supply = <&vreg_s8c_1p35>;
+ vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
+ vdd-l13-l16-l17-supply = <&vreg_bob>;
+
+ /* (S1+S2+S3) - cx.lvl (ARC) */
+
+ vreg_s4a_1p8: smps4 {
+ regulator-name = "vreg_s4a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s5a_1p9: smps5 {
+ regulator-name = "vreg_s5a_1p9";
+ regulator-min-microvolt = <1900000>;
+ regulator-max-microvolt = <2040000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s6a_0p95: smps6 {
+ regulator-name = "vreg_s6a_0p95";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1128000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2a_3p1: ldo2 {
+ regulator-name = "vreg_l2a_3p1";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3a_0p9: ldo3 {
+ regulator-name = "vreg_l3a_0p9";
+ regulator-min-microvolt = <928000>;
+ regulator-max-microvolt = <932000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L4 - lmx.lvl (ARC) */
+
+ vreg_l5a_0p88: ldo5 {
+ regulator-name = "vreg_l5a_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6a_1p2: ldo6 {
+ regulator-name = "vreg_l6a_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L7 is unused. */
+
+ vreg_l9a_1p2: ldo9 {
+ regulator-name = "vreg_l9a_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L10 is unused, L11 - lcx.lvl (ARC) */
+
+ vreg_l12a_1p8: ldo12 {
+ regulator-name = "vreg_l12a_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L13 is unused. */
+
+ vreg_l14a_1p88: ldo14 {
+ regulator-name = "vreg_l14a_1p88";
+ regulator-min-microvolt = <1880000>;
+ regulator-max-microvolt = <1880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L15 & L16 are unused. */
+
+ vreg_l17a_3p0: ldo17 {
+ regulator-name = "vreg_l17a_3p0";
+ regulator-min-microvolt = <2496000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18a_0p9: ldo18 {
+ regulator-name = "vreg_l18a_0p9";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8150l-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+ vdd-s7-supply = <&vph_pwr>;
+ vdd-s8-supply = <&vph_pwr>;
+ vdd-l1-l8-supply = <&vreg_s4a_1p8>;
+ vdd-l2-l3-supply = <&vreg_s8c_1p35>;
+ vdd-l4-l5-l6-supply = <&vreg_bob>;
+ vdd-l7-l11-supply = <&vreg_bob>;
+ vdd-l9-l10-supply = <&vreg_bob>;
+ vdd-bob-supply = <&vph_pwr>;
+
+ vreg_bob: bob {
+ regulator-name = "vreg_bob";
+ regulator-min-microvolt = <3350000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
+
+ /*
+ * S1-S6 are ARCs:
+ * (S1+S2) - gfx.lvl,
+ * S3 - mx.lvl,
+ * (S4+S5) - mmcx.lvl,
+ * S6 - ebi.lvl
+ */
+
+ vreg_s7c_0p35: smps7 {
+ regulator-name = "vreg_s7c_0p35";
+ regulator-min-microvolt = <348000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s8c_1p35: smps8 {
+ regulator-name = "vreg_s8c_1p35";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1c_1p8: ldo1 {
+ regulator-name = "vreg_l1c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L2-4 are unused. */
+
+ vreg_l5c_1p8: ldo5 {
+ regulator-name = "vreg_l5c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6c_2p9: ldo6 {
+ regulator-name = "vreg_l6c_2p9";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7c_2p85: ldo7 {
+ regulator-name = "vreg_l7c_2p85";
+ regulator-min-microvolt = <2856000>;
+ regulator-max-microvolt = <3104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8c_1p8: ldo8 {
+ regulator-name = "vreg_l8c_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9c_2p9: ldo9 {
+ regulator-name = "vreg_l9c_2p9";
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10c_3p3: ldo10 {
+ regulator-name = "vreg_l10c_3p3";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3312000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11c_3p0: ldo11 {
+ regulator-name = "vreg_l11c_3p0";
+ regulator-min-microvolt = <3104000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pm8009-rpmh-regulators";
+ qcom,pmic-id = "f";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vreg_bob>;
+ vdd-l2-supply = <&vreg_s8c_1p35>;
+ vdd-l5-l6-supply = <&vreg_bob>;
+ vdd-l7-supply = <&vreg_s4a_1p8>;
+
+ vreg_s1f_1p2: smps1 {
+ regulator-name = "vreg_s1f_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s2f_0p5: smps2 {
+ regulator-name = "vreg_s2f_0p5";
+ regulator-min-microvolt = <512000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L1 is unused. */
+
+ vreg_l2f_1p3: ldo2 {
+ regulator-name = "vreg_l2f_1p3";
+ regulator-min-microvolt = <1056000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ /* L3 & L4 are unused. */
+
+ vreg_l5f_2p8: ldo5 {
+ regulator-name = "vreg_l5f_2p85";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6f_2p8: ldo6 {
+ regulator-name = "vreg_l6f_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7f_1p8: ldo7 {
+ regulator-name = "vreg_l7f_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&cdsp {
+ firmware-name = "qcom/sm8250/xiaomi/pipa/cdsp.mbn";
+ status = "okay";
+};
+
+&gmu {
+ status = "okay";
+};
+
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
+&gpi_dma2 {
+ status = "okay";
+};
+
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ memory-region = <&gpu_mem>;
+ firmware-name = "qcom/sm8250/xiaomi/pipa/a650_zap.mbn";
+ };
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ fuel-gauge@55 {
+ compatible = "ti,bq27z561";
+ reg = <0x55>;
+ monitored-battery = <&battery_r>;
+ };
+};
+
+&i2c11 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ backlight: backlight@11 {
+ compatible = "kinetic,ktz8866";
+ reg = <0x11>;
+ vddpos-supply = <&bl_vddpos_5p5>;
+ vddneg-supply = <&bl_vddneg_5p5>;
+ enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>;
+ current-num-sinks = <5>;
+ kinetic,current-ramp-delay-ms = <128>;
+ kinetic,led-enable-ramp-delay-ms = <1>;
+ kinetic,enable-lcd-bias;
+ };
+};
+
+&i2c13 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ fuel-gauge@55 {
+ compatible = "ti,bq27z561";
+ reg = <0x55>;
+ monitored-battery = <&battery_l>;
+ };
+};
+
+&pcie0 {
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&pm8150_gpios {
+ vol_up_n: vol-up-n-state {
+ pins = "gpio6";
+ function = "normal";
+ power-source = <1>;
+ input-enable;
+ bias-pull-up;
+ };
+};
+
+&pon_pwrkey {
+ status = "okay";
+};
+
+&pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&qupv3_id_2 {
+ status = "okay";
+};
+
+&slpi {
+ firmware-name = "qcom/sm8250/xiaomi/pipa/slpi.mbn";
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ status = "okay";
+ vdda-phy-supply = <&vreg_l9a_1p2>;
+ vdda-pll-supply = <&vreg_l18a_0p9>;
+};
+
+&ufs_mem_hc {
+ vcc-supply = <&vreg_l17a_3p0>;
+ vcc-max-microamp = <800000>;
+ vccq-supply = <&vreg_l6a_1p2>;
+ vccq-max-microamp = <800000>;
+ vccq2-supply = <&vreg_s4a_1p8>;
+ vccq2-max-microamp = <800000>;
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l5a_0p88>;
+ vdda-pll-supply = <&vreg_l9a_1p2>;
+ status = "okay";
+};
+
+&venus {
+ firmware-name = "qcom/sm8250/xiaomi/pipa/venus.mbn";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi
index 1efa07f2caff..760501c1301a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi
@@ -15,7 +15,9 @@
#include <dt-bindings/interconnect/qcom,osm-l3.h>
#include <dt-bindings/interconnect/qcom,sm8250.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
#include <dt-bindings/soc/qcom,apr.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/sound/qcom,q6afe.h>
@@ -100,7 +102,7 @@
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
capacity-dmips-mhz = <448>;
- dynamic-power-coefficient = <205>;
+ dynamic-power-coefficient = <105>;
next-level-cache = <&L2_0>;
power-domains = <&CPU_PD0>;
power-domain-names = "psci";
@@ -131,7 +133,7 @@
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
capacity-dmips-mhz = <448>;
- dynamic-power-coefficient = <205>;
+ dynamic-power-coefficient = <105>;
next-level-cache = <&L2_100>;
power-domains = <&CPU_PD1>;
power-domain-names = "psci";
@@ -156,7 +158,7 @@
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
capacity-dmips-mhz = <448>;
- dynamic-power-coefficient = <205>;
+ dynamic-power-coefficient = <105>;
next-level-cache = <&L2_200>;
power-domains = <&CPU_PD2>;
power-domain-names = "psci";
@@ -181,7 +183,7 @@
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
capacity-dmips-mhz = <448>;
- dynamic-power-coefficient = <205>;
+ dynamic-power-coefficient = <105>;
next-level-cache = <&L2_300>;
power-domains = <&CPU_PD3>;
power-domain-names = "psci";
@@ -370,6 +372,12 @@
};
};
+ qup_virt: interconnect-qup-virt {
+ compatible = "qcom,sm8250-qup-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
cpu0_opp_table: opp-table-cpu0 {
compatible = "operating-points-v2";
opp-shared;
@@ -663,6 +671,7 @@
firmware {
scm: scm {
compatible = "qcom,scm-sm8250", "qcom,scm";
+ qcom,dload-mode = <&tcsr 0x13000>;
#reset-cells = <1>;
};
};
@@ -1022,6 +1031,13 @@
dmas = <&gpi_dma2 0 0 QCOM_GPI_I2C>,
<&gpi_dma2 1 0 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1036,8 +1052,14 @@
dmas = <&gpi_dma2 0 0 QCOM_GPI_SPI>,
<&gpi_dma2 1 0 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1054,6 +1076,13 @@
dmas = <&gpi_dma2 0 1 QCOM_GPI_I2C>,
<&gpi_dma2 1 1 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1068,8 +1097,14 @@
dmas = <&gpi_dma2 0 1 QCOM_GPI_SPI>,
<&gpi_dma2 1 1 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1086,6 +1121,13 @@
dmas = <&gpi_dma2 0 2 QCOM_GPI_I2C>,
<&gpi_dma2 1 2 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1100,8 +1142,14 @@
dmas = <&gpi_dma2 0 2 QCOM_GPI_SPI>,
<&gpi_dma2 1 2 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1118,6 +1166,13 @@
dmas = <&gpi_dma2 0 3 QCOM_GPI_I2C>,
<&gpi_dma2 1 3 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1132,8 +1187,14 @@
dmas = <&gpi_dma2 0 3 QCOM_GPI_SPI>,
<&gpi_dma2 1 3 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1147,8 +1208,12 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart17_default>;
interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1163,6 +1228,13 @@
dmas = <&gpi_dma2 0 4 QCOM_GPI_I2C>,
<&gpi_dma2 1 4 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1177,8 +1249,14 @@
dmas = <&gpi_dma2 0 4 QCOM_GPI_SPI>,
<&gpi_dma2 1 4 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1192,8 +1270,12 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart18_default>;
interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1208,6 +1290,13 @@
dmas = <&gpi_dma2 0 5 QCOM_GPI_I2C>,
<&gpi_dma2 1 5 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1222,8 +1311,14 @@
dmas = <&gpi_dma2 0 5 QCOM_GPI_SPI>,
<&gpi_dma2 1 5 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_2 0 &qup_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_2 0>,
+ <&aggre1_noc MASTER_QUP_2 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1276,6 +1371,13 @@
dmas = <&gpi_dma0 0 0 QCOM_GPI_I2C>,
<&gpi_dma0 1 0 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1290,8 +1392,14 @@
dmas = <&gpi_dma0 0 0 QCOM_GPI_SPI>,
<&gpi_dma0 1 0 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1308,6 +1416,13 @@
dmas = <&gpi_dma0 0 1 QCOM_GPI_I2C>,
<&gpi_dma0 1 1 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1322,8 +1437,14 @@
dmas = <&gpi_dma0 0 1 QCOM_GPI_SPI>,
<&gpi_dma0 1 1 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1340,6 +1461,13 @@
dmas = <&gpi_dma0 0 2 QCOM_GPI_I2C>,
<&gpi_dma0 1 2 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1354,8 +1482,14 @@
dmas = <&gpi_dma0 0 2 QCOM_GPI_SPI>,
<&gpi_dma0 1 2 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1369,8 +1503,12 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart2_default>;
interrupts = <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1385,6 +1523,13 @@
dmas = <&gpi_dma0 0 3 QCOM_GPI_I2C>,
<&gpi_dma0 1 3 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1399,8 +1544,14 @@
dmas = <&gpi_dma0 0 3 QCOM_GPI_SPI>,
<&gpi_dma0 1 3 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1417,6 +1568,13 @@
dmas = <&gpi_dma0 0 4 QCOM_GPI_I2C>,
<&gpi_dma0 1 4 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1431,8 +1589,14 @@
dmas = <&gpi_dma0 0 4 QCOM_GPI_SPI>,
<&gpi_dma0 1 4 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1449,6 +1613,13 @@
dmas = <&gpi_dma0 0 5 QCOM_GPI_I2C>,
<&gpi_dma0 1 5 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1463,8 +1634,14 @@
dmas = <&gpi_dma0 0 5 QCOM_GPI_SPI>,
<&gpi_dma0 1 5 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1481,6 +1658,13 @@
dmas = <&gpi_dma0 0 6 QCOM_GPI_I2C>,
<&gpi_dma0 1 6 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1495,8 +1679,14 @@
dmas = <&gpi_dma0 0 6 QCOM_GPI_SPI>,
<&gpi_dma0 1 6 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1510,8 +1700,12 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart6_default>;
interrupts = <GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1526,6 +1720,13 @@
dmas = <&gpi_dma0 0 7 QCOM_GPI_I2C>,
<&gpi_dma0 1 7 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1540,8 +1741,14 @@
dmas = <&gpi_dma0 0 7 QCOM_GPI_SPI>,
<&gpi_dma0 1 7 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>,
+ <&aggre2_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1591,6 +1798,13 @@
dmas = <&gpi_dma1 0 0 QCOM_GPI_I2C>,
<&gpi_dma1 1 0 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1605,8 +1819,14 @@
dmas = <&gpi_dma1 0 0 QCOM_GPI_SPI>,
<&gpi_dma1 1 0 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1623,6 +1843,13 @@
dmas = <&gpi_dma1 0 1 QCOM_GPI_I2C>,
<&gpi_dma1 1 1 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1637,8 +1864,14 @@
dmas = <&gpi_dma1 0 1 QCOM_GPI_SPI>,
<&gpi_dma1 1 1 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1655,6 +1888,13 @@
dmas = <&gpi_dma1 0 2 QCOM_GPI_I2C>,
<&gpi_dma1 1 2 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1669,8 +1909,14 @@
dmas = <&gpi_dma1 0 2 QCOM_GPI_SPI>,
<&gpi_dma1 1 2 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1687,6 +1933,13 @@
dmas = <&gpi_dma1 0 3 QCOM_GPI_I2C>,
<&gpi_dma1 1 3 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1701,8 +1954,14 @@
dmas = <&gpi_dma1 0 3 QCOM_GPI_SPI>,
<&gpi_dma1 1 3 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1719,6 +1978,13 @@
dmas = <&gpi_dma1 0 4 QCOM_GPI_I2C>,
<&gpi_dma1 1 4 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1733,8 +1999,14 @@
dmas = <&gpi_dma1 0 4 QCOM_GPI_SPI>,
<&gpi_dma1 1 4 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1748,8 +2020,12 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart12_default>;
interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>;
+ interconnect-names = "qup-core",
+ "qup-config";
status = "disabled";
};
@@ -1764,6 +2040,13 @@
dmas = <&gpi_dma1 0 5 QCOM_GPI_I2C>,
<&gpi_dma1 1 5 QCOM_GPI_I2C>;
dma-names = "tx", "rx";
+ power-domains = <&rpmhpd SM8250_CX>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1778,8 +2061,14 @@
dmas = <&gpi_dma1 0 5 QCOM_GPI_SPI>,
<&gpi_dma1 1 5 QCOM_GPI_SPI>;
dma-names = "tx", "rx";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table>;
+ interconnects = <&qup_virt MASTER_QUP_CORE_1 0 &qup_virt SLAVE_QUP_CORE_1 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_1 0>,
+ <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI_CH0 0>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1835,7 +2124,7 @@
qcom,bcm-voters = <&apps_bcm_voter>;
};
- pcie0: pci@1c00000 {
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-sm8250";
reg = <0 0x01c00000 0 0x3000>,
<0 0x60000000 0 0xf1d>,
@@ -1897,7 +2186,7 @@
power-domains = <&gcc PCIE_0_GDSC>;
- phys = <&pcie0_lane>;
+ phys = <&pcie0_phy>;
phy-names = "pciephy";
perst-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>;
@@ -1905,21 +2194,30 @@
pinctrl-names = "default";
pinctrl-0 = <&pcie0_default_state>;
+ dma-coherent;
status = "disabled";
};
pcie0_phy: phy@1c06000 {
compatible = "qcom,sm8250-qmp-gen3x1-pcie-phy";
- reg = <0 0x01c06000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c06000 0 0x1000>;
+
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
<&gcc GCC_PCIE_WIFI_CLKREF_EN>,
- <&gcc GCC_PCIE0_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE0_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_0_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_0_PHY_BCR>;
reset-names = "phy";
@@ -1928,23 +2226,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie0_lane: phy@1c06200 {
- reg = <0 0x01c06200 0 0x170>, /* tx */
- <0 0x01c06400 0 0x200>, /* rx */
- <0 0x01c06800 0 0x1f0>, /* pcs */
- <0 0x01c06c00 0 0xf4>; /* "pcs_lane" same as pcs_misc? */
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- clock-names = "pipe0";
-
- #phy-cells = <0>;
-
- #clock-cells = <0>;
- clock-output-names = "pcie_0_pipe_clk";
- };
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
compatible = "qcom,pcie-sm8250";
reg = <0 0x01c08000 0 0x3000>,
<0 0x40000000 0 0xf1d>,
@@ -2003,7 +2287,7 @@
power-domains = <&gcc PCIE_1_GDSC>;
- phys = <&pcie1_lane>;
+ phys = <&pcie1_phy>;
phy-names = "pciephy";
perst-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>;
@@ -2011,21 +2295,30 @@
pinctrl-names = "default";
pinctrl-0 = <&pcie1_default_state>;
+ dma-coherent;
status = "disabled";
};
pcie1_phy: phy@1c0e000 {
compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy";
- reg = <0 0x01c0e000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c0e000 0 0x1000>;
+
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
<&gcc GCC_PCIE_WIGIG_CLKREF_EN>,
- <&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE1_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_1_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
reset-names = "phy";
@@ -2034,25 +2327,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie1_lane: phy@1c0e200 {
- reg = <0 0x01c0e200 0 0x170>, /* tx0 */
- <0 0x01c0e400 0 0x200>, /* rx0 */
- <0 0x01c0ea00 0 0x1f0>, /* pcs */
- <0 0x01c0e600 0 0x170>, /* tx1 */
- <0 0x01c0e800 0 0x200>, /* rx1 */
- <0 0x01c0ee00 0 0xf4>; /* "pcs_com" same as pcs_misc? */
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
- clock-names = "pipe0";
-
- #phy-cells = <0>;
-
- #clock-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
- };
};
- pcie2: pci@1c10000 {
+ pcie2: pcie@1c10000 {
compatible = "qcom,pcie-sm8250";
reg = <0 0x01c10000 0 0x3000>,
<0 0x64000000 0 0xf1d>,
@@ -2111,7 +2388,7 @@
power-domains = <&gcc PCIE_2_GDSC>;
- phys = <&pcie2_lane>;
+ phys = <&pcie2_phy>;
phy-names = "pciephy";
perst-gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
@@ -2119,21 +2396,30 @@
pinctrl-names = "default";
pinctrl-0 = <&pcie2_default_state>;
+ dma-coherent;
status = "disabled";
};
pcie2_phy: phy@1c16000 {
compatible = "qcom,sm8250-qmp-modem-pcie-phy";
- reg = <0 0x01c16000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c16000 0 0x1000>;
+
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
<&gcc GCC_PCIE_2_CFG_AHB_CLK>,
<&gcc GCC_PCIE_MDM_CLKREF_EN>,
- <&gcc GCC_PCIE2_PHY_REFGEN_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE2_PHY_REFGEN_CLK>,
+ <&gcc GCC_PCIE_2_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "refgen",
+ "pipe";
+
+ clock-output-names = "pcie_2_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_2_PHY_BCR>;
reset-names = "phy";
@@ -2142,22 +2428,6 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie2_lane: phy@1c16200 {
- reg = <0 0x01c16200 0 0x170>, /* tx0 */
- <0 0x01c16400 0 0x200>, /* rx0 */
- <0 0x01c16a00 0 0x1f0>, /* pcs */
- <0 0x01c16600 0 0x170>, /* tx1 */
- <0 0x01c16800 0 0x200>, /* rx1 */
- <0 0x01c16e00 0 0xf4>; /* "pcs_com" same as pcs_misc? */
- clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
- clock-names = "pipe0";
-
- #phy-cells = <0>;
-
- #clock-cells = <0>;
- clock-output-names = "pcie_2_pipe_clk";
- };
};
ufs_mem_hc: ufshc@1d84000 {
@@ -2165,7 +2435,7 @@
"jedec,ufs-2.0";
reg = <0 0x01d84000 0 0x3000>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
#reset-cells = <1>;
@@ -2194,25 +2464,48 @@
<&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
<&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
<&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
- freq-table-hz =
- <37500000 300000000>,
- <0 0>,
- <0 0>,
- <37500000 300000000>,
- <0 0>,
- <0 0>,
- <0 0>,
- <0 0>;
+
+ operating-points-v2 = <&ufs_opp_table>;
+
+ interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI_CH0 0>,
+ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_UFS_MEM_CFG 0>;
+ interconnect-names = "ufs-ddr", "cpu-ufs";
status = "disabled";
+
+ ufs_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-37500000 {
+ opp-hz = /bits/ 64 <37500000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <37500000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <300000000>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>,
+ /bits/ 64 <0>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
};
ufs_mem_phy: phy@1d87000 {
compatible = "qcom,sm8250-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x1c0>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
+
clock-names = "ref",
"ref_aux";
clocks = <&rpmhcc RPMH_CXO_CLK>,
@@ -2220,16 +2513,10 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x16c>,
- <0 0x01d87600 0 0x200>,
- <0 0x01d87c00 0 0x200>,
- <0 0x01d87800 0 0x16c>,
- <0 0x01d87a00 0 0x200>;
- #phy-cells = <0>;
- };
+ #phy-cells = <0>;
+
+ status = "disabled";
};
cryptobam: dma-controller@1dc4000 {
@@ -2270,6 +2557,11 @@
#hwlock-cells = <1>;
};
+ tcsr: syscon@1fc0000 {
+ compatible = "qcom,sm8250-tcsr", "syscon";
+ reg = <0x0 0x1fc0000 0x0 0x30000>;
+ };
+
wsamacro: codec@3240000 {
compatible = "qcom,sm8250-lpass-wsa-macro";
reg = <0 0x03240000 0 0x1000>;
@@ -2292,7 +2584,7 @@
status = "disabled";
};
- swr0: soundwire-controller@3250000 {
+ swr0: soundwire@3250000 {
reg = <0 0x03250000 0 0x2000>;
compatible = "qcom,soundwire-v1.5.1";
interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>;
@@ -2358,7 +2650,7 @@
#sound-dai-cells = <1>;
};
- swr1: soundwire-controller@3210000 {
+ swr1: soundwire@3210000 {
reg = <0 0x03210000 0 0x2000>;
compatible = "qcom,soundwire-v1.5.1";
status = "disabled";
@@ -2405,7 +2697,7 @@
};
/* tx macro */
- swr2: soundwire-controller@3230000 {
+ swr2: soundwire@3230000 {
reg = <0 0x03230000 0 0x2000>;
compatible = "qcom,soundwire-v1.5.1";
interrupts = <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>;
@@ -2726,6 +3018,7 @@
clock-names = "ahb", "bus", "iface";
power-domains = <&gpucc GPU_CX_GDSC>;
+ dma-coherent;
};
slpi: remoteproc@5c00000 {
@@ -2743,8 +3036,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8250_LCX>,
- <&rpmhpd SM8250_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
memory-region = <&slpi_mem>;
@@ -2821,11 +3114,8 @@
clock-names = "apb_pclk";
out-ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
+ port {
tpda_out_funnel_qatb: endpoint {
remote-endpoint = <&funnel_qatb_in_tpda>;
};
@@ -2868,11 +3158,7 @@
};
in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
+ port {
funnel_qatb_in_tpda: endpoint {
remote-endpoint = <&tpda_out_funnel_qatb>;
};
@@ -3059,7 +3345,7 @@
port@7 {
reg = <7>;
funnel_swao_in_funnel_merg: endpoint {
- remote-endpoint= <&funnel_merg_out_funnel_swao>;
+ remote-endpoint = <&funnel_merg_out_funnel_swao>;
};
};
};
@@ -3081,11 +3367,8 @@
};
in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
+ port {
etf_in_funnel_swao_out: endpoint {
remote-endpoint = <&funnel_swao_out_etf>;
};
@@ -3169,8 +3452,6 @@
clock-names = "apb_pclk";
out-ports {
- #address-cells = <1>;
- #size-cells = <0>;
port {
tpdm_mm_out_tpda9: endpoint {
remote-endpoint = <&tpda_9_in_tpdm_mm>;
@@ -3436,11 +3717,7 @@
};
in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
+ port {
funnel_apss_merg_in_funnel_apss: endpoint {
remote-endpoint = <&funnel_apss_out_funnel_apss_merg>;
};
@@ -3463,7 +3740,7 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
memory-region = <&cdsp_mem>;
@@ -3571,78 +3848,70 @@
resets = <&gcc GCC_QUSB2PHY_SEC_BCR>;
};
- usb_1_qmpphy: phy@88e9000 {
+ usb_1_qmpphy: phy@88e8000 {
compatible = "qcom,sm8250-qmp-usb3-dp-phy";
- reg = <0 0x088e9000 0 0x200>,
- <0 0x088e8000 0 0x40>,
- <0 0x088ea000 0 0x200>;
+ reg = <0 0x088e8000 0 0x3000>;
status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
<&rpmhcc RPMH_CXO_CLK>,
- <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
- clock-names = "aux", "ref_clk_src", "com_aux";
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "usb3_pipe";
resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>,
<&gcc GCC_USB3_PHY_PRIM_BCR>;
reset-names = "phy", "common";
- usb_1_ssphy: usb3-phy@88e9200 {
- reg = <0 0x088e9200 0 0x200>,
- <0 0x088e9400 0 0x200>,
- <0 0x088e9c00 0 0x400>,
- <0 0x088e9600 0 0x200>,
- <0 0x088e9800 0 0x200>,
- <0 0x088e9a00 0 0x100>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_phy_pipe_clk_src";
- };
+ #clock-cells = <1>;
+ #phy-cells = <1>;
- dp_phy: dp-phy@88ea200 {
- reg = <0 0x088ea200 0 0x200>,
- <0 0x088ea400 0 0x200>,
- <0 0x088eaa00 0 0x200>,
- <0 0x088ea600 0 0x200>,
- <0 0x088ea800 0 0x200>;
- #phy-cells = <0>;
- #clock-cells = <1>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ usb_1_qmpphy_out: endpoint {};
+ };
+
+ port@1 {
+ reg = <1>;
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_1_qmpphy_dp_in: endpoint {};
+ };
};
};
usb_2_qmpphy: phy@88eb000 {
compatible = "qcom,sm8250-qmp-usb3-uni-phy";
- reg = <0 0x088eb000 0 0x200>;
- status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x088eb000 0 0x1000>;
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
- <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_USB3_SEC_CLKREF_EN>,
- <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
- clock-names = "aux", "ref_clk_src", "ref", "com_aux";
+ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "pipe";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
- resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
- <&gcc GCC_USB3_PHY_SEC_BCR>;
- reset-names = "phy", "common";
+ resets = <&gcc GCC_USB3_PHY_SEC_BCR>,
+ <&gcc GCC_USB3PHY_PHY_SEC_BCR>;
+ reset-names = "phy",
+ "phy_phy";
- usb_2_ssphy: phy@88eb200 {
- reg = <0 0x088eb200 0 0x200>,
- <0 0x088eb400 0 0x200>,
- <0 0x088eb800 0 0x800>;
- #clock-cells = <0>;
- #phy-cells = <0>;
- clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_uni_phy_pipe_clk_src";
- };
+ status = "disabled";
};
sdhc_2: mmc@8804000 {
@@ -3660,7 +3929,7 @@
iommus = <&apps_smmu 0x4a0 0x0>;
qcom,dll-config = <0x0007642c>;
qcom,ddr-config = <0x80040868>;
- power-domains = <&rpmhpd SM8250_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&sdhc2_opp_table>;
status = "disabled";
@@ -3690,6 +3959,128 @@
};
};
+ pmu@9091000 {
+ compatible = "qcom,sm8250-llcc-bwmon", "qcom,sc7280-llcc-bwmon";
+ reg = <0 0x09091000 0 0x1000>;
+
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+
+ interconnects = <&mc_virt MASTER_LLCC 3 &mc_virt SLAVE_EBI_CH0 3>;
+
+ operating-points-v2 = <&llcc_bwmon_opp_table>;
+
+ llcc_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-800000 {
+ opp-peak-kBps = <(200 * 4 * 1000)>;
+ };
+
+ opp-1200000 {
+ opp-peak-kBps = <(300 * 4 * 1000)>;
+ };
+
+ opp-1804000 {
+ opp-peak-kBps = <(451 * 4 * 1000)>;
+ };
+
+ opp-2188000 {
+ opp-peak-kBps = <(547 * 4 * 1000)>;
+ };
+
+ opp-2724000 {
+ opp-peak-kBps = <(681 * 4 * 1000)>;
+ };
+
+ opp-3072000 {
+ opp-peak-kBps = <(768 * 4 * 1000)>;
+ };
+
+ opp-4068000 {
+ opp-peak-kBps = <(1017 * 4 * 1000)>;
+ };
+
+ /* 1353 MHz, LPDDR4X */
+
+ opp-6220000 {
+ opp-peak-kBps = <(1555 * 4 * 1000)>;
+ };
+
+ opp-7216000 {
+ opp-peak-kBps = <(1804 * 4 * 1000)>;
+ };
+
+ opp-8368000 {
+ opp-peak-kBps = <(2092 * 4 * 1000)>;
+ };
+
+ /* LPDDR5 */
+ opp-10944000 {
+ opp-peak-kBps = <(2736 * 4 * 1000)>;
+ };
+ };
+ };
+
+ pmu@90b6400 {
+ compatible = "qcom,sm8250-cpu-bwmon", "qcom,sdm845-bwmon";
+ reg = <0 0x090b6400 0 0x600>;
+
+ interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
+
+ interconnects = <&gem_noc MASTER_AMPSS_M0 3 &gem_noc SLAVE_LLCC 3>;
+ operating-points-v2 = <&cpu_bwmon_opp_table>;
+
+ cpu_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-800000 {
+ opp-peak-kBps = <(200 * 4 * 1000)>;
+ };
+
+ opp-1804000 {
+ opp-peak-kBps = <(451 * 4 * 1000)>;
+ };
+
+ opp-2188000 {
+ opp-peak-kBps = <(547 * 4 * 1000)>;
+ };
+
+ opp-2724000 {
+ opp-peak-kBps = <(681 * 4 * 1000)>;
+ };
+
+ opp-3072000 {
+ opp-peak-kBps = <(768 * 4 * 1000)>;
+ };
+
+ /* 1017MHz, 1353 MHz, LPDDR4X */
+
+ opp-6220000 {
+ opp-peak-kBps = <(1555 * 4 * 1000)>;
+ };
+
+ opp-6832000 {
+ opp-peak-kBps = <(1708 * 4 * 1000)>;
+ };
+
+ opp-8368000 {
+ opp-peak-kBps = <(2092 * 4 * 1000)>;
+ };
+
+ /* 2133MHz, LPDDR4X */
+
+ /* LPDDR5 */
+ opp-10944000 {
+ opp-peak-kBps = <(2736 * 4 * 1000)>;
+ };
+
+ /* LPDDR5 */
+ opp-12784000 {
+ opp-peak-kBps = <(3196 * 4 * 1000)>;
+ };
+ };
+ };
+
dc_noc: interconnect@90c0000 {
compatible = "qcom,sm8250-dc-noc";
reg = <0 0x090c0000 0 0x4200>;
@@ -3747,6 +4138,7 @@
"dp_hs_phy_irq";
power-domains = <&gcc USB30_PRIM_GDSC>;
+ wakeup-source;
resets = <&gcc GCC_USB30_PRIM_BCR>;
@@ -3761,8 +4153,12 @@
iommus = <&apps_smmu 0x0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
+ phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
+
+ port {
+ usb_1_role_switch_out: endpoint {};
+ };
};
};
@@ -3811,6 +4207,7 @@
"dp_hs_phy_irq";
power-domains = <&gcc USB30_SEC_GDSC>;
+ wakeup-source;
resets = <&gcc GCC_USB30_SEC_BCR>;
@@ -3825,7 +4222,7 @@
iommus = <&apps_smmu 0x20 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
+ phys = <&usb_2_hsphy>, <&usb_2_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -3836,7 +4233,7 @@
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&videocc MVS0C_GDSC>,
<&videocc MVS0_GDSC>,
- <&rpmhpd SM8250_MX>;
+ <&rpmhpd RPMHPD_MX>;
power-domain-names = "venus", "vcodec0", "mx";
operating-points-v2 = <&venus_opp_table>;
@@ -3897,7 +4294,7 @@
clocks = <&gcc GCC_VIDEO_AHB_CLK>,
<&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
clock-names = "iface", "bi_tcxo", "bi_tcxo_ao";
#clock-cells = <1>;
@@ -4177,7 +4574,7 @@
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
clock-names = "iface", "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
status = "disabled";
#clock-cells = <1>;
@@ -4230,7 +4627,7 @@
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
@@ -4252,6 +4649,14 @@
remote-endpoint = <&mdss_dsi1_in>;
};
};
+
+ port@2 {
+ reg = <2>;
+
+ dpu_intf0_out: endpoint {
+ remote-endpoint = <&mdss_dp_in>;
+ };
+ };
};
mdp_opp_table: opp-table {
@@ -4279,6 +4684,85 @@
};
};
+ mdss_dp: displayport-controller@ae90000 {
+ compatible = "qcom,sm8250-dp", "qcom,sm8350-dp";
+ reg = <0 0xae90000 0 0x200>,
+ <0 0xae90200 0 0x200>,
+ <0 0xae90400 0 0x600>,
+ <0 0xae91000 0 0x400>,
+ <0 0xae91400 0 0x400>;
+ interrupt-parent = <&mdss>;
+ interrupts = <12>;
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
+ clock-names = "core_iface",
+ "core_aux",
+ "ctrl_link",
+ "ctrl_link_iface",
+ "stream_pixel";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
+ assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+
+ phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>;
+ phy-names = "dp";
+
+ #sound-dai-cells = <0>;
+
+ operating-points-v2 = <&dp_opp_table>;
+ power-domains = <&rpmhpd SM8250_MMCX>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dp_in: endpoint {
+ remote-endpoint = <&dpu_intf0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dp_out: endpoint {
+ };
+ };
+ };
+
+ dp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-160000000 {
+ opp-hz = /bits/ 64 <160000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-270000000 {
+ opp-hz = /bits/ 64 <270000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-540000000 {
+ opp-hz = /bits/ 64 <540000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-810000000 {
+ opp-hz = /bits/ 64 <810000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
mdss_dsi0: dsi@ae94000 {
compatible = "qcom,sm8250-dsi-ctrl",
"qcom,mdss-dsi-ctrl";
@@ -4305,7 +4789,7 @@
assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi0_phy>;
@@ -4397,7 +4881,7 @@
assigned-clock-parents = <&mdss_dsi1_phy 0>, <&mdss_dsi1_phy 1>;
operating-points-v2 = <&dsi_opp_table>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi1_phy>;
@@ -4448,15 +4932,15 @@
dispcc: clock-controller@af00000 {
compatible = "qcom,sm8250-dispcc";
reg = <0 0x0af00000 0 0x10000>;
- power-domains = <&rpmhpd SM8250_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&mdss_dsi0_phy 0>,
<&mdss_dsi0_phy 1>,
<&mdss_dsi1_phy 0>,
<&mdss_dsi1_phy 1>,
- <&dp_phy 0>,
- <&dp_phy 1>;
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
clock-names = "bi_tcxo",
"dsi0_phy_pll_out_byteclk",
"dsi0_phy_pll_out_dsiclk",
@@ -5298,104 +5782,105 @@
reg = <0 0x15000000 0 0x100000>;
#iommu-cells = <2>;
#global-interrupts = <2>;
- interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>;
+ dma-coherent;
};
adsp: remoteproc@17300000 {
@@ -5413,8 +5898,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8250_LCX>,
- <&rpmhpd SM8250_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
memory-region = <&adsp_mem>;
@@ -5532,7 +6017,7 @@
compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};
timer@17c20000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8350-hdk.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8350-hdk.dts
index 61dd9663fabe..b43d264ed42b 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8350-hdk.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8350-hdk.dts
@@ -7,10 +7,17 @@
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sm8350.dtsi"
+#include "pm8350.dtsi"
+#include "pm8350b.dtsi"
+#include "pm8350c.dtsi"
+#include "pmk8350.dtsi"
+#include "pmr735a.dtsi"
+#include "pmr735b.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SM8350 HDK";
compatible = "qcom,sm8350-hdk", "qcom,sm8350";
+ chassis-type = "embedded";
aliases {
serial0 = &uart2;
@@ -292,6 +299,81 @@
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
};
+
+ regulators-2 {
+ compatible = "qcom,pmr735a-rpmh-regulators";
+ qcom,pmic-id = "e";
+
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+
+ vdd-l1-l2-supply = <&vreg_s2e_0p85>;
+ vdd-l3-supply = <&vreg_s1e_1p25>;
+ vdd-l4-supply = <&vreg_s1c_1p86>;
+ vdd-l5-l6-supply = <&vreg_s1c_1p86>;
+ vdd-l7-bob-supply = <&vreg_bob>;
+
+ vreg_s1e_1p25: smps1 {
+ regulator-name = "vreg_s1e_1p25";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1280000>;
+ };
+
+ vreg_s2e_0p85: smps2 {
+ regulator-name = "vreg_s2e_0p85";
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <976000>;
+ };
+
+ vreg_s3e_2p20: smps3 {
+ regulator-name = "vreg_s3e_2p20";
+ regulator-min-microvolt = <2200000>;
+ regulator-max-microvolt = <2352000>;
+ };
+
+ vreg_l1e_0p9: ldo1 {
+ regulator-name = "vreg_l1e_0p9";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <912000>;
+ };
+
+ vreg_l2e_1p2: ldo2 {
+ regulator-name = "vreg_l2e_0p8";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ vreg_l3e_1p2: ldo3 {
+ regulator-name = "vreg_l3e_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ vreg_l4e_1p7: ldo4 {
+ regulator-name = "vreg_l4e_1p7";
+ regulator-min-microvolt = <1776000>;
+ regulator-max-microvolt = <1872000>;
+ };
+
+ vreg_l5e_0p8: ldo5 {
+ regulator-name = "vreg_l5e_0p8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ };
+
+ vreg_l6e_0p8: ldo6 {
+ regulator-name = "vreg_l6e_0p8";
+ regulator-min-microvolt = <480000>;
+ regulator-max-microvolt = <904000>;
+ };
+
+ vreg_l7e_2p8: ldo7 {
+ regulator-name = "vreg_l7e_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+ };
};
&cdsp {
@@ -348,18 +430,10 @@
vcc-supply = <&vreg_bob>;
mode-switch;
orientation-switch;
- svid = /bits/ 16 <0xff01>;
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
-
- fsa4480_sbu_mux: endpoint {
- remote-endpoint = <&pmic_glink_sbu>;
- };
+ port {
+ fsa4480_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_sbu>;
};
};
};
@@ -474,6 +548,18 @@
status = "okay";
};
+&sdhc_2 {
+ cd-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
+ pinctrl-1 = <&sdc2_sleep_state &sdc2_card_det_n>;
+ vmmc-supply = <&vreg_l9c_2p96>;
+ vqmmc-supply = <&vreg_l6c_1p8>;
+ no-sdio;
+ no-mmc;
+ status = "okay";
+};
+
&slpi {
status = "okay";
firmware-name = "qcom/sm8350/slpi.mbn";
@@ -732,6 +818,13 @@
bias-pull-up;
};
};
+
+ sdc2_card_det_n: sd-card-det-n-state {
+ pins = "gpio92";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
};
&uart2 {
@@ -747,6 +840,7 @@
vcc-max-microamp = <800000>;
vccq-supply = <&vreg_l9b_1p2>;
vccq-max-microamp = <900000>;
+ vdd-hba-supply = <&vreg_l9b_1p2>;
};
&ufs_mem_phy {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8350-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8350-mtp.dts
index d21d2aacf201..8bee57f3b25a 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8350-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8350-mtp.dts
@@ -17,6 +17,7 @@
/ {
model = "Qualcomm Technologies, Inc. sm8350 MTP";
compatible = "qcom,sm8350-mtp", "qcom,sm8350";
+ chassis-type = "handset";
aliases {
serial0 = &uart2;
@@ -324,6 +325,7 @@
vcc-max-microamp = <800000>;
vccq-supply = <&vreg_l9b_1p2>;
vccq-max-microamp = <900000>;
+ vdd-hba-supply = <&vreg_l9b_1p2>;
};
&ufs_mem_phy {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi
index ec451c616f3e..e78c83a897c2 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi
@@ -10,12 +10,16 @@
#include <dt-bindings/clock/qcom,gpucc-sm8350.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interconnect/qcom,sm8350.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
#include <dt-bindings/phy/phy-qcom-qmp.h>
#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
+#include <dt-bindings/soc/qcom,apr.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/thermal/thermal.h>
#include <dt-bindings/interconnect/qcom,sm8350.h>
@@ -48,7 +52,7 @@
CPU0: cpu@0 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a55";
reg = <0x0 0x0>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
@@ -72,7 +76,7 @@
CPU1: cpu@100 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a55";
reg = <0x0 0x100>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
@@ -91,7 +95,7 @@
CPU2: cpu@200 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a55";
reg = <0x0 0x200>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
@@ -110,7 +114,7 @@
CPU3: cpu@300 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a55";
reg = <0x0 0x300>;
clocks = <&cpufreq_hw 0>;
enable-method = "psci";
@@ -129,7 +133,7 @@
CPU4: cpu@400 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a78";
reg = <0x0 0x400>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
@@ -148,7 +152,7 @@
CPU5: cpu@500 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a78";
reg = <0x0 0x500>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
@@ -167,7 +171,7 @@
CPU6: cpu@600 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-a78";
reg = <0x0 0x600>;
clocks = <&cpufreq_hw 1>;
enable-method = "psci";
@@ -186,7 +190,7 @@
CPU7: cpu@700 {
device_type = "cpu";
- compatible = "qcom,kryo685";
+ compatible = "arm,cortex-x1";
reg = <0x0 0x700>;
clocks = <&cpufreq_hw 2>;
enable-method = "psci";
@@ -246,8 +250,8 @@
compatible = "arm,idle-state";
idle-state-name = "silver-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
- entry-latency-us = <355>;
- exit-latency-us = <909>;
+ entry-latency-us = <360>;
+ exit-latency-us = <531>;
min-residency-us = <3934>;
local-timer-stop;
};
@@ -256,15 +260,23 @@
compatible = "arm,idle-state";
idle-state-name = "gold-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
- entry-latency-us = <241>;
- exit-latency-us = <1461>;
+ entry-latency-us = <702>;
+ exit-latency-us = <1061>;
min-residency-us = <4488>;
local-timer-stop;
};
};
domain-idle-states {
- CLUSTER_SLEEP_0: cluster-sleep-0 {
+ CLUSTER_SLEEP_APSS_OFF: cluster-sleep-0 {
+ compatible = "domain-idle-state";
+ arm,psci-suspend-param = <0x41000044>;
+ entry-latency-us = <2752>;
+ exit-latency-us = <3048>;
+ min-residency-us = <6118>;
+ };
+
+ CLUSTER_SLEEP_AOSS_SLEEP: cluster-sleep-1 {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x4100c344>;
entry-latency-us = <3263>;
@@ -277,6 +289,7 @@
firmware {
scm: scm {
compatible = "qcom,scm-sm8350", "qcom,scm";
+ qcom,dload-mode = <&tcsr 0x13000>;
#reset-cells = <1>;
};
};
@@ -346,7 +359,7 @@
CLUSTER_PD: power-domain-cpu-cluster0 {
#power-domain-cells = <0>;
- domain-idle-states = <&CLUSTER_SLEEP_0>;
+ domain-idle-states = <&CLUSTER_SLEEP_APSS_OFF &CLUSTER_SLEEP_AOSS_SLEEP>;
};
};
@@ -492,7 +505,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
hyp_reserved_mem: memory@d0000000 {
@@ -665,9 +678,9 @@
<0>,
<0>,
<0>,
- <&ufs_mem_phy_lanes 0>,
- <&ufs_mem_phy_lanes 1>,
- <&ufs_mem_phy_lanes 2>,
+ <&ufs_mem_phy 0>,
+ <&ufs_mem_phy 1>,
+ <&ufs_mem_phy 2>,
<&usb_1_qmpphy QMP_USB43DP_USB3_PIPE_CLK>,
<0>;
};
@@ -737,7 +750,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>;
interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_120mhz>;
dmas = <&gpi_dma2 0 0 QCOM_GPI_SPI>,
<&gpi_dma2 1 0 QCOM_GPI_SPI>;
@@ -769,7 +782,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>;
interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_120mhz>;
dmas = <&gpi_dma2 0 1 QCOM_GPI_SPI>,
<&gpi_dma2 1 1 QCOM_GPI_SPI>;
@@ -801,7 +814,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>;
interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma2 0 2 QCOM_GPI_SPI>,
<&gpi_dma2 1 2 QCOM_GPI_SPI>;
@@ -833,7 +846,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>;
interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma2 0 3 QCOM_GPI_SPI>,
<&gpi_dma2 1 3 QCOM_GPI_SPI>;
@@ -851,7 +864,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>;
interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma2 0 4 QCOM_GPI_SPI>,
<&gpi_dma2 1 4 QCOM_GPI_SPI>;
@@ -869,7 +882,7 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart18_default>;
interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
status = "disabled";
};
@@ -896,7 +909,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>;
interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma2 0 5 QCOM_GPI_SPI>,
<&gpi_dma2 1 5 QCOM_GPI_SPI>;
@@ -907,9 +920,9 @@
};
};
- gpi_dma0: dma-controller@9800000 {
+ gpi_dma0: dma-controller@900000 {
compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma";
- reg = <0 0x09800000 0 0x60000>;
+ reg = <0 0x00900000 0 0x60000>;
interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,
@@ -963,7 +976,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 0 QCOM_GPI_SPI>,
<&gpi_dma0 1 0 QCOM_GPI_SPI>;
@@ -995,7 +1008,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>;
interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 1 QCOM_GPI_SPI>,
<&gpi_dma0 1 1 QCOM_GPI_SPI>;
@@ -1027,7 +1040,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>;
interrupts = <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 2 QCOM_GPI_SPI>,
<&gpi_dma0 1 2 QCOM_GPI_SPI>;
@@ -1045,7 +1058,7 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart3_default_state>;
interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
status = "disabled";
};
@@ -1058,7 +1071,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 3 QCOM_GPI_SPI>,
<&gpi_dma0 1 3 QCOM_GPI_SPI>;
@@ -1090,7 +1103,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>;
interrupts = <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 4 QCOM_GPI_SPI>,
<&gpi_dma0 1 4 QCOM_GPI_SPI>;
@@ -1122,7 +1135,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>;
interrupts = <GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 5 QCOM_GPI_SPI>,
<&gpi_dma0 1 5 QCOM_GPI_SPI>;
@@ -1154,7 +1167,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>;
interrupts = <GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 6 QCOM_GPI_SPI>,
<&gpi_dma0 1 6 QCOM_GPI_SPI>;
@@ -1172,7 +1185,7 @@
pinctrl-names = "default";
pinctrl-0 = <&qup_uart6_default>;
interrupts = <GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
status = "disabled";
};
@@ -1199,7 +1212,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>;
interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma0 0 7 QCOM_GPI_SPI>,
<&gpi_dma0 1 7 QCOM_GPI_SPI>;
@@ -1266,7 +1279,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>;
interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_120mhz>;
dmas = <&gpi_dma1 0 0 QCOM_GPI_SPI>,
<&gpi_dma1 1 0 QCOM_GPI_SPI>;
@@ -1298,7 +1311,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma1 0 1 QCOM_GPI_SPI>,
<&gpi_dma1 1 1 QCOM_GPI_SPI>;
@@ -1330,7 +1343,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma1 0 2 QCOM_GPI_SPI>,
<&gpi_dma1 1 2 QCOM_GPI_SPI>;
@@ -1362,7 +1375,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>;
interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma1 0 3 QCOM_GPI_SPI>,
<&gpi_dma1 1 3 QCOM_GPI_SPI>;
@@ -1394,7 +1407,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma1 0 4 QCOM_GPI_SPI>,
<&gpi_dma1 1 4 QCOM_GPI_SPI>;
@@ -1426,7 +1439,7 @@
clock-names = "se";
clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>;
interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
dmas = <&gpi_dma1 0 5 QCOM_GPI_SPI>,
<&gpi_dma1 1 5 QCOM_GPI_SPI>;
@@ -1486,7 +1499,7 @@
qcom,bcm-voters = <&apps_bcm_voter>;
};
- pcie0: pci@1c00000 {
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-sm8350";
reg = <0 0x01c00000 0 0x3000>,
<0 0x60000000 0 0xf1d>,
@@ -1579,7 +1592,7 @@
status = "disabled";
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
compatible = "qcom,pcie-sm8350";
reg = <0 0x01c08000 0 0x3000>,
<0 0x40000000 0 0xf1d>,
@@ -1667,7 +1680,7 @@
"jedec,ufs-2.0";
reg = <0 0x01d84000 0 0x3000>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
#reset-cells = <1>;
@@ -1711,10 +1724,8 @@
ufs_mem_phy: phy@1d87000 {
compatible = "qcom,sm8350-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x1c4>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
+
clock-names = "ref",
"ref_aux";
clocks = <&rpmhcc RPMH_CXO_CLK>,
@@ -1722,17 +1733,11 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
- status = "disabled";
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x188>,
- <0 0x01d87600 0 0x200>,
- <0 0x01d87c00 0 0x200>,
- <0 0x01d87800 0 0x188>,
- <0 0x01d87a00 0 0x200>;
- #clock-cells = <1>;
- #phy-cells = <0>;
- };
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
};
cryptobam: dma-controller@1dc4000 {
@@ -1806,6 +1811,25 @@
#hwlock-cells = <1>;
};
+ tcsr: syscon@1fc0000 {
+ compatible = "qcom,sm8350-tcsr", "syscon";
+ reg = <0x0 0x1fc0000 0x0 0x30000>;
+ };
+
+ lpass_tlmm: pinctrl@33c0000 {
+ compatible = "qcom,sm8350-lpass-lpi-pinctrl";
+ reg = <0 0x033c0000 0 0x20000>,
+ <0 0x03550000 0 0x10000>;
+
+ clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "core", "audio";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&lpass_tlmm 0 0 15>;
+ };
+
gpu: gpu@3d00000 {
compatible = "qcom,adreno-660.1", "qcom,adreno";
@@ -1995,7 +2019,7 @@
compatible = "qcom,sm8350-mpss-pas";
reg = <0x0 0x04080000 0x0 0x4040>;
- interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
+ interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
<&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
<&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>,
<&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -2007,8 +2031,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8350_CX>,
- <&rpmhpd SM8350_MSS>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MSS>;
power-domain-names = "cx", "mss";
interconnects = <&mc_virt MASTER_LLCC 0 &mc_virt SLAVE_EBI1 0>;
@@ -2037,7 +2061,7 @@
compatible = "qcom,sm8350-slpi-pas";
reg = <0 0x05c00000 0 0x4000>;
- interrupts-extended = <&pdc 9 IRQ_TYPE_LEVEL_HIGH>,
+ interrupts-extended = <&pdc 9 IRQ_TYPE_EDGE_RISING>,
<&smp2p_slpi_in 0 IRQ_TYPE_EDGE_RISING>,
<&smp2p_slpi_in 1 IRQ_TYPE_EDGE_RISING>,
<&smp2p_slpi_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -2048,8 +2072,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8350_LCX>,
- <&rpmhpd SM8350_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
memory-region = <&pil_slpi_mem>;
@@ -2118,7 +2142,7 @@
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_SDCC_2 0>;
interconnect-names = "sdhc-ddr","cpu-sdhc";
iommus = <&apps_smmu 0x4a0 0x0>;
- power-domains = <&rpmhpd SM8350_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&sdhc2_opp_table>;
bus-width = <4>;
dma-coherent;
@@ -2212,34 +2236,27 @@
};
};
- usb_2_qmpphy: phy-wrapper@88eb000 {
+ usb_2_qmpphy: phy@88eb000 {
compatible = "qcom,sm8350-qmp-usb3-uni-phy";
- reg = <0 0x088eb000 0 0x200>;
+ reg = <0 0x088eb000 0 0x2000>;
status = "disabled";
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
- <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_USB3_SEC_CLKREF_EN>,
- <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
- clock-names = "aux", "ref_clk_src", "ref", "com_aux";
-
- resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
- <&gcc GCC_USB3_PHY_SEC_BCR>;
- reset-names = "phy", "common";
+ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "pipe";
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
- usb_2_ssphy: phy@88ebe00 {
- reg = <0 0x088ebe00 0 0x200>,
- <0 0x088ec000 0 0x200>,
- <0 0x088eb200 0 0x1100>;
- #phy-cells = <0>;
- #clock-cells = <0>;
- clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
- clock-names = "pipe0";
- clock-output-names = "usb3_uni_phy_pipe_clk_src";
- };
+ resets = <&gcc GCC_USB3_PHY_SEC_BCR>,
+ <&gcc GCC_USB3PHY_PHY_SEC_BCR>;
+ reset-names = "phy",
+ "phy_phy";
};
dc_noc: interconnect@90c0000 {
@@ -2392,7 +2409,7 @@
iommus = <&apps_smmu 0x20 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
- phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
+ phys = <&usb_2_hsphy>, <&usb_2_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
};
@@ -2427,35 +2444,6 @@
#size-cells = <2>;
ranges;
- dpu_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- /* TODO: opp-200000000 should work with
- * &rpmhpd_opp_low_svs, but one some of
- * sm8350_hdk boards reboot using this
- * opp.
- */
- opp-200000000 {
- opp-hz = /bits/ 64 <200000000>;
- required-opps = <&rpmhpd_opp_svs>;
- };
-
- opp-300000000 {
- opp-hz = /bits/ 64 <300000000>;
- required-opps = <&rpmhpd_opp_svs>;
- };
-
- opp-345000000 {
- opp-hz = /bits/ 64 <345000000>;
- required-opps = <&rpmhpd_opp_svs_l1>;
- };
-
- opp-460000000 {
- opp-hz = /bits/ 64 <460000000>;
- required-opps = <&rpmhpd_opp_nom>;
- };
- };
-
mdss_mdp: display-controller@ae01000 {
compatible = "qcom,sm8350-dpu";
reg = <0 0x0ae01000 0 0x8f000>,
@@ -2479,11 +2467,40 @@
assigned-clock-rates = <19200000>;
operating-points-v2 = <&dpu_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
+ dpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ /* TODO: opp-200000000 should work with
+ * &rpmhpd_opp_low_svs, but one some of
+ * sm8350_hdk boards reboot using this
+ * opp.
+ */
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-345000000 {
+ opp-hz = /bits/ 64 <345000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-460000000 {
+ opp-hz = /bits/ 64 <460000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+
ports {
#address-cells = <1>;
#size-cells = <0>;
@@ -2542,7 +2559,7 @@
#sound-dai-cells = <0>;
operating-points-v2 = <&dp_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
status = "disabled";
@@ -2610,7 +2627,7 @@
<&mdss_dsi0_phy 1>;
operating-points-v2 = <&dsi0_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi0_phy>;
@@ -2708,7 +2725,7 @@
<&mdss_dsi1_phy 1>;
operating-points-v2 = <&dsi1_opp_table>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi1_phy>;
@@ -2799,7 +2816,7 @@
#reset-cells = <1>;
#power-domain-cells = <1>;
- power-domains = <&rpmhpd SM8350_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
};
pdc: interrupt-controller@b220000 {
@@ -2939,7 +2956,7 @@
};
qup_uart18_default: qup-uart18-default-state {
- pins = "gpio58", "gpio59";
+ pins = "gpio68", "gpio69";
function = "qup18";
drive-strength = <2>;
bias-disable;
@@ -3077,111 +3094,111 @@
reg = <0 0x15000000 0 0x100000>;
#iommu-cells = <2>;
#global-interrupts = <2>;
- interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>;
};
adsp: remoteproc@17300000 {
compatible = "qcom,sm8350-adsp-pas";
reg = <0 0x17300000 0 0x100>;
- interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
+ interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
<&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
<&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
<&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -3192,8 +3209,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8350_LCX>,
- <&rpmhpd SM8350_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
memory-region = <&pil_adsp_mem>;
@@ -3215,6 +3232,75 @@
label = "lpass";
qcom,remote-pid = <2>;
+ apr {
+ compatible = "qcom,apr-v2";
+ qcom,glink-channels = "apr_audio_svc";
+ qcom,domain = <APR_DOMAIN_ADSP>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ service@3 {
+ reg = <APR_SVC_ADSP_CORE>;
+ compatible = "qcom,q6core";
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+ };
+
+ q6afe: service@4 {
+ compatible = "qcom,q6afe";
+ reg = <APR_SVC_AFE>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+ q6afedai: dais {
+ compatible = "qcom,q6afe-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ };
+
+ q6afecc: clock-controller {
+ compatible = "qcom,q6afe-clocks";
+ #clock-cells = <2>;
+ };
+ };
+
+ q6asm: service@7 {
+ compatible = "qcom,q6asm";
+ reg = <APR_SVC_ASM>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+ q6asmdai: dais {
+ compatible = "qcom,q6asm-dais";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ iommus = <&apps_smmu 0x1801 0x0>;
+
+ dai@0 {
+ reg = <0>;
+ };
+
+ dai@1 {
+ reg = <1>;
+ };
+
+ dai@2 {
+ reg = <2>;
+ };
+ };
+ };
+
+ q6adm: service@8 {
+ compatible = "qcom,q6adm";
+ reg = <APR_SVC_ADM>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+ q6routing: routing {
+ compatible = "qcom,q6adm-routing";
+ #sound-dai-cells = <0>;
+ };
+ };
+ };
+
fastrpc {
compatible = "qcom,fastrpc";
qcom,glink-channels = "fastrpcglink-apps-dsp";
@@ -3399,6 +3485,13 @@
<0 0x18593000 0 0x1000>;
reg-names = "freq-domain0", "freq-domain1", "freq-domain2";
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dcvsh-irq-0",
+ "dcvsh-irq-1",
+ "dcvsh-irq-2";
+
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_GPLL0>;
clock-names = "xo", "alternate";
@@ -3410,7 +3503,7 @@
compatible = "qcom,sm8350-cdsp-pas";
reg = <0 0x98900000 0 0x1400000>;
- interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>,
+ interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
<&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>,
<&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -3421,8 +3514,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8350_CX>,
- <&rpmhpd SM8350_MXC>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MXC>;
power-domain-names = "cx", "mxc";
interconnects = <&compute_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8450-hdk.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8450-hdk.dts
index bc4c125d1832..a20d5d76af35 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8450-hdk.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8450-hdk.dts
@@ -6,6 +6,10 @@
/dts-v1/;
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350b.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
#include "sm8450.dtsi"
#include "pm8350.dtsi"
@@ -14,11 +18,11 @@
#include "pm8450.dtsi"
#include "pmk8350.dtsi"
#include "pmr735a.dtsi"
-#include "pmr735b.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SM8450 HDK";
compatible = "qcom,sm8450-hdk", "qcom,sm8450";
+ chassis-type = "embedded";
aliases {
serial0 = &uart7;
@@ -130,6 +134,120 @@
};
};
+ thermal-zones {
+ camera-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 2>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ rear-tof-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 5>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ skin-msm-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 1>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ therm1-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 3>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ therm2-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 6>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ usb-conn-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 7>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ wide-rfc-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 4>;
+
+ trips {
+ active-config0 {
+ temperature = <75000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+
+ xo-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pmk8350_adc_tm 0>;
+
+ trips {
+ active-config0 {
+ temperature = <50000>;
+ hysteresis = <4000>;
+ type = "passive";
+ };
+ };
+ };
+ };
+
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
@@ -462,6 +580,14 @@
status = "okay";
};
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ firmware-name = "qcom/sm8450/a730_zap.mbn";
+ };
+};
+
&i2c9 {
clock-frequency = <400000>;
status = "okay";
@@ -517,18 +643,10 @@
vcc-supply = <&vreg_bob>;
mode-switch;
orientation-switch;
- svid = /bits/ 16 <0xff01>;
-
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
-
- fsa4480_sbu_mux: endpoint {
- remote-endpoint = <&pmic_glink_sbu>;
- };
+ port {
+ fsa4480_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_sbu>;
};
};
};
@@ -589,6 +707,175 @@
vdda-pll-supply = <&vreg_l6b_1p2>;
};
+&pm8350_temp_alarm {
+ io-channels = <&pmk8350_vadc PM8350_ADC7_DIE_TEMP(1)>;
+ io-channel-names = "thermal";
+};
+
+&pm8350b_temp_alarm {
+ io-channels = <&pmk8350_vadc PM8350B_ADC7_DIE_TEMP>;
+ io-channel-names = "thermal";
+};
+
+&pmr735a_temp_alarm {
+ io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>;
+ io-channel-names = "thermal";
+};
+
+&pmk8350_adc_tm {
+ status = "okay";
+
+ xo-therm@0 {
+ reg = <0>;
+ io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ skin-msm-therm@1 {
+ reg = <1>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ camera-therm@2 {
+ reg = <2>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ therm1-therm@3 {
+ reg = <3>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ wide-rfc-therm@4 {
+ reg = <4>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ rear-tof-therm@5 {
+ reg = <5>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ therm2-therm@6 {
+ reg = <6>;
+ io-channels = <&pmk8350_vadc PM8350_ADC7_GPIO3_100K_PU(1)>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ usb-conn-therm@7 {
+ reg = <7>;
+ io-channels = <&pmk8350_vadc PM8350B_ADC7_AMUX_THM5_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
+&pmk8350_vadc {
+ status = "okay";
+
+ channel@3 {
+ reg = <PMK8350_ADC7_DIE_TEMP>;
+ label = "pmk8350_die_temp";
+ };
+
+ channel@44 {
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "pmk8350_xo_therm";
+ };
+
+ channel@103 {
+ reg = <PM8350_ADC7_DIE_TEMP(1)>;
+ label = "pm8350_die_temp";
+ };
+
+ channel@144 {
+ reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "skin_msm_temp";
+ };
+
+ channel@145 {
+ reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "camera_temp";
+ };
+
+ channel@146 {
+ reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "therm1_temp";
+ };
+
+ channel@147 {
+ reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "wide_rfc_temp";
+ };
+
+ channel@148 {
+ reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "rear_tof_temp";
+ };
+
+ channel@14c {
+ reg = <PM8350_ADC7_GPIO3_100K_PU(1)>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "therm2_temp";
+ };
+
+ channel@303 {
+ reg = <PM8350B_ADC7_DIE_TEMP>;
+ label = "pm8350b_die_temp";
+ };
+
+ channel@348 {
+ reg = <PM8350B_ADC7_AMUX_THM5_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "usb_conn_temp";
+ };
+
+ channel@403 {
+ reg = <PMR735A_ADC7_DIE_TEMP>;
+ label = "pmr735a_die_temp";
+ };
+
+ channel@44a {
+ reg = <PMR735A_ADC7_GPIO1_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "qtm_w_temp";
+ };
+
+ channel@44b {
+ reg = <PMR735A_ADC7_GPIO2_100K_PU>;
+ qcom,hw-settle-time = <200>;
+ qcom,ratiometric;
+ label = "qtm_n_temp";
+ };
+};
+
&remoteproc_adsp {
status = "okay";
firmware-name = "qcom/sm8450/adsp.mbn";
@@ -636,14 +923,23 @@
"SpkrRight IN", "WSA_SPK2 OUT",
"IN1_HPHL", "HPHL_OUT",
"IN2_HPHR", "HPHR_OUT",
+ "AMIC1", "MIC BIAS1",
"AMIC2", "MIC BIAS2",
- "VA DMIC0", "MIC BIAS1",
- "VA DMIC1", "MIC BIAS1",
- "VA DMIC2", "MIC BIAS3",
- "TX DMIC0", "MIC BIAS1",
- "TX DMIC1", "MIC BIAS2",
- "TX DMIC2", "MIC BIAS3",
- "TX SWR_ADC1", "ADC2_OUTPUT";
+ "AMIC3", "MIC BIAS3",
+ "AMIC4", "MIC BIAS3",
+ "AMIC5", "MIC BIAS4",
+ "VA DMIC0", "MIC BIAS3",
+ "VA DMIC1", "MIC BIAS3",
+ "VA DMIC2", "MIC BIAS1",
+ "VA DMIC3", "MIC BIAS1",
+ "TX DMIC0", "MIC BIAS3",
+ "TX DMIC1", "MIC BIAS3",
+ "TX DMIC2", "MIC BIAS1",
+ "TX DMIC3", "MIC BIAS1",
+ "TX SWR_INPUT0", "ADC1_OUTPUT",
+ "TX SWR_INPUT1", "ADC2_OUTPUT",
+ "TX SWR_INPUT2", "ADC3_OUTPUT",
+ "TX SWR_INPUT3", "ADC4_OUTPUT";
wcd-playback-dai-link {
link-name = "WCD Playback";
@@ -794,6 +1090,7 @@
vcc-max-microamp = <1100000>;
vccq-supply = <&vreg_l9b_1p2>;
vccq-max-microamp = <1200000>;
+ vdd-hba-supply = <&vreg_l9b_1p2>;
};
&ufs_mem_phy {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8450-qrd.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8450-qrd.dts
index 65a94dfaf5ae..c7d05945aa51 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8450-qrd.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8450-qrd.dts
@@ -18,6 +18,7 @@
/ {
model = "Qualcomm Technologies, Inc. SM8450 QRD";
compatible = "qcom,sm8450-qrd", "qcom,sm8450";
+ chassis-type = "handset";
aliases {
serial0 = &uart7;
@@ -442,6 +443,7 @@
vcc-max-microamp = <1100000>;
vccq-supply = <&vreg_l9b_1p2>;
vccq-max-microamp = <1200000>;
+ vdd-hba-supply = <&vreg_l9b_1p2>;
};
&ufs_mem_phy {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8450-sony-xperia-nagara.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8450-sony-xperia-nagara.dtsi
index 001fb2723fbb..8b29fcf483a3 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8450-sony-xperia-nagara.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8450-sony-xperia-nagara.dtsi
@@ -80,7 +80,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
ramoops@ffc00000 {
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8450.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8450.dtsi
index 5cd7296c7660..01e4dfc4babd 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8450.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8450.dtsi
@@ -8,13 +8,18 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,sm8450-camcc.h>
#include <dt-bindings/clock/qcom,sm8450-dispcc.h>
+#include <dt-bindings/clock/qcom,sm8450-gpucc.h>
#include <dt-bindings/clock/qcom,sm8450-videocc.h>
#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
#include <dt-bindings/phy/phy-qcom-qmp.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
#include <dt-bindings/interconnect/qcom,sm8450.h>
+#include <dt-bindings/reset/qcom,sm8450-gpucc.h>
#include <dt-bindings/soc/qcom,gpr.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
@@ -538,7 +543,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
xbl_sc_mem2: memory@a6e00000 {
@@ -748,12 +753,12 @@
#power-domain-cells = <1>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&sleep_clk>,
- <&pcie0_lane>,
- <&pcie1_lane>,
+ <&pcie0_phy>,
+ <&pcie1_phy>,
<0>,
- <&ufs_mem_phy_lanes 0>,
- <&ufs_mem_phy_lanes 1>,
- <&ufs_mem_phy_lanes 2>,
+ <&ufs_mem_phy 0>,
+ <&ufs_mem_phy 1>,
+ <&ufs_mem_phy 2>,
<&usb_1_qmpphy QMP_USB43DP_USB3_PIPE_CLK>;
clock-names = "bi_tcxo",
"sleep_clk",
@@ -1149,7 +1154,7 @@
interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs>;
- power-domains = <&rpmhpd SM8450_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>,
<&system_noc MASTER_A2NOC_SNOC 0 &gem_noc SLAVE_LLCC 0>,
@@ -1312,7 +1317,7 @@
interrupts = <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&qup_spi4_data_clk>, <&qup_spi4_cs>;
- power-domains = <&rpmhpd SM8450_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&qup_opp_table_100mhz>;
interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>,
<&system_noc MASTER_A2NOC_SNOC 0 &gem_noc SLAVE_LLCC 0>,
@@ -1736,7 +1741,12 @@
};
};
- pcie0: pci@1c00000 {
+ rng: rng@10c3000 {
+ compatible = "qcom,sm8450-trng", "qcom,trng";
+ reg = <0 0x010c3000 0 0x1000>;
+ };
+
+ pcie0: pcie@1c00000 {
compatible = "qcom,pcie-sm8450-pcie0";
reg = <0 0x01c00000 0 0x3000>,
<0 0x60000000 0 0xf1d>,
@@ -1773,7 +1783,7 @@
clocks = <&gcc GCC_PCIE_0_PIPE_CLK>,
<&gcc GCC_PCIE_0_PIPE_CLK_SRC>,
- <&pcie0_lane>,
+ <&pcie0_phy>,
<&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_PCIE_0_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
@@ -1804,7 +1814,7 @@
power-domains = <&gcc PCIE_0_GDSC>;
- phys = <&pcie0_lane>;
+ phys = <&pcie0_phy>;
phy-names = "pciephy";
perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
@@ -1818,15 +1828,23 @@
pcie0_phy: phy@1c06000 {
compatible = "qcom,sm8450-qmp-gen3x1-pcie-phy";
- reg = <0 0x01c06000 0 0x200>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c06000 0 0x2000>;
+
clocks = <&gcc GCC_PCIE_0_AUX_CLK>,
<&gcc GCC_PCIE_0_CFG_AHB_CLK>,
<&gcc GCC_PCIE_0_CLKREF_EN>,
- <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "rchng",
+ "pipe";
+
+ clock-output-names = "pcie_0_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_0_PHY_BCR>;
reset-names = "phy";
@@ -1835,22 +1853,9 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie0_lane: phy@1c06200 {
- reg = <0 0x01c06e00 0 0x200>, /* tx */
- <0 0x01c07000 0 0x200>, /* rx */
- <0 0x01c06200 0 0x200>, /* pcs */
- <0 0x01c06600 0 0x200>; /* pcs_pcie */
- clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- #phy-cells = <0>;
- clock-output-names = "pcie_0_pipe_clk";
- };
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
compatible = "qcom,pcie-sm8450-pcie1";
reg = <0 0x01c08000 0 0x3000>,
<0 0x40000000 0 0xf1d>,
@@ -1887,7 +1892,7 @@
clocks = <&gcc GCC_PCIE_1_PIPE_CLK>,
<&gcc GCC_PCIE_1_PIPE_CLK_SRC>,
- <&pcie1_lane>,
+ <&pcie1_phy>,
<&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_PCIE_1_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
@@ -1916,7 +1921,7 @@
power-domains = <&gcc PCIE_1_GDSC>;
- phys = <&pcie1_lane>;
+ phys = <&pcie1_phy>;
phy-names = "pciephy";
perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>;
@@ -1928,17 +1933,25 @@
status = "disabled";
};
- pcie1_phy: phy@1c0f000 {
+ pcie1_phy: phy@1c0e000 {
compatible = "qcom,sm8450-qmp-gen4x2-pcie-phy";
- reg = <0 0x01c0f000 0 0x200>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01c0e000 0 0x2000>;
+
clocks = <&gcc GCC_PCIE_1_PHY_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
<&gcc GCC_PCIE_1_CLKREF_EN>,
- <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>;
- clock-names = "aux", "cfg_ahb", "ref", "refgen";
+ <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "rchng",
+ "pipe";
+
+ clock-output-names = "pcie_1_pipe_clk";
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
reset-names = "phy";
@@ -1947,21 +1960,6 @@
assigned-clock-rates = <100000000>;
status = "disabled";
-
- pcie1_lane: phy@1c0e000 {
- reg = <0 0x01c0e000 0 0x200>, /* tx */
- <0 0x01c0e200 0 0x300>, /* rx */
- <0 0x01c0f200 0 0x200>, /* pcs */
- <0 0x01c0e800 0 0x200>, /* tx */
- <0 0x01c0ea00 0 0x300>, /* rx */
- <0 0x01c0f400 0 0xc00>; /* pcs_pcie */
- clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
- clock-names = "pipe0";
-
- #clock-cells = <0>;
- #phy-cells = <0>;
- clock-output-names = "pcie_1_pipe_clk";
- };
};
config_noc: interconnect@1500000 {
@@ -2023,6 +2021,206 @@
reg = <0x0 0x1fc0000 0x0 0x30000>;
};
+ gpu: gpu@3d00000 {
+ compatible = "qcom,adreno-730.1", "qcom,adreno";
+ reg = <0x0 0x03d00000 0x0 0x40000>,
+ <0x0 0x03d9e000 0x0 0x1000>,
+ <0x0 0x03d61000 0x0 0x800>;
+ reg-names = "kgsl_3d0_reg_memory",
+ "cx_mem",
+ "cx_dbgc";
+
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
+
+ iommus = <&adreno_smmu 0 0x400>,
+ <&adreno_smmu 1 0x400>;
+
+ operating-points-v2 = <&gpu_opp_table>;
+
+ qcom,gmu = <&gmu>;
+
+ status = "disabled";
+
+ zap-shader {
+ memory-region = <&gpu_micro_code_mem>;
+ };
+
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-818000000 {
+ opp-hz = /bits/ 64 <818000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ };
+
+ opp-791000000 {
+ opp-hz = /bits/ 64 <791000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ };
+
+ opp-734000000 {
+ opp-hz = /bits/ 64 <734000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ };
+
+ opp-640000000 {
+ opp-hz = /bits/ 64 <640000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
+ };
+
+ opp-599000000 {
+ opp-hz = /bits/ 64 <599000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ opp-545000000 {
+ opp-hz = /bits/ 64 <545000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
+ };
+
+ opp-492000000 {
+ opp-hz = /bits/ 64 <492000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ opp-421000000 {
+ opp-hz = /bits/ 64 <421000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_L1>;
+ };
+
+ opp-350000000 {
+ opp-hz = /bits/ 64 <350000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ opp-317000000 {
+ opp-hz = /bits/ 64 <317000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ opp-285000000 {
+ opp-hz = /bits/ 64 <285000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D1>;
+ };
+
+ opp-220000000 {
+ opp-hz = /bits/ 64 <220000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D1>;
+ };
+ };
+ };
+
+ gmu: gmu@3d6a000 {
+ compatible = "qcom,adreno-gmu-730.1", "qcom,adreno-gmu";
+ reg = <0x0 0x03d6a000 0x0 0x35000>,
+ <0x0 0x03d50000 0x0 0x10000>,
+ <0x0 0x0b290000 0x0 0x10000>;
+ reg-names = "gmu", "rscc", "gmu_pdc";
+
+ interrupts = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hfi", "gmu";
+
+ clocks = <&gpucc GPU_CC_AHB_CLK>,
+ <&gpucc GPU_CC_CX_GMU_CLK>,
+ <&gpucc GPU_CC_CXO_CLK>,
+ <&gcc GCC_DDRSS_GPU_AXI_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gpucc GPU_CC_HUB_CX_INT_CLK>,
+ <&gpucc GPU_CC_DEMET_CLK>;
+ clock-names = "ahb",
+ "gmu",
+ "cxo",
+ "axi",
+ "memnoc",
+ "hub",
+ "demet";
+
+ power-domains = <&gpucc GPU_CX_GDSC>,
+ <&gpucc GPU_GX_GDSC>;
+ power-domain-names = "cx",
+ "gx";
+
+ iommus = <&adreno_smmu 5 0x400>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ operating-points-v2 = <&gmu_opp_table>;
+
+ gmu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-500000000 {
+ opp-hz = /bits/ 64 <500000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+ };
+ };
+
+ gpucc: clock-controller@3d90000 {
+ compatible = "qcom,sm8450-gpucc";
+ reg = <0x0 0x03d90000 0x0 0xa000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_GPU_GPLL0_CLK_SRC>,
+ <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+ adreno_smmu: iommu@3da0000 {
+ compatible = "qcom,sm8450-smmu-500", "qcom,adreno-smmu",
+ "qcom,smmu-500", "arm,mmu-500";
+ reg = <0x0 0x03da0000 0x0 0x40000>;
+ #iommu-cells = <2>;
+ #global-interrupts = <1>;
+ interrupts = <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 476 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 574 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 575 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 576 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 577 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 659 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 661 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 664 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 665 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 666 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 668 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 669 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 699 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 700 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gpucc GPU_CC_CX_GMU_CLK>,
+ <&gpucc GPU_CC_HUB_CX_INT_CLK>,
+ <&gpucc GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>,
+ <&gpucc GPU_CC_AHB_CLK>;
+ clock-names = "gmu",
+ "hub",
+ "hlos",
+ "bus",
+ "iface",
+ "ahb";
+ power-domains = <&gpucc GPU_CX_GDSC>;
+ dma-coherent;
+ };
+
usb_1_hsphy: phy@88e3000 {
compatible = "qcom,sm8450-usb-hs-phy",
"qcom,usb-snps-hs-7nm-phy";
@@ -2097,8 +2295,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8450_LCX>,
- <&rpmhpd SM8450_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
memory-region = <&slpi_mem>;
@@ -2158,18 +2356,13 @@
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&vamacro>;
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
- <&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>, <19200000>;
#clock-cells = <0>;
clock-output-names = "wsa2-mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&wsa2_swr_active>;
#sound-dai-cells = <1>;
};
- swr4: soundwire-controller@31f0000 {
+ swr4: soundwire@31f0000 {
compatible = "qcom,soundwire-v1.7.0";
reg = <0 0x031f0000 0 0x2000>;
interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
@@ -2177,6 +2370,9 @@
clock-names = "iface";
label = "WSA2";
+ pinctrl-0 = <&wsa2_swr_active>;
+ pinctrl-names = "default";
+
qcom,din-ports = <2>;
qcom,dout-ports = <6>;
@@ -2206,18 +2402,12 @@
<&vamacro>;
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
- <&q6prmcc LPASS_CLK_ID_RX_CORE_MCLK2_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>, <19200000>;
-
#clock-cells = <0>;
clock-output-names = "mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&rx_swr_active>;
#sound-dai-cells = <1>;
};
- swr1: soundwire-controller@3210000 {
+ swr1: soundwire@3210000 {
compatible = "qcom,soundwire-v1.7.0";
reg = <0 0x03210000 0 0x2000>;
interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
@@ -2227,6 +2417,9 @@
qcom,din-ports = <0>;
qcom,dout-ports = <5>;
+ pinctrl-0 = <&rx_swr_active>;
+ pinctrl-names = "default";
+
qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1f 0x1f 0x07 0x00>;
qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x00>;
qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>;
@@ -2252,14 +2445,9 @@
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&vamacro>;
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
- <&q6prmcc LPASS_CLK_ID_RX_CORE_MCLK2_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>, <19200000>;
#clock-cells = <0>;
clock-output-names = "mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&tx_swr_active>;
#sound-dai-cells = <1>;
};
@@ -2273,18 +2461,12 @@
<&vamacro>;
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
- <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>, <19200000>;
-
#clock-cells = <0>;
clock-output-names = "mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&wsa_swr_active>;
#sound-dai-cells = <1>;
};
- swr0: soundwire-controller@3250000 {
+ swr0: soundwire@3250000 {
compatible = "qcom,soundwire-v1.7.0";
reg = <0 0x03250000 0 0x2000>;
interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
@@ -2292,6 +2474,9 @@
clock-names = "iface";
label = "WSA";
+ pinctrl-0 = <&wsa_swr_active>;
+ pinctrl-names = "default";
+
qcom,din-ports = <2>;
qcom,dout-ports = <6>;
@@ -2311,17 +2496,20 @@
status = "disabled";
};
- swr2: soundwire-controller@33b0000 {
+ swr2: soundwire@33b0000 {
compatible = "qcom,soundwire-v1.7.0";
reg = <0 0x033b0000 0 0x2000>;
interrupts = <GIC_SPI 496 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "core", "wakeup";
- clocks = <&vamacro>;
+ clocks = <&txmacro>;
clock-names = "iface";
label = "TX";
+ pinctrl-0 = <&tx_swr_active>;
+ pinctrl-names = "default";
+
qcom,din-ports = <4>;
qcom,dout-ports = <0>;
qcom,ports-sinterval-low = /bits/ 8 <0x01 0x01 0x03 0x03>;
@@ -2348,8 +2536,6 @@
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&q6prmcc LPASS_CLK_ID_RX_CORE_MCLK2_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
clock-names = "mclk", "macro", "dcodec", "npl";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>;
#clock-cells = <0>;
clock-output-names = "fsgen";
@@ -2372,8 +2558,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8450_LCX>,
- <&rpmhpd SM8450_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
memory-region = <&adsp_mem>;
@@ -2477,8 +2663,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8450_CX>,
- <&rpmhpd SM8450_MXC>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MXC>;
power-domain-names = "cx", "mxc";
memory-region = <&cdsp_mem>;
@@ -2584,8 +2770,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8450_CX>,
- <&rpmhpd SM8450_MSS>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MSS>;
power-domain-names = "cx", "mss";
memory-region = <&mpss_mem>;
@@ -2613,7 +2799,7 @@
reg = <0 0x0aaf0000 0 0x10000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_VIDEO_AHB_CLK>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
@@ -2705,7 +2891,7 @@
<&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
@@ -2720,8 +2906,12 @@
/* same path used twice */
interconnects = <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>,
- <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>;
- interconnect-names = "mdp0-mem", "mdp1-mem";
+ <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY
+ &config_noc SLAVE_DISPLAY_CFG QCOM_ICC_TAG_ACTIVE_ONLY>;
+ interconnect-names = "mdp0-mem",
+ "mdp1-mem",
+ "cpu-cfg";
resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
@@ -2767,7 +2957,7 @@
assigned-clock-rates = <19200000>;
operating-points-v2 = <&mdp_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
interrupt-parent = <&mdss>;
interrupts = <0>;
@@ -2859,7 +3049,7 @@
#sound-dai-cells = <0>;
operating-points-v2 = <&dp_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
status = "disabled";
@@ -2925,7 +3115,7 @@
assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
operating-points-v2 = <&mdss_dsi_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi0_phy>;
phy-names = "dsi";
@@ -3017,7 +3207,7 @@
assigned-clock-parents = <&mdss_dsi1_phy 0>, <&mdss_dsi1_phy 1>;
operating-points-v2 = <&mdss_dsi_opp_table>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
phys = <&mdss_dsi1_phy>;
phy-names = "dsi";
@@ -3085,7 +3275,7 @@
<0>,
<0>, /* dp3 */
<0>;
- power-domains = <&rpmhpd SM8450_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
@@ -3135,6 +3325,11 @@
#clock-cells = <0>;
};
+ sram@c3f0000 {
+ compatible = "qcom,rpmh-stats";
+ reg = <0 0x0c3f0000 0 0x400>;
+ };
+
spmi_bus: spmi@c400000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0 0x0c400000 0 0x00003000>,
@@ -3810,103 +4005,103 @@
reg = <0 0x15000000 0 0x100000>;
#iommu-cells = <2>;
#global-interrupts = <1>;
- interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>;
};
intc: interrupt-controller@17100000 {
@@ -4120,11 +4315,9 @@
ufs_mem_hc: ufshc@1d84000 {
compatible = "qcom,sm8450-ufshc", "qcom,ufshc",
"jedec,ufs-2.0";
- reg = <0 0x01d84000 0 0x3000>,
- <0 0x01d88000 0 0x8000>;
- reg-names = "std", "ice";
+ reg = <0 0x01d84000 0 0x3000>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
- phys = <&ufs_mem_phy_lanes>;
+ phys = <&ufs_mem_phy>;
phy-names = "ufsphy";
lanes-per-direction = <2>;
#reset-cells = <1>;
@@ -4147,8 +4340,7 @@
"ref_clk",
"tx_lane0_sync_clk",
"rx_lane0_sync_clk",
- "rx_lane1_sync_clk",
- "ice_core_clk";
+ "rx_lane1_sync_clk";
clocks =
<&gcc GCC_UFS_PHY_AXI_CLK>,
<&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
@@ -4157,8 +4349,7 @@
<&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
<&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
- <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>,
- <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
freq-table-hz =
<75000000 300000000>,
<0 0>,
@@ -4167,17 +4358,16 @@
<75000000 300000000>,
<0 0>,
<0 0>,
- <0 0>,
- <75000000 300000000>;
+ <0 0>;
+ qcom,ice = <&ice>;
+
status = "disabled";
};
ufs_mem_phy: phy@1d87000 {
compatible = "qcom,sm8450-qmp-ufs-phy";
- reg = <0 0x01d87000 0 0x1c4>;
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
+ reg = <0 0x01d87000 0 0x1000>;
+
clock-names = "ref", "ref_aux", "qref";
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_UFS_PHY_PHY_AUX_CLK>,
@@ -4185,17 +4375,18 @@
resets = <&ufs_mem_hc 0>;
reset-names = "ufsphy";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
status = "disabled";
+ };
- ufs_mem_phy_lanes: phy@1d87400 {
- reg = <0 0x01d87400 0 0x188>,
- <0 0x01d87600 0 0x200>,
- <0 0x01d87c00 0 0x200>,
- <0 0x01d87800 0 0x188>,
- <0 0x01d87a00 0 0x200>;
- #clock-cells = <1>;
- #phy-cells = <0>;
- };
+ ice: crypto@1d88000 {
+ compatible = "qcom,sm8450-inline-crypto-engine",
+ "qcom,inline-crypto-engine";
+ reg = <0 0x01d88000 0 0x8000>;
+ clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
};
cryptobam: dma-controller@1dc4000 {
@@ -4212,7 +4403,7 @@
<&apps_smmu 0x59f 0x0>;
};
- crypto: crypto@1de0000 {
+ crypto: crypto@1dfa000 {
compatible = "qcom,sm8450-qce", "qcom,sm8150-qce", "qcom,qce";
reg = <0 0x01dfa000 0 0x6000>;
dmas = <&cryptobam 4>, <&cryptobam 5>;
@@ -4243,7 +4434,7 @@
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_SDCC_2 0>;
interconnect-names = "sdhc-ddr","cpu-sdhc";
iommus = <&apps_smmu 0x4a0 0x0>;
- power-domains = <&rpmhpd SM8450_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&sdhc2_opp_table>;
bus-width = <4>;
dma-coherent;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8550-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8550-mtp.dts
index ec86c5f38045..c1135ad5fa69 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8550-mtp.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8550-mtp.dts
@@ -10,14 +10,17 @@
#include "pm8010.dtsi"
#include "pm8550.dtsi"
#include "pm8550b.dtsi"
+#define PMK8550VE_SID 5
#include "pm8550ve.dtsi"
#include "pm8550vs.dtsi"
#include "pmk8550.dtsi"
-#include "pmr735d.dtsi"
+#include "pmr735d_a.dtsi"
+#include "pmr735d_b.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SM8550 MTP";
compatible = "qcom,sm8550-mtp", "qcom,sm8550";
+ chassis-type = "handset";
aliases {
serial0 = &uart7;
@@ -57,6 +60,7 @@
compatible = "qcom,sm8550-pmic-glink", "qcom,pmic-glink";
#address-cells = <1>;
#size-cells = <0>;
+ orientation-gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
connector@0 {
compatible = "usb-c-connector";
@@ -80,7 +84,15 @@
reg = <1>;
pmic_glink_ss_in: endpoint {
- remote-endpoint = <&usb_1_dwc3_ss>;
+ remote-endpoint = <&usb_dp_qmpphy_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_sbu: endpoint {
+ remote-endpoint = <&fsa4480_sbu_mux>;
};
};
};
@@ -186,6 +198,7 @@
vdd-bob1-supply = <&vph_pwr>;
vdd-bob2-supply = <&vph_pwr>;
+ vdd-l1-l4-l10-supply = <&vreg_s6g_1p8>;
vdd-l2-l13-l14-supply = <&vreg_bob1>;
vdd-l3-supply = <&vreg_s4g_1p3>;
vdd-l5-l16-supply = <&vreg_bob1>;
@@ -498,6 +511,158 @@
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
};
+
+ regulators-6 {
+ compatible = "qcom,pm8010-rpmh-regulators";
+ qcom,pmic-id = "m";
+
+ vdd-l1-l2-supply = <&vreg_s4g_1p3>;
+ vdd-l3-l4-supply = <&vreg_bob2>;
+ vdd-l5-supply = <&vreg_s6g_1p8>;
+ vdd-l6-supply = <&vreg_s6g_1p8>;
+ vdd-l7-supply = <&vreg_bob1>;
+
+ vreg_l1m_1p056: ldo1 {
+ regulator-name = "vreg_l1m_1p056";
+ regulator-min-microvolt = <1056000>;
+ regulator-max-microvolt = <1056000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2m_1p056: ldo2 {
+ regulator-name = "vreg_l2m_1p056";
+ regulator-min-microvolt = <1056000>;
+ regulator-max-microvolt = <1056000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3m_2p8: ldo3 {
+ regulator-name = "vreg_l3m_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4m_2p8: ldo4 {
+ regulator-name = "vreg_l4m_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5m_1p8: ldo5 {
+ regulator-name = "vreg_l5m_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6m_1p8: ldo6 {
+ regulator-name = "vreg_l6m_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7m_2p9: ldo7 {
+ regulator-name = "vreg_l7m_2p9";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-7 {
+ compatible = "qcom,pm8010-rpmh-regulators";
+ qcom,pmic-id = "n";
+
+ vdd-l1-l2-supply = <&vreg_s4g_1p3>;
+ vdd-l3-l4-supply = <&vreg_bob2>;
+ vdd-l5-supply = <&vreg_s6g_1p8>;
+ vdd-l6-supply = <&vreg_bob1>;
+ vdd-l7-supply = <&vreg_bob1>;
+
+ vreg_l1n_1p1: ldo1 {
+ regulator-name = "vreg_l1n_1p1";
+ regulator-min-microvolt = <1104000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2n_1p1: ldo2 {
+ regulator-name = "vreg_l2n_1p1";
+ regulator-min-microvolt = <1104000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3n_2p8: ldo3 {
+ regulator-name = "vreg_l3n_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4n_2p8: ldo4 {
+ regulator-name = "vreg_l4n_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5n_1p8: ldo5 {
+ regulator-name = "vreg_l5n_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6n_3p3: ldo6 {
+ regulator-name = "vreg_l6n_3p3";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7n_2p96: ldo7 {
+ regulator-name = "vreg_l7n_2p96";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ firmware-name = "qcom/sm8550/a740_zap.mbn";
+ };
+};
+
+&i2c_master_hub_0 {
+ status = "okay";
+};
+
+&i2c_hub_2 {
+ status = "okay";
+
+ typec-mux@42 {
+ compatible = "fcs,fsa4480";
+ reg = <0x42>;
+
+ vcc-supply = <&vreg_bob1>;
+
+ mode-switch;
+ orientation-switch;
+
+ port {
+ fsa4480_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_sbu>;
+ };
+ };
+ };
};
&lpass_tlmm {
@@ -558,6 +723,15 @@
status = "okay";
};
+&mdss_dp0 {
+ status = "okay";
+};
+
+&mdss_dp0_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+};
+
&pcie_1_phy_aux_clk {
clock-frequency = <1000>;
};
@@ -754,8 +928,7 @@
vcc-max-microamp = <1300000>;
vccq-supply = <&vreg_l1g_1p2>;
vccq-max-microamp = <1200000>;
- vccq2-supply = <&vreg_l3g_1p2>;
- vccq2-max-microamp = <100>;
+ vdd-hba-supply = <&vreg_l3g_1p2>;
status = "okay";
};
@@ -781,7 +954,7 @@
};
&usb_1_dwc3_ss {
- remote-endpoint = <&pmic_glink_ss_in>;
+ remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
};
&usb_1_hsphy {
@@ -797,9 +970,23 @@
vdda-phy-supply = <&vreg_l3e_1p2>;
vdda-pll-supply = <&vreg_l3f_0p91>;
+ orientation-switch;
+
status = "okay";
};
+&usb_dp_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp0_out>;
+};
+
+&usb_dp_qmpphy_out {
+ remote-endpoint = <&pmic_glink_ss_in>;
+};
+
+&usb_dp_qmpphy_usb_ss_in {
+ remote-endpoint = <&usb_1_dwc3_ss>;
+};
+
&xo_board {
clock-frequency = <76800000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8550-qrd.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8550-qrd.dts
index ec4feee6837d..d401d63e5c4d 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8550-qrd.dts
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8550-qrd.dts
@@ -11,17 +11,21 @@
#include "pm8010.dtsi"
#include "pm8550.dtsi"
#include "pm8550b.dtsi"
+#define PMK8550VE_SID 5
#include "pm8550ve.dtsi"
#include "pm8550vs.dtsi"
#include "pmk8550.dtsi"
-#include "pmr735d.dtsi"
+#include "pmr735d_a.dtsi"
+#include "pmr735d_b.dtsi"
/ {
model = "Qualcomm Technologies, Inc. SM8550 QRD";
compatible = "qcom,sm8550-qrd", "qcom,sm8550";
+ chassis-type = "handset";
aliases {
serial0 = &uart7;
+ serial1 = &uart14;
};
wcd938x: audio-codec {
@@ -74,6 +78,7 @@
compatible = "qcom,sm8550-pmic-glink", "qcom,pmic-glink";
#address-cells = <1>;
#size-cells = <0>;
+ orientation-gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
connector@0 {
compatible = "usb-c-connector";
@@ -97,7 +102,15 @@
reg = <1>;
pmic_glink_ss_in: endpoint {
- remote-endpoint = <&usb_1_dwc3_ss>;
+ remote-endpoint = <&redriver_ss_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_sbu: endpoint {
+ remote-endpoint = <&fsa4480_sbu_mux>;
};
};
};
@@ -515,6 +528,189 @@
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
};
+
+ regulators-6 {
+ compatible = "qcom,pm8010-rpmh-regulators";
+ qcom,pmic-id = "m";
+
+ vdd-l1-l2-supply = <&vreg_s4g_1p25>;
+ vdd-l3-l4-supply = <&vreg_bob2>;
+ vdd-l5-supply = <&vreg_s6g_1p86>;
+ vdd-l6-supply = <&vreg_s6g_1p86>;
+ vdd-l7-supply = <&vreg_bob1>;
+
+ vreg_l1m_1p056: ldo1 {
+ regulator-name = "vreg_l1m_1p056";
+ regulator-min-microvolt = <1056000>;
+ regulator-max-microvolt = <1056000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2m_1p056: ldo2 {
+ regulator-name = "vreg_l2m_1p056";
+ regulator-min-microvolt = <1056000>;
+ regulator-max-microvolt = <1056000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3m_2p8: ldo3 {
+ regulator-name = "vreg_l3m_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4m_2p8: ldo4 {
+ regulator-name = "vreg_l4m_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5m_1p8: ldo5 {
+ regulator-name = "vreg_l5m_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6m_1p8: ldo6 {
+ regulator-name = "vreg_l6m_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7m_2p9: ldo7 {
+ regulator-name = "vreg_l7m_2p9";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2904000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-7 {
+ compatible = "qcom,pm8010-rpmh-regulators";
+ qcom,pmic-id = "n";
+
+ vdd-l1-l2-supply = <&vreg_s4g_1p25>;
+ vdd-l3-l4-supply = <&vreg_bob2>;
+ vdd-l5-supply = <&vreg_s6g_1p86>;
+ vdd-l6-supply = <&vreg_bob1>;
+ vdd-l7-supply = <&vreg_bob1>;
+
+ vreg_l1n_1p1: ldo1 {
+ regulator-name = "vreg_l1n_1p1";
+ regulator-min-microvolt = <1104000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2n_1p1: ldo2 {
+ regulator-name = "vreg_l2n_1p1";
+ regulator-min-microvolt = <1104000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3n_2p8: ldo3 {
+ regulator-name = "vreg_l3n_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4n_2p8: ldo4 {
+ regulator-name = "vreg_l4n_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5n_1p8: ldo5 {
+ regulator-name = "vreg_l5n_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6n_3p3: ldo6 {
+ regulator-name = "vreg_l6n_3p3";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7n_2p96: ldo7 {
+ regulator-name = "vreg_l7n_2p96";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&i2c_master_hub_0 {
+ status = "okay";
+};
+
+&i2c_hub_2 {
+ status = "okay";
+
+ typec-retimer@1c {
+ compatible = "onnn,nb7vpq904m";
+ reg = <0x1c>;
+
+ vcc-supply = <&vreg_l15b_1p8>;
+
+ retimer-switch;
+ orientation-switch;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ redriver_ss_out: endpoint {
+ remote-endpoint = <&pmic_glink_ss_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ redriver_ss_in: endpoint {
+ data-lanes = <3 2 1 0>;
+ remote-endpoint = <&usb_dp_qmpphy_out>;
+ };
+ };
+ };
+ };
+
+ typec-mux@42 {
+ compatible = "fcs,fsa4480";
+ reg = <0x42>;
+
+ vcc-supply = <&vreg_bob1>;
+
+ mode-switch;
+ orientation-switch;
+
+ port {
+ fsa4480_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_sbu>;
+ };
+ };
+ };
+};
+
+&ipa {
+ qcom,gsi-loader = "self";
+ memory-region = <&ipa_fw_mem>;
+ firmware-name = "qcom/sm8550/ipa_fws.mbn";
+ status = "okay";
};
&gcc {
@@ -528,6 +724,14 @@
<&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>;
};
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ firmware-name = "qcom/sm8550/a740_zap.mbn";
+ };
+};
+
&lpass_tlmm {
spkr_1_sd_n_active: spkr-1-sd-n-active-state {
pins = "gpio17";
@@ -586,6 +790,15 @@
status = "okay";
};
+&mdss_dp0 {
+ status = "okay";
+};
+
+&mdss_dp0_out {
+ data-lanes = <0 1>;
+ remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+};
+
&pcie_1_phy_aux_clk {
status = "disabled";
};
@@ -691,6 +904,10 @@
status = "okay";
};
+&qupv3_id_1 {
+ status = "okay";
+};
+
&remoteproc_adsp {
firmware-name = "qcom/sm8550/adsp.mbn",
"qcom/sm8550/adsp_dtb.mbn";
@@ -768,6 +985,21 @@
&tlmm {
gpio-reserved-ranges = <32 8>;
+ bt_default: bt-default-state {
+ bt-en-pins {
+ pins = "gpio81";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
+ sw-ctrl-pins {
+ pins = "gpio82";
+ function = "gpio";
+ bias-pull-down;
+ };
+ };
+
sde_dsi_active: sde-dsi-active-state {
pins = "gpio133";
function = "gpio";
@@ -809,14 +1041,36 @@
status = "okay";
};
+&uart14 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn7850-bt";
+
+ vddio-supply = <&vreg_l15b_1p8>;
+ vddaon-supply = <&vreg_s4e_0p95>;
+ vdddig-supply = <&vreg_s4e_0p95>;
+ vddrfa0p8-supply = <&vreg_s4e_0p95>;
+ vddrfa1p2-supply = <&vreg_s4g_1p25>;
+ vddrfa1p9-supply = <&vreg_s6g_1p86>;
+
+ max-speed = <3200000>;
+
+ enable-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
+ swctrl-gpios = <&tlmm 82 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&bt_default>;
+ pinctrl-names = "default";
+ };
+};
+
&ufs_mem_hc {
reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l17b_2p5>;
vcc-max-microamp = <1300000>;
vccq-supply = <&vreg_l1g_1p2>;
vccq-max-microamp = <1200000>;
- vccq2-supply = <&vreg_l3g_1p2>;
- vccq2-max-microamp = <100>;
+ vdd-hba-supply = <&vreg_l3g_1p2>;
status = "okay";
};
@@ -842,7 +1096,7 @@
};
&usb_1_dwc3_ss {
- remote-endpoint = <&pmic_glink_ss_in>;
+ remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
};
&usb_1_hsphy {
@@ -858,9 +1112,23 @@
vdda-phy-supply = <&vreg_l3e_1p2>;
vdda-pll-supply = <&vreg_l3f_0p88>;
+ orientation-switch;
+
status = "okay";
};
+&usb_dp_qmpphy_dp_in {
+ remote-endpoint = <&mdss_dp0_out>;
+};
+
+&usb_dp_qmpphy_out {
+ remote-endpoint = <&redriver_ss_in>;
+};
+
+&usb_dp_qmpphy_usb_ss_in {
+ remote-endpoint = <&usb_1_dwc3_ss>;
+};
+
&xo_board {
clock-frequency = <76800000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8550.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8550.dtsi
index 41d60af93692..ee1ba5a8c8fc 100644
--- a/sys/contrib/device-tree/src/arm64/qcom/sm8550.dtsi
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8550.dtsi
@@ -5,16 +5,19 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,sm8450-videocc.h>
+#include <dt-bindings/clock/qcom,sm8550-camcc.h>
#include <dt-bindings/clock/qcom,sm8550-gcc.h>
#include <dt-bindings/clock/qcom,sm8550-gpucc.h>
#include <dt-bindings/clock/qcom,sm8550-tcsr.h>
#include <dt-bindings/clock/qcom,sm8550-dispcc.h>
#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interconnect/qcom,sm8550-rpmh.h>
#include <dt-bindings/mailbox/qcom-ipcc.h>
#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
#include <dt-bindings/soc/qcom,gpr.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
@@ -282,9 +285,9 @@
compatible = "arm,idle-state";
idle-state-name = "silver-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
- entry-latency-us = <800>;
+ entry-latency-us = <550>;
exit-latency-us = <750>;
- min-residency-us = <4090>;
+ min-residency-us = <6700>;
local-timer-stop;
};
@@ -293,8 +296,18 @@
idle-state-name = "gold-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
entry-latency-us = <600>;
- exit-latency-us = <1550>;
- min-residency-us = <4791>;
+ exit-latency-us = <1300>;
+ min-residency-us = <8136>;
+ local-timer-stop;
+ };
+
+ PRIME_CPU_SLEEP_0: cpu-sleep-2-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "goldplus-rail-power-collapse";
+ arm,psci-suspend-param = <0x40000004>;
+ entry-latency-us = <500>;
+ exit-latency-us = <1350>;
+ min-residency-us = <7480>;
local-timer-stop;
};
};
@@ -303,17 +316,17 @@
CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x41000044>;
- entry-latency-us = <1050>;
- exit-latency-us = <2500>;
- min-residency-us = <5309>;
+ entry-latency-us = <750>;
+ exit-latency-us = <2350>;
+ min-residency-us = <9144>;
};
CLUSTER_SLEEP_1: cluster-sleep-1 {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x4100c344>;
- entry-latency-us = <2700>;
- exit-latency-us = <3500>;
- min-residency-us = <13959>;
+ entry-latency-us = <2800>;
+ exit-latency-us = <4400>;
+ min-residency-us = <10150>;
};
};
};
@@ -321,6 +334,7 @@
firmware {
scm: scm {
compatible = "qcom,scm-sm8550", "qcom,scm";
+ qcom,dload-mode = <&tcsr 0x19000>;
interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
};
};
@@ -397,7 +411,7 @@
CPU_PD7: power-domain-cpu7 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ domain-idle-states = <&PRIME_CPU_SLEEP_0>;
};
CLUSTER_PD: power-domain-cluster {
@@ -569,7 +583,7 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
};
mpss_dsm_mem: mpss-dsm-region@d4d00000 {
@@ -1053,6 +1067,20 @@
status = "disabled";
};
+ uart14: serial@898000 {
+ compatible = "qcom,geni-uart";
+ reg = <0 0x898000 0 0x4000>;
+ clock-names = "se";
+ clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&qup_uart14_default>, <&qup_uart14_cts_rts>;
+ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>;
+ interconnect-names = "qup-core", "qup-config";
+ status = "disabled";
+ };
+
i2c15: i2c@89c000 {
compatible = "qcom,geni-i2c";
reg = <0 0x0089c000 0 0x4000>;
@@ -1600,7 +1628,7 @@
pinctrl-0 = <&qup_uart7_default>;
interrupts = <GIC_SPI 579 IRQ_TYPE_LEVEL_HIGH>;
interconnect-names = "qup-core", "qup-config";
- interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>,
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>,
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>;
status = "disabled";
};
@@ -1660,7 +1688,12 @@
qcom,bcm-voters = <&apps_bcm_voter>;
};
- pcie0: pci@1c00000 {
+ rng: rng@10c3000 {
+ compatible = "qcom,sm8550-trng", "qcom,trng";
+ reg = <0 0x010c3000 0 0x1000>;
+ };
+
+ pcie0: pcie@1c00000 {
device_type = "pci";
compatible = "qcom,pcie-sm8550";
reg = <0 0x01c00000 0 0x3000>,
@@ -1751,7 +1784,7 @@
status = "disabled";
};
- pcie1: pci@1c08000 {
+ pcie1: pcie@1c08000 {
device_type = "pci";
compatible = "qcom,pcie-sm8550";
reg = <0x0 0x01c08000 0x0 0x3000>,
@@ -1962,6 +1995,128 @@
#reset-cells = <1>;
};
+ gpu: gpu@3d00000 {
+ compatible = "qcom,adreno-43050a01", "qcom,adreno";
+ reg = <0x0 0x03d00000 0x0 0x40000>,
+ <0x0 0x03d9e000 0x0 0x1000>,
+ <0x0 0x03d61000 0x0 0x800>;
+ reg-names = "kgsl_3d0_reg_memory",
+ "cx_mem",
+ "cx_dbgc";
+
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
+
+ iommus = <&adreno_smmu 0 0x0>,
+ <&adreno_smmu 1 0x0>;
+
+ operating-points-v2 = <&gpu_opp_table>;
+
+ qcom,gmu = <&gmu>;
+
+ status = "disabled";
+
+ zap-shader {
+ memory-region = <&gpu_micro_code_mem>;
+ };
+
+ /* Speedbin needs more work on A740+, keep only lower freqs */
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-680000000 {
+ opp-hz = /bits/ 64 <680000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ opp-615000000 {
+ opp-hz = /bits/ 64 <615000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
+ };
+
+ opp-550000000 {
+ opp-hz = /bits/ 64 <550000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ opp-475000000 {
+ opp-hz = /bits/ 64 <475000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_L1>;
+ };
+
+ opp-401000000 {
+ opp-hz = /bits/ 64 <401000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ opp-348000000 {
+ opp-hz = /bits/ 64 <348000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D0>;
+ };
+
+ opp-295000000 {
+ opp-hz = /bits/ 64 <295000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D1>;
+ };
+
+ opp-220000000 {
+ opp-hz = /bits/ 64 <220000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
+ };
+ };
+ };
+
+ gmu: gmu@3d6a000 {
+ compatible = "qcom,adreno-gmu-740.1", "qcom,adreno-gmu";
+ reg = <0x0 0x03d6a000 0x0 0x35000>,
+ <0x0 0x03d50000 0x0 0x10000>,
+ <0x0 0x0b280000 0x0 0x10000>;
+ reg-names = "gmu", "rscc", "gmu_pdc";
+
+ interrupts = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hfi", "gmu";
+
+ clocks = <&gpucc GPU_CC_AHB_CLK>,
+ <&gpucc GPU_CC_CX_GMU_CLK>,
+ <&gpucc GPU_CC_CXO_CLK>,
+ <&gcc GCC_DDRSS_GPU_AXI_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gpucc GPU_CC_HUB_CX_INT_CLK>,
+ <&gpucc GPU_CC_DEMET_CLK>;
+ clock-names = "ahb",
+ "gmu",
+ "cxo",
+ "axi",
+ "memnoc",
+ "hub",
+ "demet";
+
+ power-domains = <&gpucc GPU_CC_CX_GDSC>,
+ <&gpucc GPU_CC_GX_GDSC>;
+ power-domain-names = "cx",
+ "gx";
+
+ iommus = <&adreno_smmu 5 0x0>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ operating-points-v2 = <&gmu_opp_table>;
+
+ gmu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-500000000 {
+ opp-hz = /bits/ 64 <500000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+ };
+ };
+
gpucc: clock-controller@3d90000 {
compatible = "qcom,sm8550-gpucc";
reg = <0 0x03d90000 0 0xa000>;
@@ -1973,6 +2128,89 @@
#power-domain-cells = <1>;
};
+ adreno_smmu: iommu@3da0000 {
+ compatible = "qcom,sm8550-smmu-500", "qcom,adreno-smmu",
+ "qcom,smmu-500", "arm,mmu-500";
+ reg = <0x0 0x03da0000 0x0 0x40000>;
+ #iommu-cells = <2>;
+ #global-interrupts = <1>;
+ interrupts = <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 677 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 476 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 574 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 575 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 576 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 577 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 659 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 661 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 664 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 665 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 666 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 668 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 669 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 699 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gpucc GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>,
+ <&gpucc GPU_CC_AHB_CLK>;
+ clock-names = "hlos",
+ "bus",
+ "iface",
+ "ahb";
+ power-domains = <&gpucc GPU_CC_CX_GDSC>;
+ dma-coherent;
+ };
+
+ ipa: ipa@3f40000 {
+ compatible = "qcom,sm8550-ipa";
+
+ iommus = <&apps_smmu 0x4a0 0x0>,
+ <&apps_smmu 0x4a2 0x0>;
+ reg = <0 0x3f40000 0 0x10000>,
+ <0 0x3f50000 0 0x5000>,
+ <0 0x3e04000 0 0xfc000>;
+ reg-names = "ipa-reg",
+ "ipa-shared",
+ "gsi";
+
+ interrupts-extended = <&intc GIC_SPI 654 IRQ_TYPE_EDGE_RISING>,
+ <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
+ <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ipa",
+ "gsi",
+ "ipa-clock-query",
+ "ipa-setup-ready";
+
+ clocks = <&rpmhcc RPMH_IPA_CLK>;
+ clock-names = "core";
+
+ interconnects = <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>;
+ interconnect-names = "memory",
+ "config";
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&ipa_smp2p_out 0>,
+ <&ipa_smp2p_out 1>;
+ qcom,smem-state-names = "ipa-clock-enabled-valid",
+ "ipa-clock-enabled";
+
+ status = "disabled";
+ };
+
remoteproc_mpss: remoteproc@4080000 {
compatible = "qcom,sm8550-mpss-pas";
reg = <0x0 0x04080000 0x0 0x4040>;
@@ -1989,8 +2227,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8550_CX>,
- <&rpmhpd SM8550_MSS>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MSS>;
power-domain-names = "cx", "mss";
interconnects = <&mc_virt MASTER_LLCC 0 &mc_virt SLAVE_EBI1 0>;
@@ -2023,17 +2261,13 @@
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&lpass_vamacro>;
clock-names = "mclk", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>;
#clock-cells = <0>;
clock-output-names = "wsa2-mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&wsa2_swr_active>;
#sound-dai-cells = <1>;
};
- swr3: soundwire-controller@6ab0000 {
+ swr3: soundwire@6ab0000 {
compatible = "qcom,soundwire-v2.0.0";
reg = <0 0x06ab0000 0 0x10000>;
interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
@@ -2041,6 +2275,9 @@
clock-names = "iface";
label = "WSA2";
+ pinctrl-0 = <&wsa2_swr_active>;
+ pinctrl-names = "default";
+
qcom,din-ports = <4>;
qcom,dout-ports = <9>;
@@ -2069,17 +2306,12 @@
<&lpass_vamacro>;
clock-names = "mclk", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>;
-
#clock-cells = <0>;
clock-output-names = "mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&rx_swr_active>;
#sound-dai-cells = <1>;
};
- swr1: soundwire-controller@6ad0000 {
+ swr1: soundwire@6ad0000 {
compatible = "qcom,soundwire-v2.0.0";
reg = <0 0x06ad0000 0 0x10000>;
interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
@@ -2087,18 +2319,21 @@
clock-names = "iface";
label = "RX";
- qcom,din-ports = <0>;
- qcom,dout-ports = <10>;
+ pinctrl-0 = <&rx_swr_active>;
+ pinctrl-names = "default";
- qcom,ports-sinterval = /bits/ 16 <0x03 0x3f 0x1f 0x07 0x00 0x18f 0xff 0xff 0xff 0xff>;
- qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x00 0x00 0xff 0xff 0xff 0xff>;
- qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00 0x00 0xff 0xff 0xff 0xff>;
- qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff>;
- qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff>;
- qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff 0x0f 0xff 0xff 0xff 0xff>;
- qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff 0x00 0xff 0xff 0xff 0xff>;
- qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00 0x00 0xff 0xff 0xff 0xff>;
- qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff>;
+ qcom,din-ports = <1>;
+ qcom,dout-ports = <11>;
+
+ qcom,ports-sinterval = /bits/ 16 <0x03 0x3f 0x1f 0x07 0x00 0x18f 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff 0x0f 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff 0x00 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff>;
#address-cells = <2>;
#size-cells = <0>;
@@ -2114,14 +2349,9 @@
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&lpass_vamacro>;
clock-names = "mclk", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
-
- assigned-clock-rates = <19200000>;
#clock-cells = <0>;
clock-output-names = "mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&tx_swr_active>;
#sound-dai-cells = <1>;
};
@@ -2134,17 +2364,12 @@
<&lpass_vamacro>;
clock-names = "mclk", "macro", "dcodec", "fsgen";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>;
-
#clock-cells = <0>;
clock-output-names = "mclk";
- pinctrl-names = "default";
- pinctrl-0 = <&wsa_swr_active>;
#sound-dai-cells = <1>;
};
- swr0: soundwire-controller@6b10000 {
+ swr0: soundwire@6b10000 {
compatible = "qcom,soundwire-v2.0.0";
reg = <0 0x06b10000 0 0x10000>;
interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
@@ -2152,6 +2377,9 @@
clock-names = "iface";
label = "WSA";
+ pinctrl-0 = <&wsa_swr_active>;
+ pinctrl-names = "default";
+
qcom,din-ports = <4>;
qcom,dout-ports = <9>;
@@ -2171,16 +2399,19 @@
status = "disabled";
};
- swr2: soundwire-controller@6d30000 {
+ swr2: soundwire@6d30000 {
compatible = "qcom,soundwire-v2.0.0";
reg = <0 0x06d30000 0 0x10000>;
interrupts = <GIC_SPI 496 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "core", "wakeup";
- clocks = <&lpass_vamacro>;
+ clocks = <&lpass_txmacro>;
clock-names = "iface";
label = "TX";
+ pinctrl-0 = <&tx_swr_active>;
+ pinctrl-names = "default";
+
qcom,din-ports = <4>;
qcom,dout-ports = <0>;
qcom,ports-sinterval-low = /bits/ 8 <0x01 0x01 0x03 0x03>;
@@ -2207,9 +2438,6 @@
<&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
clock-names = "mclk", "macro", "dcodec";
- assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
- assigned-clock-rates = <19200000>;
-
#clock-cells = <0>;
clock-output-names = "fsgen";
#sound-dai-cells = <1>;
@@ -2368,7 +2596,7 @@
iommus = <&apps_smmu 0x540 0>;
qcom,dll-config = <0x0007642c>;
qcom,ddr-config = <0x80040868>;
- power-domains = <&rpmhpd SM8550_CX>;
+ power-domains = <&rpmhpd RPMHPD_CX>;
operating-points-v2 = <&sdhc2_opp_table>;
interconnects = <&aggre2_noc MASTER_SDCC_2 0 &mc_virt SLAVE_EBI1 0>,
@@ -2412,6 +2640,20 @@
reg = <0 0x0aaf0000 0 0x10000>;
clocks = <&bi_tcxo_div2>,
<&gcc GCC_VIDEO_AHB_CLK>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+ camcc: clock-controller@ade0000 {
+ compatible = "qcom,sm8550-camcc";
+ reg = <0 0x0ade0000 0 0x20000>;
+ clocks = <&gcc GCC_CAMERA_AHB_CLK>,
+ <&bi_tcxo_div2>,
+ <&bi_tcxo_ao_div2>,
+ <&sleep_clk>;
power-domains = <&rpmhpd SM8550_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
@@ -2471,7 +2713,7 @@
"core",
"vsync";
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
assigned-clock-rates = <19200000>;
@@ -2560,7 +2802,7 @@
#sound-dai-cells = <0>;
operating-points-v2 = <&dp_opp_table>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
status = "disabled";
@@ -2628,7 +2870,7 @@
"iface",
"bus";
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
<&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
@@ -2723,7 +2965,7 @@
"iface",
"bus";
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>,
<&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>;
@@ -2798,7 +3040,7 @@
<0>,
<0>, /* dp3 */
<0>;
- power-domains = <&rpmhpd SM8550_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
required-opps = <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
@@ -2838,6 +3080,32 @@
#phy-cells = <1>;
status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_dp_qmpphy_out: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_dp_qmpphy_usb_ss_in: endpoint {
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_dp_qmpphy_dp_in: endpoint {
+ };
+ };
+ };
};
usb_1: usb@a6f8800 {
@@ -2866,8 +3134,8 @@
interrupts-extended = <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 17 IRQ_TYPE_LEVEL_HIGH>,
- <&pdc 15 IRQ_TYPE_EDGE_RISING>,
- <&pdc 14 IRQ_TYPE_EDGE_RISING>;
+ <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 14 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hs_phy_irq",
"ss_phy_irq",
"dm_hs_phy_irq",
@@ -3471,6 +3739,22 @@
bias-disable;
};
+ qup_uart14_default: qup-uart14-default-state {
+ /* TX, RX */
+ pins = "gpio78", "gpio79";
+ function = "qup2_se6";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_uart14_cts_rts: qup-uart14-cts-rts-state {
+ /* CTS, RTS */
+ pins = "gpio76", "gpio77";
+ function = "qup2_se6";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
sdc2_sleep: sdc2-sleep-state {
clk-pins {
pins = "sdc2_clk";
@@ -3517,103 +3801,103 @@
reg = <0 0x15000000 0 0x100000>;
#iommu-cells = <2>;
#global-interrupts = <1>;
- interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 706 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 706 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>;
};
intc: interrupt-controller@17100000 {
@@ -3933,8 +4217,8 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8550_LCX>,
- <&rpmhpd SM8550_LMX>;
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
power-domain-names = "lcx", "lmx";
interconnects = <&lpass_lpicx_noc MASTER_LPASS_PROC 0 &mc_virt SLAVE_EBI1 0>;
@@ -4065,9 +4349,9 @@
clocks = <&rpmhcc RPMH_CXO_CLK>;
clock-names = "xo";
- power-domains = <&rpmhpd SM8550_CX>,
- <&rpmhpd SM8550_MXC>,
- <&rpmhpd SM8550_NSP>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MXC>,
+ <&rpmhpd RPMHPD_NSP>;
power-domain-names = "cx", "mxc", "nsp";
interconnects = <&nsp_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>;
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8650-mtp.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8650-mtp.dts
new file mode 100644
index 000000000000..be133a3d5cbe
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8650-mtp.dts
@@ -0,0 +1,727 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8650.dtsi"
+#include "pm8010.dtsi"
+#include "pm8550.dtsi"
+#include "pm8550b.dtsi"
+#define PMK8550VE_SID 8
+#include "pm8550ve.dtsi"
+#include "pm8550vs.dtsi"
+#include "pmk8550.dtsi"
+#include "pmr735d_a.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. SM8650 MTP";
+ compatible = "qcom,sm8650-mtp", "qcom,sm8650";
+
+ aliases {
+ serial0 = &uart15;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ pmic-glink {
+ compatible = "qcom,sm8650-pmic-glink",
+ "qcom,sm8550-pmic-glink",
+ "qcom,pmic-glink";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
+
+ connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_hs_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_ss_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_ss>;
+ };
+ };
+ };
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8550-rpmh-regulators";
+
+ vdd-bob1-supply = <&vph_pwr>;
+ vdd-bob2-supply = <&vph_pwr>;
+ vdd-l2-l13-l14-supply = <&vreg_bob1>;
+ vdd-l3-supply = <&vreg_s1c_1p2>;
+ vdd-l5-l16-supply = <&vreg_bob1>;
+ vdd-l6-l7-supply = <&vreg_bob1>;
+ vdd-l8-l9-supply = <&vreg_bob1>;
+ vdd-l11-supply = <&vreg_s1c_1p2>;
+ vdd-l12-supply = <&vreg_s6c_1p8>;
+ vdd-l15-supply = <&vreg_s6c_1p8>;
+ vdd-l17-supply = <&vreg_bob2>;
+
+ qcom,pmic-id = "b";
+
+ vreg_bob1: bob1 {
+ regulator-name = "vreg_bob1";
+ regulator-min-microvolt = <3296000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob2: bob2 {
+ regulator-name = "vreg_bob2";
+ regulator-min-microvolt = <2720000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_3p0: ldo2 {
+ regulator-name = "vreg_l2b_3p0";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5b_3p1: ldo5 {
+ regulator-name = "vreg_l5b_3p1";
+ regulator-min-microvolt = <3104000>;
+ regulator-max-microvolt = <3104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p8: ldo6 {
+ regulator-name = "vreg_l6b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_1p8: ldo7 {
+ regulator-name = "vreg_l7b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_1p8: ldo8 {
+ regulator-name = "vreg_l8b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_2p9: ldo9 {
+ regulator-name = "vreg_l9b_2p9";
+ regulator-min-microvolt = <2960000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11b_1p2: ldo11 {
+ regulator-name = "vreg_l11b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_1p8: ldo12 {
+ regulator-name = "vreg_l12b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_3p0: ldo13 {
+ regulator-name = "vreg_l13b_3p0";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_3p2: ldo14 {
+ regulator-name = "vreg_l14b_3p2";
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_1p8: ldo15 {
+ regulator-name = "vreg_l15b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_2p8: ldo16 {
+ regulator-name = "vreg_l16b_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_2p5: ldo17 {
+ regulator-name = "vreg_l17b_2p5";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <2504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s1c_1p2>;
+ vdd-l2-supply = <&vreg_s1c_1p2>;
+ vdd-l3-supply = <&vreg_s1c_1p2>;
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+
+ qcom,pmic-id = "c";
+
+ vreg_s1c_1p2: smps1 {
+ regulator-name = "vreg_s1c_1p2";
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1348000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s2c_0p8: smps2 {
+ regulator-name = "vreg_s2c_0p8";
+ regulator-min-microvolt = <852000>;
+ regulator-max-microvolt = <1036000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s3c_0p9: smps3 {
+ regulator-name = "vreg_s3c_0p9";
+ regulator-min-microvolt = <976000>;
+ regulator-max-microvolt = <1064000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s4c_1p2: smps4 {
+ regulator-name = "vreg_s4c_1p2";
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1280000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s5c_0p7: smps5 {
+ regulator-name = "vreg_s5c_0p7";
+ regulator-min-microvolt = <752000>;
+ regulator-max-microvolt = <900000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s6c_1p8: smps6 {
+ regulator-name = "vreg_s6c_1p8";
+ regulator-min-microvolt = <1856000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1c_1p2: ldo1 {
+ regulator-name = "vreg_l1c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_1p2: ldo3 {
+ regulator-name = "vreg_l3c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s3c_0p9>;
+
+ qcom,pmic-id = "d";
+
+ vreg_l1d_0p88: ldo1 {
+ regulator-name = "vreg_l1d_0p88";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-3 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l3-supply = <&vreg_s3c_0p9>;
+
+ qcom,pmic-id = "e";
+
+ vreg_l3e_0p9: ldo3 {
+ regulator-name = "vreg_l3e_0p9";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-4 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s3c_0p9>;
+ vdd-l3-supply = <&vreg_s3c_0p9>;
+
+ qcom,pmic-id = "g";
+
+ vreg_l1g_0p91: ldo1 {
+ regulator-name = "vreg_l1g_0p91";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3g_0p91: ldo3 {
+ regulator-name = "vreg_l3g_0p91";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-5 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s3c_0p9>;
+ vdd-l2-supply = <&vreg_s3c_0p9>;
+ vdd-l3-supply = <&vreg_s1c_1p2>;
+ vdd-s4-supply = <&vph_pwr>;
+
+ qcom,pmic-id = "i";
+
+ vreg_s4i_0p85: smps4 {
+ regulator-name = "vreg_s4i_0p85";
+ regulator-min-microvolt = <852000>;
+ regulator-max-microvolt = <1004000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1i_0p88: ldo1 {
+ regulator-name = "vreg_l1i_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2i_0p88: ldo2 {
+ regulator-name = "vreg_l2i_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3i_1p2: ldo3 {
+ regulator-name = "vreg_l3i_0p91";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&dispcc {
+ status = "okay";
+};
+
+&lpass_tlmm {
+ spkr_1_sd_n_active: spkr-1-sd-n-active-state {
+ pins = "gpio21";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ output-low;
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&vreg_l3i_1p2>;
+
+ status = "okay";
+
+ panel@0 {
+ compatible = "visionox,vtdr6130";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
+
+ vddio-supply = <&vreg_l12b_1p8>;
+ vci-supply = <&vreg_l13b_3p0>;
+ vdd-supply = <&vreg_l11b_1p2>;
+
+ pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync_active>;
+ pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync_suspend>;
+ pinctrl-names = "default", "sleep";
+
+ port {
+ panel0_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ remote-endpoint = <&panel0_in>;
+ data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi0_phy {
+ vdds-supply = <&vreg_l1i_0p88>;
+
+ status = "okay";
+};
+
+&mdss_mdp {
+ status = "okay";
+};
+
+&pcie_1_phy_aux_clk {
+ clock-frequency = <1000>;
+};
+
+&pcie0 {
+ wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
+
+ pinctrl-0 = <&pcie0_default_state>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l1i_0p88>;
+ vdda-pll-supply = <&vreg_l3i_1p2>;
+
+ status = "okay";
+};
+
+&pcie1 {
+ wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>;
+
+ pinctrl-0 = <&pcie1_default_state>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&pcie1_phy {
+ vdda-phy-supply = <&vreg_l3e_0p9>;
+ vdda-pll-supply = <&vreg_l3i_1p2>;
+ vdda-qref-supply = <&vreg_l1i_0p88>;
+
+ status = "okay";
+};
+
+&pm8550_gpios {
+ sdc2_card_det_n: sdc2-card-det-state {
+ pins = "gpio12";
+ function = "normal";
+ bias-pull-up;
+ input-enable;
+ output-disable;
+ power-source = <1>; /* 1.8 V */
+ };
+};
+
+&pm8550b_eusb2_repeater {
+ vdd18-supply = <&vreg_l15b_1p8>;
+ vdd3-supply = <&vreg_l5b_3p1>;
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&remoteproc_adsp {
+ firmware-name = "qcom/sm8650/adsp.mbn",
+ "qcom/sm8650/adsp_dtb.mbn";
+
+ status = "okay";
+};
+
+&remoteproc_cdsp {
+ firmware-name = "qcom/sm8650/cdsp.mbn",
+ "qcom/sm8650/cdsp_dtb.mbn";
+
+ status = "okay";
+};
+
+&remoteproc_mpss {
+ firmware-name = "qcom/sm8650/modem.mbn",
+ "qcom/sm8650/modem_dtb.mbn";
+
+ status = "okay";
+};
+
+&sdhc_2 {
+ cd-gpios = <&pm8550_gpios 12 GPIO_ACTIVE_LOW>;
+
+ vmmc-supply = <&vreg_l9b_2p9>;
+ vqmmc-supply = <&vreg_l8b_1p8>;
+ bus-width = <4>;
+ no-sdio;
+ no-mmc;
+
+ pinctrl-0 = <&sdc2_default>, <&sdc2_card_det_n>;
+ pinctrl-1 = <&sdc2_sleep>, <&sdc2_card_det_n>;
+ pinctrl-names = "default", "sleep";
+
+ status = "okay";
+};
+
+&sleep_clk {
+ clock-frequency = <32000>;
+};
+
+&swr0 {
+ status = "okay";
+
+ /* WSA8845, Speaker Left */
+ left_spkr: speaker@0,0 {
+ compatible = "sdw20217020400";
+ reg = <0 0>;
+ pinctrl-0 = <&spkr_1_sd_n_active>;
+ pinctrl-names = "default";
+ powerdown-gpios = <&lpass_tlmm 21 GPIO_ACTIVE_LOW>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "SpkrLeft";
+ vdd-1p8-supply = <&vreg_l15b_1p8>;
+ vdd-io-supply = <&vreg_l3c_1p2>;
+ };
+
+ /* WSA8845, Speaker Right */
+ right_spkr: speaker@0,1 {
+ compatible = "sdw20217020400";
+ reg = <0 1>;
+ pinctrl-0 = <&spkr_2_sd_n_active>;
+ pinctrl-names = "default";
+ powerdown-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "SpkrRight";
+ vdd-1p8-supply = <&vreg_l15b_1p8>;
+ vdd-io-supply = <&vreg_l3c_1p2>;
+ };
+};
+
+&tlmm {
+ /* Reserved I/Os for NFC */
+ gpio-reserved-ranges = <32 8>, <74 1>;
+
+ disp0_reset_n_active: disp0-reset-n-active-state {
+ pins = "gpio133";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ disp0_reset_n_suspend: disp0-reset-n-suspend-state {
+ pins = "gpio133";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ mdp_vsync_active: mdp-vsync-active-state {
+ pins = "gpio86";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ mdp_vsync_suspend: mdp-vsync-suspend-state {
+ pins = "gpio86";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ spkr_2_sd_n_active: spkr-2-sd-n-active-state {
+ pins = "gpio77";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ output-low;
+ };
+};
+
+&uart15 {
+ status = "okay";
+};
+
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+ vcc-supply = <&vreg_l17b_2p5>;
+ vcc-max-microamp = <1300000>;
+ vccq-supply = <&vreg_l1c_1p2>;
+ vccq-max-microamp = <1200000>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l1d_0p88>;
+ vdda-pll-supply = <&vreg_l3i_1p2>;
+
+ status = "okay";
+};
+
+/*
+ * DPAUX -> WCD9395 -> USB_SBU -> USB-C
+ * eUSB2 DP/DM -> PM85550HS -> eUSB2 DP/DM -> USB-C
+ * USB SS -> USB-C
+ */
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "otg";
+ usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&pmic_glink_hs_in>;
+};
+
+&usb_1_dwc3_ss {
+ remote-endpoint = <&pmic_glink_ss_in>;
+};
+
+&usb_1_hsphy {
+ vdd-supply = <&vreg_l1i_0p88>;
+ vdda12-supply = <&vreg_l3i_1p2>;
+
+ phys = <&pm8550b_eusb2_repeater>;
+
+ status = "okay";
+};
+
+&usb_dp_qmpphy {
+ vdda-phy-supply = <&vreg_l3i_1p2>;
+ vdda-pll-supply = <&vreg_l3g_0p91>;
+
+ status = "okay";
+};
+
+&xo_board {
+ clock-frequency = <76800000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8650-qrd.dts b/sys/contrib/device-tree/src/arm64/qcom/sm8650-qrd.dts
new file mode 100644
index 000000000000..b9151c2ddf2e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8650-qrd.dts
@@ -0,0 +1,811 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8650.dtsi"
+#include "pm8010.dtsi"
+#include "pm8550.dtsi"
+#include "pm8550b.dtsi"
+#define PMK8550VE_SID 8
+#include "pm8550ve.dtsi"
+#include "pm8550vs.dtsi"
+#include "pmk8550.dtsi"
+#include "pmr735d_a.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. SM8650 QRD";
+ compatible = "qcom,sm8650-qrd", "qcom,sm8650";
+
+ aliases {
+ serial0 = &uart15;
+ serial1 = &uart14;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&volume_up_n>;
+ pinctrl-names = "default";
+
+ key-volume-up {
+ label = "Volume Up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ linux,can-disable;
+ wakeup-source;
+ };
+ };
+
+ pmic-glink {
+ compatible = "qcom,sm8650-pmic-glink",
+ "qcom,sm8550-pmic-glink",
+ "qcom,pmic-glink";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
+
+ connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_hs_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_ss_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_ss>;
+ };
+ };
+ };
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8550-rpmh-regulators";
+
+ vdd-bob1-supply = <&vph_pwr>;
+ vdd-bob2-supply = <&vph_pwr>;
+ vdd-l2-l13-l14-supply = <&vreg_bob1>;
+ vdd-l3-supply = <&vreg_s1c_1p2>;
+ vdd-l5-l16-supply = <&vreg_bob1>;
+ vdd-l6-l7-supply = <&vreg_bob1>;
+ vdd-l8-l9-supply = <&vreg_bob1>;
+ vdd-l11-supply = <&vreg_s1c_1p2>;
+ vdd-l12-supply = <&vreg_s6c_1p8>;
+ vdd-l15-supply = <&vreg_s6c_1p8>;
+ vdd-l17-supply = <&vreg_bob2>;
+
+ qcom,pmic-id = "b";
+
+ vreg_bob1: bob1 {
+ regulator-name = "vreg_bob1";
+ regulator-min-microvolt = <3296000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob2: bob2 {
+ regulator-name = "vreg_bob2";
+ regulator-min-microvolt = <2720000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_3p0: ldo2 {
+ regulator-name = "vreg_l2b_3p0";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5b_3p1: ldo5 {
+ regulator-name = "vreg_l5b_3p1";
+ regulator-min-microvolt = <3104000>;
+ regulator-max-microvolt = <3104000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p8: ldo6 {
+ regulator-name = "vreg_l6b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_1p8: ldo7 {
+ regulator-name = "vreg_l7b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_1p8: ldo8 {
+ regulator-name = "vreg_l8b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l11b_1p2: ldo11 {
+ regulator-name = "vreg_l11b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_1p8: ldo12 {
+ regulator-name = "vreg_l12b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_3p0: ldo13 {
+ regulator-name = "vreg_l13b_3p0";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_3p2: ldo14 {
+ regulator-name = "vreg_l14b_3p2";
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_1p8: ldo15 {
+ regulator-name = "vreg_l15b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_2p8: ldo16 {
+ regulator-name = "vreg_l16b_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_2p5: ldo17 {
+ regulator-name = "vreg_l17b_2p5";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <2504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s1c_1p2>;
+ vdd-l2-supply = <&vreg_s1c_1p2>;
+ vdd-l3-supply = <&vreg_s1c_1p2>;
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+ vdd-s3-supply = <&vph_pwr>;
+ vdd-s4-supply = <&vph_pwr>;
+ vdd-s5-supply = <&vph_pwr>;
+ vdd-s6-supply = <&vph_pwr>;
+
+ qcom,pmic-id = "c";
+
+ vreg_s1c_1p2: smps1 {
+ regulator-name = "vreg_s1c_1p2";
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1348000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s2c_0p8: smps2 {
+ regulator-name = "vreg_s2c_0p8";
+ regulator-min-microvolt = <852000>;
+ regulator-max-microvolt = <1036000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s3c_0p9: smps3 {
+ regulator-name = "vreg_s3c_0p9";
+ regulator-min-microvolt = <976000>;
+ regulator-max-microvolt = <1064000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s4c_1p2: smps4 {
+ regulator-name = "vreg_s4c_1p2";
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1280000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s5c_0p7: smps5 {
+ regulator-name = "vreg_s5c_0p7";
+ regulator-min-microvolt = <752000>;
+ regulator-max-microvolt = <900000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s6c_1p8: smps6 {
+ regulator-name = "vreg_s6c_1p8";
+ regulator-min-microvolt = <1856000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1c_1p2: ldo1 {
+ regulator-name = "vreg_l1c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_1p2: ldo3 {
+ regulator-name = "vreg_l3c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s3c_0p9>;
+
+ qcom,pmic-id = "d";
+
+ vreg_l1d_0p88: ldo1 {
+ regulator-name = "vreg_l1d_0p88";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-3 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l3-supply = <&vreg_s3c_0p9>;
+
+ qcom,pmic-id = "e";
+
+ vreg_l3e_0p9: ldo3 {
+ regulator-name = "vreg_l3e_0p9";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-4 {
+ compatible = "qcom,pm8550vs-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s3c_0p9>;
+ vdd-l3-supply = <&vreg_s3c_0p9>;
+
+ qcom,pmic-id = "g";
+
+ vreg_l1g_0p91: ldo1 {
+ regulator-name = "vreg_l1g_0p91";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3g_0p91: ldo3 {
+ regulator-name = "vreg_l3g_0p91";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-5 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+
+ vdd-l1-supply = <&vreg_s3c_0p9>;
+ vdd-l2-supply = <&vreg_s3c_0p9>;
+ vdd-l3-supply = <&vreg_s1c_1p2>;
+ vdd-s4-supply = <&vph_pwr>;
+
+ qcom,pmic-id = "i";
+
+ vreg_s4i_0p85: smps4 {
+ regulator-name = "vreg_s4i_0p85";
+ regulator-min-microvolt = <852000>;
+ regulator-max-microvolt = <1004000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1i_0p88: ldo1 {
+ regulator-name = "vreg_l1i_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2i_0p88: ldo2 {
+ regulator-name = "vreg_l2i_0p88";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3i_1p2: ldo3 {
+ regulator-name = "vreg_l3i_0p91";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&dispcc {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
+&ipa {
+ qcom,gsi-loader = "self";
+ memory-region = <&ipa_fw_mem>;
+ firmware-name = "qcom/sm8650/ipa_fws.mbn";
+ status = "okay";
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&vreg_l3i_1p2>;
+
+ status = "okay";
+
+ panel@0 {
+ compatible = "visionox,vtdr6130";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
+
+ vddio-supply = <&vreg_l12b_1p8>;
+ vci-supply = <&vreg_l13b_3p0>;
+ vdd-supply = <&vreg_l11b_1p2>;
+
+ pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync_active>;
+ pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync_suspend>;
+ pinctrl-names = "default", "sleep";
+
+ port {
+ panel0_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ remote-endpoint = <&panel0_in>;
+ data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi0_phy {
+ vdds-supply = <&vreg_l1i_0p88>;
+
+ status = "okay";
+};
+
+&mdss_mdp {
+ status = "okay";
+};
+
+&pcie_1_phy_aux_clk {
+ clock-frequency = <1000>;
+};
+
+&pcie0 {
+ wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+ perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
+
+ pinctrl-0 = <&pcie0_default_state>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&pcie0_phy {
+ vdda-phy-supply = <&vreg_l1i_0p88>;
+ vdda-pll-supply = <&vreg_l3i_1p2>;
+
+ status = "okay";
+};
+
+&pon_pwrkey {
+ status = "okay";
+};
+
+&pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+
+ status = "okay";
+};
+
+&pm8550_flash {
+ status = "okay";
+
+ led-0 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_YELLOW>;
+ led-sources = <1>, <4>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <2000000>;
+ flash-max-timeout-us = <1280000>;
+ function-enumerator = <0>;
+ };
+
+ led-1 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ led-sources = <2>, <3>;
+ led-max-microamp = <500000>;
+ flash-max-microamp = <2000000>;
+ flash-max-timeout-us = <1280000>;
+ function-enumerator = <1>;
+ };
+};
+
+&pm8550_gpios {
+ volume_up_n: volume-up-n-state {
+ pins = "gpio6";
+ function = "normal";
+ bias-pull-up;
+ input-enable;
+ power-source = <1>;
+ };
+};
+
+&pm8550_pwm {
+ status = "okay";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@3 {
+ reg = <3>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+};
+
+&pm8550b_eusb2_repeater {
+ vdd18-supply = <&vreg_l15b_1p8>;
+ vdd3-supply = <&vreg_l5b_3p1>;
+};
+
+&pmk8550_rtc {
+ status = "okay";
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&remoteproc_adsp {
+ firmware-name = "qcom/sm8650/adsp.mbn",
+ "qcom/sm8650/adsp_dtb.mbn";
+
+ status = "okay";
+};
+
+&remoteproc_cdsp {
+ firmware-name = "qcom/sm8650/cdsp.mbn",
+ "qcom/sm8650/cdsp_dtb.mbn";
+
+ status = "okay";
+};
+
+&remoteproc_mpss {
+ firmware-name = "qcom/sm8650/modem.mbn",
+ "qcom/sm8650/modem_dtb.mbn";
+
+ status = "okay";
+};
+
+&sleep_clk {
+ clock-frequency = <32000>;
+};
+
+&spi4 {
+ status = "okay";
+
+ touchscreen@0 {
+ compatible = "goodix,gt9916";
+ reg = <0>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <162 IRQ_TYPE_LEVEL_LOW>;
+
+ reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>;
+
+ avdd-supply = <&vreg_l14b_3p2>;
+
+ spi-max-frequency = <1000000>;
+
+ touchscreen-size-x = <1080>;
+ touchscreen-size-y = <2400>;
+
+ pinctrl-0 = <&ts_irq>, <&ts_reset>;
+ pinctrl-names = "default";
+ };
+};
+
+&tlmm {
+ /* Reserved I/Os for NFC */
+ gpio-reserved-ranges = <32 8>, <74 1>;
+
+ bt_default: bt-default-state {
+ bt-en-pins {
+ pins = "gpio17";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
+ sw-ctrl-pins {
+ pins = "gpio18";
+ function = "gpio";
+ bias-pull-down;
+ };
+ };
+
+ disp0_reset_n_active: disp0-reset-n-active-state {
+ pins = "gpio133";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ disp0_reset_n_suspend: disp0-reset-n-suspend-state {
+ pins = "gpio133";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ mdp_vsync_active: mdp-vsync-active-state {
+ pins = "gpio86";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ mdp_vsync_suspend: mdp-vsync-suspend-state {
+ pins = "gpio86";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ ts_irq: ts-irq-state {
+ pins = "gpio161";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ output-disable;
+ };
+
+ ts_reset: ts-reset-state {
+ pins = "gpio162";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+};
+
+&uart14 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn7850-bt";
+
+ clocks = <&rpmhcc RPMH_RF_CLK1>;
+
+ vddio-supply = <&vreg_l3c_1p2>;
+ vddaon-supply = <&vreg_l15b_1p8>;
+ vdddig-supply = <&vreg_s3c_0p9>;
+ vddrfa0p8-supply = <&vreg_s3c_0p9>;
+ vddrfa1p2-supply = <&vreg_s1c_1p2>;
+ vddrfa1p9-supply = <&vreg_s6c_1p8>;
+
+ max-speed = <3200000>;
+
+ enable-gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
+ swctrl-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&bt_default>;
+ pinctrl-names = "default";
+ };
+};
+
+&uart15 {
+ status = "okay";
+};
+
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+ vcc-supply = <&vreg_l17b_2p5>;
+ vcc-max-microamp = <1300000>;
+ vccq-supply = <&vreg_l1c_1p2>;
+ vccq-max-microamp = <1200000>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l1d_0p88>;
+ vdda-pll-supply = <&vreg_l3i_1p2>;
+
+ status = "okay";
+};
+
+/*
+ * DPAUX -> WCD9395 -> USB_SBU -> USB-C
+ * eUSB2 DP/DM -> PM85550HS -> eUSB2 DP/DM -> WCD9395 -> USB-C
+ * USB SS -> NB7VPQ904MMUTWG -> USB-C
+ */
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "otg";
+ usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&pmic_glink_hs_in>;
+};
+
+&usb_1_dwc3_ss {
+ remote-endpoint = <&pmic_glink_ss_in>;
+};
+
+&usb_1_hsphy {
+ vdd-supply = <&vreg_l1i_0p88>;
+ vdda12-supply = <&vreg_l3i_1p2>;
+
+ phys = <&pm8550b_eusb2_repeater>;
+
+ status = "okay";
+};
+
+&usb_dp_qmpphy {
+ vdda-phy-supply = <&vreg_l3i_1p2>;
+ vdda-pll-supply = <&vreg_l3g_0p91>;
+
+ status = "okay";
+};
+
+&xo_board {
+ clock-frequency = <76800000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/sm8650.dtsi b/sys/contrib/device-tree/src/arm64/qcom/sm8650.dtsi
new file mode 100644
index 000000000000..2df77123a8c7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/sm8650.dtsi
@@ -0,0 +1,6013 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sm8650-dispcc.h>
+#include <dt-bindings/clock/qcom,sm8650-gcc.h>
+#include <dt-bindings/clock/qcom,sm8650-gpucc.h>
+#include <dt-bindings/clock/qcom,sm8650-tcsr.h>
+#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
+#include <dt-bindings/interconnect/qcom,sm8650-rpmh.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/mailbox/qcom-ipcc.h>
+#include <dt-bindings/phy/phy-qcom-qmp.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
+#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/reset/qcom,sm8650-gpucc.h>
+#include <dt-bindings/soc/qcom,gpr.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
+#include <dt-bindings/thermal/thermal.h>
+
+/ {
+ interrupt-parent = <&intc>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ chosen { };
+
+ clocks {
+ xo_board: xo-board {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ sleep_clk: sleep-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+
+ bi_tcxo_div2: bi-tcxo-div2-clk {
+ compatible = "fixed-factor-clock";
+ #clock-cells = <0>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-mult = <1>;
+ clock-div = <2>;
+ };
+
+ bi_tcxo_ao_div2: bi-tcxo-ao-div2-clk {
+ compatible = "fixed-factor-clock";
+ #clock-cells = <0>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK_A>;
+ clock-mult = <1>;
+ clock-div = <2>;
+ };
+
+ pcie_1_phy_aux_clk: pcie-1-phy-aux-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ };
+ };
+
+ cpus {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ CPU0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a520";
+ reg = <0 0>;
+
+ clocks = <&cpufreq_hw 0>;
+
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ capacity-dmips-mhz = <1024>;
+ dynamic-power-coefficient = <100>;
+
+ qcom,freq-domain = <&cpufreq_hw 0>;
+
+ #cooling-cells = <2>;
+
+ L2_0: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+
+ L3_0: l3-cache {
+ compatible = "cache";
+ cache-level = <3>;
+ cache-unified;
+ };
+ };
+ };
+
+ CPU1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a520";
+ reg = <0 0x100>;
+
+ clocks = <&cpufreq_hw 0>;
+
+ power-domains = <&CPU_PD1>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ capacity-dmips-mhz = <1024>;
+ dynamic-power-coefficient = <100>;
+
+ qcom,freq-domain = <&cpufreq_hw 0>;
+
+ #cooling-cells = <2>;
+ };
+
+ CPU2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a720";
+ reg = <0 0x200>;
+
+ clocks = <&cpufreq_hw 3>;
+
+ power-domains = <&CPU_PD2>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_200>;
+ capacity-dmips-mhz = <1792>;
+ dynamic-power-coefficient = <238>;
+
+ qcom,freq-domain = <&cpufreq_hw 3>;
+
+ #cooling-cells = <2>;
+
+ L2_200: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a720";
+ reg = <0 0x300>;
+
+ clocks = <&cpufreq_hw 3>;
+
+ power-domains = <&CPU_PD3>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_200>;
+ capacity-dmips-mhz = <1792>;
+ dynamic-power-coefficient = <238>;
+
+ qcom,freq-domain = <&cpufreq_hw 3>;
+
+ #cooling-cells = <2>;
+ };
+
+ CPU4: cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a720";
+ reg = <0 0x400>;
+
+ clocks = <&cpufreq_hw 3>;
+
+ power-domains = <&CPU_PD4>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_400>;
+ capacity-dmips-mhz = <1792>;
+ dynamic-power-coefficient = <238>;
+
+ qcom,freq-domain = <&cpufreq_hw 3>;
+
+ #cooling-cells = <2>;
+
+ L2_400: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU5: cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a720";
+ reg = <0 0x500>;
+
+ clocks = <&cpufreq_hw 1>;
+
+ power-domains = <&CPU_PD5>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_500>;
+ capacity-dmips-mhz = <1792>;
+ dynamic-power-coefficient = <238>;
+
+ qcom,freq-domain = <&cpufreq_hw 1>;
+
+ #cooling-cells = <2>;
+
+ L2_500: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU6: cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a720";
+ reg = <0 0x600>;
+
+ clocks = <&cpufreq_hw 1>;
+
+ power-domains = <&CPU_PD6>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_600>;
+ capacity-dmips-mhz = <1792>;
+ dynamic-power-coefficient = <238>;
+
+ qcom,freq-domain = <&cpufreq_hw 1>;
+
+ #cooling-cells = <2>;
+
+ L2_600: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ CPU7: cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,cortex-x4";
+ reg = <0 0x700>;
+
+ clocks = <&cpufreq_hw 2>;
+
+ power-domains = <&CPU_PD7>;
+ power-domain-names = "psci";
+
+ enable-method = "psci";
+ next-level-cache = <&L2_700>;
+ capacity-dmips-mhz = <1894>;
+ dynamic-power-coefficient = <588>;
+
+ qcom,freq-domain = <&cpufreq_hw 2>;
+
+ #cooling-cells = <2>;
+
+ L2_700: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ next-level-cache = <&L3_0>;
+ };
+ };
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&CPU0>;
+ };
+
+ core1 {
+ cpu = <&CPU1>;
+ };
+
+ core2 {
+ cpu = <&CPU2>;
+ };
+
+ core3 {
+ cpu = <&CPU3>;
+ };
+
+ core4 {
+ cpu = <&CPU4>;
+ };
+
+ core5 {
+ cpu = <&CPU5>;
+ };
+
+ core6 {
+ cpu = <&CPU6>;
+ };
+
+ core7 {
+ cpu = <&CPU7>;
+ };
+ };
+ };
+
+ idle-states {
+ entry-method = "psci";
+
+ SILVER_CPU_SLEEP_0: cpu-sleep-0-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "silver-rail-power-collapse";
+ arm,psci-suspend-param = <0x40000004>;
+ entry-latency-us = <550>;
+ exit-latency-us = <750>;
+ min-residency-us = <6700>;
+ local-timer-stop;
+ };
+
+ GOLD_CPU_SLEEP_0: cpu-sleep-1-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "gold-rail-power-collapse";
+ arm,psci-suspend-param = <0x40000004>;
+ entry-latency-us = <600>;
+ exit-latency-us = <1300>;
+ min-residency-us = <8136>;
+ local-timer-stop;
+ };
+
+ GOLD_PLUS_CPU_SLEEP_0: cpu-sleep-2-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "gold-plus-rail-power-collapse";
+ arm,psci-suspend-param = <0x40000004>;
+ entry-latency-us = <500>;
+ exit-latency-us = <1350>;
+ min-residency-us = <7480>;
+ local-timer-stop;
+ };
+ };
+
+ domain-idle-states {
+ CLUSTER_SLEEP_0: cluster-sleep-0 {
+ compatible = "domain-idle-state";
+ arm,psci-suspend-param = <0x41000044>;
+ entry-latency-us = <750>;
+ exit-latency-us = <2350>;
+ min-residency-us = <9144>;
+ };
+
+ CLUSTER_SLEEP_1: cluster-sleep-1 {
+ compatible = "domain-idle-state";
+ arm,psci-suspend-param = <0x4100c344>;
+ entry-latency-us = <2800>;
+ exit-latency-us = <4400>;
+ min-residency-us = <10150>;
+ };
+ };
+ };
+
+ firmware {
+ scm: scm {
+ compatible = "qcom,scm-sm8650", "qcom,scm";
+ interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ };
+ };
+
+ clk_virt: interconnect-0 {
+ compatible = "qcom,sm8650-clk-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ mc_virt: interconnect-1 {
+ compatible = "qcom,sm8650-mc-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ memory@a0000000 {
+ device_type = "memory";
+ /* We expect the bootloader to fill in the size */
+ reg = <0 0xa0000000 0 0>;
+ };
+
+ pmu {
+ compatible = "arm,armv8-pmuv3";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+
+ CPU_PD0: power-domain-cpu0 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&SILVER_CPU_SLEEP_0>;
+ };
+
+ CPU_PD1: power-domain-cpu1 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&SILVER_CPU_SLEEP_0>;
+ };
+
+ CPU_PD2: power-domain-cpu2 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&SILVER_CPU_SLEEP_0>;
+ };
+
+ CPU_PD3: power-domain-cpu3 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&GOLD_CPU_SLEEP_0>;
+ };
+
+ CPU_PD4: power-domain-cpu4 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&GOLD_CPU_SLEEP_0>;
+ };
+
+ CPU_PD5: power-domain-cpu5 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&GOLD_CPU_SLEEP_0>;
+ };
+
+ CPU_PD6: power-domain-cpu6 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&GOLD_CPU_SLEEP_0>;
+ };
+
+ CPU_PD7: power-domain-cpu7 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD>;
+ domain-idle-states = <&GOLD_PLUS_CPU_SLEEP_0>;
+ };
+
+ CLUSTER_PD: power-domain-cluster {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_SLEEP_0>,
+ <&CLUSTER_SLEEP_1>;
+ };
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ hyp_mem: hyp@80000000 {
+ reg = <0 0x80000000 0 0xe00000>;
+ no-map;
+ };
+
+ cpusys_vm_mem: cpusys-vm@80e00000 {
+ reg = <0 0x80e00000 0 0x400000>;
+ no-map;
+ };
+
+ /* Merged xbl_dtlog, xbl_ramdump and aop_image regions */
+ xbl_dt_log_merged_mem: xbl-dt-log-merged@81a00000 {
+ reg = <0 0x81a00000 0 0x260000>;
+ no-map;
+ };
+
+ aop_cmd_db_mem: aop-cmd-db@81c60000 {
+ compatible = "qcom,cmd-db";
+ reg = <0 0x81c60000 0 0x20000>;
+ no-map;
+ };
+
+ /* Merged aop_config, tme_crash_dump, tme_log and uefi_log regions */
+ aop_tme_uefi_merged_mem: aop-tme-uefi-merged@81c80000 {
+ reg = <0 0x81c80000 0 0x74000>;
+ no-map;
+ };
+
+ /* Secdata region can be reused by apps */
+
+ smem: smem@81d00000 {
+ compatible = "qcom,smem";
+ reg = <0 0x81d00000 0 0x200000>;
+ hwlocks = <&tcsr_mutex 3>;
+ no-map;
+ };
+
+ adsp_mhi_mem: adsp-mhi@81f00000 {
+ reg = <0 0x81f00000 0 0x20000>;
+ no-map;
+ };
+
+ pvmfw_mem: pvmfw@824a0000 {
+ reg = <0 0x824a0000 0 0x100000>;
+ no-map;
+ };
+
+ global_sync_mem: global-sync@82600000 {
+ reg = <0 0x82600000 0 0x100000>;
+ no-map;
+ };
+
+ tz_stat_mem: tz-stat@82700000 {
+ reg = <0 0x82700000 0 0x100000>;
+ no-map;
+ };
+
+ qdss_mem: qdss@82800000 {
+ reg = <0 0x82800000 0 0x2000000>;
+ no-map;
+ };
+
+ mpss_dsm_mem: mpss-dsm@86b00000 {
+ reg = <0 0x86b00000 0 0x4900000>;
+ no-map;
+ };
+
+ mpss_dsm_mem_2: mpss-dsm-2@8b400000 {
+ reg = <0 0x8b400000 0 0x800000>;
+ no-map;
+ };
+
+ mpss_mem: mpss@8bc00000 {
+ reg = <0 0x8bc00000 0 0xf400000>;
+ no-map;
+ };
+
+ q6_mpss_dtb_mem: q6-mpss-dtb@9b000000 {
+ reg = <0 0x9b000000 0 0x80000>;
+ no-map;
+ };
+
+ ipa_fw_mem: ipa-fw@9b080000 {
+ reg = <0 0x9b080000 0 0x10000>;
+ no-map;
+ };
+
+ ipa_gsi_mem: ipa-gsi@9b090000 {
+ reg = <0 0x9b090000 0 0xa000>;
+ no-map;
+ };
+
+ gpu_micro_code_mem: gpu-micro-code@9b09a000 {
+ reg = <0 0x9b09a000 0 0x2000>;
+ no-map;
+ };
+
+ spss_region_mem: spss@9b0a0000 {
+ reg = <0 0x9b0a0000 0 0x1e0000>;
+ no-map;
+ };
+
+ /* First part of the "SPU secure shared memory" region */
+ spu_tz_shared_mem: spu-tz-shared@9b280000 {
+ reg = <0 0x9b280000 0 0x60000>;
+ no-map;
+ };
+
+ /* Second part of the "SPU secure shared memory" region */
+ spu_modem_shared_mem: spu-modem-shared@9b2e0000 {
+ reg = <0 0x9b2e0000 0 0x20000>;
+ no-map;
+ };
+
+ camera_mem: camera@9b300000 {
+ reg = <0 0x9b300000 0 0x800000>;
+ no-map;
+ };
+
+ video_mem: video@9bb00000 {
+ reg = <0 0x9bb00000 0 0x800000>;
+ no-map;
+ };
+
+ cvp_mem: cvp@9c300000 {
+ reg = <0 0x9c300000 0 0x700000>;
+ no-map;
+ };
+
+ cdsp_mem: cdsp@9ca00000 {
+ reg = <0 0x9ca00000 0 0x1400000>;
+ no-map;
+ };
+
+ q6_cdsp_dtb_mem: q6-cdsp-dtb@9de00000 {
+ reg = <0 0x9de00000 0 0x80000>;
+ no-map;
+ };
+
+ q6_adsp_dtb_mem: q6-adsp-dtb@9de80000 {
+ reg = <0 0x9de80000 0 0x80000>;
+ no-map;
+ };
+
+ adspslpi_mem: adspslpi@9df00000 {
+ reg = <0 0x9df00000 0 0x4080000>;
+ no-map;
+ };
+
+ rmtfs_mem: rmtfs@d7c00000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0 0xd7c00000 0 0x400000>;
+ no-map;
+
+ qcom,client-id = <1>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
+ };
+
+ /* Merged tz_reserved, xbl_sc, cpucp_fw and qtee regions */
+ tz_merged_mem: tz-merged@d8000000 {
+ reg = <0 0xd8000000 0 0x800000>;
+ no-map;
+ };
+
+ hwfence_shbuf: hwfence-shbuf@e6440000 {
+ reg = <0 0xe6440000 0 0x2dd000>;
+ no-map;
+ };
+
+ trust_ui_vm_mem: trust-ui-vm@f3800000 {
+ reg = <0 0xf3800000 0 0x4400000>;
+ no-map;
+ };
+
+ oem_vm_mem: oem-vm@f7c00000 {
+ reg = <0 0xf7c00000 0 0x4c00000>;
+ no-map;
+ };
+
+ llcc_lpi_mem: llcc-lpi@ff800000 {
+ reg = <0 0xff800000 0 0x600000>;
+ no-map;
+ };
+ };
+
+ smp2p-adsp {
+ compatible = "qcom,smp2p";
+
+ interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_SMP2P
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_SMP2P>;
+
+ qcom,smem = <443>, <429>;
+ qcom,local-pid = <0>;
+ qcom,remote-pid = <2>;
+
+ smp2p_adsp_out: master-kernel {
+ qcom,entry-name = "master-kernel";
+ #qcom,smem-state-cells = <1>;
+ };
+
+ smp2p_adsp_in: slave-kernel {
+ qcom,entry-name = "slave-kernel";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
+ smp2p-cdsp {
+ compatible = "qcom,smp2p";
+
+ interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
+ IPCC_MPROC_SIGNAL_SMP2P
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_CDSP
+ IPCC_MPROC_SIGNAL_SMP2P>;
+
+ qcom,smem = <94>, <432>;
+ qcom,local-pid = <0>;
+ qcom,remote-pid = <5>;
+
+ smp2p_cdsp_out: master-kernel {
+ qcom,entry-name = "master-kernel";
+ #qcom,smem-state-cells = <1>;
+ };
+
+ smp2p_cdsp_in: slave-kernel {
+ qcom,entry-name = "slave-kernel";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
+ smp2p-modem {
+ compatible = "qcom,smp2p";
+
+ interrupts-extended = <&ipcc IPCC_CLIENT_MPSS
+ IPCC_MPROC_SIGNAL_SMP2P
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_MPSS
+ IPCC_MPROC_SIGNAL_SMP2P>;
+
+ qcom,smem = <435>, <428>;
+ qcom,local-pid = <0>;
+ qcom,remote-pid = <1>;
+
+ smp2p_modem_out: master-kernel {
+ qcom,entry-name = "master-kernel";
+ #qcom,smem-state-cells = <1>;
+ };
+
+ smp2p_modem_in: slave-kernel {
+ qcom,entry-name = "slave-kernel";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ ipa_smp2p_out: ipa-ap-to-modem {
+ qcom,entry-name = "ipa";
+ #qcom,smem-state-cells = <1>;
+ };
+
+ ipa_smp2p_in: ipa-modem-to-ap {
+ qcom,entry-name = "ipa";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-ranges = <0 0 0 0 0x10 0>;
+ ranges = <0 0 0 0 0x10 0>;
+
+ gcc: clock-controller@100000 {
+ compatible = "qcom,sm8650-gcc";
+ reg = <0 0x00100000 0 0x1f4200>;
+
+ clocks = <&bi_tcxo_div2>,
+ <&bi_tcxo_ao_div2>,
+ <&sleep_clk>,
+ <&pcie0_phy>,
+ <&pcie1_phy>,
+ <&pcie_1_phy_aux_clk>,
+ <&ufs_mem_phy 0>,
+ <&ufs_mem_phy 1>,
+ <&ufs_mem_phy 2>,
+ <&usb_dp_qmpphy QMP_USB43DP_USB3_PIPE_CLK>;
+
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+ ipcc: mailbox@406000 {
+ compatible = "qcom,sm8650-ipcc", "qcom,ipcc";
+ reg = <0 0x00406000 0 0x1000>;
+
+ interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <3>;
+
+ #mbox-cells = <2>;
+ };
+
+ gpi_dma2: dma-controller@800000 {
+ compatible = "qcom,sm8650-gpi-dma", "qcom,sm6350-gpi-dma";
+ reg = <0 0x00800000 0 0x60000>;
+
+ interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 590 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 591 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 592 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 593 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 594 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 595 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 596 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 597 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 598 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 599 IRQ_TYPE_LEVEL_HIGH>;
+
+ dma-channels = <12>;
+ dma-channel-mask = <0x3f>;
+ #dma-cells = <3>;
+
+ iommus = <&apps_smmu 0x436 0>;
+
+ dma-coherent;
+
+ status = "disabled";
+ };
+
+ qupv3_id_1: geniqup@8c0000 {
+ compatible = "qcom,geni-se-qup";
+ reg = <0 0x008c0000 0 0x2000>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP_2_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_2_S_AHB_CLK>;
+ clock-names = "m-ahb",
+ "s-ahb";
+
+ iommus = <&apps_smmu 0x423 0>;
+
+ dma-coherent;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ i2c8: i2c@880000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00880000 0 0x4000>;
+
+ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 0 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 0 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c8_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi8: spi@880000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00880000 0 0x4000>;
+
+ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 0 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 0 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi8_data_clk>, <&qup_spi8_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c9: i2c@884000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00884000 0 0x4000>;
+
+ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 1 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 1 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c9_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi9: spi@884000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00884000 0 0x4000>;
+
+ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 1 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 1 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi9_data_clk>, <&qup_spi9_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c10: i2c@888000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00888000 0 0x4000>;
+
+ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 2 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 2 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c10_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi10: spi@888000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00888000 0 0x4000>;
+
+ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 2 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 2 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi10_data_clk>, <&qup_spi10_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c11: i2c@88c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x0088c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 3 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 3 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c11_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi11: spi@88c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x0088c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 3 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 3 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi11_data_clk>, <&qup_spi11_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c12: i2c@890000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00890000 0 0x4000>;
+
+ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 4 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 4 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c12_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi12: spi@890000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00890000 0 0x4000>;
+
+ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 4 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 4 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi12_data_clk>, <&qup_spi12_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c13: i2c@894000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00894000 0 0x4000>;
+
+ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 5 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 5 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c13_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi13: spi@894000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00894000 0 0x4000>;
+
+ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 5 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 5 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi13_data_clk>, <&qup_spi13_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ uart14: serial@898000 {
+ compatible = "qcom,geni-uart";
+ reg = <0 0x00898000 0 0x4000>;
+
+ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&qup_uart14_default>, <&qup_uart14_cts_rts>;
+ pinctrl-names = "default";
+
+ status = "disabled";
+ };
+
+ uart15: serial@89c000 {
+ compatible = "qcom,geni-debug-uart";
+ reg = <0 0x0089c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&qup_uart15_default>;
+ pinctrl-names = "default";
+
+ status = "disabled";
+ };
+ };
+
+ i2c_master_hub_0: geniqup@9c0000 {
+ compatible = "qcom,geni-se-i2c-master-hub";
+ reg = <0 0x009c0000 0 0x2000>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S_AHB_CLK>;
+ clock-names = "s-ahb";
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ i2c_hub_0: i2c@980000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x00980000 0 0x4000>;
+
+ interrupts = <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S0_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c0_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_1: i2c@984000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x00984000 0 0x4000>;
+
+ interrupts = <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S1_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c1_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_2: i2c@988000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x00988000 0 0x4000>;
+
+ interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S2_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c2_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_3: i2c@98c000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x0098c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S3_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c3_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_4: i2c@990000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x00990000 0 0x4000>;
+
+ interrupts = <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S4_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c4_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_5: i2c@994000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x00994000 0 0x4000>;
+
+ interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S5_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c5_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_6: i2c@998000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x00998000 0 0x4000>;
+
+ interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S6_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c6_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_7: i2c@99c000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x0099c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S7_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c7_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_8: i2c@9a0000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x009a0000 0 0x4000>;
+
+ interrupts = <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S8_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c8_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c_hub_9: i2c@9a4000 {
+ compatible = "qcom,geni-i2c-master-hub";
+ reg = <0 0x009a4000 0 0x4000>;
+
+ interrupts = <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_I2C_S9_CLK>,
+ <&gcc GCC_QUPV3_I2C_CORE_CLK>;
+ clock-names = "se",
+ "core";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_I2C QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&hub_i2c9_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ gpi_dma1: dma-controller@a00000 {
+ compatible = "qcom,sm8650-gpi-dma", "qcom,sm6350-gpi-dma";
+ reg = <0 0x00a00000 0 0x60000>;
+
+ interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 284 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 295 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>;
+
+ dma-channels = <12>;
+ dma-channel-mask = <0xc>;
+ #dma-cells = <3>;
+
+ iommus = <&apps_smmu 0xb6 0>;
+ dma-coherent;
+
+ status = "disabled";
+ };
+
+ qupv3_id_0: geniqup@ac0000 {
+ compatible = "qcom,geni-se-qup";
+ reg = <0 0x00ac0000 0 0x2000>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
+ clock-names = "m-ahb",
+ "s-ahb";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core";
+
+ iommus = <&apps_smmu 0xa3 0>;
+
+ dma-coherent;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ i2c0: i2c@a80000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a80000 0 0x4000>;
+
+ interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 0 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 0 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c0_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi0: spi@a80000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a80000 0 0x4000>;
+
+ interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 0 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 0 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c1: i2c@a84000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a84000 0 0x4000>;
+
+ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 1 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 1 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c1_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi1: spi@a84000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a84000 0 0x4000>;
+
+ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 1 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 1 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi1_data_clk>, <&qup_spi1_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c2: i2c@a88000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a88000 0 0x4000>;
+
+ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 2 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 2 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c2_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi2: spi@a88000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a88000 0 0x4000>;
+
+ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 2 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 2 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi2_data_clk>, <&qup_spi2_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c3: i2c@a8c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a8c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 3 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 3 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c3_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi3: spi@a8c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a8c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 3 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 3 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi3_data_clk>, <&qup_spi3_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c4: i2c@a90000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a90000 0 0x4000>;
+
+ interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 4 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 4 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c4_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi4: spi@a90000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a90000 0 0x4000>;
+
+ interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 4 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 4 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi4_data_clk>, <&qup_spi4_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c5: i2c@a94000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a94000 0 0x4000>;
+
+ interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 5 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 5 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c5_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi5: spi@a94000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a94000 0 0x4000>;
+
+ interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 5 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 5 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi5_data_clk>, <&qup_spi5_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c6: i2c@a98000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a98000 0 0x4000>;
+
+ interrupts = <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 6 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 6 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c6_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi6: spi@a98000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a98000 0 0x4000>;
+
+ interrupts = <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 6 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 6 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi6_data_clk>, <&qup_spi6_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c7: i2c@a9c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a9c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 579 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 7 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 7 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c7_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi7: spi@a9c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a9c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 579 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 7 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 7 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi7_data_clk>, <&qup_spi7_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ cnoc_main: interconnect@1500000 {
+ compatible = "qcom,sm8650-cnoc-main";
+ reg = <0 0x01500000 0 0x14080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ config_noc: interconnect@1600000 {
+ compatible = "qcom,sm8650-config-noc";
+ reg = <0 0x01600000 0 0x6200>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ system_noc: interconnect@1680000 {
+ compatible = "qcom,sm8650-system-noc";
+ reg = <0 0x01680000 0 0x1d080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ pcie_noc: interconnect@16c0000 {
+ compatible = "qcom,sm8650-pcie-anoc";
+ reg = <0 0x016c0000 0 0x12200>;
+
+ clocks = <&gcc GCC_AGGRE_NOC_PCIE_AXI_CLK>,
+ <&gcc GCC_CFG_NOC_PCIE_ANOC_AHB_CLK>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ aggre1_noc: interconnect@16e0000 {
+ compatible = "qcom,sm8650-aggre1-noc";
+ reg = <0 0x016e0000 0 0x16400>;
+
+ clocks = <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ aggre2_noc: interconnect@1700000 {
+ compatible = "qcom,sm8650-aggre2-noc";
+ reg = <0 0x01700000 0 0x1e400>;
+
+ clocks = <&rpmhcc RPMH_IPA_CLK>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ mmss_noc: interconnect@1780000 {
+ compatible = "qcom,sm8650-mmss-noc";
+ reg = <0 0x01780000 0 0x5b800>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ rng: rng@10c3000 {
+ compatible = "qcom,sm8650-trng", "qcom,trng";
+ reg = <0 0x010c3000 0 0x1000>;
+ };
+
+ pcie0: pci@1c00000 {
+ device_type = "pci";
+ compatible = "qcom,pcie-sm8650", "qcom,pcie-sm8550";
+ reg = <0 0x01c00000 0 0x3000>,
+ <0 0x60000000 0 0xf1d>,
+ <0 0x60000f20 0 0xa8>,
+ <0 0x60001000 0 0x1000>,
+ <0 0x60100000 0 0x100000>;
+ reg-names = "parf", "dbi", "elbi", "atu", "config";
+
+ interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi";
+
+ clocks = <&gcc GCC_PCIE_0_AUX_CLK>,
+ <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
+ <&gcc GCC_PCIE_0_SLV_AXI_CLK>,
+ <&gcc GCC_PCIE_0_SLV_Q2A_AXI_CLK>,
+ <&gcc GCC_DDRSS_PCIE_SF_QTB_CLK>,
+ <&gcc GCC_AGGRE_NOC_PCIE_AXI_CLK>,
+ <&gcc GCC_CNOC_PCIE_SF_AXI_CLK>;
+ clock-names = "aux",
+ "cfg",
+ "bus_master",
+ "bus_slave",
+ "slave_q2a",
+ "ddrss_sf_tbu",
+ "noc_aggr",
+ "cnoc_sf_axi";
+
+ resets = <&gcc GCC_PCIE_0_BCR>;
+ reset-names = "pci";
+
+ interconnects = <&pcie_noc MASTER_PCIE_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &cnoc_main SLAVE_PCIE_0 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "pcie-mem",
+ "cpu-pcie";
+
+ power-domains = <&gcc PCIE_0_GDSC>;
+
+ iommu-map = <0 &apps_smmu 0x1400 0x1>,
+ <0x100 &apps_smmu 0x1401 0x1>;
+
+ interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc 0 0 0 151 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc 0 0 0 152 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ #interrupt-cells = <1>;
+
+ linux,pci-domain = <0>;
+ num-lanes = <2>;
+ bus-range = <0 0xff>;
+
+ phys = <&pcie0_phy>;
+ phy-names = "pciephy";
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0 0x00000000 0 0x60200000 0 0x100000>,
+ <0x02000000 0 0x60300000 0 0x60300000 0 0x3d00000>;
+
+ dma-coherent;
+
+ status = "disabled";
+ };
+
+ pcie0_phy: phy@1c06000 {
+ compatible = "qcom,sm8650-qmp-gen3x2-pcie-phy";
+ reg = <0 0x01c06000 0 0x2000>;
+
+ clocks = <&gcc GCC_PCIE_0_AUX_CLK>,
+ <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
+ <&tcsr TCSR_PCIE_0_CLKREF_EN>,
+ <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_0_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "rchng",
+ "pipe";
+
+ assigned-clocks = <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>;
+ assigned-clock-rates = <100000000>;
+
+ resets = <&gcc GCC_PCIE_0_PHY_BCR>;
+ reset-names = "phy";
+
+ power-domains = <&gcc PCIE_0_PHY_GDSC>;
+
+ #clock-cells = <0>;
+ clock-output-names = "pcie0_pipe_clk";
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ pcie1: pci@1c08000 {
+ device_type = "pci";
+ compatible = "qcom,pcie-sm8650", "qcom,pcie-sm8550";
+ reg = <0 0x01c08000 0 0x3000>,
+ <0 0x40000000 0 0xf1d>,
+ <0 0x40000f20 0 0xa8>,
+ <0 0x40001000 0 0x1000>,
+ <0 0x40100000 0 0x100000>;
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config";
+
+ interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi";
+
+ clocks = <&gcc GCC_PCIE_1_AUX_CLK>,
+ <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_1_MSTR_AXI_CLK>,
+ <&gcc GCC_PCIE_1_SLV_AXI_CLK>,
+ <&gcc GCC_PCIE_1_SLV_Q2A_AXI_CLK>,
+ <&gcc GCC_DDRSS_PCIE_SF_QTB_CLK>,
+ <&gcc GCC_AGGRE_NOC_PCIE_AXI_CLK>,
+ <&gcc GCC_CNOC_PCIE_SF_AXI_CLK>;
+ clock-names = "aux",
+ "cfg",
+ "bus_master",
+ "bus_slave",
+ "slave_q2a",
+ "ddrss_sf_tbu",
+ "noc_aggr",
+ "cnoc_sf_axi";
+
+ assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ resets = <&gcc GCC_PCIE_1_BCR>,
+ <&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
+ reset-names = "pci",
+ "link_down";
+
+ interconnects = <&pcie_noc MASTER_PCIE_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &cnoc_main SLAVE_PCIE_1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "pcie-mem",
+ "cpu-pcie";
+
+ power-domains = <&gcc PCIE_1_GDSC>;
+
+ iommu-map = <0 &apps_smmu 0x1480 0x1>,
+ <0x100 &apps_smmu 0x1481 0x1>;
+
+ interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc 0 0 0 438 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc 0 0 0 439 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ #interrupt-cells = <1>;
+
+ linux,pci-domain = <1>;
+ num-lanes = <2>;
+ bus-range = <0 0xff>;
+
+ phys = <&pcie1_phy>;
+ phy-names = "pciephy";
+
+ dma-coherent;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges = <0x01000000 0 0x00000000 0 0x40200000 0 0x100000>,
+ <0x02000000 0 0x40300000 0 0x40300000 0 0x1fd00000>;
+
+ status = "disabled";
+ };
+
+ pcie1_phy: phy@1c0e000 {
+ compatible = "qcom,sm8650-qmp-gen4x2-pcie-phy";
+ reg = <0 0x01c0e000 0 0x2000>;
+
+ clocks = <&gcc GCC_PCIE_1_PHY_AUX_CLK>,
+ <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
+ <&tcsr TCSR_PCIE_1_CLKREF_EN>,
+ <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>,
+ <&gcc GCC_PCIE_1_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "rchng",
+ "pipe";
+
+ assigned-clocks = <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>;
+ assigned-clock-rates = <100000000>;
+
+ resets = <&gcc GCC_PCIE_1_PHY_BCR>,
+ <&gcc GCC_PCIE_1_NOCSR_COM_PHY_BCR>;
+ reset-names = "phy",
+ "phy_nocsr";
+
+ power-domains = <&gcc PCIE_1_PHY_GDSC>;
+
+ #clock-cells = <0>;
+ clock-output-names = "pcie1_pipe_clk";
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ cryptobam: dma-controller@1dc4000 {
+ compatible = "qcom,bam-v1.7.0";
+ reg = <0 0x01dc4000 0 0x28000>;
+
+ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+
+ #dma-cells = <1>;
+
+ iommus = <&apps_smmu 0x480 0>,
+ <&apps_smmu 0x481 0>;
+
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ };
+
+ crypto: crypto@1dfa000 {
+ compatible = "qcom,sm8650-qce", "qcom,sm8150-qce", "qcom,qce";
+ reg = <0 0x01dfa000 0 0x6000>;
+
+ interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "memory";
+
+ dmas = <&cryptobam 4>, <&cryptobam 5>;
+ dma-names = "rx", "tx";
+
+ iommus = <&apps_smmu 0x480 0>,
+ <&apps_smmu 0x481 0>;
+ };
+
+ ufs_mem_phy: phy@1d80000 {
+ compatible = "qcom,sm8650-qmp-ufs-phy";
+ reg = <0 0x01d80000 0 0x2000>;
+
+ clocks = <&tcsr TCSR_UFS_CLKREF_EN>,
+ <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+ clock-names = "ref",
+ "ref_aux";
+
+ resets = <&ufs_mem_hc 0>;
+ reset-names = "ufsphy";
+
+ power-domains = <&gcc UFS_MEM_PHY_GDSC>;
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ ufs_mem_hc: ufs@1d84000 {
+ compatible = "qcom,sm8650-ufshc", "qcom,ufshc", "jedec,ufs-2.0";
+ reg = <0 0x01d84000 0 0x3000>;
+
+ interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
+ <&gcc GCC_UFS_PHY_AHB_CLK>,
+ <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>,
+ <&tcsr TCSR_UFS_PAD_CLKREF_EN>,
+ <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
+ clock-names = "core_clk",
+ "bus_aggr_clk",
+ "iface_clk",
+ "core_clk_unipro",
+ "ref_clk",
+ "tx_lane0_sync_clk",
+ "rx_lane0_sync_clk",
+ "rx_lane1_sync_clk";
+ freq-table-hz = <100000000 403000000>,
+ <0 0>,
+ <0 0>,
+ <100000000 403000000>,
+ <100000000 403000000>,
+ <0 0>,
+ <0 0>,
+ <0 0>;
+
+ resets = <&gcc GCC_UFS_PHY_BCR>;
+ reset-names = "rst";
+
+ interconnects = <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_UFS_MEM_CFG QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "ufs-ddr",
+ "cpu-ufs";
+
+ power-domains = <&gcc UFS_PHY_GDSC>;
+ required-opps = <&rpmhpd_opp_nom>;
+
+ iommus = <&apps_smmu 0x60 0>;
+
+ lanes-per-direction = <2>;
+ qcom,ice = <&ice>;
+
+ phys = <&ufs_mem_phy>;
+ phy-names = "ufsphy";
+
+ #reset-cells = <1>;
+
+ status = "disabled";
+ };
+
+ ice: crypto@1d88000 {
+ compatible = "qcom,sm8650-inline-crypto-engine",
+ "qcom,inline-crypto-engine";
+ reg = <0 0x01d88000 0 0x8000>;
+
+ clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
+ };
+
+ tcsr_mutex: hwlock@1f40000 {
+ compatible = "qcom,tcsr-mutex";
+ reg = <0 0x01f40000 0 0x20000>;
+
+ #hwlock-cells = <1>;
+ };
+
+ tcsr: clock-controller@1fc0000 {
+ compatible = "qcom,sm8650-tcsr", "syscon";
+ reg = <0 0x01fc0000 0 0xa0000>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+ gpucc: clock-controller@3d90000 {
+ compatible = "qcom,sm8650-gpucc";
+ reg = <0 0x03d90000 0 0xa000>;
+
+ clocks = <&bi_tcxo_div2>,
+ <&gcc GCC_GPU_GPLL0_CLK_SRC>,
+ <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
+
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+ ipa: ipa@3f40000 {
+ compatible = "qcom,sm8650-ipa", "qcom,sm8550-ipa";
+
+ iommus = <&apps_smmu 0x4a0 0x0>,
+ <&apps_smmu 0x4a2 0x0>;
+ reg = <0 0x3f40000 0 0x10000>,
+ <0 0x3f50000 0 0x5000>,
+ <0 0x3e04000 0 0xfc000>;
+ reg-names = "ipa-reg",
+ "ipa-shared",
+ "gsi";
+
+ interrupts-extended = <&intc GIC_SPI 654 IRQ_TYPE_EDGE_RISING>,
+ <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
+ <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ipa",
+ "gsi",
+ "ipa-clock-query",
+ "ipa-setup-ready";
+
+ clocks = <&rpmhcc RPMH_IPA_CLK>;
+ clock-names = "core";
+
+ interconnects = <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>;
+ interconnect-names = "memory",
+ "config";
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&ipa_smp2p_out 0>,
+ <&ipa_smp2p_out 1>;
+ qcom,smem-state-names = "ipa-clock-enabled-valid",
+ "ipa-clock-enabled";
+
+ status = "disabled";
+ };
+
+ remoteproc_mpss: remoteproc@4080000 {
+ compatible = "qcom,sm8650-mpss-pas";
+ reg = <0 0x04080000 0 0x4040>;
+
+ interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_modem_in 3 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_modem_in 7 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack",
+ "shutdown-ack";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ interconnects = <&mc_virt MASTER_LLCC QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MSS>;
+ power-domain-names = "cx",
+ "mss";
+
+ memory-region = <&mpss_mem>, <&q6_mpss_dtb_mem>,
+ <&mpss_dsm_mem>, <&mpss_dsm_mem_2>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&smp2p_modem_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ glink-edge {
+ interrupts-extended = <&ipcc IPCC_CLIENT_MPSS
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_MPSS
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ qcom,remote-pid = <1>;
+
+ label = "mpss";
+ };
+ };
+
+ lpass_wsa2macro: codec@6aa0000 {
+ compatible = "qcom,sm8650-lpass-wsa-macro", "qcom,sm8550-lpass-wsa-macro";
+ reg = <0 0x06aa0000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&lpass_vamacro>;
+ clock-names = "mclk",
+ "macro",
+ "dcodec",
+ "fsgen";
+
+ #clock-cells = <0>;
+ clock-output-names = "wsa2-mclk";
+ #sound-dai-cells = <1>;
+ };
+
+ swr3: soundwire@6ab0000 {
+ compatible = "qcom,soundwire-v2.0.0";
+ reg = <0 0x06ab0000 0 0x10000>;
+ interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&lpass_wsa2macro>;
+ clock-names = "iface";
+ label = "WSA2";
+
+ pinctrl-0 = <&wsa2_swr_active>;
+ pinctrl-names = "default";
+
+ qcom,din-ports = <4>;
+ qcom,dout-ports = <9>;
+
+ qcom,ports-sinterval = /bits/ 16 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18f 0xff 0xff 0x0f 0x0f 0xff 0x31f>;
+ qcom,ports-offset1 = /bits/ 8 <0x01 0x03 0x05 0x02 0x04 0x15 0x00 0xff 0xff 0x06 0x0d 0xff 0x00>;
+ qcom,ports-offset2 = /bits/ 8 <0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>;
+ qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>;
+ qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x18>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0x00 0x01 0x01 0x00 0x01 0x01 0x00 0x00 0x00 0x01 0x01 0x00 0x00>;
+ qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-lane-control = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ status = "disabled";
+ };
+
+ lpass_rxmacro: codec@6ac0000 {
+ compatible = "qcom,sm8650-lpass-rx-macro", "qcom,sm8550-lpass-rx-macro";
+ reg = <0 0x06ac0000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&lpass_vamacro>;
+ clock-names = "mclk",
+ "macro",
+ "dcodec",
+ "fsgen";
+
+ #clock-cells = <0>;
+ clock-output-names = "mclk";
+ #sound-dai-cells = <1>;
+ };
+
+ swr1: soundwire@6ad0000 {
+ compatible = "qcom,soundwire-v2.0.0";
+ reg = <0 0x06ad0000 0 0x10000>;
+ interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&lpass_rxmacro>;
+ clock-names = "iface";
+ label = "RX";
+
+ pinctrl-0 = <&rx_swr_active>;
+ pinctrl-names = "default";
+
+ qcom,din-ports = <0>;
+ qcom,dout-ports = <11>;
+
+ qcom,ports-sinterval = /bits/ 16 <0x03 0x1f 0x1f 0x07 0x03 0xff 0xff 0x31 0xff 0xff 0xff>;
+ qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x09 0x01 0xff 0xff 0x00 0xff 0xff 0xff>;
+ qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00 0xff 0xff 0x00 0xff 0xff 0xff>;
+ qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff 0xff 0xff 0x00 0xff 0xff 0xff>;
+ qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff 0xff 0xff 0x0f 0xff 0xff 0xff>;
+ qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff 0xff 0xff 0x18 0xff 0xff 0xff>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff 0xff 0xff 0x01 0xff 0xff 0xff>;
+ qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0x01 0x03 0xff 0xff 0x00 0xff 0xff 0xff>;
+ qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00 0xff 0xff 0x01 0xff 0xff 0xff>;
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ status = "disabled";
+ };
+
+ lpass_txmacro: codec@6ae0000 {
+ compatible = "qcom,sm8650-lpass-tx-macro", "qcom,sm8550-lpass-tx-macro";
+ reg = <0 0x06ae0000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&lpass_vamacro>;
+ clock-names = "mclk",
+ "macro",
+ "dcodec",
+ "fsgen";
+
+ #clock-cells = <0>;
+ clock-output-names = "mclk";
+ #sound-dai-cells = <1>;
+ };
+
+ lpass_wsamacro: codec@6b00000 {
+ compatible = "qcom,sm8650-lpass-wsa-macro", "qcom,sm8550-lpass-wsa-macro";
+ reg = <0 0x06b00000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&lpass_vamacro>;
+ clock-names = "mclk",
+ "macro",
+ "dcodec",
+ "fsgen";
+
+ #clock-cells = <0>;
+ clock-output-names = "mclk";
+ #sound-dai-cells = <1>;
+ };
+
+ swr0: soundwire@6b10000 {
+ compatible = "qcom,soundwire-v2.0.0";
+ reg = <0 0x06b10000 0 0x10000>;
+ interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&lpass_wsamacro>;
+ clock-names = "iface";
+ label = "WSA";
+
+ pinctrl-0 = <&wsa_swr_active>;
+ pinctrl-names = "default";
+
+ qcom,din-ports = <4>;
+ qcom,dout-ports = <9>;
+
+ qcom,ports-sinterval = /bits/ 16 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18f 0xff 0xff 0x0f 0x0f 0xff 0x31f>;
+ qcom,ports-offset1 = /bits/ 8 <0x01 0x03 0x05 0x02 0x04 0x15 0x00 0xff 0xff 0x06 0x0d 0xff 0x00>;
+ qcom,ports-offset2 = /bits/ 8 <0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>;
+ qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x0f>;
+ qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0xff 0xff 0xff 0xff 0xff 0x18>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0x00 0x01 0x01 0x00 0x01 0x01 0x00 0x00 0x00 0x01 0x01 0x00 0x00>;
+ qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+ qcom,ports-lane-control = /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ status = "disabled";
+ };
+
+ swr2: soundwire@6d30000 {
+ compatible = "qcom,soundwire-v2.0.0";
+ reg = <0 0x06d30000 0 0x10000>;
+ interrupts = <GIC_SPI 496 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "core", "wakeup";
+ clocks = <&lpass_txmacro>;
+ clock-names = "iface";
+ label = "TX";
+
+ pinctrl-0 = <&tx_swr_active>;
+ pinctrl-names = "default";
+
+ qcom,din-ports = <4>;
+ qcom,dout-ports = <0>;
+
+ qcom,ports-sinterval-low = /bits/ 8 <0x01 0x01 0x03 0x03>;
+ qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x01 0x01>;
+ qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>;
+ qcom,ports-hstart = /bits/ 8 <0xff 0xff 0xff 0xff>;
+ qcom,ports-hstop = /bits/ 8 <0xff 0xff 0xff 0xff>;
+ qcom,ports-word-length = /bits/ 8 <0xff 0xff 0xff 0xff>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0xff 0xff 0xff 0xff>;
+ qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff>;
+ qcom,ports-lane-control = /bits/ 8 <0x01 0x02 0x00 0x00>;
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+ #sound-dai-cells = <1>;
+ status = "disabled";
+ };
+
+ lpass_vamacro: codec@6d44000 {
+ compatible = "qcom,sm8650-lpass-va-macro", "qcom,sm8550-lpass-va-macro";
+ reg = <0 0x06d44000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "mclk",
+ "macro",
+ "dcodec";
+
+ #clock-cells = <0>;
+ clock-output-names = "fsgen";
+ #sound-dai-cells = <1>;
+ };
+
+ lpass_tlmm: pinctrl@6e80000 {
+ compatible = "qcom,sm8650-lpass-lpi-pinctrl";
+ reg = <0 0x06e80000 0 0x20000>;
+
+ clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "core", "audio";
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&lpass_tlmm 0 0 23>;
+
+ tx_swr_active: tx-swr-active-state {
+ clk-pins {
+ pins = "gpio0";
+ function = "swr_tx_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data-pins {
+ pins = "gpio1", "gpio2", "gpio14";
+ function = "swr_tx_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+
+ rx_swr_active: rx-swr-active-state {
+ clk-pins {
+ pins = "gpio3";
+ function = "swr_rx_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data-pins {
+ pins = "gpio4", "gpio5";
+ function = "swr_rx_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+
+ dmic01_default: dmic01-default-state {
+ clk-pins {
+ pins = "gpio6";
+ function = "dmic1_clk";
+ drive-strength = <8>;
+ output-high;
+ };
+
+ data-pins {
+ pins = "gpio7";
+ function = "dmic1_data";
+ drive-strength = <8>;
+ input-enable;
+ };
+ };
+
+ dmic02_default: dmic02-default-state {
+ clk-pins {
+ pins = "gpio8";
+ function = "dmic2_clk";
+ drive-strength = <8>;
+ output-high;
+ };
+
+ data-pins {
+ pins = "gpio9";
+ function = "dmic2_data";
+ drive-strength = <8>;
+ input-enable;
+ };
+ };
+
+ wsa_swr_active: wsa-swr-active-state {
+ clk-pins {
+ pins = "gpio10";
+ function = "wsa_swr_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data-pins {
+ pins = "gpio11";
+ function = "wsa_swr_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+
+ wsa2_swr_active: wsa2-swr-active-state {
+ clk-pins {
+ pins = "gpio15";
+ function = "wsa2_swr_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data-pins {
+ pins = "gpio16";
+ function = "wsa2_swr_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+ };
+
+ lpass_lpiaon_noc: interconnect@7400000 {
+ compatible = "qcom,sm8650-lpass-lpiaon-noc";
+ reg = <0 0x07400000 0 0x19080>;
+
+ #interconnect-cells = <2>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ lpass_lpicx_noc: interconnect@7430000 {
+ compatible = "qcom,sm8650-lpass-lpicx-noc";
+ reg = <0 0x07430000 0 0x3a200>;
+
+ #interconnect-cells = <2>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ lpass_ag_noc: interconnect@7e40000 {
+ compatible = "qcom,sm8650-lpass-ag-noc";
+ reg = <0 0x07e40000 0 0xe080>;
+
+ #interconnect-cells = <2>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ sdhc_2: mmc@8804000 {
+ compatible = "qcom,sm8650-sdhci", "qcom,sdhci-msm-v5";
+ reg = <0 0x08804000 0 0x1000>;
+
+ interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hc_irq",
+ "pwr_irq";
+
+ clocks = <&gcc GCC_SDCC2_AHB_CLK>,
+ <&gcc GCC_SDCC2_APPS_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface",
+ "core",
+ "xo";
+
+ interconnects = <&aggre2_noc MASTER_SDCC_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_SDCC_2 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "sdhc-ddr",
+ "cpu-sdhc";
+
+ power-domains = <&rpmhpd RPMHPD_CX>;
+ operating-points-v2 = <&sdhc2_opp_table>;
+
+ iommus = <&apps_smmu 0x540 0>;
+
+ bus-width = <4>;
+
+ /* Forbid SDR104/SDR50 - broken hw! */
+ sdhci-caps-mask = <0x3 0>;
+
+ qcom,dll-config = <0x0007642c>;
+ qcom,ddr-config = <0x80040868>;
+
+ dma-coherent;
+
+ status = "disabled";
+
+ sdhc2_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmhpd_opp_min_svs>;
+ };
+
+ opp-50000000 {
+ opp-hz = /bits/ 64 <50000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-100000000 {
+ opp-hz = /bits/ 64 <100000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-202000000 {
+ opp-hz = /bits/ 64 <202000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+ };
+ };
+
+ mdss: display-subsystem@ae00000 {
+ compatible = "qcom,sm8650-mdss";
+ reg = <0 0x0ae00000 0 0x1000>;
+ reg-names = "mdss";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+
+ resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
+
+ interconnects = <&mmss_noc MASTER_MDP QCOM_ICC_TAG_ALWAYS
+ &gem_noc SLAVE_LLCC QCOM_ICC_TAG_ALWAYS>,
+ <&mc_virt MASTER_LLCC QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "mdp0-mem",
+ "mdp1-mem";
+
+ power-domains = <&dispcc MDSS_GDSC>;
+
+ iommus = <&apps_smmu 0x1c00 0x2>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@ae01000 {
+ compatible = "qcom,sm8650-dpu";
+ reg = <0 0x0ae01000 0 0x8f000>,
+ <0 0x0aeb0000 0 0x2008>;
+ reg-names = "mdp",
+ "vbif";
+
+ interrupts-extended = <&mdss 0>;
+
+ clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "nrt_bus",
+ "iface",
+ "lut",
+ "core",
+ "vsync";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ dpu_intf2_out: endpoint {
+ remote-endpoint = <&mdss_dsi1_in>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ dpu_intf0_out: endpoint {
+ remote-endpoint = <&mdss_dp0_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-325000000 {
+ opp-hz = /bits/ 64 <325000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-375000000 {
+ opp-hz = /bits/ 64 <375000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-514000000 {
+ opp-hz = /bits/ 64 <514000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@ae94000 {
+ compatible = "qcom,sm8650-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0 0x0ae94000 0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupts-extended = <&mdss 4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&mdss_dsi_opp_table>;
+
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+
+ mdss_dsi_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-187500000 {
+ opp-hz = /bits/ 64 <187500000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-358000000 {
+ opp-hz = /bits/ 64 <358000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@ae95000 {
+ compatible = "qcom,sm8650-dsi-phy-4nm";
+ reg = <0 0x0ae95000 0 0x200>,
+ <0 0x0ae95200 0 0x280>,
+ <0 0x0ae95500 0 0x400>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface",
+ "ref";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ mdss_dsi1: dsi@ae96000 {
+ compatible = "qcom,sm8650-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0 0x0ae96000 0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupts-extended = <&mdss 5>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_HF_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi1_phy 0>,
+ <&mdss_dsi1_phy 1>;
+
+ operating-points-v2 = <&mdss_dsi_opp_table>;
+
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ phys = <&mdss_dsi1_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi1_in: endpoint {
+ remote-endpoint = <&dpu_intf2_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi1_out: endpoint {
+ };
+ };
+ };
+ };
+
+ mdss_dsi1_phy: phy@ae97000 {
+ compatible = "qcom,sm8650-dsi-phy-4nm";
+ reg = <0 0x0ae97000 0 0x200>,
+ <0 0x0ae97200 0 0x280>,
+ <0 0x0ae97500 0 0x400>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface",
+ "ref";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ mdss_dp0: displayport-controller@af54000 {
+ compatible = "qcom,sm8650-dp";
+ reg = <0 0xaf54000 0 0x104>,
+ <0 0xaf54200 0 0xc0>,
+ <0 0xaf55000 0 0x770>,
+ <0 0xaf56000 0 0x9c>,
+ <0 0xaf57000 0 0x9c>;
+
+ interrupts-extended = <&mdss 12>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_DPTX0_AUX_CLK>,
+ <&dispcc DISP_CC_MDSS_DPTX0_LINK_CLK>,
+ <&dispcc DISP_CC_MDSS_DPTX0_LINK_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_DPTX0_PIXEL0_CLK>;
+ clock-names = "core_iface",
+ "core_aux",
+ "ctrl_link",
+ "ctrl_link_iface",
+ "stream_pixel";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_DPTX0_LINK_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_DPTX0_PIXEL0_CLK_SRC>;
+ assigned-clock-parents = <&usb_dp_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_dp_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+
+ operating-points-v2 = <&dp_opp_table>;
+
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ phys = <&usb_dp_qmpphy QMP_USB43DP_DP_PHY>;
+ phy-names = "dp";
+
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+
+ dp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-162000000 {
+ opp-hz = /bits/ 64 <162000000>;
+ required-opps = <&rpmhpd_opp_low_svs_d1>;
+ };
+
+ opp-270000000 {
+ opp-hz = /bits/ 64 <270000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-540000000 {
+ opp-hz = /bits/ 64 <540000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-810000000 {
+ opp-hz = /bits/ 64 <810000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dp0_in: endpoint {
+ remote-endpoint = <&dpu_intf0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dp0_out: endpoint {
+ };
+ };
+ };
+ };
+ };
+
+ dispcc: clock-controller@af00000 {
+ compatible = "qcom,sm8650-dispcc";
+ reg = <0 0x0af00000 0 0x20000>;
+
+ clocks = <&bi_tcxo_div2>,
+ <&bi_tcxo_ao_div2>,
+ <&gcc GCC_DISP_AHB_CLK>,
+ <&sleep_clk>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>,
+ <&mdss_dsi1_phy 0>,
+ <&mdss_dsi1_phy 1>,
+ <&usb_dp_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_dp_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>,
+ <0>, /* dp1 */
+ <0>,
+ <0>, /* dp2 */
+ <0>,
+ <0>, /* dp3 */
+ <0>;
+
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+
+ status = "disabled";
+ };
+
+ usb_1_hsphy: phy@88e3000 {
+ compatible = "qcom,sm8650-snps-eusb2-phy",
+ "qcom,sm8550-snps-eusb2-phy";
+ reg = <0 0x088e3000 0 0x154>;
+
+ clocks = <&tcsr TCSR_USB2_CLKREF_EN>;
+ clock-names = "ref";
+
+ resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
+
+ #phy-cells = <0>;
+
+ status = "disabled";
+ };
+
+ usb_dp_qmpphy: phy@88e8000 {
+ compatible = "qcom,sm8650-qmp-usb3-dp-phy";
+ reg = <0 0x088e8000 0 0x3000>;
+
+ clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>,
+ <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "ref",
+ "com_aux",
+ "usb3_pipe";
+
+ resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
+ <&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
+ reset-names = "phy",
+ "common";
+
+ power-domains = <&gcc USB3_PHY_GDSC>;
+
+ #clock-cells = <1>;
+ #phy-cells = <1>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_dp_qmpphy_out: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_dp_qmpphy_usb_ss_in: endpoint {
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usb_dp_qmpphy_dp_in: endpoint {
+ };
+ };
+ };
+ };
+
+ usb_1: usb@a6f8800 {
+ compatible = "qcom,sm8650-dwc3", "qcom,dwc3";
+ reg = <0 0x0a6f8800 0 0x400>;
+
+ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 17 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 15 IRQ_TYPE_EDGE_RISING>,
+ <&pdc 14 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "hs_phy_irq",
+ "ss_phy_irq",
+ "dm_hs_phy_irq",
+ "dp_hs_phy_irq";
+
+ clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>,
+ <&gcc GCC_USB30_PRIM_MASTER_CLK>,
+ <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>,
+ <&gcc GCC_USB30_PRIM_SLEEP_CLK>,
+ <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
+ <&tcsr TCSR_USB3_CLKREF_EN>;
+ clock-names = "cfg_noc",
+ "core",
+ "iface",
+ "sleep",
+ "mock_utmi",
+ "xo";
+
+ assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
+ <&gcc GCC_USB30_PRIM_MASTER_CLK>;
+ assigned-clock-rates = <19200000>, <200000000>;
+
+ resets = <&gcc GCC_USB30_PRIM_BCR>;
+
+ power-domains = <&gcc USB30_PRIM_GDSC>;
+ required-opps = <&rpmhpd_opp_nom>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ usb_1_dwc3: usb@a600000 {
+ compatible = "snps,dwc3";
+ reg = <0 0x0a600000 0 0xcd00>;
+
+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+
+ iommus = <&apps_smmu 0x40 0>;
+
+ phys = <&usb_1_hsphy>,
+ <&usb_dp_qmpphy QMP_USB43DP_USB3_PHY>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+
+ snps,hird-threshold = /bits/ 8 <0x0>;
+ snps,usb2-gadget-lpm-disable;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_enblslpm_quirk;
+ snps,dis-u1-entry-quirk;
+ snps,dis-u2-entry-quirk;
+ snps,is-utmi-l1-suspend;
+ snps,usb3_lpm_capable;
+ snps,usb2-lpm-disable;
+ snps,has-lpm-erratum;
+ tx-fifo-resize;
+
+ dma-coherent;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_1_dwc3_hs: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_1_dwc3_ss: endpoint {
+ };
+ };
+ };
+ };
+ };
+
+ pdc: interrupt-controller@b220000 {
+ compatible = "qcom,sm8650-pdc", "qcom,pdc";
+ reg = <0 0x0b220000 0 0x30000>, <0 0x174000f0 0 0x64>;
+
+ interrupt-parent = <&intc>;
+
+ qcom,pdc-ranges = <0 480 94>, <94 609 31>,
+ <125 63 1>, <126 716 12>,
+ <138 251 5>, <143 244 4>;
+
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ };
+
+ tsens0: thermal-sensor@c228000 {
+ compatible = "qcom,sm8650-tsens", "qcom,tsens-v2";
+ reg = <0 0x0c228000 0 0x1000>, /* TM */
+ <0 0x0c222000 0 0x1000>; /* SROT */
+
+ interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 640 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow",
+ "critical";
+
+ #qcom,sensors = <15>;
+
+ #thermal-sensor-cells = <1>;
+ };
+
+ tsens1: thermal-sensor@c229000 {
+ compatible = "qcom,sm8650-tsens", "qcom,tsens-v2";
+ reg = <0 0x0c229000 0 0x1000>, /* TM */
+ <0 0x0c223000 0 0x1000>; /* SROT */
+
+ interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow",
+ "critical";
+
+ #qcom,sensors = <16>;
+
+ #thermal-sensor-cells = <1>;
+ };
+
+ tsens2: thermal-sensor@c22a000 {
+ compatible = "qcom,sm8650-tsens", "qcom,tsens-v2";
+ reg = <0 0x0c22a000 0 0x1000>, /* TM */
+ <0 0x0c224000 0 0x1000>; /* SROT */
+
+ interrupts = <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 642 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "uplow",
+ "critical";
+
+ #qcom,sensors = <13>;
+
+ #thermal-sensor-cells = <1>;
+ };
+
+ aoss_qmp: power-management@c300000 {
+ compatible = "qcom,sm8650-aoss-qmp", "qcom,aoss-qmp";
+ reg = <0 0x0c300000 0 0x400>;
+
+ interrupt-parent = <&ipcc>;
+ interrupts-extended = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ #clock-cells = <0>;
+ };
+
+ sram@c3f0000 {
+ compatible = "qcom,rpmh-stats";
+ reg = <0 0x0c3f0000 0 0x400>;
+ };
+
+ spmi_bus: spmi@c400000 {
+ compatible = "qcom,spmi-pmic-arb";
+ reg = <0 0x0c400000 0 0x3000>,
+ <0 0x0c500000 0 0x4000000>,
+ <0 0x0c440000 0 0x80000>,
+ <0 0x0c4c0000 0 0x20000>,
+ <0 0x0c42d000 0 0x4000>;
+ reg-names = "core",
+ "chnls",
+ "obsrvr",
+ "intr",
+ "cnfg";
+
+ interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "periph_irq";
+
+ qcom,ee = <0>;
+ qcom,channel = <0>;
+ qcom,bus-id = <0>;
+
+ interrupt-controller;
+ #interrupt-cells = <4>;
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+ };
+
+ tlmm: pinctrl@f100000 {
+ compatible = "qcom,sm8650-tlmm";
+ reg = <0 0x0f100000 0 0x300000>;
+
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ gpio-ranges = <&tlmm 0 0 211>;
+
+ wakeup-parent = <&pdc>;
+
+ hub_i2c0_data_clk: hub-i2c0-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio64", "gpio65";
+ function = "i2chub0_se0";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c1_data_clk: hub-i2c1-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio66", "gpio67";
+ function = "i2chub0_se1";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c2_data_clk: hub-i2c2-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio68", "gpio69";
+ function = "i2chub0_se2";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c3_data_clk: hub-i2c3-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio70", "gpio71";
+ function = "i2chub0_se3";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c4_data_clk: hub-i2c4-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio72", "gpio73";
+ function = "i2chub0_se4";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c5_data_clk: hub-i2c5-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio74", "gpio75";
+ function = "i2chub0_se5";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c6_data_clk: hub-i2c6-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio76", "gpio77";
+ function = "i2chub0_se6";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c7_data_clk: hub-i2c7-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio78", "gpio79";
+ function = "i2chub0_se7";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c8_data_clk: hub-i2c8-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio206", "gpio207";
+ function = "i2chub0_se8";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ hub_i2c9_data_clk: hub-i2c9-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio80", "gpio81";
+ function = "i2chub0_se9";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ pcie0_default_state: pcie0-default-state {
+ perst-pins {
+ pins = "gpio94";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ clkreq-pins {
+ pins = "gpio95";
+ function = "pcie0_clk_req_n";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ wake-pins {
+ pins = "gpio96";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ pcie1_default_state: pcie1-default-state {
+ perst-pins {
+ pins = "gpio97";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ clkreq-pins {
+ pins = "gpio98";
+ function = "pcie1_clk_req_n";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ wake-pins {
+ pins = "gpio99";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ qup_i2c0_data_clk: qup-i2c0-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio32", "gpio33";
+ function = "qup1_se0";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c1_data_clk: qup-i2c1-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio36", "gpio37";
+ function = "qup1_se1";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c2_data_clk: qup-i2c2-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio40", "gpio41";
+ function = "qup1_se2";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c3_data_clk: qup-i2c3-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio44", "gpio45";
+ function = "qup1_se3";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c4_data_clk: qup-i2c4-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio48", "gpio49";
+ function = "qup1_se4";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c5_data_clk: qup-i2c5-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio52", "gpio53";
+ function = "qup1_se5";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c6_data_clk: qup-i2c6-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio56", "gpio57";
+ function = "qup1_se6";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c7_data_clk: qup-i2c7-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio60", "gpio61";
+ function = "qup1_se7";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c8_data_clk: qup-i2c8-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio0", "gpio1";
+ function = "qup2_se0";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c9_data_clk: qup-i2c9-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio4", "gpio5";
+ function = "qup2_se1";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c10_data_clk: qup-i2c10-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio8", "gpio9";
+ function = "qup2_se2";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c11_data_clk: qup-i2c11-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio12", "gpio13";
+ function = "qup2_se3";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c12_data_clk: qup-i2c12-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio16", "gpio17";
+ function = "qup2_se4";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c13_data_clk: qup-i2c13-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio20", "gpio21";
+ function = "qup2_se5";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_i2c14_data_clk: qup-i2c14-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio24", "gpio25";
+ function = "qup2_se6";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_spi0_cs: qup-spi0-cs-state {
+ pins = "gpio35";
+ function = "qup1_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi0_data_clk: qup-spi0-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio32", "gpio33", "gpio34";
+ function = "qup1_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi1_cs: qup-spi1-cs-state {
+ pins = "gpio39";
+ function = "qup1_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi1_data_clk: qup-spi1-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio36", "gpio37", "gpio38";
+ function = "qup1_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi2_cs: qup-spi2-cs-state {
+ pins = "gpio43";
+ function = "qup1_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi2_data_clk: qup-spi2-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio40", "gpio41", "gpio42";
+ function = "qup1_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi3_cs: qup-spi3-cs-state {
+ pins = "gpio47";
+ function = "qup1_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi3_data_clk: qup-spi3-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio44", "gpio45", "gpio46";
+ function = "qup1_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi4_cs: qup-spi4-cs-state {
+ pins = "gpio51";
+ function = "qup1_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi4_data_clk: qup-spi4-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio48", "gpio49", "gpio50";
+ function = "qup1_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi5_cs: qup-spi5-cs-state {
+ pins = "gpio55";
+ function = "qup1_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi5_data_clk: qup-spi5-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio52", "gpio53", "gpio54";
+ function = "qup1_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi6_cs: qup-spi6-cs-state {
+ pins = "gpio59";
+ function = "qup1_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi6_data_clk: qup-spi6-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio56", "gpio57", "gpio58";
+ function = "qup1_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi7_cs: qup-spi7-cs-state {
+ pins = "gpio63";
+ function = "qup1_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi7_data_clk: qup-spi7-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio60", "gpio61", "gpio62";
+ function = "qup1_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi8_cs: qup-spi8-cs-state {
+ pins = "gpio3";
+ function = "qup2_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi8_data_clk: qup-spi8-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio0", "gpio1", "gpio2";
+ function = "qup2_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi9_cs: qup-spi9-cs-state {
+ pins = "gpio7";
+ function = "qup2_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi9_data_clk: qup-spi9-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio4", "gpio5", "gpio6";
+ function = "qup2_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi10_cs: qup-spi10-cs-state {
+ pins = "gpio11";
+ function = "qup2_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi10_data_clk: qup-spi10-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio8", "gpio9", "gpio10";
+ function = "qup2_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi11_cs: qup-spi11-cs-state {
+ pins = "gpio15";
+ function = "qup2_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi11_data_clk: qup-spi11-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio12", "gpio13", "gpio14";
+ function = "qup2_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi12_cs: qup-spi12-cs-state {
+ pins = "gpio19";
+ function = "qup2_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi12_data_clk: qup-spi12-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio16", "gpio17", "gpio18";
+ function = "qup2_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi13_cs: qup-spi13-cs-state {
+ pins = "gpio23";
+ function = "qup2_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi13_data_clk: qup-spi13-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio20", "gpio21", "gpio22";
+ function = "qup2_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi14_cs: qup-spi14-cs-state {
+ pins = "gpio27";
+ function = "qup2_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi14_data_clk: qup-spi14-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio24", "gpio25", "gpio26";
+ function = "qup2_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_uart14_default: qup-uart14-default-state {
+ /* TX, RX */
+ pins = "gpio26", "gpio27";
+ function = "qup2_se6";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ qup_uart14_cts_rts: qup-uart14-cts-rts-state {
+ /* CTS, RTS */
+ pins = "gpio24", "gpio25";
+ function = "qup2_se6";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ qup_uart15_default: qup-uart15-default-state {
+ /* TX, RX */
+ pins = "gpio30", "gpio31";
+ function = "qup2_se7";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ sdc2_sleep: sdc2-sleep-state {
+ clk-pins {
+ pins = "sdc2_clk";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cmd-pins {
+ pins = "sdc2_cmd";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ data-pins {
+ pins = "sdc2_data";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ sdc2_default: sdc2-default-state {
+ clk-pins {
+ pins = "sdc2_clk";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
+ cmd-pins {
+ pins = "sdc2_cmd";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+
+ data-pins {
+ pins = "sdc2_data";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+ };
+ };
+
+ apps_smmu: iommu@15000000 {
+ compatible = "qcom,sm8650-smmu-500", "qcom,smmu-500", "arm,mmu-500";
+ reg = <0 0x15000000 0 0x100000>;
+
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 706 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>;
+
+ #iommu-cells = <2>;
+ #global-interrupts = <1>;
+
+ dma-coherent;
+ };
+
+ intc: interrupt-controller@17100000 {
+ compatible = "arm,gic-v3";
+ reg = <0 0x17100000 0 0x10000>, /* GICD */
+ <0 0x17180000 0 0x200000>; /* GICR * 8 */
+
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+
+ #interrupt-cells = <3>;
+ interrupt-controller;
+
+ #redistributor-regions = <1>;
+ redistributor-stride = <0 0x40000>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ gic_its: msi-controller@17140000 {
+ compatible = "arm,gic-v3-its";
+ reg = <0 0x17140000 0 0x20000>;
+
+ msi-controller;
+ #msi-cells = <1>;
+ };
+ };
+
+ timer@17420000 {
+ compatible = "arm,armv7-timer-mem";
+ reg = <0 0x17420000 0 0x1000>;
+
+ ranges = <0 0 0 0x20000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ frame@17421000 {
+ reg = <0x17421000 0x1000>,
+ <0x17422000 0x1000>;
+
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <0>;
+ };
+
+ frame@17423000 {
+ reg = <0x17423000 0x1000>;
+
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <1>;
+
+ status = "disabled";
+ };
+
+ frame@17425000 {
+ reg = <0x17425000 0x1000>;
+
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <2>;
+
+ status = "disabled";
+ };
+
+ frame@17427000 {
+ reg = <0x17427000 0x1000>;
+
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <3>;
+
+ status = "disabled";
+ };
+
+ frame@17429000 {
+ reg = <0x17429000 0x1000>;
+
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <4>;
+
+ status = "disabled";
+ };
+
+ frame@1742b000 {
+ reg = <0x1742b000 0x1000>;
+
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <5>;
+
+ status = "disabled";
+ };
+
+ frame@1742d000 {
+ reg = <0x1742d000 0x1000>;
+
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <6>;
+
+ status = "disabled";
+ };
+ };
+
+ apps_rsc: rsc@17a00000 {
+ compatible = "qcom,rpmh-rsc";
+ reg = <0 0x17a00000 0 0x10000>,
+ <0 0x17a10000 0 0x10000>,
+ <0 0x17a20000 0 0x10000>,
+ <0 0x17a30000 0 0x10000>;
+ reg-names = "drv-0",
+ "drv-1",
+ "drv-2";
+
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+
+ power-domains = <&CLUSTER_PD>;
+
+ qcom,tcs-offset = <0xd00>;
+ qcom,drv-id = <2>;
+ qcom,tcs-config = <ACTIVE_TCS 3>, <SLEEP_TCS 2>,
+ <WAKE_TCS 2>, <CONTROL_TCS 0>;
+
+ label = "apps_rsc";
+
+ apps_bcm_voter: bcm-voter {
+ compatible = "qcom,bcm-voter";
+ };
+
+ rpmhcc: clock-controller {
+ compatible = "qcom,sm8650-rpmh-clk";
+
+ clocks = <&xo_board>;
+ clock-names = "xo";
+
+ #clock-cells = <1>;
+ };
+
+ rpmhpd: power-controller {
+ compatible = "qcom,sm8650-rpmhpd";
+
+ operating-points-v2 = <&rpmhpd_opp_table>;
+
+ #power-domain-cells = <1>;
+
+ rpmhpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmhpd_opp_ret: opp-16 {
+ opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
+ };
+
+ rpmhpd_opp_min_svs: opp-48 {
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+
+ rpmhpd_opp_low_svs_d2: opp-52 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
+ };
+
+ rpmhpd_opp_low_svs_d1: opp-56 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D1>;
+ };
+
+ rpmhpd_opp_low_svs_d0: opp-60 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D0>;
+ };
+
+ rpmhpd_opp_low_svs: opp-64 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ rpmhpd_opp_low_svs_l1: opp-80 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_L1>;
+ };
+
+ rpmhpd_opp_svs: opp-128 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ rpmhpd_opp_svs_l0: opp-144 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
+ };
+
+ rpmhpd_opp_svs_l1: opp-192 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ rpmhpd_opp_nom: opp-256 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ };
+
+ rpmhpd_opp_nom_l1: opp-320 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ };
+
+ rpmhpd_opp_nom_l2: opp-336 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
+ };
+
+ rpmhpd_opp_turbo: opp-384 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ };
+
+ rpmhpd_opp_turbo_l1: opp-416 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ };
+ };
+ };
+ };
+
+ cpufreq_hw: cpufreq@17d91000 {
+ compatible = "qcom,sm8650-cpufreq-epss", "qcom,cpufreq-epss";
+ reg = <0 0x17d91000 0 0x1000>,
+ <0 0x17d92000 0 0x1000>,
+ <0 0x17d93000 0 0x1000>,
+ <0 0x17d94000 0 0x1000>;
+ reg-names = "freq-domain0",
+ "freq-domain1",
+ "freq-domain2",
+ "freq-domain3";
+
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 738 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dcvsh-irq-0",
+ "dcvsh-irq-1",
+ "dcvsh-irq-2",
+ "dcvsh-irq-3";
+
+ clocks = <&bi_tcxo_div2>, <&gcc GCC_GPLL0>;
+ clock-names = "xo", "alternate";
+
+ #freq-domain-cells = <1>;
+ #clock-cells = <1>;
+ };
+
+ pmu@24091000 {
+ compatible = "qcom,sm8650-llcc-bwmon", "qcom,sc7280-llcc-bwmon";
+ reg = <0 0x24091000 0 0x1000>;
+
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+
+ interconnects = <&mc_virt MASTER_LLCC QCOM_ICC_TAG_ACTIVE_ONLY
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ACTIVE_ONLY>;
+
+ operating-points-v2 = <&llcc_bwmon_opp_table>;
+
+ llcc_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <2086000>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <2929000>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <5931000>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <6515000>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <7980000>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <10437000>;
+ };
+
+ opp-6 {
+ opp-peak-kBps = <12157000>;
+ };
+
+ opp-7 {
+ opp-peak-kBps = <14060000>;
+ };
+
+ opp-8 {
+ opp-peak-kBps = <16113000>;
+ };
+ };
+ };
+
+ pmu@240b7400 {
+ compatible = "qcom,sm8650-cpu-bwmon", "qcom,sdm845-bwmon";
+ reg = <0 0x240b7400 0 0x600>;
+
+ interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
+
+ interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY
+ &gem_noc SLAVE_LLCC QCOM_ICC_TAG_ACTIVE_ONLY>;
+
+ operating-points-v2 = <&cpu_bwmon_opp_table>;
+
+ cpu_bwmon_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-0 {
+ opp-peak-kBps = <4577000>;
+ };
+
+ opp-1 {
+ opp-peak-kBps = <7110000>;
+ };
+
+ opp-2 {
+ opp-peak-kBps = <9155000>;
+ };
+
+ opp-3 {
+ opp-peak-kBps = <12298000>;
+ };
+
+ opp-4 {
+ opp-peak-kBps = <14236000>;
+ };
+
+ opp-5 {
+ opp-peak-kBps = <16265000>;
+ };
+ };
+ };
+
+ gem_noc: interconnect@24100000 {
+ compatible = "qcom,sm8650-gem-noc";
+ reg = <0 0x24100000 0 0xc5080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ system-cache-controller@25000000 {
+ compatible = "qcom,sm8650-llcc";
+ reg = <0 0x25000000 0 0x200000>,
+ <0 0x25400000 0 0x200000>,
+ <0 0x25200000 0 0x200000>,
+ <0 0x25600000 0 0x200000>,
+ <0 0x25800000 0 0x200000>;
+ reg-names = "llcc0_base",
+ "llcc1_base",
+ "llcc2_base",
+ "llcc3_base",
+ "llcc_broadcast_base";
+
+ interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ remoteproc_adsp: remoteproc@30000000 {
+ compatible = "qcom,sm8650-adsp-pas";
+ reg = <0 0x30000000 0 0x100>;
+
+ interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ interconnects = <&lpass_lpicx_noc MASTER_LPASS_PROC QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+
+ power-domains = <&rpmhpd RPMHPD_LCX>,
+ <&rpmhpd RPMHPD_LMX>;
+ power-domain-names = "lcx",
+ "lmx";
+
+ memory-region = <&adspslpi_mem>, <&q6_adsp_dtb_mem>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&smp2p_adsp_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ remoteproc_adsp_glink: glink-edge {
+ interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_LPASS
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ qcom,remote-pid = <2>;
+
+ label = "lpass";
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+
+ label = "adsp";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+
+ iommus = <&apps_smmu 0x1003 0x80>,
+ <&apps_smmu 0x1043 0x20>;
+ };
+
+ compute-cb@4 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <4>;
+
+ iommus = <&apps_smmu 0x1004 0x80>,
+ <&apps_smmu 0x1044 0x20>;
+ };
+
+ compute-cb@5 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <5>;
+
+ iommus = <&apps_smmu 0x1005 0x80>,
+ <&apps_smmu 0x1045 0x20>;
+ };
+
+ compute-cb@6 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <6>;
+
+ iommus = <&apps_smmu 0x1006 0x80>,
+ <&apps_smmu 0x1046 0x20>;
+ };
+
+ compute-cb@7 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <7>;
+
+ iommus = <&apps_smmu 0x1007 0x40>,
+ <&apps_smmu 0x1067 0x0>,
+ <&apps_smmu 0x1087 0x0>;
+ };
+ };
+
+ gpr {
+ compatible = "qcom,gpr";
+ qcom,glink-channels = "adsp_apps";
+ qcom,domain = <GPR_DOMAIN_ID_ADSP>;
+ qcom,intents = <512 20>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ q6apm: service@1 {
+ compatible = "qcom,q6apm";
+ reg = <GPR_APM_MODULE_IID>;
+ #sound-dai-cells = <0>;
+ qcom,protection-domain = "avs/audio",
+ "msm/adsp/audio_pd";
+
+ q6apmbedai: bedais {
+ compatible = "qcom,q6apm-lpass-dais";
+ #sound-dai-cells = <1>;
+ };
+
+ q6apmdai: dais {
+ compatible = "qcom,q6apm-dais";
+ iommus = <&apps_smmu 0x1001 0x80>,
+ <&apps_smmu 0x1061 0x0>;
+ };
+ };
+
+ q6prm: service@2 {
+ compatible = "qcom,q6prm";
+ reg = <GPR_PRM_MODULE_IID>;
+ qcom,protection-domain = "avs/audio",
+ "msm/adsp/audio_pd";
+
+ q6prmcc: clock-controller {
+ compatible = "qcom,q6prm-lpass-clocks";
+ #clock-cells = <2>;
+ };
+ };
+ };
+ };
+ };
+
+ nsp_noc: interconnect@320c0000 {
+ compatible = "qcom,sm8650-nsp-noc";
+ reg = <0 0x320c0000 0 0xf080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ remoteproc_cdsp: remoteproc@32300000 {
+ compatible = "qcom,sm8650-cdsp-pas";
+ reg = <0 0x32300000 0 0x1400000>;
+
+ interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>,
+ <&smp2p_cdsp_in 3 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack";
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+
+ interconnects = <&nsp_noc MASTER_CDSP_PROC QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MXC>,
+ <&rpmhpd RPMHPD_NSP>;
+ power-domain-names = "cx",
+ "mxc",
+ "nsp";
+
+ memory-region = <&cdsp_mem>, <&q6_cdsp_dtb_mem>, <&global_sync_mem>;
+
+ qcom,qmp = <&aoss_qmp>;
+
+ qcom,smem-states = <&smp2p_cdsp_out 0>;
+ qcom,smem-state-names = "stop";
+
+ status = "disabled";
+
+ glink-edge {
+ interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
+ IPCC_MPROC_SIGNAL_GLINK_QMP
+ IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&ipcc IPCC_CLIENT_CDSP
+ IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+ qcom,remote-pid = <5>;
+
+ label = "cdsp";
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+
+ label = "cdsp";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@1 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <1>;
+
+ iommus = <&apps_smmu 0x1961 0x0>,
+ <&apps_smmu 0x0c01 0x20>,
+ <&apps_smmu 0x19c1 0x0>;
+ };
+
+ compute-cb@2 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <2>;
+
+ iommus = <&apps_smmu 0x1962 0x0>,
+ <&apps_smmu 0x0c02 0x20>,
+ <&apps_smmu 0x19c2 0x0>;
+ };
+
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+
+ iommus = <&apps_smmu 0x1963 0x0>,
+ <&apps_smmu 0x0c03 0x20>,
+ <&apps_smmu 0x19c3 0x0>;
+ };
+
+ compute-cb@4 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <4>;
+
+ iommus = <&apps_smmu 0x1964 0x0>,
+ <&apps_smmu 0x0c04 0x20>,
+ <&apps_smmu 0x19c4 0x0>;
+ };
+
+ compute-cb@5 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <5>;
+
+ iommus = <&apps_smmu 0x1965 0x0>,
+ <&apps_smmu 0x0c05 0x20>,
+ <&apps_smmu 0x19c5 0x0>;
+ };
+
+ compute-cb@6 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <6>;
+
+ iommus = <&apps_smmu 0x1966 0x0>,
+ <&apps_smmu 0x0c06 0x20>,
+ <&apps_smmu 0x19c6 0x0>;
+ };
+
+ compute-cb@7 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <7>;
+
+ iommus = <&apps_smmu 0x1967 0x0>,
+ <&apps_smmu 0x0c07 0x20>,
+ <&apps_smmu 0x19c7 0x0>;
+ };
+
+ compute-cb@8 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <8>;
+
+ iommus = <&apps_smmu 0x1968 0x0>,
+ <&apps_smmu 0x0c08 0x20>,
+ <&apps_smmu 0x19c8 0x0>;
+ };
+ };
+ };
+ };
+ };
+
+ thermal-zones {
+ aoss0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ aoss0-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpuss0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ cpuss0-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpuss1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ cpuss1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpuss2-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ cpuss2-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpuss3-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ cpuss3-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu2-top-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu2-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu2-bottom-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu2-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu3-top-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu3-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu3-bottom-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu3-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu4-top-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu4-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu4-bottom-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu4-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu5-top-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu5-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu5-bottom-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 12>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu5-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu6-top-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 13>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu6-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu6-bottom-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens0 14>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu6-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ aoss1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ aoss1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu7-top-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu7-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu7-middle-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu7-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu7-bottom-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu7-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu0-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ cpu1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip-point1 {
+ temperature = <95000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu1-critical {
+ temperature = <110000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ nsphvx0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ nsphvx1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ nsphvx1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ nsphvx1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ nsphmx0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ nsphmx0-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ nsphmx1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ nsphmx1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ nsphmx2-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ nsphmx2-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ nsphmx3-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ nsphmx3-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ video-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 12>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ video-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ ddr-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 13>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ ddr-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ camera0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 14>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ camera0-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ camera1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens1 15>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ camera1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ aoss2-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 0>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ aoss2-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss0-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 1>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss0-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss1-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 2>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss2-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 3>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss2-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss3-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 4>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss3-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss4-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 5>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss4-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss5-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 6>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss5-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss6-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 7>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss6-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ gpuss7-thermal {
+ polling-delay-passive = <10>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 8>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ gpuss7-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ modem0-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 9>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ modem0-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ modem1-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 10>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ modem1-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ modem2-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 11>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ modem2-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+
+ modem3-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&tsens2 12>;
+
+ trips {
+ trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ modem3-critical {
+ temperature = <110000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/x1e80100-crd.dts b/sys/contrib/device-tree/src/arm64/qcom/x1e80100-crd.dts
new file mode 100644
index 000000000000..7532d8eca2de
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/x1e80100-crd.dts
@@ -0,0 +1,424 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+
+#include "x1e80100.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. X1E80100 CRD";
+ compatible = "qcom,x1e80100-crd", "qcom,x1e80100";
+
+ aliases {
+ serial0 = &uart21;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vreg_edp_3p3: regulator-edp-3p3 {
+ compatible = "regulator-fixed";
+
+ regulator-name = "VREG_EDP_3P3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&tlmm 70 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&edp_reg_en>;
+ pinctrl-names = "default";
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8550-rpmh-regulators";
+ qcom,pmic-id = "b";
+
+ vdd-bob1-supply = <&vph_pwr>;
+ vdd-bob2-supply = <&vph_pwr>;
+ vdd-l1-l4-l10-supply = <&vreg_s4c_1p8>;
+ vdd-l2-l13-l14-supply = <&vreg_bob1>;
+ vdd-l5-l16-supply = <&vreg_bob1>;
+ vdd-l6-l7-supply = <&vreg_bob2>;
+ vdd-l8-l9-supply = <&vreg_bob1>;
+ vdd-l12-supply = <&vreg_s5j_1p2>;
+ vdd-l15-supply = <&vreg_s4c_1p8>;
+ vdd-l17-supply = <&vreg_bob2>;
+
+ vreg_bob1: bob1 {
+ regulator-name = "vreg_bob1";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob2: bob2 {
+ regulator-name = "vreg_bob2";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1b_1p8: ldo1 {
+ regulator-name = "vreg_l1b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_3p0: ldo2 {
+ regulator-name = "vreg_l2b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4b_1p8: ldo4 {
+ regulator-name = "vreg_l4b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5b_3p0: ldo5 {
+ regulator-name = "vreg_l5b_3p0";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p8: ldo6 {
+ regulator-name = "vreg_l6b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_2p8: ldo7 {
+ regulator-name = "vreg_l7b_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_3p0: ldo8 {
+ regulator-name = "vreg_l8b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_2p9: ldo9 {
+ regulator-name = "vreg_l9b_2p9";
+ regulator-min-microvolt = <2960000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10b_1p8: ldo10 {
+ regulator-name = "vreg_l10b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_1p2: ldo12 {
+ regulator-name = "vreg_l12b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_3p0: ldo13 {
+ regulator-name = "vreg_l13b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_3p0: ldo14 {
+ regulator-name = "vreg_l14b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_1p8: ldo15 {
+ regulator-name = "vreg_l15b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_2p9: ldo16 {
+ regulator-name = "vreg_l16b_2p9";
+ regulator-min-microvolt = <2912000>;
+ regulator-max-microvolt = <2912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_2p5: ldo17 {
+ regulator-name = "vreg_l17b_2p5";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <2504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-l1-supply = <&vreg_s5j_1p2>;
+ vdd-l2-supply = <&vreg_s1f_0p7>;
+ vdd-l3-supply = <&vreg_s1f_0p7>;
+ vdd-s4-supply = <&vph_pwr>;
+
+ vreg_s4c_1p8: smps4 {
+ regulator-name = "vreg_s4c_1p8";
+ regulator-min-microvolt = <1856000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1c_1p2: ldo1 {
+ regulator-name = "vreg_l1c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_0p8: ldo2 {
+ regulator-name = "vreg_l2c_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_0p8: ldo3 {
+ regulator-name = "vreg_l3c_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pmc8380-rpmh-regulators";
+ qcom,pmic-id = "d";
+
+ vdd-l1-supply = <&vreg_s1f_0p7>;
+ vdd-l2-supply = <&vreg_s1f_0p7>;
+ vdd-l3-supply = <&vreg_s4c_1p8>;
+ vdd-s1-supply = <&vph_pwr>;
+
+ vreg_l1d_0p8: ldo1 {
+ regulator-name = "vreg_l1d_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2d_0p9: ldo2 {
+ regulator-name = "vreg_l2d_0p9";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3d_1p8: ldo3 {
+ regulator-name = "vreg_l3d_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-3 {
+ compatible = "qcom,pmc8380-rpmh-regulators";
+ qcom,pmic-id = "e";
+
+ vdd-l2-supply = <&vreg_s1f_0p7>;
+ vdd-l3-supply = <&vreg_s5j_1p2>;
+
+ vreg_l2e_0p8: ldo2 {
+ regulator-name = "vreg_l2e_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3e_1p2: ldo3 {
+ regulator-name = "vreg_l3e_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-4 {
+ compatible = "qcom,pmc8380-rpmh-regulators";
+ qcom,pmic-id = "f";
+
+ vdd-l1-supply = <&vreg_s5j_1p2>;
+ vdd-l2-supply = <&vreg_s5j_1p2>;
+ vdd-l3-supply = <&vreg_s5j_1p2>;
+ vdd-s1-supply = <&vph_pwr>;
+
+ vreg_s1f_0p7: smps1 {
+ regulator-name = "vreg_s1f_0p7";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1f_1p0: ldo1 {
+ regulator-name = "vreg_l1f_1p0";
+ regulator-min-microvolt = <1024000>;
+ regulator-max-microvolt = <1024000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2f_1p0: ldo2 {
+ regulator-name = "vreg_l2f_1p0";
+ regulator-min-microvolt = <1024000>;
+ regulator-max-microvolt = <1024000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3f_1p0: ldo3 {
+ regulator-name = "vreg_l3f_1p0";
+ regulator-min-microvolt = <1024000>;
+ regulator-max-microvolt = <1024000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-6 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+ qcom,pmic-id = "i";
+
+ vdd-l1-supply = <&vreg_s4c_1p8>;
+ vdd-l2-supply = <&vreg_s5j_1p2>;
+ vdd-l3-supply = <&vreg_s1f_0p7>;
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+
+ vreg_s1i_0p9: smps1 {
+ regulator-name = "vreg_s1i_0p9";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s2i_1p0: smps2 {
+ regulator-name = "vreg_s2i_1p0";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1i_1p8: ldo1 {
+ regulator-name = "vreg_l1i_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2i_1p2: ldo2 {
+ regulator-name = "vreg_l2i_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3i_0p8: ldo3 {
+ regulator-name = "vreg_l3i_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-7 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+ qcom,pmic-id = "j";
+
+ vdd-l1-supply = <&vreg_s1f_0p7>;
+ vdd-l2-supply = <&vreg_s5j_1p2>;
+ vdd-l3-supply = <&vreg_s1f_0p7>;
+ vdd-s5-supply = <&vph_pwr>;
+
+ vreg_s5j_1p2: smps5 {
+ regulator-name = "vreg_s5j_1p2";
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1j_0p8: ldo1 {
+ regulator-name = "vreg_l1j_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2j_1p2: ldo2 {
+ regulator-name = "vreg_l2j_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3j_0p8: ldo3 {
+ regulator-name = "vreg_l3j_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&qupv3_2 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <34 2>, /* Unused */
+ <44 4>, /* SPI (TPM) */
+ <238 1>; /* UFS Reset */
+
+ edp_reg_en: edp-reg-en-state {
+ pins = "gpio70";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ };
+};
+
+&uart21 {
+ compatible = "qcom,geni-debug-uart";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/x1e80100-qcp.dts b/sys/contrib/device-tree/src/arm64/qcom/x1e80100-qcp.dts
new file mode 100644
index 000000000000..a37ad9475c90
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/x1e80100-qcp.dts
@@ -0,0 +1,399 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+
+#include "x1e80100.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. X1E80100 QCP";
+ compatible = "qcom,x1e80100-qcp", "qcom,x1e80100";
+
+ aliases {
+ serial0 = &uart21;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vph_pwr";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&apps_rsc {
+ regulators-0 {
+ compatible = "qcom,pm8550-rpmh-regulators";
+ qcom,pmic-id = "b";
+
+ vdd-bob1-supply = <&vph_pwr>;
+ vdd-bob2-supply = <&vph_pwr>;
+ vdd-l1-l4-l10-supply = <&vreg_s4c_1p8>;
+ vdd-l2-l13-l14-supply = <&vreg_bob1>;
+ vdd-l5-l16-supply = <&vreg_bob1>;
+ vdd-l6-l7-supply = <&vreg_bob2>;
+ vdd-l8-l9-supply = <&vreg_bob1>;
+ vdd-l12-supply = <&vreg_s5j_1p2>;
+ vdd-l15-supply = <&vreg_s4c_1p8>;
+ vdd-l17-supply = <&vreg_bob2>;
+
+ vreg_bob1: bob1 {
+ regulator-name = "vreg_bob1";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_bob2: bob2 {
+ regulator-name = "vreg_bob2";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <3008000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1b_1p8: ldo1 {
+ regulator-name = "vreg_l1b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2b_3p0: ldo2 {
+ regulator-name = "vreg_l2b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l4b_1p8: ldo4 {
+ regulator-name = "vreg_l4b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l5b_3p0: ldo5 {
+ regulator-name = "vreg_l5b_3p0";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l6b_1p8: ldo6 {
+ regulator-name = "vreg_l6b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_2p8: ldo7 {
+ regulator-name = "vreg_l7b_2p8";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8b_3p0: ldo8 {
+ regulator-name = "vreg_l8b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_2p9: ldo9 {
+ regulator-name = "vreg_l9b_2p9";
+ regulator-min-microvolt = <2960000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l10b_1p8: ldo10 {
+ regulator-name = "vreg_l10b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l12b_1p2: ldo12 {
+ regulator-name = "vreg_l12b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l13b_3p0: ldo13 {
+ regulator-name = "vreg_l13b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l14b_3p0: ldo14 {
+ regulator-name = "vreg_l14b_3p0";
+ regulator-min-microvolt = <3072000>;
+ regulator-max-microvolt = <3072000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l15b_1p8: ldo15 {
+ regulator-name = "vreg_l15b_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l16b_2p9: ldo16 {
+ regulator-name = "vreg_l16b_2p9";
+ regulator-min-microvolt = <2912000>;
+ regulator-max-microvolt = <2912000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l17b_2p5: ldo17 {
+ regulator-name = "vreg_l17b_2p5";
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <2504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+ qcom,pmic-id = "c";
+
+ vdd-l1-supply = <&vreg_s5j_1p2>;
+ vdd-l2-supply = <&vreg_s1f_0p7>;
+ vdd-l3-supply = <&vreg_s1f_0p7>;
+ vdd-s4-supply = <&vph_pwr>;
+
+ vreg_s4c_1p8: smps4 {
+ regulator-name = "vreg_s4c_1p8";
+ regulator-min-microvolt = <1856000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1c_1p2: ldo1 {
+ regulator-name = "vreg_l1c_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2c_0p8: ldo2 {
+ regulator-name = "vreg_l2c_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3c_0p8: ldo3 {
+ regulator-name = "vreg_l3c_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-2 {
+ compatible = "qcom,pmc8380-rpmh-regulators";
+ qcom,pmic-id = "d";
+
+ vdd-l1-supply = <&vreg_s1f_0p7>;
+ vdd-l2-supply = <&vreg_s1f_0p7>;
+ vdd-l3-supply = <&vreg_s4c_1p8>;
+ vdd-s1-supply = <&vph_pwr>;
+
+ vreg_l1d_0p8: ldo1 {
+ regulator-name = "vreg_l1d_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2d_0p9: ldo2 {
+ regulator-name = "vreg_l2d_0p9";
+ regulator-min-microvolt = <912000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3d_1p8: ldo3 {
+ regulator-name = "vreg_l3d_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-3 {
+ compatible = "qcom,pmc8380-rpmh-regulators";
+ qcom,pmic-id = "e";
+
+ vdd-l2-supply = <&vreg_s1f_0p7>;
+ vdd-l3-supply = <&vph_pwr>;
+
+ vreg_l2e_0p8: ldo2 {
+ regulator-name = "vreg_l2e_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3e_1p2: ldo3 {
+ regulator-name = "vreg_l3e_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-4 {
+ compatible = "qcom,pmc8380-rpmh-regulators";
+ qcom,pmic-id = "f";
+
+ vdd-l1-supply = <&vreg_s5j_1p2>;
+ vdd-l2-supply = <&vreg_s5j_1p2>;
+ vdd-l3-supply = <&vreg_s5j_1p2>;
+ vdd-s1-supply = <&vph_pwr>;
+
+ vreg_s1f_0p7: smps1 {
+ regulator-name = "vreg_s1f_0p7";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1f_1p0: ldo1 {
+ regulator-name = "vreg_l1f_1p0";
+ regulator-min-microvolt = <1024000>;
+ regulator-max-microvolt = <1024000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2f_1p0: ldo2 {
+ regulator-name = "vreg_l2f_1p0";
+ regulator-min-microvolt = <1024000>;
+ regulator-max-microvolt = <1024000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3f_1p0: ldo3 {
+ regulator-name = "vreg_l3f_1p0";
+ regulator-min-microvolt = <1024000>;
+ regulator-max-microvolt = <1024000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-6 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+ qcom,pmic-id = "i";
+
+ vdd-l1-supply = <&vreg_s4c_1p8>;
+ vdd-l2-supply = <&vreg_s5j_1p2>;
+ vdd-l3-supply = <&vreg_s1f_0p7>;
+ vdd-s1-supply = <&vph_pwr>;
+ vdd-s2-supply = <&vph_pwr>;
+
+ vreg_s1i_0p9: smps1 {
+ regulator-name = "vreg_s1i_0p9";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s2i_1p0: smps2 {
+ regulator-name = "vreg_s2i_1p0";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1i_1p8: ldo1 {
+ regulator-name = "vreg_l1i_1p8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2i_1p2: ldo2 {
+ regulator-name = "vreg_l2i_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3i_0p8: ldo3 {
+ regulator-name = "vreg_l3i_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+
+ regulators-7 {
+ compatible = "qcom,pm8550ve-rpmh-regulators";
+ qcom,pmic-id = "j";
+
+ vdd-l1-supply = <&vreg_s1f_0p7>;
+ vdd-l2-supply = <&vph_pwr>;
+ vdd-l3-supply = <&vreg_s1f_0p7>;
+ vdd-s5-supply = <&vph_pwr>;
+
+ vreg_s5j_1p2: smps5 {
+ regulator-name = "vreg_s5j_1p2";
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l1j_0p8: ldo1 {
+ regulator-name = "vreg_l1j_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l2j_1p2: ldo2 {
+ regulator-name = "vreg_l2j_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l3j_0p8: ldo3 {
+ regulator-name = "vreg_l3j_0p8";
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <920000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+ };
+};
+
+&qupv3_2 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <33 3>, /* Unused */
+ <44 4>, /* SPI (TPM) */
+ <238 1>; /* UFS Reset */
+};
+
+&uart21 {
+ compatible = "qcom,geni-debug-uart";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/qcom/x1e80100.dtsi b/sys/contrib/device-tree/src/arm64/qcom/x1e80100.dtsi
new file mode 100644
index 000000000000..6f75fc342ceb
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/qcom/x1e80100.dtsi
@@ -0,0 +1,3527 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,x1e80100-gcc.h>
+#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/interconnect/qcom,icc.h>
+#include <dt-bindings/interconnect/qcom,x1e80100-rpmh.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/qcom,rpmhpd.h>
+#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>
+
+/ {
+ interrupt-parent = <&intc>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ chosen { };
+
+ clocks {
+ xo_board: xo-board {
+ compatible = "fixed-clock";
+ clock-frequency = <76800000>;
+ #clock-cells = <0>;
+ };
+
+ sleep_clk: sleep-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <32000>;
+ #clock-cells = <0>;
+ };
+
+ bi_tcxo_div2: bi-tcxo-div2-clk {
+ compatible = "fixed-factor-clock";
+ #clock-cells = <0>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-mult = <1>;
+ clock-div = <2>;
+ };
+
+ bi_tcxo_ao_div2: bi-tcxo-ao-div2-clk {
+ compatible = "fixed-factor-clock";
+ #clock-cells = <0>;
+
+ clocks = <&rpmhcc RPMH_CXO_CLK_A>;
+ clock-mult = <1>;
+ clock-div = <2>;
+ };
+ };
+
+ cpus {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ CPU0: cpu@0 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ power-domains = <&CPU_PD0>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+
+ L2_0: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ };
+ };
+
+ CPU1: cpu@100 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ power-domains = <&CPU_PD1>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU2: cpu@200 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x200>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ power-domains = <&CPU_PD2>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU3: cpu@300 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x300>;
+ enable-method = "psci";
+ next-level-cache = <&L2_0>;
+ power-domains = <&CPU_PD3>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU4: cpu@10000 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x10000>;
+ enable-method = "psci";
+ next-level-cache = <&L2_1>;
+ power-domains = <&CPU_PD4>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+
+ L2_1: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ };
+ };
+
+ CPU5: cpu@10100 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x10100>;
+ enable-method = "psci";
+ next-level-cache = <&L2_1>;
+ power-domains = <&CPU_PD5>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU6: cpu@10200 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x10200>;
+ enable-method = "psci";
+ next-level-cache = <&L2_1>;
+ power-domains = <&CPU_PD6>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU7: cpu@10300 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x10300>;
+ enable-method = "psci";
+ next-level-cache = <&L2_1>;
+ power-domains = <&CPU_PD7>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU8: cpu@20000 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x20000>;
+ enable-method = "psci";
+ next-level-cache = <&L2_2>;
+ power-domains = <&CPU_PD8>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+
+ L2_2: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ };
+ };
+
+ CPU9: cpu@20100 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x20100>;
+ enable-method = "psci";
+ next-level-cache = <&L2_2>;
+ power-domains = <&CPU_PD9>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU10: cpu@20200 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x20200>;
+ enable-method = "psci";
+ next-level-cache = <&L2_2>;
+ power-domains = <&CPU_PD10>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ CPU11: cpu@20300 {
+ device_type = "cpu";
+ compatible = "qcom,oryon";
+ reg = <0x0 0x20300>;
+ enable-method = "psci";
+ next-level-cache = <&L2_2>;
+ power-domains = <&CPU_PD11>;
+ power-domain-names = "psci";
+ cpu-idle-states = <&CLUSTER_C4>;
+ };
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&CPU0>;
+ };
+
+ core1 {
+ cpu = <&CPU1>;
+ };
+
+ core2 {
+ cpu = <&CPU2>;
+ };
+
+ core3 {
+ cpu = <&CPU3>;
+ };
+ };
+
+ cluster1 {
+ core0 {
+ cpu = <&CPU4>;
+ };
+
+ core1 {
+ cpu = <&CPU5>;
+ };
+
+ core2 {
+ cpu = <&CPU6>;
+ };
+
+ core3 {
+ cpu = <&CPU7>;
+ };
+ };
+
+ cluster2 {
+ core0 {
+ cpu = <&CPU8>;
+ };
+
+ core1 {
+ cpu = <&CPU9>;
+ };
+
+ core2 {
+ cpu = <&CPU10>;
+ };
+
+ core3 {
+ cpu = <&CPU11>;
+ };
+ };
+ };
+
+ idle-states {
+ entry-method = "psci";
+
+ CLUSTER_C4: cpu-sleep-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "ret";
+ arm,psci-suspend-param = <0x00000004>;
+ entry-latency-us = <180>;
+ exit-latency-us = <320>;
+ min-residency-us = <1000>;
+ };
+ };
+
+ domain-idle-states {
+ CLUSTER_CL4: cluster-sleep-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "l2-ret";
+ arm,psci-suspend-param = <0x01000044>;
+ entry-latency-us = <350>;
+ exit-latency-us = <500>;
+ min-residency-us = <2500>;
+ };
+
+ CLUSTER_CL5: cluster-sleep-1 {
+ compatible = "arm,idle-state";
+ idle-state-name = "ret-pll-off";
+ arm,psci-suspend-param = <0x01000054>;
+ entry-latency-us = <2200>;
+ exit-latency-us = <2500>;
+ min-residency-us = <7000>;
+ };
+ };
+ };
+
+ firmware {
+ scm: scm {
+ compatible = "qcom,scm-x1e80100", "qcom,scm";
+ interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ };
+ };
+
+ clk_virt: interconnect-0 {
+ compatible = "qcom,x1e80100-clk-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ mc_virt: interconnect-1 {
+ compatible = "qcom,x1e80100-mc-virt";
+ #interconnect-cells = <2>;
+ qcom,bcm-voters = <&apps_bcm_voter>;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ /* We expect the bootloader to fill in the size */
+ reg = <0 0x80000000 0 0>;
+ };
+
+ pmu {
+ compatible = "arm,armv8-pmuv3";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+
+ CPU_PD0: power-domain-cpu0 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD0>;
+ };
+
+ CPU_PD1: power-domain-cpu1 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD0>;
+ };
+
+ CPU_PD2: power-domain-cpu2 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD0>;
+ };
+
+ CPU_PD3: power-domain-cpu3 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD0>;
+ };
+
+ CPU_PD4: power-domain-cpu4 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD1>;
+ };
+
+ CPU_PD5: power-domain-cpu5 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD1>;
+ };
+
+ CPU_PD6: power-domain-cpu6 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD1>;
+ };
+
+ CPU_PD7: power-domain-cpu7 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD1>;
+ };
+
+ CPU_PD8: power-domain-cpu8 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD2>;
+ };
+
+ CPU_PD9: power-domain-cpu9 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD2>;
+ };
+
+ CPU_PD10: power-domain-cpu10 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD2>;
+ };
+
+ CPU_PD11: power-domain-cpu11 {
+ #power-domain-cells = <0>;
+ power-domains = <&CLUSTER_PD2>;
+ };
+
+ CLUSTER_PD0: power-domain-cpu-cluster0 {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_CL4>, <&CLUSTER_CL5>;
+ };
+
+ CLUSTER_PD1: power-domain-cpu-cluster1 {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_CL4>, <&CLUSTER_CL5>;
+ };
+
+ CLUSTER_PD2: power-domain-cpu-cluster2 {
+ #power-domain-cells = <0>;
+ domain-idle-states = <&CLUSTER_CL4>, <&CLUSTER_CL5>;
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ gunyah_hyp_mem: gunyah-hyp@80000000 {
+ reg = <0x0 0x80000000 0x0 0x800000>;
+ no-map;
+ };
+
+ hyp_elf_package_mem: hyp-elf-package@80800000 {
+ reg = <0x0 0x80800000 0x0 0x200000>;
+ no-map;
+ };
+
+ ncc_mem: ncc@80a00000 {
+ reg = <0x0 0x80a00000 0x0 0x400000>;
+ no-map;
+ };
+
+ cpucp_log_mem: cpucp-log@80e00000 {
+ reg = <0x0 0x80e00000 0x0 0x40000>;
+ no-map;
+ };
+
+ cpucp_mem: cpucp@80e40000 {
+ reg = <0x0 0x80e40000 0x0 0x540000>;
+ no-map;
+ };
+
+ reserved-region@81380000 {
+ reg = <0x0 0x81380000 0x0 0x80000>;
+ no-map;
+ };
+
+ tags_mem: tags-region@81400000 {
+ reg = <0x0 0x81400000 0x0 0x1a0000>;
+ no-map;
+ };
+
+ xbl_dtlog_mem: xbl-dtlog@81a00000 {
+ reg = <0x0 0x81a00000 0x0 0x40000>;
+ no-map;
+ };
+
+ xbl_ramdump_mem: xbl-ramdump@81a40000 {
+ reg = <0x0 0x81a40000 0x0 0x1c0000>;
+ no-map;
+ };
+
+ aop_image_mem: aop-image@81c00000 {
+ reg = <0x0 0x81c00000 0x0 0x60000>;
+ no-map;
+ };
+
+ aop_cmd_db_mem: aop-cmd-db@81c60000 {
+ compatible = "qcom,cmd-db";
+ reg = <0x0 0x81c60000 0x0 0x20000>;
+ no-map;
+ };
+
+ aop_config_mem: aop-config@81c80000 {
+ reg = <0x0 0x81c80000 0x0 0x20000>;
+ no-map;
+ };
+
+ tme_crash_dump_mem: tme-crash-dump@81ca0000 {
+ reg = <0x0 0x81ca0000 0x0 0x40000>;
+ no-map;
+ };
+
+ tme_log_mem: tme-log@81ce0000 {
+ reg = <0x0 0x81ce0000 0x0 0x4000>;
+ no-map;
+ };
+
+ uefi_log_mem: uefi-log@81ce4000 {
+ reg = <0x0 0x81ce4000 0x0 0x10000>;
+ no-map;
+ };
+
+ secdata_apss_mem: secdata-apss@81cff000 {
+ reg = <0x0 0x81cff000 0x0 0x1000>;
+ no-map;
+ };
+
+ pdp_ns_shared_mem: pdp-ns-shared@81e00000 {
+ reg = <0x0 0x81e00000 0x0 0x100000>;
+ no-map;
+ };
+
+ gpu_prr_mem: gpu-prr@81f00000 {
+ reg = <0x0 0x81f00000 0x0 0x10000>;
+ no-map;
+ };
+
+ tpm_control_mem: tpm-control@81f10000 {
+ reg = <0x0 0x81f10000 0x0 0x10000>;
+ no-map;
+ };
+
+ usb_ucsi_shared_mem: usb-ucsi-shared@81f20000 {
+ reg = <0x0 0x81f20000 0x0 0x10000>;
+ no-map;
+ };
+
+ pld_pep_mem: pld-pep@81f30000 {
+ reg = <0x0 0x81f30000 0x0 0x6000>;
+ no-map;
+ };
+
+ pld_gmu_mem: pld-gmu@81f36000 {
+ reg = <0x0 0x81f36000 0x0 0x1000>;
+ no-map;
+ };
+
+ pld_pdp_mem: pld-pdp@81f37000 {
+ reg = <0x0 0x81f37000 0x0 0x1000>;
+ no-map;
+ };
+
+ tz_stat_mem: tz-stat@82700000 {
+ reg = <0x0 0x82700000 0x0 0x100000>;
+ no-map;
+ };
+
+ xbl_tmp_buffer_mem: xbl-tmp-buffer@82800000 {
+ reg = <0x0 0x82800000 0x0 0xc00000>;
+ no-map;
+ };
+
+ adsp_rpc_remote_heap_mem: adsp-rpc-remote-heap@84b00000 {
+ reg = <0x0 0x84b00000 0x0 0x800000>;
+ no-map;
+ };
+
+ spu_secure_shared_memory_mem: spu-secure-shared-memory@85300000 {
+ reg = <0x0 0x85300000 0x0 0x80000>;
+ no-map;
+ };
+
+ adsp_boot_dtb_mem: adsp-boot-dtb@866c0000 {
+ reg = <0x0 0x866c0000 0x0 0x40000>;
+ no-map;
+ };
+
+ spss_region_mem: spss-region@86700000 {
+ reg = <0x0 0x86700000 0x0 0x400000>;
+ no-map;
+ };
+
+ adsp_boot_mem: adsp-boot@86b00000 {
+ reg = <0x0 0x86b00000 0x0 0xc00000>;
+ no-map;
+ };
+
+ video_mem: video@87700000 {
+ reg = <0x0 0x87700000 0x0 0x700000>;
+ no-map;
+ };
+
+ adspslpi_mem: adspslpi@87e00000 {
+ reg = <0x0 0x87e00000 0x0 0x3a00000>;
+ no-map;
+ };
+
+ q6_adsp_dtb_mem: q6-adsp-dtb@8b800000 {
+ reg = <0x0 0x8b800000 0x0 0x80000>;
+ no-map;
+ };
+
+ cdsp_mem: cdsp@8b900000 {
+ reg = <0x0 0x8b900000 0x0 0x2000000>;
+ no-map;
+ };
+
+ q6_cdsp_dtb_mem: q6-cdsp-dtb@8d900000 {
+ reg = <0x0 0x8d900000 0x0 0x80000>;
+ no-map;
+ };
+
+ gpu_microcode_mem: gpu-microcode@8d9fe000 {
+ reg = <0x0 0x8d9fe000 0x0 0x2000>;
+ no-map;
+ };
+
+ cvp_mem: cvp@8da00000 {
+ reg = <0x0 0x8da00000 0x0 0x700000>;
+ no-map;
+ };
+
+ camera_mem: camera@8e100000 {
+ reg = <0x0 0x8e100000 0x0 0x800000>;
+ no-map;
+ };
+
+ av1_encoder_mem: av1-encoder@8e900000 {
+ reg = <0x0 0x8e900000 0x0 0x700000>;
+ no-map;
+ };
+
+ reserved-region@8f000000 {
+ reg = <0x0 0x8f000000 0x0 0xa00000>;
+ no-map;
+ };
+
+ wpss_mem: wpss@8fa00000 {
+ reg = <0x0 0x8fa00000 0x0 0x1900000>;
+ no-map;
+ };
+
+ q6_wpss_dtb_mem: q6-wpss-dtb@91300000 {
+ reg = <0x0 0x91300000 0x0 0x80000>;
+ no-map;
+ };
+
+ xbl_sc_mem: xbl-sc@d8000000 {
+ reg = <0x0 0xd8000000 0x0 0x40000>;
+ no-map;
+ };
+
+ reserved-region@d8040000 {
+ reg = <0x0 0xd8040000 0x0 0xa0000>;
+ no-map;
+ };
+
+ qtee_mem: qtee@d80e0000 {
+ reg = <0x0 0xd80e0000 0x0 0x520000>;
+ no-map;
+ };
+
+ ta_mem: ta@d8600000 {
+ reg = <0x0 0xd8600000 0x0 0x8a00000>;
+ no-map;
+ };
+
+ tags_mem1: tags@e1000000 {
+ reg = <0x0 0xe1000000 0x0 0x26a0000>;
+ no-map;
+ };
+
+ llcc_lpi_mem: llcc-lpi@ff800000 {
+ reg = <0x0 0xff800000 0x0 0x600000>;
+ no-map;
+ };
+
+ smem_mem: smem@ffe00000 {
+ compatible = "qcom,smem";
+ reg = <0x0 0xffe00000 0x0 0x200000>;
+ hwlocks = <&tcsr_mutex 3>;
+ no-map;
+ };
+ };
+
+ soc: soc@0 {
+ compatible = "simple-bus";
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-ranges = <0 0 0 0 0x10 0>;
+ ranges = <0 0 0 0 0x10 0>;
+
+ gcc: clock-controller@100000 {
+ compatible = "qcom,x1e80100-gcc";
+ reg = <0 0x00100000 0 0x200000>;
+
+ clocks = <&bi_tcxo_div2>,
+ <&sleep_clk>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>,
+ <0>;
+
+ power-domains = <&rpmhpd RPMHPD_CX>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
+ gpi_dma2: dma-controller@800000 {
+ compatible = "qcom,x1e80100-gpi-dma", "qcom,sm6350-gpi-dma";
+ reg = <0 0x00800000 0 0x60000>;
+
+ interrupts = <GIC_SPI 788 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 790 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 791 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 792 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 793 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 794 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 795 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 796 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 797 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 798 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 799 IRQ_TYPE_LEVEL_HIGH>;
+
+ dma-channels = <12>;
+ dma-channel-mask = <0x3e>;
+ #dma-cells = <3>;
+
+ iommus = <&apps_smmu 0x436 0x0>;
+
+ status = "disabled";
+ };
+
+ qupv3_2: geniqup@8c0000 {
+ compatible = "qcom,geni-se-qup";
+ reg = <0 0x008c0000 0 0x2000>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP_2_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_2_S_AHB_CLK>;
+ clock-names = "m-ahb",
+ "s-ahb";
+
+ iommus = <&apps_smmu 0x423 0x0>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ i2c16: i2c@880000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00880000 0 0x4000>;
+
+ interrupts = <GIC_SPI 808 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 0 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 0 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c16_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi16: spi@880000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00880000 0 0x4000>;
+
+ interrupts = <GIC_SPI 808 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 0 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 0 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi16_data_clk>, <&qup_spi16_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c17: i2c@884000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00884000 0 0x4000>;
+
+ interrupts = <GIC_SPI 809 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 1 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 1 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c17_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi17: spi@884000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00884000 0 0x4000>;
+
+ interrupts = <GIC_SPI 809 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 1 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 1 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi17_data_clk>, <&qup_spi17_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c18: i2c@888000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00888000 0 0x4000>;
+
+ interrupts = <GIC_SPI 810 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 2 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 2 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c18_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi18: spi@888000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00888000 0 0x4000>;
+
+ interrupts = <GIC_SPI 810 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 2 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 2 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi18_data_clk>, <&qup_spi18_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c19: i2c@88c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x0088c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 3 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 3 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c19_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi19: spi@88c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x0088c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 3 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 3 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi19_data_clk>, <&qup_spi19_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c20: i2c@890000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00890000 0 0x4000>;
+
+ interrupts = <GIC_SPI 812 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 4 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 4 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c20_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi20: spi@890000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00890000 0 0x4000>;
+
+ interrupts = <GIC_SPI 812 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 4 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 4 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi20_data_clk>, <&qup_spi20_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c21: i2c@894000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00894000 0 0x4000>;
+
+ interrupts = <GIC_SPI 813 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 5 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 5 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c21_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi21: spi@894000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00894000 0 0x4000>;
+
+ interrupts = <GIC_SPI 813 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 5 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 5 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi21_data_clk>, <&qup_spi21_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ uart21: serial@894000 {
+ compatible = "qcom,geni-uart";
+ reg = <0 0x00894000 0 0x4000>;
+
+ interrupts = <GIC_SPI 813 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config";
+
+ pinctrl-0 = <&qup_uart21_default>;
+ pinctrl-names = "default";
+
+ status = "disabled";
+ };
+
+ i2c22: i2c@898000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00898000 0 0x4000>;
+
+ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 6 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 6 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c22_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi22: spi@898000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00898000 0 0x4000>;
+
+ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 6 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 6 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi22_data_clk>, <&qup_spi22_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c23: i2c@89c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x0089c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 7 QCOM_GPI_I2C>,
+ <&gpi_dma2 1 7 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c23_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi23: spi@89c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x0089c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP2_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_2 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_2 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_2 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma2 0 7 QCOM_GPI_SPI>,
+ <&gpi_dma2 1 7 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi23_data_clk>, <&qup_spi23_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ gpi_dma1: dma-controller@a00000 {
+ compatible = "qcom,x1e80100-gpi-dma", "qcom,sm6350-gpi-dma";
+ reg = <0 0x00a00000 0 0x60000>;
+
+ interrupts = <GIC_SPI 776 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 777 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 778 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 779 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 780 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 781 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 782 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 783 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 784 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 785 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 786 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 787 IRQ_TYPE_LEVEL_HIGH>;
+
+ dma-channels = <12>;
+ dma-channel-mask = <0x3e>;
+ #dma-cells = <3>;
+
+ iommus = <&apps_smmu 0x136 0x0>;
+
+ status = "disabled";
+ };
+
+ qupv3_1: geniqup@ac0000 {
+ compatible = "qcom,geni-se-qup";
+ reg = <0 0x00ac0000 0 0x2000>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
+ clock-names = "m-ahb",
+ "s-ahb";
+
+ iommus = <&apps_smmu 0x123 0x0>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ i2c8: i2c@a80000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a80000 0 0x4000>;
+
+ interrupts = <GIC_SPI 800 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 0 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 0 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c8_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi8: spi@a80000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a80000 0 0x4000>;
+
+ interrupts = <GIC_SPI 800 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 0 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 0 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi8_data_clk>, <&qup_spi8_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c9: i2c@a84000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a84000 0 0x4000>;
+
+ interrupts = <GIC_SPI 801 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 1 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 1 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c9_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi9: spi@a84000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a84000 0 0x4000>;
+
+ interrupts = <GIC_SPI 801 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 1 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 1 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi9_data_clk>, <&qup_spi9_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c10: i2c@a88000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a88000 0 0x4000>;
+
+ interrupts = <GIC_SPI 802 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 2 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 2 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c10_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi10: spi@a88000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a88000 0 0x4000>;
+
+ interrupts = <GIC_SPI 802 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 2 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 2 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi10_data_clk>, <&qup_spi10_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c11: i2c@a8c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a8c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 803 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 3 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 3 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c11_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi11: spi@a8c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a8c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 803 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 3 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 3 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi11_data_clk>, <&qup_spi11_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c12: i2c@a90000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a90000 0 0x4000>;
+
+ interrupts = <GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 4 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 4 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c12_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi12: spi@a90000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a90000 0 0x4000>;
+
+ interrupts = <GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 4 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 4 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi12_data_clk>, <&qup_spi12_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c13: i2c@a94000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a94000 0 0x4000>;
+
+ interrupts = <GIC_SPI 805 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 5 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 5 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c13_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi13: spi@a94000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a94000 0 0x4000>;
+
+ interrupts = <GIC_SPI 805 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 5 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 5 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi13_data_clk>, <&qup_spi13_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c14: i2c@a98000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a98000 0 0x4000>;
+
+ interrupts = <GIC_SPI 806 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 6 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 6 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c14_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi14: spi@a98000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a98000 0 0x4000>;
+
+ interrupts = <GIC_SPI 806 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 6 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 6 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi14_data_clk>, <&qup_spi14_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c15: i2c@a9c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00a9c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 807 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 7 QCOM_GPI_I2C>,
+ <&gpi_dma1 1 7 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c15_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi15: spi@a9c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00a9c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 807 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP1_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_1 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre1_noc MASTER_QUP_1 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma1 0 7 QCOM_GPI_SPI>,
+ <&gpi_dma1 1 7 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi15_data_clk>, <&qup_spi15_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ gpi_dma0: dma-controller@b00000 {
+ compatible = "qcom,x1e80100-gpi-dma", "qcom,sm6350-gpi-dma";
+ reg = <0 0x00b00000 0 0x60000>;
+
+ interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 590 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 591 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 592 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 593 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 594 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 595 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 596 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 597 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 598 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 599 IRQ_TYPE_LEVEL_HIGH>;
+
+ dma-channels = <12>;
+ dma-channel-mask = <0x3e>;
+ #dma-cells = <3>;
+
+ iommus = <&apps_smmu 0x456 0x0>;
+
+ status = "disabled";
+ };
+
+ qupv3_0: geniqup@bc0000 {
+ compatible = "qcom,geni-se-qup";
+ reg = <0 0x00bc0000 0 0x2000>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
+ clock-names = "m-ahb",
+ "s-ahb";
+
+ iommus = <&apps_smmu 0x443 0x0>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ i2c0: i2c@b80000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0xb80000 0 0x4000>;
+
+ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 0 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 0 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c0_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi0: spi@b80000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b80000 0 0x4000>;
+
+ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 0 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 0 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c1: i2c@b84000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00b84000 0 0x4000>;
+
+ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 1 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 1 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c1_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi1: spi@b84000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b84000 0 0x4000>;
+
+ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 1 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 1 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi1_data_clk>, <&qup_spi1_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c2: i2c@b88000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00b88000 0 0x4000>;
+
+ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 2 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 2 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c2_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi2: spi@b88000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0xb88000 0 0x4000>;
+
+ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 2 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 2 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi2_data_clk>, <&qup_spi2_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c3: i2c@b8c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00b8c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 3 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 3 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c3_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi3: spi@b8c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b8c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 3 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 3 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi3_data_clk>, <&qup_spi3_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c4: i2c@b90000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0xb90000 0 0x4000>;
+
+ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 4 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 4 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c4_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi4: spi@b90000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b90000 0 0x4000>;
+
+ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 4 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 4 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi4_data_clk>, <&qup_spi4_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c5: i2c@b94000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00b94000 0 0x4000>;
+
+ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 5 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 5 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c5_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi5: spi@b94000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b94000 0 0x4000>;
+
+ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 5 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 5 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi5_data_clk>, <&qup_spi5_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c6: i2c@b98000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00b98000 0 0x4000>;
+
+ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 6 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 6 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c6_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi6: spi@b98000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b98000 0 0x4000>;
+
+ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 6 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 6 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi6_data_clk>, <&qup_spi6_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2c7: i2c@b9c000 {
+ compatible = "qcom,geni-i2c";
+ reg = <0 0x00b9c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 7 QCOM_GPI_I2C>,
+ <&gpi_dma0 1 7 QCOM_GPI_I2C>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_i2c7_data_clk>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
+ spi7: spi@b9c000 {
+ compatible = "qcom,geni-spi";
+ reg = <0 0x00b9c000 0 0x4000>;
+
+ interrupts = <GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>;
+ clock-names = "se";
+
+ interconnects = <&clk_virt MASTER_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS
+ &clk_virt SLAVE_QUP_CORE_0 QCOM_ICC_TAG_ALWAYS>,
+ <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+ &config_noc SLAVE_QUP_0 QCOM_ICC_TAG_ALWAYS>,
+ <&aggre2_noc MASTER_QUP_0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "qup-core",
+ "qup-config",
+ "qup-memory";
+
+ dmas = <&gpi_dma0 0 7 QCOM_GPI_SPI>,
+ <&gpi_dma0 1 7 QCOM_GPI_SPI>;
+ dma-names = "tx",
+ "rx";
+
+ pinctrl-0 = <&qup_spi7_data_clk>, <&qup_spi7_cs>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ cnoc_main: interconnect@1500000 {
+ compatible = "qcom,x1e80100-cnoc-main";
+ reg = <0 0x1500000 0 0x14400>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ config_noc: interconnect@1600000 {
+ compatible = "qcom,x1e80100-cnoc-cfg";
+ reg = <0 0x1600000 0 0x6600>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ system_noc: interconnect@1680000 {
+ compatible = "qcom,x1e80100-system-noc";
+ reg = <0 0x1680000 0 0x1c080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ pcie_south_anoc: interconnect@16c0000 {
+ compatible = "qcom,x1e80100-pcie-south-anoc";
+ reg = <0 0x16c0000 0 0xd080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ pcie_center_anoc: interconnect@16d0000 {
+ compatible = "qcom,x1e80100-pcie-center-anoc";
+ reg = <0 0x16d0000 0 0x7000>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ aggre1_noc: interconnect@16e0000 {
+ compatible = "qcom,x1e80100-aggre1-noc";
+ reg = <0 0x16E0000 0 0x14400>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ aggre2_noc: interconnect@1700000 {
+ compatible = "qcom,x1e80100-aggre2-noc";
+ reg = <0 0x1700000 0 0x1c400>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ pcie_north_anoc: interconnect@1740000 {
+ compatible = "qcom,x1e80100-pcie-north-anoc";
+ reg = <0 0x1740000 0 0x9080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ usb_center_anoc: interconnect@1750000 {
+ compatible = "qcom,x1e80100-usb-center-anoc";
+ reg = <0 0x1750000 0 0x8800>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ usb_north_anoc: interconnect@1760000 {
+ compatible = "qcom,x1e80100-usb-north-anoc";
+ reg = <0 0x1760000 0 0x7080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ usb_south_anoc: interconnect@1770000 {
+ compatible = "qcom,x1e80100-usb-south-anoc";
+ reg = <0 0x1770000 0 0xf080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ mmss_noc: interconnect@1780000 {
+ compatible = "qcom,x1e80100-mmss-noc";
+ reg = <0 0x1780000 0 0x5B800>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ tcsr_mutex: hwlock@1f40000 {
+ compatible = "qcom,tcsr-mutex";
+ reg = <0 0x01f40000 0 0x20000>;
+ #hwlock-cells = <1>;
+ };
+
+ gem_noc: interconnect@26400000 {
+ compatible = "qcom,x1e80100-gem-noc";
+ reg = <0 0x26400000 0 0x311200>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ nsp_noc: interconnect@320c0000 {
+ compatible = "qcom,x1e80100-nsp-noc";
+ reg = <0 0x320C0000 0 0xE080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ lpass_ag_noc: interconnect@7e40000 {
+ compatible = "qcom,x1e80100-lpass-ag-noc";
+ reg = <0 0x7e40000 0 0xE080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ lpass_lpiaon_noc: interconnect@7400000 {
+ compatible = "qcom,x1e80100-lpass-lpiaon-noc";
+ reg = <0 0x7400000 0 0x19080>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ lpass_lpicx_noc: interconnect@7430000 {
+ compatible = "qcom,x1e80100-lpass-lpicx-noc";
+ reg = <0 0x7430000 0 0x3A200>;
+
+ qcom,bcm-voters = <&apps_bcm_voter>;
+
+ #interconnect-cells = <2>;
+ };
+
+ pdc: interrupt-controller@b220000 {
+ compatible = "qcom,x1e80100-pdc", "qcom,pdc";
+ reg = <0 0x0b220000 0 0x30000>, <0 0x174000f0 0 0x64>;
+
+ qcom,pdc-ranges = <0 480 42>, <42 251 5>,
+ <47 522 52>, <99 609 32>,
+ <131 717 12>, <143 816 19>;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&intc>;
+ interrupt-controller;
+ };
+
+ tlmm: pinctrl@f100000 {
+ compatible = "qcom,x1e80100-tlmm";
+ reg = <0 0x0f100000 0 0xf00000>;
+
+ interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ gpio-ranges = <&tlmm 0 0 239>;
+ wakeup-parent = <&pdc>;
+
+ qup_i2c0_data_clk: qup-i2c0-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio0", "gpio1";
+ function = "qup0_se0";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c1_data_clk: qup-i2c1-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio4", "gpio5";
+ function = "qup0_se1";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c2_data_clk: qup-i2c2-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio8", "gpio9";
+ function = "qup0_se2";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c3_data_clk: qup-i2c3-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio12", "gpio13";
+ function = "qup0_se3";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c4_data_clk: qup-i2c4-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio16", "gpio17";
+ function = "qup0_se4";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c5_data_clk: qup-i2c5-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio20", "gpio21";
+ function = "qup0_se5";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c6_data_clk: qup-i2c6-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio24", "gpio25";
+ function = "qup0_se6";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c7_data_clk: qup-i2c7-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio14", "gpio15";
+ function = "qup0_se7";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c8_data_clk: qup-i2c8-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio32", "gpio33";
+ function = "qup1_se0";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c9_data_clk: qup-i2c9-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio36", "gpio37";
+ function = "qup1_se1";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c10_data_clk: qup-i2c10-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio40", "gpio41";
+ function = "qup1_se2";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c11_data_clk: qup-i2c11-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio44", "gpio45";
+ function = "qup1_se3";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c12_data_clk: qup-i2c12-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio48", "gpio49";
+ function = "qup1_se4";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c13_data_clk: qup-i2c13-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio52", "gpio53";
+ function = "qup1_se5";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c14_data_clk: qup-i2c14-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio56", "gpio57";
+ function = "qup1_se6";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c15_data_clk: qup-i2c15-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio54", "gpio55";
+ function = "qup1_se7";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c16_data_clk: qup-i2c16-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio64", "gpio65";
+ function = "qup2_se0";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c17_data_clk: qup-i2c17-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio68", "gpio69";
+ function = "qup2_se1";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c18_data_clk: qup-i2c18-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio72", "gpio73";
+ function = "qup2_se2";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c19_data_clk: qup-i2c19-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio76", "gpio77";
+ function = "qup2_se3";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c20_data_clk: qup-i2c20-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio80", "gpio81";
+ function = "qup2_se4";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c21_data_clk: qup-i2c21-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio84", "gpio85";
+ function = "qup2_se5";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c22_data_clk: qup-i2c22-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio88", "gpio89";
+ function = "qup2_se6";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_i2c23_data_clk: qup-i2c23-data-clk-state {
+ /* SDA, SCL */
+ pins = "gpio86", "gpio87";
+ function = "qup2_se7";
+ drive-strength = <2>;
+ bias-pull-up = <2200>;
+ };
+
+ qup_spi0_cs: qup-spi0-cs-state {
+ pins = "gpio3";
+ function = "qup0_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi0_data_clk: qup-spi0-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio0", "gpio1", "gpio2";
+ function = "qup0_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi1_cs: qup-spi1-cs-state {
+ pins = "gpio7";
+ function = "qup0_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi1_data_clk: qup-spi1-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio4", "gpio5", "gpio6";
+ function = "qup0_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi2_cs: qup-spi2-cs-state {
+ pins = "gpio11";
+ function = "qup0_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi2_data_clk: qup-spi2-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio8", "gpio9", "gpio10";
+ function = "qup0_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi3_cs: qup-spi3-cs-state {
+ pins = "gpio15";
+ function = "qup0_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi3_data_clk: qup-spi3-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio12", "gpio13", "gpio14";
+ function = "qup0_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi4_cs: qup-spi4-cs-state {
+ pins = "gpio19";
+ function = "qup0_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi4_data_clk: qup-spi4-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio16", "gpio17", "gpio18";
+ function = "qup0_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi5_cs: qup-spi5-cs-state {
+ pins = "gpio23";
+ function = "qup0_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi5_data_clk: qup-spi5-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio20", "gpio21", "gpio22";
+ function = "qup0_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi6_cs: qup-spi6-cs-state {
+ pins = "gpio27";
+ function = "qup0_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi6_data_clk: qup-spi6-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio24", "gpio25", "gpio26";
+ function = "qup0_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi7_cs: qup-spi7-cs-state {
+ pins = "gpio13";
+ function = "qup0_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi7_data_clk: qup-spi7-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio14", "gpio15", "gpio12";
+ function = "qup0_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi8_cs: qup-spi8-cs-state {
+ pins = "gpio35";
+ function = "qup1_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi8_data_clk: qup-spi8-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio32", "gpio33", "gpio34";
+ function = "qup1_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi9_cs: qup-spi9-cs-state {
+ pins = "gpio39";
+ function = "qup1_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi9_data_clk: qup-spi9-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio36", "gpio37", "gpio38";
+ function = "qup1_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi10_cs: qup-spi10-cs-state {
+ pins = "gpio43";
+ function = "qup1_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi10_data_clk: qup-spi10-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio40", "gpio41", "gpio42";
+ function = "qup1_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi11_cs: qup-spi11-cs-state {
+ pins = "gpio47";
+ function = "qup1_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi11_data_clk: qup-spi11-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio44", "gpio45", "gpio46";
+ function = "qup1_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi12_cs: qup-spi12-cs-state {
+ pins = "gpio51";
+ function = "qup1_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi12_data_clk: qup-spi12-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio48", "gpio49", "gpio50";
+ function = "qup1_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi13_cs: qup-spi13-cs-state {
+ pins = "gpio55";
+ function = "qup1_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi13_data_clk: qup-spi13-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio52", "gpio53", "gpio54";
+ function = "qup1_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi14_cs: qup-spi14-cs-state {
+ pins = "gpio59";
+ function = "qup1_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi14_data_clk: qup-spi14-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio56", "gpio57", "gpio58";
+ function = "qup1_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi15_cs: qup-spi15-cs-state {
+ pins = "gpio53";
+ function = "qup1_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi15_data_clk: qup-spi15-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio54", "gpio55", "gpio52";
+ function = "qup1_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi16_cs: qup-spi16-cs-state {
+ pins = "gpio67";
+ function = "qup2_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi16_data_clk: qup-spi16-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio64", "gpio65", "gpio66";
+ function = "qup2_se0";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi17_cs: qup-spi17-cs-state {
+ pins = "gpio71";
+ function = "qup2_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi17_data_clk: qup-spi17-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio68", "gpio69", "gpio70";
+ function = "qup2_se1";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi18_cs: qup-spi18-cs-state {
+ pins = "gpio75";
+ function = "qup2_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi18_data_clk: qup-spi18-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio72", "gpio73", "gpio74";
+ function = "qup2_se2";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi19_cs: qup-spi19-cs-state {
+ pins = "gpio79";
+ function = "qup2_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi19_data_clk: qup-spi19-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio76", "gpio77", "gpio78";
+ function = "qup2_se3";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi20_cs: qup-spi20-cs-state {
+ pins = "gpio83";
+ function = "qup2_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi20_data_clk: qup-spi20-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio80", "gpio81", "gpio82";
+ function = "qup2_se4";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi21_cs: qup-spi21-cs-state {
+ pins = "gpio87";
+ function = "qup2_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi21_data_clk: qup-spi21-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio84", "gpio85", "gpio86";
+ function = "qup2_se5";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi22_cs: qup-spi22-cs-state {
+ pins = "gpio91";
+ function = "qup2_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi22_data_clk: qup-spi22-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio88", "gpio89", "gpio90";
+ function = "qup2_se6";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi23_cs: qup-spi23-cs-state {
+ pins = "gpio85";
+ function = "qup2_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_spi23_data_clk: qup-spi23-data-clk-state {
+ /* MISO, MOSI, CLK */
+ pins = "gpio86", "gpio87", "gpio84";
+ function = "qup2_se7";
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ qup_uart21_default: qup-uart21-default-state {
+ /* TX, RX */
+ pins = "gpio86", "gpio87";
+ function = "qup2_se5";
+ drive-strength= <2>;
+ bias-disable;
+ };
+ };
+
+ apps_smmu: iommu@15000000 {
+ compatible = "qcom,x1e80100-smmu-500", "qcom,smmu-500", "arm,mmu-500";
+ reg = <0 0x15000000 0 0x100000>;
+
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>;
+
+ #iommu-cells = <2>;
+ #global-interrupts = <1>;
+ };
+
+ intc: interrupt-controller@17000000 {
+ compatible = "arm,gic-v3";
+ reg = <0 0x17000000 0 0x10000>, /* GICD */
+ <0 0x17080000 0 0x480000>; /* GICR * 12 */
+
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+ #interrupt-cells = <3>;
+ interrupt-controller;
+
+ #redistributor-regions = <1>;
+ redistributor-stride = <0x0 0x40000>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ gic_its: msi-controller@17040000 {
+ compatible = "arm,gic-v3-its";
+ reg = <0 0x17040000 0 0x40000>;
+
+ msi-controller;
+ #msi-cells = <1>;
+
+ status = "disabled";
+ };
+ };
+
+ apps_rsc: rsc@17500000 {
+ compatible = "qcom,rpmh-rsc";
+ reg = <0 0x17500000 0 0x10000>,
+ <0 0x17510000 0 0x10000>,
+ <0 0x17520000 0 0x10000>;
+ reg-names = "drv-0", "drv-1", "drv-2";
+ qcom,drv-count = <3>;
+
+ interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+ qcom,tcs-offset = <0xd00>;
+ qcom,drv-id = <2>;
+ qcom,tcs-config = <ACTIVE_TCS 3>, <SLEEP_TCS 2>,
+ <WAKE_TCS 2>, <CONTROL_TCS 0>;
+
+ label = "apps_rsc";
+
+ apps_bcm_voter: bcm-voter {
+ compatible = "qcom,bcm-voter";
+ };
+
+ rpmhcc: clock-controller {
+ compatible = "qcom,x1e80100-rpmh-clk";
+
+ clocks = <&xo_board>;
+ clock-names = "xo";
+
+ #clock-cells = <1>;
+ };
+
+ rpmhpd: power-controller {
+ compatible = "qcom,x1e80100-rpmhpd";
+
+ operating-points-v2 = <&rpmhpd_opp_table>;
+
+ #power-domain-cells = <1>;
+
+ rpmhpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmhpd_opp_ret: opp-16 {
+ opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
+ };
+
+ rpmhpd_opp_min_svs: opp-48 {
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+
+ rpmhpd_opp_low_svs_d2: opp-52 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
+ };
+
+ rpmhpd_opp_low_svs_d1: opp-56 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D1>;
+ };
+
+ rpmhpd_opp_low_svs_d0: opp-60 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D0>;
+ };
+
+ rpmhpd_opp_low_svs: opp-64 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ rpmhpd_opp_low_svs_l1: opp-80 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_L1>;
+ };
+
+ rpmhpd_opp_svs: opp-128 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ rpmhpd_opp_svs_l0: opp-144 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
+ };
+
+ rpmhpd_opp_svs_l1: opp-192 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ rpmhpd_opp_nom: opp-256 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ };
+
+ rpmhpd_opp_nom_l1: opp-320 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ };
+
+ rpmhpd_opp_nom_l2: opp-336 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
+ };
+
+ rpmhpd_opp_turbo: opp-384 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ };
+
+ rpmhpd_opp_turbo_l1: opp-416 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ };
+ };
+ };
+ };
+
+ timer@17800000 {
+ compatible = "arm,armv7-timer-mem";
+ reg = <0 0x17800000 0 0x1000>;
+
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 0 0 0x20000000>;
+
+ frame@17801000 {
+ reg = <0 0x17801000 0x1000>,
+ <0 0x17802000 0x1000>;
+
+ interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <0>;
+ };
+
+ frame@17803000 {
+ reg = <0 0x17803000 0x1000>;
+
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <1>;
+
+ status = "disabled";
+ };
+
+ frame@17805000 {
+ reg = <0 0x17805000 0x1000>;
+
+ interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <2>;
+
+ status = "disabled";
+ };
+
+ frame@17807000 {
+ reg = <0 0x17807000 0x1000>;
+
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <3>;
+
+ status = "disabled";
+ };
+
+ frame@17809000 {
+ reg = <0 0x17809000 0x1000>;
+
+ interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <4>;
+
+ status = "disabled";
+ };
+
+ frame@1780b000 {
+ reg = <0 0x1780b000 0x1000>;
+
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <5>;
+
+ status = "disabled";
+ };
+
+ frame@1780d000 {
+ reg = <0 0x1780d000 0x1000>;
+
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+
+ frame-number = <6>;
+
+ status = "disabled";
+ };
+ };
+
+ system-cache-controller@25000000 {
+ compatible = "qcom,x1e80100-llcc";
+ reg = <0 0x25000000 0 0x200000>,
+ <0 0x25200000 0 0x200000>,
+ <0 0x25400000 0 0x200000>,
+ <0 0x25600000 0 0x200000>,
+ <0 0x25800000 0 0x200000>,
+ <0 0x25a00000 0 0x200000>,
+ <0 0x25c00000 0 0x200000>,
+ <0 0x25e00000 0 0x200000>,
+ <0 0x26000000 0 0x200000>;
+ reg-names = "llcc0_base",
+ "llcc1_base",
+ "llcc2_base",
+ "llcc3_base",
+ "llcc4_base",
+ "llcc5_base",
+ "llcc6_base",
+ "llcc7_base",
+ "llcc_broadcast_base";
+ interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/beacon-renesom-baseboard.dtsi b/sys/contrib/device-tree/src/arm64/renesas/beacon-renesom-baseboard.dtsi
index 2e9927b97732..5a14f116f7a1 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/beacon-renesom-baseboard.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/beacon-renesom-baseboard.dtsi
@@ -651,7 +651,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&versaclock6_bb 4>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
+ <&cpg CPG_MOD 922>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/draak.dtsi b/sys/contrib/device-tree/src/arm64/renesas/draak.dtsi
index ef3bb835d5c0..6f133f54ded5 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/draak.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/draak.dtsi
@@ -356,12 +356,9 @@
* CVBS and HDMI inputs through SW[49-53]
* switches.
*
- * CVBS is the default selection, link it to
- * VIN4 here.
+ * HDMI is the default selection, leave CVBS
+ * not connected here.
*/
- adv7180_out: endpoint {
- remote-endpoint = <&vin4_in>;
- };
};
};
@@ -374,6 +371,12 @@
interrupt-parent = <&gpio1>;
interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
@@ -423,13 +426,11 @@
* CVBS and HDMI inputs through SW[49-53]
* switches.
*
- * CVBS is the default selection, leave HDMI
- * not connected here.
+ * HDMI is the default selection, link it to
+ * VIN4 here.
*/
adv7612_out: endpoint {
- pclk-sample = <0>;
- hsync-active = <0>;
- vsync-active = <0>;
+ remote-endpoint = <&vin4_in>;
};
};
};
@@ -580,8 +581,8 @@
function = "usb0";
};
- vin4_pins_cvbs: vin4 {
- groups = "vin4_data8", "vin4_sync", "vin4_clk";
+ vin4_pins: vin4 {
+ groups = "vin4_data24", "vin4_sync", "vin4_clk";
function = "vin4";
};
};
@@ -729,7 +730,7 @@
};
&vin4 {
- pinctrl-0 = <&vin4_pins_cvbs>;
+ pinctrl-0 = <&vin4_pins>;
pinctrl-names = "default";
status = "okay";
@@ -737,7 +738,10 @@
ports {
port {
vin4_in: endpoint {
- remote-endpoint = <&adv7180_out>;
+ pclk-sample = <0>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ remote-endpoint = <&adv7612_out>;
};
};
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ebisu.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ebisu.dtsi
index bbc29452d1be..cba2fde9dd36 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ebisu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ebisu.dtsi
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Device Tree Source for the Ebisu board
+ * Device Tree Source for the Ebisu/Ebisu-4D board
*
* Copyright (C) 2018 Renesas Electronics Corp.
*/
@@ -403,6 +403,12 @@
interrupt-parent = <&gpio1>;
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&reg_1p8v>;
+ dvdd-supply = <&reg_1p8v>;
+ pvdd-supply = <&reg_1p8v>;
+ dvdd-3v-supply = <&reg_3p3v>;
+ bgvdd-supply = <&reg_1p8v>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/gmsl-cameras.dtsi b/sys/contrib/device-tree/src/arm64/renesas/gmsl-cameras.dtsi
index d45f072f8cdf..e0930d1ba3aa 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/gmsl-cameras.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/gmsl-cameras.dtsi
@@ -100,7 +100,7 @@
#ifdef GMSL_CAMERA_1
port@1 {
- max9286_in1: endpoint{
+ max9286_in1: endpoint {
remote-endpoint = <&fakra_con1>;
};
@@ -233,7 +233,7 @@
#ifdef GMSL_CAMERA_5
port@1 {
- max9286_in5: endpoint{
+ max9286_in5: endpoint {
remote-endpoint = <&fakra_con5>;
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/hihope-rev4.dtsi b/sys/contrib/device-tree/src/arm64/renesas/hihope-rev4.dtsi
index 7fc0339a3ac9..66f3affe0469 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/hihope-rev4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/hihope-rev4.dtsi
@@ -112,7 +112,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&cs2000>,
<&audio_clk_c>,
- <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
+ <&cpg CPG_MOD 922>;
rsnd_port: port {
rsnd_endpoint: endpoint {
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a774a1.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a774a1.dtsi
index 9065dc243428..95b0a1f6debf 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a774a1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a774a1.dtsi
@@ -10,8 +10,6 @@
#include <dt-bindings/clock/r8a774a1-cpg-mssr.h>
#include <dt-bindings/power/r8a774a1-sysc.h>
-#define CPG_AUDIO_CLK_I R8A774A1_CLK_S0D4
-
/ {
compatible = "renesas,r8a774a1";
#address-cells = <2>;
@@ -1713,7 +1711,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A774A1_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a774b1.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a774b1.dtsi
index 75776decd218..786660fcdea4 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a774b1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a774b1.dtsi
@@ -10,8 +10,6 @@
#include <dt-bindings/clock/r8a774b1-cpg-mssr.h>
#include <dt-bindings/power/r8a774b1-sysc.h>
-#define CPG_AUDIO_CLK_I R8A774B1_CLK_S0D4
-
/ {
compatible = "renesas,r8a774b1";
#address-cells = <2>;
@@ -1597,7 +1595,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A774B1_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a774c0.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a774c0.dtsi
index ad2e87b039ac..eed94ffed7c1 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a774c0.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a774c0.dtsi
@@ -1350,7 +1350,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A774C0_CLK_ZA2>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a774e1.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a774e1.dtsi
index 2acf4067ab2f..175e5d296da6 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a774e1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a774e1.dtsi
@@ -10,8 +10,6 @@
#include <dt-bindings/clock/r8a774e1-cpg-mssr.h>
#include <dt-bindings/power/r8a774e1-sysc.h>
-#define CPG_AUDIO_CLK_I R8A774E1_CLK_S0D4
-
/ {
compatible = "renesas,r8a774e1";
#address-cells = <2>;
@@ -1809,7 +1807,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A774E1_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77951.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77951.dtsi
index 6d15229d25ab..a4260d9291ba 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77951.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77951.dtsi
@@ -9,8 +9,6 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7795-sysc.h>
-#define CPG_AUDIO_CLK_I R8A7795_CLK_S0D4
-
#define SOC_HAS_HDMI1
#define SOC_HAS_SATA
#define SOC_HAS_USB2_CH2
@@ -2032,7 +2030,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A7795_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77960.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77960.dtsi
index 17062ec506be..a631ead171b2 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77960.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77960.dtsi
@@ -9,8 +9,6 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7796-sysc.h>
-#define CPG_AUDIO_CLK_I R8A7796_CLK_S0D4
-
/ {
compatible = "renesas,r8a7796";
#address-cells = <2>;
@@ -1903,7 +1901,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A7796_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77961.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77961.dtsi
index d3f47da1b626..7254912a241f 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77961.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77961.dtsi
@@ -9,8 +9,6 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a77961-sysc.h>
-#define CPG_AUDIO_CLK_I R8A77961_CLK_S0D4
-
/ {
compatible = "renesas,r8a77961";
#address-cells = <2>;
@@ -1783,7 +1781,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A77961_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77965.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77965.dtsi
index c75820038491..e57b9027066e 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77965.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77965.dtsi
@@ -12,8 +12,6 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a77965-sysc.h>
-#define CPG_AUDIO_CLK_I R8A77965_CLK_S0D4
-
#define SOC_HAS_SATA
/ {
@@ -1766,7 +1764,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A77965_CLK_S0D4>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77970-eagle.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a77970-eagle.dts
index 405404c0843d..0608dce92e40 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77970-eagle.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77970-eagle.dts
@@ -29,6 +29,15 @@
stdout-path = "serial0:115200n8";
};
+ d1p8: regulator-fixed {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
d3p3: regulator-fixed {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
@@ -166,6 +175,12 @@
interrupt-parent = <&gpio1>;
interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&d1p8>;
+ dvdd-supply = <&d1p8>;
+ pvdd-supply = <&d1p8>;
+ dvdd-3v-supply = <&d3p3>;
+ bgvdd-supply = <&d1p8>;
+
adi,input-depth = <8>;
adi,input-colorspace = "rgb";
adi,input-clock = "1x";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77970-v3msk.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a77970-v3msk.dts
index c2b65f8de547..e36999e91af5 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77970-v3msk.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77970-v3msk.dts
@@ -145,7 +145,7 @@
status = "okay";
clock-frequency = <400000>;
- hdmi@39{
+ hdmi@39 {
compatible = "adi,adv7511w";
#sound-dai-cells = <0>;
reg = <0x39>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77980a.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77980a.dtsi
index 25b2d27b6167..83f5e21111c9 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77980a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77980a.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car V3H2 (R8A77980A) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77990-ebisu.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a77990-ebisu.dts
index 9da0fd08f8c4..d5ac34a966f6 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77990-ebisu.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77990-ebisu.dts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Device Tree Source for the Ebisu board with R-Car E3
+ * Device Tree Source for the Ebisu/Ebisu-4D board with R-Car E3
*
* Copyright (C) 2018 Renesas Electronics Corp.
*/
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77990.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77990.dtsi
index 1be0b99c15ed..8c2b28342387 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77990.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77990.dtsi
@@ -76,7 +76,7 @@
enable-method = "psci";
cpu-idle-states = <&CPU_SLEEP_0>;
dynamic-power-coefficient = <277>;
- clocks =<&cpg CPG_CORE R8A77990_CLK_Z2>;
+ clocks = <&cpg CPG_CORE R8A77990_CLK_Z2>;
operating-points-v2 = <&cluster1_opp>;
};
@@ -88,7 +88,7 @@
next-level-cache = <&L2_CA53>;
enable-method = "psci";
cpu-idle-states = <&CPU_SLEEP_0>;
- clocks =<&cpg CPG_CORE R8A77990_CLK_Z2>;
+ clocks = <&cpg CPG_CORE R8A77990_CLK_Z2>;
operating-points-v2 = <&cluster1_opp>;
};
@@ -1501,7 +1501,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
<&audio_clk_c>,
- <&cpg CPG_CORE R8A77990_CLK_ZA2>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.9", "ssi.8", "ssi.7", "ssi.6",
"ssi.5", "ssi.4", "ssi.3", "ssi.2",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a77995.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a77995.dtsi
index e25024a7b66c..8cf6473c63d3 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a77995.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a77995.dtsi
@@ -1063,7 +1063,7 @@
<&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&audio_clk_b>,
- <&cpg CPG_CORE R8A77995_CLK_ZA2>;
+ <&cpg CPG_MOD 922>;
clock-names = "ssi-all",
"ssi.4", "ssi.3",
"src.6", "src.5",
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider-cpu.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider-cpu.dtsi
index dd8e0e159526..477f3114d2fd 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider-cpu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider-cpu.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the Spider CPU board
*
@@ -6,6 +6,8 @@
*/
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
#include "r8a779f0.dtsi"
/ {
@@ -22,6 +24,24 @@
stdout-path = "serial0:1843200n8";
};
+ leds {
+ compatible = "gpio-leds";
+
+ led-7 {
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <7>;
+ };
+
+ led-8 {
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <8>;
+ };
+ };
+
memory@48000000 {
device_type = "memory";
/* first 128MB is reserved for secure area. */
@@ -33,6 +53,12 @@
reg = <0x4 0x80000000 0x0 0x80000000>;
};
+ rc21012_pci: clk-rc21012-pci {
+ compatible = "fixed-clock";
+ clock-frequency = <100000000>;
+ #clock-cells = <0>;
+ };
+
rc21012_ufs: clk-rc21012-ufs {
compatible = "fixed-clock";
clock-frequency = <38400000>;
@@ -86,6 +112,12 @@
reg = <0x20>;
gpio-controller;
#gpio-cells = <2>;
+
+ rc21012-gpio2-hog {
+ gpio-hog;
+ gpios = <5 GPIO_ACTIVE_LOW>;
+ output-high;
+ };
};
};
@@ -125,6 +157,18 @@
status = "okay";
};
+&pcie0_clkref {
+ compatible = "gpio-gate-clock";
+ clocks = <&rc21012_pci>;
+ enable-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ /delete-property/ clock-frequency;
+};
+
+&pciec0 {
+ reset-gpio = <&gpio_exp_20 0 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
&pfc {
pinctrl-0 = <&scif_clk_pins>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider.dts
index 7aac3f4d319c..f139cc4feb37 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779f0-spider.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the Spider CPU and BreakOut boards
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779f0.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779f0.dtsi
index 1d5426e6293c..7fb4989cce8a 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779f0.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779f0.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car S4-8 (R8A779F0) SoC
*
@@ -262,6 +262,20 @@
clock-frequency = <0>;
};
+ pcie0_clkref: pcie0-clkref {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ /* This value must be overridden by the board */
+ clock-frequency = <0>;
+ };
+
+ pcie1_clkref: pcie1-clkref {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ /* This value must be overridden by the board */
+ clock-frequency = <0>;
+ };
+
pmu_a55 {
compatible = "arm,cortex-a55-pmu";
interrupts-extended = <&gic GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
@@ -466,6 +480,21 @@
#thermal-sensor-cells = <1>;
};
+ intc_ex: interrupt-controller@e61c0000 {
+ compatible = "renesas,intc-ex-r8a779f0", "renesas,irqc";
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ reg = <0 0xe61c0000 0 0x200>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_CORE R8A779F0_CLK_CL16M>;
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ };
+
tmu0: timer@e61e0000 {
compatible = "renesas,tmu-r8a779f0", "renesas,tmu";
reg = <0 0xe61e0000 0 0x30>;
@@ -711,6 +740,126 @@
status = "disabled";
};
+ pciec0: pcie@e65d0000 {
+ compatible = "renesas,r8a779f0-pcie",
+ "renesas,rcar-gen4-pcie";
+ reg = <0 0xe65d0000 0 0x1000>, <0 0xe65d2000 0 0x0800>,
+ <0 0xe65d3000 0 0x2000>, <0 0xe65d5000 0 0x1200>,
+ <0 0xe65d6200 0 0x0e00>, <0 0xe65d7000 0 0x0400>,
+ <0 0xfe000000 0 0x400000>;
+ reg-names = "dbi", "dbi2", "atu", "dma", "app", "phy", "config";
+ interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi", "dma", "sft_ce", "app";
+ clocks = <&cpg CPG_MOD 624>, <&pcie0_clkref>;
+ clock-names = "core", "ref";
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ resets = <&cpg 624>;
+ reset-names = "pwr";
+ max-link-speed = <4>;
+ num-lanes = <2>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ bus-range = <0x00 0xff>;
+ device_type = "pci";
+ ranges = <0x01000000 0 0x00000000 0 0xfe000000 0 0x00400000>,
+ <0x02000000 0 0x30000000 0 0x30000000 0 0x10000000>;
+ dma-ranges = <0x42000000 0 0x00000000 0 0x00000000 1 0x00000000>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &gic GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH>;
+ snps,enable-cdm-check;
+ status = "disabled";
+ };
+
+ pciec1: pcie@e65d8000 {
+ compatible = "renesas,r8a779f0-pcie",
+ "renesas,rcar-gen4-pcie";
+ reg = <0 0xe65d8000 0 0x1000>, <0 0xe65da000 0 0x0800>,
+ <0 0xe65db000 0 0x2000>, <0 0xe65dd000 0 0x1200>,
+ <0 0xe65de200 0 0x0e00>, <0 0xe65df000 0 0x0400>,
+ <0 0xee900000 0 0x400000>;
+ reg-names = "dbi", "dbi2", "atu", "dma", "app", "phy", "config";
+ interrupts = <GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi", "dma", "sft_ce", "app";
+ clocks = <&cpg CPG_MOD 625>, <&pcie1_clkref>;
+ clock-names = "core", "ref";
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ resets = <&cpg 625>;
+ reset-names = "pwr";
+ max-link-speed = <4>;
+ num-lanes = <2>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ bus-range = <0x00 0xff>;
+ device_type = "pci";
+ ranges = <0x01000000 0 0x00000000 0 0xee900000 0 0x00400000>,
+ <0x02000000 0 0xc0000000 0 0xc0000000 0 0x10000000>;
+ dma-ranges = <0x42000000 0 0x00000000 0 0x00000000 1 0x00000000>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &gic GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &gic GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &gic GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &gic GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>;
+ snps,enable-cdm-check;
+ status = "disabled";
+ };
+
+ pciec0_ep: pcie-ep@e65d0000 {
+ compatible = "renesas,r8a779f0-pcie-ep",
+ "renesas,rcar-gen4-pcie-ep";
+ reg = <0 0xe65d0000 0 0x2000>, <0 0xe65d2000 0 0x1000>,
+ <0 0xe65d3000 0 0x2000>, <0 0xe65d5000 0 0x1200>,
+ <0 0xe65d6200 0 0x0e00>, <0 0xe65d7000 0 0x0400>,
+ <0 0xfe000000 0 0x400000>;
+ reg-names = "dbi", "dbi2", "atu", "dma", "app", "phy", "addr_space";
+ interrupts = <GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dma", "sft_ce", "app";
+ clocks = <&cpg CPG_MOD 624>, <&pcie0_clkref>;
+ clock-names = "core", "ref";
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ resets = <&cpg 624>;
+ reset-names = "pwr";
+ max-link-speed = <4>;
+ num-lanes = <2>;
+ max-functions = /bits/ 8 <2>;
+ status = "disabled";
+ };
+
+ pciec1_ep: pcie-ep@e65d8000 {
+ compatible = "renesas,r8a779f0-pcie-ep",
+ "renesas,rcar-gen4-pcie-ep";
+ reg = <0 0xe65d8000 0 0x2000>, <0 0xe65da000 0 0x1000>,
+ <0 0xe65db000 0 0x2000>, <0 0xe65dd000 0 0x1200>,
+ <0 0xe65de200 0 0x0e00>, <0 0xe65df000 0 0x0400>,
+ <0 0xee900000 0 0x400000>;
+ reg-names = "dbi", "dbi2", "atu", "dma", "app", "phy", "addr_space";
+ interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dma", "sft_ce", "app";
+ clocks = <&cpg CPG_MOD 625>, <&pcie1_clkref>;
+ clock-names = "core", "ref";
+ power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+ resets = <&cpg 625>;
+ reset-names = "pwr";
+ max-link-speed = <4>;
+ num-lanes = <2>;
+ max-functions = /bits/ 8 <2>;
+ status = "disabled";
+ };
+
ufs: ufs@e6860000 {
compatible = "renesas,r8a779f0-ufs";
reg = <0 0xe6860000 0 0x100>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779f4-s4sk.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779f4-s4sk.dts
new file mode 100644
index 000000000000..abfda5c6ca16
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779f4-s4sk.dts
@@ -0,0 +1,240 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Device Tree Source for the R-Car S4 Starter Kit board
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include "r8a779f4.dtsi"
+
+/ {
+ model = "R-Car S4 Starter Kit board";
+ compatible = "renesas,s4sk", "renesas,r8a779f4", "renesas,r8a779f0";
+
+ aliases {
+ serial0 = &hscif0;
+ serial1 = &hscif1;
+ eth0 = &rswitch;
+ };
+
+ chosen {
+ bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
+ stdout-path = "serial0:921600n8";
+ };
+
+ memory@48000000 {
+ device_type = "memory";
+ /* first 128MB is reserved for secure area. */
+ /* The last 512MB is reserved for CR. */
+ reg = <0x0 0x48000000 0x0 0x58000000>;
+ };
+
+ memory@480000000 {
+ device_type = "memory";
+ reg = <0x4 0x80000000 0x0 0x80000000>;
+ };
+
+ vcc_sdhi: regulator-vcc-sdhi {
+ compatible = "regulator-fixed";
+ regulator-name = "SDHI Vcc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&eth_serdes {
+ status = "okay";
+};
+
+&extal_clk {
+ clock-frequency = <20000000>;
+};
+
+&extalr_clk {
+ clock-frequency = <32768>;
+};
+
+&hscif0 {
+ pinctrl-0 = <&hscif0_pins>;
+ pinctrl-names = "default";
+
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&hscif1 {
+ pinctrl-0 = <&hscif1_pins>;
+ pinctrl-names = "default";
+
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&i2c2 {
+ pinctrl-0 = <&i2c2_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
+&i2c4 {
+ pinctrl-0 = <&i2c4_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
+&i2c5 {
+ pinctrl-0 = <&i2c5_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+
+ eeprom@50 {
+ compatible = "st,24c16", "atmel,24c16";
+ reg = <0x50>;
+ pagesize = <16>;
+ };
+};
+
+&mmc0 {
+ pinctrl-0 = <&sd_pins>;
+ pinctrl-names = "default";
+
+ vmmc-supply = <&vcc_sdhi>;
+ cd-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&pfc {
+ pinctrl-0 = <&scif_clk_pins>;
+ pinctrl-names = "default";
+
+ hscif0_pins: hscif0 {
+ groups = "hscif0_data", "hscif0_ctrl";
+ function = "hscif0";
+ };
+
+ hscif1_pins: hscif1 {
+ groups = "hscif1_data", "hscif1_ctrl";
+ function = "hscif1";
+ };
+
+ i2c2_pins: i2c2 {
+ groups = "i2c2";
+ function = "i2c2";
+ };
+
+ i2c4_pins: i2c4 {
+ groups = "i2c4";
+ function = "i2c4";
+ };
+
+ i2c5_pins: i2c5 {
+ groups = "i2c5";
+ function = "i2c5";
+ };
+
+ scif_clk_pins: scif_clk {
+ groups = "scif_clk";
+ function = "scif_clk";
+ };
+
+ sd_pins: sd {
+ groups = "mmc_data4", "mmc_ctrl";
+ function = "mmc";
+ power-source = <3300>;
+ };
+
+ tsn0_pins: tsn0 {
+ groups = "tsn0_mdio_b", "tsn0_link_b";
+ function = "tsn0";
+ drive-strength = <18>;
+ power-source = <3300>;
+ };
+
+ tsn1_pins: tsn1 {
+ groups = "tsn1_mdio_b", "tsn1_link_b";
+ function = "tsn1";
+ drive-strength = <18>;
+ power-source = <3300>;
+ };
+};
+
+&rswitch {
+ pinctrl-0 = <&tsn0_pins>, <&tsn1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ phy-handle = <&ic99>;
+ phy-mode = "sgmii";
+ phys = <&eth_serdes 0>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ic99: ethernet-phy@1 {
+ reg = <1>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ interrupt-parent = <&gpio3>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ phy-handle = <&ic102>;
+ phy-mode = "sgmii";
+ phys = <&eth_serdes 1>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ic102: ethernet-phy@2 {
+ reg = <2>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ interrupt-parent = <&gpio3>;
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+ };
+
+ port@2 {
+ status = "disabled";
+ };
+ };
+};
+
+&rwdt {
+ timeout-sec = <60>;
+ status = "okay";
+};
+
+&scif_clk {
+ clock-frequency = <24000000>;
+};
+
+&ufs {
+ status = "okay";
+};
+
+&ufs30_clk {
+ clock-frequency = <38400000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779f4.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779f4.dtsi
new file mode 100644
index 000000000000..ebed41892df3
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779f4.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Device Tree Source for the R-Car S4-8 (R8A779F4) SoC
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+#include "r8a779f0.dtsi"
+
+/ {
+ compatible = "renesas,r8a779f4", "renesas,r8a779f0";
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779g0-white-hawk-cpu.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779g0-white-hawk-cpu.dtsi
index bb4a5270f71b..913f70fe6c5c 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779g0-white-hawk-cpu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779g0-white-hawk-cpu.dtsi
@@ -187,6 +187,9 @@
};
&hscif0 {
+ pinctrl-0 = <&hscif0_pins>;
+ pinctrl-names = "default";
+
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m0.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m0.dtsi
index 6fb1979cc041..38978360e722 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m0.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m0.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car H3e (R8A779M0) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-salvator-xs.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-salvator-xs.dts
index 084b75b04680..74b0ac04ffe1 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-salvator-xs.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-salvator-xs.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the Salvator-X 2nd version board with R-Car H3e-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb-kf.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb-kf.dts
index 0baebc5c58b0..d2089e1d7100 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb-kf.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb-kf.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the H3ULCB Kingfisher board with R-Car H3e-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb.dts
index e294b6bda28c..705ea047ef62 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1-ulcb.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the H3ULCB (R-Car Starter Kit Premier) with R-Car H3e-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1.dtsi
index 1064a87a0c77..be0219defe3a 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m1.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car H3e-2G (R8A779M1) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m2.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m2.dtsi
index 324627340b86..bced12764c69 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m2.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car M3e (R8A779M2) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-salvator-xs.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-salvator-xs.dts
index 4ab26fd7233d..e53a6e88ccfa 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-salvator-xs.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-salvator-xs.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the Salvator-X 2nd version board with R-Car M3e-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb-kf.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb-kf.dts
index 6bacee1d2ef5..587e8764bcd2 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb-kf.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb-kf.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the M3ULCB Kingfisher board with R-Car M3e-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb.dts
index 8f215a0b771b..413f000b4630 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3-ulcb.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the M3ULCB (R-Car Starter Kit Pro) with R-Car M3e-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3.dtsi
index 7fdbdd97ed4b..ffde141137df 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m3.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car M3e-2G (R8A779M3) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m4.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m4.dtsi
index d7fbb6c05502..ae8486056962 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m4.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car M3Ne (R8A779M4) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m5-salvator-xs.dts b/sys/contrib/device-tree/src/arm64/renesas/r8a779m5-salvator-xs.dts
index c0341a88d641..6efc23171a66 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m5-salvator-xs.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m5-salvator-xs.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the Salvator-X 2nd version board with R-Car M3Ne-2G
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m5.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m5.dtsi
index df51e0ff5986..aded03ad31a1 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m5.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m5.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car M3Ne-2G (R8A779M5) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m6.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m6.dtsi
index afe3cabfb898..94d6a6cf503e 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m6.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m6.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car E3e (R8A779M6) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m7.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m7.dtsi
index 4958babc52fd..0580fa614034 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m7.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m7.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car D3e (R8A779M7) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779m8.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779m8.dtsi
index 750bd8ccdb7f..dfccc080fb3e 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779m8.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779m8.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car H3Ne (R8A779M8) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r8a779mb.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r8a779mb.dtsi
index 40d1dce2f350..181b737c91cd 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r8a779mb.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r8a779mb.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 or MIT)
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Device Tree Source for the R-Car H3Ne-1.7G (R8A779MB) SoC
*
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a07g043.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r9a07g043.dtsi
index 27c35a657b15..8721f4c9fa0f 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r9a07g043.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a07g043.dtsi
@@ -74,6 +74,76 @@
#size-cells = <2>;
ranges;
+ mtu3: timer@10001200 {
+ compatible = "renesas,r9a07g043-mtu3",
+ "renesas,rz-mtu3";
+ reg = <0 0x10001200 0 0xb00>;
+ interrupts = <SOC_PERIPHERAL_IRQ(170) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(171) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(172) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(173) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(174) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(175) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(176) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(177) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(178) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(179) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(180) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(181) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(182) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(183) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(184) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(185) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(186) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(187) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(188) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(189) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(190) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(191) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(192) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(193) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(194) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(195) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(196) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(197) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(198) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(199) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(200) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(201) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(202) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(203) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(204) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(205) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(206) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(207) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(208) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(209) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(210) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(211) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(212) IRQ_TYPE_EDGE_RISING>,
+ <SOC_PERIPHERAL_IRQ(213) IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0",
+ "tciv0", "tgie0", "tgif0",
+ "tgia1", "tgib1", "tciv1", "tciu1",
+ "tgia2", "tgib2", "tciv2", "tciu2",
+ "tgia3", "tgib3", "tgic3", "tgid3",
+ "tciv3",
+ "tgia4", "tgib4", "tgic4", "tgid4",
+ "tciv4",
+ "tgiu5", "tgiv5", "tgiw5",
+ "tgia6", "tgib6", "tgic6", "tgid6",
+ "tciv6",
+ "tgia7", "tgib7", "tgic7", "tgid7",
+ "tciv7",
+ "tgia8", "tgib8", "tgic8", "tgid8",
+ "tciv8", "tciu8";
+ clocks = <&cpg CPG_MOD R9A07G043_MTU_X_MCK_MTU3>;
+ power-domains = <&cpg>;
+ resets = <&cpg R9A07G043_MTU_X_PRESET_MTU3>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
ssi0: ssi@10049c00 {
compatible = "renesas,r9a07g043-ssi",
"renesas,rz-ssi";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a07g043u11-smarc.dts b/sys/contrib/device-tree/src/arm64/renesas/r9a07g043u11-smarc.dts
index 01483b4302c2..8e0107df2d46 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r9a07g043u11-smarc.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a07g043u11-smarc.dts
@@ -17,6 +17,17 @@
#define SW_SW0_DEV_SEL 1
#define SW_ET0_EN_N 1
+/*
+ * To enable MTU3a PWM on PMOD0,
+ * - Set DIP-Switch SW1-3 to On position.
+ * - Set PMOD_MTU3 macro to 1.
+ */
+#define PMOD_MTU3 0
+
+#if (PMOD_MTU3 && !SW_ET0_EN_N)
+#error "Cannot set as both PMOD_MTU3 and !SW_ET0_EN_N are mutually exclusive"
+#endif
+
#include "r9a07g043u.dtsi"
#include "rzg2ul-smarc-som.dtsi"
#include "rzg2ul-smarc.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a07g044c2-smarc.dts b/sys/contrib/device-tree/src/arm64/renesas/r9a07g044c2-smarc.dts
index f67a6f125d9c..0b90367b6d1e 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r9a07g044c2-smarc.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a07g044c2-smarc.dts
@@ -35,6 +35,18 @@
/* comment the #define statement to disable SCIF1 (SER0) on PMOD1 (CN7) */
#define PMOD1_SER0 1
+/*
+ * To enable MTU3a PWM on PMOD0,
+ * - Set DIP-Switch SW1-4 to Off position.
+ * - Set SW_RSPI_CAN macro to 0.
+ * - Set PMOD_MTU3 macro to 1.
+ */
+#define PMOD_MTU3 0
+
+#if (PMOD_MTU3 && SW_RSPI_CAN)
+#error "Cannot set as both PMOD_MTU3 and SW_RSPI_CAN are mutually exclusive"
+#endif
+
#include "r9a07g044c2.dtsi"
#include "rzg2lc-smarc-som.dtsi"
#include "rzg2lc-smarc.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a07g044l2-smarc.dts b/sys/contrib/device-tree/src/arm64/renesas/r9a07g044l2-smarc.dts
index bc2af6c92ccd..568d49cfe44a 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r9a07g044l2-smarc.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a07g044l2-smarc.dts
@@ -6,6 +6,27 @@
*/
/dts-v1/;
+
+/* Enable SCIF2 (SER0) on PMOD1 (CN7) */
+#define PMOD1_SER0 1
+
+/*
+ * To enable MTU3a PWM on PMOD0,
+ * Disable PMOD1_SER0 by setting "#define PMOD1_SER0 0" above and
+ * enable PMOD_MTU3 by setting "#define PMOD_MTU3 1" below.
+ */
+#define PMOD_MTU3 0
+
+#if (PMOD_MTU3 && PMOD1_SER0)
+#error "Cannot set as PMOD_MTU3 and PMOD1_SER0 are mutually exclusive "
+#endif
+
+#define MTU3_COUNTER_Z_PHASE_SIGNAL 0
+
+#if (!PMOD_MTU3 && MTU3_COUNTER_Z_PHASE_SIGNAL)
+#error "Cannot set 1 to MTU3_COUNTER_Z_PHASE_SIGNAL as PMOD_MTU3=0"
+#endif
+
#include "r9a07g044l2.dtsi"
#include "rzg2l-smarc-som.dtsi"
#include "rzg2l-smarc-pinfunction.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a07g054l2-smarc.dts b/sys/contrib/device-tree/src/arm64/renesas/r9a07g054l2-smarc.dts
index 3d01a4cf0fbe..b3e6016880dd 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r9a07g054l2-smarc.dts
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a07g054l2-smarc.dts
@@ -6,6 +6,26 @@
*/
/dts-v1/;
+
+/* Enable SCIF2 (SER0) on PMOD1 (CN7) */
+#define PMOD1_SER0 1
+
+/*
+ * To enable MTU3a PWM on PMOD0,
+ * Disable PMOD1_SER0 by setting "#define PMOD1_SER0 0" above and
+ * enable PMOD_MTU3 by setting "#define PMOD_MTU3 1" below.
+ */
+#define PMOD_MTU3 0
+
+#if (PMOD_MTU3 && PMOD1_SER0)
+#error "Cannot set as PMOD_MTU3 and PMOD1_SER0 are mutually exclusive "
+#endif
+
+#define MTU3_COUNTER_Z_PHASE_SIGNAL 0
+#if (!PMOD_MTU3 && MTU3_COUNTER_Z_PHASE_SIGNAL)
+#error "Cannot set 1 to MTU3_COUNTER_Z_PHASE_SIGNAL as PMOD_MTU3=0"
+#endif
+
#include "r9a07g054l2.dtsi"
#include "rzg2l-smarc-som.dtsi"
#include "rzg2l-smarc-pinfunction.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a08g045.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r9a08g045.dtsi
new file mode 100644
index 000000000000..5facfad96158
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a08g045.dtsi
@@ -0,0 +1,276 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the RZ/G3S SoC
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/r9a08g045-cpg.h>
+
+/ {
+ compatible = "renesas,r9a08g045";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ compatible = "arm,cortex-a55";
+ reg = <0>;
+ device_type = "cpu";
+ #cooling-cells = <2>;
+ next-level-cache = <&L3_CA55>;
+ enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A08G045_CLK_I>;
+ };
+
+ L3_CA55: cache-controller-0 {
+ compatible = "cache";
+ cache-level = <3>;
+ cache-unified;
+ cache-size = <0x40000>;
+ };
+ };
+
+ extal_clk: extal-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ /* This value must be overridden by the board. */
+ clock-frequency = <0>;
+ };
+
+ soc: soc {
+ compatible = "simple-bus";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ scif0: serial@1004b800 {
+ compatible = "renesas,scif-r9a08g045", "renesas,scif-r9a07g044";
+ reg = <0 0x1004b800 0 0x400>;
+ interrupts = <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "eri", "rxi", "txi",
+ "bri", "dri", "tei";
+ clocks = <&cpg CPG_MOD R9A08G045_SCIF0_CLK_PCK>;
+ clock-names = "fck";
+ power-domains = <&cpg>;
+ resets = <&cpg R9A08G045_SCIF0_RST_SYSTEM_N>;
+ status = "disabled";
+ };
+
+ cpg: clock-controller@11010000 {
+ compatible = "renesas,r9a08g045-cpg";
+ reg = <0 0x11010000 0 0x10000>;
+ clocks = <&extal_clk>;
+ clock-names = "extal";
+ #clock-cells = <2>;
+ #reset-cells = <1>;
+ #power-domain-cells = <0>;
+ };
+
+ sysc: system-controller@11020000 {
+ compatible = "renesas,r9a08g045-sysc";
+ reg = <0 0x11020000 0 0x10000>;
+ interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "lpm_int", "ca55stbydone_int",
+ "cm33stbyr_int", "ca55_deny";
+ status = "disabled";
+ };
+
+ pinctrl: pinctrl@11030000 {
+ compatible = "renesas,r9a08g045-pinctrl";
+ reg = <0 0x11030000 0 0x10000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&irqc>;
+ gpio-ranges = <&pinctrl 0 0 152>;
+ clocks = <&cpg CPG_MOD R9A08G045_GPIO_HCLK>;
+ power-domains = <&cpg>;
+ resets = <&cpg R9A08G045_GPIO_RSTN>,
+ <&cpg R9A08G045_GPIO_PORT_RESETN>,
+ <&cpg R9A08G045_GPIO_SPARE_RESETN>;
+ };
+
+ irqc: interrupt-controller@11050000 {
+ compatible = "renesas,r9a08g045-irqc", "renesas,rzg2l-irqc";
+ #interrupt-cells = <2>;
+ #address-cells = <0>;
+ interrupt-controller;
+ reg = <0 0x11050000 0 0x10000>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 433 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 436 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 437 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 441 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 449 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 450 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 451 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 452 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 453 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 454 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 455 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "nmi",
+ "irq0", "irq1", "irq2", "irq3",
+ "irq4", "irq5", "irq6", "irq7",
+ "tint0", "tint1", "tint2", "tint3",
+ "tint4", "tint5", "tint6", "tint7",
+ "tint8", "tint9", "tint10", "tint11",
+ "tint12", "tint13", "tint14", "tint15",
+ "tint16", "tint17", "tint18", "tint19",
+ "tint20", "tint21", "tint22", "tint23",
+ "tint24", "tint25", "tint26", "tint27",
+ "tint28", "tint29", "tint30", "tint31",
+ "bus-err";
+ clocks = <&cpg CPG_MOD R9A08G045_IA55_CLK>,
+ <&cpg CPG_MOD R9A08G045_IA55_PCLK>;
+ clock-names = "clk", "pclk";
+ power-domains = <&cpg>;
+ resets = <&cpg R9A08G045_IA55_RESETN>;
+ };
+
+ sdhi0: mmc@11c00000 {
+ compatible = "renesas,sdhi-r9a08g045", "renesas,rcar-gen3-sdhi";
+ reg = <0x0 0x11c00000 0 0x10000>;
+ interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G045_SDHI0_IMCLK>,
+ <&cpg CPG_MOD R9A08G045_SDHI0_CLK_HS>,
+ <&cpg CPG_MOD R9A08G045_SDHI0_IMCLK2>,
+ <&cpg CPG_MOD R9A08G045_SDHI0_ACLK>;
+ clock-names = "core", "clkh", "cd", "aclk";
+ resets = <&cpg R9A08G045_SDHI0_IXRST>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ sdhi1: mmc@11c10000 {
+ compatible = "renesas,sdhi-r9a08g045", "renesas,rcar-gen3-sdhi";
+ reg = <0x0 0x11c10000 0 0x10000>;
+ interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G045_SDHI1_IMCLK>,
+ <&cpg CPG_MOD R9A08G045_SDHI1_CLK_HS>,
+ <&cpg CPG_MOD R9A08G045_SDHI1_IMCLK2>,
+ <&cpg CPG_MOD R9A08G045_SDHI1_ACLK>;
+ clock-names = "core", "clkh", "cd", "aclk";
+ resets = <&cpg R9A08G045_SDHI1_IXRST>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ sdhi2: mmc@11c20000 {
+ compatible = "renesas,sdhi-r9a08g045", "renesas,rcar-gen3-sdhi";
+ reg = <0x0 0x11c20000 0 0x10000>;
+ interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G045_SDHI2_IMCLK>,
+ <&cpg CPG_MOD R9A08G045_SDHI2_CLK_HS>,
+ <&cpg CPG_MOD R9A08G045_SDHI2_IMCLK2>,
+ <&cpg CPG_MOD R9A08G045_SDHI2_ACLK>;
+ clock-names = "core", "clkh", "cd", "aclk";
+ resets = <&cpg R9A08G045_SDHI2_IXRST>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ eth0: ethernet@11c30000 {
+ compatible = "renesas,r9a08g045-gbeth", "renesas,rzg2l-gbeth";
+ reg = <0 0x11c30000 0 0x10000>;
+ interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "mux", "fil", "arp_ns";
+ phy-mode = "rgmii";
+ clocks = <&cpg CPG_MOD R9A08G045_ETH0_CLK_AXI>,
+ <&cpg CPG_MOD R9A08G045_ETH0_CLK_CHI>,
+ <&cpg CPG_MOD R9A08G045_ETH0_REFCLK>;
+ clock-names = "axi", "chi", "refclk";
+ resets = <&cpg R9A08G045_ETH0_RST_HW_N>;
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ eth1: ethernet@11c40000 {
+ compatible = "renesas,r9a08g045-gbeth", "renesas,rzg2l-gbeth";
+ reg = <0 0x11c40000 0 0x10000>;
+ interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "mux", "fil", "arp_ns";
+ phy-mode = "rgmii";
+ clocks = <&cpg CPG_MOD R9A08G045_ETH1_CLK_AXI>,
+ <&cpg CPG_MOD R9A08G045_ETH1_CLK_CHI>,
+ <&cpg CPG_MOD R9A08G045_ETH1_REFCLK>;
+ clock-names = "axi", "chi", "refclk";
+ resets = <&cpg R9A08G045_ETH1_RST_HW_N>;
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ gic: interrupt-controller@12400000 {
+ compatible = "arm,gic-v3";
+ #interrupt-cells = <3>;
+ #address-cells = <0>;
+ interrupt-controller;
+ reg = <0x0 0x12400000 0 0x40000>,
+ <0x0 0x12440000 0 0x60000>;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33-smarc.dts b/sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33-smarc.dts
new file mode 100644
index 000000000000..6b57e0e02dbe
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33-smarc.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the RZ/G3S SMARC EVK board
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+/dts-v1/;
+
+#include "r9a08g045s33.dtsi"
+#include "rzg3s-smarc-som.dtsi"
+#include "rzg3s-smarc.dtsi"
+
+/ {
+ model = "Renesas SMARC EVK version 2 based on r9a08g045s33";
+ compatible = "renesas,smarc2-evk", "renesas,rzg3s-smarcm",
+ "renesas,r9a08g045s33", "renesas,r9a08g045";
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33.dtsi
new file mode 100644
index 000000000000..3351f26c7a2a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a08g045s33.dtsi
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the RZ/G3S R9A08G045S33 SoC specific part
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+/dts-v1/;
+
+#include "r9a08g045.dtsi"
+
+/ {
+ compatible = "renesas,r9a08g045s33", "renesas,r9a08g045";
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/r9a09g011.dtsi b/sys/contrib/device-tree/src/arm64/renesas/r9a09g011.dtsi
index 46d67b200a66..50ed66d42a24 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/r9a09g011.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/r9a09g011.dtsi
@@ -163,7 +163,7 @@
};
avb: ethernet@a3300000 {
- compatible = "renesas,etheravb-r9a09g011","renesas,etheravb-rzv2m";
+ compatible = "renesas,etheravb-r9a09g011", "renesas,etheravb-rzv2m";
reg = <0 0xa3300000 0 0x800>;
interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>, /* ch0: Rx0 BE */
<GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>, /* ch1: Rx1 NC */
@@ -236,6 +236,34 @@
reg = <0 0xa3f03000 0 0x400>;
};
+ csi0: spi@a4020000 {
+ compatible = "renesas,rzv2m-csi";
+ reg = <0 0xa4020000 0 0x80>;
+ interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A09G011_CSI0_CLK>,
+ <&cpg CPG_MOD R9A09G011_CPERI_GRPG_PCLK>;
+ clock-names = "csiclk", "pclk";
+ resets = <&cpg R9A09G011_CSI_GPG_PRESETN>;
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ csi4: spi@a4020200 {
+ compatible = "renesas,rzv2m-csi";
+ reg = <0 0xa4020200 0 0x80>;
+ interrupts = <GIC_SPI 230 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A09G011_CSI4_CLK>,
+ <&cpg CPG_MOD R9A09G011_CPERI_GRPH_PCLK>;
+ clock-names = "csiclk", "pclk";
+ resets = <&cpg R9A09G011_CSI_GPH_PRESETN>;
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
i2c0: i2c@a4030000 {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rz-smarc-common.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rz-smarc-common.dtsi
index 3962d47b3e59..b7a3e6caa386 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rz-smarc-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rz-smarc-common.dtsi
@@ -32,12 +32,6 @@
stdout-path = "serial0:115200n8";
};
- audio_mclock: audio_mclock {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <11289600>;
- };
-
snd_rzg2l: sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
@@ -55,7 +49,7 @@
};
codec_dai: simple-audio-card,codec {
- clocks = <&audio_mclock>;
+ clocks = <&versa3 2>;
sound-dai = <&wm8978>;
};
};
@@ -76,13 +70,19 @@
gpios-states = <1>;
states = <3300000 1>, <1800000 0>;
};
+
+ x1: x1-clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
};
-&audio_clk1{
+&audio_clk1 {
clock-frequency = <11289600>;
};
-&audio_clk2{
+&audio_clk2 {
clock-frequency = <12288000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-pinfunction.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-pinfunction.dtsi
index 9085d8c76ce1..18c526c7a4cf 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-pinfunction.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-pinfunction.dtsi
@@ -53,6 +53,26 @@
<RZG2L_PORT_PINMUX(18, 1, 3)>; /* SCL */
};
+ mtu3_pins: mtu3 {
+ mtu3-ext-clk-input-pin {
+ pinmux = <RZG2L_PORT_PINMUX(48, 0, 4)>, /* MTCLKA */
+ <RZG2L_PORT_PINMUX(48, 1, 4)>; /* MTCLKB */
+ };
+
+ mtu3-pwm {
+ pinmux = <RZG2L_PORT_PINMUX(44, 0, 4)>, /* MTIOC3A */
+ <RZG2L_PORT_PINMUX(44, 1, 4)>, /* MTIOC3B */
+ <RZG2L_PORT_PINMUX(44, 2, 4)>, /* MTIOC3C */
+ <RZG2L_PORT_PINMUX(44, 3, 4)>; /* MTIOC3D */
+ };
+
+#if MTU3_COUNTER_Z_PHASE_SIGNAL
+ mtu3-zphase-clk {
+ pinmux = <RZG2L_PORT_PINMUX(19, 0, 3)>; /* MTIOC1A */
+ };
+#endif /* MTU3_COUNTER_Z_PHASE_SIGNAL */
+ };
+
scif0_pins: scif0 {
pinmux = <RZG2L_PORT_PINMUX(38, 0, 1)>, /* TxD */
<RZG2L_PORT_PINMUX(38, 1, 1)>; /* RxD */
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-som.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-som.dtsi
index fbbb4f03440b..4409c47239b9 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc-som.dtsi
@@ -73,6 +73,13 @@
gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
regulator-always-on;
};
+
+ /* 32.768kHz crystal */
+ x2: x2-clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
};
&adc {
@@ -100,7 +107,7 @@
rxc-skew-psec = <2400>;
txc-skew-psec = <2400>;
rxdv-skew-psec = <0>;
- txdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
rxd0-skew-psec = <0>;
rxd1-skew-psec = <0>;
rxd2-skew-psec = <0>;
@@ -128,7 +135,7 @@
rxc-skew-psec = <2400>;
txc-skew-psec = <2400>;
rxdv-skew-psec = <0>;
- txdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
rxd0-skew-psec = <0>;
rxd1-skew-psec = <0>;
rxd2-skew-psec = <0>;
@@ -148,6 +155,17 @@
mali-supply = <&reg_1p1v>;
};
+&i2c3 {
+ raa215300: pmic@12 {
+ compatible = "renesas,raa215300";
+ reg = <0x12>, <0x6f>;
+ reg-names = "main", "rtc";
+
+ clocks = <&x2>;
+ clock-names = "xin";
+ };
+};
+
&ostm1 {
status = "okay";
};
@@ -294,6 +312,7 @@
m25p,fast-read;
spi-max-frequency = <50000000>;
spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
partitions {
compatible = "fixed-partitions";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc.dtsi
index 2a158a954b2f..37807f1bda4d 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2l-smarc.dtsi
@@ -8,9 +8,6 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
-/* comment the #define statement to disable SCIF2 (SER0) on PMOD1 (CN7) */
-#define PMOD1_SER0 1
-
/ {
aliases {
serial1 = &scif2;
@@ -113,7 +110,47 @@
#sound-dai-cells = <0>;
reg = <0x1a>;
};
+
+ versa3: clock-generator@68 {
+ compatible = "renesas,5p35023";
+ reg = <0x68>;
+ #clock-cells = <1>;
+ clocks = <&x1>;
+
+ renesas,settings = [
+ 80 00 11 19 4c 02 23 7f 83 19 08 a9 5f 25 24 bf
+ 00 14 7a e1 00 00 00 00 01 55 59 bb 3f 30 90 b6
+ 80 b0 45 c4 95
+ ];
+
+ assigned-clocks = <&versa3 0>, <&versa3 1>,
+ <&versa3 2>, <&versa3 3>,
+ <&versa3 4>, <&versa3 5>;
+ assigned-clock-rates = <24000000>, <11289600>,
+ <11289600>, <12000000>,
+ <25000000>, <12288000>;
+ };
+};
+
+#if PMOD_MTU3
+&mtu3 {
+ pinctrl-0 = <&mtu3_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+#if MTU3_COUNTER_Z_PHASE_SIGNAL
+/* SDHI cd pin is muxed with counter Z phase signal */
+&sdhi1 {
+ status = "disabled";
+};
+#endif /* MTU3_COUNTER_Z_PHASE_SIGNAL */
+
+&spi1 {
+ status = "disabled";
};
+#endif /* PMOD_MTU3 */
/*
* To enable SCIF2 (SER0) on PMOD1 (CN7)
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-pinfunction.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-pinfunction.dtsi
index a78a8def363e..92c64d58349f 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-pinfunction.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-pinfunction.dtsi
@@ -50,6 +50,15 @@
<RZG2L_PORT_PINMUX(42, 4, 1)>; /* SCL */
};
+ mtu3_pins: mtu3 {
+ mtu3-pwm {
+ pinmux = <RZG2L_PORT_PINMUX(44, 0, 4)>, /* MTIOC3A */
+ <RZG2L_PORT_PINMUX(44, 1, 4)>, /* MTIOC3B */
+ <RZG2L_PORT_PINMUX(44, 2, 4)>, /* MTIOC3C */
+ <RZG2L_PORT_PINMUX(44, 3, 4)>; /* MTIOC3D */
+ };
+ };
+
scif0_pins: scif0 {
pinmux = <RZG2L_PORT_PINMUX(38, 0, 1)>, /* TxD */
<RZG2L_PORT_PINMUX(38, 1, 1)>; /* RxD */
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-som.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-som.dtsi
index 8a0d56872de7..5e4209d6fb42 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc-som.dtsi
@@ -6,6 +6,7 @@
*/
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irqc-rzg2l.h>
#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
/ {
@@ -61,6 +62,13 @@
gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
regulator-always-on;
};
+
+ /* 32.768kHz crystal */
+ x2: x2-clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
};
&eth0 {
@@ -74,10 +82,12 @@
compatible = "ethernet-phy-id0022.1640",
"ethernet-phy-ieee802.3-c22";
reg = <7>;
+ interrupt-parent = <&irqc>;
+ interrupts = <RZG2L_IRQ0 IRQ_TYPE_LEVEL_LOW>;
rxc-skew-psec = <2400>;
txc-skew-psec = <2400>;
rxdv-skew-psec = <0>;
- txdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
rxd0-skew-psec = <0>;
rxd1-skew-psec = <0>;
rxd2-skew-psec = <0>;
@@ -97,6 +107,17 @@
mali-supply = <&reg_1p1v>;
};
+&i2c2 {
+ raa215300: pmic@12 {
+ compatible = "renesas,raa215300";
+ reg = <0x12>, <0x6f>;
+ reg-names = "main", "rtc";
+
+ clocks = <&x2>;
+ clock-names = "xin";
+ };
+};
+
&ostm1 {
status = "okay";
};
@@ -121,7 +142,8 @@
<RZG2L_PORT_PINMUX(25, 0, 1)>, /* ET0_RXD0 */
<RZG2L_PORT_PINMUX(25, 1, 1)>, /* ET0_RXD1 */
<RZG2L_PORT_PINMUX(26, 0, 1)>, /* ET0_RXD2 */
- <RZG2L_PORT_PINMUX(26, 1, 1)>; /* ET0_RXD3 */
+ <RZG2L_PORT_PINMUX(26, 1, 1)>, /* ET0_RXD3 */
+ <RZG2L_PORT_PINMUX(0, 0, 1)>; /* IRQ0 */
};
gpio-sd0-pwr-en-hog {
@@ -219,6 +241,7 @@
m25p,fast-read;
spi-max-frequency = <50000000>;
spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
partitions {
compatible = "fixed-partitions";
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc.dtsi
index 6818fd49b2be..859bc8745e66 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2lc-smarc.dtsi
@@ -11,7 +11,6 @@
#include "rzg2lc-smarc-pinfunction.dtsi"
#include "rz-smarc-common.dtsi"
-
/ {
aliases {
serial1 = &scif1;
@@ -127,8 +126,41 @@
#sound-dai-cells = <0>;
reg = <0x1a>;
};
+
+ versa3: clock-generator@68 {
+ compatible = "renesas,5p35023";
+ reg = <0x68>;
+ #clock-cells = <1>;
+ clocks = <&x1>;
+
+ renesas,settings = [
+ 80 00 11 19 4c 02 23 7f 83 19 08 a9 5f 25 24 bf
+ 00 14 7a e1 00 00 00 00 01 55 59 bb 3f 30 90 b6
+ 80 b0 45 c4 95
+ ];
+
+ assigned-clocks = <&versa3 0>, <&versa3 1>,
+ <&versa3 2>, <&versa3 3>,
+ <&versa3 4>, <&versa3 5>;
+ assigned-clock-rates = <24000000>, <11289600>,
+ <11289600>, <12000000>,
+ <25000000>, <12288000>;
+ };
};
+#if PMOD_MTU3
+&mtu3 {
+ pinctrl-0 = <&mtu3_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&spi1 {
+ status = "disabled";
+};
+#endif
+
/*
* To enable SCIF1 (SER0) on PMOD1 (CN7), On connector board
* SW1 should be at position 2->3 so that SER0_CTS# line is activated
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-pinfunction.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-pinfunction.dtsi
index 58923dc83faa..355694fe4af6 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-pinfunction.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-pinfunction.dtsi
@@ -50,6 +50,12 @@
input-enable;
};
+ mtu3_pins: mtu3 {
+ mtu2-pwm {
+ pinmux = <RZG2L_PORT_PINMUX(4, 0, 4)>; /* MTIOC2A */
+ };
+ };
+
scif0_pins: scif0 {
pinmux = <RZG2L_PORT_PINMUX(6, 4, 6)>, /* TxD */
<RZG2L_PORT_PINMUX(6, 3, 6)>; /* RxD */
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-som.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-som.dtsi
index 49ecd33aeeb8..97cdad2a12e2 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc-som.dtsi
@@ -83,7 +83,7 @@
rxc-skew-psec = <2400>;
txc-skew-psec = <2400>;
rxdv-skew-psec = <0>;
- txdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
rxd0-skew-psec = <0>;
rxd1-skew-psec = <0>;
rxd2-skew-psec = <0>;
@@ -112,7 +112,7 @@
rxc-skew-psec = <2400>;
txc-skew-psec = <2400>;
rxdv-skew-psec = <0>;
- txdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
rxd0-skew-psec = <0>;
rxd1-skew-psec = <0>;
rxd2-skew-psec = <0>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc.dtsi
index 2a1331ed1a5c..de590996e10a 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg2ul-smarc.dtsi
@@ -20,6 +20,30 @@
sound-dai = <&ssi1>;
};
+&i2c0 {
+ clock-frequency = <400000>;
+
+ versa3: clock-generator@68 {
+ compatible = "renesas,5p35023";
+ reg = <0x68>;
+ #clock-cells = <1>;
+ clocks = <&x1>;
+
+ renesas,settings = [
+ 80 00 11 19 4c 02 23 7f 83 19 08 a9 5f 25 24 bf
+ 00 14 7a e1 00 00 00 00 01 55 59 bb 3f 30 90 b6
+ 80 b0 45 c4 95
+ ];
+
+ assigned-clocks = <&versa3 0>, <&versa3 1>,
+ <&versa3 2>, <&versa3 3>,
+ <&versa3 4>, <&versa3 5>;
+ assigned-clock-rates = <24000000>, <11289600>,
+ <11289600>, <12000000>,
+ <25000000>, <12288000>;
+ };
+};
+
&i2c1 {
wm8978: codec@1a {
compatible = "wlf,wm8978";
@@ -28,6 +52,19 @@
};
};
+#if PMOD_MTU3
+&mtu3 {
+ pinctrl-0 = <&mtu3_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&spi1 {
+ status = "disabled";
+};
+#endif
+
#if (SW_ET0_EN_N)
&ssi1 {
pinctrl-0 = <&ssi1_pins>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc-som.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc-som.dtsi
new file mode 100644
index 000000000000..f062d4ad78b7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc-som.dtsi
@@ -0,0 +1,338 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the R9A08G045S33 SMARC Carrier-II's SoM board.
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
+
+/*
+ * On-board switches' states:
+ * @SW_OFF: switch's state is OFF
+ * @SW_ON: switch's state is ON
+ */
+#define SW_OFF 0
+#define SW_ON 1
+
+/*
+ * SW_CONFIG[x] switches' states:
+ * @SW_CONFIG2:
+ * SW_OFF - SD0 is connected to eMMC
+ * SW_ON - SD0 is connected to uSD0 card
+ * @SW_CONFIG3:
+ * SW_OFF - SD2 is connected to SoC
+ * SW_ON - SCIF1, SSI0, IRQ0, IRQ1 connected to SoC
+ */
+#define SW_CONFIG2 SW_ON
+#define SW_CONFIG3 SW_ON
+
+/ {
+ compatible = "renesas,rzg3s-smarcm", "renesas,r9a08g045s33", "renesas,r9a08g045";
+
+ aliases {
+ mmc0 = &sdhi0;
+#if SW_CONFIG3 == SW_OFF
+ mmc2 = &sdhi2;
+#else
+ eth0 = &eth0;
+ eth1 = &eth1;
+#endif
+ };
+
+ chosen {
+ bootargs = "ignore_loglevel";
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@48000000 {
+ device_type = "memory";
+ /* First 128MB is reserved for secure area. */
+ reg = <0x0 0x48000000 0x0 0x38000000>;
+ };
+
+ vcc_sdhi0: regulator0 {
+ compatible = "regulator-fixed";
+ regulator-name = "SDHI0 Vcc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG2L_GPIO(2, 1) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+#if SW_CONFIG2 == SW_ON
+ vccq_sdhi0: regulator1 {
+ compatible = "regulator-gpio";
+ regulator-name = "SDHI0 VccQ";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG2L_GPIO(2, 2) GPIO_ACTIVE_HIGH>;
+ gpios-states = <1>;
+ states = <3300000 1>, <1800000 0>;
+ };
+#else
+ reg_1p8v: regulator1 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+#endif
+
+ vcc_sdhi2: regulator2 {
+ compatible = "regulator-fixed";
+ regulator-name = "SDHI2 Vcc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG2L_GPIO(8, 1) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+#if SW_CONFIG3 == SW_ON
+&eth0 {
+ pinctrl-0 = <&eth0_pins>;
+ pinctrl-names = "default";
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii-id";
+ status = "okay";
+
+ phy0: ethernet-phy@7 {
+ reg = <7>;
+ interrupt-parent = <&pinctrl>;
+ interrupts = <RZG2L_GPIO(12, 0) IRQ_TYPE_EDGE_FALLING>;
+ rxc-skew-psec = <0>;
+ txc-skew-psec = <0>;
+ rxdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
+ rxd0-skew-psec = <0>;
+ rxd1-skew-psec = <0>;
+ rxd2-skew-psec = <0>;
+ rxd3-skew-psec = <0>;
+ txd0-skew-psec = <0>;
+ txd1-skew-psec = <0>;
+ txd2-skew-psec = <0>;
+ txd3-skew-psec = <0>;
+ };
+};
+
+&eth1 {
+ pinctrl-0 = <&eth1_pins>;
+ pinctrl-names = "default";
+ phy-handle = <&phy1>;
+ phy-mode = "rgmii-id";
+ status = "okay";
+
+ phy1: ethernet-phy@7 {
+ reg = <7>;
+ interrupt-parent = <&pinctrl>;
+ interrupts = <RZG2L_GPIO(12, 1) IRQ_TYPE_EDGE_FALLING>;
+ rxc-skew-psec = <0>;
+ txc-skew-psec = <0>;
+ rxdv-skew-psec = <0>;
+ txen-skew-psec = <0>;
+ rxd0-skew-psec = <0>;
+ rxd1-skew-psec = <0>;
+ rxd2-skew-psec = <0>;
+ rxd3-skew-psec = <0>;
+ txd0-skew-psec = <0>;
+ txd1-skew-psec = <0>;
+ txd2-skew-psec = <0>;
+ txd3-skew-psec = <0>;
+ };
+};
+#endif
+
+&extal_clk {
+ clock-frequency = <24000000>;
+};
+
+#if SW_CONFIG2 == SW_ON
+/* SD0 slot */
+&sdhi0 {
+ pinctrl-0 = <&sdhi0_pins>;
+ pinctrl-1 = <&sdhi0_uhs_pins>;
+ pinctrl-names = "default", "state_uhs";
+ vmmc-supply = <&vcc_sdhi0>;
+ vqmmc-supply = <&vccq_sdhi0>;
+ bus-width = <4>;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ max-frequency = <125000000>;
+ status = "okay";
+};
+#else
+/* eMMC */
+&sdhi0 {
+ pinctrl-0 = <&sdhi0_emmc_pins>;
+ pinctrl-1 = <&sdhi0_emmc_pins>;
+ pinctrl-names = "default", "state_uhs";
+ vmmc-supply = <&vcc_sdhi0>;
+ vqmmc-supply = <&reg_1p8v>;
+ bus-width = <8>;
+ mmc-hs200-1_8v;
+ non-removable;
+ fixed-emmc-driver-type = <1>;
+ max-frequency = <125000000>;
+ status = "okay";
+};
+#endif
+
+#if SW_CONFIG3 == SW_OFF
+&sdhi2 {
+ pinctrl-0 = <&sdhi2_pins>;
+ pinctrl-names = "default";
+ vmmc-supply = <&vcc_sdhi2>;
+ bus-width = <4>;
+ max-frequency = <50000000>;
+ status = "okay";
+};
+#endif
+
+&pinctrl {
+ eth0-phy-irq-hog {
+ gpio-hog;
+ gpios = <RZG2L_GPIO(12, 0) GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "eth0-phy-irq";
+ };
+
+ eth0_pins: eth0 {
+ txc {
+ pinmux = <RZG2L_PORT_PINMUX(1, 0, 1)>; /* ET0_TXC */
+ power-source = <1800>;
+ output-enable;
+ input-enable;
+ drive-strength-microamp = <5200>;
+ };
+
+ tx_ctl {
+ pinmux = <RZG2L_PORT_PINMUX(1, 1, 1)>; /* ET0_TX_CTL */
+ power-source = <1800>;
+ output-enable;
+ drive-strength-microamp = <5200>;
+ };
+
+ mux {
+ pinmux = <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */
+ <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */
+ <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */
+ <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */
+ <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */
+ <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */
+ <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */
+ <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */
+ <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */
+ <RZG2L_PORT_PINMUX(4, 1, 1)>, /* ET0_RXD3 */
+ <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */
+ <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */
+ <RZG2L_PORT_PINMUX(4, 5, 1)>; /* ET0_LINKSTA */
+ power-source = <1800>;
+ };
+ };
+
+ eth1-phy-irq-hog {
+ gpio-hog;
+ gpios = <RZG2L_GPIO(12, 1) GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "eth1-phy-irq";
+ };
+
+ eth1_pins: eth1 {
+ txc {
+ pinmux = <RZG2L_PORT_PINMUX(7, 0, 1)>; /* ET1_TXC */
+ power-source = <1800>;
+ output-enable;
+ input-enable;
+ drive-strength-microamp = <5200>;
+ };
+
+ tx_ctl {
+ pinmux = <RZG2L_PORT_PINMUX(7, 1, 1)>; /* ET1_TX_CTL */
+ power-source = <1800>;
+ output-enable;
+ drive-strength-microamp = <5200>;
+ };
+
+ mux {
+ pinmux = <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */
+ <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */
+ <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */
+ <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */
+ <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */
+ <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */
+ <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */
+ <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */
+ <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */
+ <RZG2L_PORT_PINMUX(10, 0, 1)>, /* ET1_RXD3 */
+ <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */
+ <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */
+ <RZG2L_PORT_PINMUX(10, 4, 1)>; /* ET1_LINKSTA */
+ power-source = <1800>;
+ };
+ };
+
+ sdhi0_pins: sd0 {
+ data {
+ pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
+ power-source = <3300>;
+ };
+
+ ctrl {
+ pins = "SD0_CLK", "SD0_CMD";
+ power-source = <3300>;
+ };
+
+ cd {
+ pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
+ };
+ };
+
+ sdhi0_uhs_pins: sd0-uhs {
+ data {
+ pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
+ power-source = <1800>;
+ };
+
+ ctrl {
+ pins = "SD0_CLK", "SD0_CMD";
+ power-source = <1800>;
+ };
+
+ cd {
+ pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
+ };
+ };
+
+ sdhi0_emmc_pins: sd0-emmc {
+ pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
+ "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7",
+ "SD0_CLK", "SD0_CMD", "SD0_RST#";
+ power-source = <1800>;
+ };
+
+ sdhi2_pins: sd2 {
+ data {
+ pins = "P11_2", "P11_3", "P12_0", "P12_1";
+ input-enable;
+ };
+
+ ctrl {
+ pins = "P11_1";
+ input-enable;
+ };
+
+ mux {
+ pinmux = <RZG2L_PORT_PINMUX(11, 0, 8)>, /* SD2_CLK */
+ <RZG2L_PORT_PINMUX(11, 1, 8)>, /* SD2_CMD */
+ <RZG2L_PORT_PINMUX(11, 2, 8)>, /* SD2_DATA0 */
+ <RZG2L_PORT_PINMUX(11, 3, 8)>, /* SD2_DATA1 */
+ <RZG2L_PORT_PINMUX(12, 0, 8)>, /* SD2_DATA2 */
+ <RZG2L_PORT_PINMUX(12, 1, 8)>, /* SD2_DATA3 */
+ <RZG2L_PORT_PINMUX(14, 1, 7)>; /* SD2_CD# */
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc.dtsi b/sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc.dtsi
new file mode 100644
index 000000000000..214520137230
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/renesas/rzg3s-smarc.dtsi
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the RZ SMARC Carrier-II Board.
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
+
+/ {
+ aliases {
+ serial0 = &scif0;
+ mmc1 = &sdhi1;
+ };
+
+ vcc_sdhi1: regulator-vcc-sdhi1 {
+ compatible = "regulator-fixed";
+ regulator-name = "SDHI1 Vcc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG2L_GPIO(2, 3) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vccq_sdhi1: regulator-vccq-sdhi1 {
+ compatible = "regulator-gpio";
+ regulator-name = "SDHI1 VccQ";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG2L_GPIO(4, 2) GPIO_ACTIVE_HIGH>;
+ gpios-states = <1>;
+ states = <3300000 1>, <1800000 0>;
+ };
+};
+
+&pinctrl {
+ scif0_pins: scif0 {
+ pinmux = <RZG2L_PORT_PINMUX(6, 3, 1)>, /* RXD */
+ <RZG2L_PORT_PINMUX(6, 4, 1)>; /* TXD */
+ };
+
+ sdhi1_pins: sd1 {
+ data {
+ pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
+ power-source = <3300>;
+ };
+
+ ctrl {
+ pins = "SD1_CLK", "SD1_CMD";
+ power-source = <3300>;
+ };
+
+ cd {
+ pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */
+ };
+ };
+
+ sdhi1_pins_uhs: sd1-uhs {
+ data {
+ pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
+ power-source = <1800>;
+ };
+
+ ctrl {
+ pins = "SD1_CLK", "SD1_CMD";
+ power-source = <1800>;
+ };
+
+ cd {
+ pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */
+ };
+ };
+};
+
+&scif0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&scif0_pins>;
+ status = "okay";
+};
+
+&sdhi1 {
+ pinctrl-0 = <&sdhi1_pins>;
+ pinctrl-1 = <&sdhi1_pins_uhs>;
+ pinctrl-names = "default", "state_uhs";
+ vmmc-supply = <&vcc_sdhi1>;
+ vqmmc-supply = <&vccq_sdhi1>;
+ bus-width = <4>;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ max-frequency = <125000000>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/salvator-common.dtsi b/sys/contrib/device-tree/src/arm64/renesas/salvator-common.dtsi
index 4a3d5037821f..1eb4883b3219 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/salvator-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/salvator-common.dtsi
@@ -822,7 +822,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&cs2000>,
<&audio_clk_c>,
- <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
+ <&cpg CPG_MOD 922>;
ports {
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card-mix+split.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card-mix+split.dtsi
index 672b0a224ef9..be6d7a035739 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card-mix+split.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card-mix+split.dtsi
@@ -21,14 +21,14 @@
/ {
sound_card: sound {
compatible = "audio-graph-scu-card";
- label = "rcar-sound";
+ label = "snd-ulcb-mix";
routing = "ak4613 Playback", "DAI0 Playback",
"ak4613 Playback", "DAI1 Playback",
"DAI0 Capture", "ak4613 Capture";
- dais = <&rsnd_port0 /* (A) CPU0 */
- &rsnd_port1 /* (B) CPU1 */
+ dais = <&snd_ulcb1 /* (A) CPU0 */
+ &snd_ulcb2 /* (B) CPU1 */
>;
};
};
@@ -58,14 +58,18 @@
};
&rcar_sound {
- ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports@0 {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <0>;
/*
* (A) CPU0
*/
- rsnd_port0: port@0 {
+ snd_ulcb1: port@0 {
reg = <0>;
rsnd_for_ak4613_1: endpoint {
remote-endpoint = <&ak4613_ep1>;
@@ -78,7 +82,7 @@
/*
* (B) CPU1
*/
- rsnd_port1: port@1 {
+ snd_ulcb2: port@1 {
reg = <1>;
rsnd_for_ak4613_2: endpoint {
remote-endpoint = <&ak4613_ep2>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card.dtsi
index 3be54df645e6..3f1df6ee17ea 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card.dtsi
@@ -18,10 +18,10 @@
/ {
sound_card: sound {
compatible = "audio-graph-card";
- label = "rcar-sound";
+ label = "snd-ulcb";
- dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
- &rsnd_port1 /* (B) CPU1 -> HDMI */
+ dais = <&snd_ulcb1 /* (A) CPU0 <-> ak4613 */
+ &snd_ulcb2 /* (B) CPU1 -> HDMI */
>;
};
};
@@ -53,10 +53,15 @@
};
&rcar_sound {
- ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports@0 {
#address-cells = <1>;
#size-cells = <0>;
- rsnd_port0: port@0 {
+ reg = <0>;
+
+ snd_ulcb1: port@0 {
/*
* (A) CPU0 <-> ak4613
*/
@@ -69,7 +74,7 @@
capture = <&ssi1>, <&src1>, <&dvc1>;
};
};
- rsnd_port1: port@1 {
+ snd_ulcb2: port@1 {
/*
* (B) CPU1 -> HDMI
*/
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi
index 75b024e3fef1..8966e6a7d28b 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi
@@ -20,13 +20,12 @@
/ {
sound_card: sound {
compatible = "audio-graph-card2";
- label = "rcar-sound";
+ label = "snd-ulcb-mix";
routing = "ak4613 Playback", "DAI0 Playback",
"ak4613 Playback", "DAI1 Playback",
"DAI0 Capture", "ak4613 Capture";
- /delete-property/ dais;
links = <&fe_a /* (A) CPU0 */
&fe_b /* (B) CPU1 */
&be_x /* (X) ak4613 */
@@ -50,14 +49,12 @@
};
ports@1 {
- #address-cells = <1>;
- #size-cells = <0>;
reg = <1>;
/*
* BE
* (X) ak4613
*/
- be_x: port@0 { reg = <0>; be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };
+ be_x: port { be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };
};
};
};
@@ -78,9 +75,13 @@
};
&rcar_sound {
- ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports@0 {
#address-cells = <1>;
#size-cells = <0>;
+ reg = <0>;
/*
* (A) CPU0
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2.dtsi
index 5ebec1235843..19fa6e102995 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2.dtsi
@@ -20,7 +20,7 @@
compatible = "audio-graph-card2";
/delete-property/ dais;
- links = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
- &rsnd_port1 /* (B) CPU1 -> HDMI */
+ links = <&snd_ulcb1 /* (A) CPU0 <-> ak4613 */
+ &snd_ulcb2 /* (B) CPU1 -> HDMI */
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
index 9b01354940fd..8ae6af1af094 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
@@ -19,32 +19,31 @@
*
* (A) aplay -D plughw:0,0 xxx.wav (MIX-0)
* (B) aplay -D plughw:0,1 xxx.wav (MIX-1)
- * (C) aplay -D plughw:0,2 xxx.wav (TDM-0)
- * (D) aplay -D plughw:0,3 xxx.wav (TDM-1)
- * (E) aplay -D plughw:0,4 xxx.wav (TDM-2)
- * (F) aplay -D plughw:0,5 xxx.wav (TDM-3)
+ * (C) aplay -D plughw:1,0 xxx.wav (TDM-0)
+ * (D) aplay -D plughw:1,1 xxx.wav (TDM-1)
+ * (E) aplay -D plughw:1,2 xxx.wav (TDM-2)
+ * (F) aplay -D plughw:1,3 xxx.wav (TDM-3)
*
* (A) arecord -D plughw:0,0 xxx.wav
- * (G) arecord -D plughw:0,6 xxx.wav
+ * (G) arecord -D plughw:1,4 xxx.wav
*/
+/ {
+ sound_card_kf: expand-sound {
+ compatible = "audio-graph-scu-card";
+ label = "snd-kf-split";
-&sound_card {
- routing = "ak4613 Playback", "DAI0 Playback",
- "ak4613 Playback", "DAI1 Playback",
- "DAI0 Capture", "ak4613 Capture",
- "pcm3168a Playback", "DAI2 Playback",
- "pcm3168a Playback", "DAI3 Playback",
- "pcm3168a Playback", "DAI4 Playback",
- "pcm3168a Playback", "DAI5 Playback";
+ routing = "pcm3168a Playback", "DAI2 Playback",
+ "pcm3168a Playback", "DAI3 Playback",
+ "pcm3168a Playback", "DAI4 Playback",
+ "pcm3168a Playback", "DAI5 Playback";
- dais = <&rsnd_port0 /* (A) CPU0 */
- &rsnd_port1 /* (B) CPU1 */
- &rsnd_port2 /* (C) CPU2 */
- &rsnd_port3 /* (D) CPU3 */
- &rsnd_port4 /* (E) CPU4 */
- &rsnd_port5 /* (F) CPU5 */
- &rsnd_port6 /* (G) GPU6 */
- >;
+ dais = <&snd_kf1 /* (C) CPU2 */
+ &snd_kf2 /* (D) CPU3 */
+ &snd_kf3 /* (E) CPU4 */
+ &snd_kf4 /* (F) CPU5 */
+ &snd_kf5 /* (G) GPU6 */
+ >;
+ };
};
&pcm3168a {
@@ -103,13 +102,15 @@
};
&rcar_sound {
- ports {
- /* rsnd_port0-1 are defined in ulcb.dtsi */
+ ports@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
/*
* (C) CPU2
*/
- rsnd_port2: port@2 {
+ snd_kf1: port@2 {
reg = <2>;
rsnd_for_pcm3168a_play1: endpoint {
remote-endpoint = <&pcm3168a_endpoint_p1>;
@@ -121,7 +122,7 @@
/*
* (D) CPU3
*/
- rsnd_port3: port@3 {
+ snd_kf2: port@3 {
reg = <3>;
rsnd_for_pcm3168a_play2: endpoint {
remote-endpoint = <&pcm3168a_endpoint_p2>;
@@ -133,7 +134,7 @@
/*
* (E) CPU4
*/
- rsnd_port4: port@4 {
+ snd_kf3: port@4 {
reg = <4>;
rsnd_for_pcm3168a_play3: endpoint {
remote-endpoint = <&pcm3168a_endpoint_p3>;
@@ -145,7 +146,7 @@
/*
* (F) CPU5
*/
- rsnd_port5: port@5 {
+ snd_kf4: port@5 {
reg = <5>;
rsnd_for_pcm3168a_play4: endpoint {
remote-endpoint = <&pcm3168a_endpoint_p4>;
@@ -157,7 +158,7 @@
/*
* (G) CPU6
*/
- rsnd_port6: port@6 {
+ snd_kf5: port@6 {
reg = <6>;
rsnd_for_pcm3168a_capture: endpoint {
remote-endpoint = <&pcm3168a_endpoint_c>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card.dtsi
index 1db99b7608f0..5fbd4ca83e20 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card.dtsi
@@ -13,18 +13,20 @@
*
* (A) aplay -D plughw:0,0 xxx.wav
* (B) aplay -D plughw:0,1 xxx.wav
- * (C) aplay -D plughw:0,2 xxx.wav
+ * (C) aplay -D plughw:1,0 xxx.wav
*
* (A) arecord -D plughw:0,0 xxx.wav
- * (D) arecord -D plughw:0,3 xxx.wav
+ * (D) arecord -D plughw:1,1 xxx.wav
*/
+/ {
+ sound_card_kf: expand-sound {
+ compatible = "audio-graph-card";
+ label = "snd-kf";
-&sound_card {
- dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
- &rsnd_port1 /* (B) CPU1 -> HDMI */
- &rsnd_port2 /* (C) CPU2 -> PCM3168A-p */
- &rsnd_port3 /* (D) CPU3 <- PCM3168A-c */
+ dais = <&snd_kf1 /* (C) CPU2 -> PCM3168A-p */
+ &snd_kf2 /* (D) CPU3 <- PCM3168A-c */
>;
+ };
};
&pcm3168a {
@@ -56,12 +58,15 @@
};
&rcar_sound {
- ports {
- /* rsnd_port0/1 are defined in ulcb.dtsi */
+ ports@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
/*
* (C) CPU2 -> PCM3168A-p
*/
- rsnd_port2: port@2 {
+ snd_kf1: port@2 {
reg = <2>;
rsnd_for_pcm3168a_play: endpoint {
remote-endpoint = <&pcm3168a_endpoint_p>;
@@ -74,7 +79,7 @@
/*
* (D) CPU3 <- PCM3168A-c
*/
- rsnd_port3: port@3 {
+ snd_kf2: port@3 {
reg = <3>;
rsnd_for_pcm3168a_capture: endpoint {
remote-endpoint = <&pcm3168a_endpoint_c>;
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
index da644128a9ae..4cf632bc4621 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
@@ -19,61 +19,65 @@
*
* (A) aplay -D plughw:0,0 xxx.wav (MIX-0)
* (B) aplay -D plughw:0,1 xxx.wav (MIX-1)
- * (C) aplay -D plughw:0,2 xxx.wav (TDM-0)
- * (D) aplay -D plughw:0,3 xxx.wav (TDM-1)
- * (E) aplay -D plughw:0,4 xxx.wav (TDM-2)
- * (F) aplay -D plughw:0,5 xxx.wav (TDM-3)
+ * (C) aplay -D plughw:1,0 xxx.wav (TDM-0)
+ * (D) aplay -D plughw:1,1 xxx.wav (TDM-1)
+ * (E) aplay -D plughw:1,2 xxx.wav (TDM-2)
+ * (F) aplay -D plughw:1,3 xxx.wav (TDM-3)
*
* (A) arecord -D plughw:0,0 xxx.wav
- * (G) arecord -D plughw:0,6 xxx.wav
+ * (G) arecord -D plughw:1,4 xxx.wav
*/
-&sound_card {
- routing = "ak4613 Playback", "DAI0 Playback",
- "ak4613 Playback", "DAI1 Playback",
- "DAI0 Capture", "ak4613 Capture",
- "pcm3168a Playback", "DAI2 Playback",
- "pcm3168a Playback", "DAI3 Playback",
- "pcm3168a Playback", "DAI4 Playback",
- "pcm3168a Playback", "DAI5 Playback",
- "DAI6 Capture", "pcm3168a Capture";
+/ {
+ sound_card_kf: expand-sound {
+ compatible = "audio-graph-card2";
+ label = "snd-kf-split";
- /delete-property/ dais;
- links = <&fe_a /* (A) CPU0 */
- &fe_b /* (B) CPU1 */
- &fe_c /* (C) CPU2 */
- &fe_d /* (D) CPU3 */
- &fe_e /* (E) CPU4 */
- &fe_f /* (F) CPU5 */
- &rsnd_g /* (G) CPU6 */
- &be_x /* (X) ak4613 */
- &be_y /* (Y) PCM3168A-p */
- >;
+ routing = "pcm3168a Playback", "DAI2 Playback",
+ "pcm3168a Playback", "DAI3 Playback",
+ "pcm3168a Playback", "DAI4 Playback",
+ "pcm3168a Playback", "DAI5 Playback",
+ "DAI6 Capture", "pcm3168a Capture";
- dpcm {
- ports@0 {
- /*
- * FE
- *
- * (A)/(B) are defined on ulcb
- * (C) CPU2
- * (D) CPU3
- * (E) CPU4
- * (F) CPU5
- */
- fe_c: port@2 { reg = <2>; fe_c_ep: endpoint { remote-endpoint = <&rsnd_c_ep>; }; };
- fe_d: port@3 { reg = <3>; fe_d_ep: endpoint { remote-endpoint = <&rsnd_d_ep>; }; };
- fe_e: port@4 { reg = <4>; fe_e_ep: endpoint { remote-endpoint = <&rsnd_e_ep>; }; };
- fe_f: port@5 { reg = <5>; fe_f_ep: endpoint { remote-endpoint = <&rsnd_f_ep>; }; };
- };
+ links = <&fe_c /* (C) CPU2 */
+ &fe_d /* (D) CPU3 */
+ &fe_e /* (E) CPU4 */
+ &fe_f /* (F) CPU5 */
+ &rsnd_g /* (G) CPU6 */
+ &be_y /* (Y) PCM3168A-p */
+ >;
- ports@1 {
- /*
- * BE
- *
- * (X) is defined on ulcb
- * (Y) PCM3168A-p
- */
- be_y: port@1 { reg = <1>; be_y_ep: endpoint { remote-endpoint = <&pcm3168a_y_ep>; }; };
+ dpcm {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ /*
+ * FE
+ *
+ * (C) CPU2
+ * (D) CPU3
+ * (E) CPU4
+ * (F) CPU5
+ */
+ fe_c: port@2 { reg = <2>; fe_c_ep: endpoint { remote-endpoint = <&rsnd_c_ep>; }; };
+ fe_d: port@3 { reg = <3>; fe_d_ep: endpoint { remote-endpoint = <&rsnd_d_ep>; }; };
+ fe_e: port@4 { reg = <4>; fe_e_ep: endpoint { remote-endpoint = <&rsnd_e_ep>; }; };
+ fe_f: port@5 { reg = <5>; fe_f_ep: endpoint { remote-endpoint = <&rsnd_f_ep>; }; };
+ };
+
+ ports@1 {
+ reg = <1>;
+ /*
+ * BE
+ *
+ * (Y) PCM3168A-p
+ */
+ be_y: port { be_y_ep: endpoint { remote-endpoint = <&pcm3168a_y_ep>; }; };
+ };
};
};
};
@@ -111,8 +115,10 @@
};
&rcar_sound {
- ports {
- /* (A)/(B) are defined in ulcb.dtsi */
+ ports@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
/*
* (C) CPU2
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2.dtsi
index c30e056538e4..4fc229418dd7 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-audio-graph-card2.dtsi
@@ -13,18 +13,18 @@
*
* (A) aplay -D plughw:0,0 xxx.wav
* (B) aplay -D plughw:0,1 xxx.wav
- * (C) aplay -D plughw:0,2 xxx.wav
+ * (C) aplay -D plughw:1,0 xxx.wav
*
* (A) arecord -D plughw:0,0 xxx.wav
- * (D) arecord -D plughw:0,3 xxx.wav
+ * (D) arecord -D plughw:1,1 xxx.wav
*/
#include "ulcb-kf-audio-graph-card.dtsi"
-&sound_card {
+&sound_card_kf {
+ compatible = "audio-graph-card2";
+
/delete-property/ dais;
- links = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
- &rsnd_port1 /* (B) CPU1 -> HDMI */
- &rsnd_port2 /* (C) CPU2 -> PCM3168A-p */
- &rsnd_port3 /* (D) CPU3 <- PCM3168A-c */
+ links = <&snd_kf1 /* (C) CPU2 -> PCM3168A-p */
+ &snd_kf2 /* (D) CPU3 <- PCM3168A-c */
>;
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
index bc221f994473..f01d91aaadf3 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
@@ -19,89 +19,92 @@
*
* (A) aplay -D plughw:0,0 xxx.wav (MIX-0)
* (B) aplay -D plughw:0,1 xxx.wav (MIX-1)
- * (C) aplay -D plughw:0,2 xxx.wav (TDM-0)
- * (D) aplay -D plughw:0,3 xxx.wav (TDM-1)
- * (E) aplay -D plughw:0,4 xxx.wav (TDM-2)
- * (F) aplay -D plughw:0,5 xxx.wav (TDM-3)
+ * (C) aplay -D plughw:1,0 xxx.wav (TDM-0)
+ * (D) aplay -D plughw:1,1 xxx.wav (TDM-1)
+ * (E) aplay -D plughw:1,2 xxx.wav (TDM-2)
+ * (F) aplay -D plughw:1,3 xxx.wav (TDM-3)
*
* (A) arecord -D plughw:0,0 xxx.wav
- * (G) arecord -D plughw:0,6 xxx.wav
+ * (G) arecord -D plughw:1,4 xxx.wav
*/
-&sound_card {
-
- simple-audio-card,routing = "ak4613 Playback", "DAI0 Playback",
- "ak4613 Playback", "DAI1 Playback",
- "DAI0 Capture", "ak4613 Capture",
- "pcm3168a Playback", "DAI2 Playback",
- "pcm3168a Playback", "DAI3 Playback",
- "pcm3168a Playback", "DAI4 Playback",
- "pcm3168a Playback", "DAI5 Playback";
-
- /* dai-link@0 is defined in ulcb.dtsi */
-
- simple-audio-card,dai-link@1 {
+/ {
+ sound_card_kf: expand-sound {
#address-cells = <1>;
#size-cells = <0>;
- reg = <1>;
- convert-channels = <8>; /* to 8ch TDM */
- /*
- * (C) CPU2
- */
- cpu@0 {
+ compatible = "simple-scu-audio-card";
+ label = "snd-kf-split";
+
+ simple-audio-card,routing = "pcm3168a Playback", "DAI2 Playback",
+ "pcm3168a Playback", "DAI3 Playback",
+ "pcm3168a Playback", "DAI4 Playback",
+ "pcm3168a Playback", "DAI5 Playback";
+
+ simple-audio-card,dai-link@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0>;
- bitclock-master;
- frame-master;
- sound-dai = <&rcar_sound 2>;
+ convert-channels = <8>; /* to 8ch TDM */
+
+ /*
+ * (C) CPU2
+ */
+ cpu@0 {
+ reg = <0>;
+ bitclock-master;
+ frame-master;
+ sound-dai = <&rcar_sound 2>;
+ };
+ /*
+ * (D) CPU3
+ */
+ cpu@1 {
+ reg = <1>;
+ sound-dai = <&rcar_sound 3>;
+ };
+ /*
+ * (E) CPU4
+ */
+ cpu@2 {
+ reg = <2>;
+ sound-dai = <&rcar_sound 4>;
+ };
+ /*
+ * (F) CPU5
+ */
+ cpu@3 {
+ reg = <3>;
+ sound-dai = <&rcar_sound 5>;
+ };
+ /*
+ * (Y) PCM3168A-p
+ */
+ codec {
+ prefix = "pcm3168a";
+ mclk-fs = <512>;
+ sound-dai = <&pcm3168a 0>;
+ };
};
- /*
- * (D) CPU3
- */
- cpu@1 {
+
+ simple-audio-card,dai-link@1 {
reg = <1>;
- sound-dai = <&rcar_sound 3>;
- };
- /*
- * (E) CPU4
- */
- cpu@2 {
- reg = <2>;
- sound-dai = <&rcar_sound 4>;
- };
- /*
- * (F) CPU5
- */
- cpu@3 {
- reg = <3>;
- sound-dai = <&rcar_sound 5>;
- };
- /*
- * (Y) PCM3168A-p
- */
- codec {
- prefix = "pcm3168a";
- mclk-fs = <512>;
- sound-dai = <&pcm3168a 0>;
- };
- };
- simple-audio-card,dai-link@2 {
- reg = <2>;
- /*
- * (G) CPU6
- */
- cpu {
- bitclock-master;
- frame-master;
- sound-dai = <&rcar_sound 6>;
- };
- /*
- * (Z) PCM3168A-c
- */
- codec {
- prefix = "pcm3168a";
- mclk-fs = <512>;
- sound-dai = <&pcm3168a 1>;
+ /*
+ * (G) CPU6
+ */
+ cpu {
+ bitclock-master;
+ frame-master;
+ sound-dai = <&rcar_sound 6>;
+ };
+ /*
+ * (Z) PCM3168A-c
+ */
+ codec {
+ prefix = "pcm3168a";
+ mclk-fs = <512>;
+ sound-dai = <&pcm3168a 1>;
+ };
};
};
};
@@ -115,7 +118,8 @@
};
&rcar_sound {
- rcar_sound,dai {
+ rcar_sound,dai@1 {
+ reg = <1>;
/* dai0-1 are defined in ulcb.dtsi */
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card.dtsi
index 2010e8ac7fdc..28d29ecfb395 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card.dtsi
@@ -13,45 +13,51 @@
*
* (A) aplay -D plughw:0,0 xxx.wav
* (B) aplay -D plughw:0,1 xxx.wav
- * (C) aplay -D plughw:0,2 xxx.wav
+ * (C) aplay -D plughw:1,0 xxx.wav
*
* (A) arecord -D plughw:0,0 xxx.wav
- * (D) arecord -D plughw:0,3 xxx.wav
+ * (D) arecord -D plughw:1,1 xxx.wav
*/
-&sound_card {
- /* dai-link@0/1 are defined in ulcb.dtsi */
+/ {
+ sound_card_kf: expand-sound {
+ compatible = "simple-audio-card";
+ label = "snd-kf";
- /*
- * (C) CPU2 -> PCM3168A-p
- */
- simple-audio-card,dai-link@2 {
- reg = <2>;
- cpu {
- bitclock-master;
- frame-master;
- dai-tdm-slot-num = <8>;
- sound-dai = <&rcar_sound 2>;
- };
- codec {
- mclk-fs = <512>;
- sound-dai = <&pcm3168a 0>;
- };
- };
- /*
- * (D) CPU3 <- PCM3168A-c
- */
- simple-audio-card,dai-link@3 {
- reg = <3>;
- cpu {
- bitclock-master;
- frame-master;
- dai-tdm-slot-num = <6>;
- sound-dai = <&rcar_sound 3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /*
+ * (C) CPU2 -> PCM3168A-p
+ */
+ simple-audio-card,dai-link@0 {
+ reg = <0>;
+ cpu {
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <8>;
+ sound-dai = <&rcar_sound 2>;
+ };
+ codec {
+ mclk-fs = <512>;
+ sound-dai = <&pcm3168a 0>;
+ };
};
- codec {
- mclk-fs = <512>;
- sound-dai = <&pcm3168a 1>;
+ /*
+ * (D) CPU3 <- PCM3168A-c
+ */
+ simple-audio-card,dai-link@1 {
+ reg = <1>;
+ cpu {
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <6>;
+ sound-dai = <&rcar_sound 3>;
+ };
+ codec {
+ mclk-fs = <512>;
+ sound-dai = <&pcm3168a 1>;
+ };
};
};
};
@@ -65,9 +71,8 @@
};
&rcar_sound {
-
- rcar_sound,dai {
- /* dai0-1 are defined in ulcb.dtsi */
+ rcar_sound,dai@1 {
+ reg = <1>;
/*
* (C) CPU2 -> PCM3168A-p
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf.dtsi
index 3885ef3454ff..50de17e4fb3f 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf.dtsi
@@ -234,6 +234,7 @@
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupt-parent = <&gpio6>;
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
@@ -294,6 +295,7 @@
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupt-parent = <&gpio6>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
};
@@ -314,6 +316,7 @@
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupt-parent = <&gpio7>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
};
@@ -324,6 +327,7 @@
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
+ #interrupt-cells = <2>;
interrupt-parent = <&gpio5>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
};
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card-mix+split.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card-mix+split.dtsi
index 217d89019845..9b955510e38e 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card-mix+split.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card-mix+split.dtsi
@@ -24,7 +24,7 @@
#size-cells = <0>;
compatible = "simple-scu-audio-card";
- label = "rcar-sound";
+ label = "snd-ulcb-mix";
simple-audio-card,prefix = "ak4613";
simple-audio-card,routing = "ak4613 Playback", "DAI0 Playback",
@@ -72,9 +72,13 @@
};
&rcar_sound {
+ #address-cells = <1>;
+ #size-cells = <0>;
#sound-dai-cells = <1>;
- rcar_sound,dai {
+ rcar_sound,dai@0 {
+ reg = <0>;
+
/*
* (A) CPU0
*/
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card.dtsi
index 751cfd8c5257..ba0e188e7b21 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card.dtsi
@@ -18,7 +18,7 @@
/ {
sound_card: sound {
compatible = "simple-audio-card";
- label = "rcar-sound";
+ label = "snd-ulcb";
#address-cells = <1>;
#size-cells = <0>;
@@ -69,9 +69,13 @@
};
&rcar_sound {
+ #address-cells = <1>;
+ #size-cells = <0>;
#sound-dai-cells = <1>;
- rcar_sound,dai {
+ rcar_sound,dai@0 {
+ reg = <0>;
+
/*
* (A) CPU0 <-> ak4613
*/
diff --git a/sys/contrib/device-tree/src/arm64/renesas/ulcb.dtsi b/sys/contrib/device-tree/src/arm64/renesas/ulcb.dtsi
index 0be2716659e9..a2f66f916048 100644
--- a/sys/contrib/device-tree/src/arm64/renesas/ulcb.dtsi
+++ b/sys/contrib/device-tree/src/arm64/renesas/ulcb.dtsi
@@ -383,7 +383,7 @@
<&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
<&audio_clk_a>, <&cs2000>,
<&audio_clk_c>,
- <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
+ <&cpg CPG_MOD 922>;
};
&rpc {
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-common.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-common.dtsi
index 3429e124d95a..5b4e22385165 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-common.dtsi
@@ -7,6 +7,7 @@
/ {
aliases {
+ ethernet0 = &gmac;
mmc1 = &sdmmc;
mmc2 = &sdio;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-ctouch2.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-ctouch2.dtsi
index bf10a3d29fca..80db778c9684 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-ctouch2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-ctouch2.dtsi
@@ -26,5 +26,5 @@
};
&vcc3v3_btreg {
- enable-gpio = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts b/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts
index d759478e1c84..165d09ccb942 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/px30-engicam-px30-core-edimm2.2.dts
@@ -39,5 +39,5 @@
};
&vcc3v3_btreg {
- enable-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/px30-evb.dts b/sys/contrib/device-tree/src/arm64/rockchip/px30-evb.dts
index c1bbd555f5f5..0a90a88fc664 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/px30-evb.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/px30-evb.dts
@@ -14,6 +14,7 @@
compatible = "rockchip,px30-evb", "rockchip,px30";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdmmc;
mmc1 = &sdio;
mmc2 = &emmc;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/px30-ringneck-haikou.dts b/sys/contrib/device-tree/src/arm64/rockchip/px30-ringneck-haikou.dts
index 08a3ad3e7ae9..16798eb77077 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/px30-ringneck-haikou.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/px30-ringneck-haikou.dts
@@ -13,6 +13,7 @@
compatible = "tsd,px30-ringneck-haikou", "rockchip,px30";
aliases {
+ ethernet0 = &gmac;
mmc2 = &sdmmc;
};
@@ -68,15 +69,17 @@
simple-audio-card,format = "i2s";
simple-audio-card,name = "Haikou,I2S-codec";
simple-audio-card,mclk-fs = <512>;
+ simple-audio-card,frame-master = <&sgtl5000_codec>;
+ simple-audio-card,bitclock-master = <&sgtl5000_codec>;
- simple-audio-card,codec {
- clocks = <&sgtl5000_clk>;
+ sgtl5000_codec: simple-audio-card,codec {
sound-dai = <&sgtl5000>;
+ // Prevent the dai subsystem from overwriting the clock
+ // frequency. We are using a fixed-frequency oscillator.
+ system-clock-fixed;
};
simple-audio-card,cpu {
- bitclock-master;
- frame-master;
sound-dai = <&i2s0_8ch>;
};
};
@@ -84,7 +87,7 @@
sgtl5000_clk: sgtl5000-oscillator {
compatible = "fixed-clock";
#clock-cells = <0>;
- clock-frequency = <24576000>;
+ clock-frequency = <24576000>;
};
dc_12v: dc-12v-regulator {
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/px30.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/px30.dtsi
index 42ce78beb413..9137dd76e72c 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/px30.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/px30.dtsi
@@ -20,7 +20,6 @@
#size-cells = <2>;
aliases {
- ethernet0 = &gmac;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
@@ -632,6 +631,7 @@
clock-names = "spiclk", "apb_pclk";
dmas = <&dmac 12>, <&dmac 13>;
dma-names = "tx", "rx";
+ num-cs = <2>;
pinctrl-names = "default";
pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>;
#address-cells = <1>;
@@ -647,6 +647,7 @@
clock-names = "spiclk", "apb_pclk";
dmas = <&dmac 14>, <&dmac 15>;
dma-names = "tx", "rx";
+ num-cs = <2>;
pinctrl-names = "default";
pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_csn1 &spi1_miso &spi1_mosi>;
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3308-rock-pi-s.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3308-rock-pi-s.dts
index e9810d2f0407..b47fe02c33fb 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3308-rock-pi-s.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3308-rock-pi-s.dts
@@ -143,6 +143,68 @@
status = "okay";
};
+&gpio0 {
+ gpio-line-names =
+ /* GPIO0_A0 - A7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO0_B0 - B7 */
+ "", "", "", "header1-pin3 [GPIO0_B3]",
+ "header1-pin5 [GPIO0_B4]", "", "",
+ "header1-pin11 [GPIO0_B7]",
+ /* GPIO0_C0 - C7 */
+ "header1-pin13 [GPIO0_C0]",
+ "header1-pin15 [GPIO0_C1]", "", "", "",
+ "", "", "",
+ /* GPIO0_D0 - D7 */
+ "", "", "", "", "", "", "", "";
+};
+
+&gpio1 {
+ gpio-line-names =
+ /* GPIO1_A0 - A7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO1_B0 - B7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO1_C0 - C7 */
+ "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]",
+ "header1-pin19 [GPIO1_C7]",
+ /* GPIO1_D0 - D7 */
+ "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]",
+ "", "", "", "", "", "";
+};
+
+&gpio2 {
+ gpio-line-names =
+ /* GPIO2_A0 - A7 */
+ "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]",
+ "", "",
+ "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]",
+ "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]",
+ /* GPIO2_B0 - B7 */
+ "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]",
+ "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]",
+ "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]",
+ "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]",
+ /* GPIO2_C0 - C7 */
+ "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "",
+ /* GPIO2_D0 - D7 */
+ "", "", "", "", "", "", "", "";
+};
+
+&gpio3 {
+ gpio-line-names =
+ /* GPIO3_A0 - A7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO3_B0 - B7 */
+ "", "", "header2-pin42 [GPIO3_B2]",
+ "header2-pin41 [GPIO3_B3]", "header2-pin40 [GPIO3_B4]",
+ "header2-pin39 [GPIO3_B5]", "", "",
+ /* GPIO3_C0 - C7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO3_D0 - D7 */
+ "", "", "", "", "", "", "", "";
+};
+
&i2c1 {
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3308.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3308.dtsi
index 2ae4bb7d5e62..cfc0a87b5195 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3308.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3308.dtsi
@@ -20,6 +20,11 @@
#size-cells = <2>;
aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ gpio4 = &gpio4;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3318-a95x-z2.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3318-a95x-z2.dts
index 1deef53a4c94..c7b1862fca6a 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3318-a95x-z2.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3318-a95x-z2.dts
@@ -9,6 +9,7 @@
compatible = "zkmagic,a95x-z2", "rockchip,rk3318";
aliases {
+ ethernet0 = &gmac2phy;
mmc0 = &sdmmc;
mmc1 = &sdio;
mmc2 = &emmc;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dts
index ce318e05f0a6..f4d20f29c1b4 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dts
@@ -6,30 +6,16 @@
*/
/dts-v1/;
-#include "rk3326-odroid-go.dtsi"
+#include "rk3326-anbernic-rg351m.dtsi"
/ {
model = "Anbernic RG351M";
compatible = "anbernic,rg351m", "rockchip,rk3326";
-
- vibrator {
- compatible = "pwm-vibrator";
- pwms = <&pwm0 0 1000000 0>;
- pwm-names = "enable";
- };
};
-/delete-node/ &builtin_gamepad;
-/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */
-
&internal_display {
compatible = "elida,kd35t133";
iovcc-supply = <&vcc_lcd>;
+ rotation = <270>;
vdd-supply = <&vcc_lcd>;
};
-
-&pwm0 {
- status = "okay";
-};
-
-/delete-node/ &rk817_charger;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dtsi
new file mode 100644
index 000000000000..b6d041dbed94
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351m.dtsi
@@ -0,0 +1,478 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd
+ * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
+ * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com>
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3326.dtsi"
+
+/ {
+ aliases {
+ mmc0 = &sdmmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:115200n8";
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ power-supply = <&vcc_bl>;
+ pwms = <&pwm1 0 25000 0>;
+ };
+
+ /*
+ * LED is a tri-state. Driven high it is red, driven low it is
+ * green, and not driven at all (pin set to input) it is amber.
+ * Additionally, there is a 2nd LED that is not controllable
+ * that is on (red) when plugged in to power.
+ */
+ gpio_led: gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pin>;
+
+ red_green_led: led-0 {
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_CHARGING;
+ };
+ };
+
+ rk817-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "rk817_int";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Headphone", "Headphones",
+ "Speaker", "Speaker";
+ simple-audio-card,routing =
+ "MICL", "Mic Jack",
+ "Headphones", "HPOL",
+ "Headphones", "HPOR",
+ "Speaker", "SPKO";
+
+ simple-audio-card,codec {
+ sound-dai = <&rk817>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_2ch>;
+ };
+ };
+
+ vccsys: vccsys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v8_sys";
+ regulator-always-on;
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ };
+
+ vibrator {
+ compatible = "pwm-vibrator";
+ pwms = <&pwm0 0 1000000 0>;
+ pwm-names = "enable";
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cru {
+ assigned-clocks = <&cru PLL_NPLL>,
+ <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
+ <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
+ <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>;
+
+ assigned-clock-rates = <1188000000>,
+ <200000000>, <200000000>,
+ <150000000>, <150000000>,
+ <100000000>, <200000000>;
+};
+
+&display_subsystem {
+ status = "okay";
+};
+
+&dsi {
+ status = "okay";
+
+ ports {
+ mipi_out: port@1 {
+ reg = <1>;
+
+ mipi_out_panel: endpoint {
+ remote-endpoint = <&mipi_in_panel>;
+ };
+ };
+ };
+
+ internal_display: panel@0 {
+ reg = <0>;
+ backlight = <&backlight>;
+ reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+};
+
+&dsi_dphy {
+ status = "okay";
+};
+
+&gpu {
+ mali-supply = <&vdd_logic>;
+ status = "okay";
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+ i2c-scl-falling-time-ns = <16>;
+ i2c-scl-rising-time-ns = <280>;
+ status = "okay";
+
+ rk817: pmic@20 {
+ compatible = "rockchip,rk817";
+ reg = <0x20>;
+ #clock-cells = <1>;
+ clock-names = "mclk";
+ clock-output-names = "rk808-clkout1", "xin32k";
+ clocks = <&cru SCLK_I2S1_OUT>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;
+ pinctrl-names = "default";
+ #sound-dai-cells = <0>;
+ wakeup-source;
+
+ vcc1-supply = <&vccsys>;
+ vcc2-supply = <&vccsys>;
+ vcc3-supply = <&vccsys>;
+ vcc4-supply = <&vccsys>;
+ vcc5-supply = <&vccsys>;
+ vcc6-supply = <&vccsys>;
+ vcc7-supply = <&vccsys>;
+ vcc8-supply = <&vccsys>;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1150000>;
+ regulator-min-microvolt = <950000>;
+ regulator-name = "vdd_logic";
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <950000>;
+ };
+ };
+
+ vdd_arm: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1350000>;
+ regulator-min-microvolt = <950000>;
+ regulator-name = "vdd_arm";
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <950000>;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vcc_ddr";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_3v3: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "vcc_3v3";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_1v8: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1800000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-name = "vcc_1v8";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_1v0: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1000000>;
+ regulator-min-microvolt = <1000000>;
+ regulator-name = "vdd_1v0";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1000000>;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "vcc3v3_pmu";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-name = "vccio_sd";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_sd: LDO_REG6 {
+ regulator-boot-on;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "vcc_sd";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_bl: LDO_REG7 {
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "vcc_bl";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_lcd: LDO_REG8 {
+ regulator-max-microvolt = <2800000>;
+ regulator-min-microvolt = <2800000>;
+ regulator-name = "vcc_lcd";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <2800000>;
+ };
+ };
+
+ vcc_wifi: LDO_REG9 {
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-name = "vcc_wifi";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ usb_midu: BOOST {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <5400000>;
+ regulator-min-microvolt = <5000000>;
+ regulator-name = "usb_midu";
+ };
+ };
+
+ rk817_codec: codec {
+ rockchip,mic-in-differential;
+ };
+ };
+};
+
+&i2s1_2ch {
+ status = "okay";
+};
+
+&io_domains {
+ vccio1-supply = <&vcc_3v3>;
+ vccio2-supply = <&vccio_sd>;
+ vccio3-supply = <&vcc_3v3>;
+ vccio4-supply = <&vcc_3v3>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_3v3>;
+ status = "okay";
+};
+
+&pmu_io_domains {
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcc3v3_pmu>;
+ status = "okay";
+};
+
+&pwm0 {
+ status = "okay";
+};
+
+&pwm1 {
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdmmc {
+ cap-sd-highspeed;
+ card-detect-delay = <200>;
+ cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_sd>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&sfc {
+ #address-cells = <1>;
+ pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>;
+ pinctrl-names = "default";
+ #size-cells = <0>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <108000000>;
+ spi-rx-bus-width = <2>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&u2phy {
+ status = "okay";
+
+ u2phy_host: host-port {
+ status = "okay";
+ };
+
+ u2phy_otg: otg-port {
+ status = "disabled";
+ };
+};
+
+&usb20_otg {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m1_xfer>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&vopb {
+ status = "okay";
+};
+
+&vopb_mmu {
+ status = "okay";
+};
+
+&pinctrl {
+ headphone {
+ hp_det: hp-det {
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+
+ leds {
+ led_pin: led-pin {
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ dc_det: dc-det {
+ rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pmic_int: pmic-int {
+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ soc_slppin_gpio: soc_slppin_gpio {
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
+ };
+
+ soc_slppin_rst: soc_slppin_rst {
+ rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
+ };
+
+ soc_slppin_slp: soc_slppin_slp {
+ rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351v.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351v.dts
new file mode 100644
index 000000000000..c79f7a7b38cb
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3326-anbernic-rg351v.dts
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3326-anbernic-rg351m.dtsi"
+
+/ {
+ model = "Anbernic RG351V";
+ compatible = "anbernic,rg351v", "rockchip,rk3326";
+
+ gpio_keys_vol: gpio-keys-vol {
+ compatible = "gpio-keys";
+ autorepeat;
+
+ button-vol-down {
+ gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEDOWN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+
+ button-vol-up {
+ gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEUP";
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+};
+
+&internal_display {
+ compatible = "anbernic,rg351v-panel", "newvision,nv3051d";
+ vdd-supply = <&vcc_lcd>;
+};
+
+&io_domains {
+ vccio1-supply = <&vccio_sd>;
+};
+
+&vcc_sd {
+ regulator-max-microvolt = <3000000>;
+ regulator-min-microvolt = <1800000>;
+};
+
+&vccio_sd {
+ regulator-max-microvolt = <1800000>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-a1.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-a1.dts
index 40bf808642b9..824183e515da 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-a1.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-a1.dts
@@ -9,6 +9,7 @@
compatible = "azw,beelink-a1", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2io;
mmc0 = &sdmmc;
mmc1 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-evb.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-evb.dts
index ff6b466e0e07..1eef5504445f 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-evb.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-evb.dts
@@ -11,6 +11,7 @@
compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2phy;
mmc0 = &sdmmc;
mmc1 = &sdio;
mmc2 = &emmc;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-nanopi-r2s.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-nanopi-r2s.dts
index 1445b879ac7a..a4399da7d8b1 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-nanopi-r2s.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-nanopi-r2s.dts
@@ -14,6 +14,7 @@
compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2io;
ethernet1 = &rtl8153;
mmc0 = &sdmmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus-lts.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus-lts.dts
index 5d7d567283e5..4237f2ee8fee 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus-lts.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus-lts.dts
@@ -26,9 +26,11 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
+ motorcomm,auto-sleep-disabled;
motorcomm,clk-out-frequency-hz = <125000000>;
motorcomm,keep-pll-enabled;
- motorcomm,auto-sleep-disabled;
+ motorcomm,rx-clk-drv-microamp = <5020>;
+ motorcomm,rx-data-drv-microamp = <5020>;
pinctrl-0 = <&eth_phy_reset_pin>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus.dts
index dc83d74045a3..f20662929c77 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-orangepi-r1-plus.dts
@@ -15,6 +15,7 @@
compatible = "xunlong,orangepi-r1-plus", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2io;
ethernet1 = &rtl8153;
mmc0 = &sdmmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-roc-cc.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-roc-cc.dts
index 5d5d9574088c..414897a57e75 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-roc-cc.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-roc-cc.dts
@@ -11,6 +11,7 @@
compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2io;
mmc0 = &sdmmc;
mmc1 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock-pi-e.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock-pi-e.dts
index 018a3a5075c7..3cda6c627b68 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock-pi-e.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock-pi-e.dts
@@ -21,6 +21,8 @@
compatible = "radxa,rockpi-e", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2io;
+ ethernet1 = &gmac2phy;
mmc0 = &sdmmc;
mmc1 = &emmc;
};
@@ -180,6 +182,59 @@
status = "okay";
};
+&gpio0 {
+ gpio-line-names =
+ /* GPIO0_A0 - A7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO0_B0 - B7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO0_C0 - C7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO0_D0 - D7 */
+ "", "", "", "pin-15 [GPIO0_D3]", "", "", "", "";
+};
+
+&gpio1 {
+ gpio-line-names =
+ /* GPIO1_A0 - A7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO1_B0 - B7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO1_C0 - C7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO1_D0 - D7 */
+ "", "", "", "", "pin-07 [GPIO1_D4]", "", "", "";
+};
+
+&gpio2 {
+ gpio-line-names =
+ /* GPIO2_A0 - A7 */
+ "pin-08 [GPIO2_A0]", "pin-10 [GPIO2_A1]", "pin-11 [GPIO2_A2]",
+ "pin-13 [GPIO2-A3]", "pin-27 [GPIO2_A4]", "pin-28 [GPIO2_A5]",
+ "pin-33 [GPIO2_A6]", "",
+ /* GPIO2_B0 - B7 */
+ "", "", "", "", "pin-26 [GPIO2_B4]", "", "", "pin-36 [GPIO2_B7]",
+ /* GPIO2_C0 - C7 */
+ "pin-32 [GPIO2_C0]", "pin-35 [GPIO2_C1]", "pin-12 [GPIO2_C2]",
+ "pin-38 [GPIO2_C3]", "pin-29 [GPIO2_C4]", "pin-31 [GPIO2_C5]",
+ "pin-37 [GPIO2_C6]", "pin-40 [GPIO2_C7]",
+ /* GPIO2_D0 - D7 */
+ "", "", "", "", "", "", "", "";
+};
+
+&gpio3 {
+ gpio-line-names =
+ /* GPIO3_A0 - A7 */
+ "pin-23 [GPIO3_A0]", "pin-19 [GPIO3_A1]", "pin-21 [GPIO3_A2]",
+ "", "pin-03 [GPIO3_A4]", "", "pin-05 [GPIO3_A6]", "",
+ /* GPIO3_B0 - B7 */
+ "pin-24 [GPIO3_B0]", "", "", "", "", "", "", "",
+ /* GPIO3_C0 - C7 */
+ "", "", "", "", "", "", "", "",
+ /* GPIO3_D0 - D7 */
+ "", "", "", "", "", "", "", "";
+};
+
&i2c1 {
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts
index 0a27fa5271f5..229fe9da9c2d 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts
@@ -11,6 +11,7 @@
compatible = "pine64,rock64", "rockchip,rk3328";
aliases {
+ ethernet0 = &gmac2io;
mmc0 = &sdmmc;
mmc1 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3328.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3328.dtsi
index e729e7a22b23..7b4c15c4a9c3 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328.dtsi
@@ -20,6 +20,10 @@
#size-cells = <2>;
aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
@@ -27,8 +31,6 @@
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
- ethernet0 = &gmac2io;
- ethernet1 = &gmac2phy;
};
cpus {
@@ -486,7 +488,6 @@
pwm3: pwm@ff1b0030 {
compatible = "rockchip,rk3328-pwm";
reg = <0x0 0xff1b0030 0x0 0x10>;
- interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
clock-names = "pwm", "pclk";
pinctrl-names = "default";
@@ -668,7 +669,7 @@
vdec: video-codec@ff360000 {
compatible = "rockchip,rk3328-vdec", "rockchip,rk3399-vdec";
- reg = <0x0 0xff360000 0x0 0x400>;
+ reg = <0x0 0xff360000 0x0 0x480>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru ACLK_RKVDEC>, <&cru HCLK_RKVDEC>,
<&cru SCLK_VDEC_CABAC>, <&cru SCLK_VDEC_CORE>;
@@ -916,6 +917,8 @@
resets = <&cru SRST_GMAC2IO_A>;
reset-names = "stmmaceth";
rockchip,grf = <&grf>;
+ tx-fifo-depth = <2048>;
+ rx-fifo-depth = <4096>;
snps,txpbl = <0x4>;
status = "disabled";
};
@@ -938,6 +941,8 @@
reset-names = "stmmaceth";
phy-mode = "rmii";
phy-handle = <&phy>;
+ tx-fifo-depth = <2048>;
+ rx-fifo-depth = <4096>;
snps,txpbl = <0x4>;
clock_in_out = "output";
status = "disabled";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-evb.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-evb.dtsi
index e47d1398aeca..b48b98c13705 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-evb.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-evb.dtsi
@@ -9,6 +9,7 @@
/ {
aliases {
+ ethernet0 = &gmac;
mmc0 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-geekbox.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-geekbox.dts
index be06e6e64d18..029b8e22e709 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-geekbox.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-geekbox.dts
@@ -12,6 +12,7 @@
compatible = "geekbuying,geekbox", "rockchip,rk3368";
aliases {
+ ethernet0 = &gmac;
mmc0 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-lion.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-lion.dtsi
index 5753e57fd716..8ac8acf4082d 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-lion.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-lion.dtsi
@@ -8,6 +8,7 @@
/ {
aliases {
+ ethernet0 = &gmac;
mmc0 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-orion-r68-meta.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-orion-r68-meta.dts
index 81d1064fdb21..dcee2e28916f 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-orion-r68-meta.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-orion-r68-meta.dts
@@ -12,6 +12,7 @@
compatible = "tronsmart,orion-r68-meta", "rockchip,rk3368";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdmmc;
mmc1 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-r88.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-r88.dts
index 5589f3db6b36..b16b7ca02379 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3368-r88.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3368-r88.dts
@@ -12,6 +12,7 @@
compatible = "rockchip,r88", "rockchip,rk3368";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &emmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3368.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3368.dtsi
index a4c5aaf1f457..62af0cb94839 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3368.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3368.dtsi
@@ -19,7 +19,10 @@
#size-cells = <2>;
aliases {
- ethernet0 = &gmac;
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-eaidk-610.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-eaidk-610.dts
index 6464ef4d113d..173da81fc231 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-eaidk-610.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-eaidk-610.dts
@@ -15,6 +15,7 @@
compatible = "openailab,eaidk-610", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-evb.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-evb.dts
index 3d1e126b553f..55eca7a50a1f 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-evb.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-evb.dts
@@ -12,6 +12,7 @@
compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdhci;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-ficus.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-ficus.dts
index 1ce85a5816e4..30e4879f322c 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-ficus.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-ficus.dts
@@ -13,6 +13,10 @@
model = "96boards RK3399 Ficus";
compatible = "vamrs,ficus", "rockchip,rk3399";
+ aliases {
+ ethernet0 = &gmac;
+ };
+
chosen {
stdout-path = "serial2:1500000n8";
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-firefly.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-firefly.dts
index c5db64f3e124..260415d99aeb 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-firefly.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-firefly.dts
@@ -16,6 +16,7 @@
compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-bob.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-bob.dts
index 0f9cc042d9bf..1cba1d857c96 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-bob.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-bob.dts
@@ -70,7 +70,7 @@
&spi0 {
status = "okay";
- cr50@0 {
+ tpm@0 {
compatible = "google,cr50";
reg = <0>;
interrupt-parent = <&gpio0>;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-chromebook.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-chromebook.dtsi
index 5c1929d41cc0..cacbad35cfc8 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-chromebook.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-chromebook.dtsi
@@ -509,8 +509,7 @@ ap_i2c_tp: &i2c5 {
&pci_rootport {
mvl_wifi: wifi@0,0 {
compatible = "pci1b4b,2b42";
- reg = <0x83010000 0x0 0x00000000 0x0 0x00100000
- 0x83010000 0x0 0x00100000 0x0 0x00100000>;
+ reg = <0x0000 0x0 0x0 0x0 0x0>;
interrupt-parent = <&gpio0>;
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet-dumo.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet-dumo.dts
index 853e88455e75..9e4b12ed62cb 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet-dumo.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet-dumo.dts
@@ -34,8 +34,8 @@
&pci_rootport {
wifi@0,0 {
compatible = "qcom,ath10k";
- reg = <0x00010000 0x0 0x00000000 0x0 0x00000000>,
- <0x03010010 0x0 0x00000000 0x0 0x00200000>;
+ reg = <0x00000000 0x0 0x00000000 0x0 0x00000000>,
+ <0x03000010 0x0 0x00000000 0x0 0x00200000>;
qcom,ath10k-calibration-variant = "GO_DUMO";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet.dtsi
index c5e7de60c121..5846a11f0e84 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru-scarlet.dtsi
@@ -706,7 +706,7 @@ camera: &i2c7 {
&spi2 {
status = "okay";
- cr50@0 {
+ tpm@0 {
compatible = "google,cr50";
reg = <0>;
interrupt-parent = <&gpio1>;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru.dtsi
index 23bfba86daab..789fd0dcc88b 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-gru.dtsi
@@ -250,7 +250,7 @@
pinctrl-0 = <&sd_io_pwr_en &sd_pwr_1800_sel>;
enable-active-high;
- enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
states = <1800000 0x1>,
<3000000 0x0>;
@@ -489,6 +489,7 @@ ap_i2c_audio: &i2c8 {
#address-cells = <3>;
#size-cells = <2>;
ranges;
+ device_type = "pci";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-hugsun-x99.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-hugsun-x99.dts
index 7af27e8216f1..4a6ab6c2e24c 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-hugsun-x99.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-hugsun-x99.dts
@@ -11,6 +11,7 @@
compatible = "hugsun,x99", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-captain.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-captain.dts
index 8302e51def52..99ac4ed0f13f 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-captain.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-captain.dts
@@ -10,6 +10,10 @@
/ {
model = "Khadas Edge-Captain";
compatible = "khadas,edge-captain", "rockchip,rk3399";
+
+ aliases {
+ ethernet0 = &gmac;
+ };
};
&gmac {
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-v.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-v.dts
index f5dcb99dc349..e12e7b4d64ca 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-v.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-khadas-edge-v.dts
@@ -10,6 +10,10 @@
/ {
model = "Khadas Edge-V";
compatible = "khadas,edge-v", "rockchip,rk3399";
+
+ aliases {
+ ethernet0 = &gmac;
+ };
};
&gmac {
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-kobol-helios64.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-kobol-helios64.dts
index 1eb287a3f8c0..9e3aec4440bd 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-kobol-helios64.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-kobol-helios64.dts
@@ -19,6 +19,7 @@
compatible = "kobol,helios64", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdmmc;
mmc1 = &sdhci;
spi1 = &spi1;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-leez-p710.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-leez-p710.dts
index a21ac319f809..cb69e2145fa9 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-leez-p710.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-leez-p710.dts
@@ -15,6 +15,7 @@
compatible = "leez,p710", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-nanopi4.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-nanopi4.dtsi
index 7c5f441a2219..b7f1e47978a6 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-nanopi4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-nanopi4.dtsi
@@ -18,6 +18,7 @@
/ {
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-orangepi.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-orangepi.dts
index dba4d03bfc2b..e7551449e718 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-orangepi.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-orangepi.dts
@@ -17,6 +17,7 @@
compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma-haikou.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma-haikou.dts
index 115c14c0a3c6..18a98c4648ea 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma-haikou.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma-haikou.dts
@@ -5,6 +5,7 @@
/dts-v1/;
#include "rk3399-puma.dtsi"
+#include <dt-bindings/input/input.h>
/ {
model = "Theobroma Systems RK3399-Q7 SoM";
@@ -18,6 +19,38 @@
stdout-path = "serial0:115200n8";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&haikou_keys_pin>;
+ pinctrl-names = "default";
+
+ button-batlow-n {
+ gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
+ label = "BATLOW#";
+ linux,code = <KEY_BATTERY>;
+ };
+
+ button-slp-btn-n {
+ gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
+ label = "SLP_BTN#";
+ linux,code = <KEY_SLEEP>;
+ };
+
+ button-wake-n {
+ gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>;
+ label = "WAKE#";
+ linux,code = <KEY_WAKEUP>;
+ wakeup-source;
+ };
+
+ switch-lid-btn-n {
+ gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ label = "LID_BTN#";
+ linux,code = <SW_LID>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
leds {
pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
@@ -165,11 +198,8 @@
};
&pinctrl {
- pinctrl-names = "default";
- pinctrl-0 = <&haikou_pin_hog>;
-
- hog {
- haikou_pin_hog: haikou-pin-hog {
+ buttons {
+ haikou_keys_pin: haikou-keys-pin {
rockchip,pins =
/* LID_BTN */
<0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
@@ -177,7 +207,7 @@
<0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
/* SLP_BTN# */
<0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
- /* BIOS_DISABLE# */
+ /* WAKE# */
<0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma.dtsi
index aa3e21bd6c8f..c08e69391c01 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-puma.dtsi
@@ -9,6 +9,7 @@
/ {
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdhci;
};
@@ -27,7 +28,7 @@
extcon_usb3: extcon-usb3 {
compatible = "linux,extcon-usb-gpio";
- id-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
+ id-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb3_id>;
};
@@ -119,6 +120,20 @@
drive-impedance-ohm = <33>;
};
+&gpio0 {
+ /*
+ * The BIOS_DISABLE hog is a feedback pin for the actual status of the
+ * signal. This usually represents the state of a switch on the baseboard.
+ * The pin has a 10k pull-up resistor connected, so no pull-up setting is needed.
+ */
+ bios-disable-hog {
+ gpios = <RK_PB0 GPIO_ACTIVE_HIGH>;
+ gpio-hog;
+ input;
+ line-name = "bios_disable";
+ };
+};
+
&gmac {
assigned-clocks = <&cru SCLK_RMII_SRC>;
assigned-clock-parents = <&clkin_gmac>;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-roc-pc.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-roc-pc.dtsi
index c32913df93c3..ca7a446b6568 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-roc-pc.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-roc-pc.dtsi
@@ -14,6 +14,7 @@
compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdmmc;
mmc1 = &sdhci;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4c-plus.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4c-plus.dts
index 8bfd5f88d1ef..7baf9d1b22fd 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4c-plus.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4c-plus.dts
@@ -15,6 +15,7 @@
compatible = "radxa,rock-4c-plus", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdhci;
mmc1 = &sdmmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4se.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4se.dts
new file mode 100644
index 000000000000..7cfc198bbae7
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-4se.dts
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Akash Gajjar <Akash_Gajjar@mentor.com>
+ * Copyright (c) 2019 Pragnesh Patel <Pragnesh_Patel@mentor.com>
+ */
+
+/dts-v1/;
+#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-t-opp.dtsi"
+
+/ {
+ model = "Radxa ROCK 4SE";
+ compatible = "radxa,rock-4se", "rockchip,rk3399";
+
+ aliases {
+ mmc2 = &sdio0;
+ };
+};
+
+&pinctrl {
+ usb2 {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&sdio0 {
+ status = "okay";
+
+ brcmf: wifi@1 {
+ compatible = "brcm,bcm4329-fmac";
+ reg = <1>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "host-wake";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_host_wake_l>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4345c5";
+ clocks = <&rk808 1>;
+ clock-names = "lpo";
+ device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
+ shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+ max-speed = <1500000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+ vbat-supply = <&vcc3v3_sys>;
+ vddio-supply = <&vcc_1v8>;
+ };
+};
+
+&vcc5v0_host {
+ enable-active-high;
+ gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4.dtsi
index 980c4534313a..281a12180703 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4.dtsi
@@ -9,10 +9,10 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pwm/pwm.h>
#include "rk3399.dtsi"
-#include "rk3399-opp.dtsi"
/ {
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdhci;
mmc1 = &sdmmc;
};
@@ -493,6 +493,7 @@
&i2s0 {
pinctrl-0 = <&i2s0_2ch_bus>;
+ pinctrl-1 = <&i2s0_2ch_bus_bclk_off>;
rockchip,capture-channels = <2>;
rockchip,playback-channels = <2>;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4a.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4a.dts
index 89f2af5e111d..d5df8939a658 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4a.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4a.dts
@@ -6,8 +6,19 @@
/dts-v1/;
#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-opp.dtsi"
/ {
model = "Radxa ROCK Pi 4A";
compatible = "radxa,rockpi4a", "radxa,rockpi4", "rockchip,rk3399";
};
+
+&spi1 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4b.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4b.dts
index 0806545922f5..bee6d7588302 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4b.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4b.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-opp.dtsi"
/ {
model = "Radxa ROCK Pi 4B";
@@ -30,6 +31,16 @@
};
};
+&spi1 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ };
+};
+
&uart0 {
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4c.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4c.dts
index 4053ba72618c..de2ebe4cb4f3 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4c.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rock-pi-4c.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-opp.dtsi"
/ {
model = "Radxa ROCK Pi 4C";
@@ -42,6 +43,16 @@
hp-det-gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
};
+&spi1 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ };
+};
+
&uart0 {
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rockpro64.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rockpro64.dtsi
index bca2b50e0a93..f30b82a10ca3 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rockpro64.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-rockpro64.dtsi
@@ -11,6 +11,7 @@
/ {
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-sapphire.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-sapphire.dtsi
index e6ac292ce645..b3ef1c85e754 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399-sapphire.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399-sapphire.dtsi
@@ -12,6 +12,7 @@
compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdmmc;
mmc1 = &sdhci;
};
@@ -44,7 +45,7 @@
fan0: gpio-fan {
#cooling-cells = <2>;
compatible = "gpio-fan";
- gpio-fan,speed-map = <0 0 3000 1>;
+ gpio-fan,speed-map = <0 0>, <3000 1>;
gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399.dtsi
index 928948e7c7bb..6e12c5a920ca 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399.dtsi
@@ -19,7 +19,11 @@
#size-cells = <2>;
aliases {
- ethernet0 = &gmac;
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ gpio4 = &gpio4;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
@@ -265,6 +269,33 @@
};
};
+ pcie0_ep: pcie-ep@f8000000 {
+ compatible = "rockchip,rk3399-pcie-ep";
+ reg = <0x0 0xfd000000 0x0 0x1000000>,
+ <0x0 0xfa000000 0x0 0x2000000>;
+ reg-names = "apb-base", "mem-base";
+ clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
+ <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
+ clock-names = "aclk", "aclk-perf",
+ "hclk", "pm";
+ max-functions = /bits/ 8 <8>;
+ num-lanes = <4>;
+ resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
+ <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>,
+ <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>,
+ <&cru SRST_A_PCIE>;
+ reset-names = "core", "mgmt", "mgmt-sticky", "pipe",
+ "pm", "pclk", "aclk";
+ phys = <&pcie_phy 0>, <&pcie_phy 1>,
+ <&pcie_phy 2>, <&pcie_phy 3>;
+ phy-names = "pcie-phy-0", "pcie-phy-1",
+ "pcie-phy-2", "pcie-phy-3";
+ rockchip,max-outbound-regions = <32>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_clkreqnb_cpm>;
+ status = "disabled";
+ };
+
gmac: ethernet@fe300000 {
compatible = "rockchip,rk3399-gmac";
reg = <0x0 0xfe300000 0x0 0x10000>;
@@ -1082,7 +1113,9 @@
power-domain@RK3399_PD_VDU {
reg = <RK3399_PD_VDU>;
clocks = <&cru ACLK_VDU>,
- <&cru HCLK_VDU>;
+ <&cru HCLK_VDU>,
+ <&cru SCLK_VDU_CA>,
+ <&cru SCLK_VDU_CORE>;
pm_qos = <&qos_video_m1_r>,
<&qos_video_m1_w>;
#power-domain-cells = <0>;
@@ -1331,7 +1364,6 @@
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru PCLK_DDR_MON>;
clock-names = "pclk_ddr_mon";
- status = "disabled";
};
vpu: video-codec@ff650000 {
@@ -1358,7 +1390,7 @@
vdec: video-codec@ff660000 {
compatible = "rockchip,rk3399-vdec";
- reg = <0x0 0xff660000 0x0 0x400>;
+ reg = <0x0 0xff660000 0x0 0x480>;
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
<&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
@@ -2086,6 +2118,7 @@
interrupt-names = "job", "mmu", "gpu";
clocks = <&cru ACLK_GPU>;
#cooling-cells = <2>;
+ dynamic-power-coefficient = <2640>;
power-domains = <&power RK3399_PD_GPU>;
status = "disabled";
};
@@ -2430,6 +2463,16 @@
<4 RK_PA0 1 &pcfg_pull_none>;
};
+ i2s0_2ch_bus_bclk_off: i2s0-2ch-bus-bclk-off {
+ rockchip,pins =
+ <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>,
+ <3 RK_PD1 1 &pcfg_pull_none>,
+ <3 RK_PD2 1 &pcfg_pull_none>,
+ <3 RK_PD3 1 &pcfg_pull_none>,
+ <3 RK_PD7 1 &pcfg_pull_none>,
+ <4 RK_PA0 1 &pcfg_pull_none>;
+ };
+
i2s0_8ch_bus: i2s0-8ch-bus {
rockchip,pins =
<3 RK_PD0 1 &pcfg_pull_none>,
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3399pro-vmarc-som.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3399pro-vmarc-som.dtsi
index 8b8992a8e9c0..8823c924dc1d 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3399pro-vmarc-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3399pro-vmarc-som.dtsi
@@ -13,6 +13,7 @@
compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
aliases {
+ ethernet0 = &gmac;
mmc0 = &sdhci;
mmc1 = &sdmmc;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-lubancat-1.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-lubancat-1.dts
index 1c6d83b47cd2..6ecdf5d28339 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-lubancat-1.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-lubancat-1.dts
@@ -455,7 +455,7 @@
&pinctrl {
leds {
sys_led_pin: sys-status-led-pin {
- rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rgb30.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rgb30.dts
new file mode 100644
index 000000000000..0ac64f043b80
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rgb30.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3566-powkiddy-rk2023.dtsi"
+
+/ {
+ model = "RGB30";
+ compatible = "powkiddy,rgb30", "rockchip,rk3566";
+};
+
+&cru {
+ assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
+ <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
+ assigned-clock-rates = <32768>, <1200000000>,
+ <200000000>, <292500000>;
+};
+
+&dsi0 {
+ panel: panel@0 {
+ compatible = "powkiddy,rgb30-panel";
+ reg = <0>;
+ backlight = <&backlight>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd_rst>;
+ reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
+ vcc-supply = <&vcc3v3_lcd0_n>;
+ iovcc-supply = <&vcc3v3_lcd0_n>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dts
new file mode 100644
index 000000000000..ba32d0793dca
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3566-powkiddy-rk2023.dtsi"
+
+/ {
+ model = "RK2023";
+ compatible = "powkiddy,rk2023", "rockchip,rk3566";
+};
+
+&cru {
+ assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
+ <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
+ assigned-clock-rates = <32768>, <1200000000>,
+ <200000000>, <115200000>;
+};
+
+&dsi0 {
+ panel: panel@0 {
+ compatible = "powkiddy,rk2023-panel", "newvision,nv3051d";
+ reg = <0>;
+ backlight = <&backlight>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd_rst>;
+ reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&vcc3v3_lcd0_n>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dtsi
new file mode 100644
index 000000000000..0fa8f06f94cd
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -0,0 +1,875 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+#include "rk3566.dtsi"
+
+/ {
+ aliases {
+ mmc1 = &sdmmc0;
+ mmc2 = &sdmmc1;
+ mmc3 = &sdmmc2;
+ };
+
+ adc-joystick {
+ compatible = "adc-joystick";
+ io-channels = <&adc_mux 0>,
+ <&adc_mux 1>,
+ <&adc_mux 2>,
+ <&adc_mux 3>;
+ pinctrl-0 = <&joy_mux_en>;
+ pinctrl-names = "default";
+ poll-interval = <60>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ axis@0 {
+ reg = <0>;
+ abs-flat = <32>;
+ abs-fuzz = <32>;
+ abs-range = <1023 15>;
+ linux,code = <ABS_X>;
+ };
+
+ axis@1 {
+ reg = <1>;
+ abs-flat = <32>;
+ abs-fuzz = <32>;
+ abs-range = <15 1023>;
+ linux,code = <ABS_RX>;
+ };
+
+ axis@2 {
+ reg = <2>;
+ abs-flat = <32>;
+ abs-fuzz = <32>;
+ abs-range = <15 1023>;
+ linux,code = <ABS_Y>;
+ };
+
+ axis@3 {
+ reg = <3>;
+ abs-flat = <32>;
+ abs-fuzz = <32>;
+ abs-range = <1023 15>;
+ linux,code = <ABS_RY>;
+ };
+ };
+
+ adc_mux: adc-mux {
+ compatible = "io-channel-mux";
+ channels = "left_x", "right_x", "left_y", "right_y";
+ #io-channel-cells = <1>;
+ io-channels = <&saradc 3>;
+ io-channel-names = "parent";
+ mux-controls = <&gpio_mux>;
+ settle-time-us = <100>;
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ power-supply = <&vcc_sys>;
+ pwms = <&pwm4 0 25000 0>;
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <3151000>;
+ charge-term-current-microamp = <300000>;
+ constant-charge-current-max-microamp = <2000000>;
+ constant-charge-voltage-max-microvolt = <4250000>;
+ factory-internal-resistance-micro-ohms = <117000>;
+ voltage-max-design-microvolt = <4172000>;
+ voltage-min-design-microvolt = <3400000>;
+
+ ocv-capacity-celsius = <20>;
+ ocv-capacity-table-0 = <4172000 100>, <4092000 95>, <4035000 90>, <3990000 85>,
+ <3939000 80>, <3895000 75>, <3852000 70>, <3807000 65>,
+ <3762000 60>, <3713000 55>, <3672000 50>, <3647000 45>,
+ <3629000 40>, <3613000 35>, <3598000 30>, <3578000 25>,
+ <3550000 20>, <3519000 15>, <3479000 10>, <3438000 5>,
+ <3400000 0>;
+ };
+
+ gpio_keys_control: gpio-keys-control {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&btn_pins_ctrl>;
+ pinctrl-names = "default";
+
+ button-a {
+ gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
+ label = "EAST";
+ linux,code = <BTN_EAST>;
+ };
+
+ button-b {
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
+ label = "SOUTH";
+ linux,code = <BTN_SOUTH>;
+ };
+
+ button-down {
+ gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
+ label = "DPAD-DOWN";
+ linux,code = <BTN_DPAD_DOWN>;
+ };
+
+ button-l1 {
+ gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
+ label = "TL";
+ linux,code = <BTN_TL>;
+ };
+
+ button-l2 {
+ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+ label = "TL2";
+ linux,code = <BTN_TL2>;
+ };
+
+ button-left {
+ gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "DPAD-LEFT";
+ linux,code = <BTN_DPAD_LEFT>;
+ };
+
+ button-r1 {
+ gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
+ label = "TR";
+ linux,code = <BTN_TR>;
+ };
+
+ button-r2 {
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "TR2";
+ linux,code = <BTN_TR2>;
+ };
+
+ button-right {
+ gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "DPAD-RIGHT";
+ linux,code = <BTN_DPAD_RIGHT>;
+ };
+
+ button-select {
+ gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
+ label = "SELECT";
+ linux,code = <BTN_SELECT>;
+ };
+
+ button-start {
+ gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
+ label = "START";
+ linux,code = <BTN_START>;
+ };
+
+ button-thumbl {
+ gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
+ label = "THUMBL";
+ linux,code = <BTN_THUMBL>;
+ };
+
+ button-thumbr {
+ gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "THUMBR";
+ linux,code = <BTN_THUMBR>;
+ };
+
+ button-up {
+ gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
+ label = "DPAD-UP";
+ linux,code = <BTN_DPAD_UP>;
+ };
+
+ button-x {
+ gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
+ label = "NORTH";
+ linux,code = <BTN_NORTH>;
+ };
+
+ button-y {
+ gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
+ label = "WEST";
+ linux,code = <BTN_WEST>;
+ };
+ };
+
+ gpio_keys_vol: gpio-keys-vol {
+ compatible = "gpio-keys";
+ autorepeat;
+ pinctrl-0 = <&btn_pins_vol>;
+ pinctrl-names = "default";
+
+ button-vol-down {
+ gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEDOWN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+
+ button-vol-up {
+ gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEUP";
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ gpio_mux: mux-controller {
+ compatible = "gpio-mux";
+ mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
+ <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
+ #mux-control-cells = <0>;
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ ddc-i2c-bus = <&i2c5>;
+ type = "c";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ /*
+ * Device also includes an always on LED that is wired to the 5V input
+ * voltage and is on when the device is plugged in.
+ */
+ leds: pwm-leds {
+ compatible = "pwm-leds";
+
+ green_led: led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ max-brightness = <255>;
+ pwms = <&pwm6 0 25000 0>;
+ };
+
+ red_led: led-1 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_CHARGING;
+ max-brightness = <255>;
+ pwms = <&pwm7 0 25000 0>;
+ };
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rk817 1>;
+ clock-names = "ext_clock";
+ pinctrl-0 = <&wifi_enable_h>;
+ pinctrl-names = "default";
+ post-power-on-delay-ms = <200>;
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
+ };
+
+ /*
+ * Channels reversed for speakers. Headphones automatically switch via hardware when
+ * detected with no ability to control output in software. Headphones appear to be mono
+ * (each output channel receives all audio). No microphone support on 3.5mm jack.
+ */
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "rk817_ext";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones";
+ simple-audio-card,routing =
+ "Headphones", "HPOL",
+ "Headphones", "HPOR";
+
+ simple-audio-card,codec {
+ sound-dai = <&rk817>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+ };
+
+ vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 {
+ compatible = "regulator-fixed";
+ gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-0 = <&vcc_lcd_h>;
+ pinctrl-names = "default";
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3_lcd0_n";
+ vin-supply = <&vcc_3v3>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_sys: regulator-vcc-sys {
+ compatible = "regulator-fixed";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ regulator-name = "vcc_sys";
+ };
+
+ vcc_wifi: regulator-vcc-wifi {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&vcc_wifi_h>;
+ pinctrl-names = "default";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_wifi";
+ };
+};
+
+&combphy1 {
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&dsi0 {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ dsi0_in: port@0 {
+ reg = <0>;
+ dsi0_in_vp1: endpoint {
+ remote-endpoint = <&vp1_out_dsi0>;
+ };
+ };
+
+ dsi0_out: port@1 {
+ reg = <1>;
+ mipi_out_panel: endpoint {
+ remote-endpoint = <&mipi_in_panel>;
+ };
+ };
+ };
+};
+
+&dsi_dphy0 {
+ status = "okay";
+};
+
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
+&hdmi {
+ ddc-i2c-bus = <&i2c5>;
+ pinctrl-0 = <&hdmitxm0_cec>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&hdmi_in {
+ hdmi_in_vp0: endpoint {
+ remote-endpoint = <&vp0_out_hdmi>;
+ };
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&hdmi_sound {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ rk817: pmic@20 {
+ compatible = "rockchip,rk817";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
+ #clock-cells = <1>;
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
+ wakeup-source;
+
+ vcc1-supply = <&vcc_sys>;
+ vcc2-supply = <&vcc_sys>;
+ vcc3-supply = <&vcc_sys>;
+ vcc4-supply = <&vcc_sys>;
+ vcc5-supply = <&vcc_sys>;
+ vcc6-supply = <&vcc_sys>;
+ vcc7-supply = <&vcc_sys>;
+ vcc8-supply = <&vcc_sys>;
+ vcc9-supply = <&dcdc_boost>;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_logic";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_gpu";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_ddr";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_3v3: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_3v3";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca1v8_pmu: LDO_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca1v8_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda_0v9";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda0v9_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vccio_acodec";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vccio_sd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_1v8: LDO_REG7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc1v8_dvp: LDO_REG8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc1v8_dvp";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc2v8_dvp: LDO_REG9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-name = "vcc2v8_dvp";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ dcdc_boost: BOOST {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <4700000>;
+ regulator-max-microvolt = <5400000>;
+ regulator-name = "boost";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ otg_switch: OTG_SWITCH {
+ regulator-name = "otg_switch";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+
+ rk817_charger: charger {
+ monitored-battery = <&battery>;
+ rockchip,resistor-sense-micro-ohms = <10000>;
+ rockchip,sleep-enter-current-microamp = <300000>;
+ rockchip,sleep-filter-current-microamp = <100000>;
+ };
+ };
+
+ vdd_cpu: regulator@1c {
+ compatible = "tcs,tcs4525";
+ reg = <0x1c>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1390000>;
+ regulator-name = "vdd_cpu";
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc_sys>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c5 {
+ pinctrl-0 = <&i2c5m1_xfer>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&i2s1_8ch {
+ pinctrl-0 = <&i2s1m0_sclktx
+ &i2s1m0_lrcktx
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
+ pinctrl-names = "default";
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
+&pinctrl {
+ gpio-btns {
+ btn_pins_ctrl: btn-pins-ctrl {
+ rockchip,pins =
+ <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ btn_pins_vol: btn-pins-vol {
+ rockchip,pins =
+ <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ joy-mux {
+ joy_mux_en: joy-mux-en {
+ rockchip,pins =
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>;
+ };
+ };
+
+ gpio-lcd {
+ lcd_rst: lcd-rst {
+ rockchip,pins =
+ <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins =
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ sdio-pwrseq {
+ wifi_enable_h: wifi-enable-h {
+ rockchip,pins =
+ <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ vcc3v3-lcd {
+ vcc_lcd_h: vcc-lcd-h {
+ rockchip,pins =
+ <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ vcc-wifi {
+ vcc_wifi_h: vcc-wifi-h {
+ rockchip,pins =
+ <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ status = "okay";
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcc3v3_pmu>;
+ vccio1-supply = <&vccio_acodec>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcc_1v8>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc1v8_dvp>;
+ vccio7-supply = <&vcc_3v3>;
+};
+
+&pwm4 {
+ status = "okay";
+};
+
+&pwm6 {
+ status = "okay";
+};
+
+&pwm7 {
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
+ pinctrl-names = "default";
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&sdmmc1 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
+ pinctrl-names = "default";
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vcc1v8_dvp>;
+ status = "okay";
+};
+
+&sdmmc2 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ non-removable;
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
+ pinctrl-names = "default";
+ vmmc-supply = <&vcc_wifi>;
+ vqmmc-supply = <&vcca1v8_pmu>;
+ status = "okay";
+};
+
+&tsadc {
+ rockchip,hw-tshut-mode = <1>;
+ rockchip,hw-tshut-polarity = <0>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-0 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
+ pinctrl-names = "default";
+ uart-has-rtscts;
+ status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt";
+ device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
+ host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&usb_host0_xhci {
+ dr_mode = "peripheral";
+ phys = <&usb2phy0_otg>;
+ phy-names = "usb2-phy";
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ phy-names = "usb2-phy", "usb3-phy";
+ phys = <&usb2phy1_host>, <&combphy1 PHY_TYPE_USB3>;
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ status = "okay";
+};
+
+&usb2phy1 {
+ status = "okay";
+};
+
+&usb2phy1_host {
+ status = "okay";
+};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
+
+&vp1 {
+ vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
+ reg = <ROCKCHIP_VOP2_EP_MIPI0>;
+ remote-endpoint = <&dsi0_in_vp1>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-x55.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-x55.dts
new file mode 100644
index 000000000000..4786b19fd017
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-x55.dts
@@ -0,0 +1,926 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+#include "rk3566.dtsi"
+
+/ {
+ model = "Powkiddy x55";
+ compatible = "powkiddy,x55", "rockchip,rk3566";
+
+ aliases {
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc0;
+ mmc2 = &sdmmc2;
+ mmc3 = &sdmmc1;
+ };
+
+ chosen: chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ adc_joystick: adc-joystick {
+ compatible = "adc-joystick";
+ io-channels = <&saradc 0>, <&saradc 1>,
+ <&saradc 2>, <&saradc 3>;
+ poll-interval = <60>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ axis@0 {
+ reg = <0>;
+ abs-flat = <30>;
+ abs-fuzz = <20>;
+ abs-range = <15 1023>;
+ linux,code = <ABS_X>;
+ };
+
+ axis@1 {
+ reg = <1>;
+ abs-flat = <30>;
+ abs-fuzz = <20>;
+ abs-range = <1023 15>;
+ linux,code = <ABS_Y>;
+ };
+
+ axis@2 {
+ reg = <2>;
+ abs-flat = <30>;
+ abs-fuzz = <20>;
+ abs-range = <15 1023>;
+ linux,code = <ABS_RX>;
+ };
+
+ axis@3 {
+ reg = <3>;
+ abs-flat = <30>;
+ abs-fuzz = <20>;
+ abs-range = <1023 15>;
+ linux,code = <ABS_RY>;
+ };
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ power-supply = <&vcc_sys>;
+ pwms = <&pwm4 0 25000 0>;
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <4000000>;
+ charge-term-current-microamp = <300000>;
+ constant-charge-current-max-microamp = <2000000>;
+ constant-charge-voltage-max-microvolt = <4300000>;
+ factory-internal-resistance-micro-ohms = <91000>;
+ voltage-max-design-microvolt = <4138000>;
+ voltage-min-design-microvolt = <3400000>;
+
+ ocv-capacity-celsius = <20>;
+ ocv-capacity-table-0 = <4138000 100>, <4083000 95>, <4059000 90>, <4044000 85>,
+ <4030000 80>, <4020000 75>, <4006000 70>, <3972000 65>,
+ <3934000 60>, <3904000 55>, <3878000 50>, <3857000 45>,
+ <3843000 40>, <3826000 35>, <3801000 30>, <3768000 25>,
+ <3735000 20>, <3688000 15>, <3621000 10>, <3553000 5>,
+ <3400000 0>;
+ };
+
+ gpio_keys_control: gpio-keys-control {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&btn_pins_ctrl>;
+ pinctrl-names = "default";
+
+ button-a {
+ gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>;
+ label = "EAST";
+ linux,code = <BTN_EAST>;
+ };
+
+ button-b {
+ gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
+ label = "SOUTH";
+ linux,code = <BTN_SOUTH>;
+ };
+
+ button-down {
+ gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>;
+ label = "DPAD-DOWN";
+ linux,code = <BTN_DPAD_DOWN>;
+ };
+
+ button-l1 {
+ gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
+ label = "TL";
+ linux,code = <BTN_TL>;
+ };
+
+ button-l2 {
+ gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>;
+ label = "TL2";
+ linux,code = <BTN_TL2>;
+ };
+
+ button-left {
+ gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
+ label = "DPAD-LEFT";
+ linux,code = <BTN_DPAD_LEFT>;
+ };
+
+ button-right {
+ gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_LOW>;
+ label = "DPAD-RIGHT";
+ linux,code = <BTN_DPAD_RIGHT>;
+ };
+
+ button-select {
+ gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
+ label = "SELECT";
+ linux,code = <BTN_SELECT>;
+ };
+
+ button-start {
+ gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "START";
+ linux,code = <BTN_START>;
+ };
+
+ button-thumbl {
+ gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "THUMBL";
+ linux,code = <BTN_THUMBL>;
+ };
+
+ button-thumbr {
+ gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
+ label = "THUMBR";
+ linux,code = <BTN_THUMBR>;
+ };
+
+ button-r1 {
+ gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
+ label = "TR";
+ linux,code = <BTN_TR>;
+ };
+
+ button-r2 {
+ gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>;
+ label = "TR2";
+ linux,code = <BTN_TR2>;
+ };
+
+ button-up {
+ gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
+ label = "DPAD-UP";
+ linux,code = <BTN_DPAD_UP>;
+ };
+
+ button-x {
+ gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
+ label = "NORTH";
+ linux,code = <BTN_NORTH>;
+ };
+
+ button-y {
+ gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>;
+ label = "WEST";
+ linux,code = <BTN_WEST>;
+ };
+ };
+
+ gpio_keys_vol: gpio-keys-vol {
+ compatible = "gpio-keys";
+ autorepeat;
+ pinctrl-0 = <&btn_pins_vol>;
+ pinctrl-names = "default";
+
+ button-voldown {
+ gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEDOWN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+
+ button-volup {
+ gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "VOLUMEUP";
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ gpio_leds: gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins>;
+
+ red_led: led-0 {
+ color = <LED_COLOR_ID_RED>;
+ default-state = "off";
+ gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_STATUS;
+ };
+
+ green_led: led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ default-state = "on";
+ gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_POWER;
+ };
+
+ amber_led: led-2 {
+ color = <LED_COLOR_ID_AMBER>;
+ gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_CHARGING;
+ };
+
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ ddc-i2c-bus = <&i2c5>;
+ type = "c";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rk817 1>;
+ clock-names = "ext_clock";
+ pinctrl-0 = <&wifi_enable_h>;
+ pinctrl-names = "default";
+ post-power-on-delay-ms = <200>;
+ reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>;
+ };
+
+ /* Channels reversed for both headphones and speakers. */
+ sound {
+ compatible = "simple-audio-card";
+ pinctrl-0 = <&hp_det>;
+ pinctrl-names = "default";
+ simple-audio-card,name = "rk817_ext";
+ simple-audio-card,aux-devs = <&spk_amp>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Headphone", "Headphones",
+ "Speaker", "Internal Speakers";
+ simple-audio-card,routing =
+ "MICL", "Mic Jack",
+ "Headphones", "HPOL",
+ "Headphones", "HPOR",
+ "Internal Speakers", "Speaker Amp OUTL",
+ "Internal Speakers", "Speaker Amp OUTR",
+ "Speaker Amp INL", "HPOL",
+ "Speaker Amp INR", "HPOR";
+ simple-audio-card,pin-switches = "Internal Speakers";
+
+ simple-audio-card,codec {
+ sound-dai = <&rk817>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+ };
+
+ spk_amp: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&spk_amp_enable_h>;
+ pinctrl-names = "default";
+ sound-name-prefix = "Speaker Amp";
+ };
+
+ vcc5v0_host: regulator-vcc5v0-host {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&vcc5v0_host_en>;
+ pinctrl-names = "default";
+ regulator-name = "vcc5v0_host";
+ vin-supply = <&dcdc_boost>;
+ };
+
+ vcc_lcd: regulator-vcc-lcd {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&vcc_lcd_en>;
+ pinctrl-names = "default";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_lcd";
+ };
+
+ vcc_sys: regulator-vcc-sys {
+ compatible = "regulator-fixed";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ regulator-name = "vcc_sys";
+ };
+
+ vcc_wifi: regulator-vcc-wifi {
+ compatible = "regulator-fixed";
+ gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
+ pinctrl-0 = <&vcc_wifi_h>;
+ pinctrl-names = "default";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_wifi";
+ };
+};
+
+&combphy1 {
+ status = "okay";
+};
+
+&cru {
+ assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
+ <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
+ assigned-clock-rates = <32768>, <1200000000>,
+ <200000000>, <126400000>;
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&dsi_dphy0 {
+ status = "okay";
+};
+
+&dsi0 {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ dsi0_in: port@0 {
+ reg = <0>;
+ dsi0_in_vp1: endpoint {
+ remote-endpoint = <&vp1_out_dsi0>;
+ };
+ };
+
+ dsi0_out: port@1 {
+ reg = <1>;
+ mipi_out_panel: endpoint {
+ remote-endpoint = <&mipi_in_panel>;
+ };
+ };
+ };
+
+ panel: panel@0 {
+ compatible = "powkiddy,x55-panel", "himax,hx8394";
+ reg = <0>;
+ backlight = <&backlight>;
+ iovcc-supply = <&vcc_lcd>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd_rst>;
+ reset-gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
+ rotation = <270>;
+ vcc-supply = <&vcc_lcd>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+};
+
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
+&hdmi {
+ ddc-i2c-bus = <&i2c5>;
+ pinctrl-0 = <&hdmitxm0_cec>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&hdmi_in {
+ hdmi_in_vp0: endpoint {
+ remote-endpoint = <&vp0_out_hdmi>;
+ };
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&hdmi_sound {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ rk817: pmic@20 {
+ compatible = "rockchip,rk817";
+ reg = <0x20>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
+ clock-names = "mclk";
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
+ wakeup-source;
+ #clock-cells = <1>;
+ #sound-dai-cells = <0>;
+
+ vcc1-supply = <&vcc_sys>;
+ vcc2-supply = <&vcc_sys>;
+ vcc3-supply = <&vcc_sys>;
+ vcc4-supply = <&vcc_sys>;
+ vcc5-supply = <&vcc_sys>;
+ vcc6-supply = <&vcc_sys>;
+ vcc7-supply = <&vcc_sys>;
+ vcc8-supply = <&vcc_sys>;
+ vcc9-supply = <&dcdc_boost>;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_logic";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_gpu";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_ddr";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_3v3: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_3v3";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca1v8_pmu: LDO_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca1v8_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda_0v9";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda0v9_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vccio_acodec";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vccio_sd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_1v8: LDO_REG7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc1v8_dvp: LDO_REG8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc1v8_dvp";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc2v8_dvp: LDO_REG9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc2v8_dvp";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ dcdc_boost: BOOST {
+ regulator-min-microvolt = <4700000>;
+ regulator-max-microvolt = <5400000>;
+ regulator-name = "boost";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ otg_switch: OTG_SWITCH {
+ regulator-name = "otg_switch";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+
+ rk817_charger: charger {
+ monitored-battery = <&battery>;
+ rockchip,resistor-sense-micro-ohms = <10000>;
+ rockchip,sleep-enter-current-microamp = <150000>;
+ rockchip,sleep-filter-current-microamp = <100000>;
+ };
+
+ };
+
+ vdd_cpu: regulator@1c {
+ compatible = "tcs,tcs4525";
+ reg = <0x1c>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1390000>;
+ regulator-name = "vdd_cpu";
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc_sys>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c5 {
+ pinctrl-0 = <&i2c5m1_xfer>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&i2s1_8ch {
+ pinctrl-0 = <&i2s1m0_sclktx>, <&i2s1m0_lrcktx>, <&i2s1m0_sdi0>,
+ <&i2s1m0_sdo0>;
+ pinctrl-names = "default";
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
+&pinctrl {
+ audio-amplifier {
+ spk_amp_enable_h: spk-amp-enable-h {
+ rockchip,pins =
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ gpio-control {
+ btn_pins_ctrl: btn-pins-ctrl {
+ rockchip,pins =
+ <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ btn_pins_vol: btn-pins-vol {
+ rockchip,pins =
+ <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
+ <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ gpio-lcd {
+ lcd_rst: lcd-rst {
+ rockchip,pins =
+ <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ gpio-leds {
+ led_pins: led-pins {
+ rockchip,pins =
+ <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
+ <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
+ <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ hp-detect {
+ hp_det: hp-det {
+ rockchip,pins =
+ <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins =
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ sdio-pwrseq {
+ wifi_enable_h: wifi-enable-h {
+ rockchip,pins =
+ <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins =
+ <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ vcc5v0_otg_en: vcc5v0-otg-en {
+ rockchip,pins =
+ <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ vcc-lcd {
+ vcc_lcd_en: vcc-lcd-en {
+ rockchip,pins =
+ <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ vcc-wifi {
+ vcc_wifi_h: vcc-wifi-h {
+ rockchip,pins =
+ <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ status = "okay";
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcca1v8_pmu>;
+ vccio1-supply = <&vccio_acodec>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcca1v8_pmu>;
+ vccio5-supply = <&vcc2v8_dvp>;
+ vccio6-supply = <&vcc1v8_dvp>;
+ vccio7-supply = <&vcc_3v3>;
+};
+
+&pwm4 {
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ mmc-hs200-1_8v;
+ non-removable;
+ pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>,
+ <&emmc_datastrobe>, <&emmc_rstnout>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ pinctrl-0 = <&sdmmc0_bus4>, <&sdmmc0_clk>, <&sdmmc0_cmd>,
+ <&sdmmc0_det>;
+ pinctrl-names = "default";
+ sd-uhs-sdr104;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&sdmmc1 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ non-removable;
+ pinctrl-0 = <&sdmmc1_bus4>, <&sdmmc1_cmd>, <&sdmmc1_clk>;
+ pinctrl-names = "default";
+ vmmc-supply = <&vcc_wifi>;
+ status = "okay";
+};
+
+&sdmmc2 {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ pinctrl-0 = <&sdmmc2m1_bus4>, <&sdmmc2m1_cmd>, <&sdmmc2m1_clk>,
+ <&sdmmc2m1_det>;
+ pinctrl-names = "default";
+ sd-uhs-sdr104;
+ vqmmc-supply = <&vcc2v8_dvp>;
+ status = "okay";
+};
+
+&tsadc {
+ rockchip,hw-tshut-mode = <1>;
+ rockchip,hw-tshut-polarity = <0>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-0 = <&uart1m0_xfer>, <&uart1m0_ctsn>, <&uart1m0_rtsn>;
+ pinctrl-names = "default";
+ uart-has-rtscts;
+ status = "okay";
+
+ bluetooth {
+ compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt";
+ device-wake-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
+ host-wake-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ phys = <&usb2phy0_otg>;
+ phy-names = "usb2-phy";
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
+
+&vp1 {
+ vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
+ reg = <ROCKCHIP_VOP2_EP_MIPI0>;
+ remote-endpoint = <&dsi0_in_vp1>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-quartz64-a.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-quartz64-a.dts
index 854d02b46e6f..59843a7a199c 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-quartz64-a.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-quartz64-a.dts
@@ -31,8 +31,9 @@
fan: gpio_fan {
compatible = "gpio-fan";
gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = <0 0
- 4500 1>;
+ gpio-fan,speed-map =
+ < 0 0>,
+ <4500 1>;
pinctrl-names = "default";
pinctrl-0 = <&fan_en_h>;
#cooling-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-radxa-cm3-io.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-radxa-cm3-io.dts
index 1b1c67d5b1ef..3ae24e39450a 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-radxa-cm3-io.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-radxa-cm3-io.dts
@@ -14,6 +14,7 @@
compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
aliases {
+ ethernet0 = &gmac1;
mmc1 = &sdmmc0;
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-roc-pc.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-roc-pc.dts
index 938092fce186..63eea27293fe 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-roc-pc.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-roc-pc.dts
@@ -12,6 +12,7 @@
compatible = "firefly,rk3566-roc-pc", "rockchip,rk3566";
aliases {
+ ethernet0 = &gmac1;
mmc0 = &sdmmc0;
mmc1 = &sdhci;
mmc2 = &sdmmc1;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-blade.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-blade.dts
index 4e49bebf548b..fdbf1c783242 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-blade.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-blade.dts
@@ -13,6 +13,10 @@
model = "PINE64 RK3566 SOQuartz on Blade carrier board";
compatible = "pine64,soquartz-blade", "pine64,soquartz", "rockchip,rk3566";
+ aliases {
+ ethernet0 = &gmac1;
+ };
+
/* labeled VCC3V0_SD in schematic to not conflict with PMIC regulator */
vcc3v0_sd: vcc3v0-sd-regulator {
compatible = "regulator-fixed";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-cm4.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-cm4.dts
index cddf6cd2fecb..6ed3fa4aee34 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-cm4.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-cm4.dts
@@ -8,6 +8,10 @@
model = "Pine64 RK3566 SoQuartz with CM4-IO Carrier Board";
compatible = "pine64,soquartz-cm4io", "pine64,soquartz", "rockchip,rk3566";
+ aliases {
+ ethernet0 = &gmac1;
+ };
+
/* labeled +12v in schematic */
vcc12v_dcin: vcc12v-dcin-regulator {
compatible = "regulator-fixed";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-model-a.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-model-a.dts
index 2208dbfb7f0a..f2095dfa4eaf 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-model-a.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz-model-a.dts
@@ -8,6 +8,10 @@
model = "PINE64 RK3566 SOQuartz on Model A carrier board";
compatible = "pine64,soquartz-model-a", "pine64,soquartz", "rockchip,rk3566";
+ aliases {
+ ethernet0 = &gmac1;
+ };
+
/* labeled DCIN_12V in schematic */
vcc12v_dcin: vcc12v-dcin-regulator {
compatible = "regulator-fixed";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz.dtsi
index 63bae36b8f7e..bfb7b952f4c5 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3566-soquartz.dtsi
@@ -12,7 +12,6 @@
compatible = "pine64,soquartz", "rockchip,rk3566";
aliases {
- ethernet0 = &gmac1;
mmc0 = &sdmmc0;
mmc1 = &sdhci;
mmc2 = &sdmmc1;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3568-radxa-e25.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3568-radxa-e25.dts
index 63c4bd873188..72ad74c38a2b 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3568-radxa-e25.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3568-radxa-e25.dts
@@ -47,6 +47,9 @@
vin-supply = <&vcc5v0_sys>;
};
+ /* actually fed by vcc5v0_sys, dependent
+ * on pi6c clock generator
+ */
vcc3v3_minipcie: vcc3v3-minipcie-regulator {
compatible = "regulator-fixed";
enable-active-high;
@@ -54,9 +57,9 @@
pinctrl-names = "default";
pinctrl-0 = <&minipcie_enable_h>;
regulator-name = "vcc3v3_minipcie";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- vin-supply = <&vcc5v0_sys>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc3v3_pi6c_05>;
};
vcc3v3_ngff: vcc3v3-ngff-regulator {
@@ -71,9 +74,6 @@
vin-supply = <&vcc5v0_sys>;
};
- /* actually fed by vcc5v0_sys, dependent
- * on pi6c clock generator
- */
vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
compatible = "regulator-fixed";
enable-active-high;
@@ -83,7 +83,7 @@
regulator-name = "vcc3v3_pcie30x1";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- vin-supply = <&vcc3v3_pi6c_05>;
+ vin-supply = <&vcc5v0_sys>;
};
vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
@@ -99,6 +99,10 @@
};
};
+&combphy1 {
+ phy-supply = <&vcc3v3_pcie30x1>;
+};
+
&pcie2x1 {
pinctrl-names = "default";
pinctrl-0 = <&pcie20_reset_h>;
@@ -117,7 +121,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pcie30x1m0_pins>;
reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
- vpcie3v3-supply = <&vcc3v3_pcie30x1>;
+ vpcie3v3-supply = <&vcc3v3_minipcie>;
status = "okay";
};
@@ -178,6 +182,10 @@
status = "okay";
};
+&sata1 {
+ status = "okay";
+};
+
&sdmmc0 {
bus-width = <4>;
cap-sd-highspeed;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3568-roc-pc.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3568-roc-pc.dts
new file mode 100644
index 000000000000..e333449ead04
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3568-roc-pc.dts
@@ -0,0 +1,643 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+#include "rk3568.dtsi"
+
+/ {
+ model = "Firefly Station P2";
+ compatible = "firefly,rk3568-roc-pc", "rockchip,rk3568";
+
+ aliases {
+ ethernet0 = &gmac0;
+ ethernet1 = &gmac1;
+ mmc0 = &sdmmc0;
+ mmc1 = &sdhci;
+ };
+
+ chosen: chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ dc_12v: dc-12v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "dc_12v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ gmac0_clkin: external-gmac0-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "gmac0_clkin";
+ #clock-cells = <0>;
+ };
+
+ gmac1_clkin: external-gmac1-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "gmac1_clkin";
+ #clock-cells = <0>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-user {
+ label = "user-led";
+ default-state = "on";
+ gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ pinctrl-names = "default";
+ pinctrl-0 = <&user_led_enable_h>;
+ retain-state-suspended;
+ };
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ pcie30_avdd0v9: pcie30-avdd0v9-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie30_avdd0v9";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ vin-supply = <&vcc3v3_sys>;
+ };
+
+ pcie30_avdd1v8: pcie30-avdd1v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie30_avdd1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc3v3_sys>;
+ };
+
+ vcc3v3_sys: vcc3v3-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie";
+ enable-active-high;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie_en_pin>;
+ gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vcc5v0_usb: vcc5v0-usb-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_host";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ regulator-always-on;
+ vin-supply = <&vcc5v0_usb>;
+ };
+
+ vcc5v0_otg: vcc5v0-otg-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_otg";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_otg_en>;
+ vin-supply = <&vcc5v0_usb>;
+ };
+};
+
+&combphy0 {
+ /* used for USB3 */
+ status = "okay";
+};
+
+&combphy1 {
+ /* used for USB3 */
+ status = "okay";
+};
+
+&combphy2 {
+ /* used for SATA */
+ status = "okay";
+};
+
+&gmac0 {
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&gmac0_clkin>;
+ clock_in_out = "input";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac0_miim
+ &gmac0_tx_bus2
+ &gmac0_rx_bus2
+ &gmac0_rgmii_clk
+ &gmac0_rgmii_bus
+ &gmac0_clkinout>;
+ phy-handle = <&rgmii_phy0>;
+ phy-mode = "rgmii";
+ snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ /* Reset time is 20ms, 100ms for rtl8211f */
+ snps,reset-delays-us = <0 20000 100000>;
+ tx_delay = <0x3c>;
+ rx_delay = <0x2f>;
+ status = "okay";
+};
+
+&gmac1 {
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
+ clock_in_out = "input";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac1m1_miim
+ &gmac1m1_tx_bus2
+ &gmac1m1_rx_bus2
+ &gmac1m1_rgmii_clk
+ &gmac1m1_rgmii_bus
+ &gmac1m1_clkinout>;
+ phy-handle = <&rgmii_phy1>;
+ phy-mode = "rgmii";
+ snps,reset-gpio = <&gpio2 RK_PD1 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ /* Reset time is 20ms, 100ms for rtl8211f */
+ snps,reset-delays-us = <0 20000 100000>;
+ tx_delay = <0x4f>;
+ rx_delay = <0x26>;
+ status = "okay";
+};
+
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
+&hdmi {
+ avdd-0v9-supply = <&vdda0v9_image>;
+ avdd-1v8-supply = <&vcca1v8_image>;
+ status = "okay";
+};
+
+&hdmi_in {
+ hdmi_in_vp0: endpoint {
+ remote-endpoint = <&vp0_out_hdmi>;
+ };
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&hdmi_sound {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ rk809: pmic@20 {
+ compatible = "rockchip,rk809";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int>;
+ rockchip,system-power-controller;
+ vcc1-supply = <&vcc3v3_sys>;
+ vcc2-supply = <&vcc3v3_sys>;
+ vcc3-supply = <&vcc3v3_sys>;
+ vcc4-supply = <&vcc3v3_sys>;
+ vcc5-supply = <&vcc3v3_sys>;
+ vcc6-supply = <&vcc3v3_sys>;
+ vcc7-supply = <&vcc3v3_sys>;
+ vcc8-supply = <&vcc3v3_sys>;
+ vcc9-supply = <&vcc3v3_sys>;
+ wakeup-source;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-name = "vdd_logic";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-init-microvolt = <900000>;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-name = "vdd_gpu";
+ regulator-init-microvolt = <900000>;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-name = "vcc_ddr";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vdd_npu: DCDC_REG4 {
+ regulator-name = "vdd_npu";
+ regulator-init-microvolt = <900000>;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8: DCDC_REG5 {
+ regulator-name = "vcc_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_image: LDO_REG1 {
+ regulator-name = "vdda0v9_image";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-name = "vdda_0v9";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-name = "vdda0v9_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-name = "vccio_acodec";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-name = "vccio_sd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-name = "vcc3v3_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca_1v8: LDO_REG7 {
+ regulator-name = "vcca_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca1v8_pmu: LDO_REG8 {
+ regulator-name = "vcca1v8_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca1v8_image: LDO_REG9 {
+ regulator-name = "vcca1v8_image";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3: SWITCH_REG1 {
+ regulator-name = "vcc_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_sd: SWITCH_REG2 {
+ regulator-name = "vcc3v3_sd";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&mdio0 {
+ rgmii_phy0: phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0>;
+ };
+};
+
+&mdio1 {
+ rgmii_phy1: phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0>;
+ };
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_reset_pin>;
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie>;
+ status = "okay";
+};
+
+&pinctrl {
+ leds {
+ user_led_enable_h: user-led-enable-h {
+ rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc5v0_otg_en: vcc5v0-otg-en {
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pcie {
+ pcie_reset_pin: pcie-reset-pin {
+ rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
+ rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int: pmic-int {
+ rockchip,pins =
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcc3v3_pmu>;
+ vccio1-supply = <&vccio_acodec>;
+ vccio2-supply = <&vcc_1v8>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcc_1v8>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_1v8>;
+ vccio7-supply = <&vcc_3v3>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcca_1v8>;
+ status = "okay";
+};
+
+&sata2 {
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
+ status = "okay";
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc3v3_sd>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy1 {
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ status = "okay";
+};
+
+&usb2phy1_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&usb2phy1_otg {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3568-rock-3a.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3568-rock-3a.dts
index e05ab11981f5..a5e974ea659e 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3568-rock-3a.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3568-rock-3a.dts
@@ -15,6 +15,7 @@
ethernet0 = &gmac1;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
+ mmc2 = &sdmmc2;
};
chosen: chosen {
@@ -747,6 +748,9 @@
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sys>;
vqmmc-supply = <&vcc_1v8>;
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk356x.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk356x.dtsi
index abee88911982..c19c0f1b3778 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk356x.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk356x.dtsi
@@ -959,6 +959,13 @@
reg = <0x0 0xfe1a8100 0x0 0x20>;
};
+ dfi: dfi@fe230000 {
+ compatible = "rockchip,rk3568-dfi";
+ reg = <0x00 0xfe230000 0x00 0x400>;
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+ rockchip,pmu = <&pmugrf>;
+ };
+
pcie2x1: pcie@fe260000 {
compatible = "rockchip,rk3568-pcie";
reg = <0x3 0xc0000000 0x0 0x00400000>,
@@ -970,7 +977,7 @@
<GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "sys", "pmc", "msi", "legacy", "err";
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
bus-range = <0x0 0xf>;
clocks = <&cru ACLK_PCIE20_MST>, <&cru ACLK_PCIE20_SLV>,
<&cru ACLK_PCIE20_DBI>, <&cru PCLK_PCIE20>,
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts
new file mode 100644
index 000000000000..a4946cdc3bb3
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+#include "rk3588-coolpi-cm5.dtsi"
+
+/ {
+ model = "RK3588 CoolPi CM5 EVB";
+ compatible = "coolpi,pi-cm5-evb", "coolpi,pi-cm5", "rockchip,rk3588";
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ enable-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bl_en>;
+ power-supply = <&vcc12v_dcin>;
+ pwms = <&pwm2 0 25000 0>;
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ green_led: led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ vcc12v_dcin: vcc12v-dcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc3v3_sys: vcc3v3-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc3v3_lcd: vcc3v3-lcd-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_lcd";
+ enable-active-high;
+ gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcdpwr_en>;
+ vin-supply = <&vcc3v3_sys>;
+ };
+
+ vcc5v0_usb_host1: vcc5v0_usb_host2: vcc5v0-usb-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_host";
+ regulator-boot-on;
+ regulator-always-on;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_host_pwren>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb30_otg: vcc5v0-usb30-otg-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_otg";
+ regulator-boot-on;
+ regulator-always-on;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_otg_pwren>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+/* M.2 E-Key */
+&pcie2x1l1 {
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_sys>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_clkreq &pcie_wake &pcie_rst &wifi_pwron &bt_pwron>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+/* Standard pcie */
+&pcie3x2 {
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_sys>;
+ status = "okay";
+};
+
+/* M.2 M-Key ssd */
+&pcie3x4 {
+ num-lanes = <2>;
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_sys>;
+ status = "okay";
+};
+
+&pinctrl {
+ lcd {
+ lcdpwr_en: lcdpwr-en {
+ rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+
+ bl_en: bl-en {
+ rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ usb_host_pwren: usb-host-pwren {
+ rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ usb_otg_pwren: usb-otg-pwren {
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ wifi {
+ bt_pwron: bt-pwron {
+ rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ pcie_clkreq: pcie-clkreq {
+ rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ pcie_rst: pcie-rst {
+ rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ wifi_pwron: wifi-pwron {
+ rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ pcie_wake: pcie-wake {
+ rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&pwm2 {
+ status = "okay";
+};
+
+&sata1 {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_usb_host1>;
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_usb_host2>;
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi
new file mode 100644
index 000000000000..cce1c8e83587
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5.dtsi
@@ -0,0 +1,650 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3588.dtsi"
+
+/ {
+ compatible = "coolpi,pi-cm5", "rockchip,rk3588";
+
+ aliases {
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ mmc2 = &sdio;
+ serial2 = &uart2;
+ };
+
+ analog-sound {
+ compatible = "audio-graph-card";
+ dais = <&i2s0_8ch_p0>;
+ label = "rk3588-es8316";
+ routing = "MIC2", "Mic Jack",
+ "Headphones", "HPOL",
+ "Headphones", "HPOR";
+ widgets = "Microphone", "Mic Jack",
+ "Headphone", "Headphones";
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ avdd0v85_pcie20: avdd0v85-pcie20-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd0v85_pcie20";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ vin-supply = <&vdd_0v85_s0>;
+ };
+
+ avdd1v8_pcie20: avdd1v8-pcie20-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd1v8_pcie20";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&avcc_1v8_s0>;
+ };
+
+ avdd0v75_pcie30: avdd0v75-pcie30-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd0v75_pcie30";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ vin-supply = <&avdd_0v75_s0>;
+ };
+
+ pcie30_avdd1v8: avdd1v8-pcie30-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie30_avdd1v8";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&avcc_1v8_s0>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy1_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&gmac0 {
+ clock_in_out = "output";
+ phy-handle = <&rgmii_phy>;
+ phy-mode = "rgmii-rxid";
+ pinctrl-0 = <&gmac0_miim
+ &gmac0_tx_bus2
+ &gmac0_rx_bus2
+ &gmac0_rgmii_clk
+ &gmac0_rgmii_bus>;
+ pinctrl-names = "default";
+ rx_delay = <0x00>;
+ tx_delay = <0x43>;
+ status = "okay";
+};
+
+&i2c0 {
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c6 {
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ wakeup-source;
+ };
+};
+
+&i2c7 {
+ pinctrl-0 = <&i2c7m0_xfer>;
+ status = "okay";
+
+ es8316: audio-codec@11 {
+ compatible = "everest,es8316";
+ reg = <0x11>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
+
+ port {
+ es8316_p0_0: endpoint {
+ remote-endpoint = <&i2s0_8ch_p0_0>;
+ };
+ };
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+
+ i2s0_8ch_p0: port {
+ i2s0_8ch_p0_0: endpoint {
+ dai-format = "i2s";
+ mclk-fs = <256>;
+ remote-endpoint = <&es8316_p0_0>;
+ };
+ };
+};
+
+&mdio0 {
+ rgmii_phy: ethernet-phy@1 {
+ /* YT8531C/H */
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&yt8531_rst>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
+ };
+};
+
+/* ethernet */
+&pcie2x1l2 {
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_sys>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&yt6801_isolate>;
+ status = "okay";
+};
+
+&pinctrl {
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ yt6801 {
+ yt6801_isolate: yt6801-isolate {
+ rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ yt8531 {
+ yt8531_rst: yt8531-rst {
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8_s0>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ no-sdio;
+ no-sd;
+ non-removable;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ status = "okay";
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_2v0_pldo_s3>;
+ vcc14-supply = <&vcc_2v0_pldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_gpu_s0";
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_cpu_lit_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_log_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_vdenc_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_ddr_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vdd2_ddr_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_2v0_pldo_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_3v3_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vddq_ddr_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "avcc_1v8_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "avdd_1v2_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vcc_3v3_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vccio_sd_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "pldo6_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "vdd_0v75_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-name = "vdd_ddr_pll_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "avdd_0v75_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-name = "vdd_0v85_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "vdd_0v75_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dts
index b51543892078..be6a4f4f90f6 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a-io.dts
@@ -12,10 +12,6 @@
compatible = "edgeble,neural-compute-module-6a-io",
"edgeble,neural-compute-module-6a", "rockchip,rk3588";
- aliases {
- serial2 = &uart2;
- };
-
chosen {
stdout-path = "serial2:1500000n8";
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a.dtsi
index 38e1a1e25f33..727580aaa105 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6a.dtsi
@@ -25,7 +25,6 @@
no-sdio;
no-sd;
non-removable;
- max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b-io.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b-io.dts
index e9d5a8bab581..070baeb63431 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b-io.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b-io.dts
@@ -9,19 +9,81 @@
/ {
model = "Edgeble Neu6B IO Board";
- compatible = "edgeble,neural-compute-module-6b-io",
+ compatible = "edgeble,neural-compute-module-6a-io",
"edgeble,neural-compute-module-6b", "rockchip,rk3588";
- aliases {
- serial2 = &uart2;
- };
-
chosen {
stdout-path = "serial2:1500000n8";
};
};
+&combphy0_ps {
+ status = "okay";
+};
+
+&i2c6 {
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ wakeup-source;
+ };
+};
+
+&pinctrl {
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+/* FAN */
+&pwm2 {
+ pinctrl-0 = <&pwm2m1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&sata0 {
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
&uart2 {
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};
+
+/* RS232 */
+&uart6 {
+ pinctrl-0 = <&uart6m0_xfer>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+/* RS485 */
+&uart7 {
+ pinctrl-0 = <&uart7m2_xfer>;
+ pinctrl-names = "default";
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b.dtsi
index 1c5bcf1280b4..017559bba37f 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-edgeble-neu6b.dtsi
@@ -18,6 +18,42 @@
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
};
&sdhci {
@@ -25,8 +61,329 @@
no-sdio;
no-sd;
non-removable;
- max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "okay";
};
+
+&spi2 {
+ status = "okay";
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ spi-max-frequency = <1000000>;
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-init-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-name = "avcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-name = "avdd_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-name = "avdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-name = "vdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-evb1-v10.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-evb1-v10.dts
index 4b2d857ee219..de30c2632b8e 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-evb1-v10.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-evb1-v10.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588.dtsi"
@@ -15,20 +16,149 @@
compatible = "rockchip,rk3588-evb1-v10", "rockchip,rk3588";
aliases {
+ ethernet0 = &gmac0;
mmc0 = &sdhci;
- serial2 = &uart2;
};
chosen {
stdout-path = "serial2:1500000n8";
};
+ adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-vol-up {
+ label = "Volume Up";
+ linux,code = <KEY_VOLUMEUP>;
+ press-threshold-microvolt = <17000>;
+ };
+
+ button-vol-down {
+ label = "Volume Down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ press-threshold-microvolt = <417000>;
+ };
+
+ button-menu {
+ label = "Menu";
+ linux,code = <KEY_MENU>;
+ press-threshold-microvolt = <890000>;
+ };
+
+ button-escape {
+ label = "Escape";
+ linux,code = <KEY_ESC>;
+ press-threshold-microvolt = <1235000>;
+ };
+ };
+
+ analog-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_detect>;
+ simple-audio-card,name = "RK3588 EVB1 Audio";
+ simple-audio-card,aux-devs = <&amp_headphone>, <&amp_speaker>;
+ simple-audio-card,bitclock-master = <&masterdai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&masterdai>;
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,pin-switches = "Headphones", "Speaker";
+ simple-audio-card,routing =
+ "Speaker Amplifier INL", "LOUT2",
+ "Speaker Amplifier INR", "ROUT2",
+ "Speaker", "Speaker Amplifier OUTL",
+ "Speaker", "Speaker Amplifier OUTR",
+ "Headphones Amplifier INL", "LOUT1",
+ "Headphones Amplifier INR", "ROUT1",
+ "Headphones", "Headphones Amplifier OUTL",
+ "Headphones", "Headphones Amplifier OUTR",
+ "LINPUT1", "Onboard Microphone",
+ "RINPUT1", "Onboard Microphone",
+ "LINPUT2", "Microphone Jack",
+ "RINPUT2", "Microphone Jack";
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Microphone", "Onboard Microphone",
+ "Headphone", "Headphones",
+ "Speaker", "Speaker";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s0_8ch>;
+ };
+
+ masterdai: simple-audio-card,codec {
+ sound-dai = <&es8388>;
+ system-clock-frequency = <12288000>;
+ };
+ };
+
+ amp_headphone: headphone-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&headphone_amplifier_en>;
+ sound-name-prefix = "Headphones Amplifier";
+ };
+
+ amp_speaker: speaker-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&speaker_amplifier_en>;
+ sound-name-prefix = "Speaker Amplifier";
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
power-supply = <&vcc12v_dcin>;
pwms = <&pwm2 0 25000 0>;
};
+ pcie20_avdd0v85: pcie20-avdd0v85-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie20_avdd0v85";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ vin-supply = <&avdd_0v85_s0>;
+ };
+
+ pcie20_avdd1v8: pcie20-avdd1v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie20_avdd1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&avcc_1v8_s0>;
+ };
+
+ pcie30_avdd0v75: pcie30-avdd0v75-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie30_avdd0v75";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ vin-supply = <&avdd_0v75_s0>;
+ };
+
+ pcie30_avdd1v8: pcie30-avdd1v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie30_avdd1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&avcc_1v8_s0>;
+ };
+
vcc12v_dcin: vcc12v-dcin-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
@@ -38,6 +168,33 @@
regulator-max-microvolt = <12000000>;
};
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ enable-active-high;
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc12v_dcin>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie30_en>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_host";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ vin-supply = <&vcc5v0_usb>;
+ };
+
vcc5v0_sys: vcc5v0-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
@@ -47,6 +204,34 @@
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
};
+
+ vcc5v0_usbdcin: vcc5v0-usbdcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usbdcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc5v0_usb: vcc5v0-usb-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_usbdcin>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
};
&cpu_b0 {
@@ -112,6 +297,32 @@
};
};
+&i2c7 {
+ status = "okay";
+
+ es8388: audio-codec@11 {
+ compatible = "everest,es8388";
+ reg = <0x11>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ AVDD-supply = <&avcc_1v8_codec_s0>;
+ DVDD-supply = <&avcc_1v8_codec_s0>;
+ HPVDD-supply = <&vcc_3v3_s0>;
+ PVDD-supply = <&vcc_3v3_s0>;
+ #sound-dai-cells = <0>;
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+};
+
&mdio0 {
rgmii_phy: ethernet-phy@1 {
/* RTL8211F */
@@ -125,7 +336,46 @@
};
};
+&pcie2x1l1 {
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_1_rst>, <&rtl8111_isolate>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie3_reset>;
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
&pinctrl {
+ audio {
+ hp_detect: headphone-detect {
+ rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ headphone_amplifier_en: headphone-amplifier-en {
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ speaker_amplifier_en: speaker-amplifier-en {
+ rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ rtl8111 {
+ rtl8111_isolate: rtl8111-isolate {
+ rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
rtl8211f {
rtl8211f_rst: rtl8211f-rst {
rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -138,18 +388,44 @@
rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
+ pcie2 {
+ pcie2_1_rst: pcie2-1-rst {
+ rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pcie3 {
+ pcie3_reset: pcie3-reset {
+ rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc3v3_pcie30_en: vcc3v3-pcie30-en {
+ rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pwm2 {
status = "okay";
};
+&saradc {
+ vref-supply = <&vcc_1v8_s0>;
+ status = "okay";
+};
+
&sdhci {
bus-width = <8>;
no-sdio;
no-sd;
non-removable;
- max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "okay";
@@ -172,6 +448,7 @@
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
pinctrl-names = "default";
spi-max-frequency = <1000000>;
+ system-power-controller;
vcc1-supply = <&vcc5v0_sys>;
vcc2-supply = <&vcc5v0_sys>;
@@ -760,7 +1037,45 @@
};
};
+&sata0 {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
&uart2 {
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-jaguar.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-jaguar.dts
new file mode 100644
index 000000000000..39d65002add1
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-jaguar.dts
@@ -0,0 +1,802 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Theobroma Systems Design und Consulting GmbH
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/usb/pd.h>
+#include "rk3588.dtsi"
+
+/ {
+ model = "Theobroma Systems RK3588-SBC Jaguar";
+ compatible = "tsd,rk3588-jaguar", "rockchip,rk3588";
+
+ adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 0>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ /* Can be controlled through SW2 but also GPIO1 on CP2102 on P20 */
+ button-bios-disable {
+ label = "BIOS_DISABLE";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <0>;
+ };
+ };
+
+ aliases {
+ ethernet0 = &gmac0;
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ rtc0 = &rtc_twi;
+ };
+
+ chosen {
+ stdout-path = "serial2:115200n8";
+ };
+
+ /* DCIN is 12-24V but standard is 12V */
+ dc_12v: dc-12v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "dc_12v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ emmc_pwrseq: emmc-pwrseq {
+ compatible = "mmc-pwrseq-emmc";
+ pinctrl-0 = <&emmc_reset>;
+ pinctrl-names = "default";
+ reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led1_pin>;
+
+ /* LED1 on PCB */
+ led-1 {
+ gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_HEARTBEAT;
+ linux,default-trigger = "heartbeat";
+ color = <LED_COLOR_ID_AMBER>;
+ };
+ };
+
+ pps {
+ compatible = "pps-gpio";
+ gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
+ };
+
+ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc_1v2_s3: vcc-1v2-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v2_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ /* Exposed on P14 and P15 */
+ vcc_2v8_s3: vcc-2v8-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_2v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vcc_3v3_s3>;
+ };
+
+ vcc_5v0_usb_a: vcc-5v0-usb-a-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_a_vcc";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ gpio = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vcc_5v0_usb_c1: vcc-5v0-usb-c1-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "5v_usbc1";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_usb>;
+ gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vcc_5v0_usb_c2: vcc-5v0-usb-c2-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "5v_usbc2";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_usb>;
+ gpio = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vcc3v3_mdot2: vcc3v3-mdot2-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_mdot2";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vcc5v0_usb: vcc5v0-usb-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy1_ps {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&gmac0 {
+ clock_in_out = "output";
+ phy-handle = <&rgmii_phy>;
+ phy-mode = "rgmii";
+ phy-supply = <&vcc_1v2_s3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac0_miim
+ &gmac0_rx_bus2
+ &gmac0_tx_bus2
+ &gmac0_rgmii_clk
+ &gmac0_rgmii_bus
+ &eth0_pins
+ &eth_reset>;
+ tx_delay = <0x10>;
+ rx_delay = <0x10>;
+ snps,reset-gpio = <&gpio4 RK_PC3 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ snps,reset-delays-us = <0 10000 100000>;
+
+ status = "okay";
+};
+
+&gpio1 {
+ mdot2e-w-disable1-n-hog {
+ gpios = <RK_PB1 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "m.2 E-key W_DISABLE1#";
+ gpio-hog;
+ };
+};
+
+&gpio4 {
+ mdot2e-w-disable2-n-hog {
+ gpios = <RK_PC1 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "m.2 E-key W_DISABLE2#";
+ gpio-hog;
+ };
+};
+
+&i2c0 {
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ fan@18 {
+ compatible = "ti,amc6821";
+ reg = <0x18>;
+ };
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ rtc_twi: rtc@6f {
+ compatible = "isil,isl1208";
+ reg = <0x6f>;
+ };
+};
+
+&i2c1 {
+ pinctrl-0 = <&i2c1m4_xfer>;
+};
+
+&i2c6 {
+ pinctrl-0 = <&i2c6m4_xfer>;
+};
+
+&i2c7 {
+ status = "okay";
+
+ /* SE050 Secure Element at 0x48; GPIO1_A4 for enable pin */
+
+ /* Also on 0x55 */
+ eeprom@54 {
+ compatible = "st,24c04", "atmel,24c04";
+ reg = <0x54>;
+ pagesize = <16>;
+ vcc-supply = <&vcc_3v3_s3>;
+ };
+};
+
+&i2c8 {
+ pinctrl-0 = <&i2c8m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&mdio0 {
+ rgmii_phy: ethernet-phy@6 {
+ /* KSZ9031 or KSZ9131 */
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x6>;
+ clocks = <&cru REFCLKO25M_ETH0_OUT>;
+ };
+};
+
+&pcie2x1l0 {
+ reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; /* WIFI_PERST0# */
+ vpcie3v3-supply = <&vcc3v3_mdot2>;
+ status = "okay";
+};
+
+&pinctrl {
+ emmc {
+ emmc_reset: emmc-reset {
+ rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ ethernet {
+ eth_reset: eth-reset {
+ rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ led1_pin: led1-pin {
+ rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8_s0>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ mmc-pwrseq = <&emmc_pwrseq>;
+ no-sdio;
+ no-sd;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk &emmc_data_strobe>;
+ supports-cqe;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vcc_1v8_s3>;
+ status = "okay";
+};
+
+&sdmmc {
+ broken-cd;
+ bus-width = <4>;
+ cap-sd-highspeed;
+ disable-wp;
+ max-frequency = <150000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_cmd &sdmmc_clk>;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-ddr50;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ status = "okay";
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+ system-power-controller;
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: dcdc-reg1 {
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_gpu_s0";
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca_1v8_s0: pldo-reg1 {
+ regulator-name = "vcca_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdda_1v2_s0: pldo-reg3 {
+ regulator-name = "vdda_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca_3v3_s0: pldo-reg4 {
+ regulator-name = "vcca_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdda_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdda_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdda_0v75_s0: nldo-reg3 {
+ regulator-name = "vdda_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v85_s0: nldo-reg4 {
+ regulator-name = "vdda_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc_5v0_usb_a>;
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ status = "okay";
+};
+
+/* Mule-ATtiny debug UART; typically baudrate 9600 */
+&uart0 {
+ pinctrl-0 = <&uart0m0_xfer>;
+ status = "okay";
+};
+
+/* Main debug interface on P20 micro-USB B port and P21 header */
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+/* RS485 on P19 */
+&uart3 {
+ pinctrl-0 = <&uart3m2_xfer &uart3_rtsn>;
+ linux,rs485-enabled-at-boot-time;
+ status = "okay";
+};
+
+/* Mule-ATtiny UPDI flashing UART */
+&uart7 {
+ pinctrl-0 = <&uart7m0_xfer>;
+ status = "okay";
+};
+
+/* host0 on P10 USB-A */
+&usb_host0_ehci {
+ status = "okay";
+};
+
+/* host0 on P10 USB-A */
+&usb_host0_ohci {
+ status = "okay";
+};
+
+/* host1 on M.2 E-key */
+&usb_host1_ehci {
+ status = "okay";
+};
+
+/* host1 on M.2 E-key */
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-nanopc-t6.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-nanopc-t6.dts
new file mode 100644
index 000000000000..997b516c2533
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-nanopc-t6.dts
@@ -0,0 +1,916 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ * Copyright (c) 2023 Thomas McKahan
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/usb/pd.h>
+#include "rk3588.dtsi"
+
+/ {
+ model = "FriendlyElec NanoPC-T6";
+ compatible = "friendlyarm,nanopc-t6", "rockchip,rk3588";
+
+ aliases {
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ sys_led: led-0 {
+ gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
+ label = "system-led";
+ linux,default-trigger = "heartbeat";
+ pinctrl-names = "default";
+ pinctrl-0 = <&sys_led_pin>;
+ };
+
+ usr_led: led-1 {
+ gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
+ label = "user-led";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usr_led_pin>;
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det>;
+
+ simple-audio-card,name = "realtek,rt5616-codec";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
+ simple-audio-card,hp-pin-name = "Headphones";
+
+ simple-audio-card,widgets =
+ "Headphone", "Headphones",
+ "Microphone", "Microphone Jack";
+ simple-audio-card,routing =
+ "Headphones", "HPOL",
+ "Headphones", "HPOR",
+ "MIC1", "Microphone Jack",
+ "Microphone Jack", "micbias1";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s0_8ch>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rt5616>;
+ };
+ };
+
+ vcc12v_dcin: vcc12v-dcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ /* vcc5v0_sys powers peripherals */
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ /* vcc4v0_sys powers the RK806, RK860's */
+ vcc4v0_sys: vcc4v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc4v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <4000000>;
+ regulator-max-microvolt = <4000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-1v1-nldo-s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc4v0_sys>;
+ };
+
+ vcc_3v3_pcie20: vcc3v3-pcie20-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v3_pcie20";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3_s3>;
+ };
+
+ vbus5v0_typec: vbus5v0-typec-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&typec5v_pwren>;
+ regulator-name = "vbus5v0_typec";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_m2_1_pwren>;
+ regulator-name = "vcc3v3_pcie2x1l0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_m2_0_pwren>;
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy1_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&gpio0 {
+ gpio-line-names = /* GPIO0 A0-A7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO0 B0-B7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO0 C0-C7 */
+ "", "", "", "",
+ "HEADER_10", "HEADER_08", "HEADER_32", "",
+ /* GPIO0 D0-D7 */
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&gpio1 {
+ gpio-line-names = /* GPIO1 A0-A7 */
+ "HEADER_27", "HEADER_28", "", "",
+ "", "", "", "HEADER_15",
+ /* GPIO1 B0-B7 */
+ "HEADER_26", "HEADER_21", "HEADER_19", "HEADER_23",
+ "HEADER_24", "HEADER_22", "", "",
+ /* GPIO1 C0-C7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO1 D0-D7 */
+ "", "", "", "",
+ "", "", "HEADER_05", "HEADER_03";
+};
+
+&gpio2 {
+ gpio-line-names = /* GPIO2 A0-A7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO2 B0-B7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO2 C0-C7 */
+ "", "CSI1_11", "CSI1_12", "",
+ "", "", "", "",
+ /* GPIO2 D0-D7 */
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&gpio3 {
+ gpio-line-names = /* GPIO3 A0-A7 */
+ "HEADER_35", "HEADER_38", "HEADER_40", "HEADER_36",
+ "HEADER_37", "", "DSI0_12", "",
+ /* GPIO3 B0-B7 */
+ "HEADER_33", "DSI0_10", "HEADER_07", "HEADER_16",
+ "HEADER_18", "HEADER_29", "HEADER_31", "HEADER_12",
+ /* GPIO3 C0-C7 */
+ "DSI0_08", "DSI0_14", "HEADER_11", "HEADER_13",
+ "", "", "", "",
+ /* GPIO3 D0-D7 */
+ "", "", "", "",
+ "", "DSI1_10", "", "";
+};
+
+&gpio4 {
+ gpio-line-names = /* GPIO4 A0-A7 */
+ "DSI1_08", "DSI1_14", "", "DSI1_12",
+ "", "", "", "",
+ /* GPIO4 B0-B7 */
+ "", "", "", "",
+ "", "", "", "",
+ /* GPIO4 C0-C7 */
+ "", "", "", "",
+ "CSI0_11", "CSI0_12", "", "",
+ /* GPIO4 D0-D7 */
+ "", "", "", "",
+ "", "", "", "";
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc4v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc4v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ rockchip,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc4v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c6 {
+ clock-frequency = <200000>;
+ status = "okay";
+
+ fusb302: typec-portc@22 {
+ compatible = "fcs,fusb302";
+ reg = <0x22>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&usbc0_int>;
+ pinctrl-names = "default";
+ vbus-supply = <&vbus5v0_typec>;
+
+ connector {
+ compatible = "usb-c-connector";
+ data-role = "dual";
+ label = "USB-C";
+ power-role = "dual";
+ try-power-role = "sink";
+ source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
+ sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+ op-sink-microwatt = <1000000>;
+ };
+ };
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+ wakeup-source;
+ };
+};
+
+&i2c7 {
+ clock-frequency = <200000>;
+ status = "okay";
+
+ rt5616: codec@1b {
+ compatible = "realtek,rt5616";
+ reg = <0x1b>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+
+ port {
+ rt5616_p0_0: endpoint {
+ remote-endpoint = <&i2s0_8ch_p0_0>;
+ };
+ };
+ };
+
+ /* connected with MIPI-CSI1 */
+};
+
+&i2c8 {
+ pinctrl-0 = <&i2c8m2_xfer>;
+};
+
+&i2s0_8ch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+
+ i2s0_8ch_p0: port {
+ i2s0_8ch_p0_0: endpoint {
+ dai-format = "i2s";
+ mclk-fs = <256>;
+ remote-endpoint = <&rt5616_p0_0>;
+ };
+ };
+};
+
+&pcie2x1l0 {
+ reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc_3v3_pcie20>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_0_rst>;
+ status = "okay";
+};
+
+&pcie2x1l1 {
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_1_rst>;
+ status = "okay";
+};
+
+&pcie2x1l2 {
+ reset-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc_3v3_pcie20>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_2_rst>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
+&pinctrl {
+ gpio-leds {
+ sys_led_pin: sys-led-pin {
+ rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ usr_led_pin: usr-led-pin {
+ rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ headphone {
+ hp_det: hp-det {
+ rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ pcie {
+ pcie2_0_rst: pcie2-0-rst {
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie2_1_rst: pcie2-1-rst {
+ rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie2_2_rst: pcie2-2-rst {
+ rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie_m2_0_pwren: pcie-m20-pwren {
+ rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie_m2_1_pwren: pcie-m21-pwren {
+ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ typec5v_pwren: typec5v-pwren {
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ usbc0_int: usbc0-int {
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&pwm1 {
+ pinctrl-0 = <&pwm1m1_pins>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&avcc_1v8_s0>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ no-sdio;
+ no-sd;
+ non-removable;
+ max-frequency = <200000000>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ no-mmc;
+ no-sdio;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ status = "okay";
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ num-cs = <1>;
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ spi-max-frequency = <1000000>;
+ reg = <0x0>;
+
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+
+ system-power-controller;
+
+ vcc1-supply = <&vcc4v0_sys>;
+ vcc2-supply = <&vcc4v0_sys>;
+ vcc3-supply = <&vcc4v0_sys>;
+ vcc4-supply = <&vcc4v0_sys>;
+ vcc5-supply = <&vcc4v0_sys>;
+ vcc6-supply = <&vcc4v0_sys>;
+ vcc7-supply = <&vcc4v0_sys>;
+ vcc8-supply = <&vcc4v0_sys>;
+ vcc9-supply = <&vcc4v0_sys>;
+ vcc10-supply = <&vcc4v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc4v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc4v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl1";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_gpu_s0";
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_cpu_lit_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_log_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-init-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_vdenc_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_ddr_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vdd2_ddr_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_2v0_pldo_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_3v3_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vddq_ddr_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "avcc_1v8_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "avdd_1v2_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vcc_3v3_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vccio_sd_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "pldo6_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "vdd_0v75_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-name = "vdd_ddr_pll_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "avdd_0v75_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-name = "vdd_0v85_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "vdd_0v75_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+&u2phy2_host {
+ status = "okay";
+};
+
+&u2phy3_host {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-orangepi-5-plus.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-orangepi-5-plus.dts
new file mode 100644
index 000000000000..3e660ff6cd5f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-orangepi-5-plus.dts
@@ -0,0 +1,847 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Ondřej Jirman <megi@xff.cz>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/usb/pd.h>
+#include "rk3588.dtsi"
+
+/ {
+ model = "Xunlong Orange Pi 5 Plus";
+ compatible = "xunlong,orangepi-5-plus", "rockchip,rk3588";
+
+ aliases {
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ adc-keys-0 {
+ compatible = "adc-keys";
+ io-channels = <&saradc 0>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-maskrom {
+ label = "Mask Rom";
+ linux,code = <KEY_SETUP>;
+ press-threshold-microvolt = <2000>;
+ };
+ };
+
+ adc-keys-1 {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-recovery {
+ label = "Recovery";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <2000>;
+ };
+ };
+
+ speaker_amp: speaker-audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "Speaker Amp";
+ };
+
+ headphone_amp: headphones-audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "Headphones Amp";
+ };
+
+ ir-receiver {
+ compatible = "gpio-ir-receiver";
+ gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_receiver_pin>;
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&blue_led_pin>;
+
+ led {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <1>;
+ gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ fan: pwm-fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 70 75 80 100>;
+ fan-supply = <&vcc5v0_sys>;
+ pwms = <&pwm3 0 50000 0>;
+ #cooling-cells = <2>;
+ };
+
+ pwm-leds {
+ compatible = "pwm-leds";
+
+ led {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <2>;
+ max-brightness = <255>;
+ pwms = <&pwm2 0 25000 0>;
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_detect>;
+ simple-audio-card,name = "Analog";
+ simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>;
+ simple-audio-card,bitclock-master = <&daicpu>;
+ simple-audio-card,frame-master = <&daicpu>;
+ /*TODO: SARADC_IN3 is used as MIC detection / key input */
+
+ simple-audio-card,widgets =
+ "Microphone", "Onboard Microphone",
+ "Microphone", "Microphone Jack",
+ "Speaker", "Speaker",
+ "Headphone", "Headphones";
+
+ simple-audio-card,routing =
+ "Headphones", "LOUT1",
+ "Headphones", "ROUT1",
+ "Speaker", "LOUT2",
+ "Speaker", "ROUT2",
+
+ "Headphones", "Headphones Amp OUTL",
+ "Headphones", "Headphones Amp OUTR",
+ "Headphones Amp INL", "LOUT1",
+ "Headphones Amp INR", "ROUT1",
+
+ "Speaker", "Speaker Amp OUTL",
+ "Speaker", "Speaker Amp OUTR",
+ "Speaker Amp INL", "LOUT2",
+ "Speaker Amp INR", "ROUT2",
+
+ /* single ended signal to LINPUT1 */
+ "LINPUT1", "Microphone Jack",
+ "RINPUT1", "Microphone Jack",
+ /* differential signal */
+ "LINPUT2", "Onboard Microphone",
+ "RINPUT2", "Onboard Microphone";
+
+ daicpu: simple-audio-card,cpu {
+ sound-dai = <&i2s0_8ch>;
+ system-clock-frequency = <12288000>;
+ };
+
+ daicodec: simple-audio-card,codec {
+ sound-dai = <&es8388>;
+ system-clock-frequency = <12288000>;
+ };
+ };
+
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc3v3_pcie_eth: vcc3v3-pcie-eth-regulator {
+ compatible = "regulator-fixed";
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
+ regulator-name = "vcc3v3_pcie_eth";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc3v3_wf: vcc3v3-wf-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_wf";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc5v0_usb20: vcc5v0-usb20-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb20_en>;
+ regulator-name = "vcc5v0_usb20";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy1_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c6 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ wakeup-source;
+ };
+};
+
+&i2c7 {
+ status = "okay";
+
+ /* PLDO2 vcca 1.8V, BUCK8 gated by PLDO2 being enabled */
+ es8388: audio-codec@11 {
+ compatible = "everest,es8388";
+ reg = <0x11>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ clock-names = "mclk";
+ AVDD-supply = <&vcc_1v8_s0>;
+ DVDD-supply = <&vcc_1v8_s0>;
+ HPVDD-supply = <&vcc_3v3_s0>;
+ PVDD-supply = <&vcc_3v3_s0>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ #sound-dai-cells = <0>;
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+};
+
+&i2s2_2ch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s2m0_lrck
+ &i2s2m0_sclk
+ &i2s2m0_sdi
+ &i2s2m0_sdo>;
+ status = "okay";
+};
+
+/* phy1 - M.KEY socket */
+&pcie2x1l0 {
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_wf>;
+ status = "okay";
+};
+
+/* phy2 - right ethernet port */
+&pcie2x1l1 {
+ reset-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie_eth>;
+ status = "okay";
+};
+
+/* phy0 - left ethernet port */
+&pcie2x1l2 {
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie_eth>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
+&pinctrl {
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ blue_led_pin: blue-led {
+ rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ ir-receiver {
+ ir_receiver_pin: ir-receiver-pin {
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ sound {
+ hp_detect: hp-detect {
+ rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_usb20_en: vcc5v0-usb20-en {
+ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pwm2 {
+ pinctrl-0 = <&pwm2m1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&pwm3 {
+ pinctrl-0 = <&pwm3m1_pins>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8_s0>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ no-sdio;
+ no-sd;
+ non-removable;
+ max-frequency = <200000000>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&sfc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fspim1_pins>;
+ status = "okay";
+
+ spi_flash: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&spi2 {
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ status = "okay";
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vdd2_ddr_s3>;
+ vcc14-supply = <&vdd2_ddr_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-enable-ramp-delay = <400>;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <825000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <825000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-name = "avcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ /* shorted to avcc_1v8_s0 on the board */
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-name = "avdd_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-name = "avdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ /*
+ * The schematic mentions that actual setting
+ * should be 0.8375V. RK3588 datasheet specifies
+ * maximum as 0.825V. So we set datasheet max
+ * here.
+ */
+ regulator-min-microvolt = <825000>;
+ regulator-max-microvolt = <825000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-name = "vdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_usb20>;
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_usb20>;
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+&uart9 {
+ pinctrl-0 = <&uart9m0_xfer>;
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-quartzpro64.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-quartzpro64.dts
new file mode 100644
index 000000000000..87a0abf95f7d
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-quartzpro64.dts
@@ -0,0 +1,1137 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Ondřej Jirman <megi@xff.cz>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/usb/pd.h>
+#include "rk3588.dtsi"
+
+/ {
+ model = "PINE64 QuartzPro64";
+ compatible = "pine64,quartzpro64", "rockchip,rk3588";
+
+ aliases {
+ ethernet0 = &gmac0;
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ adc-keys-0 {
+ compatible = "adc-keys";
+ io-channels = <&saradc 0>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-maskrom {
+ label = "Mask Rom";
+ linux,code = <KEY_SETUP>;
+ press-threshold-microvolt = <393>;
+ };
+ };
+
+ adc-keys-1 {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-volume-up {
+ label = "V+/REC";
+ linux,code = <KEY_VOLUMEUP>;
+ press-threshold-microvolt = <17821>;
+ };
+
+ button-volume-down {
+ label = "V-";
+ linux,code = <KEY_VOLUMEDOWN>;
+ press-threshold-microvolt = <415384>;
+ };
+
+ button-menu {
+ label = "MENU";
+ linux,code = <KEY_MENU>;
+ press-threshold-microvolt = <890909>;
+ };
+
+ button-esc {
+ label = "ESC";
+ linux,code = <KEY_ESC>;
+ press-threshold-microvolt = <1233962>;
+ };
+ };
+
+ headphone_amp: audio-amplifier-headphone {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "Headphones Amp";
+ };
+
+ speaker_amp: audio-amplifier-speaker {
+ compatible = "simple-audio-amplifier";
+ enable-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
+ sound-name-prefix = "Speaker Amp";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins>;
+
+ led-1 {
+ color = <LED_COLOR_ID_ORANGE>;
+ function = LED_FUNCTION_INDICATOR;
+ gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_detect>;
+ simple-audio-card,name = "Analog";
+ simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
+ simple-audio-card,bitclock-master = <&daicpu>;
+ simple-audio-card,frame-master = <&daicpu>;
+ /* SARADC_IN3 is used as MIC detection / key input */
+
+ simple-audio-card,widgets =
+ "Microphone", "Onboard Microphone",
+ "Microphone", "Microphone Jack",
+ "Speaker", "Speaker",
+ "Headphone", "Headphones";
+
+ simple-audio-card,routing =
+ "Headphones", "LOUT1",
+ "Headphones", "ROUT1",
+ "Speaker", "LOUT2",
+ "Speaker", "ROUT2",
+
+ "Headphones", "Headphones Amp OUTL",
+ "Headphones", "Headphones Amp OUTR",
+ "Headphones Amp INL", "LOUT1",
+ "Headphones Amp INR", "ROUT1",
+
+ "Speaker", "Speaker Amp OUTL",
+ "Speaker", "Speaker Amp OUTR",
+ "Speaker Amp INL", "LOUT2",
+ "Speaker Amp INR", "ROUT2",
+
+ /* single ended signal to LINPUT1 */
+ "LINPUT1", "Microphone Jack",
+ "RINPUT1", "Microphone Jack",
+ /* differential signal */
+ "LINPUT2", "Onboard Microphone",
+ "RINPUT2", "Onboard Microphone";
+
+ daicpu: simple-audio-card,cpu {
+ sound-dai = <&i2s0_8ch>;
+ system-clock-frequency = <12288000>;
+ };
+
+ daicodec: simple-audio-card,codec {
+ sound-dai = <&es8388>;
+ system-clock-frequency = <12288000>;
+ };
+ };
+
+ vcc12v_dcin: vcc12v-dcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ vcc3v3_bt: vcc3v3-bt-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_bt";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc_3v3_s0>;
+ };
+
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc3v3_wf: vcc3v3-wf-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_wf";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc_3v3_s0>;
+ };
+
+ vcc4v0_sys: vcc4v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc4v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <4000000>;
+ regulator-max-microvolt = <4000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ regulator-name = "vcc5v0_host";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_usb>;
+ };
+
+ vcc5v0_usb: vcc5v0-usb-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy1_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&gmac0 {
+ clock_in_out = "output";
+ phy-handle = <&rgmii_phy>;
+ phy-mode = "rgmii-rxid";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac0_miim
+ &gmac0_tx_bus2
+ &gmac0_rx_bus2
+ &gmac0_rgmii_clk
+ &gmac0_rgmii_bus>;
+ rx_delay = <0x00>;
+ tx_delay = <0x43>;
+ status = "okay";
+};
+
+&i2c2 {
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ wakeup-source;
+ };
+};
+
+&i2c7 {
+ status = "okay";
+
+ es8388: audio-codec@11 {
+ compatible = "everest,es8388";
+ reg = <0x11>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ clock-names = "mclk";
+ AVDD-supply = <&avcc_1v8_codec_s0>;
+ DVDD-supply = <&avcc_1v8_codec_s0>;
+ HPVDD-supply = <&vcc_3v3_s0>;
+ PVDD-supply = <&vcc_3v3_s0>;
+ #sound-dai-cells = <0>;
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+};
+
+&mdio0 {
+ rgmii_phy: ethernet-phy@1 {
+ /* RTL8211F */
+ compatible = "ethernet-phy-id001c.c916";
+ reg = <0x1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtl8211f_rst>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pinctrl {
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ leds {
+ led_pins: led-pins {
+ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ rtl8111 {
+ rtl8111_isolate: rtl8111-isolate {
+ rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ rtl8211f {
+ rtl8211f_rst: rtl8211f-rst {
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ };
+
+ sound {
+ hp_detect: hp-detect {
+ rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+/* WIFI */
+&pcie2x1l0 {
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_wf>;
+ status = "okay";
+};
+
+/* GMAC1 */
+&pcie2x1l1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtl8111_isolate>;
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8_s0>;
+ status = "okay";
+};
+
+&sata0 {
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ no-sdio;
+ no-sd;
+ non-removable;
+ max-frequency = <150000000>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <2>;
+ status = "okay";
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ pinctrl-names = "default";
+ spi-max-frequency = <1000000>;
+
+ vcc1-supply = <&vcc4v0_sys>;
+ vcc2-supply = <&vcc4v0_sys>;
+ vcc3-supply = <&vcc4v0_sys>;
+ vcc4-supply = <&vcc4v0_sys>;
+ vcc5-supply = <&vcc4v0_sys>;
+ vcc6-supply = <&vcc4v0_sys>;
+ vcc7-supply = <&vcc4v0_sys>;
+ vcc8-supply = <&vcc4v0_sys>;
+ vcc9-supply = <&vcc4v0_sys>;
+ vcc10-supply = <&vcc4v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc4v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc4v0_sys>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl1";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-enable-ramp-delay = <400>;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_npu_s0: dcdc-reg2 {
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+
+ };
+
+ vdd_gpu_mem_s0: dcdc-reg5 {
+ regulator-name = "vdd_gpu_mem_s0";
+ regulator-boot-on;
+ regulator-enable-ramp-delay = <400>;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+
+ };
+
+ vdd_npu_mem_s0: dcdc-reg6 {
+ regulator-name = "vdd_npu_mem_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vdd_vdenc_mem_s0: dcdc-reg8 {
+ regulator-name = "vdd_vdenc_mem_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg9 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_1v1_nldo_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1100000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-name = "avcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd1_1v8_ddr_s3: pldo-reg2 {
+ regulator-name = "vdd1_1v8_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_codec_s0: pldo-reg3 {
+ regulator-name = "avcc_1v8_codec_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s3: pldo-reg4 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: pldo-reg6 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ /* reserved for LPDDR5, unused? */
+ vdd2l_0v9_ddr_s3: nldo-reg2 {
+ regulator-name = "vdd2l_0v9_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vdd_0v75_hdmi_edp_s0: nldo-reg3 {
+ regulator-name = "vdd_0v75_hdmi_edp_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg4 {
+ regulator-name = "avdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg5 {
+ regulator-name = "vdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+
+ pmic@1 {
+ compatible = "rockchip,rk806";
+ reg = <0x01>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-0 = <&rk806_slave_dvs1_null>, <&rk806_slave_dvs2_null>,
+ <&rk806_slave_dvs3_null>;
+ pinctrl-names = "default";
+ spi-max-frequency = <1000000>;
+
+ vcc1-supply = <&vcc4v0_sys>;
+ vcc2-supply = <&vcc4v0_sys>;
+ vcc3-supply = <&vcc4v0_sys>;
+ vcc4-supply = <&vcc4v0_sys>;
+ vcc5-supply = <&vcc4v0_sys>;
+ vcc6-supply = <&vcc4v0_sys>;
+ vcc7-supply = <&vcc4v0_sys>;
+ vcc8-supply = <&vcc4v0_sys>;
+ vcc9-supply = <&vcc4v0_sys>;
+ vcc10-supply = <&vcc4v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc4v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_2v0_pldo_s3>;
+ vcca-supply = <&vcc4v0_sys>;
+
+ rk806_slave_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl1";
+ function = "pin_fun0";
+ };
+
+ rk806_slave_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_slave_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_cpu_big1_s0: dcdc-reg1 {
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big0_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: dcdc-reg3 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: dcdc-reg4 {
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_mem_s0: dcdc-reg5 {
+ regulator-name = "vdd_cpu_big1_mem_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+
+ vdd_cpu_big0_mem_s0: dcdc-reg6 {
+ regulator-name = "vdd_cpu_big0_mem_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: dcdc-reg7 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_mem_s0: dcdc-reg8 {
+ regulator-name = "vdd_cpu_lit_mem_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg10 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ /* reserved, unused? */
+ vcc_1v8_cam_s0: pldo-reg1 {
+ regulator-name = "vcc_1v8_cam_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ avdd1v8_ddr_pll_s0: pldo-reg2 {
+ regulator-name = "avdd1v8_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_1v8_pll_s0: pldo-reg3 {
+ regulator-name = "vdd_1v8_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ /* reserved, unused? */
+ vcc_3v3_sd_s0: pldo-reg4 {
+ regulator-name = "vcc_3v3_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ /* reserved, unused? */
+ vcc_2v8_cam_s0: pldo-reg5 {
+ regulator-name = "vcc_2v8_cam_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ /* unused */
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_pll_s0: nldo-reg1 {
+ regulator-name = "vdd_0v75_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ avdd_0v85_s0: nldo-reg3 {
+ regulator-name = "avdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ /* reserved, unused */
+ avdd_1v2_cam_s0: nldo-reg4 {
+ regulator-name = "avdd_1v2_cam_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ avdd_1v2_s0: nldo-reg5 {
+ regulator-name = "avdd_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-rock-5b.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-rock-5b.dts
index 51537030f8e3..a0e303c3a1dc 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-rock-5b.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-rock-5b.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include "rk3588.dtsi"
/ {
@@ -11,24 +12,17 @@
aliases {
mmc0 = &sdhci;
- serial2 = &uart2;
+ mmc1 = &sdmmc;
+ mmc2 = &sdio;
};
chosen {
stdout-path = "serial2:1500000n8";
};
- fan: pwm-fan {
- compatible = "pwm-fan";
- cooling-levels = <0 95 145 195 255>;
- fan-supply = <&vcc5v0_sys>;
- pwms = <&pwm1 0 50000 0>;
- #cooling-cells = <2>;
- };
-
- sound {
+ analog-sound {
compatible = "audio-graph-card";
- label = "Analog";
+ label = "rk3588-es8316";
widgets = "Microphone", "Mic Jack",
"Headphone", "Headphones";
@@ -43,6 +37,78 @@
pinctrl-0 = <&hp_detect>;
};
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_rgb_b>;
+
+ led_rgb_b {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ fan: pwm-fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 95 145 195 255>;
+ fan-supply = <&vcc5v0_sys>;
+ pwms = <&pwm1 0 50000 0>;
+ #cooling-cells = <2>;
+ };
+
+ vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_0_vcc3v3_en>;
+ regulator-name = "vcc3v3_pcie2x1l0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie2x1l2";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc_3v3_s3>;
+ };
+
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie3_vcc3v3_en>;
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_host";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
vcc5v0_sys: vcc5v0-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
@@ -63,6 +129,18 @@
};
};
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy1_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
&cpu_b0 {
cpu-supply = <&vdd_cpu_big0_s0>;
};
@@ -189,6 +267,34 @@
};
};
+&pcie2x1l0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_0_rst>;
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
+ status = "okay";
+};
+
+&pcie2x1l2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_2_rst>;
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie3_rst>;
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
&pinctrl {
hym8563 {
hym8563_int: hym8563-int {
@@ -196,11 +302,47 @@
};
};
+ leds {
+ led_rgb_b: led-rgb-b {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
sound {
hp_detect: hp-detect {
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ pcie2 {
+ pcie2_0_rst: pcie2-0-rst {
+ rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie2_0_vcc3v3_en: pcie2-0-vcc-en {
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie2_2_rst: pcie2-2-rst {
+ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pcie3 {
+ pcie3_rst: pcie3-rst {
+ rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ pcie3_vcc3v3_en: pcie3-vcc3v3-en {
+ rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pwm1 {
@@ -217,7 +359,6 @@
no-sdio;
no-sd;
non-removable;
- max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "okay";
@@ -230,6 +371,7 @@
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
disable-wp;
sd-uhs-sdr104;
vmmc-supply = <&vcc_3v3_s3>;
@@ -237,6 +379,33 @@
status = "okay";
};
+&sdio {
+ max-frequency = <200000000>;
+ no-sd;
+ no-mmc;
+ non-removable;
+ bus-width = <4>;
+ cap-sdio-irq;
+ disable-wp;
+ keep-power-in-suspend;
+ wakeup-source;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc3v3_pcie2x1l0>;
+ vqmmc-supply = <&vcc_1v8_s3>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdiom0_pins>;
+ status = "okay";
+};
+
+&uart6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn &uart6m1_rtsn>;
+ status = "okay";
+};
+
&spi2 {
status = "okay";
assigned-clocks = <&cru CLK_SPI2>;
@@ -257,6 +426,8 @@
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ system-power-controller;
+
vcc1-supply = <&vcc5v0_sys>;
vcc2-supply = <&vcc5v0_sys>;
vcc3-supply = <&vcc5v0_sys>;
@@ -277,7 +448,7 @@
#gpio-cells = <2>;
rk806_dvs1_null: dvs1-null-pins {
- pins = "gpio_pwrctrl2";
+ pins = "gpio_pwrctrl1";
function = "pin_fun0";
};
@@ -564,3 +735,42 @@
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ /* connected to USB hub, which is powered by vcc5v0_sys */
+ phy-supply = <&vcc5v0_sys>;
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host2_xhci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dts
new file mode 100644
index 000000000000..7bcad28d73b8
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * This device tree covers the common case where the RK1 is used as a
+ * "compute node" system, where the carrier board is functioning more like a
+ * generic backplane (with no non-autoenumerable peripherals of its own) than
+ * like a device that the SoM is meant to enable.
+ *
+ * Copyright (c) 2023 Sam Edwards <CFSworks@gmail.com>
+ */
+
+/dts-v1/;
+#include "rk3588-turing-rk1.dtsi"
+
+/ {
+ model = "Turing Machines RK1";
+ compatible = "turing,rk1", "rockchip,rk3588";
+
+ chosen {
+ stdout-path = "serial9:115200n8";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dtsi
new file mode 100644
index 000000000000..dc08da518a76
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588-turing-rk1.dtsi
@@ -0,0 +1,612 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device tree definitions for the Turing RK1 SoM.
+ *
+ * Copyright (c) 2023 Sam Edwards <CFSworks@gmail.com>
+ *
+ * Based on RK3588-EVB1 devicetree
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3588.dtsi"
+
+/ {
+ compatible = "turing,rk1", "rockchip,rk3588";
+
+ aliases {
+ ethernet0 = &gmac1;
+ mmc0 = &sdhci;
+ };
+
+ fan: pwm-fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 25 95 145 195 255>;
+ fan-supply = <&vcc5v0_sys>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0m2_pins &fan_int>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
+ pwms = <&pwm0 0 50000 0>;
+ #cooling-cells = <2>;
+ };
+
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ enable-active-high;
+ gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie30_en>;
+ startup-delay-us = <5000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&gmac1 {
+ clock_in_out = "output";
+ phy-handle = <&rgmii_phy>;
+ phy-mode = "rgmii-rxid";
+ pinctrl-0 = <&gmac1_miim
+ &gmac1_tx_bus2
+ &gmac1_rx_bus2
+ &gmac1_rgmii_clk
+ &gmac1_rgmii_bus>;
+ pinctrl-names = "default";
+ rx_delay = <0x00>;
+ tx_delay = <0x43>;
+ status = "okay";
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1m2_xfer>;
+ status = "okay";
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c6 {
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+ wakeup-source;
+ };
+};
+
+&mdio1 {
+ rgmii_phy: ethernet-phy@1 {
+ /* RTL8211F */
+ compatible = "ethernet-phy-id001c.c916",
+ "ethernet-phy-ieee802.3-c22";
+ reg = <0x1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtl8211f_rst>;
+ reset-assert-us = <15000>;
+ reset-deassert-us = <50000>;
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pcie2x1l1 {
+ linux,pci-domain = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_reset>;
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ linux,pci-domain = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie3_reset>;
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
+&pinctrl {
+ fan {
+ fan_int: fan-int {
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ pcie2 {
+ pcie2_reset: pcie2-reset {
+ rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pcie3 {
+ pcie3_reset: pcie3-reset {
+ rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc3v3_pcie30_en: pcie3-reg {
+ rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ rtl8211f {
+ rtl8211f_rst: rtl8211f-rst {
+ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pwm0 {
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ no-sdio;
+ no-sd;
+ non-removable;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ status = "okay";
+};
+
+&spi2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ num-cs = <1>;
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ spi-max-frequency = <1000000>;
+ reg = <0x0>;
+
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_gpu_s0";
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_cpu_lit_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_log_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_vdenc_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_ddr_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vdd2_ddr_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vdd_2v0_pldo_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_3v3_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vddq_ddr_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "avcc_1v8_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "avdd_1v2_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vcc_3v3_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+ regulator-name = "vccio_sd_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "pldo6_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "vdd_0v75_s3";
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-name = "vdd_ddr_pll_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "avdd_0v75_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-name = "vdd_0v85_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+ regulator-name = "vdd_0v75_s0";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+&uart9 {
+ pinctrl-0 = <&uart9m0_xfer>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588.dtsi
index 8be75556af8f..5519c1430cb7 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588.dtsi
@@ -7,6 +7,16 @@
#include "rk3588-pinctrl.dtsi"
/ {
+ pcie30_phy_grf: syscon@fd5b8000 {
+ compatible = "rockchip,rk3588-pcie3-phy-grf", "syscon";
+ reg = <0x0 0xfd5b8000 0x0 0x10000>;
+ };
+
+ pipe_phy1_grf: syscon@fd5c0000 {
+ compatible = "rockchip,rk3588-pipe-phy-grf", "syscon";
+ reg = <0x0 0xfd5c0000 0x0 0x100>;
+ };
+
i2s8_8ch: i2s@fddc8000 {
compatible = "rockchip,rk3588-i2s-tdm";
reg = <0x0 0xfddc8000 0x0 0x1000>;
@@ -75,6 +85,159 @@
status = "disabled";
};
+ pcie3x4: pcie@fe150000 {
+ compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ bus-range = <0x00 0x0f>;
+ clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>,
+ <&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>,
+ <&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>;
+ clock-names = "aclk_mst", "aclk_slv",
+ "aclk_dbi", "pclk",
+ "aux", "pipe";
+ device_type = "pci";
+ interrupts = <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &pcie3x4_intc 0>,
+ <0 0 0 2 &pcie3x4_intc 1>,
+ <0 0 0 3 &pcie3x4_intc 2>,
+ <0 0 0 4 &pcie3x4_intc 3>;
+ linux,pci-domain = <0>;
+ max-link-speed = <3>;
+ msi-map = <0x0000 &its1 0x0000 0x1000>;
+ num-lanes = <4>;
+ phys = <&pcie30phy>;
+ phy-names = "pcie-phy";
+ power-domains = <&power RK3588_PD_PCIE>;
+ ranges = <0x01000000 0x0 0xf0100000 0x0 0xf0100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf0200000 0x0 0xf0200000 0x0 0x00e00000>,
+ <0x03000000 0x0 0x40000000 0x9 0x00000000 0x0 0x40000000>;
+ reg = <0xa 0x40000000 0x0 0x00400000>,
+ <0x0 0xfe150000 0x0 0x00010000>,
+ <0x0 0xf0000000 0x0 0x00100000>;
+ reg-names = "dbi", "apb", "config";
+ resets = <&cru SRST_PCIE0_POWER_UP>, <&cru SRST_P_PCIE0>;
+ reset-names = "pwr", "pipe";
+ status = "disabled";
+
+ pcie3x4_intc: legacy-interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 260 IRQ_TYPE_EDGE_RISING 0>;
+ };
+ };
+
+ pcie3x2: pcie@fe160000 {
+ compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ bus-range = <0x10 0x1f>;
+ clocks = <&cru ACLK_PCIE_2L_MSTR>, <&cru ACLK_PCIE_2L_SLV>,
+ <&cru ACLK_PCIE_2L_DBI>, <&cru PCLK_PCIE_2L>,
+ <&cru CLK_PCIE_AUX1>, <&cru CLK_PCIE2L_PIPE>;
+ clock-names = "aclk_mst", "aclk_slv",
+ "aclk_dbi", "pclk",
+ "aux", "pipe";
+ device_type = "pci";
+ interrupts = <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &pcie3x2_intc 0>,
+ <0 0 0 2 &pcie3x2_intc 1>,
+ <0 0 0 3 &pcie3x2_intc 2>,
+ <0 0 0 4 &pcie3x2_intc 3>;
+ linux,pci-domain = <1>;
+ max-link-speed = <3>;
+ msi-map = <0x1000 &its1 0x1000 0x1000>;
+ num-lanes = <2>;
+ phys = <&pcie30phy>;
+ phy-names = "pcie-phy";
+ power-domains = <&power RK3588_PD_PCIE>;
+ ranges = <0x01000000 0x0 0xf1100000 0x0 0xf1100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf1200000 0x0 0xf1200000 0x0 0x00e00000>,
+ <0x03000000 0x0 0x40000000 0x9 0x40000000 0x0 0x40000000>;
+ reg = <0xa 0x40400000 0x0 0x00400000>,
+ <0x0 0xfe160000 0x0 0x00010000>,
+ <0x0 0xf1000000 0x0 0x00100000>;
+ reg-names = "dbi", "apb", "config";
+ resets = <&cru SRST_PCIE1_POWER_UP>, <&cru SRST_P_PCIE1>;
+ reset-names = "pwr", "pipe";
+ status = "disabled";
+
+ pcie3x2_intc: legacy-interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 255 IRQ_TYPE_EDGE_RISING 0>;
+ };
+ };
+
+ pcie2x1l0: pcie@fe170000 {
+ compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
+ bus-range = <0x20 0x2f>;
+ clocks = <&cru ACLK_PCIE_1L0_MSTR>, <&cru ACLK_PCIE_1L0_SLV>,
+ <&cru ACLK_PCIE_1L0_DBI>, <&cru PCLK_PCIE_1L0>,
+ <&cru CLK_PCIE_AUX2>, <&cru CLK_PCIE1L0_PIPE>;
+ clock-names = "aclk_mst", "aclk_slv",
+ "aclk_dbi", "pclk",
+ "aux", "pipe";
+ device_type = "pci";
+ interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &pcie2x1l0_intc 0>,
+ <0 0 0 2 &pcie2x1l0_intc 1>,
+ <0 0 0 3 &pcie2x1l0_intc 2>,
+ <0 0 0 4 &pcie2x1l0_intc 3>;
+ linux,pci-domain = <2>;
+ max-link-speed = <2>;
+ msi-map = <0x2000 &its0 0x2000 0x1000>;
+ num-lanes = <1>;
+ phys = <&combphy1_ps PHY_TYPE_PCIE>;
+ phy-names = "pcie-phy";
+ power-domains = <&power RK3588_PD_PCIE>;
+ ranges = <0x01000000 0x0 0xf2100000 0x0 0xf2100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf2200000 0x0 0xf2200000 0x0 0x00e00000>,
+ <0x03000000 0x0 0x40000000 0x9 0x80000000 0x0 0x40000000>;
+ reg = <0xa 0x40800000 0x0 0x00400000>,
+ <0x0 0xfe170000 0x0 0x00010000>,
+ <0x0 0xf2000000 0x0 0x00100000>;
+ reg-names = "dbi", "apb", "config";
+ resets = <&cru SRST_PCIE2_POWER_UP>, <&cru SRST_P_PCIE2>;
+ reset-names = "pwr", "pipe";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ status = "disabled";
+
+ pcie2x1l0_intc: legacy-interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 240 IRQ_TYPE_EDGE_RISING 0>;
+ };
+ };
+
gmac0: ethernet@fe1b0000 {
compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a";
reg = <0x0 0xfe1b0000 0x0 0x10000>;
@@ -123,4 +286,56 @@
queue1 {};
};
};
+
+ sata1: sata@fe220000 {
+ compatible = "rockchip,rk3588-dwc-ahci", "snps,dwc-ahci";
+ reg = <0 0xfe220000 0 0x1000>;
+ interrupts = <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_SATA1>, <&cru CLK_PMALIVE1>,
+ <&cru CLK_RXOOB1>, <&cru CLK_PIPEPHY1_REF>,
+ <&cru CLK_PIPEPHY1_PIPE_ASIC_G>;
+ clock-names = "sata", "pmalive", "rxoob", "ref", "asic";
+ ports-implemented = <0x1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ sata-port@0 {
+ reg = <0>;
+ hba-port-cap = <HBA_PORT_FBSCP>;
+ phys = <&combphy1_ps PHY_TYPE_SATA>;
+ phy-names = "sata-phy";
+ snps,rx-ts-max = <32>;
+ snps,tx-ts-max = <32>;
+ };
+ };
+
+ combphy1_ps: phy@fee10000 {
+ compatible = "rockchip,rk3588-naneng-combphy";
+ reg = <0x0 0xfee10000 0x0 0x100>;
+ clocks = <&cru CLK_REF_PIPE_PHY1>, <&cru PCLK_PCIE_COMBO_PIPE_PHY1>,
+ <&cru PCLK_PHP_ROOT>;
+ clock-names = "ref", "apb", "pipe";
+ assigned-clocks = <&cru CLK_REF_PIPE_PHY1>;
+ assigned-clock-rates = <100000000>;
+ #phy-cells = <1>;
+ resets = <&cru SRST_REF_PIPE_PHY1>, <&cru SRST_P_PCIE2_PHY1>;
+ reset-names = "phy", "apb";
+ rockchip,pipe-grf = <&php_grf>;
+ rockchip,pipe-phy-grf = <&pipe_phy1_grf>;
+ status = "disabled";
+ };
+
+ pcie30phy: phy@fee80000 {
+ compatible = "rockchip,rk3588-pcie3-phy";
+ reg = <0x0 0xfee80000 0x0 0x20000>;
+ #phy-cells = <0>;
+ clocks = <&cru PCLK_PCIE_COMBO_PIPE_PHY>;
+ clock-names = "pclk";
+ resets = <&cru SRST_PCIE30_PHY>;
+ reset-names = "phy";
+ rockchip,pipe-grf = <&php_grf>;
+ rockchip,phy-grf = <&pcie30_phy_grf>;
+ status = "disabled";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-coolpi-4b.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-coolpi-4b.dts
new file mode 100644
index 000000000000..e037bf9db75a
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-coolpi-4b.dts
@@ -0,0 +1,812 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
+ *
+ * https://cool-pi.com/topic/130/coolpi-4b-product-spec-introduction
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3588s.dtsi"
+
+/ {
+ model = "RK3588S CoolPi 4 Model B";
+ compatible = "coolpi,pi-4b", "rockchip,rk3588s";
+
+ aliases {
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ mmc2 = &sdio;
+ };
+
+ analog-sound {
+ compatible = "audio-graph-card";
+ dais = <&i2s0_8ch_p0>;
+ label = "rk3588-es8316";
+ routing = "MIC2", "Mic Jack",
+ "Headphones", "HPOL",
+ "Headphones", "HPOR";
+ widgets = "Microphone", "Mic Jack",
+ "Headphone", "Headphones";
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_leds>;
+
+ led0: led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led1: led-red {
+ color = <LED_COLOR_ID_RED>;
+ default-state = "off";
+ function = LED_FUNCTION_WLAN;
+ gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tx";
+ };
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&hym8563>;
+ clock-names = "ext_clock";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable_h>;
+ /*
+ * On the module itself this is one of these (depending
+ * on the actual card populated):
+ * - SDIO_RESET_L_WL_REG_ON
+ * - PDN (power down when low)
+ */
+ post-power-on-delay-ms = <200>;
+ reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>;
+ };
+
+ vcc12v_dcin: vcc12v-dcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc5v0_usbdcin: vcc5v0-usbdcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usbdcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc5v0_usb: vcc5v0-usb-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_usbdcin>;
+ };
+
+ avdd0v85_pcie20: avdd0v85-pcie20-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd0v85_pcie20";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ vin-supply = <&vdd_0v85_s0>;
+ };
+
+ avdd1v8_pcie20: avdd1v8-pcie20-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd1v8_pcie20";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&avcc_1v8_s0>;
+ };
+
+ vcc3v3_mipi: vcc3v3-mipi-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_mipi";
+ regulator-boot-on;
+ regulator-always-on;
+ vin-supply = <&vcc_3v3_s3>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ regulator-name = "vcc5v0_host";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_otg: vcc5v0-otg-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_u3host_en>;
+ regulator-name = "vcc5v0_otg";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&i2c0 {
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c6 {
+ pinctrl-0 = <&i2c6m3_xfer>;
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ };
+};
+
+&i2c7 {
+ pinctrl-0 = <&i2c7m0_xfer>;
+ status = "okay";
+
+ es8316: audio-codec@11 {
+ compatible = "everest,es8316";
+ reg = <0x11>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
+
+ port {
+ es8316_p0_0: endpoint {
+ remote-endpoint = <&i2s0_8ch_p0_0>;
+ };
+ };
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+
+ i2s0_8ch_p0: port {
+ i2s0_8ch_p0_0: endpoint {
+ dai-format = "i2s";
+ mclk-fs = <256>;
+ remote-endpoint = <&es8316_p0_0>;
+ };
+ };
+};
+
+&pcie2x1l2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtl8111_isolate>;
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
+&pinctrl {
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ led {
+ gpio_leds: gpio-leds {
+ rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>,
+ <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+
+ rtl8111 {
+ rtl8111_isolate: rtl8111-isolate {
+ rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ sdio-pwrseq {
+ wifi_enable_h: wifi-enable-h {
+ rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
+ <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ vcc5v0_u3host_en: vcc5v0-u3host-en {
+ rockchip,pins = <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ wireless-bluetooth {
+ bt_reset_gpio: bt-reset-pin {
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake_gpio: bt-wake-pin {
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake_host_irq: bt-wake-host-irq {
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+
+ wireless-wlan {
+ wifi_host_wake_irq: wifi-host-wake-irq {
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+
+ wifi_poweren_pin: wifi-poweren-pin {
+ rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&pwm2 {
+ pinctrl-0 = <&pwm2m1_pins>;
+ status = "okay";
+};
+
+&pwm13 {
+ pinctrl-names = "active";
+ pinctrl-0 = <&pwm13m2_pins>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8_s0>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ no-sdio;
+ no-sd;
+ non-removable;
+ status = "okay";
+};
+
+&sdio {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ disable-wp;
+ keep-power-in-suspend;
+ max-frequency = <150000000>;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ no-sd;
+ no-mmc;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdiom1_pins>,<&wifi_poweren_pin>;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ status = "okay";
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-name = "avcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-name = "avdd_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-name = "avdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-name = "vdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&u2phy3_host {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+/* bt */
+&uart9 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn>;
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-indiedroid-nova.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-indiedroid-nova.dts
index 1a60a275ddf9..3c2278886851 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-indiedroid-nova.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-indiedroid-nova.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/usb/pd.h>
#include "rk3588s.dtsi"
@@ -11,11 +12,38 @@
model = "Indiedroid Nova";
compatible = "indiedroid,nova", "rockchip,rk3588s";
+ adc-keys-0 {
+ compatible = "adc-keys";
+ io-channel-names = "buttons";
+ io-channels = <&saradc 0>;
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-boot {
+ label = "boot";
+ linux,code = <KEY_PROG1>;
+ press-threshold-microvolt = <18000>;
+ };
+ };
+
+ adc-keys-1 {
+ compatible = "adc-keys";
+ io-channel-names = "buttons";
+ io-channels = <&saradc 1>;
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-recovery {
+ label = "recovery";
+ linux,code = <KEY_PROG2>;
+ press-threshold-microvolt = <18000>;
+ };
+ };
+
aliases {
mmc0 = &sdhci;
mmc1 = &sdmmc;
mmc2 = &sdio;
- serial2 = &uart2;
};
chosen {
@@ -109,6 +137,10 @@
};
};
+&combphy0_ps {
+ status = "okay";
+};
+
&cpu_l0 {
cpu-supply = <&vdd_cpu_lit_s0>;
};
@@ -163,13 +195,13 @@
&gpio1 {
gpio-line-names = /* GPIO1 A0-A7 */
- "HEADER_27_3v3", "HEADER_28_3v3", "", "",
+ "HEADER_27_3v3", "", "", "",
"HEADER_29_1v8", "", "HEADER_7_1v8", "",
/* GPIO1 B0-B7 */
"", "HEADER_31_1v8", "HEADER_33_1v8", "",
"HEADER_11_1v8", "HEADER_13_1v8", "", "",
/* GPIO1 C0-C7 */
- "", "", "", "",
+ "", "HEADER_28_3v3", "", "",
"", "", "", "",
/* GPIO1 D0-D7 */
"", "", "", "",
@@ -193,11 +225,11 @@
&gpio4 {
gpio-line-names = /* GPIO4 A0-A7 */
- "", "", "HEADER_37_3v3", "HEADER_32_3v3",
- "HEADER_36_3v3", "", "HEADER_35_3v3", "HEADER_38_3v3",
+ "", "", "HEADER_37_3v3", "HEADER_8_3v3",
+ "HEADER_10_3v3", "", "HEADER_32_3v3", "HEADER_35_3v3",
/* GPIO4 B0-B7 */
"", "", "", "HEADER_40_3v3",
- "HEADER_8_3v3", "HEADER_10_3v3", "", "",
+ "HEADER_38_3v3", "HEADER_36_3v3", "", "",
/* GPIO4 C0-C7 */
"", "", "", "",
"", "", "", "",
@@ -348,6 +380,12 @@
};
};
+&pcie2x1l2 {
+ pinctrl-0 = <&rtl8111_perstb>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
&pinctrl {
bluetooth-pins {
bt_reset: bt-reset {
@@ -366,6 +404,12 @@
};
};
+ ethernet-pins {
+ rtl8111_perstb: rtl8111-perstb {
+ rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
hym8563 {
hym8563_int: hym8563-int {
@@ -394,6 +438,11 @@
};
};
+&saradc {
+ vref-supply = <&vcca_1v8_s0>;
+ status = "okay";
+};
+
/* HS400 modes seemed to cause io errors. */
&sdhci {
bus-width = <8>;
@@ -401,7 +450,6 @@
no-sd;
no-sdio;
non-removable;
- max-frequency = <200000000>;
vmmc-supply = <&vcc_3v3_s0>;
vqmmc-supply = <&vcc_1v8_s3>;
status = "okay";
@@ -429,7 +477,6 @@
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
- max-frequency = <200000000>;
no-sdio;
no-mmc;
sd-uhs-sdr104;
@@ -737,6 +784,24 @@
status = "okay";
};
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_usb>;
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_usb>;
+ status = "okay";
+};
+
&uart2 {
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
@@ -761,3 +826,19 @@
pinctrl-names = "default";
};
};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-khadas-edge2.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-khadas-edge2.dts
index 93b4a0c4ed0f..f53e993c785e 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-khadas-edge2.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-khadas-edge2.dts
@@ -12,7 +12,6 @@
aliases {
mmc0 = &sdhci;
- serial2 = &uart2;
};
chosen {
@@ -25,7 +24,6 @@
no-sdio;
no-sd;
non-removable;
- max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "okay";
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-orangepi-5.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-orangepi-5.dts
new file mode 100644
index 000000000000..25de4362af38
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-orangepi-5.dts
@@ -0,0 +1,667 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3588s.dtsi"
+
+/ {
+ model = "Xunlong Orange Pi 5";
+ compatible = "xunlong,orangepi-5", "rockchip,rk3588s";
+
+ aliases {
+ ethernet0 = &gmac1;
+ mmc0 = &sdmmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-recovery {
+ label = "Recovery";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <1800>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&leds_gpio>;
+
+ led-1 {
+ gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+ label = "status_led";
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ vbus_typec: vbus-typec-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&typec5v_pwren>;
+ regulator-name = "vbus_typec";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
+ compatible = "regulator-fixed";
+ enable-active-low;
+ gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
+ regulator-name = "vcc_3v3_sd_s0";
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3_s3>;
+ };
+
+ vcc3v3_pcie20: vcc3v3-pcie20-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_pcie20";
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0_ps {
+ status = "okay";
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&gmac1 {
+ clock_in_out = "output";
+ phy-handle = <&rgmii_phy1>;
+ phy-mode = "rgmii-rxid";
+ pinctrl-0 = <&gmac1_miim
+ &gmac1_tx_bus2
+ &gmac1_rx_bus2
+ &gmac1_rgmii_clk
+ &gmac1_rgmii_bus>;
+ pinctrl-names = "default";
+ tx_delay = <0x42>;
+ status = "okay";
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c6m3_xfer>;
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
+ wakeup-source;
+ };
+};
+
+&mdio1 {
+ rgmii_phy1: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pcie2x1l2 {
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie20>;
+ status = "okay";
+};
+
+&pinctrl {
+ gpio-func {
+ leds_gpio: leds-gpio {
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb-typec {
+ usbc0_int: usbc0-int {
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ typec5v_pwren: typec5v-pwren {
+ rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&saradc {
+ vref-supply = <&avcc_1v8_s0>;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-mmc;
+ no-sdio;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_sd_s0>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&sfc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fspim0_pins>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&spi2 {
+ status = "okay";
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+ system-power-controller;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vcc_1v1_nldo_s3: vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-max-microvolt = <1100000>;
+ regulator-min-microvolt = <1100000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-name = "avcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-name = "avdd_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-name = "avdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-name = "vdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host2_xhci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-pinctrl.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-pinctrl.dtsi
index 48181671eacb..30db12c4fc82 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-pinctrl.dtsi
@@ -369,7 +369,7 @@
emmc_data_strobe: emmc-data-strobe {
rockchip,pins =
/* emmc_data_strobe */
- <2 RK_PA2 1 &pcfg_pull_none>;
+ <2 RK_PA2 1 &pcfg_pull_down>;
};
};
@@ -1350,6 +1350,41 @@
i2s2 {
/omit-if-no-ref/
+ i2s2m0_lrck: i2s2m0-lrck {
+ rockchip,pins =
+ /* i2s2m0_lrck */
+ <2 RK_PC0 2 &pcfg_pull_none>;
+ };
+
+ /omit-if-no-ref/
+ i2s2m0_mclk: i2s2m0-mclk {
+ rockchip,pins =
+ /* i2s2m0_mclk */
+ <2 RK_PB6 2 &pcfg_pull_none>;
+ };
+
+ /omit-if-no-ref/
+ i2s2m0_sclk: i2s2m0-sclk {
+ rockchip,pins =
+ /* i2s2m0_sclk */
+ <2 RK_PB7 2 &pcfg_pull_none>;
+ };
+
+ /omit-if-no-ref/
+ i2s2m0_sdi: i2s2m0-sdi {
+ rockchip,pins =
+ /* i2s2m0_sdi */
+ <2 RK_PC3 2 &pcfg_pull_none>;
+ };
+
+ /omit-if-no-ref/
+ i2s2m0_sdo: i2s2m0-sdo {
+ rockchip,pins =
+ /* i2s2m0_sdo */
+ <4 RK_PC3 2 &pcfg_pull_none>;
+ };
+
+ /omit-if-no-ref/
i2s2m1_lrck: i2s2m1-lrck {
rockchip,pins =
/* i2s2m1_lrck */
@@ -3308,6 +3343,15 @@
uart9 {
/omit-if-no-ref/
+ uart9m0_xfer: uart9m0-xfer {
+ rockchip,pins =
+ /* uart9_rx_m0 */
+ <2 RK_PC4 10 &pcfg_pull_up>,
+ /* uart9_tx_m0 */
+ <2 RK_PC2 10 &pcfg_pull_up>;
+ };
+
+ /omit-if-no-ref/
uart9m1_xfer: uart9m1-xfer {
rockchip,pins =
/* uart9_rx_m1 */
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-rock-5a.dts b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-rock-5a.dts
index 901825514f9d..2002fd0221fa 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-rock-5a.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s-rock-5a.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588s.dtsi"
@@ -11,13 +12,257 @@
compatible = "radxa,rock-5a", "rockchip,rk3588s";
aliases {
+ ethernet0 = &gmac1;
mmc0 = &sdhci;
- serial2 = &uart2;
+ mmc1 = &sdmmc;
+ };
+
+ analog-sound {
+ compatible = "audio-graph-card";
+ label = "rk3588-es8316";
+
+ widgets = "Microphone", "Mic Jack",
+ "Headphone", "Headphones";
+
+ routing = "MIC2", "Mic Jack",
+ "Headphones", "HPOL",
+ "Headphones", "HPOR";
+
+ dais = <&i2s0_8ch_p0>;
};
chosen {
stdout-path = "serial2:1500000n8";
};
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&io_led>;
+
+ io-led {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ fan: pwm-fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 95 145 195 255>;
+ fan-supply = <&vcc_5v0>;
+ pwms = <&pwm3 0 50000 0>;
+ #cooling-cells = <2>;
+ };
+
+ vcc12v_dcin: vcc12v-dcin-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dcin";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_host";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dcin>;
+ };
+
+ vcc_5v0: vcc-5v0-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ enable-active-high;
+ gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc_5v0_en>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy2_psu {
+ status = "okay";
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ vdd_npu_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_npu_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ eeprom: eeprom@50 {
+ compatible = "belling,bl24c16a", "atmel,24c16";
+ reg = <0x50>;
+ pagesize = <16>;
+ };
+};
+
+&i2c3 {
+ status = "okay";
+};
+
+&i2c5 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c5m2_xfer>;
+};
+
+&i2c7 {
+ status = "okay";
+
+ es8316: audio-codec@11 {
+ compatible = "everest,es8316";
+ reg = <0x11>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ clock-names = "mclk";
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ #sound-dai-cells = <0>;
+
+ port {
+ es8316_p0_0: endpoint {
+ remote-endpoint = <&i2s0_8ch_p0_0>;
+ };
+ };
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+
+ i2s0_8ch_p0: port {
+ i2s0_8ch_p0_0: endpoint {
+ dai-format = "i2s";
+ mclk-fs = <256>;
+ remote-endpoint = <&es8316_p0_0>;
+ };
+ };
};
&gmac1 {
@@ -49,11 +294,62 @@
};
&pinctrl {
+ leds {
+ io_led: io-led {
+ rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ power {
+ vcc_5v0_en: vcc-5v0-en {
+ rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
rtl8211f {
rtl8211f_rst: rtl8211f-rst {
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ wifibt {
+ wl_reset: wl-reset {
+ rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ wl_dis: wl-dis {
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_output_high>;
+ };
+
+ wl_wake_host: wl-wake-host {
+ rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ bt_dis: bt-dis {
+ rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_output_high>;
+ };
+
+ bt_wake_host: bt-wake-host {
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&pwm3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm3m1_pins>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&avcc_1v8_s0>;
+ status = "okay";
};
&sdhci {
@@ -61,13 +357,388 @@
no-sdio;
no-sd;
non-removable;
- max-frequency = <200000000>;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
status = "okay";
};
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s0>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ status = "okay";
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <400>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <750000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avcc_1v8_s0: pldo-reg1 {
+ regulator-name = "avcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ avdd_1v2_s0: pldo-reg3 {
+ regulator-name = "avdd_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3_s0: pldo-reg4 {
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pldo6_s3: pldo-reg6 {
+ regulator-name = "pldo6_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ avdd_0v75_s0: nldo-reg3 {
+ regulator-name = "avdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v85_s0: nldo-reg4 {
+ regulator-name = "vdd_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ status = "okay";
+ phy-supply = <&vcc5v0_host>;
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
&uart2 {
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};
+
+&usb_host0_ehci {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wl_reset &wl_dis &wl_wake_host &bt_dis &bt_wake_host>;
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host2_xhci {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s.dtsi b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s.dtsi
index 1576f9bfd6de..36b1b7acfe6a 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3588s.dtsi
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3588s.dtsi
@@ -8,6 +8,8 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/power/rk3588-power.h>
#include <dt-bindings/reset/rockchip,rk3588-cru.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/ata/ahci.h>
/ {
compatible = "rockchip,rk3588";
@@ -16,6 +18,38 @@
#address-cells = <2>;
#size-cells = <2>;
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ gpio4 = &gpio4;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ i2c4 = &i2c4;
+ i2c5 = &i2c5;
+ i2c6 = &i2c6;
+ i2c7 = &i2c7;
+ i2c8 = &i2c8;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ serial4 = &uart4;
+ serial5 = &uart5;
+ serial6 = &uart6;
+ serial7 = &uart7;
+ serial8 = &uart8;
+ serial9 = &uart9;
+ spi0 = &spi0;
+ spi1 = &spi1;
+ spi2 = &spi2;
+ spi3 = &spi3;
+ spi4 = &spi4;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -360,6 +394,11 @@
#clock-cells = <0>;
};
+ display_subsystem: display-subsystem {
+ compatible = "rockchip,display-subsystem";
+ ports = <&vop_out>;
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
@@ -397,16 +436,156 @@
};
};
+ usb_host0_ehci: usb@fc800000 {
+ compatible = "rockchip,rk3588-ehci", "generic-ehci";
+ reg = <0x0 0xfc800000 0x0 0x40000>;
+ interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST_ARB0>, <&cru ACLK_USB>, <&u2phy2>;
+ phys = <&u2phy2_host>;
+ phy-names = "usb";
+ power-domains = <&power RK3588_PD_USB>;
+ status = "disabled";
+ };
+
+ usb_host0_ohci: usb@fc840000 {
+ compatible = "rockchip,rk3588-ohci", "generic-ohci";
+ reg = <0x0 0xfc840000 0x0 0x40000>;
+ interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST_ARB0>, <&cru ACLK_USB>, <&u2phy2>;
+ phys = <&u2phy2_host>;
+ phy-names = "usb";
+ power-domains = <&power RK3588_PD_USB>;
+ status = "disabled";
+ };
+
+ usb_host1_ehci: usb@fc880000 {
+ compatible = "rockchip,rk3588-ehci", "generic-ehci";
+ reg = <0x0 0xfc880000 0x0 0x40000>;
+ interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST_ARB1>, <&cru ACLK_USB>, <&u2phy3>;
+ phys = <&u2phy3_host>;
+ phy-names = "usb";
+ power-domains = <&power RK3588_PD_USB>;
+ status = "disabled";
+ };
+
+ usb_host1_ohci: usb@fc8c0000 {
+ compatible = "rockchip,rk3588-ohci", "generic-ohci";
+ reg = <0x0 0xfc8c0000 0x0 0x40000>;
+ interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST_ARB1>, <&cru ACLK_USB>, <&u2phy3>;
+ phys = <&u2phy3_host>;
+ phy-names = "usb";
+ power-domains = <&power RK3588_PD_USB>;
+ status = "disabled";
+ };
+
+ usb_host2_xhci: usb@fcd00000 {
+ compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
+ reg = <0x0 0xfcd00000 0x0 0x400000>;
+ interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru REF_CLK_USB3OTG2>, <&cru SUSPEND_CLK_USB3OTG2>,
+ <&cru ACLK_USB3OTG2>, <&cru CLK_UTMI_OTG2>,
+ <&cru CLK_PIPEPHY2_PIPE_U3_G>;
+ clock-names = "ref_clk", "suspend_clk", "bus_clk", "utmi", "pipe";
+ dr_mode = "host";
+ phys = <&combphy2_psu PHY_TYPE_USB3>;
+ phy-names = "usb3-phy";
+ phy_type = "utmi_wide";
+ resets = <&cru SRST_A_USB3OTG2>;
+ 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;
+ status = "disabled";
+ };
+
+ pmu1grf: syscon@fd58a000 {
+ compatible = "rockchip,rk3588-pmugrf", "syscon", "simple-mfd";
+ reg = <0x0 0xfd58a000 0x0 0x10000>;
+ };
+
sys_grf: syscon@fd58c000 {
compatible = "rockchip,rk3588-sys-grf", "syscon";
reg = <0x0 0xfd58c000 0x0 0x1000>;
};
+ vop_grf: syscon@fd5a4000 {
+ compatible = "rockchip,rk3588-vop-grf", "syscon";
+ reg = <0x0 0xfd5a4000 0x0 0x2000>;
+ };
+
+ vo1_grf: syscon@fd5a8000 {
+ compatible = "rockchip,rk3588-vo-grf", "syscon";
+ reg = <0x0 0xfd5a8000 0x0 0x100>;
+ };
+
php_grf: syscon@fd5b0000 {
compatible = "rockchip,rk3588-php-grf", "syscon";
reg = <0x0 0xfd5b0000 0x0 0x1000>;
};
+ pipe_phy0_grf: syscon@fd5bc000 {
+ compatible = "rockchip,rk3588-pipe-phy-grf", "syscon";
+ reg = <0x0 0xfd5bc000 0x0 0x100>;
+ };
+
+ pipe_phy2_grf: syscon@fd5c4000 {
+ compatible = "rockchip,rk3588-pipe-phy-grf", "syscon";
+ reg = <0x0 0xfd5c4000 0x0 0x100>;
+ };
+
+ usb2phy2_grf: syscon@fd5d8000 {
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
+ reg = <0x0 0xfd5d8000 0x0 0x4000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ u2phy2: usb2-phy@8000 {
+ compatible = "rockchip,rk3588-usb2phy";
+ reg = <0x8000 0x10>;
+ interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH 0>;
+ resets = <&cru SRST_OTGPHY_U2_0>, <&cru SRST_P_USB2PHY_U2_0_GRF0>;
+ reset-names = "phy", "apb";
+ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
+ clock-names = "phyclk";
+ clock-output-names = "usb480m_phy2";
+ #clock-cells = <0>;
+ status = "disabled";
+
+ u2phy2_host: host-port {
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+ };
+ };
+
+ usb2phy3_grf: syscon@fd5dc000 {
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
+ reg = <0x0 0xfd5dc000 0x0 0x4000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ u2phy3: usb2-phy@c000 {
+ compatible = "rockchip,rk3588-usb2phy";
+ reg = <0xc000 0x10>;
+ interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH 0>;
+ resets = <&cru SRST_OTGPHY_U2_1>, <&cru SRST_P_USB2PHY_U2_1_GRF0>;
+ reset-names = "phy", "apb";
+ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
+ clock-names = "phyclk";
+ clock-output-names = "usb480m_phy3";
+ #clock-cells = <0>;
+ status = "disabled";
+
+ u2phy3_host: host-port {
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+ };
+ };
+
ioc: syscon@fd5f0000 {
compatible = "rockchip,rk3588-ioc", "syscon";
reg = <0x0 0xfd5f0000 0x0 0x10000>;
@@ -461,6 +640,74 @@
status = "disabled";
};
+ vop: vop@fdd90000 {
+ compatible = "rockchip,rk3588-vop";
+ reg = <0x0 0xfdd90000 0x0 0x4200>, <0x0 0xfdd95000 0x0 0x1000>;
+ reg-names = "vop", "gamma-lut";
+ interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_VOP>,
+ <&cru HCLK_VOP>,
+ <&cru DCLK_VOP0>,
+ <&cru DCLK_VOP1>,
+ <&cru DCLK_VOP2>,
+ <&cru DCLK_VOP3>,
+ <&cru PCLK_VOP_ROOT>;
+ clock-names = "aclk",
+ "hclk",
+ "dclk_vp0",
+ "dclk_vp1",
+ "dclk_vp2",
+ "dclk_vp3",
+ "pclk_vop";
+ iommus = <&vop_mmu>;
+ power-domains = <&power RK3588_PD_VOP>;
+ rockchip,grf = <&sys_grf>;
+ rockchip,vop-grf = <&vop_grf>;
+ rockchip,vo1-grf = <&vo1_grf>;
+ rockchip,pmu = <&pmu>;
+ status = "disabled";
+
+ vop_out: ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vp0: port@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ vp1: port@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+ };
+
+ vp2: port@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+ };
+
+ vp3: port@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+ };
+ };
+ };
+
+ vop_mmu: iommu@fdd97e00 {
+ compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu";
+ reg = <0x0 0xfdd97e00 0x0 0x100>, <0x0 0xfdd97f00 0x0 0x100>;
+ interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
+ clock-names = "aclk", "iface";
+ #iommu-cells = <0>;
+ power-domains = <&power RK3588_PD_VOP>;
+ status = "disabled";
+ };
+
uart0: serial@fd890000 {
compatible = "rockchip,rk3588-uart", "snps,dw-apb-uart";
reg = <0x0 0xfd890000 0x0 0x100>;
@@ -784,6 +1031,7 @@
reg = <RK3588_PD_USB>;
clocks = <&cru PCLK_PHP_ROOT>,
<&cru ACLK_USB_ROOT>,
+ <&cru ACLK_USB>,
<&cru HCLK_USB_ROOT>,
<&cru HCLK_HOST0>,
<&cru HCLK_HOST_ARB0>,
@@ -1121,6 +1369,118 @@
reg = <0x0 0xfdf82200 0x0 0x20>;
};
+ pcie2x1l1: pcie@fe180000 {
+ compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
+ bus-range = <0x30 0x3f>;
+ clocks = <&cru ACLK_PCIE_1L1_MSTR>, <&cru ACLK_PCIE_1L1_SLV>,
+ <&cru ACLK_PCIE_1L1_DBI>, <&cru PCLK_PCIE_1L1>,
+ <&cru CLK_PCIE_AUX3>, <&cru CLK_PCIE1L1_PIPE>;
+ clock-names = "aclk_mst", "aclk_slv",
+ "aclk_dbi", "pclk",
+ "aux", "pipe";
+ device_type = "pci";
+ interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &pcie2x1l1_intc 0>,
+ <0 0 0 2 &pcie2x1l1_intc 1>,
+ <0 0 0 3 &pcie2x1l1_intc 2>,
+ <0 0 0 4 &pcie2x1l1_intc 3>;
+ linux,pci-domain = <3>;
+ max-link-speed = <2>;
+ msi-map = <0x3000 &its0 0x3000 0x1000>;
+ num-lanes = <1>;
+ phys = <&combphy2_psu PHY_TYPE_PCIE>;
+ phy-names = "pcie-phy";
+ power-domains = <&power RK3588_PD_PCIE>;
+ ranges = <0x01000000 0x0 0xf3100000 0x0 0xf3100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf3200000 0x0 0xf3200000 0x0 0x00e00000>,
+ <0x03000000 0x0 0x40000000 0x9 0xc0000000 0x0 0x40000000>;
+ reg = <0xa 0x40c00000 0x0 0x00400000>,
+ <0x0 0xfe180000 0x0 0x00010000>,
+ <0x0 0xf3000000 0x0 0x00100000>;
+ reg-names = "dbi", "apb", "config";
+ resets = <&cru SRST_PCIE3_POWER_UP>, <&cru SRST_P_PCIE3>;
+ reset-names = "pwr", "pipe";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ status = "disabled";
+
+ pcie2x1l1_intc: legacy-interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 245 IRQ_TYPE_EDGE_RISING 0>;
+ };
+ };
+
+ pcie2x1l2: pcie@fe190000 {
+ compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
+ bus-range = <0x40 0x4f>;
+ clocks = <&cru ACLK_PCIE_1L2_MSTR>, <&cru ACLK_PCIE_1L2_SLV>,
+ <&cru ACLK_PCIE_1L2_DBI>, <&cru PCLK_PCIE_1L2>,
+ <&cru CLK_PCIE_AUX4>, <&cru CLK_PCIE1L2_PIPE>;
+ clock-names = "aclk_mst", "aclk_slv",
+ "aclk_dbi", "pclk",
+ "aux", "pipe";
+ device_type = "pci";
+ interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &pcie2x1l2_intc 0>,
+ <0 0 0 2 &pcie2x1l2_intc 1>,
+ <0 0 0 3 &pcie2x1l2_intc 2>,
+ <0 0 0 4 &pcie2x1l2_intc 3>;
+ linux,pci-domain = <4>;
+ max-link-speed = <2>;
+ msi-map = <0x4000 &its0 0x4000 0x1000>;
+ num-lanes = <1>;
+ phys = <&combphy0_ps PHY_TYPE_PCIE>;
+ phy-names = "pcie-phy";
+ power-domains = <&power RK3588_PD_PCIE>;
+ ranges = <0x01000000 0x0 0xf4100000 0x0 0xf4100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf4200000 0x0 0xf4200000 0x0 0x00e00000>,
+ <0x03000000 0x0 0x40000000 0xa 0x00000000 0x0 0x40000000>;
+ reg = <0xa 0x41000000 0x0 0x00400000>,
+ <0x0 0xfe190000 0x0 0x00010000>,
+ <0x0 0xf4000000 0x0 0x00100000>;
+ reg-names = "dbi", "apb", "config";
+ resets = <&cru SRST_PCIE4_POWER_UP>, <&cru SRST_P_PCIE4>;
+ reset-names = "pwr", "pipe";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ status = "disabled";
+
+ pcie2x1l2_intc: legacy-interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 250 IRQ_TYPE_EDGE_RISING 0>;
+ };
+ };
+
+ dfi: dfi@fe060000 {
+ reg = <0x00 0xfe060000 0x00 0x10000>;
+ compatible = "rockchip,rk3588-dfi";
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH 0>;
+ rockchip,pmu = <&pmu1grf>;
+ };
+
gmac1: ethernet@fe1c0000 {
compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a";
reg = <0x0 0xfe1c0000 0x0 0x10000>;
@@ -1170,6 +1530,63 @@
};
};
+ sata0: sata@fe210000 {
+ compatible = "rockchip,rk3588-dwc-ahci", "snps,dwc-ahci";
+ reg = <0 0xfe210000 0 0x1000>;
+ interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_SATA0>, <&cru CLK_PMALIVE0>,
+ <&cru CLK_RXOOB0>, <&cru CLK_PIPEPHY0_REF>,
+ <&cru CLK_PIPEPHY0_PIPE_ASIC_G>;
+ clock-names = "sata", "pmalive", "rxoob", "ref", "asic";
+ ports-implemented = <0x1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ sata-port@0 {
+ reg = <0>;
+ hba-port-cap = <HBA_PORT_FBSCP>;
+ phys = <&combphy0_ps PHY_TYPE_SATA>;
+ phy-names = "sata-phy";
+ snps,rx-ts-max = <32>;
+ snps,tx-ts-max = <32>;
+ };
+ };
+
+ sata2: sata@fe230000 {
+ compatible = "rockchip,rk3588-dwc-ahci", "snps,dwc-ahci";
+ reg = <0 0xfe230000 0 0x1000>;
+ interrupts = <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_SATA2>, <&cru CLK_PMALIVE2>,
+ <&cru CLK_RXOOB2>, <&cru CLK_PIPEPHY2_REF>,
+ <&cru CLK_PIPEPHY2_PIPE_ASIC_G>;
+ clock-names = "sata", "pmalive", "rxoob", "ref", "asic";
+ ports-implemented = <0x1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ sata-port@0 {
+ reg = <0>;
+ hba-port-cap = <HBA_PORT_FBSCP>;
+ phys = <&combphy2_psu PHY_TYPE_SATA>;
+ phy-names = "sata-phy";
+ snps,rx-ts-max = <32>;
+ snps,tx-ts-max = <32>;
+ };
+ };
+
+ sfc: spi@fe2b0000 {
+ compatible = "rockchip,sfc";
+ reg = <0x0 0xfe2b0000 0x0 0x4000>;
+ interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
+ clock-names = "clk_sfc", "hclk_sfc";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
sdmmc: mmc@fe2c0000 {
compatible = "rockchip,rk3588-dw-mshc", "rockchip,rk3288-dw-mshc";
reg = <0x0 0xfe2c0000 0x0 0x4000>;
@@ -1943,6 +2360,38 @@
#dma-cells = <1>;
};
+ combphy0_ps: phy@fee00000 {
+ compatible = "rockchip,rk3588-naneng-combphy";
+ reg = <0x0 0xfee00000 0x0 0x100>;
+ clocks = <&cru CLK_REF_PIPE_PHY0>, <&cru PCLK_PCIE_COMBO_PIPE_PHY0>,
+ <&cru PCLK_PHP_ROOT>;
+ clock-names = "ref", "apb", "pipe";
+ assigned-clocks = <&cru CLK_REF_PIPE_PHY0>;
+ assigned-clock-rates = <100000000>;
+ #phy-cells = <1>;
+ resets = <&cru SRST_REF_PIPE_PHY0>, <&cru SRST_P_PCIE2_PHY0>;
+ reset-names = "phy", "apb";
+ rockchip,pipe-grf = <&php_grf>;
+ rockchip,pipe-phy-grf = <&pipe_phy0_grf>;
+ status = "disabled";
+ };
+
+ combphy2_psu: phy@fee20000 {
+ compatible = "rockchip,rk3588-naneng-combphy";
+ reg = <0x0 0xfee20000 0x0 0x100>;
+ clocks = <&cru CLK_REF_PIPE_PHY2>, <&cru PCLK_PCIE_COMBO_PIPE_PHY2>,
+ <&cru PCLK_PHP_ROOT>;
+ clock-names = "ref", "apb", "pipe";
+ assigned-clocks = <&cru CLK_REF_PIPE_PHY2>;
+ assigned-clock-rates = <100000000>;
+ #phy-cells = <1>;
+ resets = <&cru SRST_REF_PIPE_PHY2>, <&cru SRST_P_PCIE2_PHY2>;
+ reset-names = "phy", "apb";
+ rockchip,pipe-grf = <&php_grf>;
+ rockchip,pipe-phy-grf = <&pipe_phy2_grf>;
+ status = "disabled";
+ };
+
system_sram2: sram@ff001000 {
compatible = "mmio-sram";
reg = <0x0 0xff001000 0x0 0xef000>;
@@ -2018,6 +2467,19 @@
#interrupt-cells = <2>;
};
};
+
+ av1d: video-codec@fdc70000 {
+ compatible = "rockchip,rk3588-av1-vpu";
+ reg = <0x0 0xfdc70000 0x0 0x800>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "vdpu";
+ assigned-clocks = <&cru ACLK_AV1>, <&cru PCLK_AV1>;
+ assigned-clock-rates = <400000000>, <400000000>;
+ clocks = <&cru ACLK_AV1>, <&cru PCLK_AV1>;
+ clock-names = "aclk", "hclk";
+ power-domains = <&power RK3588_PD_AV1>;
+ resets = <&cru SRST_A_AV1>, <&cru SRST_P_AV1>, <&cru SRST_A_AV1_BIU>, <&cru SRST_P_AV1_BIU>;
+ };
};
#include "rk3588s-pinctrl.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld11.dtsi b/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld11.dtsi
index 7bb36b071475..4680571c264d 100644
--- a/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld11.dtsi
+++ b/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld11.dtsi
@@ -52,6 +52,8 @@
l2: l2-cache {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld20.dtsi b/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld20.dtsi
index 4e2171630272..335093da6573 100644
--- a/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld20.dtsi
+++ b/sys/contrib/device-tree/src/arm64/socionext/uniphier-ld20.dtsi
@@ -86,10 +86,14 @@
a72_l2: l2-cache0 {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
a53_l2: l2-cache1 {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/socionext/uniphier-pxs3.dtsi b/sys/contrib/device-tree/src/arm64/socionext/uniphier-pxs3.dtsi
index 38ccfb46ea42..d6e3cc6fdb25 100644
--- a/sys/contrib/device-tree/src/arm64/socionext/uniphier-pxs3.dtsi
+++ b/sys/contrib/device-tree/src/arm64/socionext/uniphier-pxs3.dtsi
@@ -83,6 +83,8 @@
l2: l2-cache {
compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
};
diff --git a/sys/contrib/device-tree/src/arm64/sprd/ums512.dtsi b/sys/contrib/device-tree/src/arm64/sprd/ums512.dtsi
index 024be594c47d..dbdb79f8e959 100644
--- a/sys/contrib/device-tree/src/arm64/sprd/ums512.dtsi
+++ b/sys/contrib/device-tree/src/arm64/sprd/ums512.dtsi
@@ -96,7 +96,7 @@
CPU6: cpu@600 {
device_type = "cpu";
- compatible = "arm,cortex-a55";
+ compatible = "arm,cortex-a75";
reg = <0x0 0x600>;
enable-method = "psci";
cpu-idle-states = <&CORE_PD>;
@@ -104,7 +104,7 @@
CPU7: cpu@700 {
device_type = "cpu";
- compatible = "arm,cortex-a55";
+ compatible = "arm,cortex-a75";
reg = <0x0 0x700>;
enable-method = "psci";
cpu-idle-states = <&CORE_PD>;
@@ -113,7 +113,7 @@
idle-states {
entry-method = "psci";
- CORE_PD: core-pd {
+ CORE_PD: cpu-pd {
compatible = "arm,idle-state";
entry-latency-us = <4000>;
exit-latency-us = <4000>;
@@ -291,6 +291,7 @@
pll2: clock-controller@0 {
compatible = "sprd,ums512-gc-pll";
reg = <0x0 0x100>;
+ clocks = <&ext_26m>;
clock-names = "ext-26m";
#clock-cells = <1>;
};
@@ -682,8 +683,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f040000 0 0x1000>;
cpu = <&CPU0>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -699,8 +700,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f140000 0 0x1000>;
cpu = <&CPU1>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -716,8 +717,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f240000 0 0x1000>;
cpu = <&CPU2>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -733,8 +734,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f340000 0 0x1000>;
cpu = <&CPU3>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -750,8 +751,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f440000 0 0x1000>;
cpu = <&CPU4>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -767,8 +768,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f540000 0 0x1000>;
cpu = <&CPU5>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -784,8 +785,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f640000 0 0x1000>;
cpu = <&CPU6>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
@@ -801,8 +802,8 @@
compatible = "arm,coresight-etm4x", "arm,primecell";
reg = <0 0x3f740000 0 0x1000>;
cpu = <&CPU7>;
- clocks = <&ext_26m>, <&aon_clk CLK_CSSYS>, <&pll2 CLK_TWPLL_512M>;
- clock-names = "apb_pclk", "clk_cs", "cs_src";
+ clocks = <&ext_26m>;
+ clock-names = "apb_pclk";
out-ports {
port {
diff --git a/sys/contrib/device-tree/src/arm64/sprd/ums9620-2h10.dts b/sys/contrib/device-tree/src/arm64/sprd/ums9620-2h10.dts
new file mode 100644
index 000000000000..b35671192a72
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/sprd/ums9620-2h10.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Unisoc UMS9620-2h10 board DTS file
+ *
+ * Copyright (C) 2023, Unisoc Inc.
+ */
+
+/dts-v1/;
+
+#include "ums9620.dtsi"
+
+/ {
+ model = "Unisoc UMS9620-2H10 Board";
+
+ compatible = "sprd,ums9620-2h10", "sprd,ums9620";
+
+ aliases {
+ serial0 = &uart0;
+ serial1 = &uart1;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x0 0x80000000 0x2 0x00000000>;
+ };
+
+ chosen {
+ stdout-path = "serial1:921600n8";
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/sprd/ums9620.dtsi b/sys/contrib/device-tree/src/arm64/sprd/ums9620.dtsi
new file mode 100644
index 000000000000..2191f0a4811b
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/sprd/ums9620.dtsi
@@ -0,0 +1,245 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Unisoc UMS9620 DTS file
+ *
+ * Copyright (C) 2023, Unisoc Inc.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cpu-map {
+ cluster0 {
+ core0 {
+ cpu = <&CPU0>;
+ };
+ core1 {
+ cpu = <&CPU1>;
+ };
+ core2 {
+ cpu = <&CPU2>;
+ };
+ core3 {
+ cpu = <&CPU3>;
+ };
+ core4 {
+ cpu = <&CPU4>;
+ };
+ core5 {
+ cpu = <&CPU5>;
+ };
+ core6 {
+ cpu = <&CPU6>;
+ };
+ core7 {
+ cpu = <&CPU7>;
+ };
+ };
+ };
+
+ CPU0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ cpu-idle-states = <&LIT_CORE_PD>;
+ };
+
+ CPU1: cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ cpu-idle-states = <&LIT_CORE_PD>;
+ };
+
+ CPU2: cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x200>;
+ enable-method = "psci";
+ cpu-idle-states = <&LIT_CORE_PD>;
+ };
+
+ CPU3: cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a55";
+ reg = <0x0 0x300>;
+ enable-method = "psci";
+ cpu-idle-states = <&LIT_CORE_PD>;
+ };
+
+ CPU4: cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a76";
+ reg = <0x0 0x400>;
+ enable-method = "psci";
+ cpu-idle-states = <&BIG_CORE_PD>;
+ };
+
+ CPU5: cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a76";
+ reg = <0x0 0x500>;
+ enable-method = "psci";
+ cpu-idle-states = <&BIG_CORE_PD>;
+ };
+
+ CPU6: cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a76";
+ reg = <0x0 0x600>;
+ enable-method = "psci";
+ cpu-idle-states = <&BIG_CORE_PD>;
+ };
+
+ CPU7: cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a76";
+ reg = <0x0 0x700>;
+ enable-method = "psci";
+ cpu-idle-states = <&BIG_CORE_PD>;
+ };
+ };
+
+ idle-states {
+ entry-method = "psci";
+ LIT_CORE_PD: cpu-pd-lit {
+ compatible = "arm,idle-state";
+ entry-latency-us = <1000>;
+ exit-latency-us = <500>;
+ min-residency-us = <2500>;
+ local-timer-stop;
+ arm,psci-suspend-param = <0x00010000>;
+ };
+
+ BIG_CORE_PD: cpu-pd-big {
+ compatible = "arm,idle-state";
+ entry-latency-us = <4000>;
+ exit-latency-us = <4000>;
+ min-residency-us = <10000>;
+ local-timer-stop;
+ arm,psci-suspend-param = <0x00010000>;
+ };
+ };
+
+ psci {
+ compatible = "arm,psci-0.2";
+ method = "smc";
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>, /* Physical Secure PPI */
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>, /* Physical Non-Secure PPI */
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>, /* Virtual PPI */
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>; /* Hipervisor PPI */
+ };
+
+ pmu {
+ compatible = "arm,armv8-pmuv3";
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ soc: soc {
+ compatible = "simple-bus";
+ ranges;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ gic: interrupt-controller@12000000 {
+ compatible = "arm,gic-v3";
+ reg = <0x0 0x12000000 0 0x20000>, /* GICD */
+ <0x0 0x12040000 0 0x100000>; /* GICR */
+ #interrupt-cells = <3>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ redistributor-stride = <0x0 0x20000>; /* 128KB stride */
+ #redistributor-regions = <1>;
+ interrupt-controller;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ apb@20200000 {
+ compatible = "simple-bus";
+ ranges = <0 0 0x20200000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uart0: serial@0 {
+ compatible = "sprd,ums9620-uart",
+ "sprd,sc9836-uart";
+ reg = <0 0x100>;
+ interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ext_26m>;
+ status = "disabled";
+ };
+
+ uart1: serial@10000 {
+ compatible = "sprd,ums9620-uart",
+ "sprd,sc9836-uart";
+ reg = <0x10000 0x100>;
+ interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ext_26m>;
+ status = "disabled";
+ };
+ };
+ };
+
+ ext_26m: clk-26m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ clock-output-names = "ext-26m";
+ };
+
+ ext_4m: clk-4m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <4000000>;
+ clock-output-names = "ext-4m";
+ };
+
+ ext_32k: clk-32k {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "ext-32k";
+ };
+
+ rco_100m: clk-100m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ clock-output-names = "rco-100m";
+ };
+
+ dphy_312m5: dphy-312m5 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <312500000>;
+ clock-output-names = "dphy-312m5";
+ };
+
+ dphy_416m7: dphy-416m7 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <416700000>;
+ clock-output-names = "dphy-416m7";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/st/stm32mp25-pinctrl.dtsi b/sys/contrib/device-tree/src/arm64/st/stm32mp25-pinctrl.dtsi
index d34a1d5e79c0..66791a974f8f 100644
--- a/sys/contrib/device-tree/src/arm64/st/stm32mp25-pinctrl.dtsi
+++ b/sys/contrib/device-tree/src/arm64/st/stm32mp25-pinctrl.dtsi
@@ -6,6 +6,60 @@
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
&pinctrl {
+ sdmmc1_b4_pins_a: sdmmc1-b4-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('E', 4, AF10)>, /* SDMMC1_D0 */
+ <STM32_PINMUX('E', 5, AF10)>, /* SDMMC1_D1 */
+ <STM32_PINMUX('E', 0, AF10)>, /* SDMMC1_D2 */
+ <STM32_PINMUX('E', 1, AF10)>, /* SDMMC1_D3 */
+ <STM32_PINMUX('E', 2, AF10)>; /* SDMMC1_CMD */
+ slew-rate = <2>;
+ drive-push-pull;
+ bias-disable;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('E', 3, AF10)>; /* SDMMC1_CK */
+ slew-rate = <3>;
+ drive-push-pull;
+ bias-disable;
+ };
+ };
+
+ sdmmc1_b4_od_pins_a: sdmmc1-b4-od-0 {
+ pins1 {
+ pinmux = <STM32_PINMUX('E', 4, AF10)>, /* SDMMC1_D0 */
+ <STM32_PINMUX('E', 5, AF10)>, /* SDMMC1_D1 */
+ <STM32_PINMUX('E', 0, AF10)>, /* SDMMC1_D2 */
+ <STM32_PINMUX('E', 1, AF10)>; /* SDMMC1_D3 */
+ slew-rate = <2>;
+ drive-push-pull;
+ bias-disable;
+ };
+ pins2 {
+ pinmux = <STM32_PINMUX('E', 3, AF10)>; /* SDMMC1_CK */
+ slew-rate = <3>;
+ drive-push-pull;
+ bias-disable;
+ };
+ pins3 {
+ pinmux = <STM32_PINMUX('E', 2, AF10)>; /* SDMMC1_CMD */
+ slew-rate = <2>;
+ drive-open-drain;
+ bias-disable;
+ };
+ };
+
+ sdmmc1_b4_sleep_pins_a: sdmmc1-b4-sleep-0 {
+ pins {
+ pinmux = <STM32_PINMUX('E', 4, ANALOG)>, /* SDMMC1_D0 */
+ <STM32_PINMUX('E', 5, ANALOG)>, /* SDMMC1_D1 */
+ <STM32_PINMUX('E', 0, ANALOG)>, /* SDMMC1_D2 */
+ <STM32_PINMUX('E', 1, ANALOG)>, /* SDMMC1_D3 */
+ <STM32_PINMUX('E', 3, ANALOG)>, /* SDMMC1_CK */
+ <STM32_PINMUX('E', 2, ANALOG)>; /* SDMMC1_CMD */
+ };
+ };
+
usart2_pins_a: usart2-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 4, AF6)>; /* USART2_TX */
diff --git a/sys/contrib/device-tree/src/arm64/st/stm32mp251.dtsi b/sys/contrib/device-tree/src/arm64/st/stm32mp251.dtsi
index 5268a4321841..96859d098ef8 100644
--- a/sys/contrib/device-tree/src/arm64/st/stm32mp251.dtsi
+++ b/sys/contrib/device-tree/src/arm64/st/stm32mp251.dtsi
@@ -28,6 +28,12 @@
interrupt-parent = <&intc>;
};
+ arm_wdt: watchdog {
+ compatible = "arm,smc-wdt";
+ arm,smc-id = <0xb200005a>;
+ status = "disabled";
+ };
+
clocks {
ck_flexgen_08: ck-flexgen-08 {
#clock-cells = <0>;
@@ -119,6 +125,35 @@
clocks = <&ck_flexgen_08>;
status = "disabled";
};
+
+ sdmmc1: mmc@48220000 {
+ compatible = "st,stm32mp25-sdmmc2", "arm,pl18x", "arm,primecell";
+ arm,primecell-periphid = <0x00353180>;
+ reg = <0x48220000 0x400>, <0x44230400 0x8>;
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ck_flexgen_51>;
+ clock-names = "apb_pclk";
+ cap-sd-highspeed;
+ cap-mmc-highspeed;
+ max-frequency = <120000000>;
+ status = "disabled";
+ };
+ };
+
+ bsec: efuse@44000000 {
+ compatible = "st,stm32mp25-bsec";
+ reg = <0x44000000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ part_number_otp@24 {
+ reg = <0x24 0x4>;
+ };
+
+ package_otp@1e8 {
+ reg = <0x1e8 0x1>;
+ bits = <0 3>;
+ };
};
syscfg: syscon@44230000 {
diff --git a/sys/contrib/device-tree/src/arm64/st/stm32mp257f-ev1.dts b/sys/contrib/device-tree/src/arm64/st/stm32mp257f-ev1.dts
index 39b4726cc098..b2d3afb15758 100644
--- a/sys/contrib/device-tree/src/arm64/st/stm32mp257f-ev1.dts
+++ b/sys/contrib/device-tree/src/arm64/st/stm32mp257f-ev1.dts
@@ -6,6 +6,7 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "stm32mp257.dtsi"
#include "stm32mp25xf.dtsi"
#include "stm32mp25-pinctrl.dtsi"
@@ -39,6 +40,32 @@
no-map;
};
};
+
+ vdd_sdcard: vdd-sdcard {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_sdcard";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&arm_wdt {
+ timeout-sec = <32>;
+ status = "okay";
+};
+
+&sdmmc1 {
+ pinctrl-names = "default", "opendrain", "sleep";
+ pinctrl-0 = <&sdmmc1_b4_pins_a>;
+ pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
+ pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+ cd-gpios = <&gpiod 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ disable-wp;
+ st,neg-edge;
+ bus-width = <4>;
+ vmmc-supply = <&vdd_sdcard>;
+ status = "okay";
};
&usart2 {
diff --git a/sys/contrib/device-tree/src/arm64/tesla/fsd.dtsi b/sys/contrib/device-tree/src/arm64/tesla/fsd.dtsi
index 1c53c68efd53..aaffb50b8b60 100644
--- a/sys/contrib/device-tree/src/arm64/tesla/fsd.dtsi
+++ b/sys/contrib/device-tree/src/arm64/tesla/fsd.dtsi
@@ -342,6 +342,18 @@
#clock-cells = <0>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ mfc_left: region@84000000 {
+ compatible = "shared-dma-pool";
+ no-map;
+ reg = <0 0x84000000 0 0x8000000>;
+ };
+ };
+
soc: soc@0 {
compatible = "simple-bus";
#address-cells = <2>;
@@ -353,8 +365,8 @@
compatible = "arm,gic-v3";
#interrupt-cells = <3>;
interrupt-controller;
- reg = <0x0 0x10400000 0x0 0x10000>, /* GICD */
- <0x0 0x10600000 0x0 0x200000>; /* GICR_RD+GICR_SGI */
+ reg = <0x0 0x10400000 0x0 0x10000>, /* GICD */
+ <0x0 0x10600000 0x0 0x200000>; /* GICR_RD+GICR_SGI */
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -581,7 +593,7 @@
};
serial_0: serial@14180000 {
- compatible = "samsung,exynos4210-uart";
+ compatible = "tesla,fsd-uart", "samsung,exynos4210-uart";
reg = <0x0 0x14180000 0x0 0x100>;
interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&pdma1 1>, <&pdma1 0>;
@@ -593,7 +605,7 @@
};
serial_1: serial@14190000 {
- compatible = "samsung,exynos4210-uart";
+ compatible = "tesla,fsd-uart", "samsung,exynos4210-uart";
reg = <0x0 0x14190000 0x0 0x100>;
interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&pdma1 3>, <&pdma1 2>;
@@ -605,12 +617,12 @@
};
pmu_system_controller: system-controller@11400000 {
- compatible = "samsung,exynos7-pmu", "syscon";
+ compatible = "tesla,fsd-pmu", "samsung,exynos7-pmu", "syscon";
reg = <0x0 0x11400000 0x0 0x5000>;
};
watchdog_0: watchdog@100a0000 {
- compatible = "samsung,exynos7-wdt";
+ compatible = "tesla,fsd-wdt", "samsung,exynos7-wdt";
reg = <0x0 0x100a0000 0x0 0x100>;
interrupts = <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>;
samsung,syscon-phandle = <&pmu_system_controller>;
@@ -619,7 +631,7 @@
};
watchdog_1: watchdog@100b0000 {
- compatible = "samsung,exynos7-wdt";
+ compatible = "tesla,fsd-wdt", "samsung,exynos7-wdt";
reg = <0x0 0x100b0000 0x0 0x100>;
interrupts = <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>;
samsung,syscon-phandle = <&pmu_system_controller>;
@@ -628,7 +640,7 @@
};
watchdog_2: watchdog@100c0000 {
- compatible = "samsung,exynos7-wdt";
+ compatible = "tesla,fsd-wdt", "samsung,exynos7-wdt";
reg = <0x0 0x100c0000 0x0 0x100>;
interrupts = <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>;
samsung,syscon-phandle = <&pmu_system_controller>;
@@ -637,7 +649,7 @@
};
pwm_0: pwm@14100000 {
- compatible = "samsung,exynos4210-pwm";
+ compatible = "tesla,fsd-pwm", "samsung,exynos4210-pwm";
reg = <0x0 0x14100000 0x0 0x100>;
samsung,pwm-outputs = <0>, <1>, <2>, <3>;
#pwm-cells = <3>;
@@ -647,7 +659,7 @@
};
pwm_1: pwm@14110000 {
- compatible = "samsung,exynos4210-pwm";
+ compatible = "tesla,fsd-pwm", "samsung,exynos4210-pwm";
reg = <0x0 0x14110000 0x0 0x100>;
samsung,pwm-outputs = <0>, <1>, <2>, <3>;
#pwm-cells = <3>;
@@ -657,7 +669,7 @@
};
hsi2c_0: i2c@14200000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14200000 0x0 0x1000>;
interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -670,7 +682,7 @@
};
hsi2c_1: i2c@14210000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14210000 0x0 0x1000>;
interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -683,7 +695,7 @@
};
hsi2c_2: i2c@14220000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14220000 0x0 0x1000>;
interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -696,7 +708,7 @@
};
hsi2c_3: i2c@14230000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14230000 0x0 0x1000>;
interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -709,7 +721,7 @@
};
hsi2c_4: i2c@14240000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14240000 0x0 0x1000>;
interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -722,7 +734,7 @@
};
hsi2c_5: i2c@14250000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14250000 0x0 0x1000>;
interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -735,7 +747,7 @@
};
hsi2c_6: i2c@14260000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14260000 0x0 0x1000>;
interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -748,7 +760,7 @@
};
hsi2c_7: i2c@14270000 {
- compatible = "samsung,exynos7-hsi2c";
+ compatible = "tesla,fsd-hsi2c", "samsung,exynos7-hsi2c";
reg = <0x0 0x14270000 0x0 0x1000>;
interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
@@ -956,6 +968,15 @@
clock-names = "fin_pll", "mct";
};
+ mfc: mfc@12880000 {
+ compatible = "tesla,fsd-mfc";
+ reg = <0x0 0x12880000 0x0 0x10000>;
+ interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "mfc";
+ clocks = <&clock_mfc MFC_MFC_IPCLKPORT_ACLK>;
+ memory-region = <&mfc_left>;
+ };
+
ufs: ufs@15120000 {
compatible = "tesla,fsd-ufs";
reg = <0x0 0x15120000 0x0 0x200>, /* 0: HCI standard */
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-main.dtsi
index 2488e3a537fe..464b7565d085 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-main.dtsi
@@ -55,15 +55,34 @@
#phy-cells = <1>;
};
- epwm_tbclk: clock@4130 {
- compatible = "ti,am62-epwm-tbclk", "syscon";
+ epwm_tbclk: clock-controller@4130 {
+ compatible = "ti,am62-epwm-tbclk";
reg = <0x4130 0x4>;
#clock-cells = <1>;
};
+
+ audio_refclk0: clock-controller@82e0 {
+ compatible = "ti,am62-audio-refclk";
+ reg = <0x82e0 0x4>;
+ clocks = <&k3_clks 157 0>;
+ assigned-clocks = <&k3_clks 157 0>;
+ assigned-clock-parents = <&k3_clks 157 8>;
+ #clock-cells = <0>;
+ };
+
+ audio_refclk1: clock-controller@82e4 {
+ compatible = "ti,am62-audio-refclk";
+ reg = <0x82e4 0x4>;
+ clocks = <&k3_clks 157 10>;
+ assigned-clocks = <&k3_clks 157 10>;
+ assigned-clock-parents = <&k3_clks 157 18>;
+ #clock-cells = <0>;
+ };
};
dmss: bus@48000000 {
- compatible = "simple-mfd";
+ bootph-all;
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
dma-ranges;
@@ -72,6 +91,7 @@
ti,sci-dev-id = <25>;
secure_proxy_main: mailbox@4d000000 {
+ bootph-all;
compatible = "ti,am654-secure-proxy";
#mbox-cells = <1>;
reg-names = "target_data", "rt", "scfg";
@@ -101,8 +121,13 @@
<0x00 0x4c000000 0x00 0x20000>,
<0x00 0x4a820000 0x00 0x20000>,
<0x00 0x4aa40000 0x00 0x20000>,
- <0x00 0x4bc00000 0x00 0x100000>;
- reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
+ <0x00 0x4bc00000 0x00 0x100000>,
+ <0x00 0x48600000 0x00 0x8000>,
+ <0x00 0x484a4000 0x00 0x2000>,
+ <0x00 0x484c2000 0x00 0x2000>,
+ <0x00 0x48420000 0x00 0x2000>;
+ reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "bchan";
msi-parent = <&inta_main_dmss>;
#dma-cells = <3>;
@@ -118,8 +143,13 @@
reg = <0x00 0x485c0000 0x00 0x100>,
<0x00 0x4a800000 0x00 0x20000>,
<0x00 0x4aa00000 0x00 0x40000>,
- <0x00 0x4b800000 0x00 0x400000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+ <0x00 0x4b800000 0x00 0x400000>,
+ <0x00 0x485e0000 0x00 0x10000>,
+ <0x00 0x484a0000 0x00 0x2000>,
+ <0x00 0x484c0000 0x00 0x2000>,
+ <0x00 0x48430000 0x00 0x1000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "rflow";
msi-parent = <&inta_main_dmss>;
#dma-cells = <2>;
@@ -147,6 +177,7 @@
};
dmsc: system-controller@44043000 {
+ bootph-all;
compatible = "ti,k2g-sci";
ti,host-id = <12>;
mbox-names = "rx", "tx";
@@ -156,16 +187,19 @@
reg = <0x00 0x44043000 0x00 0xfe0>;
k3_pds: power-controller {
+ bootph-all;
compatible = "ti,sci-pm-domain";
#power-domain-cells = <2>;
};
k3_clks: clock-controller {
+ bootph-all;
compatible = "ti,k2g-sci-clk";
#clock-cells = <2>;
};
k3_reset: reset-controller {
+ bootph-all;
compatible = "ti,sci-reset";
#reset-cells = <2>;
};
@@ -174,7 +208,6 @@
crypto: crypto@40900000 {
compatible = "ti,am62-sa3ul";
reg = <0x00 0x40900000 0x00 0x1200>;
- power-domains = <&k3_pds 70 TI_SCI_PD_SHARED>;
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
@@ -185,6 +218,7 @@
};
secure_proxy_sa3: mailbox@43600000 {
+ bootph-pre-ram;
compatible = "ti,am654-secure-proxy";
#mbox-cells = <1>;
reg-names = "target_data", "rt", "scfg";
@@ -200,6 +234,7 @@
};
main_pmx0: pinctrl@f4000 {
+ bootph-all;
compatible = "pinctrl-single";
reg = <0x00 0xf4000 0x00 0x2ac>;
#pinctrl-cells = <1>;
@@ -208,12 +243,14 @@
};
main_esm: esm@420000 {
+ bootph-pre-ram;
compatible = "ti,j721e-esm";
reg = <0x00 0x420000 0x00 0x1000>;
ti,esm-pins = <160>, <161>, <162>, <163>, <177>, <178>;
};
main_timer0: timer@2400000 {
+ bootph-all;
compatible = "ti,am654-timer";
reg = <0x00 0x2400000 0x00 0x400>;
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
@@ -475,6 +512,9 @@
main_gpio0: gpio@600000 {
compatible = "ti,am64-gpio", "ti,keystone-gpio";
reg = <0x0 0x00600000 0x0 0x100>;
+ gpio-ranges = <&main_pmx0 0 0 32>,
+ <&main_pmx0 32 33 38>,
+ <&main_pmx0 70 72 22>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&main_gpio_intr>;
@@ -493,6 +533,10 @@
compatible = "ti,am64-gpio", "ti,keystone-gpio";
reg = <0x0 0x00601000 0x0 0x100>;
gpio-controller;
+ gpio-ranges = <&main_pmx0 0 94 41>,
+ <&main_pmx0 41 136 6>,
+ <&main_pmx0 47 143 3>,
+ <&main_pmx0 50 149 2>;
#gpio-cells = <2>;
interrupt-parent = <&main_gpio_intr>;
interrupts = <180>, <181>, <182>,
@@ -590,7 +634,7 @@
usb0: usb@31000000 {
compatible = "snps,dwc3";
- reg =<0x00 0x31000000 0x00 0x50000>;
+ reg = <0x00 0x31000000 0x00 0x50000>;
interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
<GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
interrupt-names = "host", "peripheral";
@@ -613,7 +657,7 @@
usb1: usb@31100000 {
compatible = "snps,dwc3";
- reg =<0x00 0x31100000 0x00 0x50000>;
+ reg = <0x00 0x31100000 0x00 0x50000>;
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
<GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
interrupt-names = "host", "peripheral";
@@ -648,6 +692,15 @@
};
};
+ gpu: gpu@fd00000 {
+ compatible = "ti,am62-gpu", "img,img-axe";
+ reg = <0x00 0x0fd00000 0x00 0x20000>;
+ clocks = <&k3_clks 187 0>;
+ clock-names = "core";
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 187 TI_SCI_PD_EXCLUSIVE>;
+ };
+
cpsw3g: ethernet@8000000 {
compatible = "ti,am642-cpsw-nuss";
#address-cells = <2>;
@@ -718,6 +771,31 @@
};
};
+ dss: dss@30200000 {
+ compatible = "ti,am625-dss";
+ reg = <0x00 0x30200000 0x00 0x1000>, /* common */
+ <0x00 0x30202000 0x00 0x1000>, /* vidl1 */
+ <0x00 0x30206000 0x00 0x1000>, /* vid */
+ <0x00 0x30207000 0x00 0x1000>, /* ovr1 */
+ <0x00 0x30208000 0x00 0x1000>, /* ovr2 */
+ <0x00 0x3020a000 0x00 0x1000>, /* vp1: Used for OLDI */
+ <0x00 0x3020b000 0x00 0x1000>; /* vp2: Used as DPI Out */
+ reg-names = "common", "vidl1", "vid",
+ "ovr1", "ovr2", "vp1", "vp2";
+ power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 186 6>,
+ <&dss_vp1_clk>,
+ <&k3_clks 186 2>;
+ clock-names = "fck", "vp1", "vp2";
+ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+
+ dss_ports: ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
hwspinlock: spinlock@2a000000 {
compatible = "ti,am64-hwspinlock";
reg = <0x00 0x2a000000 0x00 0x1000>;
@@ -913,4 +991,66 @@
power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
status = "disabled";
};
+
+ ti_csi2rx0: ticsi2rx@30102000 {
+ compatible = "ti,j721e-csi2rx-shim";
+ dmas = <&main_bcdma 0 0x4700 0>;
+ dma-names = "rx0";
+ reg = <0x00 0x30102000 0x00 0x1000>;
+ power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ status = "disabled";
+
+ cdns_csi2rx0: csi-bridge@30101000 {
+ compatible = "ti,j721e-csi2rx", "cdns,csi2rx";
+ reg = <0x00 0x30101000 0x00 0x1000>;
+ clocks = <&k3_clks 182 0>, <&k3_clks 182 3>, <&k3_clks 182 0>,
+ <&k3_clks 182 0>, <&k3_clks 182 4>, <&k3_clks 182 4>;
+ clock-names = "sys_clk", "p_clk", "pixel_if0_clk",
+ "pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk";
+ phys = <&dphy0>;
+ phy-names = "dphy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "disabled";
+ };
+
+ csi0_port1: port@1 {
+ reg = <1>;
+ status = "disabled";
+ };
+
+ csi0_port2: port@2 {
+ reg = <2>;
+ status = "disabled";
+ };
+
+ csi0_port3: port@3 {
+ reg = <3>;
+ status = "disabled";
+ };
+
+ csi0_port4: port@4 {
+ reg = <4>;
+ status = "disabled";
+ };
+ };
+ };
+ };
+
+ dphy0: phy@30110000 {
+ compatible = "cdns,dphy-rx";
+ reg = <0x00 0x30110000 0x00 0x1100>;
+ #phy-cells = <0>;
+ power-domains = <&k3_pds 185 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-mcu.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-mcu.dtsi
index 19fc38157d94..0e0b234581c6 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-mcu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-mcu.dtsi
@@ -7,6 +7,7 @@
&cbass_mcu {
mcu_pmx0: pinctrl@4084000 {
+ bootph-all;
compatible = "pinctrl-single";
reg = <0x00 0x04084000 0x00 0x88>;
#pinctrl-cells = <1>;
@@ -15,6 +16,7 @@
};
mcu_esm: esm@4100000 {
+ bootph-pre-ram;
compatible = "ti,j721e-esm";
reg = <0x00 0x4100000 0x00 0x1000>;
ti,esm-pins = <0>, <1>, <2>, <85>;
@@ -147,4 +149,28 @@
/* Tightly coupled to M4F */
status = "reserved";
};
+
+ mcu_mcan0: can@4e08000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x4e08000 0x00 0x200>,
+ <0x00 0x4e00000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 188 6>, <&k3_clks 188 1>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ status = "disabled";
+ };
+
+ mcu_mcan1: can@4e18000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x4e18000 0x00 0x200>,
+ <0x00 0x4e10000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 189 6>, <&k3_clks 189 1>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ status = "disabled";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dahlia.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dahlia.dtsi
index 3abd8d1d6761..bf6d27e70bc4 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dahlia.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dahlia.dtsi
@@ -8,6 +8,43 @@
* https://www.toradex.com/products/carrier-board/dahlia-carrier-board-kit
*/
+/ {
+ reg_1v8_sw: regulator-1v8-sw {
+ compatible = "regulator-fixed";
+ regulator-max-microvolt = <1800000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-name = "On-carrier +V1.8_SW";
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,bitclock-master = <&codec_dai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&codec_dai>;
+ simple-audio-card,name = "verdin-wm8904";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPOUTL",
+ "Headphone Jack", "HPOUTR",
+ "IN2L", "Line In Jack",
+ "IN2R", "Line In Jack",
+ "Headphone Jack", "MICBIAS",
+ "IN1L", "Headphone Jack";
+ simple-audio-card,widgets =
+ "Microphone", "Headphone Jack",
+ "Headphone", "Headphone Jack",
+ "Line", "Line In Jack";
+
+ codec_dai: simple-audio-card,codec {
+ clocks = <&audio_refclk1>;
+ sound-dai = <&wm8904_1a>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&mcasp0>;
+ };
+ };
+};
+
/* Verdin ETHs */
&cpsw3g {
status = "okay";
@@ -46,6 +83,22 @@
&main_i2c1 {
status = "okay";
+ /* Audio Codec */
+ wm8904_1a: audio-codec@1a {
+ compatible = "wlf,wm8904";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2s1_mclk>;
+ #sound-dai-cells = <0>;
+ clocks = <&audio_refclk1>;
+ clock-names = "mclk";
+ AVDD-supply = <&reg_1v8_sw>;
+ CPVDD-supply = <&reg_1v8_sw>;
+ DBVDD-supply = <&reg_1v8_sw>;
+ DCVDD-supply = <&reg_1v8_sw>;
+ MICVDD-supply = <&reg_1v8_sw>;
+ };
+
/* Current measurement into module VCC */
hwmon@40 {
compatible = "ti,ina219";
@@ -115,6 +168,11 @@
status = "okay";
};
+/* Verdin CAN_2 */
+&mcu_mcan0 {
+ status = "okay";
+};
+
/* Verdin UART_4 */
&mcu_uart0 {
status = "okay";
@@ -156,6 +214,5 @@
/* Verdin UART_2 */
&wkup_uart0 {
- /* FIXME: WKUP UART0 is used by DM firmware */
- status = "reserved";
+ status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dev.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dev.dtsi
index 846caee7dfa4..680071688dcb 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dev.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-dev.dtsi
@@ -8,6 +8,42 @@
* https://www.toradex.com/products/carrier-board/verdin-development-board-kit
*/
+/ {
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,bitclock-master = <&codec_dai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&codec_dai>;
+ simple-audio-card,name = "verdin-nau8822";
+ simple-audio-card,routing =
+ "Headphones", "LHP",
+ "Headphones", "RHP",
+ "Speaker", "LSPK",
+ "Speaker", "RSPK",
+ "Line Out", "AUXOUT1",
+ "Line Out", "AUXOUT2",
+ "LAUX", "Line In",
+ "RAUX", "Line In",
+ "LMICP", "Mic In",
+ "RMICP", "Mic In";
+ simple-audio-card,widgets =
+ "Headphones", "Headphones",
+ "Line Out", "Line Out",
+ "Speaker", "Speaker",
+ "Microphone", "Mic In",
+ "Line", "Line In";
+
+ codec_dai: simple-audio-card,codec {
+ clocks = <&audio_refclk1>;
+ sound-dai = <&nau8822_1a>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&mcasp0>;
+ };
+ };
+};
+
/* Verdin ETHs */
&cpsw3g {
pinctrl-names = "default";
@@ -65,6 +101,15 @@
&main_i2c1 {
status = "okay";
+ /* Audio Codec */
+ nau8822_1a: audio-codec@1a {
+ compatible = "nuvoton,nau8822";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2s1_mclk>;
+ #sound-dai-cells = <0>;
+ };
+
/* IO Expander */
gpio_expander_21: gpio@21 {
compatible = "nxp,pcal6416";
@@ -144,6 +189,11 @@
status = "okay";
};
+/* Verdin CAN_2 */
+&mcu_mcan0 {
+ status = "okay";
+};
+
/* Verdin UART_4 */
&mcu_uart0 {
status = "okay";
@@ -185,6 +235,5 @@
/* Verdin UART_2 */
&wkup_uart0 {
- /* FIXME: WKUP UART0 is used by DM firmware */
- status = "reserved";
+ status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-mallow.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-mallow.dtsi
new file mode 100644
index 000000000000..17b93534f658
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-mallow.dtsi
@@ -0,0 +1,188 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ *
+ * Common dtsi for Verdin AM62 SoM on Mallow carrier board
+ *
+ * https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
+ * https://www.toradex.com/products/carrier-board/mallow-carrier-board
+ */
+
+#include <dt-bindings/leds/common.h>
+
+/ {
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_qspi1_clk_gpio>,
+ <&pinctrl_qspi1_cs_gpio>,
+ <&pinctrl_qspi1_io0_gpio>,
+ <&pinctrl_qspi1_io1_gpio>;
+
+ /* SODIMM 52 - USER_LED_1_RED */
+ led-0 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <1>;
+ gpios = <&main_gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 54 - USER_LED_1_GREEN */
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <1>;
+ gpios = <&main_gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 56 - USER_LED_2_RED */
+ led-2 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <2>;
+ gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* SODIMM 58 - USER_LED_2_GREEN */
+ led-3 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_DEBUG;
+ function-enumerator = <2>;
+ gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+/* Verdin ETH */
+&cpsw3g {
+ status = "okay";
+};
+
+/* Verdin MDIO */
+&cpsw3g_mdio {
+ status = "okay";
+};
+
+/* Verdin ETH_1*/
+&cpsw_port1 {
+ status = "okay";
+};
+
+/* Verdin PWM_1 and PWM_2*/
+&epwm0 {
+ status = "okay";
+};
+
+/* Verdin PWM_3 DSI */
+&epwm1 {
+ status = "okay";
+};
+
+&main_gpio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ctrl_sleep_moci>,
+ <&pinctrl_gpio_1>,
+ <&pinctrl_gpio_2>,
+ <&pinctrl_gpio_3>,
+ <&pinctrl_gpio_4>;
+};
+
+/* Verdin I2C_1 */
+&main_i2c1 {
+ status = "okay";
+
+ /* Temperature sensor */
+ sensor@4f {
+ compatible = "ti,tmp1075";
+ reg = <0x4f>;
+ };
+
+ /* EEPROM */
+ eeprom@57 {
+ compatible = "st,24c02", "atmel,24c02";
+ reg = <0x57>;
+ pagesize = <16>;
+ };
+};
+
+/* Verdin I2C_2 DSI */
+&main_i2c2 {
+ status = "okay";
+};
+
+/* Verdin I2C_4 CSI */
+&main_i2c3 {
+ status = "okay";
+};
+
+/* Verdin CAN_1 */
+&main_mcan0 {
+ status = "okay";
+};
+
+/* Verdin SPI_1 */
+&main_spi1 {
+ pinctrl-0 = <&pinctrl_spi1>,
+ <&pinctrl_spi1_cs0>,
+ <&pinctrl_qspi1_cs2_gpio>;
+ cs-gpios = <0>, <&main_gpio0 12 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+/* Verdin UART_3 */
+&main_uart0 {
+ status = "okay";
+};
+
+/* Verdin UART_1 */
+&main_uart1 {
+ status = "okay";
+};
+
+/* Verdin I2C_3_HDMI */
+&mcu_i2c0 {
+ status = "okay";
+};
+
+/* Verdin CAN_2 */
+&mcu_mcan0 {
+ status = "okay";
+};
+
+/* Verdin UART_4 */
+&mcu_uart0 {
+ status = "okay";
+};
+
+/* Verdin SD_1 */
+&sdhci1 {
+ status = "okay";
+};
+
+/* Verdin USB_1 */
+&usbss0 {
+ status = "okay";
+};
+
+&usb0 {
+ status = "okay";
+};
+
+/* Verdin USB_2 */
+&usbss1 {
+ status = "okay";
+};
+
+&usb1 {
+ status = "okay";
+};
+
+/* Verdin CTRL_WAKE1_MICO# */
+&verdin_gpio_keys {
+ status = "okay";
+};
+
+/* Verdin UART_2 */
+&wkup_uart0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-wifi.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-wifi.dtsi
index 90ddc71bcd30..a6808b10c7b2 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-wifi.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-wifi.dtsi
@@ -35,5 +35,11 @@
&main_uart5 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart5>;
+ uart-has-rtscts;
status = "okay";
+
+ bluetooth {
+ compatible = "nxp,88w8987-bt";
+ fw-init-baudrate = <3000000>;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-yavia.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-yavia.dtsi
index cb11d6e7f525..997dfafd27eb 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-yavia.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin-yavia.dtsi
@@ -167,6 +167,11 @@
status = "okay";
};
+/* Verdin CAN_2 */
+&mcu_mcan0 {
+ status = "okay";
+};
+
/* Verdin UART_4 */
&mcu_uart0 {
status = "okay";
@@ -202,6 +207,5 @@
/* Verdin UART_2 */
&wkup_uart0 {
- /* FIXME: WKUP UART0 is used by DM firmware */
- status = "reserved";
+ status = "okay";
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin.dtsi
index 57dd061911ab..6a06724b6d16 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-verdin.dtsi
@@ -19,6 +19,8 @@
};
aliases {
+ can0 = &main_mcan0;
+ can1 = &mcu_mcan0;
ethernet0 = &cpsw_port1;
ethernet1 = &cpsw_port2;
i2c0 = &main_i2c0;
@@ -231,6 +233,13 @@
>;
};
+ /* Verdin SPI_1 CS as GPIO */
+ pinctrl_qspi1_io4_gpio: main-gpio0-7-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x001c, PIN_INPUT, 7) /* (J23) OSPI0_D4.GPIO0_7 */ /* SODIMM 202 */
+ >;
+ };
+
/* Verdin QSPI_1_CS# as GPIO (conflict with Verdin QSPI_1 interface) */
pinctrl_qspi1_cs_gpio: main-gpio0-11-default-pins {
pinctrl-single,pins = <
@@ -597,12 +606,18 @@
pinctrl_spi1: main-spi1-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x0020, PIN_INPUT, 1) /* (J25) OSPI0_D5.SPI1_CLK */ /* SODIMM 196 */
- AM62X_IOPAD(0x001c, PIN_INPUT, 1) /* (J23) OSPI0_D4.SPI1_CS0 */ /* SODIMM 202 */
AM62X_IOPAD(0x0024, PIN_INPUT, 1) /* (H25) OSPI0_D6.SPI1_D0 */ /* SODIMM 200 */
AM62X_IOPAD(0x0028, PIN_INPUT, 1) /* (J22) OSPI0_D7.SPI1_D1 */ /* SODIMM 198 */
>;
};
+ /* Verdin SPI_1 CS */
+ pinctrl_spi1_cs0: main-spi1-cs0-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x001c, PIN_INPUT, 1) /* (J23) OSPI0_D4.SPI1_CS0 */ /* SODIMM 202 */
+ >;
+ };
+
/* ETH_25MHz_CLK */
pinctrl_eth_clock: main-system-clkout0-default-pins {
pinctrl-single,pins = <
@@ -732,6 +747,14 @@
>;
};
+ /* Verdin CAN_2 */
+ pinctrl_mcu_mcan0: mcu-mcan0-default-pins {
+ pinctrl-single,pins = <
+ AM62X_MCU_IOPAD(0x0038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */ /* SODIMM 26 */
+ AM62X_MCU_IOPAD(0x0034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */ /* SODIMM 24 */
+ >;
+ };
+
/* Verdin UART_4 - Reserved to Cortex-M4 */
pinctrl_mcu_uart0: mcu-uart0-default-pins {
pinctrl-single,pins = <
@@ -758,6 +781,11 @@
};
};
+/* VERDIN I2S_1_MCLK */
+&audio_refclk1 {
+ assigned-clock-rates = <25000000>;
+};
+
&cpsw3g {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rgmii1>;
@@ -800,6 +828,26 @@
};
};
+&dss {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_parallel_rgb>;
+ status = "disabled";
+};
+
+&dss_ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* VP2: DPI Output */
+ port@1 {
+ reg = <1>;
+
+ dpi_out: endpoint {
+ remote-endpoint = <&rgb_in>;
+ };
+ };
+};
+
/* Verdin PWM_1, PWM_2 */
&epwm0 {
pinctrl-names = "default";
@@ -1026,6 +1074,7 @@
vddc-supply = <&reg_1v2_dsi>;
vddmipi-supply = <&reg_1v2_dsi>;
vddio-supply = <&reg_1v8_dsi>;
+ status = "disabled";
dsi_bridge_ports: ports {
#address-cells = <1>;
@@ -1036,6 +1085,7 @@
rgb_in: endpoint {
data-lines = <18>;
+ remote-endpoint = <&dpi_out>;
};
};
@@ -1238,12 +1288,10 @@
status = "disabled";
};
-/* Verdin CAN_2 - Reserved to Cortex-M4 */
-
/* Verdin SPI_1 */
&main_spi1 {
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_spi1>;
+ pinctrl-0 = <&pinctrl_spi1>, <&pinctrl_spi1_cs0>;
ti,pindir-d0-out-d1-in;
status = "disabled";
};
@@ -1333,6 +1381,13 @@
"";
};
+/* Verdin CAN_2 */
+&mcu_mcan0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mcu_mcan0>;
+ status = "disabled";
+};
+
/* Verdin UART_4 - Cortex-M4 UART */
&mcu_uart0 {
pinctrl-names = "default";
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62-wakeup.dtsi
index eae052887186..fef76f52a52e 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62-wakeup.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62-wakeup.dtsi
@@ -7,6 +7,7 @@
&cbass_wakeup {
wkup_conf: syscon@43000000 {
+ bootph-all;
compatible = "syscon", "simple-mfd";
reg = <0x00 0x43000000 0x00 0x20000>;
#address-cells = <1>;
@@ -14,6 +15,7 @@
ranges = <0x0 0x00 0x43000000 0x20000>;
chipid: chipid@14 {
+ bootph-all;
compatible = "ti,am654-chipid";
reg = <0x14 0x4>;
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62.dtsi
index 5e72c445f37a..f1e15206e1ce 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62.dtsi
@@ -47,6 +47,7 @@
};
cbass_main: bus@f0000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -86,6 +87,7 @@
<0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>;
cbass_mcu: bus@4000000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -93,6 +95,7 @@
};
cbass_wakeup: bus@b00000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -102,6 +105,14 @@
};
};
+ dss_vp1_clk: clock-divider-oldi {
+ compatible = "fixed-factor-clock";
+ clocks = <&k3_clks 186 0>;
+ #clock-cells = <0>;
+ clock-div = <7>;
+ clock-mult = <1>;
+ };
+
#include "k3-am62-thermal.dtsi"
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-ov5640.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-ov5640.dtso
new file mode 100644
index 000000000000..5e80ca7033ba
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-ov5640.dtso
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * ALINX AN5641 & Digilent PCam 5C - OV5640 camera module
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ clk_ov5640_fixed: ov5640-xclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <12000000>;
+ };
+};
+
+&main_gpio0 {
+ p11-hog {
+ /* P11 - CSI2_CAMERA_GPIO1 */
+ gpio-hog;
+ gpios = <11 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "CSI2_CAMERA_GPIO1";
+ };
+};
+
+&wkup_i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+
+ clocks = <&clk_ov5640_fixed>;
+ clock-names = "xclk";
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2rx0_in_sensor>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&cdns_csi2rx0 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "okay";
+
+ csi2rx0_in_sensor: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&dphy0 {
+ status = "okay";
+};
+
+&ti_csi2rx0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso
new file mode 100644
index 000000000000..5e1cbbc27c8f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Technexion TEVI-OV5640-*-RPI - OV5640 camera module
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ clk_ov5640_fixed: ov5640-xclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
+};
+
+&main_gpio0 {
+ p11-hog {
+ /* P11 - CSI2_CAMERA_GPIO1 */
+ gpio-hog;
+ gpios = <11 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "CSI2_CAMERA_GPIO1";
+ };
+};
+
+&wkup_i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+
+ clocks = <&clk_ov5640_fixed>;
+ clock-names = "xclk";
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2rx0_in_sensor>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&cdns_csi2rx0 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "okay";
+
+ csi2rx0_in_sensor: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&dphy0 {
+ status = "okay";
+};
+
+&ti_csi2rx0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay.dts
index 589bf998bc52..eadbdd9ffe37 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-beagleplay.dts
@@ -14,7 +14,7 @@
#include "k3-am625.dtsi"
/ {
- compatible = "beagle,am625-beagleplay", "ti,am625";
+ compatible = "beagle,am625-beagleplay", "ti,am625";
model = "BeagleBoard.org BeaglePlay";
aliases {
@@ -46,6 +46,7 @@
};
memory@80000000 {
+ bootph-pre-ram;
device_type = "memory";
/* 2G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
@@ -58,7 +59,7 @@
ramoops: ramoops@9ca00000 {
compatible = "ramoops";
- reg = <0x00 0x9c700000 0x00 0x00100000>;
+ reg = <0x00 0x9ca00000 0x00 0x00100000>;
record-size = <0x8000>;
console-size = <0x8000>;
ftrace-size = <0x00>;
@@ -83,6 +84,7 @@
};
vsys_5v0: regulator-1 {
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vsys_5v0";
regulator-min-microvolt = <5000000>;
@@ -93,6 +95,7 @@
vdd_3v3: regulator-2 {
/* output of TLV62595DMQR-U12 */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vdd_3v3";
regulator-min-microvolt = <3300000>;
@@ -118,6 +121,7 @@
vdd_3v3_sd: regulator-4 {
/* output of TPS22918DBVR-U21 */
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&vdd_3v3_sd_pins_default>;
@@ -132,6 +136,7 @@
};
vdd_sd_dv: regulator-5 {
+ bootph-all;
compatible = "regulator-gpio";
regulator-name = "sd_hs200_switch";
pinctrl-names = "default";
@@ -146,9 +151,11 @@
};
leds {
+ bootph-all;
compatible = "gpio-leds";
led-0 {
+ bootph-all;
gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_HEARTBEAT;
@@ -156,6 +163,7 @@
};
led-1 {
+ bootph-all;
gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "disk-activity";
function = LED_FUNCTION_DISK_ACTIVITY;
@@ -163,16 +171,19 @@
};
led-2 {
+ bootph-all;
gpios = <&main_gpio0 5 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_CPU;
};
led-3 {
+ bootph-all;
gpios = <&main_gpio0 6 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_LAN;
};
led-4 {
+ bootph-all;
gpios = <&main_gpio0 9 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_WLAN;
};
@@ -192,6 +203,34 @@
};
+ hdmi0: connector-hdmi {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&it66121_out>;
+ };
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "it66121 HDMI";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&hdmi_dailink_master>;
+ simple-audio-card,frame-master = <&hdmi_dailink_master>;
+
+ hdmi_dailink_master: simple-audio-card,cpu {
+ sound-dai = <&mcasp1>;
+ system-clock-direction-out;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&it66121>;
+ };
+ };
+
/* Workaround for errata i2329 - just use mdio bitbang */
mdio0: mdio {
compatible = "virtual,mdio-gpio";
@@ -217,6 +256,7 @@
&main_pmx0 {
gpio0_pins_default: gpio0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x0004, PIN_INPUT, 7) /* (G25) OSPI0_LBCLKO.GPIO0_1 */
AM62X_IOPAD(0x0008, PIN_INPUT, 7) /* (J24) OSPI0_DQS.GPIO0_2 */
@@ -236,6 +276,7 @@
};
vdd_sd_dv_pins_default: vdd-sd-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x0244, PIN_OUTPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */
>;
@@ -255,6 +296,7 @@
};
local_i2c_pins_default: local-i2c-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
AM62X_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */
@@ -293,6 +335,7 @@
};
emmc_pins_default: emmc-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x0220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
AM62X_IOPAD(0x0218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
@@ -308,12 +351,14 @@
};
vdd_3v3_sd_pins_default: vdd-3v3-sd-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x01c4, PIN_INPUT, 7) /* (B14) SPI0_D1_GPIO1_19 */
>;
};
sd_pins_default: sd-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x023c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
AM62X_IOPAD(0x0234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
@@ -390,6 +435,7 @@
};
mikrobus_gpio_pins_default: mikrobus-gpio-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x019c, PIN_INPUT, 7) /* (B18) MCASP0_AXR1.GPIO1_9 */
AM62X_IOPAD(0x01a0, PIN_INPUT, 7) /* (E18) MCASP0_AXR0.GPIO1_10 */
@@ -397,7 +443,8 @@
>;
};
- console_pins_default: console-default-pins {
+ main_uart0_pins_default: main-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x01c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
AM62X_IOPAD(0x01cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
@@ -422,6 +469,57 @@
AM62X_IOPAD(0x01f4, PIN_INPUT_PULLUP, 0) /* (D16) EXTINTn */
>;
};
+
+ hdmi_gpio_pins_default: hdmi-gpio-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x0094, PIN_INPUT_PULLUP | PIN_DEBOUNCE_CONF6, 7) /* (N20) GPMC0_BE1n.GPIO0_36 */
+ AM62X_IOPAD(0x0054, PIN_OUTPUT_PULLUP, 7) /* (P21) GPMC0_AD6.GPIO0_21 */
+ >;
+ };
+
+ mcasp_hdmi_pins_default: mcasp-hdmi-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x0090, PIN_INPUT, 2) /* (M24) GPMC0_BE0n_CLE.MCASP1_ACLKX */
+ AM62X_IOPAD(0x0098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
+ AM62X_IOPAD(0x008c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEn.MCASP1_AXR0 */
+ AM62X_IOPAD(0x0088, PIN_INPUT, 2) /* (L24) GPMC0_OEn_REn.MCASP1_AXR1 */
+ AM62X_IOPAD(0x0084, PIN_INPUT, 2) /* (L23) GPMC0_ADVn_ALE.MCASP1_AXR2 */
+ AM62X_IOPAD(0x007c, PIN_INPUT, 2) /* (P25) GPMC0_CLK.MCASP1_AXR3 */
+ >;
+ };
+
+ dss0_pins_default: dss0-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x0100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */
+ AM62X_IOPAD(0x00f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */
+ AM62X_IOPAD(0x0104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */
+ AM62X_IOPAD(0x00fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */
+ AM62X_IOPAD(0x00b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
+ AM62X_IOPAD(0x00bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */
+ AM62X_IOPAD(0x00c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */
+ AM62X_IOPAD(0x00c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */
+ AM62X_IOPAD(0x00c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */
+ AM62X_IOPAD(0x00cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */
+ AM62X_IOPAD(0x00d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */
+ AM62X_IOPAD(0x00d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */
+ AM62X_IOPAD(0x00d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */
+ AM62X_IOPAD(0x00dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */
+ AM62X_IOPAD(0x00e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */
+ AM62X_IOPAD(0x00e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */
+ AM62X_IOPAD(0x00e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */
+ AM62X_IOPAD(0x00ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */
+ AM62X_IOPAD(0x00f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */
+ AM62X_IOPAD(0x00f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */
+ AM62X_IOPAD(0x005c, PIN_OUTPUT, 1) /* (R24) GPMC0_AD8.VOUT0_DATA16 */
+ AM62X_IOPAD(0x0060, PIN_OUTPUT, 1) /* (R25) GPMC0_AD9.VOUT0_DATA17 */
+ AM62X_IOPAD(0x0064, PIN_OUTPUT, 1) /* (T25) GPMC0_AD10.VOUT0_DATA18 */
+ AM62X_IOPAD(0x0068, PIN_OUTPUT, 1) /* (R21) GPMC0_AD11.VOUT0_DATA19 */
+ AM62X_IOPAD(0x006c, PIN_OUTPUT, 1) /* (T22) GPMC0_AD12.VOUT0_DATA20 */
+ AM62X_IOPAD(0x0070, PIN_OUTPUT, 1) /* (T24) GPMC0_AD13.VOUT0_DATA21 */
+ AM62X_IOPAD(0x0074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
+ AM62X_IOPAD(0x0078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
+ >;
+ };
};
&mcu_pmx0 {
@@ -432,7 +530,7 @@
>;
};
- gbe_pmx_obsclk: gbe-pmx-clk-default {
+ gbe_pmx_obsclk: gbe-pmx-obsclk-default-pins {
pinctrl-single,pins = <
AM62X_MCU_IOPAD(0x0004, PIN_OUTPUT, 1) /* (B8) MCU_SPI0_CS1.MCU_OBSCLK0 */
>;
@@ -518,6 +616,7 @@
};
&main_gpio0 {
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&gpio0_pins_default>;
gpio-line-names = "BL_EN_3V3", "SPE_PO_EN", "RTC_INT", /* 0-2 */
@@ -537,6 +636,7 @@
};
&main_gpio1 {
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&mikrobus_gpio_pins_default>;
gpio-line-names = "", "", "", "", "", /* 0-4 */
@@ -554,6 +654,7 @@
};
&main_i2c0 {
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&local_i2c_pins_default>;
clock-frequency = <400000>;
@@ -572,6 +673,7 @@
};
tps65219: pmic@30 {
+ bootph-all;
compatible = "ti,tps65219";
reg = <0x30>;
buck1-supply = <&vsys_5v0>;
@@ -670,6 +772,42 @@
pinctrl-0 = <&i2c2_1v8_pins_default>;
clock-frequency = <100000>;
status = "okay";
+
+ it66121: bridge-hdmi@4c {
+ compatible = "ite,it66121";
+ reg = <0x4c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_gpio_pins_default>;
+ vcn33-supply = <&vdd_3v3>;
+ vcn18-supply = <&buck2_reg>;
+ vrf12-supply = <&buck3_reg>;
+ reset-gpios = <&main_gpio0 21 GPIO_ACTIVE_LOW>;
+ interrupt-parent = <&main_gpio0>;
+ interrupts = <36 IRQ_TYPE_EDGE_FALLING>;
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ it66121_in: endpoint {
+ bus-width = <24>;
+ remote-endpoint = <&dpi1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ it66121_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
};
&main_i2c3 {
@@ -686,6 +824,7 @@
};
&sdhci0 {
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins_default>;
ti,driver-strength-ohm = <50>;
@@ -695,6 +834,7 @@
&sdhci1 {
/* SD/MMC */
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&sd_pins_default>;
@@ -735,8 +875,9 @@
};
&main_uart0 {
+ bootph-all;
pinctrl-names = "default";
- pinctrl-0 = <&console_pins_default>;
+ pinctrl-0 = <&main_uart0_pins_default>;
status = "okay";
};
@@ -755,4 +896,45 @@
pinctrl-names = "default";
pinctrl-0 = <&wifi_debug_uart_pins_default>;
status = "okay";
+
+ mcu {
+ compatible = "ti,cc1352p7";
+ reset-gpios = <&main_gpio0 72 GPIO_ACTIVE_LOW>;
+ vdds-supply = <&vdd_3v3>;
+ };
+};
+
+&dss {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&dss0_pins_default>;
+};
+
+&dss_ports {
+ /* VP2: DPI Output */
+ port@1 {
+ reg = <1>;
+
+ dpi1_out: endpoint {
+ remote-endpoint = <&it66121_in>;
+ };
+ };
+};
+
+&mcasp1 {
+ status = "okay";
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcasp_hdmi_pins_default>;
+ auxclk-fs-ratio = <2177>;
+ op-mode = <0>; /* MCASP_IIS_MODE */
+ tdm-slots = <2>;
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
+ 1 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ >;
+ tx-num-evt = <32>;
+ rx-num-evt = <32>;
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-phyboard-lyra-rdk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am625-phyboard-lyra-rdk.dts
index a438baf542c2..4bc0134c987d 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am625-phyboard-lyra-rdk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-phyboard-lyra-rdk.dts
@@ -35,6 +35,18 @@
standby-gpios = <&gpio_exp 1 GPIO_ACTIVE_HIGH>;
};
+ hdmi0: connector-hdmi {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&sii9022_out>;
+ };
+ };
+ };
+
keys {
compatible = "gpio-keys";
autorepeat;
@@ -93,6 +105,37 @@
>;
};
+ hdmi_int_pins_default: hdmi-int-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x040, PIN_INPUT, 7) /* (N23) GPMC0_AD1.GPIO0_16 */
+ >;
+ };
+
+ main_dss0_pins_default: main-dss0-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
+ AM62X_IOPAD(0x0bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */
+ AM62X_IOPAD(0x0e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */
+ AM62X_IOPAD(0x0e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */
+ AM62X_IOPAD(0x0e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */
+ AM62X_IOPAD(0x0ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */
+ AM62X_IOPAD(0x0f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */
+ AM62X_IOPAD(0x0f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */
+ AM62X_IOPAD(0x0c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */
+ AM62X_IOPAD(0x0c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */
+ AM62X_IOPAD(0x0c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */
+ AM62X_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */
+ AM62X_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */
+ AM62X_IOPAD(0x0d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */
+ AM62X_IOPAD(0x0d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */
+ AM62X_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */
+ AM62X_IOPAD(0x0fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */
+ AM62X_IOPAD(0x0f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */
+ AM62X_IOPAD(0x104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */
+ AM62X_IOPAD(0x100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */
+ >;
+ };
+
main_i2c1_pins_default: main-i2c1-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */
@@ -184,10 +227,30 @@
};
};
+&dss {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_dss0_pins_default>;
+ status = "okay";
+};
+
+&dss_ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* VP2: DPI/HDMI Output */
+ port@1 {
+ reg = <1>;
+
+ dpi1_out: endpoint {
+ remote-endpoint = <&sii9022_in>;
+ };
+ };
+};
+
&main_i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
- clock-frequency = <400000>;
+ clock-frequency = <100000>;
status = "okay";
gpio_exp: gpio-expander@21 {
@@ -201,12 +264,43 @@
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
- gpio-line-names = "GPIO0_HDMI_RST", "GPIO1_CAN0_nEN",
+ gpio-line-names = "", "GPIO1_CAN0_nEN",
"GPIO2_LED2", "GPIO3_LVDS_GPIO",
"GPIO4_BUT2", "GPIO5_LVDS_BKLT_EN",
"GPIO6_ETH1_USER_RESET", "GPIO7_AUDIO_USER_RESET";
};
+ sii9022: bridge-hdmi@39 {
+ compatible = "sil,sii9022";
+ reg = <0x39>;
+
+ interrupt-parent = <&main_gpio0>;
+ interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_int_pins_default>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sii9022_in: endpoint {
+ remote-endpoint = <&dpi1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ sii9022_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
+
eeprom@51 {
compatible = "atmel,24c02";
pagesize = <16>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-sk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am625-sk.dts
index 3f9ef4053aa6..b18092497c9a 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am625-sk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-sk.dts
@@ -31,6 +31,7 @@
vmain_pd: regulator-0 {
/* TPS65988 PD CONTROLLER OUTPUT */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vmain_pd";
regulator-min-microvolt = <5000000>;
@@ -41,6 +42,7 @@
vcc_5v0: regulator-1 {
/* Output of LM34936 */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vcc_5v0";
regulator-min-microvolt = <5000000>;
@@ -52,6 +54,7 @@
vcc_3v3_sys: regulator-2 {
/* output of LM61460-Q1 */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_sys";
regulator-min-microvolt = <3300000>;
@@ -63,6 +66,7 @@
vdd_mmc1: regulator-3 {
/* TPS22918DBVR */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vdd_mmc1";
regulator-min-microvolt = <3300000>;
@@ -75,6 +79,7 @@
vdd_sd_dv: regulator-4 {
/* Output of TLV71033 */
+ bootph-all;
compatible = "regulator-gpio";
regulator-name = "tlv71033";
pinctrl-names = "default";
@@ -102,6 +107,7 @@
&main_pmx0 {
main_rgmii2_pins_default: main-rgmii2-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x184, PIN_INPUT, 0) /* (AE23) RGMII2_RD0 */
AM62X_IOPAD(0x188, PIN_INPUT, 0) /* (AB20) RGMII2_RD1 */
@@ -119,6 +125,7 @@
};
ospi0_pins_default: ospi0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x000, PIN_OUTPUT, 0) /* (H24) OSPI0_CLK */
AM62X_IOPAD(0x02c, PIN_OUTPUT, 0) /* (F23) OSPI0_CSn0 */
@@ -135,20 +142,32 @@
};
vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x07c, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO0_31 */
>;
};
main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
>;
};
};
+&main_gpio0 {
+ bootph-all;
+};
+
+&main_gpio1 {
+ bootph-all;
+};
+
&main_i2c1 {
+ bootph-all;
exp1: gpio@22 {
+ bootph-all;
compatible = "ti,tca6424";
reg = <0x22>;
gpio-controller;
@@ -207,12 +226,18 @@
};
};
+&fss {
+ bootph-all;
+};
+
&ospi0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ospi0_pins_default>;
- flash@0{
+ flash@0 {
+ bootph-all;
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <8>;
@@ -225,6 +250,7 @@
cdns,read-delay = <4>;
partitions {
+ bootph-all;
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
@@ -260,6 +286,7 @@
};
partition@3fc0000 {
+ bootph-pre-ram;
label = "ospi.phypattern";
reg = <0x3fc0000 0x40000>;
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-nonwifi-mallow.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-nonwifi-mallow.dts
new file mode 100644
index 000000000000..9cae12106e0e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-nonwifi-mallow.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ *
+ * https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
+ * https://www.toradex.com/products/carrier-board/mallow-carrier-board
+ */
+
+/dts-v1/;
+
+#include "k3-am625.dtsi"
+#include "k3-am62-verdin.dtsi"
+#include "k3-am62-verdin-nonwifi.dtsi"
+#include "k3-am62-verdin-mallow.dtsi"
+
+/ {
+ model = "Toradex Verdin AM62 on Mallow Board";
+ compatible = "toradex,verdin-am62-nonwifi-mallow",
+ "toradex,verdin-am62-nonwifi",
+ "toradex,verdin-am62",
+ "ti,am625";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-wifi-mallow.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-wifi-mallow.dts
new file mode 100644
index 000000000000..81d834b22649
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am625-verdin-wifi-mallow.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ *
+ * https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
+ * https://www.toradex.com/products/carrier-board/mallow-carrier-board
+ */
+
+/dts-v1/;
+
+#include "k3-am625.dtsi"
+#include "k3-am62-verdin.dtsi"
+#include "k3-am62-verdin-wifi.dtsi"
+#include "k3-am62-verdin-mallow.dtsi"
+
+/ {
+ model = "Toradex Verdin AM62 WB on Mallow Board";
+ compatible = "toradex,verdin-am62-wifi-mallow",
+ "toradex,verdin-am62-wifi",
+ "toradex,verdin-am62",
+ "ti,am625";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62a-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62a-main.dtsi
index 8b315cc61550..f0b8c9ab1459 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62a-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62a-main.dtsi
@@ -56,7 +56,7 @@
};
epwm_tbclk: clock-controller@4130 {
- compatible = "ti,am62-epwm-tbclk", "syscon";
+ compatible = "ti,am62-epwm-tbclk";
reg = <0x4130 0x4>;
#clock-cells = <1>;
};
@@ -101,8 +101,13 @@
<0x00 0x4c000000 0x00 0x20000>,
<0x00 0x4a820000 0x00 0x20000>,
<0x00 0x4aa40000 0x00 0x20000>,
- <0x00 0x4bc00000 0x00 0x100000>;
- reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
+ <0x00 0x4bc00000 0x00 0x100000>,
+ <0x00 0x48600000 0x00 0x8000>,
+ <0x00 0x484a4000 0x00 0x2000>,
+ <0x00 0x484c2000 0x00 0x2000>,
+ <0x00 0x48420000 0x00 0x2000>;
+ reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "bchan";
msi-parent = <&inta_main_dmss>;
#dma-cells = <3>;
ti,sci = <&dmsc>;
@@ -117,8 +122,13 @@
reg = <0x00 0x485c0000 0x00 0x100>,
<0x00 0x4a800000 0x00 0x20000>,
<0x00 0x4aa00000 0x00 0x40000>,
- <0x00 0x4b800000 0x00 0x400000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+ <0x00 0x4b800000 0x00 0x400000>,
+ <0x00 0x485e0000 0x00 0x10000>,
+ <0x00 0x484a0000 0x00 0x2000>,
+ <0x00 0x484c0000 0x00 0x2000>,
+ <0x00 0x48430000 0x00 0x1000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "rflow";
msi-parent = <&inta_main_dmss>;
#dma-cells = <2>;
ti,sci = <&dmsc>;
@@ -144,14 +154,52 @@
};
};
+ dmss_csi: bus@4e000000 {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-ranges;
+ ranges = <0x00 0x4e000000 0x00 0x4e000000 0x00 0x300000>;
+
+ ti,sci-dev-id = <198>;
+
+ inta_main_dmss_csi: interrupt-controller@4e0a0000 {
+ compatible = "ti,sci-inta";
+ reg = <0x00 0x4e0a0000 0x00 0x8000>;
+ #interrupt-cells = <0>;
+ interrupt-controller;
+ interrupt-parent = <&gic500>;
+ msi-controller;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <200>;
+ ti,interrupt-ranges = <0 237 8>;
+ ti,unmapped-event-sources = <&main_bcdma_csi>;
+ power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>;
+ };
+
+ main_bcdma_csi: dma-controller@4e230000 {
+ compatible = "ti,am62a-dmss-bcdma-csirx";
+ reg = <0x00 0x4e230000 0x00 0x100>,
+ <0x00 0x4e180000 0x00 0x8000>,
+ <0x00 0x4e100000 0x00 0x10000>;
+ reg-names = "gcfg", "rchanrt", "ringrt";
+ msi-parent = <&inta_main_dmss_csi>;
+ #dma-cells = <3>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <199>;
+ ti,sci-rm-range-rchan = <0x21>;
+ power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>;
+ };
+ };
+
dmsc: system-controller@44043000 {
compatible = "ti,k2g-sci";
reg = <0x00 0x44043000 0x00 0xfe0>;
reg-names = "debug_messages";
ti,host-id = <12>;
mbox-names = "rx", "tx";
- mboxes= <&secure_proxy_main 12>,
- <&secure_proxy_main 13>;
+ mboxes = <&secure_proxy_main 12>,
+ <&secure_proxy_main 13>;
k3_pds: power-controller {
compatible = "ti,sci-pm-domain";
@@ -462,7 +510,7 @@
<193>, <194>, <195>;
interrupt-controller;
#interrupt-cells = <2>;
- ti,ngpio = <87>;
+ ti,ngpio = <92>;
ti,davinci-gpio-unbanked = <0>;
power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 77 0>;
@@ -480,7 +528,7 @@
<183>, <184>, <185>;
interrupt-controller;
#interrupt-cells = <2>;
- ti,ngpio = <88>;
+ ti,ngpio = <52>;
ti,davinci-gpio-unbanked = <0>;
power-domains = <&k3_pds 78 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 78 0>;
@@ -527,7 +575,7 @@
usb0: usb@31000000 {
compatible = "snps,dwc3";
- reg =<0x00 0x31000000 0x00 0x50000>;
+ reg = <0x00 0x31000000 0x00 0x50000>;
interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
<GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
interrupt-names = "host", "peripheral";
@@ -550,7 +598,7 @@
usb1: usb@31100000 {
compatible = "snps,dwc3";
- reg =<0x00 0x31100000 0x00 0x50000>;
+ reg = <0x00 0x31100000 0x00 0x50000>;
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
<GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
interrupt-names = "host", "peripheral";
@@ -816,4 +864,125 @@
clock-names = "fck";
status = "disabled";
};
+
+ mcasp0: audio-controller@2b00000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b00000 0x00 0x2000>,
+ <0x00 0x02b08000 0x00 0x400>;
+ reg-names = "mpu", "dat";
+ interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+
+ dmas = <&main_bcdma 0 0xc500 0>, <&main_bcdma 0 0x4500 0>;
+ dma-names = "tx", "rx";
+
+ clocks = <&k3_clks 190 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 190 0>;
+ assigned-clock-parents = <&k3_clks 190 2>;
+ power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp1: audio-controller@2b10000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b10000 0x00 0x2000>,
+ <0x00 0x02b18000 0x00 0x400>;
+ reg-names = "mpu", "dat";
+ interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 237 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+
+ dmas = <&main_bcdma 0 0xc501 0>, <&main_bcdma 0 0x4501 0>;
+ dma-names = "tx", "rx";
+
+ clocks = <&k3_clks 191 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 191 0>;
+ assigned-clock-parents = <&k3_clks 191 2>;
+ power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp2: audio-controller@2b20000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b20000 0x00 0x2000>,
+ <0x00 0x02b28000 0x00 0x400>;
+ reg-names = "mpu", "dat";
+ interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+
+ dmas = <&main_bcdma 0 0xc502 0>, <&main_bcdma 0 0x4502 0>;
+ dma-names = "tx", "rx";
+
+ clocks = <&k3_clks 192 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 192 0>;
+ assigned-clock-parents = <&k3_clks 192 2>;
+ power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ ti_csi2rx0: ticsi2rx@30102000 {
+ compatible = "ti,j721e-csi2rx-shim";
+ dmas = <&main_bcdma_csi 0 0x5000 0>;
+ dma-names = "rx0";
+ reg = <0x00 0x30102000 0x00 0x1000>;
+ power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ status = "disabled";
+
+ cdns_csi2rx0: csi-bridge@30101000 {
+ compatible = "ti,j721e-csi2rx", "cdns,csi2rx";
+ reg = <0x00 0x30101000 0x00 0x1000>;
+ clocks = <&k3_clks 182 0>, <&k3_clks 182 3>, <&k3_clks 182 0>,
+ <&k3_clks 182 0>, <&k3_clks 182 4>, <&k3_clks 182 4>;
+ clock-names = "sys_clk", "p_clk", "pixel_if0_clk",
+ "pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk";
+ phys = <&dphy0>;
+ phy-names = "dphy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "disabled";
+ };
+
+ csi0_port1: port@1 {
+ reg = <1>;
+ status = "disabled";
+ };
+
+ csi0_port2: port@2 {
+ reg = <2>;
+ status = "disabled";
+ };
+
+ csi0_port3: port@3 {
+ reg = <3>;
+ status = "disabled";
+ };
+
+ csi0_port4: port@4 {
+ reg = <4>;
+ status = "disabled";
+ };
+ };
+ };
+ };
+
+ dphy0: phy@30110000 {
+ compatible = "cdns,dphy-rx";
+ reg = <0x00 0x30110000 0x00 0x1100>;
+ #phy-cells = <0>;
+ power-domains = <&k3_pds 185 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62a-mcu.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62a-mcu.dtsi
index 04599762c2b7..a6d16a94088c 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62a-mcu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62a-mcu.dtsi
@@ -143,4 +143,28 @@
/* Tightly coupled to M4F */
status = "reserved";
};
+
+ mcu_mcan0: can@4e08000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x4e08000 0x00 0x200>,
+ <0x00 0x4e00000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 188 6>, <&k3_clks 188 1>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ status = "disabled";
+ };
+
+ mcu_mcan1: can@4e18000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x4e18000 0x00 0x200>,
+ <0x00 0x4e10000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 189 6>, <&k3_clks 189 1>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ status = "disabled";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62a7-sk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am62a7-sk.dts
index ecc0e13331c4..7b7142586295 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62a7-sk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62a7-sk.dts
@@ -13,7 +13,7 @@
#include "k3-am62a7.dtsi"
/ {
- compatible = "ti,am62a7-sk", "ti,am62a7";
+ compatible = "ti,am62a7-sk", "ti,am62a7";
model = "Texas Instruments AM62A7 SK";
aliases {
@@ -79,10 +79,10 @@
regulator-boot-on;
};
- vcc_3v3_sys: regulator-2 {
+ vcc_3v3_main: regulator-2 {
/* output of LM5141-Q1 */
compatible = "regulator-fixed";
- regulator-name = "vcc_3v3_sys";
+ regulator-name = "vcc_3v3_main";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vmain_pd>;
@@ -101,6 +101,17 @@
gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
};
+ vcc_3v3_sys: regulator-4 {
+ /* output of TPS222965DSGT */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v3_sys";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -114,6 +125,41 @@
default-state = "off";
};
};
+
+ tlv320_mclk: clk-0 {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <12288000>;
+ };
+
+ codec_audio: sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "AM62Ax-SKEVM";
+ simple-audio-card,widgets =
+ "Headphone", "Headphone Jack",
+ "Line", "Line In",
+ "Microphone", "Microphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT",
+ "LINE1L", "Line In",
+ "LINE1R", "Line In",
+ "MIC3R", "Microphone Jack",
+ "Microphone Jack", "Mic Bias";
+ simple-audio-card,format = "dsp_b";
+ simple-audio-card,bitclock-master = <&sound_master>;
+ simple-audio-card,frame-master = <&sound_master>;
+ simple-audio-card,bitclock-inversion;
+
+ simple-audio-card,cpu {
+ sound-dai = <&mcasp1>;
+ };
+
+ sound_master: simple-audio-card,codec {
+ sound-dai = <&tlv320aic3106>;
+ clocks = <&tlv320_mclk>;
+ };
+ };
};
&mcu_pmx0 {
@@ -219,6 +265,35 @@
AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */
>;
};
+
+ main_mcasp1_pins_default: main-mcasp1-default-pins {
+ pinctrl-single,pins = <
+ AM62AX_IOPAD(0x090, PIN_INPUT, 2) /* (L19) GPMC0_BE0n_CLE.MCASP1_ACLKX */
+ AM62AX_IOPAD(0x098, PIN_INPUT, 2) /* (R18) GPMC0_WAIT0.MCASP1_AFSX */
+ AM62AX_IOPAD(0x08c, PIN_OUTPUT, 2) /* (K19) GPMC0_WEn.MCASP1_AXR0 */
+ AM62AX_IOPAD(0x084, PIN_INPUT, 2) /* (L18) GPMC0_ADVn_ALE.MCASP1_AXR2 */
+ >;
+ };
+
+ main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
+ pinctrl-single,pins = <
+ AM62AX_IOPAD(0x01d4, PIN_INPUT, 7) /* (C15) UART0_RTSn.GPIO1_23 */
+ >;
+ };
+};
+
+&mcu_pmx0 {
+ status = "okay";
+
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */
+ >;
+ };
+};
+
+&mcu_gpio0 {
+ status = "okay";
};
&main_i2c0 {
@@ -226,19 +301,124 @@
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
+
+ typec_pd0: usb-power-controller@3f {
+ compatible = "ti,tps6598x";
+ reg = <0x3f>;
+
+ connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ self-powered;
+ data-role = "dual";
+ power-role = "sink";
+ port {
+ usb_con_hs: endpoint {
+ remote-endpoint = <&usb0_hs_ep>;
+ };
+ };
+ };
+ };
+
+ tps659312: pmic@48 {
+ compatible = "ti,tps6593-q1";
+ reg = <0x48>;
+ ti,primary-pmic;
+ system-power-controller;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&mcu_gpio0>;
+ interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+
+ buck123-supply = <&vcc_3v3_sys>;
+ buck4-supply = <&vcc_3v3_sys>;
+ buck5-supply = <&vcc_3v3_sys>;
+ ldo1-supply = <&vcc_3v3_sys>;
+ ldo2-supply = <&vcc_3v3_sys>;
+ ldo3-supply = <&buck5>;
+ ldo4-supply = <&vcc_3v3_sys>;
+
+ regulators {
+ buck123: buck123 {
+ regulator-name = "vcc_core";
+ regulator-min-microvolt = <715000>;
+ regulator-max-microvolt = <895000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buck4: buck4 {
+ regulator-name = "vcc_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buck5: buck5 {
+ regulator-name = "vcc_1v8_sys";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo1: ldo1 {
+ regulator-name = "vddshv5_sdio";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo2: ldo2 {
+ regulator-name = "vpp_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo3: ldo3 {
+ regulator-name = "vcc_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo4: ldo4 {
+ regulator-name = "vdda_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
&main_i2c1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
- clock-frequency = <400000>;
+ clock-frequency = <100000>;
exp1: gpio@22 {
compatible = "ti,tca6424";
reg = <0x22>;
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&main_gpio1>;
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
"BT_EN_SOC", "MMC1_SD_EN",
@@ -253,6 +433,46 @@
"MCASP1_FET_SEL", "UART1_FET_SEL",
"PD_I2C_IRQ", "IO_EXP_TEST_LED";
};
+
+ tlv320aic3106: audio-codec@1b {
+ #sound-dai-cells = <0>;
+ compatible = "ti,tlv320aic3106";
+ reg = <0x1b>;
+ ai3x-micbias-vg = <1>; /* 2.0V */
+
+ /* Regulators */
+ AVDD-supply = <&vcc_3v3_sys>;
+ IOVDD-supply = <&vcc_3v3_sys>;
+ DRVDD-supply = <&vcc_3v3_sys>;
+ DVDD-supply = <&buck5>;
+ };
+
+ exp2: gpio@23 {
+ compatible = "ti,tca6424";
+ reg = <0x23>;
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ gpio-line-names = "", "",
+ "", "",
+ "", "",
+ "", "",
+ "WL_LT_EN", "CSI_RSTz",
+ "", "",
+ "", "",
+ "", "",
+ "SPI0_FET_SEL", "SPI0_FET_OE",
+ "RGMII2_BRD_CONN_DET", "CSI_SEL2",
+ "CSI_EN", "AUTO_100M_1000M_CONFIG",
+ "CSI_VLDO_SEL", "SoC_WLAN_SDIO_RST";
+ };
+};
+
+&main_i2c2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c2_pins_default>;
+ clock-frequency = <400000>;
};
&sdhci1 {
@@ -290,6 +510,21 @@
status = "reserved";
};
+&usbss0 {
+ status = "okay";
+ ti,vbus-divider;
+};
+
+&usb0 {
+ usb-role-switch;
+
+ port {
+ usb0_hs_ep: endpoint {
+ remote-endpoint = <&usb_con_hs>;
+ };
+ };
+};
+
&usbss1 {
status = "okay";
};
@@ -328,3 +563,23 @@
ti,min-output-impedance;
};
};
+
+&mcasp1 {
+ status = "okay";
+ #sound-dai-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcasp1_pins_default>;
+
+ op-mode = <0>; /* MCASP_IIS_MODE */
+ tdm-slots = <2>;
+
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
+ 1 0 2 0
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ >;
+ tx-num-evt = <32>;
+ rx-num-evt = <32>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-main.dtsi
new file mode 100644
index 000000000000..4c51bae06b57
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-main.dtsi
@@ -0,0 +1,894 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P main domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_main {
+ oc_sram: sram@70000000 {
+ compatible = "mmio-sram";
+ reg = <0x00 0x70000000 0x00 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x00 0x00 0x70000000 0x10000>;
+ };
+
+ gic500: interrupt-controller@1800000 {
+ compatible = "arm,gic-v3";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ #interrupt-cells = <3>;
+ interrupt-controller;
+ reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */
+ <0x00 0x01880000 0x00 0xc0000>, /* GICR */
+ <0x01 0x00000000 0x00 0x2000>, /* GICC */
+ <0x01 0x00010000 0x00 0x1000>, /* GICH */
+ <0x01 0x00020000 0x00 0x2000>; /* GICV */
+ /*
+ * vcpumntirq:
+ * virtual CPU interface maintenance interrupt
+ */
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+
+ gic_its: msi-controller@1820000 {
+ compatible = "arm,gic-v3-its";
+ reg = <0x00 0x01820000 0x00 0x10000>;
+ socionext,synquacer-pre-its = <0x1000000 0x400000>;
+ msi-controller;
+ #msi-cells = <1>;
+ };
+ };
+
+ main_conf: bus@100000 {
+ compatible = "simple-bus";
+ reg = <0x00 0x00100000 0x00 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x00 0x00 0x00100000 0x20000>;
+
+ phy_gmii_sel: phy@4044 {
+ compatible = "ti,am654-phy-gmii-sel";
+ reg = <0x4044 0x8>;
+ #phy-cells = <1>;
+ };
+
+ epwm_tbclk: clock-controller@4130 {
+ compatible = "ti,am62-epwm-tbclk";
+ reg = <0x4130 0x4>;
+ #clock-cells = <1>;
+ };
+ };
+
+ dmss: bus@48000000 {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-ranges;
+ ranges = <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>;
+ bootph-all;
+
+ ti,sci-dev-id = <25>;
+
+ secure_proxy_main: mailbox@4d000000 {
+ compatible = "ti,am654-secure-proxy";
+ #mbox-cells = <1>;
+ reg-names = "target_data", "rt", "scfg";
+ reg = <0x00 0x4d000000 0x00 0x80000>,
+ <0x00 0x4a600000 0x00 0x80000>,
+ <0x00 0x4a400000 0x00 0x80000>;
+ interrupt-names = "rx_012";
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+ bootph-all;
+ };
+
+ inta_main_dmss: interrupt-controller@48000000 {
+ compatible = "ti,sci-inta";
+ reg = <0x00 0x48000000 0x00 0x100000>;
+ #interrupt-cells = <0>;
+ interrupt-controller;
+ interrupt-parent = <&gic500>;
+ msi-controller;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <28>;
+ ti,interrupt-ranges = <5 69 35>;
+ ti,unmapped-event-sources = <&main_bcdma>, <&main_pktdma>;
+ };
+
+ main_bcdma: dma-controller@485c0100 {
+ compatible = "ti,am64-dmss-bcdma";
+ reg = <0x00 0x485c0100 0x00 0x100>,
+ <0x00 0x4c000000 0x00 0x20000>,
+ <0x00 0x4a820000 0x00 0x20000>,
+ <0x00 0x4aa40000 0x00 0x20000>,
+ <0x00 0x4bc00000 0x00 0x100000>,
+ <0x00 0x48600000 0x00 0x8000>,
+ <0x00 0x484a4000 0x00 0x2000>,
+ <0x00 0x484c2000 0x00 0x2000>,
+ <0x00 0x48420000 0x00 0x2000>;
+ reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "bchan";
+ msi-parent = <&inta_main_dmss>;
+ #dma-cells = <3>;
+
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <26>;
+ ti,sci-rm-range-bchan = <0x20>; /* BLOCK_COPY_CHAN */
+ ti,sci-rm-range-rchan = <0x21>; /* SPLIT_TR_RX_CHAN */
+ ti,sci-rm-range-tchan = <0x22>; /* SPLIT_TR_TX_CHAN */
+ bootph-all;
+ };
+
+ main_pktdma: dma-controller@485c0000 {
+ compatible = "ti,am64-dmss-pktdma";
+ reg = <0x00 0x485c0000 0x00 0x100>,
+ <0x00 0x4a800000 0x00 0x20000>,
+ <0x00 0x4aa00000 0x00 0x40000>,
+ <0x00 0x4b800000 0x00 0x400000>,
+ <0x00 0x485e0000 0x00 0x10000>,
+ <0x00 0x484a0000 0x00 0x2000>,
+ <0x00 0x484c0000 0x00 0x2000>,
+ <0x00 0x48430000 0x00 0x1000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "rflow";
+ msi-parent = <&inta_main_dmss>;
+ #dma-cells = <2>;
+ bootph-all;
+
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <30>;
+ ti,sci-rm-range-tchan = <0x23>, /* UNMAPPED_TX_CHAN */
+ <0x24>, /* CPSW_TX_CHAN */
+ <0x25>, /* SAUL_TX_0_CHAN */
+ <0x26>; /* SAUL_TX_1_CHAN */
+ ti,sci-rm-range-tflow = <0x10>, /* RING_UNMAPPED_TX_CHAN */
+ <0x11>, /* RING_CPSW_TX_CHAN */
+ <0x12>, /* RING_SAUL_TX_0_CHAN */
+ <0x13>; /* RING_SAUL_TX_1_CHAN */
+ ti,sci-rm-range-rchan = <0x29>, /* UNMAPPED_RX_CHAN */
+ <0x2b>, /* CPSW_RX_CHAN */
+ <0x2d>, /* SAUL_RX_0_CHAN */
+ <0x2f>, /* SAUL_RX_1_CHAN */
+ <0x31>, /* SAUL_RX_2_CHAN */
+ <0x33>; /* SAUL_RX_3_CHAN */
+ ti,sci-rm-range-rflow = <0x2a>, /* FLOW_UNMAPPED_RX_CHAN */
+ <0x2c>, /* FLOW_CPSW_RX_CHAN */
+ <0x2e>, /* FLOW_SAUL_RX_0/1_CHAN */
+ <0x32>; /* FLOW_SAUL_RX_2/3_CHAN */
+ };
+ };
+
+ dmsc: system-controller@44043000 {
+ compatible = "ti,k2g-sci";
+ ti,host-id = <12>;
+ mbox-names = "rx", "tx";
+ mboxes = <&secure_proxy_main 12>,
+ <&secure_proxy_main 13>;
+ reg-names = "debug_messages";
+ reg = <0x00 0x44043000 0x00 0xfe0>;
+ bootph-all;
+
+ k3_pds: power-controller {
+ compatible = "ti,sci-pm-domain";
+ #power-domain-cells = <2>;
+ bootph-all;
+ };
+
+ k3_clks: clock-controller {
+ compatible = "ti,k2g-sci-clk";
+ #clock-cells = <2>;
+ bootph-all;
+ };
+
+ k3_reset: reset-controller {
+ compatible = "ti,sci-reset";
+ #reset-cells = <2>;
+ bootph-all;
+ };
+ };
+
+ crypto: crypto@40900000 {
+ compatible = "ti,am62-sa3ul";
+ reg = <0x00 0x40900000 0x00 0x1200>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
+
+ dmas = <&main_pktdma 0xf501 0>, <&main_pktdma 0x7506 0>,
+ <&main_pktdma 0x7507 0>;
+ dma-names = "tx", "rx1", "rx2";
+ };
+
+ secure_proxy_sa3: mailbox@43600000 {
+ compatible = "ti,am654-secure-proxy";
+ #mbox-cells = <1>;
+ reg-names = "target_data", "rt", "scfg";
+ reg = <0x00 0x43600000 0x00 0x10000>,
+ <0x00 0x44880000 0x00 0x20000>,
+ <0x00 0x44860000 0x00 0x20000>;
+ /*
+ * Marked Disabled:
+ * Node is incomplete as it is meant for bootloaders and
+ * firmware on non-MPU processors
+ */
+ status = "disabled";
+ bootph-all;
+ };
+
+ main_pmx0: pinctrl@f4000 {
+ compatible = "pinctrl-single";
+ reg = <0x00 0xf4000 0x00 0x2ac>;
+ #pinctrl-cells = <1>;
+ pinctrl-single,register-width = <32>;
+ pinctrl-single,function-mask = <0xffffffff>;
+ bootph-all;
+ };
+
+ main_esm: esm@420000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x420000 0x00 0x1000>;
+ ti,esm-pins = <160>, <161>, <162>, <163>, <177>, <178>;
+ bootph-pre-ram;
+ };
+
+ main_timer0: timer@2400000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2400000 0x00 0x400>;
+ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 36 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 36 2>;
+ assigned-clock-parents = <&k3_clks 36 3>;
+ power-domains = <&k3_pds 36 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ bootph-all;
+ };
+
+ main_timer1: timer@2410000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2410000 0x00 0x400>;
+ interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 37 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 37 2>;
+ assigned-clock-parents = <&k3_clks 37 3>;
+ power-domains = <&k3_pds 37 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer2: timer@2420000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2420000 0x00 0x400>;
+ interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 38 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 38 2>;
+ assigned-clock-parents = <&k3_clks 38 3>;
+ power-domains = <&k3_pds 38 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer3: timer@2430000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2430000 0x00 0x400>;
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 39 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 39 2>;
+ assigned-clock-parents = <&k3_clks 39 3>;
+ power-domains = <&k3_pds 39 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer4: timer@2440000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2440000 0x00 0x400>;
+ interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 40 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 40 2>;
+ assigned-clock-parents = <&k3_clks 40 3>;
+ power-domains = <&k3_pds 40 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer5: timer@2450000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2450000 0x00 0x400>;
+ interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 41 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 41 2>;
+ assigned-clock-parents = <&k3_clks 41 3>;
+ power-domains = <&k3_pds 41 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer6: timer@2460000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2460000 0x00 0x400>;
+ interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 42 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 42 2>;
+ assigned-clock-parents = <&k3_clks 42 3>;
+ power-domains = <&k3_pds 42 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer7: timer@2470000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2470000 0x00 0x400>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 43 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 43 2>;
+ assigned-clock-parents = <&k3_clks 43 3>;
+ power-domains = <&k3_pds 43 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_uart0: serial@2800000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02800000 0x00 0x100>;
+ interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 146 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 146 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_uart1: serial@2810000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02810000 0x00 0x100>;
+ interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 152 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 152 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_uart2: serial@2820000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02820000 0x00 0x100>;
+ interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 153 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 153 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_uart3: serial@2830000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02830000 0x00 0x100>;
+ interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 154 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_uart4: serial@2840000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02840000 0x00 0x100>;
+ interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 155 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 155 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_uart5: serial@2850000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02850000 0x00 0x100>;
+ interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 156 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 156 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_uart6: serial@2860000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x02860000 0x00 0x100>;
+ interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 158 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 158 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ main_i2c0: i2c@20000000 {
+ compatible = "ti,am64-i2c", "ti,omap4-i2c";
+ reg = <0x00 0x20000000 0x00 0x100>;
+ interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 102 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 102 2>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ main_i2c1: i2c@20010000 {
+ compatible = "ti,am64-i2c", "ti,omap4-i2c";
+ reg = <0x00 0x20010000 0x00 0x100>;
+ interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 103 2>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ main_i2c2: i2c@20020000 {
+ compatible = "ti,am64-i2c", "ti,omap4-i2c";
+ reg = <0x00 0x20020000 0x00 0x100>;
+ interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 104 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 104 2>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ main_i2c3: i2c@20030000 {
+ compatible = "ti,am64-i2c", "ti,omap4-i2c";
+ reg = <0x00 0x20030000 0x00 0x100>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 105 2>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ main_spi0: spi@20100000 {
+ compatible = "ti,am654-mcspi", "ti,omap4-mcspi";
+ reg = <0x00 0x20100000 0x00 0x400>;
+ interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 141 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 141 0>;
+ status = "disabled";
+ };
+
+ main_spi1: spi@20110000 {
+ compatible = "ti,am654-mcspi","ti,omap4-mcspi";
+ reg = <0x00 0x20110000 0x00 0x400>;
+ interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 142 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 142 0>;
+ status = "disabled";
+ };
+
+ main_spi2: spi@20120000 {
+ compatible = "ti,am654-mcspi","ti,omap4-mcspi";
+ reg = <0x00 0x20120000 0x00 0x400>;
+ interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 143 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 143 0>;
+ status = "disabled";
+ };
+
+ main_gpio_intr: interrupt-controller@a00000 {
+ compatible = "ti,sci-intr";
+ reg = <0x00 0x00a00000 0x00 0x800>;
+ ti,intr-trigger-type = <1>;
+ interrupt-controller;
+ interrupt-parent = <&gic500>;
+ #interrupt-cells = <1>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <3>;
+ ti,interrupt-ranges = <0 32 16>;
+ };
+
+ main_gpio0: gpio@600000 {
+ compatible = "ti,am64-gpio", "ti,keystone-gpio";
+ reg = <0x00 0x00600000 0x00 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&main_gpio_intr>;
+ interrupts = <190>, <191>, <192>,
+ <193>, <194>, <195>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ ti,ngpio = <92>;
+ ti,davinci-gpio-unbanked = <0>;
+ power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 77 0>;
+ clock-names = "gpio";
+ };
+
+ main_gpio1: gpio@601000 {
+ compatible = "ti,am64-gpio", "ti,keystone-gpio";
+ reg = <0x00 0x00601000 0x00 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&main_gpio_intr>;
+ interrupts = <180>, <181>, <182>,
+ <183>, <184>, <185>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ ti,ngpio = <52>;
+ ti,davinci-gpio-unbanked = <0>;
+ power-domains = <&k3_pds 78 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 78 0>;
+ clock-names = "gpio";
+ };
+
+ sdhci0: mmc@fa10000 {
+ compatible = "ti,am64-sdhci-8bit";
+ reg = <0x00 0x0fa10000 0x00 0x1000>, <0x00 0x0fa18000 0x00 0x400>;
+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 57 1>, <&k3_clks 57 2>;
+ clock-names = "clk_ahb", "clk_xin";
+ assigned-clocks = <&k3_clks 57 2>;
+ assigned-clock-parents = <&k3_clks 57 4>;
+ ti,otap-del-sel-legacy = <0x0>;
+ status = "disabled";
+ };
+
+ sdhci1: mmc@fa00000 {
+ compatible = "ti,am62-sdhci";
+ reg = <0x00 0x0fa00000 0x00 0x1000>, <0x00 0x0fa08000 0x00 0x400>;
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 58 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 58 5>, <&k3_clks 58 6>;
+ clock-names = "clk_ahb", "clk_xin";
+ ti,otap-del-sel-legacy = <0x8>;
+ status = "disabled";
+ };
+
+ sdhci2: mmc@fa20000 {
+ compatible = "ti,am62-sdhci";
+ reg = <0x00 0x0fa20000 0x00 0x1000>, <0x00 0x0fa28000 0x00 0x400>;
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
+ clock-names = "clk_ahb", "clk_xin";
+ ti,otap-del-sel-legacy = <0x8>;
+ status = "disabled";
+ };
+
+ fss: bus@fc00000 {
+ compatible = "simple-bus";
+ reg = <0x00 0x0fc00000 0x00 0x70000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ ospi0: spi@fc40000 {
+ compatible = "ti,am654-ospi", "cdns,qspi-nor";
+ reg = <0x00 0x0fc40000 0x00 0x100>,
+ <0x05 0x00000000 0x01 0x00000000>;
+ interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
+ cdns,fifo-depth = <256>;
+ cdns,fifo-width = <4>;
+ cdns,trigger-address = <0x0>;
+ clocks = <&k3_clks 75 7>;
+ assigned-clocks = <&k3_clks 75 7>;
+ assigned-clock-parents = <&k3_clks 75 8>;
+ assigned-clock-rates = <166666666>;
+ power-domains = <&k3_pds 75 TI_SCI_PD_EXCLUSIVE>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+ };
+
+ cpsw3g: ethernet@8000000 {
+ compatible = "ti,am642-cpsw-nuss";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ reg = <0x00 0x08000000 0x00 0x200000>;
+ reg-names = "cpsw_nuss";
+ ranges = <0x00 0x00 0x00 0x08000000 0x00 0x200000>;
+ clocks = <&k3_clks 13 0>;
+ assigned-clocks = <&k3_clks 13 3>;
+ assigned-clock-parents = <&k3_clks 13 11>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 13 TI_SCI_PD_EXCLUSIVE>;
+
+ dmas = <&main_pktdma 0xc600 15>,
+ <&main_pktdma 0xc601 15>,
+ <&main_pktdma 0xc602 15>,
+ <&main_pktdma 0xc603 15>,
+ <&main_pktdma 0xc604 15>,
+ <&main_pktdma 0xc605 15>,
+ <&main_pktdma 0xc606 15>,
+ <&main_pktdma 0xc607 15>,
+ <&main_pktdma 0x4600 15>;
+ dma-names = "tx0", "tx1", "tx2", "tx3", "tx4", "tx5", "tx6",
+ "tx7", "rx";
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpsw_port1: port@1 {
+ reg = <1>;
+ ti,mac-only;
+ label = "port1";
+ phys = <&phy_gmii_sel 1>;
+ mac-address = [00 00 00 00 00 00];
+ };
+
+ cpsw_port2: port@2 {
+ reg = <2>;
+ ti,mac-only;
+ label = "port2";
+ phys = <&phy_gmii_sel 2>;
+ mac-address = [00 00 00 00 00 00];
+ };
+ };
+
+ cpsw3g_mdio: mdio@f00 {
+ compatible = "ti,cpsw-mdio","ti,davinci_mdio";
+ reg = <0x00 0xf00 0x00 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&k3_clks 13 0>;
+ clock-names = "fck";
+ bus_freq = <1000000>;
+ status = "disabled";
+ };
+
+ cpts@3d000 {
+ compatible = "ti,j721e-cpts";
+ reg = <0x00 0x3d000 0x00 0x400>;
+ clocks = <&k3_clks 13 3>;
+ clock-names = "cpts";
+ interrupts-extended = <&gic500 GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "cpts";
+ ti,cpts-ext-ts-inputs = <4>;
+ ti,cpts-periodic-outputs = <2>;
+ };
+ };
+
+ hwspinlock: spinlock@2a000000 {
+ compatible = "ti,am64-hwspinlock";
+ reg = <0x00 0x2a000000 0x00 0x1000>;
+ #hwlock-cells = <1>;
+ };
+
+ mailbox0_cluster0: mailbox@29000000 {
+ compatible = "ti,am64-mailbox";
+ reg = <0x00 0x29000000 0x00 0x200>;
+ interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ ti,mbox-num-users = <4>;
+ ti,mbox-num-fifos = <16>;
+ };
+
+ mailbox0_cluster1: mailbox@29010000 {
+ compatible = "ti,am64-mailbox";
+ reg = <0x00 0x29010000 0x00 0x200>;
+ interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ ti,mbox-num-users = <4>;
+ ti,mbox-num-fifos = <16>;
+ };
+
+ mailbox0_cluster2: mailbox@29020000 {
+ compatible = "ti,am64-mailbox";
+ reg = <0x00 0x29020000 0x00 0x200>;
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ ti,mbox-num-users = <4>;
+ ti,mbox-num-fifos = <16>;
+ };
+
+ mailbox0_cluster3: mailbox@29030000 {
+ compatible = "ti,am64-mailbox";
+ reg = <0x00 0x29030000 0x00 0x200>;
+ interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ ti,mbox-num-users = <4>;
+ ti,mbox-num-fifos = <16>;
+ };
+
+ ecap0: pwm@23100000 {
+ compatible = "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x00 0x23100000 0x00 0x100>;
+ power-domains = <&k3_pds 51 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 51 0>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ ecap1: pwm@23110000 {
+ compatible = "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x00 0x23110000 0x00 0x100>;
+ power-domains = <&k3_pds 52 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 52 0>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ ecap2: pwm@23120000 {
+ compatible = "ti,am3352-ecap";
+ #pwm-cells = <3>;
+ reg = <0x00 0x23120000 0x00 0x100>;
+ power-domains = <&k3_pds 53 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 53 0>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ main_mcan0: can@20701000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x20701000 0x00 0x200>,
+ <0x00 0x20708000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 98 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 98 6>, <&k3_clks 98 1>;
+ clock-names = "hclk", "cclk";
+ interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "int0", "int1";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ status = "disabled";
+ };
+
+ main_mcan1: can@20711000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x20711000 0x00 0x200>,
+ <0x00 0x20718000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 99 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 99 6>, <&k3_clks 99 1>;
+ clock-names = "hclk", "cclk";
+ interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "int0", "int1";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ status = "disabled";
+ };
+
+ main_rti0: watchdog@e000000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x0e000000 0x00 0x100>;
+ clocks = <&k3_clks 125 0>;
+ power-domains = <&k3_pds 125 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 125 0>;
+ assigned-clock-parents = <&k3_clks 125 2>;
+ };
+
+ main_rti1: watchdog@e010000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x0e010000 0x00 0x100>;
+ clocks = <&k3_clks 126 0>;
+ power-domains = <&k3_pds 126 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 126 0>;
+ assigned-clock-parents = <&k3_clks 126 2>;
+ };
+
+ main_rti2: watchdog@e020000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x0e020000 0x00 0x100>;
+ clocks = <&k3_clks 127 0>;
+ power-domains = <&k3_pds 127 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 127 0>;
+ assigned-clock-parents = <&k3_clks 127 2>;
+ };
+
+ main_rti3: watchdog@e030000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x0e030000 0x00 0x100>;
+ clocks = <&k3_clks 128 0>;
+ power-domains = <&k3_pds 128 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 128 0>;
+ assigned-clock-parents = <&k3_clks 128 2>;
+ };
+
+ main_rti15: watchdog@e0f0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x0e0f0000 0x00 0x100>;
+ clocks = <&k3_clks 130 0>;
+ power-domains = <&k3_pds 130 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 130 0>;
+ assigned-clock-parents = <&k3_clks 130 2>;
+ };
+
+ epwm0: pwm@23000000 {
+ compatible = "ti,am64-epwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x23000000 0x00 0x100>;
+ power-domains = <&k3_pds 86 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&epwm_tbclk 0>, <&k3_clks 86 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ epwm1: pwm@23010000 {
+ compatible = "ti,am64-epwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x23010000 0x00 0x100>;
+ power-domains = <&k3_pds 87 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&epwm_tbclk 1>, <&k3_clks 87 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ epwm2: pwm@23020000 {
+ compatible = "ti,am64-epwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x23020000 0x00 0x100>;
+ power-domains = <&k3_pds 88 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&epwm_tbclk 2>, <&k3_clks 88 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ mcasp0: audio-controller@2b00000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b00000 0x00 0x2000>,
+ <0x00 0x02b08000 0x00 0x400>;
+ reg-names = "mpu", "dat";
+ interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+
+ dmas = <&main_bcdma 0 0xc500 0>, <&main_bcdma 0 0x4500 0>;
+ dma-names = "tx", "rx";
+
+ clocks = <&k3_clks 190 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 190 0>;
+ assigned-clock-parents = <&k3_clks 190 2>;
+ power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp1: audio-controller@2b10000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b10000 0x00 0x2000>,
+ <0x00 0x02b18000 0x00 0x400>;
+ reg-names = "mpu", "dat";
+ interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 237 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+
+ dmas = <&main_bcdma 0 0xc501 0>, <&main_bcdma 0 0x4501 0>;
+ dma-names = "tx", "rx";
+
+ clocks = <&k3_clks 191 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 191 0>;
+ assigned-clock-parents = <&k3_clks 191 2>;
+ power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp2: audio-controller@2b20000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b20000 0x00 0x2000>,
+ <0x00 0x02b28000 0x00 0x400>;
+ reg-names = "mpu", "dat";
+ interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+
+ dmas = <&main_bcdma 0 0xc502 0>, <&main_bcdma 0 0x4502 0>;
+ dma-names = "tx", "rx";
+
+ clocks = <&k3_clks 192 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 192 0>;
+ assigned-clock-parents = <&k3_clks 192 2>;
+ power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p-mcu.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-mcu.dtsi
new file mode 100644
index 000000000000..c4b0b91d70cf
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-mcu.dtsi
@@ -0,0 +1,205 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P MCU domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_mcu {
+ mcu_pmx0: pinctrl@4084000 {
+ compatible = "pinctrl-single";
+ reg = <0x00 0x04084000 0x00 0x88>;
+ #pinctrl-cells = <1>;
+ pinctrl-single,register-width = <32>;
+ pinctrl-single,function-mask = <0xffffffff>;
+ bootph-all;
+ };
+
+ mcu_esm: esm@4100000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x4100000 0x00 0x1000>;
+ ti,esm-pins = <0>, <1>, <2>, <85>;
+ status = "reserved";
+ bootph-pre-ram;
+ };
+
+ /*
+ * The MCU domain timer interrupts are routed only to the ESM module,
+ * and not currently available for Linux. The MCU domain timers are
+ * of limited use without interrupts, and likely reserved by the ESM.
+ */
+ mcu_timer0: timer@4800000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4800000 0x00 0x400>;
+ clocks = <&k3_clks 35 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 35 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_timer1: timer@4810000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4810000 0x00 0x400>;
+ clocks = <&k3_clks 48 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 48 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_timer2: timer@4820000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4820000 0x00 0x400>;
+ clocks = <&k3_clks 49 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 49 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_timer3: timer@4830000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4830000 0x00 0x400>;
+ clocks = <&k3_clks 50 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 50 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_uart0: serial@4a00000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x04a00000 0x00 0x100>;
+ interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 149 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 149 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ mcu_i2c0: i2c@4900000 {
+ compatible = "ti,am64-i2c", "ti,omap4-i2c";
+ reg = <0x00 0x04900000 0x00 0x100>;
+ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 106 2>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ mcu_spi0: spi@4b00000 {
+ compatible = "ti,am654-mcspi", "ti,omap4-mcspi";
+ reg = <0x00 0x04b00000 0x00 0x400>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 147 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 147 0>;
+ status = "disabled";
+ };
+
+ mcu_spi1: spi@4b10000 {
+ compatible = "ti,am654-mcspi","ti,omap4-mcspi";
+ reg = <0x00 0x04b10000 0x00 0x400>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 148 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 148 0>;
+ status = "disabled";
+ };
+
+ mcu_gpio_intr: interrupt-controller@4210000 {
+ compatible = "ti,sci-intr";
+ reg = <0x00 0x04210000 0x00 0x200>;
+ ti,intr-trigger-type = <1>;
+ interrupt-controller;
+ interrupt-parent = <&gic500>;
+ #interrupt-cells = <1>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <5>;
+ ti,interrupt-ranges = <0 104 4>;
+ };
+
+ mcu_gpio0: gpio@4201000 {
+ compatible = "ti,am64-gpio", "ti,keystone-gpio";
+ reg = <0x00 0x4201000 0x00 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&mcu_gpio_intr>;
+ interrupts = <30>, <31>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ ti,ngpio = <24>;
+ ti,davinci-gpio-unbanked = <0>;
+ power-domains = <&k3_pds 79 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 79 0>;
+ clock-names = "gpio";
+ };
+
+ mcu_rti0: watchdog@4880000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x04880000 0x00 0x100>;
+ clocks = <&k3_clks 131 0>;
+ power-domains = <&k3_pds 131 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 131 0>;
+ assigned-clock-parents = <&k3_clks 131 2>;
+ /* Tightly coupled to M4F */
+ status = "reserved";
+ };
+
+ mcu_mcan0: can@4e08000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x4e08000 0x00 0x200>,
+ <0x00 0x4e00000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 188 6>, <&k3_clks 188 1>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "int0", "int1";
+ status = "disabled";
+ };
+
+ mcu_mcan1: can@4e18000 {
+ compatible = "bosch,m_can";
+ reg = <0x00 0x4e18000 0x00 0x200>,
+ <0x00 0x4e10000 0x00 0x8000>;
+ reg-names = "m_can", "message_ram";
+ power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 189 6>, <&k3_clks 189 1>;
+ clock-names = "hclk", "cclk";
+ bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "int0", "int1";
+ status = "disabled";
+ };
+
+ mcu_r5fss0: r5fss@79000000 {
+ compatible = "ti,am62-r5fss";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x79000000 0x00 0x79000000 0x8000>,
+ <0x79020000 0x00 0x79020000 0x8000>;
+ power-domains = <&k3_pds 7 TI_SCI_PD_EXCLUSIVE>;
+ mcu_r5fss0_core0: r5f@79000000 {
+ compatible = "ti,am62-r5f";
+ reg = <0x79000000 0x00008000>,
+ <0x79020000 0x00008000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <9>;
+ ti,sci-proc-ids = <0x03 0xff>;
+ resets = <&k3_reset 9 1>;
+ firmware-name = "am62p-mcu-r5f0_0-fw";
+ ti,atcm-enable = <0>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <0>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p-thermal.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-thermal.dtsi
new file mode 100644
index 000000000000..85ce545633ea
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-thermal.dtsi
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <dt-bindings/thermal/thermal.h>
+
+thermal_zones: thermal-zones {
+ main0_thermal: main0-thermal {
+ polling-delay-passive = <250>; /* milliSeconds */
+ polling-delay = <500>; /* milliSeconds */
+ thermal-sensors = <&wkup_vtm0 0>;
+
+ trips {
+ main0_crit: main0-crit {
+ temperature = <125000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+ };
+
+ main1_thermal: main1-thermal {
+ polling-delay-passive = <250>; /* milliSeconds */
+ polling-delay = <500>; /* milliSeconds */
+ thermal-sensors = <&wkup_vtm0 1>;
+
+ trips {
+ main1_crit: main1-crit {
+ temperature = <125000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+ };
+
+ main2_thermal: main2-thermal {
+ polling-delay-passive = <250>; /* milliSeconds */
+ polling-delay = <500>; /* milliSeconds */
+ thermal-sensors = <&wkup_vtm0 2>;
+
+ trips {
+ main2_crit: main2-crit {
+ temperature = <125000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-wakeup.dtsi
new file mode 100644
index 000000000000..19f42b39394e
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p-wakeup.dtsi
@@ -0,0 +1,97 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P wakeup domain peripherals
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&cbass_wakeup {
+ wkup_conf: bus@43000000 {
+ compatible = "simple-bus";
+ reg = <0x00 0x43000000 0x00 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x00 0x00 0x43000000 0x20000>;
+ bootph-all;
+
+ chipid: chipid@14 {
+ compatible = "ti,am654-chipid";
+ reg = <0x14 0x4>;
+ bootph-all;
+ };
+ };
+
+ wkup_uart0: serial@2b300000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0x00 0x2b300000 0x00 0x100>;
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 114 0>;
+ clock-names = "fclk";
+ status = "disabled";
+ };
+
+ wkup_i2c0: i2c@2b200000 {
+ compatible = "ti,am64-i2c", "ti,omap4-i2c";
+ reg = <0x00 0x2b200000 0x00 0x100>;
+ interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 107 4>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
+ wkup_rtc0: rtc@2b1f0000 {
+ compatible = "ti,am62-rtc";
+ reg = <0x00 0x2b1f0000 0x00 0x100>;
+ interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 117 6> , <&k3_clks 117 0>;
+ clock-names = "vbus", "osc32k";
+ power-domains = <&k3_pds 117 TI_SCI_PD_EXCLUSIVE>;
+ wakeup-source;
+ };
+
+ wkup_rti0: watchdog@2b000000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2b000000 0x00 0x100>;
+ clocks = <&k3_clks 132 0>;
+ power-domains = <&k3_pds 132 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 132 0>;
+ assigned-clock-parents = <&k3_clks 132 2>;
+ /* Used by DM firmware */
+ status = "reserved";
+ };
+
+ wkup_vtm0: temperature-sensor@b00000 {
+ compatible = "ti,j7200-vtm";
+ reg = <0x00 0xb00000 0x00 0x400>,
+ <0x00 0xb01000 0x00 0x400>;
+ power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>;
+ #thermal-sensor-cells = <1>;
+ };
+
+ wkup_r5fss0: r5fss@78000000 {
+ compatible = "ti,am62-r5fss";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x78000000 0x00 0x78000000 0x8000>,
+ <0x78100000 0x00 0x78100000 0x8000>;
+ power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>;
+
+ wkup_r5fss0_core0: r5f@78000000 {
+ compatible = "ti,am62-r5f";
+ reg = <0x78000000 0x00008000>,
+ <0x78100000 0x00008000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <121>;
+ ti,sci-proc-ids = <0x01 0xff>;
+ resets = <&k3_reset 121 1>;
+ firmware-name = "am62-wkup-r5f0_0-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62p.dtsi
new file mode 100644
index 000000000000..84ffe7b9dcaf
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p.dtsi
@@ -0,0 +1,125 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for AM62P SoC Family
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+#include "k3-pinctrl.h"
+
+/ {
+ model = "Texas Instruments K3 AM62P5 SoC";
+ compatible = "ti,am62p5";
+ interrupt-parent = <&gic500>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ firmware {
+ optee {
+ compatible = "linaro,optee-tz";
+ method = "smc";
+ };
+
+ psci: psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+ };
+
+ a53_timer0: timer-cl0-cpu0 {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, /* cntpsirq */
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, /* cntpnsirq */
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, /* cntvirq */
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* cnthpirq */
+ };
+
+ pmu: pmu {
+ compatible = "arm,cortex-a53-pmu";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ cbass_main: bus@f0000 {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ bootph-all;
+
+ ranges = <0x00 0x000f0000 0x00 0x000f0000 0x00 0x00030000>, /* Main MMRs */
+ <0x00 0x00420000 0x00 0x00420000 0x00 0x00001000>, /* ESM0 */
+ <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */
+ <0x00 0x00703000 0x00 0x00703000 0x00 0x00000200>, /* USB0 debug trace */
+ <0x00 0x0070c000 0x00 0x0070c000 0x00 0x00000200>, /* USB1 debug trace */
+ <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* Timesync router */
+ <0x00 0x01000000 0x00 0x01000000 0x00 0x01b28400>, /* First peripheral window */
+ <0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */
+ <0x00 0x0e000000 0x00 0x0e000000 0x00 0x01d20000>, /* Second peripheral window */
+ <0x00 0x0fd00000 0x00 0x0fd00000 0x00 0x00020000>, /* GPU */
+ <0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Third peripheral window */
+ <0x00 0x30040000 0x00 0x30040000 0x00 0x00080000>, /* PRUSS-M */
+ <0x00 0x30101000 0x00 0x30101000 0x00 0x00010100>, /* CSI window */
+ <0x00 0x30200000 0x00 0x30200000 0x00 0x00010000>, /* DSS */
+ <0x00 0x30210000 0x00 0x30210000 0x00 0x00010000>, /* VPU */
+ <0x00 0x31000000 0x00 0x31000000 0x00 0x00050000>, /* USB0 DWC3 Core window */
+ <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */
+ <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */
+ <0x00 0x43600000 0x00 0x43600000 0x00 0x00010000>, /* SA3 sproxy data */
+ <0x00 0x44043000 0x00 0x44043000 0x00 0x00000fe0>, /* TI SCI DEBUG */
+ <0x00 0x44860000 0x00 0x44860000 0x00 0x00040000>, /* SA3 sproxy config */
+ <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>, /* DMSS */
+ <0x00 0x60000000 0x00 0x60000000 0x00 0x08000000>, /* FSS0 DAT1 */
+ <0x00 0x70000000 0x00 0x70000000 0x00 0x00010000>, /* OCSRAM */
+ <0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */
+ <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS0 DAT3 */
+
+ /* MCU Domain Range */
+ <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>,
+ <0x00 0x79000000 0x00 0x79000000 0x00 0x00008000>,
+ <0x00 0x79020000 0x00 0x79020000 0x00 0x00008000>,
+ <0x00 0x79100000 0x00 0x79100000 0x00 0x00040000>,
+ <0x00 0x79140000 0x00 0x79140000 0x00 0x00040000>,
+
+ /* Wakeup Domain Range */
+ <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>,
+ <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>,
+ <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>,
+ <0x00 0x78000000 0x00 0x78000000 0x00 0x00008000>,
+ <0x00 0x78100000 0x00 0x78100000 0x00 0x00008000>;
+
+ cbass_mcu: bus@4000000 {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>, /* Peripheral window */
+ <0x00 0x79000000 0x00 0x79000000 0x00 0x00008000>, /* MCU R5 ATCM */
+ <0x00 0x79020000 0x00 0x79020000 0x00 0x00008000>, /* MCU R5 BTCM */
+ <0x00 0x79100000 0x00 0x79100000 0x00 0x00040000>, /* MCU IRAM0 */
+ <0x00 0x79140000 0x00 0x79140000 0x00 0x00040000>; /* MCU IRAM1 */
+ bootph-all;
+ };
+
+ cbass_wakeup: bus@b00000 {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
+ <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */
+ <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>, /* WKUP CTRL MMR */
+ <0x00 0x78000000 0x00 0x78000000 0x00 0x00008000>, /* DM R5 ATCM*/
+ <0x00 0x78100000 0x00 0x78100000 0x00 0x00008000>; /* DM R5 BTCM*/
+ bootph-all;
+ };
+ };
+
+ #include "k3-am62p-thermal.dtsi"
+};
+
+/* Now include peripherals for each bus segment */
+#include "k3-am62p-main.dtsi"
+#include "k3-am62p-mcu.dtsi"
+#include "k3-am62p-wakeup.dtsi"
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p5-sk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am62p5-sk.dts
new file mode 100644
index 000000000000..1773c05f752c
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p5-sk.dts
@@ -0,0 +1,609 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P5-SK
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ * Schematics: https://www.ti.com/lit/zip/sprr487
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/net/ti-dp83867.h>
+#include "k3-am62p5.dtsi"
+
+/ {
+ compatible = "ti,am62p5-sk", "ti,am62p5";
+ model = "Texas Instruments AM62P5 SK";
+
+ aliases {
+ serial0 = &wkup_uart0;
+ serial2 = &main_uart0;
+ serial3 = &main_uart1;
+ mmc0 = &sdhci0;
+ mmc1 = &sdhci1;
+ mmc2 = &sdhci2;
+ spi0 = &ospi0;
+ ethernet0 = &cpsw_port1;
+ ethernet1 = &cpsw_port2;
+ };
+
+ chosen {
+ stdout-path = &main_uart0;
+ };
+
+ memory@80000000 {
+ /* 8G RAM */
+ reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
+ <0x00000008 0x80000000 0x00000001 0x80000000>;
+ device_type = "memory";
+ bootph-pre-ram;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ secure_tfa_ddr: tfa@9e780000 {
+ reg = <0x00 0x9e780000 0x00 0x80000>;
+ no-map;
+ };
+
+ secure_ddr: optee@9e800000 {
+ reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
+ no-map;
+ };
+
+ wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9c900000 0x00 0x01e00000>;
+ no-map;
+ };
+ };
+
+ vmain_pd: regulator-0 {
+ /* TPS65988 PD CONTROLLER OUTPUT */
+ compatible = "regulator-fixed";
+ regulator-name = "vmain_pd";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ bootph-all;
+ };
+
+ vcc_5v0: regulator-1 {
+ /* Output of TPS630702RNMR */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vmain_pd>;
+ regulator-always-on;
+ regulator-boot-on;
+ bootph-all;
+ };
+
+ vdd_mmc1: regulator-2 {
+ /* TPS22918DBVR */
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_mmc1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ enable-active-high;
+ gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
+ bootph-all;
+ };
+
+ vddshv_sdio: regulator-3 {
+ compatible = "regulator-gpio";
+ regulator-name = "vddshv_sdio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&vddshv_sdio_pins_default>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x0>,
+ <3300000 0x1>;
+ bootph-all;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usr_led_pins_default>;
+
+ led-0 {
+ label = "am62-sk:green:heartbeat";
+ gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ function = LED_FUNCTION_HEARTBEAT;
+ default-state = "off";
+ };
+ };
+
+ tlv320_mclk: clk-0 {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <12288000>;
+ };
+
+ codec_audio: sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "AM62x-SKEVM";
+ simple-audio-card,widgets =
+ "Headphone", "Headphone Jack",
+ "Line", "Line In",
+ "Microphone", "Microphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT",
+ "LINE1L", "Line In",
+ "LINE1R", "Line In",
+ "MIC3R", "Microphone Jack",
+ "Microphone Jack", "Mic Bias";
+ simple-audio-card,format = "dsp_b";
+ simple-audio-card,bitclock-master = <&sound_master>;
+ simple-audio-card,frame-master = <&sound_master>;
+ simple-audio-card,bitclock-inversion;
+
+ simple-audio-card,cpu {
+ sound-dai = <&mcasp1>;
+ };
+
+ sound_master: simple-audio-card,codec {
+ sound-dai = <&tlv320aic3106>;
+ clocks = <&tlv320_mclk>;
+ };
+ };
+};
+
+&main_gpio0 {
+ bootph-all;
+};
+
+&main_gpio1 {
+ bootph-all;
+};
+
+&main_pmx0 {
+ bootph-all;
+
+ main_i2c0_pins_default: main-i2c0-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (B25) I2C0_SCL */
+ AM62PX_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (A24) I2C0_SDA */
+ >;
+ };
+
+ main_i2c1_pins_default: main-i2c1-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x01e8, PIN_INPUT_PULLUP, 0) /* (C24) I2C1_SCL */
+ AM62PX_IOPAD(0x01ec, PIN_INPUT_PULLUP, 0) /* (B24) I2C1_SDA */
+ >;
+ bootph-all;
+ };
+
+ main_i2c2_pins_default: main-i2c2-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x00b0, PIN_INPUT_PULLUP, 1) /* (T22) GPMC0_CSn2.I2C2_SCL */
+ AM62PX_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /* (U25) GPMC0_CSn3.I2C2_SDA */
+ >;
+ };
+
+ main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x01d4, PIN_INPUT, 7) /* (C22) UART0_RTSn.GPIO1_23 */
+ >;
+ };
+
+ main_mcasp1_pins_default: main-mcasp1-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0090, PIN_INPUT, 2) /* (U24) GPMC0_BE0n_CLE.MCASP1_ACLKX */
+ AM62PX_IOPAD(0x0098, PIN_INPUT, 2) /* (AA24) GPMC0_WAIT0.MCASP1_AFSX */
+ AM62PX_IOPAD(0x008c, PIN_INPUT, 2) /* (T25) GPMC0_WEn.MCASP1_AXR0 */
+ AM62PX_IOPAD(0x0084, PIN_INPUT, 2) /* (R25) GPMC0_ADVn_ALE.MCASP1_AXR2 */
+ >;
+ };
+
+ main_mdio1_pins_default: main-mdio1-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0160, PIN_OUTPUT, 0) /* (F17) MDIO0_MDC */
+ AM62PX_IOPAD(0x015c, PIN_INPUT, 0) /* (F16) MDIO0_MDIO */
+ >;
+ };
+
+ main_mmc1_pins_default: main-mmc1-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x023c, PIN_INPUT, 0) /* (H20) MMC1_CMD */
+ AM62PX_IOPAD(0x0234, PIN_OUTPUT, 0) /* (J24) MMC1_CLK */
+ AM62PX_IOPAD(0x0230, PIN_INPUT, 0) /* (H21) MMC1_DAT0 */
+ AM62PX_IOPAD(0x022c, PIN_INPUT_PULLUP, 0) /* (H23) MMC1_DAT1 */
+ AM62PX_IOPAD(0x0228, PIN_INPUT_PULLUP, 0) /* (H22) MMC1_DAT2 */
+ AM62PX_IOPAD(0x0224, PIN_INPUT_PULLUP, 0) /* (H25) MMC1_DAT3 */
+ AM62PX_IOPAD(0x0240, PIN_INPUT, 0) /* (D23) MMC1_SDCD */
+ >;
+ bootph-all;
+ };
+
+ main_mmc2_pins_default: main-mmc2-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0120, PIN_INPUT, 0) /* (K24) MMC2_CMD */
+ AM62PX_IOPAD(0x0118, PIN_OUTPUT, 0) /* (K21) MMC2_CLK */
+ AM62PX_IOPAD(0x011C, PIN_INPUT, 0) /* () MMC2_CLKLB */
+ AM62PX_IOPAD(0x0114, PIN_INPUT, 0) /* (K23) MMC2_DAT0 */
+ AM62PX_IOPAD(0x0110, PIN_INPUT_PULLUP, 0) /* (K22) MMC2_DAT1 */
+ AM62PX_IOPAD(0x010c, PIN_INPUT_PULLUP, 0) /* (L20) MMC2_DAT2 */
+ AM62PX_IOPAD(0x0108, PIN_INPUT_PULLUP, 0) /* (L21) MMC2_DAT3 */
+ >;
+ bootph-all;
+ };
+
+ main_rgmii1_pins_default: main-rgmii1-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x014c, PIN_INPUT, 0) /* (B15) RGMII1_RD0 */
+ AM62PX_IOPAD(0x0150, PIN_INPUT, 0) /* (B16) RGMII1_RD1 */
+ AM62PX_IOPAD(0x0154, PIN_INPUT, 0) /* (A14) RGMII1_RD2 */
+ AM62PX_IOPAD(0x0158, PIN_INPUT, 0) /* (B14) RGMII1_RD3 */
+ AM62PX_IOPAD(0x0148, PIN_INPUT, 0) /* (A16) RGMII1_RXC */
+ AM62PX_IOPAD(0x0144, PIN_INPUT, 0) /* (A15) RGMII1_RX_CTL */
+ AM62PX_IOPAD(0x0134, PIN_INPUT, 0) /* (A18) RGMII1_TD0 */
+ AM62PX_IOPAD(0x0138, PIN_INPUT, 0) /* (C17) RGMII1_TD1 */
+ AM62PX_IOPAD(0x013c, PIN_INPUT, 0) /* (A17) RGMII1_TD2 */
+ AM62PX_IOPAD(0x0140, PIN_INPUT, 0) /* (C16) RGMII1_TD3 */
+ AM62PX_IOPAD(0x0130, PIN_INPUT, 0) /* (B17) RGMII1_TXC */
+ AM62PX_IOPAD(0x012c, PIN_INPUT, 0) /* (B18) RGMII1_TX_CTL */
+ >;
+ bootph-all;
+ };
+
+ main_rgmii2_pins_default: main-rgmii2-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0184, PIN_INPUT, 0) /* (E19) RGMII2_RD0 */
+ AM62PX_IOPAD(0x0188, PIN_INPUT, 0) /* (E16) RGMII2_RD1 */
+ AM62PX_IOPAD(0x018c, PIN_INPUT, 0) /* (E17) RGMII2_RD2 */
+ AM62PX_IOPAD(0x0190, PIN_INPUT, 0) /* (C19) RGMII2_RD3 */
+ AM62PX_IOPAD(0x0180, PIN_INPUT, 0) /* (D19) RGMII2_RXC */
+ AM62PX_IOPAD(0x017c, PIN_INPUT, 0) /* (F19) RGMII2_RX_CTL */
+ AM62PX_IOPAD(0x016c, PIN_INPUT, 0) /* (B19) RGMII2_TD0 */
+ AM62PX_IOPAD(0x0170, PIN_INPUT, 0) /* (A21) RGMII2_TD1 */
+ AM62PX_IOPAD(0x0174, PIN_INPUT, 0) /* (D17) RGMII2_TD2 */
+ AM62PX_IOPAD(0x0178, PIN_INPUT, 0) /* (A19) RGMII2_TD3 */
+ AM62PX_IOPAD(0x0168, PIN_INPUT, 0) /* (D16) RGMII2_TXC */
+ AM62PX_IOPAD(0x0164, PIN_INPUT, 0) /* (A20) RGMII2_TX_CTL */
+ >;
+ bootph-all;
+ };
+
+ main_uart0_pins_default: main-uart0-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x1c8, PIN_INPUT, 0) /* (A22) UART0_RXD */
+ AM62PX_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (B22) UART0_TXD */
+ >;
+ bootph-all;
+ };
+
+ main_uart1_pins_default: main-uart1-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0194, PIN_INPUT, 2) /* (D25) MCASP0_AXR3.UART1_CTSn */
+ AM62PX_IOPAD(0x0198, PIN_OUTPUT, 2) /* (E25) MCASP0_AXR2.UART1_RTSn */
+ AM62PX_IOPAD(0x01ac, PIN_INPUT, 2) /* (G23) MCASP0_AFSR.UART1_RXD */
+ AM62PX_IOPAD(0x01b0, PIN_OUTPUT, 2) /* (G20) MCASP0_ACLKR.UART1_TXD */
+ >;
+ bootph-all;
+ };
+
+ main_wlirq_pins_default: main-wlirq-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0128, PIN_INPUT, 7) /* (K25) MMC2_SDWP.GPIO0_72 */
+ >;
+ };
+
+ ospi0_pins_default: ospi0-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0000, PIN_OUTPUT, 0) /* (P23) OSPI0_CLK */
+ AM62PX_IOPAD(0x002c, PIN_OUTPUT, 0) /* (M25) OSPI0_CSn0 */
+ AM62PX_IOPAD(0x000c, PIN_INPUT, 0) /* (L25) OSPI0_D0 */
+ AM62PX_IOPAD(0x0010, PIN_INPUT, 0) /* (N24) OSPI0_D1 */
+ AM62PX_IOPAD(0x0014, PIN_INPUT, 0) /* (N25) OSPI0_D2 */
+ AM62PX_IOPAD(0x0018, PIN_INPUT, 0) /* (M24) OSPI0_D3 */
+ AM62PX_IOPAD(0x001c, PIN_INPUT, 0) /* (N21) OSPI0_D4 */
+ AM62PX_IOPAD(0x0020, PIN_INPUT, 0) /* (N22) OSPI0_D5 */
+ AM62PX_IOPAD(0x0024, PIN_INPUT, 0) /* (P21) OSPI0_D6 */
+ AM62PX_IOPAD(0x0028, PIN_INPUT, 0) /* (N20) OSPI0_D7 */
+ AM62PX_IOPAD(0x0008, PIN_INPUT, 0) /* (P22) OSPI0_DQS */
+ >;
+ bootph-all;
+ };
+
+ usr_led_pins_default: usr-led-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0244, PIN_INPUT, 7) /* (D24) MMC1_SDWP.GPIO1_49 */
+ >;
+ };
+
+ vddshv_sdio_pins_default: vddshvr-sdio-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x007c, PIN_INPUT, 7) /* (Y25) GPMC0_CLK.GPIO0_31 */
+ >;
+ bootph-all;
+ };
+
+ wlan_en_pins_default: wlan-en-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_IOPAD(0x0124, PIN_INPUT, 7) /* (J25) MMC2_SDCD.GPIO0_71 */
+ >;
+ };
+};
+
+&main_i2c1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c1_pins_default>;
+ clock-frequency = <100000>;
+ bootph-all;
+
+ tlv320aic3106: audio-codec@1b {
+ #sound-dai-cells = <0>;
+ compatible = "ti,tlv320aic3106";
+ reg = <0x1b>;
+ ai3x-micbias-vg = <1>; /* 2.0V */
+ };
+
+ exp1: gpio@22 {
+ compatible = "ti,tca6424";
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "OLDI_INT#", "x8_NAND_DETECT",
+ "UART1_FET_SEL", "MMC1_SD_EN",
+ "VPP_EN", "EXP_PS_3V3_EN",
+ "UART1_FET_BUF_EN", "EXP_HAT_DETECT",
+ "DSI_GPIO0", "DSI_GPIO1",
+ "OLDI_EDID", "BT_UART_WAKE_SOC_3V3",
+ "USB_TYPEA_OC_INDICATION", "CSI_GPIO0",
+ "CSI_GPIO1", "WLAN_ALERTn",
+ "HDMI_INTn", "TEST_GPIO2",
+ "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
+ "MCASP1_FET_SEL", "DSI_EDID",
+ "PD_I2C_IRQ", "IO_EXP_TEST_LED";
+
+ interrupt-parent = <&main_gpio1>;
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
+ bootph-all;
+ };
+
+ exp2: gpio@23 {
+ compatible = "ti,tca6424";
+ reg = <0x23>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "BT_EN_SOC", "EXP_PS_5V0_EN",
+ "", "",
+ "", "",
+ "", "",
+ "WL_LT_EN", "",
+ "TP3", "TP6",
+ "TP4", "TP7",
+ "TP5", "TP8",
+ "SoC_I2C2_MCAN_SEL", "GPIO_HDMI_RSTn",
+ "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
+ "GPIO_OLDI_RSTn", "GPIO_AUD_RSTn",
+ "GPIO_eMMC_RSTn", "SoC_WLAN_SDIO_RST";
+ };
+};
+
+&main_i2c2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c2_pins_default>;
+ clock-frequency = <400000>;
+};
+
+&sdhci0 {
+ status = "okay";
+ ti,driver-strength-ohm = <50>;
+ disable-wp;
+};
+
+&sdhci1 {
+ /* SD/MMC */
+ status = "okay";
+ vmmc-supply = <&vdd_mmc1>;
+ vqmmc-supply = <&vddshv_sdio>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc1_pins_default>;
+ ti,driver-strength-ohm = <50>;
+ disable-wp;
+ no-1-8-v;
+ bootph-all;
+};
+
+&cpsw3g {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_rgmii1_pins_default>,
+ <&main_rgmii2_pins_default>;
+};
+
+&cpsw_port1 {
+ phy-mode = "rgmii-rxid";
+ phy-handle = <&cpsw3g_phy0>;
+};
+
+&cpsw_port2 {
+ phy-mode = "rgmii-rxid";
+ phy-handle = <&cpsw3g_phy1>;
+};
+
+&cpsw3g_mdio {
+ cpsw3g_phy0: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+
+ cpsw3g_phy1: ethernet-phy@1 {
+ reg = <1>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+};
+
+&mcasp1 {
+ status = "okay";
+ #sound-dai-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcasp1_pins_default>;
+
+ op-mode = <0>; /* MCASP_IIS_MODE */
+ tdm-slots = <2>;
+
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
+ 1 0 2 0
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ >;
+ tx-num-evt = <32>;
+ rx-num-evt = <32>;
+};
+
+&fss {
+ bootph-all;
+};
+
+&ospi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&ospi0_pins_default>;
+ bootph-all;
+
+ flash@0{
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ spi-tx-bus-width = <8>;
+ spi-rx-bus-width = <8>;
+ spi-max-frequency = <25000000>;
+ cdns,tshsl-ns = <60>;
+ cdns,tsd2d-ns = <60>;
+ cdns,tchsh-ns = <60>;
+ cdns,tslch-ns = <60>;
+ cdns,read-delay = <4>;
+ bootph-all;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ bootph-all;
+
+ partition@0 {
+ label = "ospi.tiboot3";
+ reg = <0x00 0x80000>;
+ };
+
+ partition@80000 {
+ label = "ospi.tispl";
+ reg = <0x80000 0x200000>;
+ };
+
+ partition@280000 {
+ label = "ospi.u-boot";
+ reg = <0x280000 0x400000>;
+ };
+
+ partition@680000 {
+ label = "ospi.env";
+ reg = <0x680000 0x40000>;
+ };
+
+ partition@6c0000 {
+ label = "ospi.env.backup";
+ reg = <0x6c0000 0x40000>;
+ };
+
+ partition@800000 {
+ label = "ospi.rootfs";
+ reg = <0x800000 0x37c0000>;
+ };
+
+ partition@3fc0000 {
+ label = "ospi.phypattern";
+ reg = <0x3fc0000 0x40000>;
+ bootph-all;
+ };
+ };
+ };
+};
+
+&mailbox0_cluster0 {
+ mbox_r5_0: mbox-r5-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+};
+
+&mailbox0_cluster1 {
+ mbox_mcu_r5_0: mbox-mcu-r5-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+};
+
+&main_uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart0_pins_default>;
+ status = "okay";
+ bootph-all;
+};
+
+&main_uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart1_pins_default>;
+ /* Main UART1 is used by TIFS firmware */
+ status = "reserved";
+ bootph-all;
+};
+
+&mcu_pmx0 {
+ bootph-all;
+
+ wkup_uart0_pins_default: wkup-uart0-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C7) WKUP_UART0_CTSn */
+ AM62PX_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (C6) WKUP_UART0_RTSn */
+ AM62PX_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (D8) WKUP_UART0_RXD */
+ AM62PX_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (D7) WKUP_UART0_TXD */
+ >;
+ bootph-all;
+ };
+};
+
+&wkup_uart0 {
+ /* WKUP UART0 is used by DM firmware */
+ pinctrl-names = "default";
+ pinctrl-0 = <&wkup_uart0_pins_default>;
+ status = "reserved";
+ bootph-all;
+};
+
+/* mcu_gpio0 and mcu_gpio_intr are reserved for mcu firmware usage */
+&mcu_gpio0 {
+ status = "reserved";
+};
+
+&mcu_gpio_intr {
+ status = "reserved";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62p5.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62p5.dtsi
new file mode 100644
index 000000000000..50147bb63e03
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62p5.dtsi
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for the AM62P5 SoC family (quad core)
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ * TRM: https://www.ti.com/lit/pdf/spruj83
+ */
+
+/dts-v1/;
+
+#include "k3-am62p.dtsi"
+
+/ {
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu-map {
+ cluster0: cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+
+ core1 {
+ cpu = <&cpu1>;
+ };
+
+ core2 {
+ cpu = <&cpu2>;
+ };
+
+ core3 {
+ cpu = <&cpu3>;
+ };
+ };
+ };
+
+ cpu0: cpu@0 {
+ compatible = "arm,cortex-a53";
+ reg = <0x000>;
+ device_type = "cpu";
+ enable-method = "psci";
+ i-cache-size = <0x8000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ clocks = <&k3_clks 135 0>;
+ };
+
+ cpu1: cpu@1 {
+ compatible = "arm,cortex-a53";
+ reg = <0x001>;
+ device_type = "cpu";
+ enable-method = "psci";
+ i-cache-size = <0x8000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ clocks = <&k3_clks 136 0>;
+ };
+
+ cpu2: cpu@2 {
+ compatible = "arm,cortex-a53";
+ reg = <0x002>;
+ device_type = "cpu";
+ enable-method = "psci";
+ i-cache-size = <0x8000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ clocks = <&k3_clks 137 0>;
+ };
+
+ cpu3: cpu@3 {
+ compatible = "arm,cortex-a53";
+ reg = <0x003>;
+ device_type = "cpu";
+ enable-method = "psci";
+ i-cache-size = <0x8000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&l2_0>;
+ clocks = <&k3_clks 138 0>;
+ };
+ };
+
+ l2_0: l2-cache0 {
+ compatible = "cache";
+ cache-unified;
+ cache-level = <2>;
+ cache-size = <0x80000>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-common.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-common.dtsi
index 34c8ffc553ec..33768c02d8eb 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-common.dtsi
@@ -28,6 +28,7 @@
};
memory@80000000 {
+ bootph-pre-ram;
device_type = "memory";
/* 2G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
@@ -114,11 +115,23 @@
clocks = <&tlv320_mclk>;
};
};
+
+ hdmi0: connector-hdmi {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&sii9022_out>;
+ };
+ };
+ };
};
&main_pmx0 {
/* First pad number is ALW package and second is AMC package */
main_uart0_pins_default: main-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14/A13) UART0_RXD */
AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14/E11) UART0_TXD */
@@ -126,6 +139,7 @@
};
main_uart1_pins_default: main-uart1-default-pins {
+ bootph-pre-ram;
pinctrl-single,pins = <
AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19/B18) MCASP0_AXR3.UART1_CTSn */
AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19/B17) MCASP0_AXR2.UART1_RTSn */
@@ -156,6 +170,7 @@
};
main_mmc0_pins_default: main-mmc0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3/V3) MMC0_CMD */
AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (AB1/Y1) MMC0_CLK */
@@ -171,6 +186,7 @@
};
main_mmc1_pins_default: main-mmc1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
@@ -196,6 +212,7 @@
};
main_rgmii1_pins_default: main-rgmii1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM62X_IOPAD(0x14c, PIN_INPUT, 0) /* (AB17/W15) RGMII1_RD0 */
AM62X_IOPAD(0x150, PIN_INPUT, 0) /* (AC17/Y16) RGMII1_RD1 */
@@ -226,10 +243,44 @@
AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23/K20) GPMC0_ADVN_ALE.MCASP1_AXR2 */
>;
};
+
+ main_dss0_pins_default: main-dss0-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */
+ AM62X_IOPAD(0x0f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */
+ AM62X_IOPAD(0x104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */
+ AM62X_IOPAD(0x0fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */
+ AM62X_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
+ AM62X_IOPAD(0x0bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */
+ AM62X_IOPAD(0x0c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */
+ AM62X_IOPAD(0x0c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */
+ AM62X_IOPAD(0x0c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */
+ AM62X_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */
+ AM62X_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */
+ AM62X_IOPAD(0x0d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */
+ AM62X_IOPAD(0x0d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */
+ AM62X_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */
+ AM62X_IOPAD(0x0e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */
+ AM62X_IOPAD(0x0e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */
+ AM62X_IOPAD(0x0e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */
+ AM62X_IOPAD(0x0ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */
+ AM62X_IOPAD(0x0f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */
+ AM62X_IOPAD(0x0f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */
+ AM62X_IOPAD(0x05c, PIN_OUTPUT, 1) /* (R24) GPMC0_AD8.VOUT0_DATA16 */
+ AM62X_IOPAD(0x060, PIN_OUTPUT, 1) /* (R25) GPMC0_AD9.VOUT0_DATA17 */
+ AM62X_IOPAD(0x064, PIN_OUTPUT, 1) /* (T25) GPMC0_AD10.VOUT0_DATA18 */
+ AM62X_IOPAD(0x068, PIN_OUTPUT, 1) /* (R21) GPMC0_AD11.VOUT0_DATA19 */
+ AM62X_IOPAD(0x06c, PIN_OUTPUT, 1) /* (T22) GPMC0_AD12.VOUT0_DATA20 */
+ AM62X_IOPAD(0x070, PIN_OUTPUT, 1) /* (T24) GPMC0_AD13.VOUT0_DATA21 */
+ AM62X_IOPAD(0x074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
+ AM62X_IOPAD(0x078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
+ >;
+ };
};
&mcu_pmx0 {
wkup_uart0_pins_default: wkup-uart0-default-pins {
+ bootph-pre-ram;
pinctrl-single,pins = <
AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6/A7) WKUP_UART0_CTSn */
AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4/B4) WKUP_UART0_RTSn */
@@ -241,12 +292,14 @@
&wkup_uart0 {
/* WKUP UART0 is used by DM firmware */
+ bootph-pre-ram;
status = "reserved";
pinctrl-names = "default";
pinctrl-0 = <&wkup_uart0_pins_default>;
};
&main_uart0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
@@ -254,6 +307,7 @@
&main_uart1 {
/* Main UART1 is used by TIFS firmware */
+ bootph-pre-ram;
status = "reserved";
pinctrl-names = "default";
pinctrl-0 = <&main_uart1_pins_default>;
@@ -300,7 +354,7 @@
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
- clock-frequency = <400000>;
+ clock-frequency = <100000>;
tlv320aic3106: audio-codec@1b {
#sound-dai-cells = <0>;
@@ -313,9 +367,47 @@
IOVDD-supply = <&vcc_3v3_sys>;
DRVDD-supply = <&vcc_3v3_sys>;
};
+
+ sii9022: bridge-hdmi@3b {
+ compatible = "sil,sii9022";
+ reg = <0x3b>;
+ interrupt-parent = <&exp1>;
+ interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+ #sound-dai-cells = <0>;
+ sil,i2s-data-lanes = < 0 >;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ sii9022_in: endpoint {
+ remote-endpoint = <&dpi1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ sii9022_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
+};
+
+&main_i2c2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c2_pins_default>;
+ clock-frequency = <400000>;
};
&sdhci0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
@@ -325,6 +417,7 @@
&sdhci1 {
/* SD/MMC */
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
@@ -333,21 +426,25 @@
};
&cpsw3g {
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&main_rgmii1_pins_default>;
};
&cpsw_port1 {
+ bootph-all;
phy-mode = "rgmii-rxid";
phy-handle = <&cpsw3g_phy0>;
};
&cpsw3g_mdio {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mdio1_pins_default>;
cpsw3g_phy0: ethernet-phy@0 {
+ bootph-all;
reg = <0>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
@@ -410,3 +507,29 @@
tx-num-evt = <32>;
rx-num-evt = <32>;
};
+
+&dss {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_dss0_pins_default>;
+};
+
+&dss_ports {
+ /* VP2: DPI Output */
+ port@1 {
+ reg = <1>;
+
+ dpi1_out: endpoint {
+ remote-endpoint = <&sii9022_in>;
+ };
+ };
+};
+
+/* mcu_gpio0 and mcu_gpio_intr are reserved for mcu firmware usage */
+&mcu_gpio0 {
+ status = "reserved";
+};
+
+&mcu_gpio_intr {
+ status = "reserved";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-imx219.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-imx219.dtso
new file mode 100644
index 000000000000..6f4cd73c2f43
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-imx219.dtso
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * IMX219 (RPi v2) Camera Module
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ clk_imx219_fixed: imx219-xclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
+};
+
+&main_i2c2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ i2c-switch@71 {
+ compatible = "nxp,pca9543";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+
+ /* CAM port */
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ ov5640: camera@10 {
+ compatible = "sony,imx219";
+ reg = <0x10>;
+
+ clocks = <&clk_imx219_fixed>;
+ clock-names = "xclk";
+
+ reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2rx0_in_sensor>;
+ link-frequencies = /bits/ 64 <456000000>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+ };
+};
+
+&cdns_csi2rx0 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "okay";
+
+ csi2rx0_in_sensor: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&ti_csi2rx0 {
+ status = "okay";
+};
+
+&dphy0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-ov5640.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-ov5640.dtso
new file mode 100644
index 000000000000..9323a4b38389
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-ov5640.dtso
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * ALINX AN5641 & Digilent PCam 5C - OV5640 camera module
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ clk_ov5640_fixed: ov5640-xclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <12000000>;
+ };
+};
+
+&main_i2c2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ i2c-switch@71 {
+ compatible = "nxp,pca9543";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+
+ /* CAM port */
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+
+ clocks = <&clk_ov5640_fixed>;
+ clock-names = "xclk";
+ powerdown-gpios = <&exp1 13 GPIO_ACTIVE_LOW>;
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2rx0_in_sensor>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+ };
+};
+
+&cdns_csi2rx0 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "okay";
+
+ csi2rx0_in_sensor: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&ti_csi2rx0 {
+ status = "okay";
+};
+
+&dphy0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
new file mode 100644
index 000000000000..dcaa33a4c8d3
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Technexion TEVI-OV5640-*-RPI - OV5640 camera module
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+ clk_ov5640_fixed: ov5640-xclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
+};
+
+&main_i2c2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ i2c-switch@71 {
+ compatible = "nxp,pca9543";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+
+ /* CAM port */
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+
+ clocks = <&clk_ov5640_fixed>;
+ clock-names = "xclk";
+ powerdown-gpios = <&exp1 13 GPIO_ACTIVE_LOW>;
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2rx0_in_sensor>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+ };
+};
+
+&cdns_csi2rx0 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi0_port0: port@0 {
+ reg = <0>;
+ status = "okay";
+
+ csi2rx0_in_sensor: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&ti_csi2rx0 {
+ status = "okay";
+};
+
+&dphy0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-hdmi-audio.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-hdmi-audio.dtso
new file mode 100644
index 000000000000..43a0ddc123e5
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am62x-sk-hdmi-audio.dtso
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * Audio playback via HDMI for AM625-SK and AM62-LP SK.
+ *
+ * Links:
+ * AM625 SK: https://www.ti.com/tool/SK-AM62
+ * AM62-LP SK: https://www.ti.com/tool/SK-AM62-LP
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ hdmi_audio: sound-sii9022 {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "AM62x-Sil9022-HDMI";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&hdmi_dailink_master>;
+ simple-audio-card,frame-master = <&hdmi_dailink_master>;
+
+ hdmi_dailink_master: simple-audio-card,cpu {
+ sound-dai = <&mcasp1>;
+ system-clock-direction-out;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&sii9022>;
+ };
+ };
+};
+
+&mcasp1 {
+ auxclk-fs-ratio = <2177>;
+};
+
+&codec_audio {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am64-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am64-main.dtsi
index 1664d9f0241c..e348114f42e0 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am64-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am64-main.dtsi
@@ -38,17 +38,36 @@
};
main_conf: syscon@43000000 {
+ bootph-all;
compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
reg = <0x0 0x43000000 0x0 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x0 0x43000000 0x20000>;
+ chipid@14 {
+ bootph-all;
+ compatible = "ti,am654-chipid";
+ reg = <0x00000014 0x4>;
+ };
+
serdes_ln_ctrl: mux-controller {
compatible = "mmio-mux";
#mux-control-cells = <1>;
mux-reg-masks = <0x4080 0x3>; /* SERDES0 lane0 select */
};
+
+ phy_gmii_sel: phy@4044 {
+ compatible = "ti,am654-phy-gmii-sel";
+ reg = <0x4044 0x8>;
+ #phy-cells = <1>;
+ };
+
+ epwm_tbclk: clock-controller@4130 {
+ compatible = "ti,am64-epwm-tbclk";
+ reg = <0x4130 0x4>;
+ #clock-cells = <1>;
+ };
};
gic500: interrupt-controller@1800000 {
@@ -79,7 +98,8 @@
};
dmss: bus@48000000 {
- compatible = "simple-mfd";
+ bootph-all;
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
dma-ranges;
@@ -88,6 +108,7 @@
ti,sci-dev-id = <25>;
secure_proxy_main: mailbox@4d000000 {
+ bootph-all;
compatible = "ti,am654-secure-proxy";
#mbox-cells = <1>;
reg-names = "target_data", "rt", "scfg";
@@ -117,8 +138,13 @@
<0x00 0x4c000000 0x00 0x20000>,
<0x00 0x4a820000 0x00 0x20000>,
<0x00 0x4aa40000 0x00 0x20000>,
- <0x00 0x4bc00000 0x00 0x100000>;
- reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
+ <0x00 0x4bc00000 0x00 0x100000>,
+ <0x00 0x48600000 0x00 0x8000>,
+ <0x00 0x484a4000 0x00 0x2000>,
+ <0x00 0x484c2000 0x00 0x2000>,
+ <0x00 0x48420000 0x00 0x2000>;
+ reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "bchan";
msi-parent = <&inta_main_dmss>;
#dma-cells = <3>;
@@ -134,8 +160,13 @@
reg = <0x00 0x485c0000 0x00 0x100>,
<0x00 0x4a800000 0x00 0x20000>,
<0x00 0x4aa00000 0x00 0x40000>,
- <0x00 0x4b800000 0x00 0x400000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+ <0x00 0x4b800000 0x00 0x400000>,
+ <0x00 0x485e0000 0x00 0x20000>,
+ <0x00 0x484a0000 0x00 0x4000>,
+ <0x00 0x484c0000 0x00 0x2000>,
+ <0x00 0x48430000 0x00 0x4000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
+ "ring", "tchan", "rchan", "rflow";
msi-parent = <&inta_main_dmss>;
#dma-cells = <2>;
@@ -171,6 +202,7 @@
};
dmsc: system-controller@44043000 {
+ bootph-all;
compatible = "ti,k2g-sci";
ti,host-id = <12>;
mbox-names = "rx", "tx";
@@ -180,22 +212,26 @@
reg = <0x00 0x44043000 0x00 0xfe0>;
k3_pds: power-controller {
+ bootph-all;
compatible = "ti,sci-pm-domain";
#power-domain-cells = <2>;
};
k3_clks: clock-controller {
+ bootph-all;
compatible = "ti,k2g-sci-clk";
#clock-cells = <2>;
};
k3_reset: reset-controller {
+ bootph-all;
compatible = "ti,sci-reset";
#reset-cells = <2>;
};
};
main_pmx0: pinctrl@f4000 {
+ bootph-all;
compatible = "pinctrl-single";
reg = <0x00 0xf4000 0x00 0x2d0>;
#pinctrl-cells = <1>;
@@ -203,32 +239,8 @@
pinctrl-single,function-mask = <0xffffffff>;
};
- main_conf: syscon@43000000 {
- compatible = "syscon", "simple-mfd";
- reg = <0x00 0x43000000 0x00 0x20000>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0x00 0x00 0x43000000 0x20000>;
-
- chipid@14 {
- compatible = "ti,am654-chipid";
- reg = <0x00000014 0x4>;
- };
-
- phy_gmii_sel: phy@4044 {
- compatible = "ti,am654-phy-gmii-sel";
- reg = <0x4044 0x8>;
- #phy-cells = <1>;
- };
-
- epwm_tbclk: clock@4140 {
- compatible = "ti,am64-epwm-tbclk", "syscon";
- reg = <0x4130 0x4>;
- #clock-cells = <1>;
- };
- };
-
main_timer0: timer@2400000 {
+ bootph-all;
compatible = "ti,am654-timer";
reg = <0x00 0x2400000 0x00 0x400>;
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
@@ -373,6 +385,7 @@
};
main_esm: esm@420000 {
+ bootph-pre-ram;
compatible = "ti,j721e-esm";
reg = <0x00 0x420000 0x00 0x1000>;
ti,esm-pins = <160>, <161>;
@@ -620,6 +633,7 @@
ti,otap-del-sel-mmc-hs = <0x0>;
ti,otap-del-sel-ddr52 = <0x6>;
ti,otap-del-sel-hs200 = <0x7>;
+ status = "disabled";
};
sdhci1: mmc@fa00000 {
@@ -638,6 +652,7 @@
ti,otap-del-sel-sdr104 = <0x6>;
ti,otap-del-sel-ddr50 = <0x9>;
ti,clkbuf-sel = <0x7>;
+ status = "disabled";
};
cpsw3g: ethernet@8000000 {
@@ -733,7 +748,7 @@
pinctrl-single,function-mask = <0x000107ff>;
};
- usbss0: cdns-usb@f900000{
+ usbss0: cdns-usb@f900000 {
compatible = "ti,am64-usb";
reg = <0x00 0xf900000 0x00 0x100>;
power-domains = <&k3_pds 161 TI_SCI_PD_EXCLUSIVE>;
@@ -744,7 +759,7 @@
#address-cells = <2>;
#size-cells = <2>;
ranges;
- usb0: usb@f400000{
+ usb0: usb@f400000 {
compatible = "cdns,usb3";
reg = <0x00 0xf400000 0x00 0x10000>,
<0x00 0xf410000 0x00 0x10000>,
@@ -773,6 +788,7 @@
assigned-clock-parents = <&k3_clks 0 3>;
assigned-clock-rates = <60000000>;
clock-names = "fck";
+ status = "disabled";
adc {
#io-channel-cells = <1>;
@@ -802,6 +818,7 @@
assigned-clock-parents = <&k3_clks 75 7>;
assigned-clock-rates = <166666666>;
power-domains = <&k3_pds 75 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
};
};
@@ -1164,21 +1181,21 @@
};
main_rti0: watchdog@e000000 {
- compatible = "ti,j7-rti-wdt";
- reg = <0x00 0xe000000 0x00 0x100>;
- clocks = <&k3_clks 125 0>;
- power-domains = <&k3_pds 125 TI_SCI_PD_EXCLUSIVE>;
- assigned-clocks = <&k3_clks 125 0>;
- assigned-clock-parents = <&k3_clks 125 2>;
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0xe000000 0x00 0x100>;
+ clocks = <&k3_clks 125 0>;
+ power-domains = <&k3_pds 125 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 125 0>;
+ assigned-clock-parents = <&k3_clks 125 2>;
};
main_rti1: watchdog@e010000 {
- compatible = "ti,j7-rti-wdt";
- reg = <0x00 0xe010000 0x00 0x100>;
- clocks = <&k3_clks 126 0>;
- power-domains = <&k3_pds 126 TI_SCI_PD_EXCLUSIVE>;
- assigned-clocks = <&k3_clks 126 0>;
- assigned-clock-parents = <&k3_clks 126 2>;
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0xe010000 0x00 0x100>;
+ clocks = <&k3_clks 126 0>;
+ power-domains = <&k3_pds 126 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 126 0>;
+ assigned-clock-parents = <&k3_clks 126 2>;
};
icssg0: icssg@30000000 {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am64-mcu.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am64-mcu.dtsi
index 686d49790721..b9508072bebb 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am64-mcu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am64-mcu.dtsi
@@ -146,6 +146,7 @@
};
mcu_pmx0: pinctrl@4084000 {
+ bootph-all;
compatible = "pinctrl-single";
reg = <0x00 0x4084000 0x00 0x84>;
#pinctrl-cells = <1>;
@@ -154,6 +155,7 @@
};
mcu_esm: esm@4100000 {
+ bootph-pre-ram;
compatible = "ti,j721e-esm";
reg = <0x00 0x4100000 0x00 0x1000>;
ti,esm-pins = <0>, <1>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am64-phycore-som.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am64-phycore-som.dtsi
index 5606d775153d..1678e74cb750 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am64-phycore-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am64-phycore-som.dtsi
@@ -29,7 +29,7 @@
reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
};
- reserved-memory {
+ reserved_memory: reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
@@ -39,6 +39,54 @@
alignment = <0x1000>;
no-map;
};
+
+ main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a2000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_memory_region: r5f-memory@a2100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a3000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_memory_region: r5f-memory@a3100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3100000 0x00 0xf00000>;
+ no-map;
+ };
};
leds {
@@ -126,6 +174,12 @@
AM64X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (L19) OSPI0_CSn0 */
>;
};
+
+ rtc_pins_default: rtc-defaults-pins {
+ pinctrl-single,pins = <
+ AM64X_IOPAD(0x0278, PIN_INPUT, 7) /* (C19) EXTINTn.GPIO1_70 */
+ >;
+ };
};
&cpsw3g {
@@ -160,6 +214,34 @@
status = "disabled";
};
+&mailbox0_cluster2 {
+ status = "okay";
+
+ mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
+ ti,mbox-rx = <0 0 2>;
+ ti,mbox-tx = <1 0 2>;
+ };
+
+ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
+ ti,mbox-rx = <2 0 2>;
+ ti,mbox-tx = <3 0 2>;
+ };
+};
+
+&mailbox0_cluster4 {
+ status = "okay";
+
+ mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
+ ti,mbox-rx = <0 0 2>;
+ ti,mbox-tx = <1 0 2>;
+ };
+
+ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
+ ti,mbox-rx = <2 0 2>;
+ ti,mbox-tx = <3 0 2>;
+ };
+};
+
&main_i2c0 {
status = "okay";
pinctrl-names = "default";
@@ -177,10 +259,40 @@
i2c_som_rtc: rtc@52 {
compatible = "microcrystal,rv3028";
reg = <0x52>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtc_pins_default>;
+ interrupt-parent = <&main_gpio1>;
+ interrupts = <70 IRQ_TYPE_EDGE_FALLING>;
+ wakeup-source;
};
};
+&main_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core0>;
+ memory-region = <&main_r5fss0_core0_dma_memory_region>,
+ <&main_r5fss0_core0_memory_region>;
+};
+
+&main_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core1>;
+ memory-region = <&main_r5fss0_core1_dma_memory_region>,
+ <&main_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss1_core0 {
+ mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core0>;
+ memory-region = <&main_r5fss1_core0_dma_memory_region>,
+ <&main_r5fss1_core0_memory_region>;
+};
+
+&main_r5fss1_core1 {
+ mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core1>;
+ memory-region = <&main_r5fss1_core1_dma_memory_region>,
+ <&main_r5fss1_core1_memory_region>;
+};
+
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ospi0_pins_default>;
@@ -199,6 +311,7 @@
};
&sdhci0 {
+ status = "okay";
bus-width = <8>;
non-removable;
ti,driver-strength-ohm = <50>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-sdcard.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-sdcard.dtso
new file mode 100644
index 000000000000..79ed19c6c0e9
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-sdcard.dtso
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>, D-82229 Seefeld, Germany.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&sdhci1 {
+ vmmc-supply = <&reg_sd>;
+ no-sdio;
+ status = "okay";
+};
+
+&main_gpio0 {
+ line43-hog {
+ gpio-hog;
+ gpios = <43 0>;
+ line-name = "MMC1_CTRL";
+ output-low;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-wlan.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-wlan.dtso
new file mode 100644
index 000000000000..32596a84b7ba
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am64-tqma64xxl-mbax4xxl-wlan.dtso
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>, D-82229 Seefeld, Germany.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&sdhci1 {
+ mmc-pwrseq = <&wifi_pwrseq>;
+ no-sd;
+ status = "okay";
+};
+
+&main_gpio0 {
+ line43-hog {
+ gpio-hog;
+ gpios = <43 0>;
+ line-name = "MMC1_CTRL";
+ output-high;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi
index 8e9c2bc70f4d..0187c42aed4f 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi
@@ -47,6 +47,7 @@
};
cbass_main: bus@f4000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -85,6 +86,7 @@
<0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>;
cbass_mcu: bus@4000000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am642-evm.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am642-evm.dts
index 15c282c93467..8c5651d2cf5d 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am642-evm.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am642-evm.dts
@@ -6,12 +6,13 @@
/dts-v1/;
#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-am642.dtsi"
+#include "k3-serdes.h"
+
/ {
compatible = "ti,am642-evm", "ti,am642";
model = "Texas Instruments AM642 EVM";
@@ -34,6 +35,7 @@
};
memory@80000000 {
+ bootph-all;
device_type = "memory";
/* 2G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
@@ -107,6 +109,7 @@
evm_12v0: regulator-0 {
/* main DC jack */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "evm_12v0";
regulator-min-microvolt = <12000000>;
@@ -128,6 +131,7 @@
vsys_3v3: regulator-2 {
/* output of LM5140 */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vsys_3v3";
regulator-min-microvolt = <3300000>;
@@ -139,6 +143,7 @@
vdd_mmc1: regulator-3 {
/* TPS2051BD */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vdd_mmc1";
regulator-min-microvolt = <3300000>;
@@ -160,6 +165,7 @@
};
vtt_supply: regulator-5 {
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vtt";
pinctrl-names = "default";
@@ -250,6 +256,7 @@
};
main_uart0_pins_default: main-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0238, PIN_INPUT, 0) /* (B16) UART0_CTSn */
AM64X_IOPAD(0x023c, PIN_OUTPUT, 0) /* (A16) UART0_RTSn */
@@ -268,6 +275,7 @@
};
main_i2c0_pins_default: main-i2c0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
@@ -275,6 +283,7 @@
};
main_i2c1_pins_default: main-i2c1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
AM64X_IOPAD(0x026c, PIN_INPUT_PULLUP, 0) /* (B19) I2C1_SDA */
@@ -282,6 +291,7 @@
};
mdio1_pins_default: mdio1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
@@ -289,6 +299,7 @@
};
rgmii1_pins_default: rgmii1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x01cc, PIN_INPUT, 4) /* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */
AM64X_IOPAD(0x01d4, PIN_INPUT, 4) /* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */
@@ -306,6 +317,7 @@
};
rgmii2_pins_default: rgmii2-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0108, PIN_INPUT, 4) /* (W11) PRG1_PRU1_GPO0.RGMII2_RD0 */
AM64X_IOPAD(0x010c, PIN_INPUT, 4) /* (V11) PRG1_PRU1_GPO1.RGMII2_RD1 */
@@ -323,6 +335,7 @@
};
main_usb0_pins_default: main-usb0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
>;
@@ -365,6 +378,7 @@
};
ddr_vtt_pins_default: ddr-vtt-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0030, PIN_OUTPUT_PULLUP, 7) /* (L18) OSPI0_CSN1.GPIO0_12 */
>;
@@ -372,6 +386,7 @@
};
&main_uart0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
@@ -386,11 +401,21 @@
};
&main_i2c0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
+ gpio@38 {
+ /* TCA9554 */
+ compatible = "nxp,pca9554";
+ reg = <0x38>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "HSE_DETECT";
+ };
+
eeprom@50 {
/* AT24CM01 */
compatible = "atmel,24c1024";
@@ -399,12 +424,14 @@
};
&main_i2c1 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
clock-frequency = <400000>;
exp1: gpio@22 {
+ bootph-all;
compatible = "ti,tca6424";
reg = <0x22>;
gpio-controller;
@@ -437,11 +464,19 @@
};
};
-/* mcu_gpio0 is reserved for mcu firmware usage */
+&main_gpio0 {
+ bootph-all;
+};
+
+/* mcu_gpio0 and mcu_gpio_intr are reserved for mcu firmware usage */
&mcu_gpio0 {
status = "reserved";
};
+&mcu_gpio_intr {
+ status = "reserved";
+};
+
&main_spi0 {
status = "okay";
pinctrl-names = "default";
@@ -456,16 +491,19 @@
};
};
+/* eMMC */
&sdhci0 {
- /* emmc */
+ status = "okay";
bus-width = <8>;
non-removable;
ti,driver-strength-ohm = <50>;
disable-wp;
};
+/* SD/MMC */
&sdhci1 {
- /* SD/MMC */
+ bootph-all;
+ status = "okay";
vmmc-supply = <&vdd_mmc1>;
pinctrl-names = "default";
bus-width = <4>;
@@ -475,11 +513,13 @@
};
&usbss0 {
+ bootph-all;
ti,vbus-divider;
ti,usb2-only;
};
&usb0 {
+ bootph-all;
dr_mode = "otg";
maximum-speed = "high-speed";
pinctrl-names = "default";
@@ -487,11 +527,13 @@
};
&cpsw3g {
+ bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins_default>, <&rgmii2_pins_default>;
};
&cpsw_port1 {
+ bootph-all;
phy-mode = "rgmii-rxid";
phy-handle = <&cpsw3g_phy0>;
};
@@ -502,11 +544,13 @@
};
&cpsw3g_mdio {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio1_pins_default>;
cpsw3g_phy0: ethernet-phy@0 {
+ bootph-all;
reg = <0>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
@@ -519,6 +563,7 @@
};
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ospi0_pins_default>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am642-phyboard-electra-rdk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am642-phyboard-electra-rdk.dts
index 9c418abd29d8..53b64e55413f 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am642-phyboard-electra-rdk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am642-phyboard-electra-rdk.dts
@@ -16,11 +16,12 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/leds/leds-pca9532.h>
-#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/phy/phy.h>
#include "k3-am642.dtsi"
#include "k3-am64-phycore-som.dtsi"
+#include "k3-serdes.h"
+
/ {
compatible = "phytec,am642-phyboard-electra-rdk",
"phytec,am64-phycore-som", "ti,am642";
@@ -263,6 +264,7 @@
};
&sdhci1 {
+ status = "okay";
vmmc-supply = <&vcc_3v3_mmc>;
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am642-sk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am642-sk.dts
index cbce43dbe3f9..1dddd6fc1a0d 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am642-sk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am642-sk.dts
@@ -5,13 +5,14 @@
/dts-v1/;
-#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/leds/common.h>
#include "k3-am642.dtsi"
+#include "k3-serdes.h"
+
/ {
compatible = "ti,am642-sk", "ti,am642";
model = "Texas Instruments AM642 SK";
@@ -33,6 +34,7 @@
};
memory@80000000 {
+ bootph-pre-ram;
device_type = "memory";
/* 2G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
@@ -106,6 +108,7 @@
vusb_main: regulator-0 {
/* USB MAIN INPUT 5V DC */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vusb_main5v0";
regulator-min-microvolt = <5000000>;
@@ -116,6 +119,7 @@
vcc_3v3_sys: regulator-1 {
/* output of LP8733xx */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_sys";
regulator-min-microvolt = <3300000>;
@@ -127,6 +131,7 @@
vdd_mmc1: regulator-2 {
/* TPS2051BD */
+ bootph-all;
compatible = "regulator-fixed";
regulator-name = "vdd_mmc1";
regulator-min-microvolt = <3300000>;
@@ -233,6 +238,7 @@
&main_pmx0 {
main_mmc1_pins_default: main-mmc1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x029c, PIN_INPUT_PULLUP, 0) /* (C20) MMC1_SDWP */
AM64X_IOPAD(0x0298, PIN_INPUT_PULLUP, 0) /* (D19) MMC1_SDCD */
@@ -247,6 +253,7 @@
};
main_uart0_pins_default: main-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0238, PIN_INPUT, 0) /* (B16) UART0_CTSn */
AM64X_IOPAD(0x023c, PIN_OUTPUT, 0) /* (A16) UART0_RTSn */
@@ -256,6 +263,7 @@
};
main_uart1_pins_default: main-uart1-default-pins {
+ bootph-pre-ram;
pinctrl-single,pins = <
AM64X_IOPAD(0x0248, PIN_INPUT, 0) /* (D16) UART1_CTSn */
AM64X_IOPAD(0x024c, PIN_OUTPUT, 0) /* (E16) UART1_RTSn */
@@ -265,12 +273,14 @@
};
main_usb0_pins_default: main-usb0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
>;
};
main_i2c0_pins_default: main-i2c0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
@@ -278,6 +288,7 @@
};
main_i2c1_pins_default: main-i2c1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
AM64X_IOPAD(0x026c, PIN_INPUT_PULLUP, 0) /* (B19) I2C1_SDA */
@@ -366,6 +377,7 @@
};
&main_uart0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
@@ -374,12 +386,14 @@
&main_uart1 {
/* main_uart1 is reserved for firmware usage */
+ bootph-pre-ram;
status = "reserved";
pinctrl-names = "default";
pinctrl-0 = <&main_uart1_pins_default>;
};
&main_i2c0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
@@ -392,12 +406,14 @@
};
&main_i2c1 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
clock-frequency = <400000>;
exp1: gpio@70 {
+ bootph-all;
compatible = "nxp,pca9538";
reg = <0x70>;
gpio-controller;
@@ -417,12 +433,17 @@
};
};
-/* mcu_gpio0 is reserved for mcu firmware usage */
+/* mcu_gpio0 and mcu_gpio_intr are reserved for mcu firmware usage */
&mcu_gpio0 {
status = "reserved";
};
+&mcu_gpio_intr {
+ status = "reserved";
+};
+
&sdhci0 {
+ status = "okay";
vmmc-supply = <&wlan_en>;
bus-width = <4>;
non-removable;
@@ -442,8 +463,10 @@
};
};
+/* SD/MMC */
&sdhci1 {
- /* SD/MMC */
+ bootph-all;
+ status = "okay";
vmmc-supply = <&vdd_mmc1>;
pinctrl-names = "default";
bus-width = <4>;
@@ -453,11 +476,22 @@
};
&serdes_ln_ctrl {
+ bootph-all;
idle-states = <AM64_SERDES0_LANE0_USB>;
};
+&serdes_refclk {
+ bootph-all;
+};
+
+&serdes_wiz0 {
+ bootph-all;
+};
+
&serdes0 {
+ bootph-all;
serdes0_usb_link: phy@0 {
+ bootph-all;
reg = <0>;
cdns,num-lanes = <1>;
#phy-cells = <0>;
@@ -467,10 +501,12 @@
};
&usbss0 {
+ bootph-all;
ti,vbus-divider;
};
&usb0 {
+ bootph-all;
dr_mode = "host";
maximum-speed = "super-speed";
pinctrl-names = "default";
@@ -512,11 +548,8 @@
};
};
-&tscadc0 {
- status = "disabled";
-};
-
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ospi0_pins_default>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl-mbax4xxl.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl-mbax4xxl.dts
new file mode 100644
index 000000000000..55102d35cecc
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl-mbax4xxl.dts
@@ -0,0 +1,949 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>, D-82229 Seefeld, Germany.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/net/ti-dp83867.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/pwm/pwm.h>
+#include "k3-serdes.h"
+
+#include "k3-am642-tqma64xxl.dtsi"
+
+/ {
+ compatible = "tq,am642-tqma6442l-mbax4xxl", "tq,am642-tqma6442l",
+ "ti,am642";
+ model = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
+ chassis-type = "embedded";
+
+ aliases {
+ ethernet0 = &cpsw_port1;
+ i2c1 = &mcu_i2c0;
+ mmc1 = &sdhci1;
+ serial0 = &mcu_uart0;
+ serial1 = &mcu_uart1;
+ serial2 = &main_uart0;
+ serial3 = &main_uart1;
+ serial4 = &main_uart2;
+ serial5 = &main_uart4;
+ serial6 = &main_uart5;
+ serial7 = &main_uart3;
+ spi1 = &main_spi0;
+ spi2 = &mcu_spi0;
+ };
+
+ chosen {
+ stdout-path = &main_uart0;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_gpio_keys_pins>;
+
+ user-button {
+ label = "USER_BUTTON";
+ linux,code = <BTN_0>;
+ gpios = <&mcu_gpio0 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_gpio_leds_pins>;
+
+ led-0 {
+ gpios = <&mcu_gpio0 8 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
+ };
+ led-1 {
+ gpios = <&mcu_gpio0 9 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_YELLOW>;
+ function = LED_FUNCTION_INDICATOR;
+ };
+ };
+
+ fan0: pwm-fan {
+ compatible = "pwm-fan";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_fan_pins>;
+ fan-supply = <&reg_pwm_fan>;
+ #cooling-cells = <2>;
+ /* typical 25 kHz -> 40.000 nsec */
+ pwms = <&epwm5 0 40000 PWM_POLARITY_INVERTED>;
+ cooling-levels = <0 32 64 128 196 240>;
+ pulses-per-revolution = <2>;
+ interrupt-parent = <&main_gpio1>;
+ interrupts = <49 IRQ_TYPE_EDGE_FALLING>;
+ status = "disabled";
+ };
+
+ wifi_pwrseq: pwrseq-wifi {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc1_wifi_pwrseq_pins>;
+ reset-gpios = <&main_gpio0 23 GPIO_ACTIVE_LOW>;
+ };
+
+ reg_pwm_fan: regulator-pwm-fan {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_fan_reg_pins>;
+ regulator-name = "FAN_PWR";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gpio = <&main_gpio1 48 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_sd: regulator-sd {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc1_reg_pins>;
+ regulator-name = "V_3V3_SD";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&main_gpio1 43 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&cpsw3g {
+ pinctrl-names = "default";
+ pinctrl-0 = <&cpsw_pins>;
+};
+
+&cpsw_port1 {
+ phy-mode = "rgmii-rxid";
+ phy-handle = <&cpsw3g_phy0>;
+};
+
+&cpsw_port2 {
+ status = "disabled";
+};
+
+&cpsw3g_mdio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&cpsw_mdio_pins>;
+ status = "okay";
+
+ cpsw3g_phy0: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ reset-gpios = <&main_gpio0 44 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <1000>;
+ reset-deassert-us = <1000>;
+ ti,rx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
+ };
+};
+
+&epwm5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&epwm5_pins>;
+ status = "okay";
+};
+
+&main_gpio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_gpio0_digital_pins>,
+ <&main_gpio0_hog_pins>;
+ gpio-line-names =
+ "", "", "", "", /* 0-3 */
+ "", "", "", "", /* 4-7 */
+ "", "", "", "", /* 8-11 */
+ "", "", "", "", /* 12-15 */
+ "", "", "", "", /* 16-19 */
+ "", "", "", "", /* 20-23 */
+ "", "", "EN_DIG_OUT_1", "STATUS_OUT_1", /* 24-27 */
+ "EN_DIG_OUT_2", "STATUS_OUT_2", "EN_SIG_OUT_3", "", /* 28-31 */
+ "", "", "STATUS_OUT_3", "EN_DIG_OUT_4", /* 32-35 */
+ "", "", "STATUS_OUT_4", "DIG_IN_1", /* 36-39 */
+ "DIG_IN_2", "DIG_IN_3", "DIG_IN_4"; /* 40- */
+};
+
+&main_gpio1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_gpio1_hog_pins>,
+ <&main_gpio1_pru_pins>;
+ gpio-line-names =
+ "", "", "", "", /* 0-3 */
+ "", "", "", "", /* 4-7 */
+ "", "", "", "", /* 8-11 */
+ "", "", "", "", /* 12-15 */
+ "", "", "", "", /* 16-19 */
+ "", "", "", "", /* 20-23 */
+ "", "", "", "", /* 24-27 */
+ "", "", "", "", /* 28-31 */
+ "", "", "", "", /* 32-35 */
+ "", "", "", "", /* 36-39 */
+ "", "", "", "", /* 40-43 */
+ "", "", "", "", /* 44-47 */
+ "", "", "", "", /* 48-51 */
+ "", "", "", "ADC_SYNC", /* 52-55 */
+ "", "", "ADC_RST#", "ADC_DATA_RDY", /* 56-59 */
+ "", "", "", "", /* 60-63 */
+ "", "", "", "ADC_INT#", /* 64-67 */
+ "BG95_PWRKEY", "BG95_RESET"; /* 68- */
+
+ line50-hog {
+ /* See also usb0 */
+ gpio-hog;
+ gpios = <50 0>;
+ line-name = "USB0_VBUS_OC#";
+ input;
+ };
+
+ line54-hog {
+ gpio-hog;
+ gpios = <54 0>;
+ line-name = "PRG0_MDIO_SWITCH";
+ output-low;
+ };
+
+ line70-hog {
+ gpio-hog;
+ gpios = <70 0>;
+ line-name = "PHY_INT#";
+ input;
+ };
+};
+
+&main_mcan0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan0_pins>;
+ status = "okay";
+};
+
+&main_mcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan1_pins>;
+ status = "okay";
+};
+
+&main_spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_spi0_pins>;
+ ti,pindir-d0-out-d1-in;
+ status = "okay";
+
+ /* adc@0: NXP NAFE13388 */
+};
+
+/* UART/USB adapter port 1 */
+&main_uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart0_pins>;
+ status = "okay";
+};
+
+/*
+ * IOT Module - GNSS UART
+ *
+ * Note: We expect usage of a SYSFW that does not reserve UART1 for debug traces
+ */
+&main_uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart1_pins>;
+ status = "okay";
+};
+
+/* RS485 port */
+&main_uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart2_pins>;
+ linux,rs485-enabled-at-boot-time;
+ rs485-rts-active-low;
+ status = "okay";
+};
+
+/* Bluetooth module */
+&main_uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart3_pins>;
+ /*
+ * Left disabled for now, until a way to deal with drivers and firmware
+ * for the combined WLAN/BT module has been figured out
+ */
+};
+
+/* IOT module - Main UART */
+&main_uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart4_pins>;
+ status = "okay";
+};
+
+/* IOT module - DBG UART */
+&main_uart5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart5_pins>;
+ status = "okay";
+};
+
+&main0_thermal {
+ trips {
+ main0_active0: trip-active0 {
+ temperature = <40000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ main0_active1: trip-active1 {
+ temperature = <48000>;
+ hysteresis = <3000>;
+ type = "active";
+ };
+
+ main0_active2: trip-active2 {
+ temperature = <60000>;
+ hysteresis = <10000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map1 {
+ trip = <&main0_active0>;
+ cooling-device = <&fan0 1 1>;
+ };
+
+ map2 {
+ trip = <&main0_active1>;
+ cooling-device = <&fan0 2 2>;
+ };
+
+ map3 {
+ trip = <&main0_active2>;
+ cooling-device = <&fan0 3 3>;
+ };
+ };
+};
+
+&main1_thermal {
+ trips {
+ main1_active0: trip-active0 {
+ temperature = <40000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ main1_active1: trip-active1 {
+ temperature = <48000>;
+ hysteresis = <3000>;
+ type = "active";
+ };
+
+ main1_active2: trip-active2 {
+ temperature = <60000>;
+ hysteresis = <10000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map1 {
+ trip = <&main1_active0>;
+ cooling-device = <&fan0 1 1>;
+ };
+
+ map2 {
+ trip = <&main1_active1>;
+ cooling-device = <&fan0 2 2>;
+ };
+
+ map3 {
+ trip = <&main1_active2>;
+ cooling-device = <&fan0 3 3>;
+ };
+ };
+};
+
+&mcu_gpio0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_gpio0_pins>;
+};
+
+&mcu_i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_i2c0_pins>;
+ /* Left disabled: not functional without external pullup */
+};
+
+&mcu_spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_spi0_pins>;
+ ti,pindir-d0-out-d1-in;
+ status = "okay";
+};
+
+/* UART/USB adapter port 2 */
+&mcu_uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_uart0_pins>;
+ status = "okay";
+};
+
+/* Pin header */
+&mcu_uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_uart1_pins>;
+ status = "okay";
+};
+
+&serdes_ln_ctrl {
+ idle-states = <AM64_SERDES0_LANE0_USB>;
+};
+
+&serdes0 {
+ serdes0_usb_link: phy@0 {
+ reg = <0>;
+ #phy-cells = <0>;
+ resets = <&serdes_wiz0 1>;
+ cdns,num-lanes = <1>;
+ cdns,phy-type = <PHY_TYPE_USB3>;
+ };
+};
+
+&sdhci1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc1_pins>;
+ bus-width = <4>;
+ cd-gpios = <&main_gpio1 77 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ no-mmc;
+ ti,driver-strength-ohm = <50>;
+ ti,fails-without-test-cd;
+ /* Enabled by overlay */
+};
+
+&tscadc0 {
+ status = "okay";
+ adc {
+ ti,adc-channels = <0 1 2 3 4 5 6 7>;
+ };
+};
+
+&usb0 {
+ /*
+ * The CDNS USB driver currently doesn't support overcurrent GPIOs,
+ * so there is no overcurrent detection. The OC pin is configured
+ * as a GPIO hog instead.
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_usb0_pins>;
+ dr_mode = "otg";
+ maximum-speed = "super-speed";
+ phys = <&serdes0_usb_link>;
+ phy-names = "cdns3,usb3-phy";
+};
+
+&usbss0 {
+ ti,vbus-divider;
+};
+
+&main_pmx0 {
+ cpsw_pins: cpsw-pins {
+ pinctrl-single,pins = <
+ /* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */
+ AM64X_IOPAD(0x01cc, PIN_INPUT, 4)
+ /* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */
+ AM64X_IOPAD(0x01d4, PIN_INPUT, 4)
+ /* (V6) PRG0_PRU1_GPO10.RGMII1_RD2 */
+ AM64X_IOPAD(0x01d8, PIN_INPUT, 4)
+ /* (V5) PRG0_PRU1_GPO17.RGMII1_RD3 */
+ AM64X_IOPAD(0x01f4, PIN_INPUT, 4)
+ /* (AA5) PRG0_PRU0_GPO10.RGMII1_RXC */
+ AM64X_IOPAD(0x0188, PIN_INPUT, 4)
+ /* (W6) PRG0_PRU0_GPO9.RGMII1_RX_CTL */
+ AM64X_IOPAD(0x0184, PIN_INPUT, 4)
+ /* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
+ AM64X_IOPAD(0x0124, PIN_OUTPUT, 4)
+ /* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
+ AM64X_IOPAD(0x012c, PIN_OUTPUT, 4)
+ /* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
+ AM64X_IOPAD(0x0130, PIN_OUTPUT, 4)
+ /* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
+ AM64X_IOPAD(0x014c, PIN_OUTPUT, 4)
+ /* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
+ AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4)
+ /* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
+ AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4)
+ >;
+ };
+
+ cpsw_mdio_pins: cpsw-mdio-pins {
+ pinctrl-single,pins = <
+ /* (R21) GPMC0_CSn3.GPIO0_44 - RESET_RGMII1# */
+ AM64X_IOPAD(0x00b4, PIN_OUTPUT, 7)
+
+ /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
+ AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4)
+ /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
+ AM64X_IOPAD(0x01f8, PIN_INPUT, 4)
+ >;
+ };
+
+ epwm5_pins: epwm5-pins {
+ pinctrl-single,pins = <
+ /* (W19) GPMC0_WAIT0.EHRPWM5_B */
+ AM64X_IOPAD(0x0098, PIN_OUTPUT, 3)
+ >;
+ };
+
+ /* Digital IOs */
+ main_gpio0_digital_pins: main-gpio0-digital-pins {
+ pinctrl-single,pins = <
+ /* (W20) GPMC0_AD11.GPIO0_26 - EN_DIG_OUT_1 */
+ AM64X_IOPAD(0x0068, PIN_OUTPUT, 7)
+ /* (W21) GPMC0_AD12.GPIO0_27 - STATUS_OUT_1 */
+ AM64X_IOPAD(0x006c, PIN_INPUT, 7)
+ /* (V18) GPMC0_AD13.GPIO0_28 - EN_DIG_OUT_2 */
+ AM64X_IOPAD(0x0070, PIN_OUTPUT, 7)
+ /* (Y21) GPMC0_AD14.GPIO0_29 - STATUS_OUT_2 */
+ AM64X_IOPAD(0x0074, PIN_INPUT, 7)
+ /* (Y20) GPMC0_AD15.GPIO0_30 - EN_DIG_OUT_3 */
+ AM64X_IOPAD(0x0078, PIN_OUTPUT, 7)
+ /* (T21) GPMC0_WEn.GPIO0_34 - STATUS_OUT_3 */
+ AM64X_IOPAD(0x008c, PIN_INPUT, 7)
+ /* (P17) GPMC0_BE0n_CLE.GPIO0_35 - EN_DIG_OUT_4 */
+ AM64X_IOPAD(0x0090, PIN_OUTPUT, 7)
+ /* (Y18) GPMC0_WAIT1.GPIO0_38 - STATUS_OUT_4 */
+ AM64X_IOPAD(0x009c, PIN_INPUT, 7)
+ /* (N16) GPMC0_WPn.GPIO0_39 - DIG_IN_1 */
+ AM64X_IOPAD(0x00a0, PIN_INPUT, 7)
+ /* (N17) GPMC0_DIR.GPIO0_40 - DIG_IN_2 */
+ AM64X_IOPAD(0x00a4, PIN_INPUT, 7)
+ /* (R19) GPMC0_CSn0.GPIO0_41 - DIG_IN_3 */
+ AM64X_IOPAD(0x00a8, PIN_INPUT, 7)
+ /* (R20) GPMC0_CSn1.GPIO0_42 - DIG_IN_4 */
+ AM64X_IOPAD(0x00ac, PIN_INPUT, 7)
+ >;
+ };
+
+ main_gpio0_hog_pins: main-gpio0-hog-pins {
+ pinctrl-single,pins = <
+ /* (P19) GPMC0_CSn2.GPIO0_43 - MMC1_CTRL */
+ AM64X_IOPAD(0x00b0, PIN_OUTPUT, 7)
+ >;
+ };
+
+ main_gpio1_hog_pins: main-gpio1-hog-pins {
+ pinctrl-single,pins = <
+ /* (B15) SPI1_D0.GPIO1_50 - USB0_VBUS_OC# */
+ AM64X_IOPAD(0x0228, PIN_INPUT, 7)
+ /* (B16) UART0_CTSn.GPIO1_54 - PRG0_MDIO_SWITCH */
+ AM64X_IOPAD(0x0238, PIN_OUTPUT, 7)
+ /* (C19) EXTINTn.GPIO1_70 - PHY_INT# */
+ AM64X_IOPAD(0x0278, PIN_INPUT, 7)
+ >;
+ };
+
+ main_gpio1_pru_pins: main-gpio1-pru-pins {
+ pinctrl-single,pins = <
+ /* (Y1) PRG0_PRU0_GPO0.GPIO1_0 */
+ AM64X_IOPAD(0x0160, PIN_INPUT, 7)
+ /* (R4) PRG0_PRU0_GPO1.GPIO1_1 */
+ AM64X_IOPAD(0x0164, PIN_INPUT, 7)
+ /* (U2) PRG0_PRU0_GPO2.GPIO1_2 */
+ AM64X_IOPAD(0x0168, PIN_INPUT, 7)
+ /* (V2) PRG0_PRU0_GPO3.GPIO1_3 */
+ AM64X_IOPAD(0x016c, PIN_INPUT, 7)
+ /* (AA2) PRG0_PRU0_GPO4.GPIO1_4 */
+ AM64X_IOPAD(0x0170, PIN_INPUT, 7)
+ /* (R3) PRG0_PRU0_GPO5.GPIO1_5 */
+ AM64X_IOPAD(0x0174, PIN_INPUT, 7)
+ /* (T3) PRG0_PRU0_GPO6.GPIO1_6 */
+ AM64X_IOPAD(0x0178, PIN_INPUT, 7)
+ /* (T1) PRG0_PRU0_GPO7.GPIO1_7 */
+ AM64X_IOPAD(0x017c, PIN_INPUT, 7)
+ /* (T2) PRG0_PRU0_GPO8.GPIO1_8 */
+ AM64X_IOPAD(0x0180, PIN_INPUT, 7)
+ /* (Y3) PRG0_PRU0_GPO11.GPIO1_11 */
+ AM64X_IOPAD(0x018c, PIN_INPUT, 7)
+ /* (AA3) PRG0_PRU0_GPO12.GPIO1_12 */
+ AM64X_IOPAD(0x0190, PIN_INPUT, 7)
+ /* (R6) PRG0_PRU0_GPO13.GPIO1_13 */
+ AM64X_IOPAD(0x0194, PIN_INPUT, 7)
+ /* (V4) PRG0_PRU0_GPO14.GPIO1_14 */
+ AM64X_IOPAD(0x0198, PIN_INPUT, 7)
+ /* (T5) PRG0_PRU0_GPO15.GPIO1_15 */
+ AM64X_IOPAD(0x019c, PIN_INPUT, 7)
+ /* (U4) PRG0_PRU0_GPO16.GPIO1_16 */
+ AM64X_IOPAD(0x01a0, PIN_INPUT, 7)
+ /* (U1) PRG0_PRU0_GPO17.GPIO1_17 */
+ AM64X_IOPAD(0x01a4, PIN_INPUT, 7)
+ /* (V1) PRG0_PRU0_GPO18.GPIO1_18 */
+ AM64X_IOPAD(0x01a8, PIN_INPUT, 7)
+ /* (W1) PRG0_PRU0_GPO19.GPIO1_19 */
+ AM64X_IOPAD(0x01ac, PIN_INPUT, 7)
+ /* (Y2) PRG0_PRU1_GPO0.GPIO1_20 */
+ AM64X_IOPAD(0x01b0, PIN_INPUT, 7)
+ /* (W2) PRG0_PRU1_GPO1.GPIO1_21 */
+ AM64X_IOPAD(0x01b4, PIN_INPUT, 7)
+ /* (V3) PRG0_PRU1_GPO2.GPIO1_22 */
+ AM64X_IOPAD(0x01b8, PIN_INPUT, 7)
+ /* (T4) PRG0_PRU1_GPO3.GPIO1_23 */
+ AM64X_IOPAD(0x01bc, PIN_INPUT, 7)
+ /* (W3) PRG0_PRU1_GPO4.GPIO1_24 */
+ AM64X_IOPAD(0x01c0, PIN_INPUT, 7)
+ /* (P4) PRG0_PRU1_GPO5.GPIO1_25 */
+ AM64X_IOPAD(0x01c4, PIN_INPUT, 7)
+ /* (R5) PRG0_PRU1_GPO6.GPIO1_26 */
+ AM64X_IOPAD(0x01c8, PIN_INPUT, 7)
+ /* (R1) PRG0_PRU1_GPO8.GPIO1_28 */
+ AM64X_IOPAD(0x01d0, PIN_INPUT, 7)
+ /* (W4) PRG0_PRU1_GPO11.GPIO1_31 */
+ AM64X_IOPAD(0x01dc, PIN_INPUT, 7)
+ /* (Y4) PRG0_PRU1_GPO12.GPIO1_32 */
+ AM64X_IOPAD(0x01e0, PIN_INPUT, 7)
+ /* (T6) PRG0_PRU1_GPO13.GPIO1_33 */
+ AM64X_IOPAD(0x01e4, PIN_INPUT, 7)
+ /* (U6) PRG0_PRU1_GPO14.GPIO1_34 */
+ AM64X_IOPAD(0x01e8, PIN_INPUT, 7)
+ /* (U5) PRG0_PRU1_GPO15.GPIO1_35 */
+ AM64X_IOPAD(0x01ec, PIN_INPUT, 7)
+ /* (AA4) PRG0_PRU1_GPO16.GPIO1_36 */
+ AM64X_IOPAD(0x01f0, PIN_INPUT, 7)
+ /* (P2) PRG0_MDIO0_MDIO.GPIO1_40 */
+ AM64X_IOPAD(0x0200, PIN_INPUT, 7)
+ /* (P3) PRG0_MDIO0_MDC.GPIO1_41 */
+ AM64X_IOPAD(0x0204, PIN_INPUT, 7)
+ >;
+ };
+
+ main_mcan0_pins: main-mcan0-pins {
+ pinctrl-single,pins = <
+ /* (B17) MCAN0_RX */
+ AM64X_IOPAD(0x0254, PIN_INPUT, 0)
+ /* (A17) MCAN0_TX */
+ AM64X_IOPAD(0x0250, PIN_OUTPUT, 0)
+ >;
+ };
+
+ main_mcan1_pins: main-mcan1-pins {
+ pinctrl-single,pins = <
+ /* (D17) MCAN1_RX */
+ AM64X_IOPAD(0x025c, PIN_INPUT, 0)
+ /* (C17) MCAN1_TX */
+ AM64X_IOPAD(0x0258, PIN_OUTPUT, 0)
+ >;
+ };
+
+ main_mmc1_pins: main-mmc1-pins {
+ pinctrl-single,pins = <
+ /* (J19) MMC1_CMD */
+ AM64X_IOPAD(0x0294, PIN_INPUT, 0)
+ /* (L20) MMC1_CLK */
+ AM64X_IOPAD(0x028c, PIN_INPUT, 0)
+ /* (K21) MMC1_DAT0 */
+ AM64X_IOPAD(0x0288, PIN_INPUT, 0)
+ /* (L21) MMC1_DAT1 */
+ AM64X_IOPAD(0x0284, PIN_INPUT, 0)
+ /* (K19) MMC1_DAT2 */
+ AM64X_IOPAD(0x0280, PIN_INPUT, 0)
+ /* (K18) MMC1_DAT3 */
+ AM64X_IOPAD(0x027c, PIN_INPUT, 0)
+ /* (D19) MMC1_SDCD.GPIO1_77 */
+ AM64X_IOPAD(0x0298, PIN_INPUT, 7)
+ /* (#N/A) MMC1_CLKLB */
+ AM64X_IOPAD(0x0290, PIN_INPUT, 0)
+ >;
+ };
+
+ main_mmc1_reg_pins: main-mmc1-reg-pins {
+ pinctrl-single,pins = <
+ /* (C13) SPI0_CS1.GPIO1_43 - MMC1_SD_EN */
+ AM64X_IOPAD(0x020c, PIN_OUTPUT, 7)
+ >;
+ };
+
+ main_mmc1_wifi_pwrseq_pins: main-mmc1-wifi-pwrseq-pins {
+ pinctrl-single,pins = <
+ /* (V19) GPMC0_AD8.GPIO0_23 - WIFI-BT_EN */
+ AM64X_IOPAD(0x005c, PIN_OUTPUT, 7)
+ >;
+ };
+
+ main_spi0_pins: main-spi0-pins {
+ pinctrl-single,pins = <
+ /* (D13) SPI0_CLK */
+ AM64X_IOPAD(0x0210, PIN_OUTPUT, 0)
+ /* (D12) SPI0_CS0 */
+ AM64X_IOPAD(0x0208, PIN_OUTPUT, 0)
+ /* (A13) SPI0_D0 */
+ AM64X_IOPAD(0x0214, PIN_OUTPUT, 0)
+ /* (A14) SPI0_D1 */
+ AM64X_IOPAD(0x0218, PIN_INPUT, 0)
+ >;
+ };
+
+ main_spi0_adc_pins: main-spi0-adc-pins {
+ pinctrl-single,pins = <
+ /* (A16) UART0_RTSn.GPIO1_55 - ADC_SYNC */
+ AM64X_IOPAD(0x023c, PIN_INPUT, 7)
+ /* (D16) UART1_CTSn.GPIO1_58 - ADC_RST# */
+ AM64X_IOPAD(0x0248, PIN_OUTPUT, 7)
+ /* (E16) UART1_RTSn.GPIO1_59 - ADC_DATA_RDY */
+ AM64X_IOPAD(0x024c, PIN_INPUT, 7)
+ /* (B19) I2C1_SDA.GPIO1_67 - ADC_INT# */
+ AM64X_IOPAD(0x026c, PIN_INPUT, 7)
+ >;
+ };
+
+ main_uart0_pins: main-uart0-pins {
+ pinctrl-single,pins = <
+ /* (D15) UART0_RXD */
+ AM64X_IOPAD(0x0230, PIN_INPUT, 0)
+ /* (C16) UART0_TXD */
+ AM64X_IOPAD(0x0234, PIN_OUTPUT, 0)
+ >;
+ };
+
+ main_uart1_pins: main-uart1-pins {
+ pinctrl-single,pins = <
+ /* (E15) UART1_RXD */
+ AM64X_IOPAD(0x0240, PIN_INPUT, 0)
+ /* (E14) UART1_TXD */
+ AM64X_IOPAD(0x0244, PIN_OUTPUT, 0)
+ >;
+ };
+
+ main_uart2_pins: main-uart2-pins {
+ pinctrl-single,pins = <
+ /* (T18) GPMC0_AD2.UART2_RTSn */
+ AM64X_IOPAD(0x0044, PIN_OUTPUT, 2)
+ /* (T20) GPMC0_AD0.UART2_RXD */
+ AM64X_IOPAD(0x003c, PIN_INPUT, 2)
+ /* (U21) GPMC0_AD1.UART2_TXD */
+ AM64X_IOPAD(0x0040, PIN_OUTPUT, 2)
+ >;
+ };
+
+ main_uart3_pins: main-uart3-pins {
+ pinctrl-single,pins = <
+ /* (T17) GPMC0_AD9.UART3_CTSn */
+ AM64X_IOPAD(0x0060, PIN_INPUT, 2)
+ /* (U19) GPMC0_AD5.UART3_RTSn */
+ AM64X_IOPAD(0x0050, PIN_OUTPUT, 2)
+ /* (U20) GPMC0_AD3.UART3_RXD */
+ AM64X_IOPAD(0x0048, PIN_INPUT, 2)
+ /* (U18) GPMC0_AD4.UART3_TXD */
+ AM64X_IOPAD(0x004c, PIN_OUTPUT, 2)
+ >;
+ };
+
+ main_uart4_pins: main-uart4-pins {
+ pinctrl-single,pins = <
+ /* (R16) GPMC0_AD10.UART4_CTSn */
+ AM64X_IOPAD(0x0064, PIN_INPUT, 2)
+ /* (R17) GPMC0_CLK.UART4_RTSn */
+ AM64X_IOPAD(0x007c, PIN_OUTPUT, 2)
+ /* (V20) GPMC0_AD6.UART4_RXD */
+ AM64X_IOPAD(0x0054, PIN_INPUT, 2)
+ /* (V21) GPMC0_AD7.UART4_TXD */
+ AM64X_IOPAD(0x0058, PIN_OUTPUT, 2)
+
+ /* Control GPIOs for IOT Module connected to UART4 */
+ /* (D18) ECAP0_IN_APWM_OUT.GPIO1_68 - BG95_PWRKEY */
+ AM64X_IOPAD(0x0270, PIN_OUTPUT, 7)
+ /* (A19) EXT_REFCLK1.GPIO1_69 - BG95_RESET */
+ AM64X_IOPAD(0x0274, PIN_OUTPUT, 7)
+ >;
+ };
+
+ main_uart5_pins: main-uart5-pins {
+ pinctrl-single,pins = <
+ /* (P16) GPMC0_ADVn_ALE.UART5_RXD */
+ AM64X_IOPAD(0x0084, PIN_INPUT, 2)
+ /* (R18) GPMC0_OEn_REn.UART5_TXD */
+ AM64X_IOPAD(0x0088, PIN_OUTPUT, 2)
+ >;
+ };
+
+ main_usb0_pins: main-usb0-pins {
+ pinctrl-single,pins = <
+ /* (E19) USB0_DRVVBUS */
+ AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0)
+ >;
+ };
+
+ pru_icssg1_mdio_pins: pru-icssg1-mdio-pins {
+ pinctrl-single,pins = <
+ /* (A15) SPI1_D1.GPIO1_51 - RESET_PRG1_RGMII1# */
+ AM64X_IOPAD(0x022c, PIN_OUTPUT, 7)
+ /* (B14) SPI1_CS0.GPIO1_47 - RESET_PRG1_RGMII2# */
+ AM64X_IOPAD(0x021c, PIN_OUTPUT, 7)
+
+ /* (Y6) PRG1_MDIO0_MDC */
+ AM64X_IOPAD(0x015c, PIN_OUTPUT, 0)
+ /* (AA6) PRG1_MDIO0_MDIO */
+ AM64X_IOPAD(0x0158, PIN_INPUT, 0)
+ >;
+ };
+
+ pru_icssg1_rgmii1_pins: pru-icssg1-rgmii1-pins {
+ pinctrl-single,pins = <
+ /* (Y7) PRG1_PRU0_GPO0.PRG1_RGMII1_RD0 */
+ AM64X_IOPAD(0x00b8, PIN_INPUT, 2)
+ /* (U8) PRG1_PRU0_GPO1.PRG1_RGMII1_RD1 */
+ AM64X_IOPAD(0x00bc, PIN_INPUT, 2)
+ /* (W8) PRG1_PRU0_GPO2.PRG1_RGMII1_RD2 */
+ AM64X_IOPAD(0x00c0, PIN_INPUT, 2)
+ /* (V8) PRG1_PRU0_GPO3.PRG1_RGMII1_RD3 */
+ AM64X_IOPAD(0x00c4, PIN_INPUT, 2)
+ /* (AA7) PRG1_PRU0_GPO6.PRG1_RGMII1_RXC */
+ AM64X_IOPAD(0x00d0, PIN_INPUT, 2)
+ /* (Y8) PRG1_PRU0_GPO4.PRG1_RGMII1_RX_CTL */
+ AM64X_IOPAD(0x00c8, PIN_INPUT, 2)
+ /* (AA8) PRG1_PRU0_GPO11.PRG1_RGMII1_TD0 */
+ AM64X_IOPAD(0x00e4, PIN_OUTPUT, 2)
+ /* (U9) PRG1_PRU0_GPO12.PRG1_RGMII1_TD1 */
+ AM64X_IOPAD(0x00e8, PIN_OUTPUT, 2)
+ /* (W9) PRG1_PRU0_GPO13.PRG1_RGMII1_TD2 */
+ AM64X_IOPAD(0x00ec, PIN_OUTPUT, 2)
+ /* (AA9) PRG1_PRU0_GPO14.PRG1_RGMII1_TD3 */
+ AM64X_IOPAD(0x00f0, PIN_OUTPUT, 2)
+ /* (V9) PRG1_PRU0_GPO16.PRG1_RGMII1_TXC */
+ AM64X_IOPAD(0x00f8, PIN_OUTPUT, 2)
+ /* (Y9) PRG1_PRU0_GPO15.PRG1_RGMII1_TX_CTL */
+ AM64X_IOPAD(0x00f4, PIN_OUTPUT, 2)
+ >;
+ };
+
+ pru_icssg1_rgmii2_pins: pru-icssg1-rgmii2-pins {
+ pinctrl-single,pins = <
+ /* (W11) PRG1_PRU1_GPO0.PRG1_RGMII2_RD0 */
+ AM64X_IOPAD(0x0108, PIN_INPUT, 2)
+ /* (V11) PRG1_PRU1_GPO1.PRG1_RGMII2_RD1 */
+ AM64X_IOPAD(0x010c, PIN_INPUT, 2)
+ /* (AA12) PRG1_PRU1_GPO2.PRG1_RGMII2_RD2 */
+ AM64X_IOPAD(0x0110, PIN_INPUT, 2)
+ /* (Y12) PRG1_PRU1_GPO3.PRG1_RGMII2_RD3 */
+ AM64X_IOPAD(0x0114, PIN_INPUT, 2)
+ /* (U11) PRG1_PRU1_GPO6.PRG1_RGMII2_RXC */
+ AM64X_IOPAD(0x0120, PIN_INPUT, 2)
+ /* (W12) PRG1_PRU1_GPO4.PRG1_RGMII2_RX_CTL */
+ AM64X_IOPAD(0x0118, PIN_INPUT, 2)
+ /* (AA10) PRG1_PRU1_GPO11.PRG1_RGMII2_TD0 */
+ AM64X_IOPAD(0x0134, PIN_OUTPUT, 2)
+ /* (V10) PRG1_PRU1_GPO12.PRG1_RGMII2_TD1 */
+ AM64X_IOPAD(0x0138, PIN_OUTPUT, 2)
+ /* (U10) PRG1_PRU1_GPO13.PRG1_RGMII2_TD2 */
+ AM64X_IOPAD(0x013c, PIN_OUTPUT, 2)
+ /* (AA11) PRG1_PRU1_GPO14.PRG1_RGMII2_TD3 */
+ AM64X_IOPAD(0x0140, PIN_OUTPUT, 2)
+ /* (Y10) PRG1_PRU1_GPO16.PRG1_RGMII2_TXC */
+ AM64X_IOPAD(0x0148, PIN_OUTPUT, 2)
+ /* (Y11) PRG1_PRU1_GPO15.PRG1_RGMII2_TX_CTL */
+ AM64X_IOPAD(0x0144, PIN_OUTPUT, 2)
+ >;
+ };
+
+ pwm_fan_pins: pwm-fan-pins {
+ pinctrl-single,pins = <
+ /* (T19) GPMC0_BE1n.EHRPWM5_A */
+ AM64X_IOPAD(0x0094, PIN_OUTPUT, 3)
+ /* (C14) SPI1_CLK.GPIO1_49 - FAN_RPM */
+ AM64X_IOPAD(0x0224, PIN_INPUT, 7)
+ >;
+ };
+
+ pwm_fan_reg_pins: pwm-fan-reg-pins {
+ pinctrl-single,pins = <
+ /* (D14) SPI1_CS1.GPIO1_48 - FAN_PWR */
+ AM64X_IOPAD(0x0220, PIN_OUTPUT, 7)
+ >;
+ };
+};
+
+&mcu_pmx0 {
+ mcu_gpio_keys_pins: mcu-gpio-keys-pins {
+ pinctrl-single,pins = <
+ /* (A7) MCU_SPI1_CS0.MCU_GPIO0_5 */
+ AM64X_MCU_IOPAD(0x0014, PIN_INPUT, 7)
+ >;
+ };
+
+ mcu_gpio_leds_pins: mcu-gpio-leds-pins {
+ pinctrl-single,pins = <
+ /* (C7) MCU_SPI1_D0.MCU_GPIO0_8 */
+ AM64X_MCU_IOPAD(0x0020, PIN_OUTPUT, 7)
+ /* (C8) MCU_SPI1_D1.MCU_GPIO0_9 */
+ AM64X_MCU_IOPAD(0x0024, PIN_OUTPUT, 7)
+ >;
+ };
+
+ mcu_gpio0_pins: mcu-gpio0-pins {
+ pinctrl-single,pins = <
+ /* (E8) MCU_UART0_RTSn.MCU_GPIO0_0 */
+ AM64X_MCU_IOPAD(0x0034, PIN_INPUT, 7)
+ /* (D8) MCU_UART0_CTSn.MCU_GPIO0_1 */
+ AM64X_MCU_IOPAD(0x0030, PIN_INPUT, 7)
+ /* (B7) MCU_SPI1_CS1.MCU_GPIO0_6 */
+ AM64X_MCU_IOPAD(0x0018, PIN_INPUT, 7)
+ /* (D7) MCU_SPI1_CLK.MCU_GPIO0_7 */
+ AM64X_MCU_IOPAD(0x001c, PIN_INPUT, 7)
+ /* (A11) MCU_I2C1_SCL.MCU_GPIO0_20 */
+ AM64X_MCU_IOPAD(0x0050, PIN_INPUT, 7)
+ /* (B10) MCU_I2C1_SDA.MCU_GPIO0_21 */
+ AM64X_MCU_IOPAD(0x0054, PIN_INPUT, 7)
+ >;
+ };
+
+ mcu_i2c0_pins: mcu-i2c0-pins {
+ pinctrl-single,pins = <
+ /* (E9) MCU_I2C0_SCL */
+ AM64X_MCU_IOPAD(0x0048, PIN_INPUT, 0)
+ /* (A10) MCU_I2C0_SDA */
+ AM64X_MCU_IOPAD(0x004c, PIN_INPUT, 0)
+ >;
+ };
+
+ mcu_spi0_pins: mcu-spi0-pins {
+ pinctrl-single,pins = <
+ /* (E6) MCU_SPI0_CLK */
+ AM64X_MCU_IOPAD(0x0008, PIN_OUTPUT, 0)
+ /* (D6) MCU_SPI0_CS0 */
+ AM64X_MCU_IOPAD(0x0000, PIN_OUTPUT, 0)
+ /* (C6) MCU_SPI0_CS1 */
+ AM64X_MCU_IOPAD(0x0004, PIN_OUTPUT, 0)
+ /* (E7) MCU_SPI0_D0 */
+ AM64X_MCU_IOPAD(0x000c, PIN_OUTPUT, 0)
+ /* (B6) MCU_SPI0_D1 */
+ AM64X_MCU_IOPAD(0x0010, PIN_INPUT, 0)
+ >;
+ };
+
+ mcu_uart0_pins: mcu-uart0-pins {
+ pinctrl-single,pins = <
+ /* (A9) MCU_UART0_RXD */
+ AM64X_MCU_IOPAD(0x0028, PIN_INPUT, 0)
+ /* (A8) MCU_UART0_TXD */
+ AM64X_MCU_IOPAD(0x002c, PIN_OUTPUT, 0)
+ >;
+ };
+
+ mcu_uart1_pins: mcu-uart1-pins {
+ pinctrl-single,pins = <
+ /* (B8) MCU_UART1_CTSn */
+ AM64X_MCU_IOPAD(0x0040, PIN_INPUT, 0)
+ /* (B9) MCU_UART1_RTSn */
+ AM64X_MCU_IOPAD(0x0044, PIN_OUTPUT, 0)
+ /* (C9) MCU_UART1_RXD */
+ AM64X_MCU_IOPAD(0x0038, PIN_INPUT, 0)
+ /* (D9) MCU_UART1_TXD */
+ AM64X_MCU_IOPAD(0x003c, PIN_OUTPUT, 0)
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl.dtsi
new file mode 100644
index 000000000000..6c785eff7d2f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am642-tqma64xxl.dtsi
@@ -0,0 +1,266 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>, D-82229 Seefeld, Germany.
+ */
+
+#include "k3-am642.dtsi"
+
+/ {
+ aliases {
+ i2c0 = &main_i2c0;
+ mmc0 = &sdhci0;
+ spi0 = &ospi0;
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ /* 1G RAM - default variant */
+ reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
+
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ secure_ddr: optee@9e800000 {
+ reg = <0x00 0x9e800000 0x00 0x01800000>;
+ alignment = <0x1000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a2000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_memory_region: r5f-memory@a2100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a3000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_memory_region: r5f-memory@a3100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ rtos_ipc_memory_region: ipc-memories@a5000000 {
+ reg = <0x00 0xa5000000 0x00 0x00800000>;
+ alignment = <0x1000>;
+ no-map;
+ };
+ };
+
+ reg_1v8: regulator-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&main_i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c0_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+
+ tmp1075: temperature-sensor@4a {
+ compatible = "ti,tmp1075";
+ reg = <0x4a>;
+ vs-supply = <&reg_1v8>;
+ };
+
+ eeprom0: eeprom@50 {
+ compatible = "st,24c02", "atmel,24c02";
+ reg = <0x50>;
+ vcc-supply = <&reg_1v8>;
+ pagesize = <16>;
+ read-only;
+ };
+
+ pcf85063: rtc@51 {
+ compatible = "nxp,pcf85063a";
+ reg = <0x51>;
+ quartz-load-femtofarads = <12500>;
+ };
+
+ eeprom1: eeprom@54 {
+ compatible = "st,24c64", "atmel,24c64";
+ reg = <0x54>;
+ vcc-supply = <&reg_1v8>;
+ pagesize = <32>;
+ };
+};
+
+&mailbox0_cluster2 {
+ status = "okay";
+
+ mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
+ ti,mbox-rx = <0 0 2>;
+ ti,mbox-tx = <1 0 2>;
+ };
+
+ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
+ ti,mbox-rx = <2 0 2>;
+ ti,mbox-tx = <3 0 2>;
+ };
+};
+
+&mailbox0_cluster4 {
+ status = "okay";
+
+ mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
+ ti,mbox-rx = <0 0 2>;
+ ti,mbox-tx = <1 0 2>;
+ };
+
+ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
+ ti,mbox-rx = <2 0 2>;
+ ti,mbox-tx = <3 0 2>;
+ };
+};
+
+&mailbox0_cluster6 {
+ status = "okay";
+
+ mbox_m4_0: mbox-m4-0 {
+ ti,mbox-rx = <0 0 2>;
+ ti,mbox-tx = <1 0 2>;
+ };
+};
+
+&main_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core0>;
+ memory-region = <&main_r5fss0_core0_dma_memory_region>,
+ <&main_r5fss0_core0_memory_region>;
+};
+
+&main_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core1>;
+ memory-region = <&main_r5fss0_core1_dma_memory_region>,
+ <&main_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss1_core0 {
+ mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core0>;
+ memory-region = <&main_r5fss1_core0_dma_memory_region>,
+ <&main_r5fss1_core0_memory_region>;
+};
+
+&main_r5fss1_core1 {
+ mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core1>;
+ memory-region = <&main_r5fss1_core1_dma_memory_region>,
+ <&main_r5fss1_core1_memory_region>;
+};
+
+&ospi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&ospi0_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-tx-bus-width = <8>;
+ spi-rx-bus-width = <8>;
+ spi-max-frequency = <84000000>;
+ cdns,tshsl-ns = <60>;
+ cdns,tsd2d-ns = <60>;
+ cdns,tchsh-ns = <60>;
+ cdns,tslch-ns = <60>;
+ cdns,read-delay = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* Filled by bootloader */
+ };
+ };
+};
+
+&sdhci0 {
+ status = "okay";
+ non-removable;
+ disable-wp;
+ no-sdio;
+ no-sd;
+ ti,driver-strength-ohm = <50>;
+};
+
+&main_pmx0 {
+ main_i2c0_pins: main-i2c0-pins {
+ pinctrl-single,pins = <
+ /* (A18) I2C0_SCL */
+ AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0)
+ /* (B18) I2C0_SDA */
+ AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0)
+ >;
+ };
+
+ ospi0_pins: ospi0-pins {
+ pinctrl-single,pins = <
+ /* (N20) OSPI0_CLK */
+ AM64X_IOPAD(0x0000, PIN_OUTPUT, 0)
+ /* (L19) OSPI0_CSn0 */
+ AM64X_IOPAD(0x002c, PIN_OUTPUT, 0)
+ /* (M19) OSPI0_D0 */
+ AM64X_IOPAD(0x000c, PIN_INPUT, 0)
+ /* (M18) OSPI0_D1 */
+ AM64X_IOPAD(0x0010, PIN_INPUT, 0)
+ /* (M20) OSPI0_D2 */
+ AM64X_IOPAD(0x0014, PIN_INPUT, 0)
+ /* (M21) OSPI0_D3 */
+ AM64X_IOPAD(0x0018, PIN_INPUT, 0)
+ /* (P21) OSPI0_D4 */
+ AM64X_IOPAD(0x001c, PIN_INPUT, 0)
+ /* (P20) OSPI0_D5 */
+ AM64X_IOPAD(0x0020, PIN_INPUT, 0)
+ /* (N18) OSPI0_D6 */
+ AM64X_IOPAD(0x0024, PIN_INPUT, 0)
+ /* (M17) OSPI0_D7 */
+ AM64X_IOPAD(0x0028, PIN_INPUT, 0)
+ /* (N19) OSPI0_DQS */
+ AM64X_IOPAD(0x0008, PIN_INPUT, 0)
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg1.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg1.dtsi
index 51f902fa35a7..1d1979859583 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg1.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg1.dtsi
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (c) Siemens AG, 2021
+ * Copyright (c) Siemens AG, 2021-2023
*
* Authors:
* Jan Kiszka <jan.kiszka@siemens.com>
@@ -44,3 +44,11 @@
&tx_pru2_1 {
status = "disabled";
};
+
+&icssg0_eth {
+ status = "disabled";
+};
+
+&icssg0_mdio {
+ status = "disabled";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi
index e73458ca6900..e9b57b87e42e 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi
@@ -10,7 +10,7 @@
*/
&main_pmx0 {
- cp2102n_reset_pin_default: cp2102n-reset-pin-default {
+ cp2102n_reset_pin_default: cp2102n-reset-default-pins {
pinctrl-single,pins = <
/* (AF12) GPIO1_24, used as cp2102 reset */
AM65X_IOPAD(0x01e0, PIN_OUTPUT, 7)
@@ -20,7 +20,9 @@
&main_gpio1 {
pinctrl-names = "default";
- pinctrl-0 = <&cp2102n_reset_pin_default>;
+ pinctrl-0 =
+ <&main_pcie_enable_pins_default>,
+ <&cp2102n_reset_pin_default>;
gpio-line-names =
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common.dtsi
index e26bd988e522..61a634afaa4f 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am65-iot2050-common.dtsi
@@ -9,14 +9,26 @@
* Common bits of the IOT2050 Basic and Advanced variants, PG1 and PG2
*/
-#include "k3-am654.dtsi"
#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/net/ti-dp83867.h>
/ {
aliases {
+ serial0 = &wkup_uart0;
+ serial1 = &mcu_uart0;
+ serial2 = &main_uart0;
+ serial3 = &main_uart1;
+ i2c0 = &wkup_i2c0;
+ i2c1 = &mcu_i2c0;
+ i2c2 = &main_i2c0;
+ i2c3 = &main_i2c1;
+ i2c4 = &main_i2c2;
+ i2c5 = &main_i2c3;
spi0 = &mcu_spi0;
mmc0 = &sdhci1;
mmc1 = &sdhci0;
+ ethernet1 = &icssg0_emac0;
+ ethernet2 = &icssg0_emac1;
};
chosen {
@@ -101,9 +113,498 @@
#clock-cells = <0>;
clock-frequency = <19200000>;
};
+
+ /* Dual Ethernet application node on PRU-ICSSG0 */
+ icssg0_eth: icssg0-eth {
+ compatible = "ti,am654-icssg-prueth";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg0_rgmii_pins_default>;
+ sram = <&msmc_ram>;
+
+ ti,prus = <&pru0_0>, <&rtu0_0>, <&tx_pru0_0>,
+ <&pru0_1>, <&rtu0_1>, <&tx_pru0_1>;
+ firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
+
+ ti,pruss-gp-mux-sel = <2>, /* MII mode */
+ <2>,
+ <2>,
+ <2>, /* MII mode */
+ <2>,
+ <2>;
+
+ ti,mii-g-rt = <&icssg0_mii_g_rt>;
+ ti,mii-rt = <&icssg0_mii_rt>;
+ ti,iep = <&icssg0_iep0>, <&icssg0_iep1>;
+
+ interrupt-parent = <&icssg0_intc>;
+ interrupts = <24 0 2>, <25 1 3>;
+ interrupt-names = "tx_ts0", "tx_ts1";
+
+ dmas = <&main_udmap 0xc100>, /* egress slice 0 */
+ <&main_udmap 0xc101>, /* egress slice 0 */
+ <&main_udmap 0xc102>, /* egress slice 0 */
+ <&main_udmap 0xc103>, /* egress slice 0 */
+ <&main_udmap 0xc104>, /* egress slice 1 */
+ <&main_udmap 0xc105>, /* egress slice 1 */
+ <&main_udmap 0xc106>, /* egress slice 1 */
+ <&main_udmap 0xc107>, /* egress slice 1 */
+ <&main_udmap 0x4100>, /* ingress slice 0 */
+ <&main_udmap 0x4101>; /* ingress slice 1 */
+ dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
+ "tx1-0", "tx1-1", "tx1-2", "tx1-3",
+ "rx0", "rx1";
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ icssg0_emac0: port@0 {
+ reg = <0>;
+ phy-handle = <&icssg0_eth0_phy>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4100>;
+ ti,half-duplex-capable;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+
+ icssg0_emac1: port@1 {
+ reg = <1>;
+ phy-handle = <&icssg0_eth1_phy>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4104>;
+ ti,half-duplex-capable;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
+ };
};
&wkup_pmx0 {
+ pinctrl-names =
+ "default",
+ "d0-uart0-rxd", "d0-gpio", "d0-gpio-pullup", "d0-gpio-pulldown",
+ "d1-uart0-txd", "d1-gpio", "d1-gpio-pullup", "d1-gpio-pulldown",
+ "d2-uart0-ctsn", "d2-gpio", "d2-gpio-pullup", "d2-gpio-pulldown",
+ "d3-uart0-rtsn", "d3-gpio", "d3-gpio-pullup", "d3-gpio-pulldown",
+ "d10-spi0-cs0", "d10-gpio", "d10-gpio-pullup", "d10-gpio-pulldown",
+ "d11-spi0-d0", "d11-gpio", "d11-gpio-pullup", "d11-gpio-pulldown",
+ "d12-spi0-d1", "d12-gpio", "d12-gpio-pullup", "d12-gpio-pulldown",
+ "d13-spi0-clk", "d13-gpio", "d13-gpio-pullup", "d13-gpio-pulldown",
+ "a0-gpio", "a0-gpio-pullup", "a0-gpio-pulldown",
+ "a1-gpio", "a1-gpio-pullup", "a1-gpio-pulldown",
+ "a2-gpio", "a2-gpio-pullup", "a2-gpio-pulldown",
+ "a3-gpio", "a3-gpio-pullup", "a3-gpio-pulldown",
+ "a4-gpio", "a4-gpio-pullup", "a4-gpio-pulldown",
+ "a5-gpio", "a5-gpio-pullup", "a5-gpio-pulldown";
+
+ pinctrl-0 = <&d0_uart0_rxd>;
+ pinctrl-1 = <&d0_uart0_rxd>;
+ pinctrl-2 = <&d0_gpio>;
+ pinctrl-3 = <&d0_gpio_pullup>;
+ pinctrl-4 = <&d0_gpio_pulldown>;
+ pinctrl-5 = <&d1_uart0_txd>;
+ pinctrl-6 = <&d1_gpio>;
+ pinctrl-7 = <&d1_gpio_pullup>;
+ pinctrl-8 = <&d1_gpio_pulldown>;
+ pinctrl-9 = <&d2_uart0_ctsn>;
+ pinctrl-10 = <&d2_gpio>;
+ pinctrl-11 = <&d2_gpio_pullup>;
+ pinctrl-12 = <&d2_gpio_pulldown>;
+ pinctrl-13 = <&d3_uart0_rtsn>;
+ pinctrl-14 = <&d3_gpio>;
+ pinctrl-15 = <&d3_gpio_pullup>;
+ pinctrl-16 = <&d3_gpio_pulldown>;
+ pinctrl-17 = <&d10_spi0_cs0>;
+ pinctrl-18 = <&d10_gpio>;
+ pinctrl-19 = <&d10_gpio_pullup>;
+ pinctrl-20 = <&d10_gpio_pulldown>;
+ pinctrl-21 = <&d11_spi0_d0>;
+ pinctrl-22 = <&d11_gpio>;
+ pinctrl-23 = <&d11_gpio_pullup>;
+ pinctrl-24 = <&d11_gpio_pulldown>;
+ pinctrl-25 = <&d12_spi0_d1>;
+ pinctrl-26 = <&d12_gpio>;
+ pinctrl-27 = <&d12_gpio_pullup>;
+ pinctrl-28 = <&d12_gpio_pulldown>;
+ pinctrl-29 = <&d13_spi0_clk>;
+ pinctrl-30 = <&d13_gpio>;
+ pinctrl-31 = <&d13_gpio_pullup>;
+ pinctrl-32 = <&d13_gpio_pulldown>;
+ pinctrl-33 = <&a0_gpio>;
+ pinctrl-34 = <&a0_gpio_pullup>;
+ pinctrl-35 = <&a0_gpio_pulldown>;
+ pinctrl-36 = <&a1_gpio>;
+ pinctrl-37 = <&a1_gpio_pullup>;
+ pinctrl-38 = <&a1_gpio_pulldown>;
+ pinctrl-39 = <&a2_gpio>;
+ pinctrl-40 = <&a2_gpio_pullup>;
+ pinctrl-41 = <&a2_gpio_pulldown>;
+ pinctrl-42 = <&a3_gpio>;
+ pinctrl-43 = <&a3_gpio_pullup>;
+ pinctrl-44 = <&a3_gpio_pulldown>;
+ pinctrl-45 = <&a4_gpio>;
+ pinctrl-46 = <&a4_gpio_pullup>;
+ pinctrl-47 = <&a4_gpio_pulldown>;
+ pinctrl-48 = <&a5_gpio>;
+ pinctrl-49 = <&a5_gpio_pullup>;
+ pinctrl-50 = <&a5_gpio_pulldown>;
+
+ d0_uart0_rxd: d0-uart0-rxd-pins {
+ pinctrl-single,pins = <
+ /* (P4) MCU_UART0_RXD */
+ AM65X_WKUP_IOPAD(0x0044, PIN_INPUT, 4)
+ >;
+ };
+
+ d0_gpio: d0-gpio-pins {
+ pinctrl-single,pins = <
+ /* (P4) WKUP_GPIO0_29 */
+ AM65X_WKUP_IOPAD(0x0044, PIN_INPUT, 7)
+ >;
+ };
+
+ d0_gpio_pullup: d0-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (P4) WKUP_GPIO0_29 */
+ AM65X_WKUP_IOPAD(0x0044, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d0_gpio_pulldown: d0-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (P4) WKUP_GPIO0_29 */
+ AM65X_WKUP_IOPAD(0x0044, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d1_uart0_txd: d1-uart0-txd-pins {
+ pinctrl-single,pins = <
+ /* (P5) MCU_UART0_TXD */
+ AM65X_WKUP_IOPAD(0x0048, PIN_OUTPUT, 4)
+ >;
+ };
+
+ d1_gpio: d1-gpio-pins {
+ pinctrl-single,pins = <
+ /* (P5) WKUP_GPIO0_30 */
+ AM65X_WKUP_IOPAD(0x0048, PIN_INPUT, 7)
+ >;
+ };
+
+ d1_gpio_pullup: d1-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (P5) WKUP_GPIO0_30 */
+ AM65X_WKUP_IOPAD(0x0048, PIN_INPUT, 7)
+ >;
+ };
+
+ d1_gpio_pulldown: d1-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (P5) WKUP_GPIO0_30 */
+ AM65X_WKUP_IOPAD(0x0048, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d2_uart0_ctsn: d2-uart0-ctsn-pins {
+ pinctrl-single,pins = <
+ /* (P1) MCU_UART0_CTSn */
+ AM65X_WKUP_IOPAD(0x004C, PIN_INPUT, 4)
+ >;
+ };
+
+ d2_gpio: d2-gpio-pins {
+ pinctrl-single,pins = <
+ /* (P5) WKUP_GPIO0_31 */
+ AM65X_WKUP_IOPAD(0x004C, PIN_INPUT, 7)
+ >;
+ };
+
+ d2_gpio_pullup: d2-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (P5) WKUP_GPIO0_31 */
+ AM65X_WKUP_IOPAD(0x004C, PIN_INPUT, 7)
+ >;
+ };
+
+ d2_gpio_pulldown: d2-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (P5) WKUP_GPIO0_31 */
+ AM65X_WKUP_IOPAD(0x004C, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d3_uart0_rtsn: d3-uart0-rtsn-pins {
+ pinctrl-single,pins = <
+ /* (N3) MCU_UART0_RTSn */
+ AM65X_WKUP_IOPAD(0x0054, PIN_OUTPUT, 4)
+ >;
+ };
+
+ d3_gpio: d3-gpio-pins {
+ pinctrl-single,pins = <
+ /* (N3) WKUP_GPIO0_33 */
+ AM65X_WKUP_IOPAD(0x0054, PIN_INPUT, 7)
+ >;
+ };
+
+ d3_gpio_pullup: d3-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (N3) WKUP_GPIO0_33 */
+ AM65X_WKUP_IOPAD(0x0054, PIN_INPUT, 7)
+ >;
+ };
+
+ d3_gpio_pulldown: d3-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (N3) WKUP_GPIO0_33 */
+ AM65X_WKUP_IOPAD(0x0054, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d10_spi0_cs0: d10-spi0-cs0-pins {
+ pinctrl-single,pins = <
+ /* (Y4) MCU_SPI0_CS0 */
+ AM65X_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0)
+ >;
+ };
+
+ d10_gpio: d10-gpio-pins {
+ pinctrl-single,pins = <
+ /* (Y4) WKUP_GPIO0_51 */
+ AM65X_WKUP_IOPAD(0x009c, PIN_INPUT, 7)
+ >;
+ };
+
+ d10_gpio_pullup: d10-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (Y4) WKUP_GPIO0_51 */
+ AM65X_WKUP_IOPAD(0x009c, PIN_INPUT, 7)
+ >;
+ };
+
+ d10_gpio_pulldown: d10-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (Y4) WKUP_GPIO0_51 */
+ AM65X_WKUP_IOPAD(0x009c, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d11_spi0_d0: d11-spi0-d0-pins {
+ pinctrl-single,pins = <
+ /* (Y3) MCU_SPI0_D0 */
+ AM65X_WKUP_IOPAD(0x0094, PIN_INPUT, 0)
+ >;
+ };
+
+ d11_gpio: d11-gpio-pins {
+ pinctrl-single,pins = <
+ /* (Y3) WKUP_GPIO0_49 */
+ AM65X_WKUP_IOPAD(0x0094, PIN_INPUT, 7)
+ >;
+ };
+
+ d11_gpio_pullup: d11-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (Y3) WKUP_GPIO0_49 */
+ AM65X_WKUP_IOPAD(0x0094, PIN_INPUT, 7)
+ >;
+ };
+
+ d11_gpio_pulldown: d11-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (Y3) WKUP_GPIO0_49 */
+ AM65X_WKUP_IOPAD(0x0094, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d12_spi0_d1: d12-spi0-d1-pins {
+ pinctrl-single,pins = <
+ /* (Y2) MCU_SPI0_D1 */
+ AM65X_WKUP_IOPAD(0x0098, PIN_INPUT, 0)
+ >;
+ };
+
+ d12_gpio: d12-gpio-pins {
+ pinctrl-single,pins = <
+ /* (Y2) WKUP_GPIO0_50 */
+ AM65X_WKUP_IOPAD(0x0098, PIN_INPUT, 7)
+ >;
+ };
+
+ d12_gpio_pullup: d12-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (Y2) WKUP_GPIO0_50 */
+ AM65X_WKUP_IOPAD(0x0098, PIN_INPUT, 7)
+ >;
+ };
+
+ d12_gpio_pulldown: d12-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (Y2) WKUP_GPIO0_50 */
+ AM65X_WKUP_IOPAD(0x0098, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d13_spi0_clk: d13-spi0-clk-pins {
+ pinctrl-single,pins = <
+ /* (Y1) MCU_SPI0_CLK */
+ AM65X_WKUP_IOPAD(0x0090, PIN_INPUT, 0)
+ >;
+ };
+
+ d13_gpio: d13-gpio-pins {
+ pinctrl-single,pins = <
+ /* (Y1) WKUP_GPIO0_48 */
+ AM65X_WKUP_IOPAD(0x0090, PIN_INPUT, 7)
+ >;
+ };
+
+ d13_gpio_pullup: d13-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (Y1) WKUP_GPIO0_48 */
+ AM65X_WKUP_IOPAD(0x0090, PIN_INPUT, 7)
+ >;
+ };
+
+ d13_gpio_pulldown: d13-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (Y1) WKUP_GPIO0_48 */
+ AM65X_WKUP_IOPAD(0x0090, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ a0_gpio: a0-gpio-pins {
+ pinctrl-single,pins = <
+ /* (L6) WKUP_GPIO0_45 */
+ AM65X_WKUP_IOPAD(0x0084, PIN_INPUT, 7)
+ >;
+ };
+
+ a0_gpio_pullup: a0-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (L6) WKUP_GPIO0_45 */
+ AM65X_WKUP_IOPAD(0x0084, PIN_INPUT, 7)
+ >;
+ };
+
+ a0_gpio_pulldown: a0-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (L6) WKUP_GPIO0_45 */
+ AM65X_WKUP_IOPAD(0x0084, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ a1_gpio: a1-gpio-pins {
+ pinctrl-single,pins = <
+ /* (M6) WKUP_GPIO0_44 */
+ AM65X_WKUP_IOPAD(0x0080, PIN_INPUT, 7)
+ >;
+ };
+
+ a1_gpio_pullup: a1-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (M6) WKUP_GPIO0_44 */
+ AM65X_WKUP_IOPAD(0x0080, PIN_INPUT, 7)
+ >;
+ };
+
+ a1_gpio_pulldown: a1-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (M6) WKUP_GPIO0_44 */
+ AM65X_WKUP_IOPAD(0x0080, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ a2_gpio: a2-gpio-pins {
+ pinctrl-single,pins = <
+ /* (L5) WKUP_GPIO0_43 */
+ AM65X_WKUP_IOPAD(0x007C, PIN_INPUT, 7)
+ >;
+ };
+
+ a2_gpio_pullup: a2-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (L5) WKUP_GPIO0_43 */
+ AM65X_WKUP_IOPAD(0x007C, PIN_INPUT, 7)
+ >;
+ };
+
+ a2_gpio_pulldown: a2-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (L5) WKUP_GPIO0_43 */
+ AM65X_WKUP_IOPAD(0x007C, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ a3_gpio: a3-gpio-pins {
+ pinctrl-single,pins = <
+ /* (M5) WKUP_GPIO0_39 */
+ AM65X_WKUP_IOPAD(0x006C, PIN_INPUT, 7)
+ >;
+ };
+
+ a3_gpio_pullup: a3-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (M5) WKUP_GPIO0_39 */
+ AM65X_WKUP_IOPAD(0x006C, PIN_INPUT, 7)
+ >;
+ };
+
+ a3_gpio_pulldown: a3-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (M5) WKUP_GPIO0_39 */
+ AM65X_WKUP_IOPAD(0x006C, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ a4_gpio: a4-gpio-pins {
+ pinctrl-single,pins = <
+ /* (L2) WKUP_GPIO0_42 */
+ AM65X_WKUP_IOPAD(0x0078, PIN_INPUT, 7)
+ >;
+ };
+
+ a4_gpio_pullup: a4-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (L2) WKUP_GPIO0_42 */
+ AM65X_WKUP_IOPAD(0x0078, PIN_INPUT, 7)
+ >;
+ };
+
+ a4_gpio_pulldown: a4-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (L2) WKUP_GPIO0_42 */
+ AM65X_WKUP_IOPAD(0x0078, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ a5_gpio: a5-gpio-pins {
+ pinctrl-single,pins = <
+ /* (N5) WKUP_GPIO0_35 */
+ AM65X_WKUP_IOPAD(0x005C, PIN_INPUT, 7)
+ >;
+ };
+
+ a5_gpio_pullup: a5-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (N5) WKUP_GPIO0_35 */
+ AM65X_WKUP_IOPAD(0x005C, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ a5_gpio_pulldown: a5-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (N5) WKUP_GPIO0_35 */
+ AM65X_WKUP_IOPAD(0x005C, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
wkup_i2c0_pins_default: wkup-i2c0-default-pins {
pinctrl-single,pins = <
/* (AC7) WKUP_I2C0_SCL */
@@ -136,23 +637,6 @@
>;
};
- arduino_uart_pins_default: arduino-uart-default-pins {
- pinctrl-single,pins = <
- /* (P4) MCU_UART0_RXD */
- AM65X_WKUP_IOPAD(0x0044, PIN_INPUT, 4)
- /* (P5) MCU_UART0_TXD */
- AM65X_WKUP_IOPAD(0x0048, PIN_OUTPUT, 4)
- >;
- };
-
- arduino_io_d2_to_d3_pins_default: arduino-io-d2-to-d3-default-pins {
- pinctrl-single,pins = <
- /* (P1) WKUP_GPIO0_31 */
- AM65X_WKUP_IOPAD(0x004C, PIN_OUTPUT, 7)
- /* (N3) WKUP_GPIO0_33 */
- AM65X_WKUP_IOPAD(0x0054, PIN_OUTPUT, 7)
- >;
- };
arduino_io_oe_pins_default: arduino-io-oe-default-pins {
pinctrl-single,pins = <
@@ -232,6 +716,220 @@
};
&main_pmx0 {
+ pinctrl-names =
+ "default",
+ "d4-ehrpwm0-a", "d4-gpio", "d4-gpio-pullup", "d4-gpio-pulldown",
+ "d5-ehrpwm1-a", "d5-gpio", "d5-gpio-pullup", "d5-gpio-pulldown",
+ "d6-ehrpwm2-a", "d6-gpio", "d6-gpio-pullup", "d6-gpio-pulldown",
+ "d7-ehrpwm3-a", "d7-gpio", "d7-gpio-pullup", "d7-gpio-pulldown",
+ "d8-ehrpwm4-a", "d8-gpio", "d8-gpio-pullup", "d8-gpio-pulldown",
+ "d9-ehrpwm5-a", "d9-gpio", "d9-gpio-pullup", "d9-gpio-pulldown";
+
+ pinctrl-0 = <&d4_ehrpwm0_a>;
+ pinctrl-1 = <&d4_ehrpwm0_a>;
+ pinctrl-2 = <&d4_gpio>;
+ pinctrl-3 = <&d4_gpio_pullup>;
+ pinctrl-4 = <&d4_gpio_pulldown>;
+
+ pinctrl-5 = <&d5_ehrpwm1_a>;
+ pinctrl-6 = <&d5_gpio>;
+ pinctrl-7 = <&d5_gpio_pullup>;
+ pinctrl-8 = <&d5_gpio_pulldown>;
+
+ pinctrl-9 = <&d6_ehrpwm2_a>;
+ pinctrl-10 = <&d6_gpio>;
+ pinctrl-11 = <&d6_gpio_pullup>;
+ pinctrl-12 = <&d6_gpio_pulldown>;
+
+ pinctrl-13 = <&d7_ehrpwm3_a>;
+ pinctrl-14 = <&d7_gpio>;
+ pinctrl-15 = <&d7_gpio_pullup>;
+ pinctrl-16 = <&d7_gpio_pulldown>;
+
+ pinctrl-17 = <&d8_ehrpwm4_a>;
+ pinctrl-18 = <&d8_gpio>;
+ pinctrl-19 = <&d8_gpio_pullup>;
+ pinctrl-20 = <&d8_gpio_pulldown>;
+
+ pinctrl-21 = <&d9_ehrpwm5_a>;
+ pinctrl-22 = <&d9_gpio>;
+ pinctrl-23 = <&d9_gpio_pullup>;
+ pinctrl-24 = <&d9_gpio_pulldown>;
+
+ d4_ehrpwm0_a: d4-ehrpwm0-a-pins {
+ pinctrl-single,pins = <
+ /* (AG18) EHRPWM0_A */
+ AM65X_IOPAD(0x0084, PIN_OUTPUT, 5)
+ >;
+ };
+
+ d4_gpio: d4-gpio-pins {
+ pinctrl-single,pins = <
+ /* (AG18) GPIO0_33 */
+ AM65X_IOPAD(0x0084, PIN_INPUT, 7)
+ >;
+ };
+
+ d4_gpio_pullup: d4-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (AG18) GPIO0_33 */
+ AM65X_IOPAD(0x0084, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d4_gpio_pulldown: d4-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (AG18) GPIO0_33 */
+ AM65X_IOPAD(0x0084, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d5_ehrpwm1_a: d5-ehrpwm1-a-pins {
+ pinctrl-single,pins = <
+ /* (AF17) EHRPWM1_A */
+ AM65X_IOPAD(0x008C, PIN_OUTPUT, 5)
+ >;
+ };
+
+ d5_gpio: d5-gpio-pins {
+ pinctrl-single,pins = <
+ /* (AF17) GPIO0_35 */
+ AM65X_IOPAD(0x008C, PIN_INPUT, 7)
+ >;
+ };
+
+ d5_gpio_pullup: d5-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (AF17) GPIO0_35 */
+ AM65X_IOPAD(0x008C, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d5_gpio_pulldown: d5-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (AF17) GPIO0_35 */
+ AM65X_IOPAD(0x008C, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d6_ehrpwm2_a: d6-ehrpwm2-a-pins {
+ pinctrl-single,pins = <
+ /* (AH16) EHRPWM2_A */
+ AM65X_IOPAD(0x0098, PIN_OUTPUT, 5)
+ >;
+ };
+
+ d6_gpio: d6-gpio-pins {
+ pinctrl-single,pins = <
+ /* (AH16) GPIO0_38 */
+ AM65X_IOPAD(0x0098, PIN_INPUT, 7)
+ >;
+ };
+
+ d6_gpio_pullup: d6-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (AH16) GPIO0_38 */
+ AM65X_IOPAD(0x0098, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d6_gpio_pulldown: d6-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (AH16) GPIO0_38 */
+ AM65X_IOPAD(0x0098, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d7_ehrpwm3_a: d7-ehrpwm3-a-pins {
+ pinctrl-single,pins = <
+ /* (AH15) EHRPWM3_A */
+ AM65X_IOPAD(0x00AC, PIN_OUTPUT, 5)
+ >;
+ };
+
+ d7_gpio: d7-gpio-pins {
+ pinctrl-single,pins = <
+ /* (AH15) GPIO0_43 */
+ AM65X_IOPAD(0x00AC, PIN_INPUT, 7)
+ >;
+ };
+
+ d7_gpio_pullup: d7-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (AH15) GPIO0_43 */
+ AM65X_IOPAD(0x00AC, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d7_gpio_pulldown: d7-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (AH15) GPIO0_43 */
+ AM65X_IOPAD(0x00AC, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d8_ehrpwm4_a: d8-ehrpwm4-a-pins {
+ pinctrl-single,pins = <
+ /* (AG15) EHRPWM4_A */
+ AM65X_IOPAD(0x00C0, PIN_OUTPUT, 5)
+ >;
+ };
+
+ d8_gpio: d8-gpio-pins {
+ pinctrl-single,pins = <
+ /* (AG15) GPIO0_48 */
+ AM65X_IOPAD(0x00C0, PIN_INPUT, 7)
+ >;
+ };
+
+ d8_gpio_pullup: d8-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (AG15) GPIO0_48 */
+ AM65X_IOPAD(0x00C0, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d8_gpio_pulldown: d8-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (AG15) GPIO0_48 */
+ AM65X_IOPAD(0x00C0, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ d9_ehrpwm5_a: d9-ehrpwm5-a-pins {
+ pinctrl-single,pins = <
+ /* (AD15) EHRPWM5_A */
+ AM65X_IOPAD(0x00CC, PIN_OUTPUT, 5)
+ >;
+ };
+
+ d9_gpio: d9-gpio-pins {
+ pinctrl-single,pins = <
+ /* (AD15) GPIO0_51 */
+ AM65X_IOPAD(0x00CC, PIN_INPUT, 7)
+ >;
+ };
+
+ d9_gpio_pullup: d9-gpio-pullup-pins {
+ pinctrl-single,pins = <
+ /* (AD15) GPIO0_51 */
+ AM65X_IOPAD(0x00CC, PIN_INPUT_PULLUP, 7)
+ >;
+ };
+
+ d9_gpio_pulldown: d9-gpio-pulldown-pins {
+ pinctrl-single,pins = <
+ /* (AD15) GPIO0_51 */
+ AM65X_IOPAD(0x00CC, PIN_INPUT_PULLDOWN, 7)
+ >;
+ };
+
+ main_pcie_enable_pins_default: main-pcie-enable-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x01c4, PIN_INPUT_PULLUP, 7) /* (AH13) GPIO1_17 */
+ >;
+ };
+
main_uart1_pins_default: main-uart1-default-pins {
pinctrl-single,pins = <
AM65X_IOPAD(0x0174, PIN_INPUT, 6) /* (AE23) UART1_RXD */
@@ -273,17 +971,6 @@
>;
};
- arduino_io_d4_to_d9_pins_default: arduino-io-d4-to-d9-default-pins {
- pinctrl-single,pins = <
- AM65X_IOPAD(0x0084, PIN_OUTPUT, 7) /* (AG18) GPIO0_33 */
- AM65X_IOPAD(0x008C, PIN_OUTPUT, 7) /* (AF17) GPIO0_35 */
- AM65X_IOPAD(0x0098, PIN_OUTPUT, 7) /* (AH16) GPIO0_38 */
- AM65X_IOPAD(0x00AC, PIN_OUTPUT, 7) /* (AH15) GPIO0_43 */
- AM65X_IOPAD(0x00C0, PIN_OUTPUT, 7) /* (AG15) GPIO0_48 */
- AM65X_IOPAD(0x00CC, PIN_OUTPUT, 7) /* (AD15) GPIO0_51 */
- >;
- };
-
dss_vout1_pins_default: dss-vout1-default-pins {
pinctrl-single,pins = <
AM65X_IOPAD(0x0000, PIN_OUTPUT, 1) /* VOUT1_DATA0 */
@@ -329,6 +1016,43 @@
AM65X_IOPAD(0x0070, PIN_INPUT, 5) /* (R25) I2C2_SDA */
>;
};
+
+ icssg0_mdio_pins_default: icssg0-mdio-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0294, PIN_INPUT, 0) /* (AE26) PRG0_MDIO0_MDIO */
+ AM65X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AE28) PRG0_MDIO0_MDC */
+ >;
+ };
+
+ icssg0_rgmii_pins_default: icssg0-rgmii-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0244, PIN_INPUT, 2) /* (AB28) PRG0_PRU1_GPO0.PRG0_RGMII2_RD0 */
+ AM65X_IOPAD(0x0248, PIN_INPUT, 2) /* (AC28) PRG0_PRU1_GPO1.PRG0_RGMII2_RD1 */
+ AM65X_IOPAD(0x024c, PIN_INPUT, 2) /* (AC27) PRG0_PRU1_GPO2.PRG0_RGMII2_RD2 */
+ AM65X_IOPAD(0x0250, PIN_INPUT, 2) /* (AB26) PRG0_PRU1_GPO3.PRG0_RGMII2_RD3 */
+ AM65X_IOPAD(0x0274, PIN_OUTPUT, 2) /* (AC25) PRG0_PRU1_GPO12.PRG0_RGMII2_TD0 */
+ AM65X_IOPAD(0x0278, PIN_OUTPUT, 2) /* (AD25) PRG0_PRU1_GPO13.PRG0_RGMII2_TD1 */
+ AM65X_IOPAD(0x027c, PIN_OUTPUT, 2) /* (AD24) PRG0_PRU1_GPO14.PRG0_RGMII2_TD2 */
+ AM65X_IOPAD(0x0280, PIN_OUTPUT, 2) /* (AE27) PRG0_PRU1_GPO15.PRG0_RGMII2_TD3 */
+ AM65X_IOPAD(0x0284, PIN_INPUT, 2) /* (AC24) PRG0_PRU1_GPO16.PRG0_RGMII2_TXC */
+ AM65X_IOPAD(0x0270, PIN_OUTPUT, 2) /* (AB24) PRG0_PRU1_GPO11.PRG0_RGMII2_TX_CTL */
+ AM65X_IOPAD(0x025c, PIN_INPUT, 2) /* (AB27) PRG0_PRU1_GPO6.PRG0_RGMII2_RXC */
+ AM65X_IOPAD(0x0254, PIN_INPUT, 2) /* (AA25) PRG0_PRU1_GPO4.PRG0_RGMII2_RX_CTL */
+
+ AM65X_IOPAD(0x01f4, PIN_INPUT, 2) /* (V24) PRG0_PRU0_GPO0.PRG0_RGMII1_RD0 */
+ AM65X_IOPAD(0x01f8, PIN_INPUT, 2) /* (W25) PRG0_PRU0_GPO1.PRG0_RGMII1_RD1 */
+ AM65X_IOPAD(0x01fc, PIN_INPUT, 2) /* (W24) PRG0_PRU0_GPO2.PRG0_RGMII1_RD2 */
+ AM65X_IOPAD(0x0200, PIN_INPUT, 2) /* (AA27) PRG0_PRU0_GPO3.PRG0_RGMII1_RD3 */
+ AM65X_IOPAD(0x0224, PIN_OUTPUT, 2) /* (AD27) PRG0_PRU0_GPO12.PRG0_RGMII1_TD0 */
+ AM65X_IOPAD(0x0228, PIN_OUTPUT, 2) /* (AC26) PRG0_PRU0_GPO13.PRG0_RGMII1_TD1 */
+ AM65X_IOPAD(0x022c, PIN_OUTPUT, 2) /* (AD26) PRG0_PRU0_GPO14.PRG0_RGMII1_TD2 */
+ AM65X_IOPAD(0x0230, PIN_OUTPUT, 2) /* (AA24) PRG0_PRU0_GPO15.PRG0_RGMII1_TD3 */
+ AM65X_IOPAD(0x0234, PIN_INPUT, 2) /* (AD28) PRG0_PRU0_GPO16.PRG0_RGMII1_TXC */
+ AM65X_IOPAD(0x0220, PIN_OUTPUT, 2) /* (AB25) PRG0_PRU0_GPO11.PRG0_RGMII1_TX_CTL */
+ AM65X_IOPAD(0x020c, PIN_INPUT, 2) /* (Y25) PRG0_PRU0_GPO6.PRG0_RGMII1_RXC */
+ AM65X_IOPAD(0x0204, PIN_INPUT, 2) /* (Y24) PRG0_PRU0_GPO4.PRG0_RGMII1_RX_CTL */
+ >;
+ };
};
&main_pmx1 {
@@ -345,12 +1069,6 @@
AM65X_IOPAD(0x000c, PIN_INPUT, 0) /* (E21) I2C1_SDA */
>;
};
-
- ecap0_pins_default: ecap0-default-pins {
- pinctrl-single,pins = <
- AM65X_IOPAD(0x0010, PIN_INPUT, 0) /* (D21) ECAP0_IN_APWM_OUT */
- >;
- };
};
&wkup_uart0 {
@@ -366,13 +1084,9 @@
&mcu_uart0 {
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&arduino_uart_pins_default>;
};
&main_gpio0 {
- pinctrl-names = "default";
- pinctrl-0 = <&arduino_io_d4_to_d9_pins_default>;
gpio-line-names =
"main_gpio0-base", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
@@ -382,10 +1096,14 @@
"", "IO9";
};
+&main_gpio1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_pcie_enable_pins_default>;
+};
+
&wkup_gpio0 {
pinctrl-names = "default";
pinctrl-0 =
- <&arduino_io_d2_to_d3_pins_default>,
<&arduino_i2c_aio_switch_pins_default>,
<&arduino_io_oe_pins_default>,
<&push_button_pins_default>,
@@ -547,13 +1265,8 @@
status = "disabled";
};
-&ecap0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&ecap0_pins_default>;
-};
-
&sdhci1 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
ti,driver-strength-ohm = <50>;
@@ -574,25 +1287,20 @@
&mcu_spi0 {
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&mcu_spi0_pins_default>;
-
#address-cells = <1>;
#size-cells = <0>;
ti,pindir-d0-out-d1-in;
};
-&tscadc0 {
- status = "disabled";
-};
-
&tscadc1 {
+ status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5>;
};
};
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
@@ -718,3 +1426,21 @@
<&mcu_r5fss0_core1_memory_region>;
mboxes = <&mailbox0_cluster1>, <&mbox_mcu_r5fss0_core1>;
};
+
+&icssg0_mdio {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg0_mdio_pins_default>;
+
+ icssg0_eth0_phy: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+
+ icssg0_eth1_phy: ethernet-phy@1 {
+ reg = <1>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am65-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am65-main.dtsi
index 3f8ff2589842..fcea54465636 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am65-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am65-main.dtsi
@@ -449,6 +449,7 @@
ti,otap-del-sel-hs400 = <0x0>;
ti,trm-icp = <0x8>;
dma-coherent;
+ status = "disabled";
};
sdhci1: mmc@4fa0000 {
@@ -471,6 +472,7 @@
ti,clkbuf-sel = <0x7>;
ti,trm-icp = <0x8>;
dma-coherent;
+ status = "disabled";
};
scm_conf: scm-conf@100000 {
@@ -498,12 +500,12 @@
};
dss_oldi_io_ctrl: dss-oldi-io-ctrl@41e0 {
- compatible = "syscon";
- reg = <0x000041e0 0x14>;
+ compatible = "ti,am654-dss-oldi-io-ctrl", "syscon";
+ reg = <0x41e0 0x14>;
};
- ehrpwm_tbclk: clock@4140 {
- compatible = "ti,am654-ehrpwm-tbclk", "syscon";
+ ehrpwm_tbclk: clock-controller@4140 {
+ compatible = "ti,am654-ehrpwm-tbclk";
reg = <0x4140 0x18>;
#clock-cells = <1>;
};
@@ -600,7 +602,7 @@
};
main_navss: bus@30800000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x30800000 0x0 0x30800000 0x0 0xbc00000>;
@@ -773,11 +775,12 @@
ringacc: ringacc@3c000000 {
compatible = "ti,am654-navss-ringacc";
- reg = <0x0 0x3c000000 0x0 0x400000>,
- <0x0 0x38000000 0x0 0x400000>,
- <0x0 0x31120000 0x0 0x100>,
- <0x0 0x33000000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ reg = <0x0 0x3c000000 0x0 0x400000>,
+ <0x0 0x38000000 0x0 0x400000>,
+ <0x0 0x31120000 0x0 0x100>,
+ <0x0 0x33000000 0x0 0x40000>,
+ <0x0 0x31080000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <818>;
ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
ti,sci = <&dmsc>;
@@ -787,10 +790,14 @@
main_udmap: dma-controller@31150000 {
compatible = "ti,am654-navss-main-udmap";
- reg = <0x0 0x31150000 0x0 0x100>,
- <0x0 0x34000000 0x0 0x100000>,
- <0x0 0x35000000 0x0 0x100000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ reg = <0x0 0x31150000 0x0 0x100>,
+ <0x0 0x34000000 0x0 0x100000>,
+ <0x0 0x35000000 0x0 0x100000>,
+ <0x0 0x30b00000 0x0 0x10000>,
+ <0x0 0x30c00000 0x0 0x10000>,
+ <0x0 0x30d00000 0x0 0x8000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&inta_main_udmass>;
#dma-cells = <1>;
@@ -1006,13 +1013,13 @@
dss: dss@4a00000 {
compatible = "ti,am65x-dss";
- reg = <0x0 0x04a00000 0x0 0x1000>, /* common */
- <0x0 0x04a02000 0x0 0x1000>, /* vidl1 */
- <0x0 0x04a06000 0x0 0x1000>, /* vid */
- <0x0 0x04a07000 0x0 0x1000>, /* ovr1 */
- <0x0 0x04a08000 0x0 0x1000>, /* ovr2 */
- <0x0 0x04a0a000 0x0 0x1000>, /* vp1 */
- <0x0 0x04a0b000 0x0 0x1000>; /* vp2 */
+ reg = <0x0 0x04a00000 0x0 0x1000>, /* common */
+ <0x0 0x04a02000 0x0 0x1000>, /* vidl1 */
+ <0x0 0x04a06000 0x0 0x1000>, /* vid */
+ <0x0 0x04a07000 0x0 0x1000>, /* ovr1 */
+ <0x0 0x04a08000 0x0 0x1000>, /* ovr2 */
+ <0x0 0x04a0a000 0x0 0x1000>, /* vp1 */
+ <0x0 0x04a0b000 0x0 0x1000>; /* vp2 */
reg-names = "common", "vidl1", "vid",
"ovr1", "ovr2", "vp1", "vp2";
@@ -1033,7 +1040,7 @@
assigned-clocks = <&k3_clks 67 2>;
assigned-clock-parents = <&k3_clks 67 5>;
- interrupts = <GIC_SPI 166 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
dma-coherent;
@@ -1150,6 +1157,18 @@
};
};
+ icssg0_iep0: iep@2e000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2e000 0x1000>;
+ clocks = <&icssg0_iepclk_mux>;
+ };
+
+ icssg0_iep1: iep@2f000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2f000 0x1000>;
+ clocks = <&icssg0_iepclk_mux>;
+ };
+
icssg0_mii_rt: mii-rt@32000 {
compatible = "ti,pruss-mii", "syscon";
reg = <0x32000 0x100>;
@@ -1292,6 +1311,18 @@
};
};
+ icssg1_iep0: iep@2e000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2e000 0x1000>;
+ clocks = <&icssg1_iepclk_mux>;
+ };
+
+ icssg1_iep1: iep@2f000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2f000 0x1000>;
+ clocks = <&icssg1_iepclk_mux>;
+ };
+
icssg1_mii_rt: mii-rt@32000 {
compatible = "ti,pruss-mii", "syscon";
reg = <0x32000 0x100>;
@@ -1434,6 +1465,18 @@
};
};
+ icssg2_iep0: iep@2e000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2e000 0x1000>;
+ clocks = <&icssg2_iepclk_mux>;
+ };
+
+ icssg2_iep1: iep@2f000 {
+ compatible = "ti,am654-icss-iep";
+ reg = <0x2f000 0x1000>;
+ clocks = <&icssg2_iepclk_mux>;
+ };
+
icssg2_mii_rt: mii-rt@32000 {
compatible = "ti,pruss-mii", "syscon";
reg = <0x32000 0x100>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am65-mcu.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am65-mcu.dtsi
index b7a4b5a89aaf..ecd7356f3315 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am65-mcu.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am65-mcu.dtsi
@@ -112,6 +112,7 @@
dmas = <&mcu_udmap 0x7100>,
<&mcu_udmap 0x7101 >;
dma-names = "fifo0", "fifo1";
+ status = "disabled";
adc {
#io-channel-cells = <1>;
@@ -130,6 +131,7 @@
dmas = <&mcu_udmap 0x7102>,
<&mcu_udmap 0x7103>;
dma-names = "fifo0", "fifo1";
+ status = "disabled";
adc {
#io-channel-cells = <1>;
@@ -183,7 +185,7 @@
};
mcu_navss: bus@28380000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
@@ -194,11 +196,13 @@
mcu_ringacc: ringacc@2b800000 {
compatible = "ti,am654-navss-ringacc";
- reg = <0x0 0x2b800000 0x0 0x400000>,
- <0x0 0x2b000000 0x0 0x400000>,
- <0x0 0x28590000 0x0 0x100>,
- <0x0 0x2a500000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ reg = <0x0 0x2b800000 0x0 0x400000>,
+ <0x0 0x2b000000 0x0 0x400000>,
+ <0x0 0x28590000 0x0 0x100>,
+ <0x0 0x2a500000 0x0 0x40000>,
+ <0x0 0x28440000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg",
+ "proxy_target", "cfg";
ti,num-rings = <286>;
ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
ti,sci = <&dmsc>;
@@ -208,10 +212,14 @@
mcu_udmap: dma-controller@285c0000 {
compatible = "ti,am654-navss-mcu-udmap";
- reg = <0x0 0x285c0000 0x0 0x100>,
- <0x0 0x2a800000 0x0 0x40000>,
- <0x0 0x2aa00000 0x0 0x40000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ reg = <0x0 0x285c0000 0x0 0x100>,
+ <0x0 0x2a800000 0x0 0x40000>,
+ <0x0 0x2aa00000 0x0 0x40000>,
+ <0x0 0x284a0000 0x0 0x4000>,
+ <0x0 0x284c0000 0x0 0x4000>,
+ <0x0 0x28400000 0x0 0x2000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&inta_main_udmass>;
#dma-cells = <1>;
@@ -274,7 +282,7 @@
status = "disabled";
};
- fss: fss@47000000 {
+ fss: bus@47000000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -295,6 +303,7 @@
power-domains = <&k3_pds 248 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
ospi1: spi@47050000 {
@@ -309,6 +318,7 @@
power-domains = <&k3_pds 249 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am65-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am65-wakeup.dtsi
index fd2b998ebddc..f037b36243ce 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am65-wakeup.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am65-wakeup.dtsi
@@ -34,9 +34,16 @@
};
};
- chipid@43000014 {
- compatible = "ti,am654-chipid";
- reg = <0x43000014 0x4>;
+ wkup_conf: bus@43000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x43000000 0x20000>;
+
+ chipid: chipid@14 {
+ compatible = "ti,am654-chipid";
+ reg = <0x14 0x4>;
+ };
};
wkup_pmx0: pinctrl@4301c000 {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am652.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am652.dtsi
new file mode 100644
index 000000000000..0f22e00faa90
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am652.dtsi
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for AM65 SoC family in Dual core configuration
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-am65.dtsi"
+
+/ {
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cpu-map {
+ cluster0: cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+
+ core1 {
+ cpu = <&cpu1>;
+ };
+ };
+ };
+
+ cpu0: cpu@0 {
+ compatible = "arm,cortex-a53";
+ reg = <0x000>;
+ device_type = "cpu";
+ enable-method = "psci";
+ i-cache-size = <0x8000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&L2_0>;
+ };
+
+ cpu1: cpu@1 {
+ compatible = "arm,cortex-a53";
+ reg = <0x001>;
+ device_type = "cpu";
+ enable-method = "psci";
+ i-cache-size = <0x8000>;
+ i-cache-line-size = <64>;
+ i-cache-sets = <256>;
+ d-cache-size = <0x8000>;
+ d-cache-line-size = <64>;
+ d-cache-sets = <128>;
+ next-level-cache = <&L2_0>;
+ };
+ };
+
+ L2_0: l2-cache0 {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ cache-size = <0x80000>;
+ cache-line-size = <64>;
+ cache-sets = <512>;
+ next-level-cache = <&msmc_l3>;
+ };
+
+ msmc_l3: l3-cache0 {
+ compatible = "cache";
+ cache-level = <3>;
+ cache-unified;
+ };
+
+ thermal_zones: thermal-zones {
+ #include "k3-am654-industrial-thermal.dtsi"
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am6528-iot2050-basic-common.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am6528-iot2050-basic-common.dtsi
index 5ab434c02ab6..1d6cddb11991 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am6528-iot2050-basic-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am6528-iot2050-basic-common.dtsi
@@ -9,6 +9,7 @@
* Common bits of the IOT2050 Basic variant, PG1 and PG2
*/
+#include "k3-am652.dtsi"
#include "k3-am65-iot2050-common.dtsi"
/ {
@@ -17,21 +18,6 @@
/* 1G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
};
-
- cpus {
- cpu-map {
- /delete-node/ cluster1;
- };
- /delete-node/ cpu@100;
- /delete-node/ cpu@101;
- };
-
- /delete-node/ l2-cache1;
-};
-
-/* eMMC */
-&sdhci0 {
- status = "disabled";
};
&main_pmx0 {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am654-base-board.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am654-base-board.dts
index 973a89b04a22..822c288d2797 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am654-base-board.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am654-base-board.dts
@@ -192,7 +192,7 @@
>;
};
- wkup_pca554_default: wkup-pca554-default {
+ wkup_pca554_default: wkup-pca554-default-pins {
pinctrl-single,pins = <
AM65X_WKUP_IOPAD(0x0034, PIN_INPUT, 7) /* (T1) MCU_OSPI1_CLK.WKUP_GPIO0_25 */
>;
@@ -369,6 +369,13 @@
ti,enable-vout-discharge;
};
+ gpio@38 {
+ compatible = "nxp,pca9554";
+ reg = <0x38>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
pca9554: gpio@39 {
compatible = "nxp,pca9554";
reg = <0x39>;
@@ -442,6 +449,7 @@
};
&sdhci0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
bus-width = <8>;
@@ -456,6 +464,7 @@
* disable sdhci1
*/
&sdhci1 {
+ status = "okay";
vmmc-supply = <&vdd_mmc1_sd>;
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
@@ -478,12 +487,14 @@
};
&tscadc0 {
+ status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
};
&tscadc1 {
+ status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
@@ -530,6 +541,7 @@
};
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am654-icssg2.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am654-icssg2.dtso
new file mode 100644
index 000000000000..ec8cf20ca3ac
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am654-icssg2.dtso
@@ -0,0 +1,145 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT overlay for IDK application board on AM654 EVM
+ *
+ * Copyright (C) 2018-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/net/ti-dp83867.h>
+#include "k3-pinctrl.h"
+
+&{/} {
+ aliases {
+ ethernet1 = "/icssg2-eth/ethernet-ports/port@0";
+ ethernet2 = "/icssg2-eth/ethernet-ports/port@1";
+ };
+
+ /* Ethernet node on PRU-ICSSG2 */
+ icssg2_eth: icssg2-eth {
+ compatible = "ti,am654-icssg-prueth";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg2_rgmii_pins_default>;
+ sram = <&msmc_ram>;
+ ti,prus = <&pru2_0>, <&rtu2_0>, <&tx_pru2_0>,
+ <&pru2_1>, <&rtu2_1>, <&tx_pru2_1>;
+ firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
+
+ ti,pruss-gp-mux-sel = <2>, /* MII mode */
+ <2>,
+ <2>,
+ <2>, /* MII mode */
+ <2>,
+ <2>;
+
+ ti,mii-g-rt = <&icssg2_mii_g_rt>;
+ ti,mii-rt = <&icssg2_mii_rt>;
+ ti,iep = <&icssg2_iep0>, <&icssg2_iep1>;
+
+ interrupt-parent = <&icssg2_intc>;
+ interrupts = <24 0 2>, <25 1 3>;
+ interrupt-names = "tx_ts0", "tx_ts1";
+
+ dmas = <&main_udmap 0xc300>, /* egress slice 0 */
+ <&main_udmap 0xc301>, /* egress slice 0 */
+ <&main_udmap 0xc302>, /* egress slice 0 */
+ <&main_udmap 0xc303>, /* egress slice 0 */
+ <&main_udmap 0xc304>, /* egress slice 1 */
+ <&main_udmap 0xc305>, /* egress slice 1 */
+ <&main_udmap 0xc306>, /* egress slice 1 */
+ <&main_udmap 0xc307>, /* egress slice 1 */
+ <&main_udmap 0x4300>, /* ingress slice 0 */
+ <&main_udmap 0x4301>; /* ingress slice 1 */
+
+ dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
+ "tx1-0", "tx1-1", "tx1-2", "tx1-3",
+ "rx0", "rx1";
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ icssg2_emac0: port@0 {
+ reg = <0>;
+ phy-handle = <&icssg2_phy0>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4120>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ icssg2_emac1: port@1 {
+ reg = <1>;
+ phy-handle = <&icssg2_phy1>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4124>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
+ };
+};
+
+&main_pmx0 {
+
+ icssg2_mdio_pins_default: icssg2-mdio-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0094, PIN_INPUT, 2) /* (AC19) PRG2_PRU0_GPO7.PRG2_MDIO0_MDIO */
+ AM65X_IOPAD(0x00c8, PIN_OUTPUT, 2) /* (AE15) PRG2_PRU1_GPO7.PRG2_MDIO0_MDC */
+ >;
+ };
+
+ icssg2_rgmii_pins_default: icssg2-rgmii-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x00ac, PIN_INPUT, 2) /* (AH15) PRG2_PRU1_GPO0.PRG2_RGMII2_RD0 */
+ AM65X_IOPAD(0x00b0, PIN_INPUT, 2) /* (AC16) PRG2_PRU1_GPO1.PRG2_RGMII2_RD1 */
+ AM65X_IOPAD(0x00b4, PIN_INPUT, 2) /* (AD17) PRG2_PRU1_GPO2.PRG2_RGMII2_RD2 */
+ AM65X_IOPAD(0x00b8, PIN_INPUT, 2) /* (AH14) PRG2_PRU1_GPO3.PRG2_RGMII2_RD3 */
+ AM65X_IOPAD(0x00cc, PIN_OUTPUT, 2) /* (AD15) PRG2_PRU1_GPO8.PRG2_RGMII2_TD0 */
+ AM65X_IOPAD(0x00d0, PIN_OUTPUT, 2) /* (AF14) PRG2_PRU1_GPO9.PRG2_RGMII2_TD1 */
+ AM65X_IOPAD(0x00d4, PIN_OUTPUT, 2) /* (AC15) PRG2_PRU1_GPO10.PRG2_RGMII2_TD2 */
+ AM65X_IOPAD(0x00d8, PIN_OUTPUT, 2) /* (AD14) PRG2_PRU1_GPO11.PRG2_RGMII2_TD3 */
+ AM65X_IOPAD(0x00dc, PIN_INPUT, 2) /* (AE14) PRG2_PRU1_GPO16.PRG2_RGMII2_TXC */
+ AM65X_IOPAD(0x00c4, PIN_OUTPUT, 2) /* (AC17) PRG2_PRU1_GPO6.PRG2_RGMII2_TX_CTL */
+ AM65X_IOPAD(0x00c0, PIN_INPUT, 2) /* (AG15) PRG2_PRU1_GPO5.PRG2_RGMII2_RXC */
+ AM65X_IOPAD(0x00bc, PIN_INPUT, 2) /* (AG14) PRG2_PRU1_GPO4.PRG2_RGMII2_RX_CTL */
+
+ AM65X_IOPAD(0x0078, PIN_INPUT, 2) /* (AF18) PRG2_PRU0_GPO0.PRG2_RGMII1_RD0 */
+ AM65X_IOPAD(0x007c, PIN_INPUT, 2) /* (AE18) PRG2_PRU0_GPO1.PRG2_RGMII1_RD1 */
+ AM65X_IOPAD(0x0080, PIN_INPUT, 2) /* (AH17) PRG2_PRU0_GPO2.PRG2_RGMII1_RD2 */
+ AM65X_IOPAD(0x0084, PIN_INPUT, 2) /* (AG18) PRG2_PRU0_GPO3.PRG2_RGMII1_RD3 */
+ AM65X_IOPAD(0x0098, PIN_OUTPUT, 2) /* (AH16) PRG2_PRU0_GPO8.PRG2_RGMII1_TD0 */
+ AM65X_IOPAD(0x009c, PIN_OUTPUT, 2) /* (AG16) PRG2_PRU0_GPO9.PRG2_RGMII1_TD1 */
+ AM65X_IOPAD(0x00a0, PIN_OUTPUT, 2) /* (AF16) PRG2_PRU0_GPO10.PRG2_RGMII1_TD2 */
+ AM65X_IOPAD(0x00a4, PIN_OUTPUT, 2) /* (AE16) PRG2_PRU0_GPO11.PRG2_RGMII1_TD3 */
+ AM65X_IOPAD(0x00a8, PIN_INPUT, 2) /* (AD16) PRG2_PRU0_GPO16.PRG2_RGMII1_TXC */
+ AM65X_IOPAD(0x0090, PIN_OUTPUT, 2) /* (AE17) PRG2_PRU0_GPO6.PRG2_RGMII1_TX_CTL */
+ AM65X_IOPAD(0x008c, PIN_INPUT, 2) /* (AF17) PRG2_PRU0_GPO5.PRG2_RGMII1_RXC */
+ AM65X_IOPAD(0x0088, PIN_INPUT, 2) /* (AG17) PRG2_PRU0_GPO4.PRG2_RGMII1_RX_CTL */
+ >;
+ };
+};
+
+&icssg2_mdio {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg2_mdio_pins_default>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ icssg2_phy0: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+
+ icssg2_phy1: ethernet-phy@3 {
+ reg = <3>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am654-idk.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-am654-idk.dtso
new file mode 100644
index 000000000000..150428dfce6f
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am654-idk.dtso
@@ -0,0 +1,296 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT overlay for IDK application board on AM654 EVM
+ *
+ * Copyright (C) 2018-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/net/ti-dp83867.h>
+#include "k3-pinctrl.h"
+
+&{/} {
+ aliases {
+ ethernet3 = "/icssg0-eth/ethernet-ports/port@0";
+ ethernet4 = "/icssg0-eth/ethernet-ports/port@1";
+ ethernet5 = "/icssg1-eth/ethernet-ports/port@0";
+ ethernet6 = "/icssg1-eth/ethernet-ports/port@1";
+ };
+
+ /* Ethernet node on PRU-ICSSG0 */
+ icssg0_eth: icssg0-eth {
+ compatible = "ti,am654-icssg-prueth";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg0_rgmii_pins_default>;
+ sram = <&msmc_ram>;
+ ti,prus = <&pru0_0>, <&rtu0_0>, <&tx_pru0_0>, <&pru0_1>, <&rtu0_1>, <&tx_pru0_1>;
+ firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
+
+ ti,pruss-gp-mux-sel = <2>, /* MII mode */
+ <2>,
+ <2>,
+ <2>, /* MII mode */
+ <2>,
+ <2>;
+
+ ti,mii-g-rt = <&icssg0_mii_g_rt>;
+ ti,mii-rt = <&icssg0_mii_rt>;
+ ti,iep = <&icssg0_iep0>, <&icssg0_iep1>;
+
+ interrupt-parent = <&icssg0_intc>;
+ interrupts = <24 0 2>, <25 1 3>;
+ interrupt-names = "tx_ts0", "tx_ts1";
+
+ dmas = <&main_udmap 0xc100>, /* egress slice 0 */
+ <&main_udmap 0xc101>, /* egress slice 0 */
+ <&main_udmap 0xc102>, /* egress slice 0 */
+ <&main_udmap 0xc103>, /* egress slice 0 */
+ <&main_udmap 0xc104>, /* egress slice 1 */
+ <&main_udmap 0xc105>, /* egress slice 1 */
+ <&main_udmap 0xc106>, /* egress slice 1 */
+ <&main_udmap 0xc107>, /* egress slice 1 */
+
+ <&main_udmap 0x4100>, /* ingress slice 0 */
+ <&main_udmap 0x4101>, /* ingress slice 1 */
+ <&main_udmap 0x4102>, /* mgmnt rsp slice 0 */
+ <&main_udmap 0x4103>; /* mgmnt rsp slice 1 */
+ dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
+ "tx1-0", "tx1-1", "tx1-2", "tx1-3",
+ "rx0", "rx1";
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ icssg0_emac0: port@0 {
+ reg = <0>;
+ phy-handle = <&icssg0_phy0>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4100>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ icssg0_emac1: port@1 {
+ reg = <1>;
+ phy-handle = <&icssg0_phy1>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4104>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
+ };
+
+ /* Ethernet node on PRU-ICSSG1 */
+ icssg1_eth: icssg1-eth {
+ compatible = "ti,am654-icssg-prueth";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg1_rgmii_pins_default>;
+ sram = <&msmc_ram>;
+ ti,prus = <&pru1_0>, <&rtu1_0>, <&tx_pru1_0>, <&pru1_1>, <&rtu1_1>, <&tx_pru1_1>;
+ firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
+ "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
+
+ ti,pruss-gp-mux-sel = <2>, /* MII mode */
+ <2>,
+ <2>,
+ <2>, /* MII mode */
+ <2>,
+ <2>;
+
+ ti,mii-g-rt = <&icssg1_mii_g_rt>;
+ ti,mii-rt = <&icssg1_mii_rt>;
+ ti,iep = <&icssg1_iep0>, <&icssg1_iep1>;
+
+ interrupt-parent = <&icssg1_intc>;
+ interrupts = <24 0 2>, <25 1 3>;
+ interrupt-names = "tx_ts0", "tx_ts1";
+
+ dmas = <&main_udmap 0xc200>, /* egress slice 0 */
+ <&main_udmap 0xc201>, /* egress slice 0 */
+ <&main_udmap 0xc202>, /* egress slice 0 */
+ <&main_udmap 0xc203>, /* egress slice 0 */
+ <&main_udmap 0xc204>, /* egress slice 1 */
+ <&main_udmap 0xc205>, /* egress slice 1 */
+ <&main_udmap 0xc206>, /* egress slice 1 */
+ <&main_udmap 0xc207>, /* egress slice 1 */
+
+ <&main_udmap 0x4200>, /* ingress slice 0 */
+ <&main_udmap 0x4201>, /* ingress slice 1 */
+ <&main_udmap 0x4202>, /* mgmnt rsp slice 0 */
+ <&main_udmap 0x4203>; /* mgmnt rsp slice 1 */
+ dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
+ "tx1-0", "tx1-1", "tx1-2", "tx1-3",
+ "rx0", "rx1";
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ icssg1_emac0: port@0 {
+ reg = <0>;
+ phy-handle = <&icssg1_phy0>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4110>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ icssg1_emac1: port@1 {
+ reg = <1>;
+ phy-handle = <&icssg1_phy1>;
+ phy-mode = "rgmii-id";
+ ti,syscon-rgmii-delay = <&scm_conf 0x4114>;
+ /* Filled in by bootloader */
+ local-mac-address = [00 00 00 00 00 00];
+ };
+ };
+ };
+};
+
+&main_pmx0 {
+
+ icssg0_mdio_pins_default: icssg0-mdio-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0294, PIN_INPUT, 0) /* (AE26) PRG0_MDIO0_MDIO */
+ AM65X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AE28) PRG0_MDIO0_MDC */
+ >;
+ };
+
+ icssg0_rgmii_pins_default: icssg0-rgmii-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0244, PIN_INPUT, 2) /* (AB28) PRG0_PRU1_GPO0.PRG0_RGMII2_RD0 */
+ AM65X_IOPAD(0x0248, PIN_INPUT, 2) /* (AC28) PRG0_PRU1_GPO1.PRG0_RGMII2_RD1 */
+ AM65X_IOPAD(0x024c, PIN_INPUT, 2) /* (AC27) PRG0_PRU1_GPO2.PRG0_RGMII2_RD2 */
+ AM65X_IOPAD(0x0250, PIN_INPUT, 2) /* (AB26) PRG0_PRU1_GPO3.PRG0_RGMII2_RD3 */
+ AM65X_IOPAD(0x0274, PIN_OUTPUT, 2) /* (AC25) PRG0_PRU1_GPO12.PRG0_RGMII2_TD0 */
+ AM65X_IOPAD(0x0278, PIN_OUTPUT, 2) /* (AD25) PRG0_PRU1_GPO13.PRG0_RGMII2_TD1 */
+ AM65X_IOPAD(0x027c, PIN_OUTPUT, 2) /* (AD24) PRG0_PRU1_GPO14.PRG0_RGMII2_TD2 */
+ AM65X_IOPAD(0x0280, PIN_OUTPUT, 2) /* (AE27) PRG0_PRU1_GPO15.PRG0_RGMII2_TD3 */
+ AM65X_IOPAD(0x0284, PIN_INPUT, 2) /* (AC24) PRG0_PRU1_GPO16.PRG0_RGMII2_TXC */
+ AM65X_IOPAD(0x0270, PIN_OUTPUT, 2) /* (AB24) PRG0_PRU1_GPO11.PRG0_RGMII2_TX_CTL */
+ AM65X_IOPAD(0x025c, PIN_INPUT, 2) /* (AB27) PRG0_PRU1_GPO6.PRG0_RGMII2_RXC */
+ AM65X_IOPAD(0x0254, PIN_INPUT, 2) /* (AA25) PRG0_PRU1_GPO4.PRG0_RGMII2_RX_CTL */
+
+ AM65X_IOPAD(0x01f4, PIN_INPUT, 2) /* (V24) PRG0_PRU0_GPO0.PRG0_RGMII1_RD0 */
+ AM65X_IOPAD(0x01f8, PIN_INPUT, 2) /* (W25) PRG0_PRU0_GPO1.PRG0_RGMII1_RD1 */
+ AM65X_IOPAD(0x01fc, PIN_INPUT, 2) /* (W24) PRG0_PRU0_GPO2.PRG0_RGMII1_RD2 */
+ AM65X_IOPAD(0x0200, PIN_INPUT, 2) /* (AA27) PRG0_PRU0_GPO3.PRG0_RGMII1_RD3 */
+ AM65X_IOPAD(0x0224, PIN_OUTPUT, 2) /* (AD27) PRG0_PRU0_GPO12.PRG0_RGMII1_TD0 */
+ AM65X_IOPAD(0x0228, PIN_OUTPUT, 2) /* (AC26) PRG0_PRU0_GPO13.PRG0_RGMII1_TD1 */
+ AM65X_IOPAD(0x022c, PIN_OUTPUT, 2) /* (AD26) PRG0_PRU0_GPO14.PRG0_RGMII1_TD2 */
+ AM65X_IOPAD(0x0230, PIN_OUTPUT, 2) /* (AA24) PRG0_PRU0_GPO15.PRG0_RGMII1_TD3 */
+ AM65X_IOPAD(0x0234, PIN_INPUT, 2) /* (AD28) PRG0_PRU0_GPO16.PRG0_RGMII1_TXC */
+ AM65X_IOPAD(0x0220, PIN_OUTPUT, 2) /* (AB25) PRG0_PRU0_GPO11.PRG0_RGMII1_TX_CTL */
+ AM65X_IOPAD(0x020c, PIN_INPUT, 2) /* (Y25) PRG0_PRU0_GPO6.PRG0_RGMII1_RXC */
+ AM65X_IOPAD(0x0204, PIN_INPUT, 2) /* (Y24) PRG0_PRU0_GPO4.PRG0_RGMII1_RX_CTL */
+ >;
+ };
+
+ icssg0_iep0_pins_default: icssg0-iep0-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0240, PIN_INPUT, 2) /* (U24) PRG0_PRU0_GPO19.PRG0_IEP0_EDC_SYNC_OUT0 */
+ >;
+ };
+
+ icssg1_mdio_pins_default: icssg1-mdio-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0180, PIN_INPUT, 0) /* (AD18) PRG1_MDIO0_MDIO */
+ AM65X_IOPAD(0x0184, PIN_OUTPUT, 0) /* (AH18) PRG1_MDIO0_MDC */
+ >;
+ };
+
+ icssg1_rgmii_pins_default: icssg1-rgmii-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0130, PIN_INPUT, 2) /* (AH24) PRG1_PRU1_GPO0.PRG1_RGMII2_RD0 */
+ AM65X_IOPAD(0x0134, PIN_INPUT, 2) /* (AH23) PRG1_PRU1_GPO1.PRG1_RGMII2_RD1 */
+ AM65X_IOPAD(0x0138, PIN_INPUT, 2) /* (AG21) PRG1_PRU1_GPO2.PRG1_RGMII2_RD2 */
+ AM65X_IOPAD(0x013c, PIN_INPUT, 2) /* (AH22) PRG1_PRU1_GPO3.PRG1_RGMII2_RD3 */
+ AM65X_IOPAD(0x0160, PIN_OUTPUT, 2) /* (AE20) PRG1_PRU1_GPO12.PRG1_RGMII2_TD0 */
+ AM65X_IOPAD(0x0164, PIN_OUTPUT, 2) /* (AF19) PRG1_PRU1_GPO13.PRG1_RGMII2_TD1 */
+ AM65X_IOPAD(0x0168, PIN_OUTPUT, 2) /* (AH19) PRG1_PRU1_GPO14.PRG1_RGMII2_TD2 */
+ AM65X_IOPAD(0x016c, PIN_OUTPUT, 2) /* (AG19) PRG1_PRU1_GPO15.PRG1_RGMII2_TD3 */
+ AM65X_IOPAD(0x0170, PIN_INPUT, 2) /* (AE19) PRG1_PRU1_GPO16.PRG1_RGMII2_TXC */
+ AM65X_IOPAD(0x015c, PIN_OUTPUT, 2) /* (AC20) PRG1_PRU1_GPO11.PRG1_RGMII2_TX_CTL */
+ AM65X_IOPAD(0x0148, PIN_INPUT, 2) /* (AG22) PRG1_PRU1_GPO6.PRG1_RGMII2_RXC */
+ AM65X_IOPAD(0x0140, PIN_INPUT, 2) /* (AE21) PRG1_PRU1_GPO4.PRG1_RGMII2_RX_CTL */
+
+ AM65X_IOPAD(0x00e0, PIN_INPUT, 2) /* (AE22) PRG1_PRU0_GPO0.PRG1_RGMII1_RD0 */
+ AM65X_IOPAD(0x00e4, PIN_INPUT, 2) /* (AG24) PRG1_PRU0_GPO1.PRG1_RGMII1_RD1 */
+ AM65X_IOPAD(0x00e8, PIN_INPUT, 2) /* (AF23) PRG1_PRU0_GPO2.PRG1_RGMII1_RD2 */
+ AM65X_IOPAD(0x00ec, PIN_INPUT, 2) /* (AD21) PRG1_PRU0_GPO3.PRG1_RGMII1_RD3 */
+ AM65X_IOPAD(0x0110, PIN_OUTPUT, 2) /* (AH20) PRG1_PRU0_GPO12.PRG1_RGMII1_TD0 */
+ AM65X_IOPAD(0x0114, PIN_OUTPUT, 2) /* (AH21) PRG1_PRU0_GPO13.PRG1_RGMII1_TD1 */
+ AM65X_IOPAD(0x0118, PIN_OUTPUT, 2) /* (AG20) PRG1_PRU0_GPO14.PRG1_RGMII1_TD2 */
+ AM65X_IOPAD(0x011c, PIN_OUTPUT, 2) /* (AD19) PRG1_PRU0_GPO15.PRG1_RGMII1_TD3 */
+ AM65X_IOPAD(0x0120, PIN_INPUT, 2) /* (AD20) PRG1_PRU0_GPO16.PRG1_RGMII1_TXC */
+ AM65X_IOPAD(0x010c, PIN_OUTPUT, 2) /* (AF21) PRG1_PRU0_GPO11.PRG1_RGMII1_TX_CTL */
+ AM65X_IOPAD(0x00f8, PIN_INPUT, 2) /* (AF22) PRG1_PRU0_GPO6.PRG1_RGMII1_RXC */
+ AM65X_IOPAD(0x00f0, PIN_INPUT, 2) /* (AG23) PRG1_PRU0_GPO4.PRG1_RGMII1_RX_CTL */
+ >;
+ };
+
+ icssg1_iep0_pins_default: icssg1-iep0-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x012c, PIN_INPUT, 2) /* (AG26) PRG1_PRU0_GPO19.PRG1_IEP0_EDC_SYNC_OUT0 */
+ >;
+ };
+};
+
+&icssg0_mdio {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg0_mdio_pins_default>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ icssg0_phy0: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+
+ icssg0_phy1: ethernet-phy@3 {
+ reg = <3>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+};
+
+&icssg0_iep0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg0_iep0_pins_default>;
+};
+
+&icssg1_mdio {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg1_mdio_pins_default>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ icssg1_phy0: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+
+ icssg1_phy1: ethernet-phy@3 {
+ reg = <3>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ };
+};
+
+&icssg1_iep0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg1_iep0_pins_default>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi
index be55494b1f3f..3864ec54e371 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi
@@ -11,6 +11,7 @@
/dts-v1/;
+#include "k3-am654.dtsi"
#include "k3-am65-iot2050-common.dtsi"
/ {
@@ -43,6 +44,7 @@
/* eMMC */
&sdhci0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
bus-width = <8>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-m2.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-m2.dts
index cbe44634914f..bd6f2e696e94 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-m2.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am6548-iot2050-advanced-m2.dts
@@ -27,13 +27,7 @@
};
&main_pmx0 {
- main_m2_enable_pins_default: main-m2-enable-default-pins {
- pinctrl-single,pins = <
- AM65X_IOPAD(0x01c4, PIN_INPUT_PULLUP, 7) /* (AH13) GPIO1_17 */
- >;
- };
-
- main_bkey_pcie_reset: main-bkey-pcie-reset {
+ main_bkey_pcie_reset: main-bkey-pcie-reset-default-pins {
pinctrl-single,pins = <
AM65X_IOPAD(0x01bc, PIN_OUTPUT_PULLUP, 7) /* (AG13) GPIO1_15 */
>;
@@ -46,7 +40,7 @@
>;
};
- main_m2_pcie_mux_control: main-m2-pcie-mux-control {
+ main_m2_pcie_mux_control: main-m2-pcie-mux-control-default-pins {
pinctrl-single,pins = <
AM65X_IOPAD(0x0148, PIN_INPUT_PULLUP, 7) /* (AG22) GPIO0_82 */
AM65X_IOPAD(0x0160, PIN_INPUT_PULLUP, 7) /* (AE20) GPIO0_88 */
@@ -66,15 +60,13 @@
&main_gpio0 {
pinctrl-names = "default";
- pinctrl-0 =
- <&main_m2_pcie_mux_control>,
- <&arduino_io_d4_to_d9_pins_default>;
+ pinctrl-0 = <&main_m2_pcie_mux_control>;
};
&main_gpio1 {
pinctrl-names = "default";
pinctrl-0 =
- <&main_m2_enable_pins_default>,
+ <&main_pcie_enable_pins_default>,
<&main_pmx0_m2_config_pins_default>,
<&main_pmx1_m2_config_pins_default>,
<&cp2102n_reset_pin_default>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-base-board.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-base-board.dts
index d5889ba3fa46..d0cfdeac21fb 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-base-board.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-base-board.dts
@@ -11,7 +11,8 @@
#include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/phy/phy-cadence.h>
#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/mux/ti-serdes.h>
+
+#include "k3-serdes.h"
/ {
compatible = "ti,am68-sk", "ti,j721s2";
@@ -30,6 +31,7 @@
can1 = &mcu_mcan1;
can2 = &main_mcan6;
can3 = &main_mcan7;
+ ethernet0 = &cpsw_port1;
};
vusb_main: regulator-vusb-main5v0 {
@@ -121,6 +123,52 @@
#phy-cells = <0>;
max-bitrate = <5000000>;
};
+
+ connector-hdmi {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_hpd_pins_default>;
+ ddc-i2c-bus = <&mcu_i2c1>;
+ /* HDMI_HPD */
+ hpd-gpios = <&main_gpio0 0 GPIO_ACTIVE_HIGH>;
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&tfp410_out>;
+ };
+ };
+ };
+
+ bridge-dvi {
+ compatible = "ti,tfp410";
+ /* HDMI_PDn */
+ powerdown-gpios = <&exp2 0 GPIO_ACTIVE_LOW>;
+ ti,deskew = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ tfp410_in: endpoint {
+ remote-endpoint = <&dpi_out0>;
+ pclk-sample = <1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ tfp410_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
};
&main_pmx0 {
@@ -201,6 +249,45 @@
J721S2_IOPAD(0x08c, PIN_INPUT, 7) /* (T25) MCASP0_AXR7.GPIO0_35 */
>;
};
+
+ dss_vout0_pins_default: dss-vout0-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x074, PIN_OUTPUT, 2) /* (R28) MCAN2_TX.VOUT0_DATA0 */
+ J721S2_IOPAD(0x070, PIN_OUTPUT, 2) /* (R27) MCAN1_RX.VOUT0_DATA1 */
+ J721S2_IOPAD(0x04c, PIN_OUTPUT, 2) /* (V27) MCASP1_AXR1.VOUT0_DATA10 */
+ J721S2_IOPAD(0x048, PIN_OUTPUT, 2) /* (AB27) MCASP0_AXR2.VOUT0_DATA11 */
+ J721S2_IOPAD(0x044, PIN_OUTPUT, 2) /* (Y26) MCASP0_AXR1.VOUT0_DATA12 */
+ J721S2_IOPAD(0x040, PIN_OUTPUT, 2) /* (AC28) MCASP0_AXR0.VOUT0_DATA13 */
+ J721S2_IOPAD(0x03c, PIN_OUTPUT, 2) /* (U27) MCASP0_AFSX.VOUT0_DATA14 */
+ J721S2_IOPAD(0x038, PIN_OUTPUT, 2) /* (AB28) MCASP0_ACLKX.VOUT0_DATA15 */
+ J721S2_IOPAD(0x0c8, PIN_OUTPUT, 2) /* (AD28) EXT_REFCLK1.VOUT0_DATA16 */
+ J721S2_IOPAD(0x030, PIN_OUTPUT, 2) /* (T26) GPIO0_12.VOUT0_DATA17 */
+ J721S2_IOPAD(0x02c, PIN_OUTPUT, 2) /* (V23) GPIO0_11.VOUT0_DATA18 */
+ J721S2_IOPAD(0x028, PIN_OUTPUT, 2) /* (AB24) MCAN16_RX.VOUT0_DATA19 */
+ J721S2_IOPAD(0x07c, PIN_OUTPUT, 2) /* (T27) MCASP0_AXR3.VOUT0_DATA2 */
+ J721S2_IOPAD(0x024, PIN_OUTPUT, 2) /* (Y28) MCAN16_TX.VOUT0_DATA20 */
+ J721S2_IOPAD(0x020, PIN_OUTPUT, 2) /* (AA23) MCAN15_RX.VOUT0_DATA21 */
+ J721S2_IOPAD(0x01c, PIN_OUTPUT, 2) /* (Y24) MCAN15_TX.VOUT0_DATA22 */
+ J721S2_IOPAD(0x018, PIN_OUTPUT, 2) /* (W23) MCAN14_RX.VOUT0_DATA23 */
+ J721S2_IOPAD(0x068, PIN_OUTPUT, 2) /* (U28) MCAN0_RX.VOUT0_DATA3 */
+ J721S2_IOPAD(0x064, PIN_OUTPUT, 2) /* (W28) MCAN0_TX.VOUT0_DATA4 */
+ J721S2_IOPAD(0x060, PIN_OUTPUT, 2) /* (AC27) MCASP2_AXR1.VOUT0_DATA5 */
+ J721S2_IOPAD(0x05c, PIN_OUTPUT, 2) /* (AA26) MCASP2_AXR0.VOUT0_DATA6 */
+ J721S2_IOPAD(0x058, PIN_OUTPUT, 2) /* (AA27) MCASP2_AFSX.VOUT0_DATA7 */
+ J721S2_IOPAD(0x054, PIN_OUTPUT, 2) /* (Y27) MCASP2_ACLKX.VOUT0_DATA8 */
+ J721S2_IOPAD(0x050, PIN_OUTPUT, 2) /* (W27) MCASP1_AXR2.VOUT0_DATA9 */
+ J721S2_IOPAD(0x084, PIN_OUTPUT, 2) /* (AA28) MCASP0_AXR5.VOUT0_DE */
+ J721S2_IOPAD(0x080, PIN_OUTPUT, 2) /* (U26) MCASP0_AXR4.VOUT0_HSYNC */
+ J721S2_IOPAD(0x078, PIN_OUTPUT, 2) /* (Y25) MCAN2_RX.VOUT0_PCLK */
+ J721S2_IOPAD(0x088, PIN_OUTPUT, 2) /* (AD27) MCASP0_AXR6.VOUT0_VP0_VSYNC */
+ >;
+ };
+
+ hdmi_hpd_pins_default: hdmi-hpd-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x000, PIN_INPUT, 7) /* (AG24) EXTINTN.GPIO0_0 */
+ >;
+ };
};
&wkup_pmx2 {
@@ -272,7 +359,7 @@
>;
};
- mcu_rpi_header_gpio0_pins0_default: mcu-rpi-header-gpio0-pins0-default {
+ mcu_rpi_header_gpio0_pins0_default: mcu-rpi-header-gpio0-default-pins-0 {
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x118, PIN_INPUT, 7) /* (G25) WKUP_GPIO0_66 */
J721S2_WKUP_IOPAD(0x05C, PIN_INPUT, 7) /* (E24) MCU_SPI1_D0.WKUP_GPIO0_1 */
@@ -288,7 +375,7 @@
};
&wkup_pmx3 {
- mcu_rpi_header_gpio0_pins1_default: mcu-rpi-header-gpio0-pins1-default {
+ mcu_rpi_header_gpio0_pins1_default: mcu-rpi-header-gpio0-default-pins-1 {
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x000, PIN_INPUT, 7) /* (K26) WKUP_GPIO0_49 */
>;
@@ -296,31 +383,17 @@
};
&main_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rpi_header_gpio0_pins_default>;
};
-&main_gpio2 {
- status = "disabled";
-};
-
-&main_gpio4 {
- status = "disabled";
-};
-
-&main_gpio6 {
- status = "disabled";
-};
-
&wkup_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_rpi_header_gpio0_pins0_default>, <&mcu_rpi_header_gpio0_pins1_default>;
};
-&wkup_gpio1 {
- status = "disabled";
-};
-
&wkup_uart0 {
status = "reserved";
pinctrl-names = "default";
@@ -372,13 +445,26 @@
clock-frequency = <400000>;
};
-&main_sdhci0 {
- /* Unused */
- status = "disabled";
+&mcu_i2c1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_i2c1_pins_default>;
+ /* i2c1 is used for DVI DDC, so we need to use 100kHz */
+ clock-frequency = <100000>;
+
+ exp2: gpio@20 {
+ compatible = "ti,tca6408";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "HDMI_PDn","HDMI_LS_OE",
+ "DP0_3V3_EN","eDP_ENABLE";
+ };
};
&main_sdhci1 {
/* SD card */
+ status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
pinctrl-names = "default";
disable-wp;
@@ -432,3 +518,95 @@
pinctrl-0 = <&main_mcan7_pins_default>;
phys = <&transceiver4>;
};
+
+&dss {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&dss_vout0_pins_default>;
+ /*
+ * These clock assignments are chosen to enable the following outputs:
+ *
+ * VP0 - DisplayPort SST
+ * VP1 - DPI0
+ * VP2 - DSI
+ * VP3 - DPI1
+ */
+ assigned-clocks = <&k3_clks 158 2>,
+ <&k3_clks 158 5>,
+ <&k3_clks 158 14>,
+ <&k3_clks 158 18>;
+ assigned-clock-parents = <&k3_clks 158 3>,
+ <&k3_clks 158 7>,
+ <&k3_clks 158 16>,
+ <&k3_clks 158 22>;
+};
+
+&dss_ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* HDMI */
+ port@1 {
+ reg = <1>;
+
+ dpi_out0: endpoint {
+ remote-endpoint = <&tfp410_in>;
+ };
+ };
+};
+
+&serdes_ln_ctrl {
+ idle-states = <J721S2_SERDES0_LANE0_PCIE1_LANE0>, <J721S2_SERDES0_LANE1_PCIE1_LANE1>,
+ <J721S2_SERDES0_LANE2_USB_SWAP>, <J721S2_SERDES0_LANE3_USB>;
+};
+
+&serdes_refclk {
+ clock-frequency = <100000000>;
+};
+
+&serdes0 {
+ status = "okay";
+
+ serdes0_pcie_link: phy@0 {
+ reg = <0>;
+ cdns,num-lanes = <2>;
+ #phy-cells = <0>;
+ cdns,phy-type = <PHY_TYPE_PCIE>;
+ resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>;
+ };
+
+ serdes0_usb_link: phy@2 {
+ status = "okay";
+ reg = <2>;
+ cdns,num-lanes = <1>;
+ #phy-cells = <0>;
+ cdns,phy-type = <PHY_TYPE_USB3>;
+ resets = <&serdes_wiz0 3>;
+ };
+};
+
+&pcie1_rc {
+ status = "okay";
+ reset-gpios = <&exp1 10 GPIO_ACTIVE_HIGH>;
+ phys = <&serdes0_pcie_link>;
+ phy-names = "pcie-phy";
+ num-lanes = <2>;
+};
+
+&usb_serdes_mux {
+ idle-states = <0>; /* USB0 to SERDES lane 2 */
+};
+
+&usbss0 {
+ status = "okay";
+ pinctrl-0 = <&main_usbss0_pins_default>;
+ pinctrl-names = "default";
+ ti,vbus-divider;
+};
+
+&usb0 {
+ dr_mode = "host";
+ maximum-speed = "super-speed";
+ phys = <&serdes0_usb_link>;
+ phy-names = "cdns3,usb3-phy";
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-som.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-som.dtsi
index 6c9139f73201..20861a0a46b0 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-som.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am68-sk-som.dtsi
@@ -25,6 +25,108 @@
reg = <0x00 0x9e800000 0x00 0x01800000>;
no-map;
};
+
+ mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0000000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1000000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a2000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_memory_region: r5f-memory@a2100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a3000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_memory_region: r5f-memory@a3100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a4000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa4000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_memory_region: r5f-memory@a4100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa4100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a5000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa5000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_memory_region: r5f-memory@a5100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa5100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_0_dma_memory_region: c71-dma-memory@a6000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa6000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_0_memory_region: c71-memory@a6100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa6100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_1_dma_memory_region: c71-dma-memory@a7000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa7000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_1_memory_region: c71-memory@a7100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa7100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ rtos_ipc_memory_region: ipc-memories@a8000000 {
+ reg = <0x00 0xa8000000 0x00 0x01c00000>;
+ alignment = <0x1000>;
+ no-map;
+ };
};
};
@@ -49,3 +151,109 @@
reg = <0x51>;
};
};
+
+&mailbox0_cluster0 {
+ status = "okay";
+ interrupts = <436>;
+ mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster1 {
+ status = "okay";
+ interrupts = <432>;
+ mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster2 {
+ status = "okay";
+ interrupts = <428>;
+ mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster4 {
+ status = "okay";
+ interrupts = <420>;
+ mbox_c71_0: mbox-c71-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_c71_1: mbox-c71-1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mcu_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core0>;
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>;
+};
+
+&mcu_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core1>;
+ memory-region = <&mcu_r5fss0_core1_dma_memory_region>,
+ <&mcu_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_main_r5fss0_core0>;
+ memory-region = <&main_r5fss0_core0_dma_memory_region>,
+ <&main_r5fss0_core0_memory_region>;
+};
+
+&main_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_main_r5fss0_core1>;
+ memory-region = <&main_r5fss0_core1_dma_memory_region>,
+ <&main_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss1_core0 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_main_r5fss1_core0>;
+ memory-region = <&main_r5fss1_core0_dma_memory_region>,
+ <&main_r5fss1_core0_memory_region>;
+};
+
+&main_r5fss1_core1 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_main_r5fss1_core1>;
+ memory-region = <&main_r5fss1_core1_dma_memory_region>,
+ <&main_r5fss1_core1_memory_region>;
+};
+
+&c71_0 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster4>, <&mbox_c71_0>;
+ memory-region = <&c71_0_dma_memory_region>,
+ <&c71_0_memory_region>;
+};
+
+&c71_1 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster4>, <&mbox_c71_1>;
+ memory-region = <&c71_1_dma_memory_region>,
+ <&c71_1_memory_region>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-am69-sk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-am69-sk.dts
index d282c2c633c1..8da591579868 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-am69-sk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-am69-sk.dts
@@ -47,6 +47,150 @@
reg = <0x00 0x9e800000 0x00 0x01800000>;
no-map;
};
+
+ mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0000000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1000000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a2000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_memory_region: r5f-memory@a2100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a3000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_memory_region: r5f-memory@a3100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a4000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa4000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_memory_region: r5f-memory@a4100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa4100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a5000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa5000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_memory_region: r5f-memory@a5100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa5100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss2_core0_dma_memory_region: r5f-dma-memory@a6000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa6000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss2_core0_memory_region: r5f-memory@a6100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa6100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss2_core1_dma_memory_region: r5f-dma-memory@a7000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa7000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss2_core1_memory_region: r5f-memory@a7100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa7100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_0_dma_memory_region: c71-dma-memory@a8000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa8000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_0_memory_region: c71-memory@a8100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa8100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_1_dma_memory_region: c71-dma-memory@a9000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa9000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_1_memory_region: c71-memory@a9100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa9100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_2_dma_memory_region: c71-dma-memory@aa000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xaa000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_2_memory_region: c71-memory@aa100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xaa100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_3_dma_memory_region: c71-dma-memory@ab000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xab000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_3_memory_region: c71-memory@ab100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xab100000 0x00 0xf00000>;
+ no-map;
+ };
};
vusb_main: regulator-vusb-main5v0 {
@@ -107,10 +251,82 @@
states = <1800000 0x0>,
<3300000 0x1>;
};
+
+ dp0_pwr_3v3: regulator-dp0-pwr {
+ compatible = "regulator-fixed";
+ regulator-name = "dp0-pwr";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&dp_pwr_en_pins_default>;
+ gpio = <&main_gpio0 4 0>; /* DP0_3V3 _EN */
+ enable-active-high;
+ };
+
+ dp0: connector-dp0 {
+ compatible = "dp-connector";
+ label = "DP0";
+ type = "full-size";
+ dp-pwr-supply = <&dp0_pwr_3v3>;
+
+ port {
+ dp0_connector_in: endpoint {
+ remote-endpoint = <&dp0_out>;
+ };
+ };
+ };
+
+ connector-hdmi {
+ compatible = "hdmi-connector";
+ label = "hdmi";
+ type = "a";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_hpd_pins_default>;
+ ddc-i2c-bus = <&mcu_i2c1>;
+ hpd-gpios = <&main_gpio0 0 GPIO_ACTIVE_HIGH>; /* HDMI_HPD */
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&tfp410_out>;
+ };
+ };
+ };
+
+ bridge-dvi {
+ compatible = "ti,tfp410";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_pdn_pins_default>;
+ powerdown-gpios = <&wkup_gpio0 14 GPIO_ACTIVE_LOW>; /* HDMI_PDn */
+ ti,deskew = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ tfp410_in: endpoint {
+ remote-endpoint = <&dpi1_out0>;
+ pclk-sample = <1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ tfp410_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
};
&main_pmx0 {
+ bootph-all;
main_uart8_pins_default: main-uart8-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_IOPAD(0x0d0, PIN_INPUT, 11) /* (AP38) SPI0_CS1.UART8_RXD */
J784S4_IOPAD(0x0d4, PIN_OUTPUT, 11) /* (AN38) SPI0_CLK.UART8_TXD */
@@ -125,6 +341,7 @@
};
main_mmc1_pins_default: main-mmc1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_IOPAD(0x104, PIN_INPUT, 0) /* (AB38) MMC1_CLK */
J784S4_IOPAD(0x108, PIN_INPUT, 0) /* (AB36) MMC1_CMD */
@@ -161,10 +378,70 @@
J784S4_IOPAD(0x004, PIN_INPUT, 7) /* (AG36) MCAN12_TX.GPIO0_1 */
>;
};
+
+ dp0_pins_default: dp0-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x014, PIN_INPUT, 13) /* (AG33) MCAN14_TX.DP0_HPD */
+ >;
+ };
+
+ dp_pwr_en_pins_default: dp-pwr-en-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x010, PIN_INPUT, 7) /* (AH33) MCAN13_RX.GPIO0_4 */
+ >;
+ };
+
+ dss_vout0_pins_default: dss-vout0-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x074, PIN_OUTPUT, 2) /* (AC33) MCAN2_TX.VOUT0_DATA0 */
+ J784S4_IOPAD(0x070, PIN_OUTPUT, 2) /* (AH38) MCAN1_RX.VOUT0_DATA1 */
+ J784S4_IOPAD(0x07c, PIN_OUTPUT, 2) /* (AJ38) MCASP0_AXR3.VOUT0_DATA2 */
+ J784S4_IOPAD(0x068, PIN_OUTPUT, 2) /* (AE38) MCAN0_RX.VOUT0_DATA3 */
+ J784S4_IOPAD(0x064, PIN_OUTPUT, 2) /* (AF38) MCAN0_TX.VOUT0_DATA4 */
+ J784S4_IOPAD(0x060, PIN_OUTPUT, 2) /* (AE36) MCASP2_AXR1.VOUT0_DATA5 */
+ J784S4_IOPAD(0x05c, PIN_OUTPUT, 2) /* (AC36) MCASP2_AXR0.VOUT0_DATA6 */
+ J784S4_IOPAD(0x058, PIN_OUTPUT, 2) /* (AE37) MCASP2_AFSX.VOUT0_DATA7 */
+ J784S4_IOPAD(0x054, PIN_OUTPUT, 2) /* (AD37) MCASP2_ACLKX.VOUT0_DATA8 */
+ J784S4_IOPAD(0x050, PIN_OUTPUT, 2) /* (AC37) MCASP1_AXR2.VOUT0_DATA9 */
+ J784S4_IOPAD(0x04c, PIN_OUTPUT, 2) /* (AC32) MCASP1_AXR1.VOUT0_DATA10 */
+ J784S4_IOPAD(0x048, PIN_OUTPUT, 2) /* (AK33) MCASP0_AXR2.VOUT0_DATA11 */
+ J784S4_IOPAD(0x044, PIN_OUTPUT, 2) /* (AG37) MCASP0_AXR1.VOUT0_DATA12 */
+ J784S4_IOPAD(0x040, PIN_OUTPUT, 2) /* (AF37) MCASP0_AXR0.VOUT0_DATA13 */
+ J784S4_IOPAD(0x03c, PIN_OUTPUT, 2) /* (AK38) MCASP0_AFSX.VOUT0_DATA14 */
+ J784S4_IOPAD(0x038, PIN_OUTPUT, 2) /* (AK35) MCASP0_ACLKX.VOUT0_DATA15 */
+ J784S4_IOPAD(0x0c8, PIN_OUTPUT, 2) /* (AJ32) EXT_REFCLK1.VOUT0_DATA16 */
+ J784S4_IOPAD(0x030, PIN_OUTPUT, 2) /* (AK37) GPIO0_12.VOUT0_DATA17 */
+ J784S4_IOPAD(0x02c, PIN_OUTPUT, 2) /* (AL32) GPIO0_11.VOUT0_DATA18 */
+ J784S4_IOPAD(0x028, PIN_OUTPUT, 2) /* (AE33) MCAN16_RX.VOUT0_DATA19 */
+ J784S4_IOPAD(0x024, PIN_OUTPUT, 2) /* (AH34) MCAN16_TX.VOUT0_DATA20 */
+ J784S4_IOPAD(0x020, PIN_OUTPUT, 2) /* (AJ35) MCAN15_RX.VOUT0_DATA21 */
+ J784S4_IOPAD(0x01c, PIN_OUTPUT, 2) /* (AG34) MCAN15_TX.VOUT0_DATA22 */
+ J784S4_IOPAD(0x018, PIN_OUTPUT, 2) /* (AK36) MCAN14_RX.VOUT0_DATA23 */
+ J784S4_IOPAD(0x084, PIN_OUTPUT, 2) /* (AG38) MCASP0_AXR5.VOUT0_DE */
+ J784S4_IOPAD(0x080, PIN_OUTPUT, 2) /* (AK34) MCASP0_AXR4.VOUT0_HSYNC */
+ J784S4_IOPAD(0x078, PIN_OUTPUT, 2) /* (AH37) MCAN2_RX.VOUT0_PCLK */
+ J784S4_IOPAD(0x088, PIN_OUTPUT, 2) /* (AF36) MCASP0_AXR6.VOUT0_VSYNC */
+ >;
+ };
+
+ hdmi_hpd_pins_default: hdmi-hpd-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x000, PIN_INPUT, 7) /* (AN35) EXTINTN.GPIO0_0 */
+ >;
+ };
};
&wkup_pmx2 {
+ bootph-all;
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ /* (AA37) MCU_ADC1_AIN4.WKUP_GPIO0_83 */
+ J784S4_WKUP_IOPAD(0x0fc, PIN_INPUT, 7)
+ >;
+ };
+
wkup_uart0_pins_default: wkup-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x070, PIN_INPUT, 0) /* (L37) WKUP_GPIO0_6.WKUP_UART0_CTSn */
J721S2_WKUP_IOPAD(0x074, PIN_INPUT, 0) /* (L36) WKUP_GPIO0_7.WKUP_UART0_RTSn */
@@ -174,6 +451,7 @@
};
wkup_i2c0_pins_default: wkup-i2c0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x98, PIN_INPUT, 0) /* (N33) WKUP_I2C0_SCL */
J721S2_WKUP_IOPAD(0x9c, PIN_INPUT, 0) /* (N35) WKUP_I2C0_SDA */
@@ -181,6 +459,7 @@
};
mcu_uart0_pins_default: mcu-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_WKUP_IOPAD(0x08c, PIN_INPUT, 0) /* (K38) WKUP_GPIO0_13.MCU_UART0_RXD */
J784S4_WKUP_IOPAD(0x088, PIN_OUTPUT, 0) /* (J37) WKUP_GPIO0_12.MCU_UART0_TXD */
@@ -231,6 +510,21 @@
J784S4_WKUP_IOPAD(0x11c, PIN_INPUT, 7) /* (M34) WKUP_GPIO0_67 */
>;
};
+
+ mcu_i2c1_pins_default: mcu-i2c1-default-pins {
+ pinctrl-single,pins = <
+ /* (L35) WKUP_GPIO0_8.MCU_I2C1_SCL */
+ J784S4_WKUP_IOPAD(0x078, PIN_INPUT_PULLUP, 0)
+ /* (L34) WKUP_GPIO0_9.MCU_I2C1_SDA */
+ J784S4_WKUP_IOPAD(0x07c, PIN_INPUT_PULLUP, 0)
+ >;
+ };
+
+ hdmi_pdn_pins_default: hdmi-pdn-default-pins {
+ pinctrl-single,pins = <
+ J784S4_WKUP_IOPAD(0x090, PIN_INPUT, 7) /* (H37) WKUP_GPIO0_14 */
+ >;
+ };
};
&wkup_pmx3 {
@@ -241,6 +535,90 @@
};
};
+&mailbox0_cluster0 {
+ status = "okay";
+ interrupts = <436>;
+ mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster1 {
+ status = "okay";
+ interrupts = <432>;
+ mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster2 {
+ status = "okay";
+ interrupts = <428>;
+ mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster3 {
+ status = "okay";
+ interrupts = <424>;
+ mbox_main_r5fss2_core0: mbox-main-r5fss2-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss2_core1: mbox-main-r5fss2-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster4 {
+ status = "okay";
+ interrupts = <420>;
+ mbox_c71_0: mbox-c71-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_c71_1: mbox-c71-1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster5 {
+ status = "okay";
+ interrupts = <416>;
+ mbox_c71_2: mbox-c71-2 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_c71_3: mbox-c71-3 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
&wkup_uart0 {
/* Firmware usage */
status = "reserved";
@@ -249,6 +627,7 @@
};
&wkup_i2c0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&wkup_i2c0_pins_default>;
@@ -259,6 +638,93 @@
compatible = "atmel,24c512";
reg = <0x51>;
};
+
+ tps659413: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,primary-pmic;
+ buck12-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka12: buck12 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka3: buck3 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcuio_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vds_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
&wkup_gpio0 {
@@ -268,6 +734,7 @@
};
&mcu_uart0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_uart0_pins_default>;
@@ -281,6 +748,7 @@
};
&main_uart8 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart8_pins_default>;
@@ -297,7 +765,7 @@
reg = <0x21>;
gpio-controller;
#gpio-cells = <2>;
- gpio-line-names = "BOARDID_EEPROM_WP", "CAN_STB", "GPIO_uSD_PWR_EN",
+ gpio-line-names = "BOARDID_EEPROM_WP", "CAN_STB", "GPIO_uSD_PWR_EN",
"IO_EXP_MCU_RGMII_RST#", "IO_EXP_PCIe0_4L_PERST#",
"IO_EXP_PCIe1_M.2_RTSz", "IO_EXP_PCIe3_M.2_RTSz",
"PM_INA_BUS_EN", "ENET1_EXP_PWRDN", "EXP1_ENET_RSTz",
@@ -307,6 +775,7 @@
};
&main_sdhci0 {
+ bootph-all;
/* eMMC */
status = "okay";
non-removable;
@@ -315,6 +784,7 @@
};
&main_sdhci1 {
+ bootph-all;
/* SD card */
status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
@@ -350,3 +820,175 @@
phy-mode = "rgmii-rxid";
phy-handle = <&mcu_phy0>;
};
+
+&mcu_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core0>;
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>;
+};
+
+&mcu_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core1>;
+ memory-region = <&mcu_r5fss0_core1_dma_memory_region>,
+ <&mcu_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_main_r5fss0_core0>;
+ memory-region = <&main_r5fss0_core0_dma_memory_region>,
+ <&main_r5fss0_core0_memory_region>;
+};
+
+&main_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_main_r5fss0_core1>;
+ memory-region = <&main_r5fss0_core1_dma_memory_region>,
+ <&main_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss1_core0 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_main_r5fss1_core0>;
+ memory-region = <&main_r5fss1_core0_dma_memory_region>,
+ <&main_r5fss1_core0_memory_region>;
+};
+
+&main_r5fss1_core1 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_main_r5fss1_core1>;
+ memory-region = <&main_r5fss1_core1_dma_memory_region>,
+ <&main_r5fss1_core1_memory_region>;
+};
+
+&main_r5fss2_core0 {
+ mboxes = <&mailbox0_cluster3>, <&mbox_main_r5fss2_core0>;
+ memory-region = <&main_r5fss2_core0_dma_memory_region>,
+ <&main_r5fss2_core0_memory_region>;
+};
+
+&main_r5fss2_core1 {
+ mboxes = <&mailbox0_cluster3>, <&mbox_main_r5fss2_core1>;
+ memory-region = <&main_r5fss2_core1_dma_memory_region>,
+ <&main_r5fss2_core1_memory_region>;
+};
+
+&c71_0 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster4>, <&mbox_c71_0>;
+ memory-region = <&c71_0_dma_memory_region>,
+ <&c71_0_memory_region>;
+};
+
+&c71_1 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster4>, <&mbox_c71_1>;
+ memory-region = <&c71_1_dma_memory_region>,
+ <&c71_1_memory_region>;
+};
+
+&c71_2 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster5>, <&mbox_c71_2>;
+ memory-region = <&c71_2_dma_memory_region>,
+ <&c71_2_memory_region>;
+};
+
+&c71_3 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster5>, <&mbox_c71_3>;
+ memory-region = <&c71_3_dma_memory_region>,
+ <&c71_3_memory_region>;
+};
+
+&wkup_gpio_intr {
+ status = "okay";
+};
+
+&mcu_i2c1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_i2c1_pins_default>;
+ clock-frequency = <100000>;
+};
+
+&serdes_refclk {
+ status = "okay";
+ clock-frequency = <100000000>;
+};
+
+&dss {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&dss_vout0_pins_default>;
+ assigned-clocks = <&k3_clks 218 2>,
+ <&k3_clks 218 5>,
+ <&k3_clks 218 14>,
+ <&k3_clks 218 18>;
+ assigned-clock-parents = <&k3_clks 218 3>,
+ <&k3_clks 218 7>,
+ <&k3_clks 218 16>,
+ <&k3_clks 218 22>;
+};
+
+&serdes_wiz4 {
+ status = "okay";
+};
+
+&serdes4 {
+ status = "okay";
+ serdes4_dp_link: phy@0 {
+ reg = <0>;
+ cdns,num-lanes = <4>;
+ #phy-cells = <0>;
+ cdns,phy-type = <PHY_TYPE_DP>;
+ resets = <&serdes_wiz4 1>, <&serdes_wiz4 2>,
+ <&serdes_wiz4 3>, <&serdes_wiz4 4>;
+ };
+};
+
+&mhdp {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&dp0_pins_default>;
+ phys = <&serdes4_dp_link>;
+ phy-names = "dpphy";
+};
+
+&dss_ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* DP */
+ port@0 {
+ reg = <0>;
+
+ dpi0_out: endpoint {
+ remote-endpoint = <&dp0_in>;
+ };
+ };
+
+ /* HDMI */
+ port@1 {
+ reg = <1>;
+
+ dpi1_out0: endpoint {
+ remote-endpoint = <&tfp410_in>;
+ };
+ };
+};
+
+&dp0_ports {
+
+ port@0 {
+ reg = <0>;
+
+ dp0_in: endpoint {
+ remote-endpoint = <&dpi0_out>;
+ };
+ };
+
+ port@4 {
+ reg = <4>;
+
+ dp0_out: endpoint {
+ remote-endpoint = <&dp0_connector_in>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-common-proc-board.dts b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-common-proc-board.dts
index 3cf288128c3f..cee2b4b0eb87 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-common-proc-board.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-common-proc-board.dts
@@ -8,9 +8,10 @@
#include "k3-j7200-som-p0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>
-#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/phy/phy.h>
+#include "k3-serdes.h"
+
/ {
compatible = "ti,j7200-evm", "ti,j7200";
model = "Texas Instruments J7200 EVM";
@@ -239,27 +240,16 @@
pinctrl-0 = <&main_uart3_pins_default>;
};
-&main_gpio2 {
- status = "disabled";
-};
-
-&main_gpio4 {
- status = "disabled";
-};
-
-&main_gpio6 {
- status = "disabled";
+&main_gpio0 {
+ status = "okay";
};
&wkup_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&wkup_gpio_pins_default>;
};
-&wkup_gpio1 {
- status = "disabled";
-};
-
&mcu_cpsw {
pinctrl-names = "default";
pinctrl-0 = <&mcu_cpsw_pins_default>, <&mcu_mdio_pins_default>;
@@ -325,6 +315,7 @@
&main_sdhci0 {
/* eMMC */
+ status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
disable-wp;
@@ -332,6 +323,7 @@
&main_sdhci1 {
/* SD card */
+ status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
pinctrl-names = "default";
vmmc-supply = <&vdd_mmc1>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-evm-quad-port-eth-exp.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-evm-quad-port-eth-exp.dtso
index 34a0747cbe69..32d905235ed7 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-evm-quad-port-eth-exp.dtso
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-evm-quad-port-eth-exp.dtso
@@ -10,9 +10,9 @@
/plugin/;
#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/mux/ti-serdes.h>
#include "k3-pinctrl.h"
+#include "k3-serdes.h"
&{/} {
aliases {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-main.dtsi
index ac62bbc1660d..da67bf8fe703 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-main.dtsi
@@ -91,7 +91,7 @@
};
main_navss: bus@30000000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
@@ -264,11 +264,12 @@
main_ringacc: ringacc@3c000000 {
compatible = "ti,am654-navss-ringacc";
- reg = <0x00 0x3c000000 0x00 0x400000>,
- <0x00 0x38000000 0x00 0x400000>,
- <0x00 0x31120000 0x00 0x100>,
- <0x00 0x33000000 0x00 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ reg = <0x00 0x3c000000 0x00 0x400000>,
+ <0x00 0x38000000 0x00 0x400000>,
+ <0x00 0x31120000 0x00 0x100>,
+ <0x00 0x33000000 0x00 0x40000>,
+ <0x00 0x31080000 0x00 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <1024>;
ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
ti,sci = <&dmsc>;
@@ -278,10 +279,14 @@
main_udmap: dma-controller@31150000 {
compatible = "ti,j721e-navss-main-udmap";
- reg = <0x00 0x31150000 0x00 0x100>,
- <0x00 0x34000000 0x00 0x100000>,
- <0x00 0x35000000 0x00 0x100000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ reg = <0x00 0x31150000 0x00 0x100>,
+ <0x00 0x34000000 0x00 0x100000>,
+ <0x00 0x35000000 0x00 0x100000>,
+ <0x00 0x30b00000 0x00 0x4000>,
+ <0x00 0x30c00000 0x00 0x4000>,
+ <0x00 0x30d00000 0x00 0x4000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -646,6 +651,7 @@
ti,otap-del-sel-hs400 = <0x5>;
ti,itap-del-sel-legacy = <0x10>;
ti,itap-del-sel-mmc-hs = <0xa>;
+ ti,itap-del-sel-ddr52 = <0x3>;
ti,strobe-sel = <0x77>;
ti,clkbuf-sel = <0x7>;
ti,trm-icp = <0x8>;
@@ -654,6 +660,7 @@
mmc-hs200-1_8v;
mmc-hs400-1_8v;
dma-coherent;
+ status = "disabled";
};
main_sdhci1: mmc@4fb0000 {
@@ -677,6 +684,7 @@
ti,clkbuf-sel = <0x7>;
ti,trm-icp = <0x8>;
dma-coherent;
+ status = "disabled";
};
serdes_wiz0: wiz@5060000 {
@@ -830,6 +838,7 @@
power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 105 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio2: gpio@610000 {
@@ -847,6 +856,7 @@
power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 107 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio4: gpio@620000 {
@@ -864,6 +874,7 @@
power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 109 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio6: gpio@630000 {
@@ -881,6 +892,7 @@
power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 111 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_spi0: spi@2100000 {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-mcu-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-mcu-wakeup.dtsi
index c5e4c41effd1..60b26374ae0c 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-mcu-wakeup.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-mcu-wakeup.dtsi
@@ -178,9 +178,16 @@
};
};
- chipid@43000014 {
- compatible = "ti,am654-chipid";
- reg = <0x00 0x43000014 0x00 0x4>;
+ wkup_conf: bus@43000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x00 0x43000000 0x20000>;
+
+ chipid: chipid@14 {
+ compatible = "ti,am654-chipid";
+ reg = <0x14 0x4>;
+ };
};
/* MCU_TIMERIO pad input CTRLMMR_MCU_TIMER*_CTRL registers */
@@ -297,6 +304,7 @@
power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 113 0>;
clock-names = "gpio";
+ status = "disabled";
};
wkup_gpio1: gpio@42100000 {
@@ -313,10 +321,11 @@
power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 114 0>;
clock-names = "gpio";
+ status = "disabled";
};
mcu_navss: bus@28380000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
@@ -326,11 +335,13 @@
mcu_ringacc: ringacc@2b800000 {
compatible = "ti,am654-navss-ringacc";
- reg = <0x00 0x2b800000 0x00 0x400000>,
- <0x00 0x2b000000 0x00 0x400000>,
- <0x00 0x28590000 0x00 0x100>,
- <0x00 0x2a500000 0x00 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ reg = <0x00 0x2b800000 0x00 0x400000>,
+ <0x00 0x2b000000 0x00 0x400000>,
+ <0x00 0x28590000 0x00 0x100>,
+ <0x00 0x2a500000 0x00 0x40000>,
+ <0x00 0x28440000 0x00 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg",
+ "proxy_target", "cfg";
ti,num-rings = <286>;
ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
ti,sci = <&dmsc>;
@@ -340,10 +351,14 @@
mcu_udmap: dma-controller@285c0000 {
compatible = "ti,j721e-navss-mcu-udmap";
- reg = <0x00 0x285c0000 0x00 0x100>,
- <0x00 0x2a800000 0x00 0x40000>,
- <0x00 0x2aa00000 0x00 0x40000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ reg = <0x00 0x285c0000 0x00 0x100>,
+ <0x00 0x2a800000 0x00 0x40000>,
+ <0x00 0x2aa00000 0x00 0x40000>,
+ <0x00 0x284a0000 0x00 0x4000>,
+ <0x00 0x284c0000 0x00 0x4000>,
+ <0x00 0x28400000 0x00 0x2000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -544,6 +559,7 @@
power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
};
@@ -632,4 +648,11 @@
power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
#thermal-sensor-cells = <1>;
};
+
+ mcu_esm: esm@40800000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x40800000 0x00 0x1000>;
+ ti,esm-pins = <95>;
+ bootph-pre-ram;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi
index b37f4f88ece4..ea47f10d393a 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi
@@ -127,6 +127,14 @@
};
};
+&wkup_pmx3 {
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ J721E_WKUP_IOPAD(0x01c, PIN_INPUT, 7) /* (E18) WKUP_GPIO0_84 */
+ >;
+ };
+};
+
&main_pmx0 {
main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
@@ -264,9 +272,155 @@
compatible = "atmel,24c256";
reg = <0x50>;
};
+
+ tps659414: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <84 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,primary-pmic;
+ buck1-supply = <&vsys_3v3>;
+ buck2-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka1: buck1 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka2: buck2 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka3: buck3 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_phyio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd1_lpddr4_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vda_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vdd_wk_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_pll_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+
+ lp876441: pmic@4c {
+ compatible = "ti,lp8764-q1";
+ reg = <0x4c>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <84 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ buck1-supply = <&vsys_3v3>;
+ buck2-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+
+ regulators: regulators {
+ buckb1: buck1 {
+ regulator-name = "vdd_cpu_avs";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <900000>;
+ regulator-always-on;
+ regulator-boot-on;
+ bootph-pre-ram;
+ };
+
+ buckb2: buck2 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb3: buck3 {
+ regulator-name = "vdd_core_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb4: buck4 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-beagleboneai64.dts b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-beagleboneai64.dts
index 66aac145e753..2f954729f353 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-beagleboneai64.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-beagleboneai64.dts
@@ -563,6 +563,7 @@
&main_sdhci0 {
/* eMMC */
+ status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
disable-wp;
@@ -570,6 +571,7 @@
&main_sdhci1 {
/* SD Card */
+ status = "okay";
vmmc-supply = <&vdd_mmc1>;
vqmmc-supply = <&vdd_sd_dv_alt>;
pinctrl-names = "default";
@@ -578,21 +580,6 @@
disable-wp;
};
-&main_sdhci2 {
- /* Unused */
- status = "disabled";
-};
-
-&ospi0 {
- /* Unused */
- status = "disabled";
-};
-
-&ospi1 {
- /* Unused */
- status = "disabled";
-};
-
&main_i2c0 {
status = "okay";
pinctrl-names = "default";
@@ -660,52 +647,23 @@
};
};
-&main_gpio2 {
- /* Unused */
- status = "disabled";
-};
-
-&main_gpio3 {
- /* Unused */
- status = "disabled";
-};
-
-&main_gpio4 {
- /* Unused */
- status = "disabled";
-};
-
-&main_gpio5 {
- /* Unused */
- status = "disabled";
-};
-
-&main_gpio6 {
- /* Unused */
- status = "disabled";
-};
-
-&main_gpio7 {
- /* Unused */
- status = "disabled";
-};
-
&wkup_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_adc0_pins_default>, <&mcu_adc1_pins_default>,
<&mikro_bus_pins_default>;
};
-&wkup_gpio1 {
- /* Unused */
- status = "disabled";
-};
-
&main_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&csi1_gpio_pins_default>, <&csi0_gpio_pins_default>;
};
+&main_gpio1 {
+ status = "okay";
+};
+
&usb_serdes_mux {
idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
};
@@ -789,6 +747,7 @@
};
&tscadc0 {
+ status = "okay";
/* BBB Header: P9.39, P9.40, P9.37, P9.38, P9.33, P9.36, P9.35 */
adc {
ti,adc-channels = <0 1 2 3 4 5 6>;
@@ -796,6 +755,7 @@
};
&tscadc1 {
+ status = "okay";
/* MCU mikroBUS Header J10.1 - MCU_ADC1_AIN0 */
adc {
ti,adc-channels = <0>;
@@ -1012,18 +972,21 @@
};
&c66_0 {
+ status = "okay";
mboxes = <&mailbox0_cluster3>, <&mbox_c66_0>;
memory-region = <&c66_0_dma_memory_region>,
<&c66_0_memory_region>;
};
&c66_1 {
+ status = "okay";
mboxes = <&mailbox0_cluster3>, <&mbox_c66_1>;
memory-region = <&c66_1_dma_memory_region>,
<&c66_1_memory_region>;
};
&c71_0 {
+ status = "okay";
mboxes = <&mailbox0_cluster4>, <&mbox_c71_0>;
memory-region = <&c71_0_dma_memory_region>,
<&c71_0_memory_region>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-common-proc-board.dts b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-common-proc-board.dts
index c1cbbae76182..fe5207ac7d85 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-common-proc-board.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-common-proc-board.dts
@@ -469,41 +469,23 @@
pinctrl-0 = <&main_uart4_pins_default>;
};
-&main_gpio2 {
- status = "disabled";
-};
-
-&main_gpio3 {
- status = "disabled";
-};
-
-&main_gpio4 {
- status = "disabled";
-};
-
-&main_gpio5 {
- status = "disabled";
-};
-
-&main_gpio6 {
- status = "disabled";
-};
-
-&main_gpio7 {
- status = "disabled";
-};
-
&wkup_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&wkup_gpio_pins_default>;
};
-&wkup_gpio1 {
- status = "disabled";
+&main_gpio0 {
+ status = "okay";
+};
+
+&main_gpio1 {
+ status = "okay";
};
&main_sdhci0 {
/* eMMC */
+ status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
disable-wp;
@@ -511,6 +493,7 @@
&main_sdhci1 {
/* SD/MMC */
+ status = "okay";
vmmc-supply = <&vdd_mmc1>;
vqmmc-supply = <&vdd_sd_dv_alt>;
pinctrl-names = "default";
@@ -519,11 +502,6 @@
disable-wp;
};
-&main_sdhci2 {
- /* Unused */
- status = "disabled";
-};
-
&usb_serdes_mux {
idle-states = <1>, <0>; /* USB0 to SERDES3, USB1 to SERDES1 */
};
@@ -641,12 +619,14 @@
};
&tscadc0 {
+ status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
};
&tscadc1 {
+ status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-gesi-exp-board.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-gesi-exp-board.dtso
new file mode 100644
index 000000000000..6a7d37575da1
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-gesi-exp-board.dtso
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT Overlay for CPSW9G in RGMII mode using J7 GESI EXP BRD board with
+ * J721E board.
+ *
+ * GESI Board Product Link: https://www.ti.com/tool/J7EXPCXEVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/net/ti-dp83867.h>
+
+#include "k3-pinctrl.h"
+
+&{/} {
+ aliases {
+ ethernet1 = "/bus@100000/ethernet@c000000/ethernet-ports/port@1";
+ ethernet2 = "/bus@100000/ethernet@c000000/ethernet-ports/port@2";
+ ethernet3 = "/bus@100000/ethernet@c000000/ethernet-ports/port@3";
+ ethernet4 = "/bus@100000/ethernet@c000000/ethernet-ports/port@4";
+ };
+};
+
+&cpsw0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_default_pins
+ &rgmii2_default_pins
+ &rgmii3_default_pins
+ &rgmii4_default_pins>;
+};
+
+&cpsw0_port1 {
+ status = "okay";
+ phy-handle = <&cpsw9g_phy12>;
+ phy-mode = "rgmii-rxid";
+ mac-address = [00 00 00 00 00 00];
+ phys = <&cpsw0_phy_gmii_sel 1>;
+};
+
+&cpsw0_port2 {
+ status = "okay";
+ phy-handle = <&cpsw9g_phy15>;
+ phy-mode = "rgmii-rxid";
+ mac-address = [00 00 00 00 00 00];
+ phys = <&cpsw0_phy_gmii_sel 2>;
+};
+
+&cpsw0_port3 {
+ status = "okay";
+ phy-handle = <&cpsw9g_phy0>;
+ phy-mode = "rgmii-rxid";
+ mac-address = [00 00 00 00 00 00];
+ phys = <&cpsw0_phy_gmii_sel 3>;
+};
+
+&cpsw0_port4 {
+ status = "okay";
+ phy-handle = <&cpsw9g_phy3>;
+ phy-mode = "rgmii-rxid";
+ mac-address = [00 00 00 00 00 00];
+ phys = <&cpsw0_phy_gmii_sel 4>;
+};
+
+&cpsw9g_mdio {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mdio0_default_pins>;
+ bus_freq = <1000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpsw9g_phy0: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+ cpsw9g_phy3: ethernet-phy@3 {
+ reg = <3>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+ cpsw9g_phy12: ethernet-phy@12 {
+ reg = <12>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+ cpsw9g_phy15: ethernet-phy@15 {
+ reg = <15>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+};
+
+&exp1 {
+ p15-hog {
+ /* P15 - EXP_MUX2 */
+ gpio-hog;
+ gpios = <13 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "EXP_MUX2";
+ };
+
+ p16-hog {
+ /* P16 - EXP_MUX3 */
+ gpio-hog;
+ gpios = <14 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "EXP_MUX3";
+ };
+};
+
+&main_pmx0 {
+ mdio0_default_pins: mdio0-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (V24) MDIO0_MDC */
+ J721E_IOPAD(0x1b8, PIN_INPUT, 0) /* (V26) MDIO0_MDIO */
+ >;
+ };
+
+ rgmii1_default_pins: rgmii1-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x4, PIN_INPUT, 4) /* (AC23) PRG1_PRU0_GPO0.RGMII1_RD0 */
+ J721E_IOPAD(0x8, PIN_INPUT, 4) /* (AG22) PRG1_PRU0_GPO1.RGMII1_RD1 */
+ J721E_IOPAD(0xc, PIN_INPUT, 4) /* (AF22) PRG1_PRU0_GPO2.RGMII1_RD2 */
+ J721E_IOPAD(0x10, PIN_INPUT, 4) /* (AJ23) PRG1_PRU0_GPO3.RGMII1_RD3 */
+ J721E_IOPAD(0x1c, PIN_INPUT, 4) /* (AD22) PRG1_PRU0_GPO6.RGMII1_RXC */
+ J721E_IOPAD(0x14, PIN_INPUT, 4) /* (AH23) PRG1_PRU0_GPO4.RGMII1_RX_CTL */
+ J721E_IOPAD(0x30, PIN_OUTPUT, 4) /* (AF24) PRG1_PRU0_GPO11.RGMII1_TD0 */
+ J721E_IOPAD(0x34, PIN_OUTPUT, 4) /* (AJ24) PRG1_PRU0_GPO12.RGMII1_TD1 */
+ J721E_IOPAD(0x38, PIN_OUTPUT, 4) /* (AG24) PRG1_PRU0_GPO13.RGMII1_TD2 */
+ J721E_IOPAD(0x3c, PIN_OUTPUT, 4) /* (AD24) PRG1_PRU0_GPO14.RGMII1_TD3 */
+ J721E_IOPAD(0x44, PIN_OUTPUT, 4) /* (AE24) PRG1_PRU0_GPO16.RGMII1_TXC */
+ J721E_IOPAD(0x40, PIN_OUTPUT, 4) /* (AC24) PRG1_PRU0_GPO15.RGMII1_TX_CTL */
+ >;
+ };
+
+ rgmii2_default_pins: rgmii2-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x58, PIN_INPUT, 4) /* (AE22) PRG1_PRU1_GPO0.RGMII2_RD0 */
+ J721E_IOPAD(0x5c, PIN_INPUT, 4) /* (AG23) PRG1_PRU1_GPO1.RGMII2_RD1 */
+ J721E_IOPAD(0x60, PIN_INPUT, 4) /* (AF23) PRG1_PRU1_GPO2.RGMII2_RD2 */
+ J721E_IOPAD(0x64, PIN_INPUT, 4) /* (AD23) PRG1_PRU1_GPO3.RGMII2_RD3 */
+ J721E_IOPAD(0x70, PIN_INPUT, 4) /* (AE23) PRG1_PRU1_GPO6.RGMII2_RXC */
+ J721E_IOPAD(0x68, PIN_INPUT, 4) /* (AH24) PRG1_PRU1_GPO4.RGMII2_RX_CTL */
+ J721E_IOPAD(0x84, PIN_OUTPUT, 4) /* (AJ25) PRG1_PRU1_GPO11.RGMII2_TD0 */
+ J721E_IOPAD(0x88, PIN_OUTPUT, 4) /* (AH25) PRG1_PRU1_GPO12.RGMII2_TD1 */
+ J721E_IOPAD(0x8c, PIN_OUTPUT, 4) /* (AG25) PRG1_PRU1_GPO13.RGMII2_TD2 */
+ J721E_IOPAD(0x90, PIN_OUTPUT, 4) /* (AH26) PRG1_PRU1_GPO14.RGMII2_TD3 */
+ J721E_IOPAD(0x98, PIN_OUTPUT, 4) /* (AJ26) PRG1_PRU1_GPO16.RGMII2_TXC */
+ J721E_IOPAD(0x94, PIN_OUTPUT, 4) /* (AJ27) PRG1_PRU1_GPO15.RGMII2_TX_CTL */
+ >;
+ };
+
+ rgmii3_default_pins: rgmii3-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0xb0, PIN_INPUT, 4) /* (AF28) PRG0_PRU0_GPO0.RGMII3_RD0 */
+ J721E_IOPAD(0xb4, PIN_INPUT, 4) /* (AE28) PRG0_PRU0_GPO1.RGMII3_RD1 */
+ J721E_IOPAD(0xb8, PIN_INPUT, 4) /* (AE27) PRG0_PRU0_GPO2.RGMII3_RD2 */
+ J721E_IOPAD(0xbc, PIN_INPUT, 4) /* (AD26) PRG0_PRU0_GPO3.RGMII3_RD3 */
+ J721E_IOPAD(0xc8, PIN_INPUT, 4) /* (AE26) PRG0_PRU0_GPO6.RGMII3_RXC */
+ J721E_IOPAD(0xc0, PIN_INPUT, 4) /* (AD25) PRG0_PRU0_GPO4.RGMII3_RX_CTL */
+ J721E_IOPAD(0xdc, PIN_OUTPUT, 4) /* (AJ28) PRG0_PRU0_GPO11.RGMII3_TD0 */
+ J721E_IOPAD(0xe0, PIN_OUTPUT, 4) /* (AH27) PRG0_PRU0_GPO12.RGMII3_TD1 */
+ J721E_IOPAD(0xe4, PIN_OUTPUT, 4) /* (AH29) PRG0_PRU0_GPO13.RGMII3_TD2 */
+ J721E_IOPAD(0xe8, PIN_OUTPUT, 4) /* (AG28) PRG0_PRU0_GPO14.RGMII3_TD3 */
+ J721E_IOPAD(0xf0, PIN_OUTPUT, 4) /* (AH28) PRG0_PRU0_GPO16.RGMII3_TXC */
+ J721E_IOPAD(0xec, PIN_OUTPUT, 4) /* (AG27) PRG0_PRU0_GPO15.RGMII3_TX_CTL */
+ >;
+ };
+
+ rgmii4_default_pins: rgmii4-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x100, PIN_INPUT, 4) /* (AE29) PRG0_PRU1_GPO0.RGMII4_RD0 */
+ J721E_IOPAD(0x104, PIN_INPUT, 4) /* (AD28) PRG0_PRU1_GPO1.RGMII4_RD1 */
+ J721E_IOPAD(0x108, PIN_INPUT, 4) /* (AD27) PRG0_PRU1_GPO2.RGMII4_RD2 */
+ J721E_IOPAD(0x10c, PIN_INPUT, 4) /* (AC25) PRG0_PRU1_GPO3.RGMII4_RD3 */
+ J721E_IOPAD(0x118, PIN_INPUT, 4) /* (AC26) PRG0_PRU1_GPO6.RGMII4_RXC */
+ J721E_IOPAD(0x110, PIN_INPUT, 4) /* (AD29) PRG0_PRU1_GPO4.RGMII4_RX_CTL */
+ J721E_IOPAD(0x12c, PIN_OUTPUT, 4) /* (AG26) PRG0_PRU1_GPO11.RGMII4_TD0 */
+ J721E_IOPAD(0x130, PIN_OUTPUT, 4) /* (AF27) PRG0_PRU1_GPO12.RGMII4_TD1 */
+ J721E_IOPAD(0x134, PIN_OUTPUT, 4) /* (AF26) PRG0_PRU1_GPO13.RGMII4_TD2 */
+ J721E_IOPAD(0x138, PIN_OUTPUT, 4) /* (AE25) PRG0_PRU1_GPO14.RGMII4_TD3 */
+ J721E_IOPAD(0x140, PIN_OUTPUT, 4) /* (AG29) PRG0_PRU1_GPO16.RGMII4_TXC */
+ J721E_IOPAD(0x13c, PIN_OUTPUT, 4) /* (AF29) PRG0_PRU1_GPO15.RGMII4_TX_CTL */
+ >;
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-pcie0-ep.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-pcie0-ep.dtso
new file mode 100644
index 000000000000..0c82a13b65a4
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-pcie0-ep.dtso
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT Overlay for enabling PCIE0 instance in Endpoint Configuration with the
+ * J7 common processor board.
+ *
+ * J7 Common Processor Board Product Link: https://www.ti.com/tool/J721EXCPXEVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+#include "k3-pinctrl.h"
+
+/*
+ * Since Root Complex and Endpoint modes are mutually exclusive
+ * disable Root Complex mode.
+ */
+&pcie0_rc {
+ status = "disabled";
+};
+
+&cbass_main {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ interrupt-parent = <&gic500>;
+
+ pcie0_ep: pcie-ep@2900000 {
+ compatible = "ti,j721e-pcie-ep";
+ reg = <0x00 0x02900000 0x00 0x1000>,
+ <0x00 0x02907000 0x00 0x400>,
+ <0x00 0x0d000000 0x00 0x00800000>,
+ <0x00 0x10000000 0x00 0x08000000>;
+ reg-names = "intd_cfg", "user_cfg", "reg", "mem";
+ interrupt-names = "link_state";
+ interrupts = <GIC_SPI 318 IRQ_TYPE_EDGE_RISING>;
+ ti,syscon-pcie-ctrl = <&scm_conf 0x4070>;
+ max-link-speed = <3>;
+ num-lanes = <1>;
+ power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 239 1>;
+ clock-names = "fck";
+ max-functions = /bits/ 8 <6>;
+ max-virtual-functions = /bits/ 8 <4 4 4 4 0 0>;
+ dma-coherent;
+ phys = <&serdes0_pcie_link>;
+ phy-names = "pcie-phy";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-quad-port-eth-exp.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-quad-port-eth-exp.dtso
index 6f0adf591b98..d4c51ffc3d6b 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-quad-port-eth-exp.dtso
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-evm-quad-port-eth-exp.dtso
@@ -10,11 +10,11 @@
/plugin/;
#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/phy/phy-cadence.h>
#include "k3-pinctrl.h"
+#include "k3-serdes.h"
&{/} {
aliases {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-main.dtsi
index 2ded1ee1a854..2569b4c08ffb 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-main.dtsi
@@ -7,7 +7,8 @@
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/phy/phy-ti.h>
#include <dt-bindings/mux/mux.h>
-#include <dt-bindings/mux/ti-serdes.h>
+
+#include "k3-serdes.h"
/ {
cmn_refclk: clock-cmnrefclk {
@@ -76,7 +77,7 @@
};
ehrpwm_tbclk: clock-controller@4140 {
- compatible = "ti,am654-ehrpwm-tbclk", "syscon";
+ compatible = "ti,am654-ehrpwm-tbclk";
reg = <0x4140 0x18>;
#clock-cells = <1>;
};
@@ -180,7 +181,7 @@
};
main_navss: bus@30000000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
@@ -364,11 +365,12 @@
main_ringacc: ringacc@3c000000 {
compatible = "ti,am654-navss-ringacc";
- reg = <0x0 0x3c000000 0x0 0x400000>,
- <0x0 0x38000000 0x0 0x400000>,
- <0x0 0x31120000 0x0 0x100>,
- <0x0 0x33000000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ reg = <0x0 0x3c000000 0x0 0x400000>,
+ <0x0 0x38000000 0x0 0x400000>,
+ <0x0 0x31120000 0x0 0x100>,
+ <0x0 0x33000000 0x0 0x40000>,
+ <0x0 0x31080000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <1024>;
ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
ti,sci = <&dmsc>;
@@ -378,10 +380,14 @@
main_udmap: dma-controller@31150000 {
compatible = "ti,j721e-navss-main-udmap";
- reg = <0x0 0x31150000 0x0 0x100>,
- <0x0 0x34000000 0x0 0x100000>,
- <0x0 0x35000000 0x0 0x100000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ reg = <0x0 0x31150000 0x0 0x100>,
+ <0x0 0x34000000 0x0 0x100000>,
+ <0x0 0x35000000 0x0 0x100000>,
+ <0x0 0x30b00000 0x0 0x20000>,
+ <0x0 0x30c00000 0x0 0x10000>,
+ <0x0 0x30d00000 0x0 0x8000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -660,7 +666,7 @@
assigned-clock-parents = <&k3_clks 293 13>;
};
- wiz1_cmn_refclk_dig_div: cmn-refclk-dig-div{
+ wiz1_cmn_refclk_dig_div: cmn-refclk-dig-div {
clocks = <&wiz1_refclk_dig>;
#clock-cells = <0>;
};
@@ -1338,6 +1344,7 @@
power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 105 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio1: gpio@601000 {
@@ -1354,6 +1361,7 @@
power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 106 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio2: gpio@610000 {
@@ -1371,6 +1379,7 @@
power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 107 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio3: gpio@611000 {
@@ -1387,6 +1396,7 @@
power-domains = <&k3_pds 108 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 108 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio4: gpio@620000 {
@@ -1404,6 +1414,7 @@
power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 109 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio5: gpio@621000 {
@@ -1420,6 +1431,7 @@
power-domains = <&k3_pds 110 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 110 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio6: gpio@630000 {
@@ -1437,6 +1449,7 @@
power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 111 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio7: gpio@631000 {
@@ -1453,6 +1466,7 @@
power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 112 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_sdhci0: mmc@4f80000 {
@@ -1477,6 +1491,7 @@
ti,itap-del-sel-ddr52 = <0x3>;
ti,trm-icp = <0x8>;
dma-coherent;
+ status = "disabled";
};
main_sdhci1: mmc@4fb0000 {
@@ -1504,6 +1519,7 @@
ti,clkbuf-sel = <0x7>;
dma-coherent;
sdhci-caps-mask = <0x2 0x0>;
+ status = "disabled";
};
main_sdhci2: mmc@4f98000 {
@@ -1531,6 +1547,7 @@
ti,clkbuf-sel = <0x7>;
dma-coherent;
sdhci-caps-mask = <0x2 0x0>;
+ status = "disabled";
};
usbss0: cdns-usb@4104000 {
@@ -1761,11 +1778,11 @@
"vp1", "vp2", "vp3", "vp4",
"wb";
- clocks = <&k3_clks 152 0>,
- <&k3_clks 152 1>,
- <&k3_clks 152 4>,
- <&k3_clks 152 9>,
- <&k3_clks 152 13>;
+ clocks = <&k3_clks 152 0>,
+ <&k3_clks 152 1>,
+ <&k3_clks 152 4>,
+ <&k3_clks 152 9>,
+ <&k3_clks 152 13>;
clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
power-domains = <&k3_pds 152 TI_SCI_PD_EXCLUSIVE>;
@@ -2108,6 +2125,7 @@
ti,sci-proc-ids = <0x03 0xff>;
resets = <&k3_reset 142 1>;
firmware-name = "j7-c66_0-fw";
+ status = "disabled";
};
c66_1: dsp@4d81800000 {
@@ -2121,6 +2139,7 @@
ti,sci-proc-ids = <0x04 0xff>;
resets = <&k3_reset 143 1>;
firmware-name = "j7-c66_1-fw";
+ status = "disabled";
};
c71_0: dsp@64800000 {
@@ -2133,6 +2152,7 @@
ti,sci-proc-ids = <0x30 0xff>;
resets = <&k3_reset 15 1>;
firmware-name = "j7-c71_0-fw";
+ status = "disabled";
};
icssg0: icssg@b000000 {
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-mcu-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-mcu-wakeup.dtsi
index ea5b9e104491..a74912d9e4da 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-mcu-wakeup.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-mcu-wakeup.dtsi
@@ -48,9 +48,16 @@
};
};
- chipid@43000014 {
- compatible = "ti,am654-chipid";
- reg = <0x0 0x43000014 0x0 0x4>;
+ wkup_conf: bus@43000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x00 0x43000000 0x20000>;
+
+ chipid: chipid@14 {
+ compatible = "ti,am654-chipid";
+ reg = <0x14 0x4>;
+ };
};
wkup_pmx0: pinctrl@4301c000 {
@@ -281,6 +288,7 @@
power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 113 0>;
clock-names = "gpio";
+ status = "disabled";
};
wkup_gpio1: gpio@42100000 {
@@ -297,6 +305,7 @@
power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 114 0>;
clock-names = "gpio";
+ status = "disabled";
};
mcu_i2c0: i2c@40b00000 {
@@ -335,7 +344,7 @@
status = "disabled";
};
- fss: fss@47000000 {
+ fss: bus@47000000 {
compatible = "simple-bus";
reg = <0x0 0x47000000 0x0 0x100>;
#address-cells = <2>;
@@ -378,6 +387,7 @@
power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
ospi1: spi@47050000 {
@@ -392,6 +402,7 @@
power-domains = <&k3_pds 104 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
};
@@ -407,6 +418,7 @@
dmas = <&main_udmap 0x7400>,
<&main_udmap 0x7401>;
dma-names = "fifo0", "fifo1";
+ status = "disabled";
adc {
#io-channel-cells = <1>;
@@ -426,6 +438,7 @@
dmas = <&main_udmap 0x7402>,
<&main_udmap 0x7403>;
dma-names = "fifo0", "fifo1";
+ status = "disabled";
adc {
#io-channel-cells = <1>;
@@ -434,7 +447,7 @@
};
mcu_navss: bus@28380000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
@@ -445,11 +458,12 @@
mcu_ringacc: ringacc@2b800000 {
compatible = "ti,am654-navss-ringacc";
- reg = <0x0 0x2b800000 0x0 0x400000>,
- <0x0 0x2b000000 0x0 0x400000>,
- <0x0 0x28590000 0x0 0x100>,
- <0x0 0x2a500000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ reg = <0x0 0x2b800000 0x0 0x400000>,
+ <0x0 0x2b000000 0x0 0x400000>,
+ <0x0 0x28590000 0x0 0x100>,
+ <0x0 0x2a500000 0x0 0x40000>,
+ <0x0 0x28440000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <286>;
ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
ti,sci = <&dmsc>;
@@ -459,10 +473,14 @@
mcu_udmap: dma-controller@285c0000 {
compatible = "ti,j721e-navss-mcu-udmap";
- reg = <0x0 0x285c0000 0x0 0x100>,
- <0x0 0x2a800000 0x0 0x40000>,
- <0x0 0x2aa00000 0x0 0x40000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ reg = <0x0 0x285c0000 0x0 0x100>,
+ <0x0 0x2a800000 0x0 0x40000>,
+ <0x0 0x2aa00000 0x0 0x40000>,
+ <0x0 0x284a0000 0x0 0x4000>,
+ <0x0 0x284c0000 0x0 0x4000>,
+ <0x0 0x28400000 0x0 0x2000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -664,4 +682,11 @@
power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
#thermal-sensor-cells = <1>;
};
+
+ mcu_esm: esm@40800000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x40800000 0x00 0x1000>;
+ ti,esm-pins = <95>;
+ bootph-pre-ram;
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-sk.dts b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-sk.dts
index 0ee4f38ec8f0..188dfe291a32 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-sk.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-sk.dts
@@ -459,6 +459,12 @@
};
&wkup_pmx0 {
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
+ >;
+ };
+
mcu_cpsw_pins_default: mcu-cpsw-default-pins {
pinctrl-single,pins = <
J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
@@ -560,6 +566,151 @@
compatible = "atmel,24c512";
reg = <0x51>;
};
+
+ tps659413: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,primary-pmic;
+ buck123-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka123: buck123 {
+ regulator-name = "vdd_cpu_avs";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <900000>;
+ regulator-boot-on;
+ regulator-always-on;
+ bootph-pre-ram;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_phyio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd1_lpddr4_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vdda_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+
+ tps659411: pmic@4c {
+ compatible = "ti,tps6594-q1";
+ reg = <0x4c>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ buck1234-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ buckb1234: buck1234 {
+ regulator-name = "vdd_core_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb5: buck5 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob1: ldo1 {
+ regulator-name = "vdd_sd_dv";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob2: ldo2 {
+ regulator-name = "vdd_usb_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob3: ldo3 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob4: ldo4 {
+ regulator-name = "vda_pll_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
&mcu_uart0 {
@@ -582,13 +733,9 @@
pinctrl-0 = <&main_uart1_pins_default>;
};
-&main_sdhci0 {
- /* Unused */
- status = "disabled";
-};
-
&main_sdhci1 {
/* SD Card */
+ status = "okay";
vmmc-supply = <&vdd_mmc1>;
vqmmc-supply = <&vdd_sd_dv_alt>;
pinctrl-names = "default";
@@ -597,12 +744,8 @@
disable-wp;
};
-&main_sdhci2 {
- /* Unused */
- status = "disabled";
-};
-
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
@@ -666,11 +809,6 @@
};
};
-&ospi1 {
- /* Unused */
- status = "disabled";
-};
-
&main_i2c0 {
status = "okay";
pinctrl-names = "default";
@@ -744,41 +882,19 @@
};
&main_gpio0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rpi_header_gpio0_pins_default>;
};
&main_gpio1 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rpi_header_gpio1_pins_default>;
};
-&main_gpio2 {
- status = "disabled";
-};
-
-&main_gpio3 {
- status = "disabled";
-};
-
-&main_gpio4 {
- status = "disabled";
-};
-
-&main_gpio5 {
- status = "disabled";
-};
-
-&main_gpio6 {
- status = "disabled";
-};
-
-&main_gpio7 {
- status = "disabled";
-};
-
-&wkup_gpio1 {
- status = "disabled";
+&wkup_gpio0 {
+ status = "okay";
};
&usb_serdes_mux {
@@ -863,16 +979,6 @@
phy-names = "cdns3,usb3-phy";
};
-&tscadc0 {
- /* Unused */
- status = "disabled";
-};
-
-&tscadc1 {
- /* Unused */
- status = "disabled";
-};
-
&mcu_cpsw {
pinctrl-names = "default";
pinctrl-0 = <&mcu_cpsw_pins_default>, <&mcu_mdio_pins_default>;
@@ -1098,18 +1204,21 @@
};
&c66_0 {
+ status = "okay";
mboxes = <&mailbox0_cluster3>, <&mbox_c66_0>;
memory-region = <&c66_0_dma_memory_region>,
<&c66_0_memory_region>;
};
&c66_1 {
+ status = "okay";
mboxes = <&mailbox0_cluster3>, <&mbox_c66_1>;
memory-region = <&c66_1_dma_memory_region>,
<&c66_1_memory_region>;
};
&c71_0 {
+ status = "okay";
mboxes = <&mailbox0_cluster4>, <&mbox_c71_0>;
memory-region = <&c71_0_dma_memory_region>,
<&c71_0_memory_region>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi
index 38ae13cc3aa3..a75611eec791 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi
@@ -152,6 +152,12 @@
>;
};
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ J721E_WKUP_IOPAD(0x0d4, PIN_INPUT, 7) /* (G26) WKUP_GPIO0_9 */
+ >;
+ };
+
mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-default-pins {
pinctrl-single,pins = <
J721E_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* MCU_OSPI0_CLK */
@@ -199,22 +205,164 @@
compatible = "atmel,24c256";
reg = <0x50>;
};
-};
-&wkup_i2c0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&wkup_i2c0_pins_default>;
- clock-frequency = <400000>;
+ tps659413: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,primary-pmic;
+ buck12-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka12: buck12 {
+ regulator-name = "vdd_cpu_avs";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <900000>;
+ regulator-boot-on;
+ regulator-always-on;
+ bootph-pre-ram;
+ };
- eeprom@50 {
- /* CAV24C256WE-GT3 */
- compatible = "atmel,24c256";
- reg = <0x50>;
+ bucka3: buck3 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_phyio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd1_lpddr4_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vdda_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+
+ tps659411: pmic@4c {
+ compatible = "ti,tps6594-q1";
+ reg = <0x4c>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ buck1234-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ buckb1234: buck1234 {
+ regulator-name = "vdd_core_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb5: buck5 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob1: ldo1 {
+ regulator-name = "vdd_sd_dv";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob2: ldo2 {
+ regulator-name = "vdd_usb_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob3: ldo3 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob4: ldo4 {
+ regulator-name = "vda_pll_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
};
};
&ospi0 {
+ status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
@@ -437,18 +585,21 @@
};
&c66_0 {
+ status = "okay";
mboxes = <&mailbox0_cluster3>, <&mbox_c66_0>;
memory-region = <&c66_0_dma_memory_region>,
<&c66_0_memory_region>;
};
&c66_1 {
+ status = "okay";
mboxes = <&mailbox0_cluster3>, <&mbox_c66_1>;
memory-region = <&c66_1_dma_memory_region>,
<&c66_1_memory_region>;
};
&c71_0 {
+ status = "okay";
mboxes = <&mailbox0_cluster4>, <&mbox_c71_0>;
memory-region = <&c71_0_dma_memory_region>,
<&c71_0_memory_region>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-common-proc-board.dts b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-common-proc-board.dts
index 04d4739d7245..c6b85bbf9a17 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-common-proc-board.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-common-proc-board.dts
@@ -11,7 +11,8 @@
#include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/phy/phy-cadence.h>
#include <dt-bindings/phy/phy.h>
-#include <dt-bindings/mux/ti-serdes.h>
+
+#include "k3-serdes.h"
/ {
compatible = "ti,j721s2-evm", "ti,j721s2";
@@ -29,6 +30,8 @@
can0 = &main_mcan16;
can1 = &mcu_mcan0;
can2 = &mcu_mcan1;
+ can3 = &main_mcan3;
+ can4 = &main_mcan5;
};
evm_12v0: fixedregulator-evm12v0 {
@@ -109,6 +112,22 @@
standby-gpios = <&wkup_gpio0 2 GPIO_ACTIVE_HIGH>;
};
+ transceiver3: can-phy3 {
+ compatible = "ti,tcan1043";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ standby-gpios = <&exp2 7 GPIO_ACTIVE_LOW>;
+ enable-gpios = <&exp2 6 GPIO_ACTIVE_HIGH>;
+ mux-states = <&mux0 1>;
+ };
+
+ transceiver4: can-phy4 {
+ compatible = "ti,tcan1042";
+ #phy-cells = <0>;
+ max-bitrate = <5000000>;
+ standby-gpios = <&exp_som 7 GPIO_ACTIVE_HIGH>;
+ mux-states = <&mux1 1>;
+ };
};
&main_pmx0 {
@@ -152,6 +171,20 @@
J721S2_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AG25) TIMER_IO1.USB0_DRVVBUS */
>;
};
+
+ main_mcan3_pins_default: main-mcan3-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x080, PIN_INPUT, 0) /* (U26) MCASP0_AXR4.MCAN3_RX */
+ J721S2_IOPAD(0x07c, PIN_OUTPUT, 0) /* (T27) MCASP0_AXR3.MCAN3_TX */
+ >;
+ };
+
+ main_mcan5_pins_default: main-mcan5-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x03c, PIN_INPUT, 0) /* (U27) MCASP0_AFSX.MCAN5_RX */
+ J721S2_IOPAD(0x038, PIN_OUTPUT, 0) /* (AB28) MCASP0_ACLKX.MCAN5_TX */
+ >;
+ };
};
&wkup_pmx2 {
@@ -249,36 +282,29 @@
J721S2_WKUP_IOPAD(0x108, PIN_INPUT, 0) /* (N27) MCU_ADC1_AIN7 */
>;
};
+};
+&wkup_pmx1 {
mcu_fss0_ospi1_pins_default: mcu-fss0-ospi1-default-pins {
pinctrl-single,pins = <
- J721S2_WKUP_IOPAD(0x040, PIN_OUTPUT, 0) /* (A19) MCU_OSPI1_CLK */
- J721S2_WKUP_IOPAD(0x05c, PIN_OUTPUT, 0) /* (D20) MCU_OSPI1_CSn0 */
- J721S2_WKUP_IOPAD(0x060, PIN_OUTPUT, 0) /* (C21) MCU_OSPI1_CSn1 */
- J721S2_WKUP_IOPAD(0x04c, PIN_INPUT, 0) /* (D21) MCU_OSPI1_D0 */
- J721S2_WKUP_IOPAD(0x050, PIN_INPUT, 0) /* (G20) MCU_OSPI1_D1 */
- J721S2_WKUP_IOPAD(0x054, PIN_INPUT, 0) /* (C20) MCU_OSPI1_D2 */
- J721S2_WKUP_IOPAD(0x058, PIN_INPUT, 0) /* (A20) MCU_OSPI1_D3 */
- J721S2_WKUP_IOPAD(0x048, PIN_INPUT, 0) /* (B19) MCU_OSPI1_DQS */
- J721S2_WKUP_IOPAD(0x044, PIN_INPUT, 0) /* (B20) MCU_OSPI1_LBCLKO */
+ J721S2_WKUP_IOPAD(0x008, PIN_OUTPUT, 0) /* (A19) MCU_OSPI1_CLK */
+ J721S2_WKUP_IOPAD(0x024, PIN_OUTPUT, 0) /* (D20) MCU_OSPI1_CSn0 */
+ J721S2_WKUP_IOPAD(0x014, PIN_INPUT, 0) /* (D21) MCU_OSPI1_D0 */
+ J721S2_WKUP_IOPAD(0x018, PIN_INPUT, 0) /* (G20) MCU_OSPI1_D1 */
+ J721S2_WKUP_IOPAD(0x01c, PIN_INPUT, 0) /* (C20) MCU_OSPI1_D2 */
+ J721S2_WKUP_IOPAD(0x020, PIN_INPUT, 0) /* (A20) MCU_OSPI1_D3 */
+ J721S2_WKUP_IOPAD(0x010, PIN_INPUT, 0) /* (B19) MCU_OSPI1_DQS */
+ J721S2_WKUP_IOPAD(0x00c, PIN_INPUT, 0) /* (B20) MCU_OSPI1_LBCLKO */
>;
};
};
-&main_gpio2 {
- status = "disabled";
-};
-
-&main_gpio4 {
- status = "disabled";
-};
-
-&main_gpio6 {
- status = "disabled";
+&main_gpio0 {
+ status = "okay";
};
-&wkup_gpio1 {
- status = "disabled";
+&wkup_gpio0 {
+ status = "okay";
};
&wkup_uart0 {
@@ -332,6 +358,7 @@
&main_sdhci0 {
/* eMMC */
+ status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
disable-wp;
@@ -339,6 +366,7 @@
&main_sdhci1 {
/* SD card */
+ status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
pinctrl-names = "default";
disable-wp;
@@ -407,7 +435,7 @@
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi1_pins_default>;
- flash@0{
+ flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <1>;
@@ -460,3 +488,17 @@
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
};
+
+&main_mcan3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan3_pins_default>;
+ phys = <&transceiver3>;
+};
+
+&main_mcan5 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mcan5_pins_default>;
+ phys = <&transceiver4>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-gesi-exp-board.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-gesi-exp-board.dtso
new file mode 100644
index 000000000000..b78feea31b54
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-gesi-exp-board.dtso
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT Overlay for MAIN CPSW2G using GESI Expansion Board with J7 common processor board.
+ *
+ * GESI Board Product Link: https://www.ti.com/tool/J7EXPCXEVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/net/ti-dp83867.h>
+
+#include "k3-pinctrl.h"
+
+&{/} {
+ aliases {
+ ethernet1 = "/bus@100000/ethernet@c200000/ethernet-ports/port@1";
+ };
+};
+
+&main_pmx0 {
+ main_cpsw_mdio_default_pins: main-cpsw-mdio-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x0c0, PIN_OUTPUT, 6) /* (T28) MCASP1_AXR0.MDIO0_MDC */
+ J721S2_IOPAD(0x0bc, PIN_INPUT, 6) /* (V28) MCASP1_AFSX.MDIO0_MDIO */
+ >;
+ };
+
+ rgmii1_default_pins: rgmii1-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x0b8, PIN_INPUT, 6) /* (AA24) MCASP1_ACLKX.RGMII1_RD0 */
+ J721S2_IOPAD(0x0a0, PIN_INPUT, 6) /* (AB25) MCASP0_AXR12.RGMII1_RD1 */
+ J721S2_IOPAD(0x0a4, PIN_INPUT, 6) /* (T23) MCASP0_AXR13.RGMII1_RD2 */
+ J721S2_IOPAD(0x0a8, PIN_INPUT, 6) /* (U24) MCASP0_AXR14.RGMII1_RD3 */
+ J721S2_IOPAD(0x0b0, PIN_INPUT, 6) /* (AD26) MCASP1_AXR3.RGMII1_RXC */
+ J721S2_IOPAD(0x0ac, PIN_INPUT, 6) /* (AC25) MCASP0_AXR15.RGMII1_RX_CTL */
+ J721S2_IOPAD(0x08c, PIN_OUTPUT, 6) /* (T25) MCASP0_AXR7.RGMII1_TD0 */
+ J721S2_IOPAD(0x090, PIN_OUTPUT, 6) /* (W24) MCASP0_AXR8.RGMII1_TD1 */
+ J721S2_IOPAD(0x094, PIN_OUTPUT, 6) /* (AA25) MCASP0_AXR9.RGMII1_TD2 */
+ J721S2_IOPAD(0x098, PIN_OUTPUT, 6) /* (V25) MCASP0_AXR10.RGMII1_TD3 */
+ J721S2_IOPAD(0x0b4, PIN_OUTPUT, 6) /* (U25) MCASP1_AXR4.RGMII1_TXC */
+ J721S2_IOPAD(0x09c, PIN_OUTPUT, 6) /* (T24) MCASP0_AXR11.RGMII1_TX_CTL */
+ >;
+ };
+};
+
+&exp1 {
+ p15 {
+ /* P15 - EXP_MUX2 */
+ gpio-hog;
+ gpios = <13 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "EXP_MUX2";
+ };
+};
+
+&main_cpsw {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_default_pins>;
+};
+
+&main_cpsw_mdio {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_cpsw_mdio_default_pins>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ main_cpsw_phy0: ethernet-phy@0 {
+ reg = <0>;
+ ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
+ ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+ ti,min-output-impedance;
+ };
+};
+
+&main_cpsw_port1 {
+ status = "okay";
+ phy-mode = "rgmii-rxid";
+ phy-handle = <&main_cpsw_phy0>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-pcie1-ep.dtso b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-pcie1-ep.dtso
new file mode 100644
index 000000000000..43568eb67d93
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-evm-pcie1-ep.dtso
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0
+/**
+ * DT Overlay for enabling PCIE1 instance in Endpoint Configuration with the
+ * J7 common processor board.
+ *
+ * J7 Common Processor Board Product Link: https://www.ti.com/tool/J721EXCPXEVM
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+#include "k3-pinctrl.h"
+
+/*
+ * Since Root Complex and Endpoint modes are mutually exclusive
+ * disable Root Complex mode.
+ */
+&pcie1_rc {
+ status = "disabled";
+};
+
+&cbass_main {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ interrupt-parent = <&gic500>;
+
+ pcie1_ep: pcie-ep@2910000 {
+ compatible = "ti,j7200-pcie-ep", "ti,j721e-pcie-ep";
+ reg = <0x00 0x02910000 0x00 0x1000>,
+ <0x00 0x02917000 0x00 0x400>,
+ <0x00 0x0d800000 0x00 0x00800000>,
+ <0x00 0x18000000 0x00 0x08000000>;
+ reg-names = "intd_cfg", "user_cfg", "reg", "mem";
+ interrupt-names = "link_state";
+ interrupts = <GIC_SPI 330 IRQ_TYPE_EDGE_RISING>;
+ ti,syscon-pcie-ctrl = <&scm_conf 0x074>;
+ max-link-speed = <3>;
+ num-lanes = <1>;
+ power-domains = <&k3_pds 276 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 276 41>;
+ clock-names = "fck";
+ max-functions = /bits/ 8 <6>;
+ max-virtual-functions = /bits/ 8 <4 4 4 4 0 0>;
+ dma-coherent;
+ phys = <&serdes0_pcie_link>;
+ phy-names = "pcie-phy";
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-main.dtsi
index ed79ab3a3271..ea7f2b2ab165 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-main.dtsi
@@ -51,6 +51,12 @@
mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
};
+ phy_gmii_sel_cpsw: phy@34 {
+ compatible = "ti,am654-phy-gmii-sel";
+ reg = <0x34 0x4>;
+ #phy-cells = <1>;
+ };
+
serdes_ln_ctrl: mux-controller@80 {
compatible = "mmio-mux";
reg = <0x80 0x10>;
@@ -58,6 +64,72 @@
mux-reg-masks = <0x80 0x3>, <0x84 0x3>, /* SERDES0 lane0/1 select */
<0x88 0x3>, <0x8c 0x3>; /* SERDES0 lane2/3 select */
};
+
+ ehrpwm_tbclk: clock-controller@140 {
+ compatible = "ti,am654-ehrpwm-tbclk";
+ reg = <0x140 0x18>;
+ #clock-cells = <1>;
+ };
+ };
+
+ main_ehrpwm0: pwm@3000000 {
+ compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x3000000 0x00 0x100>;
+ power-domains = <&k3_pds 160 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&ehrpwm_tbclk 0>, <&k3_clks 160 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ main_ehrpwm1: pwm@3010000 {
+ compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x3010000 0x00 0x100>;
+ power-domains = <&k3_pds 161 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&ehrpwm_tbclk 1>, <&k3_clks 161 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ main_ehrpwm2: pwm@3020000 {
+ compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x3020000 0x00 0x100>;
+ power-domains = <&k3_pds 162 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&ehrpwm_tbclk 2>, <&k3_clks 162 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ main_ehrpwm3: pwm@3030000 {
+ compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x3030000 0x00 0x100>;
+ power-domains = <&k3_pds 163 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&ehrpwm_tbclk 3>, <&k3_clks 163 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ main_ehrpwm4: pwm@3040000 {
+ compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x3040000 0x00 0x100>;
+ power-domains = <&k3_pds 164 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&ehrpwm_tbclk 4>, <&k3_clks 164 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
+ };
+
+ main_ehrpwm5: pwm@3050000 {
+ compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";
+ #pwm-cells = <3>;
+ reg = <0x00 0x3050000 0x00 0x100>;
+ power-domains = <&k3_pds 165 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&ehrpwm_tbclk 5>, <&k3_clks 165 0>;
+ clock-names = "tbclk", "fck";
+ status = "disabled";
};
gic500: interrupt-controller@1800000 {
@@ -507,6 +579,7 @@
power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 111 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio2: gpio@610000 {
@@ -523,6 +596,7 @@
power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 112 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio4: gpio@620000 {
@@ -539,6 +613,7 @@
power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 113 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_gpio6: gpio@630000 {
@@ -555,6 +630,7 @@
power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 114 0>;
clock-names = "gpio";
+ status = "disabled";
};
main_i2c0: i2c@2000000 {
@@ -665,6 +741,7 @@
mmc-hs200-1_8v;
mmc-hs400-1_8v;
dma-coherent;
+ status = "disabled";
};
main_sdhci1: mmc@4fb0000 {
@@ -689,15 +766,17 @@
ti,itap-del-sel-sd-hs = <0x0>;
ti,itap-del-sel-sdr12 = <0x0>;
ti,itap-del-sel-sdr25 = <0x0>;
+ ti,itap-del-sel-ddr50 = <0x2>;
ti,clkbuf-sel = <0x7>;
ti,trm-icp = <0x8>;
dma-coherent;
/* Masking support for SDR104 capability */
sdhci-caps-mask = <0x00000003 0x00000000>;
+ status = "disabled";
};
main_navss: bus@30000000 {
- compatible = "simple-mfd";
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
@@ -729,6 +808,7 @@
ti,sci = <&sms>;
ti,sci-dev-id = <265>;
ti,interrupt-ranges = <0 0 256>;
+ ti,unmapped-event-sources = <&main_bcdma_csi>;
};
secure_proxy_main: mailbox@32c00000 {
@@ -993,8 +1073,9 @@
reg = <0x0 0x3c000000 0x0 0x400000>,
<0x0 0x38000000 0x0 0x400000>,
<0x0 0x31120000 0x0 0x100>,
- <0x0 0x33000000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ <0x0 0x33000000 0x0 0x40000>,
+ <0x0 0x31080000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <1024>;
ti,sci-rm-range-gp-rings = <0x1>;
ti,sci = <&sms>;
@@ -1006,8 +1087,12 @@
compatible = "ti,j721e-navss-main-udmap";
reg = <0x0 0x31150000 0x0 0x100>,
<0x0 0x34000000 0x0 0x80000>,
- <0x0 0x35000000 0x0 0x200000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ <0x0 0x35000000 0x0 0x200000>,
+ <0x0 0x30b00000 0x0 0x20000>,
+ <0x0 0x30c00000 0x0 0x8000>,
+ <0x0 0x30d00000 0x0 0x4000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -1024,6 +1109,22 @@
ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
};
+ main_bcdma_csi: dma-controller@311a0000 {
+ compatible = "ti,j721s2-dmss-bcdma-csi";
+ reg = <0x00 0x311a0000 0x00 0x100>,
+ <0x00 0x35d00000 0x00 0x20000>,
+ <0x00 0x35c00000 0x00 0x10000>,
+ <0x00 0x35e00000 0x00 0x80000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+ msi-parent = <&main_udmass_inta>;
+ #dma-cells = <3>;
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <225>;
+ ti,sci-rm-range-rchan = <0x21>;
+ ti,sci-rm-range-tchan = <0x22>;
+ status = "disabled";
+ };
+
cpts@310d0000 {
compatible = "ti,j721e-cpts";
reg = <0x0 0x310d0000 0x0 0x400>;
@@ -1039,6 +1140,69 @@
};
};
+ main_cpsw: ethernet@c200000 {
+ compatible = "ti,j721e-cpsw-nuss";
+ reg = <0x00 0xc200000 0x00 0x200000>;
+ reg-names = "cpsw_nuss";
+ ranges = <0x0 0x0 0x0 0xc200000 0x0 0x200000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-coherent;
+ clocks = <&k3_clks 28 28>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 28 TI_SCI_PD_EXCLUSIVE>;
+
+ dmas = <&main_udmap 0xc640>,
+ <&main_udmap 0xc641>,
+ <&main_udmap 0xc642>,
+ <&main_udmap 0xc643>,
+ <&main_udmap 0xc644>,
+ <&main_udmap 0xc645>,
+ <&main_udmap 0xc646>,
+ <&main_udmap 0xc647>,
+ <&main_udmap 0x4640>;
+ dma-names = "tx0", "tx1", "tx2", "tx3",
+ "tx4", "tx5", "tx6", "tx7",
+ "rx";
+
+ status = "disabled";
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ main_cpsw_port1: port@1 {
+ reg = <1>;
+ ti,mac-only;
+ label = "port1";
+ phys = <&phy_gmii_sel_cpsw 1>;
+ status = "disabled";
+ };
+ };
+
+ main_cpsw_mdio: mdio@f00 {
+ compatible = "ti,cpsw-mdio","ti,davinci_mdio";
+ reg = <0x00 0xf00 0x00 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&k3_clks 28 28>;
+ clock-names = "fck";
+ bus_freq = <1000000>;
+ status = "disabled";
+ };
+
+ cpts@3d000 {
+ compatible = "ti,am65-cpts";
+ reg = <0x00 0x3d000 0x00 0x400>;
+ clocks = <&k3_clks 28 3>;
+ clock-names = "cpts";
+ interrupts-extended = <&gic500 GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "cpts";
+ ti,cpts-ext-ts-inputs = <4>;
+ ti,cpts-periodic-outputs = <2>;
+ };
+ };
+
usbss0: cdns-usb@4104000 {
compatible = "ti,j721e-usb";
reg = <0x00 0x04104000 0x00 0x100>;
@@ -1507,4 +1671,263 @@
clocks = <&k3_clks 346 1>;
status = "disabled";
};
+
+ dss: dss@4a00000 {
+ compatible = "ti,j721e-dss";
+ reg = <0x00 0x04a00000 0x00 0x10000>, /* common_m */
+ <0x00 0x04a10000 0x00 0x10000>, /* common_s0*/
+ <0x00 0x04b00000 0x00 0x10000>, /* common_s1*/
+ <0x00 0x04b10000 0x00 0x10000>, /* common_s2*/
+ <0x00 0x04a20000 0x00 0x10000>, /* vidl1 */
+ <0x00 0x04a30000 0x00 0x10000>, /* vidl2 */
+ <0x00 0x04a50000 0x00 0x10000>, /* vid1 */
+ <0x00 0x04a60000 0x00 0x10000>, /* vid2 */
+ <0x00 0x04a70000 0x00 0x10000>, /* ovr1 */
+ <0x00 0x04a90000 0x00 0x10000>, /* ovr2 */
+ <0x00 0x04ab0000 0x00 0x10000>, /* ovr3 */
+ <0x00 0x04ad0000 0x00 0x10000>, /* ovr4 */
+ <0x00 0x04a80000 0x00 0x10000>, /* vp1 */
+ <0x00 0x04aa0000 0x00 0x10000>, /* vp2 */
+ <0x00 0x04ac0000 0x00 0x10000>, /* vp3 */
+ <0x00 0x04ae0000 0x00 0x10000>, /* vp4 */
+ <0x00 0x04af0000 0x00 0x10000>; /* wb */
+ reg-names = "common_m", "common_s0",
+ "common_s1", "common_s2",
+ "vidl1", "vidl2","vid1","vid2",
+ "ovr1", "ovr2", "ovr3", "ovr4",
+ "vp1", "vp2", "vp3", "vp4",
+ "wb";
+ clocks = <&k3_clks 158 0>,
+ <&k3_clks 158 2>,
+ <&k3_clks 158 5>,
+ <&k3_clks 158 14>,
+ <&k3_clks 158 18>;
+ clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
+ power-domains = <&k3_pds 158 TI_SCI_PD_EXCLUSIVE>;
+ interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "common_m",
+ "common_s0",
+ "common_s1",
+ "common_s2";
+ status = "disabled";
+
+ dss_ports: ports {
+ };
+ };
+
+ main_r5fss0: r5fss@5c00000 {
+ compatible = "ti,j721s2-r5fss";
+ ti,cluster-mode = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x5c00000 0x00 0x5c00000 0x20000>,
+ <0x5d00000 0x00 0x5d00000 0x20000>;
+ power-domains = <&k3_pds 277 TI_SCI_PD_EXCLUSIVE>;
+
+ main_r5fss0_core0: r5f@5c00000 {
+ compatible = "ti,j721s2-r5f";
+ reg = <0x5c00000 0x00010000>,
+ <0x5c10000 0x00010000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <279>;
+ ti,sci-proc-ids = <0x06 0xff>;
+ resets = <&k3_reset 279 1>;
+ firmware-name = "j721s2-main-r5f0_0-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+
+ main_r5fss0_core1: r5f@5d00000 {
+ compatible = "ti,j721s2-r5f";
+ reg = <0x5d00000 0x00010000>,
+ <0x5d10000 0x00010000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <280>;
+ ti,sci-proc-ids = <0x07 0xff>;
+ resets = <&k3_reset 280 1>;
+ firmware-name = "j721s2-main-r5f0_1-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+ };
+
+ main_r5fss1: r5fss@5e00000 {
+ compatible = "ti,j721s2-r5fss";
+ ti,cluster-mode = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x5e00000 0x00 0x5e00000 0x20000>,
+ <0x5f00000 0x00 0x5f00000 0x20000>;
+ power-domains = <&k3_pds 278 TI_SCI_PD_EXCLUSIVE>;
+
+ main_r5fss1_core0: r5f@5e00000 {
+ compatible = "ti,j721s2-r5f";
+ reg = <0x5e00000 0x00010000>,
+ <0x5e10000 0x00010000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <281>;
+ ti,sci-proc-ids = <0x08 0xff>;
+ resets = <&k3_reset 281 1>;
+ firmware-name = "j721s2-main-r5f1_0-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+
+ main_r5fss1_core1: r5f@5f00000 {
+ compatible = "ti,j721s2-r5f";
+ reg = <0x5f00000 0x00010000>,
+ <0x5f10000 0x00010000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <282>;
+ ti,sci-proc-ids = <0x09 0xff>;
+ resets = <&k3_reset 282 1>;
+ firmware-name = "j721s2-main-r5f1_1-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+ };
+
+ c71_0: dsp@64800000 {
+ compatible = "ti,j721s2-c71-dsp";
+ reg = <0x00 0x64800000 0x00 0x00080000>,
+ <0x00 0x64e00000 0x00 0x0000c000>;
+ reg-names = "l2sram", "l1dram";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <8>;
+ ti,sci-proc-ids = <0x30 0xff>;
+ resets = <&k3_reset 8 1>;
+ firmware-name = "j721s2-c71_0-fw";
+ status = "disabled";
+ };
+
+ c71_1: dsp@65800000 {
+ compatible = "ti,j721s2-c71-dsp";
+ reg = <0x00 0x65800000 0x00 0x00080000>,
+ <0x00 0x65e00000 0x00 0x0000c000>;
+ reg-names = "l2sram", "l1dram";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <11>;
+ ti,sci-proc-ids = <0x31 0xff>;
+ resets = <&k3_reset 11 1>;
+ firmware-name = "j721s2-c71_1-fw";
+ status = "disabled";
+ };
+
+ main_esm: esm@700000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x700000 0x00 0x1000>;
+ ti,esm-pins = <688>, <689>;
+ bootph-pre-ram;
+ };
+
+ watchdog0: watchdog@2200000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2200000 0x00 0x100>;
+ clocks = <&k3_clks 286 1>;
+ power-domains = <&k3_pds 286 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 286 1>;
+ assigned-clock-parents = <&k3_clks 286 5>;
+ };
+
+ watchdog1: watchdog@2210000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2210000 0x00 0x100>;
+ clocks = <&k3_clks 287 1>;
+ power-domains = <&k3_pds 287 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 287 1>;
+ assigned-clock-parents = <&k3_clks 287 5>;
+ };
+
+ /*
+ * The following RTI instances are coupled with MCU R5Fs, c7x and
+ * GPU so keeping them reserved as these will be used by their
+ * respective firmware
+ */
+ watchdog2: watchdog@22f0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x22f0000 0x00 0x100>;
+ clocks = <&k3_clks 290 1>;
+ power-domains = <&k3_pds 290 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 290 1>;
+ assigned-clock-parents = <&k3_clks 290 5>;
+ /* reserved for GPU */
+ status = "reserved";
+ };
+
+ watchdog3: watchdog@2300000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2300000 0x00 0x100>;
+ clocks = <&k3_clks 288 1>;
+ power-domains = <&k3_pds 288 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 288 1>;
+ assigned-clock-parents = <&k3_clks 288 5>;
+ /* reserved for C7X_0 */
+ status = "reserved";
+ };
+
+ watchdog4: watchdog@2310000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2310000 0x00 0x100>;
+ clocks = <&k3_clks 289 1>;
+ power-domains = <&k3_pds 289 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 289 1>;
+ assigned-clock-parents = <&k3_clks 289 5>;
+ /* reserved for C7X_1 */
+ status = "reserved";
+ };
+
+ watchdog5: watchdog@23c0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23c0000 0x00 0x100>;
+ clocks = <&k3_clks 291 1>;
+ power-domains = <&k3_pds 291 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 291 1>;
+ assigned-clock-parents = <&k3_clks 291 5>;
+ /* reserved for MAIN_R5F0_0 */
+ status = "reserved";
+ };
+
+ watchdog6: watchdog@23d0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23d0000 0x00 0x100>;
+ clocks = <&k3_clks 292 1>;
+ power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 292 1>;
+ assigned-clock-parents = <&k3_clks 292 5>;
+ /* reserved for MAIN_R5F0_1 */
+ status = "reserved";
+ };
+
+ watchdog7: watchdog@23e0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23e0000 0x00 0x100>;
+ clocks = <&k3_clks 293 1>;
+ power-domains = <&k3_pds 293 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 293 1>;
+ assigned-clock-parents = <&k3_clks 293 5>;
+ /* reserved for MAIN_R5F1_0 */
+ status = "reserved";
+ };
+
+ watchdog8: watchdog@23f0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23f0000 0x00 0x100>;
+ clocks = <&k3_clks 294 1>;
+ power-domains = <&k3_pds 294 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 294 1>;
+ assigned-clock-parents = <&k3_clks 294 5>;
+ /* reserved for MAIN_R5F1_1 */
+ status = "reserved";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-mcu-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-mcu-wakeup.dtsi
index e7dd947a1814..80aa33c58a45 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-mcu-wakeup.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-mcu-wakeup.dtsi
@@ -34,9 +34,16 @@
};
};
- chipid@43000014 {
- compatible = "ti,am654-chipid";
- reg = <0x00 0x43000014 0x00 0x4>;
+ wkup_conf: bus@43000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x00 0x43000000 0x20000>;
+
+ chipid: chipid@14 {
+ compatible = "ti,am654-chipid";
+ reg = <0x14 0x4>;
+ };
};
secure_proxy_sa3: mailbox@43600000 {
@@ -323,6 +330,7 @@
power-domains = <&k3_pds 115 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 115 0>;
clock-names = "gpio";
+ status = "disabled";
};
wkup_gpio1: gpio@42100000 {
@@ -339,6 +347,7 @@
power-domains = <&k3_pds 116 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 116 0>;
clock-names = "gpio";
+ status = "disabled";
};
wkup_i2c0: i2c@42120000 {
@@ -440,8 +449,8 @@
status = "disabled";
};
- mcu_navss: bus@28380000{
- compatible = "simple-mfd";
+ mcu_navss: bus@28380000 {
+ compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>;
@@ -455,8 +464,9 @@
reg = <0x0 0x2b800000 0x0 0x400000>,
<0x0 0x2b000000 0x0 0x400000>,
<0x0 0x28590000 0x0 0x100>,
- <0x0 0x2a500000 0x0 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ <0x0 0x2a500000 0x0 0x40000>,
+ <0x0 0x28440000 0x0 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <286>;
ti,sci-rm-range-gp-rings = <0x1>;
ti,sci = <&sms>;
@@ -468,8 +478,12 @@
compatible = "ti,j721e-navss-mcu-udmap";
reg = <0x0 0x285c0000 0x0 0x100>,
<0x0 0x2a800000 0x0 0x40000>,
- <0x0 0x2aa00000 0x0 0x40000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ <0x0 0x2aa00000 0x0 0x40000>,
+ <0x0 0x284a0000 0x0 0x4000>,
+ <0x0 0x284c0000 0x0 0x4000>,
+ <0x0 0x28400000 0x0 0x2000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -652,4 +666,84 @@
power-domains = <&k3_pds 154 TI_SCI_PD_SHARED>;
#thermal-sensor-cells = <1>;
};
+
+ mcu_r5fss0: r5fss@41000000 {
+ compatible = "ti,j721s2-r5fss";
+ ti,cluster-mode = <1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x41000000 0x00 0x41000000 0x20000>,
+ <0x41400000 0x00 0x41400000 0x20000>;
+ power-domains = <&k3_pds 283 TI_SCI_PD_EXCLUSIVE>;
+
+ mcu_r5fss0_core0: r5f@41000000 {
+ compatible = "ti,j721s2-r5f";
+ reg = <0x41000000 0x00010000>,
+ <0x41010000 0x00010000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <284>;
+ ti,sci-proc-ids = <0x01 0xff>;
+ resets = <&k3_reset 284 1>;
+ firmware-name = "j721s2-mcu-r5f0_0-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+
+ mcu_r5fss0_core1: r5f@41400000 {
+ compatible = "ti,j721s2-r5f";
+ reg = <0x41400000 0x00010000>,
+ <0x41410000 0x00010000>;
+ reg-names = "atcm", "btcm";
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <285>;
+ ti,sci-proc-ids = <0x02 0xff>;
+ resets = <&k3_reset 285 1>;
+ firmware-name = "j721s2-mcu-r5f0_1-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ };
+ };
+
+ mcu_esm: esm@40800000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x40800000 0x00 0x1000>;
+ ti,esm-pins = <95>;
+ bootph-pre-ram;
+ };
+
+ wkup_esm: esm@42080000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x42080000 0x00 0x1000>;
+ ti,esm-pins = <63>;
+ bootph-pre-ram;
+ };
+
+ /*
+ * The 2 RTI instances are couple with MCU R5Fs so keeping them
+ * reserved as these will be used by their respective firmware
+ */
+ mcu_watchdog0: watchdog@40600000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x40600000 0x00 0x100>;
+ clocks = <&k3_clks 295 1>;
+ power-domains = <&k3_pds 295 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 295 1>;
+ assigned-clock-parents = <&k3_clks 295 5>;
+ /* reserved for MCU_R5F0_0 */
+ status = "reserved";
+ };
+
+ mcu_watchdog1: watchdog@40610000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x40610000 0x00 0x100>;
+ clocks = <&k3_clks 296 1>;
+ power-domains = <&k3_pds 296 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 296 1>;
+ assigned-clock-parents = <&k3_clks 296 5>;
+ /* reserved for MCU_R5F0_1 */
+ status = "reserved";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-som-p0.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-som-p0.dtsi
index d57dd43da0ef..da3237b23b63 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-som-p0.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j721s2-som-p0.dtsi
@@ -29,6 +29,120 @@
alignment = <0x1000>;
no-map;
};
+
+ mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0000000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa0100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1000000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa1100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a2000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core0_memory_region: r5f-memory@a2100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa2100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a3000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss0_core1_memory_region: r5f-memory@a3100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa3100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a4000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa4000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core0_memory_region: r5f-memory@a4100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa4100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a5000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa5000000 0x00 0x100000>;
+ no-map;
+ };
+
+ main_r5fss1_core1_memory_region: r5f-memory@a5100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa5100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_0_dma_memory_region: c71-dma-memory@a6000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa6000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_0_memory_region: c71-memory@a6100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa6100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ c71_1_dma_memory_region: c71-dma-memory@a7000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa7000000 0x00 0x100000>;
+ no-map;
+ };
+
+ c71_1_memory_region: c71-memory@a7100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0xa7100000 0x00 0xf00000>;
+ no-map;
+ };
+
+ rtos_ipc_memory_region: ipc-memories@a8000000 {
+ reg = <0x00 0xa8000000 0x00 0x01c00000>;
+ alignment = <0x1000>;
+ no-map;
+ };
+ };
+
+ mux0: mux-controller {
+ compatible = "gpio-mux";
+ #mux-state-cells = <1>;
+ mux-gpios = <&exp_som 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ mux1: mux-controller {
+ compatible = "gpio-mux";
+ #mux-state-cells = <1>;
+ mux-gpios = <&exp_som 2 GPIO_ACTIVE_HIGH>;
};
transceiver0: can-phy0 {
@@ -44,9 +158,6 @@
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x000, PIN_OUTPUT, 0) /* (D19) MCU_OSPI0_CLK */
J721S2_WKUP_IOPAD(0x02c, PIN_OUTPUT, 0) /* (F15) MCU_OSPI0_CSn0 */
- J721S2_WKUP_IOPAD(0x030, PIN_OUTPUT, 0) /* (G17) MCU_OSPI0_CSn1 */
- J721S2_WKUP_IOPAD(0x038, PIN_OUTPUT, 0) /* (F14) MCU_OSPI0_CSn2 */
- J721S2_WKUP_IOPAD(0x03c, PIN_OUTPUT, 0) /* (F17) MCU_OSPI0_CSn3 */
J721S2_WKUP_IOPAD(0x00c, PIN_INPUT, 0) /* (C19) MCU_OSPI0_D0 */
J721S2_WKUP_IOPAD(0x010, PIN_INPUT, 0) /* (F16) MCU_OSPI0_D1 */
J721S2_WKUP_IOPAD(0x014, PIN_INPUT, 0) /* (G15) MCU_OSPI0_D2 */
@@ -61,6 +172,15 @@
};
};
+&wkup_pmx1 {
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
+ J721S2_WKUP_IOPAD(0x028, PIN_INPUT, 7)
+ >;
+ };
+};
+
&wkup_pmx2 {
wkup_i2c0_pins_default: wkup-i2c0-default-pins {
pinctrl-single,pins = <
@@ -97,6 +217,190 @@
compatible = "atmel,24c256";
reg = <0x50>;
};
+
+ tps659411: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,primary-pmic;
+ buck1234-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka1234: buck1234 {
+ regulator-name = "vdd_cpu_avs";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <900000>;
+ regulator-boot-on;
+ regulator-always-on;
+ bootph-pre-ram;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd_mcuwk_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcu_gpioret_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+
+ tps659414: pmic@4c {
+ compatible = "ti,tps6594-q1";
+ reg = <0x4c>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ buck1-supply = <&vsys_3v3>;
+ buck2-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ buckb1: buck1 {
+ regulator-name = "vdd_io_1v8_reg";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ buckb2: buck2 {
+ regulator-name = "vdd_fpd_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb3: buck3 {
+ regulator-name = "vdd_phy_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb4: buck4 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb5: buck5 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob1: ldo1 {
+ regulator-name = "vdd_wk_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob2: ldo2 {
+ regulator-name = "vdd_gpioret_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob3: ldo3 {
+ regulator-name = "vda_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob4: ldo4 {
+ regulator-name = "vda_pll_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+
+ lp876411: pmic@58 {
+ compatible = "ti,lp8764-q1";
+ reg = <0x58>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ buck1234-supply = <&vsys_3v3>;
+
+ regulators {
+ buckc1234: buck1234 {
+ regulator-name = "vdd_core_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
&main_i2c0 {
@@ -142,3 +446,109 @@
cdns,read-delay = <4>;
};
};
+
+&mailbox0_cluster0 {
+ status = "okay";
+ interrupts = <436>;
+ mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster1 {
+ status = "okay";
+ interrupts = <432>;
+ mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster2 {
+ status = "okay";
+ interrupts = <428>;
+ mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mailbox0_cluster4 {
+ status = "okay";
+ interrupts = <420>;
+ mbox_c71_0: mbox-c71-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+
+ mbox_c71_1: mbox-c71-1 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
+};
+
+&mcu_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core0>;
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>;
+};
+
+&mcu_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core1>;
+ memory-region = <&mcu_r5fss0_core1_dma_memory_region>,
+ <&mcu_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_main_r5fss0_core0>;
+ memory-region = <&main_r5fss0_core0_dma_memory_region>,
+ <&main_r5fss0_core0_memory_region>;
+};
+
+&main_r5fss0_core1 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_main_r5fss0_core1>;
+ memory-region = <&main_r5fss0_core1_dma_memory_region>,
+ <&main_r5fss0_core1_memory_region>;
+};
+
+&main_r5fss1_core0 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_main_r5fss1_core0>;
+ memory-region = <&main_r5fss1_core0_dma_memory_region>,
+ <&main_r5fss1_core0_memory_region>;
+};
+
+&main_r5fss1_core1 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_main_r5fss1_core1>;
+ memory-region = <&main_r5fss1_core1_dma_memory_region>,
+ <&main_r5fss1_core1_memory_region>;
+};
+
+&c71_0 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster4>, <&mbox_c71_0>;
+ memory-region = <&c71_0_dma_memory_region>,
+ <&c71_0_memory_region>;
+};
+
+&c71_1 {
+ status = "okay";
+ mboxes = <&mailbox0_cluster4>, <&mbox_c71_1>;
+ memory-region = <&c71_1_dma_memory_region>,
+ <&c71_1_memory_region>;
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-evm.dts b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-evm.dts
index 430b8a2c5df5..f34b92acc56d 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-evm.dts
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-evm.dts
@@ -249,10 +249,38 @@
states = <1800000 0x0>,
<3300000 0x1>;
};
+
+ dp0_pwr_3v3: regulator-dp0-prw {
+ compatible = "regulator-fixed";
+ regulator-name = "dp0-pwr";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&exp4 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ dp0: connector-dp0 {
+ compatible = "dp-connector";
+ label = "DP0";
+ type = "full-size";
+ dp-pwr-supply = <&dp0_pwr_3v3>;
+
+ port {
+ dp0_connector_in: endpoint {
+ remote-endpoint = <&dp0_out>;
+ };
+ };
+ };
+};
+
+&wkup_gpio0 {
+ status = "okay";
};
&main_pmx0 {
+ bootph-all;
main_uart8_pins_default: main-uart8-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_IOPAD(0x040, PIN_INPUT, 14) /* (AF37) MCASP0_AXR0.UART8_CTSn */
J784S4_IOPAD(0x044, PIN_OUTPUT, 14) /* (AG37) MCASP0_AXR1.UART8_RTSn */
@@ -269,6 +297,7 @@
};
main_mmc1_pins_default: main-mmc1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_IOPAD(0x104, PIN_INPUT, 0) /* (AB38) MMC1_CLK */
J784S4_IOPAD(0x108, PIN_INPUT, 0) /* (AB36) MMC1_CMD */
@@ -286,10 +315,25 @@
J784S4_IOPAD(0x020, PIN_INPUT, 7) /* (AJ35) MCAN15_RX.GPIO0_8 */
>;
};
+
+ dp0_pins_default: dp0-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x0cc, PIN_INPUT, 12) /* (AM37) SPI0_CS0.DP0_HPD */
+ >;
+ };
+
+ main_i2c4_pins_default: main-i2c4-default-pins {
+ pinctrl-single,pins = <
+ J784S4_IOPAD(0x014, PIN_INPUT_PULLUP, 8) /* (AG33) MCAN14_TX.I2C4_SCL */
+ J784S4_IOPAD(0x010, PIN_INPUT_PULLUP, 8) /* (AH33) MCAN13_RX.I2C4_SDA */
+ >;
+ };
};
&wkup_pmx2 {
+ bootph-all;
wkup_uart0_pins_default: wkup-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x070, PIN_INPUT, 0) /* (L37) WKUP_GPIO0_6.WKUP_UART0_CTSn */
J721S2_WKUP_IOPAD(0x074, PIN_INPUT, 0) /* (L36) WKUP_GPIO0_7.WKUP_UART0_RTSn */
@@ -299,6 +343,7 @@
};
wkup_i2c0_pins_default: wkup-i2c0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J721S2_WKUP_IOPAD(0x98, PIN_INPUT, 0) /* (N33) WKUP_I2C0_SCL */
J721S2_WKUP_IOPAD(0x9c, PIN_INPUT, 0) /* (N35) WKUP_I2C0_SDA */
@@ -306,6 +351,7 @@
};
mcu_uart0_pins_default: mcu-uart0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_WKUP_IOPAD(0x090, PIN_INPUT, 0) /* (H37) WKUP_GPIO0_14.MCU_UART0_CTSn */
J784S4_WKUP_IOPAD(0x094, PIN_OUTPUT, 0) /* (K37) WKUP_GPIO0_15.MCU_UART0_RTSn */
@@ -340,33 +386,46 @@
mcu_adc0_pins_default: mcu-adc0-default-pins {
pinctrl-single,pins = <
- J784S4_WKUP_IOPAD(0x134, PIN_INPUT, 0) /* (P36) MCU_ADC0_AIN0 */
- J784S4_WKUP_IOPAD(0x138, PIN_INPUT, 0) /* (V36) MCU_ADC0_AIN1 */
- J784S4_WKUP_IOPAD(0x13c, PIN_INPUT, 0) /* (T34) MCU_ADC0_AIN2 */
- J784S4_WKUP_IOPAD(0x140, PIN_INPUT, 0) /* (T36) MCU_ADC0_AIN3 */
- J784S4_WKUP_IOPAD(0x144, PIN_INPUT, 0) /* (P34) MCU_ADC0_AIN4 */
- J784S4_WKUP_IOPAD(0x148, PIN_INPUT, 0) /* (R37) MCU_ADC0_AIN5 */
- J784S4_WKUP_IOPAD(0x14c, PIN_INPUT, 0) /* (R33) MCU_ADC0_AIN6 */
- J784S4_WKUP_IOPAD(0x150, PIN_INPUT, 0) /* (V38) MCU_ADC0_AIN7 */
+ J784S4_WKUP_IOPAD(0x0cc, PIN_INPUT, 0) /* (P36) MCU_ADC0_AIN0 */
+ J784S4_WKUP_IOPAD(0x0d0, PIN_INPUT, 0) /* (V36) MCU_ADC0_AIN1 */
+ J784S4_WKUP_IOPAD(0x0d4, PIN_INPUT, 0) /* (T34) MCU_ADC0_AIN2 */
+ J784S4_WKUP_IOPAD(0x0d8, PIN_INPUT, 0) /* (T36) MCU_ADC0_AIN3 */
+ J784S4_WKUP_IOPAD(0x0dc, PIN_INPUT, 0) /* (P34) MCU_ADC0_AIN4 */
+ J784S4_WKUP_IOPAD(0x0e0, PIN_INPUT, 0) /* (R37) MCU_ADC0_AIN5 */
+ J784S4_WKUP_IOPAD(0x0e4, PIN_INPUT, 0) /* (R33) MCU_ADC0_AIN6 */
+ J784S4_WKUP_IOPAD(0x0e8, PIN_INPUT, 0) /* (V38) MCU_ADC0_AIN7 */
>;
};
mcu_adc1_pins_default: mcu-adc1-default-pins {
pinctrl-single,pins = <
- J784S4_WKUP_IOPAD(0x154, PIN_INPUT, 0) /* (Y38) MCU_ADC1_AIN0 */
- J784S4_WKUP_IOPAD(0x158, PIN_INPUT, 0) /* (Y34) MCU_ADC1_AIN1 */
- J784S4_WKUP_IOPAD(0x15c, PIN_INPUT, 0) /* (V34) MCU_ADC1_AIN2 */
- J784S4_WKUP_IOPAD(0x160, PIN_INPUT, 0) /* (W37) MCU_ADC1_AIN3 */
- J784S4_WKUP_IOPAD(0x164, PIN_INPUT, 0) /* (AA37) MCU_ADC1_AIN4 */
- J784S4_WKUP_IOPAD(0x168, PIN_INPUT, 0) /* (W33) MCU_ADC1_AIN5 */
- J784S4_WKUP_IOPAD(0x16c, PIN_INPUT, 0) /* (U33) MCU_ADC1_AIN6 */
- J784S4_WKUP_IOPAD(0x170, PIN_INPUT, 0) /* (Y36) MCU_ADC1_AIN7 */
+ J784S4_WKUP_IOPAD(0x0ec, PIN_INPUT, 0) /* (Y38) MCU_ADC1_AIN0 */
+ J784S4_WKUP_IOPAD(0x0f0, PIN_INPUT, 0) /* (Y34) MCU_ADC1_AIN1 */
+ J784S4_WKUP_IOPAD(0x0f4, PIN_INPUT, 0) /* (V34) MCU_ADC1_AIN2 */
+ J784S4_WKUP_IOPAD(0x0f8, PIN_INPUT, 0) /* (W37) MCU_ADC1_AIN3 */
+ J784S4_WKUP_IOPAD(0x0fc, PIN_INPUT, 0) /* (AA37) MCU_ADC1_AIN4 */
+ J784S4_WKUP_IOPAD(0x100, PIN_INPUT, 0) /* (W33) MCU_ADC1_AIN5 */
+ J784S4_WKUP_IOPAD(0x104, PIN_INPUT, 0) /* (U33) MCU_ADC1_AIN6 */
+ J784S4_WKUP_IOPAD(0x108, PIN_INPUT, 0) /* (Y36) MCU_ADC1_AIN7 */
+ >;
+ };
+};
+
+&wkup_pmx1 {
+ status = "okay";
+
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ /* (G33) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
+ J784S4_WKUP_IOPAD(0x028, PIN_INPUT, 7)
>;
};
};
&wkup_pmx0 {
+ bootph-all;
mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-default-pins {
+ bootph-all;
pinctrl-single,pins = <
J784S4_WKUP_IOPAD(0x000, PIN_OUTPUT, 0) /* (E32) MCU_OSPI0_CLK */
J784S4_WKUP_IOPAD(0x02c, PIN_OUTPUT, 0) /* (A32) MCU_OSPI0_CSn0 */
@@ -379,21 +438,31 @@
J784S4_WKUP_IOPAD(0x024, PIN_INPUT, 0) /* (E34) MCU_OSPI0_D6 */
J784S4_WKUP_IOPAD(0x028, PIN_INPUT, 0) /* (E33) MCU_OSPI0_D7 */
J784S4_WKUP_IOPAD(0x008, PIN_INPUT, 0) /* (C34) MCU_OSPI0_DQS */
- J784S4_WKUP_IOPAD(0x03c, PIN_OUTPUT, 6) /* (C32) MCU_OSPI0_CSn3.MCU_OSPI0_ECC_FAIL */
- J784S4_WKUP_IOPAD(0x038, PIN_OUTPUT, 6) /* (B34) MCU_OSPI0_CSn2.MCU_OSPI0_RESET_OUT0 */
+ >;
+ };
+};
+
+&wkup_pmx1 {
+ bootph-all;
+ mcu_fss0_ospi0_1_pins_default: mcu-fss0-ospi0-1-default-pins {
+ bootph-all;
+ pinctrl-single,pins = <
+ J784S4_WKUP_IOPAD(0x004, PIN_OUTPUT, 6) /* (C32) MCU_OSPI0_ECC_FAIL */
+ J784S4_WKUP_IOPAD(0x000, PIN_OUTPUT, 6) /* (B34) MCU_OSPI0_RESET_OUT0 */
>;
};
mcu_fss0_ospi1_pins_default: mcu-fss0-ospi1-default-pins {
+ bootph-all;
pinctrl-single,pins = <
- J784S4_WKUP_IOPAD(0x040, PIN_OUTPUT, 0) /* (F32) MCU_OSPI1_CLK */
- J784S4_WKUP_IOPAD(0x05c, PIN_OUTPUT, 0) /* (G32) MCU_OSPI1_CSn0 */
- J784S4_WKUP_IOPAD(0x04c, PIN_INPUT, 0) /* (E35) MCU_OSPI1_D0 */
- J784S4_WKUP_IOPAD(0x050, PIN_INPUT, 0) /* (D31) MCU_OSPI1_D1 */
- J784S4_WKUP_IOPAD(0x054, PIN_INPUT, 0) /* (G31) MCU_OSPI1_D2 */
- J784S4_WKUP_IOPAD(0x058, PIN_INPUT, 0) /* (F33) MCU_OSPI1_D3 */
- J784S4_WKUP_IOPAD(0x048, PIN_INPUT, 0) /* (F31) MCU_OSPI1_DQS */
- J784S4_WKUP_IOPAD(0x044, PIN_INPUT, 0) /* (C31) MCU_OSPI1_LBCLKO */
+ J784S4_WKUP_IOPAD(0x008, PIN_OUTPUT, 0) /* (F32) MCU_OSPI1_CLK */
+ J784S4_WKUP_IOPAD(0x024, PIN_OUTPUT, 0) /* (G32) MCU_OSPI1_CSn0 */
+ J784S4_WKUP_IOPAD(0x014, PIN_INPUT, 0) /* (E35) MCU_OSPI1_D0 */
+ J784S4_WKUP_IOPAD(0x018, PIN_INPUT, 0) /* (D31) MCU_OSPI1_D1 */
+ J784S4_WKUP_IOPAD(0x01C, PIN_INPUT, 0) /* (G31) MCU_OSPI1_D2 */
+ J784S4_WKUP_IOPAD(0x020, PIN_INPUT, 0) /* (F33) MCU_OSPI1_D3 */
+ J784S4_WKUP_IOPAD(0x010, PIN_INPUT, 0) /* (F31) MCU_OSPI1_DQS */
+ J784S4_WKUP_IOPAD(0x00C, PIN_INPUT, 0) /* (C31) MCU_OSPI1_LBCLKO */
>;
};
};
@@ -406,6 +475,7 @@
};
&wkup_i2c0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&wkup_i2c0_pins_default>;
@@ -416,30 +486,126 @@
compatible = "atmel,24c256";
reg = <0x50>;
};
+
+ tps659413: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,primary-pmic;
+ buck12-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka12: buck12 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka3: buck3 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcuio_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vds_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};
&mcu_uart0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_uart0_pins_default>;
};
&main_uart8 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart8_pins_default>;
};
+&ufs_wrapper {
+ status = "okay";
+};
+
&fss {
+ bootph-all;
status = "okay";
};
&ospi0 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
- pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
+ pinctrl-0 = <&mcu_fss0_ospi0_pins_default>, <&mcu_fss0_ospi0_1_pins_default>;
flash@0 {
+ bootph-all;
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <8>;
@@ -487,6 +653,7 @@
};
partition@3fc0000 {
+ bootph-all;
label = "ospi.phypattern";
reg = <0x3fc0000 0x40000>;
};
@@ -495,11 +662,13 @@
};
&ospi1 {
+ bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi1_pins_default>;
- flash@0{
+ flash@0 {
+ bootph-all;
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <1>;
@@ -547,6 +716,7 @@
};
partition@3fc0000 {
+ bootph-all;
label = "qspi.phypattern";
reg = <0x3fc0000 0x40000>;
};
@@ -591,6 +761,7 @@
};
&main_sdhci0 {
+ bootph-all;
/* eMMC */
status = "okay";
non-removable;
@@ -599,6 +770,7 @@
};
&main_sdhci1 {
+ bootph-all;
/* SD card */
status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
@@ -827,3 +999,85 @@
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
};
+
+&serdes_refclk {
+ status = "okay";
+ clock-frequency = <100000000>;
+};
+
+&dss {
+ status = "okay";
+ assigned-clocks = <&k3_clks 218 2>,
+ <&k3_clks 218 5>,
+ <&k3_clks 218 14>,
+ <&k3_clks 218 18>;
+ assigned-clock-parents = <&k3_clks 218 3>,
+ <&k3_clks 218 7>,
+ <&k3_clks 218 16>,
+ <&k3_clks 218 22>;
+};
+
+&serdes_wiz4 {
+ status = "okay";
+};
+
+&serdes4 {
+ status = "okay";
+ serdes4_dp_link: phy@0 {
+ reg = <0>;
+ cdns,num-lanes = <4>;
+ #phy-cells = <0>;
+ cdns,phy-type = <PHY_TYPE_DP>;
+ resets = <&serdes_wiz4 1>, <&serdes_wiz4 2>,
+ <&serdes_wiz4 3>, <&serdes_wiz4 4>;
+ };
+};
+
+&mhdp {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&dp0_pins_default>;
+ phys = <&serdes4_dp_link>;
+ phy-names = "dpphy";
+};
+
+&dss_ports {
+ /* DP */
+ port {
+ dpi0_out: endpoint {
+ remote-endpoint = <&dp0_in>;
+ };
+ };
+};
+
+&main_i2c4 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c4_pins_default>;
+ clock-frequency = <400000>;
+
+ exp4: gpio@20 {
+ compatible = "ti,tca6408";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+};
+
+&dp0_ports {
+ port@0 {
+ reg = <0>;
+
+ dp0_in: endpoint {
+ remote-endpoint = <&dpi0_out>;
+ };
+ };
+
+ port@4 {
+ reg = <4>;
+
+ dp0_out: endpoint {
+ remote-endpoint = <&dp0_connector_in>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-main.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-main.dtsi
index 2ea0adae6832..f2b720ed1e4f 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-main.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-main.dtsi
@@ -5,6 +5,21 @@
* Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include <dt-bindings/mux/mux.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/phy/phy-ti.h>
+
+#include "k3-serdes.h"
+
+/ {
+ serdes_refclk: clock-serdes {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ /* To be enabled when serdes_wiz* is functional */
+ status = "disabled";
+ };
+};
+
&cbass_main {
msmc_ram: sram@70000000 {
compatible = "mmio-sram";
@@ -26,6 +41,42 @@
};
};
+ scm_conf: bus@100000 {
+ compatible = "simple-bus";
+ reg = <0x00 0x00100000 0x00 0x1c000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x00 0x00 0x00100000 0x1c000>;
+
+ serdes_ln_ctrl: mux-controller@4080 {
+ compatible = "reg-mux";
+ reg = <0x00004080 0x30>;
+ #mux-control-cells = <1>;
+ mux-reg-masks = <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */
+ <0x4088 0x3>, <0x408c 0x3>, /* SERDES0 lane2/3 select */
+ <0x4090 0x3>, <0x4094 0x3>, /* SERDES1 lane0/1 select */
+ <0x4098 0x3>, <0x409c 0x3>, /* SERDES1 lane2/3 select */
+ <0x40a0 0x3>, <0x40a4 0x3>, /* SERDES2 lane0/1 select */
+ <0x40a8 0x3>, <0x40ac 0x3>; /* SERDES2 lane2/3 select */
+ idle-states = <J784S4_SERDES0_LANE0_PCIE1_LANE0>,
+ <J784S4_SERDES0_LANE1_PCIE1_LANE1>,
+ <J784S4_SERDES0_LANE2_IP3_UNUSED>,
+ <J784S4_SERDES0_LANE3_USB>,
+ <J784S4_SERDES1_LANE0_PCIE0_LANE0>,
+ <J784S4_SERDES1_LANE1_PCIE0_LANE1>,
+ <J784S4_SERDES1_LANE2_PCIE0_LANE2>,
+ <J784S4_SERDES1_LANE3_PCIE0_LANE3>,
+ <J784S4_SERDES2_LANE0_IP2_UNUSED>,
+ <J784S4_SERDES2_LANE1_IP2_UNUSED>,
+ <J784S4_SERDES2_LANE2_QSGMII_LANE1>,
+ <J784S4_SERDES2_LANE3_QSGMII_LANE2>,
+ <J784S4_SERDES4_LANE0_EDP_LANE0>,
+ <J784S4_SERDES4_LANE1_EDP_LANE1>,
+ <J784S4_SERDES4_LANE2_EDP_LANE2>,
+ <J784S4_SERDES4_LANE3_EDP_LANE3>;
+ };
+ };
+
gic500: interrupt-controller@1800000 {
compatible = "arm,gic-v3";
#address-cells = <2>;
@@ -60,7 +111,7 @@
#interrupt-cells = <1>;
ti,sci = <&sms>;
ti,sci-dev-id = <10>;
- ti,interrupt-ranges = <8 360 56>;
+ ti,interrupt-ranges = <8 392 56>;
};
main_pmx0: pinctrl@11c000 {
@@ -618,7 +669,7 @@
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&k3_pds 140 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 140 1>, <&k3_clks 140 2>;
- clock-names = "clk_ahb", "clk_xin";
+ clock-names = "clk_ahb", "clk_xin";
assigned-clocks = <&k3_clks 140 2>;
assigned-clock-parents = <&k3_clks 140 3>;
bus-width = <8>;
@@ -646,7 +697,7 @@
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&k3_pds 141 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 141 3>, <&k3_clks 141 4>;
- clock-names = "clk_ahb", "clk_xin";
+ clock-names = "clk_ahb", "clk_xin";
assigned-clocks = <&k3_clks 141 4>;
assigned-clock-parents = <&k3_clks 141 5>;
bus-width = <4>;
@@ -661,6 +712,7 @@
ti,itap-del-sel-sd-hs = <0x0>;
ti,itap-del-sel-sdr12 = <0x0>;
ti,itap-del-sel-sdr25 = <0x0>;
+ ti,itap-del-sel-ddr50 = <0x2>;
ti,clkbuf-sel = <0x7>;
ti,trm-icp = <0x8>;
dma-coherent;
@@ -669,7 +721,162 @@
status = "disabled";
};
+ serdes_wiz0: wiz@5060000 {
+ compatible = "ti,j784s4-wiz-10g";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ power-domains = <&k3_pds 404 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 404 2>, <&k3_clks 404 6>, <&serdes_refclk>, <&k3_clks 404 5>;
+ clock-names = "fck", "core_ref_clk", "ext_ref_clk", "core_ref1_clk";
+ assigned-clocks = <&k3_clks 404 6>;
+ assigned-clock-parents = <&k3_clks 404 10>;
+ num-lanes = <4>;
+ #reset-cells = <1>;
+ #clock-cells = <1>;
+ ranges = <0x5060000 0x00 0x5060000 0x10000>;
+ status = "disabled";
+
+ serdes0: serdes@5060000 {
+ compatible = "ti,j721e-serdes-10g";
+ reg = <0x05060000 0x010000>;
+ reg-names = "torrent_phy";
+ resets = <&serdes_wiz0 0>;
+ reset-names = "torrent_reset";
+ clocks = <&serdes_wiz0 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz0 TI_WIZ_PHY_EN_REFCLK>;
+ clock-names = "refclk", "phy_en_refclk";
+ assigned-clocks = <&serdes_wiz0 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz0 TI_WIZ_PLL1_REFCLK>,
+ <&serdes_wiz0 TI_WIZ_REFCLK_DIG>;
+ assigned-clock-parents = <&k3_clks 404 6>,
+ <&k3_clks 404 6>,
+ <&k3_clks 404 6>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #clock-cells = <1>;
+ status = "disabled";
+ };
+ };
+
+ serdes_wiz1: wiz@5070000 {
+ compatible = "ti,j784s4-wiz-10g";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ power-domains = <&k3_pds 405 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 405 2>, <&k3_clks 405 6>, <&serdes_refclk>, <&k3_clks 405 5>;
+ clock-names = "fck", "core_ref_clk", "ext_ref_clk", "core_ref1_clk";
+ assigned-clocks = <&k3_clks 405 6>;
+ assigned-clock-parents = <&k3_clks 405 10>;
+ num-lanes = <4>;
+ #reset-cells = <1>;
+ #clock-cells = <1>;
+ ranges = <0x05070000 0x00 0x05070000 0x10000>;
+ status = "disabled";
+
+ serdes1: serdes@5070000 {
+ compatible = "ti,j721e-serdes-10g";
+ reg = <0x05070000 0x010000>;
+ reg-names = "torrent_phy";
+ resets = <&serdes_wiz1 0>;
+ reset-names = "torrent_reset";
+ clocks = <&serdes_wiz1 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz1 TI_WIZ_PHY_EN_REFCLK>;
+ clock-names = "refclk", "phy_en_refclk";
+ assigned-clocks = <&serdes_wiz1 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz1 TI_WIZ_PLL1_REFCLK>,
+ <&serdes_wiz1 TI_WIZ_REFCLK_DIG>;
+ assigned-clock-parents = <&k3_clks 405 6>,
+ <&k3_clks 405 6>,
+ <&k3_clks 405 6>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #clock-cells = <1>;
+ status = "disabled";
+ };
+ };
+
+ serdes_wiz2: wiz@5020000 {
+ compatible = "ti,j784s4-wiz-10g";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ power-domains = <&k3_pds 406 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 406 2>, <&k3_clks 406 6>, <&serdes_refclk>, <&k3_clks 406 5>;
+ clock-names = "fck", "core_ref_clk", "ext_ref_clk", "core_ref1_clk";
+ assigned-clocks = <&k3_clks 406 6>;
+ assigned-clock-parents = <&k3_clks 406 10>;
+ num-lanes = <4>;
+ #reset-cells = <1>;
+ #clock-cells = <1>;
+ ranges = <0x05020000 0x00 0x05020000 0x10000>;
+ status = "disabled";
+
+ serdes2: serdes@5020000 {
+ compatible = "ti,j721e-serdes-10g";
+ reg = <0x05020000 0x010000>;
+ reg-names = "torrent_phy";
+ resets = <&serdes_wiz2 0>;
+ reset-names = "torrent_reset";
+ clocks = <&serdes_wiz2 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz2 TI_WIZ_PHY_EN_REFCLK>;
+ clock-names = "refclk", "phy_en_refclk";
+ assigned-clocks = <&serdes_wiz2 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz2 TI_WIZ_PLL1_REFCLK>,
+ <&serdes_wiz2 TI_WIZ_REFCLK_DIG>;
+ assigned-clock-parents = <&k3_clks 406 6>,
+ <&k3_clks 406 6>,
+ <&k3_clks 406 6>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #clock-cells = <1>;
+ status = "disabled";
+ };
+ };
+
+ serdes_wiz4: wiz@5050000 {
+ compatible = "ti,j784s4-wiz-10g";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ power-domains = <&k3_pds 407 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 407 2>, <&k3_clks 407 6>, <&serdes_refclk>, <&k3_clks 407 5>;
+ clock-names = "fck", "core_ref_clk", "ext_ref_clk", "core_ref1_clk";
+ assigned-clocks = <&k3_clks 407 6>;
+ assigned-clock-parents = <&k3_clks 407 10>;
+ num-lanes = <4>;
+ #reset-cells = <1>;
+ #clock-cells = <1>;
+ ranges = <0x05050000 0x00 0x05050000 0x10000>,
+ <0xa030a00 0x00 0xa030a00 0x40>; /* DPTX PHY */
+ status = "disabled";
+
+ serdes4: serdes@5050000 {
+ /*
+ * Note: we also map DPTX PHY registers as the Torrent
+ * needs to manage those.
+ */
+ compatible = "ti,j721e-serdes-10g";
+ reg = <0x05050000 0x010000>,
+ <0x0a030a00 0x40>; /* DPTX PHY */
+ reg-names = "torrent_phy";
+ resets = <&serdes_wiz4 0>;
+ reset-names = "torrent_reset";
+ clocks = <&serdes_wiz4 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz4 TI_WIZ_PHY_EN_REFCLK>;
+ clock-names = "refclk", "phy_en_refclk";
+ assigned-clocks = <&serdes_wiz4 TI_WIZ_PLL0_REFCLK>,
+ <&serdes_wiz4 TI_WIZ_PLL1_REFCLK>,
+ <&serdes_wiz4 TI_WIZ_REFCLK_DIG>;
+ assigned-clock-parents = <&k3_clks 407 6>,
+ <&k3_clks 407 6>,
+ <&k3_clks 407 6>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #clock-cells = <1>;
+ status = "disabled";
+ };
+ };
+
main_navss: bus@30000000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -702,9 +909,11 @@
ti,sci = <&sms>;
ti,sci-dev-id = <321>;
ti,interrupt-ranges = <0 0 256>;
+ ti,unmapped-event-sources = <&main_bcdma_csi>;
};
secure_proxy_main: mailbox@32c00000 {
+ bootph-all;
compatible = "ti,am654-secure-proxy";
#mbox-cells = <1>;
reg-names = "target_data", "rt", "scfg";
@@ -966,8 +1175,9 @@
reg = <0x00 0x3c000000 0x00 0x400000>,
<0x00 0x38000000 0x00 0x400000>,
<0x00 0x31120000 0x00 0x100>,
- <0x00 0x33000000 0x00 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ <0x00 0x33000000 0x00 0x40000>,
+ <0x00 0x31080000 0x00 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <1024>;
ti,sci-rm-range-gp-rings = <0x1>;
ti,sci = <&sms>;
@@ -979,8 +1189,12 @@
compatible = "ti,j721e-navss-main-udmap";
reg = <0x00 0x31150000 0x00 0x100>,
<0x00 0x34000000 0x00 0x80000>,
- <0x00 0x35000000 0x00 0x200000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ <0x00 0x35000000 0x00 0x200000>,
+ <0x00 0x30b00000 0x00 0x20000>,
+ <0x00 0x30c00000 0x00 0x8000>,
+ <0x00 0x30d00000 0x00 0x4000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -997,6 +1211,22 @@
ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
};
+ main_bcdma_csi: dma-controller@311a0000 {
+ compatible = "ti,j721s2-dmss-bcdma-csi";
+ reg = <0x00 0x311a0000 0x00 0x100>,
+ <0x00 0x35d00000 0x00 0x20000>,
+ <0x00 0x35c00000 0x00 0x10000>,
+ <0x00 0x35e00000 0x00 0x80000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
+ msi-parent = <&main_udmass_inta>;
+ #dma-cells = <3>;
+ ti,sci = <&sms>;
+ ti,sci-dev-id = <281>;
+ ti,sci-rm-range-rchan = <0x21>;
+ ti,sci-rm-range-tchan = <0x22>;
+ status = "disabled";
+ };
+
cpts@310d0000 {
compatible = "ti,j721e-cpts";
reg = <0x00 0x310d0000 0x00 0x400>;
@@ -1370,6 +1600,30 @@
status = "disabled";
};
+ ufs_wrapper: ufs-wrapper@4e80000 {
+ compatible = "ti,j721e-ufs";
+ reg = <0x00 0x4e80000 0x00 0x100>;
+ power-domains = <&k3_pds 387 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 387 3>;
+ assigned-clocks = <&k3_clks 387 3>;
+ assigned-clock-parents = <&k3_clks 387 6>;
+ ranges;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ status = "disabled";
+
+ ufs@4e84000 {
+ compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
+ reg = <0x00 0x4e84000 0x00 0x10000>;
+ interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+ freq-table-hz = <250000000 250000000>, <19200000 19200000>,
+ <19200000 19200000>;
+ clocks = <&k3_clks 387 1>, <&k3_clks 387 3>, <&k3_clks 387 3>;
+ clock-names = "core_clk", "phy_clk", "ref_clk";
+ dma-coherent;
+ };
+ };
+
main_r5fss0: r5fss@5c00000 {
compatible = "ti,j721s2-r5fss";
ti,cluster-mode = <1>;
@@ -1500,6 +1754,7 @@
ti,sci-proc-ids = <0x30 0xff>;
resets = <&k3_reset 30 1>;
firmware-name = "j784s4-c71_0-fw";
+ status = "disabled";
};
c71_1: dsp@65800000 {
@@ -1512,6 +1767,7 @@
ti,sci-proc-ids = <0x31 0xff>;
resets = <&k3_reset 33 1>;
firmware-name = "j784s4-c71_1-fw";
+ status = "disabled";
};
c71_2: dsp@66800000 {
@@ -1524,6 +1780,7 @@
ti,sci-proc-ids = <0x32 0xff>;
resets = <&k3_reset 37 1>;
firmware-name = "j784s4-c71_2-fw";
+ status = "disabled";
};
c71_3: dsp@67800000 {
@@ -1536,5 +1793,281 @@
ti,sci-proc-ids = <0x33 0xff>;
resets = <&k3_reset 40 1>;
firmware-name = "j784s4-c71_3-fw";
+ status = "disabled";
+ };
+
+ main_esm: esm@700000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x700000 0x00 0x1000>;
+ ti,esm-pins = <688>, <689>, <690>, <691>, <692>, <693>, <694>,
+ <695>;
+ bootph-pre-ram;
+ };
+
+ watchdog0: watchdog@2200000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2200000 0x00 0x100>;
+ clocks = <&k3_clks 348 1>;
+ power-domains = <&k3_pds 348 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 348 0>;
+ assigned-clock-parents = <&k3_clks 348 4>;
+ };
+
+ watchdog1: watchdog@2210000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2210000 0x00 0x100>;
+ clocks = <&k3_clks 349 1>;
+ power-domains = <&k3_pds 349 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 349 0>;
+ assigned-clock-parents = <&k3_clks 349 4>;
+ };
+
+ watchdog2: watchdog@2220000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2220000 0x00 0x100>;
+ clocks = <&k3_clks 350 1>;
+ power-domains = <&k3_pds 350 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 350 0>;
+ assigned-clock-parents = <&k3_clks 350 4>;
+ };
+
+ watchdog3: watchdog@2230000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2230000 0x00 0x100>;
+ clocks = <&k3_clks 351 1>;
+ power-domains = <&k3_pds 351 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 351 0>;
+ assigned-clock-parents = <&k3_clks 351 4>;
+ };
+
+ watchdog4: watchdog@2240000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2240000 0x00 0x100>;
+ clocks = <&k3_clks 352 1>;
+ power-domains = <&k3_pds 352 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 352 0>;
+ assigned-clock-parents = <&k3_clks 352 4>;
+ };
+
+ watchdog5: watchdog@2250000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2250000 0x00 0x100>;
+ clocks = <&k3_clks 353 1>;
+ power-domains = <&k3_pds 353 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 353 0>;
+ assigned-clock-parents = <&k3_clks 353 4>;
+ };
+
+ watchdog6: watchdog@2260000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2260000 0x00 0x100>;
+ clocks = <&k3_clks 354 1>;
+ power-domains = <&k3_pds 354 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 354 0>;
+ assigned-clock-parents = <&k3_clks 354 4>;
+ };
+
+ watchdog7: watchdog@2270000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2270000 0x00 0x100>;
+ clocks = <&k3_clks 355 1>;
+ power-domains = <&k3_pds 355 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 355 0>;
+ assigned-clock-parents = <&k3_clks 355 4>;
+ };
+
+ /*
+ * The following RTI instances are coupled with MCU R5Fs, c7x and
+ * GPU so keeping them reserved as these will be used by their
+ * respective firmware
+ */
+ watchdog8: watchdog@22f0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x22f0000 0x00 0x100>;
+ clocks = <&k3_clks 360 1>;
+ power-domains = <&k3_pds 360 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 360 0>;
+ assigned-clock-parents = <&k3_clks 360 4>;
+ /* reserved for GPU */
+ status = "reserved";
+ };
+
+ watchdog9: watchdog@2300000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2300000 0x00 0x100>;
+ clocks = <&k3_clks 356 1>;
+ power-domains = <&k3_pds 356 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 356 0>;
+ assigned-clock-parents = <&k3_clks 356 4>;
+ /* reserved for C7X_0 DSP */
+ status = "reserved";
+ };
+
+ watchdog10: watchdog@2310000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2310000 0x00 0x100>;
+ clocks = <&k3_clks 357 1>;
+ power-domains = <&k3_pds 357 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 357 0>;
+ assigned-clock-parents = <&k3_clks 357 4>;
+ /* reserved for C7X_1 DSP */
+ status = "reserved";
+ };
+
+ watchdog11: watchdog@2320000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2320000 0x00 0x100>;
+ clocks = <&k3_clks 358 1>;
+ power-domains = <&k3_pds 358 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 358 0>;
+ assigned-clock-parents = <&k3_clks 358 4>;
+ /* reserved for C7X_2 DSP */
+ status = "reserved";
+ };
+
+ watchdog12: watchdog@2330000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2330000 0x00 0x100>;
+ clocks = <&k3_clks 359 1>;
+ power-domains = <&k3_pds 359 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 359 0>;
+ assigned-clock-parents = <&k3_clks 359 4>;
+ /* reserved for C7X_3 DSP */
+ status = "reserved";
+ };
+
+ watchdog13: watchdog@23c0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23c0000 0x00 0x100>;
+ clocks = <&k3_clks 361 1>;
+ power-domains = <&k3_pds 361 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 361 0>;
+ assigned-clock-parents = <&k3_clks 361 4>;
+ /* reserved for MAIN_R5F0_0 */
+ status = "reserved";
+ };
+
+ watchdog14: watchdog@23d0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23d0000 0x00 0x100>;
+ clocks = <&k3_clks 362 1>;
+ power-domains = <&k3_pds 362 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 362 0>;
+ assigned-clock-parents = <&k3_clks 362 4>;
+ /* reserved for MAIN_R5F0_1 */
+ status = "reserved";
+ };
+
+ watchdog15: watchdog@23e0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23e0000 0x00 0x100>;
+ clocks = <&k3_clks 363 1>;
+ power-domains = <&k3_pds 363 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 363 0>;
+ assigned-clock-parents = <&k3_clks 363 4>;
+ /* reserved for MAIN_R5F1_0 */
+ status = "reserved";
+ };
+
+ watchdog16: watchdog@23f0000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x23f0000 0x00 0x100>;
+ clocks = <&k3_clks 364 1>;
+ power-domains = <&k3_pds 364 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 364 0>;
+ assigned-clock-parents = <&k3_clks 364 4>;
+ /* reserved for MAIN_R5F1_1 */
+ status = "reserved";
+ };
+
+ watchdog17: watchdog@2540000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2540000 0x00 0x100>;
+ clocks = <&k3_clks 365 1>;
+ power-domains = <&k3_pds 365 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 365 0>;
+ assigned-clock-parents = <&k3_clks 366 4>;
+ /* reserved for MAIN_R5F2_0 */
+ status = "reserved";
+ };
+
+ watchdog18: watchdog@2550000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x2550000 0x00 0x100>;
+ clocks = <&k3_clks 366 1>;
+ power-domains = <&k3_pds 366 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 366 0>;
+ assigned-clock-parents = <&k3_clks 366 4>;
+ /* reserved for MAIN_R5F2_1 */
+ status = "reserved";
+ };
+
+ mhdp: bridge@a000000 {
+ compatible = "ti,j721e-mhdp8546";
+ reg = <0x0 0xa000000 0x0 0x30a00>,
+ <0x0 0x4f40000 0x0 0x20>;
+ reg-names = "mhdptx", "j721e-intg";
+ clocks = <&k3_clks 217 11>;
+ interrupt-parent = <&gic500>;
+ interrupts = <GIC_SPI 614 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&k3_pds 217 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+
+ dp0_ports: ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ /* Remote-endpoints are on the boards so
+ * ports are defined in the platform dt file.
+ */
+ };
+ };
+
+ dss: dss@4a00000 {
+ compatible = "ti,j721e-dss";
+ reg = <0x00 0x04a00000 0x00 0x10000>, /* common_m */
+ <0x00 0x04a10000 0x00 0x10000>, /* common_s0*/
+ <0x00 0x04b00000 0x00 0x10000>, /* common_s1*/
+ <0x00 0x04b10000 0x00 0x10000>, /* common_s2*/
+ <0x00 0x04a20000 0x00 0x10000>, /* vidl1 */
+ <0x00 0x04a30000 0x00 0x10000>, /* vidl2 */
+ <0x00 0x04a50000 0x00 0x10000>, /* vid1 */
+ <0x00 0x04a60000 0x00 0x10000>, /* vid2 */
+ <0x00 0x04a70000 0x00 0x10000>, /* ovr1 */
+ <0x00 0x04a90000 0x00 0x10000>, /* ovr2 */
+ <0x00 0x04ab0000 0x00 0x10000>, /* ovr3 */
+ <0x00 0x04ad0000 0x00 0x10000>, /* ovr4 */
+ <0x00 0x04a80000 0x00 0x10000>, /* vp1 */
+ <0x00 0x04aa0000 0x00 0x10000>, /* vp1 */
+ <0x00 0x04ac0000 0x00 0x10000>, /* vp1 */
+ <0x00 0x04ae0000 0x00 0x10000>, /* vp4 */
+ <0x00 0x04af0000 0x00 0x10000>; /* wb */
+ reg-names = "common_m", "common_s0",
+ "common_s1", "common_s2",
+ "vidl1", "vidl2","vid1","vid2",
+ "ovr1", "ovr2", "ovr3", "ovr4",
+ "vp1", "vp2", "vp3", "vp4",
+ "wb";
+ clocks = <&k3_clks 218 0>,
+ <&k3_clks 218 2>,
+ <&k3_clks 218 5>,
+ <&k3_clks 218 14>,
+ <&k3_clks 218 18>;
+ clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
+ power-domains = <&k3_pds 218 TI_SCI_PD_EXCLUSIVE>;
+ interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "common_m",
+ "common_s0",
+ "common_s1",
+ "common_s2";
+ status = "disabled";
+
+ dss_ports: ports {
+ /* Ports that DSS drives are platform specific
+ * so they are defined in platform dt file.
+ */
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-mcu-wakeup.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-mcu-wakeup.dtsi
index 657fb1d72512..3902a921d7e5 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-mcu-wakeup.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4-mcu-wakeup.dtsi
@@ -7,6 +7,7 @@
&cbass_mcu_wakeup {
sms: system-controller@44083000 {
+ bootph-all;
compatible = "ti,k2g-sci";
ti,host-id = <12>;
@@ -19,24 +20,36 @@
reg = <0x00 0x44083000 0x00 0x1000>;
k3_pds: power-controller {
+ bootph-all;
compatible = "ti,sci-pm-domain";
#power-domain-cells = <2>;
};
k3_clks: clock-controller {
+ bootph-all;
compatible = "ti,k2g-sci-clk";
#clock-cells = <2>;
};
k3_reset: reset-controller {
+ bootph-all;
compatible = "ti,sci-reset";
#reset-cells = <2>;
};
};
- chipid@43000014 {
- compatible = "ti,am654-chipid";
- reg = <0x00 0x43000014 0x00 0x4>;
+ wkup_conf: bus@43000000 {
+ bootph-all;
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x00 0x43000000 0x20000>;
+
+ chipid: chipid@14 {
+ bootph-all;
+ compatible = "ti,am654-chipid";
+ reg = <0x14 0x4>;
+ };
};
secure_proxy_sa3: mailbox@43600000 {
@@ -107,7 +120,7 @@
#interrupt-cells = <1>;
ti,sci = <&sms>;
ti,sci-dev-id = <177>;
- ti,interrupt-ranges = <16 928 16>;
+ ti,interrupt-ranges = <16 960 16>;
};
/* MCU_TIMERIO pad input CTRLMMR_MCU_TIMER*_CTRL registers */
@@ -161,6 +174,7 @@
};
mcu_timer1: timer@40410000 {
+ bootph-all;
compatible = "ti,am654-timer";
reg = <0x00 0x40410000 0x00 0x400>;
interrupts = <GIC_SPI 817 IRQ_TYPE_LEVEL_HIGH>;
@@ -441,7 +455,8 @@
status = "disabled";
};
- mcu_navss: bus@28380000{
+ mcu_navss: bus@28380000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -451,12 +466,14 @@
dma-ranges;
mcu_ringacc: ringacc@2b800000 {
+ bootph-all;
compatible = "ti,am654-navss-ringacc";
reg = <0x00 0x2b800000 0x00 0x400000>,
<0x00 0x2b000000 0x00 0x400000>,
<0x00 0x28590000 0x00 0x100>,
- <0x00 0x2a500000 0x00 0x40000>;
- reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+ <0x00 0x2a500000 0x00 0x40000>,
+ <0x00 0x28440000 0x00 0x40000>;
+ reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
ti,num-rings = <286>;
ti,sci-rm-range-gp-rings = <0x1>;
ti,sci = <&sms>;
@@ -465,11 +482,16 @@
};
mcu_udmap: dma-controller@285c0000 {
+ bootph-all;
compatible = "ti,j721e-navss-mcu-udmap";
reg = <0x00 0x285c0000 0x00 0x100>,
<0x00 0x2a800000 0x00 0x40000>,
- <0x00 0x2aa00000 0x00 0x40000>;
- reg-names = "gcfg", "rchanrt", "tchanrt";
+ <0x00 0x2aa00000 0x00 0x40000>,
+ <0x00 0x284a0000 0x00 0x4000>,
+ <0x00 0x284c0000 0x00 0x4000>,
+ <0x00 0x28400000 0x00 0x2000>;
+ reg-names = "gcfg", "rchanrt", "tchanrt",
+ "tchan", "rchan", "rflow";
msi-parent = <&main_udmass_inta>;
#dma-cells = <1>;
@@ -690,4 +712,44 @@
status = "disabled";
};
};
+
+ mcu_esm: esm@40800000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x40800000 0x00 0x1000>;
+ ti,esm-pins = <95>;
+ bootph-pre-ram;
+ };
+
+ wkup_esm: esm@42080000 {
+ compatible = "ti,j721e-esm";
+ reg = <0x00 0x42080000 0x00 0x1000>;
+ ti,esm-pins = <63>;
+ bootph-pre-ram;
+ };
+
+ /*
+ * The 2 RTI instances are couple with MCU R5Fs so keeping them
+ * reserved as these will be used by their respective firmware
+ */
+ mcu_watchdog0: watchdog@40600000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x40600000 0x00 0x100>;
+ clocks = <&k3_clks 367 1>;
+ power-domains = <&k3_pds 367 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 367 0>;
+ assigned-clock-parents = <&k3_clks 367 4>;
+ /* reserved for MCU_R5F0_0 */
+ status = "reserved";
+ };
+
+ mcu_watchdog1: watchdog@40610000 {
+ compatible = "ti,j7-rti-wdt";
+ reg = <0x00 0x40610000 0x00 0x100>;
+ clocks = <&k3_clks 368 1>;
+ power-domains = <&k3_pds 368 TI_SCI_PD_EXCLUSIVE>;
+ assigned-clocks = <&k3_clks 368 0>;
+ assigned-clock-parents = <&k3_clks 368 4>;
+ /* reserved for MCU_R5F0_1 */
+ status = "reserved";
+ };
};
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4.dtsi b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4.dtsi
index 8b5974d92e33..4398c3a463e1 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-j784s4.dtsi
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-j784s4.dtsi
@@ -228,6 +228,7 @@
};
cbass_main: bus@100000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
@@ -263,6 +264,7 @@
<0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>;
cbass_mcu_wakeup: bus@28380000 {
+ bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-pinctrl.h b/sys/contrib/device-tree/src/arm64/ti/k3-pinctrl.h
index c97548a3f42d..2a4e0e084d69 100644
--- a/sys/contrib/device-tree/src/arm64/ti/k3-pinctrl.h
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-pinctrl.h
@@ -11,6 +11,7 @@
#define PULLUDEN_SHIFT (16)
#define PULLTYPESEL_SHIFT (17)
#define RXACTIVE_SHIFT (18)
+#define DEBOUNCE_SHIFT (11)
#define PULL_DISABLE (1 << PULLUDEN_SHIFT)
#define PULL_ENABLE (0 << PULLUDEN_SHIFT)
@@ -29,9 +30,20 @@
#define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
#define PIN_INPUT_PULLDOWN (INPUT_EN | PULL_DOWN)
+#define PIN_DEBOUNCE_DISABLE (0 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF1 (1 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF2 (2 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF3 (3 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF4 (4 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF5 (5 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF6 (6 << DEBOUNCE_SHIFT)
+
#define AM62AX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
#define AM62AX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
+#define AM62PX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
+#define AM62PX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
+
#define AM62X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
#define AM62X_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
diff --git a/sys/contrib/device-tree/src/arm64/ti/k3-serdes.h b/sys/contrib/device-tree/src/arm64/ti/k3-serdes.h
new file mode 100644
index 000000000000..21b4886c47ba
--- /dev/null
+++ b/sys/contrib/device-tree/src/arm64/ti/k3-serdes.h
@@ -0,0 +1,204 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This header provides constants for SERDES MUX for TI SoCs
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef DTS_ARM64_TI_K3_SERDES_H
+#define DTS_ARM64_TI_K3_SERDES_H
+
+/* J721E */
+
+#define J721E_SERDES0_LANE0_QSGMII_LANE1 0x0
+#define J721E_SERDES0_LANE0_PCIE0_LANE0 0x1
+#define J721E_SERDES0_LANE0_USB3_0_SWAP 0x2
+#define J721E_SERDES0_LANE0_IP4_UNUSED 0x3
+
+#define J721E_SERDES0_LANE1_QSGMII_LANE2 0x0
+#define J721E_SERDES0_LANE1_PCIE0_LANE1 0x1
+#define J721E_SERDES0_LANE1_USB3_0 0x2
+#define J721E_SERDES0_LANE1_IP4_UNUSED 0x3
+
+#define J721E_SERDES1_LANE0_QSGMII_LANE3 0x0
+#define J721E_SERDES1_LANE0_PCIE1_LANE0 0x1
+#define J721E_SERDES1_LANE0_USB3_1_SWAP 0x2
+#define J721E_SERDES1_LANE0_SGMII_LANE0 0x3
+
+#define J721E_SERDES1_LANE1_QSGMII_LANE4 0x0
+#define J721E_SERDES1_LANE1_PCIE1_LANE1 0x1
+#define J721E_SERDES1_LANE1_USB3_1 0x2
+#define J721E_SERDES1_LANE1_SGMII_LANE1 0x3
+
+#define J721E_SERDES2_LANE0_IP1_UNUSED 0x0
+#define J721E_SERDES2_LANE0_PCIE2_LANE0 0x1
+#define J721E_SERDES2_LANE0_USB3_1_SWAP 0x2
+#define J721E_SERDES2_LANE0_SGMII_LANE0 0x3
+
+#define J721E_SERDES2_LANE1_IP1_UNUSED 0x0
+#define J721E_SERDES2_LANE1_PCIE2_LANE1 0x1
+#define J721E_SERDES2_LANE1_USB3_1 0x2
+#define J721E_SERDES2_LANE1_SGMII_LANE1 0x3
+
+#define J721E_SERDES3_LANE0_IP1_UNUSED 0x0
+#define J721E_SERDES3_LANE0_PCIE3_LANE0 0x1
+#define J721E_SERDES3_LANE0_USB3_0_SWAP 0x2
+#define J721E_SERDES3_LANE0_IP4_UNUSED 0x3
+
+#define J721E_SERDES3_LANE1_IP1_UNUSED 0x0
+#define J721E_SERDES3_LANE1_PCIE3_LANE1 0x1
+#define J721E_SERDES3_LANE1_USB3_0 0x2
+#define J721E_SERDES3_LANE1_IP4_UNUSED 0x3
+
+#define J721E_SERDES4_LANE0_EDP_LANE0 0x0
+#define J721E_SERDES4_LANE0_IP2_UNUSED 0x1
+#define J721E_SERDES4_LANE0_QSGMII_LANE5 0x2
+#define J721E_SERDES4_LANE0_IP4_UNUSED 0x3
+
+#define J721E_SERDES4_LANE1_EDP_LANE1 0x0
+#define J721E_SERDES4_LANE1_IP2_UNUSED 0x1
+#define J721E_SERDES4_LANE1_QSGMII_LANE6 0x2
+#define J721E_SERDES4_LANE1_IP4_UNUSED 0x3
+
+#define J721E_SERDES4_LANE2_EDP_LANE2 0x0
+#define J721E_SERDES4_LANE2_IP2_UNUSED 0x1
+#define J721E_SERDES4_LANE2_QSGMII_LANE7 0x2
+#define J721E_SERDES4_LANE2_IP4_UNUSED 0x3
+
+#define J721E_SERDES4_LANE3_EDP_LANE3 0x0
+#define J721E_SERDES4_LANE3_IP2_UNUSED 0x1
+#define J721E_SERDES4_LANE3_QSGMII_LANE8 0x2
+#define J721E_SERDES4_LANE3_IP4_UNUSED 0x3
+
+/* J7200 */
+
+#define J7200_SERDES0_LANE0_QSGMII_LANE3 0x0
+#define J7200_SERDES0_LANE0_PCIE1_LANE0 0x1
+#define J7200_SERDES0_LANE0_IP3_UNUSED 0x2
+#define J7200_SERDES0_LANE0_IP4_UNUSED 0x3
+
+#define J7200_SERDES0_LANE1_QSGMII_LANE4 0x0
+#define J7200_SERDES0_LANE1_PCIE1_LANE1 0x1
+#define J7200_SERDES0_LANE1_IP3_UNUSED 0x2
+#define J7200_SERDES0_LANE1_IP4_UNUSED 0x3
+
+#define J7200_SERDES0_LANE2_QSGMII_LANE1 0x0
+#define J7200_SERDES0_LANE2_PCIE1_LANE2 0x1
+#define J7200_SERDES0_LANE2_IP3_UNUSED 0x2
+#define J7200_SERDES0_LANE2_IP4_UNUSED 0x3
+
+#define J7200_SERDES0_LANE3_QSGMII_LANE2 0x0
+#define J7200_SERDES0_LANE3_PCIE1_LANE3 0x1
+#define J7200_SERDES0_LANE3_USB 0x2
+#define J7200_SERDES0_LANE3_IP4_UNUSED 0x3
+
+/* AM64 */
+
+#define AM64_SERDES0_LANE0_PCIE0 0x0
+#define AM64_SERDES0_LANE0_USB 0x1
+
+/* J721S2 */
+
+#define J721S2_SERDES0_LANE0_EDP_LANE0 0x0
+#define J721S2_SERDES0_LANE0_PCIE1_LANE0 0x1
+#define J721S2_SERDES0_LANE0_IP3_UNUSED 0x2
+#define J721S2_SERDES0_LANE0_IP4_UNUSED 0x3
+
+#define J721S2_SERDES0_LANE1_EDP_LANE1 0x0
+#define J721S2_SERDES0_LANE1_PCIE1_LANE1 0x1
+#define J721S2_SERDES0_LANE1_USB 0x2
+#define J721S2_SERDES0_LANE1_IP4_UNUSED 0x3
+
+#define J721S2_SERDES0_LANE2_EDP_LANE2 0x0
+#define J721S2_SERDES0_LANE2_PCIE1_LANE2 0x1
+#define J721S2_SERDES0_LANE2_USB_SWAP 0x2
+#define J721S2_SERDES0_LANE2_IP4_UNUSED 0x3
+
+#define J721S2_SERDES0_LANE3_EDP_LANE3 0x0
+#define J721S2_SERDES0_LANE3_PCIE1_LANE3 0x1
+#define J721S2_SERDES0_LANE3_USB 0x2
+#define J721S2_SERDES0_LANE3_IP4_UNUSED 0x3
+
+/* J784S4 */
+
+#define J784S4_SERDES0_LANE0_IP1_UNUSED 0x0
+#define J784S4_SERDES0_LANE0_PCIE1_LANE0 0x1
+#define J784S4_SERDES0_LANE0_IP3_UNUSED 0x2
+#define J784S4_SERDES0_LANE0_IP4_UNUSED 0x3
+
+#define J784S4_SERDES0_LANE1_IP1_UNUSED 0x0
+#define J784S4_SERDES0_LANE1_PCIE1_LANE1 0x1
+#define J784S4_SERDES0_LANE1_IP3_UNUSED 0x2
+#define J784S4_SERDES0_LANE1_IP4_UNUSED 0x3
+
+#define J784S4_SERDES0_LANE2_PCIE3_LANE0 0x0
+#define J784S4_SERDES0_LANE2_PCIE1_LANE2 0x1
+#define J784S4_SERDES0_LANE2_IP3_UNUSED 0x2
+#define J784S4_SERDES0_LANE2_IP4_UNUSED 0x3
+
+#define J784S4_SERDES0_LANE3_PCIE3_LANE1 0x0
+#define J784S4_SERDES0_LANE3_PCIE1_LANE3 0x1
+#define J784S4_SERDES0_LANE3_USB 0x2
+#define J784S4_SERDES0_LANE3_IP4_UNUSED 0x3
+
+#define J784S4_SERDES1_LANE0_QSGMII_LANE3 0x0
+#define J784S4_SERDES1_LANE0_PCIE0_LANE0 0x1
+#define J784S4_SERDES1_LANE0_IP3_UNUSED 0x2
+#define J784S4_SERDES1_LANE0_IP4_UNUSED 0x3
+
+#define J784S4_SERDES1_LANE1_QSGMII_LANE4 0x0
+#define J784S4_SERDES1_LANE1_PCIE0_LANE1 0x1
+#define J784S4_SERDES1_LANE1_IP3_UNUSED 0x2
+#define J784S4_SERDES1_LANE1_IP4_UNUSED 0x3
+
+#define J784S4_SERDES1_LANE2_QSGMII_LANE1 0x0
+#define J784S4_SERDES1_LANE2_PCIE0_LANE2 0x1
+#define J784S4_SERDES1_LANE2_PCIE2_LANE0 0x2
+#define J784S4_SERDES1_LANE2_IP4_UNUSED 0x3
+
+#define J784S4_SERDES1_LANE3_QSGMII_LANE2 0x0
+#define J784S4_SERDES1_LANE3_PCIE0_LANE3 0x1
+#define J784S4_SERDES1_LANE3_PCIE2_LANE1 0x2
+#define J784S4_SERDES1_LANE3_IP4_UNUSED 0x3
+
+#define J784S4_SERDES2_LANE0_QSGMII_LANE5 0x0
+#define J784S4_SERDES2_LANE0_IP2_UNUSED 0x1
+#define J784S4_SERDES2_LANE0_IP3_UNUSED 0x2
+#define J784S4_SERDES2_LANE0_IP4_UNUSED 0x3
+
+#define J784S4_SERDES2_LANE1_QSGMII_LANE6 0x0
+#define J784S4_SERDES2_LANE1_IP2_UNUSED 0x1
+#define J784S4_SERDES2_LANE1_IP3_UNUSED 0x2
+#define J784S4_SERDES2_LANE1_IP4_UNUSED 0x3
+
+#define J784S4_SERDES2_LANE2_QSGMII_LANE7 0x0
+#define J784S4_SERDES2_LANE2_QSGMII_LANE1 0x1
+#define J784S4_SERDES2_LANE2_IP3_UNUSED 0x2
+#define J784S4_SERDES2_LANE2_IP4_UNUSED 0x3
+
+#define J784S4_SERDES2_LANE3_QSGMII_LANE8 0x0
+#define J784S4_SERDES2_LANE3_QSGMII_LANE2 0x1
+#define J784S4_SERDES2_LANE3_IP3_UNUSED 0x2
+#define J784S4_SERDES2_LANE3_IP4_UNUSED 0x3
+
+#define J784S4_SERDES4_LANE0_EDP_LANE0 0x0
+#define J784S4_SERDES4_LANE0_QSGMII_LANE5 0x1
+#define J784S4_SERDES4_LANE0_IP3_UNUSED 0x2
+#define J784S4_SERDES4_LANE0_IP4_UNUSED 0x3
+
+#define J784S4_SERDES4_LANE1_EDP_LANE1 0x0
+#define J784S4_SERDES4_LANE1_QSGMII_LANE6 0x1
+#define J784S4_SERDES4_LANE1_IP3_UNUSED 0x2
+#define J784S4_SERDES4_LANE1_IP4_UNUSED 0x3
+
+#define J784S4_SERDES4_LANE2_EDP_LANE2 0x0
+#define J784S4_SERDES4_LANE2_QSGMII_LANE7 0x1
+#define J784S4_SERDES4_LANE2_IP3_UNUSED 0x2
+#define J784S4_SERDES4_LANE2_IP4_UNUSED 0x3
+
+#define J784S4_SERDES4_LANE3_EDP_LANE3 0x0
+#define J784S4_SERDES4_LANE3_QSGMII_LANE8 0x1
+#define J784S4_SERDES4_LANE3_USB 0x2
+#define J784S4_SERDES4_LANE3_IP4_UNUSED 0x3
+
+#endif /* DTS_ARM64_TI_K3_SERDES_H */
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-clk-ccf.dtsi b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-clk-ccf.dtsi
index f04716841a0c..ccaca29200bb 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-clk-ccf.dtsi
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-clk-ccf.dtsi
@@ -146,24 +146,28 @@
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM0_REF>,
<&zynqmp_clk GEM0_TX>, <&zynqmp_clk GEM0_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gem1 {
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM1_REF>,
<&zynqmp_clk GEM1_TX>, <&zynqmp_clk GEM1_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gem2 {
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM2_REF>,
<&zynqmp_clk GEM2_TX>, <&zynqmp_clk GEM2_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gem3 {
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM3_REF>,
<&zynqmp_clk GEM3_TX>, <&zynqmp_clk GEM3_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gpio {
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revA.dtso b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revA.dtso
index 603839c82599..92f4190d564d 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revA.dtso
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revA.dtso
@@ -21,57 +21,57 @@
/dts-v1/;
/plugin/;
-&i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default", "gpio";
- pinctrl-0 = <&pinctrl_i2c1_default>;
- pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
-
- /* u14 - 0x40 - ina260 */
- /* u27 - 0xe0 - STDP4320 DP/HDMI splitter */
-};
-
-&amba {
- si5332_0: si5332_0 { /* u17 */
+&{/} {
+ si5332_0: si5332-0 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <125000000>;
};
- si5332_1: si5332_1 { /* u17 */
+ si5332_1: si5332-1 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <25000000>;
};
- si5332_2: si5332_2 { /* u17 */
+ si5332_2: si5332-2 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <48000000>;
};
- si5332_3: si5332_3 { /* u17 */
+ si5332_3: si5332-3 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
};
- si5332_4: si5332_4 { /* u17 */
+ si5332_4: si5332-4 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <26000000>;
};
- si5332_5: si5332_5 { /* u17 */
+ si5332_5: si5332-5 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
};
};
+&i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&pinctrl_i2c1_default>;
+ pinctrl-1 = <&pinctrl_i2c1_gpio>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+
+ /* u14 - 0x40 - ina260 */
+ /* u27 - 0xe0 - STDP4320 DP/HDMI splitter */
+};
+
/* DP/USB 3.0 and SATA */
&psgtr {
status = "okay";
@@ -145,6 +145,7 @@
pinctrl-0 = <&pinctrl_gem3_default>;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
+ assigned-clock-rates = <250000000>;
mdio: mdio {
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revB.dtso b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revB.dtso
index a91d09e7da4b..f88b71f5b07a 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revB.dtso
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sck-kv-g-revB.dtso
@@ -16,58 +16,58 @@
/dts-v1/;
/plugin/;
-&i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default", "gpio";
- pinctrl-0 = <&pinctrl_i2c1_default>;
- pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
-
- /* u14 - 0x40 - ina260 */
- /* u43 - 0x2d - usb5744 */
- /* u27 - 0xe0 - STDP4320 DP/HDMI splitter */
-};
-
-&amba {
- si5332_0: si5332_0 { /* u17 */
+&{/} {
+ si5332_0: si5332-0 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <125000000>;
};
- si5332_1: si5332_1 { /* u17 */
+ si5332_1: si5332-1 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <25000000>;
};
- si5332_2: si5332_2 { /* u17 */
+ si5332_2: si5332-2 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <48000000>;
};
- si5332_3: si5332_3 { /* u17 */
+ si5332_3: si5332-3 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
};
- si5332_4: si5332_4 { /* u17 */
+ si5332_4: si5332-4 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <26000000>;
};
- si5332_5: si5332_5 { /* u17 */
+ si5332_5: si5332-5 { /* u17 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
};
};
+&i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&pinctrl_i2c1_default>;
+ pinctrl-1 = <&pinctrl_i2c1_gpio>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+
+ /* u14 - 0x40 - ina260 */
+ /* u43 - 0x2d - usb5744 */
+ /* u27 - 0xe0 - STDP4320 DP/HDMI splitter */
+};
+
/* DP/USB 3.0 */
&psgtr {
status = "okay";
@@ -128,6 +128,7 @@
pinctrl-0 = <&pinctrl_gem3_default>;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
+ assigned-clock-rates = <250000000>;
mdio: mdio {
#address-cells = <1>;
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sm-k26-revA.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sm-k26-revA.dts
index dfd1a18f5a10..51622896b1b1 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sm-k26-revA.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-sm-k26-revA.dts
@@ -50,6 +50,17 @@
reg = <0x0 0x0 0x0 0x80000000>, <0x8 0x00000000 0x0 0x80000000>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ pmu_region: pmu@7ff00000 {
+ reg = <0x0 0x7ff00000 0x0 0x100000>;
+ no-map;
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
autorepeat;
@@ -120,9 +131,7 @@
&qspi { /* MIO 0-5 - U143 */
status = "okay";
spi_flash: flash@0 { /* MT25QU512A */
- compatible = "mt25qu512a", "jedec,spi-nor"; /* 64MB */
- #address-cells = <1>;
- #size-cells = <1>;
+ compatible = "jedec,spi-nor"; /* 64MB */
reg = <0>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
@@ -211,9 +220,9 @@
label = "Secure OS Storage";
reg = <0x2280000 0x20000>; /* 128KB */
};
- partition@22A0000 {
+ partition@22a0000 {
label = "User";
- reg = <0x22A0000 0x1d60000>; /* 29.375 MB */
+ reg = <0x22a0000 0x1d60000>; /* 29.375 MB */
};
};
};
@@ -245,8 +254,8 @@
status = "okay";
bootph-all;
clock-frequency = <400000>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
eeprom: eeprom@50 { /* u46 - also at address 0x58 */
bootph-all;
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm015-dc1.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm015-dc1.dts
index d9d1de5f313c..73491626e01e 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm015-dc1.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm015-dc1.dts
@@ -98,8 +98,12 @@
phy-mode = "rgmii-id";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gem3_default>;
- phy0: ethernet-phy@0 {
- reg = <0>;
+ mdio: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
};
};
@@ -119,8 +123,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 36 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 37 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
eeprom: eeprom@55 {
compatible = "atmel,24c64"; /* 24AA64 */
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm016-dc2.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm016-dc2.dts
index 6503f4985f8d..f767708fb50d 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm016-dc2.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm016-dc2.dts
@@ -91,12 +91,16 @@
phy-mode = "rgmii-id";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gem2_default>;
- phy0: ethernet-phy@5 {
- reg = <5>;
- ti,rx-internal-delay = <0x8>;
- ti,tx-internal-delay = <0xa>;
- ti,fifo-depth = <0x1>;
- ti,dp83867-rxctrl-strap-quirk;
+ mdio: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy0: ethernet-phy@5 {
+ reg = <5>;
+ ti,rx-internal-delay = <0x8>;
+ ti,tx-internal-delay = <0xa>;
+ ti,fifo-depth = <0x1>;
+ ti,dp83867-rxctrl-strap-quirk;
+ };
};
};
@@ -110,8 +114,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u26: gpio@20 {
compatible = "ti,tca6416";
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm017-dc3.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm017-dc3.dts
index 38b0a312171b..f553b317e6b2 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm017-dc3.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm017-dc3.dts
@@ -88,8 +88,12 @@
status = "okay";
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
- phy0: ethernet-phy@0 { /* VSC8211 */
- reg = <0>;
+ mdio: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy0: ethernet-phy@0 { /* VSC8211 */
+ reg = <0>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm018-dc4.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm018-dc4.dts
index 6636e76545a5..6ec1d9813973 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm018-dc4.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm018-dc4.dts
@@ -116,17 +116,21 @@
status = "okay";
phy-mode = "rgmii-id";
phy-handle = <&ethernet_phy0>;
- ethernet_phy0: ethernet-phy@0 { /* Marvell 88e1512 */
- reg = <0>;
- };
- ethernet_phy7: ethernet-phy@7 { /* Vitesse VSC8211 */
- reg = <7>;
- };
- ethernet_phy3: ethernet-phy@3 { /* Realtek RTL8211DN */
- reg = <3>;
- };
- ethernet_phy8: ethernet-phy@8 { /* Vitesse VSC8211 */
- reg = <8>;
+ mdio: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ethernet_phy0: ethernet-phy@0 { /* Marvell 88e1512 */
+ reg = <0>;
+ };
+ ethernet_phy7: ethernet-phy@7 { /* Vitesse VSC8211 */
+ reg = <7>;
+ };
+ ethernet_phy3: ethernet-phy@3 { /* Realtek RTL8211DN */
+ reg = <3>;
+ };
+ ethernet_phy8: ethernet-phy@8 { /* Vitesse VSC8211 */
+ reg = <8>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm019-dc5.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm019-dc5.dts
index b1e933b8a2cd..b1857e17ab7e 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm019-dc5.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zc1751-xm019-dc5.dts
@@ -77,8 +77,12 @@
phy-mode = "rgmii-id";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gem1_default>;
- phy0: ethernet-phy@0 {
- reg = <0>;
+ mdio: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
};
};
@@ -91,8 +95,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 74 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 75 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 74 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 75 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&i2c1 {
@@ -100,8 +104,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 76 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 77 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 76 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 77 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu100-revC.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu100-revC.dts
index 44d1f351bb75..52f998c22538 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu100-revC.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu100-revC.dts
@@ -123,13 +123,13 @@
io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
};
- si5335_0: si5335_0 { /* clk0_usb - u23 */
+ si5335_0: si5335-0 { /* clk0_usb - u23 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <26000000>;
};
- si5335_1: si5335_1 { /* clk1_dp - u23 */
+ si5335_1: si5335-1 { /* clk1_dp - u23 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
@@ -180,8 +180,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
clock-frequency = <100000>;
i2c-mux@75 { /* u11 */
compatible = "nxp,pca9548";
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu102-revA.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu102-revA.dts
index 8767f147cbe3..84952c14f021 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu102-revA.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu102-revA.dts
@@ -233,8 +233,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u97: gpio@20 {
compatible = "ti,tca6416";
@@ -497,8 +497,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
/* PL i2c via PCA9306 - u45 */
i2c-mux@74 { /* u34 */
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revA.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revA.dts
index e185709c0d84..5084ddcee00f 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revA.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revA.dts
@@ -140,8 +140,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
/* Another connection to this bus via PL i2c via PCA9306 - u45 */
i2c-mux@74 { /* u34 */
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revC.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revC.dts
index 7fceebd1815c..b273bd1d920a 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revC.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu104-revC.dts
@@ -145,8 +145,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u97: gpio@20 {
compatible = "ti,tca6416";
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu106-revA.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu106-revA.dts
index 27b2416cb6d8..50c384aa253e 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu106-revA.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu106-revA.dts
@@ -245,8 +245,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u97: gpio@20 {
compatible = "ti,tca6416";
@@ -508,8 +508,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
/* PL i2c via PCA9306 - u45 */
i2c-mux@74 { /* u34 */
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu111-revA.dts b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu111-revA.dts
index 6224365826d8..617cb0405a7d 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu111-revA.dts
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp-zcu111-revA.dts
@@ -205,8 +205,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u22: gpio@20 {
compatible = "ti,tca6416";
@@ -385,8 +385,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-mux@74 { /* u26 */
compatible = "nxp,pca9548";
diff --git a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp.dtsi b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp.dtsi
index 02cfcc716936..eaba466804bc 100644
--- a/sys/contrib/device-tree/src/arm64/xilinx/zynqmp.dtsi
+++ b/sys/contrib/device-tree/src/arm64/xilinx/zynqmp.dtsi
@@ -14,6 +14,8 @@
#include <dt-bindings/dma/xlnx-zynqmp-dpdma.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/power/xlnx-zynqmp-power.h>
#include <dt-bindings/reset/xlnx-zynqmp-resets.h>
@@ -33,6 +35,7 @@
operating-points-v2 = <&cpu_opp_table>;
reg = <0x0>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
cpu1: cpu@1 {
@@ -42,6 +45,7 @@
reg = <0x1>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
cpu2: cpu@2 {
@@ -51,6 +55,7 @@
reg = <0x2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
cpu3: cpu@3 {
@@ -60,6 +65,13 @@
reg = <0x3>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
+ };
+
+ L2: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
};
idle-states {
@@ -117,11 +129,11 @@
};
};
- zynqmp_ipi: zynqmp_ipi {
+ zynqmp_ipi: zynqmp-ipi {
bootph-all;
compatible = "xlnx,zynqmp-ipi-mailbox";
interrupt-parent = <&gic>;
- interrupts = <0 35 4>;
+ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
xlnx,ipi-id = <0>;
#address-cells = <2>;
#size-cells = <2>;
@@ -129,6 +141,7 @@
ipi_mailbox_pmu1: mailbox@ff9905c0 {
bootph-all;
+ compatible = "xlnx,zynqmp-ipi-dest-mailbox";
reg = <0x0 0xff9905c0 0x0 0x20>,
<0x0 0xff9905e0 0x0 0x20>,
<0x0 0xff990e80 0x0 0x20>,
@@ -151,10 +164,10 @@
pmu {
compatible = "arm,armv8-pmuv3";
interrupt-parent = <&gic>;
- interrupts = <0 143 4>,
- <0 144 4>,
- <0 145 4>,
- <0 146 4>;
+ interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
interrupt-affinity = <&cpu0>,
<&cpu1>,
<&cpu2>,
@@ -177,17 +190,17 @@
bootph-all;
compatible = "xlnx,zynqmp-power";
interrupt-parent = <&gic>;
- interrupts = <0 35 4>;
+ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
mboxes = <&ipi_mailbox_pmu1 0>, <&ipi_mailbox_pmu1 1>;
mbox-names = "tx", "rx";
};
- nvmem_firmware {
+ nvmem-firmware {
compatible = "xlnx,zynqmp-nvmem-fw";
#address-cells = <1>;
#size-cells = <1>;
- soc_revision: soc_revision@0 {
+ soc_revision: soc-revision@0 {
reg = <0x0 0x4>;
};
};
@@ -221,10 +234,10 @@
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&gic>;
- interrupts = <1 13 0xf08>,
- <1 14 0xf08>,
- <1 11 0xf08>,
- <1 10 0xf08>;
+ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
};
fpga_full: fpga-full {
@@ -264,7 +277,7 @@
status = "disabled";
clock-names = "can_clk", "pclk";
reg = <0x0 0xff060000 0x0 0x1000>;
- interrupts = <0 23 4>;
+ interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
tx-fifo-depth = <0x40>;
rx-fifo-depth = <0x40>;
@@ -276,7 +289,7 @@
status = "disabled";
clock-names = "can_clk", "pclk";
reg = <0x0 0xff070000 0x0 0x1000>;
- interrupts = <0 24 4>;
+ interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
tx-fifo-depth = <0x40>;
rx-fifo-depth = <0x40>;
@@ -295,11 +308,11 @@
compatible = "arm,cci-400-pmu,r1";
reg = <0x9000 0x5000>;
interrupt-parent = <&gic>;
- interrupts = <0 123 4>,
- <0 123 4>,
- <0 123 4>,
- <0 123 4>,
- <0 123 4>;
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
};
};
@@ -309,7 +322,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd500000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 124 4>;
+ interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -322,7 +335,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd510000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 125 4>;
+ interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -335,7 +348,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd520000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 126 4>;
+ interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -348,7 +361,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd530000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 127 4>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -361,7 +374,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd540000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 128 4>;
+ interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -374,7 +387,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd550000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 129 4>;
+ interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -387,7 +400,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd560000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 130 4>;
+ interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -400,7 +413,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xfd570000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 131 4>;
+ interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <128>;
@@ -417,7 +430,7 @@
<0x0 0xf9060000 0x0 0x20000>;
interrupt-controller;
interrupt-parent = <&gic>;
- interrupts = <1 9 0xf04>;
+ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
gpu: gpu@fd4b0000 {
@@ -425,8 +438,12 @@
compatible = "xlnx,zynqmp-mali", "arm,mali-400";
reg = <0x0 0xfd4b0000 0x0 0x10000>;
interrupt-parent = <&gic>;
- interrupts = <0 132 4>, <0 132 4>, <0 132 4>,
- <0 132 4>, <0 132 4>, <0 132 4>;
+ interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "gp", "gpmmu", "pp0", "ppmmu0", "pp1", "ppmmu1";
clock-names = "bus", "core";
power-domains = <&zynqmp_firmware PD_GPU>;
@@ -441,7 +458,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffa80000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 77 4>;
+ interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -454,7 +471,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffa90000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 78 4>;
+ interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -467,7 +484,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffaa0000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 79 4>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -480,7 +497,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffab0000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 80 4>;
+ interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -493,7 +510,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffac0000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 81 4>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -506,7 +523,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffad0000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 82 4>;
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -519,7 +536,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffae0000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 83 4>;
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -532,7 +549,7 @@
compatible = "xlnx,zynqmp-dma-1.0";
reg = <0x0 0xffaf0000 0x0 0x1000>;
interrupt-parent = <&gic>;
- interrupts = <0 84 4>;
+ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "clk_main", "clk_apb";
#dma-cells = <1>;
xlnx,bus-width = <64>;
@@ -544,7 +561,7 @@
compatible = "xlnx,zynqmp-ddrc-2.40a";
reg = <0x0 0xfd070000 0x0 0x30000>;
interrupt-parent = <&gic>;
- interrupts = <0 112 4>;
+ interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
};
nand0: nand-controller@ff100000 {
@@ -553,7 +570,7 @@
reg = <0x0 0xff100000 0x0 0x1000>;
clock-names = "controller", "bus";
interrupt-parent = <&gic>;
- interrupts = <0 14 4>;
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
iommus = <&smmu 0x872>;
@@ -564,11 +581,10 @@
compatible = "xlnx,zynqmp-gem", "cdns,gem";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 57 4>, <0 57 4>;
+ interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff0b0000 0x0 0x1000>;
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
- #address-cells = <1>;
- #size-cells = <0>;
iommus = <&smmu 0x874>;
power-domains = <&zynqmp_firmware PD_ETH_0>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM0>;
@@ -579,11 +595,10 @@
compatible = "xlnx,zynqmp-gem", "cdns,gem";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 59 4>, <0 59 4>;
+ interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff0c0000 0x0 0x1000>;
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
- #address-cells = <1>;
- #size-cells = <0>;
iommus = <&smmu 0x875>;
power-domains = <&zynqmp_firmware PD_ETH_1>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
@@ -594,11 +609,10 @@
compatible = "xlnx,zynqmp-gem", "cdns,gem";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 61 4>, <0 61 4>;
+ interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff0d0000 0x0 0x1000>;
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
- #address-cells = <1>;
- #size-cells = <0>;
iommus = <&smmu 0x876>;
power-domains = <&zynqmp_firmware PD_ETH_2>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM2>;
@@ -609,11 +623,10 @@
compatible = "xlnx,zynqmp-gem", "cdns,gem";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 63 4>, <0 63 4>;
+ interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff0e0000 0x0 0x1000>;
clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
- #address-cells = <1>;
- #size-cells = <0>;
iommus = <&smmu 0x877>;
power-domains = <&zynqmp_firmware PD_ETH_3>;
resets = <&zynqmp_reset ZYNQMP_RESET_GEM3>;
@@ -626,7 +639,7 @@
#gpio-cells = <0x2>;
gpio-controller;
interrupt-parent = <&gic>;
- interrupts = <0 16 4>;
+ interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
reg = <0x0 0xff0a0000 0x0 0x1000>;
@@ -637,7 +650,8 @@
compatible = "cdns,i2c-r1p14";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 17 4>;
+ interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+ clock-frequency = <400000>;
reg = <0x0 0xff020000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
@@ -648,7 +662,8 @@
compatible = "cdns,i2c-r1p14";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 18 4>;
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+ clock-frequency = <400000>;
reg = <0x0 0xff030000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
@@ -664,11 +679,11 @@
msi-controller;
device_type = "pci";
interrupt-parent = <&gic>;
- interrupts = <0 118 4>,
- <0 117 4>,
- <0 116 4>,
- <0 115 4>, /* MSI_1 [63...32] */
- <0 114 4>; /* MSI_0 [31...0] */
+ interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, /* MSI_1 [63...32] */
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; /* MSI_0 [31...0] */
interrupt-names = "misc", "dummy", "intx",
"msi1", "msi0";
msi-parent = <&pcie>;
@@ -698,7 +713,7 @@
compatible = "xlnx,zynqmp-qspi-1.0";
status = "disabled";
clock-names = "ref_clk", "pclk";
- interrupts = <0 15 4>;
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
num-cs = <1>;
reg = <0x0 0xff0f0000 0x0 0x1000>,
@@ -723,7 +738,8 @@
status = "disabled";
reg = <0x0 0xffa60000 0x0 0x100>;
interrupt-parent = <&gic>;
- interrupts = <0 26 4>, <0 27 4>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "alarm", "sec";
calibration = <0x7FFF>;
};
@@ -733,7 +749,7 @@
status = "disabled";
reg = <0x0 0xfd0c0000 0x0 0x2000>;
interrupt-parent = <&gic>;
- interrupts = <0 133 4>;
+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&zynqmp_firmware PD_SATA>;
resets = <&zynqmp_reset ZYNQMP_RESET_SATA>;
iommus = <&smmu 0x4c0>, <&smmu 0x4c1>,
@@ -745,7 +761,7 @@
compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 48 4>;
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff160000 0x0 0x1000>;
clock-names = "clk_xin", "clk_ahb";
iommus = <&smmu 0x870>;
@@ -760,7 +776,7 @@
compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 49 4>;
+ interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff170000 0x0 0x1000>;
clock-names = "clk_xin", "clk_ahb";
iommus = <&smmu 0x871>;
@@ -777,18 +793,30 @@
status = "disabled";
#global-interrupts = <1>;
interrupt-parent = <&gic>;
- interrupts = <0 155 4>,
- <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
- <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
- <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>,
- <0 155 4>, <0 155 4>, <0 155 4>, <0 155 4>;
+ interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
};
spi0: spi@ff040000 {
compatible = "cdns,spi-r1p6";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 19 4>;
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff040000 0x0 0x1000>;
clock-names = "ref_clk", "pclk";
#address-cells = <1>;
@@ -800,7 +828,7 @@
compatible = "cdns,spi-r1p6";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 20 4>;
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff050000 0x0 0x1000>;
clock-names = "ref_clk", "pclk";
#address-cells = <1>;
@@ -812,7 +840,9 @@
compatible = "cdns,ttc";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 36 4>, <0 37 4>, <0 38 4>;
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff110000 0x0 0x1000>;
timer-width = <32>;
power-domains = <&zynqmp_firmware PD_TTC_0>;
@@ -822,7 +852,9 @@
compatible = "cdns,ttc";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 39 4>, <0 40 4>, <0 41 4>;
+ interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff120000 0x0 0x1000>;
timer-width = <32>;
power-domains = <&zynqmp_firmware PD_TTC_1>;
@@ -832,7 +864,9 @@
compatible = "cdns,ttc";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 42 4>, <0 43 4>, <0 44 4>;
+ interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff130000 0x0 0x1000>;
timer-width = <32>;
power-domains = <&zynqmp_firmware PD_TTC_2>;
@@ -842,7 +876,9 @@
compatible = "cdns,ttc";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 45 4>, <0 46 4>, <0 47 4>;
+ interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff140000 0x0 0x1000>;
timer-width = <32>;
power-domains = <&zynqmp_firmware PD_TTC_3>;
@@ -853,7 +889,7 @@
compatible = "xlnx,zynqmp-uart", "cdns,uart-r1p12";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 21 4>;
+ interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff000000 0x0 0x1000>;
clock-names = "uart_clk", "pclk";
power-domains = <&zynqmp_firmware PD_UART_0>;
@@ -864,7 +900,7 @@
compatible = "xlnx,zynqmp-uart", "cdns,uart-r1p12";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 22 4>;
+ interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xff010000 0x0 0x1000>;
clock-names = "uart_clk", "pclk";
power-domains = <&zynqmp_firmware PD_UART_1>;
@@ -888,8 +924,10 @@
compatible = "snps,dwc3";
reg = <0x0 0xfe200000 0x0 0x40000>;
interrupt-parent = <&gic>;
- interrupt-names = "dwc_usb3", "otg";
- interrupts = <0 65 4>, <0 69 4>;
+ interrupt-names = "host", "peripheral", "otg";
+ interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "bus_early", "ref";
iommus = <&smmu 0x860>;
snps,quirk-frame-length-adjustment = <0x20>;
@@ -915,8 +953,10 @@
compatible = "snps,dwc3";
reg = <0x0 0xfe300000 0x0 0x40000>;
interrupt-parent = <&gic>;
- interrupt-names = "dwc_usb3", "otg";
- interrupts = <0 70 4>, <0 74 4>;
+ interrupt-names = "host", "peripheral", "otg";
+ interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "bus_early", "ref";
iommus = <&smmu 0x861>;
snps,quirk-frame-length-adjustment = <0x20>;
@@ -929,7 +969,7 @@
compatible = "cdns,wdt-r1p2";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 113 1>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_EDGE_RISING>;
reg = <0x0 0xfd4d0000 0x0 0x1000>;
timeout-sec = <60>;
reset-on-timeout;
@@ -939,7 +979,7 @@
compatible = "cdns,wdt-r1p2";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 52 1>;
+ interrupts = <GIC_SPI 52 IRQ_TYPE_EDGE_RISING>;
reg = <0x0 0xff150000 0x0 0x1000>;
timeout-sec = <10>;
};
@@ -948,7 +988,7 @@
compatible = "xlnx,zynqmp-ams";
status = "disabled";
interrupt-parent = <&gic>;
- interrupts = <0 56 4>;
+ interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0xffa50000 0x0 0x800>;
#address-cells = <1>;
#size-cells = <1>;
@@ -974,7 +1014,7 @@
compatible = "xlnx,zynqmp-dpdma";
status = "disabled";
reg = <0x0 0xfd4c0000 0x0 0x1000>;
- interrupts = <0 122 4>;
+ interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
clock-names = "axi_clk";
power-domains = <&zynqmp_firmware PD_DP>;
@@ -990,7 +1030,7 @@
<0x0 0xfd4ab000 0x0 0x1000>,
<0x0 0xfd4ac000 0x0 0x1000>;
reg-names = "dp", "blend", "av_buf", "aud";
- interrupts = <0 119 4>;
+ interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
clock-names = "dp_apb_clk", "dp_aud_clk",
"dp_vtc_pixel_clk_in";
diff --git a/sys/contrib/device-tree/src/loongarch/loongson-2k0500-ref.dts b/sys/contrib/device-tree/src/loongarch/loongson-2k0500-ref.dts
new file mode 100644
index 000000000000..8aefb0c12672
--- /dev/null
+++ b/sys/contrib/device-tree/src/loongarch/loongson-2k0500-ref.dts
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include "loongson-2k0500.dtsi"
+
+/ {
+ compatible = "loongson,ls2k0500-ref", "loongson,ls2k0500";
+ model = "Loongson-2K0500 Reference Board";
+
+ aliases {
+ ethernet0 = &gmac0;
+ ethernet1 = &gmac1;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@200000 {
+ device_type = "memory";
+ reg = <0x0 0x00200000 0x0 0x0ee00000>,
+ <0x0 0x90000000 0x0 0x60000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x0 0x2000000>;
+ linux,cma-default;
+ };
+ };
+};
+
+&gmac0 {
+ status = "okay";
+
+ phy-mode = "rgmii";
+ bus_id = <0x0>;
+};
+
+&gmac1 {
+ status = "okay";
+
+ phy-mode = "rgmii";
+ bus_id = <0x1>;
+};
+
+&i2c0 {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ eeprom@57 {
+ compatible = "atmel,24c16";
+ reg = <0x57>;
+ pagesize = <16>;
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&sata {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&rtc0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/loongarch/loongson-2k0500.dtsi b/sys/contrib/device-tree/src/loongarch/loongson-2k0500.dtsi
new file mode 100644
index 000000000000..444779c21034
--- /dev/null
+++ b/sys/contrib/device-tree/src/loongarch/loongson-2k0500.dtsi
@@ -0,0 +1,266 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ compatible = "loongson,la264";
+ device_type = "cpu";
+ reg = <0x0>;
+ clocks = <&cpu_clk>;
+ };
+ };
+
+ cpu_clk: cpu-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <500000000>;
+ };
+
+ cpuintc: interrupt-controller {
+ compatible = "loongson,cpu-interrupt-controller";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+
+ bus@10000000 {
+ compatible = "simple-bus";
+ ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
+ <0x0 0x02000000 0x0 0x02000000 0x0 0x02000000>,
+ <0x0 0x20000000 0x0 0x20000000 0x0 0x10000000>,
+ <0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>,
+ <0xfe 0x0 0xfe 0x0 0x0 0x40000000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ isa@16400000 {
+ compatible = "isa";
+ #size-cells = <1>;
+ #address-cells = <2>;
+ ranges = <1 0x0 0x0 0x16400000 0x4000>;
+ };
+
+ liointc0: interrupt-controller@1fe11400 {
+ compatible = "loongson,liointc-2.0";
+ reg = <0x0 0x1fe11400 0x0 0x40>,
+ <0x0 0x1fe11040 0x0 0x8>;
+ reg-names = "main", "isr0";
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ interrupt-names = "int0";
+
+ loongson,parent_int_map = <0xffffffff>, /* int0 */
+ <0x00000000>, /* int1 */
+ <0x00000000>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ liointc1: interrupt-controller@1fe11440 {
+ compatible = "loongson,liointc-2.0";
+ reg = <0x0 0x1fe11440 0x0 0x40>,
+ <0x0 0x1fe11048 0x0 0x8>;
+ reg-names = "main", "isr0";
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <4>;
+ interrupt-names = "int2";
+
+ loongson,parent_int_map = <0x00000000>, /* int0 */
+ <0x00000000>, /* int1 */
+ <0xffffffff>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ eiointc: interrupt-controller@1fe11600 {
+ compatible = "loongson,ls2k0500-eiointc";
+ reg = <0x0 0x1fe11600 0x0 0xea00>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <3>;
+ };
+
+ gmac0: ethernet@1f020000 {
+ compatible = "snps,dwmac-3.70a";
+ reg = <0x0 0x1f020000 0x0 0x10000>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ status = "disabled";
+ };
+
+ gmac1: ethernet@1f030000 {
+ compatible = "snps,dwmac-3.70a";
+ reg = <0x0 0x1f030000 0x0 0x10000>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ status = "disabled";
+ };
+
+ sata: sata@1f040000 {
+ compatible = "snps,spear-ahci";
+ reg = <0x0 0x1f040000 0x0 0x10000>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <75>;
+ status = "disabled";
+ };
+
+ ehci0: usb@1f050000 {
+ compatible = "generic-ehci";
+ reg = <0x0 0x1f050000 0x0 0x8000>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <71>;
+ status = "disabled";
+ };
+
+ ohci0: usb@1f058000 {
+ compatible = "generic-ohci";
+ reg = <0x0 0x1f058000 0x0 0x8000>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <72>;
+ status = "disabled";
+ };
+
+ uart0: serial@1ff40800 {
+ compatible = "ns16550a";
+ reg = <0x0 0x1ff40800 0x0 0x10>;
+ clock-frequency = <100000000>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <2>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ i2c0: i2c@1ff48000 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1ff48000 0x0 0x0800>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <14>;
+ status = "disabled";
+ };
+
+ i2c@1ff48800 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1ff48800 0x0 0x0800>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <15>;
+ status = "disabled";
+ };
+
+ i2c@1ff49000 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1ff49000 0x0 0x0800>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <16>;
+ status = "disabled";
+ };
+
+ i2c@1ff49800 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1ff49800 0x0 0x0800>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <17>;
+ status = "disabled";
+ };
+
+ i2c@1ff4a000 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1ff4a000 0x0 0x0800>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <18>;
+ status = "disabled";
+ };
+
+ i2c@1ff4a800 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1ff4a800 0x0 0x0800>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <19>;
+ status = "disabled";
+ };
+
+ pmc: power-management@1ff6c000 {
+ compatible = "loongson,ls2k0500-pmc", "syscon";
+ reg = <0x0 0x1ff6c000 0x0 0x58>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <56>;
+ loongson,suspend-address = <0x0 0x1c000500>;
+
+ syscon-reboot {
+ compatible = "syscon-reboot";
+ offset = <0x30>;
+ mask = <0x1>;
+ };
+
+ syscon-poweroff {
+ compatible = "syscon-poweroff";
+ regmap = <&pmc>;
+ offset = <0x14>;
+ mask = <0x3c00>;
+ value = <0x3c00>;
+ };
+ };
+
+ rtc0: rtc@1ff6c100 {
+ compatible = "loongson,ls2k0500-rtc", "loongson,ls7a-rtc";
+ reg = <0x0 0x1ff6c100 0x0 0x100>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <35>;
+ status = "disabled";
+ };
+
+ pcie@1a000000 {
+ compatible = "loongson,ls2k-pci";
+ reg = <0x0 0x1a000000 0x0 0x02000000>,
+ <0xfe 0x0 0x0 0x20000000>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ bus-range = <0x0 0x5>;
+ ranges = <0x01000000 0x0 0x00004000 0x0 0x16404000 0x0 0x00004000>,
+ <0x02000000 0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>;
+
+ pcie@0,0 {
+ reg = <0x0000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&eiointc>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &eiointc 81>;
+ ranges;
+ };
+
+ pcie@1,0 {
+ reg = <0x0800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&eiointc>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &eiointc 82>;
+ ranges;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/loongarch/loongson-2k1000-ref.dts b/sys/contrib/device-tree/src/loongarch/loongson-2k1000-ref.dts
new file mode 100644
index 000000000000..ed4d32434041
--- /dev/null
+++ b/sys/contrib/device-tree/src/loongarch/loongson-2k1000-ref.dts
@@ -0,0 +1,183 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include "loongson-2k1000.dtsi"
+
+/ {
+ compatible = "loongson,ls2k1000-ref", "loongson,ls2k1000";
+ model = "Loongson-2K1000 Reference Board";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@200000 {
+ device_type = "memory";
+ reg = <0x0 0x00200000 0x0 0x06e00000>,
+ <0x0 0x08000000 0x0 0x07000000>,
+ <0x0 0x90000000 0x1 0xe0000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x0 0x2000000>;
+ linux,cma-default;
+ };
+ };
+};
+
+&gmac0 {
+ status = "okay";
+
+ phy-mode = "rgmii";
+ phy-handle = <&phy0>;
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
+};
+
+&gmac1 {
+ status = "okay";
+
+ phy-mode = "rgmii";
+ phy-handle = <&phy1>;
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy1: ethernet-phy@1 {
+ reg = <16>;
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ pinctrl-0 = <&i2c0_pins_default>;
+ pinctrl-names = "default";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ eeprom@57 {
+ compatible = "atmel,24c16";
+ reg = <0x57>;
+ pagesize = <16>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ spidev@0 {
+ compatible = "rohm,dh2228fv";
+ spi-max-frequency = <100000000>;
+ reg = <0>;
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&sata {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&clk {
+ status = "okay";
+};
+
+&rtc0 {
+ status = "okay";
+};
+
+&pctrl {
+ status = "okay";
+
+ sdio_pins_default: sdio-pins {
+ sdio-pinmux {
+ groups = "sdio";
+ function = "sdio";
+ };
+ sdio-det-pinmux {
+ groups = "pwm2";
+ function = "gpio";
+ };
+ };
+
+ pwm1_pins_default: pwm1-pins {
+ pinmux {
+ groups = "pwm1";
+ function = "pwm1";
+ };
+ };
+
+ pwm0_pins_default: pwm0-pins {
+ pinmux {
+ groups = "pwm0";
+ function = "pwm0";
+ };
+ };
+
+ i2c1_pins_default: i2c1-pins {
+ pinmux {
+ groups = "i2c1";
+ function = "i2c1";
+ };
+ };
+
+ i2c0_pins_default: i2c0-pins {
+ pinmux {
+ groups = "i2c0";
+ function = "i2c0";
+ };
+ };
+
+ nand_pins_default: nand-pins {
+ pinmux {
+ groups = "nand";
+ function = "nand";
+ };
+ };
+
+ hda_pins_default: hda-pins {
+ grp0-pinmux {
+ groups = "hda";
+ function = "hda";
+ };
+ grp1-pinmux {
+ groups = "i2s";
+ function = "gpio";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/loongarch/loongson-2k1000.dtsi b/sys/contrib/device-tree/src/loongarch/loongson-2k1000.dtsi
new file mode 100644
index 000000000000..49a70f8c3cab
--- /dev/null
+++ b/sys/contrib/device-tree/src/loongarch/loongson-2k1000.dtsi
@@ -0,0 +1,492 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/loongson,ls2k-clk.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ compatible = "loongson,la264";
+ device_type = "cpu";
+ reg= <0x0>;
+ clocks = <&clk LOONGSON2_NODE_CLK>;
+ };
+
+ cpu1: cpu@1 {
+ compatible = "loongson,la264";
+ device_type = "cpu";
+ reg = <0x1>;
+ clocks = <&clk LOONGSON2_NODE_CLK>;
+ };
+ };
+
+ ref_100m: clock-ref-100m {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ clock-output-names = "ref_100m";
+ };
+
+ cpuintc: interrupt-controller {
+ compatible = "loongson,cpu-interrupt-controller";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+
+ /* i2c of the dvi eeprom edid */
+ i2c-gpio-0 {
+ compatible = "i2c-gpio";
+ scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <5>; /* ~100 kHz */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ /* i2c of the eeprom edid */
+ i2c-gpio-1 {
+ compatible = "i2c-gpio";
+ scl-gpios = <&gpio0 33 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio0 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <5>; /* ~100 kHz */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <1000>;
+ polling-delay = <5000>;
+ thermal-sensors = <&tsensor 0>;
+
+ trips {
+ cpu_alert: cpu-alert {
+ temperature = <33000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ cpu_crit: cpu-crit {
+ temperature = <85000>;
+ hysteresis = <5000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
+ bus@10000000 {
+ compatible = "simple-bus";
+ ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
+ <0x0 0x02000000 0x0 0x02000000 0x0 0x02000000>,
+ <0x0 0x20000000 0x0 0x20000000 0x0 0x10000000>,
+ <0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>,
+ <0xfe 0x0 0xfe 0x0 0x0 0x40000000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-coherent;
+
+ liointc0: interrupt-controller@1fe01400 {
+ compatible = "loongson,liointc-2.0";
+ reg = <0x0 0x1fe01400 0x0 0x40>,
+ <0x0 0x1fe01040 0x0 0x8>,
+ <0x0 0x1fe01140 0x0 0x8>;
+ reg-names = "main", "isr0", "isr1";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ interrupt-names = "int0";
+ loongson,parent_int_map = <0xffffffff>, /* int0 */
+ <0x00000000>, /* int1 */
+ <0x00000000>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ liointc1: interrupt-controller@1fe01440 {
+ compatible = "loongson,liointc-2.0";
+ reg = <0x0 0x1fe01440 0x0 0x40>,
+ <0x0 0x1fe01048 0x0 0x8>,
+ <0x0 0x1fe01148 0x0 0x8>;
+ reg-names = "main", "isr0", "isr1";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <3>;
+ interrupt-names = "int1";
+ loongson,parent_int_map = <0x00000000>, /* int0 */
+ <0xffffffff>, /* int1 */
+ <0x00000000>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ chipid@1fe00000 {
+ compatible = "loongson,ls2k-chipid";
+ reg = <0x0 0x1fe00000 0x0 0x30>;
+ little-endian;
+ };
+
+ pctrl: pinctrl@1fe00420 {
+ compatible = "loongson,ls2k-pinctrl";
+ reg = <0x0 0x1fe00420 0x0 0x18>;
+ status = "disabled";
+ };
+
+ clk: clock-controller@1fe00480 {
+ compatible = "loongson,ls2k-clk";
+ reg = <0x0 0x1fe00480 0x0 0x58>;
+ #clock-cells = <1>;
+ clocks = <&ref_100m>;
+ clock-names = "ref_100m";
+ status = "disabled";
+ };
+
+ gpio0: gpio@1fe00500 {
+ compatible = "loongson,ls2k-gpio";
+ reg = <0x0 0x1fe00500 0x0 0x38>;
+ ngpios = <64>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ gpio-ranges = <&pctrl 0x0 0x0 15>,
+ <&pctrl 16 16 15>,
+ <&pctrl 32 32 10>,
+ <&pctrl 44 44 20>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <28 IRQ_TYPE_LEVEL_HIGH>,
+ <29 IRQ_TYPE_LEVEL_HIGH>,
+ <30 IRQ_TYPE_LEVEL_HIGH>,
+ <30 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <26 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <>,
+ <>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>,
+ <27 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ tsensor: thermal-sensor@1fe01500 {
+ compatible = "loongson,ls2k1000-thermal";
+ reg = <0x0 0x1fe01500 0x0 0x30>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
+ #thermal-sensor-cells = <1>;
+ };
+
+ dma-controller@1fe00c00 {
+ compatible = "loongson,ls2k1000-apbdma";
+ reg = <0x0 0x1fe00c00 0x0 0x8>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk LOONGSON2_APB_CLK>;
+ #dma-cells = <1>;
+ status = "disabled";
+ };
+
+ dma-controller@1fe00c10 {
+ compatible = "loongson,ls2k1000-apbdma";
+ reg = <0x0 0x1fe00c10 0x0 0x8>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk LOONGSON2_APB_CLK>;
+ #dma-cells = <1>;
+ status = "disabled";
+ };
+
+ dma-controller@1fe00c20 {
+ compatible = "loongson,ls2k1000-apbdma";
+ reg = <0x0 0x1fe00c20 0x0 0x8>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk LOONGSON2_APB_CLK>;
+ #dma-cells = <1>;
+ status = "disabled";
+ };
+
+ dma-controller@1fe00c30 {
+ compatible = "loongson,ls2k1000-apbdma";
+ reg = <0x0 0x1fe00c30 0x0 0x8>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <15 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk LOONGSON2_APB_CLK>;
+ #dma-cells = <1>;
+ status = "disabled";
+ };
+
+ dma-controller@1fe00c40 {
+ compatible = "loongson,ls2k1000-apbdma";
+ reg = <0x0 0x1fe00c40 0x0 0x8>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk LOONGSON2_APB_CLK>;
+ #dma-cells = <1>;
+ status = "disabled";
+ };
+
+ uart0: serial@1fe20000 {
+ compatible = "ns16550a";
+ reg = <0x0 0x1fe20000 0x0 0x10>;
+ clock-frequency = <125000000>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <0x0 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ i2c2: i2c@1fe21000 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1fe21000 0x0 0x8>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ i2c3: i2c@1fe21800 {
+ compatible = "loongson,ls2k-i2c";
+ reg = <0x0 0x1fe21800 0x0 0x8>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ pmc: power-management@1fe27000 {
+ compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
+ reg = <0x0 0x1fe27000 0x0 0x58>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+ loongson,suspend-address = <0x0 0x1c000500>;
+
+ syscon-reboot {
+ compatible = "syscon-reboot";
+ offset = <0x30>;
+ mask = <0x1>;
+ };
+
+ syscon-poweroff {
+ compatible = "syscon-poweroff";
+ regmap = <&pmc>;
+ offset = <0x14>;
+ mask = <0x3c00>;
+ value = <0x3c00>;
+ };
+ };
+
+ rtc0: rtc@1fe27800 {
+ compatible = "loongson,ls2k1000-rtc";
+ reg = <0x0 0x1fe27800 0x0 0x100>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ spi0: spi@1fff0220 {
+ compatible = "loongson,ls2k1000-spi";
+ reg = <0x0 0x1fff0220 0x0 0x10>;
+ clocks = <&clk LOONGSON2_BOOT_CLK>;
+ status = "disabled";
+ };
+
+ pcie@1a000000 {
+ compatible = "loongson,ls2k-pci";
+ reg = <0x0 0x1a000000 0x0 0x02000000>,
+ <0xfe 0x0 0x0 0x20000000>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ bus-range = <0x0 0xff>;
+ ranges = <0x01000000 0x0 0x00008000 0x0 0x18008000 0x0 0x00008000>,
+ <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>;
+
+ gmac0: ethernet@3,0 {
+ reg = <0x1800 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
+ <13 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq", "eth_lpi";
+ status = "disabled";
+ };
+
+ gmac1: ethernet@3,1 {
+ reg = <0x1900 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
+ <15 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq", "eth_lpi";
+ status = "disabled";
+ };
+
+ ehci0: usb@4,1 {
+ reg = <0x2100 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ ohci0: usb@4,2 {
+ reg = <0x2200 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ display@6,0 {
+ reg = <0x3000 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ hda@7,0 {
+ reg = <0x3800 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ sata: sata@8,0 {
+ reg = <0x4000 0x0 0x0 0x0 0x0>;
+ interrupt-parent = <&liointc0>;
+ interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ pcie@9,0 {
+ reg = <0x4800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 0x0 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@a,0 {
+ reg = <0x5000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&liointc1>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 1 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@b,0 {
+ reg = <0x5800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&liointc1>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 2 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@c,0 {
+ reg = <0x6000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&liointc1>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 3 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@d,0 {
+ reg = <0x6800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&liointc1>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 4 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@e,0 {
+ reg = <0x7000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&liointc1>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 5 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/loongarch/loongson-2k2000-ref.dts b/sys/contrib/device-tree/src/loongarch/loongson-2k2000-ref.dts
new file mode 100644
index 000000000000..dca91caf895e
--- /dev/null
+++ b/sys/contrib/device-tree/src/loongarch/loongson-2k2000-ref.dts
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include "loongson-2k2000.dtsi"
+
+/ {
+ compatible = "loongson,ls2k2000-ref", "loongson,ls2k2000";
+ model = "Loongson-2K2000 Reference Board";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@200000 {
+ device_type = "memory";
+ reg = <0x0 0x00200000 0x0 0x0ee00000>,
+ <0x0 0x90000000 0x0 0x70000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x0 0x2000000>;
+ linux,cma-default;
+ };
+ };
+};
+
+&sata {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&rtc0 {
+ status = "okay";
+};
+
+&xhci0 {
+ status = "okay";
+};
+
+&xhci1 {
+ status = "okay";
+};
+
+&gmac0 {
+ status = "okay";
+};
+
+&gmac1 {
+ status = "okay";
+};
+
+&gmac2 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/loongarch/loongson-2k2000.dtsi b/sys/contrib/device-tree/src/loongarch/loongson-2k2000.dtsi
new file mode 100644
index 000000000000..a231949b5f55
--- /dev/null
+++ b/sys/contrib/device-tree/src/loongarch/loongson-2k2000.dtsi
@@ -0,0 +1,300 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Loongson Technology Corporation Limited
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@1 {
+ compatible = "loongson,la364";
+ device_type = "cpu";
+ reg = <0x0>;
+ clocks = <&cpu_clk>;
+ };
+
+ cpu1: cpu@2 {
+ compatible = "loongson,la364";
+ device_type = "cpu";
+ reg = <0x1>;
+ clocks = <&cpu_clk>;
+ };
+ };
+
+ cpu_clk: cpu-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <1400000000>;
+ };
+
+ cpuintc: interrupt-controller {
+ compatible = "loongson,cpu-interrupt-controller";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+
+ bus@10000000 {
+ compatible = "simple-bus";
+ ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
+ <0x0 0x02000000 0x0 0x02000000 0x0 0x02000000>,
+ <0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>,
+ <0xfe 0x0 0xfe 0x0 0x0 0x40000000>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ pmc: power-management@100d0000 {
+ compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
+ reg = <0x0 0x100d0000 0x0 0x58>;
+ interrupt-parent = <&eiointc>;
+ interrupts = <47>;
+ loongson,suspend-address = <0x0 0x1c000500>;
+
+ syscon-reboot {
+ compatible = "syscon-reboot";
+ offset = <0x30>;
+ mask = <0x1>;
+ };
+
+ syscon-poweroff {
+ compatible = "syscon-poweroff";
+ regmap = <&pmc>;
+ offset = <0x14>;
+ mask = <0x3c00>;
+ value = <0x3c00>;
+ };
+ };
+
+ liointc: interrupt-controller@1fe01400 {
+ compatible = "loongson,liointc-1.0";
+ reg = <0x0 0x1fe01400 0x0 0x64>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ interrupt-names = "int0";
+ loongson,parent_int_map = <0xffffffff>, /* int0 */
+ <0x00000000>, /* int1 */
+ <0x00000000>, /* int2 */
+ <0x00000000>; /* int3 */
+ };
+
+ eiointc: interrupt-controller@1fe01600 {
+ compatible = "loongson,ls2k2000-eiointc";
+ reg = <0x0 0x1fe01600 0x0 0xea00>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ interrupt-parent = <&cpuintc>;
+ interrupts = <3>;
+ };
+
+ pic: interrupt-controller@10000000 {
+ compatible = "loongson,pch-pic-1.0";
+ reg = <0x0 0x10000000 0x0 0x400>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ loongson,pic-base-vec = <0>;
+ interrupt-parent = <&eiointc>;
+ };
+
+ msi: msi-controller@1fe01140 {
+ compatible = "loongson,pch-msi-1.0";
+ reg = <0x0 0x1fe01140 0x0 0x8>;
+ msi-controller;
+ loongson,msi-base-vec = <64>;
+ loongson,msi-num-vecs = <192>;
+ interrupt-parent = <&eiointc>;
+ };
+
+ rtc0: rtc@100d0100 {
+ compatible = "loongson,ls2k2000-rtc", "loongson,ls7a-rtc";
+ reg = <0x0 0x100d0100 0x0 0x100>;
+ interrupt-parent = <&pic>;
+ interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ uart0: serial@1fe001e0 {
+ compatible = "ns16550a";
+ reg = <0x0 0x1fe001e0 0x0 0x10>;
+ clock-frequency = <100000000>;
+ interrupt-parent = <&liointc>;
+ interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
+ no-loopback-test;
+ status = "disabled";
+ };
+
+ pcie@1a000000 {
+ compatible = "loongson,ls2k-pci";
+ reg = <0x0 0x1a000000 0x0 0x02000000>,
+ <0xfe 0x0 0x0 0x20000000>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ bus-range = <0x0 0xff>;
+ ranges = <0x01000000 0x0 0x00008000 0x0 0x18400000 0x0 0x00008000>,
+ <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>;
+
+ gmac0: ethernet@3,0 {
+ reg = <0x1800 0x0 0x0 0x0 0x0>;
+ interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ gmac1: ethernet@3,1 {
+ reg = <0x1900 0x0 0x0 0x0 0x0>;
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ gmac2: ethernet@3,2 {
+ reg = <0x1a00 0x0 0x0 0x0 0x0>;
+ interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ xhci0: usb@4,0 {
+ reg = <0x2000 0x0 0x0 0x0 0x0>;
+ interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ xhci1: usb@19,0 {
+ reg = <0xc800 0x0 0x0 0x0 0x0>;
+ interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ display@6,1 {
+ reg = <0x3100 0x0 0x0 0x0 0x0>;
+ interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ hda@7,0 {
+ reg = <0x3800 0x0 0x0 0x0 0x0>;
+ interrupts = <58 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ sata: sata@8,0 {
+ reg = <0x4000 0x0 0x0 0x0 0x0>;
+ interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&pic>;
+ status = "disabled";
+ };
+
+ pcie@9,0 {
+ reg = <0x4800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 32 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@a,0 {
+ reg = <0x5000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 33 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@b,0 {
+ reg = <0x5800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 34 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@c,0 {
+ reg = <0x6000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 35 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@d,0 {
+ reg = <0x6800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 36 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@e,0 {
+ reg = <0x7000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 37 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@f,0 {
+ reg = <0x7800 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 40 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+
+ pcie@10,0 {
+ reg = <0x8000 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ interrupt-parent = <&pic>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0x0 0x0 0x0 0x0>;
+ interrupt-map = <0x0 0x0 0x0 0x0 &pic 30 IRQ_TYPE_LEVEL_HIGH>;
+ ranges;
+ };
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/mips/ingenic/jz4725b.dtsi b/sys/contrib/device-tree/src/mips/ingenic/jz4725b.dtsi
index acbbe8c4664c..c5c5a094c37d 100644
--- a/sys/contrib/device-tree/src/mips/ingenic/jz4725b.dtsi
+++ b/sys/contrib/device-tree/src/mips/ingenic/jz4725b.dtsi
@@ -366,7 +366,6 @@
rom: memory@1fc00000 {
compatible = "mtd-rom";
- probe-type = "map_rom";
reg = <0x1fc00000 0x2000>;
bank-width = <4>;
diff --git a/sys/contrib/device-tree/src/mips/ingenic/jz4770.dtsi b/sys/contrib/device-tree/src/mips/ingenic/jz4770.dtsi
index 9c0099919db7..504e895e916e 100644
--- a/sys/contrib/device-tree/src/mips/ingenic/jz4770.dtsi
+++ b/sys/contrib/device-tree/src/mips/ingenic/jz4770.dtsi
@@ -461,7 +461,6 @@
rom: memory@1fc00000 {
compatible = "mtd-rom";
- probe-type = "map_rom";
reg = <0x1fc00000 0x2000>;
bank-width = <4>;
diff --git a/sys/contrib/device-tree/src/mips/loongson/loongson64-2k1000.dtsi b/sys/contrib/device-tree/src/mips/loongson/loongson64-2k1000.dtsi
index f878f47e4501..ee3e2153dd13 100644
--- a/sys/contrib/device-tree/src/mips/loongson/loongson64-2k1000.dtsi
+++ b/sys/contrib/device-tree/src/mips/loongson/loongson64-2k1000.dtsi
@@ -130,8 +130,7 @@
compatible = "pci0014,7a03.0",
"pci0014,7a03",
"pciclass0c0320",
- "pciclass0c03",
- "loongson, pci-gmac";
+ "pciclass0c03";
reg = <0x1800 0x0 0x0 0x0 0x0>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>,
diff --git a/sys/contrib/device-tree/src/mips/loongson/ls7a-pch.dtsi b/sys/contrib/device-tree/src/mips/loongson/ls7a-pch.dtsi
index 7c69e8245c2f..cce9428afc41 100644
--- a/sys/contrib/device-tree/src/mips/loongson/ls7a-pch.dtsi
+++ b/sys/contrib/device-tree/src/mips/loongson/ls7a-pch.dtsi
@@ -193,8 +193,7 @@
compatible = "pci0014,7a03.0",
"pci0014,7a03",
"pciclass020000",
- "pciclass0200",
- "loongson, pci-gmac";
+ "pciclass0200";
reg = <0x1800 0x0 0x0 0x0 0x0>;
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc1.dts b/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc1.dts
index 129b6710b699..f9c262cc2e96 100644
--- a/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc1.dts
+++ b/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc1.dts
@@ -8,7 +8,7 @@
/ {
compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc";
- model = "GB-PC1";
+ model = "GnuBee GB-PC1";
memory@0 {
device_type = "memory";
diff --git a/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc2.dts b/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc2.dts
index f810cd10f4f4..b281e13f22ed 100644
--- a/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc2.dts
+++ b/sys/contrib/device-tree/src/mips/ralink/mt7621-gnubee-gb-pc2.dts
@@ -8,7 +8,7 @@
/ {
compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
- model = "GB-PC2";
+ model = "GnuBee GB-PC2";
memory@0 {
device_type = "memory";
diff --git a/sys/contrib/device-tree/src/mips/ralink/mt7621.dtsi b/sys/contrib/device-tree/src/mips/ralink/mt7621.dtsi
index 7caed0d14f11..35a10258f235 100644
--- a/sys/contrib/device-tree/src/mips/ralink/mt7621.dtsi
+++ b/sys/contrib/device-tree/src/mips/ralink/mt7621.dtsi
@@ -300,14 +300,13 @@
compatible = "mediatek,mt7621-eth";
reg = <0x1e100000 0x10000>;
- clocks = <&sysc MT7621_CLK_FE>,
- <&sysc MT7621_CLK_ETH>;
+ clocks = <&sysc MT7621_CLK_FE>, <&sysc MT7621_CLK_ETH>;
clock-names = "fe", "ethif";
#address-cells = <1>;
#size-cells = <0>;
- resets = <&sysc MT7621_RST_FE &sysc MT7621_RST_ETH>;
+ resets = <&sysc MT7621_RST_FE>, <&sysc MT7621_RST_ETH>;
reset-names = "fe", "eth";
interrupt-parent = <&gic>;
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/c293si-post.dtsi b/sys/contrib/device-tree/src/powerpc/fsl/c293si-post.dtsi
index bec0fc36849d..f208fb8f64b3 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/c293si-post.dtsi
+++ b/sys/contrib/device-tree/src/powerpc/fsl/c293si-post.dtsi
@@ -124,10 +124,10 @@
reg = <0x80000 0x20000>;
ranges = <0x0 0x80000 0x20000>;
- jr@1000{
+ jr@1000 {
interrupts = <45 2 0 0>;
};
- jr@2000{
+ jr@2000 {
interrupts = <57 2 0 0>;
};
};
@@ -140,10 +140,10 @@
reg = <0xa0000 0x20000>;
ranges = <0x0 0xa0000 0x20000>;
- jr@1000{
+ jr@1000 {
interrupts = <49 2 0 0>;
};
- jr@2000{
+ jr@2000 {
interrupts = <50 2 0 0>;
};
};
@@ -156,10 +156,10 @@
reg = <0xc0000 0x20000>;
ranges = <0x0 0xc0000 0x20000>;
- jr@1000{
+ jr@1000 {
interrupts = <55 2 0 0>;
};
- jr@2000{
+ jr@2000 {
interrupts = <56 2 0 0>;
};
};
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/p1022rdk.dts b/sys/contrib/device-tree/src/powerpc/fsl/p1022rdk.dts
index 29e8af1e3711..4261c2f7e4b3 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/p1022rdk.dts
+++ b/sys/contrib/device-tree/src/powerpc/fsl/p1022rdk.dts
@@ -60,23 +60,23 @@
compatible = "st,m41t62";
reg = <0x68>;
};
- adt7461@4c{
+ adt7461@4c {
compatible = "adi,adt7461";
reg = <0x4c>;
};
- zl6100@21{
+ zl6100@21 {
compatible = "isil,zl6100";
reg = <0x21>;
};
- zl6100@24{
+ zl6100@24 {
compatible = "isil,zl6100";
reg = <0x24>;
};
- zl6100@26{
+ zl6100@26 {
compatible = "isil,zl6100";
reg = <0x26>;
};
- zl6100@29{
+ zl6100@29 {
compatible = "isil,zl6100";
reg = <0x29>;
};
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/p1022si-post.dtsi b/sys/contrib/device-tree/src/powerpc/fsl/p1022si-post.dtsi
index 5f51b7bfc064..093e4e3ed368 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/p1022si-post.dtsi
+++ b/sys/contrib/device-tree/src/powerpc/fsl/p1022si-post.dtsi
@@ -238,7 +238,7 @@
fsl,has-rstcr;
};
- power@e0070{
+ power@e0070 {
compatible = "fsl,mpc8536-pmc", "fsl,mpc8548-pmc";
reg = <0xe0070 0x20>;
};
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/p3041ds.dts b/sys/contrib/device-tree/src/powerpc/fsl/p3041ds.dts
index 6f5f7283c533..ca0e0272ac62 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/p3041ds.dts
+++ b/sys/contrib/device-tree/src/powerpc/fsl/p3041ds.dts
@@ -41,7 +41,7 @@
#size-cells = <2>;
interrupt-parent = <&mpic>;
- aliases{
+ aliases {
phy_rgmii_0 = &phy_rgmii_0;
phy_rgmii_1 = &phy_rgmii_1;
phy_sgmii_1c = &phy_sgmii_1c;
@@ -165,7 +165,7 @@
};
};
- fman@400000{
+ fman@400000 {
ethernet@e0000 {
phy-handle = <&phy_sgmii_1c>;
phy-connection-type = "sgmii";
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/p5040ds.dts b/sys/contrib/device-tree/src/powerpc/fsl/p5040ds.dts
index 30850b3228e0..5cfc689ee474 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/p5040ds.dts
+++ b/sys/contrib/device-tree/src/powerpc/fsl/p5040ds.dts
@@ -41,7 +41,7 @@
#size-cells = <2>;
interrupt-parent = <&mpic>;
- aliases{
+ aliases {
phy_sgmii_slot2_1c = &phy_sgmii_slot2_1c;
phy_sgmii_slot2_1d = &phy_sgmii_slot2_1d;
phy_sgmii_slot2_1e = &phy_sgmii_slot2_1e;
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/t1023si-post.dtsi b/sys/contrib/device-tree/src/powerpc/fsl/t1023si-post.dtsi
index d552044c5afc..aa5152ca8120 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/t1023si-post.dtsi
+++ b/sys/contrib/device-tree/src/powerpc/fsl/t1023si-post.dtsi
@@ -367,45 +367,46 @@
reg = <0xf0000 0x1000>;
interrupts = <18 2 0 0>;
fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x30061>;
- fsl,tmu-calibration = <0x00000000 0x0000000f
- 0x00000001 0x00000017
- 0x00000002 0x0000001e
- 0x00000003 0x00000026
- 0x00000004 0x0000002e
- 0x00000005 0x00000035
- 0x00000006 0x0000003d
- 0x00000007 0x00000044
- 0x00000008 0x0000004c
- 0x00000009 0x00000053
- 0x0000000a 0x0000005b
- 0x0000000b 0x00000064
-
- 0x00010000 0x00000011
- 0x00010001 0x0000001c
- 0x00010002 0x00000024
- 0x00010003 0x0000002b
- 0x00010004 0x00000034
- 0x00010005 0x00000039
- 0x00010006 0x00000042
- 0x00010007 0x0000004c
- 0x00010008 0x00000051
- 0x00010009 0x0000005a
- 0x0001000a 0x00000063
-
- 0x00020000 0x00000013
- 0x00020001 0x00000019
- 0x00020002 0x00000024
- 0x00020003 0x0000002c
- 0x00020004 0x00000035
- 0x00020005 0x0000003d
- 0x00020006 0x00000046
- 0x00020007 0x00000050
- 0x00020008 0x00000059
-
- 0x00030000 0x00000002
- 0x00030001 0x0000000d
- 0x00030002 0x00000019
- 0x00030003 0x00000024>;
+ fsl,tmu-calibration =
+ <0x00000000 0x0000000f>,
+ <0x00000001 0x00000017>,
+ <0x00000002 0x0000001e>,
+ <0x00000003 0x00000026>,
+ <0x00000004 0x0000002e>,
+ <0x00000005 0x00000035>,
+ <0x00000006 0x0000003d>,
+ <0x00000007 0x00000044>,
+ <0x00000008 0x0000004c>,
+ <0x00000009 0x00000053>,
+ <0x0000000a 0x0000005b>,
+ <0x0000000b 0x00000064>,
+
+ <0x00010000 0x00000011>,
+ <0x00010001 0x0000001c>,
+ <0x00010002 0x00000024>,
+ <0x00010003 0x0000002b>,
+ <0x00010004 0x00000034>,
+ <0x00010005 0x00000039>,
+ <0x00010006 0x00000042>,
+ <0x00010007 0x0000004c>,
+ <0x00010008 0x00000051>,
+ <0x00010009 0x0000005a>,
+ <0x0001000a 0x00000063>,
+
+ <0x00020000 0x00000013>,
+ <0x00020001 0x00000019>,
+ <0x00020002 0x00000024>,
+ <0x00020003 0x0000002c>,
+ <0x00020004 0x00000035>,
+ <0x00020005 0x0000003d>,
+ <0x00020006 0x00000046>,
+ <0x00020007 0x00000050>,
+ <0x00020008 0x00000059>,
+
+ <0x00030000 0x00000002>,
+ <0x00030001 0x0000000d>,
+ <0x00030002 0x00000019>,
+ <0x00030003 0x00000024>;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/t1040si-post.dtsi b/sys/contrib/device-tree/src/powerpc/fsl/t1040si-post.dtsi
index ad0ab33336b8..776788623204 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/t1040si-post.dtsi
+++ b/sys/contrib/device-tree/src/powerpc/fsl/t1040si-post.dtsi
@@ -447,41 +447,42 @@
reg = <0xf0000 0x1000>;
interrupts = <18 2 0 0>;
fsl,tmu-range = <0xa0000 0x90026 0x8004a 0x1006a>;
- fsl,tmu-calibration = <0x00000000 0x00000025
- 0x00000001 0x00000028
- 0x00000002 0x0000002d
- 0x00000003 0x00000031
- 0x00000004 0x00000036
- 0x00000005 0x0000003a
- 0x00000006 0x00000040
- 0x00000007 0x00000044
- 0x00000008 0x0000004a
- 0x00000009 0x0000004f
- 0x0000000a 0x00000054
-
- 0x00010000 0x0000000d
- 0x00010001 0x00000013
- 0x00010002 0x00000019
- 0x00010003 0x0000001f
- 0x00010004 0x00000025
- 0x00010005 0x0000002d
- 0x00010006 0x00000033
- 0x00010007 0x00000043
- 0x00010008 0x0000004b
- 0x00010009 0x00000053
-
- 0x00020000 0x00000010
- 0x00020001 0x00000017
- 0x00020002 0x0000001f
- 0x00020003 0x00000029
- 0x00020004 0x00000031
- 0x00020005 0x0000003c
- 0x00020006 0x00000042
- 0x00020007 0x0000004d
- 0x00020008 0x00000056
-
- 0x00030000 0x00000012
- 0x00030001 0x0000001d>;
+ fsl,tmu-calibration =
+ <0x00000000 0x00000025>,
+ <0x00000001 0x00000028>,
+ <0x00000002 0x0000002d>,
+ <0x00000003 0x00000031>,
+ <0x00000004 0x00000036>,
+ <0x00000005 0x0000003a>,
+ <0x00000006 0x00000040>,
+ <0x00000007 0x00000044>,
+ <0x00000008 0x0000004a>,
+ <0x00000009 0x0000004f>,
+ <0x0000000a 0x00000054>,
+
+ <0x00010000 0x0000000d>,
+ <0x00010001 0x00000013>,
+ <0x00010002 0x00000019>,
+ <0x00010003 0x0000001f>,
+ <0x00010004 0x00000025>,
+ <0x00010005 0x0000002d>,
+ <0x00010006 0x00000033>,
+ <0x00010007 0x00000043>,
+ <0x00010008 0x0000004b>,
+ <0x00010009 0x00000053>,
+
+ <0x00020000 0x00000010>,
+ <0x00020001 0x00000017>,
+ <0x00020002 0x0000001f>,
+ <0x00020003 0x00000029>,
+ <0x00020004 0x00000031>,
+ <0x00020005 0x0000003c>,
+ <0x00020006 0x00000042>,
+ <0x00020007 0x0000004d>,
+ <0x00020008 0x00000056>,
+
+ <0x00030000 0x00000012>,
+ <0x00030001 0x0000001d>;
#thermal-sensor-cells = <1>;
};
diff --git a/sys/contrib/device-tree/src/powerpc/fsl/t4240qds.dts b/sys/contrib/device-tree/src/powerpc/fsl/t4240qds.dts
index c0913ac5aaad..128b5798bb97 100644
--- a/sys/contrib/device-tree/src/powerpc/fsl/t4240qds.dts
+++ b/sys/contrib/device-tree/src/powerpc/fsl/t4240qds.dts
@@ -41,7 +41,7 @@
#size-cells = <2>;
interrupt-parent = <&mpic>;
- aliases{
+ aliases {
phy_rgmii1 = &phyrgmii1;
phy_rgmii2 = &phyrgmii2;
phy_sgmii3 = &phy3;
diff --git a/sys/contrib/device-tree/src/powerpc/mpc5121.dtsi b/sys/contrib/device-tree/src/powerpc/mpc5121.dtsi
index 3f66b91a8e3c..d3fc8062fbcd 100644
--- a/sys/contrib/device-tree/src/powerpc/mpc5121.dtsi
+++ b/sys/contrib/device-tree/src/powerpc/mpc5121.dtsi
@@ -140,7 +140,7 @@
};
/* Power Management Controller */
- pmc@1000{
+ pmc@1000 {
compatible = "fsl,mpc5121-pmc";
reg = <0x1000 0x100>;
interrupts = <83 0x8>;
diff --git a/sys/contrib/device-tree/src/powerpc/mpc5125twr.dts b/sys/contrib/device-tree/src/powerpc/mpc5125twr.dts
index 0bd2acc0401d..ee090709aa3a 100644
--- a/sys/contrib/device-tree/src/powerpc/mpc5125twr.dts
+++ b/sys/contrib/device-tree/src/powerpc/mpc5125twr.dts
@@ -104,7 +104,7 @@
clock-names = "osc";
};
- pmc@1000{ // Power Management Controller
+ pmc@1000 { // Power Management Controller
compatible = "fsl,mpc5121-pmc";
reg = <0x1000 0x100>;
interrupts = <83 0x2>;
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-common-regulators.dtsi b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-common-regulators.dtsi
index 9b03fca2444c..ed7b12e65a10 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-common-regulators.dtsi
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-common-regulators.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>
/ {
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-dongshan-nezha-stu.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-dongshan-nezha-stu.dts
index 8785de3c9224..3a2c3281eb88 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-dongshan-nezha-stu.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-dongshan-nezha-stu.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
#include <dt-bindings/gpio/gpio.h>
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dts
index 4df8ffb71561..711450ffb602 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
#include "sun20i-d1-lichee-rv-86-panel.dtsi"
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dts
index 1874fc05359f..b217799e6166 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
#include "sun20i-d1-lichee-rv-86-panel.dtsi"
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi
index 6cc7dd0c1ae2..10116fb3935a 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
#include "sun20i-d1-lichee-rv.dts"
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-dock.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-dock.dts
index 52b91e1affed..08cf716328a0 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-dock.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv-dock.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org>
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv.dts
index d60a0562a8b1..204da82a5dc6 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-lichee-rv.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org>
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-mangopi-mq-pro.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-mangopi-mq-pro.dts
index f2e07043afb3..e2bb6bc16c13 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-mangopi-mq-pro.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-mangopi-mq-pro.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
#include <dt-bindings/gpio/gpio.h>
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-nezha.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-nezha.dts
index 4ed33c1e7c9c..8dbe717c79ce 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-nezha.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1-nezha.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>
/*
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1.dtsi b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1.dtsi
index 97e7cbb32597..b18f368e06e0 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1.dtsi
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>
#include "sun20i-d1s.dtsi"
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s-mangopi-mq.dts b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s-mangopi-mq.dts
index e6d924f671fd..1a7d6ef33f17 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s-mangopi-mq.dts
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s-mangopi-mq.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
#include <dt-bindings/gpio/gpio.h>
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s.dtsi b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s.dtsi
index 8275630af977..64c3c2e6cbe0 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s.dtsi
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sun20i-d1s.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>
#define SOC_PERIPHERAL_IRQ(nr) (nr + 16)
@@ -25,12 +25,14 @@
mmu-type = "riscv,sv39";
operating-points-v2 = <&opp_table_cpu>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
#cooling-cells = <2>;
cpu0_intc: interrupt-controller {
compatible = "riscv,cpu-intc";
interrupt-controller;
- #address-cells = <0>;
#interrupt-cells = <1>;
};
};
@@ -73,4 +75,43 @@
#interrupt-cells = <2>;
};
};
+
+ pmu {
+ compatible = "riscv,pmu";
+ riscv,event-to-mhpmcounters =
+ <0x00003 0x00003 0x00000008>,
+ <0x00004 0x00004 0x00000010>,
+ <0x00005 0x00005 0x00000200>,
+ <0x00006 0x00006 0x00000100>,
+ <0x10000 0x10000 0x00004000>,
+ <0x10001 0x10001 0x00008000>,
+ <0x10002 0x10002 0x00010000>,
+ <0x10003 0x10003 0x00020000>,
+ <0x10019 0x10019 0x00000040>,
+ <0x10021 0x10021 0x00000020>;
+ riscv,event-to-mhpmevent =
+ <0x00003 0x00000000 0x00000001>,
+ <0x00004 0x00000000 0x00000002>,
+ <0x00005 0x00000000 0x00000007>,
+ <0x00006 0x00000000 0x00000006>,
+ <0x10000 0x00000000 0x0000000c>,
+ <0x10001 0x00000000 0x0000000d>,
+ <0x10002 0x00000000 0x0000000e>,
+ <0x10003 0x00000000 0x0000000f>,
+ <0x10019 0x00000000 0x00000004>,
+ <0x10021 0x00000000 0x00000003>;
+ riscv,raw-event-to-mhpmcounters =
+ <0x00000000 0x00000001 0xffffffff 0xffffffff 0x00000008>,
+ <0x00000000 0x00000002 0xffffffff 0xffffffff 0x00000010>,
+ <0x00000000 0x00000003 0xffffffff 0xffffffff 0x00000020>,
+ <0x00000000 0x00000004 0xffffffff 0xffffffff 0x00000040>,
+ <0x00000000 0x00000005 0xffffffff 0xffffffff 0x00000080>,
+ <0x00000000 0x00000006 0xffffffff 0xffffffff 0x00000100>,
+ <0x00000000 0x00000007 0xffffffff 0xffffffff 0x00000200>,
+ <0x00000000 0x0000000b 0xffffffff 0xffffffff 0x00002000>,
+ <0x00000000 0x0000000c 0xffffffff 0xffffffff 0x00004000>,
+ <0x00000000 0x0000000d 0xffffffff 0xffffffff 0x00008000>,
+ <0x00000000 0x0000000e 0xffffffff 0xffffffff 0x00010000>,
+ <0x00000000 0x0000000f 0xffffffff 0xffffffff 0x00020000>;
+ };
};
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1-t113.dtsi b/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1-t113.dtsi
index b7156123df54..3b077dc086ab 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1-t113.dtsi
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1-t113.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>
/ {
diff --git a/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1s-t113.dtsi b/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1s-t113.dtsi
index 1bb1e5cae602..5a9d7f5a75b4 100644
--- a/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1s-t113.dtsi
+++ b/sys/contrib/device-tree/src/riscv/allwinner/sunxi-d1s-t113.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>
#include <dt-bindings/clock/sun6i-rtc.h>
@@ -53,6 +53,18 @@
#interrupt-cells = <3>;
/omit-if-no-ref/
+ can0_pins: can0-pins {
+ pins = "PB2", "PB3";
+ function = "can0";
+ };
+
+ /omit-if-no-ref/
+ can1_pins: can1-pins {
+ pins = "PB4", "PB5";
+ function = "can1";
+ };
+
+ /omit-if-no-ref/
clk_pg11_pin: clk-pg11-pin {
pins = "PG11";
function = "clk";
@@ -144,6 +156,16 @@
#reset-cells = <1>;
};
+ gpadc: adc@2009000 {
+ compatible = "allwinner,sun20i-d1-gpadc";
+ reg = <0x2009000 0x400>;
+ clocks = <&ccu CLK_BUS_GPADC>;
+ resets = <&ccu RST_BUS_GPADC>;
+ interrupts = <SOC_PERIPHERAL_IRQ(57) IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ #io-channel-cells = <1>;
+ };
+
dmic: dmic@2031000 {
compatible = "allwinner,sun20i-d1-dmic",
"allwinner,sun50i-h6-dmic";
@@ -346,6 +368,28 @@
#size-cells = <0>;
};
+ can0: can@2504000 {
+ compatible = "allwinner,sun20i-d1-can";
+ reg = <0x02504000 0x400>;
+ interrupts = <SOC_PERIPHERAL_IRQ(21) IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_CAN0>;
+ resets = <&ccu RST_BUS_CAN0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&can0_pins>;
+ status = "disabled";
+ };
+
+ can1: can@2504400 {
+ compatible = "allwinner,sun20i-d1-can";
+ reg = <0x02504400 0x400>;
+ interrupts = <SOC_PERIPHERAL_IRQ(22) IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_CAN1>;
+ resets = <&ccu RST_BUS_CAN1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&can1_pins>;
+ status = "disabled";
+ };
+
syscon: syscon@3000000 {
compatible = "allwinner,sun20i-d1-system-control";
reg = <0x3000000 0x1000>;
diff --git a/sys/contrib/device-tree/src/riscv/microchip/mpfs-icicle-kit.dts b/sys/contrib/device-tree/src/riscv/microchip/mpfs-icicle-kit.dts
index 90b261114763..222a39d90f85 100644
--- a/sys/contrib/device-tree/src/riscv/microchip/mpfs-icicle-kit.dts
+++ b/sys/contrib/device-tree/src/riscv/microchip/mpfs-icicle-kit.dts
@@ -8,9 +8,6 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
-/* Clock frequency (in Hz) of the rtcclk */
-#define RTCCLK_FREQ 1000000
-
/ {
model = "Microchip PolarFire-SoC Icicle Kit";
compatible = "microchip,mpfs-icicle-reference-rtlv2210", "microchip,mpfs-icicle-kit",
@@ -29,10 +26,6 @@
stdout-path = "serial1:115200n8";
};
- cpus {
- timebase-frequency = <RTCCLK_FREQ>;
- };
-
leds {
compatible = "gpio-leds";
@@ -199,6 +192,27 @@
status = "okay";
};
+&syscontroller_qspi {
+ /*
+ * The flash *is* there, but Icicle kits that have engineering sample
+ * silicon (write?) access to this flash to non-functional. The system
+ * controller itself can actually access it, but the MSS cannot write
+ * an image there. Instantiating a coreQSPI in the fabric & connecting
+ * it to the flash instead should work though. Pre-production or later
+ * silicon does not have this issue.
+ */
+ status = "disabled";
+
+ sys_ctrl_flash: flash@0 { // MT25QL01GBBB8ESF-0SIT
+ compatible = "jedec,spi-nor";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <20000000>;
+ spi-rx-bus-width = <1>;
+ reg = <0>;
+ };
+};
+
&usb {
status = "okay";
dr_mode = "host";
diff --git a/sys/contrib/device-tree/src/riscv/microchip/mpfs-m100pfsevp.dts b/sys/contrib/device-tree/src/riscv/microchip/mpfs-m100pfsevp.dts
index 184cb36a175e..a8d623ee9fa4 100644
--- a/sys/contrib/device-tree/src/riscv/microchip/mpfs-m100pfsevp.dts
+++ b/sys/contrib/device-tree/src/riscv/microchip/mpfs-m100pfsevp.dts
@@ -10,9 +10,6 @@
#include "mpfs.dtsi"
#include "mpfs-m100pfs-fabric.dtsi"
-/* Clock frequency (in Hz) of the rtcclk */
-#define MTIMER_FREQ 1000000
-
/ {
model = "Aries Embedded M100PFEVPS";
compatible = "aries,m100pfsevp", "microchip,mpfs";
@@ -33,10 +30,6 @@
stdout-path = "serial1:115200n8";
};
- cpus {
- timebase-frequency = <MTIMER_FREQ>;
- };
-
ddrc_cache_lo: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x40000000>;
diff --git a/sys/contrib/device-tree/src/riscv/microchip/mpfs-polarberry.dts b/sys/contrib/device-tree/src/riscv/microchip/mpfs-polarberry.dts
index c87cc2d8fe29..ea0808ab1042 100644
--- a/sys/contrib/device-tree/src/riscv/microchip/mpfs-polarberry.dts
+++ b/sys/contrib/device-tree/src/riscv/microchip/mpfs-polarberry.dts
@@ -6,9 +6,6 @@
#include "mpfs.dtsi"
#include "mpfs-polarberry-fabric.dtsi"
-/* Clock frequency (in Hz) of the rtcclk */
-#define MTIMER_FREQ 1000000
-
/ {
model = "Sundance PolarBerry";
compatible = "sundance,polarberry", "microchip,mpfs";
@@ -22,10 +19,6 @@
stdout-path = "serial0:115200n8";
};
- cpus {
- timebase-frequency = <MTIMER_FREQ>;
- };
-
ddrc_cache_lo: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x2e000000>;
diff --git a/sys/contrib/device-tree/src/riscv/microchip/mpfs-sev-kit.dts b/sys/contrib/device-tree/src/riscv/microchip/mpfs-sev-kit.dts
index 013cb666c72d..f9a890579438 100644
--- a/sys/contrib/device-tree/src/riscv/microchip/mpfs-sev-kit.dts
+++ b/sys/contrib/device-tree/src/riscv/microchip/mpfs-sev-kit.dts
@@ -6,9 +6,6 @@
#include "mpfs.dtsi"
#include "mpfs-sev-kit-fabric.dtsi"
-/* Clock frequency (in Hz) of the rtcclk */
-#define MTIMER_FREQ 1000000
-
/ {
#address-cells = <2>;
#size-cells = <2>;
@@ -28,10 +25,6 @@
stdout-path = "serial1:115200n8";
};
- cpus {
- timebase-frequency = <MTIMER_FREQ>;
- };
-
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
diff --git a/sys/contrib/device-tree/src/riscv/microchip/mpfs-tysom-m.dts b/sys/contrib/device-tree/src/riscv/microchip/mpfs-tysom-m.dts
index e0797c7e1b35..d1120f5f2c01 100644
--- a/sys/contrib/device-tree/src/riscv/microchip/mpfs-tysom-m.dts
+++ b/sys/contrib/device-tree/src/riscv/microchip/mpfs-tysom-m.dts
@@ -11,9 +11,6 @@
#include "mpfs.dtsi"
#include "mpfs-tysom-m-fabric.dtsi"
-/* Clock frequency (in Hz) of the rtcclk */
-#define MTIMER_FREQ 1000000
-
/ {
model = "Aldec TySOM-M-MPFS250T-REV2";
compatible = "aldec,tysom-m-mpfs250t-rev2", "microchip,mpfs";
@@ -34,10 +31,6 @@
stdout-path = "serial1:115200n8";
};
- cpus {
- timebase-frequency = <MTIMER_FREQ>;
- };
-
ddrc_cache_lo: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x30000000>;
diff --git a/sys/contrib/device-tree/src/riscv/microchip/mpfs.dtsi b/sys/contrib/device-tree/src/riscv/microchip/mpfs.dtsi
index 104504352e99..59fd2d4ea523 100644
--- a/sys/contrib/device-tree/src/riscv/microchip/mpfs.dtsi
+++ b/sys/contrib/device-tree/src/riscv/microchip/mpfs.dtsi
@@ -13,6 +13,7 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
+ timebase-frequency = <1000000>;
cpu0: cpu@0 {
compatible = "sifive,e51", "sifive,rocket0", "riscv";
@@ -22,6 +23,9 @@
i-cache-size = <16384>;
reg = <0>;
riscv,isa = "rv64imac";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "c", "zicntr", "zicsr", "zifencei",
+ "zihpm";
clocks = <&clkcfg CLK_CPU>;
status = "disabled";
@@ -48,6 +52,9 @@
mmu-type = "riscv,sv39";
reg = <1>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
next-level-cache = <&cctrllr>;
@@ -76,6 +83,9 @@
mmu-type = "riscv,sv39";
reg = <2>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
next-level-cache = <&cctrllr>;
@@ -104,6 +114,9 @@
mmu-type = "riscv,sv39";
reg = <3>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
next-level-cache = <&cctrllr>;
@@ -132,6 +145,9 @@
mmu-type = "riscv,sv39";
reg = <4>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
next-level-cache = <&cctrllr>;
@@ -178,6 +194,12 @@
mboxes = <&mbox 0>;
};
+ scbclk: mssclkclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <80000000>;
+ };
+
soc {
#address-cells = <2>;
#size-cells = <2>;
@@ -508,5 +530,16 @@
#mbox-cells = <1>;
status = "disabled";
};
+
+ syscontroller_qspi: spi@37020100 {
+ compatible = "microchip,mpfs-qspi", "microchip,coreqspi-rtl-v2";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0x37020100 0x0 0x100>;
+ interrupt-parent = <&plic>;
+ interrupts = <110>;
+ clocks = <&scbclk>;
+ status = "disabled";
+ };
};
};
diff --git a/sys/contrib/device-tree/src/riscv/renesas/r9a07g043f.dtsi b/sys/contrib/device-tree/src/riscv/renesas/r9a07g043f.dtsi
index 6ec1c6f9a403..a92cfcfc021b 100644
--- a/sys/contrib/device-tree/src/riscv/renesas/r9a07g043f.dtsi
+++ b/sys/contrib/device-tree/src/riscv/renesas/r9a07g043f.dtsi
@@ -24,11 +24,16 @@
reg = <0x0>;
status = "okay";
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
mmu-type = "riscv,sv39";
i-cache-size = <0x8000>;
i-cache-line-size = <0x40>;
d-cache-size = <0x8000>;
d-cache-line-size = <0x40>;
+ next-level-cache = <&l2cache>;
clocks = <&cpg CPG_CORE R9A07G043_CLK_I>;
operating-points-v2 = <&cluster0_opp>;
@@ -42,6 +47,7 @@
};
&soc {
+ dma-noncoherent;
interrupt-parent = <&plic>;
plic: interrupt-controller@12c00000 {
@@ -56,4 +62,15 @@
resets = <&cpg R9A07G043_NCEPLIC_ARESETN>;
interrupts-extended = <&cpu0_intc 11 &cpu0_intc 9>;
};
+
+ l2cache: cache-controller@13400000 {
+ compatible = "andestech,ax45mp-cache", "cache";
+ reg = <0x0 0x13400000 0x0 0x100000>;
+ interrupts = <SOC_PERIPHERAL_IRQ(476) IRQ_TYPE_LEVEL_HIGH>;
+ cache-size = <0x40000>;
+ cache-line-size = <64>;
+ cache-sets = <1024>;
+ cache-unified;
+ cache-level = <2>;
+ };
};
diff --git a/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc-som.dtsi b/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc-som.dtsi
index d6f18754eb5d..433ab5c6a626 100644
--- a/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc-som.dtsi
+++ b/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc-som.dtsi
@@ -7,39 +7,18 @@
#include <arm64/renesas/rzg2ul-smarc-som.dtsi>
-/ {
- aliases {
- /delete-property/ ethernet0;
- /delete-property/ ethernet1;
- };
-
- chosen {
- bootargs = "ignore_loglevel";
- };
-};
-
-&dmac {
- status = "disabled";
-};
-
+#if (!SW_ET0_EN_N)
&eth0 {
- status = "disabled";
-
phy0: ethernet-phy@7 {
/delete-property/ interrupt-parent;
/delete-property/ interrupts;
};
};
+#endif
&eth1 {
- status = "disabled";
-
phy1: ethernet-phy@7 {
/delete-property/ interrupt-parent;
/delete-property/ interrupts;
};
};
-
-&sdhi0 {
- status = "disabled";
-};
diff --git a/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc.dtsi b/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc.dtsi
index c07a487c4e5a..a8573fdfd8b1 100644
--- a/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc.dtsi
+++ b/sys/contrib/device-tree/src/riscv/renesas/rzfive-smarc.dtsi
@@ -6,59 +6,3 @@
*/
#include <arm64/renesas/rzg2ul-smarc.dtsi>
-
-&ehci0 {
- status = "disabled";
-};
-
-&ehci1 {
- status = "disabled";
-};
-
-&hsusb {
- status = "disabled";
-};
-
-&ohci0 {
- status = "disabled";
-};
-
-&ohci1 {
- status = "disabled";
-};
-
-&phyrst {
- status = "disabled";
-};
-
-&sdhi1 {
- status = "disabled";
-};
-
-&snd_rzg2l {
- status = "disabled";
-};
-
-&spi1 {
- status = "disabled";
-};
-
-&ssi1 {
- status = "disabled";
-};
-
-&usb0_vbus_otg {
- status = "disabled";
-};
-
-&usb2_phy0 {
- status = "disabled";
-};
-
-&usb2_phy1 {
- status = "disabled";
-};
-
-&vccq_sdhi1 {
- status = "disabled";
-};
diff --git a/sys/contrib/device-tree/src/riscv/sifive/fu540-c000.dtsi b/sys/contrib/device-tree/src/riscv/sifive/fu540-c000.dtsi
index 24bba83bec77..156330a9bbf3 100644
--- a/sys/contrib/device-tree/src/riscv/sifive/fu540-c000.dtsi
+++ b/sys/contrib/device-tree/src/riscv/sifive/fu540-c000.dtsi
@@ -30,6 +30,9 @@
i-cache-size = <16384>;
reg = <0>;
riscv,isa = "rv64imac";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "c", "zicntr", "zicsr", "zifencei",
+ "zihpm";
status = "disabled";
cpu0_intc: interrupt-controller {
#interrupt-cells = <1>;
@@ -53,6 +56,9 @@
mmu-type = "riscv,sv39";
reg = <1>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
next-level-cache = <&l2cache>;
cpu1_intc: interrupt-controller {
@@ -77,6 +83,9 @@
mmu-type = "riscv,sv39";
reg = <2>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
next-level-cache = <&l2cache>;
cpu2_intc: interrupt-controller {
@@ -101,6 +110,9 @@
mmu-type = "riscv,sv39";
reg = <3>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
next-level-cache = <&l2cache>;
cpu3_intc: interrupt-controller {
@@ -125,6 +137,9 @@
mmu-type = "riscv,sv39";
reg = <4>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
next-level-cache = <&l2cache>;
cpu4_intc: interrupt-controller {
diff --git a/sys/contrib/device-tree/src/riscv/sifive/fu740-c000.dtsi b/sys/contrib/device-tree/src/riscv/sifive/fu740-c000.dtsi
index 5235fd1c9cb6..6150f3397bff 100644
--- a/sys/contrib/device-tree/src/riscv/sifive/fu740-c000.dtsi
+++ b/sys/contrib/device-tree/src/riscv/sifive/fu740-c000.dtsi
@@ -31,6 +31,9 @@
next-level-cache = <&ccache>;
reg = <0x0>;
riscv,isa = "rv64imac";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "c", "zicntr", "zicsr", "zifencei",
+ "zihpm";
status = "disabled";
cpu0_intc: interrupt-controller {
#interrupt-cells = <1>;
@@ -55,6 +58,9 @@
next-level-cache = <&ccache>;
reg = <0x1>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
cpu1_intc: interrupt-controller {
#interrupt-cells = <1>;
@@ -79,6 +85,9 @@
next-level-cache = <&ccache>;
reg = <0x2>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
cpu2_intc: interrupt-controller {
#interrupt-cells = <1>;
@@ -103,6 +112,9 @@
next-level-cache = <&ccache>;
reg = <0x3>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
cpu3_intc: interrupt-controller {
#interrupt-cells = <1>;
@@ -127,6 +139,9 @@
next-level-cache = <&ccache>;
reg = <0x4>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
cpu4_intc: interrupt-controller {
#interrupt-cells = <1>;
diff --git a/sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts b/sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts
index 07387f9c135c..72b87b08ab44 100644
--- a/sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts
+++ b/sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts
@@ -123,6 +123,7 @@
interrupt-parent = <&gpio>;
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
+ #interrupt-cells = <2>;
onkey {
compatible = "dlg,da9063-onkey";
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv1800b-milkv-duo.dts b/sys/contrib/device-tree/src/riscv/sophgo/cv1800b-milkv-duo.dts
new file mode 100644
index 000000000000..3af9e34b3bc7
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/cv1800b-milkv-duo.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
+ */
+
+/dts-v1/;
+
+#include "cv1800b.dtsi"
+
+/ {
+ model = "Milk-V Duo";
+ compatible = "milkv,duo", "sophgo,cv1800b";
+
+ aliases {
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ serial4 = &uart4;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x3f40000>;
+ };
+};
+
+&osc {
+ clock-frequency = <25000000>;
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv1800b.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv1800b.dtsi
new file mode 100644
index 000000000000..165e9e320a8c
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/cv1800b.dtsi
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
+ */
+
+#include "cv18xx.dtsi"
+
+/ {
+ compatible = "sophgo,cv1800b";
+};
+
+&plic {
+ compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
+};
+
+&clint {
+ compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv1812h-huashan-pi.dts b/sys/contrib/device-tree/src/riscv/sophgo/cv1812h-huashan-pi.dts
new file mode 100644
index 000000000000..aa361f3a86bb
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/cv1812h-huashan-pi.dts
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
+ */
+
+/dts-v1/;
+
+#include "cv1812h.dtsi"
+
+/ {
+ model = "Huashan Pi";
+ compatible = "sophgo,huashan-pi", "sophgo,cv1812h";
+
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ serial4 = &uart4;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ coprocessor_rtos: region@8fe00000 {
+ reg = <0x8fe00000 0x200000>;
+ no-map;
+ };
+ };
+};
+
+&osc {
+ clock-frequency = <25000000>;
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv1812h.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv1812h.dtsi
new file mode 100644
index 000000000000..3e7a942f5c1a
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/cv1812h.dtsi
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "cv18xx.dtsi"
+
+/ {
+ compatible = "sophgo,cv1812h";
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x10000000>;
+ };
+};
+
+&plic {
+ compatible = "sophgo,cv1812h-plic", "thead,c900-plic";
+};
+
+&clint {
+ compatible = "sophgo,cv1812h-clint", "thead,c900-clint";
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/cv18xx.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/cv18xx.dtsi
new file mode 100644
index 000000000000..2d6f4a4b1e58
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/cv18xx.dtsi
@@ -0,0 +1,192 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
+ * Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus: cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ timebase-frequency = <25000000>;
+
+ cpu0: cpu@0 {
+ compatible = "thead,c906", "riscv";
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-block-size = <64>;
+ d-cache-sets = <512>;
+ d-cache-size = <65536>;
+ i-cache-block-size = <64>;
+ i-cache-sets = <128>;
+ i-cache-size = <32768>;
+ mmu-type = "riscv,sv39";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
+
+ cpu0_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+ };
+
+ osc: oscillator {
+ compatible = "fixed-clock";
+ clock-output-names = "osc_25m";
+ #clock-cells = <0>;
+ };
+
+ soc {
+ compatible = "simple-bus";
+ interrupt-parent = <&plic>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ dma-noncoherent;
+ ranges;
+
+ gpio0: gpio@3020000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x3020000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ porta: gpio-controller@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <60 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ gpio1: gpio@3021000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x3021000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portb: gpio-controller@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ gpio2: gpio@3022000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x3022000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portc: gpio-controller@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ gpio3: gpio@3023000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x3023000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portd: gpio-controller@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ ngpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ uart0: serial@4140000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x04140000 0x100>;
+ interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&osc>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
+ uart1: serial@4150000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x04150000 0x100>;
+ interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&osc>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
+ uart2: serial@4160000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x04160000 0x100>;
+ interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&osc>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
+ uart3: serial@4170000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x04170000 0x100>;
+ interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&osc>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
+ uart4: serial@41c0000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x041c0000 0x100>;
+ interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&osc>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
+ plic: interrupt-controller@70000000 {
+ reg = <0x70000000 0x4000000>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ riscv,ndev = <101>;
+ };
+
+ clint: timer@74000000 {
+ reg = <0x74000000 0x10000>;
+ interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/sg2042-cpus.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/sg2042-cpus.dtsi
new file mode 100644
index 000000000000..b136b6c4128c
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/sg2042-cpus.dtsi
@@ -0,0 +1,2000 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2022 Sophgo Technology Inc. All rights reserved.
+ */
+
+/ {
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ timebase-frequency = <50000000>;
+
+ cpu-map {
+ socket0 {
+ cluster0 {
+ core0 {
+ cpu = <&cpu0>;
+ };
+ core1 {
+ cpu = <&cpu1>;
+ };
+ core2 {
+ cpu = <&cpu2>;
+ };
+ core3 {
+ cpu = <&cpu3>;
+ };
+ };
+
+ cluster1 {
+ core0 {
+ cpu = <&cpu4>;
+ };
+ core1 {
+ cpu = <&cpu5>;
+ };
+ core2 {
+ cpu = <&cpu6>;
+ };
+ core3 {
+ cpu = <&cpu7>;
+ };
+ };
+
+ cluster2 {
+ core0 {
+ cpu = <&cpu16>;
+ };
+ core1 {
+ cpu = <&cpu17>;
+ };
+ core2 {
+ cpu = <&cpu18>;
+ };
+ core3 {
+ cpu = <&cpu19>;
+ };
+ };
+
+ cluster3 {
+ core0 {
+ cpu = <&cpu20>;
+ };
+ core1 {
+ cpu = <&cpu21>;
+ };
+ core2 {
+ cpu = <&cpu22>;
+ };
+ core3 {
+ cpu = <&cpu23>;
+ };
+ };
+
+ cluster4 {
+ core0 {
+ cpu = <&cpu8>;
+ };
+ core1 {
+ cpu = <&cpu9>;
+ };
+ core2 {
+ cpu = <&cpu10>;
+ };
+ core3 {
+ cpu = <&cpu11>;
+ };
+ };
+
+ cluster5 {
+ core0 {
+ cpu = <&cpu12>;
+ };
+ core1 {
+ cpu = <&cpu13>;
+ };
+ core2 {
+ cpu = <&cpu14>;
+ };
+ core3 {
+ cpu = <&cpu15>;
+ };
+ };
+
+ cluster6 {
+ core0 {
+ cpu = <&cpu24>;
+ };
+ core1 {
+ cpu = <&cpu25>;
+ };
+ core2 {
+ cpu = <&cpu26>;
+ };
+ core3 {
+ cpu = <&cpu27>;
+ };
+ };
+
+ cluster7 {
+ core0 {
+ cpu = <&cpu28>;
+ };
+ core1 {
+ cpu = <&cpu29>;
+ };
+ core2 {
+ cpu = <&cpu30>;
+ };
+ core3 {
+ cpu = <&cpu31>;
+ };
+ };
+
+ cluster8 {
+ core0 {
+ cpu = <&cpu32>;
+ };
+ core1 {
+ cpu = <&cpu33>;
+ };
+ core2 {
+ cpu = <&cpu34>;
+ };
+ core3 {
+ cpu = <&cpu35>;
+ };
+ };
+
+ cluster9 {
+ core0 {
+ cpu = <&cpu36>;
+ };
+ core1 {
+ cpu = <&cpu37>;
+ };
+ core2 {
+ cpu = <&cpu38>;
+ };
+ core3 {
+ cpu = <&cpu39>;
+ };
+ };
+
+ cluster10 {
+ core0 {
+ cpu = <&cpu48>;
+ };
+ core1 {
+ cpu = <&cpu49>;
+ };
+ core2 {
+ cpu = <&cpu50>;
+ };
+ core3 {
+ cpu = <&cpu51>;
+ };
+ };
+
+ cluster11 {
+ core0 {
+ cpu = <&cpu52>;
+ };
+ core1 {
+ cpu = <&cpu53>;
+ };
+ core2 {
+ cpu = <&cpu54>;
+ };
+ core3 {
+ cpu = <&cpu55>;
+ };
+ };
+
+ cluster12 {
+ core0 {
+ cpu = <&cpu40>;
+ };
+ core1 {
+ cpu = <&cpu41>;
+ };
+ core2 {
+ cpu = <&cpu42>;
+ };
+ core3 {
+ cpu = <&cpu43>;
+ };
+ };
+
+ cluster13 {
+ core0 {
+ cpu = <&cpu44>;
+ };
+ core1 {
+ cpu = <&cpu45>;
+ };
+ core2 {
+ cpu = <&cpu46>;
+ };
+ core3 {
+ cpu = <&cpu47>;
+ };
+ };
+
+ cluster14 {
+ core0 {
+ cpu = <&cpu56>;
+ };
+ core1 {
+ cpu = <&cpu57>;
+ };
+ core2 {
+ cpu = <&cpu58>;
+ };
+ core3 {
+ cpu = <&cpu59>;
+ };
+ };
+
+ cluster15 {
+ core0 {
+ cpu = <&cpu60>;
+ };
+ core1 {
+ cpu = <&cpu61>;
+ };
+ core2 {
+ cpu = <&cpu62>;
+ };
+ core3 {
+ cpu = <&cpu63>;
+ };
+ };
+ };
+ };
+
+ cpu0: cpu@0 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <0>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache0>;
+ mmu-type = "riscv,sv39";
+
+ cpu0_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu1: cpu@1 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <1>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache0>;
+ mmu-type = "riscv,sv39";
+
+ cpu1_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu2: cpu@2 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <2>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache0>;
+ mmu-type = "riscv,sv39";
+
+ cpu2_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu3: cpu@3 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <3>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache0>;
+ mmu-type = "riscv,sv39";
+
+ cpu3_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu4: cpu@4 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <4>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache1>;
+ mmu-type = "riscv,sv39";
+
+ cpu4_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu5: cpu@5 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <5>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache1>;
+ mmu-type = "riscv,sv39";
+
+ cpu5_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu6: cpu@6 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <6>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache1>;
+ mmu-type = "riscv,sv39";
+
+ cpu6_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu7: cpu@7 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <7>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache1>;
+ mmu-type = "riscv,sv39";
+
+ cpu7_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu8: cpu@8 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <8>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache4>;
+ mmu-type = "riscv,sv39";
+
+ cpu8_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu9: cpu@9 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <9>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache4>;
+ mmu-type = "riscv,sv39";
+
+ cpu9_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu10: cpu@10 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <10>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache4>;
+ mmu-type = "riscv,sv39";
+
+ cpu10_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu11: cpu@11 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <11>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache4>;
+ mmu-type = "riscv,sv39";
+
+ cpu11_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu12: cpu@12 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <12>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache5>;
+ mmu-type = "riscv,sv39";
+
+ cpu12_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu13: cpu@13 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <13>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache5>;
+ mmu-type = "riscv,sv39";
+
+ cpu13_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu14: cpu@14 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <14>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache5>;
+ mmu-type = "riscv,sv39";
+
+ cpu14_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu15: cpu@15 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <15>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache5>;
+ mmu-type = "riscv,sv39";
+
+ cpu15_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu16: cpu@16 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <16>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache2>;
+ mmu-type = "riscv,sv39";
+
+ cpu16_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu17: cpu@17 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <17>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache2>;
+ mmu-type = "riscv,sv39";
+
+ cpu17_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu18: cpu@18 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <18>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache2>;
+ mmu-type = "riscv,sv39";
+
+ cpu18_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu19: cpu@19 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <19>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache2>;
+ mmu-type = "riscv,sv39";
+
+ cpu19_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu20: cpu@20 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <20>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache3>;
+ mmu-type = "riscv,sv39";
+
+ cpu20_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu21: cpu@21 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <21>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache3>;
+ mmu-type = "riscv,sv39";
+
+ cpu21_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu22: cpu@22 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <22>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache3>;
+ mmu-type = "riscv,sv39";
+
+ cpu22_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu23: cpu@23 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <23>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache3>;
+ mmu-type = "riscv,sv39";
+
+ cpu23_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu24: cpu@24 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <24>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache6>;
+ mmu-type = "riscv,sv39";
+
+ cpu24_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu25: cpu@25 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <25>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache6>;
+ mmu-type = "riscv,sv39";
+
+ cpu25_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu26: cpu@26 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <26>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache6>;
+ mmu-type = "riscv,sv39";
+
+ cpu26_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu27: cpu@27 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <27>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache6>;
+ mmu-type = "riscv,sv39";
+
+ cpu27_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu28: cpu@28 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <28>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache7>;
+ mmu-type = "riscv,sv39";
+
+ cpu28_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu29: cpu@29 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <29>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache7>;
+ mmu-type = "riscv,sv39";
+
+ cpu29_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu30: cpu@30 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <30>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache7>;
+ mmu-type = "riscv,sv39";
+
+ cpu30_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu31: cpu@31 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <31>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache7>;
+ mmu-type = "riscv,sv39";
+
+ cpu31_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu32: cpu@32 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <32>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache8>;
+ mmu-type = "riscv,sv39";
+
+ cpu32_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu33: cpu@33 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <33>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache8>;
+ mmu-type = "riscv,sv39";
+
+ cpu33_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu34: cpu@34 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <34>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache8>;
+ mmu-type = "riscv,sv39";
+
+ cpu34_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu35: cpu@35 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <35>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache8>;
+ mmu-type = "riscv,sv39";
+
+ cpu35_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu36: cpu@36 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <36>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache9>;
+ mmu-type = "riscv,sv39";
+
+ cpu36_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu37: cpu@37 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <37>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache9>;
+ mmu-type = "riscv,sv39";
+
+ cpu37_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu38: cpu@38 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <38>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache9>;
+ mmu-type = "riscv,sv39";
+
+ cpu38_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu39: cpu@39 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <39>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache9>;
+ mmu-type = "riscv,sv39";
+
+ cpu39_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu40: cpu@40 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <40>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache12>;
+ mmu-type = "riscv,sv39";
+
+ cpu40_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu41: cpu@41 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <41>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache12>;
+ mmu-type = "riscv,sv39";
+
+ cpu41_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu42: cpu@42 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <42>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache12>;
+ mmu-type = "riscv,sv39";
+
+ cpu42_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu43: cpu@43 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <43>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache12>;
+ mmu-type = "riscv,sv39";
+
+ cpu43_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu44: cpu@44 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <44>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache13>;
+ mmu-type = "riscv,sv39";
+
+ cpu44_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu45: cpu@45 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <45>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache13>;
+ mmu-type = "riscv,sv39";
+
+ cpu45_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu46: cpu@46 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <46>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache13>;
+ mmu-type = "riscv,sv39";
+
+ cpu46_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu47: cpu@47 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <47>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache13>;
+ mmu-type = "riscv,sv39";
+
+ cpu47_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu48: cpu@48 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <48>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache10>;
+ mmu-type = "riscv,sv39";
+
+ cpu48_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu49: cpu@49 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <49>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache10>;
+ mmu-type = "riscv,sv39";
+
+ cpu49_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu50: cpu@50 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <50>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache10>;
+ mmu-type = "riscv,sv39";
+
+ cpu50_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu51: cpu@51 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <51>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache10>;
+ mmu-type = "riscv,sv39";
+
+ cpu51_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu52: cpu@52 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <52>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache11>;
+ mmu-type = "riscv,sv39";
+
+ cpu52_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu53: cpu@53 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <53>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache11>;
+ mmu-type = "riscv,sv39";
+
+ cpu53_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu54: cpu@54 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <54>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache11>;
+ mmu-type = "riscv,sv39";
+
+ cpu54_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu55: cpu@55 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <55>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache11>;
+ mmu-type = "riscv,sv39";
+
+ cpu55_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu56: cpu@56 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <56>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache14>;
+ mmu-type = "riscv,sv39";
+
+ cpu56_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu57: cpu@57 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <57>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache14>;
+ mmu-type = "riscv,sv39";
+
+ cpu57_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu58: cpu@58 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <58>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache14>;
+ mmu-type = "riscv,sv39";
+
+ cpu58_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu59: cpu@59 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <59>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache14>;
+ mmu-type = "riscv,sv39";
+
+ cpu59_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu60: cpu@60 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <60>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache15>;
+ mmu-type = "riscv,sv39";
+
+ cpu60_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu61: cpu@61 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <61>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache15>;
+ mmu-type = "riscv,sv39";
+
+ cpu61_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu62: cpu@62 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <62>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache15>;
+ mmu-type = "riscv,sv39";
+
+ cpu62_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ cpu63: cpu@63 {
+ compatible = "thead,c920", "riscv";
+ device_type = "cpu";
+ riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+ "zicntr", "zicsr", "zifencei",
+ "zihpm";
+ reg = <63>;
+ i-cache-block-size = <64>;
+ i-cache-size = <65536>;
+ i-cache-sets = <512>;
+ d-cache-block-size = <64>;
+ d-cache-size = <65536>;
+ d-cache-sets = <512>;
+ next-level-cache = <&l2_cache15>;
+ mmu-type = "riscv,sv39";
+
+ cpu63_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ l2_cache0: cache-controller-0 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache1: cache-controller-1 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache2: cache-controller-2 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache3: cache-controller-3 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache4: cache-controller-4 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache5: cache-controller-5 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache6: cache-controller-6 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache7: cache-controller-7 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache8: cache-controller-8 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache9: cache-controller-9 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache10: cache-controller-10 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache11: cache-controller-11 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache12: cache-controller-12 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache13: cache-controller-13 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache14: cache-controller-14 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+
+ l2_cache15: cache-controller-15 {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <1048576>;
+ cache-sets = <1024>;
+ cache-unified;
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/sg2042-milkv-pioneer.dts b/sys/contrib/device-tree/src/riscv/sophgo/sg2042-milkv-pioneer.dts
new file mode 100644
index 000000000000..49b4b9c2c101
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/sg2042-milkv-pioneer.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2022 Sophgo Technology Inc. All rights reserved.
+ */
+
+#include "sg2042.dtsi"
+
+/ {
+ model = "Milk-V Pioneer";
+ compatible = "milkv,pioneer", "sophgo,sg2042";
+
+ chosen {
+ stdout-path = "serial0";
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/riscv/sophgo/sg2042.dtsi b/sys/contrib/device-tree/src/riscv/sophgo/sg2042.dtsi
new file mode 100644
index 000000000000..ead1cc35d88b
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/sophgo/sg2042.dtsi
@@ -0,0 +1,341 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2022 Sophgo Technology Inc. All rights reserved.
+ */
+
+/dts-v1/;
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "sg2042-cpus.dtsi"
+
+/ {
+ compatible = "sophgo,sg2042";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-noncoherent;
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ soc: soc {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ clint_mswi: interrupt-controller@7094000000 {
+ compatible = "sophgo,sg2042-aclint-mswi", "thead,c900-aclint-mswi";
+ reg = <0x00000070 0x94000000 0x00000000 0x00004000>;
+ interrupts-extended = <&cpu0_intc 3>,
+ <&cpu1_intc 3>,
+ <&cpu2_intc 3>,
+ <&cpu3_intc 3>,
+ <&cpu4_intc 3>,
+ <&cpu5_intc 3>,
+ <&cpu6_intc 3>,
+ <&cpu7_intc 3>,
+ <&cpu8_intc 3>,
+ <&cpu9_intc 3>,
+ <&cpu10_intc 3>,
+ <&cpu11_intc 3>,
+ <&cpu12_intc 3>,
+ <&cpu13_intc 3>,
+ <&cpu14_intc 3>,
+ <&cpu15_intc 3>,
+ <&cpu16_intc 3>,
+ <&cpu17_intc 3>,
+ <&cpu18_intc 3>,
+ <&cpu19_intc 3>,
+ <&cpu20_intc 3>,
+ <&cpu21_intc 3>,
+ <&cpu22_intc 3>,
+ <&cpu23_intc 3>,
+ <&cpu24_intc 3>,
+ <&cpu25_intc 3>,
+ <&cpu26_intc 3>,
+ <&cpu27_intc 3>,
+ <&cpu28_intc 3>,
+ <&cpu29_intc 3>,
+ <&cpu30_intc 3>,
+ <&cpu31_intc 3>,
+ <&cpu32_intc 3>,
+ <&cpu33_intc 3>,
+ <&cpu34_intc 3>,
+ <&cpu35_intc 3>,
+ <&cpu36_intc 3>,
+ <&cpu37_intc 3>,
+ <&cpu38_intc 3>,
+ <&cpu39_intc 3>,
+ <&cpu40_intc 3>,
+ <&cpu41_intc 3>,
+ <&cpu42_intc 3>,
+ <&cpu43_intc 3>,
+ <&cpu44_intc 3>,
+ <&cpu45_intc 3>,
+ <&cpu46_intc 3>,
+ <&cpu47_intc 3>,
+ <&cpu48_intc 3>,
+ <&cpu49_intc 3>,
+ <&cpu50_intc 3>,
+ <&cpu51_intc 3>,
+ <&cpu52_intc 3>,
+ <&cpu53_intc 3>,
+ <&cpu54_intc 3>,
+ <&cpu55_intc 3>,
+ <&cpu56_intc 3>,
+ <&cpu57_intc 3>,
+ <&cpu58_intc 3>,
+ <&cpu59_intc 3>,
+ <&cpu60_intc 3>,
+ <&cpu61_intc 3>,
+ <&cpu62_intc 3>,
+ <&cpu63_intc 3>;
+ };
+
+ clint_mtimer0: timer@70ac004000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac004000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu0_intc 7>,
+ <&cpu1_intc 7>,
+ <&cpu2_intc 7>,
+ <&cpu3_intc 7>;
+ };
+
+ clint_mtimer1: timer@70ac014000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac014000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu4_intc 7>,
+ <&cpu5_intc 7>,
+ <&cpu6_intc 7>,
+ <&cpu7_intc 7>;
+ };
+
+ clint_mtimer2: timer@70ac024000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac024000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu8_intc 7>,
+ <&cpu9_intc 7>,
+ <&cpu10_intc 7>,
+ <&cpu11_intc 7>;
+ };
+
+ clint_mtimer3: timer@70ac034000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac034000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu12_intc 7>,
+ <&cpu13_intc 7>,
+ <&cpu14_intc 7>,
+ <&cpu15_intc 7>;
+ };
+
+ clint_mtimer4: timer@70ac044000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac044000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu16_intc 7>,
+ <&cpu17_intc 7>,
+ <&cpu18_intc 7>,
+ <&cpu19_intc 7>;
+ };
+
+ clint_mtimer5: timer@70ac054000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac054000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu20_intc 7>,
+ <&cpu21_intc 7>,
+ <&cpu22_intc 7>,
+ <&cpu23_intc 7>;
+ };
+
+ clint_mtimer6: timer@70ac064000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac064000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu24_intc 7>,
+ <&cpu25_intc 7>,
+ <&cpu26_intc 7>,
+ <&cpu27_intc 7>;
+ };
+
+ clint_mtimer7: timer@70ac074000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac074000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu28_intc 7>,
+ <&cpu29_intc 7>,
+ <&cpu30_intc 7>,
+ <&cpu31_intc 7>;
+ };
+
+ clint_mtimer8: timer@70ac084000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac084000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu32_intc 7>,
+ <&cpu33_intc 7>,
+ <&cpu34_intc 7>,
+ <&cpu35_intc 7>;
+ };
+
+ clint_mtimer9: timer@70ac094000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac094000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu36_intc 7>,
+ <&cpu37_intc 7>,
+ <&cpu38_intc 7>,
+ <&cpu39_intc 7>;
+ };
+
+ clint_mtimer10: timer@70ac0a4000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac0a4000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu40_intc 7>,
+ <&cpu41_intc 7>,
+ <&cpu42_intc 7>,
+ <&cpu43_intc 7>;
+ };
+
+ clint_mtimer11: timer@70ac0b4000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac0b4000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu44_intc 7>,
+ <&cpu45_intc 7>,
+ <&cpu46_intc 7>,
+ <&cpu47_intc 7>;
+ };
+
+ clint_mtimer12: timer@70ac0c4000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac0c4000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu48_intc 7>,
+ <&cpu49_intc 7>,
+ <&cpu50_intc 7>,
+ <&cpu51_intc 7>;
+ };
+
+ clint_mtimer13: timer@70ac0d4000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac0d4000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu52_intc 7>,
+ <&cpu53_intc 7>,
+ <&cpu54_intc 7>,
+ <&cpu55_intc 7>;
+ };
+
+ clint_mtimer14: timer@70ac0e4000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac0e4000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu56_intc 7>,
+ <&cpu57_intc 7>,
+ <&cpu58_intc 7>,
+ <&cpu59_intc 7>;
+ };
+
+ clint_mtimer15: timer@70ac0f4000 {
+ compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
+ reg = <0x00000070 0xac0f4000 0x00000000 0x0000c000>;
+ reg-names = "mtimecmp";
+ interrupts-extended = <&cpu60_intc 7>,
+ <&cpu61_intc 7>,
+ <&cpu62_intc 7>,
+ <&cpu63_intc 7>;
+ };
+
+ intc: interrupt-controller@7090000000 {
+ compatible = "sophgo,sg2042-plic", "thead,c900-plic";
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ reg = <0x00000070 0x90000000 0x00000000 0x04000000>;
+ interrupt-controller;
+ interrupts-extended =
+ <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>,
+ <&cpu2_intc 11>, <&cpu2_intc 9>,
+ <&cpu3_intc 11>, <&cpu3_intc 9>,
+ <&cpu4_intc 11>, <&cpu4_intc 9>,
+ <&cpu5_intc 11>, <&cpu5_intc 9>,
+ <&cpu6_intc 11>, <&cpu6_intc 9>,
+ <&cpu7_intc 11>, <&cpu7_intc 9>,
+ <&cpu8_intc 11>, <&cpu8_intc 9>,
+ <&cpu9_intc 11>, <&cpu9_intc 9>,
+ <&cpu10_intc 11>, <&cpu10_intc 9>,
+ <&cpu11_intc 11>, <&cpu11_intc 9>,
+ <&cpu12_intc 11>, <&cpu12_intc 9>,
+ <&cpu13_intc 11>, <&cpu13_intc 9>,
+ <&cpu14_intc 11>, <&cpu14_intc 9>,
+ <&cpu15_intc 11>, <&cpu15_intc 9>,
+ <&cpu16_intc 11>, <&cpu16_intc 9>,
+ <&cpu17_intc 11>, <&cpu17_intc 9>,
+ <&cpu18_intc 11>, <&cpu18_intc 9>,
+ <&cpu19_intc 11>, <&cpu19_intc 9>,
+ <&cpu20_intc 11>, <&cpu20_intc 9>,
+ <&cpu21_intc 11>, <&cpu21_intc 9>,
+ <&cpu22_intc 11>, <&cpu22_intc 9>,
+ <&cpu23_intc 11>, <&cpu23_intc 9>,
+ <&cpu24_intc 11>, <&cpu24_intc 9>,
+ <&cpu25_intc 11>, <&cpu25_intc 9>,
+ <&cpu26_intc 11>, <&cpu26_intc 9>,
+ <&cpu27_intc 11>, <&cpu27_intc 9>,
+ <&cpu28_intc 11>, <&cpu28_intc 9>,
+ <&cpu29_intc 11>, <&cpu29_intc 9>,
+ <&cpu30_intc 11>, <&cpu30_intc 9>,
+ <&cpu31_intc 11>, <&cpu31_intc 9>,
+ <&cpu32_intc 11>, <&cpu32_intc 9>,
+ <&cpu33_intc 11>, <&cpu33_intc 9>,
+ <&cpu34_intc 11>, <&cpu34_intc 9>,
+ <&cpu35_intc 11>, <&cpu35_intc 9>,
+ <&cpu36_intc 11>, <&cpu36_intc 9>,
+ <&cpu37_intc 11>, <&cpu37_intc 9>,
+ <&cpu38_intc 11>, <&cpu38_intc 9>,
+ <&cpu39_intc 11>, <&cpu39_intc 9>,
+ <&cpu40_intc 11>, <&cpu40_intc 9>,
+ <&cpu41_intc 11>, <&cpu41_intc 9>,
+ <&cpu42_intc 11>, <&cpu42_intc 9>,
+ <&cpu43_intc 11>, <&cpu43_intc 9>,
+ <&cpu44_intc 11>, <&cpu44_intc 9>,
+ <&cpu45_intc 11>, <&cpu45_intc 9>,
+ <&cpu46_intc 11>, <&cpu46_intc 9>,
+ <&cpu47_intc 11>, <&cpu47_intc 9>,
+ <&cpu48_intc 11>, <&cpu48_intc 9>,
+ <&cpu49_intc 11>, <&cpu49_intc 9>,
+ <&cpu50_intc 11>, <&cpu50_intc 9>,
+ <&cpu51_intc 11>, <&cpu51_intc 9>,
+ <&cpu52_intc 11>, <&cpu52_intc 9>,
+ <&cpu53_intc 11>, <&cpu53_intc 9>,
+ <&cpu54_intc 11>, <&cpu54_intc 9>,
+ <&cpu55_intc 11>, <&cpu55_intc 9>,
+ <&cpu56_intc 11>, <&cpu56_intc 9>,
+ <&cpu57_intc 11>, <&cpu57_intc 9>,
+ <&cpu58_intc 11>, <&cpu58_intc 9>,
+ <&cpu59_intc 11>, <&cpu59_intc 9>,
+ <&cpu60_intc 11>, <&cpu60_intc 9>,
+ <&cpu61_intc 11>, <&cpu61_intc 9>,
+ <&cpu62_intc 11>, <&cpu62_intc 9>,
+ <&cpu63_intc 11>, <&cpu63_intc 9>;
+ riscv,ndev = <224>;
+ };
+
+ uart0: serial@7040000000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x00000070 0x40000000 0x00000000 0x00001000>;
+ interrupt-parent = <&intc>;
+ interrupts = <112 IRQ_TYPE_LEVEL_HIGH>;
+ clock-frequency = <500000000>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+ };
+};
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7100-common.dtsi b/sys/contrib/device-tree/src/riscv/starfive/jh7100-common.dtsi
index b93ce351a90f..42fb61c36068 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7100-common.dtsi
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7100-common.dtsi
@@ -12,6 +12,8 @@
/ {
aliases {
+ mmc0 = &sdio0;
+ mmc1 = &sdio1;
serial0 = &uart3;
};
@@ -39,6 +41,35 @@
label = "ack";
};
};
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ dma-reserved@fa000000 {
+ reg = <0x0 0xfa000000 0x0 0x1000000>;
+ no-map;
+ };
+
+ linux,dma@107a000000 {
+ compatible = "shared-dma-pool";
+ reg = <0x10 0x7a000000 0x0 0x1000000>;
+ no-map;
+ linux,dma-default;
+ };
+ };
+
+ soc {
+ dma-ranges = <0x00 0x80000000 0x00 0x80000000 0x00 0x7a000000>,
+ <0x00 0xfa000000 0x10 0x7a000000 0x00 0x01000000>,
+ <0x00 0xfb000000 0x00 0xfb000000 0x07 0x85000000>;
+ };
+
+ wifi_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
};
&gpio {
@@ -84,6 +115,78 @@
};
};
+ sdio0_pins: sdio0-0 {
+ clk-pins {
+ pinmux = <GPIOMUX(54, GPO_SDIO0_PAD_CCLK_OUT,
+ GPO_ENABLE, GPI_NONE)>;
+ bias-disable;
+ input-disable;
+ input-schmitt-disable;
+ };
+ sdio-pins {
+ pinmux = <GPIOMUX(55, GPO_LOW, GPO_DISABLE,
+ GPI_SDIO0_PAD_CARD_DETECT_N)>,
+ <GPIOMUX(53,
+ GPO_SDIO0_PAD_CCMD_OUT,
+ GPO_SDIO0_PAD_CCMD_OEN,
+ GPI_SDIO0_PAD_CCMD_IN)>,
+ <GPIOMUX(49,
+ GPO_SDIO0_PAD_CDATA_OUT_BIT0,
+ GPO_SDIO0_PAD_CDATA_OEN_BIT0,
+ GPI_SDIO0_PAD_CDATA_IN_BIT0)>,
+ <GPIOMUX(50,
+ GPO_SDIO0_PAD_CDATA_OUT_BIT1,
+ GPO_SDIO0_PAD_CDATA_OEN_BIT1,
+ GPI_SDIO0_PAD_CDATA_IN_BIT1)>,
+ <GPIOMUX(51,
+ GPO_SDIO0_PAD_CDATA_OUT_BIT2,
+ GPO_SDIO0_PAD_CDATA_OEN_BIT2,
+ GPI_SDIO0_PAD_CDATA_IN_BIT2)>,
+ <GPIOMUX(52,
+ GPO_SDIO0_PAD_CDATA_OUT_BIT3,
+ GPO_SDIO0_PAD_CDATA_OEN_BIT3,
+ GPI_SDIO0_PAD_CDATA_IN_BIT3)>;
+ bias-pull-up;
+ input-enable;
+ input-schmitt-enable;
+ };
+ };
+
+ sdio1_pins: sdio1-0 {
+ clk-pins {
+ pinmux = <GPIOMUX(33, GPO_SDIO1_PAD_CCLK_OUT,
+ GPO_ENABLE, GPI_NONE)>;
+ bias-disable;
+ input-disable;
+ input-schmitt-disable;
+ };
+ sdio-pins {
+ pinmux = <GPIOMUX(29,
+ GPO_SDIO1_PAD_CCMD_OUT,
+ GPO_SDIO1_PAD_CCMD_OEN,
+ GPI_SDIO1_PAD_CCMD_IN)>,
+ <GPIOMUX(36,
+ GPO_SDIO1_PAD_CDATA_OUT_BIT0,
+ GPO_SDIO1_PAD_CDATA_OEN_BIT0,
+ GPI_SDIO1_PAD_CDATA_IN_BIT0)>,
+ <GPIOMUX(30,
+ GPO_SDIO1_PAD_CDATA_OUT_BIT1,
+ GPO_SDIO1_PAD_CDATA_OEN_BIT1,
+ GPI_SDIO1_PAD_CDATA_IN_BIT1)>,
+ <GPIOMUX(34,
+ GPO_SDIO1_PAD_CDATA_OUT_BIT2,
+ GPO_SDIO1_PAD_CDATA_OEN_BIT2,
+ GPI_SDIO1_PAD_CDATA_IN_BIT2)>,
+ <GPIOMUX(31,
+ GPO_SDIO1_PAD_CDATA_OUT_BIT3,
+ GPO_SDIO1_PAD_CDATA_OEN_BIT3,
+ GPI_SDIO1_PAD_CDATA_IN_BIT3)>;
+ bias-pull-up;
+ input-enable;
+ input-schmitt-enable;
+ };
+ };
+
uart3_pins: uart3-0 {
rx-pins {
pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
@@ -154,6 +257,34 @@
clock-frequency = <27000000>;
};
+&sdio0 {
+ broken-cd;
+ bus-width = <4>;
+ cap-sd-highspeed;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio0_pins>;
+ status = "okay";
+};
+
+&sdio1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ cap-power-off-card;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio1_pins>;
+ status = "okay";
+
+ wifi@1 {
+ compatible = "brcm,bcm4329-fmac";
+ reg = <1>;
+ };
+};
+
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7100.dtsi b/sys/contrib/device-tree/src/riscv/starfive/jh7100.dtsi
index 4218621ea3b9..8bcf36d07f3f 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7100.dtsi
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7100.dtsi
@@ -32,7 +32,11 @@
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
+ next-level-cache = <&ccache>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
cpu0_intc: interrupt-controller {
@@ -57,7 +61,11 @@
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
+ next-level-cache = <&ccache>;
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
tlb-split;
cpu1_intc: interrupt-controller {
@@ -80,28 +88,53 @@
};
};
- osc_sys: osc_sys {
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <15000>;
+
+ thermal-sensors = <&sfctemp>;
+
+ trips {
+ cpu-alert0 {
+ /* milliCelsius */
+ temperature = <75000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu-crit {
+ /* milliCelsius */
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
+ osc_sys: osc-sys {
compatible = "fixed-clock";
#clock-cells = <0>;
/* This value must be overridden by the board */
clock-frequency = <0>;
};
- osc_aud: osc_aud {
+ osc_aud: osc-aud {
compatible = "fixed-clock";
#clock-cells = <0>;
/* This value must be overridden by the board */
clock-frequency = <0>;
};
- gmac_rmii_ref: gmac_rmii_ref {
+ gmac_rmii_ref: gmac-rmii-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
/* Should be overridden by the board when needed */
clock-frequency = <0>;
};
- gmac_gr_mii_rxclk: gmac_gr_mii_rxclk {
+ gmac_gr_mii_rxclk: gmac-gr-mii-rxclk {
compatible = "fixed-clock";
#clock-cells = <0>;
/* Should be overridden by the board when needed */
@@ -113,26 +146,64 @@
interrupt-parent = <&plic>;
#address-cells = <2>;
#size-cells = <2>;
+ dma-noncoherent;
ranges;
clint: clint@2000000 {
compatible = "starfive,jh7100-clint", "sifive,clint0";
reg = <0x0 0x2000000 0x0 0x10000>;
- interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
- &cpu1_intc 3 &cpu1_intc 7>;
+ interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
+ <&cpu1_intc 3>, <&cpu1_intc 7>;
+ };
+
+ ccache: cache-controller@2010000 {
+ compatible = "starfive,jh7100-ccache", "sifive,ccache0", "cache";
+ reg = <0x0 0x2010000 0x0 0x1000>;
+ interrupts = <128>, <130>, <131>, <129>;
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-sets = <2048>;
+ cache-size = <2097152>;
+ cache-unified;
};
plic: interrupt-controller@c000000 {
compatible = "starfive,jh7100-plic", "sifive,plic-1.0.0";
reg = <0x0 0xc000000 0x0 0x4000000>;
- interrupts-extended = <&cpu0_intc 11 &cpu0_intc 9
- &cpu1_intc 11 &cpu1_intc 9>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>;
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
riscv,ndev = <133>;
};
+ sdio0: mmc@10000000 {
+ compatible = "snps,dw-mshc";
+ reg = <0x0 0x10000000 0x0 0x10000>;
+ clocks = <&clkgen JH7100_CLK_SDIO0_AHB>,
+ <&clkgen JH7100_CLK_SDIO0_CCLKINT_INV>;
+ clock-names = "biu", "ciu";
+ interrupts = <4>;
+ data-addr = <0>;
+ fifo-depth = <32>;
+ fifo-watermark-aligned;
+ status = "disabled";
+ };
+
+ sdio1: mmc@10010000 {
+ compatible = "snps,dw-mshc";
+ reg = <0x0 0x10010000 0x0 0x10000>;
+ clocks = <&clkgen JH7100_CLK_SDIO1_AHB>,
+ <&clkgen JH7100_CLK_SDIO1_CCLKINT_INV>;
+ clock-names = "biu", "ciu";
+ interrupts = <5>;
+ data-addr = <0>;
+ fifo-depth = <32>;
+ fifo-watermark-aligned;
+ status = "disabled";
+ };
+
clkgen: clock-controller@11800000 {
compatible = "starfive,jh7100-clkgen";
reg = <0x0 0x11800000 0x0 0x10000>;
@@ -248,5 +319,17 @@
resets = <&rstgen JH7100_RSTN_WDTIMER_APB>,
<&rstgen JH7100_RSTN_WDT>;
};
+
+ sfctemp: temperature-sensor@124a0000 {
+ compatible = "starfive,jh7100-temp";
+ reg = <0x0 0x124a0000 0x0 0x10000>;
+ clocks = <&clkgen JH7100_CLK_TEMP_SENSE>,
+ <&clkgen JH7100_CLK_TEMP_APB>;
+ clock-names = "sense", "bus";
+ resets = <&rstgen JH7100_RSTN_TEMP_SENSE>,
+ <&rstgen JH7100_RSTN_TEMP_APB>;
+ reset-names = "sense", "bus";
+ #thermal-sensor-cells = <0>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7110-pinfunc.h b/sys/contrib/device-tree/src/riscv/starfive/jh7110-pinfunc.h
index fb0139b56723..256de17f5261 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7110-pinfunc.h
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7110-pinfunc.h
@@ -240,8 +240,8 @@
#define GPI_SYS_MCLK_EXT 30
#define GPI_SYS_I2SRX_BCLK 31
#define GPI_SYS_I2SRX_LRCK 32
-#define GPI_SYS_I2STX0_BCLK 33
-#define GPI_SYS_I2STX0_LRCK 34
+#define GPI_SYS_I2STX1_BCLK 33
+#define GPI_SYS_I2STX1_LRCK 34
#define GPI_SYS_TDM_CLK 35
#define GPI_SYS_TDM_RXD 36
#define GPI_SYS_TDM_SYNC 37
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dts b/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dts
index 4af3300f3cf3..205a13d8c8b1 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dts
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dts
@@ -11,3 +11,16 @@
model = "StarFive VisionFive 2 v1.2A";
compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110";
};
+
+&gmac1 {
+ phy-mode = "rmii";
+ assigned-clocks = <&syscrg JH7110_SYSCLK_GMAC1_TX>,
+ <&syscrg JH7110_SYSCLK_GMAC1_RX>;
+ assigned-clock-parents = <&syscrg JH7110_SYSCLK_GMAC1_RMII_RTX>,
+ <&syscrg JH7110_SYSCLK_GMAC1_RMII_RTX>;
+};
+
+&phy0 {
+ rx-internal-delay-ps = <1900>;
+ tx-internal-delay-ps = <1350>;
+};
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dts b/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dts
index 9230cc3d8946..d4ea4a2c0b9b 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dts
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dts
@@ -11,3 +11,34 @@
model = "StarFive VisionFive 2 v1.3B";
compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
};
+
+&gmac0 {
+ starfive,tx-use-rgmii-clk;
+ assigned-clocks = <&aoncrg JH7110_AONCLK_GMAC0_TX>;
+ assigned-clock-parents = <&aoncrg JH7110_AONCLK_GMAC0_RMII_RTX>;
+};
+
+&gmac1 {
+ starfive,tx-use-rgmii-clk;
+ assigned-clocks = <&syscrg JH7110_SYSCLK_GMAC1_TX>;
+ assigned-clock-parents = <&syscrg JH7110_SYSCLK_GMAC1_RMII_RTX>;
+};
+
+&phy0 {
+ motorcomm,tx-clk-adj-enabled;
+ motorcomm,tx-clk-100-inverted;
+ motorcomm,tx-clk-1000-inverted;
+ motorcomm,rx-clk-drv-microamp = <3970>;
+ motorcomm,rx-data-drv-microamp = <2910>;
+ rx-internal-delay-ps = <1500>;
+ tx-internal-delay-ps = <1500>;
+};
+
+&phy1 {
+ motorcomm,tx-clk-adj-enabled;
+ motorcomm,tx-clk-100-inverted;
+ motorcomm,rx-clk-drv-microamp = <3970>;
+ motorcomm,rx-data-drv-microamp = <2910>;
+ rx-internal-delay-ps = <300>;
+ tx-internal-delay-ps = <0>;
+};
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2.dtsi b/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2.dtsi
index fa0061eb33a7..b89e9791efa7 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2.dtsi
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -11,10 +11,14 @@
/ {
aliases {
+ ethernet0 = &gmac0;
+ ethernet1 = &gmac1;
i2c0 = &i2c0;
i2c2 = &i2c2;
i2c5 = &i2c5;
i2c6 = &i2c6;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
serial0 = &uart0;
};
@@ -36,6 +40,37 @@
gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>;
priority = <224>;
};
+
+ pwmdac_codec: pwmdac-codec {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ };
+
+ sound-pwmdac {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "StarFive-PWMDAC-Sound-Card";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ simple-audio-card,dai-link@0 {
+ reg = <0>;
+ format = "left_j";
+ bitclock-master = <&sndcpu0>;
+ frame-master = <&sndcpu0>;
+
+ sndcpu0: cpu {
+ sound-dai = <&pwmdac>;
+ };
+
+ codec {
+ sound-dai = <&pwmdac_codec>;
+ };
+ };
+ };
+};
+
+&dvp_clk {
+ clock-frequency = <74250000>;
};
&gmac0_rgmii_rxin {
@@ -54,6 +89,10 @@
clock-frequency = <50000000>;
};
+&hdmitx0_pixelclk {
+ clock-frequency = <297000000>;
+};
+
&i2srx_bclk_ext {
clock-frequency = <12288000>;
};
@@ -86,6 +125,38 @@
clock-frequency = <49152000>;
};
+&gmac0 {
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii-id";
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
+};
+
+&gmac1 {
+ phy-handle = <&phy1>;
+ phy-mode = "rgmii-id";
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+
+ phy1: ethernet-phy@1 {
+ reg = <0>;
+ };
+ };
+};
+
&i2c0 {
clock-frequency = <100000>;
i2c-sda-hold-time-ns = <300>;
@@ -123,12 +194,28 @@
#interrupt-cells = <1>;
regulators {
+ vcc_3v3: dcdc1 {
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_3v3";
+ };
+
vdd_cpu: dcdc2 {
regulator-always-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1540000>;
regulator-name = "vdd-cpu";
};
+
+ emmc_vdd: aldo4 {
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "emmc_vdd";
+ };
};
};
};
@@ -143,6 +230,111 @@
status = "okay";
};
+&i2srx {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2srx_pins>;
+ status = "okay";
+};
+
+&i2stx0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mclk_ext_pins>;
+ status = "okay";
+};
+
+&i2stx1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2stx1_pins>;
+ status = "okay";
+};
+
+&mmc0 {
+ max-frequency = <100000000>;
+ assigned-clocks = <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>;
+ assigned-clock-rates = <50000000>;
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ non-removable;
+ cap-mmc-hw-reset;
+ post-power-on-delay-ms = <200>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&emmc_vdd>;
+ status = "okay";
+};
+
+&mmc1 {
+ max-frequency = <100000000>;
+ assigned-clocks = <&syscrg JH7110_SYSCLK_SDIO1_SDCARD>;
+ assigned-clock-rates = <50000000>;
+ bus-width = <4>;
+ no-sdio;
+ no-mmc;
+ broken-cd;
+ cap-sd-highspeed;
+ post-power-on-delay-ms = <200>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
+ status = "okay";
+};
+
+&pwmdac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwmdac_pins>;
+ status = "okay";
+};
+
+&qspi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ nor_flash: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ cdns,read-delay = <5>;
+ spi-max-frequency = <12000000>;
+ cdns,tshsl-ns = <1>;
+ cdns,tsd2d-ns = <1>;
+ cdns,tchsh-ns = <1>;
+ cdns,tslch-ns = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ spl@0 {
+ reg = <0x0 0x80000>;
+ };
+ uboot-env@f0000 {
+ reg = <0xf0000 0x10000>;
+ };
+ uboot@100000 {
+ reg = <0x100000 0x400000>;
+ };
+ reserved-data@600000 {
+ reg = <0x600000 0xa00000>;
+ };
+ };
+ };
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins>;
+ status = "okay";
+
+ spi_dev0: spi@0 {
+ compatible = "rohm,dh2228fv";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ };
+};
+
&sysgpio {
i2c0_pins: i2c0-0 {
i2c-pins {
@@ -200,6 +392,199 @@
};
};
+ i2srx_pins: i2srx-0 {
+ clk-sd-pins {
+ pinmux = <GPIOMUX(38, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_I2SRX_BCLK)>,
+ <GPIOMUX(63, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_I2SRX_LRCK)>,
+ <GPIOMUX(38, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_I2STX1_BCLK)>,
+ <GPIOMUX(63, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_I2STX1_LRCK)>,
+ <GPIOMUX(61, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_I2SRX_SDIN0)>;
+ input-enable;
+ };
+ };
+
+ i2stx1_pins: i2stx1-0 {
+ sd-pins {
+ pinmux = <GPIOMUX(44, GPOUT_SYS_I2STX1_SDO0,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-disable;
+ input-disable;
+ };
+ };
+
+ mclk_ext_pins: mclk-ext-0 {
+ mclk-ext-pins {
+ pinmux = <GPIOMUX(4, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_MCLK_EXT)>;
+ input-enable;
+ };
+ };
+
+ mmc0_pins: mmc0-0 {
+ rst-pins {
+ pinmux = <GPIOMUX(62, GPOUT_SYS_SDIO0_RST,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-pull-up;
+ drive-strength = <12>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+
+ mmc-pins {
+ pinmux = <PINMUX(64, 0)>,
+ <PINMUX(65, 0)>,
+ <PINMUX(66, 0)>,
+ <PINMUX(67, 0)>,
+ <PINMUX(68, 0)>,
+ <PINMUX(69, 0)>,
+ <PINMUX(70, 0)>,
+ <PINMUX(71, 0)>,
+ <PINMUX(72, 0)>,
+ <PINMUX(73, 0)>;
+ bias-pull-up;
+ drive-strength = <12>;
+ input-enable;
+ };
+ };
+
+ mmc1_pins: mmc1-0 {
+ clk-pins {
+ pinmux = <GPIOMUX(10, GPOUT_SYS_SDIO1_CLK,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-pull-up;
+ drive-strength = <12>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+
+ mmc-pins {
+ pinmux = <GPIOMUX(9, GPOUT_SYS_SDIO1_CMD,
+ GPOEN_SYS_SDIO1_CMD,
+ GPI_SYS_SDIO1_CMD)>,
+ <GPIOMUX(11, GPOUT_SYS_SDIO1_DATA0,
+ GPOEN_SYS_SDIO1_DATA0,
+ GPI_SYS_SDIO1_DATA0)>,
+ <GPIOMUX(12, GPOUT_SYS_SDIO1_DATA1,
+ GPOEN_SYS_SDIO1_DATA1,
+ GPI_SYS_SDIO1_DATA1)>,
+ <GPIOMUX(7, GPOUT_SYS_SDIO1_DATA2,
+ GPOEN_SYS_SDIO1_DATA2,
+ GPI_SYS_SDIO1_DATA2)>,
+ <GPIOMUX(8, GPOUT_SYS_SDIO1_DATA3,
+ GPOEN_SYS_SDIO1_DATA3,
+ GPI_SYS_SDIO1_DATA3)>;
+ bias-pull-up;
+ drive-strength = <12>;
+ input-enable;
+ input-schmitt-enable;
+ slew-rate = <0>;
+ };
+ };
+
+ pwmdac_pins: pwmdac-0 {
+ pwmdac-pins {
+ pinmux = <GPIOMUX(33, GPOUT_SYS_PWMDAC_LEFT,
+ GPOEN_ENABLE,
+ GPI_NONE)>,
+ <GPIOMUX(34, GPOUT_SYS_PWMDAC_RIGHT,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-disable;
+ drive-strength = <2>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+
+ spi0_pins: spi0-0 {
+ mosi-pins {
+ pinmux = <GPIOMUX(52, GPOUT_SYS_SPI0_TXD,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-disable;
+ input-disable;
+ input-schmitt-disable;
+ };
+
+ miso-pins {
+ pinmux = <GPIOMUX(53, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_SPI0_RXD)>;
+ bias-pull-up;
+ input-enable;
+ input-schmitt-enable;
+ };
+
+ sck-pins {
+ pinmux = <GPIOMUX(48, GPOUT_SYS_SPI0_CLK,
+ GPOEN_ENABLE,
+ GPI_SYS_SPI0_CLK)>;
+ bias-disable;
+ input-disable;
+ input-schmitt-disable;
+ };
+
+ ss-pins {
+ pinmux = <GPIOMUX(49, GPOUT_SYS_SPI0_FSS,
+ GPOEN_ENABLE,
+ GPI_SYS_SPI0_FSS)>;
+ bias-disable;
+ input-disable;
+ input-schmitt-disable;
+ };
+ };
+
+ tdm_pins: tdm-0 {
+ tx-pins {
+ pinmux = <GPIOMUX(44, GPOUT_SYS_TDM_TXD,
+ GPOEN_ENABLE,
+ GPI_NONE)>;
+ bias-pull-up;
+ drive-strength = <2>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+
+ rx-pins {
+ pinmux = <GPIOMUX(61, GPOUT_HIGH,
+ GPOEN_DISABLE,
+ GPI_SYS_TDM_RXD)>;
+ input-enable;
+ };
+
+ sync-pins {
+ pinmux = <GPIOMUX(63, GPOUT_HIGH,
+ GPOEN_DISABLE,
+ GPI_SYS_TDM_SYNC)>;
+ input-enable;
+ };
+
+ pcmclk-pins {
+ pinmux = <GPIOMUX(38, GPOUT_HIGH,
+ GPOEN_DISABLE,
+ GPI_SYS_TDM_CLK)>;
+ input-enable;
+ };
+ };
+
uart0_pins: uart0-0 {
tx-pins {
pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX,
@@ -225,12 +610,23 @@
};
};
+&tdm {
+ pinctrl-names = "default";
+ pinctrl-0 = <&tdm_pins>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
+&usb0 {
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
&U74_1 {
cpu-supply = <&vdd_cpu>;
};
diff --git a/sys/contrib/device-tree/src/riscv/starfive/jh7110.dtsi b/sys/contrib/device-tree/src/riscv/starfive/jh7110.dtsi
index ec2e70011a73..74ed3b9264d8 100644
--- a/sys/contrib/device-tree/src/riscv/starfive/jh7110.dtsi
+++ b/sys/contrib/device-tree/src/riscv/starfive/jh7110.dtsi
@@ -6,7 +6,9 @@
/dts-v1/;
#include <dt-bindings/clock/starfive,jh7110-crg.h>
+#include <dt-bindings/power/starfive,jh7110-pmu.h>
#include <dt-bindings/reset/starfive,jh7110-crg.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
compatible = "starfive,jh7110";
@@ -26,6 +28,9 @@
i-cache-size = <16384>;
next-level-cache = <&ccache>;
riscv,isa = "rv64imac_zba_zbb";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "c", "zba", "zbb", "zicntr", "zicsr",
+ "zifencei", "zihpm";
status = "disabled";
cpu0_intc: interrupt-controller {
@@ -52,10 +57,14 @@
mmu-type = "riscv,sv39";
next-level-cache = <&ccache>;
riscv,isa = "rv64imafdc_zba_zbb";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zba", "zbb", "zicntr",
+ "zicsr", "zifencei", "zihpm";
tlb-split;
operating-points-v2 = <&cpu_opp>;
clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>;
clock-names = "cpu";
+ #cooling-cells = <2>;
cpu1_intc: interrupt-controller {
compatible = "riscv,cpu-intc";
@@ -81,10 +90,14 @@
mmu-type = "riscv,sv39";
next-level-cache = <&ccache>;
riscv,isa = "rv64imafdc_zba_zbb";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zba", "zbb", "zicntr",
+ "zicsr", "zifencei", "zihpm";
tlb-split;
operating-points-v2 = <&cpu_opp>;
clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>;
clock-names = "cpu";
+ #cooling-cells = <2>;
cpu2_intc: interrupt-controller {
compatible = "riscv,cpu-intc";
@@ -110,10 +123,14 @@
mmu-type = "riscv,sv39";
next-level-cache = <&ccache>;
riscv,isa = "rv64imafdc_zba_zbb";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zba", "zbb", "zicntr",
+ "zicsr", "zifencei", "zihpm";
tlb-split;
operating-points-v2 = <&cpu_opp>;
clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>;
clock-names = "cpu";
+ #cooling-cells = <2>;
cpu3_intc: interrupt-controller {
compatible = "riscv,cpu-intc";
@@ -139,10 +156,14 @@
mmu-type = "riscv,sv39";
next-level-cache = <&ccache>;
riscv,isa = "rv64imafdc_zba_zbb";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zba", "zbb", "zicntr",
+ "zicsr", "zifencei", "zihpm";
tlb-split;
operating-points-v2 = <&cpu_opp>;
clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>;
clock-names = "cpu";
+ #cooling-cells = <2>;
cpu4_intc: interrupt-controller {
compatible = "riscv,cpu-intc";
@@ -197,6 +218,47 @@
};
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <15000>;
+
+ thermal-sensors = <&sfctemp>;
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert0>;
+ cooling-device =
+ <&U74_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&U74_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&U74_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&U74_4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+
+ trips {
+ cpu_alert0: cpu-alert0 {
+ /* milliCelsius */
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ cpu-crit {
+ /* milliCelsius */
+ temperature = <100000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
+ dvp_clk: dvp-clock {
+ compatible = "fixed-clock";
+ clock-output-names = "dvp_clk";
+ #clock-cells = <0>;
+ };
gmac0_rgmii_rxin: gmac0-rgmii-rxin-clock {
compatible = "fixed-clock";
clock-output-names = "gmac0_rgmii_rxin";
@@ -221,6 +283,12 @@
#clock-cells = <0>;
};
+ hdmitx0_pixelclk: hdmitx0-pixel-clock {
+ compatible = "fixed-clock";
+ clock-output-names = "hdmitx0_pixelclk";
+ #clock-cells = <0>;
+ };
+
i2srx_bclk_ext: i2srx-bclk-ext-clock {
compatible = "fixed-clock";
clock-output-names = "i2srx_bclk_ext";
@@ -263,6 +331,13 @@
#clock-cells = <0>;
};
+ stmmac_axi_setup: stmmac-axi-config {
+ snps,lpi_en;
+ snps,wr_osr_lmt = <15>;
+ snps,rd_osr_lmt = <15>;
+ snps,blen = <256 128 64 32 0 0 0>;
+ };
+
tdm_ext: tdm-ext-clock {
compatible = "fixed-clock";
clock-output-names = "tdm_ext";
@@ -386,6 +461,186 @@
status = "disabled";
};
+ spi0: spi@10060000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x10060000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI0_APB>,
+ <&syscrg JH7110_SYSCLK_SPI0_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI0_APB>;
+ interrupts = <38>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi1: spi@10070000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x10070000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI1_APB>,
+ <&syscrg JH7110_SYSCLK_SPI1_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI1_APB>;
+ interrupts = <39>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi2: spi@10080000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x10080000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI2_APB>,
+ <&syscrg JH7110_SYSCLK_SPI2_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI2_APB>;
+ interrupts = <40>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ tdm: tdm@10090000 {
+ compatible = "starfive,jh7110-tdm";
+ reg = <0x0 0x10090000 0x0 0x1000>;
+ clocks = <&syscrg JH7110_SYSCLK_TDM_AHB>,
+ <&syscrg JH7110_SYSCLK_TDM_APB>,
+ <&syscrg JH7110_SYSCLK_TDM_INTERNAL>,
+ <&syscrg JH7110_SYSCLK_TDM_TDM>,
+ <&syscrg JH7110_SYSCLK_MCLK_INNER>,
+ <&tdm_ext>;
+ clock-names = "tdm_ahb", "tdm_apb",
+ "tdm_internal", "tdm",
+ "mclk_inner", "tdm_ext";
+ resets = <&syscrg JH7110_SYSRST_TDM_AHB>,
+ <&syscrg JH7110_SYSRST_TDM_APB>,
+ <&syscrg JH7110_SYSRST_TDM_CORE>;
+ dmas = <&dma 20>, <&dma 21>;
+ dma-names = "rx","tx";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ i2srx: i2s@100e0000 {
+ compatible = "starfive,jh7110-i2srx";
+ reg = <0x0 0x100e0000 0x0 0x1000>;
+ clocks = <&syscrg JH7110_SYSCLK_I2SRX_BCLK_MST>,
+ <&syscrg JH7110_SYSCLK_I2SRX_APB>,
+ <&syscrg JH7110_SYSCLK_MCLK>,
+ <&syscrg JH7110_SYSCLK_MCLK_INNER>,
+ <&mclk_ext>,
+ <&syscrg JH7110_SYSCLK_I2SRX_BCLK>,
+ <&syscrg JH7110_SYSCLK_I2SRX_LRCK>,
+ <&i2srx_bclk_ext>,
+ <&i2srx_lrck_ext>;
+ clock-names = "i2sclk", "apb", "mclk",
+ "mclk_inner", "mclk_ext", "bclk",
+ "lrck", "bclk_ext", "lrck_ext";
+ resets = <&syscrg JH7110_SYSRST_I2SRX_APB>,
+ <&syscrg JH7110_SYSRST_I2SRX_BCLK>;
+ dmas = <0>, <&dma 24>;
+ dma-names = "tx", "rx";
+ starfive,syscon = <&sys_syscon 0x18 0x2>;
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ pwmdac: pwmdac@100b0000 {
+ compatible = "starfive,jh7110-pwmdac";
+ reg = <0x0 0x100b0000 0x0 0x1000>;
+ clocks = <&syscrg JH7110_SYSCLK_PWMDAC_APB>,
+ <&syscrg JH7110_SYSCLK_PWMDAC_CORE>;
+ clock-names = "apb", "core";
+ resets = <&syscrg JH7110_SYSRST_PWMDAC_APB>;
+ dmas = <&dma 22>;
+ dma-names = "tx";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ usb0: usb@10100000 {
+ compatible = "starfive,jh7110-usb";
+ ranges = <0x0 0x0 0x10100000 0x100000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ starfive,stg-syscon = <&stg_syscon 0x4>;
+ clocks = <&stgcrg JH7110_STGCLK_USB0_LPM>,
+ <&stgcrg JH7110_STGCLK_USB0_STB>,
+ <&stgcrg JH7110_STGCLK_USB0_APB>,
+ <&stgcrg JH7110_STGCLK_USB0_AXI>,
+ <&stgcrg JH7110_STGCLK_USB0_UTMI_APB>;
+ clock-names = "lpm", "stb", "apb", "axi", "utmi_apb";
+ resets = <&stgcrg JH7110_STGRST_USB0_PWRUP>,
+ <&stgcrg JH7110_STGRST_USB0_APB>,
+ <&stgcrg JH7110_STGRST_USB0_AXI>,
+ <&stgcrg JH7110_STGRST_USB0_UTMI_APB>;
+ reset-names = "pwrup", "apb", "axi", "utmi_apb";
+ status = "disabled";
+
+ usb_cdns3: usb@0 {
+ compatible = "cdns,usb3";
+ reg = <0x0 0x10000>,
+ <0x10000 0x10000>,
+ <0x20000 0x10000>;
+ reg-names = "otg", "xhci", "dev";
+ interrupts = <100>, <108>, <110>;
+ interrupt-names = "host", "peripheral", "otg";
+ phys = <&usbphy0>;
+ phy-names = "cdns3,usb2-phy";
+ };
+ };
+
+ usbphy0: phy@10200000 {
+ compatible = "starfive,jh7110-usb-phy";
+ reg = <0x0 0x10200000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_USB_125M>,
+ <&stgcrg JH7110_STGCLK_USB0_APP_125>;
+ clock-names = "125m", "app_125m";
+ #phy-cells = <0>;
+ };
+
+ pciephy0: phy@10210000 {
+ compatible = "starfive,jh7110-pcie-phy";
+ reg = <0x0 0x10210000 0x0 0x10000>;
+ #phy-cells = <0>;
+ };
+
+ pciephy1: phy@10220000 {
+ compatible = "starfive,jh7110-pcie-phy";
+ reg = <0x0 0x10220000 0x0 0x10000>;
+ #phy-cells = <0>;
+ };
+
+ stgcrg: clock-controller@10230000 {
+ compatible = "starfive,jh7110-stgcrg";
+ reg = <0x0 0x10230000 0x0 0x10000>;
+ clocks = <&osc>,
+ <&syscrg JH7110_SYSCLK_HIFI4_CORE>,
+ <&syscrg JH7110_SYSCLK_STG_AXIAHB>,
+ <&syscrg JH7110_SYSCLK_USB_125M>,
+ <&syscrg JH7110_SYSCLK_CPU_BUS>,
+ <&syscrg JH7110_SYSCLK_HIFI4_AXI>,
+ <&syscrg JH7110_SYSCLK_NOCSTG_BUS>,
+ <&syscrg JH7110_SYSCLK_APB_BUS>;
+ clock-names = "osc", "hifi4_core",
+ "stg_axiahb", "usb_125m",
+ "cpu_bus", "hifi4_axi",
+ "nocstg_bus", "apb_bus";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+ stg_syscon: syscon@10240000 {
+ compatible = "starfive,jh7110-stg-syscon", "syscon";
+ reg = <0x0 0x10240000 0x0 0x1000>;
+ };
+
uart3: serial@12000000 {
compatible = "snps,dw-apb-uart";
reg = <0x0 0x12000000 0x0 0x10000>;
@@ -473,6 +728,138 @@
status = "disabled";
};
+ spi3: spi@12070000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x12070000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI3_APB>,
+ <&syscrg JH7110_SYSCLK_SPI3_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI3_APB>;
+ interrupts = <52>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi4: spi@12080000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x12080000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI4_APB>,
+ <&syscrg JH7110_SYSCLK_SPI4_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI4_APB>;
+ interrupts = <53>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi5: spi@12090000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x12090000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI5_APB>,
+ <&syscrg JH7110_SYSCLK_SPI5_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI5_APB>;
+ interrupts = <54>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ spi6: spi@120a0000 {
+ compatible = "arm,pl022", "arm,primecell";
+ reg = <0x0 0x120A0000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SPI6_APB>,
+ <&syscrg JH7110_SYSCLK_SPI6_APB>;
+ clock-names = "sspclk", "apb_pclk";
+ resets = <&syscrg JH7110_SYSRST_SPI6_APB>;
+ interrupts = <55>;
+ arm,primecell-periphid = <0x00041022>;
+ num-cs = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2stx0: i2s@120b0000 {
+ compatible = "starfive,jh7110-i2stx0";
+ reg = <0x0 0x120b0000 0x0 0x1000>;
+ clocks = <&syscrg JH7110_SYSCLK_I2STX0_BCLK_MST>,
+ <&syscrg JH7110_SYSCLK_I2STX0_APB>,
+ <&syscrg JH7110_SYSCLK_MCLK>,
+ <&syscrg JH7110_SYSCLK_MCLK_INNER>,
+ <&mclk_ext>;
+ clock-names = "i2sclk", "apb", "mclk",
+ "mclk_inner","mclk_ext";
+ resets = <&syscrg JH7110_SYSRST_I2STX0_APB>,
+ <&syscrg JH7110_SYSRST_I2STX0_BCLK>;
+ dmas = <&dma 47>;
+ dma-names = "tx";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ i2stx1: i2s@120c0000 {
+ compatible = "starfive,jh7110-i2stx1";
+ reg = <0x0 0x120c0000 0x0 0x1000>;
+ clocks = <&syscrg JH7110_SYSCLK_I2STX1_BCLK_MST>,
+ <&syscrg JH7110_SYSCLK_I2STX1_APB>,
+ <&syscrg JH7110_SYSCLK_MCLK>,
+ <&syscrg JH7110_SYSCLK_MCLK_INNER>,
+ <&mclk_ext>,
+ <&syscrg JH7110_SYSCLK_I2STX1_BCLK>,
+ <&syscrg JH7110_SYSCLK_I2STX1_LRCK>,
+ <&i2stx_bclk_ext>,
+ <&i2stx_lrck_ext>;
+ clock-names = "i2sclk", "apb", "mclk",
+ "mclk_inner", "mclk_ext", "bclk",
+ "lrck", "bclk_ext", "lrck_ext";
+ resets = <&syscrg JH7110_SYSRST_I2STX1_APB>,
+ <&syscrg JH7110_SYSRST_I2STX1_BCLK>;
+ dmas = <&dma 48>;
+ dma-names = "tx";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ sfctemp: temperature-sensor@120e0000 {
+ compatible = "starfive,jh7110-temp";
+ reg = <0x0 0x120e0000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_TEMP_CORE>,
+ <&syscrg JH7110_SYSCLK_TEMP_APB>;
+ clock-names = "sense", "bus";
+ resets = <&syscrg JH7110_SYSRST_TEMP_CORE>,
+ <&syscrg JH7110_SYSRST_TEMP_APB>;
+ reset-names = "sense", "bus";
+ #thermal-sensor-cells = <0>;
+ };
+
+ qspi: spi@13010000 {
+ compatible = "starfive,jh7110-qspi", "cdns,qspi-nor";
+ reg = <0x0 0x13010000 0x0 0x10000>,
+ <0x0 0x21000000 0x0 0x400000>;
+ interrupts = <25>;
+ clocks = <&syscrg JH7110_SYSCLK_QSPI_REF>,
+ <&syscrg JH7110_SYSCLK_QSPI_AHB>,
+ <&syscrg JH7110_SYSCLK_QSPI_APB>;
+ clock-names = "ref", "ahb", "apb";
+ resets = <&syscrg JH7110_SYSRST_QSPI_APB>,
+ <&syscrg JH7110_SYSRST_QSPI_AHB>,
+ <&syscrg JH7110_SYSRST_QSPI_REF>;
+ reset-names = "qspi", "qspi-ocp", "rstc_ref";
+ cdns,fifo-depth = <256>;
+ cdns,fifo-width = <4>;
+ cdns,trigger-address = <0x0>;
+ status = "disabled";
+ };
+
syscrg: clock-controller@13020000 {
compatible = "starfive,jh7110-syscrg";
reg = <0x0 0x13020000 0x0 0x10000>;
@@ -480,16 +867,31 @@
<&gmac1_rgmii_rxin>,
<&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
<&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
- <&tdm_ext>, <&mclk_ext>;
+ <&tdm_ext>, <&mclk_ext>,
+ <&pllclk JH7110_PLLCLK_PLL0_OUT>,
+ <&pllclk JH7110_PLLCLK_PLL1_OUT>,
+ <&pllclk JH7110_PLLCLK_PLL2_OUT>;
clock-names = "osc", "gmac1_rmii_refin",
"gmac1_rgmii_rxin",
"i2stx_bclk_ext", "i2stx_lrck_ext",
"i2srx_bclk_ext", "i2srx_lrck_ext",
- "tdm_ext", "mclk_ext";
+ "tdm_ext", "mclk_ext",
+ "pll0_out", "pll1_out", "pll2_out";
#clock-cells = <1>;
#reset-cells = <1>;
};
+ sys_syscon: syscon@13030000 {
+ compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
+ reg = <0x0 0x13030000 0x0 0x1000>;
+
+ pllclk: clock-controller {
+ compatible = "starfive,jh7110-pll";
+ clocks = <&osc>;
+ #clock-cells = <1>;
+ };
+ };
+
sysgpio: pinctrl@13040000 {
compatible = "starfive,jh7110-sys-pinctrl";
reg = <0x0 0x13040000 0x0 0x10000>;
@@ -512,6 +914,155 @@
<&syscrg JH7110_SYSRST_WDT_CORE>;
};
+ crypto: crypto@16000000 {
+ compatible = "starfive,jh7110-crypto";
+ reg = <0x0 0x16000000 0x0 0x4000>;
+ clocks = <&stgcrg JH7110_STGCLK_SEC_AHB>,
+ <&stgcrg JH7110_STGCLK_SEC_MISC_AHB>;
+ clock-names = "hclk", "ahb";
+ interrupts = <28>;
+ resets = <&stgcrg JH7110_STGRST_SEC_AHB>;
+ dmas = <&sdma 1 2>, <&sdma 0 2>;
+ dma-names = "tx", "rx";
+ };
+
+ sdma: dma-controller@16008000 {
+ compatible = "arm,pl080", "arm,primecell";
+ arm,primecell-periphid = <0x00041080>;
+ reg = <0x0 0x16008000 0x0 0x4000>;
+ interrupts = <29>;
+ clocks = <&stgcrg JH7110_STGCLK_SEC_AHB>;
+ clock-names = "apb_pclk";
+ resets = <&stgcrg JH7110_STGRST_SEC_AHB>;
+ lli-bus-interface-ahb1;
+ mem-bus-interface-ahb1;
+ memcpy-burst-size = <256>;
+ memcpy-bus-width = <32>;
+ #dma-cells = <2>;
+ };
+
+ rng: rng@1600c000 {
+ compatible = "starfive,jh7110-trng";
+ reg = <0x0 0x1600C000 0x0 0x4000>;
+ clocks = <&stgcrg JH7110_STGCLK_SEC_AHB>,
+ <&stgcrg JH7110_STGCLK_SEC_MISC_AHB>;
+ clock-names = "hclk", "ahb";
+ resets = <&stgcrg JH7110_STGRST_SEC_AHB>;
+ interrupts = <30>;
+ };
+
+ mmc0: mmc@16010000 {
+ compatible = "starfive,jh7110-mmc";
+ reg = <0x0 0x16010000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>,
+ <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>;
+ clock-names = "biu","ciu";
+ resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>;
+ reset-names = "reset";
+ interrupts = <74>;
+ fifo-depth = <32>;
+ fifo-watermark-aligned;
+ data-addr = <0>;
+ starfive,sysreg = <&sys_syscon 0x14 0x1a 0x7c000000>;
+ status = "disabled";
+ };
+
+ mmc1: mmc@16020000 {
+ compatible = "starfive,jh7110-mmc";
+ reg = <0x0 0x16020000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_SDIO1_AHB>,
+ <&syscrg JH7110_SYSCLK_SDIO1_SDCARD>;
+ clock-names = "biu","ciu";
+ resets = <&syscrg JH7110_SYSRST_SDIO1_AHB>;
+ reset-names = "reset";
+ interrupts = <75>;
+ fifo-depth = <32>;
+ fifo-watermark-aligned;
+ data-addr = <0>;
+ starfive,sysreg = <&sys_syscon 0x9c 0x1 0x3e>;
+ status = "disabled";
+ };
+
+ gmac0: ethernet@16030000 {
+ compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
+ reg = <0x0 0x16030000 0x0 0x10000>;
+ clocks = <&aoncrg JH7110_AONCLK_GMAC0_AXI>,
+ <&aoncrg JH7110_AONCLK_GMAC0_AHB>,
+ <&syscrg JH7110_SYSCLK_GMAC0_PTP>,
+ <&aoncrg JH7110_AONCLK_GMAC0_TX_INV>,
+ <&syscrg JH7110_SYSCLK_GMAC0_GTXC>;
+ clock-names = "stmmaceth", "pclk", "ptp_ref",
+ "tx", "gtx";
+ resets = <&aoncrg JH7110_AONRST_GMAC0_AXI>,
+ <&aoncrg JH7110_AONRST_GMAC0_AHB>;
+ reset-names = "stmmaceth", "ahb";
+ interrupts = <7>, <6>, <5>;
+ interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+ rx-fifo-depth = <2048>;
+ tx-fifo-depth = <2048>;
+ snps,multicast-filter-bins = <64>;
+ snps,perfect-filter-entries = <256>;
+ snps,fixed-burst;
+ snps,no-pbl-x8;
+ snps,force_thresh_dma_mode;
+ snps,axi-config = <&stmmac_axi_setup>;
+ snps,tso;
+ snps,en-tx-lpi-clockgating;
+ snps,txpbl = <16>;
+ snps,rxpbl = <16>;
+ starfive,syscon = <&aon_syscon 0xc 0x12>;
+ status = "disabled";
+ };
+
+ gmac1: ethernet@16040000 {
+ compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
+ reg = <0x0 0x16040000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_GMAC1_AXI>,
+ <&syscrg JH7110_SYSCLK_GMAC1_AHB>,
+ <&syscrg JH7110_SYSCLK_GMAC1_PTP>,
+ <&syscrg JH7110_SYSCLK_GMAC1_TX_INV>,
+ <&syscrg JH7110_SYSCLK_GMAC1_GTXC>;
+ clock-names = "stmmaceth", "pclk", "ptp_ref",
+ "tx", "gtx";
+ resets = <&syscrg JH7110_SYSRST_GMAC1_AXI>,
+ <&syscrg JH7110_SYSRST_GMAC1_AHB>;
+ reset-names = "stmmaceth", "ahb";
+ interrupts = <78>, <77>, <76>;
+ interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+ rx-fifo-depth = <2048>;
+ tx-fifo-depth = <2048>;
+ snps,multicast-filter-bins = <64>;
+ snps,perfect-filter-entries = <256>;
+ snps,fixed-burst;
+ snps,no-pbl-x8;
+ snps,force_thresh_dma_mode;
+ snps,axi-config = <&stmmac_axi_setup>;
+ snps,tso;
+ snps,en-tx-lpi-clockgating;
+ snps,txpbl = <16>;
+ snps,rxpbl = <16>;
+ starfive,syscon = <&sys_syscon 0x90 0x2>;
+ status = "disabled";
+ };
+
+ dma: dma-controller@16050000 {
+ compatible = "starfive,jh7110-axi-dma";
+ reg = <0x0 0x16050000 0x0 0x10000>;
+ clocks = <&stgcrg JH7110_STGCLK_DMA1P_AXI>,
+ <&stgcrg JH7110_STGCLK_DMA1P_AHB>;
+ clock-names = "core-clk", "cfgr-clk";
+ resets = <&stgcrg JH7110_STGRST_DMA1P_AXI>,
+ <&stgcrg JH7110_STGRST_DMA1P_AHB>;
+ interrupts = <73>;
+ #dma-cells = <1>;
+ dma-channels = <4>;
+ snps,dma-masters = <1>;
+ snps,data-width = <3>;
+ snps,block-size = <65536 65536 65536 65536>;
+ snps,priority = <0 1 2 3>;
+ snps,axi-max-burst-len = <16>;
+ };
+
aoncrg: clock-controller@17000000 {
compatible = "starfive,jh7110-aoncrg";
reg = <0x0 0x17000000 0x0 0x10000>;
@@ -529,6 +1080,12 @@
#reset-cells = <1>;
};
+ aon_syscon: syscon@17010000 {
+ compatible = "starfive,jh7110-aon-syscon", "syscon";
+ reg = <0x0 0x17010000 0x0 0x1000>;
+ #power-domain-cells = <1>;
+ };
+
aongpio: pinctrl@17020000 {
compatible = "starfive,jh7110-aon-pinctrl";
reg = <0x0 0x17020000 0x0 0x10000>;
@@ -546,5 +1103,40 @@
interrupts = <111>;
#power-domain-cells = <1>;
};
+
+ ispcrg: clock-controller@19810000 {
+ compatible = "starfive,jh7110-ispcrg";
+ reg = <0x0 0x19810000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_ISP_TOP_CORE>,
+ <&syscrg JH7110_SYSCLK_ISP_TOP_AXI>,
+ <&syscrg JH7110_SYSCLK_NOC_BUS_ISP_AXI>,
+ <&dvp_clk>;
+ clock-names = "isp_top_core", "isp_top_axi",
+ "noc_bus_isp_axi", "dvp_clk";
+ resets = <&syscrg JH7110_SYSRST_ISP_TOP>,
+ <&syscrg JH7110_SYSRST_ISP_TOP_AXI>,
+ <&syscrg JH7110_SYSRST_NOC_BUS_ISP_AXI>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ power-domains = <&pwrc JH7110_PD_ISP>;
+ };
+
+ voutcrg: clock-controller@295c0000 {
+ compatible = "starfive,jh7110-voutcrg";
+ reg = <0x0 0x295c0000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
+ <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
+ <&hdmitx0_pixelclk>;
+ clock-names = "vout_src", "vout_top_ahb",
+ "vout_top_axi", "vout_top_hdmitx0_mclk",
+ "i2stx0_bclk", "hdmitx0_pixelclk";
+ resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ power-domains = <&pwrc JH7110_PD_VOUT>;
+ };
};
};
diff --git a/sys/contrib/device-tree/src/riscv/thead/th1520-beaglev-ahead.dts b/sys/contrib/device-tree/src/riscv/thead/th1520-beaglev-ahead.dts
new file mode 100644
index 000000000000..d9b4de9e4757
--- /dev/null
+++ b/sys/contrib/device-tree/src/riscv/thead/th1520-beaglev-ahead.dts
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
+ * Copyright (C) 2023 Drew Fustini <dfustini@baylibre.com>
+ */
+
+/dts-v1/;
+
+#include "th1520.dtsi"
+
+/ {
+ model = "BeagleV Ahead";
+ compatible = "beagle,beaglev-ahead", "thead,th1520";
+
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ serial4 = &uart4;
+ serial5 = &uart5;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x00000000 0x1 0x00000000>;
+
+ };
+};
+
+&osc {
+ clock-frequency = <24000000>;
+};
+
+&osc_32k {
+ clock-frequency = <32768>;
+};
+
+&apb_clk {
+ clock-frequency = <62500000>;
+};
+
+&sdhci_clk {
+ clock-frequency = <198000000>;
+};
+
+&uart_sclk {
+ clock-frequency = <100000000>;
+};
+
+&dmac0 {
+ status = "okay";
+};
+
+&emmc {
+ bus-width = <8>;
+ max-frequency = <198000000>;
+ mmc-hs400-1_8v;
+ non-removable;
+ no-sdio;
+ no-sd;
+ status = "okay";
+};
+
+&sdio0 {
+ bus-width = <4>;
+ max-frequency = <198000000>;
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-module-4a.dtsi b/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-module-4a.dtsi
index 4b0249ac710f..1365d3a512a3 100644
--- a/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-module-4a.dtsi
+++ b/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-module-4a.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
*/
@@ -29,6 +29,10 @@
clock-frequency = <62500000>;
};
+&sdhci_clk {
+ clock-frequency = <198000000>;
+};
+
&uart_sclk {
clock-frequency = <100000000>;
};
@@ -36,3 +40,19 @@
&dmac0 {
status = "okay";
};
+
+&emmc {
+ bus-width = <8>;
+ max-frequency = <198000000>;
+ mmc-hs400-1_8v;
+ non-removable;
+ no-sdio;
+ no-sd;
+ status = "okay";
+};
+
+&sdio0 {
+ bus-width = <4>;
+ max-frequency = <198000000>;
+ status = "okay";
+};
diff --git a/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-pi-4a.dts b/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-pi-4a.dts
index a1248b2ee3a3..9a3884a73e13 100644
--- a/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-pi-4a.dts
+++ b/sys/contrib/device-tree/src/riscv/thead/th1520-lichee-pi-4a.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
*/
diff --git a/sys/contrib/device-tree/src/riscv/thead/th1520.dtsi b/sys/contrib/device-tree/src/riscv/thead/th1520.dtsi
index 56a73134b49e..8b915e206f3a 100644
--- a/sys/contrib/device-tree/src/riscv/thead/th1520.dtsi
+++ b/sys/contrib/device-tree/src/riscv/thead/th1520.dtsi
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Copyright (C) 2021 Alibaba Group Holding Limited.
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
@@ -20,6 +20,9 @@
compatible = "thead,c910", "riscv";
device_type = "cpu";
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
reg = <0>;
i-cache-block-size = <64>;
i-cache-size = <65536>;
@@ -41,6 +44,9 @@
compatible = "thead,c910", "riscv";
device_type = "cpu";
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
reg = <1>;
i-cache-block-size = <64>;
i-cache-size = <65536>;
@@ -62,6 +68,9 @@
compatible = "thead,c910", "riscv";
device_type = "cpu";
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
reg = <2>;
i-cache-block-size = <64>;
i-cache-size = <65536>;
@@ -83,6 +92,9 @@
compatible = "thead,c910", "riscv";
device_type = "cpu";
riscv,isa = "rv64imafdc";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+ "zifencei", "zihpm";
reg = <3>;
i-cache-block-size = <64>;
i-cache-size = <65536>;
@@ -134,11 +146,19 @@
#clock-cells = <0>;
};
+ sdhci_clk: sdhci-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <198000000>;
+ clock-output-names = "sdhci_clk";
+ #clock-cells = <0>;
+ };
+
soc {
compatible = "simple-bus";
interrupt-parent = <&plic>;
#address-cells = <2>;
#size-cells = <2>;
+ dma-noncoherent;
ranges;
plic: interrupt-controller@ffd8000000 {
@@ -291,6 +311,33 @@
status = "disabled";
};
+ emmc: mmc@ffe7080000 {
+ compatible = "thead,th1520-dwcmshc";
+ reg = <0xff 0xe7080000 0x0 0x10000>;
+ interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sdhci_clk>;
+ clock-names = "core";
+ status = "disabled";
+ };
+
+ sdio0: mmc@ffe7090000 {
+ compatible = "thead,th1520-dwcmshc";
+ reg = <0xff 0xe7090000 0x0 0x10000>;
+ interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sdhci_clk>;
+ clock-names = "core";
+ status = "disabled";
+ };
+
+ sdio1: mmc@ffe70a0000 {
+ compatible = "thead,th1520-dwcmshc";
+ reg = <0xff 0xe70a0000 0x0 0x10000>;
+ interrupts = <71 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sdhci_clk>;
+ clock-names = "core";
+ status = "disabled";
+ };
+
timer0: timer@ffefc32000 {
compatible = "snps,dw-apb-timer";
reg = <0xff 0xefc32000 0x0 0x14>;
diff --git a/sys/contrib/openzfs/cmd/arcstat.in b/sys/contrib/openzfs/cmd/arcstat.in
index 220f343b5b62..c4f10a1d6d3b 100755
--- a/sys/contrib/openzfs/cmd/arcstat.in
+++ b/sys/contrib/openzfs/cmd/arcstat.in
@@ -200,6 +200,8 @@ if sys.platform.startswith('freebsd'):
k = [ctl for ctl in sysctl.filter('kstat.zfs.misc.arcstats')
if ctl.type != sysctl.CTLTYPE_NODE]
+ k += [ctl for ctl in sysctl.filter('kstat.zfs.misc.zfetchstats')
+ if ctl.type != sysctl.CTLTYPE_NODE]
if not k:
sys.exit(1)
@@ -211,8 +213,12 @@ if sys.platform.startswith('freebsd'):
continue
name, value = s.name, s.value
- # Trims 'kstat.zfs.misc.arcstats' from the name
- kstat[name[24:]] = int(value)
+
+ if "arcstats" in name:
+ # Trims 'kstat.zfs.misc.arcstats' from the name
+ kstat[name[24:]] = int(value)
+ else:
+ kstat["zfetch_" + name[27:]] = int(value)
elif sys.platform.startswith('linux'):
def kstat_update():
diff --git a/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c b/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c
index 80627b58211c..f194d28c55a9 100644
--- a/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c
+++ b/sys/contrib/openzfs/cmd/zpool/os/linux/zpool_vdev_os.c
@@ -438,7 +438,7 @@ static char *zpool_sysfs_gets(char *path)
return (NULL);
}
- buf = calloc(sizeof (*buf), statbuf.st_size + 1);
+ buf = calloc(statbuf.st_size + 1, sizeof (*buf));
if (buf == NULL) {
close(fd);
return (NULL);
diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_main.c b/sys/contrib/openzfs/cmd/zpool/zpool_main.c
index 636eb2a301cd..300b383af4f6 100644
--- a/sys/contrib/openzfs/cmd/zpool/zpool_main.c
+++ b/sys/contrib/openzfs/cmd/zpool/zpool_main.c
@@ -9050,7 +9050,7 @@ status_callback(zpool_handle_t *zhp, void *data)
printf_color(ANSI_BOLD, gettext("action: "));
printf_color(ANSI_YELLOW, gettext("Make sure the pool's devices"
" are connected, then reboot your system and\n\timport the "
- "pool.\n"));
+ "pool or run 'zpool clear' to resume the pool.\n"));
break;
case ZPOOL_STATUS_IO_FAILURE_WAIT:
diff --git a/sys/contrib/openzfs/config/always-pyzfs.m4 b/sys/contrib/openzfs/config/always-pyzfs.m4
index 9b123b1b2db1..98c1cc230205 100644
--- a/sys/contrib/openzfs/config/always-pyzfs.m4
+++ b/sys/contrib/openzfs/config/always-pyzfs.m4
@@ -80,10 +80,11 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYZFS], [
[AC_MSG_ERROR("Python $PYTHON_VERSION unknown")]
)
- AX_PYTHON_DEVEL([$PYTHON_REQUIRED_VERSION], [
- AS_IF([test "x$enable_pyzfs" = xyes], [
- AC_MSG_ERROR("Python $PYTHON_REQUIRED_VERSION development library is not installed")
- ], [test "x$enable_pyzfs" != xno], [
+ AS_IF([test "x$enable_pyzfs" = xyes], [
+ AX_PYTHON_DEVEL([$PYTHON_REQUIRED_VERSION])
+ ], [
+ AX_PYTHON_DEVEL([$PYTHON_REQUIRED_VERSION], [true])
+ AS_IF([test "x$ax_python_devel_found" = xno], [
enable_pyzfs=no
])
])
diff --git a/sys/contrib/openzfs/config/ax_python_devel.m4 b/sys/contrib/openzfs/config/ax_python_devel.m4
index f6d4b01444d6..1f480db6d233 100644
--- a/sys/contrib/openzfs/config/ax_python_devel.m4
+++ b/sys/contrib/openzfs/config/ax_python_devel.m4
@@ -4,18 +4,13 @@
#
# SYNOPSIS
#
-# AX_PYTHON_DEVEL([version], [action-if-not-found])
+# AX_PYTHON_DEVEL([version[,optional]])
#
# DESCRIPTION
#
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
# in your configure.ac.
#
-# Note: this is a slightly modified version of the original AX_PYTHON_DEVEL
-# macro which accepts an additional [action-if-not-found] argument. This
-# allow to detect if Python development is available without aborting the
-# configure phase with an hard error in case it is not.
-#
# This macro checks for Python and tries to get the include path to
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
# variables. It also exports $(PYTHON_EXTRA_LIBS) and
@@ -28,6 +23,11 @@
# version number. Don't use "PYTHON_VERSION" for this: that environment
# variable is declared as precious and thus reserved for the end-user.
#
+# By default this will fail if it does not detect a development version of
+# python. If you want it to continue, set optional to true, like
+# AX_PYTHON_DEVEL([], [true]). The ax_python_devel_found variable will be
+# "no" if it fails.
+#
# This macro should work for all versions of Python >= 2.1.0. As an end
# user, you can disable the check for the python version by setting the
# PYTHON_NOVERSIONCHECK environment variable to something else than the
@@ -45,7 +45,6 @@
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
-# Copyright (c) 2018 loli10K <ezomori.nozomu@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -73,10 +72,18 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 21
+#serial 36
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
AC_DEFUN([AX_PYTHON_DEVEL],[
+ # Get whether it's optional
+ if test -z "$2"; then
+ ax_python_devel_optional=false
+ else
+ ax_python_devel_optional=$2
+ fi
+ ax_python_devel_found=yes
+
#
# Allow the use of a (user set) custom python version
#
@@ -87,23 +94,26 @@ AC_DEFUN([AX_PYTHON_DEVEL],[
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
if test -z "$PYTHON"; then
- m4_ifvaln([$2],[$2],[
- AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
- PYTHON_VERSION=""
- ])
+ AC_MSG_WARN([Cannot find python$PYTHON_VERSION in your system path])
+ if ! $ax_python_devel_optional; then
+ AC_MSG_ERROR([Giving up, python development not available])
+ fi
+ ax_python_devel_found=no
+ PYTHON_VERSION=""
fi
- #
- # Check for a version of Python >= 2.1.0
- #
- AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
- ac_supports_python_ver=`$PYTHON -c "import sys; \
+ if test $ax_python_devel_found = yes; then
+ #
+ # Check for a version of Python >= 2.1.0
+ #
+ AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
+ ac_supports_python_ver=`$PYTHON -c "import sys; \
ver = sys.version.split ()[[0]]; \
print (ver >= '2.1.0')"`
- if test "$ac_supports_python_ver" != "True"; then
+ if test "$ac_supports_python_ver" != "True"; then
if test -z "$PYTHON_NOVERSIONCHECK"; then
AC_MSG_RESULT([no])
- AC_MSG_FAILURE([
+ AC_MSG_WARN([
This version of the AC@&t@_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
@@ -112,20 +122,27 @@ PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.
])
+ if ! $ax_python_devel_optional; then
+ AC_MSG_FAILURE([Giving up])
+ fi
+ ax_python_devel_found=no
+ PYTHON_VERSION=""
else
AC_MSG_RESULT([skip at user request])
fi
- else
+ else
AC_MSG_RESULT([yes])
+ fi
fi
- #
- # If the macro parameter ``version'' is set, honour it.
- # A Python shim class, VPy, is used to implement correct version comparisons via
- # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for
- # Python 2.7.10 (the ".1" being evaluated as less than ".3").
- #
- if test -n "$1"; then
+ if test $ax_python_devel_found = yes; then
+ #
+ # If the macro parameter ``version'' is set, honour it.
+ # A Python shim class, VPy, is used to implement correct version comparisons via
+ # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for
+ # Python 2.7.10 (the ".1" being evaluated as less than ".3").
+ #
+ if test -n "$1"; then
AC_MSG_CHECKING([for a version of Python $1])
cat << EOF > ax_python_devel_vpy.py
class VPy:
@@ -133,7 +150,7 @@ class VPy:
return tuple(map(int, s.strip().replace("rc", ".").split(".")))
def __init__(self):
import sys
- self.vpy = tuple(sys.version_info)
+ self.vpy = tuple(sys.version_info)[[:3]]
def __eq__(self, s):
return self.vpy == self.vtup(s)
def __ne__(self, s):
@@ -155,25 +172,69 @@ EOF
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
- AC_MSG_ERROR([this package requires Python $1.
+ AC_MSG_WARN([this package requires Python $1.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.
])
+ if ! $ax_python_devel_optional; then
+ AC_MSG_ERROR([Giving up])
+ fi
+ ax_python_devel_found=no
PYTHON_VERSION=""
fi
+ fi
fi
- #
- # Check for Python include path
- #
- #
- AC_MSG_CHECKING([for Python include path])
- if test -z "$PYTHON_CPPFLAGS"; then
- python_path=`$PYTHON -c "import sysconfig; \
- print (sysconfig.get_path('include'));"`
- plat_python_path=`$PYTHON -c "import sysconfig; \
- print (sysconfig.get_path('platinclude'));"`
+ if test $ax_python_devel_found = yes; then
+ #
+ # Check if you have distutils, else fail
+ #
+ AC_MSG_CHECKING([for the sysconfig Python package])
+ ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`
+ if test $? -eq 0; then
+ AC_MSG_RESULT([yes])
+ IMPORT_SYSCONFIG="import sysconfig"
+ else
+ AC_MSG_RESULT([no])
+
+ AC_MSG_CHECKING([for the distutils Python package])
+ ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1`
+ if test $? -eq 0; then
+ AC_MSG_RESULT([yes])
+ IMPORT_SYSCONFIG="from distutils import sysconfig"
+ else
+ AC_MSG_WARN([cannot import Python module "distutils".
+Please check your Python installation. The error was:
+$ac_sysconfig_result])
+ if ! $ax_python_devel_optional; then
+ AC_MSG_ERROR([Giving up])
+ fi
+ ax_python_devel_found=no
+ PYTHON_VERSION=""
+ fi
+ fi
+ fi
+
+ if test $ax_python_devel_found = yes; then
+ #
+ # Check for Python include path
+ #
+ AC_MSG_CHECKING([for Python include path])
+ if test -z "$PYTHON_CPPFLAGS"; then
+ if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
+ # sysconfig module has different functions
+ python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+ print (sysconfig.get_path ('include'));"`
+ plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+ print (sysconfig.get_path ('platinclude'));"`
+ else
+ # old distutils way
+ python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+ print (sysconfig.get_python_inc ());"`
+ plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+ print (sysconfig.get_python_inc (plat_specific=1));"`
+ fi
if test -n "${python_path}"; then
if test "${plat_python_path}" != "${python_path}"; then
python_path="-I$python_path -I$plat_python_path"
@@ -182,15 +243,15 @@ variable to configure. See ``configure --help'' for reference.
fi
fi
PYTHON_CPPFLAGS=$python_path
- fi
- AC_MSG_RESULT([$PYTHON_CPPFLAGS])
- AC_SUBST([PYTHON_CPPFLAGS])
+ fi
+ AC_MSG_RESULT([$PYTHON_CPPFLAGS])
+ AC_SUBST([PYTHON_CPPFLAGS])
- #
- # Check for Python library path
- #
- AC_MSG_CHECKING([for Python library path])
- if test -z "$PYTHON_LIBS"; then
+ #
+ # Check for Python library path
+ #
+ AC_MSG_CHECKING([for Python library path])
+ if test -z "$PYTHON_LIBS"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
ac_python_version=`cat<<EOD | $PYTHON -
@@ -208,7 +269,7 @@ EOD`
ac_python_version=$PYTHON_VERSION
else
ac_python_version=`$PYTHON -c "import sys; \
- print ('.'.join(sys.version.split('.')[[:2]]))"`
+ print ("%d.%d" % sys.version_info[[:2]])"`
fi
fi
@@ -220,7 +281,7 @@ EOD`
ac_python_libdir=`cat<<EOD | $PYTHON -
# There should be only one
-import sysconfig
+$IMPORT_SYSCONFIG
e = sysconfig.get_config_var('LIBDIR')
if e is not None:
print (e)
@@ -229,7 +290,7 @@ EOD`
# Now, for the library:
ac_python_library=`cat<<EOD | $PYTHON -
-import sysconfig
+$IMPORT_SYSCONFIG
c = sysconfig.get_config_vars()
if 'LDVERSION' in c:
print ('python'+c[['LDVERSION']])
@@ -249,88 +310,140 @@ EOD`
else
# old way: use libpython from python_configdir
ac_python_libdir=`$PYTHON -c \
- "import sysconfig; \
+ "from sysconfig import get_python_lib as f; \
import os; \
- print (os.path.join(sysconfig.get_path('platstdlib'), 'config'));"`
+ print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
fi
if test -z "PYTHON_LIBS"; then
- m4_ifvaln([$2],[$2],[
- AC_MSG_ERROR([
+ AC_MSG_WARN([
Cannot determine location of your Python DSO. Please check it was installed with
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
- ])
])
+ if ! $ax_python_devel_optional; then
+ AC_MSG_ERROR([Giving up])
+ fi
+ ax_python_devel_found=no
+ PYTHON_VERSION=""
fi
+ fi
fi
- AC_MSG_RESULT([$PYTHON_LIBS])
- AC_SUBST([PYTHON_LIBS])
- #
- # Check for site packages
- #
- AC_MSG_CHECKING([for Python site-packages path])
- if test -z "$PYTHON_SITE_PKG"; then
- PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
- print (distutils.sysconfig.get_python_lib(0,0));" 2>/dev/null || \
- $PYTHON -c "import sysconfig; \
- print (sysconfig.get_path('purelib'));"`
- fi
- AC_MSG_RESULT([$PYTHON_SITE_PKG])
- AC_SUBST([PYTHON_SITE_PKG])
+ if test $ax_python_devel_found = yes; then
+ AC_MSG_RESULT([$PYTHON_LIBS])
+ AC_SUBST([PYTHON_LIBS])
- #
- # libraries which must be linked in when embedding
- #
- AC_MSG_CHECKING(python extra libraries)
- if test -z "$PYTHON_EXTRA_LIBS"; then
- PYTHON_EXTRA_LIBS=`$PYTHON -c "import sysconfig; \
+ #
+ # Check for site packages
+ #
+ AC_MSG_CHECKING([for Python site-packages path])
+ if test -z "$PYTHON_SITE_PKG"; then
+ if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
+ PYTHON_SITE_PKG=`$PYTHON -c "
+$IMPORT_SYSCONFIG;
+if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+else:
+ scheme = sysconfig._get_default_scheme()
+if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+prefix = '$prefix'
+if prefix == 'NONE':
+ prefix = '$ac_default_prefix'
+sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix})
+print(sitedir)"`
+ else
+ # distutils.sysconfig way
+ PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+ print (sysconfig.get_python_lib(0,0));"`
+ fi
+ fi
+ AC_MSG_RESULT([$PYTHON_SITE_PKG])
+ AC_SUBST([PYTHON_SITE_PKG])
+
+ #
+ # Check for platform-specific site packages
+ #
+ AC_MSG_CHECKING([for Python platform specific site-packages path])
+ if test -z "$PYTHON_PLATFORM_SITE_PKG"; then
+ if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
+ PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "
+$IMPORT_SYSCONFIG;
+if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+else:
+ scheme = sysconfig._get_default_scheme()
+if scheme == 'posix_local':
+ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
+ scheme = 'posix_prefix'
+prefix = '$prefix'
+if prefix == 'NONE':
+ prefix = '$ac_default_prefix'
+sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase': prefix})
+print(sitedir)"`
+ else
+ # distutils.sysconfig way
+ PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+ print (sysconfig.get_python_lib(1,0));"`
+ fi
+ fi
+ AC_MSG_RESULT([$PYTHON_PLATFORM_SITE_PKG])
+ AC_SUBST([PYTHON_PLATFORM_SITE_PKG])
+
+ #
+ # libraries which must be linked in when embedding
+ #
+ AC_MSG_CHECKING(python extra libraries)
+ if test -z "$PYTHON_EXTRA_LIBS"; then
+ PYTHON_EXTRA_LIBS=`$PYTHON -c "$IMPORT_SYSCONFIG; \
conf = sysconfig.get_config_var; \
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
- fi
- AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
- AC_SUBST(PYTHON_EXTRA_LIBS)
+ fi
+ AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
+ AC_SUBST(PYTHON_EXTRA_LIBS)
- #
- # linking flags needed when embedding
- #
- AC_MSG_CHECKING(python extra linking flags)
- if test -z "$PYTHON_EXTRA_LDFLAGS"; then
- PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import sysconfig; \
+ #
+ # linking flags needed when embedding
+ #
+ AC_MSG_CHECKING(python extra linking flags)
+ if test -z "$PYTHON_EXTRA_LDFLAGS"; then
+ PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "$IMPORT_SYSCONFIG; \
conf = sysconfig.get_config_var; \
print (conf('LINKFORSHARED'))"`
- fi
- AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
- AC_SUBST(PYTHON_EXTRA_LDFLAGS)
+ # Hack for macos, it sticks this in here.
+ PYTHON_EXTRA_LDFLAGS=`echo $PYTHON_EXTRA_LDFLAGS | sed 's/CoreFoundation.*$/CoreFoundation/'`
+ fi
+ AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
+ AC_SUBST(PYTHON_EXTRA_LDFLAGS)
- #
- # final check to see if everything compiles alright
- #
- AC_MSG_CHECKING([consistency of all components of python development environment])
- # save current global flags
- ac_save_LIBS="$LIBS"
- ac_save_LDFLAGS="$LDFLAGS"
- ac_save_CPPFLAGS="$CPPFLAGS"
- LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
- LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
- CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
- AC_LANG_PUSH([C])
- AC_LINK_IFELSE([
+ #
+ # final check to see if everything compiles alright
+ #
+ AC_MSG_CHECKING([consistency of all components of python development environment])
+ # save current global flags
+ ac_save_LIBS="$LIBS"
+ ac_save_LDFLAGS="$LDFLAGS"
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS"
+ LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
+ CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
+ AC_LANG_PUSH([C])
+ AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <Python.h>]],
[[Py_Initialize();]])
],[pythonexists=yes],[pythonexists=no])
- AC_LANG_POP([C])
- # turn back to default flags
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIBS="$ac_save_LIBS"
- LDFLAGS="$ac_save_LDFLAGS"
+ AC_LANG_POP([C])
+ # turn back to default flags
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+ LDFLAGS="$ac_save_LDFLAGS"
- AC_MSG_RESULT([$pythonexists])
+ AC_MSG_RESULT([$pythonexists])
- if test ! "x$pythonexists" = "xyes"; then
- m4_ifvaln([$2],[$2],[
- AC_MSG_FAILURE([
+ if test ! "x$pythonexists" = "xyes"; then
+ AC_MSG_WARN([
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LIBS environment variable.
@@ -340,9 +453,13 @@ EOD`
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
- ])
- PYTHON_VERSION=""
- ])
+ ])
+ if ! $ax_python_devel_optional; then
+ AC_MSG_ERROR([Giving up])
+ fi
+ ax_python_devel_found=no
+ PYTHON_VERSION=""
+ fi
fi
#
diff --git a/sys/contrib/openzfs/config/find_system_library.m4 b/sys/contrib/openzfs/config/find_system_library.m4
index 310b44112aea..8b98bd67d2ee 100644
--- a/sys/contrib/openzfs/config/find_system_library.m4
+++ b/sys/contrib/openzfs/config/find_system_library.m4
@@ -90,8 +90,8 @@ AC_DEFUN([ZFS_AC_FIND_SYSTEM_LIBRARY], [
AC_DEFINE([HAVE_][$1], [1], [Define if you have [$5]])
$7
],[dnl ELSE
- AC_SUBST([$1]_CFLAGS, [])
- AC_SUBST([$1]_LIBS, [])
+ AC_SUBST([$1]_CFLAGS, [""])
+ AC_SUBST([$1]_LIBS, [""])
AC_MSG_WARN([cannot find [$5] via pkg-config or in the standard locations])
$8
])
diff --git a/sys/contrib/openzfs/config/user-backtrace.m4 b/sys/contrib/openzfs/config/user-backtrace.m4
new file mode 100644
index 000000000000..25706767cdc3
--- /dev/null
+++ b/sys/contrib/openzfs/config/user-backtrace.m4
@@ -0,0 +1,14 @@
+dnl
+dnl backtrace(), for userspace assertions. glibc has this directly in libc.
+dnl FreeBSD and (sometimes) musl have it in a separate -lexecinfo. It's assumed
+dnl that this will also get the companion function backtrace_symbols().
+dnl
+AC_DEFUN([ZFS_AC_CONFIG_USER_BACKTRACE], [
+ AX_SAVE_FLAGS
+ LIBS=""
+ AC_SEARCH_LIBS([backtrace], [execinfo], [
+ AC_DEFINE(HAVE_BACKTRACE, 1, [backtrace() is available])
+ AC_SUBST([BACKTRACE_LIBS], ["$LIBS"])
+ ])
+ AX_RESTORE_FLAGS
+])
diff --git a/sys/contrib/openzfs/config/user-libunwind.m4 b/sys/contrib/openzfs/config/user-libunwind.m4
new file mode 100644
index 000000000000..99ba3dcf452d
--- /dev/null
+++ b/sys/contrib/openzfs/config/user-libunwind.m4
@@ -0,0 +1,44 @@
+dnl
+dnl Checks for libunwind, which usually does a better job than backtrace() when
+dnl resolving symbols in the stack backtrace. Newer versions have support for
+dnl getting info about the object file the function came from, so we look for
+dnl that too and use it if found.
+dnl
+AC_DEFUN([ZFS_AC_CONFIG_USER_LIBUNWIND], [
+ AC_ARG_WITH([libunwind],
+ AS_HELP_STRING([--with-libunwind],
+ [use libunwind for backtraces in userspace assertions]),
+ [],
+ [with_libunwind=auto])
+
+ AS_IF([test "x$with_libunwind" != "xno"], [
+ ZFS_AC_FIND_SYSTEM_LIBRARY(LIBUNWIND, [libunwind], [libunwind.h], [], [unwind], [], [
+ dnl unw_get_elf_filename() is sometimes a macro, other
+ dnl times a proper symbol, so we can't just do a link
+ dnl check; we need to include the header properly.
+ AX_SAVE_FLAGS
+ CFLAGS="$CFLAGS $LIBUNWIND_CFLAGS"
+ LIBS="$LIBS $LIBUNWIND_LIBS"
+ AC_MSG_CHECKING([for unw_get_elf_filename in libunwind])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #define UNW_LOCAL_ONLY
+ #include <libunwind.h>
+ ], [
+ unw_get_elf_filename(0, 0, 0, 0);
+ ])
+ ], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_LIBUNWIND_ELF, 1,
+ [libunwind has unw_get_elf_filename])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ AX_RESTORE_FLAGS
+ ], [
+ AS_IF([test "x$with_libunwind" = "xyes"], [
+ AC_MSG_FAILURE([--with-libunwind was given, but libunwind is not available, try installing libunwind-devel])
+ ])
+ ])
+ ])
+])
diff --git a/sys/contrib/openzfs/config/user.m4 b/sys/contrib/openzfs/config/user.m4
index 87df8c7ccabd..badd920d2b8a 100644
--- a/sys/contrib/openzfs/config/user.m4
+++ b/sys/contrib/openzfs/config/user.m4
@@ -26,12 +26,14 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [
ZFS_AC_CONFIG_USER_AIO_H
ZFS_AC_CONFIG_USER_CLOCK_GETTIME
ZFS_AC_CONFIG_USER_PAM
+ ZFS_AC_CONFIG_USER_BACKTRACE
+ ZFS_AC_CONFIG_USER_LIBUNWIND
ZFS_AC_CONFIG_USER_RUNSTATEDIR
ZFS_AC_CONFIG_USER_MAKEDEV_IN_SYSMACROS
ZFS_AC_CONFIG_USER_MAKEDEV_IN_MKDEV
ZFS_AC_CONFIG_USER_ZFSEXEC
- AC_CHECK_FUNCS([execvpe issetugid mlockall strlcat strlcpy])
+ AC_CHECK_FUNCS([execvpe issetugid mlockall strlcat strlcpy gettid])
AC_SUBST(RM)
])
diff --git a/sys/contrib/openzfs/contrib/debian/control b/sys/contrib/openzfs/contrib/debian/control
index 98beb900d0fa..e56fbf0f1c93 100644
--- a/sys/contrib/openzfs/contrib/debian/control
+++ b/sys/contrib/openzfs/contrib/debian/control
@@ -189,7 +189,7 @@ Depends: dkms (>> 2.1.1.2-5),
file,
libc6-dev | libc-dev,
lsb-release,
- python3-distutils | libpython3-stdlib (<< 3.6.4),
+ python3 (>> 3.12) | python3-distutils | libpython3-stdlib (<< 3.6.4),
${misc:Depends},
${perl:Depends}
Recommends: openzfs-zfs-zed, openzfs-zfsutils (>= ${source:Version}), ${linux:Recommends}
diff --git a/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h b/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h
index b0f398354e4f..658f546213de 100644
--- a/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h
+++ b/sys/contrib/openzfs/include/os/linux/kernel/linux/blkdev_compat.h
@@ -94,6 +94,33 @@ blk_queue_set_write_cache(struct request_queue *q, bool wc, bool fua)
#endif
}
+/*
+ * Detect if a device has a write cache. Used to set the intial value for the
+ * vdev nowritecache flag.
+ *
+ * 4.10: QUEUE_FLAG_WC added. Initialised by the driver, but can be changed
+ * later by the operator. If not set, kernel will return flush requests
+ * immediately without doing anything.
+ * 6.6: QUEUE_FLAG_HW_WC added. Initialised by the driver, can't be changed.
+ * Only controls if the operator is allowed to change _WC. Initial version
+ * buggy; aliased to QUEUE_FLAG_FUA, so unuseable.
+ * 6.6.10, 6.7: QUEUE_FLAG_HW_WC fixed.
+ *
+ * Older than 4.10 we just assume write cache, and let the normal flush fail
+ * detection apply.
+ */
+static inline boolean_t
+zfs_bdev_has_write_cache(struct block_device *bdev)
+{
+#if defined(QUEUE_FLAG_HW_WC) && QUEUE_FLAG_HW_WC != QUEUE_FLAG_FUA
+ return (test_bit(QUEUE_FLAG_HW_WC, &bdev_get_queue(bdev)->queue_flags));
+#elif defined(QUEUE_FLAG_WC)
+ return (test_bit(QUEUE_FLAG_WC, &bdev_get_queue(bdev)->queue_flags));
+#else
+ return (B_TRUE);
+#endif
+}
+
static inline void
blk_queue_set_read_ahead(struct request_queue *q, unsigned long ra_pages)
{
diff --git a/sys/contrib/openzfs/include/sys/dsl_scan.h b/sys/contrib/openzfs/include/sys/dsl_scan.h
index 2e3452e5ebaa..f32f59a2bedf 100644
--- a/sys/contrib/openzfs/include/sys/dsl_scan.h
+++ b/sys/contrib/openzfs/include/sys/dsl_scan.h
@@ -173,6 +173,7 @@ typedef struct dsl_scan {
dsl_scan_phys_t scn_phys; /* on disk representation of scan */
dsl_scan_phys_t scn_phys_cached;
avl_tree_t scn_queue; /* queue of datasets to scan */
+ kmutex_t scn_queue_lock; /* serializes scn_queue inserts */
uint64_t scn_queues_pending; /* outstanding data to issue */
/* members needed for syncing error scrub status to disk */
dsl_errorscrub_phys_t errorscrub_phys;
diff --git a/sys/contrib/openzfs/include/sys/spa.h b/sys/contrib/openzfs/include/sys/spa.h
index ca15025ba33c..3073c4d1b937 100644
--- a/sys/contrib/openzfs/include/sys/spa.h
+++ b/sys/contrib/openzfs/include/sys/spa.h
@@ -770,7 +770,7 @@ extern int bpobj_enqueue_free_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx);
#define SPA_ASYNC_CONFIG_UPDATE 0x01
#define SPA_ASYNC_REMOVE 0x02
-#define SPA_ASYNC_PROBE 0x04
+#define SPA_ASYNC_FAULT_VDEV 0x04
#define SPA_ASYNC_RESILVER_DONE 0x08
#define SPA_ASYNC_RESILVER 0x10
#define SPA_ASYNC_AUTOEXPAND 0x20
@@ -829,6 +829,8 @@ extern uint_t zfs_sync_pass_deferred_free;
/* spa sync taskqueues */
taskq_t *spa_sync_tq_create(spa_t *spa, const char *name);
void spa_sync_tq_destroy(spa_t *spa);
+uint_t spa_acq_allocator(spa_t *spa);
+void spa_rel_allocator(spa_t *spa, uint_t allocator);
void spa_select_allocator(zio_t *zio);
/* spa namespace global mutex */
@@ -1123,6 +1125,8 @@ extern uint32_t spa_get_hostid(spa_t *spa);
extern void spa_activate_allocation_classes(spa_t *, dmu_tx_t *);
extern boolean_t spa_livelist_delete_check(spa_t *spa);
+extern boolean_t spa_mmp_remote_host_activity(spa_t *spa);
+
extern spa_mode_t spa_mode(spa_t *spa);
extern uint64_t zfs_strtonum(const char *str, char **nptr);
diff --git a/sys/contrib/openzfs/include/sys/spa_impl.h b/sys/contrib/openzfs/include/sys/spa_impl.h
index d7da085ab313..a40914ec5fcb 100644
--- a/sys/contrib/openzfs/include/sys/spa_impl.h
+++ b/sys/contrib/openzfs/include/sys/spa_impl.h
@@ -63,6 +63,12 @@ typedef struct spa_alloc {
avl_tree_t spaa_tree;
} ____cacheline_aligned spa_alloc_t;
+typedef struct spa_allocs_use {
+ kmutex_t sau_lock;
+ uint_t sau_rotor;
+ boolean_t sau_inuse[];
+} spa_allocs_use_t;
+
typedef struct spa_error_entry {
zbookmark_phys_t se_bookmark;
char *se_name;
@@ -192,7 +198,7 @@ typedef struct spa_taskqs {
/* one for each thread in the spa sync taskq */
typedef struct spa_syncthread_info {
kthread_t *sti_thread;
- taskq_t *sti_wr_iss_tq; /* assigned wr_iss taskq */
+ uint_t sti_allocator;
} spa_syncthread_info_t;
typedef enum spa_all_vdev_zap_action {
@@ -270,6 +276,7 @@ struct spa {
* allocation performance in write-heavy workloads.
*/
spa_alloc_t *spa_allocs;
+ spa_allocs_use_t *spa_allocs_use;
int spa_alloc_count;
int spa_active_allocator; /* selectable allocator */
diff --git a/sys/contrib/openzfs/include/sys/uberblock_impl.h b/sys/contrib/openzfs/include/sys/uberblock_impl.h
index 1736b32cd3c6..e480a4bac0b9 100644
--- a/sys/contrib/openzfs/include/sys/uberblock_impl.h
+++ b/sys/contrib/openzfs/include/sys/uberblock_impl.h
@@ -50,20 +50,20 @@ extern "C" {
#define MMP_SEQ_VALID_BIT 0x02
#define MMP_FAIL_INT_VALID_BIT 0x04
-#define MMP_VALID(ubp) (ubp->ub_magic == UBERBLOCK_MAGIC && \
- ubp->ub_mmp_magic == MMP_MAGIC)
-#define MMP_INTERVAL_VALID(ubp) (MMP_VALID(ubp) && (ubp->ub_mmp_config & \
+#define MMP_VALID(ubp) ((ubp)->ub_magic == UBERBLOCK_MAGIC && \
+ (ubp)->ub_mmp_magic == MMP_MAGIC)
+#define MMP_INTERVAL_VALID(ubp) (MMP_VALID(ubp) && ((ubp)->ub_mmp_config & \
MMP_INTERVAL_VALID_BIT))
-#define MMP_SEQ_VALID(ubp) (MMP_VALID(ubp) && (ubp->ub_mmp_config & \
+#define MMP_SEQ_VALID(ubp) (MMP_VALID(ubp) && ((ubp)->ub_mmp_config & \
MMP_SEQ_VALID_BIT))
-#define MMP_FAIL_INT_VALID(ubp) (MMP_VALID(ubp) && (ubp->ub_mmp_config & \
+#define MMP_FAIL_INT_VALID(ubp) (MMP_VALID(ubp) && ((ubp)->ub_mmp_config & \
MMP_FAIL_INT_VALID_BIT))
-#define MMP_INTERVAL(ubp) ((ubp->ub_mmp_config & 0x00000000FFFFFF00) \
+#define MMP_INTERVAL(ubp) (((ubp)->ub_mmp_config & 0x00000000FFFFFF00) \
>> 8)
-#define MMP_SEQ(ubp) ((ubp->ub_mmp_config & 0x0000FFFF00000000) \
+#define MMP_SEQ(ubp) (((ubp)->ub_mmp_config & 0x0000FFFF00000000) \
>> 32)
-#define MMP_FAIL_INT(ubp) ((ubp->ub_mmp_config & 0xFFFF000000000000) \
+#define MMP_FAIL_INT(ubp) (((ubp)->ub_mmp_config & 0xFFFF000000000000) \
>> 48)
#define MMP_INTERVAL_SET(write) \
diff --git a/sys/contrib/openzfs/include/sys/vdev_impl.h b/sys/contrib/openzfs/include/sys/vdev_impl.h
index 95164c4546bb..57ff31e89eb9 100644
--- a/sys/contrib/openzfs/include/sys/vdev_impl.h
+++ b/sys/contrib/openzfs/include/sys/vdev_impl.h
@@ -273,7 +273,7 @@ struct vdev {
txg_list_t vdev_dtl_list; /* per-txg dirty DTL lists */
txg_node_t vdev_txg_node; /* per-txg dirty vdev linkage */
boolean_t vdev_remove_wanted; /* async remove wanted? */
- boolean_t vdev_probe_wanted; /* async probe wanted? */
+ boolean_t vdev_fault_wanted; /* async faulted wanted? */
list_node_t vdev_config_dirty_node; /* config dirty list */
list_node_t vdev_state_dirty_node; /* state dirty list */
uint64_t vdev_deflate_ratio; /* deflation ratio (x512) */
diff --git a/sys/contrib/openzfs/include/sys/zfs_context.h b/sys/contrib/openzfs/include/sys/zfs_context.h
index 9ec2f73b366c..8f264b50e995 100644
--- a/sys/contrib/openzfs/include/sys/zfs_context.h
+++ b/sys/contrib/openzfs/include/sys/zfs_context.h
@@ -228,9 +228,9 @@ typedef pthread_t kthread_t;
#define thread_create_named(name, stk, stksize, func, arg, len, \
pp, state, pri) \
- zk_thread_create(func, arg, stksize, state)
+ zk_thread_create(name, func, arg, stksize, state)
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
- zk_thread_create(func, arg, stksize, state)
+ zk_thread_create(#func, func, arg, stksize, state)
#define thread_exit() pthread_exit(NULL)
#define thread_join(t) pthread_join((pthread_t)(t), NULL)
@@ -246,8 +246,8 @@ extern struct proc p0;
#define PS_NONE -1
-extern kthread_t *zk_thread_create(void (*func)(void *), void *arg,
- size_t stksize, int state);
+extern kthread_t *zk_thread_create(const char *name, void (*func)(void *),
+ void *arg, size_t stksize, int state);
#define issig(why) (FALSE)
#define ISSIG(thr, why) (FALSE)
diff --git a/sys/contrib/openzfs/include/sys/zio.h b/sys/contrib/openzfs/include/sys/zio.h
index 4037b429982b..77c70b9b481c 100644
--- a/sys/contrib/openzfs/include/sys/zio.h
+++ b/sys/contrib/openzfs/include/sys/zio.h
@@ -528,9 +528,6 @@ struct zio {
/* Taskq dispatching state */
taskq_ent_t io_tqent;
-
- /* write issue taskq selection, based upon sync thread */
- taskq_t *io_wr_iss_tq;
};
enum blk_verify_flag {
diff --git a/sys/contrib/openzfs/lib/libspl/Makefile.am b/sys/contrib/openzfs/lib/libspl/Makefile.am
index 822bef7e7a8d..eb2377305aca 100644
--- a/sys/contrib/openzfs/lib/libspl/Makefile.am
+++ b/sys/contrib/openzfs/lib/libspl/Makefile.am
@@ -1,6 +1,6 @@
include $(srcdir)/%D%/include/Makefile.am
-libspl_assert_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS)
+libspl_assert_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) $(LIBUNWIND_CFLAGS)
libspl_la_CFLAGS = $(libspl_assert_la_CFLAGS)
noinst_LTLIBRARIES += libspl_assert.la libspl.la
@@ -43,3 +43,5 @@ libspl_la_LIBADD = \
libspl_assert.la
libspl_la_LIBADD += $(LIBATOMIC_LIBS) $(LIBCLOCK_GETTIME)
+
+libspl_assert_la_LIBADD = $(BACKTRACE_LIBS) $(LIBUNWIND_LIBS)
diff --git a/sys/contrib/openzfs/lib/libspl/assert.c b/sys/contrib/openzfs/lib/libspl/assert.c
index 9d44740d4e3c..5b12c14acd6e 100644
--- a/sys/contrib/openzfs/lib/libspl/assert.c
+++ b/sys/contrib/openzfs/lib/libspl/assert.c
@@ -22,8 +22,96 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2024, Rob Norris <robn@despairlabs.com>
+ */
#include <assert.h>
+#include <pthread.h>
+
+#if defined(__linux__)
+#include <errno.h>
+#include <sys/prctl.h>
+#ifdef HAVE_GETTID
+#define libspl_gettid() gettid()
+#else
+#include <sys/syscall.h>
+#define libspl_gettid() ((pid_t)syscall(__NR_gettid))
+#endif
+#define libspl_getprogname() (program_invocation_short_name)
+#define libspl_getthreadname(buf, len) \
+ prctl(PR_GET_NAME, (unsigned long)(buf), 0, 0, 0)
+#elif defined(__FreeBSD__) || defined(__APPLE__)
+#if !defined(__APPLE__)
+#include <pthread_np.h>
+#define libspl_gettid() pthread_getthreadid_np()
+#endif
+#define libspl_getprogname() getprogname()
+#define libspl_getthreadname(buf, len) \
+ pthread_getname_np(pthread_self(), buf, len);
+#endif
+
+#if defined(HAVE_LIBUNWIND)
+#define UNW_LOCAL_ONLY
+#include <libunwind.h>
+
+static inline void
+libspl_dump_backtrace(void)
+{
+ unw_context_t uc;
+ unw_cursor_t cp;
+ unw_word_t ip, off;
+ char funcname[128];
+#ifdef HAVE_LIBUNWIND_ELF
+ char objname[128];
+ unw_word_t objoff;
+#endif
+
+ fprintf(stderr, "Call trace:\n");
+ unw_getcontext(&uc);
+ unw_init_local(&cp, &uc);
+ while (unw_step(&cp) > 0) {
+ unw_get_reg(&cp, UNW_REG_IP, &ip);
+ unw_get_proc_name(&cp, funcname, sizeof (funcname), &off);
+#ifdef HAVE_LIBUNWIND_ELF
+ unw_get_elf_filename(&cp, objname, sizeof (objname), &objoff);
+ fprintf(stderr, " [0x%08lx] %s+0x%2lx (in %s +0x%2lx)\n",
+ ip, funcname, off, objname, objoff);
+#else
+ fprintf(stderr, " [0x%08lx] %s+0x%2lx\n", ip, funcname, off);
+#endif
+ }
+}
+#elif defined(HAVE_BACKTRACE)
+#include <execinfo.h>
+
+static inline void
+libspl_dump_backtrace(void)
+{
+ void *btptrs[100];
+ size_t nptrs = backtrace(btptrs, 100);
+ char **bt = backtrace_symbols(btptrs, nptrs);
+ fprintf(stderr, "Call trace:\n");
+ for (size_t i = 0; i < nptrs; i++)
+ fprintf(stderr, " %s\n", bt[i]);
+ free(bt);
+}
+#else
+#define libspl_dump_backtrace()
+#endif
+
+#if defined(__APPLE__)
+static inline uint64_t
+libspl_gettid(void)
+{
+ uint64_t tid;
+
+ if (pthread_threadid_np(NULL, &tid) != 0)
+ tid = 0;
+
+ return (tid);
+}
+#endif
static boolean_t libspl_assert_ok = B_FALSE;
@@ -33,21 +121,41 @@ libspl_set_assert_ok(boolean_t val)
libspl_assert_ok = val;
}
+static pthread_mutex_t assert_lock = PTHREAD_MUTEX_INITIALIZER;
+
/* printf version of libspl_assert */
void
libspl_assertf(const char *file, const char *func, int line,
const char *format, ...)
{
+ pthread_mutex_lock(&assert_lock);
+
va_list args;
+ char tname[64];
+
+ libspl_getthreadname(tname, sizeof (tname));
+
+ fprintf(stderr, "ASSERT at %s:%d:%s()\n", file, line, func);
va_start(args, format);
vfprintf(stderr, format, args);
- fprintf(stderr, "\n");
- fprintf(stderr, "ASSERT at %s:%d:%s()", file, line, func);
va_end(args);
+ fprintf(stderr, "\n"
+ " PID: %-8u COMM: %s\n"
+#if defined(__APPLE__)
+ " TID: %-8" PRIu64 " NAME: %s\n",
+#else
+ " TID: %-8u NAME: %s\n",
+#endif
+ getpid(), libspl_getprogname(),
+ libspl_gettid(), tname);
+
+ libspl_dump_backtrace();
+
#if !__has_feature(attribute_analyzer_noreturn) && !defined(__COVERITY__)
if (libspl_assert_ok) {
+ pthread_mutex_unlock(&assert_lock);
return;
}
#endif
diff --git a/sys/contrib/openzfs/lib/libuutil/uu_list.c b/sys/contrib/openzfs/lib/libuutil/uu_list.c
index 0ca6f05205e9..aa8b129cc22a 100644
--- a/sys/contrib/openzfs/lib/libuutil/uu_list.c
+++ b/sys/contrib/openzfs/lib/libuutil/uu_list.c
@@ -505,14 +505,20 @@ uu_list_walk(uu_list_t *lp, uu_walk_fn_t *func, void *private, uint32_t flags)
}
if (lp->ul_debug || robust) {
- uu_list_walk_t my_walk;
+ uu_list_walk_t *my_walk;
void *e;
- list_walk_init(&my_walk, lp, flags);
+ my_walk = uu_zalloc(sizeof (*my_walk));
+ if (my_walk == NULL)
+ return (-1);
+
+ list_walk_init(my_walk, lp, flags);
while (status == UU_WALK_NEXT &&
- (e = uu_list_walk_next(&my_walk)) != NULL)
+ (e = uu_list_walk_next(my_walk)) != NULL)
status = (*func)(e, private);
- list_walk_fini(&my_walk);
+ list_walk_fini(my_walk);
+
+ uu_free(my_walk);
} else {
if (!reverse) {
for (np = lp->ul_null_node.uln_next;
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c b/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
index 6f8773aed425..231bbbd92dbf 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
@@ -5565,8 +5565,21 @@ volsize_from_vdevs(zpool_handle_t *zhp, uint64_t nblocks, uint64_t blksize)
/*
* Scale this size down as a ratio of 128k / tsize.
* See theory statement above.
+ *
+ * Bitshift is to avoid the case of nblocks * asize < tsize
+ * producing a size of 0.
+ */
+ volsize = (nblocks * asize) / (tsize >> SPA_MINBLOCKSHIFT);
+ /*
+ * If we would blow UINT64_MAX with this next multiplication,
+ * don't.
*/
- volsize = nblocks * asize * SPA_OLD_MAXBLOCKSIZE / tsize;
+ if (volsize >
+ (UINT64_MAX / (SPA_OLD_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT)))
+ volsize = UINT64_MAX;
+ else
+ volsize *= (SPA_OLD_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT);
+
if (volsize > ret) {
ret = volsize;
}
diff --git a/sys/contrib/openzfs/lib/libzpool/kernel.c b/sys/contrib/openzfs/lib/libzpool/kernel.c
index ffad7fc02bc9..a3930ee07f73 100644
--- a/sys/contrib/openzfs/lib/libzpool/kernel.c
+++ b/sys/contrib/openzfs/lib/libzpool/kernel.c
@@ -92,7 +92,8 @@ zk_thread_wrapper(void *arg)
}
kthread_t *
-zk_thread_create(void (*func)(void *), void *arg, size_t stksize, int state)
+zk_thread_create(const char *name, void (*func)(void *), void *arg,
+ size_t stksize, int state)
{
pthread_attr_t attr;
pthread_t tid;
@@ -140,6 +141,8 @@ zk_thread_create(void (*func)(void *), void *arg, size_t stksize, int state)
VERIFY0(pthread_create(&tid, &attr, zk_thread_wrapper, ztw));
VERIFY0(pthread_attr_destroy(&attr));
+ pthread_setname_np(tid, name);
+
return ((void *)(uintptr_t)tid);
}
diff --git a/sys/contrib/openzfs/lib/libzpool/taskq.c b/sys/contrib/openzfs/lib/libzpool/taskq.c
index 99a181ec3c93..5fb2283cf0b1 100644
--- a/sys/contrib/openzfs/lib/libzpool/taskq.c
+++ b/sys/contrib/openzfs/lib/libzpool/taskq.c
@@ -295,8 +295,8 @@ taskq_create(const char *name, int nthreads, pri_t pri,
}
for (t = 0; t < nthreads; t++)
- VERIFY((tq->tq_threadlist[t] = thread_create(NULL, 0,
- taskq_thread, tq, 0, &p0, TS_RUN, pri)) != NULL);
+ VERIFY((tq->tq_threadlist[t] = thread_create_named(tq->tq_name,
+ NULL, 0, taskq_thread, tq, 0, &p0, TS_RUN, pri)) != NULL);
return (tq);
}
diff --git a/sys/contrib/openzfs/man/man4/zfs.4 b/sys/contrib/openzfs/man/man4/zfs.4
index 6088ebc7ef35..5edd80659e08 100644
--- a/sys/contrib/openzfs/man/man4/zfs.4
+++ b/sys/contrib/openzfs/man/man4/zfs.4
@@ -16,7 +16,7 @@
.\" own identifying information:
.\" Portions Copyright [yyyy] [name of copyright owner]
.\"
-.Dd January 9, 2024
+.Dd February 14, 2024
.Dt ZFS 4
.Os
.
@@ -525,10 +525,17 @@ most ZPL operations (e.g. write, create) will return
.
.It Sy spa_num_allocators Ns = Ns Sy 4 Pq int
Determines the number of block alloctators to use per spa instance.
-Capped by the number of actual CPUs in the system.
+Capped by the number of actual CPUs in the system via
+.Sy spa_cpus_per_allocator .
.Pp
Note that setting this value too high could result in performance
degredation and/or excess fragmentation.
+Set value only applies to pools imported/created after that.
+.
+.It Sy spa_cpus_per_allocator Ns = Ns Sy 4 Pq int
+Determines the minimum number of CPUs in a system for block alloctator
+per spa instance.
+Set value only applies to pools imported/created after that.
.
.It Sy spa_upgrade_errlog_limit Ns = Ns Sy 0 Pq uint
Limits the number of on-disk error log entries that will be converted to the
@@ -564,9 +571,8 @@ However, this is limited by
Maximum micro ZAP size.
A micro ZAP is upgraded to a fat ZAP, once it grows beyond the specified size.
.
-.It Sy zfetch_hole_shift Ns = Ns Sy 2 Pq uint
-Log2 fraction of holes in speculative prefetch stream allowed for it to
-proceed.
+.It Sy zap_shrink_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int
+If set, adjacent empty ZAP blocks will be collapsed, reducing disk space.
.
.It Sy zfetch_min_distance Ns = Ns Sy 4194304 Ns B Po 4 MiB Pc Pq uint
Min bytes to prefetch per stream.
@@ -2327,8 +2333,8 @@ Prioritize requeued I/O.
.
.It Sy zio_taskq_batch_pct Ns = Ns Sy 80 Ns % Pq uint
Percentage of online CPUs which will run a worker thread for I/O.
-These workers are responsible for I/O work such as compression and
-checksum calculations.
+These workers are responsible for I/O work such as compression, encryption,
+checksum and parity calculations.
Fractional number of CPUs will be rounded down.
.Pp
The default value of
@@ -2336,33 +2342,36 @@ The default value of
was chosen to avoid using all CPUs which can result in
latency issues and inconsistent application performance,
especially when slower compression and/or checksumming is enabled.
+Set value only applies to pools imported/created after that.
.
.It Sy zio_taskq_batch_tpq Ns = Ns Sy 0 Pq uint
Number of worker threads per taskq.
-Lower values improve I/O ordering and CPU utilization,
-while higher reduces lock contention.
+Higher values improve I/O ordering and CPU utilization,
+while lower reduce lock contention.
+Set value only applies to pools imported/created after that.
.Pp
If
.Sy 0 ,
generate a system-dependent value close to 6 threads per taskq.
+Set value only applies to pools imported/created after that.
.
-.It Sy zio_taskq_wr_iss_ncpus Ns = Ns Sy 0 Pq uint
-Determines the number of CPUs to run write issue taskqs.
-.Pp
-When 0 (the default), the value to use is computed internally
-as the number of actual CPUs in the system divided by the
-.Sy spa_num_allocators
-value.
+.It Sy zio_taskq_write_tpq Ns = Ns Sy 16 Pq uint
+Determines the minumum number of threads per write issue taskq.
+Higher values improve CPU utilization on high throughput,
+while lower reduce taskq locks contention on high IOPS.
+Set value only applies to pools imported/created after that.
.
.It Sy zio_taskq_read Ns = Ns Sy fixed,1,8 null scale null Pq charp
Set the queue and thread configuration for the IO read queues.
This is an advanced debugging parameter.
Don't change this unless you understand what it does.
+Set values only apply to pools imported/created after that.
.
.It Sy zio_taskq_write Ns = Ns Sy sync fixed,1,5 scale fixed,1,5 Pq charp
Set the queue and thread configuration for the IO write queues.
This is an advanced debugging parameter.
Don't change this unless you understand what it does.
+Set values only apply to pools imported/created after that.
.
.It Sy zvol_inhibit_dev Ns = Ns Sy 0 Ns | Ns 1 Pq uint
Do not create zvol device nodes.
diff --git a/sys/contrib/openzfs/man/man8/zpool-clear.8 b/sys/contrib/openzfs/man/man8/zpool-clear.8
index c61ecae483ac..3e448be87fc2 100644
--- a/sys/contrib/openzfs/man/man8/zpool-clear.8
+++ b/sys/contrib/openzfs/man/man8/zpool-clear.8
@@ -50,9 +50,10 @@ If the pool was suspended it will be brought back online provided the
devices can be accessed.
Pools with
.Sy multihost
-enabled which have been suspended cannot be resumed.
-While the pool was suspended, it may have been imported on
-another host, and resuming I/O could result in pool damage.
+enabled which have been suspended cannot be resumed when there is evidence
+that the pool was imported by another host.
+The same checks performed during an import will be applied before the clear
+proceeds.
.Bl -tag -width Ds
.It Fl -power
Power on the devices's slot in the storage enclosure and wait for the device
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
index 6a7c2d2811b1..712ff1b837d7 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
@@ -1259,7 +1259,7 @@ zvol_os_rename_minor(zvol_state_t *zv, const char *newname)
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
/* Move to a new hashtable entry. */
- zv->zv_hash = zvol_name_hash(zv->zv_name);
+ zv->zv_hash = zvol_name_hash(newname);
hlist_del(&zv->zv_hlink);
hlist_add_head(&zv->zv_hlink, ZVOL_HT_HEAD(zv->zv_hash));
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c b/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c
index 2cea61a6294c..463c5f705102 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c
@@ -429,8 +429,11 @@ vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize,
/* Determine the logical block size */
int logical_block_size = bdev_logical_block_size(bdev);
- /* Clear the nowritecache bit, causes vdev_reopen() to try again. */
- v->vdev_nowritecache = B_FALSE;
+ /*
+ * If the device has a write cache, clear the nowritecache flag,
+ * so that we start issuing flush requests again.
+ */
+ v->vdev_nowritecache = !zfs_bdev_has_write_cache(bdev);
/* Set when device reports it supports TRIM. */
v->vdev_has_trim = bdev_discard_supported(bdev);
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
index 4b960daf89ee..2a036dc5136b 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
@@ -1571,7 +1571,7 @@ zvol_os_rename_minor(zvol_state_t *zv, const char *newname)
strlcpy(zv->zv_name, newname, sizeof (zv->zv_name));
/* move to new hashtable entry */
- zv->zv_hash = zvol_name_hash(zv->zv_name);
+ zv->zv_hash = zvol_name_hash(newname);
hlist_del(&zv->zv_hlink);
hlist_add_head(&zv->zv_hlink, ZVOL_HT_HEAD(zv->zv_hash));
diff --git a/sys/contrib/openzfs/module/zfs/dmu_objset.c b/sys/contrib/openzfs/module/zfs/dmu_objset.c
index 2ba26f68e398..f1818ae155bd 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_objset.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_objset.c
@@ -400,10 +400,10 @@ dnode_hash(const objset_t *os, uint64_t obj)
ASSERT(zfs_crc64_table[128] == ZFS_CRC64_POLY);
/*
- * The low 6 bits of the pointer don't have much entropy, because
- * the objset_t is larger than 2^6 bytes long.
+ * The lower 11 bits of the pointer don't have much entropy, because
+ * the objset_t is more than 1KB long and so likely aligned to 2KB.
*/
- crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (osv >> 6)) & 0xFF];
+ crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (osv >> 11)) & 0xFF];
crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 0)) & 0xFF];
crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 8)) & 0xFF];
crc = (crc >> 8) ^ zfs_crc64_table[(crc ^ (obj >> 16)) & 0xFF];
@@ -1664,12 +1664,14 @@ sync_dnodes_task(void *arg)
sync_objset_arg_t *soa = sda->sda_soa;
objset_t *os = soa->soa_os;
+ uint_t allocator = spa_acq_allocator(os->os_spa);
multilist_sublist_t *ms =
multilist_sublist_lock_idx(sda->sda_list, sda->sda_sublist_idx);
dmu_objset_sync_dnodes(ms, soa->soa_tx);
multilist_sublist_unlock(ms);
+ spa_rel_allocator(os->os_spa, allocator);
kmem_free(sda, sizeof (*sda));
diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c
index 55e89b89f06a..085cfd3c5691 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_scan.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c
@@ -491,6 +491,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg)
avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t),
offsetof(scan_ds_t, sds_node));
+ mutex_init(&scn->scn_queue_lock, NULL, MUTEX_DEFAULT, NULL);
avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare,
sizeof (scan_prefetch_issue_ctx_t),
offsetof(scan_prefetch_issue_ctx_t, spic_avl_node));
@@ -646,6 +647,7 @@ dsl_scan_fini(dsl_pool_t *dp)
scan_ds_queue_clear(scn);
avl_destroy(&scn->scn_queue);
+ mutex_destroy(&scn->scn_queue_lock);
scan_ds_prefetch_queue_clear(scn);
avl_destroy(&scn->scn_prefetch_queue);
@@ -2723,8 +2725,10 @@ enqueue_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg)
return (err);
ds = prev;
}
+ mutex_enter(&scn->scn_queue_lock);
scan_ds_queue_insert(scn, ds->ds_object,
dsl_dataset_phys(ds)->ds_prev_snap_txg);
+ mutex_exit(&scn->scn_queue_lock);
dsl_dataset_rele(ds, FTAG);
return (0);
}
@@ -2915,8 +2919,10 @@ enqueue_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg)
ds = prev;
}
+ mutex_enter(&scn->scn_queue_lock);
scan_ds_queue_insert(scn, ds->ds_object,
dsl_dataset_phys(ds)->ds_prev_snap_txg);
+ mutex_exit(&scn->scn_queue_lock);
dsl_dataset_rele(ds, FTAG);
return (0);
}
diff --git a/sys/contrib/openzfs/module/zfs/mmp.c b/sys/contrib/openzfs/module/zfs/mmp.c
index 66bc0ae60b10..71122542758d 100644
--- a/sys/contrib/openzfs/module/zfs/mmp.c
+++ b/sys/contrib/openzfs/module/zfs/mmp.c
@@ -664,12 +664,13 @@ mmp_thread(void *arg)
(gethrtime() - mmp->mmp_last_write) > mmp_fail_ns) {
zfs_dbgmsg("MMP suspending pool '%s': gethrtime %llu "
"mmp_last_write %llu mmp_interval %llu "
- "mmp_fail_intervals %llu mmp_fail_ns %llu",
+ "mmp_fail_intervals %llu mmp_fail_ns %llu txg %llu",
spa_name(spa), (u_longlong_t)gethrtime(),
(u_longlong_t)mmp->mmp_last_write,
(u_longlong_t)mmp_interval,
(u_longlong_t)mmp_fail_intervals,
- (u_longlong_t)mmp_fail_ns);
+ (u_longlong_t)mmp_fail_ns,
+ (u_longlong_t)spa->spa_uberblock.ub_txg);
cmn_err(CE_WARN, "MMP writes to pool '%s' have not "
"succeeded in over %llu ms; suspending pool. "
"Hrtime %llu",
diff --git a/sys/contrib/openzfs/module/zfs/spa.c b/sys/contrib/openzfs/module/zfs/spa.c
index 96daf51b696a..c3800e018c73 100644
--- a/sys/contrib/openzfs/module/zfs/spa.c
+++ b/sys/contrib/openzfs/module/zfs/spa.c
@@ -208,7 +208,7 @@ static const uint_t zio_taskq_basedc = 80; /* base duty cycle */
static const boolean_t spa_create_process = B_TRUE; /* no process => no sysdc */
#endif
-static uint_t zio_taskq_wr_iss_ncpus = 0;
+static uint_t zio_taskq_write_tpq = 16;
/*
* Report any spa_load_verify errors found, but do not fail spa_load.
@@ -1067,17 +1067,16 @@ spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q)
case ZTI_MODE_SYNC:
/*
- * Create one wr_iss taskq for every 'zio_taskq_wr_iss_ncpus',
- * not to exceed the number of spa allocators.
+ * Create one wr_iss taskq for every 'zio_taskq_write_tpq' CPUs,
+ * not to exceed the number of spa allocators, and align to it.
*/
- if (zio_taskq_wr_iss_ncpus == 0) {
- count = MAX(boot_ncpus / spa->spa_alloc_count, 1);
- } else {
- count = MAX(1,
- boot_ncpus / MAX(1, zio_taskq_wr_iss_ncpus));
- }
+ cpus = MAX(1, boot_ncpus * zio_taskq_batch_pct / 100);
+ count = MAX(1, cpus / MAX(1, zio_taskq_write_tpq));
count = MAX(count, (zio_taskq_batch_pct + 99) / 100);
count = MIN(count, spa->spa_alloc_count);
+ while (spa->spa_alloc_count % count != 0 &&
+ spa->spa_alloc_count < count * 2)
+ count--;
/*
* zio_taskq_batch_pct is unbounded and may exceed 100%, but no
@@ -1495,15 +1494,11 @@ spa_taskq_dispatch_select(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
ASSERT3P(tqs->stqs_taskq, !=, NULL);
ASSERT3U(tqs->stqs_count, !=, 0);
- if ((t == ZIO_TYPE_WRITE) && (q == ZIO_TASKQ_ISSUE) &&
- (zio != NULL) && (zio->io_wr_iss_tq != NULL)) {
- /* dispatch to assigned write issue taskq */
- tq = zio->io_wr_iss_tq;
- return (tq);
- }
-
if (tqs->stqs_count == 1) {
tq = tqs->stqs_taskq[0];
+ } else if ((t == ZIO_TYPE_WRITE) && (q == ZIO_TASKQ_ISSUE) &&
+ (zio != NULL) && ZIO_HAS_ALLOCATOR(zio)) {
+ tq = tqs->stqs_taskq[zio->io_allocator % tqs->stqs_count];
} else {
tq = tqs->stqs_taskq[((uint64_t)gethrtime()) % tqs->stqs_count];
}
@@ -3594,11 +3589,16 @@ spa_activity_check_duration(spa_t *spa, uberblock_t *ub)
}
/*
- * Perform the import activity check. If the user canceled the import or
- * we detected activity then fail.
+ * Remote host activity check.
+ *
+ * error results:
+ * 0 - no activity detected
+ * EREMOTEIO - remote activity detected
+ * EINTR - user canceled the operation
*/
static int
-spa_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *config)
+spa_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *config,
+ boolean_t importing)
{
uint64_t txg = ub->ub_txg;
uint64_t timestamp = ub->ub_timestamp;
@@ -3643,19 +3643,23 @@ spa_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *config)
import_expire = gethrtime() + import_delay;
- spa_import_progress_set_notes(spa, "Checking MMP activity, waiting "
- "%llu ms", (u_longlong_t)NSEC2MSEC(import_delay));
+ if (importing) {
+ spa_import_progress_set_notes(spa, "Checking MMP activity, "
+ "waiting %llu ms", (u_longlong_t)NSEC2MSEC(import_delay));
+ }
- int interations = 0;
+ int iterations = 0;
while ((now = gethrtime()) < import_expire) {
- if (interations++ % 30 == 0) {
+ if (importing && iterations++ % 30 == 0) {
spa_import_progress_set_notes(spa, "Checking MMP "
"activity, %llu ms remaining",
(u_longlong_t)NSEC2MSEC(import_expire - now));
}
- (void) spa_import_progress_set_mmp_check(spa_guid(spa),
- NSEC2SEC(import_expire - gethrtime()));
+ if (importing) {
+ (void) spa_import_progress_set_mmp_check(spa_guid(spa),
+ NSEC2SEC(import_expire - gethrtime()));
+ }
vdev_uberblock_load(rvd, ub, &mmp_label);
@@ -3737,6 +3741,61 @@ out:
return (error);
}
+/*
+ * Called from zfs_ioc_clear for a pool that was suspended
+ * after failing mmp write checks.
+ */
+boolean_t
+spa_mmp_remote_host_activity(spa_t *spa)
+{
+ ASSERT(spa_multihost(spa) && spa_suspended(spa));
+
+ nvlist_t *best_label;
+ uberblock_t best_ub;
+
+ /*
+ * Locate the best uberblock on disk
+ */
+ vdev_uberblock_load(spa->spa_root_vdev, &best_ub, &best_label);
+ if (best_label) {
+ /*
+ * confirm that the best hostid matches our hostid
+ */
+ if (nvlist_exists(best_label, ZPOOL_CONFIG_HOSTID) &&
+ spa_get_hostid(spa) !=
+ fnvlist_lookup_uint64(best_label, ZPOOL_CONFIG_HOSTID)) {
+ nvlist_free(best_label);
+ return (B_TRUE);
+ }
+ nvlist_free(best_label);
+ } else {
+ return (B_TRUE);
+ }
+
+ if (!MMP_VALID(&best_ub) ||
+ !MMP_FAIL_INT_VALID(&best_ub) ||
+ MMP_FAIL_INT(&best_ub) == 0) {
+ return (B_TRUE);
+ }
+
+ if (best_ub.ub_txg != spa->spa_uberblock.ub_txg ||
+ best_ub.ub_timestamp != spa->spa_uberblock.ub_timestamp) {
+ zfs_dbgmsg("txg mismatch detected during pool clear "
+ "txg %llu ub_txg %llu timestamp %llu ub_timestamp %llu",
+ (u_longlong_t)spa->spa_uberblock.ub_txg,
+ (u_longlong_t)best_ub.ub_txg,
+ (u_longlong_t)spa->spa_uberblock.ub_timestamp,
+ (u_longlong_t)best_ub.ub_timestamp);
+ return (B_TRUE);
+ }
+
+ /*
+ * Perform an activity check looking for any remote writer
+ */
+ return (spa_activity_check(spa, &spa->spa_uberblock, spa->spa_config,
+ B_FALSE) != 0);
+}
+
static int
spa_verify_host(spa_t *spa, nvlist_t *mos_config)
{
@@ -4063,7 +4122,8 @@ spa_ld_select_uberblock(spa_t *spa, spa_import_type_t type)
return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO));
}
- int error = spa_activity_check(spa, ub, spa->spa_config);
+ int error =
+ spa_activity_check(spa, ub, spa->spa_config, B_TRUE);
if (error) {
nvlist_free(label);
return (error);
@@ -6772,7 +6832,7 @@ spa_tryimport(nvlist_t *tryconfig)
*/
char *name = kmem_alloc(MAXPATHLEN, KM_SLEEP);
(void) snprintf(name, MAXPATHLEN, "%s-%llx-%s",
- TRYIMPORT_NAME, (u_longlong_t)curthread, poolname);
+ TRYIMPORT_NAME, (u_longlong_t)(uintptr_t)curthread, poolname);
mutex_enter(&spa_namespace_lock);
spa = spa_add(name, tryconfig, NULL);
@@ -8771,15 +8831,16 @@ spa_async_remove(spa_t *spa, vdev_t *vd)
}
static void
-spa_async_probe(spa_t *spa, vdev_t *vd)
+spa_async_fault_vdev(spa_t *spa, vdev_t *vd)
{
- if (vd->vdev_probe_wanted) {
- vd->vdev_probe_wanted = B_FALSE;
- vdev_reopen(vd); /* vdev_open() does the actual probe */
+ if (vd->vdev_fault_wanted) {
+ vd->vdev_fault_wanted = B_FALSE;
+ vdev_set_state(vd, B_TRUE, VDEV_STATE_FAULTED,
+ VDEV_AUX_ERR_EXCEEDED);
}
for (int c = 0; c < vd->vdev_children; c++)
- spa_async_probe(spa, vd->vdev_child[c]);
+ spa_async_fault_vdev(spa, vd->vdev_child[c]);
}
static void
@@ -8867,11 +8928,11 @@ spa_async_thread(void *arg)
}
/*
- * See if any devices need to be probed.
+ * See if any devices need to be marked faulted.
*/
- if (tasks & SPA_ASYNC_PROBE) {
+ if (tasks & SPA_ASYNC_FAULT_VDEV) {
spa_vdev_state_enter(spa, SCL_NONE);
- spa_async_probe(spa, spa->spa_root_vdev);
+ spa_async_fault_vdev(spa, spa->spa_root_vdev);
(void) spa_vdev_state_exit(spa, NULL, 0);
}
@@ -10167,16 +10228,10 @@ spa_sync_tq_create(spa_t *spa, const char *name)
VERIFY(spa->spa_sync_tq != NULL);
VERIFY(kthreads != NULL);
- spa_taskqs_t *tqs =
- &spa->spa_zio_taskq[ZIO_TYPE_WRITE][ZIO_TASKQ_ISSUE];
-
spa_syncthread_info_t *ti = spa->spa_syncthreads;
- for (int i = 0, w = 0; i < nthreads; i++, w++, ti++) {
+ for (int i = 0; i < nthreads; i++, ti++) {
ti->sti_thread = kthreads[i];
- if (w == tqs->stqs_count) {
- w = 0;
- }
- ti->sti_wr_iss_tq = tqs->stqs_taskq[w];
+ ti->sti_allocator = i;
}
kmem_free(kthreads, sizeof (*kthreads) * nthreads);
@@ -10195,6 +10250,42 @@ spa_sync_tq_destroy(spa_t *spa)
spa->spa_sync_tq = NULL;
}
+uint_t
+spa_acq_allocator(spa_t *spa)
+{
+ int i;
+
+ if (spa->spa_alloc_count == 1)
+ return (0);
+
+ mutex_enter(&spa->spa_allocs_use->sau_lock);
+ uint_t r = spa->spa_allocs_use->sau_rotor;
+ do {
+ if (++r == spa->spa_alloc_count)
+ r = 0;
+ } while (spa->spa_allocs_use->sau_inuse[r]);
+ spa->spa_allocs_use->sau_inuse[r] = B_TRUE;
+ spa->spa_allocs_use->sau_rotor = r;
+ mutex_exit(&spa->spa_allocs_use->sau_lock);
+
+ spa_syncthread_info_t *ti = spa->spa_syncthreads;
+ for (i = 0; i < spa->spa_alloc_count; i++, ti++) {
+ if (ti->sti_thread == curthread) {
+ ti->sti_allocator = r;
+ break;
+ }
+ }
+ ASSERT3S(i, <, spa->spa_alloc_count);
+ return (r);
+}
+
+void
+spa_rel_allocator(spa_t *spa, uint_t allocator)
+{
+ if (spa->spa_alloc_count > 1)
+ spa->spa_allocs_use->sau_inuse[allocator] = B_FALSE;
+}
+
void
spa_select_allocator(zio_t *zio)
{
@@ -10222,8 +10313,7 @@ spa_select_allocator(zio_t *zio)
spa_syncthread_info_t *ti = spa->spa_syncthreads;
for (int i = 0; i < spa->spa_alloc_count; i++, ti++) {
if (ti->sti_thread == curthread) {
- zio->io_allocator = i;
- zio->io_wr_iss_tq = ti->sti_wr_iss_tq;
+ zio->io_allocator = ti->sti_allocator;
return;
}
}
@@ -10240,7 +10330,6 @@ spa_select_allocator(zio_t *zio)
bm->zb_blkid >> 20);
zio->io_allocator = (uint_t)hv % spa->spa_alloc_count;
- zio->io_wr_iss_tq = NULL;
}
/*
@@ -10811,10 +10900,10 @@ ZFS_MODULE_PARAM(zfs_spa, spa_, load_verify_data, INT, ZMOD_RW,
ZFS_MODULE_PARAM(zfs_spa, spa_, load_print_vdev_tree, INT, ZMOD_RW,
"Print vdev tree to zfs_dbgmsg during pool import");
-ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_batch_pct, UINT, ZMOD_RD,
+ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_batch_pct, UINT, ZMOD_RW,
"Percentage of CPUs to run an IO worker thread");
-ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_batch_tpq, UINT, ZMOD_RD,
+ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_batch_tpq, UINT, ZMOD_RW,
"Number of threads per IO worker taskqueue");
/* BEGIN CSTYLED */
@@ -10845,13 +10934,13 @@ ZFS_MODULE_PARAM(zfs_livelist_condense, zfs_livelist_condense_, new_alloc, INT,
#ifdef _KERNEL
ZFS_MODULE_VIRTUAL_PARAM_CALL(zfs_zio, zio_, taskq_read,
- spa_taskq_read_param_set, spa_taskq_read_param_get, ZMOD_RD,
+ spa_taskq_read_param_set, spa_taskq_read_param_get, ZMOD_RW,
"Configure IO queues for read IO");
ZFS_MODULE_VIRTUAL_PARAM_CALL(zfs_zio, zio_, taskq_write,
- spa_taskq_write_param_set, spa_taskq_write_param_get, ZMOD_RD,
+ spa_taskq_write_param_set, spa_taskq_write_param_get, ZMOD_RW,
"Configure IO queues for write IO");
#endif
/* END CSTYLED */
-ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_wr_iss_ncpus, UINT, ZMOD_RW,
- "Number of CPUs to run write issue taskqs");
+ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_write_tpq, UINT, ZMOD_RW,
+ "Number of CPUs per write issue taskq");
diff --git a/sys/contrib/openzfs/module/zfs/spa_misc.c b/sys/contrib/openzfs/module/zfs/spa_misc.c
index 5fb7847b5d8b..e6d4a9bdb29c 100644
--- a/sys/contrib/openzfs/module/zfs/spa_misc.c
+++ b/sys/contrib/openzfs/module/zfs/spa_misc.c
@@ -394,6 +394,7 @@ static const uint64_t spa_max_slop = 128ULL * 1024 * 1024 * 1024;
* Number of allocators to use, per spa instance
*/
static int spa_num_allocators = 4;
+static int spa_cpus_per_allocator = 4;
/*
* Spa active allocator.
@@ -747,8 +748,9 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
if (altroot)
spa->spa_root = spa_strdup(altroot);
- /* Do not allow more allocators than CPUs. */
- spa->spa_alloc_count = MIN(MAX(spa_num_allocators, 1), boot_ncpus);
+ /* Do not allow more allocators than fraction of CPUs. */
+ spa->spa_alloc_count = MAX(MIN(spa_num_allocators,
+ boot_ncpus / MAX(spa_cpus_per_allocator, 1)), 1);
spa->spa_allocs = kmem_zalloc(spa->spa_alloc_count *
sizeof (spa_alloc_t), KM_SLEEP);
@@ -758,6 +760,12 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
avl_create(&spa->spa_allocs[i].spaa_tree, zio_bookmark_compare,
sizeof (zio_t), offsetof(zio_t, io_queue_node.a));
}
+ if (spa->spa_alloc_count > 1) {
+ spa->spa_allocs_use = kmem_zalloc(offsetof(spa_allocs_use_t,
+ sau_inuse[spa->spa_alloc_count]), KM_SLEEP);
+ mutex_init(&spa->spa_allocs_use->sau_lock, NULL, MUTEX_DEFAULT,
+ NULL);
+ }
avl_create(&spa->spa_metaslabs_by_flushed, metaslab_sort_by_flushed,
sizeof (metaslab_t), offsetof(metaslab_t, ms_spa_txg_node));
@@ -853,6 +861,11 @@ spa_remove(spa_t *spa)
}
kmem_free(spa->spa_allocs, spa->spa_alloc_count *
sizeof (spa_alloc_t));
+ if (spa->spa_alloc_count > 1) {
+ mutex_destroy(&spa->spa_allocs_use->sau_lock);
+ kmem_free(spa->spa_allocs_use, offsetof(spa_allocs_use_t,
+ sau_inuse[spa->spa_alloc_count]));
+ }
avl_destroy(&spa->spa_metaslabs_by_flushed);
avl_destroy(&spa->spa_sm_logs_by_txg);
@@ -3097,4 +3110,7 @@ ZFS_MODULE_PARAM_CALL(zfs_spa, spa_, slop_shift, param_set_slop_shift,
param_get_uint, ZMOD_RW, "Reserved free space in pool");
ZFS_MODULE_PARAM(zfs, spa_, num_allocators, INT, ZMOD_RW,
- "Number of allocators per spa, capped by ncpus");
+ "Number of allocators per spa");
+
+ZFS_MODULE_PARAM(zfs, spa_, cpus_per_allocator, INT, ZMOD_RW,
+ "Minimum number of CPUs per allocators");
diff --git a/sys/contrib/openzfs/module/zfs/txg.c b/sys/contrib/openzfs/module/zfs/txg.c
index a67c043446f5..5ce6be69be14 100644
--- a/sys/contrib/openzfs/module/zfs/txg.c
+++ b/sys/contrib/openzfs/module/zfs/txg.c
@@ -551,6 +551,15 @@ txg_sync_thread(void *arg)
}
/*
+ * When we're suspended, nothing should be changing and for
+ * MMP we don't want to bump anything that would make it
+ * harder to detect if another host is changing it when
+ * resuming after a MMP suspend.
+ */
+ if (spa_suspended(spa))
+ continue;
+
+ /*
* Wait until the quiesce thread hands off a txg to us,
* prompting it to do so if necessary.
*/
diff --git a/sys/contrib/openzfs/module/zfs/vdev.c b/sys/contrib/openzfs/module/zfs/vdev.c
index d97d0a8100c2..c5551eb6cf6e 100644
--- a/sys/contrib/openzfs/module/zfs/vdev.c
+++ b/sys/contrib/openzfs/module/zfs/vdev.c
@@ -1664,6 +1664,7 @@ vdev_metaslab_fini(vdev_t *vd)
typedef struct vdev_probe_stats {
boolean_t vps_readable;
boolean_t vps_writeable;
+ boolean_t vps_zio_done_probe;
int vps_flags;
} vdev_probe_stats_t;
@@ -1709,6 +1710,17 @@ vdev_probe_done(zio_t *zio)
(void) zfs_ereport_post(FM_EREPORT_ZFS_PROBE_FAILURE,
spa, vd, NULL, NULL, 0);
zio->io_error = SET_ERROR(ENXIO);
+
+ /*
+ * If this probe was initiated from zio pipeline, then
+ * change the state in a spa_async_request. Probes that
+ * were initiated from a vdev_open can change the state
+ * as part of the open call.
+ */
+ if (vps->vps_zio_done_probe) {
+ vd->vdev_fault_wanted = B_TRUE;
+ spa_async_request(spa, SPA_ASYNC_FAULT_VDEV);
+ }
}
mutex_enter(&vd->vdev_probe_lock);
@@ -1759,6 +1771,7 @@ vdev_probe(vdev_t *vd, zio_t *zio)
vps->vps_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_PROBE |
ZIO_FLAG_DONT_AGGREGATE | ZIO_FLAG_TRYHARD;
+ vps->vps_zio_done_probe = (zio != NULL);
if (spa_config_held(spa, SCL_ZIO, RW_WRITER)) {
/*
@@ -1785,15 +1798,6 @@ vdev_probe(vdev_t *vd, zio_t *zio)
vd->vdev_probe_zio = pio = zio_null(NULL, spa, vd,
vdev_probe_done, vps,
vps->vps_flags | ZIO_FLAG_DONT_PROPAGATE);
-
- /*
- * We can't change the vdev state in this context, so we
- * kick off an async task to do it on our behalf.
- */
- if (zio != NULL) {
- vd->vdev_probe_wanted = B_TRUE;
- spa_async_request(spa, SPA_ASYNC_PROBE);
- }
}
if (zio != NULL)
diff --git a/sys/contrib/openzfs/module/zfs/vdev_label.c b/sys/contrib/openzfs/module/zfs/vdev_label.c
index c31f48028bbc..ed592514fded 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_label.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_label.c
@@ -2027,6 +2027,7 @@ retry:
/*
* If this isn't a resync due to I/O errors,
* and nothing changed in this transaction group,
+ * and multihost protection isn't enabled,
* and the vdev configuration hasn't changed,
* then there's nothing to do.
*/
@@ -2034,7 +2035,8 @@ retry:
boolean_t changed = uberblock_update(ub, spa->spa_root_vdev,
txg, spa->spa_mmp.mmp_delay);
- if (!changed && list_is_empty(&spa->spa_config_dirty_list))
+ if (!changed && list_is_empty(&spa->spa_config_dirty_list) &&
+ !spa_multihost(spa))
return (0);
}
diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
index b03331ec69c6..de7d0fa79478 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
@@ -1891,8 +1891,9 @@ vdev_raidz_matrix_reconstruct(raidz_row_t *rr, int n, int nmissing,
static void
vdev_raidz_reconstruct_general(raidz_row_t *rr, int *tgts, int ntgts)
{
- int n, i, c, t, tt;
- int nmissing_rows;
+ int i, c, t, tt;
+ unsigned int n;
+ unsigned int nmissing_rows;
int missing_rows[VDEV_RAIDZ_MAXPARITY];
int parity_map[VDEV_RAIDZ_MAXPARITY];
uint8_t *p, *pp;
diff --git a/sys/contrib/openzfs/module/zfs/zap.c b/sys/contrib/openzfs/module/zfs/zap.c
index da86defb445c..1b6b16fc6662 100644
--- a/sys/contrib/openzfs/module/zfs/zap.c
+++ b/sys/contrib/openzfs/module/zfs/zap.c
@@ -22,6 +22,8 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright 2023 Alexander Stetsenko <alex.stetsenko@gmail.com>
+ * Copyright (c) 2023, Klara Inc.
*/
/*
@@ -41,6 +43,7 @@
#include <sys/spa.h>
#include <sys/dmu.h>
+#include <sys/dnode.h>
#include <sys/zfs_context.h>
#include <sys/zfs_znode.h>
#include <sys/fs/zfs.h>
@@ -78,9 +81,16 @@
*/
static int zap_iterate_prefetch = B_TRUE;
+/*
+ * Enable ZAP shrinking. When enabled, empty sibling leaf blocks will be
+ * collapsed into a single block.
+ */
+int zap_shrink_enabled = B_TRUE;
+
int fzap_default_block_shift = 14; /* 16k blocksize */
static uint64_t zap_allocate_blocks(zap_t *zap, int nblocks);
+static int zap_shrink(zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx);
void
fzap_byteswap(void *vbuf, size_t size)
@@ -587,6 +597,72 @@ zap_set_idx_to_blk(zap_t *zap, uint64_t idx, uint64_t blk, dmu_tx_t *tx)
}
static int
+zap_set_idx_range_to_blk(zap_t *zap, uint64_t idx, uint64_t nptrs, uint64_t blk,
+ dmu_tx_t *tx)
+{
+ int bs = FZAP_BLOCK_SHIFT(zap);
+ int epb = bs >> 3; /* entries per block */
+ int err = 0;
+
+ ASSERT(tx != NULL);
+ ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
+
+ /*
+ * Check for i/o errors
+ */
+ for (int i = 0; i < nptrs; i += epb) {
+ uint64_t blk;
+ err = zap_idx_to_blk(zap, idx + i, &blk);
+ if (err != 0) {
+ return (err);
+ }
+ }
+
+ for (int i = 0; i < nptrs; i++) {
+ err = zap_set_idx_to_blk(zap, idx + i, blk, tx);
+ ASSERT0(err); /* we checked for i/o errors above */
+ if (err != 0)
+ break;
+ }
+
+ return (err);
+}
+
+#define ZAP_PREFIX_HASH(pref, pref_len) ((pref) << (64 - (pref_len)))
+
+/*
+ * Each leaf has single range of entries (block pointers) in the ZAP ptrtbl.
+ * If two leaves are siblings, their ranges are adjecent and contain the same
+ * number of entries. In order to find out if a leaf has a sibling, we need to
+ * check the range corresponding to the sibling leaf. There is no need to check
+ * all entries in the range, we only need to check the frist and the last one.
+ */
+static uint64_t
+check_sibling_ptrtbl_range(zap_t *zap, uint64_t prefix, uint64_t prefix_len)
+{
+ ASSERT(RW_LOCK_HELD(&zap->zap_rwlock));
+
+ uint64_t h = ZAP_PREFIX_HASH(prefix, prefix_len);
+ uint64_t idx = ZAP_HASH_IDX(h, zap_f_phys(zap)->zap_ptrtbl.zt_shift);
+ uint64_t pref_diff = zap_f_phys(zap)->zap_ptrtbl.zt_shift - prefix_len;
+ uint64_t nptrs = (1 << pref_diff);
+ uint64_t first;
+ uint64_t last;
+
+ ASSERT3U(idx+nptrs, <=, (1UL << zap_f_phys(zap)->zap_ptrtbl.zt_shift));
+
+ if (zap_idx_to_blk(zap, idx, &first) != 0)
+ return (0);
+
+ if (zap_idx_to_blk(zap, idx + nptrs - 1, &last) != 0)
+ return (0);
+
+ if (first != last)
+ return (0);
+ return (first);
+}
+
+static int
zap_deref_leaf(zap_t *zap, uint64_t h, dmu_tx_t *tx, krw_t lt, zap_leaf_t **lp)
{
uint64_t blk;
@@ -958,6 +1034,10 @@ fzap_remove(zap_name_t *zn, dmu_tx_t *tx)
if (err == 0) {
zap_entry_remove(&zeh);
zap_increment_num_entries(zn->zn_zap, -1, tx);
+
+ if (zap_leaf_phys(l)->l_hdr.lh_nentries == 0 &&
+ zap_shrink_enabled)
+ return (zap_shrink(zn, l, tx));
}
zap_put_leaf(l);
return (err);
@@ -1222,13 +1302,19 @@ fzap_cursor_retrieve(zap_t *zap, zap_cursor_t *zc, zap_attribute_t *za)
ZIO_PRIORITY_ASYNC_READ);
}
- if (zc->zc_leaf &&
- (ZAP_HASH_IDX(zc->zc_hash,
- zap_leaf_phys(zc->zc_leaf)->l_hdr.lh_prefix_len) !=
- zap_leaf_phys(zc->zc_leaf)->l_hdr.lh_prefix)) {
+ if (zc->zc_leaf) {
rw_enter(&zc->zc_leaf->l_rwlock, RW_READER);
- zap_put_leaf(zc->zc_leaf);
- zc->zc_leaf = NULL;
+
+ /*
+ * The leaf was either shrunk or split.
+ */
+ if ((zap_leaf_phys(zc->zc_leaf)->l_hdr.lh_block_type == 0) ||
+ (ZAP_HASH_IDX(zc->zc_hash,
+ zap_leaf_phys(zc->zc_leaf)->l_hdr.lh_prefix_len) !=
+ zap_leaf_phys(zc->zc_leaf)->l_hdr.lh_prefix)) {
+ zap_put_leaf(zc->zc_leaf);
+ zc->zc_leaf = NULL;
+ }
}
again:
@@ -1237,8 +1323,6 @@ again:
&zc->zc_leaf);
if (err != 0)
return (err);
- } else {
- rw_enter(&zc->zc_leaf->l_rwlock, RW_READER);
}
l = zc->zc_leaf;
@@ -1367,6 +1451,242 @@ fzap_get_stats(zap_t *zap, zap_stats_t *zs)
}
}
+/*
+ * Find last allocated block and update freeblk.
+ */
+static void
+zap_trunc(zap_t *zap)
+{
+ uint64_t nentries;
+ uint64_t lastblk;
+
+ ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
+
+ if (zap_f_phys(zap)->zap_ptrtbl.zt_blk > 0) {
+ /* External ptrtbl */
+ nentries = (1 << zap_f_phys(zap)->zap_ptrtbl.zt_shift);
+ lastblk = zap_f_phys(zap)->zap_ptrtbl.zt_blk +
+ zap_f_phys(zap)->zap_ptrtbl.zt_numblks - 1;
+ } else {
+ /* Embedded ptrtbl */
+ nentries = (1 << ZAP_EMBEDDED_PTRTBL_SHIFT(zap));
+ lastblk = 0;
+ }
+
+ for (uint64_t idx = 0; idx < nentries; idx++) {
+ uint64_t blk;
+ if (zap_idx_to_blk(zap, idx, &blk) != 0)
+ return;
+ if (blk > lastblk)
+ lastblk = blk;
+ }
+
+ ASSERT3U(lastblk, <, zap_f_phys(zap)->zap_freeblk);
+
+ zap_f_phys(zap)->zap_freeblk = lastblk + 1;
+}
+
+/*
+ * ZAP shrinking algorithm.
+ *
+ * We shrink ZAP recuresively removing empty leaves. We can remove an empty leaf
+ * only if it has a sibling. Sibling leaves have the same prefix length and
+ * their prefixes differ only by the least significant (sibling) bit. We require
+ * both siblings to be empty. This eliminates a need to rehash the non-empty
+ * remaining leaf. When we have removed one of two empty sibling, we set ptrtbl
+ * entries of the removed leaf to point out to the remaining leaf. Prefix length
+ * of the remaining leaf is decremented. As a result, it has a new prefix and it
+ * might have a new sibling. So, we repeat the process.
+ *
+ * Steps:
+ * 1. Check if a sibling leaf (sl) exists and it is empty.
+ * 2. Release the leaf (l) if it has the sibling bit (slbit) equal to 1.
+ * 3. Release the sibling (sl) to derefer it again with WRITER lock.
+ * 4. Upgrade zapdir lock to WRITER (once).
+ * 5. Derefer released leaves again.
+ * 6. If it is needed, recheck whether both leaves are still siblings and empty.
+ * 7. Set ptrtbl pointers of the removed leaf (slbit 1) to point out to blkid of
+ * the remaining leaf (slbit 0).
+ * 8. Free disk block of the removed leaf (dmu_free_range).
+ * 9. Decrement prefix_len of the remaining leaf.
+ * 10. Repeat the steps.
+ */
+static int
+zap_shrink(zap_name_t *zn, zap_leaf_t *l, dmu_tx_t *tx)
+{
+ zap_t *zap = zn->zn_zap;
+ int64_t zt_shift = zap_f_phys(zap)->zap_ptrtbl.zt_shift;
+ uint64_t hash = zn->zn_hash;
+ uint64_t prefix = zap_leaf_phys(l)->l_hdr.lh_prefix;
+ uint64_t prefix_len = zap_leaf_phys(l)->l_hdr.lh_prefix_len;
+ boolean_t trunc = B_FALSE;
+ int err = 0;
+
+ ASSERT3U(zap_leaf_phys(l)->l_hdr.lh_nentries, ==, 0);
+ ASSERT3U(prefix_len, <=, zap_f_phys(zap)->zap_ptrtbl.zt_shift);
+ ASSERT(RW_LOCK_HELD(&zap->zap_rwlock));
+ ASSERT3U(ZAP_HASH_IDX(hash, prefix_len), ==, prefix);
+
+ boolean_t writer = B_FALSE;
+
+ /*
+ * To avoid deadlock always deref leaves in the same order -
+ * sibling 0 first, then sibling 1.
+ */
+ while (prefix_len) {
+ zap_leaf_t *sl;
+ int64_t prefix_diff = zt_shift - prefix_len;
+ uint64_t sl_prefix = prefix ^ 1;
+ uint64_t sl_hash = ZAP_PREFIX_HASH(sl_prefix, prefix_len);
+ int slbit = prefix & 1;
+
+ ASSERT3U(zap_leaf_phys(l)->l_hdr.lh_nentries, ==, 0);
+
+ /*
+ * Check if there is a sibling by reading ptrtbl ptrs.
+ */
+ if (check_sibling_ptrtbl_range(zap, sl_prefix, prefix_len) == 0)
+ break;
+
+ /*
+ * sibling 1, unlock it - we haven't yet dereferenced sibling 0.
+ */
+ if (slbit == 1) {
+ zap_put_leaf(l);
+ l = NULL;
+ }
+
+ /*
+ * Dereference sibling leaf and check if it is empty.
+ */
+ if ((err = zap_deref_leaf(zap, sl_hash, tx, RW_READER,
+ &sl)) != 0)
+ break;
+
+ ASSERT3U(ZAP_HASH_IDX(sl_hash, prefix_len), ==, sl_prefix);
+
+ /*
+ * Check if we have a sibling and it is empty.
+ */
+ if (zap_leaf_phys(sl)->l_hdr.lh_prefix_len != prefix_len ||
+ zap_leaf_phys(sl)->l_hdr.lh_nentries != 0) {
+ zap_put_leaf(sl);
+ break;
+ }
+
+ zap_put_leaf(sl);
+
+ /*
+ * If there two empty sibling, we have work to do, so
+ * we need to lock ZAP ptrtbl as WRITER.
+ */
+ if (!writer && (writer = zap_tryupgradedir(zap, tx)) == 0) {
+ /* We failed to upgrade */
+ if (l != NULL) {
+ zap_put_leaf(l);
+ l = NULL;
+ }
+
+ /*
+ * Usually, the right way to upgrade from a READER lock
+ * to a WRITER lock is to call zap_unlockdir() and
+ * zap_lockdir(), but we do not have a tag. Instead,
+ * we do it in more sophisticated way.
+ */
+ rw_exit(&zap->zap_rwlock);
+ rw_enter(&zap->zap_rwlock, RW_WRITER);
+ dmu_buf_will_dirty(zap->zap_dbuf, tx);
+
+ zt_shift = zap_f_phys(zap)->zap_ptrtbl.zt_shift;
+ writer = B_TRUE;
+ }
+
+ /*
+ * Here we have WRITER lock for ptrtbl.
+ * Now, we need a WRITER lock for both siblings leaves.
+ * Also, we have to recheck if the leaves are still siblings
+ * and still empty.
+ */
+ if (l == NULL) {
+ /* sibling 0 */
+ if ((err = zap_deref_leaf(zap, (slbit ? sl_hash : hash),
+ tx, RW_WRITER, &l)) != 0)
+ break;
+
+ /*
+ * The leaf isn't empty anymore or
+ * it was shrunk/split while our locks were down.
+ */
+ if (zap_leaf_phys(l)->l_hdr.lh_nentries != 0 ||
+ zap_leaf_phys(l)->l_hdr.lh_prefix_len != prefix_len)
+ break;
+ }
+
+ /* sibling 1 */
+ if ((err = zap_deref_leaf(zap, (slbit ? hash : sl_hash), tx,
+ RW_WRITER, &sl)) != 0)
+ break;
+
+ /*
+ * The leaf isn't empty anymore or
+ * it was shrunk/split while our locks were down.
+ */
+ if (zap_leaf_phys(sl)->l_hdr.lh_nentries != 0 ||
+ zap_leaf_phys(sl)->l_hdr.lh_prefix_len != prefix_len) {
+ zap_put_leaf(sl);
+ break;
+ }
+
+ /* If we have gotten here, we have a leaf to collapse */
+ uint64_t idx = (slbit ? prefix : sl_prefix) << prefix_diff;
+ uint64_t nptrs = (1ULL << prefix_diff);
+ uint64_t sl_blkid = sl->l_blkid;
+
+ /*
+ * Set ptrtbl entries to point out to the slibling 0 blkid
+ */
+ if ((err = zap_set_idx_range_to_blk(zap, idx, nptrs, l->l_blkid,
+ tx)) != 0) {
+ zap_put_leaf(sl);
+ break;
+ }
+
+ /*
+ * Free sibling 1 disk block.
+ */
+ int bs = FZAP_BLOCK_SHIFT(zap);
+ if (sl_blkid == zap_f_phys(zap)->zap_freeblk - 1)
+ trunc = B_TRUE;
+
+ (void) dmu_free_range(zap->zap_objset, zap->zap_object,
+ sl_blkid << bs, 1 << bs, tx);
+ zap_put_leaf(sl);
+
+ zap_f_phys(zap)->zap_num_leafs--;
+
+ /*
+ * Update prefix and prefix_len.
+ */
+ zap_leaf_phys(l)->l_hdr.lh_prefix >>= 1;
+ zap_leaf_phys(l)->l_hdr.lh_prefix_len--;
+
+ prefix = zap_leaf_phys(l)->l_hdr.lh_prefix;
+ prefix_len = zap_leaf_phys(l)->l_hdr.lh_prefix_len;
+ }
+
+ if (trunc)
+ zap_trunc(zap);
+
+ if (l != NULL)
+ zap_put_leaf(l);
+
+ return (err);
+}
+
/* CSTYLED */
ZFS_MODULE_PARAM(zfs, , zap_iterate_prefetch, INT, ZMOD_RW,
"When iterating ZAP object, prefetch it");
+
+/* CSTYLED */
+ZFS_MODULE_PARAM(zfs, , zap_shrink_enabled, INT, ZMOD_RW,
+ "Enable ZAP shrinking");
diff --git a/sys/contrib/openzfs/module/zfs/zfs_ioctl.c b/sys/contrib/openzfs/module/zfs/zfs_ioctl.c
index 2ac1e34dccec..908b9efc1813 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_ioctl.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_ioctl.c
@@ -5823,10 +5823,13 @@ zfs_ioc_clear(zfs_cmd_t *zc)
/*
* If multihost is enabled, resuming I/O is unsafe as another
- * host may have imported the pool.
+ * host may have imported the pool. Check for remote activity.
*/
- if (spa_multihost(spa) && spa_suspended(spa))
- return (SET_ERROR(EINVAL));
+ if (spa_multihost(spa) && spa_suspended(spa) &&
+ spa_mmp_remote_host_activity(spa)) {
+ spa_close(spa, FTAG);
+ return (SET_ERROR(EREMOTEIO));
+ }
spa_vdev_state_enter(spa, SCL_NONE);
diff --git a/sys/contrib/openzfs/module/zfs/zio.c b/sys/contrib/openzfs/module/zfs/zio.c
index 1ba99f4d4624..870343bf4fa3 100644
--- a/sys/contrib/openzfs/module/zfs/zio.c
+++ b/sys/contrib/openzfs/module/zfs/zio.c
@@ -803,9 +803,10 @@ zio_notify_parent(zio_t *pio, zio_t *zio, enum zio_wait_type wait,
/*
* If we can tell the caller to execute this parent next, do
- * so. We only do this if the parent's zio type matches the
- * child's type. Otherwise dispatch the parent zio in its
- * own taskq.
+ * so. We do this if the parent's zio type matches the child's
+ * type, or if it's a zio_null() with no done callback, and so
+ * has no actual work to do. Otherwise dispatch the parent zio
+ * in its own taskq.
*
* Having the caller execute the parent when possible reduces
* locking on the zio taskq's, reduces context switch
@@ -825,7 +826,8 @@ zio_notify_parent(zio_t *pio, zio_t *zio, enum zio_wait_type wait,
* of writes for spa_sync(), and the chain of ZIL blocks.
*/
if (next_to_executep != NULL && *next_to_executep == NULL &&
- pio->io_type == zio->io_type) {
+ (pio->io_type == zio->io_type ||
+ (pio->io_type == ZIO_TYPE_NULL && !pio->io_done))) {
*next_to_executep = pio;
} else {
zio_taskq_dispatch(pio, type, B_FALSE);
@@ -2532,8 +2534,10 @@ zio_suspend(spa_t *spa, zio_t *zio, zio_suspend_reason_t reason)
"failure and the failure mode property for this pool "
"is set to panic.", spa_name(spa));
- cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable I/O "
- "failure and has been suspended.\n", spa_name(spa));
+ if (reason != ZIO_SUSPEND_MMP) {
+ cmn_err(CE_WARN, "Pool '%s' has encountered an uncorrectable "
+ "I/O failure and has been suspended.\n", spa_name(spa));
+ }
(void) zfs_ereport_post(FM_EREPORT_ZFS_IO_FAILURE, spa, NULL,
NULL, NULL, 0);
@@ -2921,7 +2925,6 @@ static void
zio_gang_inherit_allocator(zio_t *pio, zio_t *cio)
{
cio->io_allocator = pio->io_allocator;
- cio->io_wr_iss_tq = pio->io_wr_iss_tq;
}
static void
diff --git a/sys/contrib/openzfs/module/zfs/zio_inject.c b/sys/contrib/openzfs/module/zfs/zio_inject.c
index 3773e400d799..012a0e3c6c17 100644
--- a/sys/contrib/openzfs/module/zfs/zio_inject.c
+++ b/sys/contrib/openzfs/module/zfs/zio_inject.c
@@ -607,9 +607,11 @@ zio_handle_io_delay(zio_t *zio)
if (vd->vdev_guid != handler->zi_record.zi_guid)
continue;
+ /* also match on I/O type (e.g., -T read) */
if (handler->zi_record.zi_iotype != ZIO_TYPES &&
- handler->zi_record.zi_iotype != zio->io_type)
- continue;
+ handler->zi_record.zi_iotype != zio->io_type) {
+ continue;
+ }
/*
* Defensive; should never happen as the array allocation
diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run
index 0586d991b802..5e7fdf359a75 100644
--- a/sys/contrib/openzfs/tests/runfiles/common.run
+++ b/sys/contrib/openzfs/tests/runfiles/common.run
@@ -643,6 +643,10 @@ tags = ['functional', 'compression']
tests = ['cp_files_001_pos', 'cp_files_002_pos', 'cp_stress']
tags = ['functional', 'cp_files']
+[tests/functional/zap_shrink]
+tests = ['zap_shrink_001_pos']
+tags = ['functional', 'zap_shrink']
+
[tests/functional/crtime]
tests = ['crtime_001_pos' ]
tags = ['functional', 'crtime']
diff --git a/sys/contrib/openzfs/tests/runfiles/linux.run b/sys/contrib/openzfs/tests/runfiles/linux.run
index a0b74ef4a8c6..92ce09ec6fcb 100644
--- a/sys/contrib/openzfs/tests/runfiles/linux.run
+++ b/sys/contrib/openzfs/tests/runfiles/linux.run
@@ -146,7 +146,7 @@ tags = ['functional', 'mmap']
tests = ['mmp_on_thread', 'mmp_on_uberblocks', 'mmp_on_off', 'mmp_interval',
'mmp_active_import', 'mmp_inactive_import', 'mmp_exported_import',
'mmp_write_uberblocks', 'mmp_reset_interval', 'multihost_history',
- 'mmp_on_zdb', 'mmp_write_distribution', 'mmp_hostid']
+ 'mmp_on_zdb', 'mmp_write_distribution', 'mmp_hostid', 'mmp_write_slow_disk']
tags = ['functional', 'mmp']
[tests/functional/mount:Linux]
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
index dc447e042225..d625c040b819 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
@@ -1593,6 +1593,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/mmp/mmp_on_zdb.ksh \
functional/mmp/mmp_reset_interval.ksh \
functional/mmp/mmp_write_distribution.ksh \
+ functional/mmp/mmp_write_slow_disk.ksh \
functional/mmp/mmp_write_uberblocks.ksh \
functional/mmp/multihost_history.ksh \
functional/mmp/setup.ksh \
@@ -2074,6 +2075,9 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/xattr/xattr_012_pos.ksh \
functional/xattr/xattr_013_pos.ksh \
functional/xattr/xattr_compat.ksh \
+ functional/zap_shrink/cleanup.ksh \
+ functional/zap_shrink/zap_shrink_001_pos.ksh \
+ functional/zap_shrink/setup.ksh \
functional/zpool_influxdb/cleanup.ksh \
functional/zpool_influxdb/setup.ksh \
functional/zpool_influxdb/zpool_influxdb.ksh \
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_write_slow_disk.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_write_slow_disk.ksh
new file mode 100755
index 000000000000..8b118684aa7f
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_write_slow_disk.ksh
@@ -0,0 +1,97 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2024, Klara Inc
+#
+
+# DESCRIPTION:
+# Verify that long VDEV probes do not cause MMP checks to suspend pool
+# Note: without PR-15839 fix, this test will suspend the pool.
+#
+# A device that is returning unexpected errors will trigger a vdev_probe.
+# When the device additionally has slow response times, the probe can hold
+# the spa config lock as a writer for a long period of time such that the
+# mmp uberblock updates stall when trying to acquire the spa config lock.
+#
+# STRATEGY:
+# 1. Create a pool with multiple leaf vdevs
+# 2. Enable multihost and multihost_history
+# 3. Delay for MMP writes to occur
+# 4. Verify that a long VDEV probe didn't cause MMP check to suspend pool
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/mmp/mmp.cfg
+. $STF_SUITE/tests/functional/mmp/mmp.kshlib
+
+verify_runnable "both"
+
+function cleanup
+{
+ log_must zinject -c all
+
+ if [[ $(zpool list -H -o health $MMP_POOL) == "SUSPENDED" ]]; then
+ log_must zpool clear $MMP_POOL
+ zpool get state $MMP_POOL $MMP_DIR/file.3
+ zpool events | grep ".fs.zfs." | grep -v "history_event"
+ fi
+
+ poolexists $MMP_POOL && destroy_pool $MMP_POOL
+ log_must rm -r $MMP_DIR
+ log_must mmp_clear_hostid
+}
+
+log_assert "A long VDEV probe doesn't cause a MMP check suspend"
+log_onexit cleanup
+
+MMP_HISTORY_URL=/proc/spl/kstat/zfs/$MMP_POOL/multihost
+
+# Create a multiple drive pool
+log_must zpool events -c
+log_must mkdir -p $MMP_DIR
+log_must truncate -s 128M $MMP_DIR/file.{0,1,2,3,4,5}
+log_must zpool create -f $MMP_POOL \
+ mirror $MMP_DIR/file.{0,1,2} \
+ mirror $MMP_DIR/file.{3,4,5}
+
+# Enable MMP
+log_must mmp_set_hostid $HOSTID1
+log_must zpool set multihost=on $MMP_POOL
+clear_mmp_history
+
+# Inject vdev write error along with a delay
+log_must zinject -f 33 -e io -L pad2 -T write -d $MMP_DIR/file.3 $MMP_POOL
+log_must zinject -f 50 -e io -L uber -T write -d $MMP_DIR/file.3 $MMP_POOL
+log_must zinject -D 2000:4 -T write -d $MMP_DIR/file.3 $MMP_POOL
+
+log_must dd if=/dev/urandom of=/$MMP_POOL/data bs=1M count=5
+sleep 10
+sync_pool $MMP_POOL
+
+# Confirm mmp writes to the non-slow disks have taken place
+for x in {0,1,2,4}; do
+ write_count=$(grep -c file.${x} $MMP_HISTORY_URL)
+ [[ $write_count -gt 0 ]] || log_fail "expecting mmp writes"
+done
+
+# Expect that the pool was not suspended
+log_must check_state $MMP_POOL "" "ONLINE"
+health=$(zpool list -H -o health $MMP_POOL)
+log_note "$MMP_POOL health is $health"
+[[ "$health" == "SUSPENDED" ]] && log_fail "$MMP_POOL $health unexpected"
+
+log_pass "A long VDEV probe doesn't cause a MMP check suspend"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/cleanup.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/cleanup.ksh
new file mode 100755
index 000000000000..42fe70042d6a
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/cleanup.ksh
@@ -0,0 +1,34 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# Copyright (c) 2013 by Delphix. All rights reserved.
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+default_cleanup
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/setup.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/setup.ksh
new file mode 100755
index 000000000000..b756d4e76c83
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/setup.ksh
@@ -0,0 +1,35 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# Copyright (c) 2013 by Delphix. All rights reserved.
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+DISK=${DISKS%% *}
+default_setup $DISK
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/zap_shrink_001_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/zap_shrink_001_pos.ksh
new file mode 100755
index 000000000000..4dbf579b8ac7
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/zap_shrink_001_pos.ksh
@@ -0,0 +1,81 @@
+#! /bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2024, Klara Inc.
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+#
+# DESCRIPTION:
+# Create a large number of files in a directory. Then remove all files and
+# check that the directory zap was shrunk. Use zdb to check that the zap object
+# contains only one leaf block using zdb.
+#
+
+verify_runnable "global"
+
+DIR=largedir
+
+NR_FILES=100000
+BATCH=1000
+CWD=$PWD
+
+log_assert "Create a large number of files ($NR_FILES) in a directory. " \
+ "Make sure that the directory ZAP object was shrunk."
+
+log_must mkdir $TESTDIR/$DIR
+
+cd $TESTDIR/$DIR
+# In order to prevent arguments overflowing, create NR_FILES in BATCH at once.
+for i in $(seq $(($NR_FILES/$BATCH))); do
+ touch $(seq $((($i-1)*$BATCH+1)) $(($i*$BATCH)));
+done
+cd $CWD
+
+log_must test $NR_FILES -eq $(ls -U $TESTDIR/$DIR | wc -l)
+
+# remove all files in $DIR directory
+cd $TESTDIR/$DIR
+for i in $(seq $(($NR_FILES/$BATCH))); do
+ rm $(seq $((($i-1)*$BATCH+1)) $(($i*$BATCH)))
+done
+cd $CWD
+sync_pool $TESTPOOL
+
+log_must test 0 -eq $(ls -U $TESTDIR/$DIR | wc -l)
+
+# check whether zap_shrink works
+zapobj=$(zdb -v -O $TESTPOOL/$TESTFS $DIR)
+nleafs=$(echo "$zapobj" | grep "Leaf blocks:" | awk -F\: '{print($2);}')
+log_must test 1 -eq $nleafs
+
+log_must zpool export $TESTPOOL
+log_must zpool import $TESTPOOL
+
+# check whether zap_shrink works
+zapobj=$(zdb -v -O $TESTPOOL/$TESTFS $DIR)
+nleafs=$(echo "$zapobj" | grep "Leaf blocks:" | awk -F\: '{print($2);}')
+log_must test 1 -eq $nleafs
+
+log_pass
diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c
index 1f9cd33f9e00..8109a6714814 100644
--- a/sys/dev/aic7xxx/ahc_pci.c
+++ b/sys/dev/aic7xxx/ahc_pci.c
@@ -138,7 +138,7 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
struct resource *regs;
int regs_type;
int regs_id;
- int allow_memio;
+ int allow_memio = 1;
regs = NULL;
regs_type = 0;
@@ -150,14 +150,14 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
"allow_memio", &allow_memio) != 0) {
if (bootverbose)
device_printf(ahc->dev_softc, "Defaulting to MEMIO ");
-#ifdef AHC_ALLOW_MEMIO
- if (bootverbose)
- printf("on\n");
- allow_memio = 1;
-#else
+#if defined(AHC_ALLOW_MEMIO) && (AHC_ALLOW_MEMIO == 0)
if (bootverbose)
printf("off\n");
allow_memio = 0;
+#else
+ if (bootverbose)
+ printf("on\n");
+ allow_memio = 1;
#endif
}
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c
index 1b1d31769f90..0c4b615c5b24 100644
--- a/sys/dev/aic7xxx/aic79xx.c
+++ b/sys/dev/aic7xxx/aic79xx.c
@@ -6229,6 +6229,9 @@ ahd_init(struct ahd_softc *ahd)
size_t driver_data_size;
int i;
int error;
+#ifdef AHD_TARGET_MODE
+ int tmode_enable;
+#endif
u_int warn_user;
uint8_t current_sensing;
uint8_t fstat;
@@ -6261,8 +6264,22 @@ ahd_init(struct ahd_softc *ahd)
/*
* Only allow target mode features if this unit has them enabled.
*/
- if ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) == 0)
+#ifdef AHD_TARGET_MODE
+ tmode_enable = ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) != 0);
+ resource_int_value(device_get_name(ahd->dev_softc),
+ device_get_unit(ahd->dev_softc),
+ "tmode_enable", &tmode_enable);
+
+ if (tmode_enable == 0) {
ahd->features &= ~AHD_TARGETMODE;
+ } else {
+ if (bootverbose && ((ahd->features & AHD_TARGETMODE) != 0))
+ printf("%s: enabling target mode\n", ahd_name(ahd));
+ }
+
+#else
+ ahd->features &= ~AHD_TARGETMODE;
+#endif
/* DMA tag for mapping buffers into device visible space. */
if (aic_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c
index 1560aa4fe312..c09876e9f589 100644
--- a/sys/dev/aic7xxx/aic7xxx.c
+++ b/sys/dev/aic7xxx/aic7xxx.c
@@ -4774,6 +4774,9 @@ ahc_init(struct ahc_softc *ahc)
{
int max_targ;
int error;
+#ifdef AHC_TARGET_MODE
+ int tmode_enable;
+#endif
u_int i;
u_int scsi_conf;
u_int ultraenb;
@@ -4826,8 +4829,22 @@ ahc_init(struct ahc_softc *ahc)
/*
* Only allow target mode features if this unit has them enabled.
*/
- if ((AHC_TMODE_ENABLE & (0x1 << ahc->unit)) == 0)
+#ifdef AHC_TARGET_MODE
+ tmode_enable = ((AHC_TMODE_ENABLE & (0x1 << ahc->unit)) != 0);
+ resource_int_value(device_get_name(ahc->dev_softc),
+ device_get_unit(ahc->dev_softc),
+ "tmode_enable", &tmode_enable);
+
+ if (tmode_enable == 0) {
ahc->features &= ~AHC_TARGETMODE;
+ } else {
+ if (bootverbose && ((ahc->features & AHC_TARGETMODE) != 0))
+ printf("%s: enabling target mode\n", ahc_name(ahc));
+ }
+
+#else
+ ahc->features &= ~AHC_TARGETMODE;
+#endif
/* DMA tag for mapping buffers into device visible space. */
if (aic_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
index d3bca594b468..95d9da9be1b7 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
+++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
@@ -343,10 +343,13 @@ aic_print_file_prologue(FILE *ofile)
static void
aic_print_include(FILE *dfile, char *header_file)
{
-
if (dfile == NULL)
return;
- fprintf(dfile, "\n#include \"%s\"\n\n", header_file);
+
+ if (header_file[0] == '<')
+ fprintf(dfile, "\n#include %s\n\n", header_file);
+ else
+ fprintf(dfile, "\n#include \"%s\"\n\n", header_file);
}
static void
diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c
index beb4ff338dc7..3e68525067fb 100644
--- a/sys/dev/axgbe/if_axgbe_pci.c
+++ b/sys/dev/axgbe/if_axgbe_pci.c
@@ -56,6 +56,12 @@
#include "ifdi_if.h"
#include "opt_inet.h"
#include "opt_inet6.h"
+#include "opt_rss.h"
+
+#ifdef RSS
+#include <net/rss_config.h>
+#include <netinet/in_rss.h>
+#endif
MALLOC_DEFINE(M_AXGBE, "axgbe", "axgbe data");
@@ -103,6 +109,7 @@ static bool axgbe_if_needs_restart(if_ctx_t, enum iflib_restart_event);
#endif
static void axgbe_set_counts(if_ctx_t);
static void axgbe_init_iflib_softc_ctx(struct axgbe_if_softc *);
+static void axgbe_initialize_rss_mapping(struct xgbe_prv_data *);
/* MII interface registered functions */
static int axgbe_miibus_readreg(device_t, int, int);
@@ -277,11 +284,11 @@ axgbe_register(device_t dev)
* No tunable found, generate one with default values
* Note: only a reboot will reveal the new kenv
*/
- error = kern_setenv("dev.ax.sph_enable", "1");
+ error = kern_setenv("dev.ax.sph_enable", "0");
if (error) {
printf("Error setting tunable, using default driver values\n");
}
- axgbe_sph_enable = 1;
+ axgbe_sph_enable = 0;
}
if (!axgbe_sph_enable) {
@@ -389,6 +396,7 @@ axgbe_if_attach_pre(if_ctx_t ctx)
if_softc_ctx_t scctx;
if_shared_ctx_t sctx;
device_t dev;
+ device_t rdev;
unsigned int ma_lo, ma_hi;
unsigned int reg;
int ret;
@@ -430,9 +438,23 @@ axgbe_if_attach_pre(if_ctx_t ctx)
sc->pdata.xgmac_res = mac_res[0];
sc->pdata.xpcs_res = mac_res[1];
- /* Set the PCS indirect addressing definition registers*/
- pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
- pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT;
+ /*
+ * Set the PCS indirect addressing definition registers.
+ * A newer version of the hardware is using the same PCI ids
+ * for the network device but has altered register definitions
+ * for determining the window settings for the indirect PCS access.
+ * This code checks hardware usage and uses the register values
+ * accordingly.
+ */
+ rdev = pci_find_dbsf(0, 0, 0, 0);
+ if (rdev && pci_get_device(rdev) == 0x15d0
+ && pci_get_vendor(rdev) == 0x1022) {
+ pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
+ pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
+ } else {
+ pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
+ pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT;
+ }
/* Configure the PCS indirect addressing support */
reg = XPCS32_IOREAD(pdata, pdata->xpcs_window_def_reg);
@@ -714,6 +736,47 @@ axgbe_init_iflib_softc_ctx(struct axgbe_if_softc *sc)
scctx->isc_txrx = &axgbe_txrx;
}
+static void
+axgbe_initialize_rss_mapping(struct xgbe_prv_data *pdata)
+{
+ int i;
+
+ /* Get RSS key */
+#ifdef RSS
+ int qid;
+ uint32_t rss_hash_config = 0;
+
+ rss_getkey((uint8_t *)&pdata->rss_key);
+
+ rss_hash_config = rss_gethashconfig();
+
+ if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4)
+ XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, IP2TE, 1);
+ if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4)
+ XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, TCP4TE, 1);
+ if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4)
+ XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1);
+#else
+ arc4rand(&pdata->rss_key, ARRAY_SIZE(pdata->rss_key), 0);
+
+ XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, IP2TE, 1);
+ XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, TCP4TE, 1);
+ XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1);
+#endif
+
+ /* Setup RSS lookup table */
+ for (i = 0; i < XGBE_RSS_MAX_TABLE_SIZE; i++) {
+#ifdef RSS
+ qid = rss_get_indirection_to_bucket(i) % pdata->rx_ring_count;
+ XGMAC_SET_BITS(pdata->rss_table[i], MAC_RSSDR, DMCH, qid);
+#else
+ XGMAC_SET_BITS(pdata->rss_table[i], MAC_RSSDR, DMCH,
+ i % pdata->rx_ring_count);
+#endif
+ }
+
+}
+
static int
axgbe_alloc_channels(if_ctx_t ctx)
{
@@ -1336,11 +1399,9 @@ xgbe_default_config(struct xgbe_prv_data *pdata)
pdata->tx_sf_mode = MTL_TSF_ENABLE;
pdata->tx_threshold = MTL_TX_THRESHOLD_64;
pdata->tx_osp_mode = DMA_OSP_ENABLE;
- pdata->rx_sf_mode = MTL_RSF_DISABLE;
+ pdata->rx_sf_mode = MTL_RSF_ENABLE;
pdata->rx_threshold = MTL_RX_THRESHOLD_64;
pdata->pause_autoneg = 1;
- pdata->tx_pause = 1;
- pdata->rx_pause = 1;
pdata->phy_speed = SPEED_UNKNOWN;
pdata->power_down = 0;
pdata->enable_rss = 1;
@@ -1355,7 +1416,7 @@ axgbe_if_attach_post(if_ctx_t ctx)
struct xgbe_phy_if *phy_if = &pdata->phy_if;
struct xgbe_hw_if *hw_if = &pdata->hw_if;
if_softc_ctx_t scctx = sc->scctx;
- int i, ret;
+ int ret;
/* set split header support based on tunable */
pdata->sph_enable = axgbe_sph_enable;
@@ -1373,6 +1434,8 @@ axgbe_if_attach_post(if_ctx_t ctx)
if (ret)
axgbe_error("%s: exit error %d\n", __func__, ret);
+ axgbe_sysctl_init(pdata);
+
/* Configure the defaults */
xgbe_default_config(pdata);
@@ -1408,15 +1471,7 @@ axgbe_if_attach_post(if_ctx_t ctx)
scctx->isc_nrxqsets);
DBGPR("Channel count set to: %u\n", pdata->channel_count);
- /* Get RSS key */
-#ifdef RSS
- rss_getkey((uint8_t *)pdata->rss_key);
-#else
- arc4rand(&pdata->rss_key, ARRAY_SIZE(pdata->rss_key), 0);
-#endif
- XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, IP2TE, 1);
- XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, TCP4TE, 1);
- XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1);
+ axgbe_initialize_rss_mapping(pdata);
/* Initialize the PHY device */
pdata->sysctl_an_cdr_workaround = pdata->vdata->an_cdr_workaround;
@@ -1452,11 +1507,6 @@ axgbe_if_attach_post(if_ctx_t ctx)
pdata->rx_buf_size = ret;
DBGPR("%s: rx_buf_size %d\n", __func__, ret);
- /* Setup RSS lookup table */
- for (i = 0; i < XGBE_RSS_MAX_TABLE_SIZE; i++)
- XGMAC_SET_BITS(pdata->rss_table[i], MAC_RSSDR, DMCH,
- i % pdata->rx_ring_count);
-
/*
* Mark the device down until it is initialized, which happens
* when the device is accessed first (for configuring the iface,
@@ -1468,8 +1518,6 @@ axgbe_if_attach_post(if_ctx_t ctx)
scctx->isc_max_frame_size = if_getmtu(ifp) + 18;
scctx->isc_min_frame_size = XGMAC_MIN_PACKET;
- axgbe_sysctl_init(pdata);
-
axgbe_pci_init(pdata);
return (0);
diff --git a/sys/dev/axgbe/xgbe-common.h b/sys/dev/axgbe/xgbe-common.h
index 4d504682d1af..e2096463703b 100644
--- a/sys/dev/axgbe/xgbe-common.h
+++ b/sys/dev/axgbe/xgbe-common.h
@@ -479,6 +479,8 @@
#define MAC_PFR_VTFE_WIDTH 1
#define MAC_PFR_VUCC_INDEX 22
#define MAC_PFR_VUCC_WIDTH 1
+#define MAC_PFR_RA_INDEX 31
+#define MAC_PFR_RA_WIDTH 1
#define MAC_PMTCSR_MGKPKTEN_INDEX 1
#define MAC_PMTCSR_MGKPKTEN_WIDTH 1
#define MAC_PMTCSR_PWRDWN_INDEX 0
@@ -1319,10 +1321,18 @@
#define MDIO_PMA_10GBR_FECCTRL 0x00ab
#endif
+#ifndef MDIO_PMA_RX_CTRL1
+#define MDIO_PMA_RX_CTRL1 0x8051
+#endif
+
#ifndef MDIO_PCS_DIG_CTRL
#define MDIO_PCS_DIG_CTRL 0x8000
#endif
+#ifndef MDIO_PCS_DIGITAL_STAT
+#define MDIO_PCS_DIGITAL_STAT 0x8010
+#endif
+
#ifndef MDIO_AN_XNP
#define MDIO_AN_XNP 0x0016
#endif
@@ -1402,6 +1412,8 @@
#define XGBE_KR_TRAINING_ENABLE BIT(1)
#define XGBE_PCS_CL37_BP BIT(12)
+#define XGBE_PCS_PSEQ_STATE_MASK 0x1c
+#define XGBE_PCS_PSEQ_STATE_POWER_GOOD 0x10
#define XGBE_AN_CL37_INT_CMPLT BIT(0)
#define XGBE_AN_CL37_INT_MASK 0x01
@@ -1423,6 +1435,10 @@
#define XGBE_PMA_PLL_CTRL_ENABLE BIT(15)
#define XGBE_PMA_PLL_CTRL_DISABLE 0x0000
+#define XGBE_PMA_RX_RST_0_MASK BIT(4)
+#define XGBE_PMA_RX_RST_0_RESET_ON 0x10
+#define XGBE_PMA_RX_RST_0_RESET_OFF 0x00
+
/* Bit setting and getting macros
* The get macro will extract the current bit field value from within
* the variable
diff --git a/sys/dev/axgbe/xgbe-dev.c b/sys/dev/axgbe/xgbe-dev.c
index 786e04930780..39d0dab144a2 100644
--- a/sys/dev/axgbe/xgbe-dev.c
+++ b/sys/dev/axgbe/xgbe-dev.c
@@ -1451,7 +1451,8 @@ xgbe_dev_read(struct xgbe_channel *channel)
if (!err || !etlt) {
/* No error if err is 0 or etlt is 0 */
- if (etlt == 0x09) {
+ if (etlt == 0x09 &&
+ (if_getcapenable(pdata->netdev) & IFCAP_VLAN_HWTAGGING)) {
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
VLAN_CTAG, 1);
packet->vlan_ctag = XGMAC_GET_BITS_LE(rdesc->desc0,
@@ -2029,6 +2030,12 @@ xgbe_config_mac_address(struct xgbe_prv_data *pdata)
{
xgbe_set_mac_address(pdata, if_getlladdr(pdata->netdev));
+ /*
+ * Promisc mode does not work as intended. Multicast traffic
+ * is triggering the filter, so enable Receive All.
+ */
+ XGMAC_IOWRITE_BITS(pdata, MAC_PFR, RA, 1);
+
/* Filtering is done using perfect filtering and hash filtering */
if (pdata->hw_feat.hash_table_size) {
XGMAC_IOWRITE_BITS(pdata, MAC_PFR, HPF, 1);
diff --git a/sys/dev/axgbe/xgbe-i2c.c b/sys/dev/axgbe/xgbe-i2c.c
index 5883e96ed37e..fe9184aa1dd5 100644
--- a/sys/dev/axgbe/xgbe-i2c.c
+++ b/sys/dev/axgbe/xgbe-i2c.c
@@ -327,8 +327,6 @@ out:
if (state->ret || XI2C_GET_BITS(isr, IC_RAW_INTR_STAT, STOP_DET))
pdata->i2c_complete = true;
- return;
-
reissue_check:
/* Reissue interrupt if status is not clear */
if (pdata->vdata->irq_reissue_support)
diff --git a/sys/dev/axgbe/xgbe-phy-v2.c b/sys/dev/axgbe/xgbe-phy-v2.c
index d8c372cac642..d08ed118a8a8 100644
--- a/sys/dev/axgbe/xgbe-phy-v2.c
+++ b/sys/dev/axgbe/xgbe-phy-v2.c
@@ -376,6 +376,9 @@ struct xgbe_phy_data {
unsigned int sfp_gpio_address;
unsigned int sfp_gpio_mask;
unsigned int sfp_gpio_inputs;
+ unsigned int sfp_gpio_outputs;
+ unsigned int sfp_gpio_polarity;
+ unsigned int sfp_gpio_configuration;
unsigned int sfp_gpio_rx_los;
unsigned int sfp_gpio_tx_fault;
unsigned int sfp_gpio_mod_absent;
@@ -1461,13 +1464,19 @@ xgbe_phy_sfp_signals(struct xgbe_prv_data *pdata)
axgbe_printf(3, "%s: befor sfp_mod:%d sfp_gpio_address:0x%x\n",
__func__, phy_data->sfp_mod_absent, phy_data->sfp_gpio_address);
+ ret = xgbe_phy_sfp_get_mux(pdata);
+ if (ret) {
+ axgbe_error("I2C error setting SFP MUX\n");
+ return;
+ }
+
gpio_reg = 0;
ret = xgbe_phy_i2c_read(pdata, phy_data->sfp_gpio_address, &gpio_reg,
sizeof(gpio_reg), gpio_ports, sizeof(gpio_ports));
if (ret) {
axgbe_error("%s: I2C error reading SFP GPIO addr:0x%x\n",
__func__, phy_data->sfp_gpio_address);
- return;
+ goto put_mux;
}
phy_data->sfp_gpio_inputs = (gpio_ports[1] << 8) | gpio_ports[0];
@@ -1481,6 +1490,136 @@ xgbe_phy_sfp_signals(struct xgbe_prv_data *pdata)
axgbe_printf(3, "%s: after sfp_mod:%d sfp_gpio_inputs:0x%x\n",
__func__, phy_data->sfp_mod_absent, phy_data->sfp_gpio_inputs);
+
+put_mux:
+ xgbe_phy_sfp_put_mux(pdata);
+}
+
+static int
+xgbe_read_gpio_expander(struct xgbe_prv_data *pdata)
+{
+ struct xgbe_phy_data *phy_data = pdata->phy_data;
+ uint8_t gpio_reg, gpio_ports[2];
+ int ret = 0;
+
+ ret = xgbe_phy_sfp_get_mux(pdata);
+ if (ret) {
+ axgbe_error("I2C error setting SFP MUX\n");
+ return (ret);
+ }
+
+ gpio_reg = 2;
+ for (int i = 0; i < 3; i++) {
+ ret = xgbe_phy_i2c_read(pdata, phy_data->sfp_gpio_address,
+ &gpio_reg, sizeof(gpio_reg), gpio_ports, sizeof(gpio_ports));
+
+ if (ret) {
+ axgbe_error("%s: I2C error reading GPIO expander register: %d\n",
+ __func__, gpio_reg);
+ goto put_mux;
+ }
+
+ if (gpio_reg == 2)
+ phy_data->sfp_gpio_outputs = (gpio_ports[1] << 8) | gpio_ports[0];
+ else if (gpio_reg == 4)
+ phy_data->sfp_gpio_polarity = (gpio_ports[1] << 8) | gpio_ports[0];
+ else if (gpio_reg == 6)
+ phy_data->sfp_gpio_configuration = (gpio_ports[1] << 8) | gpio_ports[0];
+
+ memset(gpio_ports, 0, sizeof(gpio_ports));
+ gpio_reg += 2;
+ }
+
+put_mux:
+ xgbe_phy_sfp_put_mux(pdata);
+
+ return (ret);
+}
+
+static void
+xgbe_log_gpio_expander(struct xgbe_prv_data *pdata)
+{
+ struct xgbe_phy_data *phy_data = pdata->phy_data;
+
+ axgbe_printf(1, "Input port registers: 0x%x\n", phy_data->sfp_gpio_inputs);
+ axgbe_printf(1, "Output port registers: 0x%x\n", phy_data->sfp_gpio_outputs);
+ axgbe_printf(1, "Polarity port registers: 0x%x\n", phy_data->sfp_gpio_polarity);
+ axgbe_printf(1, "Configuration port registers: 0x%x\n", phy_data->sfp_gpio_configuration);
+}
+
+static int
+xgbe_phy_validate_gpio_expander(struct xgbe_prv_data *pdata)
+{
+ struct xgbe_phy_data *phy_data = pdata->phy_data;
+ uint8_t gpio_data[3] = {0};
+ int shift = GPIO_MASK_WIDTH * (3 - phy_data->port_id);
+ int rx_los_pos = (1 << phy_data->sfp_gpio_rx_los);
+ int tx_fault_pos = (1 << phy_data->sfp_gpio_tx_fault);
+ int mod_abs_pos = (1 << phy_data->sfp_gpio_mod_absent);
+ int port_sfp_pins = (mod_abs_pos | rx_los_pos | tx_fault_pos);
+ uint16_t config = 0;
+ int ret = 0;
+
+ ret = xgbe_phy_get_comm_ownership(pdata);
+ if (ret)
+ return (ret);
+
+ ret = xgbe_read_gpio_expander(pdata);
+ if (ret)
+ goto put;
+
+ ret = xgbe_phy_sfp_get_mux(pdata);
+ if (ret) {
+ axgbe_error("I2C error setting SFP MUX\n");
+ goto put;
+ }
+
+ if (phy_data->sfp_gpio_polarity) {
+ axgbe_printf(0, "GPIO polarity inverted, resetting\n");
+
+ xgbe_log_gpio_expander(pdata);
+ gpio_data[0] = 4; /* polarity register */
+
+ ret = xgbe_phy_i2c_write(pdata, phy_data->sfp_gpio_address,
+ gpio_data, sizeof(gpio_data));
+
+ if (ret) {
+ axgbe_error("%s: I2C error writing to GPIO polarity register\n",
+ __func__);
+ goto put_mux;
+ }
+ }
+
+ config = phy_data->sfp_gpio_configuration;
+ if ((config & port_sfp_pins) != port_sfp_pins) {
+ xgbe_log_gpio_expander(pdata);
+
+ /* Write the I/O states to the configuration register */
+ axgbe_error("Invalid GPIO configuration, resetting\n");
+ gpio_data[0] = 6; /* configuration register */
+ config = config & ~(0xF << shift); /* clear port id bits */
+ config |= port_sfp_pins;
+ gpio_data[1] = config & 0xff;
+ gpio_data[2] = (config >> 8);
+
+ ret = xgbe_phy_i2c_write(pdata, phy_data->sfp_gpio_address,
+ gpio_data, sizeof(gpio_data));
+ if (ret) {
+ axgbe_error("%s: I2C error writing to GPIO configuration register\n",
+ __func__);
+ goto put_mux;
+ }
+ } else {
+ axgbe_printf(0, "GPIO configuration valid\n");
+ }
+
+put_mux:
+ xgbe_phy_sfp_put_mux(pdata);
+
+put:
+ xgbe_phy_put_comm_ownership(pdata);
+
+ return (ret);
}
static void
@@ -1512,9 +1651,6 @@ xgbe_phy_sfp_detect(struct xgbe_prv_data *pdata)
struct xgbe_phy_data *phy_data = pdata->phy_data;
int ret, prev_sfp_state = phy_data->sfp_mod_absent;
- /* Reset the SFP signals and info */
- xgbe_phy_sfp_reset(phy_data);
-
ret = xgbe_phy_get_comm_ownership(pdata);
if (ret)
return;
@@ -1532,6 +1668,11 @@ xgbe_phy_sfp_detect(struct xgbe_prv_data *pdata)
if (ret) {
/* Treat any error as if there isn't an SFP plugged in */
axgbe_error("%s: eeprom read failed\n", __func__);
+ ret = xgbe_read_gpio_expander(pdata);
+
+ if (!ret)
+ xgbe_log_gpio_expander(pdata);
+
xgbe_phy_sfp_reset(phy_data);
xgbe_phy_sfp_mod_absent(pdata);
goto put;
@@ -2103,6 +2244,30 @@ xgbe_phy_pll_ctrl(struct xgbe_prv_data *pdata, bool enable)
}
static void
+xgbe_phy_rx_reset(struct xgbe_prv_data *pdata)
+{
+ int reg;
+
+ reg = XMDIO_READ_BITS(pdata, MDIO_MMD_PCS, MDIO_PCS_DIGITAL_STAT,
+ XGBE_PCS_PSEQ_STATE_MASK);
+
+ if (reg == XGBE_PCS_PSEQ_STATE_POWER_GOOD) {
+ /*
+ * Mailbox command timed out, reset of RX block is required.
+ * This can be done by asserting the reset bit and waiting
+ * for its completion.
+ */
+ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL1,
+ XGBE_PMA_RX_RST_0_MASK, XGBE_PMA_RX_RST_0_RESET_ON);
+ DELAY(20);
+ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL1,
+ XGBE_PMA_RX_RST_0_MASK, XGBE_PMA_RX_RST_0_RESET_OFF);
+ DELAY(50);
+ axgbe_printf(0, "%s: firmware mailbox reset performed\n", __func__);
+ }
+}
+
+static void
xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata, unsigned int cmd,
unsigned int sub_cmd)
{
@@ -2112,8 +2277,10 @@ xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata, unsigned int cmd,
xgbe_phy_pll_ctrl(pdata, false);
/* Log if a previous command did not complete */
- if (XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS))
+ if (XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS)) {
axgbe_error("firmware mailbox not ready for command\n");
+ xgbe_phy_rx_reset(pdata);
+ }
/* Construct the command */
XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, cmd);
@@ -3467,6 +3634,15 @@ xgbe_phy_start(struct xgbe_prv_data *pdata)
switch (phy_data->port_mode) {
case XGBE_PORT_MODE_SFP:
axgbe_printf(3, "%s: calling phy detect\n", __func__);
+
+ /*
+ * Validate the configuration of the GPIO expander before
+ * we interpret the SFP signals.
+ */
+ axgbe_printf(1, "Checking GPIO expander validity\n");
+ xgbe_phy_validate_gpio_expander(pdata);
+
+ phy_data->sfp_phy_retries = 0;
xgbe_phy_sfp_detect(pdata);
break;
default:
diff --git a/sys/dev/axgbe/xgbe-sysctl.c b/sys/dev/axgbe/xgbe-sysctl.c
index d5ddfbbd0bd6..16523381e1a3 100644
--- a/sys/dev/axgbe/xgbe-sysctl.c
+++ b/sys/dev/axgbe/xgbe-sysctl.c
@@ -1607,6 +1607,10 @@ axgbe_sysctl_init(struct xgbe_prv_data *pdata)
pdata->sysctl_xgmac_reg = 0;
pdata->sysctl_xpcs_mmd = 1;
pdata->sysctl_xpcs_reg = 0;
+ pdata->link_workaround = 1;
+ pdata->tx_pause = 1;
+ pdata->rx_pause = 1;
+ pdata->enable_rss = 1;
SYSCTL_ADD_UINT(clist, top, OID_AUTO, "axgbe_debug_level", CTLFLAG_RWTUN,
&pdata->debug_level, 0, "axgbe log level -- higher is verbose");
@@ -1619,6 +1623,18 @@ axgbe_sysctl_init(struct xgbe_prv_data *pdata)
CTLFLAG_RWTUN, &pdata->link_workaround, 0,
"enable the workaround for link issue in coming up");
+ SYSCTL_ADD_UINT(clist, top, OID_AUTO, "rss_enabled",
+ CTLFLAG_RDTUN, &pdata->enable_rss, 1,
+ "shows the RSS feature state (1 - enable, 0 - disable)");
+
+ SYSCTL_ADD_UINT(clist, top, OID_AUTO, "tx_pause",
+ CTLFLAG_RDTUN, &pdata->tx_pause, 1,
+ "shows the Flow Control TX pause feature state (1 - enable, 0 - disable)");
+
+ SYSCTL_ADD_UINT(clist, top, OID_AUTO, "rx_pause",
+ CTLFLAG_RDTUN, &pdata->rx_pause, 1,
+ "shows the Flow Control RX pause feature state (1 - enable, 0 - disable)");
+
SYSCTL_ADD_PROC(clist, top, OID_AUTO, "xgmac_register",
CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
pdata, 0, sysctl_xgmac_reg_addr_handler, "IU",
diff --git a/sys/dev/axgbe/xgbe-txrx.c b/sys/dev/axgbe/xgbe-txrx.c
index 52274dba4352..fd3d821e2e53 100644
--- a/sys/dev/axgbe/xgbe-txrx.c
+++ b/sys/dev/axgbe/xgbe-txrx.c
@@ -702,7 +702,7 @@ axgbe_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
struct xgbe_packet_data *packet = &ring->packet_data;
struct xgbe_ring_data *rdata;
unsigned int last, context_next, context;
- unsigned int buf1_len, buf2_len, max_len, len = 0, prev_cur;
+ unsigned int buf1_len, buf2_len, len = 0, prev_cur;
int i = 0;
axgbe_printf(2, "%s: rxq %d cidx %d cur %d dirty %d\n", __func__,
@@ -767,11 +767,9 @@ read_again:
axgbe_printf(2, "%s: csum flags 0x%x\n", __func__, ri->iri_csum_flags);
}
- max_len = if_getmtu(pdata->netdev) + ETH_HLEN;
if (XGMAC_GET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES, VLAN_CTAG)) {
ri->iri_flags |= M_VLANTAG;
ri->iri_vtag = packet->vlan_ctag;
- max_len += VLAN_HLEN;
axgbe_printf(2, "%s: iri_flags 0x%x vtag 0x%x\n", __func__,
ri->iri_flags, ri->iri_vtag);
}
@@ -788,9 +786,6 @@ read_again:
if (__predict_false(len == 0))
axgbe_printf(1, "%s: Discarding Zero len packet\n", __func__);
- if (__predict_false(len > max_len))
- axgbe_error("%s: Big packet %d/%d\n", __func__, len, max_len);
-
if (__predict_false(packet->errors))
axgbe_printf(1, "<-- %s: rxq: %d len: %d frags: %d cidx %d cur: %d "
"dirty: %d error 0x%x\n", __func__, ri->iri_qsidx, len, i,
diff --git a/sys/dev/axgbe/xgbe.h b/sys/dev/axgbe/xgbe.h
index 4719b16f47d6..5e4cc40bb2c9 100644
--- a/sys/dev/axgbe/xgbe.h
+++ b/sys/dev/axgbe/xgbe.h
@@ -180,9 +180,9 @@
#define XGBE_DMA_SYS_AWCR 0x30303030
/* DMA cache settings - PCI device */
-#define XGBE_DMA_PCI_ARCR 0x00000003
-#define XGBE_DMA_PCI_AWCR 0x13131313
-#define XGBE_DMA_PCI_AWARCR 0x00000313
+#define XGBE_DMA_PCI_ARCR 0x000f0f0f
+#define XGBE_DMA_PCI_AWCR 0x0f0f0f0f
+#define XGBE_DMA_PCI_AWARCR 0x00000f0f
/* DMA channel interrupt modes */
#define XGBE_IRQ_MODE_EDGE 0
diff --git a/sys/dev/clk/starfive/jh7110_clk.c b/sys/dev/clk/starfive/jh7110_clk.c
new file mode 100644
index 000000000000..adb5707b3f64
--- /dev/null
+++ b/sys/dev/clk/starfive/jh7110_clk.c
@@ -0,0 +1,277 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2019 Emmanuel Vadot <manu@freebsd.org>
+ * Copyright (c) 2022 Mitchell Horne <mhorne@FreeBSD.org>
+ * Copyright (c) 2024 Jari Sihvola <jsihv@gmx.com>
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/mutex.h>
+#include <sys/rman.h>
+
+#include <machine/bus.h>
+#include <machine/intr.h>
+#include <machine/resource.h>
+
+#include <dev/clk/clk.h>
+#include <dev/hwreset/hwreset.h>
+
+#include <dt-bindings/clock/starfive,jh7110-crg.h>
+
+#include <dev/clk/starfive/jh7110_clk.h>
+
+#include "clkdev_if.h"
+#include "hwreset_if.h"
+
+#define JH7110_DIV_MASK 0xffffff
+#define JH7110_MUX_SHIFT 24
+#define JH7110_MUX_MASK 0x3f000000
+#define JH7110_ENABLE_SHIFT 31
+
+#define REG_SIZE 4
+
+struct jh7110_clk_sc {
+ uint32_t offset;
+ uint32_t flags;
+ uint64_t d_max;
+ int id;
+};
+
+#define DIV_ROUND_CLOSEST(n, d) (((n) + (d) / 2) / (d))
+
+#define READ4(_sc, _off) \
+ bus_read_4(_sc->mem_res, _off)
+#define WRITE4(_sc, _off, _val) \
+ bus_write_4(_sc->mem_res, _off, _val)
+
+#define DEVICE_LOCK(_clk) \
+ CLKDEV_DEVICE_LOCK(clknode_get_device(_clk))
+#define DEVICE_UNLOCK(_clk) \
+ CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk))
+
+/* Reset functions */
+
+int
+jh7110_reset_assert(device_t dev, intptr_t id, bool assert)
+{
+ struct jh7110_clkgen_softc *sc;
+ uint32_t regvalue, offset, bitmask = 1UL << id % 32;
+
+ sc = device_get_softc(dev);
+ offset = sc->reset_selector_offset + id / 32 * 4;
+
+ mtx_lock(&sc->mtx);
+
+ regvalue = READ4(sc, offset);
+
+ if (assert)
+ regvalue |= bitmask;
+ else
+ regvalue &= ~bitmask;
+ WRITE4(sc, offset, regvalue);
+
+ mtx_unlock(&sc->mtx);
+
+ return (0);
+}
+
+int
+jh7110_reset_is_asserted(device_t dev, intptr_t id, bool *reset)
+{
+ struct jh7110_clkgen_softc *sc;
+ uint32_t regvalue, offset, bitmask;
+
+ sc = device_get_softc(dev);
+ offset = sc->reset_status_offset + id / 32 * 4;
+
+ mtx_lock(&sc->mtx);
+
+ regvalue = READ4(sc, offset);
+ bitmask = 1UL << id % 32;
+
+ mtx_unlock(&sc->mtx);
+
+ *reset = (regvalue & bitmask) == 0;
+
+ return (0);
+}
+
+/* Clock functions */
+
+static int
+jh7110_clk_init(struct clknode *clk, device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+ struct jh7110_clk_sc *sc_clk;
+ uint32_t reg;
+ int idx = 0;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ sc_clk = clknode_get_softc(clk);
+
+ if (sc_clk->flags & JH7110_CLK_HAS_MUX) {
+ DEVICE_LOCK(clk);
+ reg = READ4(sc, sc_clk->offset);
+ DEVICE_UNLOCK(clk);
+ idx = (reg & JH7110_MUX_MASK) >> JH7110_MUX_SHIFT;
+ }
+
+ clknode_init_parent_idx(clk, idx);
+
+ return (0);
+}
+
+static int
+jh7110_clk_set_gate(struct clknode *clk, bool enable)
+{
+ struct jh7110_clkgen_softc *sc;
+ struct jh7110_clk_sc *sc_clk;
+ uint32_t reg;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ sc_clk = clknode_get_softc(clk);
+
+ if ((sc_clk->flags & JH7110_CLK_HAS_GATE) == 0)
+ return (0);
+
+ DEVICE_LOCK(clk);
+
+ reg = READ4(sc, sc_clk->offset);
+ if (enable)
+ reg |= (1 << JH7110_ENABLE_SHIFT);
+ else
+ reg &= ~(1 << JH7110_ENABLE_SHIFT);
+ WRITE4(sc, sc_clk->offset, reg);
+
+ DEVICE_UNLOCK(clk);
+
+ return (0);
+}
+
+static int
+jh7110_clk_set_mux(struct clknode *clk, int idx)
+{
+ struct jh7110_clkgen_softc *sc;
+ struct jh7110_clk_sc *sc_clk;
+ uint32_t reg;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ sc_clk = clknode_get_softc(clk);
+
+ if ((sc_clk->flags & JH7110_CLK_HAS_MUX) == 0)
+ return (ENXIO);
+
+ /* Checking index size */
+ if ((idx & (JH7110_MUX_MASK >> JH7110_MUX_SHIFT)) != idx)
+ return (EINVAL);
+
+ DEVICE_LOCK(clk);
+
+ reg = READ4(sc, sc_clk->offset) & ~JH7110_MUX_MASK;
+ reg |= idx << JH7110_MUX_SHIFT;
+ WRITE4(sc, sc_clk->offset, reg);
+
+ DEVICE_UNLOCK(clk);
+
+ return (0);
+}
+
+static int
+jh7110_clk_recalc_freq(struct clknode *clk, uint64_t *freq)
+{
+ struct jh7110_clkgen_softc *sc;
+ struct jh7110_clk_sc *sc_clk;
+ uint32_t divisor;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ sc_clk = clknode_get_softc(clk);
+
+ /* Returning error here causes panic */
+ if ((sc_clk->flags & JH7110_CLK_HAS_DIV) == 0)
+ return (0);
+
+ DEVICE_LOCK(clk);
+
+ divisor = READ4(sc, sc_clk->offset) & JH7110_DIV_MASK;
+
+ DEVICE_UNLOCK(clk);
+
+ if (divisor)
+ *freq = *freq / divisor;
+ else
+ *freq = 0;
+
+ return (0);
+}
+
+static int
+jh7110_clk_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout,
+ int flags, int *done)
+{
+ struct jh7110_clkgen_softc *sc;
+ struct jh7110_clk_sc *sc_clk;
+ uint32_t divisor;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ sc_clk = clknode_get_softc(clk);
+
+ if ((sc_clk->flags & JH7110_CLK_HAS_DIV) == 0)
+ return (0);
+
+ divisor = MIN(MAX(DIV_ROUND_CLOSEST(fin, *fout), 1UL), sc_clk->d_max);
+
+ if (flags & CLK_SET_DRYRUN)
+ goto done;
+
+ DEVICE_LOCK(clk);
+
+ divisor |= READ4(sc, sc_clk->offset) & ~JH7110_DIV_MASK;
+ WRITE4(sc, sc_clk->offset, divisor);
+
+ DEVICE_UNLOCK(clk);
+
+done:
+ *fout = divisor;
+ *done = 1;
+
+ return (0);
+}
+
+static clknode_method_t jh7110_clknode_methods[] = {
+ /* Device interface */
+ CLKNODEMETHOD(clknode_init, jh7110_clk_init),
+ CLKNODEMETHOD(clknode_set_gate, jh7110_clk_set_gate),
+ CLKNODEMETHOD(clknode_set_mux, jh7110_clk_set_mux),
+ CLKNODEMETHOD(clknode_recalc_freq, jh7110_clk_recalc_freq),
+ CLKNODEMETHOD(clknode_set_freq, jh7110_clk_set_freq),
+ CLKNODEMETHOD_END
+};
+
+DEFINE_CLASS_1(jh7110_clknode, jh7110_clknode_class, jh7110_clknode_methods,
+ sizeof(struct jh7110_clk_sc), clknode_class);
+
+int
+jh7110_clk_register(struct clkdom *clkdom, const struct jh7110_clk_def *clkdef)
+{
+ struct clknode *clk;
+ struct jh7110_clk_sc *sc;
+
+ clk = clknode_create(clkdom, &jh7110_clknode_class, &clkdef->clkdef);
+ if (clk == NULL)
+ return (-1);
+
+ sc = clknode_get_softc(clk);
+
+ sc->offset = clkdef->clkdef.id * REG_SIZE;
+
+ sc->flags = clkdef->flags;
+ sc->id = clkdef->clkdef.id;
+ sc->d_max = clkdef->d_max;
+
+ clknode_register(clkdom, clk);
+
+ return (0);
+}
diff --git a/sys/dev/clk/starfive/jh7110_clk.h b/sys/dev/clk/starfive/jh7110_clk.h
new file mode 100644
index 000000000000..882f82032d44
--- /dev/null
+++ b/sys/dev/clk/starfive/jh7110_clk.h
@@ -0,0 +1,72 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Jari Sihvola <jsihv@gmx.com>
+ */
+
+#ifndef _JH7110_CLK_H_
+#define _JH7110_CLK_H_
+
+#include <dev/clk/clk.h>
+
+#define JH7110_CLK_HAS_GATE 0x01
+#define JH7110_CLK_HAS_MUX 0x02
+#define JH7110_CLK_HAS_DIV 0x04
+#define JH7110_CLK_HAS_INV 0x08
+
+#define AONCRG_RESET_SELECTOR 0x38
+#define AONCRG_RESET_STATUS 0x3c
+#define STGCRG_RESET_SELECTOR 0x74
+#define STGCRG_RESET_STATUS 0x78
+#define SYSCRG_RESET_SELECTOR 0x2f8
+#define SYSCRG_RESET_STATUS 0x308
+
+struct jh7110_clkgen_softc {
+ struct mtx mtx;
+ struct clkdom *clkdom;
+ struct resource *mem_res;
+ uint32_t reset_status_offset;
+ uint32_t reset_selector_offset;
+};
+
+struct jh7110_clk_def {
+ struct clknode_init_def clkdef;
+ uint32_t offset;
+ uint32_t flags;
+ uint64_t d_max;
+};
+
+#define JH7110_CLK(_idx, _name, _pn, _d_max, _flags) \
+{ \
+ .clkdef.id = _idx, \
+ .clkdef.name = _name, \
+ .clkdef.parent_names = _pn, \
+ .clkdef.parent_cnt = nitems(_pn), \
+ .clkdef.flags = CLK_NODE_STATIC_STRINGS, \
+ .flags = _flags, \
+ .d_max = _d_max, \
+}
+
+#define JH7110_GATE(_idx, _name, _pn) \
+ JH7110_CLK(_idx, _name, _pn, 0, JH7110_CLK_HAS_GATE)
+#define JH7110_MUX(_idx, _name, _pn) \
+ JH7110_CLK(_idx, _name, _pn, 0, JH7110_CLK_HAS_MUX)
+#define JH7110_DIV(_idx, _name, _pn, _d_max) \
+ JH7110_CLK(_idx, _name, _pn, _d_max, JH7110_CLK_HAS_DIV)
+#define JH7110_GATEMUX(_idx, _name, _pn) \
+ JH7110_CLK(_idx, _name, _pn, 0, JH7110_CLK_HAS_GATE | \
+ JH7110_CLK_HAS_MUX)
+#define JH7110_GATEDIV(_idx, _name, _pn, _d_max) \
+ JH7110_CLK(_idx, _name, _pn, _d_max, JH7110_CLK_HAS_GATE | \
+ JH7110_CLK_HAS_DIV)
+#define JH7110_INV(_idx, _name, _pn) \
+ JH7110_CLK(_idx, _name, _pn, 0, JH7110_CLK_HAS_INV)
+
+int jh7110_clk_register(struct clkdom *clkdom,
+ const struct jh7110_clk_def *clkdef);
+int jh7110_ofw_map(struct clkdom *clkdom, uint32_t ncells, phandle_t *cells,
+ struct clknode **clk);
+int jh7110_reset_is_asserted(device_t dev, intptr_t id, bool *reset);
+int jh7110_reset_assert(device_t dev, intptr_t id, bool assert);
+
+#endif /* _JH7110_CLK_H_ */
diff --git a/sys/dev/clk/starfive/jh7110_clk_aon.c b/sys/dev/clk/starfive/jh7110_clk_aon.c
new file mode 100644
index 000000000000..21b15142835e
--- /dev/null
+++ b/sys/dev/clk/starfive/jh7110_clk_aon.c
@@ -0,0 +1,168 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2016 Michal Meloun <mmel@FreeBSD.org>
+ * Copyright (c) 2020 Oskar Holmlund <oskar.holmlund@ohdata.se>
+ * Copyright (c) 2024 Jari Sihvola <jsihv@gmx.com>
+ */
+
+/* Clocks for JH7110 AON group. PLL driver must be attached before this. */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+#include <sys/resource.h>
+#include <sys/rman.h>
+#include <machine/bus.h>
+
+#include <dev/fdt/simplebus.h>
+#include <dev/hwreset/hwreset.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <dev/clk/clk.h>
+#include <dev/clk/starfive/jh7110_clk.h>
+
+#include <dt-bindings/clock/starfive,jh7110-crg.h>
+
+#include "clkdev_if.h"
+#include "hwreset_if.h"
+
+static struct ofw_compat_data compat_data[] = {
+ { "starfive,jh7110-aoncrg", 1 },
+ { NULL, 0 }
+};
+
+static struct resource_spec res_spec[] = {
+ { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE },
+ RESOURCE_SPEC_END
+};
+
+/* parents */
+static const char *gmac0_axi_p[] = { "stg_axiahb" };
+static const char *gmac0_ahb_p[] = { "stg_axiahb" };
+static const char *gmac0_tx_inv_p[] = { "gmac0_tx" };
+static const char *gmac0_tx_p[] = { "gmac0_gtxclk", "gmac0_rmii_rtx" };
+static const char *gmac0_rmii_rtx_p[] = { "gmac0_rmii_refin" };
+
+/* AON clocks */
+static const struct jh7110_clk_def aon_clks[] = {
+ JH7110_GATE(JH7110_AONCLK_GMAC0_AXI, "gmac0_axi", gmac0_axi_p),
+ JH7110_GATE(JH7110_AONCLK_GMAC0_AHB, "gmac0_ahb", gmac0_ahb_p),
+ JH7110_GATEMUX(JH7110_AONCLK_GMAC0_TX, "gmac0_tx", gmac0_tx_p),
+ JH7110_INV(JH7110_AONCLK_GMAC0_TX_INV, "gmac0_tx_inv", gmac0_tx_inv_p),
+ JH7110_DIV(JH7110_AONCLK_GMAC0_RMII_RTX, "gmac0_rmii_rtx",
+ gmac0_rmii_rtx_p, 30),
+};
+
+static int
+jh7110_clk_aon_probe(device_t dev)
+{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
+ return (ENXIO);
+
+ device_set_desc(dev, "StarFive JH7110 AON clock generator");
+
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+jh7110_clk_aon_attach(device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+ int err;
+
+ sc = device_get_softc(dev);
+
+ sc->reset_status_offset = AONCRG_RESET_STATUS;
+ sc->reset_selector_offset = AONCRG_RESET_SELECTOR;
+
+ mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF);
+
+ err = bus_alloc_resources(dev, res_spec, &sc->mem_res);
+ if (err != 0) {
+ device_printf(dev, "Couldn't allocate resources, error %d\n",
+ err);
+ return (ENXIO);
+ }
+
+ sc->clkdom = clkdom_create(dev);
+ if (sc->clkdom == NULL) {
+ device_printf(dev, "Couldn't create clkdom, error %d\n", err);
+ return (ENXIO);
+ }
+
+ for (int i = 0; i < nitems(aon_clks); i++) {
+ err = jh7110_clk_register(sc->clkdom, &aon_clks[i]);
+ if (err != 0) {
+ device_printf(dev,
+ "Couldn't register clk %s, error %d\n",
+ aon_clks[i].clkdef.name, err);
+ return (ENXIO);
+ }
+ }
+
+ if (clkdom_finit(sc->clkdom) != 0)
+ panic("Cannot finalize clkdom initialization\n");
+
+ if (bootverbose)
+ clkdom_dump(sc->clkdom);
+
+ hwreset_register_ofw_provider(dev);
+
+ return (0);
+}
+
+static void
+jh7110_clk_aon_device_lock(device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+
+ sc = device_get_softc(dev);
+ mtx_lock(&sc->mtx);
+}
+
+static void
+jh7110_clk_aon_device_unlock(device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+
+ sc = device_get_softc(dev);
+ mtx_unlock(&sc->mtx);
+}
+
+static int
+jh7110_clk_aon_detach(device_t dev)
+{
+ /* Detach not supported */
+ return (EBUSY);
+}
+
+static device_method_t jh7110_clk_aon_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, jh7110_clk_aon_probe),
+ DEVMETHOD(device_attach, jh7110_clk_aon_attach),
+ DEVMETHOD(device_detach, jh7110_clk_aon_detach),
+
+ /* clkdev interface */
+ DEVMETHOD(clkdev_device_lock, jh7110_clk_aon_device_lock),
+ DEVMETHOD(clkdev_device_unlock, jh7110_clk_aon_device_unlock),
+
+ /* Reset interface */
+ DEVMETHOD(hwreset_assert, jh7110_reset_assert),
+ DEVMETHOD(hwreset_is_asserted, jh7110_reset_is_asserted),
+
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_0(jh7110_aon, jh7110_aon_driver, jh7110_clk_aon_methods,
+ sizeof(struct jh7110_clkgen_softc));
+EARLY_DRIVER_MODULE(jh7110_aon, simplebus, jh7110_aon_driver, 0, 0,
+ BUS_PASS_BUS + BUS_PASS_ORDER_LATE);
+MODULE_VERSION(jh7110_aon, 1);
diff --git a/sys/dev/clk/starfive/jh7110_clk_pll.c b/sys/dev/clk/starfive/jh7110_clk_pll.c
new file mode 100644
index 000000000000..5882f33984ae
--- /dev/null
+++ b/sys/dev/clk/starfive/jh7110_clk_pll.c
@@ -0,0 +1,386 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Jari Sihvola <jsihv@gmx.com>
+ * Copyright (c) 2024 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Mitchell Horne
+ * <mhorne@FreeBSD.org> under sponsorship from the FreeBSD Foundation.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+
+#include <machine/bus.h>
+
+#include <dev/fdt/simplebus.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <dev/clk/clk.h>
+#include <dev/clk/starfive/jh7110_clk.h>
+#include <dev/clk/starfive/jh7110_clk_pll.h>
+#include <dev/syscon/syscon.h>
+
+#include <dt-bindings/clock/starfive,jh7110-crg.h>
+
+#include "clkdev_if.h"
+#include "syscon_if.h"
+
+#define JH7110_SYS_SYSCON_SYSCFG24 0x18
+#define JH7110_SYS_SYSCON_SYSCFG28 0x1c
+#define JH7110_SYS_SYSCON_SYSCFG32 0x20
+#define JH7110_SYS_SYSCON_SYSCFG36 0x24
+#define JH7110_SYS_SYSCON_SYSCFG40 0x28
+#define JH7110_SYS_SYSCON_SYSCFG44 0x2c
+#define JH7110_SYS_SYSCON_SYSCFG48 0x30
+#define JH7110_SYS_SYSCON_SYSCFG52 0x34
+
+#define DEVICE_LOCK(_clk) \
+ CLKDEV_DEVICE_LOCK(clknode_get_device(_clk))
+#define DEVICE_UNLOCK(_clk) \
+ CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk))
+
+#define PLL_MASK_FILL(sc, id) \
+do { \
+ sc->dacpd_mask = PLL## id ##_DACPD_MASK; \
+ sc->dsmpd_mask = PLL## id ##_DSMPD_MASK; \
+ sc->fbdiv_mask = PLL## id ##_FBDIV_MASK; \
+ sc->frac_mask = PLL## id ##_FRAC_MASK; \
+ sc->prediv_mask = PLL## id ##_PREDIV_MASK; \
+ sc->postdiv1_mask = PLL## id ##_POSTDIV1_MASK; \
+} while (0)
+
+#define PLL_SHIFT_FILL(sc, id) \
+do { \
+ sc->dacpd_shift = PLL## id ##_DACPD_SHIFT; \
+ sc->dsmpd_shift = PLL## id ##_DSMPD_SHIFT; \
+ sc->fbdiv_shift = PLL## id ##_FBDIV_SHIFT; \
+ sc->frac_shift = PLL## id ##_FRAC_SHIFT; \
+ sc->prediv_shift = PLL## id ##_PREDIV_SHIFT; \
+ sc->postdiv1_shift = PLL## id ##_POSTDIV1_SHIFT; \
+} while (0)
+
+struct jh7110_clk_pll_softc {
+ struct mtx mtx;
+ struct clkdom *clkdom;
+ struct syscon *syscon;
+};
+
+struct jh7110_pll_clknode_softc {
+ uint32_t dacpd_offset;
+ uint32_t dsmpd_offset;
+ uint32_t fbdiv_offset;
+ uint32_t frac_offset;
+ uint32_t prediv_offset;
+ uint32_t postdiv1_offset;
+
+ uint32_t dacpd_mask;
+ uint32_t dsmpd_mask;
+ uint32_t fbdiv_mask;
+ uint32_t frac_mask;
+ uint32_t prediv_mask;
+ uint32_t postdiv1_mask;
+
+ uint32_t dacpd_shift;
+ uint32_t dsmpd_shift;
+ uint32_t fbdiv_shift;
+ uint32_t frac_shift;
+ uint32_t prediv_shift;
+ uint32_t postdiv1_shift;
+
+ const struct jh7110_pll_syscon_value *syscon_arr;
+ int syscon_nitems;
+};
+
+static const char *pll_parents[] = { "osc" };
+
+static struct jh7110_clk_def pll_out_clks[] = {
+ {
+ .clkdef.id = JH7110_PLLCLK_PLL0_OUT,
+ .clkdef.name = "pll0_out",
+ .clkdef.parent_names = pll_parents,
+ .clkdef.parent_cnt = nitems(pll_parents),
+ .clkdef.flags = CLK_NODE_STATIC_STRINGS,
+ },
+ {
+ .clkdef.id = JH7110_PLLCLK_PLL1_OUT,
+ .clkdef.name = "pll1_out",
+ .clkdef.parent_names = pll_parents,
+ .clkdef.parent_cnt = nitems(pll_parents),
+ .clkdef.flags = CLK_NODE_STATIC_STRINGS,
+ },
+ {
+ .clkdef.id = JH7110_PLLCLK_PLL2_OUT,
+ .clkdef.name = "pll2_out",
+ .clkdef.parent_names = pll_parents,
+ .clkdef.parent_cnt = nitems(pll_parents),
+ .clkdef.flags = CLK_NODE_STATIC_STRINGS,
+ },
+};
+
+static int jh7110_clk_pll_register(struct clkdom *clkdom,
+ struct jh7110_clk_def *clkdef);
+
+static int
+jh7110_clk_pll_recalc_freq(struct clknode *clk, uint64_t *freq)
+{
+ struct jh7110_clk_pll_softc *sc;
+ struct jh7110_pll_clknode_softc *clk_sc;
+ uint32_t dacpd, dsmpd, fbdiv, prediv, postdiv1;
+ uint64_t frac, fcal = 0;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ clk_sc = clknode_get_softc(clk);
+
+ DEVICE_LOCK(clk);
+
+ dacpd = (SYSCON_READ_4(sc->syscon, clk_sc->dacpd_offset) & clk_sc->dacpd_mask) >>
+ clk_sc->dacpd_shift;
+ dsmpd = (SYSCON_READ_4(sc->syscon, clk_sc->dsmpd_offset) & clk_sc->dsmpd_mask) >>
+ clk_sc->dsmpd_shift;
+ fbdiv = (SYSCON_READ_4(sc->syscon, clk_sc->fbdiv_offset) & clk_sc->fbdiv_mask) >>
+ clk_sc->fbdiv_shift;
+ prediv = (SYSCON_READ_4(sc->syscon, clk_sc->prediv_offset) & clk_sc->prediv_mask) >>
+ clk_sc->prediv_shift;
+ postdiv1 = (SYSCON_READ_4(sc->syscon, clk_sc->postdiv1_offset) &
+ clk_sc->postdiv1_mask) >> clk_sc->postdiv1_shift;
+ frac = (SYSCON_READ_4(sc->syscon, clk_sc->frac_offset) & clk_sc->frac_mask) >>
+ clk_sc->frac_shift;
+
+ DEVICE_UNLOCK(clk);
+
+ /* dacpd and dsmpd both being 0 entails Fraction Multiple Mode */
+ if (dacpd == 0 && dsmpd == 0)
+ fcal = frac * FRAC_PATR_SIZE / (1 << 24);
+
+ *freq = *freq / FRAC_PATR_SIZE * (fbdiv * FRAC_PATR_SIZE + fcal) /
+ prediv / (1 << postdiv1);
+
+ return (0);
+}
+
+static int
+jh7110_clk_pll_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout,
+ int flags, int *done)
+{
+ struct jh7110_clk_pll_softc *sc;
+ struct jh7110_pll_clknode_softc *clk_sc;
+ const struct jh7110_pll_syscon_value *syscon_val = NULL;
+
+ sc = device_get_softc(clknode_get_device(clk));
+ clk_sc = clknode_get_softc(clk);
+
+ for (int i = 0; i != clk_sc->syscon_nitems; i++) {
+ if (*fout == clk_sc->syscon_arr[i].freq) {
+ syscon_val = &clk_sc->syscon_arr[i];
+ }
+ }
+
+ if (syscon_val == NULL) {
+ printf("%s: tried to set an unknown frequency %ju for %s\n",
+ __func__, *fout, clknode_get_name(clk));
+ return (EINVAL);
+ }
+
+ if ((flags & CLK_SET_DRYRUN) != 0) {
+ *done = 1;
+ return (0);
+ }
+
+ DEVICE_LOCK(clk);
+
+ SYSCON_MODIFY_4(sc->syscon, clk_sc->dacpd_offset, clk_sc->dacpd_mask,
+ syscon_val->dacpd << clk_sc->dacpd_shift & clk_sc->dacpd_mask);
+ SYSCON_MODIFY_4(sc->syscon, clk_sc->dsmpd_offset, clk_sc->dsmpd_mask,
+ syscon_val->dsmpd << clk_sc->dsmpd_shift & clk_sc->dsmpd_mask);
+ SYSCON_MODIFY_4(sc->syscon, clk_sc->prediv_offset, clk_sc->prediv_mask,
+ syscon_val->prediv << clk_sc->prediv_shift & clk_sc->prediv_mask);
+ SYSCON_MODIFY_4(sc->syscon, clk_sc->fbdiv_offset, clk_sc->fbdiv_mask,
+ syscon_val->fbdiv << clk_sc->fbdiv_shift & clk_sc->fbdiv_mask);
+ SYSCON_MODIFY_4(sc->syscon, clk_sc->postdiv1_offset,
+ clk_sc->postdiv1_mask, (syscon_val->postdiv1 >> 1) <<
+ clk_sc->postdiv1_shift & clk_sc->postdiv1_mask);
+
+ if (!syscon_val->dacpd && !syscon_val->dsmpd) {
+ SYSCON_MODIFY_4(sc->syscon, clk_sc->frac_offset, clk_sc->frac_mask,
+ syscon_val->frac << clk_sc->frac_shift & clk_sc->frac_mask);
+ }
+
+ DEVICE_UNLOCK(clk);
+
+ *done = 1;
+ return (0);
+}
+
+static int
+jh7110_clk_pll_init(struct clknode *clk, device_t dev)
+{
+ clknode_init_parent_idx(clk, 0);
+
+ return (0);
+}
+
+static int
+jh7110_clk_pll_probe(device_t dev)
+{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ if (!ofw_bus_is_compatible(dev, "starfive,jh7110-pll"))
+ return (ENXIO);
+
+ device_set_desc(dev, "StarFive JH7110 PLL clock generator");
+
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+jh7110_clk_pll_attach(device_t dev)
+{
+ struct jh7110_clk_pll_softc *sc;
+ int error;
+
+ sc = device_get_softc(dev);
+
+ mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF);
+
+ sc->clkdom = clkdom_create(dev);
+ if (sc->clkdom == NULL) {
+ device_printf(dev, "Couldn't create clkdom\n");
+ return (ENXIO);
+ }
+
+ error = syscon_get_by_ofw_node(dev, OF_parent(ofw_bus_get_node(dev)),
+ &sc->syscon);
+ if (error != 0) {
+ device_printf(dev, "Couldn't get syscon handle of parent\n");
+ return (error);
+ }
+
+ for (int i = 0; i < nitems(pll_out_clks); i++) {
+ error = jh7110_clk_pll_register(sc->clkdom, &pll_out_clks[i]);
+ if (error != 0)
+ device_printf(dev, "Couldn't register clock %s: %d\n",
+ pll_out_clks[i].clkdef.name, error);
+ }
+
+ error = clkdom_finit(sc->clkdom);
+ if (error != 0) {
+ device_printf(dev, "clkdom_finit() returned %d\n", error);
+ }
+
+ if (bootverbose)
+ clkdom_dump(sc->clkdom);
+
+ return (0);
+}
+
+static void
+jh7110_clk_pll_device_lock(device_t dev)
+{
+ struct jh7110_clk_pll_softc *sc;
+
+ sc = device_get_softc(dev);
+ mtx_lock(&sc->mtx);
+}
+
+static void
+jh7110_clk_pll_device_unlock(device_t dev)
+{
+ struct jh7110_clk_pll_softc *sc;
+
+ sc = device_get_softc(dev);
+ mtx_unlock(&sc->mtx);
+}
+
+static clknode_method_t jh7110_pllnode_methods[] = {
+ /* Device interface */
+ CLKNODEMETHOD(clknode_init, jh7110_clk_pll_init),
+ CLKNODEMETHOD(clknode_recalc_freq, jh7110_clk_pll_recalc_freq),
+ CLKNODEMETHOD(clknode_set_freq, jh7110_clk_pll_set_freq),
+
+ CLKNODEMETHOD_END
+};
+
+static device_method_t jh7110_clk_pll_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, jh7110_clk_pll_probe),
+ DEVMETHOD(device_attach, jh7110_clk_pll_attach),
+
+ /* clkdev interface */
+ DEVMETHOD(clkdev_device_lock, jh7110_clk_pll_device_lock),
+ DEVMETHOD(clkdev_device_unlock, jh7110_clk_pll_device_unlock),
+
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_1(jh7110_pllnode, jh7110_pllnode_class, jh7110_pllnode_methods,
+ sizeof(struct jh7110_pll_clknode_softc), clknode_class);
+DEFINE_CLASS_0(jh7110_clk_pll, jh7110_clk_pll_driver, jh7110_clk_pll_methods,
+ sizeof(struct jh7110_clk_pll_softc));
+EARLY_DRIVER_MODULE(jh7110_clk_pll, simplebus, jh7110_clk_pll_driver, 0, 0,
+ BUS_PASS_BUS + BUS_PASS_ORDER_EARLY);
+MODULE_VERSION(jh7110_clk_pll, 1);
+
+int
+jh7110_clk_pll_register(struct clkdom *clkdom, struct jh7110_clk_def *clkdef)
+{
+ struct clknode *clk = NULL;
+ struct jh7110_pll_clknode_softc *sc;
+
+ clk = clknode_create(clkdom, &jh7110_pllnode_class, &clkdef->clkdef);
+ if (clk == NULL)
+ return (1);
+
+ sc = clknode_get_softc(clk);
+
+ switch (clkdef->clkdef.id) {
+ case JH7110_PLLCLK_PLL0_OUT:
+ sc->syscon_arr = jh7110_pll0_syscon_freq;
+ sc->syscon_nitems = nitems(jh7110_pll0_syscon_freq);
+ PLL_MASK_FILL(sc, 0);
+ PLL_SHIFT_FILL(sc, 0);
+ sc->dacpd_offset = JH7110_SYS_SYSCON_SYSCFG24;
+ sc->dsmpd_offset = JH7110_SYS_SYSCON_SYSCFG24;
+ sc->fbdiv_offset = JH7110_SYS_SYSCON_SYSCFG28;
+ sc->frac_offset = JH7110_SYS_SYSCON_SYSCFG32;
+ sc->prediv_offset = JH7110_SYS_SYSCON_SYSCFG36;
+ sc->postdiv1_offset = JH7110_SYS_SYSCON_SYSCFG32;
+ break;
+ case JH7110_PLLCLK_PLL1_OUT:
+ sc->syscon_arr = jh7110_pll1_syscon_freq;
+ sc->syscon_nitems = nitems(jh7110_pll1_syscon_freq);
+ PLL_MASK_FILL(sc, 1);
+ PLL_SHIFT_FILL(sc, 1);
+ sc->dacpd_offset = JH7110_SYS_SYSCON_SYSCFG36;
+ sc->dsmpd_offset = JH7110_SYS_SYSCON_SYSCFG36;
+ sc->fbdiv_offset = JH7110_SYS_SYSCON_SYSCFG36;
+ sc->frac_offset = JH7110_SYS_SYSCON_SYSCFG40;
+ sc->prediv_offset = JH7110_SYS_SYSCON_SYSCFG44;
+ sc->postdiv1_offset = JH7110_SYS_SYSCON_SYSCFG40;
+ break;
+ case JH7110_PLLCLK_PLL2_OUT:
+ sc->syscon_arr = jh7110_pll2_syscon_freq;
+ sc->syscon_nitems = nitems(jh7110_pll2_syscon_freq);
+ PLL_MASK_FILL(sc, 2);
+ PLL_SHIFT_FILL(sc, 2);
+ sc->dacpd_offset = JH7110_SYS_SYSCON_SYSCFG44;
+ sc->dsmpd_offset = JH7110_SYS_SYSCON_SYSCFG44;
+ sc->fbdiv_offset = JH7110_SYS_SYSCON_SYSCFG44;
+ sc->frac_offset = JH7110_SYS_SYSCON_SYSCFG48;
+ sc->prediv_offset = JH7110_SYS_SYSCON_SYSCFG52;
+ sc->postdiv1_offset = JH7110_SYS_SYSCON_SYSCFG48;
+ break;
+ default:
+ return (EINVAL);
+ }
+
+ clknode_register(clkdom, clk);
+
+ return (0);
+}
diff --git a/sys/dev/clk/starfive/jh7110_clk_pll.h b/sys/dev/clk/starfive/jh7110_clk_pll.h
new file mode 100644
index 000000000000..700072a4b465
--- /dev/null
+++ b/sys/dev/clk/starfive/jh7110_clk_pll.h
@@ -0,0 +1,211 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * StarFive JH7110 PLL Clock Generator Driver
+ *
+ * Copyright (C) 2022 Xingyu Wu <xingyu.wu@starfivetech.com>
+ */
+
+#define PLL0_DACPD_SHIFT 24
+#define PLL0_DACPD_MASK 0x1000000
+#define PLL_0_DACPD_SHIFT 24
+#define PLL_0_DACPD_MASK 0x1000000
+
+#define PLL0_DSMPD_SHIFT 25
+#define PLL0_DSMPD_MASK 0x2000000
+#define PLL0_FBDIV_SHIFT 0
+#define PLL0_FBDIV_MASK 0xFFF
+#define PLL0_FRAC_SHIFT 0
+#define PLL0_FRAC_MASK 0xFFFFFF
+#define PLL0_POSTDIV1_SHIFT 28
+#define PLL0_POSTDIV1_MASK 0x30000000
+#define PLL0_PREDIV_SHIFT 0
+#define PLL0_PREDIV_MASK 0x3F
+
+#define PLL1_DACPD_SHIFT 15
+#define PLL1_DACPD_MASK 0x8000
+#define PLL1_DSMPD_SHIFT 16
+#define PLL1_DSMPD_MASK 0x10000
+#define PLL1_FBDIV_SHIFT 17
+#define PLL1_FBDIV_MASK 0x1FFE0000
+#define PLL1_FRAC_SHIFT 0
+#define PLL1_FRAC_MASK 0xFFFFFF
+#define PLL1_POSTDIV1_SHIFT 28
+#define PLL1_POSTDIV1_MASK 0x30000000
+#define PLL1_PREDIV_SHIFT 0
+#define PLL1_PREDIV_MASK 0x3F
+
+#define PLL2_DACPD_SHIFT 15
+#define PLL2_DACPD_MASK 0x8000
+#define PLL2_DSMPD_SHIFT 16
+#define PLL2_DSMPD_MASK 0x10000
+#define PLL2_FBDIV_SHIFT 17
+#define PLL2_FBDIV_MASK 0x1FFE0000
+#define PLL2_FRAC_SHIFT 0
+#define PLL2_FRAC_MASK 0xFFFFFF
+#define PLL2_POSTDIV1_SHIFT 28
+#define PLL2_POSTDIV1_MASK 0x30000000
+#define PLL2_PREDIV_SHIFT 0
+#define PLL2_PREDIV_MASK 0x3F
+
+#define FRAC_PATR_SIZE 1000
+
+struct jh7110_pll_syscon_value {
+ uint64_t freq;
+ uint32_t prediv;
+ uint32_t fbdiv;
+ uint32_t postdiv1;
+ uint32_t dacpd;
+ uint32_t dsmpd;
+ uint32_t frac;
+};
+
+enum starfive_pll0_freq_value {
+ PLL0_FREQ_375_VALUE = 375000000,
+ PLL0_FREQ_500_VALUE = 500000000,
+ PLL0_FREQ_625_VALUE = 625000000,
+ PLL0_FREQ_750_VALUE = 750000000,
+ PLL0_FREQ_875_VALUE = 875000000,
+ PLL0_FREQ_1000_VALUE = 1000000000,
+ PLL0_FREQ_1250_VALUE = 1250000000,
+ PLL0_FREQ_1375_VALUE = 1375000000,
+ PLL0_FREQ_1500_VALUE = 1500000000
+};
+
+enum starfive_pll0_freq {
+ PLL0_FREQ_375 = 0,
+ PLL0_FREQ_500,
+ PLL0_FREQ_625,
+ PLL0_FREQ_750,
+ PLL0_FREQ_875,
+ PLL0_FREQ_1000,
+ PLL0_FREQ_1250,
+ PLL0_FREQ_1375,
+ PLL0_FREQ_1500,
+ PLL0_FREQ_MAX = PLL0_FREQ_1500
+};
+
+enum starfive_pll1_freq_value {
+ PLL1_FREQ_1066_VALUE = 1066000000,
+};
+
+enum starfive_pll1_freq {
+ PLL1_FREQ_1066 = 0,
+};
+
+enum starfive_pll2_freq_value {
+ PLL2_FREQ_1188_VALUE = 1188000000,
+ PLL2_FREQ_12288_VALUE = 1228800000,
+};
+
+enum starfive_pll2_freq {
+ PLL2_FREQ_1188 = 0,
+ PLL2_FREQ_12288,
+};
+
+static const struct jh7110_pll_syscon_value
+ jh7110_pll0_syscon_freq[] = {
+ [PLL0_FREQ_375] = {
+ .freq = PLL0_FREQ_375_VALUE,
+ .prediv = 8,
+ .fbdiv = 125,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_500] = {
+ .freq = PLL0_FREQ_500_VALUE,
+ .prediv = 6,
+ .fbdiv = 125,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_625] = {
+ .freq = PLL0_FREQ_625_VALUE,
+ .prediv = 24,
+ .fbdiv = 625,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_750] = {
+ .freq = PLL0_FREQ_750_VALUE,
+ .prediv = 4,
+ .fbdiv = 125,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_875] = {
+ .freq = PLL0_FREQ_875_VALUE,
+ .prediv = 24,
+ .fbdiv = 875,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_1000] = {
+ .freq = PLL0_FREQ_1000_VALUE,
+ .prediv = 3,
+ .fbdiv = 125,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_1250] = {
+ .freq = PLL0_FREQ_1250_VALUE,
+ .prediv = 12,
+ .fbdiv = 625,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_1375] = {
+ .freq = PLL0_FREQ_1375_VALUE,
+ .prediv = 24,
+ .fbdiv = 1375,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL0_FREQ_1500] = {
+ .freq = PLL0_FREQ_1500_VALUE,
+ .prediv = 2,
+ .fbdiv = 125,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+};
+
+static const struct jh7110_pll_syscon_value
+ jh7110_pll1_syscon_freq[] = {
+ [PLL1_FREQ_1066] = {
+ .freq = PLL1_FREQ_1066_VALUE,
+ .prediv = 12,
+ .fbdiv = 533,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+};
+
+static const struct jh7110_pll_syscon_value
+ jh7110_pll2_syscon_freq[] = {
+ [PLL2_FREQ_1188] = {
+ .freq = PLL2_FREQ_1188_VALUE,
+ .prediv = 2,
+ .fbdiv = 99,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+ [PLL2_FREQ_12288] = {
+ .freq = PLL2_FREQ_12288_VALUE,
+ .prediv = 5,
+ .fbdiv = 256,
+ .postdiv1 = 1,
+ .dacpd = 1,
+ .dsmpd = 1,
+ },
+};
diff --git a/sys/dev/clk/starfive/jh7110_clk_sys.c b/sys/dev/clk/starfive/jh7110_clk_sys.c
new file mode 100644
index 000000000000..e7b8aa87c48e
--- /dev/null
+++ b/sys/dev/clk/starfive/jh7110_clk_sys.c
@@ -0,0 +1,261 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2016 Michal Meloun <mmel@FreeBSD.org>
+ * Copyright (c) 2020 Oskar Holmlund <oskar.holmlund@ohdata.se>
+ * Copyright (c) 2022 Mitchell Horne <mhorne@FreeBSD.org>
+ * Copyright (c) 2024 Jari Sihvola <jsihv@gmx.com>
+ */
+
+/* Clocks for JH7110 SYS group. PLL driver must be attached before this. */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+#include <sys/resource.h>
+#include <sys/rman.h>
+
+#include <machine/bus.h>
+
+#include <dev/fdt/simplebus.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <dev/clk/clk.h>
+#include <dev/clk/starfive/jh7110_clk.h>
+#include <dev/hwreset/hwreset.h>
+
+#include <dt-bindings/clock/starfive,jh7110-crg.h>
+
+#include "clkdev_if.h"
+#include "hwreset_if.h"
+
+static struct ofw_compat_data compat_data[] = {
+ { "starfive,jh7110-syscrg", 1 },
+ { NULL, 0 }
+};
+
+static struct resource_spec res_spec[] = {
+ { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE },
+ RESOURCE_SPEC_END
+};
+
+/* parents for non-pll SYS clocks */
+static const char *cpu_root_p[] = { "osc", "pll0_out" };
+static const char *cpu_core_p[] = { "cpu_root" };
+static const char *cpu_bus_p[] = { "cpu_core" };
+static const char *perh_root_p[] = { "pll0_out", "pll2_out" };
+static const char *bus_root_p[] = { "osc", "pll2_out" };
+
+static const char *apb_bus_p[] = { "stg_axiahb" };
+static const char *apb0_p[] = { "apb_bus" };
+static const char *u0_sys_iomux_apb_p[] = { "apb_bus" };
+static const char *stg_axiahb_p[] = { "axi_cfg0" };
+static const char *ahb0_p[] = { "stg_axiahb" };
+static const char *axi_cfg0_p[] = { "bus_root" };
+
+static const char *u0_dw_uart_clk_apb_p[] = { "apb0" };
+static const char *u0_dw_uart_clk_core_p[] = { "osc" };
+static const char *u0_dw_sdio_clk_ahb_p[] = { "ahb0" };
+static const char *u0_dw_sdio_clk_sdcard_p[] = { "axi_cfg0" };
+static const char *u1_dw_uart_clk_apb_p[] = { "apb0" };
+static const char *u1_dw_uart_clk_core_p[] = { "osc" };
+static const char *u1_dw_sdio_clk_ahb_p[] = { "ahb0" };
+static const char *u1_dw_sdio_clk_sdcard_p[] = { "axi_cfg0" };
+static const char *u2_dw_uart_clk_apb_p[] = { "apb0" };
+static const char *u2_dw_uart_clk_core_p[] = { "osc" };
+static const char *u3_dw_uart_clk_apb_p[] = { "apb0" };
+static const char *u3_dw_uart_clk_core_p[] = { "perh_root" };
+
+static const char *gmac_src_p[] = { "pll0_out" };
+static const char *gmac_phy_p[] = { "gmac_src" };
+static const char *gmac0_gtxclk_p[] = { "pll0_out" };
+static const char *gmac0_ptp_p[] = { "gmac_src" };
+static const char *gmac0_gtxc_p[] = { "gmac0_gtxclk" };
+static const char *gmac1_gtxclk_p[] = { "pll0_out" };
+static const char *gmac1_gtxc_p[] = { "gmac1_gtxclk" };
+static const char *gmac1_rmii_rtx_p[] = { "gmac1_rmii_refin" };
+static const char *gmac1_axi_p[] = { "stg_axiahb" };
+static const char *gmac1_ahb_p[] = { "ahb0" };
+static const char *gmac1_ptp_p[] = { "gmac_src" };
+static const char *gmac1_tx_inv_p[] = { "gmac1_tx" };
+static const char *gmac1_tx_p[] = { "gmac1_gtxclk", "gmac1_rmii_rtx" };
+static const char *gmac1_rx_p[] = { "gmac1_rgmii_rxin", "gmac1_rmii_rtx" };
+static const char *gmac1_rx_inv_p[] = { "gmac1_rx" };
+
+/* non-pll SYS clocks */
+static const struct jh7110_clk_def sys_clks[] = {
+ JH7110_MUX(JH7110_SYSCLK_CPU_ROOT, "cpu_root", cpu_root_p),
+ JH7110_DIV(JH7110_SYSCLK_CPU_CORE, "cpu_core", cpu_core_p, 7),
+ JH7110_DIV(JH7110_SYSCLK_CPU_BUS, "cpu_bus", cpu_bus_p, 2),
+ JH7110_GATEDIV(JH7110_SYSCLK_PERH_ROOT, "perh_root", perh_root_p, 2),
+ JH7110_MUX(JH7110_SYSCLK_BUS_ROOT, "bus_root", bus_root_p),
+
+ JH7110_GATE(JH7110_SYSCLK_APB0, "apb0", apb0_p),
+ JH7110_GATE(JH7110_SYSCLK_IOMUX_APB, "u0_sys_iomux_apb",
+ u0_sys_iomux_apb_p),
+ JH7110_GATE(JH7110_SYSCLK_UART0_APB, "u0_dw_uart_clk_apb",
+ u0_dw_uart_clk_apb_p),
+ JH7110_GATE(JH7110_SYSCLK_UART0_CORE, "u0_dw_uart_clk_core",
+ u0_dw_uart_clk_core_p),
+ JH7110_GATE(JH7110_SYSCLK_UART1_APB, "u1_dw_uart_clk_apb",
+ u1_dw_uart_clk_apb_p),
+ JH7110_GATE(JH7110_SYSCLK_UART1_CORE, "u1_dw_uart_clk_core",
+ u1_dw_uart_clk_core_p),
+ JH7110_GATE(JH7110_SYSCLK_UART2_APB, "u2_dw_uart_clk_apb",
+ u2_dw_uart_clk_apb_p),
+ JH7110_GATE(JH7110_SYSCLK_UART2_CORE, "u2_dw_uart_clk_core",
+ u2_dw_uart_clk_core_p),
+ JH7110_GATE(JH7110_SYSCLK_UART3_APB, "u3_dw_uart_clk_apb",
+ u3_dw_uart_clk_apb_p),
+ JH7110_GATE(JH7110_SYSCLK_UART3_CORE, "u3_dw_uart_clk_core",
+ u3_dw_uart_clk_core_p),
+
+ JH7110_DIV(JH7110_SYSCLK_AXI_CFG0, "axi_cfg0", axi_cfg0_p, 3),
+ JH7110_DIV(JH7110_SYSCLK_STG_AXIAHB, "stg_axiahb", stg_axiahb_p, 2),
+ JH7110_GATE(JH7110_SYSCLK_AHB0, "ahb0", ahb0_p),
+ JH7110_DIV(JH7110_SYSCLK_APB_BUS, "apb_bus", apb_bus_p, 8),
+
+ JH7110_GATE(JH7110_SYSCLK_SDIO0_AHB, "u0_dw_sdio_clk_ahb",
+ u0_dw_sdio_clk_ahb_p),
+ JH7110_GATE(JH7110_SYSCLK_SDIO1_AHB, "u1_dw_sdio_clk_ahb",
+ u1_dw_sdio_clk_ahb_p),
+ JH7110_GATEDIV(JH7110_SYSCLK_SDIO0_SDCARD, "u0_dw_sdio_clk_sdcard",
+ u0_dw_sdio_clk_sdcard_p, 15),
+ JH7110_GATEDIV(JH7110_SYSCLK_SDIO1_SDCARD, "u1_dw_sdio_clk_sdcard",
+ u1_dw_sdio_clk_sdcard_p, 15),
+
+ JH7110_DIV(JH7110_SYSCLK_GMAC_SRC, "gmac_src", gmac_src_p, 7),
+ JH7110_GATEDIV(JH7110_SYSCLK_GMAC0_GTXCLK, "gmac0_gtxclk",
+ gmac0_gtxclk_p, 15),
+ JH7110_GATEDIV(JH7110_SYSCLK_GMAC0_PTP, "gmac0_ptp", gmac0_ptp_p, 31),
+ JH7110_GATEDIV(JH7110_SYSCLK_GMAC_PHY, "gmac_phy", gmac_phy_p, 31),
+ JH7110_GATE(JH7110_SYSCLK_GMAC0_GTXC, "gmac0_gtxc", gmac0_gtxc_p),
+
+ JH7110_MUX(JH7110_SYSCLK_GMAC1_RX, "gmac1_rx", gmac1_rx_p),
+ JH7110_INV(JH7110_SYSCLK_GMAC1_RX_INV, "gmac1_rx_inv", gmac1_rx_inv_p),
+ JH7110_GATE(JH7110_SYSCLK_GMAC1_AHB, "gmac1_ahb", gmac1_ahb_p),
+ JH7110_DIV(JH7110_SYSCLK_GMAC1_GTXCLK, "gmac1_gtxclk",
+ gmac1_gtxclk_p, 15),
+ JH7110_GATEMUX(JH7110_SYSCLK_GMAC1_TX, "gmac1_tx", gmac1_tx_p),
+ JH7110_INV(JH7110_SYSCLK_GMAC1_TX_INV, "gmac1_tx_inv", gmac1_tx_inv_p),
+ JH7110_GATEDIV(JH7110_SYSCLK_GMAC1_PTP, "gmac1_ptp", gmac1_ptp_p, 31),
+ JH7110_GATE(JH7110_SYSCLK_GMAC1_AXI, "gmac1_axi", gmac1_axi_p),
+ JH7110_GATE(JH7110_SYSCLK_GMAC1_GTXC, "gmac1_gtxc", gmac1_gtxc_p),
+ JH7110_DIV(JH7110_SYSCLK_GMAC1_RMII_RTX, "gmac1_rmii_rtx",
+ gmac1_rmii_rtx_p, 30),
+};
+
+static int
+jh7110_clk_sys_probe(device_t dev)
+{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
+ return (ENXIO);
+
+ device_set_desc(dev, "StarFive JH7110 SYS clock generator");
+
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+jh7110_clk_sys_attach(device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+ int i, error;
+
+ sc = device_get_softc(dev);
+
+ sc->reset_status_offset = SYSCRG_RESET_STATUS;
+ sc->reset_selector_offset = SYSCRG_RESET_SELECTOR;
+
+ mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF);
+
+ /* Allocate memory groups */
+ error = bus_alloc_resources(dev, res_spec, &sc->mem_res);
+ if (error != 0) {
+ device_printf(dev, "Couldn't allocate resources, error %d\n",
+ error);
+ return (ENXIO);
+ }
+
+ /* Create clock domain */
+ sc->clkdom = clkdom_create(dev);
+ if (sc->clkdom == NULL) {
+ device_printf(dev, "Couldn't create clkdom\n");
+ return (ENXIO);
+ }
+
+ /* Register clocks */
+ for (i = 0; i < nitems(sys_clks); i++) {
+ error = jh7110_clk_register(sc->clkdom, &sys_clks[i]);
+ if (error != 0) {
+ device_printf(dev, "Couldn't register clock %s: %d\n",
+ sys_clks[i].clkdef.name, error);
+ return (ENXIO);
+ }
+ }
+
+ if (clkdom_finit(sc->clkdom) != 0)
+ panic("Cannot finalize clkdom initialization\n");
+
+ if (bootverbose)
+ clkdom_dump(sc->clkdom);
+
+ hwreset_register_ofw_provider(dev);
+
+ return (0);
+}
+
+static int
+jh7110_clk_sys_detach(device_t dev)
+{
+ /* Detach not supported */
+ return (EBUSY);
+}
+
+static void
+jh7110_clk_sys_device_lock(device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+
+ sc = device_get_softc(dev);
+ mtx_lock(&sc->mtx);
+}
+
+static void
+jh7110_clk_sys_device_unlock(device_t dev)
+{
+ struct jh7110_clkgen_softc *sc;
+
+ sc = device_get_softc(dev);
+ mtx_unlock(&sc->mtx);
+}
+
+static device_method_t jh7110_clk_sys_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, jh7110_clk_sys_probe),
+ DEVMETHOD(device_attach, jh7110_clk_sys_attach),
+ DEVMETHOD(device_detach, jh7110_clk_sys_detach),
+
+ /* clkdev interface */
+ DEVMETHOD(clkdev_device_lock, jh7110_clk_sys_device_lock),
+ DEVMETHOD(clkdev_device_unlock, jh7110_clk_sys_device_unlock),
+
+ /* Reset interface */
+ DEVMETHOD(hwreset_assert, jh7110_reset_assert),
+ DEVMETHOD(hwreset_is_asserted, jh7110_reset_is_asserted),
+
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_0(jh7110_clk_sys, jh7110_clk_sys_driver, jh7110_clk_sys_methods,
+ sizeof(struct jh7110_clkgen_softc));
+EARLY_DRIVER_MODULE(jh7110_clk_sys, simplebus, jh7110_clk_sys_driver, 0, 0,
+ BUS_PASS_BUS + BUS_PASS_ORDER_LATE);
+MODULE_VERSION(jh7110_clk_sys, 1);
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index b9780809421f..1a61834c5a40 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -320,10 +320,10 @@ struct port_info {
uint8_t port_type;
uint8_t mod_type;
uint8_t port_id;
- uint8_t tx_chan;
+ uint8_t tx_chan; /* tx TP c-channel */
+ uint8_t rx_chan; /* rx TP c-channel */
uint8_t mps_bg_map; /* rx MPS buffer group bitmap */
uint8_t rx_e_chan_map; /* rx TP e-channel bitmap */
- uint8_t rx_c_chan; /* rx TP c-channel */
struct link_config link_cfg;
struct ifmedia media;
@@ -471,6 +471,7 @@ struct sge_eq {
unsigned int abs_id; /* absolute SGE id for the eq */
uint8_t type; /* EQ_CTRL/EQ_ETH/EQ_OFLD */
uint8_t doorbells;
+ uint8_t port_id; /* port_id of the port associated with the eq */
uint8_t tx_chan; /* tx channel used by the eq */
struct mtx eq_lock;
@@ -929,7 +930,7 @@ struct adapter {
int rawf_base;
int nrawf;
- struct taskqueue *tq[MAX_NCHAN]; /* General purpose taskqueues */
+ struct taskqueue *tq[MAX_NPORTS]; /* General purpose taskqueues */
struct port_info *port[MAX_NPORTS];
uint8_t chan_map[MAX_NCHAN]; /* channel -> port */
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h
index 0861e3df4bee..a49c21576994 100644
--- a/sys/dev/cxgbe/common/common.h
+++ b/sys/dev/cxgbe/common/common.h
@@ -252,7 +252,6 @@ struct tp_params {
unsigned int tre; /* log2 of core clocks per TP tick */
unsigned int dack_re; /* DACK timer resolution */
unsigned int la_mask; /* what events are recorded by TP LA */
- unsigned short tx_modq[MAX_NCHAN]; /* channel to modulation queue map */
uint16_t filter_mode;
uint16_t filter_mask; /* Used by TOE and hashfilters */
@@ -273,6 +272,9 @@ struct tp_params {
int8_t frag_shift;
};
+/* Use same modulation queue as the tx channel. */
+#define TX_MODQ(tx_chan) (tx_chan)
+
struct vpd_params {
unsigned int cclk;
u8 ec[EC_LEN + 1];
@@ -400,7 +402,9 @@ struct adapter_params {
unsigned int max_ordird_qp;
unsigned int max_ird_adapter;
- uint32_t mps_bg_map; /* rx buffer group map for all ports (upto 4) */
+ /* These values are for all ports (8b/port, upto 4 ports) */
+ uint32_t mps_bg_map; /* MPS rx buffer group map */
+ uint32_t tp_ch_map; /* TPCHMAP from firmware */
bool ulptx_memwrite_dsgl; /* use of T5 DSGL allowed */
bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */
@@ -616,7 +620,6 @@ struct fw_filter_wr;
void t4_intr_enable(struct adapter *adapter);
void t4_intr_disable(struct adapter *adapter);
-void t4_intr_clear(struct adapter *adapter);
bool t4_slow_intr_handler(struct adapter *adapter, bool verbose);
int t4_hash_mac_addr(const u8 *addr);
@@ -720,6 +723,7 @@ int t4_set_vf_mac(struct adapter *adapter, unsigned int pf, unsigned int vf,
unsigned int t4_get_regs_len(struct adapter *adapter);
void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size);
+u32 t4_port_reg(struct adapter *adap, u8 port, u32 reg);
const char *t4_get_port_type_description(enum fw_port_type port_type);
void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
void t4_get_port_stats_offset(struct adapter *adap, int idx,
@@ -959,4 +963,46 @@ port_top_speed(const struct port_info *pi)
return (fwcap_to_speed(pi->link_cfg.pcaps) / 1000);
}
+/* SET_TCB_FIELD sent as a ULP command looks like this */
+#define LEN__SET_TCB_FIELD_ULP (sizeof(struct ulp_txpkt) + \
+ sizeof(struct ulptx_idata) + sizeof(struct cpl_set_tcb_field_core))
+
+static inline void *
+mk_set_tcb_field_ulp(struct adapter *sc, void *cur, int tid, uint16_t word,
+ uint64_t mask, uint64_t val)
+{
+ struct ulp_txpkt *ulpmc;
+ struct ulptx_idata *ulpsc;
+ struct cpl_set_tcb_field_core *req;
+
+ MPASS(((uintptr_t)cur & 7) == 0);
+
+ ulpmc = cur;
+ ulpmc->cmd_dest = htobe32(V_ULPTX_CMD(ULP_TX_PKT) |
+ V_ULP_TXPKT_DEST(ULP_TXPKT_DEST_TP));
+ ulpmc->len = htobe32(howmany(LEN__SET_TCB_FIELD_ULP, 16));
+
+ ulpsc = (struct ulptx_idata *)(ulpmc + 1);
+ ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
+ ulpsc->len = htobe32(sizeof(*req));
+
+ req = (struct cpl_set_tcb_field_core *)(ulpsc + 1);
+ OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid));
+ req->reply_ctrl = htobe16(F_NO_REPLY);
+ req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0));
+ req->mask = htobe64(mask);
+ req->val = htobe64(val);
+
+ /*
+ * ULP_TX is an 8B processor but the firmware transfers WRs in 16B
+ * chunks. The master command for set_tcb_field does not end at a 16B
+ * boundary so it needs to be padded with a no-op.
+ */
+ MPASS((LEN__SET_TCB_FIELD_ULP & 0xf) != 0);
+ ulpsc = (struct ulptx_idata *)(req + 1);
+ ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP));
+ ulpsc->len = htobe32(0);
+
+ return (ulpsc + 1);
+}
#endif /* __CHELSIO_COMMON_H */
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index c18243e4b681..3d22673d34c1 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -243,18 +243,21 @@ struct port_tx_state {
uint64_t tx_frames;
};
+u32
+t4_port_reg(struct adapter *adap, u8 port, u32 reg)
+{
+ if (chip_id(adap) > CHELSIO_T4)
+ return T5_PORT_REG(port, reg);
+ return PORT_REG(port, reg);
+}
+
static void
read_tx_state_one(struct adapter *sc, int i, struct port_tx_state *tx_state)
{
uint32_t rx_pause_reg, tx_frames_reg;
- if (is_t4(sc)) {
- tx_frames_reg = PORT_REG(i, A_MPS_PORT_STAT_TX_PORT_FRAMES_L);
- rx_pause_reg = PORT_REG(i, A_MPS_PORT_STAT_RX_PORT_PAUSE_L);
- } else {
- tx_frames_reg = T5_PORT_REG(i, A_MPS_PORT_STAT_TX_PORT_FRAMES_L);
- rx_pause_reg = T5_PORT_REG(i, A_MPS_PORT_STAT_RX_PORT_PAUSE_L);
- }
+ rx_pause_reg = t4_port_reg(sc, i, A_MPS_PORT_STAT_RX_PORT_PAUSE_L);
+ tx_frames_reg = t4_port_reg(sc, i, A_MPS_PORT_STAT_TX_PORT_FRAMES_L);
tx_state->rx_pause = t4_read_reg64(sc, rx_pause_reg);
tx_state->tx_frames = t4_read_reg64(sc, tx_frames_reg);
@@ -281,10 +284,7 @@ check_tx_state(struct adapter *sc, struct port_tx_state *tx_state)
tx_frames = tx_state[i].tx_frames;
read_tx_state_one(sc, i, &tx_state[i]); /* update */
- if (is_t4(sc))
- port_ctl_reg = PORT_REG(i, A_MPS_PORT_CTL);
- else
- port_ctl_reg = T5_PORT_REG(i, A_MPS_PORT_CTL);
+ port_ctl_reg = t4_port_reg(sc, i, A_MPS_PORT_CTL);
if (t4_read_reg(sc, port_ctl_reg) & F_PORTTXEN &&
rx_pause != tx_state[i].rx_pause &&
tx_frames == tx_state[i].tx_frames) {
@@ -5455,99 +5455,6 @@ void t4_intr_disable(struct adapter *adap)
}
/**
- * t4_intr_clear - clear all interrupts
- * @adap: the adapter whose interrupts should be cleared
- *
- * Clears all interrupts. The caller must be a PCI function managing
- * global interrupts.
- */
-void t4_intr_clear(struct adapter *adap)
-{
- static const u32 cause_reg[] = {
- A_CIM_HOST_INT_CAUSE,
- A_CIM_HOST_UPACC_INT_CAUSE,
- MYPF_REG(A_CIM_PF_HOST_INT_CAUSE),
- A_CPL_INTR_CAUSE,
- EDC_REG(A_EDC_INT_CAUSE, 0), EDC_REG(A_EDC_INT_CAUSE, 1),
- A_LE_DB_INT_CAUSE,
- A_MA_INT_WRAP_STATUS,
- A_MA_PARITY_ERROR_STATUS1,
- A_MA_INT_CAUSE,
- A_MPS_CLS_INT_CAUSE,
- A_MPS_RX_PERR_INT_CAUSE,
- A_MPS_STAT_PERR_INT_CAUSE_RX_FIFO,
- A_MPS_STAT_PERR_INT_CAUSE_SRAM,
- A_MPS_TRC_INT_CAUSE,
- A_MPS_TX_INT_CAUSE,
- A_MPS_STAT_PERR_INT_CAUSE_TX_FIFO,
- A_NCSI_INT_CAUSE,
- A_PCIE_INT_CAUSE,
- A_PCIE_NONFAT_ERR,
- A_PL_PL_INT_CAUSE,
- A_PM_RX_INT_CAUSE,
- A_PM_TX_INT_CAUSE,
- A_SGE_INT_CAUSE1,
- A_SGE_INT_CAUSE2,
- A_SGE_INT_CAUSE3,
- A_SGE_INT_CAUSE4,
- A_SMB_INT_CAUSE,
- A_TP_INT_CAUSE,
- A_ULP_RX_INT_CAUSE,
- A_ULP_RX_INT_CAUSE_2,
- A_ULP_TX_INT_CAUSE,
- A_ULP_TX_INT_CAUSE_2,
-
- MYPF_REG(A_PL_PF_INT_CAUSE),
- };
- int i;
- const int nchan = adap->chip_params->nchan;
-
- for (i = 0; i < ARRAY_SIZE(cause_reg); i++)
- t4_write_reg(adap, cause_reg[i], 0xffffffff);
-
- if (is_t4(adap)) {
- t4_write_reg(adap, A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS,
- 0xffffffff);
- t4_write_reg(adap, A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS,
- 0xffffffff);
- t4_write_reg(adap, A_MC_INT_CAUSE, 0xffffffff);
- for (i = 0; i < nchan; i++) {
- t4_write_reg(adap, PORT_REG(i, A_XGMAC_PORT_INT_CAUSE),
- 0xffffffff);
- }
- }
- if (chip_id(adap) >= CHELSIO_T5) {
- t4_write_reg(adap, A_MA_PARITY_ERROR_STATUS2, 0xffffffff);
- t4_write_reg(adap, A_MPS_STAT_PERR_INT_CAUSE_SRAM1, 0xffffffff);
- t4_write_reg(adap, A_SGE_INT_CAUSE5, 0xffffffff);
- t4_write_reg(adap, A_MC_P_INT_CAUSE, 0xffffffff);
- if (is_t5(adap)) {
- t4_write_reg(adap, MC_REG(A_MC_P_INT_CAUSE, 1),
- 0xffffffff);
- }
- for (i = 0; i < nchan; i++) {
- t4_write_reg(adap, T5_PORT_REG(i,
- A_MAC_PORT_PERR_INT_CAUSE), 0xffffffff);
- if (chip_id(adap) > CHELSIO_T5) {
- t4_write_reg(adap, T5_PORT_REG(i,
- A_MAC_PORT_PERR_INT_CAUSE_100G),
- 0xffffffff);
- }
- t4_write_reg(adap, T5_PORT_REG(i, A_MAC_PORT_INT_CAUSE),
- 0xffffffff);
- }
- }
- if (chip_id(adap) >= CHELSIO_T6) {
- t4_write_reg(adap, A_SGE_INT_CAUSE6, 0xffffffff);
- }
-
- t4_write_reg(adap, A_MPS_INT_CAUSE, is_t4(adap) ? 0 : 0xffffffff);
- t4_write_reg(adap, A_PL_PERR_CAUSE, 0xffffffff);
- t4_write_reg(adap, A_PL_INT_CAUSE, 0xffffffff);
- (void) t4_read_reg(adap, A_PL_INT_CAUSE); /* flush */
-}
-
-/**
* hash_mac_addr - return the hash value of a MAC address
* @addr: the 48-bit Ethernet MAC address
*
@@ -6835,13 +6742,14 @@ static unsigned int t4_get_mps_bg_map(struct adapter *adap, int idx)
{
u32 n;
- if (adap->params.mps_bg_map)
+ if (adap->params.mps_bg_map != UINT32_MAX)
return ((adap->params.mps_bg_map >> (idx << 3)) & 0xff);
- n = G_NUMPORTS(t4_read_reg(adap, A_MPS_CMN_CTL));
- if (n == 0)
+ n = adap->params.nports;
+ MPASS(n > 0 && n <= MAX_NPORTS);
+ if (n == 1)
return idx == 0 ? 0xf : 0;
- if (n == 1 && chip_id(adap) <= CHELSIO_T5)
+ if (n == 2 && chip_id(adap) <= CHELSIO_T5)
return idx < 2 ? (3 << (2 * idx)) : 0;
return 1 << idx;
}
@@ -6851,12 +6759,12 @@ static unsigned int t4_get_mps_bg_map(struct adapter *adap, int idx)
*/
static unsigned int t4_get_rx_e_chan_map(struct adapter *adap, int idx)
{
- u32 n = G_NUMPORTS(t4_read_reg(adap, A_MPS_CMN_CTL));
+ const u32 n = adap->params.nports;
const u32 all_chan = (1 << adap->chip_params->nchan) - 1;
- if (n == 0)
+ if (n == 1)
return idx == 0 ? all_chan : 0;
- if (n == 1 && chip_id(adap) <= CHELSIO_T5)
+ if (n == 2 && chip_id(adap) <= CHELSIO_T5)
return idx < 2 ? (3 << (2 * idx)) : 0;
return 1 << idx;
}
@@ -6866,18 +6774,19 @@ static unsigned int t4_get_rx_e_chan_map(struct adapter *adap, int idx)
*/
static unsigned int t4_get_rx_c_chan(struct adapter *adap, int idx)
{
- u32 param, val;
- int ret;
-
- param = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
- V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_TPCHMAP));
- ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, &param, &val);
- if (!ret)
- return (val >> (8 * idx)) & 0xff;
-
+ if (adap->params.tp_ch_map != UINT32_MAX)
+ return (adap->params.tp_ch_map >> (8 * idx)) & 0xff;
return 0;
}
+/*
+ * TP TX c-channel associated with the port.
+ */
+static unsigned int t4_get_tx_c_chan(struct adapter *adap, int idx)
+{
+ return idx;
+}
+
/**
* t4_get_port_type_description - return Port Type string description
* @port_type: firmware Port Type enumeration
@@ -6907,6 +6816,7 @@ const char *t4_get_port_type_description(enum fw_port_type port_type)
"CR2_QSFP",
"SFP28",
"KR_SFP28",
+ "KR_XLAUI",
};
if (port_type < ARRAY_SIZE(port_type_description))
@@ -6952,8 +6862,7 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
#define GET_STAT(name) \
t4_read_reg64(adap, \
- (is_t4(adap) ? PORT_REG(pi->tx_chan, A_MPS_PORT_STAT_##name##_L) : \
- T5_PORT_REG(pi->tx_chan, A_MPS_PORT_STAT_##name##_L)))
+ t4_port_reg(adap, pi->tx_chan, A_MPS_PORT_STAT_##name##_L));
#define GET_STAT_COM(name) t4_read_reg64(adap, A_MPS_STAT_##name##_L)
p->tx_pause = GET_STAT(TX_PORT_PAUSE);
@@ -7054,9 +6963,7 @@ void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p)
#define GET_STAT(name) \
t4_read_reg64(adap, \
- (is_t4(adap) ? \
- PORT_REG(idx, A_MPS_PORT_STAT_LB_PORT_##name##_L) : \
- T5_PORT_REG(idx, A_MPS_PORT_STAT_LB_PORT_##name##_L)))
+ t4_port_reg(adap, idx, A_MPS_PORT_STAT_LB_PORT_##name##_L))
#define GET_STAT_COM(name) t4_read_reg64(adap, A_MPS_STAT_##name##_L)
p->octets = GET_STAT(BYTES);
@@ -7835,9 +7742,18 @@ int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
}
ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c);
- if (ret == 0)
- for (i = 0, p = &c.param[0].val; i < nparams; i++, p += 2)
- *val++ = be32_to_cpu(*p);
+
+ /*
+ * We always copy back the results, even if there's an error. We'll
+ * get an error if any of the parameters was unknown to the Firmware,
+ * but there will be results for the others ... (Older Firmware
+ * stopped at the first unknown parameter; newer Firmware processes
+ * them all and flags the unknown parameters with a return value of
+ * ~0UL.)
+ */
+ for (i = 0, p = &c.param[0].val; i < nparams; i++, p += 2)
+ *val++ = be32_to_cpu(*p);
+
return ret;
}
@@ -9436,16 +9352,16 @@ int t4_shutdown_adapter(struct adapter *adapter)
t4_write_reg(adapter, A_DBG_GPIO_EN, 0xffff0000);
for_each_port(adapter, port) {
u32 a_port_cfg = is_t4(adapter) ?
- PORT_REG(port, A_XGMAC_PORT_CFG) :
- T5_PORT_REG(port, A_MAC_PORT_CFG);
+ t4_port_reg(adapter, port, A_XGMAC_PORT_CFG) :
+ t4_port_reg(adapter, port, A_MAC_PORT_CFG);
t4_write_reg(adapter, a_port_cfg,
t4_read_reg(adapter, a_port_cfg)
& ~V_SIGNAL_DET(1));
if (!bt) {
u32 hss_cfg0 = is_t4(adapter) ?
- PORT_REG(port, A_XGMAC_PORT_HSS_CFG0) :
- T5_PORT_REG(port, A_MAC_PORT_HSS_CFG0);
+ t4_port_reg(adapter, port, A_XGMAC_PORT_HSS_CFG0) :
+ t4_port_reg(adapter, port, A_MAC_PORT_HSS_CFG0);
t4_set_reg_field(adapter, hss_cfg0, F_HSSPDWNPLLB |
F_HSSPDWNPLLA | F_HSSPLLBYPB | F_HSSPLLBYPA,
F_HSSPDWNPLLB | F_HSSPDWNPLLA | F_HSSPLLBYPB |
@@ -9800,7 +9716,6 @@ read_filter_mode_and_ingress_config(struct adapter *adap)
*/
int t4_init_tp_params(struct adapter *adap)
{
- int chan;
u32 tx_len, rx_len, r, v;
struct tp_params *tpp = &adap->params.tp;
@@ -9808,10 +9723,6 @@ int t4_init_tp_params(struct adapter *adap)
tpp->tre = G_TIMERRESOLUTION(v);
tpp->dack_re = G_DELAYEDACKRESOLUTION(v);
- /* MODQ_REQ_MAP defaults to setting queues 0-3 to chan 0-3 */
- for (chan = 0; chan < MAX_NCHAN; chan++)
- tpp->tx_modq[chan] = chan;
-
read_filter_mode_and_ingress_config(adap);
if (chip_id(adap) > CHELSIO_T5) {
@@ -9907,10 +9818,10 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id)
} while ((adap->params.portvec & (1 << j)) == 0);
}
- p->tx_chan = j;
+ p->tx_chan = t4_get_tx_c_chan(adap, j);
+ p->rx_chan = t4_get_rx_c_chan(adap, j);
p->mps_bg_map = t4_get_mps_bg_map(adap, j);
p->rx_e_chan_map = t4_get_rx_e_chan_map(adap, j);
- p->rx_c_chan = t4_get_rx_c_chan(adap, j);
p->lport = j;
if (!(adap->flags & IS_VF) ||
diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c
index 230e81847ba5..4ea4ad1639eb 100644
--- a/sys/dev/cxgbe/crypto/t4_crypto.c
+++ b/sys/dev/cxgbe/crypto/t4_crypto.c
@@ -1924,7 +1924,7 @@ ccr_init_port(struct ccr_softc *sc, int port)
pi = sc->adapter->port[port];
sc->ports[port].txq = &sc->adapter->sge.ctrlq[port];
sc->ports[port].rxq = &sc->adapter->sge.rxq[pi->vi->first_rxq];
- sc->ports[port].rx_channel_id = pi->rx_c_chan;
+ sc->ports[port].rx_channel_id = pi->rx_chan;
sc->ports[port].tx_channel_id = pi->tx_chan;
sc->ports[port].stats_queued = counter_u64_alloc(M_WAITOK);
sc->ports[port].stats_completed = counter_u64_alloc(M_WAITOK);
diff --git a/sys/dev/cxgbe/crypto/t6_kern_tls.c b/sys/dev/cxgbe/crypto/t6_kern_tls.c
index a9fc70c8f7d7..f374de5241f6 100644
--- a/sys/dev/cxgbe/crypto/t6_kern_tls.c
+++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c
@@ -170,7 +170,7 @@ mk_ktls_act_open_req(struct adapter *sc, struct vi_info *vi, struct inpcb *inp,
options |= F_NON_OFFLOAD;
cpl->opt0 = htobe64(options);
- options = V_TX_QUEUE(sc->params.tp.tx_modq[vi->pi->tx_chan]);
+ options = V_TX_QUEUE(TX_MODQ(vi->pi->tx_chan));
if (tp->t_flags & TF_REQ_TSTMP)
options |= F_TSTAMPS_EN;
cpl->opt2 = htobe32(options);
@@ -205,7 +205,7 @@ mk_ktls_act_open_req6(struct adapter *sc, struct vi_info *vi,
options |= F_NON_OFFLOAD;
cpl->opt0 = htobe64(options);
- options = V_TX_QUEUE(sc->params.tp.tx_modq[vi->pi->tx_chan]);
+ options = V_TX_QUEUE(TX_MODQ(vi->pi->tx_chan));
if (tp->t_flags & TF_REQ_TSTMP)
options |= F_TSTAMPS_EN;
cpl->opt2 = htobe32(options);
diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h
index 688c4b592180..a8b243b764c8 100644
--- a/sys/dev/cxgbe/offload.h
+++ b/sys/dev/cxgbe/offload.h
@@ -67,10 +67,10 @@ struct stid_region {
};
/*
- * Max # of ATIDs. The absolute HW max is 14b (enough for 16K) but we reserve
- * the upper 3b for use as a cookie to demux the reply.
+ * Max # of ATIDs. The absolute HW max is larger than this but we reserve a few
+ * of the upper bits for use as a cookie to demux the reply.
*/
-#define MAX_ATIDS 2048U
+#define MAX_ATIDS (M_TID_TID + 1)
union aopen_entry {
void *data;
diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c
index 18fa1093800f..359aae6df24e 100644
--- a/sys/dev/cxgbe/t4_filter.c
+++ b/sys/dev/cxgbe/t4_filter.c
@@ -1698,40 +1698,6 @@ done:
return (rc);
}
-/* SET_TCB_FIELD sent as a ULP command looks like this */
-#define LEN__SET_TCB_FIELD_ULP (sizeof(struct ulp_txpkt) + \
- sizeof(struct ulptx_idata) + sizeof(struct cpl_set_tcb_field_core))
-
-static void *
-mk_set_tcb_field_ulp(struct ulp_txpkt *ulpmc, uint64_t word, uint64_t mask,
- uint64_t val, uint32_t tid, uint32_t qid)
-{
- struct ulptx_idata *ulpsc;
- struct cpl_set_tcb_field_core *req;
-
- ulpmc->cmd_dest = htonl(V_ULPTX_CMD(ULP_TX_PKT) | V_ULP_TXPKT_DEST(0));
- ulpmc->len = htobe32(howmany(LEN__SET_TCB_FIELD_ULP, 16));
-
- ulpsc = (struct ulptx_idata *)(ulpmc + 1);
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
- ulpsc->len = htobe32(sizeof(*req));
-
- req = (struct cpl_set_tcb_field_core *)(ulpsc + 1);
- OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid));
- req->reply_ctrl = htobe16(V_NO_REPLY(1) | V_QUEUENO(qid));
- req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0));
- req->mask = htobe64(mask);
- req->val = htobe64(val);
-
- ulpsc = (struct ulptx_idata *)(req + 1);
- if (LEN__SET_TCB_FIELD_ULP % 16) {
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP));
- ulpsc->len = htobe32(0);
- return (ulpsc + 1);
- }
- return (ulpsc);
-}
-
/* ABORT_REQ sent as a ULP command looks like this */
#define LEN__ABORT_REQ_ULP (sizeof(struct ulp_txpkt) + \
sizeof(struct ulptx_idata) + sizeof(struct cpl_abort_req_core))
@@ -1807,14 +1773,15 @@ del_hashfilter_wrlen(void)
}
static void
-mk_del_hashfilter_wr(int tid, struct work_request_hdr *wrh, int wrlen, int qid)
+mk_del_hashfilter_wr(struct adapter *sc, int tid, struct work_request_hdr *wrh,
+ int wrlen, int qid)
{
struct ulp_txpkt *ulpmc;
INIT_ULPTX_WRH(wrh, wrlen, 0, 0);
ulpmc = (struct ulp_txpkt *)(wrh + 1);
- ulpmc = mk_set_tcb_field_ulp(ulpmc, W_TCB_RSS_INFO,
- V_TCB_RSS_INFO(M_TCB_RSS_INFO), V_TCB_RSS_INFO(qid), tid, 0);
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, tid, W_TCB_RSS_INFO,
+ V_TCB_RSS_INFO(M_TCB_RSS_INFO), V_TCB_RSS_INFO(qid));
ulpmc = mk_abort_req_ulp(ulpmc, tid);
ulpmc = mk_abort_rpl_ulp(ulpmc, tid);
}
@@ -1857,7 +1824,7 @@ del_hashfilter(struct adapter *sc, struct t4_filter *t)
goto done;
}
- mk_del_hashfilter_wr(t->idx, wr, wrlen, sc->sge.fwq.abs_id);
+ mk_del_hashfilter_wr(sc, t->idx, wr, wrlen, sc->sge.fwq.abs_id);
f->locked = 1;
f->pending = 1;
commit_wrq_wr(&sc->sge.ctrlq[0], wr, &cookie);
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 6cb434295b42..185cc1140486 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -1333,7 +1333,6 @@ t4_attach(device_t dev)
rc = partition_resources(sc);
if (rc != 0)
goto done; /* error message displayed already */
- t4_intr_clear(sc);
}
rc = get_params__post_init(sc);
@@ -1402,13 +1401,10 @@ t4_attach(device_t dev)
* depends on the link settings which will be known when the
* link comes up.
*/
- if (is_t6(sc)) {
+ if (is_t6(sc))
pi->fcs_reg = -1;
- } else if (is_t4(sc)) {
- pi->fcs_reg = PORT_REG(pi->tx_chan,
- A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L);
- } else {
- pi->fcs_reg = T5_PORT_REG(pi->tx_chan,
+ else {
+ pi->fcs_reg = t4_port_reg(sc, pi->tx_chan,
A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L);
}
pi->fcs_base = 0;
@@ -2292,7 +2288,6 @@ t4_resume(device_t dev)
rc = partition_resources(sc);
if (rc != 0)
goto done; /* error message displayed already */
- t4_intr_clear(sc);
}
rc = get_params__post_init(sc);
@@ -3910,6 +3905,9 @@ rw_via_memwin(struct adapter *sc, int idx, uint32_t addr, uint32_t *val,
return (0);
}
+CTASSERT(M_TID_COOKIE == M_COOKIE);
+CTASSERT(MAX_ATIDS <= (M_TID_TID + 1));
+
static void
t4_init_atid_table(struct adapter *sc)
{
@@ -5319,9 +5317,13 @@ get_params__post_init(struct adapter *sc)
}
/*
- * MPSBGMAP is queried separately because only recent firmwares support
- * it as a parameter and we don't want the compound query above to fail
- * on older firmwares.
+ * The parameters that follow may not be available on all firmwares. We
+ * query them individually rather than in a compound query because old
+ * firmwares fail the entire query if an unknown parameter is queried.
+ */
+
+ /*
+ * MPS buffer group configuration.
*/
param[0] = FW_PARAM_DEV(MPSBGMAP);
val[0] = 0;
@@ -5329,11 +5331,18 @@ get_params__post_init(struct adapter *sc)
if (rc == 0)
sc->params.mps_bg_map = val[0];
else
- sc->params.mps_bg_map = 0;
+ sc->params.mps_bg_map = UINT32_MAX; /* Not a legal value. */
+
+ param[0] = FW_PARAM_DEV(TPCHMAP);
+ val[0] = 0;
+ rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val);
+ if (rc == 0)
+ sc->params.tp_ch_map = val[0];
+ else
+ sc->params.tp_ch_map = UINT32_MAX; /* Not a legal value. */
/*
* Determine whether the firmware supports the filter2 work request.
- * This is queried separately for the same reason as MPSBGMAP above.
*/
param[0] = FW_PARAM_DEV(FILTER2_WR);
val[0] = 0;
@@ -5345,7 +5354,6 @@ get_params__post_init(struct adapter *sc)
/*
* Find out whether we're allowed to use the ULPTX MEMWRITE DSGL.
- * This is queried separately for the same reason as other params above.
*/
param[0] = FW_PARAM_DEV(ULPTX_MEMWRITE_DSGL);
val[0] = 0;
@@ -6662,7 +6670,8 @@ adapter_full_init(struct adapter *sc)
if (rc != 0)
return (rc);
- for (i = 0; i < nitems(sc->tq); i++) {
+ MPASS(sc->params.nports <= nitems(sc->tq));
+ for (i = 0; i < sc->params.nports; i++) {
if (sc->tq[i] != NULL)
continue;
sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT,
@@ -6711,7 +6720,9 @@ adapter_full_uninit(struct adapter *sc)
t4_teardown_adapter_queues(sc);
- for (i = 0; i < nitems(sc->tq) && sc->tq[i]; i++) {
+ for (i = 0; i < nitems(sc->tq); i++) {
+ if (sc->tq[i] == NULL)
+ continue;
taskqueue_free(sc->tq[i]);
sc->tq[i] = NULL;
}
@@ -7969,8 +7980,10 @@ cxgbe_sysctls(struct port_info *pi)
pi->mps_bg_map, "MPS buffer group map");
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_e_chan_map", CTLFLAG_RD,
NULL, pi->rx_e_chan_map, "TP rx e-channel map");
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_c_chan", CTLFLAG_RD, NULL,
- pi->rx_c_chan, "TP rx c-channel");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_chan", CTLFLAG_RD, NULL,
+ pi->tx_chan, "TP tx c-channel");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_chan", CTLFLAG_RD, NULL,
+ pi->rx_chan, "TP rx c-channel");
if (sc->flags & IS_VF)
return;
@@ -8020,9 +8033,8 @@ cxgbe_sysctls(struct port_info *pi)
#define T4_REGSTAT(name, stat, desc) \
SYSCTL_ADD_OID(ctx, children, OID_AUTO, #name, \
- CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, \
- (is_t4(sc) ? PORT_REG(pi->tx_chan, A_MPS_PORT_STAT_##stat##_L) : \
- T5_PORT_REG(pi->tx_chan, A_MPS_PORT_STAT_##stat##_L)), \
+ CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, \
+ t4_port_reg(sc, pi->tx_chan, A_MPS_PORT_STAT_##stat##_L), \
sysctl_handle_t4_reg64, "QU", desc)
/* We get these from port_stats and they may be stale by up to 1s */
diff --git a/sys/dev/cxgbe/t4_sched.c b/sys/dev/cxgbe/t4_sched.c
index 46638a086a0d..2186c8aa2ac0 100644
--- a/sys/dev/cxgbe/t4_sched.c
+++ b/sys/dev/cxgbe/t4_sched.c
@@ -334,7 +334,7 @@ bind_txq_to_traffic_class(struct adapter *sc, struct sge_txq *txq, int idx)
goto done;
}
- tc0 = &sc->port[txq->eq.tx_chan]->sched_params->cl_rl[0];
+ tc0 = &sc->port[txq->eq.port_id]->sched_params->cl_rl[0];
if (idx != -1) {
/*
* Bind to a different class at index idx.
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 2ef05b5a9f86..e1705ae063e2 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -3383,13 +3383,14 @@ init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int maxp, char *name)
static inline void
init_eq(struct adapter *sc, struct sge_eq *eq, int eqtype, int qsize,
- uint8_t tx_chan, struct sge_iq *iq, char *name)
+ uint8_t port_id, struct sge_iq *iq, char *name)
{
KASSERT(eqtype >= EQ_CTRL && eqtype <= EQ_OFLD,
("%s: bad qtype %d", __func__, eqtype));
eq->type = eqtype;
- eq->tx_chan = tx_chan;
+ eq->port_id = port_id;
+ eq->tx_chan = sc->port[port_id]->tx_chan;
eq->iq = iq;
eq->sidx = qsize - sc->params.sge.spg_len / EQ_ESIZE;
strlcpy(eq->lockname, name, sizeof(eq->lockname));
@@ -3830,8 +3831,8 @@ alloc_ctrlq(struct adapter *sc, int idx)
snprintf(name, sizeof(name), "%s ctrlq%d",
device_get_nameunit(sc->dev), idx);
- init_eq(sc, &ctrlq->eq, EQ_CTRL, CTRL_EQ_QSIZE,
- sc->port[idx]->tx_chan, &sc->sge.fwq, name);
+ init_eq(sc, &ctrlq->eq, EQ_CTRL, CTRL_EQ_QSIZE, idx,
+ &sc->sge.fwq, name);
rc = alloc_wrq(sc, NULL, ctrlq, &sc->ctx, oid);
if (rc != 0) {
CH_ERR(sc, "failed to allocate ctrlq%d: %d\n", idx, rc);
@@ -4595,7 +4596,7 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int idx)
iqidx = vi->first_rxq + (idx % vi->nrxq);
snprintf(name, sizeof(name), "%s txq%d",
device_get_nameunit(vi->dev), idx);
- init_eq(sc, &txq->eq, EQ_ETH, vi->qsize_txq, pi->tx_chan,
+ init_eq(sc, &txq->eq, EQ_ETH, vi->qsize_txq, pi->port_id,
&sc->sge.rxq[iqidx].iq, name);
rc = mp_ring_alloc(&txq->r, eq->sidx, txq, eth_tx,
@@ -4812,11 +4813,11 @@ alloc_ofld_txq(struct vi_info *vi, struct sge_ofld_txq *ofld_txq, int idx)
device_get_nameunit(vi->dev), idx);
if (vi->nofldrxq > 0) {
iqidx = vi->first_ofld_rxq + (idx % vi->nofldrxq);
- init_eq(sc, eq, EQ_OFLD, vi->qsize_txq, pi->tx_chan,
+ init_eq(sc, eq, EQ_OFLD, vi->qsize_txq, pi->port_id,
&sc->sge.ofld_rxq[iqidx].iq, name);
} else {
iqidx = vi->first_rxq + (idx % vi->nrxq);
- init_eq(sc, eq, EQ_OFLD, vi->qsize_txq, pi->tx_chan,
+ init_eq(sc, eq, EQ_OFLD, vi->qsize_txq, pi->port_id,
&sc->sge.rxq[iqidx].iq, name);
}
@@ -6329,7 +6330,7 @@ handle_wrq_egr_update(struct adapter *sc, struct sge_eq *eq)
struct sge_wrq *wrq = (void *)eq;
atomic_readandclear_int(&eq->equiq);
- taskqueue_enqueue(sc->tq[eq->tx_chan], &wrq->wrq_tx_task);
+ taskqueue_enqueue(sc->tq[eq->port_id], &wrq->wrq_tx_task);
}
static void
@@ -6341,7 +6342,7 @@ handle_eth_egr_update(struct adapter *sc, struct sge_eq *eq)
atomic_readandclear_int(&eq->equiq);
if (mp_ring_is_idle(txq->r))
- taskqueue_enqueue(sc->tq[eq->tx_chan], &txq->tx_reclaim_task);
+ taskqueue_enqueue(sc->tq[eq->port_id], &txq->tx_reclaim_task);
else
mp_ring_check_drainage(txq->r, 64);
}
diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c
index c1d4af45fd70..a08ddea00d05 100644
--- a/sys/dev/cxgbe/tom/t4_ddp.c
+++ b/sys/dev/cxgbe/tom/t4_ddp.c
@@ -546,37 +546,6 @@ insert_ddp_data(struct toepcb *toep, uint32_t n)
sizeof(struct ulptx_idata) + sizeof(struct cpl_rx_data_ack_core))
static inline void *
-mk_set_tcb_field_ulp(struct ulp_txpkt *ulpmc, struct toepcb *toep,
- uint64_t word, uint64_t mask, uint64_t val)
-{
- struct ulptx_idata *ulpsc;
- struct cpl_set_tcb_field_core *req;
-
- ulpmc->cmd_dest = htonl(V_ULPTX_CMD(ULP_TX_PKT) | V_ULP_TXPKT_DEST(0));
- ulpmc->len = htobe32(howmany(LEN__SET_TCB_FIELD_ULP, 16));
-
- ulpsc = (struct ulptx_idata *)(ulpmc + 1);
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
- ulpsc->len = htobe32(sizeof(*req));
-
- req = (struct cpl_set_tcb_field_core *)(ulpsc + 1);
- OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_SET_TCB_FIELD, toep->tid));
- req->reply_ctrl = htobe16(V_NO_REPLY(1) |
- V_QUEUENO(toep->ofld_rxq->iq.abs_id));
- req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0));
- req->mask = htobe64(mask);
- req->val = htobe64(val);
-
- ulpsc = (struct ulptx_idata *)(req + 1);
- if (LEN__SET_TCB_FIELD_ULP % 16) {
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP));
- ulpsc->len = htobe32(0);
- return (ulpsc + 1);
- }
- return (ulpsc);
-}
-
-static inline void *
mk_rx_data_ack_ulp(struct ulp_txpkt *ulpmc, struct toepcb *toep)
{
struct ulptx_idata *ulpsc;
@@ -634,21 +603,21 @@ mk_update_tcb_for_ddp(struct adapter *sc, struct toepcb *toep, int db_idx,
ulpmc = (struct ulp_txpkt *)(wrh + 1);
/* Write the buffer's tag */
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid,
W_TCB_RX_DDP_BUF0_TAG + db_idx,
V_TCB_RX_DDP_BUF0_TAG(M_TCB_RX_DDP_BUF0_TAG),
V_TCB_RX_DDP_BUF0_TAG(prsv->prsv_tag));
/* Update the current offset in the DDP buffer and its total length */
if (db_idx == 0)
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid,
W_TCB_RX_DDP_BUF0_OFFSET,
V_TCB_RX_DDP_BUF0_OFFSET(M_TCB_RX_DDP_BUF0_OFFSET) |
V_TCB_RX_DDP_BUF0_LEN(M_TCB_RX_DDP_BUF0_LEN),
V_TCB_RX_DDP_BUF0_OFFSET(offset) |
V_TCB_RX_DDP_BUF0_LEN(len));
else
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid,
W_TCB_RX_DDP_BUF1_OFFSET,
V_TCB_RX_DDP_BUF1_OFFSET(M_TCB_RX_DDP_BUF1_OFFSET) |
V_TCB_RX_DDP_BUF1_LEN((u64)M_TCB_RX_DDP_BUF1_LEN << 32),
@@ -656,7 +625,7 @@ mk_update_tcb_for_ddp(struct adapter *sc, struct toepcb *toep, int db_idx,
V_TCB_RX_DDP_BUF1_LEN((u64)len << 32));
/* Update DDP flags */
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_RX_DDP_FLAGS,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_RX_DDP_FLAGS,
ddp_flags_mask, ddp_flags);
/* Gratuitous RX_DATA_ACK with RX_MODULATE set to speed up delivery. */
@@ -1295,26 +1264,25 @@ set_ddp_ulp_mode(struct toepcb *toep)
* Words 26/27 are zero except for the DDP_OFF flag in
* W_TCB_RX_DDP_FLAGS (27).
*/
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, 26,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 26,
0xffffffffffffffff, (uint64_t)V_TF_DDP_OFF(1) << 32);
/* Words 28/29 are zero. */
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, 28,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 28,
0xffffffffffffffff, 0);
/* Words 30/31 are zero. */
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, 30,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 30,
0xffffffffffffffff, 0);
/* Set the ULP mode to ULP_MODE_TCPDDP. */
toep->params.ulp_mode = ULP_MODE_TCPDDP;
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_ULP_TYPE,
- V_TCB_ULP_TYPE(M_TCB_ULP_TYPE),
- V_TCB_ULP_TYPE(ULP_MODE_TCPDDP));
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_ULP_TYPE,
+ V_TCB_ULP_TYPE(M_TCB_ULP_TYPE), V_TCB_ULP_TYPE(ULP_MODE_TCPDDP));
#ifdef USE_DDP_RX_FLOW_CONTROL
/* Set TF_RX_FLOW_CONTROL_DDP. */
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_T_FLAGS,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_T_FLAGS,
V_TF_RX_FLOW_CONTROL_DDP(1), V_TF_RX_FLOW_CONTROL_DDP(1));
#endif
diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c
index bdd03edd3a6f..c6377980fca9 100644
--- a/sys/dev/cxgbe/tom/t4_tls.c
+++ b/sys/dev/cxgbe/tom/t4_tls.c
@@ -1075,41 +1075,6 @@ out:
m_freem(m);
}
-/* SET_TCB_FIELD sent as a ULP command looks like this */
-#define LEN__SET_TCB_FIELD_ULP (sizeof(struct ulp_txpkt) + \
- sizeof(struct ulptx_idata) + sizeof(struct cpl_set_tcb_field_core))
-
-static inline void *
-mk_set_tcb_field_ulp(struct ulp_txpkt *ulpmc, struct toepcb *toep,
- uint64_t word, uint64_t mask, uint64_t val)
-{
- struct ulptx_idata *ulpsc;
- struct cpl_set_tcb_field_core *req;
-
- ulpmc->cmd_dest = htonl(V_ULPTX_CMD(ULP_TX_PKT) | V_ULP_TXPKT_DEST(0));
- ulpmc->len = htobe32(howmany(LEN__SET_TCB_FIELD_ULP, 16));
-
- ulpsc = (struct ulptx_idata *)(ulpmc + 1);
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
- ulpsc->len = htobe32(sizeof(*req));
-
- req = (struct cpl_set_tcb_field_core *)(ulpsc + 1);
- OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_SET_TCB_FIELD, toep->tid));
- req->reply_ctrl = htobe16(V_NO_REPLY(1) |
- V_QUEUENO(toep->ofld_rxq->iq.abs_id));
- req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0));
- req->mask = htobe64(mask);
- req->val = htobe64(val);
-
- ulpsc = (struct ulptx_idata *)(req + 1);
- if (LEN__SET_TCB_FIELD_ULP % 16) {
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP));
- ulpsc->len = htobe32(0);
- return (ulpsc + 1);
- }
- return (ulpsc);
-}
-
/*
* Send a work request setting multiple TCB fields to enable
* ULP_MODE_TLS.
@@ -1164,7 +1129,7 @@ tls_update_tcb(struct adapter *sc, struct toepcb *toep, uint64_t seqno)
* decryption. Word 30 is zero and Word 31 contains
* the keyid.
*/
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, 26,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 26,
0xffffffffffffffff, 0);
/*
@@ -1173,15 +1138,15 @@ tls_update_tcb(struct adapter *sc, struct toepcb *toep, uint64_t seqno)
* units of 64 bytes.
*/
key_offset = toep->tls.rx_key_addr - sc->vres.key.start;
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, 30,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 30,
0xffffffffffffffff,
(uint64_t)V_TCB_RX_TLS_KEY_TAG(key_offset / 64) << 32);
CTR3(KTR_CXGBE, "%s: tid %d enable TLS seqno %lu", __func__,
toep->tid, seqno);
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_TLS_SEQ,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_TLS_SEQ,
V_TCB_TLS_SEQ(M_TCB_TLS_SEQ), V_TCB_TLS_SEQ(seqno));
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_ULP_RAW,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_ULP_RAW,
V_TCB_ULP_RAW(M_TCB_ULP_RAW),
V_TCB_ULP_RAW((V_TF_TLS_KEY_SIZE(3) | V_TF_TLS_CONTROL(1) |
V_TF_TLS_ACTIVE(1) | V_TF_TLS_ENABLE(1))));
@@ -1191,12 +1156,11 @@ tls_update_tcb(struct adapter *sc, struct toepcb *toep, uint64_t seqno)
/* Set the ULP mode to ULP_MODE_TLS. */
toep->params.ulp_mode = ULP_MODE_TLS;
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_ULP_TYPE,
- V_TCB_ULP_TYPE(M_TCB_ULP_TYPE),
- V_TCB_ULP_TYPE(ULP_MODE_TLS));
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_ULP_TYPE,
+ V_TCB_ULP_TYPE(M_TCB_ULP_TYPE), V_TCB_ULP_TYPE(ULP_MODE_TLS));
/* Clear TF_RX_QUIESCE. */
- ulpmc = mk_set_tcb_field_ulp(ulpmc, toep, W_TCB_T_FLAGS,
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_T_FLAGS,
V_TF_RX_QUIESCE(1), 0);
t4_wrq_tx(sc, wr);
diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c
index 4d4400512ef5..3fe34c7c01a3 100644
--- a/sys/dev/cxgbe/tom/t4_tom.c
+++ b/sys/dev/cxgbe/tom/t4_tom.c
@@ -838,40 +838,6 @@ t4_alloc_tls_session(struct toedev *tod, struct tcpcb *tp,
}
#endif
-/* SET_TCB_FIELD sent as a ULP command looks like this */
-#define LEN__SET_TCB_FIELD_ULP (sizeof(struct ulp_txpkt) + \
- sizeof(struct ulptx_idata) + sizeof(struct cpl_set_tcb_field_core))
-
-static void *
-mk_set_tcb_field_ulp(struct ulp_txpkt *ulpmc, uint64_t word, uint64_t mask,
- uint64_t val, uint32_t tid)
-{
- struct ulptx_idata *ulpsc;
- struct cpl_set_tcb_field_core *req;
-
- ulpmc->cmd_dest = htonl(V_ULPTX_CMD(ULP_TX_PKT) | V_ULP_TXPKT_DEST(0));
- ulpmc->len = htobe32(howmany(LEN__SET_TCB_FIELD_ULP, 16));
-
- ulpsc = (struct ulptx_idata *)(ulpmc + 1);
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
- ulpsc->len = htobe32(sizeof(*req));
-
- req = (struct cpl_set_tcb_field_core *)(ulpsc + 1);
- OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid));
- req->reply_ctrl = htobe16(V_NO_REPLY(1));
- req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0));
- req->mask = htobe64(mask);
- req->val = htobe64(val);
-
- ulpsc = (struct ulptx_idata *)(req + 1);
- if (LEN__SET_TCB_FIELD_ULP % 16) {
- ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP));
- ulpsc->len = htobe32(0);
- return (ulpsc + 1);
- }
- return (ulpsc);
-}
-
static void
send_mss_flowc_wr(struct adapter *sc, struct toepcb *toep)
{
@@ -958,10 +924,10 @@ t4_pmtu_update(struct toedev *tod, struct tcpcb *tp, tcp_seq seq, int mtu)
}
INIT_ULPTX_WRH(wrh, len, 1, 0); /* atomic */
ulpmc = (struct ulp_txpkt *)(wrh + 1);
- ulpmc = mk_set_tcb_field_ulp(ulpmc, W_TCB_T_MAXSEG,
- V_TCB_T_MAXSEG(M_TCB_T_MAXSEG), V_TCB_T_MAXSEG(idx), toep->tid);
- ulpmc = mk_set_tcb_field_ulp(ulpmc, W_TCB_TIMESTAMP,
- V_TCB_TIMESTAMP(0x7FFFFULL << 11), 0, toep->tid);
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_T_MAXSEG,
+ V_TCB_T_MAXSEG(M_TCB_T_MAXSEG), V_TCB_T_MAXSEG(idx));
+ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_TIMESTAMP,
+ V_TCB_TIMESTAMP(0x7FFFFULL << 11), 0);
commit_wrq_wr(toep->ctrlq, wrh, &cookie);
/* Update the software toepcb and tcpcb. */
@@ -1200,12 +1166,14 @@ calc_options2(struct vi_info *vi, struct conn_params *cp)
MPASS(cp->ecn == 0 || cp->ecn == 1);
opt2 |= V_CCTRL_ECN(cp->ecn);
- /* XXX: F_RX_CHANNEL for multiple rx c-chan support goes here. */
-
- opt2 |= V_TX_QUEUE(sc->params.tp.tx_modq[pi->tx_chan]);
+ opt2 |= V_TX_QUEUE(TX_MODQ(pi->tx_chan));
opt2 |= V_PACE(0);
opt2 |= F_RSS_QUEUE_VALID;
opt2 |= V_RSS_QUEUE(sc->sge.ofld_rxq[cp->rxq_idx].iq.abs_id);
+ if (chip_id(sc) <= CHELSIO_T6) {
+ MPASS(pi->rx_chan == 0 || pi->rx_chan == 1);
+ opt2 |= V_RX_CHANNEL(pi->rx_chan);
+ }
MPASS(cp->cong_algo >= 0 && cp->cong_algo <= M_CONG_CNTRL);
opt2 |= V_CONG_CNTRL(cp->cong_algo);
diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c
index 218c0c293662..65e548ba293b 100644
--- a/sys/dev/etherswitch/ip17x/ip17x.c
+++ b/sys/dev/etherswitch/ip17x/ip17x.c
@@ -556,7 +556,7 @@ ip17x_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr)
static int
ip17x_readreg(device_t dev, int addr)
{
- struct ip17x_softc *sc;
+ struct ip17x_softc *sc __diagused;
sc = device_get_softc(dev);
IP17X_LOCK_ASSERT(sc, MA_OWNED);
@@ -568,7 +568,7 @@ ip17x_readreg(device_t dev, int addr)
static int
ip17x_writereg(device_t dev, int addr, int value)
{
- struct ip17x_softc *sc;
+ struct ip17x_softc *sc __diagused;
sc = device_get_softc(dev);
IP17X_LOCK_ASSERT(sc, MA_OWNED);
diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c
index 6eff37bb118e..88726422bd01 100644
--- a/sys/dev/etherswitch/ukswitch/ukswitch.c
+++ b/sys/dev/etherswitch/ukswitch/ukswitch.c
@@ -514,7 +514,7 @@ ukswitch_writephy(device_t dev, int phy, int reg, int data)
static int
ukswitch_readreg(device_t dev, int addr)
{
- struct ukswitch_softc *sc;
+ struct ukswitch_softc *sc __diagused;
sc = device_get_softc(dev);
UKSWITCH_LOCK_ASSERT(sc, MA_OWNED);
@@ -526,7 +526,7 @@ ukswitch_readreg(device_t dev, int addr)
static int
ukswitch_writereg(device_t dev, int addr, int value)
{
- struct ukswitch_softc *sc;
+ struct ukswitch_softc *sc __diagused;
sc = device_get_softc(dev);
UKSWITCH_LOCK_ASSERT(sc, MA_OWNED);
diff --git a/sys/dev/hwpmc/pmu_dmc620.c b/sys/dev/hwpmc/pmu_dmc620.c
index 42e5dfdbf154..c33e5264f7de 100644
--- a/sys/dev/hwpmc/pmu_dmc620.c
+++ b/sys/dev/hwpmc/pmu_dmc620.c
@@ -68,7 +68,7 @@ struct pmu_dmc620_softc {
#define RD4(sc, r) bus_read_4((sc)->sc_res[0], (r))
#define WR4(sc, r, v) bus_write_4((sc)->sc_res[0], (r), (v))
-#define MD4(sc, r, c, s) WR4((sc), (r), RD4((sc), (r)) & ~(c) | (s))
+#define MD4(sc, r, c, s) WR4((sc), (r), (RD4((sc), (r)) & ~(c)) | (s))
#define CD2MD4(sc, u, r, c, s) MD4((sc), DMC620_CLKDIV2_REG((u), (r)), (c), (s))
#define CMD4(sc, u, r, c, s) MD4((sc), DMC620_CLK_REG((u), (r)), (c), (s))
diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c
index 8c9dbb6bc145..0d65bdea5782 100644
--- a/sys/dev/iicbus/iic.c
+++ b/sys/dev/iicbus/iic.c
@@ -239,7 +239,8 @@ iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last)
num_bytes = MIN(uio->uio_resid, sizeof(buffer));
transferred_bytes = 0;
- if (uio->uio_rw == UIO_WRITE) {
+ switch (uio->uio_rw) {
+ case UIO_WRITE:
error = uiomove(buffer, num_bytes, uio);
while ((error == 0) && (transferred_bytes < num_bytes)) {
@@ -248,13 +249,14 @@ iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last)
num_bytes - transferred_bytes, &written_bytes, 0);
transferred_bytes += written_bytes;
}
-
- } else if (uio->uio_rw == UIO_READ) {
+ break;
+ case UIO_READ:
error = iicbus_read(parent, buffer,
num_bytes, &transferred_bytes,
((uio->uio_resid <= sizeof(buffer)) ? last : 0), 0);
if (error == 0)
error = uiomove(buffer, transferred_bytes, uio);
+ break;
}
}
@@ -290,10 +292,14 @@ iicuio(struct cdev *dev, struct uio *uio, int ioflag)
return (error);
}
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
addr = priv->addr | LSB;
- else
+ break;
+ case UIO_WRITE:
addr = priv->addr & ~LSB;
+ break;
+ }
error = iicbus_start(parent, addr, 0);
if (error != 0)
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 27e63363767c..267554031f23 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -887,23 +887,6 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
int ma_offs, npages;
bool mapped;
- switch (bp->bio_cmd) {
- case BIO_READ:
- auio.uio_rw = UIO_READ;
- break;
- case BIO_WRITE:
- auio.uio_rw = UIO_WRITE;
- break;
- case BIO_FLUSH:
- break;
- case BIO_DELETE:
- if (sc->candelete)
- break;
- /* FALLTHROUGH */
- default:
- return (EOPNOTSUPP);
- }
-
td = curthread;
vp = sc->vnode;
piov = NULL;
@@ -920,7 +903,14 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
* still valid.
*/
- if (bp->bio_cmd == BIO_FLUSH) {
+ switch (bp->bio_cmd) {
+ case BIO_READ:
+ auio.uio_rw = UIO_READ;
+ break;
+ case BIO_WRITE:
+ auio.uio_rw = UIO_WRITE;
+ break;
+ case BIO_FLUSH:
do {
(void)vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
@@ -929,11 +919,17 @@ mdstart_vnode(struct md_s *sc, struct bio *bp)
vn_finished_write(mp);
} while (error == ERELOOKUP);
return (error);
- } else if (bp->bio_cmd == BIO_DELETE) {
- error = vn_deallocate(vp, &off, &len, 0,
- sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred, NOCRED);
- bp->bio_resid = len;
- return (error);
+ case BIO_DELETE:
+ if (sc->candelete) {
+ error = vn_deallocate(vp, &off, &len, 0,
+ sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred,
+ NOCRED);
+ bp->bio_resid = len;
+ return (error);
+ }
+ /* FALLTHROUGH */
+ default:
+ return (EOPNOTSUPP);
}
auio.uio_offset = (vm_ooffset_t)bp->bio_offset;
@@ -965,7 +961,7 @@ unmapped_step:
PAGE_MASK))));
iolen = min(ptoa(npages) - (ma_offs & PAGE_MASK), len);
KASSERT(iolen > 0, ("zero iolen"));
- KASSERT(npages <= atop(MAXPHYS + PAGE_SIZE),
+ KASSERT(npages <= atop(maxphys + PAGE_SIZE),
("npages %d too large", npages));
pmap_qenter(sc->kva, &bp->bio_ma[atop(ma_offs)], npages);
aiov.iov_base = (void *)(sc->kva + (ma_offs & PAGE_MASK));
@@ -981,7 +977,7 @@ unmapped_step:
auio.uio_iovcnt = 1;
}
iostart = auio.uio_offset;
- if (auio.uio_rw == UIO_READ) {
+ if (bp->bio_cmd == BIO_READ) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READ(vp, &auio, 0, sc->cred);
VOP_UNLOCK(vp);
@@ -1487,7 +1483,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td)
goto bad;
}
- sc->kva = kva_alloc(MAXPHYS + PAGE_SIZE);
+ sc->kva = kva_alloc(maxphys + PAGE_SIZE);
return (0);
bad:
VOP_UNLOCK(nd.ni_vp);
@@ -1547,7 +1543,7 @@ mddestroy(struct md_s *sc, struct thread *td)
if (sc->uma)
uma_zdestroy(sc->uma);
if (sc->kva)
- kva_free(sc->kva, MAXPHYS + PAGE_SIZE);
+ kva_free(sc->kva, maxphys + PAGE_SIZE);
LIST_REMOVE(sc, list);
free_unr(md_uh, sc->unit);
diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs
index 78d1dddba59f..c8eba403c22d 100644
--- a/sys/dev/mii/miidevs
+++ b/sys/dev/mii/miidevs
@@ -330,6 +330,7 @@ model REALTEK RTL8305SC 0x0005 RTL8305SC 10/100 802.1q switch
model REALTEK RTL8201E 0x0008 RTL8201E 10/100 media interface
model REALTEK RTL8251 0x0000 RTL8251/8153 1000BASE-T media interface
model REALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface
+model REALTEK RTL8211FVD 0x0007 RTL8211F-VD 1000BASE-T media interface
/* Seeq Seeq PHYs */
model SEEQ 80220 0x0003 Seeq 80220 10/100 media interface
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index 63b3406bb831..4ff86c8c8ccb 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -93,6 +93,7 @@ static void rgephy_disable_eee(struct mii_softc *);
static const struct mii_phydesc rgephys[] = {
MII_PHY_DESC(REALTEK, RTL8169S),
MII_PHY_DESC(REALTEK, RTL8251),
+ MII_PHY_DESC(REALTEK, RTL8211FVD),
MII_PHY_END
};
@@ -283,7 +284,7 @@ rgephy_linkup(struct mii_softc *sc)
linkup = 0;
if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 &&
sc->mii_mpd_rev >= RGEPHY_8211B) {
- if (sc->mii_mpd_rev == RGEPHY_8211F) {
+ if (sc->mii_mpd_rev >= RGEPHY_8211F) {
reg = PHY_READ(sc, RGEPHY_F_MII_SSR);
if (reg & RGEPHY_F_SSR_LINK)
linkup++;
@@ -338,7 +339,7 @@ rgephy_status(struct mii_softc *sc)
if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 &&
sc->mii_mpd_rev >= RGEPHY_8211B) {
- if (sc->mii_mpd_rev == RGEPHY_8211F) {
+ if (sc->mii_mpd_rev >= RGEPHY_8211F) {
ssr = PHY_READ(sc, RGEPHY_F_MII_SSR);
switch (ssr & RGEPHY_F_SSR_SPD_MASK) {
case RGEPHY_F_SSR_S1000:
@@ -523,6 +524,7 @@ rgephy_reset(struct mii_softc *sc)
switch (sc->mii_mpd_rev) {
case RGEPHY_8211F:
+ case RGEPHY_8211FVD:
pcr = PHY_READ(sc, RGEPHY_F_MII_PCR1);
pcr &= ~(RGEPHY_F_PCR1_MDI_MM | RGEPHY_F_PCR1_ALDPS_EN);
PHY_WRITE(sc, RGEPHY_F_MII_PCR1, pcr);
diff --git a/sys/dev/mii/rgephyreg.h b/sys/dev/mii/rgephyreg.h
index 205f1a836020..fef985ebe30e 100644
--- a/sys/dev/mii/rgephyreg.h
+++ b/sys/dev/mii/rgephyreg.h
@@ -38,6 +38,7 @@
#define RGEPHY_8211B 2
#define RGEPHY_8211C 3
#define RGEPHY_8211F 6
+#define RGEPHY_8211FVD 8
/*
* RealTek 8169S/8110S gigE PHY registers
diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
index ee8ed0da240d..9a73c7571fd7 100644
--- a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
+++ b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
@@ -91,8 +91,8 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
ring->size_mask = size - 1;
ring->stride = stride;
ring->inline_thold = MAX(MIN_PKT_LEN, MIN(priv->prof->inline_thold, MAX_INLINE));
- mtx_init(&ring->tx_lock.m, "mlx4 tx", NULL, MTX_DEF);
- mtx_init(&ring->comp_lock.m, "mlx4 comp", NULL, MTX_DEF);
+ mtx_init(&ring->tx_lock, "mlx4 tx", NULL, MTX_DEF);
+ mtx_init(&ring->comp_lock, "mlx4 comp", NULL, MTX_DEF);
tmp = size * sizeof(struct mlx4_en_tx_info);
ring->tx_info = kzalloc_node(tmp, GFP_KERNEL, node);
@@ -205,8 +205,8 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv,
for (x = 0; x != ring->size; x++)
bus_dmamap_destroy(ring->dma_tag, ring->tx_info[x].dma_map);
vfree(ring->tx_info);
- mtx_destroy(&ring->tx_lock.m);
- mtx_destroy(&ring->comp_lock.m);
+ mtx_destroy(&ring->tx_lock);
+ mtx_destroy(&ring->comp_lock);
bus_dma_tag_destroy(ring->dma_tag);
kfree(ring);
*pring = NULL;
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index e1dbd02fcf3a..962705e6d258 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -3674,6 +3674,9 @@ out:
/* Check if module is present before doing an access */
module_status = mlx5_query_module_status(priv->mdev, module_num);
if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED) {
+ mlx5_en_err(ifp,
+ "Query module %d status: not plugged (%d), eeprom reading is not supported\n",
+ module_num, module_status);
error = EINVAL;
goto err_i2c;
}
diff --git a/sys/dev/mmc/host/dwmmc_starfive.c b/sys/dev/mmc/host/dwmmc_starfive.c
new file mode 100644
index 000000000000..ab90da3b2b57
--- /dev/null
+++ b/sys/dev/mmc/host/dwmmc_starfive.c
@@ -0,0 +1,114 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2017 Emmanuel Vadot <manu@freebsd.org>
+ * Copyright (c) 2024 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Mitchell Horne
+ * <mhorne@FreeBSD.org> under sponsorship from the FreeBSD Foundation.
+ */
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/module.h>
+#include <sys/queue.h>
+#include <sys/taskqueue.h>
+
+#include <machine/bus.h>
+
+#include <dev/mmc/bridge.h>
+#include <dev/mmc/mmc_fdt_helpers.h>
+
+#include <dev/mmc/host/dwmmc_var.h>
+
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include "opt_mmccam.h"
+
+enum dwmmc_type {
+ DWMMC_GENERIC = 1,
+ DWMMC_JH7110
+};
+
+static struct ofw_compat_data compat_data[] = {
+ {"snps,dw-mshc", DWMMC_GENERIC},
+ {"starfive,jh7110-mmc", DWMMC_JH7110},
+ {NULL, 0}
+};
+
+static int dwmmc_starfive_update_ios(struct dwmmc_softc *sc,
+ struct mmc_ios *ios)
+{
+ int err;
+
+ if (ios->clock != 0 && ios->clock != sc->bus_hz) {
+ err = clk_set_freq(sc->ciu, ios->clock, CLK_SET_ROUND_DOWN);
+ if (err != 0) {
+ printf("%s, Failed to set freq for ciu clock\n",
+ __func__);
+ return (err);
+ }
+ sc->bus_hz = ios->clock;
+ }
+
+ return (0);
+}
+
+static int
+starfive_dwmmc_probe(device_t dev)
+{
+ phandle_t node;
+ int type;
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ if (type == 0)
+ return (ENXIO);
+
+ /*
+ * If we matched the generic compat string, check the top-level board
+ * compatible, to ensure we should actually use the starfive driver.
+ */
+ if (type == DWMMC_GENERIC) {
+ node = OF_finddevice("/");
+ if (!ofw_bus_node_is_compatible(node, "starfive,jh7110"))
+ return (ENXIO);
+ }
+
+ device_set_desc(dev, "Synopsys DesignWare Mobile Storage "
+ "Host Controller (StarFive)");
+
+ return (BUS_PROBE_VENDOR);
+}
+
+static int
+starfive_dwmmc_attach(device_t dev)
+{
+ struct dwmmc_softc *sc;
+
+ sc = device_get_softc(dev);
+ sc->update_ios = &dwmmc_starfive_update_ios;
+
+ return (dwmmc_attach(dev));
+}
+
+static device_method_t starfive_dwmmc_methods[] = {
+ /* bus interface */
+ DEVMETHOD(device_probe, starfive_dwmmc_probe),
+ DEVMETHOD(device_attach, starfive_dwmmc_attach),
+ DEVMETHOD(device_detach, dwmmc_detach),
+
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_1(starfive_dwmmc, starfive_dwmmc_driver, starfive_dwmmc_methods,
+ sizeof(struct dwmmc_softc), dwmmc_driver);
+
+DRIVER_MODULE(starfive_dwmmc, simplebus, starfive_dwmmc_driver, 0, 0);
+
+#ifndef MMCCAM
+MMC_DECLARE_BRIDGE(starfive_dwmmc);
+#endif
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
index 409d1f006cad..a389fc443743 100644
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -44,6 +44,8 @@
#define NVME_IO_TEST _IOWR('n', 100, struct nvme_io_test)
#define NVME_BIO_TEST _IOWR('n', 101, struct nvme_io_test)
+/* NB: Fabrics-specific ioctls defined in nvmf.h start at 200. */
+
/*
* Macros to deal with NVME revisions, as defined VS register
*/
@@ -211,6 +213,11 @@
/* Command field definitions */
+enum nvme_fuse {
+ NVME_FUSE_NORMAL = 0x0,
+ NVME_FUSE_FIRST = 0x1,
+ NVME_FUSE_SECOND = 0x2
+};
#define NVME_CMD_FUSE_SHIFT (0)
#define NVME_CMD_FUSE_MASK (0x3)
@@ -825,7 +832,7 @@ struct nvme_command {
uint32_t cdw13; /* command-specific */
uint32_t cdw14; /* command-specific */
uint32_t cdw15; /* command-specific */
-};
+} __aligned(8);
_Static_assert(sizeof(struct nvme_command) == 16 * 4, "bad size for nvme_command");
@@ -1594,7 +1601,7 @@ struct nvme_health_information_page {
uint32_t ttftmt2;
uint8_t reserved2[280];
-} __packed __aligned(4);
+} __packed __aligned(8);
_Static_assert(sizeof(struct nvme_health_information_page) == 512, "bad size for nvme_health_information_page");
@@ -1645,6 +1652,30 @@ struct nvme_device_self_test_page {
_Static_assert(sizeof(struct nvme_device_self_test_page) == 564,
"bad size for nvme_device_self_test_page");
+/*
+ * Header structure for both host initiated telemetry (page 7) and controller
+ * initiated telemetry (page 8).
+ */
+struct nvme_telemetry_log_page {
+ uint8_t identifier;
+ uint8_t rsvd[4];
+ uint8_t oui[3];
+ uint16_t da1_last;
+ uint16_t da2_last;
+ uint16_t da3_last;
+ uint8_t rsvd2[2];
+ uint32_t da4_last;
+ uint8_t rsvd3[361];
+ uint8_t hi_gen;
+ uint8_t ci_avail;
+ uint8_t ci_gen;
+ uint8_t reason[128];
+ /* Blocks of telemetry data follow */
+} __packed __aligned(4);
+
+_Static_assert(sizeof(struct nvme_telemetry_log_page) == 512,
+ "bad size for nvme_telemetry_log");
+
struct nvme_discovery_log_entry {
uint8_t trtype;
uint8_t adrfam;
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index b7b03082c54e..d9bd1fce2864 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1334,9 +1334,8 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag,
case NVME_GET_NSID:
{
struct nvme_get_nsid *gnsid = (struct nvme_get_nsid *)arg;
- strncpy(gnsid->cdev, device_get_nameunit(ctrlr->dev),
+ strlcpy(gnsid->cdev, device_get_nameunit(ctrlr->dev),
sizeof(gnsid->cdev));
- gnsid->cdev[sizeof(gnsid->cdev) - 1] = '\0';
gnsid->nsid = 0;
break;
}
@@ -1443,6 +1442,8 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev)
ctrlr->enable_aborts = 0;
TUNABLE_INT_FETCH("hw.nvme.enable_aborts", &ctrlr->enable_aborts);
+ ctrlr->alignment_splits = counter_u64_alloc(M_WAITOK);
+
/* Cap transfers by the maximum addressable by page-sized PRP (4KB pages -> 2MB). */
ctrlr->max_xfer_size = MIN(maxphys, (ctrlr->page_size / 8 * ctrlr->page_size));
if (nvme_ctrlr_construct_admin_qpair(ctrlr) != 0)
@@ -1561,6 +1562,9 @@ noadminq:
ctrlr->resource_id, ctrlr->resource);
nores:
+ if (ctrlr->alignment_splits)
+ counter_u64_free(ctrlr->alignment_splits);
+
mtx_destroy(&ctrlr->lock);
}
diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c
index 360b9f982c20..201cf9188c1e 100644
--- a/sys/dev/nvme/nvme_ns.c
+++ b/sys/dev/nvme/nvme_ns.c
@@ -82,9 +82,8 @@ nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag,
case NVME_GET_NSID:
{
struct nvme_get_nsid *gnsid = (struct nvme_get_nsid *)arg;
- strncpy(gnsid->cdev, device_get_nameunit(ctrlr->dev),
+ strlcpy(gnsid->cdev, device_get_nameunit(ctrlr->dev),
sizeof(gnsid->cdev));
- gnsid->cdev[sizeof(gnsid->cdev) - 1] = '\0';
gnsid->nsid = ns->id;
break;
}
@@ -429,6 +428,7 @@ nvme_ns_split_bio(struct nvme_namespace *ns, struct bio *bp,
if (child_bios == NULL)
return (ENOMEM);
+ counter_u64_add(ns->ctrlr->alignment_splits, 1);
for (i = 0; i < num_bios; i++) {
child = child_bios[i];
err = nvme_ns_bio_process(ns, child, nvme_bio_child_done);
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 69141add4e48..8415819ca20b 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -32,6 +32,7 @@
#include <sys/param.h>
#include <sys/bio.h>
#include <sys/bus.h>
+#include <sys/counter.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
@@ -317,6 +318,9 @@ struct nvme_controller {
bus_dmamap_t hmb_desc_map;
struct nvme_hmb_desc *hmb_desc_vaddr;
uint64_t hmb_desc_paddr;
+
+ /* Statistics */
+ counter_u64_t alignment_splits;
};
#define nvme_mmio_offsetof(reg) \
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index 62d27e439180..5be6c151bbea 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -414,10 +414,12 @@ static void
nvme_qpair_complete_tracker(struct nvme_tracker *tr,
struct nvme_completion *cpl, error_print_t print_on_error)
{
- struct nvme_qpair * qpair = tr->qpair;
+ struct nvme_qpair *qpair = tr->qpair;
struct nvme_request *req;
bool retry, error, retriable;
+ mtx_assert(&qpair->lock, MA_NOTOWNED);
+
req = tr->req;
error = nvme_completion_is_error(cpl);
retriable = nvme_completion_is_retry(cpl);
@@ -486,10 +488,11 @@ nvme_qpair_manual_complete_tracker(
error_print_t print_on_error)
{
struct nvme_completion cpl;
+ struct nvme_qpair * qpair = tr->qpair;
- memset(&cpl, 0, sizeof(cpl));
+ mtx_assert(&qpair->lock, MA_NOTOWNED);
- struct nvme_qpair * qpair = tr->qpair;
+ memset(&cpl, 0, sizeof(cpl));
cpl.sqid = qpair->id;
cpl.cid = tr->cid;
@@ -950,27 +953,26 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair)
/*
* nvme_complete_tracker must be called without the qpair lock held. It
* takes the lock to adjust outstanding_tr list, so make sure we don't
- * have it yet (since this is a general purpose routine). We take the
- * lock to make the list traverse safe, but have to drop the lock to
- * complete any AER. We restart the list scan when we do this to make
- * this safe. There's interlock with the ISR so we know this tracker
- * won't be completed twice.
+ * have it yet. We need the lock to make the list traverse safe, but
+ * have to drop the lock to complete any AER. We restart the list scan
+ * when we do this to make this safe. There's interlock with the ISR so
+ * we know this tracker won't be completed twice.
*/
mtx_assert(&qpair->lock, MA_NOTOWNED);
mtx_lock(&qpair->lock);
tr = TAILQ_FIRST(&qpair->outstanding_tr);
while (tr != NULL) {
- if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) {
- mtx_unlock(&qpair->lock);
- nvme_qpair_manual_complete_tracker(tr,
- NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0,
- ERROR_PRINT_NONE);
- mtx_lock(&qpair->lock);
- tr = TAILQ_FIRST(&qpair->outstanding_tr);
- } else {
+ if (tr->req->cmd.opc != NVME_OPC_ASYNC_EVENT_REQUEST) {
tr = TAILQ_NEXT(tr, tailq);
+ continue;
}
+ mtx_unlock(&qpair->lock);
+ nvme_qpair_manual_complete_tracker(tr,
+ NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0,
+ ERROR_PRINT_NONE);
+ mtx_lock(&qpair->lock);
+ tr = TAILQ_FIRST(&qpair->outstanding_tr);
}
mtx_unlock(&qpair->lock);
}
@@ -1201,7 +1203,7 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr)
bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map,
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
- bus_space_write_4(qpair->ctrlr->bus_tag, qpair->ctrlr->bus_handle,
+ bus_space_write_4(ctrlr->bus_tag, ctrlr->bus_handle,
qpair->sq_tdbl_off, qpair->sq_tail);
qpair->num_cmds++;
}
@@ -1313,6 +1315,11 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req)
return;
}
+ /*
+ * tr->deadline updating when nvme_payload_map calls
+ * nvme_qpair_submit_tracker (we call it above directly
+ * when there's no map to load).
+ */
err = bus_dmamap_load_mem(tr->qpair->dma_tag_payload,
tr->payload_dma_map, &req->payload, nvme_payload_map, tr, 0);
if (err != 0) {
diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c
index f561756f99b7..2ba3df9ea6e8 100644
--- a/sys/dev/nvme/nvme_sim.c
+++ b/sys/dev/nvme/nvme_sim.c
@@ -203,7 +203,7 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb)
cpi->xport_specific.nvme.slot = pci_get_slot(dev);
cpi->xport_specific.nvme.function = pci_get_function(dev);
cpi->xport_specific.nvme.extra = 0;
- strncpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(dev),
+ strlcpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(dev),
sizeof(cpi->xport_specific.nvme.dev_name));
cpi->hba_vendor = pci_get_vendor(dev);
cpi->hba_device = pci_get_device(dev);
diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c
index d6452a2e5492..447f48e0bdd5 100644
--- a/sys/dev/nvme/nvme_sysctl.c
+++ b/sys/dev/nvme/nvme_sysctl.c
@@ -30,6 +30,7 @@
#include "opt_nvme.h"
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/sysctl.h>
@@ -419,4 +420,8 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr)
nvme_sysctl_initialize_queue(&ctrlr->ioq[i], ctrlr_ctx,
que_tree);
}
+
+ SYSCTL_ADD_COUNTER_U64(ctrlr_ctx, ctrlr_list, OID_AUTO, "alignment_splits",
+ CTLFLAG_RD, &ctrlr->alignment_splits,
+ "Number of times we split the I/O alignment for drives with preferred alignment");
}
diff --git a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c
new file mode 100644
index 000000000000..a203bb1c90a6
--- /dev/null
+++ b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c
@@ -0,0 +1,1123 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/dnv.h>
+#include <sys/jail.h>
+#include <sys/kernel.h>
+#include <sys/limits.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/memdesc.h>
+#include <sys/module.h>
+#include <sys/proc.h>
+#include <sys/queue.h>
+#include <sys/refcount.h>
+#include <sys/sbuf.h>
+#include <sys/sx.h>
+
+#include <machine/bus.h>
+#include <machine/bus_dma.h>
+
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/controller/nvmft_subr.h>
+#include <dev/nvmf/controller/nvmft_var.h>
+
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_error.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_frontend.h>
+
+/*
+ * Store pointers to the capsule and qpair in the two pointer members
+ * of CTL_PRIV_FRONTEND.
+ */
+#define NVMFT_NC(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[0])
+#define NVMFT_QP(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptrs[1])
+
+static void nvmft_done(union ctl_io *io);
+static int nvmft_init(void);
+static int nvmft_ioctl(struct cdev *cdev, u_long cmd, caddr_t data,
+ int flag, struct thread *td);
+static int nvmft_shutdown(void);
+
+static TAILQ_HEAD(, nvmft_port) nvmft_ports;
+static struct sx nvmft_ports_lock;
+
+MALLOC_DEFINE(M_NVMFT, "nvmft", "NVMe over Fabrics controller");
+
+static struct ctl_frontend nvmft_frontend = {
+ .name = "nvmf",
+ .init = nvmft_init,
+ .ioctl = nvmft_ioctl,
+ .fe_dump = NULL,
+ .shutdown = nvmft_shutdown,
+};
+
+static void
+nvmft_online(void *arg)
+{
+ struct nvmft_port *np = arg;
+
+ sx_xlock(&np->lock);
+ np->online = true;
+ sx_xunlock(&np->lock);
+}
+
+static void
+nvmft_offline(void *arg)
+{
+ struct nvmft_port *np = arg;
+ struct nvmft_controller *ctrlr;
+
+ sx_xlock(&np->lock);
+ np->online = false;
+
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ nvmft_printf(ctrlr,
+ "shutting down due to port going offline\n");
+ nvmft_controller_error(ctrlr, NULL, ENODEV);
+ }
+
+ while (!TAILQ_EMPTY(&np->controllers))
+ sx_sleep(np, &np->lock, 0, "nvmfoff", 0);
+ sx_xunlock(&np->lock);
+}
+
+static int
+nvmft_lun_enable(void *arg, int lun_id)
+{
+ struct nvmft_port *np = arg;
+ struct nvmft_controller *ctrlr;
+ uint32_t *old_ns, *new_ns;
+ uint32_t nsid;
+ u_int i;
+
+ if (lun_id >= le32toh(np->cdata.nn)) {
+ printf("NVMFT: %s lun %d larger than maximum nsid %u\n",
+ np->cdata.subnqn, lun_id, le32toh(np->cdata.nn));
+ return (EOPNOTSUPP);
+ }
+ nsid = lun_id + 1;
+
+ sx_xlock(&np->lock);
+ new_ns = mallocarray(np->num_ns + 1, sizeof(*new_ns), M_NVMFT,
+ M_WAITOK);
+ for (i = 0; i < np->num_ns; i++) {
+ if (np->active_ns[i] < nsid)
+ continue;
+ if (np->active_ns[i] == nsid) {
+ sx_xunlock(&np->lock);
+ free(new_ns, M_NVMFT);
+ printf("NVMFT: %s duplicate lun %d\n",
+ np->cdata.subnqn, lun_id);
+ return (EINVAL);
+ }
+ break;
+ }
+
+ /* Copy over IDs smaller than nsid. */
+ memcpy(new_ns, np->active_ns, i * sizeof(*np->active_ns));
+
+ /* Insert nsid. */
+ new_ns[i] = nsid;
+
+ /* Copy over IDs greater than nsid. */
+ memcpy(new_ns + i + 1, np->active_ns + i, (np->num_ns - i) *
+ sizeof(*np->active_ns));
+
+ np->num_ns++;
+ old_ns = np->active_ns;
+ np->active_ns = new_ns;
+
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ nvmft_controller_lun_changed(ctrlr, lun_id);
+ }
+
+ sx_xunlock(&np->lock);
+ free(old_ns, M_NVMFT);
+
+ return (0);
+}
+
+static int
+nvmft_lun_disable(void *arg, int lun_id)
+{
+ struct nvmft_port *np = arg;
+ struct nvmft_controller *ctrlr;
+ uint32_t nsid;
+ u_int i;
+
+ if (lun_id >= le32toh(np->cdata.nn))
+ return (0);
+ nsid = lun_id + 1;
+
+ sx_xlock(&np->lock);
+ for (i = 0; i < np->num_ns; i++) {
+ if (np->active_ns[i] == nsid)
+ goto found;
+ }
+ sx_xunlock(&np->lock);
+ printf("NVMFT: %s request to disable nonexistent lun %d\n",
+ np->cdata.subnqn, lun_id);
+ return (EINVAL);
+
+found:
+ /* Move down IDs greater than nsid. */
+ memmove(np->active_ns + i, np->active_ns + i + 1,
+ (np->num_ns - (i + 1)) * sizeof(*np->active_ns));
+ np->num_ns--;
+
+ /* NB: Don't bother freeing the old active_ns array. */
+
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ nvmft_controller_lun_changed(ctrlr, lun_id);
+ }
+
+ sx_xunlock(&np->lock);
+
+ return (0);
+}
+
+void
+nvmft_populate_active_nslist(struct nvmft_port *np, uint32_t nsid,
+ struct nvme_ns_list *nslist)
+{
+ u_int i, count;
+
+ sx_slock(&np->lock);
+ count = 0;
+ for (i = 0; i < np->num_ns; i++) {
+ if (np->active_ns[i] <= nsid)
+ continue;
+ nslist->ns[count] = htole32(np->active_ns[i]);
+ count++;
+ if (count == nitems(nslist->ns))
+ break;
+ }
+ sx_sunlock(&np->lock);
+}
+
+void
+nvmft_dispatch_command(struct nvmft_qpair *qp, struct nvmf_capsule *nc,
+ bool admin)
+{
+ struct nvmft_controller *ctrlr = nvmft_qpair_ctrlr(qp);
+ const struct nvme_command *cmd = nvmf_capsule_sqe(nc);
+ struct nvmft_port *np = ctrlr->np;
+ union ctl_io *io;
+ int error;
+
+ if (cmd->nsid == htole32(0)) {
+ nvmft_send_generic_error(qp, nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ mtx_lock(&ctrlr->lock);
+ if (ctrlr->pending_commands == 0)
+ ctrlr->start_busy = sbinuptime();
+ ctrlr->pending_commands++;
+ mtx_unlock(&ctrlr->lock);
+ io = ctl_alloc_io(np->port.ctl_pool_ref);
+ ctl_zero_io(io);
+ NVMFT_NC(io) = nc;
+ NVMFT_QP(io) = qp;
+ io->io_hdr.io_type = admin ? CTL_IO_NVME_ADMIN : CTL_IO_NVME;
+ io->io_hdr.nexus.initid = ctrlr->cntlid;
+ io->io_hdr.nexus.targ_port = np->port.targ_port;
+ io->io_hdr.nexus.targ_lun = le32toh(cmd->nsid) - 1;
+ io->nvmeio.cmd = *cmd;
+ error = ctl_run(io);
+ if (error != 0) {
+ nvmft_printf(ctrlr, "ctl_run failed for command on %s: %d\n",
+ nvmft_qpair_name(qp), error);
+ ctl_nvme_set_generic_error(&io->nvmeio,
+ NVME_SC_INTERNAL_DEVICE_ERROR);
+ nvmft_done(io);
+
+ nvmft_controller_error(ctrlr, qp, ENXIO);
+ }
+}
+
+void
+nvmft_terminate_commands(struct nvmft_controller *ctrlr)
+{
+ struct nvmft_port *np = ctrlr->np;
+ union ctl_io *io;
+ int error;
+
+ mtx_lock(&ctrlr->lock);
+ if (ctrlr->pending_commands == 0)
+ ctrlr->start_busy = sbinuptime();
+ ctrlr->pending_commands++;
+ mtx_unlock(&ctrlr->lock);
+ io = ctl_alloc_io(np->port.ctl_pool_ref);
+ ctl_zero_io(io);
+ NVMFT_QP(io) = ctrlr->admin;
+ io->io_hdr.io_type = CTL_IO_TASK;
+ io->io_hdr.nexus.initid = ctrlr->cntlid;
+ io->io_hdr.nexus.targ_port = np->port.targ_port;
+ io->io_hdr.nexus.targ_lun = 0;
+ io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX: unused? */
+ io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET;
+ error = ctl_run(io);
+ if (error != CTL_RETVAL_COMPLETE) {
+ nvmft_printf(ctrlr, "failed to terminate tasks: %d\n", error);
+#ifdef INVARIANTS
+ io->io_hdr.status = CTL_SUCCESS;
+#endif
+ nvmft_done(io);
+ }
+}
+
+static void
+nvmft_datamove_out_cb(void *arg, size_t xfered, int error)
+{
+ struct ctl_nvmeio *ctnio = arg;
+
+ if (error != 0) {
+ ctl_nvme_set_data_transfer_error(ctnio);
+ } else {
+ MPASS(xfered == ctnio->kern_data_len);
+ ctnio->kern_data_resid -= xfered;
+ }
+
+ if (ctnio->kern_sg_entries) {
+ free(ctnio->ext_data_ptr, M_NVMFT);
+ ctnio->ext_data_ptr = NULL;
+ } else
+ MPASS(ctnio->ext_data_ptr == NULL);
+ ctl_datamove_done((union ctl_io *)ctnio, false);
+}
+
+static void
+nvmft_datamove_out(struct ctl_nvmeio *ctnio, struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc)
+{
+ struct memdesc mem;
+ int error;
+
+ MPASS(ctnio->ext_data_ptr == NULL);
+ if (ctnio->kern_sg_entries > 0) {
+ struct ctl_sg_entry *sgl;
+ struct bus_dma_segment *vlist;
+
+ vlist = mallocarray(ctnio->kern_sg_entries, sizeof(*vlist),
+ M_NVMFT, M_WAITOK);
+ ctnio->ext_data_ptr = (void *)vlist;
+ sgl = (struct ctl_sg_entry *)ctnio->kern_data_ptr;
+ for (u_int i = 0; i < ctnio->kern_sg_entries; i++) {
+ vlist[i].ds_addr = (uintptr_t)sgl[i].addr;
+ vlist[i].ds_len = sgl[i].len;
+ }
+ mem = memdesc_vlist(vlist, ctnio->kern_sg_entries);
+ } else
+ mem = memdesc_vaddr(ctnio->kern_data_ptr, ctnio->kern_data_len);
+
+ error = nvmf_receive_controller_data(nc, ctnio->kern_rel_offset, &mem,
+ ctnio->kern_data_len, nvmft_datamove_out_cb, ctnio);
+ if (error == 0)
+ return;
+
+ nvmft_printf(nvmft_qpair_ctrlr(qp),
+ "Failed to request capsule data: %d\n", error);
+ ctl_nvme_set_data_transfer_error(ctnio);
+
+ if (ctnio->kern_sg_entries) {
+ free(ctnio->ext_data_ptr, M_NVMFT);
+ ctnio->ext_data_ptr = NULL;
+ } else
+ MPASS(ctnio->ext_data_ptr == NULL);
+ ctl_datamove_done((union ctl_io *)ctnio, true);
+}
+
+static struct mbuf *
+nvmft_copy_data(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_sg_entry *sgl;
+ struct mbuf *m0, *m;
+ uint32_t resid, off, todo;
+ int mlen;
+
+ MPASS(ctnio->kern_data_len != 0);
+
+ m0 = m_getm2(NULL, ctnio->kern_data_len, M_WAITOK, MT_DATA, 0);
+
+ if (ctnio->kern_sg_entries == 0) {
+ m_copyback(m0, 0, ctnio->kern_data_len, ctnio->kern_data_ptr);
+ return (m0);
+ }
+
+ resid = ctnio->kern_data_len;
+ sgl = (struct ctl_sg_entry *)ctnio->kern_data_ptr;
+ off = 0;
+ m = m0;
+ mlen = M_TRAILINGSPACE(m);
+ for (;;) {
+ todo = MIN(mlen, sgl->len - off);
+ memcpy(mtod(m, char *) + m->m_len, (char *)sgl->addr + off,
+ todo);
+ m->m_len += todo;
+ resid -= todo;
+ if (resid == 0) {
+ MPASS(m->m_next == NULL);
+ break;
+ }
+
+ off += todo;
+ if (off == sgl->len) {
+ sgl++;
+ off = 0;
+ }
+ mlen -= todo;
+ if (mlen == 0) {
+ m = m->m_next;
+ mlen = M_TRAILINGSPACE(m);
+ }
+ }
+
+ return (m0);
+}
+
+static void
+m_free_ref_data(struct mbuf *m)
+{
+ ctl_ref kern_data_ref = m->m_ext.ext_arg1;
+
+ kern_data_ref(m->m_ext.ext_arg2, -1);
+}
+
+static struct mbuf *
+m_get_ref_data(struct ctl_nvmeio *ctnio, void *buf, u_int size)
+{
+ struct mbuf *m;
+
+ m = m_get(M_WAITOK, MT_DATA);
+ m_extadd(m, buf, size, m_free_ref_data, ctnio->kern_data_ref,
+ ctnio->kern_data_arg, M_RDONLY, EXT_CTL);
+ m->m_len = size;
+ ctnio->kern_data_ref(ctnio->kern_data_arg, 1);
+ return (m);
+}
+
+static struct mbuf *
+nvmft_ref_data(struct ctl_nvmeio *ctnio)
+{
+ struct ctl_sg_entry *sgl;
+ struct mbuf *m0, *m;
+
+ MPASS(ctnio->kern_data_len != 0);
+
+ if (ctnio->kern_sg_entries == 0)
+ return (m_get_ref_data(ctnio, ctnio->kern_data_ptr,
+ ctnio->kern_data_len));
+
+ sgl = (struct ctl_sg_entry *)ctnio->kern_data_ptr;
+ m0 = m_get_ref_data(ctnio, sgl[0].addr, sgl[0].len);
+ m = m0;
+ for (u_int i = 1; i < ctnio->kern_sg_entries; i++) {
+ m->m_next = m_get_ref_data(ctnio, sgl[i].addr, sgl[i].len);
+ m = m->m_next;
+ }
+ return (m0);
+}
+
+static void
+nvmft_datamove_in(struct ctl_nvmeio *ctnio, struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc)
+{
+ struct mbuf *m;
+ u_int status;
+
+ if (ctnio->kern_data_ref != NULL)
+ m = nvmft_ref_data(ctnio);
+ else
+ m = nvmft_copy_data(ctnio);
+ status = nvmf_send_controller_data(nc, ctnio->kern_rel_offset, m,
+ ctnio->kern_data_len);
+ switch (status) {
+ case NVMF_SUCCESS_SENT:
+ ctnio->success_sent = true;
+ nvmft_command_completed(qp, nc);
+ /* FALLTHROUGH */
+ case NVMF_MORE:
+ case NVME_SC_SUCCESS:
+ break;
+ default:
+ ctl_nvme_set_generic_error(ctnio, status);
+ break;
+ }
+ ctl_datamove_done((union ctl_io *)ctnio, true);
+}
+
+static void
+nvmft_datamove(union ctl_io *io)
+{
+ struct nvmf_capsule *nc;
+ struct nvmft_qpair *qp;
+
+ /* Some CTL commands preemptively set a success status. */
+ MPASS(io->io_hdr.status == CTL_STATUS_NONE ||
+ io->io_hdr.status == CTL_SUCCESS);
+ MPASS(!io->nvmeio.success_sent);
+
+ nc = NVMFT_NC(io);
+ qp = NVMFT_QP(io);
+
+ if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN)
+ nvmft_datamove_in(&io->nvmeio, qp, nc);
+ else
+ nvmft_datamove_out(&io->nvmeio, qp, nc);
+}
+
+static void
+hip_add(uint64_t pair[2], uint64_t addend)
+{
+ uint64_t old, new;
+
+ old = le64toh(pair[0]);
+ new = old + addend;
+ pair[0] = htole64(new);
+ if (new < old)
+ pair[1] += htole64(1);
+}
+
+static void
+nvmft_done(union ctl_io *io)
+{
+ struct nvmft_controller *ctrlr;
+ const struct nvme_command *cmd;
+ struct nvmft_qpair *qp;
+ struct nvmf_capsule *nc;
+ size_t len;
+
+ KASSERT(io->io_hdr.status == CTL_SUCCESS ||
+ io->io_hdr.status == CTL_NVME_ERROR,
+ ("%s: bad status %u", __func__, io->io_hdr.status));
+
+ nc = NVMFT_NC(io);
+ qp = NVMFT_QP(io);
+ ctrlr = nvmft_qpair_ctrlr(qp);
+
+ if (nc == NULL) {
+ /* Completion of nvmft_terminate_commands. */
+ goto end;
+ }
+
+ cmd = nvmf_capsule_sqe(nc);
+
+ if (io->io_hdr.status == CTL_SUCCESS)
+ len = nvmf_capsule_data_len(nc) / 512;
+ else
+ len = 0;
+ switch (cmd->opc) {
+ case NVME_OPC_WRITE:
+ mtx_lock(&ctrlr->lock);
+ hip_add(ctrlr->hip.host_write_commands, 1);
+ len += ctrlr->partial_duw;
+ if (len > 1000)
+ hip_add(ctrlr->hip.data_units_written, len / 1000);
+ ctrlr->partial_duw = len % 1000;
+ mtx_unlock(&ctrlr->lock);
+ break;
+ case NVME_OPC_READ:
+ case NVME_OPC_COMPARE:
+ case NVME_OPC_VERIFY:
+ mtx_lock(&ctrlr->lock);
+ if (cmd->opc != NVME_OPC_VERIFY)
+ hip_add(ctrlr->hip.host_read_commands, 1);
+ len += ctrlr->partial_dur;
+ if (len > 1000)
+ hip_add(ctrlr->hip.data_units_read, len / 1000);
+ ctrlr->partial_dur = len % 1000;
+ mtx_unlock(&ctrlr->lock);
+ break;
+ }
+
+ if (io->nvmeio.success_sent) {
+ MPASS(io->io_hdr.status == CTL_SUCCESS);
+ } else {
+ io->nvmeio.cpl.cid = cmd->cid;
+ nvmft_send_response(qp, &io->nvmeio.cpl);
+ }
+ nvmf_free_capsule(nc);
+end:
+ ctl_free_io(io);
+ mtx_lock(&ctrlr->lock);
+ ctrlr->pending_commands--;
+ if (ctrlr->pending_commands == 0)
+ ctrlr->busy_total += sbinuptime() - ctrlr->start_busy;
+ mtx_unlock(&ctrlr->lock);
+}
+
+static int
+nvmft_init(void)
+{
+ TAILQ_INIT(&nvmft_ports);
+ sx_init(&nvmft_ports_lock, "nvmft ports");
+ return (0);
+}
+
+void
+nvmft_port_free(struct nvmft_port *np)
+{
+ KASSERT(TAILQ_EMPTY(&np->controllers),
+ ("%s(%p): active controllers", __func__, np));
+
+ if (np->port.targ_port != -1) {
+ if (ctl_port_deregister(&np->port) != 0)
+ printf("%s: ctl_port_deregister() failed\n", __func__);
+ }
+
+ free(np->active_ns, M_NVMFT);
+ clean_unrhdr(np->ids);
+ delete_unrhdr(np->ids);
+ sx_destroy(&np->lock);
+ free(np, M_NVMFT);
+}
+
+static struct nvmft_port *
+nvmft_port_find(const char *subnqn)
+{
+ struct nvmft_port *np;
+
+ KASSERT(nvmf_nqn_valid(subnqn), ("%s: invalid nqn", __func__));
+
+ sx_assert(&nvmft_ports_lock, SA_LOCKED);
+ TAILQ_FOREACH(np, &nvmft_ports, link) {
+ if (strcmp(np->cdata.subnqn, subnqn) == 0)
+ break;
+ }
+ return (np);
+}
+
+static struct nvmft_port *
+nvmft_port_find_by_id(int port_id)
+{
+ struct nvmft_port *np;
+
+ sx_assert(&nvmft_ports_lock, SA_LOCKED);
+ TAILQ_FOREACH(np, &nvmft_ports, link) {
+ if (np->port.targ_port == port_id)
+ break;
+ }
+ return (np);
+}
+
+/*
+ * Helper function to fetch a number stored as a string in an nv_list.
+ * Returns false if the string was not a valid number.
+ */
+static bool
+dnvlist_get_strnum(nvlist_t *nvl, const char *name, u_long default_value,
+ u_long *value)
+{
+ const char *str;
+ char *cp;
+
+ str = dnvlist_get_string(nvl, name, NULL);
+ if (str == NULL) {
+ *value = default_value;
+ return (true);
+ }
+ if (*str == '\0')
+ return (false);
+ *value = strtoul(str, &cp, 0);
+ if (*cp != '\0')
+ return (false);
+ return (true);
+}
+
+/*
+ * NVMeoF ports support the following parameters:
+ *
+ * Mandatory:
+ *
+ * subnqn: subsystem NVMe Qualified Name
+ * portid: integer port ID from Discovery Log Page entry
+ *
+ * Optional:
+ * serial: Serial Number string
+ * max_io_qsize: Maximum number of I/O queue entries
+ * enable_timeout: Timeout for controller enable in milliseconds
+ * ioccsz: Maximum command capsule size
+ * iorcsz: Maximum response capsule size
+ * nn: Number of namespaces
+ */
+static void
+nvmft_port_create(struct ctl_req *req)
+{
+ struct nvmft_port *np;
+ struct ctl_port *port;
+ const char *serial, *subnqn;
+ char serial_buf[NVME_SERIAL_NUMBER_LENGTH];
+ u_long enable_timeout, hostid, ioccsz, iorcsz, max_io_qsize, nn, portid;
+ int error;
+
+ /* Required parameters. */
+ subnqn = dnvlist_get_string(req->args_nvl, "subnqn", NULL);
+ if (subnqn == NULL || !nvlist_exists_string(req->args_nvl, "portid")) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Missing required argument");
+ return;
+ }
+ if (!nvmf_nqn_valid(subnqn)) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid SubNQN");
+ return;
+ }
+ if (!dnvlist_get_strnum(req->args_nvl, "portid", UINT16_MAX, &portid) ||
+ portid > UINT16_MAX) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid port ID");
+ return;
+ }
+
+ /* Optional parameters. */
+ if (!dnvlist_get_strnum(req->args_nvl, "max_io_qsize",
+ NVMF_MAX_IO_ENTRIES, &max_io_qsize) ||
+ max_io_qsize < NVME_MIN_IO_ENTRIES ||
+ max_io_qsize > NVME_MAX_IO_ENTRIES) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid maximum I/O queue size");
+ return;
+ }
+
+ if (!dnvlist_get_strnum(req->args_nvl, "enable_timeout",
+ NVMF_CC_EN_TIMEOUT * 500, &enable_timeout) ||
+ (enable_timeout % 500) != 0 || (enable_timeout / 500) > 255) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid enable timeout");
+ return;
+ }
+
+ if (!dnvlist_get_strnum(req->args_nvl, "ioccsz", NVMF_IOCCSZ,
+ &ioccsz) || ioccsz < sizeof(struct nvme_command) ||
+ (ioccsz % 16) != 0) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid Command Capsule size");
+ return;
+ }
+
+ if (!dnvlist_get_strnum(req->args_nvl, "iorcsz", NVMF_IORCSZ,
+ &iorcsz) || iorcsz < sizeof(struct nvme_completion) ||
+ (iorcsz % 16) != 0) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid Response Capsule size");
+ return;
+ }
+
+ if (!dnvlist_get_strnum(req->args_nvl, "nn", NVMF_NN, &nn) ||
+ nn < 1 || nn > UINT32_MAX) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid number of namespaces");
+ return;
+ }
+
+ serial = dnvlist_get_string(req->args_nvl, "serial", NULL);
+ if (serial == NULL) {
+ getcredhostid(curthread->td_ucred, &hostid);
+ nvmf_controller_serial(serial_buf, sizeof(serial_buf), hostid);
+ serial = serial_buf;
+ }
+
+ sx_xlock(&nvmft_ports_lock);
+
+ np = nvmft_port_find(subnqn);
+ if (np != NULL) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "SubNQN \"%s\" already exists", subnqn);
+ sx_xunlock(&nvmft_ports_lock);
+ return;
+ }
+
+ np = malloc(sizeof(*np), M_NVMFT, M_WAITOK | M_ZERO);
+ refcount_init(&np->refs, 1);
+ np->max_io_qsize = max_io_qsize;
+ np->cap = _nvmf_controller_cap(max_io_qsize, enable_timeout / 500);
+ sx_init(&np->lock, "nvmft port");
+ np->ids = new_unrhdr(0, MIN(CTL_MAX_INIT_PER_PORT - 1,
+ NVMF_CNTLID_STATIC_MAX), UNR_NO_MTX);
+ TAILQ_INIT(&np->controllers);
+
+ /* The controller ID is set later for individual controllers. */
+ _nvmf_init_io_controller_data(0, max_io_qsize, serial, ostype,
+ osrelease, subnqn, nn, ioccsz, iorcsz, &np->cdata);
+ np->cdata.aerl = NVMFT_NUM_AER - 1;
+ np->cdata.oaes = htole32(NVME_ASYNC_EVENT_NS_ATTRIBUTE);
+ np->cdata.oncs = htole16(NVMEF(NVME_CTRLR_DATA_ONCS_VERIFY, 1) |
+ NVMEF(NVME_CTRLR_DATA_ONCS_WRZERO, 1) |
+ NVMEF(NVME_CTRLR_DATA_ONCS_DSM, 1) |
+ NVMEF(NVME_CTRLR_DATA_ONCS_COMPARE, 1));
+ np->cdata.fuses = NVMEF(NVME_CTRLR_DATA_FUSES_CNW, 1);
+
+ np->fp.afi = NVMEF(NVME_FIRMWARE_PAGE_AFI_SLOT, 1);
+ memcpy(np->fp.revision[0], np->cdata.fr, sizeof(np->cdata.fr));
+
+ port = &np->port;
+
+ port->frontend = &nvmft_frontend;
+ port->port_type = CTL_PORT_NVMF;
+ port->num_requested_ctl_io = max_io_qsize;
+ port->port_name = "nvmf";
+ port->physical_port = portid;
+ port->virtual_port = 0;
+ port->port_online = nvmft_online;
+ port->port_offline = nvmft_offline;
+ port->onoff_arg = np;
+ port->lun_enable = nvmft_lun_enable;
+ port->lun_disable = nvmft_lun_disable;
+ port->targ_lun_arg = np;
+ port->fe_datamove = nvmft_datamove;
+ port->fe_done = nvmft_done;
+ port->targ_port = -1;
+ port->options = nvlist_clone(req->args_nvl);
+
+ error = ctl_port_register(port);
+ if (error != 0) {
+ sx_xunlock(&nvmft_ports_lock);
+ nvlist_destroy(port->options);
+ nvmft_port_rele(np);
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Failed to register CTL port with error %d", error);
+ return;
+ }
+
+ TAILQ_INSERT_TAIL(&nvmft_ports, np, link);
+ sx_xunlock(&nvmft_ports_lock);
+
+ req->status = CTL_LUN_OK;
+ req->result_nvl = nvlist_create(0);
+ nvlist_add_number(req->result_nvl, "port_id", port->targ_port);
+}
+
+static void
+nvmft_port_remove(struct ctl_req *req)
+{
+ struct nvmft_port *np;
+ const char *subnqn;
+ u_long port_id;
+
+ /*
+ * ctladm port -r just provides the port_id, so permit looking
+ * up a port either by "subnqn" or "port_id".
+ */
+ port_id = ULONG_MAX;
+ subnqn = dnvlist_get_string(req->args_nvl, "subnqn", NULL);
+ if (subnqn == NULL) {
+ if (!nvlist_exists_string(req->args_nvl, "port_id")) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Missing required argument");
+ return;
+ }
+ if (!dnvlist_get_strnum(req->args_nvl, "port_id", ULONG_MAX,
+ &port_id)) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Invalid CTL port ID");
+ return;
+ }
+ } else {
+ if (nvlist_exists_string(req->args_nvl, "port_id")) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Ambiguous port removal request");
+ return;
+ }
+ }
+
+ sx_xlock(&nvmft_ports_lock);
+
+ if (subnqn != NULL) {
+ np = nvmft_port_find(subnqn);
+ if (np == NULL) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "SubNQN \"%s\" does not exist", subnqn);
+ sx_xunlock(&nvmft_ports_lock);
+ return;
+ }
+ } else {
+ np = nvmft_port_find_by_id(port_id);
+ if (np == NULL) {
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "CTL port %lu is not a NVMF port", port_id);
+ sx_xunlock(&nvmft_ports_lock);
+ return;
+ }
+ }
+
+ TAILQ_REMOVE(&nvmft_ports, np, link);
+ sx_xunlock(&nvmft_ports_lock);
+
+ ctl_port_offline(&np->port);
+ nvmft_port_rele(np);
+ req->status = CTL_LUN_OK;
+}
+
+static void
+nvmft_handoff(struct ctl_nvmf *cn)
+{
+ struct nvmf_fabric_connect_cmd cmd;
+ struct nvmf_handoff_controller_qpair *handoff;
+ struct nvmf_fabric_connect_data *data;
+ struct nvmft_port *np;
+ int error;
+
+ np = NULL;
+ data = NULL;
+ handoff = &cn->data.handoff;
+ error = copyin(handoff->cmd, &cmd, sizeof(cmd));
+ if (error != 0) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Failed to copyin CONNECT SQE");
+ return;
+ }
+
+ data = malloc(sizeof(*data), M_NVMFT, M_WAITOK);
+ error = copyin(handoff->data, data, sizeof(*data));
+ if (error != 0) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Failed to copyin CONNECT data");
+ goto out;
+ }
+
+ if (!nvmf_nqn_valid(data->subnqn)) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Invalid SubNQN");
+ goto out;
+ }
+
+ sx_slock(&nvmft_ports_lock);
+ np = nvmft_port_find(data->subnqn);
+ if (np == NULL) {
+ sx_sunlock(&nvmft_ports_lock);
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Unknown SubNQN");
+ goto out;
+ }
+ if (!np->online) {
+ sx_sunlock(&nvmft_ports_lock);
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "CTL port offline");
+ np = NULL;
+ goto out;
+ }
+ nvmft_port_ref(np);
+ sx_sunlock(&nvmft_ports_lock);
+
+ if (handoff->params.admin) {
+ error = nvmft_handoff_admin_queue(np, handoff, &cmd, data);
+ if (error != 0) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Failed to handoff admin queue: %d", error);
+ goto out;
+ }
+ } else {
+ error = nvmft_handoff_io_queue(np, handoff, &cmd, data);
+ if (error != 0) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Failed to handoff admin queue: %d", error);
+ goto out;
+ }
+ }
+
+ cn->status = CTL_NVMF_OK;
+out:
+ if (np != NULL)
+ nvmft_port_rele(np);
+ free(data, M_NVMFT);
+}
+
+static void
+nvmft_list(struct ctl_nvmf *cn)
+{
+ struct ctl_nvmf_list_params *lp;
+ struct nvmft_controller *ctrlr;
+ struct nvmft_port *np;
+ struct sbuf *sb;
+ int error;
+
+ lp = &cn->data.list;
+
+ sb = sbuf_new(NULL, NULL, lp->alloc_len, SBUF_FIXEDLEN |
+ SBUF_INCLUDENUL);
+ if (sb == NULL) {
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Failed to allocate NVMeoF session list");
+ return;
+ }
+
+ sbuf_printf(sb, "<ctlnvmflist>\n");
+ sx_slock(&nvmft_ports_lock);
+ TAILQ_FOREACH(np, &nvmft_ports, link) {
+ sx_slock(&np->lock);
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ sbuf_printf(sb, "<connection id=\"%d\">"
+ "<hostnqn>%s</hostnqn>"
+ "<subnqn>%s</subnqn>"
+ "<trtype>%u</trtype>"
+ "</connection>\n",
+ ctrlr->cntlid,
+ ctrlr->hostnqn,
+ np->cdata.subnqn,
+ ctrlr->trtype);
+ }
+ sx_sunlock(&np->lock);
+ }
+ sx_sunlock(&nvmft_ports_lock);
+ sbuf_printf(sb, "</ctlnvmflist>\n");
+ if (sbuf_finish(sb) != 0) {
+ sbuf_delete(sb);
+ cn->status = CTL_NVMF_LIST_NEED_MORE_SPACE;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Out of space, %d bytes is too small", lp->alloc_len);
+ return;
+ }
+
+ error = copyout(sbuf_data(sb), lp->conn_xml, sbuf_len(sb));
+ if (error != 0) {
+ sbuf_delete(sb);
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Failed to copyout session list: %d", error);
+ return;
+ }
+ lp->fill_len = sbuf_len(sb);
+ cn->status = CTL_NVMF_OK;
+ sbuf_delete(sb);
+}
+
+static void
+nvmft_terminate(struct ctl_nvmf *cn)
+{
+ struct ctl_nvmf_terminate_params *tp;
+ struct nvmft_controller *ctrlr;
+ struct nvmft_port *np;
+ bool found, match;
+
+ tp = &cn->data.terminate;
+
+ found = false;
+ sx_slock(&nvmft_ports_lock);
+ TAILQ_FOREACH(np, &nvmft_ports, link) {
+ sx_slock(&np->lock);
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ if (tp->all != 0)
+ match = true;
+ else if (tp->cntlid != -1)
+ match = tp->cntlid == ctrlr->cntlid;
+ else if (tp->hostnqn[0] != '\0')
+ match = strncmp(tp->hostnqn, ctrlr->hostnqn,
+ sizeof(tp->hostnqn)) == 0;
+ else
+ match = false;
+ if (!match)
+ continue;
+ nvmft_printf(ctrlr,
+ "disconnecting due to administrative request\n");
+ nvmft_controller_error(ctrlr, NULL, ECONNABORTED);
+ found = true;
+ }
+ sx_sunlock(&np->lock);
+ }
+ sx_sunlock(&nvmft_ports_lock);
+
+ if (!found) {
+ cn->status = CTL_NVMF_ASSOCIATION_NOT_FOUND;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "No matching associations found");
+ return;
+ }
+ cn->status = CTL_NVMF_OK;
+}
+
+static int
+nvmft_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flag,
+ struct thread *td)
+{
+ struct ctl_nvmf *cn;
+ struct ctl_req *req;
+
+ switch (cmd) {
+ case CTL_PORT_REQ:
+ req = (struct ctl_req *)data;
+ switch (req->reqtype) {
+ case CTL_REQ_CREATE:
+ nvmft_port_create(req);
+ break;
+ case CTL_REQ_REMOVE:
+ nvmft_port_remove(req);
+ break;
+ default:
+ req->status = CTL_LUN_ERROR;
+ snprintf(req->error_str, sizeof(req->error_str),
+ "Unsupported request type %d", req->reqtype);
+ break;
+ }
+ return (0);
+ case CTL_NVMF:
+ cn = (struct ctl_nvmf *)data;
+ switch (cn->type) {
+ case CTL_NVMF_HANDOFF:
+ nvmft_handoff(cn);
+ break;
+ case CTL_NVMF_LIST:
+ nvmft_list(cn);
+ break;
+ case CTL_NVMF_TERMINATE:
+ nvmft_terminate(cn);
+ break;
+ default:
+ cn->status = CTL_NVMF_ERROR;
+ snprintf(cn->error_str, sizeof(cn->error_str),
+ "Invalid NVMeoF request type %d", cn->type);
+ break;
+ }
+ return (0);
+ default:
+ return (ENOTTY);
+ }
+}
+
+static int
+nvmft_shutdown(void)
+{
+ /* TODO: Need to check for active controllers. */
+ if (!TAILQ_EMPTY(&nvmft_ports))
+ return (EBUSY);
+
+ sx_destroy(&nvmft_ports_lock);
+ return (0);
+}
+
+CTL_FRONTEND_DECLARE(nvmft, nvmft_frontend);
+MODULE_DEPEND(nvmft, nvmf_transport, 1, 1, 1);
diff --git a/sys/dev/nvmf/controller/nvmft_controller.c b/sys/dev/nvmf/controller/nvmft_controller.c
new file mode 100644
index 000000000000..f3783eac1275
--- /dev/null
+++ b/sys/dev/nvmf/controller/nvmft_controller.c
@@ -0,0 +1,1130 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/callout.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/memdesc.h>
+#include <sys/mutex.h>
+#include <sys/sbuf.h>
+#include <sys/sx.h>
+#include <sys/taskqueue.h>
+
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/controller/nvmft_subr.h>
+#include <dev/nvmf/controller/nvmft_var.h>
+
+static void nvmft_controller_shutdown(void *arg, int pending);
+static void nvmft_controller_terminate(void *arg, int pending);
+
+int
+nvmft_printf(struct nvmft_controller *ctrlr, const char *fmt, ...)
+{
+ char buf[128];
+ struct sbuf sb;
+ va_list ap;
+ size_t retval;
+
+ sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN);
+ sbuf_set_drain(&sb, sbuf_printf_drain, &retval);
+
+ sbuf_printf(&sb, "nvmft%u: ", ctrlr->cntlid);
+
+ va_start(ap, fmt);
+ sbuf_vprintf(&sb, fmt, ap);
+ va_end(ap);
+
+ sbuf_finish(&sb);
+ sbuf_delete(&sb);
+
+ return (retval);
+}
+
+static struct nvmft_controller *
+nvmft_controller_alloc(struct nvmft_port *np, uint16_t cntlid,
+ const struct nvmf_fabric_connect_data *data)
+{
+ struct nvmft_controller *ctrlr;
+
+ ctrlr = malloc(sizeof(*ctrlr), M_NVMFT, M_WAITOK | M_ZERO);
+ ctrlr->cntlid = cntlid;
+ nvmft_port_ref(np);
+ TAILQ_INSERT_TAIL(&np->controllers, ctrlr, link);
+ ctrlr->np = np;
+ mtx_init(&ctrlr->lock, "nvmft controller", NULL, MTX_DEF);
+ callout_init(&ctrlr->ka_timer, 1);
+ TASK_INIT(&ctrlr->shutdown_task, 0, nvmft_controller_shutdown, ctrlr);
+ TIMEOUT_TASK_INIT(taskqueue_thread, &ctrlr->terminate_task, 0,
+ nvmft_controller_terminate, ctrlr);
+
+ ctrlr->cdata = np->cdata;
+ ctrlr->cdata.ctrlr_id = htole16(cntlid);
+ memcpy(ctrlr->hostid, data->hostid, sizeof(ctrlr->hostid));
+ memcpy(ctrlr->hostnqn, data->hostnqn, sizeof(ctrlr->hostnqn));
+ ctrlr->hip.power_cycles[0] = 1;
+ ctrlr->create_time = sbinuptime();
+
+ ctrlr->changed_ns = malloc(sizeof(*ctrlr->changed_ns), M_NVMFT,
+ M_WAITOK | M_ZERO);
+
+ return (ctrlr);
+}
+
+static void
+nvmft_controller_free(struct nvmft_controller *ctrlr)
+{
+ mtx_destroy(&ctrlr->lock);
+ MPASS(ctrlr->io_qpairs == NULL);
+ free(ctrlr->changed_ns, M_NVMFT);
+ free(ctrlr, M_NVMFT);
+}
+
+static void
+nvmft_keep_alive_timer(void *arg)
+{
+ struct nvmft_controller *ctrlr = arg;
+ int traffic;
+
+ if (ctrlr->shutdown)
+ return;
+
+ traffic = atomic_readandclear_int(&ctrlr->ka_active_traffic);
+ if (traffic == 0) {
+ nvmft_printf(ctrlr,
+ "disconnecting due to KeepAlive timeout\n");
+ nvmft_controller_error(ctrlr, NULL, ETIMEDOUT);
+ return;
+ }
+
+ callout_schedule_sbt(&ctrlr->ka_timer, ctrlr->ka_sbt, 0, C_HARDCLOCK);
+}
+
+int
+nvmft_handoff_admin_queue(struct nvmft_port *np,
+ const struct nvmf_handoff_controller_qpair *handoff,
+ const struct nvmf_fabric_connect_cmd *cmd,
+ const struct nvmf_fabric_connect_data *data)
+{
+ struct nvmft_controller *ctrlr;
+ struct nvmft_qpair *qp;
+ uint32_t kato;
+ int cntlid;
+
+ if (cmd->qid != htole16(0))
+ return (EINVAL);
+
+ qp = nvmft_qpair_init(handoff->trtype, &handoff->params, 0,
+ "admin queue");
+
+ sx_xlock(&np->lock);
+ cntlid = alloc_unr(np->ids);
+ if (cntlid == -1) {
+ sx_xunlock(&np->lock);
+ printf("NVMFT: Unable to allocate controller for %.*s\n",
+ (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_error(qp, cmd, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_INVALID_HOST);
+ nvmft_qpair_destroy(qp);
+ return (ENOMEM);
+ }
+
+#ifdef INVARIANTS
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ KASSERT(ctrlr->cntlid != cntlid,
+ ("%s: duplicate controllers with id %d", __func__, cntlid));
+ }
+#endif
+
+ ctrlr = nvmft_controller_alloc(np, cntlid, data);
+ nvmft_printf(ctrlr, "associated with %.*s\n",
+ (int)sizeof(data->hostnqn), data->hostnqn);
+ ctrlr->admin = qp;
+ ctrlr->trtype = handoff->trtype;
+
+ /*
+ * The spec requires a non-zero KeepAlive timer, but allow a
+ * zero KATO value to match Linux.
+ */
+ kato = le32toh(cmd->kato);
+ if (kato != 0) {
+ /*
+ * Round up to 1 second matching granularity
+ * advertised in cdata.
+ */
+ ctrlr->ka_sbt = mstosbt(roundup(kato, 1000));
+ callout_reset_sbt(&ctrlr->ka_timer, ctrlr->ka_sbt, 0,
+ nvmft_keep_alive_timer, ctrlr, C_HARDCLOCK);
+ }
+
+ nvmft_finish_accept(qp, cmd, ctrlr);
+ sx_xunlock(&np->lock);
+
+ return (0);
+}
+
+int
+nvmft_handoff_io_queue(struct nvmft_port *np,
+ const struct nvmf_handoff_controller_qpair *handoff,
+ const struct nvmf_fabric_connect_cmd *cmd,
+ const struct nvmf_fabric_connect_data *data)
+{
+ struct nvmft_controller *ctrlr;
+ struct nvmft_qpair *qp;
+ char name[16];
+ uint16_t cntlid, qid;
+
+ qid = le16toh(cmd->qid);
+ if (qid == 0)
+ return (EINVAL);
+ cntlid = le16toh(data->cntlid);
+
+ snprintf(name, sizeof(name), "I/O queue %u", qid);
+ qp = nvmft_qpair_init(handoff->trtype, &handoff->params, qid, name);
+
+ sx_slock(&np->lock);
+ TAILQ_FOREACH(ctrlr, &np->controllers, link) {
+ if (ctrlr->cntlid == cntlid)
+ break;
+ }
+ if (ctrlr == NULL) {
+ sx_sunlock(&np->lock);
+ printf("NVMFT: Nonexistent controller %u for I/O queue %u from %.*s\n",
+ ctrlr->cntlid, qid, (int)sizeof(data->hostnqn),
+ data->hostnqn);
+ nvmft_connect_invalid_parameters(qp, cmd, true,
+ offsetof(struct nvmf_fabric_connect_data, cntlid));
+ nvmft_qpair_destroy(qp);
+ return (ENOENT);
+ }
+
+ if (memcmp(ctrlr->hostid, data->hostid, sizeof(ctrlr->hostid)) != 0) {
+ sx_sunlock(&np->lock);
+ nvmft_printf(ctrlr,
+ "hostid mismatch for I/O queue %u from %.*s\n", qid,
+ (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_invalid_parameters(qp, cmd, true,
+ offsetof(struct nvmf_fabric_connect_data, hostid));
+ nvmft_qpair_destroy(qp);
+ return (EINVAL);
+ }
+ if (memcmp(ctrlr->hostnqn, data->hostnqn, sizeof(ctrlr->hostnqn)) != 0) {
+ sx_sunlock(&np->lock);
+ nvmft_printf(ctrlr,
+ "hostnqn mismatch for I/O queue %u from %.*s\n", qid,
+ (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_invalid_parameters(qp, cmd, true,
+ offsetof(struct nvmf_fabric_connect_data, hostnqn));
+ nvmft_qpair_destroy(qp);
+ return (EINVAL);
+ }
+
+ /* XXX: Require handoff->trtype == ctrlr->trtype? */
+
+ mtx_lock(&ctrlr->lock);
+ if (ctrlr->shutdown) {
+ mtx_unlock(&ctrlr->lock);
+ sx_sunlock(&np->lock);
+ nvmft_printf(ctrlr,
+ "attempt to create I/O queue %u on disabled controller from %.*s\n",
+ qid, (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_invalid_parameters(qp, cmd, true,
+ offsetof(struct nvmf_fabric_connect_data, cntlid));
+ nvmft_qpair_destroy(qp);
+ return (EINVAL);
+ }
+ if (ctrlr->num_io_queues == 0) {
+ mtx_unlock(&ctrlr->lock);
+ sx_sunlock(&np->lock);
+ nvmft_printf(ctrlr,
+ "attempt to create I/O queue %u without enabled queues from %.*s\n",
+ qid, (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_error(qp, cmd, NVME_SCT_GENERIC,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ nvmft_qpair_destroy(qp);
+ return (EINVAL);
+ }
+ if (cmd->qid > ctrlr->num_io_queues) {
+ mtx_unlock(&ctrlr->lock);
+ sx_sunlock(&np->lock);
+ nvmft_printf(ctrlr,
+ "attempt to create invalid I/O queue %u from %.*s\n", qid,
+ (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_invalid_parameters(qp, cmd, false,
+ offsetof(struct nvmf_fabric_connect_cmd, qid));
+ nvmft_qpair_destroy(qp);
+ return (EINVAL);
+ }
+ if (ctrlr->io_qpairs[qid - 1].qp != NULL) {
+ mtx_unlock(&ctrlr->lock);
+ sx_sunlock(&np->lock);
+ nvmft_printf(ctrlr,
+ "attempt to re-create I/O queue %u from %.*s\n", qid,
+ (int)sizeof(data->hostnqn), data->hostnqn);
+ nvmft_connect_error(qp, cmd, NVME_SCT_GENERIC,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ nvmft_qpair_destroy(qp);
+ return (EINVAL);
+ }
+
+ ctrlr->io_qpairs[qid - 1].qp = qp;
+ mtx_unlock(&ctrlr->lock);
+ nvmft_finish_accept(qp, cmd, ctrlr);
+ sx_sunlock(&np->lock);
+
+ return (0);
+}
+
+static void
+nvmft_controller_shutdown(void *arg, int pending)
+{
+ struct nvmft_controller *ctrlr = arg;
+
+ MPASS(pending == 1);
+
+ /*
+ * Shutdown all I/O queues to terminate pending datamoves and
+ * stop receiving new commands.
+ */
+ mtx_lock(&ctrlr->lock);
+ for (u_int i = 0; i < ctrlr->num_io_queues; i++) {
+ if (ctrlr->io_qpairs[i].qp != NULL) {
+ ctrlr->io_qpairs[i].shutdown = true;
+ mtx_unlock(&ctrlr->lock);
+ nvmft_qpair_shutdown(ctrlr->io_qpairs[i].qp);
+ mtx_lock(&ctrlr->lock);
+ }
+ }
+ mtx_unlock(&ctrlr->lock);
+
+ /* Terminate active CTL commands. */
+ nvmft_terminate_commands(ctrlr);
+
+ /* Wait for all pending CTL commands to complete. */
+ mtx_lock(&ctrlr->lock);
+ while (ctrlr->pending_commands != 0)
+ mtx_sleep(&ctrlr->pending_commands, &ctrlr->lock, 0, "nvmftsh",
+ hz / 100);
+ mtx_unlock(&ctrlr->lock);
+
+ /* Delete all of the I/O queues. */
+ for (u_int i = 0; i < ctrlr->num_io_queues; i++) {
+ if (ctrlr->io_qpairs[i].qp != NULL)
+ nvmft_qpair_destroy(ctrlr->io_qpairs[i].qp);
+ }
+ free(ctrlr->io_qpairs, M_NVMFT);
+ ctrlr->io_qpairs = NULL;
+
+ mtx_lock(&ctrlr->lock);
+ ctrlr->num_io_queues = 0;
+
+ /* Mark shutdown complete. */
+ if (NVMEV(NVME_CSTS_REG_SHST, ctrlr->csts) == NVME_SHST_OCCURRING) {
+ ctrlr->csts &= ~NVMEM(NVME_CSTS_REG_SHST);
+ ctrlr->csts |= NVMEF(NVME_CSTS_REG_SHST, NVME_SHST_COMPLETE);
+ }
+
+ if (NVMEV(NVME_CSTS_REG_CFS, ctrlr->csts) == 0) {
+ ctrlr->csts &= ~NVMEM(NVME_CSTS_REG_RDY);
+ ctrlr->shutdown = false;
+ }
+ mtx_unlock(&ctrlr->lock);
+
+ /*
+ * If the admin queue was closed while shutting down or a
+ * fatal controller error has occurred, terminate the
+ * association immediately, otherwise wait up to 2 minutes
+ * (NVMe-over-Fabrics 1.1 4.6).
+ */
+ if (ctrlr->admin_closed || NVMEV(NVME_CSTS_REG_CFS, ctrlr->csts) != 0)
+ nvmft_controller_terminate(ctrlr, 0);
+ else
+ taskqueue_enqueue_timeout(taskqueue_thread,
+ &ctrlr->terminate_task, hz * 60 * 2);
+}
+
+static void
+nvmft_controller_terminate(void *arg, int pending)
+{
+ struct nvmft_controller *ctrlr = arg;
+ struct nvmft_port *np;
+ bool wakeup_np;
+
+ /* If the controller has been re-enabled, nothing to do. */
+ mtx_lock(&ctrlr->lock);
+ if (NVMEV(NVME_CC_REG_EN, ctrlr->cc) != 0) {
+ mtx_unlock(&ctrlr->lock);
+
+ if (ctrlr->ka_sbt != 0)
+ callout_schedule_sbt(&ctrlr->ka_timer, ctrlr->ka_sbt, 0,
+ C_HARDCLOCK);
+ return;
+ }
+
+ /* Disable updates to CC while destroying admin qpair. */
+ ctrlr->shutdown = true;
+ mtx_unlock(&ctrlr->lock);
+
+ nvmft_qpair_destroy(ctrlr->admin);
+
+ /* Remove association (CNTLID). */
+ np = ctrlr->np;
+ sx_xlock(&np->lock);
+ TAILQ_REMOVE(&np->controllers, ctrlr, link);
+ free_unr(np->ids, ctrlr->cntlid);
+ wakeup_np = (!np->online && TAILQ_EMPTY(&np->controllers));
+ sx_xunlock(&np->lock);
+ if (wakeup_np)
+ wakeup(np);
+
+ callout_drain(&ctrlr->ka_timer);
+
+ nvmft_printf(ctrlr, "association terminated\n");
+ nvmft_controller_free(ctrlr);
+ nvmft_port_rele(np);
+}
+
+void
+nvmft_controller_error(struct nvmft_controller *ctrlr, struct nvmft_qpair *qp,
+ int error)
+{
+ /*
+ * If a queue pair is closed, that isn't an error per se.
+ * That just means additional commands cannot be received on
+ * that queue pair.
+ *
+ * If the admin queue pair is closed while idle or while
+ * shutting down, terminate the association immediately.
+ *
+ * If an I/O queue pair is closed, just ignore it.
+ */
+ if (error == 0) {
+ if (qp != ctrlr->admin)
+ return;
+
+ mtx_lock(&ctrlr->lock);
+ if (ctrlr->shutdown) {
+ ctrlr->admin_closed = true;
+ mtx_unlock(&ctrlr->lock);
+ return;
+ }
+
+ if (NVMEV(NVME_CC_REG_EN, ctrlr->cc) == 0) {
+ MPASS(ctrlr->num_io_queues == 0);
+ mtx_unlock(&ctrlr->lock);
+
+ /*
+ * Ok to drop lock here since ctrlr->cc can't
+ * change if the admin queue pair has closed.
+ * This also means no new queues can be handed
+ * off, etc. Note that since there are no I/O
+ * queues, only the admin queue needs to be
+ * destroyed, so it is safe to skip
+ * nvmft_controller_shutdown and just schedule
+ * nvmft_controller_terminate. Note that we
+ * cannot call nvmft_controller_terminate from
+ * here directly as this is called from the
+ * transport layer and freeing the admin qpair
+ * might deadlock waiting for the current
+ * thread to exit.
+ */
+ if (taskqueue_cancel_timeout(taskqueue_thread,
+ &ctrlr->terminate_task, NULL) == 0)
+ taskqueue_enqueue_timeout(taskqueue_thread,
+ &ctrlr->terminate_task, 0);
+ return;
+ }
+
+ /*
+ * Treat closing of the admin queue pair while enabled
+ * as a transport error. Note that the admin queue
+ * pair has been closed.
+ */
+ ctrlr->admin_closed = true;
+ } else
+ mtx_lock(&ctrlr->lock);
+
+ /* Ignore transport errors if we are already shutting down. */
+ if (ctrlr->shutdown) {
+ mtx_unlock(&ctrlr->lock);
+ return;
+ }
+
+ ctrlr->csts |= NVMEF(NVME_CSTS_REG_CFS, 1);
+ ctrlr->cc &= ~NVMEM(NVME_CC_REG_EN);
+ ctrlr->shutdown = true;
+ mtx_unlock(&ctrlr->lock);
+
+ callout_stop(&ctrlr->ka_timer);
+ taskqueue_enqueue(taskqueue_thread, &ctrlr->shutdown_task);
+}
+
+/* Wrapper around m_getm2 that also sets m_len in the mbufs in the chain. */
+static struct mbuf *
+m_getml(size_t len, int how)
+{
+ struct mbuf *m, *n;
+
+ m = m_getm2(NULL, len, how, MT_DATA, 0);
+ if (m == NULL)
+ return (NULL);
+ for (n = m; len > 0; n = n->m_next) {
+ n->m_len = M_SIZE(n);
+ if (n->m_len >= len) {
+ n->m_len = len;
+ MPASS(n->m_next == NULL);
+ }
+ len -= n->m_len;
+ }
+ return (m);
+}
+
+static void
+m_zero(struct mbuf *m, u_int offset, u_int len)
+{
+ u_int todo;
+
+ if (len == 0)
+ return;
+
+ while (m->m_len <= offset) {
+ offset -= m->m_len;
+ m = m->m_next;
+ }
+
+ todo = m->m_len - offset;
+ if (todo > len)
+ todo = len;
+ memset(mtodo(m, offset), 0, todo);
+ m = m->m_next;
+ len -= todo;
+
+ while (len > 0) {
+ todo = m->m_len;
+ if (todo > len)
+ todo = len;
+ memset(mtod(m, void *), 0, todo);
+ m = m->m_next;
+ len -= todo;
+ }
+}
+
+static void
+handle_get_log_page(struct nvmft_controller *ctrlr,
+ struct nvmf_capsule *nc, const struct nvme_command *cmd)
+{
+ struct mbuf *m;
+ uint64_t offset;
+ uint32_t numd;
+ size_t len, todo;
+ u_int status;
+ uint8_t lid;
+ bool rae;
+
+ lid = le32toh(cmd->cdw10) & 0xff;
+ rae = (le32toh(cmd->cdw10) & (1U << 15)) != 0;
+ numd = le32toh(cmd->cdw10) >> 16 | le32toh(cmd->cdw11) << 16;
+ offset = le32toh(cmd->cdw12) | (uint64_t)le32toh(cmd->cdw13) << 32;
+
+ if (offset % 3 != 0) {
+ status = NVME_SC_INVALID_FIELD;
+ goto done;
+ }
+
+ len = (numd + 1) * 4;
+
+ switch (lid) {
+ case NVME_LOG_ERROR:
+ todo = 0;
+
+ m = m_getml(len, M_WAITOK);
+ if (todo != len)
+ m_zero(m, todo, len - todo);
+ status = nvmf_send_controller_data(nc, 0, m, len);
+ MPASS(status != NVMF_MORE);
+ break;
+ case NVME_LOG_HEALTH_INFORMATION:
+ {
+ struct nvme_health_information_page hip;
+
+ if (offset >= sizeof(hip)) {
+ status = NVME_SC_INVALID_FIELD;
+ goto done;
+ }
+ todo = sizeof(hip) - offset;
+ if (todo > len)
+ todo = len;
+
+ mtx_lock(&ctrlr->lock);
+ hip = ctrlr->hip;
+ hip.controller_busy_time[0] =
+ sbintime_getsec(ctrlr->busy_total) / 60;
+ hip.power_on_hours[0] =
+ sbintime_getsec(sbinuptime() - ctrlr->create_time) / 3600;
+ mtx_unlock(&ctrlr->lock);
+
+ m = m_getml(len, M_WAITOK);
+ m_copyback(m, 0, todo, (char *)&hip + offset);
+ if (todo != len)
+ m_zero(m, todo, len - todo);
+ status = nvmf_send_controller_data(nc, 0, m, len);
+ MPASS(status != NVMF_MORE);
+ break;
+ }
+ case NVME_LOG_FIRMWARE_SLOT:
+ if (offset >= sizeof(ctrlr->np->fp)) {
+ status = NVME_SC_INVALID_FIELD;
+ goto done;
+ }
+ todo = sizeof(ctrlr->np->fp) - offset;
+ if (todo > len)
+ todo = len;
+
+ m = m_getml(len, M_WAITOK);
+ m_copyback(m, 0, todo, (char *)&ctrlr->np->fp + offset);
+ if (todo != len)
+ m_zero(m, todo, len - todo);
+ status = nvmf_send_controller_data(nc, 0, m, len);
+ MPASS(status != NVMF_MORE);
+ break;
+ case NVME_LOG_CHANGED_NAMESPACE:
+ if (offset >= sizeof(*ctrlr->changed_ns)) {
+ status = NVME_SC_INVALID_FIELD;
+ goto done;
+ }
+ todo = sizeof(*ctrlr->changed_ns) - offset;
+ if (todo > len)
+ todo = len;
+
+ m = m_getml(len, M_WAITOK);
+ mtx_lock(&ctrlr->lock);
+ m_copyback(m, 0, todo, (char *)ctrlr->changed_ns + offset);
+ if (offset == 0 && len == sizeof(*ctrlr->changed_ns))
+ memset(ctrlr->changed_ns, 0,
+ sizeof(*ctrlr->changed_ns));
+ if (!rae)
+ ctrlr->changed_ns_reported = false;
+ mtx_unlock(&ctrlr->lock);
+ if (todo != len)
+ m_zero(m, todo, len - todo);
+ status = nvmf_send_controller_data(nc, 0, m, len);
+ MPASS(status != NVMF_MORE);
+ break;
+ default:
+ nvmft_printf(ctrlr, "Unsupported page %#x for GET_LOG_PAGE\n",
+ lid);
+ status = NVME_SC_INVALID_FIELD;
+ break;
+ }
+
+done:
+ if (status == NVMF_SUCCESS_SENT)
+ nvmft_command_completed(ctrlr->admin, nc);
+ else
+ nvmft_send_generic_error(ctrlr->admin, nc, status);
+ nvmf_free_capsule(nc);
+}
+
+static void
+m_free_nslist(struct mbuf *m)
+{
+ free(m->m_ext.ext_arg1, M_NVMFT);
+}
+
+static void
+handle_identify_command(struct nvmft_controller *ctrlr,
+ struct nvmf_capsule *nc, const struct nvme_command *cmd)
+{
+ struct mbuf *m;
+ size_t data_len;
+ u_int status;
+ uint8_t cns;
+
+ cns = le32toh(cmd->cdw10) & 0xFF;
+ data_len = nvmf_capsule_data_len(nc);
+ if (data_len != sizeof(ctrlr->cdata)) {
+ nvmft_printf(ctrlr,
+ "Invalid length %zu for IDENTIFY with CNS %#x\n", data_len,
+ cns);
+ nvmft_send_generic_error(ctrlr->admin, nc,
+ NVME_SC_INVALID_OPCODE);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ switch (cns) {
+ case 0: /* Namespace data. */
+ case 3: /* Namespace Identification Descriptor list. */
+ nvmft_dispatch_command(ctrlr->admin, nc, true);
+ return;
+ case 1:
+ /* Controller data. */
+ m = m_getml(sizeof(ctrlr->cdata), M_WAITOK);
+ m_copyback(m, 0, sizeof(ctrlr->cdata), (void *)&ctrlr->cdata);
+ status = nvmf_send_controller_data(nc, 0, m,
+ sizeof(ctrlr->cdata));
+ MPASS(status != NVMF_MORE);
+ break;
+ case 2:
+ {
+ /* Active namespace list. */
+ struct nvme_ns_list *nslist;
+ uint32_t nsid;
+
+ nsid = le32toh(cmd->nsid);
+ if (nsid >= 0xfffffffe) {
+ status = NVME_SC_INVALID_FIELD;
+ break;
+ }
+
+ nslist = malloc(sizeof(*nslist), M_NVMFT, M_WAITOK | M_ZERO);
+ nvmft_populate_active_nslist(ctrlr->np, nsid, nslist);
+ m = m_get(M_WAITOK, MT_DATA);
+ m_extadd(m, (void *)nslist, sizeof(*nslist), m_free_nslist,
+ nslist, NULL, 0, EXT_CTL);
+ m->m_len = sizeof(*nslist);
+ status = nvmf_send_controller_data(nc, 0, m, m->m_len);
+ MPASS(status != NVMF_MORE);
+ break;
+ }
+ default:
+ nvmft_printf(ctrlr, "Unsupported CNS %#x for IDENTIFY\n", cns);
+ status = NVME_SC_INVALID_FIELD;
+ break;
+ }
+
+ if (status == NVMF_SUCCESS_SENT)
+ nvmft_command_completed(ctrlr->admin, nc);
+ else
+ nvmft_send_generic_error(ctrlr->admin, nc, status);
+ nvmf_free_capsule(nc);
+}
+
+static void
+handle_set_features(struct nvmft_controller *ctrlr,
+ struct nvmf_capsule *nc, const struct nvme_command *cmd)
+{
+ struct nvme_completion cqe;
+ uint8_t fid;
+
+ fid = NVMEV(NVME_FEAT_SET_FID, le32toh(cmd->cdw10));
+ switch (fid) {
+ case NVME_FEAT_NUMBER_OF_QUEUES:
+ {
+ uint32_t num_queues;
+ struct nvmft_io_qpair *io_qpairs;
+
+ num_queues = le32toh(cmd->cdw11) & 0xffff;
+
+ /* 5.12.1.7: 65535 is invalid. */
+ if (num_queues == 65535)
+ goto error;
+
+ /* Fabrics requires the same number of SQs and CQs. */
+ if (le32toh(cmd->cdw11) >> 16 != num_queues)
+ goto error;
+
+ /* Convert to 1's based */
+ num_queues++;
+
+ io_qpairs = mallocarray(num_queues, sizeof(*io_qpairs),
+ M_NVMFT, M_WAITOK | M_ZERO);
+
+ mtx_lock(&ctrlr->lock);
+ if (ctrlr->num_io_queues != 0) {
+ mtx_unlock(&ctrlr->lock);
+ free(io_qpairs, M_NVMFT);
+ nvmft_send_generic_error(ctrlr->admin, nc,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ ctrlr->num_io_queues = num_queues;
+ ctrlr->io_qpairs = io_qpairs;
+ mtx_unlock(&ctrlr->lock);
+
+ nvmft_init_cqe(&cqe, nc, 0);
+ cqe.cdw0 = cmd->cdw11;
+ nvmft_send_response(ctrlr->admin, &cqe);
+ nvmf_free_capsule(nc);
+ return;
+ }
+ case NVME_FEAT_ASYNC_EVENT_CONFIGURATION:
+ {
+ uint32_t aer_mask;
+
+ aer_mask = le32toh(cmd->cdw11);
+
+ /* Check for any reserved or unimplemented feature bits. */
+ if ((aer_mask & 0xffffc000) != 0)
+ goto error;
+
+ mtx_lock(&ctrlr->lock);
+ ctrlr->aer_mask = aer_mask;
+ mtx_unlock(&ctrlr->lock);
+ nvmft_send_success(ctrlr->admin, nc);
+ return;
+ }
+ default:
+ nvmft_printf(ctrlr,
+ "Unsupported feature ID %u for SET_FEATURES\n", fid);
+ goto error;
+ }
+
+error:
+ nvmft_send_generic_error(ctrlr->admin, nc, NVME_SC_INVALID_FIELD);
+ nvmf_free_capsule(nc);
+}
+
+static bool
+update_cc(struct nvmft_controller *ctrlr, uint32_t new_cc, bool *need_shutdown)
+{
+ struct nvmft_port *np = ctrlr->np;
+ uint32_t changes;
+
+ *need_shutdown = false;
+
+ mtx_lock(&ctrlr->lock);
+
+ /* Don't allow any changes while shutting down. */
+ if (ctrlr->shutdown) {
+ mtx_unlock(&ctrlr->lock);
+ return (false);
+ }
+
+ if (!_nvmf_validate_cc(np->max_io_qsize, np->cap, ctrlr->cc, new_cc)) {
+ mtx_unlock(&ctrlr->lock);
+ return (false);
+ }
+
+ changes = ctrlr->cc ^ new_cc;
+ ctrlr->cc = new_cc;
+
+ /* Handle shutdown requests. */
+ if (NVMEV(NVME_CC_REG_SHN, changes) != 0 &&
+ NVMEV(NVME_CC_REG_SHN, new_cc) != 0) {
+ ctrlr->csts &= ~NVMEM(NVME_CSTS_REG_SHST);
+ ctrlr->csts |= NVMEF(NVME_CSTS_REG_SHST, NVME_SHST_OCCURRING);
+ ctrlr->cc &= ~NVMEM(NVME_CC_REG_EN);
+ ctrlr->shutdown = true;
+ *need_shutdown = true;
+ nvmft_printf(ctrlr, "shutdown requested\n");
+ }
+
+ if (NVMEV(NVME_CC_REG_EN, changes) != 0) {
+ if (NVMEV(NVME_CC_REG_EN, new_cc) == 0) {
+ /* Controller reset. */
+ nvmft_printf(ctrlr, "reset requested\n");
+ ctrlr->shutdown = true;
+ *need_shutdown = true;
+ } else
+ ctrlr->csts |= NVMEF(NVME_CSTS_REG_RDY, 1);
+ }
+ mtx_unlock(&ctrlr->lock);
+
+ return (true);
+}
+
+static void
+handle_property_get(struct nvmft_controller *ctrlr, struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_get_cmd *pget)
+{
+ struct nvmf_fabric_prop_get_rsp rsp;
+
+ nvmft_init_cqe(&rsp, nc, 0);
+
+ switch (le32toh(pget->ofst)) {
+ case NVMF_PROP_CAP:
+ if (pget->attrib.size != NVMF_PROP_SIZE_8)
+ goto error;
+ rsp.value.u64 = htole64(ctrlr->np->cap);
+ break;
+ case NVMF_PROP_VS:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = ctrlr->cdata.ver;
+ break;
+ case NVMF_PROP_CC:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(ctrlr->cc);
+ break;
+ case NVMF_PROP_CSTS:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(ctrlr->csts);
+ break;
+ default:
+ goto error;
+ }
+
+ nvmft_send_response(ctrlr->admin, &rsp);
+ return;
+error:
+ nvmft_send_generic_error(ctrlr->admin, nc, NVME_SC_INVALID_FIELD);
+}
+
+static void
+handle_property_set(struct nvmft_controller *ctrlr, struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_set_cmd *pset)
+{
+ bool need_shutdown;
+
+ need_shutdown = false;
+ switch (le32toh(pset->ofst)) {
+ case NVMF_PROP_CC:
+ if (pset->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ if (!update_cc(ctrlr, le32toh(pset->value.u32.low),
+ &need_shutdown))
+ goto error;
+ break;
+ default:
+ goto error;
+ }
+
+ nvmft_send_success(ctrlr->admin, nc);
+ if (need_shutdown) {
+ callout_stop(&ctrlr->ka_timer);
+ taskqueue_enqueue(taskqueue_thread, &ctrlr->shutdown_task);
+ }
+ return;
+error:
+ nvmft_send_generic_error(ctrlr->admin, nc, NVME_SC_INVALID_FIELD);
+}
+
+static void
+handle_admin_fabrics_command(struct nvmft_controller *ctrlr,
+ struct nvmf_capsule *nc, const struct nvmf_fabric_cmd *fc)
+{
+ switch (fc->fctype) {
+ case NVMF_FABRIC_COMMAND_PROPERTY_GET:
+ handle_property_get(ctrlr, nc,
+ (const struct nvmf_fabric_prop_get_cmd *)fc);
+ break;
+ case NVMF_FABRIC_COMMAND_PROPERTY_SET:
+ handle_property_set(ctrlr, nc,
+ (const struct nvmf_fabric_prop_set_cmd *)fc);
+ break;
+ case NVMF_FABRIC_COMMAND_CONNECT:
+ nvmft_printf(ctrlr,
+ "CONNECT command on connected admin queue\n");
+ nvmft_send_generic_error(ctrlr->admin, nc,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ break;
+ case NVMF_FABRIC_COMMAND_DISCONNECT:
+ nvmft_printf(ctrlr, "DISCONNECT command on admin queue\n");
+ nvmft_send_error(ctrlr->admin, nc, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_INVALID_QUEUE_TYPE);
+ break;
+ default:
+ nvmft_printf(ctrlr, "Unsupported fabrics command %#x\n",
+ fc->fctype);
+ nvmft_send_generic_error(ctrlr->admin, nc,
+ NVME_SC_INVALID_OPCODE);
+ break;
+ }
+ nvmf_free_capsule(nc);
+}
+
+void
+nvmft_handle_admin_command(struct nvmft_controller *ctrlr,
+ struct nvmf_capsule *nc)
+{
+ const struct nvme_command *cmd = nvmf_capsule_sqe(nc);
+
+ /* Only permit Fabrics commands while a controller is disabled. */
+ if (NVMEV(NVME_CC_REG_EN, ctrlr->cc) == 0 &&
+ cmd->opc != NVME_OPC_FABRICS_COMMANDS) {
+ nvmft_printf(ctrlr,
+ "Unsupported admin opcode %#x whiled disabled\n", cmd->opc);
+ nvmft_send_generic_error(ctrlr->admin, nc,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ atomic_store_int(&ctrlr->ka_active_traffic, 1);
+
+ switch (cmd->opc) {
+ case NVME_OPC_GET_LOG_PAGE:
+ handle_get_log_page(ctrlr, nc, cmd);
+ break;
+ case NVME_OPC_IDENTIFY:
+ handle_identify_command(ctrlr, nc, cmd);
+ break;
+ case NVME_OPC_SET_FEATURES:
+ handle_set_features(ctrlr, nc, cmd);
+ break;
+ case NVME_OPC_ASYNC_EVENT_REQUEST:
+ mtx_lock(&ctrlr->lock);
+ if (ctrlr->aer_pending == NVMFT_NUM_AER) {
+ mtx_unlock(&ctrlr->lock);
+ nvmft_send_error(ctrlr->admin, nc,
+ NVME_SCT_COMMAND_SPECIFIC,
+ NVME_SC_ASYNC_EVENT_REQUEST_LIMIT_EXCEEDED);
+ } else {
+ /* NB: Store the CID without byte-swapping. */
+ ctrlr->aer_cids[ctrlr->aer_pidx] = cmd->cid;
+ ctrlr->aer_pending++;
+ ctrlr->aer_pidx = (ctrlr->aer_pidx + 1) % NVMFT_NUM_AER;
+ mtx_unlock(&ctrlr->lock);
+ }
+ nvmf_free_capsule(nc);
+ break;
+ case NVME_OPC_KEEP_ALIVE:
+ nvmft_send_success(ctrlr->admin, nc);
+ nvmf_free_capsule(nc);
+ break;
+ case NVME_OPC_FABRICS_COMMANDS:
+ handle_admin_fabrics_command(ctrlr, nc,
+ (const struct nvmf_fabric_cmd *)cmd);
+ break;
+ default:
+ nvmft_printf(ctrlr, "Unsupported admin opcode %#x\n", cmd->opc);
+ nvmft_send_generic_error(ctrlr->admin, nc,
+ NVME_SC_INVALID_OPCODE);
+ nvmf_free_capsule(nc);
+ break;
+ }
+}
+
+void
+nvmft_handle_io_command(struct nvmft_qpair *qp, uint16_t qid,
+ struct nvmf_capsule *nc)
+{
+ struct nvmft_controller *ctrlr = nvmft_qpair_ctrlr(qp);
+ const struct nvme_command *cmd = nvmf_capsule_sqe(nc);
+
+ atomic_store_int(&ctrlr->ka_active_traffic, 1);
+
+ switch (cmd->opc) {
+ case NVME_OPC_FLUSH:
+ if (cmd->nsid == htole32(0xffffffff)) {
+ nvmft_send_generic_error(qp, nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ nvmf_free_capsule(nc);
+ break;
+ }
+ /* FALLTHROUGH */
+ case NVME_OPC_WRITE:
+ case NVME_OPC_READ:
+ case NVME_OPC_WRITE_UNCORRECTABLE:
+ case NVME_OPC_COMPARE:
+ case NVME_OPC_WRITE_ZEROES:
+ case NVME_OPC_DATASET_MANAGEMENT:
+ case NVME_OPC_VERIFY:
+ nvmft_dispatch_command(qp, nc, false);
+ break;
+ default:
+ nvmft_printf(ctrlr, "Unsupported I/O opcode %#x\n", cmd->opc);
+ nvmft_send_generic_error(qp, nc,
+ NVME_SC_INVALID_OPCODE);
+ nvmf_free_capsule(nc);
+ break;
+ }
+}
+
+static void
+nvmft_report_aer(struct nvmft_controller *ctrlr, uint32_t aer_mask,
+ u_int type, uint8_t info, uint8_t log_page_id)
+{
+ struct nvme_completion cpl;
+
+ MPASS(type <= 7);
+
+ /* Drop events that are not enabled. */
+ mtx_lock(&ctrlr->lock);
+ if ((ctrlr->aer_mask & aer_mask) == 0) {
+ mtx_unlock(&ctrlr->lock);
+ return;
+ }
+
+ /*
+ * If there is no pending AER command, drop it.
+ * XXX: Should we queue these?
+ */
+ if (ctrlr->aer_pending == 0) {
+ mtx_unlock(&ctrlr->lock);
+ nvmft_printf(ctrlr,
+ "dropping AER type %u, info %#x, page %#x\n",
+ type, info, log_page_id);
+ return;
+ }
+
+ memset(&cpl, 0, sizeof(cpl));
+ cpl.cid = ctrlr->aer_cids[ctrlr->aer_cidx];
+ ctrlr->aer_pending--;
+ ctrlr->aer_cidx = (ctrlr->aer_cidx + 1) % NVMFT_NUM_AER;
+ mtx_unlock(&ctrlr->lock);
+
+ cpl.cdw0 = htole32(NVMEF(NVME_ASYNC_EVENT_TYPE, type) |
+ NVMEF(NVME_ASYNC_EVENT_INFO, info) |
+ NVMEF(NVME_ASYNC_EVENT_LOG_PAGE_ID, log_page_id));
+
+ nvmft_send_response(ctrlr->admin, &cpl);
+}
+
+void
+nvmft_controller_lun_changed(struct nvmft_controller *ctrlr, int lun_id)
+{
+ struct nvme_ns_list *nslist;
+ uint32_t new_nsid, nsid;
+ u_int i;
+
+ new_nsid = lun_id + 1;
+
+ mtx_lock(&ctrlr->lock);
+ nslist = ctrlr->changed_ns;
+
+ /* If the first entry is 0xffffffff, the list is already full. */
+ if (nslist->ns[0] != 0xffffffff) {
+ /* Find the insertion point for this namespace ID. */
+ for (i = 0; i < nitems(nslist->ns); i++) {
+ nsid = le32toh(nslist->ns[i]);
+ if (nsid == new_nsid) {
+ /* Already reported, nothing to do. */
+ mtx_unlock(&ctrlr->lock);
+ return;
+ }
+
+ if (nsid == 0 || nsid > new_nsid)
+ break;
+ }
+
+ if (nslist->ns[nitems(nslist->ns) - 1] != htole32(0)) {
+ /* List is full. */
+ memset(ctrlr->changed_ns, 0,
+ sizeof(*ctrlr->changed_ns));
+ ctrlr->changed_ns->ns[0] = 0xffffffff;
+ } else if (nslist->ns[i] == htole32(0)) {
+ /*
+ * Optimize case where this ID is appended to
+ * the end.
+ */
+ nslist->ns[i] = htole32(new_nsid);
+ } else {
+ memmove(&nslist->ns[i + 1], &nslist->ns[i],
+ (nitems(nslist->ns) - i - 1) *
+ sizeof(nslist->ns[0]));
+ nslist->ns[i] = htole32(new_nsid);
+ }
+ }
+
+ if (ctrlr->changed_ns_reported) {
+ mtx_unlock(&ctrlr->lock);
+ return;
+ }
+ ctrlr->changed_ns_reported = true;
+ mtx_unlock(&ctrlr->lock);
+
+ nvmft_report_aer(ctrlr, NVME_ASYNC_EVENT_NS_ATTRIBUTE, 0x2, 0x0,
+ NVME_LOG_CHANGED_NAMESPACE);
+}
diff --git a/sys/dev/nvmf/controller/nvmft_qpair.c b/sys/dev/nvmf/controller/nvmft_qpair.c
new file mode 100644
index 000000000000..6cb3ebd76884
--- /dev/null
+++ b/sys/dev/nvmf/controller/nvmft_qpair.c
@@ -0,0 +1,361 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/types.h>
+#include <sys/_bitset.h>
+#include <sys/bitset.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/controller/nvmft_var.h>
+
+/*
+ * A bitmask of command ID values. This is used to detect duplicate
+ * commands with the same ID.
+ */
+#define NUM_CIDS (UINT16_MAX + 1)
+BITSET_DEFINE(cidset, NUM_CIDS);
+
+struct nvmft_qpair {
+ struct nvmft_controller *ctrlr;
+ struct nvmf_qpair *qp;
+ struct cidset *cids;
+
+ bool admin;
+ bool sq_flow_control;
+ uint16_t qid;
+ u_int qsize;
+ uint16_t sqhd;
+ uint16_t sqtail;
+ volatile u_int qp_refs; /* Internal references on 'qp'. */
+
+ struct mtx lock;
+
+ char name[16];
+};
+
+static int _nvmft_send_generic_error(struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc, uint8_t sc_status);
+
+static void
+nvmft_qpair_error(void *arg, int error)
+{
+ struct nvmft_qpair *qp = arg;
+ struct nvmft_controller *ctrlr = qp->ctrlr;
+
+ /*
+ * XXX: The Linux TCP initiator sends a RST immediately after
+ * the FIN, so treat ECONNRESET as plain EOF to avoid spurious
+ * errors on shutdown.
+ */
+ if (error == ECONNRESET)
+ error = 0;
+
+ if (error != 0)
+ nvmft_printf(ctrlr, "error %d on %s\n", error, qp->name);
+ nvmft_controller_error(ctrlr, qp, error);
+}
+
+static void
+nvmft_receive_capsule(void *arg, struct nvmf_capsule *nc)
+{
+ struct nvmft_qpair *qp = arg;
+ struct nvmft_controller *ctrlr = qp->ctrlr;
+ const struct nvme_command *cmd;
+ uint8_t sc_status;
+
+ cmd = nvmf_capsule_sqe(nc);
+ if (ctrlr == NULL) {
+ printf("NVMFT: %s received CID %u opcode %u on newborn queue\n",
+ qp->name, le16toh(cmd->cid), cmd->opc);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ sc_status = nvmf_validate_command_capsule(nc);
+ if (sc_status != NVME_SC_SUCCESS) {
+ _nvmft_send_generic_error(qp, nc, sc_status);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ /* Don't bother byte-swapping CID. */
+ if (BIT_TEST_SET_ATOMIC(NUM_CIDS, cmd->cid, qp->cids)) {
+ _nvmft_send_generic_error(qp, nc, NVME_SC_COMMAND_ID_CONFLICT);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ if (qp->admin)
+ nvmft_handle_admin_command(ctrlr, nc);
+ else
+ nvmft_handle_io_command(qp, qp->qid, nc);
+}
+
+struct nvmft_qpair *
+nvmft_qpair_init(enum nvmf_trtype trtype,
+ const struct nvmf_handoff_qpair_params *handoff, uint16_t qid,
+ const char *name)
+{
+ struct nvmft_qpair *qp;
+
+ qp = malloc(sizeof(*qp), M_NVMFT, M_WAITOK | M_ZERO);
+ qp->admin = handoff->admin;
+ qp->sq_flow_control = handoff->sq_flow_control;
+ qp->qsize = handoff->qsize;
+ qp->qid = qid;
+ qp->sqhd = handoff->sqhd;
+ qp->sqtail = handoff->sqtail;
+ strlcpy(qp->name, name, sizeof(qp->name));
+ mtx_init(&qp->lock, "nvmft qp", NULL, MTX_DEF);
+ qp->cids = BITSET_ALLOC(NUM_CIDS, M_NVMFT, M_WAITOK | M_ZERO);
+
+ qp->qp = nvmf_allocate_qpair(trtype, true, handoff, nvmft_qpair_error,
+ qp, nvmft_receive_capsule, qp);
+ if (qp->qp == NULL) {
+ mtx_destroy(&qp->lock);
+ free(qp->cids, M_NVMFT);
+ free(qp, M_NVMFT);
+ return (NULL);
+ }
+
+ refcount_init(&qp->qp_refs, 1);
+ return (qp);
+}
+
+void
+nvmft_qpair_shutdown(struct nvmft_qpair *qp)
+{
+ struct nvmf_qpair *nq;
+
+ mtx_lock(&qp->lock);
+ nq = qp->qp;
+ qp->qp = NULL;
+ mtx_unlock(&qp->lock);
+ if (nq != NULL && refcount_release(&qp->qp_refs))
+ nvmf_free_qpair(nq);
+}
+
+void
+nvmft_qpair_destroy(struct nvmft_qpair *qp)
+{
+ nvmft_qpair_shutdown(qp);
+ mtx_destroy(&qp->lock);
+ free(qp->cids, M_NVMFT);
+ free(qp, M_NVMFT);
+}
+
+struct nvmft_controller *
+nvmft_qpair_ctrlr(struct nvmft_qpair *qp)
+{
+ return (qp->ctrlr);
+}
+
+uint16_t
+nvmft_qpair_id(struct nvmft_qpair *qp)
+{
+ return (qp->qid);
+}
+
+const char *
+nvmft_qpair_name(struct nvmft_qpair *qp)
+{
+ return (qp->name);
+}
+
+static int
+_nvmft_send_response(struct nvmft_qpair *qp, const void *cqe)
+{
+ struct nvme_completion cpl;
+ struct nvmf_qpair *nq;
+ struct nvmf_capsule *rc;
+ int error;
+
+ memcpy(&cpl, cqe, sizeof(cpl));
+ mtx_lock(&qp->lock);
+ nq = qp->qp;
+ if (nq == NULL) {
+ mtx_unlock(&qp->lock);
+ return (ENOTCONN);
+ }
+ refcount_acquire(&qp->qp_refs);
+
+ /* Set SQHD. */
+ if (qp->sq_flow_control) {
+ qp->sqhd = (qp->sqhd + 1) % qp->qsize;
+ cpl.sqhd = htole16(qp->sqhd);
+ } else
+ cpl.sqhd = 0;
+ mtx_unlock(&qp->lock);
+
+ rc = nvmf_allocate_response(nq, &cpl, M_WAITOK);
+ error = nvmf_transmit_capsule(rc);
+ nvmf_free_capsule(rc);
+
+ if (refcount_release(&qp->qp_refs))
+ nvmf_free_qpair(nq);
+ return (error);
+}
+
+void
+nvmft_command_completed(struct nvmft_qpair *qp, struct nvmf_capsule *nc)
+{
+ const struct nvme_command *cmd = nvmf_capsule_sqe(nc);
+
+ /* Don't bother byte-swapping CID. */
+ KASSERT(BIT_ISSET(NUM_CIDS, cmd->cid, qp->cids),
+ ("%s: CID %u not busy", __func__, cmd->cid));
+
+ BIT_CLR_ATOMIC(NUM_CIDS, cmd->cid, qp->cids);
+}
+
+int
+nvmft_send_response(struct nvmft_qpair *qp, const void *cqe)
+{
+ const struct nvme_completion *cpl = cqe;
+
+ /* Don't bother byte-swapping CID. */
+ KASSERT(BIT_ISSET(NUM_CIDS, cpl->cid, qp->cids),
+ ("%s: CID %u not busy", __func__, cpl->cid));
+
+ BIT_CLR_ATOMIC(NUM_CIDS, cpl->cid, qp->cids);
+ return (_nvmft_send_response(qp, cqe));
+}
+
+void
+nvmft_init_cqe(void *cqe, struct nvmf_capsule *nc, uint16_t status)
+{
+ struct nvme_completion *cpl = cqe;
+ const struct nvme_command *cmd = nvmf_capsule_sqe(nc);
+
+ memset(cpl, 0, sizeof(*cpl));
+ cpl->cid = cmd->cid;
+ cpl->status = htole16(status);
+}
+
+int
+nvmft_send_error(struct nvmft_qpair *qp, struct nvmf_capsule *nc,
+ uint8_t sc_type, uint8_t sc_status)
+{
+ struct nvme_completion cpl;
+ uint16_t status;
+
+ status = NVMEF(NVME_STATUS_SCT, sc_type) |
+ NVMEF(NVME_STATUS_SC, sc_status);
+ nvmft_init_cqe(&cpl, nc, status);
+ return (nvmft_send_response(qp, &cpl));
+}
+
+int
+nvmft_send_generic_error(struct nvmft_qpair *qp, struct nvmf_capsule *nc,
+ uint8_t sc_status)
+{
+ return (nvmft_send_error(qp, nc, NVME_SCT_GENERIC, sc_status));
+}
+
+/*
+ * This version doesn't clear CID in qp->cids and is used for errors
+ * before the CID is validated.
+ */
+static int
+_nvmft_send_generic_error(struct nvmft_qpair *qp, struct nvmf_capsule *nc,
+ uint8_t sc_status)
+{
+ struct nvme_completion cpl;
+ uint16_t status;
+
+ status = NVMEF(NVME_STATUS_SCT, NVME_SCT_GENERIC) |
+ NVMEF(NVME_STATUS_SC, sc_status);
+ nvmft_init_cqe(&cpl, nc, status);
+ return (_nvmft_send_response(qp, &cpl));
+}
+
+int
+nvmft_send_success(struct nvmft_qpair *qp, struct nvmf_capsule *nc)
+{
+ return (nvmft_send_generic_error(qp, nc, NVME_SC_SUCCESS));
+}
+
+static void
+nvmft_init_connect_rsp(struct nvmf_fabric_connect_rsp *rsp,
+ const struct nvmf_fabric_connect_cmd *cmd, uint16_t status)
+{
+ memset(rsp, 0, sizeof(*rsp));
+ rsp->cid = cmd->cid;
+ rsp->status = htole16(status);
+}
+
+static int
+nvmft_send_connect_response(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_rsp *rsp)
+{
+ struct nvmf_capsule *rc;
+ struct nvmf_qpair *nq;
+ int error;
+
+ mtx_lock(&qp->lock);
+ nq = qp->qp;
+ if (nq == NULL) {
+ mtx_unlock(&qp->lock);
+ return (ENOTCONN);
+ }
+ refcount_acquire(&qp->qp_refs);
+ mtx_unlock(&qp->lock);
+
+ rc = nvmf_allocate_response(qp->qp, rsp, M_WAITOK);
+ error = nvmf_transmit_capsule(rc);
+ nvmf_free_capsule(rc);
+
+ if (refcount_release(&qp->qp_refs))
+ nvmf_free_qpair(nq);
+ return (error);
+}
+
+void
+nvmft_connect_error(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd, uint8_t sc_type,
+ uint8_t sc_status)
+{
+ struct nvmf_fabric_connect_rsp rsp;
+ uint16_t status;
+
+ status = NVMEF(NVME_STATUS_SCT, sc_type) |
+ NVMEF(NVME_STATUS_SC, sc_status);
+ nvmft_init_connect_rsp(&rsp, cmd, status);
+ nvmft_send_connect_response(qp, &rsp);
+}
+
+void
+nvmft_connect_invalid_parameters(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd, bool data, uint16_t offset)
+{
+ struct nvmf_fabric_connect_rsp rsp;
+
+ nvmft_init_connect_rsp(&rsp, cmd,
+ NVMEF(NVME_STATUS_SCT, NVME_SCT_COMMAND_SPECIFIC) |
+ NVMEF(NVME_STATUS_SC, NVMF_FABRIC_SC_INVALID_PARAM));
+ rsp.status_code_specific.invalid.ipo = htole16(offset);
+ rsp.status_code_specific.invalid.iattr = data ? 1 : 0;
+ nvmft_send_connect_response(qp, &rsp);
+}
+
+int
+nvmft_finish_accept(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd, struct nvmft_controller *ctrlr)
+{
+ struct nvmf_fabric_connect_rsp rsp;
+
+ qp->ctrlr = ctrlr;
+ nvmft_init_connect_rsp(&rsp, cmd, 0);
+ if (qp->sq_flow_control)
+ rsp.sqhd = htole16(qp->sqhd);
+ else
+ rsp.sqhd = htole16(0xffff);
+ rsp.status_code_specific.success.cntlid = htole16(ctrlr->cntlid);
+ return (nvmft_send_connect_response(qp, &rsp));
+}
diff --git a/sys/dev/nvmf/controller/nvmft_subr.c b/sys/dev/nvmf/controller/nvmft_subr.c
new file mode 100644
index 000000000000..bb2bc0988e81
--- /dev/null
+++ b/sys/dev/nvmf/controller/nvmft_subr.c
@@ -0,0 +1,259 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/types.h>
+#ifdef _KERNEL
+#include <sys/libkern.h>
+#else
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#endif
+
+#include <dev/nvmf/nvmf_proto.h>
+
+#include "nvmft_subr.h"
+
+bool
+nvmf_nqn_valid(const char *nqn)
+{
+ size_t len;
+
+ len = strnlen(nqn, NVME_NQN_FIELD_SIZE);
+ if (len == 0 || len > NVMF_NQN_MAX_LEN)
+ return (false);
+
+#ifdef STRICT_CHECKS
+ /*
+ * Stricter checks from the spec. Linux does not seem to
+ * require these.
+ */
+
+ /*
+ * NVMF_NQN_MIN_LEN does not include '.', and require at least
+ * one character of a domain name.
+ */
+ if (len < NVMF_NQN_MIN_LEN + 2)
+ return (false);
+ if (memcmp("nqn.", nqn, strlen("nqn.")) != 0)
+ return (false);
+ nqn += strlen("nqn.");
+
+ /* Next 4 digits must be a year. */
+ for (u_int i = 0; i < 4; i++) {
+ if (!isdigit(nqn[i]))
+ return (false);
+ }
+ nqn += 4;
+
+ /* '-' between year and month. */
+ if (nqn[0] != '-')
+ return (false);
+ nqn++;
+
+ /* 2 digit month. */
+ for (u_int i = 0; i < 2; i++) {
+ if (!isdigit(nqn[i]))
+ return (false);
+ }
+ nqn += 2;
+
+ /* '.' between month and reverse domain name. */
+ if (nqn[0] != '.')
+ return (false);
+#endif
+ return (true);
+}
+
+uint64_t
+_nvmf_controller_cap(uint32_t max_io_qsize, uint8_t enable_timeout)
+{
+ uint32_t caphi, caplo;
+ u_int mps;
+
+ caphi = NVMEF(NVME_CAP_HI_REG_CMBS, 0) |
+ NVMEF(NVME_CAP_HI_REG_PMRS, 0);
+ if (max_io_qsize != 0) {
+ mps = ffs(PAGE_SIZE) - 1;
+ if (mps < NVME_MPS_SHIFT)
+ mps = 0;
+ else
+ mps -= NVME_MPS_SHIFT;
+ caphi |= NVMEF(NVME_CAP_HI_REG_MPSMAX, mps) |
+ NVMEF(NVME_CAP_HI_REG_MPSMIN, mps);
+ }
+ caphi |= NVMEF(NVME_CAP_HI_REG_BPS, 0) |
+ NVMEF(NVME_CAP_HI_REG_CSS, NVME_CAP_HI_REG_CSS_NVM_MASK) |
+ NVMEF(NVME_CAP_HI_REG_NSSRS, 0) |
+ NVMEF(NVME_CAP_HI_REG_DSTRD, 0);
+
+ caplo = NVMEF(NVME_CAP_LO_REG_TO, enable_timeout) |
+ NVMEF(NVME_CAP_LO_REG_AMS, 0) |
+ NVMEF(NVME_CAP_LO_REG_CQR, 1);
+
+ if (max_io_qsize != 0)
+ caplo |= NVMEF(NVME_CAP_LO_REG_MQES, max_io_qsize - 1);
+
+ return ((uint64_t)caphi << 32 | caplo);
+}
+
+bool
+_nvmf_validate_cc(uint32_t max_io_qsize __unused, uint64_t cap, uint32_t old_cc,
+ uint32_t new_cc)
+{
+ uint32_t caphi, changes, field;
+
+ changes = old_cc ^ new_cc;
+ field = NVMEV(NVME_CC_REG_IOCQES, new_cc);
+ if (field != 0) {
+ /*
+ * XXX: Linux's initiator writes a non-zero value to
+ * IOCQES when connecting to a discovery controller.
+ */
+#ifdef STRICT_CHECKS
+ if (max_io_qsize == 0)
+ return (false);
+#endif
+ if (field != 4)
+ return (false);
+ }
+ field = NVMEV(NVME_CC_REG_IOSQES, new_cc);
+ if (field != 0) {
+ /*
+ * XXX: Linux's initiator writes a non-zero value to
+ * IOCQES when connecting to a discovery controller.
+ */
+#ifdef STRICT_CHECKS
+ if (max_io_qsize == 0)
+ return (false);
+#endif
+ if (field != 6)
+ return (false);
+ }
+ field = NVMEV(NVME_CC_REG_SHN, new_cc);
+ if (field == 3)
+ return (false);
+
+ field = NVMEV(NVME_CC_REG_AMS, new_cc);
+ if (field != 0)
+ return (false);
+
+ caphi = cap >> 32;
+ field = NVMEV(NVME_CC_REG_MPS, new_cc);
+ if (field < NVMEV(NVME_CAP_HI_REG_MPSMAX, caphi) ||
+ field > NVMEV(NVME_CAP_HI_REG_MPSMIN, caphi))
+ return (false);
+
+ field = NVMEV(NVME_CC_REG_CSS, new_cc);
+ if (field != 0 && field != 0x7)
+ return (false);
+
+ /* AMS, MPS, and CSS can only be changed while CC.EN is 0. */
+ if (NVMEV(NVME_CC_REG_EN, old_cc) != 0 &&
+ (NVMEV(NVME_CC_REG_AMS, changes) != 0 ||
+ NVMEV(NVME_CC_REG_MPS, changes) != 0 ||
+ NVMEV(NVME_CC_REG_CSS, changes) != 0))
+ return (false);
+
+ return (true);
+}
+
+void
+nvmf_controller_serial(char *buf, size_t len, u_long hostid)
+{
+ snprintf(buf, len, "HI:%lu", hostid);
+}
+
+void
+nvmf_strpad(char *dst, const char *src, size_t len)
+{
+ while (len > 0 && *src != '\0') {
+ *dst++ = *src++;
+ len--;
+ }
+ memset(dst, ' ', len);
+}
+
+void
+_nvmf_init_io_controller_data(uint16_t cntlid, uint32_t max_io_qsize,
+ const char *serial, const char *model, const char *firmware_version,
+ const char *subnqn, int nn, uint32_t ioccsz, uint32_t iorcsz,
+ struct nvme_controller_data *cdata)
+{
+ char *cp;
+
+ nvmf_strpad(cdata->sn, serial, sizeof(cdata->sn));
+ nvmf_strpad(cdata->mn, model, sizeof(cdata->mn));
+ nvmf_strpad(cdata->fr, firmware_version, sizeof(cdata->fr));
+ cp = memchr(cdata->fr, '-', sizeof(cdata->fr));
+ if (cp != NULL)
+ memset(cp, ' ', sizeof(cdata->fr) - (cp - (char *)cdata->fr));
+
+ /* FreeBSD OUI */
+ cdata->ieee[0] = 0xfc;
+ cdata->ieee[1] = 0x9c;
+ cdata->ieee[2] = 0x58;
+
+ cdata->ctrlr_id = htole16(cntlid);
+ cdata->ver = htole32(NVME_REV(1, 4));
+ cdata->ctratt = htole32(
+ NVMEF(NVME_CTRLR_DATA_CTRATT_128BIT_HOSTID, 1) |
+ NVMEF(NVME_CTRLR_DATA_CTRATT_TBKAS, 1));
+ cdata->cntrltype = 1;
+ cdata->acl = 3;
+ cdata->aerl = 3;
+
+ /* 1 read-only firmware slot */
+ cdata->frmw = NVMEF(NVME_CTRLR_DATA_FRMW_SLOT1_RO, 1) |
+ NVMEF(NVME_CTRLR_DATA_FRMW_NUM_SLOTS, 1);
+
+ cdata->lpa = NVMEF(NVME_CTRLR_DATA_LPA_EXT_DATA, 1);
+
+ /* Single power state */
+ cdata->npss = 0;
+
+ /*
+ * 1.2+ require a non-zero value for these even though it makes
+ * no sense for Fabrics.
+ */
+ cdata->wctemp = htole16(0x0157);
+ cdata->cctemp = cdata->wctemp;
+
+ /* 1 second granularity for KeepAlive */
+ cdata->kas = htole16(10);
+
+ cdata->sqes = NVMEF(NVME_CTRLR_DATA_SQES_MAX, 6) |
+ NVMEF(NVME_CTRLR_DATA_SQES_MIN, 6);
+ cdata->cqes = NVMEF(NVME_CTRLR_DATA_CQES_MAX, 4) |
+ NVMEF(NVME_CTRLR_DATA_CQES_MIN, 4);
+
+ cdata->maxcmd = htole16(max_io_qsize);
+ cdata->nn = htole32(nn);
+
+ cdata->vwc =
+ NVMEF(NVME_CTRLR_DATA_VWC_ALL, NVME_CTRLR_DATA_VWC_ALL_NO) |
+ NVMEM(NVME_CTRLR_DATA_VWC_PRESENT);
+
+ /* Transport-specific? */
+ cdata->sgls = htole32(
+ NVMEF(NVME_CTRLR_DATA_SGLS_TRANSPORT_DATA_BLOCK, 1) |
+ NVMEF(NVME_CTRLR_DATA_SGLS_ADDRESS_AS_OFFSET, 1) |
+ NVMEF(NVME_CTRLR_DATA_SGLS_NVM_COMMAND_SET, 1));
+
+ strlcpy(cdata->subnqn, subnqn, sizeof(cdata->subnqn));
+
+ cdata->ioccsz = htole32(ioccsz / 16);
+ cdata->iorcsz = htole32(iorcsz / 16);
+
+ /* Transport-specific? */
+ cdata->icdoff = 0;
+
+ cdata->fcatt = 0;
+
+ /* Transport-specific? */
+ cdata->msdbd = 1;
+}
diff --git a/sys/dev/nvmf/controller/nvmft_subr.h b/sys/dev/nvmf/controller/nvmft_subr.h
new file mode 100644
index 000000000000..fbafa6047500
--- /dev/null
+++ b/sys/dev/nvmf/controller/nvmft_subr.h
@@ -0,0 +1,47 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMFT_SUBR_H__
+#define __NVMFT_SUBR_H__
+
+/*
+ * Lower-level controller-specific routines shared between the kernel
+ * and userland.
+ */
+
+/* Validate a NVMe Qualified Name. */
+bool nvmf_nqn_valid(const char *nqn);
+
+/* Compute the initial state of CAP for a controller. */
+uint64_t _nvmf_controller_cap(uint32_t max_io_qsize, uint8_t enable_timeout);
+
+/*
+ * Validate if a new value for CC is legal given the existing values of
+ * CAP and CC.
+ */
+bool _nvmf_validate_cc(uint32_t max_io_qsize, uint64_t cap, uint32_t old_cc,
+ uint32_t new_cc);
+
+/* Generate a serial number string from a host ID. */
+void nvmf_controller_serial(char *buf, size_t len, u_long hostid);
+
+/*
+ * Copy an ASCII string into the destination buffer but pad the end of
+ * the buffer with spaces and no terminating nul.
+ */
+void nvmf_strpad(char *dst, const char *src, size_t len);
+
+/*
+ * Populate an Identify Controller data structure for an I/O
+ * controller.
+ */
+void _nvmf_init_io_controller_data(uint16_t cntlid, uint32_t max_io_qsize,
+ const char *serial, const char *model, const char *firmware_version,
+ const char *subnqn, int nn, uint32_t ioccsz, uint32_t iorcsz,
+ struct nvme_controller_data *cdata);
+
+#endif /* !__NVMFT_SUBR_H__ */
diff --git a/sys/dev/nvmf/controller/nvmft_var.h b/sys/dev/nvmf/controller/nvmft_var.h
new file mode 100644
index 000000000000..fc1f86754382
--- /dev/null
+++ b/sys/dev/nvmf/controller/nvmft_var.h
@@ -0,0 +1,174 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMFT_VAR_H__
+#define __NVMFT_VAR_H__
+
+#include <sys/_callout.h>
+#include <sys/refcount.h>
+#include <sys/taskqueue.h>
+
+#include <dev/nvmf/nvmf_proto.h>
+
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_frontend.h>
+
+struct nvmf_capsule;
+struct nvmft_controller;
+struct nvmft_qpair;
+
+#define NVMFT_NUM_AER 16
+
+struct nvmft_port {
+ TAILQ_ENTRY(nvmft_port) link;
+ u_int refs;
+ struct ctl_port port;
+ struct nvme_controller_data cdata;
+ struct nvme_firmware_page fp;
+ uint64_t cap;
+ uint32_t max_io_qsize;
+ bool online;
+
+ struct sx lock;
+
+ struct unrhdr *ids;
+ TAILQ_HEAD(, nvmft_controller) controllers;
+
+ uint32_t *active_ns;
+ u_int num_ns;
+};
+
+struct nvmft_io_qpair {
+ struct nvmft_qpair *qp;
+
+ bool shutdown;
+};
+
+struct nvmft_controller {
+ struct nvmft_qpair *admin;
+ struct nvmft_io_qpair *io_qpairs;
+ u_int num_io_queues;
+ bool shutdown;
+ bool admin_closed;
+ uint16_t cntlid;
+ uint32_t cc;
+ uint32_t csts;
+
+ struct nvmft_port *np;
+ struct mtx lock;
+
+ struct nvme_controller_data cdata;
+ struct nvme_health_information_page hip;
+ sbintime_t create_time;
+ sbintime_t start_busy;
+ sbintime_t busy_total;
+ uint16_t partial_dur;
+ uint16_t partial_duw;
+
+ uint8_t hostid[16];
+ uint8_t hostnqn[NVME_NQN_FIELD_SIZE];
+ u_int trtype;
+
+ TAILQ_ENTRY(nvmft_controller) link;
+
+ /*
+ * Each queue can have at most UINT16_MAX commands, so the total
+ * across all queues will fit in a uint32_t.
+ */
+ uint32_t pending_commands;
+
+ volatile int ka_active_traffic;
+ struct callout ka_timer;
+ sbintime_t ka_sbt;
+
+ /* AER fields. */
+ uint32_t aer_mask;
+ uint16_t aer_cids[NVMFT_NUM_AER];
+ uint8_t aer_pending;
+ uint8_t aer_cidx;
+ uint8_t aer_pidx;
+
+ /* Changed namespace IDs. */
+ struct nvme_ns_list *changed_ns;
+ bool changed_ns_reported;
+
+ struct task shutdown_task;
+ struct timeout_task terminate_task;
+};
+
+MALLOC_DECLARE(M_NVMFT);
+
+/* ctl_frontend_nvmf.c */
+void nvmft_port_free(struct nvmft_port *np);
+void nvmft_populate_active_nslist(struct nvmft_port *np, uint32_t nsid,
+ struct nvme_ns_list *nslist);
+void nvmft_dispatch_command(struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc, bool admin);
+void nvmft_terminate_commands(struct nvmft_controller *ctrlr);
+
+/* nvmft_controller.c */
+void nvmft_controller_error(struct nvmft_controller *ctrlr,
+ struct nvmft_qpair *qp, int error);
+void nvmft_controller_lun_changed(struct nvmft_controller *ctrlr,
+ int lun_id);
+void nvmft_handle_admin_command(struct nvmft_controller *ctrlr,
+ struct nvmf_capsule *nc);
+void nvmft_handle_io_command(struct nvmft_qpair *qp, uint16_t qid,
+ struct nvmf_capsule *nc);
+int nvmft_handoff_admin_queue(struct nvmft_port *np,
+ const struct nvmf_handoff_controller_qpair *handoff,
+ const struct nvmf_fabric_connect_cmd *cmd,
+ const struct nvmf_fabric_connect_data *data);
+int nvmft_handoff_io_queue(struct nvmft_port *np,
+ const struct nvmf_handoff_controller_qpair *handoff,
+ const struct nvmf_fabric_connect_cmd *cmd,
+ const struct nvmf_fabric_connect_data *data);
+int nvmft_printf(struct nvmft_controller *ctrlr, const char *fmt, ...)
+ __printflike(2, 3);
+
+/* nvmft_qpair.c */
+struct nvmft_qpair *nvmft_qpair_init(enum nvmf_trtype trtype,
+ const struct nvmf_handoff_qpair_params *handoff, uint16_t qid,
+ const char *name);
+void nvmft_qpair_shutdown(struct nvmft_qpair *qp);
+void nvmft_qpair_destroy(struct nvmft_qpair *qp);
+struct nvmft_controller *nvmft_qpair_ctrlr(struct nvmft_qpair *qp);
+uint16_t nvmft_qpair_id(struct nvmft_qpair *qp);
+const char *nvmft_qpair_name(struct nvmft_qpair *qp);
+void nvmft_command_completed(struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc);
+int nvmft_send_response(struct nvmft_qpair *qp, const void *cqe);
+void nvmft_init_cqe(void *cqe, struct nvmf_capsule *nc, uint16_t status);
+int nvmft_send_error(struct nvmft_qpair *qp, struct nvmf_capsule *nc,
+ uint8_t sc_type, uint8_t sc_status);
+int nvmft_send_generic_error(struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc, uint8_t sc_status);
+int nvmft_send_success(struct nvmft_qpair *qp,
+ struct nvmf_capsule *nc);
+void nvmft_connect_error(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd, uint8_t sc_type,
+ uint8_t sc_status);
+void nvmft_connect_invalid_parameters(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd, bool data, uint16_t offset);
+int nvmft_finish_accept(struct nvmft_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd, struct nvmft_controller *ctrlr);
+
+static __inline void
+nvmft_port_ref(struct nvmft_port *np)
+{
+ refcount_acquire(&np->refs);
+}
+
+static __inline void
+nvmft_port_rele(struct nvmft_port *np)
+{
+ if (refcount_release(&np->refs))
+ nvmft_port_free(np);
+}
+
+#endif /* !__NVMFT_VAR_H__ */
diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c
new file mode 100644
index 000000000000..e43d438aaa8c
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf.c
@@ -0,0 +1,938 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/lock.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/memdesc.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+#include <sys/sx.h>
+#include <sys/taskqueue.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/host/nvmf_var.h>
+
+static struct cdevsw nvmf_cdevsw;
+
+MALLOC_DEFINE(M_NVMF, "nvmf", "NVMe over Fabrics host");
+
+static void nvmf_disconnect_task(void *arg, int pending);
+
+void
+nvmf_complete(void *arg, const struct nvme_completion *cqe)
+{
+ struct nvmf_completion_status *status = arg;
+ struct mtx *mtx;
+
+ status->cqe = *cqe;
+ mtx = mtx_pool_find(mtxpool_sleep, status);
+ mtx_lock(mtx);
+ status->done = true;
+ mtx_unlock(mtx);
+ wakeup(status);
+}
+
+void
+nvmf_io_complete(void *arg, size_t xfered, int error)
+{
+ struct nvmf_completion_status *status = arg;
+ struct mtx *mtx;
+
+ status->io_error = error;
+ mtx = mtx_pool_find(mtxpool_sleep, status);
+ mtx_lock(mtx);
+ status->io_done = true;
+ mtx_unlock(mtx);
+ wakeup(status);
+}
+
+void
+nvmf_wait_for_reply(struct nvmf_completion_status *status)
+{
+ struct mtx *mtx;
+
+ mtx = mtx_pool_find(mtxpool_sleep, status);
+ mtx_lock(mtx);
+ while (!status->done || !status->io_done)
+ mtx_sleep(status, mtx, 0, "nvmfcmd", 0);
+ mtx_unlock(mtx);
+}
+
+static int
+nvmf_read_property(struct nvmf_softc *sc, uint32_t offset, uint8_t size,
+ uint64_t *value)
+{
+ const struct nvmf_fabric_prop_get_rsp *rsp;
+ struct nvmf_completion_status status;
+
+ nvmf_status_init(&status);
+ if (!nvmf_cmd_get_property(sc, offset, size, nvmf_complete, &status,
+ M_WAITOK))
+ return (ECONNABORTED);
+ nvmf_wait_for_reply(&status);
+
+ if (status.cqe.status != 0) {
+ device_printf(sc->dev, "PROPERTY_GET failed, status %#x\n",
+ le16toh(status.cqe.status));
+ return (EIO);
+ }
+
+ rsp = (const struct nvmf_fabric_prop_get_rsp *)&status.cqe;
+ if (size == 8)
+ *value = le64toh(rsp->value.u64);
+ else
+ *value = le32toh(rsp->value.u32.low);
+ return (0);
+}
+
+static int
+nvmf_write_property(struct nvmf_softc *sc, uint32_t offset, uint8_t size,
+ uint64_t value)
+{
+ struct nvmf_completion_status status;
+
+ nvmf_status_init(&status);
+ if (!nvmf_cmd_set_property(sc, offset, size, value, nvmf_complete, &status,
+ M_WAITOK))
+ return (ECONNABORTED);
+ nvmf_wait_for_reply(&status);
+
+ if (status.cqe.status != 0) {
+ device_printf(sc->dev, "PROPERTY_SET failed, status %#x\n",
+ le16toh(status.cqe.status));
+ return (EIO);
+ }
+ return (0);
+}
+
+static void
+nvmf_shutdown_controller(struct nvmf_softc *sc)
+{
+ uint64_t cc;
+ int error;
+
+ error = nvmf_read_property(sc, NVMF_PROP_CC, 4, &cc);
+ if (error != 0) {
+ device_printf(sc->dev, "Failed to fetch CC for shutdown\n");
+ return;
+ }
+
+ cc |= NVMEF(NVME_CC_REG_SHN, NVME_SHN_NORMAL);
+
+ error = nvmf_write_property(sc, NVMF_PROP_CC, 4, cc);
+ if (error != 0)
+ device_printf(sc->dev,
+ "Failed to set CC to trigger shutdown\n");
+}
+
+static void
+nvmf_check_keep_alive(void *arg)
+{
+ struct nvmf_softc *sc = arg;
+ int traffic;
+
+ traffic = atomic_readandclear_int(&sc->ka_active_rx_traffic);
+ if (traffic == 0) {
+ device_printf(sc->dev,
+ "disconnecting due to KeepAlive timeout\n");
+ nvmf_disconnect(sc);
+ return;
+ }
+
+ callout_schedule_sbt(&sc->ka_rx_timer, sc->ka_rx_sbt, 0, C_HARDCLOCK);
+}
+
+static void
+nvmf_keep_alive_complete(void *arg, const struct nvme_completion *cqe)
+{
+ struct nvmf_softc *sc = arg;
+
+ atomic_store_int(&sc->ka_active_rx_traffic, 1);
+ if (cqe->status != 0) {
+ device_printf(sc->dev,
+ "KeepAlive response reported status %#x\n",
+ le16toh(cqe->status));
+ }
+}
+
+static void
+nvmf_send_keep_alive(void *arg)
+{
+ struct nvmf_softc *sc = arg;
+ int traffic;
+
+ /*
+ * Don't bother sending a KeepAlive command if TKAS is active
+ * and another command has been sent during the interval.
+ */
+ traffic = atomic_load_int(&sc->ka_active_tx_traffic);
+ if (traffic == 0 && !nvmf_cmd_keep_alive(sc, nvmf_keep_alive_complete,
+ sc, M_NOWAIT))
+ device_printf(sc->dev,
+ "Failed to allocate KeepAlive command\n");
+
+ /* Clear ka_active_tx_traffic after sending the keep alive command. */
+ atomic_store_int(&sc->ka_active_tx_traffic, 0);
+
+ callout_schedule_sbt(&sc->ka_tx_timer, sc->ka_tx_sbt, 0, C_HARDCLOCK);
+}
+
+int
+nvmf_init_ivars(struct nvmf_ivars *ivars, struct nvmf_handoff_host *hh)
+{
+ size_t len;
+ u_int i;
+ int error;
+
+ memset(ivars, 0, sizeof(*ivars));
+
+ if (!hh->admin.admin || hh->num_io_queues < 1)
+ return (EINVAL);
+
+ ivars->cdata = malloc(sizeof(*ivars->cdata), M_NVMF, M_WAITOK);
+ error = copyin(hh->cdata, ivars->cdata, sizeof(*ivars->cdata));
+ if (error != 0)
+ goto out;
+ nvme_controller_data_swapbytes(ivars->cdata);
+
+ len = hh->num_io_queues * sizeof(*ivars->io_params);
+ ivars->io_params = malloc(len, M_NVMF, M_WAITOK);
+ error = copyin(hh->io, ivars->io_params, len);
+ if (error != 0)
+ goto out;
+ for (i = 0; i < hh->num_io_queues; i++) {
+ if (ivars->io_params[i].admin) {
+ error = EINVAL;
+ goto out;
+ }
+
+ /* Require all I/O queues to be the same size. */
+ if (ivars->io_params[i].qsize != ivars->io_params[0].qsize) {
+ error = EINVAL;
+ goto out;
+ }
+ }
+
+ ivars->hh = hh;
+ return (0);
+
+out:
+ free(ivars->io_params, M_NVMF);
+ free(ivars->cdata, M_NVMF);
+ return (error);
+}
+
+void
+nvmf_free_ivars(struct nvmf_ivars *ivars)
+{
+ free(ivars->io_params, M_NVMF);
+ free(ivars->cdata, M_NVMF);
+}
+
+static int
+nvmf_probe(device_t dev)
+{
+ struct nvmf_ivars *ivars = device_get_ivars(dev);
+ char desc[260];
+
+ if (ivars == NULL)
+ return (ENXIO);
+
+ snprintf(desc, sizeof(desc), "Fabrics: %.256s", ivars->cdata->subnqn);
+ device_set_desc_copy(dev, desc);
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+nvmf_establish_connection(struct nvmf_softc *sc, struct nvmf_ivars *ivars)
+{
+ char name[16];
+
+ /* Setup the admin queue. */
+ sc->admin = nvmf_init_qp(sc, ivars->hh->trtype, &ivars->hh->admin,
+ "admin queue");
+ if (sc->admin == NULL) {
+ device_printf(sc->dev, "Failed to setup admin queue\n");
+ return (ENXIO);
+ }
+
+ /* Setup I/O queues. */
+ sc->io = malloc(ivars->hh->num_io_queues * sizeof(*sc->io), M_NVMF,
+ M_WAITOK | M_ZERO);
+ sc->num_io_queues = ivars->hh->num_io_queues;
+ for (u_int i = 0; i < sc->num_io_queues; i++) {
+ snprintf(name, sizeof(name), "I/O queue %u", i);
+ sc->io[i] = nvmf_init_qp(sc, ivars->hh->trtype,
+ &ivars->io_params[i], name);
+ if (sc->io[i] == NULL) {
+ device_printf(sc->dev, "Failed to setup I/O queue %u\n",
+ i + 1);
+ return (ENXIO);
+ }
+ }
+
+ /* Start KeepAlive timers. */
+ if (ivars->hh->kato != 0) {
+ sc->ka_traffic = NVMEV(NVME_CTRLR_DATA_CTRATT_TBKAS,
+ sc->cdata->ctratt) != 0;
+ sc->ka_rx_sbt = mstosbt(ivars->hh->kato);
+ sc->ka_tx_sbt = sc->ka_rx_sbt / 2;
+ callout_reset_sbt(&sc->ka_rx_timer, sc->ka_rx_sbt, 0,
+ nvmf_check_keep_alive, sc, C_HARDCLOCK);
+ callout_reset_sbt(&sc->ka_tx_timer, sc->ka_tx_sbt, 0,
+ nvmf_send_keep_alive, sc, C_HARDCLOCK);
+ }
+
+ return (0);
+}
+
+static bool
+nvmf_scan_nslist(struct nvmf_softc *sc, struct nvme_ns_list *nslist,
+ struct nvme_namespace_data *data, uint32_t *nsidp)
+{
+ struct nvmf_completion_status status;
+ uint32_t nsid;
+
+ nvmf_status_init(&status);
+ nvmf_status_wait_io(&status);
+ if (!nvmf_cmd_identify_active_namespaces(sc, *nsidp, nslist,
+ nvmf_complete, &status, nvmf_io_complete, &status, M_WAITOK)) {
+ device_printf(sc->dev,
+ "failed to send IDENTIFY active namespaces command\n");
+ return (false);
+ }
+ nvmf_wait_for_reply(&status);
+
+ if (status.cqe.status != 0) {
+ device_printf(sc->dev,
+ "IDENTIFY active namespaces failed, status %#x\n",
+ le16toh(status.cqe.status));
+ return (false);
+ }
+
+ if (status.io_error != 0) {
+ device_printf(sc->dev,
+ "IDENTIFY active namespaces failed with I/O error %d\n",
+ status.io_error);
+ return (false);
+ }
+
+ for (u_int i = 0; i < nitems(nslist->ns); i++) {
+ nsid = nslist->ns[i];
+ if (nsid == 0) {
+ *nsidp = 0;
+ return (true);
+ }
+
+ if (sc->ns[nsid - 1] != NULL) {
+ device_printf(sc->dev,
+ "duplicate namespace %u in active namespace list\n",
+ nsid);
+ return (false);
+ }
+
+ nvmf_status_init(&status);
+ nvmf_status_wait_io(&status);
+ if (!nvmf_cmd_identify_namespace(sc, nsid, data, nvmf_complete,
+ &status, nvmf_io_complete, &status, M_WAITOK)) {
+ device_printf(sc->dev,
+ "failed to send IDENTIFY namespace %u command\n",
+ nsid);
+ return (false);
+ }
+ nvmf_wait_for_reply(&status);
+
+ if (status.cqe.status != 0) {
+ device_printf(sc->dev,
+ "IDENTIFY namespace %u failed, status %#x\n", nsid,
+ le16toh(status.cqe.status));
+ return (false);
+ }
+
+ if (status.io_error != 0) {
+ device_printf(sc->dev,
+ "IDENTIFY namespace %u failed with I/O error %d\n",
+ nsid, status.io_error);
+ return (false);
+ }
+
+ /*
+ * As in nvme_ns_construct, a size of zero indicates an
+ * invalid namespace.
+ */
+ nvme_namespace_data_swapbytes(data);
+ if (data->nsze == 0) {
+ device_printf(sc->dev,
+ "ignoring active namespace %u with zero size\n",
+ nsid);
+ continue;
+ }
+
+ sc->ns[nsid - 1] = nvmf_init_ns(sc, nsid, data);
+
+ nvmf_sim_rescan_ns(sc, nsid);
+ }
+
+ MPASS(nsid == nslist->ns[nitems(nslist->ns) - 1] && nsid != 0);
+
+ if (nsid >= 0xfffffffd)
+ *nsidp = 0;
+ else
+ *nsidp = nsid + 1;
+ return (true);
+}
+
+static bool
+nvmf_add_namespaces(struct nvmf_softc *sc)
+{
+ struct nvme_namespace_data *data;
+ struct nvme_ns_list *nslist;
+ uint32_t nsid;
+ bool retval;
+
+ sc->ns = mallocarray(sc->cdata->nn, sizeof(*sc->ns), M_NVMF,
+ M_WAITOK | M_ZERO);
+ nslist = malloc(sizeof(*nslist), M_NVMF, M_WAITOK);
+ data = malloc(sizeof(*data), M_NVMF, M_WAITOK);
+
+ nsid = 0;
+ retval = true;
+ for (;;) {
+ if (!nvmf_scan_nslist(sc, nslist, data, &nsid)) {
+ retval = false;
+ break;
+ }
+ if (nsid == 0)
+ break;
+ }
+
+ free(data, M_NVMF);
+ free(nslist, M_NVMF);
+ return (retval);
+}
+
+static int
+nvmf_attach(device_t dev)
+{
+ struct make_dev_args mda;
+ struct nvmf_softc *sc = device_get_softc(dev);
+ struct nvmf_ivars *ivars = device_get_ivars(dev);
+ uint64_t val;
+ u_int i;
+ int error;
+
+ if (ivars == NULL)
+ return (ENXIO);
+
+ sc->dev = dev;
+ sc->trtype = ivars->hh->trtype;
+ callout_init(&sc->ka_rx_timer, 1);
+ callout_init(&sc->ka_tx_timer, 1);
+ sx_init(&sc->connection_lock, "nvmf connection");
+ TASK_INIT(&sc->disconnect_task, 0, nvmf_disconnect_task, sc);
+
+ /* Claim the cdata pointer from ivars. */
+ sc->cdata = ivars->cdata;
+ ivars->cdata = NULL;
+
+ nvmf_init_aer(sc);
+
+ /* TODO: Multiqueue support. */
+ sc->max_pending_io = ivars->io_params[0].qsize /* * sc->num_io_queues */;
+
+ error = nvmf_establish_connection(sc, ivars);
+ if (error != 0)
+ goto out;
+
+ error = nvmf_read_property(sc, NVMF_PROP_CAP, 8, &sc->cap);
+ if (error != 0) {
+ device_printf(sc->dev, "Failed to fetch CAP\n");
+ error = ENXIO;
+ goto out;
+ }
+
+ error = nvmf_read_property(sc, NVMF_PROP_VS, 4, &val);
+ if (error != 0) {
+ device_printf(sc->dev, "Failed to fetch VS\n");
+ error = ENXIO;
+ goto out;
+ }
+ sc->vs = val;
+
+ /* Honor MDTS if it is set. */
+ sc->max_xfer_size = maxphys;
+ if (sc->cdata->mdts != 0) {
+ sc->max_xfer_size = ulmin(sc->max_xfer_size,
+ 1 << (sc->cdata->mdts + NVME_MPS_SHIFT +
+ NVME_CAP_HI_MPSMIN(sc->cap >> 32)));
+ }
+
+ error = nvmf_init_sim(sc);
+ if (error != 0)
+ goto out;
+
+ error = nvmf_start_aer(sc);
+ if (error != 0) {
+ nvmf_destroy_sim(sc);
+ goto out;
+ }
+
+ if (!nvmf_add_namespaces(sc)) {
+ nvmf_destroy_sim(sc);
+ goto out;
+ }
+
+ make_dev_args_init(&mda);
+ mda.mda_devsw = &nvmf_cdevsw;
+ mda.mda_uid = UID_ROOT;
+ mda.mda_gid = GID_WHEEL;
+ mda.mda_mode = 0600;
+ mda.mda_si_drv1 = sc;
+ error = make_dev_s(&mda, &sc->cdev, "%s", device_get_nameunit(dev));
+ if (error != 0) {
+ nvmf_destroy_sim(sc);
+ goto out;
+ }
+
+ return (0);
+out:
+ if (sc->ns != NULL) {
+ for (i = 0; i < sc->cdata->nn; i++) {
+ if (sc->ns[i] != NULL)
+ nvmf_destroy_ns(sc->ns[i]);
+ }
+ free(sc->ns, M_NVMF);
+ }
+
+ callout_drain(&sc->ka_tx_timer);
+ callout_drain(&sc->ka_rx_timer);
+
+ if (sc->admin != NULL)
+ nvmf_shutdown_controller(sc);
+
+ for (i = 0; i < sc->num_io_queues; i++) {
+ if (sc->io[i] != NULL)
+ nvmf_destroy_qp(sc->io[i]);
+ }
+ free(sc->io, M_NVMF);
+ if (sc->admin != NULL)
+ nvmf_destroy_qp(sc->admin);
+
+ nvmf_destroy_aer(sc);
+
+ taskqueue_drain(taskqueue_thread, &sc->disconnect_task);
+ sx_destroy(&sc->connection_lock);
+ free(sc->cdata, M_NVMF);
+ return (error);
+}
+
+void
+nvmf_disconnect(struct nvmf_softc *sc)
+{
+ taskqueue_enqueue(taskqueue_thread, &sc->disconnect_task);
+}
+
+static void
+nvmf_disconnect_task(void *arg, int pending __unused)
+{
+ struct nvmf_softc *sc = arg;
+ u_int i;
+
+ sx_xlock(&sc->connection_lock);
+ if (sc->admin == NULL) {
+ /*
+ * Ignore transport errors if there is no active
+ * association.
+ */
+ sx_xunlock(&sc->connection_lock);
+ return;
+ }
+
+ if (sc->detaching) {
+ if (sc->admin != NULL) {
+ /*
+ * This unsticks the detach process if a
+ * transport error occurs during detach.
+ */
+ nvmf_shutdown_qp(sc->admin);
+ }
+ sx_xunlock(&sc->connection_lock);
+ return;
+ }
+
+ if (sc->cdev == NULL) {
+ /*
+ * Transport error occurred during attach (nvmf_add_namespaces).
+ * Shutdown the admin queue.
+ */
+ nvmf_shutdown_qp(sc->admin);
+ sx_xunlock(&sc->connection_lock);
+ return;
+ }
+
+ callout_drain(&sc->ka_tx_timer);
+ callout_drain(&sc->ka_rx_timer);
+ sc->ka_traffic = false;
+
+ /* Quiesce namespace consumers. */
+ nvmf_disconnect_sim(sc);
+ for (i = 0; i < sc->cdata->nn; i++) {
+ if (sc->ns[i] != NULL)
+ nvmf_disconnect_ns(sc->ns[i]);
+ }
+
+ /* Shutdown the existing qpairs. */
+ for (i = 0; i < sc->num_io_queues; i++) {
+ nvmf_destroy_qp(sc->io[i]);
+ }
+ free(sc->io, M_NVMF);
+ sc->io = NULL;
+ sc->num_io_queues = 0;
+ nvmf_destroy_qp(sc->admin);
+ sc->admin = NULL;
+
+ sx_xunlock(&sc->connection_lock);
+}
+
+static int
+nvmf_reconnect_host(struct nvmf_softc *sc, struct nvmf_handoff_host *hh)
+{
+ struct nvmf_ivars ivars;
+ u_int i;
+ int error;
+
+ /* XXX: Should we permit changing the transport type? */
+ if (sc->trtype != hh->trtype) {
+ device_printf(sc->dev,
+ "transport type mismatch on reconnect\n");
+ return (EINVAL);
+ }
+
+ error = nvmf_init_ivars(&ivars, hh);
+ if (error != 0)
+ return (error);
+
+ sx_xlock(&sc->connection_lock);
+ if (sc->admin != NULL || sc->detaching) {
+ error = EBUSY;
+ goto out;
+ }
+
+ /*
+ * Ensure this is for the same controller. Note that the
+ * controller ID can vary across associations if the remote
+ * system is using the dynamic controller model. This merely
+ * ensures the new association is connected to the same NVMe
+ * subsystem.
+ */
+ if (memcmp(sc->cdata->subnqn, ivars.cdata->subnqn,
+ sizeof(ivars.cdata->subnqn)) != 0) {
+ device_printf(sc->dev,
+ "controller subsystem NQN mismatch on reconnect\n");
+ error = EINVAL;
+ goto out;
+ }
+
+ /*
+ * XXX: Require same number and size of I/O queues so that
+ * max_pending_io is still correct?
+ */
+
+ error = nvmf_establish_connection(sc, &ivars);
+ if (error != 0)
+ goto out;
+
+ error = nvmf_start_aer(sc);
+ if (error != 0)
+ goto out;
+
+ device_printf(sc->dev,
+ "established new association with %u I/O queues\n",
+ sc->num_io_queues);
+
+ /* Restart namespace consumers. */
+ for (i = 0; i < sc->cdata->nn; i++) {
+ if (sc->ns[i] != NULL)
+ nvmf_reconnect_ns(sc->ns[i]);
+ }
+ nvmf_reconnect_sim(sc);
+out:
+ sx_xunlock(&sc->connection_lock);
+ nvmf_free_ivars(&ivars);
+ return (error);
+}
+
+static int
+nvmf_detach(device_t dev)
+{
+ struct nvmf_softc *sc = device_get_softc(dev);
+ u_int i;
+
+ destroy_dev(sc->cdev);
+
+ sx_xlock(&sc->connection_lock);
+ sc->detaching = true;
+ sx_xunlock(&sc->connection_lock);
+
+ nvmf_destroy_sim(sc);
+ for (i = 0; i < sc->cdata->nn; i++) {
+ if (sc->ns[i] != NULL)
+ nvmf_destroy_ns(sc->ns[i]);
+ }
+ free(sc->ns, M_NVMF);
+
+ callout_drain(&sc->ka_tx_timer);
+ callout_drain(&sc->ka_rx_timer);
+
+ if (sc->admin != NULL)
+ nvmf_shutdown_controller(sc);
+
+ for (i = 0; i < sc->num_io_queues; i++) {
+ nvmf_destroy_qp(sc->io[i]);
+ }
+ free(sc->io, M_NVMF);
+
+ taskqueue_drain(taskqueue_thread, &sc->disconnect_task);
+
+ if (sc->admin != NULL)
+ nvmf_destroy_qp(sc->admin);
+
+ nvmf_destroy_aer(sc);
+
+ sx_destroy(&sc->connection_lock);
+ free(sc->cdata, M_NVMF);
+ return (0);
+}
+
+void
+nvmf_rescan_ns(struct nvmf_softc *sc, uint32_t nsid)
+{
+ struct nvmf_completion_status status;
+ struct nvme_namespace_data *data;
+ struct nvmf_namespace *ns;
+
+ data = malloc(sizeof(*data), M_NVMF, M_WAITOK);
+
+ nvmf_status_init(&status);
+ nvmf_status_wait_io(&status);
+ if (!nvmf_cmd_identify_namespace(sc, nsid, data, nvmf_complete,
+ &status, nvmf_io_complete, &status, M_WAITOK)) {
+ device_printf(sc->dev,
+ "failed to send IDENTIFY namespace %u command\n", nsid);
+ free(data, M_NVMF);
+ return;
+ }
+ nvmf_wait_for_reply(&status);
+
+ if (status.cqe.status != 0) {
+ device_printf(sc->dev,
+ "IDENTIFY namespace %u failed, status %#x\n", nsid,
+ le16toh(status.cqe.status));
+ free(data, M_NVMF);
+ return;
+ }
+
+ if (status.io_error != 0) {
+ device_printf(sc->dev,
+ "IDENTIFY namespace %u failed with I/O error %d\n",
+ nsid, status.io_error);
+ free(data, M_NVMF);
+ return;
+ }
+
+ nvme_namespace_data_swapbytes(data);
+
+ /* XXX: Needs locking around sc->ns[]. */
+ ns = sc->ns[nsid - 1];
+ if (data->nsze == 0) {
+ /* XXX: Needs locking */
+ if (ns != NULL) {
+ nvmf_destroy_ns(ns);
+ sc->ns[nsid - 1] = NULL;
+ }
+ } else {
+ /* XXX: Needs locking */
+ if (ns == NULL) {
+ sc->ns[nsid - 1] = nvmf_init_ns(sc, nsid, data);
+ } else {
+ if (!nvmf_update_ns(ns, data)) {
+ nvmf_destroy_ns(ns);
+ sc->ns[nsid - 1] = NULL;
+ }
+ }
+ }
+
+ free(data, M_NVMF);
+
+ nvmf_sim_rescan_ns(sc, nsid);
+}
+
+int
+nvmf_passthrough_cmd(struct nvmf_softc *sc, struct nvme_pt_command *pt,
+ bool admin)
+{
+ struct nvmf_completion_status status;
+ struct nvme_command cmd;
+ struct memdesc mem;
+ struct nvmf_host_qpair *qp;
+ struct nvmf_request *req;
+ void *buf;
+ int error;
+
+ if (pt->len > sc->max_xfer_size)
+ return (EINVAL);
+
+ buf = NULL;
+ if (pt->len != 0) {
+ /*
+ * XXX: Depending on the size we may want to pin the
+ * user pages and use a memdesc with vm_page_t's
+ * instead.
+ */
+ buf = malloc(pt->len, M_NVMF, M_WAITOK);
+ if (pt->is_read == 0) {
+ error = copyin(pt->buf, buf, pt->len);
+ if (error != 0) {
+ free(buf, M_NVMF);
+ return (error);
+ }
+ } else {
+ /* Ensure no kernel data is leaked to userland. */
+ memset(buf, 0, pt->len);
+ }
+ }
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = pt->cmd.opc;
+ cmd.fuse = pt->cmd.fuse;
+ cmd.nsid = pt->cmd.nsid;
+ cmd.cdw10 = pt->cmd.cdw10;
+ cmd.cdw11 = pt->cmd.cdw11;
+ cmd.cdw12 = pt->cmd.cdw12;
+ cmd.cdw13 = pt->cmd.cdw13;
+ cmd.cdw14 = pt->cmd.cdw14;
+ cmd.cdw15 = pt->cmd.cdw15;
+
+ if (admin)
+ qp = sc->admin;
+ else
+ qp = nvmf_select_io_queue(sc);
+ nvmf_status_init(&status);
+ req = nvmf_allocate_request(qp, &cmd, nvmf_complete, &status, M_WAITOK);
+ if (req == NULL) {
+ device_printf(sc->dev, "failed to send passthrough command\n");
+ error = ECONNABORTED;
+ goto error;
+ }
+
+ if (pt->len != 0) {
+ mem = memdesc_vaddr(buf, pt->len);
+ nvmf_capsule_append_data(req->nc, &mem, pt->len,
+ pt->is_read == 0, nvmf_io_complete, &status);
+ nvmf_status_wait_io(&status);
+ }
+
+ nvmf_submit_request(req);
+ nvmf_wait_for_reply(&status);
+
+ memset(&pt->cpl, 0, sizeof(pt->cpl));
+ pt->cpl.cdw0 = status.cqe.cdw0;
+ pt->cpl.status = status.cqe.status;
+
+ error = status.io_error;
+ if (error == 0 && pt->len != 0 && pt->is_read != 0)
+ error = copyout(buf, pt->buf, pt->len);
+error:
+ free(buf, M_NVMF);
+ return (error);
+}
+
+static int
+nvmf_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag,
+ struct thread *td)
+{
+ struct nvmf_softc *sc = cdev->si_drv1;
+ struct nvme_get_nsid *gnsid;
+ struct nvme_pt_command *pt;
+ struct nvmf_reconnect_params *rp;
+ struct nvmf_handoff_host *hh;
+
+ switch (cmd) {
+ case NVME_PASSTHROUGH_CMD:
+ pt = (struct nvme_pt_command *)arg;
+ return (nvmf_passthrough_cmd(sc, pt, true));
+ case NVME_GET_NSID:
+ gnsid = (struct nvme_get_nsid *)arg;
+ strlcpy(gnsid->cdev, device_get_nameunit(sc->dev),
+ sizeof(gnsid->cdev));
+ gnsid->nsid = 0;
+ return (0);
+ case NVME_GET_MAX_XFER_SIZE:
+ *(uint64_t *)arg = sc->max_xfer_size;
+ return (0);
+ case NVMF_RECONNECT_PARAMS:
+ rp = (struct nvmf_reconnect_params *)arg;
+ if ((sc->cdata->fcatt & 1) == 0)
+ rp->cntlid = NVMF_CNTLID_DYNAMIC;
+ else
+ rp->cntlid = sc->cdata->ctrlr_id;
+ memcpy(rp->subnqn, sc->cdata->subnqn, sizeof(rp->subnqn));
+ return (0);
+ case NVMF_RECONNECT_HOST:
+ hh = (struct nvmf_handoff_host *)arg;
+ return (nvmf_reconnect_host(sc, hh));
+ default:
+ return (ENOTTY);
+ }
+}
+
+static struct cdevsw nvmf_cdevsw = {
+ .d_version = D_VERSION,
+ .d_ioctl = nvmf_ioctl
+};
+
+static int
+nvmf_modevent(module_t mod, int what, void *arg)
+{
+ switch (what) {
+ case MOD_LOAD:
+ return (nvmf_ctl_load());
+ case MOD_QUIESCE:
+ return (0);
+ case MOD_UNLOAD:
+ nvmf_ctl_unload();
+ destroy_dev_drain(&nvmf_cdevsw);
+ return (0);
+ default:
+ return (EOPNOTSUPP);
+ }
+}
+
+static device_method_t nvmf_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, nvmf_probe),
+ DEVMETHOD(device_attach, nvmf_attach),
+ DEVMETHOD(device_detach, nvmf_detach),
+#if 0
+ DEVMETHOD(device_shutdown, nvmf_shutdown),
+#endif
+ DEVMETHOD_END
+};
+
+driver_t nvme_nvmf_driver = {
+ "nvme",
+ nvmf_methods,
+ sizeof(struct nvmf_softc),
+};
+
+DRIVER_MODULE(nvme, root, nvme_nvmf_driver, nvmf_modevent, NULL);
+MODULE_DEPEND(nvmf, nvmf_transport, 1, 1, 1);
diff --git a/sys/dev/nvmf/host/nvmf_aer.c b/sys/dev/nvmf/host/nvmf_aer.c
new file mode 100644
index 000000000000..4c950f1518d0
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_aer.c
@@ -0,0 +1,290 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/types.h>
+#include <sys/bus.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mutex.h>
+#include <sys/taskqueue.h>
+#include <dev/nvmf/host/nvmf_var.h>
+
+struct nvmf_aer {
+ struct nvmf_softc *sc;
+ uint8_t log_page_id;
+ uint8_t info;
+ uint8_t type;
+
+ u_int page_len;
+ void *page;
+
+ int error;
+ uint16_t status;
+ int pending;
+ struct mtx *lock;
+ struct task complete_task;
+ struct task finish_page_task;
+};
+
+#define MAX_LOG_PAGE_SIZE 4096
+
+static void nvmf_complete_aer(void *arg, const struct nvme_completion *cqe);
+
+static void
+nvmf_submit_aer(struct nvmf_softc *sc, struct nvmf_aer *aer)
+{
+ struct nvmf_request *req;
+ struct nvme_command cmd;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = NVME_OPC_ASYNC_EVENT_REQUEST;
+
+ req = nvmf_allocate_request(sc->admin, &cmd, nvmf_complete_aer, aer,
+ M_WAITOK);
+ if (req == NULL)
+ return;
+ req->aer = true;
+ nvmf_submit_request(req);
+}
+
+static void
+nvmf_handle_changed_namespaces(struct nvmf_softc *sc,
+ struct nvme_ns_list *ns_list)
+{
+ uint32_t nsid;
+
+ /*
+ * If more than 1024 namespaces have changed, we should
+ * probably just rescan the entire set of namespaces.
+ */
+ if (ns_list->ns[0] == 0xffffffff) {
+ device_printf(sc->dev, "too many changed namespaces\n");
+ return;
+ }
+
+ for (u_int i = 0; i < nitems(ns_list->ns); i++) {
+ if (ns_list->ns[i] == 0)
+ break;
+
+ nsid = le32toh(ns_list->ns[i]);
+ nvmf_rescan_ns(sc, nsid);
+ }
+}
+
+static void
+nvmf_finish_aer_page(struct nvmf_softc *sc, struct nvmf_aer *aer)
+{
+ /* If an error occurred fetching the page, just bail. */
+ if (aer->error != 0 || aer->status != 0)
+ return;
+
+ taskqueue_enqueue(taskqueue_thread, &aer->finish_page_task);
+}
+
+static void
+nvmf_finish_aer_page_task(void *arg, int pending)
+{
+ struct nvmf_aer *aer = arg;
+ struct nvmf_softc *sc = aer->sc;
+
+ switch (aer->log_page_id) {
+ case NVME_LOG_ERROR:
+ /* TODO: Should we log these? */
+ break;
+ case NVME_LOG_CHANGED_NAMESPACE:
+ nvmf_handle_changed_namespaces(sc, aer->page);
+ break;
+ }
+
+ /* Resubmit this AER command. */
+ nvmf_submit_aer(sc, aer);
+}
+
+static void
+nvmf_io_complete_aer_page(void *arg, size_t xfered, int error)
+{
+ struct nvmf_aer *aer = arg;
+ struct nvmf_softc *sc = aer->sc;
+
+ mtx_lock(aer->lock);
+ aer->error = error;
+ aer->pending--;
+ if (aer->pending == 0) {
+ mtx_unlock(aer->lock);
+ nvmf_finish_aer_page(sc, aer);
+ } else
+ mtx_unlock(aer->lock);
+}
+
+static void
+nvmf_complete_aer_page(void *arg, const struct nvme_completion *cqe)
+{
+ struct nvmf_aer *aer = arg;
+ struct nvmf_softc *sc = aer->sc;
+
+ mtx_lock(aer->lock);
+ aer->status = cqe->status;
+ aer->pending--;
+ if (aer->pending == 0) {
+ mtx_unlock(aer->lock);
+ nvmf_finish_aer_page(sc, aer);
+ } else
+ mtx_unlock(aer->lock);
+}
+
+static u_int
+nvmf_log_page_size(struct nvmf_softc *sc, uint8_t log_page_id)
+{
+ switch (log_page_id) {
+ case NVME_LOG_ERROR:
+ return ((sc->cdata->elpe + 1) *
+ sizeof(struct nvme_error_information_entry));
+ case NVME_LOG_CHANGED_NAMESPACE:
+ return (sizeof(struct nvme_ns_list));
+ default:
+ return (0);
+ }
+}
+
+static void
+nvmf_complete_aer(void *arg, const struct nvme_completion *cqe)
+{
+ struct nvmf_aer *aer = arg;
+ struct nvmf_softc *sc = aer->sc;
+ uint32_t cdw0;
+
+ /*
+ * The only error defined for AER is an abort due to
+ * submitting too many AER commands. Just discard this AER
+ * without resubmitting if we get an error.
+ *
+ * NB: Pending AER commands are aborted during controller
+ * shutdown, so discard aborted commands silently.
+ */
+ if (cqe->status != 0) {
+ if (!nvmf_cqe_aborted(cqe))
+ device_printf(sc->dev, "Ignoring error %#x for AER\n",
+ le16toh(cqe->status));
+ return;
+ }
+
+ cdw0 = le32toh(cqe->cdw0);
+ aer->log_page_id = NVMEV(NVME_ASYNC_EVENT_LOG_PAGE_ID, cdw0);
+ aer->info = NVMEV(NVME_ASYNC_EVENT_INFO, cdw0);
+ aer->type = NVMEV(NVME_ASYNC_EVENT_TYPE, cdw0);
+
+ device_printf(sc->dev, "AER type %u, info %#x, page %#x\n",
+ aer->type, aer->info, aer->log_page_id);
+
+ aer->page_len = nvmf_log_page_size(sc, aer->log_page_id);
+ taskqueue_enqueue(taskqueue_thread, &aer->complete_task);
+}
+
+static void
+nvmf_complete_aer_task(void *arg, int pending)
+{
+ struct nvmf_aer *aer = arg;
+ struct nvmf_softc *sc = aer->sc;
+
+ if (aer->page_len != 0) {
+ /* Read the associated log page. */
+ aer->page_len = MIN(aer->page_len, MAX_LOG_PAGE_SIZE);
+ aer->pending = 2;
+ (void) nvmf_cmd_get_log_page(sc, NVME_GLOBAL_NAMESPACE_TAG,
+ aer->log_page_id, 0, aer->page, aer->page_len,
+ nvmf_complete_aer_page, aer, nvmf_io_complete_aer_page,
+ aer, M_WAITOK);
+ } else {
+ /* Resubmit this AER command. */
+ nvmf_submit_aer(sc, aer);
+ }
+}
+
+static int
+nvmf_set_async_event_config(struct nvmf_softc *sc, uint32_t config)
+{
+ struct nvme_command cmd;
+ struct nvmf_completion_status status;
+ struct nvmf_request *req;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = NVME_OPC_SET_FEATURES;
+ cmd.cdw10 = htole32(NVME_FEAT_ASYNC_EVENT_CONFIGURATION);
+ cmd.cdw11 = htole32(config);
+
+ nvmf_status_init(&status);
+ req = nvmf_allocate_request(sc->admin, &cmd, nvmf_complete, &status,
+ M_WAITOK);
+ if (req == NULL) {
+ device_printf(sc->dev,
+ "failed to allocate SET_FEATURES (ASYNC_EVENT_CONFIGURATION) command\n");
+ return (ECONNABORTED);
+ }
+ nvmf_submit_request(req);
+ nvmf_wait_for_reply(&status);
+
+ if (status.cqe.status != 0) {
+ device_printf(sc->dev,
+ "SET_FEATURES (ASYNC_EVENT_CONFIGURATION) failed, status %#x\n",
+ le16toh(status.cqe.status));
+ return (EIO);
+ }
+
+ return (0);
+}
+
+void
+nvmf_init_aer(struct nvmf_softc *sc)
+{
+ /* 8 matches NVME_MAX_ASYNC_EVENTS */
+ sc->num_aer = min(8, sc->cdata->aerl + 1);
+ sc->aer = mallocarray(sc->num_aer, sizeof(*sc->aer), M_NVMF,
+ M_WAITOK | M_ZERO);
+ for (u_int i = 0; i < sc->num_aer; i++) {
+ sc->aer[i].sc = sc;
+ sc->aer[i].page = malloc(MAX_LOG_PAGE_SIZE, M_NVMF, M_WAITOK);
+ sc->aer[i].lock = mtx_pool_find(mtxpool_sleep, &sc->aer[i]);
+ TASK_INIT(&sc->aer[i].complete_task, 0, nvmf_complete_aer_task,
+ &sc->aer[i]);
+ TASK_INIT(&sc->aer[i].finish_page_task, 0,
+ nvmf_finish_aer_page_task, &sc->aer[i]);
+ }
+}
+
+int
+nvmf_start_aer(struct nvmf_softc *sc)
+{
+ uint32_t async_event_config;
+ int error;
+
+ async_event_config = NVME_CRIT_WARN_ST_AVAILABLE_SPARE |
+ NVME_CRIT_WARN_ST_DEVICE_RELIABILITY |
+ NVME_CRIT_WARN_ST_READ_ONLY |
+ NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP;
+ if (sc->cdata->ver >= NVME_REV(1, 2))
+ async_event_config |=
+ sc->cdata->oaes & NVME_ASYNC_EVENT_NS_ATTRIBUTE;
+ error = nvmf_set_async_event_config(sc, async_event_config);
+ if (error != 0)
+ return (error);
+
+ for (u_int i = 0; i < sc->num_aer; i++)
+ nvmf_submit_aer(sc, &sc->aer[i]);
+
+ return (0);
+}
+
+void
+nvmf_destroy_aer(struct nvmf_softc *sc)
+{
+ for (u_int i = 0; i < sc->num_aer; i++) {
+ taskqueue_drain(taskqueue_thread, &sc->aer[i].complete_task);
+ taskqueue_drain(taskqueue_thread, &sc->aer[i].finish_page_task);
+ free(sc->aer[i].page, M_NVMF);
+ }
+ free(sc->aer, M_NVMF);
+}
diff --git a/sys/dev/nvmf/host/nvmf_cmd.c b/sys/dev/nvmf/host/nvmf_cmd.c
new file mode 100644
index 000000000000..3bb7404992a2
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_cmd.c
@@ -0,0 +1,171 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/types.h>
+#include <sys/memdesc.h>
+#include <sys/systm.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_proto.h>
+#include <dev/nvmf/host/nvmf_var.h>
+
+bool
+nvmf_cmd_get_property(struct nvmf_softc *sc, uint32_t offset, uint8_t size,
+ nvmf_request_complete_t *cb, void *cb_arg, int how)
+{
+ struct nvmf_fabric_prop_get_cmd cmd;
+ struct nvmf_request *req;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opcode = NVME_OPC_FABRICS_COMMANDS;
+ cmd.fctype = NVMF_FABRIC_COMMAND_PROPERTY_GET;
+ switch (size) {
+ case 4:
+ cmd.attrib.size = NVMF_PROP_SIZE_4;
+ break;
+ case 8:
+ cmd.attrib.size = NVMF_PROP_SIZE_8;
+ break;
+ default:
+ panic("Invalid property size");
+ }
+ cmd.ofst = htole32(offset);
+
+ req = nvmf_allocate_request(sc->admin, &cmd, cb, cb_arg, how);
+ if (req != NULL)
+ nvmf_submit_request(req);
+ return (req != NULL);
+}
+
+bool
+nvmf_cmd_set_property(struct nvmf_softc *sc, uint32_t offset, uint8_t size,
+ uint64_t value, nvmf_request_complete_t *cb, void *cb_arg, int how)
+{
+ struct nvmf_fabric_prop_set_cmd cmd;
+ struct nvmf_request *req;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opcode = NVME_OPC_FABRICS_COMMANDS;
+ cmd.fctype = NVMF_FABRIC_COMMAND_PROPERTY_SET;
+ switch (size) {
+ case 4:
+ cmd.attrib.size = NVMF_PROP_SIZE_4;
+ cmd.value.u32.low = htole32(value);
+ break;
+ case 8:
+ cmd.attrib.size = NVMF_PROP_SIZE_8;
+ cmd.value.u64 = htole64(value);
+ break;
+ default:
+ panic("Invalid property size");
+ }
+ cmd.ofst = htole32(offset);
+
+ req = nvmf_allocate_request(sc->admin, &cmd, cb, cb_arg, how);
+ if (req != NULL)
+ nvmf_submit_request(req);
+ return (req != NULL);
+}
+
+bool
+nvmf_cmd_keep_alive(struct nvmf_softc *sc, nvmf_request_complete_t *cb,
+ void *cb_arg, int how)
+{
+ struct nvme_command cmd;
+ struct nvmf_request *req;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = NVME_OPC_KEEP_ALIVE;
+
+ req = nvmf_allocate_request(sc->admin, &cmd, cb, cb_arg, how);
+ if (req != NULL)
+ nvmf_submit_request(req);
+ return (req != NULL);
+}
+
+bool
+nvmf_cmd_identify_active_namespaces(struct nvmf_softc *sc, uint32_t id,
+ struct nvme_ns_list *nslist, nvmf_request_complete_t *req_cb,
+ void *req_cb_arg, nvmf_io_complete_t *io_cb, void *io_cb_arg, int how)
+{
+ struct nvme_command cmd;
+ struct memdesc mem;
+ struct nvmf_request *req;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = NVME_OPC_IDENTIFY;
+
+ /* 5.15.1 Use CNS of 0x02 for namespace data. */
+ cmd.cdw10 = htole32(2);
+ cmd.nsid = htole32(id);
+
+ req = nvmf_allocate_request(sc->admin, &cmd, req_cb, req_cb_arg, how);
+ if (req == NULL)
+ return (false);
+ mem = memdesc_vaddr(nslist, sizeof(*nslist));
+ nvmf_capsule_append_data(req->nc, &mem, sizeof(*nslist), false,
+ io_cb, io_cb_arg);
+ nvmf_submit_request(req);
+ return (true);
+}
+
+bool
+nvmf_cmd_identify_namespace(struct nvmf_softc *sc, uint32_t id,
+ struct nvme_namespace_data *nsdata, nvmf_request_complete_t *req_cb,
+ void *req_cb_arg, nvmf_io_complete_t *io_cb, void *io_cb_arg, int how)
+{
+ struct nvme_command cmd;
+ struct memdesc mem;
+ struct nvmf_request *req;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = NVME_OPC_IDENTIFY;
+
+ /* 5.15.1 Use CNS of 0x00 for namespace data. */
+ cmd.cdw10 = htole32(0);
+ cmd.nsid = htole32(id);
+
+ req = nvmf_allocate_request(sc->admin, &cmd, req_cb, req_cb_arg, how);
+ if (req == NULL)
+ return (false);
+ mem = memdesc_vaddr(nsdata, sizeof(*nsdata));
+ nvmf_capsule_append_data(req->nc, &mem, sizeof(*nsdata), false,
+ io_cb, io_cb_arg);
+ nvmf_submit_request(req);
+ return (true);
+}
+
+bool
+nvmf_cmd_get_log_page(struct nvmf_softc *sc, uint32_t nsid, uint8_t lid,
+ uint64_t offset, void *buf, size_t len, nvmf_request_complete_t *req_cb,
+ void *req_cb_arg, nvmf_io_complete_t *io_cb, void *io_cb_arg, int how)
+{
+ struct nvme_command cmd;
+ struct memdesc mem;
+ struct nvmf_request *req;
+ size_t numd;
+
+ MPASS(len != 0 && len % 4 == 0);
+ MPASS(offset % 4 == 0);
+
+ numd = (len / 4) - 1;
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = NVME_OPC_GET_LOG_PAGE;
+ cmd.nsid = htole32(nsid);
+ cmd.cdw10 = htole32(numd << 16 | lid);
+ cmd.cdw11 = htole32(numd >> 16);
+ cmd.cdw12 = htole32(offset);
+ cmd.cdw13 = htole32(offset >> 32);
+
+ req = nvmf_allocate_request(sc->admin, &cmd, req_cb, req_cb_arg, how);
+ if (req == NULL)
+ return (false);
+ mem = memdesc_vaddr(buf, len);
+ nvmf_capsule_append_data(req->nc, &mem, len, false, io_cb, io_cb_arg);
+ nvmf_submit_request(req);
+ return (true);
+}
diff --git a/sys/dev/nvmf/host/nvmf_ctldev.c b/sys/dev/nvmf/host/nvmf_ctldev.c
new file mode 100644
index 000000000000..f40005a2a666
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_ctldev.c
@@ -0,0 +1,159 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/malloc.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/host/nvmf_var.h>
+
+static struct cdev *nvmf_cdev;
+
+static int
+nvmf_handoff_host(struct nvmf_handoff_host *hh)
+{
+ struct nvmf_ivars ivars;
+ device_t dev;
+ int error;
+
+ error = nvmf_init_ivars(&ivars, hh);
+ if (error != 0)
+ return (error);
+
+ bus_topo_lock();
+ dev = device_add_child(root_bus, "nvme", -1);
+ if (dev == NULL) {
+ bus_topo_unlock();
+ error = ENXIO;
+ goto out;
+ }
+
+ device_set_ivars(dev, &ivars);
+ error = device_probe_and_attach(dev);
+ device_set_ivars(dev, NULL);
+ if (error != 0)
+ device_delete_child(root_bus, dev);
+ bus_topo_unlock();
+
+out:
+ nvmf_free_ivars(&ivars);
+ return (error);
+}
+
+static bool
+nvmf_matches(device_t dev, char *name)
+{
+ struct nvmf_softc *sc = device_get_softc(dev);
+
+ if (strcmp(device_get_nameunit(dev), name) == 0)
+ return (true);
+ if (strcmp(sc->cdata->subnqn, name) == 0)
+ return (true);
+ return (false);
+}
+
+static int
+nvmf_disconnect_by_name(char *name)
+{
+ devclass_t dc;
+ device_t dev;
+ int error, unit;
+ bool found;
+
+ found = false;
+ error = 0;
+ bus_topo_lock();
+ dc = devclass_find("nvme");
+ if (dc == NULL)
+ goto out;
+
+ for (unit = 0; unit < devclass_get_maxunit(dc); unit++) {
+ dev = devclass_get_device(dc, unit);
+ if (dev == NULL)
+ continue;
+ if (device_get_driver(dev) != &nvme_nvmf_driver)
+ continue;
+ if (device_get_parent(dev) != root_bus)
+ continue;
+ if (name != NULL && !nvmf_matches(dev, name))
+ continue;
+
+ error = device_delete_child(root_bus, dev);
+ if (error != 0)
+ break;
+ found = true;
+ }
+out:
+ bus_topo_unlock();
+ if (error == 0 && !found)
+ error = ENOENT;
+ return (error);
+}
+
+static int
+nvmf_disconnect_host(const char **namep)
+{
+ char *name;
+ int error;
+
+ name = malloc(PATH_MAX, M_NVMF, M_WAITOK);
+ error = copyinstr(*namep, name, PATH_MAX, NULL);
+ if (error == 0)
+ error = nvmf_disconnect_by_name(name);
+ free(name, M_NVMF);
+ return (error);
+}
+
+static int
+nvmf_ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag,
+ struct thread *td)
+{
+ switch (cmd) {
+ case NVMF_HANDOFF_HOST:
+ return (nvmf_handoff_host((struct nvmf_handoff_host *)arg));
+ case NVMF_DISCONNECT_HOST:
+ return (nvmf_disconnect_host((const char **)arg));
+ case NVMF_DISCONNECT_ALL:
+ return (nvmf_disconnect_by_name(NULL));
+ default:
+ return (ENOTTY);
+ }
+}
+
+static struct cdevsw nvmf_ctl_cdevsw = {
+ .d_version = D_VERSION,
+ .d_ioctl = nvmf_ctl_ioctl
+};
+
+int
+nvmf_ctl_load(void)
+{
+ struct make_dev_args mda;
+ int error;
+
+ make_dev_args_init(&mda);
+ mda.mda_devsw = &nvmf_ctl_cdevsw;
+ mda.mda_uid = UID_ROOT;
+ mda.mda_gid = GID_WHEEL;
+ mda.mda_mode = 0600;
+ error = make_dev_s(&mda, &nvmf_cdev, "nvmf");
+ if (error != 0)
+ nvmf_cdev = NULL;
+ return (error);
+}
+
+void
+nvmf_ctl_unload(void)
+{
+ if (nvmf_cdev != NULL) {
+ destroy_dev(nvmf_cdev);
+ nvmf_cdev = NULL;
+ }
+}
diff --git a/sys/dev/nvmf/host/nvmf_ns.c b/sys/dev/nvmf/host/nvmf_ns.c
new file mode 100644
index 000000000000..3428cbadc974
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_ns.c
@@ -0,0 +1,482 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/bio.h>
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/disk.h>
+#include <sys/fcntl.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/memdesc.h>
+#include <sys/mutex.h>
+#include <sys/proc.h>
+#include <sys/refcount.h>
+#include <sys/sbuf.h>
+#include <machine/stdarg.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/host/nvmf_var.h>
+
+struct nvmf_namespace {
+ struct nvmf_softc *sc;
+ uint64_t size;
+ uint32_t id;
+ u_int flags;
+ uint32_t lba_size;
+ bool disconnected;
+
+ TAILQ_HEAD(, bio) pending_bios;
+ struct mtx lock;
+ volatile u_int active_bios;
+
+ struct cdev *cdev;
+};
+
+static void nvmf_ns_strategy(struct bio *bio);
+
+static void
+ns_printf(struct nvmf_namespace *ns, const char *fmt, ...)
+{
+ char buf[128];
+ struct sbuf sb;
+ va_list ap;
+
+ sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN);
+ sbuf_set_drain(&sb, sbuf_printf_drain, NULL);
+
+ sbuf_printf(&sb, "%sns%u: ", device_get_nameunit(ns->sc->dev),
+ ns->id);
+
+ va_start(ap, fmt);
+ sbuf_vprintf(&sb, fmt, ap);
+ va_end(ap);
+
+ sbuf_finish(&sb);
+ sbuf_delete(&sb);
+}
+
+/*
+ * The I/O completion may trigger after the received CQE if the I/O
+ * used a zero-copy mbuf that isn't harvested until after the NIC
+ * driver processes TX completions. Abuse bio_driver1 as a refcount.
+ * Store I/O errors in bio_driver2.
+ */
+static __inline u_int *
+bio_refs(struct bio *bio)
+{
+ return ((u_int *)&bio->bio_driver1);
+}
+
+static void
+nvmf_ns_biodone(struct bio *bio)
+{
+ struct nvmf_namespace *ns;
+ int error;
+
+ if (!refcount_release(bio_refs(bio)))
+ return;
+
+ ns = bio->bio_dev->si_drv1;
+
+ /* If a request is aborted, resubmit or queue it for resubmission. */
+ if (bio->bio_error == ECONNABORTED) {
+ bio->bio_error = 0;
+ bio->bio_driver2 = 0;
+ mtx_lock(&ns->lock);
+ if (ns->disconnected) {
+ TAILQ_INSERT_TAIL(&ns->pending_bios, bio, bio_queue);
+ mtx_unlock(&ns->lock);
+ } else {
+ mtx_unlock(&ns->lock);
+ nvmf_ns_strategy(bio);
+ }
+ } else {
+ /*
+ * I/O errors take precedence over generic EIO from
+ * CQE errors.
+ */
+ error = (intptr_t)bio->bio_driver2;
+ if (error != 0)
+ bio->bio_error = error;
+ if (bio->bio_error != 0)
+ bio->bio_flags |= BIO_ERROR;
+ biodone(bio);
+ }
+
+ if (refcount_release(&ns->active_bios))
+ wakeup(ns);
+}
+
+static void
+nvmf_ns_io_complete(void *arg, size_t xfered, int error)
+{
+ struct bio *bio = arg;
+
+ KASSERT(xfered <= bio->bio_bcount,
+ ("%s: xfered > bio_bcount", __func__));
+
+ bio->bio_driver2 = (void *)(intptr_t)error;
+ bio->bio_resid = bio->bio_bcount - xfered;
+
+ nvmf_ns_biodone(bio);
+}
+
+static void
+nvmf_ns_delete_complete(void *arg, size_t xfered, int error)
+{
+ struct bio *bio = arg;
+
+ if (error != 0)
+ bio->bio_resid = bio->bio_bcount;
+ else
+ bio->bio_resid = 0;
+
+ free(bio->bio_driver2, M_NVMF);
+ bio->bio_driver2 = (void *)(intptr_t)error;
+
+ nvmf_ns_biodone(bio);
+}
+
+static void
+nvmf_ns_bio_complete(void *arg, const struct nvme_completion *cqe)
+{
+ struct bio *bio = arg;
+
+ if (nvmf_cqe_aborted(cqe))
+ bio->bio_error = ECONNABORTED;
+ else if (cqe->status != 0)
+ bio->bio_error = EIO;
+
+ nvmf_ns_biodone(bio);
+}
+
+static int
+nvmf_ns_submit_bio(struct nvmf_namespace *ns, struct bio *bio)
+{
+ struct nvme_command cmd;
+ struct nvmf_request *req;
+ struct nvme_dsm_range *dsm_range;
+ struct memdesc mem;
+ uint64_t lba, lba_count;
+
+ dsm_range = NULL;
+ memset(&cmd, 0, sizeof(cmd));
+ switch (bio->bio_cmd) {
+ case BIO_READ:
+ lba = bio->bio_offset / ns->lba_size;
+ lba_count = bio->bio_bcount / ns->lba_size;
+ nvme_ns_read_cmd(&cmd, ns->id, lba, lba_count);
+ break;
+ case BIO_WRITE:
+ lba = bio->bio_offset / ns->lba_size;
+ lba_count = bio->bio_bcount / ns->lba_size;
+ nvme_ns_write_cmd(&cmd, ns->id, lba, lba_count);
+ break;
+ case BIO_FLUSH:
+ nvme_ns_flush_cmd(&cmd, ns->id);
+ break;
+ case BIO_DELETE:
+ dsm_range = malloc(sizeof(*dsm_range), M_NVMF, M_NOWAIT |
+ M_ZERO);
+ if (dsm_range == NULL)
+ return (ENOMEM);
+ lba = bio->bio_offset / ns->lba_size;
+ lba_count = bio->bio_bcount / ns->lba_size;
+ dsm_range->starting_lba = htole64(lba);
+ dsm_range->length = htole32(lba_count);
+
+ cmd.opc = NVME_OPC_DATASET_MANAGEMENT;
+ cmd.nsid = htole32(ns->id);
+ cmd.cdw10 = htole32(0); /* 1 range */
+ cmd.cdw11 = htole32(NVME_DSM_ATTR_DEALLOCATE);
+ break;
+ default:
+ return (EOPNOTSUPP);
+ }
+
+ mtx_lock(&ns->lock);
+ if (ns->disconnected) {
+ TAILQ_INSERT_TAIL(&ns->pending_bios, bio, bio_queue);
+ mtx_unlock(&ns->lock);
+ free(dsm_range, M_NVMF);
+ return (0);
+ }
+
+ req = nvmf_allocate_request(nvmf_select_io_queue(ns->sc), &cmd,
+ nvmf_ns_bio_complete, bio, M_NOWAIT);
+ if (req == NULL) {
+ mtx_unlock(&ns->lock);
+ free(dsm_range, M_NVMF);
+ return (ENOMEM);
+ }
+
+ switch (bio->bio_cmd) {
+ case BIO_READ:
+ case BIO_WRITE:
+ refcount_init(bio_refs(bio), 2);
+ mem = memdesc_bio(bio);
+ nvmf_capsule_append_data(req->nc, &mem, bio->bio_bcount,
+ bio->bio_cmd == BIO_WRITE, nvmf_ns_io_complete, bio);
+ break;
+ case BIO_DELETE:
+ refcount_init(bio_refs(bio), 2);
+ mem = memdesc_vaddr(dsm_range, sizeof(*dsm_range));
+ nvmf_capsule_append_data(req->nc, &mem, sizeof(*dsm_range),
+ true, nvmf_ns_delete_complete, bio);
+ bio->bio_driver2 = dsm_range;
+ break;
+ default:
+ refcount_init(bio_refs(bio), 1);
+ KASSERT(bio->bio_resid == 0,
+ ("%s: input bio_resid != 0", __func__));
+ break;
+ }
+
+ refcount_acquire(&ns->active_bios);
+ nvmf_submit_request(req);
+ mtx_unlock(&ns->lock);
+ return (0);
+}
+
+static int
+nvmf_ns_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag,
+ struct thread *td)
+{
+ struct nvmf_namespace *ns = dev->si_drv1;
+ struct nvme_get_nsid *gnsid;
+ struct nvme_pt_command *pt;
+
+ switch (cmd) {
+ case NVME_PASSTHROUGH_CMD:
+ pt = (struct nvme_pt_command *)arg;
+ pt->cmd.nsid = htole32(ns->id);
+ return (nvmf_passthrough_cmd(ns->sc, pt, false));
+ case NVME_GET_NSID:
+ gnsid = (struct nvme_get_nsid *)arg;
+ strlcpy(gnsid->cdev, device_get_nameunit(ns->sc->dev),
+ sizeof(gnsid->cdev));
+ gnsid->nsid = ns->id;
+ return (0);
+ case DIOCGMEDIASIZE:
+ *(off_t *)arg = ns->size;
+ return (0);
+ case DIOCGSECTORSIZE:
+ *(u_int *)arg = ns->lba_size;
+ return (0);
+ default:
+ return (ENOTTY);
+ }
+}
+
+static int
+nvmf_ns_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
+{
+ int error;
+
+ error = 0;
+ if ((oflags & FWRITE) != 0)
+ error = securelevel_gt(td->td_ucred, 0);
+ return (error);
+}
+
+void
+nvmf_ns_strategy(struct bio *bio)
+{
+ struct nvmf_namespace *ns;
+ int error;
+
+ ns = bio->bio_dev->si_drv1;
+
+ error = nvmf_ns_submit_bio(ns, bio);
+ if (error != 0) {
+ bio->bio_error = error;
+ bio->bio_flags |= BIO_ERROR;
+ bio->bio_resid = bio->bio_bcount;
+ biodone(bio);
+ }
+}
+
+static struct cdevsw nvmf_ns_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_DISK,
+ .d_open = nvmf_ns_open,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_strategy = nvmf_ns_strategy,
+ .d_ioctl = nvmf_ns_ioctl
+};
+
+struct nvmf_namespace *
+nvmf_init_ns(struct nvmf_softc *sc, uint32_t id,
+ struct nvme_namespace_data *data)
+{
+ struct make_dev_args mda;
+ struct nvmf_namespace *ns;
+ int error;
+ uint8_t lbads, lbaf;
+
+ ns = malloc(sizeof(*ns), M_NVMF, M_WAITOK | M_ZERO);
+ ns->sc = sc;
+ ns->id = id;
+ TAILQ_INIT(&ns->pending_bios);
+ mtx_init(&ns->lock, "nvmf ns", NULL, MTX_DEF);
+
+ /* One dummy bio avoids dropping to 0 until destroy. */
+ refcount_init(&ns->active_bios, 1);
+
+ if (NVMEV(NVME_NS_DATA_DPS_PIT, data->dps) != 0) {
+ ns_printf(ns, "End-to-end data protection not supported\n");
+ goto fail;
+ }
+
+ lbaf = NVMEV(NVME_NS_DATA_FLBAS_FORMAT, data->flbas);
+ if (lbaf > data->nlbaf) {
+ ns_printf(ns, "Invalid LBA format index\n");
+ goto fail;
+ }
+
+ if (NVMEV(NVME_NS_DATA_LBAF_MS, data->lbaf[lbaf]) != 0) {
+ ns_printf(ns, "Namespaces with metadata are not supported\n");
+ goto fail;
+ }
+
+ lbads = NVMEV(NVME_NS_DATA_LBAF_LBADS, data->lbaf[lbaf]);
+ if (lbads == 0) {
+ ns_printf(ns, "Invalid LBA format index\n");
+ goto fail;
+ }
+
+ ns->lba_size = 1 << lbads;
+ ns->size = data->nsze * ns->lba_size;
+
+ if (nvme_ctrlr_has_dataset_mgmt(sc->cdata))
+ ns->flags |= NVME_NS_DEALLOCATE_SUPPORTED;
+
+ if (NVMEV(NVME_CTRLR_DATA_VWC_PRESENT, sc->cdata->vwc) != 0)
+ ns->flags |= NVME_NS_FLUSH_SUPPORTED;
+
+ /*
+ * XXX: Does any of the boundary splitting for NOIOB make any
+ * sense for Fabrics?
+ */
+
+ make_dev_args_init(&mda);
+ mda.mda_devsw = &nvmf_ns_cdevsw;
+ mda.mda_uid = UID_ROOT;
+ mda.mda_gid = GID_WHEEL;
+ mda.mda_mode = 0600;
+ mda.mda_si_drv1 = ns;
+ error = make_dev_s(&mda, &ns->cdev, "%sns%u",
+ device_get_nameunit(sc->dev), id);
+ if (error != 0)
+ goto fail;
+
+ ns->cdev->si_flags |= SI_UNMAPPED;
+
+ return (ns);
+fail:
+ mtx_destroy(&ns->lock);
+ free(ns, M_NVMF);
+ return (NULL);
+}
+
+void
+nvmf_disconnect_ns(struct nvmf_namespace *ns)
+{
+ mtx_lock(&ns->lock);
+ ns->disconnected = true;
+ mtx_unlock(&ns->lock);
+}
+
+void
+nvmf_reconnect_ns(struct nvmf_namespace *ns)
+{
+ TAILQ_HEAD(, bio) bios;
+ struct bio *bio;
+
+ mtx_lock(&ns->lock);
+ ns->disconnected = false;
+ TAILQ_INIT(&bios);
+ TAILQ_CONCAT(&bios, &ns->pending_bios, bio_queue);
+ mtx_unlock(&ns->lock);
+
+ while (!TAILQ_EMPTY(&bios)) {
+ bio = TAILQ_FIRST(&bios);
+ TAILQ_REMOVE(&bios, bio, bio_queue);
+ nvmf_ns_strategy(bio);
+ }
+}
+
+void
+nvmf_destroy_ns(struct nvmf_namespace *ns)
+{
+ TAILQ_HEAD(, bio) bios;
+ struct bio *bio;
+
+ destroy_dev(ns->cdev);
+
+ /*
+ * Wait for active I/O requests to drain. The release drops
+ * the reference on the "dummy bio" when the namespace is
+ * created.
+ */
+ mtx_lock(&ns->lock);
+ if (!refcount_release(&ns->active_bios)) {
+ while (ns->active_bios != 0)
+ mtx_sleep(ns, &ns->lock, 0, "nvmfrmns", 0);
+ }
+
+ /* Abort any pending I/O requests. */
+ TAILQ_INIT(&bios);
+ TAILQ_CONCAT(&bios, &ns->pending_bios, bio_queue);
+ mtx_unlock(&ns->lock);
+
+ while (!TAILQ_EMPTY(&bios)) {
+ bio = TAILQ_FIRST(&bios);
+ TAILQ_REMOVE(&bios, bio, bio_queue);
+ bio->bio_error = ECONNABORTED;
+ bio->bio_flags |= BIO_ERROR;
+ bio->bio_resid = bio->bio_bcount;
+ biodone(bio);
+ }
+
+ mtx_destroy(&ns->lock);
+ free(ns, M_NVMF);
+}
+
+bool
+nvmf_update_ns(struct nvmf_namespace *ns, struct nvme_namespace_data *data)
+{
+ uint8_t lbads, lbaf;
+
+ if (NVMEV(NVME_NS_DATA_DPS_PIT, data->dps) != 0) {
+ ns_printf(ns, "End-to-end data protection not supported\n");
+ return (false);
+ }
+
+ lbaf = NVMEV(NVME_NS_DATA_FLBAS_FORMAT, data->flbas);
+ if (lbaf > data->nlbaf) {
+ ns_printf(ns, "Invalid LBA format index\n");
+ return (false);
+ }
+
+ if (NVMEV(NVME_NS_DATA_LBAF_MS, data->lbaf[lbaf]) != 0) {
+ ns_printf(ns, "Namespaces with metadata are not supported\n");
+ return (false);
+ }
+
+ lbads = NVMEV(NVME_NS_DATA_LBAF_LBADS, data->lbaf[lbaf]);
+ if (lbads == 0) {
+ ns_printf(ns, "Invalid LBA format index\n");
+ return (false);
+ }
+
+ ns->lba_size = 1 << lbads;
+ ns->size = data->nsze * ns->lba_size;
+ return (true);
+}
diff --git a/sys/dev/nvmf/host/nvmf_qpair.c b/sys/dev/nvmf/host/nvmf_qpair.c
new file mode 100644
index 000000000000..96cb5a8b0465
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_qpair.c
@@ -0,0 +1,386 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/types.h>
+#include <sys/bus.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mutex.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/host/nvmf_var.h>
+
+struct nvmf_host_command {
+ struct nvmf_request *req;
+ TAILQ_ENTRY(nvmf_host_command) link;
+ uint16_t cid;
+};
+
+struct nvmf_host_qpair {
+ struct nvmf_softc *sc;
+ struct nvmf_qpair *qp;
+
+ bool sq_flow_control;
+ bool shutting_down;
+ u_int allocating;
+ u_int num_commands;
+ uint16_t sqhd;
+ uint16_t sqtail;
+
+ struct mtx lock;
+
+ TAILQ_HEAD(, nvmf_host_command) free_commands;
+ STAILQ_HEAD(, nvmf_request) pending_requests;
+
+ /* Indexed by cid. */
+ struct nvmf_host_command **active_commands;
+
+ char name[16];
+};
+
+struct nvmf_request *
+nvmf_allocate_request(struct nvmf_host_qpair *qp, void *sqe,
+ nvmf_request_complete_t *cb, void *cb_arg, int how)
+{
+ struct nvmf_request *req;
+ struct nvmf_qpair *nq;
+
+ KASSERT(how == M_WAITOK || how == M_NOWAIT,
+ ("%s: invalid how", __func__));
+
+ req = malloc(sizeof(*req), M_NVMF, how | M_ZERO);
+ if (req == NULL)
+ return (NULL);
+
+ mtx_lock(&qp->lock);
+ nq = qp->qp;
+ if (nq == NULL) {
+ mtx_unlock(&qp->lock);
+ free(req, M_NVMF);
+ return (NULL);
+ }
+ qp->allocating++;
+ MPASS(qp->allocating != 0);
+ mtx_unlock(&qp->lock);
+
+ req->qp = qp;
+ req->cb = cb;
+ req->cb_arg = cb_arg;
+ req->nc = nvmf_allocate_command(nq, sqe, how);
+ if (req->nc == NULL) {
+ free(req, M_NVMF);
+ req = NULL;
+ }
+
+ mtx_lock(&qp->lock);
+ qp->allocating--;
+ if (qp->allocating == 0 && qp->shutting_down)
+ wakeup(qp);
+ mtx_unlock(&qp->lock);
+
+ return (req);
+}
+
+static void
+nvmf_abort_request(struct nvmf_request *req, uint16_t cid)
+{
+ struct nvme_completion cqe;
+
+ memset(&cqe, 0, sizeof(cqe));
+ cqe.cid = cid;
+ cqe.status = htole16(NVMEF(NVME_STATUS_SCT, NVME_SCT_PATH_RELATED) |
+ NVMEF(NVME_STATUS_SC, NVME_SC_COMMAND_ABORTED_BY_HOST));
+ req->cb(req->cb_arg, &cqe);
+}
+
+void
+nvmf_free_request(struct nvmf_request *req)
+{
+ if (req->nc != NULL)
+ nvmf_free_capsule(req->nc);
+ free(req, M_NVMF);
+}
+
+static void
+nvmf_dispatch_command(struct nvmf_host_qpair *qp, struct nvmf_host_command *cmd)
+{
+ struct nvmf_softc *sc = qp->sc;
+ struct nvme_command *sqe;
+ struct nvmf_capsule *nc;
+ int error;
+
+ nc = cmd->req->nc;
+ sqe = nvmf_capsule_sqe(nc);
+
+ /*
+ * NB: Don't bother byte-swapping the cid so that receive
+ * doesn't have to swap.
+ */
+ sqe->cid = cmd->cid;
+
+ error = nvmf_transmit_capsule(nc);
+ if (error != 0) {
+ device_printf(sc->dev,
+ "failed to transmit capsule: %d, disconnecting\n", error);
+ nvmf_disconnect(sc);
+ return;
+ }
+
+ if (sc->ka_traffic)
+ atomic_store_int(&sc->ka_active_tx_traffic, 1);
+}
+
+static void
+nvmf_qp_error(void *arg, int error)
+{
+ struct nvmf_host_qpair *qp = arg;
+ struct nvmf_softc *sc = qp->sc;
+
+ /* Ignore simple close of queue pairs during shutdown. */
+ if (!(sc->detaching && error == 0))
+ device_printf(sc->dev, "error %d on %s, disconnecting\n", error,
+ qp->name);
+ nvmf_disconnect(sc);
+}
+
+static void
+nvmf_receive_capsule(void *arg, struct nvmf_capsule *nc)
+{
+ struct nvmf_host_qpair *qp = arg;
+ struct nvmf_softc *sc = qp->sc;
+ struct nvmf_host_command *cmd;
+ struct nvmf_request *req;
+ const struct nvme_completion *cqe;
+ uint16_t cid;
+
+ cqe = nvmf_capsule_cqe(nc);
+
+ if (sc->ka_traffic)
+ atomic_store_int(&sc->ka_active_rx_traffic, 1);
+
+ /*
+ * NB: Don't bother byte-swapping the cid as transmit doesn't
+ * swap either.
+ */
+ cid = cqe->cid;
+
+ if (cid > qp->num_commands) {
+ device_printf(sc->dev,
+ "received invalid CID %u, disconnecting\n", cid);
+ nvmf_disconnect(sc);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ /*
+ * If the queue has been shutdown due to an error, silently
+ * drop the response.
+ */
+ mtx_lock(&qp->lock);
+ if (qp->qp == NULL) {
+ device_printf(sc->dev,
+ "received completion for CID %u on shutdown %s\n", cid,
+ qp->name);
+ mtx_unlock(&qp->lock);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ cmd = qp->active_commands[cid];
+ if (cmd == NULL) {
+ mtx_unlock(&qp->lock);
+ device_printf(sc->dev,
+ "received completion for inactive CID %u, disconnecting\n",
+ cid);
+ nvmf_disconnect(sc);
+ nvmf_free_capsule(nc);
+ return;
+ }
+
+ KASSERT(cmd->cid == cid, ("%s: CID mismatch", __func__));
+ req = cmd->req;
+ cmd->req = NULL;
+ if (STAILQ_EMPTY(&qp->pending_requests)) {
+ qp->active_commands[cid] = NULL;
+ TAILQ_INSERT_TAIL(&qp->free_commands, cmd, link);
+ mtx_unlock(&qp->lock);
+ } else {
+ cmd->req = STAILQ_FIRST(&qp->pending_requests);
+ STAILQ_REMOVE_HEAD(&qp->pending_requests, link);
+ mtx_unlock(&qp->lock);
+ nvmf_dispatch_command(qp, cmd);
+ }
+
+ req->cb(req->cb_arg, cqe);
+ nvmf_free_capsule(nc);
+ nvmf_free_request(req);
+}
+
+struct nvmf_host_qpair *
+nvmf_init_qp(struct nvmf_softc *sc, enum nvmf_trtype trtype,
+ struct nvmf_handoff_qpair_params *handoff, const char *name)
+{
+ struct nvmf_host_command *cmd, *ncmd;
+ struct nvmf_host_qpair *qp;
+ u_int i;
+
+ qp = malloc(sizeof(*qp), M_NVMF, M_WAITOK | M_ZERO);
+ qp->sc = sc;
+ qp->sq_flow_control = handoff->sq_flow_control;
+ qp->sqhd = handoff->sqhd;
+ qp->sqtail = handoff->sqtail;
+ strlcpy(qp->name, name, sizeof(qp->name));
+ mtx_init(&qp->lock, "nvmf qp", NULL, MTX_DEF);
+
+ /*
+ * Allocate a spare command slot for each pending AER command
+ * on the admin queue.
+ */
+ qp->num_commands = handoff->qsize - 1;
+ if (handoff->admin)
+ qp->num_commands += sc->num_aer;
+
+ qp->active_commands = malloc(sizeof(*qp->active_commands) *
+ qp->num_commands, M_NVMF, M_WAITOK | M_ZERO);
+ TAILQ_INIT(&qp->free_commands);
+ for (i = 0; i < qp->num_commands; i++) {
+ cmd = malloc(sizeof(*cmd), M_NVMF, M_WAITOK | M_ZERO);
+ cmd->cid = i;
+ TAILQ_INSERT_TAIL(&qp->free_commands, cmd, link);
+ }
+ STAILQ_INIT(&qp->pending_requests);
+
+ qp->qp = nvmf_allocate_qpair(trtype, false, handoff, nvmf_qp_error,
+ qp, nvmf_receive_capsule, qp);
+ if (qp->qp == NULL) {
+ TAILQ_FOREACH_SAFE(cmd, &qp->free_commands, link, ncmd) {
+ TAILQ_REMOVE(&qp->free_commands, cmd, link);
+ free(cmd, M_NVMF);
+ }
+ free(qp->active_commands, M_NVMF);
+ mtx_destroy(&qp->lock);
+ free(qp, M_NVMF);
+ return (NULL);
+ }
+
+ return (qp);
+}
+
+void
+nvmf_shutdown_qp(struct nvmf_host_qpair *qp)
+{
+ struct nvmf_host_command *cmd;
+ struct nvmf_request *req;
+ struct nvmf_qpair *nq;
+
+ mtx_lock(&qp->lock);
+ nq = qp->qp;
+ qp->qp = NULL;
+
+ if (nq == NULL) {
+ while (qp->shutting_down)
+ mtx_sleep(qp, &qp->lock, 0, "nvmfqpsh", 0);
+ mtx_unlock(&qp->lock);
+ return;
+ }
+ qp->shutting_down = true;
+ while (qp->allocating != 0)
+ mtx_sleep(qp, &qp->lock, 0, "nvmfqpqu", 0);
+ mtx_unlock(&qp->lock);
+
+ nvmf_free_qpair(nq);
+
+ /*
+ * Abort outstanding requests. Active requests will have
+ * their I/O completions invoked and associated capsules freed
+ * by the transport layer via nvmf_free_qpair. Pending
+ * requests must have their I/O completion invoked via
+ * nvmf_abort_capsule_data.
+ */
+ for (u_int i = 0; i < qp->num_commands; i++) {
+ cmd = qp->active_commands[i];
+ if (cmd != NULL) {
+ if (!cmd->req->aer)
+ printf("%s: aborted active command %p (CID %u)\n",
+ __func__, cmd->req, cmd->cid);
+
+ /* This was freed by nvmf_free_qpair. */
+ cmd->req->nc = NULL;
+ nvmf_abort_request(cmd->req, cmd->cid);
+ nvmf_free_request(cmd->req);
+ free(cmd, M_NVMF);
+ }
+ }
+ while (!STAILQ_EMPTY(&qp->pending_requests)) {
+ req = STAILQ_FIRST(&qp->pending_requests);
+ STAILQ_REMOVE_HEAD(&qp->pending_requests, link);
+ if (!req->aer)
+ printf("%s: aborted pending command %p\n", __func__,
+ req);
+ nvmf_abort_capsule_data(req->nc, ECONNABORTED);
+ nvmf_abort_request(req, 0);
+ nvmf_free_request(req);
+ }
+
+ mtx_lock(&qp->lock);
+ qp->shutting_down = false;
+ mtx_unlock(&qp->lock);
+ wakeup(qp);
+}
+
+void
+nvmf_destroy_qp(struct nvmf_host_qpair *qp)
+{
+ struct nvmf_host_command *cmd, *ncmd;
+
+ nvmf_shutdown_qp(qp);
+
+ TAILQ_FOREACH_SAFE(cmd, &qp->free_commands, link, ncmd) {
+ TAILQ_REMOVE(&qp->free_commands, cmd, link);
+ free(cmd, M_NVMF);
+ }
+ free(qp->active_commands, M_NVMF);
+ mtx_destroy(&qp->lock);
+ free(qp, M_NVMF);
+}
+
+void
+nvmf_submit_request(struct nvmf_request *req)
+{
+ struct nvmf_host_qpair *qp;
+ struct nvmf_host_command *cmd;
+
+ qp = req->qp;
+ mtx_lock(&qp->lock);
+ if (qp->qp == NULL) {
+ mtx_unlock(&qp->lock);
+ printf("%s: aborted pending command %p\n", __func__, req);
+ nvmf_abort_capsule_data(req->nc, ECONNABORTED);
+ nvmf_abort_request(req, 0);
+ nvmf_free_request(req);
+ return;
+ }
+ cmd = TAILQ_FIRST(&qp->free_commands);
+ if (cmd == NULL) {
+ /*
+ * Queue this request. Will be sent after enough
+ * in-flight requests have completed.
+ */
+ STAILQ_INSERT_TAIL(&qp->pending_requests, req, link);
+ mtx_unlock(&qp->lock);
+ return;
+ }
+
+ TAILQ_REMOVE(&qp->free_commands, cmd, link);
+ KASSERT(qp->active_commands[cmd->cid] == NULL,
+ ("%s: CID already busy", __func__));
+ qp->active_commands[cmd->cid] = cmd;
+ cmd->req = req;
+ mtx_unlock(&qp->lock);
+ nvmf_dispatch_command(qp, cmd);
+}
diff --git a/sys/dev/nvmf/host/nvmf_sim.c b/sys/dev/nvmf/host/nvmf_sim.c
new file mode 100644
index 000000000000..00dad07889d1
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_sim.c
@@ -0,0 +1,332 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/types.h>
+#include <sys/malloc.h>
+#include <sys/memdesc.h>
+#include <sys/refcount.h>
+
+#include <cam/cam.h>
+#include <cam/cam_ccb.h>
+#include <cam/cam_sim.h>
+#include <cam/cam_xpt_sim.h>
+#include <cam/cam_debug.h>
+
+#include <dev/nvmf/host/nvmf_var.h>
+
+/*
+ * The I/O completion may trigger after the received CQE if the I/O
+ * used a zero-copy mbuf that isn't harvested until after the NIC
+ * driver processes TX completions. Use spriv_field0 to as a refcount.
+ *
+ * Store any I/O error returned in spriv_field1.
+ */
+static __inline u_int *
+ccb_refs(union ccb *ccb)
+{
+ return ((u_int *)&ccb->ccb_h.spriv_field0);
+}
+
+#define spriv_ioerror spriv_field1
+
+static void
+nvmf_ccb_done(union ccb *ccb)
+{
+ if (!refcount_release(ccb_refs(ccb)))
+ return;
+
+ if (nvmf_cqe_aborted(&ccb->nvmeio.cpl)) {
+ ccb->ccb_h.status = CAM_REQUEUE_REQ;
+ xpt_done(ccb);
+ } else if (ccb->nvmeio.cpl.status != 0) {
+ ccb->ccb_h.status = CAM_NVME_STATUS_ERROR;
+ xpt_done(ccb);
+ } else if (ccb->ccb_h.spriv_ioerror != 0) {
+ KASSERT(ccb->ccb_h.spriv_ioerror != EJUSTRETURN,
+ ("%s: zero sized transfer without CQE error", __func__));
+ ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+ xpt_done(ccb);
+ } else {
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ xpt_done_direct(ccb);
+ }
+}
+
+static void
+nvmf_ccb_io_complete(void *arg, size_t xfered, int error)
+{
+ union ccb *ccb = arg;
+
+ /*
+ * TODO: Reporting partial completions requires extending
+ * nvmeio to support resid and updating nda to handle partial
+ * reads, either by returning partial success (or an error) to
+ * the caller, or retrying all or part of the request.
+ */
+ ccb->ccb_h.spriv_ioerror = error;
+ if (error == 0) {
+ if (xfered == 0) {
+#ifdef INVARIANTS
+ /*
+ * If the request fails with an error in the CQE
+ * there will be no data transferred but also no
+ * I/O error.
+ */
+ ccb->ccb_h.spriv_ioerror = EJUSTRETURN;
+#endif
+ } else
+ KASSERT(xfered == ccb->nvmeio.dxfer_len,
+ ("%s: partial CCB completion", __func__));
+ }
+
+ nvmf_ccb_done(ccb);
+}
+
+static void
+nvmf_ccb_complete(void *arg, const struct nvme_completion *cqe)
+{
+ union ccb *ccb = arg;
+
+ ccb->nvmeio.cpl = *cqe;
+ nvmf_ccb_done(ccb);
+}
+
+static void
+nvmf_sim_io(struct nvmf_softc *sc, union ccb *ccb)
+{
+ struct ccb_nvmeio *nvmeio = &ccb->nvmeio;
+ struct memdesc mem;
+ struct nvmf_request *req;
+ struct nvmf_host_qpair *qp;
+
+ mtx_lock(&sc->sim_mtx);
+ if (sc->sim_disconnected) {
+ mtx_unlock(&sc->sim_mtx);
+ nvmeio->ccb_h.status = CAM_REQUEUE_REQ;
+ xpt_done(ccb);
+ return;
+ }
+ if (nvmeio->ccb_h.func_code == XPT_NVME_IO)
+ qp = nvmf_select_io_queue(sc);
+ else
+ qp = sc->admin;
+ req = nvmf_allocate_request(qp, &nvmeio->cmd, nvmf_ccb_complete,
+ ccb, M_NOWAIT);
+ if (req == NULL) {
+ mtx_unlock(&sc->sim_mtx);
+ nvmeio->ccb_h.status = CAM_RESRC_UNAVAIL;
+ xpt_done(ccb);
+ return;
+ }
+
+ if (nvmeio->dxfer_len != 0) {
+ refcount_init(ccb_refs(ccb), 2);
+ mem = memdesc_ccb(ccb);
+ nvmf_capsule_append_data(req->nc, &mem, nvmeio->dxfer_len,
+ (ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT,
+ nvmf_ccb_io_complete, ccb);
+ } else
+ refcount_init(ccb_refs(ccb), 1);
+
+ /*
+ * Clear spriv_ioerror as it can hold an earlier error if this
+ * CCB was aborted and has been retried.
+ */
+ ccb->ccb_h.spriv_ioerror = 0;
+ KASSERT(ccb->ccb_h.status == CAM_REQ_INPROG,
+ ("%s: incoming CCB is not in-progress", __func__));
+ ccb->ccb_h.status |= CAM_SIM_QUEUED;
+ nvmf_submit_request(req);
+ mtx_unlock(&sc->sim_mtx);
+}
+
+static void
+nvmf_sim_action(struct cam_sim *sim, union ccb *ccb)
+{
+ struct nvmf_softc *sc = cam_sim_softc(sim);
+
+ CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
+ ("nvmf_sim_action: func= %#x\n",
+ ccb->ccb_h.func_code));
+
+ switch (ccb->ccb_h.func_code) {
+ case XPT_PATH_INQ: /* Path routing inquiry */
+ {
+ struct ccb_pathinq *cpi = &ccb->cpi;
+
+ cpi->version_num = 1;
+ cpi->hba_inquiry = 0;
+ cpi->target_sprt = 0;
+ cpi->hba_misc = PIM_UNMAPPED | PIM_NOSCAN;
+ cpi->hba_eng_cnt = 0;
+ cpi->max_target = 0;
+ cpi->max_lun = sc->cdata->nn;
+ cpi->async_flags = 0;
+ cpi->hpath_id = 0;
+ cpi->initiator_id = 0;
+ strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+ strlcpy(cpi->hba_vid, "NVMeoF", HBA_IDLEN);
+ strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
+ cpi->unit_number = cam_sim_unit(sim);
+ cpi->bus_id = 0;
+
+ /* XXX: Same as iSCSI. */
+ cpi->base_transfer_speed = 150000;
+ cpi->protocol = PROTO_NVME;
+ cpi->protocol_version = sc->vs;
+ cpi->transport = XPORT_NVMF;
+ cpi->transport_version = sc->vs;
+ cpi->xport_specific.nvmf.nsid =
+ xpt_path_lun_id(ccb->ccb_h.path);
+ cpi->xport_specific.nvmf.trtype = sc->trtype;
+ strlcpy(cpi->xport_specific.nvmf.dev_name,
+ device_get_nameunit(sc->dev),
+ sizeof(cpi->xport_specific.nvmf.dev_name));
+ cpi->maxio = sc->max_xfer_size;
+ cpi->hba_vendor = 0;
+ cpi->hba_device = 0;
+ cpi->hba_subvendor = 0;
+ cpi->hba_subdevice = 0;
+ cpi->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+ case XPT_GET_TRAN_SETTINGS: /* Get transport settings */
+ {
+ struct ccb_trans_settings *cts = &ccb->cts;
+ struct ccb_trans_settings_nvme *nvme;
+ struct ccb_trans_settings_nvmf *nvmf;
+
+ cts->protocol = PROTO_NVME;
+ cts->protocol_version = sc->vs;
+ cts->transport = XPORT_NVMF;
+ cts->transport_version = sc->vs;
+
+ nvme = &cts->proto_specific.nvme;
+ nvme->valid = CTS_NVME_VALID_SPEC;
+ nvme->spec = sc->vs;
+
+ nvmf = &cts->xport_specific.nvmf;
+ nvmf->valid = CTS_NVMF_VALID_TRTYPE;
+ nvmf->trtype = sc->trtype;
+ cts->ccb_h.status = CAM_REQ_CMP;
+ break;
+ }
+ case XPT_SET_TRAN_SETTINGS: /* Set transport settings */
+ /*
+ * No transfer settings can be set, but nvme_xpt sends
+ * this anyway.
+ */
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ break;
+ case XPT_NVME_IO: /* Execute the requested I/O */
+ case XPT_NVME_ADMIN: /* or Admin operation */
+ nvmf_sim_io(sc, ccb);
+ return;
+ default:
+ /* XXX */
+ device_printf(sc->dev, "unhandled sim function %#x\n",
+ ccb->ccb_h.func_code);
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+ break;
+ }
+ xpt_done(ccb);
+}
+
+int
+nvmf_init_sim(struct nvmf_softc *sc)
+{
+ struct cam_devq *devq;
+ int max_trans;
+
+ max_trans = sc->max_pending_io * 3 / 4;
+ devq = cam_simq_alloc(max_trans);
+ if (devq == NULL) {
+ device_printf(sc->dev, "Failed to allocate CAM simq\n");
+ return (ENOMEM);
+ }
+
+ mtx_init(&sc->sim_mtx, "nvmf sim", NULL, MTX_DEF);
+ sc->sim = cam_sim_alloc(nvmf_sim_action, NULL, "nvme", sc,
+ device_get_unit(sc->dev), NULL, max_trans, max_trans, devq);
+ if (sc->sim == NULL) {
+ device_printf(sc->dev, "Failed to allocate CAM sim\n");
+ cam_simq_free(devq);
+ mtx_destroy(&sc->sim_mtx);
+ return (ENXIO);
+ }
+ if (xpt_bus_register(sc->sim, sc->dev, 0) != CAM_SUCCESS) {
+ device_printf(sc->dev, "Failed to create CAM bus\n");
+ cam_sim_free(sc->sim, TRUE);
+ mtx_destroy(&sc->sim_mtx);
+ return (ENXIO);
+ }
+ if (xpt_create_path(&sc->path, NULL, cam_sim_path(sc->sim),
+ CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
+ device_printf(sc->dev, "Failed to create CAM path\n");
+ xpt_bus_deregister(cam_sim_path(sc->sim));
+ cam_sim_free(sc->sim, TRUE);
+ mtx_destroy(&sc->sim_mtx);
+ return (ENXIO);
+ }
+ return (0);
+}
+
+void
+nvmf_sim_rescan_ns(struct nvmf_softc *sc, uint32_t id)
+{
+ union ccb *ccb;
+
+ ccb = xpt_alloc_ccb_nowait();
+ if (ccb == NULL) {
+ device_printf(sc->dev,
+ "unable to alloc CCB for rescan of namespace %u\n", id);
+ return;
+ }
+
+ /*
+ * As with nvme_sim, map NVMe namespace IDs onto CAM unit
+ * LUNs.
+ */
+ if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sc->sim), 0,
+ id) != CAM_REQ_CMP) {
+ device_printf(sc->dev,
+ "Unable to create path for rescan of namespace %u\n", id);
+ xpt_free_ccb(ccb);
+ return;
+ }
+ xpt_rescan(ccb);
+}
+
+void
+nvmf_disconnect_sim(struct nvmf_softc *sc)
+{
+ mtx_lock(&sc->sim_mtx);
+ sc->sim_disconnected = true;
+ xpt_freeze_simq(sc->sim, 1);
+ mtx_unlock(&sc->sim_mtx);
+}
+
+void
+nvmf_reconnect_sim(struct nvmf_softc *sc)
+{
+ mtx_lock(&sc->sim_mtx);
+ sc->sim_disconnected = false;
+ mtx_unlock(&sc->sim_mtx);
+ xpt_release_simq(sc->sim, 1);
+}
+
+void
+nvmf_destroy_sim(struct nvmf_softc *sc)
+{
+ xpt_async(AC_LOST_DEVICE, sc->path, NULL);
+ if (sc->sim_disconnected)
+ xpt_release_simq(sc->sim, 1);
+ xpt_free_path(sc->path);
+ xpt_bus_deregister(cam_sim_path(sc->sim));
+ cam_sim_free(sc->sim, TRUE);
+ mtx_destroy(&sc->sim_mtx);
+}
diff --git a/sys/dev/nvmf/host/nvmf_var.h b/sys/dev/nvmf/host/nvmf_var.h
new file mode 100644
index 000000000000..64525851631e
--- /dev/null
+++ b/sys/dev/nvmf/host/nvmf_var.h
@@ -0,0 +1,208 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMF_VAR_H__
+#define __NVMF_VAR_H__
+
+#include <sys/_callout.h>
+#include <sys/_lock.h>
+#include <sys/_mutex.h>
+#include <sys/_sx.h>
+#include <sys/_task.h>
+#include <sys/queue.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf_transport.h>
+
+struct nvmf_aer;
+struct nvmf_capsule;
+struct nvmf_host_qpair;
+struct nvmf_namespace;
+
+typedef void nvmf_request_complete_t(void *, const struct nvme_completion *);
+
+struct nvmf_ivars {
+ struct nvmf_handoff_host *hh;
+ struct nvmf_handoff_qpair_params *io_params;
+ struct nvme_controller_data *cdata;
+};
+
+struct nvmf_softc {
+ device_t dev;
+
+ struct nvmf_host_qpair *admin;
+ struct nvmf_host_qpair **io;
+ u_int num_io_queues;
+ enum nvmf_trtype trtype;
+
+ struct cam_sim *sim;
+ struct cam_path *path;
+ struct mtx sim_mtx;
+ bool sim_disconnected;
+
+ struct nvmf_namespace **ns;
+
+ struct nvme_controller_data *cdata;
+ uint64_t cap;
+ uint32_t vs;
+ u_int max_pending_io;
+ u_long max_xfer_size;
+
+ struct cdev *cdev;
+
+ /*
+ * Keep Alive support depends on two timers. The 'tx' timer
+ * is responsible for sending KeepAlive commands and runs at
+ * half the timeout interval. The 'rx' timer is responsible
+ * for detecting an actual timeout.
+ *
+ * For efficient support of TKAS, the host does not reschedule
+ * these timers every time new commands are scheduled.
+ * Instead, the host sets the *_traffic flags when commands
+ * are sent and received. The timeout handlers check and
+ * clear these flags. This does mean it can take up to twice
+ * the timeout time to detect an AWOL controller.
+ */
+ bool ka_traffic; /* Using TKAS? */
+
+ volatile int ka_active_tx_traffic;
+ struct callout ka_tx_timer;
+ sbintime_t ka_tx_sbt;
+
+ volatile int ka_active_rx_traffic;
+ struct callout ka_rx_timer;
+ sbintime_t ka_rx_sbt;
+
+ struct sx connection_lock;
+ struct task disconnect_task;
+ bool detaching;
+
+ u_int num_aer;
+ struct nvmf_aer *aer;
+};
+
+struct nvmf_request {
+ struct nvmf_host_qpair *qp;
+ struct nvmf_capsule *nc;
+ nvmf_request_complete_t *cb;
+ void *cb_arg;
+ bool aer;
+
+ STAILQ_ENTRY(nvmf_request) link;
+};
+
+struct nvmf_completion_status {
+ struct nvme_completion cqe;
+ bool done;
+ bool io_done;
+ int io_error;
+};
+
+static __inline struct nvmf_host_qpair *
+nvmf_select_io_queue(struct nvmf_softc *sc)
+{
+ /* TODO: Support multiple queues? */
+ return (sc->io[0]);
+}
+
+static __inline bool
+nvmf_cqe_aborted(const struct nvme_completion *cqe)
+{
+ uint16_t status;
+
+ status = le16toh(cqe->status);
+ return (NVME_STATUS_GET_SCT(status) == NVME_SCT_PATH_RELATED &&
+ NVME_STATUS_GET_SC(status) == NVME_SC_COMMAND_ABORTED_BY_HOST);
+}
+
+static __inline void
+nvmf_status_init(struct nvmf_completion_status *status)
+{
+ status->done = false;
+ status->io_done = true;
+ status->io_error = 0;
+}
+
+static __inline void
+nvmf_status_wait_io(struct nvmf_completion_status *status)
+{
+ status->io_done = false;
+}
+
+#ifdef DRIVER_MODULE
+extern driver_t nvme_nvmf_driver;
+#endif
+
+#ifdef MALLOC_DECLARE
+MALLOC_DECLARE(M_NVMF);
+#endif
+
+/* nvmf.c */
+void nvmf_complete(void *arg, const struct nvme_completion *cqe);
+void nvmf_io_complete(void *arg, size_t xfered, int error);
+void nvmf_wait_for_reply(struct nvmf_completion_status *status);
+int nvmf_init_ivars(struct nvmf_ivars *ivars, struct nvmf_handoff_host *hh);
+void nvmf_free_ivars(struct nvmf_ivars *ivars);
+void nvmf_disconnect(struct nvmf_softc *sc);
+void nvmf_rescan_ns(struct nvmf_softc *sc, uint32_t nsid);
+int nvmf_passthrough_cmd(struct nvmf_softc *sc, struct nvme_pt_command *pt,
+ bool admin);
+
+/* nvmf_aer.c */
+void nvmf_init_aer(struct nvmf_softc *sc);
+int nvmf_start_aer(struct nvmf_softc *sc);
+void nvmf_destroy_aer(struct nvmf_softc *sc);
+
+/* nvmf_cmd.c */
+bool nvmf_cmd_get_property(struct nvmf_softc *sc, uint32_t offset,
+ uint8_t size, nvmf_request_complete_t *cb, void *cb_arg, int how);
+bool nvmf_cmd_set_property(struct nvmf_softc *sc, uint32_t offset,
+ uint8_t size, uint64_t value, nvmf_request_complete_t *cb, void *cb_arg,
+ int how);
+bool nvmf_cmd_keep_alive(struct nvmf_softc *sc, nvmf_request_complete_t *cb,
+ void *cb_arg, int how);
+bool nvmf_cmd_identify_active_namespaces(struct nvmf_softc *sc, uint32_t id,
+ struct nvme_ns_list *nslist, nvmf_request_complete_t *req_cb,
+ void *req_cb_arg, nvmf_io_complete_t *io_cb, void *io_cb_arg, int how);
+bool nvmf_cmd_identify_namespace(struct nvmf_softc *sc, uint32_t id,
+ struct nvme_namespace_data *nsdata, nvmf_request_complete_t *req_cb,
+ void *req_cb_arg, nvmf_io_complete_t *io_cb, void *io_cb_arg, int how);
+bool nvmf_cmd_get_log_page(struct nvmf_softc *sc, uint32_t nsid, uint8_t lid,
+ uint64_t offset, void *buf, size_t len, nvmf_request_complete_t *req_cb,
+ void *req_cb_arg, nvmf_io_complete_t *io_cb, void *io_cb_arg, int how);
+
+/* nvmf_ctldev.c */
+int nvmf_ctl_load(void);
+void nvmf_ctl_unload(void);
+
+/* nvmf_ns.c */
+struct nvmf_namespace *nvmf_init_ns(struct nvmf_softc *sc, uint32_t id,
+ struct nvme_namespace_data *data);
+void nvmf_disconnect_ns(struct nvmf_namespace *ns);
+void nvmf_reconnect_ns(struct nvmf_namespace *ns);
+void nvmf_destroy_ns(struct nvmf_namespace *ns);
+bool nvmf_update_ns(struct nvmf_namespace *ns,
+ struct nvme_namespace_data *data);
+
+/* nvmf_qpair.c */
+struct nvmf_host_qpair *nvmf_init_qp(struct nvmf_softc *sc,
+ enum nvmf_trtype trtype, struct nvmf_handoff_qpair_params *handoff,
+ const char *name);
+void nvmf_shutdown_qp(struct nvmf_host_qpair *qp);
+void nvmf_destroy_qp(struct nvmf_host_qpair *qp);
+struct nvmf_request *nvmf_allocate_request(struct nvmf_host_qpair *qp,
+ void *sqe, nvmf_request_complete_t *cb, void *cb_arg, int how);
+void nvmf_submit_request(struct nvmf_request *req);
+void nvmf_free_request(struct nvmf_request *req);
+
+/* nvmf_sim.c */
+int nvmf_init_sim(struct nvmf_softc *sc);
+void nvmf_disconnect_sim(struct nvmf_softc *sc);
+void nvmf_reconnect_sim(struct nvmf_softc *sc);
+void nvmf_destroy_sim(struct nvmf_softc *sc);
+void nvmf_sim_rescan_ns(struct nvmf_softc *sc, uint32_t id);
+
+#endif /* !__NVMF_VAR_H__ */
diff --git a/sys/dev/nvmf/nvmf.h b/sys/dev/nvmf/nvmf.h
new file mode 100644
index 000000000000..1f1ecd437c7e
--- /dev/null
+++ b/sys/dev/nvmf/nvmf.h
@@ -0,0 +1,79 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMF_H__
+#define __NVMF_H__
+
+#include <sys/ioccom.h>
+#ifndef _KERNEL
+#include <stdbool.h>
+#endif
+
+/*
+ * Default settings in Fabrics controllers. These match values used by the
+ * Linux target.
+ */
+#define NVMF_MAX_IO_ENTRIES (1024)
+#define NVMF_CC_EN_TIMEOUT (15) /* In 500ms units */
+
+/* Allows for a 16k data buffer + SQE */
+#define NVMF_IOCCSZ (sizeof(struct nvme_command) + 16 * 1024)
+#define NVMF_IORCSZ (sizeof(struct nvme_completion))
+
+#define NVMF_NN (1024)
+
+struct nvmf_handoff_qpair_params {
+ bool admin;
+ bool sq_flow_control;
+ u_int qsize;
+ uint16_t sqhd;
+ uint16_t sqtail; /* host only */
+ union {
+ struct {
+ int fd;
+ uint8_t rxpda;
+ uint8_t txpda;
+ bool header_digests;
+ bool data_digests;
+ uint32_t maxr2t;
+ uint32_t maxh2cdata;
+ uint32_t max_icd;
+ } tcp;
+ };
+};
+
+struct nvmf_handoff_host {
+ u_int trtype;
+ u_int num_io_queues;
+ u_int kato;
+ struct nvmf_handoff_qpair_params admin;
+ struct nvmf_handoff_qpair_params *io;
+ const struct nvme_controller_data *cdata;
+};
+
+struct nvmf_reconnect_params {
+ uint16_t cntlid;
+ char subnqn[256];
+};
+
+struct nvmf_handoff_controller_qpair {
+ u_int trtype;
+ struct nvmf_handoff_qpair_params params;
+ const struct nvmf_fabric_connect_cmd *cmd;
+ const struct nvmf_fabric_connect_data *data;
+};
+
+/* Operations on /dev/nvmf */
+#define NVMF_HANDOFF_HOST _IOW('n', 200, struct nvmf_handoff_host)
+#define NVMF_DISCONNECT_HOST _IOW('n', 201, const char *)
+#define NVMF_DISCONNECT_ALL _IO('n', 202)
+
+/* Operations on /dev/nvmeX */
+#define NVMF_RECONNECT_PARAMS _IOR('n', 203, struct nvmf_reconnect_params)
+#define NVMF_RECONNECT_HOST _IOW('n', 204, struct nvmf_handoff_host)
+
+#endif /* !__NVMF_H__ */
diff --git a/sys/dev/nvmf/nvmf_proto.h b/sys/dev/nvmf/nvmf_proto.h
new file mode 100644
index 000000000000..f67c34acbf95
--- /dev/null
+++ b/sys/dev/nvmf/nvmf_proto.h
@@ -0,0 +1,765 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (C) 2016 Intel Corporation.
+ * All rights reserved.
+ */
+
+/* Derived from include/spdk/nvmf_spec.h from Intel's SPDK. */
+
+#ifndef __NVMF_PROTO_H__
+#define __NVMF_PROTO_H__
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+#ifdef _KERNEL
+#include <sys/stddef.h>
+#else
+#include <stddef.h>
+#endif
+#include <dev/nvme/nvme.h>
+
+/**
+ * \file
+ * NVMe over Fabrics specification definitions
+ */
+
+#define NVME_NQN_FIELD_SIZE 256
+
+struct nvmf_capsule_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype;
+ uint8_t reserved2[35];
+ uint8_t fabric_specific[24];
+};
+_Static_assert(sizeof(struct nvmf_capsule_cmd) == 64, "Incorrect size");
+
+/* Fabric Command Set */
+enum nvmf_fabric_cmd_types {
+ NVMF_FABRIC_COMMAND_PROPERTY_SET = 0x00,
+ NVMF_FABRIC_COMMAND_CONNECT = 0x01,
+ NVMF_FABRIC_COMMAND_PROPERTY_GET = 0x04,
+ NVMF_FABRIC_COMMAND_AUTHENTICATION_SEND = 0x05,
+ NVMF_FABRIC_COMMAND_AUTHENTICATION_RECV = 0x06,
+ NVMF_FABRIC_COMMAND_DISCONNECT = 0x08,
+ NVMF_FABRIC_COMMAND_START_VENDOR_SPECIFIC = 0xC0,
+};
+
+enum nvmf_fabric_cmd_status_code {
+ NVMF_FABRIC_SC_INCOMPATIBLE_FORMAT = 0x80,
+ NVMF_FABRIC_SC_CONTROLLER_BUSY = 0x81,
+ NVMF_FABRIC_SC_INVALID_PARAM = 0x82,
+ NVMF_FABRIC_SC_RESTART_DISCOVERY = 0x83,
+ NVMF_FABRIC_SC_INVALID_HOST = 0x84,
+ NVMF_FABRIC_SC_INVALID_QUEUE_TYPE = 0x85,
+ NVMF_FABRIC_SC_LOG_RESTART_DISCOVERY = 0x90,
+ NVMF_FABRIC_SC_AUTH_REQUIRED = 0x91,
+};
+
+/**
+ * RDMA Queue Pair service types
+ */
+enum nvmf_rdma_qptype {
+ /** Reliable connected */
+ NVMF_RDMA_QPTYPE_RELIABLE_CONNECTED = 0x1,
+
+ /** Reliable datagram */
+ NVMF_RDMA_QPTYPE_RELIABLE_DATAGRAM = 0x2,
+};
+
+/**
+ * RDMA provider types
+ */
+enum nvmf_rdma_prtype {
+ /** No provider specified */
+ NVMF_RDMA_PRTYPE_NONE = 0x1,
+
+ /** InfiniBand */
+ NVMF_RDMA_PRTYPE_IB = 0x2,
+
+ /** RoCE v1 */
+ NVMF_RDMA_PRTYPE_ROCE = 0x3,
+
+ /** RoCE v2 */
+ NVMF_RDMA_PRTYPE_ROCE2 = 0x4,
+
+ /** iWARP */
+ NVMF_RDMA_PRTYPE_IWARP = 0x5,
+};
+
+/**
+ * RDMA connection management service types
+ */
+enum nvmf_rdma_cms {
+ /** Sockets based endpoint addressing */
+ NVMF_RDMA_CMS_RDMA_CM = 0x1,
+};
+
+/**
+ * NVMe over Fabrics transport types
+ */
+enum nvmf_trtype {
+ /** RDMA */
+ NVMF_TRTYPE_RDMA = 0x1,
+
+ /** Fibre Channel */
+ NVMF_TRTYPE_FC = 0x2,
+
+ /** TCP */
+ NVMF_TRTYPE_TCP = 0x3,
+
+ /** Intra-host transport (loopback) */
+ NVMF_TRTYPE_INTRA_HOST = 0xfe,
+};
+
+/**
+ * Address family types
+ */
+enum nvmf_adrfam {
+ /** IPv4 (AF_INET) */
+ NVMF_ADRFAM_IPV4 = 0x1,
+
+ /** IPv6 (AF_INET6) */
+ NVMF_ADRFAM_IPV6 = 0x2,
+
+ /** InfiniBand (AF_IB) */
+ NVMF_ADRFAM_IB = 0x3,
+
+ /** Fibre Channel address family */
+ NVMF_ADRFAM_FC = 0x4,
+
+ /** Intra-host transport (loopback) */
+ NVMF_ADRFAM_INTRA_HOST = 0xfe,
+};
+
+/**
+ * NVM subsystem types
+ */
+enum nvmf_subtype {
+ /** Referral to a discovery service */
+ NVMF_SUBTYPE_DISCOVERY = 0x1,
+
+ /** NVM Subsystem */
+ NVMF_SUBTYPE_NVME = 0x2,
+
+ /** Current Discovery Subsystem */
+ NVMF_SUBTYPE_DISCOVERY_CURRENT = 0x3
+};
+
+/* Discovery Log Entry Flags - Duplicate Returned Information */
+#define NVMF_DISCOVERY_LOG_EFLAGS_DUPRETINFO (1u << 0u)
+
+/* Discovery Log Entry Flags - Explicit Persistent Connection Support for Discovery */
+#define NVMF_DISCOVERY_LOG_EFLAGS_EPCSD (1u << 1u)
+
+/**
+ * Connections shall be made over a fabric secure channel
+ */
+enum nvmf_treq_secure_channel {
+ /** Not specified */
+ NVMF_TREQ_SECURE_CHANNEL_NOT_SPECIFIED = 0x0,
+
+ /** Required */
+ NVMF_TREQ_SECURE_CHANNEL_REQUIRED = 0x1,
+
+ /** Not required */
+ NVMF_TREQ_SECURE_CHANNEL_NOT_REQUIRED = 0x2,
+};
+
+struct nvmf_fabric_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype;
+ uint8_t reserved2[59];
+} __aligned(8);
+
+struct nvmf_fabric_auth_recv_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype; /* NVMF_FABRIC_COMMAND_AUTHENTICATION_RECV (0x06) */
+ uint8_t reserved2[19];
+ struct nvme_sgl_descriptor sgl1;
+ uint8_t reserved3;
+ uint8_t spsp0;
+ uint8_t spsp1;
+ uint8_t secp;
+ uint32_t al;
+ uint8_t reserved4[16];
+};
+_Static_assert(sizeof(struct nvmf_fabric_auth_recv_cmd) == 64, "Incorrect size");
+
+struct nvmf_fabric_auth_send_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype; /* NVMF_FABRIC_COMMAND_AUTHENTICATION_SEND (0x05) */
+ uint8_t reserved2[19];
+ struct nvme_sgl_descriptor sgl1;
+ uint8_t reserved3;
+ uint8_t spsp0;
+ uint8_t spsp1;
+ uint8_t secp;
+ uint32_t tl;
+ uint8_t reserved4[16];
+};
+_Static_assert(sizeof(struct nvmf_fabric_auth_send_cmd) == 64, "Incorrect size");
+
+struct nvmf_fabric_connect_data {
+ uint8_t hostid[16];
+ uint16_t cntlid;
+ uint8_t reserved5[238];
+ uint8_t subnqn[NVME_NQN_FIELD_SIZE];
+ uint8_t hostnqn[NVME_NQN_FIELD_SIZE];
+ uint8_t reserved6[256];
+};
+_Static_assert(sizeof(struct nvmf_fabric_connect_data) == 1024, "Incorrect size");
+
+struct nvmf_fabric_connect_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype;
+ uint8_t reserved2[19];
+ struct nvme_sgl_descriptor sgl1;
+ uint16_t recfmt; /* Connect Record Format */
+ uint16_t qid; /* Queue Identifier */
+ uint16_t sqsize; /* Submission Queue Size */
+ uint8_t cattr; /* queue attributes */
+ uint8_t reserved3;
+ uint32_t kato; /* keep alive timeout */
+ uint8_t reserved4[12];
+};
+_Static_assert(sizeof(struct nvmf_fabric_connect_cmd) == 64, "Incorrect size");
+
+#define NVMF_CNTLID_DYNAMIC 0xFFFF
+#define NVMF_CNTLID_STATIC_ANY 0xFFFE
+
+/*
+ * XXX: 5.3 in NVMe-over-Fabrics 1.1 gives this as an upper bound in
+ * the Discovery Log Entry.
+ */
+#define NVMF_CNTLID_STATIC_MAX 0xFFEF
+
+/* 5.21.1.15 in NVMe 1.4b */
+#define NVMF_KATO_DEFAULT (120000)
+
+#define NVMF_CONNECT_ATTR_PRIORITY_CLASS (0x3)
+#define NVMF_CONNECT_ATTR_DISABLE_SQ_FC (1u << 2)
+#define NVMF_CONNECT_ATTR_IO_QUEUE_DELETION (1u << 3)
+
+struct nvmf_fabric_connect_rsp {
+ union {
+ struct {
+ uint16_t cntlid;
+ uint16_t authreq;
+ } success;
+
+ struct {
+ uint16_t ipo;
+ uint8_t iattr;
+ uint8_t reserved;
+ } invalid;
+
+ uint32_t raw;
+ } status_code_specific;
+
+ uint32_t reserved0;
+ uint16_t sqhd;
+ uint16_t reserved1;
+ uint16_t cid;
+ uint16_t status;
+};
+_Static_assert(sizeof(struct nvmf_fabric_connect_rsp) == 16, "Incorrect size");
+
+struct nvmf_fabric_disconnect_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype;
+ uint8_t reserved2[19];
+ struct nvme_sgl_descriptor sgl1;
+ uint16_t recfmt; /* Disconnect Record Format */
+ uint8_t reserved3[22];
+};
+_Static_assert(sizeof(struct nvmf_fabric_disconnect_cmd) == 64, "Incorrect size");
+
+#define NVMF_PROP_SIZE_4 0
+#define NVMF_PROP_SIZE_8 1
+
+#define NVMF_PROP_CAP 0x00 /* Controller Capabilities */
+#define NVMF_PROP_VS 0x08 /* Version */
+#define NVMF_PROP_CC 0x14 /* Controller Configuration */
+#define NVMF_PROP_CSTS 0x1C /* Controller Status */
+#define NVMF_PROP_NSSR 0x20 /* NVM Subsystem Reset */
+
+struct nvmf_fabric_prop_get_cmd {
+ uint8_t opcode;
+ uint8_t reserved1;
+ uint16_t cid;
+ uint8_t fctype;
+ uint8_t reserved2[35];
+ struct {
+ uint8_t size : 3;
+ uint8_t reserved : 5;
+ } attrib;
+ uint8_t reserved3[3];
+ uint32_t ofst;
+ uint8_t reserved4[16];
+};
+_Static_assert(sizeof(struct nvmf_fabric_prop_get_cmd) == 64, "Incorrect size");
+
+struct nvmf_fabric_prop_get_rsp {
+ union {
+ uint64_t u64;
+ struct {
+ uint32_t low;
+ uint32_t high;
+ } u32;
+ } value;
+
+ uint16_t sqhd;
+ uint16_t reserved0;
+ uint16_t cid;
+ uint16_t status;
+};
+_Static_assert(sizeof(struct nvmf_fabric_prop_get_rsp) == 16, "Incorrect size");
+
+struct nvmf_fabric_prop_set_cmd {
+ uint8_t opcode;
+ uint8_t reserved0;
+ uint16_t cid;
+ uint8_t fctype;
+ uint8_t reserved1[35];
+ struct {
+ uint8_t size : 3;
+ uint8_t reserved : 5;
+ } attrib;
+ uint8_t reserved2[3];
+ uint32_t ofst;
+
+ union {
+ uint64_t u64;
+ struct {
+ uint32_t low;
+ uint32_t high;
+ } u32;
+ } value;
+
+ uint8_t reserved4[8];
+};
+_Static_assert(sizeof(struct nvmf_fabric_prop_set_cmd) == 64, "Incorrect size");
+
+#define NVMF_NQN_MIN_LEN 11 /* The prefix in the spec is 11 characters */
+#define NVMF_NQN_MAX_LEN 223
+#define NVMF_NQN_UUID_PRE_LEN 32
+#define NVMF_UUID_STRING_LEN 36
+#define NVMF_NQN_UUID_PRE "nqn.2014-08.org.nvmexpress:uuid:"
+#define NVMF_DISCOVERY_NQN "nqn.2014-08.org.nvmexpress.discovery"
+
+#define NVMF_TRSTRING_MAX_LEN 32
+#define NVMF_TRADDR_MAX_LEN 256
+#define NVMF_TRSVCID_MAX_LEN 32
+
+/** RDMA transport-specific address subtype */
+struct nvmf_rdma_transport_specific_address_subtype {
+ /** RDMA QP service type (\ref nvmf_rdma_qptype) */
+ uint8_t rdma_qptype;
+
+ /** RDMA provider type (\ref nvmf_rdma_prtype) */
+ uint8_t rdma_prtype;
+
+ /** RDMA connection management service (\ref nvmf_rdma_cms) */
+ uint8_t rdma_cms;
+
+ uint8_t reserved0[5];
+
+ /** RDMA partition key for AF_IB */
+ uint16_t rdma_pkey;
+
+ uint8_t reserved2[246];
+};
+_Static_assert(sizeof(struct nvmf_rdma_transport_specific_address_subtype) == 256,
+ "Incorrect size");
+
+/** TCP Secure Socket Type */
+enum nvme_tcp_secure_socket_type {
+ /** No security */
+ NVME_TCP_SECURITY_NONE = 0,
+
+ /** TLS (Secure Sockets) version 1.2 */
+ NVME_TCP_SECURITY_TLS_1_2 = 1,
+
+ /** TLS (Secure Sockets) version 1.3 */
+ NVME_TCP_SECURITY_TLS_1_3 = 2,
+};
+
+/** TCP transport-specific address subtype */
+struct nvme_tcp_transport_specific_address_subtype {
+ /** Security type (\ref nvme_tcp_secure_socket_type) */
+ uint8_t sectype;
+
+ uint8_t reserved0[255];
+};
+_Static_assert(sizeof(struct nvme_tcp_transport_specific_address_subtype) == 256,
+ "Incorrect size");
+
+/** Transport-specific address subtype */
+union nvmf_transport_specific_address_subtype {
+ uint8_t raw[256];
+
+ /** RDMA */
+ struct nvmf_rdma_transport_specific_address_subtype rdma;
+
+ /** TCP */
+ struct nvme_tcp_transport_specific_address_subtype tcp;
+};
+_Static_assert(sizeof(union nvmf_transport_specific_address_subtype) == 256,
+ "Incorrect size");
+
+#define NVMF_MIN_ADMIN_MAX_SQ_SIZE 32
+
+/**
+ * Discovery Log Page entry
+ */
+struct nvmf_discovery_log_page_entry {
+ /** Transport type (\ref nvmf_trtype) */
+ uint8_t trtype;
+
+ /** Address family (\ref nvmf_adrfam) */
+ uint8_t adrfam;
+
+ /** Subsystem type (\ref nvmf_subtype) */
+ uint8_t subtype;
+
+ /** Transport requirements */
+ struct {
+ /** Secure channel requirements (\ref nvmf_treq_secure_channel) */
+ uint8_t secure_channel : 2;
+
+ uint8_t reserved : 6;
+ } treq;
+
+ /** NVM subsystem port ID */
+ uint16_t portid;
+
+ /** Controller ID */
+ uint16_t cntlid;
+
+ /** Admin max SQ size */
+ uint16_t asqsz;
+
+ /** Entry Flags */
+ uint16_t eflags;
+
+ uint8_t reserved0[20];
+
+ /** Transport service identifier */
+ uint8_t trsvcid[NVMF_TRSVCID_MAX_LEN];
+
+ uint8_t reserved1[192];
+
+ /** NVM subsystem qualified name */
+ uint8_t subnqn[256];
+
+ /** Transport address */
+ uint8_t traddr[NVMF_TRADDR_MAX_LEN];
+
+ /** Transport-specific address subtype */
+ union nvmf_transport_specific_address_subtype tsas;
+};
+_Static_assert(sizeof(struct nvmf_discovery_log_page_entry) == 1024, "Incorrect size");
+
+struct nvmf_discovery_log_page {
+ uint64_t genctr;
+ uint64_t numrec;
+ uint16_t recfmt;
+ uint8_t reserved0[1006];
+ struct nvmf_discovery_log_page_entry entries[0];
+};
+_Static_assert(sizeof(struct nvmf_discovery_log_page) == 1024, "Incorrect size");
+
+/* RDMA Fabric specific definitions below */
+
+#define NVME_SGL_SUBTYPE_INVALIDATE_KEY 0xF
+
+struct nvmf_rdma_request_private_data {
+ uint16_t recfmt; /* record format */
+ uint16_t qid; /* queue id */
+ uint16_t hrqsize; /* host receive queue size */
+ uint16_t hsqsize; /* host send queue size */
+ uint16_t cntlid; /* controller id */
+ uint8_t reserved[22];
+};
+_Static_assert(sizeof(struct nvmf_rdma_request_private_data) == 32, "Incorrect size");
+
+struct nvmf_rdma_accept_private_data {
+ uint16_t recfmt; /* record format */
+ uint16_t crqsize; /* controller receive queue size */
+ uint8_t reserved[28];
+};
+_Static_assert(sizeof(struct nvmf_rdma_accept_private_data) == 32, "Incorrect size");
+
+struct nvmf_rdma_reject_private_data {
+ uint16_t recfmt; /* record format */
+ uint16_t sts; /* status */
+};
+_Static_assert(sizeof(struct nvmf_rdma_reject_private_data) == 4, "Incorrect size");
+
+union nvmf_rdma_private_data {
+ struct nvmf_rdma_request_private_data pd_request;
+ struct nvmf_rdma_accept_private_data pd_accept;
+ struct nvmf_rdma_reject_private_data pd_reject;
+};
+_Static_assert(sizeof(union nvmf_rdma_private_data) == 32, "Incorrect size");
+
+enum nvmf_rdma_transport_error {
+ NVMF_RDMA_ERROR_INVALID_PRIVATE_DATA_LENGTH = 0x1,
+ NVMF_RDMA_ERROR_INVALID_RECFMT = 0x2,
+ NVMF_RDMA_ERROR_INVALID_QID = 0x3,
+ NVMF_RDMA_ERROR_INVALID_HSQSIZE = 0x4,
+ NVMF_RDMA_ERROR_INVALID_HRQSIZE = 0x5,
+ NVMF_RDMA_ERROR_NO_RESOURCES = 0x6,
+ NVMF_RDMA_ERROR_INVALID_IRD = 0x7,
+ NVMF_RDMA_ERROR_INVALID_ORD = 0x8,
+};
+
+/* TCP transport specific definitions below */
+
+/** NVMe/TCP PDU type */
+enum nvme_tcp_pdu_type {
+ /** Initialize Connection Request (ICReq) */
+ NVME_TCP_PDU_TYPE_IC_REQ = 0x00,
+
+ /** Initialize Connection Response (ICResp) */
+ NVME_TCP_PDU_TYPE_IC_RESP = 0x01,
+
+ /** Terminate Connection Request (TermReq) */
+ NVME_TCP_PDU_TYPE_H2C_TERM_REQ = 0x02,
+
+ /** Terminate Connection Response (TermResp) */
+ NVME_TCP_PDU_TYPE_C2H_TERM_REQ = 0x03,
+
+ /** Command Capsule (CapsuleCmd) */
+ NVME_TCP_PDU_TYPE_CAPSULE_CMD = 0x04,
+
+ /** Response Capsule (CapsuleRsp) */
+ NVME_TCP_PDU_TYPE_CAPSULE_RESP = 0x05,
+
+ /** Host To Controller Data (H2CData) */
+ NVME_TCP_PDU_TYPE_H2C_DATA = 0x06,
+
+ /** Controller To Host Data (C2HData) */
+ NVME_TCP_PDU_TYPE_C2H_DATA = 0x07,
+
+ /** Ready to Transfer (R2T) */
+ NVME_TCP_PDU_TYPE_R2T = 0x09,
+};
+
+/** Common NVMe/TCP PDU header */
+struct nvme_tcp_common_pdu_hdr {
+ /** PDU type (\ref nvme_tcp_pdu_type) */
+ uint8_t pdu_type;
+
+ /** pdu_type-specific flags */
+ uint8_t flags;
+
+ /** Length of PDU header (not including the Header Digest) */
+ uint8_t hlen;
+
+ /** PDU Data Offset from the start of the PDU */
+ uint8_t pdo;
+
+ /** Total number of bytes in PDU, including pdu_hdr */
+ uint32_t plen;
+};
+_Static_assert(sizeof(struct nvme_tcp_common_pdu_hdr) == 8, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_common_pdu_hdr, pdu_type) == 0,
+ "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_common_pdu_hdr, flags) == 1, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_common_pdu_hdr, hlen) == 2, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_common_pdu_hdr, pdo) == 3, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_common_pdu_hdr, plen) == 4, "Incorrect offset");
+
+#define NVME_TCP_CH_FLAGS_HDGSTF (1u << 0)
+#define NVME_TCP_CH_FLAGS_DDGSTF (1u << 1)
+
+/**
+ * ICReq
+ *
+ * common.pdu_type == NVME_TCP_PDU_TYPE_IC_REQ
+ */
+struct nvme_tcp_ic_req {
+ struct nvme_tcp_common_pdu_hdr common;
+ uint16_t pfv;
+ /** Specifies the data alignment for all PDUs transferred from the controller to the host that contain data */
+ uint8_t hpda;
+ union {
+ uint8_t raw;
+ struct {
+ uint8_t hdgst_enable : 1;
+ uint8_t ddgst_enable : 1;
+ uint8_t reserved : 6;
+ } bits;
+ } dgst;
+ uint32_t maxr2t;
+ uint8_t reserved16[112];
+};
+_Static_assert(sizeof(struct nvme_tcp_ic_req) == 128, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_ic_req, pfv) == 8, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_ic_req, hpda) == 10, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_ic_req, maxr2t) == 12, "Incorrect offset");
+
+#define NVME_TCP_HPDA_MAX 31
+#define NVME_TCP_CPDA_MAX 31
+#define NVME_TCP_PDU_PDO_MAX_OFFSET ((NVME_TCP_CPDA_MAX + 1) << 2)
+
+/**
+ * ICResp
+ *
+ * common.pdu_type == NVME_TCP_PDU_TYPE_IC_RESP
+ */
+struct nvme_tcp_ic_resp {
+ struct nvme_tcp_common_pdu_hdr common;
+ uint16_t pfv;
+ /** Specifies the data alignment for all PDUs transferred from the host to the controller that contain data */
+ uint8_t cpda;
+ union {
+ uint8_t raw;
+ struct {
+ uint8_t hdgst_enable : 1;
+ uint8_t ddgst_enable : 1;
+ uint8_t reserved : 6;
+ } bits;
+ } dgst;
+ /** Specifies the maximum number of PDU-Data bytes per H2C Data Transfer PDU */
+ uint32_t maxh2cdata;
+ uint8_t reserved16[112];
+};
+_Static_assert(sizeof(struct nvme_tcp_ic_resp) == 128, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_ic_resp, pfv) == 8, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_ic_resp, cpda) == 10, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_ic_resp, maxh2cdata) == 12, "Incorrect offset");
+
+/**
+ * TermReq
+ *
+ * common.pdu_type == NVME_TCP_PDU_TYPE_TERM_REQ
+ */
+struct nvme_tcp_term_req_hdr {
+ struct nvme_tcp_common_pdu_hdr common;
+ uint16_t fes;
+ uint8_t fei[4];
+ uint8_t reserved14[10];
+};
+
+_Static_assert(sizeof(struct nvme_tcp_term_req_hdr) == 24, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_term_req_hdr, fes) == 8, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_term_req_hdr, fei) == 10, "Incorrect offset");
+
+enum nvme_tcp_term_req_fes {
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD = 0x01,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR = 0x02,
+ NVME_TCP_TERM_REQ_FES_HDGST_ERROR = 0x03,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE = 0x04,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_LIMIT_EXCEEDED = 0x05,
+ NVME_TCP_TERM_REQ_FES_R2T_LIMIT_EXCEEDED = 0x05,
+ NVME_TCP_TERM_REQ_FES_INVALID_DATA_UNSUPPORTED_PARAMETER = 0x06,
+};
+
+/* Total length of term req PDU (including PDU header and DATA) in bytes shall not exceed a limit of 152 bytes. */
+#define NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE 128
+#define NVME_TCP_TERM_REQ_PDU_MAX_SIZE (NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE + sizeof(struct nvme_tcp_term_req_hdr))
+
+/**
+ * CapsuleCmd
+ *
+ * common.pdu_type == NVME_TCP_PDU_TYPE_CAPSULE_CMD
+ */
+struct nvme_tcp_cmd {
+ struct nvme_tcp_common_pdu_hdr common;
+ struct nvme_command ccsqe;
+ /**< icdoff hdgst padding + in-capsule data + ddgst (if enabled) */
+};
+_Static_assert(sizeof(struct nvme_tcp_cmd) == 72, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_cmd, ccsqe) == 8, "Incorrect offset");
+
+/**
+ * CapsuleResp
+ *
+ * common.pdu_type == NVME_TCP_PDU_TYPE_CAPSULE_RESP
+ */
+struct nvme_tcp_rsp {
+ struct nvme_tcp_common_pdu_hdr common;
+ struct nvme_completion rccqe;
+};
+_Static_assert(sizeof(struct nvme_tcp_rsp) == 24, "incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_rsp, rccqe) == 8, "Incorrect offset");
+
+
+/**
+ * H2CData
+ *
+ * hdr.pdu_type == NVME_TCP_PDU_TYPE_H2C_DATA
+ */
+struct nvme_tcp_h2c_data_hdr {
+ struct nvme_tcp_common_pdu_hdr common;
+ uint16_t cccid;
+ uint16_t ttag;
+ uint32_t datao;
+ uint32_t datal;
+ uint8_t reserved20[4];
+};
+_Static_assert(sizeof(struct nvme_tcp_h2c_data_hdr) == 24, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_h2c_data_hdr, cccid) == 8, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_h2c_data_hdr, ttag) == 10, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_h2c_data_hdr, datao) == 12, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_h2c_data_hdr, datal) == 16, "Incorrect offset");
+
+#define NVME_TCP_H2C_DATA_FLAGS_LAST_PDU (1u << 2)
+#define NVME_TCP_H2C_DATA_FLAGS_SUCCESS (1u << 3)
+#define NVME_TCP_H2C_DATA_PDO_MULT 8u
+
+/**
+ * C2HData
+ *
+ * hdr.pdu_type == NVME_TCP_PDU_TYPE_C2H_DATA
+ */
+struct nvme_tcp_c2h_data_hdr {
+ struct nvme_tcp_common_pdu_hdr common;
+ uint16_t cccid;
+ uint8_t reserved10[2];
+ uint32_t datao;
+ uint32_t datal;
+ uint8_t reserved20[4];
+};
+_Static_assert(sizeof(struct nvme_tcp_c2h_data_hdr) == 24, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_c2h_data_hdr, cccid) == 8, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_c2h_data_hdr, datao) == 12, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_c2h_data_hdr, datal) == 16, "Incorrect offset");
+
+#define NVME_TCP_C2H_DATA_FLAGS_SUCCESS (1u << 3)
+#define NVME_TCP_C2H_DATA_FLAGS_LAST_PDU (1u << 2)
+#define NVME_TCP_C2H_DATA_PDO_MULT 8u
+
+/**
+ * R2T
+ *
+ * common.pdu_type == NVME_TCP_PDU_TYPE_R2T
+ */
+struct nvme_tcp_r2t_hdr {
+ struct nvme_tcp_common_pdu_hdr common;
+ uint16_t cccid;
+ uint16_t ttag;
+ uint32_t r2to;
+ uint32_t r2tl;
+ uint8_t reserved20[4];
+};
+_Static_assert(sizeof(struct nvme_tcp_r2t_hdr) == 24, "Incorrect size");
+_Static_assert(offsetof(struct nvme_tcp_r2t_hdr, cccid) == 8, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_r2t_hdr, ttag) == 10, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_r2t_hdr, r2to) == 12, "Incorrect offset");
+_Static_assert(offsetof(struct nvme_tcp_r2t_hdr, r2tl) == 16, "Incorrect offset");
+
+#endif /* __NVMF_PROTO_H__ */
diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c
new file mode 100644
index 000000000000..57c81eceee02
--- /dev/null
+++ b/sys/dev/nvmf/nvmf_tcp.c
@@ -0,0 +1,1867 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/capsicum.h>
+#include <sys/condvar.h>
+#include <sys/file.h>
+#include <sys/gsb_crc32.h>
+#include <sys/kernel.h>
+#include <sys/kthread.h>
+#include <sys/limits.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+#include <sys/protosw.h>
+#include <sys/refcount.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/sysctl.h>
+#include <sys/uio.h>
+#include <netinet/in.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_proto.h>
+#include <dev/nvmf/nvmf_tcp.h>
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/nvmf_transport_internal.h>
+
+struct nvmf_tcp_capsule;
+struct nvmf_tcp_qpair;
+
+struct nvmf_tcp_command_buffer {
+ struct nvmf_tcp_qpair *qp;
+
+ struct nvmf_io_request io;
+ size_t data_len;
+ size_t data_xfered;
+ uint32_t data_offset;
+
+ u_int refs;
+ int error;
+
+ uint16_t cid;
+ uint16_t ttag;
+
+ TAILQ_ENTRY(nvmf_tcp_command_buffer) link;
+
+ /* Controller only */
+ struct nvmf_tcp_capsule *tc;
+};
+
+struct nvmf_tcp_command_buffer_list {
+ TAILQ_HEAD(, nvmf_tcp_command_buffer) head;
+ struct mtx lock;
+};
+
+struct nvmf_tcp_qpair {
+ struct nvmf_qpair qp;
+
+ struct socket *so;
+
+ volatile u_int refs; /* Every allocated capsule holds a reference */
+ uint8_t txpda;
+ uint8_t rxpda;
+ bool header_digests;
+ bool data_digests;
+ uint32_t maxr2t;
+ uint32_t maxh2cdata; /* Controller only */
+ uint32_t max_tx_data;
+ uint32_t max_icd; /* Host only */
+ uint16_t next_ttag; /* Controller only */
+ u_int num_ttags; /* Controller only */
+ u_int active_ttags; /* Controller only */
+ bool send_success; /* Controller only */
+
+ /* Receive state. */
+ struct thread *rx_thread;
+ struct cv rx_cv;
+ bool rx_shutdown;
+
+ /* Transmit state. */
+ struct thread *tx_thread;
+ struct cv tx_cv;
+ bool tx_shutdown;
+ struct mbufq tx_pdus;
+ STAILQ_HEAD(, nvmf_tcp_capsule) tx_capsules;
+
+ struct nvmf_tcp_command_buffer_list tx_buffers;
+ struct nvmf_tcp_command_buffer_list rx_buffers;
+
+ /*
+ * For the controller, an RX command buffer can be in one of
+ * two locations, all protected by the rx_buffers.lock. If a
+ * receive request is waiting for either an R2T slot for its
+ * command (due to exceeding MAXR2T), or a transfer tag it is
+ * placed on the rx_buffers list. When a request is allocated
+ * an active transfer tag, it moves to the open_ttags[] array
+ * (indexed by the tag) until it completes.
+ */
+ struct nvmf_tcp_command_buffer **open_ttags; /* Controller only */
+};
+
+struct nvmf_tcp_rxpdu {
+ struct mbuf *m;
+ const struct nvme_tcp_common_pdu_hdr *hdr;
+ uint32_t data_len;
+ bool data_digest_mismatch;
+};
+
+struct nvmf_tcp_capsule {
+ struct nvmf_capsule nc;
+
+ volatile u_int refs;
+
+ struct nvmf_tcp_rxpdu rx_pdu;
+
+ uint32_t active_r2ts; /* Controller only */
+#ifdef INVARIANTS
+ uint32_t tx_data_offset; /* Controller only */
+ u_int pending_r2ts; /* Controller only */
+#endif
+
+ STAILQ_ENTRY(nvmf_tcp_capsule) link;
+};
+
+#define TCAP(nc) ((struct nvmf_tcp_capsule *)(nc))
+#define TQP(qp) ((struct nvmf_tcp_qpair *)(qp))
+
+static void tcp_release_capsule(struct nvmf_tcp_capsule *tc);
+static void tcp_free_qpair(struct nvmf_qpair *nq);
+
+SYSCTL_NODE(_kern_nvmf, OID_AUTO, tcp, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+ "TCP transport");
+static u_int tcp_max_transmit_data = 256 * 1024;
+SYSCTL_UINT(_kern_nvmf_tcp, OID_AUTO, max_c2hdata, CTLFLAG_RWTUN,
+ &tcp_max_transmit_data, 0,
+ "Maximum size of data payload in a transmitted PDU");
+
+static MALLOC_DEFINE(M_NVMF_TCP, "nvmf_tcp", "NVMe over TCP");
+
+static int
+mbuf_crc32c_helper(void *arg, void *data, u_int len)
+{
+ uint32_t *digestp = arg;
+
+ *digestp = calculate_crc32c(*digestp, data, len);
+ return (0);
+}
+
+static uint32_t
+mbuf_crc32c(struct mbuf *m, u_int offset, u_int len)
+{
+ uint32_t digest = 0xffffffff;
+
+ m_apply(m, offset, len, mbuf_crc32c_helper, &digest);
+ digest = digest ^ 0xffffffff;
+
+ return (digest);
+}
+
+static uint32_t
+compute_digest(const void *buf, size_t len)
+{
+ return (calculate_crc32c(0xffffffff, buf, len) ^ 0xffffffff);
+}
+
+static struct nvmf_tcp_command_buffer *
+tcp_alloc_command_buffer(struct nvmf_tcp_qpair *qp,
+ const struct nvmf_io_request *io, uint32_t data_offset, size_t data_len,
+ uint16_t cid)
+{
+ struct nvmf_tcp_command_buffer *cb;
+
+ cb = malloc(sizeof(*cb), M_NVMF_TCP, M_WAITOK);
+ cb->qp = qp;
+ cb->io = *io;
+ cb->data_offset = data_offset;
+ cb->data_len = data_len;
+ cb->data_xfered = 0;
+ refcount_init(&cb->refs, 1);
+ cb->error = 0;
+ cb->cid = cid;
+ cb->ttag = 0;
+ cb->tc = NULL;
+
+ return (cb);
+}
+
+static void
+tcp_hold_command_buffer(struct nvmf_tcp_command_buffer *cb)
+{
+ refcount_acquire(&cb->refs);
+}
+
+static void
+tcp_free_command_buffer(struct nvmf_tcp_command_buffer *cb)
+{
+ nvmf_complete_io_request(&cb->io, cb->data_xfered, cb->error);
+ if (cb->tc != NULL)
+ tcp_release_capsule(cb->tc);
+ free(cb, M_NVMF_TCP);
+}
+
+static void
+tcp_release_command_buffer(struct nvmf_tcp_command_buffer *cb)
+{
+ if (refcount_release(&cb->refs))
+ tcp_free_command_buffer(cb);
+}
+
+static void
+tcp_add_command_buffer(struct nvmf_tcp_command_buffer_list *list,
+ struct nvmf_tcp_command_buffer *cb)
+{
+ mtx_assert(&list->lock, MA_OWNED);
+ TAILQ_INSERT_HEAD(&list->head, cb, link);
+}
+
+static struct nvmf_tcp_command_buffer *
+tcp_find_command_buffer(struct nvmf_tcp_command_buffer_list *list,
+ uint16_t cid, uint16_t ttag)
+{
+ struct nvmf_tcp_command_buffer *cb;
+
+ mtx_assert(&list->lock, MA_OWNED);
+ TAILQ_FOREACH(cb, &list->head, link) {
+ if (cb->cid == cid && cb->ttag == ttag)
+ return (cb);
+ }
+ return (NULL);
+}
+
+static void
+tcp_remove_command_buffer(struct nvmf_tcp_command_buffer_list *list,
+ struct nvmf_tcp_command_buffer *cb)
+{
+ mtx_assert(&list->lock, MA_OWNED);
+ TAILQ_REMOVE(&list->head, cb, link);
+}
+
+static void
+tcp_purge_command_buffer(struct nvmf_tcp_command_buffer_list *list,
+ uint16_t cid, uint16_t ttag)
+{
+ struct nvmf_tcp_command_buffer *cb;
+
+ mtx_lock(&list->lock);
+ cb = tcp_find_command_buffer(list, cid, ttag);
+ if (cb != NULL) {
+ tcp_remove_command_buffer(list, cb);
+ mtx_unlock(&list->lock);
+ tcp_release_command_buffer(cb);
+ } else
+ mtx_unlock(&list->lock);
+}
+
+static void
+nvmf_tcp_write_pdu(struct nvmf_tcp_qpair *qp, struct mbuf *m)
+{
+ struct socket *so = qp->so;
+
+ SOCKBUF_LOCK(&so->so_snd);
+ mbufq_enqueue(&qp->tx_pdus, m);
+ /* XXX: Do we need to handle sb_hiwat being wrong? */
+ if (sowriteable(so))
+ cv_signal(&qp->tx_cv);
+ SOCKBUF_UNLOCK(&so->so_snd);
+}
+
+static void
+nvmf_tcp_report_error(struct nvmf_tcp_qpair *qp, uint16_t fes, uint32_t fei,
+ struct mbuf *rx_pdu, u_int hlen)
+{
+ struct nvme_tcp_term_req_hdr *hdr;
+ struct mbuf *m;
+
+ if (hlen != 0) {
+ hlen = min(hlen, NVME_TCP_TERM_REQ_ERROR_DATA_MAX_SIZE);
+ hlen = min(hlen, m_length(rx_pdu, NULL));
+ }
+
+ m = m_get2(sizeof(*hdr) + hlen, M_WAITOK, MT_DATA, 0);
+ m->m_len = sizeof(*hdr) + hlen;
+ hdr = mtod(m, void *);
+ memset(hdr, 0, sizeof(*hdr));
+ hdr->common.pdu_type = qp->qp.nq_controller ?
+ NVME_TCP_PDU_TYPE_C2H_TERM_REQ : NVME_TCP_PDU_TYPE_H2C_TERM_REQ;
+ hdr->common.hlen = sizeof(*hdr);
+ hdr->common.plen = sizeof(*hdr) + hlen;
+ hdr->fes = htole16(fes);
+ le32enc(hdr->fei, fei);
+ if (hlen != 0)
+ m_copydata(rx_pdu, 0, hlen, (caddr_t)(hdr + 1));
+
+ nvmf_tcp_write_pdu(qp, m);
+}
+
+static int
+nvmf_tcp_validate_pdu(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_common_pdu_hdr *ch;
+ struct mbuf *m = pdu->m;
+ uint32_t data_len, fei, plen;
+ uint32_t digest, rx_digest;
+ u_int hlen;
+ int error;
+ uint16_t fes;
+
+ /* Determine how large of a PDU header to return for errors. */
+ ch = pdu->hdr;
+ hlen = ch->hlen;
+ plen = le32toh(ch->plen);
+ if (hlen < sizeof(*ch) || hlen > plen)
+ hlen = sizeof(*ch);
+
+ error = nvmf_tcp_validate_pdu_header(ch, qp->qp.nq_controller,
+ qp->header_digests, qp->data_digests, qp->rxpda, &data_len, &fes,
+ &fei);
+ if (error != 0) {
+ if (error != ECONNRESET)
+ nvmf_tcp_report_error(qp, fes, fei, m, hlen);
+ return (error);
+ }
+
+ /* Check header digest if present. */
+ if ((ch->flags & NVME_TCP_CH_FLAGS_HDGSTF) != 0) {
+ digest = mbuf_crc32c(m, 0, ch->hlen);
+ m_copydata(m, ch->hlen, sizeof(rx_digest), (caddr_t)&rx_digest);
+ if (digest != rx_digest) {
+ printf("NVMe/TCP: Header digest mismatch\n");
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_HDGST_ERROR, rx_digest, m,
+ hlen);
+ return (EBADMSG);
+ }
+ }
+
+ /* Check data digest if present. */
+ pdu->data_digest_mismatch = false;
+ if ((ch->flags & NVME_TCP_CH_FLAGS_DDGSTF) != 0) {
+ digest = mbuf_crc32c(m, ch->pdo, data_len);
+ m_copydata(m, plen - sizeof(rx_digest), sizeof(rx_digest),
+ (caddr_t)&rx_digest);
+ if (digest != rx_digest) {
+ printf("NVMe/TCP: Data digest mismatch\n");
+ pdu->data_digest_mismatch = true;
+ }
+ }
+
+ pdu->data_len = data_len;
+ return (0);
+}
+
+static void
+nvmf_tcp_free_pdu(struct nvmf_tcp_rxpdu *pdu)
+{
+ m_freem(pdu->m);
+ pdu->m = NULL;
+ pdu->hdr = NULL;
+}
+
+static int
+nvmf_tcp_handle_term_req(struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_term_req_hdr *hdr;
+
+ hdr = (const void *)pdu->hdr;
+
+ printf("NVMe/TCP: Received termination request: fes %#x fei %#x\n",
+ le16toh(hdr->fes), le32dec(hdr->fei));
+ nvmf_tcp_free_pdu(pdu);
+ return (ECONNRESET);
+}
+
+static int
+nvmf_tcp_save_command_capsule(struct nvmf_tcp_qpair *qp,
+ struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_cmd *cmd;
+ struct nvmf_capsule *nc;
+ struct nvmf_tcp_capsule *tc;
+
+ cmd = (const void *)pdu->hdr;
+
+ nc = nvmf_allocate_command(&qp->qp, &cmd->ccsqe, M_WAITOK);
+
+ tc = TCAP(nc);
+ tc->rx_pdu = *pdu;
+
+ nvmf_capsule_received(&qp->qp, nc);
+ return (0);
+}
+
+static int
+nvmf_tcp_save_response_capsule(struct nvmf_tcp_qpair *qp,
+ struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_rsp *rsp;
+ struct nvmf_capsule *nc;
+ struct nvmf_tcp_capsule *tc;
+
+ rsp = (const void *)pdu->hdr;
+
+ nc = nvmf_allocate_response(&qp->qp, &rsp->rccqe, M_WAITOK);
+
+ nc->nc_sqhd_valid = true;
+ tc = TCAP(nc);
+ tc->rx_pdu = *pdu;
+
+ /*
+ * Once the CQE has been received, no further transfers to the
+ * command buffer for the associated CID can occur.
+ */
+ tcp_purge_command_buffer(&qp->rx_buffers, rsp->rccqe.cid, 0);
+ tcp_purge_command_buffer(&qp->tx_buffers, rsp->rccqe.cid, 0);
+
+ nvmf_capsule_received(&qp->qp, nc);
+ return (0);
+}
+
+/*
+ * Construct a PDU that contains an optional data payload. This
+ * includes dealing with digests and the length fields in the common
+ * header.
+ */
+static struct mbuf *
+nvmf_tcp_construct_pdu(struct nvmf_tcp_qpair *qp, void *hdr, size_t hlen,
+ struct mbuf *data, uint32_t data_len)
+{
+ struct nvme_tcp_common_pdu_hdr *ch;
+ struct mbuf *top;
+ uint32_t digest, pad, pdo, plen, mlen;
+
+ plen = hlen;
+ if (qp->header_digests)
+ plen += sizeof(digest);
+ if (data_len != 0) {
+ KASSERT(m_length(data, NULL) == data_len, ("length mismatch"));
+ pdo = roundup2(plen, qp->txpda);
+ pad = pdo - plen;
+ plen = pdo + data_len;
+ if (qp->data_digests)
+ plen += sizeof(digest);
+ mlen = pdo;
+ } else {
+ KASSERT(data == NULL, ("payload mbuf with zero length"));
+ pdo = 0;
+ pad = 0;
+ mlen = plen;
+ }
+
+ top = m_get2(mlen, M_WAITOK, MT_DATA, 0);
+ top->m_len = mlen;
+ ch = mtod(top, void *);
+ memcpy(ch, hdr, hlen);
+ ch->hlen = hlen;
+ if (qp->header_digests)
+ ch->flags |= NVME_TCP_CH_FLAGS_HDGSTF;
+ if (qp->data_digests && data_len != 0)
+ ch->flags |= NVME_TCP_CH_FLAGS_DDGSTF;
+ ch->pdo = pdo;
+ ch->plen = htole32(plen);
+
+ /* HDGST */
+ if (qp->header_digests) {
+ digest = compute_digest(ch, hlen);
+ memcpy((char *)ch + hlen, &digest, sizeof(digest));
+ }
+
+ if (pad != 0) {
+ /* PAD */
+ memset((char *)ch + pdo - pad, 0, pad);
+ }
+
+ if (data_len != 0) {
+ /* DATA */
+ top->m_next = data;
+
+ /* DDGST */
+ if (qp->data_digests) {
+ digest = mbuf_crc32c(data, 0, data_len);
+
+ /* XXX: Can't use m_append as it uses M_NOWAIT. */
+ while (data->m_next != NULL)
+ data = data->m_next;
+
+ data->m_next = m_get(M_WAITOK, MT_DATA);
+ data->m_next->m_len = sizeof(digest);
+ memcpy(mtod(data->m_next, void *), &digest,
+ sizeof(digest));
+ }
+ }
+
+ return (top);
+}
+
+/* Find the next command buffer eligible to schedule for R2T. */
+static struct nvmf_tcp_command_buffer *
+nvmf_tcp_next_r2t(struct nvmf_tcp_qpair *qp)
+{
+ struct nvmf_tcp_command_buffer *cb;
+
+ mtx_assert(&qp->rx_buffers.lock, MA_OWNED);
+ MPASS(qp->active_ttags < qp->num_ttags);
+
+ TAILQ_FOREACH(cb, &qp->rx_buffers.head, link) {
+ /* NB: maxr2t is 0's based. */
+ if (cb->tc->active_r2ts > qp->maxr2t)
+ continue;
+#ifdef INVARIANTS
+ cb->tc->pending_r2ts--;
+#endif
+ TAILQ_REMOVE(&qp->rx_buffers.head, cb, link);
+ return (cb);
+ }
+ return (NULL);
+}
+
+/* Allocate the next free transfer tag and assign it to cb. */
+static void
+nvmf_tcp_allocate_ttag(struct nvmf_tcp_qpair *qp,
+ struct nvmf_tcp_command_buffer *cb)
+{
+ uint16_t ttag;
+
+ mtx_assert(&qp->rx_buffers.lock, MA_OWNED);
+
+ ttag = qp->next_ttag;
+ for (;;) {
+ if (qp->open_ttags[ttag] == NULL)
+ break;
+ if (ttag == qp->num_ttags - 1)
+ ttag = 0;
+ else
+ ttag++;
+ MPASS(ttag != qp->next_ttag);
+ }
+ if (ttag == qp->num_ttags - 1)
+ qp->next_ttag = 0;
+ else
+ qp->next_ttag = ttag + 1;
+
+ cb->tc->active_r2ts++;
+ qp->active_ttags++;
+ qp->open_ttags[ttag] = cb;
+
+ /*
+ * Don't bother byte-swapping ttag as it is just a cookie
+ * value returned by the other end as-is.
+ */
+ cb->ttag = ttag;
+}
+
+/* NB: cid and ttag are both little-endian already. */
+static void
+tcp_send_r2t(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ uint32_t data_offset, uint32_t data_len)
+{
+ struct nvme_tcp_r2t_hdr r2t;
+ struct mbuf *m;
+
+ memset(&r2t, 0, sizeof(r2t));
+ r2t.common.pdu_type = NVME_TCP_PDU_TYPE_R2T;
+ r2t.cccid = cid;
+ r2t.ttag = ttag;
+ r2t.r2to = htole32(data_offset);
+ r2t.r2tl = htole32(data_len);
+
+ m = nvmf_tcp_construct_pdu(qp, &r2t, sizeof(r2t), NULL, 0);
+ nvmf_tcp_write_pdu(qp, m);
+}
+
+/*
+ * Release a transfer tag and schedule another R2T.
+ *
+ * NB: This drops the rx_buffers.lock mutex.
+ */
+static void
+nvmf_tcp_send_next_r2t(struct nvmf_tcp_qpair *qp,
+ struct nvmf_tcp_command_buffer *cb)
+{
+ struct nvmf_tcp_command_buffer *ncb;
+
+ mtx_assert(&qp->rx_buffers.lock, MA_OWNED);
+ MPASS(qp->open_ttags[cb->ttag] == cb);
+
+ /* Release this transfer tag. */
+ qp->open_ttags[cb->ttag] = NULL;
+ qp->active_ttags--;
+ cb->tc->active_r2ts--;
+
+ /* Schedule another R2T. */
+ ncb = nvmf_tcp_next_r2t(qp);
+ if (ncb != NULL) {
+ nvmf_tcp_allocate_ttag(qp, ncb);
+ mtx_unlock(&qp->rx_buffers.lock);
+ tcp_send_r2t(qp, ncb->cid, ncb->ttag, ncb->data_offset,
+ ncb->data_len);
+ } else
+ mtx_unlock(&qp->rx_buffers.lock);
+}
+
+/*
+ * Copy len bytes starting at offset skip from an mbuf chain into an
+ * I/O buffer at destination offset io_offset.
+ */
+static void
+mbuf_copyto_io(struct mbuf *m, u_int skip, u_int len,
+ struct nvmf_io_request *io, u_int io_offset)
+{
+ u_int todo;
+
+ while (m->m_len <= skip) {
+ skip -= m->m_len;
+ m = m->m_next;
+ }
+ while (len != 0) {
+ MPASS((m->m_flags & M_EXTPG) == 0);
+
+ todo = m->m_len - skip;
+ if (todo > len)
+ todo = len;
+
+ memdesc_copyback(&io->io_mem, io_offset, todo, mtodo(m, skip));
+ skip = 0;
+ io_offset += todo;
+ len -= todo;
+ m = m->m_next;
+ }
+}
+
+static int
+nvmf_tcp_handle_h2c_data(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_h2c_data_hdr *h2c;
+ struct nvmf_tcp_command_buffer *cb;
+ uint32_t data_len, data_offset;
+ uint16_t ttag;
+
+ h2c = (const void *)pdu->hdr;
+ if (le32toh(h2c->datal) > qp->maxh2cdata) {
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_LIMIT_EXCEEDED, 0,
+ pdu->m, pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ /*
+ * NB: Don't bother byte-swapping ttag as we don't byte-swap
+ * it when sending.
+ */
+ ttag = h2c->ttag;
+ if (ttag >= qp->num_ttags) {
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_h2c_data_hdr, ttag), pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ mtx_lock(&qp->rx_buffers.lock);
+ cb = qp->open_ttags[ttag];
+ if (cb == NULL) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_h2c_data_hdr, ttag), pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+ MPASS(cb->ttag == ttag);
+
+ /* For a data digest mismatch, fail the I/O request. */
+ if (pdu->data_digest_mismatch) {
+ nvmf_tcp_send_next_r2t(qp, cb);
+ cb->error = EINTEGRITY;
+ tcp_release_command_buffer(cb);
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+ }
+
+ data_len = le32toh(h2c->datal);
+ if (data_len != pdu->data_len) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_h2c_data_hdr, datal), pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_offset = le32toh(h2c->datao);
+ if (data_offset < cb->data_offset ||
+ data_offset + data_len > cb->data_offset + cb->data_len) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE, 0, pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if (data_offset != cb->data_offset + cb->data_xfered) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if ((cb->data_xfered + data_len == cb->data_len) !=
+ ((pdu->hdr->flags & NVME_TCP_H2C_DATA_FLAGS_LAST_PDU) != 0)) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb->data_xfered += data_len;
+ data_offset -= cb->data_offset;
+ if (cb->data_xfered == cb->data_len) {
+ nvmf_tcp_send_next_r2t(qp, cb);
+ } else {
+ tcp_hold_command_buffer(cb);
+ mtx_unlock(&qp->rx_buffers.lock);
+ }
+
+ mbuf_copyto_io(pdu->m, pdu->hdr->pdo, data_len, &cb->io, data_offset);
+
+ tcp_release_command_buffer(cb);
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+}
+
+static int
+nvmf_tcp_handle_c2h_data(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_c2h_data_hdr *c2h;
+ struct nvmf_tcp_command_buffer *cb;
+ uint32_t data_len, data_offset;
+
+ c2h = (const void *)pdu->hdr;
+
+ mtx_lock(&qp->rx_buffers.lock);
+ cb = tcp_find_command_buffer(&qp->rx_buffers, c2h->cccid, 0);
+ if (cb == NULL) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ /*
+ * XXX: Could be PDU sequence error if cccid is for a
+ * command that doesn't use a command buffer.
+ */
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_c2h_data_hdr, cccid), pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ /* For a data digest mismatch, fail the I/O request. */
+ if (pdu->data_digest_mismatch) {
+ cb->error = EINTEGRITY;
+ tcp_remove_command_buffer(&qp->rx_buffers, cb);
+ mtx_unlock(&qp->rx_buffers.lock);
+ tcp_release_command_buffer(cb);
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+ }
+
+ data_len = le32toh(c2h->datal);
+ if (data_len != pdu->data_len) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_c2h_data_hdr, datal), pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_offset = le32toh(c2h->datao);
+ if (data_offset < cb->data_offset ||
+ data_offset + data_len > cb->data_offset + cb->data_len) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE, 0,
+ pdu->m, pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if (data_offset != cb->data_offset + cb->data_xfered) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ if ((cb->data_xfered + data_len == cb->data_len) !=
+ ((pdu->hdr->flags & NVME_TCP_C2H_DATA_FLAGS_LAST_PDU) != 0)) {
+ mtx_unlock(&qp->rx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb->data_xfered += data_len;
+ data_offset -= cb->data_offset;
+ if (cb->data_xfered == cb->data_len)
+ tcp_remove_command_buffer(&qp->rx_buffers, cb);
+ else
+ tcp_hold_command_buffer(cb);
+ mtx_unlock(&qp->rx_buffers.lock);
+
+ mbuf_copyto_io(pdu->m, pdu->hdr->pdo, data_len, &cb->io, data_offset);
+
+ tcp_release_command_buffer(cb);
+
+ if ((pdu->hdr->flags & NVME_TCP_C2H_DATA_FLAGS_SUCCESS) != 0) {
+ struct nvme_completion cqe;
+ struct nvmf_capsule *nc;
+
+ memset(&cqe, 0, sizeof(cqe));
+ cqe.cid = c2h->cccid;
+
+ nc = nvmf_allocate_response(&qp->qp, &cqe, M_WAITOK);
+ nc->nc_sqhd_valid = false;
+
+ nvmf_capsule_received(&qp->qp, nc);
+ }
+
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+}
+
+/* Called when m_free drops refcount to 0. */
+static void
+nvmf_tcp_mbuf_done(struct mbuf *m)
+{
+ struct nvmf_tcp_command_buffer *cb = m->m_ext.ext_arg1;
+
+ tcp_free_command_buffer(cb);
+}
+
+static struct mbuf *
+nvmf_tcp_mbuf(void *arg, int how, void *data, size_t len)
+{
+ struct nvmf_tcp_command_buffer *cb = arg;
+ struct mbuf *m;
+
+ m = m_get(how, MT_DATA);
+ m->m_flags |= M_RDONLY;
+ m_extaddref(m, data, len, &cb->refs, nvmf_tcp_mbuf_done, cb, NULL);
+ m->m_len = len;
+ return (m);
+}
+
+static void
+nvmf_tcp_free_mext_pg(struct mbuf *m)
+{
+ struct nvmf_tcp_command_buffer *cb = m->m_ext.ext_arg1;
+
+ M_ASSERTEXTPG(m);
+ tcp_release_command_buffer(cb);
+}
+
+static struct mbuf *
+nvmf_tcp_mext_pg(void *arg, int how)
+{
+ struct nvmf_tcp_command_buffer *cb = arg;
+ struct mbuf *m;
+
+ m = mb_alloc_ext_pgs(how, nvmf_tcp_free_mext_pg);
+ m->m_ext.ext_arg1 = cb;
+ tcp_hold_command_buffer(cb);
+ return (m);
+}
+
+/*
+ * Return an mbuf chain for a range of data belonging to a command
+ * buffer.
+ *
+ * The mbuf chain uses M_EXT mbufs which hold references on the
+ * command buffer so that it remains "alive" until the data has been
+ * fully transmitted. If truncate_ok is true, then the mbuf chain
+ * might return a short chain to avoid gratuitously splitting up a
+ * page.
+ */
+static struct mbuf *
+nvmf_tcp_command_buffer_mbuf(struct nvmf_tcp_command_buffer *cb,
+ uint32_t data_offset, uint32_t data_len, uint32_t *actual_len,
+ bool can_truncate)
+{
+ struct mbuf *m;
+ size_t len;
+
+ m = memdesc_alloc_ext_mbufs(&cb->io.io_mem, nvmf_tcp_mbuf,
+ nvmf_tcp_mext_pg, cb, M_WAITOK, data_offset, data_len, &len,
+ can_truncate);
+ if (actual_len != NULL)
+ *actual_len = len;
+ return (m);
+}
+
+/* NB: cid and ttag and little-endian already. */
+static void
+tcp_send_h2c_pdu(struct nvmf_tcp_qpair *qp, uint16_t cid, uint16_t ttag,
+ uint32_t data_offset, struct mbuf *m, size_t len, bool last_pdu)
+{
+ struct nvme_tcp_h2c_data_hdr h2c;
+ struct mbuf *top;
+
+ memset(&h2c, 0, sizeof(h2c));
+ h2c.common.pdu_type = NVME_TCP_PDU_TYPE_H2C_DATA;
+ if (last_pdu)
+ h2c.common.flags |= NVME_TCP_H2C_DATA_FLAGS_LAST_PDU;
+ h2c.cccid = cid;
+ h2c.ttag = ttag;
+ h2c.datao = htole32(data_offset);
+ h2c.datal = htole32(len);
+
+ top = nvmf_tcp_construct_pdu(qp, &h2c, sizeof(h2c), m, len);
+ nvmf_tcp_write_pdu(qp, top);
+}
+
+static int
+nvmf_tcp_handle_r2t(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_rxpdu *pdu)
+{
+ const struct nvme_tcp_r2t_hdr *r2t;
+ struct nvmf_tcp_command_buffer *cb;
+ uint32_t data_len, data_offset;
+
+ r2t = (const void *)pdu->hdr;
+
+ mtx_lock(&qp->tx_buffers.lock);
+ cb = tcp_find_command_buffer(&qp->tx_buffers, r2t->cccid, 0);
+ if (cb == NULL) {
+ mtx_unlock(&qp->tx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD,
+ offsetof(struct nvme_tcp_r2t_hdr, cccid), pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ data_offset = le32toh(r2t->r2to);
+ if (data_offset != cb->data_xfered) {
+ mtx_unlock(&qp->tx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_PDU_SEQUENCE_ERROR, 0, pdu->m,
+ pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ /*
+ * XXX: The spec does not specify how to handle R2T tranfers
+ * out of range of the original command.
+ */
+ data_len = le32toh(r2t->r2tl);
+ if (data_offset + data_len > cb->data_len) {
+ mtx_unlock(&qp->tx_buffers.lock);
+ nvmf_tcp_report_error(qp,
+ NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE, 0,
+ pdu->m, pdu->hdr->hlen);
+ nvmf_tcp_free_pdu(pdu);
+ return (EBADMSG);
+ }
+
+ cb->data_xfered += data_len;
+ if (cb->data_xfered == cb->data_len)
+ tcp_remove_command_buffer(&qp->tx_buffers, cb);
+ else
+ tcp_hold_command_buffer(cb);
+ mtx_unlock(&qp->tx_buffers.lock);
+
+ /*
+ * Queue one or more H2C_DATA PDUs containing the requested
+ * data.
+ */
+ while (data_len > 0) {
+ struct mbuf *m;
+ uint32_t sent, todo;
+
+ todo = data_len;
+ if (todo > qp->max_tx_data)
+ todo = qp->max_tx_data;
+ m = nvmf_tcp_command_buffer_mbuf(cb, data_offset, todo, &sent,
+ todo < data_len);
+ tcp_send_h2c_pdu(qp, r2t->cccid, r2t->ttag, data_offset, m,
+ sent, sent == data_len);
+
+ data_offset += sent;
+ data_len -= sent;
+ }
+
+ tcp_release_command_buffer(cb);
+ nvmf_tcp_free_pdu(pdu);
+ return (0);
+}
+
+/*
+ * A variant of m_pullup that uses M_WAITOK instead of failing. It
+ * also doesn't do anything if enough bytes are already present in the
+ * first mbuf.
+ */
+static struct mbuf *
+pullup_pdu_hdr(struct mbuf *m, int len)
+{
+ struct mbuf *n, *p;
+
+ KASSERT(len <= MCLBYTES, ("%s: len too large", __func__));
+ if (m->m_len >= len)
+ return (m);
+
+ n = m_get2(len, M_WAITOK, MT_DATA, 0);
+ n->m_len = len;
+ m_copydata(m, 0, len, mtod(n, void *));
+
+ while (m != NULL && m->m_len <= len) {
+ p = m->m_next;
+ len -= m->m_len;
+ m_free(m);
+ m = p;
+ }
+ if (len > 0) {
+ m->m_data += len;
+ m->m_len -= len;
+ }
+ n->m_next = m;
+ return (n);
+}
+
+static int
+nvmf_tcp_dispatch_pdu(struct nvmf_tcp_qpair *qp,
+ const struct nvme_tcp_common_pdu_hdr *ch, struct nvmf_tcp_rxpdu *pdu)
+{
+ /* Ensure the PDU header is contiguous. */
+ pdu->m = pullup_pdu_hdr(pdu->m, ch->hlen);
+ pdu->hdr = mtod(pdu->m, const void *);
+
+ switch (ch->pdu_type) {
+ default:
+ __assert_unreachable();
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ return (nvmf_tcp_handle_term_req(pdu));
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ return (nvmf_tcp_save_command_capsule(qp, pdu));
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ return (nvmf_tcp_save_response_capsule(qp, pdu));
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ return (nvmf_tcp_handle_h2c_data(qp, pdu));
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ return (nvmf_tcp_handle_c2h_data(qp, pdu));
+ case NVME_TCP_PDU_TYPE_R2T:
+ return (nvmf_tcp_handle_r2t(qp, pdu));
+ }
+}
+
+static void
+nvmf_tcp_receive(void *arg)
+{
+ struct nvmf_tcp_qpair *qp = arg;
+ struct socket *so = qp->so;
+ struct nvmf_tcp_rxpdu pdu;
+ struct nvme_tcp_common_pdu_hdr ch;
+ struct uio uio;
+ struct iovec iov[1];
+ struct mbuf *m, *n, *tail;
+ u_int avail, needed;
+ int error, flags, terror;
+ bool have_header;
+
+ m = tail = NULL;
+ have_header = false;
+ SOCKBUF_LOCK(&so->so_rcv);
+ while (!qp->rx_shutdown) {
+ /* Wait until there is enough data for the next step. */
+ if (so->so_error != 0 || so->so_rerror != 0) {
+ if (so->so_error != 0)
+ error = so->so_error;
+ else
+ error = so->so_rerror;
+ SOCKBUF_UNLOCK(&so->so_rcv);
+ error:
+ m_freem(m);
+ nvmf_qpair_error(&qp->qp, error);
+ SOCKBUF_LOCK(&so->so_rcv);
+ while (!qp->rx_shutdown)
+ cv_wait(&qp->rx_cv, SOCKBUF_MTX(&so->so_rcv));
+ break;
+ }
+ avail = sbavail(&so->so_rcv);
+ if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) != 0) {
+ if (!have_header && avail == 0)
+ error = 0;
+ else
+ error = ECONNRESET;
+ SOCKBUF_UNLOCK(&so->so_rcv);
+ goto error;
+ }
+ if (avail == 0 || (!have_header && avail < sizeof(ch))) {
+ cv_wait(&qp->rx_cv, SOCKBUF_MTX(&so->so_rcv));
+ continue;
+ }
+ SOCKBUF_UNLOCK(&so->so_rcv);
+
+ if (!have_header) {
+ KASSERT(m == NULL, ("%s: m != NULL but no header",
+ __func__));
+ memset(&uio, 0, sizeof(uio));
+ iov[0].iov_base = &ch;
+ iov[0].iov_len = sizeof(ch);
+ uio.uio_iov = iov;
+ uio.uio_iovcnt = 1;
+ uio.uio_resid = sizeof(ch);
+ uio.uio_segflg = UIO_SYSSPACE;
+ uio.uio_rw = UIO_READ;
+ flags = MSG_DONTWAIT | MSG_PEEK;
+
+ error = soreceive(so, NULL, &uio, NULL, NULL, &flags);
+ if (error != 0)
+ goto error;
+ KASSERT(uio.uio_resid == 0, ("%s: short CH read",
+ __func__));
+
+ have_header = true;
+ needed = le32toh(ch.plen);
+
+ /*
+ * Malformed PDUs will be reported as errors
+ * by nvmf_tcp_validate_pdu. Just pass along
+ * garbage headers if the lengths mismatch.
+ */
+ if (needed < sizeof(ch) || ch.hlen > needed)
+ needed = sizeof(ch);
+
+ memset(&uio, 0, sizeof(uio));
+ uio.uio_resid = needed;
+ }
+
+ flags = MSG_DONTWAIT;
+ error = soreceive(so, NULL, &uio, &n, NULL, &flags);
+ if (error != 0)
+ goto error;
+
+ if (m == NULL)
+ m = n;
+ else
+ tail->m_next = n;
+
+ if (uio.uio_resid != 0) {
+ tail = n;
+ while (tail->m_next != NULL)
+ tail = tail->m_next;
+
+ SOCKBUF_LOCK(&so->so_rcv);
+ continue;
+ }
+#ifdef INVARIANTS
+ tail = NULL;
+#endif
+
+ pdu.m = m;
+ m = NULL;
+ pdu.hdr = &ch;
+ error = nvmf_tcp_validate_pdu(qp, &pdu);
+ if (error != 0)
+ m_freem(pdu.m);
+ else
+ error = nvmf_tcp_dispatch_pdu(qp, &ch, &pdu);
+ if (error != 0) {
+ /*
+ * If we received a termination request, close
+ * the connection immediately.
+ */
+ if (error == ECONNRESET)
+ goto error;
+
+ /*
+ * Wait for up to 30 seconds for the socket to
+ * be closed by the other end.
+ */
+ SOCKBUF_LOCK(&so->so_rcv);
+ if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) == 0) {
+ terror = cv_timedwait(&qp->rx_cv,
+ SOCKBUF_MTX(&so->so_rcv), 30 * hz);
+ if (terror == ETIMEDOUT)
+ printf("NVMe/TCP: Timed out after sending terminate request\n");
+ }
+ SOCKBUF_UNLOCK(&so->so_rcv);
+ goto error;
+ }
+
+ have_header = false;
+ SOCKBUF_LOCK(&so->so_rcv);
+ }
+ SOCKBUF_UNLOCK(&so->so_rcv);
+ kthread_exit();
+}
+
+static struct mbuf *
+tcp_command_pdu(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_capsule *tc)
+{
+ struct nvmf_capsule *nc = &tc->nc;
+ struct nvmf_tcp_command_buffer *cb;
+ struct nvme_sgl_descriptor *sgl;
+ struct nvme_tcp_cmd cmd;
+ struct mbuf *top, *m;
+ bool use_icd;
+
+ use_icd = false;
+ cb = NULL;
+ m = NULL;
+
+ if (nc->nc_data.io_len != 0) {
+ cb = tcp_alloc_command_buffer(qp, &nc->nc_data, 0,
+ nc->nc_data.io_len, nc->nc_sqe.cid);
+
+ if (nc->nc_send_data && nc->nc_data.io_len <= qp->max_icd) {
+ use_icd = true;
+ m = nvmf_tcp_command_buffer_mbuf(cb, 0,
+ nc->nc_data.io_len, NULL, false);
+ cb->data_xfered = nc->nc_data.io_len;
+ tcp_release_command_buffer(cb);
+ } else if (nc->nc_send_data) {
+ mtx_lock(&qp->tx_buffers.lock);
+ tcp_add_command_buffer(&qp->tx_buffers, cb);
+ mtx_unlock(&qp->tx_buffers.lock);
+ } else {
+ mtx_lock(&qp->rx_buffers.lock);
+ tcp_add_command_buffer(&qp->rx_buffers, cb);
+ mtx_unlock(&qp->rx_buffers.lock);
+ }
+ }
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.common.pdu_type = NVME_TCP_PDU_TYPE_CAPSULE_CMD;
+ cmd.ccsqe = nc->nc_sqe;
+
+ /* Populate SGL in SQE. */
+ sgl = &cmd.ccsqe.sgl;
+ memset(sgl, 0, sizeof(*sgl));
+ sgl->address = 0;
+ sgl->length = htole32(nc->nc_data.io_len);
+ if (use_icd) {
+ /* Use in-capsule data. */
+ sgl->type = NVME_SGL_TYPE_ICD;
+ } else {
+ /* Use a command buffer. */
+ sgl->type = NVME_SGL_TYPE_COMMAND_BUFFER;
+ }
+
+ top = nvmf_tcp_construct_pdu(qp, &cmd, sizeof(cmd), m, m != NULL ?
+ nc->nc_data.io_len : 0);
+ return (top);
+}
+
+static struct mbuf *
+tcp_response_pdu(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_capsule *tc)
+{
+ struct nvmf_capsule *nc = &tc->nc;
+ struct nvme_tcp_rsp rsp;
+
+ memset(&rsp, 0, sizeof(rsp));
+ rsp.common.pdu_type = NVME_TCP_PDU_TYPE_CAPSULE_RESP;
+ rsp.rccqe = nc->nc_cqe;
+
+ return (nvmf_tcp_construct_pdu(qp, &rsp, sizeof(rsp), NULL, 0));
+}
+
+static struct mbuf *
+capsule_to_pdu(struct nvmf_tcp_qpair *qp, struct nvmf_tcp_capsule *tc)
+{
+ if (tc->nc.nc_qe_len == sizeof(struct nvme_command))
+ return (tcp_command_pdu(qp, tc));
+ else
+ return (tcp_response_pdu(qp, tc));
+}
+
+static void
+nvmf_tcp_send(void *arg)
+{
+ struct nvmf_tcp_qpair *qp = arg;
+ struct nvmf_tcp_capsule *tc;
+ struct socket *so = qp->so;
+ struct mbuf *m, *n, *p;
+ u_long space, tosend;
+ int error;
+
+ m = NULL;
+ SOCKBUF_LOCK(&so->so_snd);
+ while (!qp->tx_shutdown) {
+ if (so->so_error != 0) {
+ error = so->so_error;
+ SOCKBUF_UNLOCK(&so->so_snd);
+ error:
+ m_freem(m);
+ nvmf_qpair_error(&qp->qp, error);
+ SOCKBUF_LOCK(&so->so_snd);
+ while (!qp->tx_shutdown)
+ cv_wait(&qp->tx_cv, SOCKBUF_MTX(&so->so_snd));
+ break;
+ }
+
+ if (m == NULL) {
+ /* Next PDU to send. */
+ m = mbufq_dequeue(&qp->tx_pdus);
+ }
+ if (m == NULL) {
+ if (STAILQ_EMPTY(&qp->tx_capsules)) {
+ cv_wait(&qp->tx_cv, SOCKBUF_MTX(&so->so_snd));
+ continue;
+ }
+
+ /* Convert a capsule into a PDU. */
+ tc = STAILQ_FIRST(&qp->tx_capsules);
+ STAILQ_REMOVE_HEAD(&qp->tx_capsules, link);
+ SOCKBUF_UNLOCK(&so->so_snd);
+
+ n = capsule_to_pdu(qp, tc);
+ tcp_release_capsule(tc);
+
+ SOCKBUF_LOCK(&so->so_snd);
+ mbufq_enqueue(&qp->tx_pdus, n);
+ continue;
+ }
+
+ /*
+ * Wait until there is enough room to send some data.
+ * If the socket buffer is empty, always send at least
+ * something.
+ */
+ space = sbspace(&so->so_snd);
+ if (space < m->m_len && sbused(&so->so_snd) != 0) {
+ cv_wait(&qp->tx_cv, SOCKBUF_MTX(&so->so_snd));
+ continue;
+ }
+ SOCKBUF_UNLOCK(&so->so_snd);
+
+ /*
+ * If 'm' is too big, then the socket buffer must be
+ * empty. Split 'm' to make at least some forward
+ * progress.
+ *
+ * Otherwise, chain up as many pending mbufs from 'm'
+ * that will fit.
+ */
+ if (m->m_len > space) {
+ n = m_split(m, space, M_WAITOK);
+ } else {
+ tosend = m->m_len;
+ n = m->m_next;
+ p = m;
+ while (n != NULL && tosend + n->m_len <= space) {
+ tosend += n->m_len;
+ p = n;
+ n = n->m_next;
+ }
+ KASSERT(p->m_next == n, ("%s: p not before n",
+ __func__));
+ p->m_next = NULL;
+
+ KASSERT(m_length(m, NULL) == tosend,
+ ("%s: length mismatch", __func__));
+ }
+ error = sosend(so, NULL, NULL, m, NULL, MSG_DONTWAIT, NULL);
+ if (error != 0) {
+ m = NULL;
+ m_freem(n);
+ goto error;
+ }
+ m = n;
+ SOCKBUF_LOCK(&so->so_snd);
+ }
+ SOCKBUF_UNLOCK(&so->so_snd);
+ kthread_exit();
+}
+
+static int
+nvmf_soupcall_receive(struct socket *so, void *arg, int waitflag)
+{
+ struct nvmf_tcp_qpair *qp = arg;
+
+ if (soreadable(so))
+ cv_signal(&qp->rx_cv);
+ return (SU_OK);
+}
+
+static int
+nvmf_soupcall_send(struct socket *so, void *arg, int waitflag)
+{
+ struct nvmf_tcp_qpair *qp = arg;
+
+ if (sowriteable(so))
+ cv_signal(&qp->tx_cv);
+ return (SU_OK);
+}
+
+static struct nvmf_qpair *
+tcp_allocate_qpair(bool controller,
+ const struct nvmf_handoff_qpair_params *params)
+{
+ struct nvmf_tcp_qpair *qp;
+ struct socket *so;
+ struct file *fp;
+ cap_rights_t rights;
+ int error;
+
+ error = fget(curthread, params->tcp.fd, cap_rights_init_one(&rights,
+ CAP_SOCK_CLIENT), &fp);
+ if (error != 0)
+ return (NULL);
+ if (fp->f_type != DTYPE_SOCKET) {
+ fdrop(fp, curthread);
+ return (NULL);
+ }
+ so = fp->f_data;
+ if (so->so_type != SOCK_STREAM ||
+ so->so_proto->pr_protocol != IPPROTO_TCP) {
+ fdrop(fp, curthread);
+ return (NULL);
+ }
+
+ /* Claim socket from file descriptor. */
+ fp->f_ops = &badfileops;
+ fp->f_data = NULL;
+ fdrop(fp, curthread);
+
+ qp = malloc(sizeof(*qp), M_NVMF_TCP, M_WAITOK | M_ZERO);
+ qp->so = so;
+ refcount_init(&qp->refs, 1);
+ qp->txpda = params->tcp.txpda;
+ qp->rxpda = params->tcp.rxpda;
+ qp->header_digests = params->tcp.header_digests;
+ qp->data_digests = params->tcp.data_digests;
+ qp->maxr2t = params->tcp.maxr2t;
+ qp->maxh2cdata = params->tcp.maxh2cdata;
+ qp->max_tx_data = tcp_max_transmit_data;
+ if (!controller) {
+ if (qp->max_tx_data > params->tcp.maxh2cdata)
+ qp->max_tx_data = params->tcp.maxh2cdata;
+ }
+ qp->max_icd = params->tcp.max_icd;
+
+ if (controller) {
+ /* Use the SUCCESS flag if SQ flow control is disabled. */
+ qp->send_success = !params->sq_flow_control;
+
+ /* NB: maxr2t is 0's based. */
+ qp->num_ttags = MIN((u_int)UINT16_MAX + 1,
+ (uint64_t)params->qsize * (uint64_t)qp->maxr2t + 1);
+ qp->open_ttags = mallocarray(qp->num_ttags,
+ sizeof(*qp->open_ttags), M_NVMF_TCP, M_WAITOK | M_ZERO);
+ }
+
+ TAILQ_INIT(&qp->rx_buffers.head);
+ TAILQ_INIT(&qp->tx_buffers.head);
+ mtx_init(&qp->rx_buffers.lock, "nvmf/tcp rx buffers", NULL, MTX_DEF);
+ mtx_init(&qp->tx_buffers.lock, "nvmf/tcp tx buffers", NULL, MTX_DEF);
+
+ cv_init(&qp->rx_cv, "-");
+ cv_init(&qp->tx_cv, "-");
+ mbufq_init(&qp->tx_pdus, 0);
+ STAILQ_INIT(&qp->tx_capsules);
+
+ /* Register socket upcalls. */
+ SOCKBUF_LOCK(&so->so_rcv);
+ soupcall_set(so, SO_RCV, nvmf_soupcall_receive, qp);
+ SOCKBUF_UNLOCK(&so->so_rcv);
+ SOCKBUF_LOCK(&so->so_snd);
+ soupcall_set(so, SO_SND, nvmf_soupcall_send, qp);
+ SOCKBUF_UNLOCK(&so->so_snd);
+
+ /* Spin up kthreads. */
+ error = kthread_add(nvmf_tcp_receive, qp, NULL, &qp->rx_thread, 0, 0,
+ "nvmef tcp rx");
+ if (error != 0) {
+ tcp_free_qpair(&qp->qp);
+ return (NULL);
+ }
+ error = kthread_add(nvmf_tcp_send, qp, NULL, &qp->tx_thread, 0, 0,
+ "nvmef tcp tx");
+ if (error != 0) {
+ tcp_free_qpair(&qp->qp);
+ return (NULL);
+ }
+
+ return (&qp->qp);
+}
+
+static void
+tcp_release_qpair(struct nvmf_tcp_qpair *qp)
+{
+ if (refcount_release(&qp->refs))
+ free(qp, M_NVMF_TCP);
+}
+
+static void
+tcp_free_qpair(struct nvmf_qpair *nq)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nq);
+ struct nvmf_tcp_command_buffer *ncb, *cb;
+ struct nvmf_tcp_capsule *ntc, *tc;
+ struct socket *so = qp->so;
+
+ /* Shut down kthreads and clear upcalls */
+ SOCKBUF_LOCK(&so->so_snd);
+ qp->tx_shutdown = true;
+ if (qp->tx_thread != NULL) {
+ cv_signal(&qp->tx_cv);
+ mtx_sleep(qp->tx_thread, SOCKBUF_MTX(&so->so_snd), 0,
+ "nvtcptx", 0);
+ }
+ soupcall_clear(so, SO_SND);
+ SOCKBUF_UNLOCK(&so->so_snd);
+
+ SOCKBUF_LOCK(&so->so_rcv);
+ qp->rx_shutdown = true;
+ if (qp->rx_thread != NULL) {
+ cv_signal(&qp->rx_cv);
+ mtx_sleep(qp->rx_thread, SOCKBUF_MTX(&so->so_rcv), 0,
+ "nvtcprx", 0);
+ }
+ soupcall_clear(so, SO_RCV);
+ SOCKBUF_UNLOCK(&so->so_rcv);
+
+ STAILQ_FOREACH_SAFE(tc, &qp->tx_capsules, link, ntc) {
+ nvmf_abort_capsule_data(&tc->nc, ECONNABORTED);
+ tcp_release_capsule(tc);
+ }
+ mbufq_drain(&qp->tx_pdus);
+
+ cv_destroy(&qp->tx_cv);
+ cv_destroy(&qp->rx_cv);
+
+ if (qp->open_ttags != NULL) {
+ for (u_int i = 0; i < qp->num_ttags; i++) {
+ cb = qp->open_ttags[i];
+ if (cb != NULL) {
+ cb->error = ECONNABORTED;
+ tcp_release_command_buffer(cb);
+ }
+ }
+ free(qp->open_ttags, M_NVMF_TCP);
+ }
+
+ mtx_lock(&qp->rx_buffers.lock);
+ TAILQ_FOREACH_SAFE(cb, &qp->rx_buffers.head, link, ncb) {
+ tcp_remove_command_buffer(&qp->rx_buffers, cb);
+ mtx_unlock(&qp->rx_buffers.lock);
+ cb->error = ECONNABORTED;
+ tcp_release_command_buffer(cb);
+ mtx_lock(&qp->rx_buffers.lock);
+ }
+ mtx_destroy(&qp->rx_buffers.lock);
+
+ mtx_lock(&qp->tx_buffers.lock);
+ TAILQ_FOREACH_SAFE(cb, &qp->tx_buffers.head, link, ncb) {
+ tcp_remove_command_buffer(&qp->tx_buffers, cb);
+ mtx_unlock(&qp->tx_buffers.lock);
+ cb->error = ECONNABORTED;
+ tcp_release_command_buffer(cb);
+ mtx_lock(&qp->tx_buffers.lock);
+ }
+ mtx_destroy(&qp->tx_buffers.lock);
+
+ soclose(so);
+
+ tcp_release_qpair(qp);
+}
+
+static struct nvmf_capsule *
+tcp_allocate_capsule(struct nvmf_qpair *nq, int how)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nq);
+ struct nvmf_tcp_capsule *tc;
+
+ tc = malloc(sizeof(*tc), M_NVMF_TCP, how | M_ZERO);
+ if (tc == NULL)
+ return (NULL);
+ refcount_init(&tc->refs, 1);
+ refcount_acquire(&qp->refs);
+ return (&tc->nc);
+}
+
+static void
+tcp_release_capsule(struct nvmf_tcp_capsule *tc)
+{
+ struct nvmf_tcp_qpair *qp = TQP(tc->nc.nc_qpair);
+
+ if (!refcount_release(&tc->refs))
+ return;
+
+ MPASS(tc->active_r2ts == 0);
+ MPASS(tc->pending_r2ts == 0);
+
+ nvmf_tcp_free_pdu(&tc->rx_pdu);
+ free(tc, M_NVMF_TCP);
+ tcp_release_qpair(qp);
+}
+
+static void
+tcp_free_capsule(struct nvmf_capsule *nc)
+{
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+
+ tcp_release_capsule(tc);
+}
+
+static int
+tcp_transmit_capsule(struct nvmf_capsule *nc)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+ struct socket *so = qp->so;
+
+ refcount_acquire(&tc->refs);
+ SOCKBUF_LOCK(&so->so_snd);
+ STAILQ_INSERT_TAIL(&qp->tx_capsules, tc, link);
+ if (sowriteable(so))
+ cv_signal(&qp->tx_cv);
+ SOCKBUF_UNLOCK(&so->so_snd);
+ return (0);
+}
+
+static uint8_t
+tcp_validate_command_capsule(struct nvmf_capsule *nc)
+{
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+ struct nvme_sgl_descriptor *sgl;
+
+ KASSERT(tc->rx_pdu.hdr != NULL, ("capsule wasn't received"));
+
+ sgl = &nc->nc_sqe.sgl;
+ switch (sgl->type) {
+ case NVME_SGL_TYPE_ICD:
+ if (tc->rx_pdu.data_len != le32toh(sgl->length)) {
+ printf("NVMe/TCP: Command Capsule with mismatched ICD length\n");
+ return (NVME_SC_DATA_SGL_LENGTH_INVALID);
+ }
+ break;
+ case NVME_SGL_TYPE_COMMAND_BUFFER:
+ if (tc->rx_pdu.data_len != 0) {
+ printf("NVMe/TCP: Command Buffer SGL with ICD\n");
+ return (NVME_SC_INVALID_FIELD);
+ }
+ break;
+ default:
+ printf("NVMe/TCP: Invalid SGL type in Command Capsule\n");
+ return (NVME_SC_SGL_DESCRIPTOR_TYPE_INVALID);
+ }
+
+ if (sgl->address != 0) {
+ printf("NVMe/TCP: Invalid SGL offset in Command Capsule\n");
+ return (NVME_SC_SGL_OFFSET_INVALID);
+ }
+
+ return (NVME_SC_SUCCESS);
+}
+
+static size_t
+tcp_capsule_data_len(const struct nvmf_capsule *nc)
+{
+ MPASS(nc->nc_qe_len == sizeof(struct nvme_command));
+ return (le32toh(nc->nc_sqe.sgl.length));
+}
+
+static void
+tcp_receive_r2t_data(struct nvmf_capsule *nc, uint32_t data_offset,
+ struct nvmf_io_request *io)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+ struct nvmf_tcp_command_buffer *cb;
+
+ cb = tcp_alloc_command_buffer(qp, io, data_offset, io->io_len,
+ nc->nc_sqe.cid);
+
+ cb->tc = tc;
+ refcount_acquire(&tc->refs);
+
+ /*
+ * If this command has too many active R2Ts or there are no
+ * available transfer tags, queue the request for later.
+ *
+ * NB: maxr2t is 0's based.
+ */
+ mtx_lock(&qp->rx_buffers.lock);
+ if (tc->active_r2ts > qp->maxr2t || qp->active_ttags == qp->num_ttags) {
+#ifdef INVARIANTS
+ tc->pending_r2ts++;
+#endif
+ TAILQ_INSERT_TAIL(&qp->rx_buffers.head, cb, link);
+ mtx_unlock(&qp->rx_buffers.lock);
+ return;
+ }
+
+ nvmf_tcp_allocate_ttag(qp, cb);
+ mtx_unlock(&qp->rx_buffers.lock);
+
+ tcp_send_r2t(qp, nc->nc_sqe.cid, cb->ttag, data_offset, io->io_len);
+}
+
+static void
+tcp_receive_icd_data(struct nvmf_capsule *nc, uint32_t data_offset,
+ struct nvmf_io_request *io)
+{
+ struct nvmf_tcp_capsule *tc = TCAP(nc);
+
+ mbuf_copyto_io(tc->rx_pdu.m, tc->rx_pdu.hdr->pdo + data_offset,
+ io->io_len, io, 0);
+ nvmf_complete_io_request(io, io->io_len, 0);
+}
+
+static int
+tcp_receive_controller_data(struct nvmf_capsule *nc, uint32_t data_offset,
+ struct nvmf_io_request *io)
+{
+ struct nvme_sgl_descriptor *sgl;
+ size_t data_len;
+
+ if (nc->nc_qe_len != sizeof(struct nvme_command) ||
+ !nc->nc_qpair->nq_controller)
+ return (EINVAL);
+
+ sgl = &nc->nc_sqe.sgl;
+ data_len = le32toh(sgl->length);
+ if (data_offset + io->io_len > data_len)
+ return (EFBIG);
+
+ if (sgl->type == NVME_SGL_TYPE_ICD)
+ tcp_receive_icd_data(nc, data_offset, io);
+ else
+ tcp_receive_r2t_data(nc, data_offset, io);
+ return (0);
+}
+
+/* NB: cid is little-endian already. */
+static void
+tcp_send_c2h_pdu(struct nvmf_tcp_qpair *qp, uint16_t cid, uint32_t data_offset,
+ struct mbuf *m, size_t len, bool last_pdu, bool success)
+{
+ struct nvme_tcp_c2h_data_hdr c2h;
+ struct mbuf *top;
+
+ memset(&c2h, 0, sizeof(c2h));
+ c2h.common.pdu_type = NVME_TCP_PDU_TYPE_C2H_DATA;
+ if (last_pdu)
+ c2h.common.flags |= NVME_TCP_C2H_DATA_FLAGS_LAST_PDU;
+ if (success)
+ c2h.common.flags |= NVME_TCP_C2H_DATA_FLAGS_SUCCESS;
+ c2h.cccid = cid;
+ c2h.datao = htole32(data_offset);
+ c2h.datal = htole32(len);
+
+ top = nvmf_tcp_construct_pdu(qp, &c2h, sizeof(c2h), m, len);
+ nvmf_tcp_write_pdu(qp, top);
+}
+
+static u_int
+tcp_send_controller_data(struct nvmf_capsule *nc, uint32_t data_offset,
+ struct mbuf *m, size_t len)
+{
+ struct nvmf_tcp_qpair *qp = TQP(nc->nc_qpair);
+ struct nvme_sgl_descriptor *sgl;
+ struct mbuf *n, *p;
+ uint32_t data_len;
+ bool last_pdu, last_xfer;
+
+ if (nc->nc_qe_len != sizeof(struct nvme_command) ||
+ !qp->qp.nq_controller) {
+ m_freem(m);
+ return (NVME_SC_INVALID_FIELD);
+ }
+
+ sgl = &nc->nc_sqe.sgl;
+ data_len = le32toh(sgl->length);
+ if (data_offset + len > data_len) {
+ m_freem(m);
+ return (NVME_SC_INVALID_FIELD);
+ }
+ last_xfer = (data_offset + len == data_len);
+
+ if (sgl->type != NVME_SGL_TYPE_COMMAND_BUFFER) {
+ m_freem(m);
+ return (NVME_SC_INVALID_FIELD);
+ }
+
+ KASSERT(data_offset == TCAP(nc)->tx_data_offset,
+ ("%s: starting data_offset %u doesn't match end of previous xfer %u",
+ __func__, data_offset, TCAP(nc)->tx_data_offset));
+
+ /* Queue one more C2H_DATA PDUs containing the data from 'm'. */
+ while (m != NULL) {
+ uint32_t todo;
+
+ todo = m->m_len;
+ p = m;
+ n = p->m_next;
+ while (n != NULL) {
+ if (todo + n->m_len > qp->max_tx_data) {
+ p->m_next = NULL;
+ break;
+ }
+ todo += n->m_len;
+ p = n;
+ n = p->m_next;
+ }
+ MPASS(m_length(m, NULL) == todo);
+
+ last_pdu = (n == NULL && last_xfer);
+ tcp_send_c2h_pdu(qp, nc->nc_sqe.cid, data_offset, m, todo,
+ last_pdu, last_pdu && qp->send_success);
+
+ data_offset += todo;
+ data_len -= todo;
+ m = n;
+ }
+ MPASS(data_len == 0);
+
+#ifdef INVARIANTS
+ TCAP(nc)->tx_data_offset = data_offset;
+#endif
+ if (!last_xfer)
+ return (NVMF_MORE);
+ else if (qp->send_success)
+ return (NVMF_SUCCESS_SENT);
+ else
+ return (NVME_SC_SUCCESS);
+}
+
+struct nvmf_transport_ops tcp_ops = {
+ .allocate_qpair = tcp_allocate_qpair,
+ .free_qpair = tcp_free_qpair,
+ .allocate_capsule = tcp_allocate_capsule,
+ .free_capsule = tcp_free_capsule,
+ .transmit_capsule = tcp_transmit_capsule,
+ .validate_command_capsule = tcp_validate_command_capsule,
+ .capsule_data_len = tcp_capsule_data_len,
+ .receive_controller_data = tcp_receive_controller_data,
+ .send_controller_data = tcp_send_controller_data,
+ .trtype = NVMF_TRTYPE_TCP,
+ .priority = 0,
+};
+
+NVMF_TRANSPORT(tcp, tcp_ops);
diff --git a/sys/dev/nvmf/nvmf_tcp.h b/sys/dev/nvmf/nvmf_tcp.h
new file mode 100644
index 000000000000..78d6cf17a977
--- /dev/null
+++ b/sys/dev/nvmf/nvmf_tcp.h
@@ -0,0 +1,276 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMF_TCP_H__
+#define __NVMF_TCP_H__
+
+#ifndef _KERNEL
+#define __assert_unreachable __unreachable
+#define MPASS assert
+#endif
+
+#define NVME_SGL_TYPE_ICD \
+ NVME_SGL_TYPE(NVME_SGL_TYPE_DATA_BLOCK, NVME_SGL_SUBTYPE_OFFSET)
+
+#define NVME_SGL_TYPE_COMMAND_BUFFER \
+ NVME_SGL_TYPE(NVME_SGL_TYPE_TRANSPORT_DATA_BLOCK, \
+ NVME_SGL_SUBTYPE_TRANSPORT)
+
+/*
+ * Validate common fields in a received PDU header. If an error is
+ * detected that requires an immediate disconnect, ECONNRESET is
+ * returned. If an error is detected that should be reported, EBADMSG
+ * is returned and *fes and *fei are set to the values to be used in a
+ * termination request PDU. If no error is detected, 0 is returned
+ * and *data_lenp is set to the length of any included data.
+ *
+ * Section number references refer to NVM Express over Fabrics
+ * Revision 1.1 dated October 22, 2019.
+ */
+static __inline int
+nvmf_tcp_validate_pdu_header(const struct nvme_tcp_common_pdu_hdr *ch,
+ bool controller, bool header_digests, bool data_digests, uint8_t rxpda,
+ uint32_t *data_lenp, uint16_t *fes, uint32_t *fei)
+{
+ uint32_t data_len, plen;
+ u_int expected_hlen, full_hlen;
+ uint8_t digest_flags, valid_flags;
+
+ plen = le32toh(ch->plen);
+
+ /*
+ * Errors must be reported for the lowest incorrect field
+ * first, so validate fields in order.
+ */
+
+ /* Validate pdu_type. */
+
+ /* Controllers only receive PDUs with a PDU direction of 0. */
+ if (controller != ((ch->pdu_type & 0x01) == 0)) {
+ printf("NVMe/TCP: Invalid PDU type %u\n", ch->pdu_type);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, pdu_type);
+ return (EBADMSG);
+ }
+
+ switch (ch->pdu_type) {
+ case NVME_TCP_PDU_TYPE_IC_REQ:
+ case NVME_TCP_PDU_TYPE_IC_RESP:
+ /* Shouldn't get these for an established connection. */
+ printf("NVMe/TCP: Received Initialize Connection PDU\n");
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, pdu_type);
+ return (EBADMSG);
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ /*
+ * 7.4.7 Termination requests with invalid PDU lengths
+ * result in an immediate connection termination
+ * without reporting an error.
+ */
+ if (plen < sizeof(struct nvme_tcp_term_req_hdr) ||
+ plen > NVME_TCP_TERM_REQ_PDU_MAX_SIZE) {
+ printf("NVMe/TCP: Received invalid termination request\n");
+ return (ECONNRESET);
+ }
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ case NVME_TCP_PDU_TYPE_R2T:
+ break;
+ default:
+ printf("NVMe/TCP: Invalid PDU type %u\n", ch->pdu_type);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, pdu_type);
+ return (EBADMSG);
+ }
+
+ /* Validate flags. */
+ switch (ch->pdu_type) {
+ default:
+ __assert_unreachable();
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ valid_flags = 0;
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ valid_flags = NVME_TCP_CH_FLAGS_HDGSTF |
+ NVME_TCP_CH_FLAGS_DDGSTF;
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ case NVME_TCP_PDU_TYPE_R2T:
+ valid_flags = NVME_TCP_CH_FLAGS_HDGSTF;
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ valid_flags = NVME_TCP_CH_FLAGS_HDGSTF |
+ NVME_TCP_CH_FLAGS_DDGSTF | NVME_TCP_H2C_DATA_FLAGS_LAST_PDU;
+ break;
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ valid_flags = NVME_TCP_CH_FLAGS_HDGSTF |
+ NVME_TCP_CH_FLAGS_DDGSTF | NVME_TCP_C2H_DATA_FLAGS_LAST_PDU |
+ NVME_TCP_C2H_DATA_FLAGS_SUCCESS;
+ break;
+ }
+ if ((ch->flags & ~valid_flags) != 0) {
+ printf("NVMe/TCP: Invalid PDU header flags %#x\n", ch->flags);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, flags);
+ return (EBADMSG);
+ }
+
+ /* Verify that digests are present iff enabled. */
+ digest_flags = 0;
+ if (header_digests)
+ digest_flags |= NVME_TCP_CH_FLAGS_HDGSTF;
+ if (data_digests)
+ digest_flags |= NVME_TCP_CH_FLAGS_DDGSTF;
+ if ((digest_flags & valid_flags) !=
+ (ch->flags & (NVME_TCP_CH_FLAGS_HDGSTF |
+ NVME_TCP_CH_FLAGS_DDGSTF))) {
+ printf("NVMe/TCP: Invalid PDU header flags %#x\n", ch->flags);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, flags);
+ return (EBADMSG);
+ }
+
+ /* 7.4.5.2: SUCCESS in C2H requires LAST_PDU */
+ if (ch->pdu_type == NVME_TCP_PDU_TYPE_C2H_DATA &&
+ (ch->flags & (NVME_TCP_C2H_DATA_FLAGS_LAST_PDU |
+ NVME_TCP_C2H_DATA_FLAGS_SUCCESS)) ==
+ NVME_TCP_C2H_DATA_FLAGS_SUCCESS) {
+ printf("NVMe/TCP: Invalid PDU header flags %#x\n", ch->flags);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, flags);
+ return (EBADMSG);
+ }
+
+ /* Validate hlen. */
+ switch (ch->pdu_type) {
+ default:
+ __assert_unreachable();
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ expected_hlen = sizeof(struct nvme_tcp_term_req_hdr);
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ expected_hlen = sizeof(struct nvme_tcp_cmd);
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ expected_hlen = sizeof(struct nvme_tcp_rsp);
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ expected_hlen = sizeof(struct nvme_tcp_h2c_data_hdr);
+ break;
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ expected_hlen = sizeof(struct nvme_tcp_c2h_data_hdr);
+ break;
+ case NVME_TCP_PDU_TYPE_R2T:
+ expected_hlen = sizeof(struct nvme_tcp_r2t_hdr);
+ break;
+ }
+ if (ch->hlen != expected_hlen) {
+ printf("NVMe/TCP: Invalid PDU header length %u\n", ch->hlen);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, hlen);
+ return (EBADMSG);
+ }
+
+ /* Validate pdo. */
+ full_hlen = ch->hlen;
+ if ((ch->flags & NVME_TCP_CH_FLAGS_HDGSTF) != 0)
+ full_hlen += sizeof(uint32_t);
+ switch (ch->pdu_type) {
+ default:
+ __assert_unreachable();
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ case NVME_TCP_PDU_TYPE_R2T:
+ if (ch->pdo != 0) {
+ printf("NVMe/TCP: Invalid PDU data offset %u\n",
+ ch->pdo);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, pdo);
+ return (EBADMSG);
+ }
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ /* Permit PDO of 0 if there is no data. */
+ if (full_hlen == plen && ch->pdo == 0)
+ break;
+
+ if (ch->pdo < full_hlen || ch->pdo > plen ||
+ ch->pdo % rxpda != 0) {
+ printf("NVMe/TCP: Invalid PDU data offset %u\n",
+ ch->pdo);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, pdo);
+ return (EBADMSG);
+ }
+ break;
+ }
+
+ /* Validate plen. */
+ if (plen < ch->hlen) {
+ printf("NVMe/TCP: Invalid PDU length %u\n", plen);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, plen);
+ return (EBADMSG);
+ }
+
+ if (plen == full_hlen)
+ data_len = 0;
+ else
+ data_len = plen - ch->pdo;
+ switch (ch->pdu_type) {
+ default:
+ __assert_unreachable();
+ break;
+ case NVME_TCP_PDU_TYPE_H2C_TERM_REQ:
+ case NVME_TCP_PDU_TYPE_C2H_TERM_REQ:
+ /* Checked above. */
+ MPASS(plen <= NVME_TCP_TERM_REQ_PDU_MAX_SIZE);
+ break;
+ case NVME_TCP_PDU_TYPE_CAPSULE_CMD:
+ case NVME_TCP_PDU_TYPE_H2C_DATA:
+ case NVME_TCP_PDU_TYPE_C2H_DATA:
+ if ((ch->flags & NVME_TCP_CH_FLAGS_DDGSTF) != 0 &&
+ data_len <= sizeof(uint32_t)) {
+ printf("NVMe/TCP: PDU %u too short for digest\n",
+ ch->pdu_type);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, plen);
+ return (EBADMSG);
+ }
+ break;
+ case NVME_TCP_PDU_TYPE_R2T:
+ case NVME_TCP_PDU_TYPE_CAPSULE_RESP:
+ if (data_len != 0) {
+ printf("NVMe/TCP: PDU %u with data length %u\n",
+ ch->pdu_type, data_len);
+ *fes = NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD;
+ *fei = offsetof(struct nvme_tcp_common_pdu_hdr, plen);
+ return (EBADMSG);
+ }
+ break;
+ }
+
+ if ((ch->flags & NVME_TCP_CH_FLAGS_DDGSTF) != 0)
+ data_len -= sizeof(uint32_t);
+
+ *data_lenp = data_len;
+ return (0);
+}
+
+#endif /* !__NVMF_TCP_H__ */
diff --git a/sys/dev/nvmf/nvmf_transport.c b/sys/dev/nvmf/nvmf_transport.c
new file mode 100644
index 000000000000..ea4aee8cc7ae
--- /dev/null
+++ b/sys/dev/nvmf/nvmf_transport.c
@@ -0,0 +1,342 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/limits.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/module.h>
+#include <sys/refcount.h>
+#include <sys/sysctl.h>
+#include <sys/sx.h>
+#include <dev/nvme/nvme.h>
+#include <dev/nvmf/nvmf.h>
+#include <dev/nvmf/nvmf_transport.h>
+#include <dev/nvmf/nvmf_transport_internal.h>
+
+/* Transport-independent support for fabrics queue pairs and commands. */
+
+struct nvmf_transport {
+ struct nvmf_transport_ops *nt_ops;
+
+ volatile u_int nt_active_qpairs;
+ SLIST_ENTRY(nvmf_transport) nt_link;
+};
+
+/* nvmf_transports[nvmf_trtype] is sorted by priority */
+static SLIST_HEAD(, nvmf_transport) nvmf_transports[NVMF_TRTYPE_TCP + 1];
+static struct sx nvmf_transports_lock;
+
+static MALLOC_DEFINE(M_NVMF_TRANSPORT, "nvmf_xport",
+ "NVMe over Fabrics transport");
+
+SYSCTL_NODE(_kern, OID_AUTO, nvmf, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+ "NVMe over Fabrics");
+
+static bool
+nvmf_supported_trtype(enum nvmf_trtype trtype)
+{
+ return (trtype < nitems(nvmf_transports));
+}
+
+struct nvmf_qpair *
+nvmf_allocate_qpair(enum nvmf_trtype trtype, bool controller,
+ const struct nvmf_handoff_qpair_params *params,
+ nvmf_qpair_error_t *error_cb, void *error_cb_arg,
+ nvmf_capsule_receive_t *receive_cb, void *receive_cb_arg)
+{
+ struct nvmf_transport *nt;
+ struct nvmf_qpair *qp;
+
+ if (!nvmf_supported_trtype(trtype))
+ return (NULL);
+
+ sx_slock(&nvmf_transports_lock);
+ SLIST_FOREACH(nt, &nvmf_transports[trtype], nt_link) {
+ qp = nt->nt_ops->allocate_qpair(controller, params);
+ if (qp != NULL) {
+ refcount_acquire(&nt->nt_active_qpairs);
+ break;
+ }
+ }
+ sx_sunlock(&nvmf_transports_lock);
+ if (qp == NULL)
+ return (NULL);
+
+ qp->nq_transport = nt;
+ qp->nq_ops = nt->nt_ops;
+ qp->nq_controller = controller;
+ qp->nq_error = error_cb;
+ qp->nq_error_arg = error_cb_arg;
+ qp->nq_receive = receive_cb;
+ qp->nq_receive_arg = receive_cb_arg;
+ qp->nq_admin = params->admin;
+ return (qp);
+}
+
+void
+nvmf_free_qpair(struct nvmf_qpair *qp)
+{
+ struct nvmf_transport *nt;
+
+ nt = qp->nq_transport;
+ qp->nq_ops->free_qpair(qp);
+ if (refcount_release(&nt->nt_active_qpairs))
+ wakeup(nt);
+}
+
+struct nvmf_capsule *
+nvmf_allocate_command(struct nvmf_qpair *qp, const void *sqe, int how)
+{
+ struct nvmf_capsule *nc;
+
+ KASSERT(how == M_WAITOK || how == M_NOWAIT,
+ ("%s: invalid how", __func__));
+ nc = qp->nq_ops->allocate_capsule(qp, how);
+ if (nc == NULL)
+ return (NULL);
+
+ nc->nc_qpair = qp;
+ nc->nc_qe_len = sizeof(struct nvme_command);
+ memcpy(&nc->nc_sqe, sqe, nc->nc_qe_len);
+
+ /* 4.2 of NVMe base spec: Fabrics always uses SGL. */
+ nc->nc_sqe.fuse &= ~NVMEM(NVME_CMD_PSDT);
+ nc->nc_sqe.fuse |= NVMEF(NVME_CMD_PSDT, NVME_PSDT_SGL);
+ return (nc);
+}
+
+struct nvmf_capsule *
+nvmf_allocate_response(struct nvmf_qpair *qp, const void *cqe, int how)
+{
+ struct nvmf_capsule *nc;
+
+ KASSERT(how == M_WAITOK || how == M_NOWAIT,
+ ("%s: invalid how", __func__));
+ nc = qp->nq_ops->allocate_capsule(qp, how);
+ if (nc == NULL)
+ return (NULL);
+
+ nc->nc_qpair = qp;
+ nc->nc_qe_len = sizeof(struct nvme_completion);
+ memcpy(&nc->nc_cqe, cqe, nc->nc_qe_len);
+ return (nc);
+}
+
+int
+nvmf_capsule_append_data(struct nvmf_capsule *nc, struct memdesc *mem,
+ size_t len, bool send, nvmf_io_complete_t *complete_cb,
+ void *cb_arg)
+{
+ if (nc->nc_data.io_len != 0)
+ return (EBUSY);
+
+ nc->nc_send_data = send;
+ nc->nc_data.io_mem = *mem;
+ nc->nc_data.io_len = len;
+ nc->nc_data.io_complete = complete_cb;
+ nc->nc_data.io_complete_arg = cb_arg;
+ return (0);
+}
+
+void
+nvmf_free_capsule(struct nvmf_capsule *nc)
+{
+ nc->nc_qpair->nq_ops->free_capsule(nc);
+}
+
+int
+nvmf_transmit_capsule(struct nvmf_capsule *nc)
+{
+ return (nc->nc_qpair->nq_ops->transmit_capsule(nc));
+}
+
+void
+nvmf_abort_capsule_data(struct nvmf_capsule *nc, int error)
+{
+ if (nc->nc_data.io_len != 0)
+ nvmf_complete_io_request(&nc->nc_data, 0, error);
+}
+
+void *
+nvmf_capsule_sqe(struct nvmf_capsule *nc)
+{
+ KASSERT(nc->nc_qe_len == sizeof(struct nvme_command),
+ ("%s: capsule %p is not a command capsule", __func__, nc));
+ return (&nc->nc_sqe);
+}
+
+void *
+nvmf_capsule_cqe(struct nvmf_capsule *nc)
+{
+ KASSERT(nc->nc_qe_len == sizeof(struct nvme_completion),
+ ("%s: capsule %p is not a response capsule", __func__, nc));
+ return (&nc->nc_cqe);
+}
+
+uint8_t
+nvmf_validate_command_capsule(struct nvmf_capsule *nc)
+{
+ KASSERT(nc->nc_qe_len == sizeof(struct nvme_command),
+ ("%s: capsule %p is not a command capsule", __func__, nc));
+
+ if (NVMEV(NVME_CMD_PSDT, nc->nc_sqe.fuse) != NVME_PSDT_SGL)
+ return (NVME_SC_INVALID_FIELD);
+
+ return (nc->nc_qpair->nq_ops->validate_command_capsule(nc));
+}
+
+size_t
+nvmf_capsule_data_len(const struct nvmf_capsule *nc)
+{
+ return (nc->nc_qpair->nq_ops->capsule_data_len(nc));
+}
+
+int
+nvmf_receive_controller_data(struct nvmf_capsule *nc, uint32_t data_offset,
+ struct memdesc *mem, size_t len, nvmf_io_complete_t *complete_cb,
+ void *cb_arg)
+{
+ struct nvmf_io_request io;
+
+ io.io_mem = *mem;
+ io.io_len = len;
+ io.io_complete = complete_cb;
+ io.io_complete_arg = cb_arg;
+ return (nc->nc_qpair->nq_ops->receive_controller_data(nc, data_offset,
+ &io));
+}
+
+u_int
+nvmf_send_controller_data(struct nvmf_capsule *nc, uint32_t data_offset,
+ struct mbuf *m, size_t len)
+{
+ MPASS(m_length(m, NULL) == len);
+ return (nc->nc_qpair->nq_ops->send_controller_data(nc, data_offset, m,
+ len));
+}
+
+int
+nvmf_transport_module_handler(struct module *mod, int what, void *arg)
+{
+ struct nvmf_transport_ops *ops = arg;
+ struct nvmf_transport *nt, *nt2, *prev;
+ int error;
+
+ switch (what) {
+ case MOD_LOAD:
+ if (!nvmf_supported_trtype(ops->trtype)) {
+ printf("NVMF: Unsupported transport %u", ops->trtype);
+ return (EINVAL);
+ }
+
+ nt = malloc(sizeof(*nt), M_NVMF_TRANSPORT, M_WAITOK | M_ZERO);
+ nt->nt_ops = arg;
+
+ sx_xlock(&nvmf_transports_lock);
+ if (SLIST_EMPTY(&nvmf_transports[ops->trtype])) {
+ SLIST_INSERT_HEAD(&nvmf_transports[ops->trtype], nt,
+ nt_link);
+ } else {
+ prev = NULL;
+ SLIST_FOREACH(nt2, &nvmf_transports[ops->trtype],
+ nt_link) {
+ if (ops->priority > nt2->nt_ops->priority)
+ break;
+ prev = nt2;
+ }
+ if (prev == NULL)
+ SLIST_INSERT_HEAD(&nvmf_transports[ops->trtype],
+ nt, nt_link);
+ else
+ SLIST_INSERT_AFTER(prev, nt, nt_link);
+ }
+ sx_xunlock(&nvmf_transports_lock);
+ return (0);
+
+ case MOD_QUIESCE:
+ if (!nvmf_supported_trtype(ops->trtype))
+ return (0);
+
+ sx_slock(&nvmf_transports_lock);
+ SLIST_FOREACH(nt, &nvmf_transports[ops->trtype], nt_link) {
+ if (nt->nt_ops == ops)
+ break;
+ }
+ if (nt == NULL) {
+ sx_sunlock(&nvmf_transports_lock);
+ return (0);
+ }
+ if (nt->nt_active_qpairs != 0) {
+ sx_sunlock(&nvmf_transports_lock);
+ return (EBUSY);
+ }
+ sx_sunlock(&nvmf_transports_lock);
+ return (0);
+
+ case MOD_UNLOAD:
+ if (!nvmf_supported_trtype(ops->trtype))
+ return (0);
+
+ sx_xlock(&nvmf_transports_lock);
+ prev = NULL;
+ SLIST_FOREACH(nt, &nvmf_transports[ops->trtype], nt_link) {
+ if (nt->nt_ops == ops)
+ break;
+ prev = nt;
+ }
+ if (nt == NULL) {
+ sx_xunlock(&nvmf_transports_lock);
+ return (0);
+ }
+
+ if (prev == NULL)
+ SLIST_REMOVE_HEAD(&nvmf_transports[ops->trtype],
+ nt_link);
+ else
+ SLIST_REMOVE_AFTER(prev, nt_link);
+
+ error = 0;
+ while (nt->nt_active_qpairs != 0 && error == 0)
+ error = sx_sleep(nt, &nvmf_transports_lock, PCATCH,
+ "nftunld", 0);
+ sx_xunlock(&nvmf_transports_lock);
+ if (error != 0)
+ return (error);
+ free(nt, M_NVMF_TRANSPORT);
+ return (0);
+
+ default:
+ return (EOPNOTSUPP);
+ }
+}
+
+static int
+nvmf_transport_modevent(module_t mod __unused, int what, void *arg __unused)
+{
+ switch (what) {
+ case MOD_LOAD:
+ for (u_int i = 0; i < nitems(nvmf_transports); i++)
+ SLIST_INIT(&nvmf_transports[i]);
+ sx_init(&nvmf_transports_lock, "nvmf transports");
+ return (0);
+ default:
+ return (EOPNOTSUPP);
+ }
+}
+
+static moduledata_t nvmf_transport_mod = {
+ "nvmf_transport",
+ nvmf_transport_modevent,
+ 0
+};
+
+DECLARE_MODULE(nvmf_transport, nvmf_transport_mod, SI_SUB_DRIVERS,
+ SI_ORDER_FIRST);
+MODULE_VERSION(nvmf_transport, 1);
diff --git a/sys/dev/nvmf/nvmf_transport.h b/sys/dev/nvmf/nvmf_transport.h
new file mode 100644
index 000000000000..549170b25940
--- /dev/null
+++ b/sys/dev/nvmf/nvmf_transport.h
@@ -0,0 +1,140 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMF_TRANSPORT_H__
+#define __NVMF_TRANSPORT_H__
+
+/*
+ * Interface used by the Fabrics host (initiator) and controller
+ * (target) to send and receive capsules and associated data.
+ */
+
+#include <sys/sysctl.h>
+#include <dev/nvmf/nvmf_proto.h>
+
+struct mbuf;
+struct memdesc;
+struct nvmf_capsule;
+struct nvmf_connection;
+struct nvmf_qpair;
+struct nvmf_handoff_qpair_params;
+
+SYSCTL_DECL(_kern_nvmf);
+
+/*
+ * Callback to invoke when an error occurs on a qpair. The last
+ * parameter is an error value. If the error value is zero, the qpair
+ * has been closed at the transport level rather than a transport
+ * error occuring.
+ */
+typedef void nvmf_qpair_error_t(void *, int);
+
+/* Callback to invoke when a capsule is received. */
+typedef void nvmf_capsule_receive_t(void *, struct nvmf_capsule *);
+
+/*
+ * Callback to invoke when an I/O request has completed. The second
+ * parameter is the amount of data transferred. The last parameter is
+ * an error value which is non-zero if the request did not complete
+ * successfully. A request with an error may complete partially.
+ */
+typedef void nvmf_io_complete_t(void *, size_t, int);
+
+/*
+ * A queue pair represents either an Admin or I/O
+ * submission/completion queue pair. The params contains negotiated
+ * values passed in from userland.
+ *
+ * Unlike libnvmf in userland, the kernel transport interface does not
+ * have any notion of an association. Instead, qpairs are
+ * independent.
+ */
+struct nvmf_qpair *nvmf_allocate_qpair(enum nvmf_trtype trtype,
+ bool controller, const struct nvmf_handoff_qpair_params *params,
+ nvmf_qpair_error_t *error_cb, void *error_cb_arg,
+ nvmf_capsule_receive_t *receive_cb, void *receive_cb_arg);
+void nvmf_free_qpair(struct nvmf_qpair *qp);
+
+/*
+ * Capsules are either commands (host -> controller) or responses
+ * (controller -> host). A data buffer may be associated with a
+ * command capsule. Transmitted data is not copied by this API but
+ * instead must be preserved until the completion callback is invoked
+ * to indicate capsule transmission has completed.
+ */
+struct nvmf_capsule *nvmf_allocate_command(struct nvmf_qpair *qp,
+ const void *sqe, int how);
+struct nvmf_capsule *nvmf_allocate_response(struct nvmf_qpair *qp,
+ const void *cqe, int how);
+void nvmf_free_capsule(struct nvmf_capsule *nc);
+int nvmf_capsule_append_data(struct nvmf_capsule *nc,
+ struct memdesc *mem, size_t len, bool send,
+ nvmf_io_complete_t *complete_cb, void *cb_arg);
+int nvmf_transmit_capsule(struct nvmf_capsule *nc);
+void nvmf_abort_capsule_data(struct nvmf_capsule *nc, int error);
+void *nvmf_capsule_sqe(struct nvmf_capsule *nc);
+void *nvmf_capsule_cqe(struct nvmf_capsule *nc);
+
+/* Controller-specific APIs. */
+
+/*
+ * A controller calls this function to check for any
+ * transport-specific errors (invalid fields) in a received command
+ * capsule. The callback returns a generic command status value:
+ * NVME_SC_SUCCESS if no error is found.
+ */
+uint8_t nvmf_validate_command_capsule(struct nvmf_capsule *nc);
+
+/*
+ * A controller calls this function to query the amount of data
+ * associated with a command capsule.
+ */
+size_t nvmf_capsule_data_len(const struct nvmf_capsule *cc);
+
+/*
+ * A controller calls this function to receive data associated with a
+ * command capsule (e.g. the data for a WRITE command). This can
+ * either return in-capsule data or fetch data from the host
+ * (e.g. using a R2T PDU over TCP). The received command capsule
+ * should be passed in 'nc'. The received data is stored in 'mem'.
+ * If this function returns success, then the callback will be invoked
+ * once the operation has completed. Note that the callback might be
+ * invoked before this function returns.
+ */
+int nvmf_receive_controller_data(struct nvmf_capsule *nc,
+ uint32_t data_offset, struct memdesc *mem, size_t len,
+ nvmf_io_complete_t *complete_cb, void *cb_arg);
+
+/*
+ * A controller calls this function to send data in response to a
+ * command prior to sending a response capsule. If an error occurs,
+ * the function returns a generic status completion code to be sent in
+ * the following CQE. Note that the transfer might send a subset of
+ * the data requested by nc. If the transfer succeeds, this function
+ * can return one of the following values:
+ *
+ * - NVME_SC_SUCCESS: The transfer has completed successfully and the
+ * caller should send a success CQE in a response capsule.
+ *
+ * - NVMF_SUCCESS_SENT: The transfer has completed successfully and
+ * the transport layer has sent an implicit success CQE to the
+ * remote host (e.g. the SUCCESS flag for TCP). The caller should
+ * not send a response capsule.
+ *
+ * - NVMF_MORE: The transfer has completed successfully, but the
+ * transfer did not complete the data buffer.
+ *
+ * The mbuf chain in 'm' is consumed by this function even if an error
+ * is returned.
+ */
+u_int nvmf_send_controller_data(struct nvmf_capsule *nc,
+ uint32_t data_offset, struct mbuf *m, size_t len);
+
+#define NVMF_SUCCESS_SENT 0x100
+#define NVMF_MORE 0x101
+
+#endif /* !__NVMF_TRANSPORT_H__ */
diff --git a/sys/dev/nvmf/nvmf_transport_internal.h b/sys/dev/nvmf/nvmf_transport_internal.h
new file mode 100644
index 000000000000..0be427ee0690
--- /dev/null
+++ b/sys/dev/nvmf/nvmf_transport_internal.h
@@ -0,0 +1,128 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMF_TRANSPORT_INTERNAL_H__
+#define __NVMF_TRANSPORT_INTERNAL_H__
+
+#include <sys/memdesc.h>
+
+/*
+ * Interface between the transport-independent APIs in
+ * nvmf_transport.c and individual transports.
+ */
+
+struct module;
+struct nvmf_io_request;
+
+struct nvmf_transport_ops {
+ /* Queue pair management. */
+ struct nvmf_qpair *(*allocate_qpair)(bool controller,
+ const struct nvmf_handoff_qpair_params *params);
+ void (*free_qpair)(struct nvmf_qpair *qp);
+
+ /* Capsule operations. */
+ struct nvmf_capsule *(*allocate_capsule)(struct nvmf_qpair *qp,
+ int how);
+ void (*free_capsule)(struct nvmf_capsule *nc);
+ int (*transmit_capsule)(struct nvmf_capsule *nc);
+ uint8_t (*validate_command_capsule)(struct nvmf_capsule *nc);
+
+ /* Transferring controller data. */
+ size_t (*capsule_data_len)(const struct nvmf_capsule *nc);
+ int (*receive_controller_data)(struct nvmf_capsule *nc,
+ uint32_t data_offset, struct nvmf_io_request *io);
+ u_int (*send_controller_data)(struct nvmf_capsule *nc,
+ uint32_t data_offset, struct mbuf *m, size_t len);
+
+ enum nvmf_trtype trtype;
+ int priority;
+};
+
+/* Either an Admin or I/O Submission/Completion Queue pair. */
+struct nvmf_qpair {
+ struct nvmf_transport *nq_transport;
+ struct nvmf_transport_ops *nq_ops;
+ bool nq_controller;
+
+ /* Callback to invoke for a received capsule. */
+ nvmf_capsule_receive_t *nq_receive;
+ void *nq_receive_arg;
+
+ /* Callback to invoke for an error. */
+ nvmf_qpair_error_t *nq_error;
+ void *nq_error_arg;
+
+ bool nq_admin;
+};
+
+struct nvmf_io_request {
+ /*
+ * Data buffer contains io_len bytes in the backing store
+ * described by mem.
+ */
+ struct memdesc io_mem;
+ size_t io_len;
+ nvmf_io_complete_t *io_complete;
+ void *io_complete_arg;
+};
+
+/*
+ * Fabrics Command and Response Capsules. The Fabrics host
+ * (initiator) and controller (target) drivers work with capsules that
+ * are transmitted and received by a specific transport.
+ */
+struct nvmf_capsule {
+ struct nvmf_qpair *nc_qpair;
+
+ /* Either a SQE or CQE. */
+ union {
+ struct nvme_command nc_sqe;
+ struct nvme_completion nc_cqe;
+ };
+ int nc_qe_len;
+
+ /*
+ * Is SQHD in received capsule valid? False for locally-
+ * synthesized responses.
+ */
+ bool nc_sqhd_valid;
+
+ bool nc_send_data;
+ struct nvmf_io_request nc_data;
+};
+
+static void __inline
+nvmf_qpair_error(struct nvmf_qpair *nq, int error)
+{
+ nq->nq_error(nq->nq_error_arg, error);
+}
+
+static void __inline
+nvmf_capsule_received(struct nvmf_qpair *nq, struct nvmf_capsule *nc)
+{
+ nq->nq_receive(nq->nq_receive_arg, nc);
+}
+
+static void __inline
+nvmf_complete_io_request(struct nvmf_io_request *io, size_t xfered, int error)
+{
+ io->io_complete(io->io_complete_arg, xfered, error);
+}
+
+int nvmf_transport_module_handler(struct module *, int, void *);
+
+#define NVMF_TRANSPORT(name, ops) \
+static moduledata_t nvmf_transport_##name##_mod = { \
+ "nvmf/" #name, \
+ nvmf_transport_module_handler, \
+ &(ops) \
+}; \
+DECLARE_MODULE(nvmf_transport_##name, nvmf_transport_##name##_mod, \
+ SI_SUB_DRIVERS, SI_ORDER_ANY); \
+MODULE_DEPEND(nvmf_transport_##name, nvmf_transport, 1, 1, 1)
+
+#endif /* !__NVMF_TRANSPORT_INTERNAL_H__ */
diff --git a/sys/dev/pci/pci_host_generic_acpi.c b/sys/dev/pci/pci_host_generic_acpi.c
index 2191ec4d655a..0cd17d5f5555 100644
--- a/sys/dev/pci/pci_host_generic_acpi.c
+++ b/sys/dev/pci/pci_host_generic_acpi.c
@@ -99,7 +99,6 @@ static struct {
{ "MVEBU ", "CN9130 ", PCIE_ECAM_DESIGNWARE_QUIRK },
{ "MVEBU ", "CN9131 ", PCIE_ECAM_DESIGNWARE_QUIRK },
{ "MVEBU ", "CN9132 ", PCIE_ECAM_DESIGNWARE_QUIRK },
- { 0 },
};
/* Forward prototypes */
@@ -202,9 +201,9 @@ static void
pci_host_acpi_get_oem_quirks(struct generic_pcie_acpi_softc *sc,
ACPI_TABLE_HEADER *hdr)
{
- int i;
+ size_t i;
- for (i = 0; pci_acpi_quirks[i].quirks; i++) {
+ for (i = 0; i < nitems(pci_acpi_quirks); i++) {
if (memcmp(hdr->OemId, pci_acpi_quirks[i].oem_id,
ACPI_OEM_ID_SIZE) != 0)
continue;
diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c
index e1e9c1880b54..3211c331ed6e 100644
--- a/sys/dev/psci/psci.c
+++ b/sys/dev/psci/psci.c
@@ -378,12 +378,18 @@ psci_fdt_callfn(psci_callfn_t *callfn)
{
phandle_t node;
- node = ofw_bus_find_compatible(OF_peer(0), "arm,psci-0.2");
- if (node == 0) {
- node = ofw_bus_find_compatible(OF_peer(0), "arm,psci-1.0");
- if (node == 0)
- return (PSCI_MISSING);
+ /* XXX: This is suboptimal, we should walk the tree & check each
+ * node against compat_data, but we only have a few entries so
+ * it's ok for now.
+ */
+ for (int i = 0; compat_data[i].ocd_str != NULL; i++) {
+ node = ofw_bus_find_compatible(OF_peer(0),
+ compat_data[i].ocd_str);
+ if (node != 0)
+ break;
}
+ if (node == 0)
+ return (PSCI_MISSING);
if (!ofw_bus_node_status_okay(node))
return (PSCI_MISSING);
diff --git a/sys/dev/psci/smccc_arm64.S b/sys/dev/psci/smccc_arm64.S
index 3d3c9fc837b1..25a64669fab3 100644
--- a/sys/dev/psci/smccc_arm64.S
+++ b/sys/dev/psci/smccc_arm64.S
@@ -77,7 +77,7 @@ ENTRY(arm_smccc_1_2_\insn)
stp x16, x17, [x19, #16 * 8]
1: ldp xzr, x19, [sp], #16
ret
-END(arm_smccc_1_2\insn)
+END(arm_smccc_1_2_\insn)
.endm
/* int arm_smccc_1_2_*(const struct arm_smccc_1_2_regs *args,
* struct arm_smccc_1_2_regs *res)
diff --git a/sys/dev/rtsx/rtsx.c b/sys/dev/rtsx/rtsx.c
index 464a155e66c2..a2f124f6c30d 100644
--- a/sys/dev/rtsx/rtsx.c
+++ b/sys/dev/rtsx/rtsx.c
@@ -311,7 +311,7 @@ static int rtsx_resume(device_t dev);
#define RTSX_DMA_ALIGN 4
#define RTSX_HOSTCMD_MAX 256
#define RTSX_DMA_CMD_BIFSIZE (sizeof(uint32_t) * RTSX_HOSTCMD_MAX)
-#define RTSX_DMA_DATA_BUFSIZE MAXPHYS
+#define RTSX_DMA_DATA_BUFSIZE maxphys
#define ISSET(t, f) ((t) & (f))
@@ -2762,7 +2762,7 @@ rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd)
(unsigned long)cmd->data->len, (unsigned long)cmd->data->xfer_len);
if (cmd->data->len > RTSX_DMA_DATA_BUFSIZE) {
- device_printf(sc->rtsx_dev, "rtsx_xfer() length too large: %ld > %d\n",
+ device_printf(sc->rtsx_dev, "rtsx_xfer() length too large: %ld > %ld\n",
(unsigned long)cmd->data->len, RTSX_DMA_DATA_BUFSIZE);
cmd->error = MMC_ERR_INVALID;
return (MMC_ERR_INVALID);
diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c
index 927941ab3d01..6bfe6c51fa3e 100644
--- a/sys/dev/sound/driver.c
+++ b/sys/dev/sound/driver.c
@@ -67,6 +67,7 @@ MODULE_DEPEND(snd_driver, snd_envy24ht, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_es137x, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_fm801, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_hda, 1, 1, 1);
+MODULE_DEPEND(snd_driver, snd_hdsp, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_hdspe, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_ich, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_maestro3, 1, 1, 1);
diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c
index dcbf041f9605..eeb28bb08276 100644
--- a/sys/dev/sound/pci/atiixp.c
+++ b/sys/dev/sound/pci/atiixp.c
@@ -1168,12 +1168,12 @@ atiixp_release_resource(struct atiixp_info *sc)
static int
atiixp_pci_probe(device_t dev)
{
- int i;
+ size_t i;
uint16_t devid, vendor;
vendor = pci_get_vendor(dev);
devid = pci_get_device(dev);
- for (i = 0; i < sizeof(atiixp_hw) / sizeof(atiixp_hw[0]); i++) {
+ for (i = 0; i < nitems(atiixp_hw); i++) {
if (vendor == atiixp_hw[i].vendor &&
devid == atiixp_hw[i].devid) {
device_set_desc(dev, atiixp_hw[i].desc);
diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c
index 7191f0cc4bf9..de7ae7be57c4 100644
--- a/sys/dev/sound/pci/csa.c
+++ b/sys/dev/sound/pci/csa.c
@@ -45,7 +45,6 @@
#endif
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/chip.h>
#include <dev/sound/pci/csareg.h>
#include <dev/sound/pci/csavar.h>
diff --git a/sys/dev/sound/pci/csamidi.c b/sys/dev/sound/pci/csamidi.c
index df1699092990..29d5548b0954 100644
--- a/sys/dev/sound/pci/csamidi.c
+++ b/sys/dev/sound/pci/csamidi.c
@@ -43,7 +43,6 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <dev/sound/chip.h>
#include <dev/sound/pcm/sound.h>
#include <dev/sound/midi/midi.h>
diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c
index 71b9a0253cdb..c8424dd3e433 100644
--- a/sys/dev/sound/pci/csapcm.c
+++ b/sys/dev/sound/pci/csapcm.c
@@ -36,7 +36,6 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
-#include <dev/sound/chip.h>
#include <dev/sound/pci/csareg.h>
#include <dev/sound/pci/csavar.h>
diff --git a/sys/dev/sound/pci/emu10kx-midi.c b/sys/dev/sound/pci/emu10kx-midi.c
index 4ed8e6c1dd9c..2a98562f8f39 100644
--- a/sys/dev/sound/pci/emu10kx-midi.c
+++ b/sys/dev/sound/pci/emu10kx-midi.c
@@ -43,7 +43,6 @@
#include "opt_snd.h"
#endif
-#include <dev/sound/chip.h>
#include <dev/sound/pcm/sound.h>
#include <dev/sound/midi/midi.h>
diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c
index 825a39fc4e63..bef6b596646e 100644
--- a/sys/dev/sound/pci/emu10kx-pcm.c
+++ b/sys/dev/sound/pci/emu10kx-pcm.c
@@ -43,7 +43,6 @@
#include "opt_snd.h"
#endif
-#include <dev/sound/chip.h>
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index d17f5fb16d34..0f938597e06c 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -49,7 +49,6 @@
#include "opt_snd.h"
#endif
-#include <dev/sound/chip.h>
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
index dcd10cb36510..e8d9ee12fffc 100644
--- a/sys/dev/sound/pci/hda/hdaa.c
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -267,7 +267,8 @@ hdaa_channels_handler(struct hdaa_audio_as *as)
struct hdaa_chan *ch = &devinfo->chans[as->chans[0]];
struct hdaa_widget *w;
uint8_t *eld;
- int i, total, sub, assume, channels;
+ int total, sub, assume, channels;
+ size_t i;
uint16_t cpins, upins, tpins;
cpins = upins = 0;
@@ -347,7 +348,7 @@ hdaa_channels_handler(struct hdaa_audio_as *as)
printf("\n");
);
/* Look for maximal fitting matrix. */
- for (i = 0; i < sizeof(matrixes) / sizeof(struct matrix); i++) {
+ for (i = 0; i < nitems(matrixes); i++) {
if (as->pinset != 0 && matrixes[i].analog == 0)
continue;
if ((matrixes[i].m.mask & ~channels) == 0) {
@@ -1252,7 +1253,8 @@ hdaa_sysctl_config(SYSCTL_HANDLER_ARGS)
static void
hdaa_config_fetch(const char *str, uint32_t *on, uint32_t *off)
{
- int i = 0, j, k, len, inv;
+ size_t k;
+ int i = 0, j, len, inv;
for (;;) {
while (str[i] != '\0' &&
@@ -1292,7 +1294,8 @@ static int
hdaa_sysctl_quirks(SYSCTL_HANDLER_ARGS)
{
char buf[256];
- int error, n = 0, i;
+ int error, n = 0;
+ size_t i;
uint32_t quirks, quirks_off;
quirks = *(uint32_t *)oidp->oid_arg1;
diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index 3a7dfc63637a..d425e3c0080b 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -318,7 +318,8 @@ hdac_pin_patch(struct hdaa_widget *w)
}
} else if (id == HDA_CODEC_ALC257 &&
(subid == LENOVO_L5AMD_SUBVENDOR ||
- subid == LENOVO_L5INTEL_SUBVENDOR)) {
+ subid == LENOVO_L5INTEL_SUBVENDOR ||
+ subid == LENOVO_IDEAPAD3_SUBVENDOR)) {
switch (nid) {
case 20:
patch_str = "as=1 seq=0";
@@ -339,7 +340,7 @@ hdac_pin_patch(struct hdaa_widget *w)
break;
}
} else if (id == HDA_CODEC_ALC230 &&
- subid == LENOVO_I330_SUBVENDOR) {
+ subid == LENOVO_IDEAPAD330_SUBVENDOR) {
switch (nid) {
case 20:
patch_str = "as=1 seq=0 device=Speaker";
@@ -358,6 +359,17 @@ hdac_pin_patch(struct hdaa_widget *w)
patch_str = "as=4 seq=15";
break;
}
+ } else if (id == HDA_CODEC_ALC294 &&
+ subid == ASUS_UX331_SUBVENDOR) {
+ switch (nid) {
+ case 25:
+ /* XXX You are not expected to understand this. */
+ config = 0x01a1103c;
+ break;
+ case 33:
+ patch_str = "as=1 seq=15";
+ break;
+ }
} else {
/*
* loop over hdaa_model_pin_patch
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 4dd589ed2a09..6b6bc58a4818 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -332,6 +332,7 @@
#define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339)
#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0)
#define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2)
+#define ASUS_UX331_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x14de)
#define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517)
#define ASUS_GL553VE_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x15e0)
#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964)
@@ -382,7 +383,8 @@
#define LENOVO_L5AMD_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x381b)
#define LENOVO_L5INTEL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x380f)
#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
-#define LENOVO_I330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808)
+#define LENOVO_IDEAPAD330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808)
+#define LENOVO_IDEAPAD3_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3881)
#define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
/* Samsung */
diff --git a/sys/dev/sound/pci/hdsp-pcm.c b/sys/dev/sound/pci/hdsp-pcm.c
new file mode 100644
index 000000000000..9ba0e5e345d0
--- /dev/null
+++ b/sys/dev/sound/pci/hdsp-pcm.c
@@ -0,0 +1,1134 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2012-2021 Ruslan Bukin <br@bsdpad.com>
+ * Copyright (c) 2023-2024 Florian Walpen <dev@submerge.ch>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * RME HDSP driver for FreeBSD (pcm-part).
+ * Supported cards: HDSP 9632, HDSP 9652.
+ */
+
+#include <sys/libkern.h>
+
+#include <dev/sound/pcm/sound.h>
+#include <dev/sound/pci/hdsp.h>
+
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
+#include <mixer_if.h>
+
+#define HDSP_MATRIX_MAX 8
+
+struct hdsp_latency {
+ uint32_t n;
+ uint32_t period;
+ float ms;
+};
+
+static struct hdsp_latency latency_map[] = {
+ { 7, 32, 0.7 },
+ { 0, 64, 1.5 },
+ { 1, 128, 3 },
+ { 2, 256, 6 },
+ { 3, 512, 12 },
+ { 4, 1024, 23 },
+ { 5, 2048, 46 },
+ { 6, 4096, 93 },
+
+ { 0, 0, 0 },
+};
+
+struct hdsp_rate {
+ uint32_t speed;
+ uint32_t reg;
+};
+
+static struct hdsp_rate rate_map[] = {
+ { 32000, (HDSP_FREQ_32000) },
+ { 44100, (HDSP_FREQ_44100) },
+ { 48000, (HDSP_FREQ_48000) },
+ { 64000, (HDSP_FREQ_32000 | HDSP_FREQ_DOUBLE) },
+ { 88200, (HDSP_FREQ_44100 | HDSP_FREQ_DOUBLE) },
+ { 96000, (HDSP_FREQ_48000 | HDSP_FREQ_DOUBLE) },
+ { 128000, (HDSP_FREQ_32000 | HDSP_FREQ_QUAD) },
+ { 176400, (HDSP_FREQ_44100 | HDSP_FREQ_QUAD) },
+ { 192000, (HDSP_FREQ_48000 | HDSP_FREQ_QUAD) },
+
+ { 0, 0 },
+};
+
+static uint32_t
+hdsp_adat_slot_map(uint32_t speed)
+{
+ /* ADAT slot bitmap depends on sample rate. */
+ if (speed <= 48000)
+ return (0x000000ff); /* 8 channels single speed. */
+ else if (speed <= 96000)
+ return (0x000000aa); /* 4 channels (1,3,5,7) double speed. */
+ else
+ return (0x00000000); /* ADAT disabled at quad speed. */
+}
+
+static uint32_t
+hdsp_port_slot_map(uint32_t ports, uint32_t speed)
+{
+ uint32_t slot_map = 0;
+
+ if (ports & HDSP_CHAN_9632_ALL) {
+ /* Map HDSP 9632 ports to slot bitmap. */
+ if (ports & HDSP_CHAN_9632_ADAT)
+ slot_map |= (hdsp_adat_slot_map(speed) << 0);
+ if (ports & HDSP_CHAN_9632_SPDIF)
+ slot_map |= (0x03 << 8); /* 2 channels SPDIF. */
+ if (ports & HDSP_CHAN_9632_LINE)
+ slot_map |= (0x03 << 10); /* 2 channels line. */
+ if (ports & HDSP_CHAN_9632_EXT_BOARD)
+ slot_map |= (0x0f << 12); /* 4 channels extension. */
+ } else if ((ports & HDSP_CHAN_9652_ALL) && (speed <= 96000)) {
+ /* Map HDSP 9652 ports to slot bitmap, no quad speed. */
+ if (ports & HDSP_CHAN_9652_ADAT1)
+ slot_map |= (hdsp_adat_slot_map(speed) << 0);
+ if (ports & HDSP_CHAN_9652_ADAT2)
+ slot_map |= (hdsp_adat_slot_map(speed) << 8);
+ if (ports & HDSP_CHAN_9652_ADAT3)
+ slot_map |= (hdsp_adat_slot_map(speed) << 16);
+ if (ports & HDSP_CHAN_9652_SPDIF)
+ slot_map |= (0x03 << 24); /* 2 channels SPDIF. */
+ }
+
+ return (slot_map);
+}
+
+static uint32_t
+hdsp_slot_first(uint32_t slots)
+{
+ return (slots & (~(slots - 1))); /* Extract first bit set. */
+}
+
+static uint32_t
+hdsp_slot_first_row(uint32_t slots)
+{
+ uint32_t ends;
+
+ /* Ends of slot rows are followed by a slot which is not in the set. */
+ ends = slots & (~(slots >> 1));
+ /* First row of contiguous slots ends in the first row end. */
+ return (slots & (ends ^ (ends - 1)));
+}
+
+static uint32_t
+hdsp_slot_first_n(uint32_t slots, unsigned int n)
+{
+ /* Clear all but the first n slots. */
+ for (uint32_t slot = 1; slot != 0; slot <<= 1) {
+ if ((slots & slot) && n > 0)
+ --n;
+ else
+ slots &= ~slot;
+ }
+ return (slots);
+}
+
+static unsigned int
+hdsp_slot_count(uint32_t slots)
+{
+ return (bitcount32(slots));
+}
+
+static unsigned int
+hdsp_slot_offset(uint32_t slots)
+{
+ return (hdsp_slot_count(hdsp_slot_first(slots) - 1));
+}
+
+static unsigned int
+hdsp_slot_channel_offset(uint32_t subset, uint32_t slots)
+{
+ uint32_t preceding;
+
+ /* Make sure we have a subset of slots. */
+ subset &= slots;
+ /* Include all slots preceding the first one of the subset. */
+ preceding = slots & (hdsp_slot_first(subset) - 1);
+
+ return (hdsp_slot_count(preceding));
+}
+
+static uint32_t
+hdsp_port_first(uint32_t ports)
+{
+ return (ports & (~(ports - 1))); /* Extract first bit set. */
+}
+
+static unsigned int
+hdsp_port_slot_count(uint32_t ports, uint32_t speed)
+{
+ return (hdsp_slot_count(hdsp_port_slot_map(ports, speed)));
+}
+
+static unsigned int
+hdsp_port_slot_count_max(uint32_t ports)
+{
+ return (hdsp_slot_count(hdsp_port_slot_map(ports, 48000)));
+}
+
+static uint32_t
+hdsp_channel_play_ports(struct hdsp_channel *hc)
+{
+ return (hc->ports & (HDSP_CHAN_9632_ALL | HDSP_CHAN_9652_ALL));
+}
+
+static uint32_t
+hdsp_channel_rec_ports(struct hdsp_channel *hc)
+{
+ return (hc->ports & (HDSP_CHAN_9632_ALL | HDSP_CHAN_9652_ALL));
+}
+
+static int
+hdsp_hw_mixer(struct sc_chinfo *ch, unsigned int dst,
+ unsigned int src, unsigned short data)
+{
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ uint32_t value;
+ int offset;
+
+ scp = ch->parent;
+ sc = scp->sc;
+
+ offset = 0;
+ value = (HDSP_MIN_GAIN << 16) | (uint16_t) data;
+
+ if (ch->dir != PCMDIR_PLAY)
+ return (0);
+
+ switch (sc->type) {
+ case HDSP_9632:
+ /* Mixer is 2 rows of sources (inputs, playback) per output. */
+ offset = dst * (2 * HDSP_MIX_SLOTS_9632);
+ /* Source index in the second row (playback). */
+ offset += HDSP_MIX_SLOTS_9632 + src;
+ break;
+ case HDSP_9652:
+ /* Mixer is 2 rows of sources (inputs, playback) per output. */
+ offset = dst * (2 * HDSP_MIX_SLOTS_9652);
+ /* Source index in the second row (playback). */
+ offset += HDSP_MIX_SLOTS_9652 + src;
+ break;
+ default:
+ return (0);
+ }
+
+ /*
+ * We have to write mixer matrix values in pairs, with the second
+ * (odd) value in the upper 16 bits of the 32 bit value.
+ * Make value offset even and shift value accordingly.
+ * Assume the paired value to be silenced, since we only set gain
+ * on the diagonal where src and dst are the same.
+ */
+ if (offset % 2) {
+ offset -= 1;
+ value = (value << 16) | HDSP_MIN_GAIN;
+ }
+
+ hdsp_write_4(sc, HDSP_MIXER_BASE + offset * sizeof(uint16_t), value);
+
+ return (0);
+};
+
+static int
+hdspchan_setgain(struct sc_chinfo *ch)
+{
+ uint32_t port, ports;
+ uint32_t slot, slots;
+ unsigned int offset;
+ unsigned short volume;
+
+ /* Iterate through all physical ports of the channel. */
+ ports = ch->ports;
+ port = hdsp_port_first(ports);
+ while (port != 0) {
+ /*
+ * Get slot map from physical port.
+ * Unlike DMA buffers, the hardware mixer's channel mapping
+ * does not change with double or quad speed sample rates.
+ */
+ slots = hdsp_port_slot_map(port, 48000);
+ slot = hdsp_slot_first(slots);
+
+ /* Treat first slot as left channel. */
+ volume = ch->lvol * HDSP_MAX_GAIN / 100;
+ while (slot != 0) {
+ offset = hdsp_slot_offset(slot);
+ hdsp_hw_mixer(ch, offset, offset, volume);
+
+ slots &= ~slot;
+ slot = hdsp_slot_first(slots);
+
+ /* Subsequent slots all get the right channel volume. */
+ volume = ch->rvol * HDSP_MAX_GAIN / 100;
+ }
+
+ ports &= ~port;
+ port = hdsp_port_first(ports);
+ }
+
+ return (0);
+}
+
+static int
+hdspmixer_init(struct snd_mixer *m)
+{
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ int mask;
+
+ scp = mix_getdevinfo(m);
+ sc = scp->sc;
+ if (sc == NULL)
+ return (-1);
+
+ mask = SOUND_MASK_PCM;
+
+ if (hdsp_channel_play_ports(scp->hc))
+ mask |= SOUND_MASK_VOLUME;
+
+ if (hdsp_channel_rec_ports(scp->hc))
+ mask |= SOUND_MASK_RECLEV;
+
+ snd_mtxlock(sc->lock);
+ pcm_setflags(scp->dev, pcm_getflags(scp->dev) | SD_F_SOFTPCMVOL);
+ mix_setdevs(m, mask);
+ snd_mtxunlock(sc->lock);
+
+ return (0);
+}
+
+static int
+hdspmixer_set(struct snd_mixer *m, unsigned dev,
+ unsigned left, unsigned right)
+{
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ int i;
+
+ scp = mix_getdevinfo(m);
+
+#if 0
+ device_printf(scp->dev, "hdspmixer_set() %d %d\n",
+ left, right);
+#endif
+
+ for (i = 0; i < scp->chnum; i++) {
+ ch = &scp->chan[i];
+ if ((dev == SOUND_MIXER_VOLUME && ch->dir == PCMDIR_PLAY) ||
+ (dev == SOUND_MIXER_RECLEV && ch->dir == PCMDIR_REC)) {
+ ch->lvol = left;
+ ch->rvol = right;
+ if (ch->run)
+ hdspchan_setgain(ch);
+ }
+ }
+
+ return (0);
+}
+
+static kobj_method_t hdspmixer_methods[] = {
+ KOBJMETHOD(mixer_init, hdspmixer_init),
+ KOBJMETHOD(mixer_set, hdspmixer_set),
+ KOBJMETHOD_END
+};
+MIXER_DECLARE(hdspmixer);
+
+static void
+hdspchan_enable(struct sc_chinfo *ch, int value)
+{
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ uint32_t slot, slots;
+ unsigned int offset;
+ int reg;
+
+ scp = ch->parent;
+ sc = scp->sc;
+
+ if (ch->dir == PCMDIR_PLAY)
+ reg = HDSP_OUT_ENABLE_BASE;
+ else
+ reg = HDSP_IN_ENABLE_BASE;
+
+ ch->run = value;
+
+ /* Iterate through all slots of the channel's physical ports. */
+ slots = hdsp_port_slot_map(ch->ports, sc->speed);
+ slot = hdsp_slot_first(slots);
+ while (slot != 0) {
+ /* Set register to enable or disable slot. */
+ offset = hdsp_slot_offset(slot);
+ hdsp_write_1(sc, reg + (4 * offset), value);
+
+ slots &= ~slot;
+ slot = hdsp_slot_first(slots);
+ }
+}
+
+static int
+hdsp_running(struct sc_info *sc)
+{
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ device_t *devlist;
+ int devcount;
+ int i, j;
+ int running;
+
+ running = 0;
+
+ devlist = NULL;
+ devcount = 0;
+
+ if (device_get_children(sc->dev, &devlist, &devcount) != 0)
+ running = 1; /* On error, avoid channel config changes. */
+
+ for (i = 0; running == 0 && i < devcount; i++) {
+ scp = device_get_ivars(devlist[i]);
+ for (j = 0; j < scp->chnum; j++) {
+ ch = &scp->chan[j];
+ if (ch->run) {
+ running = 1;
+ break;
+ }
+ }
+ }
+
+#if 0
+ if (running == 1)
+ device_printf(sc->dev, "hdsp is running\n");
+#endif
+
+ free(devlist, M_TEMP);
+
+ return (running);
+}
+
+static void
+hdsp_start_audio(struct sc_info *sc)
+{
+
+ sc->ctrl_register |= (HDSP_AUDIO_INT_ENABLE | HDSP_ENABLE);
+ hdsp_write_4(sc, HDSP_CONTROL_REG, sc->ctrl_register);
+}
+
+static void
+hdsp_stop_audio(struct sc_info *sc)
+{
+
+ if (hdsp_running(sc) == 1)
+ return;
+
+ sc->ctrl_register &= ~(HDSP_AUDIO_INT_ENABLE | HDSP_ENABLE);
+ hdsp_write_4(sc, HDSP_CONTROL_REG, sc->ctrl_register);
+}
+
+static void
+buffer_mux_write(uint32_t *dma, uint32_t *pcm, unsigned int pos,
+ unsigned int pos_end, unsigned int width, unsigned int channels)
+{
+ unsigned int slot;
+
+ for (; pos < pos_end; ++pos) {
+ for (slot = 0; slot < width; slot++) {
+ dma[slot * HDSP_CHANBUF_SAMPLES + pos] =
+ pcm[pos * channels + slot];
+ }
+ }
+}
+
+static void
+buffer_mux_port(uint32_t *dma, uint32_t *pcm, uint32_t subset, uint32_t slots,
+ unsigned int pos, unsigned int samples, unsigned int channels)
+{
+ unsigned int slot_offset, width;
+ unsigned int chan_pos;
+
+ /* Translate DMA slot offset to DMA buffer offset. */
+ slot_offset = hdsp_slot_offset(subset);
+ dma += slot_offset * HDSP_CHANBUF_SAMPLES;
+
+ /* Channel position of the slot subset. */
+ chan_pos = hdsp_slot_channel_offset(subset, slots);
+ pcm += chan_pos;
+
+ /* Only copy channels supported by both hardware and pcm format. */
+ width = hdsp_slot_count(subset);
+
+ /* Let the compiler inline and loop unroll common cases. */
+ if (width == 1)
+ buffer_mux_write(dma, pcm, pos, pos + samples, 1, channels);
+ else if (width == 2)
+ buffer_mux_write(dma, pcm, pos, pos + samples, 2, channels);
+ else if (width == 4)
+ buffer_mux_write(dma, pcm, pos, pos + samples, 4, channels);
+ else if (width == 8)
+ buffer_mux_write(dma, pcm, pos, pos + samples, 8, channels);
+ else
+ buffer_mux_write(dma, pcm, pos, pos + samples, width, channels);
+}
+
+static void
+buffer_demux_read(uint32_t *dma, uint32_t *pcm, unsigned int pos,
+ unsigned int pos_end, unsigned int width, unsigned int channels)
+{
+ unsigned int slot;
+
+ for (; pos < pos_end; ++pos) {
+ for (slot = 0; slot < width; slot++) {
+ pcm[pos * channels + slot] =
+ dma[slot * HDSP_CHANBUF_SAMPLES + pos];
+ }
+ }
+}
+
+static void
+buffer_demux_port(uint32_t *dma, uint32_t *pcm, uint32_t subset, uint32_t slots,
+ unsigned int pos, unsigned int samples, unsigned int channels)
+{
+ unsigned int slot_offset, width;
+ unsigned int chan_pos;
+
+ /* Translate DMA slot offset to DMA buffer offset. */
+ slot_offset = hdsp_slot_offset(subset);
+ dma += slot_offset * HDSP_CHANBUF_SAMPLES;
+
+ /* Channel position of the slot subset. */
+ chan_pos = hdsp_slot_channel_offset(subset, slots);
+ pcm += chan_pos;
+
+ /* Only copy channels supported by both hardware and pcm format. */
+ width = hdsp_slot_count(subset);
+
+ /* Let the compiler inline and loop unroll common cases. */
+ if (width == 1)
+ buffer_demux_read(dma, pcm, pos, pos + samples, 1, channels);
+ else if (width == 2)
+ buffer_demux_read(dma, pcm, pos, pos + samples, 2, channels);
+ else if (width == 4)
+ buffer_demux_read(dma, pcm, pos, pos + samples, 4, channels);
+ else if (width == 8)
+ buffer_demux_read(dma, pcm, pos, pos + samples, 8, channels);
+ else
+ buffer_demux_read(dma, pcm, pos, pos + samples, width, channels);
+}
+
+
+/* Copy data between DMA and PCM buffers. */
+static void
+buffer_copy(struct sc_chinfo *ch)
+{
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ uint32_t row, slots;
+ uint32_t dma_pos;
+ unsigned int pos, length, remainder, offset, buffer_size;
+ unsigned int channels;
+
+ scp = ch->parent;
+ sc = scp->sc;
+
+ channels = AFMT_CHANNEL(ch->format); /* Number of PCM channels. */
+
+ /* HDSP cards read / write a double buffer, twice the latency period. */
+ buffer_size = 2 * sc->period * sizeof(uint32_t);
+
+ /* Derive buffer position and length to be copied. */
+ if (ch->dir == PCMDIR_PLAY) {
+ /* Buffer position scaled down to a single channel. */
+ pos = sndbuf_getreadyptr(ch->buffer) / channels;
+ length = sndbuf_getready(ch->buffer) / channels;
+ /* Copy no more than 2 periods in advance. */
+ if (length > buffer_size)
+ length = buffer_size;
+ /* Skip what was already copied last time. */
+ offset = (ch->position + buffer_size) - pos;
+ offset %= buffer_size;
+ if (offset <= length) {
+ pos = (pos + offset) % buffer_size;
+ length -= offset;
+ }
+ } else {
+ /* Buffer position scaled down to a single channel. */
+ pos = sndbuf_getfreeptr(ch->buffer) / channels;
+ /* Get DMA buffer write position. */
+ dma_pos = hdsp_read_2(sc, HDSP_STATUS_REG);
+ dma_pos &= HDSP_BUF_POSITION_MASK;
+ dma_pos %= buffer_size;
+ /* Copy what is newly available. */
+ length = (dma_pos + buffer_size) - pos;
+ length %= buffer_size;
+ }
+
+ /* Position and length in samples (4 bytes). */
+ pos /= 4;
+ length /= 4;
+ buffer_size /= sizeof(uint32_t);
+
+ /* Split copy length to wrap around at buffer end. */
+ remainder = 0;
+ if (pos + length > buffer_size)
+ remainder = (pos + length) - buffer_size;
+
+ /* Iterate through rows of contiguous slots. */
+ slots = hdsp_port_slot_map(ch->ports, sc->speed);
+ slots = hdsp_slot_first_n(slots, channels);
+ row = hdsp_slot_first_row(slots);
+
+ while (row != 0) {
+ if (ch->dir == PCMDIR_PLAY) {
+ buffer_mux_port(sc->pbuf, ch->data, row, slots, pos,
+ length - remainder, channels);
+ buffer_mux_port(sc->pbuf, ch->data, row, slots, 0,
+ remainder, channels);
+ } else {
+ buffer_demux_port(sc->rbuf, ch->data, row, slots, pos,
+ length - remainder, channels);
+ buffer_demux_port(sc->rbuf, ch->data, row, slots, 0,
+ remainder, channels);
+ }
+
+ slots &= ~row;
+ row = hdsp_slot_first_row(slots);
+ }
+
+ ch->position = ((pos + length) * 4) % buffer_size;
+}
+
+static int
+clean(struct sc_chinfo *ch)
+{
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ uint32_t *buf;
+ uint32_t slot, slots;
+ unsigned int offset;
+
+ scp = ch->parent;
+ sc = scp->sc;
+ buf = sc->rbuf;
+
+ if (ch->dir == PCMDIR_PLAY)
+ buf = sc->pbuf;
+
+ /* Iterate through all of the channel's slots. */
+ slots = hdsp_port_slot_map(ch->ports, sc->speed);
+ slot = hdsp_slot_first(slots);
+ while (slot != 0) {
+ /* Clear the slot's buffer. */
+ offset = hdsp_slot_offset(slot);
+ bzero(buf + offset * HDSP_CHANBUF_SAMPLES, HDSP_CHANBUF_SIZE);
+
+ slots &= ~slot;
+ slot = hdsp_slot_first(slots);
+ }
+
+ ch->position = 0;
+
+ return (0);
+}
+
+/* Channel interface. */
+static void *
+hdspchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b,
+ struct pcm_channel *c, int dir)
+{
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+ int num;
+
+ scp = devinfo;
+ sc = scp->sc;
+
+ snd_mtxlock(sc->lock);
+ num = scp->chnum;
+
+ ch = &scp->chan[num];
+
+ if (dir == PCMDIR_PLAY)
+ ch->ports = hdsp_channel_play_ports(scp->hc);
+ else
+ ch->ports = hdsp_channel_rec_ports(scp->hc);
+
+ ch->run = 0;
+ ch->lvol = 0;
+ ch->rvol = 0;
+
+ /* Support all possible ADAT widths as channel formats. */
+ ch->cap_fmts[0] =
+ SND_FORMAT(AFMT_S32_LE, hdsp_port_slot_count(ch->ports, 48000), 0);
+ ch->cap_fmts[1] =
+ SND_FORMAT(AFMT_S32_LE, hdsp_port_slot_count(ch->ports, 96000), 0);
+ ch->cap_fmts[2] =
+ SND_FORMAT(AFMT_S32_LE, hdsp_port_slot_count(ch->ports, 192000), 0);
+ ch->cap_fmts[3] = 0;
+
+ ch->caps = malloc(sizeof(struct pcmchan_caps), M_HDSP, M_NOWAIT);
+ *(ch->caps) = (struct pcmchan_caps) {32000, 192000, ch->cap_fmts, 0};
+
+ /* HDSP 9652 does not support quad speed sample rates. */
+ if (sc->type == HDSP_9652) {
+ ch->cap_fmts[2] = SND_FORMAT(AFMT_S32_LE, 2, 0);
+ ch->caps->maxspeed = 96000;
+ }
+
+ /* Allocate maximum buffer size. */
+ ch->size = HDSP_CHANBUF_SIZE * hdsp_port_slot_count_max(ch->ports);
+ ch->data = malloc(ch->size, M_HDSP, M_NOWAIT);
+ ch->position = 0;
+
+ ch->buffer = b;
+ ch->channel = c;
+ ch->parent = scp;
+
+ ch->dir = dir;
+
+ snd_mtxunlock(sc->lock);
+
+ if (sndbuf_setup(ch->buffer, ch->data, ch->size) != 0) {
+ device_printf(scp->dev, "Can't setup sndbuf.\n");
+ return (NULL);
+ }
+
+ return (ch);
+}
+
+static int
+hdspchan_trigger(kobj_t obj, void *data, int go)
+{
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+
+ ch = data;
+ scp = ch->parent;
+ sc = scp->sc;
+
+ snd_mtxlock(sc->lock);
+ switch (go) {
+ case PCMTRIG_START:
+#if 0
+ device_printf(scp->dev, "hdspchan_trigger(): start\n");
+#endif
+ hdspchan_enable(ch, 1);
+ hdspchan_setgain(ch);
+ hdsp_start_audio(sc);
+ break;
+
+ case PCMTRIG_STOP:
+ case PCMTRIG_ABORT:
+#if 0
+ device_printf(scp->dev, "hdspchan_trigger(): stop or abort\n");
+#endif
+ clean(ch);
+ hdspchan_enable(ch, 0);
+ hdsp_stop_audio(sc);
+ break;
+
+ case PCMTRIG_EMLDMAWR:
+ case PCMTRIG_EMLDMARD:
+ if(ch->run)
+ buffer_copy(ch);
+ break;
+ }
+
+ snd_mtxunlock(sc->lock);
+
+ return (0);
+}
+
+static uint32_t
+hdspchan_getptr(kobj_t obj, void *data)
+{
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+ uint32_t ret, pos;
+
+ ch = data;
+ scp = ch->parent;
+ sc = scp->sc;
+
+ snd_mtxlock(sc->lock);
+ ret = hdsp_read_2(sc, HDSP_STATUS_REG);
+ snd_mtxunlock(sc->lock);
+
+ pos = ret & HDSP_BUF_POSITION_MASK;
+ pos %= (2 * sc->period * sizeof(uint32_t)); /* Double buffer. */
+ pos *= AFMT_CHANNEL(ch->format); /* Hardbuf with multiple channels. */
+
+ return (pos);
+}
+
+static int
+hdspchan_free(kobj_t obj, void *data)
+{
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+
+ ch = data;
+ scp = ch->parent;
+ sc = scp->sc;
+
+#if 0
+ device_printf(scp->dev, "hdspchan_free()\n");
+#endif
+
+ snd_mtxlock(sc->lock);
+ if (ch->data != NULL) {
+ free(ch->data, M_HDSP);
+ ch->data = NULL;
+ }
+ if (ch->caps != NULL) {
+ free(ch->caps, M_HDSP);
+ ch->caps = NULL;
+ }
+ snd_mtxunlock(sc->lock);
+
+ return (0);
+}
+
+static int
+hdspchan_setformat(kobj_t obj, void *data, uint32_t format)
+{
+ struct sc_chinfo *ch;
+
+ ch = data;
+
+#if 0
+ struct sc_pcminfo *scp = ch->parent;
+ device_printf(scp->dev, "hdspchan_setformat(%d)\n", format);
+#endif
+
+ ch->format = format;
+
+ return (0);
+}
+
+static uint32_t
+hdspchan_setspeed(kobj_t obj, void *data, uint32_t speed)
+{
+ struct sc_pcminfo *scp;
+ struct hdsp_rate *hr;
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+ int threshold;
+ int i;
+
+ ch = data;
+ scp = ch->parent;
+ sc = scp->sc;
+ hr = NULL;
+
+#if 0
+ device_printf(scp->dev, "hdspchan_setspeed(%d)\n", speed);
+#endif
+
+ if (hdsp_running(sc) == 1)
+ goto end;
+
+ /* HDSP 9652 only supports sample rates up to 96kHz. */
+ if (sc->type == HDSP_9652 && speed > 96000)
+ speed = 96000;
+
+ if (sc->force_speed > 0)
+ speed = sc->force_speed;
+
+ /* First look for equal frequency. */
+ for (i = 0; rate_map[i].speed != 0; i++) {
+ if (rate_map[i].speed == speed)
+ hr = &rate_map[i];
+ }
+
+ /* If no match, just find nearest. */
+ if (hr == NULL) {
+ for (i = 0; rate_map[i].speed != 0; i++) {
+ hr = &rate_map[i];
+ threshold = hr->speed + ((rate_map[i + 1].speed != 0) ?
+ ((rate_map[i + 1].speed - hr->speed) >> 1) : 0);
+ if (speed < threshold)
+ break;
+ }
+ }
+
+ /* Write frequency on the device. */
+ sc->ctrl_register &= ~HDSP_FREQ_MASK;
+ sc->ctrl_register |= hr->reg;
+ hdsp_write_4(sc, HDSP_CONTROL_REG, sc->ctrl_register);
+
+ if (sc->type == HDSP_9632) {
+ /* Set DDS value. */
+ hdsp_write_4(sc, HDSP_FREQ_REG, hdsp_freq_reg_value(hr->speed));
+ }
+
+ sc->speed = hr->speed;
+end:
+
+ return (sc->speed);
+}
+
+static uint32_t
+hdspchan_setblocksize(kobj_t obj, void *data, uint32_t blocksize)
+{
+ struct hdsp_latency *hl;
+ struct sc_pcminfo *scp;
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+ int threshold;
+ int i;
+
+ ch = data;
+ scp = ch->parent;
+ sc = scp->sc;
+ hl = NULL;
+
+#if 0
+ device_printf(scp->dev, "hdspchan_setblocksize(%d)\n", blocksize);
+#endif
+
+ if (hdsp_running(sc) == 1)
+ goto end;
+
+ if (blocksize > HDSP_LAT_BYTES_MAX)
+ blocksize = HDSP_LAT_BYTES_MAX;
+ else if (blocksize < HDSP_LAT_BYTES_MIN)
+ blocksize = HDSP_LAT_BYTES_MIN;
+
+ blocksize /= 4 /* samples */;
+
+ if (sc->force_period > 0)
+ blocksize = sc->force_period;
+
+ /* First look for equal latency. */
+ for (i = 0; latency_map[i].period != 0; i++) {
+ if (latency_map[i].period == blocksize)
+ hl = &latency_map[i];
+ }
+
+ /* If no match, just find nearest. */
+ if (hl == NULL) {
+ for (i = 0; latency_map[i].period != 0; i++) {
+ hl = &latency_map[i];
+ threshold = hl->period + ((latency_map[i + 1].period != 0) ?
+ ((latency_map[i + 1].period - hl->period) >> 1) : 0);
+ if (blocksize < threshold)
+ break;
+ }
+ }
+
+ snd_mtxlock(sc->lock);
+ sc->ctrl_register &= ~HDSP_LAT_MASK;
+ sc->ctrl_register |= hdsp_encode_latency(hl->n);
+ hdsp_write_4(sc, HDSP_CONTROL_REG, sc->ctrl_register);
+ sc->period = hl->period;
+ snd_mtxunlock(sc->lock);
+
+#if 0
+ device_printf(scp->dev, "New period=%d\n", sc->period);
+#endif
+
+ sndbuf_resize(ch->buffer, 2,
+ (sc->period * AFMT_CHANNEL(ch->format) * sizeof(uint32_t)));
+
+ /* Reset pointer, rewrite frequency (same register) for 9632. */
+ hdsp_write_4(sc, HDSP_RESET_POINTER, 0);
+ if (sc->type == HDSP_9632)
+ hdsp_write_4(sc, HDSP_FREQ_REG, hdsp_freq_reg_value(sc->speed));
+end:
+
+ return (sndbuf_getblksz(ch->buffer));
+}
+
+static uint32_t hdsp_bkp_fmt[] = {
+ SND_FORMAT(AFMT_S32_LE, 2, 0),
+ 0
+};
+
+/* Capabilities fallback, no quad speed for HDSP 9652 compatibility. */
+static struct pcmchan_caps hdsp_bkp_caps = {32000, 96000, hdsp_bkp_fmt, 0};
+
+static struct pcmchan_caps *
+hdspchan_getcaps(kobj_t obj, void *data)
+{
+ struct sc_chinfo *ch;
+
+ ch = data;
+
+#if 0
+ device_printf(ch->parent->dev, "hdspchan_getcaps()\n");
+#endif
+
+ if (ch->caps != NULL)
+ return (ch->caps);
+
+ return (&hdsp_bkp_caps);
+}
+
+static kobj_method_t hdspchan_methods[] = {
+ KOBJMETHOD(channel_init, hdspchan_init),
+ KOBJMETHOD(channel_free, hdspchan_free),
+ KOBJMETHOD(channel_setformat, hdspchan_setformat),
+ KOBJMETHOD(channel_setspeed, hdspchan_setspeed),
+ KOBJMETHOD(channel_setblocksize, hdspchan_setblocksize),
+ KOBJMETHOD(channel_trigger, hdspchan_trigger),
+ KOBJMETHOD(channel_getptr, hdspchan_getptr),
+ KOBJMETHOD(channel_getcaps, hdspchan_getcaps),
+ KOBJMETHOD_END
+};
+CHANNEL_DECLARE(hdspchan);
+
+static int
+hdsp_pcm_probe(device_t dev)
+{
+
+#if 0
+ device_printf(dev,"hdsp_pcm_probe()\n");
+#endif
+
+ return (0);
+}
+
+static uint32_t
+hdsp_pcm_intr(struct sc_pcminfo *scp)
+{
+ struct sc_chinfo *ch;
+ struct sc_info *sc;
+ int i;
+
+ sc = scp->sc;
+
+ for (i = 0; i < scp->chnum; i++) {
+ ch = &scp->chan[i];
+ snd_mtxunlock(sc->lock);
+ chn_intr(ch->channel);
+ snd_mtxlock(sc->lock);
+ }
+
+ return (0);
+}
+
+static int
+hdsp_pcm_attach(device_t dev)
+{
+ char status[SND_STATUSLEN];
+ struct sc_pcminfo *scp;
+ const char *buf;
+ uint32_t pcm_flags;
+ int err;
+ int play, rec;
+
+ scp = device_get_ivars(dev);
+ scp->ih = &hdsp_pcm_intr;
+
+ if (scp->hc->ports & HDSP_CHAN_9632_ALL)
+ buf = "9632";
+ else if (scp->hc->ports & HDSP_CHAN_9652_ALL)
+ buf = "9652";
+ else
+ buf = "?";
+ device_set_descf(dev, "HDSP %s [%s]", buf, scp->hc->descr);
+
+ /*
+ * We don't register interrupt handler with snd_setup_intr
+ * in pcm device. Mark pcm device as MPSAFE manually.
+ */
+ pcm_flags = pcm_getflags(dev) | SD_F_MPSAFE;
+ if (hdsp_port_slot_count_max(scp->hc->ports) > HDSP_MATRIX_MAX)
+ /* Disable vchan conversion, too many channels. */
+ pcm_flags |= SD_F_BITPERFECT;
+ pcm_setflags(dev, pcm_flags);
+
+ play = (hdsp_channel_play_ports(scp->hc)) ? 1 : 0;
+ rec = (hdsp_channel_rec_ports(scp->hc)) ? 1 : 0;
+ err = pcm_register(dev, scp, play, rec);
+ if (err) {
+ device_printf(dev, "Can't register pcm.\n");
+ return (ENXIO);
+ }
+
+ scp->chnum = 0;
+ if (play) {
+ pcm_addchan(dev, PCMDIR_PLAY, &hdspchan_class, scp);
+ scp->chnum++;
+ }
+
+ if (rec) {
+ pcm_addchan(dev, PCMDIR_REC, &hdspchan_class, scp);
+ scp->chnum++;
+ }
+
+ snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s",
+ rman_get_start(scp->sc->cs),
+ rman_get_start(scp->sc->irq),
+ device_get_nameunit(device_get_parent(dev)));
+ pcm_setstatus(dev, status);
+
+ mixer_init(dev, &hdspmixer_class, scp);
+
+ return (0);
+}
+
+static int
+hdsp_pcm_detach(device_t dev)
+{
+ int err;
+
+ err = pcm_unregister(dev);
+ if (err) {
+ device_printf(dev, "Can't unregister device.\n");
+ return (err);
+ }
+
+ return (0);
+}
+
+static device_method_t hdsp_pcm_methods[] = {
+ DEVMETHOD(device_probe, hdsp_pcm_probe),
+ DEVMETHOD(device_attach, hdsp_pcm_attach),
+ DEVMETHOD(device_detach, hdsp_pcm_detach),
+ { 0, 0 }
+};
+
+static driver_t hdsp_pcm_driver = {
+ "pcm",
+ hdsp_pcm_methods,
+ PCM_SOFTC_SIZE,
+};
+
+DRIVER_MODULE(snd_hdsp_pcm, hdsp, hdsp_pcm_driver, 0, 0);
+MODULE_DEPEND(snd_hdsp, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
+MODULE_VERSION(snd_hdsp, 1);
diff --git a/sys/dev/sound/pci/hdsp.c b/sys/dev/sound/pci/hdsp.c
new file mode 100644
index 000000000000..769615cb1f4b
--- /dev/null
+++ b/sys/dev/sound/pci/hdsp.c
@@ -0,0 +1,793 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2012-2016 Ruslan Bukin <br@bsdpad.com>
+ * Copyright (c) 2023-2024 Florian Walpen <dev@submerge.ch>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * RME HDSP driver for FreeBSD.
+ * Supported cards: HDSP 9632, HDSP 9652.
+ */
+
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#include <dev/sound/pcm/sound.h>
+#include <dev/sound/pci/hdsp.h>
+
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
+#include <mixer_if.h>
+
+static bool hdsp_unified_pcm = false;
+
+static SYSCTL_NODE(_hw, OID_AUTO, hdsp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+ "PCI HDSP");
+
+SYSCTL_BOOL(_hw_hdsp, OID_AUTO, unified_pcm, CTLFLAG_RWTUN,
+ &hdsp_unified_pcm, 0, "Combine physical ports in one unified pcm device");
+
+static struct hdsp_clock_source hdsp_clock_source_table_9632[] = {
+ { "internal", HDSP_CLOCK_INTERNAL },
+ { "adat", HDSP_CLOCK_ADAT1 },
+ { "spdif", HDSP_CLOCK_SPDIF },
+ { "word", HDSP_CLOCK_WORD },
+ { NULL, HDSP_CLOCK_INTERNAL }
+};
+
+static struct hdsp_clock_source hdsp_clock_source_table_9652[] = {
+ { "internal", HDSP_CLOCK_INTERNAL },
+ { "adat1", HDSP_CLOCK_ADAT1 },
+ { "adat2", HDSP_CLOCK_ADAT2 },
+ { "adat3", HDSP_CLOCK_ADAT3 },
+ { "spdif", HDSP_CLOCK_SPDIF },
+ { "word", HDSP_CLOCK_WORD },
+ { "adat_sync", HDSP_CLOCK_ADAT_SYNC },
+ { NULL, HDSP_CLOCK_INTERNAL }
+};
+
+static struct hdsp_channel chan_map_9632[] = {
+ { HDSP_CHAN_9632_ADAT, "adat" },
+ { HDSP_CHAN_9632_SPDIF, "s/pdif" },
+ { HDSP_CHAN_9632_LINE, "line" },
+ { 0, NULL },
+};
+
+static struct hdsp_channel chan_map_9632_uni[] = {
+ { HDSP_CHAN_9632_ALL, "all" },
+ { 0, NULL },
+};
+
+static struct hdsp_channel chan_map_9652[] = {
+ { HDSP_CHAN_9652_ADAT1, "adat1" },
+ { HDSP_CHAN_9652_ADAT2, "adat2" },
+ { HDSP_CHAN_9652_ADAT3, "adat3" },
+ { HDSP_CHAN_9652_SPDIF, "s/pdif" },
+ { 0, NULL },
+};
+
+static struct hdsp_channel chan_map_9652_uni[] = {
+ { HDSP_CHAN_9652_ALL, "all" },
+ { 0, NULL },
+};
+
+static void
+hdsp_intr(void *p)
+{
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ device_t *devlist;
+ int devcount;
+ int status;
+ int err;
+ int i;
+
+ sc = (struct sc_info *)p;
+
+ snd_mtxlock(sc->lock);
+
+ status = hdsp_read_1(sc, HDSP_STATUS_REG);
+ if (status & HDSP_AUDIO_IRQ_PENDING) {
+ if ((err = device_get_children(sc->dev, &devlist, &devcount)) != 0)
+ return;
+
+ for (i = 0; i < devcount; i++) {
+ scp = device_get_ivars(devlist[i]);
+ if (scp->ih != NULL)
+ scp->ih(scp);
+ }
+
+ hdsp_write_1(sc, HDSP_INTERRUPT_ACK, 0);
+ free(devlist, M_TEMP);
+ }
+
+ snd_mtxunlock(sc->lock);
+}
+
+static void
+hdsp_dmapsetmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
+{
+#if 0
+ device_printf(sc->dev, "hdsp_dmapsetmap()\n");
+#endif
+}
+
+static int
+hdsp_alloc_resources(struct sc_info *sc)
+{
+
+ /* Allocate resource. */
+ sc->csid = PCIR_BAR(0);
+ sc->cs = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY,
+ &sc->csid, RF_ACTIVE);
+
+ if (!sc->cs) {
+ device_printf(sc->dev, "Unable to map SYS_RES_MEMORY.\n");
+ return (ENXIO);
+ }
+
+ sc->cst = rman_get_bustag(sc->cs);
+ sc->csh = rman_get_bushandle(sc->cs);
+
+ /* Allocate interrupt resource. */
+ sc->irqid = 0;
+ sc->irq = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irqid,
+ RF_ACTIVE | RF_SHAREABLE);
+
+ if (!sc->irq ||
+ bus_setup_intr(sc->dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV,
+ NULL, hdsp_intr, sc, &sc->ih)) {
+ device_printf(sc->dev, "Unable to alloc interrupt resource.\n");
+ return (ENXIO);
+ }
+
+ /* Allocate DMA resources. */
+ if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
+ /*alignment*/4,
+ /*boundary*/0,
+ /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
+ /*highaddr*/BUS_SPACE_MAXADDR,
+ /*filter*/NULL,
+ /*filterarg*/NULL,
+ /*maxsize*/2 * HDSP_DMASEGSIZE,
+ /*nsegments*/2,
+ /*maxsegsz*/HDSP_DMASEGSIZE,
+ /*flags*/0,
+ /*lockfunc*/NULL,
+ /*lockarg*/NULL,
+ /*dmatag*/&sc->dmat) != 0) {
+ device_printf(sc->dev, "Unable to create dma tag.\n");
+ return (ENXIO);
+ }
+
+ sc->bufsize = HDSP_DMASEGSIZE;
+
+ /* pbuf (play buffer). */
+ if (bus_dmamem_alloc(sc->dmat, (void **)&sc->pbuf, BUS_DMA_WAITOK,
+ &sc->pmap)) {
+ device_printf(sc->dev, "Can't alloc pbuf.\n");
+ return (ENXIO);
+ }
+
+ if (bus_dmamap_load(sc->dmat, sc->pmap, sc->pbuf, sc->bufsize,
+ hdsp_dmapsetmap, sc, BUS_DMA_NOWAIT)) {
+ device_printf(sc->dev, "Can't load pbuf.\n");
+ return (ENXIO);
+ }
+
+ /* rbuf (rec buffer). */
+ if (bus_dmamem_alloc(sc->dmat, (void **)&sc->rbuf, BUS_DMA_WAITOK,
+ &sc->rmap)) {
+ device_printf(sc->dev, "Can't alloc rbuf.\n");
+ return (ENXIO);
+ }
+
+ if (bus_dmamap_load(sc->dmat, sc->rmap, sc->rbuf, sc->bufsize,
+ hdsp_dmapsetmap, sc, BUS_DMA_NOWAIT)) {
+ device_printf(sc->dev, "Can't load rbuf.\n");
+ return (ENXIO);
+ }
+
+ bzero(sc->pbuf, sc->bufsize);
+ bzero(sc->rbuf, sc->bufsize);
+
+ return (0);
+}
+
+static void
+hdsp_map_dmabuf(struct sc_info *sc)
+{
+ uint32_t paddr, raddr;
+
+ paddr = vtophys(sc->pbuf);
+ raddr = vtophys(sc->rbuf);
+
+ hdsp_write_4(sc, HDSP_PAGE_ADDR_BUF_OUT, paddr);
+ hdsp_write_4(sc, HDSP_PAGE_ADDR_BUF_IN, raddr);
+}
+
+static int
+hdsp_sysctl_sample_rate(SYSCTL_HANDLER_ARGS)
+{
+ struct sc_info *sc = oidp->oid_arg1;
+ int error;
+ unsigned int speed, multiplier;
+
+ speed = sc->force_speed;
+
+ /* Process sysctl (unsigned) integer request. */
+ error = sysctl_handle_int(oidp, &speed, 0, req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+
+ /* Speed from 32000 to 192000, 0 falls back to pcm speed setting. */
+ sc->force_speed = 0;
+ if (speed > 0) {
+ multiplier = 1;
+ if ((speed > (96000 + 128000) / 2) && sc->type == HDSP_9632)
+ multiplier = 4;
+ else if (speed > (48000 + 64000) / 2)
+ multiplier = 2;
+
+ if (speed < ((32000 + 44100) / 2) * multiplier)
+ sc->force_speed = 32000 * multiplier;
+ else if (speed < ((44100 + 48000) / 2) * multiplier)
+ sc->force_speed = 44100 * multiplier;
+ else
+ sc->force_speed = 48000 * multiplier;
+ }
+
+ return (0);
+}
+
+
+static int
+hdsp_sysctl_period(SYSCTL_HANDLER_ARGS)
+{
+ struct sc_info *sc = oidp->oid_arg1;
+ int error;
+ unsigned int period;
+
+ period = sc->force_period;
+
+ /* Process sysctl (unsigned) integer request. */
+ error = sysctl_handle_int(oidp, &period, 0, req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+
+ /* Period is from 2^5 to 2^14, 0 falls back to pcm latency settings. */
+ sc->force_period = 0;
+ if (period > 0) {
+ sc->force_period = 32;
+ while (sc->force_period < period && sc->force_period < 4096)
+ sc->force_period <<= 1;
+ }
+
+ return (0);
+}
+
+static uint32_t
+hdsp_control_clock_preference(enum hdsp_clock_type type)
+{
+ switch (type) {
+ case HDSP_CLOCK_INTERNAL:
+ return (HDSP_CONTROL_MASTER);
+ case HDSP_CLOCK_ADAT1:
+ return (HDSP_CONTROL_CLOCK(0));
+ case HDSP_CLOCK_ADAT2:
+ return (HDSP_CONTROL_CLOCK(1));
+ case HDSP_CLOCK_ADAT3:
+ return (HDSP_CONTROL_CLOCK(2));
+ case HDSP_CLOCK_SPDIF:
+ return (HDSP_CONTROL_CLOCK(3));
+ case HDSP_CLOCK_WORD:
+ return (HDSP_CONTROL_CLOCK(4));
+ case HDSP_CLOCK_ADAT_SYNC:
+ return (HDSP_CONTROL_CLOCK(5));
+ default:
+ return (HDSP_CONTROL_MASTER);
+ }
+}
+
+static int
+hdsp_sysctl_clock_preference(SYSCTL_HANDLER_ARGS)
+{
+ struct sc_info *sc;
+ struct hdsp_clock_source *clock_table, *clock;
+ char buf[16] = "invalid";
+ int error;
+ uint32_t control;
+
+ sc = oidp->oid_arg1;
+
+ /* Select sync ports table for device type. */
+ if (sc->type == HDSP_9632)
+ clock_table = hdsp_clock_source_table_9632;
+ else if (sc->type == HDSP_9652)
+ clock_table = hdsp_clock_source_table_9652;
+ else
+ return (ENXIO);
+
+ /* Extract preferred clock source from control register. */
+ control = sc->ctrl_register & HDSP_CONTROL_CLOCK_MASK;
+ for (clock = clock_table; clock->name != NULL; ++clock) {
+ if (hdsp_control_clock_preference(clock->type) == control)
+ break;
+ }
+ if (clock->name != NULL)
+ strlcpy(buf, clock->name, sizeof(buf));
+
+ /* Process sysctl string request. */
+ error = sysctl_handle_string(oidp, buf, sizeof(buf), req);
+ if (error != 0 || req->newptr == NULL)
+ return (error);
+
+ /* Find clock source matching the sysctl string. */
+ for (clock = clock_table; clock->name != NULL; ++clock) {
+ if (strncasecmp(buf, clock->name, sizeof(buf)) == 0)
+ break;
+ }
+
+ /* Set preferred clock source in control register. */
+ if (clock->name != NULL) {
+ control = hdsp_control_clock_preference(clock->type);
+ control &= HDSP_CONTROL_CLOCK_MASK;
+ snd_mtxlock(sc->lock);
+ sc->ctrl_register &= ~HDSP_CONTROL_CLOCK_MASK;
+ sc->ctrl_register |= control;
+ hdsp_write_4(sc, HDSP_CONTROL_REG, sc->ctrl_register);
+ snd_mtxunlock(sc->lock);
+ }
+ return (0);
+}
+
+static uint32_t
+hdsp_status2_clock_source(enum hdsp_clock_type type)
+{
+ switch (type) {
+ case HDSP_CLOCK_INTERNAL:
+ return (0);
+ case HDSP_CLOCK_ADAT1:
+ return (HDSP_STATUS2_CLOCK(0));
+ case HDSP_CLOCK_ADAT2:
+ return (HDSP_STATUS2_CLOCK(1));
+ case HDSP_CLOCK_ADAT3:
+ return (HDSP_STATUS2_CLOCK(2));
+ case HDSP_CLOCK_SPDIF:
+ return (HDSP_STATUS2_CLOCK(3));
+ case HDSP_CLOCK_WORD:
+ return (HDSP_STATUS2_CLOCK(4));
+ case HDSP_CLOCK_ADAT_SYNC:
+ return (HDSP_STATUS2_CLOCK(5));
+ default:
+ return (0);
+ }
+}
+
+static int
+hdsp_sysctl_clock_source(SYSCTL_HANDLER_ARGS)
+{
+ struct sc_info *sc;
+ struct hdsp_clock_source *clock_table, *clock;
+ char buf[16] = "invalid";
+ uint32_t status2;
+
+ sc = oidp->oid_arg1;
+
+ /* Select sync ports table for device type. */
+ if (sc->type == HDSP_9632)
+ clock_table = hdsp_clock_source_table_9632;
+ else if (sc->type == HDSP_9652)
+ clock_table = hdsp_clock_source_table_9652;
+ else
+ return (ENXIO);
+
+ /* Read current (autosync) clock source from status2 register. */
+ snd_mtxlock(sc->lock);
+ status2 = hdsp_read_4(sc, HDSP_STATUS2_REG);
+ status2 &= HDSP_STATUS2_CLOCK_MASK;
+ snd_mtxunlock(sc->lock);
+
+ /* Translate status2 register value to clock source. */
+ for (clock = clock_table; clock->name != NULL; ++clock) {
+ /* In clock master mode, override with internal clock source. */
+ if (sc->ctrl_register & HDSP_CONTROL_MASTER) {
+ if (clock->type == HDSP_CLOCK_INTERNAL)
+ break;
+ } else if (hdsp_status2_clock_source(clock->type) == status2)
+ break;
+ }
+
+ /* Process sysctl string request. */
+ if (clock->name != NULL)
+ strlcpy(buf, clock->name, sizeof(buf));
+ return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
+}
+
+static int
+hdsp_sysctl_clock_list(SYSCTL_HANDLER_ARGS)
+{
+ struct sc_info *sc;
+ struct hdsp_clock_source *clock_table, *clock;
+ char buf[256];
+ int n;
+
+ sc = oidp->oid_arg1;
+ n = 0;
+
+ /* Select clock source table for device type. */
+ if (sc->type == HDSP_9632)
+ clock_table = hdsp_clock_source_table_9632;
+ else if (sc->type == HDSP_9652)
+ clock_table = hdsp_clock_source_table_9652;
+ else
+ return (ENXIO);
+
+ /* List available clock sources. */
+ buf[0] = 0;
+ for (clock = clock_table; clock->name != NULL; ++clock) {
+ if (n > 0)
+ n += strlcpy(buf + n, ",", sizeof(buf) - n);
+ n += strlcpy(buf + n, clock->name, sizeof(buf) - n);
+ }
+ return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
+}
+
+static bool
+hdsp_clock_source_locked(enum hdsp_clock_type type, uint32_t status,
+ uint32_t status2)
+{
+ switch (type) {
+ case HDSP_CLOCK_INTERNAL:
+ return (true);
+ case HDSP_CLOCK_ADAT1:
+ return ((status >> 3) & 0x01);
+ case HDSP_CLOCK_ADAT2:
+ return ((status >> 2) & 0x01);
+ case HDSP_CLOCK_ADAT3:
+ return ((status >> 1) & 0x01);
+ case HDSP_CLOCK_SPDIF:
+ return (!((status >> 25) & 0x01));
+ case HDSP_CLOCK_WORD:
+ return ((status2 >> 3) & 0x01);
+ case HDSP_CLOCK_ADAT_SYNC:
+ return ((status >> 5) & 0x01);
+ default:
+ return (false);
+ }
+}
+
+static bool
+hdsp_clock_source_synced(enum hdsp_clock_type type, uint32_t status,
+ uint32_t status2)
+{
+ switch (type) {
+ case HDSP_CLOCK_INTERNAL:
+ return (true);
+ case HDSP_CLOCK_ADAT1:
+ return ((status >> 18) & 0x01);
+ case HDSP_CLOCK_ADAT2:
+ return ((status >> 17) & 0x01);
+ case HDSP_CLOCK_ADAT3:
+ return ((status >> 16) & 0x01);
+ case HDSP_CLOCK_SPDIF:
+ return (((status >> 4) & 0x01) && !((status >> 25) & 0x01));
+ case HDSP_CLOCK_WORD:
+ return ((status2 >> 4) & 0x01);
+ case HDSP_CLOCK_ADAT_SYNC:
+ return ((status >> 27) & 0x01);
+ default:
+ return (false);
+ }
+}
+
+static int
+hdsp_sysctl_sync_status(SYSCTL_HANDLER_ARGS)
+{
+ struct sc_info *sc;
+ struct hdsp_clock_source *clock_table, *clock;
+ char buf[256];
+ char *state;
+ int n;
+ uint32_t status, status2;
+
+ sc = oidp->oid_arg1;
+ n = 0;
+
+ /* Select sync ports table for device type. */
+ if (sc->type == HDSP_9632)
+ clock_table = hdsp_clock_source_table_9632;
+ else if (sc->type == HDSP_9652)
+ clock_table = hdsp_clock_source_table_9652;
+ else
+ return (ENXIO);
+
+ /* Read current lock and sync bits from status registers. */
+ snd_mtxlock(sc->lock);
+ status = hdsp_read_4(sc, HDSP_STATUS_REG);
+ status2 = hdsp_read_4(sc, HDSP_STATUS2_REG);
+ snd_mtxunlock(sc->lock);
+
+ /* List clock sources with lock and sync state. */
+ for (clock = clock_table; clock->name != NULL; ++clock) {
+ if (clock->type == HDSP_CLOCK_INTERNAL)
+ continue;
+ if (n > 0)
+ n += strlcpy(buf + n, ",", sizeof(buf) - n);
+ state = "none";
+ if (hdsp_clock_source_locked(clock->type, status, status2)) {
+ if (hdsp_clock_source_synced(clock->type, status,
+ status2))
+ state = "sync";
+ else
+ state = "lock";
+ }
+ n += snprintf(buf + n, sizeof(buf) - n, "%s(%s)",
+ clock->name, state);
+ }
+ return (sysctl_handle_string(oidp, buf, sizeof(buf), req));
+}
+
+static int
+hdsp_probe(device_t dev)
+{
+ uint32_t rev;
+
+ if (pci_get_vendor(dev) == PCI_VENDOR_XILINX &&
+ pci_get_device(dev) == PCI_DEVICE_XILINX_HDSP) {
+ rev = pci_get_revid(dev);
+ switch (rev) {
+ case PCI_REVISION_9632:
+ device_set_desc(dev, "RME HDSP 9632");
+ return (0);
+ case PCI_REVISION_9652:
+ device_set_desc(dev, "RME HDSP 9652");
+ return (0);
+ }
+ }
+
+ return (ENXIO);
+}
+
+static int
+hdsp_init(struct sc_info *sc)
+{
+ unsigned mixer_controls;
+
+ /* Set latency. */
+ sc->period = 256;
+ /*
+ * The pcm channel latency settings propagate unreliable blocksizes,
+ * different for recording and playback, and skewed due to rounding
+ * and total buffer size limits.
+ * Force period to a consistent default until these issues are fixed.
+ */
+ sc->force_period = 256;
+ sc->ctrl_register = hdsp_encode_latency(2);
+
+ /* Set rate. */
+ sc->speed = HDSP_SPEED_DEFAULT;
+ sc->force_speed = 0;
+ sc->ctrl_register &= ~HDSP_FREQ_MASK;
+ sc->ctrl_register |= HDSP_FREQ_MASK_DEFAULT;
+
+ /* Set internal clock source (master). */
+ sc->ctrl_register &= ~HDSP_CONTROL_CLOCK_MASK;
+ sc->ctrl_register |= HDSP_CONTROL_MASTER;
+
+ /* SPDIF from coax in, line out. */
+ sc->ctrl_register &= ~HDSP_CONTROL_SPDIF_COAX;
+ sc->ctrl_register |= HDSP_CONTROL_SPDIF_COAX;
+ sc->ctrl_register &= ~HDSP_CONTROL_LINE_OUT;
+ sc->ctrl_register |= HDSP_CONTROL_LINE_OUT;
+
+ hdsp_write_4(sc, HDSP_CONTROL_REG, sc->ctrl_register);
+
+ if (sc->type == HDSP_9652)
+ hdsp_write_4(sc, HDSP_CONTROL2_REG, HDSP_CONTROL2_9652_MIXER);
+ else
+ hdsp_write_4(sc, HDSP_CONTROL2_REG, 0);
+
+ switch (sc->type) {
+ case HDSP_9632:
+ /* Mixer matrix is 2 source rows (input, playback) per output. */
+ mixer_controls = 2 * HDSP_MIX_SLOTS_9632 * HDSP_MIX_SLOTS_9632;
+ break;
+ case HDSP_9652:
+ /* Mixer matrix is 2 source rows (input, playback) per output. */
+ mixer_controls = 2 * HDSP_MIX_SLOTS_9652 * HDSP_MIX_SLOTS_9652;
+ break;
+ default:
+ return (ENXIO);
+ }
+
+ /* Initialize mixer matrix by silencing all controls. */
+ for (unsigned offset = 0; offset < mixer_controls * 2; offset += 4) {
+ /* Only accepts 4 byte values, pairs of 16 bit volume controls. */
+ hdsp_write_4(sc, HDSP_MIXER_BASE + offset,
+ (HDSP_MIN_GAIN << 16) | HDSP_MIN_GAIN);
+ }
+
+ /* Reset pointer, rewrite frequency (same register) for 9632. */
+ hdsp_write_4(sc, HDSP_RESET_POINTER, 0);
+ if (sc->type == HDSP_9632) {
+ /* Set DDS value. */
+ hdsp_write_4(sc, HDSP_FREQ_REG, hdsp_freq_reg_value(sc->speed));
+ }
+
+ return (0);
+}
+
+static int
+hdsp_attach(device_t dev)
+{
+ struct hdsp_channel *chan_map;
+ struct sc_pcminfo *scp;
+ struct sc_info *sc;
+ uint32_t rev;
+ int i, err;
+
+#if 0
+ device_printf(dev, "hdsp_attach()\n");
+#endif
+
+ sc = device_get_softc(dev);
+ sc->lock = snd_mtxcreate(device_get_nameunit(dev),
+ "snd_hdsp softc");
+ sc->dev = dev;
+
+ pci_enable_busmaster(dev);
+ rev = pci_get_revid(dev);
+ switch (rev) {
+ case PCI_REVISION_9632:
+ sc->type = HDSP_9632;
+ chan_map = hdsp_unified_pcm ? chan_map_9632_uni : chan_map_9632;
+ break;
+ case PCI_REVISION_9652:
+ sc->type = HDSP_9652;
+ chan_map = hdsp_unified_pcm ? chan_map_9652_uni : chan_map_9652;
+ break;
+ default:
+ return (ENXIO);
+ }
+
+ /* Allocate resources. */
+ err = hdsp_alloc_resources(sc);
+ if (err) {
+ device_printf(dev, "Unable to allocate system resources.\n");
+ return (ENXIO);
+ }
+
+ if (hdsp_init(sc) != 0)
+ return (ENXIO);
+
+ for (i = 0; i < HDSP_MAX_CHANS && chan_map[i].descr != NULL; i++) {
+ scp = malloc(sizeof(struct sc_pcminfo), M_DEVBUF, M_NOWAIT | M_ZERO);
+ scp->hc = &chan_map[i];
+ scp->sc = sc;
+ scp->dev = device_add_child(dev, "pcm", -1);
+ device_set_ivars(scp->dev, scp);
+ }
+
+ hdsp_map_dmabuf(sc);
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "sync_status", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ sc, 0, hdsp_sysctl_sync_status, "A",
+ "List clock source signal lock and sync status");
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "clock_source", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ sc, 0, hdsp_sysctl_clock_source, "A",
+ "Currently effective clock source");
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "clock_preference", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ sc, 0, hdsp_sysctl_clock_preference, "A",
+ "Set 'internal' (master) or preferred autosync clock source");
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "clock_list", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ sc, 0, hdsp_sysctl_clock_list, "A",
+ "List of supported clock sources");
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ sc, 0, hdsp_sysctl_period, "A",
+ "Force period of samples per interrupt (32, 64, ... 4096)");
+
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "sample_rate", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ sc, 0, hdsp_sysctl_sample_rate, "A",
+ "Force sample rate (32000, 44100, 48000, ... 192000)");
+
+ return (bus_generic_attach(dev));
+}
+
+static void
+hdsp_dmafree(struct sc_info *sc)
+{
+
+ bus_dmamap_unload(sc->dmat, sc->rmap);
+ bus_dmamap_unload(sc->dmat, sc->pmap);
+ bus_dmamem_free(sc->dmat, sc->rbuf, sc->rmap);
+ bus_dmamem_free(sc->dmat, sc->pbuf, sc->pmap);
+ sc->rbuf = sc->pbuf = NULL;
+}
+
+static int
+hdsp_detach(device_t dev)
+{
+ struct sc_info *sc;
+ int err;
+
+ sc = device_get_softc(dev);
+ if (sc == NULL) {
+ device_printf(dev,"Can't detach: softc is null.\n");
+ return (0);
+ }
+
+ err = device_delete_children(dev);
+ if (err)
+ return (err);
+
+ hdsp_dmafree(sc);
+
+ if (sc->ih)
+ bus_teardown_intr(dev, sc->irq, sc->ih);
+ if (sc->dmat)
+ bus_dma_tag_destroy(sc->dmat);
+ if (sc->irq)
+ bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq);
+ if (sc->cs)
+ bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), sc->cs);
+ if (sc->lock)
+ snd_mtxfree(sc->lock);
+
+ return (0);
+}
+
+static device_method_t hdsp_methods[] = {
+ DEVMETHOD(device_probe, hdsp_probe),
+ DEVMETHOD(device_attach, hdsp_attach),
+ DEVMETHOD(device_detach, hdsp_detach),
+ { 0, 0 }
+};
+
+static driver_t hdsp_driver = {
+ "hdsp",
+ hdsp_methods,
+ PCM_SOFTC_SIZE,
+};
+
+DRIVER_MODULE(snd_hdsp, pci, hdsp_driver, 0, 0);
diff --git a/sys/dev/sound/pci/hdsp.h b/sys/dev/sound/pci/hdsp.h
new file mode 100644
index 000000000000..5ff622892c52
--- /dev/null
+++ b/sys/dev/sound/pci/hdsp.h
@@ -0,0 +1,257 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2012-2016 Ruslan Bukin <br@bsdpad.com>
+ * Copyright (c) 2023-2024 Florian Walpen <dev@submerge.ch>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#define PCI_VENDOR_XILINX 0x10ee
+#define PCI_DEVICE_XILINX_HDSP 0x3fc5 /* HDSP 9652 */
+#define PCI_REVISION_9632 0x9b
+#define PCI_REVISION_9652 0x6c
+
+#define HDSP_9632 0
+#define HDSP_9652 1
+
+/* Hardware mixer */
+#define HDSP_OUT_ENABLE_BASE 128
+#define HDSP_IN_ENABLE_BASE 384
+#define HDSP_MIXER_BASE 4096
+#define HDSP_MAX_GAIN 32768
+#define HDSP_MIN_GAIN 0
+#define HDSP_MIX_SLOTS_9632 16
+#define HDSP_MIX_SLOTS_9652 26
+#define HDSP_CONTROL2_9652_MIXER (1 << 11)
+
+/* Buffer */
+#define HDSP_PAGE_ADDR_BUF_OUT 32
+#define HDSP_PAGE_ADDR_BUF_IN 36
+#define HDSP_BUF_POSITION_MASK 0x000FFC0
+
+/* Frequency */
+#define HDSP_FREQ_0 (1 << 6)
+#define HDSP_FREQ_1 (1 << 7)
+#define HDSP_FREQ_DOUBLE (1 << 8)
+#define HDSP_FREQ_QUAD (1 << 31)
+
+#define HDSP_FREQ_32000 HDSP_FREQ_0
+#define HDSP_FREQ_44100 HDSP_FREQ_1
+#define HDSP_FREQ_48000 (HDSP_FREQ_0 | HDSP_FREQ_1)
+#define HDSP_FREQ_MASK (HDSP_FREQ_0 | HDSP_FREQ_1 | \
+ HDSP_FREQ_DOUBLE | HDSP_FREQ_QUAD)
+#define HDSP_FREQ_MASK_DEFAULT HDSP_FREQ_48000
+#define HDSP_FREQ_REG 0
+#define HDSP_FREQ_9632 104857600000000ULL
+#define hdsp_freq_multiplier(s) (((s) > 96000) ? 4 : \
+ (((s) > 48000) ? 2 : 1))
+#define hdsp_freq_single(s) ((s) / hdsp_freq_multiplier(s))
+#define hdsp_freq_reg_value(s) (HDSP_FREQ_9632 / hdsp_freq_single(s))
+
+#define HDSP_SPEED_DEFAULT 48000
+
+/* Latency */
+#define HDSP_LAT_0 (1 << 1)
+#define HDSP_LAT_1 (1 << 2)
+#define HDSP_LAT_2 (1 << 3)
+#define HDSP_LAT_MASK (HDSP_LAT_0 | HDSP_LAT_1 | HDSP_LAT_2)
+#define HDSP_LAT_BYTES_MAX (4096 * 4)
+#define HDSP_LAT_BYTES_MIN (32 * 4)
+#define hdsp_encode_latency(x) (((x)<<1) & HDSP_LAT_MASK)
+
+/* Gain */
+#define HDSP_ADGain0 (1 << 25)
+#define HDSP_ADGain1 (1 << 26)
+#define HDSP_DAGain0 (1 << 27)
+#define HDSP_DAGain1 (1 << 28)
+#define HDSP_PhoneGain0 (1 << 29)
+#define HDSP_PhoneGain1 (1 << 30)
+
+#define HDSP_ADGainMask (HDSP_ADGain0 | HDSP_ADGain1)
+#define HDSP_ADGainMinus10dBV (HDSP_ADGainMask)
+#define HDSP_ADGainPlus4dBu (HDSP_ADGain0)
+#define HDSP_ADGainLowGain 0
+
+#define HDSP_DAGainMask (HDSP_DAGain0 | HDSP_DAGain1)
+#define HDSP_DAGainHighGain (HDSP_DAGainMask)
+#define HDSP_DAGainPlus4dBu (HDSP_DAGain0)
+#define HDSP_DAGainMinus10dBV 0
+
+#define HDSP_PhoneGainMask (HDSP_PhoneGain0|HDSP_PhoneGain1)
+#define HDSP_PhoneGain0dB HDSP_PhoneGainMask
+#define HDSP_PhoneGainMinus6dB (HDSP_PhoneGain0)
+#define HDSP_PhoneGainMinus12dB 0
+
+/* Settings */
+#define HDSP_RESET_POINTER 0
+#define HDSP_CONTROL_REG 64
+#define HDSP_CONTROL2_REG 256
+#define HDSP_STATUS_REG 0
+#define HDSP_STATUS2_REG 192
+
+#define HDSP_ENABLE (1 << 0)
+#define HDSP_CONTROL_SPDIF_COAX (1 << 14)
+#define HDSP_CONTROL_LINE_OUT (1 << 24)
+
+/* Interrupts */
+#define HDSP_AUDIO_IRQ_PENDING (1 << 0)
+#define HDSP_AUDIO_INT_ENABLE (1 << 5)
+#define HDSP_INTERRUPT_ACK 96
+
+/* Channels */
+#define HDSP_MAX_SLOTS 64 /* Mono channels */
+#define HDSP_MAX_CHANS (HDSP_MAX_SLOTS / 2) /* Stereo pairs */
+
+#define HDSP_CHANBUF_SAMPLES (16 * 1024)
+#define HDSP_CHANBUF_SIZE (4 * HDSP_CHANBUF_SAMPLES)
+#define HDSP_DMASEGSIZE (HDSP_CHANBUF_SIZE * HDSP_MAX_SLOTS)
+
+#define HDSP_CHAN_9632_ADAT (1 << 0)
+#define HDSP_CHAN_9632_SPDIF (1 << 1)
+#define HDSP_CHAN_9632_LINE (1 << 2)
+#define HDSP_CHAN_9632_ALL (HDSP_CHAN_9632_ADAT | \
+ HDSP_CHAN_9632_SPDIF | \
+ HDSP_CHAN_9632_LINE)
+#define HDSP_CHAN_9632_EXT_BOARD (1 << 3)
+
+#define HDSP_CHAN_9652_ADAT1 (1 << 5)
+#define HDSP_CHAN_9652_ADAT2 (1 << 6)
+#define HDSP_CHAN_9652_ADAT3 (1 << 7)
+#define HDSP_CHAN_9652_ADAT_ALL (HDSP_CHAN_9652_ADAT1 | \
+ HDSP_CHAN_9652_ADAT2 | \
+ HDSP_CHAN_9652_ADAT3)
+#define HDSP_CHAN_9652_SPDIF (1 << 8)
+#define HDSP_CHAN_9652_ALL (HDSP_CHAN_9652_ADAT_ALL | \
+ HDSP_CHAN_9652_SPDIF)
+
+struct hdsp_channel {
+ uint32_t ports;
+ char *descr;
+};
+
+enum hdsp_clock_type {
+ HDSP_CLOCK_INTERNAL,
+ HDSP_CLOCK_ADAT1,
+ HDSP_CLOCK_ADAT2,
+ HDSP_CLOCK_ADAT3,
+ HDSP_CLOCK_SPDIF,
+ HDSP_CLOCK_WORD,
+ HDSP_CLOCK_ADAT_SYNC
+};
+
+/* Preferred clock source. */
+#define HDSP_CONTROL_MASTER (1 << 4)
+#define HDSP_CONTROL_CLOCK_MASK (HDSP_CONTROL_MASTER | (1 << 13) | \
+ (1 << 16) | (1 << 17))
+#define HDSP_CONTROL_CLOCK(n) (((n & 0x04) << 11) | ((n & 0x03) << 16))
+
+/* Autosync selected clock source. */
+#define HDSP_STATUS2_CLOCK(n) ((n & 0x07) << 8)
+#define HDSP_STATUS2_CLOCK_MASK HDSP_STATUS2_CLOCK(0x07);
+
+struct hdsp_clock_source {
+ char *name;
+ enum hdsp_clock_type type;
+};
+
+static MALLOC_DEFINE(M_HDSP, "hdsp", "hdsp audio");
+
+/* Channel registers */
+struct sc_chinfo {
+ struct snd_dbuf *buffer;
+ struct pcm_channel *channel;
+ struct sc_pcminfo *parent;
+
+ /* Channel information */
+ struct pcmchan_caps *caps;
+ uint32_t cap_fmts[4];
+ uint32_t dir;
+ uint32_t format;
+ uint32_t ports;
+ uint32_t lvol;
+ uint32_t rvol;
+
+ /* Buffer */
+ uint32_t *data;
+ uint32_t size;
+ uint32_t position;
+
+ /* Flags */
+ uint32_t run;
+};
+
+/* PCM device private data */
+struct sc_pcminfo {
+ device_t dev;
+ uint32_t (*ih) (struct sc_pcminfo *scp);
+ uint32_t chnum;
+ struct sc_chinfo chan[HDSP_MAX_CHANS];
+ struct sc_info *sc;
+ struct hdsp_channel *hc;
+};
+
+/* HDSP device private data */
+struct sc_info {
+ device_t dev;
+ struct mtx *lock;
+
+ uint32_t ctrl_register;
+ uint32_t type;
+
+ /* Control/Status register */
+ struct resource *cs;
+ int csid;
+ bus_space_tag_t cst;
+ bus_space_handle_t csh;
+
+ struct resource *irq;
+ int irqid;
+ void *ih;
+ bus_dma_tag_t dmat;
+
+ /* Play/Record DMA buffers */
+ uint32_t *pbuf;
+ uint32_t *rbuf;
+ uint32_t bufsize;
+ bus_dmamap_t pmap;
+ bus_dmamap_t rmap;
+ uint32_t period;
+ uint32_t speed;
+ uint32_t force_period;
+ uint32_t force_speed;
+};
+
+#define hdsp_read_1(sc, regno) \
+ bus_space_read_1((sc)->cst, (sc)->csh, (regno))
+#define hdsp_read_2(sc, regno) \
+ bus_space_read_2((sc)->cst, (sc)->csh, (regno))
+#define hdsp_read_4(sc, regno) \
+ bus_space_read_4((sc)->cst, (sc)->csh, (regno))
+
+#define hdsp_write_1(sc, regno, data) \
+ bus_space_write_1((sc)->cst, (sc)->csh, (regno), (data))
+#define hdsp_write_2(sc, regno, data) \
+ bus_space_write_2((sc)->cst, (sc)->csh, (regno), (data))
+#define hdsp_write_4(sc, regno, data) \
+ bus_space_write_4((sc)->cst, (sc)->csh, (regno), (data))
diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c
index 0e78be113a66..e7fa03904595 100644
--- a/sys/dev/sound/pci/hdspe-pcm.c
+++ b/sys/dev/sound/pci/hdspe-pcm.c
@@ -34,7 +34,6 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pci/hdspe.h>
-#include <dev/sound/chip.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c
index f9c36df359e3..74a9ca968658 100644
--- a/sys/dev/sound/pci/hdspe.c
+++ b/sys/dev/sound/pci/hdspe.c
@@ -37,7 +37,6 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pci/hdspe.h>
-#include <dev/sound/chip.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index fbde0accfd28..910a371c6653 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -860,12 +860,12 @@ ich_init(struct sc_info *sc)
static int
ich_pci_probe(device_t dev)
{
- int i;
+ size_t i;
uint16_t devid, vendor;
vendor = pci_get_vendor(dev);
devid = pci_get_device(dev);
- for (i = 0; i < sizeof(ich_devs)/sizeof(ich_devs[0]); i++) {
+ for (i = 0; i < nitems(ich_devs); i++) {
if (vendor == ich_devs[i].vendor &&
devid == ich_devs[i].devid) {
device_set_desc(dev, ich_devs[i].name);
diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c
index 6dd54a66f683..4d6dca310eea 100644
--- a/sys/dev/sound/pci/maestro3.c
+++ b/sys/dev/sound/pci/maestro3.c
@@ -488,7 +488,7 @@ m3_pchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel
DMAC_BLOCKF_SELECTOR);
/* set an armload of static initializers */
- for(i = 0 ; i < (sizeof(pv) / sizeof(pv[0])) ; i++) {
+ for(i = 0 ; i < nitems(pv); i++) {
m3_wr_assp_data(sc, ch->dac_data + pv[i].addr, pv[i].val);
}
@@ -862,7 +862,7 @@ m3_rchan_init(kobj_t kobj, void *devinfo, struct snd_dbuf *b, struct pcm_channel
DMAC_PAGE3_SELECTOR + DMAC_BLOCKF_SELECTOR);
/* set an armload of static initializers */
- for(i = 0 ; i < (sizeof(rv) / sizeof(rv[0])) ; i++) {
+ for(i = 0 ; i < nitems(rv); i++) {
m3_wr_assp_data(sc, ch->adc_data + rv[i].addr, rv[i].val);
}
diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c
index bee79e723696..82eabf3a4884 100644
--- a/sys/dev/sound/pci/solo.c
+++ b/sys/dev/sound/pci/solo.c
@@ -35,7 +35,6 @@
#include <dev/pci/pcivar.h>
#include <dev/sound/isa/sb.h>
-#include <dev/sound/chip.h>
#include "mixer_if.h"
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index b4872fdb8037..a18ef1cf4234 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -332,6 +332,8 @@ chn_sleep(struct pcm_channel *c, int timeout)
int ret;
CHN_LOCKASSERT(c);
+ KASSERT((c->flags & CHN_F_SLEEPING) == 0,
+ ("%s(): entered with CHN_F_SLEEPING", __func__));
if (c->flags & CHN_F_DEAD)
return (EINVAL);
@@ -1155,43 +1157,140 @@ chn_reset(struct pcm_channel *c, uint32_t fmt, uint32_t spd)
return r;
}
-int
-chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction)
+struct pcm_channel *
+chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls,
+ int dir, void *devinfo)
{
+ struct pcm_channel *c;
struct feeder_class *fc;
struct snd_dbuf *b, *bs;
- int i, ret;
+ char *dirs, *devname, buf[CHN_NAMELEN];
+ int i, ret, direction, rpnum, *pnum, max, type, unit;
- if (chn_timeout < CHN_TIMEOUT_MIN || chn_timeout > CHN_TIMEOUT_MAX)
- chn_timeout = CHN_TIMEOUT;
+ PCM_BUSYASSERT(d);
+ PCM_LOCKASSERT(d);
- chn_lockinit(c, dir);
+ switch (dir) {
+ case PCMDIR_PLAY:
+ dirs = "play";
+ direction = PCMDIR_PLAY;
+ pnum = &d->playcount;
+ type = SND_DEV_DSPHW_PLAY;
+ max = SND_MAXHWCHAN;
+ break;
+ case PCMDIR_PLAY_VIRTUAL:
+ dirs = "virtual_play";
+ direction = PCMDIR_PLAY;
+ pnum = &d->pvchancount;
+ type = SND_DEV_DSPHW_VPLAY;
+ max = SND_MAXVCHANS;
+ break;
+ case PCMDIR_REC:
+ dirs = "record";
+ direction = PCMDIR_REC;
+ pnum = &d->reccount;
+ type = SND_DEV_DSPHW_REC;
+ max = SND_MAXHWCHAN;
+ break;
+ case PCMDIR_REC_VIRTUAL:
+ dirs = "virtual_record";
+ direction = PCMDIR_REC;
+ pnum = &d->rvchancount;
+ type = SND_DEV_DSPHW_VREC;
+ max = SND_MAXVCHANS;
+ break;
+ default:
+ device_printf(d->dev,
+ "%s(): invalid channel direction: %d\n",
+ __func__, dir);
+ goto out1;
+ }
+
+ unit = 0;
+
+ if (*pnum >= max || unit >= max) {
+ device_printf(d->dev, "%s(): unit=%d or pnum=%d >= than "
+ "max=%d\n", __func__, unit, *pnum, max);
+ goto out1;
+ }
+ rpnum = 0;
+
+ CHN_FOREACH(c, d, channels.pcm) {
+ if (c->type != type)
+ continue;
+ unit++;
+ if (unit >= max) {
+ device_printf(d->dev,
+ "%s(): chan=%d >= max=%d\n", __func__, unit, max);
+ goto out1;
+ }
+ rpnum++;
+ }
+
+ if (*pnum != rpnum) {
+ device_printf(d->dev,
+ "%s(): pnum screwed: dirs=%s pnum=%d rpnum=%d\n",
+ __func__, dirs, *pnum, rpnum);
+ goto out1;
+ }
+
+ PCM_UNLOCK(d);
b = NULL;
bs = NULL;
+ c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK | M_ZERO);
+ c->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO);
+ c->type = type;
+ c->unit = unit;
+ c->pid = -1;
+ strlcpy(c->comm, CHN_COMM_UNUSED, sizeof(c->comm));
+ c->parentsnddev = d;
+ c->parentchannel = parent;
+ c->dev = d->dev;
+ c->trigger = PCMTRIG_STOP;
+ chn_lockinit(c, dir);
+ devname = dsp_unit2name(buf, sizeof(buf), c);
+ if (devname == NULL) {
+ ret = EINVAL;
+ device_printf(d->dev, "%s(): failed to create channel name",
+ __func__);
+ goto out2;
+ }
+ snprintf(c->name, sizeof(c->name), "%s:%s:%s",
+ device_get_nameunit(c->dev), dirs, devname);
+
CHN_INIT(c, children);
CHN_INIT(c, children.busy);
- c->devinfo = NULL;
- c->feeder = NULL;
c->latency = -1;
c->timeout = 1;
ret = ENOMEM;
b = sndbuf_create(c->dev, c->name, "primary", c);
- if (b == NULL)
- goto out;
+ if (b == NULL) {
+ device_printf(d->dev, "%s(): failed to create hardware buffer\n",
+ __func__);
+ goto out2;
+ }
bs = sndbuf_create(c->dev, c->name, "secondary", c);
- if (bs == NULL)
- goto out;
+ if (bs == NULL) {
+ device_printf(d->dev, "%s(): failed to create software buffer\n",
+ __func__);
+ goto out2;
+ }
CHN_LOCK(c);
ret = EINVAL;
fc = feeder_getclass(NULL);
- if (fc == NULL)
- goto out;
- if (chn_addfeeder(c, fc, NULL))
- goto out;
+ if (fc == NULL) {
+ device_printf(d->dev, "%s(): failed to get feeder class\n",
+ __func__);
+ goto out2;
+ }
+ if (chn_addfeeder(c, fc, NULL)) {
+ device_printf(d->dev, "%s(): failed to add feeder\n", __func__);
+ goto out2;
+ }
/*
* XXX - sndbuf_setup() & sndbuf_resize() expect to be called
@@ -1227,12 +1326,17 @@ chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction)
CHN_UNLOCK(c); /* XXX - Unlock for CHANNEL_INIT() malloc() call */
c->devinfo = CHANNEL_INIT(c->methods, devinfo, b, c, direction);
CHN_LOCK(c);
- if (c->devinfo == NULL)
- goto out;
+ if (c->devinfo == NULL) {
+ device_printf(d->dev, "%s(): NULL devinfo\n", __func__);
+ goto out2;
+ }
ret = ENOMEM;
- if ((sndbuf_getsize(b) == 0) && ((c->flags & CHN_F_VIRTUAL) == 0))
- goto out;
+ if ((sndbuf_getsize(b) == 0) && ((c->flags & CHN_F_VIRTUAL) == 0)) {
+ device_printf(d->dev, "%s(): hardware buffer's size is 0\n",
+ __func__);
+ goto out2;
+ }
ret = 0;
c->direction = direction;
@@ -1252,12 +1356,14 @@ chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction)
bs->shadbuf = malloc(bs->sl, M_DEVBUF, M_NOWAIT);
if (bs->shadbuf == NULL) {
ret = ENOMEM;
- goto out;
+ device_printf(d->dev, "%s(): failed to create shadow "
+ "buffer\n", __func__);
+ goto out2;
}
}
-
-out:
- CHN_UNLOCK(c);
+out2:
+ if (CHN_LOCKOWNED(c))
+ CHN_UNLOCK(c);
if (ret) {
if (c->devinfo) {
if (CHANNEL_FREE(c->methods, c->devinfo))
@@ -1271,17 +1377,28 @@ out:
c->flags |= CHN_F_DEAD;
chn_lockdestroy(c);
- return ret;
+ PCM_LOCK(d);
+
+ kobj_delete(c->methods, M_DEVBUF);
+ free(c, M_DEVBUF);
+
+ return (NULL);
}
- return 0;
+ PCM_LOCK(d);
+
+ return (c);
+out1:
+ return (NULL);
}
-int
+void
chn_kill(struct pcm_channel *c)
{
- struct snd_dbuf *b = c->bufhard;
- struct snd_dbuf *bs = c->bufsoft;
+ struct snd_dbuf *b = c->bufhard;
+ struct snd_dbuf *bs = c->bufsoft;
+
+ PCM_BUSYASSERT(c->parentsnddev);
if (CHN_STARTED(c)) {
CHN_LOCK(c);
@@ -1297,11 +1414,48 @@ chn_kill(struct pcm_channel *c)
CHN_LOCK(c);
c->flags |= CHN_F_DEAD;
chn_lockdestroy(c);
+ kobj_delete(c->methods, M_DEVBUF);
+ free(c, M_DEVBUF);
+}
+
+void
+chn_shutdown(struct pcm_channel *c)
+{
+ CHN_LOCKASSERT(c);
+
+ chn_wakeup(c);
+ c->flags |= CHN_F_DEAD;
+}
+
+/* release a locked channel and unlock it */
+int
+chn_release(struct pcm_channel *c)
+{
+ PCM_BUSYASSERT(c->parentsnddev);
+ CHN_LOCKASSERT(c);
+
+ c->flags &= ~CHN_F_BUSY;
+ c->pid = -1;
+ strlcpy(c->comm, CHN_COMM_UNUSED, sizeof(c->comm));
+ CHN_UNLOCK(c);
return (0);
}
int
+chn_ref(struct pcm_channel *c, int ref)
+{
+ PCM_BUSYASSERT(c->parentsnddev);
+ CHN_LOCKASSERT(c);
+ KASSERT((c->refcount + ref) >= 0,
+ ("%s(): new refcount will be negative", __func__));
+
+ c->refcount += ref;
+
+ return (c->refcount);
+}
+
+int
chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right,
int center)
{
diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 21007454584e..445882a62f0a 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -104,6 +104,7 @@ struct pcm_channel {
void *devinfo;
device_t dev;
int unit;
+ int type;
char name[CHN_NAMELEN];
char comm[MAXCOMLEN + 1];
struct mtx *lock;
@@ -224,7 +225,7 @@ struct pcm_channel {
#define CHN_INSERT_SORT(w, x, y, z) do { \
struct pcm_channel *t, *a = NULL; \
CHN_FOREACH(t, x, z) { \
- if ((y)->unit w t->unit) \
+ if ((y)->type w t->type) \
a = t; \
else \
break; \
@@ -235,13 +236,9 @@ struct pcm_channel {
CHN_INSERT_HEAD(x, y, z); \
} while (0)
-#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>, x, y, z)
+#define CHN_INSERT_SORT_ASCEND(x, y, z) CHN_INSERT_SORT(>=, x, y, z)
#define CHN_INSERT_SORT_DESCEND(x, y, z) CHN_INSERT_SORT(<, x, y, z)
-#define CHN_UNIT(x) (snd_unit2u((x)->unit))
-#define CHN_DEV(x) (snd_unit2d((x)->unit))
-#define CHN_CHAN(x) (snd_unit2c((x)->unit))
-
#define CHN_BUF_PARENT(x, y) \
(((x) != NULL && (x)->parentchannel != NULL && \
(x)->parentchannel->bufhard != NULL) ? \
@@ -262,8 +259,12 @@ int chn_sync(struct pcm_channel *c, int threshold);
int chn_flush(struct pcm_channel *c);
int chn_poll(struct pcm_channel *c, int ev, struct thread *td);
-int chn_init(struct pcm_channel *c, void *devinfo, int dir, int direction);
-int chn_kill(struct pcm_channel *c);
+struct pcm_channel *chn_init(struct snddev_info *d, struct pcm_channel *parent,
+ kobj_class_t cls, int dir, void *devinfo);
+void chn_kill(struct pcm_channel *c);
+void chn_shutdown(struct pcm_channel *c);
+int chn_release(struct pcm_channel *c);
+int chn_ref(struct pcm_channel *c, int ref);
int chn_reset(struct pcm_channel *c, u_int32_t fmt, u_int32_t spd);
int chn_setvolume_multi(struct pcm_channel *c, int vc, int left, int right,
int center);
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 1c020ba22611..c737df33b97d 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -181,8 +181,8 @@ getchns(struct dsp_cdevpriv *priv, uint32_t prio)
pcm_setflags(d->dev, flags);
if (ch != NULL) {
CHN_LOCK(ch);
- pcm_chnref(ch, -1);
- pcm_chnrelease(ch);
+ chn_ref(ch, -1);
+ chn_release(ch);
}
PCM_RELEASE(d);
PCM_UNLOCK(d);
@@ -203,13 +203,6 @@ relchns(struct dsp_cdevpriv *priv, uint32_t prio)
CHN_UNLOCK(priv->wrch);
}
-/* duplex / simplex cdev type */
-enum {
- DSP_CDEV_TYPE_RDONLY, /* simplex read-only (record) */
- DSP_CDEV_TYPE_WRONLY, /* simplex write-only (play) */
- DSP_CDEV_TYPE_RDWR /* duplex read, write, or both */
-};
-
#define DSP_F_VALID(x) ((x) & (FREAD | FWRITE))
#define DSP_F_DUPLEX(x) (((x) & (FREAD | FWRITE)) == (FREAD | FWRITE))
#define DSP_F_SIMPLEX(x) (!DSP_F_DUPLEX(x))
@@ -221,48 +214,18 @@ static const struct {
char *name;
char *sep;
char *alias;
- int use_sep;
- int hw;
- int max;
- int volctl;
- uint32_t fmt, spd;
- int query;
} dsp_cdevs[] = {
- { SND_DEV_DSP, "dsp", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_AUDIO, "audio", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_MU_LAW, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP16, "dspW", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_S16_LE, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSPHW_PLAY, "dsp", ".p", NULL, 1, 1, SND_MAXHWCHAN, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_WRONLY },
- { SND_DEV_DSPHW_VPLAY, "dsp", ".vp", NULL, 1, 1, SND_MAXVCHANS, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_WRONLY },
- { SND_DEV_DSPHW_REC, "dsp", ".r", NULL, 1, 1, SND_MAXHWCHAN, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_RDONLY },
- { SND_DEV_DSPHW_VREC, "dsp", ".vr", NULL, 1, 1, SND_MAXVCHANS, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_RDONLY },
- { SND_DEV_DSPHW_CD, "dspcd", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 44100, DSP_CDEV_TYPE_RDWR },
+ { SND_DEV_DSP, "dsp", ".", NULL },
+ { SND_DEV_DSPHW_PLAY, "dsp", ".p", NULL },
+ { SND_DEV_DSPHW_VPLAY, "dsp", ".vp", NULL },
+ { SND_DEV_DSPHW_REC, "dsp", ".r", NULL },
+ { SND_DEV_DSPHW_VREC, "dsp", ".vr", NULL },
/* Low priority, OSSv4 aliases. */
- { SND_DEV_DSP, "dsp_ac3", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_mmap", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_multich", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_spdifout", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_spdifin", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
+ { SND_DEV_DSP, "dsp_ac3", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_mmap", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_multich", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_spdifout", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_spdifin", ".", "dsp" },
};
static void
@@ -301,7 +264,7 @@ dsp_close(void *data)
wdref--;
else {
CHN_LOCK(volch);
- pcm_chnref(volch, -1);
+ chn_ref(volch, -1);
CHN_UNLOCK(volch);
}
}
@@ -332,12 +295,12 @@ dsp_close(void *data)
free_unr(pcmsg_unrhdr, sg_ids);
CHN_LOCK(rdch);
- pcm_chnref(rdch, rdref);
+ chn_ref(rdch, rdref);
chn_abort(rdch); /* won't sleep */
rdch->flags &= ~(CHN_F_RUNNING | CHN_F_MMAP |
CHN_F_DEAD | CHN_F_EXCLUSIVE);
chn_reset(rdch, 0, 0);
- pcm_chnrelease(rdch);
+ chn_release(rdch);
}
if (wrch != NULL) {
/*
@@ -350,12 +313,12 @@ dsp_close(void *data)
free_unr(pcmsg_unrhdr, sg_ids);
CHN_LOCK(wrch);
- pcm_chnref(wrch, wdref);
+ chn_ref(wrch, wdref);
chn_flush(wrch); /* may sleep */
wrch->flags &= ~(CHN_F_RUNNING | CHN_F_MMAP |
CHN_F_DEAD | CHN_F_EXCLUSIVE);
chn_reset(wrch, 0, 0);
- pcm_chnrelease(wrch);
+ chn_release(wrch);
}
PCM_LOCK(d);
}
@@ -444,14 +407,14 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
if (DSP_F_READ(flags)) {
/* open for read */
rderror = pcm_chnalloc(d, &rdch, PCMDIR_REC,
- td->td_proc->p_pid, td->td_proc->p_comm, -1);
+ td->td_proc->p_pid, td->td_proc->p_comm);
if (rderror == 0 && chn_reset(rdch, fmt, spd) != 0)
rderror = ENXIO;
if (rderror != 0) {
if (rdch != NULL)
- pcm_chnrelease(rdch);
+ chn_release(rdch);
if (!DSP_F_DUPLEX(flags)) {
PCM_RELEASE_QUICK(d);
PCM_GIANT_EXIT(d);
@@ -463,7 +426,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
rdch->flags |= CHN_F_NBIO;
if (flags & O_EXCL)
rdch->flags |= CHN_F_EXCLUSIVE;
- pcm_chnref(rdch, 1);
+ chn_ref(rdch, 1);
chn_vpc_reset(rdch, SND_VOL_C_PCM, 0);
CHN_UNLOCK(rdch);
}
@@ -472,14 +435,14 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
if (DSP_F_WRITE(flags)) {
/* open for write */
wrerror = pcm_chnalloc(d, &wrch, PCMDIR_PLAY,
- td->td_proc->p_pid, td->td_proc->p_comm, -1);
+ td->td_proc->p_pid, td->td_proc->p_comm);
if (wrerror == 0 && chn_reset(wrch, fmt, spd) != 0)
wrerror = ENXIO;
if (wrerror != 0) {
if (wrch != NULL)
- pcm_chnrelease(wrch);
+ chn_release(wrch);
if (!DSP_F_DUPLEX(flags)) {
if (rdch != NULL) {
/*
@@ -487,8 +450,8 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
* created record channel
*/
CHN_LOCK(rdch);
- pcm_chnref(rdch, -1);
- pcm_chnrelease(rdch);
+ chn_ref(rdch, -1);
+ chn_release(rdch);
}
PCM_RELEASE_QUICK(d);
PCM_GIANT_EXIT(d);
@@ -500,7 +463,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
wrch->flags |= CHN_F_NBIO;
if (flags & O_EXCL)
wrch->flags |= CHN_F_EXCLUSIVE;
- pcm_chnref(wrch, 1);
+ chn_ref(wrch, 1);
chn_vpc_reset(wrch, SND_VOL_C_PCM, 0);
CHN_UNLOCK(wrch);
}
@@ -630,68 +593,12 @@ dsp_write(struct cdev *i_dev, struct uio *buf, int flag)
}
static int
-dsp_get_volume_channel(struct dsp_cdevpriv *priv, struct pcm_channel **volch)
-{
- struct snddev_info *d;
- struct pcm_channel *c;
- int unit;
-
- KASSERT(volch != NULL,
- ("%s(): NULL query priv=%p volch=%p", __func__, priv, volch));
-
- d = priv->sc;
- if (!PCM_REGISTERED(d)) {
- *volch = NULL;
- return (EINVAL);
- }
-
- PCM_UNLOCKASSERT(d);
-
- *volch = NULL;
-
- c = priv->volch;
- if (c != NULL) {
- if (!(c->feederflags & (1 << FEEDER_VOLUME)))
- return (-1);
- *volch = c;
- return (0);
- }
-
- PCM_LOCK(d);
- PCM_WAIT(d);
- PCM_ACQUIRE(d);
-
- unit = dev2unit(d->dsp_dev);
-
- CHN_FOREACH(c, d, channels.pcm) {
- CHN_LOCK(c);
- if (c->unit != unit) {
- CHN_UNLOCK(c);
- continue;
- }
- *volch = c;
- pcm_chnref(c, 1);
- priv->volch = c;
- CHN_UNLOCK(c);
- PCM_RELEASE(d);
- PCM_UNLOCK(d);
- return ((c->feederflags & (1 << FEEDER_VOLUME)) ? 0 : -1);
- }
-
- PCM_RELEASE(d);
- PCM_UNLOCK(d);
-
- return (EINVAL);
-}
-
-static int
dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *volch,
u_long cmd, caddr_t arg)
{
struct snddev_info *d;
struct pcm_channel *rdch, *wrch;
- int j, devtype, ret;
- int left, right, center, mute;
+ int j, left, right, center, mute;
d = priv->sc;
if (!PCM_REGISTERED(d) || !(pcm_getflags(d->dev) & SD_F_VPC))
@@ -716,19 +623,6 @@ dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *volch,
volch = wrch;
}
- devtype = PCMDEV(d->dsp_dev);
-
- /* Look super harder */
- if (volch == NULL &&
- (devtype == SND_DEV_DSPHW_PLAY || devtype == SND_DEV_DSPHW_VPLAY ||
- devtype == SND_DEV_DSPHW_REC || devtype == SND_DEV_DSPHW_VREC)) {
- ret = dsp_get_volume_channel(priv, &volch);
- if (ret != 0)
- return (ret);
- if (volch == NULL)
- return (EINVAL);
- }
-
/* Final validation */
if (volch == NULL)
return (EINVAL);
@@ -884,9 +778,15 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
ret = sound_oss_card_info((oss_card_info *)arg);
break;
case SNDCTL_AUDIOINFO:
+ ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg,
+ false);
+ break;
case SNDCTL_AUDIOINFO_EX:
+ ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg,
+ true);
+ break;
case SNDCTL_ENGINEINFO:
- ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg);
+ ret = dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg);
break;
case SNDCTL_MIXERINFO:
ret = mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg);
@@ -2072,7 +1972,7 @@ dsp_clone(void *arg, struct ucred *cred, char *name, int namelen,
struct cdev **dev)
{
struct snddev_info *d;
- int i;
+ size_t i;
if (*dev != NULL)
return;
@@ -2085,11 +1985,19 @@ dsp_clone(void *arg, struct ucred *cred, char *name, int namelen,
}
return;
found:
+ bus_topo_lock();
d = devclass_get_softc(pcm_devclass, snd_unit);
- if (!PCM_REGISTERED(d))
- return;
- *dev = d->dsp_dev;
- dev_ref(*dev);
+ /*
+ * If we only have a single soundcard attached and we detach it right
+ * before entering dsp_clone(), there is a chance pcm_unregister() will
+ * have returned already, meaning it will have set snd_unit to -1, and
+ * thus devclass_get_softc() will return NULL here.
+ */
+ if (d != NULL && PCM_REGISTERED(d) && d->dsp_dev != NULL) {
+ *dev = d->dsp_dev;
+ dev_ref(*dev);
+ }
+ bus_topo_unlock();
}
static void
@@ -2097,8 +2005,6 @@ dsp_sysinit(void *p)
{
if (dsp_ehtag != NULL)
return;
- /* initialize unit numbering */
- snd_unit_init();
dsp_ehtag = EVENTHANDLER_REGISTER(dev_clone, dsp_clone, 0, 1000);
}
@@ -2115,28 +2021,190 @@ SYSINIT(dsp_sysinit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, dsp_sysinit, NULL);
SYSUNINIT(dsp_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, dsp_sysuninit, NULL);
char *
-dsp_unit2name(char *buf, size_t len, int unit)
+dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch)
{
- int i, dtype;
+ size_t i;
KASSERT(buf != NULL && len != 0,
("bogus buf=%p len=%ju", buf, (uintmax_t)len));
- dtype = snd_unit2d(unit);
-
for (i = 0; i < nitems(dsp_cdevs); i++) {
- if (dtype != dsp_cdevs[i].type || dsp_cdevs[i].alias != NULL)
+ if (ch->type != dsp_cdevs[i].type || dsp_cdevs[i].alias != NULL)
continue;
- snprintf(buf, len, "%s%d%s%d", dsp_cdevs[i].name,
- snd_unit2u(unit), dsp_cdevs[i].sep, snd_unit2c(unit));
+ snprintf(buf, len, "%s%d%s%d",
+ dsp_cdevs[i].name, device_get_unit(ch->dev),
+ dsp_cdevs[i].sep, ch->unit);
return (buf);
}
return (NULL);
}
+static void
+dsp_oss_audioinfo_unavail(oss_audioinfo *ai, int unit)
+{
+ bzero(ai, sizeof(*ai));
+ ai->dev = unit;
+ snprintf(ai->name, sizeof(ai->name), "pcm%d (unavailable)", unit);
+ ai->pid = -1;
+ ai->card_number = unit;
+ ai->port_number = unit;
+ ai->mixer_dev = -1;
+ ai->legacy_device = unit;
+}
+
+/**
+ * @brief Handler for SNDCTL_AUDIOINFO.
+ *
+ * Gathers information about the audio device specified in ai->dev. If
+ * ai->dev == -1, then this function gathers information about the current
+ * device. If the call comes in on a non-audio device and ai->dev == -1,
+ * return EINVAL.
+ *
+ * This routine is supposed to go practically straight to the hardware,
+ * getting capabilities directly from the sound card driver, side-stepping
+ * the intermediate channel interface.
+ *
+ * @note
+ * Calling threads must not hold any snddev_info or pcm_channel locks.
+ *
+ * @param dev device on which the ioctl was issued
+ * @param ai ioctl request data container
+ * @param ex flag to distinguish between SNDCTL_AUDIOINFO from
+ * SNDCTL_AUDIOINFO_EX
+ *
+ * @retval 0 success
+ * @retval EINVAL ai->dev specifies an invalid device
+ */
+int
+dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex)
+{
+ struct pcmchan_caps *caps;
+ struct pcm_channel *ch;
+ struct snddev_info *d;
+ uint32_t fmts;
+ int i, minch, maxch, unit;
+
+ /*
+ * If probing the device that received the ioctl, make sure it's a
+ * DSP device. (Users may use this ioctl with /dev/mixer and
+ * /dev/midi.)
+ */
+ if (ai->dev == -1 && i_dev->si_devsw != &dsp_cdevsw)
+ return (EINVAL);
+
+ for (unit = 0; pcm_devclass != NULL &&
+ unit < devclass_get_maxunit(pcm_devclass); unit++) {
+ d = devclass_get_softc(pcm_devclass, unit);
+ if (!PCM_REGISTERED(d)) {
+ if ((ai->dev == -1 && unit == snd_unit) ||
+ ai->dev == unit) {
+ dsp_oss_audioinfo_unavail(ai, unit);
+ return (0);
+ } else {
+ d = NULL;
+ continue;
+ }
+ }
+
+ PCM_UNLOCKASSERT(d);
+ PCM_LOCK(d);
+ if ((ai->dev == -1 && d->dsp_dev == i_dev) ||
+ (ai->dev == unit)) {
+ PCM_UNLOCK(d);
+ break;
+ } else {
+ PCM_UNLOCK(d);
+ d = NULL;
+ }
+ }
+
+ /* Exhausted the search -- nothing is locked, so return. */
+ if (d == NULL)
+ return (EINVAL);
+
+ /* XXX Need Giant magic entry ??? */
+
+ PCM_UNLOCKASSERT(d);
+ PCM_LOCK(d);
+
+ bzero((void *)ai, sizeof(oss_audioinfo));
+ ai->dev = unit;
+ strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name));
+ ai->pid = -1;
+ ai->card_number = -1;
+ ai->port_number = -1;
+ ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1;
+ ai->legacy_device = unit;
+ snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit);
+ ai->enabled = device_is_attached(d->dev) ? 1 : 0;
+ ai->next_play_engine = 0;
+ ai->next_rec_engine = 0;
+ ai->busy = 0;
+ ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER;
+ ai->iformats = 0;
+ ai->oformats = 0;
+ ai->min_rate = INT_MAX;
+ ai->max_rate = 0;
+ ai->min_channels = INT_MAX;
+ ai->max_channels = 0;
+
+ /* Gather global information about the device. */
+ CHN_FOREACH(ch, d, channels.pcm) {
+ CHN_UNLOCKASSERT(ch);
+ CHN_LOCK(ch);
+
+ /*
+ * Skip physical channels if we are servicing SNDCTL_AUDIOINFO,
+ * or VCHANs if we are servicing SNDCTL_AUDIOINFO_EX.
+ */
+ if ((ex && (ch->flags & CHN_F_VIRTUAL) != 0) ||
+ (!ex && (ch->flags & CHN_F_VIRTUAL) == 0)) {
+ CHN_UNLOCK(ch);
+ continue;
+ }
+
+ if ((ch->flags & CHN_F_BUSY) == 0) {
+ ai->busy |= (ch->direction == PCMDIR_PLAY) ?
+ OPEN_WRITE : OPEN_READ;
+ }
+
+ ai->caps |=
+ ((ch->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) |
+ ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT :
+ PCM_CAP_INPUT);
+
+ caps = chn_getcaps(ch);
+
+ minch = INT_MAX;
+ maxch = 0;
+ fmts = 0;
+ for (i = 0; caps->fmtlist[i]; i++) {
+ fmts |= AFMT_ENCODING(caps->fmtlist[i]);
+ minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch);
+ maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch);
+ }
+
+ if (ch->direction == PCMDIR_PLAY)
+ ai->oformats |= fmts;
+ else
+ ai->iformats |= fmts;
+
+ ai->min_rate = min(ai->min_rate, caps->minspeed);
+ ai->max_rate = max(ai->max_rate, caps->maxspeed);
+ ai->min_channels = min(ai->min_channels, minch);
+ ai->max_channels = max(ai->max_channels, maxch);
+
+ CHN_UNLOCK(ch);
+ }
+
+ PCM_UNLOCK(d);
+
+ return (0);
+}
+
static int
-dsp_oss_audioinfo_cb(void *data, void *arg)
+dsp_oss_engineinfo_cb(void *data, void *arg)
{
struct dsp_cdevpriv *priv = data;
struct pcm_channel *ch = arg;
@@ -2148,10 +2216,10 @@ dsp_oss_audioinfo_cb(void *data, void *arg)
}
/**
- * @brief Handler for SNDCTL_AUDIOINFO.
+ * @brief Handler for SNDCTL_ENGINEINFO
*
- * Gathers information about the audio device specified in ai->dev. If
- * ai->dev == -1, then this function gathers information about the current
+ * Gathers information about the audio device's engine specified in ai->dev.
+ * If ai->dev == -1, then this function gathers information about the current
* device. If the call comes in on a non-audio device and ai->dev == -1,
* return EINVAL.
*
@@ -2167,11 +2235,9 @@ dsp_oss_audioinfo_cb(void *data, void *arg)
*
* @retval 0 success
* @retval EINVAL ai->dev specifies an invalid device
- *
- * @todo Verify correctness of Doxygen tags. ;)
*/
int
-dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai)
+dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai)
{
struct pcmchan_caps *caps;
struct pcm_channel *ch;
@@ -2214,14 +2280,12 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai)
CHN_LOCK(ch);
if (ai->dev == -1) {
if (devfs_foreach_cdevpriv(i_dev,
- dsp_oss_audioinfo_cb, ch) != 0) {
+ dsp_oss_engineinfo_cb, ch) != 0) {
devname = dsp_unit2name(buf,
- sizeof(buf), ch->unit);
+ sizeof(buf), ch);
}
- } else if (ai->dev == nchan) {
- devname = dsp_unit2name(buf, sizeof(buf),
- ch->unit);
- }
+ } else if (ai->dev == nchan)
+ devname = dsp_unit2name(buf, sizeof(buf), ch);
if (devname != NULL)
break;
CHN_UNLOCK(ch);
@@ -2285,18 +2349,13 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai)
* if any channel is mono, minch = 1;
* and if all channels are mono, maxch = 1.
*/
- minch = 0;
+ minch = INT_MAX;
maxch = 0;
fmts = 0;
for (i = 0; caps->fmtlist[i]; i++) {
- fmts |= caps->fmtlist[i];
- if (AFMT_CHANNEL(caps->fmtlist[i]) > 1) {
- minch = (minch == 0) ? 2 : minch;
- maxch = 2;
- } else {
- minch = 1;
- maxch = (maxch == 0) ? 1 : maxch;
- }
+ fmts |= AFMT_ENCODING(caps->fmtlist[i]);
+ minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch);
+ maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch);
}
if (ch->direction == PCMDIR_PLAY)
@@ -2327,9 +2386,9 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai)
ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1;
/**
* @note
- * @c real_device - OSSv4 docs: "Obsolete."
+ * @c legacy_device - OSSv4 docs: "Obsolete."
*/
- ai->real_device = -1;
+ ai->legacy_device = -1;
snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit);
ai->enabled = device_is_attached(d->dev) ? 1 : 0;
/**
diff --git a/sys/dev/sound/pcm/dsp.h b/sys/dev/sound/pcm/dsp.h
index 6098c0641eb5..7559e855d4e1 100644
--- a/sys/dev/sound/pcm/dsp.h
+++ b/sys/dev/sound/pcm/dsp.h
@@ -35,7 +35,8 @@ extern struct cdevsw dsp_cdevsw;
int dsp_make_dev(device_t);
void dsp_destroy_dev(device_t);
-char *dsp_unit2name(char *, size_t, int);
-int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *);
+char *dsp_unit2name(char *, size_t, struct pcm_channel *);
+int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *, bool);
+int dsp_oss_engineinfo(struct cdev *, oss_audioinfo *);
#endif /* !_PCMDSP_H_ */
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 8278a85948a8..0113299bd0d4 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -32,6 +32,7 @@
#endif
#include <dev/sound/pcm/sound.h>
+#include <dev/sound/pcm/vchan.h>
#include "feeder_if.h"
@@ -82,9 +83,7 @@ feeder_register(void *p)
if (snd_verbose < 0 || snd_verbose > 4)
snd_verbose = 1;
- /* initialize unit numbering */
- snd_unit_init();
- if (snd_unit < 0 || snd_unit > PCMMAXUNIT)
+ if (snd_unit < 0)
snd_unit = -1;
if (snd_maxautovchans < 0 ||
diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c
index 1e18e3e07450..3bdd808df0ee 100644
--- a/sys/dev/sound/pcm/feeder_format.c
+++ b/sys/dev/sound/pcm/feeder_format.c
@@ -115,16 +115,13 @@ static const struct {
}
};
-#define FEEDFORMAT_TAB_SIZE \
- ((int32_t)(sizeof(feed_format_ops) / sizeof(feed_format_ops[0])))
-
static int
feed_format_init(struct pcm_feeder *f)
{
struct feed_format_info *info;
intpcm_read_t *rd_op;
intpcm_write_t *wr_op;
- int i;
+ size_t i;
if (f->desc->in == f->desc->out ||
AFMT_CHANNEL(f->desc->in) != AFMT_CHANNEL(f->desc->out))
@@ -133,7 +130,7 @@ feed_format_init(struct pcm_feeder *f)
rd_op = NULL;
wr_op = NULL;
- for (i = 0; i < FEEDFORMAT_TAB_SIZE &&
+ for (i = 0; i < nitems(feed_format_ops) &&
(rd_op == NULL || wr_op == NULL); i++) {
if (rd_op == NULL &&
AFMT_ENCODING(f->desc->in) == feed_format_ops[i].format)
@@ -276,9 +273,9 @@ FEEDER_DECLARE(feeder_format, NULL);
intpcm_read_t *
feeder_format_read_op(uint32_t format)
{
- int i;
+ size_t i;
- for (i = 0; i < FEEDFORMAT_TAB_SIZE; i++) {
+ for (i = 0; i < nitems(feed_format_ops); i++) {
if (AFMT_ENCODING(format) == feed_format_ops[i].format)
return (feed_format_ops[i].read);
}
@@ -289,9 +286,9 @@ feeder_format_read_op(uint32_t format)
intpcm_write_t *
feeder_format_write_op(uint32_t format)
{
- int i;
+ size_t i;
- for (i = 0; i < FEEDFORMAT_TAB_SIZE; i++) {
+ for (i = 0; i < nitems(feed_format_ops); i++) {
if (AFMT_ENCODING(format) == feed_format_ops[i].format)
return (feed_format_ops[i].write);
}
diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c
index f5f02e2bf4f5..97cf86585636 100644
--- a/sys/dev/sound/pcm/feeder_matrix.c
+++ b/sys/dev/sound/pcm/feeder_matrix.c
@@ -230,7 +230,7 @@ feed_matrix_reset(struct feed_matrix_info *info)
{
uint32_t i, j;
- for (i = 0; i < (sizeof(info->matrix) / sizeof(info->matrix[0])); i++) {
+ for (i = 0; i < nitems(info->matrix); i++) {
for (j = 0;
j < (sizeof(info->matrix[i].chn) /
sizeof(info->matrix[i].chn[0])); j++) {
@@ -679,7 +679,7 @@ feeder_matrix_compare(struct pcmchan_matrix *m_in, struct pcmchan_matrix *m_out)
m_in->mask != m_out->mask)
return (1);
- for (i = 0; i < (sizeof(m_in->map) / sizeof(m_in->map[0])); i++) {
+ for (i = 0; i < nitems(m_in->map); i++) {
if (m_in->map[i].type != m_out->map[i].type)
return (1);
if (m_in->map[i].type == SND_CHN_T_MAX)
diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c
index 452d8788a5a5..7e600c131afe 100644
--- a/sys/dev/sound/pcm/feeder_volume.c
+++ b/sys/dev/sound/pcm/feeder_volume.c
@@ -337,7 +337,7 @@ feeder_volume_apply_matrix(struct pcm_feeder *f, struct pcmchan_matrix *m)
info = f->data;
- for (i = 0; i < (sizeof(info->matrix) / sizeof(info->matrix[0])); i++) {
+ for (i = 0; i < nitems(info->matrix); i++) {
if (i < m->channels)
info->matrix[i] = m->map[i].type;
else
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 0178e1ae8c3e..0cf6a9f42f8f 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -105,11 +105,6 @@ static struct cdevsw mixer_cdevsw = {
.d_name = "mixer",
};
-/**
- * Keeps a count of mixer devices; used only by OSSv4 SNDCTL_SYSINFO ioctl.
- */
-int mixer_count = 0;
-
static eventhandler_tag mixer_ehtag = NULL;
static struct cdev *
@@ -650,7 +645,7 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo,
int type, const char *desc)
{
struct snd_mixer *m;
- int i;
+ size_t i;
KASSERT(dev != NULL && cls != NULL && devinfo != NULL,
("%s(): NULL data dev=%p cls=%p devinfo=%p",
@@ -671,7 +666,7 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo,
m->devinfo = devinfo;
m->busy = 0;
m->dev = dev;
- for (i = 0; i < (sizeof(m->parent) / sizeof(m->parent[0])); i++) {
+ for (i = 0; i < nitems(m->parent); i++) {
m->parent[i] = SOUND_MIXER_NONE;
m->child[i] = 0;
m->realdev[i] = i;
@@ -701,22 +696,13 @@ mixer_delete(struct snd_mixer *m)
snd_mtxfree(m->lock);
kobj_delete((kobj_t)m, M_MIXER);
- --mixer_count;
-
return (0);
}
struct snd_mixer *
mixer_create(device_t dev, kobj_class_t cls, void *devinfo, const char *desc)
{
- struct snd_mixer *m;
-
- m = mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_SECONDARY, desc);
-
- if (m != NULL)
- ++mixer_count;
-
- return (m);
+ return (mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_SECONDARY, desc));
}
int
@@ -727,7 +713,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
u_int16_t v;
struct cdev *pdev;
const char *name;
- int i, unit, devunit, val;
+ int i, unit, val;
snddev = device_get_softc(dev);
if (snddev == NULL)
@@ -764,14 +750,11 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
mixer_setrecsrc(m, 0); /* Set default input. */
- devunit = snd_mkunit(unit, SND_DEV_CTL, 0);
- pdev = make_dev(&mixer_cdevsw, devunit, UID_ROOT, GID_WHEEL, 0666,
+ pdev = make_dev(&mixer_cdevsw, SND_DEV_CTL, UID_ROOT, GID_WHEEL, 0666,
"mixer%d", unit);
pdev->si_drv1 = m;
snddev->mixer_dev = pdev;
- ++mixer_count;
-
if (bootverbose) {
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
if (!(m->devs & (1 << i)))
@@ -840,8 +823,6 @@ mixer_uninit(device_t dev)
d->mixer_dev = NULL;
- --mixer_count;
-
return 0;
}
@@ -1283,9 +1264,13 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
case SNDCTL_CARDINFO:
return (sound_oss_card_info((oss_card_info *)arg));
case SNDCTL_AUDIOINFO:
+ return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg,
+ false));
case SNDCTL_AUDIOINFO_EX:
- case SNDCTL_ENGINEINFO:
- return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg));
+ return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg,
+ true));
+ case SNDCTL_ENGINEINFO:
+ return (dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg));
case SNDCTL_MIXERINFO:
return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg));
}
@@ -1377,11 +1362,14 @@ mixer_clone(void *arg,
if (*dev != NULL)
return;
if (strcmp(name, "mixer") == 0) {
+ bus_topo_lock();
d = devclass_get_softc(pcm_devclass, snd_unit);
- if (PCM_REGISTERED(d) && d->mixer_dev != NULL) {
+ /* See related comment in dsp_clone(). */
+ if (d != NULL && PCM_REGISTERED(d) && d->mixer_dev != NULL) {
*dev = d->mixer_dev;
dev_ref(*dev);
}
+ bus_topo_unlock();
}
}
@@ -1405,6 +1393,17 @@ mixer_sysuninit(void *p)
SYSINIT(mixer_sysinit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysinit, NULL);
SYSUNINIT(mixer_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysuninit, NULL);
+static void
+mixer_oss_mixerinfo_unavail(oss_mixerinfo *mi, int unit)
+{
+ bzero(mi, sizeof(*mi));
+ mi->dev = unit;
+ snprintf(mi->id, sizeof(mi->id), "mixer%d (n/a)", unit);
+ snprintf(mi->name, sizeof(mi->name), "pcm%d:mixer (unavailable)", unit);
+ mi->card_number = unit;
+ mi->legacy_device = unit;
+}
+
/**
* @brief Handler for SNDCTL_MIXERINFO
*
@@ -1429,7 +1428,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi)
{
struct snddev_info *d;
struct snd_mixer *m;
- int nmix, i;
+ int i;
/*
* If probing the device handling the ioctl, make sure it's a mixer
@@ -1440,7 +1439,6 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi)
d = NULL;
m = NULL;
- nmix = 0;
/*
* There's a 1:1 relationship between mixers and PCM devices, so
@@ -1449,8 +1447,13 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi)
for (i = 0; pcm_devclass != NULL &&
i < devclass_get_maxunit(pcm_devclass); i++) {
d = devclass_get_softc(pcm_devclass, i);
- if (!PCM_REGISTERED(d) || PCM_DETACHING(d))
- continue;
+ if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) {
+ if ((mi->dev == -1 && i == snd_unit) || mi->dev == i) {
+ mixer_oss_mixerinfo_unavail(mi, i);
+ return (0);
+ } else
+ continue;
+ }
/* XXX Need Giant magic entry */
@@ -1458,91 +1461,96 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi)
PCM_UNLOCKASSERT(d);
PCM_LOCK(d);
- if (d->mixer_dev != NULL && d->mixer_dev->si_drv1 != NULL &&
- ((mi->dev == -1 && d->mixer_dev == i_dev) ||
- mi->dev == nmix)) {
- m = d->mixer_dev->si_drv1;
- mtx_lock(m->lock);
-
- /*
- * At this point, the following synchronization stuff
- * has happened:
- * - a specific PCM device is locked.
- * - a specific mixer device has been locked, so be
- * sure to unlock when existing.
- */
- bzero((void *)mi, sizeof(*mi));
- mi->dev = nmix;
- snprintf(mi->id, sizeof(mi->id), "mixer%d", i);
- strlcpy(mi->name, m->name, sizeof(mi->name));
- mi->modify_counter = m->modify_counter;
- mi->card_number = i;
- /*
- * Currently, FreeBSD assumes 1:1 relationship between
- * a pcm and mixer devices, so this is hardcoded to 0.
- */
- mi->port_number = 0;
-
- /**
- * @todo Fill in @sa oss_mixerinfo::mixerhandle.
- * @note From 4Front: "mixerhandle is an arbitrary
- * string that identifies the mixer better than
- * the device number (mixerinfo.dev). Device
- * numbers may change depending on the order the
- * drivers are loaded. However the handle should
- * remain the same provided that the sound card
- * is not moved to another PCI slot."
- */
+ if (!((d->mixer_dev == i_dev && mi->dev == -1) ||
+ mi->dev == i)) {
+ PCM_UNLOCK(d);
+ continue;
+ }
- /**
- * @note
- * @sa oss_mixerinfo::magic is a reserved field.
- *
- * @par
- * From 4Front: "magic is usually 0. However some
- * devices may have dedicated setup utilities and the
- * magic field may contain an unique driver specific
- * value (managed by [4Front])."
- */
+ if (d->mixer_dev->si_drv1 == NULL) {
+ mixer_oss_mixerinfo_unavail(mi, i);
+ PCM_UNLOCK(d);
+ return (0);
+ }
- mi->enabled = device_is_attached(m->dev) ? 1 : 0;
- /**
- * The only flag for @sa oss_mixerinfo::caps is
- * currently MIXER_CAP_VIRTUAL, which I'm not sure we
- * really worry about.
- */
- /**
- * Mixer extensions currently aren't supported, so
- * leave @sa oss_mixerinfo::nrext blank for now.
- */
- /**
- * @todo Fill in @sa oss_mixerinfo::priority (requires
- * touching drivers?)
- * @note The priority field is for mixer applets to
- * determine which mixer should be the default, with 0
- * being least preferred and 10 being most preferred.
- * From 4Front: "OSS drivers like ICH use higher
- * values (10) because such chips are known to be used
- * only on motherboards. Drivers for high end pro
- * devices use 0 because they will never be the
- * default mixer. Other devices use values 1 to 9
- * depending on the estimated probability of being the
- * default device.
- *
- * XXX Described by Hannu@4Front, but not found in
- * soundcard.h.
- strlcpy(mi->devnode, devtoname(d->mixer_dev),
- sizeof(mi->devnode));
- mi->legacy_device = i;
- */
- mtx_unlock(m->lock);
- } else
- ++nmix;
+ m = d->mixer_dev->si_drv1;
+ mtx_lock(m->lock);
+
+ /*
+ * At this point, the following synchronization stuff
+ * has happened:
+ * - a specific PCM device is locked.
+ * - a specific mixer device has been locked, so be
+ * sure to unlock when existing.
+ */
+ bzero((void *)mi, sizeof(*mi));
+ mi->dev = i;
+ snprintf(mi->id, sizeof(mi->id), "mixer%d", i);
+ strlcpy(mi->name, m->name, sizeof(mi->name));
+ mi->modify_counter = m->modify_counter;
+ mi->card_number = i;
+ /*
+ * Currently, FreeBSD assumes 1:1 relationship between
+ * a pcm and mixer devices, so this is hardcoded to 0.
+ */
+ mi->port_number = 0;
+
+ /**
+ * @todo Fill in @sa oss_mixerinfo::mixerhandle.
+ * @note From 4Front: "mixerhandle is an arbitrary
+ * string that identifies the mixer better than
+ * the device number (mixerinfo.dev). Device
+ * numbers may change depending on the order the
+ * drivers are loaded. However the handle should
+ * remain the same provided that the sound card
+ * is not moved to another PCI slot."
+ */
+
+ /**
+ * @note
+ * @sa oss_mixerinfo::magic is a reserved field.
+ *
+ * @par
+ * From 4Front: "magic is usually 0. However some
+ * devices may have dedicated setup utilities and the
+ * magic field may contain an unique driver specific
+ * value (managed by [4Front])."
+ */
+
+ mi->enabled = device_is_attached(m->dev) ? 1 : 0;
+ /**
+ * The only flag for @sa oss_mixerinfo::caps is
+ * currently MIXER_CAP_VIRTUAL, which I'm not sure we
+ * really worry about.
+ */
+ /**
+ * Mixer extensions currently aren't supported, so
+ * leave @sa oss_mixerinfo::nrext blank for now.
+ */
+
+ /**
+ * @todo Fill in @sa oss_mixerinfo::priority (requires
+ * touching drivers?)
+ * @note The priority field is for mixer applets to
+ * determine which mixer should be the default, with 0
+ * being least preferred and 10 being most preferred.
+ * From 4Front: "OSS drivers like ICH use higher
+ * values (10) because such chips are known to be used
+ * only on motherboards. Drivers for high end pro
+ * devices use 0 because they will never be the
+ * default mixer. Other devices use values 1 to 9
+ * depending on the estimated probability of being the
+ * default device.
+ */
+
+ snprintf(mi->devnode, sizeof(mi->devnode), "/dev/mixer%d", i);
+ mi->legacy_device = i;
+
+ mtx_unlock(m->lock);
PCM_UNLOCK(d);
- if (m != NULL)
- return (0);
+ return (0);
}
return (EINVAL);
diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h
index 6c5c8f3ec3fe..7139a766b392 100644
--- a/sys/dev/sound/pcm/mixer.h
+++ b/sys/dev/sound/pcm/mixer.h
@@ -69,8 +69,6 @@ u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev);
void *mix_getdevinfo(struct snd_mixer *m);
struct mtx *mixer_get_lock(struct snd_mixer *m);
-extern int mixer_count;
-
#define MIXER_CMD_DIRECT 0 /* send command within driver */
#define MIXER_CMD_CDEV 1 /* send command from cdev/ioctl */
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index ef006a580d40..6670a1e43aac 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -45,13 +45,9 @@
#include <sys/nv.h>
#include <sys/dnv.h>
#include <sys/sx.h>
-#ifdef COMPAT_FREEBSD32
-#include <sys/sysent.h>
-#endif
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/pcm.h>
-#include <dev/sound/version.h>
#include "feeder_if.h"
@@ -331,7 +327,6 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate,
uint32_t *max_rate, uint32_t *fmts, uint32_t *minchn, uint32_t *maxchn)
{
struct pcm_channel *c;
- unsigned int encoding;
int dir;
dir = play ? PCMDIR_PLAY : PCMDIR_REC;
@@ -348,11 +343,11 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate,
return;
}
+ *fmts = 0;
*min_rate = UINT32_MAX;
*max_rate = 0;
*minchn = UINT32_MAX;
*maxchn = 0;
- encoding = 0;
CHN_FOREACH(c, d, channels.pcm) {
struct pcmchan_caps *caps;
int i;
@@ -365,9 +360,9 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate,
*min_rate = min(caps->minspeed, *min_rate);
*max_rate = max(caps->maxspeed, *max_rate);
for (i = 0; caps->fmtlist[i]; i++) {
- encoding |= AFMT_ENCODING(caps->fmtlist[i]);
- *minchn = min(AFMT_CHANNEL(encoding), *minchn);
- *maxchn = max(AFMT_CHANNEL(encoding), *maxchn);
+ *fmts |= AFMT_ENCODING(caps->fmtlist[i]);
+ *minchn = min(AFMT_CHANNEL(caps->fmtlist[i]), *minchn);
+ *maxchn = max(AFMT_CHANNEL(caps->fmtlist[i]), *maxchn);
}
CHN_UNLOCK(c);
}
@@ -624,10 +619,9 @@ sndstat_refresh_devs(struct sndstat_file *pf)
}
static int
-sndstat_get_devs(struct sndstat_file *pf, caddr_t data)
+sndstat_get_devs(struct sndstat_file *pf, void *arg_buf, size_t *arg_nbytes)
{
int err;
- struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data;
SNDSTAT_LOCK();
sx_xlock(&pf->lock);
@@ -666,22 +660,22 @@ sndstat_get_devs(struct sndstat_file *pf, caddr_t data)
SNDSTAT_UNLOCK();
- if (!arg->nbytes) {
- arg->nbytes = pf->devs_nbytes;
+ if (*arg_nbytes == 0) {
+ *arg_nbytes = pf->devs_nbytes;
err = 0;
goto done;
}
- if (arg->nbytes < pf->devs_nbytes) {
- arg->nbytes = 0;
+ if (*arg_nbytes < pf->devs_nbytes) {
+ *arg_nbytes = 0;
err = 0;
goto done;
}
- err = copyout(pf->devs_nvlbuf, arg->buf, pf->devs_nbytes);
+ err = copyout(pf->devs_nvlbuf, arg_buf, pf->devs_nbytes);
if (err)
goto done;
- arg->nbytes = pf->devs_nbytes;
+ *arg_nbytes = pf->devs_nbytes;
free(pf->devs_nvlbuf, M_NVLIST);
pf->devs_nvlbuf = NULL;
@@ -706,7 +700,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl)
}
*nvl = nvlist_unpack(nvlbuf, nbytes, 0);
free(nvlbuf, M_DEVBUF);
- if (nvl == NULL) {
+ if (*nvl == NULL) {
return (EINVAL);
}
@@ -852,20 +846,24 @@ sndstat_dsp_unpack_nvlist(const nvlist_t *nvlist, struct sndstat_userdev *ud)
}
static int
-sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data)
+sndstat_add_user_devs(struct sndstat_file *pf, void *nvlbuf, size_t nbytes)
{
int err;
nvlist_t *nvl = NULL;
const nvlist_t * const *dsps;
size_t i, ndsps;
- struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data;
if ((pf->fflags & FWRITE) == 0) {
err = EPERM;
goto done;
}
- err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl);
+ if (nbytes > SNDST_UNVLBUF_MAX) {
+ err = ENOMEM;
+ goto done;
+ }
+
+ err = sndstat_unpack_user_nvlbuf(nvlbuf, nbytes, &nvl);
if (err != 0)
goto done;
@@ -911,52 +909,17 @@ sndstat_flush_user_devs(struct sndstat_file *pf)
return (0);
}
-#ifdef COMPAT_FREEBSD32
-static int
-compat_sndstat_get_devs32(struct sndstat_file *pf, caddr_t data)
-{
- struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data;
- struct sndstioc_nv_arg arg;
- int err;
-
- arg.buf = (void *)(uintptr_t)arg32->buf;
- arg.nbytes = arg32->nbytes;
-
- err = sndstat_get_devs(pf, (caddr_t)&arg);
- if (err == 0) {
- arg32->buf = (uint32_t)(uintptr_t)arg.buf;
- arg32->nbytes = arg.nbytes;
- }
-
- return (err);
-}
-
-static int
-compat_sndstat_add_user_devs32(struct sndstat_file *pf, caddr_t data)
-{
- struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data;
- struct sndstioc_nv_arg arg;
- int err;
-
- arg.buf = (void *)(uintptr_t)arg32->buf;
- arg.nbytes = arg32->nbytes;
-
- err = sndstat_add_user_devs(pf, (caddr_t)&arg);
- if (err == 0) {
- arg32->buf = (uint32_t)(uintptr_t)arg.buf;
- arg32->nbytes = arg.nbytes;
- }
-
- return (err);
-}
-#endif
-
static int
sndstat_ioctl(
struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
int err;
struct sndstat_file *pf;
+ struct sndstioc_nv_arg *arg;
+#ifdef COMPAT_FREEBSD32
+ struct sndstioc_nv_arg32 *arg32;
+ size_t nbytes;
+#endif
err = devfs_get_cdevpriv((void **)&pf);
if (err != 0)
@@ -964,27 +927,30 @@ sndstat_ioctl(
switch (cmd) {
case SNDSTIOC_GET_DEVS:
- err = sndstat_get_devs(pf, data);
+ arg = (struct sndstioc_nv_arg *)data;
+ err = sndstat_get_devs(pf, arg->buf, &arg->nbytes);
break;
#ifdef COMPAT_FREEBSD32
case SNDSTIOC_GET_DEVS32:
- if (!SV_CURPROC_FLAG(SV_ILP32)) {
- err = ENODEV;
- break;
+ arg32 = (struct sndstioc_nv_arg32 *)data;
+ nbytes = arg32->nbytes;
+ err = sndstat_get_devs(pf, (void *)(uintptr_t)arg32->buf,
+ &nbytes);
+ if (err == 0) {
+ KASSERT(nbytes < UINT_MAX, ("impossibly many bytes"));
+ arg32->nbytes = nbytes;
}
- err = compat_sndstat_get_devs32(pf, data);
break;
#endif
case SNDSTIOC_ADD_USER_DEVS:
- err = sndstat_add_user_devs(pf, data);
+ arg = (struct sndstioc_nv_arg *)data;
+ err = sndstat_add_user_devs(pf, arg->buf, arg->nbytes);
break;
#ifdef COMPAT_FREEBSD32
case SNDSTIOC_ADD_USER_DEVS32:
- if (!SV_CURPROC_FLAG(SV_ILP32)) {
- err = ENODEV;
- break;
- }
- err = compat_sndstat_add_user_devs32(pf, data);
+ arg32 = (struct sndstioc_nv_arg32 *)data;
+ err = sndstat_add_user_devs(pf, (void *)(uintptr_t)arg32->buf,
+ arg32->nbytes);
break;
#endif
case SNDSTIOC_REFRESH_DEVS:
@@ -1271,11 +1237,8 @@ sndstat_prepare(struct sndstat_file *pf_self)
/* make sure buffer is reset */
sbuf_clear(s);
- if (snd_verbose > 0) {
- sbuf_printf(s, "FreeBSD Audio Driver (%ubit %d/%s)\n",
- (u_int)sizeof(intpcm32_t) << 3, SND_DRV_VERSION,
- MACHINE_ARCH);
- }
+ if (snd_verbose > 0)
+ sbuf_printf(s, "FreeBSD Audio Driver\n");
/* generate list of installed devices */
k = 0;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index e88ccb1f25a6..8d97dcd60231 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -41,7 +41,6 @@
#include <dev/sound/pcm/ac97.h>
#include <dev/sound/pcm/vchan.h>
#include <dev/sound/pcm/dsp.h>
-#include <dev/sound/version.h>
#include <sys/limits.h>
#include <sys/sysctl.h>
@@ -57,22 +56,11 @@ static int snd_unit_auto = -1;
SYSCTL_INT(_hw_snd, OID_AUTO, default_auto, CTLFLAG_RWTUN,
&snd_unit_auto, 0, "assign default unit to a newly attached device");
-int snd_maxautovchans = 16;
-
SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"Sound driver");
static void pcm_sysinit(device_t);
-/*
- * XXX I've had enough with people not telling proper version/arch
- * while reporting problems, not after 387397913213th questions/requests.
- */
-static char snd_driver_version[] =
- __XSTRING(SND_DRV_VERSION)"/"MACHINE_ARCH;
-SYSCTL_STRING(_hw_snd, OID_AUTO, version, CTLFLAG_RD, &snd_driver_version,
- 0, "driver version/arch");
-
/**
* @brief Unit number allocator for syncgroup IDs
*/
@@ -121,271 +109,71 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand
return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep);
}
-int
-pcm_setvchans(struct snddev_info *d, int direction, int newcnt, int num)
-{
- struct pcm_channel *c, *ch, *nch;
- struct pcmchan_caps *caps;
- int i, err, vcnt;
-
- PCM_BUSYASSERT(d);
-
- if ((direction == PCMDIR_PLAY && d->playcount < 1) ||
- (direction == PCMDIR_REC && d->reccount < 1))
- return (ENODEV);
-
- if (!(d->flags & SD_F_AUTOVCHAN))
- return (EINVAL);
-
- if (newcnt < 0 || newcnt > SND_MAXVCHANS)
- return (E2BIG);
-
- if (direction == PCMDIR_PLAY)
- vcnt = d->pvchancount;
- else if (direction == PCMDIR_REC)
- vcnt = d->rvchancount;
- else
- return (EINVAL);
-
- if (newcnt > vcnt) {
- KASSERT(num == -1 ||
- (num >= 0 && num < SND_MAXVCHANS && (newcnt - 1) == vcnt),
- ("bogus vchan_create() request num=%d newcnt=%d vcnt=%d",
- num, newcnt, vcnt));
- /* add new vchans - find a parent channel first */
- ch = NULL;
- CHN_FOREACH(c, d, channels.pcm) {
- CHN_LOCK(c);
- if (c->direction == direction &&
- ((c->flags & CHN_F_HAS_VCHAN) || (vcnt == 0 &&
- c->refcount < 1 &&
- !(c->flags & (CHN_F_BUSY | CHN_F_VIRTUAL))))) {
- /*
- * Reuse hw channel with vchans already
- * created.
- */
- if (c->flags & CHN_F_HAS_VCHAN) {
- ch = c;
- break;
- }
- /*
- * No vchans ever created, look for
- * channels with supported formats.
- */
- caps = chn_getcaps(c);
- if (caps == NULL) {
- CHN_UNLOCK(c);
- continue;
- }
- for (i = 0; caps->fmtlist[i] != 0; i++) {
- if (caps->fmtlist[i] & AFMT_CONVERTIBLE)
- break;
- }
- if (caps->fmtlist[i] != 0) {
- ch = c;
- break;
- }
- }
- CHN_UNLOCK(c);
- }
- if (ch == NULL)
- return (EBUSY);
- ch->flags |= CHN_F_BUSY;
- err = 0;
- while (err == 0 && newcnt > vcnt) {
- err = vchan_create(ch, num);
- if (err == 0)
- vcnt++;
- else if (err == E2BIG && newcnt > vcnt)
- device_printf(d->dev,
- "%s: err=%d Maximum channel reached.\n",
- __func__, err);
- }
- if (vcnt == 0)
- ch->flags &= ~CHN_F_BUSY;
- CHN_UNLOCK(ch);
- if (err != 0)
- return (err);
- } else if (newcnt < vcnt) {
- KASSERT(num == -1,
- ("bogus vchan_destroy() request num=%d", num));
- CHN_FOREACH(c, d, channels.pcm) {
- CHN_LOCK(c);
- if (c->direction != direction ||
- CHN_EMPTY(c, children) ||
- !(c->flags & CHN_F_HAS_VCHAN)) {
- CHN_UNLOCK(c);
- continue;
- }
- CHN_FOREACH_SAFE(ch, c, nch, children) {
- CHN_LOCK(ch);
- if (vcnt == 1 && c->refcount > 0) {
- CHN_UNLOCK(ch);
- break;
- }
- if (!(ch->flags & CHN_F_BUSY) &&
- ch->refcount < 1) {
- err = vchan_destroy(ch);
- if (err == 0)
- vcnt--;
- } else
- CHN_UNLOCK(ch);
- if (vcnt == newcnt)
- break;
- }
- CHN_UNLOCK(c);
- break;
- }
- }
-
- return (0);
-}
-
/* return error status and a locked channel */
int
pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction,
- pid_t pid, char *comm, int devunit)
+ pid_t pid, char *comm)
{
struct pcm_channel *c;
int err, vchancount, vchan_num;
+ bool retry;
- KASSERT(d != NULL && ch != NULL && (devunit == -1 ||
- !(devunit & ~(SND_U_MASK | SND_D_MASK | SND_C_MASK))) &&
+ KASSERT(d != NULL && ch != NULL &&
(direction == PCMDIR_PLAY || direction == PCMDIR_REC),
- ("%s(): invalid d=%p ch=%p direction=%d pid=%d devunit=%d",
- __func__, d, ch, direction, pid, devunit));
+ ("%s(): invalid d=%p ch=%p direction=%d pid=%d",
+ __func__, d, ch, direction, pid));
PCM_BUSYASSERT(d);
- /* Double check again. */
- if (devunit != -1) {
- switch (snd_unit2d(devunit)) {
- case SND_DEV_DSPHW_PLAY:
- case SND_DEV_DSPHW_VPLAY:
- if (direction != PCMDIR_PLAY)
- return (ENOTSUP);
- break;
- case SND_DEV_DSPHW_REC:
- case SND_DEV_DSPHW_VREC:
- if (direction != PCMDIR_REC)
- return (ENOTSUP);
- break;
- default:
- if (!(direction == PCMDIR_PLAY ||
- direction == PCMDIR_REC))
- return (ENOTSUP);
- break;
- }
- }
-
*ch = NULL;
vchan_num = 0;
vchancount = (direction == PCMDIR_PLAY) ? d->pvchancount :
d->rvchancount;
+ retry = false;
retry_chnalloc:
err = ENOTSUP;
/* scan for a free channel */
CHN_FOREACH(c, d, channels.pcm) {
CHN_LOCK(c);
- if (devunit == -1 && c->direction == direction &&
- (c->flags & CHN_F_VIRTUAL)) {
+ if (c->direction == direction && (c->flags & CHN_F_VIRTUAL)) {
if (vchancount < snd_maxautovchans &&
- vchan_num < CHN_CHAN(c)) {
+ vchan_num < c->unit) {
CHN_UNLOCK(c);
goto vchan_alloc;
}
vchan_num++;
}
- if (c->direction == direction && !(c->flags & CHN_F_BUSY) &&
- (devunit == -1 || devunit == -2 || c->unit == devunit)) {
+ if (c->direction == direction && !(c->flags & CHN_F_BUSY)) {
c->flags |= CHN_F_BUSY;
c->pid = pid;
strlcpy(c->comm, (comm != NULL) ? comm :
CHN_COMM_UNKNOWN, sizeof(c->comm));
*ch = c;
return (0);
- } else if (c->unit == devunit) {
- if (c->direction != direction)
- err = ENOTSUP;
- else if (c->flags & CHN_F_BUSY)
- err = EBUSY;
- else
- err = EINVAL;
- CHN_UNLOCK(c);
- return (err);
- } else if ((devunit == -1 || devunit == -2) &&
- c->direction == direction && (c->flags & CHN_F_BUSY))
+ } else if (c->direction == direction && (c->flags & CHN_F_BUSY))
err = EBUSY;
CHN_UNLOCK(c);
}
- if (devunit == -2)
+ /*
+ * We came from retry_chnalloc and still didn't find a free channel.
+ */
+ if (retry)
return (err);
vchan_alloc:
/* no channel available */
- if (devunit == -1 || snd_unit2d(devunit) == SND_DEV_DSPHW_VPLAY ||
- snd_unit2d(devunit) == SND_DEV_DSPHW_VREC) {
- if (!(vchancount > 0 && vchancount < snd_maxautovchans) &&
- (devunit == -1 || snd_unit2c(devunit) < snd_maxautovchans))
- return (err);
- err = pcm_setvchans(d, direction, vchancount + 1,
- (devunit == -1) ? -1 : snd_unit2c(devunit));
- if (err == 0) {
- if (devunit == -1)
- devunit = -2;
- goto retry_chnalloc;
- }
+ if (!(vchancount > 0 && vchancount < snd_maxautovchans))
+ return (err);
+ err = vchan_setnew(d, direction, vchancount + 1);
+ if (err == 0) {
+ retry = true;
+ goto retry_chnalloc;
}
return (err);
}
-/* release a locked channel and unlock it */
-int
-pcm_chnrelease(struct pcm_channel *c)
-{
- PCM_BUSYASSERT(c->parentsnddev);
- CHN_LOCKASSERT(c);
-
- c->flags &= ~CHN_F_BUSY;
- c->pid = -1;
- strlcpy(c->comm, CHN_COMM_UNUSED, sizeof(c->comm));
- CHN_UNLOCK(c);
-
- return (0);
-}
-
-int
-pcm_chnref(struct pcm_channel *c, int ref)
-{
- PCM_BUSYASSERT(c->parentsnddev);
- CHN_LOCKASSERT(c);
-
- c->refcount += ref;
-
- return (c->refcount);
-}
-
-static void
-pcm_setmaxautovchans(struct snddev_info *d, int num)
-{
- PCM_BUSYASSERT(d);
-
- if (num < 0)
- return;
-
- if (num >= 0 && d->pvchancount > num)
- (void)pcm_setvchans(d, PCMDIR_PLAY, num, -1);
- else if (num > 0 && d->pvchancount == 0)
- (void)pcm_setvchans(d, PCMDIR_PLAY, 1, -1);
-
- if (num >= 0 && d->rvchancount > num)
- (void)pcm_setvchans(d, PCMDIR_REC, num, -1);
- else if (num > 0 && d->rvchancount == 0)
- (void)pcm_setvchans(d, PCMDIR_REC, 1, -1);
-}
-
static int
sysctl_hw_snd_default_unit(SYSCTL_HANDLER_ARGS)
{
@@ -409,173 +197,7 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, default_unit,
sizeof(int), sysctl_hw_snd_default_unit, "I",
"default sound device");
-static int
-sysctl_hw_snd_maxautovchans(SYSCTL_HANDLER_ARGS)
-{
- struct snddev_info *d;
- int i, v, error;
-
- v = snd_maxautovchans;
- error = sysctl_handle_int(oidp, &v, 0, req);
- if (error == 0 && req->newptr != NULL) {
- if (v < 0)
- v = 0;
- if (v > SND_MAXVCHANS)
- v = SND_MAXVCHANS;
- snd_maxautovchans = v;
- for (i = 0; pcm_devclass != NULL &&
- i < devclass_get_maxunit(pcm_devclass); i++) {
- d = devclass_get_softc(pcm_devclass, i);
- if (!PCM_REGISTERED(d))
- continue;
- PCM_ACQUIRE_QUICK(d);
- pcm_setmaxautovchans(d, v);
- PCM_RELEASE_QUICK(d);
- }
- }
- return (error);
-}
-SYSCTL_PROC(_hw_snd, OID_AUTO, maxautovchans,
- CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, sizeof(int),
- sysctl_hw_snd_maxautovchans, "I",
- "maximum virtual channel");
-
-struct pcm_channel *
-pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, int num, void *devinfo)
-{
- struct pcm_channel *ch;
- int direction, err, rpnum, *pnum, max;
- int udc, device, chan;
- char *dirs, *devname, buf[CHN_NAMELEN];
-
- PCM_BUSYASSERT(d);
- PCM_LOCKASSERT(d);
- KASSERT(num >= -1, ("invalid num=%d", num));
-
- switch (dir) {
- case PCMDIR_PLAY:
- dirs = "play";
- direction = PCMDIR_PLAY;
- pnum = &d->playcount;
- device = SND_DEV_DSPHW_PLAY;
- max = SND_MAXHWCHAN;
- break;
- case PCMDIR_PLAY_VIRTUAL:
- dirs = "virtual_play";
- direction = PCMDIR_PLAY;
- pnum = &d->pvchancount;
- device = SND_DEV_DSPHW_VPLAY;
- max = SND_MAXVCHANS;
- break;
- case PCMDIR_REC:
- dirs = "record";
- direction = PCMDIR_REC;
- pnum = &d->reccount;
- device = SND_DEV_DSPHW_REC;
- max = SND_MAXHWCHAN;
- break;
- case PCMDIR_REC_VIRTUAL:
- dirs = "virtual_record";
- direction = PCMDIR_REC;
- pnum = &d->rvchancount;
- device = SND_DEV_DSPHW_VREC;
- max = SND_MAXVCHANS;
- break;
- default:
- return (NULL);
- }
-
- chan = (num == -1) ? 0 : num;
-
- if (*pnum >= max || chan >= max)
- return (NULL);
-
- rpnum = 0;
-
- CHN_FOREACH(ch, d, channels.pcm) {
- if (CHN_DEV(ch) != device)
- continue;
- if (chan == CHN_CHAN(ch)) {
- if (num != -1) {
- device_printf(d->dev,
- "channel num=%d allocated!\n", chan);
- return (NULL);
- }
- chan++;
- if (chan >= max) {
- device_printf(d->dev,
- "chan=%d > %d\n", chan, max);
- return (NULL);
- }
- }
- rpnum++;
- }
-
- if (*pnum != rpnum) {
- device_printf(d->dev,
- "%s(): WARNING: pnum screwed : dirs=%s pnum=%d rpnum=%d\n",
- __func__, dirs, *pnum, rpnum);
- return (NULL);
- }
-
- udc = snd_mkunit(device_get_unit(d->dev), device, chan);
- devname = dsp_unit2name(buf, sizeof(buf), udc);
-
- if (devname == NULL) {
- device_printf(d->dev,
- "Failed to query device name udc=0x%08x\n", udc);
- return (NULL);
- }
-
- PCM_UNLOCK(d);
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
- ch->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO);
- ch->unit = udc;
- ch->pid = -1;
- strlcpy(ch->comm, CHN_COMM_UNUSED, sizeof(ch->comm));
- ch->parentsnddev = d;
- ch->parentchannel = parent;
- ch->dev = d->dev;
- ch->trigger = PCMTRIG_STOP;
- snprintf(ch->name, sizeof(ch->name), "%s:%s:%s",
- device_get_nameunit(ch->dev), dirs, devname);
-
- err = chn_init(ch, devinfo, dir, direction);
- PCM_LOCK(d);
- if (err) {
- device_printf(d->dev, "chn_init(%s) failed: err = %d\n",
- ch->name, err);
- kobj_delete(ch->methods, M_DEVBUF);
- free(ch, M_DEVBUF);
- return (NULL);
- }
-
- return (ch);
-}
-
-int
-pcm_chn_destroy(struct pcm_channel *ch)
-{
- struct snddev_info *d __diagused;
- int err;
-
- d = ch->parentsnddev;
- PCM_BUSYASSERT(d);
-
- err = chn_kill(ch);
- if (err) {
- device_printf(ch->dev, "chn_kill(%s) failed, err = %d\n",
- ch->name, err);
- return (err);
- }
-
- kobj_delete(ch->methods, M_DEVBUF);
- free(ch, M_DEVBUF);
-
- return (0);
-}
-
-int
+void
pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch)
{
PCM_BUSYASSERT(d);
@@ -585,7 +207,7 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch)
CHN_INSERT_SORT_ASCEND(d, ch, channels.pcm);
- switch (CHN_DEV(ch)) {
+ switch (ch->type) {
case SND_DEV_DSPHW_PLAY:
d->playcount++;
break;
@@ -599,10 +221,8 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch)
d->rvchancount++;
break;
default:
- break;
+ __assert_unreachable();
}
-
- return (0);
}
int
@@ -625,7 +245,7 @@ pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch)
CHN_REMOVE(d, ch, channels.pcm);
- switch (CHN_DEV(ch)) {
+ switch (ch->type) {
case SND_DEV_DSPHW_PLAY:
d->playcount--;
break;
@@ -639,7 +259,7 @@ pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch)
d->rvchancount--;
break;
default:
- break;
+ __assert_unreachable();
}
return (0);
@@ -650,47 +270,68 @@ pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo)
{
struct snddev_info *d = device_get_softc(dev);
struct pcm_channel *ch;
- int err;
PCM_BUSYASSERT(d);
PCM_LOCK(d);
- ch = pcm_chn_create(d, NULL, cls, dir, -1, devinfo);
+ ch = chn_init(d, NULL, cls, dir, devinfo);
if (!ch) {
- device_printf(d->dev, "pcm_chn_create(%s, %d, %p) failed\n",
+ device_printf(d->dev, "chn_init(%s, %d, %p) failed\n",
cls->name, dir, devinfo);
PCM_UNLOCK(d);
return (ENODEV);
}
- err = pcm_chn_add(d, ch);
+ pcm_chn_add(d, ch);
PCM_UNLOCK(d);
- if (err) {
- device_printf(d->dev, "pcm_chn_add(%s) failed, err=%d\n",
- ch->name, err);
- pcm_chn_destroy(ch);
- }
- return (err);
+ return (0);
}
-static int
-pcm_killchan(device_t dev)
+static void
+pcm_killchans(struct snddev_info *d)
{
- struct snddev_info *d = device_get_softc(dev);
struct pcm_channel *ch;
int error;
+ bool found;
PCM_BUSYASSERT(d);
+ do {
+ found = false;
+ CHN_FOREACH(ch, d, channels.pcm) {
+ CHN_LOCK(ch);
+ /*
+ * Make sure no channel has went to sleep in the
+ * meantime.
+ */
+ chn_shutdown(ch);
+ /*
+ * We have to give a thread sleeping in chn_sleep() a
+ * chance to observe that the channel is dead.
+ */
+ if ((ch->flags & CHN_F_SLEEPING) == 0) {
+ found = true;
+ CHN_UNLOCK(ch);
+ break;
+ }
+ CHN_UNLOCK(ch);
+ }
- ch = CHN_FIRST(d, channels.pcm);
+ /*
+ * All channels are still sleeping. Sleep for a bit and try
+ * again to see if any of them is awake now.
+ */
+ if (!found) {
+ pause_sbt("pcmkillchans", SBT_1MS * 5, 0, 0);
+ continue;
+ }
- PCM_LOCK(d);
- error = pcm_chn_remove(d, ch);
- PCM_UNLOCK(d);
- if (error)
- return (error);
- return (pcm_chn_destroy(ch));
+ PCM_LOCK(d);
+ error = pcm_chn_remove(d, ch);
+ PCM_UNLOCK(d);
+ if (error == 0)
+ chn_kill(ch);
+ } while (!CHN_EMPTY(d, channels.pcm));
}
static int
@@ -736,7 +377,7 @@ pcm_setstatus(device_t dev, char *str)
if (d->playcount > 0 || d->reccount > 0)
d->flags |= SD_F_AUTOVCHAN;
- pcm_setmaxautovchans(d, snd_maxautovchans);
+ vchan_setmaxauto(d, snd_maxautovchans);
strlcpy(d->status, str, SND_STATUSLEN);
@@ -892,8 +533,8 @@ pcm_sysinit(device_t dev)
SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
OID_AUTO, "mode", CTLFLAG_RD, NULL, mode,
- "mode (1=mixer, 2=play, 4=rec. The values are OR'ed if more than one"
- "mode is supported)");
+ "mode (1=mixer, 2=play, 4=rec. The values are OR'ed if more than "
+ "one mode is supported)");
if (d->flags & SD_F_AUTOVCHAN)
vchan_initsys(dev);
if (d->flags & SD_F_EQ)
@@ -912,14 +553,6 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
return EINVAL;
}
- if (device_get_unit(dev) > PCMMAXUNIT) {
- device_printf(dev, "PCMMAXUNIT reached : unit=%d > %d\n",
- device_get_unit(dev), PCMMAXUNIT);
- device_printf(dev,
- "Use 'hw.snd.maxunit' tunable to raise the limit.\n");
- return ENODEV;
- }
-
d = device_get_softc(dev);
d->dev = dev;
d->lock = snd_mtxcreate(device_get_nameunit(dev), "sound cdev");
@@ -1000,23 +633,15 @@ pcm_unregister(device_t dev)
CHN_FOREACH(ch, d, channels.pcm) {
CHN_LOCK(ch);
- if (ch->flags & CHN_F_SLEEPING) {
- /*
- * We are detaching, so do not wait for the timeout in
- * chn_read()/chn_write(). Wake up the thread and kill
- * the channel immediately.
- */
- CHN_BROADCAST(&ch->intr_cv);
- ch->flags |= CHN_F_DEAD;
- }
+ /*
+ * Do not wait for the timeout in chn_read()/chn_write(). Wake
+ * up the sleeping thread and kill the channel.
+ */
+ chn_shutdown(ch);
chn_abort(ch);
CHN_UNLOCK(ch);
}
- dsp_destroy_dev(dev);
-
- (void)mixer_uninit(dev);
-
/* remove /dev/sndstat entry first */
sndstat_unregister(dev);
@@ -1034,8 +659,10 @@ pcm_unregister(device_t dev)
d->rec_sysctl_tree = NULL;
}
- while (!CHN_EMPTY(d, channels.pcm))
- pcm_killchan(dev);
+ dsp_destroy_dev(dev);
+ (void)mixer_uninit(dev);
+
+ pcm_killchans(d);
PCM_LOCK(d);
PCM_RELEASE(d);
@@ -1081,9 +708,8 @@ sound_oss_sysinfo(oss_sysinfo *si)
struct snddev_info *d;
struct pcm_channel *c;
- int i, j, ncards;
-
- ncards = 0;
+ int j;
+ size_t i;
strlcpy(si->product, si_product, sizeof(si->product));
strlcpy(si->version, si_version, sizeof(si->version));
@@ -1092,9 +718,9 @@ sound_oss_sysinfo(oss_sysinfo *si)
/*
* Iterate over PCM devices and their channels, gathering up data
- * for the numaudios, ncards, and openedaudio fields.
+ * for the numaudioengines and openedaudio fields.
*/
- si->numaudios = 0;
+ si->numaudioengines = 0;
bzero((void *)&si->openedaudio, sizeof(si->openedaudio));
j = 0;
@@ -1111,8 +737,7 @@ sound_oss_sysinfo(oss_sysinfo *si)
PCM_UNLOCKASSERT(d);
PCM_LOCK(d);
- si->numaudios += PCM_CHANCOUNT(d);
- ++ncards;
+ si->numaudioengines += PCM_CHANCOUNT(d);
CHN_FOREACH(c, d, channels.pcm) {
CHN_UNLOCKASSERT(c);
@@ -1126,7 +751,6 @@ sound_oss_sysinfo(oss_sysinfo *si)
PCM_UNLOCK(d);
}
- si->numaudioengines = si->numaudios;
si->numsynths = 0; /* OSSv4 docs: this field is obsolete */
/**
@@ -1142,8 +766,14 @@ sound_oss_sysinfo(oss_sysinfo *si)
*/
si->nummidis = 0;
si->numtimers = 0;
- si->nummixers = mixer_count;
- si->numcards = ncards;
+ /*
+ * Set this to the maximum unit number so that applications will not
+ * break if they try to loop through all mixers and some of them are
+ * not available.
+ */
+ si->nummixers = devclass_get_maxunit(pcm_devclass);
+ si->numcards = devclass_get_maxunit(pcm_devclass);
+ si->numaudios = devclass_get_maxunit(pcm_devclass);
/* OSSv4 docs: Intended only for test apps; API doesn't
really have much of a concept of cards. Shouldn't be
used by applications. */
@@ -1159,7 +789,7 @@ sound_oss_sysinfo(oss_sysinfo *si)
* Si->filler is a reserved array, but according to docs each
* element should be set to -1.
*/
- for (i = 0; i < sizeof(si->filler)/sizeof(si->filler[0]); i++)
+ for (i = 0; i < nitems(si->filler); i++)
si->filler[i] = -1;
}
@@ -1167,30 +797,34 @@ int
sound_oss_card_info(oss_card_info *si)
{
struct snddev_info *d;
- int i, ncards;
-
- ncards = 0;
+ int i;
for (i = 0; pcm_devclass != NULL &&
i < devclass_get_maxunit(pcm_devclass); i++) {
d = devclass_get_softc(pcm_devclass, i);
- if (!PCM_REGISTERED(d))
- continue;
-
- if (ncards++ != si->card)
+ if (i != si->card)
continue;
- PCM_UNLOCKASSERT(d);
- PCM_LOCK(d);
-
- strlcpy(si->shortname, device_get_nameunit(d->dev),
- sizeof(si->shortname));
- strlcpy(si->longname, device_get_desc(d->dev),
- sizeof(si->longname));
- strlcpy(si->hw_info, d->status, sizeof(si->hw_info));
- si->intr_count = si->ack_count = 0;
-
- PCM_UNLOCK(d);
+ if (!PCM_REGISTERED(d)) {
+ snprintf(si->shortname, sizeof(si->shortname),
+ "pcm%d (n/a)", i);
+ strlcpy(si->longname, "Device unavailable",
+ sizeof(si->longname));
+ si->hw_info[0] = '\0';
+ si->intr_count = si->ack_count = 0;
+ } else {
+ PCM_UNLOCKASSERT(d);
+ PCM_LOCK(d);
+
+ strlcpy(si->shortname, device_get_nameunit(d->dev),
+ sizeof(si->shortname));
+ strlcpy(si->longname, device_get_desc(d->dev),
+ sizeof(si->longname));
+ strlcpy(si->hw_info, d->status, sizeof(si->hw_info));
+ si->intr_count = si->ack_count = 0;
+
+ PCM_UNLOCK(d);
+ }
return (0);
}
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index fe310a3be3d6..e4a3ba41ee7f 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -88,7 +88,6 @@ struct snd_mixer;
#include <dev/sound/pcm/feeder.h>
#include <dev/sound/pcm/mixer.h>
#include <dev/sound/pcm/dsp.h>
-#include <dev/sound/unit.h>
#define PCM_SOFTC_SIZE (sizeof(struct snddev_info))
@@ -101,21 +100,6 @@ struct snd_mixer;
#define SOUND_MAXVER SOUND_MODVER
/*
- * We're abusing the fact that MAXMINOR still have enough room
- * for our bit twiddling and nobody ever need 512 unique soundcards,
- * 32 unique device types and 1024 unique cloneable devices for the
- * next 100 years...
- */
-
-#define PCMMAXUNIT (snd_max_u())
-#define PCMMAXDEV (snd_max_d())
-#define PCMMAXCHAN (snd_max_c())
-
-#define PCMUNIT(x) (snd_unit2u(dev2unit(x)))
-#define PCMDEV(x) (snd_unit2d(dev2unit(x)))
-#define PCMCHAN(x) (snd_unit2c(dev2unit(x)))
-
-/*
* By design, limit possible channels for each direction.
*/
#define SND_MAXHWCHAN 256
@@ -244,45 +228,17 @@ struct snd_mixer;
#define AFMT_NE (AFMT_SIGNED_NE | AFMT_U8_NE | AFMT_U16_NE | \
AFMT_U24_NE | AFMT_U32_NE)
-/*
- * Minor numbers for the sound driver.
- *
- * Unfortunately Creative called the codec chip of SB as a DSP. For this
- * reason the /dev/dsp is reserved for digitized audio use. There is a
- * device for true DSP processors but it will be called something else.
- * In v3.0 it's /dev/sndproc but this could be a temporary solution.
- */
-
-#define SND_DEV_CTL 0 /* Control port /dev/mixer */
-#define SND_DEV_SEQ 1 /* Sequencer /dev/sequencer */
-#define SND_DEV_MIDIN 2 /* Raw midi access */
-#define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
-#define SND_DEV_AUDIO 4 /* Sparc compatible /dev/audio */
-#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
-#define SND_DEV_STATUS 6 /* /dev/sndstat */
- /* #7 not in use now. */
-#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
-#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
-#define SND_DEV_PSS SND_DEV_SNDPROC /* ? */
-#define SND_DEV_NORESET 10
-
-#define SND_DEV_DSPHW_PLAY 11 /* specific playback channel */
-#define SND_DEV_DSPHW_VPLAY 12 /* specific virtual playback channel */
-#define SND_DEV_DSPHW_REC 13 /* specific record channel */
-#define SND_DEV_DSPHW_VREC 14 /* specific virtual record channel */
-
-#define SND_DEV_DSPHW_CD 15 /* s16le/stereo 44100Hz CD */
-
-/*
- * OSSv4 compatible device. For now, it serve no purpose and
- * the cloning itself will forward the request to ordinary /dev/dsp
- * instead.
- */
-#define SND_DEV_DSP_MMAP 16 /* /dev/dsp_mmap */
-#define SND_DEV_DSP_AC3 17 /* /dev/dsp_ac3 */
-#define SND_DEV_DSP_MULTICH 18 /* /dev/dsp_multich */
-#define SND_DEV_DSP_SPDIFOUT 19 /* /dev/dsp_spdifout */
-#define SND_DEV_DSP_SPDIFIN 20 /* /dev/dsp_spdifin */
+enum {
+ SND_DEV_CTL = 0, /* Control port /dev/mixer */
+ SND_DEV_SEQ, /* Sequencer /dev/sequencer */
+ SND_DEV_MIDIN, /* Raw midi access */
+ SND_DEV_DSP, /* Digitized voice /dev/dsp */
+ SND_DEV_STATUS, /* /dev/sndstat */
+ SND_DEV_DSPHW_PLAY, /* specific playback channel */
+ SND_DEV_DSPHW_VPLAY, /* specific virtual playback channel */
+ SND_DEV_DSPHW_REC, /* specific record channel */
+ SND_DEV_DSPHW_VREC, /* specific virtual record channel */
+};
#define DSP_DEFAULT_SPEED 8000
@@ -291,7 +247,6 @@ struct snd_mixer;
extern int pcm_veto_load;
extern int snd_unit;
-extern int snd_maxautovchans;
extern int snd_verbose;
extern devclass_t pcm_devclass;
extern struct unrhdr *pcmsg_unrhdr;
@@ -309,15 +264,10 @@ extern struct unrhdr *pcmsg_unrhdr;
SYSCTL_DECL(_hw_snd);
-int pcm_setvchans(struct snddev_info *d, int direction, int newcnt, int num);
int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction,
- pid_t pid, char *comm, int devunit);
-int pcm_chnrelease(struct pcm_channel *c);
-int pcm_chnref(struct pcm_channel *c, int ref);
+ pid_t pid, char *comm);
-struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, int num, void *devinfo);
-int pcm_chn_destroy(struct pcm_channel *ch);
-int pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch);
+void pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch);
int pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch);
int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo);
@@ -341,6 +291,22 @@ void snd_mtxassert(void *m);
int sndstat_register(device_t dev, char *str);
int sndstat_unregister(device_t dev);
+/* These are the function codes assigned to the children of sound cards. */
+enum {
+ SCF_PCM,
+ SCF_MIDI,
+ SCF_SYNTH,
+};
+
+/*
+ * This is the device information struct, used by a bridge device to pass the
+ * device function code to the children.
+ */
+struct sndcard_func {
+ int func; /* The function code. */
+ void *varinfo; /* Bridge-specific information. */
+};
+
/*
* this is rather kludgey- we need to duplicate these struct def'ns from sound.c
* so that the macro versions of pcm_{,un}lock can dereference them.
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index d10c3ff4aabb..528c6fa62621 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -4,6 +4,10 @@
* Copyright (c) 2006-2009 Ariff Abdullah <ariff@FreeBSD.org>
* Copyright (c) 2001 Cameron Grant <cg@FreeBSD.org>
* All rights reserved.
+ * Copyright (c) 2024 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Christos Margiolis
+ * <christos@FreeBSD.org> under sponsorship from the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -57,6 +61,8 @@ struct vchan_info {
int trigger;
};
+int snd_maxautovchans = 16;
+
static void *
vchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b,
struct pcm_channel *c, int dir)
@@ -249,7 +255,7 @@ static kobj_method_t vchan_methods[] = {
CHANNEL_DECLARE(vchan);
static void
-pcm_getparentchannel(struct snddev_info *d,
+vchan_getparentchannel(struct snddev_info *d,
struct pcm_channel **wrch, struct pcm_channel **rdch)
{
struct pcm_channel **ch, *wch, *rch, *c;
@@ -337,7 +343,7 @@ sysctl_dev_pcm_vchans(SYSCTL_HANDLER_ARGS)
cnt = 0;
if (cnt > SND_MAXVCHANS)
cnt = SND_MAXVCHANS;
- err = pcm_setvchans(d, direction, cnt, -1);
+ err = vchan_setnew(d, direction, cnt);
}
PCM_RELEASE_QUICK(d);
@@ -378,9 +384,9 @@ sysctl_dev_pcm_vchanmode(SYSCTL_HANDLER_ARGS)
PCM_UNLOCK(d);
if (direction == PCMDIR_PLAY)
- pcm_getparentchannel(d, &c, NULL);
+ vchan_getparentchannel(d, &c, NULL);
else
- pcm_getparentchannel(d, NULL, &c);
+ vchan_getparentchannel(d, NULL, &c);
if (c == NULL) {
PCM_RELEASE_QUICK(d);
@@ -480,9 +486,9 @@ sysctl_dev_pcm_vchanrate(SYSCTL_HANDLER_ARGS)
PCM_UNLOCK(d);
if (direction == PCMDIR_PLAY)
- pcm_getparentchannel(d, &c, NULL);
+ vchan_getparentchannel(d, &c, NULL);
else
- pcm_getparentchannel(d, NULL, &c);
+ vchan_getparentchannel(d, NULL, &c);
if (c == NULL) {
PCM_RELEASE_QUICK(d);
@@ -589,9 +595,9 @@ sysctl_dev_pcm_vchanformat(SYSCTL_HANDLER_ARGS)
PCM_UNLOCK(d);
if (direction == PCMDIR_PLAY)
- pcm_getparentchannel(d, &c, NULL);
+ vchan_getparentchannel(d, &c, NULL);
else
- pcm_getparentchannel(d, NULL, &c);
+ vchan_getparentchannel(d, NULL, &c);
if (c == NULL) {
PCM_RELEASE_QUICK(d);
@@ -662,7 +668,7 @@ sysctl_dev_pcm_vchanformat(SYSCTL_HANDLER_ARGS)
"play.vchanrate" : "rec.vchanrate"
int
-vchan_create(struct pcm_channel *parent, int num)
+vchan_create(struct pcm_channel *parent)
{
struct snddev_info *d;
struct pcm_channel *ch;
@@ -698,7 +704,7 @@ vchan_create(struct pcm_channel *parent, int num)
}
/* create a new playback channel */
- ch = pcm_chn_create(d, parent, &vchan_class, direction, num, parent);
+ ch = chn_init(d, parent, &vchan_class, direction, parent);
if (ch == NULL) {
PCM_UNLOCK(d);
CHN_LOCK(parent);
@@ -706,13 +712,8 @@ vchan_create(struct pcm_channel *parent, int num)
}
/* add us to our grandparent's channel list */
- ret = pcm_chn_add(d, ch);
+ pcm_chn_add(d, ch);
PCM_UNLOCK(d);
- if (ret != 0) {
- pcm_chn_destroy(ch);
- CHN_LOCK(parent);
- return (ret);
- }
CHN_LOCK(parent);
/*
@@ -727,6 +728,7 @@ vchan_create(struct pcm_channel *parent, int num)
parent->flags |= CHN_F_HAS_VCHAN;
+ ret = 0;
parent_caps = chn_getcaps(parent);
if (parent_caps == NULL)
ret = EINVAL;
@@ -837,7 +839,7 @@ vchan_create(struct pcm_channel *parent, int num)
PCM_LOCK(d);
if (pcm_chn_remove(d, ch) == 0) {
PCM_UNLOCK(d);
- pcm_chn_destroy(ch);
+ chn_kill(ch);
} else
PCM_UNLOCK(d);
CHN_LOCK(parent);
@@ -890,7 +892,7 @@ vchan_destroy(struct pcm_channel *c)
/* destroy ourselves */
if (ret == 0)
- ret = pcm_chn_destroy(c);
+ chn_kill(c);
CHN_LOCK(parent);
@@ -923,7 +925,7 @@ vchan_sync(struct pcm_channel *c)
if (snd_passthrough_verbose != 0) {
char *devname, buf[CHN_NAMELEN];
- devname = dsp_unit2name(buf, sizeof(buf), c->unit);
+ devname = dsp_unit2name(buf, sizeof(buf), c);
device_printf(c->dev,
"%s(%s/%s) %s() -> re-sync err=%d\n",
__func__, (devname != NULL) ? devname : "dspX", c->comm,
@@ -934,6 +936,172 @@ vchan_sync(struct pcm_channel *c)
return (ret);
}
+int
+vchan_setnew(struct snddev_info *d, int direction, int newcnt)
+{
+ struct pcm_channel *c, *ch, *nch;
+ struct pcmchan_caps *caps;
+ int i, err, vcnt;
+
+ PCM_BUSYASSERT(d);
+
+ if ((direction == PCMDIR_PLAY && d->playcount < 1) ||
+ (direction == PCMDIR_REC && d->reccount < 1))
+ return (ENODEV);
+
+ if (!(d->flags & SD_F_AUTOVCHAN))
+ return (EINVAL);
+
+ if (newcnt < 0 || newcnt > SND_MAXVCHANS)
+ return (E2BIG);
+
+ if (direction == PCMDIR_PLAY)
+ vcnt = d->pvchancount;
+ else if (direction == PCMDIR_REC)
+ vcnt = d->rvchancount;
+ else
+ return (EINVAL);
+
+ if (newcnt > vcnt) {
+ KASSERT((newcnt - 1) == vcnt,
+ ("bogus vchan_create() request newcnt=%d vcnt=%d",
+ newcnt, vcnt));
+ /* add new vchans - find a parent channel first */
+ ch = NULL;
+ CHN_FOREACH(c, d, channels.pcm) {
+ CHN_LOCK(c);
+ if (c->direction == direction &&
+ ((c->flags & CHN_F_HAS_VCHAN) || (vcnt == 0 &&
+ c->refcount < 1 &&
+ !(c->flags & (CHN_F_BUSY | CHN_F_VIRTUAL))))) {
+ /*
+ * Reuse hw channel with vchans already
+ * created.
+ */
+ if (c->flags & CHN_F_HAS_VCHAN) {
+ ch = c;
+ break;
+ }
+ /*
+ * No vchans ever created, look for
+ * channels with supported formats.
+ */
+ caps = chn_getcaps(c);
+ if (caps == NULL) {
+ CHN_UNLOCK(c);
+ continue;
+ }
+ for (i = 0; caps->fmtlist[i] != 0; i++) {
+ if (caps->fmtlist[i] & AFMT_CONVERTIBLE)
+ break;
+ }
+ if (caps->fmtlist[i] != 0) {
+ ch = c;
+ break;
+ }
+ }
+ CHN_UNLOCK(c);
+ }
+ if (ch == NULL)
+ return (EBUSY);
+ ch->flags |= CHN_F_BUSY;
+ err = 0;
+ while (err == 0 && newcnt > vcnt) {
+ err = vchan_create(ch);
+ if (err == 0)
+ vcnt++;
+ else if (err == E2BIG && newcnt > vcnt)
+ device_printf(d->dev,
+ "%s: err=%d Maximum channel reached.\n",
+ __func__, err);
+ }
+ if (vcnt == 0)
+ ch->flags &= ~CHN_F_BUSY;
+ CHN_UNLOCK(ch);
+ if (err != 0)
+ return (err);
+ } else if (newcnt < vcnt) {
+ CHN_FOREACH(c, d, channels.pcm) {
+ CHN_LOCK(c);
+ if (c->direction != direction ||
+ CHN_EMPTY(c, children) ||
+ !(c->flags & CHN_F_HAS_VCHAN)) {
+ CHN_UNLOCK(c);
+ continue;
+ }
+ CHN_FOREACH_SAFE(ch, c, nch, children) {
+ CHN_LOCK(ch);
+ if (vcnt == 1 && c->refcount > 0) {
+ CHN_UNLOCK(ch);
+ break;
+ }
+ if (!(ch->flags & CHN_F_BUSY) &&
+ ch->refcount < 1) {
+ err = vchan_destroy(ch);
+ if (err == 0)
+ vcnt--;
+ } else
+ CHN_UNLOCK(ch);
+ if (vcnt == newcnt)
+ break;
+ }
+ CHN_UNLOCK(c);
+ break;
+ }
+ }
+
+ return (0);
+}
+
+void
+vchan_setmaxauto(struct snddev_info *d, int num)
+{
+ PCM_BUSYASSERT(d);
+
+ if (num < 0)
+ return;
+
+ if (num >= 0 && d->pvchancount > num)
+ (void)vchan_setnew(d, PCMDIR_PLAY, num);
+ else if (num > 0 && d->pvchancount == 0)
+ (void)vchan_setnew(d, PCMDIR_PLAY, 1);
+
+ if (num >= 0 && d->rvchancount > num)
+ (void)vchan_setnew(d, PCMDIR_REC, num);
+ else if (num > 0 && d->rvchancount == 0)
+ (void)vchan_setnew(d, PCMDIR_REC, 1);
+}
+
+static int
+sysctl_hw_snd_maxautovchans(SYSCTL_HANDLER_ARGS)
+{
+ struct snddev_info *d;
+ int i, v, error;
+
+ v = snd_maxautovchans;
+ error = sysctl_handle_int(oidp, &v, 0, req);
+ if (error == 0 && req->newptr != NULL) {
+ if (v < 0)
+ v = 0;
+ if (v > SND_MAXVCHANS)
+ v = SND_MAXVCHANS;
+ snd_maxautovchans = v;
+ for (i = 0; pcm_devclass != NULL &&
+ i < devclass_get_maxunit(pcm_devclass); i++) {
+ d = devclass_get_softc(pcm_devclass, i);
+ if (!PCM_REGISTERED(d))
+ continue;
+ PCM_ACQUIRE_QUICK(d);
+ vchan_setmaxauto(d, v);
+ PCM_RELEASE_QUICK(d);
+ }
+ }
+ return (error);
+}
+SYSCTL_PROC(_hw_snd, OID_AUTO, maxautovchans,
+ CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, sizeof(int),
+ sysctl_hw_snd_maxautovchans, "I", "maximum virtual channel");
+
void
vchan_initsys(device_t dev)
{
diff --git a/sys/dev/sound/pcm/vchan.h b/sys/dev/sound/pcm/vchan.h
index e2dcc9761261..1f0fa058cf71 100644
--- a/sys/dev/sound/pcm/vchan.h
+++ b/sys/dev/sound/pcm/vchan.h
@@ -30,7 +30,9 @@
#ifndef _SND_VCHAN_H_
#define _SND_VCHAN_H_
-int vchan_create(struct pcm_channel *, int);
+extern int snd_maxautovchans;
+
+int vchan_create(struct pcm_channel *);
int vchan_destroy(struct pcm_channel *);
#ifdef SND_DEBUG
@@ -45,6 +47,9 @@ int vchan_sync(struct pcm_channel *);
sndbuf_getfmt((c)->bufhard) != (c)->parentchannel->format || \
sndbuf_getspd((c)->bufhard) != (c)->parentchannel->speed))
+int vchan_setnew(struct snddev_info *, int, int);
+void vchan_setmaxauto(struct snddev_info *, int);
+
void vchan_initsys(device_t);
/*
diff --git a/sys/dev/sound/unit.c b/sys/dev/sound/unit.c
deleted file mode 100644
index 28ffbde1f7ec..000000000000
--- a/sys/dev/sound/unit.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2007 Ariff Abdullah <ariff@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-#ifdef HAVE_KERNEL_OPTION_HEADERS
-#include "opt_snd.h"
-#endif
-
-#include <dev/sound/unit.h>
-
-/*
- * Unit magic allocator for sound driver.
- *
- * 'u' = Unit of attached soundcards
- * 'd' = Device type
- * 'c' = Channel number
- *
- * eg: dsp0.p1 - u=0, d=p, c=1
- * dsp1.vp0 - u=1, d=vp, c=0
- *
- * Maximum unit of soundcards can be tuned through "hw.snd.maxunit", which is
- * between SND_UNIT_UMIN (16) and SND_UNIT_UMAX (2048). By design, the maximum
- * allowable allocated channel is 256.
- */
-
-/* Default width */
-static int snd_u_shift = 9; /* 0 - 0x1ff : 512 distinct soundcards */
-static int snd_d_shift = 5; /* 0 - 0x1f : 32 distinct device types */
-static int snd_c_shift = 10; /* 0 - 0x3ff : 1024 distinct channels
- (256 limit "by design") */
-
-static int snd_unit_initialized = 0;
-
-#ifdef SND_DIAGNOSTIC
-#define SND_UNIT_ASSERT() do { \
- if (snd_unit_initialized == 0) \
- panic("%s(): Uninitialized sound unit!", __func__); \
-} while (0)
-#else
-#define SND_UNIT_ASSERT() KASSERT(snd_unit_initialized != 0, \
- ("%s(): Uninitialized sound unit!", \
- __func__))
-#endif
-
-#define MKMASK(x) ((1 << snd_##x##_shift) - 1)
-
-int
-snd_max_u(void)
-{
- SND_UNIT_ASSERT();
-
- return (MKMASK(u));
-}
-
-int
-snd_max_d(void)
-{
- SND_UNIT_ASSERT();
-
- return (MKMASK(d));
-}
-
-int
-snd_max_c(void)
-{
- SND_UNIT_ASSERT();
-
- return (MKMASK(c));
-}
-
-int
-snd_unit2u(int unit)
-{
- SND_UNIT_ASSERT();
-
- return ((unit >> (snd_c_shift + snd_d_shift)) & MKMASK(u));
-}
-
-int
-snd_unit2d(int unit)
-{
- SND_UNIT_ASSERT();
-
- return ((unit >> snd_c_shift) & MKMASK(d));
-}
-
-int
-snd_unit2c(int unit)
-{
- SND_UNIT_ASSERT();
-
- return (unit & MKMASK(c));
-}
-
-int
-snd_u2unit(int u)
-{
- SND_UNIT_ASSERT();
-
- return ((u & MKMASK(u)) << (snd_c_shift + snd_d_shift));
-}
-
-int
-snd_d2unit(int d)
-{
- SND_UNIT_ASSERT();
-
- return ((d & MKMASK(d)) << snd_c_shift);
-}
-
-int
-snd_c2unit(int c)
-{
- SND_UNIT_ASSERT();
-
- return (c & MKMASK(c));
-}
-
-int
-snd_mkunit(int u, int d, int c)
-{
- SND_UNIT_ASSERT();
-
- return ((c & MKMASK(c)) | ((d & MKMASK(d)) << snd_c_shift) |
- ((u & MKMASK(u)) << (snd_c_shift + snd_d_shift)));
-}
-
-/*
- * This *must* be called first before any of the functions above!!!
- */
-void
-snd_unit_init(void)
-{
- int i;
-
- if (snd_unit_initialized != 0)
- return;
-
- snd_unit_initialized = 1;
-
- if (getenv_int("hw.snd.maxunit", &i) != 0) {
- if (i < SND_UNIT_UMIN)
- i = SND_UNIT_UMIN;
- else if (i > SND_UNIT_UMAX)
- i = SND_UNIT_UMAX;
- else
- i = roundup2(i, 2);
-
- for (snd_u_shift = 0; (i >> (snd_u_shift + 1)) != 0;
- snd_u_shift++)
- ;
-
- /* Make room for channels to fit within 24bit MAXMINOR limit. */
- snd_c_shift = 24 - snd_u_shift - snd_d_shift;
- }
-
- if (bootverbose != 0)
- printf("%s() u=0x%08x [%d] d=0x%08x [%d] c=0x%08x [%d]\n",
- __func__, SND_U_MASK, snd_max_u() + 1,
- SND_D_MASK, snd_max_d() + 1, SND_C_MASK, snd_max_c() + 1);
-}
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 2351c2522021..d47eb86ed271 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -90,7 +90,6 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/usb/uaudioreg.h>
#include <dev/sound/usb/uaudio.h>
-#include <dev/sound/chip.h>
#include "feeder_if.h"
static int uaudio_default_rate = 0; /* use rate list */
diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c
index 9b17cb232907..0b3da9b20440 100644
--- a/sys/dev/sound/usb/uaudio_pcm.c
+++ b/sys/dev/sound/usb/uaudio_pcm.c
@@ -32,7 +32,6 @@
#endif
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/chip.h>
#include <dev/sound/usb/uaudio.h>
#include "mixer_if.h"
diff --git a/sys/dev/tpm/tpm20.c b/sys/dev/tpm/tpm20.c
index da090bc068c9..80f7d9e105a6 100644
--- a/sys/dev/tpm/tpm20.c
+++ b/sys/dev/tpm/tpm20.c
@@ -68,6 +68,7 @@ tpm20_read(struct cdev *dev, struct uio *uio, int flags)
{
struct tpm_sc *sc;
size_t bytes_to_transfer;
+ size_t offset;
int result = 0;
sc = (struct tpm_sc *)dev->si_drv1;
@@ -80,10 +81,10 @@ tpm20_read(struct cdev *dev, struct uio *uio, int flags)
}
bytes_to_transfer = MIN(sc->pending_data_length, uio->uio_resid);
+ offset = sc->total_length - sc->pending_data_length;
if (bytes_to_transfer > 0) {
- result = uiomove((caddr_t) sc->buf, bytes_to_transfer, uio);
- memset(sc->buf, 0, TPM_BUFSIZE);
- sc->pending_data_length = 0;
+ result = uiomove((caddr_t) sc->buf + offset, bytes_to_transfer, uio);
+ sc->pending_data_length -= bytes_to_transfer;
cv_signal(&sc->buf_cv);
} else {
result = ETIMEDOUT;
@@ -127,7 +128,7 @@ tpm20_write(struct cdev *dev, struct uio *uio, int flags)
return (result);
}
- result = sc->transmit(sc, byte_count);
+ result = TPM_TRANSMIT(sc->dev, byte_count);
if (result == 0) {
callout_reset(&sc->discard_buffer_callout,
@@ -152,6 +153,7 @@ tpm20_discard_buffer(void *arg)
memset(sc->buf, 0, TPM_BUFSIZE);
sc->pending_data_length = 0;
+ sc->total_length = 0;
cv_signal(&sc->buf_cv);
sx_xunlock(&sc->dev_lock);
@@ -191,6 +193,7 @@ tpm20_init(struct tpm_sc *sc)
cv_init(&sc->buf_cv, "TPM buffer cv");
callout_init(&sc->discard_buffer_callout, 1);
sc->pending_data_length = 0;
+ sc->total_length = 0;
make_dev_args_init(&args);
args.mda_devsw = &tpm20_cdevsw;
@@ -267,7 +270,7 @@ tpm20_harvest(void *arg, int unused)
cv_wait(&sc->buf_cv, &sc->dev_lock);
memcpy(sc->buf, cmd, sizeof(cmd));
- result = sc->transmit(sc, sizeof(cmd));
+ result = TPM_TRANSMIT(sc->dev, sizeof(cmd));
if (result != 0) {
sx_xunlock(&sc->dev_lock);
return;
@@ -275,6 +278,7 @@ tpm20_harvest(void *arg, int unused)
/* Ignore response size */
sc->pending_data_length = 0;
+ sc->total_length = 0;
/* The number of random bytes we got is placed right after the header */
entropy_size = (uint16_t) sc->buf[TPM_HEADER_SIZE + 1];
@@ -319,7 +323,7 @@ tpm20_save_state(device_t dev, bool suspend)
sx_xlock(&sc->dev_lock);
memcpy(sc->buf, save_cmd, sizeof(save_cmd));
- sc->transmit(sc, sizeof(save_cmd));
+ TPM_TRANSMIT(sc->dev, sizeof(save_cmd));
sx_xunlock(&sc->dev_lock);
diff --git a/sys/dev/tpm/tpm20.h b/sys/dev/tpm/tpm20.h
index 14f89de3e84e..7c2ccd30143a 100644
--- a/sys/dev/tpm/tpm20.h
+++ b/sys/dev/tpm/tpm20.h
@@ -28,6 +28,7 @@
#ifndef _TPM20_H_
#define _TPM20_H_
+#include "opt_acpi.h"
#include <sys/cdefs.h>
#include <sys/endian.h>
#include <sys/param.h>
@@ -39,6 +40,7 @@
#include <sys/bus.h>
#include <sys/callout.h>
#include <sys/conf.h>
+#include <sys/lock.h>
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/sx.h>
@@ -49,12 +51,14 @@
#include <machine/md_var.h>
#include <machine/resource.h>
+#ifdef DEV_ACPI
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <dev/acpica/acpivar.h>
-#include "opt_acpi.h"
+#endif
#include "opt_tpm.h"
+#include "tpm_if.h"
#define BIT(x) (1 << (x))
@@ -120,6 +124,7 @@ struct tpm_sc {
uint8_t *buf;
size_t pending_data_length;
+ size_t total_length;
lwpid_t owner_tid;
struct callout discard_buffer_callout;
@@ -136,55 +141,36 @@ int32_t tpm20_get_timeout(uint32_t command);
int tpm20_init(struct tpm_sc *sc);
void tpm20_release(struct tpm_sc *sc);
-/* Small helper routines for io ops */
-static inline uint8_t
-RD1(struct tpm_sc *sc, bus_size_t off)
-{
-
- return (bus_read_1(sc->mem_res, off));
-}
-static inline uint32_t
-RD4(struct tpm_sc *sc, bus_size_t off)
-{
-
- return (bus_read_4(sc->mem_res, off));
-}
-#ifdef __amd64__
-static inline uint64_t
-RD8(struct tpm_sc *sc, bus_size_t off)
-{
+/* Mode driver types */
+DECLARE_CLASS(tpmtis_driver);
+int tpmtis_attach(device_t dev);
- return (bus_read_8(sc->mem_res, off));
-}
-#endif
-static inline void
-WR1(struct tpm_sc *sc, bus_size_t off, uint8_t val)
-{
+DECLARE_CLASS(tpmcrb_driver);
- bus_write_1(sc->mem_res, off, val);
-}
-static inline void
-WR4(struct tpm_sc *sc, bus_size_t off, uint32_t val)
-{
+/* Bus driver types */
+DECLARE_CLASS(tpm_bus_driver);
+DECLARE_CLASS(tpm_spi_driver);
- bus_write_4(sc->mem_res, off, val);
-}
+/* Small helper routines for io ops */
static inline void
AND4(struct tpm_sc *sc, bus_size_t off, uint32_t val)
{
+ uint32_t v = TPM_READ_4(sc->dev, off);
- WR4(sc, off, RD4(sc, off) & val);
+ TPM_WRITE_4(sc->dev, off, v & val);
}
static inline void
OR1(struct tpm_sc *sc, bus_size_t off, uint8_t val)
{
+ uint8_t v = TPM_READ_1(sc->dev, off);
- WR1(sc, off, RD1(sc, off) | val);
+ TPM_WRITE_1(sc->dev, off, v | val);
}
static inline void
OR4(struct tpm_sc *sc, bus_size_t off, uint32_t val)
{
+ uint32_t v = TPM_READ_1(sc->dev, off);
- WR4(sc, off, RD4(sc, off) | val);
+ TPM_WRITE_4(sc->dev, off, v | val);
}
#endif /* _TPM20_H_ */
diff --git a/sys/dev/tpm/tpm_bus.c b/sys/dev/tpm/tpm_bus.c
new file mode 100644
index 000000000000..6e2cc5d81cb6
--- /dev/null
+++ b/sys/dev/tpm/tpm_bus.c
@@ -0,0 +1,99 @@
+/*-
+ * Copyright (c) 2023 Juniper Networks, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/bus.h>
+#include "tpm_if.h"
+#include "tpm20.h"
+
+/* Override accessors */
+static uint8_t
+tpm_read_1(device_t dev, bus_size_t off)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ return (bus_read_1(sc->mem_res, off));
+}
+
+static uint32_t
+tpm_read_4(device_t dev, bus_size_t off)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ return (bus_read_4(sc->mem_res, off));
+}
+
+/*
+ * Only i386 is missing bus_space_read_8.
+ */
+#ifndef __i386__
+static uint64_t
+tpm_read_8(device_t dev, bus_size_t off)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ return (bus_read_8(sc->mem_res, off));
+}
+#endif
+
+static void
+tpm_write_1(device_t dev, bus_size_t off, uint8_t val)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ bus_write_1(sc->mem_res, off, val);
+}
+
+static void
+tpm_write_4(device_t dev, bus_size_t off, uint32_t val)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ bus_write_4(sc->mem_res, off, val);
+}
+
+static void
+tpm_write_barrier(device_t dev, bus_size_t off, bus_size_t length)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ bus_barrier(sc->mem_res, off, length, BUS_SPACE_BARRIER_WRITE);
+}
+
+static device_method_t tpm_bus_methods[] = {
+ DEVMETHOD(tpm_read_1, tpm_read_1),
+ DEVMETHOD(tpm_read_4, tpm_read_4),
+#ifndef __i386__
+ DEVMETHOD(tpm_read_8, tpm_read_8),
+#endif
+ DEVMETHOD(tpm_write_1, tpm_write_1),
+ DEVMETHOD(tpm_write_4, tpm_write_4),
+ DEVMETHOD(tpm_write_barrier, tpm_write_barrier),
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_0(tpm_lbc, tpm_bus_driver, tpm_bus_methods, sizeof(struct tpm_sc));
diff --git a/sys/dev/tpm/tpm_crb.c b/sys/dev/tpm/tpm_crb.c
index bb4df82e613b..017ebd45c7ea 100644
--- a/sys/dev/tpm/tpm_crb.c
+++ b/sys/dev/tpm/tpm_crb.c
@@ -83,7 +83,7 @@ struct tpmcrb_sc {
size_t rsp_buf_size;
};
-int tpmcrb_transmit(struct tpm_sc *sc, size_t size);
+int tpmcrb_transmit(device_t dev, size_t size);
static int tpmcrb_acpi_probe(device_t dev);
static int tpmcrb_attach(device_t dev);
@@ -185,15 +185,15 @@ tpmcrb_attach(device_t dev)
* stored in a single 8 byte one.
*/
#ifdef __amd64__
- crb_sc->rsp_off = RD8(sc, TPM_CRB_CTRL_RSP_ADDR);
+ crb_sc->rsp_off = TPM_READ_8(sc->dev, TPM_CRB_CTRL_RSP_ADDR);
#else
- crb_sc->rsp_off = RD4(sc, TPM_CRB_CTRL_RSP_ADDR);
- crb_sc->rsp_off |= ((uint64_t) RD4(sc, TPM_CRB_CTRL_RSP_HADDR) << 32);
+ crb_sc->rsp_off = TPM_READ_4(sc->dev, TPM_CRB_CTRL_RSP_ADDR);
+ crb_sc->rsp_off |= ((uint64_t) TPM_READ_4(sc->dev, TPM_CRB_CTRL_RSP_HADDR) << 32);
#endif
- crb_sc->cmd_off = RD4(sc, TPM_CRB_CTRL_CMD_LADDR);
- crb_sc->cmd_off |= ((uint64_t) RD4(sc, TPM_CRB_CTRL_CMD_HADDR) << 32);
- crb_sc->cmd_buf_size = RD4(sc, TPM_CRB_CTRL_CMD_SIZE);
- crb_sc->rsp_buf_size = RD4(sc, TPM_CRB_CTRL_RSP_SIZE);
+ crb_sc->cmd_off = TPM_READ_4(sc->dev, TPM_CRB_CTRL_CMD_LADDR);
+ crb_sc->cmd_off |= ((uint64_t) TPM_READ_4(sc->dev, TPM_CRB_CTRL_CMD_HADDR) << 32);
+ crb_sc->cmd_buf_size = TPM_READ_4(sc->dev, TPM_CRB_CTRL_CMD_SIZE);
+ crb_sc->rsp_buf_size = TPM_READ_4(sc->dev, TPM_CRB_CTRL_RSP_SIZE);
tpmcrb_relinquish_locality(sc);
@@ -218,8 +218,6 @@ tpmcrb_attach(device_t dev)
}
}
- sc->transmit = tpmcrb_transmit;
-
result = tpm20_init(sc);
if (result != 0)
tpmcrb_detach(dev);
@@ -248,11 +246,11 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val,
{
/* Check for condition */
- if ((RD4(sc, off) & mask) == val)
+ if ((TPM_READ_4(sc->dev, off) & mask) == val)
return (true);
while (timeout > 0) {
- if ((RD4(sc, off) & mask) == val)
+ if ((TPM_READ_4(sc->dev, off) & mask) == val)
return (true);
pause("TPM in polling mode", 1);
@@ -291,7 +289,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc)
{
uint32_t mask = ~0;
- WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CMD);
+ TPM_WRITE_4(sc->dev, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CMD);
if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START,
mask, ~mask, TPM_TIMEOUT_B)) {
device_printf(sc->dev,
@@ -299,48 +297,50 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc)
return (false);
}
- WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
+ TPM_WRITE_4(sc->dev, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
return (true);
}
int
-tpmcrb_transmit(struct tpm_sc *sc, size_t length)
+tpmcrb_transmit(device_t dev, size_t length)
{
struct tpmcrb_sc *crb_sc;
+ struct tpm_sc *sc;
uint32_t mask, curr_cmd;
int timeout, bytes_available;
- crb_sc = (struct tpmcrb_sc *)sc;
+ crb_sc = device_get_softc(dev);
+ sc = &crb_sc->base;
sx_assert(&sc->dev_lock, SA_XLOCKED);
if (length > crb_sc->cmd_buf_size) {
- device_printf(sc->dev,
+ device_printf(dev,
"Requested transfer is bigger than buffer size\n");
return (E2BIG);
}
- if (RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_ERR_BIT) {
- device_printf(sc->dev,
+ if (TPM_READ_4(dev, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_ERR_BIT) {
+ device_printf(dev,
"Device has Error bit set\n");
return (EIO);
}
if (!tpmcrb_request_locality(sc, 0)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to obtain locality\n");
return (EIO);
}
/* Clear cancellation bit */
- WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
+ TPM_WRITE_4(dev, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
/* Switch device to idle state if necessary */
- if (!(RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) {
+ if (!(TPM_READ_4(dev, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) {
OR4(sc, TPM_CRB_CTRL_REQ, TPM_CRB_CTRL_REQ_GO_IDLE);
mask = TPM_CRB_CTRL_STS_IDLE_BIT;
if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS,
mask, mask, TPM_TIMEOUT_C)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to transition to idle state\n");
return (EIO);
}
@@ -351,7 +351,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
mask = TPM_CRB_CTRL_REQ_GO_READY;
if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_STS,
mask, !mask, TPM_TIMEOUT_C)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to transition to ready state\n");
return (EIO);
}
@@ -366,16 +366,14 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
/* Send command and tell device to process it. */
bus_write_region_stream_1(sc->mem_res, crb_sc->cmd_off,
sc->buf, length);
- bus_barrier(sc->mem_res, crb_sc->cmd_off,
- length, BUS_SPACE_BARRIER_WRITE);
+ TPM_WRITE_BARRIER(dev, crb_sc->cmd_off, length);
- WR4(sc, TPM_CRB_CTRL_START, TPM_CRB_CTRL_START_CMD);
- bus_barrier(sc->mem_res, TPM_CRB_CTRL_START,
- 4, BUS_SPACE_BARRIER_WRITE);
+ TPM_WRITE_4(dev, TPM_CRB_CTRL_START, TPM_CRB_CTRL_START_CMD);
+ TPM_WRITE_BARRIER(dev, TPM_CRB_CTRL_START, 4);
mask = ~0;
if (!tpm_wait_for_u32(sc, TPM_CRB_CTRL_START, mask, ~mask, timeout)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Timeout while waiting for device to process cmd\n");
if (!tpmcrb_cancel_cmd(sc))
return (EIO);
@@ -387,7 +385,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
bytes_available = be32toh(*(uint32_t *) (&sc->buf[2]));
if (bytes_available > TPM_BUFSIZE || bytes_available < TPM_HEADER_SIZE) {
- device_printf(sc->dev,
+ device_printf(dev,
"Incorrect response size: %d\n",
bytes_available);
return (EIO);
@@ -400,6 +398,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
tpmcrb_relinquish_locality(sc);
sc->pending_data_length = bytes_available;
+ sc->total_length = bytes_available;
return (0);
}
@@ -411,11 +410,11 @@ static device_method_t tpmcrb_methods[] = {
DEVMETHOD(device_detach, tpmcrb_detach),
DEVMETHOD(device_shutdown, tpm20_shutdown),
DEVMETHOD(device_suspend, tpm20_suspend),
+ DEVMETHOD(tpm_transmit, tpmcrb_transmit),
{0, 0}
};
-static driver_t tpmcrb_driver = {
- "tpmcrb", tpmcrb_methods, sizeof(struct tpmcrb_sc),
-};
+DEFINE_CLASS_1(tpmcrb, tpmcrb_driver, tpmcrb_methods, sizeof(struct tpmcrb_sc),
+ tpm_bus_driver);
DRIVER_MODULE(tpmcrb, acpi, tpmcrb_driver, 0, 0);
diff --git a/tools/test/stress2/misc/gbde.sh b/sys/dev/tpm/tpm_if.m
index f47d8e9e15bf..b0149ba163a6 100755..100644
--- a/tools/test/stress2/misc/gbde.sh
+++ b/sys/dev/tpm/tpm_if.m
@@ -1,8 +1,6 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2012 Peter Holm <pho@FreeBSD.org>
-# All rights reserved.
+#-
+# Copyright (c) 2023 Juniper Networks, Inc.
+# All Rights Reserved
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -25,31 +23,54 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
+#
+
+#include <sys/bus.h>
+#include <dev/tpm/tpm20.h>
-# "panic: bio_driver1 used by the consumer (geom ffs.md5.bde)" seen
-# http://people.freebsd.org/~pho/stress/log/gbde.txt
+INTERFACE tpm;
-[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+#
+# Transfer data to the TPM data buffer
+#
+METHOD int transmit {
+ device_t dev;
+ size_t length;
+};
-. ../default.cfg
-mdconfig -l | grep -q $mdstart && mdconfig -d -u $mdstart
-mdconfig -a -t swap -s 1g -u $mdstart
+METHOD uint64_t read_8 {
+ device_t dev;
+ bus_size_t addr;
+}
-gbde init /dev/md$mdstart -P pass-phrase || exit
-gbde attach md$mdstart -p pass-phrase || exit
+#
+# Read 4 bytes (host endian) from a TPM register
+#
+METHOD uint32_t read_4 {
+ device_t dev;
+ bus_size_t addr;
+};
-newfs $newfs_flags /dev/md$mdstart.bde > /dev/null
-mount /dev/md$mdstart.bde $mntpoint
-chmod 777 $mntpoint
+METHOD uint8_t read_1 {
+ device_t dev;
+ bus_size_t addr;
+};
-export runRUNTIME=20m
-export RUNDIR=$mntpoint/stressX
+METHOD void write_4 {
+ device_t dev;
+ bus_size_t addr;
+ uint32_t value;
+};
-su $testuser -c 'cd ..; ./run.sh marcus.cfg'
+METHOD void write_1 {
+ device_t dev;
+ bus_size_t addr;
+ uint8_t value;
+};
-while mount | grep $mntpoint | grep -q bde; do
- umount $mntpoint || sleep 1
-done
-gbde detach md$mdstart
-mdconfig -d -u $mdstart
+METHOD void write_barrier {
+ device_t dev;
+ bus_size_t off;
+ bus_size_t length;
+}
diff --git a/sys/dev/tpm/tpm_spibus.c b/sys/dev/tpm/tpm_spibus.c
new file mode 100644
index 000000000000..f83ff42d77b1
--- /dev/null
+++ b/sys/dev/tpm/tpm_spibus.c
@@ -0,0 +1,166 @@
+/*-
+ * Copyright (c) 2023 Juniper Networks, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/bus.h>
+
+#include <dev/spibus/spi.h>
+#include "spibus_if.h"
+#include "tpm_if.h"
+#include "tpm20.h"
+
+#define TPM_BASE_ADDR 0xD40000
+#define TPM_SPI_HEADER_SIZE 4
+#define TPM_WAIT_STATES 50
+
+static void
+tpm_insert_wait(device_t dev)
+{
+ device_t parent = device_get_parent(dev);
+ int wait = TPM_WAIT_STATES;
+ struct spi_command spic = SPI_COMMAND_INITIALIZER;
+
+ uint8_t txb = 0;
+ uint8_t rxb = 0;
+
+ spic.tx_cmd = &txb;
+ spic.rx_cmd = &rxb;
+ spic.tx_cmd_sz = 1;
+ spic.rx_cmd_sz = 1;
+ spic.flags = SPI_FLAG_KEEP_CS;
+ do {
+ SPIBUS_TRANSFER(parent, dev, &spic);
+ } while (--wait > 0 && (rxb & 0x1) == 0);
+}
+
+static inline int
+tpm_spi_read_n(device_t dev, bus_size_t off, void *buf, size_t size)
+{
+ struct spi_command spic = SPI_COMMAND_INITIALIZER;
+ uint8_t tx[4] = {0};
+ uint8_t rx[4] = {0};
+ int err;
+
+ if (size > sizeof(rx))
+ return (EINVAL);
+ off += TPM_BASE_ADDR;
+ tx[0] = 0x80 | (size - 1); /* Write (size) bytes */
+ tx[1] = (off >> 16) & 0xff;
+ tx[2] = (off >> 8) & 0xff;
+ tx[3] = off & 0xff;
+
+ spic.tx_cmd = tx;
+ spic.tx_cmd_sz = sizeof(tx);
+ spic.rx_cmd = rx;
+ spic.rx_cmd_sz = sizeof(tx);
+ spic.flags = SPI_FLAG_KEEP_CS;
+
+ err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic);
+
+ if (!(rx[3] & 0x1)) {
+ tpm_insert_wait(dev);
+ }
+ memset(tx, 0, sizeof(tx));
+ spic.tx_cmd_sz = spic.rx_cmd_sz = size;
+ spic.flags = 0;
+ err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic);
+ memcpy(buf, &rx[0], size);
+
+ return (err);
+}
+
+static inline int
+tpm_spi_write_n(device_t dev, bus_size_t off, void *buf, size_t size)
+{
+ struct spi_command spic = SPI_COMMAND_INITIALIZER;
+ uint8_t tx[8] = {0};
+ uint8_t rx[8] = {0};
+ int err;
+
+ off += TPM_BASE_ADDR;
+ tx[0] = 0x00 | (size - 1); /* Write (size) bytes */
+ tx[1] = (off >> 16) & 0xff;
+ tx[2] = (off >> 8) & 0xff;
+ tx[3] = off & 0xff;
+
+ memcpy(&tx[4], buf, size);
+
+ spic.tx_cmd = tx;
+ spic.tx_cmd_sz = size + TPM_SPI_HEADER_SIZE;
+ spic.rx_cmd = rx;
+ spic.rx_cmd_sz = size + TPM_SPI_HEADER_SIZE;
+
+ err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &spic);
+
+ return (err);
+}
+
+/* Override accessors */
+static inline uint8_t
+spi_read_1(device_t dev, bus_size_t off)
+{
+ uint8_t rx_byte;
+
+ tpm_spi_read_n(dev, off, &rx_byte, 1);
+
+ return (rx_byte);
+}
+
+static inline uint32_t
+spi_read_4(device_t dev, bus_size_t off)
+{
+ uint32_t rx_word = 0;
+
+ tpm_spi_read_n(dev, off, &rx_word, 4);
+ rx_word = le32toh(rx_word);
+
+ return (rx_word);
+}
+
+static inline void
+spi_write_1(device_t dev, bus_size_t off, uint8_t val)
+{
+ tpm_spi_write_n(dev, off, &val, 1);
+}
+
+static inline void
+spi_write_4(device_t dev, bus_size_t off, uint32_t val)
+{
+ uint32_t tmp = htole32(val);
+ tpm_spi_write_n(dev, off, &tmp, 4);
+}
+
+static device_method_t tpm_spibus_methods[] = {
+ DEVMETHOD(tpm_read_4, spi_read_4),
+ DEVMETHOD(tpm_read_1, spi_read_1),
+ DEVMETHOD(tpm_write_4, spi_write_4),
+ DEVMETHOD(tpm_write_1, spi_write_1),
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_0(tpm_spi, tpm_spi_driver, tpm_spibus_methods,
+ sizeof(struct tpm_sc));
diff --git a/sys/dev/tpm/tpm_tis_acpi.c b/sys/dev/tpm/tpm_tis_acpi.c
new file mode 100644
index 000000000000..32c73e5f2483
--- /dev/null
+++ b/sys/dev/tpm/tpm_tis_acpi.c
@@ -0,0 +1,86 @@
+/*-
+ * Copyright (c) 2018 Stormshield.
+ * Copyright (c) 2018 Semihalf.
+ * Copyright (c) 2023 Juniper Networks, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#include "tpm20.h"
+#include "tpm_if.h"
+
+static int tpmtis_acpi_probe(device_t dev);
+
+char *tpmtis_ids[] = {"MSFT0101", NULL};
+
+static int
+tpmtis_acpi_probe(device_t dev)
+{
+ int err;
+ ACPI_TABLE_TPM23 *tbl;
+ ACPI_STATUS status;
+
+ err = ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL);
+ if (err > 0)
+ return (err);
+ /*Find TPM2 Header*/
+ status = AcpiGetTable(ACPI_SIG_TPM2, 1, (ACPI_TABLE_HEADER **) &tbl);
+ if(ACPI_FAILURE(status) ||
+ tbl->StartMethod != TPM2_START_METHOD_TIS)
+ err = ENXIO;
+
+ device_set_desc(dev, "Trusted Platform Module 2.0, FIFO mode");
+ return (err);
+}
+
+static int
+tpmtis_acpi_attach(device_t dev)
+{
+ struct tpm_sc *sc = device_get_softc(dev);
+
+ sc->mem_rid = 0;
+ sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
+ RF_ACTIVE);
+ if (sc->mem_res == NULL) {
+ return (ENXIO);
+ }
+
+ /*
+ * If tpmtis_attach() fails, tpmtis_detach() will automatically free
+ * sc->mem_res (not-NULL).
+ */
+ return (tpmtis_attach(dev));
+}
+
+/* ACPI Driver */
+static device_method_t tpmtis_methods[] = {
+ DEVMETHOD(device_attach, tpmtis_acpi_attach),
+ DEVMETHOD(device_probe, tpmtis_acpi_probe),
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_2(tpmtis, tpmtis_acpi_driver, tpmtis_methods,
+ sizeof(struct tpm_sc), tpmtis_driver, tpm_bus_driver);
+
+DRIVER_MODULE(tpmtis, acpi, tpmtis_driver, 0, 0);
diff --git a/sys/dev/tpm/tpm_tis.c b/sys/dev/tpm/tpm_tis_core.c
index b97d7ab3f8e8..d8421f8156c9 100644
--- a/sys/dev/tpm/tpm_tis.c
+++ b/sys/dev/tpm/tpm_tis_core.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
#include "tpm20.h"
+#include "tpm_if.h"
/*
* TIS register space as defined in
@@ -72,10 +73,8 @@
#define TPM_STS_BURST_MASK 0xFFFF00
#define TPM_STS_BURST_OFFSET 0x8
-static int tpmtis_transmit(struct tpm_sc *sc, size_t length);
+static int tpmtis_transmit(device_t dev, size_t length);
-static int tpmtis_acpi_probe(device_t dev);
-static int tpmtis_attach(device_t dev);
static int tpmtis_detach(device_t dev);
static void tpmtis_intr_handler(void *arg);
@@ -93,29 +92,7 @@ static bool tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off,
static uint16_t tpmtis_wait_for_burst(struct tpm_sc *sc);
-char *tpmtis_ids[] = {"MSFT0101", NULL};
-
-static int
-tpmtis_acpi_probe(device_t dev)
-{
- int err;
- ACPI_TABLE_TPM23 *tbl;
- ACPI_STATUS status;
-
- err = ACPI_ID_PROBE(device_get_parent(dev), dev, tpmtis_ids, NULL);
- if (err > 0)
- return (err);
- /*Find TPM2 Header*/
- status = AcpiGetTable(ACPI_SIG_TPM2, 1, (ACPI_TABLE_HEADER **) &tbl);
- if(ACPI_FAILURE(status) ||
- tbl->StartMethod != TPM2_START_METHOD_TIS)
- err = ENXIO;
-
- device_set_desc(dev, "Trusted Platform Module 2.0, FIFO mode");
- return (err);
-}
-
-static int
+int
tpmtis_attach(device_t dev)
{
struct tpm_sc *sc;
@@ -123,20 +100,11 @@ tpmtis_attach(device_t dev)
sc = device_get_softc(dev);
sc->dev = dev;
- sc->transmit = tpmtis_transmit;
sc->intr_type = -1;
sx_init(&sc->dev_lock, "TPM driver lock");
sc->buf = malloc(TPM_BUFSIZE, M_TPM20, M_WAITOK);
- sc->mem_rid = 0;
- sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
- RF_ACTIVE);
- if (sc->mem_res == NULL) {
- tpmtis_detach(dev);
- return (ENXIO);
- }
-
sc->irq_rid = 0;
sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid,
RF_ACTIVE | RF_SHAREABLE);
@@ -198,7 +166,7 @@ tpmtis_test_intr(struct tpm_sc *sc)
sx_xlock(&sc->dev_lock);
memcpy(sc->buf, cmd, sizeof(cmd));
- tpmtis_transmit(sc, sizeof(cmd));
+ tpmtis_transmit(sc->dev, sizeof(cmd));
sc->pending_data_length = 0;
sx_xunlock(&sc->dev_lock);
}
@@ -222,19 +190,19 @@ tpmtis_setup_intr(struct tpm_sc *sc)
if(!tpmtis_request_locality(sc, 0))
sc->interrupts = false;
- WR1(sc, TPM_INT_VECTOR, irq);
+ TPM_WRITE_1(sc->dev, TPM_INT_VECTOR, irq);
/* Clear all pending interrupts. */
- reg = RD4(sc, TPM_INT_STS);
- WR4(sc, TPM_INT_STS, reg);
+ reg = TPM_READ_4(sc->dev, TPM_INT_STS);
+ TPM_WRITE_4(sc->dev, TPM_INT_STS, reg);
- reg = RD4(sc, TPM_INT_ENABLE);
+ reg = TPM_READ_4(sc->dev, TPM_INT_ENABLE);
reg |= TPM_INT_ENABLE_GLOBAL_ENABLE |
TPM_INT_ENABLE_DATA_AVAIL |
TPM_INT_ENABLE_LOC_CHANGE |
TPM_INT_ENABLE_CMD_RDY |
TPM_INT_ENABLE_STS_VALID;
- WR4(sc, TPM_INT_ENABLE, reg);
+ TPM_WRITE_4(sc->dev, TPM_INT_ENABLE, reg);
tpmtis_relinquish_locality(sc);
tpmtis_test_intr(sc);
@@ -247,9 +215,9 @@ tpmtis_intr_handler(void *arg)
uint32_t status;
sc = (struct tpm_sc *)arg;
- status = RD4(sc, TPM_INT_STS);
+ status = TPM_READ_4(sc->dev, TPM_INT_STS);
- WR4(sc, TPM_INT_STS, status);
+ TPM_WRITE_4(sc->dev, TPM_INT_STS, status);
/* Check for stray interrupts. */
if (sc->intr_type == -1 || (sc->intr_type & status) == 0)
@@ -265,7 +233,7 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val,
{
/* Check for condition */
- if ((RD4(sc, off) & mask) == val)
+ if ((TPM_READ_4(sc->dev, off) & mask) == val)
return (true);
/* If interrupts are enabled sleep for timeout duration */
@@ -273,12 +241,12 @@ tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off, uint32_t mask, uint32_t val,
tsleep(sc, PWAIT, "TPM WITH INTERRUPTS", timeout / tick);
sc->intr_type = -1;
- return ((RD4(sc, off) & mask) == val);
+ return ((TPM_READ_4(sc->dev, off) & mask) == val);
}
/* If we don't have interrupts poll the device every tick */
while (timeout > 0) {
- if ((RD4(sc, off) & mask) == val)
+ if ((TPM_READ_4(sc->dev, off) & mask) == val)
return (true);
pause("TPM POLLING", 1);
@@ -296,7 +264,7 @@ tpmtis_wait_for_burst(struct tpm_sc *sc)
timeout = TPM_TIMEOUT_A;
while (timeout-- > 0) {
- burst_count = (RD4(sc, TPM_STS) & TPM_STS_BURST_MASK) >>
+ burst_count = (TPM_READ_4(sc->dev, TPM_STS) & TPM_STS_BURST_MASK) >>
TPM_STS_BURST_OFFSET;
if (burst_count > 0)
break;
@@ -320,7 +288,7 @@ tpmtis_read_bytes(struct tpm_sc *sc, size_t count, uint8_t *buf)
count -= burst_count;
while (burst_count-- > 0)
- *buf++ = RD1(sc, TPM_DATA_FIFO);
+ *buf++ = TPM_READ_1(sc->dev, TPM_DATA_FIFO);
}
return (true);
@@ -340,7 +308,7 @@ tpmtis_write_bytes(struct tpm_sc *sc, size_t count, uint8_t *buf)
count -= burst_count;
while (burst_count-- > 0)
- WR1(sc, TPM_DATA_FIFO, *buf++);
+ TPM_WRITE_1(sc->dev, TPM_DATA_FIFO, *buf++);
}
return (true);
@@ -360,14 +328,14 @@ tpmtis_request_locality(struct tpm_sc *sc, int locality)
timeout = TPM_TIMEOUT_A;
sc->intr_type = TPM_INT_STS_LOC_CHANGE;
- WR1(sc, TPM_ACCESS, TPM_ACCESS_LOC_REQ);
- bus_barrier(sc->mem_res, TPM_ACCESS, 1, BUS_SPACE_BARRIER_WRITE);
+ TPM_WRITE_1(sc->dev, TPM_ACCESS, TPM_ACCESS_LOC_REQ);
+ TPM_WRITE_BARRIER(sc->dev, TPM_ACCESS, 1);
if(sc->interrupts) {
tsleep(sc, PWAIT, "TPMLOCREQUEST with INTR", timeout / tick);
- return ((RD1(sc, TPM_ACCESS) & mask) == mask);
+ return ((TPM_READ_1(sc->dev, TPM_ACCESS) & mask) == mask);
} else {
while(timeout > 0) {
- if ((RD1(sc, TPM_ACCESS) & mask) == mask)
+ if ((TPM_READ_1(sc->dev, TPM_ACCESS) & mask) == mask)
return (true);
pause("TPMLOCREQUEST POLLING", 1);
@@ -387,7 +355,7 @@ tpmtis_relinquish_locality(struct tpm_sc *sc)
* Clear them now in case interrupt handler didn't make it in time.
*/
if(sc->interrupts)
- AND4(sc, TPM_INT_STS, RD4(sc, TPM_INT_STS));
+ AND4(sc, TPM_INT_STS, TPM_READ_4(sc->dev, TPM_INT_STS));
OR1(sc, TPM_ACCESS, TPM_ACCESS_LOC_RELINQUISH);
}
@@ -400,8 +368,8 @@ tpmtis_go_ready(struct tpm_sc *sc)
mask = TPM_STS_CMD_RDY;
sc->intr_type = TPM_INT_STS_CMD_RDY;
- WR4(sc, TPM_STS, TPM_STS_CMD_RDY);
- bus_barrier(sc->mem_res, TPM_STS, 4, BUS_SPACE_BARRIER_WRITE);
+ TPM_WRITE_4(sc->dev, TPM_STS, TPM_STS_CMD_RDY);
+ TPM_WRITE_BARRIER(sc->dev, TPM_STS, 4);
if (!tpm_wait_for_u32(sc, TPM_STS, mask, mask, TPM_TIMEOUT_B))
return (false);
@@ -409,26 +377,28 @@ tpmtis_go_ready(struct tpm_sc *sc)
}
static int
-tpmtis_transmit(struct tpm_sc *sc, size_t length)
+tpmtis_transmit(device_t dev, size_t length)
{
+ struct tpm_sc *sc;
size_t bytes_available;
uint32_t mask, curr_cmd;
int timeout;
+ sc = device_get_softc(dev);
sx_assert(&sc->dev_lock, SA_XLOCKED);
if (!tpmtis_request_locality(sc, 0)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to obtain locality\n");
return (EIO);
}
if (!tpmtis_go_ready(sc)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to switch to ready state\n");
return (EIO);
}
if (!tpmtis_write_bytes(sc, length, sc->buf)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to write cmd to device\n");
return (EIO);
}
@@ -436,12 +406,12 @@ tpmtis_transmit(struct tpm_sc *sc, size_t length)
mask = TPM_STS_VALID;
sc->intr_type = TPM_INT_STS_VALID;
if (!tpm_wait_for_u32(sc, TPM_STS, mask, mask, TPM_TIMEOUT_C)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Timeout while waiting for valid bit\n");
return (EIO);
}
- if (RD4(sc, TPM_STS) & TPM_STS_DATA_EXPECTED) {
- device_printf(sc->dev,
+ if (TPM_READ_4(dev, TPM_STS) & TPM_STS_DATA_EXPECTED) {
+ device_printf(dev,
"Device expects more data even though we already"
" sent everything we had\n");
return (EIO);
@@ -454,13 +424,13 @@ tpmtis_transmit(struct tpm_sc *sc, size_t length)
curr_cmd = be32toh(*(uint32_t *) (&sc->buf[6]));
timeout = tpm20_get_timeout(curr_cmd);
- WR4(sc, TPM_STS, TPM_STS_CMD_START);
- bus_barrier(sc->mem_res, TPM_STS, 4, BUS_SPACE_BARRIER_WRITE);
+ TPM_WRITE_4(dev, TPM_STS, TPM_STS_CMD_START);
+ TPM_WRITE_BARRIER(dev, TPM_STS, 4);
mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID;
sc->intr_type = TPM_INT_STS_DATA_AVAIL;
if (!tpm_wait_for_u32(sc, TPM_STS, mask, mask, timeout)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Timeout while waiting for device to process cmd\n");
/*
* Switching to ready state also cancels processing
@@ -479,42 +449,39 @@ tpmtis_transmit(struct tpm_sc *sc, size_t length)
}
/* Read response header. Length is passed in bytes 2 - 6. */
if(!tpmtis_read_bytes(sc, TPM_HEADER_SIZE, sc->buf)) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to read response header\n");
return (EIO);
}
bytes_available = be32toh(*(uint32_t *) (&sc->buf[2]));
if (bytes_available > TPM_BUFSIZE || bytes_available < TPM_HEADER_SIZE) {
- device_printf(sc->dev,
+ device_printf(dev,
"Incorrect response size: %zu\n",
bytes_available);
return (EIO);
}
if(!tpmtis_read_bytes(sc, bytes_available - TPM_HEADER_SIZE,
&sc->buf[TPM_HEADER_SIZE])) {
- device_printf(sc->dev,
+ device_printf(dev,
"Failed to read response\n");
return (EIO);
}
tpmtis_relinquish_locality(sc);
sc->pending_data_length = bytes_available;
+ sc->total_length = bytes_available;
return (0);
}
/* ACPI Driver */
static device_method_t tpmtis_methods[] = {
- DEVMETHOD(device_probe, tpmtis_acpi_probe),
DEVMETHOD(device_attach, tpmtis_attach),
DEVMETHOD(device_detach, tpmtis_detach),
DEVMETHOD(device_shutdown, tpm20_shutdown),
DEVMETHOD(device_suspend, tpm20_suspend),
- {0, 0}
-};
-
-static driver_t tpmtis_driver = {
- "tpmtis", tpmtis_methods, sizeof(struct tpm_sc),
+ DEVMETHOD(tpm_transmit, tpmtis_transmit),
+ DEVMETHOD_END
};
-DRIVER_MODULE(tpmtis, acpi, tpmtis_driver, 0, 0);
+DEFINE_CLASS_0(tpmtis, tpmtis_driver, tpmtis_methods, sizeof(struct tpm_sc));
diff --git a/sys/dev/tpm/tpm_tis_spibus.c b/sys/dev/tpm/tpm_tis_spibus.c
new file mode 100644
index 000000000000..90be8deacb8b
--- /dev/null
+++ b/sys/dev/tpm/tpm_tis_spibus.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2023 Juniper Networks, Inc.
+ * All rights reserved.
+ */
+/*-
+ * Copyright (c) 2018 Stormshield.
+ * Copyright (c) 2018 Semihalf.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* Based *heavily* on the tpm_tis driver. */
+
+#include "opt_platform.h"
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/endian.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/module.h>
+#include <sys/sx.h>
+
+#include <dev/spibus/spi.h>
+#include <dev/tpm/tpm20.h>
+
+#include "spibus_if.h"
+#include "tpm_if.h"
+
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+static struct ofw_compat_data compatible_data[] = {
+ {"infineon,slb9670", true},
+ {"tcg,tpm_tis-spi", true},
+ {NULL, false}
+};
+
+static int
+tpm_spi_probe(device_t dev)
+{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ if (!ofw_bus_search_compatible(dev, compatible_data)->ocd_data)
+ return (ENXIO);
+
+ device_set_desc(dev, "Trusted Platform Module 2.0, SPI Mode");
+
+ return (BUS_PROBE_DEFAULT);
+}
+
+static device_method_t tpm_methods[] = {
+ DEVMETHOD(device_probe, tpm_spi_probe),
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_2(tpm, tpm_driver, tpm_methods, sizeof(struct tpm_sc),
+ tpmtis_driver, tpm_spi_driver);
+
+#if __FreeBSD_version < 1400067
+static devclass_t tpm_devclass;
+
+DRIVER_MODULE(tpm, spibus, tpm_driver, tpm_devclass, NULL, NULL);
+#else
+DRIVER_MODULE(tpm, spibus, tpm_driver, NULL, NULL);
+#endif
+MODULE_DEPEND(tpm, spibus, 1, 1, 1);
+MODULE_VERSION(tpm, 1);
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c
index 7725d09e212b..431f2962adb2 100644
--- a/sys/dev/uart/uart_bus_fdt.c
+++ b/sys/dev/uart/uart_bus_fdt.c
@@ -234,7 +234,8 @@ uart_cpu_fdt_probe(struct uart_class **classp, bus_space_tag_t *bst,
(struct uart_class *)uart_fdt_find_by_node(node, 1);
if (class == NULL)
return (ENXIO);
- clk = 0;
+ if (uart_fdt_get_clock(node, &clk) != 0)
+ clk = 0;
}
/*
diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c
index 9c9ffc1e3194..53fe459e64a1 100644
--- a/sys/dev/uart/uart_cpu_acpi.c
+++ b/sys/dev/uart/uart_cpu_acpi.c
@@ -210,12 +210,95 @@ out:
return (error);
}
+static int
+uart_cpu_acpi_dbg2(struct uart_devinfo *di)
+{
+ vm_paddr_t dbg2_physaddr;
+ ACPI_TABLE_DBG2 *dbg2;
+ ACPI_DBG2_DEVICE *dbg2_dev;
+ ACPI_GENERIC_ADDRESS *base_address;
+ struct acpi_uart_compat_data *cd;
+ struct uart_class *class;
+ int error;
+ bool found;
+
+ /* Look for the SPCR table. */
+ dbg2_physaddr = acpi_find_table(ACPI_SIG_DBG2);
+ if (dbg2_physaddr == 0)
+ return (ENXIO);
+
+ dbg2 = acpi_map_table(dbg2_physaddr, ACPI_SIG_DBG2);
+ if (dbg2 == NULL) {
+ printf("Unable to map the DBG2 table!\n");
+ return (ENXIO);
+ }
+
+ error = ENXIO;
+
+ dbg2_dev = (ACPI_DBG2_DEVICE *)((vm_offset_t)dbg2 + dbg2->InfoOffset);
+ found = false;
+ while ((vm_offset_t)dbg2_dev + dbg2_dev->Length <=
+ (vm_offset_t)dbg2 + dbg2->Header.Length) {
+ if (dbg2_dev->PortType != ACPI_DBG2_SERIAL_PORT)
+ goto next;
+
+ /* XXX: Too restrictive? */
+ if (dbg2_dev->RegisterCount != 1)
+ goto next;
+
+ cd = uart_cpu_acpi_scan(dbg2_dev->PortSubtype);
+ if (cd == NULL)
+ goto next;
+
+ class = cd->cd_class;
+ base_address = (ACPI_GENERIC_ADDRESS *)
+ ((vm_offset_t)dbg2_dev + dbg2_dev->BaseAddressOffset);
+
+ error = uart_cpu_acpi_init_devinfo(di, class, base_address);
+ if (error == 0) {
+ found = true;
+ break;
+ }
+
+next:
+ dbg2_dev = (ACPI_DBG2_DEVICE *)
+ ((vm_offset_t)dbg2_dev + dbg2_dev->Length);
+ }
+ if (!found)
+ goto out;
+
+ /* XXX: Find the correct value */
+ di->baudrate = 115200;
+
+ /* Apply device tweaks. */
+ if ((cd->cd_quirks & UART_F_IGNORE_SPCR_REGSHFT) ==
+ UART_F_IGNORE_SPCR_REGSHFT) {
+ di->bas.regshft = cd->cd_regshft;
+ }
+
+ /* Create a bus space handle. */
+ error = bus_space_map(di->bas.bst, base_address->Address,
+ uart_getrange(class), 0, &di->bas.bsh);
+
+out:
+ acpi_unmap_table(dbg2);
+ return (error);
+}
+
int
uart_cpu_acpi_setup(int devtype, struct uart_devinfo *di)
{
+ char *cp;
+
switch(devtype) {
case UART_DEV_CONSOLE:
return (uart_cpu_acpi_spcr(devtype, di));
+ case UART_DEV_DBGPORT:
+ /* Use the Debug Port Table 2 (DBG2) to find a debug uart */
+ cp = kern_getenv("hw.acpi.enable_dbg2");
+ if (cp != NULL && strcasecmp(cp, "yes") == 0)
+ return (uart_cpu_acpi_dbg2(di));
+ break;
}
return (ENXIO);
}
diff --git a/sys/dev/usb/net/if_smsc.c b/sys/dev/usb/net/if_smsc.c
index a59501b6bbff..58809de4ad3a 100644
--- a/sys/dev/usb/net/if_smsc.c
+++ b/sys/dev/usb/net/if_smsc.c
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
/*
- * SMSC LAN9xxx devices (http://www.smsc.com/)
+ * Microchip LAN9xxx devices (https://www.microchip.com/en-us/product/lan9500a)
*
* The LAN9500 & LAN9500A devices are stand-alone USB to Ethernet chips that
* support USB 2.0 and 10/100 Mbps Ethernet.
@@ -38,7 +38,7 @@
* supports the hub part.
*
* This driver is closely modelled on the Linux driver written and copyrighted
- * by SMSC.
+ * by SMSC (later acquired by Microchip).
*
*
*
diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c
index a0a7b3fc75a5..11be1215062e 100644
--- a/sys/dev/usb/quirk/usb_quirk.c
+++ b/sys/dev/usb/quirk/usb_quirk.c
@@ -74,572 +74,522 @@ struct usb_quirk_entry {
static struct mtx usb_quirk_mtx;
-#define USB_QUIRK_VP(v,p,l,h,...) \
- { .vid = (v), .pid = (p), .lo_rev = (l), .hi_rev = (h), \
- .quirks = { __VA_ARGS__ } }
-#define USB_QUIRK(v,p,l,h,...) \
- USB_QUIRK_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, l, h, __VA_ARGS__)
+#define USB_QUIRK(v, p, ...) { \
+ .vid = USB_VENDOR_##v, .pid = USB_PRODUCT_##v##_##p, .lo_rev = 0x0000, \
+ .hi_rev = 0xffff, .quirks = { __VA_ARGS__ } \
+}
+
+/* Vendor only */
+#define USB_QUIRK_VO(v, ...) { \
+ .vid = USB_VENDOR_##v, .pid = 0x0000, .lo_rev = 0x0000, .hi_rev = 0xffff, \
+ .quirks = { UQ_MATCH_VENDOR_ONLY, __VA_ARGS__ } \
+}
+
+/* Specific revision(s) */
+#define USB_QUIRK_REV(v, p, l, h, ...) { \
+ .vid = USB_VENDOR_##v, .pid = USB_PRODUCT_##v##_##p, .lo_rev = (l), \
+ .hi_rev = (h), .quirks = { __VA_ARGS__ } \
+}
static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
- USB_QUIRK(ASUS, LCM, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(INSIDEOUT, EDGEPORT4, 0x094, 0x094, UQ_SWAP_UNICODE),
- USB_QUIRK(DALLAS, J6502, 0x0a2, 0x0a2, UQ_BAD_ADC),
- USB_QUIRK(DALLAS, J6502, 0x0a2, 0x0a2, UQ_AU_NO_XU),
- USB_QUIRK(ALTEC, ADA70, 0x103, 0x103, UQ_BAD_ADC),
- USB_QUIRK(ALTEC, ASC495, 0x000, 0x000, UQ_BAD_AUDIO),
- USB_QUIRK(QTRONIX, 980N, 0x110, 0x110, UQ_SPUR_BUT_UP),
- USB_QUIRK(ALCOR2, KBD_HUB, 0x001, 0x001, UQ_SPUR_BUT_UP),
- USB_QUIRK(MCT, HUB0100, 0x102, 0x102, UQ_BUS_POWERED),
- USB_QUIRK(MCT, USB232, 0x102, 0x102, UQ_BUS_POWERED),
- USB_QUIRK(TI, UTUSB41, 0x110, 0x110, UQ_POWER_CLAIM),
- USB_QUIRK(TELEX, MIC1, 0x009, 0x009, UQ_AU_NO_FRAC),
- USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC),
- USB_QUIRK(LOGITECH, UN53B, 0x0000, 0xffff, UQ_NO_STRINGS),
- USB_QUIRK(LOGITECH, G510S, 0x0000, 0xFFFF, UQ_KBD_BOOTPROTO),
- USB_QUIRK(REALTEK, RTL8196EU, 0x0000, 0xffff, UQ_CFG_INDEX_1),
- USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1),
- USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1),
- USB_QUIRK(CISCOLINKSYS, USB3GIGV1, 0x0000, 0xffff, UQ_CFG_INDEX_1),
- USB_QUIRK(REALTEK, RTL8156, 0x0000, 0xffff, UQ_CFG_INDEX_2),
+ USB_QUIRK(ASUS, LCM, UQ_HID_IGNORE),
+ USB_QUIRK_REV(INSIDEOUT, EDGEPORT4, 0x094, 0x094, UQ_SWAP_UNICODE),
+ USB_QUIRK_REV(DALLAS, J6502, 0x0a2, 0x0a2, UQ_BAD_ADC),
+ USB_QUIRK_REV(DALLAS, J6502, 0x0a2, 0x0a2, UQ_AU_NO_XU),
+ USB_QUIRK_REV(ALTEC, ADA70, 0x103, 0x103, UQ_BAD_ADC),
+ USB_QUIRK_REV(ALTEC, ASC495, 0x000, 0x000, UQ_BAD_AUDIO),
+ USB_QUIRK_REV(QTRONIX, 980N, 0x110, 0x110, UQ_SPUR_BUT_UP),
+ USB_QUIRK_REV(ALCOR2, KBD_HUB, 0x001, 0x001, UQ_SPUR_BUT_UP),
+ USB_QUIRK_REV(MCT, HUB0100, 0x102, 0x102, UQ_BUS_POWERED),
+ USB_QUIRK_REV(MCT, USB232, 0x102, 0x102, UQ_BUS_POWERED),
+ USB_QUIRK_REV(TI, UTUSB41, 0x110, 0x110, UQ_POWER_CLAIM),
+ USB_QUIRK_REV(TELEX, MIC1, 0x009, 0x009, UQ_AU_NO_FRAC),
+ USB_QUIRK_REV(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC),
+ USB_QUIRK(LOGITECH, UN53B, UQ_NO_STRINGS),
+ USB_QUIRK(LOGITECH, G510S, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(REALTEK, RTL8196EU, UQ_CFG_INDEX_1),
+ USB_QUIRK(ELSA, MODEM1, UQ_CFG_INDEX_1),
+ USB_QUIRK(PLANEX2, MZKUE150N, UQ_CFG_INDEX_1),
+ USB_QUIRK(CISCOLINKSYS, USB3GIGV1, UQ_CFG_INDEX_1),
+ USB_QUIRK(REALTEK, RTL8156, UQ_CFG_INDEX_2),
/* Quirks for printer devices */
- USB_QUIRK(HP, 895C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
- USB_QUIRK(HP, 880C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
- USB_QUIRK(HP, 815C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
- USB_QUIRK(HP, 810C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
- USB_QUIRK(HP, 830C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
- USB_QUIRK(HP, 1220C, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
- USB_QUIRK(XEROX, WCM15, 0x0000, 0xffff, UQ_BROKEN_BIDIR),
+ USB_QUIRK(HP, 895C, UQ_BROKEN_BIDIR),
+ USB_QUIRK(HP, 880C, UQ_BROKEN_BIDIR),
+ USB_QUIRK(HP, 815C, UQ_BROKEN_BIDIR),
+ USB_QUIRK(HP, 810C, UQ_BROKEN_BIDIR),
+ USB_QUIRK(HP, 830C, UQ_BROKEN_BIDIR),
+ USB_QUIRK(HP, 1220C, UQ_BROKEN_BIDIR),
+ USB_QUIRK(XEROX, WCM15, UQ_BROKEN_BIDIR),
/* Devices which should be ignored by uhid */
- USB_QUIRK(APC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(APC, UPS1000, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6H375USB, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C550AVR, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C1250TWRK, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C1500TWRK, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C900UNV, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C100UNV, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C120UNV, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C800UNV, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(BELKIN, F6C1100UNV, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(CYBERPOWER, BC900D, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(CYBERPOWER, OR2200LCDRM2U, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(DELL2, VARIOUS_UPS, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(MICROCHIP, PICOLCD20X2, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(MICROCHIP, PICOLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(LIEBERT2, PSI1000, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(LIEBERT2, POWERSURE_PSA, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(POWERCOM, IMPERIAL_SERIES, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(POWERCOM, SMART_KING_PRO, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(POWERCOM, WOW, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(POWERCOM, VANGUARD, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(POWERCOM, BLACK_KNIGHT_PRO, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, AVR550U, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, AVR750U, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, ECO550UPS, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, T750_INTL, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, RT_2200_INTL, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, OMNI1000LCD, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, OMNI900LCD, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, SMART_2200RMXL2U, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, UPS_3014, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, SU6000RT4U, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA_2, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(APPLE, IPHONE_3G, 0x0000, 0xffff, UQ_HID_IGNORE),
- USB_QUIRK(MEGATEC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE),
+ USB_QUIRK(APC, UPS, UQ_HID_IGNORE),
+ USB_QUIRK(APC, UPS1000, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6H375USB, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C550AVR, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C1250TWRK, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C1500TWRK, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C900UNV, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C100UNV, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C120UNV, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C800UNV, UQ_HID_IGNORE),
+ USB_QUIRK(BELKIN, F6C1100UNV, UQ_HID_IGNORE),
+ USB_QUIRK(CYBERPOWER, BC900D, UQ_HID_IGNORE),
+ USB_QUIRK(CYBERPOWER, 1500CAVRLCD, UQ_HID_IGNORE),
+ USB_QUIRK(CYBERPOWER, OR2200LCDRM2U, UQ_HID_IGNORE),
+ USB_QUIRK(DELL2, VARIOUS_UPS, UQ_HID_IGNORE),
+ USB_QUIRK(CYPRESS, SILVERSHIELD, UQ_HID_IGNORE),
+ USB_QUIRK(DELORME, EARTHMATE, UQ_HID_IGNORE),
+ USB_QUIRK(DREAMLINK, DL100B, UQ_HID_IGNORE),
+ USB_QUIRK(MICROCHIP, PICOLCD20X2, UQ_HID_IGNORE),
+ USB_QUIRK(MICROCHIP, PICOLCD4X20, UQ_HID_IGNORE),
+ USB_QUIRK(LIEBERT, POWERSURE_PXT, UQ_HID_IGNORE),
+ USB_QUIRK(LIEBERT2, PSI1000, UQ_HID_IGNORE),
+ USB_QUIRK(LIEBERT2, POWERSURE_PSA, UQ_HID_IGNORE),
+ USB_QUIRK(MGE, UPS1, UQ_HID_IGNORE),
+ USB_QUIRK(MGE, UPS2, UQ_HID_IGNORE),
+ USB_QUIRK(POWERCOM, IMPERIAL_SERIES, UQ_HID_IGNORE),
+ USB_QUIRK(POWERCOM, SMART_KING_PRO, UQ_HID_IGNORE),
+ USB_QUIRK(POWERCOM, WOW, UQ_HID_IGNORE),
+ USB_QUIRK(POWERCOM, VANGUARD, UQ_HID_IGNORE),
+ USB_QUIRK(POWERCOM, BLACK_KNIGHT_PRO, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, AVR550U, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, AVR750U, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, ECO550UPS, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, T750_INTL, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, RT_2200_INTL, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, OMNI1000LCD, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, OMNI900LCD, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, SMART_2200RMXL2U, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, UPS_3014, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, SU6000RT4U, UQ_HID_IGNORE),
+ USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA_2, UQ_HID_IGNORE),
+ USB_QUIRK(APPLE, IPHONE, UQ_HID_IGNORE),
+ USB_QUIRK(APPLE, IPHONE_3G, UQ_HID_IGNORE),
+ USB_QUIRK(MEGATEC, UPS, UQ_HID_IGNORE),
/* Devices which should be ignored by both ukbd and uhid */
- USB_QUIRK(CYPRESS, WISPY1A, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
- USB_QUIRK(METAGEEK, WISPY1B, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
- USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
- USB_QUIRK(METAGEEK2, WISPYDBX, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
- USB_QUIRK(TENX, UAUDIO0, 0x0101, 0x0101, UQ_AUDIO_SWAP_LR),
+ USB_QUIRK(CYPRESS, WISPY1A, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+ USB_QUIRK(METAGEEK, WISPY1B, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+ USB_QUIRK(METAGEEK, WISPY24X, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+ USB_QUIRK(METAGEEK2, WISPYDBX, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+ USB_QUIRK_REV(TENX, UAUDIO0, 0x0101, 0x0101, UQ_AUDIO_SWAP_LR),
/* MS keyboards do weird things */
- USB_QUIRK(MICROSOFT, NATURAL4000, 0x0000, 0xFFFF, UQ_KBD_BOOTPROTO),
- USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE),
+ USB_QUIRK(MICROSOFT, NATURAL4000, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, UQ_MS_LEADING_BYTE),
/* Quirk for Corsair Vengeance K60 keyboard */
- USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(CORSAIR, K60, UQ_KBD_BOOTPROTO),
/* Quirk for Corsair Gaming K68 keyboard */
- USB_QUIRK(CORSAIR, K68, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(CORSAIR, K68, UQ_KBD_BOOTPROTO),
/* Quirk for Corsair Vengeance K70 keyboard */
- USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(CORSAIR, K70, UQ_KBD_BOOTPROTO),
/* Quirk for Corsair K70 RGB keyboard */
- USB_QUIRK(CORSAIR, K70_RGB, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(CORSAIR, K70_RGB, UQ_KBD_BOOTPROTO),
/* Quirk for Corsair STRAFE Gaming keyboard */
- USB_QUIRK(CORSAIR, STRAFE, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
- USB_QUIRK(CORSAIR, STRAFE2, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(CORSAIR, STRAFE, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(CORSAIR, STRAFE2, UQ_KBD_BOOTPROTO),
/* Quirk for Kensington Slimblade Trackball */
- USB_QUIRK(KENSINGTON, SLIMBLADE, 0x0000, 0xffff, UQ_MS_VENDOR_BTN),
+ USB_QUIRK(KENSINGTON, SLIMBLADE, UQ_MS_VENDOR_BTN),
/* umodem(4) device quirks */
- USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(MOTOROLA2, T720C, 0x001, 0x001, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(EICON, DIVA852, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(SIEMENS2, ES75, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(QUALCOMM, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA),
- USB_QUIRK(BALTECH, SMARTCARDREADER, 0x0000, 0xffff, UQ_IGNORE_CDC_CM),
+ USB_QUIRK_REV(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK_REV(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK_REV(MOTOROLA2, T720C, 0x001, 0x001, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK_REV(EICON, DIVA852, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK_REV(SIEMENS2, ES75, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(QUALCOMM, CDMA_MSM, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(QUALCOMM2, CDMA_MSM, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(CURITEL, UM150, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(CURITEL, UM175, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(VERTEX, VW110L, UQ_ASSUME_CM_OVER_DATA),
+ USB_QUIRK(BALTECH, SMARTCARDREADER, UQ_IGNORE_CDC_CM),
/* USB Mass Storage Class Quirks */
- USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA,
- UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(ADDON, ATTACHE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK_VO(ASAHIOPTICAL, UQ_MSC_NO_RS_CLEAR_UA),
+ USB_QUIRK(ADDON, ATTACHE, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(ADDON, A256MB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ADDON, A256MB, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(ADDON, DISKPRO512, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ADDON, DISKPRO512, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(ADDONICS2, CABLE_205, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ADDONICS2, CABLE_205, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(AIPTEK, POCKETCAM3M, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(AIPTEK, POCKETCAM3M, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ALCOR, UMCR_9361, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ALCOR, UMCR_9361, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
- UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY),
- USB_QUIRK(APACER, HT202, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(ASAHIOPTICAL, OPTIO230, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ALCOR, TRANSCEND, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE,
+ UQ_MSC_NO_TEST_UNIT_READY),
+ USB_QUIRK(APACER, HT202, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(ASAHIOPTICAL, OPTIO230, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ASAHIOPTICAL, OPTIO330, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(ATP, EUSB, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(BELKIN, USB2SCSI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(CASIO, QV_DIGICAM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(ATP, EUSB, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(BELKIN, USB2SCSI, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(CASIO, QV_DIGICAM, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(CCYU, ED1064, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(CENTURY, EX35QUAT, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(CREATIVE, NOMAD, 0x0001, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(CCYU, ED1064, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(CENTURY, EX35QUAT, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+ USB_QUIRK_REV(CREATIVE, NOMAD, 0x0001, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1),
- USB_QUIRK(CYPRESS, XX6830XX, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(EMTEC, DANEELEC4GB, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(DESKNOTE, UCR_61S2B, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(CYPRESS, XX6830XX, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(EMTEC, DANEELEC4GB, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(DESKNOTE, UCR_61S2B, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(DMI, CFSM_RW, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI,
- UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(EMTEC, RUF2PS, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(EPSON, STYLUS_875DC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(DMI, CFSM_RW, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(EMTEC, RUF2PS, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(EPSON, STYLUS_875DC, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(EPSON, STYLUS_895, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(EPSON, STYLUS_895, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(FEIYA, 5IN1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(FEIYA, ELANGO, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(FREECOM, DVD, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(FUJIPHOTO, MASS0100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I,
+ USB_QUIRK(FEIYA, 5IN1, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(FEIYA, ELANGO, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(FREECOM, DVD, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(FUJIPHOTO, MASS0100, UQ_MSC_FORCE_WIRE_CBI_I,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(GARMIN, DAKOTA20, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(GARMIN, FORERUNNER230, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(GARMIN, GPSMAP62S, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(GARMIN, EDGETOURINGPLUS, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(GARMIN, INSTINCTSOLAR, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(GENESYS, GL641USB2IDE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(GENESYS, GL641USB2IDE_2, 0x0000, 0xffff,
- UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_ATAPI,
- UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP,
- UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(GENESYS, GL641USB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
+ USB_QUIRK(GARMIN, DAKOTA20, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(GARMIN, FORERUNNER230, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(GARMIN, GPSMAP62S, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(GARMIN, EDGETOURINGPLUS, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(GARMIN, INSTINCTSOLAR, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(GENESYS, GL641USB2IDE, UQ_MSC_FORCE_WIRE_BBB,
+ UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP,
+ UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(GENESYS, GL641USB2IDE_2, UQ_MSC_FORCE_WIRE_BBB,
+ UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_FORCE_SHORT_INQ,
UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(GENESYS, GL641USB_2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(GENESYS, GL641USB, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+ USB_QUIRK(GENESYS, GL641USB_2, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_WRONG_CSWSIG),
- USB_QUIRK(GENESYS, GL3220, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY,
- UQ_MSC_NO_RS_CLEAR_UA),
- USB_QUIRK(HAGIWARA, FG, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(HAGIWARA, FGSM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(HITACHI, DVDCAM_DZ_MV100A, 0x0000, 0xffff,
- UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI,
- UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(HITACHI, DVDCAM_USB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I,
+ USB_QUIRK(GENESYS, GL3220, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_RS_CLEAR_UA),
+ USB_QUIRK(HAGIWARA, FG, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(HAGIWARA, FGSM, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(HITACHI, DVDCAM_DZ_MV100A, UQ_MSC_FORCE_WIRE_CBI,
+ UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(HITACHI, DVDCAM_USB, UQ_MSC_FORCE_WIRE_CBI_I,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(HP, CDW4E, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(HP, CDW8200, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I,
- UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_START_STOP),
- USB_QUIRK(HUAWEI, E3372_INIT, 0, 0xffff, UQ_MSC_NO_INQUIRY,
- UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(IMAGINATION, DBX1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(HP, CDW4E, UQ_MSC_FORCE_PROTO_ATAPI),
+ USB_QUIRK(HP, CDW8200, UQ_MSC_FORCE_WIRE_CBI_I, UQ_MSC_FORCE_PROTO_ATAPI,
+ UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP),
+ USB_QUIRK(HUAWEI, E3372_INIT, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(IMAGINATION, DBX1, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_WRONG_CSWSIG),
- USB_QUIRK(INSYSTEM, USBCABLE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_START_STOP, UQ_MSC_ALT_IFACE_1),
- USB_QUIRK(INSYSTEM, ATAPI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(INSYSTEM, USBCABLE, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI,
+ UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP, UQ_MSC_ALT_IFACE_1),
+ USB_QUIRK(INSYSTEM, ATAPI, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC),
+ USB_QUIRK(INSYSTEM, STORAGE_V2, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(INSYSTEM, STORAGE_V2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(VIALABS, VL701, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(IODATA, IU_CD2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(IODATA, DVR_UEH8, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI,
+ USB_QUIRK(VIALABS, VL701, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(IODATA, IU_CD2, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(IODATA, DVR_UEH8, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(IOMEGA, ZIP100, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */
- USB_QUIRK(JMICRON, JMS566, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(JMICRON, JMS567, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI,
+ USB_QUIRK(JMICRON, JMS566, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(JMICRON, JMS567, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(JMICRON, JM20337, UQ_MSC_FORCE_WIRE_BBB,
+ UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(KINGSTON, HYPERX3_0, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(KINGSTON, DATATRAVELER3_0, UQ_MSC_NO_PREVENT_ALLOW,
UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(KINGSTON, HYPERX3_0, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(KINGSTON, DATATRAVELER3_0, 0x0000, 0xffff, UQ_MSC_NO_PREVENT_ALLOW, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(KYOCERA, FINECAM_L3, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(KYOCERA, FINECAM_L3, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(KYOCERA, FINECAM_S3X, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(KYOCERA, FINECAM_S3X, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(KYOCERA, FINECAM_S4, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(KYOCERA, FINECAM_S4, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(KYOCERA, FINECAM_S5, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(KYOCERA, FINECAM_S5, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(LACIE, HD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(LEXAR, CF_READER, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(LACIE, HD, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC),
+ USB_QUIRK(LEXAR, CF_READER, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(LEXAR, JUMPSHOT, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(LEXAR, JUMPDRIVE, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(LOGITEC, LDR_H443SU2, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(LOGITEC, LDR_H443U2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI,),
- USB_QUIRK(MELCO, DUBPXXG, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(MICROTECH, DPCM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_START_STOP),
- USB_QUIRK(MICRON, REALSSD, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(MICROTECH, SCSIDB25, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(LEXAR, JUMPSHOT, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(LEXAR, JUMPDRIVE, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(LOGITEC, LDR_H443SU2, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(LOGITEC, LDR_H443U2, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(MICROTECH, SCSIHD50, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(MELCO, DUBPXXG, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+ USB_QUIRK(MICROTECH, DPCM, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP),
+ USB_QUIRK(MICRON, REALSSD, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(MICROTECH, SCSIDB25, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(MINOLTA, E223, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(MINOLTA, F300, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(MICROTECH, SCSIHD50, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(MITSUMI, CDRRW, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI |
- UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(MOTOROLA2, E398, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK_VP(USB_VENDOR_MPMAN, 0, UQ_MSC_NO_SYNC_CACHE,
- UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(MSYSTEMS, DISKONKEY, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(MINOLTA, E223, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(MINOLTA, F300, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(MITSUMI, CDRRW, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI),
+ USB_QUIRK(MOTOROLA2, E398, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK_VO(MPMAN, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(MSYSTEMS, DISKONKEY, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_GETMAXLUN,
UQ_MSC_NO_RS_CLEAR_UA),
- USB_QUIRK(MSYSTEMS, DISKONKEY2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(MSYSTEMS, DISKONKEY2, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(MYSON, HEDEN, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(NEODIO, ND3260, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(MYSON, HEDEN, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(NEODIO, ND3260, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ),
- USB_QUIRK(NETAC, CF_CARD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(NETAC, CF_CARD, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(NETAC, ONLYDISK, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(NETAC, ONLYDISK, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(NETCHIP, CLIK_40, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_ATAPI,
- UQ_MSC_NO_INQUIRY),
- USB_QUIRK(NETCHIP, POCKETBOOK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(NIKON, D300, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(NORELSYS, NS1081, 0x0000, 0xffff, UQ_MSC_NO_RS_CLEAR_UA,
- UQ_MSC_NO_INQUIRY),
- USB_QUIRK(OLYMPUS, C1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_WRONG_CSWSIG),
- USB_QUIRK(OLYMPUS, C700, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(NETCHIP, CLIK_40, UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(NETCHIP, POCKETBOOK, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(NIKON, D300, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(NORELSYS, NS1081, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(OLYMPUS, C1, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_WRONG_CSWSIG),
+ USB_QUIRK(OLYMPUS, C700, UQ_MSC_NO_GETMAXLUN),
/* Selected Olympus DSLR and EVIL models. See ../usbdevs for more
* details.
*
* Not all quirks apply to all models. The commented-out entries are
* correct for that model.
*/
- USB_QUIRK(OLYMPUS, E_1, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
- UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
- UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(OLYMPUS, E_1, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_TEST_UNIT_READY,
+ UQ_MSC_NO_PREVENT_ALLOW, UQ_MSC_NO_SYNC_CACHE),
/*
* Product code 0x118.
- * USB_QUIRK(OLYMPUS, E_300, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
+ * USB_QUIRK(OLYMPUS, E_300, UQ_MSC_NO_GETMAXLUN,
* UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
* UQ_MSC_NO_SYNC_CACHE),
- * USB_QUIRK(OLYMPUS, E_30, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
+ * USB_QUIRK(OLYMPUS, E_30, UQ_MSC_NO_GETMAXLUN,
* UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
* UQ_MSC_NO_SYNC_CACHE), */
- USB_QUIRK(OLYMPUS, E_330, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
- UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
- UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP),
- USB_QUIRK(OLYMPUS, E_PM1, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
- UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
- UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP),
+ USB_QUIRK(OLYMPUS, E_330, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_TEST_UNIT_READY,
+ UQ_MSC_NO_PREVENT_ALLOW, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP),
+ USB_QUIRK(OLYMPUS, E_PM1, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_TEST_UNIT_READY,
+ UQ_MSC_NO_PREVENT_ALLOW, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP),
/* Product code 0x12e.
- * USB_QUIRK(OLYMPUS, E_PM2, 0x0000, 0xffff, 0),
- * USB_QUIRK(OLYMPUS, E_M1MarkII, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
+ * USB_QUIRK(OLYMPUS, E_PM2, 0),
+ * USB_QUIRK(OLYMPUS, E_M1MarkII, UQ_MSC_NO_GETMAXLUN,
* UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
* UQ_MSC_NO_SYNC_CACHE),
- * USB_QUIRK(OLYMPUS, E_M5MarkIII, 0x0000, 0xffff, 0),
+ * USB_QUIRK(OLYMPUS, E_M5MarkIII, 0),
*/
- USB_QUIRK(OLYMPUS, E_M1, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
- UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW,
- UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP),
- USB_QUIRK(ONSPEC, SDS_HOTFIND_D, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(OLYMPUS, E_M1, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_TEST_UNIT_READY,
+ UQ_MSC_NO_PREVENT_ALLOW, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP),
+ USB_QUIRK(ONSPEC, SDS_HOTFIND_D, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(ONSPEC, CFMS_RW, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ONSPEC, CFSM_COMBO, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ONSPEC, CFSM_READER, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ONSPEC, CFSM_READER2, 0x0000, 0xffff,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ONSPEC, MDCFE_B_CF_READER, 0x0000, 0xffff,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ONSPEC, MDSM_B_READER, 0x0000, 0xffff,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(ONSPEC, READER, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(ONSPEC, UCF100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ONSPEC, CFMS_RW, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(ONSPEC, CFSM_COMBO, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(ONSPEC, CFSM_READER, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(ONSPEC, CFSM_READER2, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(ONSPEC, MDCFE_B_CF_READER, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(ONSPEC, MDSM_B_READER, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(ONSPEC, READER, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(ONSPEC, UCF100, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(ONSPEC2, IMAGEMATE_SDDR55, 0x0000, 0xffff,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(PANASONIC, KXL840AN, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(ONSPEC2, IMAGEMATE_SDDR55, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(PANASONIC, KXL840AN, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(PANASONIC, KXLCB20AN, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(PANASONIC, KXLCB20AN, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(PANASONIC, KXLCB35AN, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(PANASONIC, KXLCB35AN, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(PANASONIC, LS120CAM, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_UFI),
- USB_QUIRK(PLEXTOR, 40_12_40U, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(PANASONIC, LS120CAM, UQ_MSC_FORCE_PROTO_UFI),
+ USB_QUIRK(PLEXTOR, 40_12_40U, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY),
- USB_QUIRK(PNY, ATTACHE2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE,
- UQ_MSC_NO_START_STOP),
- USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff,
- UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW),
- USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN,
- USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(PNY, ATTACHE2, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP),
+ USB_QUIRK(PROLIFIC, PL2506, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW),
+ USB_QUIRK(SAMSUNG_TECHWIN, DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(SANDISK, SDDR05A, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1,
- UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SANDISK, SDDR09, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI,
+ USB_QUIRK(SANDISK, SDDR05A, UQ_MSC_FORCE_WIRE_CBI,
+ UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(SANDISK, SDDR09, UQ_MSC_FORCE_PROTO_SCSI,
UQ_MSC_READ_CAP_OFFBY1, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SANDISK, SDDR12, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1,
- UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SANDISK, SDCZ2_128, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(SANDISK, SDCZ2_256, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SANDISK, SDDR12, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_READ_CAP_OFFBY1, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(SANDISK, SDCZ2_128, UQ_MSC_FORCE_WIRE_BBB,
+ UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(SANDISK, SDCZ2_256, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(SANDISK, SDCZ4_128, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SANDISK, SDCZ4_128, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(SANDISK, SDCZ4_256, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SANDISK, SDCZ4_256, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(SANDISK, SDCZ48_32, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE,
+ USB_QUIRK(SANDISK, SDCZ48_32, UQ_MSC_NO_SYNC_CACHE,
UQ_MSC_NO_TEST_UNIT_READY),
- USB_QUIRK(SANDISK, SDDR31, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SANDISK, SDDR31, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1),
- USB_QUIRK(SANDISK, IMAGEMATE_SDDR289, 0x0000, 0xffff,
- UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SCANLOGIC, SL11R, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SANDISK, IMAGEMATE_SDDR289, UQ_MSC_NO_SYNC_CACHE,
+ UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(SCANLOGIC, SL11R, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(SHUTTLE, EUSB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I,
- UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_START_STOP, UQ_MSC_SHUTTLE_INIT),
- USB_QUIRK(SHUTTLE, CDRW, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(SHUTTLE, CF, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(SHUTTLE, EUSB, UQ_MSC_FORCE_WIRE_CBI_I, UQ_MSC_FORCE_PROTO_ATAPI,
+ UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP, UQ_MSC_SHUTTLE_INIT),
+ USB_QUIRK(SHUTTLE, CDRW, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI),
+ USB_QUIRK(SHUTTLE, CF, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI),
+ USB_QUIRK(SHUTTLE, EUSBATAPI, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(SHUTTLE, EUSBATAPI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(SHUTTLE, EUSBCFSM, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(SHUTTLE, EUSCSI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(SHUTTLE, HIFD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SHUTTLE, SDDR09, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI,
+ USB_QUIRK(SHUTTLE, EUSBCFSM, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(SHUTTLE, EUSCSI, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(SHUTTLE, HIFD, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI,
UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SHUTTLE, ZIOMMC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(SHUTTLE, SDDR09, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(SHUTTLE, ZIOMMC, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SIGMATEL, I_BEAD100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SIGMATEL, I_BEAD100, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_SHUTTLE_INIT),
- USB_QUIRK(SIIG, WINTERREADER, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SIIG, WINTERREADER, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(SKANHEX, MD_7425, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SKANHEX, MD_7425, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(SKANHEX, SX_520Z, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SKANHEX, SX_520Z, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(SONY, HANDYCAM, 0x0500, 0x0500, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK_REV(SONY, HANDYCAM, 0x0500, 0x0500, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_RBC, UQ_MSC_RBC_PAD_TO_12),
- USB_QUIRK(SONY, CLIE_40_MS, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SONY, CLIE_40_MS, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(SONY, DSC, 0x0500, 0x0500, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK_REV(SONY, DSC, 0x0500, 0x0500, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_RBC, UQ_MSC_RBC_PAD_TO_12),
- USB_QUIRK(SONY, DSC, 0x0600, 0x0600, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK_REV(SONY, DSC, 0x0600, 0x0600, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_RBC, UQ_MSC_RBC_PAD_TO_12),
- USB_QUIRK(SONY, DSC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(SONY, HANDYCAM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(SONY, MSC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(SONY, MS_MSC_U03, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK(SONY, DSC, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC),
+ USB_QUIRK(SONY, HANDYCAM, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC),
+ USB_QUIRK(SONY, MSC, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC),
+ USB_QUIRK(SONY, MS_MSC_U03, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_UFI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SONY, MS_NW_MS7, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SONY, MS_NW_MS7, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SONY, MS_PEG_N760C, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SONY, MS_PEG_N760C, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(SONY, MSACUS1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(SONY, PORTABLE_HDD_V2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(SONY, MSACUS1, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(SONY, PORTABLE_HDD_V2, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(STMICRO, ST72682, 0x0000, 0xffff, UQ_MSC_NO_PREVENT_ALLOW),
- USB_QUIRK(SUPERTOP, IDE, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE,
+ USB_QUIRK(STMICRO, ST72682, UQ_MSC_NO_PREVENT_ALLOW),
+ USB_QUIRK(SUPERTOP, IDE, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(SUPERTOP, FLASHDRIVE, UQ_MSC_NO_TEST_UNIT_READY,
UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(SUPERTOP, FLASHDRIVE, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(TAUGA, CAMERAMATE, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(TEAC, FD05PUB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_UFI),
- USB_QUIRK(TECLAST, TLC300, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(TREK, MEMKEY, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(TREK, THUMBDRIVE_8MB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(TAUGA, CAMERAMATE, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(TEAC, FD05PUB, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_UFI),
+ USB_QUIRK(TECLAST, TLC300, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(TREK, MEMKEY, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(TREK, THUMBDRIVE_8MB, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(TRUMPION, C3310, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_UFI),
- USB_QUIRK(TRUMPION, MP3, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_RBC),
- USB_QUIRK(TRUMPION, T33520, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(TWINMOS, MDIV, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI),
- USB_QUIRK(VIA, USB2IDEBRIDGE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
+ USB_QUIRK(TRUMPION, C3310, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_UFI),
+ USB_QUIRK(TRUMPION, MP3, UQ_MSC_FORCE_PROTO_RBC),
+ USB_QUIRK(TRUMPION, T33520, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(TWINMOS, MDIV, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(VIA, USB2IDEBRIDGE, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(VIVITAR, 35XX, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(WESTERN, COMBO, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(WESTERN, EXTHDD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(WESTERN, MYBOOK, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD,
- UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_00, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ),
- USB_QUIRK(WESTERN, MYPASSPORT_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_03, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_04, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_05, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_06, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_07, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_10, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORT_11, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_00, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_01, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_02, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_03, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_04, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_05, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_06, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_07, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_08, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTES_09, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(WESTERN, MYPASSPORTUL_00, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY),
- USB_QUIRK(WINMAXGROUP, FLASH64MC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(YANO, FW800HD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
- UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
- USB_QUIRK(YANO, U640MO, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI_I,
+ USB_QUIRK(VIVITAR, 35XX, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_INQUIRY),
+ USB_QUIRK(WESTERN, COMBO, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+ USB_QUIRK(WESTERN, EXTHDD, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+ USB_QUIRK(WESTERN, MYBOOK, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_00, UQ_MSC_FORCE_SHORT_INQ),
+ USB_QUIRK(WESTERN, MYPASSPORT_01, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_02, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_03, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_04, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_05, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_06, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_07, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_08, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_09, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_10, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORT_11, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_00, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_01, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_02, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_03, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_04, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_05, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_06, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_07, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_08, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTES_09, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(WESTERN, MYPASSPORTUL_00, UQ_MSC_NO_TEST_UNIT_READY),
+ USB_QUIRK(WINMAXGROUP, FLASH64MC, UQ_MSC_FORCE_WIRE_BBB,
+ UQ_MSC_NO_INQUIRY, UQ_MSC_FORCE_PROTO_SCSI),
+ USB_QUIRK(YANO, FW800HD, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE),
+ USB_QUIRK(YANO, U640MO, UQ_MSC_FORCE_WIRE_CBI_I,
UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_FORCE_SHORT_INQ),
- USB_QUIRK(YEDATA, FLASHBUSTERU, 0x0000, 0x007F, UQ_MSC_FORCE_WIRE_CBI,
+ USB_QUIRK_REV(YEDATA, FLASHBUSTERU, 0x0000, 0x007F, UQ_MSC_FORCE_WIRE_CBI,
UQ_MSC_FORCE_PROTO_UFI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED,
UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(YEDATA, FLASHBUSTERU, 0x0080, 0x0080, UQ_MSC_FORCE_WIRE_CBI_I,
- UQ_MSC_FORCE_PROTO_UFI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED,
+ USB_QUIRK_REV(YEDATA, FLASHBUSTERU, 0x0080, 0x0080,
+ UQ_MSC_FORCE_WIRE_CBI_I, UQ_MSC_FORCE_PROTO_UFI,
+ UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED,
UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(YEDATA, FLASHBUSTERU, 0x0081, 0xFFFF, UQ_MSC_FORCE_WIRE_CBI_I,
- UQ_MSC_FORCE_PROTO_UFI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED,
- UQ_MSC_NO_GETMAXLUN),
- USB_QUIRK(ZORAN, EX20DSC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI,
- UQ_MSC_FORCE_PROTO_ATAPI),
- USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
- UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE,
+ USB_QUIRK_REV(YEDATA, FLASHBUSTERU, 0x0081, 0xFFFF,
+ UQ_MSC_FORCE_WIRE_CBI_I, UQ_MSC_FORCE_PROTO_UFI,
+ UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED, UQ_MSC_NO_GETMAXLUN),
+ USB_QUIRK(ZORAN, EX20DSC, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI),
+ USB_QUIRK(MEIZU, M6_SL, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,
+ UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(TOSHIBA, TRANSMEMORY, UQ_MSC_NO_SYNC_CACHE,
UQ_MSC_NO_PREVENT_ALLOW),
- USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
- USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN,
+ USB_QUIRK(VIALABS, USB30SATABRIDGE, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK(QUALCOMMINC, ZTE_MF730M, UQ_MSC_NO_GETMAXLUN,
UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0),
- USB_QUIRK(SMART2, G2MEMKEY, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY),
- USB_QUIRK(RALINK, RT_STOR, 0x0001, 0x0001, UQ_MSC_IGNORE),
- USB_QUIRK(REALTEK, RTW8821CU_CD, 0x0001, 0x0001, UQ_MSC_IGNORE),
+ USB_QUIRK(SMART2, G2MEMKEY, UQ_MSC_NO_INQUIRY),
+ USB_QUIRK_REV(RALINK, RT_STOR, 0x0001, 0x0001, UQ_MSC_IGNORE),
+ USB_QUIRK_REV(REALTEK, RTW8821CU_CD, 0x0001, 0x0001, UQ_MSC_IGNORE),
/* Non-standard USB MIDI devices */
- USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SD90, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, UM880N, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, UA100, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, UM4, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, U8, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, UM2, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SC8820, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, PC300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SK500, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SCD70, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, UM550, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SD20, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(ROLAND, PCR300, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(EGO, M4U, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI),
- USB_QUIRK(LOGILINK, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI),
- USB_QUIRK(MEDELI, DD305, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI, UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(REDOCTANE, GHMIDI, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI),
- USB_QUIRK(TEXTECH, U2M_1, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI),
- USB_QUIRK(TEXTECH, U2M_2, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI),
- USB_QUIRK(WCH2, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI),
+ USB_QUIRK(ROLAND, UM1, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SC8850, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SD90, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, UM880N, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, UA100, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, UM4, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, U8, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, UM2, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SC8820, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, PC300, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SK500, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SCD70, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, UM550, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SD20, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, SD80, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, UA700, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(ROLAND, PCR300, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(EGO, M4U, UQ_SINGLE_CMD_MIDI),
+ USB_QUIRK(LOGILINK, U2M, UQ_SINGLE_CMD_MIDI),
+ USB_QUIRK(MEDELI, DD305, UQ_SINGLE_CMD_MIDI, UQ_MATCH_VENDOR_ONLY),
+ USB_QUIRK(REDOCTANE, GHMIDI, UQ_SINGLE_CMD_MIDI),
+ USB_QUIRK(TEXTECH, U2M_1, UQ_SINGLE_CMD_MIDI),
+ USB_QUIRK(TEXTECH, U2M_2, UQ_SINGLE_CMD_MIDI),
+ USB_QUIRK(WCH2, U2M, UQ_SINGLE_CMD_MIDI),
/* Non-standard USB AUDIO devices */
- USB_QUIRK(MAUDIO, FASTTRACKULTRA, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
- USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206),
- USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, 0x0000, 0xffff, UQ_CFG_INDEX_1),
- USB_QUIRK(ROLAND, UA25EX_AD, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(MAUDIO, FASTTRACKULTRA, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, UQ_AU_VENDOR_CLASS),
+ USB_QUIRK(CMEDIA, CM6206, UQ_AU_SET_SPDIF_CM6206),
+ USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, UQ_CFG_INDEX_1),
+ USB_QUIRK(ROLAND, UA25EX_AD, UQ_AU_VENDOR_CLASS),
/*
* Quirks for manufacturers which USB devices does not respond
* after issuing non-supported commands:
*/
- USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(APPLE, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
- USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY),
+ USB_QUIRK_VO(ALCOR, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY),
+ USB_QUIRK_VO(APPLE, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK_VO(FEIYA, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK_VO(REALTEK, UQ_MSC_NO_SYNC_CACHE),
+ USB_QUIRK_VO(INITIO, UQ_MSC_NO_SYNC_CACHE),
/* DYMO LabelManager Pnp */
- USB_QUIRK(DYMO, LABELMANAGERPNP, 0x0000, 0xffff, UQ_MSC_DYMO_EJECT),
+ USB_QUIRK(DYMO, LABELMANAGERPNP, UQ_MSC_DYMO_EJECT),
/* Holtek USB gaming keyboard */
- USB_QUIRK(HOLTEK, F85, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
+ USB_QUIRK(HOLTEK, F85, UQ_KBD_BOOTPROTO),
/* This works much better with if_cdce than if_ure */
- USB_QUIRK(LENOVO, TBT3LAN, 0x0000, 0xffff, UQ_CFG_INDEX_1),
+ USB_QUIRK(LENOVO, TBT3LAN, UQ_CFG_INDEX_1),
};
-#undef USB_QUIRK_VP
+#undef USB_QUIRK_VO
+#undef USB_QUIRK_REV
#undef USB_QUIRK
static const char *usb_quirk_str[USB_QUIRK_MAX] = {
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 65dcb06c2f3f..6820e8b4025a 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -1047,7 +1047,6 @@ product ALCATEL OT535 0x02df One Touch 535/735
/* Alcor Micro, Inc. products */
product ALCOR2 KBD_HUB 0x2802 Kbd Hub
-product ALCOR DUMMY 0x0000 Dummy product
product ALCOR SDCR_6335 0x6335 SD/MMC Card Reader
product ALCOR SDCR_6362 0x6362 SD/MMC Card Reader
product ALCOR SDCR_6366 0x6366 SD/MMC Card Reader
@@ -1137,7 +1136,6 @@ product ANYDATA ADU_500A 0x6502 CDMA 2000 EV-DO USB Modem
product AOX USB101 0x0008 Ethernet
/* Apple Computer products */
-product APPLE DUMMY 0x0000 Dummy product
product APPLE IMAC_KBD 0x0201 USB iMac Keyboard
product APPLE KBD 0x0202 USB Keyboard M2452
product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard
@@ -1862,7 +1860,6 @@ product EGALAX TPANEL2 0x0002 Touch Panel
product EGALAX2 TPANEL 0x0001 Touch Panel
/* EGO Products */
-product EGO DUMMY 0x0000 Dummy Product
product EGO M4U 0x1020 ESI M4U
/* Eicon Networks */
@@ -1986,7 +1983,6 @@ product FALCOM TWIST 0x0001 USB GSM/GPRS Modem
product FALCOM SAMBA 0x0005 FTDI compatible adapter
/* FEIYA products */
-product FEIYA DUMMY 0x0000 Dummy product
product FEIYA 5IN1 0x1132 5-in-1 Card Reader
product FEIYA ELANGO 0x6200 MicroSDHC Card Reader
product FEIYA AC110 0x6300 AC-110 Card Reader
@@ -2601,7 +2597,6 @@ product IDTECH IDT1221U 0x0300 FTDI compatible adapter
product IMAGINATION DBX1 0x2107 DBX1 DSP core
/* Initio Corporation products */
-product INITIO DUMMY 0x0000 Dummy product
product INITIO INIC_1610P 0x1e40 USB to SATA Bridge
/* Inside Out Networks products */
@@ -2874,7 +2869,6 @@ product LINKSYS4 RT3070 0x0078 RT3070
product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2
/* Logilink products */
-product LOGILINK DUMMY 0x0000 Dummy product
product LOGILINK U2M 0x0101 LogiLink USB MIDI Cable
/* Logitech products */
@@ -4053,7 +4047,6 @@ product RATOC REXUSB60F 0xb020 USB serial adapter REX-USB60F
/* Realtek products */
/* Green House and CompUSA OEM this part */
-product REALTEK DUMMY 0x0000 Dummy product
product REALTEK USB20CRW 0x0158 USB20CRW Card Reader
product REALTEK RTL8188ETV 0x0179 RTL8188ETV
product REALTEK RTL8188CTV 0x018a RTL8188CTV
@@ -4098,7 +4091,6 @@ product REALTEK RTL8192SU 0xc512 RTL8192SU
product REALTEK RTW8821CU 0xc811 RTW8821CU
/* RedOctane products */
-product REDOCTANE DUMMY 0x0000 Dummy product
product REDOCTANE GHMIDI 0x474b GH MIDI INTERFACE
/* Renesas products */
@@ -4668,7 +4660,6 @@ product TECLAST TLC300 0x3203 USB Media Player
product TESTO USB_INTERFACE 0x0001 FTDI compatible adapter
/* TexTech products */
-product TEXTECH DUMMY 0x0000 Dummy product
product TEXTECH U2M_1 0x0101 Textech USB MIDI cable
product TEXTECH U2M_2 0x1806 Textech USB MIDI cable
@@ -4909,7 +4900,6 @@ product WAVESENSE JAZZ 0xaaaa Jazz blood glucose meter
/* WCH products */
product WCH CH341SER 0x5523 CH341/CH340 USB-Serial Bridge
-product WCH2 DUMMY 0x0000 Dummy product
product WCH2 CH341SER_2 0x5523 CH341/CH340 USB-Serial Bridge
product WCH2 CH341SER_3 0x7522 CH341/CH340 USB-Serial Bridge
product WCH2 CH341SER 0x7523 CH341/CH340 USB-Serial Bridge
diff --git a/sys/dev/xen/debug/debug.c b/sys/dev/xen/debug/debug.c
index f17d0c612262..2889b5efdba7 100644
--- a/sys/dev/xen/debug/debug.c
+++ b/sys/dev/xen/debug/debug.c
@@ -58,8 +58,11 @@ static struct sbuf *buf;
static int
xendebug_drain(void *arg, const char *str, int len)
{
-
- HYPERVISOR_console_write(__DECONST(char *, str), len);
+ /*
+ * Use xen_emergency_print() instead of xc_printf() to avoid the
+ * overhead of parsing a format string when it's not needed.
+ */
+ xen_emergency_print(str, len);
return (len);
}
@@ -75,10 +78,9 @@ xendebug_filter(void *arg __unused)
stack_save(&st);
mtx_lock_spin(&lock);
- sbuf_clear(buf);
xc_printf("Printing stack trace vCPU%u\n", XEN_VCPUID());
stack_sbuf_print_ddb(buf, &st);
- sbuf_finish(buf);
+ sbuf_drain(buf);
mtx_unlock_spin(&lock);
#endif
diff --git a/sys/dts/freebsd-compatible.dts b/sys/dts/freebsd-compatible.dts
index c81f963c7872..7d602f70a83b 100644
--- a/sys/dts/freebsd-compatible.dts
+++ b/sys/dts/freebsd-compatible.dts
@@ -1,3 +1,3 @@
/ {
- freebsd,dts-version = "6.4";
+ freebsd,dts-version = "6.8";
};
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index a35f6dbf9520..1ab575ec02bd 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -555,8 +555,7 @@ loop:
if (devfs_allocv_drop_refs(0, dmp, de)) {
vput(vp);
return (ENOENT);
- }
- else if (VN_IS_DOOMED(vp)) {
+ } else if (VN_IS_DOOMED(vp)) {
mtx_lock(&devfs_de_interlock);
if (de->de_vnode == vp) {
de->de_vnode = NULL;
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index bffbf4546f37..9e7a03fffd71 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -1345,7 +1345,7 @@ ext2_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp)
return (ESTALE);
}
*vpp = nvp;
- vnode_create_vobject(*vpp, 0, curthread);
+ vnode_create_vobject(*vpp, ip->i_size, curthread);
return (0);
}
diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c
index 777519450954..0a24d0da4fac 100644
--- a/sys/fs/fuse/fuse_node.c
+++ b/sys/fs/fuse/fuse_node.c
@@ -354,7 +354,7 @@ void
fuse_vnode_open(struct vnode *vp, int32_t fuse_open_flags, struct thread *td)
{
if (vnode_vtype(vp) == VREG)
- vnode_create_vobject(vp, 0, td);
+ vnode_create_vobject(vp, VNODE_NO_SIZE, td);
}
int
diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c
index e088f92bf5bf..e60c9aa80cfa 100644
--- a/sys/fs/fuse/fuse_vfsops.c
+++ b/sys/fs/fuse/fuse_vfsops.c
@@ -286,7 +286,7 @@ fuse_vfsop_fhtovp(struct mount *mp, struct fid *fhp, int flags,
return (ESTALE);
}
*vpp = nvp;
- vnode_create_vobject(*vpp, 0, curthread);
+ vnode_create_vobject(*vpp, VNODE_NO_SIZE, curthread);
return (0);
}
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index 3f8f3322162a..eb07861c04ba 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -2248,19 +2248,15 @@ fuse_vnop_setattr(struct vop_setattr_args *ap)
return (err2);
if (vap->va_uid != old_va.va_uid)
return err;
- else
- accmode |= VADMIN;
drop_suid = true;
- } else
- accmode |= VADMIN;
- } else
- accmode |= VADMIN;
+ }
+ }
+ accmode |= VADMIN;
}
if (vap->va_gid != (gid_t)VNOVAL) {
if (checkperm && priv_check_cred(cred, PRIV_VFS_CHOWN))
drop_suid = true;
- if (checkperm && !groupmember(vap->va_gid, cred))
- {
+ if (checkperm && !groupmember(vap->va_gid, cred)) {
/*
* Non-root users may only chgrp to one of their own
* groups
@@ -2274,11 +2270,9 @@ fuse_vnop_setattr(struct vop_setattr_args *ap)
return (err2);
if (vap->va_gid != old_va.va_gid)
return err;
- accmode |= VADMIN;
- } else
- accmode |= VADMIN;
- } else
- accmode |= VADMIN;
+ }
+ }
+ accmode |= VADMIN;
}
if (vap->va_size != VNOVAL) {
switch (vp->v_type) {
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 578fb3ce1340..950e0c097457 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -713,7 +713,7 @@ int nfsvno_rmdirsub(struct nameidata *, int, struct ucred *, NFSPROC_T *,
struct nfsexstuff *);
int nfsvno_rename(struct nameidata *, struct nameidata *, u_int32_t,
u_int32_t, struct ucred *, NFSPROC_T *);
-int nfsvno_link(struct nameidata *, vnode_t, struct ucred *,
+int nfsvno_link(struct nameidata *, vnode_t, nfsquad_t, struct ucred *,
NFSPROC_T *, struct nfsexstuff *);
int nfsvno_fsync(vnode_t, u_int64_t, int, struct ucred *, NFSPROC_T *);
int nfsvno_statfs(vnode_t, struct statfs *);
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c
index c691e797aa01..e181bf593e23 100644
--- a/sys/fs/nfsclient/nfs_clbio.c
+++ b/sys/fs/nfsclient/nfs_clbio.c
@@ -366,7 +366,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread *td, struct ucred *cred)
bool old_lock;
/*
- * Ensure the exclusove access to the node before checking
+ * Ensure the exclusive access to the node before checking
* whether the cache is consistent.
*/
old_lock = ncl_excl_start(vp);
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 5eb16564cf00..6f5b2855bcf0 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -1655,8 +1655,8 @@ out1:
* Link vnode op.
*/
int
-nfsvno_link(struct nameidata *ndp, struct vnode *vp, struct ucred *cred,
- struct thread *p, struct nfsexstuff *exp)
+nfsvno_link(struct nameidata *ndp, struct vnode *vp, nfsquad_t clientid,
+ struct ucred *cred, struct thread *p, struct nfsexstuff *exp)
{
struct vnode *xp;
int error = 0;
@@ -1671,9 +1671,11 @@ nfsvno_link(struct nameidata *ndp, struct vnode *vp, struct ucred *cred,
}
if (!error) {
NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY);
- if (!VN_IS_DOOMED(vp))
- error = VOP_LINK(ndp->ni_dvp, vp, &ndp->ni_cnd);
- else
+ if (!VN_IS_DOOMED(vp)) {
+ error = nfsrv_checkremove(vp, 0, NULL, clientid, p);
+ if (error == 0)
+ error = VOP_LINK(ndp->ni_dvp, vp, &ndp->ni_cnd);
+ } else
error = EPERM;
if (ndp->ni_dvp == vp) {
vrele(ndp->ni_dvp);
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index 8141ee6cbdb6..0c8bda6dc6a6 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -1797,6 +1797,7 @@ nfsrvd_link(struct nfsrv_descript *nd, int isdgram,
char *bufp;
u_long *hashp;
struct thread *p = curthread;
+ nfsquad_t clientid;
if (nd->nd_repstat) {
nfsrv_postopattr(nd, getret, &at);
@@ -1858,8 +1859,14 @@ nfsrvd_link(struct nfsrv_descript *nd, int isdgram,
NULL);
}
}
- if (!nd->nd_repstat)
- nd->nd_repstat = nfsvno_link(&named, vp, nd->nd_cred, p, exp);
+ if (!nd->nd_repstat) {
+ clientid.qval = 0;
+ if ((nd->nd_flag & (ND_IMPLIEDCLID | ND_NFSV41)) ==
+ (ND_IMPLIEDCLID | ND_NFSV41))
+ clientid.qval = nd->nd_clientid.qval;
+ nd->nd_repstat = nfsvno_link(&named, vp, clientid, nd->nd_cred,
+ p, exp);
+ }
if (nd->nd_flag & ND_NFSV3)
getret = nfsvno_getattr(vp, &at, nd, p, 0, NULL);
if (dirp) {
diff --git a/sys/fs/procfs/procfs_osrel.c b/sys/fs/procfs/procfs_osrel.c
index fd6a4d7e0eea..0102090de4da 100644
--- a/sys/fs/procfs/procfs_osrel.c
+++ b/sys/fs/procfs/procfs_osrel.c
@@ -45,9 +45,11 @@ procfs_doosrel(PFS_FILL_ARGS)
if (uio == NULL)
return (EOPNOTSUPP);
- if (uio->uio_rw == UIO_READ) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
sbuf_printf(sb, "%d\n", p->p_osrel);
- } else {
+ break;
+ case UIO_WRITE:
sbuf_trim(sb);
sbuf_finish(sb);
pp = sbuf_data(sb);
@@ -62,6 +64,7 @@ procfs_doosrel(PFS_FILL_ARGS)
osrel = ov;
}
p->p_osrel = osrel;
+ break;
}
return (0);
}
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 9bdcc4575511..3f74c383a171 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -120,7 +120,7 @@ tmpfs_pager_writecount_recalc(vm_object_t object, vm_offset_t old,
/*
* Forced unmount?
*/
- if (vp == NULL) {
+ if (vp == NULL || vp->v_object == NULL) {
KASSERT((object->flags & OBJ_TMPFS_VREF) == 0,
("object %p with OBJ_TMPFS_VREF but without vnode",
object));
@@ -183,6 +183,9 @@ tmpfs_pager_release_writecount(vm_object_t object, vm_offset_t start,
KASSERT((object->flags & OBJ_ANON) == 0,
("%s: object %p with OBJ_ANON", __func__, object));
old = object->un_pager.swp.writemappings;
+ KASSERT(old >= (vm_ooffset_t)end - start,
+ ("tmpfs obj %p writecount %jx dec %jx", object, (uintmax_t)old,
+ (uintmax_t)((vm_ooffset_t)end - start)));
object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start;
new = object->un_pager.swp.writemappings;
tmpfs_pager_writecount_recalc(object, old, new);
@@ -346,7 +349,7 @@ tmpfs_node_init(void *mem, int size, int flags)
node = mem;
node->tn_id = 0;
- mtx_init(&node->tn_interlock, "tmpfsni", NULL, MTX_DEF);
+ mtx_init(&node->tn_interlock, "tmpfsni", NULL, MTX_DEF | MTX_NEW);
node->tn_gen = arc4random();
return (0);
}
@@ -954,6 +957,8 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj)
VM_OBJECT_WLOCK(obj);
VI_LOCK(vp);
+ vp->v_object = NULL;
+
/*
* May be going through forced unmount.
*/
@@ -1094,15 +1099,19 @@ loop:
KASSERT((object->flags & OBJ_TMPFS_VREF) == 0,
("%s: object %p with OBJ_TMPFS_VREF but without vnode",
__func__, object));
- KASSERT(object->un_pager.swp.writemappings == 0,
- ("%s: object %p has writemappings",
- __func__, object));
VI_LOCK(vp);
KASSERT(vp->v_object == NULL, ("Not NULL v_object in tmpfs"));
vp->v_object = object;
vn_irflag_set_locked(vp, (tm->tm_pgread ? VIRF_PGREAD : 0) |
VIRF_TEXT_REF);
VI_UNLOCK(vp);
+ VNASSERT((object->flags & OBJ_TMPFS_VREF) == 0, vp,
+ ("leaked OBJ_TMPFS_VREF"));
+ if (object->un_pager.swp.writemappings > 0) {
+ vrefact(vp);
+ vlazy(vp);
+ vm_object_set_flag(object, OBJ_TMPFS_VREF);
+ }
VM_OBJECT_WUNLOCK(object);
break;
case VDIR:
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
index 187d0513da25..aa2a7273825a 100644
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -1167,7 +1167,6 @@ unionfs_rename(struct vop_rename_args *ap)
struct unionfs_mount *ump;
struct unionfs_node *unp;
int error;
- int needrelookup;
UNIONFS_INTERNAL_DEBUG("unionfs_rename: enter\n");
@@ -1185,7 +1184,6 @@ unionfs_rename(struct vop_rename_args *ap)
rfvp = fvp;
rtdvp = tdvp;
rtvp = tvp;
- needrelookup = 0;
/* check for cross device rename */
if (fvp->v_mount != tdvp->v_mount ||
@@ -1201,58 +1199,114 @@ unionfs_rename(struct vop_rename_args *ap)
if (fvp == tvp)
goto unionfs_rename_abort;
- /*
- * from/to vnode is unionfs node.
- */
-
- KASSERT_UNIONFS_VNODE(fdvp);
- KASSERT_UNIONFS_VNODE(fvp);
KASSERT_UNIONFS_VNODE(tdvp);
if (tvp != NULLVP)
KASSERT_UNIONFS_VNODE(tvp);
-
+ if (fdvp != tdvp)
+ VI_LOCK(fdvp);
unp = VTOUNIONFS(fdvp);
+ if (unp == NULL) {
+ if (fdvp != tdvp)
+ VI_UNLOCK(fdvp);
+ error = ENOENT;
+ goto unionfs_rename_abort;
+ }
#ifdef UNIONFS_IDBG_RENAME
UNIONFS_INTERNAL_DEBUG("fdvp=%p, ufdvp=%p, lfdvp=%p\n",
fdvp, unp->un_uppervp, unp->un_lowervp);
#endif
if (unp->un_uppervp == NULLVP) {
error = ENODEV;
- goto unionfs_rename_abort;
+ } else {
+ rfdvp = unp->un_uppervp;
+ vref(rfdvp);
}
- rfdvp = unp->un_uppervp;
- vref(rfdvp);
+ if (fdvp != tdvp)
+ VI_UNLOCK(fdvp);
+ if (error != 0)
+ goto unionfs_rename_abort;
+ VI_LOCK(fvp);
unp = VTOUNIONFS(fvp);
+ if (unp == NULL) {
+ VI_UNLOCK(fvp);
+ error = ENOENT;
+ goto unionfs_rename_abort;
+ }
+
#ifdef UNIONFS_IDBG_RENAME
UNIONFS_INTERNAL_DEBUG("fvp=%p, ufvp=%p, lfvp=%p\n",
fvp, unp->un_uppervp, unp->un_lowervp);
#endif
ump = MOUNTTOUNIONFSMOUNT(fvp->v_mount);
+ /*
+ * If we only have a lower vnode, copy the source file to the upper
+ * FS so that the rename operation can be issued against the upper FS.
+ */
if (unp->un_uppervp == NULLVP) {
- switch (fvp->v_type) {
- case VREG:
- if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
- goto unionfs_rename_abort;
- error = unionfs_copyfile(unp, 1, fcnp->cn_cred, td);
- VOP_UNLOCK(fvp);
- if (error != 0)
- goto unionfs_rename_abort;
- break;
- case VDIR:
- if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
- goto unionfs_rename_abort;
- error = unionfs_mkshadowdir(ump, rfdvp, unp, fcnp, td);
- VOP_UNLOCK(fvp);
- if (error != 0)
- goto unionfs_rename_abort;
- break;
- default:
- error = ENODEV;
- goto unionfs_rename_abort;
+ bool unlock_fdvp = false, relock_tdvp = false;
+ VI_UNLOCK(fvp);
+ if (tvp != NULLVP)
+ VOP_UNLOCK(tvp);
+ if (fvp->v_type == VREG) {
+ /*
+ * For regular files, unionfs_copyfile() will expect
+ * fdvp's upper parent directory vnode to be unlocked
+ * and will temporarily lock it. If fdvp == tdvp, we
+ * should unlock tdvp to avoid recursion on tdvp's
+ * lock. If fdvp != tdvp, we should also unlock tdvp
+ * to avoid potential deadlock due to holding tdvp's
+ * lock while locking unrelated vnodes associated with
+ * fdvp/fvp.
+ */
+ VOP_UNLOCK(tdvp);
+ relock_tdvp = true;
+ } else if (fvp->v_type == VDIR && tdvp != fdvp) {
+ /*
+ * For directories, unionfs_mkshadowdir() will expect
+ * fdvp's upper parent directory vnode to be locked
+ * and will temporarily unlock it. If fdvp == tdvp,
+ * we can therefore leave tdvp locked. If fdvp !=
+ * tdvp, we should exchange the lock on tdvp for a
+ * lock on fdvp.
+ */
+ VOP_UNLOCK(tdvp);
+ unlock_fdvp = true;
+ relock_tdvp = true;
+ vn_lock(fdvp, LK_EXCLUSIVE | LK_RETRY);
}
-
- needrelookup = 1;
+ vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY);
+ unp = VTOUNIONFS(fvp);
+ if (unp == NULL)
+ error = ENOENT;
+ else if (unp->un_uppervp == NULLVP) {
+ switch (fvp->v_type) {
+ case VREG:
+ error = unionfs_copyfile(unp, 1, fcnp->cn_cred, td);
+ break;
+ case VDIR:
+ error = unionfs_mkshadowdir(ump, rfdvp, unp, fcnp, td);
+ break;
+ default:
+ error = ENODEV;
+ break;
+ }
+ }
+ VOP_UNLOCK(fvp);
+ if (unlock_fdvp)
+ VOP_UNLOCK(fdvp);
+ if (relock_tdvp)
+ vn_lock(tdvp, LK_EXCLUSIVE | LK_RETRY);
+ if (tvp != NULLVP)
+ vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
+ /*
+ * Since we've dropped tdvp's lock at some point in the copy
+ * sequence above, force the caller to re-drive the lookup
+ * in case the relationship between tdvp and tvp has changed.
+ */
+ if (error == 0)
+ error = ERELOOKUP;
+ goto unionfs_rename_abort;
}
if (unp->un_lowervp != NULLVP)
@@ -1260,7 +1314,10 @@ unionfs_rename(struct vop_rename_args *ap)
rfvp = unp->un_uppervp;
vref(rfvp);
+ VI_UNLOCK(fvp);
+
unp = VTOUNIONFS(tdvp);
+
#ifdef UNIONFS_IDBG_RENAME
UNIONFS_INTERNAL_DEBUG("tdvp=%p, utdvp=%p, ltdvp=%p\n",
tdvp, unp->un_uppervp, unp->un_lowervp);
@@ -1273,11 +1330,12 @@ unionfs_rename(struct vop_rename_args *ap)
ltdvp = unp->un_lowervp;
vref(rtdvp);
- if (tdvp == tvp) {
- rtvp = rtdvp;
- vref(rtvp);
- } else if (tvp != NULLVP) {
+ if (tvp != NULLVP) {
unp = VTOUNIONFS(tvp);
+ if (unp == NULL) {
+ error = ENOENT;
+ goto unionfs_rename_abort;
+ }
#ifdef UNIONFS_IDBG_RENAME
UNIONFS_INTERNAL_DEBUG("tvp=%p, utvp=%p, ltvp=%p\n",
tvp, unp->un_uppervp, unp->un_lowervp);
@@ -1298,24 +1356,6 @@ unionfs_rename(struct vop_rename_args *ap)
if (rfvp == rtvp)
goto unionfs_rename_abort;
- if (needrelookup != 0) {
- if ((error = vn_lock(fdvp, LK_EXCLUSIVE)) != 0)
- goto unionfs_rename_abort;
- error = unionfs_relookup_for_delete(fdvp, fcnp, td);
- VOP_UNLOCK(fdvp);
- if (error != 0)
- goto unionfs_rename_abort;
-
- /* Lock of tvp is canceled in order to avoid recursive lock. */
- if (tvp != NULLVP && tvp != tdvp)
- VOP_UNLOCK(tvp);
- error = unionfs_relookup_for_rename(tdvp, tcnp, td);
- if (tvp != NULLVP && tvp != tdvp)
- vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
- if (error != 0)
- goto unionfs_rename_abort;
- }
-
error = VOP_RENAME(rfdvp, rfvp, fcnp, rtdvp, rtvp, tcnp);
if (error == 0) {
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c
deleted file mode 100644
index 1313e6a35147..000000000000
--- a/sys/geom/bde/g_bde.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2002 Poul-Henning Kamp
- * Copyright (c) 2002 Networks Associates Technology, Inc.
- * All rights reserved.
- *
- * This software was developed for the FreeBSD Project by Poul-Henning Kamp
- * and NAI Labs, the Security Research Division of Network Associates, Inc.
- * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include <sys/param.h>
-#include <sys/bio.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/malloc.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/kthread.h>
-#include <sys/sysctl.h>
-
-#include <crypto/rijndael/rijndael-api-fst.h>
-#include <crypto/sha2/sha512.h>
-#include <geom/geom.h>
-#include <geom/bde/g_bde.h>
-#define BDE_CLASS_NAME "BDE"
-
-FEATURE(geom_bde, "GEOM-based Disk Encryption");
-
-static void
-g_bde_start(struct bio *bp)
-{
-
- switch (bp->bio_cmd) {
- case BIO_DELETE:
- case BIO_READ:
- case BIO_WRITE:
- g_bde_start1(bp);
- break;
- case BIO_GETATTR:
- g_io_deliver(bp, EOPNOTSUPP);
- break;
- default:
- g_io_deliver(bp, EOPNOTSUPP);
- return;
- }
- return;
-}
-
-static void
-g_bde_orphan(struct g_consumer *cp)
-{
- struct g_geom *gp;
- struct g_provider *pp;
- struct g_bde_softc *sc;
-
- g_trace(G_T_TOPOLOGY, "g_bde_orphan(%p/%s)", cp, cp->provider->name);
- g_topology_assert();
-
- gp = cp->geom;
- sc = gp->softc;
- gp->flags |= G_GEOM_WITHER;
- LIST_FOREACH(pp, &gp->provider, provider)
- g_wither_provider(pp, ENXIO);
- explicit_bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */
- return;
-}
-
-static int
-g_bde_access(struct g_provider *pp, int dr, int dw, int de)
-{
- struct g_geom *gp;
- struct g_consumer *cp;
-
- gp = pp->geom;
- cp = LIST_FIRST(&gp->consumer);
- if (cp->acr == 0 && cp->acw == 0 && cp->ace == 0) {
- de++;
- dr++;
- }
- /* ... and let go of it on last close */
- if ((cp->acr + dr) == 0 && (cp->acw + dw) == 0 && (cp->ace + de) == 1) {
- de--;
- dr--;
- }
- return (g_access(cp, dr, dw, de));
-}
-
-static void
-g_bde_create_geom(struct gctl_req *req, struct g_class *mp, struct g_provider *pp)
-{
- struct g_geom *gp;
- struct g_consumer *cp;
- struct g_bde_key *kp;
- int error, i;
- u_int sectorsize;
- off_t mediasize;
- struct g_bde_softc *sc;
- void *pass;
- void *key;
-
- g_trace(G_T_TOPOLOGY, "g_bde_create_geom(%s, %s)", mp->name, pp->name);
- g_topology_assert();
- gp = NULL;
-
- gp = g_new_geomf(mp, "%s.bde", pp->name);
- cp = g_new_consumer(gp);
- error = g_attach(cp, pp);
- if (error != 0) {
- g_destroy_consumer(cp);
- g_destroy_geom(gp);
- gctl_error(req, "could not attach consumer");
- return;
- }
- error = g_access(cp, 1, 1, 1);
- if (error) {
- g_detach(cp);
- g_destroy_consumer(cp);
- g_destroy_geom(gp);
- gctl_error(req, "could not access consumer");
- return;
- }
- pass = NULL;
- key = NULL;
- do {
- pass = gctl_get_param(req, "pass", &i);
- if (pass == NULL || i != SHA512_DIGEST_LENGTH) {
- gctl_error(req, "No usable key presented");
- break;
- }
- key = gctl_get_param(req, "key", &i);
- if (key != NULL && i != 16) {
- gctl_error(req, "Invalid key presented");
- break;
- }
- sectorsize = cp->provider->sectorsize;
- mediasize = cp->provider->mediasize;
- sc = g_malloc(sizeof(struct g_bde_softc), M_WAITOK | M_ZERO);
- gp->softc = sc;
- sc->geom = gp;
- sc->consumer = cp;
-
- error = g_bde_decrypt_lock(sc, pass, key,
- mediasize, sectorsize, NULL);
- explicit_bzero(sc->sha2, sizeof sc->sha2);
- if (error)
- break;
- kp = &sc->key;
-
- /* Initialize helper-fields */
- kp->keys_per_sector = kp->sectorsize / G_BDE_SKEYLEN;
- kp->zone_cont = kp->keys_per_sector * kp->sectorsize;
- kp->zone_width = kp->zone_cont + kp->sectorsize;
- kp->media_width = kp->sectorN - kp->sector0 -
- G_BDE_MAXKEYS * kp->sectorsize;
-
- /* Our external parameters */
- sc->zone_cont = kp->zone_cont;
- sc->mediasize = g_bde_max_sector(kp);
- sc->sectorsize = kp->sectorsize;
-
- TAILQ_INIT(&sc->freelist);
- TAILQ_INIT(&sc->worklist);
- mtx_init(&sc->worklist_mutex, "g_bde_worklist", NULL, MTX_DEF);
- /* XXX: error check */
- kproc_create(g_bde_worker, gp, &sc->thread, 0, 0,
- "g_bde %s", gp->name);
- pp = g_new_providerf(gp, "%s", gp->name);
- pp->stripesize = kp->zone_cont;
- pp->stripeoffset = 0;
- pp->mediasize = sc->mediasize;
- pp->sectorsize = sc->sectorsize;
- g_error_provider(pp, 0);
- break;
- } while (0);
- if (pass != NULL)
- explicit_bzero(pass, SHA512_DIGEST_LENGTH);
- if (key != NULL)
- explicit_bzero(key, 16);
- if (error == 0)
- return;
- g_access(cp, -1, -1, -1);
- g_detach(cp);
- g_destroy_consumer(cp);
- g_free(gp->softc);
- g_destroy_geom(gp);
- switch (error) {
- case ENOENT:
- gctl_error(req, "Lock was destroyed");
- break;
- case ESRCH:
- gctl_error(req, "Lock was nuked");
- break;
- case EINVAL:
- gctl_error(req, "Could not open lock");
- break;
- case ENOTDIR:
- gctl_error(req, "Lock not found");
- break;
- default:
- gctl_error(req, "Could not open lock (%d)", error);
- break;
- }
- return;
-}
-
-static int
-g_bde_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp)
-{
- struct g_consumer *cp;
- struct g_provider *pp;
- struct g_bde_softc *sc;
-
- g_trace(G_T_TOPOLOGY, "g_bde_destroy_geom(%s, %s)", mp->name, gp->name);
- g_topology_assert();
- /*
- * Orderly detachment.
- */
- KASSERT(gp != NULL, ("NULL geom"));
- pp = LIST_FIRST(&gp->provider);
- KASSERT(pp != NULL, ("NULL provider"));
- if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)
- return (EBUSY);
- sc = gp->softc;
- cp = LIST_FIRST(&gp->consumer);
- KASSERT(cp != NULL, ("NULL consumer"));
- sc->dead = 1;
- wakeup(sc);
- g_access(cp, -1, -1, -1);
- g_detach(cp);
- g_destroy_consumer(cp);
- while (sc->dead != 2 && !LIST_EMPTY(&pp->consumers))
- tsleep(sc, PRIBIO, "g_bdedie", hz);
- mtx_destroy(&sc->worklist_mutex);
- explicit_bzero(&sc->key, sizeof sc->key);
- g_free(sc);
- g_wither_geom(gp, ENXIO);
- return (0);
-}
-
-static void
-g_bde_ctlreq(struct gctl_req *req, struct g_class *mp, char const *verb)
-{
- struct g_geom *gp;
- struct g_provider *pp;
-
- if (!strcmp(verb, "create geom")) {
- pp = gctl_get_provider(req, "provider");
- if (pp != NULL)
- g_bde_create_geom(req, mp, pp);
- } else if (!strcmp(verb, "destroy geom")) {
- gp = gctl_get_geom(req, mp, "geom");
- if (gp != NULL)
- g_bde_destroy_geom(req, mp, gp);
- } else {
- gctl_error(req, "unknown verb");
- }
-}
-
-static struct g_class g_bde_class = {
- .name = BDE_CLASS_NAME,
- .version = G_VERSION,
- .destroy_geom = g_bde_destroy_geom,
- .ctlreq = g_bde_ctlreq,
- .start = g_bde_start,
- .orphan = g_bde_orphan,
- .access = g_bde_access,
- .spoiled = g_std_spoiled,
-};
-
-DECLARE_GEOM_CLASS(g_bde_class, g_bde);
-MODULE_VERSION(geom_bde, 0);
diff --git a/sys/geom/bde/g_bde.h b/sys/geom/bde/g_bde.h
deleted file mode 100644
index e501148c52bb..000000000000
--- a/sys/geom/bde/g_bde.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2002 Poul-Henning Kamp
- * Copyright (c) 2002 Networks Associates Technology, Inc.
- * All rights reserved.
- *
- * This software was developed for the FreeBSD Project by Poul-Henning Kamp
- * and NAI Labs, the Security Research Division of Network Associates, Inc.
- * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _SYS_GEOM_BDE_G_BDE_H_
-#define _SYS_GEOM_BDE_G_BDE_H_ 1
-
-/*
- * These are quite, but not entirely unlike constants.
- *
- * They are not commented in details here, to prevent unadvisable
- * experimentation. Please consult the code where they are used before you
- * even think about modifying these.
- */
-
-#define G_BDE_MKEYLEN (2048/8)
-#define G_BDE_SKEYBITS 128
-#define G_BDE_SKEYLEN (G_BDE_SKEYBITS/8)
-#define G_BDE_KKEYBITS 128
-#define G_BDE_KKEYLEN (G_BDE_KKEYBITS/8)
-#define G_BDE_MAXKEYS 4
-#define G_BDE_LOCKSIZE 384
-#define NLOCK_FIELDS 13
-
-/* This just needs to be "large enough" */
-#define G_BDE_KEYBYTES 304
-
-/* This file is being included by userspace. */
-#ifndef __diagused
-#define __diagused
-#endif
-
-struct g_bde_work;
-struct g_bde_softc;
-
-struct g_bde_sector {
- struct g_bde_work *owner;
- struct g_bde_softc *softc;
- off_t offset;
- u_int size;
- u_int ref;
- void *data;
- TAILQ_ENTRY(g_bde_sector) list;
- u_char valid;
- u_char malloc;
- enum {JUNK, IO, VALID} state;
- int error;
- time_t used;
-};
-
-struct g_bde_work {
- struct mtx mutex;
- off_t offset;
- off_t length;
- void *data;
- struct bio *bp;
- struct g_bde_softc *softc;
- off_t so;
- off_t kso;
- u_int ko;
- struct g_bde_sector *sp;
- struct g_bde_sector *ksp;
- TAILQ_ENTRY(g_bde_work) list;
- enum {SETUP, WAIT, FINISH} state;
- int error;
-};
-
-/*
- * The decrypted contents of the lock sectors. Notice that this is not
- * the same as the on-disk layout. The on-disk layout is dynamic and
- * dependent on the pass-phrase.
- */
-struct g_bde_key {
- uint64_t sector0;
- /* Physical byte offset of 1st byte used */
- uint64_t sectorN;
- /* Physical byte offset of 1st byte not used */
- uint64_t keyoffset;
- /* Number of bytes the disk image is skewed. */
- uint64_t lsector[G_BDE_MAXKEYS];
- /* Physical byte offsets of lock sectors */
- uint32_t sectorsize;
- /* Our "logical" sector size */
- uint32_t flags;
-#define GBDE_F_SECT0 1
- uint8_t salt[16];
- /* Used to frustate the kkey generation */
- uint8_t spare[32];
- /* For future use, random contents */
- uint8_t mkey[G_BDE_MKEYLEN];
- /* Our masterkey. */
-
- /* Non-stored help-fields */
- uint64_t zone_width; /* On-disk width of zone */
- uint64_t zone_cont; /* Payload width of zone */
- uint64_t media_width; /* Non-magic width of zone */
- u_int keys_per_sector;
-};
-
-struct g_bde_softc {
- off_t mediasize;
- u_int sectorsize;
- uint64_t zone_cont;
- struct g_geom *geom;
- struct g_consumer *consumer;
- TAILQ_HEAD(, g_bde_sector) freelist;
- TAILQ_HEAD(, g_bde_work) worklist;
- struct mtx worklist_mutex;
- struct proc *thread;
- struct g_bde_key key;
- int dead;
- u_int nwork;
- u_int nsect;
- u_int ncache;
- u_char sha2[SHA512_DIGEST_LENGTH];
-};
-
-/* g_bde_crypt.c */
-void g_bde_crypt_delete(struct g_bde_work *wp);
-void g_bde_crypt_read(struct g_bde_work *wp);
-void g_bde_crypt_write(struct g_bde_work *wp);
-
-/* g_bde_key.c */
-void g_bde_zap_key(struct g_bde_softc *sc);
-int g_bde_get_key(struct g_bde_softc *sc, void *ptr, int len);
-int g_bde_init_keybytes(struct g_bde_softc *sc, char *passp, int len);
-
-/* g_bde_lock .c */
-int g_bde_encode_lock(u_char *sha2, struct g_bde_key *gl, u_char *ptr);
-int g_bde_decode_lock(struct g_bde_softc *sc, struct g_bde_key *gl, u_char *ptr);
-int g_bde_keyloc_encrypt(u_char *sha2, uint64_t v0, uint64_t v1, void *output);
-int g_bde_keyloc_decrypt(u_char *sha2, void *input, uint64_t *output);
-int g_bde_decrypt_lock(struct g_bde_softc *sc, u_char *keymat, u_char *meta, off_t mediasize, u_int sectorsize, u_int *nkey);
-void g_bde_hash_pass(struct g_bde_softc *sc, const void *input, u_int len);
-
-/* g_bde_math .c */
-uint64_t g_bde_max_sector(struct g_bde_key *lp);
-void g_bde_map_sector(struct g_bde_work *wp);
-
-/* g_bde_work.c */
-void g_bde_start1(struct bio *bp);
-void g_bde_worker(void *arg);
-
-/*
- * These four functions wrap the raw Rijndael functions and make sure we
- * explode if something fails which shouldn't.
- */
-
-static __inline void
-AES_init(cipherInstance *ci)
-{
- int error __diagused;
-
- error = rijndael_cipherInit(ci, MODE_CBC, NULL);
- KASSERT(error > 0, ("rijndael_cipherInit %d", error));
-}
-
-static __inline void
-AES_makekey(keyInstance *ki, int dir, u_int len, const void *key)
-{
- int error __diagused;
-
- error = rijndael_makeKey(ki, dir, len, key);
- KASSERT(error > 0, ("rijndael_makeKey %d", error));
-}
-
-static __inline void
-AES_encrypt(cipherInstance *ci, keyInstance *ki, const void *in, void *out, u_int len)
-{
- int error __diagused;
-
- error = rijndael_blockEncrypt(ci, ki, in, len * 8, out);
- KASSERT(error > 0, ("rijndael_blockEncrypt %d", error));
-}
-
-static __inline void
-AES_decrypt(cipherInstance *ci, keyInstance *ki, const void *in, void *out, u_int len)
-{
- int error __diagused;
-
- error = rijndael_blockDecrypt(ci, ki, in, len * 8, out);
- KASSERT(error > 0, ("rijndael_blockDecrypt %d", error));
-}
-
-#endif /* _SYS_GEOM_BDE_G_BDE_H_ */
diff --git a/sys/geom/bde/g_bde_crypt.c b/sys/geom/bde/g_bde_crypt.c
deleted file mode 100644
index 39825a5bdf21..000000000000
--- a/sys/geom/bde/g_bde_crypt.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2002 Poul-Henning Kamp
- * Copyright (c) 2002 Networks Associates Technology, Inc.
- * All rights reserved.
- *
- * This software was developed for the FreeBSD Project by Poul-Henning Kamp
- * and NAI Labs, the Security Research Division of Network Associates, Inc.
- * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* This source file contains the functions responsible for the crypto, keying
- * and mapping operations on the I/O requests.
- *
- */
-
-#include <sys/param.h>
-#include <sys/bio.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/libkern.h>
-#include <sys/endian.h>
-#include <sys/md5.h>
-
-#include <crypto/rijndael/rijndael-api-fst.h>
-#include <crypto/sha2/sha512.h>
-
-#include <geom/geom.h>
-#include <geom/bde/g_bde.h>
-
-/*
- * XXX: Debugging DO NOT ENABLE
- */
-#undef MD5_KEY
-
-/*
- * Derive kkey from mkey + sector offset.
- *
- * Security objective: Derive a potentially very large number of distinct skeys
- * from the comparatively small key material in our mkey, in such a way that
- * if one, more or even many of the kkeys are compromised, this does not
- * significantly help an attack on other kkeys and in particular does not
- * weaken or compromise the mkey.
- *
- * First we MD5 hash the sectornumber with the salt from the lock sector.
- * The salt prevents the precalculation and statistical analysis of the MD5
- * output which would be possible if we only gave it the sectornumber.
- *
- * The MD5 hash is used to pick out 16 bytes from the masterkey, which
- * are then hashed with MD5 together with the sector number.
- *
- * The resulting MD5 hash is the kkey.
- */
-
-static void
-g_bde_kkey(struct g_bde_softc *sc, keyInstance *ki, int dir, off_t sector)
-{
- u_int t;
- MD5_CTX ct;
- u_char buf[16];
- u_char buf2[8];
-
- /* We have to be architecture neutral */
- le64enc(buf2, sector);
-
- MD5Init(&ct);
- MD5Update(&ct, sc->key.salt, 8);
- MD5Update(&ct, buf2, sizeof buf2);
- MD5Update(&ct, sc->key.salt + 8, 8);
- MD5Final(buf, &ct);
-
- MD5Init(&ct);
- for (t = 0; t < 16; t++) {
- MD5Update(&ct, &sc->key.mkey[buf[t]], 1);
- if (t == 8)
- MD5Update(&ct, buf2, sizeof buf2);
- }
- bzero(buf2, sizeof buf2);
- MD5Final(buf, &ct);
- bzero(&ct, sizeof ct);
- AES_makekey(ki, dir, G_BDE_KKEYBITS, buf);
- bzero(buf, sizeof buf);
-}
-
-/*
- * Encryption work for read operation.
- *
- * Security objective: Find the kkey, find the skey, decrypt the sector data.
- */
-
-void
-g_bde_crypt_read(struct g_bde_work *wp)
-{
- struct g_bde_softc *sc;
- u_char *d;
- u_int n;
- off_t o;
- u_char skey[G_BDE_SKEYLEN];
- keyInstance ki;
- cipherInstance ci;
-
- AES_init(&ci);
- sc = wp->softc;
- o = 0;
- for (n = 0; o < wp->length; n++, o += sc->sectorsize) {
- d = (u_char *)wp->ksp->data + wp->ko + n * G_BDE_SKEYLEN;
- g_bde_kkey(sc, &ki, DIR_DECRYPT, wp->offset + o);
- AES_decrypt(&ci, &ki, d, skey, sizeof skey);
- d = (u_char *)wp->data + o;
- AES_makekey(&ki, DIR_DECRYPT, G_BDE_SKEYBITS, skey);
- AES_decrypt(&ci, &ki, d, d, sc->sectorsize);
- }
- bzero(skey, sizeof skey);
- bzero(&ci, sizeof ci);
- bzero(&ki, sizeof ki);
-}
-
-/*
- * Encryption work for write operation.
- *
- * Security objective: Create random skey, encrypt sector data,
- * encrypt skey with the kkey.
- */
-
-void
-g_bde_crypt_write(struct g_bde_work *wp)
-{
- u_char *s, *d;
- struct g_bde_softc *sc;
- u_int n;
- off_t o;
- u_char skey[G_BDE_SKEYLEN];
- keyInstance ki;
- cipherInstance ci;
-
- sc = wp->softc;
- AES_init(&ci);
- o = 0;
- for (n = 0; o < wp->length; n++, o += sc->sectorsize) {
- s = (u_char *)wp->data + o;
- d = (u_char *)wp->sp->data + o;
- arc4rand(skey, sizeof skey, 0);
- AES_makekey(&ki, DIR_ENCRYPT, G_BDE_SKEYBITS, skey);
- AES_encrypt(&ci, &ki, s, d, sc->sectorsize);
-
- d = (u_char *)wp->ksp->data + wp->ko + n * G_BDE_SKEYLEN;
- g_bde_kkey(sc, &ki, DIR_ENCRYPT, wp->offset + o);
- AES_encrypt(&ci, &ki, skey, d, sizeof skey);
- bzero(skey, sizeof skey);
- }
- bzero(skey, sizeof skey);
- bzero(&ci, sizeof ci);
- bzero(&ki, sizeof ki);
-}
-
-/*
- * Encryption work for delete operation.
- *
- * Security objective: Write random data to the sectors.
- *
- * XXX: At a hit in performance we would trash the encrypted skey as well.
- * XXX: This would add frustration to the cleaning lady attack by making
- * XXX: deletes look like writes.
- */
-
-void
-g_bde_crypt_delete(struct g_bde_work *wp)
-{
- struct g_bde_softc *sc;
- u_char *d;
- off_t o;
- u_char skey[G_BDE_SKEYLEN];
- keyInstance ki;
- cipherInstance ci;
-
- sc = wp->softc;
- d = wp->sp->data;
- AES_init(&ci);
- /*
- * Do not unroll this loop!
- * Our zone may be significantly wider than the amount of random
- * bytes arc4rand likes to give in one reseeding, whereas our
- * sectorsize is far more likely to be in the same range.
- */
- for (o = 0; o < wp->length; o += sc->sectorsize) {
- arc4rand(d, sc->sectorsize, 0);
- arc4rand(skey, sizeof skey, 0);
- AES_makekey(&ki, DIR_ENCRYPT, G_BDE_SKEYBITS, skey);
- AES_encrypt(&ci, &ki, d, d, sc->sectorsize);
- d += sc->sectorsize;
- }
- /*
- * Having written a long random sequence to disk here, we want to
- * force a reseed, to avoid weakening the next time we use random
- * data for something important.
- */
- arc4rand(&o, sizeof o, 1);
-}
-
-/*
- * Calculate the total payload size of the encrypted device.
- *
- * Security objectives: none.
- *
- * This function needs to agree with g_bde_map_sector() about things.
- */
-
-uint64_t
-g_bde_max_sector(struct g_bde_key *kp)
-{
- uint64_t maxsect;
-
- maxsect = kp->media_width;
- maxsect /= kp->zone_width;
- maxsect *= kp->zone_cont;
- return (maxsect);
-}
-
-/*
- * Convert an unencrypted side offset to offsets on the encrypted side.
- *
- * Security objective: Make it harder to identify what sectors contain what
- * on a "cold" disk image.
- *
- * We do this by adding the "keyoffset" from the lock to the physical sector
- * number modulus the available number of sectors. Since all physical sectors
- * presumably look the same cold, this will do.
- *
- * As part of the mapping we have to skip the lock sectors which we know
- * the physical address off. We also truncate the work packet, respecting
- * zone boundaries and lock sectors, so that we end up with a sequence of
- * sectors which are physically contiguous.
- *
- * Shuffling things further is an option, but the incremental frustration is
- * not currently deemed worth the run-time performance hit resulting from the
- * increased number of disk arm movements it would incur.
- *
- * This function offers nothing but a trivial diversion for an attacker able
- * to do "the cleaning lady attack" in its current static mapping form.
- */
-
-void
-g_bde_map_sector(struct g_bde_work *wp)
-{
-
- u_int zone, zoff, u, len;
- uint64_t ko;
- struct g_bde_softc *sc;
- struct g_bde_key *kp;
-
- sc = wp->softc;
- kp = &sc->key;
-
- /* find which zone and the offset in it */
- zone = wp->offset / kp->zone_cont;
- zoff = wp->offset % kp->zone_cont;
-
- /* Calculate the offset of the key in the key sector */
- wp->ko = (zoff / kp->sectorsize) * G_BDE_SKEYLEN;
-
- /* restrict length to that zone */
- len = kp->zone_cont - zoff;
-
- /* ... and in general */
- if (len > DFLTPHYS)
- len = DFLTPHYS;
-
- if (len < wp->length)
- wp->length = len;
-
- /* Find physical sector address */
- wp->so = zone * kp->zone_width + zoff;
- wp->so += kp->keyoffset;
- wp->so %= kp->media_width;
- if (wp->so + wp->length > kp->media_width)
- wp->length = kp->media_width - wp->so;
- wp->so += kp->sector0;
-
- /* The key sector is the last in this zone. */
- wp->kso = zone * kp->zone_width + kp->zone_cont;
- wp->kso += kp->keyoffset;
- wp->kso %= kp->media_width;
- wp->kso += kp->sector0;
-
- /* Compensate for lock sectors */
- for (u = 0; u < G_BDE_MAXKEYS; u++) {
- /* Find the start of this lock sector */
- ko = rounddown2(kp->lsector[u], (uint64_t)kp->sectorsize);
-
- if (wp->kso >= ko)
- wp->kso += kp->sectorsize;
-
- if (wp->so >= ko) {
- /* lock sector before work packet */
- wp->so += kp->sectorsize;
- } else if ((wp->so + wp->length) > ko) {
- /* lock sector in work packet, truncate */
- wp->length = ko - wp->so;
- }
- }
-
-#if 0
- printf("off %jd len %jd so %jd ko %jd kso %u\n",
- (intmax_t)wp->offset,
- (intmax_t)wp->length,
- (intmax_t)wp->so,
- (intmax_t)wp->kso,
- wp->ko);
-#endif
- KASSERT(wp->so + wp->length <= kp->sectorN,
- ("wp->so (%jd) + wp->length (%jd) > EOM (%jd), offset = %jd",
- (intmax_t)wp->so,
- (intmax_t)wp->length,
- (intmax_t)kp->sectorN,
- (intmax_t)wp->offset));
-
- KASSERT(wp->kso + kp->sectorsize <= kp->sectorN,
- ("wp->kso (%jd) + kp->sectorsize > EOM (%jd), offset = %jd",
- (intmax_t)wp->kso,
- (intmax_t)kp->sectorN,
- (intmax_t)wp->offset));
-
- KASSERT(wp->so >= kp->sector0,
- ("wp->so (%jd) < BOM (%jd), offset = %jd",
- (intmax_t)wp->so,
- (intmax_t)kp->sector0,
- (intmax_t)wp->offset));
-
- KASSERT(wp->kso >= kp->sector0,
- ("wp->kso (%jd) <BOM (%jd), offset = %jd",
- (intmax_t)wp->kso,
- (intmax_t)kp->sector0,
- (intmax_t)wp->offset));
-}
diff --git a/sys/geom/bde/g_bde_lock.c b/sys/geom/bde/g_bde_lock.c
deleted file mode 100644
index 5693913bf7c6..000000000000
--- a/sys/geom/bde/g_bde_lock.c
+++ /dev/null
@@ -1,478 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2002 Poul-Henning Kamp
- * Copyright (c) 2002 Networks Associates Technology, Inc.
- * All rights reserved.
- *
- * This software was developed for the FreeBSD Project by Poul-Henning Kamp
- * and NAI Labs, the Security Research Division of Network Associates, Inc.
- * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* This souce file contains routines which operates on the lock sectors, both
- * for the kernel and the userland program gbde(1).
- *
- */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/endian.h>
-#include <sys/md5.h>
-
-#ifdef _KERNEL
-#include <sys/malloc.h>
-#include <sys/systm.h>
-#else
-#include <err.h>
-#define CTASSERT(foo)
-#define KASSERT(foo, bar) do { if(!(foo)) { warn bar ; exit (1); } } while (0)
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#define g_free(foo) free(foo)
-#endif
-
-#include <crypto/rijndael/rijndael-api-fst.h>
-#include <crypto/sha2/sha512.h>
-
-#include <geom/geom.h>
-#include <geom/bde/g_bde.h>
-
-/*
- * Hash the raw pass-phrase.
- *
- * Security objectives: produce from the pass-phrase a fixed length
- * bytesequence with PRN like properties in a reproducible way retaining
- * as much entropy from the pass-phrase as possible.
- *
- * SHA2-512 makes this easy.
- */
-
-void
-g_bde_hash_pass(struct g_bde_softc *sc, const void *input, u_int len)
-{
- SHA512_CTX cx;
-
- SHA512_Init(&cx);
- SHA512_Update(&cx, input, len);
- SHA512_Final(sc->sha2, &cx);
-}
-
-/*
- * Encode/Decode the lock structure in byte-sequence format.
- *
- * Security objectives: Store in pass-phrase dependent variant format.
- *
- * C-structure packing and byte-endianess depends on architecture, compiler
- * and compiler options. Writing raw structures to disk is therefore a bad
- * idea in these enlightend days.
- *
- * We spend a fraction of the key-material on shuffling the fields around
- * so they will be stored in an unpredictable sequence.
- *
- * For each byte of the key-material we derive two field indexes, and swap
- * the position of those two fields.
- *
- * I have not worked out the statistical properties of this shuffle, but
- * given that the key-material has PRN properties, the primary objective
- * of making it hard to figure out which bits are where in the lock sector
- * is sufficiently fulfilled.
- *
- * We include (and shuffle) an extra hash field in the stored version for
- * identification and versioning purposes. This field contains the MD5 hash
- * of a version identifier (currently "0000") followed by the stored lock
- * sector byte-sequence substituting zero bytes for the hash field.
- *
- * The stored keysequence is protected by AES/256/CBC elsewhere in the code
- * so the fact that the generated byte sequence has a much higher than
- * average density of zero bits (from the numeric fields) is not currently
- * a concern.
- *
- * Should this later become a concern, a simple software update and
- * pass-phrase change can remedy the situation. One possible solution
- * could be to XOR the numeric fields with a key-material derived PRN.
- *
- * The chosen shuffle algorithm only works as long as we have no more than 16
- * fields in the stored part of the lock structure (hence the CTASSERT below).
- */
-
-CTASSERT(NLOCK_FIELDS <= 16);
-
-static void
-g_bde_shuffle_lock(u_char *sha2, int *buf)
-{
- int j, k, l;
- u_int u;
-
- /* Assign the fields sequential positions */
- for(u = 0; u < NLOCK_FIELDS; u++)
- buf[u] = u;
-
- /* Then mix it all up */
- for(u = 48; u < SHA512_DIGEST_LENGTH; u++) {
- j = sha2[u] % NLOCK_FIELDS;
- k = (sha2[u] / NLOCK_FIELDS) % NLOCK_FIELDS;
- l = buf[j];
- buf[j] = buf[k];
- buf[k] = l;
- }
-}
-
-int
-g_bde_encode_lock(u_char *sha2, struct g_bde_key *gl, u_char *ptr)
-{
- int shuffle[NLOCK_FIELDS];
- u_char *hash, *p;
- int i;
- MD5_CTX c;
-
- p = ptr;
- hash = NULL;
- g_bde_shuffle_lock(sha2, shuffle);
- for (i = 0; i < NLOCK_FIELDS; i++) {
- switch(shuffle[i]) {
- case 0:
- le64enc(p, gl->sector0);
- p += 8;
- break;
- case 1:
- le64enc(p, gl->sectorN);
- p += 8;
- break;
- case 2:
- le64enc(p, gl->keyoffset);
- p += 8;
- break;
- case 3:
- le32enc(p, gl->sectorsize);
- p += 4;
- break;
- case 4:
- le32enc(p, gl->flags);
- p += 4;
- break;
- case 5:
- case 6:
- case 7:
- case 8:
- le64enc(p, gl->lsector[shuffle[i] - 5]);
- p += 8;
- break;
- case 9:
- bcopy(gl->spare, p, sizeof gl->spare);
- p += sizeof gl->spare;
- break;
- case 10:
- bcopy(gl->salt, p, sizeof gl->salt);
- p += sizeof gl->salt;
- break;
- case 11:
- bcopy(gl->mkey, p, sizeof gl->mkey);
- p += sizeof gl->mkey;
- break;
- case 12:
- bzero(p, 16);
- hash = p;
- p += 16;
- break;
- }
- }
- if(ptr + G_BDE_LOCKSIZE != p)
- return(-1);
- if (hash == NULL)
- return(-1);
- MD5Init(&c);
- MD5Update(&c, "0000", 4); /* Versioning */
- MD5Update(&c, ptr, G_BDE_LOCKSIZE);
- MD5Final(hash, &c);
- return(0);
-}
-
-int
-g_bde_decode_lock(struct g_bde_softc *sc, struct g_bde_key *gl, u_char *ptr)
-{
- int shuffle[NLOCK_FIELDS];
- u_char *p;
- u_char hash[16], hash2[16];
- MD5_CTX c;
- int i;
-
- p = ptr;
- g_bde_shuffle_lock(sc->sha2, shuffle);
- for (i = 0; i < NLOCK_FIELDS; i++) {
- switch(shuffle[i]) {
- case 0:
- gl->sector0 = le64dec(p);
- p += 8;
- break;
- case 1:
- gl->sectorN = le64dec(p);
- p += 8;
- break;
- case 2:
- gl->keyoffset = le64dec(p);
- p += 8;
- break;
- case 3:
- gl->sectorsize = le32dec(p);
- p += 4;
- break;
- case 4:
- gl->flags = le32dec(p);
- p += 4;
- break;
- case 5:
- case 6:
- case 7:
- case 8:
- gl->lsector[shuffle[i] - 5] = le64dec(p);
- p += 8;
- break;
- case 9:
- bcopy(p, gl->spare, sizeof gl->spare);
- p += sizeof gl->spare;
- break;
- case 10:
- bcopy(p, gl->salt, sizeof gl->salt);
- p += sizeof gl->salt;
- break;
- case 11:
- bcopy(p, gl->mkey, sizeof gl->mkey);
- p += sizeof gl->mkey;
- break;
- case 12:
- bcopy(p, hash2, sizeof hash2);
- bzero(p, sizeof hash2);
- p += sizeof hash2;
- break;
- }
- }
- if(ptr + G_BDE_LOCKSIZE != p)
- return(-1);
- MD5Init(&c);
- MD5Update(&c, "0000", 4); /* Versioning */
- MD5Update(&c, ptr, G_BDE_LOCKSIZE);
- MD5Final(hash, &c);
- if (bcmp(hash, hash2, sizeof hash2))
- return (1);
- return (0);
-}
-
-/*
- * Encode/Decode the locksector address ("metadata") with key-material.
- *
- * Security objectives: Encode/Decode the metadata encrypted by key-material.
- *
- * A simple AES/128/CBC will do. We take care to always store the metadata
- * in the same endianness to make it MI.
- *
- * In the typical case the metadata is stored in encrypted format in sector
- * zero on the media, but at the users discretion or if the piece of the
- * device used (sector0...sectorN) does not contain sector zero, it can
- * be stored in a filesystem or on a PostIt.
- *
- * The inability to easily locate the lock sectors makes an attack on a
- * cold disk much less attractive, without unduly inconveniencing the
- * legitimate user who can feasibly do a brute-force scan if the metadata
- * was lost.
- */
-
-int
-g_bde_keyloc_encrypt(u_char *sha2, uint64_t v0, uint64_t v1, void *output)
-{
- u_char buf[16];
- keyInstance ki;
- cipherInstance ci;
-
- le64enc(buf, v0);
- le64enc(buf + 8, v1);
- AES_init(&ci);
- AES_makekey(&ki, DIR_ENCRYPT, G_BDE_KKEYBITS, sha2 + 0);
- AES_encrypt(&ci, &ki, buf, output, sizeof buf);
- explicit_bzero(buf, sizeof buf);
- explicit_bzero(&ci, sizeof ci);
- explicit_bzero(&ki, sizeof ki);
- return (0);
-}
-
-int
-g_bde_keyloc_decrypt(u_char *sha2, void *input, uint64_t *output)
-{
- keyInstance ki;
- cipherInstance ci;
- u_char buf[16];
-
- AES_init(&ci);
- AES_makekey(&ki, DIR_DECRYPT, G_BDE_KKEYBITS, sha2 + 0);
- AES_decrypt(&ci, &ki, input, buf, sizeof buf);
- *output = le64dec(buf);
- explicit_bzero(buf, sizeof buf);
- explicit_bzero(&ci, sizeof ci);
- explicit_bzero(&ki, sizeof ki);
- return(0);
-}
-
-/*
- * Find and Encode/Decode lock sectors.
- *
- * Security objective: given the pass-phrase, find, decrypt, decode and
- * validate the lock sector contents.
- *
- * For ondisk metadata we cannot know beforehand which of the lock sectors
- * a given pass-phrase opens so we must try each of the metadata copies in
- * sector zero in turn. If metadata was passed as an argument, we don't
- * have this problem.
- *
- */
-
-static int
-g_bde_decrypt_lockx(struct g_bde_softc *sc, u_char *meta, off_t mediasize, u_int sectorsize, u_int *nkey)
-{
- u_char *buf, *q;
- struct g_bde_key *gl;
- uint64_t off, q1;
- int error, m, i;
- keyInstance ki;
- cipherInstance ci;
-
- gl = &sc->key;
-
- /* Try to decrypt the metadata */
- error = g_bde_keyloc_decrypt(sc->sha2, meta, &off);
- if (error)
- return (error);
-
- /* If it points into thin blue air, forget it */
- if (off + G_BDE_LOCKSIZE > (uint64_t)mediasize) {
- off = 0;
- return (EINVAL);
- }
-
- /* The lock data may span two physical sectors. */
-
- m = 1;
- if (off % sectorsize > sectorsize - G_BDE_LOCKSIZE)
- m++;
-
- /* Read the suspected sector(s) */
- buf = g_read_data(sc->consumer,
- off - (off % sectorsize),
- m * sectorsize, &error);
- if (buf == NULL) {
- off = 0;
- return(error);
- }
-
- /* Find the byte-offset of the stored byte sequence */
- q = buf + off % sectorsize;
-
- /* If it is all zero, somebody nuked our lock sector */
- q1 = 0;
- for (i = 0; i < G_BDE_LOCKSIZE; i++)
- q1 += q[i];
- if (q1 == 0) {
- off = 0;
- g_free(buf);
- return (ESRCH);
- }
-
- /* Decrypt the byte-sequence in place */
- AES_init(&ci);
- AES_makekey(&ki, DIR_DECRYPT, 256, sc->sha2 + 16);
- AES_decrypt(&ci, &ki, q, q, G_BDE_LOCKSIZE);
-
- /* Decode the byte-sequence */
- i = g_bde_decode_lock(sc, gl, q);
- q = NULL;
- if (i < 0) {
- off = 0;
- return (EDOOFUS); /* Programming error */
- } else if (i > 0) {
- off = 0;
- return (ENOTDIR); /* Hash didn't match */
- }
-
- bzero(buf, sectorsize * m);
- g_free(buf);
-
- /* If the masterkey is all zeros, user destroyed it */
- q1 = 0;
- for (i = 0; i < (int)sizeof(gl->mkey); i++)
- q1 += gl->mkey[i];
- if (q1 == 0)
- return (ENOENT);
-
- /* If we have an unsorted lock-sequence, refuse */
- for (i = 0; i < G_BDE_MAXKEYS - 1; i++)
- if (gl->lsector[i] >= gl->lsector[i + 1])
- return (EINVAL);
-
- /* Finally, find out which key was used by matching the byte offset */
- for (i = 0; i < G_BDE_MAXKEYS; i++)
- if (nkey != NULL && off == gl->lsector[i])
- *nkey = i;
- off = 0;
- return (0);
-}
-
-int
-g_bde_decrypt_lock(struct g_bde_softc *sc, u_char *keymat, u_char *meta, off_t mediasize, u_int sectorsize, u_int *nkey)
-{
- u_char *buf, buf1[16];
- int error, e, i;
-
- /* set up the key-material */
- bcopy(keymat, sc->sha2, SHA512_DIGEST_LENGTH);
-
- /* If passed-in metadata is non-zero, use it */
- bzero(buf1, sizeof buf1);
- if (meta != NULL && bcmp(buf1, meta, sizeof buf1))
- return (g_bde_decrypt_lockx(sc, meta, mediasize,
- sectorsize, nkey));
-
- /* Read sector zero */
- buf = g_read_data(sc->consumer, 0, sectorsize, &error);
- if (buf == NULL)
- return(error);
-
- /* Try each index in turn, save indicative errors for final result */
- error = EINVAL;
- for (i = 0; i < G_BDE_MAXKEYS; i++) {
- e = g_bde_decrypt_lockx(sc, buf + i * 16, mediasize,
- sectorsize, nkey);
- /* Success or destroyed master key terminates */
- if (e == 0 || e == ENOENT) {
- error = e;
- break;
- }
- if (e != 0 && error == EINVAL)
- error = e;
- }
- g_free(buf);
- return (error);
-}
diff --git a/sys/geom/bde/g_bde_work.c b/sys/geom/bde/g_bde_work.c
deleted file mode 100644
index 684ff91d6fad..000000000000
--- a/sys/geom/bde/g_bde_work.c
+++ /dev/null
@@ -1,778 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2002 Poul-Henning Kamp
- * Copyright (c) 2002 Networks Associates Technology, Inc.
- * All rights reserved.
- *
- * This software was developed for the FreeBSD Project by Poul-Henning Kamp
- * and NAI Labs, the Security Research Division of Network Associates, Inc.
- * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/*
- * This source file contains the state-engine which makes things happen in the
- * right order.
- *
- * Outline:
- * 1) g_bde_start1()
- * Break the struct bio into multiple work packets one per zone.
- * 2) g_bde_start2()
- * Setup the necessary sector buffers and start those read operations
- * which we can start at this time and put the item on the work-list.
- * 3) g_bde_worker()
- * Scan the work-list for items which are ready for crypto processing
- * and call the matching crypto function in g_bde_crypt.c and schedule
- * any writes needed. Read operations finish here by releasing the
- * sector buffers and delivering the original bio request.
- * 4) g_bde_write_done()
- * Release sector buffers and deliver the original bio request.
- *
- * Because of the C-scope rules, the functions are almost perfectly in the
- * opposite order in this source file.
- *
- * XXX: A switch to the hardware assisted crypto in src/sys/opencrypto will add
- * XXX: additional states to this state-engine. Since no hardware available
- * XXX: at this time has AES support, implementing this has been postponed
- * XXX: until such time as it would result in a benefit.
- */
-
-#include <sys/param.h>
-#include <sys/bio.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/kthread.h>
-
-#include <crypto/rijndael/rijndael-api-fst.h>
-#include <crypto/sha2/sha512.h>
-#include <geom/geom.h>
-#include <geom/bde/g_bde.h>
-
-/*
- * FIXME: This used to call malloc_last_fail which in practice was almost
- * guaranteed to return time_uptime even in face of severe memory shortage.
- * As GBDE is the only consumer the kludge below was added to facilitate the
- * removal with minimial changes. The code should be fixed to respond to memory
- * pressure (e.g., by using lowmem eventhandler) instead.
- */
-static int
-g_bde_malloc_last_fail(void)
-{
-
- return (time_uptime);
-}
-
-static void g_bde_delete_sector(struct g_bde_softc *wp, struct g_bde_sector *sp);
-static struct g_bde_sector * g_bde_new_sector(struct g_bde_work *wp, u_int len);
-static void g_bde_release_keysector(struct g_bde_work *wp);
-static struct g_bde_sector *g_bde_get_keysector(struct g_bde_work *wp);
-static int g_bde_start_read(struct g_bde_sector *sp);
-static void g_bde_purge_sector(struct g_bde_softc *sc, int fraction);
-
-/*
- * Work item allocation.
- *
- * C++ would call these constructors and destructors.
- */
-static u_int g_bde_nwork;
-SYSCTL_UINT(_debug, OID_AUTO, gbde_nwork, CTLFLAG_RD, &g_bde_nwork, 0, "");
-
-static MALLOC_DEFINE(M_GBDE, "gbde", "GBDE data structures");
-
-static struct g_bde_work *
-g_bde_new_work(struct g_bde_softc *sc)
-{
- struct g_bde_work *wp;
-
- wp = malloc(sizeof *wp, M_GBDE, M_NOWAIT | M_ZERO);
- if (wp == NULL)
- return (wp);
- wp->state = SETUP;
- wp->softc = sc;
- g_bde_nwork++;
- sc->nwork++;
- TAILQ_INSERT_TAIL(&sc->worklist, wp, list);
- return (wp);
-}
-
-static void
-g_bde_delete_work(struct g_bde_work *wp)
-{
- struct g_bde_softc *sc;
-
- sc = wp->softc;
- g_bde_nwork--;
- sc->nwork--;
- TAILQ_REMOVE(&sc->worklist, wp, list);
- free(wp, M_GBDE);
-}
-
-/*
- * Sector buffer allocation
- *
- * These two functions allocate and free back variable sized sector buffers
- */
-
-static u_int g_bde_nsect;
-SYSCTL_UINT(_debug, OID_AUTO, gbde_nsect, CTLFLAG_RD, &g_bde_nsect, 0, "");
-
-static void
-g_bde_delete_sector(struct g_bde_softc *sc, struct g_bde_sector *sp)
-{
-
- g_bde_nsect--;
- sc->nsect--;
- if (sp->malloc)
- free(sp->data, M_GBDE);
- free(sp, M_GBDE);
-}
-
-static struct g_bde_sector *
-g_bde_new_sector(struct g_bde_work *wp, u_int len)
-{
- struct g_bde_sector *sp;
-
- sp = malloc(sizeof *sp, M_GBDE, M_NOWAIT | M_ZERO);
- if (sp == NULL)
- return (sp);
- if (len > 0) {
- sp->data = malloc(len, M_GBDE, M_NOWAIT | M_ZERO);
- if (sp->data == NULL) {
- free(sp, M_GBDE);
- return (NULL);
- }
- sp->malloc = 1;
- }
- g_bde_nsect++;
- wp->softc->nsect++;
- sp->size = len;
- sp->softc = wp->softc;
- sp->ref = 1;
- sp->owner = wp;
- sp->offset = wp->so;
- sp->state = JUNK;
- return (sp);
-}
-
-/*
- * Skey sector cache.
- *
- * Nothing prevents two separate I/O requests from addressing the same zone
- * and thereby needing the same skey sector. We therefore need to sequence
- * I/O operations to the skey sectors. A certain amount of caching is also
- * desirable, although the extent of benefit from this is not at this point
- * determined.
- *
- * XXX: GEOM may be able to grow a generic caching facility at some point
- * XXX: to support such needs.
- */
-
-static u_int g_bde_ncache;
-SYSCTL_UINT(_debug, OID_AUTO, gbde_ncache, CTLFLAG_RD, &g_bde_ncache, 0, "");
-
-static void
-g_bde_purge_one_sector(struct g_bde_softc *sc, struct g_bde_sector *sp)
-{
-
- g_trace(G_T_TOPOLOGY, "g_bde_purge_one_sector(%p, %p)", sc, sp);
- if (sp->ref != 0)
- return;
- TAILQ_REMOVE(&sc->freelist, sp, list);
- g_bde_ncache--;
- sc->ncache--;
- bzero(sp->data, sp->size);
- g_bde_delete_sector(sc, sp);
-}
-
-static struct g_bde_sector *
-g_bde_get_keysector(struct g_bde_work *wp)
-{
- struct g_bde_sector *sp;
- struct g_bde_softc *sc;
- off_t offset;
-
- offset = wp->kso;
- g_trace(G_T_TOPOLOGY, "g_bde_get_keysector(%p, %jd)", wp, (intmax_t)offset);
- sc = wp->softc;
-
- if (g_bde_malloc_last_fail() < g_bde_ncache)
- g_bde_purge_sector(sc, -1);
-
- sp = TAILQ_FIRST(&sc->freelist);
- if (sp != NULL && sp->ref == 0 && sp->used + 300 < time_uptime)
- g_bde_purge_one_sector(sc, sp);
-
- TAILQ_FOREACH(sp, &sc->freelist, list) {
- if (sp->offset == offset)
- break;
- }
- if (sp != NULL) {
- sp->ref++;
- KASSERT(sp->offset == offset, ("wrong offset"));
- KASSERT(sp->softc == wp->softc, ("wrong softc"));
- if (sp->ref == 1)
- sp->owner = wp;
- } else {
- if (g_bde_malloc_last_fail() < g_bde_ncache) {
- TAILQ_FOREACH(sp, &sc->freelist, list)
- if (sp->ref == 0)
- break;
- }
- if (sp == NULL && !TAILQ_EMPTY(&sc->freelist))
- sp = TAILQ_FIRST(&sc->freelist);
- if (sp != NULL && sp->ref > 0)
- sp = NULL;
- if (sp == NULL) {
- sp = g_bde_new_sector(wp, sc->sectorsize);
- if (sp != NULL) {
- g_bde_ncache++;
- sc->ncache++;
- TAILQ_INSERT_TAIL(&sc->freelist, sp, list);
- sp->malloc = 2;
- }
- }
- if (sp != NULL) {
- sp->offset = offset;
- sp->softc = wp->softc;
- sp->ref = 1;
- sp->owner = wp;
- sp->state = JUNK;
- sp->error = 0;
- }
- }
- if (sp != NULL) {
- TAILQ_REMOVE(&sc->freelist, sp, list);
- TAILQ_INSERT_TAIL(&sc->freelist, sp, list);
- sp->used = time_uptime;
- }
- wp->ksp = sp;
- return(sp);
-}
-
-static void
-g_bde_release_keysector(struct g_bde_work *wp)
-{
- struct g_bde_softc *sc;
- struct g_bde_work *wp2;
- struct g_bde_sector *sp;
-
- sp = wp->ksp;
- g_trace(G_T_TOPOLOGY, "g_bde_release_keysector(%p)", sp);
- KASSERT(sp->malloc == 2, ("Wrong sector released"));
- sc = sp->softc;
- KASSERT(sc != NULL, ("NULL sp->softc"));
- KASSERT(wp == sp->owner, ("Releasing, not owner"));
- sp->owner = NULL;
- wp->ksp = NULL;
- sp->ref--;
- if (sp->ref > 0) {
- TAILQ_REMOVE(&sc->freelist, sp, list);
- TAILQ_INSERT_TAIL(&sc->freelist, sp, list);
- TAILQ_FOREACH(wp2, &sc->worklist, list) {
- if (wp2->ksp == sp) {
- KASSERT(wp2 != wp, ("Self-reowning"));
- sp->owner = wp2;
- wakeup(sp->softc);
- break;
- }
- }
- KASSERT(wp2 != NULL, ("Failed to pick up owner for %p\n", sp));
- } else if (sp->error != 0) {
- sp->offset = ~0;
- sp->error = 0;
- sp->state = JUNK;
- }
- TAILQ_REMOVE(&sc->freelist, sp, list);
- TAILQ_INSERT_HEAD(&sc->freelist, sp, list);
-}
-
-static void
-g_bde_purge_sector(struct g_bde_softc *sc, int fraction)
-{
- struct g_bde_sector *sp;
- int n;
-
- g_trace(G_T_TOPOLOGY, "g_bde_purge_sector(%p)", sc);
- if (fraction > 0)
- n = sc->ncache / fraction + 1;
- else
- n = g_bde_ncache - g_bde_malloc_last_fail();
- if (n < 0)
- return;
- if (n > sc->ncache)
- n = sc->ncache;
- while(n--) {
- TAILQ_FOREACH(sp, &sc->freelist, list) {
- if (sp->ref != 0)
- continue;
- TAILQ_REMOVE(&sc->freelist, sp, list);
- g_bde_ncache--;
- sc->ncache--;
- bzero(sp->data, sp->size);
- g_bde_delete_sector(sc, sp);
- break;
- }
- }
-}
-
-static struct g_bde_sector *
-g_bde_read_keysector(struct g_bde_softc *sc, struct g_bde_work *wp)
-{
- struct g_bde_sector *sp;
-
- g_trace(G_T_TOPOLOGY, "g_bde_read_keysector(%p)", wp);
- sp = g_bde_get_keysector(wp);
- if (sp == NULL) {
- g_bde_purge_sector(sc, -1);
- sp = g_bde_get_keysector(wp);
- }
- if (sp == NULL)
- return (sp);
- if (sp->owner != wp)
- return (sp);
- if (sp->state == VALID)
- return (sp);
- if (g_bde_start_read(sp) == 0)
- return (sp);
- g_bde_release_keysector(wp);
- return (NULL);
-}
-
-/*
- * Contribute to the completion of the original bio request.
- *
- * We have no simple way to tell how many bits the original bio request has
- * been segmented into, so the easiest way to determine when we can deliver
- * it is to keep track of the number of bytes we have completed. We keep
- * track of any errors underway and latch onto the first one.
- *
- * We always report "nothing done" in case of error, because random bits here
- * and there may be completed and returning a number of completed bytes does
- * not convey any useful information about which bytes they were. If some
- * piece of broken code somewhere interprets this to mean that nothing has
- * changed on the underlying media they deserve the lossage headed for them.
- *
- * A single mutex per g_bde instance is used to prevent contention.
- */
-
-static void
-g_bde_contribute(struct bio *bp, off_t bytes, int error)
-{
-
- g_trace(G_T_TOPOLOGY, "g_bde_contribute bp %p bytes %jd error %d",
- bp, (intmax_t)bytes, error);
- if (bp->bio_error == 0)
- bp->bio_error = error;
- bp->bio_completed += bytes;
- KASSERT(bp->bio_completed <= bp->bio_length, ("Too large contribution"));
- if (bp->bio_completed == bp->bio_length) {
- if (bp->bio_error != 0)
- bp->bio_completed = 0;
- g_io_deliver(bp, bp->bio_error);
- }
-}
-
-/*
- * This is the common case "we're done with this work package" function
- */
-
-static void
-g_bde_work_done(struct g_bde_work *wp, int error)
-{
-
- g_bde_contribute(wp->bp, wp->length, error);
- if (wp->sp != NULL)
- g_bde_delete_sector(wp->softc, wp->sp);
- if (wp->ksp != NULL)
- g_bde_release_keysector(wp);
- g_bde_delete_work(wp);
-}
-
-/*
- * A write operation has finished. When we have all expected cows in the
- * barn close the door and call it a day.
- */
-
-static void
-g_bde_write_done(struct bio *bp)
-{
- struct g_bde_sector *sp;
- struct g_bde_work *wp;
- struct g_bde_softc *sc;
-
- sp = bp->bio_caller1;
- sc = bp->bio_caller2;
- mtx_lock(&sc->worklist_mutex);
- KASSERT(sp != NULL, ("NULL sp"));
- KASSERT(sc != NULL, ("NULL sc"));
- KASSERT(sp->owner != NULL, ("NULL sp->owner"));
- g_trace(G_T_TOPOLOGY, "g_bde_write_done(%p)", sp);
- if (bp->bio_error == 0 && bp->bio_completed != sp->size)
- bp->bio_error = EIO;
- sp->error = bp->bio_error;
- g_destroy_bio(bp);
- wp = sp->owner;
- if (wp->error == 0)
- wp->error = sp->error;
-
- if (wp->bp->bio_cmd == BIO_DELETE) {
- KASSERT(sp == wp->sp, ("trashed delete op"));
- g_bde_work_done(wp, wp->error);
- mtx_unlock(&sc->worklist_mutex);
- return;
- }
-
- KASSERT(wp->bp->bio_cmd == BIO_WRITE, ("Confused in g_bde_write_done()"));
- KASSERT(sp == wp->sp || sp == wp->ksp, ("trashed write op"));
- if (wp->sp == sp) {
- g_bde_delete_sector(sc, wp->sp);
- wp->sp = NULL;
- } else {
- sp->state = VALID;
- }
- if (wp->sp == NULL && wp->ksp != NULL && wp->ksp->state == VALID)
- g_bde_work_done(wp, wp->error);
- mtx_unlock(&sc->worklist_mutex);
- return;
-}
-
-/*
- * Send a write request for the given sector down the pipeline.
- */
-
-static int
-g_bde_start_write(struct g_bde_sector *sp)
-{
- struct bio *bp;
- struct g_bde_softc *sc;
-
- g_trace(G_T_TOPOLOGY, "g_bde_start_write(%p)", sp);
- sc = sp->softc;
- KASSERT(sc != NULL, ("NULL sc in g_bde_start_write"));
- KASSERT(sp->owner != NULL, ("NULL sp->owner in g_bde_start_write"));
- bp = g_new_bio();
- if (bp == NULL)
- return (ENOMEM);
- bp->bio_cmd = BIO_WRITE;
- bp->bio_offset = sp->offset;
- bp->bio_data = sp->data;
- bp->bio_length = sp->size;
- bp->bio_done = g_bde_write_done;
- bp->bio_caller1 = sp;
- bp->bio_caller2 = sc;
- sp->state = IO;
- g_io_request(bp, sc->consumer);
- return(0);
-}
-
-/*
- * A read operation has finished. Mark the sector no longer iobusy and
- * wake up the worker thread and let it do its thing.
- */
-
-static void
-g_bde_read_done(struct bio *bp)
-{
- struct g_bde_sector *sp;
- struct g_bde_softc *sc;
-
- sp = bp->bio_caller1;
- g_trace(G_T_TOPOLOGY, "g_bde_read_done(%p)", sp);
- sc = bp->bio_caller2;
- mtx_lock(&sc->worklist_mutex);
- if (bp->bio_error == 0 && bp->bio_completed != sp->size)
- bp->bio_error = EIO;
- sp->error = bp->bio_error;
- if (sp->error == 0)
- sp->state = VALID;
- else
- sp->state = JUNK;
- wakeup(sc);
- g_destroy_bio(bp);
- mtx_unlock(&sc->worklist_mutex);
-}
-
-/*
- * Send a read request for the given sector down the pipeline.
- */
-
-static int
-g_bde_start_read(struct g_bde_sector *sp)
-{
- struct bio *bp;
- struct g_bde_softc *sc;
-
- g_trace(G_T_TOPOLOGY, "g_bde_start_read(%p)", sp);
- sc = sp->softc;
- KASSERT(sc != NULL, ("Null softc in sp %p", sp));
- bp = g_new_bio();
- if (bp == NULL)
- return (ENOMEM);
- bp->bio_cmd = BIO_READ;
- bp->bio_offset = sp->offset;
- bp->bio_data = sp->data;
- bp->bio_length = sp->size;
- bp->bio_done = g_bde_read_done;
- bp->bio_caller1 = sp;
- bp->bio_caller2 = sc;
- sp->state = IO;
- g_io_request(bp, sc->consumer);
- return(0);
-}
-
-/*
- * The worker thread.
- *
- * The up/down path of GEOM is not allowed to sleep or do any major work
- * so we use this thread to do the actual crypto operations and to push
- * the state engine onwards.
- *
- * XXX: if we switch to the src/sys/opencrypt hardware assisted encryption
- * XXX: using a thread here is probably not needed.
- */
-
-void
-g_bde_worker(void *arg)
-{
- struct g_bde_softc *sc;
- struct g_bde_work *wp, *twp;
- struct g_geom *gp;
- int restart, error;
-
- gp = arg;
- sc = gp->softc;
-
- mtx_lock(&sc->worklist_mutex);
- for (;;) {
- restart = 0;
- g_trace(G_T_TOPOLOGY, "g_bde_worker scan");
- TAILQ_FOREACH_SAFE(wp, &sc->worklist, list, twp) {
- KASSERT(wp != NULL, ("NULL wp"));
- KASSERT(wp->softc != NULL, ("NULL wp->softc"));
- if (wp->state != WAIT)
- continue; /* Not interesting here */
-
- KASSERT(wp->bp != NULL, ("NULL wp->bp"));
- KASSERT(wp->sp != NULL, ("NULL wp->sp"));
-
- if (wp->ksp != NULL) {
- if (wp->ksp->owner != wp)
- continue;
- if (wp->ksp->state == IO)
- continue;
- KASSERT(wp->ksp->state == VALID,
- ("Illegal sector state (%d)",
- wp->ksp->state));
- }
-
- if (wp->bp->bio_cmd == BIO_READ && wp->sp->state == IO)
- continue;
-
- if (wp->ksp != NULL && wp->ksp->error != 0) {
- g_bde_work_done(wp, wp->ksp->error);
- continue;
- }
- switch(wp->bp->bio_cmd) {
- case BIO_READ:
- if (wp->ksp == NULL) {
- KASSERT(wp->error != 0,
- ("BIO_READ, no ksp and no error"));
- g_bde_work_done(wp, wp->error);
- break;
- }
- if (wp->sp->error != 0) {
- g_bde_work_done(wp, wp->sp->error);
- break;
- }
- mtx_unlock(&sc->worklist_mutex);
- g_bde_crypt_read(wp);
- mtx_lock(&sc->worklist_mutex);
- restart++;
- g_bde_work_done(wp, wp->sp->error);
- break;
- case BIO_WRITE:
- wp->state = FINISH;
- KASSERT(wp->sp->owner == wp,
- ("Write not owner sp"));
- KASSERT(wp->ksp->owner == wp,
- ("Write not owner ksp"));
- mtx_unlock(&sc->worklist_mutex);
- g_bde_crypt_write(wp);
- mtx_lock(&sc->worklist_mutex);
- restart++;
- error = g_bde_start_write(wp->sp);
- if (error) {
- g_bde_work_done(wp, error);
- break;
- }
- error = g_bde_start_write(wp->ksp);
- if (wp->error != 0)
- wp->error = error;
- break;
- case BIO_DELETE:
- wp->state = FINISH;
- mtx_unlock(&sc->worklist_mutex);
- g_bde_crypt_delete(wp);
- mtx_lock(&sc->worklist_mutex);
- restart++;
- g_bde_start_write(wp->sp);
- break;
- }
- if (restart)
- break;
- }
- if (!restart) {
- /*
- * We don't look for our death-warrant until we are
- * idle. Shouldn't make a difference in practice.
- */
- if (sc->dead)
- break;
- g_trace(G_T_TOPOLOGY, "g_bde_worker sleep");
- error = msleep(sc, &sc->worklist_mutex,
- PRIBIO, "-", hz);
- if (error == EWOULDBLOCK) {
- /*
- * Lose our skey cache in an orderly fashion.
- * The exact rate can be tuned to be less
- * aggressive if this is desirable. 10% per
- * second means that the cache is gone in a
- * few minutes.
- */
- g_bde_purge_sector(sc, 10);
- }
- }
- }
- g_trace(G_T_TOPOLOGY, "g_bde_worker die");
- g_bde_purge_sector(sc, 1);
- KASSERT(sc->nwork == 0, ("Dead but %d work remaining", sc->nwork));
- KASSERT(sc->ncache == 0, ("Dead but %d cache remaining", sc->ncache));
- KASSERT(sc->nsect == 0, ("Dead but %d sect remaining", sc->nsect));
- mtx_unlock(&sc->worklist_mutex);
- sc->dead = 2;
- wakeup(sc);
- kproc_exit(0);
-}
-
-/*
- * g_bde_start1 has chopped the incoming request up so all the requests
- * we see here are inside a single zone. Map the data and key locations
- * grab the buffers we need and fire off the first volley of read requests.
- */
-
-static void
-g_bde_start2(struct g_bde_work *wp)
-{
- struct g_bde_softc *sc;
-
- KASSERT(wp != NULL, ("NULL wp in g_bde_start2"));
- KASSERT(wp->softc != NULL, ("NULL wp->softc"));
- g_trace(G_T_TOPOLOGY, "g_bde_start2(%p)", wp);
- sc = wp->softc;
- switch (wp->bp->bio_cmd) {
- case BIO_READ:
- wp->sp = g_bde_new_sector(wp, 0);
- if (wp->sp == NULL) {
- g_bde_work_done(wp, ENOMEM);
- return;
- }
- wp->sp->size = wp->length;
- wp->sp->data = wp->data;
- if (g_bde_start_read(wp->sp) != 0) {
- g_bde_work_done(wp, ENOMEM);
- return;
- }
- g_bde_read_keysector(sc, wp);
- if (wp->ksp == NULL)
- wp->error = ENOMEM;
- break;
- case BIO_DELETE:
- wp->sp = g_bde_new_sector(wp, wp->length);
- if (wp->sp == NULL) {
- g_bde_work_done(wp, ENOMEM);
- return;
- }
- break;
- case BIO_WRITE:
- wp->sp = g_bde_new_sector(wp, wp->length);
- if (wp->sp == NULL) {
- g_bde_work_done(wp, ENOMEM);
- return;
- }
- g_bde_read_keysector(sc, wp);
- if (wp->ksp == NULL) {
- g_bde_work_done(wp, ENOMEM);
- return;
- }
- break;
- default:
- KASSERT(0 == 1,
- ("Wrong bio_cmd %d in g_bde_start2", wp->bp->bio_cmd));
- }
-
- wp->state = WAIT;
- wakeup(sc);
-}
-
-/*
- * Create a sequence of work structures, and have g_bde_map_sector() determine
- * how long they each can be. Feed them to g_bde_start2().
- */
-
-void
-g_bde_start1(struct bio *bp)
-{
- struct g_bde_softc *sc;
- struct g_bde_work *wp;
- off_t done;
-
- sc = bp->bio_to->geom->softc;
- bp->bio_driver1 = sc;
-
- mtx_lock(&sc->worklist_mutex);
- for(done = 0; done < bp->bio_length; ) {
- wp = g_bde_new_work(sc);
- if (wp != NULL) {
- wp->bp = bp;
- wp->offset = bp->bio_offset + done;
- wp->data = bp->bio_data + done;
- wp->length = bp->bio_length - done;
- g_bde_map_sector(wp);
- done += wp->length;
- g_bde_start2(wp);
- }
- if (wp == NULL || bp->bio_error != 0) {
- g_bde_contribute(bp, bp->bio_length - done, ENOMEM);
- break;
- }
- }
- mtx_unlock(&sc->worklist_mutex);
- return;
-}
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index 5d769d606d20..a9f356299a8d 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -172,32 +172,32 @@ static void
zero_boot_passcache(void)
{
- explicit_bzero(cached_passphrase, sizeof(cached_passphrase));
+ explicit_bzero(cached_passphrase, sizeof(cached_passphrase));
}
static void
zero_geli_intake_keys(void)
{
- struct keybuf *keybuf;
- int i;
-
- if ((keybuf = get_keybuf()) != NULL) {
- /* Scan the key buffer, clear all GELI keys. */
- for (i = 0; i < keybuf->kb_nents; i++) {
- if (keybuf->kb_ents[i].ke_type == KEYBUF_TYPE_GELI) {
- explicit_bzero(keybuf->kb_ents[i].ke_data,
- sizeof(keybuf->kb_ents[i].ke_data));
- keybuf->kb_ents[i].ke_type = KEYBUF_TYPE_NONE;
- }
- }
- }
+ struct keybuf *keybuf;
+ int i;
+
+ if ((keybuf = get_keybuf()) != NULL) {
+ /* Scan the key buffer, clear all GELI keys. */
+ for (i = 0; i < keybuf->kb_nents; i++) {
+ if (keybuf->kb_ents[i].ke_type == KEYBUF_TYPE_GELI) {
+ explicit_bzero(keybuf->kb_ents[i].ke_data,
+ sizeof(keybuf->kb_ents[i].ke_data));
+ keybuf->kb_ents[i].ke_type = KEYBUF_TYPE_NONE;
+ }
+ }
+ }
}
static void
zero_intake_passcache(void *dummy)
{
- zero_boot_passcache();
- zero_geli_intake_keys();
+ zero_boot_passcache();
+ zero_geli_intake_keys();
}
EVENTHANDLER_DEFINE(mountroot, zero_intake_passcache, NULL, 0);
@@ -269,7 +269,7 @@ g_eli_crypto_rerun(struct cryptop *crp)
static void
g_eli_getattr_done(struct bio *bp)
{
- if (bp->bio_error == 0 &&
+ if (bp->bio_error == 0 &&
!strcmp(bp->bio_attribute, "GEOM::physpath")) {
strlcat(bp->bio_data, "/eli", bp->bio_length);
}
@@ -891,8 +891,8 @@ g_eli_init_uma(void)
* likely to see.
*/
g_eli_alloc_sz = roundup2((PAGE_SIZE + sizeof(int) +
- G_ELI_AUTH_SECKEYLEN) * nsw_cluster_max +
- sizeof(uintptr_t), PAGE_SIZE);
+ G_ELI_AUTH_SECKEYLEN) * nsw_cluster_max +
+ sizeof(uintptr_t), PAGE_SIZE);
g_eli_uma = uma_zcreate("GELI buffers", g_eli_alloc_sz,
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
@@ -1046,10 +1046,12 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp,
bioq_init(&sc->sc_queue);
mtx_init(&sc->sc_queue_mtx, "geli:queue", NULL, MTX_DEF);
mtx_init(&sc->sc_ekeys_lock, "geli:ekeys", NULL, MTX_DEF);
+ g_eli_init_uma();
pp = NULL;
cp = g_new_consumer(gp);
cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
+
error = g_attach(cp, bpp);
if (error != 0) {
if (req != NULL) {
@@ -1092,7 +1094,6 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp,
if (threads == 0)
threads = mp_ncpus;
sc->sc_cpubind = (mp_ncpus > 1 && threads == mp_ncpus);
- g_eli_init_uma();
for (i = 0; i < threads; i++) {
if (g_eli_cpu_is_disabled(i)) {
G_ELI_DEBUG(1, "%s: CPU %u disabled, skipping.",
@@ -1164,6 +1165,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp,
sc->sc_crypto == G_ELI_CRYPTO_SW_ACCEL ? "accelerated software" :
sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware");
return (gp);
+
failed:
mtx_lock(&sc->sc_queue_mtx);
sc->sc_flags |= G_ELI_FLAG_DESTROY;
@@ -1325,7 +1327,7 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
u_char key[G_ELI_USERKEYLEN], mkey[G_ELI_DATAIVKEYLEN];
u_int i, nkey, nkeyfiles, tries, showpass;
int error;
- struct keybuf *keybuf;
+ struct keybuf *keybuf;
g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name);
g_topology_assert();
@@ -1370,116 +1372,116 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
tries = g_eli_tries;
}
- if ((keybuf = get_keybuf()) != NULL) {
- /* Scan the key buffer, try all GELI keys. */
- for (i = 0; i < keybuf->kb_nents; i++) {
- if (keybuf->kb_ents[i].ke_type == KEYBUF_TYPE_GELI) {
- memcpy(key, keybuf->kb_ents[i].ke_data,
- sizeof(key));
-
- if (g_eli_mkey_decrypt_any(&md, key,
- mkey, &nkey) == 0 ) {
- explicit_bzero(key, sizeof(key));
- goto have_key;
- }
- }
- }
- }
-
- for (i = 0; i <= tries; i++) {
- g_eli_crypto_hmac_init(&ctx, NULL, 0);
-
- /*
- * Load all key files.
- */
- nkeyfiles = g_eli_keyfiles_load(&ctx, pp->name);
-
- if (nkeyfiles == 0 && md.md_iterations == -1) {
- /*
- * No key files and no passphrase, something is
- * definitely wrong here.
- * geli(8) doesn't allow for such situation, so assume
- * that there was really no passphrase and in that case
- * key files are no properly defined in loader.conf.
- */
- G_ELI_DEBUG(0,
- "Found no key files in loader.conf for %s.",
- pp->name);
- return (NULL);
- }
-
- /* Ask for the passphrase if defined. */
- if (md.md_iterations >= 0) {
- /* Try first with cached passphrase. */
- if (i == 0) {
- if (!g_eli_boot_passcache)
- continue;
- memcpy(passphrase, cached_passphrase,
- sizeof(passphrase));
- } else {
- printf("Enter passphrase for %s: ", pp->name);
+ if ((keybuf = get_keybuf()) != NULL) {
+ /* Scan the key buffer, try all GELI keys. */
+ for (i = 0; i < keybuf->kb_nents; i++) {
+ if (keybuf->kb_ents[i].ke_type == KEYBUF_TYPE_GELI) {
+ memcpy(key, keybuf->kb_ents[i].ke_data,
+ sizeof(key));
+
+ if (g_eli_mkey_decrypt_any(&md, key,
+ mkey, &nkey) == 0 ) {
+ explicit_bzero(key, sizeof(key));
+ goto have_key;
+ }
+ }
+ }
+ }
+
+ for (i = 0; i <= tries; i++) {
+ g_eli_crypto_hmac_init(&ctx, NULL, 0);
+
+ /*
+ * Load all key files.
+ */
+ nkeyfiles = g_eli_keyfiles_load(&ctx, pp->name);
+
+ if (nkeyfiles == 0 && md.md_iterations == -1) {
+ /*
+ * No key files and no passphrase, something is
+ * definitely wrong here.
+ * geli(8) doesn't allow for such situation, so assume
+ * that there was really no passphrase and in that case
+ * key files are no properly defined in loader.conf.
+ */
+ G_ELI_DEBUG(0,
+ "Found no key files in loader.conf for %s.",
+ pp->name);
+ return (NULL);
+ }
+
+ /* Ask for the passphrase if defined. */
+ if (md.md_iterations >= 0) {
+ /* Try first with cached passphrase. */
+ if (i == 0) {
+ if (!g_eli_boot_passcache)
+ continue;
+ memcpy(passphrase, cached_passphrase,
+ sizeof(passphrase));
+ } else {
+ printf("Enter passphrase for %s: ", pp->name);
showpass = g_eli_visible_passphrase;
if ((md.md_flags & G_ELI_FLAG_GELIDISPLAYPASS) != 0)
showpass = GETS_ECHOPASS;
- cngets(passphrase, sizeof(passphrase),
+ cngets(passphrase, sizeof(passphrase),
showpass);
- memcpy(cached_passphrase, passphrase,
- sizeof(passphrase));
- }
- }
-
- /*
- * Prepare Derived-Key from the user passphrase.
- */
- if (md.md_iterations == 0) {
- g_eli_crypto_hmac_update(&ctx, md.md_salt,
- sizeof(md.md_salt));
- g_eli_crypto_hmac_update(&ctx, passphrase,
- strlen(passphrase));
- explicit_bzero(passphrase, sizeof(passphrase));
- } else if (md.md_iterations > 0) {
- u_char dkey[G_ELI_USERKEYLEN];
-
- pkcs5v2_genkey(dkey, sizeof(dkey), md.md_salt,
- sizeof(md.md_salt), passphrase, md.md_iterations);
- explicit_bzero(passphrase, sizeof(passphrase));
- g_eli_crypto_hmac_update(&ctx, dkey, sizeof(dkey));
- explicit_bzero(dkey, sizeof(dkey));
- }
-
- g_eli_crypto_hmac_final(&ctx, key, 0);
-
- /*
- * Decrypt Master-Key.
- */
- error = g_eli_mkey_decrypt_any(&md, key, mkey, &nkey);
- explicit_bzero(key, sizeof(key));
- if (error == -1) {
- if (i == tries) {
- G_ELI_DEBUG(0,
- "Wrong key for %s. No tries left.",
- pp->name);
- g_eli_keyfiles_clear(pp->name);
- return (NULL);
- }
- if (i > 0) {
- G_ELI_DEBUG(0,
- "Wrong key for %s. Tries left: %u.",
- pp->name, tries - i);
- }
- /* Try again. */
- continue;
- } else if (error > 0) {
- G_ELI_DEBUG(0,
- "Cannot decrypt Master Key for %s (error=%d).",
- pp->name, error);
- g_eli_keyfiles_clear(pp->name);
- return (NULL);
- }
- g_eli_keyfiles_clear(pp->name);
- G_ELI_DEBUG(1, "Using Master Key %u for %s.", nkey, pp->name);
- break;
- }
+ memcpy(cached_passphrase, passphrase,
+ sizeof(passphrase));
+ }
+ }
+
+ /*
+ * Prepare Derived-Key from the user passphrase.
+ */
+ if (md.md_iterations == 0) {
+ g_eli_crypto_hmac_update(&ctx, md.md_salt,
+ sizeof(md.md_salt));
+ g_eli_crypto_hmac_update(&ctx, passphrase,
+ strlen(passphrase));
+ explicit_bzero(passphrase, sizeof(passphrase));
+ } else if (md.md_iterations > 0) {
+ u_char dkey[G_ELI_USERKEYLEN];
+
+ pkcs5v2_genkey(dkey, sizeof(dkey), md.md_salt,
+ sizeof(md.md_salt), passphrase, md.md_iterations);
+ explicit_bzero(passphrase, sizeof(passphrase));
+ g_eli_crypto_hmac_update(&ctx, dkey, sizeof(dkey));
+ explicit_bzero(dkey, sizeof(dkey));
+ }
+
+ g_eli_crypto_hmac_final(&ctx, key, 0);
+
+ /*
+ * Decrypt Master-Key.
+ */
+ error = g_eli_mkey_decrypt_any(&md, key, mkey, &nkey);
+ explicit_bzero(key, sizeof(key));
+ if (error == -1) {
+ if (i == tries) {
+ G_ELI_DEBUG(0,
+ "Wrong key for %s. No tries left.",
+ pp->name);
+ g_eli_keyfiles_clear(pp->name);
+ return (NULL);
+ }
+ if (i > 0) {
+ G_ELI_DEBUG(0,
+ "Wrong key for %s. Tries left: %u.",
+ pp->name, tries - i);
+ }
+ /* Try again. */
+ continue;
+ } else if (error > 0) {
+ G_ELI_DEBUG(0,
+ "Cannot decrypt Master Key for %s (error=%d).",
+ pp->name, error);
+ g_eli_keyfiles_clear(pp->name);
+ return (NULL);
+ }
+ g_eli_keyfiles_clear(pp->name);
+ G_ELI_DEBUG(1, "Using Master Key %u for %s.", nkey, pp->name);
+ break;
+ }
have_key:
/*
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index ddd469d909a0..02c8ed9f2bae 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -75,6 +75,9 @@ static int g_io_transient_map_bio(struct bio *bp);
static struct g_bioq g_bio_run_down;
static struct g_bioq g_bio_run_up;
+static u_long nomem_count;
+static u_long pause_count;
+
/*
* Pace is a hint that we've had some trouble recently allocating
* bios, so we should back off trying to send I/O down the stack
@@ -701,6 +704,7 @@ g_io_deliver(struct bio *bp, int error)
if (bootverbose)
printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name);
+ atomic_add_long(&nomem_count, 1); /* Rare event, but no locks held */
bp->bio_children = 0;
bp->bio_inbed = 0;
bp->bio_driver1 = NULL;
@@ -734,6 +738,12 @@ int inflight_transient_maps;
SYSCTL_INT(_kern_geom, OID_AUTO, inflight_transient_maps, CTLFLAG_RD,
&inflight_transient_maps, 0,
"Current count of the active transient maps");
+SYSCTL_ULONG(_kern_geom, OID_AUTO, nomem_count, CTLFLAG_RD,
+ &nomem_count, 0,
+ "Total count of requests completed with status of ENOMEM");
+SYSCTL_ULONG(_kern_geom, OID_AUTO, pause_count, CTLFLAG_RD,
+ &pause_count, 0,
+ "Total count of requests stalled due to low memory in g_down");
static int
g_io_transient_map_bio(struct bio *bp)
@@ -799,20 +809,17 @@ g_io_schedule_down(struct thread *tp __unused)
biotrack(bp, __func__);
if (pace != 0) {
/*
- * There has been at least one memory allocation
- * failure since the last I/O completed. Pause 1ms to
- * give the system a chance to free up memory. We only
- * do this once because a large number of allocations
- * can fail in the direct dispatch case and there's no
- * relationship between the number of these failures and
- * the length of the outage. If there's still an outage,
- * we'll pause again and again until it's
- * resolved. Older versions paused longer and once per
- * allocation failure. This was OK for a single threaded
- * g_down, but with direct dispatch would lead to max of
- * 10 IOPs for minutes at a time when transient memory
- * issues prevented allocation for a batch of requests
- * from the upper layers.
+ * There has been at least one memory allocation failure
+ * since the last I/O completed. Pause 1ms to give the
+ * system a chance to free up memory. Pause time is not
+ * scaled to the number of I/O failures since they tend
+ * to cluster and the number is not predictive of how
+ * long a pause is needed.
+ *
+ * Older versions had a longer pause, which limited the
+ * IOPS to 10, which prolonged memory shortages that could
+ * be alleviated by I/O completing since it eliminated
+ * direct dispatch as well.
*
* XXX This pacing is really lame. It needs to be solved
* by other methods. This is OK only because the worst
@@ -822,7 +829,8 @@ g_io_schedule_down(struct thread *tp __unused)
* for that I/O.
*/
CTR0(KTR_GEOM, "g_down pacing self");
- pause("g_down", min(hz/1000, 1));
+ pause_count++; /* g_down has only one thread */
+ pause_sbt("g_down", SBT_1MS, 0, 0);
pace = 0;
}
CTR2(KTR_GEOM, "g_down processing bp %p provider %s", bp,
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index 3803697e8481..0839bc213817 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -40,7 +40,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
-#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 3fef8a918530..4e2c122ef6dd 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -44,7 +44,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
-#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/kthread.h>
#include <sys/lock.h>
diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c
index 893c8dfffa6f..d9e9a6c82da1 100644
--- a/sys/geom/geom_vfs.c
+++ b/sys/geom/geom_vfs.c
@@ -124,12 +124,12 @@ g_vfs_done(struct bio *bip)
mp = cdevp->si_mountpt;
if (mp != NULL) {
if (bp->b_iocmd == BIO_READ) {
- if (LK_HOLDER(bp->b_lock.lk_lock) == LK_KERNPROC)
+ if (BUF_DISOWNED(bp))
mp->mnt_stat.f_asyncreads++;
else
mp->mnt_stat.f_syncreads++;
} else if (bp->b_iocmd == BIO_WRITE) {
- if (LK_HOLDER(bp->b_lock.lk_lock) == LK_KERNPROC)
+ if (BUF_DISOWNED(bp))
mp->mnt_stat.f_asyncwrites++;
else
mp->mnt_stat.f_syncwrites++;
@@ -292,7 +292,16 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr
g_wither_geom(gp, ENXIO);
return (error);
}
- vnode_create_vobject(vp, pp->mediasize, curthread);
+ /*
+ * Mediasize might not be set until first access (see g_disk_access()),
+ * That's why we check it here and not earlier.
+ */
+ if (pp->mediasize == 0) {
+ (void)g_access(cp, -1, -wr, -wr);
+ g_wither_geom(gp, ENXIO);
+ return (ENXIO);
+ }
+ vnode_create_disk_vobject(vp, pp->mediasize, curthread);
*cpp = cp;
cp->private = vp;
cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
diff --git a/sys/geom/label/g_label.c b/sys/geom/label/g_label.c
index e20e5b50e80b..acb17d40914e 100644
--- a/sys/geom/label/g_label.c
+++ b/sys/geom/label/g_label.c
@@ -104,6 +104,7 @@ const struct g_label_desc *g_labels[] = {
&g_label_ntfs,
&g_label_disk_ident,
&g_label_flashmap,
+ &g_label_swaplinux,
#endif
&g_label_generic,
NULL
diff --git a/sys/geom/label/g_label.h b/sys/geom/label/g_label.h
index 69bfbf3910a1..0d8951f7c99d 100644
--- a/sys/geom/label/g_label.h
+++ b/sys/geom/label/g_label.h
@@ -78,6 +78,7 @@ extern struct g_label_desc g_label_gpt;
extern struct g_label_desc g_label_gpt_uuid;
extern struct g_label_desc g_label_disk_ident;
extern struct g_label_desc g_label_flashmap;
+extern struct g_label_desc g_label_swaplinux;
extern void g_label_rtrim(char *label, size_t size);
#endif /* _KERNEL */
diff --git a/sys/geom/label/g_label_swaplinux.c b/sys/geom/label/g_label_swaplinux.c
new file mode 100644
index 000000000000..5994ad93fd6f
--- /dev/null
+++ b/sys/geom/label/g_label_swaplinux.c
@@ -0,0 +1,91 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+
+#include <geom/geom.h>
+#include <geom/geom_dbg.h>
+#include <geom/label/g_label.h>
+
+/*
+ * Taken from
+ * https://github.com/util-linux/util-linux/blob/master/include/swapheader.h
+ */
+
+#define SWAP_VERSION 1
+#define SWAP_UUID_LENGTH 16
+#define SWAP_LABEL_LENGTH 16
+#define SWAP_SIGNATURE "SWAPSPACE2"
+#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
+
+struct swap_header_v1_2 {
+ char bootbits[1024]; /* Space for disklabel etc. */
+ uint32_t version;
+ uint32_t last_page;
+ uint32_t nr_badpages;
+ unsigned char uuid[SWAP_UUID_LENGTH];
+ char volume_name[SWAP_LABEL_LENGTH];
+ uint32_t padding[117];
+ uint32_t badpages[1];
+};
+
+typedef union {
+ struct swap_header_v1_2 header;
+ struct {
+ uint8_t reserved[PAGE_SIZE - SWAP_SIGNATURE_SZ];
+ char signature[SWAP_SIGNATURE_SZ];
+ } tail;
+} swhdr_t;
+
+#define sw_version header.version
+#define sw_volume_name header.volume_name
+#define sw_signature tail.signature
+
+static void
+g_label_swaplinux_taste(struct g_consumer *cp, char *label, size_t size)
+{
+ struct g_provider *pp;
+ swhdr_t *hdr;
+
+ g_topology_assert_not();
+ pp = cp->provider;
+ label[0] = '\0';
+
+ KASSERT(pp->sectorsize != 0, ("Tasting a disk with 0 sectorsize"));
+ if ((PAGE_SIZE % pp->sectorsize) != 0)
+ return;
+
+ hdr = (swhdr_t *)g_read_data(cp, 0, PAGE_SIZE, NULL);
+ if (hdr == NULL)
+ return;
+
+ /* Check version and magic string */
+ if (hdr->sw_version == SWAP_VERSION &&
+ !memcmp(hdr->sw_signature, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ))
+ G_LABEL_DEBUG(1, "linux swap detected on %s.", pp->name);
+ else
+ goto exit_free;
+
+ /* Check for volume label */
+ if (hdr->sw_volume_name[0] == '\0')
+ goto exit_free;
+
+ /* Terminate label */
+ hdr->sw_volume_name[sizeof(hdr->sw_volume_name) - 1] = '\0';
+ strlcpy(label, hdr->sw_volume_name, size);
+
+exit_free:
+ g_free(hdr);
+}
+
+struct g_label_desc g_label_swaplinux = {
+ .ld_taste = g_label_swaplinux_taste,
+ .ld_dirprefix = "swaplinux/",
+ .ld_enabled = 1
+};
+
+G_LABEL_INIT(swaplinux, g_label_swaplinux, "Create device nodes for Linux swap");
diff --git a/sys/geom/notes b/sys/geom/notes
index 016614f7dce6..d3924768359d 100644
--- a/sys/geom/notes
+++ b/sys/geom/notes
@@ -95,9 +95,9 @@ set an upper bound in this field. Geom_disk will inherit the upper
bound set by the device driver.
stripesize is the width of any natural request boundaries for the
-device. This would be the width of a stripe on a raid-5 unit or
-one zone in GBDE. The idea with this field is to hint to clustering
-type code to not trivially overrun these boundaries.
+device. This would be the optimal width of a stripe on a raid unit.
+The idea with this field is to hint to clustering type code to not
+trivially overrun these boundaries.
stripeoffset is the amount of the first stripe which lies before the
devices beginning.
diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c
index 2acffcff1449..6f336c18c8e6 100644
--- a/sys/geom/stripe/g_stripe.c
+++ b/sys/geom/stripe/g_stripe.c
@@ -591,7 +591,12 @@ g_stripe_start(struct bio *bp)
g_stripe_pushdown(sc, bp);
return;
case BIO_GETATTR:
- /* To which provider it should be delivered? */
+ if (!strcmp(bp->bio_attribute, "GEOM::candelete")) {
+ int val = (sc->sc_flags & G_STRIPE_FLAG_CANDELETE) != 0;
+ g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
+ return;
+ }
+ /* otherwise: To which provider it should be delivered? */
default:
g_io_deliver(bp, EOPNOTSUPP);
return;
@@ -794,6 +799,20 @@ g_stripe_add_disk(struct g_stripe_softc *sc, struct g_provider *pp, u_int no)
}
sc->sc_disks[no] = cp;
+
+ /* cascade candelete */
+ error = g_access(cp, 1, 0, 0);
+ if (error == 0) {
+ int can_delete;
+
+ error = g_getattr("GEOM::candelete", cp, &can_delete);
+ if (error == 0 && can_delete != 0)
+ sc->sc_flags |= G_STRIPE_FLAG_CANDELETE;
+ G_STRIPE_DEBUG(1, "Provider %s candelete %i.", pp->name,
+ can_delete);
+ g_access(cp, -1, 0, 0);
+ }
+
G_STRIPE_DEBUG(0, "Disk %s attached to %s.", pp->name, sc->sc_name);
g_stripe_check_and_run(sc);
diff --git a/sys/geom/stripe/g_stripe.h b/sys/geom/stripe/g_stripe.h
index 4c5430275350..1075a176b9b3 100644
--- a/sys/geom/stripe/g_stripe.h
+++ b/sys/geom/stripe/g_stripe.h
@@ -47,6 +47,8 @@
#define G_STRIPE_TYPE_MANUAL 0
#define G_STRIPE_TYPE_AUTOMATIC 1
+#define G_STRIPE_FLAG_CANDELETE 0x00000001UL
+
#define G_STRIPE_DEBUG(lvl, ...) \
_GEOM_DEBUG("GEOM_STRIPE", g_stripe_debug, (lvl), NULL, __VA_ARGS__)
#define G_STRIPE_LOGREQ(bp, ...) \
@@ -62,6 +64,7 @@ struct g_stripe_softc {
off_t sc_stripesize;
uint32_t sc_stripebits;
struct mtx sc_lock;
+ int sc_flags;
};
#define sc_name sc_geom->name
#endif /* _KERNEL */
diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL
index c70fd27a5c69..2a06eb84bff8 100644
--- a/sys/i386/conf/MINIMAL
+++ b/sys/i386/conf/MINIMAL
@@ -54,11 +54,6 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options QUOTA # Enable disk quotas for UFS
options MD_ROOT # MD is a potential root device
options GEOM_LABEL # Provides labelization
-options COMPAT_FREEBSD4 # Compatible with FreeBSD4
-options COMPAT_FREEBSD5 # Compatible with FreeBSD5
-options COMPAT_FREEBSD6 # Compatible with FreeBSD6
-options COMPAT_FREEBSD7 # Compatible with FreeBSD7
-options COMPAT_FREEBSD9 # Compatible with FreeBSD9
options COMPAT_FREEBSD10 # Compatible with FreeBSD10
options COMPAT_FREEBSD11 # Compatible with FreeBSD11
options COMPAT_FREEBSD12 # Compatible with FreeBSD12
@@ -157,3 +152,15 @@ device xentimer # Xen x86 PV timer device
options EVDEV_SUPPORT # evdev support in legacy drivers
device evdev # input event device support
device uinput # install /dev/uinput cdev
+
+# NVM Express (NVMe) support
+device nvme # base NVMe driver
+
+# ATA controllers
+device ahci # AHCI-compatible SATA controllers
+
+# CAM
+device scbus # SCSI bus (required for ATA/SCSI)
+device da # Direct Access (disks)
+device cd # CD
+device pass # Passthrough device (direct ATA/SCSI access)
diff --git a/sys/i386/i386/uio_machdep.c b/sys/i386/i386/uio_machdep.c
index fd0a27eb269c..b41460aef5b4 100644
--- a/sys/i386/i386/uio_machdep.c
+++ b/sys/i386/i386/uio_machdep.c
@@ -94,10 +94,14 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error) {
sf_buf_free(sf);
sched_unpin();
@@ -105,10 +109,14 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
}
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h
index 0d9734ae3830..6f8885a539c3 100644
--- a/sys/i386/include/vmparam.h
+++ b/sys/i386/include/vmparam.h
@@ -246,5 +246,6 @@
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 0
#endif /* _MACHINE_VMPARAM_H_ */
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index b5d42dc22162..0e056aadb4b5 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -592,67 +592,6 @@ linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args
return (0);
}
-/* XXX: this wont work with module - convert it */
-int
-linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return (sys_kmq_open(td, (struct kmq_open_args *)args));
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return (sys_kmq_unlink(td, (struct kmq_unlink_args *)args));
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return (sys_kmq_timedsend(td, (struct kmq_timedsend_args *)args));
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return (sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *)args));
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return (sys_kmq_notify(td, (struct kmq_notify_args *)args));
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return (sys_kmq_setattr(td, (struct kmq_setattr_args *)args));
-#else
- return (ENOSYS);
-#endif
-}
-
void
bsd_to_linux_regset(const struct reg *b_reg,
struct linux_pt_regset *l_regset)
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index f894310b01c5..aa2dfbb68745 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -846,7 +846,7 @@ struct linux_set_tid_address_args {
};
struct linux_timer_create_args {
char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)];
- char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)];
+ char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)];
char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)];
};
struct linux_timer_settime_args {
@@ -942,7 +942,7 @@ struct linux_mq_timedreceive_args {
};
struct linux_mq_notify_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
- char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)];
+ char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)];
};
struct linux_mq_getsetattr_args {
char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)];
diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c
index 70036d227707..4ec9ca460802 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -1828,7 +1828,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 259: {
struct linux_timer_create_args *p = params;
iarg[a++] = p->clock_id; /* clockid_t */
- uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */
+ uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */
uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */
*n_args = 3;
break;
@@ -2002,7 +2002,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 281: {
struct linux_mq_notify_args *p = params;
iarg[a++] = p->mqd; /* l_mqd_t */
- uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */
+ uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */
*n_args = 2;
break;
}
@@ -6225,7 +6225,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "clockid_t";
break;
case 1:
- p = "userland struct sigevent *";
+ p = "userland struct l_sigevent *";
break;
case 2:
p = "userland l_timer_t *";
@@ -6513,7 +6513,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_mqd_t";
break;
case 1:
- p = "userland const struct l_timespec *";
+ p = "userland const struct l_sigevent *";
break;
default:
break;
diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master
index d0ba99861153..958336be0f08 100644
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -1420,7 +1420,7 @@
259 AUE_NULL STD {
int linux_timer_create(
clockid_t clock_id,
- struct sigevent *evp,
+ struct l_sigevent *evp,
l_timer_t *timerid
);
}
@@ -1554,7 +1554,7 @@
281 AUE_NULL STD {
int linux_mq_notify(
l_mqd_t mqd,
- const struct l_timespec *abs_timeout
+ const struct l_sigevent *sevp
);
}
282 AUE_NULL STD {
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index 467ea391ef23..291d38865bd3 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -126,7 +126,7 @@ struct sysent sysent[] = {
{ compat(AS(ogetkerninfo_args),getkerninfo), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 63 = old getkerninfo */
{ compat(0,getpagesize), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 64 = old getpagesize */
{ .sy_narg = AS(msync_args), .sy_call = (sy_call_t *)sys_msync, .sy_auevent = AUE_MSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 65 = msync */
- { .sy_narg = 0, .sy_call = (sy_call_t *)sys_vfork, .sy_auevent = AUE_VFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = vfork */
+ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_vfork, .sy_auevent = AUE_VFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 66 = vfork */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 67 = obsolete vread */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 68 = obsolete vwrite */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 69 = obsolete sbrk */
@@ -311,7 +311,7 @@ struct sysent sysent[] = {
{ .sy_narg = AS(ntp_gettime_args), .sy_call = (sy_call_t *)sys_ntp_gettime, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 248 = ntp_gettime */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */
{ .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */
- { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */
+ { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */
{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_issetugid, .sy_auevent = AUE_ISSETUGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 253 = issetugid */
{ .sy_narg = AS(lchown_args), .sy_call = (sy_call_t *)sys_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = lchown */
diff --git a/sys/kern/kern_boottrace.c b/sys/kern/kern_boottrace.c
index 86fee4f47fbe..1b097e7378ad 100644
--- a/sys/kern/kern_boottrace.c
+++ b/sys/kern/kern_boottrace.c
@@ -613,4 +613,4 @@ boottrace_init(void)
st.table = malloc(st.size * sizeof(struct bt_event), M_BOOTTRACE,
M_WAITOK | M_ZERO);
}
-SYSINIT(boottrace, SI_SUB_CPU, SI_ORDER_ANY, boottrace_init, 0);
+SYSINIT(boottrace, SI_SUB_CPU, SI_ORDER_ANY, boottrace_init, NULL);
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index a99699ed5bce..2ab86d5905a9 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -103,7 +103,7 @@ int cons_avail_mask = 0; /* Bit mask. Each registered low level console
* this bit cleared.
*/
-static int cn_mute;
+int cn_mute;
SYSCTL_INT(_kern, OID_AUTO, consmute, CTLFLAG_RW, &cn_mute, 0,
"State of the console muting");
@@ -138,6 +138,18 @@ kbdinit(void)
}
+static void
+mute_console(void *data __unused)
+{
+
+ if ((boothowto & (RB_MUTEMSGS | RB_VERBOSE)) == RB_MUTEMSGS) {
+ printf("-- Muting boot messages --\n");
+ cn_mute = 1;
+ }
+}
+
+SYSINIT(mute_console, SI_SUB_COPYRIGHT, SI_ORDER_ANY, mute_console, NULL);
+
void
cninit(void)
{
@@ -725,7 +737,6 @@ sysbeep(int pitch __unused, sbintime_t duration __unused)
/*
* Temporary support for sc(4) to vt(4) transition.
*/
-static unsigned vty_prefer;
static char vty_name[16];
SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, vty_name,
0, "Console vty driver");
@@ -750,10 +761,6 @@ vty_enabled(unsigned vty)
break;
}
#endif
- if (vty_prefer != 0) {
- vty_selected = vty_prefer;
- break;
- }
#if defined(DEV_VT)
vty_selected = VTY_VT;
#elif defined(DEV_SC)
@@ -768,16 +775,3 @@ vty_enabled(unsigned vty)
}
return ((vty_selected & vty) != 0);
}
-
-void
-vty_set_preferred(unsigned vty)
-{
-
- vty_prefer = vty;
-#if !defined(DEV_SC)
- vty_prefer &= ~VTY_SC;
-#endif
-#if !defined(DEV_VT)
- vty_prefer &= ~VTY_VT;
-#endif
-}
diff --git a/sys/kern/kern_devctl.c b/sys/kern/kern_devctl.c
index 12d4f9ebfc4d..602b82105525 100644
--- a/sys/kern/kern_devctl.c
+++ b/sys/kern/kern_devctl.c
@@ -89,6 +89,9 @@ static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS);
static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN;
SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RWTUN |
CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_queue, "I", "devctl queue length");
+static bool nomatch_enabled = true;
+SYSCTL_BOOL(_hw_bus, OID_AUTO, devctl_nomatch_enabled, CTLFLAG_RWTUN,
+ &nomatch_enabled, 0, "enable nomatch events");
static void devctl_attach_handler(void *arg __unused, device_t dev);
static void devctl_detach_handler(void *arg __unused, device_t dev,
@@ -208,7 +211,8 @@ devctl_detach_handler(void *arg __unused, device_t dev, enum evhdev_detach state
static void
devctl_nomatch_handler(void *arg __unused, device_t dev)
{
- devaddq("?", "", dev);
+ if (nomatch_enabled)
+ devaddq("?", "", dev);
}
static int
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 912504f8b1d0..7a57d964acd9 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -276,7 +276,7 @@ intr_event_update(struct intr_event *ie)
}
int
-intr_event_create(struct intr_event **event, void *source, int flags, int irq,
+intr_event_create(struct intr_event **event, void *source, int flags, u_int irq,
void (*pre_ithread)(void *), void (*post_ithread)(void *),
void (*post_filter)(void *), int (*assign_cpu)(void *, int),
const char *fmt, ...)
@@ -443,10 +443,10 @@ intr_lookup(int irq)
}
int
-intr_setaffinity(int irq, int mode, void *m)
+intr_setaffinity(int irq, int mode, const void *m)
{
struct intr_event *ie;
- cpuset_t *mask;
+ const cpuset_t *mask;
int cpu, n;
mask = m;
@@ -1346,8 +1346,11 @@ ithread_loop(void *arg)
*
* Input:
* o ie: the event connected to this interrupt.
- * o frame: some archs (i.e. i386) pass a frame to some.
- * handlers as their main argument.
+--------------------------------------------------------------------------------
+ * o frame: the current trap frame. If the client interrupt
+ * handler needs this frame, they should get it
+ * via curthread->td_intr_frame.
+ *
* Return value:
* o 0: everything ok.
* o EINVAL: stray interrupt.
@@ -1374,9 +1377,6 @@ intr_event_handle(struct intr_event *ie, struct trapframe *frame)
/*
* Execute fast interrupt handlers directly.
- * To support clock handlers, if a handler registers
- * with a NULL argument, then we pass it a pointer to
- * a trapframe as its argument.
*/
td->td_intr_nesting_level++;
filter = false;
@@ -1405,12 +1405,8 @@ intr_event_handle(struct intr_event *ie, struct trapframe *frame)
continue;
}
CTR4(KTR_INTR, "%s: exec %p(%p) for %s", __func__,
- ih->ih_filter, ih->ih_argument == NULL ? frame :
- ih->ih_argument, ih->ih_name);
- if (ih->ih_argument == NULL)
- ret = ih->ih_filter(frame);
- else
- ret = ih->ih_filter(ih->ih_argument);
+ ih->ih_filter, ih->ih_argument, ih->ih_name);
+ ret = ih->ih_filter(ih->ih_argument);
#ifdef HWPMC_HOOKS
PMC_SOFT_CALL_TF( , , intr, all, frame);
#endif
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 08b85867d781..3f34bb12aeaa 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -906,6 +906,20 @@ linker_file_lookup_symbol_internal(linker_file_t file, const char *name,
KLD_DPF(SYM, ("linker_file_lookup_symbol: file=%p, name=%s, deps=%d\n",
file, name, deps));
+ /*
+ * Treat the __this_linker_file as a special symbol. This is a
+ * global that linuxkpi uses to populate the THIS_MODULE
+ * value. In this case we can simply return the linker_file_t.
+ *
+ * Modules compiled statically into the kernel are assigned NULL.
+ */
+ if (strcmp(name, "__this_linker_file") == 0) {
+ address = (file == linker_kernel_file) ? NULL : (caddr_t)file;
+ KLD_DPF(SYM, ("linker_file_lookup_symbol: resolving special "
+ "symbol __this_linker_file to %p\n", address));
+ return (address);
+ }
+
if (LINKER_LOOKUP_SYMBOL(file, name, &sym) == 0) {
LINKER_SYMBOL_VALUES(file, sym, &symval);
if (symval.value == 0)
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index f152185f5fbf..1b4d21f064a7 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -138,9 +138,6 @@ LK_CAN_SHARE(uintptr_t x, int flags, bool fp)
#define LK_TRYWIT(x) \
(LK_TRYOP(x) ? LOP_TRYLOCK : 0)
-#define lockmgr_disowned(lk) \
- (((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == LK_KERNPROC)
-
#define lockmgr_xlocked_v(v) \
(((v) & ~(LK_FLAGMASK & ~LK_SHARE)) == (uintptr_t)curthread)
@@ -243,7 +240,7 @@ static void
lockmgr_note_exclusive_release(struct lock *lk, const char *file, int line)
{
- if (LK_HOLDER(lockmgr_read_value(lk)) != LK_KERNPROC) {
+ if (!lockmgr_disowned(lk)) {
WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, file, line);
TD_LOCKS_DEC(curthread);
}
@@ -1135,7 +1132,7 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje
* any waiter.
* Fix-up the tid var if the lock has been disowned.
*/
- if (LK_HOLDER(x) == LK_KERNPROC)
+ if (lockmgr_disowned_v(x))
tid = LK_KERNPROC;
/*
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index 0df807e47bd6..44b6584f7331 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -1212,6 +1212,7 @@ mb_free_ext(struct mbuf *m)
break;
case EXT_SFBUF:
case EXT_NET_DRV:
+ case EXT_CTL:
case EXT_MOD_TYPE:
case EXT_DISPOSABLE:
KASSERT(mref->m_ext.ext_free != NULL,
diff --git a/sys/kern/kern_osd.c b/sys/kern/kern_osd.c
index 38db612d34d9..dcd80a948ea7 100644
--- a/sys/kern/kern_osd.c
+++ b/sys/kern/kern_osd.c
@@ -278,25 +278,34 @@ osd_free_reserved(void **rsv)
}
void *
-osd_get(u_int type, struct osd *osd, u_int slot)
+osd_get_unlocked(u_int type, struct osd *osd, u_int slot)
{
- struct rm_priotracker tracker;
void *value;
- KASSERT(type >= OSD_FIRST && type <= OSD_LAST, ("Invalid type."));
- KASSERT(slot > 0, ("Invalid slot."));
-
- rm_rlock(&osdm[type].osd_object_lock, &tracker);
KASSERT(osdm[type].osd_destructors[slot - 1] != NULL, ("Unused slot."));
if (slot > osd->osd_nslots) {
value = NULL;
OSD_DEBUG("Slot doesn't exist (type=%u, slot=%u).", type, slot);
} else {
- value = osd->osd_slots[slot - 1];
+ value = atomic_load_ptr(&osd->osd_slots[slot - 1]);
OSD_DEBUG("Returning slot value (type=%u, slot=%u, value=%p).",
type, slot, value);
}
+ return (value);
+}
+
+void *
+osd_get(u_int type, struct osd *osd, u_int slot)
+{
+ struct rm_priotracker tracker;
+ void *value;
+
+ KASSERT(type >= OSD_FIRST && type <= OSD_LAST, ("Invalid type."));
+ KASSERT(slot > 0, ("Invalid slot."));
+
+ rm_rlock(&osdm[type].osd_object_lock, &tracker);
+ value = osd_get_unlocked(type, osd, slot);
rm_runlock(&osdm[type].osd_object_lock, &tracker);
return (value);
}
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index 91026402db05..79b7694192e4 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -116,14 +116,17 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
#ifdef RACCT
if (racct_enable) {
PROC_LOCK(curproc);
- if (uio->uio_rw == UIO_READ) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
racct_add_force(curproc, RACCT_READBPS,
uio->uio_iov[i].iov_len);
racct_add_force(curproc, RACCT_READIOPS, 1);
- } else {
+ break;
+ case UIO_WRITE:
racct_add_force(curproc, RACCT_WRITEBPS,
uio->uio_iov[i].iov_len);
racct_add_force(curproc, RACCT_WRITEIOPS, 1);
+ break;
}
PROC_UNLOCK(curproc);
}
@@ -131,12 +134,15 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
while (uio->uio_iov[i].iov_len) {
g_reset_bio(bp);
- if (uio->uio_rw == UIO_READ) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
bp->bio_cmd = BIO_READ;
curthread->td_ru.ru_inblock++;
- } else {
+ break;
+ case UIO_WRITE:
bp->bio_cmd = BIO_WRITE;
curthread->td_ru.ru_oublock++;
+ break;
}
bp->bio_offset = uio->uio_offset;
base = uio->uio_iov[i].iov_base;
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index b0a3c3fa9e91..afeb320405d0 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -942,6 +942,9 @@ vpanic(const char *fmt, va_list ap)
newpanic = 1;
}
+ /* Unmute when panic */
+ cn_mute = 0;
+
if (newpanic) {
(void)vsnprintf(buf, sizeof(buf), fmt, ap);
panicstr = buf;
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index f714f78cf4da..e139d9c39181 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -651,17 +651,15 @@ sysctl_ctx_free(struct sysctl_ctx_list *clist)
return(EBUSY);
}
/* Now really delete the entries */
- e = TAILQ_FIRST(clist);
- while (e != NULL) {
- e1 = TAILQ_NEXT(e, link);
+ TAILQ_FOREACH_SAFE(e, clist, link, e1) {
error = sysctl_remove_oid_locked(e->entry, 1, 0);
if (error)
panic("sysctl_remove_oid: corrupt tree, entry: %s",
e->entry->oid_name);
free(e, M_SYSCTLOID);
- e = e1;
}
SYSCTL_WUNLOCK();
+ TAILQ_INIT(clist);
return (error);
}
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index 46155cf6a73e..fb76d420df7c 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -315,7 +315,8 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap)
{
int name[2], error;
size_t len;
- char *s, *us;
+ const char *s;
+ char *us;
name[0] = CTL_KERN;
name[1] = KERN_OSTYPE;
diff --git a/sys/kern/subr_boot.c b/sys/kern/subr_boot.c
index 5b80200a2f7d..b721abf7013c 100644
--- a/sys/kern/subr_boot.c
+++ b/sys/kern/subr_boot.c
@@ -70,6 +70,7 @@ static struct
{ "boot_gdb", RB_GDB},
{ "boot_multicons", RB_MULTIPLE},
{ "boot_mute", RB_MUTE},
+ { "boot_mutemsgs", RB_MUTEMSGS},
{ "boot_pause", RB_PAUSE},
{ "boot_serial", RB_SERIAL},
{ "boot_single", RB_SINGLE},
@@ -133,10 +134,10 @@ boot_parse_arg(const char *v)
#if 0
/* Need to see if this is better or worse than the meat of the #else */
-static const char howto_switches[] = "aCdrgDmphsv";
+static const char howto_switches[] = "aCdrgDmMphsv";
static int howto_masks[] = {
RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE,
- RB_MUTE, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE
+ RB_MUTE, RB_MUTEMSGS, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE
};
opts = strchr(kargs, '-');
@@ -160,6 +161,7 @@ static int howto_masks[] = {
case 'd': howto |= RB_KDB; break;
case 'D': howto |= RB_MULTIPLE; break;
case 'm': howto |= RB_MUTE; break;
+ case 'M': howto |= RB_MUTEMSGS; break;
case 'g': howto |= RB_GDB; break;
case 'h': howto |= RB_SERIAL; break;
case 'p': howto |= RB_PAUSE; break;
diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c
index 77b1b358758f..a27bc423c23a 100644
--- a/sys/kern/subr_busdma_bounce.c
+++ b/sys/kern/subr_busdma_bounce.c
@@ -451,6 +451,76 @@ free_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map)
wakeup(&bounce_map_callbacklist);
}
+/*
+ * Add a single contiguous physical range to the segment list.
+ */
+static bus_size_t
+_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
+ bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
+{
+ int seg;
+
+ KASSERT(curaddr <= BUS_SPACE_MAXADDR,
+ ("ds_addr %#jx > BUS_SPACE_MAXADDR %#jx; dmat %p fl %#x low %#jx "
+ "hi %#jx",
+ (uintmax_t)curaddr, (uintmax_t)BUS_SPACE_MAXADDR,
+ dmat, dmat_bounce_flags(dmat), (uintmax_t)dmat_lowaddr(dmat),
+ (uintmax_t)dmat_highaddr(dmat)));
+
+ /*
+ * Make sure we don't cross any boundaries.
+ */
+ if (!vm_addr_bound_ok(curaddr, sgsize, dmat_boundary(dmat)))
+ sgsize = roundup2(curaddr, dmat_boundary(dmat)) - curaddr;
+
+ /*
+ * Insert chunk into a segment, coalescing with
+ * previous segment if possible.
+ */
+ seg = *segp;
+ if (seg == -1) {
+ seg = 0;
+ segs[seg].ds_addr = curaddr;
+ segs[seg].ds_len = sgsize;
+ } else {
+ if (curaddr == segs[seg].ds_addr + segs[seg].ds_len &&
+ (segs[seg].ds_len + sgsize) <= dmat_maxsegsz(dmat) &&
+ vm_addr_bound_ok(segs[seg].ds_addr,
+ segs[seg].ds_len + sgsize, dmat_boundary(dmat)))
+ segs[seg].ds_len += sgsize;
+ else {
+ if (++seg >= dmat_nsegments(dmat))
+ return (0);
+ segs[seg].ds_addr = curaddr;
+ segs[seg].ds_len = sgsize;
+ }
+ }
+ *segp = seg;
+ return (sgsize);
+}
+
+/*
+ * Add a contiguous physical range to the segment list, respecting the tag's
+ * maximum segment size and splitting it into multiple segments as necessary.
+ */
+static bool
+_bus_dmamap_addsegs(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
+ bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
+{
+ bus_size_t done, todo;
+
+ while (sgsize > 0) {
+ todo = MIN(sgsize, dmat_maxsegsz(dmat));
+ done = _bus_dmamap_addseg(dmat, map, curaddr, todo, segs,
+ segp);
+ if (done == 0)
+ return (false);
+ curaddr += done;
+ sgsize -= done;
+ }
+ return (true);
+}
+
static void
busdma_thread(void *dummy __unused)
{
diff --git a/sys/kern/subr_fattime.c b/sys/kern/subr_fattime.c
index 665131e5b32b..569ee7f77112 100644
--- a/sys/kern/subr_fattime.c
+++ b/sys/kern/subr_fattime.c
@@ -63,11 +63,6 @@
* FAT timestamps have 7 bits for the year and starts at 1980, so
* they can represent up to 2107 which means that the non-leap-year
* 2100 must be handled.
- *
- * XXX: As long as time_t is 32 bits this is not relevant or easily
- * XXX: testable. Revisit when time_t grows bigger.
- * XXX: grepfodder: 64 bit time_t, y2100, y2.1k, 2100, leap year
- *
*/
#include <sys/param.h>
@@ -75,10 +70,16 @@
#include <sys/time.h>
#include <sys/clock.h>
+#ifdef TEST_DRIVER
+/* stub for testing */
+#define utc_offset() 0
+#endif
+
#define DAY (24 * 60 * 60) /* Length of day in seconds */
#define YEAR 365 /* Length of normal year */
#define LYC (4 * YEAR + 1) /* Length of 4 year leap-year cycle */
#define T1980 (10 * 365 + 2) /* Days from 1970 to 1980 */
+#define T2108 (138 * 365 + 33) /* Days from 1970 to 2108 */
/* End of month is N days from start of (normal) year */
#define JAN 31
@@ -159,10 +160,7 @@ timespec2fattime(const struct timespec *tsp, int utc, uint16_t *ddp,
} else {
t2 -= T1980;
- /*
- * 2100 is not a leap year.
- * XXX: a 32 bit time_t can not get us here.
- */
+ /* 2100 is not a leap year */
if (t2 >= ((2100 - 1980) / 4 * LYC + FEB))
t2++;
@@ -236,17 +234,14 @@ fattime2timespec(unsigned dd, unsigned dt, unsigned dh, int utc,
/* Month offset from leap-year cycle */
day += daytab[(dd >> 5) & 0x3f];
- /*
- * 2100 is not a leap year.
- * XXX: a 32 bit time_t can not get us here.
- */
+ /* 2100 is not a leap year */
if (day >= ((2100 - 1980) / 4 * LYC + FEB))
day--;
/* Align with time_t epoch */
day += T1980;
- tsp->tv_sec += DAY * day;
+ tsp->tv_sec += (time_t) DAY * day;
if (!utc)
tsp->tv_sec += utc_offset();
}
@@ -270,11 +265,17 @@ main(int argc __unused, char **argv __unused)
for (i = 0; i < 10000; i++) {
do {
- ts.tv_sec = random();
- } while (ts.tv_sec < T1980 * 86400);
+ /*
+ * 32-bits gets us to 2106-02-07 06:28:15, but we
+ * need to get to the end of 2107. So, we generate
+ * a 36-bit second count to get us way past 2106.
+ */
+ ts.tv_sec = ((time_t) arc4random() << 4) ^ arc4random();
+ } while ((ts.tv_sec < T1980 * 86400) || (ts.tv_sec >= T2108 * 86400ull));
+
ts.tv_nsec = random() % 1000000000;
- printf("%10d.%03ld -- ", ts.tv_sec, ts.tv_nsec / 1000000);
+ printf("%10jd.%03ld -- ", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
gmtime_r(&ts.tv_sec, &tm);
strftime(buf, sizeof buf, "%Y %m %d %H %M %S", &tm);
@@ -282,7 +283,7 @@ main(int argc __unused, char **argv __unused)
a = ts.tv_sec + ts.tv_nsec * 1e-9;
d = t = p = 0;
- timet2fattime(&ts, &d, &t, &p);
+ timespec2fattime(&ts, 1, &d, &t, &p);
printf("%04x %04x %02x -- ", d, t, p);
printf("%3d %02d %02d %02d %02d %02d -- ",
((d >> 9) & 0x7f) + 1980,
@@ -293,8 +294,8 @@ main(int argc __unused, char **argv __unused)
((t >> 0) & 0x1f) * 2);
ts.tv_sec = ts.tv_nsec = 0;
- fattime2timet(d, t, p, &ts);
- printf("%10d.%03ld == ", ts.tv_sec, ts.tv_nsec / 1000000);
+ fattime2timespec(d, t, p, 1, &ts);
+ printf("%10jd.%03ld == ", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
gmtime_r(&ts.tv_sec, &tm);
strftime(buf, sizeof buf, "%Y %m %d %H %M %S", &tm);
printf("%s -- ", buf);
diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c
index 5958f9025b27..210989868415 100644
--- a/sys/kern/subr_intr.c
+++ b/sys/kern/subr_intr.c
@@ -149,7 +149,7 @@ static bool intr_ipi_dev_frozen;
static struct mtx pic_list_lock;
static SLIST_HEAD(, intr_pic) pic_list;
-static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags);
+static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, u_int flags);
/* Interrupt source definition. */
static struct mtx isrc_table_lock;
@@ -744,7 +744,7 @@ isrc_add_handler(struct intr_irqsrc *isrc, const char *name,
* Lookup interrupt controller locked.
*/
static inline struct intr_pic *
-pic_lookup_locked(device_t dev, intptr_t xref, int flags)
+pic_lookup_locked(device_t dev, intptr_t xref, u_int flags)
{
struct intr_pic *pic;
@@ -775,7 +775,7 @@ pic_lookup_locked(device_t dev, intptr_t xref, int flags)
* Lookup interrupt controller.
*/
static struct intr_pic *
-pic_lookup(device_t dev, intptr_t xref, int flags)
+pic_lookup(device_t dev, intptr_t xref, u_int flags)
{
struct intr_pic *pic;
@@ -789,7 +789,7 @@ pic_lookup(device_t dev, intptr_t xref, int flags)
* Create interrupt controller.
*/
static struct intr_pic *
-pic_create(device_t dev, intptr_t xref, int flags)
+pic_create(device_t dev, intptr_t xref, u_int flags)
{
struct intr_pic *pic;
@@ -818,7 +818,7 @@ pic_create(device_t dev, intptr_t xref, int flags)
* Destroy interrupt controller.
*/
static void
-pic_destroy(device_t dev, intptr_t xref, int flags)
+pic_destroy(device_t dev, intptr_t xref, u_int flags)
{
struct intr_pic *pic;
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 2a721c3c113f..ea5e8d02be2b 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -41,6 +41,7 @@
#include "opt_maxusers.h"
#include <sys/param.h>
+#include <sys/_maxphys.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/kernel.h>
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index 1393781a66fe..dbb09850d049 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -98,7 +98,7 @@ static int rman_debug = 0;
SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN,
&rman_debug, 0, "rman debug");
-#define DPRINTF(params) if (rman_debug) printf params
+#define DPRINTF(...) do { if (rman_debug) printf(__VA_ARGS__); } while (0)
static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager");
@@ -154,8 +154,8 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end)
struct resource_i *r, *s, *t;
int rv = 0;
- DPRINTF(("rman_manage_region: <%s> request: start %#jx, end %#jx\n",
- rm->rm_descr, start, end));
+ DPRINTF("%s: <%s> request: start %#jx, end %#jx\n", __func__,
+ rm->rm_descr, start, end);
if (start < rm->rm_start || end > rm->rm_end)
return EINVAL;
r = int_alloc_resource(M_NOWAIT);
@@ -429,20 +429,18 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end)
#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_PREFETCHABLE))
struct resource *
-rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
- rman_res_t count, rman_res_t bound, u_int flags,
- device_t dev)
+rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end,
+ rman_res_t count, u_int flags, device_t dev)
{
u_int new_rflags;
struct resource_i *r, *s, *rv;
- rman_res_t rstart, rend, amask, bmask;
+ rman_res_t rstart, rend, amask;
rv = NULL;
- DPRINTF(("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], "
- "length %#jx, flags %x, device %s\n", rm->rm_descr, start, end,
- count, flags,
- dev == NULL ? "<null>" : device_get_nameunit(dev)));
+ DPRINTF("%s: <%s> request: [%#jx, %#jx], length %#jx, flags %x, "
+ "device %s\n", __func__, rm->rm_descr, start, end, count, flags,
+ dev == NULL ? "<null>" : device_get_nameunit(dev));
KASSERT(count != 0, ("%s: attempted to allocate an empty range",
__func__));
KASSERT((flags & RF_FIRSTSHARE) == 0,
@@ -452,22 +450,20 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
mtx_lock(rm->rm_mtx);
r = TAILQ_FIRST(&rm->rm_list);
- if (r == NULL) {
- DPRINTF(("NULL list head\n"));
- } else {
- DPRINTF(("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n",
- r->r_end, start, count-1));
- }
+ if (r == NULL)
+ DPRINTF("NULL list head\n");
+ else
+ DPRINTF("%s: trying %#jx <%#jx,%#jx>\n", __func__, r->r_end,
+ start, count-1);
+
for (r = TAILQ_FIRST(&rm->rm_list);
r && r->r_end < start + count - 1;
- r = TAILQ_NEXT(r, r_link)) {
- ;
- DPRINTF(("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n",
- r->r_end, start, count-1));
- }
+ r = TAILQ_NEXT(r, r_link))
+ DPRINTF("%s: tried %#jx <%#jx,%#jx>\n", __func__, r->r_end,
+ start, count-1);
if (r == NULL) {
- DPRINTF(("could not find a region\n"));
+ DPRINTF("could not find a region\n");
goto out;
}
@@ -475,29 +471,27 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
KASSERT(start <= RM_MAX_END - amask,
("start (%#jx) + amask (%#jx) would wrap around", start, amask));
- /* If bound is 0, bmask will also be 0 */
- bmask = ~(bound - 1);
/*
* First try to find an acceptable totally-unshared region.
*/
for (s = r; s; s = TAILQ_NEXT(s, r_link)) {
- DPRINTF(("considering [%#jx, %#jx]\n", s->r_start, s->r_end));
+ DPRINTF("considering [%#jx, %#jx]\n", s->r_start, s->r_end);
/*
* The resource list is sorted, so there is no point in
* searching further once r_start is too large.
*/
if (s->r_start > end - (count - 1)) {
- DPRINTF(("s->r_start (%#jx) + count - 1> end (%#jx)\n",
- s->r_start, end));
+ DPRINTF("s->r_start (%#jx) + count - 1> end (%#jx)\n",
+ s->r_start, end);
break;
}
if (s->r_start > RM_MAX_END - amask) {
- DPRINTF(("s->r_start (%#jx) + amask (%#jx) too large\n",
- s->r_start, amask));
+ DPRINTF("s->r_start (%#jx) + amask (%#jx) too large\n",
+ s->r_start, amask);
break;
}
if (s->r_flags & RF_ALLOCATED) {
- DPRINTF(("region is allocated\n"));
+ DPRINTF("region is allocated\n");
continue;
}
rstart = ummax(s->r_start, start);
@@ -508,23 +502,21 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
*/
do {
rstart = (rstart + amask) & ~amask;
- if (((rstart ^ (rstart + count - 1)) & bmask) != 0)
- rstart += bound - (rstart & ~bmask);
} while ((rstart & amask) != 0 && rstart < end &&
rstart < s->r_end);
rend = ummin(s->r_end, ummax(rstart + count - 1, end));
if (rstart > rend) {
- DPRINTF(("adjusted start exceeds end\n"));
+ DPRINTF("adjusted start exceeds end\n");
continue;
}
- DPRINTF(("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n",
- rstart, rend, (rend - rstart + 1), count));
+ DPRINTF("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n",
+ rstart, rend, (rend - rstart + 1), count);
if ((rend - rstart) >= (count - 1)) {
- DPRINTF(("candidate region: [%#jx, %#jx], size %#jx\n",
- rstart, rend, (rend - rstart + 1)));
+ DPRINTF("candidate region: [%#jx, %#jx], size %#jx\n",
+ rstart, rend, (rend - rstart + 1));
if ((s->r_end - s->r_start + 1) == count) {
- DPRINTF(("candidate region is entire chunk\n"));
+ DPRINTF("candidate region is entire chunk\n");
rv = s;
rv->r_flags = new_rflags;
rv->r_dev = dev;
@@ -551,11 +543,11 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
rv->r_rm = rm;
if (s->r_start < rv->r_start && s->r_end > rv->r_end) {
- DPRINTF(("splitting region in three parts: "
+ DPRINTF("splitting region in three parts: "
"[%#jx, %#jx]; [%#jx, %#jx]; [%#jx, %#jx]\n",
s->r_start, rv->r_start - 1,
rv->r_start, rv->r_end,
- rv->r_end + 1, s->r_end));
+ rv->r_end + 1, s->r_end);
/*
* We are allocating in the middle.
*/
@@ -575,14 +567,14 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
TAILQ_INSERT_AFTER(&rm->rm_list, rv, r,
r_link);
} else if (s->r_start == rv->r_start) {
- DPRINTF(("allocating from the beginning\n"));
+ DPRINTF("allocating from the beginning\n");
/*
* We are allocating at the beginning.
*/
s->r_start = rv->r_end + 1;
TAILQ_INSERT_BEFORE(s, rv, r_link);
} else {
- DPRINTF(("allocating at the end\n"));
+ DPRINTF("allocating at the end\n");
/*
* We are allocating at the end.
*/
@@ -602,7 +594,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
* former restriction could probably be lifted without too much
* additional work, but this does not seem warranted.)
*/
- DPRINTF(("no unshared regions found\n"));
+ DPRINTF("no unshared regions found\n");
if ((flags & RF_SHAREABLE) == 0)
goto out;
@@ -610,8 +602,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
if (SHARE_TYPE(s->r_flags) == SHARE_TYPE(flags) &&
s->r_start >= start &&
(s->r_end - s->r_start + 1) == count &&
- (s->r_start & amask) == 0 &&
- ((s->r_start ^ s->r_end) & bmask) == 0) {
+ (s->r_start & amask) == 0) {
rv = int_alloc_resource(M_NOWAIT);
if (rv == NULL)
goto out;
@@ -647,15 +638,6 @@ out:
return (rv == NULL ? NULL : &rv->r_r);
}
-struct resource *
-rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end,
- rman_res_t count, u_int flags, device_t dev)
-{
-
- return (rman_reserve_resource_bound(rm, start, end, count, 0, flags,
- dev));
-}
-
int
rman_activate_resource(struct resource *re)
{
@@ -794,44 +776,39 @@ rman_release_resource(struct resource *re)
uint32_t
rman_make_alignment_flags(uint32_t size)
{
- int i;
/*
* Find the hightest bit set, and add one if more than one bit
* set. We're effectively computing the ceil(log2(size)) here.
*/
- for (i = 31; i > 0; i--)
- if ((1 << i) & size)
- break;
- if (~(1 << i) & size)
- i++;
-
- return(RF_ALIGNMENT_LOG2(i));
+ if (__predict_false(size == 0))
+ return (0);
+ return (RF_ALIGNMENT_LOG2(flsl(size - 1)));
}
rman_res_t
-rman_get_start(struct resource *r)
+rman_get_start(const struct resource *r)
{
return (r->__r_i->r_start);
}
rman_res_t
-rman_get_end(struct resource *r)
+rman_get_end(const struct resource *r)
{
return (r->__r_i->r_end);
}
rman_res_t
-rman_get_size(struct resource *r)
+rman_get_size(const struct resource *r)
{
return (r->__r_i->r_end - r->__r_i->r_start + 1);
}
u_int
-rman_get_flags(struct resource *r)
+rman_get_flags(const struct resource *r)
{
return (r->__r_i->r_flags);
@@ -845,7 +822,7 @@ rman_set_virtual(struct resource *r, void *v)
}
void *
-rman_get_virtual(struct resource *r)
+rman_get_virtual(const struct resource *r)
{
return (r->__r_i->r_virtual);
@@ -859,7 +836,7 @@ rman_set_irq_cookie(struct resource *r, void *c)
}
void *
-rman_get_irq_cookie(struct resource *r)
+rman_get_irq_cookie(const struct resource *r)
{
return (r->__r_i->r_irq_cookie);
@@ -873,7 +850,7 @@ rman_set_bustag(struct resource *r, bus_space_tag_t t)
}
bus_space_tag_t
-rman_get_bustag(struct resource *r)
+rman_get_bustag(const struct resource *r)
{
return (r->r_bustag);
@@ -887,7 +864,7 @@ rman_set_bushandle(struct resource *r, bus_space_handle_t h)
}
bus_space_handle_t
-rman_get_bushandle(struct resource *r)
+rman_get_bushandle(const struct resource *r)
{
return (r->r_bushandle);
@@ -905,7 +882,7 @@ rman_set_mapping(struct resource *r, struct resource_map *map)
}
void
-rman_get_mapping(struct resource *r, struct resource_map *map)
+rman_get_mapping(const struct resource *r, struct resource_map *map)
{
map->r_bustag = rman_get_bustag(r);
@@ -922,7 +899,7 @@ rman_set_rid(struct resource *r, int rid)
}
int
-rman_get_rid(struct resource *r)
+rman_get_rid(const struct resource *r)
{
return (r->__r_i->r_rid);
@@ -935,7 +912,7 @@ rman_set_type(struct resource *r, int type)
}
int
-rman_get_type(struct resource *r)
+rman_get_type(const struct resource *r)
{
return (r->__r_i->r_type);
}
@@ -948,14 +925,14 @@ rman_set_device(struct resource *r, device_t dev)
}
device_t
-rman_get_device(struct resource *r)
+rman_get_device(const struct resource *r)
{
return (r->__r_i->r_dev);
}
int
-rman_is_region_manager(struct resource *r, struct rman *rm)
+rman_is_region_manager(const struct resource *r, const struct rman *rm)
{
return (r->__r_i->r_rm == rm);
diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c
index cbc4b0c0ed8e..ff63ac3e2dc0 100644
--- a/sys/kern/subr_uio.c
+++ b/sys/kern/subr_uio.c
@@ -249,19 +249,27 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error)
goto out;
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c
index 1c9a8a5be979..a706d944dc3f 100644
--- a/sys/kern/subr_vmem.c
+++ b/sys/kern/subr_vmem.c
@@ -624,14 +624,14 @@ qc_drain(vmem_t *vm)
uma_zone_reclaim(vm->vm_qcache[i].qc_cache, UMA_RECLAIM_DRAIN);
}
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
static struct mtx_padalign __exclusive_cache_line vmem_bt_lock;
/*
* vmem_bt_alloc: Allocate a new page of boundary tags.
*
- * On architectures with uma_small_alloc there is no recursion; no address
+ * On architectures with UMA_USE_DMAP there is no recursion; no address
* space need be allocated to allocate boundary tags. For the others, we
* must handle recursion. Boundary tags are necessary to allocate new
* boundary tags.
@@ -707,7 +707,7 @@ vmem_startup(void)
vmem_bt_zone = uma_zcreate("vmem btag",
sizeof(struct vmem_btag), NULL, NULL, NULL, NULL,
UMA_ALIGN_PTR, UMA_ZONE_VM);
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF);
uma_prealloc(vmem_bt_zone, BT_MAXALLOC);
/*
diff --git a/sys/kern/sys_capability.c b/sys/kern/sys_capability.c
index d59ad37f35ec..e71dc4f3285b 100644
--- a/sys/kern/sys_capability.c
+++ b/sys/kern/sys_capability.c
@@ -85,7 +85,7 @@
bool __read_frequently trap_enotcap;
SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RWTUN, &trap_enotcap, 0,
- "Deliver SIGTRAP on ENOTCAPABLE");
+ "Deliver SIGTRAP on ECAPMODE and ENOTCAPABLE");
#ifdef CAPABILITY_MODE
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index b926f98892a5..99b018dee26c 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -2092,11 +2092,16 @@ kcmp_cmp(uintptr_t a, uintptr_t b)
static int
kcmp_pget(struct thread *td, pid_t pid, struct proc **pp)
{
+ int error;
+
if (pid == td->td_proc->p_pid) {
*pp = td->td_proc;
return (0);
}
- return (pget(pid, PGET_CANDEBUG | PGET_NOTWEXIT | PGET_HOLD, pp));
+ error = pget(pid, PGET_NOTID | PGET_CANDEBUG | PGET_NOTWEXIT |
+ PGET_HOLD, pp);
+ MPASS(*pp != td->td_proc);
+ return (error);
}
int
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 274167ac11d8..9fdd443955c7 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -497,7 +497,7 @@
int flags
);
}
-66 AUE_VFORK STD {
+66 AUE_VFORK STD|CAPENABLED {
int vfork(void);
}
67 AUE_NULL OBSOL vread
@@ -1455,7 +1455,7 @@
int inherit
);
}
-251 AUE_RFORK STD {
+251 AUE_RFORK STD|CAPENABLED {
int rfork(
int flags
);
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 078151627dfc..0620fbd175af 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -1477,6 +1477,40 @@ sysctl_msqids(SYSCTL_HANDLER_ARGS)
return (error);
}
+int
+kern_get_msqids(struct thread *td, struct msqid_kernel **res, size_t *sz)
+{
+ struct msqid_kernel *pmsqk;
+ struct prison *pr, *rpr;
+ int i, mi;
+
+ *sz = mi = msginfo.msgmni;
+ if (res == NULL)
+ return (0);
+
+ pr = td->td_ucred->cr_prison;
+ rpr = msg_find_prison(td->td_ucred);
+ *res = malloc(sizeof(struct msqid_kernel) * mi, M_TEMP, M_WAITOK);
+ for (i = 0; i < mi; i++) {
+ pmsqk = &(*res)[i];
+ mtx_lock(&msq_mtx);
+ if (msqids[i].u.msg_qbytes == 0 || rpr == NULL ||
+ msq_prison_cansee(rpr, &msqids[i]) != 0)
+ bzero(pmsqk, sizeof(*pmsqk));
+ else {
+ *pmsqk = msqids[i];
+ if (pmsqk->cred->cr_prison != pr)
+ pmsqk->u.msg_perm.key = IPC_PRIVATE;
+ }
+ mtx_unlock(&msq_mtx);
+ pmsqk->u.__msg_first = NULL;
+ pmsqk->u.__msg_last = NULL;
+ pmsqk->label = NULL;
+ pmsqk->cred = NULL;
+ }
+ return (0);
+}
+
SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0,
"Maximum message size");
SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0,
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 6a668906ebd0..d8c10f837105 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -1574,6 +1574,39 @@ sysctl_sema(SYSCTL_HANDLER_ARGS)
return (error);
}
+int
+kern_get_sema(struct thread *td, struct semid_kernel **res, size_t *sz)
+{
+ struct prison *pr, *rpr;
+ struct semid_kernel *psemak;
+ int i, mi;
+
+ *sz = mi = seminfo.semmni;
+ if (res == NULL)
+ return (0);
+
+ pr = td->td_ucred->cr_prison;
+ rpr = sem_find_prison(td->td_ucred);
+ *res = malloc(sizeof(struct semid_kernel) * mi, M_TEMP, M_WAITOK);
+ for (i = 0; i < mi; i++) {
+ psemak = &(*res)[i];
+ mtx_lock(&sema_mtx[i]);
+ if ((sema[i].u.sem_perm.mode & SEM_ALLOC) == 0 ||
+ rpr == NULL || sem_prison_cansee(rpr, &sema[i]) != 0)
+ bzero(psemak, sizeof(*psemak));
+ else {
+ *psemak = sema[i];
+ if (psemak->cred->cr_prison != pr)
+ psemak->u.sem_perm.key = IPC_PRIVATE;
+ }
+ mtx_unlock(&sema_mtx[i]);
+ psemak->u.__sem_base = NULL;
+ psemak->label = NULL;
+ psemak->cred = NULL;
+ }
+ return (0);
+}
+
static int
sem_prison_check(void *obj, void *data)
{
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 2529a9eeb1a7..835b44ab332a 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -109,10 +109,6 @@ FEATURE(sysv_shm, "System V shared memory segments support");
static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments");
-#define SHMSEG_FREE 0x0200
-#define SHMSEG_REMOVED 0x0400
-#define SHMSEG_ALLOCATED 0x0800
-
static int shm_last_free, shm_nused, shmalloced;
vm_size_t shm_committed;
static struct shmid_kernel *shmsegs;
@@ -1093,6 +1089,42 @@ sysctl_shmsegs(SYSCTL_HANDLER_ARGS)
return (error);
}
+int
+kern_get_shmsegs(struct thread *td, struct shmid_kernel **res, size_t *sz)
+{
+ struct shmid_kernel *pshmseg;
+ struct prison *pr, *rpr;
+ int i;
+
+ SYSVSHM_LOCK();
+ *sz = shmalloced;
+ if (res == NULL)
+ goto out;
+
+ pr = td->td_ucred->cr_prison;
+ rpr = shm_find_prison(td->td_ucred);
+ *res = malloc(sizeof(struct shmid_kernel) * shmalloced, M_TEMP,
+ M_WAITOK);
+ for (i = 0; i < shmalloced; i++) {
+ pshmseg = &(*res)[i];
+ if ((shmsegs[i].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 ||
+ rpr == NULL || shm_prison_cansee(rpr, &shmsegs[i]) != 0) {
+ bzero(pshmseg, sizeof(*pshmseg));
+ pshmseg->u.shm_perm.mode = SHMSEG_FREE;
+ } else {
+ *pshmseg = shmsegs[i];
+ if (pshmseg->cred->cr_prison != pr)
+ pshmseg->u.shm_perm.key = IPC_PRIVATE;
+ }
+ pshmseg->object = NULL;
+ pshmseg->label = NULL;
+ pshmseg->cred = NULL;
+ }
+out:
+ SYSVSHM_UNLOCK();
+ return (0);
+}
+
static int
shm_prison_check(void *obj, void *data)
{
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 6400f0bce9f9..c0948d40c47b 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -50,7 +50,6 @@
* use the IPC facility without having to mount mqueue file system.
*/
-#include <sys/cdefs.h>
#include "opt_capsicum.h"
#include <sys/param.h>
@@ -201,14 +200,18 @@ static SYSCTL_NODE(_kern, OID_AUTO, mqueue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"POSIX real time message queue");
static int default_maxmsg = 10;
+SYSCTL_INT(_kern_mqueue, OID_AUTO, default_maxmsg, CTLFLAG_RD,
+ &default_maxmsg, 0, "Default maximum messages in queue");
static int default_msgsize = 1024;
+SYSCTL_INT(_kern_mqueue, OID_AUTO, default_msgsize, CTLFLAG_RD,
+ &default_msgsize, 0, "Default maximum message size");
static int maxmsg = 100;
SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsg, CTLFLAG_RW,
- &maxmsg, 0, "Default maximum messages in queue");
+ &maxmsg, 0, "maximum messages in queue");
static int maxmsgsize = 16384;
SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsgsize, CTLFLAG_RW,
- &maxmsgsize, 0, "Default maximum message size");
+ &maxmsgsize, 0, "maximum message size");
static int maxmq = 100;
SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmq, CTLFLAG_RW,
&maxmq, 0, "maximum message queues");
@@ -379,7 +382,7 @@ mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn)
static __inline struct mqfs_node *
mqnode_alloc(void)
{
- return uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO);
+ return (uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO));
}
static __inline void
@@ -451,8 +454,8 @@ mqfs_create_node(const char *name, int namelen, struct ucred *cred, int mode,
node->mn_type = nodetype;
node->mn_refcount = 1;
vfs_timestamp(&node->mn_birth);
- node->mn_ctime = node->mn_atime = node->mn_mtime
- = node->mn_birth;
+ node->mn_ctime = node->mn_atime = node->mn_mtime =
+ node->mn_birth;
node->mn_uid = cred->cr_uid;
node->mn_gid = cred->cr_gid;
node->mn_mode = mode;
@@ -812,6 +815,7 @@ found:
panic("%s has unexpected type: %d", pn->mn_name, pn->mn_type);
}
sx_xunlock(&mqfs->mi_lock);
+ vn_set_state(*vpp, VSTATE_CONSTRUCTED);
return (0);
}
@@ -1017,8 +1021,8 @@ mqfs_create(struct vop_create_args *ap)
/*
* Remove an entry
*/
-static
-int do_unlink(struct mqfs_node *pn, struct ucred *ucred)
+static int
+do_unlink(struct mqfs_node *pn, struct ucred *ucred)
{
struct mqfs_node *parent;
struct mqfs_vdata *vd;
@@ -1110,9 +1114,9 @@ mqfs_reclaim(struct vop_reclaim_args *ap)
sx_xlock(&mqfs->mi_lock);
vp->v_data = NULL;
LIST_REMOVE(vd, mv_link);
- uma_zfree(mvdata_zone, vd);
mqnode_release(pn);
sx_xunlock(&mqfs->mi_lock);
+ uma_zfree(mvdata_zone, vd);
return (0);
}
@@ -1244,15 +1248,15 @@ mqfs_setattr(struct vop_setattr_args *ap)
td = curthread;
vap = ap->a_vap;
vp = ap->a_vp;
- if ((vap->va_type != VNON) ||
- (vap->va_nlink != VNOVAL) ||
- (vap->va_fsid != VNOVAL) ||
- (vap->va_fileid != VNOVAL) ||
- (vap->va_blocksize != VNOVAL) ||
+ if (vap->va_type != VNON ||
+ vap->va_nlink != VNOVAL ||
+ vap->va_fsid != VNOVAL ||
+ vap->va_fileid != VNOVAL ||
+ vap->va_blocksize != VNOVAL ||
(vap->va_flags != VNOVAL && vap->va_flags != 0) ||
- (vap->va_rdev != VNOVAL) ||
- ((int)vap->va_bytes != VNOVAL) ||
- (vap->va_gen != VNOVAL)) {
+ vap->va_rdev != VNOVAL ||
+ (int)vap->va_bytes != VNOVAL ||
+ vap->va_gen != VNOVAL) {
return (EINVAL);
}
@@ -1281,7 +1285,7 @@ mqfs_setattr(struct vop_setattr_args *ap)
* check in VOP_ACCESS() be enough? Also, are the group bits
* below definitely right?
*/
- if (((ap->a_cred->cr_uid != pn->mn_uid) || uid != pn->mn_uid ||
+ if ((ap->a_cred->cr_uid != pn->mn_uid || uid != pn->mn_uid ||
(gid != pn->mn_gid && !groupmember(gid, ap->a_cred))) &&
(error = priv_check(td, PRIV_MQ_ADMIN)) != 0)
return (error);
@@ -1291,7 +1295,7 @@ mqfs_setattr(struct vop_setattr_args *ap)
}
if (vap->va_mode != (mode_t)VNOVAL) {
- if ((ap->a_cred->cr_uid != pn->mn_uid) &&
+ if (ap->a_cred->cr_uid != pn->mn_uid &&
(error = priv_check(td, PRIV_MQ_ADMIN)))
return (error);
pn->mn_mode = vap->va_mode;
@@ -1345,11 +1349,11 @@ mqfs_read(struct vop_read_args *ap)
mq = VTOMQ(vp);
snprintf(buf, sizeof(buf),
- "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n",
- mq->mq_totalbytes,
- mq->mq_maxmsg,
- mq->mq_curmsgs,
- mq->mq_msgsize);
+ "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n",
+ mq->mq_totalbytes,
+ mq->mq_maxmsg,
+ mq->mq_curmsgs,
+ mq->mq_msgsize);
buf[sizeof(buf)-1] = '\0';
len = strlen(buf);
error = uiomove_frombuf(buf, len, uio);
@@ -1999,11 +2003,11 @@ notifier_remove(struct proc *p, struct mqueue *mq, int fd)
PROC_UNLOCK(p);
}
-static int
+int
kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
const struct mq_attr *attr)
{
- char path[MQFS_NAMELEN + 1];
+ char *path, pathbuf[MQFS_NAMELEN + 1];
struct mqfs_node *pn;
struct pwddesc *pdp;
struct file *fp;
@@ -2014,7 +2018,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
AUDIT_ARG_MODE(mode);
pdp = td->td_proc->p_pd;
- cmode = (((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT);
+ cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT;
mq = NULL;
if ((flags & O_CREAT) != 0 && attr != NULL) {
if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg)
@@ -2023,32 +2027,37 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
return (EINVAL);
}
+ path = pathbuf;
error = copyinstr(upath, path, MQFS_NAMELEN + 1, NULL);
if (error)
return (error);
/*
- * The first character of name must be a slash (/) character
+ * The first character of name may be a slash (/) character
* and the remaining characters of name cannot include any slash
* characters.
*/
len = strlen(path);
- if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL)
+ if (len < 2 || strchr(path + 1, '/') != NULL)
return (EINVAL);
+ if (path[0] == '/') {
+ path++;
+ len--;
+ }
/*
* "." and ".." are magic directories, populated on the fly, and cannot
* be opened as queues.
*/
- if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0)
+ if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0)
return (EINVAL);
- AUDIT_ARG_UPATH1_CANON(path);
+ AUDIT_ARG_UPATH1_CANON(pathbuf);
error = falloc(td, &fp, &fd, O_CLOEXEC);
if (error)
return (error);
sx_xlock(&mqfs_data.mi_lock);
- pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred);
+ pn = mqfs_search(mqfs_data.mi_root, path, len, td->td_ucred);
if (pn == NULL) {
if (!(flags & O_CREAT)) {
error = ENOENT;
@@ -2058,7 +2067,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
error = ENFILE;
} else {
pn = mqfs_create_file(mqfs_data.mi_root,
- path + 1, len - 1, td->td_ucred,
+ path, len, td->td_ucred,
cmode);
if (pn == NULL) {
error = ENOSPC;
@@ -2130,23 +2139,28 @@ sys_kmq_open(struct thread *td, struct kmq_open_args *uap)
int
sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap)
{
- char path[MQFS_NAMELEN+1];
+ char *path, pathbuf[MQFS_NAMELEN + 1];
struct mqfs_node *pn;
int error, len;
+ path = pathbuf;
error = copyinstr(uap->path, path, MQFS_NAMELEN + 1, NULL);
if (error)
return (error);
len = strlen(path);
- if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL)
+ if (len < 2 || strchr(path + 1, '/') != NULL)
return (EINVAL);
- if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0)
+ if (path[0] == '/') {
+ path++;
+ len--;
+ }
+ if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0)
return (EINVAL);
- AUDIT_ARG_UPATH1_CANON(path);
+ AUDIT_ARG_UPATH1_CANON(pathbuf);
sx_xlock(&mqfs_data.mi_lock);
- pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred);
+ pn = mqfs_search(mqfs_data.mi_root, path, len, td->td_ucred);
if (pn != NULL)
error = do_unlink(pn, td->td_ucred);
else
@@ -2209,7 +2223,7 @@ getmq_write(struct thread *td, int fd, struct file **fpp,
fpp, ppn, pmq);
}
-static int
+int
kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr,
struct mq_attr *oattr)
{
@@ -2261,61 +2275,80 @@ sys_kmq_setattr(struct thread *td, struct kmq_setattr_args *uap)
}
int
-sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap)
+kern_kmq_timedreceive(struct thread *td, int mqd, char *msg_ptr,
+ size_t msg_len, unsigned int *msg_prio, const struct timespec *abs_timeout)
{
struct mqueue *mq;
struct file *fp;
+ int error, waitok;
+
+ AUDIT_ARG_FD(mqd);
+ error = getmq_read(td, mqd, &fp, NULL, &mq);
+ if (error != 0)
+ return (error);
+ waitok = (fp->f_flag & O_NONBLOCK) == 0;
+ error = mqueue_receive(mq, msg_ptr, msg_len, msg_prio, waitok,
+ abs_timeout);
+ fdrop(fp, td);
+ return (error);
+}
+
+int
+sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap)
+{
struct timespec *abs_timeout, ets;
int error;
- int waitok;
- AUDIT_ARG_FD(uap->mqd);
- error = getmq_read(td, uap->mqd, &fp, NULL, &mq);
- if (error)
- return (error);
if (uap->abs_timeout != NULL) {
error = copyin(uap->abs_timeout, &ets, sizeof(ets));
if (error != 0)
- goto out;
+ return (error);
abs_timeout = &ets;
} else
abs_timeout = NULL;
- waitok = !(fp->f_flag & O_NONBLOCK);
- error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len,
- uap->msg_prio, waitok, abs_timeout);
-out:
- fdrop(fp, td);
- return (error);
+
+ return (kern_kmq_timedreceive(td, uap->mqd, uap->msg_ptr, uap->msg_len,
+ uap->msg_prio, abs_timeout));
}
int
-sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap)
+kern_kmq_timedsend(struct thread *td, int mqd, const char *msg_ptr,
+ size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout)
{
struct mqueue *mq;
struct file *fp;
- struct timespec *abs_timeout, ets;
int error, waitok;
- AUDIT_ARG_FD(uap->mqd);
- error = getmq_write(td, uap->mqd, &fp, NULL, &mq);
- if (error)
+ AUDIT_ARG_FD(mqd);
+ error = getmq_write(td, mqd, &fp, NULL, &mq);
+ if (error != 0)
return (error);
+ waitok = (fp->f_flag & O_NONBLOCK) == 0;
+ error = mqueue_send(mq, msg_ptr, msg_len, msg_prio, waitok,
+ abs_timeout);
+ fdrop(fp, td);
+ return (error);
+}
+
+int
+sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap)
+{
+ struct timespec *abs_timeout, ets;
+ int error;
+
if (uap->abs_timeout != NULL) {
error = copyin(uap->abs_timeout, &ets, sizeof(ets));
if (error != 0)
- goto out;
+ return (error);
abs_timeout = &ets;
} else
abs_timeout = NULL;
- waitok = !(fp->f_flag & O_NONBLOCK);
- error = mqueue_send(mq, uap->msg_ptr, uap->msg_len,
- uap->msg_prio, waitok, abs_timeout);
-out:
- fdrop(fp, td);
- return (error);
+
+ return (kern_kmq_timedsend(td, uap->mqd, uap->msg_ptr, uap->msg_len,
+ uap->msg_prio, abs_timeout));
}
-static int
+int
kern_kmq_notify(struct thread *td, int mqd, struct sigevent *sigev)
{
struct filedesc *fdp;
@@ -2787,63 +2820,44 @@ int
freebsd32_kmq_timedsend(struct thread *td,
struct freebsd32_kmq_timedsend_args *uap)
{
- struct mqueue *mq;
- struct file *fp;
struct timespec32 ets32;
struct timespec *abs_timeout, ets;
int error;
- int waitok;
- AUDIT_ARG_FD(uap->mqd);
- error = getmq_write(td, uap->mqd, &fp, NULL, &mq);
- if (error)
- return (error);
if (uap->abs_timeout != NULL) {
error = copyin(uap->abs_timeout, &ets32, sizeof(ets32));
if (error != 0)
- goto out;
+ return (error);
CP(ets32, ets, tv_sec);
CP(ets32, ets, tv_nsec);
abs_timeout = &ets;
} else
abs_timeout = NULL;
- waitok = !(fp->f_flag & O_NONBLOCK);
- error = mqueue_send(mq, uap->msg_ptr, uap->msg_len,
- uap->msg_prio, waitok, abs_timeout);
-out:
- fdrop(fp, td);
- return (error);
+
+ return (kern_kmq_timedsend(td, uap->mqd, uap->msg_ptr, uap->msg_len,
+ uap->msg_prio, abs_timeout));
}
int
freebsd32_kmq_timedreceive(struct thread *td,
struct freebsd32_kmq_timedreceive_args *uap)
{
- struct mqueue *mq;
- struct file *fp;
struct timespec32 ets32;
struct timespec *abs_timeout, ets;
- int error, waitok;
+ int error;
- AUDIT_ARG_FD(uap->mqd);
- error = getmq_read(td, uap->mqd, &fp, NULL, &mq);
- if (error)
- return (error);
if (uap->abs_timeout != NULL) {
error = copyin(uap->abs_timeout, &ets32, sizeof(ets32));
if (error != 0)
- goto out;
+ return (error);
CP(ets32, ets, tv_sec);
CP(ets32, ets, tv_nsec);
abs_timeout = &ets;
} else
abs_timeout = NULL;
- waitok = !(fp->f_flag & O_NONBLOCK);
- error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len,
- uap->msg_prio, waitok, abs_timeout);
-out:
- fdrop(fp, td);
- return (error);
+
+ return (kern_kmq_timedreceive(td, uap->mqd, uap->msg_ptr, uap->msg_len,
+ uap->msg_prio, abs_timeout));
}
int
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c
index 1136f34a6f85..c83455d1e70b 100644
--- a/sys/kern/uipc_shm.c
+++ b/sys/kern/uipc_shm.c
@@ -1910,21 +1910,19 @@ shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list)
kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode;
kif->kf_un.kf_file.kf_file_size = shmfd->shm_size;
if (shmfd->shm_path != NULL) {
- if (shmfd->shm_path != NULL) {
- path = shmfd->shm_path;
- pr_path = curthread->td_ucred->cr_prison->pr_path;
- if (strcmp(pr_path, "/") != 0) {
- /* Return the jail-rooted pathname. */
- pr_pathlen = strlen(pr_path);
- visible = strncmp(path, pr_path, pr_pathlen)
- == 0 && path[pr_pathlen] == '/';
- if (list && !visible)
- return (EPERM);
- if (visible)
- path += pr_pathlen;
- }
- strlcpy(kif->kf_path, path, sizeof(kif->kf_path));
+ path = shmfd->shm_path;
+ pr_path = curthread->td_ucred->cr_prison->pr_path;
+ if (strcmp(pr_path, "/") != 0) {
+ /* Return the jail-rooted pathname. */
+ pr_pathlen = strlen(pr_path);
+ visible = strncmp(path, pr_path, pr_pathlen) == 0 &&
+ path[pr_pathlen] == '/';
+ if (list && !visible)
+ return (EPERM);
+ if (visible)
+ path += pr_pathlen;
}
+ strlcpy(kif->kf_path, path, sizeof(kif->kf_path));
}
return (0);
}
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index f0b36fc5595e..f0d22b3887a4 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -173,7 +173,6 @@ static int filt_soread(struct knote *kn, long hint);
static void filt_sowdetach(struct knote *kn);
static int filt_sowrite(struct knote *kn, long hint);
static int filt_soempty(struct knote *kn, long hint);
-static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t h_id);
fo_kqfilter_t soo_kqfilter;
static struct filterops soread_filtops = {
@@ -201,8 +200,11 @@ MALLOC_DEFINE(M_PCB, "pcb", "protocol control block");
VNET_ASSERT(curvnet != NULL, \
("%s:%d curvnet is NULL, so=%p", __func__, __LINE__, (so)));
+#ifdef SOCKET_HHOOK
VNET_DEFINE(struct hhook_head *, socket_hhh[HHOOK_SOCKET_LAST + 1]);
#define V_socket_hhh VNET(socket_hhh)
+static inline int hhook_run_socket(struct socket *, void *, int32_t);
+#endif
/*
* Limit on the number of connections in the listen queue waiting
@@ -277,6 +279,20 @@ socket_zone_change(void *tag)
}
static void
+socket_init(void *tag)
+{
+
+ socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
+ NULL, NULL, UMA_ALIGN_PTR, 0);
+ maxsockets = uma_zone_set_max(socket_zone, maxsockets);
+ uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached");
+ EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
+ EVENTHANDLER_PRI_FIRST);
+}
+SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL);
+
+#ifdef SOCKET_HHOOK
+static void
socket_hhook_register(int subtype)
{
@@ -295,19 +311,6 @@ socket_hhook_deregister(int subtype)
}
static void
-socket_init(void *tag)
-{
-
- socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
- NULL, NULL, UMA_ALIGN_PTR, 0);
- maxsockets = uma_zone_set_max(socket_zone, maxsockets);
- uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached");
- EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
- EVENTHANDLER_PRI_FIRST);
-}
-SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL);
-
-static void
socket_vnet_init(const void *unused __unused)
{
int i;
@@ -329,6 +332,7 @@ socket_vnet_uninit(const void *unused __unused)
}
VNET_SYSUNINIT(socket_vnet_uninit, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY,
socket_vnet_uninit, NULL);
+#endif /* SOCKET_HHOOK */
/*
* Initialise maxsockets. This SYSINIT must be run after
@@ -423,12 +427,14 @@ soalloc(struct vnet *vnet)
__func__, __LINE__, so));
so->so_vnet = vnet;
#endif
+#ifdef SOCKET_HHOOK
/* We shouldn't need the so_global_mtx */
if (hhook_run_socket(so, NULL, HHOOK_SOCKET_CREATE)) {
/* Do we need more comprehensive error returns? */
uma_zfree(socket_zone, so);
return (NULL);
}
+#endif
mtx_lock(&so_global_mtx);
so->so_gencnt = ++so_gencnt;
++numopensockets;
@@ -464,7 +470,9 @@ sodealloc(struct socket *so)
#ifdef MAC
mac_socket_destroy(so);
#endif
+#ifdef SOCKET_HHOOK
hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE);
+#endif
khelp_destroy_osd(&so->osd);
if (SOLISTENING(so)) {
@@ -773,6 +781,7 @@ solisten_clone(struct socket *head)
so->so_fibnum = head->so_fibnum;
so->so_proto = head->so_proto;
so->so_cred = crhold(head->so_cred);
+#ifdef SOCKET_HHOOK
if (V_socket_hhh[HHOOK_SOCKET_NEWCONN]->hhh_nhooks > 0) {
if (hhook_run_socket(so, head, HHOOK_SOCKET_NEWCONN)) {
sodealloc(so);
@@ -780,6 +789,7 @@ solisten_clone(struct socket *head)
return (NULL);
}
}
+#endif
#ifdef MAC
mac_socket_newconn(head, so);
#endif
@@ -3019,11 +3029,12 @@ sorflush(struct socket *so)
}
+#ifdef SOCKET_HHOOK
/*
* Wrapper for Socket established helper hook.
* Parameters: socket, context of the hook point, hook id.
*/
-static int inline
+static inline int
hhook_run_socket(struct socket *so, void *hctx, int32_t h_id)
{
struct socket_hhook_data hhook_data = {
@@ -3040,6 +3051,7 @@ hhook_run_socket(struct socket *so, void *hctx, int32_t h_id)
/* Ugly but needed, since hhooks return void for now */
return (hhook_data.status);
}
+#endif
/*
* Perhaps this routine, and sooptcopyout(), below, ought to come in an
@@ -3268,10 +3280,12 @@ sosetopt(struct socket *so, struct sockopt *sopt)
break;
default:
+#ifdef SOCKET_HHOOK
if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0)
error = hhook_run_socket(so, sopt,
HHOOK_SOCKET_OPT);
else
+#endif
error = ENOPROTOOPT;
break;
}
@@ -3485,10 +3499,12 @@ integer:
goto integer;
default:
+#ifdef SOCKET_HHOOK
if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0)
error = hhook_run_socket(so, sopt,
HHOOK_SOCKET_OPT);
else
+#endif
error = ENOPROTOOPT;
break;
}
@@ -3785,8 +3801,12 @@ filt_soread(struct knote *kn, long hint)
} else if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat)
return (1);
+#ifdef SOCKET_HHOOK
/* This hook returning non-zero indicates an event, not error */
return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD));
+#else
+ return (0);
+#endif
}
static void
@@ -3815,7 +3835,9 @@ filt_sowrite(struct knote *kn, long hint)
SOCK_SENDBUF_LOCK_ASSERT(so);
kn->kn_data = sbspace(&so->so_snd);
+#ifdef SOCKET_HHOOK
hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE);
+#endif
if (so->so_snd.sb_state & SBS_CANTSENDMORE) {
kn->kn_flags |= EV_EOF;
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b5466fb2cd53..01057072d991 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -4010,8 +4010,23 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag,
error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL, "getblku", 0,
0);
- if (error != 0)
+ if (error != 0) {
+ KASSERT(error == EBUSY,
+ ("getblk: unexpected error %d from buf try-lock", error));
+ /*
+ * We failed a buf try-lock.
+ *
+ * With GB_LOCK_NOWAIT, just return, rather than taking the
+ * bufobj interlock and trying again, since we would probably
+ * fail again anyway. This is okay even if the buf's identity
+ * changed and we contended on the wrong lock, as changing
+ * identity itself requires the buf lock, and we could have
+ * contended on the right lock.
+ */
+ if ((flags & GB_LOCK_NOWAIT) != 0)
+ return (error);
goto loop;
+ }
/* Verify buf identify has not changed since lookup. */
if (bp->b_bufobj == bo && bp->b_lblkno == blkno)
@@ -4020,6 +4035,10 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag,
/* It changed, fallback to locked lookup. */
BUF_UNLOCK_RAW(bp);
+ /* As above, with GB_LOCK_NOWAIT, just return. */
+ if ((flags & GB_LOCK_NOWAIT) != 0)
+ return (EBUSY);
+
loop:
BO_RLOCK(bo);
bp = gbincore(bo, blkno);
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 2b235d398332..f5ff8d54fadd 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1313,7 +1313,7 @@ vfs_domount_update(
void *bufp;
struct mount *mp;
int error, export_error, i, len, fsid_up_len;
- uint64_t flag;
+ uint64_t flag, mnt_union;
gid_t *grps;
fsid_t *fsid_up;
bool vfs_suser_failed;
@@ -1395,6 +1395,7 @@ vfs_domount_update(
vfs_deleteopt(*optlist, "fsid");
}
+ mnt_union = 0;
MNT_ILOCK(mp);
if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) {
MNT_IUNLOCK(mp);
@@ -1416,6 +1417,11 @@ vfs_domount_update(
mp->mnt_flag |= MNT_UPDATE;
} else {
mp->mnt_flag &= ~MNT_UPDATEMASK;
+ if ((mp->mnt_flag & MNT_UNION) == 0 &&
+ (fsflags & MNT_UNION) != 0) {
+ fsflags &= ~MNT_UNION;
+ mnt_union = MNT_UNION;
+ }
mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE |
MNT_SNAPSHOT | MNT_ROOTFS | MNT_UPDATEMASK | MNT_RDONLY);
if ((mp->mnt_flag & MNT_ASYNC) == 0)
@@ -1517,8 +1523,9 @@ vfs_domount_update(
MNT_ILOCK(mp);
if (error == 0) {
- mp->mnt_flag &= ~(MNT_UPDATE | MNT_RELOAD | MNT_FORCE |
+ mp->mnt_flag &= ~(MNT_UPDATE | MNT_RELOAD | MNT_FORCE |
MNT_SNAPSHOT);
+ mp->mnt_flag |= mnt_union;
} else {
/*
* If we fail, restore old mount flags. MNT_QUOTA is special,
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 0e864f959e36..aff3947f91cd 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1259,12 +1259,15 @@ vn_io_fault_doio(struct vn_io_fault_args *args, struct uio *uio,
uio, args->cred, args->flags, td);
break;
case VN_IO_FAULT_VOP:
- if (uio->uio_rw == UIO_READ) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = VOP_READ(args->args.vop_args.vp, uio,
args->flags, args->cred);
- } else if (uio->uio_rw == UIO_WRITE) {
+ break;
+ case UIO_WRITE:
error = VOP_WRITE(args->args.vop_args.vp, uio,
args->flags, args->cred);
+ break;
}
break;
default:
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 8af12fc02860..54108097fe1d 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -219,12 +219,14 @@ SUBDIR= \
lindebugfs \
linuxkpi \
linuxkpi_hdmi \
+ linuxkpi_video \
linuxkpi_wlan \
${_lio} \
lpt \
${_mac_biba} \
${_mac_bsdextended} \
${_mac_ddb} \
+ ${_mac_do} \
${_mac_ifoff} \
${_mac_ipacl} \
${_mac_lomac} \
@@ -295,6 +297,7 @@ SUBDIR= \
nvd \
${_nvdimm} \
nvme \
+ nvmf \
${_nvram} \
oce \
${_ocs_fc} \
@@ -389,7 +392,7 @@ SUBDIR= \
${_ti} \
tmpfs \
${_toecore} \
- ${_tpm} \
+ tpm \
tws \
uart \
udf \
@@ -487,7 +490,7 @@ _sctp= sctp
_if_stf= if_stf
.endif
-.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
+.if (${KERN_OPTS:MINET} && ${MK_INET_SUPPORT} != "no") || defined(ALL_MODULES)
_if_me= if_me
_ipfw= ipfw
.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
@@ -503,7 +506,7 @@ _ipfw_nptv6= ipfw_nptv6
_ipfilter= ipfilter
.endif
-.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO}
+.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO} && ${KERN_OPTS:MINET}
_dpdk_lpm4= dpdk_lpm4
_fib_dxr= fib_dxr
.endif
@@ -585,6 +588,7 @@ _mac_bsdextended= mac_bsdextended
.if ${KERN_OPTS:MDDB} || defined(ALL_MODULES)
_mac_ddb= mac_ddb
.endif
+_mac_do= mac_do
_mac_ifoff= mac_ifoff
_mac_ipacl= mac_ipacl
_mac_lomac= mac_lomac
@@ -812,7 +816,6 @@ _pchtherm = pchtherm
_s3= s3
_sdhci_acpi= sdhci_acpi
_superio= superio
-_tpm= tpm
_vesa= vesa
_viawd= viawd
_vmd= vmd
diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile
index 8fc4c68feebb..1ced6c050397 100644
--- a/sys/modules/aic7xxx/ahc/Makefile
+++ b/sys/modules/aic7xxx/ahc/Makefile
@@ -28,7 +28,7 @@ ${GENSRCS}: \
-I${SYSDIR}/dev/aic7xxx \
-o aic7xxx_seq.h -r aic7xxx_reg.h \
${REG_PRINT_OPT} \
- -i ${SYSDIR}/dev/aic7xxx/aic7xxx_osm.h \
+ -i "<dev/aic7xxx/aic7xxx_osm.h>" \
${SYSDIR}/dev/aic7xxx/aic7xxx.seq
.elif defined(.MAKE.LEVEL)
# This target interfers with fmake's world view and causes this message
diff --git a/sys/modules/aic7xxx/ahd/Makefile b/sys/modules/aic7xxx/ahd/Makefile
index 2fff21f332e9..cf68651e792c 100644
--- a/sys/modules/aic7xxx/ahd/Makefile
+++ b/sys/modules/aic7xxx/ahd/Makefile
@@ -17,11 +17,11 @@ ahdfirmware: ${GENSRCS}
${GENSRCS}: \
${SRCTOP}/sys/dev/aic7xxx/aic79xx.{reg,seq} \
${SRCTOP}/sys/cam/scsi/scsi_message.h
- aicasm ${INCLUDES} -I${SRCTOP}/sys/cam/scsi \
+ ../aicasm/aicasm ${INCLUDES} -I${SRCTOP}/sys/cam/scsi \
-I${SRCTOP}/sys/dev/aic7xxx \
-o aic79xx_seq.h -r aic79xx_reg.h \
${REG_PRINT_OPT} \
- -i ${SRCTOP}/sys/dev/aic7xxx/aic79xx_osm.h \
+ -i "<dev/aic7xxx/aic79xx_osm.h>" \
${SRCTOP}/sys/dev/aic7xxx/aic79xx.seq
.else
${GENSRCS}: .NOMETA
diff --git a/sys/modules/ctl/Makefile b/sys/modules/ctl/Makefile
index 960cd60bfa9a..9fb94ddc9bca 100644
--- a/sys/modules/ctl/Makefile
+++ b/sys/modules/ctl/Makefile
@@ -12,6 +12,8 @@ SRCS+= ctl_frontend.c
SRCS+= ctl_frontend_cam_sim.c
SRCS+= ctl_frontend_ioctl.c
SRCS+= ctl_ha.c
+SRCS+= ctl_nvme_all.c
+SRCS+= ctl_nvme_cmd_table.c
SRCS+= ctl_scsi_all.c
SRCS+= ctl_tpc.c
SRCS+= ctl_tpc_local.c
diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile
index 70d8269f7b3f..ac015c4e7f7b 100644
--- a/sys/modules/dtb/rockchip/Makefile
+++ b/sys/modules/dtb/rockchip/Makefile
@@ -12,6 +12,7 @@ DTS= \
rockchip/rk3399-nanopc-t4.dts \
rockchip/rk3328-nanopi-r2s.dts \
rockchip/rk3399-nanopi-r4s.dts \
+ rockchip/rk3399-rock-4c-plus.dts \
rockchip/rk3399-rock-pi-4.dts \
rockchip/rk3328-rock-pi-e.dts \
rockchip/rk3328-rock64.dts \
diff --git a/sys/modules/geom/Makefile b/sys/modules/geom/Makefile
index 48f225d0a33e..24be5b1b82d7 100644
--- a/sys/modules/geom/Makefile
+++ b/sys/modules/geom/Makefile
@@ -2,8 +2,7 @@
SYSDIR?=${SRCTOP}/sys
.include "${SYSDIR}/conf/kern.opts.mk"
-SUBDIR= geom_bde \
- geom_cache \
+SUBDIR= geom_cache \
geom_concat \
geom_eli \
geom_flashmap \
diff --git a/sys/modules/geom/geom_bde/Makefile b/sys/modules/geom/geom_bde/Makefile
deleted file mode 100644
index 808775a79743..000000000000
--- a/sys/modules/geom/geom_bde/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-
-.PATH: ${SRCTOP}/sys/geom/bde
-.PATH: ${SRCTOP}/sys/crypto/rijndael
-.PATH: ${SRCTOP}/sys/crypto/sha2
-
-KMOD= geom_bde
-SRCS= g_bde.c g_bde_crypt.c g_bde_lock.c g_bde_work.c
-SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha256c.c sha512c.c
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/geom/geom_label/Makefile b/sys/modules/geom/geom_label/Makefile
index 19e0ee446fa1..37ee312f849e 100644
--- a/sys/modules/geom/geom_label/Makefile
+++ b/sys/modules/geom/geom_label/Makefile
@@ -11,6 +11,7 @@ SRCS+= g_label_iso9660.c
SRCS+= g_label_msdosfs.c
SRCS+= g_label_ntfs.c
SRCS+= g_label_ufs.c
+SRCS+= g_label_swaplinux.c
SRCS+= opt_geom.h
SRCS+= vnode_if.h
diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile
index 7329f0897325..e0ef344a8283 100644
--- a/sys/modules/ice_ddp/Makefile
+++ b/sys/modules/ice_ddp/Makefile
@@ -1,5 +1,7 @@
+.PATH: ${SRCTOP}/sys/contrib/dev/ice
+
KMOD= ice_ddp
-FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.36.0.pkg:ice_ddp:0x01032400
+FIRMWS= ice-1.3.36.0.pkg:ice_ddp:0x01032400
.include <bsd.kmod.mk>
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index 8c720f8f9e65..37ba17e09e9d 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -34,9 +34,11 @@ SRCS= linux${SFX}_dummy_machdep.c \
linux_uid16.c \
linux_vdso.c \
linux_xattr.c \
+ opt_inet.h \
opt_inet6.h \
opt_ktrace.h \
opt_posix.h \
+ opt_usb.h \
bus_if.h \
device_if.h \
vnode_if.h
diff --git a/sys/modules/linuxkpi_hdmi/Makefile b/sys/modules/linuxkpi_hdmi/Makefile
index ef843c726dac..dc19c0afeebc 100644
--- a/sys/modules/linuxkpi_hdmi/Makefile
+++ b/sys/modules/linuxkpi_hdmi/Makefile
@@ -2,6 +2,7 @@
KMOD= linuxkpi_hdmi
SRCS= linux_hdmi.c \
+ linuxkpi_hdmikmod.c
SRCS+= ${LINUXKPI_GENSRCS}
diff --git a/sys/modules/linuxkpi_video/Makefile b/sys/modules/linuxkpi_video/Makefile
new file mode 100644
index 000000000000..a9562eaf4735
--- /dev/null
+++ b/sys/modules/linuxkpi_video/Makefile
@@ -0,0 +1,15 @@
+.PATH: ${SRCTOP}/sys/compat/linuxkpi/common/src
+
+KMOD= linuxkpi_video
+SRCS= linux_hdmi.c \
+ linux_aperture.c \
+ linuxkpi_videokmod.c
+
+SRCS+= ${LINUXKPI_GENSRCS}
+
+CFLAGS+= ${LINUXKPI_INCLUDES}
+CFLAGS.linux_hdmi.c= -Wno-cast-qual
+
+EXPORT_SYMS= YES
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/mac_do/Makefile b/sys/modules/mac_do/Makefile
new file mode 100644
index 000000000000..532a5b9faa71
--- /dev/null
+++ b/sys/modules/mac_do/Makefile
@@ -0,0 +1,6 @@
+.PATH: ${SRCTOP}/sys/security/mac_do
+
+KMOD= mac_do
+SRCS= mac_do.c vnode_if.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/nvmf/Makefile b/sys/modules/nvmf/Makefile
new file mode 100644
index 000000000000..88ea40be1257
--- /dev/null
+++ b/sys/modules/nvmf/Makefile
@@ -0,0 +1,6 @@
+SUBDIR= nvmf \
+ nvmf_tcp \
+ nvmf_transport \
+ nvmft
+
+.include <bsd.subdir.mk>
diff --git a/sys/modules/nvmf/nvmf/Makefile b/sys/modules/nvmf/nvmf/Makefile
new file mode 100644
index 000000000000..7ebe614998bd
--- /dev/null
+++ b/sys/modules/nvmf/nvmf/Makefile
@@ -0,0 +1,13 @@
+.PATH: ${SRCTOP}/sys/dev/nvmf/host
+
+KMOD= nvmf
+
+SRCS= nvmf.c \
+ nvmf_aer.c \
+ nvmf_cmd.c \
+ nvmf_ctldev.c \
+ nvmf_ns.c \
+ nvmf_qpair.c \
+ nvmf_sim.c
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/nvmf/nvmf_tcp/Makefile b/sys/modules/nvmf/nvmf_tcp/Makefile
new file mode 100644
index 000000000000..51d3e17276f4
--- /dev/null
+++ b/sys/modules/nvmf/nvmf_tcp/Makefile
@@ -0,0 +1,7 @@
+.PATH: ${SRCTOP}/sys/dev/nvmf
+
+KMOD= nvmf_tcp
+
+SRCS= nvmf_tcp.c
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/nvmf/nvmf_transport/Makefile b/sys/modules/nvmf/nvmf_transport/Makefile
new file mode 100644
index 000000000000..f0edfac5ac35
--- /dev/null
+++ b/sys/modules/nvmf/nvmf_transport/Makefile
@@ -0,0 +1,9 @@
+.PATH: ${SRCTOP}/sys/dev/nvmf
+
+KMOD= nvmf_transport
+
+SRCS= nvmf_transport.c
+
+EXPORT_SYMS= YES
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/nvmf/nvmft/Makefile b/sys/modules/nvmf/nvmft/Makefile
new file mode 100644
index 000000000000..b47ffa53c310
--- /dev/null
+++ b/sys/modules/nvmf/nvmft/Makefile
@@ -0,0 +1,10 @@
+.PATH: ${SRCTOP}/sys/dev/nvmf/controller
+
+KMOD= nvmft
+
+SRCS= ctl_frontend_nvmf.c \
+ nvmft_controller.c \
+ nvmft_subr.c \
+ nvmft_qpair.c
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/qatfw/qat_200xx/Makefile b/sys/modules/qatfw/qat_200xx/Makefile
index ce80b75f78fd..97ec5080f1c8 100644
--- a/sys/modules/qatfw/qat_200xx/Makefile
+++ b/sys/modules/qatfw/qat_200xx/Makefile
@@ -4,6 +4,6 @@
KMOD= qat_200xx_fw
-FIRMWS= ${SRCTOP}/sys/contrib/dev/qat/qat_200xx.bin:qat_200xx_fw:111 ${SRCTOP}/sys/contrib/dev/qat/qat_200xx_mmp.bin:qat_200xx_mmp_fw:111
+FIRMWS= qat_200xx.bin:qat_200xx_fw:111 qat_200xx_mmp.bin:qat_200xx_mmp_fw:111
.include <bsd.kmod.mk>
diff --git a/sys/modules/qatfw/qat_4xxx/Makefile b/sys/modules/qatfw/qat_4xxx/Makefile
index e4d3ed495f8a..fb7171bcaf45 100644
--- a/sys/modules/qatfw/qat_4xxx/Makefile
+++ b/sys/modules/qatfw/qat_4xxx/Makefile
@@ -4,6 +4,6 @@
KMOD= qat_4xxx_fw
-FIRMWS= ${SRCTOP}/sys/contrib/dev/qat/qat_4xxx.bin:qat_4xxx_fw:111 ${SRCTOP}/sys/contrib/dev/qat/qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111
+FIRMWS= qat_4xxx.bin:qat_4xxx_fw:111 qat_4xxx_mmp.bin:qat_4xxx_mmp_fw:111
.include <bsd.kmod.mk>
diff --git a/sys/modules/qatfw/qat_c3xxx/Makefile b/sys/modules/qatfw/qat_c3xxx/Makefile
index e0759fe3a99b..e5c8c0741fa2 100644
--- a/sys/modules/qatfw/qat_c3xxx/Makefile
+++ b/sys/modules/qatfw/qat_c3xxx/Makefile
@@ -4,6 +4,6 @@
KMOD= qat_c3xxx_fw
-FIRMWS= ${SRCTOP}/sys/contrib/dev/qat/qat_c3xxx.bin:qat_c3xxx_fw:111 ${SRCTOP}/sys/contrib/dev/qat/qat_c3xxx_mmp.bin:qat_c3xxx_mmp_fw:111
+FIRMWS= qat_c3xxx.bin:qat_c3xxx_fw:111 qat_c3xxx_mmp.bin:qat_c3xxx_mmp_fw:111
.include <bsd.kmod.mk>
diff --git a/sys/modules/qatfw/qat_c4xxx/Makefile b/sys/modules/qatfw/qat_c4xxx/Makefile
index 7e859dcbd989..8b4e0cda6746 100644
--- a/sys/modules/qatfw/qat_c4xxx/Makefile
+++ b/sys/modules/qatfw/qat_c4xxx/Makefile
@@ -4,6 +4,6 @@
KMOD= qat_c4xxx_fw
-FIRMWS= ${SRCTOP}/sys/contrib/dev/qat/qat_c4xxx.bin:qat_c4xxx_fw:111 ${SRCTOP}/sys/contrib/dev/qat/qat_c4xxx_mmp.bin:qat_c4xxx_mmp_fw:111
+FIRMWS= qat_c4xxx.bin:qat_c4xxx_fw:111 qat_c4xxx_mmp.bin:qat_c4xxx_mmp_fw:111
.include <bsd.kmod.mk>
diff --git a/sys/modules/qatfw/qat_c62x/Makefile b/sys/modules/qatfw/qat_c62x/Makefile
index ac1636b81e56..0385653bc7ff 100644
--- a/sys/modules/qatfw/qat_c62x/Makefile
+++ b/sys/modules/qatfw/qat_c62x/Makefile
@@ -4,6 +4,6 @@
KMOD= qat_c62x_fw
-FIRMWS= ${SRCTOP}/sys/contrib/dev/qat/qat_c62x.bin:qat_c62x_fw:111 ${SRCTOP}/sys/contrib/dev/qat/qat_c62x_mmp.bin:qat_c62x_mmp_fw:111
+FIRMWS= qat_c62x.bin:qat_c62x_fw:111 qat_c62x_mmp.bin:qat_c62x_mmp_fw:111
.include <bsd.kmod.mk>
diff --git a/sys/modules/qatfw/qat_dh895xcc/Makefile b/sys/modules/qatfw/qat_dh895xcc/Makefile
index 7a377c088081..d277e3dc02f7 100644
--- a/sys/modules/qatfw/qat_dh895xcc/Makefile
+++ b/sys/modules/qatfw/qat_dh895xcc/Makefile
@@ -4,6 +4,6 @@
KMOD= qat_dh895xcc_fw
-FIRMWS= ${SRCTOP}/sys/contrib/dev/qat/qat_895xcc.bin:qat_dh895xcc_fw:111 ${SRCTOP}/sys/contrib/dev/qat/qat_895xcc_mmp.bin:qat_dh895xcc_mmp_fw:111
+FIRMWS= qat_895xcc.bin:qat_dh895xcc_fw:111 qat_895xcc_mmp.bin:qat_dh895xcc_mmp_fw:111
.include <bsd.kmod.mk>
diff --git a/sys/modules/sound/driver/Makefile b/sys/modules/sound/driver/Makefile
index af5e3259aa00..2391d1c5a8a4 100644
--- a/sys/modules/sound/driver/Makefile
+++ b/sys/modules/sound/driver/Makefile
@@ -6,7 +6,7 @@ SYSDIR?=${SRCTOP}/sys
# MK_SOURCELESS_UCODE option (see below).
SUBDIR= als4000 atiixp cs4281 ${_csa} emu10k1 emu10kx
-SUBDIR+= envy24 envy24ht es137x fm801 hda hdspe ich
+SUBDIR+= envy24 envy24ht es137x fm801 hda hdsp hdspe ich
SUBDIR+= ${_maestro3} neomagic solo spicds t4dwave via8233
SUBDIR+= via82c686 vibes driver uaudio
diff --git a/sys/modules/sound/driver/hdsp/Makefile b/sys/modules/sound/driver/hdsp/Makefile
new file mode 100644
index 000000000000..d91341fafde8
--- /dev/null
+++ b/sys/modules/sound/driver/hdsp/Makefile
@@ -0,0 +1,7 @@
+.PATH: ${SRCTOP}/sys/dev/sound/pci
+
+KMOD= snd_hdsp
+SRCS= device_if.h bus_if.h pci_if.h
+SRCS+= hdsp.c hdsp-pcm.c hdsp.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile
index 833330ef9b26..1c3685715503 100644
--- a/sys/modules/sound/sound/Makefile
+++ b/sys/modules/sound/sound/Makefile
@@ -17,7 +17,7 @@ SRCS+= feeder_eq_gen.h feeder_rate_gen.h snd_fxdiv_gen.h
SRCS+= mpu_if.h mpufoi_if.h synth_if.h
SRCS+= mpu_if.c mpufoi_if.c synth_if.c
SRCS+= ac97.c ac97_patch.c buffer.c channel.c dsp.c
-SRCS+= mixer.c sndstat.c sound.c unit.c vchan.c
+SRCS+= mixer.c sndstat.c sound.c vchan.c
SRCS+= midi.c mpu401.c sequencer.c
feeder_eq_gen.h: ${SYSDIR}/tools/sound/feeder_eq_mkfilter.awk
diff --git a/sys/modules/tpm/Makefile b/sys/modules/tpm/Makefile
index 5c43f9a28209..c859e010b2d9 100644
--- a/sys/modules/tpm/Makefile
+++ b/sys/modules/tpm/Makefile
@@ -3,10 +3,26 @@
KMOD= tpm
-SRCS= tpm.c bus_if.h device_if.h
+SRCS= bus_if.h device_if.h tpm_if.c tpm_if.h
+SRCS+= opt_acpi.h opt_tpm.h
+
#Bus specific stuff.
-SRCS+= tpm_isa.c tpm_acpi.c isa_if.h opt_acpi.h acpi_if.h
+.if ${MACHINE_ARCH:Namd64:Ni386} == ""
+SRCS+= tpm.c
+SRCS+= tpm_acpi.c tpm_isa.c
+SRCS+= isa_if.h
+.endif
+
#TPM 2.0
-SRCS+= tpm20.c tpm_crb.c tpm_tis.c opt_tpm.h
+SRCS+= tpm20.c tpm_tis_core.c
+.if defined(${OPT_FDT})
+SRCS+= tpm_spibus.c tpm_tis_spibus.c spibus_if.h
+.endif
+.if ${MACHINE_ARCH:Namd64:Ni386:Narm64} == ""
+SRCS+= acpi_if.h
+SRCS+= tpm_tis_acpi.c
+SRCS+= tpm_crb.c
+SRCS+= tpm_bus.c
+.endif
.include <bsd.kmod.mk>
diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h
index 6e1f5de7cf9e..4d6786e92d22 100644
--- a/sys/modules/zfs/zfs_config.h
+++ b/sys/modules/zfs/zfs_config.h
@@ -418,6 +418,9 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
/* #undef HAVE_GETTEXT */
+/* Define to 1 if you have the 'gettid' function. */
+/* #undef HAVE_GETTID */
+
/* iops->get_acl() exists */
/* #undef HAVE_GET_ACL */
@@ -655,6 +658,12 @@
/* Define if you have [udev] */
/* #undef HAVE_LIBUDEV */
+/* Define if you have [unwind] */
+/* #undef HAVE_LIBUNWIND */
+
+/* libunwind has unw_get_elf_filename */
+/* #undef HAVE_LIBUNWIND_ELF */
+
/* Define if you have [uuid] */
/* #undef HAVE_LIBUUID */
@@ -1179,7 +1188,7 @@
/* #undef ZFS_IS_GPL_COMPATIBLE */
/* Define the project alias string. */
-#define ZFS_META_ALIAS "zfs-2.2.99-456-FreeBSD_g1f940de07"
+#define ZFS_META_ALIAS "zfs-2.2.99-474-FreeBSD_g8f1b7a6fa"
/* Define the project author. */
#define ZFS_META_AUTHOR "OpenZFS"
@@ -1209,7 +1218,7 @@
#define ZFS_META_NAME "zfs"
/* Define the project release. */
-#define ZFS_META_RELEASE "456-FreeBSD_g1f940de07"
+#define ZFS_META_RELEASE "474-FreeBSD_g8f1b7a6fa"
/* Define the project version. */
#define ZFS_META_VERSION "2.2.99"
diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h
index e0d3575a6230..7bdd4299c8fa 100644
--- a/sys/modules/zfs/zfs_gitrev.h
+++ b/sys/modules/zfs/zfs_gitrev.h
@@ -1 +1 @@
-#define ZFS_META_GITREV "zfs-2.2.99-456-g1f940de07"
+#define ZFS_META_GITREV "zfs-2.2.99-474-g8f1b7a6fa"
diff --git a/sys/net/if.c b/sys/net/if.c
index 9f44223af0dd..c3c27fbf678f 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4871,6 +4871,9 @@ if_resolvemulti(if_t ifp, struct sockaddr **srcs, struct sockaddr *dst)
int
if_ioctl(if_t ifp, u_long cmd, void *data)
{
+ if (ifp->if_ioctl == NULL)
+ return (EOPNOTSUPP);
+
return (ifp->if_ioctl(ifp, cmd, data));
}
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index 554d8c2c1bcb..bb882ac819ad 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -137,6 +137,7 @@ static void lagg_port_ifdetach(void *arg __unused, struct ifnet *);
static int lagg_port_checkstacking(struct lagg_softc *);
#endif
static void lagg_port2req(struct lagg_port *, struct lagg_reqport *);
+static void lagg_if_updown(struct lagg_softc *, bool);
static void lagg_init(void *);
static void lagg_stop(struct lagg_softc *);
static int lagg_ioctl(struct ifnet *, u_long, caddr_t);
@@ -1014,7 +1015,6 @@ lagg_port_destroy(struct lagg_port *lp, int rundelport)
static int
lagg_port_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
- struct epoch_tracker et;
struct lagg_reqport *rp = (struct lagg_reqport *)data;
struct lagg_softc *sc;
struct lagg_port *lp = NULL;
@@ -1039,17 +1039,13 @@ lagg_port_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
- NET_EPOCH_ENTER(et);
- if ((lp = ifp->if_lagg) == NULL || lp->lp_softc != sc) {
- error = ENOENT;
- NET_EPOCH_EXIT(et);
- break;
- }
-
LAGG_SLOCK(sc);
- lagg_port2req(lp, rp);
+ if (__predict_true((lp = ifp->if_lagg) != NULL &&
+ lp->lp_softc == sc))
+ lagg_port2req(lp, rp);
+ else
+ error = ENOENT; /* XXXGL: can happen? */
LAGG_SUNLOCK(sc);
- NET_EPOCH_EXIT(et);
break;
case SIOCSIFCAP:
@@ -1266,6 +1262,25 @@ lagg_watchdog_infiniband(void *arg)
}
static void
+lagg_if_updown(struct lagg_softc *sc, bool up)
+{
+ struct ifreq ifr = {};
+ struct lagg_port *lp;
+
+ LAGG_XLOCK_ASSERT(sc);
+
+ CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) {
+ if (up)
+ if_up(lp->lp_ifp);
+ else
+ if_down(lp->lp_ifp);
+
+ if (lp->lp_ioctl != NULL)
+ lp->lp_ioctl(lp->lp_ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
+ }
+}
+
+static void
lagg_init(void *xsc)
{
struct lagg_softc *sc = (struct lagg_softc *)xsc;
@@ -1291,6 +1306,8 @@ lagg_init(void *xsc)
if_setlladdr(lp->lp_ifp, IF_LLADDR(ifp), ifp->if_addrlen);
}
+ lagg_if_updown(sc, true);
+
lagg_proto_init(sc);
if (ifp->if_type == IFT_INFINIBAND) {
@@ -1320,13 +1337,14 @@ lagg_stop(struct lagg_softc *sc)
callout_stop(&sc->sc_watchdog);
mtx_unlock(&sc->sc_mtx);
+ lagg_if_updown(sc, false);
+
callout_drain(&sc->sc_watchdog);
}
static int
lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
- struct epoch_tracker et;
struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc;
struct lagg_reqall *ra = (struct lagg_reqall *)data;
struct lagg_reqopts *ro = (struct lagg_reqopts *)data;
@@ -1576,21 +1594,16 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
- NET_EPOCH_ENTER(et);
- if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL ||
- lp->lp_softc != sc) {
- error = ENOENT;
- NET_EPOCH_EXIT(et);
- if_rele(tpif);
- break;
- }
-
LAGG_SLOCK(sc);
- lagg_port2req(lp, rp);
+ if (__predict_true((lp = tpif->if_lagg) != NULL &&
+ lp->lp_softc == sc))
+ lagg_port2req(lp, rp);
+ else
+ error = ENOENT; /* XXXGL: can happen? */
LAGG_SUNLOCK(sc);
- NET_EPOCH_EXIT(et);
if_rele(tpif);
break;
+
case SIOCSLAGGPORT:
error = priv_check(td, PRIV_NET_LAGG);
if (error)
diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
index fb9596069101..f6f640a65f61 100644
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -255,6 +255,7 @@ static const char ovpnname[] = "ovpn";
static const char ovpngroupname[] = "openvpn";
static MALLOC_DEFINE(M_OVPN, ovpnname, "OpenVPN DCO Interface");
+#define MTAG_OVPN_LOOP 0x6f76706e /* ovpn */
SYSCTL_DECL(_net_link);
static SYSCTL_NODE(_net_link, IFT_OTHER, openvpn, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
@@ -1854,6 +1855,14 @@ ovpn_transmit_to_peer(struct ifnet *ifp, struct mbuf *m,
if (af != 0)
BPF_MTAP2(ifp, &af, sizeof(af), m);
+ if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_OVPN_LOOP, 3))) {
+ if (_ovpn_lock_trackerp != NULL)
+ OVPN_RUNLOCK(sc);
+ OVPN_COUNTER_ADD(sc, lost_data_pkts_out, 1);
+ m_freem(m);
+ return (ELOOP);
+ }
+
len = m->m_pkthdr.len;
MPASS(len <= ifp->if_mtu);
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index b69d8107e30d..788fdf787249 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1715,10 +1715,20 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid,
ifv->ifv_proto = proto;
if (ifv->ifv_vid != vid) {
+ int oldvid = ifv->ifv_vid;
+
/* Re-hash */
vlan_remhash(trunk, ifv);
ifv->ifv_vid = vid;
error = vlan_inshash(trunk, ifv);
+ if (error) {
+ int ret __diagused;
+
+ ifv->ifv_vid = oldvid;
+ /* Re-insert back where we found it. */
+ ret = vlan_inshash(trunk, ifv);
+ MPASS(ret == 0);
+ }
}
/* Will unlock */
goto done;
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index c6c3af57c78b..9153adf64cfc 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -432,6 +432,21 @@ TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port);
static int vxlan_reuse_port = 0;
TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port);
+/*
+ * This macro controls the default upper limitation on nesting of vxlan
+ * tunnels. By default it is 3, as the overhead of IPv6 vxlan tunnel is 70
+ * bytes, this will create at most 210 bytes overhead and the most inner
+ * tunnel's MTU will be 1290 which will meet IPv6 minimum MTU size 1280.
+ * Be careful to configure the tunnels when raising the limit. A large
+ * number of nested tunnels can introduce system crash.
+ */
+#ifndef MAX_VXLAN_NEST
+#define MAX_VXLAN_NEST 3
+#endif
+static int max_vxlan_nesting = MAX_VXLAN_NEST;
+SYSCTL_INT(_net_link_vxlan, OID_AUTO, max_nesting, CTLFLAG_RW,
+ &max_vxlan_nesting, 0, "Max nested tunnels");
+
/* Default maximum number of addresses in the forwarding table. */
#ifndef VXLAN_FTABLE_MAX
#define VXLAN_FTABLE_MAX 2000
@@ -2721,6 +2736,7 @@ vxlan_encap6(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa,
#endif
}
+#define MTAG_VXLAN_LOOP 0x7876706c /* vxlp */
static int
vxlan_transmit(struct ifnet *ifp, struct mbuf *m)
{
@@ -2746,6 +2762,13 @@ vxlan_transmit(struct ifnet *ifp, struct mbuf *m)
m_freem(m);
return (ENETDOWN);
}
+ if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_VXLAN_LOOP,
+ max_vxlan_nesting) != 0)) {
+ VXLAN_RUNLOCK(sc, &tracker);
+ m_freem(m);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
+ return (ELOOP);
+ }
if ((m->m_flags & (M_BCAST | M_MCAST)) == 0)
fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost);
diff --git a/sys/net80211/_ieee80211.h b/sys/net80211/_ieee80211.h
index 1ac9328714f7..5c7e6110026d 100644
--- a/sys/net80211/_ieee80211.h
+++ b/sys/net80211/_ieee80211.h
@@ -537,6 +537,27 @@ struct ieee80211_mimo_info {
"\34TXAMSDUAMPDU"
/*
+ * AKM (key management) suite capability list.
+ *
+ * These represent what's in 802.11-2016 - Table 9-133 - AKM Suite Selectors.
+ * Note that they do not match what the table values are, in case other key
+ * management suites want to be added with different OUIs.
+ */
+#define IEEE80211_KEYMGMT_RSN_UNSPEC_802_1X 0x00000001 /* RSN suite 1 */
+#define IEEE80211_KEYMGMT_RSN_PSK_OVER_802_1X 0x00000002 /* RSN suite 2 */
+#define IEEE80211_KEYMGMT_RSN_FT_OVER_802_1X 0x00000004 /* RSN suite 3 */
+#define IEEE80211_KEYMGMT_RSN_FT_PSK 0x00000008 /* RSN suite 4 */
+#define IEEE80211_KEYMGMT_RSN_802_1X_SHA256 0x00000010 /* RSN suite 5 */
+#define IEEE80211_KEYMGMT_RSN_PSK_SHA256 0x00000020 /* RSN suite 6 */
+#define IEEE80211_KEYMGMT_RSN_TPK_HANDSHAKE 0x00000040 /* RSN suite 7 */
+#define IEEE80211_KEYMGMT_RSN_SAE 0x00000080 /* RSN suite 8 */
+#define IEEE80211_KEYMGMT_RSN_FT_SAE 0x00000100 /* RSN suite 9 */
+#define IEEE80211_KEYMGMT_RSN_APPEERKEY_SHA256 0x00000200 /* RSN suite 10 */
+#define IEEE80211_KEYMGMT_RSN_802_1X_SUITE_B 0x00000400 /* RSN suite 11 */
+#define IEEE80211_KEYMGMT_RSN_802_1X_SUITE_B_192 0x00000800 /* RSN suite 12 */
+#define IEEE80211_KEYMGMT_RSN_FT_802_1X_SHA384 0x00001000 /* RSN suite 13 */
+
+/*
* RX status notification - which fields are valid.
*/
#define IEEE80211_R_NF 0x00000001 /* global NF value valid */
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index 15785a8f0966..ecb46e08713c 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -434,6 +434,40 @@ ieee80211_ifdetach(struct ieee80211com *ic)
IEEE80211_LOCK_DESTROY(ic);
}
+/*
+ * Called by drivers during attach to set the supported
+ * cipher set for software encryption.
+ */
+void
+ieee80211_set_software_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_suite)
+{
+ ieee80211_crypto_set_supported_software_ciphers(ic, cipher_suite);
+}
+
+/*
+ * Called by drivers during attach to set the supported
+ * cipher set for hardware encryption.
+ */
+void
+ieee80211_set_hardware_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_suite)
+{
+ ieee80211_crypto_set_supported_hardware_ciphers(ic, cipher_suite);
+}
+
+/*
+ * Called by drivers during attach to set the supported
+ * key management suites by the driver/hardware.
+ */
+void
+ieee80211_set_driver_keymgmt_suites(struct ieee80211com *ic,
+ uint32_t keymgmt_set)
+{
+ ieee80211_crypto_set_supported_driver_keymgmt(ic,
+ keymgmt_set);
+}
+
struct ieee80211com *
ieee80211_find_com(const char *name)
{
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h
index 47e496bf42a1..fe2a0a7f3b64 100644
--- a/sys/net80211/ieee80211.h
+++ b/sys/net80211/ieee80211.h
@@ -1266,7 +1266,7 @@ struct ieee80211_csa_ie {
#define WPA_CSE_NULL 0x00
#define WPA_CSE_WEP40 0x01
#define WPA_CSE_TKIP 0x02
-#define WPA_CSE_CCMP 0x04
+#define WPA_CSE_CCMP 0x04 /* CCMP 128-bit */
#define WPA_CSE_WEP104 0x05
#define WPA_ASE_NONE 0x00
@@ -1275,21 +1275,62 @@ struct ieee80211_csa_ie {
#define WPS_OUI_TYPE 0x04
+/* 802.11-2016 Table 9-131 - Cipher Suite Selectors */
#define RSN_OUI 0xac0f00
#define RSN_VERSION 1 /* current supported version */
-#define RSN_CSE_NULL 0x00
-#define RSN_CSE_WEP40 0x01
-#define RSN_CSE_TKIP 0x02
-#define RSN_CSE_WRAP 0x03
-#define RSN_CSE_CCMP 0x04
-#define RSN_CSE_WEP104 0x05
-
-#define RSN_ASE_NONE 0x00
-#define RSN_ASE_8021X_UNSPEC 0x01
-#define RSN_ASE_8021X_PSK 0x02
-
-#define RSN_CAP_PREAUTH 0x01
+/* RSN cipher suite element */
+#define RSN_CSE_NULL 0
+#define RSN_CSE_WEP40 1
+#define RSN_CSE_TKIP 2
+#define RSN_CSE_WRAP 3 /* Reserved in the 802.11-2016 */
+#define RSN_CSE_CCMP 4 /* CCMP 128 bit */
+#define RSN_CSE_WEP104 5
+#define RSN_CSE_BIP_CMAC_128 6
+/* 7 - "Group addressed traffic not allowed" */
+#define RSN_CSE_GCMP_128 8
+#define RSN_CSE_GCMP_256 9
+#define RSN_CSE_CCMP_256 10
+#define RSN_CSE_BIP_GMAC_128 11
+#define RSN_CSE_BIP_GMAC_256 12
+#define RSN_CSE_BIP_CMAC_256 13
+
+/* 802.11-2016 Table 9-133 - AKM suite selectors */
+/* RSN AKM suite element */
+#define RSN_ASE_NONE 0
+#define RSN_ASE_8021X_UNSPEC 1
+#define RSN_ASE_8021X_PSK 2
+#define RSN_ASE_FT_8021X 3 /* SHA-256 */
+#define RSN_ASE_FT_PSK 4 /* SHA-256 */
+#define RSN_ASE_8021X_UNSPEC_SHA256 5
+#define RSN_ASE_8021X_PSK_SHA256 6
+#define RSN_ASE_8021X_TDLS 7 /* SHA-256 */
+#define RSN_ASE_SAE_UNSPEC 8 /* SHA-256 */
+#define RSN_ASE_FT_SAE 9 /* SHA-256 */
+#define RSN_ASE_AP_PEERKEY 10 /* SHA-256 */
+#define RSN_ASE_8021X_SUITE_B_SHA256 11
+#define RSN_ASE_8021X_SUITE_B_SHA384 12
+#define RSN_ASE_FT_8021X_SHA384 13
+
+/* 802.11-2016 Figure 9-257 - RSN Capabilities (2 byte field) */
+#define RSN_CAP_PREAUTH 0x0001
+#define RSN_CAP_NO_PAIRWISE 0x0002
+#define RSN_CAP_PTKSA_REPLAY_COUNTER 0x000c /* 2 bit field */
+#define RSN_CAP_GTKSA_REPLAY_COUNTER 0x0030 /* 2 bit field */
+#define RSN_CAP_MFP_REQUIRED 0x0040
+#define RSN_CAP_MFP_CAPABLE 0x0080
+#define RSN_CAP_JOINT_MULTIBAND_RSNA 0x0100
+#define RSN_CAP_PEERKEY_ENABLED 0x0200
+#define RSN_CAP_SPP_AMSDU_CAPABLE 0x0400
+#define RSN_CAP_SPP_AMSDU_REQUIRED 0x0800
+#define RSN_CAP_PBAC_CAPABLE 0x1000
+#define RSN_CAP_EXT_KEYID_CAPABLE 0x0200
+
+/* 802.11-2016 Table 9-134 PTKSA/GTKSA/STKSA replay counters usage */
+#define RSN_CAP_REPLAY_COUNTER_1_PER 0
+#define RSN_CAP_REPLAY_COUNTER_2_PER 1
+#define RSN_CAP_REPLAY_COUNTER_4_PER 2
+#define RSN_CAP_REPLAY_COUNTER_16_PER 3
#define WME_OUI 0xf25000
#define WME_OUI_TYPE 0x02
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
index 6a1182b52480..829653ff1335 100644
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -142,6 +142,37 @@ ieee80211_crypto_attach(struct ieee80211com *ic)
{
/* NB: we assume everything is pre-zero'd */
ciphers[IEEE80211_CIPHER_NONE] = &ieee80211_cipher_none;
+
+ /*
+ * Default set of net80211 supported ciphers.
+ *
+ * These are the default set that all drivers are expected to
+ * support, either/or in hardware and software.
+ *
+ * Drivers can add their own support to this and the
+ * hardware cipher list (ic_cryptocaps.)
+ */
+ ic->ic_sw_cryptocaps = IEEE80211_CRYPTO_WEP |
+ IEEE80211_CRYPTO_TKIP | IEEE80211_CRYPTO_AES_CCM;
+
+ /*
+ * Default set of key management types supported by net80211.
+ *
+ * These are supported by software net80211 and announced/
+ * driven by hostapd + wpa_supplicant.
+ *
+ * Drivers doing full supplicant offload must not set
+ * anything here.
+ *
+ * Note that IEEE80211_C_WPA1 and IEEE80211_C_WPA2 are the
+ * "old" style way of drivers announcing key management
+ * capabilities. There are many, many more key management
+ * suites in 802.11-2016 (see 9.4.2.25.3 - AKM suites.)
+ * For now they still need to be set - these flags are checked
+ * when assembling a beacon to reserve space for the WPA
+ * vendor IE (WPA 1) and RSN IE (WPA 2).
+ */
+ ic->ic_sw_keymgmtcaps = 0;
}
/*
@@ -153,6 +184,43 @@ ieee80211_crypto_detach(struct ieee80211com *ic)
}
/*
+ * Set the supported ciphers for software encryption.
+ */
+void
+ieee80211_crypto_set_supported_software_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_set)
+{
+ ic->ic_sw_cryptocaps = cipher_set;
+}
+
+/*
+ * Set the supported ciphers for hardware encryption.
+ */
+void
+ieee80211_crypto_set_supported_hardware_ciphers(struct ieee80211com *ic,
+ uint32_t cipher_set)
+{
+ ic->ic_cryptocaps = cipher_set;
+}
+
+/*
+ * Set the supported software key management by the driver.
+ *
+ * These are the key management suites that are supported via
+ * the driver via hostapd/wpa_supplicant.
+ *
+ * Key management which is completely offloaded (ie, the supplicant
+ * runs in hardware/firmware) must not be set here.
+ */
+void
+ieee80211_crypto_set_supported_driver_keymgmt(struct ieee80211com *ic,
+ uint32_t keymgmt_set)
+{
+
+ ic->ic_sw_keymgmtcaps = keymgmt_set;
+}
+
+/*
* Setup crypto support for a vap.
*/
void
@@ -241,6 +309,13 @@ static const char *cipher_modnames[IEEE80211_CIPHER_MAX] = {
[IEEE80211_CIPHER_TKIPMIC] = "#4", /* NB: reserved */
[IEEE80211_CIPHER_CKIP] = "wlan_ckip",
[IEEE80211_CIPHER_NONE] = "wlan_none",
+ [IEEE80211_CIPHER_AES_CCM_256] = "wlan_ccmp",
+ [IEEE80211_CIPHER_BIP_CMAC_128] = "wlan_bip_cmac",
+ [IEEE80211_CIPHER_BIP_CMAC_256] = "wlan_bip_cmac",
+ [IEEE80211_CIPHER_BIP_GMAC_128] = "wlan_bip_gmac",
+ [IEEE80211_CIPHER_BIP_GMAC_256] = "wlan_bip_gmac",
+ [IEEE80211_CIPHER_AES_GCM_128] = "wlan_gcmp",
+ [IEEE80211_CIPHER_AES_GCM_256] = "wlan_gcmp",
};
/* NB: there must be no overlap between user-supplied and device-owned flags */
diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h
index fc7c13cfdfb4..b69df0cff3bd 100644
--- a/sys/net80211/ieee80211_crypto.h
+++ b/sys/net80211/ieee80211_crypto.h
@@ -137,8 +137,17 @@ struct ieee80211_key {
#define IEEE80211_CIPHER_TKIPMIC 4 /* TKIP MIC capability */
#define IEEE80211_CIPHER_CKIP 5
#define IEEE80211_CIPHER_NONE 6 /* pseudo value */
+#define IEEE80211_CIPHER_AES_CCM_256 7
+#define IEEE80211_CIPHER_BIP_CMAC_128 8
+#define IEEE80211_CIPHER_BIP_CMAC_256 9
+#define IEEE80211_CIPHER_BIP_GMAC_128 10
+#define IEEE80211_CIPHER_BIP_GMAC_256 11
+#define IEEE80211_CIPHER_AES_GCM_128 12
+#define IEEE80211_CIPHER_AES_GCM_256 13
-#define IEEE80211_CIPHER_MAX (IEEE80211_CIPHER_NONE+1)
+#define IEEE80211_CIPHER_LAST 13
+
+#define IEEE80211_CIPHER_MAX (IEEE80211_CIPHER_LAST+1)
/* capability bits in ic_cryptocaps/iv_cryptocaps */
#define IEEE80211_CRYPTO_WEP (1<<IEEE80211_CIPHER_WEP)
@@ -147,9 +156,18 @@ struct ieee80211_key {
#define IEEE80211_CRYPTO_AES_CCM (1<<IEEE80211_CIPHER_AES_CCM)
#define IEEE80211_CRYPTO_TKIPMIC (1<<IEEE80211_CIPHER_TKIPMIC)
#define IEEE80211_CRYPTO_CKIP (1<<IEEE80211_CIPHER_CKIP)
+#define IEEE80211_CRYPTO_AES_CCM_256 (1<<IEEE80211_CIPHER_AES_CCM_256)
+#define IEEE80211_CRYPTO_BIP_CMAC_128 (1<<IEEE80211_CIPHER_BIP_CMAC_128)
+#define IEEE80211_CRYPTO_BIP_CMAC_256 (1<<IEEE80211_CIPHER_BIP_CMAC_256)
+#define IEEE80211_CRYPTO_BIP_GMAC_128 (1<<IEEE80211_CIPHER_BIP_GMAC_128)
+#define IEEE80211_CRYPTO_BIP_GMAC_256 (1<<IEEE80211_CIPHER_BIP_GMAC_256)
+#define IEEE80211_CRYPTO_AES_GCM_128 (1<<IEEE80211_CIPHER_AES_GCM_128)
+#define IEEE80211_CRYPTO_AES_GCM_256 (1<<IEEE80211_CIPHER_AES_GCM_256)
#define IEEE80211_CRYPTO_BITS \
- "\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP"
+ "\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP\10AES_CCM_256" \
+ "\11BIP_CMAC_128\12BIP_CMAC_256\13BIP_GMAC_128\14BIP_CMAC_256" \
+ "\15AES_GCM_128\16AES_GCM_256"
#if defined(__KERNEL__) || defined(_KERNEL)
@@ -162,6 +180,12 @@ MALLOC_DECLARE(M_80211_CRYPTO);
void ieee80211_crypto_attach(struct ieee80211com *);
void ieee80211_crypto_detach(struct ieee80211com *);
+void ieee80211_crypto_set_supported_software_ciphers(struct ieee80211com *,
+ uint32_t cipher_set);
+void ieee80211_crypto_set_supported_hardware_ciphers(struct ieee80211com *,
+ uint32_t cipher_set);
+void ieee80211_crypto_set_supported_driver_keymgmt(struct ieee80211com *,
+ uint32_t keymgmt_set);
void ieee80211_crypto_vattach(struct ieee80211vap *);
void ieee80211_crypto_vdetach(struct ieee80211vap *);
int ieee80211_crypto_newkey(struct ieee80211vap *,
diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h
index ec017bb21ec4..b58c55cc7652 100644
--- a/sys/net80211/ieee80211_freebsd.h
+++ b/sys/net80211/ieee80211_freebsd.h
@@ -417,8 +417,7 @@ MODULE_DEPEND(wlan_##name, wlan, 1, 1, 1)
/*
* Crypto modules implement cipher support.
*/
-#define IEEE80211_CRYPTO_MODULE(name, version) \
-_IEEE80211_POLICY_MODULE(crypto, name, version); \
+#define IEEE80211_CRYPTO_MODULE_ADD(name) \
static void \
name##_modevent(int type) \
{ \
@@ -429,6 +428,10 @@ name##_modevent(int type) \
} \
TEXT_SET(crypto##_set, name##_modevent)
+#define IEEE80211_CRYPTO_MODULE(name, version) \
+ _IEEE80211_POLICY_MODULE(crypto, name, version); \
+ IEEE80211_CRYPTO_MODULE_ADD(name)
+
/*
* Scanner modules provide scanning policy.
*/
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index d5b242b679d0..c0ba19b5db89 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -709,7 +709,11 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic,
if (dc == NULL)
return ENOMEM;
dc->dc_drivercaps = ic->ic_caps;
- dc->dc_cryptocaps = ic->ic_cryptocaps;
+ /*
+ * Announce the set of both hardware and software supported
+ * ciphers.
+ */
+ dc->dc_cryptocaps = ic->ic_cryptocaps | ic->ic_sw_cryptocaps;
dc->dc_htcaps = ic->ic_htcaps;
dc->dc_vhtcaps = ic->ic_vht_cap.vht_cap_info;
ci = &dc->dc_chaninfo;
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
index 58080025b5a9..18152495c499 100644
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -551,13 +551,13 @@ struct ieee80211_regdomain_req {
IEEE80211_REGDOMAIN_SIZE((_req)->chaninfo.ic_nchans)
/*
- * Get driver capabilities. Driver, hardware crypto, and
+ * Get driver capabilities. Driver, hardware/software crypto, and
* HT/802.11n capabilities, and a table that describes what
* the radio can do.
*/
struct ieee80211_devcaps_req {
uint32_t dc_drivercaps; /* general driver caps */
- uint32_t dc_cryptocaps; /* hardware crypto support */
+ uint32_t dc_cryptocaps; /* software + hardware crypto support */
uint32_t dc_htcaps; /* HT/802.11n support */
uint32_t dc_vhtcaps; /* VHT/802.11ac capabilities */
struct ieee80211req_chaninfo dc_chaninfo;
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 4c9cdcbfccd9..9273b43a5823 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -163,8 +163,12 @@ struct ieee80211com {
uint32_t ic_caps; /* capabilities */
uint32_t ic_htcaps; /* HT capabilities */
uint32_t ic_htextcaps; /* HT extended capabilities */
- uint32_t ic_cryptocaps; /* crypto capabilities */
+ /* driver-supported software crypto caps */
+ uint32_t ic_sw_cryptocaps;
+ uint32_t ic_cryptocaps; /* hardware crypto caps */
/* set of mode capabilities */
+ /* driver/net80211 sw KEYMGMT capabilities */
+ uint32_t ic_sw_keymgmtcaps;
uint8_t ic_modecaps[IEEE80211_MODE_BYTES];
uint8_t ic_promisc; /* vap's needing promisc mode */
uint8_t ic_allmulti; /* vap's needing all multicast*/
@@ -749,6 +753,12 @@ MALLOC_DECLARE(M_80211_VAP);
int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3);
void ieee80211_ifattach(struct ieee80211com *);
void ieee80211_ifdetach(struct ieee80211com *);
+void ieee80211_set_software_ciphers(struct ieee80211com *,
+ uint32_t cipher_suite);
+void ieee80211_set_hardware_ciphers(struct ieee80211com *,
+ uint32_t cipher_suite);
+void ieee80211_set_driver_keymgmt_suites(struct ieee80211com *ic,
+ uint32_t keymgmt_set);
int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *,
const char name[IFNAMSIZ], int unit,
enum ieee80211_opmode opmode, int flags,
diff --git a/sys/netinet/cc/cc_cdg.c b/sys/netinet/cc/cc_cdg.c
index 1e9236f878d4..7ec9e8ca3ccc 100644
--- a/sys/netinet/cc/cc_cdg.c
+++ b/sys/netinet/cc/cc_cdg.c
@@ -57,6 +57,7 @@
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/queue.h>
+#include <sys/prng.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/sysctl.h>
@@ -507,7 +508,8 @@ cdg_cong_signal(struct cc_var *ccv, ccsignal_t signal_type)
static inline int
prob_backoff(long qtrend)
{
- int backoff, idx, p;
+ int backoff, idx;
+ uint32_t p;
backoff = (qtrend > ((MAXGRAD * V_cdg_exp_backoff_scale) << D_P_E));
@@ -519,8 +521,8 @@ prob_backoff(long qtrend)
idx = qtrend;
/* Backoff probability proportional to rate of queue growth. */
- p = (INT_MAX / (1 << EXP_PREC)) * probexp[idx];
- backoff = (random() < p);
+ p = (UINT32_MAX / (1 << EXP_PREC)) * probexp[idx];
+ backoff = (prng32() < p);
}
return (backoff);
diff --git a/sys/netinet/cc/cc_chd.c b/sys/netinet/cc/cc_chd.c
index 52048a7c05ae..92fcf68c41f1 100644
--- a/sys/netinet/cc/cc_chd.c
+++ b/sys/netinet/cc/cc_chd.c
@@ -58,6 +58,7 @@
#include <sys/limits.h>
#include <sys/malloc.h>
#include <sys/module.h>
+#include <sys/prng.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -85,8 +86,8 @@
*/
#define CC_CHD_DELAY 0x02000000
-/* Largest possible number returned by random(). */
-#define RANDOM_MAX INT_MAX
+/* Largest possible number returned by prng32(). */
+#define RANDOM_MAX UINT32_MAX
static void chd_ack_received(struct cc_var *ccv, ccsignal_t ack_type);
static void chd_cb_destroy(struct cc_var *ccv);
@@ -159,9 +160,9 @@ chd_window_decrease(struct cc_var *ccv)
static __inline int
should_backoff(int qdly, int maxqdly, struct chd *chd_data)
{
- unsigned long p, rand;
+ uint32_t rand, p;
- rand = random();
+ rand = prng32();
if (qdly < V_chd_qthresh) {
chd_data->loss_compete = 0;
diff --git a/sys/netinet/cc/cc_hd.c b/sys/netinet/cc/cc_hd.c
index 82486563f97e..def1580d8ffb 100644
--- a/sys/netinet/cc/cc_hd.c
+++ b/sys/netinet/cc/cc_hd.c
@@ -59,6 +59,7 @@
#include <sys/limits.h>
#include <sys/malloc.h>
#include <sys/module.h>
+#include <sys/prng.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -77,8 +78,8 @@
#include <netinet/khelp/h_ertt.h>
-/* Largest possible number returned by random(). */
-#define RANDOM_MAX INT_MAX
+/* Largest possible number returned by prng32(). */
+#define RANDOM_MAX UINT32_MAX
static void hd_ack_received(struct cc_var *ccv, ccsignal_t ack_type);
static int hd_mod_init(void);
@@ -128,7 +129,7 @@ should_backoff(int qdly, int maxqdly)
p = (RANDOM_MAX / 100) * V_hd_pmax;
}
- return (random() < p);
+ return (prng32() < p);
}
/*
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h
index 4368fd2a0fcf..9de8daaa3390 100644
--- a/sys/netinet/icmp6.h
+++ b/sys/netinet/icmp6.h
@@ -63,6 +63,8 @@
#ifndef _NETINET_ICMP6_H_
#define _NETINET_ICMP6_H_
+#include <sys/stdint.h>
+
#define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr)
- sizeof(struct icmp6_hdr) */
@@ -307,7 +309,8 @@ struct nd_opt_hdr { /* Neighbor discovery option header */
#define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */
#define ND_OPT_RDNSS 25 /* RFC 6106 */
#define ND_OPT_DNSSL 31 /* RFC 6106 */
-#define ND_OPT_MAX 31
+#define ND_OPT_PREF64 38 /* RFC 8781 */
+#define ND_OPT_MAX 38
struct nd_opt_prefix_info { /* prefix information */
u_int8_t nd_opt_pi_type;
@@ -373,6 +376,14 @@ struct nd_opt_dnssl { /* DNSSL option (RFC 6106) */
/* followed by list of DNS search domains */
} __packed;
+struct nd_opt_pref64 { /* PREF64 option (RFC 8781) */
+ uint8_t nd_opt_pref64_type;
+ uint8_t nd_opt_pref64_len;
+ /* bits 0-12 are the SL, bits 13-15 are the PLC */
+ uint16_t nd_opt_pref64_sl_plc;
+ char nd_opt_prefix[12];
+} __packed;
+
/*
* icmp6 namelookup
*/
diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c
index e7eede53ea51..b889131b544b 100644
--- a/sys/netinet/in_fib_dxr.c
+++ b/sys/netinet/in_fib_dxr.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2012-2022 Marko Zec
+ * Copyright (c) 2012-2024 Marko Zec
* Copyright (c) 2005, 2018 University of Zagreb
* Copyright (c) 2005 International Computer Science Institute
*
@@ -68,9 +68,6 @@
CTASSERT(DXR_TRIE_BITS >= 16 && DXR_TRIE_BITS <= 24);
-/* DXR2: two-stage primary trie, instead of a single direct lookup table */
-#define DXR2
-
#if DXR_TRIE_BITS > 16
#define DXR_D 16
#else
@@ -317,7 +314,6 @@ range_lookup(struct range_entry_long *rt, struct direct_entry de, uint32_t dst)
ntohl(key.addr4.s_addr))]); \
}
-#ifdef DXR2
#if DXR_TRIE_BITS > 16
DXR_LOOKUP_DEFINE(16)
#endif
@@ -328,23 +324,16 @@ DXR_LOOKUP_DEFINE(12)
DXR_LOOKUP_DEFINE(11)
DXR_LOOKUP_DEFINE(10)
DXR_LOOKUP_DEFINE(9)
-#endif /* DXR2 */
static int inline
dxr_lookup(struct dxr *dxr, uint32_t dst)
{
struct direct_entry de;
-#ifdef DXR2
uint16_t *dt = dxr->d;
struct direct_entry *xt = dxr->x;
de = xt[(dt[dst >> dxr->d_shift] << dxr->x_shift) +
((dst >> DXR_RANGE_SHIFT) & dxr->x_mask)];
-#else /* !DXR2 */
- struct direct_entry *dt = dxr->d;
-
- de = dt[dst >> DXR_RANGE_SHIFT];
-#endif /* !DXR2 */
if (__predict_true(de.fragments == FRAGS_MARK_HIT))
return (de.base);
return (range_lookup(dxr->r, de, dst));
@@ -474,8 +463,7 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk)
cdp->cd_max_size = size;
cdp->cd_base = fdesc->base;
LIST_INSERT_HEAD(&da->all_chunks, cdp, cd_all_le);
- KASSERT(cdp->cd_base + cdp->cd_max_size == da->rtbl_top,
- ("dxr: %s %d", __FUNCTION__, __LINE__));
+ MPASS(cdp->cd_base + cdp->cd_max_size == da->rtbl_top);
}
cdp->cd_hash = hash;
@@ -497,8 +485,11 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk)
da->range_tbl = realloc(da->range_tbl,
sizeof(*da->range_tbl) * da->rtbl_size + FRAGS_PREF_SHORT,
M_DXRAUX, M_NOWAIT);
- if (da->range_tbl == NULL)
+ if (da->range_tbl == NULL) {
+ FIB_PRINTF(LOG_NOTICE, da->fd,
+ "Unable to allocate DXR range table");
return (1);
+ }
}
return (0);
@@ -522,7 +513,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk)
sizeof(struct range_entry_long) * size) == 0)
break;
- KASSERT(cdp != NULL, ("dxr: dangling chunk"));
+ MPASS(cdp != NULL);
if (--cdp->cd_refcnt > 0)
return;
@@ -533,8 +524,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk)
/* Attempt to merge with the preceding chunk, if empty */
cdp2 = LIST_NEXT(cdp, cd_all_le);
if (cdp2 != NULL && cdp2->cd_cur_size == 0) {
- KASSERT(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base,
- ("dxr: %s %d", __FUNCTION__, __LINE__));
+ MPASS(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base);
LIST_REMOVE(cdp, cd_all_le);
LIST_REMOVE(cdp2, cd_hash_le);
cdp2->cd_max_size += cdp->cd_max_size;
@@ -545,8 +535,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk)
/* Attempt to merge with the subsequent chunk, if empty */
cdp2 = LIST_PREV(cdp, &da->all_chunks, chunk_desc, cd_all_le);
if (cdp2 != NULL && cdp2->cd_cur_size == 0) {
- KASSERT(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base,
- ("dxr: %s %d", __FUNCTION__, __LINE__));
+ MPASS(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base);
LIST_REMOVE(cdp, cd_all_le);
LIST_REMOVE(cdp2, cd_hash_le);
cdp2->cd_max_size += cdp->cd_max_size;
@@ -557,8 +546,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk)
if (cdp->cd_base + cdp->cd_max_size == da->rtbl_top) {
/* Free the chunk on the top of the range heap, trim the heap */
- KASSERT(cdp == LIST_FIRST(&da->all_chunks),
- ("dxr: %s %d", __FUNCTION__, __LINE__));
+ MPASS(cdp == LIST_FIRST(&da->all_chunks));
da->rtbl_top -= cdp->cd_max_size;
da->unused_chunks_size -= cdp->cd_max_size;
LIST_REMOVE(cdp, cd_all_le);
@@ -572,7 +560,6 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk)
LIST_INSERT_HEAD(&da->unused_chunks[i], cdp, cd_hash_le);
}
-#ifdef DXR2
static uint32_t
trie_hash(struct dxr_aux *da, uint32_t dxr_x, uint32_t index)
{
@@ -632,8 +619,11 @@ trie_ref(struct dxr_aux *da, uint32_t index)
da->xtbl_size += XTBL_SIZE_INCR;
da->x_tbl = realloc(da->x_tbl,
sizeof(*da->x_tbl) * da->xtbl_size, M_DXRAUX, M_NOWAIT);
- if (da->x_tbl == NULL)
+ if (da->x_tbl == NULL) {
+ FIB_PRINTF(LOG_NOTICE, da->fd,
+ "Unable to allocate DXR extension table");
return (-1);
+ }
}
return(tp->td_index);
}
@@ -668,7 +658,6 @@ trie_unref(struct dxr_aux *da, uint32_t index)
}
} while (tp != NULL);
}
-#endif
static void
heap_inject(struct dxr_aux *da, uint32_t start, uint32_t end, uint32_t preflen,
@@ -862,21 +851,23 @@ dxr_build(struct dxr *dxr)
uint32_t r_size, dxr_tot_size;
uint32_t i, m, range_rebuild = 0;
uint32_t range_frag;
-#ifdef DXR2
struct trie_desc *tp;
uint32_t d_tbl_size, dxr_x, d_size, x_size;
uint32_t ti, trie_rebuild = 0, prev_size = 0;
uint32_t trie_frag;
-#endif
- KASSERT(dxr->d == NULL, ("dxr: d not free"));
+ MPASS(dxr->d == NULL);
if (da == NULL) {
da = malloc(sizeof(*dxr->aux), M_DXRAUX, M_NOWAIT);
- if (da == NULL)
+ if (da == NULL) {
+ FIB_PRINTF(LOG_NOTICE, dxr->fd,
+ "Unable to allocate DXR aux struct");
return;
+ }
dxr->aux = da;
da->fibnum = dxr->fibnum;
+ da->fd = dxr->fd;
da->refcnt = 1;
LIST_INIT(&da->all_chunks);
LIST_INIT(&da->all_trie);
@@ -894,20 +885,23 @@ dxr_build(struct dxr *dxr)
if (da->range_tbl == NULL) {
da->range_tbl = malloc(sizeof(*da->range_tbl) * da->rtbl_size
+ FRAGS_PREF_SHORT, M_DXRAUX, M_NOWAIT);
- if (da->range_tbl == NULL)
+ if (da->range_tbl == NULL) {
+ FIB_PRINTF(LOG_NOTICE, da->fd,
+ "Unable to allocate DXR range table");
return;
+ }
range_rebuild = 1;
}
-#ifdef DXR2
if (da->x_tbl == NULL) {
da->x_tbl = malloc(sizeof(*da->x_tbl) * da->xtbl_size,
M_DXRAUX, M_NOWAIT);
- if (da->x_tbl == NULL)
+ if (da->x_tbl == NULL) {
+ FIB_PRINTF(LOG_NOTICE, da->fd,
+ "Unable to allocate DXR extension table");
return;
+ }
trie_rebuild = 1;
}
-#endif
- da->fd = dxr->fd;
microuptime(&t0);
@@ -959,7 +953,6 @@ range_build:
r_size = sizeof(*da->range_tbl) * da->rtbl_top;
microuptime(&t1);
-#ifdef DXR2
if (range_rebuild ||
abs(fls(da->prefixes) - fls(da->trie_rebuilt_prefixes)) > 1)
trie_rebuild = 1;
@@ -1033,15 +1026,13 @@ dxr2_try_squeeze:
goto dxr2_try_squeeze;
}
microuptime(&t2);
-#else /* !DXR2 */
- dxr_tot_size = sizeof(da->direct_tbl) + r_size;
- t2 = t1;
-#endif
dxr->d = malloc(dxr_tot_size, M_DXRLPM, M_NOWAIT);
- if (dxr->d == NULL)
+ if (dxr->d == NULL) {
+ FIB_PRINTF(LOG_NOTICE, da->fd,
+ "Unable to allocate DXR lookup table");
return;
-#ifdef DXR2
+ }
memcpy(dxr->d, da->d_tbl, d_size);
dxr->x = ((char *) dxr->d) + d_size;
memcpy(dxr->x, da->x_tbl, x_size);
@@ -1049,10 +1040,6 @@ dxr2_try_squeeze:
dxr->d_shift = 32 - da->d_bits;
dxr->x_shift = dxr_x;
dxr->x_mask = 0xffffffffU >> (32 - dxr_x);
-#else /* !DXR2 */
- memcpy(dxr->d, da->direct_tbl, sizeof(da->direct_tbl));
- dxr->r = ((char *) dxr->d) + sizeof(da->direct_tbl);
-#endif
memcpy(dxr->r, da->range_tbl, r_size);
if (da->updates_low <= da->updates_high)
@@ -1062,43 +1049,31 @@ dxr2_try_squeeze:
da->updates_high = 0;
microuptime(&t3);
-#ifdef DXR2
FIB_PRINTF(LOG_INFO, da->fd, "D%dX%dR, %d prefixes, %d nhops (max)",
da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops);
-#else
- FIB_PRINTF(LOG_INFO, da->fd, "D%dR, %d prefixes, %d nhops (max)",
- DXR_D, rinfo.num_prefixes, rinfo.num_nhops);
-#endif
i = dxr_tot_size * 100;
if (rinfo.num_prefixes)
i /= rinfo.num_prefixes;
FIB_PRINTF(LOG_INFO, da->fd, "%d.%02d KBytes, %d.%02d Bytes/prefix",
dxr_tot_size / 1024, dxr_tot_size * 100 / 1024 % 100,
i / 100, i % 100);
-#ifdef DXR2
FIB_PRINTF(LOG_INFO, da->fd,
"%d.%02d%% trie, %d.%02d%% range fragmentation",
trie_frag / 100, trie_frag % 100,
range_frag / 100, range_frag % 100);
-#else
- FIB_PRINTF(LOG_INFO, da->fd, "%d.%01d%% range fragmentation",
- range_frag / 100, range_frag % 100);
-#endif
i = (t1.tv_sec - t0.tv_sec) * 1000000 + t1.tv_usec - t0.tv_usec;
FIB_PRINTF(LOG_INFO, da->fd, "range table %s in %u.%03u ms",
range_rebuild ? "rebuilt" : "updated", i / 1000, i % 1000);
-#ifdef DXR2
i = (t2.tv_sec - t1.tv_sec) * 1000000 + t2.tv_usec - t1.tv_usec;
FIB_PRINTF(LOG_INFO, da->fd, "trie %s in %u.%03u ms",
trie_rebuild ? "rebuilt" : "updated", i / 1000, i % 1000);
-#endif
i = (t3.tv_sec - t2.tv_sec) * 1000000 + t3.tv_usec - t2.tv_usec;
FIB_PRINTF(LOG_INFO, da->fd, "snapshot forked in %u.%03u ms",
i / 1000, i % 1000);
}
/*
- * Glue functions for attaching to FreeBSD 13 fib_algo infrastructure.
+ * Glue functions for attaching to the FIB_ALGO infrastructure.
*/
static struct nhop_object *
@@ -1118,11 +1093,15 @@ dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data)
struct dxr *dxr;
dxr = malloc(sizeof(*dxr), M_DXRAUX, M_NOWAIT);
- if (dxr == NULL)
+ if (dxr == NULL) {
+ FIB_PRINTF(LOG_NOTICE, fd,
+ "Unable to allocate DXR container struct");
return (FLM_REBUILD);
+ }
/* Check whether we may reuse the old auxiliary structures */
- if (old_dxr != NULL && old_dxr->aux != NULL) {
+ if (old_dxr != NULL && old_dxr->aux != NULL &&
+ old_dxr->aux->fd == fd) {
da = old_dxr->aux;
atomic_add_int(&da->refcnt, 1);
}
@@ -1140,14 +1119,11 @@ static void
dxr_destroy(void *data)
{
struct dxr *dxr = data;
- struct dxr_aux *da;
+ struct dxr_aux *da = dxr->aux;
struct chunk_desc *cdp;
struct trie_desc *tp;
- if (dxr->d != NULL)
- free(dxr->d, M_DXRLPM);
-
- da = dxr->aux;
+ free(dxr->d, M_DXRLPM);
free(dxr, M_DXRAUX);
if (da == NULL || atomic_fetchadd_int(&da->refcnt, -1) > 1)
@@ -1179,7 +1155,6 @@ static void *
choose_lookup_fn(struct dxr_aux *da)
{
-#ifdef DXR2
switch (da->d_bits) {
#if DXR_TRIE_BITS > 16
case 16:
@@ -1200,7 +1175,6 @@ choose_lookup_fn(struct dxr_aux *da)
case 9:
return (dxr_fib_lookup_9);
}
-#endif /* DXR2 */
return (dxr_fib_lookup);
}
@@ -1213,17 +1187,12 @@ dxr_dump_end(void *data, struct fib_dp *dp)
dxr_build(dxr);
da = dxr->aux;
- if (da == NULL)
+ if (da == NULL || dxr->d == NULL)
return (FLM_REBUILD);
- /* Structural limit exceeded, hard error */
if (da->rtbl_top >= BASE_MAX)
return (FLM_ERROR);
- /* A malloc(,, M_NOWAIT) failed somewhere, retry later */
- if (dxr->d == NULL)
- return (FLM_REBUILD);
-
dp->f = choose_lookup_fn(da);
dp->arg = dxr;
@@ -1260,13 +1229,14 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q,
int update_delta = 0;
#endif
- KASSERT(data != NULL, ("%s: NULL data", __FUNCTION__));
- KASSERT(q != NULL, ("%s: NULL q", __FUNCTION__));
- KASSERT(q->count < q->size, ("%s: q->count %d q->size %d",
- __FUNCTION__, q->count, q->size));
+ MPASS(data != NULL);
+ MPASS(q != NULL);
+ MPASS(q->count < q->size);
da = dxr->aux;
- KASSERT(da != NULL, ("%s: NULL dxr->aux", __FUNCTION__));
+ MPASS(da != NULL);
+ MPASS(da->fd == dxr->fd);
+ MPASS(da->refcnt > 0);
FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count);
for (ui = 0; ui < q->count; ui++) {
@@ -1299,8 +1269,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q,
#ifdef INVARIANTS
fib_get_rtable_info(fib_get_rh(da->fd), &rinfo);
- KASSERT(da->prefixes + update_delta == rinfo.num_prefixes,
- ("%s: update count mismatch", __FUNCTION__));
+ MPASS(da->prefixes + update_delta == rinfo.num_prefixes);
#endif
res = dxr_init(0, dxr->fd, data, (void **) &new_dxr);
@@ -1315,7 +1284,6 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q,
return (FLM_ERROR);
}
- /* A malloc(,, M_NOWAIT) failed somewhere, retry later */
if (new_dxr->d == NULL) {
dxr_destroy(new_dxr);
return (FLM_REBUILD);
@@ -1329,6 +1297,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q,
return (FLM_SUCCESS);
}
+ FIB_PRINTF(LOG_NOTICE, dxr->fd, "fib_set_datapath_ptr() failed");
dxr_destroy(new_dxr);
return (FLM_REBUILD);
}
diff --git a/sys/netinet/in_kdtrace.c b/sys/netinet/in_kdtrace.c
index 2a53b11c3be2..8491a4d49d91 100644
--- a/sys/netinet/in_kdtrace.c
+++ b/sys/netinet/in_kdtrace.c
@@ -294,6 +294,7 @@ MIB_PROBE_TCP(tcps_finwait2_drops);
MIB_PROBE_TCP(tcps_sack_recovery_episode);
MIB_PROBE_TCP(tcps_sack_rexmits);
+MIB_PROBE_TCP(tcps_sack_rexmits_tso);
MIB_PROBE_TCP(tcps_sack_rexmit_bytes);
MIB_PROBE_TCP(tcps_sack_rcv_blocks);
MIB_PROBE_TCP(tcps_sack_send_blocks);
diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h
index 780839299993..9896af96eb84 100644
--- a/sys/netinet/in_kdtrace.h
+++ b/sys/netinet/in_kdtrace.h
@@ -286,6 +286,7 @@ SDT_PROBE_DECLARE(mib, tcp, count, tcps_finwait2_drops);
SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_recovery_episode);
SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits);
+SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits_tso);
SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmit_bytes);
SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rcv_blocks);
SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_send_blocks);
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index d9caad6417ef..1a341d421f31 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -655,6 +655,10 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo)
#if defined(IPSEC) || defined(IPSEC_SUPPORT) || defined(MAC)
out:
+ crfree(inp->inp_cred);
+#ifdef INVARIANTS
+ inp->inp_cred = NULL;
+#endif
uma_zfree_smr(pcbinfo->ipi_zone, inp);
return (error);
#endif
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index ddbc13e7c878..9f163c1097ba 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -37,6 +37,7 @@
#include <sys/systm.h>
#include <sys/devctl.h>
#include <sys/jail.h>
+#include <sys/kassert.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/malloc.h>
@@ -95,7 +96,8 @@ static MALLOC_DEFINE(M_CARP, "CARP", "CARP addresses");
struct carp_softc {
struct ifnet *sc_carpdev; /* Pointer to parent ifnet. */
struct ifaddr **sc_ifas; /* Our ifaddrs. */
- struct sockaddr_dl sc_addr; /* Our link level address. */
+ carp_version_t sc_version; /* carp or VRRPv3 */
+ uint8_t sc_addr[ETHER_ADDR_LEN]; /* Our link level address. */
struct callout sc_ad_tmo; /* Advertising timeout. */
#ifdef INET
struct callout sc_md_tmo; /* Master down timeout. */
@@ -106,11 +108,25 @@ struct carp_softc {
struct mtx sc_mtx;
int sc_vhid;
- int sc_advskew;
- int sc_advbase;
- struct in_addr sc_carpaddr;
- struct in6_addr sc_carpaddr6;
-
+ union {
+ struct { /* sc_version == CARP_VERSION_CARP */
+ int sc_advskew;
+ int sc_advbase;
+ struct in_addr sc_carpaddr;
+ struct in6_addr sc_carpaddr6;
+ uint64_t sc_counter;
+ bool sc_init_counter;
+#define CARP_HMAC_PAD 64
+ unsigned char sc_key[CARP_KEY_LEN];
+ unsigned char sc_pad[CARP_HMAC_PAD];
+ SHA1_CTX sc_sha1;
+ };
+ struct { /* sc_version == CARP_VERSION_VRRPv3 */
+ uint8_t sc_vrrp_prio;
+ uint16_t sc_vrrp_adv_inter;
+ uint16_t sc_vrrp_master_inter;
+ };
+ };
int sc_naddrs;
int sc_naddrs6;
int sc_ifasiz;
@@ -121,15 +137,6 @@ struct carp_softc {
int sc_sendad_success;
#define CARP_SENDAD_MIN_SUCCESS 3
- int sc_init_counter;
- uint64_t sc_counter;
-
- /* authentication */
-#define CARP_HMAC_PAD 64
- unsigned char sc_key[CARP_KEY_LEN];
- unsigned char sc_pad[CARP_HMAC_PAD];
- SHA1_CTX sc_sha1;
-
TAILQ_ENTRY(carp_softc) sc_list; /* On the carp_if list. */
LIST_ENTRY(carp_softc) sc_next; /* On the global list. */
};
@@ -166,6 +173,9 @@ struct carpkreq {
/* Everything above this is identical to carpreq */
struct in_addr carpr_addr;
struct in6_addr carpr_addr6;
+ carp_version_t carpr_version;
+ uint8_t carpr_vrrp_priority;
+ uint16_t carpr_vrrp_adv_inter;
};
/*
@@ -325,8 +335,9 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID_AUTO, stats, struct carpstats,
0 : ((sc)->sc_advskew + V_carp_demotion)))
static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t, int);
+static void vrrp_input_c(struct mbuf *, int, sa_family_t, int, int, uint16_t);
static struct carp_softc
- *carp_alloc(struct ifnet *);
+ *carp_alloc(struct ifnet *, carp_version_t, int);
static void carp_destroy(struct carp_softc *);
static struct carp_if
*carp_alloc_if(struct ifnet *);
@@ -337,8 +348,8 @@ static void carp_setrun(struct carp_softc *, sa_family_t);
static void carp_master_down(void *);
static void carp_master_down_locked(struct carp_softc *,
const char* reason);
-static void carp_send_ad(void *);
static void carp_send_ad_locked(struct carp_softc *);
+static void vrrp_send_ad_locked(struct carp_softc *);
static void carp_addroute(struct carp_softc *);
static void carp_ifa_addroute(struct ifaddr *);
static void carp_delroute(struct carp_softc *);
@@ -373,7 +384,7 @@ carp_is_supported_if(if_t ifp)
static void
carp_hmac_prepare(struct carp_softc *sc)
{
- uint8_t version = CARP_VERSION, type = CARP_ADVERTISEMENT;
+ uint8_t version = CARP_VERSION_CARP, type = CARP_ADVERTISEMENT;
uint8_t vhid = sc->sc_vhid & 0xff;
struct ifaddr *ifa;
int i, found;
@@ -385,6 +396,7 @@ carp_hmac_prepare(struct carp_softc *sc)
#endif
CARP_LOCK_ASSERT(sc);
+ MPASS(sc->sc_version == CARP_VERSION_CARP);
/* Compute ipad from key. */
bzero(sc->sc_pad, sizeof(sc->sc_pad));
@@ -478,6 +490,22 @@ carp_hmac_verify(struct carp_softc *sc, uint32_t counter[2],
return (bcmp(md, md2, sizeof(md2)));
}
+static int
+vrrp_checksum_verify(struct mbuf *m, int off, int len, uint16_t phdrcksum)
+{
+ uint16_t cksum;
+
+ /*
+ * Note that VRRPv3 checksums are different from CARP checksums.
+ * Carp just calculates the checksum over the packet.
+ * VRRPv3 includes the pseudo-header checksum as well.
+ */
+ cksum = in_cksum_skip(m, off + len, off);
+ cksum -= phdrcksum;
+
+ return (cksum);
+}
+
/*
* process input packet.
* we have rearranged checks order compared to the rfc,
@@ -489,8 +517,10 @@ carp_input(struct mbuf **mp, int *offp, int proto)
{
struct mbuf *m = *mp;
struct ip *ip = mtod(m, struct ip *);
- struct carp_header *ch;
- int iplen, len;
+ struct vrrpv3_header *vh;
+ int iplen;
+ int minlen;
+ int totlen;
iplen = *offp;
*mp = NULL;
@@ -503,59 +533,95 @@ carp_input(struct mbuf **mp, int *offp, int proto)
}
iplen = ip->ip_hl << 2;
+ totlen = ntohs(ip->ip_len);
- if (m->m_pkthdr.len < iplen + sizeof(*ch)) {
+ /* Ensure we have enough header to figure out the version. */
+ if (m->m_pkthdr.len < iplen + sizeof(*vh)) {
CARPSTATS_INC(carps_badlen);
- CARP_DEBUG("%s: received len %zd < sizeof(struct carp_header) "
+ CARP_DEBUG("%s: received len %zd < sizeof(struct vrrpv3_header) "
"on %s\n", __func__, m->m_len - sizeof(struct ip),
if_name(m->m_pkthdr.rcvif));
m_freem(m);
return (IPPROTO_DONE);
}
- if (iplen + sizeof(*ch) < m->m_len) {
- if ((m = m_pullup(m, iplen + sizeof(*ch))) == NULL) {
+ if (iplen + sizeof(*vh) < m->m_len) {
+ if ((m = m_pullup(m, iplen + sizeof(*vh))) == NULL) {
CARPSTATS_INC(carps_hdrops);
- CARP_DEBUG("%s: pullup failed\n", __func__);
+ CARP_DEBUG("%s():%d: pullup failed\n", __func__, __LINE__);
return (IPPROTO_DONE);
}
ip = mtod(m, struct ip *);
}
- ch = (struct carp_header *)((char *)ip + iplen);
+ vh = (struct vrrpv3_header *)((char *)ip + iplen);
- /*
- * verify that the received packet length is
- * equal to the CARP header
- */
- len = iplen + sizeof(*ch);
- if (len > m->m_pkthdr.len) {
+ switch (vh->vrrp_version) {
+ case CARP_VERSION_CARP:
+ minlen = sizeof(struct carp_header);
+ break;
+ case CARP_VERSION_VRRPv3:
+ minlen = sizeof(struct vrrpv3_header);
+ break;
+ default:
+ CARPSTATS_INC(carps_badver);
+ CARP_DEBUG("%s: unsupported version %d on %s\n", __func__,
+ vh->vrrp_version, if_name(m->m_pkthdr.rcvif));
+ m_freem(m);
+ return (IPPROTO_DONE);
+ }
+
+ /* And now check the length again but with the real minimal length. */
+ if (m->m_pkthdr.len < iplen + minlen) {
CARPSTATS_INC(carps_badlen);
- CARP_DEBUG("%s: packet too short %d on %s\n", __func__,
- m->m_pkthdr.len,
+ CARP_DEBUG("%s: received len %zd < %d "
+ "on %s\n", __func__, m->m_len - sizeof(struct ip),
+ iplen + minlen,
if_name(m->m_pkthdr.rcvif));
m_freem(m);
return (IPPROTO_DONE);
}
- if ((m = m_pullup(m, len)) == NULL) {
- CARPSTATS_INC(carps_hdrops);
- return (IPPROTO_DONE);
+ if (iplen + minlen < m->m_len) {
+ if ((m = m_pullup(m, iplen + minlen)) == NULL) {
+ CARPSTATS_INC(carps_hdrops);
+ CARP_DEBUG("%s():%d: pullup failed\n", __func__, __LINE__);
+ return (IPPROTO_DONE);
+ }
+ ip = mtod(m, struct ip *);
+ vh = (struct vrrpv3_header *)((char *)ip + iplen);
}
- ip = mtod(m, struct ip *);
- ch = (struct carp_header *)((char *)ip + iplen);
- /* verify the CARP checksum */
- m->m_data += iplen;
- if (in_cksum(m, len - iplen)) {
- CARPSTATS_INC(carps_badsum);
- CARP_DEBUG("%s: checksum failed on %s\n", __func__,
- if_name(m->m_pkthdr.rcvif));
- m_freem(m);
- return (IPPROTO_DONE);
+ switch (vh->vrrp_version) {
+ case CARP_VERSION_CARP: {
+ struct carp_header *ch;
+
+ /* verify the CARP checksum */
+ m->m_data += iplen;
+ if (in_cksum(m, totlen - iplen)) {
+ CARPSTATS_INC(carps_badsum);
+ CARP_DEBUG("%s: checksum failed on %s\n", __func__,
+ if_name(m->m_pkthdr.rcvif));
+ m_freem(m);
+ break;
+ }
+ m->m_data -= iplen;
+ ch = (struct carp_header *)((char *)ip + iplen);
+ carp_input_c(m, ch, AF_INET, ip->ip_ttl);
+ break;
+ }
+ case CARP_VERSION_VRRPv3: {
+ uint16_t phdrcksum;
+
+ phdrcksum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
+ htonl((u_short)(totlen - iplen) + ip->ip_p));
+ vrrp_input_c(m, iplen, AF_INET, ip->ip_ttl, totlen - iplen,
+ phdrcksum);
+ break;
+ }
+ default:
+ KASSERT(false, ("Unsupported version %d", vh->vrrp_version));
}
- m->m_data -= iplen;
- carp_input_c(m, ch, AF_INET, ip->ip_ttl);
return (IPPROTO_DONE);
}
#endif
@@ -566,8 +632,8 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
{
struct mbuf *m = *mp;
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
- struct carp_header *ch;
- u_int len;
+ struct vrrpv3_header *vh;
+ u_int len, minlen;
CARPSTATS_INC(carps_ipackets6);
@@ -585,10 +651,9 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
return (IPPROTO_DONE);
}
- /* verify that we have a complete carp packet */
- if (m->m_len < *offp + sizeof(*ch)) {
+ if (m->m_len < *offp + sizeof(*vh)) {
len = m->m_len;
- m = m_pullup(m, *offp + sizeof(*ch));
+ m = m_pullup(m, *offp + sizeof(*vh));
if (m == NULL) {
CARPSTATS_INC(carps_badlen);
CARP_DEBUG("%s: packet size %u too small\n", __func__, len);
@@ -596,20 +661,74 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
}
ip6 = mtod(m, struct ip6_hdr *);
}
- ch = (struct carp_header *)(mtod(m, char *) + *offp);
+ vh = (struct vrrpv3_header *)(mtod(m, char *) + *offp);
- /* verify the CARP checksum */
- m->m_data += *offp;
- if (in_cksum(m, sizeof(*ch))) {
- CARPSTATS_INC(carps_badsum);
- CARP_DEBUG("%s: checksum failed, on %s\n", __func__,
+ switch (vh->vrrp_version) {
+ case CARP_VERSION_CARP:
+ minlen = sizeof(struct carp_header);
+ break;
+ case CARP_VERSION_VRRPv3:
+ minlen = sizeof(struct vrrpv3_header);
+ break;
+ default:
+ CARPSTATS_INC(carps_badver);
+ CARP_DEBUG("%s: unsupported version %d on %s\n", __func__,
+ vh->vrrp_version, if_name(m->m_pkthdr.rcvif));
+ m_freem(m);
+ return (IPPROTO_DONE);
+ }
+
+ /* And now check the length again but with the real minimal length. */
+ if (m->m_pkthdr.len < sizeof(*ip6) + minlen) {
+ CARPSTATS_INC(carps_badlen);
+ CARP_DEBUG("%s: received len %zd < %zd "
+ "on %s\n", __func__, m->m_len - sizeof(struct ip),
+ sizeof(*ip6) + minlen,
if_name(m->m_pkthdr.rcvif));
m_freem(m);
return (IPPROTO_DONE);
}
- m->m_data -= *offp;
- carp_input_c(m, ch, AF_INET6, ip6->ip6_hlim);
+ if (sizeof (*ip6) + minlen < m->m_len) {
+ if ((m = m_pullup(m, sizeof(*ip6) + minlen)) == NULL) {
+ CARPSTATS_INC(carps_hdrops);
+ CARP_DEBUG("%s():%d: pullup failed\n", __func__, __LINE__);
+ return (IPPROTO_DONE);
+ }
+ ip6 = mtod(m, struct ip6_hdr *);
+ vh = (struct vrrpv3_header *)mtodo(m, sizeof(*ip6));
+ }
+
+ switch (vh->vrrp_version) {
+ case CARP_VERSION_CARP: {
+ struct carp_header *ch;
+
+ /* verify the CARP checksum */
+ m->m_data += *offp;
+ if (in_cksum(m, sizeof(struct carp_header))) {
+ CARPSTATS_INC(carps_badsum);
+ CARP_DEBUG("%s: checksum failed, on %s\n", __func__,
+ if_name(m->m_pkthdr.rcvif));
+ m_freem(m);
+ break;
+ }
+ m->m_data -= *offp;
+ ch = (struct carp_header *)((char *)ip6 + sizeof(*ip6));
+ carp_input_c(m, ch, AF_INET6, ip6->ip6_hlim);
+ break;
+ }
+ case CARP_VERSION_VRRPv3: {
+ uint16_t phdrcksum;
+
+ phdrcksum = in6_cksum_pseudo(ip6, ntohs(ip6->ip6_plen),
+ ip6->ip6_nxt, 0);
+ vrrp_input_c(m, sizeof(*ip6), AF_INET6, ip6->ip6_hlim,
+ ntohs(ip6->ip6_plen), phdrcksum);
+ break;
+ }
+ default:
+ KASSERT(false, ("Unsupported version %d", vh->vrrp_version));
+ }
return (IPPROTO_DONE);
}
#endif /* INET6 */
@@ -629,7 +748,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
* The VHID test is outside this mini-function.
*/
static int
-carp_source_is_self(struct mbuf *m, struct ifaddr *ifa, sa_family_t af)
+carp_source_is_self(const struct mbuf *m, struct ifaddr *ifa, sa_family_t af)
{
#ifdef INET
struct ip *ip4;
@@ -659,16 +778,12 @@ carp_source_is_self(struct mbuf *m, struct ifaddr *ifa, sa_family_t af)
return (0);
}
-static void
-carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af, int ttl)
+static struct ifaddr *
+carp_find_ifa(const struct mbuf *m, sa_family_t af, uint8_t vhid)
{
struct ifnet *ifp = m->m_pkthdr.rcvif;
struct ifaddr *ifa, *match;
- struct carp_softc *sc;
- uint64_t tmp_counter;
- struct timeval sc_tv, ch_tv;
int error;
- bool multicast = false;
NET_EPOCH_ASSERT();
@@ -688,9 +803,9 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af, int ttl)
IFNET_FOREACH_IFA(ifp, ifa) {
if (match == NULL && ifa->ifa_carp != NULL &&
ifa->ifa_addr->sa_family == af &&
- ifa->ifa_carp->sc_vhid == ch->carp_vhid)
+ ifa->ifa_carp->sc_vhid == vhid)
match = ifa;
- if (ch->carp_vhid == 0 && carp_source_is_self(m, ifa, af))
+ if (vhid == 0 && carp_source_is_self(m, ifa, af))
error = ELOOP;
}
ifa = error ? NULL : match;
@@ -705,12 +820,37 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af, int ttl)
} else {
CARPSTATS_INC(carps_badvhid);
}
+ }
+
+ return (ifa);
+}
+
+static void
+carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af, int ttl)
+{
+ struct ifnet *ifp = m->m_pkthdr.rcvif;
+ struct ifaddr *ifa;
+ struct carp_softc *sc;
+ uint64_t tmp_counter;
+ struct timeval sc_tv, ch_tv;
+ bool multicast = false;
+
+ NET_EPOCH_ASSERT();
+ MPASS(ch->carp_version == CARP_VERSION_CARP);
+
+ ifa = carp_find_ifa(m, af, ch->carp_vhid);
+ if (ifa == NULL) {
m_freem(m);
return;
}
+ sc = ifa->ifa_carp;
+ CARP_LOCK(sc);
+
/* verify the CARP version. */
- if (ch->carp_version != CARP_VERSION) {
+ if (sc->sc_version != CARP_VERSION_CARP) {
+ CARP_UNLOCK(sc);
+
CARPSTATS_INC(carps_badver);
CARP_DEBUG("%s: invalid version %d\n", if_name(ifp),
ch->carp_version);
@@ -719,8 +859,6 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af, int ttl)
return;
}
- sc = ifa->ifa_carp;
- CARP_LOCK(sc);
if (ifa->ifa_addr->sa_family == AF_INET) {
multicast = IN_MULTICAST(sc->sc_carpaddr.s_addr);
} else {
@@ -749,7 +887,7 @@ carp_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af, int ttl)
/* XXX Replay protection goes here */
- sc->sc_init_counter = 0;
+ sc->sc_init_counter = false;
sc->sc_counter = tmp_counter;
sc_tv.tv_sec = sc->sc_advbase;
@@ -809,11 +947,133 @@ out:
m_freem(m);
}
+static void
+vrrp_input_c(struct mbuf *m, int off, sa_family_t af, int ttl,
+ int len, uint16_t phdrcksum)
+{
+ struct vrrpv3_header *vh = mtodo(m, off);
+ struct ifnet *ifp = m->m_pkthdr.rcvif;
+ struct ifaddr *ifa;
+ struct carp_softc *sc;
+
+ NET_EPOCH_ASSERT();
+ MPASS(vh->vrrp_version == CARP_VERSION_VRRPv3);
+
+ ifa = carp_find_ifa(m, af, vh->vrrp_vrtid);
+ if (ifa == NULL) {
+ m_freem(m);
+ return;
+ }
+
+ sc = ifa->ifa_carp;
+ CARP_LOCK(sc);
+
+ ifa_free(ifa);
+
+ /* verify the CARP version. */
+ if (sc->sc_version != CARP_VERSION_VRRPv3) {
+ CARP_UNLOCK(sc);
+
+ CARPSTATS_INC(carps_badver);
+ CARP_DEBUG("%s: invalid version %d\n", if_name(ifp),
+ vh->vrrp_version);
+ m_freem(m);
+ return;
+ }
+
+ /* verify that the IP TTL is 255. */
+ if (ttl != CARP_DFLTTL) {
+ CARPSTATS_INC(carps_badttl);
+ CARP_DEBUG("%s: received ttl %d != 255 on %s\n", __func__,
+ ttl, if_name(m->m_pkthdr.rcvif));
+ goto out;
+ }
+
+ if (vrrp_checksum_verify(m, off, len, phdrcksum)) {
+ CARPSTATS_INC(carps_badsum);
+ CARP_DEBUG("%s: incorrect checksum for VRID %u@%s\n", __func__,
+ sc->sc_vhid, if_name(ifp));
+ goto out;
+ }
+
+ /* RFC9568, 7.1 Receiving VRRP packets. */
+ if (sc->sc_vrrp_prio == 255) {
+ CARP_DEBUG("%s: our priority is 255. Ignore peer announcement.\n",
+ __func__);
+ goto out;
+ }
+
+ /* XXX TODO Check IP address payload. */
+
+ sc->sc_vrrp_master_inter = ntohs(vh->vrrp_max_adver_int);
+
+ switch (sc->sc_state) {
+ case INIT:
+ break;
+ case MASTER:
+ /*
+ * If we receive an advertisement from a master who's going to
+ * be more frequent than us, go into BACKUP state.
+ * Same if the peer has a higher priority than us.
+ */
+ if (ntohs(vh->vrrp_max_adver_int) < sc->sc_vrrp_adv_inter ||
+ vh->vrrp_priority > sc->sc_vrrp_prio) {
+ callout_stop(&sc->sc_ad_tmo);
+ carp_set_state(sc, BACKUP,
+ "more frequent advertisement received");
+ carp_setrun(sc, 0);
+ carp_delroute(sc);
+ }
+ break;
+ case BACKUP:
+ /*
+ * If we're pre-empting masters who advertise slower than us,
+ * and this one claims to be slower, treat him as down.
+ */
+ if (V_carp_preempt && (ntohs(vh->vrrp_max_adver_int) > sc->sc_vrrp_adv_inter
+ || vh->vrrp_priority < sc->sc_vrrp_prio)) {
+ carp_master_down_locked(sc,
+ "preempting a slower master");
+ break;
+ }
+
+ /*
+ * Otherwise, we reset the counter and wait for the next
+ * advertisement.
+ */
+ carp_setrun(sc, af);
+ break;
+ }
+
+out:
+ CARP_UNLOCK(sc);
+ m_freem(m);
+}
+
static int
-carp_prepare_ad(struct mbuf *m, struct carp_softc *sc, struct carp_header *ch)
+carp_tag(struct carp_softc *sc, struct mbuf *m)
{
struct m_tag *mtag;
+ /* Tag packet for carp_output */
+ if ((mtag = m_tag_get(PACKET_TAG_CARP, sizeof(sc->sc_vhid),
+ M_NOWAIT)) == NULL) {
+ m_freem(m);
+ CARPSTATS_INC(carps_onomem);
+ return (ENOMEM);
+ }
+ bcopy(&sc->sc_vhid, mtag + 1, sizeof(sc->sc_vhid));
+ m_tag_prepend(m, mtag);
+
+ return (0);
+}
+
+static void
+carp_prepare_ad(struct mbuf *m, struct carp_softc *sc, struct carp_header *ch)
+{
+
+ MPASS(sc->sc_version == CARP_VERSION_CARP);
+
if (sc->sc_init_counter) {
/* this could also be seconds since unix epoch */
sc->sc_counter = arc4random();
@@ -826,18 +1086,19 @@ carp_prepare_ad(struct mbuf *m, struct carp_softc *sc, struct carp_header *ch)
ch->carp_counter[1] = htonl(sc->sc_counter&0xffffffff);
carp_hmac_generate(sc, ch->carp_counter, ch->carp_md);
+}
- /* Tag packet for carp_output */
- if ((mtag = m_tag_get(PACKET_TAG_CARP, sizeof(struct carp_softc *),
- M_NOWAIT)) == NULL) {
- m_freem(m);
- CARPSTATS_INC(carps_onomem);
- return (ENOMEM);
+static inline void
+send_ad_locked(struct carp_softc *sc)
+{
+ switch (sc->sc_version) {
+ case CARP_VERSION_CARP:
+ carp_send_ad_locked(sc);
+ break;
+ case CARP_VERSION_VRRPv3:
+ vrrp_send_ad_locked(sc);
+ break;
}
- bcopy(&sc, mtag + 1, sizeof(sc));
- m_tag_prepend(m, mtag);
-
- return (0);
}
/*
@@ -856,7 +1117,7 @@ carp_send_ad_all(void *ctx __unused, int pending __unused)
if (sc->sc_state == MASTER) {
CARP_LOCK(sc);
CURVNET_SET(sc->sc_carpdev->if_vnet);
- carp_send_ad_locked(sc);
+ send_ad_locked(sc);
CURVNET_RESTORE();
CARP_UNLOCK(sc);
}
@@ -866,7 +1127,7 @@ carp_send_ad_all(void *ctx __unused, int pending __unused)
/* Send a periodic advertisement, executed in callout context. */
static void
-carp_send_ad(void *v)
+carp_callout(void *v)
{
struct carp_softc *sc = v;
struct epoch_tracker et;
@@ -874,7 +1135,7 @@ carp_send_ad(void *v)
NET_EPOCH_ENTER(et);
CARP_LOCK_ASSERT(sc);
CURVNET_SET(sc->sc_carpdev->if_vnet);
- carp_send_ad_locked(sc);
+ send_ad_locked(sc);
CURVNET_RESTORE();
CARP_UNLOCK(sc);
NET_EPOCH_EXIT(et);
@@ -958,12 +1219,13 @@ carp_send_ad_locked(struct carp_softc *sc)
NET_EPOCH_ASSERT();
CARP_LOCK_ASSERT(sc);
+ MPASS(sc->sc_version == CARP_VERSION_CARP);
advskew = DEMOTE_ADVSKEW(sc);
tv.tv_sec = sc->sc_advbase;
tv.tv_usec = advskew * 1000000 / 256;
- ch.carp_version = CARP_VERSION;
+ ch.carp_version = CARP_VERSION_CARP;
ch.carp_type = CARP_ADVERTISEMENT;
ch.carp_vhid = sc->sc_vhid;
ch.carp_advbase = sc->sc_advbase;
@@ -1012,7 +1274,9 @@ carp_send_ad_locked(struct carp_softc *sc)
ch_ptr = (struct carp_header *)(&ip[1]);
bcopy(&ch, ch_ptr, sizeof(ch));
- if (carp_prepare_ad(m, sc, ch_ptr))
+ carp_prepare_ad(m, sc, ch_ptr);
+ if (IN_MULTICAST(ntohl(sc->sc_carpaddr.s_addr)) &&
+ carp_tag(sc, m) != 0)
goto resched;
m->m_data += sizeof(*ip);
@@ -1072,7 +1336,9 @@ carp_send_ad_locked(struct carp_softc *sc)
ch_ptr = (struct carp_header *)(&ip6[1]);
bcopy(&ch, ch_ptr, sizeof(ch));
- if (carp_prepare_ad(m, sc, ch_ptr))
+ carp_prepare_ad(m, sc, ch_ptr);
+ if (IN6_IS_ADDR_MULTICAST(&sc->sc_carpaddr6) &&
+ carp_tag(sc, m) != 0)
goto resched;
m->m_data += sizeof(*ip6);
@@ -1087,7 +1353,188 @@ carp_send_ad_locked(struct carp_softc *sc)
#endif /* INET6 */
resched:
- callout_reset(&sc->sc_ad_tmo, tvtohz(&tv), carp_send_ad, sc);
+ callout_reset(&sc->sc_ad_tmo, tvtohz(&tv), carp_callout, sc);
+}
+
+static void
+vrrp_send_ad_locked(struct carp_softc *sc)
+{
+ struct vrrpv3_header *vh_ptr;
+ struct ifaddr *ifa;
+ struct mbuf *m;
+ int len;
+ struct vrrpv3_header vh = {
+ .vrrp_version = CARP_VERSION_VRRPv3,
+ .vrrp_type = VRRP_TYPE_ADVERTISEMENT,
+ .vrrp_vrtid = sc->sc_vhid,
+ .vrrp_priority = sc->sc_vrrp_prio,
+ .vrrp_count_addr = 0,
+ .vrrp_max_adver_int = htons(sc->sc_vrrp_adv_inter),
+ .vrrp_checksum = 0,
+ };
+
+ NET_EPOCH_ASSERT();
+ CARP_LOCK_ASSERT(sc);
+ MPASS(sc->sc_version == CARP_VERSION_VRRPv3);
+
+#ifdef INET
+ if (sc->sc_naddrs) {
+ struct ip *ip;
+
+ m = m_gethdr(M_NOWAIT, MT_DATA);
+ if (m == NULL) {
+ CARPSTATS_INC(carps_onomem);
+ goto resched;
+ }
+ len = sizeof(*ip) + sizeof(vh);
+ m->m_pkthdr.len = len;
+ m->m_pkthdr.rcvif = NULL;
+ m->m_len = len;
+ M_ALIGN(m, m->m_len);
+ m->m_flags |= M_MCAST;
+ ip = mtod(m, struct ip *);
+ ip->ip_v = IPVERSION;
+ ip->ip_hl = sizeof(*ip) >> 2;
+ ip->ip_tos = V_carp_dscp << IPTOS_DSCP_OFFSET;
+ ip->ip_off = htons(IP_DF);
+ ip->ip_ttl = CARP_DFLTTL;
+ ip->ip_p = IPPROTO_CARP;
+ ip->ip_sum = 0;
+ ip_fillid(ip);
+
+ ifa = carp_best_ifa(AF_INET, sc->sc_carpdev);
+ if (ifa != NULL) {
+ ip->ip_src.s_addr =
+ ifatoia(ifa)->ia_addr.sin_addr.s_addr;
+ ifa_free(ifa);
+ } else
+ ip->ip_src.s_addr = 0;
+ ip->ip_dst.s_addr = htonl(INADDR_CARP_GROUP);
+
+ /* Include the IP addresses in the announcement. */
+ for (int i = 0; i < (sc->sc_naddrs + sc->sc_naddrs6); i++) {
+ struct sockaddr_in *in;
+
+ MPASS(sc->sc_ifas[i] != NULL);
+ if (sc->sc_ifas[i]->ifa_addr->sa_family != AF_INET)
+ continue;
+
+ in = (struct sockaddr_in *)sc->sc_ifas[i]->ifa_addr;
+
+ if (m_append(m, sizeof(in->sin_addr),
+ (caddr_t)&in->sin_addr) != 1) {
+ m_freem(m);
+ goto resched;
+ }
+
+ vh.vrrp_count_addr++;
+ len += sizeof(in->sin_addr);
+ }
+ ip->ip_len = htons(len);
+
+ vh_ptr = (struct vrrpv3_header *)mtodo(m, sizeof(*ip));
+ bcopy(&vh, vh_ptr, sizeof(vh));
+
+ vh_ptr->vrrp_checksum = in_pseudo(ip->ip_src.s_addr,
+ ip->ip_dst.s_addr,
+ htonl((uint16_t)(len - sizeof(*ip)) + ip->ip_p));
+ vh_ptr->vrrp_checksum = in_cksum_skip(m, len, sizeof(*ip));
+
+ if (carp_tag(sc, m))
+ goto resched;
+
+ CARPSTATS_INC(carps_opackets);
+
+ carp_send_ad_error(sc, ip_output(m, NULL, NULL, IP_RAWOUTPUT,
+ &sc->sc_carpdev->if_carp->cif_imo, NULL));
+ }
+#endif
+#ifdef INET6
+ if (sc->sc_naddrs6) {
+ struct ip6_hdr *ip6;
+
+ m = m_gethdr(M_NOWAIT, MT_DATA);
+ if (m == NULL) {
+ CARPSTATS_INC(carps_onomem);
+ goto resched;
+ }
+ len = sizeof(*ip6) + sizeof(vh);
+ m->m_pkthdr.len = len;
+ m->m_pkthdr.rcvif = NULL;
+ m->m_len = len;
+ M_ALIGN(m, m->m_len);
+ m->m_flags |= M_MCAST;
+ ip6 = mtod(m, struct ip6_hdr *);
+ bzero(ip6, sizeof(*ip6));
+ ip6->ip6_vfc |= IPV6_VERSION;
+ /* Traffic class isn't defined in ip6 struct instead
+ * it gets offset into flowid field */
+ ip6->ip6_flow |= htonl(V_carp_dscp << (IPV6_FLOWLABEL_LEN +
+ IPTOS_DSCP_OFFSET));
+ ip6->ip6_hlim = CARP_DFLTTL;
+ ip6->ip6_nxt = IPPROTO_CARP;
+
+ /* set the source address */
+ ifa = carp_best_ifa(AF_INET6, sc->sc_carpdev);
+ if (ifa != NULL) {
+ bcopy(IFA_IN6(ifa), &ip6->ip6_src,
+ sizeof(struct in6_addr));
+ ifa_free(ifa);
+ } else
+ /* This should never happen with IPv6. */
+ bzero(&ip6->ip6_src, sizeof(struct in6_addr));
+
+ /* Set the multicast destination. */
+ bzero(&ip6->ip6_dst, sizeof(ip6->ip6_dst));
+ ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
+ ip6->ip6_dst.s6_addr8[15] = 0x12;
+
+ /* Include the IP addresses in the announcement. */
+ len = sizeof(vh);
+ for (int i = 0; i < (sc->sc_naddrs + sc->sc_naddrs6); i++) {
+ struct sockaddr_in6 *in6;
+
+ MPASS(sc->sc_ifas[i] != NULL);
+ if (sc->sc_ifas[i]->ifa_addr->sa_family != AF_INET6)
+ continue;
+
+ in6 = (struct sockaddr_in6 *)sc->sc_ifas[i]->ifa_addr;
+
+ if (m_append(m, sizeof(in6->sin6_addr),
+ (char *)&in6->sin6_addr) != 1) {
+ m_freem(m);
+ goto resched;
+ }
+
+ vh.vrrp_count_addr++;
+ len += sizeof(in6->sin6_addr);
+ }
+ ip6->ip6_plen = htonl(len);
+
+ vh_ptr = (struct vrrpv3_header *)mtodo(m, sizeof(*ip6));
+ bcopy(&vh, vh_ptr, sizeof(vh));
+
+ vh_ptr->vrrp_checksum = in6_cksum_pseudo(ip6, len, ip6->ip6_nxt, 0);
+ vh_ptr->vrrp_checksum = in_cksum_skip(m, len + sizeof(*ip6), sizeof(*ip6));
+
+ if (in6_setscope(&ip6->ip6_dst, sc->sc_carpdev, NULL) != 0) {
+ m_freem(m);
+ CARP_DEBUG("%s: in6_setscope failed\n", __func__);
+ goto resched;
+ }
+
+ if (carp_tag(sc, m))
+ goto resched;
+ CARPSTATS_INC(carps_opackets6);
+
+ carp_send_ad_error(sc, ip6_output(m, NULL, NULL, 0,
+ &sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL));
+ }
+#endif
+
+resched:
+ callout_reset(&sc->sc_ad_tmo, sc->sc_vrrp_adv_inter * hz / 100,
+ carp_callout, sc);
}
static void
@@ -1178,7 +1625,7 @@ carp_send_arp(struct carp_softc *sc)
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
addr = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr;
- arp_announce_ifaddr(sc->sc_carpdev, addr, LLADDR(&sc->sc_addr));
+ arp_announce_ifaddr(sc->sc_carpdev, addr, sc->sc_addr);
}
}
@@ -1188,7 +1635,7 @@ carp_iamatch(struct ifaddr *ifa, uint8_t **enaddr)
struct carp_softc *sc = ifa->ifa_carp;
if (sc->sc_state == MASTER) {
- *enaddr = LLADDR(&sc->sc_addr);
+ *enaddr = sc->sc_addr;
return (1);
}
@@ -1259,12 +1706,12 @@ carp_macmatch6(struct ifnet *ifp, struct mbuf *m, const struct in6_addr *taddr)
sizeof(struct carp_softc *), M_NOWAIT);
if (mtag == NULL)
/* Better a bit than nothing. */
- return (LLADDR(&sc->sc_addr));
+ return (sc->sc_addr);
bcopy(&sc, mtag + 1, sizeof(sc));
m_tag_prepend(m, mtag);
- return (LLADDR(&sc->sc_addr));
+ return (sc->sc_addr);
}
return (NULL);
@@ -1286,7 +1733,7 @@ carp_forus(struct ifnet *ifp, u_char *dhost)
* CARP_LOCK() is not here, since would protect nothing, but
* cause deadlock with if_bridge, calling this under its lock.
*/
- if (sc->sc_state == MASTER && !bcmp(dhost, LLADDR(&sc->sc_addr),
+ if (sc->sc_state == MASTER && !bcmp(dhost, sc->sc_addr,
ETHER_ADDR_LEN)) {
CIF_UNLOCK(ifp->if_carp);
return (1);
@@ -1327,7 +1774,7 @@ carp_master_down_locked(struct carp_softc *sc, const char *reason)
switch (sc->sc_state) {
case BACKUP:
carp_set_state(sc, MASTER, reason);
- carp_send_ad_locked(sc);
+ send_ad_locked(sc);
#ifdef INET
carp_send_arp(sc);
#endif
@@ -1357,6 +1804,7 @@ static void
carp_setrun(struct carp_softc *sc, sa_family_t af)
{
struct timeval tv;
+ int timeout;
CARP_LOCK_ASSERT(sc);
@@ -1373,40 +1821,63 @@ carp_setrun(struct carp_softc *sc, sa_family_t af)
break;
case BACKUP:
callout_stop(&sc->sc_ad_tmo);
- tv.tv_sec = 3 * sc->sc_advbase;
- tv.tv_usec = sc->sc_advskew * 1000000 / 256;
+
+ switch (sc->sc_version) {
+ case CARP_VERSION_CARP:
+ tv.tv_sec = 3 * sc->sc_advbase;
+ tv.tv_usec = sc->sc_advskew * 1000000 / 256;
+ timeout = tvtohz(&tv);
+ break;
+ case CARP_VERSION_VRRPv3:
+ /* skew time */
+ timeout = (256 - sc->sc_vrrp_prio) *
+ sc->sc_vrrp_master_inter / 256;
+ timeout += (3 * sc->sc_vrrp_master_inter);
+ timeout *= hz;
+ timeout /= 100; /* master interval is in centiseconds */
+ break;
+ }
switch (af) {
#ifdef INET
case AF_INET:
- callout_reset(&sc->sc_md_tmo, tvtohz(&tv),
+ callout_reset(&sc->sc_md_tmo, timeout,
carp_master_down, sc);
break;
#endif
#ifdef INET6
case AF_INET6:
- callout_reset(&sc->sc_md6_tmo, tvtohz(&tv),
+ callout_reset(&sc->sc_md6_tmo, timeout,
carp_master_down, sc);
break;
#endif
default:
#ifdef INET
if (sc->sc_naddrs)
- callout_reset(&sc->sc_md_tmo, tvtohz(&tv),
+ callout_reset(&sc->sc_md_tmo, timeout,
carp_master_down, sc);
#endif
#ifdef INET6
if (sc->sc_naddrs6)
- callout_reset(&sc->sc_md6_tmo, tvtohz(&tv),
+ callout_reset(&sc->sc_md6_tmo, timeout,
carp_master_down, sc);
#endif
break;
}
break;
case MASTER:
- tv.tv_sec = sc->sc_advbase;
- tv.tv_usec = sc->sc_advskew * 1000000 / 256;
- callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
- carp_send_ad, sc);
+ switch (sc->sc_version) {
+ case CARP_VERSION_CARP:
+ tv.tv_sec = sc->sc_advbase;
+ tv.tv_usec = sc->sc_advskew * 1000000 / 256;
+ callout_reset(&sc->sc_ad_tmo, tvtohz(&tv),
+ carp_callout, sc);
+ break;
+ case CARP_VERSION_VRRPv3:
+ callout_reset(&sc->sc_ad_tmo,
+ sc->sc_vrrp_adv_inter * hz / 100,
+ carp_callout, sc);
+ break;
+ }
break;
}
}
@@ -1559,7 +2030,7 @@ int
carp_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *sa)
{
struct m_tag *mtag;
- struct carp_softc *sc;
+ int vhid;
if (!sa)
return (0);
@@ -1581,20 +2052,7 @@ carp_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *sa)
if (mtag == NULL)
return (0);
- bcopy(mtag + 1, &sc, sizeof(sc));
-
- switch (sa->sa_family) {
- case AF_INET:
- if (! IN_MULTICAST(ntohl(sc->sc_carpaddr.s_addr)))
- return (0);
- break;
- case AF_INET6:
- if (! IN6_IS_ADDR_MULTICAST(&sc->sc_carpaddr6))
- return (0);
- break;
- default:
- panic("Unknown af");
- }
+ bcopy(mtag + 1, &vhid, sizeof(vhid));
/* Set the source MAC address to the Virtual Router MAC Address. */
switch (ifp->if_type) {
@@ -1609,7 +2067,7 @@ carp_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *sa)
eh->ether_shost[2] = 0x5e;
eh->ether_shost[3] = 0;
eh->ether_shost[4] = 1;
- eh->ether_shost[5] = sc->sc_vhid;
+ eh->ether_shost[5] = vhid;
}
break;
default:
@@ -1622,7 +2080,7 @@ carp_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *sa)
}
static struct carp_softc*
-carp_alloc(struct ifnet *ifp)
+carp_alloc(struct ifnet *ifp, carp_version_t version, int vhid)
{
struct carp_softc *sc;
struct carp_if *cif;
@@ -1632,20 +2090,31 @@ carp_alloc(struct ifnet *ifp)
if ((cif = ifp->if_carp) == NULL)
cif = carp_alloc_if(ifp);
- sc = malloc(sizeof(*sc), M_CARP, M_WAITOK|M_ZERO);
-
- sc->sc_advbase = CARP_DFLTINTV;
- sc->sc_vhid = -1; /* required setting */
- sc->sc_init_counter = 1;
- sc->sc_state = INIT;
-
- sc->sc_ifasiz = sizeof(struct ifaddr *);
+ sc = malloc(sizeof(*sc), M_CARP, M_WAITOK);
+ *sc = (struct carp_softc ){
+ .sc_vhid = vhid,
+ .sc_version = version,
+ .sc_state = INIT,
+ .sc_carpdev = ifp,
+ .sc_ifasiz = sizeof(struct ifaddr *),
+ .sc_addr = { 0, 0, 0x5e, 0, 1, vhid },
+ };
sc->sc_ifas = malloc(sc->sc_ifasiz, M_CARP, M_WAITOK|M_ZERO);
- sc->sc_carpdev = ifp;
- sc->sc_carpaddr.s_addr = htonl(INADDR_CARP_GROUP);
- sc->sc_carpaddr6.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
- sc->sc_carpaddr6.s6_addr8[15] = 0x12;
+ switch (version) {
+ case CARP_VERSION_CARP:
+ sc->sc_advbase = CARP_DFLTINTV;
+ sc->sc_init_counter = true;
+ sc->sc_carpaddr.s_addr = htonl(INADDR_CARP_GROUP);
+ sc->sc_carpaddr6.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
+ sc->sc_carpaddr6.s6_addr8[15] = 0x12;
+ break;
+ case CARP_VERSION_VRRPv3:
+ sc->sc_vrrp_adv_inter = 100;
+ sc->sc_vrrp_master_inter = sc->sc_vrrp_adv_inter;
+ sc->sc_vrrp_prio = 100;
+ break;
+ }
CARP_LOCK_INIT(sc);
#ifdef INET
@@ -1770,12 +2239,19 @@ carp_carprcp(void *arg, struct carp_softc *sc, int priv)
CARP_LOCK(sc);
carpr->carpr_state = sc->sc_state;
carpr->carpr_vhid = sc->sc_vhid;
- carpr->carpr_advbase = sc->sc_advbase;
- carpr->carpr_advskew = sc->sc_advskew;
- if (priv)
- bcopy(sc->sc_key, carpr->carpr_key, sizeof(carpr->carpr_key));
- else
- bzero(carpr->carpr_key, sizeof(carpr->carpr_key));
+ switch (sc->sc_version) {
+ case CARP_VERSION_CARP:
+ carpr->carpr_advbase = sc->sc_advbase;
+ carpr->carpr_advskew = sc->sc_advskew;
+ if (priv)
+ bcopy(sc->sc_key, carpr->carpr_key,
+ sizeof(carpr->carpr_key));
+ else
+ bzero(carpr->carpr_key, sizeof(carpr->carpr_key));
+ break;
+ case CARP_VERSION_VRRPv3:
+ break;
+ }
CARP_UNLOCK(sc);
return (true);
@@ -1788,9 +2264,21 @@ carp_ioctl_set(if_t ifp, struct carpkreq *carpr)
struct carp_softc *sc = NULL;
int error = 0;
+ if (carpr->carpr_vhid <= 0 || carpr->carpr_vhid > CARP_MAXVHID)
+ return (EINVAL);
- if (carpr->carpr_vhid <= 0 || carpr->carpr_vhid > CARP_MAXVHID ||
- carpr->carpr_advbase < 0 || carpr->carpr_advskew < 0) {
+ switch (carpr->carpr_version) {
+ case CARP_VERSION_CARP:
+ if (carpr->carpr_advbase != 0 && (carpr->carpr_advbase > 255 ||
+ carpr->carpr_advbase < CARP_DFLTINTV))
+ return (EINVAL);
+ if (carpr->carpr_advskew < 0 || carpr->carpr_advskew >= 255)
+ return (EINVAL);
+ break;
+ case CARP_VERSION_VRRPv3:
+ /* XXXGL: shouldn't we check anything? */
+ break;
+ default:
return (EINVAL);
}
@@ -1799,41 +2287,37 @@ carp_ioctl_set(if_t ifp, struct carpkreq *carpr)
if (sc->sc_vhid == carpr->carpr_vhid)
break;
}
- if (sc == NULL) {
- sc = carp_alloc(ifp);
- CARP_LOCK(sc);
- sc->sc_vhid = carpr->carpr_vhid;
- LLADDR(&sc->sc_addr)[0] = 0;
- LLADDR(&sc->sc_addr)[1] = 0;
- LLADDR(&sc->sc_addr)[2] = 0x5e;
- LLADDR(&sc->sc_addr)[3] = 0;
- LLADDR(&sc->sc_addr)[4] = 1;
- LLADDR(&sc->sc_addr)[5] = sc->sc_vhid;
- } else
- CARP_LOCK(sc);
- if (carpr->carpr_advbase > 0) {
- if (carpr->carpr_advbase > 255 ||
- carpr->carpr_advbase < CARP_DFLTINTV) {
- error = EINVAL;
- goto out;
+
+ if (sc == NULL)
+ sc = carp_alloc(ifp, carpr->carpr_version, carpr->carpr_vhid);
+ else if (sc->sc_version != carpr->carpr_version)
+ return (EINVAL);
+
+ CARP_LOCK(sc);
+ switch (sc->sc_version) {
+ case CARP_VERSION_CARP:
+ if (carpr->carpr_advbase != 0)
+ sc->sc_advbase = carpr->carpr_advbase;
+ sc->sc_advskew = carpr->carpr_advskew;
+ if (carpr->carpr_addr.s_addr != INADDR_ANY)
+ sc->sc_carpaddr = carpr->carpr_addr;
+ if (!IN6_IS_ADDR_UNSPECIFIED(&carpr->carpr_addr6)) {
+ memcpy(&sc->sc_carpaddr6, &carpr->carpr_addr6,
+ sizeof(sc->sc_carpaddr6));
}
- sc->sc_advbase = carpr->carpr_advbase;
- }
- if (carpr->carpr_advskew >= 255) {
- error = EINVAL;
- goto out;
- }
- sc->sc_advskew = carpr->carpr_advskew;
- if (carpr->carpr_addr.s_addr != INADDR_ANY)
- sc->sc_carpaddr = carpr->carpr_addr;
- if (! IN6_IS_ADDR_UNSPECIFIED(&carpr->carpr_addr6)) {
- memcpy(&sc->sc_carpaddr6, &carpr->carpr_addr6,
- sizeof(sc->sc_carpaddr6));
- }
- if (carpr->carpr_key[0] != '\0') {
- bcopy(carpr->carpr_key, sc->sc_key, sizeof(sc->sc_key));
- carp_hmac_prepare(sc);
+ if (carpr->carpr_key[0] != '\0') {
+ bcopy(carpr->carpr_key, sc->sc_key, sizeof(sc->sc_key));
+ carp_hmac_prepare(sc);
+ }
+ break;
+ case CARP_VERSION_VRRPv3:
+ if (carpr->carpr_vrrp_priority != 0)
+ sc->sc_vrrp_prio = carpr->carpr_vrrp_priority;
+ if (carpr->carpr_vrrp_adv_inter)
+ sc->sc_vrrp_adv_inter = carpr->carpr_vrrp_adv_inter;
+ break;
}
+
if (sc->sc_state != INIT &&
carpr->carpr_state != sc->sc_state) {
switch (carpr->carpr_state) {
@@ -1854,8 +2338,6 @@ carp_ioctl_set(if_t ifp, struct carpkreq *carpr)
break;
}
}
-
-out:
CARP_UNLOCK(sc);
return (error);
@@ -1910,7 +2392,9 @@ int
carp_ioctl(struct ifreq *ifr, u_long cmd, struct thread *td)
{
struct carpreq carpr;
- struct carpkreq carprk = { };
+ struct carpkreq carprk = {
+ .carpr_version = CARP_VERSION_CARP,
+ };
struct ifnet *ifp;
int error = 0;
@@ -2034,7 +2518,8 @@ carp_attach(struct ifaddr *ifa, int vhid)
CARP_LOCK(sc);
sc->sc_ifas[index - 1] = ifa;
ifa->ifa_carp = sc;
- carp_hmac_prepare(sc);
+ if (sc->sc_version == CARP_VERSION_CARP)
+ carp_hmac_prepare(sc);
carp_sc_state(sc);
CARP_UNLOCK(sc);
@@ -2087,7 +2572,8 @@ carp_detach(struct ifaddr *ifa, bool keep_cif)
ifa->ifa_carp = NULL;
ifa_free(ifa);
- carp_hmac_prepare(sc);
+ if (sc->sc_version == CARP_VERSION_CARP)
+ carp_hmac_prepare(sc);
carp_sc_state(sc);
if (!keep_cif && sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0)
@@ -2279,13 +2765,23 @@ carp_nl_send(void *arg, struct carp_softc *sc, int priv)
nlattr_add_u32(nw, CARP_NL_VHID, sc->sc_vhid);
nlattr_add_u32(nw, CARP_NL_STATE, sc->sc_state);
- nlattr_add_s32(nw, CARP_NL_ADVBASE, sc->sc_advbase);
- nlattr_add_s32(nw, CARP_NL_ADVSKEW, sc->sc_advskew);
- nlattr_add_in_addr(nw, CARP_NL_ADDR, &sc->sc_carpaddr);
- nlattr_add_in6_addr(nw, CARP_NL_ADDR6, &sc->sc_carpaddr6);
-
- if (priv)
- nlattr_add(nw, CARP_NL_KEY, sizeof(sc->sc_key), sc->sc_key);
+ nlattr_add_u8(nw, CARP_NL_VERSION, sc->sc_version);
+ switch (sc->sc_version) {
+ case CARP_VERSION_CARP:
+ nlattr_add_s32(nw, CARP_NL_ADVBASE, sc->sc_advbase);
+ nlattr_add_s32(nw, CARP_NL_ADVSKEW, sc->sc_advskew);
+ nlattr_add_in_addr(nw, CARP_NL_ADDR, &sc->sc_carpaddr);
+ nlattr_add_in6_addr(nw, CARP_NL_ADDR6, &sc->sc_carpaddr6);
+ if (priv)
+ nlattr_add(nw, CARP_NL_KEY, sizeof(sc->sc_key),
+ sc->sc_key);
+ break;
+ case CARP_VERSION_VRRPv3:
+ nlattr_add_u8(nw, CARP_NL_VRRP_PRIORITY, sc->sc_vrrp_prio);
+ nlattr_add_u16(nw, CARP_NL_VRRP_ADV_INTER,
+ sc->sc_vrrp_adv_inter);
+ break;
+ }
CARP_UNLOCK(sc);
@@ -2307,6 +2803,9 @@ struct nl_carp_parsed {
char key[CARP_KEY_LEN];
struct in_addr addr;
struct in6_addr addr6;
+ carp_version_t version;
+ uint8_t vrrp_prio;
+ uint16_t vrrp_adv_inter;
};
#define _IN(_field) offsetof(struct genlmsghdr, _field)
@@ -2322,6 +2821,9 @@ static const struct nlattr_parser nla_p_set[] = {
{ .type = CARP_NL_ADDR, .off = _OUT(addr), .cb = nlattr_get_in_addr },
{ .type = CARP_NL_ADDR6, .off = _OUT(addr6), .cb = nlattr_get_in6_addr },
{ .type = CARP_NL_IFNAME, .off = _OUT(ifname), .cb = nlattr_get_string },
+ { .type = CARP_NL_VERSION, .off = _OUT(version), .cb = nlattr_get_uint8 },
+ { .type = CARP_NL_VRRP_PRIORITY, .off = _OUT(vrrp_prio), .cb = nlattr_get_uint8 },
+ { .type = CARP_NL_VRRP_ADV_INTER, .off = _OUT(vrrp_adv_inter), .cb = nlattr_get_uint16 },
};
static const struct nlfield_parser nlf_p_set[] = {
};
@@ -2393,12 +2895,24 @@ carp_nl_set(struct nlmsghdr *hdr, struct nl_pstate *npt)
return (EINVAL);
if (attrs.state > CARP_MAXSTATE)
return (EINVAL);
- if (attrs.advbase < 0 || attrs.advskew < 0)
- return (EINVAL);
- if (attrs.advbase > 255)
- return (EINVAL);
- if (attrs.advskew >= 255)
+ if (attrs.version == 0) /* compat with pre-VRRPv3 */
+ attrs.version = CARP_VERSION_CARP;
+ switch (attrs.version) {
+ case CARP_VERSION_CARP:
+ if (attrs.advbase < 0 || attrs.advskew < 0)
+ return (EINVAL);
+ if (attrs.advbase > 255)
+ return (EINVAL);
+ if (attrs.advskew >= 255)
+ return (EINVAL);
+ break;
+ case CARP_VERSION_VRRPv3:
+ if (attrs.vrrp_adv_inter > VRRP_MAX_INTERVAL)
+ return (EINVAL);
+ break;
+ default:
return (EINVAL);
+ }
NET_EPOCH_ENTER(et);
if (attrs.ifname != NULL)
@@ -2418,12 +2932,20 @@ carp_nl_set(struct nlmsghdr *hdr, struct nl_pstate *npt)
carpr.carpr_count = 1;
carpr.carpr_vhid = attrs.vhid;
carpr.carpr_state = attrs.state;
- carpr.carpr_advbase = attrs.advbase;
- carpr.carpr_advskew = attrs.advskew;
- carpr.carpr_addr = attrs.addr;
- carpr.carpr_addr6 = attrs.addr6;
-
- memcpy(&carpr.carpr_key, &attrs.key, sizeof(attrs.key));
+ carpr.carpr_version = attrs.version;
+ switch (attrs.version) {
+ case CARP_VERSION_CARP:
+ carpr.carpr_advbase = attrs.advbase;
+ carpr.carpr_advskew = attrs.advskew;
+ carpr.carpr_addr = attrs.addr;
+ carpr.carpr_addr6 = attrs.addr6;
+ memcpy(&carpr.carpr_key, &attrs.key, sizeof(attrs.key));
+ break;
+ case CARP_VERSION_VRRPv3:
+ carpr.carpr_vrrp_priority = attrs.vrrp_prio;
+ carpr.carpr_vrrp_adv_inter = attrs.vrrp_adv_inter;
+ break;
+ }
sx_xlock(&carp_sx);
error = carp_ioctl_set(ifp, &carpr);
diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h
index 0c22e9434797..dc3d9a68b43b 100644
--- a/sys/netinet/ip_carp.h
+++ b/sys/netinet/ip_carp.h
@@ -31,6 +31,7 @@
#ifndef _IP_CARP_H
#define _IP_CARP_H
+#ifdef _KERNEL
/*
* The CARP header layout is as follows:
*
@@ -77,14 +78,53 @@ struct carp_header {
unsigned char carp_md[20]; /* SHA1 HMAC */
} __packed;
-#ifdef CTASSERT
CTASSERT(sizeof(struct carp_header) == 36);
+
+/*
+ * The VRRPv3 header layout is as follows:
+ * See RFC9568, 5.1. VRRP Packet Format
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |Version| Type | Virtual Rtr ID| Priority |Count IPvX Addr|
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |(rsvd) | Max Adver Int | Checksum |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | |
+ * + +
+ * | IPvX Address(es) |
+ * + +
+ * + +
+ * + +
+ * + +
+ * | |
+ * + +
+ * | |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+struct vrrpv3_header {
+#if BYTE_ORDER == LITTLE_ENDIAN
+ uint8_t vrrp_type:4,
+ vrrp_version:4;
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ uint8_t vrrp_version:4,
+ vrrp_type:4;
#endif
+ uint8_t vrrp_vrtid;
+ uint8_t vrrp_priority;
+ uint8_t vrrp_count_addr;
+ uint16_t vrrp_max_adver_int;
+ uint16_t vrrp_checksum;
+} __packed;
-#define CARP_DFLTTL 255
+CTASSERT(sizeof(struct vrrpv3_header) == 8);
+#endif /* _KERNEL */
-/* carp_version */
-#define CARP_VERSION 2
+#define CARP_DFLTTL 255
/* carp_type */
#define CARP_ADVERTISEMENT 0x01
@@ -94,6 +134,8 @@ CTASSERT(sizeof(struct carp_header) == 36);
/* carp_advbase */
#define CARP_DFLTINTV 1
+#define VRRP_TYPE_ADVERTISEMENT 0x01
+#define VRRP_MAX_INTERVAL (0x1000 - 1)
/*
* Statistics.
*/
@@ -136,6 +178,11 @@ struct carpreq {
#define SIOCSVH _IOWR('i', 245, struct ifreq)
#define SIOCGVH _IOWR('i', 246, struct ifreq)
+typedef enum carp_version {
+ CARP_VERSION_CARP = 2,
+ CARP_VERSION_VRRPv3 = 3,
+} carp_version_t;
+
#ifdef _KERNEL
int carp_ioctl(struct ifreq *, u_long, struct thread *);
int carp_attach(struct ifaddr *, int);
diff --git a/sys/netinet/ip_carp_nl.h b/sys/netinet/ip_carp_nl.h
index 89720af3e0dc..de4c0367c1d3 100644
--- a/sys/netinet/ip_carp_nl.h
+++ b/sys/netinet/ip_carp_nl.h
@@ -32,6 +32,9 @@ enum carp_nl_type_t {
CARP_NL_ADDR = 7, /* in_addr_t */
CARP_NL_ADDR6 = 8, /* in6_addr_t */
CARP_NL_IFNAME = 9, /* string */
+ CARP_NL_VERSION = 10, /* u8 */
+ CARP_NL_VRRP_PRIORITY = 11, /* u8 */
+ CARP_NL_VRRP_ADV_INTER = 12, /* u16, 12-bit field in centiseconds*/
};
#endif
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 2b59e46b5bcc..937dc8fbbbc2 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -979,7 +979,7 @@ typedef struct _ipfw_range_tlv {
#define IPFW_RCFLAG_USER (IPFW_RCFLAG_RANGE | IPFW_RCFLAG_ALL | \
IPFW_RCFLAG_SET | IPFW_RCFLAG_DYNAMIC)
/* Internally used flags */
-#define IPFW_RCFLAG_DEFAULT 0x0100 /* Do not skip defaul rule */
+#define IPFW_RCFLAG_DEFAULT 0x0100 /* Do not skip default rule */
typedef struct _ipfw_ta_tinfo {
uint32_t flags; /* Format flags */
diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h
index 9696c4e954ba..c9fd0341f83a 100644
--- a/sys/netinet/sctp_header.h
+++ b/sys/netinet/sctp_header.h
@@ -83,7 +83,7 @@ struct sctp_supported_addr_param {
/* heartbeat info parameter */
struct sctp_heartbeat_info_param {
struct sctp_paramhdr ph;
- uint32_t time_value_1;
+ time_t time_value_1;
uint32_t time_value_2;
uint32_t random_value1;
uint32_t random_value2;
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index a30fd95fef30..4c40e0de4326 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -5241,6 +5241,10 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
uint32_t mid;
int need_reasm_check = 0;
+ KASSERT(stcb != NULL, ("stcb == NULL"));
+ SCTP_TCB_LOCK_ASSERT(stcb);
+ SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep);
+
asoc = &stcb->asoc;
mid = strmin->last_mid_delivered;
/*
@@ -5278,11 +5282,9 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
/* deliver it to at least the delivery-q */
if (stcb->sctp_socket) {
sctp_mark_non_revokable(asoc, control->sinfo_tsn);
- sctp_add_to_readq(stcb->sctp_ep, stcb,
- control,
- &stcb->sctp_socket->so_rcv,
- 1, SCTP_READ_LOCK_HELD,
- SCTP_SO_NOT_LOCKED);
+ sctp_add_to_readq(stcb->sctp_ep, stcb, control,
+ &stcb->sctp_socket->so_rcv, 1,
+ SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED);
}
} else {
/* Its a fragmented message */
@@ -5352,8 +5354,7 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
strmin->last_mid_delivered = control->mid;
if (stcb->sctp_socket) {
sctp_mark_non_revokable(asoc, control->sinfo_tsn);
- sctp_add_to_readq(stcb->sctp_ep, stcb,
- control,
+ sctp_add_to_readq(stcb->sctp_ep, stcb, control,
&stcb->sctp_socket->so_rcv, 1,
SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED);
}
@@ -5394,6 +5395,11 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb,
* it can be delivered... But for now we just dump everything on the
* queue.
*/
+
+ KASSERT(stcb != NULL, ("stcb == NULL"));
+ SCTP_TCB_LOCK_ASSERT(stcb);
+ SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep);
+
if (!asoc->idata_supported && !ordered &&
control->first_frag_seen &&
SCTP_TSN_GT(control->fsn_included, cumtsn)) {
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index a55ef5ac1eab..dc31ffbc2161 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -2329,7 +2329,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
}
ep = &(*inp_p)->sctp_ep;
/* which cookie is it? */
- if ((cookie->time_entered.tv_sec < (long)ep->time_of_secret_change) &&
+ if ((cookie->time_entered.tv_sec < ep->time_of_secret_change) &&
(ep->current_secret_number != ep->last_secret_number)) {
/* it's the old cookie */
(void)sctp_hmac_m(SCTP_HMAC,
@@ -2352,7 +2352,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
/* compare the received digest with the computed digest */
if (timingsafe_bcmp(calc_sig, sig, SCTP_SIGNATURE_SIZE) != 0) {
/* try the old cookie? */
- if ((cookie->time_entered.tv_sec == (long)ep->time_of_secret_change) &&
+ if ((cookie->time_entered.tv_sec == ep->time_of_secret_change) &&
(ep->current_secret_number != ep->last_secret_number)) {
/* compute digest with old */
(void)sctp_hmac_m(SCTP_HMAC,
@@ -4231,6 +4231,8 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp,
SCTP_STAT_INCR(sctps_pdrpmbda);
}
} else {
+ desc.tsn_ifany = htonl(0);
+ memset(desc.data_bytes, 0, SCTP_NUM_DB_TO_VERIFY);
if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) {
SCTP_STAT_INCR(sctps_pdrpmbct);
}
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index a8facff6b917..cc8d017aba16 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -6705,7 +6705,9 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
} else {
m = sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr),
0, M_NOWAIT, 1, MT_DATA);
- SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr);
+ if (m != NULL) {
+ SCTP_BUF_LEN(m) = sizeof(struct sctp_paramhdr);
+ }
}
if (m != NULL) {
struct sctp_paramhdr *ph;
@@ -6909,10 +6911,20 @@ static int
sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m,
struct sctp_nonpad_sndrcvinfo *srcv)
{
- int ret;
struct sctp_copy_all *ca;
+ struct mbuf *mat;
+ ssize_t sndlen;
+ int ret;
- if (uio->uio_resid > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) {
+ if (uio != NULL) {
+ sndlen = uio->uio_resid;
+ } else {
+ sndlen = 0;
+ for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) {
+ sndlen += SCTP_BUF_LEN(mat);
+ }
+ }
+ if (sndlen > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) {
/* You must not be larger than the limit! */
return (EMSGSIZE);
}
@@ -6924,12 +6936,10 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m,
return (ENOMEM);
}
memset(ca, 0, sizeof(struct sctp_copy_all));
-
ca->inp = inp;
if (srcv != NULL) {
memcpy(&ca->sndrcv, srcv, sizeof(struct sctp_nonpad_sndrcvinfo));
}
-
/* Serialize. */
SCTP_INP_WLOCK(inp);
if ((inp->sctp_flags & SCTP_PCB_FLAGS_SND_ITERATOR_UP) != 0) {
@@ -6940,15 +6950,14 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m,
}
inp->sctp_flags |= SCTP_PCB_FLAGS_SND_ITERATOR_UP;
SCTP_INP_WUNLOCK(inp);
-
/*
* take off the sendall flag, it would be bad if we failed to do
* this :-0
*/
ca->sndrcv.sinfo_flags &= ~SCTP_SENDALL;
/* get length and mbuf chain */
- if (uio) {
- ca->sndlen = uio->uio_resid;
+ ca->sndlen = sndlen;
+ if (uio != NULL) {
ca->m = sctp_copy_out_all(uio, ca->sndlen);
if (ca->m == NULL) {
SCTP_FREE(ca, SCTP_M_COPYAL);
@@ -6960,20 +6969,14 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m,
return (ENOMEM);
}
} else {
- /* Gather the length of the send */
- struct mbuf *mat;
-
- ca->sndlen = 0;
- for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) {
- ca->sndlen += SCTP_BUF_LEN(mat);
- }
+ ca->m = m;
}
ret = sctp_initiate_iterator(NULL, sctp_sendall_iterator, NULL,
SCTP_PCB_ANY_FLAGS, SCTP_PCB_ANY_FEATURES,
SCTP_ASOC_ANY_STATE,
(void *)ca, 0,
sctp_sendall_completes, inp, 1);
- if (ret) {
+ if (ret != 0) {
SCTP_INP_WLOCK(inp);
inp->sctp_flags &= ~SCTP_PCB_FLAGS_SND_ITERATOR_UP;
SCTP_INP_WUNLOCK(inp);
@@ -11424,7 +11427,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked)
/* Fill out hb parameter */
hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO);
hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param));
- hb->heartbeat.hb_info.time_value_1 = (uint32_t)now.tv_sec;
+ hb->heartbeat.hb_info.time_value_1 = now.tv_sec;
hb->heartbeat.hb_info.time_value_2 = now.tv_usec;
/* Did our user request this one, put it in */
hb->heartbeat.hb_info.addr_family = (uint8_t)net->ro._l_addr.sa.sa_family;
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 1509ac13901e..340786e3484e 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -2570,7 +2570,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
/* Setup the initial secret */
(void)SCTP_GETTIME_TIMEVAL(&time);
- m->time_of_secret_change = (unsigned int)time.tv_sec;
+ m->time_of_secret_change = time.tv_sec;
for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) {
m->secret_key[0][i] = sctp_select_initial_TSN(m);
@@ -4541,7 +4541,7 @@ sctp_del_remote_addr(struct sctp_tcb *stcb, struct sockaddr *remaddr)
}
static bool
-sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now)
+sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, time_t now)
{
struct sctpvtaghead *chain;
struct sctp_tagblock *twait_block;
@@ -4563,7 +4563,7 @@ sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now)
}
static void
-sctp_set_vtag_block(struct sctp_timewait *vtag_block, uint32_t time,
+sctp_set_vtag_block(struct sctp_timewait *vtag_block, time_t time,
uint32_t tag, uint16_t lport, uint16_t rport)
{
vtag_block->tv_sec_at_expire = time;
@@ -4578,13 +4578,13 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint16_t lport, uint16_t rport)
struct sctpvtaghead *chain;
struct sctp_tagblock *twait_block;
struct timeval now;
- uint32_t time;
+ time_t time;
int i;
bool set;
SCTP_INP_INFO_WLOCK_ASSERT();
(void)SCTP_GETTIME_TIMEVAL(&now);
- time = (uint32_t)now.tv_sec + SCTP_BASE_SYSCTL(sctp_vtag_time_wait);
+ time = now.tv_sec + SCTP_BASE_SYSCTL(sctp_vtag_time_wait);
chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)];
set = false;
LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) {
@@ -4596,7 +4596,7 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint16_t lport, uint16_t rport)
continue;
}
if ((twait_block->vtag_block[i].v_tag != 0) &&
- (twait_block->vtag_block[i].tv_sec_at_expire < (uint32_t)now.tv_sec)) {
+ (twait_block->vtag_block[i].tv_sec_at_expire < now.tv_sec)) {
if (set) {
/* Audit expires this guy */
sctp_set_vtag_block(twait_block->vtag_block + i, 0, 0, 0, 0);
@@ -6745,7 +6745,7 @@ sctp_is_vtag_good(uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *
return (false);
}
}
- return (!sctp_is_in_timewait(tag, lport, rport, (uint32_t)now->tv_sec));
+ return (!sctp_is_in_timewait(tag, lport, rport, now->tv_sec));
}
static void
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index e57e13654073..ade29fb3544d 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -130,7 +130,7 @@ struct sctp_block_entry {
};
struct sctp_timewait {
- uint32_t tv_sec_at_expire; /* the seconds from boot to expire */
+ time_t tv_sec_at_expire; /* the seconds from boot to expire */
uint32_t v_tag; /* the vtag that can not be reused */
uint16_t lport; /* the local port used in vtag */
uint16_t rport; /* the remote port used in vtag */
@@ -263,8 +263,8 @@ struct sctp_base_info {
* access /dev/random.
*/
struct sctp_pcb {
- unsigned int time_of_secret_change; /* number of seconds from
- * timeval.tv_sec */
+ time_t time_of_secret_change; /* number of seconds from
+ * timeval.tv_sec */
uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS];
unsigned int size_of_a_cookie;
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 3b0da87edce3..b9a3be5280ae 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -843,8 +843,10 @@ sctp_shutdown(struct socket *so, enum shutdown_how how)
}
sctp_free_a_readq(stcb, control);
} else {
- stcb->asoc.size_on_all_streams +=
- control->length;
+ if (stcb != NULL) {
+ stcb->asoc.size_on_all_streams +=
+ control->length;
+ }
}
}
SOCK_UNLOCK(so);
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index b23efd9c8968..17e49b413464 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -1944,7 +1944,7 @@ sctp_timeout_handler(void *t)
type, inp, stcb, net));
SCTP_STAT_INCR(sctps_timosecret);
(void)SCTP_GETTIME_TIMEVAL(&tv);
- inp->sctp_ep.time_of_secret_change = (unsigned int)tv.tv_sec;
+ inp->sctp_ep.time_of_secret_change = tv.tv_sec;
inp->sctp_ep.last_secret_number =
inp->sctp_ep.current_secret_number;
inp->sctp_ep.current_secret_number++;
@@ -2289,19 +2289,19 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
} else {
to_ticks = net->RTO;
}
- rndval = sctp_select_initial_TSN(&inp->sctp_ep);
- jitter = rndval % to_ticks;
- if (to_ticks > 1) {
- to_ticks >>= 1;
- }
- if (jitter < (UINT32_MAX - to_ticks)) {
- to_ticks += jitter;
- } else {
- to_ticks = UINT32_MAX;
- }
if (!((net->dest_state & SCTP_ADDR_UNCONFIRMED) &&
(net->dest_state & SCTP_ADDR_REACHABLE)) &&
((net->dest_state & SCTP_ADDR_PF) == 0)) {
+ if (to_ticks > 1) {
+ rndval = sctp_select_initial_TSN(&inp->sctp_ep);
+ jitter = rndval % to_ticks;
+ to_ticks >>= 1;
+ if (jitter < (UINT32_MAX - to_ticks)) {
+ to_ticks += jitter;
+ } else {
+ to_ticks = UINT32_MAX;
+ }
+ }
if (net->heart_beat_delay < (UINT32_MAX - to_ticks)) {
to_ticks += net->heart_beat_delay;
} else {
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index ed90a9ba7196..a42ed8dc0d15 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -80,7 +80,6 @@
#include <sys/sbuf.h>
#include <sys/smr.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/sysctl.h>
#include <net/vnet.h>
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 3fda6e903738..7faa815fc1ac 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -833,6 +833,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port)
((thflags & (TH_ACK|TH_SYN)) == TH_SYN ?
INPLOOKUP_RLOCKPCB : INPLOOKUP_WLOCKPCB);
findpcb:
+ tp = NULL;
#ifdef INET6
if (isipv6 && fwd_tag != NULL) {
struct sockaddr_in6 *next_hop6;
@@ -915,23 +916,6 @@ findpcb:
log(LOG_INFO, "%s; %s: Connection attempt "
"to closed port\n", s, __func__);
}
- /*
- * When blackholing do not respond with a RST but
- * completely ignore the segment and drop it.
- */
- if (((V_blackhole == 1 && (thflags & TH_SYN)) ||
- V_blackhole == 2) && (V_blackhole_local || (
-#ifdef INET6
- isipv6 ? !in6_localaddr(&ip6->ip6_src) :
-#endif
-#ifdef INET
- !in_localip(ip->ip_src)
-#else
- true
-#endif
- )))
- goto dropunlock;
-
rstreason = BANDLIM_RST_CLOSEDPORT;
goto dropwithreset;
}
@@ -1410,15 +1394,27 @@ tfo_socket_result:
return (IPPROTO_DONE);
dropwithreset:
+ /*
+ * When blackholing do not respond with a RST but
+ * completely ignore the segment and drop it.
+ */
+ if (((rstreason == BANDLIM_RST_OPENPORT && V_blackhole == 3) ||
+ (rstreason == BANDLIM_RST_CLOSEDPORT &&
+ ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) &&
+ (V_blackhole_local || (
+#ifdef INET6
+ isipv6 ? !in6_localaddr(&ip6->ip6_src) :
+#endif
+#ifdef INET
+ !in_localip(ip->ip_src)
+#else
+ true
+#endif
+ )))
+ goto dropunlock;
TCP_PROBE5(receive, NULL, tp, m, tp, th);
-
- if (inp != NULL) {
- tcp_dropwithreset(m, th, tp, tlen, rstreason);
- INP_UNLOCK(inp);
- } else
- tcp_dropwithreset(m, th, NULL, tlen, rstreason);
+ tcp_dropwithreset(m, th, tp, tlen, rstreason);
m = NULL; /* mbuf chain got consumed. */
- goto drop;
dropunlock:
if (m != NULL)
@@ -1615,7 +1611,14 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
tcp_dooptions(&to, (u_char *)(th + 1),
(th->th_off << 2) - sizeof(struct tcphdr),
(thflags & TH_SYN) ? TO_SYN : 0);
-
+ if (tp->t_flags2 & TF2_PROC_SACK_PROHIBIT) {
+ /*
+ * We don't look at sack's from the
+ * peer because the MSS is too small which
+ * can subject us to an attack.
+ */
+ to.to_flags &= ~TOF_SACK;
+ }
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
if ((tp->t_flags & TF_SIGNATURE) != 0 &&
(to.to_flags & TOF_SIGNATURE) == 0) {
@@ -3883,6 +3886,17 @@ tcp_mss_update(struct tcpcb *tp, int offer, int mtuoffer,
mss = max(mss, 64);
tp->t_maxseg = mss;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not process incoming
+ * SACK's since we are subject to attack in such a
+ * case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
+
}
void
@@ -3934,6 +3948,16 @@ tcp_mss(struct tcpcb *tp, int offer)
* XXXGL: shouldn't we reserve space for IP/IPv6 options?
*/
tp->t_maxseg = max(mss, 64);
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not process incoming
+ * SACK's since we are subject to attack in such a
+ * case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
SOCKBUF_LOCK(&so->so_rcv);
if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.rmx_recvpipe)
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 2bbc9414197c..c318e8517c2e 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -560,7 +560,7 @@ after_sack_rexmit:
if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg &&
(tp->t_port == 0) &&
((tp->t_flags & TF_SIGNATURE) == 0) &&
- tp->rcv_numsacks == 0 && sack_rxmit == 0 &&
+ tp->rcv_numsacks == 0 && ((sack_rxmit == 0) || V_tcp_sack_tso) &&
ipoptlen == 0 && !(flags & TH_SYN))
tso = 1;
@@ -1037,6 +1037,9 @@ send:
TCPSTAT_ADD(tcps_sndrexmitbyte, len);
if (sack_rxmit) {
TCPSTAT_INC(tcps_sack_rexmits);
+ if (tso) {
+ TCPSTAT_INC(tcps_sack_rexmits_tso);
+ }
TCPSTAT_ADD(tcps_sack_rexmit_bytes, len);
}
#ifdef STATS
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c
index f59cc5fe0d0b..53a181703fe9 100644
--- a/sys/netinet/tcp_sack.c
+++ b/sys/netinet/tcp_sack.c
@@ -137,6 +137,11 @@ SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, lrd, CTLFLAG_VNET | CTLFLAG_RW,
&VNET_NAME(tcp_do_lrd), 1,
"Perform Lost Retransmission Detection");
+VNET_DEFINE(int, tcp_sack_tso) = 0;
+SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, tso, CTLFLAG_VNET | CTLFLAG_RW,
+ &VNET_NAME(tcp_sack_tso), 0,
+ "Allow TSO during SACK loss recovery");
+
VNET_DEFINE(int, tcp_sack_maxholes) = 128;
SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_VNET | CTLFLAG_RW,
&VNET_NAME(tcp_sack_maxholes), 0,
@@ -558,6 +563,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
int i, j, num_sack_blks;
sackstatus_t sack_changed;
int delivered_data, left_edge_delta;
+ int maxseg = tp->t_maxseg - MAX_TCPOPTLEN;
tcp_seq loss_hiack = 0;
int loss_thresh = 0;
@@ -604,7 +610,9 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
SEQ_GT(sack.start, th_ack) &&
SEQ_LT(sack.start, tp->snd_max) &&
SEQ_GT(sack.end, tp->snd_una) &&
- SEQ_LEQ(sack.end, tp->snd_max)) {
+ SEQ_LEQ(sack.end, tp->snd_max) &&
+ ((sack.end - sack.start) >= maxseg ||
+ SEQ_GEQ(sack.end, tp->snd_max))) {
sack_blocks[num_sack_blks++] = sack;
} else if (SEQ_LEQ(sack.start, th_ack) &&
SEQ_LEQ(sack.end, th_ack)) {
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 946b65cda6a5..cee8da71af0b 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -5134,6 +5134,16 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts)
tp->t_flags2 |= TF2_PLPMTU_PMTUD;
tp->t_flags2 &= ~TF2_PLPMTU_BLACKHOLE;
tp->t_maxseg = tp->t_pmtud_saved_maxseg;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not
+ * process incoming SACK's since we are
+ * subject to attack in such a case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
KMOD_TCPSTAT_INC(tcps_pmtud_blackhole_failed);
}
}
@@ -7556,7 +7566,7 @@ proc_sack:
* Sort the SACK blocks so we can update the rack scoreboard with
* just one pass.
*/
- new_sb = sack_filter_blks(&bbr->r_ctl.bbr_sf, sack_blocks,
+ new_sb = sack_filter_blks(tp, &bbr->r_ctl.bbr_sf, sack_blocks,
num_sack_blks, th->th_ack);
ctf_log_sack_filter(bbr->rc_tp, new_sb, sack_blocks);
BBR_STAT_ADD(bbr_sack_blocks, num_sack_blks);
@@ -11323,7 +11333,14 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
tcp_dooptions(&to, (u_char *)(th + 1),
(th->th_off << 2) - sizeof(struct tcphdr),
(thflags & TH_SYN) ? TO_SYN : 0);
-
+ if (tp->t_flags2 & TF2_PROC_SACK_PROHIBIT) {
+ /*
+ * We don't look at sack's from the
+ * peer because the MSS is too small which
+ * can subject us to an attack.
+ */
+ to.to_flags &= ~TOF_SACK;
+ }
/*
* If timestamps were negotiated during SYN/ACK and a
* segment without a timestamp is received, silently drop
@@ -13773,6 +13790,16 @@ nomore:
if (old_maxseg <= tp->t_maxseg) {
/* Huh it did not shrink? */
tp->t_maxseg = old_maxseg - 40;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not
+ * process incoming SACK's since we are
+ * subject to attack in such a case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
bbr_log_msgsize_fail(bbr, tp, len, maxseg, mtu, 0, tso, cts);
}
/*
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 669d213e58fb..551ccc1d337a 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -536,7 +536,7 @@ static int32_t rack_output(struct tcpcb *tp);
static uint32_t
rack_proc_sack_blk(struct tcpcb *tp, struct tcp_rack *rack,
struct sackblk *sack, struct tcpopt *to, struct rack_sendmap **prsm,
- uint32_t cts, int *no_extra, int *moved_two, uint32_t segsiz);
+ uint32_t cts, uint32_t segsiz);
static void rack_post_recovery(struct tcpcb *tp, uint32_t th_seq);
static void rack_remxt_tmr(struct tcpcb *tp);
static int rack_set_sockopt(struct tcpcb *tp, struct sockopt *sopt);
@@ -2752,8 +2752,6 @@ rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t
union tcp_log_stackspecific log;
struct timeval tv;
- if (rack->sack_attack_disable > 0)
- goto log_anyway;
if ((mod != 1) && (rack_verbose_logging == 0)) {
/*
* We get 3 values currently for mod
@@ -2766,7 +2764,6 @@ rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t
*/
return;
}
-log_anyway:
memset(&log.u_bbr, 0, sizeof(log.u_bbr));
log.u_bbr.flex1 = tsused;
log.u_bbr.flex2 = thresh;
@@ -3007,13 +3004,8 @@ rack_log_rtt_sample(struct tcp_rack *rack, uint32_t rtt)
/* Convert our ms to a microsecond */
memset(&log, 0, sizeof(log));
log.u_bbr.flex1 = rtt;
- log.u_bbr.flex2 = rack->r_ctl.ack_count;
- log.u_bbr.flex3 = rack->r_ctl.sack_count;
- log.u_bbr.flex4 = rack->r_ctl.sack_noextra_move;
- log.u_bbr.flex5 = rack->r_ctl.sack_moved_extra;
log.u_bbr.flex6 = rack->rc_tp->t_rxtcur;
log.u_bbr.flex7 = 1;
- log.u_bbr.flex8 = rack->sack_attack_disable;
log.u_bbr.timeStamp = tcp_get_usecs(&tv);
log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
log.u_bbr.pkts_out = rack->r_ctl.rc_out_at_rto;
@@ -3144,7 +3136,6 @@ rack_log_type_bbrsnd(struct tcp_rack *rack, uint32_t len, uint32_t slot, uint32_
else
log.u_bbr.flex2 = rack->r_ctl.rc_prr_sndcnt;
log.u_bbr.flex4 = rack->r_ctl.rc_hpts_flags;
- log.u_bbr.flex5 = rack->r_ctl.ack_during_sd;
log.u_bbr.flex6 = line;
log.u_bbr.flex7 = (0x0000ffff & rack->r_ctl.rc_hpts_flags);
log.u_bbr.flex8 = rack->rc_in_persist;
@@ -3406,40 +3397,6 @@ rack_log_to_prr(struct tcp_rack *rack, int frm, int orig_cwnd, int line)
}
}
-#ifdef TCP_SAD_DETECTION
-static void
-rack_log_sad(struct tcp_rack *rack, int event)
-{
- if (tcp_bblogging_on(rack->rc_tp)) {
- union tcp_log_stackspecific log;
- struct timeval tv;
-
- memset(&log.u_bbr, 0, sizeof(log.u_bbr));
- log.u_bbr.flex1 = rack->r_ctl.sack_count;
- log.u_bbr.flex2 = rack->r_ctl.ack_count;
- log.u_bbr.flex3 = rack->r_ctl.sack_moved_extra;
- log.u_bbr.flex4 = rack->r_ctl.sack_noextra_move;
- log.u_bbr.flex5 = rack->r_ctl.rc_num_maps_alloced;
- log.u_bbr.flex6 = tcp_sack_to_ack_thresh;
- log.u_bbr.pkts_out = tcp_sack_to_move_thresh;
- log.u_bbr.lt_epoch = (tcp_force_detection << 8);
- log.u_bbr.lt_epoch |= rack->do_detection;
- log.u_bbr.applimited = tcp_map_minimum;
- log.u_bbr.flex7 = rack->sack_attack_disable;
- log.u_bbr.flex8 = event;
- log.u_bbr.bbr_state = rack->rc_suspicious;
- log.u_bbr.timeStamp = tcp_get_usecs(&tv);
- log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
- log.u_bbr.delivered = tcp_sad_decay_val;
- TCP_LOG_EVENTP(rack->rc_tp, NULL,
- &rack->rc_inp->inp_socket->so_rcv,
- &rack->rc_inp->inp_socket->so_snd,
- TCP_SAD_DETECT, 0,
- 0, &log, false, &tv);
- }
-}
-#endif
-
static void
rack_counter_destroy(void)
{
@@ -3549,7 +3506,6 @@ static struct rack_sendmap *
rack_alloc_full_limit(struct tcp_rack *rack)
{
if ((V_tcp_map_entries_limit > 0) &&
- (rack->do_detection == 0) &&
(rack->r_ctl.rc_num_maps_alloced >= V_tcp_map_entries_limit)) {
counter_u64_add(rack_to_alloc_limited, 1);
if (!rack->alloc_limit_reported) {
@@ -3570,7 +3526,6 @@ rack_alloc_limit(struct tcp_rack *rack, uint8_t limit_type)
if (limit_type) {
/* currently there is only one limit type */
if (rack->r_ctl.rc_split_limit > 0 &&
- (rack->do_detection == 0) &&
rack->r_ctl.rc_num_split_allocs >= rack->r_ctl.rc_split_limit) {
counter_u64_add(rack_split_limited, 1);
if (!rack->alloc_limit_reported) {
@@ -3578,17 +3533,6 @@ rack_alloc_limit(struct tcp_rack *rack, uint8_t limit_type)
counter_u64_add(rack_alloc_limited_conns, 1);
}
return (NULL);
-#ifdef TCP_SAD_DETECTION
- } else if ((tcp_sad_limit != 0) &&
- (rack->do_detection == 1) &&
- (rack->r_ctl.rc_num_split_allocs >= tcp_sad_limit)) {
- counter_u64_add(rack_split_limited, 1);
- if (!rack->alloc_limit_reported) {
- rack->alloc_limit_reported = 1;
- counter_u64_add(rack_alloc_limited_conns, 1);
- }
- return (NULL);
-#endif
}
}
@@ -6812,7 +6756,6 @@ rack_timer_start(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts, int sup_
}
rack->rc_on_min_to = 0;
if ((tp->t_state < TCPS_ESTABLISHED) ||
- (rack->sack_attack_disable > 0) ||
((tp->t_flags & TF_SACK_PERMIT) == 0)) {
goto activate_rxt;
}
@@ -6884,16 +6827,6 @@ activate_rxt:
goto activate_rxt;
}
}
- if (rack->sack_attack_disable) {
- /*
- * We don't want to do
- * any TLP's if you are an attacker.
- * Though if you are doing what
- * is expected you may still have
- * SACK-PASSED marks.
- */
- goto activate_rxt;
- }
/* Convert from ms to usecs */
if ((rsm->r_flags & RACK_SACK_PASSED) ||
(rsm->r_flags & RACK_RWND_COLLAPSED) ||
@@ -7304,25 +7237,6 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts,
}
}
hpts_timeout = rack_timer_start(tp, rack, cts, sup_rack);
-#ifdef TCP_SAD_DETECTION
- if (rack->sack_attack_disable &&
- (rack->r_ctl.ack_during_sd > 0) &&
- (slot < tcp_sad_pacing_interval)) {
- /*
- * We have a potential attacker on
- * the line. We have possibly some
- * (or now) pacing time set. We want to
- * slow down the processing of sacks by some
- * amount (if it is an attacker). Set the default
- * slot for attackers in place (unless the original
- * interval is longer). Its stored in
- * micro-seconds, so lets convert to msecs.
- */
- slot = tcp_sad_pacing_interval;
- rack_log_type_bbrsnd(rack, tot_len_this_send, slot, us_cts, &tv, __LINE__);
- rack->r_ctl.ack_during_sd = 0;
- }
-#endif
if (tp->t_flags & TF_DELACK) {
delayed_ack = TICKS_2_USEC(tcp_delacktime);
rack->r_ctl.rc_hpts_flags |= PACE_TMR_DELACK;
@@ -7472,11 +7386,7 @@ rack_start_hpts_timer (struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts,
tp->t_flags2 |= TF2_DONT_SACK_QUEUE;
}
}
- /* For sack attackers we want to ignore sack */
- if (rack->sack_attack_disable == 1) {
- tp->t_flags2 |= (TF2_DONT_SACK_QUEUE |
- TF2_MBUF_QUEUE_READY);
- } else if (rack->rc_ack_can_sendout_data) {
+ if (rack->rc_ack_can_sendout_data) {
/*
* Ahh but wait, this is that special case
* where the pacing timer can be disturbed
@@ -8281,11 +8191,8 @@ rack_remxt_tmr(struct tcpcb *tp)
rack->r_ctl.rc_resend = tqhash_min(rack->r_ctl.tqh);
if (rack->r_ctl.rc_resend != NULL)
rack->r_ctl.rc_resend->r_flags |= RACK_TO_REXT;
- if ((((tp->t_flags & TF_SACK_PERMIT) == 0)
-#ifdef TCP_SAD_DETECTION
- || (rack->sack_attack_disable != 0)
-#endif
- ) && ((tp->t_flags & TF_SENTFIN) == 0)) {
+ if (((tp->t_flags & TF_SACK_PERMIT) == 0) &&
+ ((tp->t_flags & TF_SENTFIN) == 0)) {
/*
* For non-sack customers new data
* needs to go out as retransmits until
@@ -8583,6 +8490,16 @@ drop_it:
tp->t_flags2 |= TF2_PLPMTU_PMTUD;
tp->t_flags2 &= ~TF2_PLPMTU_BLACKHOLE;
tp->t_maxseg = tp->t_pmtud_saved_maxseg;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not
+ * process incoming SACK's since we are
+ * subject to attack in such a case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
KMOD_TCPSTAT_INC(tcps_pmtud_blackhole_failed);
}
}
@@ -10092,40 +10009,19 @@ is_rsm_inside_declared_tlp_block(struct tcp_rack *rack, struct rack_sendmap *rsm
static uint32_t
rack_proc_sack_blk(struct tcpcb *tp, struct tcp_rack *rack, struct sackblk *sack,
struct tcpopt *to, struct rack_sendmap **prsm, uint32_t cts,
- int *no_extra,
- int *moved_two, uint32_t segsiz)
+ uint32_t segsiz)
{
uint32_t start, end, changed = 0;
struct rack_sendmap stack_map;
struct rack_sendmap *rsm, *nrsm, *prev, *next;
int insret __diagused;
int32_t used_ref = 1;
- int moved = 0;
-#ifdef TCP_SAD_DETECTION
- int allow_segsiz;
- int first_time_through = 1;
-#endif
- int noextra = 0;
int can_use_hookery = 0;
start = sack->start;
end = sack->end;
rsm = *prsm;
-#ifdef TCP_SAD_DETECTION
- /*
- * There are a strange number of proxys and meddle boxes in the world
- * that seem to cut up segments on different boundaries. This gets us
- * smaller sacks that are still ok in terms of it being an attacker.
- * We use the base segsiz to calculate an allowable smallness but
- * also enforce a min on the segsiz in case it is an attacker playing
- * games with MSS. So basically if the sack arrives and it is
- * larger than a worse case 960 bytes, we don't classify the guy
- * as supicious.
- */
- allow_segsiz = max(segsiz, 1200) * sad_seg_size_per;
- allow_segsiz /= 1000;
-#endif
do_rest_ofb:
if ((rsm == NULL) ||
(SEQ_LT(end, rsm->r_start)) ||
@@ -10137,105 +10033,11 @@ do_rest_ofb:
*/
used_ref = 0;
rsm = tqhash_find(rack->r_ctl.tqh, start);
- moved++;
}
if (rsm == NULL) {
/* TSNH */
goto out;
}
-#ifdef TCP_SAD_DETECTION
- /* Now we must check for suspicous activity */
- if ((first_time_through == 1) &&
- ((end - start) < min((rsm->r_end - rsm->r_start), allow_segsiz)) &&
- ((rsm->r_flags & RACK_PMTU_CHG) == 0) &&
- ((rsm->r_flags & RACK_TLP) == 0)) {
- /*
- * Its less than a full MSS or the segment being acked
- * this should only happen if the rsm in question had the
- * r_just_ret flag set <and> the end matches the end of
- * the rsm block.
- *
- * Note we do not look at segments that have had TLP's on
- * them since we can get un-reported rwnd collapses that
- * basically we TLP on and then we get back a sack block
- * that goes from the start to only a small way.
- *
- */
- int loss, ok;
-
- ok = 0;
- if (SEQ_GEQ(end, rsm->r_end)) {
- if (rsm->r_just_ret == 1) {
- /* This was at the end of a send which is ok */
- ok = 1;
- } else {
- /* A bit harder was it the end of our segment */
- int segs, len;
-
- len = (rsm->r_end - rsm->r_start);
- segs = len / segsiz;
- segs *= segsiz;
- if ((segs + (rsm->r_end - start)) == len) {
- /*
- * So this last bit was the
- * end of our send if we cut it
- * up into segsiz pieces so its ok.
- */
- ok = 1;
- }
- }
- }
- if (ok == 0) {
- /*
- * This guy is doing something suspicious
- * lets start detection.
- */
- if (rack->rc_suspicious == 0) {
- tcp_trace_point(rack->rc_tp, TCP_TP_SAD_SUSPECT);
- counter_u64_add(rack_sack_attacks_suspect, 1);
- rack->rc_suspicious = 1;
- rack_log_sad(rack, 4);
- if (tcp_bblogging_on(rack->rc_tp)) {
- union tcp_log_stackspecific log;
- struct timeval tv;
-
- memset(&log.u_bbr, 0, sizeof(log.u_bbr));
- log.u_bbr.flex1 = end;
- log.u_bbr.flex2 = start;
- log.u_bbr.flex3 = rsm->r_end;
- log.u_bbr.flex4 = rsm->r_start;
- log.u_bbr.flex5 = segsiz;
- log.u_bbr.flex6 = rsm->r_fas;
- log.u_bbr.flex7 = rsm->r_bas;
- log.u_bbr.flex8 = 5;
- log.u_bbr.pkts_out = rsm->r_flags;
- log.u_bbr.bbr_state = rack->rc_suspicious;
- log.u_bbr.bbr_substate = rsm->r_just_ret;
- log.u_bbr.timeStamp = tcp_get_usecs(&tv);
- log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
- TCP_LOG_EVENTP(rack->rc_tp, NULL,
- &rack->rc_inp->inp_socket->so_rcv,
- &rack->rc_inp->inp_socket->so_snd,
- TCP_SAD_DETECTION, 0,
- 0, &log, false, &tv);
- }
- }
- /* You loose some ack count every time you sack
- * a small bit that is not butting to the end of
- * what we have sent. This is because we never
- * send small bits unless its the end of the sb.
- * Anyone sending a sack that is not at the end
- * is thus very very suspicious.
- */
- loss = (segsiz/2) / (end - start);
- if (loss < rack->r_ctl.ack_count)
- rack->r_ctl.ack_count -= loss;
- else
- rack->r_ctl.ack_count = 0;
- }
- }
- first_time_through = 0;
-#endif
/* Ok we have an ACK for some piece of this rsm */
if (rsm->r_start != start) {
if ((rsm->r_flags & RACK_ACKED) == 0) {
@@ -10332,7 +10134,6 @@ do_rest_ofb:
* use to update all the gizmos.
*/
/* Copy up our fudge block */
- noextra++;
nrsm = &stack_map;
memcpy(nrsm, rsm, sizeof(struct rack_sendmap));
/* Now adjust our tree blocks */
@@ -10383,9 +10184,6 @@ do_rest_ofb:
if (rack->app_limited_needs_set)
rack_need_set_test(tp, rack, nrsm, tp->snd_una, __LINE__, RACK_USE_END);
changed += (nrsm->r_end - nrsm->r_start);
- /* You get a count for acking a whole segment or more */
- if ((nrsm->r_end - nrsm->r_start) >= segsiz)
- rack->r_ctl.ack_count += ((nrsm->r_end - nrsm->r_start) / segsiz);
rack->r_ctl.rc_sacked += (nrsm->r_end - nrsm->r_start);
if (rsm->r_flags & RACK_WAS_LOST) {
int my_chg;
@@ -10463,7 +10261,6 @@ do_rest_ofb:
}
counter_u64_add(rack_sack_splits, 1);
rack_clone_rsm(rack, nrsm, rsm, start);
- moved++;
rsm->r_just_ret = 0;
#ifndef INVARIANTS
(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
@@ -10485,14 +10282,12 @@ do_rest_ofb:
} else {
/* Already sacked this piece */
counter_u64_add(rack_sack_skipped_acked, 1);
- moved++;
if (end == rsm->r_end) {
/* Done with block */
rsm = tqhash_next(rack->r_ctl.tqh, rsm);
goto out;
} else if (SEQ_LT(end, rsm->r_end)) {
/* A partial sack to a already sacked block */
- moved++;
rsm = tqhash_next(rack->r_ctl.tqh, rsm);
goto out;
} else {
@@ -10559,8 +10354,6 @@ do_rest_ofb:
rack_update_rtt(tp, rack, rsm, to, cts, SACKED, 0);
changed += (rsm->r_end - rsm->r_start);
/* You get a count for acking a whole segment or more */
- if ((rsm->r_end - rsm->r_start) >= segsiz)
- rack->r_ctl.ack_count += ((rsm->r_end - rsm->r_start) / segsiz);
if (rsm->r_flags & RACK_WAS_LOST) {
int my_chg;
@@ -10595,7 +10388,6 @@ do_rest_ofb:
rack_log_map_chg(tp, rack, NULL, rsm, NULL, MAP_SACK_M3, end, __LINE__);
} else {
counter_u64_add(rack_sack_skipped_acked, 1);
- moved++;
}
if (end == rsm->r_end) {
/* This block only - done, setup for next */
@@ -10693,7 +10485,6 @@ do_rest_ofb:
* Note if either prev/rsm is a TLP we don't
* do this.
*/
- noextra++;
nrsm = &stack_map;
memcpy(nrsm, rsm, sizeof(struct rack_sendmap));
tqhash_update_end(rack->r_ctl.tqh, prev, end);
@@ -10752,10 +10543,6 @@ do_rest_ofb:
if (rack->app_limited_needs_set)
rack_need_set_test(tp, rack, nrsm, tp->snd_una, __LINE__, RACK_USE_END);
changed += (nrsm->r_end - nrsm->r_start);
- /* You get a count for acking a whole segment or more */
- if ((nrsm->r_end - nrsm->r_start) >= segsiz)
- rack->r_ctl.ack_count += ((nrsm->r_end - nrsm->r_start) / segsiz);
-
rack->r_ctl.rc_sacked += (nrsm->r_end - nrsm->r_start);
if (rsm->r_flags & RACK_WAS_LOST) {
int my_chg;
@@ -10842,7 +10629,6 @@ do_rest_ofb:
*/
counter_u64_add(rack_sack_splits, 1);
rack_clone_rsm(rack, nrsm, rsm, end);
- moved++;
rsm->r_flags &= (~RACK_HAS_FIN);
rsm->r_just_ret = 0;
#ifndef INVARIANTS
@@ -10861,9 +10647,6 @@ do_rest_ofb:
rack_log_retran_reason(rack, nrsm, __LINE__, 0, 2);
rack_update_rtt(tp, rack, rsm, to, cts, SACKED, 0);
changed += (rsm->r_end - rsm->r_start);
- /* You get a count for acking a whole segment or more */
- if ((rsm->r_end - rsm->r_start) >= segsiz)
- rack->r_ctl.ack_count += ((rsm->r_end - rsm->r_start) / segsiz);
if (rsm->r_flags & RACK_WAS_LOST) {
int my_chg;
@@ -10903,7 +10686,6 @@ do_rest_ofb:
* The block was already acked.
*/
counter_u64_add(rack_sack_skipped_acked, 1);
- moved++;
}
out:
if (rsm &&
@@ -10940,7 +10722,6 @@ out:
if (next->r_flags & RACK_ACKED) {
/* yep this and next can be merged */
rsm = rack_merge_rsm(rack, rsm, next);
- noextra++;
next = tqhash_next(rack->r_ctl.tqh, rsm);
} else
break;
@@ -10972,7 +10753,6 @@ out:
if (prev->r_flags & RACK_ACKED) {
/* yep the previous and this can be merged */
rsm = rack_merge_rsm(rack, prev, rsm);
- noextra++;
prev = tqhash_prev(rack->r_ctl.tqh, rsm);
} else
break;
@@ -10986,9 +10766,6 @@ out:
/* Save off the next one for quick reference. */
nrsm = tqhash_find(rack->r_ctl.tqh, end);
*prsm = rack->r_ctl.rc_sacklast = nrsm;
- /* Pass back the moved. */
- *moved_two = moved;
- *no_extra = noextra;
if (IN_RECOVERY(tp->t_flags)) {
rack->r_ctl.bytes_acked_in_recovery += changed;
}
@@ -11030,66 +10807,6 @@ rack_peer_reneges(struct tcp_rack *rack, struct rack_sendmap *rsm, tcp_seq th_ac
}
-static void
-rack_do_decay(struct tcp_rack *rack)
-{
- struct timeval res;
-
-#define timersub(tvp, uvp, vvp) \
- do { \
- (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
- (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
- if ((vvp)->tv_usec < 0) { \
- (vvp)->tv_sec--; \
- (vvp)->tv_usec += 1000000; \
- } \
- } while (0)
-
- timersub(&rack->r_ctl.act_rcv_time, &rack->r_ctl.rc_last_time_decay, &res);
-#undef timersub
-
- rack->r_ctl.input_pkt++;
- if ((rack->rc_in_persist) ||
- (res.tv_sec >= 1) ||
- (rack->rc_tp->snd_max == rack->rc_tp->snd_una)) {
- /*
- * Check for decay of non-SAD,
- * we want all SAD detection metrics to
- * decay 1/4 per second (or more) passed.
- * Current default is 800 so it decays
- * 80% every second.
- */
-#ifdef TCP_SAD_DETECTION
- uint32_t pkt_delta;
-
- pkt_delta = rack->r_ctl.input_pkt - rack->r_ctl.saved_input_pkt;
-#endif
- /* Update our saved tracking values */
- rack->r_ctl.saved_input_pkt = rack->r_ctl.input_pkt;
- rack->r_ctl.rc_last_time_decay = rack->r_ctl.act_rcv_time;
- /* Now do we escape without decay? */
-#ifdef TCP_SAD_DETECTION
- if (rack->rc_in_persist ||
- (rack->rc_tp->snd_max == rack->rc_tp->snd_una) ||
- (pkt_delta < tcp_sad_low_pps)){
- /*
- * We don't decay idle connections
- * or ones that have a low input pps.
- */
- return;
- }
- /* Decay the counters */
- rack->r_ctl.ack_count = ctf_decay_count(rack->r_ctl.ack_count,
- tcp_sad_decay_val);
- rack->r_ctl.sack_count = ctf_decay_count(rack->r_ctl.sack_count,
- tcp_sad_decay_val);
- rack->r_ctl.sack_moved_extra = ctf_decay_count(rack->r_ctl.sack_moved_extra,
- tcp_sad_decay_val);
- rack->r_ctl.sack_noextra_move = ctf_decay_count(rack->r_ctl.sack_noextra_move,
- tcp_sad_decay_val);
-#endif
- }
-}
static void inline
rack_rsm_sender_update(struct tcp_rack *rack, struct tcpcb *tp, struct rack_sendmap *rsm, uint8_t from)
@@ -11197,7 +10914,7 @@ rack_process_to_cumack(struct tcpcb *tp, struct tcp_rack *rack, register uint32_
* If we have some sack blocks in the filter
* lets prune them out by calling sfb with no blocks.
*/
- sack_filter_blks(&rack->r_ctl.rack_sf, NULL, 0, th_ack);
+ sack_filter_blks(tp, &rack->r_ctl.rack_sf, NULL, 0, th_ack);
}
if (SEQ_GT(th_ack, tp->snd_una)) {
/* Clear any app ack remembered settings */
@@ -11613,185 +11330,6 @@ rack_handle_might_revert(struct tcpcb *tp, struct tcp_rack *rack)
}
}
-#ifdef TCP_SAD_DETECTION
-
-static void
-rack_merge_out_sacks(struct tcp_rack *rack)
-{
- struct rack_sendmap *cur, *next, *rsm, *trsm = NULL;
-
- cur = tqhash_min(rack->r_ctl.tqh);
- while(cur) {
- next = tqhash_next(rack->r_ctl.tqh, cur);
- /*
- * The idea is to go through all and merge back
- * together the pieces sent together,
- */
- if ((next != NULL) &&
- (cur->r_tim_lastsent[0] == next->r_tim_lastsent[0])) {
- rack_merge_rsm(rack, cur, next);
- } else {
- cur = next;
- }
- }
- /*
- * now treat it like a rxt event, everything is outstanding
- * and sent nothing acvked and dupacks are all zero. If this
- * is not an attacker it will have to dupack its way through
- * it all.
- */
- TAILQ_INIT(&rack->r_ctl.rc_tmap);
- TQHASH_FOREACH(rsm, rack->r_ctl.tqh) {
- rsm->r_dupack = 0;
- /* We must re-add it back to the tlist */
- if (trsm == NULL) {
- TAILQ_INSERT_HEAD(&rack->r_ctl.rc_tmap, rsm, r_tnext);
- } else {
- TAILQ_INSERT_AFTER(&rack->r_ctl.rc_tmap, trsm, rsm, r_tnext);
- }
- rsm->r_in_tmap = 1;
- trsm = rsm;
- rsm->r_flags &= ~(RACK_ACKED | RACK_SACK_PASSED | RACK_WAS_SACKPASS | RACK_RWND_COLLAPSED);
- }
- sack_filter_clear(&rack->r_ctl.rack_sf, rack->rc_tp->snd_una);
-}
-
-static void
-rack_do_detection(struct tcpcb *tp, struct tcp_rack *rack, uint32_t bytes_this_ack, uint32_t segsiz)
-{
- int do_detection = 0;
-
- if (rack->sack_attack_disable || rack->rc_suspicious) {
- /*
- * If we have been disabled we must detect
- * to possibly reverse it. Or if the guy has
- * sent in suspicious sacks we want to do detection too.
- */
- do_detection = 1;
-
- } else if ((rack->do_detection || tcp_force_detection) &&
- (tcp_sack_to_ack_thresh > 0) &&
- (tcp_sack_to_move_thresh > 0) &&
- (rack->r_ctl.rc_num_maps_alloced > tcp_map_minimum)) {
- /*
- * We only detect here if:
- * 1) System wide forcing is on <or> do_detection is on
- * <and>
- * 2) We have thresholds for move and ack (set one to 0 and we are off)
- * <and>
- * 3) We have maps allocated larger than our min (500).
- */
- do_detection = 1;
- }
- if (do_detection > 0) {
- /*
- * We have thresholds set to find
- * possible attackers and disable sack.
- * Check them.
- */
- uint64_t ackratio, moveratio, movetotal;
-
- /* Log detecting */
- rack_log_sad(rack, 1);
- /* Do we establish a ack ratio */
- if ((rack->r_ctl.sack_count > tcp_map_minimum) ||
- (rack->rc_suspicious == 1) ||
- (rack->sack_attack_disable > 0)) {
- ackratio = (uint64_t)(rack->r_ctl.sack_count);
- ackratio *= (uint64_t)(1000);
- if (rack->r_ctl.ack_count)
- ackratio /= (uint64_t)(rack->r_ctl.ack_count);
- else {
- /* We can hit this due to ack totals degregation (via small sacks) */
- ackratio = 1000;
- }
- } else {
- /*
- * No ack ratio needed if we have not
- * seen more sacks then the number of map entries.
- * The exception to that is if we have disabled sack then
- * we need to find a ratio.
- */
- ackratio = 0;
- }
-
- if ((rack->sack_attack_disable == 0) &&
- (ackratio > rack_highest_sack_thresh_seen))
- rack_highest_sack_thresh_seen = (uint32_t)ackratio;
- /* Do we establish a move ratio? */
- if ((rack->r_ctl.sack_moved_extra > tcp_map_minimum) ||
- (rack->rc_suspicious == 1) ||
- (rack->sack_attack_disable > 0)) {
- /*
- * We need to have more sack moves than maps
- * allocated to have a move ratio considered.
- */
- movetotal = rack->r_ctl.sack_moved_extra;
- movetotal += rack->r_ctl.sack_noextra_move;
- moveratio = rack->r_ctl.sack_moved_extra;
- moveratio *= (uint64_t)1000;
- if (movetotal)
- moveratio /= movetotal;
- else {
- /* No moves, thats pretty good */
- moveratio = 0;
- }
- } else {
- /*
- * Not enough moves have occured to consider
- * if we are out of whack in that ratio.
- * The exception to that is if we have disabled sack then
- * we need to find a ratio.
- */
- moveratio = 0;
- }
- if ((rack->sack_attack_disable == 0) &&
- (moveratio > rack_highest_move_thresh_seen))
- rack_highest_move_thresh_seen = (uint32_t)moveratio;
- /* Now the tests */
- if (rack->sack_attack_disable == 0) {
- /* Not disabled, do we need to disable? */
- if ((ackratio > tcp_sack_to_ack_thresh) &&
- (moveratio > tcp_sack_to_move_thresh)) {
- /* Disable sack processing */
- tcp_trace_point(rack->rc_tp, TCP_TP_SAD_TRIGGERED);
- rack->sack_attack_disable = 1;
- /* set it so we have the built in delay */
- rack->r_ctl.ack_during_sd = 1;
- if (rack_merge_out_sacks_on_attack)
- rack_merge_out_sacks(rack);
- counter_u64_add(rack_sack_attacks_detected, 1);
- tcp_trace_point(rack->rc_tp, TCP_TP_SAD_TRIGGERED);
- /* Clamp the cwnd at flight size */
- rack->r_ctl.rc_saved_cwnd = rack->rc_tp->snd_cwnd;
- rack->rc_tp->snd_cwnd = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
- rack_log_sad(rack, 2);
- }
- } else {
- /* We are sack-disabled check for false positives */
- if ((ackratio <= tcp_restoral_thresh) ||
- ((rack_merge_out_sacks_on_attack == 0) &&
- (rack->rc_suspicious == 0) &&
- (rack->r_ctl.rc_num_maps_alloced <= (tcp_map_minimum/2)))) {
- rack->sack_attack_disable = 0;
- rack_log_sad(rack, 3);
- /* Restart counting */
- rack->r_ctl.sack_count = 0;
- rack->r_ctl.sack_moved_extra = 0;
- rack->r_ctl.sack_noextra_move = 1;
- rack->rc_suspicious = 0;
- rack->r_ctl.ack_count = max(1,
- (bytes_this_ack / segsiz));
-
- counter_u64_add(rack_sack_attacks_reversed, 1);
- /* Restore the cwnd */
- if (rack->r_ctl.rc_saved_cwnd > rack->rc_tp->snd_cwnd)
- rack->rc_tp->snd_cwnd = rack->r_ctl.rc_saved_cwnd;
- }
- }
- }
-}
-#endif
static int
rack_note_dsack(struct tcp_rack *rack, tcp_seq start, tcp_seq end)
@@ -11948,9 +11486,9 @@ rack_log_ack(struct tcpcb *tp, struct tcpopt *to, struct tcphdr *th, int entered
register uint32_t th_ack;
int32_t i, j, k, num_sack_blks = 0;
uint32_t cts, acked, ack_point;
- int loop_start = 0, moved_two = 0, no_extra = 0;
+ int loop_start = 0;
uint32_t tsused;
- uint32_t segsiz, o_cnt;
+ uint32_t segsiz;
INP_WLOCK_ASSERT(tptoinpcb(tp));
@@ -11963,8 +11501,6 @@ rack_log_ack(struct tcpcb *tp, struct tcpopt *to, struct tcphdr *th, int entered
rsm = tqhash_min(rack->r_ctl.tqh);
changed = 0;
th_ack = th->th_ack;
- if (rack->sack_attack_disable == 0)
- rack_do_decay(rack);
segsiz = ctf_fixed_maxseg(rack->rc_tp);
if (BYTES_THIS_ACK(tp, th) >= segsiz) {
/*
@@ -11975,17 +11511,8 @@ rack_log_ack(struct tcpcb *tp, struct tcpopt *to, struct tcphdr *th, int entered
int ac;
ac = BYTES_THIS_ACK(tp, th) / ctf_fixed_maxseg(rack->rc_tp);
- rack->r_ctl.ack_count += ac;
counter_u64_add(rack_ack_total, ac);
}
- if (rack->r_ctl.ack_count > 0xfff00000) {
- /*
- * reduce the number to keep us under
- * a uint32_t.
- */
- rack->r_ctl.ack_count /= 2;
- rack->r_ctl.sack_count /= 2;
- }
if (SEQ_GT(th_ack, tp->snd_una)) {
rack_log_progress_event(rack, tp, ticks, PROGRESS_UPDATE, __LINE__);
tp->t_acktime = ticks;
@@ -12051,52 +11578,16 @@ rack_log_ack(struct tcpcb *tp, struct tcpopt *to, struct tcphdr *th, int entered
* Sort the SACK blocks so we can update the rack scoreboard with
* just one pass.
*/
- o_cnt = num_sack_blks;
- num_sack_blks = sack_filter_blks(&rack->r_ctl.rack_sf, sack_blocks,
+ num_sack_blks = sack_filter_blks(tp, &rack->r_ctl.rack_sf, sack_blocks,
num_sack_blks, th->th_ack);
ctf_log_sack_filter(rack->rc_tp, num_sack_blks, sack_blocks);
if (sacks_seen != NULL)
*sacks_seen = num_sack_blks;
if (num_sack_blks == 0) {
/* Nothing to sack, but we need to update counts */
- if ((o_cnt == 1) &&
- (*dsack_seen != 1))
- rack->r_ctl.sack_count++;
- else if (o_cnt > 1)
- rack->r_ctl.sack_count++;
goto out_with_totals;
}
- if (rack->sack_attack_disable) {
- /*
- * An attacker disablement is in place, for
- * every sack block that is not at least a full MSS
- * count up sack_count.
- */
- for (i = 0; i < num_sack_blks; i++) {
- if ((sack_blocks[i].end - sack_blocks[i].start) < segsiz) {
- rack->r_ctl.sack_count++;
- }
- if (rack->r_ctl.sack_count > 0xfff00000) {
- /*
- * reduce the number to keep us under
- * a uint32_t.
- */
- rack->r_ctl.ack_count /= 2;
- rack->r_ctl.sack_count /= 2;
- }
- }
- goto out;
- }
/* Its a sack of some sort */
- rack->r_ctl.sack_count += num_sack_blks;
- if (rack->r_ctl.sack_count > 0xfff00000) {
- /*
- * reduce the number to keep us under
- * a uint32_t.
- */
- rack->r_ctl.ack_count /= 2;
- rack->r_ctl.sack_count /= 2;
- }
if (num_sack_blks < 2) {
/* Only one, we don't need to sort */
goto do_sack_work;
@@ -12164,7 +11655,7 @@ do_sack_work:
* We probably did the FR and the next
* SACK in continues as we would expect.
*/
- acked = rack_proc_sack_blk(tp, rack, &sack_blocks[0], to, &rsm, cts, &no_extra, &moved_two, segsiz);
+ acked = rack_proc_sack_blk(tp, rack, &sack_blocks[0], to, &rsm, cts, segsiz);
if (acked) {
rack->r_wanted_output = 1;
changed += acked;
@@ -12180,40 +11671,8 @@ do_sack_work:
* are acked). Count this as ACK'd data to boost
* up the chances of recovering any false positives.
*/
- rack->r_ctl.ack_count += (acked / ctf_fixed_maxseg(rack->rc_tp));
counter_u64_add(rack_ack_total, (acked / ctf_fixed_maxseg(rack->rc_tp)));
counter_u64_add(rack_express_sack, 1);
- if (rack->r_ctl.ack_count > 0xfff00000) {
- /*
- * reduce the number to keep us under
- * a uint32_t.
- */
- rack->r_ctl.ack_count /= 2;
- rack->r_ctl.sack_count /= 2;
- }
- if (moved_two) {
- /*
- * If we did not get a SACK for at least a MSS and
- * had to move at all, or if we moved more than our
- * threshold, it counts against the "extra" move.
- */
- rack->r_ctl.sack_moved_extra += moved_two;
- rack->r_ctl.sack_noextra_move += no_extra;
- counter_u64_add(rack_move_some, 1);
- } else {
- /*
- * else we did not have to move
- * any more than we would expect.
- */
- rack->r_ctl.sack_noextra_move += no_extra;
- rack->r_ctl.sack_noextra_move++;
- counter_u64_add(rack_move_none, 1);
- }
- if ((rack->r_ctl.sack_moved_extra > 0xfff00000) ||
- (rack->r_ctl.sack_noextra_move > 0xfff00000)) {
- rack->r_ctl.sack_moved_extra /= 2;
- rack->r_ctl.sack_noextra_move /= 2;
- }
goto out_with_totals;
} else {
/*
@@ -12226,57 +11685,11 @@ do_sack_work:
counter_u64_add(rack_sack_total, 1);
rsm = rack->r_ctl.rc_sacklast;
for (i = loop_start; i < num_sack_blks; i++) {
- acked = rack_proc_sack_blk(tp, rack, &sack_blocks[i], to, &rsm, cts, &no_extra, &moved_two, segsiz);
+ acked = rack_proc_sack_blk(tp, rack, &sack_blocks[i], to, &rsm, cts, segsiz);
if (acked) {
rack->r_wanted_output = 1;
changed += acked;
}
- if (moved_two) {
- /*
- * If we did not get a SACK for at least a MSS and
- * had to move at all, or if we moved more than our
- * threshold, it counts against the "extra" move.
- */
- rack->r_ctl.sack_moved_extra += moved_two;
- rack->r_ctl.sack_noextra_move += no_extra;
- counter_u64_add(rack_move_some, 1);
- } else {
- /*
- * else we did not have to move
- * any more than we would expect.
- */
- rack->r_ctl.sack_noextra_move += no_extra;
- rack->r_ctl.sack_noextra_move++;
- counter_u64_add(rack_move_none, 1);
- }
- if ((rack->r_ctl.sack_moved_extra > 0xfff00000) ||
- (rack->r_ctl.sack_noextra_move > 0xfff00000)) {
- rack->r_ctl.sack_moved_extra /= 2;
- rack->r_ctl.sack_noextra_move /= 2;
- }
- if (moved_two && (acked < ctf_fixed_maxseg(rack->rc_tp))) {
- /*
- * If the SACK was not a full MSS then
- * we add to sack_count the number of
- * MSS's (or possibly more than
- * a MSS if its a TSO send) we had to skip by.
- */
- rack->r_ctl.sack_count += moved_two;
- if (rack->r_ctl.sack_count > 0xfff00000) {
- rack->r_ctl.ack_count /= 2;
- rack->r_ctl.sack_count /= 2;
- }
- counter_u64_add(rack_sack_total, moved_two);
- }
- /*
- * Now we need to setup for the next
- * round. First we make sure we won't
- * exceed the size of our uint32_t on
- * the various counts, and then clear out
- * moved_two.
- */
- moved_two = 0;
- no_extra = 0;
}
out_with_totals:
if (num_sack_blks > 1) {
@@ -12288,13 +11701,9 @@ out_with_totals:
* it could be an attacker constantly
* moving us.
*/
- rack->r_ctl.sack_moved_extra++;
counter_u64_add(rack_move_some, 1);
}
out:
-#ifdef TCP_SAD_DETECTION
- rack_do_detection(tp, rack, BYTES_THIS_ACK(tp, th), ctf_fixed_maxseg(rack->rc_tp));
-#endif
if (changed) {
/* Something changed cancel the rack timer */
rack_timer_cancel(tp, rack, rack->r_ctl.rc_rcvtime, __LINE__);
@@ -13092,24 +12501,6 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
}
rack_log_ack(tp, to, th, ((in_rec == 0) && IN_FASTRECOVERY(tp->t_flags)),
dup_ack_struck, &dsack_seen, &sacks_seen);
- if ((rack->sack_attack_disable > 0) &&
- (th->th_ack == tp->snd_una) &&
- (tiwin == tp->snd_wnd) &&
- (orig_tlen == 0) &&
- (dsack_seen == 0) &&
- (sacks_seen > 0)) {
- /*
- * If sacks have been disabled we may
- * want to strike a dup-ack "ignoring" the
- * sack as long as the sack was not a "dsack". Note
- * that if no sack is sent (TOF_SACK is off) then the
- * normal dsack code above rack_log_ack() would have
- * already struck. So this is just to catch the case
- * were we are ignoring sacks from this guy due to
- * it being a suspected attacker.
- */
- rack_strike_dupack(rack, th->th_ack);
- }
}
if (__predict_false(SEQ_LEQ(th->th_ack, tp->snd_una))) {
@@ -16142,11 +15533,6 @@ rack_init(struct tcpcb *tp, void **ptr)
rack->rack_hdw_pace_ena = 1;
if (rack_hw_rate_caps)
rack->r_rack_hw_rate_caps = 1;
-#ifdef TCP_SAD_DETECTION
- rack->do_detection = 1;
-#else
- rack->do_detection = 0;
-#endif
if (rack_non_rxt_use_cr)
rack->rack_rec_nonrxt_use_cr = 1;
/* Lets setup the fsb block */
@@ -17164,10 +16550,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb
/* Case C */
ae->ack_val_set = ACK_RWND;
}
- if (rack->sack_attack_disable > 0) {
- rack_log_type_bbrsnd(rack, 0, 0, cts, tv, __LINE__);
- rack->r_ctl.ack_during_sd++;
- }
+ rack_log_type_bbrsnd(rack, 0, 0, cts, tv, __LINE__);
rack_log_input_packet(tp, rack, ae, ae->ack_val_set, high_seq);
/* Validate timestamp */
if (ae->flags & HAS_TSTMP) {
@@ -17374,28 +16757,6 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb
* since cum-ack moved forward.
*/
rack->probe_not_answered = 0;
- if (rack->sack_attack_disable == 0)
- rack_do_decay(rack);
- if (acked >= segsiz) {
- /*
- * You only get credit for
- * MSS and greater (and you get extra
- * credit for larger cum-ack moves).
- */
- int ac;
-
- ac = acked / segsiz;
- rack->r_ctl.ack_count += ac;
- counter_u64_add(rack_ack_total, ac);
- }
- if (rack->r_ctl.ack_count > 0xfff00000) {
- /*
- * reduce the number to keep us under
- * a uint32_t.
- */
- rack->r_ctl.ack_count /= 2;
- rack->r_ctl.sack_count /= 2;
- }
if (tp->t_flags & TF_NEEDSYN) {
/*
* T/TCP: Connection was half-synchronized, and our SYN has
@@ -17409,16 +16770,6 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb
}
if (acked > sbavail(&so->so_snd))
acked_amount = sbavail(&so->so_snd);
-#ifdef TCP_SAD_DETECTION
- /*
- * We only care on a cum-ack move if we are in a sack-disabled
- * state. We have already added in to the ack_count, and we never
- * would disable on a cum-ack move, so we only care to do the
- * detection if it may "undo" it, i.e. we were in disabled already.
- */
- if (rack->sack_attack_disable)
- rack_do_detection(tp, rack, acked_amount, segsiz);
-#endif
if (IN_FASTRECOVERY(tp->t_flags) &&
(rack->rack_no_prr == 0))
rack_update_prr(tp, rack, acked_amount, high_seq);
@@ -17933,7 +17284,14 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
__func__));
KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT",
__func__));
-
+ if (tp->t_flags2 & TF2_PROC_SACK_PROHIBIT) {
+ /*
+ * We don't look at sack's from the
+ * peer because the MSS is too small which
+ * can subject us to an attack.
+ */
+ to.to_flags &= ~TOF_SACK;
+ }
if ((tp->t_state >= TCPS_FIN_WAIT_1) &&
(tp->t_flags & TF_GPUTINPROG)) {
/*
@@ -18042,10 +17400,7 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
/* Remove ack required flag if set, we have one */
if (thflags & TH_ACK)
rack->rc_ack_required = 0;
- if (rack->sack_attack_disable > 0) {
- rack->r_ctl.ack_during_sd++;
- rack_log_type_bbrsnd(rack, 0, 0, cts, tv, __LINE__);
- }
+ rack_log_type_bbrsnd(rack, 0, 0, cts, tv, __LINE__);
if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) {
way_out = 4;
retval = 0;
@@ -18441,7 +17796,6 @@ tcp_rack_output(struct tcpcb *tp, struct tcp_rack *rack, uint32_t tsused)
struct rack_sendmap *rsm = NULL;
int32_t idx;
uint32_t srtt = 0, thresh = 0, ts_low = 0;
- int no_sack = 0;
/* Return the next guy to be re-transmitted */
if (tqhash_empty(rack->r_ctl.tqh)) {
@@ -18464,11 +17818,7 @@ tcp_rack_output(struct tcpcb *tp, struct tcp_rack *rack, uint32_t tsused)
return (NULL);
}
check_it:
- if (((rack->rc_tp->t_flags & TF_SACK_PERMIT) == 0) ||
- (rack->sack_attack_disable > 0)) {
- no_sack = 1;
- }
- if ((no_sack > 0) &&
+ if (((rack->rc_tp->t_flags & TF_SACK_PERMIT) == 0) &&
(rsm->r_dupack >= DUP_ACK_THRESHOLD)) {
/*
* No sack so we automatically do the 3 strikes and
@@ -18498,8 +17848,7 @@ check_it:
return (NULL);
}
if ((rsm->r_dupack >= DUP_ACK_THRESHOLD) ||
- ((rsm->r_flags & RACK_SACK_PASSED) &&
- (rack->sack_attack_disable == 0))) {
+ ((rsm->r_flags & RACK_SACK_PASSED))) {
/*
* We have passed the dup-ack threshold <or>
* a SACK has indicated this is missing.
@@ -21841,7 +21190,6 @@ again:
* as long as we are not retransmiting.
*/
if ((rsm == NULL) &&
- (rack->do_detection == 0) &&
(V_tcp_map_entries_limit > 0) &&
(rack->r_ctl.rc_num_maps_alloced >= V_tcp_map_entries_limit)) {
counter_u64_add(rack_to_alloc_limited, 1);
@@ -22759,7 +22107,8 @@ send:
* is acked first.
*/
flags &= ~TH_FIN;
- if ((sbused(sb) == (tp->snd_max - tp->snd_una)) &&
+ if (TCPS_HAVEESTABLISHED(tp->t_state) &&
+ (sbused(sb) == (tp->snd_max - tp->snd_una)) &&
((tp->snd_max - tp->snd_una) <= segsiz)) {
/*
* Ok less than or right at a MSS is
@@ -24929,11 +24278,7 @@ rack_process_option(struct tcpcb *tp, struct tcp_rack *rack, int sopt_name,
}
break;
case TCP_RACK_DO_DETECTION:
- RACK_OPTS_INC(tcp_rack_do_detection);
- if (optval == 0)
- rack->do_detection = 0;
- else
- rack->do_detection = 1;
+ error = EINVAL;
break;
case TCP_RACK_TLP_USE:
if ((optval < TLP_USE_ID) || (optval > TLP_USE_TWO_TWO)) {
@@ -25625,11 +24970,6 @@ rack_inherit(struct tcpcb *tp, struct inpcb *parent)
dest->r_ctl.rack_per_of_gp_ca = src->r_ctl.rack_per_of_gp_ca;
cnt++;
}
- /* TCP_RACK_DO_DETECTION */
- if (dest->do_detection != src->do_detection) {
- dest->do_detection = src->do_detection;
- cnt++;
- }
/* TCP_RACK_TLP_USE */
if (dest->rack_tlp_threshold_use != src->rack_tlp_threshold_use) {
dest->rack_tlp_threshold_use = src->rack_tlp_threshold_use;
@@ -26020,7 +25360,6 @@ rack_set_sockopt(struct tcpcb *tp, struct sockopt *sopt)
case TCP_RACK_TLP_USE: /* URL:tlp_use */
case TCP_BBR_RACK_RTT_USE: /* URL:rttuse */
case TCP_BBR_USE_RACK_RR: /* URL:rackrr */
- case TCP_RACK_DO_DETECTION: /* URL:detect */
case TCP_NO_PRR: /* URL:noprr */
case TCP_TIMELY_DYN_ADJ: /* URL:dynamic */
case TCP_DATA_AFTER_CLOSE: /* no URL */
@@ -26327,7 +25666,7 @@ rack_get_sockopt(struct tcpcb *tp, struct sockopt *sopt)
}
break;
case TCP_RACK_DO_DETECTION:
- optval = rack->do_detection;
+ error = EINVAL;
break;
case TCP_RACK_MBUF_QUEUE:
/* Now do we use the LRO mbuf-queue feature */
diff --git a/sys/netinet/tcp_stacks/sack_filter.c b/sys/netinet/tcp_stacks/sack_filter.c
index e82fcee2ffac..fc9ee8454a1e 100644
--- a/sys/netinet/tcp_stacks/sack_filter.c
+++ b/sys/netinet/tcp_stacks/sack_filter.c
@@ -35,7 +35,13 @@
#include <sys/sockopt.h>
#endif
#include <netinet/in.h>
+#ifdef _KERNEL
#include <netinet/in_pcb.h>
+#else
+struct inpcb {
+ uint32_t stuff;
+};
+#endif
#include <netinet/tcp.h>
#include <netinet/tcp_var.h>
#include <netinet/tcp_seq.h>
@@ -86,9 +92,9 @@ uint64_t cnt_used_oldsack = 0;
int highest_used=0;
int over_written=0;
int empty_avail=0;
-int no_collapse = 0;
FILE *out = NULL;
FILE *in = NULL;
+
#endif
#define sack_blk_used(sf, i) ((1 << i) & sf->sf_bits)
@@ -96,6 +102,13 @@ FILE *in = NULL;
#define sack_blk_clr(sf, i) (~(1 << i) & sf->sf_bits)
#ifndef _KERNEL
+
+static u_int tcp_fixed_maxseg(const struct tcpcb *tp)
+{
+ /* Lets pretend their are timestamps on for user space */
+ return (tp->t_maxseg - 12);
+}
+
static
#endif
void
@@ -118,7 +131,7 @@ sack_filter_prune(struct sack_filter *sf, tcp_seq th_ack)
/* start with the oldest */
for (i = 0; i < SACK_FILTER_BLOCKS; i++) {
if (sack_blk_used(sf, i)) {
- if (SEQ_GT(th_ack, sf->sf_blks[i].end)) {
+ if (SEQ_GEQ(th_ack, sf->sf_blks[i].end)) {
/* This block is consumed */
sf->sf_bits = sack_blk_clr(sf, i);
sf->sf_used--;
@@ -143,23 +156,27 @@ sack_filter_prune(struct sack_filter *sf, tcp_seq th_ack)
* if part of it is on the board.
*/
static int32_t
-is_sack_on_board(struct sack_filter *sf, struct sackblk *b)
+is_sack_on_board(struct sack_filter *sf, struct sackblk *b, int32_t segmax, uint32_t snd_max)
{
int32_t i, cnt;
+ int span_cnt = 0;
+ uint32_t span_start, span_end;
+ if (SEQ_LT(b->start, sf->sf_ack)) {
+ /* Behind cum-ack update */
+ b->start = sf->sf_ack;
+ }
+ if (SEQ_LT(b->end, sf->sf_ack)) {
+ /* End back behind too */
+ b->end = sf->sf_ack;
+ }
+ if (b->start == b->end) {
+ return(1);
+ }
+ span_start = b->start;
+ span_end = b->end;
for (i = sf->sf_cur, cnt=0; cnt < SACK_FILTER_BLOCKS; cnt++) {
if (sack_blk_used(sf, i)) {
- if (SEQ_LT(b->start, sf->sf_ack)) {
- /* Behind cum-ack update */
- b->start = sf->sf_ack;
- }
- if (SEQ_LT(b->end, sf->sf_ack)) {
- /* End back behind too */
- b->end = sf->sf_ack;
- }
- if (b->start == b->end) {
- return(1);
- }
/* Jonathans Rule 1 */
if (SEQ_LEQ(sf->sf_blks[i].start, b->start) &&
SEQ_GEQ(sf->sf_blks[i].end, b->end)) {
@@ -184,6 +201,15 @@ is_sack_on_board(struct sack_filter *sf, struct sackblk *b)
* board |---|
* sack |---|
*/
+ if ((b->end != snd_max) &&
+ (span_cnt < 2) &&
+ ((b->end - b->start) < segmax)) {
+ /*
+ * Too small for us to mess with so we
+ * pretend its on the board.
+ */
+ return (1);
+ }
goto nxt_blk;
}
/* Jonathans Rule 3 */
@@ -194,6 +220,16 @@ is_sack_on_board(struct sack_filter *sf, struct sackblk *b)
* board |---|
* sack |---|
*/
+ if ((b->end != snd_max) &&
+ (sf->sf_blks[i].end != snd_max) &&
+ (span_cnt < 2) &&
+ ((b->end - b->start) < segmax)) {
+ /*
+ * Too small for us to mess with so we
+ * pretend its on the board.
+ */
+ return (1);
+ }
goto nxt_blk;
}
if (SEQ_LEQ(sf->sf_blks[i].start, b->start)) {
@@ -207,12 +243,36 @@ is_sack_on_board(struct sack_filter *sf, struct sackblk *b)
* sack |--------------|
*
* up with this one (we have part of it).
+ *
* 1) Update the board block to the new end
* and
* 2) Update the start of this block to my end.
+ *
+ * We only do this if the new piece is large enough.
*/
+ if (((b->end != snd_max) || (sf->sf_blks[i].end == snd_max)) &&
+ (span_cnt == 0) &&
+ ((b->end - sf->sf_blks[i].end) < segmax)) {
+ /*
+ * Too small for us to mess with so we
+ * pretend its on the board.
+ */
+ return (1);
+ }
b->start = sf->sf_blks[i].end;
sf->sf_blks[i].end = b->end;
+ if (span_cnt == 0) {
+ span_start = sf->sf_blks[i].start;
+ span_end = sf->sf_blks[i].end;
+ } else {
+ if (SEQ_LT(span_start, sf->sf_blks[i].start)) {
+ span_start = sf->sf_blks[i].start;
+ }
+ if (SEQ_GT(span_end, sf->sf_blks[i].end)) {
+ span_end = sf->sf_blks[i].end;
+ }
+ }
+ span_cnt++;
goto nxt_blk;
}
if (SEQ_GEQ(sf->sf_blks[i].end, b->end)) {
@@ -224,12 +284,36 @@ is_sack_on_board(struct sack_filter *sf, struct sackblk *b)
* <or>
* board |----|
* sack |----------|
+ *
* 1) Update the board block to the new start
* and
* 2) Update the start of this block to my end.
+ *
+ * We only do this if the new piece is large enough.
*/
+ if (((b->end != snd_max) || (sf->sf_blks[i].end == snd_max)) &&
+ (span_cnt == 0) &&
+ ((sf->sf_blks[i].start - b->start) < segmax)) {
+ /*
+ * Too small for us to mess with so we
+ * pretend its on the board.
+ */
+ return (1);
+ }
b->end = sf->sf_blks[i].start;
sf->sf_blks[i].start = b->start;
+ if (span_cnt == 0) {
+ span_start = sf->sf_blks[i].start;
+ span_end = sf->sf_blks[i].end;
+ } else {
+ if (SEQ_LT(span_start, sf->sf_blks[i].start)) {
+ span_start = sf->sf_blks[i].start;
+ }
+ if (SEQ_GT(span_end, sf->sf_blks[i].end)) {
+ span_end = sf->sf_blks[i].end;
+ }
+ }
+ span_cnt++;
goto nxt_blk;
}
}
@@ -238,46 +322,23 @@ is_sack_on_board(struct sack_filter *sf, struct sackblk *b)
i %= SACK_FILTER_BLOCKS;
}
/* Did we totally consume it in pieces? */
- if (b->start != b->end)
- return(0);
- else
- return(1);
-}
-
-static int32_t
-sack_filter_old(struct sack_filter *sf, struct sackblk *in, int numblks)
-{
- int32_t num, i;
- struct sackblk blkboard[TCP_MAX_SACK];
- /*
- * An old sack has arrived. It may contain data
- * we do not have. We might not have it since
- * we could have had a lost ack <or> we might have the
- * entire thing on our current board. We want to prune
- * off anything we have. With this function though we
- * won't add to the board.
- */
- for( i = 0, num = 0; i<numblks; i++ ) {
- if (is_sack_on_board(sf, &in[i])) {
-#ifndef _KERNEL
- cnt_skipped_oldsack++;
-#endif
- continue;
+ if (b->start != b->end) {
+ if ((b->end != snd_max) &&
+ ((b->end - b->start) < segmax) &&
+ ((span_end - span_start) < segmax)) {
+ /*
+ * Too small for us to mess with so we
+ * pretend its on the board.
+ */
+ return (1);
}
- /* Did not find it (or found only
- * a piece of it). Copy it to
- * our outgoing board.
+ return(0);
+ } else {
+ /*
+ * It was all consumed by the board.
*/
- memcpy(&blkboard[num], &in[i], sizeof(struct sackblk));
-#ifndef _KERNEL
- cnt_used_oldsack++;
-#endif
- num++;
- }
- if (num) {
- memcpy(in, blkboard, (num * sizeof(struct sackblk)));
+ return(1);
}
- return (num);
}
/*
@@ -303,54 +364,53 @@ sack_move_to_empty(struct sack_filter *sf, uint32_t idx)
}
static int32_t
-sack_filter_new(struct sack_filter *sf, struct sackblk *in, int numblks, tcp_seq th_ack)
+sack_filter_run(struct sack_filter *sf, struct sackblk *in, int numblks, tcp_seq th_ack, int32_t segmax, uint32_t snd_max)
{
struct sackblk blkboard[TCP_MAX_SACK];
- int32_t num, i;
+ int32_t num, i, room, at;
/*
* First lets trim the old and possibly
* throw any away we have.
*/
for(i=0, num=0; i<numblks; i++) {
- if (is_sack_on_board(sf, &in[i]))
+ if (is_sack_on_board(sf, &in[i], segmax, snd_max))
continue;
memcpy(&blkboard[num], &in[i], sizeof(struct sackblk));
num++;
}
- if (num == 0)
+ if (num == 0) {
return(num);
+ }
- /* Now what we are left with is either
- * completely merged on to the board
- * from the above steps, or is new
- * and need to be added to the board
- * with the last one updated to current.
- *
- * First copy it out, we want to return that
- * to our caller for processing.
+ /*
+ * Calculate the space we have in the filter table.
*/
- memcpy(in, blkboard, (num * sizeof(struct sackblk)));
- numblks = num;
- /* Now go through and add to our board as needed */
- for(i=(num-1); i>=0; i--) {
- if (is_sack_on_board(sf, &blkboard[i])) {
- continue;
+ room = SACK_FILTER_BLOCKS - sf->sf_used;
+ if (room < 1)
+ return (0);
+ /*
+ * Now lets walk through our filtered blkboard (the previous loop
+ * trimmed off anything on the board we already have so anything
+ * in blkboard is unique and not seen before) if there is room we copy
+ * it back out and place a new entry on our board.
+ */
+ for(i=0, at=0; i<num; i++) {
+ if (room == 0) {
+ /* Can't copy out any more, no more room */
+ break;
}
- /* Add this guy its not listed */
+ /* Copy it out to the outbound */
+ memcpy(&in[at], &blkboard[i], sizeof(struct sackblk));
+ at++;
+ room--;
+ /* now lets add it to our sack-board */
sf->sf_cur++;
sf->sf_cur %= SACK_FILTER_BLOCKS;
if ((sack_blk_used(sf, sf->sf_cur)) &&
(sf->sf_used < SACK_FILTER_BLOCKS)) {
sack_move_to_empty(sf, sf->sf_cur);
}
-#ifndef _KERNEL
- if (sack_blk_used(sf, sf->sf_cur)) {
- over_written++;
- if (sf->sf_used < SACK_FILTER_BLOCKS)
- empty_avail++;
- }
-#endif
- memcpy(&sf->sf_blks[sf->sf_cur], &in[i], sizeof(struct sackblk));
+ memcpy(&sf->sf_blks[sf->sf_cur], &blkboard[i], sizeof(struct sackblk));
if (sack_blk_used(sf, sf->sf_cur) == 0) {
sf->sf_used++;
#ifndef _KERNEL
@@ -360,7 +420,26 @@ sack_filter_new(struct sack_filter *sf, struct sackblk *in, int numblks, tcp_seq
sf->sf_bits = sack_blk_set(sf, sf->sf_cur);
}
}
- return(numblks);
+ return(at);
+}
+
+/*
+ * Collapse entry src into entry into
+ * and free up the src entry afterwards.
+ */
+static void
+sack_collapse(struct sack_filter *sf, int32_t src, int32_t into)
+{
+ if (SEQ_LT(sf->sf_blks[src].start, sf->sf_blks[into].start)) {
+ /* src has a lower starting point */
+ sf->sf_blks[into].start = sf->sf_blks[src].start;
+ }
+ if (SEQ_GT(sf->sf_blks[src].end, sf->sf_blks[into].end)) {
+ /* src has a higher ending point */
+ sf->sf_blks[into].end = sf->sf_blks[src].end;
+ }
+ sf->sf_bits = sack_blk_clr(sf, src);
+ sf->sf_used--;
}
/*
@@ -415,25 +494,6 @@ sack_blocks_overlap_or_meet(struct sack_filter *sf, struct sackblk *sb, uint32_t
return (-1);
}
-/*
- * Collapse entry src into entry into
- * and free up the src entry afterwards.
- */
-static void
-sack_collapse(struct sack_filter *sf, int32_t src, int32_t into)
-{
- if (SEQ_LT(sf->sf_blks[src].start, sf->sf_blks[into].start)) {
- /* src has a lower starting point */
- sf->sf_blks[into].start = sf->sf_blks[src].start;
- }
- if (SEQ_GT(sf->sf_blks[src].end, sf->sf_blks[into].end)) {
- /* src has a higher ending point */
- sf->sf_blks[into].end = sf->sf_blks[src].end;
- }
- sf->sf_bits = sack_blk_clr(sf, src);
- sf->sf_used--;
-}
-
static void
sack_board_collapse(struct sack_filter *sf)
{
@@ -485,9 +545,12 @@ sack_filter_dump(FILE *out, struct sack_filter *sf)
for(i=0; i<SACK_FILTER_BLOCKS; i++) {
if (sack_blk_used(sf, i)) {
- fprintf(out, "Entry:%d start:%u end:%u\n", i,
- sf->sf_blks[i].start,
- sf->sf_blks[i].end);
+ fprintf(out, "Entry:%d start:%u end:%u the block is %s\n",
+ i,
+ sf->sf_blks[i].start,
+ sf->sf_blks[i].end,
+ (sack_blk_used(sf, i) ? "USED" : "NOT-USED")
+ );
}
}
}
@@ -497,10 +560,11 @@ sack_filter_dump(FILE *out, struct sack_filter *sf)
static
#endif
int
-sack_filter_blks(struct sack_filter *sf, struct sackblk *in, int numblks,
+sack_filter_blks(struct tcpcb *tp, struct sack_filter *sf, struct sackblk *in, int numblks,
tcp_seq th_ack)
{
int32_t i, ret;
+ int32_t segmax;
if (numblks > TCP_MAX_SACK) {
#ifdef _KERNEL
@@ -510,14 +574,10 @@ sack_filter_blks(struct sack_filter *sf, struct sackblk *in, int numblks,
#endif
return(numblks);
}
-#ifndef _KERNEL
- if ((sf->sf_used > 1) && (no_collapse == 0))
- sack_board_collapse(sf);
-
-#else
if (sf->sf_used > 1)
sack_board_collapse(sf);
-#endif
+
+ segmax = tcp_fixed_maxseg(tp);
if ((sf->sf_used == 0) && numblks) {
/*
* We are brand new add the blocks in
@@ -527,7 +587,15 @@ sack_filter_blks(struct sack_filter *sf, struct sackblk *in, int numblks,
int cnt_added = 0;
sf->sf_ack = th_ack;
- for(i=(numblks-1), sf->sf_cur=0; i >= 0; i--) {
+ for(i=0, sf->sf_cur=0; i<numblks; i++) {
+ if ((in[i].end != tp->snd_max) &&
+ ((in[i].end - in[i].start) < segmax)) {
+ /*
+ * We do not accept blocks less than a MSS minus all
+ * possible options space that is not at max_seg.
+ */
+ continue;
+ }
memcpy(&sf->sf_blks[sf->sf_cur], &in[i], sizeof(struct sackblk));
sf->sf_bits = sack_blk_set(sf, sf->sf_cur);
sf->sf_cur++;
@@ -548,11 +616,9 @@ sack_filter_blks(struct sack_filter *sf, struct sackblk *in, int numblks,
sack_filter_prune(sf, th_ack);
}
if (numblks) {
- if (SEQ_GEQ(th_ack, sf->sf_ack)) {
- ret = sack_filter_new(sf, in, numblks, th_ack);
- } else {
- ret = sack_filter_old(sf, in, numblks);
- }
+ ret = sack_filter_run(sf, in, numblks, th_ack, segmax, tp->snd_max);
+ if (sf->sf_used > 1)
+ sack_board_collapse(sf);
} else
ret = 0;
return (ret);
@@ -625,7 +691,8 @@ main(int argc, char **argv)
char buffer[512];
struct sackblk blks[TCP_MAX_SACK];
FILE *err;
- tcp_seq th_ack, snd_una, snd_max = 0;
+ tcp_seq th_ack;
+ struct tcpcb tp;
struct sack_filter sf;
int32_t numblks,i;
int snd_una_set=0;
@@ -638,10 +705,13 @@ main(int argc, char **argv)
in = stdin;
out = stdout;
- while ((i = getopt(argc, argv, "ndIi:o:?h")) != -1) {
+ memset(&tp, 0, sizeof(tp));
+ tp.t_maxseg = 1460;
+
+ while ((i = getopt(argc, argv, "dIi:o:?hS:")) != -1) {
switch (i) {
- case 'n':
- no_collapse = 1;
+ case 'S':
+ tp.t_maxseg = strtol(optarg, NULL, 0);
break;
case 'd':
detailed_dump = 1;
@@ -666,7 +736,7 @@ main(int argc, char **argv)
default:
case '?':
case 'h':
- fprintf(stderr, "Use %s [ -i infile -o outfile -I]\n", argv[0]);
+ fprintf(stderr, "Use %s [ -i infile -o outfile -I -S maxseg -n -d ]\n", argv[0]);
return(0);
break;
};
@@ -679,28 +749,28 @@ main(int argc, char **argv)
while (fgets(buffer, sizeof(buffer), in) != NULL) {
sprintf(line_buf[line_buf_at], "%s", buffer);
line_buf_at++;
- if (strncmp(buffer, "QUIT", 4) == 0) {
+ if (strncmp(buffer, "quit", 4) == 0) {
break;
- } else if (strncmp(buffer, "DUMP", 4) == 0) {
+ } else if (strncmp(buffer, "dump", 4) == 0) {
sack_filter_dump(out, &sf);
- } else if (strncmp(buffer, "MAX:", 4) == 0) {
- snd_max = strtoul(&buffer[4], NULL, 0);
- } else if (strncmp(buffer, "COMMIT", 6) == 0) {
+ } else if (strncmp(buffer, "max:", 4) == 0) {
+ tp.snd_max = strtoul(&buffer[4], NULL, 0);
+ } else if (strncmp(buffer, "commit", 6) == 0) {
int nn, ii;
if (numblks) {
uint32_t szof, tot_chg;
+ printf("Dumping line buffer (lines:%d)\n", line_buf_at);
for(ii=0; ii<line_buf_at; ii++) {
fprintf(out, "%s", line_buf[ii]);
}
- fprintf(out, "------------------------------------\n");
- nn = sack_filter_blks(&sf, blks, numblks, th_ack);
+ fprintf(out, "------------------------------------ call sfb() nb:%d\n", numblks);
+ nn = sack_filter_blks(&tp, &sf, blks, numblks, th_ack);
saved += numblks - nn;
tot_sack_blks += numblks;
- fprintf(out, "ACK:%u\n", sf.sf_ack);
for(ii=0, tot_chg=0; ii<nn; ii++) {
szof = blks[ii].end - blks[ii].start;
tot_chg += szof;
- fprintf(out, "SACK:%u:%u [%u]\n",
+ fprintf(out, "sack:%u:%u [%u]\n",
blks[ii].start,
blks[ii].end, szof);
}
@@ -715,7 +785,7 @@ main(int argc, char **argv)
memset(line_buf, 0, sizeof(line_buf));
line_buf_at=0;
numblks = 0;
- } else if (strncmp(buffer, "CHG:", 4) == 0) {
+ } else if (strncmp(buffer, "chg:", 4) == 0) {
sack_chg = strtoul(&buffer[4], NULL, 0);
if ((sack_chg != chg_remembered) &&
(sack_chg > chg_remembered)){
@@ -724,20 +794,21 @@ main(int argc, char **argv)
);
}
sack_chg = chg_remembered = 0;
- } else if (strncmp(buffer, "RXT", 3) == 0) {
- sack_filter_clear(&sf, snd_una);
- } else if (strncmp(buffer, "ACK:", 4) == 0) {
+ } else if (strncmp(buffer, "rxt", 3) == 0) {
+ sack_filter_clear(&sf, tp.snd_una);
+ } else if (strncmp(buffer, "ack:", 4) == 0) {
th_ack = strtoul(&buffer[4], NULL, 0);
if (snd_una_set == 0) {
- snd_una = th_ack;
+ tp.snd_una = th_ack;
snd_una_set = 1;
- } else if (SEQ_GT(th_ack, snd_una)) {
- snd_una = th_ack;
+ } else if (SEQ_GT(th_ack, tp.snd_una)) {
+ tp.snd_una = th_ack;
}
- } else if (strncmp(buffer, "EXIT", 4) == 0) {
- sack_filter_clear(&sf, snd_una);
+ sack_filter_blks(&tp, &sf, NULL, 0, th_ack);
+ } else if (strncmp(buffer, "exit", 4) == 0) {
+ sack_filter_clear(&sf, tp.snd_una);
sack_chg = chg_remembered = 0;
- } else if (strncmp(buffer, "SACK:", 5) == 0) {
+ } else if (strncmp(buffer, "sack:", 5) == 0) {
char *end=NULL;
uint32_t start;
uint32_t endv;
@@ -749,8 +820,8 @@ main(int argc, char **argv)
fprintf(out, "--Sack invalid skip 0 start:%u : ??\n", start);
continue;
}
- if (SEQ_GT(endv, snd_max))
- snd_max = endv;
+ if (SEQ_GT(endv, tp.snd_max))
+ tp.snd_max = endv;
if (SEQ_LT(endv, start)) {
fprintf(out, "--Sack invalid skip 1 endv:%u < start:%u\n", endv, start);
continue;
@@ -762,7 +833,7 @@ main(int argc, char **argv)
blks[numblks].start = start;
blks[numblks].end = endv;
numblks++;
- } else if (strncmp(buffer, "REJ:n:n", 4) == 0) {
+ } else if (strncmp(buffer, "rej:n:n", 4) == 0) {
struct sackblk in;
char *end=NULL;
@@ -772,18 +843,63 @@ main(int argc, char **argv)
sack_filter_reject(&sf, &in);
} else
fprintf(out, "Invalid input END:A:B\n");
- } else if (strncmp(buffer, "HELP", 4) == 0) {
+ } else if (strncmp(buffer, "save", 4) == 0) {
+ FILE *io;
+
+ io = fopen("sack_setup.bin", "w+");
+ if (io != NULL) {
+ if (fwrite(&sf, sizeof(sf), 1, io) != 1) {
+ printf("Failed to write out sf data\n");
+ unlink("sack_setup.bin");
+ goto outwrite;
+ }
+ if (fwrite(&tp, sizeof(tp), 1, io) != 1) {
+ printf("Failed to write out tp data\n");
+ unlink("sack_setup.bin");
+ } else
+ printf("Save completed\n");
+ outwrite:
+ fclose(io);
+ } else {
+ printf("failed to open sack_setup.bin for writting .. sorry\n");
+ }
+ } else if (strncmp(buffer, "restore", 7) == 0) {
+ FILE *io;
+
+ io = fopen("sack_setup.bin", "r");
+ if (io != NULL) {
+ if (fread(&sf, sizeof(sf), 1, io) != 1) {
+ printf("Failed to read out sf data\n");
+ goto outread;
+ }
+ if (fread(&tp, sizeof(tp), 1, io) != 1) {
+ printf("Failed to read out tp data\n");
+ } else {
+ printf("Restore completed\n");
+ sack_filter_dump(out, &sf);
+ }
+ outread:
+ fclose(io);
+ } else {
+ printf("can't open sack_setup.bin -- sorry no load\n");
+ }
+
+ } else if (strncmp(buffer, "help", 4) == 0) {
+help:
fprintf(out, "You can input:\n");
- fprintf(out, "SACK:S:E -- to define a sack block\n");
- fprintf(out, "RXT -- to clear the filter without changing the remembered\n");
- fprintf(out, "EXIT -- To clear the sack filter and start all fresh\n");
- fprintf(out, "ACK:N -- To advance the cum-ack to N\n");
- fprintf(out, "MAX:N -- To set send-max to N\n");
- fprintf(out, "COMMIT -- To apply the sack you built to the filter and dump the filter\n");
- fprintf(out, "DUMP -- To display the current contents of the sack filter\n");
- fprintf(out, "QUIT -- To exit this program\n");
+ fprintf(out, "sack:S:E -- to define a sack block\n");
+ fprintf(out, "rxt -- to clear the filter without changing the remembered\n");
+ fprintf(out, "save -- save current state to sack_setup.bin\n");
+ fprintf(out, "restore -- restore state from sack_setup.bin\n");
+ fprintf(out, "exit -- To clear the sack filter and start all fresh\n");
+ fprintf(out, "ack:N -- To advance the cum-ack to N\n");
+ fprintf(out, "max:N -- To set send-max to N\n");
+ fprintf(out, "commit -- To apply the sack you built to the filter and dump the filter\n");
+ fprintf(out, "dump -- To display the current contents of the sack filter\n");
+ fprintf(out, "quit -- To exit this program\n");
} else {
fprintf(out, "Command %s unknown\n", buffer);
+ goto help;
}
memset(buffer, 0, sizeof(buffer));
}
diff --git a/sys/netinet/tcp_stacks/sack_filter.h b/sys/netinet/tcp_stacks/sack_filter.h
index fe34b1e3ca9b..b12fcf84567c 100644
--- a/sys/netinet/tcp_stacks/sack_filter.h
+++ b/sys/netinet/tcp_stacks/sack_filter.h
@@ -25,19 +25,84 @@
* SUCH DAMAGE.
*/
-/*
- * Seven entry's is carefully choosen to
- * fit in one cache line. We can easily
- * change this to 15 (but it gets very
- * little extra filtering). To change it
- * to be larger than 15 would require either
- * sf_bits becoming a uint32_t and then you
- * could go to 31.. or change it to a full
- * bitstring.. It is really doubtful you
- * will get much benefit beyond 7, in testing
- * there was a small amount but very very small.
+/**
+ *
+ * The Sack filter is designed to do two functions, first it trys to reduce
+ * the processing of sacks. Consider that often times you get something like
+ *
+ * ack 1 (sack 100:200)
+ * ack 1 (sack 100:300)
+ * ack 1 (sack(100:400)
+ *
+ * You really want to process the 100:200 and then on the next sack process
+ * only 200:300 (the new data) and then finally on the third 300:400. The filter
+ * removes from your processing routines the already processed sack information so
+ * that after the filter completes you only have "new" sacks that you have not
+ * processed. This saves computation time so you do not need to worry about
+ * previously processed sack information.
+ *
+ * The second thing that the sack filter does is help protect against malicious
+ * attackers that are trying to attack any linked lists (or other data structures)
+ * that are used in sack processing. Consider an attacker sending in sacks for
+ * every other byte of data outstanding. This could in theory drastically split
+ * up any scoreboard you are maintaining and make you search through a very large
+ * linked list (or other structure) eating up CPU. If you split far enough and
+ * fracture your data structure enough you could potentially be crippled by a malicious
+ * peer. How the filter works here is it filters out sacks that are less than an MSS.
+ * We do this because generally a packet (aka MSS) should be kept whole. The only place
+ * we allow a smaller SACK is when the SACK touches the end of our socket buffer. This allows
+ * TLP to still work properly and yet protects us from splitting. The filter also only allows
+ * a set number of splits (defined in SACK_FILTER_BLOCKS). If more than that many sacks locations
+ * are being sent we discard additional ones until the earlier holes are filled up. The maximum
+ * the current filter can be is 15, which we have moved to since we want to be as generous as
+ * possible with allowing for loss. However, in previous testing of the filter it was found
+ * that there was very little benefit from moving from 7 to 15 sack points. Though at
+ * that previous set of tests, we would just discard earlier information in the filter. Now
+ * that we do not do that i.e. discard information and instead drop sack data we have raised
+ * the value to the max i.e. 15. If you want to expand beyond 15 one would have to either increase
+ * the size of the sf_bits to a uint32_t which could then get you a maximum of 31 splits or
+ * move to a true bitstring. If this is done however it further increases your risk to
+ * sack attacks, the bigger the number of splits (filter blocks) that are allowed
+ * the larger your processing arrays will grow as well as the filter.
+ *
+ * Note that this protection does not prevent an attacker from asking for a 20 byte
+ * MSS, that protection must be done elsewhere during the negotiation of the connection
+ * and is done now by just ignoring sack's from connections with too small of MSS which
+ * prevents sack from working and thus makes the connection less efficient but protects
+ * the system from harm.
+ *
+ * We may actually want to consider dropping the size of the array back to 7 to further
+ * protect the system which would be a more cautious approach.
+ *
+ * TCP Developer information:
+ *
+ * To use the sack filter its actually pretty simple. All you do is the normal sorting
+ * and sanity checks of your sacks but then after that you call out to sack_filter_blks()
+ * passing in the tcpcb, the sack-filter you are using (memory you have allocated) the
+ * pointer to the sackblk array and how many sorted valid blocks there are as well
+ * as what the new th_ack point is. The filter will return to you the number of
+ * blocks left after filtering. It will reshape the blocks based on the previous
+ * sacks you have received and processed. If sack_filter_blks() returns 0 then no
+ * new sack data is present to be processed.
+ *
+ * Whenever you reach the point of snd_una == snd_max, you should call sack_filter_clear with
+ * the snd_una point. You also need to call this if you invalidate your sack array for any
+ * reason (such as RTO's or MTU changes or some other thing that makes you think all
+ * data is now un-acknowledged). You can also pass in sack_filter_blks(tp, sf, NULL, 0, th_ack) to
+ * advance the cum-ack point. You can use sack_filter_blks_used(sf) to determine if you have filter blocks as
+ * well. So putting these two together, anytime the cum-ack moves forward you probably want to
+ * do:
+ * if (sack_filter_blks_used(sf))
+ * sack_filter_blks(tp, sf, NULL, 0, th_ack);
+ *
+ * If for some reason you have ran the sack-filter and something goes wrong (you can't allocate space
+ * for example to split your sack-array. You can "undo" the data within the sack filter by calling
+ * sack_filter_rject(sf, in) passing in the list of blocks to be "removed" from the sack-filter.
+ * You can see an example of this use in bbr.c though rack.c has never found it needed.
+ *
*/
-#define SACK_FILTER_BLOCKS 7
+
+#define SACK_FILTER_BLOCKS 15
struct sack_filter {
tcp_seq sf_ack;
@@ -48,7 +113,7 @@ struct sack_filter {
};
#ifdef _KERNEL
void sack_filter_clear(struct sack_filter *sf, tcp_seq seq);
-int sack_filter_blks(struct sack_filter *sf, struct sackblk *in, int numblks,
+int sack_filter_blks(struct tcpcb *tp, struct sack_filter *sf, struct sackblk *in, int numblks,
tcp_seq th_ack);
void sack_filter_reject(struct sack_filter *sf, struct sackblk *in);
static inline uint8_t sack_filter_blks_used(struct sack_filter *sf)
diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h
index 708b437b32ed..ae766272bf30 100644
--- a/sys/netinet/tcp_stacks/tcp_rack.h
+++ b/sys/netinet/tcp_stacks/tcp_rack.h
@@ -199,7 +199,6 @@ struct rack_opts_stats {
uint64_t tcp_rack_min_pace_seg;
uint64_t tcp_rack_pace_rate_ca;
uint64_t tcp_rack_rr;
- uint64_t tcp_rack_do_detection;
uint64_t tcp_rack_rrr_no_conf_rate;
uint64_t tcp_initial_rate;
uint64_t tcp_initial_win;
@@ -458,10 +457,6 @@ struct rack_control {
uint16_t rack_per_of_gp_rec; /* 100 = 100%, so from 65536 = 655 x bw, 0=off */
uint16_t rack_per_of_gp_probertt; /* 100 = 100%, so from 65536 = 655 x bw, 0=off */
uint32_t rc_high_rwnd;
- uint32_t ack_count;
- uint32_t sack_count;
- uint32_t sack_noextra_move;
- uint32_t sack_moved_extra;
struct rack_rtt_sample rack_rs;
const struct tcp_hwrate_limit_table *crte;
uint32_t rc_agg_early;
@@ -563,7 +558,6 @@ struct rack_control {
uint32_t rc_min_to; /* Socket option value Lock(a) */
uint32_t rc_pkt_delay; /* Socket option value Lock(a) */
uint32_t persist_lost_ends;
- uint32_t ack_during_sd;
uint32_t input_pkt;
uint32_t saved_input_pkt;
uint32_t saved_policer_val; /* The encoded value we used to setup policer detection */
@@ -790,8 +784,7 @@ struct tcp_rack {
set_pacing_done_a_iw : 1,
use_rack_rr : 1,
alloc_limit_reported : 1,
- sack_attack_disable : 1,
- do_detection : 1,
+ rack_avail : 2,
rc_force_max_seg : 1;
uint8_t r_early : 1,
r_late : 1,
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 312740ccf599..7259d3607869 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -139,58 +139,6 @@ VNET_DEFINE(int, tcp_mssdflt) = TCP_MSS;
VNET_DEFINE(int, tcp_v6mssdflt) = TCP6_MSS;
#endif
-#ifdef TCP_SAD_DETECTION
-/* Sack attack detection thresholds and such */
-SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack_attack,
- CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
- "Sack Attack detection thresholds");
-int32_t tcp_force_detection = 0;
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, force_detection,
- CTLFLAG_RW,
- &tcp_force_detection, 0,
- "Do we force detection even if the INP has it off?");
-int32_t tcp_sad_limit = 10000;
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, limit,
- CTLFLAG_RW,
- &tcp_sad_limit, 10000,
- "If SaD is enabled, what is the limit to sendmap entries (0 = unlimited)?");
-int32_t tcp_sack_to_ack_thresh = 700; /* 70 % */
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, sack_to_ack_thresh,
- CTLFLAG_RW,
- &tcp_sack_to_ack_thresh, 700,
- "Percentage of sacks to acks we must see above (10.1 percent is 101)?");
-int32_t tcp_sack_to_move_thresh = 600; /* 60 % */
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, move_thresh,
- CTLFLAG_RW,
- &tcp_sack_to_move_thresh, 600,
- "Percentage of sack moves we must see above (10.1 percent is 101)");
-int32_t tcp_restoral_thresh = 450; /* 45 % (sack:2:ack -25%) (mv:ratio -15%) **/
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, restore_thresh,
- CTLFLAG_RW,
- &tcp_restoral_thresh, 450,
- "Percentage of sack to ack percentage we must see below to restore(10.1 percent is 101)");
-int32_t tcp_sad_decay_val = 800;
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, decay_per,
- CTLFLAG_RW,
- &tcp_sad_decay_val, 800,
- "The decay percentage (10.1 percent equals 101 )");
-int32_t tcp_map_minimum = 500;
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, nummaps,
- CTLFLAG_RW,
- &tcp_map_minimum, 500,
- "Number of Map enteries before we start detection");
-int32_t tcp_sad_pacing_interval = 2000;
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, sad_pacing_int,
- CTLFLAG_RW,
- &tcp_sad_pacing_interval, 2000,
- "What is the minimum pacing interval for a classified attacker?");
-
-int32_t tcp_sad_low_pps = 100;
-SYSCTL_INT(_net_inet_tcp_sack_attack, OID_AUTO, sad_low_pps,
- CTLFLAG_RW,
- &tcp_sad_low_pps, 100,
- "What is the input pps that below which we do not decay?");
-#endif
uint32_t tcp_ack_war_time_window = 1000;
SYSCTL_UINT(_net_inet_tcp, OID_AUTO, ack_war_timewindow,
CTLFLAG_RW,
@@ -1793,6 +1741,7 @@ tcpip_maketemplate(struct inpcb *inp)
*
* NOTE: If m != NULL, then th must point to *inside* the mbuf.
*/
+
void
tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m,
tcp_seq ack, tcp_seq seq, uint16_t flags)
@@ -3320,8 +3269,19 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer)
so = inp->inp_socket;
SOCKBUF_LOCK(&so->so_snd);
/* If the mss is larger than the socket buffer, decrease the mss. */
- if (so->so_snd.sb_hiwat < tp->t_maxseg)
+ if (so->so_snd.sb_hiwat < tp->t_maxseg) {
tp->t_maxseg = so->so_snd.sb_hiwat;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not process incoming
+ * SACK's since we are subject to attack in such a
+ * case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
+ }
SOCKBUF_UNLOCK(&so->so_snd);
TCPSTAT_INC(tcps_mturesent);
@@ -3454,8 +3414,19 @@ tcp6_use_min_mtu(struct tcpcb *tp)
opt = inp->in6p_outputopts;
if (opt != NULL && opt->ip6po_minmtu == IP6PO_MINMTU_ALL &&
- tp->t_maxseg > TCP6_MSS)
+ tp->t_maxseg > TCP6_MSS) {
tp->t_maxseg = TCP6_MSS;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not process incoming
+ * SACK's since we are subject to attack in such a
+ * case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
+ }
}
}
#endif /* INET6 */
@@ -3507,7 +3478,6 @@ tcp_maxseg(const struct tcpcb *tp)
if (tp->t_flags & TF_SACK_PERMIT)
optlen += PADTCPOLEN(TCPOLEN_SACK_PERMITTED);
}
-#undef PAD
optlen = min(optlen, TCP_MAXOLEN);
return (tp->t_maxseg - optlen);
}
@@ -3529,7 +3499,6 @@ tcp_fixed_maxseg(const struct tcpcb *tp)
* for cc modules to figure out what the modulo of the
* cwnd should be.
*/
-#define PAD(len) ((((len) / 4) + !!((len) % 4)) * 4)
if (TCPS_HAVEESTABLISHED(tp->t_state)) {
if (tp->t_flags & TF_RCVD_TSTMP)
optlen = TCPOLEN_TSTAMP_APPA;
@@ -3537,23 +3506,22 @@ tcp_fixed_maxseg(const struct tcpcb *tp)
optlen = 0;
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
if (tp->t_flags & TF_SIGNATURE)
- optlen += PAD(TCPOLEN_SIGNATURE);
+ optlen += PADTCPOLEN(TCPOLEN_SIGNATURE);
#endif
} else {
if (tp->t_flags & TF_REQ_TSTMP)
optlen = TCPOLEN_TSTAMP_APPA;
else
- optlen = PAD(TCPOLEN_MAXSEG);
+ optlen = PADTCPOLEN(TCPOLEN_MAXSEG);
if (tp->t_flags & TF_REQ_SCALE)
- optlen += PAD(TCPOLEN_WINDOW);
+ optlen += PADTCPOLEN(TCPOLEN_WINDOW);
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
if (tp->t_flags & TF_SIGNATURE)
- optlen += PAD(TCPOLEN_SIGNATURE);
+ optlen += PADTCPOLEN(TCPOLEN_SIGNATURE);
#endif
if (tp->t_flags & TF_SACK_PERMIT)
- optlen += PAD(TCPOLEN_SACK_PERMITTED);
+ optlen += PADTCPOLEN(TCPOLEN_SACK_PERMITTED);
}
-#undef PAD
optlen = min(optlen, TCP_MAXOLEN);
return (tp->t_maxseg - optlen);
}
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 785f68be5621..ae6b97c09cdf 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -756,6 +756,16 @@ tcp_timer_rexmt(struct tcpcb *tp)
tp->t_flags2 |= TF2_PLPMTU_PMTUD;
tp->t_flags2 &= ~TF2_PLPMTU_BLACKHOLE;
tp->t_maxseg = tp->t_pmtud_saved_maxseg;
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not
+ * process incoming SACK's since we are
+ * subject to attack in such a case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
TCPSTAT_INC(tcps_pmtud_blackhole_failed);
/*
* Reset the slow-start flight size as it
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index abdc2de545e9..9e0a702a6c0f 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1709,11 +1709,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt)
default:
return (error);
}
- INP_WLOCK(inp);
- if (inp->inp_flags & INP_DROPPED) {
- INP_WUNLOCK(inp);
- return (ECONNRESET);
- }
+ INP_WLOCK_RECHECK(inp);
} else if (sopt->sopt_name == TCP_FUNCTION_BLK) {
/*
* Protect the TCP option TCP_FUNCTION_BLK so
@@ -1728,8 +1724,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt)
if (error)
return (error);
- INP_WLOCK(inp);
- tp = intotcpcb(inp);
+ INP_WLOCK_RECHECK(inp);
blk = find_and_ref_tcp_functions(&fsn);
if (blk == NULL) {
@@ -2203,9 +2198,19 @@ unlock_and_done:
INP_WLOCK_RECHECK(inp);
if (optval > 0 && optval <= tp->t_maxseg &&
- optval + 40 >= V_tcp_minmss)
+ optval + 40 >= V_tcp_minmss) {
tp->t_maxseg = optval;
- else
+ if (tp->t_maxseg < V_tcp_mssdflt) {
+ /*
+ * The MSS is so small we should not process incoming
+ * SACK's since we are subject to attack in such a
+ * case.
+ */
+ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
+ } else {
+ tp->t_flags2 &= ~TF2_PROC_SACK_PROHIBIT;
+ }
+ } else
error = EINVAL;
goto unlock_and_done;
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index a339f52c2ffa..3fdc1f4a9d74 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -846,6 +846,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack)
#define TF2_MBUF_QUEUE_READY 0x00020000 /* Inputs can be queued */
#define TF2_DONT_SACK_QUEUE 0x00040000 /* Don't wake on sack */
#define TF2_CANNOT_DO_ECN 0x00080000 /* The stack does not do ECN */
+#define TF2_PROC_SACK_PROHIBIT 0x00100000 /* Due to small MSS size do not process sack's */
/*
* Structure to hold TCP options that are only used during segment
@@ -1029,6 +1030,7 @@ struct tcpstat {
/* SACK related stats */
uint64_t tcps_sack_recovery_episode; /* SACK recovery episodes */
uint64_t tcps_sack_rexmits; /* SACK rexmit segments */
+ uint64_t tcps_sack_rexmits_tso; /* SACK rexmit TSO chunks */
uint64_t tcps_sack_rexmit_bytes; /* SACK rexmit bytes */
uint64_t tcps_sack_rcv_blocks; /* SACK blocks (options) received */
uint64_t tcps_sack_send_blocks; /* SACK blocks (options) sent */
@@ -1087,7 +1089,7 @@ struct tcpstat {
uint64_t tcps_tlpresend_bytes; /* number of bytes resent by tlp */
- uint64_t _pad[4]; /* 4 TBD placeholder for STABLE */
+ uint64_t _pad[3]; /* 3 TBD placeholder for STABLE */
};
#define tcps_rcvmemdrop tcps_rcvreassfull /* compat */
@@ -1290,6 +1292,7 @@ VNET_DECLARE(int, tcp_retries);
VNET_DECLARE(int, tcp_sack_globalholes);
VNET_DECLARE(int, tcp_sack_globalmaxholes);
VNET_DECLARE(int, tcp_sack_maxholes);
+VNET_DECLARE(int, tcp_sack_tso);
VNET_DECLARE(int, tcp_sc_rst_sock_fail);
VNET_DECLARE(int, tcp_sendspace);
VNET_DECLARE(int, tcp_udp_tunneling_overhead);
@@ -1336,6 +1339,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo);
#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes)
#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes)
#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes)
+#define V_tcp_sack_tso VNET(tcp_sack_tso)
#define V_tcp_sc_rst_sock_fail VNET(tcp_sc_rst_sock_fail)
#define V_tcp_sendspace VNET(tcp_sendspace)
#define V_tcp_udp_tunneling_overhead VNET(tcp_udp_tunneling_overhead)
@@ -1417,19 +1421,6 @@ extern counter_u64_t tcp_comp_total;
extern counter_u64_t tcp_uncomp_total;
extern counter_u64_t tcp_bad_csums;
-#ifdef TCP_SAD_DETECTION
-/* Various SACK attack thresholds */
-extern int32_t tcp_force_detection;
-extern int32_t tcp_sad_limit;
-extern int32_t tcp_sack_to_ack_thresh;
-extern int32_t tcp_sack_to_move_thresh;
-extern int32_t tcp_restoral_thresh;
-extern int32_t tcp_sad_decay_val;
-extern int32_t tcp_sad_pacing_interval;
-extern int32_t tcp_sad_low_pps;
-extern int32_t tcp_map_minimum;
-extern int32_t tcp_attack_on_turns_on_logging;
-#endif
extern uint32_t tcp_ack_war_time_window;
extern uint32_t tcp_ack_war_cnt;
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index c5e3334eca67..e0f642544327 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -2683,7 +2683,7 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt)
}
switch (op) {
- case PRCO_SETOPT:
+ case SOPT_SET:
switch (optname) {
case ICMP6_FILTER:
{
@@ -2708,7 +2708,7 @@ icmp6_ctloutput(struct socket *so, struct sockopt *sopt)
}
break;
- case PRCO_GETOPT:
+ case SOPT_GET:
switch (optname) {
case ICMP6_FILTER:
{
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index 53a8fad106df..082e5f8990c9 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -100,7 +100,13 @@ struct in6_addr {
};
#define s6_addr __u6_addr.__u6_addr8
-#if defined(_KERNEL) || defined(_STANDALONE) /* XXX nonstandard */
+#if __BSD_VISIBLE
+/*
+ * s6_addr is the only in6_addr element specified in RFCs 2553 and 3493,
+ * also in POSIX 1003.1-2017. The following three definitions were not
+ * exposed to user programs in FreeBSD before 14.1, or in other BSDs,
+ * and are thus less portable than s6_addr.
+ */
#define s6_addr8 __u6_addr.__u6_addr8
#define s6_addr16 __u6_addr.__u6_addr16
#define s6_addr32 __u6_addr.__u6_addr32
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index fb00a8ea2211..6eb61600b8df 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -67,7 +67,6 @@
#include <sys/lock.h>
#include <sys/queue.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/mbuf.h>
#include <sys/rwlock.h>
#include <sys/syslog.h>
diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h
index 28f3fb78018c..cb771cf93e53 100644
--- a/sys/netlink/netlink_message_writer.h
+++ b/sys/netlink/netlink_message_writer.h
@@ -226,6 +226,12 @@ nlattr_add_raw(struct nl_writer *nw, const struct nlattr *nla_src)
}
static inline bool
+nlattr_add_bool(struct nl_writer *nw, int attrtype, bool value)
+{
+ return (nlattr_add(nw, attrtype, sizeof(bool), &value));
+}
+
+static inline bool
nlattr_add_u8(struct nl_writer *nw, int attrtype, uint8_t value)
{
return (nlattr_add(nw, attrtype, sizeof(uint8_t), &value));
diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h
index 6553a391a8f5..7151f6221fca 100644
--- a/sys/netlink/netlink_snl.h
+++ b/sys/netlink/netlink_snl.h
@@ -63,7 +63,7 @@
#define _NLA_END(_start, _len) ((char *)(_start) + (_len))
#define NLA_FOREACH(_attr, _start, _len) \
- for (_attr = (_start); \
+ for (_attr = (struct nlattr *)(_start); \
((char *)_attr < _NLA_END(_start, _len)) && \
((char *)NLA_NEXT(_attr) <= _NLA_END(_start, _len)); \
_attr = NLA_NEXT(_attr))
@@ -80,7 +80,7 @@ struct linear_buffer {
static inline struct linear_buffer *
lb_init(uint32_t size)
{
- struct linear_buffer *lb = calloc(1, size);
+ struct linear_buffer *lb = (struct linear_buffer *)calloc(1, size);
if (lb != NULL) {
lb->base = (char *)(lb + 1);
@@ -102,7 +102,7 @@ lb_allocz(struct linear_buffer *lb, int len)
len = roundup2(len, alignof(__max_align_t));
if (lb->offset + len > lb->size)
return (NULL);
- void *data = (void *)(lb->base + lb->offset);
+ char *data = (lb->base + lb->offset);
lb->offset += len;
return (data);
}
@@ -275,7 +275,7 @@ snl_init(struct snl_state *ss, int netlink_family)
}
ss->bufsize = rcvbuf;
- ss->buf = malloc(ss->bufsize);
+ ss->buf = (char *)malloc(ss->bufsize);
if (ss->buf == NULL) {
snl_free(ss);
return (false);
@@ -495,7 +495,8 @@ snl_parse_header(struct snl_state *ss, void *hdr, int len,
struct nlattr *nla_head;
/* Extract fields first (if any) */
- snl_parse_fields(ss, hdr, parser->in_hdr_size, parser->fp, parser->fp_size, target);
+ snl_parse_fields(ss, (struct nlmsghdr *)hdr, parser->in_hdr_size,
+ parser->fp, parser->fp_size, target);
nla_head = (struct nlattr *)(void *)((char *)hdr + parser->in_hdr_size);
bool result = snl_parse_attrs_raw(ss, nla_head, len - parser->in_hdr_size,
@@ -538,6 +539,17 @@ snl_attr_get_bytes(struct snl_state *ss __unused, struct nlattr *nla, const void
}
static inline bool
+snl_attr_get_bool(struct snl_state *ss __unused, struct nlattr *nla,
+ const void *arg __unused, void *target)
+{
+ if (NLA_DATA_LEN(nla) == sizeof(bool)) {
+ *((bool *)target) = *((const bool *)NLA_DATA_CONST(nla));
+ return (true);
+ }
+ return (false);
+}
+
+static inline bool
snl_attr_get_uint8(struct snl_state *ss __unused, struct nlattr *nla,
const void *arg __unused, void *target)
{
@@ -628,7 +640,7 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla,
{
int maxlen = NLA_DATA_LEN(nla);
- char *buf = snl_allocz(ss, maxlen + 1);
+ char *buf = (char *)snl_allocz(ss, maxlen + 1);
if (buf == NULL)
return (false);
buf[maxlen] = '\0';
@@ -645,7 +657,7 @@ snl_attr_copy_string(struct snl_state *ss, struct nlattr *nla,
char *tmp;
if (snl_attr_get_string(ss, nla, NULL, &tmp)) {
- strlcpy(target, tmp, (size_t)arg);
+ strlcpy((char *)target, tmp, (size_t)arg);
return (true);
}
return (false);
@@ -658,7 +670,7 @@ snl_attr_dup_string(struct snl_state *ss __unused, struct nlattr *nla,
size_t maxlen = NLA_DATA_LEN(nla);
if (strnlen((char *)NLA_DATA(nla), maxlen) < maxlen) {
- char *buf = snl_allocz(ss, maxlen);
+ char *buf = (char *)snl_allocz(ss, maxlen);
if (buf == NULL)
return (false);
memcpy(buf, NLA_DATA(nla), maxlen);
@@ -687,14 +699,14 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla,
uint32_t start_size, const void *arg, void *target)
{
const struct snl_hdr_parser *p = (const struct snl_hdr_parser *)arg;
- struct snl_parray *array = target;
+ struct snl_parray *array = (struct snl_parray *)target;
struct nlattr *nla;
uint32_t count = 0, size = start_size;
if (p->out_size == 0)
return (false);
- array->items = snl_allocz(ss, size * sizeof(void *));
+ array->items = (void **)snl_allocz(ss, size * sizeof(void *));
if (array->items == NULL)
return (false);
@@ -724,7 +736,7 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla,
if (count == size) {
uint32_t new_size = size * 2;
- void **new_array = snl_allocz(ss, new_size *sizeof(void *));
+ void **new_array = (void **)snl_allocz(ss, new_size *sizeof(void *));
memcpy(new_array, array->items, size * sizeof(void *));
array->items = new_array;
@@ -837,7 +849,7 @@ static const struct snl_attr_parser _nla_p_bitset[] = {
static inline bool
_cb_p_bitset(struct snl_state *ss __unused, void *_target)
{
- struct snl_attr_bitset *target = _target;
+ struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target;
uint32_t sz_bytes = _roundup2(target->nla_bitset_size, 32) / 8;
@@ -873,7 +885,7 @@ snl_attr_get_bitset_c(struct snl_state *ss, struct nlattr *nla,
const void *arg __unused, void *_target)
{
const struct snl_hdr_parser *p = &_nla_bitset_parser;
- struct snl_attr_bitset *target = _target;
+ struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target;
/* Assumes target points to the beginning of the structure */
if (!snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla), p, _target))
@@ -993,7 +1005,7 @@ parse_cmsg(struct snl_state *ss, const struct msghdr *msg, struct snl_msg_info *
int len = cmsg->cmsg_len - ((char *)data - (char *)cmsg);
const struct snl_hdr_parser *ps = &snl_msg_info_parser;
- return (snl_parse_attrs_raw(ss, data, len, ps->np, ps->np_size, attrs));
+ return (snl_parse_attrs_raw(ss, (struct nlattr *)data, len, ps->np, ps->np_size, attrs));
}
return (false);
@@ -1035,7 +1047,7 @@ static inline void
snl_init_writer(struct snl_state *ss, struct snl_writer *nw)
{
nw->size = SNL_WRITER_BUFFER_SIZE;
- nw->base = snl_allocz(ss, nw->size);
+ nw->base = (char *)snl_allocz(ss, nw->size);
if (nw->base == NULL) {
nw->error = true;
nw->size = 0;
@@ -1073,7 +1085,7 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz)
nw->hdr = (struct nlmsghdr *)
(void *)((char *)new_base + hdr_off);
}
- nw->base = new_base;
+ nw->base = (char *)new_base;
}
return (true);
diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h
index 619e769b1496..62055b2db417 100644
--- a/sys/netlink/netlink_snl_route.h
+++ b/sys/netlink/netlink_snl_route.h
@@ -100,7 +100,7 @@ snl_attr_get_ip(struct snl_state *ss, struct nlattr *nla,
static inline struct sockaddr *
parse_rta_via(struct snl_state *ss, struct rtattr *rta, int *perror)
{
- struct rtvia *via = NL_RTA_DATA(rta);
+ struct rtvia *via = (struct rtvia *)NL_RTA_DATA(rta);
switch (via->rtvia_family) {
case AF_INET:
diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h
index 7e4bcad4010b..256edfec297d 100644
--- a/sys/netlink/netlink_snl_route_parsers.h
+++ b/sys/netlink/netlink_snl_route_parsers.h
@@ -78,7 +78,7 @@ static const struct snl_field_parser _fp_p_mp_nh[] = {
static inline bool
_cb_p_mp_nh(struct snl_state *ss __unused, void *_target)
{
- struct rta_mpath_nh *target = _target;
+ struct rta_mpath_nh *target = (struct rta_mpath_nh *)_target;
finalize_sockaddr(target->gw, target->ifindex);
return (true);
@@ -158,7 +158,7 @@ static const struct snl_field_parser _fp_p_route[] = {
static inline bool
_cb_p_route(struct snl_state *ss __unused, void *_target)
{
- struct snl_parsed_route *target = _target;
+ struct snl_parsed_route *target = (struct snl_parsed_route *)_target;
finalize_sockaddr(target->rta_dst, target->rta_oif);
finalize_sockaddr(target->rta_gw, target->rta_oif);
@@ -277,7 +277,7 @@ static struct snl_field_parser _fp_p_neigh_s[] = {
static inline bool
_cb_p_neigh(struct snl_state *ss __unused, void *_target)
{
- struct snl_parsed_neigh *target = _target;
+ struct snl_parsed_neigh *target = (struct snl_parsed_neigh *)_target;
finalize_sockaddr(target->nda_dst, target->nda_ifindex);
return (true);
@@ -326,7 +326,7 @@ static const struct snl_field_parser _fp_p_addr_s[] = {
static inline bool
_cb_p_addr(struct snl_state *ss __unused, void *_target)
{
- struct snl_parsed_addr *target = _target;
+ struct snl_parsed_addr *target = (struct snl_parsed_addr *)_target;
finalize_sockaddr(target->ifa_address, target->ifa_index);
finalize_sockaddr(target->ifa_local, target->ifa_index);
@@ -379,7 +379,7 @@ static const struct snl_attr_parser _nla_p_nh[] = {
static inline bool
_cb_p_nh(struct snl_state *ss __unused, void *_target)
{
- struct snl_parsed_nhop *target = _target;
+ struct snl_parsed_nhop *target = (struct snl_parsed_nhop *)_target;
finalize_sockaddr(target->nha_gw, target->nha_oif);
return (true);
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 0dd4da5f271a..195b5d49db7a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1353,6 +1353,7 @@ keyattach:
sk : NULL);
printf("\n");
}
+ s->timeout = PFTM_UNLINKED;
PF_HASHROW_UNLOCK(ih);
KEYS_UNLOCK();
uma_zfree(V_pf_state_key_z, sk);
@@ -1421,6 +1422,7 @@ pf_detach_state(struct pf_kstate *s)
struct pf_keyhash *kh;
NET_EPOCH_ASSERT();
+ MPASS(s->timeout >= PFTM_MAX);
pf_sctp_multihome_detach_addr(s);
@@ -1552,6 +1554,7 @@ pf_state_insert(struct pfi_kkif *kif, struct pfi_kkif *orig_kif,
break;
if (cur != NULL) {
+ s->timeout = PFTM_UNLINKED;
PF_HASHROW_UNLOCK(ih);
if (V_pf_status.debug >= PF_DEBUG_MISC) {
printf("pf: state ID collision: "
diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c
index 5f33e49b4a2e..307e1ca1689d 100644
--- a/sys/netpfil/pf/pf_nl.c
+++ b/sys/netpfil/pf/pf_nl.c
@@ -1109,6 +1109,111 @@ pf_handle_set_statusif(struct nlmsghdr *hdr, struct nl_pstate *npt)
return (0);
}
+static bool
+nlattr_add_counters(struct nl_writer *nw, int attr, size_t number, char **names,
+ counter_u64_t *counters)
+{
+ for (int i = 0; i < number; i++) {
+ int off = nlattr_add_nested(nw, attr);
+ nlattr_add_u32(nw, PF_C_ID, i);
+ nlattr_add_string(nw, PF_C_NAME, names[i]);
+ nlattr_add_u64(nw, PF_C_COUNTER, counter_u64_fetch(counters[i]));
+ nlattr_set_len(nw, off);
+ }
+
+ return (true);
+}
+
+static bool
+nlattr_add_fcounters(struct nl_writer *nw, int attr, size_t number, char **names,
+ struct pf_counter_u64 *counters)
+{
+ for (int i = 0; i < number; i++) {
+ int off = nlattr_add_nested(nw, attr);
+ nlattr_add_u32(nw, PF_C_ID, i);
+ nlattr_add_string(nw, PF_C_NAME, names[i]);
+ nlattr_add_u64(nw, PF_C_COUNTER, pf_counter_u64_fetch(&counters[i]));
+ nlattr_set_len(nw, off);
+ }
+
+ return (true);
+}
+
+static bool
+nlattr_add_u64_array(struct nl_writer *nw, int attr, size_t number, uint64_t *array)
+{
+ int off = nlattr_add_nested(nw, attr);
+
+ for (size_t i = 0; i < number; i++)
+ nlattr_add_u64(nw, 0, array[i]);
+
+ nlattr_set_len(nw, off);
+
+ return (true);
+}
+
+static int
+pf_handle_get_status(struct nlmsghdr *hdr, struct nl_pstate *npt)
+{
+ struct pf_status s;
+ struct nl_writer *nw = npt->nw;
+ struct genlmsghdr *ghdr_new;
+ char *pf_reasons[PFRES_MAX+1] = PFRES_NAMES;
+ char *pf_lcounter[KLCNT_MAX+1] = KLCNT_NAMES;
+ char *pf_fcounter[FCNT_MAX+1] = FCNT_NAMES;
+ int error;
+
+ PF_RULES_RLOCK_TRACKER;
+
+ if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr)))
+ return (ENOMEM);
+
+ ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr);
+ ghdr_new->cmd = PFNL_CMD_GET_STATUS;
+ ghdr_new->version = 0;
+ ghdr_new->reserved = 0;
+
+ PF_RULES_RLOCK();
+
+ nlattr_add_string(nw, PF_GS_IFNAME, V_pf_status.ifname);
+ nlattr_add_bool(nw, PF_GS_RUNNING, V_pf_status.running);
+ nlattr_add_u32(nw, PF_GS_SINCE, V_pf_status.since);
+ nlattr_add_u32(nw, PF_GS_DEBUG, V_pf_status.debug);
+ nlattr_add_u32(nw, PF_GS_HOSTID, ntohl(V_pf_status.hostid));
+ nlattr_add_u32(nw, PF_GS_STATES, V_pf_status.states);
+ nlattr_add_u32(nw, PF_GS_SRC_NODES, V_pf_status.src_nodes);
+ nlattr_add_u32(nw, PF_GS_REASSEMBLE, V_pf_status.reass);
+ nlattr_add_u32(nw, PF_GS_SYNCOOKIES_ACTIVE, V_pf_status.syncookies_active);
+
+ nlattr_add_counters(nw, PF_GS_COUNTERS, PFRES_MAX, pf_reasons,
+ V_pf_status.counters);
+ nlattr_add_counters(nw, PF_GS_LCOUNTERS, KLCNT_MAX, pf_lcounter,
+ V_pf_status.lcounters);
+ nlattr_add_fcounters(nw, PF_GS_FCOUNTERS, FCNT_MAX, pf_fcounter,
+ V_pf_status.fcounters);
+ nlattr_add_counters(nw, PF_GS_SCOUNTERS, SCNT_MAX, pf_fcounter,
+ V_pf_status.scounters);
+
+ pfi_update_status(V_pf_status.ifname, &s);
+ nlattr_add_u64_array(nw, PF_GS_BCOUNTERS, 2 * 2, (uint64_t *)s.bcounters);
+ nlattr_add_u64_array(nw, PF_GS_PCOUNTERS, 2 * 2 * 2, (uint64_t *)s.pcounters);
+
+ nlattr_add(nw, PF_GS_CHKSUM, PF_MD5_DIGEST_LENGTH, V_pf_status.pf_chksum);
+
+ PF_RULES_RUNLOCK();
+
+ if (!nlmsg_end(nw)) {
+ error = ENOMEM;
+ goto out;
+ }
+
+ return (0);
+
+out:
+ nlmsg_abort(nw);
+ return (error);
+}
+
static const struct nlhdr_parser *all_parsers[] = {
&state_parser,
&addrule_parser,
@@ -1189,7 +1294,14 @@ static const struct genl_cmd pf_cmds[] = {
.cmd_cb = pf_handle_set_statusif,
.cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL,
.cmd_priv = PRIV_NETINET_PF,
- }
+ },
+ {
+ .cmd_num = PFNL_CMD_GET_STATUS,
+ .cmd_name = "GETSTATUS",
+ .cmd_cb = pf_handle_get_status,
+ .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL,
+ .cmd_priv = PRIV_NETINET_PF,
+ },
};
void
diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h
index c44e331722b7..e486e9781b2e 100644
--- a/sys/netpfil/pf/pf_nl.h
+++ b/sys/netpfil/pf/pf_nl.h
@@ -46,6 +46,7 @@ enum {
PFNL_CMD_CLRSTATES = 8,
PFNL_CMD_KILLSTATES = 9,
PFNL_CMD_SET_STATUSIF = 10,
+ PFNL_CMD_GET_STATUS = 11,
__PFNL_CMD_MAX,
};
#define PFNL_CMD_MAX (__PFNL_CMD_MAX -1)
@@ -286,6 +287,34 @@ enum pf_set_statusif_types_t {
PF_SS_UNSPEC,
PF_SS_IFNAME = 1, /* string */
};
+
+enum pf_counter_types_t {
+ PF_C_UNSPEC,
+ PF_C_COUNTER = 1, /* u64 */
+ PF_C_NAME = 2, /* string */
+ PF_C_ID = 3, /* u32 */
+};
+
+enum pf_get_status_types_t {
+ PF_GS_UNSPEC,
+ PF_GS_IFNAME = 1, /* string */
+ PF_GS_RUNNING = 2, /* bool */
+ PF_GS_SINCE = 3, /* u32 */
+ PF_GS_DEBUG = 4, /* u32 */
+ PF_GS_HOSTID = 5, /* u32 */
+ PF_GS_STATES = 6, /* u32 */
+ PF_GS_SRC_NODES = 7, /* u32 */
+ PF_GS_REASSEMBLE = 8, /* u32 */
+ PF_GS_SYNCOOKIES_ACTIVE = 9, /* bool */
+ PF_GS_COUNTERS = 10, /* nested, */
+ PF_GS_LCOUNTERS = 11, /* nested, */
+ PF_GS_FCOUNTERS = 12, /* nested, */
+ PF_GS_SCOUNTERS = 13, /* nested, */
+ PF_GS_CHKSUM = 14, /* byte array */
+ PF_GS_PCOUNTERS = 15, /* u64 array */
+ PF_GS_BCOUNTERS = 16, /* u64 array */
+};
+
#ifdef _KERNEL
void pf_nl_register(void);
diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c
index f3dba7687d05..a437f0259af5 100644
--- a/sys/netpfil/pf/pflow.c
+++ b/sys/netpfil/pf/pflow.c
@@ -750,6 +750,10 @@ export_pflow(const struct pf_kstate *st)
NET_EPOCH_ASSERT();
+ /* e.g. if pf_state_key_attach() fails. */
+ if (st->key[PF_SK_STACK] == NULL || st->key[PF_SK_WIRE] == NULL)
+ return;
+
sk = st->key[st->direction == PF_IN ? PF_SK_WIRE : PF_SK_STACK];
CK_LIST_FOREACH(sc, &V_pflowif_list, sc_next) {
diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC
index 6083b4d2baca..dedaa931f4ef 100644
--- a/sys/powerpc/conf/GENERIC
+++ b/sys/powerpc/conf/GENERIC
@@ -119,7 +119,6 @@ device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA
# SCSI Controllers
device ahc # AHA2940 and onboard AIC7xxx devices
-options AHC_ALLOW_MEMIO # Attempt to use memory mapped I/O
device isp # Qlogic family
device ispfw # Firmware module for Qlogic host adapters
device mpt # LSI-Logic MPT-Fusion
diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
index 26b308a4e06e..2a5e3d377ab8 100644
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -137,7 +137,6 @@ device nvd # expose NVMe namespaces as disks, depends on nvme
# SCSI Controllers
device aacraid # Adaptec by PMC RAID
device ahc # AHA2940 and onboard AIC7xxx devices
-options AHC_ALLOW_MEMIO # Attempt to use memory mapped I/O
device isp # Qlogic family
device ispfw # Firmware module for Qlogic host adapters
device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE
index 84c27690211d..63e10df90200 100644
--- a/sys/powerpc/conf/GENERIC64LE
+++ b/sys/powerpc/conf/GENERIC64LE
@@ -133,7 +133,6 @@ device nvd # expose NVMe namespaces as disks, depends on nvme
# SCSI Controllers
device aacraid # Adaptec by PMC RAID
device ahc # AHA2940 and onboard AIC7xxx devices
-options AHC_ALLOW_MEMIO # Attempt to use memory mapped I/O
device isp # Qlogic family
device ispfw # Firmware module for Qlogic host adapters
device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h
index 89982a618bc7..a612acbef239 100644
--- a/sys/powerpc/include/vmparam.h
+++ b/sys/powerpc/include/vmparam.h
@@ -111,6 +111,8 @@
#define KERNBASE 0x00100100 /* start of kernel virtual */
+#define UMA_MD_SMALL_ALLOC
+
#ifdef AIM
#ifndef __powerpc64__
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNEL_SR << ADDR_SR_SHFT)
@@ -122,13 +124,13 @@
* Use the direct-mapped BAT registers for UMA small allocs. This
* takes pressure off the small amount of available KVA.
*/
-#define UMA_MD_SMALL_ALLOC
+#define UMA_USE_DMAP
#else /* Book-E */
/* Use the direct map for UMA small allocs on powerpc64. */
#ifdef __powerpc64__
-#define UMA_MD_SMALL_ALLOC
+#define UMA_USE_DMAP
#else
#define VM_MIN_KERNEL_ADDRESS 0xc0000000
#define VM_MAX_KERNEL_ADDRESS 0xffffefff
@@ -306,11 +308,13 @@ extern int vm_level_0_order;
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#else
/*
* No minidump with 32-bit powerpc.
*/
#define MINIDUMP_PAGE_TRACKING 0
+#define MINIDUMP_STARTUP_PAGE_TRACKING 0
#endif
#define PMAP_HAS_DMAP (hw_direct_map)
diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c
index bc28619372f0..b023e7f353b9 100644
--- a/sys/powerpc/powerpc/busdma_machdep.c
+++ b/sys/powerpc/powerpc/busdma_machdep.c
@@ -100,11 +100,15 @@ struct bus_dmamap {
static MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
#define dmat_alignment(dmat) ((dmat)->alignment)
+#define dmat_bounce_flags(dmat) (0)
+#define dmat_boundary(dmat) ((dmat)->boundary)
#define dmat_flags(dmat) ((dmat)->flags)
#define dmat_highaddr(dmat) ((dmat)->highaddr)
#define dmat_lowaddr(dmat) ((dmat)->lowaddr)
#define dmat_lockfunc(dmat) ((dmat)->lockfunc)
#define dmat_lockfuncarg(dmat) ((dmat)->lockfuncarg)
+#define dmat_maxsegsz(dmat) ((dmat)->maxsegsz)
+#define dmat_nsegments(dmat) ((dmat)->nsegments)
#include "../../kern/subr_busdma_bounce.c"
@@ -483,7 +487,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
*/
curaddr = buf;
while (buflen != 0) {
- sgsize = MIN(buflen, dmat->maxsegsz);
+ sgsize = buflen;
if (must_bounce(dmat, curaddr)) {
sgsize = MIN(sgsize,
PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -519,8 +523,8 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
while (vaddr < vendaddr) {
bus_size_t sg_len;
- sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK);
- sg_len = MIN(sg_len, dmat->maxsegsz);
+ sg_len = MIN(vendaddr - vaddr,
+ PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));
if (pmap == kernel_pmap)
paddr = pmap_kextract(vaddr);
else
@@ -536,47 +540,6 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
}
/*
- * Add a single contiguous physical range to the segment list.
- */
-static int
-_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
- bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
-{
- int seg;
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (!vm_addr_bound_ok(curaddr, sgsize, dmat->boundary))
- sgsize = roundup2(curaddr, dmat->boundary) - curaddr;
-
- /*
- * Insert chunk into a segment, coalescing with
- * previous segment if possible.
- */
- seg = *segp;
- if (seg == -1) {
- seg = 0;
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- } else {
- if (curaddr == segs[seg].ds_addr + segs[seg].ds_len &&
- (segs[seg].ds_len + sgsize) <= dmat->maxsegsz &&
- vm_addr_bound_ok(segs[seg].ds_addr,
- segs[seg].ds_len + sgsize, dmat->boundary))
- segs[seg].ds_len += sgsize;
- else {
- if (++seg >= dmat->nsegments)
- return (0);
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- }
- }
- *segp = seg;
- return (sgsize);
-}
-
-/*
* Utility function to load a physical buffer. segp contains
* the starting segment on entrace, and the ending segment on exit.
*/
@@ -606,15 +569,14 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat,
while (buflen > 0) {
curaddr = buf;
- sgsize = MIN(buflen, dmat->maxsegsz);
+ sgsize = buflen;
if (map->pagesneeded != 0 && must_bounce(dmat, curaddr)) {
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
curaddr = add_bounce_page(dmat, map, 0, curaddr,
sgsize);
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
buf += sgsize;
buflen -= sgsize;
@@ -669,8 +631,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
vaddr = (vm_offset_t)buf;
while (buflen > 0) {
- bus_size_t max_sgsize;
-
/*
* Get the physical address for this segment.
*/
@@ -685,20 +645,15 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
/*
* Compute the segment size, and adjust counts.
*/
- max_sgsize = MIN(buflen, dmat->maxsegsz);
- sgsize = PAGE_SIZE - (curaddr & PAGE_MASK);
+ sgsize = MIN(buflen, PAGE_SIZE - (curaddr & PAGE_MASK));
if (map->pagesneeded != 0 && must_bounce(dmat, curaddr)) {
sgsize = roundup2(sgsize, dmat->alignment);
- sgsize = MIN(sgsize, max_sgsize);
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr,
sgsize);
- } else {
- sgsize = MIN(sgsize, max_sgsize);
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
vaddr += sgsize;
buflen -= sgsize;
diff --git a/sys/powerpc/powerpc/uio_machdep.c b/sys/powerpc/powerpc/uio_machdep.c
index ee0f9f2a0795..63911963279a 100644
--- a/sys/powerpc/powerpc/uio_machdep.c
+++ b/sys/powerpc/powerpc/uio_machdep.c
@@ -100,20 +100,28 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error) {
sf_buf_free(sf);
goto out;
}
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/riscv/conf/std.starfive b/sys/riscv/conf/std.starfive
index 578110dfd5a9..e4e3e7c46f3e 100644
--- a/sys/riscv/conf/std.starfive
+++ b/sys/riscv/conf/std.starfive
@@ -4,4 +4,8 @@
device uart_snps # DesignWare Synopsis UART driver
+# MMC/SD/SDIO Card slot support
+device dwmmc
+device dwmmc_starfive
+
files "../starfive/files.starfive"
diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h
index ef9aa5ef057d..03c1327d74da 100644
--- a/sys/riscv/include/atomic.h
+++ b/sys/riscv/include/atomic.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * Copyright (c) 2015-2024 Ruslan Bukin <br@bsdpad.com>
* All rights reserved.
*
* Portions of this software were developed by SRI International and the
@@ -105,8 +105,6 @@ atomic_fcmpset_rel_##WIDTH(__volatile uint##WIDTH##_t *p, \
ATOMIC_CMPSET_ACQ_REL(8);
ATOMIC_FCMPSET_ACQ_REL(8);
-ATOMIC_CMPSET_ACQ_REL(16);
-ATOMIC_FCMPSET_ACQ_REL(16);
#define atomic_cmpset_char atomic_cmpset_8
#define atomic_cmpset_acq_char atomic_cmpset_acq_8
@@ -116,11 +114,40 @@ ATOMIC_FCMPSET_ACQ_REL(16);
#define atomic_fcmpset_rel_char atomic_fcmpset_rel_8
#define atomic_cmpset_short atomic_cmpset_16
-#define atomic_cmpset_acq_short atomic_cmpset_acq_16
-#define atomic_cmpset_rel_short atomic_cmpset_rel_16
#define atomic_fcmpset_short atomic_fcmpset_16
+
+ATOMIC_CMPSET_ACQ_REL(16);
+ATOMIC_FCMPSET_ACQ_REL(16);
+
+#define atomic_load_acq_16 atomic_load_acq_16
+static __inline uint16_t
+atomic_load_acq_16(volatile uint16_t *p)
+{
+ uint16_t ret;
+
+ ret = *p;
+
+ fence();
+
+ return (ret);
+}
+
+static __inline void
+atomic_store_rel_16(volatile uint16_t *p, uint16_t val)
+{
+
+ fence();
+
+ *p = val;
+}
+
+#define atomic_cmpset_acq_short atomic_cmpset_acq_16
#define atomic_fcmpset_acq_short atomic_fcmpset_acq_16
+#define atomic_load_acq_short atomic_load_acq_16
+
+#define atomic_cmpset_rel_short atomic_cmpset_rel_16
#define atomic_fcmpset_rel_short atomic_fcmpset_rel_16
+#define atomic_store_rel_short atomic_store_rel_16
static __inline void
atomic_add_32(volatile uint32_t *p, uint32_t val)
diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h
index d65935c4ce7f..e10cbacb6e1f 100644
--- a/sys/riscv/include/pmap.h
+++ b/sys/riscv/include/pmap.h
@@ -67,16 +67,6 @@ struct md_page {
vm_memattr_t pv_memattr;
};
-/*
- * This structure is used to hold a virtual<->physical address
- * association and is used mostly by bootstrap code
- */
-struct pv_addr {
- SLIST_ENTRY(pv_addr) pv_list;
- vm_offset_t pv_va;
- vm_paddr_t pv_pa;
-};
-
struct pmap {
struct mtx pm_mtx;
struct pmap_statistics pm_stats; /* pmap statictics */
diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h
index 18fd6a28308b..5092977d0669 100644
--- a/sys/riscv/include/vmparam.h
+++ b/sys/riscv/include/vmparam.h
@@ -234,13 +234,12 @@
#define VM_INITIAL_PAGEIN 16
#endif
-#define UMA_MD_SMALL_ALLOC
+#define UMA_USE_DMAP
#ifndef LOCORE
extern vm_paddr_t dmap_phys_base;
extern vm_paddr_t dmap_phys_max;
extern vm_offset_t dmap_max_addr;
-extern vm_offset_t vm_max_kernel_address;
extern vm_offset_t init_pt_va;
#endif
@@ -258,5 +257,6 @@ extern vm_offset_t init_pt_va;
* Need a page dump array for minidump.
*/
#define MINIDUMP_PAGE_TRACKING 1
+#define MINIDUMP_STARTUP_PAGE_TRACKING 1
#endif /* !_MACHINE_VMPARAM_H_ */
diff --git a/sys/riscv/riscv/busdma_bounce.c b/sys/riscv/riscv/busdma_bounce.c
index e504b122ebd1..e1c217f1d12e 100644
--- a/sys/riscv/riscv/busdma_bounce.c
+++ b/sys/riscv/riscv/busdma_bounce.c
@@ -111,11 +111,15 @@ static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
static MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
#define dmat_alignment(dmat) ((dmat)->common.alignment)
+#define dmat_bounce_flags(dmat) ((dmat)->bounce_flags)
+#define dmat_boundary(dmat) ((dmat)->common.boundary)
#define dmat_flags(dmat) ((dmat)->common.flags)
#define dmat_highaddr(dmat) ((dmat)->common.highaddr)
#define dmat_lowaddr(dmat) ((dmat)->common.lowaddr)
#define dmat_lockfunc(dmat) ((dmat)->common.lockfunc)
#define dmat_lockfuncarg(dmat) ((dmat)->common.lockfuncarg)
+#define dmat_maxsegsz(dmat) ((dmat)->common.maxsegsz)
+#define dmat_nsegments(dmat) ((dmat)->common.nsegments)
#include "../../kern/subr_busdma_bounce.c"
@@ -493,7 +497,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
*/
curaddr = buf;
while (buflen != 0) {
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if (addr_needs_bounce(dmat, curaddr)) {
sgsize = MIN(sgsize,
PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -530,8 +534,8 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
vendaddr = (vm_offset_t)buf + buflen;
while (vaddr < vendaddr) {
- sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK);
- sg_len = MIN(sg_len, dmat->common.maxsegsz);
+ sg_len = MIN(vendaddr - vaddr,
+ PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));
if (pmap == kernel_pmap)
paddr = pmap_kextract(vaddr);
else
@@ -548,47 +552,6 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
}
/*
- * Add a single contiguous physical range to the segment list.
- */
-static bus_size_t
-_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
- bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
-{
- int seg;
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (!vm_addr_bound_ok(curaddr, sgsize, dmat->common.boundary))
- sgsize = roundup2(curaddr, dmat->common.boundary) - curaddr;
-
- /*
- * Insert chunk into a segment, coalescing with
- * previous segment if possible.
- */
- seg = *segp;
- if (seg == -1) {
- seg = 0;
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- } else {
- if (curaddr == segs[seg].ds_addr + segs[seg].ds_len &&
- (segs[seg].ds_len + sgsize) <= dmat->common.maxsegsz &&
- vm_addr_bound_ok(segs[seg].ds_addr,
- segs[seg].ds_len + sgsize, dmat->common.boundary))
- segs[seg].ds_len += sgsize;
- else {
- if (++seg >= dmat->common.nsegments)
- return (0);
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- }
- }
- *segp = seg;
- return (sgsize);
-}
-
-/*
* Utility function to load a physical buffer. segp contains
* the starting segment on entrace, and the ending segment on exit.
*/
@@ -619,7 +582,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
while (buflen > 0) {
curaddr = buf;
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if (((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) &&
map->pagesneeded != 0 &&
addr_needs_bounce(dmat, curaddr)) {
@@ -644,9 +607,8 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
} else
sl->datacount += sgsize;
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
buf += sgsize;
buflen -= sgsize;
@@ -668,7 +630,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
int *segp)
{
struct sync_list *sl;
- bus_size_t sgsize, max_sgsize;
+ bus_size_t sgsize;
bus_addr_t curaddr, sl_pend;
vm_offset_t kvaddr, vaddr, sl_vend;
int error;
@@ -705,17 +667,14 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
/*
* Compute the segment size, and adjust counts.
*/
- max_sgsize = MIN(buflen, dmat->common.maxsegsz);
- sgsize = PAGE_SIZE - (curaddr & PAGE_MASK);
+ sgsize = MIN(buflen, PAGE_SIZE - (curaddr & PAGE_MASK));
if (((dmat->bounce_flags & BF_COULD_BOUNCE) != 0) &&
map->pagesneeded != 0 &&
addr_needs_bounce(dmat, curaddr)) {
sgsize = roundup2(sgsize, dmat->common.alignment);
- sgsize = MIN(sgsize, max_sgsize);
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr,
sgsize);
} else if ((dmat->bounce_flags & BF_COHERENT) == 0) {
- sgsize = MIN(sgsize, max_sgsize);
if (map->sync_count > 0) {
sl_pend = sl->paddr + sl->datacount;
sl_vend = sl->vaddr + sl->datacount;
@@ -741,12 +700,9 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
sl->datacount = sgsize;
} else
sl->datacount += sgsize;
- } else {
- sgsize = MIN(sgsize, max_sgsize);
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
vaddr += sgsize;
buflen -= sgsize;
diff --git a/sys/riscv/riscv/mem.c b/sys/riscv/riscv/mem.c
index 7bf48a02e16a..9792c01fa673 100644
--- a/sys/riscv/riscv/mem.c
+++ b/sys/riscv/riscv/mem.c
@@ -50,6 +50,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
struct iovec *iov;
struct vm_page m;
vm_page_t marr;
+ vm_prot_t prot;
u_int cnt;
int error;
@@ -79,8 +80,16 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
break;
}
- if (!kernacc((void *)v, cnt, uio->uio_rw == UIO_READ ?
- VM_PROT_READ : VM_PROT_WRITE)) {
+ switch (uio->uio_rw) {
+ case UIO_READ:
+ prot = VM_PROT_READ;
+ break;
+ case UIO_WRITE:
+ prot = VM_PROT_WRITE;
+ break;
+ }
+
+ if (!kernacc((void *)v, cnt, prot)) {
error = EFAULT;
break;
}
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
index b92cb816f44a..b571806bb2da 100644
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -714,7 +714,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen)
alloc_pages(l0pv, 1);
l0p = (void *)l0pv;
l1pa = pmap_early_vtophys(l1pt, l1pt);
- l0p[pmap_l0_index(KERNBASE)] = PTE_V | PTE_A | PTE_D |
+ l0p[pmap_l0_index(KERNBASE)] = PTE_V |
((l1pa >> PAGE_SHIFT) << PTE_PPN0_S);
l0pa = pmap_early_vtophys(l1pt, l0pv);
diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c
index 06806872d9fd..456dd463ab2a 100644
--- a/sys/riscv/riscv/timer.c
+++ b/sys/riscv/riscv/timer.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2015-2017 Ruslan Bukin <br@bsdpad.com>
+ * Copyright (c) 2015-2024 Ruslan Bukin <br@bsdpad.com>
* All rights reserved.
*
* Portions of this software were developed by SRI International and the
@@ -143,7 +143,10 @@ riscv_timer_intr(void *arg)
sc = (struct riscv_timer_softc *)arg;
- csr_clear(sip, SIP_STIP);
+ if (has_sstc)
+ csr_write(stimecmp, -1UL);
+ else
+ csr_clear(sip, SIP_STIP);
if (sc->et.et_active)
sc->et.et_event_cb(&sc->et, sc->et.et_arg);
diff --git a/sys/riscv/riscv/uio_machdep.c b/sys/riscv/riscv/uio_machdep.c
index 2e6ed2337fc5..002685c98ccf 100644
--- a/sys/riscv/riscv/uio_machdep.c
+++ b/sys/riscv/riscv/uio_machdep.c
@@ -95,18 +95,26 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
switch (uio->uio_segflg) {
case UIO_USERSPACE:
maybe_yield();
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
error = copyout(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
error = copyin(iov->iov_base, cp, cnt);
+ break;
+ }
if (error)
goto out;
break;
case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
+ switch (uio->uio_rw) {
+ case UIO_READ:
bcopy(cp, iov->iov_base, cnt);
- else
+ break;
+ case UIO_WRITE:
bcopy(iov->iov_base, cp, cnt);
+ break;
+ }
break;
case UIO_NOCOPY:
break;
diff --git a/sys/riscv/riscv/uma_machdep.c b/sys/riscv/riscv/uma_machdep.c
deleted file mode 100644
index 54e0d25800f6..000000000000
--- a/sys/riscv/riscv/uma_machdep.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/vm_page.h>
-#include <vm/vm_phys.h>
-#include <vm/vm_dumpset.h>
-#include <vm/uma.h>
-#include <vm/uma_int.h>
-
-void *
-uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
- int wait)
-{
- vm_page_t m;
- vm_paddr_t pa;
- void *va;
-
- *flags = UMA_SLAB_PRIV;
- m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) |
- VM_ALLOC_WIRED);
- if (m == NULL)
- return (NULL);
- pa = m->phys_addr;
- if ((wait & M_NODUMP) == 0)
- dump_add_page(pa);
- va = (void *)PHYS_TO_DMAP(pa);
- return (va);
-}
-
-void
-uma_small_free(void *mem, vm_size_t size, u_int8_t flags)
-{
- vm_page_t m;
- vm_paddr_t pa;
-
- pa = DMAP_TO_PHYS((vm_offset_t)mem);
- dump_drop_page(pa);
- m = PHYS_TO_VM_PAGE(pa);
- vm_page_unwire_noq(m);
- vm_page_free(m);
-}
diff --git a/sys/riscv/starfive/files.starfive b/sys/riscv/starfive/files.starfive
index e69de29bb2d1..d867dee1099b 100644
--- a/sys/riscv/starfive/files.starfive
+++ b/sys/riscv/starfive/files.starfive
@@ -0,0 +1,7 @@
+dev/clk/starfive/jh7110_clk.c standard
+dev/clk/starfive/jh7110_clk_aon.c standard
+dev/clk/starfive/jh7110_clk_pll.c standard
+dev/clk/starfive/jh7110_clk_sys.c standard
+dev/mmc/host/dwmmc_starfive.c optional dwmmc_starfive fdt
+
+riscv/starfive/starfive_syscon.c standard
diff --git a/sys/riscv/starfive/starfive_syscon.c b/sys/riscv/starfive/starfive_syscon.c
new file mode 100644
index 000000000000..dfc8fa8ba5d9
--- /dev/null
+++ b/sys/riscv/starfive/starfive_syscon.c
@@ -0,0 +1,87 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 The FreeBSD Foundation
+ *
+ * This software was developed by Mitchell Horne <mhorne@FreeBSD.org> under
+ * sponsorship from the FreeBSD Foundation.
+ */
+
+/*
+ * StarFive syscon driver.
+ *
+ * On the JH7110, the PLL clock driver is a child of the sys-syscon device.
+ * This needs to probe very early (BUS_PASS_BUS + BUS_PASS_ORDER_EARLY).
+ */
+
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+
+#include <machine/bus.h>
+
+#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <dev/syscon/syscon.h>
+#include <dev/syscon/syscon_generic.h>
+
+#include <dev/fdt/simple_mfd.h>
+
+enum starfive_syscon_type {
+ JH7110_SYSCON_SYS = 1,
+ JH7110_SYSCON_AON,
+ JH7110_SYSCON_STG,
+};
+
+static struct ofw_compat_data compat_data[] = {
+ { "starfive,jh7110-sys-syscon", JH7110_SYSCON_SYS },
+ { "starfive,jh7110-aon-syscon", JH7110_SYSCON_AON },
+ { "starfive,jh7110-stg-syscon", JH7110_SYSCON_STG },
+
+ { NULL, 0 }
+};
+
+static int
+starfive_syscon_probe(device_t dev)
+{
+ enum starfive_syscon_type type;
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
+ type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ if (type == 0)
+ return (ENXIO);
+
+ switch (type) {
+ case JH7110_SYSCON_SYS:
+ device_set_desc(dev, "JH7110 SYS syscon");
+ break;
+ case JH7110_SYSCON_AON:
+ device_set_desc(dev, "JH7110 AON syscon");
+ break;
+ case JH7110_SYSCON_STG:
+ device_set_desc(dev, "JH7110 STG syscon");
+ break;
+ }
+
+ return (BUS_PROBE_DEFAULT);
+}
+
+
+static device_method_t starfive_syscon_methods[] = {
+ DEVMETHOD(device_probe, starfive_syscon_probe),
+
+ DEVMETHOD_END
+};
+
+DEFINE_CLASS_1(starfive_syscon, starfive_syscon_driver, starfive_syscon_methods,
+ sizeof(struct syscon_generic_softc), simple_mfd_driver);
+
+EARLY_DRIVER_MODULE(starfive_syscon, simplebus, starfive_syscon_driver, 0, 0,
+ BUS_PASS_BUS + BUS_PASS_ORDER_EARLY);
+MODULE_VERSION(starfive_syscon, 1);
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c
new file mode 100644
index 000000000000..507e64ea0175
--- /dev/null
+++ b/sys/security/mac_do/mac_do.c
@@ -0,0 +1,545 @@
+/*-
+ * Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <sys/param.h>
+#include <sys/malloc.h>
+#include <sys/jail.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/module.h>
+#include <sys/mount.h>
+#include <sys/mutex.h>
+#include <sys/priv.h>
+#include <sys/proc.h>
+#include <sys/socket.h>
+#include <sys/sx.h>
+#include <sys/sysctl.h>
+#include <sys/systm.h>
+#include <sys/ucred.h>
+#include <sys/vnode.h>
+
+#include <security/mac/mac_policy.h>
+
+SYSCTL_DECL(_security_mac);
+
+static SYSCTL_NODE(_security_mac, OID_AUTO, do,
+ CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "mac_do policy controls");
+
+static int do_enabled = 1;
+SYSCTL_INT(_security_mac_do, OID_AUTO, enabled, CTLFLAG_RWTUN,
+ &do_enabled, 0, "Enforce do policy");
+
+static MALLOC_DEFINE(M_DO, "do_rule", "Rules for mac_do");
+
+#define MAC_RULE_STRING_LEN 1024
+
+static unsigned mac_do_osd_jail_slot;
+
+#define RULE_UID 1
+#define RULE_GID 2
+#define RULE_ANY 3
+
+struct rule {
+ int from_type;
+ union {
+ uid_t f_uid;
+ gid_t f_gid;
+ };
+ int to_type;
+ uid_t t_uid;
+ TAILQ_ENTRY(rule) r_entries;
+};
+
+struct mac_do_rule {
+ char string[MAC_RULE_STRING_LEN];
+ TAILQ_HEAD(rulehead, rule) head;
+};
+
+static struct mac_do_rule rules0;
+
+static void
+toast_rules(struct rulehead *head)
+{
+ struct rule *r;
+
+ while ((r = TAILQ_FIRST(head)) != NULL) {
+ TAILQ_REMOVE(head, r, r_entries);
+ free(r, M_DO);
+ }
+}
+
+static int
+parse_rule_element(char *element, struct rule **rule)
+{
+ int error = 0;
+ char *type, *id, *p;
+ struct rule *new;
+
+ new = malloc(sizeof(*new), M_DO, M_ZERO|M_WAITOK);
+
+ type = strsep(&element, "=");
+ if (type == NULL) {
+ error = EINVAL;
+ goto out;
+ }
+ if (strcmp(type, "uid") == 0) {
+ new->from_type = RULE_UID;
+ } else if (strcmp(type, "gid") == 0) {
+ new->from_type = RULE_GID;
+ } else {
+ error = EINVAL;
+ goto out;
+ }
+ id = strsep(&element, ":");
+ if (id == NULL) {
+ error = EINVAL;
+ goto out;
+ }
+ if (new->from_type == RULE_UID)
+ new->f_uid = strtol(id, &p, 10);
+ if (new->from_type == RULE_GID)
+ new->f_gid = strtol(id, &p, 10);
+ if (*p != '\0') {
+ error = EINVAL;
+ goto out;
+ }
+ if (*element == '\0') {
+ error = EINVAL;
+ goto out;
+ }
+ if (strcmp(element, "any") == 0 || strcmp(element, "*") == 0) {
+ new->to_type = RULE_ANY;
+ } else {
+ new->to_type = RULE_UID;
+ new->t_uid = strtol(element, &p, 10);
+ if (*p != '\0') {
+ error = EINVAL;
+ goto out;
+ }
+ }
+out:
+ if (error != 0) {
+ free(new, M_DO);
+ *rule = NULL;
+ } else
+ *rule = new;
+ return (error);
+}
+
+static int
+parse_rules(char *string, struct rulehead *head)
+{
+ struct rule *new;
+ char *element;
+ int error = 0;
+
+ while ((element = strsep(&string, ",")) != NULL) {
+ if (strlen(element) == 0)
+ continue;
+ error = parse_rule_element(element, &new);
+ if (error)
+ goto out;
+ TAILQ_INSERT_TAIL(head, new, r_entries);
+ }
+out:
+ if (error != 0)
+ toast_rules(head);
+ return (error);
+}
+
+static struct mac_do_rule *
+mac_do_rule_find(struct prison *spr, struct prison **prp)
+{
+ struct prison *pr;
+ struct mac_do_rule *rules;
+
+ for (pr = spr;; pr = pr->pr_parent) {
+ mtx_lock(&pr->pr_mtx);
+ if (pr == &prison0) {
+ rules = &rules0;
+ break;
+ }
+ rules = osd_jail_get(pr, mac_do_osd_jail_slot);
+ if (rules != NULL)
+ break;
+ mtx_unlock(&pr->pr_mtx);
+ }
+ *prp = pr;
+
+ return (rules);
+}
+
+static int
+sysctl_rules(SYSCTL_HANDLER_ARGS)
+{
+ char *copy_string, *new_string;
+ struct rulehead head, saved_head;
+ struct prison *pr;
+ struct mac_do_rule *rules;
+ int error;
+
+ rules = mac_do_rule_find(req->td->td_ucred->cr_prison, &pr);
+ mtx_unlock(&pr->pr_mtx);
+ if (req->newptr == NULL)
+ return (sysctl_handle_string(oidp, rules->string, MAC_RULE_STRING_LEN, req));
+
+ new_string = malloc(MAC_RULE_STRING_LEN, M_DO,
+ M_WAITOK|M_ZERO);
+ mtx_lock(&pr->pr_mtx);
+ strlcpy(new_string, rules->string, MAC_RULE_STRING_LEN);
+ mtx_unlock(&pr->pr_mtx);
+
+ error = sysctl_handle_string(oidp, new_string, MAC_RULE_STRING_LEN, req);
+ if (error)
+ goto out;
+
+ copy_string = strdup(new_string, M_DO);
+ TAILQ_INIT(&head);
+ error = parse_rules(copy_string, &head);
+ free(copy_string, M_DO);
+ if (error)
+ goto out;
+ TAILQ_INIT(&saved_head);
+ mtx_lock(&pr->pr_mtx);
+ TAILQ_CONCAT(&saved_head, &rules->head, r_entries);
+ TAILQ_CONCAT(&rules->head, &head, r_entries);
+ strlcpy(rules->string, new_string, MAC_RULE_STRING_LEN);
+ mtx_unlock(&pr->pr_mtx);
+ toast_rules(&saved_head);
+
+out:
+ free(new_string, M_DO);
+ return (error);
+}
+
+SYSCTL_PROC(_security_mac_do, OID_AUTO, rules,
+ CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE,
+ 0, 0, sysctl_rules, "A",
+ "Rules");
+
+static void
+destroy(struct mac_policy_conf *mpc)
+{
+ osd_jail_deregister(mac_do_osd_jail_slot);
+ toast_rules(&rules0.head);
+}
+
+static void
+mac_do_alloc_prison(struct prison *pr, struct mac_do_rule **lrp)
+{
+ struct prison *ppr;
+ struct mac_do_rule *rules, *new_rules;
+ void **rsv;
+
+ rules = mac_do_rule_find(pr, &ppr);
+ if (ppr == pr)
+ goto done;
+
+ mtx_unlock(&ppr->pr_mtx);
+ new_rules = malloc(sizeof(*new_rules), M_PRISON, M_WAITOK|M_ZERO);
+ rsv = osd_reserve(mac_do_osd_jail_slot);
+ rules = mac_do_rule_find(pr, &ppr);
+ if (ppr == pr) {
+ free(new_rules, M_PRISON);
+ osd_free_reserved(rsv);
+ goto done;
+ }
+ mtx_lock(&pr->pr_mtx);
+ osd_jail_set_reserved(pr, mac_do_osd_jail_slot, rsv, new_rules);
+ TAILQ_INIT(&new_rules->head);
+done:
+ if (lrp != NULL)
+ *lrp = rules;
+ mtx_unlock(&pr->pr_mtx);
+ mtx_unlock(&ppr->pr_mtx);
+}
+
+static void
+mac_do_dealloc_prison(void *data)
+{
+ struct mac_do_rule *r = data;
+
+ toast_rules(&r->head);
+}
+
+static int
+mac_do_prison_set(void *obj, void *data)
+{
+ struct prison *pr = obj;
+ struct vfsoptlist *opts = data;
+ struct rulehead head, saved_head;
+ struct mac_do_rule *rules;
+ char *rules_string, *copy_string;
+ int error, jsys, len;
+
+ error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys));
+ if (error == ENOENT)
+ jsys = -1;
+ error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len);
+ if (error == ENOENT)
+ rules = NULL;
+ else
+ jsys = JAIL_SYS_NEW;
+ switch (jsys) {
+ case JAIL_SYS_INHERIT:
+ mtx_lock(&pr->pr_mtx);
+ osd_jail_del(pr, mac_do_osd_jail_slot);
+ mtx_unlock(&pr->pr_mtx);
+ break;
+ case JAIL_SYS_NEW:
+ mac_do_alloc_prison(pr, &rules);
+ if (rules_string == NULL)
+ break;
+ copy_string = strdup(rules_string, M_DO);
+ TAILQ_INIT(&head);
+ error = parse_rules(copy_string, &head);
+ free(copy_string, M_DO);
+ if (error)
+ return (1);
+ TAILQ_INIT(&saved_head);
+ mtx_lock(&pr->pr_mtx);
+ TAILQ_CONCAT(&saved_head, &rules->head, r_entries);
+ TAILQ_CONCAT(&rules->head, &head, r_entries);
+ strlcpy(rules->string, rules_string, MAC_RULE_STRING_LEN);
+ mtx_unlock(&pr->pr_mtx);
+ toast_rules(&saved_head);
+ break;
+ }
+ return (0);
+}
+
+SYSCTL_JAIL_PARAM_SYS_NODE(mdo, CTLFLAG_RW, "Jail MAC/do parameters");
+SYSCTL_JAIL_PARAM_STRING(_mdo, rules, CTLFLAG_RW, MAC_RULE_STRING_LEN,
+ "Jail MAC/do rules");
+
+static int
+mac_do_prison_get(void *obj, void *data)
+{
+ struct prison *ppr, *pr = obj;
+ struct vfsoptlist *opts = data;
+ struct mac_do_rule *rules;
+ int jsys, error;
+
+ rules = mac_do_rule_find(pr, &ppr);
+ error = vfs_setopt(opts, "mdo", &jsys, sizeof(jsys));
+ if (error != 0 && error != ENOENT)
+ goto done;
+ error = vfs_setopts(opts, "mdo.rules", rules->string);
+ if (error != 0 && error != ENOENT)
+ goto done;
+ mtx_unlock(&ppr->pr_mtx);
+ error = 0;
+done:
+ return (0);
+}
+
+static int
+mac_do_prison_create(void *obj, void *data __unused)
+{
+ struct prison *pr = obj;
+
+ mac_do_alloc_prison(pr, NULL);
+ return (0);
+}
+
+static int
+mac_do_prison_remove(void *obj, void *data __unused)
+{
+ struct prison *pr = obj;
+ struct mac_do_rule *r;
+
+ mtx_lock(&pr->pr_mtx);
+ r = osd_jail_get(pr, mac_do_osd_jail_slot);
+ mtx_unlock(&pr->pr_mtx);
+ toast_rules(&r->head);
+ return (0);
+}
+
+static int
+mac_do_prison_check(void *obj, void *data)
+{
+ struct vfsoptlist *opts = data;
+ char *rules_string;
+ int error, jsys, len;
+
+ error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys));
+ if (error != ENOENT) {
+ if (error != 0)
+ return (error);
+ if (jsys != JAIL_SYS_NEW && jsys != JAIL_SYS_INHERIT)
+ return (EINVAL);
+ }
+ error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len);
+ if (error != ENOENT) {
+ if (error != 0)
+ return (error);
+ if (len > MAC_RULE_STRING_LEN) {
+ vfs_opterror(opts, "mdo.rules too long");
+ return (ENAMETOOLONG);
+ }
+ }
+ if (error == ENOENT)
+ error = 0;
+ return (error);
+}
+
+static void
+init(struct mac_policy_conf *mpc)
+{
+ static osd_method_t methods[PR_MAXMETHOD] = {
+ [PR_METHOD_CREATE] = mac_do_prison_create,
+ [PR_METHOD_GET] = mac_do_prison_get,
+ [PR_METHOD_SET] = mac_do_prison_set,
+ [PR_METHOD_CHECK] = mac_do_prison_check,
+ [PR_METHOD_REMOVE] = mac_do_prison_remove,
+ };
+ struct prison *pr;
+
+ mac_do_osd_jail_slot = osd_jail_register(mac_do_dealloc_prison, methods);
+ TAILQ_INIT(&rules0.head);
+ sx_slock(&allprison_lock);
+ TAILQ_FOREACH(pr, &allprison, pr_list)
+ mac_do_alloc_prison(pr, NULL);
+ sx_sunlock(&allprison_lock);
+}
+
+static bool
+rule_is_valid(struct ucred *cred, struct rule *r)
+{
+ if (r->from_type == RULE_UID && r->f_uid == cred->cr_uid)
+ return (true);
+ if (r->from_type == RULE_GID && r->f_gid == cred->cr_gid)
+ return (true);
+ return (false);
+}
+
+static int
+priv_grant(struct ucred *cred, int priv)
+{
+ struct rule *r;
+ struct prison *pr;
+ struct mac_do_rule *rule;
+
+ if (do_enabled == 0)
+ return (EPERM);
+
+ rule = mac_do_rule_find(cred->cr_prison, &pr);
+ TAILQ_FOREACH(r, &rule->head, r_entries) {
+ if (rule_is_valid(cred, r)) {
+ switch (priv) {
+ case PRIV_CRED_SETGROUPS:
+ case PRIV_CRED_SETUID:
+ mtx_unlock(&pr->pr_mtx);
+ return (0);
+ default:
+ break;
+ }
+ }
+ }
+ mtx_unlock(&pr->pr_mtx);
+ return (EPERM);
+}
+
+static int
+check_setgroups(struct ucred *cred, int ngrp, gid_t *groups)
+{
+ struct rule *r;
+ char *fullpath = NULL;
+ char *freebuf = NULL;
+ struct prison *pr;
+ struct mac_do_rule *rule;
+
+ if (do_enabled == 0)
+ return (0);
+ if (cred->cr_uid == 0)
+ return (0);
+
+ if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0)
+ return (EPERM);
+ if (strcmp(fullpath, "/usr/bin/mdo") != 0) {
+ free(freebuf, M_TEMP);
+ return (EPERM);
+ }
+ free(freebuf, M_TEMP);
+
+ rule = mac_do_rule_find(cred->cr_prison, &pr);
+ TAILQ_FOREACH(r, &rule->head, r_entries) {
+ if (rule_is_valid(cred, r)) {
+ mtx_unlock(&pr->pr_mtx);
+ return (0);
+ }
+ }
+ mtx_unlock(&pr->pr_mtx);
+
+ return (EPERM);
+}
+
+static int
+check_setuid(struct ucred *cred, uid_t uid)
+{
+ struct rule *r;
+ int error;
+ char *fullpath = NULL;
+ char *freebuf = NULL;
+ struct prison *pr;
+ struct mac_do_rule *rule;
+
+ if (do_enabled == 0)
+ return (0);
+ if (cred->cr_uid == uid || cred->cr_uid == 0 || cred->cr_ruid == 0)
+ return (0);
+
+ if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0)
+ return (EPERM);
+ if (strcmp(fullpath, "/usr/bin/mdo") != 0) {
+ free(freebuf, M_TEMP);
+ return (EPERM);
+ }
+ free(freebuf, M_TEMP);
+
+ error = EPERM;
+ rule = mac_do_rule_find(cred->cr_prison, &pr);
+ TAILQ_FOREACH(r, &rule->head, r_entries) {
+ if (r->from_type == RULE_UID) {
+ if (cred->cr_uid != r->f_uid)
+ continue;
+ if (r->to_type == RULE_ANY) {
+ error = 0;
+ break;
+ }
+ if (r->to_type == RULE_UID && uid == r->t_uid) {
+ error = 0;
+ break;
+ }
+ }
+ if (r->from_type == RULE_GID) {
+ if (cred->cr_gid != r->f_gid)
+ continue;
+ if (r->to_type == RULE_ANY) {
+ error = 0;
+ break;
+ }
+ if (r->to_type == RULE_UID && uid == r->t_uid) {
+ error = 0;
+ break;
+ }
+ }
+ }
+ mtx_unlock(&pr->pr_mtx);
+ return (error);
+}
+
+static struct mac_policy_ops do_ops = {
+ .mpo_destroy = destroy,
+ .mpo_init = init,
+ .mpo_cred_check_setuid = check_setuid,
+ .mpo_cred_check_setgroups = check_setgroups,
+ .mpo_priv_grant = priv_grant,
+};
+
+MAC_POLICY_SET(&do_ops, mac_do, "MAC/do",
+ MPC_LOADTIME_FLAG_UNLOADOK, NULL);
+MODULE_VERSION(mac_do, 1);
diff --git a/sys/sys/_bitset.h b/sys/sys/_bitset.h
index 87bc722fe5f8..2b3be3bbec61 100644
--- a/sys/sys/_bitset.h
+++ b/sys/sys/_bitset.h
@@ -36,7 +36,7 @@
* Macros addressing word and bit within it, tuned to make compiler
* optimize cases when SETSIZE fits into single machine word.
*/
-#define _BITSET_BITS (sizeof(long) * 8)
+#define _BITSET_BITS (sizeof(unsigned long) * 8)
#define __howmany(x, y) (((x) + ((y) - 1)) / (y))
@@ -44,7 +44,7 @@
#define __BITSET_DEFINE(_t, _s) \
struct _t { \
- long __bits[__bitset_words((_s))]; \
+ unsigned long __bits[__bitset_words((_s))]; \
}
/*
diff --git a/sys/sys/_endian.h b/sys/sys/_endian.h
index 8d1eb3f3f3df..d0ffd87efa11 100644
--- a/sys/sys/_endian.h
+++ b/sys/sys/_endian.h
@@ -69,8 +69,10 @@
/*
* POSIX Issue 8 will require these for endian.h. Define them there and in the
- * traditional BSD compilation environment. Since issue 8 doesn't yet have an
- * assigned date, use strictly greater than issue 7's date.
+ * traditional BSD compilation environment. PDP_ENDIAN isn't strictly in Issue
+ * 8, but is allowed as implementations can define any *_ENDIAN symbol. Since
+ * issue 8 doesn't yet have an assigned date, use strictly greater than issue
+ * 7's date.
*/
#if __BSD_VISIBLE || _POSIX_C_SOURCE > 200809
#define LITTLE_ENDIAN _LITTLE_ENDIAN
diff --git a/sys/sys/_maxphys.h b/sys/sys/_maxphys.h
new file mode 100644
index 000000000000..48cfc4a054ff
--- /dev/null
+++ b/sys/sys/_maxphys.h
@@ -0,0 +1,10 @@
+/*-
+ * This file is in the public domain.
+ */
+#ifndef MAXPHYS
+#ifdef __ILP32__
+#define MAXPHYS (128 * 1024)
+#else
+#define MAXPHYS (1024 * 1024)
+#endif
+#endif
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index 70fb2812c3ba..cee9547912a6 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -341,6 +341,13 @@ struct buf {
*/
#define BUF_ISLOCKED(bp) \
lockstatus(&(bp)->b_lock)
+
+/*
+ * Check if a buffer lock is currently held by LK_KERNPROC.
+ */
+#define BUF_DISOWNED(bp) \
+ lockmgr_disowned(&(bp)->b_lock)
+
/*
* Free a buffer lock.
*/
diff --git a/sys/sys/bufobj.h b/sys/sys/bufobj.h
index d70327e31a37..a6a9c5c2bf01 100644
--- a/sys/sys/bufobj.h
+++ b/sys/sys/bufobj.h
@@ -33,7 +33,7 @@
* cache.
*
* This used to be vnodes, but we need non-vnode code to be able
- * to use the buffer cache as well, specifically geom classes like gbde,
+ * to use the buffer cache as well, specifically geom classes like
* raid3 and raid5.
*
* All vnodes will contain a bufobj initially, but down the road we may
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index e47a7072e1f1..037dfa55f923 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -609,6 +609,16 @@
#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var))
#endif
+#if !defined(_STANDALONE) && !defined(_KERNEL)
+#if defined(__GNUC__) || defined(__PCC__)
+#define __RENAME(x) __asm(__STRING(x))
+#else
+#define __RENAME(x) no renaming support for compiler in use
+#endif /* __GNUC__ */
+#else /* _STANDALONE || _KERNEL */
+#define __RENAME(x) no renaming in kernel/standalone environment
+#endif
+
/*-
* The following definitions are an extension of the behavior originally
* implemented in <sys/_posix.h>, but with a different level of granularity.
@@ -892,7 +902,7 @@
/* Provide fallback versions for other compilers (GCC/Clang < 10): */
#if !__has_builtin(__builtin_is_aligned)
#define __builtin_is_aligned(x, align) \
- (((__uintptr_t)x & ((align) - 1)) == 0)
+ (((__uintptr_t)(x) & ((align) - 1)) == 0)
#endif
#if !__has_builtin(__builtin_align_up)
#define __builtin_align_up(x, align) \
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index 191d77598b77..c7110a7c8c17 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -94,6 +94,8 @@ struct consdev {
#ifdef _KERNEL
+extern int cn_mute;
+
extern struct msgbuf consmsgbuf; /* Message buffer for constty. */
extern struct tty *constty; /* Temporary virtual console. */
@@ -143,7 +145,6 @@ int constty_clear(struct tty *tp);
#define VTY_SC 0x01
#define VTY_VT 0x02
int vty_enabled(unsigned int);
-void vty_set_preferred(unsigned int);
#endif /* _KERNEL */
diff --git a/sys/sys/disk.h b/sys/sys/disk.h
index 73ae5ce5756e..b8e29cef1de5 100644
--- a/sys/sys/disk.h
+++ b/sys/sys/disk.h
@@ -78,7 +78,7 @@ void disk_err(struct bio *bp, const char *what, int blkdone, int nl);
* only if they point at exactly the same physical storage, this is
* the case for multipathing for example,
* - GEOM classes that consumes single providers and provide single
- * providers, like geli, gbde, should just attach class name to the
+ * providers, like geli, should just attach class name to the
* ident of the underlying provider,
* - ident is an ASCII string (is printable),
* - ident is optional and applications can't relay on its presence.
diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h
index 9fa0adf9139f..899d65e386e0 100644
--- a/sys/sys/interrupt.h
+++ b/sys/sys/interrupt.h
@@ -121,7 +121,7 @@ struct intr_event {
int ie_count; /* Loop counter. */
int ie_warncnt; /* Rate-check interrupt storm warns. */
struct timeval ie_warntm;
- int ie_irq; /* Physical irq number if !SOFT. */
+ u_int ie_irq; /* Physical irq number if !SOFT. */
int ie_cpu; /* CPU this event is bound to. */
volatile int ie_phase; /* Switched to establish a barrier. */
volatile int ie_active[2]; /* Filters in ISR context. */
@@ -175,7 +175,7 @@ struct _cpuset;
int intr_event_bind_ithread_cpuset(struct intr_event *ie,
struct _cpuset *mask);
int intr_event_create(struct intr_event **event, void *source,
- int flags, int irq, void (*pre_ithread)(void *),
+ int flags, u_int irq, void (*pre_ithread)(void *),
void (*post_ithread)(void *), void (*post_filter)(void *),
int (*assign_cpu)(void *, int), const char *fmt, ...)
__printflike(9, 10);
@@ -188,7 +188,7 @@ int intr_event_suspend_handler(void *cookie);
int intr_event_resume_handler(void *cookie);
int intr_getaffinity(int irq, int mode, void *mask);
void *intr_handler_source(void *cookie);
-int intr_setaffinity(int irq, int mode, void *mask);
+int intr_setaffinity(int irq, int mode, const void *mask);
void _intr_drain(int irq); /* LinuxKPI only. */
int swi_add(struct intr_event **eventp, const char *name,
driver_intr_t handler, void *arg, int pri, enum intr_type flags,
diff --git a/sys/sys/linker.h b/sys/sys/linker.h
index 52fbeb5584ff..06e950f7affe 100644
--- a/sys/sys/linker.h
+++ b/sys/sys/linker.h
@@ -131,6 +131,12 @@ typedef int linker_predicate_t(linker_file_t, void *);
extern linker_file_t linker_kernel_file;
/*
+ * Special symbol which will be replaced by a reference to the linker_file_t
+ * of the module it is used in.
+ */
+extern linker_file_t __this_linker_file;
+
+/*
* Obtain a reference to a module, loading it if required.
*/
int linker_reference_module(const char* _modname, struct mod_depend *_verinfo,
diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h
index ebe238cd0e25..48eea47c60da 100644
--- a/sys/sys/lockmgr.h
+++ b/sys/sys/lockmgr.h
@@ -130,6 +130,10 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct rwlock *ilk,
LOCK_FILE, LOCK_LINE)
#define lockmgr_disown(lk) \
_lockmgr_disown((lk), LOCK_FILE, LOCK_LINE)
+#define lockmgr_disowned_v(v) \
+ (LK_HOLDER((v)) == LK_KERNPROC)
+#define lockmgr_disowned(lk) \
+ lockmgr_disowned_v(lockmgr_read_value((lk)))
#define lockmgr_recursed_v(v) \
(v & LK_WRITER_RECURSED)
#define lockmgr_recursed(lk) \
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index e13ba39c27aa..741ae1b7c387 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -593,6 +593,7 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff)
#define EXT_PACKET 6 /* mbuf+cluster from packet zone */
#define EXT_MBUF 7 /* external mbuf reference */
#define EXT_RXRING 8 /* data in NIC receive ring */
+#define EXT_CTL 9 /* buffer from a ctl(4) backend */
#define EXT_VENDOR1 224 /* for vendor-internal use */
#define EXT_VENDOR2 225 /* for vendor-internal use */
diff --git a/sys/sys/msg.h b/sys/sys/msg.h
index 29fb8c2106b5..d8c950e66c47 100644
--- a/sys/sys/msg.h
+++ b/sys/sys/msg.h
@@ -152,6 +152,9 @@ struct msqid_kernel {
#ifdef _KERNEL
extern struct msginfo msginfo;
+int kern_get_msqids(struct thread *td, struct msqid_kernel **res,
+ size_t *sz);
+
#else /* _KERNEL */
__BEGIN_DECLS
diff --git a/sys/sys/osd.h b/sys/sys/osd.h
index 1c58c4fff8de..498cad5064f9 100644
--- a/sys/sys/osd.h
+++ b/sys/sys/osd.h
@@ -64,6 +64,7 @@ int osd_set_reserved(u_int type, struct osd *osd, u_int slot, void **rsv,
void *value);
void osd_free_reserved(void **rsv);
void *osd_get(u_int type, struct osd *osd, u_int slot);
+void *osd_get_unlocked(u_int type, struct osd *osd, u_int slot);
void osd_del(u_int type, struct osd *osd, u_int slot);
int osd_call(u_int type, u_int method, void *obj, void *data);
@@ -79,6 +80,8 @@ void osd_exit(u_int type, struct osd *osd);
osd_set_reserved(OSD_THREAD, &(td)->td_osd, (slot), (rsv), (value))
#define osd_thread_get(td, slot) \
osd_get(OSD_THREAD, &(td)->td_osd, (slot))
+#define osd_thread_get_unlocked(td, slot) \
+ osd_get_unlocked(OSD_THREAD, &(td)->td_osd, (slot))
#define osd_thread_del(td, slot) do { \
KASSERT((td) == curthread, ("Not curthread.")); \
osd_del(OSD_THREAD, &(td)->td_osd, (slot)); \
@@ -98,6 +101,8 @@ void osd_exit(u_int type, struct osd *osd);
osd_set_reserved(OSD_JAIL, &(pr)->pr_osd, (slot), (rsv), (value))
#define osd_jail_get(pr, slot) \
osd_get(OSD_JAIL, &(pr)->pr_osd, (slot))
+#define osd_jail_get_unlocked(pr, slot) \
+ osd_get_unlocked(OSD_JAIL, &(pr)->pr_osd, (slot))
#define osd_jail_del(pr, slot) \
osd_del(OSD_JAIL, &(pr)->pr_osd, (slot))
#define osd_jail_call(pr, method, data) \
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 7a091add62f3..e10b4f506520 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -161,6 +161,7 @@
#include <machine/param.h>
#ifndef _KERNEL
#include <sys/limits.h>
+#include <sys/_maxphys.h>
#endif
#ifndef DEV_BSHIFT
@@ -174,13 +175,6 @@
#ifndef DFLTPHYS
#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
#endif
-#ifndef MAXPHYS /* max raw I/O transfer size */
-#ifdef __ILP32__
-#define MAXPHYS (128 * 1024)
-#else
-#define MAXPHYS (1024 * 1024)
-#endif
-#endif
#ifndef MAXDUMPPGS
#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
#endif
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index 60d8ffc31362..1d691166929f 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -163,30 +163,6 @@ struct protosw {
#define PR_CAPATTACH 0x80 /* socket can attach in cap mode */
#define PR_SOCKBUF 0x100 /* private implementation of buffers */
-/*
- * The arguments to ctloutput are:
- * (*protosw[].pr_ctloutput)(req, so, level, optname, optval, p);
- * req is one of the actions listed below, so is a (struct socket *),
- * level is an indication of which protocol layer the option is intended.
- * optname is a protocol dependent socket option request,
- * optval is a pointer to a mbuf-chain pointer, for value-return results.
- * The protocol is responsible for disposal of the mbuf chain *optval
- * if supplied,
- * the caller is responsible for any space held by *optval, when returned.
- * A non-zero return from ctloutput gives an
- * UNIX error number which should be passed to higher level software.
- */
-#define PRCO_GETOPT 0
-#define PRCO_SETOPT 1
-
-#define PRCO_NCMDS 2
-
-#ifdef PRCOREQUESTS
-char *prcorequests[] = {
- "GETOPT", "SETOPT",
-};
-#endif
-
#ifdef _KERNEL
struct domain *pffinddomain(int family);
struct protosw *pffindproto(int family, int type, int proto);
diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h
index 78572365e158..26e78632fb2c 100644
--- a/sys/sys/reboot.h
+++ b/sys/sys/reboot.h
@@ -60,6 +60,7 @@
#define RB_PAUSE 0x100000 /* pause after each output line during probe */
#define RB_REROOT 0x200000 /* unmount the rootfs and mount it again */
#define RB_POWERCYCLE 0x400000 /* Power cycle if possible */
+#define RB_MUTEMSGS 0x800000 /* start up with console muted after banner */
#define RB_PROBE 0x10000000 /* Probe multiple consoles */
#define RB_MULTIPLE 0x20000000 /* use multiple consoles */
diff --git a/sys/sys/rman.h b/sys/sys/rman.h
index b8b2016cc94a..323da4a62201 100644
--- a/sys/sys/rman.h
+++ b/sys/sys/rman.h
@@ -124,18 +124,18 @@ TAILQ_HEAD(rman_head, rman);
int rman_activate_resource(struct resource *r);
int rman_adjust_resource(struct resource *r, rman_res_t start, rman_res_t end);
int rman_first_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end);
-bus_space_handle_t rman_get_bushandle(struct resource *);
-bus_space_tag_t rman_get_bustag(struct resource *);
-rman_res_t rman_get_end(struct resource *);
-device_t rman_get_device(struct resource *);
-u_int rman_get_flags(struct resource *);
-void *rman_get_irq_cookie(struct resource *);
-void rman_get_mapping(struct resource *, struct resource_map *);
-int rman_get_rid(struct resource *);
-rman_res_t rman_get_size(struct resource *);
-rman_res_t rman_get_start(struct resource *);
-int rman_get_type(struct resource *);
-void *rman_get_virtual(struct resource *);
+bus_space_handle_t rman_get_bushandle(const struct resource *);
+bus_space_tag_t rman_get_bustag(const struct resource *);
+rman_res_t rman_get_end(const struct resource *);
+device_t rman_get_device(const struct resource *);
+u_int rman_get_flags(const struct resource *);
+void *rman_get_irq_cookie(const struct resource *);
+void rman_get_mapping(const struct resource *, struct resource_map *);
+int rman_get_rid(const struct resource *);
+rman_res_t rman_get_size(const struct resource *);
+rman_res_t rman_get_start(const struct resource *);
+int rman_get_type(const struct resource *);
+void *rman_get_virtual(const struct resource *);
int rman_deactivate_resource(struct resource *r);
int rman_fini(struct rman *rm);
int rman_init(struct rman *rm);
@@ -143,14 +143,11 @@ int rman_init_from_resource(struct rman *rm, struct resource *r);
int rman_last_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end);
uint32_t rman_make_alignment_flags(uint32_t size);
int rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end);
-int rman_is_region_manager(struct resource *r, struct rman *rm);
+int rman_is_region_manager(const struct resource *r, const struct rman *rm);
int rman_release_resource(struct resource *r);
struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start,
rman_res_t end, rman_res_t count,
u_int flags, device_t dev);
-struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start,
- rman_res_t end, rman_res_t count, rman_res_t bound,
- u_int flags, device_t dev);
void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h);
void rman_set_bustag(struct resource *_r, bus_space_tag_t _t);
void rman_set_device(struct resource *_r, device_t _dev);
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h
index cbe5bd99c242..fabf4d72740c 100644
--- a/sys/sys/sdt.h
+++ b/sys/sys/sdt.h
@@ -150,36 +150,41 @@ SET_DECLARE(sdt_providers_set, struct sdt_provider);
SET_DECLARE(sdt_probes_set, struct sdt_probe);
SET_DECLARE(sdt_argtypes_set, struct sdt_argtype);
+#define _SDT_PROBE_NAME(prov, mod, func, name) \
+ sdt_##prov##_##mod##_##func##_##name
+#define _SDT_PROVIDER_NAME(prov) \
+ sdt_provider_##prov
+
#define SDT_PROVIDER_DEFINE(_prov) \
- struct sdt_provider sdt_provider_##_prov[1] = { \
+ struct sdt_provider _SDT_PROVIDER_NAME(_prov)[1] = { \
[0] = { .name = #_prov }, \
}; \
- DATA_SET(sdt_providers_set, sdt_provider_##_prov);
+ DATA_SET(sdt_providers_set, _SDT_PROVIDER_NAME(_prov))
-#define SDT_PROVIDER_DECLARE(prov) \
- extern struct sdt_provider sdt_provider_##prov[1]
+#define SDT_PROVIDER_DECLARE(prov) \
+ extern struct sdt_provider _SDT_PROVIDER_NAME(prov)[1]
#define SDT_PROBE_DEFINE(_prov, _mod, _func, _name) \
- struct sdt_probe sdt_##_prov##_##_mod##_##_func##_##_name[1] = {\
+ struct sdt_probe _SDT_PROBE_NAME(_prov, _mod, _func, _name)[1] = { \
[0] = { \
.version = sizeof(struct sdt_probe), \
- .prov = sdt_provider_##_prov, \
+ .prov = _SDT_PROVIDER_NAME(_prov), \
.mod = #_mod, \
.func = #_func, \
.name = #_name, \
}, \
}; \
- DATA_SET(sdt_probes_set, sdt_##_prov##_##_mod##_##_func##_##_name)
+ DATA_SET(sdt_probes_set, _SDT_PROBE_NAME(_prov, _mod, _func, _name))
-#define SDT_PROBE_DECLARE(prov, mod, func, name) \
- extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1]
+#define SDT_PROBE_DECLARE(prov, mod, func, name) \
+ extern struct sdt_probe _SDT_PROBE_NAME(prov, mod, func, name)[1]
#define SDT_PROBES_ENABLED() __predict_false(sdt_probes_enabled)
#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \
if (SDT_PROBES_ENABLED()) { \
- if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \
- (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \
+ if (__predict_false(_SDT_PROBE_NAME(prov, mod, func, name)->id)) \
+ (*sdt_probe_func)(_SDT_PROBE_NAME(prov, mod, func, name)->id, \
(uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \
(uintptr_t) arg3, (uintptr_t) arg4); \
} \
@@ -192,7 +197,7 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype);
.ndx = _num, \
.type = _type, \
.xtype = _xtype, \
- .probe = sdt_##_prov##_##_mod##_##_func##_##_name, \
+ .probe = _SDT_PROBE_NAME(_prov, _mod, _func, _name), \
}, \
}; \
DATA_SET(sdt_argtypes_set, \
@@ -325,21 +330,21 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype);
SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \
do { \
- if (sdt_##prov##_##mod##_##func##_##name->id) \
+ if (_SDT_PROBE_NAME(prov, mod, func, name)->id) \
(*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \
uintptr_t, uintptr_t, uintptr_t))sdt_probe_func)( \
- sdt_##prov##_##mod##_##func##_##name->id, \
+ _SDT_PROBE_NAME(prov, mod, func, name)->id, \
(uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \
(uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\
} while (0)
#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \
arg6) \
do { \
- if (sdt_##prov##_##mod##_##func##_##name->id) \
+ if (_SDT_PROBE_NAME(prov, mod, func, name)->id) \
(*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \
uintptr_t, uintptr_t, uintptr_t, uintptr_t)) \
sdt_probe_func)( \
- sdt_##prov##_##mod##_##func##_##name->id, \
+ _SDT_PROBE_NAME(prov, mod, func, name)->id, \
(uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \
(uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \
(uintptr_t)arg6); \
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index 05b69f64cd05..5634f4b0cfcc 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -142,6 +142,9 @@ extern struct seminfo seminfo;
*/
void semexit(struct proc *p);
+int kern_get_sema(struct thread *td, struct semid_kernel **res,
+ size_t *sz);
+
#else /* !_KERNEL */
__BEGIN_DECLS
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index 0b5cba0120e5..a1aa6ca54c60 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -152,8 +152,14 @@ struct vmspace;
extern struct shminfo shminfo;
+#define SHMSEG_FREE 0x0200
+#define SHMSEG_REMOVED 0x0400
+#define SHMSEG_ALLOCATED 0x0800
+
void shmexit(struct vmspace *);
void shmfork(struct proc *, struct proc *);
+int kern_get_shmsegs(struct thread *td, struct shmid_kernel **res,
+ size_t *sz);
#else /* !_KERNEL */
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index 113b5aaa9fa1..c0b65c0c9ef0 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -372,7 +372,7 @@ struct sigaction {
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */
-#if __XSI_VISIBLE
+#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
#define SA_ONSTACK 0x0001 /* take signal on signal stack */
#define SA_RESTART 0x0002 /* restart system call on signal return */
#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h
index f0e4d352242f..e0e403b1a72a 100644
--- a/sys/sys/sndstat.h
+++ b/sys/sys/sndstat.h
@@ -74,6 +74,11 @@ struct sndstioc_nv_arg {
#define SNDST_DSPS_SOUND4_PVCHAN "pvchan"
#define SNDST_DSPS_SOUND4_RVCHAN "rvchan"
+/*
+ * Maximum user-specified nvlist buffer size
+ */
+#define SNDST_UNVLBUF_MAX 65536
+
#define SNDSTIOC_REFRESH_DEVS \
_IO('D', 100)
#define SNDSTIOC_GET_DEVS \
diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h
index ddd8a51d29a5..b5434b930215 100644
--- a/sys/sys/soundcard.h
+++ b/sys/sys/soundcard.h
@@ -1878,7 +1878,7 @@ typedef struct oss_audioinfo
int card_number;
int port_number;
int mixer_dev;
- int real_device; /* Obsolete field. Replaced by devnode */
+ int legacy_device; /* Obsolete field. Replaced by devnode */
int enabled; /* 1=enabled, 0=device not ready at this
moment */
int flags; /* For internal use only - no practical
@@ -1925,7 +1925,9 @@ typedef struct oss_mixerinfo
* as the default mixer.
*/
int priority;
- int filler[254]; /* Reserved */
+ oss_devnode_t devnode;
+ int legacy_device;
+ int filler[245]; /* Reserved */
} oss_mixerinfo;
typedef struct oss_midi_info
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h
index 6652619287ad..2e0a362f90ad 100644
--- a/sys/sys/syscallsubr.h
+++ b/sys/sys/syscallsubr.h
@@ -49,6 +49,7 @@ struct kevent_copyops;
struct kld_file_stat;
struct ksiginfo;
struct mbuf;
+struct mq_attr;
struct msghdr;
struct msqid_ds;
struct pollfd;
@@ -212,6 +213,15 @@ int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps);
int kern_kldload(struct thread *td, const char *file, int *fileid);
int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat);
int kern_kldunload(struct thread *td, int fileid, int flags);
+int kern_kmq_notify(struct thread *, int, struct sigevent *);
+int kern_kmq_open(struct thread *, const char *, int, mode_t,
+ const struct mq_attr *);
+int kern_kmq_setattr(struct thread *, int, const struct mq_attr *,
+ struct mq_attr *);
+int kern_kmq_timedreceive(struct thread *, int, char *,
+ size_t, unsigned int *, const struct timespec *);
+int kern_kmq_timedsend(struct thread *td, int, const char *,
+ size_t, unsigned int, const struct timespec *);
int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1,
const char *path2, enum uio_seg segflg, int flag);
int kern_listen(struct thread *td, int s, int backlog);
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 987cf995f606..dc926d7a9c9e 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1081,7 +1081,14 @@ vrefcnt(struct vnode *vp)
vref(vp); \
} while (0)
+/*
+ * The caller doesn't know the file size and vnode_create_vobject() should
+ * determine the size on its own.
+ */
+#define VNODE_NO_SIZE ((off_t)-1)
+
int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td);
+int vnode_create_disk_vobject(struct vnode *vp, off_t size, struct thread *td);
void vnode_destroy_vobject(struct vnode *vp);
extern struct vop_vector fifo_specops;
diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c
index e23e12cc8be4..3afbab82cba5 100644
--- a/sys/ufs/ffs/ffs_suspend.c
+++ b/sys/ufs/ffs/ffs_suspend.c
@@ -138,7 +138,8 @@ ffs_susp_rdwr(struct cdev *dev, struct uio *uio, int ioflag)
NOCRED, &bp);
if (error != 0)
goto out;
- if (uio->uio_rw == UIO_WRITE) {
+ switch (uio->uio_rw) {
+ case UIO_WRITE:
error = copyin(base, bp->b_data, len);
if (error != 0) {
bp->b_flags |= B_INVAL | B_NOCACHE;
@@ -148,11 +149,13 @@ ffs_susp_rdwr(struct cdev *dev, struct uio *uio, int ioflag)
error = bwrite(bp);
if (error != 0)
goto out;
- } else {
+ break;
+ case UIO_READ:
error = copyout(bp->b_data, base, len);
brelse(bp);
if (error != 0)
goto out;
+ break;
}
uio->uio_iov[i].iov_base =
(char *)uio->uio_iov[i].iov_base + len;
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index 0b1c5287b884..4f8651411851 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
@@ -115,8 +115,15 @@ cdev_pager_lookup(void *handle)
{
vm_object_t object;
+again:
mtx_lock(&dev_pager_mtx);
object = vm_pager_object_lookup(&dev_pager_object_list, handle);
+ if (object != NULL && object->un_pager.devp.dev == NULL) {
+ msleep(&object->un_pager.devp.dev, &dev_pager_mtx,
+ PVM | PDROP, "cdplkp", 0);
+ vm_object_deallocate(object);
+ goto again;
+ }
mtx_unlock(&dev_pager_mtx);
return (object);
}
@@ -126,9 +133,8 @@ cdev_pager_allocate(void *handle, enum obj_type tp,
const struct cdev_pager_ops *ops, vm_ooffset_t size, vm_prot_t prot,
vm_ooffset_t foff, struct ucred *cred)
{
- vm_object_t object, object1;
+ vm_object_t object;
vm_pindex_t pindex;
- u_short color;
if (tp != OBJT_DEVICE && tp != OBJT_MGTDEVICE)
return (NULL);
@@ -154,16 +160,16 @@ cdev_pager_allocate(void *handle, enum obj_type tp,
pindex < OFF_TO_IDX(size))
return (NULL);
- if (ops->cdev_pg_ctor(handle, size, prot, foff, cred, &color) != 0)
- return (NULL);
+again:
mtx_lock(&dev_pager_mtx);
/*
* Look up pager, creating as necessary.
*/
- object1 = NULL;
object = vm_pager_object_lookup(&dev_pager_object_list, handle);
if (object == NULL) {
+ vm_object_t object1;
+
/*
* Allocate object and associate it with the pager. Initialize
* the object's pg_color based upon the physical address of the
@@ -171,15 +177,19 @@ cdev_pager_allocate(void *handle, enum obj_type tp,
*/
mtx_unlock(&dev_pager_mtx);
object1 = vm_object_allocate(tp, pindex);
- object1->flags |= OBJ_COLORED;
- object1->pg_color = color;
- object1->handle = handle;
- object1->un_pager.devp.ops = ops;
- object1->un_pager.devp.dev = handle;
- TAILQ_INIT(&object1->un_pager.devp.devp_pglist);
mtx_lock(&dev_pager_mtx);
object = vm_pager_object_lookup(&dev_pager_object_list, handle);
if (object != NULL) {
+ object1->type = OBJT_DEAD;
+ vm_object_deallocate(object1);
+ object1 = NULL;
+ if (object->un_pager.devp.dev == NULL) {
+ msleep(&object->un_pager.devp.dev,
+ &dev_pager_mtx, PVM | PDROP, "cdplkp", 0);
+ vm_object_deallocate(object);
+ goto again;
+ }
+
/*
* We raced with other thread while allocating object.
*/
@@ -191,29 +201,51 @@ cdev_pager_allocate(void *handle, enum obj_type tp,
KASSERT(object->un_pager.devp.ops == ops,
("Inconsistent devops %p %p", object, ops));
} else {
+ u_short color;
+
object = object1;
object1 = NULL;
object->handle = handle;
+ object->un_pager.devp.ops = ops;
+ TAILQ_INIT(&object->un_pager.devp.devp_pglist);
TAILQ_INSERT_TAIL(&dev_pager_object_list, object,
pager_object_list);
+ mtx_unlock(&dev_pager_mtx);
if (ops->cdev_pg_populate != NULL)
vm_object_set_flag(object, OBJ_POPULATE);
+ if (ops->cdev_pg_ctor(handle, size, prot, foff,
+ cred, &color) != 0) {
+ mtx_lock(&dev_pager_mtx);
+ TAILQ_REMOVE(&dev_pager_object_list, object,
+ pager_object_list);
+ wakeup(&object->un_pager.devp.dev);
+ mtx_unlock(&dev_pager_mtx);
+ object->type = OBJT_DEAD;
+ vm_object_deallocate(object);
+ object = NULL;
+ mtx_lock(&dev_pager_mtx);
+ } else {
+ mtx_lock(&dev_pager_mtx);
+ object->flags |= OBJ_COLORED;
+ object->pg_color = color;
+ object->un_pager.devp.dev = handle;
+ wakeup(&object->un_pager.devp.dev);
+ }
}
+ MPASS(object1 == NULL);
} else {
+ if (object->un_pager.devp.dev == NULL) {
+ msleep(&object->un_pager.devp.dev,
+ &dev_pager_mtx, PVM | PDROP, "cdplkp", 0);
+ vm_object_deallocate(object);
+ goto again;
+ }
if (pindex > object->size)
object->size = pindex;
KASSERT(object->type == tp,
("Inconsistent device pager type %p %d", object, tp));
}
mtx_unlock(&dev_pager_mtx);
- if (object1 != NULL) {
- object1->handle = object1;
- mtx_lock(&dev_pager_mtx);
- TAILQ_INSERT_TAIL(&dev_pager_object_list, object1,
- pager_object_list);
- mtx_unlock(&dev_pager_mtx);
- vm_object_deallocate(object1);
- }
return (object);
}
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index ee236c7f3988..a07a38481490 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -3158,6 +3158,10 @@ swap_pager_release_writecount(vm_object_t object, vm_offset_t start,
VM_OBJECT_WLOCK(object);
KASSERT((object->flags & OBJ_ANON) == 0,
("Splittable object with writecount"));
+ KASSERT(object->un_pager.swp.writemappings >= (vm_ooffset_t)end - start,
+ ("swap obj %p writecount %jx dec %jx", object,
+ (uintmax_t)object->un_pager.swp.writemappings,
+ (uintmax_t)((vm_ooffset_t)end - start)));
object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start;
VM_OBJECT_WUNLOCK(object);
}
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index d185f12448ee..516ac2c2965a 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1890,8 +1890,7 @@ startup_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag,
pa = VM_PAGE_TO_PHYS(m);
for (i = 0; i < pages; i++, pa += PAGE_SIZE) {
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING
if ((wait & M_NODUMP) == 0)
dump_add_page(pa);
#endif
@@ -1918,8 +1917,7 @@ startup_free(void *mem, vm_size_t bytes)
if (va >= bootstart && va + bytes <= bootmem)
pmap_remove(kernel_pmap, va, va + bytes);
for (; bytes != 0; bytes -= PAGE_SIZE, m++) {
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING
dump_drop_page(VM_PAGE_TO_PHYS(m));
#endif
vm_page_unwire_noq(m);
@@ -2079,6 +2077,28 @@ contig_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag,
bytes, wait, 0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT));
}
+#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC)
+void *
+uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *flags,
+ int wait)
+{
+ vm_page_t m;
+ vm_paddr_t pa;
+ void *va;
+
+ *flags = UMA_SLAB_PRIV;
+ m = vm_page_alloc_noobj_domain(domain,
+ malloc2vm_flags(wait) | VM_ALLOC_WIRED);
+ if (m == NULL)
+ return (NULL);
+ pa = m->phys_addr;
+ if ((wait & M_NODUMP) == 0)
+ dump_add_page(pa);
+ va = (void *)PHYS_TO_DMAP(pa);
+ return (va);
+}
+#endif
+
/*
* Frees a number of pages to the system
*
@@ -2141,6 +2161,21 @@ pcpu_page_free(void *mem, vm_size_t size, uint8_t flags)
kva_free(sva, size);
}
+#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC)
+void
+uma_small_free(void *mem, vm_size_t size, uint8_t flags)
+{
+ vm_page_t m;
+ vm_paddr_t pa;
+
+ pa = DMAP_TO_PHYS((vm_offset_t)mem);
+ dump_drop_page(pa);
+ m = PHYS_TO_VM_PAGE(pa);
+ vm_page_unwire_noq(m);
+ vm_page_free(m);
+}
+#endif
+
/*
* Zero fill initializer
*
@@ -2488,7 +2523,7 @@ keg_ctor(void *mem, int size, void *udata, int flags)
* If we haven't booted yet we need allocations to go through the
* startup cache until the vm is ready.
*/
-#ifdef UMA_MD_SMALL_ALLOC
+#ifdef UMA_USE_DMAP
if (keg->uk_ppera == 1)
keg->uk_allocf = uma_small_alloc;
else
@@ -2501,7 +2536,7 @@ keg_ctor(void *mem, int size, void *udata, int flags)
keg->uk_allocf = contig_alloc;
else
keg->uk_allocf = page_alloc;
-#ifdef UMA_MD_SMALL_ALLOC
+#ifdef UMA_USE_DMAP
if (keg->uk_ppera == 1)
keg->uk_freef = uma_small_free;
else
@@ -3154,7 +3189,7 @@ uma_startup1(vm_offset_t virtual_avail)
smr_init();
}
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
extern void vm_radix_reserve_kva(void);
#endif
@@ -3174,7 +3209,7 @@ uma_startup2(void)
vm_map_unlock(kernel_map);
}
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
/* Set up radix zone to use noobj_alloc. */
vm_radix_reserve_kva();
#endif
@@ -5171,7 +5206,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count)
pages = howmany(count, keg->uk_ipers) * keg->uk_ppera;
-#ifdef UMA_MD_SMALL_ALLOC
+#ifdef UMA_USE_DMAP
if (keg->uk_ppera > 1) {
#else
if (1) {
@@ -5186,7 +5221,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count)
keg->uk_kva = kva;
keg->uk_offset = 0;
zone->uz_max_items = pages * keg->uk_ipers;
-#ifdef UMA_MD_SMALL_ALLOC
+#ifdef UMA_USE_DMAP
keg->uk_allocf = (keg->uk_ppera > 1) ? noobj_alloc : uma_small_alloc;
#else
keg->uk_allocf = noobj_alloc;
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h
index b50abab7380c..8c9addda1196 100644
--- a/sys/vm/vm_extern.h
+++ b/sys/vm/vm_extern.h
@@ -83,8 +83,8 @@ void kmem_init(vm_offset_t, vm_offset_t);
void kmem_init_zero_region(void);
void kmeminit(void);
-int kernacc(void *, int, int);
-int useracc(void *, int, int);
+bool kernacc(void *, int, int);
+bool useracc(void *, int, int);
int vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
int fault_flags, vm_page_t *m_hold);
void vm_fault_copy_entry(vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t,
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index f9235fe03fab..641800413e68 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -122,7 +122,7 @@
* just checking the vm_map_entry is sufficient within the kernel's address
* space.
*/
-int
+bool
kernacc(void *addr, int len, int rw)
{
boolean_t rv;
@@ -134,7 +134,7 @@ kernacc(void *addr, int len, int rw)
if ((vm_offset_t)addr + len > vm_map_max(kernel_map) ||
(vm_offset_t)addr + len < (vm_offset_t)addr)
- return (FALSE);
+ return (false);
prot = rw;
saddr = trunc_page((vm_offset_t)addr);
@@ -154,7 +154,7 @@ kernacc(void *addr, int len, int rw)
* vm_fault_quick(), or copyin()/copout()/su*()/fu*() functions should be
* used in conjunction with this call.
*/
-int
+bool
useracc(void *addr, int len, int rw)
{
boolean_t rv;
@@ -167,7 +167,7 @@ useracc(void *addr, int len, int rw)
map = &curproc->p_vmspace->vm_map;
if ((vm_offset_t)addr + len > vm_map_max(map) ||
(vm_offset_t)addr + len < (vm_offset_t)addr) {
- return (FALSE);
+ return (false);
}
vm_map_lock_read(map);
rv = vm_map_check_protection(map, trunc_page((vm_offset_t)addr),
@@ -630,7 +630,11 @@ vm_thread_stack_back(vm_offset_t ks, vm_page_t ma[], int npages, int req_class,
return (0);
cleanup:
- vm_object_page_remove(obj, pindex, pindex + n, 0);
+ for (int i = 0; i < n; i++) {
+ m = ma[i];
+ (void)vm_page_unwire_noq(m);
+ vm_page_free(m);
+ }
VM_OBJECT_WUNLOCK(obj);
return (ENOMEM);
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 3111dda6e99d..3c7afcb6642f 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -172,7 +172,7 @@ static void vm_map_wire_entry_failure(vm_map_t map, vm_map_entry_t entry,
start = end; \
}
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
/*
* Allocate a new slab for kernel map entries. The kernel map may be locked or
@@ -264,7 +264,7 @@ vm_map_startup(void)
kmapentzone = uma_zcreate("KMAP ENTRY", sizeof(struct vm_map_entry),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR,
UMA_ZONE_VM | UMA_ZONE_NOBUCKET);
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
/* Reserve an extra map entry for use when replenishing the reserve. */
uma_zone_reserve(kmapentzone, KMAPENT_RESERVE + 1);
uma_prealloc(kmapentzone, KMAPENT_RESERVE + 1);
@@ -660,7 +660,7 @@ _vm_map_unlock(vm_map_t map, const char *file, int line)
VM_MAP_UNLOCK_CONSISTENT(map);
if (map->system_map) {
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
if (map == kernel_map && (map->flags & MAP_REPLENISH) != 0) {
uma_prealloc(kmapentzone, 1);
map->flags &= ~MAP_REPLENISH;
@@ -937,7 +937,7 @@ vm_map_entry_create(vm_map_t map)
{
vm_map_entry_t new_entry;
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
if (map == kernel_map) {
VM_MAP_ASSERT_LOCKED(map);
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 4429ec067673..9ba31cb9e1b3 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -620,11 +620,7 @@ vm_page_startup(vm_offset_t vaddr)
vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end,
new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE);
bzero((void *)vm_page_dump, vm_page_dump_size);
-#else
- (void)last_pa;
-#endif
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_STARTUP_PAGE_TRACKING
/*
* Include the UMA bootstrap pages, witness pages and vm_page_dump
* in a crash dump. When pmap_map() uses the direct map, they are
@@ -633,6 +629,9 @@ vm_page_startup(vm_offset_t vaddr)
for (pa = new_end; pa < end; pa += PAGE_SIZE)
dump_add_page(pa);
#endif
+#else
+ (void)last_pa;
+#endif
phys_avail[biggestone + 1] = new_end;
#ifdef __amd64__
/*
@@ -728,8 +727,7 @@ vm_page_startup(vm_offset_t vaddr)
*/
new_end = vm_reserv_startup(&vaddr, new_end);
#endif
-#if defined(__aarch64__) || defined(__amd64__) || \
- defined(__riscv) || defined(__powerpc64__)
+#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING
/*
* Include vm_page_array and vm_reserv_array in a crash dump.
*/
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 8e9555c678c9..61f02eeb2f11 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1451,7 +1451,21 @@ vm_pageout_scan_inactive(struct vm_domain *vmd, int page_shortage)
pq = &vmd->vmd_pagequeues[PQ_INACTIVE];
vm_pagequeue_lock(pq);
vm_pageout_init_scan(&ss, pq, marker, NULL, pq->pq_cnt);
- while (page_shortage > 0 && (m = vm_pageout_next(&ss, true)) != NULL) {
+ while (page_shortage > 0) {
+ /*
+ * If we need to refill the scan batch queue, release any
+ * optimistically held object lock. This gives someone else a
+ * chance to grab the lock, and also avoids holding it while we
+ * do unrelated work.
+ */
+ if (object != NULL && vm_batchqueue_empty(&ss.bq)) {
+ VM_OBJECT_WUNLOCK(object);
+ object = NULL;
+ }
+
+ m = vm_pageout_next(&ss, true);
+ if (m == NULL)
+ break;
KASSERT((m->flags & PG_MARKER) == 0,
("marker page %p was dequeued", m));
diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h
index 1fa80e718b71..7e133ec947b4 100644
--- a/sys/vm/vm_pagequeue.h
+++ b/sys/vm/vm_pagequeue.h
@@ -354,6 +354,12 @@ vm_batchqueue_init(struct vm_batchqueue *bq)
bq->bq_cnt = 0;
}
+static inline bool
+vm_batchqueue_empty(const struct vm_batchqueue *bq)
+{
+ return (bq->bq_cnt == 0);
+}
+
static inline int
vm_batchqueue_insert(struct vm_batchqueue *bq, vm_page_t m)
{
diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c
index 3550d5a6fac1..4da046ece50c 100644
--- a/sys/vm/vm_pager.c
+++ b/sys/vm/vm_pager.c
@@ -470,7 +470,7 @@ pbuf_ctor(void *mem, int size, void *arg, int flags)
bp->b_ioflags = 0;
bp->b_iodone = NULL;
bp->b_error = 0;
- BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL);
+ BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWITNESS, NULL);
return (0);
}
diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c
index cfc5a82eacc8..13f9d36194ab 100644
--- a/sys/vm/vm_radix.c
+++ b/sys/vm/vm_radix.c
@@ -82,7 +82,7 @@ vm_radix_node_free(struct pctrie *ptree, void *node)
uma_zfree_smr(vm_radix_node_zone, node);
}
-#ifndef UMA_MD_SMALL_ALLOC
+#ifndef UMA_USE_DMAP
void vm_radix_reserve_kva(void);
/*
* Reserve the KVA necessary to satisfy the node allocation.
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index d32fec845043..98b905f27c4a 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -146,27 +146,22 @@ vnode_pager_init(void *dummy)
SYSINIT(vnode_pager, SI_SUB_CPU, SI_ORDER_ANY, vnode_pager_init, NULL);
/* Create the VM system backing object for this vnode */
-int
-vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td)
+static int
+vnode_create_vobject_any(struct vnode *vp, off_t isize, struct thread *td)
{
vm_object_t object;
- vm_ooffset_t size = isize;
+ vm_ooffset_t size;
bool last;
- if (!vn_isdisk(vp) && vn_canvmio(vp) == FALSE)
- return (0);
-
object = vp->v_object;
if (object != NULL)
return (0);
- if (size == 0) {
- if (vn_isdisk(vp)) {
- size = IDX_TO_OFF(INT_MAX);
- } else {
- if (vn_getsize_locked(vp, &size, td->td_ucred) != 0)
- return (0);
- }
+ if (isize == VNODE_NO_SIZE) {
+ if (vn_getsize_locked(vp, &size, td->td_ucred) != 0)
+ return (0);
+ } else {
+ size = isize;
}
object = vnode_pager_alloc(vp, size, 0, 0, td->td_ucred);
@@ -182,11 +177,33 @@ vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td)
if (last)
vrele(vp);
- KASSERT(vp->v_object != NULL, ("vnode_create_vobject: NULL object"));
+ VNASSERT(vp->v_object != NULL, vp, ("%s: NULL object", __func__));
return (0);
}
+int
+vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td)
+{
+ VNASSERT(!vn_isdisk(vp), vp, ("%s: disk vnode", __func__));
+ VNASSERT(isize == VNODE_NO_SIZE || isize >= 0, vp,
+ ("%s: invalid size (%jd)", __func__, (intmax_t)isize));
+
+ if (!vn_canvmio(vp))
+ return (0);
+
+ return (vnode_create_vobject_any(vp, isize, td));
+}
+
+int
+vnode_create_disk_vobject(struct vnode *vp, off_t isize, struct thread *td)
+{
+ VNASSERT(isize > 0, vp, ("%s: invalid size (%jd)", __func__,
+ (intmax_t)isize));
+
+ return (vnode_create_vobject_any(vp, isize, td));
+}
+
void
vnode_destroy_vobject(struct vnode *vp)
{
diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c
index adfeed70c5c6..a593028ffb5a 100644
--- a/sys/x86/acpica/madt.c
+++ b/sys/x86/acpica/madt.c
@@ -159,7 +159,8 @@ madt_x2apic_disable_reason(void)
}
if (vm_guest == VM_GUEST_VMWARE) {
- vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p);
+ vmware_hvcall(0, VMW_HVCMD_GETVCPU_INFO,
+ VMW_HVCMD_DEFAULT_PARAM, p);
if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 ||
(p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0)
return ("inside VMWare without intr redirection");
@@ -367,8 +368,8 @@ madt_add_cpu(u_int acpi_id, u_int apic_id, u_int flags)
* MP code figure out which CPU is the BSP on its own.
*/
if (bootverbose)
- printf("MADT: Found CPU APIC ID %u ACPI ID %u: %s\n",
- apic_id, acpi_id, flags & ACPI_MADT_ENABLED ?
+ printf("MADT: Found CPU APIC ID %d ACPI ID %u: %s\n",
+ (int)apic_id, acpi_id, flags & ACPI_MADT_ENABLED ?
"enabled" : "disabled");
if (!(flags & ACPI_MADT_ENABLED))
return;
diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES
index 5042585da310..87a8f8924d12 100644
--- a/sys/x86/conf/NOTES
+++ b/sys/x86/conf/NOTES
@@ -550,6 +550,11 @@ device kvm_clock # KVM paravirtual clock driver
device hyperv # HyperV drivers
device hvhid # HyperV HID device
+# VMware hypervisor support
+device pvscsi # Paravirtual SCSI driver
+device vmci # Virtual Machine Communication Interface (VMCI)
+device vmware_guestrpc # GuestRPC interface
+
#
# Laptop/Notebook options:
#
diff --git a/sys/x86/include/apicvar.h b/sys/x86/include/apicvar.h
index 10016e291b9b..ac6a82659e34 100644
--- a/sys/x86/include/apicvar.h
+++ b/sys/x86/include/apicvar.h
@@ -78,7 +78,12 @@
#define MAX_APIC_ID 0x800
#define APIC_ID_ALL 0xffffffff
-#define IOAPIC_MAX_ID xAPIC_MAX_APIC_ID
+/*
+ * The 0xff ID is used for broadcast IPIs for local APICs when not using
+ * x2APIC. IPIs are not sent to I/O APICs so it's acceptable for an I/O APIC
+ * to use that ID.
+ */
+#define IOAPIC_MAX_ID 0xff
/* I/O Interrupts are used for external devices such as ISA, PCI, etc. */
#define APIC_IO_INTS (IDT_IO_INTS + 16)
diff --git a/sys/x86/include/intr_machdep.h b/sys/x86/include/intr_machdep.h
index 64f0174ea637..d7bfcdc126a9 100644
--- a/sys/x86/include/intr_machdep.h
+++ b/sys/x86/include/intr_machdep.h
@@ -138,12 +138,12 @@ void elcr_write_trigger(u_int irq, enum intr_trigger trigger);
#ifdef SMP
void intr_add_cpu(u_int cpu);
#endif
-int intr_add_handler(const char *name, int vector, driver_filter_t filter,
- driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep,
- int domain);
-int intr_config_intr(int vector, enum intr_trigger trig,
+int intr_add_handler(struct intsrc *isrc, const char *name,
+ driver_filter_t filter, driver_intr_t handler, void *arg,
+ enum intr_type flags, void **cookiep, int domain);
+int intr_config_intr(struct intsrc *isrc, enum intr_trigger trig,
enum intr_polarity pol);
-int intr_describe(u_int vector, void *ih, const char *descr);
+int intr_describe(struct intsrc *isrc, void *ih, const char *descr);
void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
u_int intr_next_cpu(int domain);
struct intsrc *intr_lookup_source(int vector);
diff --git a/sys/x86/include/iommu.h b/sys/x86/include/iommu.h
index a95480b53acc..98c6661aa8e3 100644
--- a/sys/x86/include/iommu.h
+++ b/sys/x86/include/iommu.h
@@ -7,6 +7,7 @@
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
#endif /* !_MACHINE_IOMMU_H_ */
diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h
index 3ea8c988aa07..3115056ce14c 100644
--- a/sys/x86/include/specialreg.h
+++ b/sys/x86/include/specialreg.h
@@ -345,6 +345,13 @@
/* Ecx. */
#define CPUID_PERF_STAT 0x00000001
#define CPUID_PERF_BIAS 0x00000008
+#define CPUID_PERF_TD_CLASSES 0x0000ff00
+
+/* Edx. */
+#define CPUID_HF_PERFORMANCE 0x00000001
+#define CPUID_HF_EFFICIENCY 0x00000002
+#define CPUID_TD_CAPABLITIES 0x0000000f
+#define CPUID_TD_TBLPAGES 0x00000f00
/*
* CPUID instruction 0xb ebx info.
@@ -390,21 +397,31 @@
#define AMDFEID_CLZERO 0x00000001
#define AMDFEID_IRPERF 0x00000002
#define AMDFEID_XSAVEERPTR 0x00000004
+#define AMDFEID_INVLPGB 0x00000008
#define AMDFEID_RDPRU 0x00000010
+#define AMDFEID_BE 0x00000040
#define AMDFEID_MCOMMIT 0x00000100
#define AMDFEID_WBNOINVD 0x00000200
#define AMDFEID_IBPB 0x00001000
+#define AMDFEID_INT_WBINVD 0x00002000
#define AMDFEID_IBRS 0x00004000
#define AMDFEID_STIBP 0x00008000
/* The below are only defined if the corresponding base feature above exists. */
#define AMDFEID_IBRS_ALWAYSON 0x00010000
#define AMDFEID_STIBP_ALWAYSON 0x00020000
#define AMDFEID_PREFER_IBRS 0x00040000
+#define AMDFEID_SAMEMODE_IBRS 0x00080000
+#define AMDFEID_NO_LMSLE 0x00100000
+#define AMDFEID_INVLPGB_NEST 0x00200000
#define AMDFEID_PPIN 0x00800000
#define AMDFEID_SSBD 0x01000000
/* SSBD via MSRC001_011F instead of MSR 0x48: */
#define AMDFEID_VIRT_SSBD 0x02000000
#define AMDFEID_SSB_NO 0x04000000
+#define AMDFEID_CPPC 0x08000000
+#define AMDFEID_PSFD 0x10000000
+#define AMDFEID_BTC_NO 0x20000000
+#define AMDFEID_IBPB_RET 0x40000000
/*
* AMD extended function 8000_0008h ecx info
@@ -414,6 +431,13 @@
#define AMDID_COREID_SIZE_SHIFT 12
/*
+ * AMD extended function 8000_0008h edx info
+ */
+#define AMDID_INVLPGB_MAXCNT 0x0000ffff
+#define AMDID_RDPRU_SHIFT 16
+#define AMDID_RDPRU_ID 0xffff0000
+
+/*
* CPUID instruction 7 Structured Extended Features, leaf 0 ebx info
*/
#define CPUID_STDEXT_FSGSBASE 0x00000001
@@ -583,6 +607,8 @@
#define MSR_TURBO_RATIO_LIMIT 0x1ad
#define MSR_TURBO_RATIO_LIMIT1 0x1ae
#define MSR_IA32_ENERGY_PERF_BIAS 0x1b0
+#define MSR_IA32_PKG_THERM_STATUS 0x1b1
+#define MSR_IA32_PKG_THERM_INTERRUPT 0x1b2
#define MSR_DEBUGCTLMSR 0x1d9
#define MSR_LASTBRANCHFROMIP 0x1db
#define MSR_LASTBRANCHTOIP 0x1dc
@@ -767,6 +793,14 @@
#define TOPA_END (1 << 0)
/*
+ * Intel Hardware Feedback Interface / Thread Director MSRs
+ */
+#define MSR_IA32_HW_FEEDBACK_PTR 0x17d0
+#define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1
+#define MSR_IA32_THREAD_FEEDBACK_CHAR 0x17d2
+#define MSR_IA32_HW_FEEDBACK_THREAD_CONFIG 0x17d4
+
+/*
* Constants related to MSR's.
*/
#define APICBASE_RESERVED 0x000002ff
@@ -836,6 +870,19 @@
/* MSR IA32_ENERGY_PERF_BIAS */
#define IA32_ENERGY_PERF_BIAS_POLICY_HINT_MASK (0xfULL << 0)
+/* MSR IA32_HW_FEEDBACK_PTR */
+#define IA32_HW_FEEDBACK_PTR_ENABLE (0x1ULL << 0)
+
+/* MSR IA32_HW_FEEDBACK_CONFIG */
+#define IA32_HW_FEEDBACK_CONFIG_EN_HFI (0x1ULL << 0)
+#define IA32_HW_FEEDBACK_CONFIG_EN_THDIR (0x1ULL << 1)
+
+/* MSR IA32_PKG_THERM_STATUS */
+#define IA32_PKG_THERM_STATUS_HFI_UPDATED (0x1ULL << 26)
+
+/* MSR IA32_PKG_THERM_INTERRUPT */
+#define IA32_PKG_THERM_INTERRUPT_HFI_ENABLE (0x1ULL << 25)
+
/*
* PAT modes.
*/
diff --git a/sys/x86/include/vmware.h b/sys/x86/include/vmware.h
index 38bca8c146a7..5ab6462b862d 100644
--- a/sys/x86/include/vmware.h
+++ b/sys/x86/include/vmware.h
@@ -31,19 +31,23 @@
#define VMW_HVPORT 0x5658
#define VMW_HVCMD_GETVERSION 10
+#define VMW_HVCMD_GUESTRPC 30
#define VMW_HVCMD_GETHZ 45
#define VMW_HVCMD_GETVCPU_INFO 68
+#define VMW_HVCMD_DEFAULT_PARAM UINT_MAX
+
#define VMW_VCPUINFO_LEGACY_X2APIC (1 << 3)
#define VMW_VCPUINFO_VCPU_RESERVED (1 << 31)
static __inline void
-vmware_hvcall(u_int cmd, u_int *p)
+vmware_hvcall(int chan, u_int cmd, u_int param, u_int *p)
{
__asm __volatile("inl %w3, %0"
: "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
- : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT)
+ : "0" (VMW_HVMAGIC), "1" (param), "2" (cmd),
+ "3" (VMW_HVPORT | (chan << 16))
: "memory");
}
diff --git a/sys/dev/sound/chip.h b/sys/x86/include/vmware_guestrpc.h
index bb40d2809a00..24055b6c249e 100644
--- a/sys/dev/sound/chip.h
+++ b/sys/x86/include/vmware_guestrpc.h
@@ -1,8 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 1999 Seigo Tanimura
- * All rights reserved.
+ * Copyright (c) 2015-2024, Juniper Networks, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,22 +25,13 @@
* SUCH DAMAGE.
*/
-/*
- * These are the function codes assigned to the children of
- * sound cards.
- */
-enum {
- SCF_PCM,
- SCF_MIDI,
- SCF_SYNTH,
-};
+#ifndef _X86_VMWARE_GUESTRPC_H_
+#define _X86_VMWARE_GUESTRPC_H_
-/*
- * This is the device information struct, used by
- * a bridge device to pass the device function code
- * to the children.
- */
-struct sndcard_func {
- int func; /* The function code. */
- void *varinfo; /* Bridge-specific information. */
-};
+struct sbuf;
+
+int vmware_guestrpc_cmd(struct sbuf *sbufp);
+int vmware_guestrpc_set_guestinfo(const char *keyword, const char *val);
+int vmware_guestrpc_get_guestinfo(const char *keyword, struct sbuf *sbufp);
+
+#endif /* _X86_VMWARE_GUESTRPC_H_ */
diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h
index f3677d84570b..f19c557e270b 100644
--- a/sys/x86/include/x86_var.h
+++ b/sys/x86/include/x86_var.h
@@ -57,6 +57,7 @@ extern u_int cpu_max_ext_state_size;
extern u_int cpu_mxcsr_mask;
extern u_int cpu_procinfo;
extern u_int cpu_procinfo2;
+extern u_int cpu_procinfo3;
extern char cpu_vendor[];
extern char cpu_model[];
extern u_int cpu_vendor_id;
diff --git a/sys/x86/include/xen/arch-intr.h b/sys/x86/include/xen/arch-intr.h
index eae3994108cc..5ce0ca06e925 100644
--- a/sys/x86/include/xen/arch-intr.h
+++ b/sys/x86/include/xen/arch-intr.h
@@ -67,7 +67,7 @@ xen_arch_intr_add_handler(const char *name, driver_filter_t filter,
struct xenisrc *isrc, void **cookiep)
{
- return (intr_add_handler(name, isrc->xi_arch.vector, filter, handler,
+ return (intr_add_handler(&isrc->xi_arch.intsrc, name, filter, handler,
arg, flags, cookiep, 0));
}
@@ -75,7 +75,7 @@ static inline int
xen_arch_intr_describe(struct xenisrc *isrc, void *cookie, const char *descr)
{
- return (intr_describe(isrc->xi_arch.vector, cookie, descr));
+ return (intr_describe(&isrc->xi_arch.intsrc, cookie, descr));
}
static inline int
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c
index 49c87cf0b39f..baee0109e5a9 100644
--- a/sys/x86/iommu/intel_ctx.c
+++ b/sys/x86/iommu/intel_ctx.c
@@ -65,6 +65,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
static MALLOC_DEFINE(M_DMAR_CTX, "dmar_ctx", "Intel DMAR Context");
@@ -84,7 +85,7 @@ dmar_ensure_ctx_page(struct dmar_unit *dmar, int bus)
/*
* Allocated context page must be linked.
*/
- ctxm = dmar_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_NOALLOC);
+ ctxm = iommu_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_NOALLOC);
if (ctxm != NULL)
return;
@@ -95,14 +96,14 @@ dmar_ensure_ctx_page(struct dmar_unit *dmar, int bus)
* threads are equal.
*/
TD_PREP_PINNED_ASSERT;
- ctxm = dmar_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_ZERO |
+ ctxm = iommu_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_ZERO |
IOMMU_PGF_WAITOK);
- re = dmar_map_pgtbl(dmar->ctx_obj, 0, IOMMU_PGF_NOALLOC, &sf);
+ re = iommu_map_pgtbl(dmar->ctx_obj, 0, IOMMU_PGF_NOALLOC, &sf);
re += bus;
dmar_pte_store(&re->r1, DMAR_ROOT_R1_P | (DMAR_ROOT_R1_CTP_MASK &
VM_PAGE_TO_PHYS(ctxm)));
dmar_flush_root_to_ram(dmar, re);
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
TD_PINNED_ASSERT;
}
@@ -114,7 +115,7 @@ dmar_map_ctx_entry(struct dmar_ctx *ctx, struct sf_buf **sfp)
dmar = CTX2DMAR(ctx);
- ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid),
+ ctxp = iommu_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid),
IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp);
ctxp += ctx->context.rid & 0xff;
return (ctxp);
@@ -186,7 +187,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry_t *ctxp, bool move,
("ctx %p non-null pgtbl_obj", ctx));
ctx_root = NULL;
} else {
- ctx_root = dmar_pgalloc(domain->pgtbl_obj, 0,
+ ctx_root = iommu_pgalloc(domain->pgtbl_obj, 0,
IOMMU_PGF_NOALLOC);
}
@@ -272,7 +273,7 @@ domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus,
"region (%jx, %jx) corrected\n",
domain->iodom.iommu->unit, start, end);
}
- entry->end += DMAR_PAGE_SIZE * 0x20;
+ entry->end += IOMMU_PAGE_SIZE * 0x20;
}
size = OFF_TO_IDX(entry->end - entry->start);
ma = malloc(sizeof(vm_page_t) * size, M_TEMP, M_WAITOK);
@@ -601,9 +602,9 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid,
func, rid, domain->domain, domain->mgaw,
domain->agaw, id_mapped ? "id" : "re");
}
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
} else {
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
dmar_domain_destroy(domain1);
/* Nothing needs to be done to destroy ctx1. */
free(ctx1, M_DMAR_CTX);
@@ -703,7 +704,7 @@ dmar_move_ctx_to_domain(struct dmar_domain *domain, struct dmar_ctx *ctx)
ctx->context.domain = &domain->iodom;
dmar_ctx_link(ctx);
ctx_id_entry_init(ctx, ctxp, true, PCI_BUSMAX + 100);
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
error = dmar_flush_for_ctx_entry(dmar, true);
/* If flush failed, rolling back would not work as well. */
printf("dmar%d rid %x domain %d->%d %s-mapped\n",
@@ -787,7 +788,7 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx)
if (ctx->refs > 1) {
ctx->refs--;
DMAR_UNLOCK(dmar);
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
TD_PINNED_ASSERT;
return;
}
@@ -809,7 +810,7 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx)
else
dmar_inv_iotlb_glob(dmar);
}
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
domain = CTX2DOM(ctx);
dmar_ctx_unlink(ctx);
free(ctx->context.tag, M_DMAR_CTX);
diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h
index e20144094c80..8289478aed19 100644
--- a/sys/x86/iommu/intel_dmar.h
+++ b/sys/x86/iommu/intel_dmar.h
@@ -238,16 +238,11 @@ iommu_gaddr_t pglvl_page_size(int total_pglvl, int lvl);
iommu_gaddr_t domain_page_size(struct dmar_domain *domain, int lvl);
int calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size,
iommu_gaddr_t *isizep);
-struct vm_page *dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags);
-void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags);
-void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags,
- struct sf_buf **sf);
-void dmar_unmap_pgtbl(struct sf_buf *sf);
int dmar_load_root_entry_ptr(struct dmar_unit *unit);
int dmar_inv_ctx_glob(struct dmar_unit *unit);
int dmar_inv_iotlb_glob(struct dmar_unit *unit);
int dmar_flush_write_bufs(struct dmar_unit *unit);
-void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst);
+void dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst);
void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst);
void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst);
int dmar_disable_protected_regions(struct dmar_unit *unit);
@@ -315,9 +310,7 @@ void dmar_quirks_pre_use(struct iommu_unit *dmar);
int dmar_init_irt(struct dmar_unit *unit);
void dmar_fini_irt(struct dmar_unit *unit);
-extern iommu_haddr_t dmar_high;
extern int haw;
-extern int dmar_tbl_pagecnt;
extern int dmar_batch_coalesce;
extern int dmar_rmrr_enable;
diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c
index 7346162d1502..9a2fedf90b6a 100644
--- a/sys/x86/iommu/intel_drv.c
+++ b/sys/x86/iommu/intel_drv.c
@@ -67,6 +67,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
#ifdef DEV_APIC
@@ -179,9 +180,9 @@ dmar_identify(driver_t *driver, device_t parent)
return;
haw = dmartbl->Width + 1;
if ((1ULL << (haw + 1)) > BUS_SPACE_MAXADDR)
- dmar_high = BUS_SPACE_MAXADDR;
+ iommu_high = BUS_SPACE_MAXADDR;
else
- dmar_high = 1ULL << (haw + 1);
+ iommu_high = 1ULL << (haw + 1);
if (bootverbose) {
printf("DMAR HAW=%d flags=<%b>\n", dmartbl->Width,
(unsigned)dmartbl->Flags,
@@ -490,7 +491,7 @@ dmar_attach(device_t dev)
* address translation after the required invalidations are
* done.
*/
- dmar_pgalloc(unit->ctx_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO);
+ iommu_pgalloc(unit->ctx_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO);
DMAR_LOCK(unit);
error = dmar_load_root_entry_ptr(unit);
if (error != 0) {
diff --git a/sys/x86/iommu/intel_fault.c b/sys/x86/iommu/intel_fault.c
index e275304c8d51..59b482720cf1 100644
--- a/sys/x86/iommu/intel_fault.c
+++ b/sys/x86/iommu/intel_fault.c
@@ -54,6 +54,7 @@
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
#include <dev/iommu/busdma_iommu.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
/*
diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c
index 929f8656d1eb..157afaec75ef 100644
--- a/sys/x86/iommu/intel_idpgtbl.c
+++ b/sys/x86/iommu/intel_idpgtbl.c
@@ -63,6 +63,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
static int domain_unmap_buf_locked(struct dmar_domain *domain,
@@ -108,7 +109,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx,
iommu_gaddr_t addr)
{
vm_page_t m1;
- dmar_pte_t *pte;
+ iommu_pte_t *pte;
struct sf_buf *sf;
iommu_gaddr_t f, pg_sz;
vm_pindex_t base;
@@ -117,28 +118,28 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx,
VM_OBJECT_ASSERT_LOCKED(tbl->pgtbl_obj);
if (addr >= tbl->maxaddr)
return;
- (void)dmar_pgalloc(tbl->pgtbl_obj, idx, IOMMU_PGF_OBJL |
+ (void)iommu_pgalloc(tbl->pgtbl_obj, idx, IOMMU_PGF_OBJL |
IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO);
- base = idx * DMAR_NPTEPG + 1; /* Index of the first child page of idx */
+ base = idx * IOMMU_NPTEPG + 1; /* Index of the first child page of idx */
pg_sz = pglvl_page_size(tbl->pglvl, lvl);
if (lvl != tbl->leaf) {
- for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz)
+ for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz)
domain_idmap_nextlvl(tbl, lvl + 1, base + i, f);
}
VM_OBJECT_WUNLOCK(tbl->pgtbl_obj);
- pte = dmar_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf);
+ pte = iommu_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf);
if (lvl == tbl->leaf) {
- for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) {
+ for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) {
if (f >= tbl->maxaddr)
break;
pte[i].pte = (DMAR_PTE_ADDR_MASK & f) |
DMAR_PTE_R | DMAR_PTE_W;
}
} else {
- for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) {
+ for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) {
if (f >= tbl->maxaddr)
break;
- m1 = dmar_pgalloc(tbl->pgtbl_obj, base + i,
+ m1 = iommu_pgalloc(tbl->pgtbl_obj, base + i,
IOMMU_PGF_NOALLOC);
KASSERT(m1 != NULL, ("lost page table page"));
pte[i].pte = (DMAR_PTE_ADDR_MASK &
@@ -146,7 +147,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx,
}
}
/* domain_get_idmap_pgtbl flushes CPU cache if needed. */
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
VM_OBJECT_WLOCK(tbl->pgtbl_obj);
}
@@ -300,7 +301,7 @@ put_idmap_pgtbl(vm_object_t obj)
rmobj = tbl->pgtbl_obj;
if (rmobj->ref_count == 1) {
LIST_REMOVE(tbl, link);
- atomic_subtract_int(&dmar_tbl_pagecnt,
+ atomic_subtract_int(&iommu_tbl_pagecnt,
rmobj->resident_page_count);
vm_object_deallocate(rmobj);
free(tbl, M_DMAR_IDPGTBL);
@@ -322,9 +323,9 @@ static int
domain_pgtbl_pte_off(struct dmar_domain *domain, iommu_gaddr_t base, int lvl)
{
- base >>= DMAR_PAGE_SHIFT + (domain->pglvl - lvl - 1) *
- DMAR_NPTEPGSHIFT;
- return (base & DMAR_PTEMASK);
+ base >>= IOMMU_PAGE_SHIFT + (domain->pglvl - lvl - 1) *
+ IOMMU_NPTEPGSHIFT;
+ return (base & IOMMU_PTEMASK);
}
/*
@@ -343,18 +344,18 @@ domain_pgtbl_get_pindex(struct dmar_domain *domain, iommu_gaddr_t base, int lvl)
for (pidx = idx = 0, i = 0; i < lvl; i++, pidx = idx) {
idx = domain_pgtbl_pte_off(domain, base, i) +
- pidx * DMAR_NPTEPG + 1;
+ pidx * IOMMU_NPTEPG + 1;
}
return (idx);
}
-static dmar_pte_t *
+static iommu_pte_t *
domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
int flags, vm_pindex_t *idxp, struct sf_buf **sf)
{
vm_page_t m;
struct sf_buf *sfp;
- dmar_pte_t *pte, *ptep;
+ iommu_pte_t *pte, *ptep;
vm_pindex_t idx, idx1;
DMAR_DOMAIN_ASSERT_PGLOCKED(domain);
@@ -362,13 +363,13 @@ domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
idx = domain_pgtbl_get_pindex(domain, base, lvl);
if (*sf != NULL && idx == *idxp) {
- pte = (dmar_pte_t *)sf_buf_kva(*sf);
+ pte = (iommu_pte_t *)sf_buf_kva(*sf);
} else {
if (*sf != NULL)
- dmar_unmap_pgtbl(*sf);
+ iommu_unmap_pgtbl(*sf);
*idxp = idx;
retry:
- pte = dmar_map_pgtbl(domain->pgtbl_obj, idx, flags, sf);
+ pte = iommu_map_pgtbl(domain->pgtbl_obj, idx, flags, sf);
if (pte == NULL) {
KASSERT(lvl > 0,
("lost root page table page %p", domain));
@@ -377,7 +378,7 @@ retry:
* it and create a pte in the preceeding page level
* to reference the allocated page table page.
*/
- m = dmar_pgalloc(domain->pgtbl_obj, idx, flags |
+ m = iommu_pgalloc(domain->pgtbl_obj, idx, flags |
IOMMU_PGF_ZERO);
if (m == NULL)
return (NULL);
@@ -398,7 +399,7 @@ retry:
KASSERT(m->pindex != 0,
("loosing root page %p", domain));
m->ref_count--;
- dmar_pgfree(domain->pgtbl_obj, m->pindex,
+ iommu_pgfree(domain->pgtbl_obj, m->pindex,
flags);
return (NULL);
}
@@ -407,7 +408,7 @@ retry:
dmar_flush_pte_to_ram(domain->dmar, ptep);
sf_buf_page(sfp)->ref_count += 1;
m->ref_count--;
- dmar_unmap_pgtbl(sfp);
+ iommu_unmap_pgtbl(sfp);
/* Only executed once. */
goto retry;
}
@@ -420,7 +421,7 @@ static int
domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags)
{
- dmar_pte_t *pte;
+ iommu_pte_t *pte;
struct sf_buf *sf;
iommu_gaddr_t pg_sz, base1;
vm_pindex_t pi, c, idx, run_sz;
@@ -437,7 +438,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
pi += run_sz) {
for (lvl = 0, c = 0, superpage = false;; lvl++) {
pg_sz = domain_page_size(domain, lvl);
- run_sz = pg_sz >> DMAR_PAGE_SHIFT;
+ run_sz = pg_sz >> IOMMU_PAGE_SHIFT;
if (lvl == domain->pglvl - 1)
break;
/*
@@ -476,7 +477,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
KASSERT((flags & IOMMU_PGF_WAITOK) == 0,
("failed waitable pte alloc %p", domain));
if (sf != NULL)
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
domain_unmap_buf_locked(domain, base1, base - base1,
flags);
TD_PINNED_ASSERT;
@@ -488,7 +489,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
sf_buf_page(sf)->ref_count += 1;
}
if (sf != NULL)
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
TD_PINNED_ASSERT;
return (0);
}
@@ -512,10 +513,10 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base,
KASSERT((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) == 0,
("modifying idmap pagetable domain %p", domain));
- KASSERT((base & DMAR_PAGE_MASK) == 0,
+ KASSERT((base & IOMMU_PAGE_MASK) == 0,
("non-aligned base %p %jx %jx", domain, (uintmax_t)base,
(uintmax_t)size));
- KASSERT((size & DMAR_PAGE_MASK) == 0,
+ KASSERT((size & IOMMU_PAGE_MASK) == 0,
("non-aligned size %p %jx %jx", domain, (uintmax_t)base,
(uintmax_t)size));
KASSERT(size > 0, ("zero size %p %jx %jx", domain, (uintmax_t)base,
@@ -562,7 +563,7 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base,
}
static void domain_unmap_clear_pte(struct dmar_domain *domain,
- iommu_gaddr_t base, int lvl, int flags, dmar_pte_t *pte,
+ iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte,
struct sf_buf **sf, bool free_fs);
static void
@@ -570,7 +571,7 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base,
int lvl, int flags)
{
struct sf_buf *sf;
- dmar_pte_t *pde;
+ iommu_pte_t *pde;
vm_pindex_t idx;
sf = NULL;
@@ -580,7 +581,7 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base,
static void
domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
- int flags, dmar_pte_t *pte, struct sf_buf **sf, bool free_sf)
+ int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf)
{
vm_page_t m;
@@ -588,7 +589,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
dmar_flush_pte_to_ram(domain->dmar, pte);
m = sf_buf_page(*sf);
if (free_sf) {
- dmar_unmap_pgtbl(*sf);
+ iommu_unmap_pgtbl(*sf);
*sf = NULL;
}
m->ref_count--;
@@ -600,7 +601,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
KASSERT(m->pindex != 0,
("lost reference (idx) on root pg domain %p base %jx lvl %d",
domain, (uintmax_t)base, lvl));
- dmar_pgfree(domain->pgtbl_obj, m->pindex, flags);
+ iommu_pgfree(domain->pgtbl_obj, m->pindex, flags);
domain_free_pgtbl_pde(domain, base, lvl - 1, flags);
}
@@ -611,7 +612,7 @@ static int
domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, int flags)
{
- dmar_pte_t *pte;
+ iommu_pte_t *pte;
struct sf_buf *sf;
vm_pindex_t idx;
iommu_gaddr_t pg_sz;
@@ -623,10 +624,10 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
KASSERT((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) == 0,
("modifying idmap pagetable domain %p", domain));
- KASSERT((base & DMAR_PAGE_MASK) == 0,
+ KASSERT((base & IOMMU_PAGE_MASK) == 0,
("non-aligned base %p %jx %jx", domain, (uintmax_t)base,
(uintmax_t)size));
- KASSERT((size & DMAR_PAGE_MASK) == 0,
+ KASSERT((size & IOMMU_PAGE_MASK) == 0,
("non-aligned size %p %jx %jx", domain, (uintmax_t)base,
(uintmax_t)size));
KASSERT(base < (1ULL << domain->agaw),
@@ -669,7 +670,7 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
(uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz));
}
if (sf != NULL)
- dmar_unmap_pgtbl(sf);
+ iommu_unmap_pgtbl(sf);
/*
* See 11.1 Write Buffer Flushing for an explanation why RWBF
* can be ignored there.
@@ -705,7 +706,7 @@ domain_alloc_pgtbl(struct dmar_domain *domain)
domain->pgtbl_obj = vm_pager_allocate(OBJT_PHYS, NULL,
IDX_TO_OFF(pglvl_max_pages(domain->pglvl)), 0, 0, NULL);
DMAR_DOMAIN_PGLOCK(domain);
- m = dmar_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK |
+ m = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK |
IOMMU_PGF_ZERO | IOMMU_PGF_OBJL);
/* No implicit free of the top level page table page. */
m->ref_count = 1;
diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c
index 09271a6f6cc9..035de24a2d4e 100644
--- a/sys/x86/iommu/intel_intrmap.c
+++ b/sys/x86/iommu/intel_intrmap.c
@@ -54,6 +54,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
#include <x86/iommu/iommu_intrmap.h>
@@ -340,7 +341,7 @@ dmar_init_irt(struct dmar_unit *unit)
}
unit->irte_cnt = clp2(num_io_irqs);
unit->irt = kmem_alloc_contig(unit->irte_cnt * sizeof(dmar_irte_t),
- M_ZERO | M_WAITOK, 0, dmar_high, PAGE_SIZE, 0,
+ M_ZERO | M_WAITOK, 0, iommu_high, PAGE_SIZE, 0,
DMAR_IS_COHERENT(unit) ?
VM_MEMATTR_DEFAULT : VM_MEMATTR_UNCACHEABLE);
if (unit->irt == NULL)
diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c
index 37e2bf211e32..590cbac9bcbd 100644
--- a/sys/x86/iommu/intel_qi.c
+++ b/sys/x86/iommu/intel_qi.c
@@ -55,6 +55,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
static bool
@@ -501,7 +502,7 @@ dmar_init_qi(struct dmar_unit *unit)
/* The invalidation queue reads by DMARs are always coherent. */
unit->inv_queue = kmem_alloc_contig(unit->inv_queue_size, M_WAITOK |
- M_ZERO, 0, dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT);
+ M_ZERO, 0, iommu_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT);
unit->inv_waitd_seq_hw_phys = pmap_kextract(
(vm_offset_t)&unit->inv_waitd_seq_hw);
diff --git a/sys/x86/iommu/intel_quirks.c b/sys/x86/iommu/intel_quirks.c
index cccb503b6047..fd5c522d588d 100644
--- a/sys/x86/iommu/intel_quirks.c
+++ b/sys/x86/iommu/intel_quirks.c
@@ -58,6 +58,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
typedef void (*dmar_quirk_cpu_fun)(struct dmar_unit *);
diff --git a/sys/x86/iommu/intel_reg.h b/sys/x86/iommu/intel_reg.h
index 26a18ff94890..0fafcce7accf 100644
--- a/sys/x86/iommu/intel_reg.h
+++ b/sys/x86/iommu/intel_reg.h
@@ -31,16 +31,6 @@
#ifndef __X86_IOMMU_INTEL_REG_H
#define __X86_IOMMU_INTEL_REG_H
-#define DMAR_PAGE_SIZE PAGE_SIZE
-#define DMAR_PAGE_MASK (DMAR_PAGE_SIZE - 1)
-#define DMAR_PAGE_SHIFT PAGE_SHIFT
-#define DMAR_NPTEPG (DMAR_PAGE_SIZE / sizeof(dmar_pte_t))
-#define DMAR_NPTEPGSHIFT 9
-#define DMAR_PTEMASK (DMAR_NPTEPG - 1)
-
-#define IOMMU_PAGE_SIZE DMAR_PAGE_SIZE
-#define IOMMU_PAGE_MASK DMAR_PAGE_MASK
-
typedef struct dmar_root_entry {
uint64_t r1;
uint64_t r2;
@@ -49,7 +39,7 @@ typedef struct dmar_root_entry {
#define DMAR_ROOT_R1_CTP_MASK 0xfffffffffffff000 /* Mask for Context-Entry
Table Pointer */
-#define DMAR_CTX_CNT (DMAR_PAGE_SIZE / sizeof(dmar_root_entry_t))
+#define DMAR_CTX_CNT (IOMMU_PAGE_SIZE / sizeof(dmar_root_entry_t))
typedef struct dmar_ctx_entry {
uint64_t ctx1;
@@ -73,9 +63,6 @@ typedef struct dmar_ctx_entry {
#define DMAR_CTX2_DID(x) ((x) << 8) /* Domain Identifier */
#define DMAR_CTX2_GET_DID(ctx2) (((ctx2) & DMAR_CTX2_DID_MASK) >> 8)
-typedef struct dmar_pte {
- uint64_t pte;
-} dmar_pte_t;
#define DMAR_PTE_R 1 /* Read */
#define DMAR_PTE_W (1 << 1) /* Write */
#define DMAR_PTE_SP (1 << 7) /* Super Page */
diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c
index 4d680cc7d9e8..356b8d5e6436 100644
--- a/sys/x86/iommu/intel_utils.c
+++ b/sys/x86/iommu/intel_utils.c
@@ -63,6 +63,7 @@
#include <x86/include/busdma_impl.h>
#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/x86_iommu.h>
#include <x86/iommu/intel_dmar.h>
u_int
@@ -182,7 +183,7 @@ pglvl_max_pages(int pglvl)
int i;
for (res = 0, i = pglvl; i > 0; i--) {
- res *= DMAR_NPTEPG;
+ res *= IOMMU_NPTEPG;
res++;
}
return (res);
@@ -213,12 +214,12 @@ pglvl_page_size(int total_pglvl, int lvl)
{
int rlvl;
static const iommu_gaddr_t pg_sz[] = {
- (iommu_gaddr_t)DMAR_PAGE_SIZE,
- (iommu_gaddr_t)DMAR_PAGE_SIZE << DMAR_NPTEPGSHIFT,
- (iommu_gaddr_t)DMAR_PAGE_SIZE << (2 * DMAR_NPTEPGSHIFT),
- (iommu_gaddr_t)DMAR_PAGE_SIZE << (3 * DMAR_NPTEPGSHIFT),
- (iommu_gaddr_t)DMAR_PAGE_SIZE << (4 * DMAR_NPTEPGSHIFT),
- (iommu_gaddr_t)DMAR_PAGE_SIZE << (5 * DMAR_NPTEPGSHIFT)
+ (iommu_gaddr_t)IOMMU_PAGE_SIZE,
+ (iommu_gaddr_t)IOMMU_PAGE_SIZE << IOMMU_NPTEPGSHIFT,
+ (iommu_gaddr_t)IOMMU_PAGE_SIZE << (2 * IOMMU_NPTEPGSHIFT),
+ (iommu_gaddr_t)IOMMU_PAGE_SIZE << (3 * IOMMU_NPTEPGSHIFT),
+ (iommu_gaddr_t)IOMMU_PAGE_SIZE << (4 * IOMMU_NPTEPGSHIFT),
+ (iommu_gaddr_t)IOMMU_PAGE_SIZE << (5 * IOMMU_NPTEPGSHIFT),
};
KASSERT(lvl >= 0 && lvl < total_pglvl,
@@ -243,7 +244,7 @@ calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size,
int am;
for (am = DMAR_CAP_MAMV(unit->hw_cap);; am--) {
- isize = 1ULL << (am + DMAR_PAGE_SHIFT);
+ isize = 1ULL << (am + IOMMU_PAGE_SHIFT);
if ((base & (isize - 1)) == 0 && size >= isize)
break;
if (am == 0)
@@ -253,113 +254,9 @@ calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size,
return (am);
}
-iommu_haddr_t dmar_high;
int haw;
int dmar_tbl_pagecnt;
-vm_page_t
-dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags)
-{
- vm_page_t m;
- int zeroed, aflags;
-
- zeroed = (flags & IOMMU_PGF_ZERO) != 0 ? VM_ALLOC_ZERO : 0;
- aflags = zeroed | VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_NODUMP |
- ((flags & IOMMU_PGF_WAITOK) != 0 ? VM_ALLOC_WAITFAIL :
- VM_ALLOC_NOWAIT);
- for (;;) {
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WLOCK(obj);
- m = vm_page_lookup(obj, idx);
- if ((flags & IOMMU_PGF_NOALLOC) != 0 || m != NULL) {
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WUNLOCK(obj);
- break;
- }
- m = vm_page_alloc_contig(obj, idx, aflags, 1, 0,
- dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT);
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WUNLOCK(obj);
- if (m != NULL) {
- if (zeroed && (m->flags & PG_ZERO) == 0)
- pmap_zero_page(m);
- atomic_add_int(&dmar_tbl_pagecnt, 1);
- break;
- }
- if ((flags & IOMMU_PGF_WAITOK) == 0)
- break;
- }
- return (m);
-}
-
-void
-dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags)
-{
- vm_page_t m;
-
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WLOCK(obj);
- m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT);
- if (m != NULL) {
- vm_page_free(m);
- atomic_subtract_int(&dmar_tbl_pagecnt, 1);
- }
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WUNLOCK(obj);
-}
-
-void *
-dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags,
- struct sf_buf **sf)
-{
- vm_page_t m;
- bool allocated;
-
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WLOCK(obj);
- m = vm_page_lookup(obj, idx);
- if (m == NULL && (flags & IOMMU_PGF_ALLOC) != 0) {
- m = dmar_pgalloc(obj, idx, flags | IOMMU_PGF_OBJL);
- allocated = true;
- } else
- allocated = false;
- if (m == NULL) {
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WUNLOCK(obj);
- return (NULL);
- }
- /* Sleepable allocations cannot fail. */
- if ((flags & IOMMU_PGF_WAITOK) != 0)
- VM_OBJECT_WUNLOCK(obj);
- sched_pin();
- *sf = sf_buf_alloc(m, SFB_CPUPRIVATE | ((flags & IOMMU_PGF_WAITOK)
- == 0 ? SFB_NOWAIT : 0));
- if (*sf == NULL) {
- sched_unpin();
- if (allocated) {
- VM_OBJECT_ASSERT_WLOCKED(obj);
- dmar_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL);
- }
- if ((flags & IOMMU_PGF_OBJL) == 0)
- VM_OBJECT_WUNLOCK(obj);
- return (NULL);
- }
- if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) ==
- (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL))
- VM_OBJECT_WLOCK(obj);
- else if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == 0)
- VM_OBJECT_WUNLOCK(obj);
- return ((void *)sf_buf_kva(*sf));
-}
-
-void
-dmar_unmap_pgtbl(struct sf_buf *sf)
-{
-
- sf_buf_free(sf);
- sched_unpin();
-}
-
static void
dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz)
{
@@ -374,7 +271,7 @@ dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz)
}
void
-dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst)
+dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst)
{
dmar_flush_transl_to_ram(unit, dst, sizeof(*dst));
@@ -686,11 +583,6 @@ dmar_timeout_sysctl(SYSCTL_HANDLER_ARGS)
return (error);
}
-static SYSCTL_NODE(_hw_iommu, OID_AUTO, dmar, CTLFLAG_RD | CTLFLAG_MPSAFE,
- NULL, "");
-SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD,
- &dmar_tbl_pagecnt, 0,
- "Count of pages used for DMAR pagetables");
SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, batch_coalesce, CTLFLAG_RWTUN,
&dmar_batch_coalesce, 0,
"Number of qi batches between interrupt");
diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c
new file mode 100644
index 000000000000..ffea1cc1a190
--- /dev/null
+++ b/sys/x86/iommu/iommu_utils.c
@@ -0,0 +1,164 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2013, 2014 The FreeBSD Foundation
+ *
+ * This software was developed by Konstantin Belousov <kib@FreeBSD.org>
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/systm.h>
+#include <sys/lock.h>
+#include <sys/memdesc.h>
+#include <sys/mutex.h>
+#include <sys/sf_buf.h>
+#include <sys/sysctl.h>
+#include <sys/proc.h>
+#include <sys/sched.h>
+#include <sys/rwlock.h>
+#include <sys/taskqueue.h>
+#include <sys/tree.h>
+#include <vm/vm.h>
+#include <vm/vm_page.h>
+#include <vm/vm_object.h>
+#include <dev/pci/pcireg.h>
+#include <machine/atomic.h>
+#include <machine/bus.h>
+#include <machine/cpu.h>
+#include <x86/include/busdma_impl.h>
+#include <dev/iommu/busdma_iommu.h>
+#include <dev/iommu/iommu.h>
+#include <x86/iommu/x86_iommu.h>
+
+vm_page_t
+iommu_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags)
+{
+ vm_page_t m;
+ int zeroed, aflags;
+
+ zeroed = (flags & IOMMU_PGF_ZERO) != 0 ? VM_ALLOC_ZERO : 0;
+ aflags = zeroed | VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_NODUMP |
+ ((flags & IOMMU_PGF_WAITOK) != 0 ? VM_ALLOC_WAITFAIL :
+ VM_ALLOC_NOWAIT);
+ for (;;) {
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WLOCK(obj);
+ m = vm_page_lookup(obj, idx);
+ if ((flags & IOMMU_PGF_NOALLOC) != 0 || m != NULL) {
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WUNLOCK(obj);
+ break;
+ }
+ m = vm_page_alloc_contig(obj, idx, aflags, 1, 0,
+ iommu_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT);
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WUNLOCK(obj);
+ if (m != NULL) {
+ if (zeroed && (m->flags & PG_ZERO) == 0)
+ pmap_zero_page(m);
+ atomic_add_int(&iommu_tbl_pagecnt, 1);
+ break;
+ }
+ if ((flags & IOMMU_PGF_WAITOK) == 0)
+ break;
+ }
+ return (m);
+}
+
+void
+iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags)
+{
+ vm_page_t m;
+
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WLOCK(obj);
+ m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT);
+ if (m != NULL) {
+ vm_page_free(m);
+ atomic_subtract_int(&iommu_tbl_pagecnt, 1);
+ }
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WUNLOCK(obj);
+}
+
+void *
+iommu_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags,
+ struct sf_buf **sf)
+{
+ vm_page_t m;
+ bool allocated;
+
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WLOCK(obj);
+ m = vm_page_lookup(obj, idx);
+ if (m == NULL && (flags & IOMMU_PGF_ALLOC) != 0) {
+ m = iommu_pgalloc(obj, idx, flags | IOMMU_PGF_OBJL);
+ allocated = true;
+ } else
+ allocated = false;
+ if (m == NULL) {
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WUNLOCK(obj);
+ return (NULL);
+ }
+ /* Sleepable allocations cannot fail. */
+ if ((flags & IOMMU_PGF_WAITOK) != 0)
+ VM_OBJECT_WUNLOCK(obj);
+ sched_pin();
+ *sf = sf_buf_alloc(m, SFB_CPUPRIVATE | ((flags & IOMMU_PGF_WAITOK)
+ == 0 ? SFB_NOWAIT : 0));
+ if (*sf == NULL) {
+ sched_unpin();
+ if (allocated) {
+ VM_OBJECT_ASSERT_WLOCKED(obj);
+ iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL);
+ }
+ if ((flags & IOMMU_PGF_OBJL) == 0)
+ VM_OBJECT_WUNLOCK(obj);
+ return (NULL);
+ }
+ if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) ==
+ (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL))
+ VM_OBJECT_WLOCK(obj);
+ else if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == 0)
+ VM_OBJECT_WUNLOCK(obj);
+ return ((void *)sf_buf_kva(*sf));
+}
+
+void
+iommu_unmap_pgtbl(struct sf_buf *sf)
+{
+
+ sf_buf_free(sf);
+ sched_unpin();
+}
+
+iommu_haddr_t iommu_high;
+int iommu_tbl_pagecnt;
+
+SYSCTL_NODE(_hw_iommu, OID_AUTO, dmar, CTLFLAG_RD | CTLFLAG_MPSAFE,
+ NULL, "");
+SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD,
+ &iommu_tbl_pagecnt, 0,
+ "Count of pages used for DMAR pagetables");
diff --git a/sys/dev/sound/version.h b/sys/x86/iommu/x86_iommu.h
index b816bbf964e8..3789586f1eaf 100644
--- a/sys/dev/sound/version.h
+++ b/sys/x86/iommu/x86_iommu.h
@@ -1,8 +1,10 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2007 Ariff Abdullah <ariff@FreeBSD.org>
- * All rights reserved.
+ * Copyright (c) 2013-2015 The FreeBSD Foundation
+ *
+ * This software was developed by Konstantin Belousov <kib@FreeBSD.org>
+ * under sponsorship from the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -16,7 +18,7 @@
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -26,17 +28,35 @@
* SUCH DAMAGE.
*/
-#ifndef _SND_VERSION_H_
-#define _SND_VERSION_H_
+#ifndef __X86_IOMMU_X86_IOMMU_H
+#define __X86_IOMMU_X86_IOMMU_H
-/*
- * FreeBSD sound driver internal versioning, nothing to do
- * with OSS whatsoever. Dear future maintainer, please revisit
- * this _before_ Jan 1 2148
- *
- * Last 2 decimal places reserved for daily versioning, starting
- * with 0.
- */
-#define SND_DRV_VERSION 2009061500
+/* Both Intel and AMD are not too crazy to have different sizes. */
+typedef struct iommu_pte {
+ uint64_t pte;
+} iommu_pte_t;
+
+#define IOMMU_PAGE_SIZE PAGE_SIZE
+#define IOMMU_PAGE_MASK (IOMMU_PAGE_SIZE - 1)
+#define IOMMU_PAGE_SHIFT PAGE_SHIFT
+#define IOMMU_NPTEPG (IOMMU_PAGE_SIZE / sizeof(iommu_pte_t))
+#define IOMMU_NPTEPGSHIFT 9
+#define IOMMU_PTEMASK (IOMMU_NPTEPG - 1)
+
+struct sf_buf;
+struct vm_object;
+
+struct vm_page *iommu_pgalloc(struct vm_object *obj, vm_pindex_t idx,
+ int flags);
+void iommu_pgfree(struct vm_object *obj, vm_pindex_t idx, int flags);
+void *iommu_map_pgtbl(struct vm_object *obj, vm_pindex_t idx, int flags,
+ struct sf_buf **sf);
+void iommu_unmap_pgtbl(struct sf_buf *sf);
+
+extern iommu_haddr_t iommu_high;
+extern int iommu_tbl_pagecnt;
+
+SYSCTL_DECL(_hw_iommu);
+SYSCTL_DECL(_hw_iommu_dmar);
-#endif /* !_SND_VERSION_H_ */
+#endif
diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c
index ef96f5ba7bdc..5aa4ffcff3cc 100644
--- a/sys/x86/x86/busdma_bounce.c
+++ b/sys/x86/x86/busdma_bounce.c
@@ -108,12 +108,16 @@ static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
static MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata");
#define dmat_alignment(dmat) ((dmat)->common.alignment)
+#define dmat_bounce_flags(dmat) ((dmat)->bounce_flags)
+#define dmat_boundary(dmat) ((dmat)->common.boundary)
#define dmat_domain(dmat) ((dmat)->common.domain)
#define dmat_flags(dmat) ((dmat)->common.flags)
#define dmat_highaddr(dmat) ((dmat)->common.highaddr)
#define dmat_lowaddr(dmat) ((dmat)->common.lowaddr)
#define dmat_lockfunc(dmat) ((dmat)->common.lockfunc)
#define dmat_lockfuncarg(dmat) ((dmat)->common.lockfuncarg)
+#define dmat_maxsegsz(dmat) ((dmat)->common.maxsegsz)
+#define dmat_nsegments(dmat) ((dmat)->common.nsegments)
#include "../../kern/subr_busdma_bounce.c"
@@ -507,7 +511,7 @@ _bus_dmamap_pagesneeded(bus_dma_tag_t dmat, vm_paddr_t buf, bus_size_t buflen,
count = 0;
curaddr = buf;
while (buflen != 0) {
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if (must_bounce(dmat, curaddr)) {
sgsize = MIN(sgsize,
PAGE_SIZE - (curaddr & PAGE_MASK));
@@ -559,8 +563,8 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
vendaddr = (vm_offset_t)buf + buflen;
while (vaddr < vendaddr) {
- sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK);
- sg_len = MIN(sg_len, dmat->common.maxsegsz);
+ sg_len = MIN(vendaddr - vaddr,
+ PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK));
if (pmap == kernel_pmap)
paddr = pmap_kextract(vaddr);
else
@@ -580,7 +584,7 @@ static void
_bus_dmamap_count_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma,
int ma_offs, bus_size_t buflen, int flags)
{
- bus_size_t sg_len, max_sgsize;
+ bus_size_t sg_len;
int page_index;
vm_paddr_t paddr;
@@ -600,12 +604,10 @@ _bus_dmamap_count_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma,
while (buflen > 0) {
paddr = VM_PAGE_TO_PHYS(ma[page_index]) + ma_offs;
sg_len = PAGE_SIZE - ma_offs;
- max_sgsize = MIN(buflen, dmat->common.maxsegsz);
- sg_len = MIN(sg_len, max_sgsize);
+ sg_len = MIN(sg_len, buflen);
if (must_bounce(dmat, paddr)) {
sg_len = roundup2(sg_len,
dmat->common.alignment);
- sg_len = MIN(sg_len, max_sgsize);
KASSERT(vm_addr_align_ok(sg_len,
dmat->common.alignment),
("Segment size is not aligned"));
@@ -623,54 +625,6 @@ _bus_dmamap_count_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma,
}
/*
- * Add a single contiguous physical range to the segment list.
- */
-static bus_size_t
-_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t curaddr,
- bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
-{
- int seg;
-
- KASSERT(curaddr <= BUS_SPACE_MAXADDR,
- ("ds_addr %#jx > BUS_SPACE_MAXADDR %#jx; dmat %p fl %#x low %#jx "
- "hi %#jx",
- (uintmax_t)curaddr, (uintmax_t)BUS_SPACE_MAXADDR,
- dmat, dmat->bounce_flags, (uintmax_t)dmat->common.lowaddr,
- (uintmax_t)dmat->common.highaddr));
-
- /*
- * Make sure we don't cross any boundaries.
- */
- if (!vm_addr_bound_ok(curaddr, sgsize, dmat->common.boundary))
- sgsize = roundup2(curaddr, dmat->common.boundary) - curaddr;
-
- /*
- * Insert chunk into a segment, coalescing with
- * previous segment if possible.
- */
- seg = *segp;
- if (seg == -1) {
- seg = 0;
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- } else {
- if (curaddr == segs[seg].ds_addr + segs[seg].ds_len &&
- (segs[seg].ds_len + sgsize) <= dmat->common.maxsegsz &&
- vm_addr_bound_ok(segs[seg].ds_addr,
- segs[seg].ds_len + sgsize, dmat->common.boundary))
- segs[seg].ds_len += sgsize;
- else {
- if (++seg >= dmat->common.nsegments)
- return (0);
- segs[seg].ds_addr = curaddr;
- segs[seg].ds_len = sgsize;
- }
- }
- *segp = seg;
- return (sgsize);
-}
-
-/*
* Utility function to load a physical buffer. segp contains
* the starting segment on entrace, and the ending segment on exit.
*/
@@ -700,7 +654,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
while (buflen > 0) {
curaddr = buf;
- sgsize = MIN(buflen, dmat->common.maxsegsz);
+ sgsize = buflen;
if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 &&
map->pagesneeded != 0 &&
must_bounce(dmat, curaddr)) {
@@ -708,9 +662,9 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map,
curaddr = add_bounce_page(dmat, map, 0, curaddr, 0,
sgsize);
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
buf += sgsize;
buflen -= sgsize;
@@ -731,7 +685,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
bus_size_t buflen, pmap_t pmap, int flags, bus_dma_segment_t *segs,
int *segp)
{
- bus_size_t sgsize, max_sgsize;
+ bus_size_t sgsize;
vm_paddr_t curaddr;
vm_offset_t kvaddr, vaddr;
int error;
@@ -767,21 +721,16 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
/*
* Compute the segment size, and adjust counts.
*/
- max_sgsize = MIN(buflen, dmat->common.maxsegsz);
- sgsize = PAGE_SIZE - (curaddr & PAGE_MASK);
+ sgsize = MIN(buflen, PAGE_SIZE - (curaddr & PAGE_MASK));
if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 &&
map->pagesneeded != 0 &&
must_bounce(dmat, curaddr)) {
sgsize = roundup2(sgsize, dmat->common.alignment);
- sgsize = MIN(sgsize, max_sgsize);
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, 0,
sgsize);
- } else {
- sgsize = MIN(sgsize, max_sgsize);
}
- sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, curaddr, sgsize, segs,
+ segp))
break;
vaddr += sgsize;
buflen -= sgsize;
@@ -800,7 +749,7 @@ bounce_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map,
{
vm_paddr_t paddr, next_paddr;
int error, page_index;
- bus_size_t sgsize, max_sgsize;
+ bus_size_t sgsize;
if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) {
/*
@@ -834,13 +783,11 @@ bounce_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map,
* Compute the segment size, and adjust counts.
*/
paddr = VM_PAGE_TO_PHYS(ma[page_index]) + ma_offs;
- max_sgsize = MIN(buflen, dmat->common.maxsegsz);
- sgsize = PAGE_SIZE - ma_offs;
+ sgsize = MIN(buflen, PAGE_SIZE - ma_offs);
if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 &&
map->pagesneeded != 0 &&
must_bounce(dmat, paddr)) {
sgsize = roundup2(sgsize, dmat->common.alignment);
- sgsize = MIN(sgsize, max_sgsize);
KASSERT(vm_addr_align_ok(sgsize,
dmat->common.alignment),
("Segment size is not aligned"));
@@ -855,12 +802,9 @@ bounce_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map,
next_paddr = 0;
paddr = add_bounce_page(dmat, map, 0, paddr,
next_paddr, sgsize);
- } else {
- sgsize = MIN(sgsize, max_sgsize);
}
- sgsize = _bus_dmamap_addseg(dmat, map, paddr, sgsize, segs,
- segp);
- if (sgsize == 0)
+ if (!_bus_dmamap_addsegs(dmat, map, paddr, sgsize, segs,
+ segp))
break;
KASSERT(buflen >= sgsize,
("Segment length overruns original buffer"));
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
index 919dda722d71..4da250c535a0 100644
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -106,6 +106,7 @@ u_int cpu_exthigh; /* Highest arg to extended CPUID */
u_int cpu_id; /* Stepping ID */
u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */
u_int cpu_procinfo2; /* Multicore info */
+u_int cpu_procinfo3;
char cpu_vendor[20]; /* CPU Origin code */
u_int cpu_vendor_id; /* CPU vendor ID */
u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */
@@ -1089,19 +1090,29 @@ printcpuinfo(void)
"\001CLZERO"
"\002IRPerf"
"\003XSaveErPtr"
+ "\004INVLPGB"
"\005RDPRU"
+ "\007BE"
"\011MCOMMIT"
"\012WBNOINVD"
"\015IBPB"
+ "\016INT_WBINVD"
"\017IBRS"
"\020STIBP"
"\021IBRS_ALWAYSON"
"\022STIBP_ALWAYSON"
"\023PREFER_IBRS"
+ "\024SAMEMODE_IBRS"
+ "\025NOLMSLE"
+ "\026INVLPGBNEST"
"\030PPIN"
"\031SSBD"
"\032VIRT_SSBD"
"\033SSB_NO"
+ "\034CPPC"
+ "\035PSFD"
+ "\036BTC_NO"
+ "\037IBPB_RET"
);
}
@@ -1470,7 +1481,8 @@ identify_hypervisor(void)
p = kern_getenv("smbios.system.serial");
if (p != NULL) {
if (strncmp(p, "VMware-", 7) == 0 || strncmp(p, "VMW", 3) == 0) {
- vmware_hvcall(VMW_HVCMD_GETVERSION, regs);
+ vmware_hvcall(0, VMW_HVCMD_GETVERSION,
+ VMW_HVCMD_DEFAULT_PARAM, regs);
if (regs[1] == VMW_HVMAGIC) {
vm_guest = VM_GUEST_VMWARE;
freeenv(p);
@@ -1663,6 +1675,7 @@ finishidentcpu(void)
cpu_maxphyaddr = regs[0] & 0xff;
amd_extended_feature_extensions = regs[1];
cpu_procinfo2 = regs[2];
+ cpu_procinfo3 = regs[3];
} else {
cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32;
}
diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c
index 458a0cb396bb..023c3df22580 100644
--- a/sys/x86/x86/intr_machdep.c
+++ b/sys/x86/x86/intr_machdep.c
@@ -255,16 +255,12 @@ intr_lookup_source(int vector)
}
int
-intr_add_handler(const char *name, int vector, driver_filter_t filter,
+intr_add_handler(struct intsrc *isrc, const char *name, driver_filter_t filter,
driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep,
int domain)
{
- struct intsrc *isrc;
int error;
- isrc = intr_lookup_source(vector);
- if (isrc == NULL)
- return (EINVAL);
error = intr_event_add_handler(isrc->is_event, name, filter, handler,
arg, intr_priority(flags), flags, cookiep);
if (error == 0) {
@@ -303,13 +299,10 @@ intr_remove_handler(void *cookie)
}
int
-intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol)
+intr_config_intr(struct intsrc *isrc, enum intr_trigger trig,
+ enum intr_polarity pol)
{
- struct intsrc *isrc;
- isrc = intr_lookup_source(vector);
- if (isrc == NULL)
- return (EINVAL);
return (isrc->is_pic->pic_config_intr(isrc, trig, pol));
}
@@ -513,14 +506,10 @@ atpic_reset(void)
/* Add a description to an active interrupt handler. */
int
-intr_describe(u_int vector, void *ih, const char *descr)
+intr_describe(struct intsrc *isrc, void *ih, const char *descr)
{
- struct intsrc *isrc;
int error;
- isrc = intr_lookup_source(vector);
- if (isrc == NULL)
- return (EINVAL);
error = intr_event_describe_handler(isrc->is_event, ih, descr);
if (error)
return (error);
diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c
index 8f55b543eee2..aa62c920bcd8 100644
--- a/sys/x86/x86/nexus.c
+++ b/sys/x86/x86/nexus.c
@@ -458,6 +458,7 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
void *arg, void **cookiep)
{
int error, domain;
+ struct intsrc *isrc;
/* somebody tried to setup an irq that failed to allocate! */
if (irq == NULL)
@@ -476,8 +477,11 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
if (bus_get_domain(child, &domain) != 0)
domain = 0;
- error = intr_add_handler(device_get_nameunit(child),
- rman_get_start(irq), filter, ihand, arg, flags, cookiep, domain);
+ isrc = intr_lookup_source(rman_get_start(irq));
+ if (isrc == NULL)
+ return (EINVAL);
+ error = intr_add_handler(isrc, device_get_nameunit(child),
+ filter, ihand, arg, flags, cookiep, domain);
if (error == 0)
rman_set_irq_cookie(irq, *cookiep);
@@ -524,15 +528,24 @@ static int
nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
enum intr_polarity pol)
{
- return (intr_config_intr(irq, trig, pol));
+ struct intsrc *isrc;
+
+ isrc = intr_lookup_source(irq);
+ if (isrc == NULL)
+ return (EINVAL);
+ return (intr_config_intr(isrc, trig, pol));
}
static int
nexus_describe_intr(device_t dev, device_t child, struct resource *irq,
void *cookie, const char *descr)
{
+ struct intsrc *isrc;
- return (intr_describe(rman_get_start(irq), cookie, descr));
+ isrc = intr_lookup_source(rman_get_start(irq));
+ if (isrc == NULL)
+ return (EINVAL);
+ return (intr_describe(isrc, cookie, descr));
}
static struct resource_list *
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
index 7c11a1f5f300..4edaa37d9b54 100644
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -139,7 +139,7 @@ tsc_freq_vmware(void)
{
u_int regs[4];
- vmware_hvcall(VMW_HVCMD_GETHZ, regs);
+ vmware_hvcall(0, VMW_HVCMD_GETHZ, VMW_HVCMD_DEFAULT_PARAM, regs);
if (regs[1] != UINT_MAX)
tsc_freq = regs[0] | ((uint64_t)regs[1] << 32);
tsc_early_calib_exact = 1;
diff --git a/sys/x86/x86/vmware_guestrpc.c b/sys/x86/x86/vmware_guestrpc.c
new file mode 100644
index 000000000000..b62f40c5a9ef
--- /dev/null
+++ b/sys/x86/x86/vmware_guestrpc.c
@@ -0,0 +1,337 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2013-2024, Juniper Networks, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/kernel.h>
+#include <sys/limits.h>
+#include <sys/bus.h>
+#include <sys/sbuf.h>
+#include <sys/errno.h>
+#include <sys/module.h>
+
+#include <x86/vmware.h>
+#include <x86/vmware_guestrpc.h>
+
+/* GuestRPC Subcommands */
+#define VMW_HVGUESTRPC_OPEN 0x00
+#define VMW_HVGUESTRPC_SEND_LEN 0x01
+#define VMW_HVGUESTRPC_SEND_DATA 0x02
+#define VMW_HVGUESTRPC_RECV_LEN 0x03
+#define VMW_HVGUESTRPC_RECV_DATA 0x04
+#define VMW_HVGUESTRPC_FINISH_RECV 0x05
+#define VMW_HVGUESTRPC_CLOSE 0x06
+/* GuestRPC Parameters */
+#define VMW_HVGUESTRPC_OPEN_MAGIC 0x49435052
+/* GuestRPC Status */
+#define VMW_HVGUESTRPC_FAILURE 0x00000000
+#define VMW_HVGUESTRPC_OPEN_SUCCESS 0x00010000
+#define VMW_HVGUESTRPC_SEND_LEN_SUCCESS 0x00810000
+#define VMW_HVGUESTRPC_SEND_DATA_SUCCESS 0x00010000
+#define VMW_HVGUESTRPC_RECV_LEN_SUCCESS 0x00830000
+#define VMW_HVGUESTRPC_RECV_DATA_SUCCESS 0x00010000
+#define VMW_HVGUESTRPC_FINISH_RECV_SUCCESS 0x00010000
+#define VMW_HVGUESTRPC_CLOSE_SUCCESS 0x00010000
+
+#define VMW_GUESTRPC_EBX(_p) ((_p)[1])
+#define VMW_GUESTRPC_EDXHI(_p) ((_p)[3] >> 16)
+#define VMW_GUESTRPC_STATUS(_p) ((_p)[2])
+
+static __inline void
+vmware_guestrpc(int chan, uint16_t subcmd, uint32_t param, u_int *p)
+{
+
+#ifdef DEBUG_VMGUESTRPC
+ printf("%s(%d, %#x, %#x, %p)\n", __func__, chan, subcmd, param, p);
+#endif
+ vmware_hvcall(chan, VMW_HVCMD_GUESTRPC | (subcmd << 16), param, p);
+#ifdef DEBUG_VMGUESTRPC
+ printf("p[0] = %#x\n", p[0]);
+ printf("p[1] = %#x\n", p[1]);
+ printf("p[2] = %#x\n", p[2]);
+ printf("p[3] = %#x\n", p[3]);
+#endif
+}
+
+/*
+ * Start a GuestRPC request
+ *
+ * Channel number is returned in the EDXHI parameter.
+ *
+ * This channel number must be used in successive GuestRPC requests for
+ * sending and receiving RPC data.
+ */
+static int
+vmware_guestrpc_open(void)
+{
+ u_int p[4];
+
+ vmware_guestrpc(0, VMW_HVGUESTRPC_OPEN, VMW_HVGUESTRPC_OPEN_MAGIC,
+ p);
+ if (VMW_GUESTRPC_STATUS(p) != VMW_HVGUESTRPC_OPEN_SUCCESS)
+ return (-1);
+
+ return (VMW_GUESTRPC_EDXHI(p));
+}
+
+/*
+ * Send the length of the GuestRPC request
+ *
+ * In a GuestRPC request, the total length of the request must be sent
+ * before any data can be sent.
+ */
+static int
+vmware_guestrpc_send_len(int channel, size_t len)
+{
+ u_int p[4];
+
+ vmware_guestrpc(channel, VMW_HVGUESTRPC_SEND_LEN, len, p);
+ if (VMW_GUESTRPC_STATUS(p) != VMW_HVGUESTRPC_SEND_LEN_SUCCESS)
+ return (-1);
+
+ return (0);
+}
+
+/*
+ * Send the data for the GuestRPC request
+ *
+ * The total length of the GuestRPC request must be sent before any data.
+ * Data is sent 32-bit values at a time and therefore may require multiple
+ * calls to send all the data.
+ */
+static int
+vmware_guestrpc_send_data(int channel, uint32_t data)
+{
+ u_int p[4];
+
+ vmware_guestrpc(channel, VMW_HVGUESTRPC_SEND_DATA, data, p);
+ if (VMW_GUESTRPC_STATUS(p) != VMW_HVGUESTRPC_SEND_DATA_SUCCESS)
+ return (-1);
+
+ return (0);
+}
+
+/*
+ * Receive the length of the GuestRPC reply.
+ *
+ * Length of the reply data is returned in the EBX parameter.
+ * The reply identifier is returned in the EDXHI parameter.
+ *
+ * The reply identifier must be used as the GuestRPC parameter in calls
+ * to vmware_guestrpc_recv_data()
+ */
+static int
+vmware_guestrpc_recv_len(int channel, size_t *lenp)
+{
+ u_int p[4];
+
+ vmware_guestrpc(channel, VMW_HVGUESTRPC_RECV_LEN, 0, p);
+ if (VMW_GUESTRPC_STATUS(p) != VMW_HVGUESTRPC_RECV_LEN_SUCCESS)
+ return (-1);
+
+ *lenp = VMW_GUESTRPC_EBX(p);
+ return (VMW_GUESTRPC_EDXHI(p));
+}
+
+/*
+ * Receive the GuestRPC reply data.
+ *
+ * Data is received in 32-bit values at a time and therefore may
+ * require multiple requests to get all the data.
+ */
+static int
+vmware_guestrpc_recv_data(int channel, int id, uint32_t *datap)
+{
+ u_int p[4];
+
+ vmware_guestrpc(channel, VMW_HVGUESTRPC_RECV_DATA, id, p);
+ if (VMW_GUESTRPC_STATUS(p) != VMW_HVGUESTRPC_RECV_DATA_SUCCESS)
+ return (-1);
+
+ *datap = VMW_GUESTRPC_EBX(p);
+ return (0);
+}
+
+/*
+ * Close the GuestRPC channel.
+ */
+static int
+vmware_guestrpc_close(int channel)
+{
+ u_int p[4];
+
+ vmware_guestrpc(channel, VMW_HVGUESTRPC_CLOSE, 0, p);
+ if (VMW_GUESTRPC_STATUS(p) != VMW_HVGUESTRPC_CLOSE_SUCCESS)
+ return (-1);
+
+ return (0);
+}
+
+/*
+ * Send a GuestRPC command.
+ */
+int
+vmware_guestrpc_cmd(struct sbuf *sbufp)
+{
+ char *buf;
+ size_t cnt, len;
+ int chan, id, status;
+ uint32_t data;
+
+ /* Make sure we are running under VMware hypervisor */
+ if (vm_guest != VM_GUEST_VMWARE)
+ return (ENXIO);
+
+ /* Open the GuestRPC channel */
+ chan = vmware_guestrpc_open();
+ if (chan == -1)
+ return (EIO);
+
+ /* Send the length */
+ buf = sbuf_data(sbufp);
+ len = sbuf_len(sbufp);
+ status = vmware_guestrpc_send_len(chan, len);
+ if (status == -1)
+ goto done;
+
+ /* Send the data */
+ while (len > 0) {
+ data = 0;
+ cnt = min(4, len);
+ memcpy(&data, buf, cnt);
+ status = vmware_guestrpc_send_data(chan, data);
+ if (status == -1)
+ goto done;
+ buf += cnt;
+ len -= cnt;
+ }
+
+ /* Receive the length of the reply data */
+ id = vmware_guestrpc_recv_len(chan, &len);
+ if (id == -1)
+ goto done;
+
+ /* Receive the reply data */
+ sbuf_clear(sbufp);
+ while (len > 0) {
+ status = vmware_guestrpc_recv_data(chan, id, &data);
+ if (status == -1)
+ goto done;
+ sbuf_bcat(sbufp, &data, 4);
+ len -= min(4, len);
+ }
+
+done:
+ /* Close the GuestRPC channel */
+ vmware_guestrpc_close(chan);
+ return (status == -1 ? EIO : 0);
+}
+
+/*
+ * Set guest information key/value pair
+ */
+int
+vmware_guestrpc_set_guestinfo(const char *keyword, const char *val)
+{
+ struct sbuf sb;
+ char *buf;
+ int error;
+
+#ifdef DEBUG_VMGUESTRPC
+ printf("%s: %s=%s\n", __func__, keyword, val);
+#endif
+
+ /* Send "info-set" GuestRPC command */
+ sbuf_new(&sb, NULL, 256, SBUF_AUTOEXTEND);
+ sbuf_printf(&sb, "info-set guestinfo.fbsd.%s %s", keyword, val);
+ sbuf_trim(&sb);
+ sbuf_finish(&sb);
+
+ error = vmware_guestrpc_cmd(&sb);
+ if (error)
+ return (error);
+
+ sbuf_finish(&sb);
+ buf = sbuf_data(&sb);
+
+#ifdef DEBUG_VMGUESTRPC
+ printf("%s: result: %s\n", __func__, buf);
+#endif
+
+ /* Buffer will contain 1 on sucess or 0 on failure */
+ return ((buf[0] == '0') ? EINVAL : 0);
+}
+
+/*
+ * Get guest information key/value pair.
+ */
+int
+vmware_guestrpc_get_guestinfo(const char *keyword, struct sbuf *sbufp)
+{
+ struct sbuf sb;
+ char *buf;
+ int error;
+
+#ifdef DEBUG_VMGUESTRPC
+ printf("%s: %s\n", __func__, keyword);
+#endif
+
+ /* Send "info-get" GuestRPC command */
+ sbuf_new(&sb, NULL, 256, SBUF_AUTOEXTEND);
+ sbuf_printf(&sb, "info-get guestinfo.fbsd.%s", keyword);
+ sbuf_trim(&sb);
+ sbuf_finish(&sb);
+
+ error = vmware_guestrpc_cmd(&sb);
+ if (error)
+ return (error);
+
+ sbuf_finish(&sb);
+ buf = sbuf_data(&sb);
+
+#ifdef DEBUG_VMGUESTRPC
+ printf("%s: result: %s\n", __func__, buf);
+#endif
+
+ /*
+ * Buffer will contain "1 <value>" on success or
+ * "0 No value found" on failure
+ */
+ if (buf[0] == '0')
+ return (ENOENT);
+
+ /*
+ * Add value from buffer to the sbuf
+ */
+ sbuf_cat(sbufp, buf + 2);
+ return (0);
+}
+
+MODULE_VERSION(vmware_guestrpc, 1);
diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend
index b44d6f92414a..f6733e3228b4 100644
--- a/targets/pseudo/userland/Makefile.depend
+++ b/targets/pseudo/userland/Makefile.depend
@@ -68,7 +68,6 @@ DIRDEPS+= \
sbin/fsck_msdosfs \
sbin/fsdb \
sbin/fsirand \
- sbin/gbde \
sbin/geom/core \
sbin/ggate/ggatec \
sbin/ggate/ggated \
diff --git a/tests/ci/Makefile b/tests/ci/Makefile
index 8892b0860260..fed66e5cc317 100644
--- a/tests/ci/Makefile
+++ b/tests/ci/Makefile
@@ -147,19 +147,31 @@ beforeclean: .PHONY
clean: beforeclean .PHONY
ci-buildworld: .PHONY
- ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildworld
+ @echo "Building world for ${TARGET_ARCH}"
+ ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \
+ ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} \
+ buildworld > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \
+ (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false)
+
ci-buildkernel: ci-buildworld-${TARGET_ARCH:tl} .PHONY
- ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildkernel
+ @echo "Building kenrel for ${TARGET_ARCH"}"
+ ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \
+ ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} \
+ SRCCONF=${SRCCONF} buildkernel > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \
+ (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false)
ci-buildimage: ${QEMUTGT} ci-buildkernel-${TARGET_ARCH:tl} .PHONY
+ @echo "Building ci image for ${TARGET_ARCH"}"
mkdir -p ${.OBJDIR}/${.TARGET}
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \
QEMUSTATIC=${QEMUSTATIC} CITYPE=${CITYPE} \
${RELEASEDIR}/scripts/mk-vmimage.sh \
-C ${RELEASEDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \
-i ${.OBJDIR}/ci.img -s ${VMSIZE} -f ${FORMAT} \
- -S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF}
+ -S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF} \
+ > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \
+ (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false)
touch ${.TARGET}
ci-setsmokevar: .PHONY
diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc
index 4c9edac9360a..30612079657d 100644
--- a/tests/sys/fs/fusefs/bmap.cc
+++ b/tests/sys/fs/fusefs/bmap.cc
@@ -77,8 +77,6 @@ class BmapEof: public Bmap, public WithParamInterface<int> {};
/*
* Test FUSE_BMAP
- * XXX The FUSE protocol does not include the runp and runb variables, so those
- * must be guessed in-kernel.
*/
TEST_F(Bmap, bmap)
{
@@ -105,8 +103,19 @@ TEST_F(Bmap, bmap)
arg.runb = -1;
ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno);
EXPECT_EQ(arg.bn, pbn);
- EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1);
- EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1);
+ /*
+ * XXX The FUSE protocol does not include the runp and runb variables,
+ * so those must be guessed in-kernel. There's no "right" answer, so
+ * just check that they're within reasonable limits.
+ */
+ EXPECT_LE(arg.runb, lbn);
+ EXPECT_LE((unsigned long)arg.runb, m_maxreadahead / m_maxbcachebuf);
+ EXPECT_LE((unsigned long)arg.runb, m_maxphys / m_maxbcachebuf);
+ EXPECT_GT(arg.runb, 0);
+ EXPECT_LE(arg.runp, filesize / m_maxbcachebuf - lbn);
+ EXPECT_LE((unsigned long)arg.runp, m_maxreadahead / m_maxbcachebuf);
+ EXPECT_LE((unsigned long)arg.runp, m_maxphys / m_maxbcachebuf);
+ EXPECT_GT(arg.runp, 0);
leak(fd);
}
@@ -142,7 +151,7 @@ TEST_F(Bmap, default_)
arg.runb = -1;
ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno);
EXPECT_EQ(arg.bn, 0);
- EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1);
+ EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1);
EXPECT_EQ(arg.runb, 0);
/* In the middle */
@@ -152,8 +161,8 @@ TEST_F(Bmap, default_)
arg.runb = -1;
ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno);
EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE);
- EXPECT_EQ(arg.runp, m_maxphys / m_maxbcachebuf - 1);
- EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1);
+ EXPECT_EQ((unsigned long )arg.runp, m_maxphys / m_maxbcachebuf - 1);
+ EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1);
/* Last block */
lbn = filesize / m_maxbcachebuf - 1;
@@ -163,7 +172,7 @@ TEST_F(Bmap, default_)
ASSERT_EQ(0, ioctl(fd, FIOBMAP2, &arg)) << strerror(errno);
EXPECT_EQ(arg.bn, lbn * m_maxbcachebuf / DEV_BSIZE);
EXPECT_EQ(arg.runp, 0);
- EXPECT_EQ(arg.runb, m_maxphys / m_maxbcachebuf - 1);
+ EXPECT_EQ((unsigned long )arg.runb, m_maxphys / m_maxbcachebuf - 1);
leak(fd);
}
diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc
index 373f742d4fd3..9693428914e6 100644
--- a/tests/sys/fs/fusefs/read.cc
+++ b/tests/sys/fs/fusefs/read.cc
@@ -1339,7 +1339,7 @@ TEST_P(ReadAhead, readahead) {
expect_open(ino, 0, 1);
maxcontig = m_noclusterr ? m_maxbcachebuf :
m_maxbcachebuf + m_maxreadahead;
- clustersize = MIN(maxcontig, m_maxphys);
+ clustersize = MIN((unsigned long )maxcontig, m_maxphys);
for (offs = 0; offs < bufsize; offs += clustersize) {
len = std::min((size_t)clustersize, (size_t)(filesize - offs));
expect_read(ino, offs, len, len, contents + offs);
diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc
index 55a552e28eeb..831ded0c0815 100644
--- a/tests/sys/fs/fusefs/utils.cc
+++ b/tests/sys/fs/fusefs/utils.cc
@@ -130,8 +130,7 @@ class FuseEnv: public Environment {
void FuseTest::SetUp() {
const char *maxbcachebuf_node = "vfs.maxbcachebuf";
const char *maxphys_node = "kern.maxphys";
- int val = 0;
- size_t size = sizeof(val);
+ size_t size;
/*
* XXX check_environment should be called from FuseEnv::SetUp, but
@@ -141,12 +140,12 @@ void FuseTest::SetUp() {
if (IsSkipped())
return;
- ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &val, &size, NULL, 0))
- << strerror(errno);
- m_maxbcachebuf = val;
- ASSERT_EQ(0, sysctlbyname(maxphys_node, &val, &size, NULL, 0))
+ size = sizeof(m_maxbcachebuf);
+ ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &m_maxbcachebuf, &size,
+ NULL, 0)) << strerror(errno);
+ size = sizeof(m_maxphys);
+ ASSERT_EQ(0, sysctlbyname(maxphys_node, &m_maxphys, &size, NULL, 0))
<< strerror(errno);
- m_maxphys = val;
/*
* Set the default max_write to a distinct value from MAXPHYS to catch
* bugs that confuse the two.
diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh
index 383f01ea4bfe..506e8a985212 100644
--- a/tests/sys/fs/fusefs/utils.hh
+++ b/tests/sys/fs/fusefs/utils.hh
@@ -77,7 +77,7 @@ class FuseTest : public ::testing::Test {
public:
int m_maxbcachebuf;
- int m_maxphys;
+ unsigned long m_maxphys;
FuseTest():
m_maxreadahead(0),
diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc
index f931f350a7c3..1fe2e3cc522d 100644
--- a/tests/sys/fs/fusefs/write.cc
+++ b/tests/sys/fs/fusefs/write.cc
@@ -179,12 +179,12 @@ class WriteCluster: public WriteBack {
public:
virtual void SetUp() {
m_async = true;
- m_maxwrite = 1 << 25; // Anything larger than MAXPHYS will suffice
+ m_maxwrite = UINT32_MAX; // Anything larger than MAXPHYS will suffice
WriteBack::SetUp();
if (m_maxphys < 2 * DFLTPHYS)
GTEST_SKIP() << "MAXPHYS must be at least twice DFLTPHYS"
<< " for this test";
- if (m_maxphys < 2 * m_maxbcachebuf)
+ if (m_maxphys < 2 * (unsigned long )m_maxbcachebuf)
GTEST_SKIP() << "MAXPHYS must be at least twice maxbcachebuf"
<< " for this test";
}
@@ -860,7 +860,8 @@ TEST_F(WriteMaxWrite, write)
ssize_t halfbufsize, bufsize;
halfbufsize = m_mock->m_maxwrite;
- if (halfbufsize >= m_maxbcachebuf || halfbufsize >= m_maxphys)
+ if (halfbufsize >= m_maxbcachebuf ||
+ (unsigned long )halfbufsize >= m_maxphys)
GTEST_SKIP() << "Must lower m_maxwrite for this test";
bufsize = halfbufsize * 2;
contents = new int[bufsize / sizeof(int)];
diff --git a/tests/sys/geom/class/eli/attach_test.sh b/tests/sys/geom/class/eli/attach_test.sh
index eb59234f014b..b6b1848f2d37 100644
--- a/tests/sys/geom/class/eli/attach_test.sh
+++ b/tests/sys/geom/class/eli/attach_test.sh
@@ -39,6 +39,34 @@ attach_d_cleanup()
geli_test_cleanup
}
+atf_test_case atach_multiple_fails cleanup
+attach_multiple_fails_head()
+{
+ atf_set "descr" "test multiple failed attach of geli provider"
+ atf_set "require.user" "root"
+}
+attach_multiple_fails_body()
+{
+ geli_test_setup
+
+ sectors=1000
+ attach_md md -t malloc -s `expr $sectors + 1`
+ atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none
+
+ atf_check geli init -B none -P -K keyfile ${md}
+ atf_check geli attach -d -p -k keyfile ${md}
+
+ for i in $(jot 100); do
+ atf_check -s not-exit:0 -e ignore -- geli attach -d -p -k keyfile ${md}
+ done
+ atf_check -o ignore -- newfs ${md}.eli
+}
+attach_multiple_fails_cleanup()
+{
+ geli_test_cleanup
+}
+
+
atf_test_case attach_r cleanup
attach_r_head()
{
@@ -125,5 +153,6 @@ atf_init_test_cases()
atf_add_test_case attach_d
atf_add_test_case attach_r
atf_add_test_case attach_multiple
+ atf_add_test_case attach_multiple_fails
atf_add_test_case nokey
}
diff --git a/tests/sys/kern/sendfile_helper.c b/tests/sys/kern/sendfile_helper.c
index 13d10eac6673..703b04fdea6c 100644
--- a/tests/sys/kern/sendfile_helper.c
+++ b/tests/sys/kern/sendfile_helper.c
@@ -42,29 +42,73 @@
#include <string.h>
#include <unistd.h>
-static int ls;
static char buf[1024*1024];
-static volatile bool accept_done = false;
+ssize_t readlen;
static volatile bool read_done = false;
-static void *
-server(void *arg)
+static int
+tcp_socketpair(int *sv)
{
- struct sockaddr_in sin;
- ssize_t rv;
- socklen_t slen;
- int ss;
- ssize_t readlen = (uintptr_t)arg;
+ struct sockaddr_in sin = {
+ .sin_len = sizeof(struct sockaddr_in),
+ .sin_family = AF_INET,
+ .sin_addr.s_addr = htonl(INADDR_LOOPBACK),
+ };
+ int flags;
+ int ls;
- slen = sizeof(sin);
- ss = accept(ls, (void *)&sin, &slen);
- if (ss < 0)
+ ls = socket(PF_INET, SOCK_STREAM, 0);
+ if (ls < 0)
+ err(1, "socket ls");
+
+ if (setsockopt(ls, SOL_SOCKET, SO_REUSEADDR, &(socklen_t){1},
+ sizeof(int)) < 0)
+ err(1, "SO_REUSEADDR");
+
+ if (bind(ls, (struct sockaddr *)&sin, sizeof(sin)) < 0)
+ err(1, "bind ls");
+
+ if (getsockname(ls, (struct sockaddr *)&sin,
+ &(socklen_t){ sizeof(sin) }) < 0)
+ err(1, "getsockname");
+
+ if (listen(ls, 5) < 0)
+ err(1, "listen ls");
+
+ sv[0] = socket(PF_INET, SOCK_STREAM, 0);
+ if (sv[0] < 0)
+ err(1, "socket cs");
+
+ flags = fcntl(sv[0], F_GETFL);
+ flags |= O_NONBLOCK;
+ if (fcntl(sv[0], F_SETFL, flags) == -1)
+ err(1, "fcntl +O_NONBLOCK");
+
+ if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 ||
+ errno != EINPROGRESS)
+ err(1, "connect cs");
+
+ sv[1] = accept(ls, NULL, 0);
+ if (sv[1] < 0)
err(1, "accept ls");
- accept_done = true;
+ flags &= ~O_NONBLOCK;
+ if (fcntl(sv[0], F_SETFL, flags) == -1)
+ err(1, "fcntl -O_NONBLOCK");
+
+ close(ls);
+
+ return (0);
+}
+
+static void *
+receiver(void *arg)
+{
+ int s = *(int *)arg;
+ ssize_t rv;
do {
- rv = read(ss, buf, sizeof(buf));
+ rv = read(s, buf, sizeof(buf));
if (rv == -1)
err(2, "read receiver");
if (rv == 0)
@@ -77,65 +121,53 @@ server(void *arg)
return NULL;
}
+static void
+usage(void)
+{
+ errx(1, "usage: %s [-u] <file> <start> <len> <flags>", getprogname());
+}
+
int
main(int argc, char **argv)
{
pthread_t pt;
- struct sockaddr_in sin;
- off_t start, len;
- socklen_t slen;
- int fd, cs, on, flags, error;
+ off_t start;
+ int ch, fd, ss[2], flags, error;
+ bool pf_unix = false;
+
+ while ((ch = getopt(argc, argv, "u")) != -1)
+ switch (ch) {
+ case 'u':
+ pf_unix = true;
+ break;
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
- if (argc != 5)
- errx(1, "usage: %s <file> <start> <len> <flags>",
- getprogname());
+ if (argc != 4)
+ usage();
- start = strtoull(argv[2], NULL, 0);
- len = strtoull(argv[3], NULL, 0);
- flags = strtoul(argv[4], NULL, 0);
+ start = strtoull(argv[1], NULL, 0);
+ readlen = strtoull(argv[2], NULL, 0);
+ flags = strtoul(argv[3], NULL, 0);
- fd = open(argv[1], O_RDONLY);
+ fd = open(argv[0], O_RDONLY);
if (fd < 0)
- err(1, "open");
-
- ls = socket(PF_INET, SOCK_STREAM, 0);
- if (ls < 0)
- err(1, "socket ls");
-
- on = 1;
- if (setsockopt(ls, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
- (socklen_t)sizeof(on)) < 0)
- err(1, "SO_REUSEADDR");
+ err(1, "open");
- sin.sin_len = sizeof(sin);
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- sin.sin_port = 0;
- if (bind(ls, (void *)&sin, sizeof(sin)) < 0)
- err(1, "bind ls");
-
- slen = sizeof(sin);
- if (getsockname(ls, (void *)&sin, &slen) < 0)
- err(1, "getsockname");
-
- if (listen(ls, 5) < 0)
- err(1, "listen ls");
+ if (pf_unix) {
+ if (socketpair(PF_LOCAL, SOCK_STREAM, 0, ss) != 0)
+ err(1, "socketpair");
+ } else
+ tcp_socketpair(ss);
- error = pthread_create(&pt, NULL, server, (void *)(uintptr_t)len);
+ error = pthread_create(&pt, NULL, receiver, &ss[1]);
if (error)
errc(1, error, "pthread_create");
- cs = socket(PF_INET, SOCK_STREAM, 0);
- if (cs < 0)
- err(1, "socket cs");
-
- if (connect(cs, (void *)&sin, sizeof(sin)) < 0)
- err(1, "connect cs");
-
- while (!accept_done)
- usleep(1000);
-
- if (sendfile(fd, cs, start, len, NULL, NULL, flags) < 0)
+ if (sendfile(fd, ss[0], start, readlen, NULL, NULL, flags) < 0)
err(3, "sendfile");
while (!read_done)
diff --git a/tests/sys/kern/sendfile_test.sh b/tests/sys/kern/sendfile_test.sh
index 03d87292f3a3..7e549eec610a 100755
--- a/tests/sys/kern/sendfile_test.sh
+++ b/tests/sys/kern/sendfile_test.sh
@@ -112,12 +112,36 @@ io_fail_async_cleanup()
common_cleanup
}
+atf_test_case unix_success cleanup
+unix_success_head()
+{
+ atf_set "descr" "sendfile via unix(4) where all disk I/O succeeds"
+ atf_set "require.user" "root"
+ atf_set "timeout" 15
+}
+unix_success_body()
+{
+ if [ "$(atf_config_get qemu false)" = "true" ]; then
+ atf_skip "Sendfile(4) unimplemented. https://github.com/qemu-bsd-user/qemu-bsd-user/issues/25"
+ fi
+
+ alloc_md md
+ common_body_setup $md
+
+ atf_check $HELPER -u $FILE 0 0x10000 0x10000
+}
+unix_success_cleanup()
+{
+ common_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case io_success
atf_add_test_case io_fail_sync
atf_add_test_case io_fail_async
+ atf_add_test_case unix_success
}
alloc_md()
diff --git a/tests/sys/net/if_lagg_test.sh b/tests/sys/net/if_lagg_test.sh
index 6b99aaedfbbf..4bdb59c8aab9 100755
--- a/tests/sys/net/if_lagg_test.sh
+++ b/tests/sys/net/if_lagg_test.sh
@@ -83,10 +83,6 @@ status_stress_body()
{
local TAP0 TAP1 LAGG MAC
- if [ "$(atf_config_get ci false)" = "true" ]; then
- atf_skip "Skipping this test because it panics the machine fairly often"
- fi
-
# Configure the lagg interface to use an RFC5737 nonrouteable addresses
ADDR="192.0.2.2"
MASK="24"
@@ -142,8 +138,6 @@ create_destroy_stress_body()
{
local TAP0 TAP1 LAGG MAC
- atf_skip "Skipping this test because it easily panics the machine"
-
TAP0=`get_tap`
TAP1=`get_tap`
TAP2=`get_tap`
@@ -261,8 +255,6 @@ up_destroy_stress_body()
{
local TAP0 TAP1 LAGG MAC SRCDIR
- atf_skip "Skipping this test because it panics the machine fairly often"
-
# Configure the lagg interface to use an RFC5737 nonrouteable addresses
ADDR="192.0.2.2"
MASK="24"
@@ -358,7 +350,6 @@ updown_body()
{
local TAP0 TAP1 LAGG MAC
- atf_expect_fail "PR 226144 Upping a lagg interrface should automatically up its children"
# Configure the lagg interface to use an RFC5737 nonrouteable addresses
ADDR="192.0.2.2"
MASK="24"
diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh
index 0ec2563cf355..22da82312dbc 100644
--- a/tests/sys/net/if_ovpn/if_ovpn.sh
+++ b/tests/sys/net/if_ovpn/if_ovpn.sh
@@ -95,6 +95,10 @@ atf_test_case "4in4" "cleanup"
echo 'foo' | jexec b nc -u -w 2 192.0.2.1 1194
atf_check -s exit:0 -o ignore jexec b ping -c 3 198.51.100.1
+
+ # Test routing loop protection
+ jexec b route add 192.0.2.1 198.51.100.1
+ atf_check -s exit:2 -o ignore jexec b ping -t 1 -c 1 198.51.100.1
}
4in4_cleanup()
@@ -404,6 +408,10 @@ atf_test_case "6in6" "cleanup"
atf_check -s exit:0 -o ignore jexec b ping6 -c 3 2001:db8:1::1
atf_check -s exit:0 -o ignore jexec b ping6 -c 3 -z 16 2001:db8:1::1
+
+ # Test routing loop protection
+ jexec b route add -6 2001:db8::1 2001:db8:1::1
+ atf_check -s exit:2 -o ignore jexec b ping6 -t 1 -c 3 2001:db8:1::1
}
6in6_cleanup()
diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh
index 675ed0090e8c..41dac6222cbb 100755
--- a/tests/sys/net/if_vlan.sh
+++ b/tests/sys/net/if_vlan.sh
@@ -22,8 +22,12 @@ basic_body()
jexec alcatraz ifconfig ${epair_vlan}a up
jexec alcatraz ifconfig ${vlan0} 10.0.0.1/24 up
- vlan1=$(jexec singsing ifconfig vlan create vlandev ${epair_vlan}b \
- vlan 42)
+ vlan1=$(jexec singsing ifconfig vlan create)
+
+ # Test associating the physical interface
+ atf_check -s exit:0 \
+ jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42
+
jexec singsing ifconfig ${epair_vlan}b up
jexec singsing ifconfig ${vlan1} 10.0.0.2/24 up
@@ -37,7 +41,7 @@ basic_body()
# And change back
# Test changing the vlan ID
atf_check -s exit:0 \
- jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42
+ jexec singsing ifconfig ${vlan1} vlan 42 vlandev ${epair_vlan}b
atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1
}
@@ -293,6 +297,42 @@ bpf_pcp_cleanup()
vnet_cleanup
}
+atf_test_case "conflict_id" "cleanup"
+conflict_id_head()
+{
+ atf_set descr 'Test conflicting VLAN IDs, PR #279195'
+ atf_set require.user root
+}
+
+conflict_id_body()
+{
+ vnet_init
+
+ epair=$(vnet_mkepair)
+
+ vnet_mkjail alcatraz ${epair}b
+ vlan_a=$(jexec alcatraz ifconfig vlan create)
+ vlan_b=$(jexec alcatraz ifconfig vlan create)
+
+ jexec alcatraz ifconfig ${vlan_a} vlan 100 vlandev ${epair}b
+ jexec alcatraz ifconfig ${vlan_b} vlan 101 vlandev ${epair}b
+
+ atf_check -s exit:1 -o ignore -e ignore \
+ jexec alcatraz ifconfig ${vlan_a} vlan 101
+
+ atf_check -s exit:0 -o match:"vlan: 100" \
+ jexec alcatraz ifconfig ${vlan_a}
+
+ atf_check -s exit:0 -o ignore -e ignore \
+ jexec alcatraz ifconfig ${vlan_a} vlan 100
+}
+
+conflict_id_cleanup()
+{
+ vnet_cleanup
+
+}
+
atf_init_test_cases()
{
atf_add_test_case "basic"
@@ -302,4 +342,5 @@ atf_init_test_cases()
atf_add_test_case "qinq_dot"
atf_add_test_case "qinq_setflags"
atf_add_test_case "bpf_pcp"
+ atf_add_test_case "conflict_id"
}
diff --git a/tests/sys/netinet/carp.py b/tests/sys/netinet/carp.py
index ac2c5547fe97..0db31e79ba84 100644
--- a/tests/sys/netinet/carp.py
+++ b/tests/sys/netinet/carp.py
@@ -51,3 +51,17 @@ class TestCarp(VnetTestTemplate):
carp_pkts = sc.sniff(iface=if1.name, stop_filter=filter_f, timeout=5)
self.check_carp_src_mac(carp_pkts)
+
+ def test_source_mac_vrrp(self):
+ "Test VRRP packets source address"
+
+ if1 = self.vnet.iface_alias_map["if1"]
+
+ ToolsHelper.print_output(
+ "ifconfig {} add vhid 1 carpver 3 192.0.2.203/24".format(if1.name)
+ )
+
+ carp_pkts = sc.sniff(iface=if1.name, stop_filter=filter_f, timeout=5)
+
+ self.check_carp_src_mac(carp_pkts)
+
diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh
index d08940d433d7..e10e24747c2d 100755
--- a/tests/sys/netinet/carp.sh
+++ b/tests/sys/netinet/carp.sh
@@ -31,7 +31,7 @@ is_master()
jail=$1
itf=$2
- jexec ${jail} ifconfig ${itf} | grep carp | grep MASTER
+ jexec ${jail} ifconfig ${itf} | grep -E '(carp|vrrp)' | grep MASTER
}
wait_for_carp()
@@ -105,6 +105,51 @@ basic_v4_cleanup()
vnet_cleanup
}
+atf_test_case "vrrp_v4" "cleanup"
+vrrp_v4_head()
+{
+ atf_set descr 'Basic VRRP test (IPv4)'
+ atf_set require.user root
+}
+
+vrrp_v4_body()
+{
+ carp_init
+
+ j=vrrp_basic_v4
+
+ bridge=$(vnet_mkbridge)
+ epair_one=$(vnet_mkepair)
+ epair_two=$(vnet_mkepair)
+
+ vnet_mkjail ${j}_one ${bridge} ${epair_one}a ${epair_two}a
+ vnet_mkjail ${j}_two ${epair_one}b
+ vnet_mkjail ${j}_three ${epair_two}b
+
+ jexec ${j}_one ifconfig ${bridge} 192.0.2.4/29 up
+ jexec ${j}_one ifconfig ${bridge} addm ${epair_one}a \
+ addm ${epair_two}a
+ jexec ${j}_one ifconfig ${epair_one}a up
+ jexec ${j}_one ifconfig ${epair_two}a up
+
+ jexec ${j}_two ifconfig ${epair_one}b 192.0.2.202/29 up
+ jexec ${j}_two ifconfig ${epair_one}b add vhid 1 carpver 3 192.0.2.1/29
+
+ jexec ${j}_three ifconfig ${epair_two}b 192.0.2.203/29 up
+ jexec ${j}_three ifconfig ${epair_two}b add vhid 1 carpver 3 \
+ 192.0.2.1/29
+
+ wait_for_carp ${j}_two ${epair_one}b \
+ ${j}_three ${epair_two}b
+
+ atf_check -s exit:0 -o ignore jexec ${j}_one \
+ ping -c 3 192.0.2.1
+}
+
+vrrp_v4_cleanup()
+{
+ vnet_cleanup
+}
atf_test_case "unicast_v4" "cleanup"
unicast_v4_head()
@@ -210,6 +255,55 @@ basic_v6_cleanup()
vnet_cleanup
}
+atf_test_case "vrrp_v6" "cleanup"
+vrrp_v6_head()
+{
+ atf_set descr 'Basic VRRP test (IPv6)'
+ atf_set require.user root
+}
+
+vrrp_v6_body()
+{
+ carp_init
+
+ j=carp_basic_v6
+
+ bridge=$(vnet_mkbridge)
+ epair_one=$(vnet_mkepair)
+ epair_two=$(vnet_mkepair)
+
+ vnet_mkjail ${j}_one ${bridge} ${epair_one}a ${epair_two}a
+ vnet_mkjail ${j}_two ${epair_one}b
+ vnet_mkjail ${j}_three ${epair_two}b
+
+ jexec ${j}_one ifconfig ${bridge} inet6 2001:db8::0:4/64 up \
+ no_dad
+ jexec ${j}_one ifconfig ${bridge} addm ${epair_one}a \
+ addm ${epair_two}a
+ jexec ${j}_one ifconfig ${epair_one}a up
+ jexec ${j}_one ifconfig ${epair_two}a up
+
+ jexec ${j}_two ifconfig ${epair_one}b inet6 \
+ 2001:db8::1:2/64 up no_dad
+ jexec ${j}_two ifconfig ${epair_one}b inet6 add vhid 1 carpver 3 \
+ 2001:db8::0:1/64
+
+ jexec ${j}_three ifconfig ${epair_two}b inet6 2001:db8::1:3/64 up no_dad
+ jexec ${j}_three ifconfig ${epair_two}b inet6 add vhid 1 carpver 3 \
+ 2001:db8::0:1/64
+
+ wait_for_carp ${j}_two ${epair_one}b \
+ ${j}_three ${epair_two}b
+
+ atf_check -s exit:0 -o ignore jexec ${j}_one \
+ ping -6 -c 3 2001:db8::0:1
+}
+
+vrrp_v6_cleanup()
+{
+ vnet_cleanup
+}
+
atf_test_case "unicast_v6" "cleanup"
unicast_v6_head()
{
@@ -469,8 +563,10 @@ switch_cleanup()
atf_init_test_cases()
{
atf_add_test_case "basic_v4"
+ atf_add_test_case "vrrp_v4"
atf_add_test_case "unicast_v4"
atf_add_test_case "basic_v6"
+ atf_add_test_case "vrrp_v6"
atf_add_test_case "unicast_v6"
atf_add_test_case "unicast_ll_v6"
atf_add_test_case "negative_demotion"
diff --git a/tests/sys/netpfil/pf/nat66.py b/tests/sys/netpfil/pf/nat66.py
index 12d3cb25af0a..3a037ac710fc 100644
--- a/tests/sys/netpfil/pf/nat66.py
+++ b/tests/sys/netpfil/pf/nat66.py
@@ -47,7 +47,7 @@ class DelayedSend(threading.Thread):
sp.send(self._packet)
class TestNAT66(VnetTestTemplate):
- REQUIRED_MODUES = [ "pf" ]
+ REQUIRED_MODULES = [ "pf" ]
TOPOLOGY = {
"vnet1": {"ifaces": ["if1"]},
"vnet2": {"ifaces": ["if1", "if2"]},
diff --git a/tests/sys/vm/soxstack/soxstack.c b/tests/sys/vm/soxstack/soxstack.c
index ac7c9cf03746..ecb672c1b6dc 100644
--- a/tests/sys/vm/soxstack/soxstack.c
+++ b/tests/sys/vm/soxstack/soxstack.c
@@ -23,7 +23,7 @@ checkstack(void)
struct kinfo_vmentry *freep, *kve;
struct kinfo_proc *p;
struct procstat *prstat;
- uint64_t stack;
+ uintptr_t stack;
int i, cnt;
prstat = procstat_open_sysctl();
@@ -33,7 +33,7 @@ checkstack(void)
freep = procstat_getvmmap(prstat, p, &cnt);
assert(freep != NULL);
- stack = (uint64_t)&i;
+ stack = (uintptr_t)&i;
for (i = 0; i < cnt; i++) {
kve = &freep[i];
if (stack < kve->kve_start || stack > kve->kve_end)
diff --git a/tools/build/beinstall.sh b/tools/build/beinstall.sh
index 766a3a03739f..7f7481b671f5 100755
--- a/tools/build/beinstall.sh
+++ b/tools/build/beinstall.sh
@@ -45,13 +45,10 @@
BE_UTILITY="${BE_UTILITY:-"bectl"}"
# If not empty, 'pkg upgrade' will be skipped.
NO_PKG_UPGRADE="${NO_PKG_UPGRADE:-""}"
-# Config updater - 'etcupdate' and 'mergemaster' are supported. Set to an
-# empty string to skip.
+# Config updater - 'etcupdate' is supported. Set to an empty string to skip.
CONFIG_UPDATER="${CONFIG_UPDATER:-"etcupdate"}"
# Flags for etcupdate if used.
ETCUPDATE_FLAGS="${ETCUPDATE_FLAGS:-"-F"}"
-# Flags for mergemaster if used.
-MERGEMASTER_FLAGS="${MERGEMASTER_FLAGS:-"-iFU"}"
########################################################################
@@ -122,14 +119,6 @@ create_be_dirs() {
return 0
}
-update_mergemaster_pre() {
- ${MERGEMASTER_CMD} -p -m ${srcdir} -D ${BE_MNTPT} -t ${BE_MM_ROOT} ${MERGEMASTER_FLAGS}
-}
-
-update_mergemaster() {
- ${MERGEMASTER_CMD} -m ${srcdir} -D ${BE_MNTPT} -t ${BE_MM_ROOT} ${MERGEMASTER_FLAGS}
-}
-
update_etcupdate_pre() {
${ETCUPDATE_CMD} -p -s ${srcdir} -D ${BE_MNTPT} ${ETCUPDATE_FLAGS} || return $?
${ETCUPDATE_CMD} resolve -D ${BE_MNTPT} || return $?
@@ -176,7 +165,6 @@ objdir=$(make -V .OBJDIR 2>/dev/null)
## Constants
ETCUPDATE_CMD="${srcdir}/usr.sbin/etcupdate/etcupdate.sh"
-MERGEMASTER_CMD="${srcdir}/usr.sbin/mergemaster/mergemaster.sh"
# May be a worktree, in which case .git is a file, not a directory.
if [ -e .git ] ; then
@@ -206,7 +194,6 @@ BE_TMP=$(mktemp -d /tmp/beinstall.XXXXXX)
[ $? -ne 0 -o ! -d ${BE_TMP} ] && errx "Unable to create mountpoint"
[ -z "$NO_CLEANUP_BE" ] && cleanup_commands="rmdir_be ${cleanup_commands}"
BE_MNTPT=${BE_TMP}/mnt
-BE_MM_ROOT=${BE_TMP}/mergemaster # mergemaster will create
mkdir -p ${BE_MNTPT}
${BE_UTILITY} create ${BENAME} >/dev/null || errx "Unable to create BE ${BENAME}"
diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl
index 99fd354fbacf..24e33712ceda 100755
--- a/tools/build/checkstyle9.pl
+++ b/tools/build/checkstyle9.pl
@@ -2655,7 +2655,7 @@ sub process {
}
if ($has_sob == 0) {
- ERROR("Missing Signed-off-by: line");
+ WARN("Missing Signed-off-by: line");
}
# If we have no input at all, then there is nothing to report on
diff --git a/tools/build/cross-build/include/common/sys/_types.h b/tools/build/cross-build/include/common/sys/_types.h
index 650edc8080d0..408f0537d1e6 100644
--- a/tools/build/cross-build/include/common/sys/_types.h
+++ b/tools/build/cross-build/include/common/sys/_types.h
@@ -45,3 +45,6 @@
* Neither GLibc nor macOS define __va_list but many FreeBSD headers require it.
*/
typedef __builtin_va_list __va_list;
+
+/* Needed for opensolaris compat. */
+typedef __int64_t off64_t;
diff --git a/tools/build/cross-build/include/linux/string.h b/tools/build/cross-build/include/linux/string.h
index 8fac9e0fe083..b6d2fe488d40 100644
--- a/tools/build/cross-build/include/linux/string.h
+++ b/tools/build/cross-build/include/linux/string.h
@@ -44,7 +44,7 @@
*/
#include <stdlib.h>
-#include <sys/cdefs.h>
+#include <sys/types.h>
__BEGIN_DECLS
#if !defined(__GLIBC__) || \
diff --git a/tools/build/cross-build/include/linux/sys/param.h b/tools/build/cross-build/include/linux/sys/param.h
index 33679d39ed49..3b29b9ef8430 100644
--- a/tools/build/cross-build/include/linux/sys/param.h
+++ b/tools/build/cross-build/include/linux/sys/param.h
@@ -45,3 +45,5 @@
* let's use 32 since that will work across all systems
*/
#define MAXLOGNAME 33 /* max login name length (incl. NUL) */
+
+#include <sys/types.h>
diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h
index 770b3057f8a8..2e09cbb62271 100644
--- a/tools/build/cross-build/include/linux/sys/types.h
+++ b/tools/build/cross-build/include/linux/sys/types.h
@@ -35,8 +35,36 @@
*/
#pragma once
+#include <sys/cdefs.h> /* FreeBSD source assumes sys/types.h includes this */
+/*
+ * MUSL doesn't define the __intXX_t that FreeBSD does, but many of our headers
+ * assume that will always be present. Define them here. We assume !defined
+ * __GLIBC__ is musl since musl doesn't have a define to key off of. Thesee
+ * typedefs look backwards, but it's not circular because MUSL never defines the
+ * __*int*_t. Also, we don't have to work in the kernel, so it's OK to include
+ * stdint.h here.
+ */
+#ifndef __GLIBC__
+#include <stdint.h>
+typedef int64_t __int64_t;
+typedef int32_t __int32_t;
+typedef int16_t __int16_t;
+typedef int8_t __int8_t;
+typedef uint64_t __uint64_t;
+typedef uint32_t __uint32_t;
+typedef uint16_t __uint16_t;
+typedef uint8_t __uint8_t;
+#endif
+
#include_next <sys/types.h>
+/*
+ * stddef.h for both gcc and clang will define __size_t when size_t has
+ * been defined (except on *BSD where it doesn't touch __size_t). So if
+ * we're building on Linux, we know that if that's not defined, we have
+ * to typedef __size_t for FreeBSD's use of __size_t in places to work
+ * during bootstrapping.
+ */
#ifndef __size_t
typedef __SIZE_TYPE__ __size_t;
#endif
diff --git a/tools/build/cross-build/include/mac/sys/_types.h b/tools/build/cross-build/include/mac/sys/_types.h
index 5ca37580b85a..8d39fc39f087 100644
--- a/tools/build/cross-build/include/mac/sys/_types.h
+++ b/tools/build/cross-build/include/mac/sys/_types.h
@@ -41,5 +41,3 @@
* __darwin_ct_rune_t exists.
*/
typedef __darwin_ct_rune_t __ct_rune_t;
-/* Needed for opensolaris compat. */
-typedef __int64_t off64_t;
diff --git a/tools/build/cross-build/progname.c b/tools/build/cross-build/progname.c
index 81467627f164..6d396dadb67a 100644
--- a/tools/build/cross-build/progname.c
+++ b/tools/build/cross-build/progname.c
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#include <stdlib.h>
-#ifdef __GLIBC__
+#ifdef __linux__
extern const char *__progname;
const char *
getprogname(void)
@@ -48,4 +48,4 @@ setprogname(const char *progname)
{
__progname = progname;
}
-#endif /* __GLIBC__ */
+#endif /* __linux__ */
diff --git a/tools/build/fcntl.h b/tools/build/fcntl.h
index 6aaf3eef2804..f59f5f7fb20a 100644
--- a/tools/build/fcntl.h
+++ b/tools/build/fcntl.h
@@ -29,6 +29,13 @@
#include_next <fcntl.h>
+/*
+ * On FreeBSD fcntl.h indirectly brings in cdefs.h. On Linux with musl, it does
+ * not. Unconditionally inlude it here since there's no harm in including it
+ * multiple times since we use __BEGIN_DECLS and __END_DECLS from it below.
+ */
+#include <sys/cdefs.h>
+
struct spacectl_range {
off_t r_offset;
off_t r_len;
diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot
index 9f63a7499592..b8a5c7780948 100644
--- a/tools/build/mk/Makefile.boot
+++ b/tools/build/mk/Makefile.boot
@@ -50,6 +50,10 @@ CFLAGS+= -I${SRCTOP}/tools/build/cross-build/include/linux
CFLAGS+= -D_GNU_SOURCE=1
# Needed for sem_init, etc. on Linux (used by usr.bin/sort)
LDADD+= -pthread
+.if exists(/usr/lib/libfts.so) || exists(/usr/lib/libfts.a) || exists(/lib/libfts.so) || exists(/lib/libfts.a)
+# Needed for fts_open, etc. on musl (used by usr.bin/grep)
+LDADD+= -lfts
+.endif
.elif ${.MAKE.OS} == "Darwin"
CFLAGS+= -D_DARWIN_C_SOURCE=1
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 8898a405ea49..c0118bcbf6cb 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -134,7 +134,7 @@ OLD_FILES+=etc/rc.d/autounmountd
OLD_FILES+=usr/sbin/automount
OLD_FILES+=usr/sbin/automountd
OLD_FILES+=usr/sbin/autounmountd
-OLD_FILES+=usr/share/man/man5/autofs.5.gz
+OLD_FILES+=usr/share/man/man4/autofs.4.gz
OLD_FILES+=usr/share/man/man5/auto_master.5.gz
OLD_FILES+=usr/share/man/man8/automount.8.gz
OLD_FILES+=usr/share/man/man8/automountd.8.gz
diff --git a/tools/build/options/WITHOUT_AUTOFS b/tools/build/options/WITHOUT_AUTOFS
index fa8ff52d13e3..4e4047dda97f 100644
--- a/tools/build/options/WITHOUT_AUTOFS
+++ b/tools/build/options/WITHOUT_AUTOFS
@@ -1,3 +1,3 @@
Do not build
-.Xr autofs 5
+.Xr autofs 4
related programs, libraries, and kernel modules.
diff --git a/tools/build/options/WITHOUT_BRANCH_PROTECTION b/tools/build/options/WITHOUT_BRANCH_PROTECTION
new file mode 100644
index 000000000000..97b459b53c92
--- /dev/null
+++ b/tools/build/options/WITHOUT_BRANCH_PROTECTION
@@ -0,0 +1 @@
+Build with branch protection disabled.
diff --git a/tools/build/options/WITHOUT_SSP b/tools/build/options/WITHOUT_SSP
index 88162cecf14a..7a773fe1e5aa 100644
--- a/tools/build/options/WITHOUT_SSP
+++ b/tools/build/options/WITHOUT_SSP
@@ -1 +1,4 @@
Do not build world with stack smashing protection.
+See
+.Xr security 7
+for more information.
diff --git a/tools/build/options/WITHOUT_UNDEFINED_VERSION b/tools/build/options/WITHOUT_UNDEFINED_VERSION
deleted file mode 100644
index 0e58eb00f3c1..000000000000
--- a/tools/build/options/WITHOUT_UNDEFINED_VERSION
+++ /dev/null
@@ -1,2 +0,0 @@
-Link libraries with --no-undefined-version to ensure all symbols are
-provided.
diff --git a/tools/build/options/WITH_BRANCH_PROTECTION b/tools/build/options/WITH_BRANCH_PROTECTION
new file mode 100644
index 000000000000..3326aa5db965
--- /dev/null
+++ b/tools/build/options/WITH_BRANCH_PROTECTION
@@ -0,0 +1,4 @@
+Build with branch protection enabled.
+On arm64 enable the use of pointer authentication and
+branch target identification instructions on arm64.
+These can be used to help mitigate some exploit techniques.
diff --git a/tools/build/options/WITH_SSP b/tools/build/options/WITH_SSP
index 0088dd133782..4f06a73d4173 100644
--- a/tools/build/options/WITH_SSP
+++ b/tools/build/options/WITH_SSP
@@ -1 +1,4 @@
Build world with stack smashing protection.
+See
+.Xr security 7
+for more information.
diff --git a/tools/build/options/WITH_UNDEFINED_VERSION b/tools/build/options/WITH_UNDEFINED_VERSION
new file mode 100644
index 000000000000..71b048349a6f
--- /dev/null
+++ b/tools/build/options/WITH_UNDEFINED_VERSION
@@ -0,0 +1,4 @@
+Link libraries with --undefined-version which permits version maps to
+contain symbols that are not present in the library.
+If this is necessicary to build a particular configuration, a bug is
+present and the configuration should be reported.
diff --git a/tools/build/options/makeman b/tools/build/options/makeman
index 30416b03b983..e0980d3be607 100755
--- a/tools/build/options/makeman
+++ b/tools/build/options/makeman
@@ -379,12 +379,18 @@ EOF
The following options accept a single value from a list of valid values.
.Bl -tag -width indent
EOF
+ prev_opt=
show_group_options |
while read opt ; do
if [ ! -f ${opt} ] ; then
echo "no description found for ${opt}, skipping" >&2
continue
fi
+ if [ $opt = "$prev_opt" ]; then
+ echo "ignoring duplicate option $opt" >&2
+ continue
+ fi
+ prev_opt=$opt
echo ".It Va ${opt}"
cat ${opt}
diff --git a/tools/regression/iscsi/initiator-instructions.txt b/tools/regression/iscsi/initiator-instructions.txt
index 11c3311cddb2..e99ff87fe379 100644
--- a/tools/regression/iscsi/initiator-instructions.txt
+++ b/tools/regression/iscsi/initiator-instructions.txt
@@ -3,9 +3,9 @@ How to prepare initiator virtual machines for iSCSI target testing
1. Install operating systems.
- - FreeBSD: Use default settings for everything. Don't install
- ports from the system installer, use "portsnap fetch extract"
- after installation instead.
+ - FreeBSD: Use default settings for everything. Don't install ports
+ from the system installer, fetch a new ports tree after
+ installation instead.
- Fedora: Change the environment to "Minimal install".
diff --git a/tools/tools/build_option_survey/option_survey.sh b/tools/tools/build_option_survey/option_survey.sh
index 46ce167c49d9..c787125c9acd 100644
--- a/tools/tools/build_option_survey/option_survey.sh
+++ b/tools/tools/build_option_survey/option_survey.sh
@@ -117,7 +117,7 @@ trap "umount ${MNT} || true; mdconfig -d -u $MDUNIT" 1 2 15 EXIT
umount $MNT || true
mdconfig -d -u $MDUNIT || true
-dd if=/dev/zero of=${ODIR}/imgfile bs=1m count=4096
+dd if=/dev/zero of=${ODIR}/imgfile bs=1m count=5120
mdconfig -a -t vnode -f ${ODIR}/imgfile -u $MDUNIT
# Build & install the reference world
diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c
index 2db283e4f65b..ef3e225e94f6 100644
--- a/tools/tools/crypto/cryptocheck.c
+++ b/tools/tools/crypto/cryptocheck.c
@@ -136,7 +136,7 @@
* aes-ccm128 128-bit AES-CCM
* aes-ccm192 192-bit AES-CCM
* aes-ccm256 256-bit AES-CCM
- * chacha20-poly1305 Chacha20 with Poly1305 per RFC 8439
+ * chacha20-poly1305 Chacha20 (96 bit nonce) with Poly1305 per RFC 8439
*/
#include <sys/param.h>
@@ -253,7 +253,7 @@ static const struct alg {
.evp_cipher = EVP_aes_256_ccm },
{ .name = "chacha20-poly1305", .cipher = CRYPTO_CHACHA20_POLY1305,
.type = T_AEAD, .tag_len = POLY1305_HASH_LEN,
- .iv_sizes = { CHACHA20_POLY1305_IV_LEN, 8 },
+ .iv_sizes = { CHACHA20_POLY1305_IV_LEN },
.evp_cipher = EVP_chacha20_poly1305 },
};
diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1
index e449875c5043..5ada942d13a9 100644
--- a/tools/tools/git/git-arc.1
+++ b/tools/tools/git/git-arc.1
@@ -50,6 +50,7 @@
.Op Ar commit ... Ns | Ns Ar commit-range
.Nm
.Cm update
+.Op Fl l
.Op Fl m Ar message
.Op Ar commit ... Ns | Ns Ar commit-range
.Sh DESCRIPTION
@@ -117,6 +118,11 @@ each revision.
If an empty message is supplied via
.Fl m ,
then no notes will be added when updating Differential Revisions.
+.Pp
+If
+.Fl l
+is used, display list of commits to be updated and wait for confirmation
+of the list rather than prompting for each commit.
.El
.Sh CONFIGURATION
These are manipulated by
@@ -138,9 +144,9 @@ Defaults to false.
Always use
.Dq list mode
.Pq Fl l
-with create.
-In this mode, the list of git revisions to create reviews for
-is listed with a single prompt before creating reviews.
+with create and update.
+In this mode, the list of git revisions to use
+is listed with a single prompt before creating or updating reviews.
The diffs for individual commits are not shown.
Defaults to false.
.It Va arc.verbose
@@ -227,6 +233,13 @@ List the status of reviews for all the commits in the branch
.Bd -literal -offset indent
$ git arc list main..feature
.Ed
+.Pp
+Update reviews for all commits in the branch
+.Dq feature
+after rebasing:
+.Bd -literal -offset indent
+$ git arc update -lm "Rebase" main..feature
+.Ed
.Sh SEE ALSO
.Xr build 7 ,
.Xr development 7
diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
index 1c828f3194af..e8da1f1ed32a 100644
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -53,7 +53,7 @@ Commands:
list <commit>|<commit range>
patch [-c] <diff1> [<diff2> ...]
stage [-b branch] [<commit>|<commit range>]
- update [-m message] [<commit>|<commit range>]
+ update [-l] [-m message] [<commit>|<commit range>]
Description:
Create or manage FreeBSD Phabricator reviews based on git commits. There
@@ -100,11 +100,11 @@ Config Variables:
arc.browse [bool] -- Try to open newly created reviews in a browser tab.
Defaults to false.
- arc.list [bool] -- Always use "list mode" (-l) with create. In this
- mode, the list of git revisions to create reviews for
- is listed with a single prompt before creating
- reviews. The diffs for individual commits are not
- shown.
+ arc.list [bool] -- Always use "list mode" (-l) with create and update.
+ In this mode, the list of git revisions to use
+ is listed with a single prompt before creating or
+ updating reviews. The diffs for individual commits
+ are not shown.
arc.verbose [bool] -- Verbose output. Equivalent to the -v flag.
@@ -669,10 +669,18 @@ gitarc__stage()
gitarc__update()
{
- local commit commits diff have_msg msg
+ local commit commits diff doprompt have_msg list o msg
- while getopts m: o; do
+ list=
+ if [ "$(git config --bool --get arc.list 2>/dev/null || echo false)" != "false" ]; then
+ list=1
+ fi
+ doprompt=1
+ while getopts lm: o; do
case "$o" in
+ l)
+ list=1
+ ;;
m)
msg="$OPTARG"
have_msg=1
@@ -685,10 +693,21 @@ gitarc__update()
shift $((OPTIND-1))
commits=$(build_commit_list "$@")
+
+ if [ "$list" ]; then
+ for commit in ${commits}; do
+ git --no-pager show --oneline --no-patch "$commit"
+ done | git_pager
+ if ! prompt; then
+ return
+ fi
+ doprompt=
+ fi
+
for commit in ${commits}; do
diff=$(commit2diff "$commit")
- if ! show_and_prompt "$commit"; then
+ if [ "$doprompt" ] && ! show_and_prompt "$commit"; then
break
fi
diff --git a/tools/tools/nvmf/nvmfdd/Makefile b/tools/tools/nvmf/nvmfdd/Makefile
new file mode 100644
index 000000000000..8620d23ccf04
--- /dev/null
+++ b/tools/tools/nvmf/nvmfdd/Makefile
@@ -0,0 +1,9 @@
+.include <src.opts.mk>
+
+PACKAGE=nvme-tools
+PROG= nvmfdd
+CFLAGS+= -I${SRCTOP}/lib/libnvmf
+MAN=
+LIBADD+= nvmf
+
+.include <bsd.prog.mk>
diff --git a/tools/tools/nvmf/nvmfdd/nvmfdd.c b/tools/tools/nvmf/nvmfdd/nvmfdd.c
new file mode 100644
index 000000000000..0f181682aac2
--- /dev/null
+++ b/tools/tools/nvmf/nvmfdd/nvmfdd.c
@@ -0,0 +1,493 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/socket.h>
+#include <err.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <libnvmf.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
+#include <netinet/in.h>
+
+static struct controller_info {
+ uint32_t ioccsz;
+ uint32_t nn;
+ uint16_t mqes;
+ bool disconnect_supported;
+} info;
+
+enum rw { READ, WRITE };
+
+static bool data_digests, flow_control_disable, header_digests;
+
+static void
+usage(void)
+{
+ fprintf(stderr, "nvmfdd [-FGg] [-c cntlid] [-t transport] [-o offset] [-l length] [-n nsid]\n"
+ "\tread|write <address:port> <nqn>\n");
+ exit(1);
+}
+
+static void
+tcp_association_params(struct nvmf_association_params *params)
+{
+ params->tcp.pda = 0;
+ params->tcp.header_digests = header_digests;
+ params->tcp.data_digests = data_digests;
+ params->tcp.maxr2t = 1;
+}
+
+static void
+tcp_qpair_params(struct nvmf_qpair_params *params, bool admin,
+ const char *address, const char *port)
+{
+ struct addrinfo hints, *ai, *list;
+ int error, s;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ error = getaddrinfo(address, port, &hints, &list);
+ if (error != 0)
+ errx(1, "%s", gai_strerror(error));
+
+ for (ai = list; ai != NULL; ai = ai->ai_next) {
+ s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+ if (s == -1)
+ continue;
+
+ if (connect(s, ai->ai_addr, ai->ai_addrlen) != 0) {
+ close(s);
+ continue;
+ }
+
+ params->admin = admin;
+ params->tcp.fd = s;
+ freeaddrinfo(list);
+ return;
+ }
+ err(1, "Failed to connect to controller");
+}
+
+static struct nvmf_qpair *
+connect_admin_queue(struct nvmf_association *na,
+ const struct nvmf_qpair_params *params, const uint8_t hostid[16],
+ uint16_t cntlid, const char *hostnqn, const char *subnqn)
+{
+ struct nvme_controller_data cdata;
+ struct nvmf_qpair *qp;
+ uint64_t cap, cc, csts;
+ u_int mps, mpsmin, mpsmax;
+ int error, timo;
+
+ qp = nvmf_connect(na, params, 0, NVMF_MIN_ADMIN_MAX_SQ_SIZE, hostid,
+ cntlid, subnqn, hostnqn, 0);
+ if (qp == NULL)
+ return (NULL);
+
+ error = nvmf_read_property(qp, NVMF_PROP_CAP, 8, &cap);
+ if (error != 0)
+ errc(1, error, "Failed to fetch CAP");
+
+ /* Require the NVM command set. */
+ if (NVME_CAP_HI_CSS_NVM(cap >> 32) == 0)
+ errx(1, "Controller does not support the NVM command set");
+
+ /* Prefer native host page size if it fits. */
+ mpsmin = NVMEV(NVME_CAP_HI_REG_MPSMIN, cap >> 32);
+ mpsmax = NVMEV(NVME_CAP_HI_REG_MPSMAX, cap >> 32);
+ mps = ffs(getpagesize()) - 1;
+ if (mps < mpsmin + 12)
+ mps = mpsmin;
+ else if (mps > mpsmax + 12)
+ mps = mpsmax;
+ else
+ mps -= 12;
+
+ /* Configure controller. */
+ error = nvmf_read_property(qp, NVMF_PROP_CC, 4, &cc);
+ if (error != 0)
+ errc(1, error, "Failed to fetch CC");
+
+ /* Clear known fields preserving any reserved fields. */
+ cc &= ~(NVMEM(NVME_CC_REG_IOCQES) | NVMEM(NVME_CC_REG_IOSQES) |
+ NVMEM(NVME_CC_REG_SHN) | NVMEM(NVME_CC_REG_AMS) |
+ NVMEM(NVME_CC_REG_MPS) | NVMEM(NVME_CC_REG_CSS));
+
+ cc |= NVMEF(NVME_CC_REG_IOCQES, 4); /* CQE entry size == 16 */
+ cc |= NVMEF(NVME_CC_REG_IOSQES, 6); /* SQE entry size == 64 */
+ cc |= NVMEF(NVME_CC_REG_AMS, 0); /* AMS 0 (Round-robin) */
+ cc |= NVMEF(NVME_CC_REG_MPS, mps);
+ cc |= NVMEF(NVME_CC_REG_CSS, 0); /* NVM command set */
+ cc |= NVMEF(NVME_CC_REG_EN, 1); /* EN = 1 */
+
+ error = nvmf_write_property(qp, NVMF_PROP_CC, 4, cc);
+ if (error != 0)
+ errc(1, error, "Failed to set CC");
+
+ /* Wait for CSTS.RDY in Controller Status */
+ timo = NVME_CAP_LO_TO(cap);
+ for (;;) {
+ error = nvmf_read_property(qp, NVMF_PROP_CSTS, 4, &csts);
+ if (error != 0)
+ errc(1, error, "Failed to fetch CSTS");
+
+ if (NVMEV(NVME_CSTS_REG_RDY, csts) != 0)
+ break;
+
+ if (timo == 0)
+ errx(1, "Controller failed to become ready");
+ timo--;
+ usleep(500 * 1000);
+ }
+
+ /* Fetch controller data. */
+ error = nvmf_host_identify_controller(qp, &cdata);
+ if (error != 0)
+ errc(1, error, "Failed to fetch controller data");
+
+ nvmf_update_assocation(na, &cdata);
+
+ info.mqes = NVME_CAP_LO_MQES(cap);
+ info.nn = cdata.nn;
+ info.ioccsz = cdata.ioccsz;
+ info.disconnect_supported = (cdata.ofcs & 1) != 0;
+
+ return (qp);
+}
+
+static void
+shutdown_controller(struct nvmf_qpair *qp)
+{
+ uint64_t cc;
+ int error;
+
+ error = nvmf_read_property(qp, NVMF_PROP_CC, 4, &cc);
+ if (error != 0)
+ errc(1, error, "Failed to fetch CC");
+
+ cc |= NVMEF(NVME_CC_REG_SHN, NVME_SHN_NORMAL);
+
+ error = nvmf_write_property(qp, NVMF_PROP_CC, 4, cc);
+ if (error != 0)
+ errc(1, error, "Failed to set CC to trigger shutdown");
+
+ nvmf_free_qpair(qp);
+}
+
+static void
+disconnect_queue(struct nvmf_qpair *qp)
+{
+ nvmf_free_qpair(qp);
+}
+
+static int
+validate_namespace(struct nvmf_qpair *qp, u_int nsid, u_int *block_size)
+{
+ struct nvme_namespace_data nsdata;
+ int error;
+ uint8_t lbads, lbaf;
+
+ if (nsid > info.nn) {
+ warnx("Invalid namespace ID %u", nsid);
+ return (ERANGE);
+ }
+
+ error = nvmf_host_identify_namespace(qp, nsid, &nsdata);
+ if (error != 0) {
+ warnc(error, "Failed to identify namespace");
+ return (error);
+ }
+
+ nvme_namespace_data_swapbytes(&nsdata);
+
+ if (NVMEV(NVME_NS_DATA_DPS_PIT, nsdata.dps) != 0) {
+ warnx("End-to-end data protection is not supported");
+ return (EINVAL);
+ }
+
+ lbaf = NVMEV(NVME_NS_DATA_FLBAS_FORMAT, nsdata.flbas);
+ if (lbaf > nsdata.nlbaf) {
+ warnx("Invalid LBA format index");
+ return (EINVAL);
+ }
+
+ if (NVMEV(NVME_NS_DATA_LBAF_MS, nsdata.lbaf[lbaf]) != 0) {
+ warnx("Namespaces with metadata are not supported");
+ return (EINVAL);
+ }
+
+ lbads = NVMEV(NVME_NS_DATA_LBAF_LBADS, nsdata.lbaf[lbaf]);
+ if (lbads == 0) {
+ warnx("Invalid LBA format index");
+ return (EINVAL);
+ }
+
+ *block_size = 1 << lbads;
+ fprintf(stderr, "Detected block size %u\n", *block_size);
+ return (0);
+}
+
+static int
+nvmf_io_command(struct nvmf_qpair *qp, u_int nsid, enum rw command,
+ uint64_t slba, uint16_t nlb, void *buffer, size_t length)
+{
+ struct nvme_command cmd;
+ const struct nvme_completion *cqe;
+ struct nvmf_capsule *cc, *rc;
+ int error;
+ uint16_t status;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.opc = command == WRITE ? NVME_OPC_WRITE : NVME_OPC_READ;
+ cmd.nsid = htole32(nsid);
+ cmd.cdw10 = htole32(slba);
+ cmd.cdw11 = htole32(slba >> 32);
+ cmd.cdw12 = htole32(nlb - 1);
+ /* Sequential Request in cdw13? */
+
+ cc = nvmf_allocate_command(qp, &cmd);
+ if (cc == NULL)
+ return (errno);
+
+ error = nvmf_capsule_append_data(cc, buffer, length,
+ command == WRITE);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_transmit_command(cc);
+ if (error != 0) {
+ nvmf_free_capsule(cc);
+ return (error);
+ }
+
+ error = nvmf_host_wait_for_response(cc, &rc);
+ nvmf_free_capsule(cc);
+ if (error != 0)
+ return (error);
+
+ cqe = nvmf_capsule_cqe(rc);
+ status = le16toh(cqe->status);
+ if (status != 0) {
+ printf("NVMF: %s failed, status %#x\n", command == WRITE ?
+ "WRITE" : "READ", status);
+ nvmf_free_capsule(rc);
+ return (EIO);
+ }
+
+ nvmf_free_capsule(rc);
+ return (0);
+}
+
+static int
+nvmf_io(struct nvmf_qpair *qp, u_int nsid, u_int block_size, enum rw command,
+ off_t offset, off_t length)
+{
+ char *buf;
+ ssize_t rv;
+ u_int todo;
+ int error;
+
+ if (offset % block_size != 0) {
+ warnx("Misaligned offset");
+ return (EINVAL);
+ }
+ if (length % block_size != 0 && command == WRITE)
+ warnx("Length is not multiple of block size, will zero pad");
+
+ buf = malloc(block_size);
+ error = 0;
+ while (length != 0) {
+ todo = length;
+ if (todo > block_size)
+ todo = block_size;
+
+ if (command == WRITE) {
+ rv = read(STDIN_FILENO, buf, todo);
+ if (rv == -1) {
+ error = errno;
+ break;
+ }
+ if (rv != todo) {
+ warn("Short read on input");
+ error = EIO;
+ break;
+ }
+
+ if (todo < block_size)
+ memset(buf + todo, 0, block_size - todo);
+ }
+
+ error = nvmf_io_command(qp, nsid, command, offset / block_size,
+ 1, buf, block_size);
+ if (error != 0) {
+ warnc(error, "Failed I/O request");
+ break;
+ }
+
+ if (command == READ)
+ (void)write(STDOUT_FILENO, buf, todo);
+
+ offset += block_size;
+ length -= todo;
+ }
+
+ free(buf);
+ return (error);
+}
+
+int
+main(int ac, char **av)
+{
+ const char *transport;
+ char *address, *port;
+ enum rw command;
+ struct nvmf_association_params aparams;
+ struct nvmf_qpair_params qparams;
+ struct nvmf_association *na;
+ struct nvmf_qpair *admin, *io;
+ char hostnqn[NVMF_NQN_MAX_LEN];
+ uint8_t hostid[16];
+ enum nvmf_trtype trtype;
+ off_t offset, length;
+ int ch, error;
+ u_int block_size, cntlid, nsid, queues;
+
+ cntlid = NVMF_CNTLID_DYNAMIC;
+ offset = 0;
+ length = 512;
+ nsid = 1;
+ port = NULL;
+ transport = "tcp";
+ while ((ch = getopt(ac, av, "FGc:gl:n:o:p:t:")) != -1) {
+ switch (ch) {
+ case 'F':
+ flow_control_disable = true;
+ break;
+ case 'G':
+ data_digests = true;
+ break;
+ case 'c':
+ if (strcasecmp(optarg, "dynamic") == 0)
+ cntlid = NVMF_CNTLID_DYNAMIC;
+ else if (strcasecmp(optarg, "static") == 0)
+ cntlid = NVMF_CNTLID_STATIC_ANY;
+ else
+ cntlid = strtoul(optarg, NULL, 0);
+ break;
+ case 'g':
+ header_digests = true;
+ break;
+ case 'l':
+ length = strtoumax(optarg, NULL, 0);
+ break;
+ case 'n':
+ nsid = strtoul(optarg, NULL, 0);
+ break;
+ case 'o':
+ offset = strtoumax(optarg, NULL, 0);
+ break;
+ case 't':
+ transport = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ av += optind;
+ ac -= optind;
+
+ if (ac != 3)
+ usage();
+
+ if (nsid == 0 || nsid >= 0xffffffff)
+ errx(1, "Invalid namespace ID %u", nsid);
+
+ if (strcasecmp(av[0], "read") == 0)
+ command = READ;
+ else if (strcasecmp(av[0], "write") == 0)
+ command = WRITE;
+ else
+ errx(1, "Invalid command %s", av[0]);
+
+ address = av[1];
+ port = strrchr(address, ':');
+ if (port == NULL || port[1] == '\0')
+ errx(1, "Invalid address %s", address);
+ *port = '\0';
+ port++;
+
+ memset(&aparams, 0, sizeof(aparams));
+ aparams.sq_flow_control = !flow_control_disable;
+ if (strcasecmp(transport, "tcp") == 0) {
+ trtype = NVMF_TRTYPE_TCP;
+ tcp_association_params(&aparams);
+ } else
+ errx(1, "Invalid transport %s", transport);
+
+ error = nvmf_hostid_from_hostuuid(hostid);
+ if (error != 0)
+ errc(1, error, "Failed to generate hostid");
+ error = nvmf_nqn_from_hostuuid(hostnqn);
+ if (error != 0)
+ errc(1, error, "Failed to generate host NQN");
+
+ na = nvmf_allocate_association(trtype, false, &aparams);
+ if (na == NULL)
+ err(1, "Failed to create association");
+
+ memset(&qparams, 0, sizeof(qparams));
+ tcp_qpair_params(&qparams, true, address, port);
+
+ admin = connect_admin_queue(na, &qparams, hostid, cntlid, hostnqn,
+ av[2]);
+ if (admin == NULL)
+ errx(1, "Failed to create admin queue: %s",
+ nvmf_association_error(na));
+
+ error = validate_namespace(admin, nsid, &block_size);
+ if (error != 0) {
+ shutdown_controller(admin);
+ nvmf_free_association(na);
+ return (1);
+ }
+
+ error = nvmf_host_request_queues(admin, 1, &queues);
+ if (error != 0) {
+ shutdown_controller(admin);
+ nvmf_free_association(na);
+ errc(1, error, "Failed to request I/O queues");
+ }
+
+ memset(&qparams, 0, sizeof(qparams));
+ tcp_qpair_params(&qparams, false, address, port);
+
+ io = nvmf_connect(na, &qparams, 1, info.mqes + 1, hostid,
+ nvmf_cntlid(admin), av[2], hostnqn, 0);
+ if (io == NULL) {
+ warn("Failed to create I/O queue: %s",
+ nvmf_association_error(na));
+ shutdown_controller(admin);
+ nvmf_free_association(na);
+ return (1);
+ }
+ nvmf_free_association(na);
+
+ error = nvmf_io(io, nsid, block_size, command, offset, length);
+
+ disconnect_queue(io);
+ shutdown_controller(admin);
+ return (error == 0 ? 0 : 1);
+}
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 0a584a18d14a..a9d5c1563797 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -87,6 +87,7 @@ SUBDIR= alias \
lzmainfo \
m4 \
mandoc \
+ mdo \
mesg \
ministat \
mkdep \
diff --git a/usr.bin/bmake/Makefile b/usr.bin/bmake/Makefile
index 5a0bf44fb0fb..b243cd0275b6 100644
--- a/usr.bin/bmake/Makefile
+++ b/usr.bin/bmake/Makefile
@@ -11,7 +11,7 @@ CFLAGS+= -I${.CURDIR}
CLEANDIRS+= FreeBSD
CLEANFILES+= bootstrap
-# $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $
+# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $
PROG?= ${.CURDIR:T}
@@ -60,7 +60,7 @@ CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
-.for x in FORCE_MACHINE FORCE_MACHINE_ARCH
+.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH
.ifdef $x
COPTS.main.c+= "-D$x=\"${$x}\""
.endif
diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config
index 88ec643b8a4a..e62d207b70ac 100644
--- a/usr.bin/bmake/Makefile.config
+++ b/usr.bin/bmake/Makefile.config
@@ -6,11 +6,12 @@ SRCTOP?= ${.CURDIR:H:H}
# things set by configure
-_MAKE_VERSION?=20240309
+_MAKE_VERSION?=20240520
prefix?= /usr
srcdir= ${SRCTOP}/contrib/bmake
CC?= cc
+MAKE_OS?=
DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk
EGREP = egrep
diff --git a/usr.bin/bmake/config.h b/usr.bin/bmake/config.h
index 281e105d853d..3ca313216962 100644
--- a/usr.bin/bmake/config.h
+++ b/usr.bin/bmake/config.h
@@ -282,7 +282,7 @@
#define PACKAGE_NAME "bmake"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "bmake 20240212"
+#define PACKAGE_STRING "bmake 20240314"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "bmake"
@@ -291,7 +291,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "20240212"
+#define PACKAGE_VERSION "20240314"
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile
index dcec9297828c..a461d0c874c9 100644
--- a/usr.bin/bmake/unit-tests/Makefile
+++ b/usr.bin/bmake/unit-tests/Makefile
@@ -1,9 +1,9 @@
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
-# $Id: Makefile,v 1.211 2024/03/10 17:46:44 sjg Exp $
+# $Id: Makefile,v 1.216 2024/04/30 16:42:50 sjg Exp $
#
-# $NetBSD: Makefile,v 1.342 2024/01/07 02:07:44 sjg Exp $
+# $NetBSD: Makefile,v 1.344 2024/04/30 16:41:32 sjg Exp $
#
# Unit tests for make(1)
#
@@ -477,20 +477,11 @@ BROKEN_TESTS+= sh-flags
BROKEN_TESTS+= varmod-localtime
.endif
-.if ${.MAKE.OS:NCYGWIN*} == ""
-BROKEN_TESTS+= \
- export \
- opt-chdir \
- opt-keep-going-indirect \
-
-.endif
-
-
.if ${.MAKE.OS:NDarwin} == ""
BROKEN_TESTS+= shell-ksh
.endif
-.if ${.MAKE.OS:MIRIX*} != ""
+.if ${.MAKE.OS:NIRIX*} == ""
BROKEN_TESTS+= \
cmd-interrupt \
deptgt-interrupt \
@@ -576,6 +567,9 @@ SED_CMDS.directive-include-guard= \
-e '/^ParseDependency/d' \
-e '/^ParseEOF:/d'
SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d'
+.if ${.MAKE.OS:NCygwin} == ""
+SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d'
+.endif
SED_CMDS.export-all= ${SED_CMDS.export}
SED_CMDS.export-env= ${SED_CMDS.export}
SED_CMDS.cmdline= -e 's,uid${.MAKE.UID}/,,'
@@ -628,7 +622,7 @@ SED_CMDS.var-op-shell+= ${STD_SED_CMDS.shell}
SED_CMDS.var-op-shell+= -e '/command/s,No such.*,not found,'
SED_CMDS.var-op-shell+= ${STD_SED_CMDS.white-space}
SED_CMDS.vardebug+= -e 's,${.SHELL},</path/to/shell>,'
-SED_CMDS.varmod-mtime+= -e "s,': .*,': <ENOENT>,"
+SED_CMDS.varmod-mtime+= -e "s,\(.*\)': .*,\1': <ENOENT>,"
SED_CMDS.varmod-subst-regex+= ${STD_SED_CMDS.regex}
SED_CMDS.varparse-errors+= ${STD_SED_CMDS.timestamp}
SED_CMDS.varname-dot-make-meta-ignore_filter+= ${SED_CMDS.meta-ignore}
@@ -658,8 +652,9 @@ unexport-env.rawout: export.mk
# In tests that use the debugging option -dd, ignore debugging output that is
# only logged in -DCLEANUP mode.
-STD_SED_CMDS.dd= -e '/^OpenDirs_Done:/d'
-STD_SED_CMDS.dd+= -e '/^CachedDir /d'
+STD_SED_CMDS.dd= -e '/^OpenDirs_Done:/d'
+STD_SED_CMDS.dd+= -e '/^CachedDir /d'
+STD_SED_CMDS.dd+= -e 's, ${DEFSYSPATH:U/usr/share/mk} , <defsyspath> ,'
# Omit details such as process IDs from the output of the -dg1 option.
STD_SED_CMDS.dg1= -e '/\#.* \.$$/d'
@@ -765,12 +760,10 @@ TOOL_TR?= tr
TOOL_DIFF?= diff
DIFF_FLAGS?= -u
-.if defined(.PARSEDIR)
# ensure consistent results from sort(1)
LC_ALL= C
LANG= C
.export LANG LC_ALL
-.endif
.if ${.MAKE.MODE:Unormal:Mmeta} != ""
# we don't need the noise
diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c
index 67aab0de91b5..c3fe255a294d 100644
--- a/usr.bin/diff/diff.c
+++ b/usr.bin/diff/diff.c
@@ -26,11 +26,11 @@
#include <err.h>
#include <errno.h>
#include <getopt.h>
-#include <stdlib.h>
+#include <limits.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
#include "diff.h"
#include "xmalloc.h"
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c
index 539f537a08c3..8d12e868f90e 100644
--- a/usr.bin/diff/diffdir.c
+++ b/usr.bin/diff/diffdir.c
@@ -26,10 +26,10 @@
#include <err.h>
#include <errno.h>
#include <fnmatch.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <limits.h>
#include <unistd.h>
#include "diff.h"
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index 06d914215b11..6073feebf5fb 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -408,7 +408,8 @@ diffreg_stone(char *file1, char *file2, int flags, int capsicum)
}
if (diff_format == D_BRIEF && ignore_pats == NULL &&
- (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|D_STRIPCR)) == 0)
+ (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|
+ D_SKIPBLANKLINES|D_STRIPCR)) == 0)
{
rval = D_DIFFER;
status |= 1;
diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c
index 39b359422f39..a7a40ec12ec9 100644
--- a/usr.bin/diff/diffreg_new.c
+++ b/usr.bin/diff/diffreg_new.c
@@ -15,20 +15,22 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
#include <sys/capsicum.h>
+#ifndef DIFF_NO_MMAP
#include <sys/mman.h>
+#endif
#include <sys/stat.h>
-#include <sys/types.h>
#include <capsicum_helpers.h>
#include <err.h>
#include <fcntl.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
-#include <time.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include "diff.h"
@@ -216,10 +218,14 @@ diffreg_new(char *file1, char *file2, int flags, int capsicum)
rc = D_ERROR;
goto done;
}
+ if (left.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED)
+ warnx("%s truncated", file1);
if (diff_atomize_file(&right, cfg, f2, (uint8_t *)str2, st2.st_size, diff_flags)) {
rc = D_ERROR;
goto done;
}
+ if (right.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED)
+ warnx("%s truncated", file2);
result = diff_main(cfg, &left, &right);
if (result->rc != DIFF_RC_OK) {
@@ -266,10 +272,12 @@ done:
diff_result_free(result);
diff_data_free(&left);
diff_data_free(&right);
+#ifndef DIFF_NO_MMAP
if (str1)
munmap(str1, st1.st_size);
if (str2)
munmap(str2, st2.st_size);
+#endif
fclose(f1);
fclose(f2);
diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh
index 146c23fa303d..ab731fa32d26 100755
--- a/usr.bin/diff/tests/diff_test.sh
+++ b/usr.bin/diff/tests/diff_test.sh
@@ -11,6 +11,7 @@ atf_test_case brief_format
atf_test_case b230049
atf_test_case stripcr_o
atf_test_case b252515
+atf_test_case b278988
atf_test_case Bflag
atf_test_case Nflag
atf_test_case tabsize
@@ -89,6 +90,14 @@ b252515_body()
diff -qw b252515_a.in b252515_b.in
}
+b278988_body()
+{
+ printf 'a\nb\nn' > b278988.a.in
+ printf 'a\n\nb\nn' > b278988.b.in
+ atf_check -o empty -s eq:0 \
+ diff -Bw b278988.a.in b278988.b.in
+}
+
header_body()
{
export TZ=UTC
@@ -369,6 +378,7 @@ atf_init_test_cases()
atf_add_test_case b230049
atf_add_test_case stripcr_o
atf_add_test_case b252515
+ atf_add_test_case b278988
atf_add_test_case Bflag
atf_add_test_case Nflag
atf_add_test_case tabsize
diff --git a/usr.bin/du/Makefile b/usr.bin/du/Makefile
index 38f638a04de6..7fb61d0423df 100644
--- a/usr.bin/du/Makefile
+++ b/usr.bin/du/Makefile
@@ -3,7 +3,7 @@
PACKAGE= runtime
PROG= du
-LIBADD= util
+LIBADD= xo util
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1
index 931ca137ee9b..568fded38073 100644
--- a/usr.bin/du/du.1
+++ b/usr.bin/du/du.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 1, 2019
+.Dd April 29, 2024
.Dt DU 1
.Os
.Sh NAME
@@ -33,6 +33,7 @@
.Nd display disk usage statistics
.Sh SYNOPSIS
.Nm
+.Op Fl -libxo
.Op Fl Aclnx
.Op Fl H | L | P
.Op Fl g | h | k | m
@@ -52,6 +53,13 @@ the current directory is displayed.
.Pp
The options are as follows:
.Bl -tag -width indent
+.It Fl -libxo
+Generate output via
+.Xr libxo 3
+in a selection of different human and machine readable formats.
+See
+.Xr xo_parse_args 3
+for details on command line arguments.
.It Fl A
Display the apparent size instead of the disk usage.
This can be helpful when operating on compressed volumes or sparse files.
@@ -216,6 +224,8 @@ Also display a grand total at the end:
.Xr df 1 ,
.Xr chflags 2 ,
.Xr fts 3 ,
+.Xr libxo 3 ,
+.Xr xo_parse_args 3 ,
.Xr symlink 7 ,
.Xr quot 8
.Sh STANDARDS
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index cda2470ccca9..96ad7c037dfd 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -48,6 +48,7 @@
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
+#include <libxo/xo.h>
#define SI_OPT (CHAR_MAX + 1)
@@ -62,7 +63,7 @@ struct ignentry {
static int linkchk(FTSENT *);
static void usage(void);
-static void prthumanval(int64_t);
+static void prthumanval(const char *, int64_t);
static void ignoreadd(const char *);
static void ignoreclean(void);
static int ignorep(FTSENT *);
@@ -107,6 +108,10 @@ main(int argc, char *argv[])
depth = INT_MAX;
SLIST_INIT(&ignores);
+ argc = xo_parse_args(argc, argv);
+ if (argc < 0)
+ exit(EX_USAGE);
+
while ((ch = getopt_long(argc, argv, "+AB:HI:LPasd:cghklmnrt:x",
long_options, NULL)) != -1)
switch (ch) {
@@ -117,7 +122,7 @@ main(int argc, char *argv[])
errno = 0;
cblocksize = atoi(optarg);
if (errno == ERANGE || cblocksize <= 0) {
- warnx("invalid argument to option B: %s",
+ xo_warnx("invalid argument to option B: %s",
optarg);
usage();
}
@@ -147,7 +152,7 @@ main(int argc, char *argv[])
errno = 0;
depth = atoi(optarg);
if (errno == ERANGE || depth < 0) {
- warnx("invalid argument to option d: %s",
+ xo_warnx("invalid argument to option d: %s",
optarg);
usage();
}
@@ -181,7 +186,7 @@ main(int argc, char *argv[])
case 't' :
if (expand_number(optarg, &threshold) != 0 ||
threshold == 0) {
- warnx("invalid threshold: %s", optarg);
+ xo_warnx("invalid threshold: %s", optarg);
usage();
} else if (threshold < 0)
threshold_sign = -1;
@@ -254,6 +259,8 @@ main(int argc, char *argv[])
if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL)
err(1, "fts_open");
+ xo_open_container("disk-usage-information");
+ xo_open_list("paths");
while (errno = 0, (p = fts_read(fts)) != NULL) {
switch (p->fts_info) {
case FTS_D: /* Ignore. */
@@ -273,15 +280,18 @@ main(int argc, char *argv[])
if (p->fts_level <= depth && threshold <=
threshold_sign * howmany(p->fts_bignum *
cblocksize, blocksize)) {
+ xo_open_instance("paths");
if (hflag > 0) {
- prthumanval(p->fts_bignum);
- (void)printf("\t%s\n", p->fts_path);
+ prthumanval("{:blocks/%4s}",
+ p->fts_bignum);
+ xo_emit("\t{:path/%s}\n", p->fts_path);
} else {
- (void)printf("%jd\t%s\n",
+ xo_emit("{:blocks/%jd}\t{:path/%s}\n",
(intmax_t)howmany(p->fts_bignum *
cblocksize, blocksize),
p->fts_path);
}
+ xo_close_instance("paths");
}
if (info) {
info = 0;
@@ -293,7 +303,7 @@ main(int argc, char *argv[])
case FTS_DNR: /* Warn, continue. */
case FTS_ERR:
case FTS_NS:
- warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
+ xo_warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
break;
default:
@@ -309,36 +319,43 @@ main(int argc, char *argv[])
howmany(p->fts_statp->st_blocks, cblocksize);
if (aflag || p->fts_level == 0) {
+ xo_open_instance("paths");
if (hflag > 0) {
- prthumanval(curblocks);
- (void)printf("\t%s\n", p->fts_path);
+ prthumanval("{:blocks/%4s}", curblocks);
+ xo_emit("\t{:path/%s}\n", p->fts_path);
} else {
- (void)printf("%jd\t%s\n",
+ xo_emit("{:blocks/%jd}\t{:path/%s}\n",
(intmax_t)howmany(curblocks *
cblocksize, blocksize),
p->fts_path);
}
+ xo_close_instance("paths");
}
p->fts_parent->fts_bignum += curblocks;
}
savednumber = p->fts_parent->fts_bignum;
}
+ xo_close_list("paths");
if (errno)
- err(1, "fts_read");
+ xo_err(1, "fts_read");
if (cflag) {
if (hflag > 0) {
- prthumanval(savednumber);
- (void)printf("\ttotal\n");
+ prthumanval("{:total-blocks/%4s}\ttotal\n",
+ savednumber);
} else {
- (void)printf("%jd\ttotal\n", (intmax_t)howmany(
+ xo_emit("{:total-blocks/%jd}\ttotal\n",
+ (intmax_t)howmany(
savednumber * cblocksize, blocksize));
}
}
ignoreclean();
+ xo_close_container("disk-usage-information");
+ if (xo_finish() < 0)
+ xo_err(1, "stdout");
exit(rval);
}
@@ -392,7 +409,7 @@ linkchk(FTSENT *p)
if (new_buckets == NULL) {
stop_allocating = 1;
- warnx("No more memory for tracking hard links");
+ xo_warnx("No more memory for tracking hard links");
} else {
for (i = 0; i < number_buckets; i++) {
while (buckets[i] != NULL) {
@@ -458,7 +475,7 @@ linkchk(FTSENT *p)
le = malloc(sizeof(struct links_entry));
if (le == NULL) {
stop_allocating = 1;
- warnx("No more memory for tracking hard links");
+ xo_warnx("No more memory for tracking hard links");
return (0);
}
le->dev = st->st_dev;
@@ -474,7 +491,7 @@ linkchk(FTSENT *p)
}
static void
-prthumanval(int64_t bytes)
+prthumanval(const char *fmt, int64_t bytes)
{
char buf[5];
int flags;
@@ -488,13 +505,13 @@ prthumanval(int64_t bytes)
humanize_number(buf, sizeof(buf), bytes, "", HN_AUTOSCALE, flags);
- (void)printf("%4s", buf);
+ xo_emit(fmt, buf);
}
static void
usage(void)
{
- (void)fprintf(stderr,
+ xo_error(
"usage: du [-Aclnx] [-H | -L | -P] [-g | -h | -k | -m] "
"[-a | -s | -d depth] [-B blocksize] [-I mask] "
"[-t threshold] [file ...]\n");
diff --git a/usr.bin/expand/expand.1 b/usr.bin/expand/expand.1
index e63d9d7c1e03..68a7a57eb77e 100644
--- a/usr.bin/expand/expand.1
+++ b/usr.bin/expand/expand.1
@@ -78,9 +78,15 @@ If the
.Fl a
option is given, then tabs are inserted whenever they would compress the
resultant file by replacing two or more characters.
-.It Fl t Ar tab1 , tab2 , ... , tabn
+.It Fl t Xo
+.Sm off
+.Ar tab1 , tab2 , ... , tabn
+.Sm on
+.Xc
Set tab stops at column positions
+.Sm off
.Ar tab1 , tab2 , ... , tabn .
+.Sm on
If only a single number is given, tab stops are set that number of
column positions apart instead of the default number of 8.
.El
diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips
index 028a9e9b1430..c0807405005e 100644
--- a/usr.bin/fortune/datfiles/freebsd-tips
+++ b/usr.bin/fortune/datfiles/freebsd-tips
@@ -845,3 +845,14 @@ kern.tty_info_kstacks to 0 (off), 1 (on), or 2 (verbose), e.g.:
-- Michael Gmelin <grembo@FreeBSD.org>
%
+To determine which fonts provide a particular Unicode character, fc-list from
+the fontconfig package may be helpful. For example, if your friend complains
+that the emoji you sent won't display, run fc-list with the hex value of the
+character to determine which font your friend should install.
+
+$ fc-list ':charset=0x1F4A1'
+/usr/local/share/fonts/noto/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular
+
+$ pkg which /usr/local/share/fonts/noto/NotoColorEmoji.ttf
+/usr/local/share/fonts/noto/NotoColorEmoji.ttf was installed by package noto-emoji-2.042
+%
diff --git a/usr.bin/grdc/grdc.6 b/usr.bin/grdc/grdc.6
index 3c9660055e2b..7420c8ecbe8b 100644
--- a/usr.bin/grdc/grdc.6
+++ b/usr.bin/grdc/grdc.6
@@ -1,4 +1,4 @@
-.Dd September 25, 2001
+.Dd January 15, 2023
.Dt GRDC 6
.Os
.Sh NAME
@@ -8,6 +8,9 @@
.Nm
.Op Fl st
.Op Ar n
+.Nm
+.Fl c
+.Ar n
.Sh DESCRIPTION
.Nm
runs a digital clock made of reverse-video blanks on a curses
@@ -17,6 +20,11 @@ With an optional numeric argument
it stops after
.Ar n
seconds (default never).
+The clock can act as a countdown timer with the
+.Fl c
+flag,
+.Ar n
+specifies the number of seconds to time for.
The optional
.Fl s
flag makes digits scroll as they change.
@@ -37,8 +45,17 @@ for more information.
If this variable is not set, the time zone is determined based on
.Pa /etc/localtime .
.El
+.Sh NOTES
+In countdown timer mode, the specifying of
+.Fl n
+> 360000 seconds (100 hours) will lead to the counter displaying
+incorrect remaining time, however it will time correctly, and
+display correctly when the remaining time becomes less than
+100 hours.
.Sh AUTHORS
.An -nosplit
.An Amos Shapir ,
modified for curses by
.An John Lupien .
+Countdown timer mode by
+.An Gavin Atkinson .
diff --git a/usr.bin/grdc/grdc.c b/usr.bin/grdc/grdc.c
index e2a694ebc461..07d12f5a7fb0 100644
--- a/usr.bin/grdc/grdc.c
+++ b/usr.bin/grdc/grdc.c
@@ -1,12 +1,15 @@
/*
* Grand digital clock for curses compatible terminals
* Usage: grdc [-st] [n] -- run for n seconds (default infinity)
- * Flags: -s: scroll
+ * grdc -c n -- countdown n seconds
+ * Flags: -c: Countdown timer mode
+ * -s: scroll
* -t: output time in 12-hour format
*
*
* modified 10-18-89 for curses (jrl)
* 10-18-89 added signal handling
+ * 02-18-02 added countdown timer mode
*
* modified 03-25-03 for 12 hour option
* - Samy Al Bahra <samy@kerneled.com>
@@ -26,6 +29,7 @@
static struct timespec now;
static struct tm *tm;
+static struct timespec end;
static short disp[11] = {
075557, 011111, 071747, 071717, 055711,
@@ -59,18 +63,19 @@ main(int argc, char *argv[])
int i, j, s, k;
int n;
int ch;
- int scrol;
- int t12;
+ bool scrol = false, t12 = false, timer = false;
+ int hour, minute, second;
- t12 = scrol = 0;
-
- while ((ch = getopt(argc, argv, "ts")) != -1)
+ while ((ch = getopt(argc, argv, "cst")) != -1)
switch (ch) {
+ case 'c':
+ timer = true;
+ break;
case 's':
- scrol = 1;
+ scrol = true;
break;
case 't':
- t12 = 1;
+ t12 = true;
break;
case '?':
default:
@@ -80,7 +85,7 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (argc > 1) {
+ if ((argc > 1) || (argc == 0 && timer)) {
usage();
/* NOTREACHED */
}
@@ -95,6 +100,9 @@ main(int argc, char *argv[])
} else
n = 0;
+ if (timer && n == 0)
+ return(0);
+
initscr();
signal(SIGINT,sighndl);
@@ -107,7 +115,7 @@ main(int argc, char *argv[])
hascolor = has_colors();
- if(hascolor) {
+ if (hascolor) {
start_color();
init_pair(1, COLOR_BLACK, COLOR_RED);
init_pair(2, COLOR_RED, COLOR_BLACK);
@@ -118,7 +126,7 @@ main(int argc, char *argv[])
clear();
refresh();
- if(hascolor) {
+ if (hascolor) {
attrset(COLOR_PAIR(3));
mvaddch(YBASE - 2, XBASE - 3, ACS_ULCORNER);
@@ -139,28 +147,42 @@ main(int argc, char *argv[])
}
clock_gettime(CLOCK_REALTIME_FAST, &now);
prev_sec = now.tv_sec;
+ if (timer) {
+ end = now;
+ end.tv_sec += n;
+ }
do {
mask = 0;
- tm = localtime(&now.tv_sec);
- set(tm->tm_sec%10, 0);
- set(tm->tm_sec/10, 4);
- set(tm->tm_min%10, 10);
- set(tm->tm_min/10, 14);
-
- if (t12) {
- if (tm->tm_hour < 12) {
- if (tm->tm_hour == 0)
- tm->tm_hour = 12;
- mvaddstr(YBASE + 5, XBASE + 52, "AM");
- } else {
- if (tm->tm_hour > 12)
- tm->tm_hour -= 12;
- mvaddstr(YBASE + 5, XBASE + 52, "PM");
+ if (!timer) {
+ tm = localtime(&now.tv_sec);
+ if (t12) {
+ if (tm->tm_hour < 12) {
+ if (tm->tm_hour == 0)
+ tm->tm_hour = 12;
+ mvaddstr(YBASE + 5, XBASE + 52, "AM");
+ } else {
+ if (tm->tm_hour > 12)
+ tm->tm_hour -= 12;
+ mvaddstr(YBASE + 5, XBASE + 52, "PM");
+ }
}
+ hour = tm->tm_hour;
+ minute = tm->tm_min;
+ second = tm->tm_sec;
+ } else {
+ n = end.tv_sec - now.tv_sec;
+ if (n <= 0)
+ break;
+ hour = (n / 3600) % 100;
+ minute = (n / 60) % 60;
+ second = n % 60;
}
-
- set(tm->tm_hour%10, 20);
- set(tm->tm_hour/10, 24);
+ set(second % 10, 0);
+ set(second / 10, 4);
+ set(minute % 10, 10);
+ set(minute / 10, 14);
+ set(hour % 10, 20);
+ set(hour / 10, 24);
set(10, 7);
set(10, 17);
for(k=0; k<6; k++) {
@@ -266,6 +288,7 @@ static void
usage(void)
{
- (void)fprintf(stderr, "usage: grdc [-st] [n]\n");
+ (void)fprintf(stderr, "usage: grdc [-st] [n]\n"
+ " grdc -c n\n");
exit(1);
}
diff --git a/usr.bin/locate/locate/locate.rc b/usr.bin/locate/locate/locate.rc
index 404af4cc4a64..f004dea19508 100644
--- a/usr.bin/locate/locate/locate.rc
+++ b/usr.bin/locate/locate/locate.rc
@@ -15,7 +15,7 @@
#SEARCHPATHS="/"
# paths unwanted in output
-#PRUNEPATHS="/tmp /usr/tmp /var/tmp /var/db/portsnap /var/db/freebsd-update"
+#PRUNEPATHS="/tmp /usr/tmp /var/tmp /var/db/freebsd-update"
# directories unwanted in output
#PRUNEDIRS=".zfs"
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh
index e874700afdb8..ff7ec7f6c18e 100644
--- a/usr.bin/locate/locate/updatedb.sh
+++ b/usr.bin/locate/locate/updatedb.sh
@@ -52,7 +52,7 @@ PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH
: ${mklocatedb:=locate.mklocatedb} # make locate database program
: ${FCODES:=/var/db/locate.database} # the database
: ${SEARCHPATHS="/"} # directories to be put in the database
-: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /var/db/portsnap /var/db/freebsd-update"} # unwanted directories
+: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /var/db/freebsd-update"} # unwanted directories
: ${PRUNEDIRS=".zfs"} # unwanted directories, in any parent
: ${FILESYSTEMS="$(lsvfs | tail -n +3 | \
egrep -vw "loopback|network|synthetic|read-only|0" | \
diff --git a/usr.bin/lsvfs/lsvfs.1 b/usr.bin/lsvfs/lsvfs.1
index 082023f00857..9871df32fa96 100644
--- a/usr.bin/lsvfs/lsvfs.1
+++ b/usr.bin/lsvfs/lsvfs.1
@@ -47,7 +47,7 @@ flag bits.
Show information about the
.Ql ufs
and
-.Xr devfs 5
+.Xr devfs 4
filesystems and check the number of mounts for the former:
.Bd -literal -offset indent
$ lsvfs ufs devfs
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index 03803b777463..24a0464689cc 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -201,6 +201,10 @@ decho() {
# Returns true if glob resolves to a real file and store the first
# found filename in the variable $found
exists() {
+ if [ -z "$1" ]; then
+ return 1
+ fi
+
local IFS
# Don't accidentally inherit callers IFS (breaks perl manpages)
@@ -318,7 +322,7 @@ man_check_for_so() {
# We need to loop to accommodate multiple .so directives.
while true
do
- line=$($cattool "$manpage" 2>/dev/null | head -n1)
+ line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$')
case "$line" in
.so*) trim "${line#.so}"
decho "$manpage includes $tstr"
diff --git a/usr.bin/mdo/Makefile b/usr.bin/mdo/Makefile
new file mode 100644
index 000000000000..e20f2719fc82
--- /dev/null
+++ b/usr.bin/mdo/Makefile
@@ -0,0 +1,4 @@
+PROG= mdo
+SRCS= mdo.c
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1
new file mode 100644
index 000000000000..115ce44f4531
--- /dev/null
+++ b/usr.bin/mdo/mdo.1
@@ -0,0 +1,44 @@
+.\"-
+.\" Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org>
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd May 22, 2024
+.Dt MDO 1
+.Os
+.Sh NAME
+.Nm mdo
+.Nd execute commands as another user
+.Sh SYNOPSIS
+.Nm
+.Op Fl u Ar username
+.Op Fl i
+.Op command Op args
+.Sh DESCRIPTION
+The
+.Nm
+utility executes the specified
+.Ar command
+as user
+.Ar username .
+.Pp
+If no
+.Ar username
+is provided it defaults to the
+.Va root
+user.
+If no
+.Ar command
+is specified, it will execute the shell specified as
+.Va SHELL
+environnement variable, falling back on
+.Pa /bin/sh .
+.Pp
+The
+.Fl i
+option can be used to only call
+.Fn setuid
+and keep the group from the calling user.
+.Sh SEE ALSO
+.Xr su 1
+.Xr mac_do 4
diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c
new file mode 100644
index 000000000000..22e2838daa08
--- /dev/null
+++ b/usr.bin/mdo/mdo.c
@@ -0,0 +1,76 @@
+/*-
+ * Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <sys/limits.h>
+
+#include <err.h>
+#include <paths.h>
+#include <pwd.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: mdo [-u username] [-i] [--] [command [args]]\n");
+ exit(EXIT_FAILURE);
+}
+
+int
+main(int argc, char **argv)
+{
+ struct passwd *pw;
+ const char *username = "root";
+ bool uidonly = false;
+ int ch;
+
+ while ((ch = getopt(argc, argv, "u:i")) != -1) {
+ switch (ch) {
+ case 'u':
+ username = optarg;
+ break;
+ case 'i':
+ uidonly = true;
+ break;
+ default:
+ usage();
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+ if ((pw = getpwnam(username)) == NULL) {
+ if (strspn(username, "0123456789") == strlen(username)) {
+ const char *errp = NULL;
+ uid_t uid = strtonum(username, 0, UID_MAX, &errp);
+ if (errp != NULL)
+ err(EXIT_FAILURE, "%s", errp);
+ pw = getpwuid(uid);
+ }
+ if (pw == NULL)
+ err(EXIT_FAILURE, "invalid username '%s'", username);
+ }
+ if (!uidonly) {
+ if (initgroups(pw->pw_name, pw->pw_gid) == -1)
+ err(EXIT_FAILURE, "failed to call initgroups");
+ if (setgid(pw->pw_gid) == -1)
+ err(EXIT_FAILURE, "failed to call setgid");
+ }
+ if (setuid(pw->pw_uid) == -1)
+ err(EXIT_FAILURE, "failed to call setuid");
+ if (*argv == NULL) {
+ const char *sh = getenv("SHELL");
+ if (sh == NULL)
+ sh = _PATH_BSHELL;
+ execlp(sh, sh, "-i", NULL);
+ } else {
+ execvp(argv[0], argv);
+ }
+ err(EXIT_FAILURE, "exec failed");
+}
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index 0657926eab80..5d7fd0e46cf1 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -783,11 +783,13 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
p(tcps_sack_recovery_episode, "\t{:recovery-episodes/%ju} "
"{N:/SACK recovery episode%s}\n");
- p(tcps_sack_rexmits, "\t{:segment-retransmits/%ju} "
+ p(tcps_sack_rexmits, "\t{:segment-retransmits/%ju} "
"{N:/segment rexmit%s in SACK recovery episodes}\n");
- p(tcps_sack_rexmit_bytes, "\t{:byte-retransmits/%ju} "
+ p(tcps_sack_rexmits_tso, "\t{:tso-chunk-retransmits/%ju} "
+ "{N:/tso chunk rexmit%s in SACK recovery episodes}\n");
+ p(tcps_sack_rexmit_bytes, "\t{:byte-retransmits/%ju} "
"{N:/byte rexmit%s in SACK recovery episodes}\n");
- p(tcps_sack_rcv_blocks, "\t{:received-blocks/%ju} "
+ p(tcps_sack_rcv_blocks, "\t{:received-blocks/%ju} "
"{N:/SACK option%s (SACK blocks) received}\n");
p(tcps_sack_send_blocks, "\t{:sent-option-blocks/%ju} "
"{N:/SACK option%s (SACK blocks) sent}\n");
diff --git a/usr.bin/netstat/nhops.c b/usr.bin/netstat/nhops.c
index f4c76f54a420..1a5d8eee74b1 100644
--- a/usr.bin/netstat/nhops.c
+++ b/usr.bin/netstat/nhops.c
@@ -64,16 +64,15 @@
#include "common.h"
/* column widths; each followed by one space */
+#define WID_IF_DEFAULT (Wflag ? IFNAMSIZ : 12) /* width of netif column */
#ifndef INET6
#define WID_DST_DEFAULT(af) 18 /* width of destination column */
#define WID_GW_DEFAULT(af) 18 /* width of gateway column */
-#define WID_IF_DEFAULT(af) (Wflag ? 10 : 8) /* width of netif column */
#else
#define WID_DST_DEFAULT(af) \
((af) == AF_INET6 ? (numeric_addr ? 33: 18) : 18)
#define WID_GW_DEFAULT(af) \
((af) == AF_INET6 ? (numeric_addr ? 29 : 18) : 18)
-#define WID_IF_DEFAULT(af) ((af) == AF_INET6 ? 8 : (Wflag ? 10 : 8))
#endif /*INET6*/
static int wid_dst;
static int wid_gw;
@@ -415,7 +414,7 @@ print_nhops_sysctl(int fibnum, int af)
wid_flags = 6;
wid_pksent = 8;
wid_mtu = 6;
- wid_if = WID_IF_DEFAULT(fam);
+ wid_if = WID_IF_DEFAULT;
xo_open_instance("rt-family");
pr_family(fam);
xo_open_list("nh-entry");
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 6152cbdc859f..482fb07ff950 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -184,16 +184,15 @@ pr_family(int af1)
}
/* column widths; each followed by one space */
+#define WID_IF_DEFAULT (Wflag ? IFNAMSIZ : 12) /* width of netif column */
#ifndef INET6
#define WID_DST_DEFAULT(af) 18 /* width of destination column */
#define WID_GW_DEFAULT(af) 18 /* width of gateway column */
-#define WID_IF_DEFAULT(af) (Wflag ? 10 : 8) /* width of netif column */
#else
#define WID_DST_DEFAULT(af) \
((af) == AF_INET6 ? (numeric_addr ? 33: 18) : 18)
#define WID_GW_DEFAULT(af) \
((af) == AF_INET6 ? (numeric_addr ? 29 : 18) : 18)
-#define WID_IF_DEFAULT(af) ((af) == AF_INET6 ? 8 : (Wflag ? 10 : 8))
#endif /*INET6*/
struct _wid wid;
@@ -234,7 +233,7 @@ set_wid(int fam)
wid.flags = 6;
wid.pksent = 8;
wid.mtu = 6;
- wid.iface = WID_IF_DEFAULT(fam);
+ wid.iface = WID_IF_DEFAULT;
wid.expire = 6;
}
diff --git a/usr.bin/posixmqcontrol/posixmqcontrol.1 b/usr.bin/posixmqcontrol/posixmqcontrol.1
index ec60230aac6e..ec7059b90235 100644
--- a/usr.bin/posixmqcontrol/posixmqcontrol.1
+++ b/usr.bin/posixmqcontrol/posixmqcontrol.1
@@ -164,7 +164,7 @@ use the command
.Xr mq_send 2 ,
.Xr mq_setattr 2 ,
.Xr mq_unlink 2 ,
-.Xr mqueuefs 5
+.Xr mqueuefs 4
.Sh BUGS
mq_timedsend and mq_timedrecv are not implemented.
info reports a worst-case estimate for QSIZE.
@@ -172,7 +172,7 @@ info reports a worst-case estimate for QSIZE.
The
.Nm
command appeared in
-.Fx 15.0 .
+.Fx 14.1 .
.Sh AUTHORS
The
.Nm
diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c
index 0241637c93ad..2724f8a20cde 100644
--- a/usr.bin/split/split.c
+++ b/usr.bin/split/split.c
@@ -390,6 +390,10 @@ newfile(void)
*/
if (!dflag && autosfx && (fpnt[0] == 'y') &&
strspn(fpnt+1, "z") == strlen(fpnt+1)) {
+ /* Ensure the generated filenames will fit into the buffer. */
+ if (strlen(fname) + 2 >= sizeof(fname))
+ errx(EX_USAGE, "combined filenames would be too long");
+
fpnt = fname + strlen(fname) - sufflen;
fpnt[sufflen + 2] = '\0';
fpnt[0] = end;
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c
index 92148ab2e35b..4c1ce06543e3 100644
--- a/usr.bin/time/time.c
+++ b/usr.bin/time/time.c
@@ -54,7 +54,7 @@ static void showtime(FILE *, struct timespec *, struct timespec *,
static void siginfo(int);
static void usage(void) __dead2;
-static sig_atomic_t siginfo_recvd;
+static volatile sig_atomic_t siginfo_recvd;
static char decimal_point;
static struct timespec before_ts;
static int hflag, pflag;
diff --git a/usr.bin/top/display.c b/usr.bin/top/display.c
index 32b8b12798dc..b6cde0e63aa7 100644
--- a/usr.bin/top/display.c
+++ b/usr.bin/top/display.c
@@ -252,7 +252,7 @@ i_loadave(int mpid, double avenrun[])
for (i = 0; i < 3; i++)
{
- printf("%c %5.2f",
+ printf("%c %7.2f",
i == 0 ? ':' : ',',
avenrun[i]);
}
@@ -289,7 +289,7 @@ u_loadave(int mpid, double *avenrun)
/* we should optimize this and only display changes */
for (i = 0; i < 3; i++)
{
- printf("%s%5.2f",
+ printf("%s%7.2f",
i == 0 ? "" : ", ",
avenrun[i]);
}
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index c3a4cc42f721..0aac7062146d 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -56,6 +56,7 @@ SUBDIR= adduser \
nfsuserd \
nmtree \
nologin \
+ nvmfd \
pciconf \
periodic \
pnfsdscopymr \
diff --git a/usr.sbin/Makefile.aarch64 b/usr.sbin/Makefile.aarch64
index 6302b6a78ef7..32612c1621ac 100644
--- a/usr.sbin/Makefile.aarch64
+++ b/usr.sbin/Makefile.aarch64
@@ -3,4 +3,5 @@ SUBDIR+= acpi
.endif
.if ${MK_BHYVE} != "no"
SUBDIR+= bhyve
+SUBDIR+= bhyvectl
.endif
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index 0cc3f76ac018..fc2e8cb82c49 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -1504,7 +1504,7 @@ acpi_handle_dmar(ACPI_TABLE_HEADER *sdp)
static void
acpi_handle_ivrs_ivhd_header(ACPI_IVRS_HEADER *addr)
{
- printf("\n\tIVHD Type=%#x IOMMUId=%x\n\tFlags=",
+ printf("\n\tIVHD Type=%#x IOMMU DeviceId=%#06x\n\tFlags=",
addr->Type, addr->DeviceId);
#define PRINTFLAG(flag, name) printflag(addr->Flags, flag, #name)
PRINTFLAG(ACPI_IVHD_TT_ENABLE, HtTunEn);
diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh
index 9739b2e589fa..ecac7478befd 100644
--- a/usr.sbin/adduser/adduser.sh
+++ b/usr.sbin/adduser/adduser.sh
@@ -53,7 +53,7 @@ info() {
# by pw(8).
#
get_nextuid () {
- local _uid=$1 _nextuid
+ local _uid=$1 _nextuid=
if [ -z "$_uid" ]; then
_nextuid="$(${PWCMD} usernext | cut -f1 -d:)"
@@ -101,7 +101,7 @@ show_usage() {
# basename of the shell is output.
#
valid_shells() {
- local _prefix
+ local _prefix=
${GREPCMD} '^[^#]' ${ETCSHELLS} |
while read _path _junk ; do
@@ -119,7 +119,7 @@ valid_shells() {
# full path to the shell from the /etc/shells file.
#
fullpath_from_shell() {
- local _shell=$1 _fullpath
+ local _shell=$1 _fullpath=
if [ -z "$_shell" ]; then
return
@@ -154,7 +154,7 @@ fullpath_from_shell() {
# will emit an informational message saying so.
#
shell_exists() {
- local _sh="$1"
+ local _sh=$1
if [ -z "$(fullpath_from_shell "$_sh")" ] ; then
err "Invalid shell ($_sh) for user $username."
@@ -193,8 +193,9 @@ save_config() {
# message or lock the account, do so.
#
add_user() {
- local _uid _name _comment _gecos _home _group _grouplist _shell _class
- local _dotdir _expire _pwexpire _passwd _upasswd _passwdmethod
+ local _uid= _name= _comment= _gecos= _home= _group= _grouplist=
+ local _shell= _class= _dotdir= _expire= _pwexpire= _passwd= _upasswd=
+ local _passwdmethod= _pwcmd=
# Is this a configuration run? If so, don't modify user database.
#
@@ -299,7 +300,7 @@ add_user() {
fi
fi
- local _line _owner _perms _file _dir
+ local _line= _owner= _perms= _file= _dir=
if [ -n "$msgflag" ]; then
if [ -r "$msgfile" ]; then
# We're evaluating the contents of an external file.
@@ -331,7 +332,7 @@ add_user() {
# a file it will output an error message and return to the caller.
#
get_user() {
- local _input
+ local _input=
# No need to take down user names if this is a configuration saving run.
[ -n "$configflag" ] && return
@@ -366,7 +367,7 @@ get_user() {
# and batch (from file) mode.
#
get_gecos() {
- local _input
+ local _input=
# No need to take down additional user information for a configuration run.
[ -n "$configflag" ] && return
@@ -386,7 +387,7 @@ get_gecos() {
# If an invalid shell is entered it will simply use the default shell.
#
get_shell() {
- local _input _fullpath
+ local _input= _fullpath=
ushell="$defaultshell"
# Make sure the current value of the shell is a valid one
@@ -424,7 +425,7 @@ get_shell() {
# and batch input.
#
get_homedir() {
- _input=
+ local _input=
if [ -z "$fflag" ]; then
echo -n "Home directory [${homeprefix}/${username}]: "
read _input
@@ -450,7 +451,7 @@ get_homedir() {
# Reads the account's home directory permissions.
#
get_homeperm() {
- local _input _prompt
+ local _input= _prompt=
uhomeperm=$defaultHomePerm
if [ -n "$uhomeperm" ]; then
@@ -473,11 +474,12 @@ get_homeperm() {
# so, enable ZFS home dataset creation.
#
get_zfs_home() {
- local _prefix
+ local _prefix= _tmp=
# check if zfs kernel module is loaded before attempting to run zfs to
# prevent loading the kernel module on systems that don't use ZFS
- if ! "$KLDSTATCMD" -q -m zfs || Zcreate="no"; then
+ if ! "$KLDSTATCMD" -q -m zfs; then
+ Zcreate="no"
return
fi
if ! _prefix=$(${ZFSCMD} list -Ho name "${homeprefix}" 2>/dev/null) ||
@@ -485,6 +487,13 @@ get_zfs_home() {
Zcreate="no"
return
fi
+ # Make sure that _prefix is not a subdirectory within a dataset. If it
+ # is, the containing dataset will be the same for it and its parent.
+ _tmp=$(${ZFSCMD} list -Ho name "$(dirname "${homeprefix}")" 2>/dev/null)
+ if [ "${_tmp}" = "${_prefix}" ]; then
+ Zcreate="no"
+ return
+ fi
zhome="${_prefix}/${username}"
}
@@ -493,7 +502,7 @@ get_zfs_home() {
# allocates one if it is not specified.
#
get_uid() {
- local _input _prompt
+ local _input= _prompt=
uuid=${uidstart}
if [ -n "$uuid" ]; then
@@ -518,7 +527,7 @@ get_uid() {
# Reads login class of account. Can be used in interactive or batch mode.
#
get_class() {
- local _input _uclass
+ local _input= _class=
uclass="$defaultclass"
_class=${uclass:-"default"}
@@ -540,7 +549,7 @@ get_class() {
# will then provide a login group with the same name as the username.
#
get_logingroup() {
- local _input
+ local _input=
ulogingroup="$defaultLgroup"
if [ -z "$fflag" ]; then
@@ -559,7 +568,7 @@ get_logingroup() {
# and batch modes.
#
get_groups() {
- local _input _group
+ local _input= _group=
ugroups="$defaultgroups"
_group=${ulogingroup:-"${username}"}
@@ -625,7 +634,7 @@ get_password() {
# Ask user if they want to enable encryption on their ZFS home dataset.
#
get_zfs_encryption() {
- local _input _prompt
+ local _input= _prompt=
_prompt="Enable ZFS encryption? (yes/no) [${Zencrypt}]: "
while : ; do
echo -n "$_prompt"
@@ -701,7 +710,7 @@ set_zfs_perms() {
# adds it to the user database.
#
input_from_file() {
- local _field
+ local _field=
while read -r fileline ; do
case "$fileline" in
@@ -732,14 +741,13 @@ input_from_file() {
# the user database.
#
input_interactive() {
- local _disable _pass _passconfirm _input
+ local _disable= _pass= _passconfirm= _input=
local _random="no"
local _emptypass="no"
local _usepass="yes"
local _logingroup_ok="no"
local _groups_ok="no"
local _all_ok="yes"
- local _another_user="no"
case $passwdtype in
none)
_emptypass="yes"
@@ -1128,6 +1136,7 @@ if [ -n "$fflag" ]; then
else
input_interactive
while : ; do
+ _another_user="no"
if [ -z "$configflag" ]; then
echo -n "Add another user? (yes/no) [$_another_user]: "
else
diff --git a/usr.sbin/arp/arp.8 b/usr.sbin/arp/arp.8
index e2b81c6a1bb9..d31b2b482ba3 100644
--- a/usr.sbin/arp/arp.8
+++ b/usr.sbin/arp/arp.8
@@ -44,7 +44,6 @@
.Fl a
.Nm
.Fl d Ar hostname
-.Op Cm pub
.Nm
.Fl d
.Op Fl i Ar interface
@@ -95,15 +94,8 @@ A super-user may delete an entry for the host called
with the
.Fl d
flag.
-If the
-.Cm pub
-keyword is specified, only the
-.Dq published
-.Tn ARP
-entry
-for this host will be deleted.
.Pp
-Alternatively, the
+The
.Fl d
flag may be combined with the
.Fl a
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index e5b94ca053e1..8cd18d875820 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -144,7 +144,7 @@ main(int argc, char *argv[])
if (!func)
func = F_GET;
if (opts.rifname) {
- if (func != F_GET && !(func == F_DELETE && opts.aflag))
+ if (func != F_GET && func != F_SET && !(func == F_DELETE && opts.aflag))
xo_errx(1, "-i not applicable to this operation");
if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) {
if (errno == ENXIO)
@@ -375,7 +375,7 @@ set(int argc, char **argv)
}
}
#ifndef WITHOUT_NETLINK
- return (set_nl(0, dst, &sdl_m, host));
+ return (set_nl(opts.rifindex, dst, &sdl_m, host));
#else
return (set_rtsock(dst, &sdl_m, host));
#endif
diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c
index 8644f3722aed..24e01126044b 100644
--- a/usr.sbin/arp/arp_netlink.c
+++ b/usr.sbin/arp/arp_netlink.c
@@ -385,7 +385,7 @@ set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, char
ifindex = fix_ifindex(&ss, ifindex, dst->sin_addr);
if (ifindex == 0) {
- xo_warnx("delete: cannot locate %s", host);
+ xo_warnx("set: cannot locate %s", host);
snl_free(&ss);
return (0);
}
diff --git a/usr.sbin/audit/Makefile b/usr.sbin/audit/Makefile
index 55ddfa4bc9a5..82b21081a97d 100644
--- a/usr.sbin/audit/Makefile
+++ b/usr.sbin/audit/Makefile
@@ -6,6 +6,7 @@ OPENBSMDIR=${SRCTOP}/contrib/openbsm
CFLAGS+= -I${OPENBSMDIR}
+PACKAGE=audit
PROG= audit
MAN= audit.8
diff --git a/usr.sbin/auditd/Makefile b/usr.sbin/auditd/Makefile
index b13ff5355c4b..a381b5e7a60b 100644
--- a/usr.sbin/auditd/Makefile
+++ b/usr.sbin/auditd/Makefile
@@ -3,6 +3,7 @@
OPENBSMDIR=${SRCTOP}/contrib/openbsm
.PATH: ${OPENBSMDIR}/bin/auditd
+.PATH: ${OPENBSMDIR}/man
CFLAGS+= -I${OPENBSMDIR}
@@ -18,9 +19,17 @@ CONFSMODE_${OPENBSMETCDIR}/audit_user= 600
CONFS+= ${OPENBSMETCDIR}/audit_warn
CONFSMODE_${OPENBSMETCDIR}/audit_warn= 500
CONFSDIR= /etc/security
+
+PACKAGE=audit
PROG= auditd
SRCS= auditd.c audit_warn.c auditd_fbsd.c
-MAN= auditd.8
+MAN= auditd.8 \
+ audit.log.5 \
+ audit_class.5 \
+ audit_control.5 \
+ audit_event.5 \
+ audit_user.5 \
+ audit_warn.5
LIBADD= auditd bsm
diff --git a/usr.sbin/auditdistd/Makefile b/usr.sbin/auditdistd/Makefile
index 9bfa3c444922..8b3c7dd7f87c 100644
--- a/usr.sbin/auditdistd/Makefile
+++ b/usr.sbin/auditdistd/Makefile
@@ -13,6 +13,7 @@ CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L
NO_WFORMAT=
NO_WMISSING_VARIABLE_DECLARATIONS=
+PACKAGE=audit
PROG= auditdistd
SRCS= auditdistd.c
SRCS+= parse.y pjdlog.c
diff --git a/usr.sbin/auditreduce/Makefile b/usr.sbin/auditreduce/Makefile
index 66bc55af87a9..566b36712782 100644
--- a/usr.sbin/auditreduce/Makefile
+++ b/usr.sbin/auditreduce/Makefile
@@ -6,6 +6,7 @@ OPENBSMDIR=${SRCTOP}/contrib/openbsm
CFLAGS+= -I${OPENBSMDIR}
+PACKAGE=audit
PROG= auditreduce
MAN= auditreduce.1
diff --git a/usr.sbin/authpf/Makefile b/usr.sbin/authpf/Makefile
index aa6c6e1058a5..44cd1838af7f 100644
--- a/usr.sbin/authpf/Makefile
+++ b/usr.sbin/authpf/Makefile
@@ -1,6 +1,7 @@
.PATH: ${SRCTOP}/contrib/pf/authpf
+PACKAGE=pf
PROG= authpf
MAN= authpf.8
BINOWN= root
diff --git a/usr.sbin/autofs/auto_master.5 b/usr.sbin/autofs/auto_master.5
index e826176f9f3f..4f960161859b 100644
--- a/usr.sbin/autofs/auto_master.5
+++ b/usr.sbin/autofs/auto_master.5
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2014 The FreeBSD Foundation
.\"
.\" This software was developed by Edward Tomasz Napierala under sponsorship
@@ -246,7 +249,7 @@ Special maps have names beginning with
.Li - .
Supported special maps are:
.Pp
-.Bl -tag -width "-hosts" -compact
+.Bl -tag -width "-noauto" -compact
.It Li -hosts
Query the remote NFS server and map exported shares.
This map is traditionally mounted on
@@ -361,7 +364,7 @@ Directory containing shell scripts to implement special maps and directory
services.
.El
.Sh SEE ALSO
-.Xr autofs 5 ,
+.Xr autofs 4 ,
.Xr automount 8 ,
.Xr automountd 8 ,
.Xr autounmountd 8
diff --git a/usr.sbin/autofs/automount.8 b/usr.sbin/autofs/automount.8
index 3dc423c3054f..83ff1cd61709 100644
--- a/usr.sbin/autofs/automount.8
+++ b/usr.sbin/autofs/automount.8
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2014 The FreeBSD Foundation
.\"
.\" This software was developed by Edward Tomasz Napierala under sponsorship
@@ -46,10 +49,10 @@ command parses the
.Xr auto_master 5
configuration file and any direct maps that it references, and mounts
or unmounts
-.Xr autofs 5
+.Xr autofs 4
filesystems to match.
These options are available:
-.Bl -tag -width ".Fl v"
+.Bl -tag -width "-D"
.It Fl D
Define a variable.
It is only useful with
@@ -75,10 +78,10 @@ It is only useful with
.It Fl u
Try to unmount filesystems mounted by
.Xr automountd 8 .
-.Xr autofs 5
+.Xr autofs 4
mounts are not unmounted.
To unmount all
-.Xr autofs
+.Xr autofs 4
mounts, use
.Cm "umount -At autofs".
.It Fl v
@@ -91,8 +94,8 @@ Unmount all filesystems mounted by
.Xr automountd 8 :
.Dl Nm Fl u
.Sh SEE ALSO
+.Xr autofs 4 ,
.Xr auto_master 5 ,
-.Xr autofs 5 ,
.Xr automountd 8 ,
.Xr autounmountd 8
.Sh HISTORY
diff --git a/usr.sbin/autofs/automountd.8 b/usr.sbin/autofs/automountd.8
index 4b2cf7d56336..1a790fa52414 100644
--- a/usr.sbin/autofs/automountd.8
+++ b/usr.sbin/autofs/automountd.8
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2014 The FreeBSD Foundation
.\"
.\" This software was developed by Edward Tomasz Napierala under sponsorship
@@ -42,7 +45,7 @@
The
.Nm
daemon is responsible for handling
-.Xr autofs 5
+.Xr autofs 4
mount requests, parsing maps,
and mounting filesystems they specify.
On startup,
@@ -54,7 +57,7 @@ forks a child process.
The child process parses the appropriate map and mounts filesystems accordingly.
Then it signals the kernel to release blocked processes that were waiting
for the mount.
-.Bl -tag -width ".Fl v"
+.Bl -tag -width "-m maxproc"
.It Fl D
Define a variable.
.It Fl i
@@ -83,8 +86,8 @@ Increase verbosity.
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
+.Xr autofs 4 ,
.Xr auto_master 5 ,
-.Xr autofs 5 ,
.Xr automount 8 ,
.Xr autounmountd 8
.Sh HISTORY
diff --git a/usr.sbin/autofs/autounmountd.8 b/usr.sbin/autofs/autounmountd.8
index 69b4565703e6..582e0d36b214 100644
--- a/usr.sbin/autofs/autounmountd.8
+++ b/usr.sbin/autofs/autounmountd.8
@@ -1,3 +1,6 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2014 The FreeBSD Foundation
.\"
.\" This software was developed by Edward Tomasz Napierala under sponsorship
@@ -52,7 +55,7 @@ After a specified time passes,
attempts to unmount a filesystem, retrying after some time if necessary.
.Pp
These options are available:
-.Bl -tag -width ".Fl v"
+.Bl -tag -width "-d"
.It Fl d
Debug mode: increase verbosity and do not daemonize.
.It Fl r
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index d5d7dfc26ab9..8b6631de1519 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -27,6 +27,7 @@ SRCS= \
config.c \
console.c \
crc16.c \
+ ctl_nvme_all.c \
ctl_scsi_all.c \
ctl_util.c \
hda_codec.c \
diff --git a/usr.sbin/bhyve/amd64/e820.c b/usr.sbin/bhyve/amd64/e820.c
index 456ce0330b50..9d95ec8ce688 100644
--- a/usr.sbin/bhyve/amd64/e820.c
+++ b/usr.sbin/bhyve/amd64/e820.c
@@ -483,6 +483,8 @@ e820_finalize(void)
e820_fwcfg_item->size, e820_fwcfg_item->data);
if (error != 0) {
warnx("could not add qemu fwcfg etc/e820");
+ free(e820_fwcfg_item->data);
+ free(e820_fwcfg_item);
return (error);
}
free(e820_fwcfg_item);
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 42ba328451a9..527ccf720540 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 10, 2024
+.Dd April 26, 2024
.Dt BHYVE 8
.Os
.Sh NAME
@@ -356,10 +356,45 @@ If not specified, the
.Ar bus
value defaults to 0.
.Pp
-The
+See
+.Sx "PCI EMULATION"
+for available options for the
+.Ar emulation
+argument.
+.It Fl U Ar uuid
+Set the universally unique identifier
+.Pq UUID
+in the guest's System Management BIOS System Information structure.
+By default a UUID is generated from the host's hostname and
+.Ar vmname .
+.It Fl u
+RTC keeps UTC time.
+.It Fl W
+Force virtio PCI device emulations to use MSI interrupts instead of MSI-X
+interrupts.
+.It Fl w
+Ignore accesses to unimplemented Model Specific Registers (MSRs).
+This is intended for debug purposes.
+.It Fl x
+The guest's local APIC is configured in x2APIC mode.
+This option applies only to the amd64 platform.
+.It Fl Y
+Disable MPtable generation.
+This option applies only to the amd64 platform.
+.It Ar vmname
+Alphanumeric name of the guest.
+This should be the same as that created by
+.Xr bhyveload 8 .
+.El
+.Sh PCI EMULATION
+.Nm
+provides emulation for various PCI devices.
+They are specified by the
+.Fl s
+.Ar slot,emulation,conf
+configuration's
.Ar emulation
-argument
-can be one of the following:
+argument, which can be one of the following:
.Bl -tag -width "amd_hostbridge"
.It Cm hostbridge
A simple host bridge.
@@ -400,7 +435,7 @@ PCI 16550 serial device.
.It Cm lpc
LPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports,
a boot ROM, and,
-optionally, a fwcfg type and the debug/test device.
+optionally, a fwcfg type, and the debug/test device.
The LPC bridge emulation can only be configured on bus 0.
.It Cm fbuf
Raw framebuffer device attached to VNC server.
@@ -419,8 +454,7 @@ If
.Ar conf
is not specified, the device emulation has no backend and can be
considered unconnected.
-.Pp
-Network device backends:
+.Ss Network device backends
.Sm off
.Bl -bullet
.It
@@ -452,7 +486,7 @@ Network device backends:
.Pp
If
.Cm mac
-is not specified, the MAC address is derived from a fixed OUI and the
+is not specified, the MAC address is derived from a fixed OUI, and the
remaining bytes from an MD5 hash of the slot and function numbers and
the device name.
.Pp
@@ -503,16 +537,15 @@ forwarded to the guest.
Multiple rules can be specified, separated by semicolons.
Note that semicolons must be escaped or quoted to prevent the shell from
interpreting them.
-.Pp
-Block storage device backends:
-.Sm off
+.Ss Block storage device backends:
.Bl -bullet
+.Sm off
.It
.Ar /filename Op Cm \&, Ar block-device-options
.It
.Ar /dev/xxx Op Cm \&, Ar block-device-options
-.El
.Sm on
+.El
.Pp
The
.Ar block-device-options
@@ -541,14 +574,13 @@ A fwcfg file is used to specify the bootorder.
The guest firmware may ignore or doesn't support this fwcfg file.
In that case, this feature doesn't work as expected.
.El
-.Pp
-SCSI device backends:
-.Sm off
+.Ss SCSI device backends
.Bl -bullet
+.Sm off
.It
.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc
-.El
.Sm on
+.El
.Pp
The
.Ar scsi-device-options
@@ -564,14 +596,13 @@ A fwcfg file is used to specify the bootorder.
The guest firmware may ignore or doesn't support this fwcfg file.
In that case, this feature doesn't work as expected.
.El
-.Pp
-9P device backends:
-.Sm off
+.Ss 9P device backends
.Bl -bullet
+.Sm off
.It
.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options
-.El
.Sm on
+.El
.Pp
The
.Ar 9p-device-options
@@ -580,8 +611,7 @@ are:
.It Cm ro
Expose the share in read-only mode.
.El
-.Pp
-TTY device backends:
+.Ss TTY device backends
.Bl -tag -width 10n
.It Cm stdio
Connect the serial port to the standard input and output of
@@ -591,11 +621,25 @@ process.
.It Ar /dev/xxx
Use the host TTY device for serial port I/O.
.El
+.Ss TPM device backends
+.Bl -bullet
+.Sm off
+.It
+.Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options
+.Sm on
+.El
+.Pp
+Emulate a TPM device. The argument
+.Ar path
+needs to point to a valid TPM device path, i.e.
+.Pa /dev/tpm0 .
+.El
.Pp
-TPM device backends:
+Supported options for
+.Ar type :
.Bl -tag -width 10n
-.It Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options
-Emulate a TPM device.
+.It Cm passthru
+pass a physical TPM device through to the guest
.El
.Pp
The
@@ -607,19 +651,23 @@ Version of the TPM device according to the TCG specification.
Defaults to
.Cm 2.0
.El
+.Ss Boot ROM device backends
+.Sm off
+.Bl -bullet
+.It
+.Ar romfile Ns Op Cm \&, Ns Ar varfile
+.El
+.Sm on
.Pp
-Boot ROM device backends:
-.Bl -tag -width 10n
-.It Ar romfile Ns Op Cm \&, Ns Ar varfile
Map
.Ar romfile
in the guest address space reserved for boot firmware.
+.Pp
If
.Ar varfile
is provided, that file is also mapped in the boot firmware guest
address space, and any modifications the guest makes will be saved
to that file.
-.El
.Pp
Fwcfg types:
.Bl -tag -width 10n
@@ -647,8 +695,7 @@ many other things to the guest.
Some operating systems such as Fedora CoreOS can be configured by
qemu's fwcfg interface as well.
.El
-.Pp
-Pass-through device backends:
+.Ss Pass-through device backends
.Sm off
.Bl -bullet
.It
@@ -697,28 +744,7 @@ The host device must have been reserved at boot-time using the
.Va pptdevs
loader variable as described in
.Xr vmm 4 .
-.Pp
-TPM devices:
-.Bl -tag -width 10n
-.It Ns Ar type
-Specifies the type of the TPM device.
-.Pp
-Supported types:
-.Bl -tag -width 10n
-.It Cm passthru
-.El
-.It Cm version= Ns Ar version
-The
-.Ar version
-of the emulated TPM device according to the TCG specification.
-.Pp
-Supported versions:
-.Bl -tag -width 10n
-.It Cm 2.0
-.El
-.El
-.Pp
-Virtio console device backends:
+.Ss Virtio console device backends
.Bl -bullet
.Sm off
.It
@@ -735,7 +761,7 @@ accepts at most one connection per port at a time.
Limitations:
.Bl -bullet
.It
-Due to lack of destructors in
+Due to the lack of destructors in
.Nm ,
sockets on the filesystem must be cleaned up manually after
.Nm
@@ -748,16 +774,18 @@ resize at present.
.It
Emergency write is advertised, but no-op at present.
.El
+.Ss Virtio input device backends:
+.Bl -bullet
+.Sm off
+.It
+.Ar /dev/input/eventX
+.Sm on
+.El
.Pp
-Virtio input device backends:
-.Bl -tag -width 10n
-.It Ar /dev/input/eventX
Send input events of
.Ar /dev/input/eventX
to guest by VirtIO Input Interface.
-.El
-.Pp
-Framebuffer devices backends:
+.Ss Framebuffer device backends
.Bl -bullet
.Sm off
.It
@@ -800,8 +828,8 @@ and maximum is 3840x2160 pixels.
Possible values for this option are
.Cm io
(default),
-.Cm on
-, and
+.Cm on ,
+and
.Cm off .
PCI graphics cards have a dual personality in that they are
standard PCI devices with BAR addressing, but may also
@@ -846,15 +874,17 @@ intended for use on untrusted networks.
Many implementations will want to use stronger security, such as running
the session over an encrypted channel provided by IPsec or SSH.
.El
-.Pp
-xHCI USB device backends:
-.Bl -tag -width 10n
-.It Cm tablet
-A USB tablet device which provides precise cursor synchronization
-when using VNC.
+.Ss xHCI USB device backends
+.Bl -bullet
+.Sm off
+.It
+.Ar tablet
+.Sm on
.El
.Pp
-NVMe device backends:
+A USB tablet device that provides precise cursor synchronization
+when using VNC.
+.Ss NVMe device backends
.Bl -bullet
.Sm off
.It
@@ -897,8 +927,7 @@ Supported values are:
and
.Cm disable .
.El
-.Pp
-AHCI device backends:
+.Ss AHCI device backends
.Bl -bullet
.It
.Sm off
@@ -923,8 +952,7 @@ Revision Number with maximum 8 characters.
.It Cm model
Model Number with maximum 40 characters.
.El
-.Pp
-HD Audio device backends:
+.Ss HD Audio device backends
.Bl -bullet
.It
.Sm off
@@ -942,31 +970,6 @@ Playback device, typically
Recording device, typically
.Ar /dev/dsp0 .
.El
-.It Fl U Ar uuid
-Set the universally unique identifier
-.Pq UUID
-in the guest's System Management BIOS System Information structure.
-By default a UUID is generated from the host's hostname and
-.Ar vmname .
-.It Fl u
-RTC keeps UTC time.
-.It Fl W
-Force virtio PCI device emulations to use MSI interrupts instead of MSI-X
-interrupts.
-.It Fl w
-Ignore accesses to unimplemented Model Specific Registers (MSRs).
-This is intended for debug purposes.
-.It Fl x
-The guest's local APIC is configured in x2APIC mode.
-This option applies only to the amd64 platform.
-.It Fl Y
-Disable MPtable generation.
-This option applies only to the amd64 platform.
-.It Ar vmname
-Alphanumeric name of the guest.
-This should be the same as that created by
-.Xr bhyveload 8 .
-.El
.Sh CONFIGURATION VARIABLES
.Nm
uses an internal tree of configuration variables to describe global and
@@ -993,6 +996,31 @@ and global settings.
.Pp
More details on configuration variables can be found in
.Xr bhyve_config 5 .
+.Sh CONFIGURATION FILE CREATION
+The
+.Fl k
+flag allows one to provide a path to a configuration file holding all
+settings, which otherwise would need to be defined by providing a long
+list of program arguments to
+.Nm .
+.Pp
+There is a very simple way to translate a complex set of program
+arguments to an equivalent configuration file in
+.Xr bhyve_config 5
+format.
+.Pp
+Use
+.Fl o
+.Ar config.dump=1
+to make
+.Nm
+dump a configuration file representing the used flags and arguments to
+stdout. You can pipe the output into a file to persist the generated settings.
+.Pp
+Make sure to remove the
+.Ar config.dump
+line from the resulting configuration file before using it to start
+.Nm .
.Sh DEBUG SERVER
The current debug server provides limited support for debuggers.
.Ss Registers
@@ -1131,6 +1159,31 @@ bhyve -c 2 -m 4g -w -H \\
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd
uefivm
.Ed
+.Pp
+To create a configuration file
+.Pa configfile
+for a virtual machine, use
+.Fl o
+.Ar config.dump=1 :
+.Bd -literal -offset indent
+/usr/sbin/bhyve -c 2 -m 256 -A -H -P \\
+ -s 0:0,hostbridge -s 1:0,virtio-net,tap0 \\
+ -s 2:0,ahci-hd,./vm0.img \\
+ -s 31,lpc -l com1,stdio \\
+ -o config.dump=1 vm0 > configfile
+.Ed
+.Pp
+Then use an editor of your choice to remove the line "config.dump=1"
+from the newly generated
+.Pa configfile .
+.Pp
+To start
+.Nm
+using this configuration file, use flag
+.Fl k :
+.Bd -literal -offset indent
+/usr/sbin/bhyve -k configfile vm0
+.Ed
.Sh SEE ALSO
.Xr bhyve 4 ,
.Xr netgraph 4 ,
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 1c3b810efb02..aca770a92642 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -100,6 +100,10 @@ uint16_t cpu_cores, cpu_sockets, cpu_threads;
int raw_stdio = 0;
+#ifdef BHYVE_SNAPSHOT
+char *restore_file;
+#endif
+
static const int BSP = 0;
static cpuset_t cpumask;
@@ -589,6 +593,7 @@ bhyve_parse_config_option(const char *option)
if (path == NULL)
err(4, "Failed to allocate memory");
set_config_value(path, value + 1);
+ free(path);
return (true);
}
@@ -656,10 +661,7 @@ main(int argc, char *argv[])
size_t memsize;
const char *value, *vmname;
#ifdef BHYVE_SNAPSHOT
- char *restore_file;
struct restore_state rstate;
-
- restore_file = NULL;
#endif
bhyve_init_config();
diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h
index e6ff90e5daa0..005de6dc5410 100644
--- a/usr.sbin/bhyve/bhyverun.h
+++ b/usr.sbin/bhyve/bhyverun.h
@@ -37,6 +37,10 @@
extern int guest_ncpus;
extern uint16_t cpu_cores, cpu_sockets, cpu_threads;
+#ifdef BHYVE_SNAPSHOT
+extern char *restore_file;
+#endif
+
struct vcpu;
struct vmctx;
struct vm_run;
diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c
index fbd62413e2c2..479ad407dbef 100644
--- a/usr.sbin/bhyve/gdb.c
+++ b/usr.sbin/bhyve/gdb.c
@@ -192,7 +192,6 @@ static const struct gdb_reg {
{ .id = VM_REG_GUEST_EFER, .size = 8 },
};
-#define GDB_LOG
#ifdef GDB_LOG
#include <stdarg.h>
#include <stdio.h>
diff --git a/usr.sbin/bhyve/tpm_ppi_qemu.c b/usr.sbin/bhyve/tpm_ppi_qemu.c
index ad66ecb09683..239d39184589 100644
--- a/usr.sbin/bhyve/tpm_ppi_qemu.c
+++ b/usr.sbin/bhyve/tpm_ppi_qemu.c
@@ -161,7 +161,7 @@ tpm_ppi_deinit(void *sc)
ppi = sc;
error = unregister_mem(&ppi_mmio);
- assert(error = 0);
+ assert(error == 0);
free(ppi);
}
diff --git a/usr.sbin/bhyve/uart_backend.c b/usr.sbin/bhyve/uart_backend.c
index 8d91f4f671e1..51844cbf1170 100644
--- a/usr.sbin/bhyve/uart_backend.c
+++ b/usr.sbin/bhyve/uart_backend.c
@@ -35,6 +35,7 @@
#include <assert.h>
#include <capsicum_helpers.h>
#include <err.h>
+#include <pthread.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
@@ -66,6 +67,7 @@ struct uart_softc {
struct ttyfd tty;
struct fifo rxfifo;
struct mevent *mev;
+ pthread_mutex_t mtx;
};
static bool uart_stdio; /* stdio in use for i/o */
@@ -325,7 +327,13 @@ uart_tty_backend(struct uart_softc *sc, const char *path)
struct uart_softc *
uart_init(void)
{
- return (calloc(1, sizeof(struct uart_softc)));
+ struct uart_softc *sc = calloc(1, sizeof(struct uart_softc));
+ if (sc == NULL)
+ return (NULL);
+
+ pthread_mutex_init(&sc->mtx, NULL);
+
+ return (sc);
}
int
@@ -346,3 +354,15 @@ uart_tty_open(struct uart_softc *sc, const char *path,
return (retval);
}
+
+void
+uart_softc_lock(struct uart_softc *sc)
+{
+ pthread_mutex_lock(&sc->mtx);
+}
+
+void
+uart_softc_unlock(struct uart_softc *sc)
+{
+ pthread_mutex_unlock(&sc->mtx);
+}
diff --git a/usr.sbin/bhyve/uart_backend.h b/usr.sbin/bhyve/uart_backend.h
index fa7949ad6d1c..ecf785ffd893 100644
--- a/usr.sbin/bhyve/uart_backend.h
+++ b/usr.sbin/bhyve/uart_backend.h
@@ -51,5 +51,6 @@ int uart_rxfifo_snapshot(struct uart_softc *sc,
struct uart_softc *uart_init(void);
int uart_tty_open(struct uart_softc *sc, const char *path,
void (*drain)(int, enum ev_type, void *), void *arg);
-
+void uart_softc_lock(struct uart_softc *sc);
+void uart_softc_unlock(struct uart_softc *sc);
#endif /* _UART_BACKEND_H_ */
diff --git a/usr.sbin/bhyve/uart_emul.c b/usr.sbin/bhyve/uart_emul.c
index 58d6697e4fea..bc71d4760634 100644
--- a/usr.sbin/bhyve/uart_emul.c
+++ b/usr.sbin/bhyve/uart_emul.c
@@ -83,7 +83,6 @@ static struct {
struct uart_ns16550_softc {
struct uart_softc *backend;
- pthread_mutex_t mtx; /* protects all softc elements */
uint8_t data; /* Data register (R/W) */
uint8_t ier; /* Interrupt enable register (R/W) */
uint8_t lcr; /* Line control register (R/W) */
@@ -204,14 +203,14 @@ uart_drain(int fd __unused, enum ev_type ev, void *arg)
* to take out the softc lock to protect against concurrent
* access from a vCPU i/o exit
*/
- pthread_mutex_lock(&sc->mtx);
+ uart_softc_lock(sc->backend);
loopback = (sc->mcr & MCR_LOOPBACK) != 0;
uart_rxfifo_drain(sc->backend, loopback);
if (!loopback)
uart_toggle_intr(sc);
- pthread_mutex_unlock(&sc->mtx);
+ uart_softc_unlock(sc->backend);
}
void
@@ -220,7 +219,7 @@ uart_ns16550_write(struct uart_ns16550_softc *sc, int offset, uint8_t value)
int fifosz;
uint8_t msr;
- pthread_mutex_lock(&sc->mtx);
+ uart_softc_lock(sc->backend);
/*
* Take care of the special case DLAB accesses first
@@ -329,7 +328,7 @@ uart_ns16550_write(struct uart_ns16550_softc *sc, int offset, uint8_t value)
done:
uart_toggle_intr(sc);
- pthread_mutex_unlock(&sc->mtx);
+ uart_softc_unlock(sc->backend);
}
uint8_t
@@ -337,7 +336,7 @@ uart_ns16550_read(struct uart_ns16550_softc *sc, int offset)
{
uint8_t iir, intr_reason, reg;
- pthread_mutex_lock(&sc->mtx);
+ uart_softc_lock(sc->backend);
/*
* Take care of the special case DLAB accesses first
@@ -414,7 +413,7 @@ uart_ns16550_read(struct uart_ns16550_softc *sc, int offset)
done:
uart_toggle_intr(sc);
- pthread_mutex_unlock(&sc->mtx);
+ uart_softc_unlock(sc->backend);
return (reg);
}
@@ -446,8 +445,6 @@ uart_ns16550_init(uart_intr_func_t intr_assert, uart_intr_func_t intr_deassert,
sc->intr_deassert = intr_deassert;
sc->backend = uart_init();
- pthread_mutex_init(&sc->mtx, NULL);
-
uart_reset(sc);
return (sc);
diff --git a/usr.sbin/bhyve/uart_pl011.c b/usr.sbin/bhyve/uart_pl011.c
index e2d5c8bf5657..fb576451c544 100644
--- a/usr.sbin/bhyve/uart_pl011.c
+++ b/usr.sbin/bhyve/uart_pl011.c
@@ -31,7 +31,6 @@
#include <sys/param.h>
#include <assert.h>
-#include <pthread.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -106,7 +105,6 @@
struct uart_pl011_softc {
struct uart_softc *backend;
- pthread_mutex_t mtx; /* protects all softc elements */
uint16_t irq_state;
@@ -184,7 +182,7 @@ uart_drain(int fd __unused, enum ev_type ev, void *arg)
* to take out the softc lock to protect against concurrent
* access from a vCPU i/o exit
*/
- pthread_mutex_lock(&sc->mtx);
+ uart_softc_lock(sc->backend);
old_size = uart_rxfifo_numchars(sc->backend);
@@ -202,7 +200,7 @@ uart_drain(int fd __unused, enum ev_type ev, void *arg)
if (!loopback)
uart_toggle_intr(sc);
- pthread_mutex_unlock(&sc->mtx);
+ uart_softc_unlock(sc->backend);
}
void
@@ -210,7 +208,7 @@ uart_pl011_write(struct uart_pl011_softc *sc, int offset, uint32_t value)
{
bool loopback;
- pthread_mutex_lock(&sc->mtx);
+ uart_softc_lock(sc->backend);
switch (offset) {
case UARTDR:
loopback = (sc->cr & UARTCR_LBE) != 0;
@@ -266,7 +264,7 @@ uart_pl011_write(struct uart_pl011_softc *sc, int offset, uint32_t value)
break;
}
uart_toggle_intr(sc);
- pthread_mutex_unlock(&sc->mtx);
+ uart_softc_unlock(sc->backend);
}
uint32_t
@@ -276,7 +274,7 @@ uart_pl011_read(struct uart_pl011_softc *sc, int offset)
int fifo_sz;
reg = 0;
- pthread_mutex_lock(&sc->mtx);
+ uart_softc_lock(sc->backend);
switch (offset) {
case UARTDR:
reg = uart_rxfifo_getchar(sc->backend);
@@ -362,7 +360,7 @@ uart_pl011_read(struct uart_pl011_softc *sc, int offset)
break;
}
uart_toggle_intr(sc);
- pthread_mutex_unlock(&sc->mtx);
+ uart_softc_unlock(sc->backend);
return (reg);
}
@@ -380,8 +378,6 @@ uart_pl011_init(uart_intr_func_t intr_assert, uart_intr_func_t intr_deassert,
sc->intr_deassert = intr_deassert;
sc->backend = uart_init();
- pthread_mutex_init(&sc->mtx, NULL);
-
uart_reset(sc);
return (sc);
diff --git a/usr.sbin/bhyvectl/Makefile b/usr.sbin/bhyvectl/Makefile
index 4f15bc35adf8..e5c6ad18d286 100644
--- a/usr.sbin/bhyvectl/Makefile
+++ b/usr.sbin/bhyvectl/Makefile
@@ -1,17 +1,18 @@
-#
-#
-
.include <src.opts.mk>
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}
+
PROG= bhyvectl
SRCS= bhyvectl.c
PACKAGE= bhyve
+.include "${MACHINE_CPUARCH}/Makefile.inc"
+
MAN= bhyvectl.8
LIBADD= vmmapi util
-CFLAGS+= -I${SRCTOP}/sys/amd64/vmm
+CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/amd64/vmm
.if ${MK_BHYVE_SNAPSHOT} != "no"
LIBADD+= nv
diff --git a/usr.sbin/bhyvectl/aarch64/Makefile.inc b/usr.sbin/bhyvectl/aarch64/Makefile.inc
new file mode 100644
index 000000000000..047e8d6c70bc
--- /dev/null
+++ b/usr.sbin/bhyvectl/aarch64/Makefile.inc
@@ -0,0 +1 @@
+SRCS+= bhyvectl_machdep.c
diff --git a/usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c b/usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c
new file mode 100644
index 000000000000..fc0541203de8
--- /dev/null
+++ b/usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c
@@ -0,0 +1,82 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Mark Johnston <markj@FreeBSD.org>
+ *
+ * This software was developed by the University of Cambridge Computer
+ * Laboratory (Department of Computer Science and Technology) under Innovate
+ * UK project 105694, "Digital Security by Design (DSbD) Technology Platform
+ * Prototype".
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <vmmapi.h>
+
+#include "bhyvectl.h"
+
+void
+bhyvectl_dump_vm_run_exitcode(struct vm_exit *vmexit __unused,
+ int vcpu __unused)
+{
+}
+
+struct option *
+bhyvectl_opts(const struct option *options, size_t count)
+{
+ struct option *all_opts;
+
+ all_opts = calloc(count + 1, sizeof(struct option));
+ if (all_opts == NULL)
+ err(1, "calloc");
+ memcpy(all_opts, options, count * sizeof(struct option));
+ return (all_opts);
+}
+
+void
+bhyvectl_handle_opt(const struct option *opts __unused, int opt __unused)
+{
+}
+
+const char *
+bhyvectl_opt_desc(int opt __unused)
+{
+ /* No arm64-specific options yet. */
+ return ("???");
+}
+
+void
+bhyvectl_md_main(struct vmctx *ctx __unused, struct vcpu *vcpu __unused,
+ int vcpuid __unused, bool get_all __unused)
+{
+}
diff --git a/usr.sbin/bhyvectl/amd64/Makefile.inc b/usr.sbin/bhyvectl/amd64/Makefile.inc
new file mode 100644
index 000000000000..047e8d6c70bc
--- /dev/null
+++ b/usr.sbin/bhyvectl/amd64/Makefile.inc
@@ -0,0 +1 @@
+SRCS+= bhyvectl_machdep.c
diff --git a/usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c b/usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c
new file mode 100644
index 000000000000..d7dc002d413e
--- /dev/null
+++ b/usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c
@@ -0,0 +1,1888 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2011 NetApp, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+
+#include <machine/cpufunc.h>
+#include <machine/specialreg.h>
+
+#include <err.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <vmmapi.h>
+#include "amd/vmcb.h"
+#include "intel/vmcs.h"
+
+#include "bhyvectl.h"
+
+enum {
+ SET_EFER = OPT_START_MD,
+ SET_CR0,
+ SET_CR2,
+ SET_CR3,
+ SET_CR4,
+ SET_DR0,
+ SET_DR1,
+ SET_DR2,
+ SET_DR3,
+ SET_DR6,
+ SET_DR7,
+ SET_RSP,
+ SET_RIP,
+ SET_RAX,
+ SET_RFLAGS,
+ DESC_BASE,
+ DESC_LIMIT,
+ DESC_ACCESS,
+ SET_CS,
+ SET_DS,
+ SET_ES,
+ SET_FS,
+ SET_GS,
+ SET_SS,
+ SET_TR,
+ SET_LDTR,
+ SET_X2APIC_STATE,
+ UNASSIGN_PPTDEV,
+ GET_GPA_PMAP,
+ ASSERT_LAPIC_LVT,
+ SET_RTC_TIME,
+ SET_RTC_NVRAM,
+ RTC_NVRAM_OFFSET,
+};
+
+static int get_rtc_time, set_rtc_time;
+static int get_rtc_nvram, set_rtc_nvram;
+static int rtc_nvram_offset;
+static uint8_t rtc_nvram_value;
+static time_t rtc_secs;
+static int get_gpa_pmap;
+static vm_paddr_t gpa_pmap;
+static int inject_nmi, assert_lapic_lvt = -1;
+static int get_intinfo;
+static int set_cr0, get_cr0, set_cr2, get_cr2, set_cr3, get_cr3;
+static int set_cr4, get_cr4;
+static uint64_t set_cr0_val, set_cr2_val, set_cr3_val, set_cr4_val;
+static int set_efer, get_efer;
+static uint64_t set_efer_val;
+static int set_dr0, get_dr0;
+static int set_dr1, get_dr1;
+static int set_dr2, get_dr2;
+static int set_dr3, get_dr3;
+static int set_dr6, get_dr6;
+static int set_dr7, get_dr7;
+static uint64_t set_dr0_val, set_dr1_val, set_dr2_val, set_dr3_val, set_dr6_val;
+static uint64_t set_dr7_val;
+static int set_rsp, get_rsp, set_rip, get_rip, set_rflags, get_rflags;
+static int set_rax, get_rax;
+static uint64_t set_rsp_val, set_rip_val, set_rflags_val, set_rax_val;
+static int get_rbx, get_rcx, get_rdx, get_rsi, get_rdi, get_rbp;
+static int get_r8, get_r9, get_r10, get_r11, get_r12, get_r13, get_r14, get_r15;
+static int set_desc_ds, get_desc_ds;
+static int set_desc_es, get_desc_es;
+static int set_desc_fs, get_desc_fs;
+static int set_desc_gs, get_desc_gs;
+static int set_desc_cs, get_desc_cs;
+static int set_desc_ss, get_desc_ss;
+static int set_desc_gdtr, get_desc_gdtr;
+static int set_desc_idtr, get_desc_idtr;
+static int set_desc_tr, get_desc_tr;
+static int set_desc_ldtr, get_desc_ldtr;
+static int set_cs, set_ds, set_es, set_fs, set_gs, set_ss, set_tr, set_ldtr;
+static int get_cs, get_ds, get_es, get_fs, get_gs, get_ss, get_tr, get_ldtr;
+static uint64_t set_cs_val, set_ds_val, set_es_val, set_fs_val, set_gs_val;
+static uint64_t set_ss_val, set_tr_val, set_ldtr_val;
+static int set_x2apic_state, get_x2apic_state;
+static enum x2apic_state x2apic_state;
+static int unassign_pptdev, bus, slot, func;
+
+static uint64_t desc_base;
+static uint32_t desc_limit, desc_access;
+
+/*
+ * VMCB specific.
+ */
+static int get_vmcb_intercept, get_vmcb_exit_details, get_vmcb_tlb_ctrl;
+static int get_vmcb_virq, get_avic_table;
+
+/*
+ * VMCS-specific fields
+ */
+static int get_pinbased_ctls, get_procbased_ctls, get_procbased_ctls2;
+static int get_eptp, get_io_bitmap, get_tsc_offset;
+static int get_vmcs_entry_interruption_info;
+static int get_vmcs_interruptibility;
+static int get_vmcs_gpa, get_vmcs_gla;
+static int get_exception_bitmap;
+static int get_cr0_mask, get_cr0_shadow;
+static int get_cr4_mask, get_cr4_shadow;
+static int get_cr3_targets;
+static int get_apic_access_addr, get_virtual_apic_addr, get_tpr_threshold;
+static int get_msr_bitmap, get_msr_bitmap_address;
+static int get_vpid_asid;
+static int get_inst_err, get_exit_ctls, get_entry_ctls;
+static int get_host_cr0, get_host_cr3, get_host_cr4;
+static int get_host_rip, get_host_rsp;
+static int get_guest_pat, get_host_pat;
+static int get_guest_sysenter, get_vmcs_link;
+static int get_exit_reason, get_vmcs_exit_qualification;
+static int get_vmcs_exit_interruption_info, get_vmcs_exit_interruption_error;
+static int get_vmcs_exit_inst_length;
+
+static bool
+cpu_vendor_intel(void)
+{
+ u_int regs[4], v[3];
+
+ do_cpuid(0, regs);
+ v[0] = regs[1];
+ v[1] = regs[3];
+ v[2] = regs[2];
+
+ if (memcmp(v, "GenuineIntel", sizeof(v)) == 0)
+ return (true);
+ if (memcmp(v, "AuthenticAMD", sizeof(v)) == 0 ||
+ memcmp(v, "HygonGenuine", sizeof(v)) == 0)
+ return (false);
+ fprintf(stderr, "Unknown cpu vendor \"%s\"\n", (const char *)v);
+ exit(1);
+}
+
+void
+bhyvectl_dump_vm_run_exitcode(struct vm_exit *vmexit, int vcpu)
+{
+ printf("vm exit[%d]\n", vcpu);
+ printf("\trip\t\t0x%016lx\n", vmexit->rip);
+ printf("\tinst_length\t%d\n", vmexit->inst_length);
+ switch (vmexit->exitcode) {
+ case VM_EXITCODE_INOUT:
+ printf("\treason\t\tINOUT\n");
+ printf("\tdirection\t%s\n", vmexit->u.inout.in ? "IN" : "OUT");
+ printf("\tbytes\t\t%d\n", vmexit->u.inout.bytes);
+ printf("\tflags\t\t%s%s\n",
+ vmexit->u.inout.string ? "STRING " : "",
+ vmexit->u.inout.rep ? "REP " : "");
+ printf("\tport\t\t0x%04x\n", vmexit->u.inout.port);
+ printf("\teax\t\t0x%08x\n", vmexit->u.inout.eax);
+ break;
+ case VM_EXITCODE_VMX:
+ printf("\treason\t\tVMX\n");
+ printf("\tstatus\t\t%d\n", vmexit->u.vmx.status);
+ printf("\texit_reason\t0x%08x (%u)\n",
+ vmexit->u.vmx.exit_reason, vmexit->u.vmx.exit_reason);
+ printf("\tqualification\t0x%016lx\n",
+ vmexit->u.vmx.exit_qualification);
+ printf("\tinst_type\t\t%d\n", vmexit->u.vmx.inst_type);
+ printf("\tinst_error\t\t%d\n", vmexit->u.vmx.inst_error);
+ break;
+ case VM_EXITCODE_SVM:
+ printf("\treason\t\tSVM\n");
+ printf("\texit_reason\t\t%#lx\n", vmexit->u.svm.exitcode);
+ printf("\texitinfo1\t\t%#lx\n", vmexit->u.svm.exitinfo1);
+ printf("\texitinfo2\t\t%#lx\n", vmexit->u.svm.exitinfo2);
+ break;
+ default:
+ printf("*** unknown vm run exitcode %d\n", vmexit->exitcode);
+ break;
+ }
+}
+
+static const char *
+wday_str(int idx)
+{
+ static const char *weekdays[] = {
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ };
+
+ if (idx >= 0 && idx < 7)
+ return (weekdays[idx]);
+ else
+ return ("UNK");
+}
+
+static const char *
+mon_str(int idx)
+{
+ static const char *months[] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
+
+ if (idx >= 0 && idx < 12)
+ return (months[idx]);
+ else
+ return ("UNK");
+}
+
+static void
+print_intinfo(const char *banner, uint64_t info)
+{
+ int type;
+
+ printf("%s:\t", banner);
+ if (info & VM_INTINFO_VALID) {
+ type = info & VM_INTINFO_TYPE;
+ switch (type) {
+ case VM_INTINFO_HWINTR:
+ printf("extint");
+ break;
+ case VM_INTINFO_NMI:
+ printf("nmi");
+ break;
+ case VM_INTINFO_SWINTR:
+ printf("swint");
+ break;
+ default:
+ printf("exception");
+ break;
+ }
+ printf(" vector %d", (int)VM_INTINFO_VECTOR(info));
+ if (info & VM_INTINFO_DEL_ERRCODE)
+ printf(" errcode %#x", (u_int)(info >> 32));
+ } else {
+ printf("n/a");
+ }
+ printf("\n");
+}
+
+/* AMD 6th generation and Intel compatible MSRs */
+#define MSR_AMD6TH_START 0xC0000000
+#define MSR_AMD6TH_END 0xC0001FFF
+/* AMD 7th and 8th generation compatible MSRs */
+#define MSR_AMD7TH_START 0xC0010000
+#define MSR_AMD7TH_END 0xC0011FFF
+
+static const char *
+msr_name(uint32_t msr)
+{
+ static char buf[32];
+
+ switch (msr) {
+ case MSR_TSC:
+ return ("MSR_TSC");
+ case MSR_EFER:
+ return ("MSR_EFER");
+ case MSR_STAR:
+ return ("MSR_STAR");
+ case MSR_LSTAR:
+ return ("MSR_LSTAR");
+ case MSR_CSTAR:
+ return ("MSR_CSTAR");
+ case MSR_SF_MASK:
+ return ("MSR_SF_MASK");
+ case MSR_FSBASE:
+ return ("MSR_FSBASE");
+ case MSR_GSBASE:
+ return ("MSR_GSBASE");
+ case MSR_KGSBASE:
+ return ("MSR_KGSBASE");
+ case MSR_SYSENTER_CS_MSR:
+ return ("MSR_SYSENTER_CS_MSR");
+ case MSR_SYSENTER_ESP_MSR:
+ return ("MSR_SYSENTER_ESP_MSR");
+ case MSR_SYSENTER_EIP_MSR:
+ return ("MSR_SYSENTER_EIP_MSR");
+ case MSR_PAT:
+ return ("MSR_PAT");
+ }
+ snprintf(buf, sizeof(buf), "MSR %#08x", msr);
+
+ return (buf);
+}
+
+static inline void
+print_msr_pm(uint64_t msr, int vcpu, int readable, int writeable)
+{
+
+ if (readable || writeable) {
+ printf("%-20s[%d]\t\t%c%c\n", msr_name(msr), vcpu,
+ readable ? 'R' : '-', writeable ? 'W' : '-');
+ }
+}
+
+/*
+ * Reference APM vol2, section 15.11 MSR Intercepts.
+ */
+static void
+dump_amd_msr_pm(const char *bitmap, int vcpu)
+{
+ int byte, bit, readable, writeable;
+ uint32_t msr;
+
+ for (msr = 0; msr < 0x2000; msr++) {
+ byte = msr / 4;
+ bit = (msr % 4) * 2;
+
+ /* Look at MSRs in the range 0x00000000 to 0x00001FFF */
+ readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
+ writeable = (bitmap[byte] & (2 << bit)) ? 0 : 1;
+ print_msr_pm(msr, vcpu, readable, writeable);
+
+ /* Look at MSRs in the range 0xC0000000 to 0xC0001FFF */
+ byte += 2048;
+ readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
+ writeable = (bitmap[byte] & (2 << bit)) ? 0 : 1;
+ print_msr_pm(msr + MSR_AMD6TH_START, vcpu, readable,
+ writeable);
+
+ /* MSR 0xC0010000 to 0xC0011FF is only for AMD */
+ byte += 4096;
+ readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
+ writeable = (bitmap[byte] & (2 << bit)) ? 0 : 1;
+ print_msr_pm(msr + MSR_AMD7TH_START, vcpu, readable,
+ writeable);
+ }
+}
+
+/*
+ * Reference Intel SDM Vol3 Section 24.6.9 MSR-Bitmap Address
+ */
+static void
+dump_intel_msr_pm(const char *bitmap, int vcpu)
+{
+ int byte, bit, readable, writeable;
+ uint32_t msr;
+
+ for (msr = 0; msr < 0x2000; msr++) {
+ byte = msr / 8;
+ bit = msr & 0x7;
+
+ /* Look at MSRs in the range 0x00000000 to 0x00001FFF */
+ readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
+ writeable = (bitmap[2048 + byte] & (1 << bit)) ? 0 : 1;
+ print_msr_pm(msr, vcpu, readable, writeable);
+
+ /* Look at MSRs in the range 0xC0000000 to 0xC0001FFF */
+ byte += 1024;
+ readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
+ writeable = (bitmap[2048 + byte] & (1 << bit)) ? 0 : 1;
+ print_msr_pm(msr + MSR_AMD6TH_START, vcpu, readable,
+ writeable);
+ }
+}
+
+static int
+dump_msr_bitmap(int vcpu, uint64_t addr, bool cpu_intel)
+{
+ char *bitmap;
+ int error, fd, map_size;
+
+ error = -1;
+ bitmap = MAP_FAILED;
+
+ fd = open("/dev/mem", O_RDONLY, 0);
+ if (fd < 0) {
+ perror("Couldn't open /dev/mem");
+ goto done;
+ }
+
+ if (cpu_intel)
+ map_size = PAGE_SIZE;
+ else
+ map_size = 2 * PAGE_SIZE;
+
+ bitmap = mmap(NULL, map_size, PROT_READ, MAP_SHARED, fd, addr);
+ if (bitmap == MAP_FAILED) {
+ perror("mmap failed");
+ goto done;
+ }
+
+ if (cpu_intel)
+ dump_intel_msr_pm(bitmap, vcpu);
+ else
+ dump_amd_msr_pm(bitmap, vcpu);
+
+ error = 0;
+done:
+ if (bitmap != MAP_FAILED)
+ munmap((void *)bitmap, map_size);
+ if (fd >= 0)
+ close(fd);
+
+ return (error);
+}
+
+static int
+vm_get_vmcs_field(struct vcpu *vcpu, int field, uint64_t *ret_val)
+{
+
+ return (vm_get_register(vcpu, VMCS_IDENT(field), ret_val));
+}
+
+static int
+vm_get_vmcb_field(struct vcpu *vcpu, int off, int bytes,
+ uint64_t *ret_val)
+{
+
+ return (vm_get_register(vcpu, VMCB_ACCESS(off, bytes), ret_val));
+}
+
+static int
+get_all_registers(struct vcpu *vcpu, int vcpuid, bool get_all)
+{
+ uint64_t cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7;
+ uint64_t rsp, rip, rflags, efer;
+ uint64_t rax, rbx, rcx, rdx, rsi, rdi, rbp;
+ uint64_t r8, r9, r10, r11, r12, r13, r14, r15;
+ int error = 0;
+
+ if (!error && (get_efer || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_EFER, &efer);
+ if (error == 0)
+ printf("efer[%d]\t\t0x%016lx\n", vcpuid, efer);
+ }
+
+ if (!error && (get_cr0 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_CR0, &cr0);
+ if (error == 0)
+ printf("cr0[%d]\t\t0x%016lx\n", vcpuid, cr0);
+ }
+
+ if (!error && (get_cr2 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_CR2, &cr2);
+ if (error == 0)
+ printf("cr2[%d]\t\t0x%016lx\n", vcpuid, cr2);
+ }
+
+ if (!error && (get_cr3 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_CR3, &cr3);
+ if (error == 0)
+ printf("cr3[%d]\t\t0x%016lx\n", vcpuid, cr3);
+ }
+
+ if (!error && (get_cr4 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_CR4, &cr4);
+ if (error == 0)
+ printf("cr4[%d]\t\t0x%016lx\n", vcpuid, cr4);
+ }
+
+ if (!error && (get_dr0 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DR0, &dr0);
+ if (error == 0)
+ printf("dr0[%d]\t\t0x%016lx\n", vcpuid, dr0);
+ }
+
+ if (!error && (get_dr1 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DR1, &dr1);
+ if (error == 0)
+ printf("dr1[%d]\t\t0x%016lx\n", vcpuid, dr1);
+ }
+
+ if (!error && (get_dr2 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DR2, &dr2);
+ if (error == 0)
+ printf("dr2[%d]\t\t0x%016lx\n", vcpuid, dr2);
+ }
+
+ if (!error && (get_dr3 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DR3, &dr3);
+ if (error == 0)
+ printf("dr3[%d]\t\t0x%016lx\n", vcpuid, dr3);
+ }
+
+ if (!error && (get_dr6 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DR6, &dr6);
+ if (error == 0)
+ printf("dr6[%d]\t\t0x%016lx\n", vcpuid, dr6);
+ }
+
+ if (!error && (get_dr7 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DR7, &dr7);
+ if (error == 0)
+ printf("dr7[%d]\t\t0x%016lx\n", vcpuid, dr7);
+ }
+
+ if (!error && (get_rsp || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RSP, &rsp);
+ if (error == 0)
+ printf("rsp[%d]\t\t0x%016lx\n", vcpuid, rsp);
+ }
+
+ if (!error && (get_rip || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RIP, &rip);
+ if (error == 0)
+ printf("rip[%d]\t\t0x%016lx\n", vcpuid, rip);
+ }
+
+ if (!error && (get_rax || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RAX, &rax);
+ if (error == 0)
+ printf("rax[%d]\t\t0x%016lx\n", vcpuid, rax);
+ }
+
+ if (!error && (get_rbx || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RBX, &rbx);
+ if (error == 0)
+ printf("rbx[%d]\t\t0x%016lx\n", vcpuid, rbx);
+ }
+
+ if (!error && (get_rcx || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RCX, &rcx);
+ if (error == 0)
+ printf("rcx[%d]\t\t0x%016lx\n", vcpuid, rcx);
+ }
+
+ if (!error && (get_rdx || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RDX, &rdx);
+ if (error == 0)
+ printf("rdx[%d]\t\t0x%016lx\n", vcpuid, rdx);
+ }
+
+ if (!error && (get_rsi || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RSI, &rsi);
+ if (error == 0)
+ printf("rsi[%d]\t\t0x%016lx\n", vcpuid, rsi);
+ }
+
+ if (!error && (get_rdi || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RDI, &rdi);
+ if (error == 0)
+ printf("rdi[%d]\t\t0x%016lx\n", vcpuid, rdi);
+ }
+
+ if (!error && (get_rbp || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RBP, &rbp);
+ if (error == 0)
+ printf("rbp[%d]\t\t0x%016lx\n", vcpuid, rbp);
+ }
+
+ if (!error && (get_r8 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R8, &r8);
+ if (error == 0)
+ printf("r8[%d]\t\t0x%016lx\n", vcpuid, r8);
+ }
+
+ if (!error && (get_r9 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R9, &r9);
+ if (error == 0)
+ printf("r9[%d]\t\t0x%016lx\n", vcpuid, r9);
+ }
+
+ if (!error && (get_r10 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R10, &r10);
+ if (error == 0)
+ printf("r10[%d]\t\t0x%016lx\n", vcpuid, r10);
+ }
+
+ if (!error && (get_r11 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R11, &r11);
+ if (error == 0)
+ printf("r11[%d]\t\t0x%016lx\n", vcpuid, r11);
+ }
+
+ if (!error && (get_r12 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R12, &r12);
+ if (error == 0)
+ printf("r12[%d]\t\t0x%016lx\n", vcpuid, r12);
+ }
+
+ if (!error && (get_r13 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R13, &r13);
+ if (error == 0)
+ printf("r13[%d]\t\t0x%016lx\n", vcpuid, r13);
+ }
+
+ if (!error && (get_r14 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R14, &r14);
+ if (error == 0)
+ printf("r14[%d]\t\t0x%016lx\n", vcpuid, r14);
+ }
+
+ if (!error && (get_r15 || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_R15, &r15);
+ if (error == 0)
+ printf("r15[%d]\t\t0x%016lx\n", vcpuid, r15);
+ }
+
+ if (!error && (get_rflags || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_RFLAGS,
+ &rflags);
+ if (error == 0)
+ printf("rflags[%d]\t0x%016lx\n", vcpuid, rflags);
+ }
+
+ return (error);
+}
+
+static int
+get_all_segments(struct vcpu *vcpu, int vcpuid, bool get_all)
+{
+ uint64_t cs, ds, es, fs, gs, ss, tr, ldtr;
+ int error = 0;
+
+ if (!error && (get_desc_ds || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_DS,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("ds desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_es || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_ES,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("es desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_fs || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_FS,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("fs desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_gs || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_GS,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("gs desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_ss || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_SS,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("ss desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_cs || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_CS,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("cs desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_tr || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_TR,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("tr desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_ldtr || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_LDTR,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("ldtr desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
+ vcpuid, desc_base, desc_limit, desc_access);
+ }
+ }
+
+ if (!error && (get_desc_gdtr || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_GDTR,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("gdtr[%d]\t\t0x%016lx/0x%08x\n",
+ vcpuid, desc_base, desc_limit);
+ }
+ }
+
+ if (!error && (get_desc_idtr || get_all)) {
+ error = vm_get_desc(vcpu, VM_REG_GUEST_IDTR,
+ &desc_base, &desc_limit, &desc_access);
+ if (error == 0) {
+ printf("idtr[%d]\t\t0x%016lx/0x%08x\n",
+ vcpuid, desc_base, desc_limit);
+ }
+ }
+
+ if (!error && (get_cs || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_CS, &cs);
+ if (error == 0)
+ printf("cs[%d]\t\t0x%04lx\n", vcpuid, cs);
+ }
+
+ if (!error && (get_ds || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_DS, &ds);
+ if (error == 0)
+ printf("ds[%d]\t\t0x%04lx\n", vcpuid, ds);
+ }
+
+ if (!error && (get_es || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_ES, &es);
+ if (error == 0)
+ printf("es[%d]\t\t0x%04lx\n", vcpuid, es);
+ }
+
+ if (!error && (get_fs || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_FS, &fs);
+ if (error == 0)
+ printf("fs[%d]\t\t0x%04lx\n", vcpuid, fs);
+ }
+
+ if (!error && (get_gs || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_GS, &gs);
+ if (error == 0)
+ printf("gs[%d]\t\t0x%04lx\n", vcpuid, gs);
+ }
+
+ if (!error && (get_ss || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_SS, &ss);
+ if (error == 0)
+ printf("ss[%d]\t\t0x%04lx\n", vcpuid, ss);
+ }
+
+ if (!error && (get_tr || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_TR, &tr);
+ if (error == 0)
+ printf("tr[%d]\t\t0x%04lx\n", vcpuid, tr);
+ }
+
+ if (!error && (get_ldtr || get_all)) {
+ error = vm_get_register(vcpu, VM_REG_GUEST_LDTR, &ldtr);
+ if (error == 0)
+ printf("ldtr[%d]\t\t0x%04lx\n", vcpuid, ldtr);
+ }
+
+ return (error);
+}
+
+static int
+get_misc_vmcs(struct vcpu *vcpu, int vcpuid, bool get_all)
+{
+ uint64_t ctl, cr0, cr3, cr4, rsp, rip, pat, addr, u64;
+ int error = 0;
+
+ if (!error && (get_cr0_mask || get_all)) {
+ uint64_t cr0mask;
+ error = vm_get_vmcs_field(vcpu, VMCS_CR0_MASK, &cr0mask);
+ if (error == 0)
+ printf("cr0_mask[%d]\t\t0x%016lx\n", vcpuid, cr0mask);
+ }
+
+ if (!error && (get_cr0_shadow || get_all)) {
+ uint64_t cr0shadow;
+ error = vm_get_vmcs_field(vcpu, VMCS_CR0_SHADOW,
+ &cr0shadow);
+ if (error == 0)
+ printf("cr0_shadow[%d]\t\t0x%016lx\n", vcpuid, cr0shadow);
+ }
+
+ if (!error && (get_cr4_mask || get_all)) {
+ uint64_t cr4mask;
+ error = vm_get_vmcs_field(vcpu, VMCS_CR4_MASK, &cr4mask);
+ if (error == 0)
+ printf("cr4_mask[%d]\t\t0x%016lx\n", vcpuid, cr4mask);
+ }
+
+ if (!error && (get_cr4_shadow || get_all)) {
+ uint64_t cr4shadow;
+ error = vm_get_vmcs_field(vcpu, VMCS_CR4_SHADOW,
+ &cr4shadow);
+ if (error == 0)
+ printf("cr4_shadow[%d]\t\t0x%016lx\n", vcpuid, cr4shadow);
+ }
+
+ if (!error && (get_cr3_targets || get_all)) {
+ uint64_t target_count, target_addr;
+ error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET_COUNT,
+ &target_count);
+ if (error == 0) {
+ printf("cr3_target_count[%d]\t0x%016lx\n",
+ vcpuid, target_count);
+ }
+
+ error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET0,
+ &target_addr);
+ if (error == 0) {
+ printf("cr3_target0[%d]\t\t0x%016lx\n",
+ vcpuid, target_addr);
+ }
+
+ error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET1,
+ &target_addr);
+ if (error == 0) {
+ printf("cr3_target1[%d]\t\t0x%016lx\n",
+ vcpuid, target_addr);
+ }
+
+ error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET2,
+ &target_addr);
+ if (error == 0) {
+ printf("cr3_target2[%d]\t\t0x%016lx\n",
+ vcpuid, target_addr);
+ }
+
+ error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET3,
+ &target_addr);
+ if (error == 0) {
+ printf("cr3_target3[%d]\t\t0x%016lx\n",
+ vcpuid, target_addr);
+ }
+ }
+
+ if (!error && (get_pinbased_ctls || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_PIN_BASED_CTLS, &ctl);
+ if (error == 0)
+ printf("pinbased_ctls[%d]\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_procbased_ctls || get_all)) {
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_PRI_PROC_BASED_CTLS, &ctl);
+ if (error == 0)
+ printf("procbased_ctls[%d]\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_procbased_ctls2 || get_all)) {
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_SEC_PROC_BASED_CTLS, &ctl);
+ if (error == 0)
+ printf("procbased_ctls2[%d]\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_vmcs_gla || get_all)) {
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_GUEST_LINEAR_ADDRESS, &u64);
+ if (error == 0)
+ printf("gla[%d]\t\t0x%016lx\n", vcpuid, u64);
+ }
+
+ if (!error && (get_vmcs_gpa || get_all)) {
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_GUEST_PHYSICAL_ADDRESS, &u64);
+ if (error == 0)
+ printf("gpa[%d]\t\t0x%016lx\n", vcpuid, u64);
+ }
+
+ if (!error && (get_vmcs_entry_interruption_info ||
+ get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_ENTRY_INTR_INFO,&u64);
+ if (error == 0) {
+ printf("entry_interruption_info[%d]\t0x%016lx\n",
+ vcpuid, u64);
+ }
+ }
+
+ if (!error && (get_tpr_threshold || get_all)) {
+ uint64_t threshold;
+ error = vm_get_vmcs_field(vcpu, VMCS_TPR_THRESHOLD,
+ &threshold);
+ if (error == 0)
+ printf("tpr_threshold[%d]\t0x%016lx\n", vcpuid, threshold);
+ }
+
+ if (!error && (get_inst_err || get_all)) {
+ uint64_t insterr;
+ error = vm_get_vmcs_field(vcpu, VMCS_INSTRUCTION_ERROR,
+ &insterr);
+ if (error == 0) {
+ printf("instruction_error[%d]\t0x%016lx\n",
+ vcpuid, insterr);
+ }
+ }
+
+ if (!error && (get_exit_ctls || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_EXIT_CTLS, &ctl);
+ if (error == 0)
+ printf("exit_ctls[%d]\t\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_entry_ctls || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_ENTRY_CTLS, &ctl);
+ if (error == 0)
+ printf("entry_ctls[%d]\t\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_host_pat || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_HOST_IA32_PAT, &pat);
+ if (error == 0)
+ printf("host_pat[%d]\t\t0x%016lx\n", vcpuid, pat);
+ }
+
+ if (!error && (get_host_cr0 || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_HOST_CR0, &cr0);
+ if (error == 0)
+ printf("host_cr0[%d]\t\t0x%016lx\n", vcpuid, cr0);
+ }
+
+ if (!error && (get_host_cr3 || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_HOST_CR3, &cr3);
+ if (error == 0)
+ printf("host_cr3[%d]\t\t0x%016lx\n", vcpuid, cr3);
+ }
+
+ if (!error && (get_host_cr4 || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_HOST_CR4, &cr4);
+ if (error == 0)
+ printf("host_cr4[%d]\t\t0x%016lx\n", vcpuid, cr4);
+ }
+
+ if (!error && (get_host_rip || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_HOST_RIP, &rip);
+ if (error == 0)
+ printf("host_rip[%d]\t\t0x%016lx\n", vcpuid, rip);
+ }
+
+ if (!error && (get_host_rsp || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_HOST_RSP, &rsp);
+ if (error == 0)
+ printf("host_rsp[%d]\t\t0x%016lx\n", vcpuid, rsp);
+ }
+
+ if (!error && (get_vmcs_link || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_LINK_POINTER, &addr);
+ if (error == 0)
+ printf("vmcs_pointer[%d]\t0x%016lx\n", vcpuid, addr);
+ }
+
+ if (!error && (get_vmcs_exit_interruption_info || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_EXIT_INTR_INFO, &u64);
+ if (error == 0) {
+ printf("vmcs_exit_interruption_info[%d]\t0x%016lx\n",
+ vcpuid, u64);
+ }
+ }
+
+ if (!error && (get_vmcs_exit_interruption_error || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_EXIT_INTR_ERRCODE, &u64);
+ if (error == 0) {
+ printf("vmcs_exit_interruption_error[%d]\t0x%016lx\n",
+ vcpuid, u64);
+ }
+ }
+
+ if (!error && (get_vmcs_interruptibility || get_all)) {
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_GUEST_INTERRUPTIBILITY, &u64);
+ if (error == 0) {
+ printf("vmcs_guest_interruptibility[%d]\t0x%016lx\n",
+ vcpuid, u64);
+ }
+ }
+
+ if (!error && (get_vmcs_exit_inst_length || get_all)) {
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_EXIT_INSTRUCTION_LENGTH, &u64);
+ if (error == 0)
+ printf("vmcs_exit_inst_length[%d]\t0x%08x\n", vcpuid,
+ (uint32_t)u64);
+ }
+
+ if (!error && (get_vmcs_exit_qualification || get_all)) {
+ error = vm_get_vmcs_field(vcpu, VMCS_EXIT_QUALIFICATION,
+ &u64);
+ if (error == 0)
+ printf("vmcs_exit_qualification[%d]\t0x%016lx\n",
+ vcpuid, u64);
+ }
+
+ return (error);
+}
+
+static int
+get_misc_vmcb(struct vcpu *vcpu, int vcpuid, bool get_all)
+{
+ uint64_t ctl, addr;
+ int error = 0;
+
+ if (!error && (get_vmcb_intercept || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_CR_INTERCEPT, 4,
+ &ctl);
+ if (error == 0)
+ printf("cr_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
+
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_DR_INTERCEPT, 4,
+ &ctl);
+ if (error == 0)
+ printf("dr_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
+
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXC_INTERCEPT, 4,
+ &ctl);
+ if (error == 0)
+ printf("exc_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
+
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_INST1_INTERCEPT,
+ 4, &ctl);
+ if (error == 0)
+ printf("inst1_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
+
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_INST2_INTERCEPT,
+ 4, &ctl);
+ if (error == 0)
+ printf("inst2_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
+ }
+
+ if (!error && (get_vmcb_tlb_ctrl || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_TLB_CTRL,
+ 4, &ctl);
+ if (error == 0)
+ printf("TLB ctrl[%d]\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_vmcb_exit_details || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXITINFO1,
+ 8, &ctl);
+ if (error == 0)
+ printf("exitinfo1[%d]\t0x%016lx\n", vcpuid, ctl);
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXITINFO2,
+ 8, &ctl);
+ if (error == 0)
+ printf("exitinfo2[%d]\t0x%016lx\n", vcpuid, ctl);
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXITINTINFO,
+ 8, &ctl);
+ if (error == 0)
+ printf("exitintinfo[%d]\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_vmcb_virq || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_VIRQ,
+ 8, &ctl);
+ if (error == 0)
+ printf("v_irq/tpr[%d]\t0x%016lx\n", vcpuid, ctl);
+ }
+
+ if (!error && (get_apic_access_addr || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_BAR, 8,
+ &addr);
+ if (error == 0)
+ printf("AVIC apic_bar[%d]\t0x%016lx\n", vcpuid, addr);
+ }
+
+ if (!error && (get_virtual_apic_addr || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_PAGE, 8,
+ &addr);
+ if (error == 0)
+ printf("AVIC backing page[%d]\t0x%016lx\n", vcpuid, addr);
+ }
+
+ if (!error && (get_avic_table || get_all)) {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_LT, 8,
+ &addr);
+ if (error == 0)
+ printf("AVIC logical table[%d]\t0x%016lx\n",
+ vcpuid, addr);
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_PT, 8,
+ &addr);
+ if (error == 0)
+ printf("AVIC physical table[%d]\t0x%016lx\n",
+ vcpuid, addr);
+ }
+
+ return (error);
+}
+
+struct option *
+bhyvectl_opts(const struct option *options, size_t count)
+{
+ const struct option common_opts[] = {
+ { "set-efer", REQ_ARG, 0, SET_EFER },
+ { "set-cr0", REQ_ARG, 0, SET_CR0 },
+ { "set-cr2", REQ_ARG, 0, SET_CR2 },
+ { "set-cr3", REQ_ARG, 0, SET_CR3 },
+ { "set-cr4", REQ_ARG, 0, SET_CR4 },
+ { "set-dr0", REQ_ARG, 0, SET_DR0 },
+ { "set-dr1", REQ_ARG, 0, SET_DR1 },
+ { "set-dr2", REQ_ARG, 0, SET_DR2 },
+ { "set-dr3", REQ_ARG, 0, SET_DR3 },
+ { "set-dr6", REQ_ARG, 0, SET_DR6 },
+ { "set-dr7", REQ_ARG, 0, SET_DR7 },
+ { "set-rsp", REQ_ARG, 0, SET_RSP },
+ { "set-rip", REQ_ARG, 0, SET_RIP },
+ { "set-rax", REQ_ARG, 0, SET_RAX },
+ { "set-rflags", REQ_ARG, 0, SET_RFLAGS },
+ { "desc-base", REQ_ARG, 0, DESC_BASE },
+ { "desc-limit", REQ_ARG, 0, DESC_LIMIT },
+ { "desc-access",REQ_ARG, 0, DESC_ACCESS },
+ { "set-cs", REQ_ARG, 0, SET_CS },
+ { "set-ds", REQ_ARG, 0, SET_DS },
+ { "set-es", REQ_ARG, 0, SET_ES },
+ { "set-fs", REQ_ARG, 0, SET_FS },
+ { "set-gs", REQ_ARG, 0, SET_GS },
+ { "set-ss", REQ_ARG, 0, SET_SS },
+ { "set-tr", REQ_ARG, 0, SET_TR },
+ { "set-ldtr", REQ_ARG, 0, SET_LDTR },
+ { "set-x2apic-state",REQ_ARG, 0, SET_X2APIC_STATE },
+ { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV },
+ { "get-gpa-pmap", REQ_ARG, 0, GET_GPA_PMAP },
+ { "assert-lapic-lvt", REQ_ARG, 0, ASSERT_LAPIC_LVT },
+ { "get-rtc-time", NO_ARG, &get_rtc_time, 1 },
+ { "set-rtc-time", REQ_ARG, 0, SET_RTC_TIME },
+ { "rtc-nvram-offset", REQ_ARG, 0, RTC_NVRAM_OFFSET },
+ { "get-rtc-nvram", NO_ARG, &get_rtc_nvram, 1 },
+ { "set-rtc-nvram", REQ_ARG, 0, SET_RTC_NVRAM },
+ { "get-desc-ds",NO_ARG, &get_desc_ds, 1 },
+ { "set-desc-ds",NO_ARG, &set_desc_ds, 1 },
+ { "get-desc-es",NO_ARG, &get_desc_es, 1 },
+ { "set-desc-es",NO_ARG, &set_desc_es, 1 },
+ { "get-desc-ss",NO_ARG, &get_desc_ss, 1 },
+ { "set-desc-ss",NO_ARG, &set_desc_ss, 1 },
+ { "get-desc-cs",NO_ARG, &get_desc_cs, 1 },
+ { "set-desc-cs",NO_ARG, &set_desc_cs, 1 },
+ { "get-desc-fs",NO_ARG, &get_desc_fs, 1 },
+ { "set-desc-fs",NO_ARG, &set_desc_fs, 1 },
+ { "get-desc-gs",NO_ARG, &get_desc_gs, 1 },
+ { "set-desc-gs",NO_ARG, &set_desc_gs, 1 },
+ { "get-desc-tr",NO_ARG, &get_desc_tr, 1 },
+ { "set-desc-tr",NO_ARG, &set_desc_tr, 1 },
+ { "set-desc-ldtr", NO_ARG, &set_desc_ldtr, 1 },
+ { "get-desc-ldtr", NO_ARG, &get_desc_ldtr, 1 },
+ { "set-desc-gdtr", NO_ARG, &set_desc_gdtr, 1 },
+ { "get-desc-gdtr", NO_ARG, &get_desc_gdtr, 1 },
+ { "set-desc-idtr", NO_ARG, &set_desc_idtr, 1 },
+ { "get-desc-idtr", NO_ARG, &get_desc_idtr, 1 },
+ { "get-efer", NO_ARG, &get_efer, 1 },
+ { "get-cr0", NO_ARG, &get_cr0, 1 },
+ { "get-cr2", NO_ARG, &get_cr2, 1 },
+ { "get-cr3", NO_ARG, &get_cr3, 1 },
+ { "get-cr4", NO_ARG, &get_cr4, 1 },
+ { "get-dr0", NO_ARG, &get_dr0, 1 },
+ { "get-dr1", NO_ARG, &get_dr1, 1 },
+ { "get-dr2", NO_ARG, &get_dr2, 1 },
+ { "get-dr3", NO_ARG, &get_dr3, 1 },
+ { "get-dr6", NO_ARG, &get_dr6, 1 },
+ { "get-dr7", NO_ARG, &get_dr7, 1 },
+ { "get-rsp", NO_ARG, &get_rsp, 1 },
+ { "get-rip", NO_ARG, &get_rip, 1 },
+ { "get-rax", NO_ARG, &get_rax, 1 },
+ { "get-rbx", NO_ARG, &get_rbx, 1 },
+ { "get-rcx", NO_ARG, &get_rcx, 1 },
+ { "get-rdx", NO_ARG, &get_rdx, 1 },
+ { "get-rsi", NO_ARG, &get_rsi, 1 },
+ { "get-rdi", NO_ARG, &get_rdi, 1 },
+ { "get-rbp", NO_ARG, &get_rbp, 1 },
+ { "get-r8", NO_ARG, &get_r8, 1 },
+ { "get-r9", NO_ARG, &get_r9, 1 },
+ { "get-r10", NO_ARG, &get_r10, 1 },
+ { "get-r11", NO_ARG, &get_r11, 1 },
+ { "get-r12", NO_ARG, &get_r12, 1 },
+ { "get-r13", NO_ARG, &get_r13, 1 },
+ { "get-r14", NO_ARG, &get_r14, 1 },
+ { "get-r15", NO_ARG, &get_r15, 1 },
+ { "get-rflags", NO_ARG, &get_rflags, 1 },
+ { "get-cs", NO_ARG, &get_cs, 1 },
+ { "get-ds", NO_ARG, &get_ds, 1 },
+ { "get-es", NO_ARG, &get_es, 1 },
+ { "get-fs", NO_ARG, &get_fs, 1 },
+ { "get-gs", NO_ARG, &get_gs, 1 },
+ { "get-ss", NO_ARG, &get_ss, 1 },
+ { "get-tr", NO_ARG, &get_tr, 1 },
+ { "get-ldtr", NO_ARG, &get_ldtr, 1 },
+ { "get-eptp", NO_ARG, &get_eptp, 1 },
+ { "get-exception-bitmap", NO_ARG, &get_exception_bitmap, 1 },
+ { "get-io-bitmap-address", NO_ARG, &get_io_bitmap, 1 },
+ { "get-tsc-offset", NO_ARG, &get_tsc_offset, 1 },
+ { "get-msr-bitmap", NO_ARG, &get_msr_bitmap, 1 },
+ { "get-msr-bitmap-address", NO_ARG, &get_msr_bitmap_address, 1},
+ { "get-guest-pat", NO_ARG, &get_guest_pat, 1 },
+ { "get-guest-sysenter", NO_ARG, &get_guest_sysenter, 1 },
+ { "get-exit-reason", NO_ARG, &get_exit_reason, 1 },
+ { "get-x2apic-state", NO_ARG, &get_x2apic_state, 1 },
+ { "inject-nmi", NO_ARG, &inject_nmi, 1 },
+ { "get-intinfo", NO_ARG, &get_intinfo, 1 },
+ };
+ const struct option intel_opts[] = {
+ { "get-vmcs-pinbased-ctls",
+ NO_ARG, &get_pinbased_ctls, 1 },
+ { "get-vmcs-procbased-ctls",
+ NO_ARG, &get_procbased_ctls, 1 },
+ { "get-vmcs-procbased-ctls2",
+ NO_ARG, &get_procbased_ctls2, 1 },
+ { "get-vmcs-guest-linear-address",
+ NO_ARG, &get_vmcs_gla, 1 },
+ { "get-vmcs-guest-physical-address",
+ NO_ARG, &get_vmcs_gpa, 1 },
+ { "get-vmcs-entry-interruption-info",
+ NO_ARG, &get_vmcs_entry_interruption_info, 1},
+ { "get-vmcs-cr0-mask", NO_ARG, &get_cr0_mask, 1 },
+ { "get-vmcs-cr0-shadow", NO_ARG,&get_cr0_shadow, 1 },
+ { "get-vmcs-cr4-mask", NO_ARG, &get_cr4_mask, 1 },
+ { "get-vmcs-cr4-shadow", NO_ARG, &get_cr4_shadow, 1 },
+ { "get-vmcs-cr3-targets", NO_ARG, &get_cr3_targets, 1 },
+ { "get-vmcs-tpr-threshold",
+ NO_ARG, &get_tpr_threshold, 1 },
+ { "get-vmcs-vpid", NO_ARG, &get_vpid_asid, 1 },
+ { "get-vmcs-exit-ctls", NO_ARG, &get_exit_ctls, 1 },
+ { "get-vmcs-entry-ctls",
+ NO_ARG, &get_entry_ctls, 1 },
+ { "get-vmcs-instruction-error",
+ NO_ARG, &get_inst_err, 1 },
+ { "get-vmcs-host-pat", NO_ARG, &get_host_pat, 1 },
+ { "get-vmcs-host-cr0",
+ NO_ARG, &get_host_cr0, 1 },
+ { "get-vmcs-exit-qualification",
+ NO_ARG, &get_vmcs_exit_qualification, 1 },
+ { "get-vmcs-exit-inst-length",
+ NO_ARG, &get_vmcs_exit_inst_length, 1 },
+ { "get-vmcs-interruptibility",
+ NO_ARG, &get_vmcs_interruptibility, 1 },
+ { "get-vmcs-exit-interruption-error",
+ NO_ARG, &get_vmcs_exit_interruption_error, 1 },
+ { "get-vmcs-exit-interruption-info",
+ NO_ARG, &get_vmcs_exit_interruption_info, 1 },
+ { "get-vmcs-link", NO_ARG, &get_vmcs_link, 1 },
+ { "get-vmcs-host-cr3",
+ NO_ARG, &get_host_cr3, 1 },
+ { "get-vmcs-host-cr4",
+ NO_ARG, &get_host_cr4, 1 },
+ { "get-vmcs-host-rip",
+ NO_ARG, &get_host_rip, 1 },
+ { "get-vmcs-host-rsp",
+ NO_ARG, &get_host_rsp, 1 },
+ { "get-apic-access-address",
+ NO_ARG, &get_apic_access_addr, 1},
+ { "get-virtual-apic-address",
+ NO_ARG, &get_virtual_apic_addr, 1}
+ };
+ const struct option amd_opts[] = {
+ { "get-vmcb-intercepts",
+ NO_ARG, &get_vmcb_intercept, 1 },
+ { "get-vmcb-asid",
+ NO_ARG, &get_vpid_asid, 1 },
+ { "get-vmcb-exit-details",
+ NO_ARG, &get_vmcb_exit_details, 1 },
+ { "get-vmcb-tlb-ctrl",
+ NO_ARG, &get_vmcb_tlb_ctrl, 1 },
+ { "get-vmcb-virq",
+ NO_ARG, &get_vmcb_virq, 1 },
+ { "get-avic-apic-bar",
+ NO_ARG, &get_apic_access_addr, 1 },
+ { "get-avic-backing-page",
+ NO_ARG, &get_virtual_apic_addr, 1 },
+ { "get-avic-table",
+ NO_ARG, &get_avic_table, 1 }
+ };
+ const struct option null_opt = {
+ NULL, 0, NULL, 0
+ };
+
+ struct option *all_opts;
+ char *cp;
+ int optlen;
+ bool cpu_intel;
+
+ cpu_intel = cpu_vendor_intel();
+ optlen = count * sizeof(struct option) + sizeof(common_opts);
+
+ if (cpu_intel)
+ optlen += sizeof(intel_opts);
+ else
+ optlen += sizeof(amd_opts);
+
+ optlen += sizeof(null_opt);
+
+ all_opts = malloc(optlen);
+ if (all_opts == NULL)
+ err(1, "malloc");
+
+ cp = (char *)all_opts;
+ memcpy(cp, options, count * sizeof(struct option));
+ cp += count * sizeof(struct option);
+ memcpy(cp, common_opts, sizeof(common_opts));
+ cp += sizeof(common_opts);
+
+ if (cpu_intel) {
+ memcpy(cp, intel_opts, sizeof(intel_opts));
+ cp += sizeof(intel_opts);
+ } else {
+ memcpy(cp, amd_opts, sizeof(amd_opts));
+ cp += sizeof(amd_opts);
+ }
+
+ memcpy(cp, &null_opt, sizeof(null_opt));
+ cp += sizeof(null_opt);
+
+ return (all_opts);
+}
+
+void
+bhyvectl_handle_opt(const struct option *opts, int opt)
+{
+ switch (opt) {
+ case SET_EFER:
+ set_efer_val = strtoul(optarg, NULL, 0);
+ set_efer = 1;
+ break;
+ case SET_CR0:
+ set_cr0_val = strtoul(optarg, NULL, 0);
+ set_cr0 = 1;
+ break;
+ case SET_CR2:
+ set_cr2_val = strtoul(optarg, NULL, 0);
+ set_cr2 = 1;
+ break;
+ case SET_CR3:
+ set_cr3_val = strtoul(optarg, NULL, 0);
+ set_cr3 = 1;
+ break;
+ case SET_CR4:
+ set_cr4_val = strtoul(optarg, NULL, 0);
+ set_cr4 = 1;
+ break;
+ case SET_DR0:
+ set_dr0_val = strtoul(optarg, NULL, 0);
+ set_dr0 = 1;
+ break;
+ case SET_DR1:
+ set_dr1_val = strtoul(optarg, NULL, 0);
+ set_dr1 = 1;
+ break;
+ case SET_DR2:
+ set_dr2_val = strtoul(optarg, NULL, 0);
+ set_dr2 = 1;
+ break;
+ case SET_DR3:
+ set_dr3_val = strtoul(optarg, NULL, 0);
+ set_dr3 = 1;
+ break;
+ case SET_DR6:
+ set_dr6_val = strtoul(optarg, NULL, 0);
+ set_dr6 = 1;
+ break;
+ case SET_DR7:
+ set_dr7_val = strtoul(optarg, NULL, 0);
+ set_dr7 = 1;
+ break;
+ case SET_RSP:
+ set_rsp_val = strtoul(optarg, NULL, 0);
+ set_rsp = 1;
+ break;
+ case SET_RIP:
+ set_rip_val = strtoul(optarg, NULL, 0);
+ set_rip = 1;
+ break;
+ case SET_RAX:
+ set_rax_val = strtoul(optarg, NULL, 0);
+ set_rax = 1;
+ break;
+ case SET_RFLAGS:
+ set_rflags_val = strtoul(optarg, NULL, 0);
+ set_rflags = 1;
+ break;
+ case DESC_BASE:
+ desc_base = strtoul(optarg, NULL, 0);
+ break;
+ case DESC_LIMIT:
+ desc_limit = strtoul(optarg, NULL, 0);
+ break;
+ case DESC_ACCESS:
+ desc_access = strtoul(optarg, NULL, 0);
+ break;
+ case SET_CS:
+ set_cs_val = strtoul(optarg, NULL, 0);
+ set_cs = 1;
+ break;
+ case SET_DS:
+ set_ds_val = strtoul(optarg, NULL, 0);
+ set_ds = 1;
+ break;
+ case SET_ES:
+ set_es_val = strtoul(optarg, NULL, 0);
+ set_es = 1;
+ break;
+ case SET_FS:
+ set_fs_val = strtoul(optarg, NULL, 0);
+ set_fs = 1;
+ break;
+ case SET_GS:
+ set_gs_val = strtoul(optarg, NULL, 0);
+ set_gs = 1;
+ break;
+ case SET_SS:
+ set_ss_val = strtoul(optarg, NULL, 0);
+ set_ss = 1;
+ break;
+ case SET_TR:
+ set_tr_val = strtoul(optarg, NULL, 0);
+ set_tr = 1;
+ break;
+ case SET_LDTR:
+ set_ldtr_val = strtoul(optarg, NULL, 0);
+ set_ldtr = 1;
+ break;
+ case SET_X2APIC_STATE:
+ x2apic_state = strtol(optarg, NULL, 0);
+ set_x2apic_state = 1;
+ break;
+ case SET_RTC_TIME:
+ rtc_secs = strtoul(optarg, NULL, 0);
+ set_rtc_time = 1;
+ break;
+ case SET_RTC_NVRAM:
+ rtc_nvram_value = (uint8_t)strtoul(optarg, NULL, 0);
+ set_rtc_nvram = 1;
+ break;
+ case RTC_NVRAM_OFFSET:
+ rtc_nvram_offset = strtoul(optarg, NULL, 0);
+ break;
+ case GET_GPA_PMAP:
+ gpa_pmap = strtoul(optarg, NULL, 0);
+ get_gpa_pmap = 1;
+ break;
+ case UNASSIGN_PPTDEV:
+ unassign_pptdev = 1;
+ if (sscanf(optarg, "%d/%d/%d", &bus, &slot, &func) != 3)
+ usage(opts);
+ break;
+ case ASSERT_LAPIC_LVT:
+ assert_lapic_lvt = atoi(optarg);
+ break;
+ }
+}
+
+const char *
+bhyvectl_opt_desc(int opt)
+{
+ switch (opt) {
+ case SET_EFER:
+ return ("EFER");
+ case SET_CR0:
+ return ("CR0");
+ case SET_CR2:
+ return ("CR2");
+ case SET_CR3:
+ return ("CR3");
+ case SET_CR4:
+ return ("CR4");
+ case SET_DR0:
+ return ("DR0");
+ case SET_DR1:
+ return ("DR1");
+ case SET_DR2:
+ return ("DR2");
+ case SET_DR3:
+ return ("DR3");
+ case SET_DR6:
+ return ("DR6");
+ case SET_DR7:
+ return ("DR7");
+ case SET_RSP:
+ return ("RSP");
+ case SET_RIP:
+ return ("RIP");
+ case SET_RAX:
+ return ("RAX");
+ case SET_RFLAGS:
+ return ("RFLAGS");
+ case DESC_BASE:
+ return ("BASE");
+ case DESC_LIMIT:
+ return ("LIMIT");
+ case DESC_ACCESS:
+ return ("ACCESS");
+ case SET_CS:
+ return ("CS");
+ case SET_DS:
+ return ("DS");
+ case SET_ES:
+ return ("ES");
+ case SET_FS:
+ return ("FS");
+ case SET_GS:
+ return ("GS");
+ case SET_SS:
+ return ("SS");
+ case SET_TR:
+ return ("TR");
+ case SET_LDTR:
+ return ("LDTR");
+ case SET_X2APIC_STATE:
+ return ("state");
+ case UNASSIGN_PPTDEV:
+ return ("bus/slot.func");
+ case GET_GPA_PMAP:
+ return ("gpa");
+ case ASSERT_LAPIC_LVT:
+ return ("pin");
+ case SET_RTC_TIME:
+ return ("secs");
+ case SET_RTC_NVRAM:
+ return ("val");
+ case RTC_NVRAM_OFFSET:
+ return ("offset");
+ default:
+ return ("???");
+ }
+}
+
+void
+bhyvectl_md_main(struct vmctx *ctx, struct vcpu *vcpu, int vcpuid, bool get_all)
+{
+ struct tm tm;
+ uint64_t info[2], pteval[4], *pte;
+ uint64_t addr, bm, eptp, u64;
+ uint64_t cs, rsp, rip, pat;
+ int error, ptenum;
+ bool cpu_intel;
+
+ cpu_intel = cpu_vendor_intel();
+ error = 0;
+
+ if (!error && set_efer)
+ error = vm_set_register(vcpu, VM_REG_GUEST_EFER, set_efer_val);
+
+ if (!error && set_cr0)
+ error = vm_set_register(vcpu, VM_REG_GUEST_CR0, set_cr0_val);
+
+ if (!error && set_cr2)
+ error = vm_set_register(vcpu, VM_REG_GUEST_CR2, set_cr2_val);
+
+ if (!error && set_cr3)
+ error = vm_set_register(vcpu, VM_REG_GUEST_CR3, set_cr3_val);
+
+ if (!error && set_cr4)
+ error = vm_set_register(vcpu, VM_REG_GUEST_CR4, set_cr4_val);
+
+ if (!error && set_dr0)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DR0, set_dr0_val);
+
+ if (!error && set_dr1)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DR1, set_dr1_val);
+
+ if (!error && set_dr2)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DR2, set_dr2_val);
+
+ if (!error && set_dr3)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DR3, set_dr3_val);
+
+ if (!error && set_dr6)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DR6, set_dr6_val);
+
+ if (!error && set_dr7)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DR7, set_dr7_val);
+
+ if (!error && set_rsp)
+ error = vm_set_register(vcpu, VM_REG_GUEST_RSP, set_rsp_val);
+
+ if (!error && set_rip)
+ error = vm_set_register(vcpu, VM_REG_GUEST_RIP, set_rip_val);
+
+ if (!error && set_rax)
+ error = vm_set_register(vcpu, VM_REG_GUEST_RAX, set_rax_val);
+
+ if (!error && set_rflags)
+ error = vm_set_register(vcpu, VM_REG_GUEST_RFLAGS,
+ set_rflags_val);
+
+ if (!error && set_desc_ds) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_DS,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_es) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_ES,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_ss) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_SS,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_cs) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_CS,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_fs) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_FS,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_gs) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_GS,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_tr) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_TR,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_ldtr) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_LDTR,
+ desc_base, desc_limit, desc_access);
+ }
+
+ if (!error && set_desc_gdtr) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_GDTR,
+ desc_base, desc_limit, 0);
+ }
+
+ if (!error && set_desc_idtr) {
+ error = vm_set_desc(vcpu, VM_REG_GUEST_IDTR,
+ desc_base, desc_limit, 0);
+ }
+
+ if (!error && set_cs)
+ error = vm_set_register(vcpu, VM_REG_GUEST_CS, set_cs_val);
+
+ if (!error && set_ds)
+ error = vm_set_register(vcpu, VM_REG_GUEST_DS, set_ds_val);
+
+ if (!error && set_es)
+ error = vm_set_register(vcpu, VM_REG_GUEST_ES, set_es_val);
+
+ if (!error && set_fs)
+ error = vm_set_register(vcpu, VM_REG_GUEST_FS, set_fs_val);
+
+ if (!error && set_gs)
+ error = vm_set_register(vcpu, VM_REG_GUEST_GS, set_gs_val);
+
+ if (!error && set_ss)
+ error = vm_set_register(vcpu, VM_REG_GUEST_SS, set_ss_val);
+
+ if (!error && set_tr)
+ error = vm_set_register(vcpu, VM_REG_GUEST_TR, set_tr_val);
+
+ if (!error && set_ldtr)
+ error = vm_set_register(vcpu, VM_REG_GUEST_LDTR, set_ldtr_val);
+
+ if (!error && set_x2apic_state)
+ error = vm_set_x2apic_state(vcpu, x2apic_state);
+
+ if (!error && unassign_pptdev)
+ error = vm_unassign_pptdev(ctx, bus, slot, func);
+
+ if (!error && inject_nmi)
+ error = vm_inject_nmi(vcpu);
+
+ if (!error && assert_lapic_lvt != -1)
+ error = vm_lapic_local_irq(vcpu, assert_lapic_lvt);
+
+ if (!error)
+ error = get_all_registers(vcpu, vcpuid, get_all);
+
+ if (!error)
+ error = get_all_segments(vcpu, vcpuid, get_all);
+
+ if (!error) {
+ if (cpu_intel)
+ error = get_misc_vmcs(vcpu, vcpuid, get_all);
+ else
+ error = get_misc_vmcb(vcpu, vcpuid, get_all);
+ }
+
+ if (!error && (get_x2apic_state || get_all)) {
+ error = vm_get_x2apic_state(vcpu, &x2apic_state);
+ if (error == 0)
+ printf("x2apic_state[%d]\t%d\n", vcpuid, x2apic_state);
+ }
+
+ if (!error && (get_eptp || get_all)) {
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_EPTP, &eptp);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_NPT_BASE, 8,
+ &eptp);
+ if (error == 0)
+ printf("%s[%d]\t\t0x%016lx\n",
+ cpu_intel ? "eptp" : "rvi/npt", vcpuid, eptp);
+ }
+
+ if (!error && (get_exception_bitmap || get_all)) {
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_EXCEPTION_BITMAP,
+ &bm);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXC_INTERCEPT,
+ 4, &bm);
+ if (error == 0)
+ printf("exception_bitmap[%d]\t%#lx\n", vcpuid, bm);
+ }
+
+ if (!error && (get_io_bitmap || get_all)) {
+ if (cpu_intel) {
+ error = vm_get_vmcs_field(vcpu, VMCS_IO_BITMAP_A, &bm);
+ if (error == 0)
+ printf("io_bitmap_a[%d]\t%#lx\n", vcpuid, bm);
+ error = vm_get_vmcs_field(vcpu, VMCS_IO_BITMAP_B, &bm);
+ if (error == 0)
+ printf("io_bitmap_b[%d]\t%#lx\n", vcpuid, bm);
+ } else {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_IO_PERM, 8,
+ &bm);
+ if (error == 0)
+ printf("io_bitmap[%d]\t%#lx\n", vcpuid, bm);
+ }
+ }
+
+ if (!error && (get_tsc_offset || get_all)) {
+ uint64_t tscoff;
+
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_TSC_OFFSET,
+ &tscoff);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_TSC_OFFSET, 8,
+ &tscoff);
+ if (error == 0)
+ printf("tsc_offset[%d]\t0x%016lx\n", vcpuid, tscoff);
+ }
+
+ if (!error && (get_msr_bitmap_address || get_all)) {
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_MSR_BITMAP, &addr);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_MSR_PERM, 8,
+ &addr);
+ if (error == 0)
+ printf("msr_bitmap[%d]\t\t%#lx\n", vcpuid, addr);
+ }
+
+ if (!error && (get_msr_bitmap || get_all)) {
+ if (cpu_intel) {
+ error = vm_get_vmcs_field(vcpu, VMCS_MSR_BITMAP, &addr);
+ } else {
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_MSR_PERM, 8,
+ &addr);
+ }
+
+ if (error == 0)
+ error = dump_msr_bitmap(vcpuid, addr, cpu_intel);
+ }
+
+ if (!error && (get_vpid_asid || get_all)) {
+ uint64_t vpid;
+
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_VPID, &vpid);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_ASID, 4,
+ &vpid);
+ if (error == 0)
+ printf("%s[%d]\t\t0x%04lx\n",
+ cpu_intel ? "vpid" : "asid", vcpuid, vpid);
+ }
+
+ if (!error && (get_guest_pat || get_all)) {
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_GUEST_IA32_PAT,
+ &pat);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_GUEST_PAT, 8,
+ &pat);
+ if (error == 0)
+ printf("guest_pat[%d]\t\t0x%016lx\n", vcpuid, pat);
+ }
+
+ if (!error && (get_guest_sysenter || get_all)) {
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_GUEST_IA32_SYSENTER_CS, &cs);
+ else
+ error = vm_get_vmcb_field(vcpu,
+ VMCB_OFF_SYSENTER_CS, 8, &cs);
+
+ if (error == 0)
+ printf("guest_sysenter_cs[%d]\t%#lx\n", vcpuid, cs);
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_GUEST_IA32_SYSENTER_ESP, &rsp);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_SYSENTER_ESP,
+ 8, &rsp);
+
+ if (error == 0)
+ printf("guest_sysenter_sp[%d]\t%#lx\n", vcpuid, rsp);
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu,
+ VMCS_GUEST_IA32_SYSENTER_EIP, &rip);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_SYSENTER_EIP,
+ 8, &rip);
+ if (error == 0)
+ printf("guest_sysenter_ip[%d]\t%#lx\n", vcpuid, rip);
+ }
+
+ if (!error && (get_exit_reason || get_all)) {
+ if (cpu_intel)
+ error = vm_get_vmcs_field(vcpu, VMCS_EXIT_REASON, &u64);
+ else
+ error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXIT_REASON, 8,
+ &u64);
+ if (error == 0)
+ printf("exit_reason[%d]\t%#lx\n", vcpuid, u64);
+ }
+
+ if (!error && get_gpa_pmap) {
+ error = vm_get_gpa_pmap(ctx, gpa_pmap, pteval, &ptenum);
+ if (error == 0) {
+ printf("gpa %#lx:", gpa_pmap);
+ pte = &pteval[0];
+ while (ptenum-- > 0)
+ printf(" %#lx", *pte++);
+ printf("\n");
+ }
+ }
+
+ if (!error && set_rtc_nvram)
+ error = vm_rtc_write(ctx, rtc_nvram_offset, rtc_nvram_value);
+
+ if (!error && (get_rtc_nvram || get_all)) {
+ error = vm_rtc_read(ctx, rtc_nvram_offset, &rtc_nvram_value);
+ if (error == 0) {
+ printf("rtc nvram[%03d]: 0x%02x\n", rtc_nvram_offset,
+ rtc_nvram_value);
+ }
+ }
+
+ if (!error && set_rtc_time)
+ error = vm_rtc_settime(ctx, rtc_secs);
+
+ if (!error && (get_rtc_time || get_all)) {
+ error = vm_rtc_gettime(ctx, &rtc_secs);
+ if (error == 0) {
+ gmtime_r(&rtc_secs, &tm);
+ printf("rtc time %#lx: %s %s %02d %02d:%02d:%02d %d\n",
+ rtc_secs, wday_str(tm.tm_wday), mon_str(tm.tm_mon),
+ tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,
+ 1900 + tm.tm_year);
+ }
+ }
+
+ if (!error && (get_intinfo || get_all)) {
+ error = vm_get_intinfo(vcpu, &info[0], &info[1]);
+ if (!error) {
+ print_intinfo("pending", info[0]);
+ print_intinfo("current", info[1]);
+ }
+ }
+}
diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c
index 90c9d51c2138..5e23860d711c 100644
--- a/usr.sbin/bhyvectl/bhyvectl.c
+++ b/usr.sbin/bhyvectl/bhyvectl.c
@@ -27,7 +27,6 @@
*/
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/cpuset.h>
#include <sys/errno.h>
#include <sys/mman.h>
@@ -45,371 +44,54 @@
#include <libutil.h>
#include <fcntl.h>
#include <getopt.h>
-#include <time.h>
-#include <assert.h>
#include <libutil.h>
#include <machine/cpufunc.h>
-#include <machine/specialreg.h>
#include <machine/vmm.h>
#include <machine/vmm_dev.h>
#include <vmmapi.h>
-#include "amd/vmcb.h"
-#include "intel/vmcs.h"
-
#ifdef BHYVE_SNAPSHOT
#include "snapshot.h"
#endif
+#include "bhyvectl.h"
+
#define MB (1UL << 20)
#define GB (1UL << 30)
-#define REQ_ARG required_argument
-#define NO_ARG no_argument
-#define OPT_ARG optional_argument
-
static const char *progname;
-static int get_rtc_time, set_rtc_time;
-static int get_rtc_nvram, set_rtc_nvram;
-static int rtc_nvram_offset;
-static uint8_t rtc_nvram_value;
-static time_t rtc_secs;
-
-static int get_stats, getcap, setcap, capval, get_gpa_pmap;
-static int inject_nmi, assert_lapic_lvt;
+static int get_stats, getcap, setcap, capval;
static int force_reset, force_poweroff;
static const char *capname;
static int create, destroy, get_memmap, get_memseg;
-static int get_intinfo;
static int get_active_cpus, get_debug_cpus, get_suspended_cpus;
static uint64_t memsize;
-static int set_cr0, get_cr0, set_cr2, get_cr2, set_cr3, get_cr3;
-static int set_cr4, get_cr4;
-static int set_efer, get_efer;
-static int set_dr0, get_dr0;
-static int set_dr1, get_dr1;
-static int set_dr2, get_dr2;
-static int set_dr3, get_dr3;
-static int set_dr6, get_dr6;
-static int set_dr7, get_dr7;
-static int set_rsp, get_rsp, set_rip, get_rip, set_rflags, get_rflags;
-static int set_rax, get_rax;
-static int get_rbx, get_rcx, get_rdx, get_rsi, get_rdi, get_rbp;
-static int get_r8, get_r9, get_r10, get_r11, get_r12, get_r13, get_r14, get_r15;
-static int set_desc_ds, get_desc_ds;
-static int set_desc_es, get_desc_es;
-static int set_desc_fs, get_desc_fs;
-static int set_desc_gs, get_desc_gs;
-static int set_desc_cs, get_desc_cs;
-static int set_desc_ss, get_desc_ss;
-static int set_desc_gdtr, get_desc_gdtr;
-static int set_desc_idtr, get_desc_idtr;
-static int set_desc_tr, get_desc_tr;
-static int set_desc_ldtr, get_desc_ldtr;
-static int set_cs, set_ds, set_es, set_fs, set_gs, set_ss, set_tr, set_ldtr;
-static int get_cs, get_ds, get_es, get_fs, get_gs, get_ss, get_tr, get_ldtr;
-static int set_x2apic_state, get_x2apic_state;
-static enum x2apic_state x2apic_state;
-static int unassign_pptdev, bus, slot, func;
static int run;
static int get_cpu_topology;
#ifdef BHYVE_SNAPSHOT
static int vm_suspend_opt;
#endif
-/*
- * VMCB specific.
- */
-static int get_vmcb_intercept, get_vmcb_exit_details, get_vmcb_tlb_ctrl;
-static int get_vmcb_virq, get_avic_table;
-
-/*
- * VMCS-specific fields
- */
-static int get_pinbased_ctls, get_procbased_ctls, get_procbased_ctls2;
-static int get_eptp, get_io_bitmap, get_tsc_offset;
-static int get_vmcs_entry_interruption_info;
-static int get_vmcs_interruptibility;
-static int get_vmcs_gpa, get_vmcs_gla;
-static int get_exception_bitmap;
-static int get_cr0_mask, get_cr0_shadow;
-static int get_cr4_mask, get_cr4_shadow;
-static int get_cr3_targets;
-static int get_apic_access_addr, get_virtual_apic_addr, get_tpr_threshold;
-static int get_msr_bitmap, get_msr_bitmap_address;
-static int get_vpid_asid;
-static int get_inst_err, get_exit_ctls, get_entry_ctls;
-static int get_host_cr0, get_host_cr3, get_host_cr4;
-static int get_host_rip, get_host_rsp;
-static int get_guest_pat, get_host_pat;
-static int get_guest_sysenter, get_vmcs_link;
-static int get_exit_reason, get_vmcs_exit_qualification;
-static int get_vmcs_exit_interruption_info, get_vmcs_exit_interruption_error;
-static int get_vmcs_exit_inst_length;
-
-static uint64_t desc_base;
-static uint32_t desc_limit, desc_access;
-
static int get_all;
-static void
-dump_vm_run_exitcode(struct vm_exit *vmexit, int vcpu)
-{
- printf("vm exit[%d]\n", vcpu);
- printf("\trip\t\t0x%016lx\n", vmexit->rip);
- printf("\tinst_length\t%d\n", vmexit->inst_length);
- switch (vmexit->exitcode) {
- case VM_EXITCODE_INOUT:
- printf("\treason\t\tINOUT\n");
- printf("\tdirection\t%s\n", vmexit->u.inout.in ? "IN" : "OUT");
- printf("\tbytes\t\t%d\n", vmexit->u.inout.bytes);
- printf("\tflags\t\t%s%s\n",
- vmexit->u.inout.string ? "STRING " : "",
- vmexit->u.inout.rep ? "REP " : "");
- printf("\tport\t\t0x%04x\n", vmexit->u.inout.port);
- printf("\teax\t\t0x%08x\n", vmexit->u.inout.eax);
- break;
- case VM_EXITCODE_VMX:
- printf("\treason\t\tVMX\n");
- printf("\tstatus\t\t%d\n", vmexit->u.vmx.status);
- printf("\texit_reason\t0x%08x (%u)\n",
- vmexit->u.vmx.exit_reason, vmexit->u.vmx.exit_reason);
- printf("\tqualification\t0x%016lx\n",
- vmexit->u.vmx.exit_qualification);
- printf("\tinst_type\t\t%d\n", vmexit->u.vmx.inst_type);
- printf("\tinst_error\t\t%d\n", vmexit->u.vmx.inst_error);
- break;
- case VM_EXITCODE_SVM:
- printf("\treason\t\tSVM\n");
- printf("\texit_reason\t\t%#lx\n", vmexit->u.svm.exitcode);
- printf("\texitinfo1\t\t%#lx\n", vmexit->u.svm.exitinfo1);
- printf("\texitinfo2\t\t%#lx\n", vmexit->u.svm.exitinfo2);
- break;
- default:
- printf("*** unknown vm run exitcode %d\n", vmexit->exitcode);
- break;
- }
-}
-
-/* AMD 6th generation and Intel compatible MSRs */
-#define MSR_AMD6TH_START 0xC0000000
-#define MSR_AMD6TH_END 0xC0001FFF
-/* AMD 7th and 8th generation compatible MSRs */
-#define MSR_AMD7TH_START 0xC0010000
-#define MSR_AMD7TH_END 0xC0011FFF
-
-static const char *
-msr_name(uint32_t msr)
-{
- static char buf[32];
-
- switch(msr) {
- case MSR_TSC:
- return ("MSR_TSC");
- case MSR_EFER:
- return ("MSR_EFER");
- case MSR_STAR:
- return ("MSR_STAR");
- case MSR_LSTAR:
- return ("MSR_LSTAR");
- case MSR_CSTAR:
- return ("MSR_CSTAR");
- case MSR_SF_MASK:
- return ("MSR_SF_MASK");
- case MSR_FSBASE:
- return ("MSR_FSBASE");
- case MSR_GSBASE:
- return ("MSR_GSBASE");
- case MSR_KGSBASE:
- return ("MSR_KGSBASE");
- case MSR_SYSENTER_CS_MSR:
- return ("MSR_SYSENTER_CS_MSR");
- case MSR_SYSENTER_ESP_MSR:
- return ("MSR_SYSENTER_ESP_MSR");
- case MSR_SYSENTER_EIP_MSR:
- return ("MSR_SYSENTER_EIP_MSR");
- case MSR_PAT:
- return ("MSR_PAT");
- }
- snprintf(buf, sizeof(buf), "MSR %#08x", msr);
-
- return (buf);
-}
-
-static inline void
-print_msr_pm(uint64_t msr, int vcpu, int readable, int writeable)
-{
-
- if (readable || writeable) {
- printf("%-20s[%d]\t\t%c%c\n", msr_name(msr), vcpu,
- readable ? 'R' : '-', writeable ? 'W' : '-');
- }
-}
-
-/*
- * Reference APM vol2, section 15.11 MSR Intercepts.
- */
-static void
-dump_amd_msr_pm(const char *bitmap, int vcpu)
-{
- int byte, bit, readable, writeable;
- uint32_t msr;
-
- for (msr = 0; msr < 0x2000; msr++) {
- byte = msr / 4;
- bit = (msr % 4) * 2;
-
- /* Look at MSRs in the range 0x00000000 to 0x00001FFF */
- readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
- writeable = (bitmap[byte] & (2 << bit)) ? 0 : 1;
- print_msr_pm(msr, vcpu, readable, writeable);
-
- /* Look at MSRs in the range 0xC0000000 to 0xC0001FFF */
- byte += 2048;
- readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
- writeable = (bitmap[byte] & (2 << bit)) ? 0 : 1;
- print_msr_pm(msr + MSR_AMD6TH_START, vcpu, readable,
- writeable);
-
- /* MSR 0xC0010000 to 0xC0011FF is only for AMD */
- byte += 4096;
- readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
- writeable = (bitmap[byte] & (2 << bit)) ? 0 : 1;
- print_msr_pm(msr + MSR_AMD7TH_START, vcpu, readable,
- writeable);
- }
-}
-
-/*
- * Reference Intel SDM Vol3 Section 24.6.9 MSR-Bitmap Address
- */
-static void
-dump_intel_msr_pm(const char *bitmap, int vcpu)
-{
- int byte, bit, readable, writeable;
- uint32_t msr;
-
- for (msr = 0; msr < 0x2000; msr++) {
- byte = msr / 8;
- bit = msr & 0x7;
-
- /* Look at MSRs in the range 0x00000000 to 0x00001FFF */
- readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
- writeable = (bitmap[2048 + byte] & (1 << bit)) ? 0 : 1;
- print_msr_pm(msr, vcpu, readable, writeable);
-
- /* Look at MSRs in the range 0xC0000000 to 0xC0001FFF */
- byte += 1024;
- readable = (bitmap[byte] & (1 << bit)) ? 0 : 1;
- writeable = (bitmap[2048 + byte] & (1 << bit)) ? 0 : 1;
- print_msr_pm(msr + MSR_AMD6TH_START, vcpu, readable,
- writeable);
- }
-}
-
-static int
-dump_msr_bitmap(int vcpu, uint64_t addr, bool cpu_intel)
-{
- char *bitmap;
- int error, fd, map_size;
-
- error = -1;
- bitmap = MAP_FAILED;
-
- fd = open("/dev/mem", O_RDONLY, 0);
- if (fd < 0) {
- perror("Couldn't open /dev/mem");
- goto done;
- }
-
- if (cpu_intel)
- map_size = PAGE_SIZE;
- else
- map_size = 2 * PAGE_SIZE;
-
- bitmap = mmap(NULL, map_size, PROT_READ, MAP_SHARED, fd, addr);
- if (bitmap == MAP_FAILED) {
- perror("mmap failed");
- goto done;
- }
-
- if (cpu_intel)
- dump_intel_msr_pm(bitmap, vcpu);
- else
- dump_amd_msr_pm(bitmap, vcpu);
-
- error = 0;
-done:
- if (bitmap != MAP_FAILED)
- munmap((void *)bitmap, map_size);
- if (fd >= 0)
- close(fd);
-
- return (error);
-}
-
-static int
-vm_get_vmcs_field(struct vcpu *vcpu, int field, uint64_t *ret_val)
-{
-
- return (vm_get_register(vcpu, VMCS_IDENT(field), ret_val));
-}
-
-static int
-vm_get_vmcb_field(struct vcpu *vcpu, int off, int bytes,
- uint64_t *ret_val)
-{
-
- return (vm_get_register(vcpu, VMCB_ACCESS(off, bytes), ret_val));
-}
-
enum {
- VMNAME = 1000, /* avoid collision with return values from getopt */
+ VMNAME = OPT_START, /* avoid collision with return values from getopt */
VCPU,
SET_MEM,
- SET_EFER,
- SET_CR0,
- SET_CR2,
- SET_CR3,
- SET_CR4,
- SET_DR0,
- SET_DR1,
- SET_DR2,
- SET_DR3,
- SET_DR6,
- SET_DR7,
- SET_RSP,
- SET_RIP,
- SET_RAX,
- SET_RFLAGS,
- DESC_BASE,
- DESC_LIMIT,
- DESC_ACCESS,
- SET_CS,
- SET_DS,
- SET_ES,
- SET_FS,
- SET_GS,
- SET_SS,
- SET_TR,
- SET_LDTR,
- SET_X2APIC_STATE,
SET_CAP,
CAPNAME,
- UNASSIGN_PPTDEV,
- GET_GPA_PMAP,
- ASSERT_LAPIC_LVT,
- SET_RTC_TIME,
- SET_RTC_NVRAM,
- RTC_NVRAM_OFFSET,
#ifdef BHYVE_SNAPSHOT
SET_CHECKPOINT_FILE,
SET_SUSPEND_FILE,
#endif
+ OPT_LAST,
};
+_Static_assert(OPT_LAST < OPT_START_MD,
+ "OPT_LAST must be less than OPT_START_MD");
+
static void
print_cpus(const char *banner, const cpuset_t *cpus)
{
@@ -429,848 +111,28 @@ print_cpus(const char *banner, const cpuset_t *cpus)
printf("\n");
}
-static void
-print_intinfo(const char *banner, uint64_t info)
-{
- int type;
-
- printf("%s:\t", banner);
- if (info & VM_INTINFO_VALID) {
- type = info & VM_INTINFO_TYPE;
- switch (type) {
- case VM_INTINFO_HWINTR:
- printf("extint");
- break;
- case VM_INTINFO_NMI:
- printf("nmi");
- break;
- case VM_INTINFO_SWINTR:
- printf("swint");
- break;
- default:
- printf("exception");
- break;
- }
- printf(" vector %d", (int)VM_INTINFO_VECTOR(info));
- if (info & VM_INTINFO_DEL_ERRCODE)
- printf(" errcode %#x", (u_int)(info >> 32));
- } else {
- printf("n/a");
- }
- printf("\n");
-}
-
-static bool
-cpu_vendor_intel(void)
-{
- u_int regs[4], v[3];
-
- do_cpuid(0, regs);
- v[0] = regs[1];
- v[1] = regs[3];
- v[2] = regs[2];
-
- if (memcmp(v, "GenuineIntel", sizeof(v)) == 0)
- return (true);
- if (memcmp(v, "AuthenticAMD", sizeof(v)) == 0 ||
- memcmp(v, "HygonGenuine", sizeof(v)) == 0)
- return (false);
- fprintf(stderr, "Unknown cpu vendor \"%s\"\n", (const char *)v);
- exit(1);
-}
-
-static int
-get_all_registers(struct vcpu *vcpu, int vcpuid)
-{
- uint64_t cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7;
- uint64_t rsp, rip, rflags, efer;
- uint64_t rax, rbx, rcx, rdx, rsi, rdi, rbp;
- uint64_t r8, r9, r10, r11, r12, r13, r14, r15;
- int error = 0;
-
- if (!error && (get_efer || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_EFER, &efer);
- if (error == 0)
- printf("efer[%d]\t\t0x%016lx\n", vcpuid, efer);
- }
-
- if (!error && (get_cr0 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_CR0, &cr0);
- if (error == 0)
- printf("cr0[%d]\t\t0x%016lx\n", vcpuid, cr0);
- }
-
- if (!error && (get_cr2 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_CR2, &cr2);
- if (error == 0)
- printf("cr2[%d]\t\t0x%016lx\n", vcpuid, cr2);
- }
-
- if (!error && (get_cr3 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_CR3, &cr3);
- if (error == 0)
- printf("cr3[%d]\t\t0x%016lx\n", vcpuid, cr3);
- }
-
- if (!error && (get_cr4 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_CR4, &cr4);
- if (error == 0)
- printf("cr4[%d]\t\t0x%016lx\n", vcpuid, cr4);
- }
-
- if (!error && (get_dr0 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DR0, &dr0);
- if (error == 0)
- printf("dr0[%d]\t\t0x%016lx\n", vcpuid, dr0);
- }
-
- if (!error && (get_dr1 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DR1, &dr1);
- if (error == 0)
- printf("dr1[%d]\t\t0x%016lx\n", vcpuid, dr1);
- }
-
- if (!error && (get_dr2 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DR2, &dr2);
- if (error == 0)
- printf("dr2[%d]\t\t0x%016lx\n", vcpuid, dr2);
- }
-
- if (!error && (get_dr3 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DR3, &dr3);
- if (error == 0)
- printf("dr3[%d]\t\t0x%016lx\n", vcpuid, dr3);
- }
-
- if (!error && (get_dr6 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DR6, &dr6);
- if (error == 0)
- printf("dr6[%d]\t\t0x%016lx\n", vcpuid, dr6);
- }
-
- if (!error && (get_dr7 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DR7, &dr7);
- if (error == 0)
- printf("dr7[%d]\t\t0x%016lx\n", vcpuid, dr7);
- }
-
- if (!error && (get_rsp || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RSP, &rsp);
- if (error == 0)
- printf("rsp[%d]\t\t0x%016lx\n", vcpuid, rsp);
- }
-
- if (!error && (get_rip || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RIP, &rip);
- if (error == 0)
- printf("rip[%d]\t\t0x%016lx\n", vcpuid, rip);
- }
-
- if (!error && (get_rax || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RAX, &rax);
- if (error == 0)
- printf("rax[%d]\t\t0x%016lx\n", vcpuid, rax);
- }
-
- if (!error && (get_rbx || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RBX, &rbx);
- if (error == 0)
- printf("rbx[%d]\t\t0x%016lx\n", vcpuid, rbx);
- }
-
- if (!error && (get_rcx || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RCX, &rcx);
- if (error == 0)
- printf("rcx[%d]\t\t0x%016lx\n", vcpuid, rcx);
- }
-
- if (!error && (get_rdx || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RDX, &rdx);
- if (error == 0)
- printf("rdx[%d]\t\t0x%016lx\n", vcpuid, rdx);
- }
-
- if (!error && (get_rsi || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RSI, &rsi);
- if (error == 0)
- printf("rsi[%d]\t\t0x%016lx\n", vcpuid, rsi);
- }
-
- if (!error && (get_rdi || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RDI, &rdi);
- if (error == 0)
- printf("rdi[%d]\t\t0x%016lx\n", vcpuid, rdi);
- }
-
- if (!error && (get_rbp || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RBP, &rbp);
- if (error == 0)
- printf("rbp[%d]\t\t0x%016lx\n", vcpuid, rbp);
- }
-
- if (!error && (get_r8 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R8, &r8);
- if (error == 0)
- printf("r8[%d]\t\t0x%016lx\n", vcpuid, r8);
- }
-
- if (!error && (get_r9 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R9, &r9);
- if (error == 0)
- printf("r9[%d]\t\t0x%016lx\n", vcpuid, r9);
- }
-
- if (!error && (get_r10 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R10, &r10);
- if (error == 0)
- printf("r10[%d]\t\t0x%016lx\n", vcpuid, r10);
- }
-
- if (!error && (get_r11 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R11, &r11);
- if (error == 0)
- printf("r11[%d]\t\t0x%016lx\n", vcpuid, r11);
- }
-
- if (!error && (get_r12 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R12, &r12);
- if (error == 0)
- printf("r12[%d]\t\t0x%016lx\n", vcpuid, r12);
- }
-
- if (!error && (get_r13 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R13, &r13);
- if (error == 0)
- printf("r13[%d]\t\t0x%016lx\n", vcpuid, r13);
- }
-
- if (!error && (get_r14 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R14, &r14);
- if (error == 0)
- printf("r14[%d]\t\t0x%016lx\n", vcpuid, r14);
- }
-
- if (!error && (get_r15 || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_R15, &r15);
- if (error == 0)
- printf("r15[%d]\t\t0x%016lx\n", vcpuid, r15);
- }
-
- if (!error && (get_rflags || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_RFLAGS,
- &rflags);
- if (error == 0)
- printf("rflags[%d]\t0x%016lx\n", vcpuid, rflags);
- }
-
- return (error);
-}
-
-static int
-get_all_segments(struct vcpu *vcpu, int vcpuid)
-{
- uint64_t cs, ds, es, fs, gs, ss, tr, ldtr;
- int error = 0;
-
- if (!error && (get_desc_ds || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_DS,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("ds desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_es || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_ES,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("es desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_fs || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_FS,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("fs desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_gs || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_GS,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("gs desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_ss || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_SS,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("ss desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_cs || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_CS,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("cs desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_tr || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_TR,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("tr desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_ldtr || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_LDTR,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("ldtr desc[%d]\t0x%016lx/0x%08x/0x%08x\n",
- vcpuid, desc_base, desc_limit, desc_access);
- }
- }
-
- if (!error && (get_desc_gdtr || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_GDTR,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("gdtr[%d]\t\t0x%016lx/0x%08x\n",
- vcpuid, desc_base, desc_limit);
- }
- }
-
- if (!error && (get_desc_idtr || get_all)) {
- error = vm_get_desc(vcpu, VM_REG_GUEST_IDTR,
- &desc_base, &desc_limit, &desc_access);
- if (error == 0) {
- printf("idtr[%d]\t\t0x%016lx/0x%08x\n",
- vcpuid, desc_base, desc_limit);
- }
- }
-
- if (!error && (get_cs || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_CS, &cs);
- if (error == 0)
- printf("cs[%d]\t\t0x%04lx\n", vcpuid, cs);
- }
-
- if (!error && (get_ds || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_DS, &ds);
- if (error == 0)
- printf("ds[%d]\t\t0x%04lx\n", vcpuid, ds);
- }
-
- if (!error && (get_es || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_ES, &es);
- if (error == 0)
- printf("es[%d]\t\t0x%04lx\n", vcpuid, es);
- }
-
- if (!error && (get_fs || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_FS, &fs);
- if (error == 0)
- printf("fs[%d]\t\t0x%04lx\n", vcpuid, fs);
- }
-
- if (!error && (get_gs || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_GS, &gs);
- if (error == 0)
- printf("gs[%d]\t\t0x%04lx\n", vcpuid, gs);
- }
-
- if (!error && (get_ss || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_SS, &ss);
- if (error == 0)
- printf("ss[%d]\t\t0x%04lx\n", vcpuid, ss);
- }
-
- if (!error && (get_tr || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_TR, &tr);
- if (error == 0)
- printf("tr[%d]\t\t0x%04lx\n", vcpuid, tr);
- }
-
- if (!error && (get_ldtr || get_all)) {
- error = vm_get_register(vcpu, VM_REG_GUEST_LDTR, &ldtr);
- if (error == 0)
- printf("ldtr[%d]\t\t0x%04lx\n", vcpuid, ldtr);
- }
-
- return (error);
-}
-
-static int
-get_misc_vmcs(struct vcpu *vcpu, int vcpuid)
-{
- uint64_t ctl, cr0, cr3, cr4, rsp, rip, pat, addr, u64;
- int error = 0;
-
- if (!error && (get_cr0_mask || get_all)) {
- uint64_t cr0mask;
- error = vm_get_vmcs_field(vcpu, VMCS_CR0_MASK, &cr0mask);
- if (error == 0)
- printf("cr0_mask[%d]\t\t0x%016lx\n", vcpuid, cr0mask);
- }
-
- if (!error && (get_cr0_shadow || get_all)) {
- uint64_t cr0shadow;
- error = vm_get_vmcs_field(vcpu, VMCS_CR0_SHADOW,
- &cr0shadow);
- if (error == 0)
- printf("cr0_shadow[%d]\t\t0x%016lx\n", vcpuid, cr0shadow);
- }
-
- if (!error && (get_cr4_mask || get_all)) {
- uint64_t cr4mask;
- error = vm_get_vmcs_field(vcpu, VMCS_CR4_MASK, &cr4mask);
- if (error == 0)
- printf("cr4_mask[%d]\t\t0x%016lx\n", vcpuid, cr4mask);
- }
-
- if (!error && (get_cr4_shadow || get_all)) {
- uint64_t cr4shadow;
- error = vm_get_vmcs_field(vcpu, VMCS_CR4_SHADOW,
- &cr4shadow);
- if (error == 0)
- printf("cr4_shadow[%d]\t\t0x%016lx\n", vcpuid, cr4shadow);
- }
-
- if (!error && (get_cr3_targets || get_all)) {
- uint64_t target_count, target_addr;
- error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET_COUNT,
- &target_count);
- if (error == 0) {
- printf("cr3_target_count[%d]\t0x%016lx\n",
- vcpuid, target_count);
- }
-
- error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET0,
- &target_addr);
- if (error == 0) {
- printf("cr3_target0[%d]\t\t0x%016lx\n",
- vcpuid, target_addr);
- }
-
- error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET1,
- &target_addr);
- if (error == 0) {
- printf("cr3_target1[%d]\t\t0x%016lx\n",
- vcpuid, target_addr);
- }
-
- error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET2,
- &target_addr);
- if (error == 0) {
- printf("cr3_target2[%d]\t\t0x%016lx\n",
- vcpuid, target_addr);
- }
-
- error = vm_get_vmcs_field(vcpu, VMCS_CR3_TARGET3,
- &target_addr);
- if (error == 0) {
- printf("cr3_target3[%d]\t\t0x%016lx\n",
- vcpuid, target_addr);
- }
- }
-
- if (!error && (get_pinbased_ctls || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_PIN_BASED_CTLS, &ctl);
- if (error == 0)
- printf("pinbased_ctls[%d]\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_procbased_ctls || get_all)) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_PRI_PROC_BASED_CTLS, &ctl);
- if (error == 0)
- printf("procbased_ctls[%d]\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_procbased_ctls2 || get_all)) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_SEC_PROC_BASED_CTLS, &ctl);
- if (error == 0)
- printf("procbased_ctls2[%d]\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_vmcs_gla || get_all)) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_LINEAR_ADDRESS, &u64);
- if (error == 0)
- printf("gla[%d]\t\t0x%016lx\n", vcpuid, u64);
- }
-
- if (!error && (get_vmcs_gpa || get_all)) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_PHYSICAL_ADDRESS, &u64);
- if (error == 0)
- printf("gpa[%d]\t\t0x%016lx\n", vcpuid, u64);
- }
-
- if (!error && (get_vmcs_entry_interruption_info ||
- get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_ENTRY_INTR_INFO,&u64);
- if (error == 0) {
- printf("entry_interruption_info[%d]\t0x%016lx\n",
- vcpuid, u64);
- }
- }
-
- if (!error && (get_tpr_threshold || get_all)) {
- uint64_t threshold;
- error = vm_get_vmcs_field(vcpu, VMCS_TPR_THRESHOLD,
- &threshold);
- if (error == 0)
- printf("tpr_threshold[%d]\t0x%016lx\n", vcpuid, threshold);
- }
-
- if (!error && (get_inst_err || get_all)) {
- uint64_t insterr;
- error = vm_get_vmcs_field(vcpu, VMCS_INSTRUCTION_ERROR,
- &insterr);
- if (error == 0) {
- printf("instruction_error[%d]\t0x%016lx\n",
- vcpuid, insterr);
- }
- }
-
- if (!error && (get_exit_ctls || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_EXIT_CTLS, &ctl);
- if (error == 0)
- printf("exit_ctls[%d]\t\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_entry_ctls || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_ENTRY_CTLS, &ctl);
- if (error == 0)
- printf("entry_ctls[%d]\t\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_host_pat || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_HOST_IA32_PAT, &pat);
- if (error == 0)
- printf("host_pat[%d]\t\t0x%016lx\n", vcpuid, pat);
- }
-
- if (!error && (get_host_cr0 || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_HOST_CR0, &cr0);
- if (error == 0)
- printf("host_cr0[%d]\t\t0x%016lx\n", vcpuid, cr0);
- }
-
- if (!error && (get_host_cr3 || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_HOST_CR3, &cr3);
- if (error == 0)
- printf("host_cr3[%d]\t\t0x%016lx\n", vcpuid, cr3);
- }
-
- if (!error && (get_host_cr4 || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_HOST_CR4, &cr4);
- if (error == 0)
- printf("host_cr4[%d]\t\t0x%016lx\n", vcpuid, cr4);
- }
-
- if (!error && (get_host_rip || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_HOST_RIP, &rip);
- if (error == 0)
- printf("host_rip[%d]\t\t0x%016lx\n", vcpuid, rip);
- }
-
- if (!error && (get_host_rsp || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_HOST_RSP, &rsp);
- if (error == 0)
- printf("host_rsp[%d]\t\t0x%016lx\n", vcpuid, rsp);
- }
-
- if (!error && (get_vmcs_link || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_LINK_POINTER, &addr);
- if (error == 0)
- printf("vmcs_pointer[%d]\t0x%016lx\n", vcpuid, addr);
- }
-
- if (!error && (get_vmcs_exit_interruption_info || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_EXIT_INTR_INFO, &u64);
- if (error == 0) {
- printf("vmcs_exit_interruption_info[%d]\t0x%016lx\n",
- vcpuid, u64);
- }
- }
-
- if (!error && (get_vmcs_exit_interruption_error || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_EXIT_INTR_ERRCODE,
- &u64);
- if (error == 0) {
- printf("vmcs_exit_interruption_error[%d]\t0x%016lx\n",
- vcpuid, u64);
- }
- }
-
- if (!error && (get_vmcs_interruptibility || get_all)) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_INTERRUPTIBILITY, &u64);
- if (error == 0) {
- printf("vmcs_guest_interruptibility[%d]\t0x%016lx\n",
- vcpuid, u64);
- }
- }
-
- if (!error && (get_vmcs_exit_inst_length || get_all)) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_EXIT_INSTRUCTION_LENGTH, &u64);
- if (error == 0)
- printf("vmcs_exit_inst_length[%d]\t0x%08x\n", vcpuid,
- (uint32_t)u64);
- }
-
- if (!error && (get_vmcs_exit_qualification || get_all)) {
- error = vm_get_vmcs_field(vcpu, VMCS_EXIT_QUALIFICATION,
- &u64);
- if (error == 0)
- printf("vmcs_exit_qualification[%d]\t0x%016lx\n",
- vcpuid, u64);
- }
-
- return (error);
-}
-
-static int
-get_misc_vmcb(struct vcpu *vcpu, int vcpuid)
-{
- uint64_t ctl, addr;
- int error = 0;
-
- if (!error && (get_vmcb_intercept || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_CR_INTERCEPT, 4,
- &ctl);
- if (error == 0)
- printf("cr_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
-
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_DR_INTERCEPT, 4,
- &ctl);
- if (error == 0)
- printf("dr_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
-
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXC_INTERCEPT, 4,
- &ctl);
- if (error == 0)
- printf("exc_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
-
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_INST1_INTERCEPT,
- 4, &ctl);
- if (error == 0)
- printf("inst1_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
-
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_INST2_INTERCEPT,
- 4, &ctl);
- if (error == 0)
- printf("inst2_intercept[%d]\t0x%08x\n", vcpuid, (int)ctl);
- }
-
- if (!error && (get_vmcb_tlb_ctrl || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_TLB_CTRL,
- 4, &ctl);
- if (error == 0)
- printf("TLB ctrl[%d]\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_vmcb_exit_details || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXITINFO1,
- 8, &ctl);
- if (error == 0)
- printf("exitinfo1[%d]\t0x%016lx\n", vcpuid, ctl);
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXITINFO2,
- 8, &ctl);
- if (error == 0)
- printf("exitinfo2[%d]\t0x%016lx\n", vcpuid, ctl);
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_EXITINTINFO,
- 8, &ctl);
- if (error == 0)
- printf("exitintinfo[%d]\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_vmcb_virq || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_VIRQ,
- 8, &ctl);
- if (error == 0)
- printf("v_irq/tpr[%d]\t0x%016lx\n", vcpuid, ctl);
- }
-
- if (!error && (get_apic_access_addr || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_BAR, 8,
- &addr);
- if (error == 0)
- printf("AVIC apic_bar[%d]\t0x%016lx\n", vcpuid, addr);
- }
-
- if (!error && (get_virtual_apic_addr || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_PAGE, 8,
- &addr);
- if (error == 0)
- printf("AVIC backing page[%d]\t0x%016lx\n", vcpuid, addr);
- }
-
- if (!error && (get_avic_table || get_all)) {
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_LT, 8,
- &addr);
- if (error == 0)
- printf("AVIC logical table[%d]\t0x%016lx\n",
- vcpuid, addr);
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_AVIC_PT, 8,
- &addr);
- if (error == 0)
- printf("AVIC physical table[%d]\t0x%016lx\n",
- vcpuid, addr);
- }
-
- return (error);
-}
-
static struct option *
-setup_options(bool cpu_intel)
+setup_options(void)
{
const struct option common_opts[] = {
{ "vm", REQ_ARG, 0, VMNAME },
{ "cpu", REQ_ARG, 0, VCPU },
{ "set-mem", REQ_ARG, 0, SET_MEM },
- { "set-efer", REQ_ARG, 0, SET_EFER },
- { "set-cr0", REQ_ARG, 0, SET_CR0 },
- { "set-cr2", REQ_ARG, 0, SET_CR2 },
- { "set-cr3", REQ_ARG, 0, SET_CR3 },
- { "set-cr4", REQ_ARG, 0, SET_CR4 },
- { "set-dr0", REQ_ARG, 0, SET_DR0 },
- { "set-dr1", REQ_ARG, 0, SET_DR1 },
- { "set-dr2", REQ_ARG, 0, SET_DR2 },
- { "set-dr3", REQ_ARG, 0, SET_DR3 },
- { "set-dr6", REQ_ARG, 0, SET_DR6 },
- { "set-dr7", REQ_ARG, 0, SET_DR7 },
- { "set-rsp", REQ_ARG, 0, SET_RSP },
- { "set-rip", REQ_ARG, 0, SET_RIP },
- { "set-rax", REQ_ARG, 0, SET_RAX },
- { "set-rflags", REQ_ARG, 0, SET_RFLAGS },
- { "desc-base", REQ_ARG, 0, DESC_BASE },
- { "desc-limit", REQ_ARG, 0, DESC_LIMIT },
- { "desc-access",REQ_ARG, 0, DESC_ACCESS },
- { "set-cs", REQ_ARG, 0, SET_CS },
- { "set-ds", REQ_ARG, 0, SET_DS },
- { "set-es", REQ_ARG, 0, SET_ES },
- { "set-fs", REQ_ARG, 0, SET_FS },
- { "set-gs", REQ_ARG, 0, SET_GS },
- { "set-ss", REQ_ARG, 0, SET_SS },
- { "set-tr", REQ_ARG, 0, SET_TR },
- { "set-ldtr", REQ_ARG, 0, SET_LDTR },
- { "set-x2apic-state",REQ_ARG, 0, SET_X2APIC_STATE },
{ "capname", REQ_ARG, 0, CAPNAME },
- { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV },
{ "setcap", REQ_ARG, 0, SET_CAP },
- { "get-gpa-pmap", REQ_ARG, 0, GET_GPA_PMAP },
- { "assert-lapic-lvt", REQ_ARG, 0, ASSERT_LAPIC_LVT },
- { "get-rtc-time", NO_ARG, &get_rtc_time, 1 },
- { "set-rtc-time", REQ_ARG, 0, SET_RTC_TIME },
- { "rtc-nvram-offset", REQ_ARG, 0, RTC_NVRAM_OFFSET },
- { "get-rtc-nvram", NO_ARG, &get_rtc_nvram, 1 },
- { "set-rtc-nvram", REQ_ARG, 0, SET_RTC_NVRAM },
{ "getcap", NO_ARG, &getcap, 1 },
{ "get-stats", NO_ARG, &get_stats, 1 },
- { "get-desc-ds",NO_ARG, &get_desc_ds, 1 },
- { "set-desc-ds",NO_ARG, &set_desc_ds, 1 },
- { "get-desc-es",NO_ARG, &get_desc_es, 1 },
- { "set-desc-es",NO_ARG, &set_desc_es, 1 },
- { "get-desc-ss",NO_ARG, &get_desc_ss, 1 },
- { "set-desc-ss",NO_ARG, &set_desc_ss, 1 },
- { "get-desc-cs",NO_ARG, &get_desc_cs, 1 },
- { "set-desc-cs",NO_ARG, &set_desc_cs, 1 },
- { "get-desc-fs",NO_ARG, &get_desc_fs, 1 },
- { "set-desc-fs",NO_ARG, &set_desc_fs, 1 },
- { "get-desc-gs",NO_ARG, &get_desc_gs, 1 },
- { "set-desc-gs",NO_ARG, &set_desc_gs, 1 },
- { "get-desc-tr",NO_ARG, &get_desc_tr, 1 },
- { "set-desc-tr",NO_ARG, &set_desc_tr, 1 },
- { "set-desc-ldtr", NO_ARG, &set_desc_ldtr, 1 },
- { "get-desc-ldtr", NO_ARG, &get_desc_ldtr, 1 },
- { "set-desc-gdtr", NO_ARG, &set_desc_gdtr, 1 },
- { "get-desc-gdtr", NO_ARG, &get_desc_gdtr, 1 },
- { "set-desc-idtr", NO_ARG, &set_desc_idtr, 1 },
- { "get-desc-idtr", NO_ARG, &get_desc_idtr, 1 },
{ "get-memmap", NO_ARG, &get_memmap, 1 },
{ "get-memseg", NO_ARG, &get_memseg, 1 },
- { "get-efer", NO_ARG, &get_efer, 1 },
- { "get-cr0", NO_ARG, &get_cr0, 1 },
- { "get-cr2", NO_ARG, &get_cr2, 1 },
- { "get-cr3", NO_ARG, &get_cr3, 1 },
- { "get-cr4", NO_ARG, &get_cr4, 1 },
- { "get-dr0", NO_ARG, &get_dr0, 1 },
- { "get-dr1", NO_ARG, &get_dr1, 1 },
- { "get-dr2", NO_ARG, &get_dr2, 1 },
- { "get-dr3", NO_ARG, &get_dr3, 1 },
- { "get-dr6", NO_ARG, &get_dr6, 1 },
- { "get-dr7", NO_ARG, &get_dr7, 1 },
- { "get-rsp", NO_ARG, &get_rsp, 1 },
- { "get-rip", NO_ARG, &get_rip, 1 },
- { "get-rax", NO_ARG, &get_rax, 1 },
- { "get-rbx", NO_ARG, &get_rbx, 1 },
- { "get-rcx", NO_ARG, &get_rcx, 1 },
- { "get-rdx", NO_ARG, &get_rdx, 1 },
- { "get-rsi", NO_ARG, &get_rsi, 1 },
- { "get-rdi", NO_ARG, &get_rdi, 1 },
- { "get-rbp", NO_ARG, &get_rbp, 1 },
- { "get-r8", NO_ARG, &get_r8, 1 },
- { "get-r9", NO_ARG, &get_r9, 1 },
- { "get-r10", NO_ARG, &get_r10, 1 },
- { "get-r11", NO_ARG, &get_r11, 1 },
- { "get-r12", NO_ARG, &get_r12, 1 },
- { "get-r13", NO_ARG, &get_r13, 1 },
- { "get-r14", NO_ARG, &get_r14, 1 },
- { "get-r15", NO_ARG, &get_r15, 1 },
- { "get-rflags", NO_ARG, &get_rflags, 1 },
- { "get-cs", NO_ARG, &get_cs, 1 },
- { "get-ds", NO_ARG, &get_ds, 1 },
- { "get-es", NO_ARG, &get_es, 1 },
- { "get-fs", NO_ARG, &get_fs, 1 },
- { "get-gs", NO_ARG, &get_gs, 1 },
- { "get-ss", NO_ARG, &get_ss, 1 },
- { "get-tr", NO_ARG, &get_tr, 1 },
- { "get-ldtr", NO_ARG, &get_ldtr, 1 },
- { "get-eptp", NO_ARG, &get_eptp, 1 },
- { "get-exception-bitmap",
- NO_ARG, &get_exception_bitmap, 1 },
- { "get-io-bitmap-address",
- NO_ARG, &get_io_bitmap, 1 },
- { "get-tsc-offset", NO_ARG, &get_tsc_offset, 1 },
- { "get-msr-bitmap",
- NO_ARG, &get_msr_bitmap, 1 },
- { "get-msr-bitmap-address",
- NO_ARG, &get_msr_bitmap_address, 1 },
- { "get-guest-pat", NO_ARG, &get_guest_pat, 1 },
- { "get-guest-sysenter",
- NO_ARG, &get_guest_sysenter, 1 },
- { "get-exit-reason",
- NO_ARG, &get_exit_reason, 1 },
- { "get-x2apic-state", NO_ARG, &get_x2apic_state, 1 },
{ "get-all", NO_ARG, &get_all, 1 },
{ "run", NO_ARG, &run, 1 },
{ "create", NO_ARG, &create, 1 },
{ "destroy", NO_ARG, &destroy, 1 },
- { "inject-nmi", NO_ARG, &inject_nmi, 1 },
{ "force-reset", NO_ARG, &force_reset, 1 },
{ "force-poweroff", NO_ARG, &force_poweroff, 1 },
{ "get-active-cpus", NO_ARG, &get_active_cpus, 1 },
{ "get-debug-cpus", NO_ARG, &get_debug_cpus, 1 },
{ "get-suspended-cpus", NO_ARG, &get_suspended_cpus, 1 },
- { "get-intinfo", NO_ARG, &get_intinfo, 1 },
{ "get-cpu-topology", NO_ARG, &get_cpu_topology, 1 },
#ifdef BHYVE_SNAPSHOT
{ "checkpoint", REQ_ARG, 0, SET_CHECKPOINT_FILE},
@@ -1278,157 +140,17 @@ setup_options(bool cpu_intel)
#endif
};
- const struct option intel_opts[] = {
- { "get-vmcs-pinbased-ctls",
- NO_ARG, &get_pinbased_ctls, 1 },
- { "get-vmcs-procbased-ctls",
- NO_ARG, &get_procbased_ctls, 1 },
- { "get-vmcs-procbased-ctls2",
- NO_ARG, &get_procbased_ctls2, 1 },
- { "get-vmcs-guest-linear-address",
- NO_ARG, &get_vmcs_gla, 1 },
- { "get-vmcs-guest-physical-address",
- NO_ARG, &get_vmcs_gpa, 1 },
- { "get-vmcs-entry-interruption-info",
- NO_ARG, &get_vmcs_entry_interruption_info, 1},
- { "get-vmcs-cr0-mask", NO_ARG, &get_cr0_mask, 1 },
- { "get-vmcs-cr0-shadow", NO_ARG,&get_cr0_shadow, 1 },
- { "get-vmcs-cr4-mask", NO_ARG, &get_cr4_mask, 1 },
- { "get-vmcs-cr4-shadow", NO_ARG, &get_cr4_shadow, 1 },
- { "get-vmcs-cr3-targets", NO_ARG, &get_cr3_targets, 1 },
- { "get-vmcs-tpr-threshold",
- NO_ARG, &get_tpr_threshold, 1 },
- { "get-vmcs-vpid", NO_ARG, &get_vpid_asid, 1 },
- { "get-vmcs-exit-ctls", NO_ARG, &get_exit_ctls, 1 },
- { "get-vmcs-entry-ctls",
- NO_ARG, &get_entry_ctls, 1 },
- { "get-vmcs-instruction-error",
- NO_ARG, &get_inst_err, 1 },
- { "get-vmcs-host-pat", NO_ARG, &get_host_pat, 1 },
- { "get-vmcs-host-cr0",
- NO_ARG, &get_host_cr0, 1 },
- { "get-vmcs-exit-qualification",
- NO_ARG, &get_vmcs_exit_qualification, 1 },
- { "get-vmcs-exit-inst-length",
- NO_ARG, &get_vmcs_exit_inst_length, 1 },
- { "get-vmcs-interruptibility",
- NO_ARG, &get_vmcs_interruptibility, 1 },
- { "get-vmcs-exit-interruption-error",
- NO_ARG, &get_vmcs_exit_interruption_error, 1 },
- { "get-vmcs-exit-interruption-info",
- NO_ARG, &get_vmcs_exit_interruption_info, 1 },
- { "get-vmcs-link", NO_ARG, &get_vmcs_link, 1 },
- { "get-vmcs-host-cr3",
- NO_ARG, &get_host_cr3, 1 },
- { "get-vmcs-host-cr4",
- NO_ARG, &get_host_cr4, 1 },
- { "get-vmcs-host-rip",
- NO_ARG, &get_host_rip, 1 },
- { "get-vmcs-host-rsp",
- NO_ARG, &get_host_rsp, 1 },
- { "get-apic-access-address",
- NO_ARG, &get_apic_access_addr, 1},
- { "get-virtual-apic-address",
- NO_ARG, &get_virtual_apic_addr, 1}
- };
-
- const struct option amd_opts[] = {
- { "get-vmcb-intercepts",
- NO_ARG, &get_vmcb_intercept, 1 },
- { "get-vmcb-asid",
- NO_ARG, &get_vpid_asid, 1 },
- { "get-vmcb-exit-details",
- NO_ARG, &get_vmcb_exit_details, 1 },
- { "get-vmcb-tlb-ctrl",
- NO_ARG, &get_vmcb_tlb_ctrl, 1 },
- { "get-vmcb-virq",
- NO_ARG, &get_vmcb_virq, 1 },
- { "get-avic-apic-bar",
- NO_ARG, &get_apic_access_addr, 1 },
- { "get-avic-backing-page",
- NO_ARG, &get_virtual_apic_addr, 1 },
- { "get-avic-table",
- NO_ARG, &get_avic_table, 1 }
- };
-
- const struct option null_opt = {
- NULL, 0, NULL, 0
- };
-
- struct option *all_opts;
- char *cp;
- int optlen;
-
- optlen = sizeof(common_opts);
-
- if (cpu_intel)
- optlen += sizeof(intel_opts);
- else
- optlen += sizeof(amd_opts);
-
- optlen += sizeof(null_opt);
-
- all_opts = malloc(optlen);
-
- cp = (char *)all_opts;
- memcpy(cp, common_opts, sizeof(common_opts));
- cp += sizeof(common_opts);
-
- if (cpu_intel) {
- memcpy(cp, intel_opts, sizeof(intel_opts));
- cp += sizeof(intel_opts);
- } else {
- memcpy(cp, amd_opts, sizeof(amd_opts));
- cp += sizeof(amd_opts);
- }
-
- memcpy(cp, &null_opt, sizeof(null_opt));
- cp += sizeof(null_opt);
-
- return (all_opts);
+ return (bhyvectl_opts(common_opts, nitems(common_opts)));
}
-static void
+void
usage(const struct option *opts)
{
static const char *set_desc[] = {
[VCPU] = "vcpu_number",
[SET_MEM] = "memory in units of MB",
- [SET_EFER] = "EFER",
- [SET_CR0] = "CR0",
- [SET_CR2] = "CR2",
- [SET_CR3] = "CR3",
- [SET_CR4] = "CR4",
- [SET_DR0] = "DR0",
- [SET_DR1] = "DR1",
- [SET_DR2] = "DR2",
- [SET_DR3] = "DR3",
- [SET_DR6] = "DR6",
- [SET_DR7] = "DR7",
- [SET_RSP] = "RSP",
- [SET_RIP] = "RIP",
- [SET_RAX] = "RAX",
- [SET_RFLAGS] = "RFLAGS",
- [DESC_BASE] = "BASE",
- [DESC_LIMIT] = "LIMIT",
- [DESC_ACCESS] = "ACCESS",
- [SET_CS] = "CS",
- [SET_DS] = "DS",
- [SET_ES] = "ES",
- [SET_FS] = "FS",
- [SET_GS] = "GS",
- [SET_SS] = "SS",
- [SET_TR] = "TR",
- [SET_LDTR] = "LDTR",
- [SET_X2APIC_STATE] = "state",
[SET_CAP] = "0|1",
[CAPNAME] = "capname",
- [UNASSIGN_PPTDEV] = "bus/slot.func",
- [GET_GPA_PMAP] = "gpa",
- [ASSERT_LAPIC_LVT] = "pin",
- [SET_RTC_TIME] = "secs",
- [SET_RTC_NVRAM] = "val",
- [RTC_NVRAM_OFFSET] = "offset",
#ifdef BHYVE_SNAPSHOT
[SET_CHECKPOINT_FILE] = "filename",
[SET_SUSPEND_FILE] = "filename",
@@ -1438,42 +160,17 @@ usage(const struct option *opts)
for (const struct option *o = opts; o->name; o++) {
if (strcmp(o->name, "vm") == 0)
continue;
- if (o->has_arg == REQ_ARG)
- (void)fprintf(stderr, " [--%s=<%s>]\n",
- o->name, set_desc[o->val]);
- else
+ if (o->has_arg == REQ_ARG) {
+ (void)fprintf(stderr, " [--%s=<%s>]\n", o->name,
+ o->val >= OPT_START_MD ? bhyvectl_opt_desc(o->val) :
+ set_desc[o->val]);
+ } else {
(void)fprintf(stderr, " [--%s]\n", o->name);
+ }
}
exit(1);
}
-static const char *
-wday_str(int idx)
-{
- static const char *weekdays[] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
- };
-
- if (idx >= 0 && idx < 7)
- return (weekdays[idx]);
- else
- return ("UNK");
-}
-
-static const char *
-mon_str(int idx)
-{
- static const char *months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- };
-
- if (idx >= 0 && idx < 12)
- return (months[idx]);
- else
- return ("UNK");
-}
-
static int
show_memmap(struct vmctx *ctx)
{
@@ -1513,10 +210,12 @@ show_memmap(struct vmctx *ctx)
printf("%cwired", delim);
delim = '/';
}
+#ifdef __amd64__
if (flags & VM_MEMMAP_F_IOMMU) {
printf("%ciommu", delim);
delim = '/';
}
+#endif
printf("\n");
gpa += maplen;
@@ -1627,32 +326,28 @@ int
main(int argc, char *argv[])
{
char *vmname;
- int error, ch, vcpuid, ptenum;
- vm_paddr_t gpa_pmap;
+ int error, ch, vcpuid;
struct vm_run vmrun;
- uint64_t rax, cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7;
- uint64_t rsp, rip, rflags, efer, pat;
- uint64_t eptp, bm, addr, u64, pteval[4], *pte, info[2];
struct vmctx *ctx;
struct vcpu *vcpu;
cpuset_t cpus;
- bool cpu_intel;
- uint64_t cs, ds, es, fs, gs, ss, tr, ldtr;
- struct tm tm;
struct option *opts;
#ifdef BHYVE_SNAPSHOT
char *checkpoint_file = NULL;
#endif
- cpu_intel = cpu_vendor_intel();
- opts = setup_options(cpu_intel);
+ opts = setup_options();
vcpuid = 0;
vmname = NULL;
- assert_lapic_lvt = -1;
progname = basename(argv[0]);
while ((ch = getopt_long(argc, argv, "", opts, NULL)) != -1) {
+ if (ch >= OPT_START_MD) {
+ bhyvectl_handle_opt(opts, ch);
+ continue;
+ }
+
switch (ch) {
case 0:
break;
@@ -1666,141 +361,13 @@ main(int argc, char *argv[])
memsize = atoi(optarg) * MB;
memsize = roundup(memsize, 2 * MB);
break;
- case SET_EFER:
- efer = strtoul(optarg, NULL, 0);
- set_efer = 1;
- break;
- case SET_CR0:
- cr0 = strtoul(optarg, NULL, 0);
- set_cr0 = 1;
- break;
- case SET_CR2:
- cr2 = strtoul(optarg, NULL, 0);
- set_cr2 = 1;
- break;
- case SET_CR3:
- cr3 = strtoul(optarg, NULL, 0);
- set_cr3 = 1;
- break;
- case SET_CR4:
- cr4 = strtoul(optarg, NULL, 0);
- set_cr4 = 1;
- break;
- case SET_DR0:
- dr0 = strtoul(optarg, NULL, 0);
- set_dr0 = 1;
- break;
- case SET_DR1:
- dr1 = strtoul(optarg, NULL, 0);
- set_dr1 = 1;
- break;
- case SET_DR2:
- dr2 = strtoul(optarg, NULL, 0);
- set_dr2 = 1;
- break;
- case SET_DR3:
- dr3 = strtoul(optarg, NULL, 0);
- set_dr3 = 1;
- break;
- case SET_DR6:
- dr6 = strtoul(optarg, NULL, 0);
- set_dr6 = 1;
- break;
- case SET_DR7:
- dr7 = strtoul(optarg, NULL, 0);
- set_dr7 = 1;
- break;
- case SET_RSP:
- rsp = strtoul(optarg, NULL, 0);
- set_rsp = 1;
- break;
- case SET_RIP:
- rip = strtoul(optarg, NULL, 0);
- set_rip = 1;
- break;
- case SET_RAX:
- rax = strtoul(optarg, NULL, 0);
- set_rax = 1;
- break;
- case SET_RFLAGS:
- rflags = strtoul(optarg, NULL, 0);
- set_rflags = 1;
- break;
- case DESC_BASE:
- desc_base = strtoul(optarg, NULL, 0);
- break;
- case DESC_LIMIT:
- desc_limit = strtoul(optarg, NULL, 0);
- break;
- case DESC_ACCESS:
- desc_access = strtoul(optarg, NULL, 0);
- break;
- case SET_CS:
- cs = strtoul(optarg, NULL, 0);
- set_cs = 1;
- break;
- case SET_DS:
- ds = strtoul(optarg, NULL, 0);
- set_ds = 1;
- break;
- case SET_ES:
- es = strtoul(optarg, NULL, 0);
- set_es = 1;
- break;
- case SET_FS:
- fs = strtoul(optarg, NULL, 0);
- set_fs = 1;
- break;
- case SET_GS:
- gs = strtoul(optarg, NULL, 0);
- set_gs = 1;
- break;
- case SET_SS:
- ss = strtoul(optarg, NULL, 0);
- set_ss = 1;
- break;
- case SET_TR:
- tr = strtoul(optarg, NULL, 0);
- set_tr = 1;
- break;
- case SET_LDTR:
- ldtr = strtoul(optarg, NULL, 0);
- set_ldtr = 1;
- break;
- case SET_X2APIC_STATE:
- x2apic_state = strtol(optarg, NULL, 0);
- set_x2apic_state = 1;
- break;
case SET_CAP:
capval = strtoul(optarg, NULL, 0);
setcap = 1;
break;
- case SET_RTC_TIME:
- rtc_secs = strtoul(optarg, NULL, 0);
- set_rtc_time = 1;
- break;
- case SET_RTC_NVRAM:
- rtc_nvram_value = (uint8_t)strtoul(optarg, NULL, 0);
- set_rtc_nvram = 1;
- break;
- case RTC_NVRAM_OFFSET:
- rtc_nvram_offset = strtoul(optarg, NULL, 0);
- break;
- case GET_GPA_PMAP:
- gpa_pmap = strtoul(optarg, NULL, 0);
- get_gpa_pmap = 1;
- break;
case CAPNAME:
capname = optarg;
break;
- case UNASSIGN_PPTDEV:
- unassign_pptdev = 1;
- if (sscanf(optarg, "%d/%d/%d", &bus, &slot, &func) != 3)
- usage(opts);
- break;
- case ASSERT_LAPIC_LVT:
- assert_lapic_lvt = atoi(optarg);
- break;
#ifdef BHYVE_SNAPSHOT
case SET_CHECKPOINT_FILE:
case SET_SUSPEND_FILE:
@@ -1832,7 +399,7 @@ main(int argc, char *argv[])
fprintf(stderr,
"vm_open: %s could not be opened: %s\n",
vmname, strerror(errno));
- exit (1);
+ exit(1);
}
vcpu = vm_vcpu_open(ctx, vcpuid);
}
@@ -1840,141 +407,6 @@ main(int argc, char *argv[])
if (!error && memsize)
error = vm_setup_memory(ctx, memsize, VM_MMAP_ALL);
- if (!error && set_efer)
- error = vm_set_register(vcpu, VM_REG_GUEST_EFER, efer);
-
- if (!error && set_cr0)
- error = vm_set_register(vcpu, VM_REG_GUEST_CR0, cr0);
-
- if (!error && set_cr2)
- error = vm_set_register(vcpu, VM_REG_GUEST_CR2, cr2);
-
- if (!error && set_cr3)
- error = vm_set_register(vcpu, VM_REG_GUEST_CR3, cr3);
-
- if (!error && set_cr4)
- error = vm_set_register(vcpu, VM_REG_GUEST_CR4, cr4);
-
- if (!error && set_dr0)
- error = vm_set_register(vcpu, VM_REG_GUEST_DR0, dr0);
-
- if (!error && set_dr1)
- error = vm_set_register(vcpu, VM_REG_GUEST_DR1, dr1);
-
- if (!error && set_dr2)
- error = vm_set_register(vcpu, VM_REG_GUEST_DR2, dr2);
-
- if (!error && set_dr3)
- error = vm_set_register(vcpu, VM_REG_GUEST_DR3, dr3);
-
- if (!error && set_dr6)
- error = vm_set_register(vcpu, VM_REG_GUEST_DR6, dr6);
-
- if (!error && set_dr7)
- error = vm_set_register(vcpu, VM_REG_GUEST_DR7, dr7);
-
- if (!error && set_rsp)
- error = vm_set_register(vcpu, VM_REG_GUEST_RSP, rsp);
-
- if (!error && set_rip)
- error = vm_set_register(vcpu, VM_REG_GUEST_RIP, rip);
-
- if (!error && set_rax)
- error = vm_set_register(vcpu, VM_REG_GUEST_RAX, rax);
-
- if (!error && set_rflags) {
- error = vm_set_register(vcpu, VM_REG_GUEST_RFLAGS,
- rflags);
- }
-
- if (!error && set_desc_ds) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_DS,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_es) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_ES,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_ss) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_SS,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_cs) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_CS,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_fs) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_FS,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_gs) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_GS,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_tr) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_TR,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_ldtr) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_LDTR,
- desc_base, desc_limit, desc_access);
- }
-
- if (!error && set_desc_gdtr) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_GDTR,
- desc_base, desc_limit, 0);
- }
-
- if (!error && set_desc_idtr) {
- error = vm_set_desc(vcpu, VM_REG_GUEST_IDTR,
- desc_base, desc_limit, 0);
- }
-
- if (!error && set_cs)
- error = vm_set_register(vcpu, VM_REG_GUEST_CS, cs);
-
- if (!error && set_ds)
- error = vm_set_register(vcpu, VM_REG_GUEST_DS, ds);
-
- if (!error && set_es)
- error = vm_set_register(vcpu, VM_REG_GUEST_ES, es);
-
- if (!error && set_fs)
- error = vm_set_register(vcpu, VM_REG_GUEST_FS, fs);
-
- if (!error && set_gs)
- error = vm_set_register(vcpu, VM_REG_GUEST_GS, gs);
-
- if (!error && set_ss)
- error = vm_set_register(vcpu, VM_REG_GUEST_SS, ss);
-
- if (!error && set_tr)
- error = vm_set_register(vcpu, VM_REG_GUEST_TR, tr);
-
- if (!error && set_ldtr)
- error = vm_set_register(vcpu, VM_REG_GUEST_LDTR, ldtr);
-
- if (!error && set_x2apic_state)
- error = vm_set_x2apic_state(vcpu, x2apic_state);
-
- if (!error && unassign_pptdev)
- error = vm_unassign_pptdev(ctx, bus, slot, func);
-
- if (!error && inject_nmi) {
- error = vm_inject_nmi(vcpu);
- }
-
- if (!error && assert_lapic_lvt != -1) {
- error = vm_lapic_local_irq(vcpu, assert_lapic_lvt);
- }
-
if (!error && (get_memseg || get_all))
error = show_memseg(ctx);
@@ -1982,217 +414,17 @@ main(int argc, char *argv[])
error = show_memmap(ctx);
if (!error)
- error = get_all_registers(vcpu, vcpuid);
-
- if (!error)
- error = get_all_segments(vcpu, vcpuid);
-
- if (!error) {
- if (cpu_intel)
- error = get_misc_vmcs(vcpu, vcpuid);
- else
- error = get_misc_vmcb(vcpu, vcpuid);
- }
-
- if (!error && (get_x2apic_state || get_all)) {
- error = vm_get_x2apic_state(vcpu, &x2apic_state);
- if (error == 0)
- printf("x2apic_state[%d]\t%d\n", vcpuid, x2apic_state);
- }
-
- if (!error && (get_eptp || get_all)) {
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu, VMCS_EPTP, &eptp);
- else
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_NPT_BASE,
- 8, &eptp);
- if (error == 0)
- printf("%s[%d]\t\t0x%016lx\n",
- cpu_intel ? "eptp" : "rvi/npt", vcpuid, eptp);
- }
-
- if (!error && (get_exception_bitmap || get_all)) {
- if(cpu_intel)
- error = vm_get_vmcs_field(vcpu,
- VMCS_EXCEPTION_BITMAP, &bm);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_EXC_INTERCEPT,
- 4, &bm);
- if (error == 0)
- printf("exception_bitmap[%d]\t%#lx\n", vcpuid, bm);
- }
-
- if (!error && (get_io_bitmap || get_all)) {
- if (cpu_intel) {
- error = vm_get_vmcs_field(vcpu, VMCS_IO_BITMAP_A,
- &bm);
- if (error == 0)
- printf("io_bitmap_a[%d]\t%#lx\n", vcpuid, bm);
- error = vm_get_vmcs_field(vcpu, VMCS_IO_BITMAP_B,
- &bm);
- if (error == 0)
- printf("io_bitmap_b[%d]\t%#lx\n", vcpuid, bm);
- } else {
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_IO_PERM, 8, &bm);
- if (error == 0)
- printf("io_bitmap[%d]\t%#lx\n", vcpuid, bm);
- }
- }
-
- if (!error && (get_tsc_offset || get_all)) {
- uint64_t tscoff;
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu, VMCS_TSC_OFFSET,
- &tscoff);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_TSC_OFFSET,
- 8, &tscoff);
- if (error == 0)
- printf("tsc_offset[%d]\t0x%016lx\n", vcpuid, tscoff);
- }
-
- if (!error && (get_msr_bitmap_address || get_all)) {
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu, VMCS_MSR_BITMAP,
- &addr);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_MSR_PERM, 8, &addr);
- if (error == 0)
- printf("msr_bitmap[%d]\t\t%#lx\n", vcpuid, addr);
- }
-
- if (!error && (get_msr_bitmap || get_all)) {
- if (cpu_intel) {
- error = vm_get_vmcs_field(vcpu,
- VMCS_MSR_BITMAP, &addr);
- } else {
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_MSR_PERM, 8,
- &addr);
- }
-
- if (error == 0)
- error = dump_msr_bitmap(vcpuid, addr, cpu_intel);
- }
-
- if (!error && (get_vpid_asid || get_all)) {
- uint64_t vpid;
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu, VMCS_VPID, &vpid);
- else
- error = vm_get_vmcb_field(vcpu, VMCB_OFF_ASID,
- 4, &vpid);
- if (error == 0)
- printf("%s[%d]\t\t0x%04lx\n",
- cpu_intel ? "vpid" : "asid", vcpuid, vpid);
- }
-
- if (!error && (get_guest_pat || get_all)) {
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_IA32_PAT, &pat);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_GUEST_PAT, 8, &pat);
- if (error == 0)
- printf("guest_pat[%d]\t\t0x%016lx\n", vcpuid, pat);
- }
-
- if (!error && (get_guest_sysenter || get_all)) {
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_IA32_SYSENTER_CS,
- &cs);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_SYSENTER_CS, 8,
- &cs);
-
- if (error == 0)
- printf("guest_sysenter_cs[%d]\t%#lx\n", vcpuid, cs);
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_IA32_SYSENTER_ESP,
- &rsp);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_SYSENTER_ESP, 8,
- &rsp);
-
- if (error == 0)
- printf("guest_sysenter_sp[%d]\t%#lx\n", vcpuid, rsp);
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu,
- VMCS_GUEST_IA32_SYSENTER_EIP,
- &rip);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_SYSENTER_EIP, 8,
- &rip);
- if (error == 0)
- printf("guest_sysenter_ip[%d]\t%#lx\n", vcpuid, rip);
- }
-
- if (!error && (get_exit_reason || get_all)) {
- if (cpu_intel)
- error = vm_get_vmcs_field(vcpu, VMCS_EXIT_REASON,
- &u64);
- else
- error = vm_get_vmcb_field(vcpu,
- VMCB_OFF_EXIT_REASON, 8,
- &u64);
- if (error == 0)
- printf("exit_reason[%d]\t%#lx\n", vcpuid, u64);
- }
+ bhyvectl_md_main(ctx, vcpu, vcpuid, get_all);
if (!error && setcap) {
int captype;
+
captype = vm_capability_name2type(capname);
error = vm_set_capability(vcpu, captype, capval);
if (error != 0 && errno == ENOENT)
printf("Capability \"%s\" is not available\n", capname);
}
- if (!error && get_gpa_pmap) {
- error = vm_get_gpa_pmap(ctx, gpa_pmap, pteval, &ptenum);
- if (error == 0) {
- printf("gpa %#lx:", gpa_pmap);
- pte = &pteval[0];
- while (ptenum-- > 0)
- printf(" %#lx", *pte++);
- printf("\n");
- }
- }
-
- if (!error && set_rtc_nvram)
- error = vm_rtc_write(ctx, rtc_nvram_offset, rtc_nvram_value);
-
- if (!error && (get_rtc_nvram || get_all)) {
- error = vm_rtc_read(ctx, rtc_nvram_offset, &rtc_nvram_value);
- if (error == 0) {
- printf("rtc nvram[%03d]: 0x%02x\n", rtc_nvram_offset,
- rtc_nvram_value);
- }
- }
-
- if (!error && set_rtc_time)
- error = vm_rtc_settime(ctx, rtc_secs);
-
- if (!error && (get_rtc_time || get_all)) {
- error = vm_rtc_gettime(ctx, &rtc_secs);
- if (error == 0) {
- gmtime_r(&rtc_secs, &tm);
- printf("rtc time %#lx: %s %s %02d %02d:%02d:%02d %d\n",
- rtc_secs, wday_str(tm.tm_wday), mon_str(tm.tm_mon),
- tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,
- 1900 + tm.tm_year);
- }
- }
-
if (!error && (getcap || get_all)) {
int captype, val, getcaptype;
@@ -2237,14 +469,6 @@ main(int argc, char *argv[])
print_cpus("suspended cpus", &cpus);
}
- if (!error && (get_intinfo || get_all)) {
- error = vm_get_intinfo(vcpu, &info[0], &info[1]);
- if (!error) {
- print_intinfo("pending", info[0]);
- print_intinfo("current", info[1]);
- }
- }
-
if (!error && (get_stats || get_all)) {
int i, num_stats;
uint64_t *stats;
@@ -2278,7 +502,7 @@ main(int argc, char *argv[])
vmrun.cpusetsize = sizeof(cpuset);
error = vm_run(vcpu, &vmrun);
if (error == 0)
- dump_vm_run_exitcode(&vmexit, vcpuid);
+ bhyvectl_dump_vm_run_exitcode(&vmexit, vcpuid);
else
printf("vm_run error %d\n", error);
}
@@ -2300,6 +524,6 @@ main(int argc, char *argv[])
error = snapshot_request(vmname, checkpoint_file, vm_suspend_opt);
#endif
- free (opts);
+ free(opts);
exit(error);
}
diff --git a/sys/dev/sound/unit.h b/usr.sbin/bhyvectl/bhyvectl.h
index 9ddd68a2fe04..c37a671bf795 100644
--- a/sys/dev/sound/unit.h
+++ b/usr.sbin/bhyvectl/bhyvectl.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2007 Ariff Abdullah <ariff@FreeBSD.org>
+ * Copyright (c) 2011 NetApp, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -13,10 +13,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -26,27 +26,28 @@
* SUCH DAMAGE.
*/
-#ifndef _SND_UNIT_H_
-#define _SND_UNIT_H_
+#ifndef _BHYVECTL_H_
+#define _BHYVECTL_H_
-#define SND_UNIT_UMIN 16
-#define SND_UNIT_UMAX 2048
+#include <stdbool.h>
-int snd_max_u(void);
-int snd_max_d(void);
-int snd_max_c(void);
-int snd_unit2u(int);
-int snd_unit2d(int);
-int snd_unit2c(int);
-int snd_u2unit(int);
-int snd_d2unit(int);
-int snd_c2unit(int);
-int snd_mkunit(int, int, int);
+#define OPT_START 1000
+#define OPT_START_MD 2000
-void snd_unit_init(void);
+#define REQ_ARG required_argument
+#define NO_ARG no_argument
+#define OPT_ARG optional_argument
-#define SND_U_MASK (snd_u2unit(snd_max_u()))
-#define SND_D_MASK (snd_d2unit(snd_max_d()))
-#define SND_C_MASK (snd_c2unit(snd_max_c()))
+struct option;
+struct vmctx;
+struct vmexit;
-#endif /* !_SND_UNIT_H_ */
+void bhyvectl_md_main(struct vmctx *ctx, struct vcpu *vcpu, int vcpuid,
+ bool get_all);
+struct option *bhyvectl_opts(const struct option *options, size_t count);
+void bhyvectl_handle_opt(const struct option *opts, int opt);
+const char *bhyvectl_opt_desc(int opt);
+void bhyvectl_dump_vm_run_exitcode(struct vm_exit *vmexit, int vcpu);
+void usage(const struct option *opts);
+
+#endif
diff --git a/usr.sbin/bluetooth/bthidcontrol/sdp.c b/usr.sbin/bluetooth/bthidcontrol/sdp.c
index dc83229f080c..4754744a866a 100644
--- a/usr.sbin/bluetooth/bthidcontrol/sdp.c
+++ b/usr.sbin/bluetooth/bthidcontrol/sdp.c
@@ -30,7 +30,7 @@
* $Id: sdp.c,v 1.3 2004/02/17 22:14:57 max Exp $
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/queue.h>
#include <sys/sysctl.h>
#define L2CAP_SOCKET_CHECKED
@@ -79,10 +79,10 @@ SDP_ATTR_RANGE( 0x0209, /* HIDBatteryPower */
SDP_ATTR_RANGE( 0x020d, /* HIDNormallyConnectable */
0x020d)
};
-#define nattrs (sizeof(attrs)/sizeof(attrs[0]))
+#define nattrs nitems(attrs)
static sdp_attr_t values[8];
-#define nvalues (sizeof(values)/sizeof(values[0]))
+#define nvalues nitems(values)
static uint8_t buffer[nvalues][512];
diff --git a/usr.sbin/bluetooth/bthidd/kbd.c b/usr.sbin/bluetooth/bthidd/kbd.c
index c1616c7e4bd3..a807a9b27dec 100644
--- a/usr.sbin/bluetooth/bthidd/kbd.c
+++ b/usr.sbin/bluetooth/bthidd/kbd.c
@@ -35,6 +35,7 @@
#include <sys/consio.h>
#include <sys/ioctl.h>
#include <sys/kbio.h>
+#include <sys/param.h>
#include <sys/queue.h>
#include <sys/wait.h>
#include <assert.h>
@@ -319,7 +320,7 @@ static int32_t const x[] =
/* Right GUI E7 */ E0PREFIX|0x5C /* E0 DC */
};
-#define xsize ((int32_t)(sizeof(x)/sizeof(x[0])))
+#define xsize (int32_t)nitems(x)
/*
* Get a max HID keycode (aligned)
@@ -437,7 +438,7 @@ kbd_write(bitstr_t *m, int32_t fb, int32_t make, int32_t fd)
int32_t i, *b, *eob, n, buf[64];
b = buf;
- eob = b + sizeof(buf)/sizeof(buf[0]);
+ eob = b + nitems(buf);
i = fb;
while (i < xsize) {
diff --git a/usr.sbin/bluetooth/hccontrol/hccontrol.c b/usr.sbin/bluetooth/hccontrol/hccontrol.c
index c1ce016e6246..bd63c9aff6ec 100644
--- a/usr.sbin/bluetooth/hccontrol/hccontrol.c
+++ b/usr.sbin/bluetooth/hccontrol/hccontrol.c
@@ -33,6 +33,7 @@
#define L2CAP_SOCKET_CHECKED
#include <bluetooth.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <sys/sysctl.h>
#include <assert.h>
#include <err.h>
@@ -153,11 +154,11 @@ socket_open(char const *node)
(void * const) &filter, sizeof(filter)) < 0)
err(4, "Could not setsockopt()");
- size = (sizeof(mib)/sizeof(mib[0]));
+ size = nitems(mib);
if (sysctlnametomib("net.bluetooth.hci.command_timeout",mib,&size) < 0)
err(5, "Could not sysctlnametomib()");
- if (sysctl(mib, sizeof(mib)/sizeof(mib[0]),
+ if (sysctl(mib, nitems(mib),
(void *) &timeout, &size, NULL, 0) < 0)
err(6, "Could not sysctl()");
diff --git a/usr.sbin/bluetooth/hccontrol/node.c b/usr.sbin/bluetooth/hccontrol/node.c
index b100900f527d..61b60ba95db5 100644
--- a/usr.sbin/bluetooth/hccontrol/node.c
+++ b/usr.sbin/bluetooth/hccontrol/node.c
@@ -31,6 +31,7 @@
*/
#include <sys/ioctl.h>
+#include <sys/param.h>
#define L2CAP_SOCKET_CHECKED
#include <bluetooth.h>
#include <errno.h>
@@ -160,7 +161,7 @@ hci_read_node_features(int s, int argc, char **argv)
return (ERROR);
fprintf(stdout, "Features: ");
- for (n = 0; n < sizeof(r.features)/sizeof(r.features[0]); n++)
+ for (n = 0; n < nitems(r.features); n++)
fprintf(stdout, "%#02x ", r.features[n]);
fprintf(stdout, "\n%s\n", hci_features2str(r.features,
buffer, sizeof(buffer)));
@@ -243,8 +244,8 @@ hci_read_neighbor_cache(int s, int argc, char **argv)
for (n = 0; n < r.num_entries; n++) {
uint8_t addrtype = r.entries[n].addrtype;
- if(addrtype >= sizeof(addrtype2str)/sizeof(addrtype2str[0]))
- addrtype = sizeof(addrtype2str)/sizeof(addrtype2str[0]) - 1;
+ if(addrtype >= nitems(addrtype2str))
+ addrtype = nitems(addrtype2str) - 1;
fprintf(stdout,
"%1s %-17.17s " \
"%02x %02x %02x %02x %02x %02x %02x %02x " \
diff --git a/usr.sbin/bluetooth/sdpcontrol/search.c b/usr.sbin/bluetooth/sdpcontrol/search.c
index 94c34828a949..2a4b2468c7f7 100644
--- a/usr.sbin/bluetooth/sdpcontrol/search.c
+++ b/usr.sbin/bluetooth/sdpcontrol/search.c
@@ -30,6 +30,7 @@
* $Id: search.c,v 1.2 2003/09/08 17:35:15 max Exp $
*/
+#include <sys/param.h>
#include <netinet/in.h>
#define L2CAP_SOCKET_CHECKED
#include <bluetooth.h>
@@ -51,7 +52,7 @@ static uint32_t attrs[] =
SDP_ATTR_RANGE( SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST,
SDP_ATTR_BLUETOOTH_PROFILE_DESCRIPTOR_LIST)
};
-#define attrs_len (sizeof(attrs)/sizeof(attrs[0]))
+#define attrs_len nitems(attrs)
/* Buffer for the attributes */
#define NRECS 25 /* request this much records from the SDP server */
@@ -60,7 +61,7 @@ static uint8_t buffer[NRECS * attrs_len][BSIZE];
/* SDP attributes */
static sdp_attr_t values[NRECS * attrs_len];
-#define values_len (sizeof(values)/sizeof(values[0]))
+#define values_len nitems(values)
/*
* Print Service Class ID List
diff --git a/usr.sbin/bluetooth/sdpd/profile.c b/usr.sbin/bluetooth/sdpd/profile.c
index 3c6ada6871c7..e6d81f8ef4b1 100644
--- a/usr.sbin/bluetooth/sdpd/profile.c
+++ b/usr.sbin/bluetooth/sdpd/profile.c
@@ -32,6 +32,7 @@
* $Id: profile.c,v 1.6 2004/01/13 19:31:54 max Exp $
*/
+#include <sys/param.h>
#include <sys/queue.h>
#define L2CAP_SOCKET_CHECKED
#include <bluetooth.h>
@@ -77,7 +78,7 @@ profile_get_descriptor(uint16_t uuid)
int32_t i;
- for (i = 0; i < sizeof(profiles)/sizeof(profiles[0]); i++)
+ for (i = 0; i < nitems(profiles); i++)
if (profiles[i]->uuid == uuid)
return (profiles[i]);
@@ -444,7 +445,7 @@ bnep_profile_create_protocol_descriptor_list(
};
uint16_t i, psm, version = 0x0100,
- nptypes = sizeof(ptype)/sizeof(ptype[0]),
+ nptypes = nitems(ptype),
nptypes_size = nptypes * 3;
if (datalen != 2 || 18 + nptypes_size > 255 ||
diff --git a/usr.sbin/bluetooth/sdpd/sar.c b/usr.sbin/bluetooth/sdpd/sar.c
index 0470109ebc07..68193b567fd3 100644
--- a/usr.sbin/bluetooth/sdpd/sar.c
+++ b/usr.sbin/bluetooth/sdpd/sar.c
@@ -30,6 +30,7 @@
* $Id: sar.c,v 1.2 2004/01/08 23:46:51 max Exp $
*/
+#include <sys/param.h>
#include <sys/queue.h>
#include <sys/uio.h>
#include <netinet/in.h>
@@ -304,7 +305,7 @@ server_send_service_attribute_response(server_p srv, int32_t fd)
iov[3].iov_len = 1 + cs[0];
do {
- size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0]));
+ size = writev(fd, (struct iovec const *) &iov, nitems(iov));
} while (size < 0 && errno == EINTR);
/* Check if we have sent (or failed to sent) last response chunk */
diff --git a/usr.sbin/bluetooth/sdpd/srr.c b/usr.sbin/bluetooth/sdpd/srr.c
index 8e887a4841de..b16eb25c9ea4 100644
--- a/usr.sbin/bluetooth/sdpd/srr.c
+++ b/usr.sbin/bluetooth/sdpd/srr.c
@@ -30,6 +30,7 @@
* $Id: srr.c,v 1.1 2004/01/13 01:54:39 max Exp $
*/
+#include <sys/param.h>
#include <sys/queue.h>
#include <sys/uio.h>
#include <netinet/in.h>
@@ -129,7 +130,7 @@ server_send_service_register_response(server_p srv, int32_t fd)
iov[1].iov_len = srv->fdidx[fd].rsp_size;
do {
- size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0]));
+ size = writev(fd, (struct iovec const *) &iov, nitems(iov));
} while (size < 0 && errno == EINTR);
srv->fdidx[fd].rsp_cs = 0;
diff --git a/usr.sbin/bluetooth/sdpd/ssr.c b/usr.sbin/bluetooth/sdpd/ssr.c
index c6b3a1f65fe1..1a29dde97ee5 100644
--- a/usr.sbin/bluetooth/sdpd/ssr.c
+++ b/usr.sbin/bluetooth/sdpd/ssr.c
@@ -30,6 +30,7 @@
* $Id: ssr.c,v 1.5 2004/01/13 01:54:39 max Exp $
*/
+#include <sys/param.h>
#include <sys/queue.h>
#include <sys/uio.h>
#include <netinet/in.h>
@@ -269,7 +270,7 @@ server_send_service_search_response(server_p srv, int32_t fd)
iov[3].iov_len = 1 + cs[0];
do {
- size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0]));
+ size = writev(fd, (struct iovec const *) &iov, nitems(iov));
} while (size < 0 && errno == EINTR);
/* Check if we have sent (or failed to sent) last response chunk */
diff --git a/usr.sbin/bsdinstall/scripts/config b/usr.sbin/bsdinstall/scripts/config
index 093d38ee0a59..ba39b8bdf305 100755
--- a/usr.sbin/bsdinstall/scripts/config
+++ b/usr.sbin/bsdinstall/scripts/config
@@ -43,9 +43,6 @@ cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc
cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf
rm $BSDINSTALL_TMPBOOT/loader.conf.*
-# The 'cryptodev_load' line is a workaround for arm64, which does not
-# automatically load cryptodev.ko with zfs.ko.
-df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "cryptodev_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf
df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "zfs_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf
cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot
diff --git a/usr.sbin/bsdinstall/scripts/fetchmissingdists b/usr.sbin/bsdinstall/scripts/fetchmissingdists
index d37acc96b92c..f5da3ee45c39 100644
--- a/usr.sbin/bsdinstall/scripts/fetchmissingdists
+++ b/usr.sbin/bsdinstall/scripts/fetchmissingdists
@@ -53,7 +53,6 @@ if [ -z "$FETCH_DISTRIBUTIONS" ]; then
exit 0
fi
-ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
WANT_DEBUG=
# Download to a directory in the new system as scratch space
@@ -75,10 +74,8 @@ export FTP_PASSIVE_MODE=YES
if [ -f "$BSDINSTALL_DISTDIR_ORIG/MANIFEST" ]; then
cp "$BSDINSTALL_DISTDIR_ORIG/MANIFEST" "$BSDINSTALL_DISTDIR/MANIFEST"
- VERIFY_MANIFEST_SIG=0
else
FETCH_DISTRIBUTIONS="MANIFEST $FETCH_DISTRIBUTIONS"
- VERIFY_MANIFEST_SIG=1
# XXX actually verify signature on manifest
bsddialog --backtitle "$OSNAME Installer" --title "Warning" --msgbox "Manifest not found on local disk and will be fetched from an unverified source. This is a potential security risk. If you do not wish to proceed, press control-C now." 0 0
diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig
index 338e4f0a4109..f044bc1cba98 100755
--- a/usr.sbin/bsdinstall/scripts/wlanconfig
+++ b/usr.sbin/bsdinstall/scripts/wlanconfig
@@ -216,7 +216,7 @@ while :; do
f_dialog_title "Network Selection"
prompt="Select a wireless network to connect to."
f_dialog_menu_size height width rows "$DIALOG_TITLE" \
- "$DIALOG_BACKTITLE" "$prompt" "" $menu_list
+ "$DIALOG_BACKTITLE" "$prompt" "" $NETWORKS
NETWORK=$( eval $DIALOG \
--title \"\$DIALOG_TITLE\" \
--backtitle \"\$DIALOG_BACKTITLE\" \
diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
index bb064dd549d2..1086aa7dcf82 100644
--- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
+++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
@@ -50,7 +50,7 @@
struct lmodule *module;
-static int dev = -1;
+static struct pfctl_handle *pfh;
static int started;
static uint64_t pf_tick;
@@ -341,7 +341,7 @@ pf_limits(struct snmp_context __unused *ctx, struct snmp_value *val,
return (SNMP_ERR_NOSUCHNAME);
}
- if (ioctl(dev, DIOCGETLIMIT, &pl)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETLIMIT, &pl)) {
syslog(LOG_ERR, "pf_limits(): ioctl(): %s",
strerror(errno));
return (SNMP_ERR_GENERR);
@@ -431,7 +431,7 @@ pf_timeouts(struct snmp_context __unused *ctx, struct snmp_value *val,
return (SNMP_ERR_NOSUCHNAME);
}
- if (ioctl(dev, DIOCGETTIMEOUT, &pt)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETTIMEOUT, &pt)) {
syslog(LOG_ERR, "pf_timeouts(): ioctl(): %s",
strerror(errno));
return (SNMP_ERR_GENERR);
@@ -1174,7 +1174,7 @@ pfi_refresh(void)
io.pfiio_size = numifs;
io.pfiio_buffer = p;
- if (ioctl(dev, DIOCIGETIFACES, &io)) {
+ if (ioctl(pfctl_fd(pfh), DIOCIGETIFACES, &io)) {
syslog(LOG_ERR, "pfi_refresh(): ioctl(): %s",
strerror(errno));
goto err2;
@@ -1231,7 +1231,7 @@ pfq_refresh(void)
bzero(&pa, sizeof(pa));
pa.version = PFIOC_ALTQ_VERSION;
- if (ioctl(dev, DIOCGETALTQS, &pa)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETALTQS, &pa)) {
syslog(LOG_ERR, "pfq_refresh: ioctl(DIOCGETALTQS): %s",
strerror(errno));
return (-1);
@@ -1251,7 +1251,7 @@ pfq_refresh(void)
pa.ticket = ticket;
pa.nr = i;
- if (ioctl(dev, DIOCGETALTQ, &pa)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETALTQ, &pa)) {
syslog(LOG_ERR, "pfq_refresh(): "
"ioctl(DIOCGETALTQ): %s",
strerror(errno));
@@ -1287,7 +1287,7 @@ pfs_refresh(void)
return (0);
pfctl_free_status(pfs);
- pfs = pfctl_get_status(dev);
+ pfs = pfctl_get_status_h(pfh);
if (pfs == NULL) {
syslog(LOG_ERR, "pfs_refresh(): ioctl(): %s",
@@ -1329,7 +1329,7 @@ pft_refresh(void)
io.pfrio_size = numtbls;
io.pfrio_buffer = t;
- if (ioctl(dev, DIOCRGETTSTATS, &io)) {
+ if (ioctl(pfctl_fd(pfh), DIOCRGETTSTATS, &io)) {
syslog(LOG_ERR, "pft_refresh(): ioctl(): %s",
strerror(errno));
goto err2;
@@ -1396,7 +1396,7 @@ pfa_table_addrs(u_int sidx, struct pfr_table *pt)
io.pfrio_buffer = t;
io.pfrio_esize = sizeof(struct pfr_astats);
- if (ioctl(dev, DIOCRGETASTATS, &io)) {
+ if (ioctl(pfctl_fd(pfh), DIOCRGETASTATS, &io)) {
syslog(LOG_ERR, "pfa_table_addrs(): ioctl() on %s: %s",
pt->pfrt_name, strerror(errno));
numaddrs = -1;
@@ -1464,7 +1464,7 @@ pfa_refresh(void)
io.pfrio_size = numtbls;
io.pfrio_buffer = pt;
- if (ioctl(dev, DIOCRGETTABLES, &io)) {
+ if (ioctl(pfctl_fd(pfh), DIOCRGETTABLES, &io)) {
syslog(LOG_ERR, "pfa_refresh(): ioctl(): %s",
strerror(errno));
goto err2;
@@ -1519,14 +1519,14 @@ pfl_scan_ruleset(const char *path)
struct pfl_entry *e;
u_int32_t nr, i;
- if (pfctl_get_rules_info(dev, &rules, PF_PASS, path)) {
+ if (pfctl_get_rules_info_h(pfh, &rules, PF_PASS, path)) {
syslog(LOG_ERR, "pfl_scan_ruleset: ioctl(DIOCGETRULES): %s",
strerror(errno));
goto err;
}
for (nr = rules.nr, i = 0; i < nr; i++) {
- if (pfctl_get_rule(dev, i, rules.ticket, path,
+ if (pfctl_get_rule(pfctl_fd(pfh), i, rules.ticket, path,
PF_PASS, &rule, anchor_call)) {
syslog(LOG_ERR, "pfl_scan_ruleset: ioctl(DIOCGETRULE):"
" %s", strerror(errno));
@@ -1572,7 +1572,7 @@ pfl_walk_rulesets(const char *path)
bzero(&prs, sizeof(prs));
strlcpy(prs.path, path, sizeof(prs.path));
- if (ioctl(dev, DIOCGETRULESETS, &prs)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, &prs)) {
syslog(LOG_ERR, "pfl_walk_rulesets: ioctl(DIOCGETRULESETS): %s",
strerror(errno));
goto err;
@@ -1580,7 +1580,7 @@ pfl_walk_rulesets(const char *path)
for (nr = prs.nr, i = 0; i < nr; i++) {
prs.nr = i;
- if (ioctl(dev, DIOCGETRULESET, &prs)) {
+ if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, &prs)) {
syslog(LOG_ERR, "pfl_walk_rulesets: ioctl(DIOCGETRULESET):"
" %s", strerror(errno));
goto err;
@@ -1671,13 +1671,13 @@ pf_init(struct lmodule *mod, int __unused argc, char __unused *argv[])
{
module = mod;
- if ((dev = open("/dev/pf", O_RDONLY)) == -1) {
+ if ((pfh = pfctl_open(PF_DEVICE)) == NULL) {
syslog(LOG_ERR, "pf_init(): open(): %s\n",
strerror(errno));
return (-1);
}
- if ((altq_enabled = altq_is_enabled(dev)) == -1) {
+ if ((altq_enabled = altq_is_enabled(pfctl_fd(pfh))) == -1) {
syslog(LOG_ERR, "pf_init(): altq test failed");
return (-1);
}
@@ -1756,7 +1756,8 @@ pf_fini(void)
pfctl_free_status(pfs);
pfs = NULL;
- close(dev);
+ pfctl_close(pfh);
+
return (0);
}
diff --git a/usr.sbin/btxld/elfh.c b/usr.sbin/btxld/elfh.c
index 8e9ea16c2cf6..5122aca8b3c9 100644
--- a/usr.sbin/btxld/elfh.c
+++ b/usr.sbin/btxld/elfh.c
@@ -26,7 +26,7 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/endian.h>
#include <stddef.h>
@@ -53,9 +53,9 @@ const struct elfh elfhdr = {
0, /* e_flags */
htole16(sizeof(elfhdr.e)), /* e_ehsize */
htole16(sizeof(elfhdr.p[0])), /* e_phentsize */
- htole16(sizeof(elfhdr.p) / sizeof(elfhdr.p[0])), /* e_phnum */
+ htole16(nitems(elfhdr.p)), /* e_phnum */
htole16(sizeof(elfhdr.sh[0])), /* e_shentsize */
- htole16(sizeof(elfhdr.sh) / sizeof(elfhdr.sh[0])), /* e_shnum */
+ htole16(nitems(elfhdr.sh)), /* e_shnum */
htole16(1) /* e_shstrndx */
},
{
diff --git a/usr.sbin/cron/crontab/crontab.5 b/usr.sbin/cron/crontab/crontab.5
index 12caa45cff46..e4e6fae0b01b 100644
--- a/usr.sbin/cron/crontab/crontab.5
+++ b/usr.sbin/cron/crontab/crontab.5
@@ -19,7 +19,7 @@
.\"
.\" $Id: crontab.5,v 1.2 1998/08/14 00:32:38 vixie Exp $
.\"
-.Dd March 29, 2020
+.Dd May 10, 2024
.Dt CRONTAB 5
.Os
.Sh NAME
@@ -151,11 +151,15 @@ usually does not read its mail.
.Pp
The format of a cron command is very much the V7 standard, with a number of
upward-compatible extensions.
-Each line has five time and date fields,
-followed by a user name
-(with optional ``:<group>'' and ``/<login-class>'' suffixes)
-if this is the system crontab file,
+.Pp
+Each user cron line has five time and date fields, followed by a command.
+.Pp
+Each line in system crontab (
+.Pa /etc/crontab, /etc/cron.d, /usr/local/etc/cron.d
+) has five time and date fields, followed by a valid user name
+(with optional ``:<group>'' and ``/<login-class>'' suffixes),
followed by a command.
+.Pp
Commands are executed by
.Xr cron 8
when the minute, hour, and month of year fields match the current time,
@@ -281,9 +285,15 @@ Note, however, that overlap may occur if the job is running when the file
containing the job is modified and subsequently reloaded.
The first run is scheduled for the specified number of seconds after cron
is started or the crontab entry is reloaded.
-.Sh EXAMPLE CRON FILE
+.Sh EXAMPLE SYSTEM CRON FILE
+.Bd -literal
+# sample /etc/cron.d/vmstat
+# run vmstat every five minutes
+# note the username as sixth field!
+*/5 * * * * root vmstat
+.Ed
+.Sh EXAMPLE USER CRON FILE
.Bd -literal
-
# use /bin/sh to run commands, overriding the default set by cron
SHELL=/bin/sh
# mail any output to `paul', no matter whose crontab this is
diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile
index f9ddd251f96c..5e0df8065cce 100644
--- a/usr.sbin/ctladm/Makefile
+++ b/usr.sbin/ctladm/Makefile
@@ -3,7 +3,7 @@
PACKAGE= iscsi
PROG= ctladm
-SRCS= ctladm.c util.c ctl_util.c ctl_scsi_all.c
+SRCS= ctladm.c util.c ctl_util.c ctl_nvme_all.c ctl_scsi_all.c
.PATH: ${SRCTOP}/sys/cam/ctl
SDIR= ${SRCTOP}/sys
CFLAGS+= -I${SDIR}
diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8
index ba2712cb278c..2c90e12ef924 100644
--- a/usr.sbin/ctladm/ctladm.8
+++ b/usr.sbin/ctladm/ctladm.8
@@ -35,7 +35,7 @@
.\"
.\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $
.\"
-.Dd December 27, 2023
+.Dd May 2, 2024
.Dt CTLADM 8
.Os
.Sh NAME
@@ -198,6 +198,13 @@
.Ic isterminate
.Aq Fl a | Fl c Ar connection-id | Fl i Ar name | Fl p Ar portal
.Nm
+.Ic nvlist
+.Op Fl v
+.Op Fl x
+.Nm
+.Ic nvterminate
+.Aq Fl a | Fl c Ar controller-id | Fl h Ar name
+.Nm
.Ic help
.Sh DESCRIPTION
The
@@ -861,6 +868,27 @@ Specify initiator name.
.It Fl p
Specify initiator portal (hostname or IP address).
.El
+.It Ic nvlist
+Get a list of currently running NVMeoF associations.
+This includes host and controller names and the unique controller IDs.
+.Bl -tag -width 11n
+.It Fl v
+Verbose mode.
+.It Fl x
+Dump the raw XML.
+The sessions list information from the kernel comes in XML format, and this
+option allows the display of the raw XML data.
+.El
+.It Ic nvterminate
+Forcibly terminate NVMeoF associations matching criteria.
+.Bl -tag -width 11n
+.It Fl a
+Terminate all associations.
+.It Fl c
+Specify controller ID.
+.It Fl h
+Specify host name.
+.El
.It Ic help
Display
.Nm
diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c
index 9d2f14de28ed..688281238fb0 100644
--- a/usr.sbin/ctladm/ctladm.c
+++ b/usr.sbin/ctladm/ctladm.c
@@ -71,6 +71,7 @@
#include <cam/ctl/ctl_ioctl.h>
#include <cam/ctl/ctl_util.h>
#include <cam/ctl/ctl_scsi_all.h>
+#include <dev/nvmf/nvmf_proto.h>
#include <camlib.h>
#include <libutil.h>
#include "ctladm.h"
@@ -113,7 +114,9 @@ typedef enum {
CTLADM_CMD_ISLIST,
CTLADM_CMD_ISLOGOUT,
CTLADM_CMD_ISTERMINATE,
- CTLADM_CMD_LUNMAP
+ CTLADM_CMD_LUNMAP,
+ CTLADM_CMD_NVLIST,
+ CTLADM_CMD_NVTERMINATE
} ctladm_cmdfunction;
typedef enum {
@@ -179,6 +182,8 @@ static struct ctladm_opts option_table[] = {
{"lunmap", CTLADM_CMD_LUNMAP, CTLADM_ARG_NONE, "p:l:L:"},
{"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"},
{"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:o:s:"},
+ {"nvlist", CTLADM_CMD_NVLIST, CTLADM_ARG_NONE, "vx"},
+ {"nvterminate", CTLADM_CMD_NVTERMINATE, CTLADM_ARG_NONE, "ac:h:"},
{"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:O:d:crp:qt:w:W:x"},
{"portlist", CTLADM_CMD_PORTLIST, CTLADM_ARG_NONE, "f:ilp:qvx"},
{"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"},
@@ -383,6 +388,7 @@ static struct ctladm_opts cctl_fe_table[] = {
{"scsi", CTL_PORT_SCSI, CTLADM_ARG_NONE, NULL},
{"internal", CTL_PORT_INTERNAL, CTLADM_ARG_NONE, NULL},
{"iscsi", CTL_PORT_ISCSI, CTLADM_ARG_NONE, NULL},
+ {"nvmf", CTL_PORT_NVMF, CTLADM_ARG_NONE, NULL},
{"sas", CTL_PORT_SAS, CTLADM_ARG_NONE, NULL},
{"all", CTL_PORT_ALL, CTLADM_ARG_NONE, NULL},
{NULL, 0, 0, NULL}
@@ -1245,7 +1251,7 @@ cctl_start_stop(int fd, int lun, int iid, int retries, int start,
goto bailout;
}
- ctl_scsi_path_string(io, scsi_path, sizeof(scsi_path));
+ ctl_scsi_path_string(&io->io_hdr, scsi_path, sizeof(scsi_path));
if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
fprintf(stdout, "%s LUN %s successfully\n", scsi_path,
(start) ? "started" : "stopped");
@@ -1966,7 +1972,7 @@ cctl_get_inquiry(int fd, int lun, int iid, int retries,
retval = 1;
ctl_io_error_print(io, NULL, stderr);
} else if (path_str != NULL)
- ctl_scsi_path_string(io, path_str, path_len);
+ ctl_scsi_path_string(&io->io_hdr, path_str, path_len);
bailout:
ctl_scsi_free_io(io);
@@ -2364,7 +2370,7 @@ cctl_persistent_reserve_out(int fd, int lun, int iid,
}
if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
char scsi_path[40];
- ctl_scsi_path_string(io, scsi_path, sizeof(scsi_path));
+ ctl_scsi_path_string(&io->io_hdr, scsi_path, sizeof(scsi_path));
fprintf( stdout, "%sPERSISTENT RESERVE OUT executed "
"successfully\n", scsi_path);
} else
@@ -2806,10 +2812,9 @@ cctl_islist_start_element(void *user_data, const char *name, const char **attr)
islist = (struct cctl_islist_data *)user_data;
cur_conn = islist->cur_conn;
islist->level++;
- if ((u_int)islist->level >= (sizeof(islist->cur_sb) /
- sizeof(islist->cur_sb[0])))
+ if ((u_int)islist->level >= nitems(islist->cur_sb))
errx(1, "%s: too many nesting levels, %zd max", __func__,
- sizeof(islist->cur_sb) / sizeof(islist->cur_sb[0]));
+ nitems(islist->cur_sb));
islist->cur_sb[islist->level] = sbuf_new_auto();
if (islist->cur_sb[islist->level] == NULL)
@@ -3237,10 +3242,9 @@ cctl_start_element(void *user_data, const char *name, const char **attr)
devlist = (struct cctl_devlist_data *)user_data;
cur_lun = devlist->cur_lun;
devlist->level++;
- if ((u_int)devlist->level >= (sizeof(devlist->cur_sb) /
- sizeof(devlist->cur_sb[0])))
+ if ((u_int)devlist->level >= nitems(devlist->cur_sb))
errx(1, "%s: too many nesting levels, %zd max", __func__,
- sizeof(devlist->cur_sb) / sizeof(devlist->cur_sb[0]));
+ nitems(devlist->cur_sb));
devlist->cur_sb[devlist->level] = sbuf_new_auto();
if (devlist->cur_sb[devlist->level] == NULL)
@@ -3501,10 +3505,9 @@ cctl_start_pelement(void *user_data, const char *name, const char **attr)
portlist = (struct cctl_portlist_data *)user_data;
cur_port = portlist->cur_port;
portlist->level++;
- if ((u_int)portlist->level >= (sizeof(portlist->cur_sb) /
- sizeof(portlist->cur_sb[0])))
+ if ((u_int)portlist->level >= nitems(portlist->cur_sb))
errx(1, "%s: too many nesting levels, %zd max", __func__,
- sizeof(portlist->cur_sb) / sizeof(portlist->cur_sb[0]));
+ nitems(portlist->cur_sb));
portlist->cur_sb[portlist->level] = sbuf_new_auto();
if (portlist->cur_sb[portlist->level] == NULL)
@@ -3820,6 +3823,314 @@ cctl_lunmap(int fd, int argc, char **argv, char *combinedopt)
return (retval);
}
+struct cctl_nvlist_conn {
+ int connection_id;
+ char *hostnqn;
+ char *subnqn;
+ int trtype;
+ STAILQ_ENTRY(cctl_nvlist_conn) links;
+};
+
+struct cctl_nvlist_data {
+ int num_conns;
+ STAILQ_HEAD(,cctl_nvlist_conn) conn_list;
+ struct cctl_nvlist_conn *cur_conn;
+ u_int level;
+ struct sbuf *cur_sb[32];
+};
+
+static void
+cctl_nvlist_start_element(void *user_data, const char *name, const char **attr)
+{
+ int i;
+ struct cctl_nvlist_data *nvlist;
+ struct cctl_nvlist_conn *cur_conn;
+
+ nvlist = (struct cctl_nvlist_data *)user_data;
+ cur_conn = nvlist->cur_conn;
+ nvlist->level++;
+ if ((u_int)nvlist->level >= nitems(nvlist->cur_sb))
+ errx(1, "%s: too many nesting levels, %zd max", __func__,
+ nitems(nvlist->cur_sb));
+
+ nvlist->cur_sb[nvlist->level] = sbuf_new_auto();
+ if (nvlist->cur_sb[nvlist->level] == NULL)
+ err(1, "%s: Unable to allocate sbuf", __func__);
+
+ if (strcmp(name, "connection") == 0) {
+ if (cur_conn != NULL)
+ errx(1, "%s: improper connection element nesting",
+ __func__);
+
+ cur_conn = calloc(1, sizeof(*cur_conn));
+ if (cur_conn == NULL)
+ err(1, "%s: cannot allocate %zd bytes", __func__,
+ sizeof(*cur_conn));
+
+ nvlist->num_conns++;
+ nvlist->cur_conn = cur_conn;
+
+ STAILQ_INSERT_TAIL(&nvlist->conn_list, cur_conn, links);
+
+ for (i = 0; attr[i] != NULL; i += 2) {
+ if (strcmp(attr[i], "id") == 0) {
+ cur_conn->connection_id =
+ strtoull(attr[i+1], NULL, 0);
+ } else {
+ errx(1,
+ "%s: invalid connection attribute %s = %s",
+ __func__, attr[i], attr[i+1]);
+ }
+ }
+ }
+}
+
+static void
+cctl_nvlist_end_element(void *user_data, const char *name)
+{
+ struct cctl_nvlist_data *nvlist;
+ struct cctl_nvlist_conn *cur_conn;
+ char *str;
+
+ nvlist = (struct cctl_nvlist_data *)user_data;
+ cur_conn = nvlist->cur_conn;
+
+ if ((cur_conn == NULL) && (strcmp(name, "ctlnvmflist") != 0))
+ errx(1, "%s: cur_conn == NULL! (name = %s)", __func__, name);
+
+ if (nvlist->cur_sb[nvlist->level] == NULL)
+ errx(1, "%s: no valid sbuf at level %d (name %s)", __func__,
+ nvlist->level, name);
+
+ sbuf_finish(nvlist->cur_sb[nvlist->level]);
+ str = strdup(sbuf_data(nvlist->cur_sb[nvlist->level]));
+ if (str == NULL)
+ err(1, "%s can't allocate %zd bytes for string", __func__,
+ sbuf_len(nvlist->cur_sb[nvlist->level]));
+
+ sbuf_delete(nvlist->cur_sb[nvlist->level]);
+ nvlist->cur_sb[nvlist->level] = NULL;
+ nvlist->level--;
+
+ if (strcmp(name, "hostnqn") == 0) {
+ cur_conn->hostnqn = str;
+ str = NULL;
+ } else if (strcmp(name, "subnqn") == 0) {
+ cur_conn->subnqn = str;
+ str = NULL;
+ } else if (strcmp(name, "trtype") == 0) {
+ cur_conn->trtype = atoi(str);
+ } else if (strcmp(name, "connection") == 0) {
+ nvlist->cur_conn = NULL;
+ } else if (strcmp(name, "ctlnvmflist") == 0) {
+ /* Nothing. */
+ } else {
+ /*
+ * Unknown element; ignore it for forward compatibility.
+ */
+ }
+
+ free(str);
+}
+
+static void
+cctl_nvlist_char_handler(void *user_data, const XML_Char *str, int len)
+{
+ struct cctl_nvlist_data *nvlist;
+
+ nvlist = (struct cctl_nvlist_data *)user_data;
+
+ sbuf_bcat(nvlist->cur_sb[nvlist->level], str, len);
+}
+
+static const char *
+nvmf_transport_descr(u_int trtype)
+{
+ static char buf[16];
+
+ switch (trtype) {
+ case NVMF_TRTYPE_RDMA:
+ return ("RDMA");
+ case NVMF_TRTYPE_FC:
+ return ("Fibre Channel");
+ case NVMF_TRTYPE_TCP:
+ return ("TCP");
+ default:
+ snprintf(buf, sizeof(buf), "%#x", trtype);
+ return (buf);
+ }
+}
+
+static int
+cctl_nvlist(int fd, int argc, char **argv, char *combinedopt)
+{
+ struct ctl_nvmf req;
+ struct cctl_nvlist_data nvlist;
+ struct cctl_nvlist_conn *conn;
+ XML_Parser parser;
+ char *conn_str;
+ int conn_len;
+ int dump_xml = 0;
+ int c, retval, verbose = 0;
+
+ retval = 0;
+ conn_len = 4096;
+
+ bzero(&nvlist, sizeof(nvlist));
+ STAILQ_INIT(&nvlist.conn_list);
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'v':
+ verbose = 1;
+ break;
+ case 'x':
+ dump_xml = 1;
+ break;
+ default:
+ break;
+ }
+ }
+
+retry:
+ conn_str = malloc(conn_len);
+
+ bzero(&req, sizeof(req));
+ req.type = CTL_NVMF_LIST;
+ req.data.list.alloc_len = conn_len;
+ req.data.list.conn_xml = conn_str;
+
+ if (ioctl(fd, CTL_NVMF, &req) == -1) {
+ warn("%s: error issuing CTL_NVMF ioctl", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (req.status == CTL_NVMF_ERROR) {
+ warnx("%s: error returned from CTL_NVMF ioctl:\n%s",
+ __func__, req.error_str);
+ } else if (req.status == CTL_NVMF_LIST_NEED_MORE_SPACE) {
+ conn_len = conn_len << 1;
+ goto retry;
+ }
+
+ if (dump_xml != 0) {
+ printf("%s", conn_str);
+ goto bailout;
+ }
+
+ parser = XML_ParserCreate(NULL);
+ if (parser == NULL) {
+ warn("%s: Unable to create XML parser", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ XML_SetUserData(parser, &nvlist);
+ XML_SetElementHandler(parser, cctl_nvlist_start_element,
+ cctl_nvlist_end_element);
+ XML_SetCharacterDataHandler(parser, cctl_nvlist_char_handler);
+
+ retval = XML_Parse(parser, conn_str, strlen(conn_str), 1);
+ if (retval != 1) {
+ warnx("%s: Unable to parse XML: Error %d", __func__,
+ XML_GetErrorCode(parser));
+ XML_ParserFree(parser);
+ retval = 1;
+ goto bailout;
+ }
+ retval = 0;
+ XML_ParserFree(parser);
+
+ if (verbose != 0) {
+ STAILQ_FOREACH(conn, &nvlist.conn_list, links) {
+ printf("%-25s %d\n", "Controller ID:", conn->connection_id);
+ printf("%-25s %s\n", "Host NQN:", conn->hostnqn);
+ printf("%-25s %s\n", "Subsystem NQN:", conn->subnqn);
+ printf("%-25s %s\n", "Transport:",
+ nvmf_transport_descr(conn->trtype));
+ printf("\n");
+ }
+ } else {
+ printf("%4s %-16s %-36s %-36s\n", "ID", "Transport", "HostNQN",
+ "SubNQN");
+ STAILQ_FOREACH(conn, &nvlist.conn_list, links) {
+ printf("%4u %-16s %-36s %-36s\n",
+ conn->connection_id,
+ nvmf_transport_descr(conn->trtype),
+ conn->hostnqn, conn->subnqn);
+ }
+ }
+bailout:
+ free(conn_str);
+
+ return (retval);
+}
+
+static int
+cctl_nvterminate(int fd, int argc, char **argv, char *combinedopt)
+{
+ struct ctl_nvmf req;
+ int retval = 0, c;
+ int all = 0, cntlid = -1, nargs = 0;
+ char *hostnqn = NULL;
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'a':
+ all = 1;
+ nargs++;
+ break;
+ case 'c':
+ cntlid = strtoul(optarg, NULL, 0);
+ nargs++;
+ break;
+ case 'h':
+ hostnqn = strdup(optarg);
+ if (hostnqn == NULL)
+ err(1, "%s: strdup", __func__);
+ nargs++;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (nargs == 0)
+ errx(1, "%s: either -a, -c, or -h must be specified",
+ __func__);
+ if (nargs > 1)
+ errx(1, "%s: only one of -a, -c, or -h may be specified",
+ __func__);
+
+ bzero(&req, sizeof(req));
+ req.type = CTL_NVMF_TERMINATE;
+ req.data.terminate.cntlid = cntlid;
+ if (hostnqn != NULL)
+ strlcpy(req.data.terminate.hostnqn,
+ hostnqn, sizeof(req.data.terminate.hostnqn));
+ if (all != 0)
+ req.data.terminate.all = 1;
+
+ if (ioctl(fd, CTL_NVMF, &req) == -1) {
+ warn("%s: error issuing CTL_NVMF ioctl", __func__);
+ retval = 1;
+ goto bailout;
+ }
+
+ if (req.status != CTL_NVMF_OK) {
+ warnx("%s: error returned from CTL NVMeoF connection "
+ "termination request:\n%s", __func__, req.error_str);
+ retval = 1;
+ goto bailout;
+ }
+
+ printf("NVMeoF connections terminated\n");
+
+bailout:
+ return (retval);
+}
+
void
usage(int error)
{
@@ -3866,11 +4177,13 @@ usage(int error)
" ctladm islist [-v | -x]\n"
" ctladm islogout <-a | -c connection-id | -i name | -p portal>\n"
" ctladm isterminate <-a | -c connection-id | -i name | -p portal>\n"
+" ctladm nvlist [-v | -x]\n"
+" ctladm nvterminate <-a | -c controller-id | -h name>\n"
" ctladm dumpooa\n"
" ctladm dumpstructs\n"
" ctladm help\n"
"General Options:\n"
-"-I intiator_id : defaults to 7, used to change the initiator id\n"
+"-I initiator_id : defaults to 7, used to change the initiator id\n"
"-C retries : specify the number of times to retry this command\n"
"-D devicename : specify the device to operate on\n"
" : (default is %s)\n"
@@ -4262,6 +4575,12 @@ main(int argc, char **argv)
case CTLADM_CMD_ISTERMINATE:
retval = cctl_isterminate(fd, argc, argv, combinedopt);
break;
+ case CTLADM_CMD_NVLIST:
+ retval = cctl_nvlist(fd, argc, argv, combinedopt);
+ break;
+ case CTLADM_CMD_NVTERMINATE:
+ retval = cctl_nvterminate(fd, argc, argv, combinedopt);
+ break;
case CTLADM_CMD_HELP:
default:
usage(retval);
diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c
index cdc0b0fa187d..dd1c89d0e9b8 100644
--- a/usr.sbin/ctld/kernel.c
+++ b/usr.sbin/ctld/kernel.c
@@ -168,7 +168,7 @@ cctl_start_element(void *user_data, const char *name, const char **attr)
if ((u_int)devlist->level >= (sizeof(devlist->cur_sb) /
sizeof(devlist->cur_sb[0])))
log_errx(1, "%s: too many nesting levels, %zd max", __func__,
- sizeof(devlist->cur_sb) / sizeof(devlist->cur_sb[0]));
+ nitems(devlist->cur_sb));
devlist->cur_sb[devlist->level] = sbuf_new_auto();
if (devlist->cur_sb[devlist->level] == NULL)
@@ -290,7 +290,7 @@ cctl_start_pelement(void *user_data, const char *name, const char **attr)
if ((u_int)devlist->level >= (sizeof(devlist->cur_sb) /
sizeof(devlist->cur_sb[0])))
log_errx(1, "%s: too many nesting levels, %zd max", __func__,
- sizeof(devlist->cur_sb) / sizeof(devlist->cur_sb[0]));
+ nitems(devlist->cur_sb));
devlist->cur_sb[devlist->level] = sbuf_new_auto();
if (devlist->cur_sb[devlist->level] == NULL)
diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8
index 4fafb8528f18..52fbc230ac77 100644
--- a/usr.sbin/daemon/daemon.8
+++ b/usr.sbin/daemon/daemon.8
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 27, 2023
+.Dd April 25, 2024
.Dt DAEMON 8
.Os
.Sh NAME
@@ -43,6 +43,7 @@
.Op Fl T Ar syslog_tag
.Op Fl l Ar syslog_facility
.Op Fl R Ar restart_delay_seconds
+.Op Fl C Ar restart_count
.Ar command arguments ...
.Sh DESCRIPTION
The
@@ -55,6 +56,17 @@ log file.
.Pp
The options are as follows:
.Bl -tag -width indent
+.It Fl C , Fl -restart-count Ar restart_count
+Restart the process at most
+.Ar restart_count
+times.
+When zero is specified,
+.Nm
+will exit.
+The maximum restart count is
+.Cm 128 .
+This option is used together with option
+.Fl -restart .
.It Fl c , Fl -change-dir
Change the current working directory to the root
.Pq Dq Pa / .
@@ -72,8 +84,9 @@ Close
and re-open it when signal
.Dv SIGHUP
is received, for interoperability with
-.Xr newsyslog 1
-and similar log rotation / archival mechanisms. If
+.Xr newsyslog 8
+and similar log rotation / archival mechanisms.
+If
.Fl -output-file
is not specified, this flag is ignored.
.It Fl l , Fl -syslog-facility Ar syslog_facility
diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c
index 26e34d1d2e2b..7214faf8bde3 100644
--- a/usr.sbin/daemon/daemon.c
+++ b/usr.sbin/daemon/daemon.c
@@ -56,6 +56,9 @@
/* 1 year in seconds */
#define MAX_RESTART_DELAY 60*60*24*365
+/* Maximum number of restarts */
+#define MAX_RESTART_COUNT 128
+
#define LBUF_SIZE 4096
enum daemon_mode {
@@ -92,6 +95,8 @@ struct daemon_state {
bool restart_enabled;
bool syslog_enabled;
bool log_reopen;
+ int restart_count;
+ int restarted_count;
};
static void restrict_process(const char *);
@@ -109,7 +114,7 @@ static void daemon_exec(struct daemon_state *);
static bool daemon_is_child_dead(struct daemon_state *);
static void daemon_set_child_pipe(struct daemon_state *);
-static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:h";
+static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:C:h";
static const struct option longopts[] = {
{ "change-dir", no_argument, NULL, 'c' },
@@ -121,6 +126,7 @@ static const struct option longopts[] = {
{ "child-pidfile", required_argument, NULL, 'p' },
{ "supervisor-pidfile", required_argument, NULL, 'P' },
{ "restart", no_argument, NULL, 'r' },
+ { "restart-count", required_argument, NULL, 'C' },
{ "restart-delay", required_argument, NULL, 'R' },
{ "title", required_argument, NULL, 't' },
{ "user", required_argument, NULL, 'u' },
@@ -139,6 +145,7 @@ usage(int exitcode)
" [-u user] [-o output_file] [-t title]\n"
" [-l syslog_facility] [-s syslog_priority]\n"
" [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]\n"
+ " [-C restart_count]\n"
"command arguments ...\n");
(void)fprintf(stderr,
@@ -152,6 +159,7 @@ usage(int exitcode)
" --child-pidfile -p <file> Write PID of the child process to file\n"
" --supervisor-pidfile -P <file> Write PID of the supervisor process to file\n"
" --restart -r Restart child if it terminates (1 sec delay)\n"
+ " --restart-count -C <N> Restart child at most N times, then exit\n"
" --restart-delay -R <N> Restart child if it terminates after N sec\n"
" --title -t <title> Set the title of the supervisor process\n"
" --user -u <user> Drop privileges, run as given user\n"
@@ -198,6 +206,13 @@ main(int argc, char *argv[])
case 'c':
state.keep_cur_workdir = 0;
break;
+ case 'C':
+ state.restart_count = (int)strtonum(optarg, 0,
+ MAX_RESTART_COUNT, &e);
+ if (e != NULL) {
+ errx(6, "invalid restart count: %s", e);
+ }
+ break;
case 'f':
state.keep_fds_open = 0;
break;
@@ -331,6 +346,12 @@ main(int argc, char *argv[])
state.mode = MODE_SUPERVISE;
daemon_eventloop(&state);
daemon_sleep(&state);
+ if (state.restart_enabled && state.restart_count > -1) {
+ if (state.restarted_count >= state.restart_count) {
+ state.restart_enabled = false;
+ }
+ state.restarted_count++;
+ }
} while (state.restart_enabled);
daemon_terminate(&state);
@@ -723,6 +744,8 @@ daemon_state_init(struct daemon_state *state)
.keep_fds_open = 1,
.output_fd = -1,
.output_filename = NULL,
+ .restart_count = -1,
+ .restarted_count = 0
};
}
diff --git a/usr.sbin/extattrctl/extattrctl.8 b/usr.sbin/extattrctl/extattrctl.8
index 845929ac9ed2..ea5f69c61126 100644
--- a/usr.sbin/extattrctl/extattrctl.8
+++ b/usr.sbin/extattrctl/extattrctl.8
@@ -165,7 +165,7 @@ Disable the attribute named md5 on the root file system.
.Pp
Stop extended attributes on the root file system.
.Sh SEE ALSO
-.Xr ffs 7 ,
+.Xr ffs 4 ,
.Xr getextattr 8 ,
.Xr setextattr 8 ,
.Xr extattr 9
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 9f5eaebfd64a..1456601edf26 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -667,7 +667,7 @@ upgrade_check_kmod_ports() {
local report
local w
- if ! command -v pkg >/dev/null; then
+ if ! pkg -N 2>/dev/null; then
echo "Skipping kernel modules check. pkg(8) not present."
return
fi
@@ -1105,10 +1105,10 @@ IDS_check_params () {
# a useful answer, use the server name specified by the user.
# Put another way... look up _http._tcp.${SERVERNAME} and pick a server
# from that; or if no servers are returned, use ${SERVERNAME}.
-# This allows a user to specify "portsnap.freebsd.org" (in which case
-# portsnap will select one of the mirrors) or "portsnap5.tld.freebsd.org"
-# (in which case portsnap will use that particular server, since there
-# won't be an SRV entry for that name).
+# This allows a user to specify "update.FreeBSD.org" (in which case
+# freebsd-update will select one of the mirrors) or "update1.freebsd.org"
+# (in which case freebsd-update will use that particular server, since
+# there won't be an SRV entry for that name).
#
# We ignore the Port field, since we are always going to use port 80.
diff --git a/usr.sbin/fstyp/fstyp.8 b/usr.sbin/fstyp/fstyp.8
index 8471bc207e3c..9ab920073867 100644
--- a/usr.sbin/fstyp/fstyp.8
+++ b/usr.sbin/fstyp/fstyp.8
@@ -112,8 +112,8 @@ utility exits 0 on success, and >0 if an error occurs or the filesystem
type is not recognized.
.Sh SEE ALSO
.Xr file 1 ,
+.Xr autofs 4 ,
.Xr capsicum 4 ,
-.Xr autofs 5 ,
.Xr geli 8 ,
.Xr glabel 8 ,
.Xr mount 8 ,
diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile
index 66b3901e4a91..6c500dae6df6 100644
--- a/usr.sbin/fwget/pci/Makefile
+++ b/usr.sbin/fwget/pci/Makefile
@@ -1,6 +1,7 @@
PACKAGE= fwget
SCRIPTS=pci \
+ pci_network_intel \
pci_network_mediatek \
pci_network_qca \
pci_network_realtek \
diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci
index 6a66049842e2..fbdfa0001c5c 100644
--- a/usr.sbin/fwget/pci/pci
+++ b/usr.sbin/fwget/pci/pci
@@ -107,7 +107,7 @@ pci_search_packages()
fi
. ${LIBEXEC_PATH}/pci_${class}_${vendor}
- pci_${class}_${vendor} ${device}
+ pci_${class}_${vendor} ${device} "${fulldevice}"
done
IFS=${oldifs}
}
diff --git a/usr.sbin/fwget/pci/pci_network_intel b/usr.sbin/fwget/pci/pci_network_intel
new file mode 100644
index 000000000000..cf8c52075db3
--- /dev/null
+++ b/usr.sbin/fwget/pci/pci_network_intel
@@ -0,0 +1,437 @@
+#-
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2024 The FreeBSD Foundation
+#
+# This software was developed by Björn Zeeb
+# under sponsorship from the FreeBSD Foundation.
+#
+
+# Some iwlwifi chipsets are detected by other means and we cannot replicate
+# the full logic here.
+# Currently we also filter out all those which do have a wildcard device ID
+# as well as all for those which exists no firmware (yet).
+
+# iwlwifi (dynamic)
+pci_network_intel_iwlwifi()
+{
+
+ local idstr=$(echo $2 | sed 's,.*\ device=\(0x[0-9a-z]*\) subvendor=\(0x[0-9a-z]*\) subdevice=\(0x[0-9a-z]*\),\1/\2/\3,')
+
+ case "${idstr}" in
+
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh }
+ ### >>>
+
+ # 7000
+ 0x08b1/*/0x4a6c) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4a6e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4a70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4c60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4c70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x402a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x406a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x446a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x486e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x4870) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x5070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x5072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x5170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0x5770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc02a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc06a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc760) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xc770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xcc60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b1/*/0xcc70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x426a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0x4370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc26a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b2/*/0xc370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x0472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x1070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x1170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b3/*/0x8570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b4/*/0x0270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b4/*/0x0272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b4/*/0x0370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b4/*/0x8270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b4/*/0x8272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x08b4/*/0x8370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x24fb/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x24fb/*/0x2010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x24fb/*/0x2050) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x24fb/*/0x2110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x24fb/*/0x2150) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5c10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5f10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9e10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x500a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x502a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x900a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5002) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5090) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5100) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5102) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5190) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5412) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5490) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x5590) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9112) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095a/*/0x9510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x520a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5202) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5290) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5302) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x5310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x9200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x9210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x095b/*/0x9310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x4012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x4110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x4410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x4510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3165/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3166/*/0x4210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3166/*/0x4212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+ 0x3166/*/0x4310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;;
+
+ # 8000
+ 0x24f3/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x01f0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0004) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x10b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0044) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0250) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x1150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x8132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x8150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x9050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x9130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x9132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0x9150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xb0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xc010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xc050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xc110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xd0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xd010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f3/*/0xd050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f4/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f4/*/0x1030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f4/*/0x8030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f4/*/0x9030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f4/*/0xc030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f4/*/0xd030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f5/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24f6/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x3e01) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x3e02) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x10d0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x1014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x9074) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+ 0x24fd/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;;
+
+ # 9000
+ 0x9df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+ 0x30dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+ 0x31dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+ 0x271b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+ 0x271c/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+ 0x2526/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+ 0xa370/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;;
+
+ # 22000
+ 0x02f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x02f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x3df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x4df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x06f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x34f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x43f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x2723/*/0x1653) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x2723/*/0x1654) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0x2723/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+ 0xa0f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;;
+
+ # ax210
+ 0x7a70/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7a70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7af0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7e40/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7e40/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7e40/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7e40/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7e40/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7f70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7f70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x7f70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f1/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f1/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f1/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x51f1/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x54f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x54f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x54f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x54f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x54f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x0020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x0024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x1673) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x1674) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x2020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x6020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0x6024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0xe020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/0xe024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2725/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2726/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2726/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+ 0x2729/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;;
+
+ # bz
+ 0x272b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;;
+ 0x272d/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;;
+ 0x2727/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;;
+ 0x7740/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;;
+ 0xa840/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;;
+
+ # sc
+ 0x6e70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;;
+ 0xd340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;;
+ 0xe340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;;
+ 0xe440/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;;
+
+ ### <<<
+
+ esac
+}
+
+pci_network_intel()
+{
+
+ for _drv in iwlwifi; do
+ pci_network_intel_${_drv} "$1" "$2"
+ case $? in
+ 1) break ;;
+ esac
+ done
+}
diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek
index 5e4d2af9eb26..3ed6c8b95b47 100644
--- a/usr.sbin/fwget/pci/pci_network_mediatek
+++ b/usr.sbin/fwget/pci/pci_network_mediatek
@@ -2,6 +2,10 @@
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright 2023 Bjoern A. Zeeb
+# Copyright (c) 2024 The FreeBSD Foundation
+#
+# Portions of this software were developed by Björn Zeeb
+# under sponsorship from the FreeBSD Foundation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -25,45 +29,38 @@
# SUCH DAMAGE.
#
-# mt7915
-pci_network_mediatek_mt7915()
+pci_network_mediatek_mt76()
{
- # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c
-
case "$1" in
- 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
- 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
- esac
-}
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh }
+ ### >>>
-# mt7921
-pci_network_mediatek_mt7921()
-{
+ 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
+ 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
+ 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
+ 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
+ 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
+ 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
+ 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
+ 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
+ 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
+ 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
+ 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
+ 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
+ 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
+ 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
- # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c
- case "$1" in
- 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
- 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
- 0x0608) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
- 0x0616) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
- esac
-}
-
-# mt7996
-pci_network_mediatek_mt7996()
-{
-
- # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c
- case "$1" in
- 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;;
+ ### <<<
esac
}
pci_network_mediatek()
{
- for _drv in mt7915 mt7921 mt7996; do
+ for _drv in mt76; do
pci_network_mediatek_${_drv} "$1"
case $? in
1) break ;;
diff --git a/usr.sbin/fwget/pci/pci_network_qca b/usr.sbin/fwget/pci/pci_network_qca
index cf33e0d87239..a97d29ef1135 100644
--- a/usr.sbin/fwget/pci/pci_network_qca
+++ b/usr.sbin/fwget/pci/pci_network_qca
@@ -29,18 +29,27 @@
pci_network_qca_ath10k()
{
- # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath10k-kmod\"; return 1 ;;\n", tolower($3) }' hw.h
- # We ignore the ubiquity entry for now.
case "$1" in
- 0x003c) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0041) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x003e) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0040) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0056) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0046) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
- 0x0050) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;;
+
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh }
+ ### >>>
+
+ 0x003c) addpkg "wifi-firmware-ath10k-kmod-qca988x_hw20"; return 1 ;;
+ 0x003e) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"
+ addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30"
+ return 1 ;;
+ 0x0040) addpkg "wifi-firmware-ath10k-kmod-qca99x0_hw20"; return 1 ;;
+ 0x0041) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"; return 1 ;;
+ 0x0042) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30"
+ addpkg "wifi-firmware-ath10k-kmod-qca9377_hw10"
+ return 1 ;;
+ 0x0046) addpkg "wifi-firmware-ath10k-kmod-qca9984_hw10"; return 1 ;;
+ 0x0050) addpkg "wifi-firmware-ath10k-kmod-qca9887_hw10"; return 1 ;;
+ 0x0056) addpkg "wifi-firmware-ath10k-kmod-qca9888_hw20"; return 1 ;;
+
+ ### <<<
esac
}
@@ -48,31 +57,42 @@ pci_network_qca_ath10k()
pci_network_qca_ath11k()
{
- # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath11k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c
case "$1" in
- 0x1101) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;;
- 0x1104) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;;
- 0x1103) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;;
+
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh }
+ ### >>>
+
+ 0x1101) addpkg "wifi-firmware-ath11k-kmod-qca6390_hw20"; return 1 ;;
+ 0x1103) addpkg "wifi-firmware-ath11k-kmod-wcn6855_hw20"; return 1 ;;
+ 0x1104) addpkg "wifi-firmware-ath11k-kmod-qcn9074_hw10"; return 1 ;;
+
+ ### <<<
esac
}
# ath12k
pci_network_qca_ath12k()
{
- # No ath12k firmware package yet
- return 0
- # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath12k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c
case "$1" in
- 0x1109) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;;
- 0x1107) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;;
+
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh }
+ ### >>>
+
+ 0x1107) addpkg "wifi-firmware-ath12k-kmod-wcn7850_hw20"; return 1 ;;
+
+ ### <<<
esac
}
pci_network_qca()
{
- for _drv in ath10k ath11k; do
+ for _drv in ath10k ath11k ath12k; do
pci_network_qca_${_drv} "$1"
case $? in
1) break ;;
diff --git a/usr.sbin/fwget/pci/pci_network_realtek b/usr.sbin/fwget/pci/pci_network_realtek
index 795d9d4a6e0a..d70470b65244 100644
--- a/usr.sbin/fwget/pci/pci_network_realtek
+++ b/usr.sbin/fwget/pci/pci_network_realtek
@@ -2,6 +2,10 @@
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright 2023 Bjoern A. Zeeb
+# Copyright (c) 2024 The FreeBSD Foundation
+#
+# Portions of this software were developed by Björn Zeeb
+# under sponsorship from the FreeBSD Foundation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -29,14 +33,21 @@
pci_network_realtek_rtw88()
{
- # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw88-kmod\"; return 1 ;;\n", tolower($2) }' *.c
case "$1" in
- 0xd723) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;;
- 0xb821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;;
- 0xc821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;;
- 0xb822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;;
- 0xc822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;;
- 0xc82f) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;;
+
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh }
+ ### >>>
+
+ 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;;
+ 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;;
+ 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;;
+ 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;;
+ 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;;
+ 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;;
+
+ ### <<<
esac
}
@@ -44,11 +55,22 @@ pci_network_realtek_rtw88()
pci_network_realtek_rtw89()
{
- # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw89-kmod\"; return 1 ;;\n", tolower($2) }' *.c
- case "$1" in
- 0x8852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;;
- 0xa85a) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;;
- 0xc852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;;
+ case "$1" in
+
+ # The case pattern table below is generated by a script also helping
+ # to generate the flavor/firmware Makefile definitions for ports.
+ # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh }
+ ### >>>
+
+ 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;;
+ 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;;
+ 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;;
+ 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;;
+ 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;;
+ 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;;
+ 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;;
+
+ ### <<<
esac
}
diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8
index d58192623952..407b26df818b 100644
--- a/usr.sbin/jail/jail.8
+++ b/usr.sbin/jail/jail.8
@@ -954,7 +954,7 @@ An
format file containing filesystems to mount before creating a jail.
.It Va mount.devfs
Mount a
-.Xr devfs 5
+.Xr devfs 4
filesystem on the chrooted
.Pa /dev
directory, and apply the ruleset in the
@@ -963,13 +963,13 @@ parameter (or a default of ruleset 4: devfsrules_jail)
to restrict the devices visible inside the jail.
.It Va mount.fdescfs
Mount a
-.Xr fdescfs 5
+.Xr fdescfs 4
filesystem on the chrooted
.Pa /dev/fd
directory.
.It Va mount.procfs
Mount a
-.Xr procfs 5
+.Xr procfs 4
filesystem on the chrooted
.Pa /proc
directory.
@@ -1416,13 +1416,13 @@ environment of the first jail.
.Xr ps 1 ,
.Xr quota 1 ,
.Xr jail_set 2 ,
+.Xr devfs 4 ,
+.Xr fdescfs 4 ,
+.Xr linprocfs 4 ,
+.Xr linsysfs 4 ,
+.Xr procfs 4 ,
.Xr vmm 4 ,
-.Xr devfs 5 ,
-.Xr fdescfs 5 ,
.Xr jail.conf 5 ,
-.Xr linprocfs 5 ,
-.Xr linsysfs 5 ,
-.Xr procfs 5 ,
.Xr rc.conf 5 ,
.Xr sysctl.conf 5 ,
.Xr bsdconfig 8 ,
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index e55165fd0888..4e27febe2164 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -1117,7 +1117,7 @@ get_kbd_type_name(int type)
};
unsigned int i;
- for (i = 0; i < sizeof(name_table)/sizeof(name_table[0]); ++i) {
+ for (i = 0; i < nitems(name_table); ++i) {
if (type == name_table[i].type)
return name_table[i].name;
}
diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c
index c88769ce1824..122551940ac7 100644
--- a/usr.sbin/kldxref/kldxref.c
+++ b/usr.sbin/kldxref/kldxref.c
@@ -745,7 +745,7 @@ usage(void)
}
static int
-#if defined(__GLIBC__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__APPLE__)
compare(const FTSENT **a, const FTSENT **b)
#else
compare(const FTSENT *const *a, const FTSENT *const *b)
diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
index 47d8e6359b73..07dd16536495 100644
--- a/usr.sbin/mixer/mixer.c
+++ b/usr.sbin/mixer/mixer.c
@@ -97,9 +97,9 @@ main(int argc, char *argv[])
if ((n = mixer_get_nmixers()) < 0)
errx(1, "no mixers present in the system");
for (i = 0; i < n; i++) {
- (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i);
+ (void)mixer_get_path(buf, sizeof(buf), i);
if ((m = mixer_open(buf)) == NULL)
- errx(1, "%s: no such mixer", buf);
+ continue;
initctls(m);
if (sflag)
printrecsrc(m, oflag);
diff --git a/usr.sbin/mlx5tool/mlx5tool.8 b/usr.sbin/mlx5tool/mlx5tool.8
index 17f0fd515a50..13c19d2d032b 100644
--- a/usr.sbin/mlx5tool/mlx5tool.8
+++ b/usr.sbin/mlx5tool/mlx5tool.8
@@ -109,7 +109,7 @@ Performs PCIe link-level reset on the specified device.
.Sh FILES
The
.Pa /dev/mlx5ctl
-.Xr devfs 5
+.Xr devfs 4
node is used to pass commands to the driver.
.Sh SEE ALSO
.Xr mlx5en 4 ,
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c
index 201e0b6ce0f6..068919f2e941 100644
--- a/usr.sbin/moused/moused.c
+++ b/usr.sbin/moused/moused.c
@@ -1033,7 +1033,7 @@ moused(void)
bstate[i].count = 0;
bstate[i].ts = mouse_button_state_ts;
}
- for (i = 0; i < (int)(sizeof(zstate) / sizeof(zstate[0])); ++i) {
+ for (i = 0; i < (int)nitems(zstate); ++i) {
zstate[i].count = 0;
zstate[i].ts = mouse_button_state_ts;
}
@@ -1489,7 +1489,7 @@ r_identify(void)
rodent.mode.level = 0;
if (ioctl(rodent.mfd, MOUSE_GETMODE, &rodent.mode) == 0) {
if (rodent.mode.protocol == MOUSE_PROTO_UNKNOWN ||
- rodent.mode.protocol >= (int)(sizeof(proto) / sizeof(proto[0]))) {
+ rodent.mode.protocol >= (int)nitems(proto)) {
logwarnx("unknown mouse protocol (%d)", rodent.mode.protocol);
return (MOUSE_PROTO_UNKNOWN);
} else {
@@ -1564,8 +1564,7 @@ r_name(int type)
{
const char *unknown = "unknown";
- return (type == MOUSE_PROTO_UNKNOWN ||
- type >= (int)(sizeof(rnames) / sizeof(rnames[0])) ?
+ return (type == MOUSE_PROTO_UNKNOWN || type >= (int)nitems(rnames) ?
unknown : rnames[type]);
}
diff --git a/usr.sbin/mptutil/mptutil.8 b/usr.sbin/mptutil/mptutil.8
index 47eb9e43d2b9..1aeaafbfa12e 100644
--- a/usr.sbin/mptutil/mptutil.8
+++ b/usr.sbin/mptutil/mptutil.8
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 24, 2024
+.Dd May 24, 2023
.Dt MPTUTIL 8
.Os
.Sh NAME
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index 9d9ae02dc1e2..dcb3b5e3571b 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -1171,7 +1171,7 @@ rtrlist(void)
size_t l;
struct timeval now;
- if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) {
+ if (sysctl(mib, nitems(mib), NULL, &l, NULL, 0) < 0) {
xo_err(1, "sysctl(ICMPV6CTL_ND6_DRLIST)");
/*NOTREACHED*/
}
@@ -1182,7 +1182,7 @@ rtrlist(void)
xo_err(1, "malloc");
/*NOTREACHED*/
}
- if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &l, NULL, 0) < 0) {
+ if (sysctl(mib, nitems(mib), buf, &l, NULL, 0) < 0) {
xo_err(1, "sysctl(ICMPV6CTL_ND6_DRLIST)");
/*NOTREACHED*/
}
@@ -1257,7 +1257,7 @@ plist(void)
int ninflags = opts.nflag ? NI_NUMERICHOST : 0;
char namebuf[NI_MAXHOST];
- if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) {
+ if (sysctl(mib, nitems(mib), NULL, &l, NULL, 0) < 0) {
xo_err(1, "sysctl(ICMPV6CTL_ND6_PRLIST)");
/*NOTREACHED*/
}
@@ -1266,7 +1266,7 @@ plist(void)
xo_err(1, "malloc");
/*NOTREACHED*/
}
- if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &l, NULL, 0) < 0) {
+ if (sysctl(mib, nitems(mib), buf, &l, NULL, 0) < 0) {
xo_err(1, "sysctl(ICMPV6CTL_ND6_PRLIST)");
/*NOTREACHED*/
}
diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5
index 120c5a0cb7cc..9f229bc04402 100644
--- a/usr.sbin/newsyslog/newsyslog.conf.5
+++ b/usr.sbin/newsyslog/newsyslog.conf.5
@@ -330,7 +330,7 @@ to use
.It Cm N
indicates that there is no process which needs to be signaled
when this log file is rotated.
-.It Cm p
+.It Cm P
indicates that the zero-th rotated file should not be compressed.
.It Cm R
if this flag is set the
diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h
index 97c46aaf1dab..3d6a1364dd10 100644
--- a/usr.sbin/ntp/config.h
+++ b/usr.sbin/ntp/config.h
@@ -172,12 +172,7 @@
/* Zyfer GPStarplus */
#define CLOCK_ZYFER 1
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
/* #undef C_ALLOCA */
/* Enable debugging code? */
@@ -265,7 +260,7 @@
/* #undef DECL_STRTOL_0 */
/* Declare syscall()? */
-/* #undef DECL_SYSCALL */
+#define DECL_SYSCALL 1
/* Declaration style */
/* #undef DECL_SYSLOG_0 */
@@ -297,6 +292,12 @@
/* use old autokey session key behavior? */
/* #undef DISABLE_BUG1243_FIX */
+/* use old autokey session key behavior? */
+/* #undef DISABLE_BUG3527_FIX */
+
+/* Disable debug assertion on OOB KoD RATE value? */
+/* #undef DISABLE_BUG3767_FIX */
+
/* synch TODR hourly? */
/* #undef DOSYNCTODR */
@@ -315,6 +316,9 @@
/* Enable CMAC support? */
#define ENABLE_CMAC 1
+/* auto-instantiate missing PPS devices on Linux */
+#define ENABLE_MAGICPPS 1
+
/* nls support in libopts */
/* #undef ENABLE_NLS */
@@ -330,20 +334,19 @@
/* via __adjtimex */
/* #undef HAVE_ADJTIMEX */
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define to 1 if you have 'alloca', as a function or macro. */
#define HAVE_ALLOCA 1
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
+/* Define to 1 if <alloca.h> works. */
/* #undef HAVE_ALLOCA_H */
-/* Define to 1 if you have the `arc4random_buf' function. */
+/* Define to 1 if you have the 'arc4random_buf' function. */
#define HAVE_ARC4RANDOM_BUF 1
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#define HAVE_ARPA_NAMESER_H 1
-/* Define to 1 if you have the `atomic_thread_fence' function. */
+/* Define to 1 if you have the 'atomic_thread_fence' function. */
/* #undef HAVE_ATOMIC_THREAD_FENCE */
/* Do we have audio support? */
@@ -352,43 +355,46 @@
/* Define to 1 if you have the <bstring.h> header file. */
/* #undef HAVE_BSTRING_H */
-/* Define to 1 if you have the `canonicalize_file_name' function. */
+/* Define to 1 if you have the 'canonicalize_file_name' function. */
/* #undef HAVE_CANONICALIZE_FILE_NAME */
-/* Define to 1 if you have the `chmod' function. */
+/* Define to 1 if you have the 'chmod' function. */
#define HAVE_CHMOD 1
/* Do we have the CIOGETEV ioctl (SunOS, Linux)? */
/* #undef HAVE_CIOGETEV */
-/* Define to 1 if you have the `clock_getres' function. */
+/* Define to 1 if you have the 'clock_getres' function. */
#define HAVE_CLOCK_GETRES 1
-/* Define to 1 if you have the `clock_gettime' function. */
+/* Define to 1 if you have the 'clock_gettime' function. */
#define HAVE_CLOCK_GETTIME 1
-/* Define to 1 if you have the `clock_settime' function. */
+/* Define to 1 if you have the 'clock_settime' function. */
#define HAVE_CLOCK_SETTIME 1
+/* Define to 1 if you have the 'closefrom' function. */
+#define HAVE_CLOSEFROM 1
+
/* Define to 1 if you have the <cthreads.h> header file. */
/* #undef HAVE_CTHREADS_H */
-/* Define to 1 if you have the `daemon' function. */
+/* Define to 1 if you have the 'daemon' function. */
#define HAVE_DAEMON 1
-/* Define to 1 if you have the declaration of `siglongjmp', and to 0 if you
+/* Define to 1 if you have the declaration of 'siglongjmp', and to 0 if you
don't. */
#define HAVE_DECL_SIGLONGJMP 1
-/* Define to 1 if you have the declaration of `sigsetjmp', and to 0 if you
+/* Define to 1 if you have the declaration of 'sigsetjmp', and to 0 if you
don't. */
#define HAVE_DECL_SIGSETJMP 1
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+/* Define to 1 if you have the declaration of 'strerror_r', and to 0 if you
don't. */
#define HAVE_DECL_STRERROR_R 1
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
*/
#define HAVE_DIRENT_H 1
@@ -398,58 +404,67 @@
/* Use Rendezvous/DNS-SD registration */
/* #undef HAVE_DNSREGISTRATION */
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* Define to 1 if you don't have 'vprintf' but do have '_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Can we drop root privileges? */
-#define HAVE_DROPROOT
+#define HAVE_DROPROOT 1
/* Define to 1 if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
-/* Define to 1 if you have the `EVP_MD_do_all_sorted' function. */
+/* Define to 1 if you have the 'EVP_MD_do_all_sorted' function. */
#define HAVE_EVP_MD_DO_ALL_SORTED 1
-/* Define to 1 if you have the `fchmod' function. */
+/* Define to 1 if you have the 'fchmod' function. */
#define HAVE_FCHMOD 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
-/* Define to 1 if you have the `finite' function. */
+/* Define to 1 if you have the 'fdopendir' function. */
+#define HAVE_FDOPENDIR 1
+
+/* Define to 1 if you have the 'finite' function. */
/* #undef HAVE_FINITE */
-/* Define to 1 if you have the `fnmatch' function. */
+/* Define to 1 if you have the 'fnmatch' function. */
#define HAVE_FNMATCH 1
/* Define to 1 if you have the <fnmatch.h> header file. */
#define HAVE_FNMATCH_H 1
-/* Define to 1 if you have the `fork' function. */
+/* Define to 1 if you have the 'fork' function. */
#define HAVE_FORK 1
-/* Define to 1 if you have the `fstat' function. */
+/* Define to 1 if you have the 'fstat' function. */
#define HAVE_FSTAT 1
-/* Define to 1 if you have the `getbootfile' function. */
+/* Define to 1 if you have the 'fstatat' function. */
+#define HAVE_FSTATAT 1
+
+/* Define to 1 if we have realpath() that supports NULL as the 2nd argument */
+#define HAVE_FUNC_POSIX_REALPATH 1
+
+/* Define to 1 if you have the 'getbootfile' function. */
#define HAVE_GETBOOTFILE 1
-/* Define to 1 if you have the `getclock' function. */
+/* Define to 1 if you have the 'getclock' function. */
/* #undef HAVE_GETCLOCK */
-/* Define to 1 if you have the `getdtablesize' function. */
+/* Define to 1 if you have the 'getdtablesize' function. */
#define HAVE_GETDTABLESIZE 1
-/* Define to 1 if you have the `getifaddrs' function. */
+/* Define to 1 if you have the 'getifaddrs' function. */
#define HAVE_GETIFADDRS 1
-/* Define to 1 if you have the `getpassphrase' function. */
+/* Define to 1 if you have the 'getpassphrase' function. */
/* #undef HAVE_GETPASSPHRASE */
-/* Define to 1 if you have the `getrusage' function. */
+/* Define to 1 if you have the 'getrusage' function. */
#define HAVE_GETRUSAGE 1
-/* Define to 1 if you have the `getuid' function. */
+/* Define to 1 if you have the 'getuid' function. */
#define HAVE_GETUID 1
/* if you have GNU Pth */
@@ -470,52 +485,49 @@
/* have iflist_sysctl? */
#define HAVE_IFLIST_SYSCTL 1
-/* Define to 1 if you have the `if_nametoindex' function. */
+/* Define to 1 if you have the 'if_nametoindex' function. */
#define HAVE_IF_NAMETOINDEX 1
/* inline keyword or macro available */
#define HAVE_INLINE 1
-/* Define to 1 if the system has the type `int16_t'. */
+/* Define to 1 if the system has the type 'int16_t'. */
#define HAVE_INT16_T 1
-/* Define to 1 if the system has the type `int32'. */
+/* Define to 1 if the system has the type 'int32'. */
/* #undef HAVE_INT32 */
-/* int32 type in DNS headers, not others. */
-/* #undef HAVE_INT32_ONLY_WITH_DNS */
-
-/* Define to 1 if the system has the type `int32_t'. */
+/* Define to 1 if the system has the type 'int32_t'. */
#define HAVE_INT32_T 1
-/* Define to 1 if the system has the type `int8_t'. */
+/* Define to 1 if the system has the type 'int8_t'. */
#define HAVE_INT8_T 1
-/* Define to 1 if the system has the type `intmax_t'. */
+/* Define to 1 if the system has the type 'intmax_t'. */
/* #undef HAVE_INTMAX_T */
-/* Define to 1 if the system has the type `intptr_t'. */
+/* Define to 1 if the system has the type 'intptr_t'. */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
-/* Define to 1 if you have the `isfinite' function. */
+/* Define to 1 if you have the 'isfinite' function. */
#define HAVE_ISFINITE 1
/* Define to 1 if you have the <kvm.h> header file. */
#define HAVE_KVM_H 1
-/* Define to 1 if you have the `kvm_open' function. */
+/* Define to 1 if you have the 'kvm_open' function. */
/* #undef HAVE_KVM_OPEN */
-/* Define to 1 if you have the `gen' library (-lgen). */
+/* Define to 1 if you have the 'gen' library (-lgen). */
/* #undef HAVE_LIBGEN */
/* Define to 1 if you have the <libgen.h> header file. */
#define HAVE_LIBGEN_H 1
-/* Define to 1 if you have the `intl' library (-lintl). */
+/* Define to 1 if you have the 'intl' library (-lintl). */
/* #undef HAVE_LIBINTL */
/* Define to 1 if you have the <libintl.h> header file. */
@@ -539,19 +551,19 @@
/* if you have LinuxThreads */
/* #undef HAVE_LINUX_THREADS */
-/* Define to 1 if you have the `localeconv' function. */
+/* Define to 1 if you have the 'localeconv' function. */
/* #undef HAVE_LOCALECONV */
/* Define to 1 if you have the <locale.h> header file. */
/* #undef HAVE_LOCALE_H */
-/* Define to 1 if the system has the type `long double'. */
+/* Define to 1 if the system has the type 'long double'. */
/* #undef HAVE_LONG_DOUBLE */
-/* Define to 1 if the system has the type `long long'. */
+/* Define to 1 if the system has the type 'long long'. */
#define HAVE_LONG_LONG 1
-/* Define to 1 if the system has the type `long long int'. */
+/* Define to 1 if the system has the type 'long long int'. */
/* #undef HAVE_LONG_LONG_INT */
/* if you have SunOS LWP package */
@@ -575,34 +587,40 @@
/* Define to 1 if you have the <math.h> header file. */
#define HAVE_MATH_H 1
-/* Define to 1 if you have the `MD5Init' function. */
+/* Define to 1 if you have the 'MD5Init' function. */
#define HAVE_MD5INIT 1
/* Define to 1 if you have the <md5.h> header file. */
#define HAVE_MD5_H 1
-/* Define to 1 if you have the `memlk' function. */
+/* Define to 1 if you have the 'memchr' function. */
+#define HAVE_MEMCHR 1
+
+/* Define to 1 if you have the 'memlk' function. */
/* #undef HAVE_MEMLK */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
-/* Define to 1 if you have the `mkstemp' function. */
+/* Define to 1 if you have the <minix/config.h> header file. */
+/* #undef HAVE_MINIX_CONFIG_H */
+
+/* Define to 1 if you have the 'mkstemp' function. */
#define HAVE_MKSTEMP 1
-/* Define to 1 if you have the `mktime' function. */
+/* Define to 1 if you have the 'mktime' function. */
#define HAVE_MKTIME 1
-/* Define to 1 if you have the `mlockall' function. */
+/* Define to 1 if you have the 'mlockall' function. */
#define HAVE_MLOCKALL 1
-/* Define to 1 if you have the `mmap' function. */
+/* Define to 1 if you have the 'mmap' function. */
#define HAVE_MMAP 1
-/* Define to 1 if you have the `nanosleep' function. */
+/* Define to 1 if you have the 'nanosleep' function. */
#define HAVE_NANOSLEEP 1
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* Define to 1 if you have the <ndir.h> header file, and it defines 'DIR'. */
/* #undef HAVE_NDIR_H */
/* Define to 1 if you have the <netdb.h> header file. */
@@ -641,7 +659,7 @@
/* Define to 1 if you have the <net/route.h> header file. */
#define HAVE_NET_ROUTE_H 1
-/* Define to 1 if you have the `nice' function. */
+/* Define to 1 if you have the 'nice' function. */
#define HAVE_NICE 1
/* Define to 1 if you have the <nlist.h> header file. */
@@ -665,16 +683,16 @@
/* if you have NT Threads */
/* #undef HAVE_NT_THREADS */
+/* Define to 1 if you have the 'openat' function. */
+#define HAVE_OPENAT 1
+
/* Define to 1 if you have the <openssl/cmac.h> header file. */
#define HAVE_OPENSSL_CMAC_H 1
-/* Define to 1 if you have the <openssl/hmac.h> header file. */
-#define HAVE_OPENSSL_HMAC_H 1
-
-/* Define to 1 if the system has the type `pid_t'. */
+/* Define to 1 if the system has the type 'pid_t'. */
#define HAVE_PID_T 1
-/* Define to 1 if you have the `plock' function. */
+/* Define to 1 if you have the 'plock' function. */
/* #undef HAVE_PLOCK */
/* Define to 1 if you have the <poll.h> header file. */
@@ -692,52 +710,52 @@
/* define to pthreads API spec revision */
#define HAVE_PTHREADS 10
-/* Define to 1 if you have the `pthread_attr_getstacksize' function. */
+/* Define to 1 if you have the 'pthread_attr_getstacksize' function. */
#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
-/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
+/* Define to 1 if you have the 'pthread_attr_setstacksize' function. */
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
/* define if you have pthread_detach function */
#define HAVE_PTHREAD_DETACH 1
-/* Define to 1 if you have the `pthread_getconcurrency' function. */
+/* Define to 1 if you have the 'pthread_getconcurrency' function. */
#define HAVE_PTHREAD_GETCONCURRENCY 1
/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1
-/* Define to 1 if you have the `pthread_kill' function. */
+/* Define to 1 if you have the 'pthread_kill' function. */
#define HAVE_PTHREAD_KILL 1
-/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */
+/* Define to 1 if you have the 'pthread_kill_other_threads_np' function. */
/* #undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP */
/* define if you have pthread_rwlock_destroy function */
#define HAVE_PTHREAD_RWLOCK_DESTROY 1
-/* Define to 1 if you have the `pthread_setconcurrency' function. */
+/* Define to 1 if you have the 'pthread_setconcurrency' function. */
#define HAVE_PTHREAD_SETCONCURRENCY 1
-/* Define to 1 if you have the `pthread_yield' function. */
+/* Define to 1 if you have the 'pthread_yield' function. */
#define HAVE_PTHREAD_YIELD 1
/* Define to 1 if you have the <pth.h> header file. */
/* #undef HAVE_PTH_H */
-/* Define to 1 if the system has the type `ptrdiff_t'. */
+/* Define to 1 if the system has the type 'ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1
-/* Define to 1 if you have the `pututline' function. */
+/* Define to 1 if you have the 'pututline' function. */
/* #undef HAVE_PUTUTLINE */
-/* Define to 1 if you have the `pututxline' function. */
+/* Define to 1 if you have the 'pututxline' function. */
#define HAVE_PUTUTXLINE 1
-/* Define to 1 if you have the `RAND_bytes' function. */
+/* Define to 1 if you have the 'RAND_bytes' function. */
#define HAVE_RAND_BYTES 1
-/* Define to 1 if you have the `RAND_poll' function. */
+/* Define to 1 if you have the 'RAND_poll' function. */
#define HAVE_RAND_POLL 1
/* Define to 1 if you have the <readline.h> header file. */
@@ -752,22 +770,22 @@
/* Define to 1 if you have the <readline/readline.h> header file. */
#define HAVE_READLINE_READLINE_H 1
-/* Define to 1 if you have the `readlink' function. */
+/* Define to 1 if you have the 'readlink' function. */
#define HAVE_READLINK 1
-/* Define to 1 if you have the `recvmsg' function. */
+/* Define to 1 if you have the 'recvmsg' function. */
#define HAVE_RECVMSG 1
/* Define to 1 if you have the <resolv.h> header file. */
#define HAVE_RESOLV_H 1
-/* Define to 1 if you have the `res_init' function. */
+/* Define to 1 if you have the 'res_init' function. */
#define HAVE_RES_INIT 1
/* Do we have Linux routing socket? */
/* #undef HAVE_RTNETLINK */
-/* Define to 1 if you have the `rtprio' function. */
+/* Define to 1 if you have the 'rtprio' function. */
#define HAVE_RTPRIO 1
/* Define to 1 if you have the <runetype.h> header file. */
@@ -779,70 +797,70 @@
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
-/* Define to 1 if you have the `sched_setscheduler' function. */
+/* Define to 1 if you have the 'sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
-/* Define to 1 if you have the `sched_yield' function. */
+/* Define to 1 if you have the 'sched_yield' function. */
#define HAVE_SCHED_YIELD 1
/* Define to 1 if you have the <semaphore.h> header file. */
#define HAVE_SEMAPHORE_H 1
-/* Define to 1 if you have the `sem_timedwait' function. */
+/* Define to 1 if you have the 'sem_timedwait' function. */
#define HAVE_SEM_TIMEDWAIT 1
/* Define to 1 if you have the <setjmp.h> header file. */
#define HAVE_SETJMP_H 1
-/* Define to 1 if you have the `setlinebuf' function. */
+/* Define to 1 if you have the 'setlinebuf' function. */
#define HAVE_SETLINEBUF 1
-/* Define to 1 if you have the `setpgid' function. */
+/* Define to 1 if you have the 'setpgid' function. */
#define HAVE_SETPGID 1
/* define if setpgrp takes 0 arguments */
/* #undef HAVE_SETPGRP_0 */
-/* Define to 1 if you have the `setpriority' function. */
+/* Define to 1 if you have the 'setpriority' function. */
#define HAVE_SETPRIORITY 1
-/* Define to 1 if you have the `setrlimit' function. */
+/* Define to 1 if you have the 'setrlimit' function. */
#define HAVE_SETRLIMIT 1
-/* Define to 1 if you have the `setsid' function. */
+/* Define to 1 if you have the 'setsid' function. */
#define HAVE_SETSID 1
-/* Define to 1 if you have the `settimeofday' function. */
+/* Define to 1 if you have the 'settimeofday' function. */
#define HAVE_SETTIMEOFDAY 1
-/* Define to 1 if you have the `setvbuf' function. */
+/* Define to 1 if you have the 'setvbuf' function. */
#define HAVE_SETVBUF 1
/* Define to 1 if you have the <sgtty.h> header file. */
/* #undef HAVE_SGTTY_H */
-/* Define to 1 if you have the `sigaction' function. */
+/* Define to 1 if you have the 'sigaction' function. */
#define HAVE_SIGACTION 1
/* Can we use SIGIO for tcp and udp IO? */
/* #undef HAVE_SIGNALED_IO */
-/* Define to 1 if you have the `sigset' function. */
+/* Define to 1 if you have the 'sigset' function. */
#define HAVE_SIGSET 1
-/* Define to 1 if you have the `sigvec' function. */
+/* Define to 1 if you have the 'sigvec' function. */
#define HAVE_SIGVEC 1
/* sigwait() available? */
#define HAVE_SIGWAIT 1
-/* Define to 1 if the system has the type `size_t'. */
+/* Define to 1 if the system has the type 'size_t'. */
#define HAVE_SIZE_T 1
/* Define if C99-compliant `snprintf' is available. */
#define HAVE_SNPRINTF 1
-/* Define to 1 if you have the `socketpair' function. */
+/* Define to 1 if you have the 'socketpair' function. */
#define HAVE_SOCKETPAIR 1
/* Are Solaris privileges available? */
@@ -863,22 +881,25 @@
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define to 1 if you have the `stime' function. */
+/* Define to 1 if you have the 'stime' function. */
/* #undef HAVE_STIME */
-/* Define to 1 if you have the `strchr' function. */
+/* Define to 1 if you have the 'strchr' function. */
#define HAVE_STRCHR 1
-/* Define to 1 if you have the `strdup' function. */
+/* Define to 1 if you have the 'strdup' function. */
#define HAVE_STRDUP 1
-/* Define to 1 if you have the `strerror' function. */
+/* Define to 1 if you have the 'strerror' function. */
#define HAVE_STRERROR 1
-/* Define to 1 if you have the `strerror_r' function. */
+/* Define if you have 'strerror_r'. */
#define HAVE_STRERROR_R 1
/* Define to 1 if you have the <strings.h> header file. */
@@ -887,34 +908,37 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the `strlcat' function. */
+/* Define to 1 if you have the 'strlcat' function. */
#define HAVE_STRLCAT 1
-/* Define to 1 if you have the `strlcpy' function. */
+/* Define to 1 if you have the 'strlcpy' function. */
#define HAVE_STRLCPY 1
+/* Define to 1 if you have the 'strnlen' function. */
+#define HAVE_STRNLEN 1
+
/* Define to 1 if you have the <stropts.h> header file. */
/* #undef HAVE_STROPTS_H */
-/* Define to 1 if you have the `strrchr' function. */
+/* Define to 1 if you have the 'strrchr' function. */
#define HAVE_STRRCHR 1
-/* Define to 1 if you have the `strsignal' function. */
+/* Define to 1 if you have the 'strsignal' function. */
#define HAVE_STRSIGNAL 1
-/* Define to 1 if you have the `strtoll' function. */
+/* Define to 1 if you have the 'strtoll' function. */
#define HAVE_STRTOLL 1
-/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
+/* Define to 1 if 'decimal_point' is a member of 'struct lconv'. */
/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */
-/* Define to 1 if `thousands_sep' is a member of `struct lconv'. */
+/* Define to 1 if 'thousands_sep' is a member of 'struct lconv'. */
/* #undef HAVE_STRUCT_LCONV_THOUSANDS_SEP */
/* Do we have struct ntptimeval? */
#define HAVE_STRUCT_NTPTIMEVAL 1
-/* Define to 1 if `time.tv_nsec' is a member of `struct ntptimeval'. */
+/* Define to 1 if 'time.tv_nsec' is a member of 'struct ntptimeval'. */
#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1
/* Does a system header define struct ppsclockev? */
@@ -935,13 +959,13 @@
/* Define to 1 if you have the <synch.h> header file. */
/* #undef HAVE_SYNCH_H */
-/* Define to 1 if you have the `sysconf' function. */
+/* Define to 1 if you have the 'sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sysexits.h> header file. */
#define HAVE_SYSEXITS_H 1
-/* */
+/* syslog.h provides facilitynames */
#define HAVE_SYSLOG_FACILITYNAMES 1
/* Define to 1 if you have the <sys/audioio.h> header file. */
@@ -953,7 +977,7 @@
/* Define to 1 if you have the <sys/clockctl.h> header file. */
/* #undef HAVE_SYS_CLOCKCTL_H */
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines 'DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
@@ -984,7 +1008,7 @@
/* Define to 1 if you have the <sys/modem.h> header file. */
/* #undef HAVE_SYS_MODEM_H */
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines 'DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
@@ -1006,6 +1030,9 @@
/* Define to 1 if you have the <sys/prctl.h> header file. */
/* #undef HAVE_SYS_PRCTL_H */
+/* Define to 1 if you have the <sys/procctl.h> header file. */
+#define HAVE_SYS_PROCCTL_H 1
+
/* Define to 1 if you have the <sys/procset.h> header file. */
/* #undef HAVE_SYS_PROCSET_H */
@@ -1087,7 +1114,7 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
-/* Define to 1 if the system has the type `s_char'. */
+/* Define to 1 if the system has the type 's_char'. */
/* #undef HAVE_S_CHAR */
/* Define to 1 if you have the <termios.h> header file. */
@@ -1102,25 +1129,25 @@
/* Define to 1 if you have the <thread.h> header file. */
/* #undef HAVE_THREAD_H */
-/* Define to 1 if you have the `thr_getconcurrency' function. */
+/* Define to 1 if you have the 'thr_getconcurrency' function. */
/* #undef HAVE_THR_GETCONCURRENCY */
-/* Define to 1 if you have the `thr_setconcurrency' function. */
+/* Define to 1 if you have the 'thr_setconcurrency' function. */
/* #undef HAVE_THR_SETCONCURRENCY */
-/* Define to 1 if you have the `thr_yield' function. */
+/* Define to 1 if you have the 'thr_yield' function. */
/* #undef HAVE_THR_YIELD */
/* Obvious */
#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1
-/* Define to 1 if you have the `timegm' function. */
+/* Define to 1 if you have the 'timegm' function. */
#define HAVE_TIMEGM 1
/* Define to 1 if you have the <timepps.h> header file. */
/* #undef HAVE_TIMEPPS_H */
-/* Define to 1 if you have the `timer_create' function. */
+/* Define to 1 if you have the 'timer_create' function. */
/* #undef HAVE_TIMER_CREATE */
/* Define to 1 if you have the <timex.h> header file. */
@@ -1141,28 +1168,28 @@
/* Are TrustedBSD MAC policy privileges available? */
#define HAVE_TRUSTEDBSD_MAC 1
-/* Define to 1 if the system has the type `uint16_t'. */
+/* Define to 1 if the system has the type 'uint16_t'. */
#define HAVE_UINT16_T 1
-/* Define to 1 if the system has the type `uint32_t'. */
+/* Define to 1 if the system has the type 'uint32_t'. */
#define HAVE_UINT32_T 1
-/* Define to 1 if the system has the type `uint8_t'. */
+/* Define to 1 if the system has the type 'uint8_t'. */
#define HAVE_UINT8_T 1
-/* Define to 1 if the system has the type `uintmax_t'. */
+/* Define to 1 if the system has the type 'uintmax_t'. */
/* #undef HAVE_UINTMAX_T */
-/* Define to 1 if the system has the type `uintptr_t'. */
+/* Define to 1 if the system has the type 'uintptr_t'. */
#define HAVE_UINTPTR_T 1
-/* Define to 1 if the system has the type `uint_t'. */
+/* Define to 1 if the system has the type 'uint_t'. */
/* #undef HAVE_UINT_T */
-/* Define to 1 if you have the `umask' function. */
+/* Define to 1 if you have the 'umask' function. */
#define HAVE_UMASK 1
-/* Define to 1 if you have the `uname' function. */
+/* Define to 1 if you have the 'uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
@@ -1171,13 +1198,13 @@
/* deviant sigwait? */
/* #undef HAVE_UNIXWARE_SIGWAIT */
-/* Define to 1 if the system has the type `unsigned long long int'. */
+/* Define to 1 if the system has the type 'unsigned long long int'. */
#define HAVE_UNSIGNED_LONG_LONG_INT 1
-/* Define to 1 if you have the `updwtmp' function. */
+/* Define to 1 if you have the 'updwtmp' function. */
/* #undef HAVE_UPDWTMP */
-/* Define to 1 if you have the `updwtmpx' function. */
+/* Define to 1 if you have the 'updwtmpx' function. */
/* #undef HAVE_UPDWTMPX */
/* Define to 1 if you have the <utime.h> header file. */
@@ -1189,52 +1216,52 @@
/* Define to 1 if you have the <utmp.h> header file. */
/* #undef HAVE_UTMP_H */
-/* Define to 1 if the system has the type `u_int32'. */
+/* Define to 1 if the system has the type 'u_int32'. */
/* #undef HAVE_U_INT32 */
-/* u_int32 type in DNS headers, not others. */
-/* #undef HAVE_U_INT32_ONLY_WITH_DNS */
-
/* Define to 1 if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define to 1 if you have the <varargs.h> header file. */
/* #undef HAVE_VARARGS_H */
-/* Define to 1 if you have the `vfork' function. */
+/* Define to 1 if you have the 'vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
-/* Define to 1 if you have the `vprintf' function. */
+/* Define to 1 if you have the 'vprintf' function. */
#define HAVE_VPRINTF 1
/* Define if C99-compliant `vsnprintf' is available. */
#define HAVE_VSNPRINTF 1
+/* Define to 1 if you have the 'waitpid' function. */
+#define HAVE_WAITPID 1
+
/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1
-/* Define to 1 if the system has the type `wchar_t'. */
+/* Define to 1 if the system has the type 'wchar_t'. */
#define HAVE_WCHAR_T 1
-/* Define to 1 if the system has the type `wint_t'. */
+/* Define to 1 if the system has the type 'wint_t'. */
#define HAVE_WINT_T 1
-/* Define to 1 if `fork' works. */
+/* Define to 1 if 'fork' works. */
#define HAVE_WORKING_FORK 1
-/* Define to 1 if `vfork' works. */
+/* Define to 1 if 'vfork' works. */
#define HAVE_WORKING_VFORK 1
/* define if select implicitly yields */
#define HAVE_YIELDING_SELECT 1
-/* Define to 1 if the system has the type `_Bool'. */
+/* Define to 1 if the system has the type '_Bool'. */
#define HAVE__BOOL 1
-/* Define to 1 if you have the `_exit' function. */
+/* Define to 1 if you have the '_exit' function. */
#define HAVE__EXIT 1
/* Define to 1 if you have the </sys/sync/queue.h> header file. */
@@ -1243,7 +1270,7 @@
/* Define to 1 if you have the </sys/sync/sema.h> header file. */
/* #undef HAVE__SYS_SYNC_SEMA_H */
-/* Define to 1 if you have the `__adjtimex' function. */
+/* Define to 1 if you have the '__adjtimex' function. */
/* #undef HAVE___ADJTIMEX */
/* defined if C compiler supports __attribute__((...)) */
@@ -1259,10 +1286,10 @@
-/* Define to 1 if you have the `__ntp_gettime' function. */
+/* Define to 1 if you have the '__ntp_gettime' function. */
/* #undef HAVE___NTP_GETTIME */
-/* Define to 1 if you have the `__res_init' function. */
+/* Define to 1 if you have the '__res_init' function. */
/* #undef HAVE___RES_INIT */
/* Does struct sockaddr_storage have __ss_family? */
@@ -1428,10 +1455,10 @@
/* #undef NO_THREADS */
/* Default location of crypto key info */
-#define NTP_KEYSDIR "/etc/ntp"
+#define NTP_KEYSDIR "/usr/local/etc"
/* Path to sign daemon rendezvous socket */
-#define NTP_SIGND_PATH "/var/run/ntp_signd"
+/* #undef NTP_SIGND_PATH */
/* Do we have ntp_{adj,get}time in libc? */
#define NTP_SYSCALLS_LIBC 1
@@ -1442,8 +1469,8 @@
/* Do we have support for SHMEM_STATUS? */
#define ONCORE_SHMEM_STATUS 1
-/* Use OpenSSL? */
-/* #define OPENSSL */
+/* Suppress OpenSSL 3 deprecation warnings */
+#define OPENSSL_SUPPRESS_DEPRECATED 1
/* Should we open the broadcast socket? */
#define OPEN_BCAST_SOCKET 1
@@ -1461,28 +1488,28 @@
#define PACKAGE "ntp"
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "http://bugs.ntp.org./"
+#define PACKAGE_BUGREPORT "https://bugs.ntp.org/"
/* Define to the full name of this package. */
#define PACKAGE_NAME "ntp"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "ntp 4.2.8p17"
+#define PACKAGE_STRING "ntp 4.2.8p18"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ntp"
/* Define to the home page for this package. */
-#define PACKAGE_URL "http://www.ntp.org./"
+#define PACKAGE_URL "https://www.ntp.org/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.2.8p17"
+#define PACKAGE_VERSION "4.2.8p18"
/* data dir */
-#define PERLLIBDIR "/usr/share/ntp/lib"
+#define PERLLIBDIR "/usr/local/share/ntp/lib"
/* define to a working POSIX compliant shell */
-#define POSIX_SHELL "/bin/sh"
+#define POSIX_SHELL "/bin/bash"
/* PARSE kernel PLL PPS support */
/* #undef PPS_SYNC */
@@ -1508,7 +1535,7 @@
/* define if sched_yield yields the entire process */
/* #undef REPLACE_BROKEN_YIELD */
-/* Define as the return type of signal handlers (`int' or `void'). */
+/* Define as the return type of signal handlers ('int' or 'void'). */
#define RETSIGTYPE void
/* saveconfig mechanism */
@@ -1519,12 +1546,12 @@
/* The size of `char *', as computed by sizeof. */
#ifdef __LP64__
-#define SIZEOF_CHARP 8
+#define SIZEOF_CHAR_P 8
#else
-#define SIZEOF_CHARP 4
+#define SIZEOF_CHAR_P 4
#endif
-/* The size of `int', as computed by sizeof. */
+/* The size of 'int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
@@ -1534,16 +1561,16 @@
#define SIZEOF_LONG 4
#endif
-/* The size of `long long', as computed by sizeof. */
+/* The size of 'long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
-/* The size of `pthread_t', as computed by sizeof. */
+/* The size of 'pthread_t', as computed by sizeof. */
#define SIZEOF_PTHREAD_T 8
-/* The size of `short', as computed by sizeof. */
+/* The size of 'short', as computed by sizeof. */
#define SIZEOF_SHORT 2
-/* The size of `signed char', as computed by sizeof. */
+/* The size of 'signed char', as computed by sizeof. */
#define SIZEOF_SIGNED_CHAR 1
/* The size of `time_t', as computed by sizeof. */
@@ -1567,7 +1594,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C89 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
/* Step, then slew the clock? */
@@ -1616,7 +1645,7 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
/* #undef TM_IN_SYS_TIME */
/* Provide a typedef for uintptr_t? */
@@ -1635,11 +1664,103 @@ typedef unsigned int uintptr_t;
#define USE_FSETOWNCTTY 1
/* Use OpenSSL's crypto random functions */
-/* #define USE_OPENSSL_CRYPTO_RAND 1 */
+#define USE_OPENSSL_CRYPTO_RAND 1
/* OK to use snprintb()? */
/* #undef USE_SNPRINTB */
+/* Enable extensions on AIX, Interix, z/OS. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# define _DARWIN_C_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# define _HPUX_ALT_XOPEN_SOCKET_API 1
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+/* # undef _MINIX */
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# define _NETBSD_SOURCE 1
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# define _OPENBSD_SOURCE 1
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+/* # undef _POSIX_SOURCE */
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+/* # undef _POSIX_1_SOURCE */
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
+#endif
+/* Enable extensions specified by C23 Annex F. */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# define __STDC_WANT_IEC_60559_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+#endif
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# define __STDC_WANT_LIB_EXT2__ 1
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+/* # undef _XOPEN_SOURCE */
+#endif
+
+
/* Can we use SIGPOLL for tty IO? */
/* #undef USE_TTY_SIGPOLL */
@@ -1647,7 +1768,7 @@ typedef unsigned int uintptr_t;
/* #undef USE_UDP_SIGPOLL */
/* Version number of package */
-#define VERSION "4.2.8p17"
+#define VERSION "4.2.8p18"
/* vsnprintf expands "%m" to strerror(errno) */
#define VSNPRINTF_PERCENT_M 1
@@ -1665,16 +1786,6 @@ typedef unsigned int uintptr_t;
/* routine worker child proc uses to exit. */
#define WORKER_CHILD_EXIT exit
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
-
/* enable thread safety */
#define _REENTRANT 1
@@ -1687,49 +1798,25 @@ typedef unsigned int uintptr_t;
/* enable thread safety */
#define _THREAD_SAFE 1
-/* Define to 500 only on HP-UX. */
-/* #undef _XOPEN_SOURCE */
-
/* Are we _special_? */
/* #undef __APPLE_USE_RFC_3542 */
-/* Define to 1 if type `char' is unsigned and you are not using gcc. */
+/* Define to 1 if type 'char' is unsigned and your compiler does not
+ predefine this macro. */
#ifndef __CHAR_UNSIGNED__
/* # undef __CHAR_UNSIGNED__ */
#endif
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# define _ALL_SOURCE 1
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-
-
/* deviant */
/* #undef adjtimex */
-/* Define to empty if `const' does not conform to ANSI C. */
+/* Define to empty if 'const' does not conform to ANSI C. */
/* #undef const */
-/* Define to `int' if <sys/types.h> doesn't define. */
+/* Define as 'int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
-/* Define to `__inline__' or `__inline' if that's what the C compiler
+/* Define to '__inline__' or '__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
@@ -1745,29 +1832,21 @@ typedef unsigned int uintptr_t;
/* deviant */
/* #undef ntp_gettime */
-/* Define to `long int' if <sys/types.h> does not define. */
+/* Define to 'long int' if <sys/types.h> does not define. */
/* #undef off_t */
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
/* #undef pid_t */
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define as 'unsigned int' if <stddef.h> doesn't define. */
/* #undef size_t */
-
- #if !defined(_KERNEL) && !defined(PARSESTREAM)
- /*
- * stdio.h must be included after _GNU_SOURCE is defined
- * but before #define snprintf rpl_snprintf
- */
- # include <stdio.h>
- #endif
-
+ #include "c99_snprintf.h"
/* Define to rpl_snprintf if the replacement function should be used. */
/* #undef snprintf */
-/* Define to `int' if <sys/types.h> doesn't define. */
+/* Define as 'int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
@@ -1778,11 +1857,11 @@ typedef unsigned int uintptr_t;
pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */
-/* Define as `fork' if `vfork' does not work. */
+/* Define as 'fork' if 'vfork' does not work. */
/* #undef vfork */
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
- code using `volatile' can become incorrect without. Disable with care. */
+/* Define to empty if the keyword 'volatile' does not work. Warning: valid
+ code using 'volatile' can become incorrect without. Disable with care. */
/* #undef volatile */
/* Define to rpl_vsnprintf if the replacement function should be used. */
@@ -1820,9 +1899,21 @@ typedef union mpinfou {
# endif
# endif
#endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */
-
+
+ /*
+ * Macro to use in otherwise-empty source files to comply with ANSI C
+ * requirement that each translation unit (source file) contain some
+ * declaration. This has commonly been done by declaring an unused
+ * global variable of type int or char. An extern reference to abs()
+ * serves the same purpose without bloat. We once used exit() but
+ * that can produce warnings on systems that declare exit() noreturn.
+ */
+ #define NONEMPTY_TRANSLATION_UNIT extern int abs(int);
+
/*
* FreeBSD specific: Explicitly specify date/time for reproducible build.
*/
#define MKREPRO_DATE "Aug 19 2018"
#define MKREPRO_TIME "01:24:29"
+
+#define HAVE_CLOSEFROM 1
diff --git a/usr.sbin/ntp/doc/Makefile b/usr.sbin/ntp/doc/Makefile
index 345e75d54679..e87f4f734343 100644
--- a/usr.sbin/ntp/doc/Makefile
+++ b/usr.sbin/ntp/doc/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE=ntp
SUBDIR= drivers hints icons pic scripts
FILESDIR= ${SHAREDIR}/doc/ntp
diff --git a/usr.sbin/ntp/doc/drivers/Makefile b/usr.sbin/ntp/doc/drivers/Makefile
index 580a62a7a9ed..304d212b116b 100644
--- a/usr.sbin/ntp/doc/drivers/Makefile
+++ b/usr.sbin/ntp/doc/drivers/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
SUBDIR= icons scripts
FILESDIR= ${SHAREDIR}/doc/ntp/drivers
diff --git a/usr.sbin/ntp/doc/drivers/icons/Makefile b/usr.sbin/ntp/doc/drivers/icons/Makefile
index eda2a743078d..6c78893bfb58 100644
--- a/usr.sbin/ntp/doc/drivers/icons/Makefile
+++ b/usr.sbin/ntp/doc/drivers/icons/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
FILESDIR= ${SHAREDIR}/doc/ntp/drivers/icons
.if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/drivers/scripts/Makefile b/usr.sbin/ntp/doc/drivers/scripts/Makefile
index 16b896553114..633c90fdc3e1 100644
--- a/usr.sbin/ntp/doc/drivers/scripts/Makefile
+++ b/usr.sbin/ntp/doc/drivers/scripts/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
FILESDIR= ${SHAREDIR}/doc/ntp/drivers/scripts
.if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/hints/Makefile b/usr.sbin/ntp/doc/hints/Makefile
index 899e8adaea0f..aa3f25a5a268 100644
--- a/usr.sbin/ntp/doc/hints/Makefile
+++ b/usr.sbin/ntp/doc/hints/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
FILESDIR= ${SHAREDIR}/doc/ntp/hints
.if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/icons/Makefile b/usr.sbin/ntp/doc/icons/Makefile
index b9608cc2f82e..d6c026341e09 100644
--- a/usr.sbin/ntp/doc/icons/Makefile
+++ b/usr.sbin/ntp/doc/icons/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
FILESDIR= ${SHAREDIR}/doc/ntp/icons
.if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/pic/Makefile b/usr.sbin/ntp/doc/pic/Makefile
index 23cf769892da..1c1ede47ac04 100644
--- a/usr.sbin/ntp/doc/pic/Makefile
+++ b/usr.sbin/ntp/doc/pic/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
FILESDIR= ${SHAREDIR}/doc/ntp/pic
.if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/scripts/Makefile b/usr.sbin/ntp/doc/scripts/Makefile
index 7b8255a02423..c0f57e97a164 100644
--- a/usr.sbin/ntp/doc/scripts/Makefile
+++ b/usr.sbin/ntp/doc/scripts/Makefile
@@ -1,6 +1,7 @@
.include <src.opts.mk>
+PACKAGE= ntp
FILESDIR= ${SHAREDIR}/doc/ntp/scripts
.if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile
index 7cf4a33b8c6d..f9234eae6b00 100644
--- a/usr.sbin/ntp/libntp/Makefile
+++ b/usr.sbin/ntp/libntp/Makefile
@@ -5,6 +5,7 @@
${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads \
${SRCTOP}/contrib/ntp/libntp/lib/isc/unix \
+PACKAGE= ntp
LIB= ntp
INTERNALLIB=
@@ -24,7 +25,7 @@ NTP_SRCS= systime.c a_md5encrypt.c adjtime.c atoint.c \
ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_realpath.c \
ntp_worker.c \
- numtoa.c numtohost.c octtoint.c prettydate.c \
+ numtoa.c octtoint.c prettydate.c \
recvbuff.c refidsmear.c \
refnumtoa.c snprintf.c socket.c \
socktoa.c socktohost.c ssl_init.c statestr.c \
diff --git a/usr.sbin/ntp/libntpevent/Makefile b/usr.sbin/ntp/libntpevent/Makefile
index 0c04dae95d47..e36b2f51e497 100644
--- a/usr.sbin/ntp/libntpevent/Makefile
+++ b/usr.sbin/ntp/libntpevent/Makefile
@@ -3,6 +3,7 @@
.PATH: ${SRCTOP}/contrib/libevent
+PACKAGE= ntp
LIB= ntpevent
INTERNALLIB=
diff --git a/usr.sbin/ntp/libopts/Makefile b/usr.sbin/ntp/libopts/Makefile
index 170ff6db61da..97ae9fc4635b 100644
--- a/usr.sbin/ntp/libopts/Makefile
+++ b/usr.sbin/ntp/libopts/Makefile
@@ -1,6 +1,7 @@
.PATH: ${SRCTOP}/contrib/ntp/sntp/libopts
+PACKAGE=ntp
LIB= opts
INTERNALLIB=
diff --git a/usr.sbin/ntp/libparse/Makefile b/usr.sbin/ntp/libparse/Makefile
index e6c0bbb269cc..f79e2c761840 100644
--- a/usr.sbin/ntp/libparse/Makefile
+++ b/usr.sbin/ntp/libparse/Makefile
@@ -1,6 +1,7 @@
.PATH: ${SRCTOP}/contrib/ntp/libparse
+PACKAGE=ntp
LIB= parse
INTERNALLIB=
diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile
index 71df31a475a7..a667e218a211 100644
--- a/usr.sbin/ntp/ntp-keygen/Makefile
+++ b/usr.sbin/ntp/ntp-keygen/Makefile
@@ -6,6 +6,7 @@ MAN=
.PATH: ${SRCTOP}/contrib/ntp/util \
${SRCTOP}/contrib/ntp/ntpd
+PACKAGE=ntp
PROG= ntp-keygen
SRCS= ntp-keygen.c ntp-keygen-opts.c
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index d7b5010227f5..bb7f6aeaed5e 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -6,6 +6,7 @@ MAN=
.PATH: ${SRCTOP}/contrib/ntp/ntpd \
${.OBJDIR}
+PACKAGE= ntp
DIRS= ETC_NTP
ETC_NTP= /etc/ntp
ETC_NTP_MODE= 0700
@@ -45,12 +46,10 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/ntpd \
-I${.CURDIR:H} \
-I${.CURDIR}
-LIBADD= parse ntp m opts pthread
+LIBADD= parse ntp m md opts pthread
.if ${MK_OPENSSL} != "no"
LIBADD+= crypto
-.else
-LIBADD+= md
.endif
CLEANFILES+= .version version.c
diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile
index 03afbb5d708b..439a4decc678 100644
--- a/usr.sbin/ntp/ntpdate/Makefile
+++ b/usr.sbin/ntp/ntpdate/Makefile
@@ -3,6 +3,7 @@
.PATH: ${SRCTOP}/contrib/ntp/ntpdate
+PACKAGE=ntp
PROG= ntpdate
MAN=
SRCS= ntpdate.c version.c
@@ -13,12 +14,10 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
-I${.CURDIR:H}
-LIBADD= ntp m pthread
+LIBADD= ntp m md pthread
.if ${MK_OPENSSL} != "no"
LIBADD+= crypto
-.else
-LIBADD+= md
.endif
CLEANFILES+= .version version.c
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index 8502b7c1b503..d666b460fdce 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -5,6 +5,7 @@ MAN=
.PATH: ${SRCTOP}/contrib/ntp/ntpdc
+PACKAGE=ntp
PROG= ntpdc
SRCS= ntpdc.c ntpdc_ops.c ntpdc-opts.c version.c
@@ -16,12 +17,10 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${.CURDIR}/lib/libc/${MACHINE_ARCH} \
-I${.CURDIR:H} -I${.CURDIR}
-LIBADD= edit ntp m opts pthread
+LIBADD= edit ntp m md opts pthread
.if ${MK_OPENSSL} != "no"
LIBADD+= crypto
-.else
-LIBADD+= md
.endif
CLEANFILES+= .version version.c
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index be1e9c9034ff..5b994c4fee52 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -7,6 +7,7 @@ MAN=
BINDIR= /usr/bin
+PACKAGE=ntp
PROG= ntpq
SRCS= ntpq.c ntpq-opts.c ntpq-subs.c version.c
@@ -19,12 +20,10 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${.CURDIR:H}
-LIBADD+= edit ntp opts m pthread
+LIBADD+= edit ntp opts m md pthread
.if ${MK_OPENSSL} != "no"
LIBADD+= crypto
-.else
-LIBADD+= md
.endif
CLEANFILES+= .version version.c
diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile
index 027021aa1b16..821e4e5d5cc3 100644
--- a/usr.sbin/ntp/ntptime/Makefile
+++ b/usr.sbin/ntp/ntptime/Makefile
@@ -1,6 +1,7 @@
.PATH: ${SRCTOP}/contrib/ntp/util
+PACKAGE=ntp
PROG= ntptime
MAN=
diff --git a/usr.sbin/ntp/scripts/mkver b/usr.sbin/ntp/scripts/mkver
index 279468a1af1c..2336dd71bacb 100755
--- a/usr.sbin/ntp/scripts/mkver
+++ b/usr.sbin/ntp/scripts/mkver
@@ -7,7 +7,7 @@ PROG=${1-UNKNOWN}
ConfStr="$PROG"
-ConfStr="$ConfStr 4.2.8p16"
+ConfStr="$ConfStr 4.2.8p18"
case "$CSET" in
'') ;;
diff --git a/usr.sbin/ntp/sntp/Makefile b/usr.sbin/ntp/sntp/Makefile
index ebbfb77b4fab..a29a0c97b9dc 100644
--- a/usr.sbin/ntp/sntp/Makefile
+++ b/usr.sbin/ntp/sntp/Makefile
@@ -3,6 +3,7 @@
.PATH: ${SRCTOP}/contrib/ntp/sntp
+PACKAGE=ntp
PROG= sntp
MAN=
SRCS= crypto.c kod_management.c log.c main.c networking.c \
@@ -19,12 +20,10 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${.CURDIR:H}/libntpevent \
-I${.CURDIR:H}
-LIBADD= m opts ntp ntpevent pthread
+LIBADD= m opts md ntp ntpevent pthread
.if ${MK_OPENSSL} != "no"
LIBADD+= crypto
-.else
-LIBADD+= md
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/nvmfd/Makefile b/usr.sbin/nvmfd/Makefile
new file mode 100644
index 000000000000..dc3dcc5e3a5c
--- /dev/null
+++ b/usr.sbin/nvmfd/Makefile
@@ -0,0 +1,14 @@
+.include <src.opts.mk>
+.PATH: ${SRCTOP}/sys/libkern
+
+PACKAGE=nvme-tools
+PROG= nvmfd
+SRCS= nvmfd.c controller.c ctl.c devices.c discovery.c gsb_crc32.c io.c
+CFLAGS+= -I${SRCTOP}/lib/libnvmf
+MAN= nvmfd.8
+LIBADD+= nvmf pthread util nv
+
+.include <bsd.prog.mk>
+
+CFLAGS.ctl.c= -I${SRCTOP}/sys
+CWARNFLAGS.gsb_crc32.c= -Wno-cast-align
diff --git a/usr.sbin/nvmfd/controller.c b/usr.sbin/nvmfd/controller.c
new file mode 100644
index 000000000000..09baaea74ab4
--- /dev/null
+++ b/usr.sbin/nvmfd/controller.c
@@ -0,0 +1,244 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <err.h>
+#include <errno.h>
+#include <libnvmf.h>
+#include <stdlib.h>
+
+#include "internal.h"
+
+struct controller {
+ struct nvmf_qpair *qp;
+
+ uint64_t cap;
+ uint32_t vs;
+ uint32_t cc;
+ uint32_t csts;
+
+ bool shutdown;
+
+ struct nvme_controller_data cdata;
+};
+
+static bool
+update_cc(struct controller *c, uint32_t new_cc)
+{
+ uint32_t changes;
+
+ if (c->shutdown)
+ return (false);
+ if (!nvmf_validate_cc(c->qp, c->cap, c->cc, new_cc))
+ return (false);
+
+ changes = c->cc ^ new_cc;
+ c->cc = new_cc;
+
+ /* Handle shutdown requests. */
+ if (NVMEV(NVME_CC_REG_SHN, changes) != 0 &&
+ NVMEV(NVME_CC_REG_SHN, new_cc) != 0) {
+ c->csts &= ~NVMEM(NVME_CSTS_REG_SHST);
+ c->csts |= NVMEF(NVME_CSTS_REG_SHST, NVME_SHST_COMPLETE);
+ c->shutdown = true;
+ }
+
+ if (NVMEV(NVME_CC_REG_EN, changes) != 0) {
+ if (NVMEV(NVME_CC_REG_EN, new_cc) == 0) {
+ /* Controller reset. */
+ c->csts = 0;
+ c->shutdown = true;
+ } else
+ c->csts |= NVMEF(NVME_CSTS_REG_RDY, 1);
+ }
+ return (true);
+}
+
+static void
+handle_property_get(const struct controller *c, const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_get_cmd *pget)
+{
+ struct nvmf_fabric_prop_get_rsp rsp;
+
+ nvmf_init_cqe(&rsp, nc, 0);
+
+ switch (le32toh(pget->ofst)) {
+ case NVMF_PROP_CAP:
+ if (pget->attrib.size != NVMF_PROP_SIZE_8)
+ goto error;
+ rsp.value.u64 = htole64(c->cap);
+ break;
+ case NVMF_PROP_VS:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(c->vs);
+ break;
+ case NVMF_PROP_CC:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(c->cc);
+ break;
+ case NVMF_PROP_CSTS:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(c->csts);
+ break;
+ default:
+ goto error;
+ }
+
+ nvmf_send_response(nc, &rsp);
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+static void
+handle_property_set(struct controller *c, const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_set_cmd *pset)
+{
+ switch (le32toh(pset->ofst)) {
+ case NVMF_PROP_CC:
+ if (pset->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ if (!update_cc(c, le32toh(pset->value.u32.low)))
+ goto error;
+ break;
+ default:
+ goto error;
+ }
+
+ nvmf_send_success(nc);
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+static void
+handle_fabrics_command(struct controller *c,
+ const struct nvmf_capsule *nc, const struct nvmf_fabric_cmd *fc)
+{
+ switch (fc->fctype) {
+ case NVMF_FABRIC_COMMAND_PROPERTY_GET:
+ handle_property_get(c, nc,
+ (const struct nvmf_fabric_prop_get_cmd *)fc);
+ break;
+ case NVMF_FABRIC_COMMAND_PROPERTY_SET:
+ handle_property_set(c, nc,
+ (const struct nvmf_fabric_prop_set_cmd *)fc);
+ break;
+ case NVMF_FABRIC_COMMAND_CONNECT:
+ warnx("CONNECT command on connected queue");
+ nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR);
+ break;
+ case NVMF_FABRIC_COMMAND_DISCONNECT:
+ warnx("DISCONNECT command on admin queue");
+ nvmf_send_error(nc, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_INVALID_QUEUE_TYPE);
+ break;
+ default:
+ warnx("Unsupported fabrics command %#x", fc->fctype);
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE);
+ break;
+ }
+}
+
+static void
+handle_identify_command(const struct controller *c,
+ const struct nvmf_capsule *nc, const struct nvme_command *cmd)
+{
+ uint8_t cns;
+
+ cns = le32toh(cmd->cdw10) & 0xFF;
+ switch (cns) {
+ case 1:
+ break;
+ default:
+ warnx("Unsupported CNS %#x for IDENTIFY", cns);
+ goto error;
+ }
+
+ nvmf_send_controller_data(nc, &c->cdata, sizeof(c->cdata));
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+void
+controller_handle_admin_commands(struct controller *c, handle_command *cb,
+ void *cb_arg)
+{
+ struct nvmf_qpair *qp = c->qp;
+ const struct nvme_command *cmd;
+ struct nvmf_capsule *nc;
+ int error;
+
+ for (;;) {
+ error = nvmf_controller_receive_capsule(qp, &nc);
+ if (error != 0) {
+ if (error != ECONNRESET)
+ warnc(error, "Failed to read command capsule");
+ break;
+ }
+
+ cmd = nvmf_capsule_sqe(nc);
+
+ /*
+ * Only permit Fabrics commands while a controller is
+ * disabled.
+ */
+ if (NVMEV(NVME_CC_REG_EN, c->cc) == 0 &&
+ cmd->opc != NVME_OPC_FABRICS_COMMANDS) {
+ warnx("Unsupported admin opcode %#x whiled disabled\n",
+ cmd->opc);
+ nvmf_send_generic_error(nc,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ nvmf_free_capsule(nc);
+ continue;
+ }
+
+ if (cb(nc, cmd, cb_arg)) {
+ nvmf_free_capsule(nc);
+ continue;
+ }
+
+ switch (cmd->opc) {
+ case NVME_OPC_FABRICS_COMMANDS:
+ handle_fabrics_command(c, nc,
+ (const struct nvmf_fabric_cmd *)cmd);
+ break;
+ case NVME_OPC_IDENTIFY:
+ handle_identify_command(c, nc, cmd);
+ break;
+ default:
+ warnx("Unsupported admin opcode %#x", cmd->opc);
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE);
+ break;
+ }
+ nvmf_free_capsule(nc);
+ }
+}
+
+struct controller *
+init_controller(struct nvmf_qpair *qp,
+ const struct nvme_controller_data *cdata)
+{
+ struct controller *c;
+
+ c = calloc(1, sizeof(*c));
+ c->qp = qp;
+ c->cap = nvmf_controller_cap(c->qp);
+ c->vs = cdata->ver;
+ c->cdata = *cdata;
+
+ return (c);
+}
+
+void
+free_controller(struct controller *c)
+{
+ free(c);
+}
diff --git a/usr.sbin/nvmfd/ctl.c b/usr.sbin/nvmfd/ctl.c
new file mode 100644
index 000000000000..5f01ec8e5bc8
--- /dev/null
+++ b/usr.sbin/nvmfd/ctl.c
@@ -0,0 +1,139 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/linker.h>
+#include <sys/nv.h>
+#include <sys/time.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libnvmf.h>
+#include <string.h>
+
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_ioctl.h>
+
+#include "internal.h"
+
+static int ctl_fd = -1;
+static int ctl_port;
+
+static void
+open_ctl(void)
+{
+ if (ctl_fd > 0)
+ return;
+
+ ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
+ if (ctl_fd == -1 && errno == ENOENT) {
+ if (kldload("ctl") == -1)
+ err(1, "Failed to load ctl.ko");
+ ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
+ }
+ if (ctl_fd == -1)
+ err(1, "Failed to open %s", CTL_DEFAULT_DEV);
+}
+
+void
+init_ctl_port(const char *subnqn, const struct nvmf_association_params *params)
+{
+ char result_buf[256];
+ struct ctl_port_entry entry;
+ struct ctl_req req;
+ nvlist_t *nvl;
+
+ open_ctl();
+
+ nvl = nvlist_create(0);
+
+ nvlist_add_string(nvl, "subnqn", subnqn);
+
+ /* XXX: Hardcoded in discovery.c */
+ nvlist_add_stringf(nvl, "portid", "%u", 1);
+
+ nvlist_add_stringf(nvl, "max_io_qsize", "%u", params->max_io_qsize);
+
+ memset(&req, 0, sizeof(req));
+ strlcpy(req.driver, "nvmf", sizeof(req.driver));
+ req.reqtype = CTL_REQ_CREATE;
+ req.args = nvlist_pack(nvl, &req.args_len);
+ if (req.args == NULL)
+ errx(1, "Failed to pack nvlist for CTL_PORT/CTL_REQ_CREATE");
+ req.result = result_buf;
+ req.result_len = sizeof(result_buf);
+ if (ioctl(ctl_fd, CTL_PORT_REQ, &req) != 0)
+ err(1, "ioctl(CTL_PORT/CTL_REQ_CREATE)");
+ if (req.status == CTL_LUN_ERROR)
+ errx(1, "Failed to create CTL port: %s", req.error_str);
+ if (req.status != CTL_LUN_OK)
+ errx(1, "Failed to create CTL port: %d", req.status);
+
+ nvlist_destroy(nvl);
+ nvl = nvlist_unpack(result_buf, req.result_len, 0);
+ if (nvl == NULL)
+ errx(1, "Failed to unpack nvlist from CTL_PORT/CTL_REQ_CREATE");
+
+ ctl_port = nvlist_get_number(nvl, "port_id");
+ nvlist_destroy(nvl);
+
+ memset(&entry, 0, sizeof(entry));
+ entry.targ_port = ctl_port;
+ if (ioctl(ctl_fd, CTL_ENABLE_PORT, &entry) != 0)
+ errx(1, "ioctl(CTL_ENABLE_PORT)");
+}
+
+void
+shutdown_ctl_port(const char *subnqn)
+{
+ struct ctl_req req;
+ nvlist_t *nvl;
+
+ open_ctl();
+
+ nvl = nvlist_create(0);
+
+ nvlist_add_string(nvl, "subnqn", subnqn);
+
+ memset(&req, 0, sizeof(req));
+ strlcpy(req.driver, "nvmf", sizeof(req.driver));
+ req.reqtype = CTL_REQ_REMOVE;
+ req.args = nvlist_pack(nvl, &req.args_len);
+ if (req.args == NULL)
+ errx(1, "Failed to pack nvlist for CTL_PORT/CTL_REQ_REMOVE");
+ if (ioctl(ctl_fd, CTL_PORT_REQ, &req) != 0)
+ err(1, "ioctl(CTL_PORT/CTL_REQ_REMOVE)");
+ if (req.status == CTL_LUN_ERROR)
+ errx(1, "Failed to remove CTL port: %s", req.error_str);
+ if (req.status != CTL_LUN_OK)
+ errx(1, "Failed to remove CTL port: %d", req.status);
+
+ nvlist_destroy(nvl);
+}
+
+void
+ctl_handoff_qpair(struct nvmf_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd,
+ const struct nvmf_fabric_connect_data *data)
+{
+ struct ctl_nvmf req;
+ int error;
+
+ memset(&req, 0, sizeof(req));
+ req.type = CTL_NVMF_HANDOFF;
+ error = nvmf_handoff_controller_qpair(qp, &req.data.handoff);
+ if (error != 0) {
+ warnc(error, "Failed to prepare qpair for handoff");
+ return;
+ }
+
+ req.data.handoff.cmd = cmd;
+ req.data.handoff.data = data;
+ if (ioctl(ctl_fd, CTL_NVMF, &req) != 0)
+ warn("ioctl(CTL_NVMF/CTL_NVMF_HANDOFF)");
+}
diff --git a/usr.sbin/nvmfd/devices.c b/usr.sbin/nvmfd/devices.c
new file mode 100644
index 000000000000..fafc1077f207
--- /dev/null
+++ b/usr.sbin/nvmfd/devices.c
@@ -0,0 +1,386 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/disk.h>
+#include <sys/gsb_crc32.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <net/ieee_oui.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libnvmf.h>
+#include <libutil.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "internal.h"
+
+#define RAMDISK_PREFIX "ramdisk:"
+
+struct backing_device {
+ enum { RAMDISK, FILE, CDEV } type;
+ union {
+ int fd; /* FILE, CDEV */
+ void *mem; /* RAMDISK */
+ };
+ u_int sector_size;
+ uint64_t nlbas;
+ uint64_t eui64;
+};
+
+static struct backing_device *devices;
+static u_int ndevices;
+
+static uint64_t
+generate_eui64(uint32_t low)
+{
+ return (OUI_FREEBSD_NVME_LOW << 16 | low);
+}
+
+static uint32_t
+crc32(const void *buf, size_t len)
+{
+ return (calculate_crc32c(0xffffffff, buf, len) ^ 0xffffffff);
+}
+
+static void
+init_ramdisk(const char *config, struct backing_device *dev)
+{
+ static uint32_t ramdisk_idx = 1;
+ uint64_t num;
+
+ dev->type = RAMDISK;
+ dev->sector_size = 512;
+ if (expand_number(config, &num))
+ errx(1, "Invalid ramdisk specification: %s", config);
+ if ((num % dev->sector_size) != 0)
+ errx(1, "Invalid ramdisk size %ju", (uintmax_t)num);
+ dev->mem = calloc(num, 1);
+ dev->nlbas = num / dev->sector_size;
+ dev->eui64 = generate_eui64('M' << 24 | ramdisk_idx++);
+}
+
+static void
+init_filedevice(const char *config, int fd, struct stat *sb,
+ struct backing_device *dev)
+{
+ dev->type = FILE;
+ dev->fd = fd;
+ dev->sector_size = 512;
+ if ((sb->st_size % dev->sector_size) != 0)
+ errx(1, "File size is not a multiple of 512: %s", config);
+ dev->nlbas = sb->st_size / dev->sector_size;
+ dev->eui64 = generate_eui64('F' << 24 |
+ (crc32(config, strlen(config)) & 0xffffff));
+}
+
+static void
+init_chardevice(const char *config, int fd, struct backing_device *dev)
+{
+ off_t len;
+
+ dev->type = CDEV;
+ dev->fd = fd;
+ if (ioctl(fd, DIOCGSECTORSIZE, &dev->sector_size) != 0)
+ err(1, "Failed to fetch sector size for %s", config);
+ if (ioctl(fd, DIOCGMEDIASIZE, &len) != 0)
+ err(1, "Failed to fetch sector size for %s", config);
+ dev->nlbas = len / dev->sector_size;
+ dev->eui64 = generate_eui64('C' << 24 |
+ (crc32(config, strlen(config)) & 0xffffff));
+}
+
+static void
+init_device(const char *config, struct backing_device *dev)
+{
+ struct stat sb;
+ int fd;
+
+ /* Check for a RAM disk. */
+ if (strncmp(RAMDISK_PREFIX, config, strlen(RAMDISK_PREFIX)) == 0) {
+ init_ramdisk(config + strlen(RAMDISK_PREFIX), dev);
+ return;
+ }
+
+ fd = open(config, O_RDWR);
+ if (fd == -1)
+ err(1, "Failed to open %s", config);
+ if (fstat(fd, &sb) == -1)
+ err(1, "fstat");
+ switch (sb.st_mode & S_IFMT) {
+ case S_IFCHR:
+ init_chardevice(config, fd, dev);
+ break;
+ case S_IFREG:
+ init_filedevice(config, fd, &sb, dev);
+ break;
+ default:
+ errx(1, "Invalid file type for %s", config);
+ }
+}
+
+void
+register_devices(int ac, char **av)
+{
+ ndevices = ac;
+ devices = calloc(ndevices, sizeof(*devices));
+
+ for (int i = 0; i < ac; i++)
+ init_device(av[i], &devices[i]);
+}
+
+u_int
+device_count(void)
+{
+ return (ndevices);
+}
+
+static struct backing_device *
+lookup_device(uint32_t nsid)
+{
+ if (nsid == 0 || nsid > ndevices)
+ return (NULL);
+ return (&devices[nsid - 1]);
+}
+
+void
+device_active_nslist(uint32_t nsid, struct nvme_ns_list *nslist)
+{
+ u_int count;
+
+ memset(nslist, 0, sizeof(*nslist));
+ count = 0;
+ nsid++;
+ while (nsid <= ndevices) {
+ nslist->ns[count] = htole32(nsid);
+ count++;
+ if (count == nitems(nslist->ns))
+ break;
+ nsid++;
+ }
+}
+
+bool
+device_identification_descriptor(uint32_t nsid, void *buf)
+{
+ struct backing_device *dev;
+ char *p;
+
+ dev = lookup_device(nsid);
+ if (dev == NULL)
+ return (false);
+
+ memset(buf, 0, 4096);
+
+ p = buf;
+
+ /* EUI64 */
+ *p++ = 1;
+ *p++ = 8;
+ p += 2;
+ be64enc(p, dev->eui64);
+ return (true);
+}
+
+bool
+device_namespace_data(uint32_t nsid, struct nvme_namespace_data *nsdata)
+{
+ struct backing_device *dev;
+
+ dev = lookup_device(nsid);
+ if (dev == NULL)
+ return (false);
+
+ memset(nsdata, 0, sizeof(*nsdata));
+ nsdata->nsze = htole64(dev->nlbas);
+ nsdata->ncap = nsdata->nsze;
+ nsdata->nuse = nsdata->ncap;
+ nsdata->nlbaf = 1 - 1;
+ nsdata->flbas = NVMEF(NVME_NS_DATA_FLBAS_FORMAT, 0);
+ nsdata->lbaf[0] = NVMEF(NVME_NS_DATA_LBAF_LBADS,
+ ffs(dev->sector_size) - 1);
+
+ be64enc(nsdata->eui64, dev->eui64);
+ return (true);
+}
+
+static bool
+read_buffer(int fd, void *buf, size_t len, off_t offset)
+{
+ ssize_t nread;
+ char *dst;
+
+ dst = buf;
+ while (len > 0) {
+ nread = pread(fd, dst, len, offset);
+ if (nread == -1 && errno == EINTR)
+ continue;
+ if (nread <= 0)
+ return (false);
+ dst += nread;
+ len -= nread;
+ offset += nread;
+ }
+ return (true);
+}
+
+void
+device_read(uint32_t nsid, uint64_t lba, u_int nlb,
+ const struct nvmf_capsule *nc)
+{
+ struct backing_device *dev;
+ char *p, *src;
+ off_t off;
+ size_t len;
+
+ dev = lookup_device(nsid);
+ if (dev == NULL) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ return;
+ }
+
+ if (lba + nlb < lba || lba + nlb > dev->nlbas) {
+ nvmf_send_generic_error(nc, NVME_SC_LBA_OUT_OF_RANGE);
+ return;
+ }
+
+ off = lba * dev->sector_size;
+ len = nlb * dev->sector_size;
+ if (nvmf_capsule_data_len(nc) != len) {
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+ return;
+ }
+
+ if (dev->type == RAMDISK) {
+ p = NULL;
+ src = (char *)dev->mem + off;
+ } else {
+ p = malloc(len);
+ if (!read_buffer(dev->fd, p, len, off)) {
+ free(p);
+ nvmf_send_generic_error(nc,
+ NVME_SC_INTERNAL_DEVICE_ERROR);
+ return;
+ }
+ src = p;
+ }
+
+ nvmf_send_controller_data(nc, src, len);
+ free(p);
+}
+
+static bool
+write_buffer(int fd, const void *buf, size_t len, off_t offset)
+{
+ ssize_t nwritten;
+ const char *src;
+
+ src = buf;
+ while (len > 0) {
+ nwritten = pwrite(fd, src, len, offset);
+ if (nwritten == -1 && errno == EINTR)
+ continue;
+ if (nwritten <= 0)
+ return (false);
+ src += nwritten;
+ len -= nwritten;
+ offset += nwritten;
+ }
+ return (true);
+}
+
+void
+device_write(uint32_t nsid, uint64_t lba, u_int nlb,
+ const struct nvmf_capsule *nc)
+{
+ struct backing_device *dev;
+ char *p, *dst;
+ off_t off;
+ size_t len;
+ int error;
+
+ dev = lookup_device(nsid);
+ if (dev == NULL) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ return;
+ }
+
+ if (lba + nlb < lba || lba + nlb > dev->nlbas) {
+ nvmf_send_generic_error(nc, NVME_SC_LBA_OUT_OF_RANGE);
+ return;
+ }
+
+ off = lba * dev->sector_size;
+ len = nlb * dev->sector_size;
+ if (nvmf_capsule_data_len(nc) != len) {
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+ return;
+ }
+
+ if (dev->type == RAMDISK) {
+ p = NULL;
+ dst = (char *)dev->mem + off;
+ } else {
+ p = malloc(len);
+ dst = p;
+ }
+
+ error = nvmf_receive_controller_data(nc, 0, dst, len);
+ if (error != 0) {
+ nvmf_send_generic_error(nc, NVME_SC_TRANSIENT_TRANSPORT_ERROR);
+ free(p);
+ return;
+ }
+
+ if (dev->type != RAMDISK) {
+ if (!write_buffer(dev->fd, p, len, off)) {
+ free(p);
+ nvmf_send_generic_error(nc,
+ NVME_SC_INTERNAL_DEVICE_ERROR);
+ return;
+ }
+ }
+ free(p);
+ nvmf_send_success(nc);
+}
+
+void
+device_flush(uint32_t nsid, const struct nvmf_capsule *nc)
+{
+ struct backing_device *dev;
+
+ dev = lookup_device(nsid);
+ if (dev == NULL) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ return;
+ }
+
+ switch (dev->type) {
+ case RAMDISK:
+ break;
+ case FILE:
+ if (fdatasync(dev->fd) == -1) {
+ nvmf_send_error(nc, NVME_SCT_MEDIA_ERROR,
+ NVME_SC_WRITE_FAULTS);
+ return;
+ }
+ break;
+ case CDEV:
+ if (ioctl(dev->fd, DIOCGFLUSH) == -1) {
+ nvmf_send_error(nc, NVME_SCT_MEDIA_ERROR,
+ NVME_SC_WRITE_FAULTS);
+ return;
+ }
+ }
+
+ nvmf_send_success(nc);
+}
diff --git a/usr.sbin/nvmfd/discovery.c b/usr.sbin/nvmfd/discovery.c
new file mode 100644
index 000000000000..985c77620a62
--- /dev/null
+++ b/usr.sbin/nvmfd/discovery.c
@@ -0,0 +1,343 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <assert.h>
+#include <err.h>
+#include <libnvmf.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "internal.h"
+
+struct io_controller_data {
+ struct nvme_discovery_log_entry entry;
+ bool wildcard;
+};
+
+struct discovery_controller {
+ struct nvme_discovery_log *discovery_log;
+ size_t discovery_log_len;
+ int s;
+};
+
+struct discovery_thread_arg {
+ struct controller *c;
+ struct nvmf_qpair *qp;
+ int s;
+};
+
+static struct io_controller_data *io_controllers;
+static struct nvmf_association *discovery_na;
+static u_int num_io_controllers;
+
+static bool
+init_discovery_log_entry(struct nvme_discovery_log_entry *entry, int s,
+ const char *subnqn)
+{
+ struct sockaddr_storage ss;
+ socklen_t len;
+ bool wildcard;
+
+ len = sizeof(ss);
+ if (getsockname(s, (struct sockaddr *)&ss, &len) == -1)
+ err(1, "getsockname");
+
+ memset(entry, 0, sizeof(*entry));
+ entry->trtype = NVMF_TRTYPE_TCP;
+ switch (ss.ss_family) {
+ case AF_INET:
+ {
+ struct sockaddr_in *sin;
+
+ sin = (struct sockaddr_in *)&ss;
+ entry->adrfam = NVMF_ADRFAM_IPV4;
+ snprintf(entry->trsvcid, sizeof(entry->trsvcid), "%u",
+ htons(sin->sin_port));
+ if (inet_ntop(AF_INET, &sin->sin_addr, entry->traddr,
+ sizeof(entry->traddr)) == NULL)
+ err(1, "inet_ntop");
+ wildcard = (sin->sin_addr.s_addr == htonl(INADDR_ANY));
+ break;
+ }
+ case AF_INET6:
+ {
+ struct sockaddr_in6 *sin6;
+
+ sin6 = (struct sockaddr_in6 *)&ss;
+ entry->adrfam = NVMF_ADRFAM_IPV6;
+ snprintf(entry->trsvcid, sizeof(entry->trsvcid), "%u",
+ htons(sin6->sin6_port));
+ if (inet_ntop(AF_INET6, &sin6->sin6_addr, entry->traddr,
+ sizeof(entry->traddr)) == NULL)
+ err(1, "inet_ntop");
+ wildcard = (memcmp(&sin6->sin6_addr, &in6addr_any,
+ sizeof(in6addr_any)) == 0);
+ break;
+ }
+ default:
+ errx(1, "Unsupported address family %u", ss.ss_family);
+ }
+ entry->subtype = NVMF_SUBTYPE_NVME;
+ if (flow_control_disable)
+ entry->treq |= (1 << 2);
+ entry->portid = htole16(1);
+ entry->cntlid = htole16(NVMF_CNTLID_DYNAMIC);
+ entry->aqsz = NVME_MAX_ADMIN_ENTRIES;
+ strlcpy(entry->subnqn, subnqn, sizeof(entry->subnqn));
+ return (wildcard);
+}
+
+void
+init_discovery(void)
+{
+ struct nvmf_association_params aparams;
+
+ memset(&aparams, 0, sizeof(aparams));
+ aparams.sq_flow_control = false;
+ aparams.dynamic_controller_model = true;
+ aparams.max_admin_qsize = NVME_MAX_ADMIN_ENTRIES;
+ aparams.tcp.pda = 0;
+ aparams.tcp.header_digests = header_digests;
+ aparams.tcp.data_digests = data_digests;
+ aparams.tcp.maxr2t = 1;
+ aparams.tcp.maxh2cdata = 256 * 1024;
+ discovery_na = nvmf_allocate_association(NVMF_TRTYPE_TCP, true,
+ &aparams);
+ if (discovery_na == NULL)
+ err(1, "Failed to create discovery association");
+}
+
+void
+discovery_add_io_controller(int s, const char *subnqn)
+{
+ struct io_controller_data *icd;
+
+ io_controllers = reallocf(io_controllers, (num_io_controllers + 1) *
+ sizeof(*io_controllers));
+
+ icd = &io_controllers[num_io_controllers];
+ num_io_controllers++;
+
+ icd->wildcard = init_discovery_log_entry(&icd->entry, s, subnqn);
+}
+
+static void
+build_discovery_log_page(struct discovery_controller *dc)
+{
+ struct sockaddr_storage ss;
+ socklen_t len;
+ char traddr[256];
+ u_int i, nentries;
+ uint8_t adrfam;
+
+ if (dc->discovery_log != NULL)
+ return;
+
+ len = sizeof(ss);
+ if (getsockname(dc->s, (struct sockaddr *)&ss, &len) == -1) {
+ warn("build_discovery_log_page: getsockname");
+ return;
+ }
+
+ memset(traddr, 0, sizeof(traddr));
+ switch (ss.ss_family) {
+ case AF_INET:
+ {
+ struct sockaddr_in *sin;
+
+ sin = (struct sockaddr_in *)&ss;
+ adrfam = NVMF_ADRFAM_IPV4;
+ if (inet_ntop(AF_INET, &sin->sin_addr, traddr,
+ sizeof(traddr)) == NULL) {
+ warn("build_discovery_log_page: inet_ntop");
+ return;
+ }
+ break;
+ }
+ case AF_INET6:
+ {
+ struct sockaddr_in6 *sin6;
+
+ sin6 = (struct sockaddr_in6 *)&ss;
+ adrfam = NVMF_ADRFAM_IPV6;
+ if (inet_ntop(AF_INET6, &sin6->sin6_addr, traddr,
+ sizeof(traddr)) == NULL) {
+ warn("build_discovery_log_page: inet_ntop");
+ return;
+ }
+ break;
+ }
+ default:
+ assert(false);
+ }
+
+ nentries = 0;
+ for (i = 0; i < num_io_controllers; i++) {
+ if (io_controllers[i].wildcard &&
+ io_controllers[i].entry.adrfam != adrfam)
+ continue;
+ nentries++;
+ }
+
+ dc->discovery_log_len = sizeof(*dc->discovery_log) +
+ nentries * sizeof(struct nvme_discovery_log_entry);
+ dc->discovery_log = calloc(dc->discovery_log_len, 1);
+ dc->discovery_log->numrec = nentries;
+ dc->discovery_log->recfmt = 0;
+ nentries = 0;
+ for (i = 0; i < num_io_controllers; i++) {
+ if (io_controllers[i].wildcard &&
+ io_controllers[i].entry.adrfam != adrfam)
+ continue;
+
+ dc->discovery_log->entries[nentries] = io_controllers[i].entry;
+ if (io_controllers[i].wildcard)
+ memcpy(dc->discovery_log->entries[nentries].traddr,
+ traddr, sizeof(traddr));
+ }
+}
+
+static void
+handle_get_log_page_command(const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd, struct discovery_controller *dc)
+{
+ uint64_t offset;
+ uint32_t length;
+
+ switch (nvmf_get_log_page_id(cmd)) {
+ case NVME_LOG_DISCOVERY:
+ break;
+ default:
+ warnx("Unsupported log page %u for discovery controller",
+ nvmf_get_log_page_id(cmd));
+ goto error;
+ }
+
+ build_discovery_log_page(dc);
+
+ offset = nvmf_get_log_page_offset(cmd);
+ if (offset >= dc->discovery_log_len)
+ goto error;
+
+ length = nvmf_get_log_page_length(cmd);
+ if (length > dc->discovery_log_len - offset)
+ length = dc->discovery_log_len - offset;
+
+ nvmf_send_controller_data(nc, (char *)dc->discovery_log + offset,
+ length);
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+static bool
+discovery_command(const struct nvmf_capsule *nc, const struct nvme_command *cmd,
+ void *arg)
+{
+ struct discovery_controller *dc = arg;
+
+ switch (cmd->opc) {
+ case NVME_OPC_GET_LOG_PAGE:
+ handle_get_log_page_command(nc, cmd, dc);
+ return (true);
+ default:
+ return (false);
+ }
+}
+
+static void *
+discovery_thread(void *arg)
+{
+ struct discovery_thread_arg *dta = arg;
+ struct discovery_controller dc;
+
+ pthread_detach(pthread_self());
+
+ memset(&dc, 0, sizeof(dc));
+ dc.s = dta->s;
+
+ controller_handle_admin_commands(dta->c, discovery_command, &dc);
+
+ free(dc.discovery_log);
+ free_controller(dta->c);
+
+ nvmf_free_qpair(dta->qp);
+
+ close(dta->s);
+ free(dta);
+ return (NULL);
+}
+
+void
+handle_discovery_socket(int s)
+{
+ struct nvmf_fabric_connect_data data;
+ struct nvme_controller_data cdata;
+ struct nvmf_qpair_params qparams;
+ struct discovery_thread_arg *dta;
+ struct nvmf_capsule *nc;
+ struct nvmf_qpair *qp;
+ pthread_t thr;
+ int error;
+
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.tcp.fd = s;
+
+ nc = NULL;
+ qp = nvmf_accept(discovery_na, &qparams, &nc, &data);
+ if (qp == NULL) {
+ warnx("Failed to create discovery qpair: %s",
+ nvmf_association_error(discovery_na));
+ goto error;
+ }
+
+ if (strcmp(data.subnqn, NVMF_DISCOVERY_NQN) != 0) {
+ warn("Discovery qpair with invalid SubNQN: %.*s",
+ (int)sizeof(data.subnqn), data.subnqn);
+ nvmf_connect_invalid_parameters(nc, true,
+ offsetof(struct nvmf_fabric_connect_data, subnqn));
+ goto error;
+ }
+
+ /* Just use a controller ID of 1 for all discovery controllers. */
+ error = nvmf_finish_accept(nc, 1);
+ if (error != 0) {
+ warnc(error, "Failed to send CONNECT reponse");
+ goto error;
+ }
+
+ nvmf_init_discovery_controller_data(qp, &cdata);
+
+ dta = malloc(sizeof(*dta));
+ dta->qp = qp;
+ dta->s = s;
+ dta->c = init_controller(qp, &cdata);
+
+ error = pthread_create(&thr, NULL, discovery_thread, dta);
+ if (error != 0) {
+ warnc(error, "Failed to create discovery thread");
+ free_controller(dta->c);
+ free(dta);
+ goto error;
+ }
+
+ nvmf_free_capsule(nc);
+ return;
+
+error:
+ if (nc != NULL)
+ nvmf_free_capsule(nc);
+ if (qp != NULL)
+ nvmf_free_qpair(qp);
+ close(s);
+}
diff --git a/usr.sbin/nvmfd/internal.h b/usr.sbin/nvmfd/internal.h
new file mode 100644
index 000000000000..5ddbc1cf89f0
--- /dev/null
+++ b/usr.sbin/nvmfd/internal.h
@@ -0,0 +1,65 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __INTERNAL_H__
+#define __INTERNAL_H__
+
+#include <stdbool.h>
+
+struct controller;
+struct nvme_command;
+struct nvme_controller_data;
+struct nvme_ns_list;
+struct nvmf_capsule;
+struct nvmf_qpair;
+
+typedef bool handle_command(const struct nvmf_capsule *,
+ const struct nvme_command *, void *);
+
+extern bool data_digests;
+extern bool header_digests;
+extern bool flow_control_disable;
+extern bool kernel_io;
+
+/* controller.c */
+void controller_handle_admin_commands(struct controller *c,
+ handle_command *cb, void *cb_arg);
+struct controller *init_controller(struct nvmf_qpair *qp,
+ const struct nvme_controller_data *cdata);
+void free_controller(struct controller *c);
+
+/* discovery.c */
+void init_discovery(void);
+void handle_discovery_socket(int s);
+void discovery_add_io_controller(int s, const char *subnqn);
+
+/* io.c */
+void init_io(const char *subnqn);
+void handle_io_socket(int s);
+void shutdown_io(void);
+
+/* devices.c */
+void register_devices(int ac, char **av);
+u_int device_count(void);
+void device_active_nslist(uint32_t nsid, struct nvme_ns_list *nslist);
+bool device_identification_descriptor(uint32_t nsid, void *buf);
+bool device_namespace_data(uint32_t nsid, struct nvme_namespace_data *nsdata);
+void device_read(uint32_t nsid, uint64_t lba, u_int nlb,
+ const struct nvmf_capsule *nc);
+void device_write(uint32_t nsid, uint64_t lba, u_int nlb,
+ const struct nvmf_capsule *nc);
+void device_flush(uint32_t nsid, const struct nvmf_capsule *nc);
+
+/* ctl.c */
+void init_ctl_port(const char *subnqn,
+ const struct nvmf_association_params *params);
+void ctl_handoff_qpair(struct nvmf_qpair *qp,
+ const struct nvmf_fabric_connect_cmd *cmd,
+ const struct nvmf_fabric_connect_data *data);
+void shutdown_ctl_port(const char *subnqn);
+
+#endif /* !__INTERNAL_H__ */
diff --git a/usr.sbin/nvmfd/io.c b/usr.sbin/nvmfd/io.c
new file mode 100644
index 000000000000..be845a8ed784
--- /dev/null
+++ b/usr.sbin/nvmfd/io.c
@@ -0,0 +1,677 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/sysctl.h>
+#include <err.h>
+#include <errno.h>
+#include <libnvmf.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "internal.h"
+
+struct io_controller {
+ struct controller *c;
+
+ u_int num_io_queues;
+ u_int active_io_queues;
+ struct nvmf_qpair **io_qpairs;
+ int *io_sockets;
+
+ struct nvme_firmware_page fp;
+ struct nvme_health_information_page hip;
+ uint16_t partial_dur;
+ uint16_t partial_duw;
+
+ uint16_t cntlid;
+ char hostid[16];
+ char hostnqn[NVME_NQN_FIELD_SIZE];
+};
+
+static struct nvmf_association *io_na;
+static pthread_cond_t io_cond;
+static pthread_mutex_t io_na_mutex;
+static struct io_controller *io_controller;
+static const char *nqn;
+static char serial[NVME_SERIAL_NUMBER_LENGTH];
+
+void
+init_io(const char *subnqn)
+{
+ struct nvmf_association_params aparams;
+ u_long hostid;
+ size_t len;
+
+ memset(&aparams, 0, sizeof(aparams));
+ aparams.sq_flow_control = !flow_control_disable;
+ aparams.dynamic_controller_model = true;
+ aparams.max_admin_qsize = NVME_MAX_ADMIN_ENTRIES;
+ aparams.max_io_qsize = NVMF_MAX_IO_ENTRIES;
+ aparams.tcp.pda = 0;
+ aparams.tcp.header_digests = header_digests;
+ aparams.tcp.data_digests = data_digests;
+ aparams.tcp.maxr2t = 1;
+ aparams.tcp.maxh2cdata = 256 * 1024;
+ io_na = nvmf_allocate_association(NVMF_TRTYPE_TCP, true,
+ &aparams);
+ if (io_na == NULL)
+ err(1, "Failed to create I/O controller association");
+
+ nqn = subnqn;
+
+ /* Generate a serial number from the kern.hostid node. */
+ len = sizeof(hostid);
+ if (sysctlbyname("kern.hostid", &hostid, &len, NULL, 0) == -1)
+ err(1, "sysctl: kern.hostid");
+
+ nvmf_controller_serial(serial, sizeof(serial), hostid);
+
+ pthread_cond_init(&io_cond, NULL);
+ pthread_mutex_init(&io_na_mutex, NULL);
+
+ if (kernel_io)
+ init_ctl_port(subnqn, &aparams);
+}
+
+void
+shutdown_io(void)
+{
+ if (kernel_io)
+ shutdown_ctl_port(nqn);
+}
+
+static void
+handle_get_log_page(struct io_controller *ioc, const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ uint64_t offset;
+ uint32_t numd;
+ size_t len;
+ uint8_t lid;
+
+ lid = le32toh(cmd->cdw10) & 0xff;
+ numd = le32toh(cmd->cdw10) >> 16 | le32toh(cmd->cdw11) << 16;
+ offset = le32toh(cmd->cdw12) | (uint64_t)le32toh(cmd->cdw13) << 32;
+
+ if (offset % 3 != 0)
+ goto error;
+
+ len = (numd + 1) * 4;
+
+ switch (lid) {
+ case NVME_LOG_ERROR:
+ {
+ void *buf;
+
+ if (len % sizeof(struct nvme_error_information_entry) != 0)
+ goto error;
+
+ buf = calloc(1, len);
+ nvmf_send_controller_data(nc, buf, len);
+ free(buf);
+ return;
+ }
+ case NVME_LOG_HEALTH_INFORMATION:
+ if (len != sizeof(ioc->hip))
+ goto error;
+
+ nvmf_send_controller_data(nc, &ioc->hip, sizeof(ioc->hip));
+ return;
+ case NVME_LOG_FIRMWARE_SLOT:
+ if (len != sizeof(ioc->fp))
+ goto error;
+
+ nvmf_send_controller_data(nc, &ioc->fp, sizeof(ioc->fp));
+ return;
+ default:
+ warnx("Unsupported page %#x for GET_LOG_PAGE\n", lid);
+ goto error;
+ }
+
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+static bool
+handle_io_identify_command(const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ struct nvme_namespace_data nsdata;
+ struct nvme_ns_list nslist;
+ uint32_t nsid;
+ uint8_t cns;
+
+ cns = le32toh(cmd->cdw10) & 0xFF;
+ switch (cns) {
+ case 0: /* Namespace data. */
+ if (!device_namespace_data(le32toh(cmd->nsid), &nsdata)) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ return (true);
+ }
+
+ nvmf_send_controller_data(nc, &nsdata, sizeof(nsdata));
+ return (true);
+ case 2: /* Active namespace list. */
+ nsid = le32toh(cmd->nsid);
+ if (nsid >= 0xfffffffe) {
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+ return (true);
+ }
+
+ device_active_nslist(nsid, &nslist);
+ nvmf_send_controller_data(nc, &nslist, sizeof(nslist));
+ return (true);
+ case 3: /* Namespace Identification Descriptor list. */
+ if (!device_identification_descriptor(le32toh(cmd->nsid),
+ &nsdata)) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ return (true);
+ }
+
+ nvmf_send_controller_data(nc, &nsdata, sizeof(nsdata));
+ return (true);
+ default:
+ return (false);
+ }
+}
+
+static void
+handle_set_features(struct io_controller *ioc, const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ struct nvme_completion cqe;
+ uint8_t fid;
+
+ fid = NVMEV(NVME_FEAT_SET_FID, le32toh(cmd->cdw10));
+ switch (fid) {
+ case NVME_FEAT_NUMBER_OF_QUEUES:
+ {
+ uint32_t num_queues;
+
+ if (ioc->num_io_queues != 0) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ return;
+ }
+
+ num_queues = le32toh(cmd->cdw11) & 0xffff;
+
+ /* 5.12.1.7: 65535 is invalid. */
+ if (num_queues == 65535)
+ goto error;
+
+ /* Fabrics requires the same number of SQs and CQs. */
+ if (le32toh(cmd->cdw11) >> 16 != num_queues)
+ goto error;
+
+ /* Convert to 1's based */
+ num_queues++;
+
+ /* Lock to synchronize with handle_io_qpair. */
+ pthread_mutex_lock(&io_na_mutex);
+ ioc->num_io_queues = num_queues;
+ ioc->io_qpairs = calloc(num_queues, sizeof(*ioc->io_qpairs));
+ ioc->io_sockets = calloc(num_queues, sizeof(*ioc->io_sockets));
+ pthread_mutex_unlock(&io_na_mutex);
+
+ nvmf_init_cqe(&cqe, nc, 0);
+ cqe.cdw0 = cmd->cdw11;
+ nvmf_send_response(nc, &cqe);
+ return;
+ }
+ case NVME_FEAT_ASYNC_EVENT_CONFIGURATION:
+ {
+ uint32_t aer_mask;
+
+ aer_mask = le32toh(cmd->cdw11);
+
+ /* Check for any reserved or unimplemented feature bits. */
+ if ((aer_mask & 0xffffc000) != 0)
+ goto error;
+
+ /* No AERs are generated by this daemon. */
+ nvmf_send_success(nc);
+ return;
+ }
+ default:
+ warnx("Unsupported feature ID %u for SET_FEATURES", fid);
+ goto error;
+ }
+
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+static bool
+admin_command(const struct nvmf_capsule *nc, const struct nvme_command *cmd,
+ void *arg)
+{
+ struct io_controller *ioc = arg;
+
+ switch (cmd->opc) {
+ case NVME_OPC_GET_LOG_PAGE:
+ handle_get_log_page(ioc, nc, cmd);
+ return (true);
+ case NVME_OPC_IDENTIFY:
+ return (handle_io_identify_command(nc, cmd));
+ case NVME_OPC_SET_FEATURES:
+ handle_set_features(ioc, nc, cmd);
+ return (true);
+ case NVME_OPC_ASYNC_EVENT_REQUEST:
+ /* Ignore and never complete. */
+ return (true);
+ case NVME_OPC_KEEP_ALIVE:
+ nvmf_send_success(nc);
+ return (true);
+ default:
+ return (false);
+ }
+}
+
+static void
+handle_admin_qpair(struct io_controller *ioc)
+{
+ pthread_setname_np(pthread_self(), "admin queue");
+
+ controller_handle_admin_commands(ioc->c, admin_command, ioc);
+
+ pthread_mutex_lock(&io_na_mutex);
+ for (u_int i = 0; i < ioc->num_io_queues; i++) {
+ if (ioc->io_qpairs[i] == NULL || ioc->io_sockets[i] == -1)
+ continue;
+ close(ioc->io_sockets[i]);
+ ioc->io_sockets[i] = -1;
+ }
+
+ /* Wait for I/O threads to notice. */
+ while (ioc->active_io_queues > 0)
+ pthread_cond_wait(&io_cond, &io_na_mutex);
+
+ io_controller = NULL;
+ pthread_mutex_unlock(&io_na_mutex);
+
+ free_controller(ioc->c);
+
+ free(ioc);
+}
+
+static bool
+handle_io_fabrics_command(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_cmd *fc)
+{
+ switch (fc->fctype) {
+ case NVMF_FABRIC_COMMAND_CONNECT:
+ warnx("CONNECT command on connected queue");
+ nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR);
+ break;
+ case NVMF_FABRIC_COMMAND_DISCONNECT:
+ {
+ const struct nvmf_fabric_disconnect_cmd *dis =
+ (const struct nvmf_fabric_disconnect_cmd *)fc;
+ if (dis->recfmt != htole16(0)) {
+ nvmf_send_error(nc, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_INCOMPATIBLE_FORMAT);
+ break;
+ }
+ nvmf_send_success(nc);
+ return (true);
+ }
+ default:
+ warnx("Unsupported fabrics command %#x", fc->fctype);
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE);
+ break;
+ }
+
+ return (false);
+}
+
+static void
+hip_add(uint64_t pair[2], uint64_t addend)
+{
+ uint64_t old, new;
+
+ old = le64toh(pair[0]);
+ new = old + addend;
+ pair[0] = htole64(new);
+ if (new < old)
+ pair[1] += htole64(1);
+}
+
+static uint64_t
+cmd_lba(const struct nvme_command *cmd)
+{
+ return ((uint64_t)le32toh(cmd->cdw11) << 32 | le32toh(cmd->cdw10));
+}
+
+static u_int
+cmd_nlb(const struct nvme_command *cmd)
+{
+ return ((le32toh(cmd->cdw12) & 0xffff) + 1);
+}
+
+static void
+handle_read(struct io_controller *ioc, const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ size_t len;
+
+ len = nvmf_capsule_data_len(nc);
+ device_read(le32toh(cmd->nsid), cmd_lba(cmd), cmd_nlb(cmd), nc);
+ hip_add(ioc->hip.host_read_commands, 1);
+
+ len /= 512;
+ len += ioc->partial_dur;
+ if (len > 1000)
+ hip_add(ioc->hip.data_units_read, len / 1000);
+ ioc->partial_dur = len % 1000;
+}
+
+static void
+handle_write(struct io_controller *ioc, const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ size_t len;
+
+ len = nvmf_capsule_data_len(nc);
+ device_write(le32toh(cmd->nsid), cmd_lba(cmd), cmd_nlb(cmd), nc);
+ hip_add(ioc->hip.host_write_commands, 1);
+
+ len /= 512;
+ len += ioc->partial_duw;
+ if (len > 1000)
+ hip_add(ioc->hip.data_units_written, len / 1000);
+ ioc->partial_duw = len % 1000;
+}
+
+static void
+handle_flush(const struct nvmf_capsule *nc, const struct nvme_command *cmd)
+{
+ device_flush(le32toh(cmd->nsid), nc);
+}
+
+static bool
+handle_io_commands(struct io_controller *ioc, struct nvmf_qpair *qp)
+{
+ const struct nvme_command *cmd;
+ struct nvmf_capsule *nc;
+ int error;
+ bool disconnect;
+
+ disconnect = false;
+
+ while (!disconnect) {
+ error = nvmf_controller_receive_capsule(qp, &nc);
+ if (error != 0) {
+ if (error != ECONNRESET)
+ warnc(error, "Failed to read command capsule");
+ break;
+ }
+
+ cmd = nvmf_capsule_sqe(nc);
+
+ switch (cmd->opc) {
+ case NVME_OPC_FLUSH:
+ if (cmd->nsid == htole32(0xffffffff)) {
+ nvmf_send_generic_error(nc,
+ NVME_SC_INVALID_NAMESPACE_OR_FORMAT);
+ break;
+ }
+ handle_flush(nc, cmd);
+ break;
+ case NVME_OPC_WRITE:
+ handle_write(ioc, nc, cmd);
+ break;
+ case NVME_OPC_READ:
+ handle_read(ioc, nc, cmd);
+ break;
+ case NVME_OPC_FABRICS_COMMANDS:
+ disconnect = handle_io_fabrics_command(nc,
+ (const struct nvmf_fabric_cmd *)cmd);
+ break;
+ default:
+ warnx("Unsupported NVM opcode %#x", cmd->opc);
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE);
+ break;
+ }
+ nvmf_free_capsule(nc);
+ }
+
+ return (disconnect);
+}
+
+static void
+handle_io_qpair(struct io_controller *ioc, struct nvmf_qpair *qp, int qid)
+{
+ char name[64];
+ bool disconnect;
+
+ snprintf(name, sizeof(name), "I/O queue %d", qid);
+ pthread_setname_np(pthread_self(), name);
+
+ disconnect = handle_io_commands(ioc, qp);
+
+ pthread_mutex_lock(&io_na_mutex);
+ if (disconnect)
+ ioc->io_qpairs[qid - 1] = NULL;
+ if (ioc->io_sockets[qid - 1] != -1) {
+ close(ioc->io_sockets[qid - 1]);
+ ioc->io_sockets[qid - 1] = -1;
+ }
+ ioc->active_io_queues--;
+ if (ioc->active_io_queues == 0)
+ pthread_cond_broadcast(&io_cond);
+ pthread_mutex_unlock(&io_na_mutex);
+}
+
+static void
+connect_admin_qpair(int s, struct nvmf_qpair *qp, struct nvmf_capsule *nc,
+ const struct nvmf_fabric_connect_data *data)
+{
+ struct nvme_controller_data cdata;
+ struct io_controller *ioc;
+ int error;
+
+ /* Can only have one active I/O controller at a time. */
+ pthread_mutex_lock(&io_na_mutex);
+ if (io_controller != NULL) {
+ pthread_mutex_unlock(&io_na_mutex);
+ nvmf_send_error(nc, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_CONTROLLER_BUSY);
+ goto error;
+ }
+
+ error = nvmf_finish_accept(nc, 2);
+ if (error != 0) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnc(error, "Failed to send CONNECT response");
+ goto error;
+ }
+
+ ioc = calloc(1, sizeof(*ioc));
+ ioc->cntlid = 2;
+ memcpy(ioc->hostid, data->hostid, sizeof(ioc->hostid));
+ memcpy(ioc->hostnqn, data->hostnqn, sizeof(ioc->hostnqn));
+
+ nvmf_init_io_controller_data(qp, serial, nqn, device_count(),
+ NVMF_IOCCSZ, &cdata);
+
+ ioc->fp.afi = NVMEF(NVME_FIRMWARE_PAGE_AFI_SLOT, 1);
+ memcpy(ioc->fp.revision[0], cdata.fr, sizeof(cdata.fr));
+
+ ioc->hip.power_cycles[0] = 1;
+
+ ioc->c = init_controller(qp, &cdata);
+
+ io_controller = ioc;
+ pthread_mutex_unlock(&io_na_mutex);
+
+ nvmf_free_capsule(nc);
+
+ handle_admin_qpair(ioc);
+ close(s);
+ return;
+
+error:
+ nvmf_free_capsule(nc);
+ close(s);
+}
+
+static void
+connect_io_qpair(int s, struct nvmf_qpair *qp, struct nvmf_capsule *nc,
+ const struct nvmf_fabric_connect_data *data, uint16_t qid)
+{
+ struct io_controller *ioc;
+ int error;
+
+ pthread_mutex_lock(&io_na_mutex);
+ if (io_controller == NULL) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("Attempt to create I/O qpair without admin qpair");
+ nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR);
+ goto error;
+ }
+
+ if (memcmp(io_controller->hostid, data->hostid,
+ sizeof(data->hostid)) != 0) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("hostid mismatch for I/O qpair CONNECT");
+ nvmf_connect_invalid_parameters(nc, true,
+ offsetof(struct nvmf_fabric_connect_data, hostid));
+ goto error;
+ }
+ if (le16toh(data->cntlid) != io_controller->cntlid) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("cntlid mismatch for I/O qpair CONNECT");
+ nvmf_connect_invalid_parameters(nc, true,
+ offsetof(struct nvmf_fabric_connect_data, cntlid));
+ goto error;
+ }
+ if (memcmp(io_controller->hostnqn, data->hostnqn,
+ sizeof(data->hostid)) != 0) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("host NQN mismatch for I/O qpair CONNECT");
+ nvmf_connect_invalid_parameters(nc, true,
+ offsetof(struct nvmf_fabric_connect_data, hostnqn));
+ goto error;
+ }
+
+ if (io_controller->num_io_queues == 0) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("Attempt to create I/O qpair without enabled queues");
+ nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR);
+ goto error;
+ }
+ if (qid > io_controller->num_io_queues) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("Attempt to create invalid I/O qpair %u", qid);
+ nvmf_connect_invalid_parameters(nc, false,
+ offsetof(struct nvmf_fabric_connect_cmd, qid));
+ goto error;
+ }
+ if (io_controller->io_qpairs[qid - 1] != NULL) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnx("Attempt to re-create I/O qpair %u", qid);
+ nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR);
+ goto error;
+ }
+
+ error = nvmf_finish_accept(nc, io_controller->cntlid);
+ if (error != 0) {
+ pthread_mutex_unlock(&io_na_mutex);
+ warnc(error, "Failed to send CONNECT response");
+ goto error;
+ }
+
+ ioc = io_controller;
+ ioc->active_io_queues++;
+ ioc->io_qpairs[qid - 1] = qp;
+ ioc->io_sockets[qid - 1] = s;
+ pthread_mutex_unlock(&io_na_mutex);
+
+ nvmf_free_capsule(nc);
+
+ handle_io_qpair(ioc, qp, qid);
+ return;
+
+error:
+ nvmf_free_capsule(nc);
+ close(s);
+}
+
+static void *
+io_socket_thread(void *arg)
+{
+ struct nvmf_fabric_connect_data data;
+ struct nvmf_qpair_params qparams;
+ const struct nvmf_fabric_connect_cmd *cmd;
+ struct nvmf_capsule *nc;
+ struct nvmf_qpair *qp;
+ int s;
+
+ pthread_detach(pthread_self());
+
+ s = (intptr_t)arg;
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.tcp.fd = s;
+
+ nc = NULL;
+ qp = nvmf_accept(io_na, &qparams, &nc, &data);
+ if (qp == NULL) {
+ warnx("Failed to create I/O qpair: %s",
+ nvmf_association_error(io_na));
+ goto error;
+ }
+
+ if (kernel_io) {
+ ctl_handoff_qpair(qp, nvmf_capsule_sqe(nc), &data);
+ goto error;
+ }
+
+ if (strcmp(data.subnqn, nqn) != 0) {
+ warn("I/O qpair with invalid SubNQN: %.*s",
+ (int)sizeof(data.subnqn), data.subnqn);
+ nvmf_connect_invalid_parameters(nc, true,
+ offsetof(struct nvmf_fabric_connect_data, subnqn));
+ goto error;
+ }
+
+ /* Is this an admin or I/O queue pair? */
+ cmd = nvmf_capsule_sqe(nc);
+ if (cmd->qid == 0)
+ connect_admin_qpair(s, qp, nc, &data);
+ else
+ connect_io_qpair(s, qp, nc, &data, le16toh(cmd->qid));
+ nvmf_free_qpair(qp);
+ return (NULL);
+
+error:
+ if (nc != NULL)
+ nvmf_free_capsule(nc);
+ if (qp != NULL)
+ nvmf_free_qpair(qp);
+ close(s);
+ return (NULL);
+}
+
+void
+handle_io_socket(int s)
+{
+ pthread_t thr;
+ int error;
+
+ error = pthread_create(&thr, NULL, io_socket_thread,
+ (void *)(uintptr_t)s);
+ if (error != 0) {
+ warnc(error, "Failed to create I/O qpair thread");
+ close(s);
+ }
+}
diff --git a/usr.sbin/nvmfd/nvmfd.8 b/usr.sbin/nvmfd/nvmfd.8
new file mode 100644
index 000000000000..689ac6d4dda1
--- /dev/null
+++ b/usr.sbin/nvmfd/nvmfd.8
@@ -0,0 +1,126 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2024 Chelsio Communications, Inc.
+.\"
+.Dd May 2, 2024
+.Dt NVMFD 8
+.Os
+.Sh NAME
+.Nm nvmfd
+.Nd "NVMeoF controller daemon"
+.Sh SYNOPSIS
+.Nm
+.Fl K
+.Op Fl dFGg
+.Op Fl P Ar port
+.Op Fl p Ar port
+.Op Fl t Ar transport
+.Op Fl n Ar subnqn
+.Nm
+.Op Fl dFGg
+.Op Fl P Ar port
+.Op Fl p Ar port
+.Op Fl t Ar transport
+.Op Fl n Ar subnqn
+.Ar device
+.Op Ar device ...
+.Sh DESCRIPTION
+.Nm
+accepts incoming NVMeoF connections for both I/O and discovery controllers.
+.Nm
+can either implement a single dynamic I/O controller in user mode or hand
+off incoming I/O controller connections to
+.Xr nvmft 4 .
+A dynamic discovery controller service is always provided in user mode.
+.Pp
+The following options are available:
+.Bl -tag -width "-t transport"
+.It Fl F
+Permit remote hosts to disable SQ flow control.
+.It Fl G
+Permit remote hosts to enable PDU data digests for the TCP transport.
+.It Fl g
+Permit remote hosts to enable PDU header digests for the TCP transport.
+.It Fl K
+Enable kernel mode which hands off incoming I/O controller connections to
+.Xr nvmft 4 .
+.It Fl P Ar port
+Use
+.Ar port
+as the listen TCP port for the discovery controller service.
+The default value is 8009.
+.It Fl d
+Enable debug mode.
+The daemon sends any errors to standard output and does not place
+itself in the background.
+.It Fl p Ar port
+Use
+.Ar port
+as the listen TCP port for the I/O controller service.
+By default an unused ephemeral port will be chosen.
+.It Fl n Ar subnqn
+The Subsystem NVMe Qualified Name for the I/O controller.
+If an explicit NQN is not given, a default value is generated from the
+current host's UUID obtained from the
+.Vt kern.hostuuid
+sysctl.
+.It Fl t Ar transport
+The transport type to use.
+The default transport is
+.Dq tcp .
+.It Ar device
+When implementing a user mode I/O controller,
+one or more
+.Ar device
+arguments must be specified.
+Each
+.Ar device
+describes the backing store for a namespace exported to remote hosts.
+Devices can be specified using one of the following syntaxes:
+.Bl -tag -width "ramdisk:size"
+.It Pa pathname
+File or disk device
+.It ramdisk : Ns Ar size
+Allocate a memory disk with the given
+.Ar size .
+.Ar size
+may use any of the suffixes supported by
+.Xr expand_number 3 .
+.El
+.El
+.Sh FILES
+.Bl -tag -width "/var/run/nvmfd.pid" -compact
+.It Pa /var/run/nvmfd.pid
+The default location of the
+.Nm
+PID file.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr ctl 4 ,
+.Xr nvmft 4 ,
+.Xr ctladm 8 ,
+.Xr ctld 8
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 15.0 .
+.Sh AUTHORS
+The
+.Nm
+subsystem was developed by
+.An John Baldwin Aq Mt jhb@FreeBSD.org
+under sponsorship from Chelsio Communications, Inc.
+.Sh BUGS
+The discovery controller and kernel mode functionality of
+.Nm
+should be merged into
+.Xr ctld 8 .
+.Pp
+Additional paramters such as
+.Va MAXR2T ,
+.Va MAXH2CDATA ,
+and queue sizes should be configurable.
diff --git a/usr.sbin/nvmfd/nvmfd.c b/usr.sbin/nvmfd/nvmfd.c
new file mode 100644
index 000000000000..6fce21b07b74
--- /dev/null
+++ b/usr.sbin/nvmfd/nvmfd.c
@@ -0,0 +1,260 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2024 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/event.h>
+#include <sys/linker.h>
+#include <sys/module.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <assert.h>
+#include <err.h>
+#include <errno.h>
+#include <libnvmf.h>
+#include <libutil.h>
+#include <netdb.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "internal.h"
+
+bool data_digests = false;
+bool header_digests = false;
+bool flow_control_disable = false;
+bool kernel_io = false;
+
+static const char *subnqn;
+static volatile bool quit = false;
+
+static void
+usage(void)
+{
+ fprintf(stderr, "nvmfd -K [-FGg] [-P port] [-p port] [-t transport] [-n subnqn]\n"
+ "nvmfd [-dDFH] [-P port] [-p port] [-t transport] [-n subnqn]\n"
+ "\tdevice [device [...]]\n"
+ "\n"
+ "Devices use one of the following syntaxes:\n"
+ "\tpathame - file or disk device\n"
+ "\tramdisk:size - memory disk of given size\n");
+ exit(1);
+}
+
+static void
+handle_sig(int sig __unused)
+{
+ quit = true;
+}
+
+static void
+register_listen_socket(int kqfd, int s, void *udata)
+{
+ struct kevent kev;
+
+ if (listen(s, -1) != 0)
+ err(1, "listen");
+
+ EV_SET(&kev, s, EVFILT_READ, EV_ADD, 0, 0, udata);
+ if (kevent(kqfd, &kev, 1, NULL, 0, NULL) == -1)
+ err(1, "kevent: failed to add listen socket");
+}
+
+static void
+create_passive_sockets(int kqfd, const char *port, bool discovery)
+{
+ struct addrinfo hints, *ai, *list;
+ bool created;
+ int error, s;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_flags = AI_PASSIVE;
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ error = getaddrinfo(NULL, port, &hints, &list);
+ if (error != 0)
+ errx(1, "%s", gai_strerror(error));
+ created = false;
+
+ for (ai = list; ai != NULL; ai = ai->ai_next) {
+ s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+ if (s == -1)
+ continue;
+
+ if (bind(s, ai->ai_addr, ai->ai_addrlen) != 0) {
+ close(s);
+ continue;
+ }
+
+ if (discovery) {
+ register_listen_socket(kqfd, s, (void *)1);
+ } else {
+ register_listen_socket(kqfd, s, (void *)2);
+ discovery_add_io_controller(s, subnqn);
+ }
+ created = true;
+ }
+
+ freeaddrinfo(list);
+ if (!created)
+ err(1, "Failed to create any listen sockets");
+}
+
+static void
+handle_connections(int kqfd)
+{
+ struct kevent ev;
+ int s;
+
+ signal(SIGHUP, handle_sig);
+ signal(SIGINT, handle_sig);
+ signal(SIGQUIT, handle_sig);
+ signal(SIGTERM, handle_sig);
+
+ while (!quit) {
+ if (kevent(kqfd, NULL, 0, &ev, 1, NULL) == -1) {
+ if (errno == EINTR)
+ continue;
+ err(1, "kevent");
+ }
+
+ assert(ev.filter == EVFILT_READ);
+
+ s = accept(ev.ident, NULL, NULL);
+ if (s == -1) {
+ warn("accept");
+ continue;
+ }
+
+ switch ((uintptr_t)ev.udata) {
+ case 1:
+ handle_discovery_socket(s);
+ break;
+ case 2:
+ handle_io_socket(s);
+ break;
+ default:
+ __builtin_unreachable();
+ }
+ }
+}
+
+int
+main(int ac, char **av)
+{
+ struct pidfh *pfh;
+ const char *dport, *ioport, *transport;
+ pid_t pid;
+ int ch, error, kqfd;
+ bool daemonize;
+ static char nqn[NVMF_NQN_MAX_LEN];
+
+ /* 7.4.9.3 Default port for discovery */
+ dport = "8009";
+
+ pfh = NULL;
+ daemonize = true;
+ ioport = "0";
+ subnqn = NULL;
+ transport = "tcp";
+ while ((ch = getopt(ac, av, "dFgGKn:P:p:t:")) != -1) {
+ switch (ch) {
+ case 'd':
+ daemonize = false;
+ break;
+ case 'F':
+ flow_control_disable = true;
+ break;
+ case 'G':
+ data_digests = true;
+ break;
+ case 'g':
+ header_digests = true;
+ break;
+ case 'K':
+ kernel_io = true;
+ break;
+ case 'n':
+ subnqn = optarg;
+ break;
+ case 'P':
+ dport = optarg;
+ break;
+ case 'p':
+ ioport = optarg;
+ break;
+ case 't':
+ transport = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ av += optind;
+ ac -= optind;
+
+ if (kernel_io) {
+ if (ac > 0)
+ usage();
+ if (modfind("nvmft") == -1 && kldload("nvmft") == -1)
+ warn("couldn't load nvmft");
+ } else {
+ if (ac < 1)
+ usage();
+ }
+
+ if (strcasecmp(transport, "tcp") == 0) {
+ } else
+ errx(1, "Invalid transport %s", transport);
+
+ if (subnqn == NULL) {
+ error = nvmf_nqn_from_hostuuid(nqn);
+ if (error != 0)
+ errc(1, error, "Failed to generate NQN");
+ subnqn = nqn;
+ }
+
+ if (!kernel_io)
+ register_devices(ac, av);
+
+ init_discovery();
+ init_io(subnqn);
+
+ if (daemonize) {
+ pfh = pidfile_open(NULL, 0600, &pid);
+ if (pfh == NULL) {
+ if (errno == EEXIST)
+ errx(1, "Daemon already running, pid: %jd",
+ (intmax_t)pid);
+ warn("Cannot open or create pidfile");
+ }
+
+ if (daemon(0, 0) != 0) {
+ pidfile_remove(pfh);
+ err(1, "Failed to fork into the background");
+ }
+
+ pidfile_write(pfh);
+ }
+
+ kqfd = kqueue();
+ if (kqfd == -1) {
+ pidfile_remove(pfh);
+ err(1, "kqueue");
+ }
+
+ create_passive_sockets(kqfd, dport, true);
+ create_passive_sockets(kqfd, ioport, false);
+
+ handle_connections(kqfd);
+ shutdown_io();
+ if (pfh != NULL)
+ pidfile_remove(pfh);
+ return (0);
+}
diff --git a/usr.sbin/periodic/etc/daily/Makefile b/usr.sbin/periodic/etc/daily/Makefile
index 3bf4601f5145..fa3291d097ff 100644
--- a/usr.sbin/periodic/etc/daily/Makefile
+++ b/usr.sbin/periodic/etc/daily/Makefile
@@ -44,8 +44,11 @@ CONFS+= 130.clean-msgs
.endif
.if ${MK_NTP} != "no"
-CONFS+= 480.status-ntpd \
- 480.leapfile-ntpd
+CONFGROUPS+= NTP
+NTP+= 480.status-ntpd \
+ 480.leapfile-ntpd
+NTPMODE= ${BINMODE}
+NTPPACKAGE= ntp
.endif
.if ${MK_SENDMAIL} != "no"
diff --git a/usr.sbin/periodic/etc/security/100.chksetuid b/usr.sbin/periodic/etc/security/100.chksetuid
index 071d296cdaff..6ade53a180be 100755
--- a/usr.sbin/periodic/etc/security/100.chksetuid
+++ b/usr.sbin/periodic/etc/security/100.chksetuid
@@ -36,8 +36,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_chksetuid_enable
-
rc=0
if check_yesno_period security_status_chksetuid_enable
diff --git a/usr.sbin/periodic/etc/security/110.neggrpperm b/usr.sbin/periodic/etc/security/110.neggrpperm
index 6def25fc6a0e..41f2713533b0 100755
--- a/usr.sbin/periodic/etc/security/110.neggrpperm
+++ b/usr.sbin/periodic/etc/security/110.neggrpperm
@@ -34,8 +34,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_neggrpperm_enable
-
rc=0
if check_yesno_period security_status_neggrpperm_enable
diff --git a/usr.sbin/periodic/etc/security/200.chkmounts b/usr.sbin/periodic/etc/security/200.chkmounts
index c6405bb86467..055cf256018a 100755
--- a/usr.sbin/periodic/etc/security/200.chkmounts
+++ b/usr.sbin/periodic/etc/security/200.chkmounts
@@ -39,10 +39,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_chkmounts_enable
-security_daily_compat_var security_status_chkmounts_ignore
-security_daily_compat_var security_status_noamd
-
ignore="${security_status_chkmounts_ignore}"
rc=0
diff --git a/usr.sbin/periodic/etc/security/300.chkuid0 b/usr.sbin/periodic/etc/security/300.chkuid0
index 121734357d06..c73980300d70 100755
--- a/usr.sbin/periodic/etc/security/300.chkuid0
+++ b/usr.sbin/periodic/etc/security/300.chkuid0
@@ -35,8 +35,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_chkuid0_enable
-
rc=0
if check_yesno_period security_status_chkuid0_enable
diff --git a/usr.sbin/periodic/etc/security/400.passwdless b/usr.sbin/periodic/etc/security/400.passwdless
index 10a80ce43370..3e30e5e9cf5f 100755
--- a/usr.sbin/periodic/etc/security/400.passwdless
+++ b/usr.sbin/periodic/etc/security/400.passwdless
@@ -34,8 +34,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_passwdless_enable
-
rc=0
if check_yesno_period security_status_passwdless_enable
diff --git a/usr.sbin/periodic/etc/security/410.logincheck b/usr.sbin/periodic/etc/security/410.logincheck
index 7e1ac5ec1b67..a3f3f3f1a21a 100755
--- a/usr.sbin/periodic/etc/security/410.logincheck
+++ b/usr.sbin/periodic/etc/security/410.logincheck
@@ -34,8 +34,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_logincheck_enable
-
rc=0
if check_yesno_period security_status_logincheck_enable
diff --git a/usr.sbin/periodic/etc/security/500.ipfwdenied b/usr.sbin/periodic/etc/security/500.ipfwdenied
index f2a435711805..3ee7b3aa5cdc 100755
--- a/usr.sbin/periodic/etc/security/500.ipfwdenied
+++ b/usr.sbin/periodic/etc/security/500.ipfwdenied
@@ -36,8 +36,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_ipfwdenied_enable
-
rc=0
if check_yesno_period security_status_ipfwdenied_enable
diff --git a/usr.sbin/periodic/etc/security/510.ipfdenied b/usr.sbin/periodic/etc/security/510.ipfdenied
index 3350bfd40fcf..b9f468fb96e5 100755
--- a/usr.sbin/periodic/etc/security/510.ipfdenied
+++ b/usr.sbin/periodic/etc/security/510.ipfdenied
@@ -36,8 +36,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_ipfdenied_enable
-
rc=0
if check_yesno_period security_status_ipfdenied_enable
diff --git a/usr.sbin/periodic/etc/security/520.pfdenied b/usr.sbin/periodic/etc/security/520.pfdenied
index 6af474712d6f..9852936257bc 100755
--- a/usr.sbin/periodic/etc/security/520.pfdenied
+++ b/usr.sbin/periodic/etc/security/520.pfdenied
@@ -36,8 +36,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_pfdenied_enable
-
rc=0
if check_yesno_period security_status_pfdenied_enable
diff --git a/usr.sbin/periodic/etc/security/550.ipfwlimit b/usr.sbin/periodic/etc/security/550.ipfwlimit
index 7b6f915a1ac5..8382c12df22f 100755
--- a/usr.sbin/periodic/etc/security/550.ipfwlimit
+++ b/usr.sbin/periodic/etc/security/550.ipfwlimit
@@ -37,8 +37,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_ipfwlimit_enable
-
rc=0
if check_yesno_period security_status_ipfwlimit_enable
diff --git a/usr.sbin/periodic/etc/security/610.ipf6denied b/usr.sbin/periodic/etc/security/610.ipf6denied
index a7902e504baa..e1db7611557b 100755
--- a/usr.sbin/periodic/etc/security/610.ipf6denied
+++ b/usr.sbin/periodic/etc/security/610.ipf6denied
@@ -36,8 +36,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_ipf6denied_enable
-
rc=0
if check_yesno_period security_status_ipf6denied_enable
diff --git a/usr.sbin/periodic/etc/security/700.kernelmsg b/usr.sbin/periodic/etc/security/700.kernelmsg
index cd4391aad98d..016bfbef36d0 100755
--- a/usr.sbin/periodic/etc/security/700.kernelmsg
+++ b/usr.sbin/periodic/etc/security/700.kernelmsg
@@ -39,8 +39,6 @@ fi
. /etc/periodic/security/security.functions
-security_daily_compat_var security_status_kernelmsg_enable
-
rc=0
if check_yesno_period security_status_kernelmsg_enable
diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail
index c5a3a972aaa1..19bf9a4b3b91 100755
--- a/usr.sbin/periodic/etc/security/800.loginfail
+++ b/usr.sbin/periodic/etc/security/800.loginfail
@@ -37,9 +37,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_logdir
-security_daily_compat_var security_status_loginfail_enable
-
LOG="${security_status_logdir}"
yesterday=`date -v-1d "+%b %e "`
diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap
index 55fa58f4df39..bbbc04a03988 100755
--- a/usr.sbin/periodic/etc/security/900.tcpwrap
+++ b/usr.sbin/periodic/etc/security/900.tcpwrap
@@ -37,9 +37,6 @@ then
source_periodic_confs
fi
-security_daily_compat_var security_status_logdir
-security_daily_compat_var security_status_tcpwrap_enable
-
LOG="${security_status_logdir}"
yesterday=`date -v-1d "+%b %e "`
diff --git a/usr.sbin/periodic/etc/security/security.functions b/usr.sbin/periodic/etc/security/security.functions
index aa19a99ebf87..c3ff6eb69391 100644
--- a/usr.sbin/periodic/etc/security/security.functions
+++ b/usr.sbin/periodic/etc/security/security.functions
@@ -31,9 +31,6 @@ case "$0" in
*/security.functions) exit 0 ;;
esac
-security_daily_compat_var security_status_logdir
-security_daily_compat_var security_status_diff_flags
-
#
# Show differences in the output of an audit command
#
diff --git a/usr.sbin/periodic/periodic.conf b/usr.sbin/periodic/periodic.conf
index 608a199b3cc9..3bb34d827564 100644
--- a/usr.sbin/periodic/periodic.conf
+++ b/usr.sbin/periodic/periodic.conf
@@ -345,28 +345,6 @@ if [ -z "${source_periodic_confs_defined}" ]; then
fi
}
- # Compatibility with old daily variable names.
- # They can be removed in stable/11.
- security_daily_compat_var() {
- local var=$1 dailyvar value
-
- dailyvar=daily_status_security${var#security_status}
- periodvar=${var%enable}period
- eval value=\"\$$dailyvar\"
- [ -z "$value" ] && return
- echo "Warning: Variable \$$dailyvar is deprecated," \
- "use \$$var instead." >&2
- case "$value" in
- [Yy][Ee][Ss])
- eval $var=YES
- eval $periodvar=daily
- ;;
- *)
- eval $var=\"$value\"
- ;;
- esac
- }
-
check_yesno_period() {
local var="$1" periodvar value period
diff --git a/usr.sbin/ppp/chat.h b/usr.sbin/ppp/chat.h
index 54e86834be60..c8fcf9a9c3cc 100644
--- a/usr.sbin/ppp/chat.h
+++ b/usr.sbin/ppp/chat.h
@@ -26,6 +26,8 @@
* SUCH DAMAGE.
*/
+#include <sys/param.h>
+
#define CHAT_EXPECT 0
#define CHAT_SEND 1
#define CHAT_DONE 2
@@ -74,7 +76,7 @@ struct chat {
#define descriptor2chat(d) \
((d)->type == CHAT_DESCRIPTOR ? (struct chat *)(d) : NULL)
-#define VECSIZE(v) (sizeof(v) / sizeof(v[0]))
+#define VECSIZE(v) nitems(v)
extern void chat_Init(struct chat *, struct physical *);
extern int chat_Setup(struct chat *, const char *, const char *);
diff --git a/usr.sbin/praudit/Makefile b/usr.sbin/praudit/Makefile
index 2eb78dddf292..bb4c0fdf3258 100644
--- a/usr.sbin/praudit/Makefile
+++ b/usr.sbin/praudit/Makefile
@@ -8,6 +8,7 @@ OPENBSMDIR=${SRCTOP}/contrib/openbsm
CFLAGS+= -I${OPENBSMDIR}
+PACKAGE=audit
PROG= praudit
MAN= praudit.1
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index aab7e902cc4c..fd11c7666955 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -388,7 +388,7 @@ filemode(void)
printf(sizeof(uintptr_t) == 4 ? fhdr32 : fhdr64);
wid = (int)sizeof(uintptr_t) * 2;
for (fp = (struct xfile *)buf, i = 0; i < openf; ++fp, ++i) {
- if ((size_t)fp->xf_type >= sizeof(dtypes) / sizeof(dtypes[0]))
+ if ((size_t)fp->xf_type >= nitems(dtypes))
continue;
(void)printf("%*jx", wid, (uintmax_t)(uintptr_t)fp->xf_file);
(void)printf(" %-6.6s", dtypes[fp->xf_type]);
diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c
index 063553dd084f..fc17f6dba022 100644
--- a/usr.sbin/pw/pw.c
+++ b/usr.sbin/pw/pw.c
@@ -101,13 +101,16 @@ static int (*cmdfunc[W_NUM][M_NUM])(int argc, char **argv, char *_name) = {
struct pwconf conf;
+static int mode = -1;
+static int which = -1;
+
static int getindex(const char *words[], const char *word);
static void cmdhelp(int mode, int which);
int
main(int argc, char *argv[])
{
- int mode = -1, which = -1, tmp;
+ int tmp;
struct stat st;
char arg, *arg1;
bool relocated, nis;
@@ -375,5 +378,11 @@ cmdhelp(int mode, int which)
fprintf(stderr, "%s", help[which][mode]);
}
- exit(EXIT_FAILURE);
+ exit(EX_USAGE);
+}
+
+void
+usage(void)
+{
+ cmdhelp(mode, which);
}
diff --git a/usr.sbin/pw/pw.h b/usr.sbin/pw/pw.h
index 5de333ce5e71..c3725693f91d 100644
--- a/usr.sbin/pw/pw.h
+++ b/usr.sbin/pw/pw.h
@@ -36,14 +36,14 @@
enum _mode
{
- M_ADD,
- M_DELETE,
- M_UPDATE,
- M_PRINT,
+ M_ADD,
+ M_DELETE,
+ M_MODIFY,
+ M_SHOW,
M_NEXT,
M_LOCK,
M_UNLOCK,
- M_NUM
+ M_NUM
};
enum _passmode
@@ -56,13 +56,13 @@ enum _passmode
enum _which
{
- W_USER,
- W_GROUP,
- W_NUM
+ W_USER,
+ W_GROUP,
+ W_NUM
};
-#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO)
-#define _PW_CONF "pw.conf"
+#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO)
+#define _PW_CONF "pw.conf"
#define _UC_MAXLINE 1024
#define _UC_MAXSHELLS 32
@@ -114,3 +114,5 @@ uintmax_t strtounum(const char * __restrict, uintmax_t, uintmax_t,
const char ** __restrict);
bool grp_has_member(struct group *grp, const char *name);
+
+void usage(void);
diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c
index 32dec769fb1a..1941c03aa2c5 100644
--- a/usr.sbin/pw/pw_group.c
+++ b/usr.sbin/pw/pw_group.c
@@ -273,9 +273,13 @@ pw_group_next(int argc, char **argv, char *arg1 __unused)
quiet = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -332,9 +336,13 @@ pw_group_show(int argc, char **argv, char *arg1)
all = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -391,9 +399,13 @@ pw_group_del(int argc, char **argv, char *arg1)
nis = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -551,9 +563,13 @@ pw_group_add(int argc, char **argv, char *arg1)
nis = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -645,9 +661,14 @@ pw_group_mod(int argc, char **argv, char *arg1)
nis = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
+
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
cnf = get_userconfig(cfg);
@@ -697,11 +718,11 @@ pw_group_mod(int argc, char **argv, char *arg1)
if ((grp = GETGRNAM(name)) == NULL)
errx(EX_SOFTWARE, "group disappeared during update");
- pw_log(cnf, M_UPDATE, W_GROUP, "%s(%ju)", grp->gr_name,
+ pw_log(cnf, M_MODIFY, W_GROUP, "%s(%ju)", grp->gr_name,
(uintmax_t)grp->gr_gid);
if (nis && nis_update() == 0)
- pw_log(cnf, M_UPDATE, W_GROUP, "NIS maps updated");
+ pw_log(cnf, M_MODIFY, W_GROUP, "NIS maps updated");
return (EXIT_SUCCESS);
}
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index 6875d931a1d2..89354b249935 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -146,7 +146,7 @@ create_and_populate_homedir(struct userconf *cnf, struct passwd *pwd,
copymkdir(conf.rootfd, pwd->pw_dir, skelfd, homemode, pwd->pw_uid,
pwd->pw_gid, 0);
- pw_log(cnf, update ? M_UPDATE : M_ADD, W_USER, "%s(%ju) home %s made",
+ pw_log(cnf, update ? M_MODIFY : M_ADD, W_USER, "%s(%ju) home %s made",
pwd->pw_name, (uintmax_t)pwd->pw_uid, pwd->pw_dir);
}
@@ -708,9 +708,13 @@ pw_user_next(int argc, char **argv, char *name __unused)
quiet = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -772,9 +776,13 @@ pw_user_show(int argc, char **argv, char *arg1)
v7 = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -855,9 +863,13 @@ pw_user_del(int argc, char **argv, char *arg1)
nis = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -1003,9 +1015,13 @@ pw_user_lock(int argc, char **argv, char *arg1)
/* compatibility */
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
return (pw_userlock(arg1, M_LOCK));
}
@@ -1022,9 +1038,13 @@ pw_user_unlock(int argc, char **argv, char *arg1)
/* compatibility */
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
return (pw_userlock(arg1, M_UNLOCK));
}
@@ -1291,9 +1311,13 @@ pw_user_add(int argc, char **argv, char *arg1)
nis = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (geteuid() != 0 && ! dryrun)
errx(EX_NOPERM, "you must be root");
@@ -1604,9 +1628,13 @@ pw_user_mod(int argc, char **argv, char *arg1)
nis = true;
break;
default:
- exit(EX_USAGE);
+ usage();
}
}
+ argc -= optind;
+ argv += optind;
+ if (argc > 0)
+ usage();
if (geteuid() != 0 && ! dryrun)
errx(EX_NOPERM, "you must be root");
@@ -1787,7 +1815,7 @@ pw_user_mod(int argc, char **argv, char *arg1)
if (pwd == NULL)
errx(EX_NOUSER, "user '%s' disappeared during update", name);
grp = GETGRGID(pwd->pw_gid);
- pw_log(cnf, M_UPDATE, W_USER, "%s(%ju):%s(%ju):%s:%s:%s",
+ pw_log(cnf, M_MODIFY, W_USER, "%s(%ju):%s(%ju):%s:%s:%s",
pwd->pw_name, (uintmax_t)pwd->pw_uid,
grp ? grp->gr_name : "unknown",
(uintmax_t)(grp ? grp->gr_gid : (uid_t)-1),
@@ -1808,7 +1836,7 @@ pw_user_mod(int argc, char **argv, char *arg1)
}
if (nis && nis_update() == 0)
- pw_log(cnf, M_UPDATE, W_USER, "NIS maps updated");
+ pw_log(cnf, M_MODIFY, W_USER, "NIS maps updated");
return (EXIT_SUCCESS);
}
diff --git a/usr.sbin/pw/tests/pw_useradd_test.sh b/usr.sbin/pw/tests/pw_useradd_test.sh
index 3b495482eb05..b4efa42bada7 100755
--- a/usr.sbin/pw/tests/pw_useradd_test.sh
+++ b/usr.sbin/pw/tests/pw_useradd_test.sh
@@ -313,6 +313,22 @@ user_add_R_intermed_body() {
test -d ${HOME}/a/b/c/foo || atf_fail "user directory not created"
}
+atf_test_case user_add_dir
+user_add_dir_body() {
+ populate_root_etc_skel
+
+ atf_check -s exit:0 ${RPW} useradd foo -M 0705 -m
+ atf_check grep -q '^foo:' $HOME/etc/master.passwd
+ atf_check test -d ${HOME}/home/foo
+ atf_check -o save:ugid \
+ awk -F: '$1 == "foo" { print $3, $4 }' \
+ $HOME/etc/master.passwd
+ atf_check -o file:ugid \
+ stat -f '%u %g' ${HOME}/home/foo
+ atf_check -o inline:"40705\n" \
+ stat -f '%p' ${HOME}/home/foo
+}
+
atf_test_case user_add_skel
user_add_skel_body() {
populate_root_etc_skel
@@ -511,6 +527,7 @@ atf_init_test_cases() {
atf_add_test_case user_add_R
atf_add_test_case user_add_R_no_symlink
atf_add_test_case user_add_R_intermed
+ atf_add_test_case user_add_dir
atf_add_test_case user_add_skel
atf_add_test_case user_add_uid0
atf_add_test_case user_add_uid_too_large
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index 7e0652d26533..0ac7ddfeea5c 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -188,7 +188,8 @@ main(int argc, char **argv)
kernel_lockd_client = FALSE;
if (modfind("nfslockd") < 0) {
if (kldload("nfslockd") < 0) {
- fprintf(stderr, "Can't find or load kernel support for rpc.lockd - using non-kernel implementation\n");
+ fprintf(stderr, "Unable to load nfslockd(4), "
+ "using userland implementation\n");
} else {
kernel_lockd = TRUE;
}
diff --git a/usr.sbin/rpc.lockd/rpc.lockd.8 b/usr.sbin/rpc.lockd/rpc.lockd.8
index 89f55087901d..89592a1cceaf 100644
--- a/usr.sbin/rpc.lockd/rpc.lockd.8
+++ b/usr.sbin/rpc.lockd/rpc.lockd.8
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 21, 2019
+.Dd May 8, 2024
.Dt RPC.LOCKD 8
.Os
.Sh NAME
@@ -44,7 +44,7 @@
The
.Nm
utility provides monitored and unmonitored file and record locking services
-in an NFS environment.
+in an NFSv3 environment.
To monitor the status of hosts requesting locks,
the locking daemon typically operates in conjunction
with
@@ -137,6 +137,7 @@ RPC protocol specification for the network lock manager protocol.
.El
.Sh SEE ALSO
.Xr syslog 3 ,
+.Xr nfslockd 4 ,
.Xr rc.conf 5 ,
.Xr rpc.statd 8
.Sh STANDARDS
diff --git a/usr.sbin/rtadvctl/rtadvctl.c b/usr.sbin/rtadvctl/rtadvctl.c
index 727fa6ee1a52..9fdb643cef10 100644
--- a/usr.sbin/rtadvctl/rtadvctl.c
+++ b/usr.sbin/rtadvctl/rtadvctl.c
@@ -27,8 +27,8 @@
*
*/
+#include <sys/param.h>
#include <sys/queue.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
@@ -137,7 +137,7 @@ usage(void)
{
int i;
- for (i = 0; (size_t)i < sizeof(dtable)/sizeof(dtable[0]); i++) {
+ for (i = 0; (size_t)i < nitems(dtable); i++) {
if (dtable[i].dt_comm == NULL)
break;
printf("%s\n", dtable[i].dt_comm);
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
if (argc == 0)
usage();
- for (i = 0; (size_t)i < sizeof(dtable)/sizeof(dtable[0]); i++) {
+ for (i = 0; (size_t)i < nitems(dtable); i++) {
if (dtable[i].dt_comm == NULL ||
strcmp(dtable[i].dt_comm, argv[0]) == 0) {
action = dtable[i].dt_act;
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index bd990c58b36a..1b37d53c8b91 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -912,6 +912,58 @@ getconfig_free_dns:
}
free(dns);
}
+
+ /*
+ * handle pref64
+ */
+ rai->rai_pref64.p64_enabled = false;
+
+ if ((addr = (char *)agetstr("pref64", &bp))) {
+ if (inet_pton(AF_INET6, addr, &rai->rai_pref64.p64_prefix) != 1) {
+ syslog(LOG_ERR, "<%s> inet_pton failed for %s",
+ __func__, addr);
+ } else {
+ rai->rai_pref64.p64_enabled = true;
+
+ switch (val64 = agetnum("pref64len")) {
+ case -1:
+ case 96:
+ rai->rai_pref64.p64_plc = 0;
+ break;
+ case 64:
+ rai->rai_pref64.p64_plc = 1;
+ break;
+ case 56:
+ rai->rai_pref64.p64_plc = 2;
+ break;
+ case 48:
+ rai->rai_pref64.p64_plc = 3;
+ break;
+ case 40:
+ rai->rai_pref64.p64_plc = 4;
+ break;
+ case 32:
+ rai->rai_pref64.p64_plc = 5;
+ break;
+ default:
+ syslog(LOG_ERR, "prefix length %" PRIi64
+ "on %s is invalid; disabling PREF64",
+ val64, ifi->ifi_ifname);
+ rai->rai_pref64.p64_enabled = 0;
+ break;
+ }
+
+ /* This logic is from RFC 8781 section 4.1. */
+ val64 = agetnum("pref64lifetime");
+ if (val64 == -1)
+ val64 = rai->rai_lifetime * 3;
+ if (val64 > 65528)
+ val64 = 65528;
+ val64 = (val64 + 7) / 8;
+ rai->rai_pref64.p64_sl = (uint16_t) (uint64_t) val64;
+ }
+ }
+
/* construct the sending packet */
make_packet(rai);
@@ -1334,6 +1386,7 @@ make_packet(struct rainfo *rai)
struct rdnss *rdn;
struct nd_opt_dnssl *ndopt_dnssl;
struct dnssl *dns;
+ struct nd_opt_pref64 *ndopt_pref64;
size_t len;
struct prefix *pfx;
struct ifinfo *ifi;
@@ -1355,6 +1408,8 @@ make_packet(struct rainfo *rai)
packlen += sizeof(struct nd_opt_prefix_info) * rai->rai_pfxs;
if (rai->rai_linkmtu)
packlen += sizeof(struct nd_opt_mtu);
+ if (rai->rai_pref64.p64_enabled)
+ packlen += sizeof(struct nd_opt_pref64);
TAILQ_FOREACH(rti, &rai->rai_route, rti_next)
packlen += sizeof(struct nd_opt_route_info) +
@@ -1435,6 +1490,19 @@ make_packet(struct rainfo *rai)
buf += sizeof(struct nd_opt_mtu);
}
+ if (rai->rai_pref64.p64_enabled) {
+ ndopt_pref64 = (struct nd_opt_pref64 *)buf;
+ ndopt_pref64->nd_opt_pref64_type = ND_OPT_PREF64;
+ ndopt_pref64->nd_opt_pref64_len = 2;
+ ndopt_pref64->nd_opt_pref64_sl_plc =
+ (htons(rai->rai_pref64.p64_sl << 3)) |
+ htons((rai->rai_pref64.p64_plc & 0x7));
+ memcpy(&ndopt_pref64->nd_opt_prefix[0],
+ &rai->rai_pref64.p64_prefix,
+ sizeof(ndopt_pref64->nd_opt_prefix));
+ buf += sizeof(struct nd_opt_pref64);
+ }
+
TAILQ_FOREACH(pfx, &rai->rai_prefix, pfx_next) {
uint32_t vltime, pltime;
struct timespec now;
diff --git a/usr.sbin/rtadvd/control.c b/usr.sbin/rtadvd/control.c
index 80af6371a269..54a944833f64 100644
--- a/usr.sbin/rtadvd/control.c
+++ b/usr.sbin/rtadvd/control.c
@@ -27,8 +27,8 @@
*
*/
+#include <sys/param.h>
#include <sys/queue.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
@@ -75,7 +75,7 @@ cm_recv(int fd, char *buf)
pfds[0].events = POLLIN;
for (;;) {
- i = poll(pfds, sizeof(pfds)/sizeof(pfds[0]),
+ i = poll(pfds, nitems(pfds),
CM_RECV_TIMEOUT);
if (i == 0)
@@ -131,7 +131,7 @@ cm_recv(int fd, char *buf)
msglen);
for (;;) {
- i = poll(pfds, sizeof(pfds)/sizeof(pfds[0]),
+ i = poll(pfds, nitems(pfds),
CM_RECV_TIMEOUT);
if (i == 0)
diff --git a/usr.sbin/rtadvd/control_server.c b/usr.sbin/rtadvd/control_server.c
index e96a1958dd10..60fdc5ca2ec0 100644
--- a/usr.sbin/rtadvd/control_server.c
+++ b/usr.sbin/rtadvd/control_server.c
@@ -27,8 +27,8 @@
*
*/
+#include <sys/param.h>
#include <sys/queue.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
@@ -527,7 +527,7 @@ cm_getprop(struct ctrl_msg_pl *cp)
return (1);
for (i = 0;
- i < sizeof(getprop_dtable) / sizeof(getprop_dtable[0]);
+ i < nitems(getprop_dtable);
i++) {
if (strcmp(cp->cp_key, getprop_dtable[i].dt_comm) == 0)
return (getprop_dtable[i].dt_act(cp));
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c
index 6212639ba028..e1702a0aa72a 100644
--- a/usr.sbin/rtadvd/if.c
+++ b/usr.sbin/rtadvd/if.c
@@ -642,7 +642,7 @@ getinet6sysctl(int code)
mib[3] = code;
size = sizeof(value);
- if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &value, &size, NULL, 0)
+ if (sysctl(mib, nitems(mib), &value, &size, NULL, 0)
< 0) {
syslog(LOG_ERR, "<%s>: failed to get ip6 sysctl(%d): %s",
__func__, code,
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index aa9038b65e63..fa5640afa96c 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -328,7 +328,7 @@ main(int argc, char *argv[])
"<%s> there's no timer. waiting for inputs",
__func__);
}
- if ((i = poll(set, sizeof(set)/sizeof(set[0]),
+ if ((i = poll(set, nitems(set),
timeout ? (timeout->tv_sec * 1000 +
timeout->tv_nsec / 1000 / 1000) : INFTIM)) < 0) {
diff --git a/usr.sbin/rtadvd/rtadvd.conf.5 b/usr.sbin/rtadvd/rtadvd.conf.5
index 6824d2a5578b..8158d09f99cf 100644
--- a/usr.sbin/rtadvd/rtadvd.conf.5
+++ b/usr.sbin/rtadvd/rtadvd.conf.5
@@ -428,6 +428,24 @@ DNS search list entries.
The default value is 3/2 of the interval time.
.El
.Pp
+The following items are for PREF64 discovery
+.Pq RFC 8781 ,
+which will advertise the network's NAT64 prefix to clients.
+These items are optional.
+.Bl -tag -width indent
+.It Cm \&pref64
+(str) The prefix to advertise in the PREF64 option.
+.It Cm \&pref64len
+(num) The length of the PREF64 prefix.
+This must be 96, 64, 56, 48, 40, or 32.
+If not specified, the default is 96.
+.It Cm \&pref64lifetime
+(num) The prefix lifetime to advertise in the PREF64 option.
+This should be at least as long as the RA lifetime, but cannot be greater
+than 65528.
+If not specified, the default is the RA lifetime, or 65528, whichever is lower.
+.El
+.Pp
You can also refer one line from another by using
.Cm tc
capability.
diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h
index eb7746733c6e..597fb2f47f0d 100644
--- a/usr.sbin/rtadvd/rtadvd.h
+++ b/usr.sbin/rtadvd/rtadvd.h
@@ -32,6 +32,8 @@
* SUCH DAMAGE.
*/
+#include <stdbool.h>
+
#define ELM_MALLOC(p,error_action) \
do { \
p = malloc(sizeof(*p)); \
@@ -148,6 +150,14 @@ struct rdnss {
uint32_t rd_ltime; /* number of seconds valid */
};
+struct pref64 {
+ TAILQ_ENTRY(pref64) p64_next;
+ bool p64_enabled;
+ uint16_t p64_plc; /* prefix length code */
+ uint16_t p64_sl; /* scaled lifetime */
+ struct in6_addr p64_prefix;
+};
+
/*
* The maximum length of a domain name in a DNS search list is calculated
* by a domain name + length fields per 63 octets + a zero octet at
@@ -217,6 +227,7 @@ struct rainfo {
/* actual RA packet data and its length */
size_t rai_ra_datalen;
char *rai_ra_data;
+ struct pref64 rai_pref64; /* PREF64 option */
/* info about soliciter */
TAILQ_HEAD(, soliciter) rai_soliciter; /* recent solication source */
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 2f589e2492e3..237663eef74d 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -478,7 +478,7 @@ sender_process(void)
we->we_idle = htonl(now - stb.st_atime);
}
(void) getloadavg(avenrun,
- sizeof(avenrun) / sizeof(avenrun[0]));
+ nitems(avenrun));
for (i = 0; i < 3; i++)
mywd.wd_loadav[i] = htonl((u_long)(avenrun[i] * 100));
cc = (char *)wend - (char *)&mywd;
diff --git a/usr.sbin/snapinfo/snapinfo.8 b/usr.sbin/snapinfo/snapinfo.8
index 07e6bf2b4d4a..13c257f74ec5 100644
--- a/usr.sbin/snapinfo/snapinfo.8
+++ b/usr.sbin/snapinfo/snapinfo.8
@@ -53,7 +53,7 @@ Verbose mode.
Search the file system mounted on this mountpoint.
.El
.Sh SEE ALSO
-.Xr ffs 7 ,
+.Xr ffs 4 ,
.Xr mksnap_ffs 8
.Sh HISTORY
The
diff --git a/usr.sbin/usbconfig/usbconfig.c b/usr.sbin/usbconfig/usbconfig.c
index 7d257fea52cd..e28f8de9f75c 100644
--- a/usr.sbin/usbconfig/usbconfig.c
+++ b/usr.sbin/usbconfig/usbconfig.c
@@ -36,7 +36,7 @@
#include <grp.h>
#include <errno.h>
#include <ctype.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <libusb20_desc.h>
#include <libusb20.h>
@@ -210,7 +210,7 @@ get_token(const char *str, uint8_t narg)
{
uint8_t n;
- for (n = 0; n != (sizeof(token) / sizeof(token[0])); n++) {
+ for (n = 0; n != nitems(token); n++) {
if (strcasecmp(str, token[n].name) == 0) {
if (token[n].narg > narg) {
/* too few arguments */
diff --git a/usr.sbin/wlandebug/wlandebug.c b/usr.sbin/wlandebug/wlandebug.c
index b44d82d8dd1d..b086de94eb2a 100644
--- a/usr.sbin/wlandebug/wlandebug.c
+++ b/usr.sbin/wlandebug/wlandebug.c
@@ -33,7 +33,7 @@
* wlandebug [-i interface] flags
* (default interface is wlan.0).
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/sysctl.h>
#include <net/if.h>
@@ -47,7 +47,7 @@
#include <libifconfig.h>
-#define N(a) (sizeof(a)/sizeof(a[0]))
+#define N(a) nitems(a)
const char *progname;
diff --git a/usr.sbin/zonectl/zonectl.c b/usr.sbin/zonectl/zonectl.c
index 56cd3c436d10..53e5e6599597 100644
--- a/usr.sbin/zonectl/zonectl.c
+++ b/usr.sbin/zonectl/zonectl.c
@@ -32,8 +32,8 @@
#include <sys/cdefs.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <sys/stdint.h>
-#include <sys/types.h>
#include <sys/endian.h>
#include <sys/sbuf.h>
#include <sys/queue.h>
@@ -401,7 +401,7 @@ main(int argc, char **argv)
int entry_num;
status = scsi_get_nv(zone_cmd_map,
- (sizeof(zone_cmd_map) / sizeof(zone_cmd_map[0])),
+ nitems(zone_cmd_map),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
action = zone_cmd_map[entry_num].value;
diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh
index 0e0ceebe70b9..dde36e7984c6 100644
--- a/usr.sbin/zzz/zzz.sh
+++ b/usr.sbin/zzz/zzz.sh
@@ -27,9 +27,8 @@ if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then
# execute ACPI style suspend command
exec acpiconf -s "$SUSPEND_STATE"
else
- echo -n "Requested suspend state $SUSPEND_STATE "
- echo -n "is not supported."
- echo "Supported states: $SUPPORTED_STATES"
+ echo "Requested suspend state $SUSPEND_STATE is not supported."
+ echo "Supported states: $SUPPORTED_STATES"
fi
# Check for APM support
elif sysctl $APM_SUSPEND_DELAY >/dev/null 2>&1; then